@wormhole-foundation/wormhole-connect 0.3.19-beta.1-development → 0.3.19-beta.4-development

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/dist/assets/{ccip-CC5KdnX-.js → ccip-fCzlhBBT.js} +1 -1
  2. package/dist/assets/cosmos-CZk6ggNU.js +37 -0
  3. package/dist/assets/{cosmwasm-D6dc3HhR.js → cosmwasm-BRgXJAEm.js} +3 -3
  4. package/dist/assets/{ens-validation.es6-JeiZhPFM.js → ens-validation.es6-CEldkK56.js} +1 -1
  5. package/dist/assets/{evm-scnxy1Tm.js → evm-zyz5dAmi.js} +4 -4
  6. package/dist/assets/{index-CfFB0O_w.js → index-2haya2pd.js} +1 -1
  7. package/dist/assets/{index-DdlsdoUO.js → index-BSZP2fsz.js} +1 -1
  8. package/dist/assets/{index-CYsDCGyL.js → index-BUfxN-fw.js} +1 -1
  9. package/dist/assets/{index-CZGBtcJ2.js → index-Cjisu-Ym.js} +1 -1
  10. package/dist/assets/index-CoAwWRVw.js +3 -0
  11. package/dist/assets/{index-DcrZhJuV.js → index-DYCDjsFo.js} +2 -2
  12. package/dist/assets/{index.es-CkKy_bC0.js → index.es-LrzWWyFt.js} +2 -2
  13. package/dist/assets/{solana-DJERwdo1.js → solana-ClUmAbQX.js} +2 -2
  14. package/dist/assets/{solanaEmbed.esm-CYzxDEiX.js → solanaEmbed.esm-BpCHncZo.js} +1 -1
  15. package/dist/assets/{unsignedTransaction-Bbs3hbtB.js → unsignedTransaction-C5QlrOSq.js} +1 -1
  16. package/dist/main.js +11 -11
  17. package/dist/src/components/ManualAddressInput.d.ts.map +1 -1
  18. package/dist/src/components/TokensModal.d.ts.map +1 -1
  19. package/dist/src/telemetry/types.d.ts +1 -0
  20. package/dist/src/telemetry/types.d.ts.map +1 -1
  21. package/dist/src/views/Bridge/Send.d.ts.map +1 -1
  22. package/lib/{algorand-Cn2ASQM8.mjs → algorand-BNtk5Zlz.mjs} +4 -4
  23. package/lib/{algorand-BEj3eMlU.js → algorand-BOA88Yi9.js} +1 -1
  24. package/lib/{aptos-C5usxwjg.js → aptos-09IlHhtG.js} +1 -1
  25. package/lib/{aptos-CgcrUUs6.js → aptos-2Xg1Y_0j.js} +2 -2
  26. package/lib/{aptos-r2dqWkwd.mjs → aptos-DsuCT57P.mjs} +4 -4
  27. package/lib/{aptos-B4K8HU4y.mjs → aptos-ofb4q2o1.mjs} +1 -1
  28. package/lib/{browser-CqNEk73A.mjs → browser-5rNYk7ew.mjs} +2 -2
  29. package/lib/{browser-9qSlzcs1.js → browser-CMlhlM7_.js} +1 -1
  30. package/lib/{ccip-DiTkor0v.js → ccip-BnSw75yc.js} +1 -1
  31. package/lib/{ccip-Cg8GiGjJ.mjs → ccip-rZCaMFot.mjs} +1 -1
  32. package/lib/{chain-CNimQoal.mjs → chain-BZjg2BoT.mjs} +1 -1
  33. package/lib/{chain-BS9tnRQF.js → chain-NLYiTi92.js} +1 -1
  34. package/lib/{cosmos-DAYdruCU.js → cosmos-DeEa4QWd.js} +1 -1
  35. package/lib/{cosmos-kdBLlX5J.mjs → cosmos-IWVkyjMV.mjs} +3 -3
  36. package/lib/{cosmwasm-t4y0gzD9.js → cosmwasm-BFtZD1Ru.js} +2 -2
  37. package/lib/{cosmwasm-BdmGrQe2.mjs → cosmwasm-CGR89px_.mjs} +6 -6
  38. package/lib/{create-BC4-6NQa.js → create-Bpjnlpg_.js} +1 -1
  39. package/lib/{create-Bh45gqri.mjs → create-PB82rGuQ.mjs} +1 -1
  40. package/lib/{ens-validation.es6-B5lcZ1z0.js → ens-validation.es6-BY6Eu6az.js} +1 -1
  41. package/lib/{ens-validation.es6-BBk1nSK3.mjs → ens-validation.es6-D6AE2QT0.mjs} +2 -2
  42. package/lib/{evm-BdLUkbt8.mjs → evm-DB1-WEEt.mjs} +6 -6
  43. package/lib/{evm-ByfaloPB.js → evm-DY9ovr2c.js} +2 -2
  44. package/lib/{evm-CI9jvgpD.mjs → evm-FMLhTUS9.mjs} +6 -6
  45. package/lib/{evm-Cplwt-Uu.js → evm-aLUoXBeT.js} +4 -4
  46. package/lib/{index-CeYAnGJU.js → index-6GqC5Hzz.js} +1 -1
  47. package/lib/{index-ClpF6w41.mjs → index-95lzn8zO.mjs} +5 -5
  48. package/lib/{index-DkHNYEwj.js → index-9SUIf5nS.js} +1 -1
  49. package/lib/{index-RHlQCTsY.js → index-B2IuVewp.js} +1 -1
  50. package/lib/{index-DonnLcua.mjs → index-B2JrUboW.mjs} +6 -6
  51. package/lib/{index-D10P63La.mjs → index-BAMSsTuN.mjs} +4 -4
  52. package/lib/{index-_ey36AjY.mjs → index-BEQsB526.mjs} +2 -2
  53. package/lib/{index-BTJEpkGu.mjs → index-BEjdY6hm.mjs} +5 -5
  54. package/lib/{index-CiNv_vqX.js → index-BG24T1GX.js} +1 -1
  55. package/lib/{index-CLqwNevH.mjs → index-BI-a425p.mjs} +1 -1
  56. package/lib/{index-CZM1nqSC.js → index-BQqBYm1C.js} +1 -1
  57. package/lib/{index-L-oyxcKw.mjs → index-BSpDXKq1.mjs} +4 -4
  58. package/lib/{index-BAfpfiMg.mjs → index-BULQb7l7.mjs} +4 -4
  59. package/lib/{index-DKqdtMJw.mjs → index-Bdzevkwx.mjs} +3 -3
  60. package/lib/{index-DVzNMQU2.mjs → index-BqGrE5rX.mjs} +4 -4
  61. package/lib/{index-BskUJ6-F.js → index-BwTYRqte.js} +1 -1
  62. package/lib/{index-DjJSdBO_.mjs → index-C1JlVOwd.mjs} +77 -63
  63. package/lib/{index-tFdU3m1V.js → index-C7pm5tV-.js} +1 -1
  64. package/lib/{index-DJoVr9ew.mjs → index-CFc6ua8j.mjs} +4 -4
  65. package/lib/{index-D05MUiKM.js → index-COcHH6cV.js} +1 -1
  66. package/lib/{index-dgxqH4Al.mjs → index-CPg2DDGG.mjs} +4 -4
  67. package/lib/{index-v5JYqN5T.js → index-CaF25_vp.js} +1 -1
  68. package/lib/{index-Vqfiz4gq.js → index-CefRPGIJ.js} +1 -1
  69. package/lib/{index-Cms5l5e9.mjs → index-CfOBXKOA.mjs} +2 -2
  70. package/lib/{index-D2283Eib.js → index-Clclaa8l.js} +1 -1
  71. package/lib/{index-6SYLbVVC.mjs → index-Cn3ZByEn.mjs} +5 -5
  72. package/lib/{index-DHNJ7dTI.mjs → index-CswKQSoP.mjs} +3 -3
  73. package/lib/{index-DULgLsXD.mjs → index-Cu-QZ2Yi.mjs} +4 -4
  74. package/lib/{index-DuPl6mJy.mjs → index-CxU-Gb5y.mjs} +4 -4
  75. package/lib/{index-D4polzlG.mjs → index-D0taDsGK.mjs} +4 -4
  76. package/lib/{index-DTYdWw1E.js → index-D1vD1x9T.js} +1 -1
  77. package/lib/{index-B11tXNbe.mjs → index-DHsWcdrI.mjs} +1 -1
  78. package/lib/{index-W5vGD3Jp.js → index-DIhwpM7p.js} +1 -1
  79. package/lib/{index-CyoAaX76.js → index-DRhnM5uA.js} +1 -1
  80. package/lib/{index-CitMOybO.js → index-D_ETBz6p.js} +1 -1
  81. package/lib/{index-Bjg2w3Jp.mjs → index-Df-PgrLd.mjs} +2 -2
  82. package/lib/{index-Cpfo_13K.js → index-DfYc88fY.js} +5 -5
  83. package/lib/{index-DWqHObYQ.js → index-Dph4RybI.js} +1 -1
  84. package/lib/{index-JCeZURsa.mjs → index-Dvg604_r.mjs} +3 -3
  85. package/lib/{index-LbkpxbxU.js → index-DzVxkotY.js} +1 -1
  86. package/lib/{index-DO9Aqf4O.js → index-LMP2SXjR.js} +1 -1
  87. package/lib/{index-D3leTI6y.js → index-M0F8WpQR.js} +1 -1
  88. package/lib/{index-BdZfdhLf.js → index-Na_--gcE.js} +1 -1
  89. package/lib/{index-DC95G-Xg.js → index-aCI_DUM-.js} +1 -1
  90. package/lib/{index-Cc-SRhQH.mjs → index-afsYF03s.mjs} +4 -4
  91. package/lib/{index--XOWHvs8.js → index-tMk2zWGF.js} +1 -1
  92. package/lib/{index.es-CE_sbvG3.mjs → index.es-DqS4HLZw.mjs} +4 -4
  93. package/lib/{index.es-D641bRIm.js → index.es-uerP6wyE.js} +2 -2
  94. package/lib/index.js +1 -1
  95. package/lib/index.mjs +1 -1
  96. package/lib/{libsodium-wrappers-DLsfT6wH.mjs → libsodium-wrappers-B78L643V.mjs} +1 -1
  97. package/lib/{libsodium-wrappers-Dv4avoYQ.js → libsodium-wrappers-DP3-RcK9.js} +1 -1
  98. package/lib/{sei-DSmG2Vzd.mjs → sei-CvQ5fq9U.mjs} +2 -2
  99. package/lib/{sei-BgefK64I.js → sei-D8YL8hcu.js} +1 -1
  100. package/lib/{solana--NAZIp_H.mjs → solana-DIKpxJ66.mjs} +3 -3
  101. package/lib/{solana-D-xykBVb.js → solana-PbyA60e9.js} +1 -1
  102. package/lib/{solana-cDD0Ny2l.js → solana-Q02Qu6Us.js} +2 -2
  103. package/lib/{solana-DGHdzU4Y.mjs → solana-eqcW3EUS.mjs} +6 -6
  104. package/lib/{solanaEmbed.esm-CvJOxxKf.mjs → solanaEmbed.esm-B35xqpi9.mjs} +2 -2
  105. package/lib/{solanaEmbed.esm-SQGeqX2v.js → solanaEmbed.esm-DAJICEjv.js} +1 -1
  106. package/lib/src/components/ManualAddressInput.d.ts.map +1 -1
  107. package/lib/src/components/TokensModal.d.ts.map +1 -1
  108. package/lib/src/telemetry/types.d.ts +1 -0
  109. package/lib/src/telemetry/types.d.ts.map +1 -1
  110. package/lib/src/views/Bridge/Send.d.ts.map +1 -1
  111. package/lib/{sui-CabK_MAW.mjs → sui-CmBrrkS9.mjs} +1 -1
  112. package/lib/{sui-CitobCk-.js → sui-Cz7TcwK6.js} +1 -1
  113. package/lib/{sui-CnL17qoE.mjs → sui-DWSLoSDK.mjs} +4 -4
  114. package/lib/{sui-Bn1nWU88.js → sui-YcpSM6BX.js} +2 -2
  115. package/lib/{unsignedTransaction-wkSutsdc.js → unsignedTransaction-CuG8xbiM.js} +1 -1
  116. package/lib/{unsignedTransaction-Bl6mVw94.mjs → unsignedTransaction-Dgrq3Lq3.mjs} +2 -2
  117. package/package.json +1 -1
  118. package/dist/assets/cosmos-CKUC0334.js +0 -37
  119. package/dist/assets/index-DTubKMVE.js +0 -3
