@acedatacloud/nexior 3.32.10 → 3.33.0

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.
Files changed (89) hide show
  1. package/dist/assets/{Auth-DzGZNB16.js → Auth-Dk_XqsQW.js} +1 -1
  2. package/dist/assets/{BotPlaceholder-BBXjY2LW.js → BotPlaceholder-GhcqHffv.js} +1 -1
  3. package/dist/assets/{Callback-Bkrpoghm.js → Callback-Bo_2w-pb.js} +1 -1
  4. package/dist/assets/{Console-CnJGLCbP.js → Console-DYE5901n.js} +1 -1
  5. package/dist/assets/Console-ay69lL9t.css +1 -0
  6. package/dist/assets/{Conversation-Dt__9q4r.js → Conversation-Mq7runi8.js} +1 -1
  7. package/dist/assets/{CopyToClipboard-DWCFniu2.js → CopyToClipboard-DYuIA_2f.js} +1 -1
  8. package/dist/assets/{Detail-DdfQXjor.js → Detail-KfqDIej-.js} +2 -2
  9. package/dist/assets/{EditArray-CSDfAmhX.js → EditArray-BWRkBUdy.js} +1 -1
  10. package/dist/assets/{Extra-BQPcMjYE.js → Extra-Clx1Gy9u.js} +1 -1
  11. package/dist/assets/{FilePreview-CDxMKWXV.js → FilePreview-4aNHqzuf.js} +1 -1
  12. package/dist/assets/{History-CsYAuGkr.js → History-0M5CUOfO.js} +1 -1
  13. package/dist/assets/IconPark.vue_vue_type_script_setup_true_lang-CcSdo6Dd.js +1 -0
  14. package/dist/assets/{ImagePreview-CcIUEkSJ.js → ImagePreview-D65IoqNs.js} +1 -1
  15. package/dist/assets/{ImageWrapper-RLXYfGhP.js → ImageWrapper-CPcs7cMf.js} +1 -1
  16. package/dist/assets/Index-2xteqajb.js +1 -0
  17. package/dist/assets/Index-B2KC178P.css +1 -0
  18. package/dist/assets/{Index-BOazIXjW.js → Index-B7y8fe3S.js} +1 -1
  19. package/dist/assets/Index-BDC3BYQJ.css +1 -0
  20. package/dist/assets/{Index-C8VAWrEJ.js → Index-BFxq1H4R.js} +1 -1
  21. package/dist/assets/{Index-CdE_F-Q9.js → Index-BMMsPqtS.js} +1 -1
  22. package/dist/assets/{Index-BWvy6SSD.js → Index-BZu74wXA.js} +1 -1
  23. package/dist/assets/{Index-COg9BJv1.js → Index-B_qmm67L.js} +1 -1
  24. package/dist/assets/{Index-CBMD0JXG.js → Index-Bg5RSuxk.js} +1 -1
  25. package/dist/assets/{Index-Dh6W_faP.js → Index-Bm3CjpOm.js} +1 -1
  26. package/dist/assets/Index-BnDrUpoS.js +1 -0
  27. package/dist/assets/{Index-Cma31HDa.js → Index-CDVnAbtI.js} +1 -1
  28. package/dist/assets/{Index-CWHvzRQT.js → Index-CHpxB3Oe.js} +1 -1
  29. package/dist/assets/Index-CJkfqE6q.js +1 -0
  30. package/dist/assets/{Index-pi2cMyBI.js → Index-CLWGL0jg.js} +1 -1
  31. package/dist/assets/{Index-DgP_6KR3.js → Index-COgg5QHX.js} +1 -1
  32. package/dist/assets/{Index-D-aT_byJ.js → Index-CYKUI8Bj.js} +1 -1
  33. package/dist/assets/{Index-DHsfc08u.css → Index-CjwiIUzU.css} +1 -1
  34. package/dist/assets/Index-DHdrISAF.js +1 -0
  35. package/dist/assets/{Index-CCjUrTXK.js → Index-DcK489UF.js} +1 -1
  36. package/dist/assets/{Index-CzXxK_2b.js → Index-DiP0zpi4.js} +1 -1
  37. package/dist/assets/{Index-BfybvjqW.js → Index-Dld21sB4.js} +1 -1
  38. package/dist/assets/{Index-CNNDPE94.js → Index-FFuF_2Nl.js} +1 -1
  39. package/dist/assets/{Index-DOBWnF6q.js → Index-iF0Q3IWa.js} +1 -1
  40. package/dist/assets/{Invitees-CHf-p6ck.js → Invitees-CbRHFHR4.js} +1 -1
  41. package/dist/assets/{List-CHHXY32r.js → List-BqHqFVlJ.js} +1 -1
  42. package/dist/assets/{List-B7YNhNIM.js → List-CR0l_Yzk.js} +1 -1
  43. package/dist/assets/{List-BrU1F_YH.js → List-vyDoXC9D.js} +1 -1
  44. package/dist/assets/Main-DvbrFf7p.css +1 -0
  45. package/dist/assets/{Main-DQdvaq-3.js → Main-DwwB0oj2.js} +1 -1
  46. package/dist/assets/Navigator-ByPI3aRn.css +1 -0
  47. package/dist/assets/Navigator-XUjqR8TF.js +1 -0
  48. package/dist/assets/{NoTasks-CsBs9OjI.js → NoTasks-Ks7cvOW-.js} +1 -1
  49. package/dist/assets/{Pagination-CFQinZNs.js → Pagination-C9FR8ONZ.js} +1 -1
  50. package/dist/assets/{ScrollList-D1QN29i5.js → ScrollList-udKAvHtH.js} +1 -1
  51. package/dist/assets/{Status-3FQMdQEp.js → Status-DLsORZu-.js} +1 -1
  52. package/dist/assets/{Subscribe-DOKwotv0.js → Subscribe-CyO-DcPi.js} +1 -1
  53. package/dist/assets/{TransportWebHID-D0zvcfdU.js → TransportWebHID-VI3yiOMO.js} +1 -1
  54. package/dist/assets/{VideoPlayer-BE40WS_m.js → VideoPlayer-ChbG90L_.js} +1 -1
  55. package/dist/assets/avatar-BZK4iU8J.js +1 -0
  56. package/dist/assets/{bignumber-CJe2Yf_j.js → bignumber-BF3FQzxN.js} +1 -1
  57. package/dist/assets/{distribution-DamIfOmJ.js → distribution-7nl2_BjL.js} +1 -1
  58. package/dist/assets/{index-Be1ItyMq.js → index-1oBXNhIy.js} +1 -1
  59. package/dist/assets/{index-D54aBAxz.js → index-BO3kMx-9.js} +1 -1
  60. package/dist/assets/{index-BOOZcBKx.js → index-BmI9nlUJ.js} +1 -1
  61. package/dist/assets/index-CJUWpJze.js +613 -0
  62. package/dist/assets/{index-Cc1rtugT.js → index-CVpDeaU_.js} +1 -1
  63. package/dist/assets/{index-CHJKh2Bh.js → index-CeoBq_VM.js} +1 -1
  64. package/dist/assets/{index-DPPJzFm2.js → index-DTiq2-RB.js} +1 -1
  65. package/dist/assets/{index-DPpJ3M-F.js → index-fYQda73h.js} +1 -1
  66. package/dist/assets/{index.es-Df0rYKs1.js → index.es-DfO4_nhh.js} +1 -1
  67. package/dist/assets/{order-BKWx-VP_.js → order-DWLTD-jO.js} +1 -1
  68. package/dist/assets/{price-irKGH1xy.js → price-WOlCH3Uw.js} +1 -1
  69. package/dist/assets/producer-6YAdbgci.js +7 -0
  70. package/dist/assets/producer-BpQVWNsN.js +7 -0
  71. package/dist/assets/{solana-wallets-BZFsAVfk.js → solana-wallets-CE6NsUpa.js} +2 -2
  72. package/dist/assets/{solanaEmbed.esm-JoLYeaHw.js → solanaEmbed.esm-BpEg_SSM.js} +1 -1
  73. package/dist/assets/{string_decoder-qpwtFMp7.js → string_decoder-eUab-jMt.js} +1 -1
  74. package/dist/assets/{vendor-web3-2Fpu-X2r.js → vendor-web3-CPVMttss.js} +4 -4
  75. package/dist/assets/{web-BDd5fhSz.js → web-BfSY2-uz.js} +1 -1
  76. package/dist/assets/{web-CaLukC_K.js → web-C-RtDqBt.js} +1 -1
  77. package/dist/index.html +2 -2
  78. package/package.json +1 -1
  79. package/dist/assets/Console-DsJn6ORf.css +0 -1
  80. package/dist/assets/Index-Ccfr7F2D.js +0 -1
  81. package/dist/assets/Index-Ct_ncjNQ.css +0 -1
  82. package/dist/assets/Index-CuC_V8o3.js +0 -1
  83. package/dist/assets/Index-drIjZRZS.js +0 -1
  84. package/dist/assets/Main-CiQBunQe.css +0 -1
  85. package/dist/assets/Navigator-BFuQQRKd.css +0 -1
  86. package/dist/assets/Navigator-DGLJJliE.js +0 -1
  87. package/dist/assets/avatar-DIo0dZw4.css +0 -1
  88. package/dist/assets/avatar-DJkL1RYR.js +0 -1
  89. package/dist/assets/index-uXQ32ATB.js +0 -613
