import{u as x,w as D,g as C,b as F,d as J,r as L,e as T,c as W,f as j,h as _,t as z,o as V,a as B,s as H}from"./main-e338d2ce.js";function M(e){return C()?(F(e),!0):!1}function A(e){return typeof e=="function"?e():x(e)}const G=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const I=Object.prototype.toString,R=e=>I.call(e)==="[object Object]",k=()=>{};function K(e,n){function t(...r){return new Promise((a,f)=>{Promise.resolve(e(()=>n.apply(this,r),{fn:n,thisArg:this,args:r})).then(a).catch(f)})}return t}const U=e=>e();function $(e,n,t={}){const{eventFilter:r=U,...a}=t;return D(e,K(r,n),a)}function q(e){var n;const t=A(e);return(n=t==null?void 0:t.$el)!=null?n:t}const O=G?window:void 0;function Q(...e){let n,t,r,a;if(typeof e[0]=="string"||Array.isArray(e[0])?([t,r,a]=e,n=O):[n,t,r,a]=e,!n)return k;Array.isArray(t)||(t=[t]),Array.isArray(r)||(r=[r]);const f=[],y=()=>{f.forEach(s=>s()),f.length=0},b=(s,i,d,c)=>(s.addEventListener(i,d,c),()=>s.removeEventListener(i,d,c)),v=D(()=>[q(n),A(a)],([s,i])=>{if(y(),!s)return;const d=R(i)?{...i}:i;f.push(...t.flatMap(c=>r.map(u=>b(s,c,u,d))))},{immediate:!0,flush:"post"}),p=()=>{v(),y()};return M(p),p}const S=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},h="__vueuse_ssr_handlers__",X=Y();function Y(){return h in S||(S[h]=S[h]||{}),S[h]}function Z(e,n){return X[e]||n}function ee(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const te={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}};function ne(e,n,t,r={}){var a;const{flush:f="pre",deep:y=!0,listenToStorageChanges:b=!0,writeDefaults:v=!0,mergeDefaults:p=!1,shallow:s,window:i=O,eventFilter:d,onError:c=o=>{console.error(o)}}=r,u=A(n),N=ee(u),l=(s?J:L)(n),m=(a=r.serializer)!=null?a:te[N];if(!t)try{t=Z("getDefaultStorageAsync",()=>{var o;return(o=O)==null?void 0:o.localStorage})()}catch(o){c(o)}async function P(o){if(!(!t||o&&o.key!==e))try{const g=o?o.newValue:await t.getItem(e);if(g==null)l.value=u,v&&u!==null&&await t.setItem(e,await m.write(u));else if(p){const w=await m.read(g);typeof p=="function"?l.value=p(w,u):N==="object"&&!Array.isArray(w)?l.value={...u,...w}:l.value=w}else l.value=await m.read(g)}catch(g){c(g)}}return P(),i&&b&&Q(i,"storage",o=>Promise.resolve().then(()=>P(o))),t&&$(l,async()=>{try{l.value==null?await t.removeItem(e):await t.setItem(e,await m.write(l.value))}catch(o){c(o)}},{flush:f,deep:y,eventFilter:d}),l}const re={async getItem(e){return(await chrome.storage.local.get(e))[e]},setItem(e,n){return chrome.storage.local.set({[e]:n})},removeItem(e){chrome.storage.local.remove(e)}};function oe(e,n,t){return ne(e,n,re,t)}const ae=oe("user","Leo Hunter"),se={class:"flex flex-col items-center"},ie={class:"mt-2"},le=T({__name:"Popup",setup(e){function n(){chrome.runtime.openOptionsPage()}return(t,r)=>(V(),W("div",se,[r[1]||(r[1]=j(" Popup Page ")),_("button",{class:"mt-4 p-2 text-xs text-white bg-blue-300 rounded",onClick:n}," Open Options Page "),_("div",ie,[r[0]||(r[0]=_("span",{class:"opacity-50"},"Storage:",-1)),j(" "+z(x(ae)),1)])]))}});const E=B(le);H(E);E.mount("#app");
