@wormhole-foundation/wormhole-connect 0.3.0-beta.0-development → 0.3.0-beta.1-development
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{aptos-pA6KZbBw.js → aptos--cRgJxLv.js} +1 -1
- package/dist/assets/ccip-nIi_p4zM.js +1 -0
- package/dist/assets/{cosmos-f5FpVoIT.js → cosmos-RixGz7q4.js} +1 -1
- package/dist/assets/{evm-Wgv0qkFH.js → evm-5aZ11sr9.js} +4 -4
- package/dist/assets/{index-asOtxns8.js → index-37oU2-By.js} +1 -1
- package/dist/assets/{index-hhU5j-34.js → index-LeHe4Gjj.js} +1 -1
- package/dist/assets/index-XtkoMMyw.js +7 -0
- package/dist/assets/index-bti7uInf.js +3 -0
- package/dist/assets/{index.es-0VUWq9QB.js → index.es--jOuZ4lh.js} +1 -1
- package/dist/assets/index.es-00radgcV.js +20 -0
- package/dist/assets/{index.es-4E5PqK_f.js → index.es-Pqf6uo9-.js} +3 -3
- package/dist/assets/libsodium-wrappers-XgohdhTj.js +1 -0
- package/dist/assets/{sei-M2rZ9ku5.js → sei-J78VkMVQ.js} +1 -1
- package/dist/assets/solana-3ev6kIv7.js +7 -0
- package/dist/assets/{solanaEmbed.esm-1Awe9a4x.js → solanaEmbed.esm-bag_3ej_.js} +1 -1
- package/dist/assets/{sui-7olk-qLk.js → sui-4vLtme4F.js} +1 -1
- package/dist/{assets/main-wVJAa1zx.js → main.js} +6 -6
- package/lib/{aptos-SE9xL6YR.mjs → aptos-AEDvNZW0.mjs} +1 -1
- package/lib/{aptos-HrKTgRXj.js → aptos-E_bmP-uH.js} +1 -1
- package/lib/{ccip-LevZMjhC.mjs → ccip-DgqxzCnp.mjs} +3 -3
- package/lib/{ccip-7BoLGyzE.js → ccip-x_5dfOyY.js} +1 -1
- package/lib/{cosmos-bi1xqrBB.mjs → cosmos-iL7Lphnv.mjs} +3 -3
- package/lib/{cosmos-RRozAQR1.js → cosmos-rBSbdATY.js} +1 -1
- package/lib/{evm-DpTGe1xN.js → evm-U8W0wnAS.js} +3 -3
- package/lib/{evm-hEWYh88n.mjs → evm-u33uO5mU.mjs} +4 -4
- package/lib/{index-fNBspXvL.mjs → index-HeJJ4ioY.mjs} +68 -68
- package/lib/{index-z6KdZ90O.mjs → index-IOv_IOHh.mjs} +1 -1
- package/lib/{index-gMv8O7x8.js → index-KI5CF8KC.js} +1 -1
- package/lib/{index-k3HwxTc6.js → index-Kg2IYkKj.js} +1 -1
- package/lib/{index-ff22c93m.js → index-PeRFKzot.js} +1 -1
- package/lib/{index-GybMpL7C.mjs → index-SGYq0qf1.mjs} +76 -74
- package/lib/{index-mo8HavDi.mjs → index-ej1vfGal.mjs} +2 -2
- package/lib/{index-QFolrIvD.js → index-jKol2sI7.js} +5 -5
- package/lib/index-nGC6YonD.js +3 -0
- package/lib/{index-z37Kqbxx.mjs → index-wrVsD6xr.mjs} +3 -3
- package/lib/{index.es-674v5fkD.js → index.es-4MsJTigr.js} +1 -1
- package/lib/{index.es-eijvlXbt.mjs → index.es-5no8HiJc.mjs} +4 -4
- package/lib/{index.es-LLujoQUP.js → index.es-60zy5kS0.js} +2 -2
- package/lib/{index.es-OZG9h1DE.mjs → index.es-FiIhT_0D.mjs} +1 -1
- package/lib/{index.es-5GouFA6T.mjs → index.es-YhzlyIL4.mjs} +2 -2
- package/lib/{index.es-i-lckTCE.js → index.es-vu-DHGhE.js} +1 -1
- package/lib/index.js +1 -1
- package/lib/index.mjs +1 -1
- package/lib/{libsodium-wrappers-5vjrjBSO.js → libsodium-wrappers-GC2qwMrd.js} +1 -1
- package/lib/{libsodium-wrappers-5Q5SB8Ev.mjs → libsodium-wrappers-ziNSE4zr.mjs} +1 -1
- package/lib/{sei-vPR2n1Y7.mjs → sei-Xk3hWtbl.mjs} +2 -2
- package/lib/{sei-NOgRpGt3.js → sei-zCfp2In3.js} +1 -1
- package/lib/{solana-Hqom8lV9.mjs → solana-3u6kb1G_.mjs} +3 -3
- package/lib/{solana-94sTiU-X.js → solana-lpXIOlL5.js} +1 -1
- package/lib/{solanaEmbed.esm-glCRh6tR.mjs → solanaEmbed.esm-93QbCbVq.mjs} +2 -2
- package/lib/{solanaEmbed.esm-tZxVLSLJ.js → solanaEmbed.esm-e2SOktqM.js} +1 -1
- package/lib/{sui-82tI9UDL.mjs → sui-BylAbrsX.mjs} +1 -1
- package/lib/{sui-lIzqq8QP.js → sui-O_R5r4YX.js} +1 -1
- package/package.json +1 -1
- package/dist/assets/ccip-u26S4Hov.js +0 -1
- package/dist/assets/index--x31VXme.js +0 -3
- package/dist/assets/index-3iD33HDP.js +0 -7
- package/dist/assets/index.es-DkxB7tN9.js +0 -20
- package/dist/assets/libsodium-wrappers-1pBdIONR.js +0 -1
- package/dist/assets/solana-6MSMmp1N.js +0 -7
- package/lib/index-TETuoXKR.js +0 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as _t,s as ce,T as N,t as U,a as C,o as ot,R as Bo,p as q,y as gt}from"./index-
|
|
1
|
+
import{n as _t,s as ce,T as N,t as U,a as C,o as ot,R as Bo,p as q,y as gt}from"./index-XtkoMMyw.js";import{d as Do}from"./dijkstra-mfgL5WWt.js";import"../main.js";var Uo=function(t){for(var r=[],n=t.length,o=0;o<n;o++){var i=t.charCodeAt(o);if(i>=55296&&i<=56319&&n>o+1){var s=t.charCodeAt(o+1);s>=56320&&s<=57343&&(i=(i-55296)*1024+s-56320+65536,o+=1)}if(i<128){r.push(i);continue}if(i<2048){r.push(i>>6|192),r.push(i&63|128);continue}if(i<55296||i>=57344&&i<65536){r.push(i>>12|224),r.push(i>>6&63|128),r.push(i&63|128);continue}if(i>=65536&&i<=1114111){r.push(i>>18|240),r.push(i>>12&63|128),r.push(i>>6&63|128),r.push(i&63|128);continue}r.push(239,191,189)}return new Uint8Array(r).buffer};/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as $,p as Jt,s as Nr,g as jt,aa as Br,ae as Rr}from"./main-wVJAa1zx.js";import{d as Lr}from"./dijkstra-mfgL5WWt.js";import{Q as Mr}from"./index.es-0VUWq9QB.js";import{U as Pr,z as Or}from"./index.es-DkxB7tN9.js";var Ir=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||n.forEach(function(o){e.addRange(o)}),t&&t.focus()}},Dr=Ir,mt={"text/plain":"Text","text/html":"Url",default:"Text"},Ur="Copy to clipboard: #{key}, Enter";function $r(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function Fr(e,t){var n,r,o,a,i,l,c=!1;t||(t={}),n=t.debug||!1;try{o=Dr(),a=document.createRange(),i=document.getSelection(),l=document.createElement("span"),l.textContent=e,l.ariaHidden="true",l.style.all="unset",l.style.position="fixed",l.style.top=0,l.style.clip="rect(0, 0, 0, 0)",l.style.whiteSpace="pre",l.style.webkitUserSelect="text",l.style.MozUserSelect="text",l.style.msUserSelect="text",l.style.userSelect="text",l.addEventListener("copy",function(s){if(s.stopPropagation(),t.format)if(s.preventDefault(),typeof s.clipboardData>"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var d=mt[t.format]||mt.default;window.clipboardData.setData(d,e)}else s.clipboardData.clearData(),s.clipboardData.setData(t.format,e);t.onCopy&&(s.preventDefault(),t.onCopy(s.clipboardData))}),document.body.appendChild(l),a.selectNodeContents(l),i.addRange(a);var u=document.execCommand("copy");if(!u)throw new Error("copy command was unsuccessful");c=!0}catch(s){n&&console.error("unable to copy using execCommand: ",s),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),c=!0}catch(d){n&&console.error("unable to copy using clipboardData: ",d),n&&console.error("falling back to prompt"),r=$r("message"in t?t.message:Ur),window.prompt(r,e)}}finally{i&&(typeof i.removeRange=="function"?i.removeRange(a):i.removeAllRanges()),l&&document.body.removeChild(l),o()}return c}var Wr=Fr,Ge={},A={};Object.defineProperty(A,"__esModule",{value:!0});var Gt=A.getLocalStorage=sn=A.getLocalStorageOrThrow=cn=A.getCrypto=ln=A.getCryptoOrThrow=an=A.getLocation=on=A.getLocationOrThrow=rn=A.getNavigator=nn=A.getNavigatorOrThrow=tn=A.getDocument=en=A.getDocumentOrThrow=Zt=A.getFromWindowOrThrow=Xt=A.getFromWindow=void 0;function Q(e){let t;return typeof window<"u"&&typeof window[e]<"u"&&(t=window[e]),t}var Xt=A.getFromWindow=Q;function oe(e){const t=Q(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}var Zt=A.getFromWindowOrThrow=oe;function zr(){return oe("document")}var en=A.getDocumentOrThrow=zr;function Hr(){return Q("document")}var tn=A.getDocument=Hr;function qr(){return oe("navigator")}var nn=A.getNavigatorOrThrow=qr;function Kr(){return Q("navigator")}var rn=A.getNavigator=Kr;function Vr(){return oe("location")}var on=A.getLocationOrThrow=Vr;function Yr(){return Q("location")}var an=A.getLocation=Yr;function Qr(){return oe("crypto")}var ln=A.getCryptoOrThrow=Qr;function Jr(){return Q("crypto")}var cn=A.getCrypto=Jr;function jr(){return oe("localStorage")}var sn=A.getLocalStorageOrThrow=jr;function Gr(){return Q("localStorage")}Gt=A.getLocalStorage=Gr;Object.defineProperty(Ge,"__esModule",{value:!0});var un=Ge.getWindowMetadata=void 0;const vt=A;function Xr(){let e,t;try{e=vt.getDocumentOrThrow(),t=vt.getLocationOrThrow()}catch{return null}function n(){const d=e.getElementsByTagName("link"),y=[];for(let _=0;_<d.length;_++){const h=d[_],b=h.getAttribute("rel");if(b&&b.toLowerCase().indexOf("icon")>-1){const f=h.getAttribute("href");if(f)if(f.toLowerCase().indexOf("https:")===-1&&f.toLowerCase().indexOf("http:")===-1&&f.indexOf("//")!==0){let v=t.protocol+"//"+t.host;if(f.indexOf("/")===0)v+=f;else{const m=t.pathname.split("/");m.pop();const g=m.join("/");v+=g+"/"+f}y.push(v)}else if(f.indexOf("//")===0){const v=t.protocol+f;y.push(v)}else y.push(f)}}return y}function r(...d){const y=e.getElementsByTagName("meta");for(let _=0;_<y.length;_++){const h=y[_],b=["itemprop","property","name"].map(f=>h.getAttribute(f)).filter(f=>f?d.includes(f):!1);if(b.length&&b){const f=h.getAttribute("content");if(f)return f}}return""}function o(){let d=r("name","og:site_name","og:title","twitter:title");return d||(d=e.title),d}function a(){return r("description","og:description","twitter:description","keywords")}const i=o(),l=a(),c=t.origin,u=n();return{description:l,url:c,icons:u,name:i}}un=Ge.getWindowMetadata=Xr;var Zr=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),o=0,t=0;t<n;t++)for(var a=arguments[t],i=0,l=a.length;i<l;i++,o++)r[o]=a[i];return r},eo=function(){function e(t,n,r){this.name=t,this.version=n,this.os=r,this.type="browser"}return e}(),to=function(){function e(t){this.version=t,this.type="node",this.name="node",this.os=$.process.platform}return e}(),no=function(){function e(t,n,r,o){this.name=t,this.version=n,this.os=r,this.bot=o,this.type="bot-device"}return e}(),ro=function(){function e(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return e}(),oo=function(){function e(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return e}(),ao=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,io=/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,wt=3,lo=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",ao]],yt=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function co(e){return e?bt(e):typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new oo:typeof navigator<"u"?bt(navigator.userAgent):fo()}function so(e){return e!==""&&lo.reduce(function(t,n){var r=n[0],o=n[1];if(t)return t;var a=o.exec(e);return!!a&&[r,a]},!1)}function bt(e){var t=so(e);if(!t)return null;var n=t[0],r=t[1];if(n==="searchbot")return new ro;var o=r[1]&&r[1].split(/[._]/).slice(0,3);o?o.length<wt&&(o=Zr(o,_o(wt-o.length))):o=[];var a=o.join("."),i=uo(e),l=io.exec(e);return l&&l[1]?new no(n,a,i,l[1]):new eo(n,a,i)}function uo(e){for(var t=0,n=yt.length;t<n;t++){var r=yt[t],o=r[0],a=r[1],i=a.exec(e);if(i)return o}return null}function fo(){var e=typeof $.process<"u"&&$.process.version;return e?new to($.process.version.slice(1)):null}function _o(e){for(var t=[],n=0;n<e;n++)t.push("0");return t}function Xe(e){return co(e)}function Te(){const e=Xe();return e&&e.os?e.os:void 0}function fn(){const e=Te();return e?e.toLowerCase().includes("android"):!1}function dn(){const e=Te();return e?e.toLowerCase().includes("ios")||e.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1:!1}function ho(){return Te()?fn()||dn():!1}function _n(){const e=Xe();return e&&e.name?e.name.toLowerCase()==="node":!1}function go(){return!_n()&&!!hn()}const po=Xt,mo=Zt,vo=en,wo=tn,yo=nn,hn=rn,bo=on,Co=an,Eo=ln,xo=cn,To=sn,Se=Gt;function So(){return un()}function ko(e){if(typeof e!="string")throw new Error(`Cannot safe json parse value of type ${typeof e}`);try{return JSON.parse(e)}catch{return e}}function Ao(e){return typeof e=="string"?e:JSON.stringify(e)}const gn=ko,pn=Ao;function mn(e,t){const n=pn(t),r=Se();r&&r.setItem(e,n)}function No(e){let t=null,n=null;const r=Se();return r&&(n=r.getItem(e)),t=n&&gn(n),t}function Bo(e){const t=Se();t&&t.removeItem(e)}const vn="WALLETCONNECT_DEEPLINK_CHOICE";function Ro(e,t){const n=encodeURIComponent(e);return t.universalLink?`${t.universalLink}/wc?uri=${n}`:t.deepLink?`${t.deepLink}${t.deepLink.endsWith(":")?"//":"/"}wc?uri=${n}`:""}function Lo(e){const t=e.href.split("?")[0];mn(vn,Object.assign(Object.assign({},e),{href:t}))}function wn(e,t){return e.filter(n=>n.name.toLowerCase().includes(t.toLowerCase()))[0]}function Mo(e,t){let n=e;return t&&(n=t.map(r=>wn(e,r)).filter(Boolean)),n}const yn="https://registry.walletconnect.com";function Po(){return yn+"/api/v2/wallets"}function Oo(){return yn+"/api/v2/dapps"}function bn(e,t="mobile"){var n;return{name:e.name||"",shortName:e.metadata.shortName||"",color:e.metadata.colors.primary||"",logo:(n=e.image_url.sm)!==null&&n!==void 0?n:"",universalLink:e[t].universal||"",deepLink:e[t].native||""}}function Io(e,t="mobile"){return Object.values(e).filter(n=>!!n[t].universal||!!n[t].native).map(n=>bn(n,t))}const Do=Object.freeze(Object.defineProperty({__proto__:null,detectEnv:Xe,detectOS:Te,formatIOSMobile:Ro,formatMobileRegistry:Io,formatMobileRegistryEntry:bn,getClientMeta:So,getCrypto:xo,getCryptoOrThrow:Eo,getDappRegistryUrl:Oo,getDocument:wo,getDocumentOrThrow:vo,getFromWindow:po,getFromWindowOrThrow:mo,getLocal:No,getLocalStorage:Se,getLocalStorageOrThrow:To,getLocation:Co,getLocationOrThrow:bo,getMobileLinkRegistry:Mo,getMobileRegistryEntry:wn,getNavigator:hn,getNavigatorOrThrow:yo,getWalletRegistryUrl:Po,isAndroid:fn,isBrowser:go,isIOS:dn,isMobile:ho,isNode:_n,mobileLinkChoiceKey:vn,removeLocal:Bo,safeJsonParse:gn,safeJsonStringify:pn,saveMobileLinkInfo:Lo,setLocal:mn},Symbol.toStringTag,{value:"Module"})),Uo=Jt(Do);var _e={},$o=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},Cn={},q={},Fo={}.toString,Ze=Array.isArray||function(e){return Fo.call(e)=="[object Array]"},Wo=Ze;function zo(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},e.foo()===42}catch{return!1}}T.TYPED_ARRAY_SUPPORT=zo();var Ct=T.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function T(e,t,n){return!T.TYPED_ARRAY_SUPPORT&&!(this instanceof T)?new T(e,t,n):typeof e=="number"?En(this,e):Jo(this,e,t,n)}T.TYPED_ARRAY_SUPPORT&&(T.prototype.__proto__=Uint8Array.prototype,T.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&T[Symbol.species]===T&&Object.defineProperty(T,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}));function et(e){if(e>=Ct)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ct.toString(16)+" bytes");return e|0}function Ho(e){return e!==e}function G(e,t){var n;return T.TYPED_ARRAY_SUPPORT?(n=new Uint8Array(t),n.__proto__=T.prototype):(n=e,n===null&&(n=new T(t)),n.length=t),n}function En(e,t){var n=G(e,t<0?0:et(t)|0);if(!T.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)n[r]=0;return n}function qo(e,t){var n=Tn(t)|0,r=G(e,n),o=r.write(t);return o!==n&&(r=r.slice(0,o)),r}function We(e,t){for(var n=t.length<0?0:et(t.length)|0,r=G(e,n),o=0;o<n;o+=1)r[o]=t[o]&255;return r}function Ko(e,t,n,r){if(n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");var o;return n===void 0&&r===void 0?o=new Uint8Array(t):r===void 0?o=new Uint8Array(t,n):o=new Uint8Array(t,n,r),T.TYPED_ARRAY_SUPPORT?o.__proto__=T.prototype:o=We(e,o),o}function Vo(e,t){if(T.isBuffer(t)){var n=et(t.length)|0,r=G(e,n);return r.length===0||t.copy(r,0,0,n),r}if(t){if(typeof ArrayBuffer<"u"&&t.buffer instanceof ArrayBuffer||"length"in t)return typeof t.length!="number"||Ho(t.length)?G(e,0):We(e,t);if(t.type==="Buffer"&&Array.isArray(t.data))return We(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function xn(e,t){t=t||1/0;for(var n,r=e.length,o=null,a=[],i=0;i<r;++i){if(n=e.charCodeAt(i),n>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}else if(i+1===r){(t-=3)>-1&&a.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),o=n;continue}n=(o-55296<<10|n-56320)+65536}else o&&(t-=3)>-1&&a.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,n&63|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw new Error("Invalid code point")}return a}function Tn(e){if(T.isBuffer(e))return e.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;typeof e!="string"&&(e=""+e);var t=e.length;return t===0?0:xn(e).length}function Yo(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function Qo(e,t,n,r){return Yo(xn(t,e.length-n),e,n,r)}function Jo(e,t,n,r){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer?Ko(e,t,n,r):typeof t=="string"?qo(e,t):Vo(e,t)}T.prototype.write=function(t,n,r){n===void 0?(r=this.length,n=0):r===void 0&&typeof n=="string"?(r=this.length,n=0):isFinite(n)&&(n=n|0,isFinite(r)?r=r|0:r=void 0);var o=this.length-n;if((r===void 0||r>o)&&(r=o),t.length>0&&(r<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");return Qo(this,t,n,r)};T.prototype.slice=function(t,n){var r=this.length;t=~~t,n=n===void 0?r:~~n,t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),n<0?(n+=r,n<0&&(n=0)):n>r&&(n=r),n<t&&(n=t);var o;if(T.TYPED_ARRAY_SUPPORT)o=this.subarray(t,n),o.__proto__=T.prototype;else{var a=n-t;o=new T(a,void 0);for(var i=0;i<a;++i)o[i]=this[i+t]}return o};T.prototype.copy=function(t,n,r,o){if(r||(r=0),!o&&o!==0&&(o=this.length),n>=t.length&&(n=t.length),n||(n=0),o>0&&o<r&&(o=r),o===r||t.length===0||this.length===0)return 0;if(n<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),t.length-n<o-r&&(o=t.length-n+r);var a=o-r,i;if(this===t&&r<n&&n<o)for(i=a-1;i>=0;--i)t[i+n]=this[i+r];else if(a<1e3||!T.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)t[i+n]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+a),n);return a};T.prototype.fill=function(t,n,r){if(typeof t=="string"){if(typeof n=="string"?(n=0,r=this.length):typeof r=="string"&&(r=this.length),t.length===1){var o=t.charCodeAt(0);o<256&&(t=o)}}else typeof t=="number"&&(t=t&255);if(n<0||this.length<n||this.length<r)throw new RangeError("Out of range index");if(r<=n)return this;n=n>>>0,r=r===void 0?this.length:r>>>0,t||(t=0);var a;if(typeof t=="number")for(a=n;a<r;++a)this[a]=t;else{var i=T.isBuffer(t)?t:new T(t),l=i.length;for(a=0;a<r-n;++a)this[a+n]=i[a%l]}return this};T.concat=function(t,n){if(!Wo(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return G(null,0);var r;if(n===void 0)for(n=0,r=0;r<t.length;++r)n+=t[r].length;var o=En(null,n),a=0;for(r=0;r<t.length;++r){var i=t[r];if(!T.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(o,a),a+=i.length}return o};T.byteLength=Tn;T.prototype._isBuffer=!0;T.isBuffer=function(t){return!!(t!=null&&t._isBuffer)};q.alloc=function(e){var t=new T(e);return t.fill(0),t};q.from=function(e){return new T(e)};var P={},tt,jo=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];P.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};P.getSymbolTotalCodewords=function(t){return jo[t]};P.getBCHDigit=function(e){for(var t=0;e!==0;)t++,e>>>=1;return t};P.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');tt=t};P.isKanjiModeEnabled=function(){return typeof tt<"u"};P.toSJIS=function(t){return tt(t)};var ke={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(n){if(typeof n!="string")throw new Error("Param is not a string");var r=n.toLowerCase();switch(r){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+n)}}e.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},e.from=function(r,o){if(e.isValid(r))return r;try{return t(r)}catch{return o}}})(ke);function Sn(){this.buffer=[],this.length=0}Sn.prototype={get:function(e){var t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(var n=0;n<t;n++)this.putBit((e>>>t-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var Go=Sn,Et=q;function he(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=Et.alloc(e*e),this.reservedBit=Et.alloc(e*e)}he.prototype.set=function(e,t,n,r){var o=e*this.size+t;this.data[o]=n,r&&(this.reservedBit[o]=!0)};he.prototype.get=function(e,t){return this.data[e*this.size+t]};he.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n};he.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var Xo=he,kn={};(function(e){var t=P.getSymbolSize;e.getRowColCoords=function(r){if(r===1)return[];for(var o=Math.floor(r/7)+2,a=t(r),i=a===145?26:Math.ceil((a-13)/(2*o-2))*2,l=[a-7],c=1;c<o-1;c++)l[c]=l[c-1]-i;return l.push(6),l.reverse()},e.getPositions=function(r){for(var o=[],a=e.getRowColCoords(r),i=a.length,l=0;l<i;l++)for(var c=0;c<i;c++)l===0&&c===0||l===0&&c===i-1||l===i-1&&c===0||o.push([a[l],a[c]]);return o}})(kn);var An={},Zo=P.getSymbolSize,xt=7;An.getPositions=function(t){var n=Zo(t);return[[0,0],[n-xt,0],[0,n-xt]]};var Nn={};(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(o){return o!=null&&o!==""&&!isNaN(o)&&o>=0&&o<=7},e.from=function(o){return e.isValid(o)?parseInt(o,10):void 0},e.getPenaltyN1=function(o){for(var a=o.size,i=0,l=0,c=0,u=null,s=null,d=0;d<a;d++){l=c=0,u=s=null;for(var y=0;y<a;y++){var _=o.get(d,y);_===u?l++:(l>=5&&(i+=t.N1+(l-5)),u=_,l=1),_=o.get(y,d),_===s?c++:(c>=5&&(i+=t.N1+(c-5)),s=_,c=1)}l>=5&&(i+=t.N1+(l-5)),c>=5&&(i+=t.N1+(c-5))}return i},e.getPenaltyN2=function(o){for(var a=o.size,i=0,l=0;l<a-1;l++)for(var c=0;c<a-1;c++){var u=o.get(l,c)+o.get(l,c+1)+o.get(l+1,c)+o.get(l+1,c+1);(u===4||u===0)&&i++}return i*t.N2},e.getPenaltyN3=function(o){for(var a=o.size,i=0,l=0,c=0,u=0;u<a;u++){l=c=0;for(var s=0;s<a;s++)l=l<<1&2047|o.get(u,s),s>=10&&(l===1488||l===93)&&i++,c=c<<1&2047|o.get(s,u),s>=10&&(c===1488||c===93)&&i++}return i*t.N3},e.getPenaltyN4=function(o){for(var a=0,i=o.data.length,l=0;l<i;l++)a+=o.data[l];var c=Math.abs(Math.ceil(a*100/i/5)-10);return c*t.N4};function n(r,o,a){switch(r){case e.Patterns.PATTERN000:return(o+a)%2===0;case e.Patterns.PATTERN001:return o%2===0;case e.Patterns.PATTERN010:return a%3===0;case e.Patterns.PATTERN011:return(o+a)%3===0;case e.Patterns.PATTERN100:return(Math.floor(o/2)+Math.floor(a/3))%2===0;case e.Patterns.PATTERN101:return o*a%2+o*a%3===0;case e.Patterns.PATTERN110:return(o*a%2+o*a%3)%2===0;case e.Patterns.PATTERN111:return(o*a%3+(o+a)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}e.applyMask=function(o,a){for(var i=a.size,l=0;l<i;l++)for(var c=0;c<i;c++)a.isReserved(c,l)||a.xor(c,l,n(o,c,l))},e.getBestMask=function(o,a){for(var i=Object.keys(e.Patterns).length,l=0,c=1/0,u=0;u<i;u++){a(u),e.applyMask(u,o);var s=e.getPenaltyN1(o)+e.getPenaltyN2(o)+e.getPenaltyN3(o)+e.getPenaltyN4(o);e.applyMask(u,o),s<c&&(c=s,l=u)}return l}})(Nn);var Ae={},z=ke,me=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],ve=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];Ae.getBlocksCount=function(t,n){switch(n){case z.L:return me[(t-1)*4+0];case z.M:return me[(t-1)*4+1];case z.Q:return me[(t-1)*4+2];case z.H:return me[(t-1)*4+3];default:return}};Ae.getTotalCodewordsCount=function(t,n){switch(n){case z.L:return ve[(t-1)*4+0];case z.M:return ve[(t-1)*4+1];case z.Q:return ve[(t-1)*4+2];case z.H:return ve[(t-1)*4+3];default:return}};var Bn={},Ne={},Rn=q,le=Rn.alloc(512),ye=Rn.alloc(256);(function(){for(var t=1,n=0;n<255;n++)le[n]=t,ye[t]=n,t<<=1,t&256&&(t^=285);for(n=255;n<512;n++)le[n]=le[n-255]})();Ne.log=function(t){if(t<1)throw new Error("log("+t+")");return ye[t]};Ne.exp=function(t){return le[t]};Ne.mul=function(t,n){return t===0||n===0?0:le[ye[t]+ye[n]]};(function(e){var t=q,n=Ne;e.mul=function(o,a){for(var i=t.alloc(o.length+a.length-1),l=0;l<o.length;l++)for(var c=0;c<a.length;c++)i[l+c]^=n.mul(o[l],a[c]);return i},e.mod=function(o,a){for(var i=t.from(o);i.length-a.length>=0;){for(var l=i[0],c=0;c<a.length;c++)i[c]^=n.mul(a[c],l);for(var u=0;u<i.length&&i[u]===0;)u++;i=i.slice(u)}return i},e.generateECPolynomial=function(o){for(var a=t.from([1]),i=0;i<o;i++)a=e.mul(a,[1,n.exp(i)]);return a}})(Bn);var Tt=q,Ln=Bn,ea=Nr.Buffer;function nt(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}nt.prototype.initialize=function(t){this.degree=t,this.genPoly=Ln.generateECPolynomial(this.degree)};nt.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");var n=Tt.alloc(this.degree),r=ea.concat([t,n],t.length+this.degree),o=Ln.mod(r,this.genPoly),a=this.degree-o.length;if(a>0){var i=Tt.alloc(this.degree);return o.copy(i,a),i}return o};var ta=nt,Mn={},K={},rt={};rt.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var I={},Pn="[0-9]+",na="[A-Z $%*+\\-./:]+",ue="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";ue=ue.replace(/u/g,"\\u");var ra="(?:(?![A-Z0-9 $%*+\\-./:]|"+ue+`)(?:.|[\r
|
|
1
|
+
import{d as $,p as Jt,s as Nr,g as jt,aa as Br,ae as Rr}from"../main.js";import{d as Lr}from"./dijkstra-mfgL5WWt.js";import{Q as Mr}from"./index.es--jOuZ4lh.js";import{U as Pr,z as Or}from"./index.es-00radgcV.js";var Ir=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||n.forEach(function(o){e.addRange(o)}),t&&t.focus()}},Dr=Ir,mt={"text/plain":"Text","text/html":"Url",default:"Text"},Ur="Copy to clipboard: #{key}, Enter";function $r(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function Fr(e,t){var n,r,o,a,i,l,c=!1;t||(t={}),n=t.debug||!1;try{o=Dr(),a=document.createRange(),i=document.getSelection(),l=document.createElement("span"),l.textContent=e,l.ariaHidden="true",l.style.all="unset",l.style.position="fixed",l.style.top=0,l.style.clip="rect(0, 0, 0, 0)",l.style.whiteSpace="pre",l.style.webkitUserSelect="text",l.style.MozUserSelect="text",l.style.msUserSelect="text",l.style.userSelect="text",l.addEventListener("copy",function(s){if(s.stopPropagation(),t.format)if(s.preventDefault(),typeof s.clipboardData>"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var d=mt[t.format]||mt.default;window.clipboardData.setData(d,e)}else s.clipboardData.clearData(),s.clipboardData.setData(t.format,e);t.onCopy&&(s.preventDefault(),t.onCopy(s.clipboardData))}),document.body.appendChild(l),a.selectNodeContents(l),i.addRange(a);var u=document.execCommand("copy");if(!u)throw new Error("copy command was unsuccessful");c=!0}catch(s){n&&console.error("unable to copy using execCommand: ",s),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),c=!0}catch(d){n&&console.error("unable to copy using clipboardData: ",d),n&&console.error("falling back to prompt"),r=$r("message"in t?t.message:Ur),window.prompt(r,e)}}finally{i&&(typeof i.removeRange=="function"?i.removeRange(a):i.removeAllRanges()),l&&document.body.removeChild(l),o()}return c}var Wr=Fr,Ge={},A={};Object.defineProperty(A,"__esModule",{value:!0});var Gt=A.getLocalStorage=sn=A.getLocalStorageOrThrow=cn=A.getCrypto=ln=A.getCryptoOrThrow=an=A.getLocation=on=A.getLocationOrThrow=rn=A.getNavigator=nn=A.getNavigatorOrThrow=tn=A.getDocument=en=A.getDocumentOrThrow=Zt=A.getFromWindowOrThrow=Xt=A.getFromWindow=void 0;function Q(e){let t;return typeof window<"u"&&typeof window[e]<"u"&&(t=window[e]),t}var Xt=A.getFromWindow=Q;function oe(e){const t=Q(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}var Zt=A.getFromWindowOrThrow=oe;function zr(){return oe("document")}var en=A.getDocumentOrThrow=zr;function Hr(){return Q("document")}var tn=A.getDocument=Hr;function qr(){return oe("navigator")}var nn=A.getNavigatorOrThrow=qr;function Kr(){return Q("navigator")}var rn=A.getNavigator=Kr;function Vr(){return oe("location")}var on=A.getLocationOrThrow=Vr;function Yr(){return Q("location")}var an=A.getLocation=Yr;function Qr(){return oe("crypto")}var ln=A.getCryptoOrThrow=Qr;function Jr(){return Q("crypto")}var cn=A.getCrypto=Jr;function jr(){return oe("localStorage")}var sn=A.getLocalStorageOrThrow=jr;function Gr(){return Q("localStorage")}Gt=A.getLocalStorage=Gr;Object.defineProperty(Ge,"__esModule",{value:!0});var un=Ge.getWindowMetadata=void 0;const vt=A;function Xr(){let e,t;try{e=vt.getDocumentOrThrow(),t=vt.getLocationOrThrow()}catch{return null}function n(){const d=e.getElementsByTagName("link"),y=[];for(let _=0;_<d.length;_++){const h=d[_],b=h.getAttribute("rel");if(b&&b.toLowerCase().indexOf("icon")>-1){const f=h.getAttribute("href");if(f)if(f.toLowerCase().indexOf("https:")===-1&&f.toLowerCase().indexOf("http:")===-1&&f.indexOf("//")!==0){let v=t.protocol+"//"+t.host;if(f.indexOf("/")===0)v+=f;else{const m=t.pathname.split("/");m.pop();const g=m.join("/");v+=g+"/"+f}y.push(v)}else if(f.indexOf("//")===0){const v=t.protocol+f;y.push(v)}else y.push(f)}}return y}function r(...d){const y=e.getElementsByTagName("meta");for(let _=0;_<y.length;_++){const h=y[_],b=["itemprop","property","name"].map(f=>h.getAttribute(f)).filter(f=>f?d.includes(f):!1);if(b.length&&b){const f=h.getAttribute("content");if(f)return f}}return""}function o(){let d=r("name","og:site_name","og:title","twitter:title");return d||(d=e.title),d}function a(){return r("description","og:description","twitter:description","keywords")}const i=o(),l=a(),c=t.origin,u=n();return{description:l,url:c,icons:u,name:i}}un=Ge.getWindowMetadata=Xr;var Zr=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),o=0,t=0;t<n;t++)for(var a=arguments[t],i=0,l=a.length;i<l;i++,o++)r[o]=a[i];return r},eo=function(){function e(t,n,r){this.name=t,this.version=n,this.os=r,this.type="browser"}return e}(),to=function(){function e(t){this.version=t,this.type="node",this.name="node",this.os=$.process.platform}return e}(),no=function(){function e(t,n,r,o){this.name=t,this.version=n,this.os=r,this.bot=o,this.type="bot-device"}return e}(),ro=function(){function e(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return e}(),oo=function(){function e(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return e}(),ao=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,io=/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,wt=3,lo=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",ao]],yt=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function co(e){return e?bt(e):typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new oo:typeof navigator<"u"?bt(navigator.userAgent):fo()}function so(e){return e!==""&&lo.reduce(function(t,n){var r=n[0],o=n[1];if(t)return t;var a=o.exec(e);return!!a&&[r,a]},!1)}function bt(e){var t=so(e);if(!t)return null;var n=t[0],r=t[1];if(n==="searchbot")return new ro;var o=r[1]&&r[1].split(/[._]/).slice(0,3);o?o.length<wt&&(o=Zr(o,_o(wt-o.length))):o=[];var a=o.join("."),i=uo(e),l=io.exec(e);return l&&l[1]?new no(n,a,i,l[1]):new eo(n,a,i)}function uo(e){for(var t=0,n=yt.length;t<n;t++){var r=yt[t],o=r[0],a=r[1],i=a.exec(e);if(i)return o}return null}function fo(){var e=typeof $.process<"u"&&$.process.version;return e?new to($.process.version.slice(1)):null}function _o(e){for(var t=[],n=0;n<e;n++)t.push("0");return t}function Xe(e){return co(e)}function Te(){const e=Xe();return e&&e.os?e.os:void 0}function fn(){const e=Te();return e?e.toLowerCase().includes("android"):!1}function dn(){const e=Te();return e?e.toLowerCase().includes("ios")||e.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1:!1}function ho(){return Te()?fn()||dn():!1}function _n(){const e=Xe();return e&&e.name?e.name.toLowerCase()==="node":!1}function go(){return!_n()&&!!hn()}const po=Xt,mo=Zt,vo=en,wo=tn,yo=nn,hn=rn,bo=on,Co=an,Eo=ln,xo=cn,To=sn,Se=Gt;function So(){return un()}function ko(e){if(typeof e!="string")throw new Error(`Cannot safe json parse value of type ${typeof e}`);try{return JSON.parse(e)}catch{return e}}function Ao(e){return typeof e=="string"?e:JSON.stringify(e)}const gn=ko,pn=Ao;function mn(e,t){const n=pn(t),r=Se();r&&r.setItem(e,n)}function No(e){let t=null,n=null;const r=Se();return r&&(n=r.getItem(e)),t=n&&gn(n),t}function Bo(e){const t=Se();t&&t.removeItem(e)}const vn="WALLETCONNECT_DEEPLINK_CHOICE";function Ro(e,t){const n=encodeURIComponent(e);return t.universalLink?`${t.universalLink}/wc?uri=${n}`:t.deepLink?`${t.deepLink}${t.deepLink.endsWith(":")?"//":"/"}wc?uri=${n}`:""}function Lo(e){const t=e.href.split("?")[0];mn(vn,Object.assign(Object.assign({},e),{href:t}))}function wn(e,t){return e.filter(n=>n.name.toLowerCase().includes(t.toLowerCase()))[0]}function Mo(e,t){let n=e;return t&&(n=t.map(r=>wn(e,r)).filter(Boolean)),n}const yn="https://registry.walletconnect.com";function Po(){return yn+"/api/v2/wallets"}function Oo(){return yn+"/api/v2/dapps"}function bn(e,t="mobile"){var n;return{name:e.name||"",shortName:e.metadata.shortName||"",color:e.metadata.colors.primary||"",logo:(n=e.image_url.sm)!==null&&n!==void 0?n:"",universalLink:e[t].universal||"",deepLink:e[t].native||""}}function Io(e,t="mobile"){return Object.values(e).filter(n=>!!n[t].universal||!!n[t].native).map(n=>bn(n,t))}const Do=Object.freeze(Object.defineProperty({__proto__:null,detectEnv:Xe,detectOS:Te,formatIOSMobile:Ro,formatMobileRegistry:Io,formatMobileRegistryEntry:bn,getClientMeta:So,getCrypto:xo,getCryptoOrThrow:Eo,getDappRegistryUrl:Oo,getDocument:wo,getDocumentOrThrow:vo,getFromWindow:po,getFromWindowOrThrow:mo,getLocal:No,getLocalStorage:Se,getLocalStorageOrThrow:To,getLocation:Co,getLocationOrThrow:bo,getMobileLinkRegistry:Mo,getMobileRegistryEntry:wn,getNavigator:hn,getNavigatorOrThrow:yo,getWalletRegistryUrl:Po,isAndroid:fn,isBrowser:go,isIOS:dn,isMobile:ho,isNode:_n,mobileLinkChoiceKey:vn,removeLocal:Bo,safeJsonParse:gn,safeJsonStringify:pn,saveMobileLinkInfo:Lo,setLocal:mn},Symbol.toStringTag,{value:"Module"})),Uo=Jt(Do);var _e={},$o=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},Cn={},q={},Fo={}.toString,Ze=Array.isArray||function(e){return Fo.call(e)=="[object Array]"},Wo=Ze;function zo(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},e.foo()===42}catch{return!1}}T.TYPED_ARRAY_SUPPORT=zo();var Ct=T.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function T(e,t,n){return!T.TYPED_ARRAY_SUPPORT&&!(this instanceof T)?new T(e,t,n):typeof e=="number"?En(this,e):Jo(this,e,t,n)}T.TYPED_ARRAY_SUPPORT&&(T.prototype.__proto__=Uint8Array.prototype,T.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&T[Symbol.species]===T&&Object.defineProperty(T,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}));function et(e){if(e>=Ct)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ct.toString(16)+" bytes");return e|0}function Ho(e){return e!==e}function G(e,t){var n;return T.TYPED_ARRAY_SUPPORT?(n=new Uint8Array(t),n.__proto__=T.prototype):(n=e,n===null&&(n=new T(t)),n.length=t),n}function En(e,t){var n=G(e,t<0?0:et(t)|0);if(!T.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)n[r]=0;return n}function qo(e,t){var n=Tn(t)|0,r=G(e,n),o=r.write(t);return o!==n&&(r=r.slice(0,o)),r}function We(e,t){for(var n=t.length<0?0:et(t.length)|0,r=G(e,n),o=0;o<n;o+=1)r[o]=t[o]&255;return r}function Ko(e,t,n,r){if(n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");var o;return n===void 0&&r===void 0?o=new Uint8Array(t):r===void 0?o=new Uint8Array(t,n):o=new Uint8Array(t,n,r),T.TYPED_ARRAY_SUPPORT?o.__proto__=T.prototype:o=We(e,o),o}function Vo(e,t){if(T.isBuffer(t)){var n=et(t.length)|0,r=G(e,n);return r.length===0||t.copy(r,0,0,n),r}if(t){if(typeof ArrayBuffer<"u"&&t.buffer instanceof ArrayBuffer||"length"in t)return typeof t.length!="number"||Ho(t.length)?G(e,0):We(e,t);if(t.type==="Buffer"&&Array.isArray(t.data))return We(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function xn(e,t){t=t||1/0;for(var n,r=e.length,o=null,a=[],i=0;i<r;++i){if(n=e.charCodeAt(i),n>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}else if(i+1===r){(t-=3)>-1&&a.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),o=n;continue}n=(o-55296<<10|n-56320)+65536}else o&&(t-=3)>-1&&a.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,n&63|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw new Error("Invalid code point")}return a}function Tn(e){if(T.isBuffer(e))return e.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;typeof e!="string"&&(e=""+e);var t=e.length;return t===0?0:xn(e).length}function Yo(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function Qo(e,t,n,r){return Yo(xn(t,e.length-n),e,n,r)}function Jo(e,t,n,r){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer?Ko(e,t,n,r):typeof t=="string"?qo(e,t):Vo(e,t)}T.prototype.write=function(t,n,r){n===void 0?(r=this.length,n=0):r===void 0&&typeof n=="string"?(r=this.length,n=0):isFinite(n)&&(n=n|0,isFinite(r)?r=r|0:r=void 0);var o=this.length-n;if((r===void 0||r>o)&&(r=o),t.length>0&&(r<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");return Qo(this,t,n,r)};T.prototype.slice=function(t,n){var r=this.length;t=~~t,n=n===void 0?r:~~n,t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),n<0?(n+=r,n<0&&(n=0)):n>r&&(n=r),n<t&&(n=t);var o;if(T.TYPED_ARRAY_SUPPORT)o=this.subarray(t,n),o.__proto__=T.prototype;else{var a=n-t;o=new T(a,void 0);for(var i=0;i<a;++i)o[i]=this[i+t]}return o};T.prototype.copy=function(t,n,r,o){if(r||(r=0),!o&&o!==0&&(o=this.length),n>=t.length&&(n=t.length),n||(n=0),o>0&&o<r&&(o=r),o===r||t.length===0||this.length===0)return 0;if(n<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),t.length-n<o-r&&(o=t.length-n+r);var a=o-r,i;if(this===t&&r<n&&n<o)for(i=a-1;i>=0;--i)t[i+n]=this[i+r];else if(a<1e3||!T.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)t[i+n]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+a),n);return a};T.prototype.fill=function(t,n,r){if(typeof t=="string"){if(typeof n=="string"?(n=0,r=this.length):typeof r=="string"&&(r=this.length),t.length===1){var o=t.charCodeAt(0);o<256&&(t=o)}}else typeof t=="number"&&(t=t&255);if(n<0||this.length<n||this.length<r)throw new RangeError("Out of range index");if(r<=n)return this;n=n>>>0,r=r===void 0?this.length:r>>>0,t||(t=0);var a;if(typeof t=="number")for(a=n;a<r;++a)this[a]=t;else{var i=T.isBuffer(t)?t:new T(t),l=i.length;for(a=0;a<r-n;++a)this[a+n]=i[a%l]}return this};T.concat=function(t,n){if(!Wo(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return G(null,0);var r;if(n===void 0)for(n=0,r=0;r<t.length;++r)n+=t[r].length;var o=En(null,n),a=0;for(r=0;r<t.length;++r){var i=t[r];if(!T.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(o,a),a+=i.length}return o};T.byteLength=Tn;T.prototype._isBuffer=!0;T.isBuffer=function(t){return!!(t!=null&&t._isBuffer)};q.alloc=function(e){var t=new T(e);return t.fill(0),t};q.from=function(e){return new T(e)};var P={},tt,jo=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];P.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};P.getSymbolTotalCodewords=function(t){return jo[t]};P.getBCHDigit=function(e){for(var t=0;e!==0;)t++,e>>>=1;return t};P.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');tt=t};P.isKanjiModeEnabled=function(){return typeof tt<"u"};P.toSJIS=function(t){return tt(t)};var ke={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(n){if(typeof n!="string")throw new Error("Param is not a string");var r=n.toLowerCase();switch(r){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+n)}}e.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},e.from=function(r,o){if(e.isValid(r))return r;try{return t(r)}catch{return o}}})(ke);function Sn(){this.buffer=[],this.length=0}Sn.prototype={get:function(e){var t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(var n=0;n<t;n++)this.putBit((e>>>t-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var Go=Sn,Et=q;function he(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=Et.alloc(e*e),this.reservedBit=Et.alloc(e*e)}he.prototype.set=function(e,t,n,r){var o=e*this.size+t;this.data[o]=n,r&&(this.reservedBit[o]=!0)};he.prototype.get=function(e,t){return this.data[e*this.size+t]};he.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n};he.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var Xo=he,kn={};(function(e){var t=P.getSymbolSize;e.getRowColCoords=function(r){if(r===1)return[];for(var o=Math.floor(r/7)+2,a=t(r),i=a===145?26:Math.ceil((a-13)/(2*o-2))*2,l=[a-7],c=1;c<o-1;c++)l[c]=l[c-1]-i;return l.push(6),l.reverse()},e.getPositions=function(r){for(var o=[],a=e.getRowColCoords(r),i=a.length,l=0;l<i;l++)for(var c=0;c<i;c++)l===0&&c===0||l===0&&c===i-1||l===i-1&&c===0||o.push([a[l],a[c]]);return o}})(kn);var An={},Zo=P.getSymbolSize,xt=7;An.getPositions=function(t){var n=Zo(t);return[[0,0],[n-xt,0],[0,n-xt]]};var Nn={};(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(o){return o!=null&&o!==""&&!isNaN(o)&&o>=0&&o<=7},e.from=function(o){return e.isValid(o)?parseInt(o,10):void 0},e.getPenaltyN1=function(o){for(var a=o.size,i=0,l=0,c=0,u=null,s=null,d=0;d<a;d++){l=c=0,u=s=null;for(var y=0;y<a;y++){var _=o.get(d,y);_===u?l++:(l>=5&&(i+=t.N1+(l-5)),u=_,l=1),_=o.get(y,d),_===s?c++:(c>=5&&(i+=t.N1+(c-5)),s=_,c=1)}l>=5&&(i+=t.N1+(l-5)),c>=5&&(i+=t.N1+(c-5))}return i},e.getPenaltyN2=function(o){for(var a=o.size,i=0,l=0;l<a-1;l++)for(var c=0;c<a-1;c++){var u=o.get(l,c)+o.get(l,c+1)+o.get(l+1,c)+o.get(l+1,c+1);(u===4||u===0)&&i++}return i*t.N2},e.getPenaltyN3=function(o){for(var a=o.size,i=0,l=0,c=0,u=0;u<a;u++){l=c=0;for(var s=0;s<a;s++)l=l<<1&2047|o.get(u,s),s>=10&&(l===1488||l===93)&&i++,c=c<<1&2047|o.get(s,u),s>=10&&(c===1488||c===93)&&i++}return i*t.N3},e.getPenaltyN4=function(o){for(var a=0,i=o.data.length,l=0;l<i;l++)a+=o.data[l];var c=Math.abs(Math.ceil(a*100/i/5)-10);return c*t.N4};function n(r,o,a){switch(r){case e.Patterns.PATTERN000:return(o+a)%2===0;case e.Patterns.PATTERN001:return o%2===0;case e.Patterns.PATTERN010:return a%3===0;case e.Patterns.PATTERN011:return(o+a)%3===0;case e.Patterns.PATTERN100:return(Math.floor(o/2)+Math.floor(a/3))%2===0;case e.Patterns.PATTERN101:return o*a%2+o*a%3===0;case e.Patterns.PATTERN110:return(o*a%2+o*a%3)%2===0;case e.Patterns.PATTERN111:return(o*a%3+(o+a)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}e.applyMask=function(o,a){for(var i=a.size,l=0;l<i;l++)for(var c=0;c<i;c++)a.isReserved(c,l)||a.xor(c,l,n(o,c,l))},e.getBestMask=function(o,a){for(var i=Object.keys(e.Patterns).length,l=0,c=1/0,u=0;u<i;u++){a(u),e.applyMask(u,o);var s=e.getPenaltyN1(o)+e.getPenaltyN2(o)+e.getPenaltyN3(o)+e.getPenaltyN4(o);e.applyMask(u,o),s<c&&(c=s,l=u)}return l}})(Nn);var Ae={},z=ke,me=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],ve=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];Ae.getBlocksCount=function(t,n){switch(n){case z.L:return me[(t-1)*4+0];case z.M:return me[(t-1)*4+1];case z.Q:return me[(t-1)*4+2];case z.H:return me[(t-1)*4+3];default:return}};Ae.getTotalCodewordsCount=function(t,n){switch(n){case z.L:return ve[(t-1)*4+0];case z.M:return ve[(t-1)*4+1];case z.Q:return ve[(t-1)*4+2];case z.H:return ve[(t-1)*4+3];default:return}};var Bn={},Ne={},Rn=q,le=Rn.alloc(512),ye=Rn.alloc(256);(function(){for(var t=1,n=0;n<255;n++)le[n]=t,ye[t]=n,t<<=1,t&256&&(t^=285);for(n=255;n<512;n++)le[n]=le[n-255]})();Ne.log=function(t){if(t<1)throw new Error("log("+t+")");return ye[t]};Ne.exp=function(t){return le[t]};Ne.mul=function(t,n){return t===0||n===0?0:le[ye[t]+ye[n]]};(function(e){var t=q,n=Ne;e.mul=function(o,a){for(var i=t.alloc(o.length+a.length-1),l=0;l<o.length;l++)for(var c=0;c<a.length;c++)i[l+c]^=n.mul(o[l],a[c]);return i},e.mod=function(o,a){for(var i=t.from(o);i.length-a.length>=0;){for(var l=i[0],c=0;c<a.length;c++)i[c]^=n.mul(a[c],l);for(var u=0;u<i.length&&i[u]===0;)u++;i=i.slice(u)}return i},e.generateECPolynomial=function(o){for(var a=t.from([1]),i=0;i<o;i++)a=e.mul(a,[1,n.exp(i)]);return a}})(Bn);var Tt=q,Ln=Bn,ea=Nr.Buffer;function nt(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}nt.prototype.initialize=function(t){this.degree=t,this.genPoly=Ln.generateECPolynomial(this.degree)};nt.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");var n=Tt.alloc(this.degree),r=ea.concat([t,n],t.length+this.degree),o=Ln.mod(r,this.genPoly),a=this.degree-o.length;if(a>0){var i=Tt.alloc(this.degree);return o.copy(i,a),i}return o};var ta=nt,Mn={},K={},rt={};rt.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var I={},Pn="[0-9]+",na="[A-Z $%*+\\-./:]+",ue="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";ue=ue.replace(/u/g,"\\u");var ra="(?:(?![A-Z0-9 $%*+\\-./:]|"+ue+`)(?:.|[\r
|
|
2
2
|
]))+`;I.KANJI=new RegExp(ue,"g");I.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");I.BYTE=new RegExp(ra,"g");I.NUMERIC=new RegExp(Pn,"g");I.ALPHANUMERIC=new RegExp(na,"g");var oa=new RegExp("^"+ue+"$"),aa=new RegExp("^"+Pn+"$"),ia=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");I.testKanji=function(t){return oa.test(t)};I.testNumeric=function(t){return aa.test(t)};I.testAlphanumeric=function(t){return ia.test(t)};(function(e){var t=rt,n=I;e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(a,i){if(!a.ccBits)throw new Error("Invalid mode: "+a);if(!t.isValid(i))throw new Error("Invalid version: "+i);return i>=1&&i<10?a.ccBits[0]:i<27?a.ccBits[1]:a.ccBits[2]},e.getBestModeForData=function(a){return n.testNumeric(a)?e.NUMERIC:n.testAlphanumeric(a)?e.ALPHANUMERIC:n.testKanji(a)?e.KANJI:e.BYTE},e.toString=function(a){if(a&&a.id)return a.id;throw new Error("Invalid mode")},e.isValid=function(a){return a&&a.bit&&a.ccBits};function r(o){if(typeof o!="string")throw new Error("Param is not a string");var a=o.toLowerCase();switch(a){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+o)}}e.from=function(a,i){if(e.isValid(a))return a;try{return r(a)}catch{return i}}})(K);(function(e){var t=P,n=Ae,r=ke,o=K,a=rt,i=Ze,l=7973,c=t.getBCHDigit(l);function u(_,h,b){for(var f=1;f<=40;f++)if(h<=e.getCapacity(f,b,_))return f}function s(_,h){return o.getCharCountIndicator(_,h)+4}function d(_,h){var b=0;return _.forEach(function(f){var v=s(f.mode,h);b+=v+f.getBitsLength()}),b}function y(_,h){for(var b=1;b<=40;b++){var f=d(_,b);if(f<=e.getCapacity(b,h,o.MIXED))return b}}e.from=function(h,b){return a.isValid(h)?parseInt(h,10):b},e.getCapacity=function(h,b,f){if(!a.isValid(h))throw new Error("Invalid QR Code version");typeof f>"u"&&(f=o.BYTE);var v=t.getSymbolTotalCodewords(h),m=n.getTotalCodewordsCount(h,b),g=(v-m)*8;if(f===o.MIXED)return g;var p=g-s(f,h);switch(f){case o.NUMERIC:return Math.floor(p/10*3);case o.ALPHANUMERIC:return Math.floor(p/11*2);case o.KANJI:return Math.floor(p/13);case o.BYTE:default:return Math.floor(p/8)}},e.getBestVersionForData=function(h,b){var f,v=r.from(b,r.M);if(i(h)){if(h.length>1)return y(h,v);if(h.length===0)return 1;f=h[0]}else f=h;return u(f.mode,f.getLength(),v)},e.getEncodedBits=function(h){if(!a.isValid(h)||h<7)throw new Error("Invalid QR Code version");for(var b=h<<12;t.getBCHDigit(b)-c>=0;)b^=l<<t.getBCHDigit(b)-c;return h<<12|b}})(Mn);var On={},ze=P,In=1335,la=21522,St=ze.getBCHDigit(In);On.getEncodedBits=function(t,n){for(var r=t.bit<<3|n,o=r<<10;ze.getBCHDigit(o)-St>=0;)o^=In<<ze.getBCHDigit(o)-St;return(r<<10|o)^la};var Dn={},ca=K;function X(e){this.mode=ca.NUMERIC,this.data=e.toString()}X.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)};X.prototype.getLength=function(){return this.data.length};X.prototype.getBitsLength=function(){return X.getBitsLength(this.data.length)};X.prototype.write=function(t){var n,r,o;for(n=0;n+3<=this.data.length;n+=3)r=this.data.substr(n,3),o=parseInt(r,10),t.put(o,10);var a=this.data.length-n;a>0&&(r=this.data.substr(n),o=parseInt(r,10),t.put(o,a*3+1))};var sa=X,ua=K,Me=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Z(e){this.mode=ua.ALPHANUMERIC,this.data=e}Z.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};Z.prototype.getLength=function(){return this.data.length};Z.prototype.getBitsLength=function(){return Z.getBitsLength(this.data.length)};Z.prototype.write=function(t){var n;for(n=0;n+2<=this.data.length;n+=2){var r=Me.indexOf(this.data[n])*45;r+=Me.indexOf(this.data[n+1]),t.put(r,11)}this.data.length%2&&t.put(Me.indexOf(this.data[n]),6)};var fa=Z,da=q,_a=K;function ee(e){this.mode=_a.BYTE,this.data=da.from(e)}ee.getBitsLength=function(t){return t*8};ee.prototype.getLength=function(){return this.data.length};ee.prototype.getBitsLength=function(){return ee.getBitsLength(this.data.length)};ee.prototype.write=function(e){for(var t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)};var ha=ee,ga=K,pa=P;function te(e){this.mode=ga.KANJI,this.data=e}te.getBitsLength=function(t){return t*13};te.prototype.getLength=function(){return this.data.length};te.prototype.getBitsLength=function(){return te.getBitsLength(this.data.length)};te.prototype.write=function(e){var t;for(t=0;t<this.data.length;t++){var n=pa.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+`
|
|
3
3
|
Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}};var ma=te;(function(e){var t=K,n=sa,r=fa,o=ha,a=ma,i=I,l=P,c=Lr;function u(v){return unescape(encodeURIComponent(v)).length}function s(v,m,g){for(var p=[],E;(E=v.exec(g))!==null;)p.push({data:E[0],index:E.index,mode:m,length:E[0].length});return p}function d(v){var m=s(i.NUMERIC,t.NUMERIC,v),g=s(i.ALPHANUMERIC,t.ALPHANUMERIC,v),p,E;l.isKanjiModeEnabled()?(p=s(i.BYTE,t.BYTE,v),E=s(i.KANJI,t.KANJI,v)):(p=s(i.BYTE_KANJI,t.BYTE,v),E=[]);var S=m.concat(g,p,E);return S.sort(function(x,k){return x.index-k.index}).map(function(x){return{data:x.data,mode:x.mode,length:x.length}})}function y(v,m){switch(m){case t.NUMERIC:return n.getBitsLength(v);case t.ALPHANUMERIC:return r.getBitsLength(v);case t.KANJI:return a.getBitsLength(v);case t.BYTE:return o.getBitsLength(v)}}function _(v){return v.reduce(function(m,g){var p=m.length-1>=0?m[m.length-1]:null;return p&&p.mode===g.mode?(m[m.length-1].data+=g.data,m):(m.push(g),m)},[])}function h(v){for(var m=[],g=0;g<v.length;g++){var p=v[g];switch(p.mode){case t.NUMERIC:m.push([p,{data:p.data,mode:t.ALPHANUMERIC,length:p.length},{data:p.data,mode:t.BYTE,length:p.length}]);break;case t.ALPHANUMERIC:m.push([p,{data:p.data,mode:t.BYTE,length:p.length}]);break;case t.KANJI:m.push([p,{data:p.data,mode:t.BYTE,length:u(p.data)}]);break;case t.BYTE:m.push([{data:p.data,mode:t.BYTE,length:u(p.data)}])}}return m}function b(v,m){for(var g={},p={start:{}},E=["start"],S=0;S<v.length;S++){for(var x=v[S],k=[],B=0;B<x.length;B++){var N=x[B],V=""+S+B;k.push(V),g[V]={node:N,lastCount:0},p[V]={};for(var D=0;D<E.length;D++){var M=E[D];g[M]&&g[M].node.mode===N.mode?(p[M][V]=y(g[M].lastCount+N.length,N.mode)-y(g[M].lastCount,N.mode),g[M].lastCount+=N.length):(g[M]&&(g[M].lastCount=N.length),p[M][V]=y(N.length,N.mode)+4+t.getCharCountIndicator(N.mode,m))}}E=k}for(D=0;D<E.length;D++)p[E[D]].end=0;return{map:p,table:g}}function f(v,m){var g,p=t.getBestModeForData(v);if(g=t.from(m,p),g!==t.BYTE&&g.bit<p.bit)throw new Error('"'+v+'" cannot be encoded with mode '+t.toString(g)+`.
|
|
4
4
|
Suggested mode is: `+t.toString(p));switch(g===t.KANJI&&!l.isKanjiModeEnabled()&&(g=t.BYTE),g){case t.NUMERIC:return new n(v);case t.ALPHANUMERIC:return new r(v);case t.KANJI:return new a(v);case t.BYTE:return new o(v)}}e.fromArray=function(m){return m.reduce(function(g,p){return typeof p=="string"?g.push(f(p,null)):p.data&&g.push(f(p.data,p.mode)),g},[])},e.fromString=function(m,g){for(var p=d(m,l.isKanjiModeEnabled()),E=h(p),S=b(E,g),x=c.find_path(S.map,"start","end"),k=[],B=1;B<x.length-1;B++)k.push(S.table[x[B]].node);return e.fromArray(_(k))},e.rawSplit=function(m){return e.fromArray(d(m,l.isKanjiModeEnabled()))}})(Dn);var kt=q,Be=P,Pe=ke,va=Go,wa=Xo,ya=kn,ba=An,He=Nn,qe=Ae,Ca=ta,be=Mn,Ea=On,xa=K,Oe=Dn,Ta=Ze;function Sa(e,t){for(var n=e.size,r=ba.getPositions(t),o=0;o<r.length;o++)for(var a=r[o][0],i=r[o][1],l=-1;l<=7;l++)if(!(a+l<=-1||n<=a+l))for(var c=-1;c<=7;c++)i+c<=-1||n<=i+c||(l>=0&&l<=6&&(c===0||c===6)||c>=0&&c<=6&&(l===0||l===6)||l>=2&&l<=4&&c>=2&&c<=4?e.set(a+l,i+c,!0,!0):e.set(a+l,i+c,!1,!0))}function ka(e){for(var t=e.size,n=8;n<t-8;n++){var r=n%2===0;e.set(n,6,r,!0),e.set(6,n,r,!0)}}function Aa(e,t){for(var n=ya.getPositions(t),r=0;r<n.length;r++)for(var o=n[r][0],a=n[r][1],i=-2;i<=2;i++)for(var l=-2;l<=2;l++)i===-2||i===2||l===-2||l===2||i===0&&l===0?e.set(o+i,a+l,!0,!0):e.set(o+i,a+l,!1,!0)}function Na(e,t){for(var n=e.size,r=be.getEncodedBits(t),o,a,i,l=0;l<18;l++)o=Math.floor(l/3),a=l%3+n-8-3,i=(r>>l&1)===1,e.set(o,a,i,!0),e.set(a,o,i,!0)}function Ie(e,t,n){var r=e.size,o=Ea.getEncodedBits(t,n),a,i;for(a=0;a<15;a++)i=(o>>a&1)===1,a<6?e.set(a,8,i,!0):a<8?e.set(a+1,8,i,!0):e.set(r-15+a,8,i,!0),a<8?e.set(8,r-a-1,i,!0):a<9?e.set(8,15-a-1+1,i,!0):e.set(8,15-a-1,i,!0);e.set(r-8,8,1,!0)}function Ba(e,t){for(var n=e.size,r=-1,o=n-1,a=7,i=0,l=n-1;l>0;l-=2)for(l===6&&l--;;){for(var c=0;c<2;c++)if(!e.isReserved(o,l-c)){var u=!1;i<t.length&&(u=(t[i]>>>a&1)===1),e.set(o,l-c,u),a--,a===-1&&(i++,a=7)}if(o+=r,o<0||n<=o){o-=r,r=-r;break}}}function Ra(e,t,n){var r=new va;n.forEach(function(u){r.put(u.mode.bit,4),r.put(u.getLength(),xa.getCharCountIndicator(u.mode,e)),u.write(r)});var o=Be.getSymbolTotalCodewords(e),a=qe.getTotalCodewordsCount(e,t),i=(o-a)*8;for(r.getLengthInBits()+4<=i&&r.put(0,4);r.getLengthInBits()%8!==0;)r.putBit(0);for(var l=(i-r.getLengthInBits())/8,c=0;c<l;c++)r.put(c%2?17:236,8);return La(r,e,t)}function La(e,t,n){for(var r=Be.getSymbolTotalCodewords(t),o=qe.getTotalCodewordsCount(t,n),a=r-o,i=qe.getBlocksCount(t,n),l=r%i,c=i-l,u=Math.floor(r/i),s=Math.floor(a/i),d=s+1,y=u-s,_=new Ca(y),h=0,b=new Array(i),f=new Array(i),v=0,m=kt.from(e.buffer),g=0;g<i;g++){var p=g<c?s:d;b[g]=m.slice(h,h+p),f[g]=_.encode(b[g]),h+=p,v=Math.max(v,p)}var E=kt.alloc(r),S=0,x,k;for(x=0;x<v;x++)for(k=0;k<i;k++)x<b[k].length&&(E[S++]=b[k][x]);for(x=0;x<y;x++)for(k=0;k<i;k++)E[S++]=f[k][x];return E}function Ma(e,t,n,r){var o;if(Ta(e))o=Oe.fromArray(e);else if(typeof e=="string"){var a=t;if(!a){var i=Oe.rawSplit(e);a=be.getBestVersionForData(i,n)}o=Oe.fromString(e,a||40)}else throw new Error("Invalid data");var l=be.getBestVersionForData(o,n);if(!l)throw new Error("The amount of data is too big to be stored in a QR Code");if(!t)t=l;else if(t<l)throw new Error(`
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{_ as fe}from"../main.js";const me=Symbol(),ee=Object.getPrototypeOf,G=new WeakMap,ge=e=>e&&(G.has(e)?G.get(e):ee(e)===Object.prototype||ee(e)===Array.prototype),he=e=>ge(e)&&e[me]||null,te=(e,t=!0)=>{G.set(e,t)};var z={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const q=e=>typeof e=="object"&&e!==null,A=new WeakMap,x=new WeakSet,be=(e=Object.is,t=(n,h)=>new Proxy(n,h),s=n=>q(n)&&!x.has(n)&&(Array.isArray(n)||!(Symbol.iterator in n))&&!(n instanceof WeakMap)&&!(n instanceof WeakSet)&&!(n instanceof Error)&&!(n instanceof Number)&&!(n instanceof Date)&&!(n instanceof String)&&!(n instanceof RegExp)&&!(n instanceof ArrayBuffer),r=n=>{switch(n.status){case"fulfilled":return n.value;case"rejected":throw n.reason;default:throw n}},l=new WeakMap,c=(n,h,I=r)=>{const y=l.get(n);if((y==null?void 0:y[0])===h)return y[1];const v=Array.isArray(n)?[]:Object.create(Object.getPrototypeOf(n));return te(v,!0),l.set(n,[h,v]),Reflect.ownKeys(n).forEach(S=>{if(Object.getOwnPropertyDescriptor(v,S))return;const E=Reflect.get(n,S),M={value:E,enumerable:!0,configurable:!0};if(x.has(E))te(E,!1);else if(E instanceof Promise)delete M.value,M.get=()=>I(E);else if(A.has(E)){const[b,H]=A.get(E);M.value=c(b,H(),I)}Object.defineProperty(v,S,M)}),Object.preventExtensions(v)},m=new WeakMap,f=[1,1],W=n=>{if(!q(n))throw new Error("object required");const h=m.get(n);if(h)return h;let I=f[0];const y=new Set,v=(a,i=++f[0])=>{I!==i&&(I=i,y.forEach(o=>o(a,i)))};let S=f[1];const E=(a=++f[1])=>(S!==a&&!y.size&&(S=a,b.forEach(([i])=>{const o=i[1](a);o>I&&(I=o)})),I),M=a=>(i,o)=>{const g=[...i];g[1]=[a,...g[1]],v(g,o)},b=new Map,H=(a,i)=>{if((z?"production":void 0)!=="production"&&b.has(a))throw new Error("prop listener already exists");if(y.size){const o=i[3](M(a));b.set(a,[i,o])}else b.set(a,[i])},Z=a=>{var i;const o=b.get(a);o&&(b.delete(a),(i=o[1])==null||i.call(o))},ue=a=>(y.add(a),y.size===1&&b.forEach(([o,g],_)=>{if((z?"production":void 0)!=="production"&&g)throw new Error("remove already exists");const R=o[3](M(_));b.set(_,[o,R])}),()=>{y.delete(a),y.size===0&&b.forEach(([o,g],_)=>{g&&(g(),b.set(_,[o]))})}),J=Array.isArray(n)?[]:Object.create(Object.getPrototypeOf(n)),$=t(J,{deleteProperty(a,i){const o=Reflect.get(a,i);Z(i);const g=Reflect.deleteProperty(a,i);return g&&v(["delete",[i],o]),g},set(a,i,o,g){const _=Reflect.has(a,i),R=Reflect.get(a,i,g);if(_&&(e(R,o)||m.has(o)&&e(R,m.get(o))))return!0;Z(i),q(o)&&(o=he(o)||o);let V=o;if(o instanceof Promise)o.then(C=>{o.status="fulfilled",o.value=C,v(["resolve",[i],C])}).catch(C=>{o.status="rejected",o.reason=C,v(["reject",[i],C])});else{!A.has(o)&&s(o)&&(V=W(o));const C=!x.has(V)&&A.get(V);C&&H(i,C)}return Reflect.set(a,i,V,g),v(["set",[i],o,R]),!0}});m.set(n,$);const pe=[J,E,c,ue];return A.set($,pe),Reflect.ownKeys(n).forEach(a=>{const i=Object.getOwnPropertyDescriptor(n,a);"value"in i&&($[a]=n[a],delete i.value,delete i.writable),Object.defineProperty(J,a,i)}),$})=>[W,A,x,e,t,s,r,l,c,m,f],[ye]=be();function j(e={}){return ye(e)}function P(e,t,s){const r=A.get(e);(z?"production":void 0)!=="production"&&!r&&console.warn("Please use proxy object");let l;const c=[],m=r[3];let f=!1;const n=m(h=>{if(c.push(h),s){t(c.splice(0));return}l||(l=Promise.resolve().then(()=>{l=void 0,f&&t(c.splice(0))}))});return f=!0,()=>{f=!1,n()}}function ve(e,t){const s=A.get(e);(z?"production":void 0)!=="production"&&!s&&console.warn("Please use proxy object");const[r,l,c]=s;return c(r,l(),t)}const d=j({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),de={state:d,subscribe(e){return P(d,()=>e(d))},push(e,t){e!==d.view&&(d.view=e,t&&(d.data=t),d.history.push(e))},reset(e){d.view=e,d.history=[e]},replace(e){d.history.length>1&&(d.history[d.history.length-1]=e,d.view=e)},goBack(){if(d.history.length>1){d.history.pop();const[e]=d.history.slice(-1);d.view=e}},setData(e){d.data=e}},p={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<"u"?!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return p.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const e=navigator.userAgent.toLowerCase();return p.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl(e){return e.startsWith("http://")||e.startsWith("https://")},isArray(e){return Array.isArray(e)&&e.length>0},formatNativeUrl(e,t,s){if(p.isHttpUrl(e))return this.formatUniversalUrl(e,t,s);let r=e;r.includes("://")||(r=e.replaceAll("/","").replaceAll(":",""),r=`${r}://`),r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,s);const l=encodeURIComponent(t);return`${r}wc?uri=${l}`},formatUniversalUrl(e,t,s){if(!p.isHttpUrl(e))return this.formatNativeUrl(e,t,s);let r=e;r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,s);const l=encodeURIComponent(t);return`${r}wc?uri=${l}`},async wait(e){return new Promise(t=>{setTimeout(t,e)})},openHref(e,t){window.open(e,t,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(p.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split("?");localStorage.setItem(p.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(p.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(p.WCM_VERSION,"2.6.2")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=(e=de.state.data)==null?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},we=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),u=j({enabled:we,userSessionId:"",events:[],connectedWalletId:void 0}),Ie={state:u,subscribe(e){return P(u.events,()=>e(ve(u.events[u.events.length-1])))},initialize(){u.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<"u"&&(u.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){u.connectedWalletId=e},click(e){if(u.enabled){const t={type:"CLICK",name:e.name,userSessionId:u.userSessionId,timestamp:Date.now(),data:e};u.events.push(t)}},track(e){if(u.enabled){const t={type:"TRACK",name:e.name,userSessionId:u.userSessionId,timestamp:Date.now(),data:e};u.events.push(t)}},view(e){if(u.enabled){const t={type:"VIEW",name:e.name,userSessionId:u.userSessionId,timestamp:Date.now(),data:e};u.events.push(t)}}},L=j({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),w={state:L,subscribe(e){return P(L,()=>e(L))},setChains(e){L.chains=e},setWalletConnectUri(e){L.walletConnectUri=e},setIsCustomDesktop(e){L.isCustomDesktop=e},setIsCustomMobile(e){L.isCustomMobile=e},setIsDataLoaded(e){L.isDataLoaded=e},setIsUiLoaded(e){L.isUiLoaded=e},setIsAuth(e){L.isAuth=e}},B=j({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),N={state:B,subscribe(e){return P(B,()=>e(B))},setConfig(e){var t,s;Ie.initialize(),w.setChains(e.chains),w.setIsAuth(!!e.enableAuthMode),w.setIsCustomMobile(!!((t=e.mobileWallets)!=null&&t.length)),w.setIsCustomDesktop(!!((s=e.desktopWallets)!=null&&s.length)),p.setModalVersionInStorage(),Object.assign(B,e)}};var Le=Object.defineProperty,se=Object.getOwnPropertySymbols,Oe=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable,ne=(e,t,s)=>t in e?Le(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,We=(e,t)=>{for(var s in t||(t={}))Oe.call(t,s)&&ne(e,s,t[s]);if(se)for(var s of se(t))Ee.call(t,s)&&ne(e,s,t[s]);return e};const Q="https://explorer-api.walletconnect.com",X="wcm",Y="js-2.6.2";async function K(e,t){const s=We({sdkType:X,sdkVersion:Y},t),r=new URL(e,Q);return r.searchParams.append("projectId",N.state.projectId),Object.entries(s).forEach(([l,c])=>{c&&r.searchParams.append(l,String(c))}),(await fetch(r)).json()}const U={async getDesktopListings(e){return K("/w3m/v1/getDesktopListings",e)},async getMobileListings(e){return K("/w3m/v1/getMobileListings",e)},async getInjectedListings(e){return K("/w3m/v1/getInjectedListings",e)},async getAllListings(e){return K("/w3m/v1/getAllListings",e)},getWalletImageUrl(e){return`${Q}/w3m/v1/getWalletImage/${e}?projectId=${N.state.projectId}&sdkType=${X}&sdkVersion=${Y}`},getAssetImageUrl(e){return`${Q}/w3m/v1/getAssetImage/${e}?projectId=${N.state.projectId}&sdkType=${X}&sdkVersion=${Y}`}};var Ce=Object.defineProperty,oe=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,re=(e,t,s)=>t in e?Ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Me=(e,t)=>{for(var s in t||(t={}))Ae.call(t,s)&&re(e,s,t[s]);if(oe)for(var s of oe(t))je.call(t,s)&&re(e,s,t[s]);return e};const ie=p.isMobile(),O=j({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),Te={state:O,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=N.state;if(e==="NONE"||t==="ALL"&&!e)return O.recomendedWallets;if(p.isArray(e)){const s={recommendedIds:e.join(",")},{listings:r}=await U.getAllListings(s),l=Object.values(r);l.sort((c,m)=>{const f=e.indexOf(c.id),W=e.indexOf(m.id);return f-W}),O.recomendedWallets=l}else{const{chains:s,isAuth:r}=w.state,l=s==null?void 0:s.join(","),c=p.isArray(t),m={page:1,sdks:r?"auth_v1":void 0,entries:p.RECOMMENDED_WALLET_AMOUNT,chains:l,version:2,excludedIds:c?t.join(","):void 0},{listings:f}=ie?await U.getMobileListings(m):await U.getDesktopListings(m);O.recomendedWallets=Object.values(f)}return O.recomendedWallets},async getWallets(e){const t=Me({},e),{explorerRecommendedWalletIds:s,explorerExcludedWalletIds:r}=N.state,{recomendedWallets:l}=O;if(r==="ALL")return O.wallets;l.length?t.excludedIds=l.map(I=>I.id).join(","):p.isArray(s)&&(t.excludedIds=s.join(",")),p.isArray(r)&&(t.excludedIds=[t.excludedIds,r].filter(Boolean).join(",")),w.state.isAuth&&(t.sdks="auth_v1");const{page:c,search:m}=e,{listings:f,total:W}=ie?await U.getMobileListings(t):await U.getDesktopListings(t),n=Object.values(f),h=m?"search":"wallets";return O[h]={listings:[...O[h].listings,...n],total:W,page:c??1},{listings:n,total:W}},getWalletImageUrl(e){return U.getWalletImageUrl(e)},getAssetImageUrl(e){return U.getAssetImageUrl(e)},resetSearch(){O.search={listings:[],total:0,page:1}}},k=j({open:!1}),F={state:k,subscribe(e){return P(k,()=>e(k))},async open(e){return new Promise(t=>{const{isUiLoaded:s,isDataLoaded:r}=w.state;if(p.removeWalletConnectDeepLink(),w.setWalletConnectUri(e==null?void 0:e.uri),w.setChains(e==null?void 0:e.chains),de.reset("ConnectWallet"),s&&r)k.open=!0,t();else{const l=setInterval(()=>{const c=w.state;c.isUiLoaded&&c.isDataLoaded&&(clearInterval(l),k.open=!0,t())},200)}})},close(){k.open=!1}};var Ue=Object.defineProperty,ae=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable,le=(e,t,s)=>t in e?Ue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Se=(e,t)=>{for(var s in t||(t={}))De.call(t,s)&&le(e,s,t[s]);if(ae)for(var s of ae(t))Pe.call(t,s)&&le(e,s,t[s]);return e};function _e(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const T=j({themeMode:_e()?"dark":"light"}),ce={state:T,subscribe(e){return P(T,()=>e(T))},setThemeConfig(e){const{themeMode:t,themeVariables:s}=e;t&&(T.themeMode=t),s&&(T.themeVariables=Se({},s))}},D=j({open:!1,message:"",variant:"success"}),$e={state:D,subscribe(e){return P(D,()=>e(D))},openToast(e,t){D.open=!0,D.message=e,D.variant=t},closeToast(){D.open=!1}};class ke{constructor(t){this.openModal=F.open,this.closeModal=F.close,this.subscribeModal=F.subscribe,this.setTheme=ce.setThemeConfig,ce.setThemeConfig(t),N.setConfig(t),this.initUi()}async initUi(){if(typeof window<"u"){await fe(()=>import("./index-37oU2-By.js"),__vite__mapDeps([0,1,2,3]));const t=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",t),w.setIsUiLoaded(!0)}}}const Ve=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:ke},Symbol.toStringTag,{value:"Module"}));export{Ie as R,de as T,p as a,Ve as i,ce as n,$e as o,w as p,F as s,Te as t,N as y};
|
|
2
|
+
function __vite__mapDeps(indexes) {
|
|
3
|
+
if (!__vite__mapDeps.viteFileDeps) {
|
|
4
|
+
__vite__mapDeps.viteFileDeps = ["assets/index-37oU2-By.js","assets/dijkstra-mfgL5WWt.js","main.js","main-O88ZzK88.css"]
|
|
5
|
+
}
|
|
6
|
+
return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
|
|
7
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{q as P,b3 as Ye,b2 as Ze,d as Z,aY as it}from"../main.js";var Je={},Qe={exports:{}},je={};(function(o){o.fetch=n(P.fetch)&&n(P.ReadableStream),o.writableStream=n(P.WritableStream),o.abortController=n(P.AbortController);var r;function h(){if(r!==void 0)return r;if(P.XMLHttpRequest){r=new P.XMLHttpRequest;try{r.open("GET",P.XDomainRequest?"/":"https://example.com")}catch{r=null}}else r=null;return r}function f(g){var u=h();if(!u)return!1;try{return u.responseType=g,u.responseType===g}catch{}return!1}o.arraybuffer=o.fetch||f("arraybuffer"),o.msstream=!o.fetch&&f("ms-stream"),o.mozchunkedarraybuffer=!o.fetch&&f("moz-chunked-arraybuffer"),o.overrideMimeType=o.fetch||(h()?n(h().overrideMimeType):!1);function n(g){return typeof g=="function"}r=null})(je);var Oe={},Ke=je,ft=Ye(),et=Ze(),Ae=Oe.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},$e=Oe.IncomingMessage=function(o,r,h,f){var n=this;if(et.Readable.call(n),n._mode=h,n.headers={},n.rawHeaders=[],n.trailers={},n.rawTrailers=[],n.on("end",function(){Z.process.nextTick(function(){n.emit("close")})}),h==="fetch"){let C=function(){u.read().then(function(m){if(!n._destroyed){if(f(m.done),m.done){n.push(null);return}n.push(Z.Buffer.from(m.value)),C()}}).catch(function(m){f(!0),n._destroyed||n.emit("error",m)})};if(n._fetchResponse=r,n.url=r.url,n.statusCode=r.status,n.statusMessage=r.statusText,r.headers.forEach(function(m,A){n.headers[A.toLowerCase()]=m,n.rawHeaders.push(A,m)}),Ke.writableStream){var g=new WritableStream({write:function(m){return f(!1),new Promise(function(A,te){n._destroyed?te():n.push(Z.Buffer.from(m))?A():n._resumeFetch=A})},close:function(){f(!0),n._destroyed||n.push(null)},abort:function(m){f(!0),n._destroyed||n.emit("error",m)}});try{r.body.pipeTo(g).catch(function(m){f(!0),n._destroyed||n.emit("error",m)});return}catch{}}var u=r.body.getReader();C()}else{n._xhr=o,n._pos=0,n.url=o.responseURL,n.statusCode=o.status,n.statusMessage=o.statusText;var a=o.getAllResponseHeaders().split(/\r?\n/);if(a.forEach(function(C){var m=C.match(/^([^:]+):\s*(.*)/);if(m){var A=m[1].toLowerCase();A==="set-cookie"?(n.headers[A]===void 0&&(n.headers[A]=[]),n.headers[A].push(m[2])):n.headers[A]!==void 0?n.headers[A]+=", "+m[2]:n.headers[A]=m[2],n.rawHeaders.push(m[1],m[2])}}),n._charset="x-user-defined",!Ke.overrideMimeType){var v=n.rawHeaders["mime-type"];if(v){var T=v.match(/;\s*charset=([^;])(;|$)/);T&&(n._charset=T[1].toLowerCase())}n._charset||(n._charset="utf-8")}}};ft($e,et.Readable);$e.prototype._read=function(){var o=this,r=o._resumeFetch;r&&(o._resumeFetch=null,r())};$e.prototype._onXHRProgress=function(o){var r=this,h=r._xhr,f=null;switch(r._mode){case"text":if(f=h.responseText,f.length>r._pos){var n=f.substr(r._pos);if(r._charset==="x-user-defined"){for(var g=Z.Buffer.alloc(n.length),u=0;u<n.length;u++)g[u]=n.charCodeAt(u)&255;r.push(g)}else r.push(n,r._charset);r._pos=f.length}break;case"arraybuffer":if(h.readyState!==Ae.DONE||!h.response)break;f=h.response,r.push(Z.Buffer.from(new Uint8Array(f)));break;case"moz-chunked-arraybuffer":if(f=h.response,h.readyState!==Ae.LOADING||!f)break;r.push(Z.Buffer.from(new Uint8Array(f)));break;case"ms-stream":if(f=h.response,h.readyState!==Ae.LOADING)break;var a=new P.MSStreamReader;a.onprogress=function(){a.result.byteLength>r._pos&&(r.push(Z.Buffer.from(new Uint8Array(a.result.slice(r._pos)))),r._pos=a.result.byteLength)},a.onload=function(){o(!0),r.push(null)},a.readAsArrayBuffer(f);break}r._xhr.readyState===Ae.DONE&&r._mode!=="ms-stream"&&(o(!0),r.push(null))};var he=je,ht=Ye(),tt=Oe,ke=Ze(),ut=tt.IncomingMessage,Ve=tt.readyStates;function ct(o,r){return he.fetch&&r?"fetch":he.mozchunkedarraybuffer?"moz-chunked-arraybuffer":he.msstream?"ms-stream":he.arraybuffer&&o?"arraybuffer":"text"}var I=Qe.exports=function(o){var r=this;ke.Writable.call(r),r._opts=o,r._body=[],r._headers={},o.auth&&r.setHeader("Authorization","Basic "+Z.Buffer.from(o.auth).toString("base64")),Object.keys(o.headers).forEach(function(n){r.setHeader(n,o.headers[n])});var h,f=!0;if(o.mode==="disable-fetch"||"requestTimeout"in o&&!he.abortController)f=!1,h=!0;else if(o.mode==="prefer-streaming")h=!1;else if(o.mode==="allow-wrong-content-type")h=!he.overrideMimeType;else if(!o.mode||o.mode==="default"||o.mode==="prefer-fast")h=!0;else throw new Error("Invalid value for opts.mode");r._mode=ct(h,f),r._fetchTimer=null,r._socketTimeout=null,r._socketTimer=null,r.on("finish",function(){r._onFinish()})};ht(I,ke.Writable);I.prototype.setHeader=function(o,r){var h=this,f=o.toLowerCase();pt.indexOf(f)===-1&&(h._headers[f]={name:o,value:r})};I.prototype.getHeader=function(o){var r=this._headers[o.toLowerCase()];return r?r.value:null};I.prototype.removeHeader=function(o){var r=this;delete r._headers[o.toLowerCase()]};I.prototype._onFinish=function(){var o=this;if(!o._destroyed){var r=o._opts;"timeout"in r&&r.timeout!==0&&o.setTimeout(r.timeout);var h=o._headers,f=null;r.method!=="GET"&&r.method!=="HEAD"&&(f=new Blob(o._body,{type:(h["content-type"]||{}).value||""}));var n=[];if(Object.keys(h).forEach(function(v){var T=h[v].name,C=h[v].value;Array.isArray(C)?C.forEach(function(m){n.push([T,m])}):n.push([T,C])}),o._mode==="fetch"){var g=null;if(he.abortController){var u=new AbortController;g=u.signal,o._fetchAbortController=u,"requestTimeout"in r&&r.requestTimeout!==0&&(o._fetchTimer=P.setTimeout(function(){o.emit("requestTimeout"),o._fetchAbortController&&o._fetchAbortController.abort()},r.requestTimeout))}P.fetch(o._opts.url,{method:o._opts.method,headers:n,body:f||void 0,mode:"cors",credentials:r.withCredentials?"include":"same-origin",signal:g}).then(function(v){o._fetchResponse=v,o._resetTimers(!1),o._connect()},function(v){o._resetTimers(!0),o._destroyed||o.emit("error",v)})}else{var a=o._xhr=new P.XMLHttpRequest;try{a.open(o._opts.method,o._opts.url,!0)}catch(v){Z.process.nextTick(function(){o.emit("error",v)});return}"responseType"in a&&(a.responseType=o._mode),"withCredentials"in a&&(a.withCredentials=!!r.withCredentials),o._mode==="text"&&"overrideMimeType"in a&&a.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in r&&(a.timeout=r.requestTimeout,a.ontimeout=function(){o.emit("requestTimeout")}),n.forEach(function(v){a.setRequestHeader(v[0],v[1])}),o._response=null,a.onreadystatechange=function(){switch(a.readyState){case Ve.LOADING:case Ve.DONE:o._onXHRProgress();break}},o._mode==="moz-chunked-arraybuffer"&&(a.onprogress=function(){o._onXHRProgress()}),a.onerror=function(){o._destroyed||(o._resetTimers(!0),o.emit("error",new Error("XHR error")))};try{a.send(f)}catch(v){Z.process.nextTick(function(){o.emit("error",v)});return}}}};function lt(o){try{var r=o.status;return r!==null&&r!==0}catch{return!1}}I.prototype._onXHRProgress=function(){var o=this;o._resetTimers(!1),!(!lt(o._xhr)||o._destroyed)&&(o._response||o._connect(),o._response._onXHRProgress(o._resetTimers.bind(o)))};I.prototype._connect=function(){var o=this;o._destroyed||(o._response=new ut(o._xhr,o._fetchResponse,o._mode,o._resetTimers.bind(o)),o._response.on("error",function(r){o.emit("error",r)}),o.emit("response",o._response))};I.prototype._write=function(o,r,h){var f=this;f._body.push(o),h()};I.prototype._resetTimers=function(o){var r=this;P.clearTimeout(r._socketTimer),r._socketTimer=null,o?(P.clearTimeout(r._fetchTimer),r._fetchTimer=null):r._socketTimeout&&(r._socketTimer=P.setTimeout(function(){r.emit("timeout")},r._socketTimeout))};I.prototype.abort=I.prototype.destroy=function(o){var r=this;r._destroyed=!0,r._resetTimers(!0),r._response&&(r._response._destroyed=!0),r._xhr?r._xhr.abort():r._fetchAbortController&&r._fetchAbortController.abort(),o&&r.emit("error",o)};I.prototype.end=function(o,r,h){var f=this;typeof o=="function"&&(h=o,o=void 0),ke.Writable.prototype.end.call(f,o,r,h)};I.prototype.setTimeout=function(o,r){var h=this;r&&h.once("timeout",r),h._socketTimeout=o,h._resetTimers(!1)};I.prototype.flushHeaders=function(){};I.prototype.setNoDelay=function(){};I.prototype.setSocketKeepAlive=function(){};var pt=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"],dt=Qe.exports,mt=yt,vt=Object.prototype.hasOwnProperty;function yt(){for(var o={},r=0;r<arguments.length;r++){var h=arguments[r];for(var f in h)vt.call(h,f)&&(o[f]=h[f])}return o}var gt={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"},He={exports:{}},qe={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */qe.exports;(function(o,r){(function(h){var f=r&&!r.nodeType&&r,n=o&&!o.nodeType&&o,g=typeof P=="object"&&P;(g.global===g||g.window===g||g.self===g)&&(h=g);var u,a=2147483647,v=36,T=1,C=26,m=38,A=700,te=72,ae=128,S="-",xe=/^xn--/,Ee=/[^\x20-\x7E]/,Ue=/[\x2E\u3002\uFF0E\uFF61]/g,Le={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},pe=v-T,M=Math.floor,re=String.fromCharCode,ie;function J(i){throw new RangeError(Le[i])}function de(i,p){for(var y=i.length,b=[];y--;)b[y]=p(i[y]);return b}function be(i,p){var y=i.split("@"),b="";y.length>1&&(b=y[0]+"@",i=y[1]),i=i.replace(Ue,".");var w=i.split("."),U=de(w,p).join(".");return b+U}function Te(i){for(var p=[],y=0,b=i.length,w,U;y<b;)w=i.charCodeAt(y++),w>=55296&&w<=56319&&y<b?(U=i.charCodeAt(y++),(U&64512)==56320?p.push(((w&1023)<<10)+(U&1023)+65536):(p.push(w),y--)):p.push(w);return p}function ue(i){return de(i,function(p){var y="";return p>65535&&(p-=65536,y+=re(p>>>10&1023|55296),p=56320|p&1023),y+=re(p),y}).join("")}function oe(i){return i-48<10?i-22:i-65<26?i-65:i-97<26?i-97:v}function ce(i,p){return i+22+75*(i<26)-((p!=0)<<5)}function ne(i,p,y){var b=0;for(i=y?M(i/A):i>>1,i+=M(i/p);i>pe*C>>1;b+=v)i=M(i/pe);return M(b+(pe+1)*i/(i+m))}function we(i){var p=[],y=i.length,b,w=0,U=ae,q=te,R,N,B,G,L,H,k,W,Q;for(R=i.lastIndexOf(S),R<0&&(R=0),N=0;N<R;++N)i.charCodeAt(N)>=128&&J("not-basic"),p.push(i.charCodeAt(N));for(B=R>0?R+1:0;B<y;){for(G=w,L=1,H=v;B>=y&&J("invalid-input"),k=oe(i.charCodeAt(B++)),(k>=v||k>M((a-w)/L))&&J("overflow"),w+=k*L,W=H<=q?T:H>=q+C?C:H-q,!(k<W);H+=v)Q=v-W,L>M(a/Q)&&J("overflow"),L*=Q;b=p.length+1,q=ne(w-G,b,G==0),M(w/b)>a-U&&J("overflow"),U+=M(w/b),w%=b,p.splice(w++,0,U)}return ue(p)}function Re(i){var p,y,b,w,U,q,R,N,B,G,L,H=[],k,W,Q,me;for(i=Te(i),k=i.length,p=ae,y=0,U=te,q=0;q<k;++q)L=i[q],L<128&&H.push(re(L));for(b=w=H.length,w&&H.push(S);b<k;){for(R=a,q=0;q<k;++q)L=i[q],L>=p&&L<R&&(R=L);for(W=b+1,R-p>M((a-y)/W)&&J("overflow"),y+=(R-p)*W,p=R,q=0;q<k;++q)if(L=i[q],L<p&&++y>a&&J("overflow"),L==p){for(N=y,B=v;G=B<=U?T:B>=U+C?C:B-U,!(N<G);B+=v)me=N-G,Q=v-G,H.push(re(ce(G+me%Q,0))),N=M(me/Q);H.push(re(ce(N,0))),U=ne(y,W,b==w),y=0,++b}++y,++p}return H.join("")}function Pe(i){return be(i,function(p){return xe.test(p)?we(p.slice(4).toLowerCase()):p})}function Ie(i){return be(i,function(p){return Ee.test(p)?"xn--"+Re(p):p})}if(u={version:"1.4.1",ucs2:{decode:Te,encode:ue},decode:we,encode:Re,toASCII:Ie,toUnicode:Pe},f&&n)if(o.exports==f)n.exports=u;else for(ie in u)u.hasOwnProperty(ie)&&(f[ie]=u[ie]);else h.punycode=u})(P)})(qe,qe.exports);var _t=qe.exports;(function(o,r){Object.defineProperty(r,"__esModule",{value:!0});var h=_t,f=it;function n(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var g=n(h),u=n(f),a={isString:function(e){return typeof e=="string"},isObject:function(e){return typeof e=="object"&&e!==null},isNull:function(e){return e===null},isNullOrUndefined:function(e){return e==null}},v=g.default,T=a,C=ne,m=Re,A=Pe,te=we,ae=S;function S(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var xe=/^([a-z0-9.+-]+:)/i,Ee=/:[0-9]*$/,Ue=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Le=["<",">",'"',"`"," ","\r",`
|
|
2
|
+
`," "],pe=["{","}","|","\\","^","`"].concat(Le),M=["'"].concat(pe),re=["%","/","?",";","#"].concat(M),ie=["/","?","#"],J=255,de=/^[+a-z0-9A-Z_-]{0,63}$/,be=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Te={javascript:!0,"javascript:":!0},ue={javascript:!0,"javascript:":!0},oe={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},ce=u.default;function ne(e,s,t){if(e&&T.isObject(e)&&e instanceof S)return e;var l=new S;return l.parse(e,s,t),l}S.prototype.parse=function(e,s,t){if(!T.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var l=e.indexOf("?"),_=l!==-1&&l<e.indexOf("#")?"?":"#",D=e.split(_),j=/\\/g;D[0]=D[0].replace(j,"/"),e=D.join(_);var c=e;if(c=c.trim(),!t&&e.split("#").length===1){var K=Ue.exec(c);if(K)return this.path=c,this.href=c,this.pathname=K[1],K[2]?(this.search=K[2],s?this.query=ce.parse(this.search.substr(1)):this.query=this.search.substr(1)):s&&(this.search="",this.query={}),this}var O=xe.exec(c);if(O){O=O[0];var fe=O.toLowerCase();this.protocol=fe,c=c.substr(O.length)}if(t||O||c.match(/^\/\/[^@\/]+@[^@\/]+/)){var ve=c.substr(0,2)==="//";ve&&!(O&&ue[O])&&(c=c.substr(2),this.slashes=!0)}if(!ue[O]&&(ve||O&&!oe[O])){for(var F=-1,x=0;x<ie.length;x++){var ee=c.indexOf(ie[x]);ee!==-1&&(F===-1||ee<F)&&(F=ee)}var ye,$;F===-1?$=c.lastIndexOf("@"):$=c.lastIndexOf("@",F),$!==-1&&(ye=c.slice(0,$),c=c.slice($+1),this.auth=decodeURIComponent(ye)),F=-1;for(var x=0;x<re.length;x++){var ee=c.indexOf(re[x]);ee!==-1&&(F===-1||ee<F)&&(F=ee)}F===-1&&(F=c.length),this.host=c.slice(0,F),c=c.slice(F),this.parseHost(),this.hostname=this.hostname||"";var ge=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!ge)for(var d=this.hostname.split(/\./),x=0,E=d.length;x<E;x++){var V=d[x];if(V&&!V.match(de)){for(var z="",X=0,Se=V.length;X<Se;X++)V.charCodeAt(X)>127?z+="x":z+=V[X];if(!z.match(de)){var se=d.slice(0,x),Y=d.slice(x+1),le=V.match(be);le&&(se.push(le[1]),Y.unshift(le[2])),Y.length&&(c="/"+Y.join(".")+c),this.hostname=se.join(".");break}}}this.hostname.length>J?this.hostname="":this.hostname=this.hostname.toLowerCase(),ge||(this.hostname=v.toASCII(this.hostname));var Fe=this.port?":"+this.port:"",st=this.hostname||"";this.host=st+Fe,this.href+=this.host,ge&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),c[0]!=="/"&&(c="/"+c))}if(!Te[fe])for(var x=0,E=M.length;x<E;x++){var _e=M[x];if(c.indexOf(_e)!==-1){var Me=encodeURIComponent(_e);Me===_e&&(Me=escape(_e)),c=c.split(_e).join(Me)}}var Ne=c.indexOf("#");Ne!==-1&&(this.hash=c.substr(Ne),c=c.slice(0,Ne));var Ce=c.indexOf("?");if(Ce!==-1?(this.search=c.substr(Ce),this.query=c.substr(Ce+1),s&&(this.query=ce.parse(this.query)),c=c.slice(0,Ce)):s&&(this.search="",this.query={}),c&&(this.pathname=c),oe[fe]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var Fe=this.pathname||"",at=this.search||"";this.path=Fe+at}return this.href=this.format(),this};function we(e){return T.isString(e)&&(e=ne(e)),e instanceof S?e.format():S.prototype.format.call(e)}S.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var s=this.protocol||"",t=this.pathname||"",l=this.hash||"",_=!1,D="";this.host?_=e+this.host:this.hostname&&(_=e+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(_+=":"+this.port)),this.query&&T.isObject(this.query)&&Object.keys(this.query).length&&(D=ce.stringify(this.query));var j=this.search||D&&"?"+D||"";return s&&s.substr(-1)!==":"&&(s+=":"),this.slashes||(!s||oe[s])&&_!==!1?(_="//"+(_||""),t&&t.charAt(0)!=="/"&&(t="/"+t)):_||(_=""),l&&l.charAt(0)!=="#"&&(l="#"+l),j&&j.charAt(0)!=="?"&&(j="?"+j),t=t.replace(/[?#]/g,function(c){return encodeURIComponent(c)}),j=j.replace("#","%23"),s+_+t+j+l};function Re(e,s){return ne(e,!1,!0).resolve(s)}S.prototype.resolve=function(e){return this.resolveObject(ne(e,!1,!0)).format()};function Pe(e,s){return e?ne(e,!1,!0).resolveObject(s):s}S.prototype.resolveObject=function(e){if(T.isString(e)){var s=new S;s.parse(e,!1,!0),e=s}for(var t=new S,l=Object.keys(this),_=0;_<l.length;_++){var D=l[_];t[D]=this[D]}if(t.hash=e.hash,e.href==="")return t.href=t.format(),t;if(e.slashes&&!e.protocol){for(var j=Object.keys(e),c=0;c<j.length;c++){var K=j[c];K!=="protocol"&&(t[K]=e[K])}return oe[t.protocol]&&t.hostname&&!t.pathname&&(t.path=t.pathname="/"),t.href=t.format(),t}if(e.protocol&&e.protocol!==t.protocol){if(!oe[e.protocol]){for(var O=Object.keys(e),fe=0;fe<O.length;fe++){var ve=O[fe];t[ve]=e[ve]}return t.href=t.format(),t}if(t.protocol=e.protocol,!e.host&&!ue[e.protocol]){for(var E=(e.pathname||"").split("/");E.length&&!(e.host=E.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),E[0]!==""&&E.unshift(""),E.length<2&&E.unshift(""),t.pathname=E.join("/")}else t.pathname=e.pathname;if(t.search=e.search,t.query=e.query,t.host=e.host||"",t.auth=e.auth,t.hostname=e.hostname||e.host,t.port=e.port,t.pathname||t.search){var F=t.pathname||"",x=t.search||"";t.path=F+x}return t.slashes=t.slashes||e.slashes,t.href=t.format(),t}var ee=t.pathname&&t.pathname.charAt(0)==="/",ye=e.host||e.pathname&&e.pathname.charAt(0)==="/",$=ye||ee||t.host&&e.pathname,ge=$,d=t.pathname&&t.pathname.split("/")||[],E=e.pathname&&e.pathname.split("/")||[],V=t.protocol&&!oe[t.protocol];if(V&&(t.hostname="",t.port=null,t.host&&(d[0]===""?d[0]=t.host:d.unshift(t.host)),t.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(E[0]===""?E[0]=e.host:E.unshift(e.host)),e.host=null),$=$&&(E[0]===""||d[0]==="")),ye)t.host=e.host||e.host===""?e.host:t.host,t.hostname=e.hostname||e.hostname===""?e.hostname:t.hostname,t.search=e.search,t.query=e.query,d=E;else if(E.length)d||(d=[]),d.pop(),d=d.concat(E),t.search=e.search,t.query=e.query;else if(!T.isNullOrUndefined(e.search)){if(V){t.hostname=t.host=d.shift();var z=t.host&&t.host.indexOf("@")>0?t.host.split("@"):!1;z&&(t.auth=z.shift(),t.host=t.hostname=z.shift())}return t.search=e.search,t.query=e.query,(!T.isNull(t.pathname)||!T.isNull(t.search))&&(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.href=t.format(),t}if(!d.length)return t.pathname=null,t.search?t.path="/"+t.search:t.path=null,t.href=t.format(),t;for(var X=d.slice(-1)[0],Se=(t.host||e.host||d.length>1)&&(X==="."||X==="..")||X==="",se=0,Y=d.length;Y>=0;Y--)X=d[Y],X==="."?d.splice(Y,1):X===".."?(d.splice(Y,1),se++):se&&(d.splice(Y,1),se--);if(!$&&!ge)for(;se--;se)d.unshift("..");$&&d[0]!==""&&(!d[0]||d[0].charAt(0)!=="/")&&d.unshift(""),Se&&d.join("/").substr(-1)!=="/"&&d.push("");var le=d[0]===""||d[0]&&d[0].charAt(0)==="/";if(V){t.hostname=t.host=le?"":d.length?d.shift():"";var z=t.host&&t.host.indexOf("@")>0?t.host.split("@"):!1;z&&(t.auth=z.shift(),t.host=t.hostname=z.shift())}return $=$||t.host&&d.length,$&&!le&&d.unshift(""),d.length?t.pathname=d.join("/"):(t.pathname=null,t.path=null),(!T.isNull(t.pathname)||!T.isNull(t.search))&&(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.auth=e.auth||t.auth,t.slashes=t.slashes||e.slashes,t.href=t.format(),t},S.prototype.parseHost=function(){var e=this.host,s=Ee.exec(e);s&&(s=s[0],s!==":"&&(this.port=s.substr(1)),e=e.substr(0,e.length-s.length)),e&&(this.hostname=e)};function Ie(e,s){for(var t=0,l=e.length-1;l>=0;l--){var _=e[l];_==="."?e.splice(l,1):_===".."?(e.splice(l,1),t++):t&&(e.splice(l,1),t--)}if(s)for(;t--;t)e.unshift("..");return e}function i(){for(var e="",s=!1,t=arguments.length-1;t>=-1&&!s;t--){var l=t>=0?arguments[t]:"/";if(typeof l!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!l)continue;e=l+"/"+e,s=l.charAt(0)==="/"}return e=Ie(p(e.split("/"),function(_){return!!_}),!s).join("/"),(s?"/":"")+e||"."}function p(e,s){if(e.filter)return e.filter(s);for(var t=[],l=0;l<e.length;l++)s(e[l],l,e)&&t.push(e[l]);return t}var y=function(e){function s(){var l=this||self;return delete e.prototype.__magic__,l}if(typeof globalThis=="object")return globalThis;if(this)return s();e.defineProperty(e.prototype,"__magic__",{configurable:!0,get:s});var t=__magic__;return t}(Object),b=te,w=C,U=m,q=ae,R=y.URL,N=y.URLSearchParams,B=/%/g,G=/\\/g,L=/\n/g,H=/\r/g,k=/\t/g,W=47;function Q(e){var s=e??null;return!!(s!==null&&(s!=null&&s.href)&&(s!=null&&s.origin))}function me(e){if(e.hostname!=="")throw new TypeError('File URL host must be "localhost" or empty on browser');for(var s=e.pathname,t=0;t<s.length;t++)if(s[t]==="%"){var l=s.codePointAt(t+2)|32;if(s[t+1]==="2"&&l===102)throw new TypeError("File URL path must not include encoded / characters")}return decodeURIComponent(s)}function nt(e){return e.includes("%")&&(e=e.replace(B,"%25")),e.includes("\\")&&(e=e.replace(G,"%5C")),e.includes(`
|
|
3
|
+
`)&&(e=e.replace(L,"%0A")),e.includes("\r")&&(e=e.replace(H,"%0D")),e.includes(" ")&&(e=e.replace(k,"%09")),e}var De=function(s){if(typeof s>"u")throw new TypeError('The "domain" argument must be specified');return new R("http://"+s).hostname},Be=function(s){if(typeof s>"u")throw new TypeError('The "domain" argument must be specified');return new R("http://"+s).hostname},Ge=function(s){var t=new R("file://"),l=i(s),_=s.charCodeAt(s.length-1);return _===W&&l[l.length-1]!=="/"&&(l+="/"),t.pathname=nt(l),t},ze=function(s){if(!Q(s)&&typeof s!="string")throw new TypeError('The "path" argument must be of type string or an instance of URL. Received type '+typeof s+" ("+s+")");var t=new R(s);if(t.protocol!=="file:")throw new TypeError("The URL must be of scheme file");return me(t)},Xe=function(s,t){var l,_,D;if(t===void 0&&(t={}),!(s instanceof R))return b(s);if(typeof t!="object"||t===null)throw new TypeError('The "options" argument must be of type object.');var j=(l=t.auth)!=null?l:!0,c=(_=t.fragment)!=null?_:!0,K=(D=t.search)!=null?D:!0,O=new R(s.toString());return j||(O.username="",O.password=""),c||(O.hash=""),K||(O.search=""),O.toString()},We={format:Xe,parse:w,resolve:U,resolveObject:A,Url:q,URL:R,URLSearchParams:N,domainToASCII:De,domainToUnicode:Be,pathToFileURL:Ge,fileURLToPath:ze};r.URL=R,r.URLSearchParams=N,r.Url=q,r.default=We,r.domainToASCII=De,r.domainToUnicode=Be,r.fileURLToPath=ze,r.format=Xe,r.parse=w,r.pathToFileURL=Ge,r.resolve=U,r.resolveObject=A,r=o.exports=We})(He,He.exports);var rt=He.exports;(function(o){var r=dt,h=Oe,f=mt,n=gt,g=rt,u=o;u.request=function(a,v){typeof a=="string"?a=g.parse(a):a=f(a);var T=P.location.protocol.search(/^https?:$/)===-1?"http:":"",C=a.protocol||T,m=a.hostname||a.host,A=a.port,te=a.path||"/";m&&m.indexOf(":")!==-1&&(m="["+m+"]"),a.url=(m?C+"//"+m:"")+(A?":"+A:"")+te,a.method=(a.method||"GET").toUpperCase(),a.headers=a.headers||{};var ae=new r(a);return v&&ae.on("response",v),ae},u.get=function(v,T){var C=u.request(v,T);return C.end(),C},u.ClientRequest=r,u.IncomingMessage=h.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=n,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]})(Je);var ot={exports:{}};(function(o){var r=Je,h=rt,f=o.exports;for(var n in r)r.hasOwnProperty(n)&&(f[n]=r[n]);f.request=function(u,a){return u=g(u),r.request.call(this,u,a)},f.get=function(u,a){return u=g(u),r.get.call(this,u,a)};function g(u){if(typeof u=="string"&&(u=h.parse(u)),u.protocol||(u.protocol="https:"),u.protocol!=="https:")throw new Error('Protocol "'+u.protocol+'" not supported. Expected "https:"');return u}})(ot);var Tt=ot.exports;export{Tt as h,Je as s,rt as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as rt,p as ci,F as yt,q as gt,g as xr,aZ as Er}from"./main-wVJAa1zx.js";import{c as q,b as so,w as Ir,r as Sr,f as as,t as Oi,d as ro,g as Nt,V as no,M as oo,N,h as ao,i as ki,j as co,K as lo,A as ho,q as Os,x as uo,H as fo,F as po,l as Rs,$ as go,p as yo,J as mo,u as ri,m as Ts,X as wo,n as bo,_ as Pr,y as ut,I as _o,C as Ns,D as Kt,E as Ie,U as st,G as Tt,L as Xe,O as vo,P as Vt,Q as Or,R as xo,T as Eo,W as Io,Y as Rr,Z as So,a0 as Tr,a1 as Nr,a2 as Bt,a3 as Fi,a4 as xi,k as Po,a5 as Oo,B as Li,a6 as Ro,a7 as To,a8 as No,a9 as $o,aa as wi,ab as Ao,ac as Lo,ad as Ci,ae as $s,af as Co,ag as Do,ah as Mo,ai as As,aj as qo,ak as zo,al as jo,am as Uo,an as Ko,ao as Vo,ap as Ho}from"./index.es-DkxB7tN9.js";const Bo=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,Go=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,ko=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function Fo(r,e){if(r==="__proto__"||r==="constructor"&&e&&typeof e=="object"&&"prototype"in e){Jo(r);return}return e}function Jo(r){console.warn(`[destr] Dropping "${r}" key to prevent prototype pollution.`)}function bi(r,e={}){if(typeof r!="string")return r;const t=r.trim();if(r[0]==='"'&&r.at(-1)==='"'&&!r.includes("\\"))return t.slice(1,-1);if(t.length<=9){const i=t.toLowerCase();if(i==="true")return!0;if(i==="false")return!1;if(i==="undefined")return;if(i==="null")return null;if(i==="nan")return Number.NaN;if(i==="infinity")return Number.POSITIVE_INFINITY;if(i==="-infinity")return Number.NEGATIVE_INFINITY}if(!ko.test(r)){if(e.strict)throw new SyntaxError("[destr] Invalid JSON");return r}try{if(Bo.test(r)||Go.test(r)){if(e.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(r,Fo)}return JSON.parse(r)}catch(i){if(e.strict)throw i;return r}}function Wo(r){return!r||typeof r.then!="function"?Promise.resolve(r):r}function ze(r,...e){try{return Wo(r(...e))}catch(t){return Promise.reject(t)}}function Yo(r){const e=typeof r;return r===null||e!=="object"&&e!=="function"}function Qo(r){const e=Object.getPrototypeOf(r);return!e||e.isPrototypeOf(Object)}function Ei(r){if(Yo(r))return String(r);if(Qo(r)||Array.isArray(r))return JSON.stringify(r);if(typeof r.toJSON=="function")return Ei(r.toJSON());throw new Error("[unstorage] Cannot stringify value!")}function $r(){if(typeof rt.Buffer===void 0)throw new TypeError("[unstorage] Buffer is not supported!")}const Ji="base64:";function Xo(r){if(typeof r=="string")return r;$r();const e=rt.Buffer.from(r).toString("base64");return Ji+e}function Zo(r){return typeof r!="string"||!r.startsWith(Ji)?r:($r(),rt.Buffer.from(r.slice(Ji.length),"base64"))}function Qe(r){return r?r.split("?")[0].replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function ea(...r){return Qe(r.join(":"))}function _i(r){return r=Qe(r),r?r+":":""}const ta="memory",ia=()=>{const r=new Map;return{name:ta,options:{},hasItem(e){return r.has(e)},getItem(e){return r.get(e)??null},getItemRaw(e){return r.get(e)??null},setItem(e,t){r.set(e,t)},setItemRaw(e,t){r.set(e,t)},removeItem(e){r.delete(e)},getKeys(){return Array.from(r.keys())},clear(){r.clear()},dispose(){r.clear()}}};function sa(r={}){const e={mounts:{"":r.driver||ia()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},t=c=>{for(const f of e.mountpoints)if(c.startsWith(f))return{base:f,relativeKey:c.slice(f.length),driver:e.mounts[f]};return{base:"",relativeKey:c,driver:e.mounts[""]}},i=(c,f)=>e.mountpoints.filter(y=>y.startsWith(c)||f&&c.startsWith(y)).map(y=>({relativeBase:c.length>y.length?c.slice(y.length):void 0,mountpoint:y,driver:e.mounts[y]})),s=(c,f)=>{if(e.watching){f=Qe(f);for(const y of e.watchListeners)y(c,f)}},n=async()=>{if(!e.watching){e.watching=!0;for(const c in e.mounts)e.unwatch[c]=await Ls(e.mounts[c],s,c)}},a=async()=>{if(e.watching){for(const c in e.unwatch)await e.unwatch[c]();e.unwatch={},e.watching=!1}},l=(c,f,y)=>{const g=new Map,E=_=>{let R=g.get(_.base);return R||(R={driver:_.driver,base:_.base,items:[]},g.set(_.base,R)),R};for(const _ of c){const R=typeof _=="string",U=Qe(R?_:_.key),V=R?void 0:_.value,j=R||!_.options?f:{...f,..._.options},k=t(U);E(k).items.push({key:U,value:V,relativeKey:k.relativeKey,options:j})}return Promise.all([...g.values()].map(_=>y(_))).then(_=>_.flat())},u={hasItem(c,f={}){c=Qe(c);const{relativeKey:y,driver:g}=t(c);return ze(g.hasItem,y,f)},getItem(c,f={}){c=Qe(c);const{relativeKey:y,driver:g}=t(c);return ze(g.getItem,y,f).then(E=>bi(E))},getItems(c,f){return l(c,f,y=>y.driver.getItems?ze(y.driver.getItems,y.items.map(g=>({key:g.relativeKey,options:g.options})),f).then(g=>g.map(E=>({key:ea(y.base,E.key),value:bi(E.value)}))):Promise.all(y.items.map(g=>ze(y.driver.getItem,g.relativeKey,g.options).then(E=>({key:g.key,value:bi(E)})))))},getItemRaw(c,f={}){c=Qe(c);const{relativeKey:y,driver:g}=t(c);return g.getItemRaw?ze(g.getItemRaw,y,f):ze(g.getItem,y,f).then(E=>Zo(E))},async setItem(c,f,y={}){if(f===void 0)return u.removeItem(c);c=Qe(c);const{relativeKey:g,driver:E}=t(c);E.setItem&&(await ze(E.setItem,g,Ei(f),y),E.watch||s("update",c))},async setItems(c,f){await l(c,f,async y=>{y.driver.setItems&&await ze(y.driver.setItems,y.items.map(g=>({key:g.relativeKey,value:Ei(g.value),options:g.options})),f),y.driver.setItem&&await Promise.all(y.items.map(g=>ze(y.driver.setItem,g.relativeKey,Ei(g.value),g.options)))})},async setItemRaw(c,f,y={}){if(f===void 0)return u.removeItem(c,y);c=Qe(c);const{relativeKey:g,driver:E}=t(c);if(E.setItemRaw)await ze(E.setItemRaw,g,f,y);else if(E.setItem)await ze(E.setItem,g,Xo(f),y);else return;E.watch||s("update",c)},async removeItem(c,f={}){typeof f=="boolean"&&(f={removeMeta:f}),c=Qe(c);const{relativeKey:y,driver:g}=t(c);g.removeItem&&(await ze(g.removeItem,y,f),(f.removeMeta||f.removeMata)&&await ze(g.removeItem,y+"$",f),g.watch||s("remove",c))},async getMeta(c,f={}){typeof f=="boolean"&&(f={nativeOnly:f}),c=Qe(c);const{relativeKey:y,driver:g}=t(c),E=Object.create(null);if(g.getMeta&&Object.assign(E,await ze(g.getMeta,y,f)),!f.nativeOnly){const _=await ze(g.getItem,y+"$",f).then(R=>bi(R));_&&typeof _=="object"&&(typeof _.atime=="string"&&(_.atime=new Date(_.atime)),typeof _.mtime=="string"&&(_.mtime=new Date(_.mtime)),Object.assign(E,_))}return E},setMeta(c,f,y={}){return this.setItem(c+"$",f,y)},removeMeta(c,f={}){return this.removeItem(c+"$",f)},async getKeys(c,f={}){c=_i(c);const y=i(c,!0);let g=[];const E=[];for(const _ of y){const U=(await ze(_.driver.getKeys,_.relativeBase,f)).map(V=>_.mountpoint+Qe(V)).filter(V=>!g.some(j=>V.startsWith(j)));E.push(...U),g=[_.mountpoint,...g.filter(V=>!V.startsWith(_.mountpoint))]}return c?E.filter(_=>_.startsWith(c)&&!_.endsWith("$")):E.filter(_=>!_.endsWith("$"))},async clear(c,f={}){c=_i(c),await Promise.all(i(c,!1).map(async y=>{if(y.driver.clear)return ze(y.driver.clear,y.relativeBase,f);if(y.driver.removeItem){const g=await y.driver.getKeys(y.relativeBase||"",f);return Promise.all(g.map(E=>y.driver.removeItem(E,f)))}}))},async dispose(){await Promise.all(Object.values(e.mounts).map(c=>Cs(c)))},async watch(c){return await n(),e.watchListeners.push(c),async()=>{e.watchListeners=e.watchListeners.filter(f=>f!==c),e.watchListeners.length===0&&await a()}},async unwatch(){e.watchListeners=[],await a()},mount(c,f){if(c=_i(c),c&&e.mounts[c])throw new Error(`already mounted at ${c}`);return c&&(e.mountpoints.push(c),e.mountpoints.sort((y,g)=>g.length-y.length)),e.mounts[c]=f,e.watching&&Promise.resolve(Ls(f,s,c)).then(y=>{e.unwatch[c]=y}).catch(console.error),u},async unmount(c,f=!0){c=_i(c),!(!c||!e.mounts[c])&&(e.watching&&c in e.unwatch&&(e.unwatch[c](),delete e.unwatch[c]),f&&await Cs(e.mounts[c]),e.mountpoints=e.mountpoints.filter(y=>y!==c),delete e.mounts[c])},getMount(c=""){c=Qe(c)+":";const f=t(c);return{driver:f.driver,base:f.base}},getMounts(c="",f={}){return c=Qe(c),i(c,f.parents).map(g=>({driver:g.driver,base:g.mountpoint}))}};return u}function Ls(r,e,t){return r.watch?r.watch((i,s)=>e(i,t+s)):()=>{}}async function Cs(r){typeof r.dispose=="function"&&await ze(r.dispose)}function zt(r){return new Promise((e,t)=>{r.oncomplete=r.onsuccess=()=>e(r.result),r.onabort=r.onerror=()=>t(r.error)})}function Ar(r,e){const t=indexedDB.open(r);t.onupgradeneeded=()=>t.result.createObjectStore(e);const i=zt(t);return(s,n)=>i.then(a=>n(a.transaction(e,s).objectStore(e)))}let Di;function li(){return Di||(Di=Ar("keyval-store","keyval")),Di}function Ds(r,e=li()){return e("readonly",t=>zt(t.get(r)))}function ra(r,e,t=li()){return t("readwrite",i=>(i.put(e,r),zt(i.transaction)))}function na(r,e=li()){return e("readwrite",t=>(t.delete(r),zt(t.transaction)))}function oa(r=li()){return r("readwrite",e=>(e.clear(),zt(e.transaction)))}function aa(r,e){return r.openCursor().onsuccess=function(){this.result&&(e(this.result),this.result.continue())},zt(r.transaction)}function ca(r=li()){return r("readonly",e=>{if(e.getAllKeys)return zt(e.getAllKeys());const t=[];return aa(e,i=>t.push(i.key)).then(()=>t)})}const la=r=>JSON.stringify(r,(e,t)=>typeof t=="bigint"?t.toString()+"n":t),ha=r=>{const e=/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,t=r.replace(e,'$1"$2n"$3');return JSON.parse(t,(i,s)=>typeof s=="string"&&s.match(/^\d+n$/)?BigInt(s.substring(0,s.length-1)):s)};function Lr(r){if(typeof r!="string")throw new Error(`Cannot safe json parse value of type ${typeof r}`);try{return ha(r)}catch{return r}}function Cr(r){return typeof r=="string"?r:la(r)||""}const ua="idb-keyval";var fa=(r={})=>{const e=r.base&&r.base.length>0?`${r.base}:`:"",t=s=>e+s;let i;return r.dbName&&r.storeName&&(i=Ar(r.dbName,r.storeName)),{name:ua,options:r,async hasItem(s){return!(typeof await Ds(t(s),i)>"u")},async getItem(s){return await Ds(t(s),i)??null},setItem(s,n){return ra(t(s),n,i)},removeItem(s){return na(t(s),i)},getKeys(){return ca(i)},clear(){return oa(i)}}};const da="WALLET_CONNECT_V2_INDEXED_DB",pa="keyvaluestorage";class ga{constructor(){this.indexedDb=sa({driver:fa({dbName:da,storeName:pa})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map(e=>[e.key,e.value])}async getItem(e){const t=await this.indexedDb.getItem(e);if(t!==null)return t}async setItem(e,t){await this.indexedDb.setItem(e,Cr(t))}async removeItem(e){await this.indexedDb.removeItem(e)}}var Mi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof rt.global<"u"?rt.global:typeof self<"u"?self:{},Ii={exports:{}};(function(){let r;function e(){}r=e,r.prototype.getItem=function(t){return this.hasOwnProperty(t)?String(this[t]):null},r.prototype.setItem=function(t,i){this[t]=String(i)},r.prototype.removeItem=function(t){delete this[t]},r.prototype.clear=function(){const t=this;Object.keys(t).forEach(function(i){t[i]=void 0,delete t[i]})},r.prototype.key=function(t){return t=t||0,Object.keys(this)[t]},r.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof Mi<"u"&&Mi.localStorage?Ii.exports=Mi.localStorage:typeof window<"u"&&window.localStorage?Ii.exports=window.localStorage:Ii.exports=new e})();function ya(r){var e;return[r[0],Lr((e=r[1])!=null?e:"")]}class ma{constructor(){this.localStorage=Ii.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(ya)}async getItem(e){const t=this.localStorage.getItem(e);if(t!==null)return Lr(t)}async setItem(e,t){this.localStorage.setItem(e,Cr(t))}async removeItem(e){this.localStorage.removeItem(e)}}const wa="wc_storage_version",Ms=1,ba=async(r,e,t)=>{const i=wa,s=await e.getItem(i);if(s&&s>=Ms){t(e);return}const n=await r.getKeys();if(!n.length){t(e);return}const a=[];for(;n.length;){const l=n.shift();if(!l)continue;const u=l.toLowerCase();if(u.includes("wc@")||u.includes("walletconnect")||u.includes("wc_")||u.includes("wallet_connect")){const c=await r.getItem(l);await e.setItem(l,c),a.push(l)}}await e.setItem(i,Ms),t(e),_a(r,a)},_a=async(r,e)=>{e.length&&e.forEach(async t=>{await r.removeItem(t)})};let va=class{constructor(){this.initialized=!1,this.setInitialized=t=>{this.storage=t,this.initialized=!0};const e=new ma;this.storage=e;try{const t=new ga;ba(e,t,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(e){return await this.initialize(),this.storage.getItem(e)}async setItem(e,t){return await this.initialize(),this.storage.setItem(e,t)}async removeItem(e){return await this.initialize(),this.storage.removeItem(e)}async initialize(){this.initialized||await new Promise(e=>{const t=setInterval(()=>{this.initialized&&(clearInterval(t),e())},20)})}};var kt={};/*! *****************************************************************************
|
|
1
|
+
import{d as rt,p as ci,F as yt,q as gt,g as xr,aZ as Er}from"../main.js";import{c as q,b as so,w as Ir,r as Sr,f as as,t as Oi,d as ro,g as Nt,V as no,M as oo,N,h as ao,i as ki,j as co,K as lo,A as ho,q as Os,x as uo,H as fo,F as po,l as Rs,$ as go,p as yo,J as mo,u as ri,m as Ts,X as wo,n as bo,_ as Pr,y as ut,I as _o,C as Ns,D as Kt,E as Ie,U as st,G as Tt,L as Xe,O as vo,P as Vt,Q as Or,R as xo,T as Eo,W as Io,Y as Rr,Z as So,a0 as Tr,a1 as Nr,a2 as Bt,a3 as Fi,a4 as xi,k as Po,a5 as Oo,B as Li,a6 as Ro,a7 as To,a8 as No,a9 as $o,aa as wi,ab as Ao,ac as Lo,ad as Ci,ae as $s,af as Co,ag as Do,ah as Mo,ai as As,aj as qo,ak as zo,al as jo,am as Uo,an as Ko,ao as Vo,ap as Ho}from"./index.es-00radgcV.js";const Bo=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,Go=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,ko=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function Fo(r,e){if(r==="__proto__"||r==="constructor"&&e&&typeof e=="object"&&"prototype"in e){Jo(r);return}return e}function Jo(r){console.warn(`[destr] Dropping "${r}" key to prevent prototype pollution.`)}function bi(r,e={}){if(typeof r!="string")return r;const t=r.trim();if(r[0]==='"'&&r.at(-1)==='"'&&!r.includes("\\"))return t.slice(1,-1);if(t.length<=9){const i=t.toLowerCase();if(i==="true")return!0;if(i==="false")return!1;if(i==="undefined")return;if(i==="null")return null;if(i==="nan")return Number.NaN;if(i==="infinity")return Number.POSITIVE_INFINITY;if(i==="-infinity")return Number.NEGATIVE_INFINITY}if(!ko.test(r)){if(e.strict)throw new SyntaxError("[destr] Invalid JSON");return r}try{if(Bo.test(r)||Go.test(r)){if(e.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(r,Fo)}return JSON.parse(r)}catch(i){if(e.strict)throw i;return r}}function Wo(r){return!r||typeof r.then!="function"?Promise.resolve(r):r}function ze(r,...e){try{return Wo(r(...e))}catch(t){return Promise.reject(t)}}function Yo(r){const e=typeof r;return r===null||e!=="object"&&e!=="function"}function Qo(r){const e=Object.getPrototypeOf(r);return!e||e.isPrototypeOf(Object)}function Ei(r){if(Yo(r))return String(r);if(Qo(r)||Array.isArray(r))return JSON.stringify(r);if(typeof r.toJSON=="function")return Ei(r.toJSON());throw new Error("[unstorage] Cannot stringify value!")}function $r(){if(typeof rt.Buffer===void 0)throw new TypeError("[unstorage] Buffer is not supported!")}const Ji="base64:";function Xo(r){if(typeof r=="string")return r;$r();const e=rt.Buffer.from(r).toString("base64");return Ji+e}function Zo(r){return typeof r!="string"||!r.startsWith(Ji)?r:($r(),rt.Buffer.from(r.slice(Ji.length),"base64"))}function Qe(r){return r?r.split("?")[0].replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function ea(...r){return Qe(r.join(":"))}function _i(r){return r=Qe(r),r?r+":":""}const ta="memory",ia=()=>{const r=new Map;return{name:ta,options:{},hasItem(e){return r.has(e)},getItem(e){return r.get(e)??null},getItemRaw(e){return r.get(e)??null},setItem(e,t){r.set(e,t)},setItemRaw(e,t){r.set(e,t)},removeItem(e){r.delete(e)},getKeys(){return Array.from(r.keys())},clear(){r.clear()},dispose(){r.clear()}}};function sa(r={}){const e={mounts:{"":r.driver||ia()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},t=c=>{for(const f of e.mountpoints)if(c.startsWith(f))return{base:f,relativeKey:c.slice(f.length),driver:e.mounts[f]};return{base:"",relativeKey:c,driver:e.mounts[""]}},i=(c,f)=>e.mountpoints.filter(y=>y.startsWith(c)||f&&c.startsWith(y)).map(y=>({relativeBase:c.length>y.length?c.slice(y.length):void 0,mountpoint:y,driver:e.mounts[y]})),s=(c,f)=>{if(e.watching){f=Qe(f);for(const y of e.watchListeners)y(c,f)}},n=async()=>{if(!e.watching){e.watching=!0;for(const c in e.mounts)e.unwatch[c]=await Ls(e.mounts[c],s,c)}},a=async()=>{if(e.watching){for(const c in e.unwatch)await e.unwatch[c]();e.unwatch={},e.watching=!1}},l=(c,f,y)=>{const g=new Map,E=_=>{let R=g.get(_.base);return R||(R={driver:_.driver,base:_.base,items:[]},g.set(_.base,R)),R};for(const _ of c){const R=typeof _=="string",U=Qe(R?_:_.key),V=R?void 0:_.value,j=R||!_.options?f:{...f,..._.options},k=t(U);E(k).items.push({key:U,value:V,relativeKey:k.relativeKey,options:j})}return Promise.all([...g.values()].map(_=>y(_))).then(_=>_.flat())},u={hasItem(c,f={}){c=Qe(c);const{relativeKey:y,driver:g}=t(c);return ze(g.hasItem,y,f)},getItem(c,f={}){c=Qe(c);const{relativeKey:y,driver:g}=t(c);return ze(g.getItem,y,f).then(E=>bi(E))},getItems(c,f){return l(c,f,y=>y.driver.getItems?ze(y.driver.getItems,y.items.map(g=>({key:g.relativeKey,options:g.options})),f).then(g=>g.map(E=>({key:ea(y.base,E.key),value:bi(E.value)}))):Promise.all(y.items.map(g=>ze(y.driver.getItem,g.relativeKey,g.options).then(E=>({key:g.key,value:bi(E)})))))},getItemRaw(c,f={}){c=Qe(c);const{relativeKey:y,driver:g}=t(c);return g.getItemRaw?ze(g.getItemRaw,y,f):ze(g.getItem,y,f).then(E=>Zo(E))},async setItem(c,f,y={}){if(f===void 0)return u.removeItem(c);c=Qe(c);const{relativeKey:g,driver:E}=t(c);E.setItem&&(await ze(E.setItem,g,Ei(f),y),E.watch||s("update",c))},async setItems(c,f){await l(c,f,async y=>{y.driver.setItems&&await ze(y.driver.setItems,y.items.map(g=>({key:g.relativeKey,value:Ei(g.value),options:g.options})),f),y.driver.setItem&&await Promise.all(y.items.map(g=>ze(y.driver.setItem,g.relativeKey,Ei(g.value),g.options)))})},async setItemRaw(c,f,y={}){if(f===void 0)return u.removeItem(c,y);c=Qe(c);const{relativeKey:g,driver:E}=t(c);if(E.setItemRaw)await ze(E.setItemRaw,g,f,y);else if(E.setItem)await ze(E.setItem,g,Xo(f),y);else return;E.watch||s("update",c)},async removeItem(c,f={}){typeof f=="boolean"&&(f={removeMeta:f}),c=Qe(c);const{relativeKey:y,driver:g}=t(c);g.removeItem&&(await ze(g.removeItem,y,f),(f.removeMeta||f.removeMata)&&await ze(g.removeItem,y+"$",f),g.watch||s("remove",c))},async getMeta(c,f={}){typeof f=="boolean"&&(f={nativeOnly:f}),c=Qe(c);const{relativeKey:y,driver:g}=t(c),E=Object.create(null);if(g.getMeta&&Object.assign(E,await ze(g.getMeta,y,f)),!f.nativeOnly){const _=await ze(g.getItem,y+"$",f).then(R=>bi(R));_&&typeof _=="object"&&(typeof _.atime=="string"&&(_.atime=new Date(_.atime)),typeof _.mtime=="string"&&(_.mtime=new Date(_.mtime)),Object.assign(E,_))}return E},setMeta(c,f,y={}){return this.setItem(c+"$",f,y)},removeMeta(c,f={}){return this.removeItem(c+"$",f)},async getKeys(c,f={}){c=_i(c);const y=i(c,!0);let g=[];const E=[];for(const _ of y){const U=(await ze(_.driver.getKeys,_.relativeBase,f)).map(V=>_.mountpoint+Qe(V)).filter(V=>!g.some(j=>V.startsWith(j)));E.push(...U),g=[_.mountpoint,...g.filter(V=>!V.startsWith(_.mountpoint))]}return c?E.filter(_=>_.startsWith(c)&&!_.endsWith("$")):E.filter(_=>!_.endsWith("$"))},async clear(c,f={}){c=_i(c),await Promise.all(i(c,!1).map(async y=>{if(y.driver.clear)return ze(y.driver.clear,y.relativeBase,f);if(y.driver.removeItem){const g=await y.driver.getKeys(y.relativeBase||"",f);return Promise.all(g.map(E=>y.driver.removeItem(E,f)))}}))},async dispose(){await Promise.all(Object.values(e.mounts).map(c=>Cs(c)))},async watch(c){return await n(),e.watchListeners.push(c),async()=>{e.watchListeners=e.watchListeners.filter(f=>f!==c),e.watchListeners.length===0&&await a()}},async unwatch(){e.watchListeners=[],await a()},mount(c,f){if(c=_i(c),c&&e.mounts[c])throw new Error(`already mounted at ${c}`);return c&&(e.mountpoints.push(c),e.mountpoints.sort((y,g)=>g.length-y.length)),e.mounts[c]=f,e.watching&&Promise.resolve(Ls(f,s,c)).then(y=>{e.unwatch[c]=y}).catch(console.error),u},async unmount(c,f=!0){c=_i(c),!(!c||!e.mounts[c])&&(e.watching&&c in e.unwatch&&(e.unwatch[c](),delete e.unwatch[c]),f&&await Cs(e.mounts[c]),e.mountpoints=e.mountpoints.filter(y=>y!==c),delete e.mounts[c])},getMount(c=""){c=Qe(c)+":";const f=t(c);return{driver:f.driver,base:f.base}},getMounts(c="",f={}){return c=Qe(c),i(c,f.parents).map(g=>({driver:g.driver,base:g.mountpoint}))}};return u}function Ls(r,e,t){return r.watch?r.watch((i,s)=>e(i,t+s)):()=>{}}async function Cs(r){typeof r.dispose=="function"&&await ze(r.dispose)}function zt(r){return new Promise((e,t)=>{r.oncomplete=r.onsuccess=()=>e(r.result),r.onabort=r.onerror=()=>t(r.error)})}function Ar(r,e){const t=indexedDB.open(r);t.onupgradeneeded=()=>t.result.createObjectStore(e);const i=zt(t);return(s,n)=>i.then(a=>n(a.transaction(e,s).objectStore(e)))}let Di;function li(){return Di||(Di=Ar("keyval-store","keyval")),Di}function Ds(r,e=li()){return e("readonly",t=>zt(t.get(r)))}function ra(r,e,t=li()){return t("readwrite",i=>(i.put(e,r),zt(i.transaction)))}function na(r,e=li()){return e("readwrite",t=>(t.delete(r),zt(t.transaction)))}function oa(r=li()){return r("readwrite",e=>(e.clear(),zt(e.transaction)))}function aa(r,e){return r.openCursor().onsuccess=function(){this.result&&(e(this.result),this.result.continue())},zt(r.transaction)}function ca(r=li()){return r("readonly",e=>{if(e.getAllKeys)return zt(e.getAllKeys());const t=[];return aa(e,i=>t.push(i.key)).then(()=>t)})}const la=r=>JSON.stringify(r,(e,t)=>typeof t=="bigint"?t.toString()+"n":t),ha=r=>{const e=/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,t=r.replace(e,'$1"$2n"$3');return JSON.parse(t,(i,s)=>typeof s=="string"&&s.match(/^\d+n$/)?BigInt(s.substring(0,s.length-1)):s)};function Lr(r){if(typeof r!="string")throw new Error(`Cannot safe json parse value of type ${typeof r}`);try{return ha(r)}catch{return r}}function Cr(r){return typeof r=="string"?r:la(r)||""}const ua="idb-keyval";var fa=(r={})=>{const e=r.base&&r.base.length>0?`${r.base}:`:"",t=s=>e+s;let i;return r.dbName&&r.storeName&&(i=Ar(r.dbName,r.storeName)),{name:ua,options:r,async hasItem(s){return!(typeof await Ds(t(s),i)>"u")},async getItem(s){return await Ds(t(s),i)??null},setItem(s,n){return ra(t(s),n,i)},removeItem(s){return na(t(s),i)},getKeys(){return ca(i)},clear(){return oa(i)}}};const da="WALLET_CONNECT_V2_INDEXED_DB",pa="keyvaluestorage";class ga{constructor(){this.indexedDb=sa({driver:fa({dbName:da,storeName:pa})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map(e=>[e.key,e.value])}async getItem(e){const t=await this.indexedDb.getItem(e);if(t!==null)return t}async setItem(e,t){await this.indexedDb.setItem(e,Cr(t))}async removeItem(e){await this.indexedDb.removeItem(e)}}var Mi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof rt.global<"u"?rt.global:typeof self<"u"?self:{},Ii={exports:{}};(function(){let r;function e(){}r=e,r.prototype.getItem=function(t){return this.hasOwnProperty(t)?String(this[t]):null},r.prototype.setItem=function(t,i){this[t]=String(i)},r.prototype.removeItem=function(t){delete this[t]},r.prototype.clear=function(){const t=this;Object.keys(t).forEach(function(i){t[i]=void 0,delete t[i]})},r.prototype.key=function(t){return t=t||0,Object.keys(this)[t]},r.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof Mi<"u"&&Mi.localStorage?Ii.exports=Mi.localStorage:typeof window<"u"&&window.localStorage?Ii.exports=window.localStorage:Ii.exports=new e})();function ya(r){var e;return[r[0],Lr((e=r[1])!=null?e:"")]}class ma{constructor(){this.localStorage=Ii.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(ya)}async getItem(e){const t=this.localStorage.getItem(e);if(t!==null)return Lr(t)}async setItem(e,t){this.localStorage.setItem(e,Cr(t))}async removeItem(e){this.localStorage.removeItem(e)}}const wa="wc_storage_version",Ms=1,ba=async(r,e,t)=>{const i=wa,s=await e.getItem(i);if(s&&s>=Ms){t(e);return}const n=await r.getKeys();if(!n.length){t(e);return}const a=[];for(;n.length;){const l=n.shift();if(!l)continue;const u=l.toLowerCase();if(u.includes("wc@")||u.includes("walletconnect")||u.includes("wc_")||u.includes("wallet_connect")){const c=await r.getItem(l);await e.setItem(l,c),a.push(l)}}await e.setItem(i,Ms),t(e),_a(r,a)},_a=async(r,e)=>{e.length&&e.forEach(async t=>{await r.removeItem(t)})};let va=class{constructor(){this.initialized=!1,this.setInitialized=t=>{this.storage=t,this.initialized=!0};const e=new ma;this.storage=e;try{const t=new ga;ba(e,t,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(e){return await this.initialize(),this.storage.getItem(e)}async setItem(e,t){return await this.initialize(),this.storage.setItem(e,t)}async removeItem(e){return await this.initialize(),this.storage.removeItem(e)}async initialize(){this.initialized||await new Promise(e=>{const t=setInterval(()=>{this.initialized&&(clearInterval(t),e())},20)})}};var kt={};/*! *****************************************************************************
|
|
2
2
|
Copyright (c) Microsoft Corporation.
|
|
3
3
|
|
|
4
4
|
Permission to use, copy, modify, and/or distribute this software for any
|