@@ -1 +1 @@
1
- import{t as k,u as at,v as tr,w as sr,D as ot,x as ct}from"./vendor-web3-2Fpu-X2r.js";import{g as ut}from"./vendor-dayjs-CzbnksQQ.js";import"./vendor-vue-1w_NBnjl.js";const nr=5;function lt(t){const a=Buffer.alloc(2);return a.writeUInt16BE(t,0),a}const ft={data:Buffer.alloc(0),dataLength:0,sequence:0},ht=(t,a)=>({makeBlocks(n){let r=Buffer.concat([lt(n.length),n]);const s=a-5,f=Math.ceil(r.length/s);r=Buffer.concat([r,Buffer.alloc(f*s-r.length+1).fill(0)]);const c=[];for(let l=0;l<f;l++){const o=Buffer.alloc(5);o.writeUInt16BE(t,0),o.writeUInt8(nr,2),o.writeUInt16BE(l,3);const i=r.slice(l*s,(l+1)*s);c.push(Buffer.concat([o,i]))}return c},reduceResponse(n,r){let{data:s,dataLength:f,sequence:c}=n||ft;if(r.readUInt16BE(0)!==t)throw new k("Invalid channel","InvalidChannel");if(r.readUInt8(2)!==nr)throw new k("Invalid tag","InvalidTag");if(r.readUInt16BE(3)!==c)throw new k("Invalid sequence","InvalidSequence");n||(f=r.readUInt16BE(5)),c++;const l=r.slice(n?5:7);return s=Buffer.concat([s,l]),s.length>f&&(s=s.slice(0,f)),{data:s,dataLength:f,sequence:c}},getReducedResult(n){if(n&&n.dataLength===n.data.length)return n.data}});var z={exports:{}},ne,ir;function W(){if(ir)return ne;ir=1;const t="2.0.0",a=256,n=Number.MAX_SAFE_INTEGER||9007199254740991,r=16,s=a-6;return ne={MAX_LENGTH:a,MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:s,MAX_SAFE_INTEGER:n,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:t,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},ne}var ie,ar;function K(){if(ar)return ie;ar=1;var t={};return ie=typeof process=="object"&&t&&t.NODE_DEBUG&&/\bsemver\b/i.test(t.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{},ie}var or;function M(){return or||(or=1,function(t,a){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:s}=W(),f=K();a=t.exports={};const c=a.re=[],l=a.safeRe=[],o=a.src=[],i=a.safeSrc=[],e=a.t={};let u=0;const h="[a-zA-Z0-9-]",m=[["\\s",1],["\\d",s],[h,r]],w=N=>{for(const[A,D]of m)N=N.split(`${A}*`).join(`${A}{0,${D}}`).split(`${A}+`).join(`${A}{1,${D}}`);return N},E=(N,A,D)=>{const T=w(A),U=u++;f(N,U,A),e[N]=U,o[U]=A,i[U]=T,c[U]=new RegExp(A,D?"g":void 0),l[U]=new RegExp(T,D?"g":void 0)};E("NUMERICIDENTIFIER","0|[1-9]\\d*"),E("NUMERICIDENTIFIERLOOSE","\\d+"),E("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${h}*`),E("MAINVERSION",`(${o[e.NUMERICIDENTIFIER]})\\.(${o[e.NUMERICIDENTIFIER]})\\.(${o[e.NUMERICIDENTIFIER]})`),E("MAINVERSIONLOOSE",`(${o[e.NUMERICIDENTIFIERLOOSE]})\\.(${o[e.NUMERICIDENTIFIERLOOSE]})\\.(${o[e.NUMERICIDENTIFIERLOOSE]})`),E("PRERELEASEIDENTIFIER",`(?:${o[e.NONNUMERICIDENTIFIER]}|${o[e.NUMERICIDENTIFIER]})`),E("PRERELEASEIDENTIFIERLOOSE",`(?:${o[e.NONNUMERICIDENTIFIER]}|${o[e.NUMERICIDENTIFIERLOOSE]})`),E("PRERELEASE",`(?:-(${o[e.PRERELEASEIDENTIFIER]}(?:\\.${o[e.PRERELEASEIDENTIFIER]})*))`),E("PRERELEASELOOSE",`(?:-?(${o[e.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${o[e.PRERELEASEIDENTIFIERLOOSE]})*))`),E("BUILDIDENTIFIER",`${h}+`),E("BUILD",`(?:\\+(${o[e.BUILDIDENTIFIER]}(?:\\.${o[e.BUILDIDENTIFIER]})*))`),E("FULLPLAIN",`v?${o[e.MAINVERSION]}${o[e.PRERELEASE]}?${o[e.BUILD]}?`),E("FULL",`^${o[e.FULLPLAIN]}$`),E("LOOSEPLAIN",`[v=\\s]*${o[e.MAINVERSIONLOOSE]}${o[e.PRERELEASELOOSE]}?${o[e.BUILD]}?`),E("LOOSE",`^${o[e.LOOSEPLAIN]}$`),E("GTLT","((?:<|>)?=?)"),E("XRANGEIDENTIFIERLOOSE",`${o[e.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),E("XRANGEIDENTIFIER",`${o[e.NUMERICIDENTIFIER]}|x|X|\\*`),E("XRANGEPLAIN",`[v=\\s]*(${o[e.XRANGEIDENTIFIER]})(?:\\.(${o[e.XRANGEIDENTIFIER]})(?:\\.(${o[e.XRANGEIDENTIFIER]})(?:${o[e.PRERELEASE]})?${o[e.BUILD]}?)?)?`),E("XRANGEPLAINLOOSE",`[v=\\s]*(${o[e.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[e.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[e.XRANGEIDENTIFIERLOOSE]})(?:${o[e.PRERELEASELOOSE]})?${o[e.BUILD]}?)?)?`),E("XRANGE",`^${o[e.GTLT]}\\s*${o[e.XRANGEPLAIN]}$`),E("XRANGELOOSE",`^${o[e.GTLT]}\\s*${o[e.XRANGEPLAINLOOSE]}$`),E("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),E("COERCE",`${o[e.COERCEPLAIN]}(?:$|[^\\d])`),E("COERCEFULL",o[e.COERCEPLAIN]+`(?:${o[e.PRERELEASE]})?(?:${o[e.BUILD]})?(?:$|[^\\d])`),E("COERCERTL",o[e.COERCE],!0),E("COERCERTLFULL",o[e.COERCEFULL],!0),E("LONETILDE","(?:~>?)"),E("TILDETRIM",`(\\s*)${o[e.LONETILDE]}\\s+`,!0),a.tildeTrimReplace="$1~",E("TILDE",`^${o[e.LONETILDE]}${o[e.XRANGEPLAIN]}$`),E("TILDELOOSE",`^${o[e.LONETILDE]}${o[e.XRANGEPLAINLOOSE]}$`),E("LONECARET","(?:\\^)"),E("CARETTRIM",`(\\s*)${o[e.LONECARET]}\\s+`,!0),a.caretTrimReplace="$1^",E("CARET",`^${o[e.LONECARET]}${o[e.XRANGEPLAIN]}$`),E("CARETLOOSE",`^${o[e.LONECARET]}${o[e.XRANGEPLAINLOOSE]}$`),E("COMPARATORLOOSE",`^${o[e.GTLT]}\\s*(${o[e.LOOSEPLAIN]})$|^$`),E("COMPARATOR",`^${o[e.GTLT]}\\s*(${o[e.FULLPLAIN]})$|^$`),E("COMPARATORTRIM",`(\\s*)${o[e.GTLT]}\\s*(${o[e.LOOSEPLAIN]}|${o[e.XRANGEPLAIN]})`,!0),a.comparatorTrimReplace="$1$2$3",E("HYPHENRANGE",`^\\s*(${o[e.XRANGEPLAIN]})\\s+-\\s+(${o[e.XRANGEPLAIN]})\\s*$`),E("HYPHENRANGELOOSE",`^\\s*(${o[e.XRANGEPLAINLOOSE]})\\s+-\\s+(${o[e.XRANGEPLAINLOOSE]})\\s*$`),E("STAR","(<|>)?=?\\s*\\*"),E("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),E("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(z,z.exports)),z.exports}var ae,cr;function Ke(){if(cr)return ae;cr=1;const t=Object.freeze({loose:!0}),a=Object.freeze({});return ae=r=>r?typeof r!="object"?t:r:a,ae}var oe,ur;function et(){if(ur)return oe;ur=1;const t=/^[0-9]+$/,a=(r,s)=>{const f=t.test(r),c=t.test(s);return f&&c&&(r=+r,s=+s),r===s?0:f&&!c?-1:c&&!f?1:r<s?-1:1};return oe={compareIdentifiers:a,rcompareIdentifiers:(r,s)=>a(s,r)},oe}var ce,lr;function _(){if(lr)return ce;lr=1;const t=K(),{MAX_LENGTH:a,MAX_SAFE_INTEGER:n}=W(),{safeRe:r,t:s}=M(),f=Ke(),{compareIdentifiers:c}=et();class l{constructor(i,e){if(e=f(e),i instanceof l){if(i.loose===!!e.loose&&i.includePrerelease===!!e.includePrerelease)return i;i=i.version}else if(typeof i!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof i}".`);if(i.length>a)throw new TypeError(`version is longer than ${a} characters`);t("SemVer",i,e),this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease;const u=i.trim().match(e.loose?r[s.LOOSE]:r[s.FULL]);if(!u)throw new TypeError(`Invalid Version: ${i}`);if(this.raw=i,this.major=+u[1],this.minor=+u[2],this.patch=+u[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");u[4]?this.prerelease=u[4].split(".").map(h=>{if(/^[0-9]+$/.test(h)){const m=+h;if(m>=0&&m<n)return m}return h}):this.prerelease=[],this.build=u[5]?u[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(i){if(t("SemVer.compare",this.version,this.options,i),!(i instanceof l)){if(typeof i=="string"&&i===this.version)return 0;i=new l(i,this.options)}return i.version===this.version?0:this.compareMain(i)||this.comparePre(i)}compareMain(i){return i instanceof l||(i=new l(i,this.options)),c(this.major,i.major)||c(this.minor,i.minor)||c(this.patch,i.patch)}comparePre(i){if(i instanceof l||(i=new l(i,this.options)),this.prerelease.length&&!i.prerelease.length)return-1;if(!this.prerelease.length&&i.prerelease.length)return 1;if(!this.prerelease.length&&!i.prerelease.length)return 0;let e=0;do{const u=this.prerelease[e],h=i.prerelease[e];if(t("prerelease compare",e,u,h),u===void 0&&h===void 0)return 0;if(h===void 0)return 1;if(u===void 0)return-1;if(u===h)continue;return c(u,h)}while(++e)}compareBuild(i){i instanceof l||(i=new l(i,this.options));let e=0;do{const u=this.build[e],h=i.build[e];if(t("build compare",e,u,h),u===void 0&&h===void 0)return 0;if(h===void 0)return 1;if(u===void 0)return-1;if(u===h)continue;return c(u,h)}while(++e)}inc(i,e,u){if(i.startsWith("pre")){if(!e&&u===!1)throw new Error("invalid increment argument: identifier is empty");if(e){const h=`-${e}`.match(this.options.loose?r[s.PRERELEASELOOSE]:r[s.PRERELEASE]);if(!h||h[1]!==e)throw new Error(`invalid identifier: ${e}`)}}switch(i){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",e,u);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",e,u);break;case"prepatch":this.prerelease.length=0,this.inc("patch",e,u),this.inc("pre",e,u);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",e,u),this.inc("pre",e,u);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const h=Number(u)?1:0;if(this.prerelease.length===0)this.prerelease=[h];else{let m=this.prerelease.length;for(;--m>=0;)typeof this.prerelease[m]=="number"&&(this.prerelease[m]++,m=-2);if(m===-1){if(e===this.prerelease.join(".")&&u===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(h)}}if(e){let m=[e,h];u===!1&&(m=[e]),c(this.prerelease[0],e)===0?isNaN(this.prerelease[1])&&(this.prerelease=m):this.prerelease=m}break}default:throw new Error(`invalid increment argument: ${i}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return ce=l,ce}var ue,fr;function X(){if(fr)return ue;fr=1;const t=_();return ue=(n,r,s=!1)=>{if(n instanceof t)return n;try{return new t(n,r)}catch(f){if(!s)return null;throw f}},ue}var le,hr;function dt(){if(hr)return le;hr=1;const t=X();return le=(n,r)=>{const s=t(n,r);return s?s.version:null},le}var fe,dr;function Et(){if(dr)return fe;dr=1;const t=X();return fe=(n,r)=>{const s=t(n.trim().replace(/^[=v]+/,""),r);return s?s.version:null},fe}var he,Er;function pt(){if(Er)return he;Er=1;const t=_();return he=(n,r,s,f,c)=>{typeof s=="string"&&(c=f,f=s,s=void 0);try{return new t(n instanceof t?n.version:n,s).inc(r,f,c).version}catch{return null}},he}var de,pr;function mt(){if(pr)return de;pr=1;const t=X();return de=(n,r)=>{const s=t(n,null,!0),f=t(r,null,!0),c=s.compare(f);if(c===0)return null;const l=c>0,o=l?s:f,i=l?f:s,e=!!o.prerelease.length;if(!!i.prerelease.length&&!e){if(!i.patch&&!i.minor)return"major";if(i.compareMain(o)===0)return i.minor&&!i.patch?"minor":"patch"}const h=e?"pre":"";return s.major!==f.major?h+"major":s.minor!==f.minor?h+"minor":s.patch!==f.patch?h+"patch":"prerelease"},de}var Ee,mr;function Rt(){if(mr)return Ee;mr=1;const t=_();return Ee=(n,r)=>new t(n,r).major,Ee}var pe,Rr;function It(){if(Rr)return pe;Rr=1;const t=_();return pe=(n,r)=>new t(n,r).minor,pe}var me,Ir;function vt(){if(Ir)return me;Ir=1;const t=_();return me=(n,r)=>new t(n,r).patch,me}var Re,vr;function $t(){if(vr)return Re;vr=1;const t=X();return Re=(n,r)=>{const s=t(n,r);return s&&s.prerelease.length?s.prerelease:null},Re}var Ie,$r;function F(){if($r)return Ie;$r=1;const t=_();return Ie=(n,r,s)=>new t(n,s).compare(new t(r,s)),Ie}var ve,Sr;function St(){if(Sr)return ve;Sr=1;const t=F();return ve=(n,r,s)=>t(r,n,s),ve}var $e,Lr;function Lt(){if(Lr)return $e;Lr=1;const t=F();return $e=(n,r)=>t(n,r,!0),$e}var Se,gr;function Ze(){if(gr)return Se;gr=1;const t=_();return Se=(n,r,s)=>{const f=new t(n,s),c=new t(r,s);return f.compare(c)||f.compareBuild(c)},Se}var Le,Nr;function gt(){if(Nr)return Le;Nr=1;const t=Ze();return Le=(n,r)=>n.sort((s,f)=>t(s,f,r)),Le}var ge,wr;function Nt(){if(wr)return ge;wr=1;const t=Ze();return ge=(n,r)=>n.sort((s,f)=>t(f,s,r)),ge}var Ne,Or;function Z(){if(Or)return Ne;Or=1;const t=F();return Ne=(n,r,s)=>t(n,r,s)>0,Ne}var we,Ar;function Je(){if(Ar)return we;Ar=1;const t=F();return we=(n,r,s)=>t(n,r,s)<0,we}var Oe,Tr;function rt(){if(Tr)return Oe;Tr=1;const t=F();return Oe=(n,r,s)=>t(n,r,s)===0,Oe}var Ae,Pr;function tt(){if(Pr)return Ae;Pr=1;const t=F();return Ae=(n,r,s)=>t(n,r,s)!==0,Ae}var Te,Cr;function Qe(){if(Cr)return Te;Cr=1;const t=F();return Te=(n,r,s)=>t(n,r,s)>=0,Te}var Pe,qr;function er(){if(qr)return Pe;qr=1;const t=F();return Pe=(n,r,s)=>t(n,r,s)<=0,Pe}var Ce,yr;function st(){if(yr)return Ce;yr=1;const t=rt(),a=tt(),n=Z(),r=Qe(),s=Je(),f=er();return Ce=(l,o,i,e)=>{switch(o){case"===":return typeof l=="object"&&(l=l.version),typeof i=="object"&&(i=i.version),l===i;case"!==":return typeof l=="object"&&(l=l.version),typeof i=="object"&&(i=i.version),l!==i;case"":case"=":case"==":return t(l,i,e);case"!=":return a(l,i,e);case">":return n(l,i,e);case">=":return r(l,i,e);case"<":return s(l,i,e);case"<=":return f(l,i,e);default:throw new TypeError(`Invalid operator: ${o}`)}},Ce}var qe,xr;function wt(){if(xr)return qe;xr=1;const t=_(),a=X(),{safeRe:n,t:r}=M();return qe=(f,c)=>{if(f instanceof t)return f;if(typeof f=="number"&&(f=String(f)),typeof f!="string")return null;c=c||{};let l=null;if(!c.rtl)l=f.match(c.includePrerelease?n[r.COERCEFULL]:n[r.COERCE]);else{const m=c.includePrerelease?n[r.COERCERTLFULL]:n[r.COERCERTL];let w;for(;(w=m.exec(f))&&(!l||l.index+l[0].length!==f.length);)(!l||w.index+w[0].length!==l.index+l[0].length)&&(l=w),m.lastIndex=w.index+w[1].length+w[2].length;m.lastIndex=-1}if(l===null)return null;const o=l[2],i=l[3]||"0",e=l[4]||"0",u=c.includePrerelease&&l[5]?`-${l[5]}`:"",h=c.includePrerelease&&l[6]?`+${l[6]}`:"";return a(`${o}.${i}.${e}${u}${h}`,c)},qe}var ye,Dr;function Ot(){if(Dr)return ye;Dr=1;class t{constructor(){this.max=1e3,this.map=new Map}get(n){const r=this.map.get(n);if(r!==void 0)return this.map.delete(n),this.map.set(n,r),r}delete(n){return this.map.delete(n)}set(n,r){if(!this.delete(n)&&r!==void 0){if(this.map.size>=this.max){const f=this.map.keys().next().value;this.delete(f)}this.map.set(n,r)}return this}}return ye=t,ye}var xe,Ur;function j(){if(Ur)return xe;Ur=1;const t=/\s+/g;class a{constructor(d,v){if(v=s(v),d instanceof a)return d.loose===!!v.loose&&d.includePrerelease===!!v.includePrerelease?d:new a(d.raw,v);if(d instanceof f)return this.raw=d.value,this.set=[[d]],this.formatted=void 0,this;if(this.options=v,this.loose=!!v.loose,this.includePrerelease=!!v.includePrerelease,this.raw=d.trim().replace(t," "),this.set=this.raw.split("||").map(R=>this.parseRange(R.trim())).filter(R=>R.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const R=this.set[0];if(this.set=this.set.filter($=>!E($[0])),this.set.length===0)this.set=[R];else if(this.set.length>1){for(const $ of this.set)if($.length===1&&N($[0])){this.set=[$];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let d=0;d<this.set.length;d++){d>0&&(this.formatted+="||");const v=this.set[d];for(let R=0;R<v.length;R++)R>0&&(this.formatted+=" "),this.formatted+=v[R].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(d){const R=((this.options.includePrerelease&&m)|(this.options.loose&&w))+":"+d,$=r.get(R);if($)return $;const I=this.options.loose,S=I?o[i.HYPHENRANGELOOSE]:o[i.HYPHENRANGE];d=d.replace(S,te(this.options.includePrerelease)),c("hyphen replace",d),d=d.replace(o[i.COMPARATORTRIM],e),c("comparator trim",d),d=d.replace(o[i.TILDETRIM],u),c("tilde trim",d),d=d.replace(o[i.CARETTRIM],h),c("caret trim",d);let O=d.split(" ").map(y=>D(y,this.options)).join(" ").split(/\s+/).map(y=>re(y,this.options));I&&(O=O.filter(y=>(c("loose invalid filter",y,this.options),!!y.match(o[i.COMPARATORLOOSE])))),c("range list",O);const g=new Map,P=O.map(y=>new f(y,this.options));for(const y of P){if(E(y))return[y];g.set(y.value,y)}g.size>1&&g.has("")&&g.delete("");const b=[...g.values()];return r.set(R,b),b}intersects(d,v){if(!(d instanceof a))throw new TypeError("a Range is required");return this.set.some(R=>A(R,v)&&d.set.some($=>A($,v)&&R.every(I=>$.every(S=>I.intersects(S,v)))))}test(d){if(!d)return!1;if(typeof d=="string")try{d=new l(d,this.options)}catch{return!1}for(let v=0;v<this.set.length;v++)if(se(this.set[v],d,this.options))return!0;return!1}}xe=a;const n=Ot(),r=new n,s=Ke(),f=J(),c=K(),l=_(),{safeRe:o,t:i,comparatorTrimReplace:e,tildeTrimReplace:u,caretTrimReplace:h}=M(),{FLAG_INCLUDE_PRERELEASE:m,FLAG_LOOSE:w}=W(),E=p=>p.value==="<0.0.0-0",N=p=>p.value==="",A=(p,d)=>{let v=!0;const R=p.slice();let $=R.pop();for(;v&&R.length;)v=R.every(I=>$.intersects(I,d)),$=R.pop();return v},D=(p,d)=>(c("comp",p,d),p=C(p,d),c("caret",p),p=U(p,d),c("tildes",p),p=L(p,d),c("xrange",p),p=ee(p,d),c("stars",p),p),T=p=>!p||p.toLowerCase()==="x"||p==="*",U=(p,d)=>p.trim().split(/\s+/).map(v=>G(v,d)).join(" "),G=(p,d)=>{const v=d.loose?o[i.TILDELOOSE]:o[i.TILDE];return p.replace(v,(R,$,I,S,O)=>{c("tilde",p,R,$,I,S,O);let g;return T($)?g="":T(I)?g=`>=${$}.0.0 <${+$+1}.0.0-0`:T(S)?g=`>=${$}.${I}.0 <${$}.${+I+1}.0-0`:O?(c("replaceTilde pr",O),g=`>=${$}.${I}.${S}-${O} <${$}.${+I+1}.0-0`):g=`>=${$}.${I}.${S} <${$}.${+I+1}.0-0`,c("tilde return",g),g})},C=(p,d)=>p.trim().split(/\s+/).map(v=>x(v,d)).join(" "),x=(p,d)=>{c("caret",p,d);const v=d.loose?o[i.CARETLOOSE]:o[i.CARET],R=d.includePrerelease?"-0":"";return p.replace(v,($,I,S,O,g)=>{c("caret",p,$,I,S,O,g);let P;return T(I)?P="":T(S)?P=`>=${I}.0.0${R} <${+I+1}.0.0-0`:T(O)?I==="0"?P=`>=${I}.${S}.0${R} <${I}.${+S+1}.0-0`:P=`>=${I}.${S}.0${R} <${+I+1}.0.0-0`:g?(c("replaceCaret pr",g),I==="0"?S==="0"?P=`>=${I}.${S}.${O}-${g} <${I}.${S}.${+O+1}-0`:P=`>=${I}.${S}.${O}-${g} <${I}.${+S+1}.0-0`:P=`>=${I}.${S}.${O}-${g} <${+I+1}.0.0-0`):(c("no pr"),I==="0"?S==="0"?P=`>=${I}.${S}.${O}${R} <${I}.${S}.${+O+1}-0`:P=`>=${I}.${S}.${O}${R} <${I}.${+S+1}.0-0`:P=`>=${I}.${S}.${O} <${+I+1}.0.0-0`),c("caret return",P),P})},L=(p,d)=>(c("replaceXRanges",p,d),p.split(/\s+/).map(v=>B(v,d)).join(" ")),B=(p,d)=>{p=p.trim();const v=d.loose?o[i.XRANGELOOSE]:o[i.XRANGE];return p.replace(v,(R,$,I,S,O,g)=>{c("xRange",p,R,$,I,S,O,g);const P=T(I),b=P||T(S),y=b||T(O),V=y;return $==="="&&V&&($=""),g=d.includePrerelease?"-0":"",P?$===">"||$==="<"?R="<0.0.0-0":R="*":$&&V?(b&&(S=0),O=0,$===">"?($=">=",b?(I=+I+1,S=0,O=0):(S=+S+1,O=0)):$==="<="&&($="<",b?I=+I+1:S=+S+1),$==="<"&&(g="-0"),R=`${$+I}.${S}.${O}${g}`):b?R=`>=${I}.0.0${g} <${+I+1}.0.0-0`:y&&(R=`>=${I}.${S}.0${g} <${I}.${+S+1}.0-0`),c("xRange return",R),R})},ee=(p,d)=>(c("replaceStars",p,d),p.trim().replace(o[i.STAR],"")),re=(p,d)=>(c("replaceGTE0",p,d),p.trim().replace(o[d.includePrerelease?i.GTE0PRE:i.GTE0],"")),te=p=>(d,v,R,$,I,S,O,g,P,b,y,V)=>(T(R)?v="":T($)?v=`>=${R}.0.0${p?"-0":""}`:T(I)?v=`>=${R}.${$}.0${p?"-0":""}`:S?v=`>=${v}`:v=`>=${v}${p?"-0":""}`,T(P)?g="":T(b)?g=`<${+P+1}.0.0-0`:T(y)?g=`<${P}.${+b+1}.0-0`:V?g=`<=${P}.${b}.${y}-${V}`:p?g=`<${P}.${b}.${+y+1}-0`:g=`<=${g}`,`${v} ${g}`.trim()),se=(p,d,v)=>{for(let R=0;R<p.length;R++)if(!p[R].test(d))return!1;if(d.prerelease.length&&!v.includePrerelease){for(let R=0;R<p.length;R++)if(c(p[R].semver),p[R].semver!==f.ANY&&p[R].semver.prerelease.length>0){const $=p[R].semver;if($.major===d.major&&$.minor===d.minor&&$.patch===d.patch)return!0}return!1}return!0};return xe}var De,br;function J(){if(br)return De;br=1;const t=Symbol("SemVer ANY");class a{static get ANY(){return t}constructor(e,u){if(u=n(u),e instanceof a){if(e.loose===!!u.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),c("comparator",e,u),this.options=u,this.loose=!!u.loose,this.parse(e),this.semver===t?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(e){const u=this.options.loose?r[s.COMPARATORLOOSE]:r[s.COMPARATOR],h=e.match(u);if(!h)throw new TypeError(`Invalid comparator: ${e}`);this.operator=h[1]!==void 0?h[1]:"",this.operator==="="&&(this.operator=""),h[2]?this.semver=new l(h[2],this.options.loose):this.semver=t}toString(){return this.value}test(e){if(c("Comparator.test",e,this.options.loose),this.semver===t||e===t)return!0;if(typeof e=="string")try{e=new l(e,this.options)}catch{return!1}return f(e,this.operator,this.semver,this.options)}intersects(e,u){if(!(e instanceof a))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new o(e.value,u).test(this.value):e.operator===""?e.value===""?!0:new o(this.value,u).test(e.semver):(u=n(u),u.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!u.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||f(this.semver,"<",e.semver,u)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||f(this.semver,">",e.semver,u)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}De=a;const n=Ke(),{safeRe:r,t:s}=M(),f=st(),c=K(),l=_(),o=j();return De}var Ue,_r;function Q(){if(_r)return Ue;_r=1;const t=j();return Ue=(n,r,s)=>{try{r=new t(r,s)}catch{return!1}return r.test(n)},Ue}var be,Gr;function At(){if(Gr)return be;Gr=1;const t=j();return be=(n,r)=>new t(n,r).set.map(s=>s.map(f=>f.value).join(" ").trim().split(" ")),be}var _e,Fr;function Tt(){if(Fr)return _e;Fr=1;const t=_(),a=j();return _e=(r,s,f)=>{let c=null,l=null,o=null;try{o=new a(s,f)}catch{return null}return r.forEach(i=>{o.test(i)&&(!c||l.compare(i)===-1)&&(c=i,l=new t(c,f))}),c},_e}var Ge,jr;function Pt(){if(jr)return Ge;jr=1;const t=_(),a=j();return Ge=(r,s,f)=>{let c=null,l=null,o=null;try{o=new a(s,f)}catch{return null}return r.forEach(i=>{o.test(i)&&(!c||l.compare(i)===1)&&(c=i,l=new t(c,f))}),c},Ge}var Fe,Xr;function Ct(){if(Xr)return Fe;Xr=1;const t=_(),a=j(),n=Z();return Fe=(s,f)=>{s=new a(s,f);let c=new t("0.0.0");if(s.test(c)||(c=new t("0.0.0-0"),s.test(c)))return c;c=null;for(let l=0;l<s.set.length;++l){const o=s.set[l];let i=null;o.forEach(e=>{const u=new t(e.semver.version);switch(e.operator){case">":u.prerelease.length===0?u.patch++:u.prerelease.push(0),u.raw=u.format();case"":case">=":(!i||n(u,i))&&(i=u);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}}),i&&(!c||n(c,i))&&(c=i)}return c&&s.test(c)?c:null},Fe}var je,Br;function qt(){if(Br)return je;Br=1;const t=j();return je=(n,r)=>{try{return new t(n,r).range||"*"}catch{return null}},je}var Xe,Vr;function rr(){if(Vr)return Xe;Vr=1;const t=_(),a=J(),{ANY:n}=a,r=j(),s=Q(),f=Z(),c=Je(),l=er(),o=Qe();return Xe=(e,u,h,m)=>{e=new t(e,m),u=new r(u,m);let w,E,N,A,D;switch(h){case">":w=f,E=l,N=c,A=">",D=">=";break;case"<":w=c,E=o,N=f,A="<",D="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(s(e,u,m))return!1;for(let T=0;T<u.set.length;++T){const U=u.set[T];let G=null,C=null;if(U.forEach(x=>{x.semver===n&&(x=new a(">=0.0.0")),G=G||x,C=C||x,w(x.semver,G.semver,m)?G=x:N(x.semver,C.semver,m)&&(C=x)}),G.operator===A||G.operator===D||(!C.operator||C.operator===A)&&E(e,C.semver))return!1;if(C.operator===D&&N(e,C.semver))return!1}return!0},Xe}var Be,kr;function yt(){if(kr)return Be;kr=1;const t=rr();return Be=(n,r,s)=>t(n,r,">",s),Be}var Ve,Mr;function xt(){if(Mr)return Ve;Mr=1;const t=rr();return Ve=(n,r,s)=>t(n,r,"<",s),Ve}var ke,zr;function Dt(){if(zr)return ke;zr=1;const t=j();return ke=(n,r,s)=>(n=new t(n,s),r=new t(r,s),n.intersects(r,s)),ke}var Me,Hr;function Ut(){if(Hr)return Me;Hr=1;const t=Q(),a=F();return Me=(n,r,s)=>{const f=[];let c=null,l=null;const o=n.sort((h,m)=>a(h,m,s));for(const h of o)t(h,r,s)?(l=h,c||(c=h)):(l&&f.push([c,l]),l=null,c=null);c&&f.push([c,null]);const i=[];for(const[h,m]of f)h===m?i.push(h):!m&&h===o[0]?i.push("*"):m?h===o[0]?i.push(`<=${m}`):i.push(`${h} - ${m}`):i.push(`>=${h}`);const e=i.join(" || "),u=typeof r.raw=="string"?r.raw:String(r);return e.length<u.length?e:r},Me}var ze,Yr;function bt(){if(Yr)return ze;Yr=1;const t=j(),a=J(),{ANY:n}=a,r=Q(),s=F(),f=(u,h,m={})=>{if(u===h)return!0;u=new t(u,m),h=new t(h,m);let w=!1;e:for(const E of u.set){for(const N of h.set){const A=o(E,N,m);if(w=w||A!==null,A)continue e}if(w)return!1}return!0},c=[new a(">=0.0.0-0")],l=[new a(">=0.0.0")],o=(u,h,m)=>{if(u===h)return!0;if(u.length===1&&u[0].semver===n){if(h.length===1&&h[0].semver===n)return!0;m.includePrerelease?u=c:u=l}if(h.length===1&&h[0].semver===n){if(m.includePrerelease)return!0;h=l}const w=new Set;let E,N;for(const L of u)L.operator===">"||L.operator===">="?E=i(E,L,m):L.operator==="<"||L.operator==="<="?N=e(N,L,m):w.add(L.semver);if(w.size>1)return null;let A;if(E&&N){if(A=s(E.semver,N.semver,m),A>0)return null;if(A===0&&(E.operator!==">="||N.operator!=="<="))return null}for(const L of w){if(E&&!r(L,String(E),m)||N&&!r(L,String(N),m))return null;for(const B of h)if(!r(L,String(B),m))return!1;return!0}let D,T,U,G,C=N&&!m.includePrerelease&&N.semver.prerelease.length?N.semver:!1,x=E&&!m.includePrerelease&&E.semver.prerelease.length?E.semver:!1;C&&C.prerelease.length===1&&N.operator==="<"&&C.prerelease[0]===0&&(C=!1);for(const L of h){if(G=G||L.operator===">"||L.operator===">=",U=U||L.operator==="<"||L.operator==="<=",E){if(x&&L.semver.prerelease&&L.semver.prerelease.length&&L.semver.major===x.major&&L.semver.minor===x.minor&&L.semver.patch===x.patch&&(x=!1),L.operator===">"||L.operator===">="){if(D=i(E,L,m),D===L&&D!==E)return!1}else if(E.operator===">="&&!r(E.semver,String(L),m))return!1}if(N){if(C&&L.semver.prerelease&&L.semver.prerelease.length&&L.semver.major===C.major&&L.semver.minor===C.minor&&L.semver.patch===C.patch&&(C=!1),L.operator==="<"||L.operator==="<="){if(T=e(N,L,m),T===L&&T!==N)return!1}else if(N.operator==="<="&&!r(N.semver,String(L),m))return!1}if(!L.operator&&(N||E)&&A!==0)return!1}return!(E&&U&&!N&&A!==0||N&&G&&!E&&A!==0||x||C)},i=(u,h,m)=>{if(!u)return h;const w=s(u.semver,h.semver,m);return w>0?u:w<0||h.operator===">"&&u.operator===">="?h:u},e=(u,h,m)=>{if(!u)return h;const w=s(u.semver,h.semver,m);return w<0?u:w>0||h.operator==="<"&&u.operator==="<="?h:u};return ze=f,ze}var He,Wr;function _t(){if(Wr)return He;Wr=1;const t=M(),a=W(),n=_(),r=et(),s=X(),f=dt(),c=Et(),l=pt(),o=mt(),i=Rt(),e=It(),u=vt(),h=$t(),m=F(),w=St(),E=Lt(),N=Ze(),A=gt(),D=Nt(),T=Z(),U=Je(),G=rt(),C=tt(),x=Qe(),L=er(),B=st(),ee=wt(),re=J(),te=j(),se=Q(),p=At(),d=Tt(),v=Pt(),R=Ct(),$=qt(),I=rr(),S=yt(),O=xt(),g=Dt(),P=Ut(),b=bt();return He={parse:s,valid:f,clean:c,inc:l,diff:o,major:i,minor:e,patch:u,prerelease:h,compare:m,rcompare:w,compareLoose:E,compareBuild:N,sort:A,rsort:D,gt:T,lt:U,eq:G,neq:C,gte:x,lte:L,cmp:B,coerce:ee,Comparator:re,Range:te,satisfies:se,toComparators:p,maxSatisfying:d,minSatisfying:v,minVersion:R,validRange:$,outside:I,gtr:S,ltr:O,intersects:g,simplifyRange:P,subset:b,SemVer:n,re:t.re,src:t.src,tokens:t.t,SEMVER_SPEC_VERSION:a.SEMVER_SPEC_VERSION,RELEASE_TYPES:a.RELEASE_TYPES,compareIdentifiers:r.compareIdentifiers,rcompareIdentifiers:r.rcompareIdentifiers},He}var Gt=_t();const Kr=ut(Gt);var q;(function(t){t.blue="blue",t.nanoS="nanoS",t.nanoSP="nanoSP",t.nanoX="nanoX",t.stax="stax",t.europa="europa",t.apex="apex"})(q||(q={}));const Ye={[q.blue]:{id:q.blue,productName:"Ledger Blue",productIdMM:0,legacyUsbProductId:0,usbOnly:!0,memorySize:480*1024,masks:[822083584,822149120],getBlockSize:t=>4*1024},[q.nanoS]:{id:q.nanoS,productName:"Ledger Nano S",productIdMM:16,legacyUsbProductId:1,usbOnly:!0,memorySize:320*1024,masks:[823132160],getBlockSize:t=>Kr.lt(Kr.coerce(t)??"","2.0.0")?4*1024:2*1024},[q.nanoX]:{id:q.nanoX,productName:"Ledger Nano X",productIdMM:64,legacyUsbProductId:4,usbOnly:!1,memorySize:2*1024*1024,masks:[855638016],getBlockSize:t=>4*1024,bluetoothSpec:[{serviceUuid:"13d63400-2c97-0004-0000-4c6564676572",notifyUuid:"13d63400-2c97-0004-0001-4c6564676572",writeUuid:"13d63400-2c97-0004-0002-4c6564676572",writeCmdUuid:"13d63400-2c97-0004-0003-4c6564676572"}]},[q.nanoSP]:{id:q.nanoSP,productName:"Ledger Nano S Plus",productIdMM:80,legacyUsbProductId:5,usbOnly:!0,memorySize:1533*1024,masks:[856686592],getBlockSize:t=>32},[q.apex]:{id:q.apex,productName:"Ledger Nano Gen5",productIdMM:128,legacyUsbProductId:8,usbOnly:!1,memorySize:1533*1024,masks:[859832320],getBlockSize:t=>32,bluetoothSpec:[{serviceUuid:"13d63400-2c97-8004-0000-4c6564676572",notifyUuid:"13d63400-2c97-8004-0001-4c6564676572",writeUuid:"13d63400-2c97-8004-0002-4c6564676572",writeCmdUuid:"13d63400-2c97-8004-0003-4c6564676572"}]},[q.stax]:{id:q.stax,productName:"Ledger Stax",productIdMM:96,legacyUsbProductId:6,usbOnly:!1,memorySize:1533*1024,masks:[857735168],getBlockSize:t=>32,bluetoothSpec:[{serviceUuid:"13d63400-2c97-6004-0000-4c6564676572",notifyUuid:"13d63400-2c97-6004-0001-4c6564676572",writeUuid:"13d63400-2c97-6004-0002-4c6564676572",writeCmdUuid:"13d63400-2c97-6004-0003-4c6564676572"}]},[q.europa]:{id:q.europa,productName:"Ledger Flex",productIdMM:112,legacyUsbProductId:7,usbOnly:!1,memorySize:1533*1024,masks:[858783744],getBlockSize:t=>32,bluetoothSpec:[{serviceUuid:"13d63400-2c97-3004-0000-4c6564676572",notifyUuid:"13d63400-2c97-3004-0001-4c6564676572",writeUuid:"13d63400-2c97-3004-0002-4c6564676572",writeCmdUuid:"13d63400-2c97-3004-0003-4c6564676572"}]}};q.blue,q.nanoS,q.nanoSP,q.nanoX,q.stax,q.europa;const Zr=Object.values(Ye),nt=11415,Jr=t=>{const a=Zr.find(s=>s.legacyUsbProductId===t);if(a)return a;const n=t>>8;return Zr.find(s=>s.productIdMM===n)},Ft=[],Qr={};for(const t in Ye){const a=Ye[t],{bluetoothSpec:n}=a;if(n)for(let r=0;r<n.length;r++){const s=n[r];Ft.push(s.serviceUuid),Qr[s.serviceUuid]=Qr[s.serviceUuid.replace(/-/g,"")]={deviceModel:a,...s}}}const jt=[{vendorId:nt}],Xt=()=>Promise.resolve(!!(window.navigator&&window.navigator.hid)),Y=()=>{const{hid:t}=navigator;if(!t)throw new k("navigator.hid is not supported","HIDNotSupported");return t};async function it(){const t=await Y().requestDevice({filters:jt});return Array.isArray(t)?t:[t]}async function We(){return(await Y().getDevices()).filter(a=>a.vendorId===nt)}async function Bt(){const t=await We();return t.length>0?t[0]:(await it())[0]}class H extends at{device;deviceModel;channel=Math.floor(Math.random()*65535);packetSize=64;constructor(a){super(),this.device=a,this.deviceModel=typeof a.productId=="number"?Jr(a.productId):void 0,a.addEventListener("inputreport",this.onInputReport)}inputs=[];inputCallback;read=()=>this.inputs.length?Promise.resolve(this.inputs.shift()):new Promise(a=>{this.inputCallback=a});onInputReport=a=>{const n=Buffer.from(a.data.buffer);this.inputCallback?(this.inputCallback(n),this.inputCallback=null):this.inputs.push(n)};static isSupported=Xt;static list=We;static listen=a=>{let n=!1;Bt().then(s=>{if(!s)a.error(new tr("Access denied to use Ledger device"));else if(!n){const f=typeof s.productId=="number"?Jr(s.productId):void 0;a.next({type:"add",descriptor:s,deviceModel:f}),a.complete()}},s=>{a.error(new tr(s.message))});function r(){n=!0}return{unsubscribe:r}};static async request(){const[a]=await it();return H.open(a)}static async openConnected(){const a=await We();return a.length===0?null:H.open(a[0])}static async open(a){await a.open();const n=new H(a),r=s=>{a===s.device&&(Y().removeEventListener("disconnect",r),n._emitDisconnect(new ct))};return Y().addEventListener("disconnect",r),n}_disconnectEmitted=!1;_emitDisconnect=a=>{this._disconnectEmitted||(this._disconnectEmitted=!0,this.emit("disconnect",a))};async close(){await this.exchangeBusyPromise,this.device.removeEventListener("inputreport",this.onInputReport),await this.device.close()}exchange=async a=>await this.exchangeAtomicImpl(async()=>{const{channel:r,packetSize:s}=this;sr("apdu","=> "+a.toString("hex"));const f=ht(r,s),c=f.makeBlocks(a);for(let i=0;i<c.length;i++)await this.device.sendReport(0,c[i]);let l,o;for(;!(l=f.getReducedResult(o));)try{const i=await this.read();o=f.reduceResponse(o,i)}catch(i){if(i instanceof k&&i.id==="InvalidChannel")continue;throw i}return sr("apdu","<= "+l.toString("hex")),l}).catch(r=>{throw r&&r.message&&r.message.includes("write")?(this._emitDisconnect(r),new ot(r.message)):r});setScrambleKey(){}}export{H as default};
1
+ import{t as k,u as at,v as tr,w as sr,D as ot,x as ct}from"./vendor-web3-CPVMttss.js";import{g as ut}from"./vendor-dayjs-CzbnksQQ.js";import"./vendor-vue-1w_NBnjl.js";const nr=5;function lt(t){const a=Buffer.alloc(2);return a.writeUInt16BE(t,0),a}const ft={data:Buffer.alloc(0),dataLength:0,sequence:0},ht=(t,a)=>({makeBlocks(n){let r=Buffer.concat([lt(n.length),n]);const s=a-5,f=Math.ceil(r.length/s);r=Buffer.concat([r,Buffer.alloc(f*s-r.length+1).fill(0)]);const c=[];for(let l=0;l<f;l++){const o=Buffer.alloc(5);o.writeUInt16BE(t,0),o.writeUInt8(nr,2),o.writeUInt16BE(l,3);const i=r.slice(l*s,(l+1)*s);c.push(Buffer.concat([o,i]))}return c},reduceResponse(n,r){let{data:s,dataLength:f,sequence:c}=n||ft;if(r.readUInt16BE(0)!==t)throw new k("Invalid channel","InvalidChannel");if(r.readUInt8(2)!==nr)throw new k("Invalid tag","InvalidTag");if(r.readUInt16BE(3)!==c)throw new k("Invalid sequence","InvalidSequence");n||(f=r.readUInt16BE(5)),c++;const l=r.slice(n?5:7);return s=Buffer.concat([s,l]),s.length>f&&(s=s.slice(0,f)),{data:s,dataLength:f,sequence:c}},getReducedResult(n){if(n&&n.dataLength===n.data.length)return n.data}});var z={exports:{}},ne,ir;function W(){if(ir)return ne;ir=1;const t="2.0.0",a=256,n=Number.MAX_SAFE_INTEGER||9007199254740991,r=16,s=a-6;return ne={MAX_LENGTH:a,MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:s,MAX_SAFE_INTEGER:n,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:t,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},ne}var ie,ar;function K(){if(ar)return ie;ar=1;var t={};return ie=typeof process=="object"&&t&&t.NODE_DEBUG&&/\bsemver\b/i.test(t.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{},ie}var or;function M(){return or||(or=1,function(t,a){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:s}=W(),f=K();a=t.exports={};const c=a.re=[],l=a.safeRe=[],o=a.src=[],i=a.safeSrc=[],e=a.t={};let u=0;const h="[a-zA-Z0-9-]",m=[["\\s",1],["\\d",s],[h,r]],w=N=>{for(const[A,D]of m)N=N.split(`${A}*`).join(`${A}{0,${D}}`).split(`${A}+`).join(`${A}{1,${D}}`);return N},E=(N,A,D)=>{const T=w(A),U=u++;f(N,U,A),e[N]=U,o[U]=A,i[U]=T,c[U]=new RegExp(A,D?"g":void 0),l[U]=new RegExp(T,D?"g":void 0)};E("NUMERICIDENTIFIER","0|[1-9]\\d*"),E("NUMERICIDENTIFIERLOOSE","\\d+"),E("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${h}*`),E("MAINVERSION",`(${o[e.NUMERICIDENTIFIER]})\\.(${o[e.NUMERICIDENTIFIER]})\\.(${o[e.NUMERICIDENTIFIER]})`),E("MAINVERSIONLOOSE",`(${o[e.NUMERICIDENTIFIERLOOSE]})\\.(${o[e.NUMERICIDENTIFIERLOOSE]})\\.(${o[e.NUMERICIDENTIFIERLOOSE]})`),E("PRERELEASEIDENTIFIER",`(?:${o[e.NONNUMERICIDENTIFIER]}|${o[e.NUMERICIDENTIFIER]})`),E("PRERELEASEIDENTIFIERLOOSE",`(?:${o[e.NONNUMERICIDENTIFIER]}|${o[e.NUMERICIDENTIFIERLOOSE]})`),E("PRERELEASE",`(?:-(${o[e.PRERELEASEIDENTIFIER]}(?:\\.${o[e.PRERELEASEIDENTIFIER]})*))`),E("PRERELEASELOOSE",`(?:-?(${o[e.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${o[e.PRERELEASEIDENTIFIERLOOSE]})*))`),E("BUILDIDENTIFIER",`${h}+`),E("BUILD",`(?:\\+(${o[e.BUILDIDENTIFIER]}(?:\\.${o[e.BUILDIDENTIFIER]})*))`),E("FULLPLAIN",`v?${o[e.MAINVERSION]}${o[e.PRERELEASE]}?${o[e.BUILD]}?`),E("FULL",`^${o[e.FULLPLAIN]}$`),E("LOOSEPLAIN",`[v=\\s]*${o[e.MAINVERSIONLOOSE]}${o[e.PRERELEASELOOSE]}?${o[e.BUILD]}?`),E("LOOSE",`^${o[e.LOOSEPLAIN]}$`),E("GTLT","((?:<|>)?=?)"),E("XRANGEIDENTIFIERLOOSE",`${o[e.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),E("XRANGEIDENTIFIER",`${o[e.NUMERICIDENTIFIER]}|x|X|\\*`),E("XRANGEPLAIN",`[v=\\s]*(${o[e.XRANGEIDENTIFIER]})(?:\\.(${o[e.XRANGEIDENTIFIER]})(?:\\.(${o[e.XRANGEIDENTIFIER]})(?:${o[e.PRERELEASE]})?${o[e.BUILD]}?)?)?`),E("XRANGEPLAINLOOSE",`[v=\\s]*(${o[e.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[e.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[e.XRANGEIDENTIFIERLOOSE]})(?:${o[e.PRERELEASELOOSE]})?${o[e.BUILD]}?)?)?`),E("XRANGE",`^${o[e.GTLT]}\\s*${o[e.XRANGEPLAIN]}$`),E("XRANGELOOSE",`^${o[e.GTLT]}\\s*${o[e.XRANGEPLAINLOOSE]}$`),E("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),E("COERCE",`${o[e.COERCEPLAIN]}(?:$|[^\\d])`),E("COERCEFULL",o[e.COERCEPLAIN]+`(?:${o[e.PRERELEASE]})?(?:${o[e.BUILD]})?(?:$|[^\\d])`),E("COERCERTL",o[e.COERCE],!0),E("COERCERTLFULL",o[e.COERCEFULL],!0),E("LONETILDE","(?:~>?)"),E("TILDETRIM",`(\\s*)${o[e.LONETILDE]}\\s+`,!0),a.tildeTrimReplace="$1~",E("TILDE",`^${o[e.LONETILDE]}${o[e.XRANGEPLAIN]}$`),E("TILDELOOSE",`^${o[e.LONETILDE]}${o[e.XRANGEPLAINLOOSE]}$`),E("LONECARET","(?:\\^)"),E("CARETTRIM",`(\\s*)${o[e.LONECARET]}\\s+`,!0),a.caretTrimReplace="$1^",E("CARET",`^${o[e.LONECARET]}${o[e.XRANGEPLAIN]}$`),E("CARETLOOSE",`^${o[e.LONECARET]}${o[e.XRANGEPLAINLOOSE]}$`),E("COMPARATORLOOSE",`^${o[e.GTLT]}\\s*(${o[e.LOOSEPLAIN]})$|^$`),E("COMPARATOR",`^${o[e.GTLT]}\\s*(${o[e.FULLPLAIN]})$|^$`),E("COMPARATORTRIM",`(\\s*)${o[e.GTLT]}\\s*(${o[e.LOOSEPLAIN]}|${o[e.XRANGEPLAIN]})`,!0),a.comparatorTrimReplace="$1$2$3",E("HYPHENRANGE",`^\\s*(${o[e.XRANGEPLAIN]})\\s+-\\s+(${o[e.XRANGEPLAIN]})\\s*$`),E("HYPHENRANGELOOSE",`^\\s*(${o[e.XRANGEPLAINLOOSE]})\\s+-\\s+(${o[e.XRANGEPLAINLOOSE]})\\s*$`),E("STAR","(<|>)?=?\\s*\\*"),E("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),E("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(z,z.exports)),z.exports}var ae,cr;function Ke(){if(cr)return ae;cr=1;const t=Object.freeze({loose:!0}),a=Object.freeze({});return ae=r=>r?typeof r!="object"?t:r:a,ae}var oe,ur;function et(){if(ur)return oe;ur=1;const t=/^[0-9]+$/,a=(r,s)=>{const f=t.test(r),c=t.test(s);return f&&c&&(r=+r,s=+s),r===s?0:f&&!c?-1:c&&!f?1:r<s?-1:1};return oe={compareIdentifiers:a,rcompareIdentifiers:(r,s)=>a(s,r)},oe}var ce,lr;function _(){if(lr)return ce;lr=1;const t=K(),{MAX_LENGTH:a,MAX_SAFE_INTEGER:n}=W(),{safeRe:r,t:s}=M(),f=Ke(),{compareIdentifiers:c}=et();class l{constructor(i,e){if(e=f(e),i instanceof l){if(i.loose===!!e.loose&&i.includePrerelease===!!e.includePrerelease)return i;i=i.version}else if(typeof i!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof i}".`);if(i.length>a)throw new TypeError(`version is longer than ${a} characters`);t("SemVer",i,e),this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease;const u=i.trim().match(e.loose?r[s.LOOSE]:r[s.FULL]);if(!u)throw new TypeError(`Invalid Version: ${i}`);if(this.raw=i,this.major=+u[1],this.minor=+u[2],this.patch=+u[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");u[4]?this.prerelease=u[4].split(".").map(h=>{if(/^[0-9]+$/.test(h)){const m=+h;if(m>=0&&m<n)return m}return h}):this.prerelease=[],this.build=u[5]?u[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(i){if(t("SemVer.compare",this.version,this.options,i),!(i instanceof l)){if(typeof i=="string"&&i===this.version)return 0;i=new l(i,this.options)}return i.version===this.version?0:this.compareMain(i)||this.comparePre(i)}compareMain(i){return i instanceof l||(i=new l(i,this.options)),c(this.major,i.major)||c(this.minor,i.minor)||c(this.patch,i.patch)}comparePre(i){if(i instanceof l||(i=new l(i,this.options)),this.prerelease.length&&!i.prerelease.length)return-1;if(!this.prerelease.length&&i.prerelease.length)return 1;if(!this.prerelease.length&&!i.prerelease.length)return 0;let e=0;do{const u=this.prerelease[e],h=i.prerelease[e];if(t("prerelease compare",e,u,h),u===void 0&&h===void 0)return 0;if(h===void 0)return 1;if(u===void 0)return-1;if(u===h)continue;return c(u,h)}while(++e)}compareBuild(i){i instanceof l||(i=new l(i,this.options));let e=0;do{const u=this.build[e],h=i.build[e];if(t("build compare",e,u,h),u===void 0&&h===void 0)return 0;if(h===void 0)return 1;if(u===void 0)return-1;if(u===h)continue;return c(u,h)}while(++e)}inc(i,e,u){if(i.startsWith("pre")){if(!e&&u===!1)throw new Error("invalid increment argument: identifier is empty");if(e){const h=`-${e}`.match(this.options.loose?r[s.PRERELEASELOOSE]:r[s.PRERELEASE]);if(!h||h[1]!==e)throw new Error(`invalid identifier: ${e}`)}}switch(i){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",e,u);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",e,u);break;case"prepatch":this.prerelease.length=0,this.inc("patch",e,u),this.inc("pre",e,u);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",e,u),this.inc("pre",e,u);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const h=Number(u)?1:0;if(this.prerelease.length===0)this.prerelease=[h];else{let m=this.prerelease.length;for(;--m>=0;)typeof this.prerelease[m]=="number"&&(this.prerelease[m]++,m=-2);if(m===-1){if(e===this.prerelease.join(".")&&u===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(h)}}if(e){let m=[e,h];u===!1&&(m=[e]),c(this.prerelease[0],e)===0?isNaN(this.prerelease[1])&&(this.prerelease=m):this.prerelease=m}break}default:throw new Error(`invalid increment argument: ${i}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return ce=l,ce}var ue,fr;function X(){if(fr)return ue;fr=1;const t=_();return ue=(n,r,s=!1)=>{if(n instanceof t)return n;try{return new t(n,r)}catch(f){if(!s)return null;throw f}},ue}var le,hr;function dt(){if(hr)return le;hr=1;const t=X();return le=(n,r)=>{const s=t(n,r);return s?s.version:null},le}var fe,dr;function Et(){if(dr)return fe;dr=1;const t=X();return fe=(n,r)=>{const s=t(n.trim().replace(/^[=v]+/,""),r);return s?s.version:null},fe}var he,Er;function pt(){if(Er)return he;Er=1;const t=_();return he=(n,r,s,f,c)=>{typeof s=="string"&&(c=f,f=s,s=void 0);try{return new t(n instanceof t?n.version:n,s).inc(r,f,c).version}catch{return null}},he}var de,pr;function mt(){if(pr)return de;pr=1;const t=X();return de=(n,r)=>{const s=t(n,null,!0),f=t(r,null,!0),c=s.compare(f);if(c===0)return null;const l=c>0,o=l?s:f,i=l?f:s,e=!!o.prerelease.length;if(!!i.prerelease.length&&!e){if(!i.patch&&!i.minor)return"major";if(i.compareMain(o)===0)return i.minor&&!i.patch?"minor":"patch"}const h=e?"pre":"";return s.major!==f.major?h+"major":s.minor!==f.minor?h+"minor":s.patch!==f.patch?h+"patch":"prerelease"},de}var Ee,mr;function Rt(){if(mr)return Ee;mr=1;const t=_();return Ee=(n,r)=>new t(n,r).major,Ee}var pe,Rr;function It(){if(Rr)return pe;Rr=1;const t=_();return pe=(n,r)=>new t(n,r).minor,pe}var me,Ir;function vt(){if(Ir)return me;Ir=1;const t=_();return me=(n,r)=>new t(n,r).patch,me}var Re,vr;function $t(){if(vr)return Re;vr=1;const t=X();return Re=(n,r)=>{const s=t(n,r);return s&&s.prerelease.length?s.prerelease:null},Re}var Ie,$r;function F(){if($r)return Ie;$r=1;const t=_();return Ie=(n,r,s)=>new t(n,s).compare(new t(r,s)),Ie}var ve,Sr;function St(){if(Sr)return ve;Sr=1;const t=F();return ve=(n,r,s)=>t(r,n,s),ve}var $e,Lr;function Lt(){if(Lr)return $e;Lr=1;const t=F();return $e=(n,r)=>t(n,r,!0),$e}var Se,gr;function Ze(){if(gr)return Se;gr=1;const t=_();return Se=(n,r,s)=>{const f=new t(n,s),c=new t(r,s);return f.compare(c)||f.compareBuild(c)},Se}var Le,Nr;function gt(){if(Nr)return Le;Nr=1;const t=Ze();return Le=(n,r)=>n.sort((s,f)=>t(s,f,r)),Le}var ge,wr;function Nt(){if(wr)return ge;wr=1;const t=Ze();return ge=(n,r)=>n.sort((s,f)=>t(f,s,r)),ge}var Ne,Or;function Z(){if(Or)return Ne;Or=1;const t=F();return Ne=(n,r,s)=>t(n,r,s)>0,Ne}var we,Ar;function Je(){if(Ar)return we;Ar=1;const t=F();return we=(n,r,s)=>t(n,r,s)<0,we}var Oe,Tr;function rt(){if(Tr)return Oe;Tr=1;const t=F();return Oe=(n,r,s)=>t(n,r,s)===0,Oe}var Ae,Pr;function tt(){if(Pr)return Ae;Pr=1;const t=F();return Ae=(n,r,s)=>t(n,r,s)!==0,Ae}var Te,Cr;function Qe(){if(Cr)return Te;Cr=1;const t=F();return Te=(n,r,s)=>t(n,r,s)>=0,Te}var Pe,qr;function er(){if(qr)return Pe;qr=1;const t=F();return Pe=(n,r,s)=>t(n,r,s)<=0,Pe}var Ce,yr;function st(){if(yr)return Ce;yr=1;const t=rt(),a=tt(),n=Z(),r=Qe(),s=Je(),f=er();return Ce=(l,o,i,e)=>{switch(o){case"===":return typeof l=="object"&&(l=l.version),typeof i=="object"&&(i=i.version),l===i;case"!==":return typeof l=="object"&&(l=l.version),typeof i=="object"&&(i=i.version),l!==i;case"":case"=":case"==":return t(l,i,e);case"!=":return a(l,i,e);case">":return n(l,i,e);case">=":return r(l,i,e);case"<":return s(l,i,e);case"<=":return f(l,i,e);default:throw new TypeError(`Invalid operator: ${o}`)}},Ce}var qe,xr;function wt(){if(xr)return qe;xr=1;const t=_(),a=X(),{safeRe:n,t:r}=M();return qe=(f,c)=>{if(f instanceof t)return f;if(typeof f=="number"&&(f=String(f)),typeof f!="string")return null;c=c||{};let l=null;if(!c.rtl)l=f.match(c.includePrerelease?n[r.COERCEFULL]:n[r.COERCE]);else{const m=c.includePrerelease?n[r.COERCERTLFULL]:n[r.COERCERTL];let w;for(;(w=m.exec(f))&&(!l||l.index+l[0].length!==f.length);)(!l||w.index+w[0].length!==l.index+l[0].length)&&(l=w),m.lastIndex=w.index+w[1].length+w[2].length;m.lastIndex=-1}if(l===null)return null;const o=l[2],i=l[3]||"0",e=l[4]||"0",u=c.includePrerelease&&l[5]?`-${l[5]}`:"",h=c.includePrerelease&&l[6]?`+${l[6]}`:"";return a(`${o}.${i}.${e}${u}${h}`,c)},qe}var ye,Dr;function Ot(){if(Dr)return ye;Dr=1;class t{constructor(){this.max=1e3,this.map=new Map}get(n){const r=this.map.get(n);if(r!==void 0)return this.map.delete(n),this.map.set(n,r),r}delete(n){return this.map.delete(n)}set(n,r){if(!this.delete(n)&&r!==void 0){if(this.map.size>=this.max){const f=this.map.keys().next().value;this.delete(f)}this.map.set(n,r)}return this}}return ye=t,ye}var xe,Ur;function j(){if(Ur)return xe;Ur=1;const t=/\s+/g;class a{constructor(d,v){if(v=s(v),d instanceof a)return d.loose===!!v.loose&&d.includePrerelease===!!v.includePrerelease?d:new a(d.raw,v);if(d instanceof f)return this.raw=d.value,this.set=[[d]],this.formatted=void 0,this;if(this.options=v,this.loose=!!v.loose,this.includePrerelease=!!v.includePrerelease,this.raw=d.trim().replace(t," "),this.set=this.raw.split("||").map(R=>this.parseRange(R.trim())).filter(R=>R.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const R=this.set[0];if(this.set=this.set.filter($=>!E($[0])),this.set.length===0)this.set=[R];else if(this.set.length>1){for(const $ of this.set)if($.length===1&&N($[0])){this.set=[$];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let d=0;d<this.set.length;d++){d>0&&(this.formatted+="||");const v=this.set[d];for(let R=0;R<v.length;R++)R>0&&(this.formatted+=" "),this.formatted+=v[R].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(d){const R=((this.options.includePrerelease&&m)|(this.options.loose&&w))+":"+d,$=r.get(R);if($)return $;const I=this.options.loose,S=I?o[i.HYPHENRANGELOOSE]:o[i.HYPHENRANGE];d=d.replace(S,te(this.options.includePrerelease)),c("hyphen replace",d),d=d.replace(o[i.COMPARATORTRIM],e),c("comparator trim",d),d=d.replace(o[i.TILDETRIM],u),c("tilde trim",d),d=d.replace(o[i.CARETTRIM],h),c("caret trim",d);let O=d.split(" ").map(y=>D(y,this.options)).join(" ").split(/\s+/).map(y=>re(y,this.options));I&&(O=O.filter(y=>(c("loose invalid filter",y,this.options),!!y.match(o[i.COMPARATORLOOSE])))),c("range list",O);const g=new Map,P=O.map(y=>new f(y,this.options));for(const y of P){if(E(y))return[y];g.set(y.value,y)}g.size>1&&g.has("")&&g.delete("");const b=[...g.values()];return r.set(R,b),b}intersects(d,v){if(!(d instanceof a))throw new TypeError("a Range is required");return this.set.some(R=>A(R,v)&&d.set.some($=>A($,v)&&R.every(I=>$.every(S=>I.intersects(S,v)))))}test(d){if(!d)return!1;if(typeof d=="string")try{d=new l(d,this.options)}catch{return!1}for(let v=0;v<this.set.length;v++)if(se(this.set[v],d,this.options))return!0;return!1}}xe=a;const n=Ot(),r=new n,s=Ke(),f=J(),c=K(),l=_(),{safeRe:o,t:i,comparatorTrimReplace:e,tildeTrimReplace:u,caretTrimReplace:h}=M(),{FLAG_INCLUDE_PRERELEASE:m,FLAG_LOOSE:w}=W(),E=p=>p.value==="<0.0.0-0",N=p=>p.value==="",A=(p,d)=>{let v=!0;const R=p.slice();let $=R.pop();for(;v&&R.length;)v=R.every(I=>$.intersects(I,d)),$=R.pop();return v},D=(p,d)=>(c("comp",p,d),p=C(p,d),c("caret",p),p=U(p,d),c("tildes",p),p=L(p,d),c("xrange",p),p=ee(p,d),c("stars",p),p),T=p=>!p||p.toLowerCase()==="x"||p==="*",U=(p,d)=>p.trim().split(/\s+/).map(v=>G(v,d)).join(" "),G=(p,d)=>{const v=d.loose?o[i.TILDELOOSE]:o[i.TILDE];return p.replace(v,(R,$,I,S,O)=>{c("tilde",p,R,$,I,S,O);let g;return T($)?g="":T(I)?g=`>=${$}.0.0 <${+$+1}.0.0-0`:T(S)?g=`>=${$}.${I}.0 <${$}.${+I+1}.0-0`:O?(c("replaceTilde pr",O),g=`>=${$}.${I}.${S}-${O} <${$}.${+I+1}.0-0`):g=`>=${$}.${I}.${S} <${$}.${+I+1}.0-0`,c("tilde return",g),g})},C=(p,d)=>p.trim().split(/\s+/).map(v=>x(v,d)).join(" "),x=(p,d)=>{c("caret",p,d);const v=d.loose?o[i.CARETLOOSE]:o[i.CARET],R=d.includePrerelease?"-0":"";return p.replace(v,($,I,S,O,g)=>{c("caret",p,$,I,S,O,g);let P;return T(I)?P="":T(S)?P=`>=${I}.0.0${R} <${+I+1}.0.0-0`:T(O)?I==="0"?P=`>=${I}.${S}.0${R} <${I}.${+S+1}.0-0`:P=`>=${I}.${S}.0${R} <${+I+1}.0.0-0`:g?(c("replaceCaret pr",g),I==="0"?S==="0"?P=`>=${I}.${S}.${O}-${g} <${I}.${S}.${+O+1}-0`:P=`>=${I}.${S}.${O}-${g} <${I}.${+S+1}.0-0`:P=`>=${I}.${S}.${O}-${g} <${+I+1}.0.0-0`):(c("no pr"),I==="0"?S==="0"?P=`>=${I}.${S}.${O}${R} <${I}.${S}.${+O+1}-0`:P=`>=${I}.${S}.${O}${R} <${I}.${+S+1}.0-0`:P=`>=${I}.${S}.${O} <${+I+1}.0.0-0`),c("caret return",P),P})},L=(p,d)=>(c("replaceXRanges",p,d),p.split(/\s+/).map(v=>B(v,d)).join(" ")),B=(p,d)=>{p=p.trim();const v=d.loose?o[i.XRANGELOOSE]:o[i.XRANGE];return p.replace(v,(R,$,I,S,O,g)=>{c("xRange",p,R,$,I,S,O,g);const P=T(I),b=P||T(S),y=b||T(O),V=y;return $==="="&&V&&($=""),g=d.includePrerelease?"-0":"",P?$===">"||$==="<"?R="<0.0.0-0":R="*":$&&V?(b&&(S=0),O=0,$===">"?($=">=",b?(I=+I+1,S=0,O=0):(S=+S+1,O=0)):$==="<="&&($="<",b?I=+I+1:S=+S+1),$==="<"&&(g="-0"),R=`${$+I}.${S}.${O}${g}`):b?R=`>=${I}.0.0${g} <${+I+1}.0.0-0`:y&&(R=`>=${I}.${S}.0${g} <${I}.${+S+1}.0-0`),c("xRange return",R),R})},ee=(p,d)=>(c("replaceStars",p,d),p.trim().replace(o[i.STAR],"")),re=(p,d)=>(c("replaceGTE0",p,d),p.trim().replace(o[d.includePrerelease?i.GTE0PRE:i.GTE0],"")),te=p=>(d,v,R,$,I,S,O,g,P,b,y,V)=>(T(R)?v="":T($)?v=`>=${R}.0.0${p?"-0":""}`:T(I)?v=`>=${R}.${$}.0${p?"-0":""}`:S?v=`>=${v}`:v=`>=${v}${p?"-0":""}`,T(P)?g="":T(b)?g=`<${+P+1}.0.0-0`:T(y)?g=`<${P}.${+b+1}.0-0`:V?g=`<=${P}.${b}.${y}-${V}`:p?g=`<${P}.${b}.${+y+1}-0`:g=`<=${g}`,`${v} ${g}`.trim()),se=(p,d,v)=>{for(let R=0;R<p.length;R++)if(!p[R].test(d))return!1;if(d.prerelease.length&&!v.includePrerelease){for(let R=0;R<p.length;R++)if(c(p[R].semver),p[R].semver!==f.ANY&&p[R].semver.prerelease.length>0){const $=p[R].semver;if($.major===d.major&&$.minor===d.minor&&$.patch===d.patch)return!0}return!1}return!0};return xe}var De,br;function J(){if(br)return De;br=1;const t=Symbol("SemVer ANY");class a{static get ANY(){return t}constructor(e,u){if(u=n(u),e instanceof a){if(e.loose===!!u.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),c("comparator",e,u),this.options=u,this.loose=!!u.loose,this.parse(e),this.semver===t?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(e){const u=this.options.loose?r[s.COMPARATORLOOSE]:r[s.COMPARATOR],h=e.match(u);if(!h)throw new TypeError(`Invalid comparator: ${e}`);this.operator=h[1]!==void 0?h[1]:"",this.operator==="="&&(this.operator=""),h[2]?this.semver=new l(h[2],this.options.loose):this.semver=t}toString(){return this.value}test(e){if(c("Comparator.test",e,this.options.loose),this.semver===t||e===t)return!0;if(typeof e=="string")try{e=new l(e,this.options)}catch{return!1}return f(e,this.operator,this.semver,this.options)}intersects(e,u){if(!(e instanceof a))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new o(e.value,u).test(this.value):e.operator===""?e.value===""?!0:new o(this.value,u).test(e.semver):(u=n(u),u.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!u.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||f(this.semver,"<",e.semver,u)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||f(this.semver,">",e.semver,u)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}De=a;const n=Ke(),{safeRe:r,t:s}=M(),f=st(),c=K(),l=_(),o=j();return De}var Ue,_r;function Q(){if(_r)return Ue;_r=1;const t=j();return Ue=(n,r,s)=>{try{r=new t(r,s)}catch{return!1}return r.test(n)},Ue}var be,Gr;function At(){if(Gr)return be;Gr=1;const t=j();return be=(n,r)=>new t(n,r).set.map(s=>s.map(f=>f.value).join(" ").trim().split(" ")),be}var _e,Fr;function Tt(){if(Fr)return _e;Fr=1;const t=_(),a=j();return _e=(r,s,f)=>{let c=null,l=null,o=null;try{o=new a(s,f)}catch{return null}return r.forEach(i=>{o.test(i)&&(!c||l.compare(i)===-1)&&(c=i,l=new t(c,f))}),c},_e}var Ge,jr;function Pt(){if(jr)return Ge;jr=1;const t=_(),a=j();return Ge=(r,s,f)=>{let c=null,l=null,o=null;try{o=new a(s,f)}catch{return null}return r.forEach(i=>{o.test(i)&&(!c||l.compare(i)===1)&&(c=i,l=new t(c,f))}),c},Ge}var Fe,Xr;function Ct(){if(Xr)return Fe;Xr=1;const t=_(),a=j(),n=Z();return Fe=(s,f)=>{s=new a(s,f);let c=new t("0.0.0");if(s.test(c)||(c=new t("0.0.0-0"),s.test(c)))return c;c=null;for(let l=0;l<s.set.length;++l){const o=s.set[l];let i=null;o.forEach(e=>{const u=new t(e.semver.version);switch(e.operator){case">":u.prerelease.length===0?u.patch++:u.prerelease.push(0),u.raw=u.format();case"":case">=":(!i||n(u,i))&&(i=u);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}}),i&&(!c||n(c,i))&&(c=i)}return c&&s.test(c)?c:null},Fe}var je,Br;function qt(){if(Br)return je;Br=1;const t=j();return je=(n,r)=>{try{return new t(n,r).range||"*"}catch{return null}},je}var Xe,Vr;function rr(){if(Vr)return Xe;Vr=1;const t=_(),a=J(),{ANY:n}=a,r=j(),s=Q(),f=Z(),c=Je(),l=er(),o=Qe();return Xe=(e,u,h,m)=>{e=new t(e,m),u=new r(u,m);let w,E,N,A,D;switch(h){case">":w=f,E=l,N=c,A=">",D=">=";break;case"<":w=c,E=o,N=f,A="<",D="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(s(e,u,m))return!1;for(let T=0;T<u.set.length;++T){const U=u.set[T];let G=null,C=null;if(U.forEach(x=>{x.semver===n&&(x=new a(">=0.0.0")),G=G||x,C=C||x,w(x.semver,G.semver,m)?G=x:N(x.semver,C.semver,m)&&(C=x)}),G.operator===A||G.operator===D||(!C.operator||C.operator===A)&&E(e,C.semver))return!1;if(C.operator===D&&N(e,C.semver))return!1}return!0},Xe}var Be,kr;function yt(){if(kr)return Be;kr=1;const t=rr();return Be=(n,r,s)=>t(n,r,">",s),Be}var Ve,Mr;function xt(){if(Mr)return Ve;Mr=1;const t=rr();return Ve=(n,r,s)=>t(n,r,"<",s),Ve}var ke,zr;function Dt(){if(zr)return ke;zr=1;const t=j();return ke=(n,r,s)=>(n=new t(n,s),r=new t(r,s),n.intersects(r,s)),ke}var Me,Hr;function Ut(){if(Hr)return Me;Hr=1;const t=Q(),a=F();return Me=(n,r,s)=>{const f=[];let c=null,l=null;const o=n.sort((h,m)=>a(h,m,s));for(const h of o)t(h,r,s)?(l=h,c||(c=h)):(l&&f.push([c,l]),l=null,c=null);c&&f.push([c,null]);const i=[];for(const[h,m]of f)h===m?i.push(h):!m&&h===o[0]?i.push("*"):m?h===o[0]?i.push(`<=${m}`):i.push(`${h} - ${m}`):i.push(`>=${h}`);const e=i.join(" || "),u=typeof r.raw=="string"?r.raw:String(r);return e.length<u.length?e:r},Me}var ze,Yr;function bt(){if(Yr)return ze;Yr=1;const t=j(),a=J(),{ANY:n}=a,r=Q(),s=F(),f=(u,h,m={})=>{if(u===h)return!0;u=new t(u,m),h=new t(h,m);let w=!1;e:for(const E of u.set){for(const N of h.set){const A=o(E,N,m);if(w=w||A!==null,A)continue e}if(w)return!1}return!0},c=[new a(">=0.0.0-0")],l=[new a(">=0.0.0")],o=(u,h,m)=>{if(u===h)return!0;if(u.length===1&&u[0].semver===n){if(h.length===1&&h[0].semver===n)return!0;m.includePrerelease?u=c:u=l}if(h.length===1&&h[0].semver===n){if(m.includePrerelease)return!0;h=l}const w=new Set;let E,N;for(const L of u)L.operator===">"||L.operator===">="?E=i(E,L,m):L.operator==="<"||L.operator==="<="?N=e(N,L,m):w.add(L.semver);if(w.size>1)return null;let A;if(E&&N){if(A=s(E.semver,N.semver,m),A>0)return null;if(A===0&&(E.operator!==">="||N.operator!=="<="))return null}for(const L of w){if(E&&!r(L,String(E),m)||N&&!r(L,String(N),m))return null;for(const B of h)if(!r(L,String(B),m))return!1;return!0}let D,T,U,G,C=N&&!m.includePrerelease&&N.semver.prerelease.length?N.semver:!1,x=E&&!m.includePrerelease&&E.semver.prerelease.length?E.semver:!1;C&&C.prerelease.length===1&&N.operator==="<"&&C.prerelease[0]===0&&(C=!1);for(const L of h){if(G=G||L.operator===">"||L.operator===">=",U=U||L.operator==="<"||L.operator==="<=",E){if(x&&L.semver.prerelease&&L.semver.prerelease.length&&L.semver.major===x.major&&L.semver.minor===x.minor&&L.semver.patch===x.patch&&(x=!1),L.operator===">"||L.operator===">="){if(D=i(E,L,m),D===L&&D!==E)return!1}else if(E.operator===">="&&!r(E.semver,String(L),m))return!1}if(N){if(C&&L.semver.prerelease&&L.semver.prerelease.length&&L.semver.major===C.major&&L.semver.minor===C.minor&&L.semver.patch===C.patch&&(C=!1),L.operator==="<"||L.operator==="<="){if(T=e(N,L,m),T===L&&T!==N)return!1}else if(N.operator==="<="&&!r(N.semver,String(L),m))return!1}if(!L.operator&&(N||E)&&A!==0)return!1}return!(E&&U&&!N&&A!==0||N&&G&&!E&&A!==0||x||C)},i=(u,h,m)=>{if(!u)return h;const w=s(u.semver,h.semver,m);return w>0?u:w<0||h.operator===">"&&u.operator===">="?h:u},e=(u,h,m)=>{if(!u)return h;const w=s(u.semver,h.semver,m);return w<0?u:w>0||h.operator==="<"&&u.operator==="<="?h:u};return ze=f,ze}var He,Wr;function _t(){if(Wr)return He;Wr=1;const t=M(),a=W(),n=_(),r=et(),s=X(),f=dt(),c=Et(),l=pt(),o=mt(),i=Rt(),e=It(),u=vt(),h=$t(),m=F(),w=St(),E=Lt(),N=Ze(),A=gt(),D=Nt(),T=Z(),U=Je(),G=rt(),C=tt(),x=Qe(),L=er(),B=st(),ee=wt(),re=J(),te=j(),se=Q(),p=At(),d=Tt(),v=Pt(),R=Ct(),$=qt(),I=rr(),S=yt(),O=xt(),g=Dt(),P=Ut(),b=bt();return He={parse:s,valid:f,clean:c,inc:l,diff:o,major:i,minor:e,patch:u,prerelease:h,compare:m,rcompare:w,compareLoose:E,compareBuild:N,sort:A,rsort:D,gt:T,lt:U,eq:G,neq:C,gte:x,lte:L,cmp:B,coerce:ee,Comparator:re,Range:te,satisfies:se,toComparators:p,maxSatisfying:d,minSatisfying:v,minVersion:R,validRange:$,outside:I,gtr:S,ltr:O,intersects:g,simplifyRange:P,subset:b,SemVer:n,re:t.re,src:t.src,tokens:t.t,SEMVER_SPEC_VERSION:a.SEMVER_SPEC_VERSION,RELEASE_TYPES:a.RELEASE_TYPES,compareIdentifiers:r.compareIdentifiers,rcompareIdentifiers:r.rcompareIdentifiers},He}var Gt=_t();const Kr=ut(Gt);var q;(function(t){t.blue="blue",t.nanoS="nanoS",t.nanoSP="nanoSP",t.nanoX="nanoX",t.stax="stax",t.europa="europa",t.apex="apex"})(q||(q={}));const Ye={[q.blue]:{id:q.blue,productName:"Ledger Blue",productIdMM:0,legacyUsbProductId:0,usbOnly:!0,memorySize:480*1024,masks:[822083584,822149120],getBlockSize:t=>4*1024},[q.nanoS]:{id:q.nanoS,productName:"Ledger Nano S",productIdMM:16,legacyUsbProductId:1,usbOnly:!0,memorySize:320*1024,masks:[823132160],getBlockSize:t=>Kr.lt(Kr.coerce(t)??"","2.0.0")?4*1024:2*1024},[q.nanoX]:{id:q.nanoX,productName:"Ledger Nano X",productIdMM:64,legacyUsbProductId:4,usbOnly:!1,memorySize:2*1024*1024,masks:[855638016],getBlockSize:t=>4*1024,bluetoothSpec:[{serviceUuid:"13d63400-2c97-0004-0000-4c6564676572",notifyUuid:"13d63400-2c97-0004-0001-4c6564676572",writeUuid:"13d63400-2c97-0004-0002-4c6564676572",writeCmdUuid:"13d63400-2c97-0004-0003-4c6564676572"}]},[q.nanoSP]:{id:q.nanoSP,productName:"Ledger Nano S Plus",productIdMM:80,legacyUsbProductId:5,usbOnly:!0,memorySize:1533*1024,masks:[856686592],getBlockSize:t=>32},[q.apex]:{id:q.apex,productName:"Ledger Nano Gen5",productIdMM:128,legacyUsbProductId:8,usbOnly:!1,memorySize:1533*1024,masks:[859832320],getBlockSize:t=>32,bluetoothSpec:[{serviceUuid:"13d63400-2c97-8004-0000-4c6564676572",notifyUuid:"13d63400-2c97-8004-0001-4c6564676572",writeUuid:"13d63400-2c97-8004-0002-4c6564676572",writeCmdUuid:"13d63400-2c97-8004-0003-4c6564676572"}]},[q.stax]:{id:q.stax,productName:"Ledger Stax",productIdMM:96,legacyUsbProductId:6,usbOnly:!1,memorySize:1533*1024,masks:[857735168],getBlockSize:t=>32,bluetoothSpec:[{serviceUuid:"13d63400-2c97-6004-0000-4c6564676572",notifyUuid:"13d63400-2c97-6004-0001-4c6564676572",writeUuid:"13d63400-2c97-6004-0002-4c6564676572",writeCmdUuid:"13d63400-2c97-6004-0003-4c6564676572"}]},[q.europa]:{id:q.europa,productName:"Ledger Flex",productIdMM:112,legacyUsbProductId:7,usbOnly:!1,memorySize:1533*1024,masks:[858783744],getBlockSize:t=>32,bluetoothSpec:[{serviceUuid:"13d63400-2c97-3004-0000-4c6564676572",notifyUuid:"13d63400-2c97-3004-0001-4c6564676572",writeUuid:"13d63400-2c97-3004-0002-4c6564676572",writeCmdUuid:"13d63400-2c97-3004-0003-4c6564676572"}]}};q.blue,q.nanoS,q.nanoSP,q.nanoX,q.stax,q.europa;const Zr=Object.values(Ye),nt=11415,Jr=t=>{const a=Zr.find(s=>s.legacyUsbProductId===t);if(a)return a;const n=t>>8;return Zr.find(s=>s.productIdMM===n)},Ft=[],Qr={};for(const t in Ye){const a=Ye[t],{bluetoothSpec:n}=a;if(n)for(let r=0;r<n.length;r++){const s=n[r];Ft.push(s.serviceUuid),Qr[s.serviceUuid]=Qr[s.serviceUuid.replace(/-/g,"")]={deviceModel:a,...s}}}const jt=[{vendorId:nt}],Xt=()=>Promise.resolve(!!(window.navigator&&window.navigator.hid)),Y=()=>{const{hid:t}=navigator;if(!t)throw new k("navigator.hid is not supported","HIDNotSupported");return t};async function it(){const t=await Y().requestDevice({filters:jt});return Array.isArray(t)?t:[t]}async function We(){return(await Y().getDevices()).filter(a=>a.vendorId===nt)}async function Bt(){const t=await We();return t.length>0?t[0]:(await it())[0]}class H extends at{device;deviceModel;channel=Math.floor(Math.random()*65535);packetSize=64;constructor(a){super(),this.device=a,this.deviceModel=typeof a.productId=="number"?Jr(a.productId):void 0,a.addEventListener("inputreport",this.onInputReport)}inputs=[];inputCallback;read=()=>this.inputs.length?Promise.resolve(this.inputs.shift()):new Promise(a=>{this.inputCallback=a});onInputReport=a=>{const n=Buffer.from(a.data.buffer);this.inputCallback?(this.inputCallback(n),this.inputCallback=null):this.inputs.push(n)};static isSupported=Xt;static list=We;static listen=a=>{let n=!1;Bt().then(s=>{if(!s)a.error(new tr("Access denied to use Ledger device"));else if(!n){const f=typeof s.productId=="number"?Jr(s.productId):void 0;a.next({type:"add",descriptor:s,deviceModel:f}),a.complete()}},s=>{a.error(new tr(s.message))});function r(){n=!0}return{unsubscribe:r}};static async request(){const[a]=await it();return H.open(a)}static async openConnected(){const a=await We();return a.length===0?null:H.open(a[0])}static async open(a){await a.open();const n=new H(a),r=s=>{a===s.device&&(Y().removeEventListener("disconnect",r),n._emitDisconnect(new ct))};return Y().addEventListener("disconnect",r),n}_disconnectEmitted=!1;_emitDisconnect=a=>{this._disconnectEmitted||(this._disconnectEmitted=!0,this.emit("disconnect",a))};async close(){await this.exchangeBusyPromise,this.device.removeEventListener("inputreport",this.onInputReport),await this.device.close()}exchange=async a=>await this.exchangeAtomicImpl(async()=>{const{channel:r,packetSize:s}=this;sr("apdu","=> "+a.toString("hex"));const f=ht(r,s),c=f.makeBlocks(a);for(let i=0;i<c.length;i++)await this.device.sendReport(0,c[i]);let l,o;for(;!(l=f.getReducedResult(o));)try{const i=await this.read();o=f.reduceResponse(o,i)}catch(i){if(i instanceof k&&i.id==="InvalidChannel")continue;throw i}return sr("apdu","<= "+l.toString("hex")),l}).catch(r=>{throw r&&r.message&&r.message.includes("write")?(this._emitDisconnect(r),new ot(r.message)):r});setScrambleKey(){}}export{H as default};
@@ -1 +1 @@
1
- import{s as t}from"./vue-plyr-QZFBikSk.js";import{d as r,C as n,T as a,K as i,G as o,ai as p,D as c}from"./vendor-vue-1w_NBnjl.js";import{_ as l}from"./index-uXQ32ATB.js";const d=r({name:"VideoPlayer",components:{VuePlyr:t},props:{src:{type:String,required:!0},options:{type:Object,required:!1,default:()=>({})}},data(){return{mergedOptions:{controls:["play-large","play","progress","current-time","mute","volume","captions","settings","pip","fullscreen"],iconUrl:"https://cdn.acedata.cloud/7jq4t0.svg",quality:{default:"1080p",...this.options.quality},...this.options}}}}),u={class:"video max-w-[800px] max-h-[450px] rounded-[15px] overflow-hidden"},m={controls:"",crossorigin:"anonymous",playsinline:"",class:"w-full h-full aspect-[16/9]"},_=["src"];function f(e,y,h,v,g,x){const s=p("vue-plyr");return c(),n("div",u,[a(s,{options:e.mergedOptions},{default:i(()=>[o("video",m,[o("source",{size:"1080",src:e.src,type:"video/mp4"},null,8,_)])]),_:1},8,["options"])])}const C=l(d,[["render",f]]);export{C as V};
1
+ import{s as t}from"./vue-plyr-QZFBikSk.js";import{d as r,C as n,T as a,K as i,G as o,ai as p,D as c}from"./vendor-vue-1w_NBnjl.js";import{_ as l}from"./index-CJUWpJze.js";const d=r({name:"VideoPlayer",components:{VuePlyr:t},props:{src:{type:String,required:!0},options:{type:Object,required:!1,default:()=>({})}},data(){return{mergedOptions:{controls:["play-large","play","progress","current-time","mute","volume","captions","settings","pip","fullscreen"],iconUrl:"https://cdn.acedata.cloud/7jq4t0.svg",quality:{default:"1080p",...this.options.quality},...this.options}}}}),u={class:"video max-w-[800px] max-h-[450px] rounded-[15px] overflow-hidden"},m={controls:"",crossorigin:"anonymous",playsinline:"",class:"w-full h-full aspect-[16/9]"},_=["src"];function f(e,y,h,v,g,x){const s=p("vue-plyr");return c(),n("div",u,[a(s,{options:e.mergedOptions},{default:i(()=>[o("video",m,[o("source",{size:"1080",src:e.src,type:"video/mp4"},null,8,_)])]),_:1},8,["options"])])}const C=l(d,[["render",f]]);export{C as V};
@@ -0,0 +1 @@
1
+ const A="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAC0CAMAAAAKE/YAAAAAMFBMVEX///+3t7f4+Pi8vLzAwMDExMTS0tLIyMjk5OTz8/PY2NjOzs7u7u7d3d3p6enh4eFVKkJDAAAIfUlEQVR4nNVd15akOAylyRRQ9f9/O02BZJtgBQszfR/2zPahsJCvguVUFJYop35ux66pq6r6+fn9T910bTv3U2najBXK9zw2PxE07fz+n0Qf+raOyetL3g9PS7vgzRUYULfvZyXuR5nAgLF/SuK3UuJN7gf0PbyErDiieuU1zKmLyFJ3Y9u+vmh//V9dXT/b5VN3f+HbFq82nGivHH6999Vv8rC7P+NFzfBlF56xvl/sEy1Xbc8mZ9m3R7bcrO0jl+vXJH7J0YY78UvYKNuDjpWNTQd9tzd5ks9ePUm92u877WMlp4dhR+Y2OYkYdh3XmKclc9iATVwoXyFLZouXIobuBpEXlK+QcYbK7gOF2NpMaN2Vmfdr71LGirAbW5N3lr4F1rckC0GQbQw6cqrM1XACvzOr5EjT+2q+L24Vk6/sRGL7no6t5un9eQE+7JG4r+wk3+e9iGfXwzyeZHLjzDGFt0fEBB564ymOeRwzCg8dHaZ9kx8NZGZ8+UyOv0bSW3o9q5Tac5+0luajjGfqpsT2krIuTeaKZGQf4UUIKpx6xFbo2nGD9HSlpJZAGfSQILVjV02Z4CQsJhD2UdbcJ/dwyRfpNvozwaLo4q/0nMhLIrMThJSZZ4EhiJd6Ugti43SvzCTlPKnZmUNZMV+u4cYKwp85XlfcTBi/s6Z+MZ2LxADhGZzUDU9m5zjIr0woQhLxasAHWS7E9TgZU/Z1EBEIjbzxQYYxOudOxu73qTBcUGEaIzqD1hi96W6JTgzRoDSI/UhmITP7yUPFSYqaagD1R4wJkP8VnT8nTwVQqnauN06QjvtCvYt2IL3Zm/Uk9jjDz0RmMLggwx3SOuIUSniGpJv3bAJo1SAFr9mKH8aI+LqkI0RFtoIh9/L76Cc8GLCDoxxSjyAHgxxFYSEzJ18Ggly4YHQHnCQ2LRoCGINXQirim0JYUJpDatf/p24PP4mVwSblSg6MEhDGuzNVg6J5o8nEvAPAGZiAfk5MDRXNqxcmx/AVHPMprx8G1TEHwOzqTByseTgoDRxYDT6akSh9YSMzr6aLidOeTGCj3EqDkdC8GU9Q9c6voYlyJzxy0sOxOnRs8C3sQpSR92DOO4EDCXkAzoA935bPTy8AIgTBCIIyvyZsExF/uM2Byfk9A7VafuksfdyygFmJcc35NZ7tT5xUYMNwJYcI/FouGP7xOyT1YBOh+aVcsCHHBWCHZHLTxOfxF6ZA8HP82P7ASv4BJj5PMNMO/g3+H9ghqrtnGm4hIJLAd7byVxg5asGCA+AH2N2meYHvKPxZmQRIGtyMaOMweC/ZXJJJdJE0CF27Bm0oK8kWLKSWHxeILB8s7xN8gmxFi0VIFAkNqd5KiI3S7JBqJ7Ssycb70vAL2LAofMiE9hkBrQvX4OTXNLS4eGpwA8KlaxaGKHOy4OWWcSVoXSZz9ohYYLaxpB8bv4V2aFGeFiYOvqTb74V2mHkQ8IXjBKhMuKrMJIoLOQlmVGIiIlyPmXdguwJ6d8J/CZ1H0m4iB1Gr4D569HjCZalPaNoxeWtd5jKf4TRkpy30syh3KbLXPVZsWdIIQUK6dO8Jl+dkbUB6GfRranwIWx3hUzeVi5fRmggtDA6b/dWO3ELkLiF4QldqoXOPxhe8QOjt57LUpXhguGUhtEUFUtq9EBzUQluQWrphIV1oA1JLm0R6VFqh0z21eH30XmjFdofbF14dgC5PG1zS0w9pjuYFF2UYL9KHiXJGYhhXJkwLEk1RvrEMZVWmpgvSVC1XtEtNlYOAL1JYrdESOg3lcGtFQsVGs+Nu++msHdiu0BNEQQ5vYKssIWxQx3JNc1AqnbTFmg3qSoKmYz0mb//S7QDU1k5Vdu+VSnUFyA3aBES1ca9zkqb4PPVQUUVG74OVRfUNSqencXh+UR1sUnfqgy6+qLrVn75QThRt0I26VG0FU4dbRNfE1ULpqVVBIZBTN/kJ0PBDxY6QEbpp5v27JFCxI5xm1k3oIxT+Q+Wowgl93dIJhHzqVrW5erd0QrdIxUE8wFXxcL9IBXSlSRcLuSnq3NR+OZBq4ZWD1FXr8sn9wivVEjcPwtVuKtd6XOKmWUzoQeY/dCczHBcTKpZtnr2QB104gN70ukm+QNaHzBJV7DhbIAt/040ERMMXnbUDAwOtgvZVsUo0KaCi9Omib/SCqleKhE7KSsNIIt7IkFXoi40MSBrNO28X+ooHOKxWqPpuoVHRh7FDo3+pyHsorOZyG5R0w5kPUZmJffYFIrLhTLi1DzFJT0X+aWaZ3JGtfcJNlCvesTOuIpAcLBrdRIms5g4s+jFlM0PFPYY6ul1VtDG4PJzwqQHnGGpKKlA1fVKN0VqxX31Tx1DjOTBXaRFvs3vaWdkniPIEF3hdGgEmxpev0VpeHNf8ZuiROMBhet0hMch9qkogR2wXbeSojHI22jd5ifp1cLbY9dHB8NWhJCbOgkYzBxpFzxH3wu74F++ro8ckWsM7a5l7/IuzVnAxJX1MojGQ3shHslKCPPimY+b+jYfmU0qONPIOj5rzK9lDi33OyQttVpEaglXXMFoabQVmqny3QxaBW4opM3o4CtwDJazWGZtAUMi12ONkAtGMrNGS/1QI5yb+CxciLmc8EwoDKEokefK6CBKPRf47Mj/MEIujvv+MzA/6kKQLCR7y18q5Y8AjiWryrR1T9uwp/RqJ3YUdGWBxYUeR2RzN7gThn6ifCrtLaA7X/dwG4xtusvg+24uVihzKtr/Cqrh7OFPdcVlYcXItmyHS7x67ROwyxxTceAHegqsLHVOQ4WLH00sdE5DhUsev2IbaznR95gKrCnDGi0oXDOmTRrmvhP3i712+u+LvXXO84u9dKL2Cf3V33X7+i6u7N/y5S9IdvOvoF0G/19GP9tfR/wPQ21eEI8clLwAAAABJRU5ErkJggg==";export{A as d};
@@ -1 +1 @@
1
- import{cU as xe}from"./index-uXQ32ATB.js";import{h as _e}from"./vendor-dayjs-CzbnksQQ.js";const Re=_e(xe);var fe={exports:{}},ve=fe.exports,de;function Ie(){return de||(de=1,function(Ne){(function(le){var b,Ae=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,se=Math.ceil,G=Math.floor,C="[BigNumber Error] ",Ee=C+"Number primitive has more than 15 significant digits: ",z=1e14,N=14,oe=9007199254740991,ue=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],Y=1e7,D=1e9;function Oe(O){var E,v,I,p=h.prototype={constructor:h,toString:null,valueOf:null},M=new h(1),x=20,B=4,U=-7,k=21,Z=-1e7,H=1e7,K=!1,ee=1,J=0,ce={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},j="0123456789abcdefghijklmnopqrstuvwxyz",ae=!0;function h(e,r){var i,o,t,l,c,n,f,u,s=this;if(!(s instanceof h))return new h(e,r);if(r==null){if(e&&e._isBigNumber===!0){s.s=e.s,!e.c||e.e>H?s.c=s.e=null:e.e<Z?s.c=[s.e=0]:(s.e=e.e,s.c=e.c.slice());return}if((n=typeof e=="number")&&e*0==0){if(s.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,c=e;c>=10;c/=10,l++);l>H?s.c=s.e=null:(s.e=l,s.c=[e]);return}u=String(e)}else{if(!Ae.test(u=String(e)))return I(s,u,n);s.s=u.charCodeAt(0)==45?(u=u.slice(1),-1):1}(l=u.indexOf("."))>-1&&(u=u.replace(".","")),(c=u.search(/e/i))>0?(l<0&&(l=c),l+=+u.slice(c+1),u=u.substring(0,c)):l<0&&(l=u.length)}else{if(_(r,2,j.length,"Base"),r==10&&ae)return s=new h(e),$(s,x+s.e+1,B);if(u=String(e),n=typeof e=="number"){if(e*0!=0)return I(s,u,n,r);if(s.s=1/e<0?(u=u.slice(1),-1):1,h.DEBUG&&u.replace(/^0\.0*|\./,"").length>15)throw Error(Ee+e)}else s.s=u.charCodeAt(0)===45?(u=u.slice(1),-1):1;for(i=j.slice(0,r),l=c=0,f=u.length;c<f;c++)if(i.indexOf(o=u.charAt(c))<0){if(o=="."){if(c>l){l=f;continue}}else if(!t&&(u==u.toUpperCase()&&(u=u.toLowerCase())||u==u.toLowerCase()&&(u=u.toUpperCase()))){t=!0,c=-1,l=0;continue}return I(s,String(e),n,r)}n=!1,u=v(u,r,10,s.s),(l=u.indexOf("."))>-1?u=u.replace(".",""):l=u.length}for(c=0;u.charCodeAt(c)===48;c++);for(f=u.length;u.charCodeAt(--f)===48;);if(u=u.slice(c,++f)){if(f-=c,n&&h.DEBUG&&f>15&&(e>oe||e!==G(e)))throw Error(Ee+s.s*e);if((l=l-c-1)>H)s.c=s.e=null;else if(l<Z)s.c=[s.e=0];else{if(s.e=l,s.c=[],c=(l+1)%N,l<0&&(c+=N),c<f){for(c&&s.c.push(+u.slice(0,c)),f-=N;c<f;)s.c.push(+u.slice(c,c+=N));c=N-(u=u.slice(c)).length}else c-=f;for(;c--;u+="0");s.c.push(+u)}}else s.c=[s.e=0]}h.clone=Oe,h.ROUND_UP=0,h.ROUND_DOWN=1,h.ROUND_CEIL=2,h.ROUND_FLOOR=3,h.ROUND_HALF_UP=4,h.ROUND_HALF_DOWN=5,h.ROUND_HALF_EVEN=6,h.ROUND_HALF_CEIL=7,h.ROUND_HALF_FLOOR=8,h.EUCLID=9,h.config=h.set=function(e){var r,i;if(e!=null)if(typeof e=="object"){if(e.hasOwnProperty(r="DECIMAL_PLACES")&&(i=e[r],_(i,0,D,r),x=i),e.hasOwnProperty(r="ROUNDING_MODE")&&(i=e[r],_(i,0,8,r),B=i),e.hasOwnProperty(r="EXPONENTIAL_AT")&&(i=e[r],i&&i.pop?(_(i[0],-D,0,r),_(i[1],0,D,r),U=i[0],k=i[1]):(_(i,-D,D,r),U=-(k=i<0?-i:i))),e.hasOwnProperty(r="RANGE"))if(i=e[r],i&&i.pop)_(i[0],-D,-1,r),_(i[1],1,D,r),Z=i[0],H=i[1];else if(_(i,-D,D,r),i)Z=-(H=i<0?-i:i);else throw Error(C+r+" cannot be zero: "+i);if(e.hasOwnProperty(r="CRYPTO"))if(i=e[r],i===!!i)if(i)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))K=i;else throw K=!i,Error(C+"crypto unavailable");else K=i;else throw Error(C+r+" not true or false: "+i);if(e.hasOwnProperty(r="MODULO_MODE")&&(i=e[r],_(i,0,9,r),ee=i),e.hasOwnProperty(r="POW_PRECISION")&&(i=e[r],_(i,0,D,r),J=i),e.hasOwnProperty(r="FORMAT"))if(i=e[r],typeof i=="object")ce=i;else throw Error(C+r+" not an object: "+i);if(e.hasOwnProperty(r="ALPHABET"))if(i=e[r],typeof i=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(i))ae=i.slice(0,10)=="0123456789",j=i;else throw Error(C+r+" invalid: "+i)}else throw Error(C+"Object expected: "+e);return{DECIMAL_PLACES:x,ROUNDING_MODE:B,EXPONENTIAL_AT:[U,k],RANGE:[Z,H],CRYPTO:K,MODULO_MODE:ee,POW_PRECISION:J,FORMAT:ce,ALPHABET:j}},h.isBigNumber=function(e){if(!e||e._isBigNumber!==!0)return!1;if(!h.DEBUG)return!0;var r,i,o=e.c,t=e.e,l=e.s;e:if({}.toString.call(o)=="[object Array]"){if((l===1||l===-1)&&t>=-D&&t<=D&&t===G(t)){if(o[0]===0){if(t===0&&o.length===1)return!0;break e}if(r=(t+1)%N,r<1&&(r+=N),String(o[0]).length==r){for(r=0;r<o.length;r++)if(i=o[r],i<0||i>=z||i!==G(i))break e;if(i!==0)return!0}}}else if(o===null&&t===null&&(l===null||l===1||l===-1))return!0;throw Error(C+"Invalid BigNumber: "+e)},h.maximum=h.max=function(){return me(arguments,-1)},h.minimum=h.min=function(){return me(arguments,1)},h.random=function(){var e=9007199254740992,r=Math.random()*e&2097151?function(){return G(Math.random()*e)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(i){var o,t,l,c,n,f=0,u=[],s=new h(M);if(i==null?i=x:_(i,0,D),c=se(i/N),K)if(crypto.getRandomValues){for(o=crypto.getRandomValues(new Uint32Array(c*=2));f<c;)n=o[f]*131072+(o[f+1]>>>11),n>=9e15?(t=crypto.getRandomValues(new Uint32Array(2)),o[f]=t[0],o[f+1]=t[1]):(u.push(n%1e14),f+=2);f=c/2}else if(crypto.randomBytes){for(o=crypto.randomBytes(c*=7);f<c;)n=(o[f]&31)*281474976710656+o[f+1]*1099511627776+o[f+2]*4294967296+o[f+3]*16777216+(o[f+4]<<16)+(o[f+5]<<8)+o[f+6],n>=9e15?crypto.randomBytes(7).copy(o,f):(u.push(n%1e14),f+=7);f=c/7}else throw K=!1,Error(C+"crypto unavailable");if(!K)for(;f<c;)n=r(),n<9e15&&(u[f++]=n%1e14);for(c=u[--f],i%=N,c&&i&&(n=ue[N-i],u[f]=G(c/n)*n);u[f]===0;u.pop(),f--);if(f<0)u=[l=0];else{for(l=-1;u[0]===0;u.splice(0,1),l-=N);for(f=1,n=u[0];n>=10;n/=10,f++);f<N&&(l-=N-f)}return s.e=l,s.c=u,s}}(),h.sum=function(){for(var e=1,r=arguments,i=new h(r[0]);e<r.length;)i=i.plus(r[e++]);return i},v=function(){var e="0123456789";function r(i,o,t,l){for(var c,n=[0],f,u=0,s=i.length;u<s;){for(f=n.length;f--;n[f]*=o);for(n[0]+=l.indexOf(i.charAt(u++)),c=0;c<n.length;c++)n[c]>t-1&&(n[c+1]==null&&(n[c+1]=0),n[c+1]+=n[c]/t|0,n[c]%=t)}return n.reverse()}return function(i,o,t,l,c){var n,f,u,s,a,g,w,d,S=i.indexOf("."),T=x,m=B;for(S>=0&&(s=J,J=0,i=i.replace(".",""),d=new h(o),g=d.pow(i.length-S),J=s,d.c=r(V(F(g.c),g.e,"0"),10,t,e),d.e=d.c.length),w=r(i,o,t,c?(n=j,e):(n=e,j)),u=s=w.length;w[--s]==0;w.pop());if(!w[0])return n.charAt(0);if(S<0?--u:(g.c=w,g.e=u,g.s=l,g=E(g,d,T,m,t),w=g.c,a=g.r,u=g.e),f=u+T+1,S=w[f],s=t/2,a=a||f<0||w[f+1]!=null,a=m<4?(S!=null||a)&&(m==0||m==(g.s<0?3:2)):S>s||S==s&&(m==4||a||m==6&&w[f-1]&1||m==(g.s<0?8:7)),f<1||!w[0])i=a?V(n.charAt(1),-T,n.charAt(0)):n.charAt(0);else{if(w.length=f,a)for(--t;++w[--f]>t;)w[f]=0,f||(++u,w=[1].concat(w));for(s=w.length;!w[--s];);for(S=0,i="";S<=s;i+=n.charAt(w[S++]));i=V(i,u,n.charAt(0))}return i}}(),E=function(){function e(o,t,l){var c,n,f,u,s=0,a=o.length,g=t%Y,w=t/Y|0;for(o=o.slice();a--;)f=o[a]%Y,u=o[a]/Y|0,c=w*f+u*g,n=g*f+c%Y*Y+s,s=(n/l|0)+(c/Y|0)+w*u,o[a]=n%l;return s&&(o=[s].concat(o)),o}function r(o,t,l,c){var n,f;if(l!=c)f=l>c?1:-1;else for(n=f=0;n<l;n++)if(o[n]!=t[n]){f=o[n]>t[n]?1:-1;break}return f}function i(o,t,l,c){for(var n=0;l--;)o[l]-=n,n=o[l]<t[l]?1:0,o[l]=n*c+o[l]-t[l];for(;!o[0]&&o.length>1;o.splice(0,1));}return function(o,t,l,c,n){var f,u,s,a,g,w,d,S,T,m,A,P,te,ge,we,X,re,y=o.s==t.s?1:-1,L=o.c,R=t.c;if(!L||!L[0]||!R||!R[0])return new h(!o.s||!t.s||(L?R&&L[0]==R[0]:!R)?NaN:L&&L[0]==0||!R?y*0:y/0);for(S=new h(y),T=S.c=[],u=o.e-t.e,y=l+u+1,n||(n=z,u=q(o.e/N)-q(t.e/N),y=y/N|0),s=0;R[s]==(L[s]||0);s++);if(R[s]>(L[s]||0)&&u--,y<0)T.push(1),a=!0;else{for(ge=L.length,X=R.length,s=0,y+=2,g=G(n/(R[0]+1)),g>1&&(R=e(R,g,n),L=e(L,g,n),X=R.length,ge=L.length),te=X,m=L.slice(0,X),A=m.length;A<X;m[A++]=0);re=R.slice(),re=[0].concat(re),we=R[0],R[1]>=n/2&&we++;do{if(g=0,f=r(R,m,X,A),f<0){if(P=m[0],X!=A&&(P=P*n+(m[1]||0)),g=G(P/we),g>1)for(g>=n&&(g=n-1),w=e(R,g,n),d=w.length,A=m.length;r(w,m,d,A)==1;)g--,i(w,X<d?re:R,d,n),d=w.length,f=1;else g==0&&(f=g=1),w=R.slice(),d=w.length;if(d<A&&(w=[0].concat(w)),i(m,w,A,n),A=m.length,f==-1)for(;r(R,m,X,A)<1;)g++,i(m,X<A?re:R,A,n),A=m.length}else f===0&&(g++,m=[0]);T[s++]=g,m[0]?m[A++]=L[te]||0:(m=[L[te]],A=1)}while((te++<ge||m[0]!=null)&&y--);a=m[0]!=null,T[0]||T.splice(0,1)}if(n==z){for(s=1,y=T[0];y>=10;y/=10,s++);$(S,l+(S.e=s+u*N-1)+1,c,a)}else S.e=u,S.r=+a;return S}}();function he(e,r,i,o){var t,l,c,n,f;if(i==null?i=B:_(i,0,8),!e.c)return e.toString();if(t=e.c[0],c=e.e,r==null)f=F(e.c),f=o==1||o==2&&(c<=U||c>=k)?ne(f,c):V(f,c,"0");else if(e=$(new h(e),r,i),l=e.e,f=F(e.c),n=f.length,o==1||o==2&&(r<=l||l<=U)){for(;n<r;f+="0",n++);f=ne(f,l)}else if(r-=c+(o===2&&l>c),f=V(f,l,"0"),l+1>n){if(--r>0)for(f+=".";r--;f+="0");}else if(r+=l-n,r>0)for(l+1==n&&(f+=".");r--;f+="0");return e.s<0&&t?"-"+f:f}function me(e,r){for(var i,o,t=1,l=new h(e[0]);t<e.length;t++)o=new h(e[t]),(!o.s||(i=Q(l,o))===r||i===0&&l.s===r)&&(l=o);return l}function pe(e,r,i){for(var o=1,t=r.length;!r[--t];r.pop());for(t=r[0];t>=10;t/=10,o++);return(i=o+i*N-1)>H?e.c=e.e=null:i<Z?e.c=[e.e=0]:(e.e=i,e.c=r),e}I=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,r=/^([^.]+)\.$/,i=/^\.([^.]+)$/,o=/^-?(Infinity|NaN)$/,t=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(l,c,n,f){var u,s=n?c:c.replace(t,"");if(o.test(s))l.s=isNaN(s)?null:s<0?-1:1;else{if(!n&&(s=s.replace(e,function(a,g,w){return u=(w=w.toLowerCase())=="x"?16:w=="b"?2:8,!f||f==u?g:a}),f&&(u=f,s=s.replace(r,"$1").replace(i,"0.$1")),c!=s))return new h(s,u);if(h.DEBUG)throw Error(C+"Not a"+(f?" base "+f:"")+" number: "+c);l.s=null}l.c=l.e=null}}();function $(e,r,i,o){var t,l,c,n,f,u,s,a=e.c,g=ue;if(a){e:{for(t=1,n=a[0];n>=10;n/=10,t++);if(l=r-t,l<0)l+=N,c=r,f=a[u=0],s=G(f/g[t-c-1]%10);else if(u=se((l+1)/N),u>=a.length)if(o){for(;a.length<=u;a.push(0));f=s=0,t=1,l%=N,c=l-N+1}else break e;else{for(f=n=a[u],t=1;n>=10;n/=10,t++);l%=N,c=l-N+t,s=c<0?0:G(f/g[t-c-1]%10)}if(o=o||r<0||a[u+1]!=null||(c<0?f:f%g[t-c-1]),o=i<4?(s||o)&&(i==0||i==(e.s<0?3:2)):s>5||s==5&&(i==4||o||i==6&&(l>0?c>0?f/g[t-c]:0:a[u-1])%10&1||i==(e.s<0?8:7)),r<1||!a[0])return a.length=0,o?(r-=e.e+1,a[0]=g[(N-r%N)%N],e.e=-r||0):a[0]=e.e=0,e;if(l==0?(a.length=u,n=1,u--):(a.length=u+1,n=g[N-l],a[u]=c>0?G(f/g[t-c]%g[c])*n:0),o)for(;;)if(u==0){for(l=1,c=a[0];c>=10;c/=10,l++);for(c=a[0]+=n,n=1;c>=10;c/=10,n++);l!=n&&(e.e++,a[0]==z&&(a[0]=1));break}else{if(a[u]+=n,a[u]!=z)break;a[u--]=0,n=1}for(l=a.length;a[--l]===0;a.pop());}e.e>H?e.c=e.e=null:e.e<Z&&(e.c=[e.e=0])}return e}function W(e){var r,i=e.e;return i===null?e.toString():(r=F(e.c),r=i<=U||i>=k?ne(r,i):V(r,i,"0"),e.s<0?"-"+r:r)}return p.absoluteValue=p.abs=function(){var e=new h(this);return e.s<0&&(e.s=1),e},p.comparedTo=function(e,r){return Q(this,new h(e,r))},p.decimalPlaces=p.dp=function(e,r){var i,o,t,l=this;if(e!=null)return _(e,0,D),r==null?r=B:_(r,0,8),$(new h(l),e+l.e+1,r);if(!(i=l.c))return null;if(o=((t=i.length-1)-q(this.e/N))*N,t=i[t])for(;t%10==0;t/=10,o--);return o<0&&(o=0),o},p.dividedBy=p.div=function(e,r){return E(this,new h(e,r),x,B)},p.dividedToIntegerBy=p.idiv=function(e,r){return E(this,new h(e,r),0,1)},p.exponentiatedBy=p.pow=function(e,r){var i,o,t,l,c,n,f,u,s,a=this;if(e=new h(e),e.c&&!e.isInteger())throw Error(C+"Exponent not an integer: "+W(e));if(r!=null&&(r=new h(r)),n=e.e>14,!a.c||!a.c[0]||a.c[0]==1&&!a.e&&a.c.length==1||!e.c||!e.c[0])return s=new h(Math.pow(+W(a),n?e.s*(2-ie(e)):+W(e))),r?s.mod(r):s;if(f=e.s<0,r){if(r.c?!r.c[0]:!r.s)return new h(NaN);o=!f&&a.isInteger()&&r.isInteger(),o&&(a=a.mod(r))}else{if(e.e>9&&(a.e>0||a.e<-1||(a.e==0?a.c[0]>1||n&&a.c[1]>=24e7:a.c[0]<8e13||n&&a.c[0]<=9999975e7)))return l=a.s<0&&ie(e)?-0:0,a.e>-1&&(l=1/l),new h(f?1/l:l);J&&(l=se(J/N+2))}for(n?(i=new h(.5),f&&(e.s=1),u=ie(e)):(t=Math.abs(+W(e)),u=t%2),s=new h(M);;){if(u){if(s=s.times(a),!s.c)break;l?s.c.length>l&&(s.c.length=l):o&&(s=s.mod(r))}if(t){if(t=G(t/2),t===0)break;u=t%2}else if(e=e.times(i),$(e,e.e+1,1),e.e>14)u=ie(e);else{if(t=+W(e),t===0)break;u=t%2}a=a.times(a),l?a.c&&a.c.length>l&&(a.c.length=l):o&&(a=a.mod(r))}return o?s:(f&&(s=M.div(s)),r?s.mod(r):l?$(s,J,B,c):s)},p.integerValue=function(e){var r=new h(this);return e==null?e=B:_(e,0,8),$(r,r.e+1,e)},p.isEqualTo=p.eq=function(e,r){return Q(this,new h(e,r))===0},p.isFinite=function(){return!!this.c},p.isGreaterThan=p.gt=function(e,r){return Q(this,new h(e,r))>0},p.isGreaterThanOrEqualTo=p.gte=function(e,r){return(r=Q(this,new h(e,r)))===1||r===0},p.isInteger=function(){return!!this.c&&q(this.e/N)>this.c.length-2},p.isLessThan=p.lt=function(e,r){return Q(this,new h(e,r))<0},p.isLessThanOrEqualTo=p.lte=function(e,r){return(r=Q(this,new h(e,r)))===-1||r===0},p.isNaN=function(){return!this.s},p.isNegative=function(){return this.s<0},p.isPositive=function(){return this.s>0},p.isZero=function(){return!!this.c&&this.c[0]==0},p.minus=function(e,r){var i,o,t,l,c=this,n=c.s;if(e=new h(e,r),r=e.s,!n||!r)return new h(NaN);if(n!=r)return e.s=-r,c.plus(e);var f=c.e/N,u=e.e/N,s=c.c,a=e.c;if(!f||!u){if(!s||!a)return s?(e.s=-r,e):new h(a?c:NaN);if(!s[0]||!a[0])return a[0]?(e.s=-r,e):new h(s[0]?c:B==3?-0:0)}if(f=q(f),u=q(u),s=s.slice(),n=f-u){for((l=n<0)?(n=-n,t=s):(u=f,t=a),t.reverse(),r=n;r--;t.push(0));t.reverse()}else for(o=(l=(n=s.length)<(r=a.length))?n:r,n=r=0;r<o;r++)if(s[r]!=a[r]){l=s[r]<a[r];break}if(l&&(t=s,s=a,a=t,e.s=-e.s),r=(o=a.length)-(i=s.length),r>0)for(;r--;s[i++]=0);for(r=z-1;o>n;){if(s[--o]<a[o]){for(i=o;i&&!s[--i];s[i]=r);--s[i],s[o]+=z}s[o]-=a[o]}for(;s[0]==0;s.splice(0,1),--u);return s[0]?pe(e,s,u):(e.s=B==3?-1:1,e.c=[e.e=0],e)},p.modulo=p.mod=function(e,r){var i,o,t=this;return e=new h(e,r),!t.c||!e.s||e.c&&!e.c[0]?new h(NaN):!e.c||t.c&&!t.c[0]?new h(t):(ee==9?(o=e.s,e.s=1,i=E(t,e,0,3),e.s=o,i.s*=o):i=E(t,e,0,ee),e=t.minus(i.times(e)),!e.c[0]&&ee==1&&(e.s=t.s),e)},p.multipliedBy=p.times=function(e,r){var i,o,t,l,c,n,f,u,s,a,g,w,d,S,T,m=this,A=m.c,P=(e=new h(e,r)).c;if(!A||!P||!A[0]||!P[0])return!m.s||!e.s||A&&!A[0]&&!P||P&&!P[0]&&!A?e.c=e.e=e.s=null:(e.s*=m.s,!A||!P?e.c=e.e=null:(e.c=[0],e.e=0)),e;for(o=q(m.e/N)+q(e.e/N),e.s*=m.s,f=A.length,a=P.length,f<a&&(d=A,A=P,P=d,t=f,f=a,a=t),t=f+a,d=[];t--;d.push(0));for(S=z,T=Y,t=a;--t>=0;){for(i=0,g=P[t]%T,w=P[t]/T|0,c=f,l=t+c;l>t;)u=A[--c]%T,s=A[c]/T|0,n=w*u+s*g,u=g*u+n%T*T+d[l]+i,i=(u/S|0)+(n/T|0)+w*s,d[l--]=u%S;d[l]=i}return i?++o:d.splice(0,1),pe(e,d,o)},p.negated=function(){var e=new h(this);return e.s=-e.s||null,e},p.plus=function(e,r){var i,o=this,t=o.s;if(e=new h(e,r),r=e.s,!t||!r)return new h(NaN);if(t!=r)return e.s=-r,o.minus(e);var l=o.e/N,c=e.e/N,n=o.c,f=e.c;if(!l||!c){if(!n||!f)return new h(t/0);if(!n[0]||!f[0])return f[0]?e:new h(n[0]?o:t*0)}if(l=q(l),c=q(c),n=n.slice(),t=l-c){for(t>0?(c=l,i=f):(t=-t,i=n),i.reverse();t--;i.push(0));i.reverse()}for(t=n.length,r=f.length,t-r<0&&(i=f,f=n,n=i,r=t),t=0;r;)t=(n[--r]=n[r]+f[r]+t)/z|0,n[r]=z===n[r]?0:n[r]%z;return t&&(n=[t].concat(n),++c),pe(e,n,c)},p.precision=p.sd=function(e,r){var i,o,t,l=this;if(e!=null&&e!==!!e)return _(e,1,D),r==null?r=B:_(r,0,8),$(new h(l),e,r);if(!(i=l.c))return null;if(t=i.length-1,o=t*N+1,t=i[t]){for(;t%10==0;t/=10,o--);for(t=i[0];t>=10;t/=10,o++);}return e&&l.e+1>o&&(o=l.e+1),o},p.shiftedBy=function(e){return _(e,-oe,oe),this.times("1e"+e)},p.squareRoot=p.sqrt=function(){var e,r,i,o,t,l=this,c=l.c,n=l.s,f=l.e,u=x+4,s=new h("0.5");if(n!==1||!c||!c[0])return new h(!n||n<0&&(!c||c[0])?NaN:c?l:1/0);if(n=Math.sqrt(+W(l)),n==0||n==1/0?(r=F(c),(r.length+f)%2==0&&(r+="0"),n=Math.sqrt(+r),f=q((f+1)/2)-(f<0||f%2),n==1/0?r="5e"+f:(r=n.toExponential(),r=r.slice(0,r.indexOf("e")+1)+f),i=new h(r)):i=new h(n+""),i.c[0]){for(f=i.e,n=f+u,n<3&&(n=0);;)if(t=i,i=s.times(t.plus(E(l,t,u,1))),F(t.c).slice(0,n)===(r=F(i.c)).slice(0,n))if(i.e<f&&--n,r=r.slice(n-3,n+1),r=="9999"||!o&&r=="4999"){if(!o&&($(t,t.e+x+2,0),t.times(t).eq(l))){i=t;break}u+=4,n+=4,o=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&($(i,i.e+x+2,1),e=!i.times(i).eq(l));break}}return $(i,i.e+x+1,B,e)},p.toExponential=function(e,r){return e!=null&&(_(e,0,D),e++),he(this,e,r,1)},p.toFixed=function(e,r){return e!=null&&(_(e,0,D),e=e+this.e+1),he(this,e,r)},p.toFormat=function(e,r,i){var o,t=this;if(i==null)e!=null&&r&&typeof r=="object"?(i=r,r=null):e&&typeof e=="object"?(i=e,e=r=null):i=ce;else if(typeof i!="object")throw Error(C+"Argument not an object: "+i);if(o=t.toFixed(e,r),t.c){var l,c=o.split("."),n=+i.groupSize,f=+i.secondaryGroupSize,u=i.groupSeparator||"",s=c[0],a=c[1],g=t.s<0,w=g?s.slice(1):s,d=w.length;if(f&&(l=n,n=f,f=l,d-=l),n>0&&d>0){for(l=d%n||n,s=w.substr(0,l);l<d;l+=n)s+=u+w.substr(l,n);f>0&&(s+=u+w.slice(l)),g&&(s="-"+s)}o=a?s+(i.decimalSeparator||"")+((f=+i.fractionGroupSize)?a.replace(new RegExp("\\d{"+f+"}\\B","g"),"$&"+(i.fractionGroupSeparator||"")):a):s}return(i.prefix||"")+o+(i.suffix||"")},p.toFraction=function(e){var r,i,o,t,l,c,n,f,u,s,a,g,w=this,d=w.c;if(e!=null&&(n=new h(e),!n.isInteger()&&(n.c||n.s!==1)||n.lt(M)))throw Error(C+"Argument "+(n.isInteger()?"out of range: ":"not an integer: ")+W(n));if(!d)return new h(w);for(r=new h(M),u=i=new h(M),o=f=new h(M),g=F(d),l=r.e=g.length-w.e-1,r.c[0]=ue[(c=l%N)<0?N+c:c],e=!e||n.comparedTo(r)>0?l>0?r:u:n,c=H,H=1/0,n=new h(g),f.c[0]=0;s=E(n,r,0,1),t=i.plus(s.times(o)),t.comparedTo(e)!=1;)i=o,o=t,u=f.plus(s.times(t=u)),f=t,r=n.minus(s.times(t=r)),n=t;return t=E(e.minus(i),o,0,1),f=f.plus(t.times(u)),i=i.plus(t.times(o)),f.s=u.s=w.s,l=l*2,a=E(u,o,l,B).minus(w).abs().comparedTo(E(f,i,l,B).minus(w).abs())<1?[u,o]:[f,i],H=c,a},p.toNumber=function(){return+W(this)},p.toPrecision=function(e,r){return e!=null&&_(e,1,D),he(this,e,r,2)},p.toString=function(e){var r,i=this,o=i.s,t=i.e;return t===null?o?(r="Infinity",o<0&&(r="-"+r)):r="NaN":(e==null?r=t<=U||t>=k?ne(F(i.c),t):V(F(i.c),t,"0"):e===10&&ae?(i=$(new h(i),x+t+1,B),r=V(F(i.c),i.e,"0")):(_(e,2,j.length,"Base"),r=v(V(F(i.c),t,"0"),10,e,o,!0)),o<0&&i.c[0]&&(r="-"+r)),r},p.valueOf=p.toJSON=function(){return W(this)},p._isBigNumber=!0,O!=null&&h.set(O),h}function q(O){var E=O|0;return O>0||O===E?E:E-1}function F(O){for(var E,v,I=1,p=O.length,M=O[0]+"";I<p;){for(E=O[I++]+"",v=N-E.length;v--;E="0"+E);M+=E}for(p=M.length;M.charCodeAt(--p)===48;);return M.slice(0,p+1||1)}function Q(O,E){var v,I,p=O.c,M=E.c,x=O.s,B=E.s,U=O.e,k=E.e;if(!x||!B)return null;if(v=p&&!p[0],I=M&&!M[0],v||I)return v?I?0:-B:x;if(x!=B)return x;if(v=x<0,I=U==k,!p||!M)return I?0:!p^v?1:-1;if(!I)return U>k^v?1:-1;for(B=(U=p.length)<(k=M.length)?U:k,x=0;x<B;x++)if(p[x]!=M[x])return p[x]>M[x]^v?1:-1;return U==k?0:U>k^v?1:-1}function _(O,E,v,I){if(O<E||O>v||O!==G(O))throw Error(C+(I||"Argument")+(typeof O=="number"?O<E||O>v?" out of range: ":" not an integer: ":" not a primitive number: ")+String(O))}function ie(O){var E=O.c.length-1;return q(O.e/N)==E&&O.c[E]%2!=0}function ne(O,E){return(O.length>1?O.charAt(0)+"."+O.slice(1):O)+(E<0?"e":"e+")+E}function V(O,E,v){var I,p;if(E<0){for(p=v+".";++E;p+=v);O=p+O}else if(I=O.length,++E>I){for(p=v,E-=I;--E;p+=v);O+=p}else E<I&&(O=O.slice(0,E)+"."+O.slice(E));return O}b=Oe(),b.default=b.BigNumber=b,Ne.exports?Ne.exports=b:(le||(le=typeof self<"u"&&self?self:window),le.BigNumber=b)})(ve)}(fe)),fe.exports}export{Re as a,Ie as r};
1
+ import{cW as xe}from"./index-CJUWpJze.js";import{h as _e}from"./vendor-dayjs-CzbnksQQ.js";const Re=_e(xe);var fe={exports:{}},ve=fe.exports,de;function Ie(){return de||(de=1,function(Ne){(function(le){var b,Ae=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,se=Math.ceil,G=Math.floor,C="[BigNumber Error] ",Ee=C+"Number primitive has more than 15 significant digits: ",z=1e14,N=14,oe=9007199254740991,ue=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],Y=1e7,D=1e9;function Oe(O){var E,v,I,p=h.prototype={constructor:h,toString:null,valueOf:null},M=new h(1),x=20,B=4,U=-7,k=21,Z=-1e7,H=1e7,K=!1,ee=1,J=0,ce={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},j="0123456789abcdefghijklmnopqrstuvwxyz",ae=!0;function h(e,r){var i,o,t,l,c,n,f,u,s=this;if(!(s instanceof h))return new h(e,r);if(r==null){if(e&&e._isBigNumber===!0){s.s=e.s,!e.c||e.e>H?s.c=s.e=null:e.e<Z?s.c=[s.e=0]:(s.e=e.e,s.c=e.c.slice());return}if((n=typeof e=="number")&&e*0==0){if(s.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,c=e;c>=10;c/=10,l++);l>H?s.c=s.e=null:(s.e=l,s.c=[e]);return}u=String(e)}else{if(!Ae.test(u=String(e)))return I(s,u,n);s.s=u.charCodeAt(0)==45?(u=u.slice(1),-1):1}(l=u.indexOf("."))>-1&&(u=u.replace(".","")),(c=u.search(/e/i))>0?(l<0&&(l=c),l+=+u.slice(c+1),u=u.substring(0,c)):l<0&&(l=u.length)}else{if(_(r,2,j.length,"Base"),r==10&&ae)return s=new h(e),$(s,x+s.e+1,B);if(u=String(e),n=typeof e=="number"){if(e*0!=0)return I(s,u,n,r);if(s.s=1/e<0?(u=u.slice(1),-1):1,h.DEBUG&&u.replace(/^0\.0*|\./,"").length>15)throw Error(Ee+e)}else s.s=u.charCodeAt(0)===45?(u=u.slice(1),-1):1;for(i=j.slice(0,r),l=c=0,f=u.length;c<f;c++)if(i.indexOf(o=u.charAt(c))<0){if(o=="."){if(c>l){l=f;continue}}else if(!t&&(u==u.toUpperCase()&&(u=u.toLowerCase())||u==u.toLowerCase()&&(u=u.toUpperCase()))){t=!0,c=-1,l=0;continue}return I(s,String(e),n,r)}n=!1,u=v(u,r,10,s.s),(l=u.indexOf("."))>-1?u=u.replace(".",""):l=u.length}for(c=0;u.charCodeAt(c)===48;c++);for(f=u.length;u.charCodeAt(--f)===48;);if(u=u.slice(c,++f)){if(f-=c,n&&h.DEBUG&&f>15&&(e>oe||e!==G(e)))throw Error(Ee+s.s*e);if((l=l-c-1)>H)s.c=s.e=null;else if(l<Z)s.c=[s.e=0];else{if(s.e=l,s.c=[],c=(l+1)%N,l<0&&(c+=N),c<f){for(c&&s.c.push(+u.slice(0,c)),f-=N;c<f;)s.c.push(+u.slice(c,c+=N));c=N-(u=u.slice(c)).length}else c-=f;for(;c--;u+="0");s.c.push(+u)}}else s.c=[s.e=0]}h.clone=Oe,h.ROUND_UP=0,h.ROUND_DOWN=1,h.ROUND_CEIL=2,h.ROUND_FLOOR=3,h.ROUND_HALF_UP=4,h.ROUND_HALF_DOWN=5,h.ROUND_HALF_EVEN=6,h.ROUND_HALF_CEIL=7,h.ROUND_HALF_FLOOR=8,h.EUCLID=9,h.config=h.set=function(e){var r,i;if(e!=null)if(typeof e=="object"){if(e.hasOwnProperty(r="DECIMAL_PLACES")&&(i=e[r],_(i,0,D,r),x=i),e.hasOwnProperty(r="ROUNDING_MODE")&&(i=e[r],_(i,0,8,r),B=i),e.hasOwnProperty(r="EXPONENTIAL_AT")&&(i=e[r],i&&i.pop?(_(i[0],-D,0,r),_(i[1],0,D,r),U=i[0],k=i[1]):(_(i,-D,D,r),U=-(k=i<0?-i:i))),e.hasOwnProperty(r="RANGE"))if(i=e[r],i&&i.pop)_(i[0],-D,-1,r),_(i[1],1,D,r),Z=i[0],H=i[1];else if(_(i,-D,D,r),i)Z=-(H=i<0?-i:i);else throw Error(C+r+" cannot be zero: "+i);if(e.hasOwnProperty(r="CRYPTO"))if(i=e[r],i===!!i)if(i)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))K=i;else throw K=!i,Error(C+"crypto unavailable");else K=i;else throw Error(C+r+" not true or false: "+i);if(e.hasOwnProperty(r="MODULO_MODE")&&(i=e[r],_(i,0,9,r),ee=i),e.hasOwnProperty(r="POW_PRECISION")&&(i=e[r],_(i,0,D,r),J=i),e.hasOwnProperty(r="FORMAT"))if(i=e[r],typeof i=="object")ce=i;else throw Error(C+r+" not an object: "+i);if(e.hasOwnProperty(r="ALPHABET"))if(i=e[r],typeof i=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(i))ae=i.slice(0,10)=="0123456789",j=i;else throw Error(C+r+" invalid: "+i)}else throw Error(C+"Object expected: "+e);return{DECIMAL_PLACES:x,ROUNDING_MODE:B,EXPONENTIAL_AT:[U,k],RANGE:[Z,H],CRYPTO:K,MODULO_MODE:ee,POW_PRECISION:J,FORMAT:ce,ALPHABET:j}},h.isBigNumber=function(e){if(!e||e._isBigNumber!==!0)return!1;if(!h.DEBUG)return!0;var r,i,o=e.c,t=e.e,l=e.s;e:if({}.toString.call(o)=="[object Array]"){if((l===1||l===-1)&&t>=-D&&t<=D&&t===G(t)){if(o[0]===0){if(t===0&&o.length===1)return!0;break e}if(r=(t+1)%N,r<1&&(r+=N),String(o[0]).length==r){for(r=0;r<o.length;r++)if(i=o[r],i<0||i>=z||i!==G(i))break e;if(i!==0)return!0}}}else if(o===null&&t===null&&(l===null||l===1||l===-1))return!0;throw Error(C+"Invalid BigNumber: "+e)},h.maximum=h.max=function(){return me(arguments,-1)},h.minimum=h.min=function(){return me(arguments,1)},h.random=function(){var e=9007199254740992,r=Math.random()*e&2097151?function(){return G(Math.random()*e)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(i){var o,t,l,c,n,f=0,u=[],s=new h(M);if(i==null?i=x:_(i,0,D),c=se(i/N),K)if(crypto.getRandomValues){for(o=crypto.getRandomValues(new Uint32Array(c*=2));f<c;)n=o[f]*131072+(o[f+1]>>>11),n>=9e15?(t=crypto.getRandomValues(new Uint32Array(2)),o[f]=t[0],o[f+1]=t[1]):(u.push(n%1e14),f+=2);f=c/2}else if(crypto.randomBytes){for(o=crypto.randomBytes(c*=7);f<c;)n=(o[f]&31)*281474976710656+o[f+1]*1099511627776+o[f+2]*4294967296+o[f+3]*16777216+(o[f+4]<<16)+(o[f+5]<<8)+o[f+6],n>=9e15?crypto.randomBytes(7).copy(o,f):(u.push(n%1e14),f+=7);f=c/7}else throw K=!1,Error(C+"crypto unavailable");if(!K)for(;f<c;)n=r(),n<9e15&&(u[f++]=n%1e14);for(c=u[--f],i%=N,c&&i&&(n=ue[N-i],u[f]=G(c/n)*n);u[f]===0;u.pop(),f--);if(f<0)u=[l=0];else{for(l=-1;u[0]===0;u.splice(0,1),l-=N);for(f=1,n=u[0];n>=10;n/=10,f++);f<N&&(l-=N-f)}return s.e=l,s.c=u,s}}(),h.sum=function(){for(var e=1,r=arguments,i=new h(r[0]);e<r.length;)i=i.plus(r[e++]);return i},v=function(){var e="0123456789";function r(i,o,t,l){for(var c,n=[0],f,u=0,s=i.length;u<s;){for(f=n.length;f--;n[f]*=o);for(n[0]+=l.indexOf(i.charAt(u++)),c=0;c<n.length;c++)n[c]>t-1&&(n[c+1]==null&&(n[c+1]=0),n[c+1]+=n[c]/t|0,n[c]%=t)}return n.reverse()}return function(i,o,t,l,c){var n,f,u,s,a,g,w,d,S=i.indexOf("."),T=x,m=B;for(S>=0&&(s=J,J=0,i=i.replace(".",""),d=new h(o),g=d.pow(i.length-S),J=s,d.c=r(V(F(g.c),g.e,"0"),10,t,e),d.e=d.c.length),w=r(i,o,t,c?(n=j,e):(n=e,j)),u=s=w.length;w[--s]==0;w.pop());if(!w[0])return n.charAt(0);if(S<0?--u:(g.c=w,g.e=u,g.s=l,g=E(g,d,T,m,t),w=g.c,a=g.r,u=g.e),f=u+T+1,S=w[f],s=t/2,a=a||f<0||w[f+1]!=null,a=m<4?(S!=null||a)&&(m==0||m==(g.s<0?3:2)):S>s||S==s&&(m==4||a||m==6&&w[f-1]&1||m==(g.s<0?8:7)),f<1||!w[0])i=a?V(n.charAt(1),-T,n.charAt(0)):n.charAt(0);else{if(w.length=f,a)for(--t;++w[--f]>t;)w[f]=0,f||(++u,w=[1].concat(w));for(s=w.length;!w[--s];);for(S=0,i="";S<=s;i+=n.charAt(w[S++]));i=V(i,u,n.charAt(0))}return i}}(),E=function(){function e(o,t,l){var c,n,f,u,s=0,a=o.length,g=t%Y,w=t/Y|0;for(o=o.slice();a--;)f=o[a]%Y,u=o[a]/Y|0,c=w*f+u*g,n=g*f+c%Y*Y+s,s=(n/l|0)+(c/Y|0)+w*u,o[a]=n%l;return s&&(o=[s].concat(o)),o}function r(o,t,l,c){var n,f;if(l!=c)f=l>c?1:-1;else for(n=f=0;n<l;n++)if(o[n]!=t[n]){f=o[n]>t[n]?1:-1;break}return f}function i(o,t,l,c){for(var n=0;l--;)o[l]-=n,n=o[l]<t[l]?1:0,o[l]=n*c+o[l]-t[l];for(;!o[0]&&o.length>1;o.splice(0,1));}return function(o,t,l,c,n){var f,u,s,a,g,w,d,S,T,m,A,P,te,ge,we,X,re,y=o.s==t.s?1:-1,L=o.c,R=t.c;if(!L||!L[0]||!R||!R[0])return new h(!o.s||!t.s||(L?R&&L[0]==R[0]:!R)?NaN:L&&L[0]==0||!R?y*0:y/0);for(S=new h(y),T=S.c=[],u=o.e-t.e,y=l+u+1,n||(n=z,u=q(o.e/N)-q(t.e/N),y=y/N|0),s=0;R[s]==(L[s]||0);s++);if(R[s]>(L[s]||0)&&u--,y<0)T.push(1),a=!0;else{for(ge=L.length,X=R.length,s=0,y+=2,g=G(n/(R[0]+1)),g>1&&(R=e(R,g,n),L=e(L,g,n),X=R.length,ge=L.length),te=X,m=L.slice(0,X),A=m.length;A<X;m[A++]=0);re=R.slice(),re=[0].concat(re),we=R[0],R[1]>=n/2&&we++;do{if(g=0,f=r(R,m,X,A),f<0){if(P=m[0],X!=A&&(P=P*n+(m[1]||0)),g=G(P/we),g>1)for(g>=n&&(g=n-1),w=e(R,g,n),d=w.length,A=m.length;r(w,m,d,A)==1;)g--,i(w,X<d?re:R,d,n),d=w.length,f=1;else g==0&&(f=g=1),w=R.slice(),d=w.length;if(d<A&&(w=[0].concat(w)),i(m,w,A,n),A=m.length,f==-1)for(;r(R,m,X,A)<1;)g++,i(m,X<A?re:R,A,n),A=m.length}else f===0&&(g++,m=[0]);T[s++]=g,m[0]?m[A++]=L[te]||0:(m=[L[te]],A=1)}while((te++<ge||m[0]!=null)&&y--);a=m[0]!=null,T[0]||T.splice(0,1)}if(n==z){for(s=1,y=T[0];y>=10;y/=10,s++);$(S,l+(S.e=s+u*N-1)+1,c,a)}else S.e=u,S.r=+a;return S}}();function he(e,r,i,o){var t,l,c,n,f;if(i==null?i=B:_(i,0,8),!e.c)return e.toString();if(t=e.c[0],c=e.e,r==null)f=F(e.c),f=o==1||o==2&&(c<=U||c>=k)?ne(f,c):V(f,c,"0");else if(e=$(new h(e),r,i),l=e.e,f=F(e.c),n=f.length,o==1||o==2&&(r<=l||l<=U)){for(;n<r;f+="0",n++);f=ne(f,l)}else if(r-=c+(o===2&&l>c),f=V(f,l,"0"),l+1>n){if(--r>0)for(f+=".";r--;f+="0");}else if(r+=l-n,r>0)for(l+1==n&&(f+=".");r--;f+="0");return e.s<0&&t?"-"+f:f}function me(e,r){for(var i,o,t=1,l=new h(e[0]);t<e.length;t++)o=new h(e[t]),(!o.s||(i=Q(l,o))===r||i===0&&l.s===r)&&(l=o);return l}function pe(e,r,i){for(var o=1,t=r.length;!r[--t];r.pop());for(t=r[0];t>=10;t/=10,o++);return(i=o+i*N-1)>H?e.c=e.e=null:i<Z?e.c=[e.e=0]:(e.e=i,e.c=r),e}I=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,r=/^([^.]+)\.$/,i=/^\.([^.]+)$/,o=/^-?(Infinity|NaN)$/,t=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(l,c,n,f){var u,s=n?c:c.replace(t,"");if(o.test(s))l.s=isNaN(s)?null:s<0?-1:1;else{if(!n&&(s=s.replace(e,function(a,g,w){return u=(w=w.toLowerCase())=="x"?16:w=="b"?2:8,!f||f==u?g:a}),f&&(u=f,s=s.replace(r,"$1").replace(i,"0.$1")),c!=s))return new h(s,u);if(h.DEBUG)throw Error(C+"Not a"+(f?" base "+f:"")+" number: "+c);l.s=null}l.c=l.e=null}}();function $(e,r,i,o){var t,l,c,n,f,u,s,a=e.c,g=ue;if(a){e:{for(t=1,n=a[0];n>=10;n/=10,t++);if(l=r-t,l<0)l+=N,c=r,f=a[u=0],s=G(f/g[t-c-1]%10);else if(u=se((l+1)/N),u>=a.length)if(o){for(;a.length<=u;a.push(0));f=s=0,t=1,l%=N,c=l-N+1}else break e;else{for(f=n=a[u],t=1;n>=10;n/=10,t++);l%=N,c=l-N+t,s=c<0?0:G(f/g[t-c-1]%10)}if(o=o||r<0||a[u+1]!=null||(c<0?f:f%g[t-c-1]),o=i<4?(s||o)&&(i==0||i==(e.s<0?3:2)):s>5||s==5&&(i==4||o||i==6&&(l>0?c>0?f/g[t-c]:0:a[u-1])%10&1||i==(e.s<0?8:7)),r<1||!a[0])return a.length=0,o?(r-=e.e+1,a[0]=g[(N-r%N)%N],e.e=-r||0):a[0]=e.e=0,e;if(l==0?(a.length=u,n=1,u--):(a.length=u+1,n=g[N-l],a[u]=c>0?G(f/g[t-c]%g[c])*n:0),o)for(;;)if(u==0){for(l=1,c=a[0];c>=10;c/=10,l++);for(c=a[0]+=n,n=1;c>=10;c/=10,n++);l!=n&&(e.e++,a[0]==z&&(a[0]=1));break}else{if(a[u]+=n,a[u]!=z)break;a[u--]=0,n=1}for(l=a.length;a[--l]===0;a.pop());}e.e>H?e.c=e.e=null:e.e<Z&&(e.c=[e.e=0])}return e}function W(e){var r,i=e.e;return i===null?e.toString():(r=F(e.c),r=i<=U||i>=k?ne(r,i):V(r,i,"0"),e.s<0?"-"+r:r)}return p.absoluteValue=p.abs=function(){var e=new h(this);return e.s<0&&(e.s=1),e},p.comparedTo=function(e,r){return Q(this,new h(e,r))},p.decimalPlaces=p.dp=function(e,r){var i,o,t,l=this;if(e!=null)return _(e,0,D),r==null?r=B:_(r,0,8),$(new h(l),e+l.e+1,r);if(!(i=l.c))return null;if(o=((t=i.length-1)-q(this.e/N))*N,t=i[t])for(;t%10==0;t/=10,o--);return o<0&&(o=0),o},p.dividedBy=p.div=function(e,r){return E(this,new h(e,r),x,B)},p.dividedToIntegerBy=p.idiv=function(e,r){return E(this,new h(e,r),0,1)},p.exponentiatedBy=p.pow=function(e,r){var i,o,t,l,c,n,f,u,s,a=this;if(e=new h(e),e.c&&!e.isInteger())throw Error(C+"Exponent not an integer: "+W(e));if(r!=null&&(r=new h(r)),n=e.e>14,!a.c||!a.c[0]||a.c[0]==1&&!a.e&&a.c.length==1||!e.c||!e.c[0])return s=new h(Math.pow(+W(a),n?e.s*(2-ie(e)):+W(e))),r?s.mod(r):s;if(f=e.s<0,r){if(r.c?!r.c[0]:!r.s)return new h(NaN);o=!f&&a.isInteger()&&r.isInteger(),o&&(a=a.mod(r))}else{if(e.e>9&&(a.e>0||a.e<-1||(a.e==0?a.c[0]>1||n&&a.c[1]>=24e7:a.c[0]<8e13||n&&a.c[0]<=9999975e7)))return l=a.s<0&&ie(e)?-0:0,a.e>-1&&(l=1/l),new h(f?1/l:l);J&&(l=se(J/N+2))}for(n?(i=new h(.5),f&&(e.s=1),u=ie(e)):(t=Math.abs(+W(e)),u=t%2),s=new h(M);;){if(u){if(s=s.times(a),!s.c)break;l?s.c.length>l&&(s.c.length=l):o&&(s=s.mod(r))}if(t){if(t=G(t/2),t===0)break;u=t%2}else if(e=e.times(i),$(e,e.e+1,1),e.e>14)u=ie(e);else{if(t=+W(e),t===0)break;u=t%2}a=a.times(a),l?a.c&&a.c.length>l&&(a.c.length=l):o&&(a=a.mod(r))}return o?s:(f&&(s=M.div(s)),r?s.mod(r):l?$(s,J,B,c):s)},p.integerValue=function(e){var r=new h(this);return e==null?e=B:_(e,0,8),$(r,r.e+1,e)},p.isEqualTo=p.eq=function(e,r){return Q(this,new h(e,r))===0},p.isFinite=function(){return!!this.c},p.isGreaterThan=p.gt=function(e,r){return Q(this,new h(e,r))>0},p.isGreaterThanOrEqualTo=p.gte=function(e,r){return(r=Q(this,new h(e,r)))===1||r===0},p.isInteger=function(){return!!this.c&&q(this.e/N)>this.c.length-2},p.isLessThan=p.lt=function(e,r){return Q(this,new h(e,r))<0},p.isLessThanOrEqualTo=p.lte=function(e,r){return(r=Q(this,new h(e,r)))===-1||r===0},p.isNaN=function(){return!this.s},p.isNegative=function(){return this.s<0},p.isPositive=function(){return this.s>0},p.isZero=function(){return!!this.c&&this.c[0]==0},p.minus=function(e,r){var i,o,t,l,c=this,n=c.s;if(e=new h(e,r),r=e.s,!n||!r)return new h(NaN);if(n!=r)return e.s=-r,c.plus(e);var f=c.e/N,u=e.e/N,s=c.c,a=e.c;if(!f||!u){if(!s||!a)return s?(e.s=-r,e):new h(a?c:NaN);if(!s[0]||!a[0])return a[0]?(e.s=-r,e):new h(s[0]?c:B==3?-0:0)}if(f=q(f),u=q(u),s=s.slice(),n=f-u){for((l=n<0)?(n=-n,t=s):(u=f,t=a),t.reverse(),r=n;r--;t.push(0));t.reverse()}else for(o=(l=(n=s.length)<(r=a.length))?n:r,n=r=0;r<o;r++)if(s[r]!=a[r]){l=s[r]<a[r];break}if(l&&(t=s,s=a,a=t,e.s=-e.s),r=(o=a.length)-(i=s.length),r>0)for(;r--;s[i++]=0);for(r=z-1;o>n;){if(s[--o]<a[o]){for(i=o;i&&!s[--i];s[i]=r);--s[i],s[o]+=z}s[o]-=a[o]}for(;s[0]==0;s.splice(0,1),--u);return s[0]?pe(e,s,u):(e.s=B==3?-1:1,e.c=[e.e=0],e)},p.modulo=p.mod=function(e,r){var i,o,t=this;return e=new h(e,r),!t.c||!e.s||e.c&&!e.c[0]?new h(NaN):!e.c||t.c&&!t.c[0]?new h(t):(ee==9?(o=e.s,e.s=1,i=E(t,e,0,3),e.s=o,i.s*=o):i=E(t,e,0,ee),e=t.minus(i.times(e)),!e.c[0]&&ee==1&&(e.s=t.s),e)},p.multipliedBy=p.times=function(e,r){var i,o,t,l,c,n,f,u,s,a,g,w,d,S,T,m=this,A=m.c,P=(e=new h(e,r)).c;if(!A||!P||!A[0]||!P[0])return!m.s||!e.s||A&&!A[0]&&!P||P&&!P[0]&&!A?e.c=e.e=e.s=null:(e.s*=m.s,!A||!P?e.c=e.e=null:(e.c=[0],e.e=0)),e;for(o=q(m.e/N)+q(e.e/N),e.s*=m.s,f=A.length,a=P.length,f<a&&(d=A,A=P,P=d,t=f,f=a,a=t),t=f+a,d=[];t--;d.push(0));for(S=z,T=Y,t=a;--t>=0;){for(i=0,g=P[t]%T,w=P[t]/T|0,c=f,l=t+c;l>t;)u=A[--c]%T,s=A[c]/T|0,n=w*u+s*g,u=g*u+n%T*T+d[l]+i,i=(u/S|0)+(n/T|0)+w*s,d[l--]=u%S;d[l]=i}return i?++o:d.splice(0,1),pe(e,d,o)},p.negated=function(){var e=new h(this);return e.s=-e.s||null,e},p.plus=function(e,r){var i,o=this,t=o.s;if(e=new h(e,r),r=e.s,!t||!r)return new h(NaN);if(t!=r)return e.s=-r,o.minus(e);var l=o.e/N,c=e.e/N,n=o.c,f=e.c;if(!l||!c){if(!n||!f)return new h(t/0);if(!n[0]||!f[0])return f[0]?e:new h(n[0]?o:t*0)}if(l=q(l),c=q(c),n=n.slice(),t=l-c){for(t>0?(c=l,i=f):(t=-t,i=n),i.reverse();t--;i.push(0));i.reverse()}for(t=n.length,r=f.length,t-r<0&&(i=f,f=n,n=i,r=t),t=0;r;)t=(n[--r]=n[r]+f[r]+t)/z|0,n[r]=z===n[r]?0:n[r]%z;return t&&(n=[t].concat(n),++c),pe(e,n,c)},p.precision=p.sd=function(e,r){var i,o,t,l=this;if(e!=null&&e!==!!e)return _(e,1,D),r==null?r=B:_(r,0,8),$(new h(l),e,r);if(!(i=l.c))return null;if(t=i.length-1,o=t*N+1,t=i[t]){for(;t%10==0;t/=10,o--);for(t=i[0];t>=10;t/=10,o++);}return e&&l.e+1>o&&(o=l.e+1),o},p.shiftedBy=function(e){return _(e,-oe,oe),this.times("1e"+e)},p.squareRoot=p.sqrt=function(){var e,r,i,o,t,l=this,c=l.c,n=l.s,f=l.e,u=x+4,s=new h("0.5");if(n!==1||!c||!c[0])return new h(!n||n<0&&(!c||c[0])?NaN:c?l:1/0);if(n=Math.sqrt(+W(l)),n==0||n==1/0?(r=F(c),(r.length+f)%2==0&&(r+="0"),n=Math.sqrt(+r),f=q((f+1)/2)-(f<0||f%2),n==1/0?r="5e"+f:(r=n.toExponential(),r=r.slice(0,r.indexOf("e")+1)+f),i=new h(r)):i=new h(n+""),i.c[0]){for(f=i.e,n=f+u,n<3&&(n=0);;)if(t=i,i=s.times(t.plus(E(l,t,u,1))),F(t.c).slice(0,n)===(r=F(i.c)).slice(0,n))if(i.e<f&&--n,r=r.slice(n-3,n+1),r=="9999"||!o&&r=="4999"){if(!o&&($(t,t.e+x+2,0),t.times(t).eq(l))){i=t;break}u+=4,n+=4,o=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&($(i,i.e+x+2,1),e=!i.times(i).eq(l));break}}return $(i,i.e+x+1,B,e)},p.toExponential=function(e,r){return e!=null&&(_(e,0,D),e++),he(this,e,r,1)},p.toFixed=function(e,r){return e!=null&&(_(e,0,D),e=e+this.e+1),he(this,e,r)},p.toFormat=function(e,r,i){var o,t=this;if(i==null)e!=null&&r&&typeof r=="object"?(i=r,r=null):e&&typeof e=="object"?(i=e,e=r=null):i=ce;else if(typeof i!="object")throw Error(C+"Argument not an object: "+i);if(o=t.toFixed(e,r),t.c){var l,c=o.split("."),n=+i.groupSize,f=+i.secondaryGroupSize,u=i.groupSeparator||"",s=c[0],a=c[1],g=t.s<0,w=g?s.slice(1):s,d=w.length;if(f&&(l=n,n=f,f=l,d-=l),n>0&&d>0){for(l=d%n||n,s=w.substr(0,l);l<d;l+=n)s+=u+w.substr(l,n);f>0&&(s+=u+w.slice(l)),g&&(s="-"+s)}o=a?s+(i.decimalSeparator||"")+((f=+i.fractionGroupSize)?a.replace(new RegExp("\\d{"+f+"}\\B","g"),"$&"+(i.fractionGroupSeparator||"")):a):s}return(i.prefix||"")+o+(i.suffix||"")},p.toFraction=function(e){var r,i,o,t,l,c,n,f,u,s,a,g,w=this,d=w.c;if(e!=null&&(n=new h(e),!n.isInteger()&&(n.c||n.s!==1)||n.lt(M)))throw Error(C+"Argument "+(n.isInteger()?"out of range: ":"not an integer: ")+W(n));if(!d)return new h(w);for(r=new h(M),u=i=new h(M),o=f=new h(M),g=F(d),l=r.e=g.length-w.e-1,r.c[0]=ue[(c=l%N)<0?N+c:c],e=!e||n.comparedTo(r)>0?l>0?r:u:n,c=H,H=1/0,n=new h(g),f.c[0]=0;s=E(n,r,0,1),t=i.plus(s.times(o)),t.comparedTo(e)!=1;)i=o,o=t,u=f.plus(s.times(t=u)),f=t,r=n.minus(s.times(t=r)),n=t;return t=E(e.minus(i),o,0,1),f=f.plus(t.times(u)),i=i.plus(t.times(o)),f.s=u.s=w.s,l=l*2,a=E(u,o,l,B).minus(w).abs().comparedTo(E(f,i,l,B).minus(w).abs())<1?[u,o]:[f,i],H=c,a},p.toNumber=function(){return+W(this)},p.toPrecision=function(e,r){return e!=null&&_(e,1,D),he(this,e,r,2)},p.toString=function(e){var r,i=this,o=i.s,t=i.e;return t===null?o?(r="Infinity",o<0&&(r="-"+r)):r="NaN":(e==null?r=t<=U||t>=k?ne(F(i.c),t):V(F(i.c),t,"0"):e===10&&ae?(i=$(new h(i),x+t+1,B),r=V(F(i.c),i.e,"0")):(_(e,2,j.length,"Base"),r=v(V(F(i.c),t,"0"),10,e,o,!0)),o<0&&i.c[0]&&(r="-"+r)),r},p.valueOf=p.toJSON=function(){return W(this)},p._isBigNumber=!0,O!=null&&h.set(O),h}function q(O){var E=O|0;return O>0||O===E?E:E-1}function F(O){for(var E,v,I=1,p=O.length,M=O[0]+"";I<p;){for(E=O[I++]+"",v=N-E.length;v--;E="0"+E);M+=E}for(p=M.length;M.charCodeAt(--p)===48;);return M.slice(0,p+1||1)}function Q(O,E){var v,I,p=O.c,M=E.c,x=O.s,B=E.s,U=O.e,k=E.e;if(!x||!B)return null;if(v=p&&!p[0],I=M&&!M[0],v||I)return v?I?0:-B:x;if(x!=B)return x;if(v=x<0,I=U==k,!p||!M)return I?0:!p^v?1:-1;if(!I)return U>k^v?1:-1;for(B=(U=p.length)<(k=M.length)?U:k,x=0;x<B;x++)if(p[x]!=M[x])return p[x]>M[x]^v?1:-1;return U==k?0:U>k^v?1:-1}function _(O,E,v,I){if(O<E||O>v||O!==G(O))throw Error(C+(I||"Argument")+(typeof O=="number"?O<E||O>v?" out of range: ":" not an integer: ":" not a primitive number: ")+String(O))}function ie(O){var E=O.c.length-1;return q(O.e/N)==E&&O.c[E]%2!=0}function ne(O,E){return(O.length>1?O.charAt(0)+"."+O.slice(1):O)+(E<0?"e":"e+")+E}function V(O,E,v){var I,p;if(E<0){for(p=v+".";++E;p+=v);O=p+O}else if(I=O.length,++E>I){for(p=v,E-=I;--E;p+=v);O+=p}else E<I&&(O=O.slice(0,E)+"."+O.slice(E));return O}b=Oe(),b.default=b.BigNumber=b,Ne.exports?Ne.exports=b:(le||(le=typeof self<"u"&&self?self:window),le.BigNumber=b)})(ve)}(fe)),fe.exports}export{Re as a,Ie as r};
@@ -1 +1 @@
1
- import{ak as i}from"./index-uXQ32ATB.js";class e{key="distribution-histories";async getAll(t){return await i.get(`/${this.key}/`,{params:t})}}const l=new e;class r{key="distribution-statuses";async getAll(t){return await i.get(`/${this.key}/`,{params:t})}async initialize(){return await i.post(`/${this.key}/initialize/`)}}const c=new r;class a{key="distribution-levels";async getAll(t){return await i.get(`/${this.key}/`,{params:t})}}const u=new a;class n{key="shorturl";async create(t){return await i.post(`/${this.key}`,{content:t})}}const y=new n;export{c as a,l as b,u as d,y as s};
1
+ import{ak as i}from"./index-CJUWpJze.js";class e{key="distribution-histories";async getAll(t){return await i.get(`/${this.key}/`,{params:t})}}const l=new e;class r{key="distribution-statuses";async getAll(t){return await i.get(`/${this.key}/`,{params:t})}async initialize(){return await i.post(`/${this.key}/initialize/`)}}const c=new r;class a{key="distribution-levels";async getAll(t){return await i.get(`/${this.key}/`,{params:t})}}const u=new a;class n{key="shorturl";async create(t){return await i.post(`/${this.key}`,{content:t})}}const y=new n;export{c as a,l as b,u as d,y as s};
@@ -1 +1 @@
1
- import{g as W}from"./vendor-dayjs-CzbnksQQ.js";import{P as T,B as A}from"./vendor-web3-2Fpu-X2r.js";import"./vendor-vue-1w_NBnjl.js";var L={exports:{}},S;function M(){return S||(S=1,function(f){var s=Object.prototype.hasOwnProperty,e="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(e=!1));function i(a,t,o){this.fn=a,this.context=t,this.once=o||!1}function r(a,t,o,c,_){if(typeof o!="function")throw new TypeError("The listener must be a function");var v=new i(o,c||a,_),h=e?e+t:t;return a._events[h]?a._events[h].fn?a._events[h]=[a._events[h],v]:a._events[h].push(v):(a._events[h]=v,a._eventsCount++),a}function d(a,t){--a._eventsCount===0?a._events=new n:delete a._events[t]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var t=[],o,c;if(this._eventsCount===0)return t;for(c in o=this._events)s.call(o,c)&&t.push(e?c.slice(1):c);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(o)):t},l.prototype.listeners=function(t){var o=e?e+t:t,c=this._events[o];if(!c)return[];if(c.fn)return[c.fn];for(var _=0,v=c.length,h=new Array(v);_<v;_++)h[_]=c[_].fn;return h},l.prototype.listenerCount=function(t){var o=e?e+t:t,c=this._events[o];return c?c.fn?1:c.length:0},l.prototype.emit=function(t,o,c,_,v,h){var y=e?e+t:t;if(!this._events[y])return!1;var u=this._events[y],w=arguments.length,b,p;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),w){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,o),!0;case 3:return u.fn.call(u.context,o,c),!0;case 4:return u.fn.call(u.context,o,c,_),!0;case 5:return u.fn.call(u.context,o,c,_,v),!0;case 6:return u.fn.call(u.context,o,c,_,v,h),!0}for(p=1,b=new Array(w-1);p<w;p++)b[p-1]=arguments[p];u.fn.apply(u.context,b)}else{var K=u.length,g;for(p=0;p<K;p++)switch(u[p].once&&this.removeListener(t,u[p].fn,void 0,!0),w){case 1:u[p].fn.call(u[p].context);break;case 2:u[p].fn.call(u[p].context,o);break;case 3:u[p].fn.call(u[p].context,o,c);break;case 4:u[p].fn.call(u[p].context,o,c,_);break;default:if(!b)for(g=1,b=new Array(w-1);g<w;g++)b[g-1]=arguments[g];u[p].fn.apply(u[p].context,b)}}return!0},l.prototype.on=function(t,o,c){return r(this,t,o,c,!1)},l.prototype.once=function(t,o,c){return r(this,t,o,c,!0)},l.prototype.removeListener=function(t,o,c,_){var v=e?e+t:t;if(!this._events[v])return this;if(!o)return d(this,v),this;var h=this._events[v];if(h.fn)h.fn===o&&(!_||h.once)&&(!c||h.context===c)&&d(this,v);else{for(var y=0,u=[],w=h.length;y<w;y++)(h[y].fn!==o||_&&!h[y].once||c&&h[y].context!==c)&&u.push(h[y]);u.length?this._events[v]=u.length===1?u[0]:u:d(this,v)}return this},l.prototype.removeAllListeners=function(t){var o;return t?(o=e?e+t:t,this._events[o]&&d(this,o)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=e,l.EventEmitter=l,f.exports=l}(L)),L.exports}var R=M();const U=W(R);var $=function(){var f=function(s,e){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])},f(s,e)};return function(s,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");f(s,e);function n(){this.constructor=s}s.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),q=function(f){$(s,f);function s(){return f!==null&&f.apply(this,arguments)||this}return s}(U),C={exports:{}},I;function D(){return I||(I=1,function(f){var s=Object.prototype.hasOwnProperty,e="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(e=!1));function i(a,t,o){this.fn=a,this.context=t,this.once=o||!1}function r(a,t,o,c,_){if(typeof o!="function")throw new TypeError("The listener must be a function");var v=new i(o,c||a,_),h=e?e+t:t;return a._events[h]?a._events[h].fn?a._events[h]=[a._events[h],v]:a._events[h].push(v):(a._events[h]=v,a._eventsCount++),a}function d(a,t){--a._eventsCount===0?a._events=new n:delete a._events[t]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var t=[],o,c;if(this._eventsCount===0)return t;for(c in o=this._events)s.call(o,c)&&t.push(e?c.slice(1):c);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(o)):t},l.prototype.listeners=function(t){var o=e?e+t:t,c=this._events[o];if(!c)return[];if(c.fn)return[c.fn];for(var _=0,v=c.length,h=new Array(v);_<v;_++)h[_]=c[_].fn;return h},l.prototype.listenerCount=function(t){var o=e?e+t:t,c=this._events[o];return c?c.fn?1:c.length:0},l.prototype.emit=function(t,o,c,_,v,h){var y=e?e+t:t;if(!this._events[y])return!1;var u=this._events[y],w=arguments.length,b,p;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),w){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,o),!0;case 3:return u.fn.call(u.context,o,c),!0;case 4:return u.fn.call(u.context,o,c,_),!0;case 5:return u.fn.call(u.context,o,c,_,v),!0;case 6:return u.fn.call(u.context,o,c,_,v,h),!0}for(p=1,b=new Array(w-1);p<w;p++)b[p-1]=arguments[p];u.fn.apply(u.context,b)}else{var K=u.length,g;for(p=0;p<K;p++)switch(u[p].once&&this.removeListener(t,u[p].fn,void 0,!0),w){case 1:u[p].fn.call(u[p].context);break;case 2:u[p].fn.call(u[p].context,o);break;case 3:u[p].fn.call(u[p].context,o,c);break;case 4:u[p].fn.call(u[p].context,o,c,_);break;default:if(!b)for(g=1,b=new Array(w-1);g<w;g++)b[g-1]=arguments[g];u[p].fn.apply(u[p].context,b)}}return!0},l.prototype.on=function(t,o,c){return r(this,t,o,c,!1)},l.prototype.once=function(t,o,c){return r(this,t,o,c,!0)},l.prototype.removeListener=function(t,o,c,_){var v=e?e+t:t;if(!this._events[v])return this;if(!o)return d(this,v),this;var h=this._events[v];if(h.fn)h.fn===o&&(!_||h.once)&&(!c||h.context===c)&&d(this,v);else{for(var y=0,u=[],w=h.length;y<w;y++)(h[y].fn!==o||_&&!h[y].once||c&&h[y].context!==c)&&u.push(h[y]);u.length?this._events[v]=u.length===1?u[0]:u:d(this,v)}return this},l.prototype.removeAllListeners=function(t){var o;return t?(o=e?e+t:t,this._events[o]&&d(this,o)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=e,l.EventEmitter=l,f.exports=l}(C)),C.exports}var H=D();const N=W(H);var m=function(f,s,e,n){function i(r){return r instanceof e?r:new e(function(d){d(r)})}return new(e||(e=Promise))(function(r,d){function l(o){try{t(n.next(o))}catch(c){d(c)}}function a(o){try{t(n.throw(o))}catch(c){d(c)}}function t(o){o.done?r(o.value):i(o.value).then(l,a)}t((n=n.apply(f,s||[])).next())})};class z extends N{constructor(s,e){if(super(),this._network=e,this._publicKey=null,this._popup=null,this._handlerAdded=!1,this._nextRequestId=1,this._autoApprove=!1,this._responsePromises=new Map,this.handleMessage=n=>{var i;if(this._injectedProvider&&n.source===window||n.origin===((i=this._providerUrl)===null||i===void 0?void 0:i.origin)&&n.source===this._popup){if(n.data.method==="connected"){const r=new T(n.data.params.publicKey);(!this._publicKey||!this._publicKey.equals(r))&&(this._publicKey&&!this._publicKey.equals(r)&&this.handleDisconnect(),this._publicKey=r,this._autoApprove=!!n.data.params.autoApprove,this.emit("connect",this._publicKey))}else if(n.data.method==="disconnected")this.handleDisconnect();else if(n.data.result||n.data.error){const r=this._responsePromises.get(n.data.id);if(r){const[d,l]=r;n.data.result?d(n.data.result):l(new Error(n.data.error))}}}},this._beforeUnload=()=>{this.disconnect()},B(s))this._injectedProvider=s;else if(G(s))this._providerUrl=new URL(s),this._providerUrl.hash=new URLSearchParams({origin:window.location.origin,network:this._network}).toString();else throw new Error("provider parameter must be an injected provider or a URL string.")}handleConnect(){var s;return this._handlerAdded||(this._handlerAdded=!0,window.addEventListener("message",this.handleMessage),window.addEventListener("beforeunload",this._beforeUnload)),this._injectedProvider?new Promise(e=>{this.sendRequest("connect",{}),e()}):(window.name="parent",this._popup=window.open((s=this._providerUrl)===null||s===void 0?void 0:s.toString(),"_blank","location,resizable,width=460,height=675"),new Promise(e=>{this.once("connect",e)}))}handleDisconnect(){this._handlerAdded&&(this._handlerAdded=!1,window.removeEventListener("message",this.handleMessage),window.removeEventListener("beforeunload",this._beforeUnload)),this._publicKey&&(this._publicKey=null,this.emit("disconnect")),this._responsePromises.forEach(([,s],e)=>{this._responsePromises.delete(e),s(new Error("Wallet disconnected"))})}sendRequest(s,e){return m(this,void 0,void 0,function*(){if(s!=="connect"&&!this.connected)throw new Error("Wallet not connected");const n=this._nextRequestId;return++this._nextRequestId,new Promise((i,r)=>{var d,l,a,t;this._responsePromises.set(n,[i,r]),this._injectedProvider?this._injectedProvider.postMessage({jsonrpc:"2.0",id:n,method:s,params:Object.assign({network:this._network},e)}):((d=this._popup)===null||d===void 0||d.postMessage({jsonrpc:"2.0",id:n,method:s,params:e},(a=(l=this._providerUrl)===null||l===void 0?void 0:l.origin)!==null&&a!==void 0?a:""),this.autoApprove||(t=this._popup)===null||t===void 0||t.focus())})})}get publicKey(){return this._publicKey}get connected(){return this._publicKey!==null}get autoApprove(){return this._autoApprove}connect(){return m(this,void 0,void 0,function*(){this._popup&&this._popup.close(),yield this.handleConnect()})}disconnect(){return m(this,void 0,void 0,function*(){this._injectedProvider&&(yield this.sendRequest("disconnect",{})),this._popup&&this._popup.close(),this.handleDisconnect()})}sign(s,e){return m(this,void 0,void 0,function*(){if(!(s instanceof Uint8Array))throw new Error("Data must be an instance of Uint8Array");const n=yield this.sendRequest("sign",{data:s,display:e}),i=A.decode(n.signature),r=new T(n.publicKey);return{signature:i,publicKey:r}})}signTransaction(s){return m(this,void 0,void 0,function*(){const e=yield this.sendRequest("signTransaction",{message:A.encode(s.serializeMessage())}),n=A.decode(e.signature),i=new T(e.publicKey);return s.addSignature(i,n),s})}signAllTransactions(s){return m(this,void 0,void 0,function*(){const e=yield this.sendRequest("signAllTransactions",{messages:s.map(r=>A.encode(r.serializeMessage()))}),n=e.signatures.map(r=>A.decode(r)),i=new T(e.publicKey);return s=s.map((r,d)=>(r.addSignature(i,n[d]),r)),s})}diffieHellman(s){return m(this,void 0,void 0,function*(){if(!(s instanceof Uint8Array))throw new Error("Data must be an instance of Uint8Array");return yield this.sendRequest("diffieHellman",{publicKey:s})})}}function G(f){return typeof f=="string"}function B(f){return F(f)&&"postMessage"in f&&typeof f.postMessage=="function"}function F(f){return typeof f=="object"&&f!==null}var J=function(){var f=function(s,e){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])},f(s,e)};return function(s,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");f(s,e);function n(){this.constructor=s}s.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),O=function(f,s,e,n){function i(r){return r instanceof e?r:new e(function(d){d(r)})}return new(e||(e=Promise))(function(r,d){function l(o){try{t(n.next(o))}catch(c){d(c)}}function a(o){try{t(n.throw(o))}catch(c){d(c)}}function t(o){o.done?r(o.value):i(o.value).then(l,a)}t((n=n.apply(f,s||[])).next())})},j=function(f,s){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,d;return d={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function l(t){return function(o){return a([t,o])}}function a(t){if(n)throw new TypeError("Generator is already executing.");for(;e;)try{if(n=1,i&&(r=t[0]&2?i.return:t[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,t[1])).done)return r;switch(i=0,r&&(t=[t[0]&2,r.value]),t[0]){case 0:case 1:r=t;break;case 4:return e.label++,{value:t[1],done:!1};case 5:e.label++,i=t[1],t=[0];continue;case 7:t=e.ops.pop(),e.trys.pop();continue;default:if(r=e.trys,!(r=r.length>0&&r[r.length-1])&&(t[0]===6||t[0]===2)){e=0;continue}if(t[0]===3&&(!r||t[1]>r[0]&&t[1]<r[3])){e.label=t[1];break}if(t[0]===6&&e.label<r[1]){e.label=r[1],r=t;break}if(r&&e.label<r[2]){e.label=r[2],e.ops.push(t);break}r[2]&&e.ops.pop(),e.trys.pop();continue}t=s.call(f,e)}catch(o){t=[6,o],i=0}finally{n=r=0}if(t[0]&5)throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}},Q=function(f){J(s,f);function s(e,n){var i=f.call(this)||this;return i._instance=null,i._handleConnect=function(){i.emit("connect")},i._handleDisconnect=function(){window.clearInterval(i._pollTimer),i.emit("disconnect")},i._provider=e,i._network=n,i}return Object.defineProperty(s.prototype,"publicKey",{get:function(){return this._instance.publicKey||null},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"connected",{get:function(){return this._instance.connected||!1},enumerable:!1,configurable:!0}),s.prototype.connect=function(){return O(this,void 0,void 0,function(){var e=this;return j(this,function(n){switch(n.label){case 0:return this._instance=new z(this._provider,this._network),this._instance.on("connect",this._handleConnect),this._instance.on("disconnect",this._handleDisconnect),this._pollTimer=window.setInterval(function(){var i,r;((r=(i=e._instance)===null||i===void 0?void 0:i._popup)===null||r===void 0?void 0:r.closed)!==!1&&e._handleDisconnect()},200),[4,this._instance.connect()];case 1:return n.sent(),[2]}})})},s.prototype.disconnect=function(){return O(this,void 0,void 0,function(){return j(this,function(e){switch(e.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return this._instance.removeAllListeners("connect"),this._instance.removeAllListeners("disconnect"),[4,this._instance.disconnect()];case 1:return e.sent(),[2]}})})},s.prototype.signTransaction=function(e){return O(this,void 0,void 0,function(){return j(this,function(n){switch(n.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._instance.signTransaction(e)];case 1:return[2,n.sent()]}})})},s.prototype.signAllTransactions=function(e){return O(this,void 0,void 0,function(){return j(this,function(n){switch(n.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._instance.signAllTransactions(e)];case 1:return[2,n.sent()]}})})},s.prototype.signMessage=function(e,n){return n===void 0&&(n="hex"),O(this,void 0,void 0,function(){var i;return j(this,function(r){switch(r.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._instance.sign(e,n)];case 1:return i=r.sent().signature,[2,Uint8Array.from(i)]}})})},s}(q),V=function(){var f=function(s,e){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])},f(s,e)};return function(s,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");f(s,e);function n(){this.constructor=s}s.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),k=function(f,s,e,n){function i(r){return r instanceof e?r:new e(function(d){d(r)})}return new(e||(e=Promise))(function(r,d){function l(o){try{t(n.next(o))}catch(c){d(c)}}function a(o){try{t(n.throw(o))}catch(c){d(c)}}function t(o){o.done?r(o.value):i(o.value).then(l,a)}t((n=n.apply(f,s||[])).next())})},P=function(f,s){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,d;return d={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function l(t){return function(o){return a([t,o])}}function a(t){if(n)throw new TypeError("Generator is already executing.");for(;e;)try{if(n=1,i&&(r=t[0]&2?i.return:t[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,t[1])).done)return r;switch(i=0,r&&(t=[t[0]&2,r.value]),t[0]){case 0:case 1:r=t;break;case 4:return e.label++,{value:t[1],done:!1};case 5:e.label++,i=t[1],t=[0];continue;case 7:t=e.ops.pop(),e.trys.pop();continue;default:if(r=e.trys,!(r=r.length>0&&r[r.length-1])&&(t[0]===6||t[0]===2)){e=0;continue}if(t[0]===3&&(!r||t[1]>r[0]&&t[1]<r[3])){e.label=t[1];break}if(t[0]===6&&e.label<r[1]){e.label=r[1],r=t;break}if(r&&e.label<r[2]){e.label=r[2],e.ops.push(t);break}r[2]&&e.ops.pop(),e.trys.pop();continue}t=s.call(f,e)}catch(o){t=[6,o],i=0}finally{n=r=0}if(t[0]&5)throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}},X=function(f){V(s,f);function s(e,n){var i=f.call(this)||this;return i._provider=e,i._network=n,i}return Object.defineProperty(s.prototype,"publicKey",{get:function(){return this._provider.publicKey},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"connected",{get:function(){return this._provider.isConnected},enumerable:!1,configurable:!0}),s.prototype.connect=function(){return k(this,void 0,void 0,function(){var e;return P(this,function(n){switch(n.label){case 0:if(n.trys.push([0,2,,3]),this.connected)throw new Error("Wallet already connected");return[4,this._provider.connect()];case 1:return n.sent(),this.emit("connect"),[3,3];case 2:throw e=n.sent(),this.emit("disconnect"),e;case 3:return[2]}})})},s.prototype.disconnect=function(){return k(this,void 0,void 0,function(){return P(this,function(e){switch(e.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._provider.disconnect()];case 1:return e.sent(),this.emit("disconnect"),[2]}})})},s.prototype.signTransaction=function(e){return k(this,void 0,void 0,function(){return P(this,function(n){switch(n.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._provider.signTransaction(e,this._network)];case 1:return[2,n.sent()]}})})},s.prototype.signAllTransactions=function(e){return k(this,void 0,void 0,function(){return P(this,function(n){switch(n.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._provider.signAllTransactions(e,this._network)];case 1:return[2,n.sent()]}})})},s.prototype.signMessage=function(e){return k(this,void 0,void 0,function(){var n;return P(this,function(i){switch(i.label){case 0:if(!this.connected)throw new Error("Wallet not connected");if(!(e instanceof Uint8Array))throw new Error("Data must be an instance of Uint8Array");return[4,this._provider.signMessage(e)];case 1:return n=i.sent().signature,[2,n]}})})},s}(q),Y=function(){var f=function(s,e){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])},f(s,e)};return function(s,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");f(s,e);function n(){this.constructor=s}s.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),x=function(f,s,e,n){function i(r){return r instanceof e?r:new e(function(d){d(r)})}return new(e||(e=Promise))(function(r,d){function l(o){try{t(n.next(o))}catch(c){d(c)}}function a(o){try{t(n.throw(o))}catch(c){d(c)}}function t(o){o.done?r(o.value):i(o.value).then(l,a)}t((n=n.apply(f,s||[])).next())})},E=function(f,s){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,d;return d={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function l(t){return function(o){return a([t,o])}}function a(t){if(n)throw new TypeError("Generator is already executing.");for(;e;)try{if(n=1,i&&(r=t[0]&2?i.return:t[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,t[1])).done)return r;switch(i=0,r&&(t=[t[0]&2,r.value]),t[0]){case 0:case 1:r=t;break;case 4:return e.label++,{value:t[1],done:!1};case 5:e.label++,i=t[1],t=[0];continue;case 7:t=e.ops.pop(),e.trys.pop();continue;default:if(r=e.trys,!(r=r.length>0&&r[r.length-1])&&(t[0]===6||t[0]===2)){e=0;continue}if(t[0]===3&&(!r||t[1]>r[0]&&t[1]<r[3])){e.label=t[1];break}if(t[0]===6&&e.label<r[1]){e.label=r[1],r=t;break}if(r&&e.label<r[2]){e.label=r[2],e.ops.push(t);break}r[2]&&e.ops.pop(),e.trys.pop();continue}t=s.call(f,e)}catch(o){t=[6,o],i=0}finally{n=r=0}if(t[0]&5)throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}},ne=function(f){Y(s,f);function s(e){var n=f.call(this)||this;return n._network="mainnet-beta",n._adapterInstance=null,n._connectHandler=null,n._connected=function(){n._connectHandler&&(n._connectHandler.resolve(),n._connectHandler=null),n.emit("connect",n.publicKey)},n._disconnected=function(){n._connectHandler&&(n._connectHandler.reject(),n._connectHandler=null),n._adapterInstance=null,n.emit("disconnect")},e?.network&&(n._network=e?.network),e?.provider?n._provider=e?.provider:window.salmon?n._provider=window.salmon:n._provider="https://app.salmonwallet.io",n}return Object.defineProperty(s.prototype,"publicKey",{get:function(){var e;return((e=this._adapterInstance)===null||e===void 0?void 0:e.publicKey)||null},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isConnected",{get:function(){var e;return!!(!((e=this._adapterInstance)===null||e===void 0)&&e.connected)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"connected",{get:function(){return this.isConnected},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"autoApprove",{get:function(){return!1},enumerable:!1,configurable:!0}),s.prototype.connect=function(){return x(this,void 0,void 0,function(){var e=this;return E(this,function(n){switch(n.label){case 0:return this.connected?[2]:(typeof this._provider=="string"?this._adapterInstance=new Q(this._provider,this._network):this._adapterInstance=new X(this._provider,this._network),this._adapterInstance.on("connect",this._connected),this._adapterInstance.on("disconnect",this._disconnected),this._adapterInstance.connect(),[4,new Promise(function(i,r){e._connectHandler={resolve:i,reject:r}})]);case 1:return n.sent(),[2]}})})},s.prototype.disconnect=function(){return x(this,void 0,void 0,function(){return E(this,function(e){switch(e.label){case 0:return this._adapterInstance?[4,this._adapterInstance.disconnect()]:[2];case 1:return e.sent(),[2]}})})},s.prototype.signTransaction=function(e){return x(this,void 0,void 0,function(){return E(this,function(n){switch(n.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._adapterInstance.signTransaction(e)];case 1:return[2,n.sent()]}})})},s.prototype.signAllTransactions=function(e){return x(this,void 0,void 0,function(){return E(this,function(n){switch(n.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._adapterInstance.signAllTransactions(e)];case 1:return[2,n.sent()]}})})},s.prototype.signMessage=function(e,n){return n===void 0&&(n="utf8"),x(this,void 0,void 0,function(){return E(this,function(i){switch(i.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._adapterInstance.signMessage(e,n)];case 1:return[2,i.sent()]}})})},s.prototype.sign=function(e,n){return n===void 0&&(n="utf8"),x(this,void 0,void 0,function(){return E(this,function(i){switch(i.label){case 0:return[4,this.signMessage(e,n)];case 1:return[2,i.sent()]}})})},s}(U);export{ne as default};
1
+ import{g as W}from"./vendor-dayjs-CzbnksQQ.js";import{P as T,B as A}from"./vendor-web3-CPVMttss.js";import"./vendor-vue-1w_NBnjl.js";var L={exports:{}},S;function M(){return S||(S=1,function(f){var s=Object.prototype.hasOwnProperty,e="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(e=!1));function i(a,t,o){this.fn=a,this.context=t,this.once=o||!1}function r(a,t,o,c,_){if(typeof o!="function")throw new TypeError("The listener must be a function");var v=new i(o,c||a,_),h=e?e+t:t;return a._events[h]?a._events[h].fn?a._events[h]=[a._events[h],v]:a._events[h].push(v):(a._events[h]=v,a._eventsCount++),a}function d(a,t){--a._eventsCount===0?a._events=new n:delete a._events[t]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var t=[],o,c;if(this._eventsCount===0)return t;for(c in o=this._events)s.call(o,c)&&t.push(e?c.slice(1):c);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(o)):t},l.prototype.listeners=function(t){var o=e?e+t:t,c=this._events[o];if(!c)return[];if(c.fn)return[c.fn];for(var _=0,v=c.length,h=new Array(v);_<v;_++)h[_]=c[_].fn;return h},l.prototype.listenerCount=function(t){var o=e?e+t:t,c=this._events[o];return c?c.fn?1:c.length:0},l.prototype.emit=function(t,o,c,_,v,h){var y=e?e+t:t;if(!this._events[y])return!1;var u=this._events[y],w=arguments.length,b,p;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),w){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,o),!0;case 3:return u.fn.call(u.context,o,c),!0;case 4:return u.fn.call(u.context,o,c,_),!0;case 5:return u.fn.call(u.context,o,c,_,v),!0;case 6:return u.fn.call(u.context,o,c,_,v,h),!0}for(p=1,b=new Array(w-1);p<w;p++)b[p-1]=arguments[p];u.fn.apply(u.context,b)}else{var K=u.length,g;for(p=0;p<K;p++)switch(u[p].once&&this.removeListener(t,u[p].fn,void 0,!0),w){case 1:u[p].fn.call(u[p].context);break;case 2:u[p].fn.call(u[p].context,o);break;case 3:u[p].fn.call(u[p].context,o,c);break;case 4:u[p].fn.call(u[p].context,o,c,_);break;default:if(!b)for(g=1,b=new Array(w-1);g<w;g++)b[g-1]=arguments[g];u[p].fn.apply(u[p].context,b)}}return!0},l.prototype.on=function(t,o,c){return r(this,t,o,c,!1)},l.prototype.once=function(t,o,c){return r(this,t,o,c,!0)},l.prototype.removeListener=function(t,o,c,_){var v=e?e+t:t;if(!this._events[v])return this;if(!o)return d(this,v),this;var h=this._events[v];if(h.fn)h.fn===o&&(!_||h.once)&&(!c||h.context===c)&&d(this,v);else{for(var y=0,u=[],w=h.length;y<w;y++)(h[y].fn!==o||_&&!h[y].once||c&&h[y].context!==c)&&u.push(h[y]);u.length?this._events[v]=u.length===1?u[0]:u:d(this,v)}return this},l.prototype.removeAllListeners=function(t){var o;return t?(o=e?e+t:t,this._events[o]&&d(this,o)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=e,l.EventEmitter=l,f.exports=l}(L)),L.exports}var R=M();const U=W(R);var $=function(){var f=function(s,e){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])},f(s,e)};return function(s,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");f(s,e);function n(){this.constructor=s}s.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),q=function(f){$(s,f);function s(){return f!==null&&f.apply(this,arguments)||this}return s}(U),C={exports:{}},I;function D(){return I||(I=1,function(f){var s=Object.prototype.hasOwnProperty,e="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(e=!1));function i(a,t,o){this.fn=a,this.context=t,this.once=o||!1}function r(a,t,o,c,_){if(typeof o!="function")throw new TypeError("The listener must be a function");var v=new i(o,c||a,_),h=e?e+t:t;return a._events[h]?a._events[h].fn?a._events[h]=[a._events[h],v]:a._events[h].push(v):(a._events[h]=v,a._eventsCount++),a}function d(a,t){--a._eventsCount===0?a._events=new n:delete a._events[t]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var t=[],o,c;if(this._eventsCount===0)return t;for(c in o=this._events)s.call(o,c)&&t.push(e?c.slice(1):c);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(o)):t},l.prototype.listeners=function(t){var o=e?e+t:t,c=this._events[o];if(!c)return[];if(c.fn)return[c.fn];for(var _=0,v=c.length,h=new Array(v);_<v;_++)h[_]=c[_].fn;return h},l.prototype.listenerCount=function(t){var o=e?e+t:t,c=this._events[o];return c?c.fn?1:c.length:0},l.prototype.emit=function(t,o,c,_,v,h){var y=e?e+t:t;if(!this._events[y])return!1;var u=this._events[y],w=arguments.length,b,p;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),w){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,o),!0;case 3:return u.fn.call(u.context,o,c),!0;case 4:return u.fn.call(u.context,o,c,_),!0;case 5:return u.fn.call(u.context,o,c,_,v),!0;case 6:return u.fn.call(u.context,o,c,_,v,h),!0}for(p=1,b=new Array(w-1);p<w;p++)b[p-1]=arguments[p];u.fn.apply(u.context,b)}else{var K=u.length,g;for(p=0;p<K;p++)switch(u[p].once&&this.removeListener(t,u[p].fn,void 0,!0),w){case 1:u[p].fn.call(u[p].context);break;case 2:u[p].fn.call(u[p].context,o);break;case 3:u[p].fn.call(u[p].context,o,c);break;case 4:u[p].fn.call(u[p].context,o,c,_);break;default:if(!b)for(g=1,b=new Array(w-1);g<w;g++)b[g-1]=arguments[g];u[p].fn.apply(u[p].context,b)}}return!0},l.prototype.on=function(t,o,c){return r(this,t,o,c,!1)},l.prototype.once=function(t,o,c){return r(this,t,o,c,!0)},l.prototype.removeListener=function(t,o,c,_){var v=e?e+t:t;if(!this._events[v])return this;if(!o)return d(this,v),this;var h=this._events[v];if(h.fn)h.fn===o&&(!_||h.once)&&(!c||h.context===c)&&d(this,v);else{for(var y=0,u=[],w=h.length;y<w;y++)(h[y].fn!==o||_&&!h[y].once||c&&h[y].context!==c)&&u.push(h[y]);u.length?this._events[v]=u.length===1?u[0]:u:d(this,v)}return this},l.prototype.removeAllListeners=function(t){var o;return t?(o=e?e+t:t,this._events[o]&&d(this,o)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=e,l.EventEmitter=l,f.exports=l}(C)),C.exports}var H=D();const N=W(H);var m=function(f,s,e,n){function i(r){return r instanceof e?r:new e(function(d){d(r)})}return new(e||(e=Promise))(function(r,d){function l(o){try{t(n.next(o))}catch(c){d(c)}}function a(o){try{t(n.throw(o))}catch(c){d(c)}}function t(o){o.done?r(o.value):i(o.value).then(l,a)}t((n=n.apply(f,s||[])).next())})};class z extends N{constructor(s,e){if(super(),this._network=e,this._publicKey=null,this._popup=null,this._handlerAdded=!1,this._nextRequestId=1,this._autoApprove=!1,this._responsePromises=new Map,this.handleMessage=n=>{var i;if(this._injectedProvider&&n.source===window||n.origin===((i=this._providerUrl)===null||i===void 0?void 0:i.origin)&&n.source===this._popup){if(n.data.method==="connected"){const r=new T(n.data.params.publicKey);(!this._publicKey||!this._publicKey.equals(r))&&(this._publicKey&&!this._publicKey.equals(r)&&this.handleDisconnect(),this._publicKey=r,this._autoApprove=!!n.data.params.autoApprove,this.emit("connect",this._publicKey))}else if(n.data.method==="disconnected")this.handleDisconnect();else if(n.data.result||n.data.error){const r=this._responsePromises.get(n.data.id);if(r){const[d,l]=r;n.data.result?d(n.data.result):l(new Error(n.data.error))}}}},this._beforeUnload=()=>{this.disconnect()},B(s))this._injectedProvider=s;else if(G(s))this._providerUrl=new URL(s),this._providerUrl.hash=new URLSearchParams({origin:window.location.origin,network:this._network}).toString();else throw new Error("provider parameter must be an injected provider or a URL string.")}handleConnect(){var s;return this._handlerAdded||(this._handlerAdded=!0,window.addEventListener("message",this.handleMessage),window.addEventListener("beforeunload",this._beforeUnload)),this._injectedProvider?new Promise(e=>{this.sendRequest("connect",{}),e()}):(window.name="parent",this._popup=window.open((s=this._providerUrl)===null||s===void 0?void 0:s.toString(),"_blank","location,resizable,width=460,height=675"),new Promise(e=>{this.once("connect",e)}))}handleDisconnect(){this._handlerAdded&&(this._handlerAdded=!1,window.removeEventListener("message",this.handleMessage),window.removeEventListener("beforeunload",this._beforeUnload)),this._publicKey&&(this._publicKey=null,this.emit("disconnect")),this._responsePromises.forEach(([,s],e)=>{this._responsePromises.delete(e),s(new Error("Wallet disconnected"))})}sendRequest(s,e){return m(this,void 0,void 0,function*(){if(s!=="connect"&&!this.connected)throw new Error("Wallet not connected");const n=this._nextRequestId;return++this._nextRequestId,new Promise((i,r)=>{var d,l,a,t;this._responsePromises.set(n,[i,r]),this._injectedProvider?this._injectedProvider.postMessage({jsonrpc:"2.0",id:n,method:s,params:Object.assign({network:this._network},e)}):((d=this._popup)===null||d===void 0||d.postMessage({jsonrpc:"2.0",id:n,method:s,params:e},(a=(l=this._providerUrl)===null||l===void 0?void 0:l.origin)!==null&&a!==void 0?a:""),this.autoApprove||(t=this._popup)===null||t===void 0||t.focus())})})}get publicKey(){return this._publicKey}get connected(){return this._publicKey!==null}get autoApprove(){return this._autoApprove}connect(){return m(this,void 0,void 0,function*(){this._popup&&this._popup.close(),yield this.handleConnect()})}disconnect(){return m(this,void 0,void 0,function*(){this._injectedProvider&&(yield this.sendRequest("disconnect",{})),this._popup&&this._popup.close(),this.handleDisconnect()})}sign(s,e){return m(this,void 0,void 0,function*(){if(!(s instanceof Uint8Array))throw new Error("Data must be an instance of Uint8Array");const n=yield this.sendRequest("sign",{data:s,display:e}),i=A.decode(n.signature),r=new T(n.publicKey);return{signature:i,publicKey:r}})}signTransaction(s){return m(this,void 0,void 0,function*(){const e=yield this.sendRequest("signTransaction",{message:A.encode(s.serializeMessage())}),n=A.decode(e.signature),i=new T(e.publicKey);return s.addSignature(i,n),s})}signAllTransactions(s){return m(this,void 0,void 0,function*(){const e=yield this.sendRequest("signAllTransactions",{messages:s.map(r=>A.encode(r.serializeMessage()))}),n=e.signatures.map(r=>A.decode(r)),i=new T(e.publicKey);return s=s.map((r,d)=>(r.addSignature(i,n[d]),r)),s})}diffieHellman(s){return m(this,void 0,void 0,function*(){if(!(s instanceof Uint8Array))throw new Error("Data must be an instance of Uint8Array");return yield this.sendRequest("diffieHellman",{publicKey:s})})}}function G(f){return typeof f=="string"}function B(f){return F(f)&&"postMessage"in f&&typeof f.postMessage=="function"}function F(f){return typeof f=="object"&&f!==null}var J=function(){var f=function(s,e){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])},f(s,e)};return function(s,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");f(s,e);function n(){this.constructor=s}s.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),O=function(f,s,e,n){function i(r){return r instanceof e?r:new e(function(d){d(r)})}return new(e||(e=Promise))(function(r,d){function l(o){try{t(n.next(o))}catch(c){d(c)}}function a(o){try{t(n.throw(o))}catch(c){d(c)}}function t(o){o.done?r(o.value):i(o.value).then(l,a)}t((n=n.apply(f,s||[])).next())})},j=function(f,s){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,d;return d={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function l(t){return function(o){return a([t,o])}}function a(t){if(n)throw new TypeError("Generator is already executing.");for(;e;)try{if(n=1,i&&(r=t[0]&2?i.return:t[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,t[1])).done)return r;switch(i=0,r&&(t=[t[0]&2,r.value]),t[0]){case 0:case 1:r=t;break;case 4:return e.label++,{value:t[1],done:!1};case 5:e.label++,i=t[1],t=[0];continue;case 7:t=e.ops.pop(),e.trys.pop();continue;default:if(r=e.trys,!(r=r.length>0&&r[r.length-1])&&(t[0]===6||t[0]===2)){e=0;continue}if(t[0]===3&&(!r||t[1]>r[0]&&t[1]<r[3])){e.label=t[1];break}if(t[0]===6&&e.label<r[1]){e.label=r[1],r=t;break}if(r&&e.label<r[2]){e.label=r[2],e.ops.push(t);break}r[2]&&e.ops.pop(),e.trys.pop();continue}t=s.call(f,e)}catch(o){t=[6,o],i=0}finally{n=r=0}if(t[0]&5)throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}},Q=function(f){J(s,f);function s(e,n){var i=f.call(this)||this;return i._instance=null,i._handleConnect=function(){i.emit("connect")},i._handleDisconnect=function(){window.clearInterval(i._pollTimer),i.emit("disconnect")},i._provider=e,i._network=n,i}return Object.defineProperty(s.prototype,"publicKey",{get:function(){return this._instance.publicKey||null},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"connected",{get:function(){return this._instance.connected||!1},enumerable:!1,configurable:!0}),s.prototype.connect=function(){return O(this,void 0,void 0,function(){var e=this;return j(this,function(n){switch(n.label){case 0:return this._instance=new z(this._provider,this._network),this._instance.on("connect",this._handleConnect),this._instance.on("disconnect",this._handleDisconnect),this._pollTimer=window.setInterval(function(){var i,r;((r=(i=e._instance)===null||i===void 0?void 0:i._popup)===null||r===void 0?void 0:r.closed)!==!1&&e._handleDisconnect()},200),[4,this._instance.connect()];case 1:return n.sent(),[2]}})})},s.prototype.disconnect=function(){return O(this,void 0,void 0,function(){return j(this,function(e){switch(e.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return this._instance.removeAllListeners("connect"),this._instance.removeAllListeners("disconnect"),[4,this._instance.disconnect()];case 1:return e.sent(),[2]}})})},s.prototype.signTransaction=function(e){return O(this,void 0,void 0,function(){return j(this,function(n){switch(n.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._instance.signTransaction(e)];case 1:return[2,n.sent()]}})})},s.prototype.signAllTransactions=function(e){return O(this,void 0,void 0,function(){return j(this,function(n){switch(n.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._instance.signAllTransactions(e)];case 1:return[2,n.sent()]}})})},s.prototype.signMessage=function(e,n){return n===void 0&&(n="hex"),O(this,void 0,void 0,function(){var i;return j(this,function(r){switch(r.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._instance.sign(e,n)];case 1:return i=r.sent().signature,[2,Uint8Array.from(i)]}})})},s}(q),V=function(){var f=function(s,e){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])},f(s,e)};return function(s,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");f(s,e);function n(){this.constructor=s}s.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),k=function(f,s,e,n){function i(r){return r instanceof e?r:new e(function(d){d(r)})}return new(e||(e=Promise))(function(r,d){function l(o){try{t(n.next(o))}catch(c){d(c)}}function a(o){try{t(n.throw(o))}catch(c){d(c)}}function t(o){o.done?r(o.value):i(o.value).then(l,a)}t((n=n.apply(f,s||[])).next())})},P=function(f,s){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,d;return d={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function l(t){return function(o){return a([t,o])}}function a(t){if(n)throw new TypeError("Generator is already executing.");for(;e;)try{if(n=1,i&&(r=t[0]&2?i.return:t[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,t[1])).done)return r;switch(i=0,r&&(t=[t[0]&2,r.value]),t[0]){case 0:case 1:r=t;break;case 4:return e.label++,{value:t[1],done:!1};case 5:e.label++,i=t[1],t=[0];continue;case 7:t=e.ops.pop(),e.trys.pop();continue;default:if(r=e.trys,!(r=r.length>0&&r[r.length-1])&&(t[0]===6||t[0]===2)){e=0;continue}if(t[0]===3&&(!r||t[1]>r[0]&&t[1]<r[3])){e.label=t[1];break}if(t[0]===6&&e.label<r[1]){e.label=r[1],r=t;break}if(r&&e.label<r[2]){e.label=r[2],e.ops.push(t);break}r[2]&&e.ops.pop(),e.trys.pop();continue}t=s.call(f,e)}catch(o){t=[6,o],i=0}finally{n=r=0}if(t[0]&5)throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}},X=function(f){V(s,f);function s(e,n){var i=f.call(this)||this;return i._provider=e,i._network=n,i}return Object.defineProperty(s.prototype,"publicKey",{get:function(){return this._provider.publicKey},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"connected",{get:function(){return this._provider.isConnected},enumerable:!1,configurable:!0}),s.prototype.connect=function(){return k(this,void 0,void 0,function(){var e;return P(this,function(n){switch(n.label){case 0:if(n.trys.push([0,2,,3]),this.connected)throw new Error("Wallet already connected");return[4,this._provider.connect()];case 1:return n.sent(),this.emit("connect"),[3,3];case 2:throw e=n.sent(),this.emit("disconnect"),e;case 3:return[2]}})})},s.prototype.disconnect=function(){return k(this,void 0,void 0,function(){return P(this,function(e){switch(e.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._provider.disconnect()];case 1:return e.sent(),this.emit("disconnect"),[2]}})})},s.prototype.signTransaction=function(e){return k(this,void 0,void 0,function(){return P(this,function(n){switch(n.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._provider.signTransaction(e,this._network)];case 1:return[2,n.sent()]}})})},s.prototype.signAllTransactions=function(e){return k(this,void 0,void 0,function(){return P(this,function(n){switch(n.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._provider.signAllTransactions(e,this._network)];case 1:return[2,n.sent()]}})})},s.prototype.signMessage=function(e){return k(this,void 0,void 0,function(){var n;return P(this,function(i){switch(i.label){case 0:if(!this.connected)throw new Error("Wallet not connected");if(!(e instanceof Uint8Array))throw new Error("Data must be an instance of Uint8Array");return[4,this._provider.signMessage(e)];case 1:return n=i.sent().signature,[2,n]}})})},s}(q),Y=function(){var f=function(s,e){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])},f(s,e)};return function(s,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");f(s,e);function n(){this.constructor=s}s.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),x=function(f,s,e,n){function i(r){return r instanceof e?r:new e(function(d){d(r)})}return new(e||(e=Promise))(function(r,d){function l(o){try{t(n.next(o))}catch(c){d(c)}}function a(o){try{t(n.throw(o))}catch(c){d(c)}}function t(o){o.done?r(o.value):i(o.value).then(l,a)}t((n=n.apply(f,s||[])).next())})},E=function(f,s){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,d;return d={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function l(t){return function(o){return a([t,o])}}function a(t){if(n)throw new TypeError("Generator is already executing.");for(;e;)try{if(n=1,i&&(r=t[0]&2?i.return:t[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,t[1])).done)return r;switch(i=0,r&&(t=[t[0]&2,r.value]),t[0]){case 0:case 1:r=t;break;case 4:return e.label++,{value:t[1],done:!1};case 5:e.label++,i=t[1],t=[0];continue;case 7:t=e.ops.pop(),e.trys.pop();continue;default:if(r=e.trys,!(r=r.length>0&&r[r.length-1])&&(t[0]===6||t[0]===2)){e=0;continue}if(t[0]===3&&(!r||t[1]>r[0]&&t[1]<r[3])){e.label=t[1];break}if(t[0]===6&&e.label<r[1]){e.label=r[1],r=t;break}if(r&&e.label<r[2]){e.label=r[2],e.ops.push(t);break}r[2]&&e.ops.pop(),e.trys.pop();continue}t=s.call(f,e)}catch(o){t=[6,o],i=0}finally{n=r=0}if(t[0]&5)throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}},ne=function(f){Y(s,f);function s(e){var n=f.call(this)||this;return n._network="mainnet-beta",n._adapterInstance=null,n._connectHandler=null,n._connected=function(){n._connectHandler&&(n._connectHandler.resolve(),n._connectHandler=null),n.emit("connect",n.publicKey)},n._disconnected=function(){n._connectHandler&&(n._connectHandler.reject(),n._connectHandler=null),n._adapterInstance=null,n.emit("disconnect")},e?.network&&(n._network=e?.network),e?.provider?n._provider=e?.provider:window.salmon?n._provider=window.salmon:n._provider="https://app.salmonwallet.io",n}return Object.defineProperty(s.prototype,"publicKey",{get:function(){var e;return((e=this._adapterInstance)===null||e===void 0?void 0:e.publicKey)||null},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isConnected",{get:function(){var e;return!!(!((e=this._adapterInstance)===null||e===void 0)&&e.connected)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"connected",{get:function(){return this.isConnected},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"autoApprove",{get:function(){return!1},enumerable:!1,configurable:!0}),s.prototype.connect=function(){return x(this,void 0,void 0,function(){var e=this;return E(this,function(n){switch(n.label){case 0:return this.connected?[2]:(typeof this._provider=="string"?this._adapterInstance=new Q(this._provider,this._network):this._adapterInstance=new X(this._provider,this._network),this._adapterInstance.on("connect",this._connected),this._adapterInstance.on("disconnect",this._disconnected),this._adapterInstance.connect(),[4,new Promise(function(i,r){e._connectHandler={resolve:i,reject:r}})]);case 1:return n.sent(),[2]}})})},s.prototype.disconnect=function(){return x(this,void 0,void 0,function(){return E(this,function(e){switch(e.label){case 0:return this._adapterInstance?[4,this._adapterInstance.disconnect()]:[2];case 1:return e.sent(),[2]}})})},s.prototype.signTransaction=function(e){return x(this,void 0,void 0,function(){return E(this,function(n){switch(n.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._adapterInstance.signTransaction(e)];case 1:return[2,n.sent()]}})})},s.prototype.signAllTransactions=function(e){return x(this,void 0,void 0,function(){return E(this,function(n){switch(n.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._adapterInstance.signAllTransactions(e)];case 1:return[2,n.sent()]}})})},s.prototype.signMessage=function(e,n){return n===void 0&&(n="utf8"),x(this,void 0,void 0,function(){return E(this,function(i){switch(i.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._adapterInstance.signMessage(e,n)];case 1:return[2,i.sent()]}})})},s.prototype.sign=function(e,n){return n===void 0&&(n="utf8"),x(this,void 0,void 0,function(){return E(this,function(i){switch(i.label){case 0:return[4,this.signMessage(e,n)];case 1:return[2,i.sent()]}})})},s}(U);export{ne as default};