@@ -1,4 +1,4 @@
1
- "use strict";var Ir=Object.defineProperty;var xr=(e,t,r)=>t in e?Ir(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var V=(e,t,r)=>(xr(e,typeof t!="symbol"?t+"":t,r),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("./index-Cpfo_13K.js"),S=require("./sui-Bn1nWU88.js");require("./index-Vqfiz4gq.js");const Ar=require("./chain-BS9tnRQF.js");class _r{constructor(t,r,n,i,s=!1){V(this,"transaction");V(this,"network");V(this,"chain");V(this,"description");V(this,"parallelizable");this.transaction=t,this.network=r,this.chain=n,this.description=i,this.parallelizable=s}}class Cr extends TypeError{constructor(t,r){let n;const{message:i,explanation:s,...o}=t,{path:a}=t,c=a.length===0?i:`At path: ${a.join(".")} -- ${i}`;super(s??c),s!=null&&(this.cause=c),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>n??(n=[t,...r()])}}function Br(e){return K(e)&&typeof e[Symbol.iterator]=="function"}function K(e){return typeof e=="object"&&e!=null}function J(e){return typeof e=="symbol"?e.toString():typeof e=="string"?JSON.stringify(e):`${e}`}function $r(e){const{done:t,value:r}=e.next();return t?void 0:r}function Ur(e,t,r,n){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:i,branch:s}=t,{type:o}=r,{refinement:a,message:c=`Expected a value of type \`${o}\`${a?` with refinement \`${a}\``:""}, but received: \`${J(n)}\``}=e;return{value:n,type:o,refinement:a,key:i[i.length-1],path:i,branch:s,...e,message:c}}function*Vt(e,t,r,n){Br(e)||(e=[e]);for(const i of e){const s=Ur(i,t,r,n);s&&(yield s)}}function*ut(e,t,r={}){const{path:n=[],branch:i=[e],coerce:s=!1,mask:o=!1}=r,a={path:n,branch:i};if(s&&(e=t.coercer(e,a),o&&t.type!=="type"&&K(t.schema)&&K(e)&&!Array.isArray(e)))for(const d in e)t.schema[d]===void 0&&delete e[d];let c="valid";for(const d of t.validator(e,a))d.explanation=r.message,c="not_valid",yield[d,void 0];for(let[d,l,g]of t.entries(e,a)){const m=ut(l,g,{path:d===void 0?n:[...n,d],branch:d===void 0?i:[...i,l],coerce:s,mask:o,message:r.message});for(const y of m)y[0]?(c=y[0].refinement!=null?"not_refined":"not_valid",yield[y[0],void 0]):s&&(l=y[1],d===void 0?e=l:e instanceof Map?e.set(d,l):e instanceof Set?e.add(l):K(e)&&(l!==void 0||d in e)&&(e[d]=l))}if(c!=="not_valid")for(const d of t.refiner(e,a))d.explanation=r.message,c="not_refined",yield[d,void 0];c==="valid"&&(yield[void 0,e])}class te{constructor(t){const{type:r,schema:n,validator:i,refiner:s,coercer:o=c=>c,entries:a=function*(){}}=t;this.type=r,this.schema=n,this.entries=a,this.coercer=o,i?this.validator=(c,d)=>{const l=i(c,d);return Vt(l,d,this,c)}:this.validator=()=>[],s?this.refiner=(c,d)=>{const l=s(c,d);return Vt(l,d,this,c)}:this.refiner=()=>[]}assert(t,r){return tt(t,this,r)}create(t,r){return Kt(t,this,r)}is(t){return L(t,this)}mask(t,r){return Jt(t,this,r)}validate(t,r={}){return Ie(t,this,r)}}function tt(e,t,r){const n=Ie(e,t,{message:r});if(n[0])throw n[0]}function Kt(e,t,r){const n=Ie(e,t,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function Jt(e,t,r){const n=Ie(e,t,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function L(e,t){return!Ie(e,t)[0]}function Ie(e,t,r={}){const n=ut(e,t,r),i=$r(n);return i[0]?[new Cr(i[0],function*(){for(const o of n)o[0]&&(yield o[0])}),void 0]:[void 0,i[1]]}function je(...e){const t=e[0].type==="type",r=e.map(i=>i.schema),n=Object.assign({},...r);return t?Rr(n):p(n)}function W(e,t){return new te({type:e,schema:null,validator:t})}function rt(){return W("any",()=>!0)}function E(e){return new te({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||`Expected an array value, but received: ${J(t)}`}})}function Mr(){return W("bigint",e=>typeof e=="bigint")}function z(){return W("boolean",e=>typeof e=="boolean")}function ee(){return W("integer",e=>typeof e=="number"&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${J(e)}`)}function v(e){const t=J(e),r=typeof e;return new te({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?e:null,validator(n){return n===e||`Expected the literal \`${t}\`, but received: ${J(n)}`}})}function qt(){return W("never",()=>!1)}function $(e){return new te({...e,validator:(t,r)=>t===null||e.validator(t,r),refiner:(t,r)=>t===null||e.refiner(t,r)})}function le(){return W("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${J(e)}`)}function p(e){const t=e?Object.keys(e):[],r=qt();return new te({type:"object",schema:e||null,*entries(n){if(e&&K(n)){const i=new Set(Object.keys(n));for(const s of t)i.delete(s),yield[s,n[s],e[s]];for(const s of i)yield[s,n[s],r]}},validator(n){return K(n)||`Expected an object, but received: ${J(n)}`},coercer(n){return K(n)?{...n}:n}})}function T(e){return new te({...e,validator:(t,r)=>t===void 0||e.validator(t,r),refiner:(t,r)=>t===void 0||e.refiner(t,r)})}function Q(e,t){return new te({type:"record",schema:null,*entries(r){if(K(r))for(const n in r){const i=r[n];yield[n,n,e],yield[n,i,t]}},validator(r){return K(r)||`Expected an object, but received: ${J(r)}`}})}function h(){return W("string",e=>typeof e=="string"||`Expected a string, but received: ${J(e)}`)}function Ht(e){const t=qt();return new te({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(e.length,r.length);for(let i=0;i<n;i++)yield[i,r[i],e[i]||t]}},validator(r){return Array.isArray(r)||`Expected an array, but received: ${J(r)}`}})}function Rr(e){const t=Object.keys(e);return new te({type:"type",schema:e,*entries(r){if(K(r))for(const n of t)yield[n,r[n],e[n]]},validator(r){return K(r)||`Expected an object, but received: ${J(r)}`},coercer(r){return K(r)?{...r}:r}})}function U(e){const t=e.map(r=>r.type).join(" | ");return new te({type:"union",schema:null,coercer(r){for(const n of e){const[i,s]=n.validate(r,{coerce:!0});if(!i)return s}return r},validator(r,n){const i=[];for(const s of e){const[...o]=ut(r,s,n),[a]=o;if(a[0])for(const[c]of o)c&&i.push(c);else return[]}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${J(r)}`,...i]}})}function Xt(){return W("unknown",()=>!0)}const dt=U([p({AddressOwner:h()}),p({ObjectOwner:h()}),p({Shared:p({initial_shared_version:$(h())})}),v("Immutable")]);W("SuiJsonValue",()=>!0);const Pr=U([p({u32:h()}),p({u64:h()}),p({f64:h()})]);p({attributes:Q(h(),$(Pr)),featureFlags:Q(h(),z()),maxSupportedProtocolVersion:h(),minSupportedProtocolVersion:h(),protocolVersion:h()});U([h(),v("package")]);const oe=p({digest:h(),objectId:h(),version:U([le(),h(),Mr()])});p({owner:dt,reference:oe});p({objectId:h(),sequenceNumber:h()});p({payment:E(oe),owner:h(),price:h(),budget:h()});const Nr=je(oe,p({type:h(),owner:dt,previousTransaction:h()})),Dr=Q(h(),rt()),zr=Q(h(),Xt()),Vr=p({type:h(),fields:Dr,hasPublicTransfer:z()}),Fr=p({disassembled:zr}),Gr=U([je(Vr,p({dataType:v("moveObject")})),je(Fr,p({dataType:v("package")}))]),Lr=p({type:h(),hasPublicTransfer:z(),version:h(),bcsBytes:h()}),Wr=p({id:h(),moduleMap:Q(h(),h())}),Kr=U([je(Lr,p({dataType:v("moveObject")})),je(Wr,p({dataType:v("package")}))]);BigInt(1e9);const Zt=p({code:h(),error:T(h()),object_id:T(h()),parent_object_id:T(h()),version:T(h()),digest:T(h())}),Jr=p({data:$(T(Q(h(),h()))),error:$(T(Zt))}),qr=U([Jr,T(Q(h(),h()))]),Yt=p({objectId:h(),version:h(),digest:h(),type:$(T(h())),content:$(T(Gr)),bcs:$(T(Kr)),owner:$(T(dt)),previousTransaction:$(T(h())),storageRebate:$(T(h())),display:$(T(qr))});p({showType:$(T(z())),showContent:$(T(z())),showBcs:$(T(z())),showOwner:$(T(z())),showPreviousTransaction:$(T(z())),showStorageRebate:$(T(z())),showDisplay:$(T(z()))});U([v("Exists"),v("notExists"),v("Deleted")]);E(Nr);const Hr=p({data:$(T(Yt)),error:$(T(Zt))});function Xr(e){return e.data}function Zr(e){if(e.error&&"object_id"in e.error&&"version"in e.error&&"digest"in e.error){const t=e.error;return{objectId:t.object_id,version:t.version,digest:t.digest}}}function Ft(e){if("reference"in e)return e.reference;const t=Xr(e);return t?{objectId:t.objectId,version:t.version,digest:t.digest}:Zr(e)}p({objectId:h(),atCheckpoint:T(le())});p({data:E(Hr),nextCursor:T($(h())),hasNextPage:z()});U([p({details:Yt,status:v("VersionFound")}),p({details:h(),status:v("ObjectNotExists")}),p({details:oe,status:v("ObjectDeleted")}),p({details:Ht([h(),le()]),status:v("VersionNotFound")}),p({details:p({asked_version:le(),latest_version:le(),object_id:h()}),status:v("VersionTooHigh")})]);const Yr=U([h(),p({Object:h()})]);E(Yr);const Qr=p({address:h(),name:h()}),en=U([v("Private"),v("Public"),v("Friend")]),lt=p({abilities:E(h())}),tn=p({constraints:lt,isPhantom:z()}),rn=p({TypeParameter:le()}),qe=Ht([p({module:h(),package:h(),function:h()}),h()]);p({rank3Days:E(qe),rank7Days:E(qe),rank30Days:E(qe)});function Qt(e){if(!e)return!1;if(typeof e=="string"||L(e,rn)||er(e))return!0;if(typeof e!="object")return!1;const t=e;return!!(L(t.Reference,pe)||L(t.MutableReference,pe)||L(t.Vector,pe))}const pe=W("SuiMoveNormalizedType",Qt);function er(e){if(!e||typeof e!="object")return!1;const t=e;if(!t.Struct||typeof t.Struct!="object")return!1;const r=t.Struct;return!(typeof r.address!="string"||typeof r.module!="string"||typeof r.name!="string"||!Array.isArray(r.typeArguments)||!r.typeArguments.every(n=>Qt(n)))}W("SuiMoveNormalizedStructType",er);const nn=p({visibility:en,isEntry:z(),typeParameters:E(lt),parameters:E(pe),return:E(pe)}),sn=p({name:h(),type:pe}),an=p({abilities:lt,typeParameters:E(tn),fields:E(sn)}),on=p({fileFormatVersion:le(),address:h(),name:h(),friends:E(Qr),structs:Q(h(),an),exposedFunctions:Q(h(),nn)});Q(h(),on);function nt(e){return typeof e=="object"&&"MutableReference"in e?e.MutableReference:void 0}function tr(e){return typeof e=="object"&&"Reference"in e?e.Reference:void 0}function ft(e){if(typeof e=="object"&&"Struct"in e)return e;const t=tr(e),r=nt(e);if(typeof t=="object"&&"Struct"in t)return t;if(typeof r=="object"&&"Struct"in r)return r}function cn(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r<t.length;r++)t[r]=255;for(var n=0;n<e.length;n++){var i=e.charAt(n),s=i.charCodeAt(0);if(t[s]!==255)throw new TypeError(i+" is ambiguous");t[s]=n}var o=e.length,a=e.charAt(0),c=Math.log(o)/Math.log(256),d=Math.log(256)/Math.log(o);function l(y){if(y instanceof Uint8Array||(ArrayBuffer.isView(y)?y=new Uint8Array(y.buffer,y.byteOffset,y.byteLength):Array.isArray(y)&&(y=Uint8Array.from(y))),!(y instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(y.length===0)return"";for(var w=0,b=0,f=0,x=y.length;f!==x&&y[f]===0;)f++,w++;for(var C=(x-f)*d+1>>>0,P=new Uint8Array(C);f!==x;){for(var A=y[f],k=0,N=C-1;(A!==0||k<b)&&N!==-1;N--,k++)A+=256*P[N]>>>0,P[N]=A%o>>>0,A=A/o>>>0;if(A!==0)throw new Error("Non-zero carry");b=k,f++}for(var q=C-b;q!==C&&P[q]===0;)q++;for(var he=a.repeat(w);q<C;++q)he+=e.charAt(P[q]);return he}function g(y){if(typeof y!="string")throw new TypeError("Expected String");if(y.length===0)return new Uint8Array;for(var w=0,b=0,f=0;y[w]===a;)b++,w++;for(var x=(y.length-w)*c+1>>>0,C=new Uint8Array(x);y[w];){var P=t[y.charCodeAt(w)];if(P===255)return;for(var A=0,k=x-1;(P!==0||A<f)&&k!==-1;k--,A++)P+=o*C[k]>>>0,C[k]=P%256>>>0,P=P/256>>>0;if(P!==0)throw new Error("Non-zero carry");f=A,w++}for(var N=x-f;N!==x&&C[N]===0;)N++;for(var q=new Uint8Array(b+(x-N)),he=b;N!==x;)q[he++]=C[N++];return q}function m(y){var w=g(y);if(w)return w;throw new Error("Non-base"+o+" character")}return{encode:l,decodeUnsafe:g,decode:m}}var un=cn;const dn=un,ln="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";var fn=dn(ln);const rr=B.getDefaultExportFromCjs(fn),xe=e=>rr.encode(e),ht=e=>rr.decode(e);function ce(e){return Uint8Array.from(atob(e),t=>t.charCodeAt(0))}const He=8192;function Ae(e){if(e.length<He)return btoa(String.fromCharCode(...e));let t="";for(var r=0;r<e.length;r+=He){const n=e.slice(r,r+He);t+=String.fromCharCode(...n)}return btoa(t)}function Ke(e){var i;const t=e.startsWith("0x")?e.slice(2):e,n=((i=(t.length%2===0?t:`0${t}}`).match(/.{2}/g))==null?void 0:i.map(s=>parseInt(s,16)))??[];return Uint8Array.from(n)}function _e(e){return e.reduce((t,r)=>t+r.toString(16).padStart(2,"0"),"")}function gt(e){let t=[],r=0;if(e===0)return[0];for(;e>0;)t[r]=e&127,(e>>=7)&&(t[r]|=128),r+=1;return t}function hn(e){let t=0,r=0,n=0;for(;;){let i=e[n];if(n+=1,t|=(i&127)<<r,!(i&128))break;r+=7}return{value:t,length:n}}class nr{constructor(t){this.bytePosition=0,this.dataView=new DataView(t.buffer)}shift(t){return this.bytePosition+=t,this}read8(){let t=this.dataView.getUint8(this.bytePosition);return this.shift(1),t}read16(){let t=this.dataView.getUint16(this.bytePosition,!0);return this.shift(2),t}read32(){let t=this.dataView.getUint32(this.bytePosition,!0);return this.shift(4),t}read64(){let t=this.read32(),n=this.read32().toString(16)+t.toString(16).padStart(8,"0");return BigInt("0x"+n).toString(10)}read128(){let t=BigInt(this.read64()),n=BigInt(this.read64()).toString(16)+t.toString(16).padStart(16,"0");return BigInt("0x"+n).toString(10)}read256(){let t=BigInt(this.read128()),n=BigInt(this.read128()).toString(16)+t.toString(16).padStart(32,"0");return BigInt("0x"+n).toString(10)}readBytes(t){let r=this.bytePosition+this.dataView.byteOffset,n=new Uint8Array(this.dataView.buffer,r,t);return this.shift(t),n}readULEB(){let t=this.bytePosition+this.dataView.byteOffset,r=new Uint8Array(this.dataView.buffer,t),{value:n,length:i}=hn(r);return this.shift(i),n}readVec(t){let r=this.readULEB(),n=[];for(let i=0;i<r;i++)n.push(t(this,i,r));return n}}function gn(e,t){switch(t){case"base58":return xe(e);case"base64":return Ae(e);case"hex":return _e(e);default:throw new Error("Unsupported encoding, supported values are: base64, hex")}}function pn(e,t){switch(t){case"base58":return ht(e);case"base64":return ce(e);case"hex":return Ke(e);default:throw new Error("Unsupported encoding, supported values are: base64, hex")}}function ir(e,t=["<",">"]){const[r,n]=t,i=[];let s="",o=0;for(let a=0;a<e.length;a++){const c=e[a];if(c===r&&o++,c===n&&o--,o===0&&c===","){i.push(s.trim()),s="";continue}s+=c}return i.push(s.trim()),i}class sr{constructor({size:t=1024,maxSize:r,allocateSize:n=1024}={}){this.bytePosition=0,this.size=t,this.maxSize=r||t,this.allocateSize=n,this.dataView=new DataView(new ArrayBuffer(t))}ensureSizeOrGrow(t){const r=this.bytePosition+t;if(r>this.size){const n=Math.min(this.maxSize,this.size+this.allocateSize);if(r>n)throw new Error(`Attempting to serialize to BCS, but buffer does not have enough size. Allocated size: ${this.size}, Max size: ${this.maxSize}, Required size: ${r}`);this.size=n;const i=new ArrayBuffer(this.size);new Uint8Array(i).set(new Uint8Array(this.dataView.buffer)),this.dataView=new DataView(i)}}shift(t){return this.bytePosition+=t,this}write8(t){return this.ensureSizeOrGrow(1),this.dataView.setUint8(this.bytePosition,Number(t)),this.shift(1)}write16(t){return this.ensureSizeOrGrow(2),this.dataView.setUint16(this.bytePosition,Number(t),!0),this.shift(2)}write32(t){return this.ensureSizeOrGrow(4),this.dataView.setUint32(this.bytePosition,Number(t),!0),this.shift(4)}write64(t){return Xe(BigInt(t),8).forEach(r=>this.write8(r)),this}write128(t){return Xe(BigInt(t),16).forEach(r=>this.write8(r)),this}write256(t){return Xe(BigInt(t),32).forEach(r=>this.write8(r)),this}writeULEB(t){return gt(t).forEach(r=>this.write8(r)),this}writeVec(t,r){return this.writeULEB(t.length),Array.from(t).forEach((n,i)=>r(this,n,i,t.length)),this}*[Symbol.iterator](){for(let t=0;t<this.bytePosition;t++)yield this.dataView.getUint8(t);return this.toBytes()}toBytes(){return new Uint8Array(this.dataView.buffer.slice(0,this.bytePosition))}toString(t){return gn(this.toBytes(),t)}}function Xe(e,t){let r=new Uint8Array(t),n=0;for(;e>0;)r[n]=Number(e%BigInt(256)),e=e/BigInt(256),n+=1;return r}var ar=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},X=(e,t,r)=>(ar(e,t,"read from private field"),r?r.call(e):t.get(e)),ze=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},Ve=(e,t,r,n)=>(ar(e,t,"write to private field"),t.set(e,r),r),ge,be,Me,ae;const or=class{constructor(e){ze(this,ge,void 0),ze(this,be,void 0),this.name=e.name,this.read=e.read,this.serializedSize=e.serializedSize??(()=>null),Ve(this,ge,e.write),Ve(this,be,e.serialize??((t,r)=>{const n=new sr({size:this.serializedSize(t)??void 0,...r});return X(this,ge).call(this,t,n),n.toBytes()})),this.validate=e.validate??(()=>{})}write(e,t){this.validate(e),X(this,ge).call(this,e,t)}serialize(e,t){return this.validate(e),new yn(this,X(this,be).call(this,e,t))}parse(e){const t=new nr(e);return this.read(t)}transform({name:e,input:t,output:r}){return new or({name:e??this.name,read:n=>r(this.read(n)),write:(n,i)=>X(this,ge).call(this,t(n),i),serializedSize:n=>this.serializedSize(t(n)),serialize:(n,i)=>X(this,be).call(this,t(n),i),validate:n=>this.validate(t(n))})}};let Z=or;ge=new WeakMap;be=new WeakMap;const cr=Symbol.for("@mysten/serialized-bcs");function pt(e){return!!e&&typeof e=="object"&&e[cr]===!0}class yn{constructor(t,r){ze(this,Me,void 0),ze(this,ae,void 0),Ve(this,Me,t),Ve(this,ae,r)}get[cr](){return!0}toBytes(){return X(this,ae)}toHex(){return _e(X(this,ae))}toBase64(){return Ae(X(this,ae))}toBase58(){return xe(X(this,ae))}parse(){return X(this,Me).parse(X(this,ae))}}Me=new WeakMap;ae=new WeakMap;function Fe({size:e,...t}){return new Z({...t,serializedSize:()=>e})}function Ze({readMethod:e,writeMethod:t,...r}){return Fe({...r,read:n=>n[e](),write:(n,i)=>i[t](n),validate:n=>{var i;if(n<0||n>r.maxValue)throw new TypeError(`Invalid ${r.name} value: ${n}. Expected value in range 0-${r.maxValue}`);(i=r.validate)==null||i.call(r,n)}})}function Ye({readMethod:e,writeMethod:t,...r}){return Fe({...r,read:n=>n[e](),write:(n,i)=>i[t](BigInt(n)),validate:n=>{var s;const i=BigInt(n);if(i<0||i>r.maxValue)throw new TypeError(`Invalid ${r.name} value: ${i}. Expected value in range 0-${r.maxValue}`);(s=r.validate)==null||s.call(r,i)}})}function mn({serialize:e,...t}){const r=new Z({...t,serialize:e,write:(n,i)=>{for(const s of r.serialize(n).toBytes())i.write8(s)}});return r}function wn({toBytes:e,fromBytes:t,...r}){return new Z({...r,read:n=>{const i=n.readULEB(),s=n.readBytes(i);return t(s)},write:(n,i)=>{const s=e(n);i.writeULEB(s.length);for(let o=0;o<s.length;o++)i.write8(s[o])},serialize:n=>{const i=e(n),s=gt(i.length),o=new Uint8Array(s.length+i.length);return o.set(s,0),o.set(i,s.length),o},validate:n=>{var i;if(typeof n!="string")throw new TypeError(`Invalid ${r.name} value: ${n}. Expected string`);(i=r.validate)==null||i.call(r,n)}})}function bn(e){let t=null;function r(){return t||(t=e()),t}return new Z({name:"lazy",read:n=>r().read(n),serializedSize:n=>r().serializedSize(n),write:(n,i)=>r().write(n,i),serialize:(n,i)=>r().serialize(n,i).toBytes()})}const u={u8(e){return Ze({name:"u8",readMethod:"read8",writeMethod:"write8",size:1,maxValue:2**8-1,...e})},u16(e){return Ze({name:"u16",readMethod:"read16",writeMethod:"write16",size:2,maxValue:2**16-1,...e})},u32(e){return Ze({name:"u32",readMethod:"read32",writeMethod:"write32",size:4,maxValue:2**32-1,...e})},u64(e){return Ye({name:"u64",readMethod:"read64",writeMethod:"write64",size:8,maxValue:2n**64n-1n,...e})},u128(e){return Ye({name:"u128",readMethod:"read128",writeMethod:"write128",size:16,maxValue:2n**128n-1n,...e})},u256(e){return Ye({name:"u256",readMethod:"read256",writeMethod:"write256",size:32,maxValue:2n**256n-1n,...e})},bool(e){return Fe({name:"bool",size:1,read:t=>t.read8()===1,write:(t,r)=>r.write8(t?1:0),...e,validate:t=>{var r;if((r=e==null?void 0:e.validate)==null||r.call(e,t),typeof t!="boolean")throw new TypeError(`Expected boolean, found ${typeof t}`)}})},uleb128(e){return mn({name:"uleb128",read:t=>t.readULEB(),serialize:t=>Uint8Array.from(gt(t)),...e})},bytes(e,t){return Fe({name:`bytes[${e}]`,size:e,read:r=>r.readBytes(e),write:(r,n)=>{for(let i=0;i<e;i++)n.write8(r[i]??0)},...t,validate:r=>{var n;if((n=t==null?void 0:t.validate)==null||n.call(t,r),!("length"in r))throw new TypeError(`Expected array, found ${typeof r}`);if(r.length!==e)throw new TypeError(`Expected array of length ${e}, found ${r.length}`)}})},string(e){return wn({name:"string",toBytes:t=>new TextEncoder().encode(t),fromBytes:t=>new TextDecoder().decode(t),...e})},fixedArray(e,t,r){return new Z({name:`${t.name}[${e}]`,read:n=>{const i=new Array(e);for(let s=0;s<e;s++)i[s]=t.read(n);return i},write:(n,i)=>{for(const s of n)t.write(s,i)},...r,validate:n=>{var i;if((i=r==null?void 0:r.validate)==null||i.call(r,n),!("length"in n))throw new TypeError(`Expected array, found ${typeof n}`);if(n.length!==e)throw new TypeError(`Expected array of length ${e}, found ${n.length}`)}})},option(e){return u.enum(`Option<${e.name}>`,{None:null,Some:e}).transform({input:t=>t==null?{None:!0}:{Some:t},output:t=>"Some"in t?t.Some:null})},vector(e,t){return new Z({name:`vector<${e.name}>`,read:r=>{const n=r.readULEB(),i=new Array(n);for(let s=0;s<n;s++)i[s]=e.read(r);return i},write:(r,n)=>{n.writeULEB(r.length);for(const i of r)e.write(i,n)},...t,validate:r=>{var n;if((n=t==null?void 0:t.validate)==null||n.call(t,r),!("length"in r))throw new TypeError(`Expected array, found ${typeof r}`)}})},tuple(e,t){return new Z({name:`(${e.map(r=>r.name).join(", ")})`,serializedSize:r=>{let n=0;for(let i=0;i<e.length;i++){const s=e[i].serializedSize(r[i]);if(s==null)return null;n+=s}return n},read:r=>{const n=[];for(const i of e)n.push(i.read(r));return n},write:(r,n)=>{for(let i=0;i<e.length;i++)e[i].write(r[i],n)},...t,validate:r=>{var n;if((n=t==null?void 0:t.validate)==null||n.call(t,r),!Array.isArray(r))throw new TypeError(`Expected array, found ${typeof r}`);if(r.length!==e.length)throw new TypeError(`Expected array of length ${e.length}, found ${r.length}`)}})},struct(e,t,r){const n=Object.entries(t);return new Z({name:e,serializedSize:i=>{let s=0;for(const[o,a]of n){const c=a.serializedSize(i[o]);if(c==null)return null;s+=c}return s},read:i=>{const s={};for(const[o,a]of n)s[o]=a.read(i);return s},write:(i,s)=>{for(const[o,a]of n)a.write(i[o],s)},...r,validate:i=>{var s;if((s=r==null?void 0:r.validate)==null||s.call(r,i),typeof i!="object"||i==null)throw new TypeError(`Expected object, found ${typeof i}`)}})},enum(e,t,r){const n=Object.entries(t);return new Z({name:e,read:i=>{const s=i.readULEB(),[o,a]=n[s];return{[o]:(a==null?void 0:a.read(i))??!0}},write:(i,s)=>{const[o,a]=Object.entries(i)[0];for(let c=0;c<n.length;c++){const[d,l]=n[c];if(d===o){s.writeULEB(c),l==null||l.write(a,s);return}}},...r,validate:i=>{var a;if((a=r==null?void 0:r.validate)==null||a.call(r,i),typeof i!="object"||i==null)throw new TypeError(`Expected object, found ${typeof i}`);const s=Object.keys(i);if(s.length!==1)throw new TypeError(`Expected object with one key, found ${s.length}`);const[o]=s;if(!Object.hasOwn(t,o))throw new TypeError(`Invalid enum variant ${o}`)}})},map(e,t){return u.vector(u.tuple([e,t])).transform({name:`Map<${e.name}, ${t.name}>`,input:r=>[...r.entries()],output:r=>{const n=new Map;for(const[i,s]of r)n.set(i,s);return n}})},generic(e,t){return(...r)=>t(...r).transform({name:`${t.name}<${r.map(n=>n.name).join(", ")}>`,input:n=>n,output:n=>n})},lazy(e){return bn(e)}},Sn=32,Se=class{constructor(e){if(this.types=new Map,this.counter=0,e instanceof Se){this.schema=e.schema,this.types=new Map(e.types);return}if(this.schema=e,this.registerAddressType(Se.ADDRESS,e.addressLength,e.addressEncoding),this.registerVectorType(e.vectorType),e.types&&e.types.structs)for(let t of Object.keys(e.types.structs))this.registerStructType(t,e.types.structs[t]);if(e.types&&e.types.enums)for(let t of Object.keys(e.types.enums))this.registerEnumType(t,e.types.enums[t]);if(e.types&&e.types.aliases)for(let t of Object.keys(e.types.aliases))this.registerAlias(t,e.types.aliases[t]);e.withPrimitives!==!1&&Tn(this)}tempKey(){return`bcs-struct-${++this.counter}`}ser(e,t,r){if(typeof e=="string"||Array.isArray(e)){const{name:n,params:i}=this.parseTypeName(e);return this.getTypeInterface(n).encode(this,t,r,i)}if(typeof e=="object"){const n=this.tempKey();return new Se(this).registerStructType(n,e).ser(n,t,r)}throw new Error(`Incorrect type passed into the '.ser()' function.
1
+ "use strict";var Ir=Object.defineProperty;var xr=(e,t,r)=>t in e?Ir(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var V=(e,t,r)=>(xr(e,typeof t!="symbol"?t+"":t,r),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("./index-DfYc88fY.js"),S=require("./sui-YcpSM6BX.js");require("./index-CefRPGIJ.js");const Ar=require("./chain-NLYiTi92.js");class _r{constructor(t,r,n,i,s=!1){V(this,"transaction");V(this,"network");V(this,"chain");V(this,"description");V(this,"parallelizable");this.transaction=t,this.network=r,this.chain=n,this.description=i,this.parallelizable=s}}class Cr extends TypeError{constructor(t,r){let n;const{message:i,explanation:s,...o}=t,{path:a}=t,c=a.length===0?i:`At path: ${a.join(".")} -- ${i}`;super(s??c),s!=null&&(this.cause=c),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>n??(n=[t,...r()])}}function Br(e){return K(e)&&typeof e[Symbol.iterator]=="function"}function K(e){return typeof e=="object"&&e!=null}function J(e){return typeof e=="symbol"?e.toString():typeof e=="string"?JSON.stringify(e):`${e}`}function $r(e){const{done:t,value:r}=e.next();return t?void 0:r}function Ur(e,t,r,n){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:i,branch:s}=t,{type:o}=r,{refinement:a,message:c=`Expected a value of type \`${o}\`${a?` with refinement \`${a}\``:""}, but received: \`${J(n)}\``}=e;return{value:n,type:o,refinement:a,key:i[i.length-1],path:i,branch:s,...e,message:c}}function*Vt(e,t,r,n){Br(e)||(e=[e]);for(const i of e){const s=Ur(i,t,r,n);s&&(yield s)}}function*ut(e,t,r={}){const{path:n=[],branch:i=[e],coerce:s=!1,mask:o=!1}=r,a={path:n,branch:i};if(s&&(e=t.coercer(e,a),o&&t.type!=="type"&&K(t.schema)&&K(e)&&!Array.isArray(e)))for(const d in e)t.schema[d]===void 0&&delete e[d];let c="valid";for(const d of t.validator(e,a))d.explanation=r.message,c="not_valid",yield[d,void 0];for(let[d,l,g]of t.entries(e,a)){const m=ut(l,g,{path:d===void 0?n:[...n,d],branch:d===void 0?i:[...i,l],coerce:s,mask:o,message:r.message});for(const y of m)y[0]?(c=y[0].refinement!=null?"not_refined":"not_valid",yield[y[0],void 0]):s&&(l=y[1],d===void 0?e=l:e instanceof Map?e.set(d,l):e instanceof Set?e.add(l):K(e)&&(l!==void 0||d in e)&&(e[d]=l))}if(c!=="not_valid")for(const d of t.refiner(e,a))d.explanation=r.message,c="not_refined",yield[d,void 0];c==="valid"&&(yield[void 0,e])}class te{constructor(t){const{type:r,schema:n,validator:i,refiner:s,coercer:o=c=>c,entries:a=function*(){}}=t;this.type=r,this.schema=n,this.entries=a,this.coercer=o,i?this.validator=(c,d)=>{const l=i(c,d);return Vt(l,d,this,c)}:this.validator=()=>[],s?this.refiner=(c,d)=>{const l=s(c,d);return Vt(l,d,this,c)}:this.refiner=()=>[]}assert(t,r){return tt(t,this,r)}create(t,r){return Kt(t,this,r)}is(t){return L(t,this)}mask(t,r){return Jt(t,this,r)}validate(t,r={}){return Ie(t,this,r)}}function tt(e,t,r){const n=Ie(e,t,{message:r});if(n[0])throw n[0]}function Kt(e,t,r){const n=Ie(e,t,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function Jt(e,t,r){const n=Ie(e,t,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function L(e,t){return!Ie(e,t)[0]}function Ie(e,t,r={}){const n=ut(e,t,r),i=$r(n);return i[0]?[new Cr(i[0],function*(){for(const o of n)o[0]&&(yield o[0])}),void 0]:[void 0,i[1]]}function je(...e){const t=e[0].type==="type",r=e.map(i=>i.schema),n=Object.assign({},...r);return t?Rr(n):p(n)}function W(e,t){return new te({type:e,schema:null,validator:t})}function rt(){return W("any",()=>!0)}function E(e){return new te({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||`Expected an array value, but received: ${J(t)}`}})}function Mr(){return W("bigint",e=>typeof e=="bigint")}function z(){return W("boolean",e=>typeof e=="boolean")}function ee(){return W("integer",e=>typeof e=="number"&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${J(e)}`)}function v(e){const t=J(e),r=typeof e;return new te({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?e:null,validator(n){return n===e||`Expected the literal \`${t}\`, but received: ${J(n)}`}})}function qt(){return W("never",()=>!1)}function $(e){return new te({...e,validator:(t,r)=>t===null||e.validator(t,r),refiner:(t,r)=>t===null||e.refiner(t,r)})}function le(){return W("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${J(e)}`)}function p(e){const t=e?Object.keys(e):[],r=qt();return new te({type:"object",schema:e||null,*entries(n){if(e&&K(n)){const i=new Set(Object.keys(n));for(const s of t)i.delete(s),yield[s,n[s],e[s]];for(const s of i)yield[s,n[s],r]}},validator(n){return K(n)||`Expected an object, but received: ${J(n)}`},coercer(n){return K(n)?{...n}:n}})}function T(e){return new te({...e,validator:(t,r)=>t===void 0||e.validator(t,r),refiner:(t,r)=>t===void 0||e.refiner(t,r)})}function Q(e,t){return new te({type:"record",schema:null,*entries(r){if(K(r))for(const n in r){const i=r[n];yield[n,n,e],yield[n,i,t]}},validator(r){return K(r)||`Expected an object, but received: ${J(r)}`}})}function h(){return W("string",e=>typeof e=="string"||`Expected a string, but received: ${J(e)}`)}function Ht(e){const t=qt();return new te({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(e.length,r.length);for(let i=0;i<n;i++)yield[i,r[i],e[i]||t]}},validator(r){return Array.isArray(r)||`Expected an array, but received: ${J(r)}`}})}function Rr(e){const t=Object.keys(e);return new te({type:"type",schema:e,*entries(r){if(K(r))for(const n of t)yield[n,r[n],e[n]]},validator(r){return K(r)||`Expected an object, but received: ${J(r)}`},coercer(r){return K(r)?{...r}:r}})}function U(e){const t=e.map(r=>r.type).join(" | ");return new te({type:"union",schema:null,coercer(r){for(const n of e){const[i,s]=n.validate(r,{coerce:!0});if(!i)return s}return r},validator(r,n){const i=[];for(const s of e){const[...o]=ut(r,s,n),[a]=o;if(a[0])for(const[c]of o)c&&i.push(c);else return[]}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${J(r)}`,...i]}})}function Xt(){return W("unknown",()=>!0)}const dt=U([p({AddressOwner:h()}),p({ObjectOwner:h()}),p({Shared:p({initial_shared_version:$(h())})}),v("Immutable")]);W("SuiJsonValue",()=>!0);const Pr=U([p({u32:h()}),p({u64:h()}),p({f64:h()})]);p({attributes:Q(h(),$(Pr)),featureFlags:Q(h(),z()),maxSupportedProtocolVersion:h(),minSupportedProtocolVersion:h(),protocolVersion:h()});U([h(),v("package")]);const oe=p({digest:h(),objectId:h(),version:U([le(),h(),Mr()])});p({owner:dt,reference:oe});p({objectId:h(),sequenceNumber:h()});p({payment:E(oe),owner:h(),price:h(),budget:h()});const Nr=je(oe,p({type:h(),owner:dt,previousTransaction:h()})),Dr=Q(h(),rt()),zr=Q(h(),Xt()),Vr=p({type:h(),fields:Dr,hasPublicTransfer:z()}),Fr=p({disassembled:zr}),Gr=U([je(Vr,p({dataType:v("moveObject")})),je(Fr,p({dataType:v("package")}))]),Lr=p({type:h(),hasPublicTransfer:z(),version:h(),bcsBytes:h()}),Wr=p({id:h(),moduleMap:Q(h(),h())}),Kr=U([je(Lr,p({dataType:v("moveObject")})),je(Wr,p({dataType:v("package")}))]);BigInt(1e9);const Zt=p({code:h(),error:T(h()),object_id:T(h()),parent_object_id:T(h()),version:T(h()),digest:T(h())}),Jr=p({data:$(T(Q(h(),h()))),error:$(T(Zt))}),qr=U([Jr,T(Q(h(),h()))]),Yt=p({objectId:h(),version:h(),digest:h(),type:$(T(h())),content:$(T(Gr)),bcs:$(T(Kr)),owner:$(T(dt)),previousTransaction:$(T(h())),storageRebate:$(T(h())),display:$(T(qr))});p({showType:$(T(z())),showContent:$(T(z())),showBcs:$(T(z())),showOwner:$(T(z())),showPreviousTransaction:$(T(z())),showStorageRebate:$(T(z())),showDisplay:$(T(z()))});U([v("Exists"),v("notExists"),v("Deleted")]);E(Nr);const Hr=p({data:$(T(Yt)),error:$(T(Zt))});function Xr(e){return e.data}function Zr(e){if(e.error&&"object_id"in e.error&&"version"in e.error&&"digest"in e.error){const t=e.error;return{objectId:t.object_id,version:t.version,digest:t.digest}}}function Ft(e){if("reference"in e)return e.reference;const t=Xr(e);return t?{objectId:t.objectId,version:t.version,digest:t.digest}:Zr(e)}p({objectId:h(),atCheckpoint:T(le())});p({data:E(Hr),nextCursor:T($(h())),hasNextPage:z()});U([p({details:Yt,status:v("VersionFound")}),p({details:h(),status:v("ObjectNotExists")}),p({details:oe,status:v("ObjectDeleted")}),p({details:Ht([h(),le()]),status:v("VersionNotFound")}),p({details:p({asked_version:le(),latest_version:le(),object_id:h()}),status:v("VersionTooHigh")})]);const Yr=U([h(),p({Object:h()})]);E(Yr);const Qr=p({address:h(),name:h()}),en=U([v("Private"),v("Public"),v("Friend")]),lt=p({abilities:E(h())}),tn=p({constraints:lt,isPhantom:z()}),rn=p({TypeParameter:le()}),qe=Ht([p({module:h(),package:h(),function:h()}),h()]);p({rank3Days:E(qe),rank7Days:E(qe),rank30Days:E(qe)});function Qt(e){if(!e)return!1;if(typeof e=="string"||L(e,rn)||er(e))return!0;if(typeof e!="object")return!1;const t=e;return!!(L(t.Reference,pe)||L(t.MutableReference,pe)||L(t.Vector,pe))}const pe=W("SuiMoveNormalizedType",Qt);function er(e){if(!e||typeof e!="object")return!1;const t=e;if(!t.Struct||typeof t.Struct!="object")return!1;const r=t.Struct;return!(typeof r.address!="string"||typeof r.module!="string"||typeof r.name!="string"||!Array.isArray(r.typeArguments)||!r.typeArguments.every(n=>Qt(n)))}W("SuiMoveNormalizedStructType",er);const nn=p({visibility:en,isEntry:z(),typeParameters:E(lt),parameters:E(pe),return:E(pe)}),sn=p({name:h(),type:pe}),an=p({abilities:lt,typeParameters:E(tn),fields:E(sn)}),on=p({fileFormatVersion:le(),address:h(),name:h(),friends:E(Qr),structs:Q(h(),an),exposedFunctions:Q(h(),nn)});Q(h(),on);function nt(e){return typeof e=="object"&&"MutableReference"in e?e.MutableReference:void 0}function tr(e){return typeof e=="object"&&"Reference"in e?e.Reference:void 0}function ft(e){if(typeof e=="object"&&"Struct"in e)return e;const t=tr(e),r=nt(e);if(typeof t=="object"&&"Struct"in t)return t;if(typeof r=="object"&&"Struct"in r)return r}function cn(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r<t.length;r++)t[r]=255;for(var n=0;n<e.length;n++){var i=e.charAt(n),s=i.charCodeAt(0);if(t[s]!==255)throw new TypeError(i+" is ambiguous");t[s]=n}var o=e.length,a=e.charAt(0),c=Math.log(o)/Math.log(256),d=Math.log(256)/Math.log(o);function l(y){if(y instanceof Uint8Array||(ArrayBuffer.isView(y)?y=new Uint8Array(y.buffer,y.byteOffset,y.byteLength):Array.isArray(y)&&(y=Uint8Array.from(y))),!(y instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(y.length===0)return"";for(var w=0,b=0,f=0,x=y.length;f!==x&&y[f]===0;)f++,w++;for(var C=(x-f)*d+1>>>0,P=new Uint8Array(C);f!==x;){for(var A=y[f],k=0,N=C-1;(A!==0||k<b)&&N!==-1;N--,k++)A+=256*P[N]>>>0,P[N]=A%o>>>0,A=A/o>>>0;if(A!==0)throw new Error("Non-zero carry");b=k,f++}for(var q=C-b;q!==C&&P[q]===0;)q++;for(var he=a.repeat(w);q<C;++q)he+=e.charAt(P[q]);return he}function g(y){if(typeof y!="string")throw new TypeError("Expected String");if(y.length===0)return new Uint8Array;for(var w=0,b=0,f=0;y[w]===a;)b++,w++;for(var x=(y.length-w)*c+1>>>0,C=new Uint8Array(x);y[w];){var P=t[y.charCodeAt(w)];if(P===255)return;for(var A=0,k=x-1;(P!==0||A<f)&&k!==-1;k--,A++)P+=o*C[k]>>>0,C[k]=P%256>>>0,P=P/256>>>0;if(P!==0)throw new Error("Non-zero carry");f=A,w++}for(var N=x-f;N!==x&&C[N]===0;)N++;for(var q=new Uint8Array(b+(x-N)),he=b;N!==x;)q[he++]=C[N++];return q}function m(y){var w=g(y);if(w)return w;throw new Error("Non-base"+o+" character")}return{encode:l,decodeUnsafe:g,decode:m}}var un=cn;const dn=un,ln="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";var fn=dn(ln);const rr=B.getDefaultExportFromCjs(fn),xe=e=>rr.encode(e),ht=e=>rr.decode(e);function ce(e){return Uint8Array.from(atob(e),t=>t.charCodeAt(0))}const He=8192;function Ae(e){if(e.length<He)return btoa(String.fromCharCode(...e));let t="";for(var r=0;r<e.length;r+=He){const n=e.slice(r,r+He);t+=String.fromCharCode(...n)}return btoa(t)}function Ke(e){var i;const t=e.startsWith("0x")?e.slice(2):e,n=((i=(t.length%2===0?t:`0${t}}`).match(/.{2}/g))==null?void 0:i.map(s=>parseInt(s,16)))??[];return Uint8Array.from(n)}function _e(e){return e.reduce((t,r)=>t+r.toString(16).padStart(2,"0"),"")}function gt(e){let t=[],r=0;if(e===0)return[0];for(;e>0;)t[r]=e&127,(e>>=7)&&(t[r]|=128),r+=1;return t}function hn(e){let t=0,r=0,n=0;for(;;){let i=e[n];if(n+=1,t|=(i&127)<<r,!(i&128))break;r+=7}return{value:t,length:n}}class nr{constructor(t){this.bytePosition=0,this.dataView=new DataView(t.buffer)}shift(t){return this.bytePosition+=t,this}read8(){let t=this.dataView.getUint8(this.bytePosition);return this.shift(1),t}read16(){let t=this.dataView.getUint16(this.bytePosition,!0);return this.shift(2),t}read32(){let t=this.dataView.getUint32(this.bytePosition,!0);return this.shift(4),t}read64(){let t=this.read32(),n=this.read32().toString(16)+t.toString(16).padStart(8,"0");return BigInt("0x"+n).toString(10)}read128(){let t=BigInt(this.read64()),n=BigInt(this.read64()).toString(16)+t.toString(16).padStart(16,"0");return BigInt("0x"+n).toString(10)}read256(){let t=BigInt(this.read128()),n=BigInt(this.read128()).toString(16)+t.toString(16).padStart(32,"0");return BigInt("0x"+n).toString(10)}readBytes(t){let r=this.bytePosition+this.dataView.byteOffset,n=new Uint8Array(this.dataView.buffer,r,t);return this.shift(t),n}readULEB(){let t=this.bytePosition+this.dataView.byteOffset,r=new Uint8Array(this.dataView.buffer,t),{value:n,length:i}=hn(r);return this.shift(i),n}readVec(t){let r=this.readULEB(),n=[];for(let i=0;i<r;i++)n.push(t(this,i,r));return n}}function gn(e,t){switch(t){case"base58":return xe(e);case"base64":return Ae(e);case"hex":return _e(e);default:throw new Error("Unsupported encoding, supported values are: base64, hex")}}function pn(e,t){switch(t){case"base58":return ht(e);case"base64":return ce(e);case"hex":return Ke(e);default:throw new Error("Unsupported encoding, supported values are: base64, hex")}}function ir(e,t=["<",">"]){const[r,n]=t,i=[];let s="",o=0;for(let a=0;a<e.length;a++){const c=e[a];if(c===r&&o++,c===n&&o--,o===0&&c===","){i.push(s.trim()),s="";continue}s+=c}return i.push(s.trim()),i}class sr{constructor({size:t=1024,maxSize:r,allocateSize:n=1024}={}){this.bytePosition=0,this.size=t,this.maxSize=r||t,this.allocateSize=n,this.dataView=new DataView(new ArrayBuffer(t))}ensureSizeOrGrow(t){const r=this.bytePosition+t;if(r>this.size){const n=Math.min(this.maxSize,this.size+this.allocateSize);if(r>n)throw new Error(`Attempting to serialize to BCS, but buffer does not have enough size. Allocated size: ${this.size}, Max size: ${this.maxSize}, Required size: ${r}`);this.size=n;const i=new ArrayBuffer(this.size);new Uint8Array(i).set(new Uint8Array(this.dataView.buffer)),this.dataView=new DataView(i)}}shift(t){return this.bytePosition+=t,this}write8(t){return this.ensureSizeOrGrow(1),this.dataView.setUint8(this.bytePosition,Number(t)),this.shift(1)}write16(t){return this.ensureSizeOrGrow(2),this.dataView.setUint16(this.bytePosition,Number(t),!0),this.shift(2)}write32(t){return this.ensureSizeOrGrow(4),this.dataView.setUint32(this.bytePosition,Number(t),!0),this.shift(4)}write64(t){return Xe(BigInt(t),8).forEach(r=>this.write8(r)),this}write128(t){return Xe(BigInt(t),16).forEach(r=>this.write8(r)),this}write256(t){return Xe(BigInt(t),32).forEach(r=>this.write8(r)),this}writeULEB(t){return gt(t).forEach(r=>this.write8(r)),this}writeVec(t,r){return this.writeULEB(t.length),Array.from(t).forEach((n,i)=>r(this,n,i,t.length)),this}*[Symbol.iterator](){for(let t=0;t<this.bytePosition;t++)yield this.dataView.getUint8(t);return this.toBytes()}toBytes(){return new Uint8Array(this.dataView.buffer.slice(0,this.bytePosition))}toString(t){return gn(this.toBytes(),t)}}function Xe(e,t){let r=new Uint8Array(t),n=0;for(;e>0;)r[n]=Number(e%BigInt(256)),e=e/BigInt(256),n+=1;return r}var ar=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},X=(e,t,r)=>(ar(e,t,"read from private field"),r?r.call(e):t.get(e)),ze=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},Ve=(e,t,r,n)=>(ar(e,t,"write to private field"),t.set(e,r),r),ge,be,Me,ae;const or=class{constructor(e){ze(this,ge,void 0),ze(this,be,void 0),this.name=e.name,this.read=e.read,this.serializedSize=e.serializedSize??(()=>null),Ve(this,ge,e.write),Ve(this,be,e.serialize??((t,r)=>{const n=new sr({size:this.serializedSize(t)??void 0,...r});return X(this,ge).call(this,t,n),n.toBytes()})),this.validate=e.validate??(()=>{})}write(e,t){this.validate(e),X(this,ge).call(this,e,t)}serialize(e,t){return this.validate(e),new yn(this,X(this,be).call(this,e,t))}parse(e){const t=new nr(e);return this.read(t)}transform({name:e,input:t,output:r}){return new or({name:e??this.name,read:n=>r(this.read(n)),write:(n,i)=>X(this,ge).call(this,t(n),i),serializedSize:n=>this.serializedSize(t(n)),serialize:(n,i)=>X(this,be).call(this,t(n),i),validate:n=>this.validate(t(n))})}};let Z=or;ge=new WeakMap;be=new WeakMap;const cr=Symbol.for("@mysten/serialized-bcs");function pt(e){return!!e&&typeof e=="object"&&e[cr]===!0}class yn{constructor(t,r){ze(this,Me,void 0),ze(this,ae,void 0),Ve(this,Me,t),Ve(this,ae,r)}get[cr](){return!0}toBytes(){return X(this,ae)}toHex(){return _e(X(this,ae))}toBase64(){return Ae(X(this,ae))}toBase58(){return xe(X(this,ae))}parse(){return X(this,Me).parse(X(this,ae))}}Me=new WeakMap;ae=new WeakMap;function Fe({size:e,...t}){return new Z({...t,serializedSize:()=>e})}function Ze({readMethod:e,writeMethod:t,...r}){return Fe({...r,read:n=>n[e](),write:(n,i)=>i[t](n),validate:n=>{var i;if(n<0||n>r.maxValue)throw new TypeError(`Invalid ${r.name} value: ${n}. Expected value in range 0-${r.maxValue}`);(i=r.validate)==null||i.call(r,n)}})}function Ye({readMethod:e,writeMethod:t,...r}){return Fe({...r,read:n=>n[e](),write:(n,i)=>i[t](BigInt(n)),validate:n=>{var s;const i=BigInt(n);if(i<0||i>r.maxValue)throw new TypeError(`Invalid ${r.name} value: ${i}. Expected value in range 0-${r.maxValue}`);(s=r.validate)==null||s.call(r,i)}})}function mn({serialize:e,...t}){const r=new Z({...t,serialize:e,write:(n,i)=>{for(const s of r.serialize(n).toBytes())i.write8(s)}});return r}function wn({toBytes:e,fromBytes:t,...r}){return new Z({...r,read:n=>{const i=n.readULEB(),s=n.readBytes(i);return t(s)},write:(n,i)=>{const s=e(n);i.writeULEB(s.length);for(let o=0;o<s.length;o++)i.write8(s[o])},serialize:n=>{const i=e(n),s=gt(i.length),o=new Uint8Array(s.length+i.length);return o.set(s,0),o.set(i,s.length),o},validate:n=>{var i;if(typeof n!="string")throw new TypeError(`Invalid ${r.name} value: ${n}. Expected string`);(i=r.validate)==null||i.call(r,n)}})}function bn(e){let t=null;function r(){return t||(t=e()),t}return new Z({name:"lazy",read:n=>r().read(n),serializedSize:n=>r().serializedSize(n),write:(n,i)=>r().write(n,i),serialize:(n,i)=>r().serialize(n,i).toBytes()})}const u={u8(e){return Ze({name:"u8",readMethod:"read8",writeMethod:"write8",size:1,maxValue:2**8-1,...e})},u16(e){return Ze({name:"u16",readMethod:"read16",writeMethod:"write16",size:2,maxValue:2**16-1,...e})},u32(e){return Ze({name:"u32",readMethod:"read32",writeMethod:"write32",size:4,maxValue:2**32-1,...e})},u64(e){return Ye({name:"u64",readMethod:"read64",writeMethod:"write64",size:8,maxValue:2n**64n-1n,...e})},u128(e){return Ye({name:"u128",readMethod:"read128",writeMethod:"write128",size:16,maxValue:2n**128n-1n,...e})},u256(e){return Ye({name:"u256",readMethod:"read256",writeMethod:"write256",size:32,maxValue:2n**256n-1n,...e})},bool(e){return Fe({name:"bool",size:1,read:t=>t.read8()===1,write:(t,r)=>r.write8(t?1:0),...e,validate:t=>{var r;if((r=e==null?void 0:e.validate)==null||r.call(e,t),typeof t!="boolean")throw new TypeError(`Expected boolean, found ${typeof t}`)}})},uleb128(e){return mn({name:"uleb128",read:t=>t.readULEB(),serialize:t=>Uint8Array.from(gt(t)),...e})},bytes(e,t){return Fe({name:`bytes[${e}]`,size:e,read:r=>r.readBytes(e),write:(r,n)=>{for(let i=0;i<e;i++)n.write8(r[i]??0)},...t,validate:r=>{var n;if((n=t==null?void 0:t.validate)==null||n.call(t,r),!("length"in r))throw new TypeError(`Expected array, found ${typeof r}`);if(r.length!==e)throw new TypeError(`Expected array of length ${e}, found ${r.length}`)}})},string(e){return wn({name:"string",toBytes:t=>new TextEncoder().encode(t),fromBytes:t=>new TextDecoder().decode(t),...e})},fixedArray(e,t,r){return new Z({name:`${t.name}[${e}]`,read:n=>{const i=new Array(e);for(let s=0;s<e;s++)i[s]=t.read(n);return i},write:(n,i)=>{for(const s of n)t.write(s,i)},...r,validate:n=>{var i;if((i=r==null?void 0:r.validate)==null||i.call(r,n),!("length"in n))throw new TypeError(`Expected array, found ${typeof n}`);if(n.length!==e)throw new TypeError(`Expected array of length ${e}, found ${n.length}`)}})},option(e){return u.enum(`Option<${e.name}>`,{None:null,Some:e}).transform({input:t=>t==null?{None:!0}:{Some:t},output:t=>"Some"in t?t.Some:null})},vector(e,t){return new Z({name:`vector<${e.name}>`,read:r=>{const n=r.readULEB(),i=new Array(n);for(let s=0;s<n;s++)i[s]=e.read(r);return i},write:(r,n)=>{n.writeULEB(r.length);for(const i of r)e.write(i,n)},...t,validate:r=>{var n;if((n=t==null?void 0:t.validate)==null||n.call(t,r),!("length"in r))throw new TypeError(`Expected array, found ${typeof r}`)}})},tuple(e,t){return new Z({name:`(${e.map(r=>r.name).join(", ")})`,serializedSize:r=>{let n=0;for(let i=0;i<e.length;i++){const s=e[i].serializedSize(r[i]);if(s==null)return null;n+=s}return n},read:r=>{const n=[];for(const i of e)n.push(i.read(r));return n},write:(r,n)=>{for(let i=0;i<e.length;i++)e[i].write(r[i],n)},...t,validate:r=>{var n;if((n=t==null?void 0:t.validate)==null||n.call(t,r),!Array.isArray(r))throw new TypeError(`Expected array, found ${typeof r}`);if(r.length!==e.length)throw new TypeError(`Expected array of length ${e.length}, found ${r.length}`)}})},struct(e,t,r){const n=Object.entries(t);return new Z({name:e,serializedSize:i=>{let s=0;for(const[o,a]of n){const c=a.serializedSize(i[o]);if(c==null)return null;s+=c}return s},read:i=>{const s={};for(const[o,a]of n)s[o]=a.read(i);return s},write:(i,s)=>{for(const[o,a]of n)a.write(i[o],s)},...r,validate:i=>{var s;if((s=r==null?void 0:r.validate)==null||s.call(r,i),typeof i!="object"||i==null)throw new TypeError(`Expected object, found ${typeof i}`)}})},enum(e,t,r){const n=Object.entries(t);return new Z({name:e,read:i=>{const s=i.readULEB(),[o,a]=n[s];return{[o]:(a==null?void 0:a.read(i))??!0}},write:(i,s)=>{const[o,a]=Object.entries(i)[0];for(let c=0;c<n.length;c++){const[d,l]=n[c];if(d===o){s.writeULEB(c),l==null||l.write(a,s);return}}},...r,validate:i=>{var a;if((a=r==null?void 0:r.validate)==null||a.call(r,i),typeof i!="object"||i==null)throw new TypeError(`Expected object, found ${typeof i}`);const s=Object.keys(i);if(s.length!==1)throw new TypeError(`Expected object with one key, found ${s.length}`);const[o]=s;if(!Object.hasOwn(t,o))throw new TypeError(`Invalid enum variant ${o}`)}})},map(e,t){return u.vector(u.tuple([e,t])).transform({name:`Map<${e.name}, ${t.name}>`,input:r=>[...r.entries()],output:r=>{const n=new Map;for(const[i,s]of r)n.set(i,s);return n}})},generic(e,t){return(...r)=>t(...r).transform({name:`${t.name}<${r.map(n=>n.name).join(", ")}>`,input:n=>n,output:n=>n})},lazy(e){return bn(e)}},Sn=32,Se=class{constructor(e){if(this.types=new Map,this.counter=0,e instanceof Se){this.schema=e.schema,this.types=new Map(e.types);return}if(this.schema=e,this.registerAddressType(Se.ADDRESS,e.addressLength,e.addressEncoding),this.registerVectorType(e.vectorType),e.types&&e.types.structs)for(let t of Object.keys(e.types.structs))this.registerStructType(t,e.types.structs[t]);if(e.types&&e.types.enums)for(let t of Object.keys(e.types.enums))this.registerEnumType(t,e.types.enums[t]);if(e.types&&e.types.aliases)for(let t of Object.keys(e.types.aliases))this.registerAlias(t,e.types.aliases[t]);e.withPrimitives!==!1&&Tn(this)}tempKey(){return`bcs-struct-${++this.counter}`}ser(e,t,r){if(typeof e=="string"||Array.isArray(e)){const{name:n,params:i}=this.parseTypeName(e);return this.getTypeInterface(n).encode(this,t,r,i)}if(typeof e=="object"){const n=this.tempKey();return new Se(this).registerStructType(n,e).ser(n,t,r)}throw new Error(`Incorrect type passed into the '.ser()' function.
2
2
  ${JSON.stringify(e)}`)}de(e,t,r){if(typeof t=="string")if(r)t=pn(t,r);else throw new Error("To pass a string to `bcs.de`, specify encoding");if(typeof e=="string"||Array.isArray(e)){const{name:n,params:i}=this.parseTypeName(e);return this.getTypeInterface(n).decode(this,t,i)}if(typeof e=="object"){const n=new Se(this),i=this.tempKey();return n.registerStructType(i,e).de(i,t,r)}throw new Error(`Incorrect type passed into the '.de()' function.
3
3
  ${JSON.stringify(e)}`)}hasType(e){return this.types.has(e)}registerAlias(e,t){return this.types.set(e,t),this}registerType(e,t,r,n=()=>!0){const{name:i,params:s}=this.parseTypeName(e);return this.types.set(i,{encode(o,a,c,d){const l=s.reduce((g,m,y)=>Object.assign(g,{[m]:d[y]}),{});return this._encodeRaw.call(o,new sr(c),a,d,l)},decode(o,a,c){const d=s.reduce((l,g,m)=>Object.assign(l,{[g]:c[m]}),{});return this._decodeRaw.call(o,new nr(a),c,d)},_encodeRaw(o,a,c,d){if(n(a))return t.call(this,o,a,c,d);throw new Error(`Validation failed for type ${i}, data: ${a}`)},_decodeRaw(o,a,c){return r.call(this,o,a,c)}}),this}registerBcsType(e,t){return this.registerType(e,(r,n,i)=>{const s=i.map(o=>new Z({name:String(o),write:(a,c)=>{const{name:d,params:l}=this.parseTypeName(o),g=this.getTypeInterface(d),m=l.reduce((y,w,b)=>Object.assign(y,{[w]:i[b]}),{});return g._encodeRaw.call(this,c,a,l,m)},read:()=>{throw new Error("Not implemented")}}));return t(...s).write(n,r),r},(r,n)=>{const i=n.map(s=>new Z({name:String(s),write:(o,a)=>{throw new Error("Not implemented")},read:o=>{const{name:a,params:c}=this.parseTypeName(s),d=this.getTypeInterface(a),l=c.reduce((g,m,y)=>Object.assign(g,{[m]:n[y]}),{});return d._decodeRaw.call(this,o,c,l)}}));return t(...i).read(r)}),this}registerAddressType(e,t,r="hex"){switch(r){case"base64":return this.registerType(e,function(i,s){return ce(s).reduce((o,a)=>o.write8(a),i)},function(i){return Ae(i.readBytes(t))});case"hex":return this.registerType(e,function(i,s){return Ke(s).reduce((o,a)=>o.write8(a),i)},function(i){return _e(i.readBytes(t))});default:throw new Error("Unsupported encoding! Use either hex or base64")}}registerVectorType(e){let{name:t,params:r}=this.parseTypeName(e);if(r.length>1)throw new Error("Vector can have only one type parameter; got "+t);return this.registerType(e,function(i,s,o,a){return i.writeVec(s,(c,d)=>{let l=o[0];if(!l)throw new Error(`Incorrect number of type parameters passed a to vector '${e}'`);let{name:g,params:m}=this.parseTypeName(l);if(this.hasType(g))return this.getTypeInterface(g)._encodeRaw.call(this,c,d,m,a);if(!(g in a))throw new Error(`Unable to find a matching type definition for ${g} in vector; make sure you passed a generic`);let{name:y,params:w}=this.parseTypeName(a[g]);return this.getTypeInterface(y)._encodeRaw.call(this,c,d,w,a)})},function(i,s,o){return i.readVec(a=>{let c=s[0];if(!c)throw new Error(`Incorrect number of type parameters passed to a vector '${e}'`);let{name:d,params:l}=this.parseTypeName(c);if(this.hasType(d))return this.getTypeInterface(d)._decodeRaw.call(this,a,l,o);if(!(d in o))throw new Error(`Unable to find a matching type definition for ${d} in vector; make sure you passed a generic`);let{name:g,params:m}=this.parseTypeName(o[d]);return this.getTypeInterface(g)._decodeRaw.call(this,a,m,o)})})}registerStructType(e,t){for(let o in t){let a=this.tempKey(),c=t[o];!Array.isArray(c)&&typeof c!="string"&&(t[o]=a,this.registerStructType(a,c))}let r=Object.freeze(t),n=Object.keys(r),{name:i,params:s}=this.parseTypeName(e);return this.registerType(e,function(a,c,d,l){if(!c||c.constructor!==Object)throw new Error(`Expected ${i} to be an Object, got: ${c}`);if(d.length!==s.length)throw new Error(`Incorrect number of generic parameters passed; expected: ${s.length}, got: ${d.length}`);for(let g of n){if(!(g in c))throw new Error(`Struct ${i} requires field ${g}:${r[g]}`);const{name:m,params:y}=this.parseTypeName(r[g]);if(!s.includes(m))this.getTypeInterface(m)._encodeRaw.call(this,a,c[g],y,l);else{const w=s.indexOf(m);let{name:b,params:f}=this.parseTypeName(d[w]);if(this.hasType(b)){this.getTypeInterface(b)._encodeRaw.call(this,a,c[g],f,l);continue}if(!(b in l))throw new Error(`Unable to find a matching type definition for ${b} in ${i}; make sure you passed a generic`);let{name:x,params:C}=this.parseTypeName(l[b]);this.getTypeInterface(x)._encodeRaw.call(this,a,c[g],C,l)}}return a},function(a,c,d){if(c.length!==s.length)throw new Error(`Incorrect number of generic parameters passed; expected: ${s.length}, got: ${c.length}`);let l={};for(let g of n){const{name:m,params:y}=this.parseTypeName(r[g]);if(!s.includes(m))l[g]=this.getTypeInterface(m)._decodeRaw.call(this,a,y,d);else{const w=s.indexOf(m);let{name:b,params:f}=this.parseTypeName(c[w]);if(this.hasType(b)){l[g]=this.getTypeInterface(b)._decodeRaw.call(this,a,f,d);continue}if(!(b in d))throw new Error(`Unable to find a matching type definition for ${b} in ${i}; make sure you passed a generic`);let{name:x,params:C}=this.parseTypeName(d[b]);l[g]=this.getTypeInterface(x)._decodeRaw.call(this,a,C,d)}}return l})}registerEnumType(e,t){for(let o in t){let a=this.tempKey(),c=t[o];c!==null&&!Array.isArray(c)&&typeof c!="string"&&(t[o]=a,this.registerStructType(a,c))}let r=Object.freeze(t),n=Object.keys(r),{name:i,params:s}=this.parseTypeName(e);return this.registerType(e,function(a,c,d,l){if(!c)throw new Error(`Unable to write enum "${i}", missing data.
4
4
  Received: "${c}"`);if(typeof c!="object")throw new Error(`Incorrect data passed into enum "${i}", expected object with properties: "${n.join(" | ")}".
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const H=require("./index-Cpfo_13K.js"),iu=require("./dijkstra-CtFxn7S9.js"),P=require("./browser-9qSlzcs1.js"),L=require("./index-v5JYqN5T.js");let nu=class extends P.r{constructor(e){super(e),this.events=new H.eventsExports.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(e=this.connection){await this.open(e)}async disconnect(){await this.close()}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}async request(e,r){return this.requestStrict(P.formatJsonRpcRequest(e.method,e.params||[],e.id||P.getBigIntRpcId().toString()),r)}async requestStrict(e,r){return new Promise(async(i,n)=>{if(!this.connection.connected)try{await this.open()}catch(s){n(s)}this.events.on(`${e.id}`,s=>{P.isJsonRpcError(s)?n(s.error):i(s.result)});try{await this.connection.send(e,r)}catch(s){n(s)}})}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),P.isJsonRpcResponse(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&e.code===3e3&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}async open(e=this.connection){this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),typeof e=="string"&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",e=>this.onPayload(e)),this.connection.on("close",e=>this.onClose(e)),this.connection.on("error",e=>this.events.emit("error",e)),this.connection.on("register_error",e=>this.onClose()),this.hasRegisteredEventListeners=!0)}};var su=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,r=[],i=0;i<t.rangeCount;i++)r.push(t.getRangeAt(i));switch(e.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":e.blur();break;default:e=null;break}return t.removeAllRanges(),function(){t.type==="Caret"&&t.removeAllRanges(),t.rangeCount||r.forEach(function(n){t.addRange(n)}),e&&e.focus()}},ou=su,So={"text/plain":"Text","text/html":"Url",default:"Text"},au="Copy to clipboard: #{key}, Enter";function cu(t){var e=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return t.replace(/#{\s*key\s*}/g,e)}function hu(t,e){var r,i,n,s,o,c,h=!1;e||(e={}),r=e.debug||!1;try{n=ou(),s=document.createRange(),o=document.getSelection(),c=document.createElement("span"),c.textContent=t,c.ariaHidden="true",c.style.all="unset",c.style.position="fixed",c.style.top=0,c.style.clip="rect(0, 0, 0, 0)",c.style.whiteSpace="pre",c.style.webkitUserSelect="text",c.style.MozUserSelect="text",c.style.msUserSelect="text",c.style.userSelect="text",c.addEventListener("copy",function(d){if(d.stopPropagation(),e.format)if(d.preventDefault(),typeof d.clipboardData>"u"){r&&console.warn("unable to use e.clipboardData"),r&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var m=So[e.format]||So.default;window.clipboardData.setData(m,t)}else d.clipboardData.clearData(),d.clipboardData.setData(e.format,t);e.onCopy&&(d.preventDefault(),e.onCopy(d.clipboardData))}),document.body.appendChild(c),s.selectNodeContents(c),o.addRange(s);var u=document.execCommand("copy");if(!u)throw new Error("copy command was unsuccessful");h=!0}catch(d){r&&console.error("unable to copy using execCommand: ",d),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),h=!0}catch(m){r&&console.error("unable to copy using clipboardData: ",m),r&&console.error("falling back to prompt"),i=cu("message"in e?e.message:au),window.prompt(i,t)}}finally{o&&(typeof o.removeRange=="function"?o.removeRange(s):o.removeAllRanges()),c&&document.body.removeChild(c),n()}return h}var lu=hu,uu={}.toString,zs=Array.isArray||function(t){return uu.call(t)=="[object Array]"},js={},he={};Object.defineProperty(he,"__esModule",{value:!0});var yc=he.getLocalStorage=Cc=he.getLocalStorageOrThrow=xc=he.getCrypto=Mc=he.getCryptoOrThrow=Ic=he.getLocation=Sc=he.getLocationOrThrow=Ec=he.getNavigator=Ac=he.getNavigatorOrThrow=_c=he.getDocument=bc=he.getDocumentOrThrow=wc=he.getFromWindowOrThrow=vc=he.getFromWindow=void 0;function kr(t){let e;return typeof window<"u"&&typeof window[t]<"u"&&(e=window[t]),e}var vc=he.getFromWindow=kr;function ri(t){const e=kr(t);if(!e)throw new Error(`${t} is not defined in Window`);return e}var wc=he.getFromWindowOrThrow=ri;function fu(){return ri("document")}var bc=he.getDocumentOrThrow=fu;function du(){return kr("document")}var _c=he.getDocument=du;function pu(){return ri("navigator")}var Ac=he.getNavigatorOrThrow=pu;function gu(){return kr("navigator")}var Ec=he.getNavigator=gu;function mu(){return ri("location")}var Sc=he.getLocationOrThrow=mu;function yu(){return kr("location")}var Ic=he.getLocation=yu;function vu(){return ri("crypto")}var Mc=he.getCryptoOrThrow=vu;function wu(){return kr("crypto")}var xc=he.getCrypto=wu;function bu(){return ri("localStorage")}var Cc=he.getLocalStorageOrThrow=bu;function _u(){return kr("localStorage")}yc=he.getLocalStorage=_u;Object.defineProperty(js,"__esModule",{value:!0});var Nc=js.getWindowMetadata=void 0;const Io=he;function Au(){let t,e;try{t=Io.getDocumentOrThrow(),e=Io.getLocationOrThrow()}catch{return null}function r(){const m=t.getElementsByTagName("link"),b=[];for(let A=0;A<m.length;A++){const E=m[A],x=E.getAttribute("rel");if(x&&x.toLowerCase().indexOf("icon")>-1){const I=E.getAttribute("href");if(I)if(I.toLowerCase().indexOf("https:")===-1&&I.toLowerCase().indexOf("http:")===-1&&I.indexOf("//")!==0){let C=e.protocol+"//"+e.host;if(I.indexOf("/")===0)C+=I;else{const R=e.pathname.split("/");R.pop();const T=R.join("/");C+=T+"/"+I}b.push(C)}else if(I.indexOf("//")===0){const C=e.protocol+I;b.push(C)}else b.push(I)}}return b}function i(...m){const b=t.getElementsByTagName("meta");for(let A=0;A<b.length;A++){const E=b[A],x=["itemprop","property","name"].map(I=>E.getAttribute(I)).filter(I=>I?m.includes(I):!1);if(x.length&&x){const I=E.getAttribute("content");if(I)return I}}return""}function n(){let m=i("name","og:site_name","og:title","twitter:title");return m||(m=t.title),m}function s(){return i("description","og:description","twitter:description","keywords")}const o=n(),c=s(),h=e.origin,u=r();return{description:c,url:h,icons:u,name:o}}Nc=js.getWindowMetadata=Au;var Eu=function(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var i=Array(t),n=0,e=0;e<r;e++)for(var s=arguments[e],o=0,c=s.length;o<c;o++,n++)i[n]=s[o];return i},Su=function(){function t(e,r,i){this.name=e,this.version=r,this.os=i,this.type="browser"}return t}(),Iu=function(){function t(e){this.version=e,this.type="node",this.name="node",this.os=H.dist.process.platform}return t}(),Mu=function(){function t(e,r,i,n){this.name=e,this.version=r,this.os=i,this.bot=n,this.type="bot-device"}return t}(),xu=function(){function t(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return t}(),Cu=function(){function t(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return t}(),Nu=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,Ru=/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,Mo=3,Pu=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",Nu]],xo=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function Tu(t){return t?Co(t):typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new Cu:typeof navigator<"u"?Co(navigator.userAgent):ku()}function Ou(t){return t!==""&&Pu.reduce(function(e,r){var i=r[0],n=r[1];if(e)return e;var s=n.exec(t);return!!s&&[i,s]},!1)}function Co(t){var e=Ou(t);if(!e)return null;var r=e[0],i=e[1];if(r==="searchbot")return new xu;var n=i[1]&&i[1].split(/[._]/).slice(0,3);n?n.length<Mo&&(n=Eu(n,Fu(Mo-n.length))):n=[];var s=n.join("."),o=Bu(t),c=Ru.exec(t);return c&&c[1]?new Mu(r,s,o,c[1]):new Su(r,s,o)}function Bu(t){for(var e=0,r=xo.length;e<r;e++){var i=xo[e],n=i[0],s=i[1],o=s.exec(t);if(o)return n}return null}function ku(){var t=typeof H.dist.process<"u"&&H.dist.process.version;return t?new Iu(H.dist.process.version.slice(1)):null}function Fu(t){for(var e=[],r=0;r<t;r++)e.push("0");return e}function Ks(t){return Tu(t)}function gn(){const t=Ks();return t&&t.os?t.os:void 0}function Rc(){const t=gn();return t?t.toLowerCase().includes("android"):!1}function Pc(){const t=gn();return t?t.toLowerCase().includes("ios")||t.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1:!1}function Du(){return gn()?Rc()||Pc():!1}function Tc(){const t=Ks();return t&&t.name?t.name.toLowerCase()==="node":!1}function qu(){return!Tc()&&!!Oc()}const Lu=vc,Uu=wc,$u=bc,zu=_c,ju=Ac,Oc=Ec,Ku=Sc,Vu=Ic,Hu=Mc,Wu=xc,Ju=Cc,mn=yc;function Qu(){return Nc()}function Gu(t){if(typeof t!="string")throw new Error(`Cannot safe json parse value of type ${typeof t}`);try{return JSON.parse(t)}catch{return t}}function Yu(t){return typeof t=="string"?t:JSON.stringify(t)}const Bc=Gu,kc=Yu;function Fc(t,e){const r=kc(e),i=mn();i&&i.setItem(t,r)}function Xu(t){let e=null,r=null;const i=mn();return i&&(r=i.getItem(t)),e=r&&Bc(r),e}function Zu(t){const e=mn();e&&e.removeItem(t)}const Dc="WALLETCONNECT_DEEPLINK_CHOICE";function ef(t,e){const r=encodeURIComponent(t);return e.universalLink?`${e.universalLink}/wc?uri=${r}`:e.deepLink?`${e.deepLink}${e.deepLink.endsWith(":")?"//":"/"}wc?uri=${r}`:""}function tf(t){const e=t.href.split("?")[0];Fc(Dc,Object.assign(Object.assign({},t),{href:e}))}function qc(t,e){return t.filter(r=>r.name.toLowerCase().includes(e.toLowerCase()))[0]}function rf(t,e){let r=t;return e&&(r=e.map(i=>qc(t,i)).filter(Boolean)),r}const Lc="https://registry.walletconnect.com";function nf(){return Lc+"/api/v2/wallets"}function sf(){return Lc+"/api/v2/dapps"}function Uc(t,e="mobile"){var r;return{name:t.name||"",shortName:t.metadata.shortName||"",color:t.metadata.colors.primary||"",logo:(r=t.image_url.sm)!==null&&r!==void 0?r:"",universalLink:t[e].universal||"",deepLink:t[e].native||""}}function of(t,e="mobile"){return Object.values(t).filter(r=>!!r[e].universal||!!r[e].native).map(r=>Uc(r,e))}const af=Object.freeze(Object.defineProperty({__proto__:null,detectEnv:Ks,detectOS:gn,formatIOSMobile:ef,formatMobileRegistry:of,formatMobileRegistryEntry:Uc,getClientMeta:Qu,getCrypto:Wu,getCryptoOrThrow:Hu,getDappRegistryUrl:sf,getDocument:zu,getDocumentOrThrow:$u,getFromWindow:Lu,getFromWindowOrThrow:Uu,getLocal:Xu,getLocalStorage:mn,getLocalStorageOrThrow:Ju,getLocation:Vu,getLocationOrThrow:Ku,getMobileLinkRegistry:rf,getMobileRegistryEntry:qc,getNavigator:Oc,getNavigatorOrThrow:ju,getWalletRegistryUrl:nf,isAndroid:Rc,isBrowser:qu,isIOS:Pc,isMobile:Du,isNode:Tc,mobileLinkChoiceKey:Dc,removeLocal:Zu,safeJsonParse:Bc,safeJsonStringify:kc,saveMobileLinkInfo:tf,setLocal:Fc},Symbol.toStringTag,{value:"Module"})),cf=H.getAugmentedNamespace(af);var Pi={},hf=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},$c={},fr={},lf=zs;function uf(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},t.foo()===42}catch{return!1}}ne.TYPED_ARRAY_SUPPORT=uf();var No=ne.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function ne(t,e,r){return!ne.TYPED_ARRAY_SUPPORT&&!(this instanceof ne)?new ne(t,e,r):typeof t=="number"?zc(this,t):vf(this,t,e,r)}ne.TYPED_ARRAY_SUPPORT&&(ne.prototype.__proto__=Uint8Array.prototype,ne.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&ne[Symbol.species]===ne&&Object.defineProperty(ne,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}));function Vs(t){if(t>=No)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+No.toString(16)+" bytes");return t|0}function ff(t){return t!==t}function Jr(t,e){var r;return ne.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(e),r.__proto__=ne.prototype):(r=t,r===null&&(r=new ne(e)),r.length=e),r}function zc(t,e){var r=Jr(t,e<0?0:Vs(e)|0);if(!ne.TYPED_ARRAY_SUPPORT)for(var i=0;i<e;++i)r[i]=0;return r}function df(t,e){var r=Kc(e)|0,i=Jr(t,r),n=i.write(e);return n!==r&&(i=i.slice(0,n)),i}function ws(t,e){for(var r=e.length<0?0:Vs(e.length)|0,i=Jr(t,r),n=0;n<r;n+=1)i[n]=e[n]&255;return i}function pf(t,e,r,i){if(r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(i||0))throw new RangeError("'length' is out of bounds");var n;return r===void 0&&i===void 0?n=new Uint8Array(e):i===void 0?n=new Uint8Array(e,r):n=new Uint8Array(e,r,i),ne.TYPED_ARRAY_SUPPORT?n.__proto__=ne.prototype:n=ws(t,n),n}function gf(t,e){if(ne.isBuffer(e)){var r=Vs(e.length)|0,i=Jr(t,r);return i.length===0||e.copy(i,0,0,r),i}if(e){if(typeof ArrayBuffer<"u"&&e.buffer instanceof ArrayBuffer||"length"in e)return typeof e.length!="number"||ff(e.length)?Jr(t,0):ws(t,e);if(e.type==="Buffer"&&Array.isArray(e.data))return ws(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function jc(t,e){e=e||1/0;for(var r,i=t.length,n=null,s=[],o=0;o<i;++o){if(r=t.charCodeAt(o),r>55295&&r<57344){if(!n){if(r>56319){(e-=3)>-1&&s.push(239,191,189);continue}else if(o+1===i){(e-=3)>-1&&s.push(239,191,189);continue}n=r;continue}if(r<56320){(e-=3)>-1&&s.push(239,191,189),n=r;continue}r=(n-55296<<10|r-56320)+65536}else n&&(e-=3)>-1&&s.push(239,191,189);if(n=null,r<128){if((e-=1)<0)break;s.push(r)}else if(r<2048){if((e-=2)<0)break;s.push(r>>6|192,r&63|128)}else if(r<65536){if((e-=3)<0)break;s.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((e-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return s}function Kc(t){if(ne.isBuffer(t))return t.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;typeof t!="string"&&(t=""+t);var e=t.length;return e===0?0:jc(t).length}function mf(t,e,r,i){for(var n=0;n<i&&!(n+r>=e.length||n>=t.length);++n)e[n+r]=t[n];return n}function yf(t,e,r,i){return mf(jc(e,t.length-r),t,r,i)}function vf(t,e,r,i){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer?pf(t,e,r,i):typeof e=="string"?df(t,e):gf(t,e)}ne.prototype.write=function(e,r,i){r===void 0?(i=this.length,r=0):i===void 0&&typeof r=="string"?(i=this.length,r=0):isFinite(r)&&(r=r|0,isFinite(i)?i=i|0:i=void 0);var n=this.length-r;if((i===void 0||i>n)&&(i=n),e.length>0&&(i<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");return yf(this,e,r,i)};ne.prototype.slice=function(e,r){var i=this.length;e=~~e,r=r===void 0?i:~~r,e<0?(e+=i,e<0&&(e=0)):e>i&&(e=i),r<0?(r+=i,r<0&&(r=0)):r>i&&(r=i),r<e&&(r=e);var n;if(ne.TYPED_ARRAY_SUPPORT)n=this.subarray(e,r),n.__proto__=ne.prototype;else{var s=r-e;n=new ne(s,void 0);for(var o=0;o<s;++o)n[o]=this[o+e]}return n};ne.prototype.copy=function(e,r,i,n){if(i||(i=0),!n&&n!==0&&(n=this.length),r>=e.length&&(r=e.length),r||(r=0),n>0&&n<i&&(n=i),n===i||e.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-r<n-i&&(n=e.length-r+i);var s=n-i,o;if(this===e&&i<r&&r<n)for(o=s-1;o>=0;--o)e[o+r]=this[o+i];else if(s<1e3||!ne.TYPED_ARRAY_SUPPORT)for(o=0;o<s;++o)e[o+r]=this[o+i];else Uint8Array.prototype.set.call(e,this.subarray(i,i+s),r);return s};ne.prototype.fill=function(e,r,i){if(typeof e=="string"){if(typeof r=="string"?(r=0,i=this.length):typeof i=="string"&&(i=this.length),e.length===1){var n=e.charCodeAt(0);n<256&&(e=n)}}else typeof e=="number"&&(e=e&255);if(r<0||this.length<r||this.length<i)throw new RangeError("Out of range index");if(i<=r)return this;r=r>>>0,i=i===void 0?this.length:i>>>0,e||(e=0);var s;if(typeof e=="number")for(s=r;s<i;++s)this[s]=e;else{var o=ne.isBuffer(e)?e:new ne(e),c=o.length;for(s=0;s<i-r;++s)this[s+r]=o[s%c]}return this};ne.concat=function(e,r){if(!lf(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return Jr(null,0);var i;if(r===void 0)for(r=0,i=0;i<e.length;++i)r+=e[i].length;var n=zc(null,r),s=0;for(i=0;i<e.length;++i){var o=e[i];if(!ne.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,s),s+=o.length}return n};ne.byteLength=Kc;ne.prototype._isBuffer=!0;ne.isBuffer=function(e){return!!(e!=null&&e._isBuffer)};fr.alloc=function(t){var e=new ne(t);return e.fill(0),e};fr.from=function(t){return new ne(t)};var yt={},Hs,wf=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];yt.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};yt.getSymbolTotalCodewords=function(e){return wf[e]};yt.getBCHDigit=function(t){for(var e=0;t!==0;)e++,t>>>=1;return e};yt.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');Hs=e};yt.isKanjiModeEnabled=function(){return typeof Hs<"u"};yt.toSJIS=function(e){return Hs(e)};var yn={};(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(r){if(typeof r!="string")throw new Error("Param is not a string");var i=r.toLowerCase();switch(i){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+r)}}t.isValid=function(i){return i&&typeof i.bit<"u"&&i.bit>=0&&i.bit<4},t.from=function(i,n){if(t.isValid(i))return i;try{return e(i)}catch{return n}}})(yn);function Vc(){this.buffer=[],this.length=0}Vc.prototype={get:function(t){var e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(var r=0;r<e;r++)this.putBit((t>>>e-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var bf=Vc,Ro=fr;function Ti(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=Ro.alloc(t*t),this.reservedBit=Ro.alloc(t*t)}Ti.prototype.set=function(t,e,r,i){var n=t*this.size+e;this.data[n]=r,i&&(this.reservedBit[n]=!0)};Ti.prototype.get=function(t,e){return this.data[t*this.size+e]};Ti.prototype.xor=function(t,e,r){this.data[t*this.size+e]^=r};Ti.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var _f=Ti,Hc={};(function(t){var e=yt.getSymbolSize;t.getRowColCoords=function(i){if(i===1)return[];for(var n=Math.floor(i/7)+2,s=e(i),o=s===145?26:Math.ceil((s-13)/(2*n-2))*2,c=[s-7],h=1;h<n-1;h++)c[h]=c[h-1]-o;return c.push(6),c.reverse()},t.getPositions=function(i){for(var n=[],s=t.getRowColCoords(i),o=s.length,c=0;c<o;c++)for(var h=0;h<o;h++)c===0&&h===0||c===0&&h===o-1||c===o-1&&h===0||n.push([s[c],s[h]]);return n}})(Hc);var Wc={},Af=yt.getSymbolSize,Po=7;Wc.getPositions=function(e){var r=Af(e);return[[0,0],[r-Po,0],[0,r-Po]]};var Jc={};(function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var e={N1:3,N2:3,N3:40,N4:10};t.isValid=function(n){return n!=null&&n!==""&&!isNaN(n)&&n>=0&&n<=7},t.from=function(n){return t.isValid(n)?parseInt(n,10):void 0},t.getPenaltyN1=function(n){for(var s=n.size,o=0,c=0,h=0,u=null,d=null,m=0;m<s;m++){c=h=0,u=d=null;for(var b=0;b<s;b++){var A=n.get(m,b);A===u?c++:(c>=5&&(o+=e.N1+(c-5)),u=A,c=1),A=n.get(b,m),A===d?h++:(h>=5&&(o+=e.N1+(h-5)),d=A,h=1)}c>=5&&(o+=e.N1+(c-5)),h>=5&&(o+=e.N1+(h-5))}return o},t.getPenaltyN2=function(n){for(var s=n.size,o=0,c=0;c<s-1;c++)for(var h=0;h<s-1;h++){var u=n.get(c,h)+n.get(c,h+1)+n.get(c+1,h)+n.get(c+1,h+1);(u===4||u===0)&&o++}return o*e.N2},t.getPenaltyN3=function(n){for(var s=n.size,o=0,c=0,h=0,u=0;u<s;u++){c=h=0;for(var d=0;d<s;d++)c=c<<1&2047|n.get(u,d),d>=10&&(c===1488||c===93)&&o++,h=h<<1&2047|n.get(d,u),d>=10&&(h===1488||h===93)&&o++}return o*e.N3},t.getPenaltyN4=function(n){for(var s=0,o=n.data.length,c=0;c<o;c++)s+=n.data[c];var h=Math.abs(Math.ceil(s*100/o/5)-10);return h*e.N4};function r(i,n,s){switch(i){case t.Patterns.PATTERN000:return(n+s)%2===0;case t.Patterns.PATTERN001:return n%2===0;case t.Patterns.PATTERN010:return s%3===0;case t.Patterns.PATTERN011:return(n+s)%3===0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(s/3))%2===0;case t.Patterns.PATTERN101:return n*s%2+n*s%3===0;case t.Patterns.PATTERN110:return(n*s%2+n*s%3)%2===0;case t.Patterns.PATTERN111:return(n*s%3+(n+s)%2)%2===0;default:throw new Error("bad maskPattern:"+i)}}t.applyMask=function(n,s){for(var o=s.size,c=0;c<o;c++)for(var h=0;h<o;h++)s.isReserved(h,c)||s.xor(h,c,r(n,h,c))},t.getBestMask=function(n,s){for(var o=Object.keys(t.Patterns).length,c=0,h=1/0,u=0;u<o;u++){s(u),t.applyMask(u,n);var d=t.getPenaltyN1(n)+t.getPenaltyN2(n)+t.getPenaltyN3(n)+t.getPenaltyN4(n);t.applyMask(u,n),d<h&&(h=d,c=u)}return c}})(Jc);var vn={},cr=yn,Ui=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],$i=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];vn.getBlocksCount=function(e,r){switch(r){case cr.L:return Ui[(e-1)*4+0];case cr.M:return Ui[(e-1)*4+1];case cr.Q:return Ui[(e-1)*4+2];case cr.H:return Ui[(e-1)*4+3];default:return}};vn.getTotalCodewordsCount=function(e,r){switch(r){case cr.L:return $i[(e-1)*4+0];case cr.M:return $i[(e-1)*4+1];case cr.Q:return $i[(e-1)*4+2];case cr.H:return $i[(e-1)*4+3];default:return}};var Qc={},wn={},Gc=fr,bi=Gc.alloc(512),tn=Gc.alloc(256);(function(){for(var e=1,r=0;r<255;r++)bi[r]=e,tn[e]=r,e<<=1,e&256&&(e^=285);for(r=255;r<512;r++)bi[r]=bi[r-255]})();wn.log=function(e){if(e<1)throw new Error("log("+e+")");return tn[e]};wn.exp=function(e){return bi[e]};wn.mul=function(e,r){return e===0||r===0?0:bi[tn[e]+tn[r]]};(function(t){var e=fr,r=wn;t.mul=function(n,s){for(var o=e.alloc(n.length+s.length-1),c=0;c<n.length;c++)for(var h=0;h<s.length;h++)o[c+h]^=r.mul(n[c],s[h]);return o},t.mod=function(n,s){for(var o=e.from(n);o.length-s.length>=0;){for(var c=o[0],h=0;h<s.length;h++)o[h]^=r.mul(s[h],c);for(var u=0;u<o.length&&o[u]===0;)u++;o=o.slice(u)}return o},t.generateECPolynomial=function(n){for(var s=e.from([1]),o=0;o<n;o++)s=t.mul(s,[1,r.exp(o)]);return s}})(Qc);var To=fr,Yc=Qc,Ef=H.bufferPolyfill.Buffer;function Ws(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}Ws.prototype.initialize=function(e){this.degree=e,this.genPoly=Yc.generateECPolynomial(this.degree)};Ws.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");var r=To.alloc(this.degree),i=Ef.concat([e,r],e.length+this.degree),n=Yc.mod(i,this.genPoly),s=this.degree-n.length;if(s>0){var o=To.alloc(this.degree);return n.copy(o,s),o}return n};var Sf=Ws,Xc={},dr={},Js={};Js.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var Ut={},Zc="[0-9]+",If="[A-Z $%*+\\-./:]+",Ii="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Ii=Ii.replace(/u/g,"\\u");var Mf="(?:(?![A-Z0-9 $%*+\\-./:]|"+Ii+`)(?:.|[\r
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const H=require("./index-DfYc88fY.js"),iu=require("./dijkstra-CtFxn7S9.js"),P=require("./browser-CMlhlM7_.js"),L=require("./index-CaF25_vp.js");let nu=class extends P.r{constructor(e){super(e),this.events=new H.eventsExports.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(e=this.connection){await this.open(e)}async disconnect(){await this.close()}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}async request(e,r){return this.requestStrict(P.formatJsonRpcRequest(e.method,e.params||[],e.id||P.getBigIntRpcId().toString()),r)}async requestStrict(e,r){return new Promise(async(i,n)=>{if(!this.connection.connected)try{await this.open()}catch(s){n(s)}this.events.on(`${e.id}`,s=>{P.isJsonRpcError(s)?n(s.error):i(s.result)});try{await this.connection.send(e,r)}catch(s){n(s)}})}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),P.isJsonRpcResponse(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&e.code===3e3&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}async open(e=this.connection){this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),typeof e=="string"&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",e=>this.onPayload(e)),this.connection.on("close",e=>this.onClose(e)),this.connection.on("error",e=>this.events.emit("error",e)),this.connection.on("register_error",e=>this.onClose()),this.hasRegisteredEventListeners=!0)}};var su=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,r=[],i=0;i<t.rangeCount;i++)r.push(t.getRangeAt(i));switch(e.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":e.blur();break;default:e=null;break}return t.removeAllRanges(),function(){t.type==="Caret"&&t.removeAllRanges(),t.rangeCount||r.forEach(function(n){t.addRange(n)}),e&&e.focus()}},ou=su,So={"text/plain":"Text","text/html":"Url",default:"Text"},au="Copy to clipboard: #{key}, Enter";function cu(t){var e=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return t.replace(/#{\s*key\s*}/g,e)}function hu(t,e){var r,i,n,s,o,c,h=!1;e||(e={}),r=e.debug||!1;try{n=ou(),s=document.createRange(),o=document.getSelection(),c=document.createElement("span"),c.textContent=t,c.ariaHidden="true",c.style.all="unset",c.style.position="fixed",c.style.top=0,c.style.clip="rect(0, 0, 0, 0)",c.style.whiteSpace="pre",c.style.webkitUserSelect="text",c.style.MozUserSelect="text",c.style.msUserSelect="text",c.style.userSelect="text",c.addEventListener("copy",function(d){if(d.stopPropagation(),e.format)if(d.preventDefault(),typeof d.clipboardData>"u"){r&&console.warn("unable to use e.clipboardData"),r&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var m=So[e.format]||So.default;window.clipboardData.setData(m,t)}else d.clipboardData.clearData(),d.clipboardData.setData(e.format,t);e.onCopy&&(d.preventDefault(),e.onCopy(d.clipboardData))}),document.body.appendChild(c),s.selectNodeContents(c),o.addRange(s);var u=document.execCommand("copy");if(!u)throw new Error("copy command was unsuccessful");h=!0}catch(d){r&&console.error("unable to copy using execCommand: ",d),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),h=!0}catch(m){r&&console.error("unable to copy using clipboardData: ",m),r&&console.error("falling back to prompt"),i=cu("message"in e?e.message:au),window.prompt(i,t)}}finally{o&&(typeof o.removeRange=="function"?o.removeRange(s):o.removeAllRanges()),c&&document.body.removeChild(c),n()}return h}var lu=hu,uu={}.toString,zs=Array.isArray||function(t){return uu.call(t)=="[object Array]"},js={},he={};Object.defineProperty(he,"__esModule",{value:!0});var yc=he.getLocalStorage=Cc=he.getLocalStorageOrThrow=xc=he.getCrypto=Mc=he.getCryptoOrThrow=Ic=he.getLocation=Sc=he.getLocationOrThrow=Ec=he.getNavigator=Ac=he.getNavigatorOrThrow=_c=he.getDocument=bc=he.getDocumentOrThrow=wc=he.getFromWindowOrThrow=vc=he.getFromWindow=void 0;function kr(t){let e;return typeof window<"u"&&typeof window[t]<"u"&&(e=window[t]),e}var vc=he.getFromWindow=kr;function ri(t){const e=kr(t);if(!e)throw new Error(`${t} is not defined in Window`);return e}var wc=he.getFromWindowOrThrow=ri;function fu(){return ri("document")}var bc=he.getDocumentOrThrow=fu;function du(){return kr("document")}var _c=he.getDocument=du;function pu(){return ri("navigator")}var Ac=he.getNavigatorOrThrow=pu;function gu(){return kr("navigator")}var Ec=he.getNavigator=gu;function mu(){return ri("location")}var Sc=he.getLocationOrThrow=mu;function yu(){return kr("location")}var Ic=he.getLocation=yu;function vu(){return ri("crypto")}var Mc=he.getCryptoOrThrow=vu;function wu(){return kr("crypto")}var xc=he.getCrypto=wu;function bu(){return ri("localStorage")}var Cc=he.getLocalStorageOrThrow=bu;function _u(){return kr("localStorage")}yc=he.getLocalStorage=_u;Object.defineProperty(js,"__esModule",{value:!0});var Nc=js.getWindowMetadata=void 0;const Io=he;function Au(){let t,e;try{t=Io.getDocumentOrThrow(),e=Io.getLocationOrThrow()}catch{return null}function r(){const m=t.getElementsByTagName("link"),b=[];for(let A=0;A<m.length;A++){const E=m[A],x=E.getAttribute("rel");if(x&&x.toLowerCase().indexOf("icon")>-1){const I=E.getAttribute("href");if(I)if(I.toLowerCase().indexOf("https:")===-1&&I.toLowerCase().indexOf("http:")===-1&&I.indexOf("//")!==0){let C=e.protocol+"//"+e.host;if(I.indexOf("/")===0)C+=I;else{const R=e.pathname.split("/");R.pop();const T=R.join("/");C+=T+"/"+I}b.push(C)}else if(I.indexOf("//")===0){const C=e.protocol+I;b.push(C)}else b.push(I)}}return b}function i(...m){const b=t.getElementsByTagName("meta");for(let A=0;A<b.length;A++){const E=b[A],x=["itemprop","property","name"].map(I=>E.getAttribute(I)).filter(I=>I?m.includes(I):!1);if(x.length&&x){const I=E.getAttribute("content");if(I)return I}}return""}function n(){let m=i("name","og:site_name","og:title","twitter:title");return m||(m=t.title),m}function s(){return i("description","og:description","twitter:description","keywords")}const o=n(),c=s(),h=e.origin,u=r();return{description:c,url:h,icons:u,name:o}}Nc=js.getWindowMetadata=Au;var Eu=function(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var i=Array(t),n=0,e=0;e<r;e++)for(var s=arguments[e],o=0,c=s.length;o<c;o++,n++)i[n]=s[o];return i},Su=function(){function t(e,r,i){this.name=e,this.version=r,this.os=i,this.type="browser"}return t}(),Iu=function(){function t(e){this.version=e,this.type="node",this.name="node",this.os=H.dist.process.platform}return t}(),Mu=function(){function t(e,r,i,n){this.name=e,this.version=r,this.os=i,this.bot=n,this.type="bot-device"}return t}(),xu=function(){function t(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return t}(),Cu=function(){function t(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return t}(),Nu=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,Ru=/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,Mo=3,Pu=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",Nu]],xo=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function Tu(t){return t?Co(t):typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new Cu:typeof navigator<"u"?Co(navigator.userAgent):ku()}function Ou(t){return t!==""&&Pu.reduce(function(e,r){var i=r[0],n=r[1];if(e)return e;var s=n.exec(t);return!!s&&[i,s]},!1)}function Co(t){var e=Ou(t);if(!e)return null;var r=e[0],i=e[1];if(r==="searchbot")return new xu;var n=i[1]&&i[1].split(/[._]/).slice(0,3);n?n.length<Mo&&(n=Eu(n,Fu(Mo-n.length))):n=[];var s=n.join("."),o=Bu(t),c=Ru.exec(t);return c&&c[1]?new Mu(r,s,o,c[1]):new Su(r,s,o)}function Bu(t){for(var e=0,r=xo.length;e<r;e++){var i=xo[e],n=i[0],s=i[1],o=s.exec(t);if(o)return n}return null}function ku(){var t=typeof H.dist.process<"u"&&H.dist.process.version;return t?new Iu(H.dist.process.version.slice(1)):null}function Fu(t){for(var e=[],r=0;r<t;r++)e.push("0");return e}function Ks(t){return Tu(t)}function gn(){const t=Ks();return t&&t.os?t.os:void 0}function Rc(){const t=gn();return t?t.toLowerCase().includes("android"):!1}function Pc(){const t=gn();return t?t.toLowerCase().includes("ios")||t.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1:!1}function Du(){return gn()?Rc()||Pc():!1}function Tc(){const t=Ks();return t&&t.name?t.name.toLowerCase()==="node":!1}function qu(){return!Tc()&&!!Oc()}const Lu=vc,Uu=wc,$u=bc,zu=_c,ju=Ac,Oc=Ec,Ku=Sc,Vu=Ic,Hu=Mc,Wu=xc,Ju=Cc,mn=yc;function Qu(){return Nc()}function Gu(t){if(typeof t!="string")throw new Error(`Cannot safe json parse value of type ${typeof t}`);try{return JSON.parse(t)}catch{return t}}function Yu(t){return typeof t=="string"?t:JSON.stringify(t)}const Bc=Gu,kc=Yu;function Fc(t,e){const r=kc(e),i=mn();i&&i.setItem(t,r)}function Xu(t){let e=null,r=null;const i=mn();return i&&(r=i.getItem(t)),e=r&&Bc(r),e}function Zu(t){const e=mn();e&&e.removeItem(t)}const Dc="WALLETCONNECT_DEEPLINK_CHOICE";function ef(t,e){const r=encodeURIComponent(t);return e.universalLink?`${e.universalLink}/wc?uri=${r}`:e.deepLink?`${e.deepLink}${e.deepLink.endsWith(":")?"//":"/"}wc?uri=${r}`:""}function tf(t){const e=t.href.split("?")[0];Fc(Dc,Object.assign(Object.assign({},t),{href:e}))}function qc(t,e){return t.filter(r=>r.name.toLowerCase().includes(e.toLowerCase()))[0]}function rf(t,e){let r=t;return e&&(r=e.map(i=>qc(t,i)).filter(Boolean)),r}const Lc="https://registry.walletconnect.com";function nf(){return Lc+"/api/v2/wallets"}function sf(){return Lc+"/api/v2/dapps"}function Uc(t,e="mobile"){var r;return{name:t.name||"",shortName:t.metadata.shortName||"",color:t.metadata.colors.primary||"",logo:(r=t.image_url.sm)!==null&&r!==void 0?r:"",universalLink:t[e].universal||"",deepLink:t[e].native||""}}function of(t,e="mobile"){return Object.values(t).filter(r=>!!r[e].universal||!!r[e].native).map(r=>Uc(r,e))}const af=Object.freeze(Object.defineProperty({__proto__:null,detectEnv:Ks,detectOS:gn,formatIOSMobile:ef,formatMobileRegistry:of,formatMobileRegistryEntry:Uc,getClientMeta:Qu,getCrypto:Wu,getCryptoOrThrow:Hu,getDappRegistryUrl:sf,getDocument:zu,getDocumentOrThrow:$u,getFromWindow:Lu,getFromWindowOrThrow:Uu,getLocal:Xu,getLocalStorage:mn,getLocalStorageOrThrow:Ju,getLocation:Vu,getLocationOrThrow:Ku,getMobileLinkRegistry:rf,getMobileRegistryEntry:qc,getNavigator:Oc,getNavigatorOrThrow:ju,getWalletRegistryUrl:nf,isAndroid:Rc,isBrowser:qu,isIOS:Pc,isMobile:Du,isNode:Tc,mobileLinkChoiceKey:Dc,removeLocal:Zu,safeJsonParse:Bc,safeJsonStringify:kc,saveMobileLinkInfo:tf,setLocal:Fc},Symbol.toStringTag,{value:"Module"})),cf=H.getAugmentedNamespace(af);var Pi={},hf=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},$c={},fr={},lf=zs;function uf(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},t.foo()===42}catch{return!1}}ne.TYPED_ARRAY_SUPPORT=uf();var No=ne.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function ne(t,e,r){return!ne.TYPED_ARRAY_SUPPORT&&!(this instanceof ne)?new ne(t,e,r):typeof t=="number"?zc(this,t):vf(this,t,e,r)}ne.TYPED_ARRAY_SUPPORT&&(ne.prototype.__proto__=Uint8Array.prototype,ne.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&ne[Symbol.species]===ne&&Object.defineProperty(ne,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}));function Vs(t){if(t>=No)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+No.toString(16)+" bytes");return t|0}function ff(t){return t!==t}function Jr(t,e){var r;return ne.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(e),r.__proto__=ne.prototype):(r=t,r===null&&(r=new ne(e)),r.length=e),r}function zc(t,e){var r=Jr(t,e<0?0:Vs(e)|0);if(!ne.TYPED_ARRAY_SUPPORT)for(var i=0;i<e;++i)r[i]=0;return r}function df(t,e){var r=Kc(e)|0,i=Jr(t,r),n=i.write(e);return n!==r&&(i=i.slice(0,n)),i}function ws(t,e){for(var r=e.length<0?0:Vs(e.length)|0,i=Jr(t,r),n=0;n<r;n+=1)i[n]=e[n]&255;return i}function pf(t,e,r,i){if(r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(i||0))throw new RangeError("'length' is out of bounds");var n;return r===void 0&&i===void 0?n=new Uint8Array(e):i===void 0?n=new Uint8Array(e,r):n=new Uint8Array(e,r,i),ne.TYPED_ARRAY_SUPPORT?n.__proto__=ne.prototype:n=ws(t,n),n}function gf(t,e){if(ne.isBuffer(e)){var r=Vs(e.length)|0,i=Jr(t,r);return i.length===0||e.copy(i,0,0,r),i}if(e){if(typeof ArrayBuffer<"u"&&e.buffer instanceof ArrayBuffer||"length"in e)return typeof e.length!="number"||ff(e.length)?Jr(t,0):ws(t,e);if(e.type==="Buffer"&&Array.isArray(e.data))return ws(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function jc(t,e){e=e||1/0;for(var r,i=t.length,n=null,s=[],o=0;o<i;++o){if(r=t.charCodeAt(o),r>55295&&r<57344){if(!n){if(r>56319){(e-=3)>-1&&s.push(239,191,189);continue}else if(o+1===i){(e-=3)>-1&&s.push(239,191,189);continue}n=r;continue}if(r<56320){(e-=3)>-1&&s.push(239,191,189),n=r;continue}r=(n-55296<<10|r-56320)+65536}else n&&(e-=3)>-1&&s.push(239,191,189);if(n=null,r<128){if((e-=1)<0)break;s.push(r)}else if(r<2048){if((e-=2)<0)break;s.push(r>>6|192,r&63|128)}else if(r<65536){if((e-=3)<0)break;s.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((e-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return s}function Kc(t){if(ne.isBuffer(t))return t.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;typeof t!="string"&&(t=""+t);var e=t.length;return e===0?0:jc(t).length}function mf(t,e,r,i){for(var n=0;n<i&&!(n+r>=e.length||n>=t.length);++n)e[n+r]=t[n];return n}function yf(t,e,r,i){return mf(jc(e,t.length-r),t,r,i)}function vf(t,e,r,i){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer?pf(t,e,r,i):typeof e=="string"?df(t,e):gf(t,e)}ne.prototype.write=function(e,r,i){r===void 0?(i=this.length,r=0):i===void 0&&typeof r=="string"?(i=this.length,r=0):isFinite(r)&&(r=r|0,isFinite(i)?i=i|0:i=void 0);var n=this.length-r;if((i===void 0||i>n)&&(i=n),e.length>0&&(i<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");return yf(this,e,r,i)};ne.prototype.slice=function(e,r){var i=this.length;e=~~e,r=r===void 0?i:~~r,e<0?(e+=i,e<0&&(e=0)):e>i&&(e=i),r<0?(r+=i,r<0&&(r=0)):r>i&&(r=i),r<e&&(r=e);var n;if(ne.TYPED_ARRAY_SUPPORT)n=this.subarray(e,r),n.__proto__=ne.prototype;else{var s=r-e;n=new ne(s,void 0);for(var o=0;o<s;++o)n[o]=this[o+e]}return n};ne.prototype.copy=function(e,r,i,n){if(i||(i=0),!n&&n!==0&&(n=this.length),r>=e.length&&(r=e.length),r||(r=0),n>0&&n<i&&(n=i),n===i||e.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-r<n-i&&(n=e.length-r+i);var s=n-i,o;if(this===e&&i<r&&r<n)for(o=s-1;o>=0;--o)e[o+r]=this[o+i];else if(s<1e3||!ne.TYPED_ARRAY_SUPPORT)for(o=0;o<s;++o)e[o+r]=this[o+i];else Uint8Array.prototype.set.call(e,this.subarray(i,i+s),r);return s};ne.prototype.fill=function(e,r,i){if(typeof e=="string"){if(typeof r=="string"?(r=0,i=this.length):typeof i=="string"&&(i=this.length),e.length===1){var n=e.charCodeAt(0);n<256&&(e=n)}}else typeof e=="number"&&(e=e&255);if(r<0||this.length<r||this.length<i)throw new RangeError("Out of range index");if(i<=r)return this;r=r>>>0,i=i===void 0?this.length:i>>>0,e||(e=0);var s;if(typeof e=="number")for(s=r;s<i;++s)this[s]=e;else{var o=ne.isBuffer(e)?e:new ne(e),c=o.length;for(s=0;s<i-r;++s)this[s+r]=o[s%c]}return this};ne.concat=function(e,r){if(!lf(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return Jr(null,0);var i;if(r===void 0)for(r=0,i=0;i<e.length;++i)r+=e[i].length;var n=zc(null,r),s=0;for(i=0;i<e.length;++i){var o=e[i];if(!ne.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,s),s+=o.length}return n};ne.byteLength=Kc;ne.prototype._isBuffer=!0;ne.isBuffer=function(e){return!!(e!=null&&e._isBuffer)};fr.alloc=function(t){var e=new ne(t);return e.fill(0),e};fr.from=function(t){return new ne(t)};var yt={},Hs,wf=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];yt.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};yt.getSymbolTotalCodewords=function(e){return wf[e]};yt.getBCHDigit=function(t){for(var e=0;t!==0;)e++,t>>>=1;return e};yt.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');Hs=e};yt.isKanjiModeEnabled=function(){return typeof Hs<"u"};yt.toSJIS=function(e){return Hs(e)};var yn={};(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(r){if(typeof r!="string")throw new Error("Param is not a string");var i=r.toLowerCase();switch(i){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+r)}}t.isValid=function(i){return i&&typeof i.bit<"u"&&i.bit>=0&&i.bit<4},t.from=function(i,n){if(t.isValid(i))return i;try{return e(i)}catch{return n}}})(yn);function Vc(){this.buffer=[],this.length=0}Vc.prototype={get:function(t){var e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(var r=0;r<e;r++)this.putBit((t>>>e-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var bf=Vc,Ro=fr;function Ti(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=Ro.alloc(t*t),this.reservedBit=Ro.alloc(t*t)}Ti.prototype.set=function(t,e,r,i){var n=t*this.size+e;this.data[n]=r,i&&(this.reservedBit[n]=!0)};Ti.prototype.get=function(t,e){return this.data[t*this.size+e]};Ti.prototype.xor=function(t,e,r){this.data[t*this.size+e]^=r};Ti.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var _f=Ti,Hc={};(function(t){var e=yt.getSymbolSize;t.getRowColCoords=function(i){if(i===1)return[];for(var n=Math.floor(i/7)+2,s=e(i),o=s===145?26:Math.ceil((s-13)/(2*n-2))*2,c=[s-7],h=1;h<n-1;h++)c[h]=c[h-1]-o;return c.push(6),c.reverse()},t.getPositions=function(i){for(var n=[],s=t.getRowColCoords(i),o=s.length,c=0;c<o;c++)for(var h=0;h<o;h++)c===0&&h===0||c===0&&h===o-1||c===o-1&&h===0||n.push([s[c],s[h]]);return n}})(Hc);var Wc={},Af=yt.getSymbolSize,Po=7;Wc.getPositions=function(e){var r=Af(e);return[[0,0],[r-Po,0],[0,r-Po]]};var Jc={};(function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var e={N1:3,N2:3,N3:40,N4:10};t.isValid=function(n){return n!=null&&n!==""&&!isNaN(n)&&n>=0&&n<=7},t.from=function(n){return t.isValid(n)?parseInt(n,10):void 0},t.getPenaltyN1=function(n){for(var s=n.size,o=0,c=0,h=0,u=null,d=null,m=0;m<s;m++){c=h=0,u=d=null;for(var b=0;b<s;b++){var A=n.get(m,b);A===u?c++:(c>=5&&(o+=e.N1+(c-5)),u=A,c=1),A=n.get(b,m),A===d?h++:(h>=5&&(o+=e.N1+(h-5)),d=A,h=1)}c>=5&&(o+=e.N1+(c-5)),h>=5&&(o+=e.N1+(h-5))}return o},t.getPenaltyN2=function(n){for(var s=n.size,o=0,c=0;c<s-1;c++)for(var h=0;h<s-1;h++){var u=n.get(c,h)+n.get(c,h+1)+n.get(c+1,h)+n.get(c+1,h+1);(u===4||u===0)&&o++}return o*e.N2},t.getPenaltyN3=function(n){for(var s=n.size,o=0,c=0,h=0,u=0;u<s;u++){c=h=0;for(var d=0;d<s;d++)c=c<<1&2047|n.get(u,d),d>=10&&(c===1488||c===93)&&o++,h=h<<1&2047|n.get(d,u),d>=10&&(h===1488||h===93)&&o++}return o*e.N3},t.getPenaltyN4=function(n){for(var s=0,o=n.data.length,c=0;c<o;c++)s+=n.data[c];var h=Math.abs(Math.ceil(s*100/o/5)-10);return h*e.N4};function r(i,n,s){switch(i){case t.Patterns.PATTERN000:return(n+s)%2===0;case t.Patterns.PATTERN001:return n%2===0;case t.Patterns.PATTERN010:return s%3===0;case t.Patterns.PATTERN011:return(n+s)%3===0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(s/3))%2===0;case t.Patterns.PATTERN101:return n*s%2+n*s%3===0;case t.Patterns.PATTERN110:return(n*s%2+n*s%3)%2===0;case t.Patterns.PATTERN111:return(n*s%3+(n+s)%2)%2===0;default:throw new Error("bad maskPattern:"+i)}}t.applyMask=function(n,s){for(var o=s.size,c=0;c<o;c++)for(var h=0;h<o;h++)s.isReserved(h,c)||s.xor(h,c,r(n,h,c))},t.getBestMask=function(n,s){for(var o=Object.keys(t.Patterns).length,c=0,h=1/0,u=0;u<o;u++){s(u),t.applyMask(u,n);var d=t.getPenaltyN1(n)+t.getPenaltyN2(n)+t.getPenaltyN3(n)+t.getPenaltyN4(n);t.applyMask(u,n),d<h&&(h=d,c=u)}return c}})(Jc);var vn={},cr=yn,Ui=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],$i=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];vn.getBlocksCount=function(e,r){switch(r){case cr.L:return Ui[(e-1)*4+0];case cr.M:return Ui[(e-1)*4+1];case cr.Q:return Ui[(e-1)*4+2];case cr.H:return Ui[(e-1)*4+3];default:return}};vn.getTotalCodewordsCount=function(e,r){switch(r){case cr.L:return $i[(e-1)*4+0];case cr.M:return $i[(e-1)*4+1];case cr.Q:return $i[(e-1)*4+2];case cr.H:return $i[(e-1)*4+3];default:return}};var Qc={},wn={},Gc=fr,bi=Gc.alloc(512),tn=Gc.alloc(256);(function(){for(var e=1,r=0;r<255;r++)bi[r]=e,tn[e]=r,e<<=1,e&256&&(e^=285);for(r=255;r<512;r++)bi[r]=bi[r-255]})();wn.log=function(e){if(e<1)throw new Error("log("+e+")");return tn[e]};wn.exp=function(e){return bi[e]};wn.mul=function(e,r){return e===0||r===0?0:bi[tn[e]+tn[r]]};(function(t){var e=fr,r=wn;t.mul=function(n,s){for(var o=e.alloc(n.length+s.length-1),c=0;c<n.length;c++)for(var h=0;h<s.length;h++)o[c+h]^=r.mul(n[c],s[h]);return o},t.mod=function(n,s){for(var o=e.from(n);o.length-s.length>=0;){for(var c=o[0],h=0;h<s.length;h++)o[h]^=r.mul(s[h],c);for(var u=0;u<o.length&&o[u]===0;)u++;o=o.slice(u)}return o},t.generateECPolynomial=function(n){for(var s=e.from([1]),o=0;o<n;o++)s=t.mul(s,[1,r.exp(o)]);return s}})(Qc);var To=fr,Yc=Qc,Ef=H.bufferPolyfill.Buffer;function Ws(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}Ws.prototype.initialize=function(e){this.degree=e,this.genPoly=Yc.generateECPolynomial(this.degree)};Ws.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");var r=To.alloc(this.degree),i=Ef.concat([e,r],e.length+this.degree),n=Yc.mod(i,this.genPoly),s=this.degree-n.length;if(s>0){var o=To.alloc(this.degree);return n.copy(o,s),o}return n};var Sf=Ws,Xc={},dr={},Js={};Js.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var Ut={},Zc="[0-9]+",If="[A-Z $%*+\\-./:]+",Ii="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Ii=Ii.replace(/u/g,"\\u");var Mf="(?:(?![A-Z0-9 $%*+\\-./:]|"+Ii+`)(?:.|[\r
2
2
  ]))+`;Ut.KANJI=new RegExp(Ii,"g");Ut.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");Ut.BYTE=new RegExp(Mf,"g");Ut.NUMERIC=new RegExp(Zc,"g");Ut.ALPHANUMERIC=new RegExp(If,"g");var xf=new RegExp("^"+Ii+"$"),Cf=new RegExp("^"+Zc+"$"),Nf=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Ut.testKanji=function(e){return xf.test(e)};Ut.testNumeric=function(e){return Cf.test(e)};Ut.testAlphanumeric=function(e){return Nf.test(e)};(function(t){var e=Js,r=Ut;t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(s,o){if(!s.ccBits)throw new Error("Invalid mode: "+s);if(!e.isValid(o))throw new Error("Invalid version: "+o);return o>=1&&o<10?s.ccBits[0]:o<27?s.ccBits[1]:s.ccBits[2]},t.getBestModeForData=function(s){return r.testNumeric(s)?t.NUMERIC:r.testAlphanumeric(s)?t.ALPHANUMERIC:r.testKanji(s)?t.KANJI:t.BYTE},t.toString=function(s){if(s&&s.id)return s.id;throw new Error("Invalid mode")},t.isValid=function(s){return s&&s.bit&&s.ccBits};function i(n){if(typeof n!="string")throw new Error("Param is not a string");var s=n.toLowerCase();switch(s){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+n)}}t.from=function(s,o){if(t.isValid(s))return s;try{return i(s)}catch{return o}}})(dr);(function(t){var e=yt,r=vn,i=yn,n=dr,s=Js,o=zs,c=7973,h=e.getBCHDigit(c);function u(A,E,x){for(var I=1;I<=40;I++)if(E<=t.getCapacity(I,x,A))return I}function d(A,E){return n.getCharCountIndicator(A,E)+4}function m(A,E){var x=0;return A.forEach(function(I){var C=d(I.mode,E);x+=C+I.getBitsLength()}),x}function b(A,E){for(var x=1;x<=40;x++){var I=m(A,x);if(I<=t.getCapacity(x,E,n.MIXED))return x}}t.from=function(E,x){return s.isValid(E)?parseInt(E,10):x},t.getCapacity=function(E,x,I){if(!s.isValid(E))throw new Error("Invalid QR Code version");typeof I>"u"&&(I=n.BYTE);var C=e.getSymbolTotalCodewords(E),R=r.getTotalCodewordsCount(E,x),T=(C-R)*8;if(I===n.MIXED)return T;var N=T-d(I,E);switch(I){case n.NUMERIC:return Math.floor(N/10*3);case n.ALPHANUMERIC:return Math.floor(N/11*2);case n.KANJI:return Math.floor(N/13);case n.BYTE:default:return Math.floor(N/8)}},t.getBestVersionForData=function(E,x){var I,C=i.from(x,i.M);if(o(E)){if(E.length>1)return b(E,C);if(E.length===0)return 1;I=E[0]}else I=E;return u(I.mode,I.getLength(),C)},t.getEncodedBits=function(E){if(!s.isValid(E)||E<7)throw new Error("Invalid QR Code version");for(var x=E<<12;e.getBCHDigit(x)-h>=0;)x^=c<<e.getBCHDigit(x)-h;return E<<12|x}})(Xc);var eh={},bs=yt,th=1335,Rf=21522,Oo=bs.getBCHDigit(th);eh.getEncodedBits=function(e,r){for(var i=e.bit<<3|r,n=i<<10;bs.getBCHDigit(n)-Oo>=0;)n^=th<<bs.getBCHDigit(n)-Oo;return(i<<10|n)^Rf};var rh={},Pf=dr;function Qr(t){this.mode=Pf.NUMERIC,this.data=t.toString()}Qr.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)};Qr.prototype.getLength=function(){return this.data.length};Qr.prototype.getBitsLength=function(){return Qr.getBitsLength(this.data.length)};Qr.prototype.write=function(e){var r,i,n;for(r=0;r+3<=this.data.length;r+=3)i=this.data.substr(r,3),n=parseInt(i,10),e.put(n,10);var s=this.data.length-r;s>0&&(i=this.data.substr(r),n=parseInt(i,10),e.put(n,s*3+1))};var Tf=Qr,Of=dr,$n=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Gr(t){this.mode=Of.ALPHANUMERIC,this.data=t}Gr.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};Gr.prototype.getLength=function(){return this.data.length};Gr.prototype.getBitsLength=function(){return Gr.getBitsLength(this.data.length)};Gr.prototype.write=function(e){var r;for(r=0;r+2<=this.data.length;r+=2){var i=$n.indexOf(this.data[r])*45;i+=$n.indexOf(this.data[r+1]),e.put(i,11)}this.data.length%2&&e.put($n.indexOf(this.data[r]),6)};var Bf=Gr,kf=fr,Ff=dr;function Yr(t){this.mode=Ff.BYTE,this.data=kf.from(t)}Yr.getBitsLength=function(e){return e*8};Yr.prototype.getLength=function(){return this.data.length};Yr.prototype.getBitsLength=function(){return Yr.getBitsLength(this.data.length)};Yr.prototype.write=function(t){for(var e=0,r=this.data.length;e<r;e++)t.put(this.data[e],8)};var Df=Yr,qf=dr,Lf=yt;function Xr(t){this.mode=qf.KANJI,this.data=t}Xr.getBitsLength=function(e){return e*13};Xr.prototype.getLength=function(){return this.data.length};Xr.prototype.getBitsLength=function(){return Xr.getBitsLength(this.data.length)};Xr.prototype.write=function(t){var e;for(e=0;e<this.data.length;e++){var r=Lf.toSJIS(this.data[e]);if(r>=33088&&r<=40956)r-=33088;else if(r>=57408&&r<=60351)r-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+`
3
3
  Make sure your charset is UTF-8`);r=(r>>>8&255)*192+(r&255),t.put(r,13)}};var Uf=Xr;(function(t){var e=dr,r=Tf,i=Bf,n=Df,s=Uf,o=Ut,c=yt,h=iu.dijkstraExports;function u(C){return unescape(encodeURIComponent(C)).length}function d(C,R,T){for(var N=[],F;(F=C.exec(T))!==null;)N.push({data:F[0],index:F.index,mode:R,length:F[0].length});return N}function m(C){var R=d(o.NUMERIC,e.NUMERIC,C),T=d(o.ALPHANUMERIC,e.ALPHANUMERIC,C),N,F;c.isKanjiModeEnabled()?(N=d(o.BYTE,e.BYTE,C),F=d(o.KANJI,e.KANJI,C)):(N=d(o.BYTE_KANJI,e.BYTE,C),F=[]);var D=R.concat(T,N,F);return D.sort(function(U,j){return U.index-j.index}).map(function(U){return{data:U.data,mode:U.mode,length:U.length}})}function b(C,R){switch(R){case e.NUMERIC:return r.getBitsLength(C);case e.ALPHANUMERIC:return i.getBitsLength(C);case e.KANJI:return s.getBitsLength(C);case e.BYTE:return n.getBitsLength(C)}}function A(C){return C.reduce(function(R,T){var N=R.length-1>=0?R[R.length-1]:null;return N&&N.mode===T.mode?(R[R.length-1].data+=T.data,R):(R.push(T),R)},[])}function E(C){for(var R=[],T=0;T<C.length;T++){var N=C[T];switch(N.mode){case e.NUMERIC:R.push([N,{data:N.data,mode:e.ALPHANUMERIC,length:N.length},{data:N.data,mode:e.BYTE,length:N.length}]);break;case e.ALPHANUMERIC:R.push([N,{data:N.data,mode:e.BYTE,length:N.length}]);break;case e.KANJI:R.push([N,{data:N.data,mode:e.BYTE,length:u(N.data)}]);break;case e.BYTE:R.push([{data:N.data,mode:e.BYTE,length:u(N.data)}])}}return R}function x(C,R){for(var T={},N={start:{}},F=["start"],D=0;D<C.length;D++){for(var U=C[D],j=[],Z=0;Z<U.length;Z++){var oe=U[Z],ee=""+D+Z;j.push(ee),T[ee]={node:oe,lastCount:0},N[ee]={};for(var ae=0;ae<F.length;ae++){var a=F[ae];T[a]&&T[a].node.mode===oe.mode?(N[a][ee]=b(T[a].lastCount+oe.length,oe.mode)-b(T[a].lastCount,oe.mode),T[a].lastCount+=oe.length):(T[a]&&(T[a].lastCount=oe.length),N[a][ee]=b(oe.length,oe.mode)+4+e.getCharCountIndicator(oe.mode,R))}}F=j}for(ae=0;ae<F.length;ae++)N[F[ae]].end=0;return{map:N,table:T}}function I(C,R){var T,N=e.getBestModeForData(C);if(T=e.from(R,N),T!==e.BYTE&&T.bit<N.bit)throw new Error('"'+C+'" cannot be encoded with mode '+e.toString(T)+`.
4
4
  Suggested mode is: `+e.toString(N));switch(T===e.KANJI&&!c.isKanjiModeEnabled()&&(T=e.BYTE),T){case e.NUMERIC:return new r(C);case e.ALPHANUMERIC:return new i(C);case e.KANJI:return new s(C);case e.BYTE:return new n(C)}}t.fromArray=function(R){return R.reduce(function(T,N){return typeof N=="string"?T.push(I(N,null)):N.data&&T.push(I(N.data,N.mode)),T},[])},t.fromString=function(R,T){for(var N=m(R,c.isKanjiModeEnabled()),F=E(N),D=x(F,T),U=h.find_path(D.map,"start","end"),j=[],Z=1;Z<U.length-1;Z++)j.push(D.table[U[Z]].node);return t.fromArray(A(j))},t.rawSplit=function(R){return t.fromArray(m(R,c.isKanjiModeEnabled()))}})(rh);var Bo=fr,bn=yt,zn=yn,$f=bf,zf=_f,jf=Hc,Kf=Wc,_s=Jc,As=vn,Vf=Sf,rn=Xc,Hf=eh,Wf=dr,jn=rh,Jf=zs;function Qf(t,e){for(var r=t.size,i=Kf.getPositions(e),n=0;n<i.length;n++)for(var s=i[n][0],o=i[n][1],c=-1;c<=7;c++)if(!(s+c<=-1||r<=s+c))for(var h=-1;h<=7;h++)o+h<=-1||r<=o+h||(c>=0&&c<=6&&(h===0||h===6)||h>=0&&h<=6&&(c===0||c===6)||c>=2&&c<=4&&h>=2&&h<=4?t.set(s+c,o+h,!0,!0):t.set(s+c,o+h,!1,!0))}function Gf(t){for(var e=t.size,r=8;r<e-8;r++){var i=r%2===0;t.set(r,6,i,!0),t.set(6,r,i,!0)}}function Yf(t,e){for(var r=jf.getPositions(e),i=0;i<r.length;i++)for(var n=r[i][0],s=r[i][1],o=-2;o<=2;o++)for(var c=-2;c<=2;c++)o===-2||o===2||c===-2||c===2||o===0&&c===0?t.set(n+o,s+c,!0,!0):t.set(n+o,s+c,!1,!0)}function Xf(t,e){for(var r=t.size,i=rn.getEncodedBits(e),n,s,o,c=0;c<18;c++)n=Math.floor(c/3),s=c%3+r-8-3,o=(i>>c&1)===1,t.set(n,s,o,!0),t.set(s,n,o,!0)}function Kn(t,e,r){var i=t.size,n=Hf.getEncodedBits(e,r),s,o;for(s=0;s<15;s++)o=(n>>s&1)===1,s<6?t.set(s,8,o,!0):s<8?t.set(s+1,8,o,!0):t.set(i-15+s,8,o,!0),s<8?t.set(8,i-s-1,o,!0):s<9?t.set(8,15-s-1+1,o,!0):t.set(8,15-s-1,o,!0);t.set(i-8,8,1,!0)}function Zf(t,e){for(var r=t.size,i=-1,n=r-1,s=7,o=0,c=r-1;c>0;c-=2)for(c===6&&c--;;){for(var h=0;h<2;h++)if(!t.isReserved(n,c-h)){var u=!1;o<e.length&&(u=(e[o]>>>s&1)===1),t.set(n,c-h,u),s--,s===-1&&(o++,s=7)}if(n+=i,n<0||r<=n){n-=i,i=-i;break}}}function ed(t,e,r){var i=new $f;r.forEach(function(u){i.put(u.mode.bit,4),i.put(u.getLength(),Wf.getCharCountIndicator(u.mode,t)),u.write(i)});var n=bn.getSymbolTotalCodewords(t),s=As.getTotalCodewordsCount(t,e),o=(n-s)*8;for(i.getLengthInBits()+4<=o&&i.put(0,4);i.getLengthInBits()%8!==0;)i.putBit(0);for(var c=(o-i.getLengthInBits())/8,h=0;h<c;h++)i.put(h%2?17:236,8);return td(i,t,e)}function td(t,e,r){for(var i=bn.getSymbolTotalCodewords(e),n=As.getTotalCodewordsCount(e,r),s=i-n,o=As.getBlocksCount(e,r),c=i%o,h=o-c,u=Math.floor(i/o),d=Math.floor(s/o),m=d+1,b=u-d,A=new Vf(b),E=0,x=new Array(o),I=new Array(o),C=0,R=Bo.from(t.buffer),T=0;T<o;T++){var N=T<h?d:m;x[T]=R.slice(E,E+N),I[T]=A.encode(x[T]),E+=N,C=Math.max(C,N)}var F=Bo.alloc(i),D=0,U,j;for(U=0;U<C;U++)for(j=0;j<o;j++)U<x[j].length&&(F[D++]=x[j][U]);for(U=0;U<b;U++)for(j=0;j<o;j++)F[D++]=I[j][U];return F}function rd(t,e,r,i){var n;if(Jf(t))n=jn.fromArray(t);else if(typeof t=="string"){var s=e;if(!s){var o=jn.rawSplit(t);s=rn.getBestVersionForData(o,r)}n=jn.fromString(t,s||40)}else throw new Error("Invalid data");var c=rn.getBestVersionForData(n,r);if(!c)throw new Error("The amount of data is too big to be stored in a QR Code");if(!e)e=c;else if(e<c)throw new Error(`
@@ -1,11 +1,11 @@
1
1
  var Hs = Object.defineProperty;
2
2
  var Gs = (i, e, t) => e in i ? Hs(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
3
  var M = (i, e, t) => (Gs(i, typeof e != "symbol" ? e + "" : e, t), t);
4
- import { n as B, aH as se, aI as P, aJ as R, aK as he, aL as q, aM as re, aN as ze, aO as ge, aP as Gt, aQ as J, a2 as ne, aF as bt, aG as Sn, aR as je, aS as js, aT as Ys, aU as Js, aV as Xs, aW as Vn, c7 as wn, aX as Zs, aY as Qs, aZ as er, cf as In, cg as tr, d as F, ab as nr, o as An, $ as sr, ch as _n, a_ as rr, ce as ir, bp as Ye, ci as or, c6 as ar } from "./index-DjJSdBO_.mjs";
4
+ import { n as B, aH as se, aI as P, aJ as R, aK as he, aL as q, aM as re, aN as ze, aO as ge, aP as Gt, aQ as J, a2 as ne, aF as bt, aG as Sn, aR as je, aS as js, aT as Ys, aU as Js, aV as Xs, aW as Vn, c7 as wn, aX as Zs, aY as Qs, aZ as er, cf as In, cg as tr, d as F, ab as nr, o as An, $ as sr, ch as _n, a_ as rr, ce as ir, bp as Ye, ci as or, c6 as ar } from "./index-C1JlVOwd.mjs";
5
5
  import { c as cr } from "./index-DpFNxVts.mjs";
6
- import { P as He, a as yt, S as ur, b as dr, _ as lr } from "./solana-DGHdzU4Y.mjs";
7
- import { c as hr } from "./create-Bh45gqri.mjs";
8
- import { r as fr } from "./chain-CNimQoal.mjs";
6
+ import { P as He, a as yt, S as ur, b as dr, _ as lr } from "./solana-eqcW3EUS.mjs";
7
+ import { c as hr } from "./create-PB82rGuQ.mjs";
8
+ import { r as fr } from "./chain-BZjg2BoT.mjs";
9
9
  function Te(i, e) {
10
10
  return He.findProgramAddressSync(i, new He(e))[0];
11
11
  }
@@ -1 +1 @@
1
- "use strict";var _=Object.defineProperty;var v=(h,e,t)=>e in h?_(h,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):h[e]=t;var c=(h,e,t)=>(v(h,typeof e!="symbol"?e+"":e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index-D05MUiKM.js");const i=require("./cosmwasm-t4y0gzD9.js"),o=require("./unsignedTransaction-wkSutsdc.js"),r=require("./index-Cpfo_13K.js"),C=require("./chain-BS9tnRQF.js");class l{constructor(e,t,s,n){c(this,"network");c(this,"chain");c(this,"rpc");c(this,"contracts");c(this,"tokenBridge");c(this,"translator");this.network=e,this.chain=t,this.rpc=s,this.contracts=n;const a=this.contracts.tokenBridge;if(!a)throw new Error(`Wormhole Token Bridge contract for domain ${t} not found`);if(this.tokenBridge=a,this.translator=this.contracts.translator,this.translator!==void 0&&this.translator==="")throw new Error("Translator address may be undefined but not empty string")}static async fromRpc(e,t){const[s,n]=await i.CosmwasmPlatform.chainFromRpc(e),a=t[n];if(a.network!==s)throw new Error(`Network mismatch: ${a.network} != ${s}`);return new l(s,n,e,t[n].contracts)}async isWrappedAsset(e){try{return await this.getOriginalAsset(e),!0}catch{}return!1}async hasWrappedAsset(e){try{return await this.getWrappedAsset(e),!0}catch{}return!1}async getWrappedAsset(e){if(e.chain===this.chain)throw new Error(`Expected foreign chain, got ${e.chain}`);if(r.isNative(e.address))throw new Error("Native asset cannot be a wrapped asset");const t=r.b64.encode(e.address.toUniversalAddress().toUint8Array()),{address:s}=await this.rpc.queryContractSmart(this.tokenBridge,{wrapped_registry:{chain:r.toChainId(e.chain),address:t}});return r.toNative(this.chain,s)}async getOriginalAsset(e){let t=new i.CosmwasmAddress(e);t.denomType==="factory"&&(t=i.Gateway.factoryToCw20(t));const s=await this.rpc.queryContractSmart(t.toString(),{wrapped_asset_info:{}}),n=r.toChain(s.asset_chain),a=r.b64.decode(s.asset_address);return{chain:n,address:new r.UniversalAddress(new Uint8Array(a))}}async isTransferCompleted(e){const t=r.b64.encode(r.serialize(e));return(await this.rpc.queryContractSmart(this.tokenBridge,{is_vaa_redeemed:{vaa:t}})).is_redeemed}async*createAttestation(e,t){if(!t)throw new Error("Payer required to create attestation");const s=new i.CosmwasmAddress(e).toString(),n=new i.CosmwasmAddress(t).toString(),a=0,w=r.isNative(e)?{native_token:{denom:i.CosmwasmPlatform.getNativeDenom(this.network,this.chain)}}:{token:{contract_addr:s}};yield this.createUnsignedTx({msgs:[o.buildExecuteMsg(n,this.tokenBridge,{create_asset_meta:{asset_info:w,nonce:a}})],fee:o.computeFee(this.network,this.chain),memo:"Wormhole - Create Attestation"},"TokenBridge.createAttestation")}async*submitAttestation(e,t){if(!t)throw new Error("Payer required to submit attestation");const s=new i.CosmwasmAddress(t).toString();yield this.createUnsignedTx({msgs:[o.buildExecuteMsg(s,this.tokenBridge,{submit_vaa:{data:r.serialize(e)}})],fee:o.computeFee(this.network,this.chain),memo:"Wormhole - Submit Attestation"},"TokenBridge.submitAttestation")}async*transfer(e,t,s,n,a){const w=Math.round(Math.random()*1e5),u="0",k=r.toChainId(t.chain),A=r.b64.encode(t.address.toUniversalAddress().toUint8Array()),T=i.CosmwasmPlatform.getNativeDenom(this.network,this.chain),f=r.isNative(s);let d=f?T:s.toString();d.startsWith("factory")&&(d=i.Gateway.factoryToCw20(new i.CosmwasmAddress(d)).toString());const g=new i.CosmwasmAddress(e).toString(),p=m=>{const y={asset:{amount:n.toString(),info:m},recipient_chain:k,recipient:A,fee:u,nonce:w};return a?{initiate_transfer_with_payload:{...y,payload:r.b64.encode(a)}}:{initiate_transfer:y}};if(f){const m=[o.buildExecuteMsg(g,this.tokenBridge,{deposit_tokens:{}},[{amount:n.toString(),denom:d}]),o.buildExecuteMsg(g,this.tokenBridge,p({native_token:{denom:d}}))];yield this.createUnsignedTx({msgs:m,fee:o.computeFee(this.network,this.chain),memo:"Wormhole - Initiate Native Transfer"},"TokenBridge.transferNative")}else{const m=[o.buildExecuteMsg(g,d,{increase_allowance:{spender:this.tokenBridge,amount:n.toString(),expires:{never:{}}}}),o.buildExecuteMsg(g,this.tokenBridge,p({token:{contract_addr:d}}),[{amount:n.toString(),denom:d}])];yield this.createUnsignedTx({msgs:m,fee:o.computeFee(this.network,this.chain),memo:"Wormhole - Initiate Transfer"},"TokenBridge.transfer")}}async*redeem(e,t,s=!0){const n=r.b64.encode(r.serialize(t)),a=new i.CosmwasmAddress(e).toString(),u=this.translator&&new i.CosmwasmAddress(this.translator).toUniversalAddress().equals(t.payload.to.address)?o.buildExecuteMsg(a,this.translator,{complete_transfer_and_convert:{vaa:n}}):o.buildExecuteMsg(a,this.tokenBridge,{submit_vaa:{data:n}});yield this.createUnsignedTx({msgs:[u],fee:o.computeFee(this.network,this.chain),memo:"Wormhole - Complete Transfer"},"TokenBridge.redeem")}async parseTransactionDetails(e){throw new Error("Not implemented")}async getWrappedNative(){return r.toNative(this.chain,i.CosmwasmPlatform.getNativeDenom(this.network,this.chain))}createUnsignedTx(e,t,s=!1){return new o.CosmwasmUnsignedTransaction(e,this.network,this.chain,t,s)}}C.registerProtocol(i._platform,"TokenBridge",l);exports.CosmwasmTokenBridge=l;
1
+ "use strict";var _=Object.defineProperty;var v=(h,e,t)=>e in h?_(h,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):h[e]=t;var c=(h,e,t)=>(v(h,typeof e!="symbol"?e+"":e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index-COcHH6cV.js");const i=require("./cosmwasm-BFtZD1Ru.js"),o=require("./unsignedTransaction-CuG8xbiM.js"),r=require("./index-DfYc88fY.js"),C=require("./chain-NLYiTi92.js");class l{constructor(e,t,s,n){c(this,"network");c(this,"chain");c(this,"rpc");c(this,"contracts");c(this,"tokenBridge");c(this,"translator");this.network=e,this.chain=t,this.rpc=s,this.contracts=n;const a=this.contracts.tokenBridge;if(!a)throw new Error(`Wormhole Token Bridge contract for domain ${t} not found`);if(this.tokenBridge=a,this.translator=this.contracts.translator,this.translator!==void 0&&this.translator==="")throw new Error("Translator address may be undefined but not empty string")}static async fromRpc(e,t){const[s,n]=await i.CosmwasmPlatform.chainFromRpc(e),a=t[n];if(a.network!==s)throw new Error(`Network mismatch: ${a.network} != ${s}`);return new l(s,n,e,t[n].contracts)}async isWrappedAsset(e){try{return await this.getOriginalAsset(e),!0}catch{}return!1}async hasWrappedAsset(e){try{return await this.getWrappedAsset(e),!0}catch{}return!1}async getWrappedAsset(e){if(e.chain===this.chain)throw new Error(`Expected foreign chain, got ${e.chain}`);if(r.isNative(e.address))throw new Error("Native asset cannot be a wrapped asset");const t=r.b64.encode(e.address.toUniversalAddress().toUint8Array()),{address:s}=await this.rpc.queryContractSmart(this.tokenBridge,{wrapped_registry:{chain:r.toChainId(e.chain),address:t}});return r.toNative(this.chain,s)}async getOriginalAsset(e){let t=new i.CosmwasmAddress(e);t.denomType==="factory"&&(t=i.Gateway.factoryToCw20(t));const s=await this.rpc.queryContractSmart(t.toString(),{wrapped_asset_info:{}}),n=r.toChain(s.asset_chain),a=r.b64.decode(s.asset_address);return{chain:n,address:new r.UniversalAddress(new Uint8Array(a))}}async isTransferCompleted(e){const t=r.b64.encode(r.serialize(e));return(await this.rpc.queryContractSmart(this.tokenBridge,{is_vaa_redeemed:{vaa:t}})).is_redeemed}async*createAttestation(e,t){if(!t)throw new Error("Payer required to create attestation");const s=new i.CosmwasmAddress(e).toString(),n=new i.CosmwasmAddress(t).toString(),a=0,w=r.isNative(e)?{native_token:{denom:i.CosmwasmPlatform.getNativeDenom(this.network,this.chain)}}:{token:{contract_addr:s}};yield this.createUnsignedTx({msgs:[o.buildExecuteMsg(n,this.tokenBridge,{create_asset_meta:{asset_info:w,nonce:a}})],fee:o.computeFee(this.network,this.chain),memo:"Wormhole - Create Attestation"},"TokenBridge.createAttestation")}async*submitAttestation(e,t){if(!t)throw new Error("Payer required to submit attestation");const s=new i.CosmwasmAddress(t).toString();yield this.createUnsignedTx({msgs:[o.buildExecuteMsg(s,this.tokenBridge,{submit_vaa:{data:r.serialize(e)}})],fee:o.computeFee(this.network,this.chain),memo:"Wormhole - Submit Attestation"},"TokenBridge.submitAttestation")}async*transfer(e,t,s,n,a){const w=Math.round(Math.random()*1e5),u="0",k=r.toChainId(t.chain),A=r.b64.encode(t.address.toUniversalAddress().toUint8Array()),T=i.CosmwasmPlatform.getNativeDenom(this.network,this.chain),f=r.isNative(s);let d=f?T:s.toString();d.startsWith("factory")&&(d=i.Gateway.factoryToCw20(new i.CosmwasmAddress(d)).toString());const g=new i.CosmwasmAddress(e).toString(),p=m=>{const y={asset:{amount:n.toString(),info:m},recipient_chain:k,recipient:A,fee:u,nonce:w};return a?{initiate_transfer_with_payload:{...y,payload:r.b64.encode(a)}}:{initiate_transfer:y}};if(f){const m=[o.buildExecuteMsg(g,this.tokenBridge,{deposit_tokens:{}},[{amount:n.toString(),denom:d}]),o.buildExecuteMsg(g,this.tokenBridge,p({native_token:{denom:d}}))];yield this.createUnsignedTx({msgs:m,fee:o.computeFee(this.network,this.chain),memo:"Wormhole - Initiate Native Transfer"},"TokenBridge.transferNative")}else{const m=[o.buildExecuteMsg(g,d,{increase_allowance:{spender:this.tokenBridge,amount:n.toString(),expires:{never:{}}}}),o.buildExecuteMsg(g,this.tokenBridge,p({token:{contract_addr:d}}),[{amount:n.toString(),denom:d}])];yield this.createUnsignedTx({msgs:m,fee:o.computeFee(this.network,this.chain),memo:"Wormhole - Initiate Transfer"},"TokenBridge.transfer")}}async*redeem(e,t,s=!0){const n=r.b64.encode(r.serialize(t)),a=new i.CosmwasmAddress(e).toString(),u=this.translator&&new i.CosmwasmAddress(this.translator).toUniversalAddress().equals(t.payload.to.address)?o.buildExecuteMsg(a,this.translator,{complete_transfer_and_convert:{vaa:n}}):o.buildExecuteMsg(a,this.tokenBridge,{submit_vaa:{data:n}});yield this.createUnsignedTx({msgs:[u],fee:o.computeFee(this.network,this.chain),memo:"Wormhole - Complete Transfer"},"TokenBridge.redeem")}async parseTransactionDetails(e){throw new Error("Not implemented")}async getWrappedNative(){return r.toNative(this.chain,i.CosmwasmPlatform.getNativeDenom(this.network,this.chain))}createUnsignedTx(e,t,s=!1){return new o.CosmwasmUnsignedTransaction(e,this.network,this.chain,t,s)}}C.registerProtocol(i._platform,"TokenBridge",l);exports.CosmwasmTokenBridge=l;
@@ -1,6 +1,6 @@
1
- import { d as te, ab as el, y as It, bP as Bo, o as Nw, g as Tw } from "./index-DjJSdBO_.mjs";
2
- import { c as U, s as Vo, x as tl, r as rl, H as Cw, a as il, q as xs } from "./index-CLqwNevH.mjs";
3
- import { c as $w, a as xw, g as ku, s as Dw, d as Fw, k as qw, b as jw, I as mr, f as Et, t as dt, e as zu, C as Uw, r as Mw, h as Lr, i as sl, j as Nt, l as js, G as Lw, E as Ge, y as rt, o as Us, m as Ms, n as Hu, p as kw, q as zw, u as Hw, v as Ko, w as Ls, x as Wo, z as er, Y as Bw, A as Vw, B as Bu, D as Kw } from "./browser-CqNEk73A.mjs";
1
+ import { d as te, ab as el, y as It, bP as Bo, o as Nw, g as Tw } from "./index-C1JlVOwd.mjs";
2
+ import { c as U, s as Vo, x as tl, r as rl, H as Cw, a as il, q as xs } from "./index-BI-a425p.mjs";
3
+ import { c as $w, a as xw, g as ku, s as Dw, d as Fw, k as qw, b as jw, I as mr, f as Et, t as dt, e as zu, C as Uw, r as Mw, h as Lr, i as sl, j as Nt, l as js, G as Lw, E as Ge, y as rt, o as Us, m as Ms, n as Hu, p as kw, q as zw, u as Hw, v as Ko, w as Ls, x as Wo, z as er, Y as Bw, A as Vw, B as Bu, D as Kw } from "./browser-5rNYk7ew.mjs";
4
4
  var he = {};
5
5
  Object.defineProperty(he, "__esModule", { value: !0 });
6
6
  he.getLocalStorage = he.getLocalStorageOrThrow = he.getCrypto = he.getCryptoOrThrow = he.getLocation = he.getLocationOrThrow = he.getNavigator = he.getNavigatorOrThrow = he.getDocument = he.getDocumentOrThrow = he.getFromWindowOrThrow = he.getFromWindow = void 0;
@@ -8620,7 +8620,7 @@ class ua {
8620
8620
  if (this.rpc = this.getRpcConfig(t), this.chainId = this.rpc.chains.length ? qs(this.rpc.chains) : qs(this.rpc.optionalChains), this.signer = await wP.init({ projectId: this.rpc.projectId, metadata: this.rpc.metadata, disableProviderPing: t.disableProviderPing, relayUrl: t.relayUrl, storageOptions: t.storageOptions }), this.registerEventListeners(), await this.loadPersistedSession(), this.rpc.showQrModal) {
8621
8621
  let r;
8622
8622
  try {
8623
- const { WalletConnectModal: s } = await import("./index-Cms5l5e9.mjs").then((a) => a.i);
8623
+ const { WalletConnectModal: s } = await import("./index-CfOBXKOA.mjs").then((a) => a.i);
8624
8624
  r = s;
8625
8625
  } catch {
8626
8626
  throw new Error("To use QR modal, please install @walletconnect/modal package");