import{s as e}from"./preload-helper-CggyeTPP.js";import{t}from"./license-LxoBP-L0.js";import{c as n,t as r}from"./account-CcS7Zm86.js";var i=`proLicense`;async function a(){let t=(await e.storage.sync.get(i))[i]??(await e.storage.local.get(i))[i];return typeof t==`string`?t:null}async function o(){let e=await a();return e?(await t(e)).valid:!1}async function s(){return await o()||await r()}async function c(n){let r=await t(n);return r.valid&&await e.storage.sync.set({[i]:n.trim()}).catch(async()=>{await e.storage.local.set({[i]:n.trim()})}),r}async function l(){await e.storage.sync.remove(i).catch(()=>{}),await e.storage.local.remove(i).catch(()=>{})}async function u(){let[e,t]=await Promise.all([a(),n()]);return{license:e,voucher:t}}export{s as a,o as i,u as n,l as r,c as t};