@imtbl/checkout-widgets 2.2.0 → 2.2.1-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/{AddTokensWidget-Ma98Dqwh.js → AddTokensWidget-CIX9CQkm.js} +26 -26
- package/dist/browser/{BridgeWidget-tDPVxvTK.js → BridgeWidget-DZoglU1Z.js} +52 -52
- package/dist/browser/{CommerceWidget-DnB5h5DA.js → CommerceWidget-D8k1Bk8v.js} +180 -186
- package/dist/browser/{FeesBreakdown-SMMmNxU-.js → FeesBreakdown-Bj9eD-6N.js} +1 -1
- package/dist/browser/{OnRampWidget-B3cnjDkJ.js → OnRampWidget-Cish1sa7.js} +8 -8
- package/dist/browser/{SaleWidget-C7tDRhvp.js → SaleWidget-B84V0S1J.js} +61 -61
- package/dist/browser/{SpendingCapHero-Do-mkYwB.js → SpendingCapHero-0giZEKem.js} +1 -1
- package/dist/browser/{SwapWidget-QxW4xOa_.js → SwapWidget-EpPSGKqD.js} +21 -21
- package/dist/browser/{TokenImage-lDWfoU2b.js → TokenImage-DkervDKQ.js} +1 -1
- package/dist/browser/{TopUpView-DPkqr-YC.js → TopUpView-DwRBmzvI.js} +5 -5
- package/dist/browser/{WalletApproveHero-Di02Phe4.js → WalletApproveHero-XianIJAQ.js} +4 -4
- package/dist/browser/{WalletWidget-BozZjliU.js → WalletWidget-DxQcP7sk.js} +18 -18
- package/dist/browser/{auto-track-CG4Bs1kg.js → auto-track-DeLnQQ5M.js} +1 -1
- package/dist/browser/{index-BrDACMtQ.js → index-BwNgGaGH.js} +1 -1
- package/dist/browser/{index-DygDkU2e.js → index-ByDgwiba.js} +1 -1
- package/dist/browser/{index-CqT6H9W-.js → index-CVAaj9Qm.js} +334 -357
- package/dist/browser/{index-BO9ARDoY.js → index-D18hBbWb.js} +1 -1
- package/dist/browser/{index-R2dpGmlF.js → index-DpNna0MG.js} +2 -2
- package/dist/browser/{index-ByPgvc_F.js → index-Dpv6KyQF.js} +1 -1
- package/dist/browser/{index-qkgda0uC.js → index-lgFyRHj_.js} +1 -1
- package/dist/browser/{index-B92IZgyS.js → index-qgsQUTip.js} +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/{index.umd-B82ymo2S.js → index.umd-BwrkBBu0.js} +1 -1
- package/dist/browser/{useInterval-Dp4GWqSc.js → useInterval-BE4Wp_87.js} +1 -1
- package/dist/types/lib/index.d.ts +0 -1
- package/package.json +7 -7
- package/src/components/NetworkSwitchDrawer/NetworkSwitchDrawer.tsx +1 -2
- package/src/components/Transactions/Transactions.tsx +6 -8
- package/src/lib/index.ts +0 -1
- package/src/lib/utils.ts +4 -5
- package/src/widgets/add-tokens/components/TokenDrawerMenu.tsx +1 -2
- package/src/widgets/add-tokens/views/AddTokens.tsx +1 -2
- package/src/widgets/bridge/BridgeWidget.tsx +2 -3
- package/src/widgets/bridge/components/BridgeReviewSummary.tsx +2 -4
- package/src/widgets/bridge/components/WalletAndNetworkSelector.tsx +2 -3
- package/src/widgets/bridge/views/ClaimWithdrawal.tsx +3 -3
- package/src/widgets/connect/components/WalletList.tsx +2 -2
- package/src/widgets/connect/views/SwitchNetworkEth.tsx +2 -3
- package/src/widgets/connect/views/SwitchNetworkZkEVM.tsx +5 -5
- package/src/widgets/immutable-commerce/functions/getConnectLoaderParams.ts +9 -17
- package/src/widgets/on-ramp/OnRampWidgetRoot.tsx +1 -2
- package/src/widgets/sale/SaleWidgetRoot.tsx +1 -2
- package/src/widgets/sale/components/FundingRouteExecute/FundingRouteExecute.tsx +2 -3
- package/src/widgets/swap/SwapWidget.tsx +2 -2
- package/src/widgets/swap/SwapWidgetRoot.tsx +1 -2
- package/src/widgets/swap/components/SwapForm.tsx +2 -3
- package/src/widgets/transfer/TransferWidget.tsx +1 -2
- package/src/widgets/wallet/WalletWidgetRoot.tsx +1 -2
- package/src/widgets/wallet/components/BalanceItem/BalanceItem.tsx +6 -7
- package/src/widgets/wallet/views/WalletBalances.tsx +1 -2
- package/dist/types/lib/networkUtils.d.ts +0 -3
- package/src/lib/networkUtils.ts +0 -22
|
@@ -4109,7 +4109,7 @@ const clearGlobalNamespace = (namespace) => {
|
|
|
4109
4109
|
};
|
|
4110
4110
|
lib$4.clearGlobalNamespace = clearGlobalNamespace;
|
|
4111
4111
|
|
|
4112
|
-
var Ut$2=Object.defineProperty;var St$1=(u,c)=>{for(var p in c)Ut$2(u,p,{get:c[p],enumerable:!0});};function Br$1(u){throw new Error("Node.js process "+u+" is not supported by JSPM core outside of Node.js")}var G$4=[],tr$2=!1,W$4,cr$3=-1;function kt$2(){!tr$2||!W$4||(tr$2=!1,W$4.length?G$4=W$4.concat(G$4):cr$3=-1,G$4.length&&Vr$1());}function Vr$1(){if(!tr$2){var u=setTimeout(kt$2,0);tr$2=!0;for(var c=G$4.length;c;){for(W$4=G$4,G$4=[];++cr$3<c;)W$4&&W$4[cr$3].run();cr$3=-1,c=G$4.length;}W$4=null,tr$2=!1,clearTimeout(u);}}function _t$2(u){var c=new Array(arguments.length-1);if(arguments.length>1)for(var p=1;p<arguments.length;p++)c[p-1]=arguments[p];G$4.push(new Gr$1(u,c)),G$4.length===1&&!tr$2&&setTimeout(Vr$1,0);}function Gr$1(u,c){this.fun=u,this.array=c;}Gr$1.prototype.run=function(){this.fun.apply(null,this.array);};var Pt$1="browser",Rt$2="x64",bt$1="browser",Nt$1={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},vt$1=["/usr/bin/node"],Mt$1=[],Ct$2="v16.8.0",Lt$2={},Dt$2=function(u,c){console.warn((c?c+": ":"")+u);},$t$2=function(u){Br$1("binding");},Ft$2=function(u){return 0},Ot$3=function(){return "/"},Vt$1=function(u){},Gt$3={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};function M$8(){}var Yt$2=M$8,Kt$2=[];function Ht$2(u){Br$1("_linkedBinding");}var Wt$2={},jt$3=!1,Xt$3={};function qt$2(u){Br$1("dlopen");}function Jt$3(){return []}function zt$2(){return []}var Qt$1=M$8,Zt$2=M$8,Tr$2=function(){return {}},re$4=Tr$2,te$4=Tr$2,ee$3=M$8,ne$5=M$8,ie$5=M$8,oe$6={};function se$4(u,c){if(!u)throw new Error(c||"assertion error")}var ue$3={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},ae$4=M$8,ce$3=M$8;function pe$4(){return !1}var le$3=M$8,fe$4=M$8,he$3=M$8,de$3=M$8,me$5=M$8,we$4=void 0,ge$5=void 0,ye$4=void 0,Ee$4=M$8,Ie$1=2,Be$3=1,Te$1="/bin/usr/node",Ae$4=9229,xe$3="node",Ue$4=[],Se$4=M$8,K$8={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0};K$8.now===void 0&&(yr$3=Date.now(),K$8.timing&&K$8.timing.navigationStart&&(yr$3=K$8.timing.navigationStart),K$8.now=()=>Date.now()-yr$3);var yr$3;function ke$3(){return K$8.now()/1e3}var Er$2=1e9;function Ir$2(u){var c=Math.floor((Date.now()-K$8.now())*.001),p=K$8.now()*.001,l=Math.floor(p)+c,m=Math.floor(p%1*1e9);return u&&(l=l-u[0],m=m-u[1],m<0&&(l--,m+=Er$2)),[l,m]}Ir$2.bigint=function(u){var c=Ir$2(u);return typeof BigInt>"u"?c[0]*Er$2+c[1]:BigInt(c[0]*Er$2)+BigInt(c[1])};var _e$3=10,Pe$4={},Re$5=0;function H$4(){return T$7}var be$4=H$4,Ne$2=H$4,ve$3=H$4,Me$1=H$4,Ce$4=H$4,Le$3=M$8,De$4=H$4,$e$4=H$4;function Fe$4(u){return []}var T$7={version:Ct$2,versions:Lt$2,arch:Rt$2,platform:bt$1,release:Gt$3,_rawDebug:Yt$2,moduleLoadList:Kt$2,binding:$t$2,_linkedBinding:Ht$2,_events:Pe$4,_eventsCount:Re$5,_maxListeners:_e$3,on:H$4,addListener:be$4,once:Ne$2,off:ve$3,removeListener:Me$1,removeAllListeners:Ce$4,emit:Le$3,prependListener:De$4,prependOnceListener:$e$4,listeners:Fe$4,domain:Wt$2,_exiting:jt$3,config:Xt$3,dlopen:qt$2,uptime:ke$3,_getActiveRequests:Jt$3,_getActiveHandles:zt$2,reallyExit:Qt$1,_kill:Zt$2,cpuUsage:Tr$2,resourceUsage:re$4,memoryUsage:te$4,kill:ee$3,exit:ne$5,openStdin:ie$5,allowedNodeEnvironmentFlags:oe$6,assert:se$4,features:ue$3,_fatalExceptions:ae$4,setUncaughtExceptionCaptureCallback:ce$3,hasUncaughtExceptionCaptureCallback:pe$4,emitWarning:Dt$2,nextTick:_t$2,_tickCallback:le$3,_debugProcess:fe$4,_debugEnd:he$3,_startProfilerIdleNotifier:de$3,_stopProfilerIdleNotifier:me$5,stdout:we$4,stdin:ye$4,stderr:ge$5,abort:Ee$4,umask:Ft$2,chdir:Vt$1,cwd:Ot$3,env:Nt$1,title:Pt$1,argv:vt$1,execArgv:Mt$1,pid:Ie$1,ppid:Be$3,execPath:Te$1,debugPort:Ae$4,hrtime:Ir$2,argv0:xe$3,_preload_modules:Ue$4,setSourceMapsEnabled:Se$4};var nr$2={},Yr$1=!1;function Oe$3(){if(Yr$1)return nr$2;Yr$1=!0,nr$2.byteLength=E,nr$2.toByteArray=C,nr$2.fromByteArray=_;for(var u=[],c=[],p=typeof Uint8Array<"u"?Uint8Array:Array,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",m=0,w=l.length;m<w;++m)u[m]=l[m],c[l.charCodeAt(m)]=m;c[45]=62,c[95]=63;function o(f){var h=f.length;if(h%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var g=f.indexOf("=");g===-1&&(g=h);var A=g===h?0:4-g%4;return [g,A]}function E(f){var h=o(f),g=h[0],A=h[1];return (g+A)*3/4-A}function b(f,h,g){return (h+g)*3/4-g}function C(f){var h,g=o(f),A=g[0],v=g[1],P=new p(b(f,A,v)),D=0,F=v>0?A-4:A,L;for(L=0;L<F;L+=4)h=c[f.charCodeAt(L)]<<18|c[f.charCodeAt(L+1)]<<12|c[f.charCodeAt(L+2)]<<6|c[f.charCodeAt(L+3)],P[D++]=h>>16&255,P[D++]=h>>8&255,P[D++]=h&255;return v===2&&(h=c[f.charCodeAt(L)]<<2|c[f.charCodeAt(L+1)]>>4,P[D++]=h&255),v===1&&(h=c[f.charCodeAt(L)]<<10|c[f.charCodeAt(L+1)]<<4|c[f.charCodeAt(L+2)]>>2,P[D++]=h>>8&255,P[D++]=h&255),P}function B(f){return u[f>>18&63]+u[f>>12&63]+u[f>>6&63]+u[f&63]}function k(f,h,g){for(var A,v=[],P=h;P<g;P+=3)A=(f[P]<<16&16711680)+(f[P+1]<<8&65280)+(f[P+2]&255),v.push(B(A));return v.join("")}function _(f){for(var h,g=f.length,A=g%3,v=[],P=16383,D=0,F=g-A;D<F;D+=P)v.push(k(f,D,D+P>F?F:D+P));return A===1?(h=f[g-1],v.push(u[h>>2]+u[h<<4&63]+"==")):A===2&&(h=(f[g-2]<<8)+f[g-1],v.push(u[h>>10]+u[h>>4&63]+u[h<<2&63]+"=")),v.join("")}return nr$2}var pr$2={},Kr$2=!1;function Ve$1(){if(Kr$2)return pr$2;Kr$2=!0;return pr$2.read=function(u,c,p,l,m){var w,o,E=m*8-l-1,b=(1<<E)-1,C=b>>1,B=-7,k=p?m-1:0,_=p?-1:1,f=u[c+k];for(k+=_,w=f&(1<<-B)-1,f>>=-B,B+=E;B>0;w=w*256+u[c+k],k+=_,B-=8);for(o=w&(1<<-B)-1,w>>=-B,B+=l;B>0;o=o*256+u[c+k],k+=_,B-=8);if(w===0)w=1-C;else {if(w===b)return o?NaN:(f?-1:1)*(1/0);o=o+Math.pow(2,l),w=w-C;}return (f?-1:1)*o*Math.pow(2,w-l)},pr$2.write=function(u,c,p,l,m,w){var o,E,b,C=w*8-m-1,B=(1<<C)-1,k=B>>1,_=m===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=l?0:w-1,h=l?1:-1,g=c<0||c===0&&1/c<0?1:0;for(c=Math.abs(c),isNaN(c)||c===1/0?(E=isNaN(c)?1:0,o=B):(o=Math.floor(Math.log(c)/Math.LN2),c*(b=Math.pow(2,-o))<1&&(o--,b*=2),o+k>=1?c+=_/b:c+=_*Math.pow(2,1-k),c*b>=2&&(o++,b/=2),o+k>=B?(E=0,o=B):o+k>=1?(E=(c*b-1)*Math.pow(2,m),o=o+k):(E=c*Math.pow(2,k-1)*Math.pow(2,m),o=0));m>=8;u[p+f]=E&255,f+=h,E/=256,m-=8);for(o=o<<m|E,C+=m;C>0;u[p+f]=o&255,f+=h,o/=256,C-=8);u[p+f-h]|=g*128;},pr$2}var j$7={},Hr$1=!1;function Ge$3(){if(Hr$1)return j$7;Hr$1=!0;let u=Oe$3(),c=Ve$1(),p=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;j$7.Buffer=o,j$7.SlowBuffer=v,j$7.INSPECT_MAX_BYTES=50;let l=2147483647;j$7.kMaxLength=l,o.TYPED_ARRAY_SUPPORT=m(),!o.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function m(){try{let e=new Uint8Array(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,Uint8Array.prototype),Object.setPrototypeOf(e,r),e.foo()===42}catch{return !1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function w(e){if(e>l)throw new RangeError('The value "'+e+'" is invalid for option "size"');let r=new Uint8Array(e);return Object.setPrototypeOf(r,o.prototype),r}function o(e,r,t){if(typeof e=="number"){if(typeof r=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return B(e)}return E(e,r,t)}o.poolSize=8192;function E(e,r,t){if(typeof e=="string")return k(e,r);if(ArrayBuffer.isView(e))return f(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(O(e,ArrayBuffer)||e&&O(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(O(e,SharedArrayBuffer)||e&&O(e.buffer,SharedArrayBuffer)))return h(e,r,t);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return o.from(n,r,t);let i=g(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return o.from(e[Symbol.toPrimitive]("string"),r,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}o.from=function(e,r,t){return E(e,r,t)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function b(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function C(e,r,t){return b(e),e<=0?w(e):r!==void 0?typeof t=="string"?w(e).fill(r,t):w(e).fill(r):w(e)}o.alloc=function(e,r,t){return C(e,r,t)};function B(e){return b(e),w(e<0?0:A(e)|0)}o.allocUnsafe=function(e){return B(e)},o.allocUnsafeSlow=function(e){return B(e)};function k(e,r){if((typeof r!="string"||r==="")&&(r="utf8"),!o.isEncoding(r))throw new TypeError("Unknown encoding: "+r);let t=P(e,r)|0,n=w(t),i=n.write(e,r);return i!==t&&(n=n.slice(0,i)),n}function _(e){let r=e.length<0?0:A(e.length)|0,t=w(r);for(let n=0;n<r;n+=1)t[n]=e[n]&255;return t}function f(e){if(O(e,Uint8Array)){let r=new Uint8Array(e);return h(r.buffer,r.byteOffset,r.byteLength)}return _(e)}function h(e,r,t){if(r<0||e.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<r+(t||0))throw new RangeError('"length" is outside of buffer bounds');let n;return r===void 0&&t===void 0?n=new Uint8Array(e):t===void 0?n=new Uint8Array(e,r):n=new Uint8Array(e,r,t),Object.setPrototypeOf(n,o.prototype),n}function g(e){if(o.isBuffer(e)){let r=A(e.length)|0,t=w(r);return t.length===0||e.copy(t,0,0,r),t}if(e.length!==void 0)return typeof e.length!="number"||gr(e.length)?w(0):_(e);if(e.type==="Buffer"&&Array.isArray(e.data))return _(e.data)}function A(e){if(e>=l)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+l.toString(16)+" bytes");return e|0}function v(e){return +e!=e&&(e=0),o.alloc(+e)}o.isBuffer=function(r){return r!=null&&r._isBuffer===!0&&r!==o.prototype},o.compare=function(r,t){if(O(r,Uint8Array)&&(r=o.from(r,r.offset,r.byteLength)),O(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(r)||!o.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===t)return 0;let n=r.length,i=t.length;for(let s=0,a=Math.min(n,i);s<a;++s)if(r[s]!==t[s]){n=r[s],i=t[s];break}return n<i?-1:i<n?1:0},o.isEncoding=function(r){switch(String(r).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return !0;default:return !1}},o.concat=function(r,t){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return o.alloc(0);let n;if(t===void 0)for(t=0,n=0;n<r.length;++n)t+=r[n].length;let i=o.allocUnsafe(t),s=0;for(n=0;n<r.length;++n){let a=r[n];if(O(a,Uint8Array))s+a.length>i.length?(o.isBuffer(a)||(a=o.from(a)),a.copy(i,s)):Uint8Array.prototype.set.call(i,a,s);else if(o.isBuffer(a))a.copy(i,s);else throw new TypeError('"list" argument must be an Array of Buffers');s+=a.length;}return i};function P(e,r){if(o.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||O(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let t=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&t===0)return 0;let i=!1;for(;;)switch(r){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return wr(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return Or(e).length;default:if(i)return n?-1:wr(e).length;r=(""+r).toLowerCase(),i=!0;}}o.byteLength=P;function D(e,r,t){let n=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,r>>>=0,t<=r))return "";for(e||(e="utf8");;)switch(e){case"hex":return wt(this,r,t);case"utf8":case"utf-8":return br(this,r,t);case"ascii":return dt(this,r,t);case"latin1":case"binary":return mt(this,r,t);case"base64":return ft(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return gt(this,r,t);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0;}}o.prototype._isBuffer=!0;function F(e,r,t){let n=e[r];e[r]=e[t],e[t]=n;}o.prototype.swap16=function(){let r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<r;t+=2)F(this,t,t+1);return this},o.prototype.swap32=function(){let r=this.length;if(r%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<r;t+=4)F(this,t,t+3),F(this,t+1,t+2);return this},o.prototype.swap64=function(){let r=this.length;if(r%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<r;t+=8)F(this,t,t+7),F(this,t+1,t+6),F(this,t+2,t+5),F(this,t+3,t+4);return this},o.prototype.toString=function(){let r=this.length;return r===0?"":arguments.length===0?br(this,0,r):D.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(r){if(!o.isBuffer(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:o.compare(this,r)===0},o.prototype.inspect=function(){let r="",t=j$7.INSPECT_MAX_BYTES;return r=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(r+=" ... "),"<Buffer "+r+">"},p&&(o.prototype[p]=o.prototype.inspect),o.prototype.compare=function(r,t,n,i,s){if(O(r,Uint8Array)&&(r=o.from(r,r.offset,r.byteLength)),!o.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(t===void 0&&(t=0),n===void 0&&(n=r?r.length:0),i===void 0&&(i=0),s===void 0&&(s=this.length),t<0||n>r.length||i<0||s>this.length)throw new RangeError("out of range index");if(i>=s&&t>=n)return 0;if(i>=s)return -1;if(t>=n)return 1;if(t>>>=0,n>>>=0,i>>>=0,s>>>=0,this===r)return 0;let a=s-i,d=n-t,x=Math.min(a,d),I=this.slice(i,s),U=r.slice(t,n);for(let y=0;y<x;++y)if(I[y]!==U[y]){a=I[y],d=U[y];break}return a<d?-1:d<a?1:0};function L(e,r,t,n,i){if(e.length===0)return -1;if(typeof t=="string"?(n=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,gr(t)&&(t=i?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(i)return -1;t=e.length-1;}else if(t<0)if(i)t=0;else return -1;if(typeof r=="string"&&(r=o.from(r,n)),o.isBuffer(r))return r.length===0?-1:Rr(e,r,t,n,i);if(typeof r=="number")return r=r&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,r,t):Uint8Array.prototype.lastIndexOf.call(e,r,t):Rr(e,[r],t,n,i);throw new TypeError("val must be string, number or Buffer")}function Rr(e,r,t,n,i){let s=1,a=e.length,d=r.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||r.length<2)return -1;s=2,a/=2,d/=2,t/=2;}function x(U,y){return s===1?U[y]:U.readUInt16BE(y*s)}let I;if(i){let U=-1;for(I=t;I<a;I++)if(x(e,I)===x(r,U===-1?0:I-U)){if(U===-1&&(U=I),I-U+1===d)return U*s}else U!==-1&&(I-=I-U),U=-1;}else for(t+d>a&&(t=a-d),I=t;I>=0;I--){let U=!0;for(let y=0;y<d;y++)if(x(e,I+y)!==x(r,y)){U=!1;break}if(U)return I}return -1}o.prototype.includes=function(r,t,n){return this.indexOf(r,t,n)!==-1},o.prototype.indexOf=function(r,t,n){return L(this,r,t,n,!0)},o.prototype.lastIndexOf=function(r,t,n){return L(this,r,t,n,!1)};function ut(e,r,t,n){t=Number(t)||0;let i=e.length-t;n?(n=Number(n),n>i&&(n=i)):n=i;let s=r.length;n>s/2&&(n=s/2);let a;for(a=0;a<n;++a){let d=parseInt(r.substr(a*2,2),16);if(gr(d))return a;e[t+a]=d;}return a}function at(e,r,t,n){return ar(wr(r,e.length-t),e,t,n)}function ct(e,r,t,n){return ar(Bt(r),e,t,n)}function pt(e,r,t,n){return ar(Or(r),e,t,n)}function lt(e,r,t,n){return ar(Tt(r,e.length-t),e,t,n)}o.prototype.write=function(r,t,n,i){if(t===void 0)i="utf8",n=this.length,t=0;else if(n===void 0&&typeof t=="string")i=t,n=this.length,t=0;else if(isFinite(t))t=t>>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let s=this.length-t;if((n===void 0||n>s)&&(n=s),r.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let a=!1;for(;;)switch(i){case"hex":return ut(this,r,t,n);case"utf8":case"utf-8":return at(this,r,t,n);case"ascii":case"latin1":case"binary":return ct(this,r,t,n);case"base64":return pt(this,r,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return lt(this,r,t,n);default:if(a)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),a=!0;}},o.prototype.toJSON=function(){return {type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ft(e,r,t){return r===0&&t===e.length?u.fromByteArray(e):u.fromByteArray(e.slice(r,t))}function br(e,r,t){t=Math.min(e.length,t);let n=[],i=r;for(;i<t;){let s=e[i],a=null,d=s>239?4:s>223?3:s>191?2:1;if(i+d<=t){let x,I,U,y;switch(d){case 1:s<128&&(a=s);break;case 2:x=e[i+1],(x&192)===128&&(y=(s&31)<<6|x&63,y>127&&(a=y));break;case 3:x=e[i+1],I=e[i+2],(x&192)===128&&(I&192)===128&&(y=(s&15)<<12|(x&63)<<6|I&63,y>2047&&(y<55296||y>57343)&&(a=y));break;case 4:x=e[i+1],I=e[i+2],U=e[i+3],(x&192)===128&&(I&192)===128&&(U&192)===128&&(y=(s&15)<<18|(x&63)<<12|(I&63)<<6|U&63,y>65535&&y<1114112&&(a=y));}}a===null?(a=65533,d=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|a&1023),n.push(a),i+=d;}return ht(n)}let Nr=4096;function ht(e){let r=e.length;if(r<=Nr)return String.fromCharCode.apply(String,e);let t="",n=0;for(;n<r;)t+=String.fromCharCode.apply(String,e.slice(n,n+=Nr));return t}function dt(e,r,t){let n="";t=Math.min(e.length,t);for(let i=r;i<t;++i)n+=String.fromCharCode(e[i]&127);return n}function mt(e,r,t){let n="";t=Math.min(e.length,t);for(let i=r;i<t;++i)n+=String.fromCharCode(e[i]);return n}function wt(e,r,t){let n=e.length;(!r||r<0)&&(r=0),(!t||t<0||t>n)&&(t=n);let i="";for(let s=r;s<t;++s)i+=At[e[s]];return i}function gt(e,r,t){let n=e.slice(r,t),i="";for(let s=0;s<n.length-1;s+=2)i+=String.fromCharCode(n[s]+n[s+1]*256);return i}o.prototype.slice=function(r,t){let n=this.length;r=~~r,t=t===void 0?n:~~t,r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<r&&(t=r);let i=this.subarray(r,t);return Object.setPrototypeOf(i,o.prototype),i};function N(e,r,t){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+r>t)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(r,t,n){r=r>>>0,t=t>>>0,n||N(r,t,this.length);let i=this[r],s=1,a=0;for(;++a<t&&(s*=256);)i+=this[r+a]*s;return i},o.prototype.readUintBE=o.prototype.readUIntBE=function(r,t,n){r=r>>>0,t=t>>>0,n||N(r,t,this.length);let i=this[r+--t],s=1;for(;t>0&&(s*=256);)i+=this[r+--t]*s;return i},o.prototype.readUint8=o.prototype.readUInt8=function(r,t){return r=r>>>0,t||N(r,1,this.length),this[r]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(r,t){return r=r>>>0,t||N(r,2,this.length),this[r]|this[r+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(r,t){return r=r>>>0,t||N(r,2,this.length),this[r]<<8|this[r+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(r,t){return r=r>>>0,t||N(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(r,t){return r=r>>>0,t||N(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])},o.prototype.readBigUInt64LE=Y(function(r){r=r>>>0,rr(r,"offset");let t=this[r],n=this[r+7];(t===void 0||n===void 0)&&er(r,this.length-8);let i=t+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24,s=this[++r]+this[++r]*2**8+this[++r]*2**16+n*2**24;return BigInt(i)+(BigInt(s)<<BigInt(32))}),o.prototype.readBigUInt64BE=Y(function(r){r=r>>>0,rr(r,"offset");let t=this[r],n=this[r+7];(t===void 0||n===void 0)&&er(r,this.length-8);let i=t*2**24+this[++r]*2**16+this[++r]*2**8+this[++r],s=this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+n;return (BigInt(i)<<BigInt(32))+BigInt(s)}),o.prototype.readIntLE=function(r,t,n){r=r>>>0,t=t>>>0,n||N(r,t,this.length);let i=this[r],s=1,a=0;for(;++a<t&&(s*=256);)i+=this[r+a]*s;return s*=128,i>=s&&(i-=Math.pow(2,8*t)),i},o.prototype.readIntBE=function(r,t,n){r=r>>>0,t=t>>>0,n||N(r,t,this.length);let i=t,s=1,a=this[r+--i];for(;i>0&&(s*=256);)a+=this[r+--i]*s;return s*=128,a>=s&&(a-=Math.pow(2,8*t)),a},o.prototype.readInt8=function(r,t){return r=r>>>0,t||N(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]},o.prototype.readInt16LE=function(r,t){r=r>>>0,t||N(r,2,this.length);let n=this[r]|this[r+1]<<8;return n&32768?n|4294901760:n},o.prototype.readInt16BE=function(r,t){r=r>>>0,t||N(r,2,this.length);let n=this[r+1]|this[r]<<8;return n&32768?n|4294901760:n},o.prototype.readInt32LE=function(r,t){return r=r>>>0,t||N(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24},o.prototype.readInt32BE=function(r,t){return r=r>>>0,t||N(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]},o.prototype.readBigInt64LE=Y(function(r){r=r>>>0,rr(r,"offset");let t=this[r],n=this[r+7];(t===void 0||n===void 0)&&er(r,this.length-8);let i=this[r+4]+this[r+5]*2**8+this[r+6]*2**16+(n<<24);return (BigInt(i)<<BigInt(32))+BigInt(t+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24)}),o.prototype.readBigInt64BE=Y(function(r){r=r>>>0,rr(r,"offset");let t=this[r],n=this[r+7];(t===void 0||n===void 0)&&er(r,this.length-8);let i=(t<<24)+this[++r]*2**16+this[++r]*2**8+this[++r];return (BigInt(i)<<BigInt(32))+BigInt(this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+n)}),o.prototype.readFloatLE=function(r,t){return r=r>>>0,t||N(r,4,this.length),c.read(this,r,!0,23,4)},o.prototype.readFloatBE=function(r,t){return r=r>>>0,t||N(r,4,this.length),c.read(this,r,!1,23,4)},o.prototype.readDoubleLE=function(r,t){return r=r>>>0,t||N(r,8,this.length),c.read(this,r,!0,52,8)},o.prototype.readDoubleBE=function(r,t){return r=r>>>0,t||N(r,8,this.length),c.read(this,r,!1,52,8)};function $(e,r,t,n,i,s){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<s)throw new RangeError('"value" argument is out of bounds');if(t+n>e.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(r,t,n,i){if(r=+r,t=t>>>0,n=n>>>0,!i){let d=Math.pow(2,8*n)-1;$(this,r,t,n,d,0);}let s=1,a=0;for(this[t]=r&255;++a<n&&(s*=256);)this[t+a]=r/s&255;return t+n},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(r,t,n,i){if(r=+r,t=t>>>0,n=n>>>0,!i){let d=Math.pow(2,8*n)-1;$(this,r,t,n,d,0);}let s=n-1,a=1;for(this[t+s]=r&255;--s>=0&&(a*=256);)this[t+s]=r/a&255;return t+n},o.prototype.writeUint8=o.prototype.writeUInt8=function(r,t,n){return r=+r,t=t>>>0,n||$(this,r,t,1,255,0),this[t]=r&255,t+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(r,t,n){return r=+r,t=t>>>0,n||$(this,r,t,2,65535,0),this[t]=r&255,this[t+1]=r>>>8,t+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(r,t,n){return r=+r,t=t>>>0,n||$(this,r,t,2,65535,0),this[t]=r>>>8,this[t+1]=r&255,t+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(r,t,n){return r=+r,t=t>>>0,n||$(this,r,t,4,4294967295,0),this[t+3]=r>>>24,this[t+2]=r>>>16,this[t+1]=r>>>8,this[t]=r&255,t+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(r,t,n){return r=+r,t=t>>>0,n||$(this,r,t,4,4294967295,0),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};function vr(e,r,t,n,i){Fr(r,n,i,e,t,7);let s=Number(r&BigInt(4294967295));e[t++]=s,s=s>>8,e[t++]=s,s=s>>8,e[t++]=s,s=s>>8,e[t++]=s;let a=Number(r>>BigInt(32)&BigInt(4294967295));return e[t++]=a,a=a>>8,e[t++]=a,a=a>>8,e[t++]=a,a=a>>8,e[t++]=a,t}function Mr(e,r,t,n,i){Fr(r,n,i,e,t,7);let s=Number(r&BigInt(4294967295));e[t+7]=s,s=s>>8,e[t+6]=s,s=s>>8,e[t+5]=s,s=s>>8,e[t+4]=s;let a=Number(r>>BigInt(32)&BigInt(4294967295));return e[t+3]=a,a=a>>8,e[t+2]=a,a=a>>8,e[t+1]=a,a=a>>8,e[t]=a,t+8}o.prototype.writeBigUInt64LE=Y(function(r,t=0){return vr(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=Y(function(r,t=0){return Mr(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(r,t,n,i){if(r=+r,t=t>>>0,!i){let x=Math.pow(2,8*n-1);$(this,r,t,n,x-1,-x);}let s=0,a=1,d=0;for(this[t]=r&255;++s<n&&(a*=256);)r<0&&d===0&&this[t+s-1]!==0&&(d=1),this[t+s]=(r/a>>0)-d&255;return t+n},o.prototype.writeIntBE=function(r,t,n,i){if(r=+r,t=t>>>0,!i){let x=Math.pow(2,8*n-1);$(this,r,t,n,x-1,-x);}let s=n-1,a=1,d=0;for(this[t+s]=r&255;--s>=0&&(a*=256);)r<0&&d===0&&this[t+s+1]!==0&&(d=1),this[t+s]=(r/a>>0)-d&255;return t+n},o.prototype.writeInt8=function(r,t,n){return r=+r,t=t>>>0,n||$(this,r,t,1,127,-128),r<0&&(r=255+r+1),this[t]=r&255,t+1},o.prototype.writeInt16LE=function(r,t,n){return r=+r,t=t>>>0,n||$(this,r,t,2,32767,-32768),this[t]=r&255,this[t+1]=r>>>8,t+2},o.prototype.writeInt16BE=function(r,t,n){return r=+r,t=t>>>0,n||$(this,r,t,2,32767,-32768),this[t]=r>>>8,this[t+1]=r&255,t+2},o.prototype.writeInt32LE=function(r,t,n){return r=+r,t=t>>>0,n||$(this,r,t,4,2147483647,-2147483648),this[t]=r&255,this[t+1]=r>>>8,this[t+2]=r>>>16,this[t+3]=r>>>24,t+4},o.prototype.writeInt32BE=function(r,t,n){return r=+r,t=t>>>0,n||$(this,r,t,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4},o.prototype.writeBigInt64LE=Y(function(r,t=0){return vr(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=Y(function(r,t=0){return Mr(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Cr(e,r,t,n,i,s){if(t+n>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function Lr(e,r,t,n,i){return r=+r,t=t>>>0,i||Cr(e,r,t,4),c.write(e,r,t,n,23,4),t+4}o.prototype.writeFloatLE=function(r,t,n){return Lr(this,r,t,!0,n)},o.prototype.writeFloatBE=function(r,t,n){return Lr(this,r,t,!1,n)};function Dr(e,r,t,n,i){return r=+r,t=t>>>0,i||Cr(e,r,t,8),c.write(e,r,t,n,52,8),t+8}o.prototype.writeDoubleLE=function(r,t,n){return Dr(this,r,t,!0,n)},o.prototype.writeDoubleBE=function(r,t,n){return Dr(this,r,t,!1,n)},o.prototype.copy=function(r,t,n,i){if(!o.isBuffer(r))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),t>=r.length&&(t=r.length),t||(t=0),i>0&&i<n&&(i=n),i===n||r.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),r.length-t<i-n&&(i=r.length-t+n);let s=i-n;return this===r&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(t,n,i):Uint8Array.prototype.set.call(r,this.subarray(n,i),t),s},o.prototype.fill=function(r,t,n,i){if(typeof r=="string"){if(typeof t=="string"?(i=t,t=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!o.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(r.length===1){let a=r.charCodeAt(0);(i==="utf8"&&a<128||i==="latin1")&&(r=a);}}else typeof r=="number"?r=r&255:typeof r=="boolean"&&(r=Number(r));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t=t>>>0,n=n===void 0?this.length:n>>>0,r||(r=0);let s;if(typeof r=="number")for(s=t;s<n;++s)this[s]=r;else {let a=o.isBuffer(r)?r:o.from(r,i),d=a.length;if(d===0)throw new TypeError('The value "'+r+'" is invalid for argument "value"');for(s=0;s<n-t;++s)this[s+t]=a[s%d];}return this};let Z={};function mr(e,r,t){Z[e]=class extends t{constructor(){super(),Object.defineProperty(this,"message",{value:r.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,delete this.name;}get code(){return e}set code(i){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:i,writable:!0});}toString(){return `${this.name} [${e}]: ${this.message}`}};}mr("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),mr("ERR_INVALID_ARG_TYPE",function(e,r){return `The "${e}" argument must be of type number. Received type ${typeof r}`},TypeError),mr("ERR_OUT_OF_RANGE",function(e,r,t){let n=`The value of "${e}" is out of range.`,i=t;return Number.isInteger(t)&&Math.abs(t)>2**32?i=$r(String(t)):typeof t=="bigint"&&(i=String(t),(t>BigInt(2)**BigInt(32)||t<-(BigInt(2)**BigInt(32)))&&(i=$r(i)),i+="n"),n+=` It must be ${r}. Received ${i}`,n},RangeError);function $r(e){let r="",t=e.length,n=e[0]==="-"?1:0;for(;t>=n+4;t-=3)r=`_${e.slice(t-3,t)}${r}`;return `${e.slice(0,t)}${r}`}function yt(e,r,t){rr(r,"offset"),(e[r]===void 0||e[r+t]===void 0)&&er(r,e.length-(t+1));}function Fr(e,r,t,n,i,s){if(e>t||e<r){let a=typeof r=="bigint"?"n":"",d;throw r===0||r===BigInt(0)?d=`>= 0${a} and < 2${a} ** ${(s+1)*8}${a}`:d=`>= -(2${a} ** ${(s+1)*8-1}${a}) and < 2 ** ${(s+1)*8-1}${a}`,new Z.ERR_OUT_OF_RANGE("value",d,e)}yt(n,i,s);}function rr(e,r){if(typeof e!="number")throw new Z.ERR_INVALID_ARG_TYPE(r,"number",e)}function er(e,r,t){throw Math.floor(e)!==e?(rr(e,t),new Z.ERR_OUT_OF_RANGE("offset","an integer",e)):r<0?new Z.ERR_BUFFER_OUT_OF_BOUNDS:new Z.ERR_OUT_OF_RANGE("offset",`>= ${0} and <= ${r}`,e)}let Et=/[^+/0-9A-Za-z-_]/g;function It(e){if(e=e.split("=")[0],e=e.trim().replace(Et,""),e.length<2)return "";for(;e.length%4!==0;)e=e+"=";return e}function wr(e,r){r=r||1/0;let t,n=e.length,i=null,s=[];for(let a=0;a<n;++a){if(t=e.charCodeAt(a),t>55295&&t<57344){if(!i){if(t>56319){(r-=3)>-1&&s.push(239,191,189);continue}else if(a+1===n){(r-=3)>-1&&s.push(239,191,189);continue}i=t;continue}if(t<56320){(r-=3)>-1&&s.push(239,191,189),i=t;continue}t=(i-55296<<10|t-56320)+65536;}else i&&(r-=3)>-1&&s.push(239,191,189);if(i=null,t<128){if((r-=1)<0)break;s.push(t);}else if(t<2048){if((r-=2)<0)break;s.push(t>>6|192,t&63|128);}else if(t<65536){if((r-=3)<0)break;s.push(t>>12|224,t>>6&63|128,t&63|128);}else if(t<1114112){if((r-=4)<0)break;s.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128);}else throw new Error("Invalid code point")}return s}function Bt(e){let r=[];for(let t=0;t<e.length;++t)r.push(e.charCodeAt(t)&255);return r}function Tt(e,r){let t,n,i,s=[];for(let a=0;a<e.length&&!((r-=2)<0);++a)t=e.charCodeAt(a),n=t>>8,i=t%256,s.push(i),s.push(n);return s}function Or(e){return u.toByteArray(It(e))}function ar(e,r,t,n){let i;for(i=0;i<n&&!(i+t>=r.length||i>=e.length);++i)r[i+t]=e[i];return i}function O(e,r){return e instanceof r||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===r.name}function gr(e){return e!==e}let At=function(){let e="0123456789abcdef",r=new Array(256);for(let t=0;t<16;++t){let n=t*16;for(let i=0;i<16;++i)r[n+i]=e[t]+e[i];}return r}();function Y(e){return typeof BigInt>"u"?xt:e}function xt(){throw new Error("BigInt not supported")}return j$7}var X$5=Ge$3();var S$8=X$5.Buffer;var Ur$2={};St$1(Ur$2,{deleteItem:()=>We$5,getItem:()=>fr$2,setItem:()=>or$3});var ir$2=()=>typeof window>"u",lr$2=()=>!ir$2();var Ye$3="__IMX-",Ar$3=()=>lr$2()&&window.localStorage,Ke$1=u=>{if(u!==null)try{return JSON.parse(u)}catch{return u}},He$2=u=>typeof u=="string"?u:JSON.stringify(u),xr$3=u=>`${Ye$3}${u}`;function fr$2(u){if(Ar$3())return Ke$1(window.localStorage.getItem(xr$3(u)))}var or$3=(u,c)=>Ar$3()?(window.localStorage.setItem(xr$3(u),He$2(c)),!0):!1,We$5=u=>Ar$3()?(window.localStorage.removeItem(xr$3(u)),!0):!1;var Sr$2=0,Wr=u=>{let c=parseInt(u,10)*1e3,p=new Date(c),l=new Date;return Sr$2=p.getTime()-l.getTime(),Sr$2},jr$2=()=>{let u=new Date().getTime()+Sr$2;return new Date(u).toISOString()};var sr$2=(E=>(E.RUNTIME_ID="rid",E.PASSPORT_CLIENT_ID="passportClientId",E.ENVIRONMENT="env",E.PUBLISHABLE_API_KEY="pak",E.IDENTITY="uid",E.DOMAIN="domain",E.SDK_VERSION="sdkVersion",E))(sr$2||{});var Xe$5="https://api.immutable.com";async function hr$3(u,c){let p=axios$1.create({baseURL:Xe$5}),l=JSON.stringify(c),m={payload:S$8.from(l).toString("base64")};return (await p.post(u,m)).data}var q$7,J$4,qe$2=()=>{q$7=fr$2("metrics-events")||[],J$4=fr$2("metrics-runtime")||{};};qe$2();var V$6=(u,c)=>{J$4={...J$4,[u]:c},or$3("metrics-runtime",J$4);},ur$2=u=>{if(J$4[u]!==void 0)return J$4[u]},Xr=()=>J$4,qr$1=()=>q$7,Jr$1=u=>{q$7.push(u),or$3("metrics-events",q$7);},zr$2=u=>{q$7=q$7.slice(u),or$3("metrics-events",q$7);},dr$2=u=>{let c=[];return Object.entries(u).forEach(([p,l])=>{(typeof p=="string"||typeof l=="string"||typeof l=="number"||typeof l=="boolean")&&c.push([p,l.toString()]);}),c};var kr$2="2.2.0",Je$3=()=>ir$2()?"":window.location.ancestorOrigins&&window.location.ancestorOrigins.length>0?new URL(window.location.ancestorOrigins[0]).hostname:document.referrer?new URL(window.document.referrer).hostname:"",ze$3=()=>{if(ir$2())return "";let u;try{window.self!==window.top&&(u=Je$3());}catch{}return u||(u=window.location.hostname),u},Qe$3=()=>{if(V$6("sdkVersion",kr$2),ir$2())return {browser:"nodejs",sdkVersion:kr$2};let u=ze$3();return u&&V$6("domain",u),{sdkVersion:kr$2,browser:window.navigator.userAgent,domain:u,tz:Intl.DateTimeFormat().resolvedOptions().timeZone,screen:`${window.screen.width}x${window.screen.height}`}},_r$2=!1,Qr$1=()=>_r$2,Zr=async()=>{_r$2=!0;try{let u=dr$2(Qe$3()),c=ur$2("rid"),p=ur$2("uid"),m=await hr$3("/v1/sdk/initialise",{version:1,data:{runtimeDetails:u,runtimeId:c,uId:p}}),{runtimeId:w,sTime:o}=m;V$6("rid",w),Wr(o);}catch{_r$2=!1;}};function R$4(u,c){return (...p)=>{try{let l=u(...p);return l instanceof Promise?l.catch(()=>c):l}catch{return c}}}function Ze$4(){return lr$2()||typeof T$7>"u"?!1:T$7.env.JEST_WORKER_ID!==void 0}var rt$1=R$4(Ze$4,!1);var et$2="imtbl__metrics",tn$1=5e3,en$1=1e3,z$9=(u,c)=>getGlobalisedValue_1(et$2,u,c),nt$1=(u,c)=>{let p=memorise(c,{lruOptions:{ttl:tn$1,max:en$1}});return getGlobalisedValue_1(et$2,u,p)};var nn=5e3,on=(u,c,p)=>{let l={event:`${u}.${c}`,time:jr$2(),...p&&{properties:dr$2(p)}};Jr$1(l);},Q$7=R$4(nt$1("track",on)),sn=async()=>{if(Qr$1()===!1){await Zr();return}let u=qr$1();if(u.length===0)return;let c=u.length,p=Xr();await hr$3("/v1/sdk/metrics",{version:1,data:{events:u,details:p}})instanceof Error||zr$2(c);},un$1=R$4(sn),ot$2=async()=>{await un$1(),setTimeout(ot$2,nn);},it$2=!1,an=()=>{it$2||(it$2=!0,ot$2());};rt$1()||R$4(z$9("startFlushing",an))();var Pr$3=(u,c,p,l)=>Q$7(u,c,{...l||{},duration:Math.round(p)});var st$2=()=>{let u=()=>Math.floor((1+Math.random())*65536).toString(16).substring(1);return `${u()}${u()}-${u()}-${u()}-${u()}-${u()}${u()}${u()}`};var cn=(...u)=>{if(!u.some(l=>!!l))return {};let p={};return u.forEach(l=>{l&&(p={...p,...l});}),p},pn=u=>u.replace(/[^a-zA-Z0-9\s\-_]/g,""),ln$1=(u,c)=>`${u}_${pn(c)}`,fn=(u,c,p=!0,l)=>{let m=st$2(),w=Date.now(),o=0,E=0,b={},C=(..._)=>cn(b,..._,{flowId:m,flowName:c});b=C(l);let B=_=>{_&&(b=C(_));},k=(_,f)=>{let h=ln$1(c,_),g=0,A=performance.now();o>0&&(g=A-E);let v=C(f,{flowEventName:_,flowStep:o});Pr$3(u,h,g,v),o++,E=A;};return p&&k("Start"),{details:{moduleName:u,flowName:c,flowId:m,flowStartTime:w},addEvent:R$4(k),addFlowProperties:R$4(B)}},hn=R$4(fn);var dn$1=(u,c,p,l)=>{let{message:m}=p,w=p.stack||"",{cause:o}=p;o instanceof Error&&(w=`${w}
|
|
4112
|
+
var Ut$2=Object.defineProperty;var St$1=(u,c)=>{for(var p in c)Ut$2(u,p,{get:c[p],enumerable:!0});};function Br$1(u){throw new Error("Node.js process "+u+" is not supported by JSPM core outside of Node.js")}var G$4=[],tr$2=!1,W$4,cr$3=-1;function kt$2(){!tr$2||!W$4||(tr$2=!1,W$4.length?G$4=W$4.concat(G$4):cr$3=-1,G$4.length&&Vr$1());}function Vr$1(){if(!tr$2){var u=setTimeout(kt$2,0);tr$2=!0;for(var c=G$4.length;c;){for(W$4=G$4,G$4=[];++cr$3<c;)W$4&&W$4[cr$3].run();cr$3=-1,c=G$4.length;}W$4=null,tr$2=!1,clearTimeout(u);}}function _t$1(u){var c=new Array(arguments.length-1);if(arguments.length>1)for(var p=1;p<arguments.length;p++)c[p-1]=arguments[p];G$4.push(new Gr$1(u,c)),G$4.length===1&&!tr$2&&setTimeout(Vr$1,0);}function Gr$1(u,c){this.fun=u,this.array=c;}Gr$1.prototype.run=function(){this.fun.apply(null,this.array);};var Pt$1="browser",Rt$1="x64",bt$1="browser",Nt$1={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},vt$1=["/usr/bin/node"],Mt$1=[],Ct$3="v16.8.0",Lt$2={},Dt$2=function(u,c){console.warn((c?c+": ":"")+u);},$t$2=function(u){Br$1("binding");},Ft$2=function(u){return 0},Ot$3=function(){return "/"},Vt$2=function(u){},Gt$2={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};function M$8(){}var Yt$2=M$8,Kt$2=[];function Ht$2(u){Br$1("_linkedBinding");}var Wt$2={},jt$2=!1,Xt$3={};function qt$3(u){Br$1("dlopen");}function Jt$3(){return []}function zt$2(){return []}var Qt$1=M$8,Zt$2=M$8,Tr$2=function(){return {}},re$4=Tr$2,te$4=Tr$2,ee$3=M$8,ne$5=M$8,ie$5=M$8,oe$6={};function se$4(u,c){if(!u)throw new Error(c||"assertion error")}var ue$3={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},ae$4=M$8,ce$3=M$8;function pe$4(){return !1}var le$3=M$8,fe$5=M$8,he$3=M$8,de$3=M$8,me$4=M$8,we$4=void 0,ge$5=void 0,ye$4=void 0,Ee$3=M$8,Ie$1=2,Be$3=1,Te$2="/bin/usr/node",Ae$3=9229,xe$3="node",Ue$4=[],Se$4=M$8,K$8={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0};K$8.now===void 0&&(yr$3=Date.now(),K$8.timing&&K$8.timing.navigationStart&&(yr$3=K$8.timing.navigationStart),K$8.now=()=>Date.now()-yr$3);var yr$3;function ke$4(){return K$8.now()/1e3}var Er$2=1e9;function Ir$2(u){var c=Math.floor((Date.now()-K$8.now())*.001),p=K$8.now()*.001,l=Math.floor(p)+c,m=Math.floor(p%1*1e9);return u&&(l=l-u[0],m=m-u[1],m<0&&(l--,m+=Er$2)),[l,m]}Ir$2.bigint=function(u){var c=Ir$2(u);return typeof BigInt>"u"?c[0]*Er$2+c[1]:BigInt(c[0]*Er$2)+BigInt(c[1])};var _e$3=10,Pe$4={},Re$5=0;function H$4(){return T$7}var be$4=H$4,Ne$2=H$4,ve$3=H$4,Me$1=H$4,Ce$4=H$4,Le$2=M$8,De$4=H$4,$e$4=H$4;function Fe$4(u){return []}var T$7={version:Ct$3,versions:Lt$2,arch:Rt$1,platform:bt$1,release:Gt$2,_rawDebug:Yt$2,moduleLoadList:Kt$2,binding:$t$2,_linkedBinding:Ht$2,_events:Pe$4,_eventsCount:Re$5,_maxListeners:_e$3,on:H$4,addListener:be$4,once:Ne$2,off:ve$3,removeListener:Me$1,removeAllListeners:Ce$4,emit:Le$2,prependListener:De$4,prependOnceListener:$e$4,listeners:Fe$4,domain:Wt$2,_exiting:jt$2,config:Xt$3,dlopen:qt$3,uptime:ke$4,_getActiveRequests:Jt$3,_getActiveHandles:zt$2,reallyExit:Qt$1,_kill:Zt$2,cpuUsage:Tr$2,resourceUsage:re$4,memoryUsage:te$4,kill:ee$3,exit:ne$5,openStdin:ie$5,allowedNodeEnvironmentFlags:oe$6,assert:se$4,features:ue$3,_fatalExceptions:ae$4,setUncaughtExceptionCaptureCallback:ce$3,hasUncaughtExceptionCaptureCallback:pe$4,emitWarning:Dt$2,nextTick:_t$1,_tickCallback:le$3,_debugProcess:fe$5,_debugEnd:he$3,_startProfilerIdleNotifier:de$3,_stopProfilerIdleNotifier:me$4,stdout:we$4,stdin:ye$4,stderr:ge$5,abort:Ee$3,umask:Ft$2,chdir:Vt$2,cwd:Ot$3,env:Nt$1,title:Pt$1,argv:vt$1,execArgv:Mt$1,pid:Ie$1,ppid:Be$3,execPath:Te$2,debugPort:Ae$3,hrtime:Ir$2,argv0:xe$3,_preload_modules:Ue$4,setSourceMapsEnabled:Se$4};var nr$2={},Yr$1=!1;function Oe$3(){if(Yr$1)return nr$2;Yr$1=!0,nr$2.byteLength=E,nr$2.toByteArray=C,nr$2.fromByteArray=_;for(var u=[],c=[],p=typeof Uint8Array<"u"?Uint8Array:Array,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",m=0,w=l.length;m<w;++m)u[m]=l[m],c[l.charCodeAt(m)]=m;c[45]=62,c[95]=63;function o(f){var h=f.length;if(h%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var g=f.indexOf("=");g===-1&&(g=h);var A=g===h?0:4-g%4;return [g,A]}function E(f){var h=o(f),g=h[0],A=h[1];return (g+A)*3/4-A}function b(f,h,g){return (h+g)*3/4-g}function C(f){var h,g=o(f),A=g[0],v=g[1],P=new p(b(f,A,v)),D=0,F=v>0?A-4:A,L;for(L=0;L<F;L+=4)h=c[f.charCodeAt(L)]<<18|c[f.charCodeAt(L+1)]<<12|c[f.charCodeAt(L+2)]<<6|c[f.charCodeAt(L+3)],P[D++]=h>>16&255,P[D++]=h>>8&255,P[D++]=h&255;return v===2&&(h=c[f.charCodeAt(L)]<<2|c[f.charCodeAt(L+1)]>>4,P[D++]=h&255),v===1&&(h=c[f.charCodeAt(L)]<<10|c[f.charCodeAt(L+1)]<<4|c[f.charCodeAt(L+2)]>>2,P[D++]=h>>8&255,P[D++]=h&255),P}function B(f){return u[f>>18&63]+u[f>>12&63]+u[f>>6&63]+u[f&63]}function k(f,h,g){for(var A,v=[],P=h;P<g;P+=3)A=(f[P]<<16&16711680)+(f[P+1]<<8&65280)+(f[P+2]&255),v.push(B(A));return v.join("")}function _(f){for(var h,g=f.length,A=g%3,v=[],P=16383,D=0,F=g-A;D<F;D+=P)v.push(k(f,D,D+P>F?F:D+P));return A===1?(h=f[g-1],v.push(u[h>>2]+u[h<<4&63]+"==")):A===2&&(h=(f[g-2]<<8)+f[g-1],v.push(u[h>>10]+u[h>>4&63]+u[h<<2&63]+"=")),v.join("")}return nr$2}var pr$2={},Kr$2=!1;function Ve$1(){if(Kr$2)return pr$2;Kr$2=!0;return pr$2.read=function(u,c,p,l,m){var w,o,E=m*8-l-1,b=(1<<E)-1,C=b>>1,B=-7,k=p?m-1:0,_=p?-1:1,f=u[c+k];for(k+=_,w=f&(1<<-B)-1,f>>=-B,B+=E;B>0;w=w*256+u[c+k],k+=_,B-=8);for(o=w&(1<<-B)-1,w>>=-B,B+=l;B>0;o=o*256+u[c+k],k+=_,B-=8);if(w===0)w=1-C;else {if(w===b)return o?NaN:(f?-1:1)*(1/0);o=o+Math.pow(2,l),w=w-C;}return (f?-1:1)*o*Math.pow(2,w-l)},pr$2.write=function(u,c,p,l,m,w){var o,E,b,C=w*8-m-1,B=(1<<C)-1,k=B>>1,_=m===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=l?0:w-1,h=l?1:-1,g=c<0||c===0&&1/c<0?1:0;for(c=Math.abs(c),isNaN(c)||c===1/0?(E=isNaN(c)?1:0,o=B):(o=Math.floor(Math.log(c)/Math.LN2),c*(b=Math.pow(2,-o))<1&&(o--,b*=2),o+k>=1?c+=_/b:c+=_*Math.pow(2,1-k),c*b>=2&&(o++,b/=2),o+k>=B?(E=0,o=B):o+k>=1?(E=(c*b-1)*Math.pow(2,m),o=o+k):(E=c*Math.pow(2,k-1)*Math.pow(2,m),o=0));m>=8;u[p+f]=E&255,f+=h,E/=256,m-=8);for(o=o<<m|E,C+=m;C>0;u[p+f]=o&255,f+=h,o/=256,C-=8);u[p+f-h]|=g*128;},pr$2}var j$7={},Hr$1=!1;function Ge$3(){if(Hr$1)return j$7;Hr$1=!0;let u=Oe$3(),c=Ve$1(),p=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;j$7.Buffer=o,j$7.SlowBuffer=v,j$7.INSPECT_MAX_BYTES=50;let l=2147483647;j$7.kMaxLength=l,o.TYPED_ARRAY_SUPPORT=m(),!o.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function m(){try{let e=new Uint8Array(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,Uint8Array.prototype),Object.setPrototypeOf(e,r),e.foo()===42}catch{return !1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function w(e){if(e>l)throw new RangeError('The value "'+e+'" is invalid for option "size"');let r=new Uint8Array(e);return Object.setPrototypeOf(r,o.prototype),r}function o(e,r,t){if(typeof e=="number"){if(typeof r=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return B(e)}return E(e,r,t)}o.poolSize=8192;function E(e,r,t){if(typeof e=="string")return k(e,r);if(ArrayBuffer.isView(e))return f(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(O(e,ArrayBuffer)||e&&O(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(O(e,SharedArrayBuffer)||e&&O(e.buffer,SharedArrayBuffer)))return h(e,r,t);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return o.from(n,r,t);let i=g(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return o.from(e[Symbol.toPrimitive]("string"),r,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}o.from=function(e,r,t){return E(e,r,t)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function b(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function C(e,r,t){return b(e),e<=0?w(e):r!==void 0?typeof t=="string"?w(e).fill(r,t):w(e).fill(r):w(e)}o.alloc=function(e,r,t){return C(e,r,t)};function B(e){return b(e),w(e<0?0:A(e)|0)}o.allocUnsafe=function(e){return B(e)},o.allocUnsafeSlow=function(e){return B(e)};function k(e,r){if((typeof r!="string"||r==="")&&(r="utf8"),!o.isEncoding(r))throw new TypeError("Unknown encoding: "+r);let t=P(e,r)|0,n=w(t),i=n.write(e,r);return i!==t&&(n=n.slice(0,i)),n}function _(e){let r=e.length<0?0:A(e.length)|0,t=w(r);for(let n=0;n<r;n+=1)t[n]=e[n]&255;return t}function f(e){if(O(e,Uint8Array)){let r=new Uint8Array(e);return h(r.buffer,r.byteOffset,r.byteLength)}return _(e)}function h(e,r,t){if(r<0||e.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<r+(t||0))throw new RangeError('"length" is outside of buffer bounds');let n;return r===void 0&&t===void 0?n=new Uint8Array(e):t===void 0?n=new Uint8Array(e,r):n=new Uint8Array(e,r,t),Object.setPrototypeOf(n,o.prototype),n}function g(e){if(o.isBuffer(e)){let r=A(e.length)|0,t=w(r);return t.length===0||e.copy(t,0,0,r),t}if(e.length!==void 0)return typeof e.length!="number"||gr(e.length)?w(0):_(e);if(e.type==="Buffer"&&Array.isArray(e.data))return _(e.data)}function A(e){if(e>=l)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+l.toString(16)+" bytes");return e|0}function v(e){return +e!=e&&(e=0),o.alloc(+e)}o.isBuffer=function(r){return r!=null&&r._isBuffer===!0&&r!==o.prototype},o.compare=function(r,t){if(O(r,Uint8Array)&&(r=o.from(r,r.offset,r.byteLength)),O(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(r)||!o.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===t)return 0;let n=r.length,i=t.length;for(let s=0,a=Math.min(n,i);s<a;++s)if(r[s]!==t[s]){n=r[s],i=t[s];break}return n<i?-1:i<n?1:0},o.isEncoding=function(r){switch(String(r).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return !0;default:return !1}},o.concat=function(r,t){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return o.alloc(0);let n;if(t===void 0)for(t=0,n=0;n<r.length;++n)t+=r[n].length;let i=o.allocUnsafe(t),s=0;for(n=0;n<r.length;++n){let a=r[n];if(O(a,Uint8Array))s+a.length>i.length?(o.isBuffer(a)||(a=o.from(a)),a.copy(i,s)):Uint8Array.prototype.set.call(i,a,s);else if(o.isBuffer(a))a.copy(i,s);else throw new TypeError('"list" argument must be an Array of Buffers');s+=a.length;}return i};function P(e,r){if(o.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||O(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let t=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&t===0)return 0;let i=!1;for(;;)switch(r){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return wr(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return Or(e).length;default:if(i)return n?-1:wr(e).length;r=(""+r).toLowerCase(),i=!0;}}o.byteLength=P;function D(e,r,t){let n=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,r>>>=0,t<=r))return "";for(e||(e="utf8");;)switch(e){case"hex":return wt(this,r,t);case"utf8":case"utf-8":return br(this,r,t);case"ascii":return dt(this,r,t);case"latin1":case"binary":return mt(this,r,t);case"base64":return ft(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return gt(this,r,t);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0;}}o.prototype._isBuffer=!0;function F(e,r,t){let n=e[r];e[r]=e[t],e[t]=n;}o.prototype.swap16=function(){let r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<r;t+=2)F(this,t,t+1);return this},o.prototype.swap32=function(){let r=this.length;if(r%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<r;t+=4)F(this,t,t+3),F(this,t+1,t+2);return this},o.prototype.swap64=function(){let r=this.length;if(r%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<r;t+=8)F(this,t,t+7),F(this,t+1,t+6),F(this,t+2,t+5),F(this,t+3,t+4);return this},o.prototype.toString=function(){let r=this.length;return r===0?"":arguments.length===0?br(this,0,r):D.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(r){if(!o.isBuffer(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:o.compare(this,r)===0},o.prototype.inspect=function(){let r="",t=j$7.INSPECT_MAX_BYTES;return r=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(r+=" ... "),"<Buffer "+r+">"},p&&(o.prototype[p]=o.prototype.inspect),o.prototype.compare=function(r,t,n,i,s){if(O(r,Uint8Array)&&(r=o.from(r,r.offset,r.byteLength)),!o.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(t===void 0&&(t=0),n===void 0&&(n=r?r.length:0),i===void 0&&(i=0),s===void 0&&(s=this.length),t<0||n>r.length||i<0||s>this.length)throw new RangeError("out of range index");if(i>=s&&t>=n)return 0;if(i>=s)return -1;if(t>=n)return 1;if(t>>>=0,n>>>=0,i>>>=0,s>>>=0,this===r)return 0;let a=s-i,d=n-t,x=Math.min(a,d),I=this.slice(i,s),U=r.slice(t,n);for(let y=0;y<x;++y)if(I[y]!==U[y]){a=I[y],d=U[y];break}return a<d?-1:d<a?1:0};function L(e,r,t,n,i){if(e.length===0)return -1;if(typeof t=="string"?(n=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,gr(t)&&(t=i?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(i)return -1;t=e.length-1;}else if(t<0)if(i)t=0;else return -1;if(typeof r=="string"&&(r=o.from(r,n)),o.isBuffer(r))return r.length===0?-1:Rr(e,r,t,n,i);if(typeof r=="number")return r=r&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,r,t):Uint8Array.prototype.lastIndexOf.call(e,r,t):Rr(e,[r],t,n,i);throw new TypeError("val must be string, number or Buffer")}function Rr(e,r,t,n,i){let s=1,a=e.length,d=r.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||r.length<2)return -1;s=2,a/=2,d/=2,t/=2;}function x(U,y){return s===1?U[y]:U.readUInt16BE(y*s)}let I;if(i){let U=-1;for(I=t;I<a;I++)if(x(e,I)===x(r,U===-1?0:I-U)){if(U===-1&&(U=I),I-U+1===d)return U*s}else U!==-1&&(I-=I-U),U=-1;}else for(t+d>a&&(t=a-d),I=t;I>=0;I--){let U=!0;for(let y=0;y<d;y++)if(x(e,I+y)!==x(r,y)){U=!1;break}if(U)return I}return -1}o.prototype.includes=function(r,t,n){return this.indexOf(r,t,n)!==-1},o.prototype.indexOf=function(r,t,n){return L(this,r,t,n,!0)},o.prototype.lastIndexOf=function(r,t,n){return L(this,r,t,n,!1)};function ut(e,r,t,n){t=Number(t)||0;let i=e.length-t;n?(n=Number(n),n>i&&(n=i)):n=i;let s=r.length;n>s/2&&(n=s/2);let a;for(a=0;a<n;++a){let d=parseInt(r.substr(a*2,2),16);if(gr(d))return a;e[t+a]=d;}return a}function at(e,r,t,n){return ar(wr(r,e.length-t),e,t,n)}function ct(e,r,t,n){return ar(Bt(r),e,t,n)}function pt(e,r,t,n){return ar(Or(r),e,t,n)}function lt(e,r,t,n){return ar(Tt(r,e.length-t),e,t,n)}o.prototype.write=function(r,t,n,i){if(t===void 0)i="utf8",n=this.length,t=0;else if(n===void 0&&typeof t=="string")i=t,n=this.length,t=0;else if(isFinite(t))t=t>>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let s=this.length-t;if((n===void 0||n>s)&&(n=s),r.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let a=!1;for(;;)switch(i){case"hex":return ut(this,r,t,n);case"utf8":case"utf-8":return at(this,r,t,n);case"ascii":case"latin1":case"binary":return ct(this,r,t,n);case"base64":return pt(this,r,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return lt(this,r,t,n);default:if(a)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),a=!0;}},o.prototype.toJSON=function(){return {type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ft(e,r,t){return r===0&&t===e.length?u.fromByteArray(e):u.fromByteArray(e.slice(r,t))}function br(e,r,t){t=Math.min(e.length,t);let n=[],i=r;for(;i<t;){let s=e[i],a=null,d=s>239?4:s>223?3:s>191?2:1;if(i+d<=t){let x,I,U,y;switch(d){case 1:s<128&&(a=s);break;case 2:x=e[i+1],(x&192)===128&&(y=(s&31)<<6|x&63,y>127&&(a=y));break;case 3:x=e[i+1],I=e[i+2],(x&192)===128&&(I&192)===128&&(y=(s&15)<<12|(x&63)<<6|I&63,y>2047&&(y<55296||y>57343)&&(a=y));break;case 4:x=e[i+1],I=e[i+2],U=e[i+3],(x&192)===128&&(I&192)===128&&(U&192)===128&&(y=(s&15)<<18|(x&63)<<12|(I&63)<<6|U&63,y>65535&&y<1114112&&(a=y));}}a===null?(a=65533,d=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|a&1023),n.push(a),i+=d;}return ht(n)}let Nr=4096;function ht(e){let r=e.length;if(r<=Nr)return String.fromCharCode.apply(String,e);let t="",n=0;for(;n<r;)t+=String.fromCharCode.apply(String,e.slice(n,n+=Nr));return t}function dt(e,r,t){let n="";t=Math.min(e.length,t);for(let i=r;i<t;++i)n+=String.fromCharCode(e[i]&127);return n}function mt(e,r,t){let n="";t=Math.min(e.length,t);for(let i=r;i<t;++i)n+=String.fromCharCode(e[i]);return n}function wt(e,r,t){let n=e.length;(!r||r<0)&&(r=0),(!t||t<0||t>n)&&(t=n);let i="";for(let s=r;s<t;++s)i+=At[e[s]];return i}function gt(e,r,t){let n=e.slice(r,t),i="";for(let s=0;s<n.length-1;s+=2)i+=String.fromCharCode(n[s]+n[s+1]*256);return i}o.prototype.slice=function(r,t){let n=this.length;r=~~r,t=t===void 0?n:~~t,r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<r&&(t=r);let i=this.subarray(r,t);return Object.setPrototypeOf(i,o.prototype),i};function N(e,r,t){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+r>t)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(r,t,n){r=r>>>0,t=t>>>0,n||N(r,t,this.length);let i=this[r],s=1,a=0;for(;++a<t&&(s*=256);)i+=this[r+a]*s;return i},o.prototype.readUintBE=o.prototype.readUIntBE=function(r,t,n){r=r>>>0,t=t>>>0,n||N(r,t,this.length);let i=this[r+--t],s=1;for(;t>0&&(s*=256);)i+=this[r+--t]*s;return i},o.prototype.readUint8=o.prototype.readUInt8=function(r,t){return r=r>>>0,t||N(r,1,this.length),this[r]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(r,t){return r=r>>>0,t||N(r,2,this.length),this[r]|this[r+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(r,t){return r=r>>>0,t||N(r,2,this.length),this[r]<<8|this[r+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(r,t){return r=r>>>0,t||N(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(r,t){return r=r>>>0,t||N(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])},o.prototype.readBigUInt64LE=Y(function(r){r=r>>>0,rr(r,"offset");let t=this[r],n=this[r+7];(t===void 0||n===void 0)&&er(r,this.length-8);let i=t+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24,s=this[++r]+this[++r]*2**8+this[++r]*2**16+n*2**24;return BigInt(i)+(BigInt(s)<<BigInt(32))}),o.prototype.readBigUInt64BE=Y(function(r){r=r>>>0,rr(r,"offset");let t=this[r],n=this[r+7];(t===void 0||n===void 0)&&er(r,this.length-8);let i=t*2**24+this[++r]*2**16+this[++r]*2**8+this[++r],s=this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+n;return (BigInt(i)<<BigInt(32))+BigInt(s)}),o.prototype.readIntLE=function(r,t,n){r=r>>>0,t=t>>>0,n||N(r,t,this.length);let i=this[r],s=1,a=0;for(;++a<t&&(s*=256);)i+=this[r+a]*s;return s*=128,i>=s&&(i-=Math.pow(2,8*t)),i},o.prototype.readIntBE=function(r,t,n){r=r>>>0,t=t>>>0,n||N(r,t,this.length);let i=t,s=1,a=this[r+--i];for(;i>0&&(s*=256);)a+=this[r+--i]*s;return s*=128,a>=s&&(a-=Math.pow(2,8*t)),a},o.prototype.readInt8=function(r,t){return r=r>>>0,t||N(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]},o.prototype.readInt16LE=function(r,t){r=r>>>0,t||N(r,2,this.length);let n=this[r]|this[r+1]<<8;return n&32768?n|4294901760:n},o.prototype.readInt16BE=function(r,t){r=r>>>0,t||N(r,2,this.length);let n=this[r+1]|this[r]<<8;return n&32768?n|4294901760:n},o.prototype.readInt32LE=function(r,t){return r=r>>>0,t||N(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24},o.prototype.readInt32BE=function(r,t){return r=r>>>0,t||N(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]},o.prototype.readBigInt64LE=Y(function(r){r=r>>>0,rr(r,"offset");let t=this[r],n=this[r+7];(t===void 0||n===void 0)&&er(r,this.length-8);let i=this[r+4]+this[r+5]*2**8+this[r+6]*2**16+(n<<24);return (BigInt(i)<<BigInt(32))+BigInt(t+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24)}),o.prototype.readBigInt64BE=Y(function(r){r=r>>>0,rr(r,"offset");let t=this[r],n=this[r+7];(t===void 0||n===void 0)&&er(r,this.length-8);let i=(t<<24)+this[++r]*2**16+this[++r]*2**8+this[++r];return (BigInt(i)<<BigInt(32))+BigInt(this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+n)}),o.prototype.readFloatLE=function(r,t){return r=r>>>0,t||N(r,4,this.length),c.read(this,r,!0,23,4)},o.prototype.readFloatBE=function(r,t){return r=r>>>0,t||N(r,4,this.length),c.read(this,r,!1,23,4)},o.prototype.readDoubleLE=function(r,t){return r=r>>>0,t||N(r,8,this.length),c.read(this,r,!0,52,8)},o.prototype.readDoubleBE=function(r,t){return r=r>>>0,t||N(r,8,this.length),c.read(this,r,!1,52,8)};function $(e,r,t,n,i,s){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<s)throw new RangeError('"value" argument is out of bounds');if(t+n>e.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(r,t,n,i){if(r=+r,t=t>>>0,n=n>>>0,!i){let d=Math.pow(2,8*n)-1;$(this,r,t,n,d,0);}let s=1,a=0;for(this[t]=r&255;++a<n&&(s*=256);)this[t+a]=r/s&255;return t+n},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(r,t,n,i){if(r=+r,t=t>>>0,n=n>>>0,!i){let d=Math.pow(2,8*n)-1;$(this,r,t,n,d,0);}let s=n-1,a=1;for(this[t+s]=r&255;--s>=0&&(a*=256);)this[t+s]=r/a&255;return t+n},o.prototype.writeUint8=o.prototype.writeUInt8=function(r,t,n){return r=+r,t=t>>>0,n||$(this,r,t,1,255,0),this[t]=r&255,t+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(r,t,n){return r=+r,t=t>>>0,n||$(this,r,t,2,65535,0),this[t]=r&255,this[t+1]=r>>>8,t+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(r,t,n){return r=+r,t=t>>>0,n||$(this,r,t,2,65535,0),this[t]=r>>>8,this[t+1]=r&255,t+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(r,t,n){return r=+r,t=t>>>0,n||$(this,r,t,4,4294967295,0),this[t+3]=r>>>24,this[t+2]=r>>>16,this[t+1]=r>>>8,this[t]=r&255,t+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(r,t,n){return r=+r,t=t>>>0,n||$(this,r,t,4,4294967295,0),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};function vr(e,r,t,n,i){Fr(r,n,i,e,t,7);let s=Number(r&BigInt(4294967295));e[t++]=s,s=s>>8,e[t++]=s,s=s>>8,e[t++]=s,s=s>>8,e[t++]=s;let a=Number(r>>BigInt(32)&BigInt(4294967295));return e[t++]=a,a=a>>8,e[t++]=a,a=a>>8,e[t++]=a,a=a>>8,e[t++]=a,t}function Mr(e,r,t,n,i){Fr(r,n,i,e,t,7);let s=Number(r&BigInt(4294967295));e[t+7]=s,s=s>>8,e[t+6]=s,s=s>>8,e[t+5]=s,s=s>>8,e[t+4]=s;let a=Number(r>>BigInt(32)&BigInt(4294967295));return e[t+3]=a,a=a>>8,e[t+2]=a,a=a>>8,e[t+1]=a,a=a>>8,e[t]=a,t+8}o.prototype.writeBigUInt64LE=Y(function(r,t=0){return vr(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=Y(function(r,t=0){return Mr(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(r,t,n,i){if(r=+r,t=t>>>0,!i){let x=Math.pow(2,8*n-1);$(this,r,t,n,x-1,-x);}let s=0,a=1,d=0;for(this[t]=r&255;++s<n&&(a*=256);)r<0&&d===0&&this[t+s-1]!==0&&(d=1),this[t+s]=(r/a>>0)-d&255;return t+n},o.prototype.writeIntBE=function(r,t,n,i){if(r=+r,t=t>>>0,!i){let x=Math.pow(2,8*n-1);$(this,r,t,n,x-1,-x);}let s=n-1,a=1,d=0;for(this[t+s]=r&255;--s>=0&&(a*=256);)r<0&&d===0&&this[t+s+1]!==0&&(d=1),this[t+s]=(r/a>>0)-d&255;return t+n},o.prototype.writeInt8=function(r,t,n){return r=+r,t=t>>>0,n||$(this,r,t,1,127,-128),r<0&&(r=255+r+1),this[t]=r&255,t+1},o.prototype.writeInt16LE=function(r,t,n){return r=+r,t=t>>>0,n||$(this,r,t,2,32767,-32768),this[t]=r&255,this[t+1]=r>>>8,t+2},o.prototype.writeInt16BE=function(r,t,n){return r=+r,t=t>>>0,n||$(this,r,t,2,32767,-32768),this[t]=r>>>8,this[t+1]=r&255,t+2},o.prototype.writeInt32LE=function(r,t,n){return r=+r,t=t>>>0,n||$(this,r,t,4,2147483647,-2147483648),this[t]=r&255,this[t+1]=r>>>8,this[t+2]=r>>>16,this[t+3]=r>>>24,t+4},o.prototype.writeInt32BE=function(r,t,n){return r=+r,t=t>>>0,n||$(this,r,t,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4},o.prototype.writeBigInt64LE=Y(function(r,t=0){return vr(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=Y(function(r,t=0){return Mr(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Cr(e,r,t,n,i,s){if(t+n>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function Lr(e,r,t,n,i){return r=+r,t=t>>>0,i||Cr(e,r,t,4),c.write(e,r,t,n,23,4),t+4}o.prototype.writeFloatLE=function(r,t,n){return Lr(this,r,t,!0,n)},o.prototype.writeFloatBE=function(r,t,n){return Lr(this,r,t,!1,n)};function Dr(e,r,t,n,i){return r=+r,t=t>>>0,i||Cr(e,r,t,8),c.write(e,r,t,n,52,8),t+8}o.prototype.writeDoubleLE=function(r,t,n){return Dr(this,r,t,!0,n)},o.prototype.writeDoubleBE=function(r,t,n){return Dr(this,r,t,!1,n)},o.prototype.copy=function(r,t,n,i){if(!o.isBuffer(r))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),t>=r.length&&(t=r.length),t||(t=0),i>0&&i<n&&(i=n),i===n||r.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),r.length-t<i-n&&(i=r.length-t+n);let s=i-n;return this===r&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(t,n,i):Uint8Array.prototype.set.call(r,this.subarray(n,i),t),s},o.prototype.fill=function(r,t,n,i){if(typeof r=="string"){if(typeof t=="string"?(i=t,t=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!o.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(r.length===1){let a=r.charCodeAt(0);(i==="utf8"&&a<128||i==="latin1")&&(r=a);}}else typeof r=="number"?r=r&255:typeof r=="boolean"&&(r=Number(r));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t=t>>>0,n=n===void 0?this.length:n>>>0,r||(r=0);let s;if(typeof r=="number")for(s=t;s<n;++s)this[s]=r;else {let a=o.isBuffer(r)?r:o.from(r,i),d=a.length;if(d===0)throw new TypeError('The value "'+r+'" is invalid for argument "value"');for(s=0;s<n-t;++s)this[s+t]=a[s%d];}return this};let Z={};function mr(e,r,t){Z[e]=class extends t{constructor(){super(),Object.defineProperty(this,"message",{value:r.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,delete this.name;}get code(){return e}set code(i){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:i,writable:!0});}toString(){return `${this.name} [${e}]: ${this.message}`}};}mr("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),mr("ERR_INVALID_ARG_TYPE",function(e,r){return `The "${e}" argument must be of type number. Received type ${typeof r}`},TypeError),mr("ERR_OUT_OF_RANGE",function(e,r,t){let n=`The value of "${e}" is out of range.`,i=t;return Number.isInteger(t)&&Math.abs(t)>2**32?i=$r(String(t)):typeof t=="bigint"&&(i=String(t),(t>BigInt(2)**BigInt(32)||t<-(BigInt(2)**BigInt(32)))&&(i=$r(i)),i+="n"),n+=` It must be ${r}. Received ${i}`,n},RangeError);function $r(e){let r="",t=e.length,n=e[0]==="-"?1:0;for(;t>=n+4;t-=3)r=`_${e.slice(t-3,t)}${r}`;return `${e.slice(0,t)}${r}`}function yt(e,r,t){rr(r,"offset"),(e[r]===void 0||e[r+t]===void 0)&&er(r,e.length-(t+1));}function Fr(e,r,t,n,i,s){if(e>t||e<r){let a=typeof r=="bigint"?"n":"",d;throw r===0||r===BigInt(0)?d=`>= 0${a} and < 2${a} ** ${(s+1)*8}${a}`:d=`>= -(2${a} ** ${(s+1)*8-1}${a}) and < 2 ** ${(s+1)*8-1}${a}`,new Z.ERR_OUT_OF_RANGE("value",d,e)}yt(n,i,s);}function rr(e,r){if(typeof e!="number")throw new Z.ERR_INVALID_ARG_TYPE(r,"number",e)}function er(e,r,t){throw Math.floor(e)!==e?(rr(e,t),new Z.ERR_OUT_OF_RANGE("offset","an integer",e)):r<0?new Z.ERR_BUFFER_OUT_OF_BOUNDS:new Z.ERR_OUT_OF_RANGE("offset",`>= ${0} and <= ${r}`,e)}let Et=/[^+/0-9A-Za-z-_]/g;function It(e){if(e=e.split("=")[0],e=e.trim().replace(Et,""),e.length<2)return "";for(;e.length%4!==0;)e=e+"=";return e}function wr(e,r){r=r||1/0;let t,n=e.length,i=null,s=[];for(let a=0;a<n;++a){if(t=e.charCodeAt(a),t>55295&&t<57344){if(!i){if(t>56319){(r-=3)>-1&&s.push(239,191,189);continue}else if(a+1===n){(r-=3)>-1&&s.push(239,191,189);continue}i=t;continue}if(t<56320){(r-=3)>-1&&s.push(239,191,189),i=t;continue}t=(i-55296<<10|t-56320)+65536;}else i&&(r-=3)>-1&&s.push(239,191,189);if(i=null,t<128){if((r-=1)<0)break;s.push(t);}else if(t<2048){if((r-=2)<0)break;s.push(t>>6|192,t&63|128);}else if(t<65536){if((r-=3)<0)break;s.push(t>>12|224,t>>6&63|128,t&63|128);}else if(t<1114112){if((r-=4)<0)break;s.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128);}else throw new Error("Invalid code point")}return s}function Bt(e){let r=[];for(let t=0;t<e.length;++t)r.push(e.charCodeAt(t)&255);return r}function Tt(e,r){let t,n,i,s=[];for(let a=0;a<e.length&&!((r-=2)<0);++a)t=e.charCodeAt(a),n=t>>8,i=t%256,s.push(i),s.push(n);return s}function Or(e){return u.toByteArray(It(e))}function ar(e,r,t,n){let i;for(i=0;i<n&&!(i+t>=r.length||i>=e.length);++i)r[i+t]=e[i];return i}function O(e,r){return e instanceof r||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===r.name}function gr(e){return e!==e}let At=function(){let e="0123456789abcdef",r=new Array(256);for(let t=0;t<16;++t){let n=t*16;for(let i=0;i<16;++i)r[n+i]=e[t]+e[i];}return r}();function Y(e){return typeof BigInt>"u"?xt:e}function xt(){throw new Error("BigInt not supported")}return j$7}var X$5=Ge$3();var S$8=X$5.Buffer;var Ur$2={};St$1(Ur$2,{deleteItem:()=>We$6,getItem:()=>fr$2,setItem:()=>or$3});var ir$2=()=>typeof window>"u",lr$2=()=>!ir$2();var Ye$3="__IMX-",Ar$3=()=>lr$2()&&window.localStorage,Ke$1=u=>{if(u!==null)try{return JSON.parse(u)}catch{return u}},He$2=u=>typeof u=="string"?u:JSON.stringify(u),xr$3=u=>`${Ye$3}${u}`;function fr$2(u){if(Ar$3())return Ke$1(window.localStorage.getItem(xr$3(u)))}var or$3=(u,c)=>Ar$3()?(window.localStorage.setItem(xr$3(u),He$2(c)),!0):!1,We$6=u=>Ar$3()?(window.localStorage.removeItem(xr$3(u)),!0):!1;var Sr$2=0,Wr=u=>{let c=parseInt(u,10)*1e3,p=new Date(c),l=new Date;return Sr$2=p.getTime()-l.getTime(),Sr$2},jr$2=()=>{let u=new Date().getTime()+Sr$2;return new Date(u).toISOString()};var sr$2=(E=>(E.RUNTIME_ID="rid",E.PASSPORT_CLIENT_ID="passportClientId",E.ENVIRONMENT="env",E.PUBLISHABLE_API_KEY="pak",E.IDENTITY="uid",E.DOMAIN="domain",E.SDK_VERSION="sdkVersion",E))(sr$2||{});var Xe$5="https://api.immutable.com";async function hr$3(u,c){let p=axios$1.create({baseURL:Xe$5}),l=JSON.stringify(c),m={payload:S$8.from(l).toString("base64")};return (await p.post(u,m)).data}var q$7,J$5,qe$2=()=>{q$7=fr$2("metrics-events")||[],J$5=fr$2("metrics-runtime")||{};};qe$2();var V$6=(u,c)=>{J$5={...J$5,[u]:c},or$3("metrics-runtime",J$5);},ur$2=u=>{if(J$5[u]!==void 0)return J$5[u]},Xr=()=>J$5,qr$1=()=>q$7,Jr$1=u=>{q$7.push(u),or$3("metrics-events",q$7);},zr$2=u=>{q$7=q$7.slice(u),or$3("metrics-events",q$7);},dr$2=u=>{let c=[];return Object.entries(u).forEach(([p,l])=>{(typeof p=="string"||typeof l=="string"||typeof l=="number"||typeof l=="boolean")&&c.push([p,l.toString()]);}),c};var kr$2="2.2.1-alpha.1",Je$3=()=>ir$2()?"":window.location.ancestorOrigins&&window.location.ancestorOrigins.length>0?new URL(window.location.ancestorOrigins[0]).hostname:document.referrer?new URL(window.document.referrer).hostname:"",ze$3=()=>{if(ir$2())return "";let u;try{window.self!==window.top&&(u=Je$3());}catch{}return u||(u=window.location.hostname),u},Qe$3=()=>{if(V$6("sdkVersion",kr$2),ir$2())return {browser:"nodejs",sdkVersion:kr$2};let u=ze$3();return u&&V$6("domain",u),{sdkVersion:kr$2,browser:window.navigator.userAgent,domain:u,tz:Intl.DateTimeFormat().resolvedOptions().timeZone,screen:`${window.screen.width}x${window.screen.height}`}},_r$2=!1,Qr$1=()=>_r$2,Zr=async()=>{_r$2=!0;try{let u=dr$2(Qe$3()),c=ur$2("rid"),p=ur$2("uid"),m=await hr$3("/v1/sdk/initialise",{version:1,data:{runtimeDetails:u,runtimeId:c,uId:p}}),{runtimeId:w,sTime:o}=m;V$6("rid",w),Wr(o);}catch{_r$2=!1;}};function R$4(u,c){return (...p)=>{try{let l=u(...p);return l instanceof Promise?l.catch(()=>c):l}catch{return c}}}function Ze$4(){return lr$2()||typeof T$7>"u"?!1:T$7.env.JEST_WORKER_ID!==void 0}var rt$1=R$4(Ze$4,!1);var et$1="imtbl__metrics",tn$1=5e3,en$1=1e3,z$9=(u,c)=>getGlobalisedValue_1(et$1,u,c),nt$2=(u,c)=>{let p=memorise(c,{lruOptions:{ttl:tn$1,max:en$1}});return getGlobalisedValue_1(et$1,u,p)};var nn=5e3,on=(u,c,p)=>{let l={event:`${u}.${c}`,time:jr$2(),...p&&{properties:dr$2(p)}};Jr$1(l);},Q$7=R$4(nt$2("track",on)),sn=async()=>{if(Qr$1()===!1){await Zr();return}let u=qr$1();if(u.length===0)return;let c=u.length,p=Xr();await hr$3("/v1/sdk/metrics",{version:1,data:{events:u,details:p}})instanceof Error||zr$2(c);},un=R$4(sn),ot$1=async()=>{await un(),setTimeout(ot$1,nn);},it$1=!1,an=()=>{it$1||(it$1=!0,ot$1());};rt$1()||R$4(z$9("startFlushing",an))();var Pr$3=(u,c,p,l)=>Q$7(u,c,{...l||{},duration:Math.round(p)});var st$2=()=>{let u=()=>Math.floor((1+Math.random())*65536).toString(16).substring(1);return `${u()}${u()}-${u()}-${u()}-${u()}-${u()}${u()}${u()}`};var cn=(...u)=>{if(!u.some(l=>!!l))return {};let p={};return u.forEach(l=>{l&&(p={...p,...l});}),p},pn$1=u=>u.replace(/[^a-zA-Z0-9\s\-_]/g,""),ln=(u,c)=>`${u}_${pn$1(c)}`,fn=(u,c,p=!0,l)=>{let m=st$2(),w=Date.now(),o=0,E=0,b={},C=(..._)=>cn(b,..._,{flowId:m,flowName:c});b=C(l);let B=_=>{_&&(b=C(_));},k=(_,f)=>{let h=ln(c,_),g=0,A=performance.now();o>0&&(g=A-E);let v=C(f,{flowEventName:_,flowStep:o});Pr$3(u,h,g,v),o++,E=A;};return p&&k("Start"),{details:{moduleName:u,flowName:c,flowId:m,flowStartTime:w},addEvent:R$4(k),addFlowProperties:R$4(B)}},hn=R$4(fn);var dn$1=(u,c,p,l)=>{let{message:m}=p,w=p.stack||"",{cause:o}=p;o instanceof Error&&(w=`${w}
|
|
4113
4113
|
Cause: ${o.message}
|
|
4114
4114
|
${o.stack}`),Q$7(u,`trackError_${c}`,{...l||{},errorMessage:m,errorStack:w,isTrackError:!0});},mn$1=R$4(dn$1);var En$1=u=>{V$6("env",u);},In$1=R$4(z$9("setEnvironment",En$1)),Bn=u=>{V$6("passportClientId",u);};R$4(z$9("setPassportClientId",Bn));var An=u=>{V$6("pak",u);};R$4(z$9("setPublishableApiKey",An));R$4(z$9("getDetail",ur$2));
|
|
4115
4115
|
|
|
@@ -60383,7 +60383,7 @@ function requireEthers$1 () {
|
|
|
60383
60383
|
} (lib_commonjs$2));
|
|
60384
60384
|
|
|
60385
60385
|
// src/widgets/definitions/events/widgets.ts
|
|
60386
|
-
var
|
|
60386
|
+
var ro$1 = /* @__PURE__ */ ((g) => {
|
|
60387
60387
|
g["IMTBL_WIDGETS_PROVIDER"] = "imtbl-widgets-provider";
|
|
60388
60388
|
g["IMTBL_CONNECT_WIDGET_EVENT"] = "imtbl-connect-widget";
|
|
60389
60389
|
g["IMTBL_WALLET_WIDGET_EVENT"] = "imtbl-wallet-widget";
|
|
@@ -60396,43 +60396,43 @@ var no$1 = /* @__PURE__ */ ((g) => {
|
|
|
60396
60396
|
g["IMTBL_PURCHASE_WIDGET_EVENT"] = "imtbl-purchase-widget";
|
|
60397
60397
|
g["IMTBL_TRANSFER_WIDGET_EVENT"] = "imtbl-transfer-widget";
|
|
60398
60398
|
return g;
|
|
60399
|
-
})(
|
|
60400
|
-
var
|
|
60399
|
+
})(ro$1 || {});
|
|
60400
|
+
var oo$1 = /* @__PURE__ */ ((e) => {
|
|
60401
60401
|
e["PROVIDER_UPDATED"] = "PROVIDER_UPDATED";
|
|
60402
60402
|
return e;
|
|
60403
|
-
})(
|
|
60403
|
+
})(oo$1 || {});
|
|
60404
60404
|
|
|
60405
60405
|
// src/widgets/definitions/events/connect.ts
|
|
60406
|
-
var
|
|
60406
|
+
var no$1 = /* @__PURE__ */ ((a) => {
|
|
60407
60407
|
a["CLOSE_WIDGET"] = "close-widget";
|
|
60408
60408
|
a["SUCCESS"] = "success";
|
|
60409
60409
|
a["FAILURE"] = "failure";
|
|
60410
60410
|
a["LANGUAGE_CHANGED"] = "language-changed";
|
|
60411
60411
|
a["WALLETCONNECT_PROVIDER_UPDATED"] = "walletconnect-provider-updated";
|
|
60412
60412
|
return a;
|
|
60413
|
-
})(
|
|
60413
|
+
})(no$1 || {});
|
|
60414
60414
|
|
|
60415
60415
|
// src/widgets/definitions/events/wallet.ts
|
|
60416
|
-
var
|
|
60416
|
+
var ao$1 = /* @__PURE__ */ ((n) => {
|
|
60417
60417
|
n["CLOSE_WIDGET"] = "close-widget";
|
|
60418
60418
|
n["NETWORK_SWITCH"] = "network-switch";
|
|
60419
60419
|
n["DISCONNECT_WALLET"] = "disconnect-wallet";
|
|
60420
60420
|
n["LANGUAGE_CHANGED"] = "language-changed";
|
|
60421
60421
|
return n;
|
|
60422
|
-
})(
|
|
60422
|
+
})(ao$1 || {});
|
|
60423
60423
|
|
|
60424
60424
|
// src/widgets/definitions/events/swap.ts
|
|
60425
|
-
var
|
|
60425
|
+
var io$1 = /* @__PURE__ */ ((a) => {
|
|
60426
60426
|
a["CLOSE_WIDGET"] = "close-widget";
|
|
60427
60427
|
a["SUCCESS"] = "success";
|
|
60428
60428
|
a["FAILURE"] = "failure";
|
|
60429
60429
|
a["REJECTED"] = "rejected";
|
|
60430
60430
|
a["LANGUAGE_CHANGED"] = "language-changed";
|
|
60431
60431
|
return a;
|
|
60432
|
-
})(
|
|
60432
|
+
})(io$1 || {});
|
|
60433
60433
|
|
|
60434
60434
|
// src/widgets/definitions/events/sale.ts
|
|
60435
|
-
var
|
|
60435
|
+
var so$1 = /* @__PURE__ */ ((g) => {
|
|
60436
60436
|
g["CLOSE_WIDGET"] = "close-widget";
|
|
60437
60437
|
g["SUCCESS"] = "success";
|
|
60438
60438
|
g["FAILURE"] = "failure";
|
|
@@ -60445,16 +60445,16 @@ var lo$1 = /* @__PURE__ */ ((g) => {
|
|
|
60445
60445
|
g["REQUEST_SWAP"] = "request-swap";
|
|
60446
60446
|
g["PAYMENT_TOKEN"] = "payment-token";
|
|
60447
60447
|
return g;
|
|
60448
|
-
})(
|
|
60449
|
-
var
|
|
60448
|
+
})(so$1 || {});
|
|
60449
|
+
var co$1 = /* @__PURE__ */ ((o) => {
|
|
60450
60450
|
o["CRYPTO"] = "crypto";
|
|
60451
60451
|
o["DEBIT"] = "debit";
|
|
60452
60452
|
o["CREDIT"] = "credit";
|
|
60453
60453
|
return o;
|
|
60454
|
-
})(
|
|
60454
|
+
})(co$1 || {});
|
|
60455
60455
|
|
|
60456
60456
|
// src/widgets/definitions/events/bridge.ts
|
|
60457
|
-
var
|
|
60457
|
+
var lo$1 = /* @__PURE__ */ ((i) => {
|
|
60458
60458
|
i["CLOSE_WIDGET"] = "close-widget";
|
|
60459
60459
|
i["FAILURE"] = "failure";
|
|
60460
60460
|
i["TRANSACTION_SENT"] = "transaction-sent";
|
|
@@ -60462,10 +60462,10 @@ var uo = /* @__PURE__ */ ((i) => {
|
|
|
60462
60462
|
i["CLAIM_WITHDRAWAL_SUCCESS"] = "claim-withdrawal-success";
|
|
60463
60463
|
i["CLAIM_WITHDRAWAL_FAILURE"] = "claim-withdrawal-failure";
|
|
60464
60464
|
return i;
|
|
60465
|
-
})(
|
|
60465
|
+
})(lo$1 || {});
|
|
60466
60466
|
|
|
60467
60467
|
// src/widgets/definitions/events/orchestration.ts
|
|
60468
|
-
var
|
|
60468
|
+
var po$1 = /* @__PURE__ */ ((c) => {
|
|
60469
60469
|
c["REQUEST_CONNECT"] = "request-connect";
|
|
60470
60470
|
c["REQUEST_WALLET"] = "request-wallet";
|
|
60471
60471
|
c["REQUEST_SWAP"] = "request-swap";
|
|
@@ -60475,19 +60475,19 @@ var mo$1 = /* @__PURE__ */ ((c) => {
|
|
|
60475
60475
|
c["REQUEST_PURCHASE"] = "request-purchase";
|
|
60476
60476
|
c["REQUEST_GO_BACK"] = "request-go-back";
|
|
60477
60477
|
return c;
|
|
60478
|
-
})(
|
|
60478
|
+
})(po$1 || {});
|
|
60479
60479
|
|
|
60480
60480
|
// src/widgets/definitions/events/onramp.ts
|
|
60481
|
-
var
|
|
60481
|
+
var uo = /* @__PURE__ */ ((n) => {
|
|
60482
60482
|
n["CLOSE_WIDGET"] = "close-widget";
|
|
60483
60483
|
n["SUCCESS"] = "success";
|
|
60484
60484
|
n["FAILURE"] = "failure";
|
|
60485
60485
|
n["LANGUAGE_CHANGED"] = "language-changed";
|
|
60486
60486
|
return n;
|
|
60487
|
-
})(
|
|
60487
|
+
})(uo || {});
|
|
60488
60488
|
|
|
60489
60489
|
// src/widgets/definitions/events/commerce.ts
|
|
60490
|
-
var
|
|
60490
|
+
var mo$1 = /* @__PURE__ */ ((s) => {
|
|
60491
60491
|
s["INITIALISED"] = "INITIALISED";
|
|
60492
60492
|
s["PROVIDER_UPDATED"] = "PROVIDER_UPDATED";
|
|
60493
60493
|
s["CLOSE"] = "CLOSE";
|
|
@@ -60496,8 +60496,8 @@ var fo$1 = /* @__PURE__ */ ((s) => {
|
|
|
60496
60496
|
s["DISCONNECTED"] = "DISCONNECTED";
|
|
60497
60497
|
s["USER_ACTION"] = "USER_ACTION";
|
|
60498
60498
|
return s;
|
|
60499
|
-
})(
|
|
60500
|
-
var
|
|
60499
|
+
})(mo$1 || {});
|
|
60500
|
+
var go$1 = /* @__PURE__ */ ((p) => {
|
|
60501
60501
|
p["SWAP_SUCCESS"] = "SWAP_SUCCESS";
|
|
60502
60502
|
p["ONRAMP_SUCCESS"] = "ONRAMP_SUCCESS";
|
|
60503
60503
|
p["CONNECT_SUCCESS"] = "CONNECT_SUCCESS";
|
|
@@ -60508,8 +60508,8 @@ var Eo$1 = /* @__PURE__ */ ((p) => {
|
|
|
60508
60508
|
p["ADD_TOKENS_SUCCESS"] = "ADD_TOKENS_SUCCESS";
|
|
60509
60509
|
p["ADD_TOKENS_CONNECT_SUCCESS"] = "ADD_TOKENS_CONNECT_SUCCESS";
|
|
60510
60510
|
return p;
|
|
60511
|
-
})(
|
|
60512
|
-
var
|
|
60511
|
+
})(go$1 || {});
|
|
60512
|
+
var fo$1 = /* @__PURE__ */ ((c) => {
|
|
60513
60513
|
c["BRIDGE_FAILED"] = "BRIDGE_FAILED";
|
|
60514
60514
|
c["BRIDGE_CLAIM_WITHDRAWAL_FAILED"] = "BRIDGE_CLAIM_WITHDRAWAL_FAILED";
|
|
60515
60515
|
c["SWAP_FAILED"] = "SWAP_FAILED";
|
|
@@ -60519,44 +60519,44 @@ var Ro$1 = /* @__PURE__ */ ((c) => {
|
|
|
60519
60519
|
c["ONRAMP_FAILED"] = "ONRAMP_FAILED";
|
|
60520
60520
|
c["ADD_TOKENS_FAILED"] = "ADD_TOKENS_FAILED";
|
|
60521
60521
|
return c;
|
|
60522
|
-
})(
|
|
60523
|
-
var
|
|
60522
|
+
})(fo$1 || {});
|
|
60523
|
+
var Eo$1 = /* @__PURE__ */ ((o) => {
|
|
60524
60524
|
o["PAYMENT_METHOD_SELECTED"] = "PAYMENT_METHOD_SELECTED";
|
|
60525
60525
|
o["PAYMENT_TOKEN_SELECTED"] = "PAYMENT_TOKEN_SELECTED";
|
|
60526
60526
|
o["NETWORK_SWITCH"] = "NETWORK_SWITCH";
|
|
60527
60527
|
return o;
|
|
60528
|
-
})(
|
|
60528
|
+
})(Eo$1 || {});
|
|
60529
60529
|
|
|
60530
60530
|
// src/widgets/definitions/events/addTokens.ts
|
|
60531
|
-
var
|
|
60531
|
+
var Ro$1 = /* @__PURE__ */ ((a) => {
|
|
60532
60532
|
a["CLOSE_WIDGET"] = "close-widget";
|
|
60533
60533
|
a["LANGUAGE_CHANGED"] = "language-changed";
|
|
60534
60534
|
a["CONNECT_SUCCESS"] = "connect-success";
|
|
60535
60535
|
a["SUCCESS"] = "success";
|
|
60536
60536
|
a["FAILURE"] = "failure";
|
|
60537
60537
|
return a;
|
|
60538
|
-
})(
|
|
60538
|
+
})(Ro$1 || {});
|
|
60539
60539
|
|
|
60540
60540
|
// src/widgets/definitions/events/purchase.ts
|
|
60541
|
-
var
|
|
60541
|
+
var Co$1 = /* @__PURE__ */ ((n) => {
|
|
60542
60542
|
n["CLOSE_WIDGET"] = "close-widget";
|
|
60543
60543
|
n["CONNECT_SUCCESS"] = "connect-success";
|
|
60544
60544
|
n["SUCCESS"] = "success";
|
|
60545
60545
|
n["FAILURE"] = "failure";
|
|
60546
60546
|
return n;
|
|
60547
|
-
})(
|
|
60547
|
+
})(Co$1 || {});
|
|
60548
60548
|
|
|
60549
60549
|
// src/widgets/definitions/events/transfer.ts
|
|
60550
|
-
var
|
|
60550
|
+
var To = /* @__PURE__ */ ((n) => {
|
|
60551
60551
|
n["CLOSE_WIDGET"] = "close-widget";
|
|
60552
60552
|
n["REJECTED"] = "rejected";
|
|
60553
60553
|
n["SUCCESS"] = "success";
|
|
60554
60554
|
n["FAILURE"] = "failure";
|
|
60555
60555
|
return n;
|
|
60556
|
-
})(
|
|
60556
|
+
})(To || {});
|
|
60557
60557
|
|
|
60558
60558
|
// src/widgets/definitions/types.ts
|
|
60559
|
-
var
|
|
60559
|
+
var Io$1 = /* @__PURE__ */ ((m) => {
|
|
60560
60560
|
m["CONNECT"] = "connect";
|
|
60561
60561
|
m["WALLET"] = "wallet";
|
|
60562
60562
|
m["SWAP"] = "swap";
|
|
@@ -60568,17 +60568,17 @@ var yo$1 = /* @__PURE__ */ ((m) => {
|
|
|
60568
60568
|
m["PURCHASE"] = "purchase";
|
|
60569
60569
|
m["TRANSFER"] = "transfer";
|
|
60570
60570
|
return m;
|
|
60571
|
-
})(
|
|
60571
|
+
})(Io$1 || {});
|
|
60572
60572
|
|
|
60573
60573
|
// src/widgets/definitions/parameters/swap.ts
|
|
60574
|
-
var
|
|
60574
|
+
var yo$1 = /* @__PURE__ */ ((t) => {
|
|
60575
60575
|
t["FROM"] = "FROM";
|
|
60576
60576
|
t["TO"] = "TO";
|
|
60577
60577
|
return t;
|
|
60578
|
-
})(
|
|
60578
|
+
})(yo$1 || {});
|
|
60579
60579
|
|
|
60580
60580
|
// src/widgets/definitions/parameters/commerce.ts
|
|
60581
|
-
var
|
|
60581
|
+
var Ao$1 = /* @__PURE__ */ ((p) => {
|
|
60582
60582
|
p["CONNECT"] = "CONNECT";
|
|
60583
60583
|
p["WALLET"] = "WALLET";
|
|
60584
60584
|
p["SALE"] = "SALE";
|
|
@@ -60589,14 +60589,14 @@ var wo$1 = /* @__PURE__ */ ((p) => {
|
|
|
60589
60589
|
p["PURCHASE"] = "PURCHASE";
|
|
60590
60590
|
p["TRANSFER"] = "TRANSFER";
|
|
60591
60591
|
return p;
|
|
60592
|
-
})(
|
|
60592
|
+
})(Ao$1 || {});
|
|
60593
60593
|
|
|
60594
60594
|
// src/widgets/definitions/configurations/theme.ts
|
|
60595
|
-
var
|
|
60595
|
+
var wo$1 = /* @__PURE__ */ ((t) => {
|
|
60596
60596
|
t["LIGHT"] = "light";
|
|
60597
60597
|
t["DARK"] = "dark";
|
|
60598
60598
|
return t;
|
|
60599
|
-
})(
|
|
60599
|
+
})(wo$1 || {});
|
|
60600
60600
|
|
|
60601
60601
|
// src/errors/checkoutError.ts
|
|
60602
60602
|
var S$7 = /* @__PURE__ */ ((A) => {
|
|
@@ -60656,49 +60656,49 @@ var u$4 = class u extends Error {
|
|
|
60656
60656
|
};
|
|
60657
60657
|
|
|
60658
60658
|
// src/types/chains.ts
|
|
60659
|
-
var
|
|
60659
|
+
var J$4 = /* @__PURE__ */ ((a) => {
|
|
60660
60660
|
a[a["IMTBL_ZKEVM_MAINNET"] = 13371] = "IMTBL_ZKEVM_MAINNET";
|
|
60661
60661
|
a[a["IMTBL_ZKEVM_TESTNET"] = 13473] = "IMTBL_ZKEVM_TESTNET";
|
|
60662
60662
|
a[a["IMTBL_ZKEVM_DEVNET"] = 15003] = "IMTBL_ZKEVM_DEVNET";
|
|
60663
60663
|
a[a["ETHEREUM"] = 1] = "ETHEREUM";
|
|
60664
60664
|
a[a["SEPOLIA"] = 11155111] = "SEPOLIA";
|
|
60665
60665
|
return a;
|
|
60666
|
-
})(
|
|
60667
|
-
var
|
|
60666
|
+
})(J$4 || {});
|
|
60667
|
+
var nt$1 = /* @__PURE__ */ ((a) => {
|
|
60668
60668
|
a["ETHEREUM"] = "Ethereum";
|
|
60669
60669
|
a["SEPOLIA"] = "Sepolia";
|
|
60670
60670
|
a["IMTBL_ZKEVM_TESTNET"] = "Immutable zkEVM Testnet";
|
|
60671
60671
|
a["IMTBL_ZKEVM_DEVNET"] = "Immutable zkEVM Dev";
|
|
60672
60672
|
a["IMTBL_ZKEVM_MAINNET"] = "Immutable zkEVM";
|
|
60673
60673
|
return a;
|
|
60674
|
-
})(
|
|
60675
|
-
var
|
|
60674
|
+
})(nt$1 || {});
|
|
60675
|
+
var we$3 = /* @__PURE__ */ ((a) => {
|
|
60676
60676
|
a["ETHEREUM"] = "ethereum";
|
|
60677
60677
|
a["SEPOLIA"] = "sepolia";
|
|
60678
60678
|
a["IMTBL_ZKEVM_MAINNET"] = "imtbl-zkevm-mainnet";
|
|
60679
60679
|
a["IMTBL_ZKEVM_TESTNET"] = "imtbl-zkevm-testnet";
|
|
60680
60680
|
a["IMTBL_ZKEVM_DEVNET"] = "imtbl-zkevm-devnet";
|
|
60681
60681
|
return a;
|
|
60682
|
-
})(
|
|
60682
|
+
})(we$3 || {});
|
|
60683
60683
|
|
|
60684
60684
|
// src/env/constants.ts
|
|
60685
|
-
var
|
|
60685
|
+
var Y$3 = "development";
|
|
60686
60686
|
var j$6 = 18;
|
|
60687
60687
|
var x$4 = "native";
|
|
60688
|
-
var
|
|
60688
|
+
var ke$3 = {
|
|
60689
60689
|
name: "IMX",
|
|
60690
60690
|
symbol: "IMX",
|
|
60691
60691
|
decimals: j$6,
|
|
60692
60692
|
address: x$4
|
|
60693
60693
|
};
|
|
60694
|
-
var
|
|
60694
|
+
var vo$1 = {
|
|
60695
60695
|
name: "tIMX",
|
|
60696
60696
|
symbol: "tIMX",
|
|
60697
60697
|
decimals: j$6,
|
|
60698
60698
|
address: x$4
|
|
60699
60699
|
};
|
|
60700
60700
|
var q$6 = {
|
|
60701
|
-
[
|
|
60701
|
+
[Y$3]: "https://api.dev.immutable.com",
|
|
60702
60702
|
[K$7.SANDBOX]: "https://api.sandbox.immutable.com",
|
|
60703
60703
|
[K$7.PRODUCTION]: "https://api.immutable.com"
|
|
60704
60704
|
};
|
|
@@ -60723,11 +60723,11 @@ var Pe$3 = /* @__PURE__ */ new Map([
|
|
|
60723
60723
|
chainIdHex: `0x${13371 .toString(16)}`,
|
|
60724
60724
|
chainName: "Immutable zkEVM",
|
|
60725
60725
|
rpcUrls: ["https://rpc.immutable.com"],
|
|
60726
|
-
nativeCurrency:
|
|
60726
|
+
nativeCurrency: ke$3
|
|
60727
60727
|
}
|
|
60728
60728
|
]
|
|
60729
60729
|
]);
|
|
60730
|
-
var
|
|
60730
|
+
var Se$3 = /* @__PURE__ */ new Map([
|
|
60731
60731
|
[
|
|
60732
60732
|
11155111,
|
|
60733
60733
|
{
|
|
@@ -60750,14 +60750,14 @@ var we$3 = /* @__PURE__ */ new Map([
|
|
|
60750
60750
|
chainIdHex: `0x${13473 .toString(16)}`,
|
|
60751
60751
|
chainName: "Immutable zkEVM Testnet",
|
|
60752
60752
|
rpcUrls: ["https://rpc.testnet.immutable.com"],
|
|
60753
|
-
nativeCurrency:
|
|
60753
|
+
nativeCurrency: vo$1
|
|
60754
60754
|
}
|
|
60755
60755
|
]
|
|
60756
60756
|
]);
|
|
60757
60757
|
var oe$5 = {
|
|
60758
60758
|
[13473]: {
|
|
60759
60759
|
url: "https://explorer.testnet.immutable.com",
|
|
60760
|
-
nativeToken:
|
|
60760
|
+
nativeToken: Se$3.get(13473).nativeCurrency
|
|
60761
60761
|
},
|
|
60762
60762
|
[13371]: {
|
|
60763
60763
|
url: "https://explorer.immutable.com",
|
|
@@ -60765,7 +60765,7 @@ var oe$5 = {
|
|
|
60765
60765
|
},
|
|
60766
60766
|
[11155111]: {
|
|
60767
60767
|
url: "https://eth-sepolia.blockscout.com",
|
|
60768
|
-
nativeToken:
|
|
60768
|
+
nativeToken: Se$3.get(11155111).nativeCurrency
|
|
60769
60769
|
},
|
|
60770
60770
|
[1]: {
|
|
60771
60771
|
url: "https://eth.blockscout.com/",
|
|
@@ -60778,17 +60778,17 @@ var oe$5 = {
|
|
|
60778
60778
|
});
|
|
60779
60779
|
|
|
60780
60780
|
// src/types/gasEstimate.ts
|
|
60781
|
-
var
|
|
60781
|
+
var st$1 = /* @__PURE__ */ ((t) => {
|
|
60782
60782
|
t["BRIDGE_TO_L2"] = "BRIDGE_TO_L2";
|
|
60783
60783
|
t["SWAP"] = "SWAP";
|
|
60784
60784
|
return t;
|
|
60785
|
-
})(
|
|
60785
|
+
})(st$1 || {});
|
|
60786
60786
|
|
|
60787
60787
|
// src/types/network.ts
|
|
60788
|
-
var
|
|
60788
|
+
var ge$4 = /* @__PURE__ */ ((e) => {
|
|
60789
60789
|
e["ALL"] = "all";
|
|
60790
60790
|
return e;
|
|
60791
|
-
})(
|
|
60791
|
+
})(ge$4 || {});
|
|
60792
60792
|
|
|
60793
60793
|
// src/types/token.ts
|
|
60794
60794
|
var ae$3 = /* @__PURE__ */ ((n) => {
|
|
@@ -60798,18 +60798,18 @@ var ae$3 = /* @__PURE__ */ ((n) => {
|
|
|
60798
60798
|
n["ONRAMP"] = "onramp";
|
|
60799
60799
|
return n;
|
|
60800
60800
|
})(ae$3 || {});
|
|
60801
|
-
var
|
|
60801
|
+
var fe$4 = /* @__PURE__ */ ((o) => {
|
|
60802
60802
|
o["PASSPORT"] = "passport";
|
|
60803
60803
|
o["METAMASK"] = "metamask";
|
|
60804
60804
|
o["WALLETCONNECT"] = "walletconnect";
|
|
60805
60805
|
return o;
|
|
60806
|
-
})(
|
|
60807
|
-
var
|
|
60806
|
+
})(fe$4 || {});
|
|
60807
|
+
var qt$2 = /* @__PURE__ */ ((o) => {
|
|
60808
60808
|
o["PASSPORT"] = "com.immutable.passport";
|
|
60809
60809
|
o["METAMASK"] = "io.metamask";
|
|
60810
60810
|
o["WALLETCONNECT"] = "walletconnect";
|
|
60811
60811
|
return o;
|
|
60812
|
-
})(
|
|
60812
|
+
})(qt$2 || {});
|
|
60813
60813
|
var D$6 = class D extends BrowserProvider {
|
|
60814
60814
|
ethereumProvider;
|
|
60815
60815
|
// eslint-disable-next-line max-len
|
|
@@ -60831,39 +60831,39 @@ var M$7 = /* @__PURE__ */ ((n) => {
|
|
|
60831
60831
|
n["ERC1155"] = "ERC1155";
|
|
60832
60832
|
return n;
|
|
60833
60833
|
})(M$7 || {});
|
|
60834
|
-
var
|
|
60834
|
+
var Re$4 = /* @__PURE__ */ ((t) => {
|
|
60835
60835
|
t["TRANSACTION"] = "TRANSACTION";
|
|
60836
60836
|
t["GAS"] = "GAS";
|
|
60837
60837
|
return t;
|
|
60838
|
-
})(
|
|
60839
|
-
var
|
|
60838
|
+
})(Re$4 || {});
|
|
60839
|
+
var Ce$3 = /* @__PURE__ */ ((t) => {
|
|
60840
60840
|
t["NATIVE"] = "NATIVE";
|
|
60841
60841
|
t["ERC20"] = "ERC20";
|
|
60842
60842
|
return t;
|
|
60843
|
-
})(
|
|
60844
|
-
var
|
|
60843
|
+
})(Ce$3 || {});
|
|
60844
|
+
var ct$1 = /* @__PURE__ */ ((o) => {
|
|
60845
60845
|
o["ROUTES_FOUND"] = "ROUTES_FOUND";
|
|
60846
60846
|
o["NO_ROUTES_FOUND"] = "NO_ROUTES_FOUND";
|
|
60847
60847
|
o["NO_ROUTE_OPTIONS"] = "NO_ROUTE_OPTIONS";
|
|
60848
60848
|
return o;
|
|
60849
|
-
})(
|
|
60850
|
-
var
|
|
60849
|
+
})(ct$1 || {});
|
|
60850
|
+
var Te$1 = /* @__PURE__ */ ((o) => {
|
|
60851
60851
|
o["BRIDGE"] = "BRIDGE";
|
|
60852
60852
|
o["SWAP"] = "SWAP";
|
|
60853
60853
|
o["ONRAMP"] = "ONRAMP";
|
|
60854
60854
|
return o;
|
|
60855
|
-
})(
|
|
60855
|
+
})(Te$1 || {});
|
|
60856
60856
|
|
|
60857
60857
|
// src/types/fiatRamp.ts
|
|
60858
|
-
var
|
|
60858
|
+
var Vt$1 = /* @__PURE__ */ ((e) => {
|
|
60859
60859
|
e["ONRAMP"] = "onramp";
|
|
60860
60860
|
return e;
|
|
60861
|
-
})(
|
|
60861
|
+
})(Vt$1 || {});
|
|
60862
60862
|
|
|
60863
60863
|
// src/gasEstimate/gasPriceInWei.ts
|
|
60864
|
-
var
|
|
60865
|
-
var
|
|
60866
|
-
if (
|
|
60864
|
+
var pn = (r) => !!r.maxFeePerGas && !!r.maxPriorityFeePerGas;
|
|
60865
|
+
var Ct$2 = (r) => {
|
|
60866
|
+
if (pn(r)) {
|
|
60867
60867
|
const { maxFeePerGas: e, maxPriorityFeePerGas: t } = r;
|
|
60868
60868
|
if (e === null || t === null) return null;
|
|
60869
60869
|
const o = (e - t) / BigInt(2);
|
|
@@ -60874,29 +60874,29 @@ var Rt$1 = (r) => {
|
|
|
60874
60874
|
};
|
|
60875
60875
|
|
|
60876
60876
|
// src/provider/providerDetail.ts
|
|
60877
|
-
var
|
|
60877
|
+
var De$3 = {
|
|
60878
60878
|
name: "MetaMask",
|
|
60879
60879
|
rdns: "io.metamask",
|
|
60880
60880
|
// eslint-disable-next-line max-len
|
|
60881
60881
|
icon: "data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjMzIiB2aWV3Qm94PSIwIDAgMzUgMzMiIHdpZHRoPSIzNSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iLjI1Ij48cGF0aCBkPSJtMzIuOTU4MiAxLTEzLjEzNDEgOS43MTgzIDIuNDQyNC01LjcyNzMxeiIgZmlsbD0iI2UxNzcyNiIgc3Ryb2tlPSIjZTE3NzI2Ii8+PGcgZmlsbD0iI2UyNzYyNSIgc3Ryb2tlPSIjZTI3NjI1Ij48cGF0aCBkPSJtMi42NjI5NiAxIDEzLjAxNzE0IDkuODA5LTIuMzI1NC01LjgxODAyeiIvPjxwYXRoIGQ9Im0yOC4yMjk1IDIzLjUzMzUtMy40OTQ3IDUuMzM4NiA3LjQ4MjkgMi4wNjAzIDIuMTQzNi03LjI4MjN6Ii8+PHBhdGggZD0ibTEuMjcyODEgMjMuNjUwMSAyLjEzMDU1IDcuMjgyMyA3LjQ2OTk0LTIuMDYwMy0zLjQ4MTY2LTUuMzM4NnoiLz48cGF0aCBkPSJtMTAuNDcwNiAxNC41MTQ5LTIuMDc4NiAzLjEzNTggNy40MDUuMzM2OS0uMjQ2OS03Ljk2OXoiLz48cGF0aCBkPSJtMjUuMTUwNSAxNC41MTQ5LTUuMTU3NS00LjU4NzA0LS4xNjg4IDguMDU5NzQgNy40MDQ5LS4zMzY5eiIvPjxwYXRoIGQ9Im0xMC44NzMzIDI4Ljg3MjEgNC40ODE5LTIuMTYzOS0zLjg1ODMtMy4wMDYyeiIvPjxwYXRoIGQ9Im0yMC4yNjU5IDI2LjcwODIgNC40Njg5IDIuMTYzOS0uNjEwNS01LjE3MDF6Ii8+PC9nPjxwYXRoIGQ9Im0yNC43MzQ4IDI4Ljg3MjEtNC40NjktMi4xNjM5LjM2MzggMi45MDI1LS4wMzkgMS4yMzF6IiBmaWxsPSIjZDViZmIyIiBzdHJva2U9IiNkNWJmYjIiLz48cGF0aCBkPSJtMTAuODczMiAyOC44NzIxIDQuMTU3MiAxLjk2OTYtLjAyNi0xLjIzMS4zNTA4LTIuOTAyNXoiIGZpbGw9IiNkNWJmYjIiIHN0cm9rZT0iI2Q1YmZiMiIvPjxwYXRoIGQ9Im0xNS4xMDg0IDIxLjc4NDItMy43MTU1LTEuMDg4NCAyLjYyNDMtMS4yMDUxeiIgZmlsbD0iIzIzMzQ0NyIgc3Ryb2tlPSIjMjMzNDQ3Ii8+PHBhdGggZD0ibTIwLjUxMjYgMjEuNzg0MiAxLjA5MTMtMi4yOTM1IDIuNjM3MiAxLjIwNTF6IiBmaWxsPSIjMjMzNDQ3IiBzdHJva2U9IiMyMzM0NDciLz48cGF0aCBkPSJtMTAuODczMyAyOC44NzIxLjY0OTUtNS4zMzg2LTQuMTMxMTcuMTE2N3oiIGZpbGw9IiNjYzYyMjgiIHN0cm9rZT0iI2NjNjIyOCIvPjxwYXRoIGQ9Im0yNC4wOTgyIDIzLjUzMzUuNjM2NiA1LjMzODYgMy40OTQ2LTUuMjIxOXoiIGZpbGw9IiNjYzYyMjgiIHN0cm9rZT0iI2NjNjIyOCIvPjxwYXRoIGQ9Im0yNy4yMjkxIDE3LjY1MDctNy40MDUuMzM2OS42ODg1IDMuNzk2NiAxLjA5MTMtMi4yOTM1IDIuNjM3MiAxLjIwNTF6IiBmaWxsPSIjY2M2MjI4IiBzdHJva2U9IiNjYzYyMjgiLz48cGF0aCBkPSJtMTEuMzkyOSAyMC42OTU4IDIuNjI0Mi0xLjIwNTEgMS4wOTEzIDIuMjkzNS42ODg1LTMuNzk2Ni03LjQwNDk1LS4zMzY5eiIgZmlsbD0iI2NjNjIyOCIgc3Ryb2tlPSIjY2M2MjI4Ii8+PHBhdGggZD0ibTguMzkyIDE3LjY1MDcgMy4xMDQ5IDYuMDUxMy0uMTAzOS0zLjAwNjJ6IiBmaWxsPSIjZTI3NTI1IiBzdHJva2U9IiNlMjc1MjUiLz48cGF0aCBkPSJtMjQuMjQxMiAyMC42OTU4LS4xMTY5IDMuMDA2MiAzLjEwNDktNi4wNTEzeiIgZmlsbD0iI2UyNzUyNSIgc3Ryb2tlPSIjZTI3NTI1Ii8+PHBhdGggZD0ibTE1Ljc5NyAxNy45ODc2LS42ODg2IDMuNzk2Ny44NzA0IDQuNDgzMy4xOTQ5LTUuOTA4N3oiIGZpbGw9IiNlMjc1MjUiIHN0cm9rZT0iI2UyNzUyNSIvPjxwYXRoIGQ9Im0xOS44MjQyIDE3Ljk4NzYtLjM2MzggMi4zNTg0LjE4MTkgNS45MjE2Ljg3MDQtNC40ODMzeiIgZmlsbD0iI2UyNzUyNSIgc3Ryb2tlPSIjZTI3NTI1Ii8+PHBhdGggZD0ibTIwLjUxMjcgMjEuNzg0Mi0uODcwNCA0LjQ4MzQuNjIzNi40NDA2IDMuODU4NC0zLjAwNjIuMTE2OS0zLjAwNjJ6IiBmaWxsPSIjZjU4NDFmIiBzdHJva2U9IiNmNTg0MWYiLz48cGF0aCBkPSJtMTEuMzkyOSAyMC42OTU4LjEwNCAzLjAwNjIgMy44NTgzIDMuMDA2Mi42MjM2LS40NDA2LS44NzA0LTQuNDgzNHoiIGZpbGw9IiNmNTg0MWYiIHN0cm9rZT0iI2Y1ODQxZiIvPjxwYXRoIGQ9Im0yMC41OTA2IDMwLjg0MTcuMDM5LTEuMjMxLS4zMzc4LS4yODUxaC00Ljk2MjZsLS4zMjQ4LjI4NTEuMDI2IDEuMjMxLTQuMTU3Mi0xLjk2OTYgMS40NTUxIDEuMTkyMSAyLjk0ODkgMi4wMzQ0aDUuMDUzNmwyLjk2Mi0yLjAzNDQgMS40NDItMS4xOTIxeiIgZmlsbD0iI2MwYWM5ZCIgc3Ryb2tlPSIjYzBhYzlkIi8+PHBhdGggZD0ibTIwLjI2NTkgMjYuNzA4Mi0uNjIzNi0uNDQwNmgtMy42NjM1bC0uNjIzNi40NDA2LS4zNTA4IDIuOTAyNS4zMjQ4LS4yODUxaDQuOTYyNmwuMzM3OC4yODUxeiIgZmlsbD0iIzE2MTYxNiIgc3Ryb2tlPSIjMTYxNjE2Ii8+PHBhdGggZD0ibTMzLjUxNjggMTEuMzUzMiAxLjEwNDMtNS4zNjQ0Ny0xLjY2MjktNC45ODg3My0xMi42OTIzIDkuMzk0NCA0Ljg4NDYgNC4xMjA1IDYuODk4MyAyLjAwODUgMS41Mi0xLjc3NTItLjY2MjYtLjQ3OTUgMS4wNTIzLS45NTg4LS44MDU0LS42MjIgMS4wNTIzLS44MDM0eiIgZmlsbD0iIzc2M2UxYSIgc3Ryb2tlPSIjNzYzZTFhIi8+PHBhdGggZD0ibTEgNS45ODg3MyAxLjExNzI0IDUuMzY0NDctLjcxNDUxLjUzMTMgMS4wNjUyNy44MDM0LS44MDU0NS42MjIgMS4wNTIyOC45NTg4LS42NjI1NS40Nzk1IDEuNTE5OTcgMS43NzUyIDYuODk4MzUtMi4wMDg1IDQuODg0Ni00LjEyMDUtMTIuNjkyMzMtOS4zOTQ0eiIgZmlsbD0iIzc2M2UxYSIgc3Ryb2tlPSIjNzYzZTFhIi8+PHBhdGggZD0ibTMyLjA0ODkgMTYuNTIzNC02Ljg5ODMtMi4wMDg1IDIuMDc4NiAzLjEzNTgtMy4xMDQ5IDYuMDUxMyA0LjEwNTItLjA1MTloNi4xMzE4eiIgZmlsbD0iI2Y1ODQxZiIgc3Ryb2tlPSIjZjU4NDFmIi8+PHBhdGggZD0ibTEwLjQ3MDUgMTQuNTE0OS02Ljg5ODI4IDIuMDA4NS0yLjI5OTQ0IDcuMTI2N2g2LjExODgzbDQuMTA1MTkuMDUxOS0zLjEwNDg3LTYuMDUxM3oiIGZpbGw9IiNmNTg0MWYiIHN0cm9rZT0iI2Y1ODQxZiIvPjxwYXRoIGQ9Im0xOS44MjQxIDE3Ljk4NzYuNDQxNy03LjU5MzIgMi4wMDA3LTUuNDAzNGgtOC45MTE5bDIuMDAwNiA1LjQwMzQuNDQxNyA3LjU5MzIuMTY4OSAyLjM4NDIuMDEzIDUuODk1OGgzLjY2MzVsLjAxMy01Ljg5NTh6IiBmaWxsPSIjZjU4NDFmIiBzdHJva2U9IiNmNTg0MWYiLz48L2c+PC9zdmc+",
|
|
60882
60882
|
uuid: "fb8e904e-1a71-454a-af65-dc1ee86311c3"
|
|
60883
60883
|
};
|
|
60884
|
-
var
|
|
60884
|
+
var We$5 = {
|
|
60885
60885
|
// eslint-disable-next-line max-len
|
|
60886
60886
|
icon: 'data:image/svg+xml,<svg viewBox="0 0 48 48" class="SvgIcon undefined Logo Logo--PassportSymbolOutlined css-1dn9atd" xmlns="http://www.w3.org/2000/svg"><g data-testid="undefined__g"><circle cx="24" cy="24" r="22.5" fill="url(%23paint0_radial_6324_83922)"></circle><circle cx="24" cy="24" r="22.5" fill="url(%23paint1_radial_6324_83922)"></circle><path d="M24 0C10.7452 0 0 10.7452 0 24C0 37.2548 10.7452 48 24 48C37.2548 48 48 37.2548 48 24C48 10.7452 37.2548 0 24 0ZM23.0718 9.16608C23.7383 8.83951 24.4406 8.86188 25.087 9.2287C27.3282 10.5059 29.5627 11.7942 31.786 13.096C32.5018 13.5165 32.8686 14.1897 32.8708 15.0173C32.8843 17.9184 32.8798 20.8171 32.8708 23.7182C32.8708 23.8255 32.8015 23.9821 32.7143 24.0335C31.8531 24.548 30.9808 25.0423 30.0347 25.5881V25.1318C30.0347 22.148 30.0257 19.1664 30.0414 16.1827C30.0436 15.6101 29.8468 15.241 29.339 14.9525C26.7377 13.474 24.1499 11.9687 21.5575 10.4723C21.4457 10.4075 21.3361 10.3381 21.1661 10.2352C21.8326 9.85722 22.4321 9.47698 23.0673 9.16608H23.0718ZM22.5953 38.8451C22.45 38.7713 22.3426 38.7198 22.2375 38.6595C18.8041 36.68 15.3752 34.687 11.9307 32.7232C10.9644 32.173 10.5238 31.3879 10.5349 30.2852C10.5551 27.9411 10.5484 25.597 10.5372 23.2507C10.5327 22.1927 10.9622 21.4255 11.8926 20.8977C14.3105 19.5221 16.715 18.1264 19.1195 16.7284C19.3275 16.6076 19.4796 16.5875 19.6965 16.7172C20.5264 17.216 21.3719 17.6924 22.2554 18.2024C22.0876 18.3031 21.9601 18.3791 21.8304 18.4552C19.2268 19.9582 16.6278 21.4658 14.0175 22.9599C13.5903 23.2037 13.3912 23.5213 13.3957 24.0179C13.4091 25.8654 13.4114 27.713 13.3957 29.5605C13.3912 30.0705 13.5948 30.3948 14.0332 30.6453C16.7866 32.2199 19.5288 33.8125 22.28 35.3916C22.5126 35.5258 22.611 35.6645 22.6065 35.9418C22.5864 36.888 22.5998 37.8363 22.5998 38.8473L22.5953 38.8451ZM22.5953 33.553C22.356 33.4166 22.1838 33.3204 22.0116 33.2198C19.8285 31.9605 17.6477 30.6967 15.4602 29.4464C15.2231 29.3122 15.1359 29.1668 15.1381 28.8917C15.1538 27.4714 15.1471 26.0511 15.1426 24.6308C15.1426 24.4384 15.1717 24.3064 15.3618 24.1991C16.167 23.7495 16.9633 23.2798 17.7618 22.8212C17.8199 22.7877 17.8826 22.7631 17.9877 22.7116V24.3064C17.9877 25.1698 18.0011 26.0354 17.9832 26.8988C17.972 27.3909 18.1622 27.7241 18.5916 27.9657C19.8285 28.6636 21.0498 29.3883 22.2867 30.0839C22.5305 30.2203 22.6043 30.3724 22.5998 30.6408C22.5842 31.5847 22.5931 32.5308 22.5931 33.5508L22.5953 33.553ZM20.0746 14.91C19.6116 14.6371 19.2157 14.6393 18.7527 14.91C16.1581 16.4265 13.5523 17.9228 10.9487 19.4259C10.8391 19.4908 10.7251 19.5489 10.5305 19.6541C10.5998 18.6654 10.3873 17.7327 10.7251 16.8291C10.9085 16.3348 11.2529 15.9635 11.7092 15.6995C13.8811 14.4447 16.0507 13.1877 18.227 11.9396C19.0211 11.4833 19.8308 11.4945 20.6248 11.953C23.0964 13.3756 25.5657 14.8026 28.0306 16.2341C28.1357 16.2945 28.2677 16.4309 28.2677 16.5338C28.2856 17.5493 28.2788 18.567 28.2788 19.6563C27.3819 19.1396 26.5543 18.6609 25.7267 18.1823C23.8412 17.093 21.9512 16.0149 20.0746 14.91ZM37.4427 30.8779C37.3778 31.6764 36.9103 32.2423 36.2192 32.6404C33.5732 34.1614 30.9294 35.6913 28.2856 37.2168C27.4557 37.6954 26.6259 38.1741 25.7938 38.6527C25.6932 38.7109 25.5903 38.7601 25.4539 38.8317C25.4449 38.693 25.4337 38.5924 25.4337 38.4917C25.4337 37.6149 25.4382 36.7404 25.4293 35.8636C25.4293 35.6645 25.4762 35.5437 25.6596 35.4386C29.5157 33.2198 33.3696 30.9942 37.2212 28.7709C37.2794 28.7374 37.3443 28.7105 37.4539 28.6591C37.4539 29.4375 37.4986 30.1622 37.4427 30.8779ZM37.4628 25.3577C37.4561 26.2658 36.9663 26.9033 36.1901 27.3506C33.175 29.0841 30.1622 30.8265 27.1493 32.5666C26.5991 32.8842 26.0466 33.1996 25.4561 33.5396C25.4472 33.3897 25.436 33.2913 25.436 33.1907C25.436 32.3273 25.4449 31.4617 25.4293 30.5983C25.4248 30.3523 25.5075 30.2226 25.72 30.0995C28.46 28.5271 31.1911 26.9368 33.9355 25.3733C34.4231 25.096 34.6378 24.7538 34.6334 24.1812C34.6132 21.1974 34.6244 18.2136 34.6244 15.2298V14.7087C35.3402 15.1404 36.0112 15.496 36.624 15.9299C37.1832 16.3258 37.465 16.9253 37.4673 17.6164C37.4762 20.1976 37.4829 22.7788 37.465 25.3599L37.4628 25.3577Z" fill="%230D0D0D"></path><path fill-rule="evenodd" d="M24 0C10.7452 0 0 10.7452 0 24C0 37.2548 10.7452 48 24 48C37.2548 48 48 37.2548 48 24C48 10.7452 37.2548 0 24 0ZM24 2C11.8497 2 2 11.8497 2 24C2 36.1503 11.8497 46 24 46C36.1503 46 46 36.1503 46 24C46 11.8497 36.1503 2 24 2Z" fill="url(%23paint2_radial_6324_83922)"></path><path fill-rule="evenodd" d="M24 0C10.7452 0 0 10.7452 0 24C0 37.2548 10.7452 48 24 48C37.2548 48 48 37.2548 48 24C48 10.7452 37.2548 0 24 0ZM24 2C11.8497 2 2 11.8497 2 24C2 36.1503 11.8497 46 24 46C36.1503 46 46 36.1503 46 24C46 11.8497 36.1503 2 24 2Z" fill="url(%23paint3_radial_6324_83922)"></path><defs><radialGradient id="paint0_radial_6324_83922" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(13.4442 13.3899) rotate(44.9817) scale(46.7487 99.1435)"><stop stop-color="%23A3EEF8"></stop><stop offset="0.177083" stop-color="%23A4DCF5"></stop><stop offset="0.380208" stop-color="%23A6AEEC"></stop><stop offset="1" stop-color="%23ECBEE1"></stop></radialGradient><radialGradient id="paint1_radial_6324_83922" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(25.9515 43.7068) rotate(84.265) scale(24.2138 46.3215)"><stop stop-color="%23FCF5EE"></stop><stop offset="0.715135" stop-color="%23ECBEE1" stop-opacity="0"></stop></radialGradient><radialGradient id="paint2_radial_6324_83922" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(12.7405 12.6825) rotate(44.9817) scale(49.8653 105.753)"><stop stop-color="%23A3EEF8"></stop><stop offset="0.177083" stop-color="%23A4DCF5"></stop><stop offset="0.380208" stop-color="%23A6AEEC"></stop><stop offset="1" stop-color="%23ECBEE1"></stop></radialGradient><radialGradient id="paint3_radial_6324_83922" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(26.0816 45.0206) rotate(84.265) scale(25.828 49.4096)"><stop stop-color="%23FCF5EE"></stop><stop offset="0.715135" stop-color="%23ECBEE1" stop-opacity="0"></stop></radialGradient></defs></g></svg>',
|
|
60887
60887
|
name: "Immutable Passport",
|
|
60888
60888
|
rdns: "com.immutable.passport",
|
|
60889
60889
|
uuid: "b90118be-7234-4c89-b89b-d5d267663eb5"
|
|
60890
60890
|
};
|
|
60891
|
-
var
|
|
60892
|
-
info:
|
|
60891
|
+
var mn = (r) => ({
|
|
60892
|
+
info: We$5,
|
|
60893
60893
|
provider: r
|
|
60894
60894
|
});
|
|
60895
|
-
var
|
|
60896
|
-
info:
|
|
60895
|
+
var gn = (r) => ({
|
|
60896
|
+
info: De$3,
|
|
60897
60897
|
provider: r
|
|
60898
60898
|
});
|
|
60899
|
-
var
|
|
60899
|
+
var Ot$2 = async (r, e) => {
|
|
60900
60900
|
const t = Object.fromEntries(
|
|
60901
60901
|
r.map((n) => [n.toLowerCase(), { sanctioned: false }])
|
|
60902
60902
|
);
|
|
@@ -60923,12 +60923,12 @@ var _t$1 = async (r, e) => {
|
|
|
60923
60923
|
return t;
|
|
60924
60924
|
}
|
|
60925
60925
|
};
|
|
60926
|
-
var
|
|
60926
|
+
var xt$1 = (r, e) => {
|
|
60927
60927
|
return Object.values(r).some((t) => t.sanctioned);
|
|
60928
60928
|
};
|
|
60929
60929
|
|
|
60930
60930
|
// src/blockExplorer/blockExplorer.ts
|
|
60931
|
-
var
|
|
60931
|
+
var tt$1 = class tt {
|
|
60932
60932
|
/**
|
|
60933
60933
|
* Returns the link to the transaction on Blockscout.
|
|
60934
60934
|
* @param {ChainId} chainId - The chain ID of the network
|
|
@@ -69516,7 +69516,7 @@ const DEFAULT_ENV = K$7.SANDBOX;
|
|
|
69516
69516
|
/**
|
|
69517
69517
|
* Commerce Widget default theme
|
|
69518
69518
|
*/
|
|
69519
|
-
const DEFAULT_THEME$1 =
|
|
69519
|
+
const DEFAULT_THEME$1 = wo$1.DARK;
|
|
69520
69520
|
/**
|
|
69521
69521
|
* Commerce Widget default onramp enabled flag
|
|
69522
69522
|
*/
|
|
@@ -69563,29 +69563,6 @@ const PASSPORT_URL = {
|
|
|
69563
69563
|
};
|
|
69564
69564
|
const WITHDRAWAL_CLAIM_GAS_LIMIT = 91000;
|
|
69565
69565
|
|
|
69566
|
-
// **************************************************** //
|
|
69567
|
-
// **************************************************** //
|
|
69568
|
-
// This is duplicated in the sdk project. //
|
|
69569
|
-
// We are not exposing these functions given that this //
|
|
69570
|
-
// to keep the Checkout SDK interface as minimal as //
|
|
69571
|
-
// possible. //
|
|
69572
|
-
// **************************************************** //
|
|
69573
|
-
const getL1ChainId = (config) => {
|
|
69574
|
-
// DevMode and Sandbox will both use Sepolia.
|
|
69575
|
-
if (!config.isProduction)
|
|
69576
|
-
return Y$3.SEPOLIA;
|
|
69577
|
-
return Y$3.ETHEREUM;
|
|
69578
|
-
};
|
|
69579
|
-
const getL2ChainId = (config) => {
|
|
69580
|
-
if (config.isDevelopment)
|
|
69581
|
-
return Y$3.IMTBL_ZKEVM_DEVNET;
|
|
69582
|
-
if (config.isProduction)
|
|
69583
|
-
return Y$3.IMTBL_ZKEVM_MAINNET;
|
|
69584
|
-
return Y$3.IMTBL_ZKEVM_TESTNET;
|
|
69585
|
-
};
|
|
69586
|
-
// **************************************************** //
|
|
69587
|
-
// **************************************************** //
|
|
69588
|
-
|
|
69589
69566
|
const baseWidgetProviderEvent = 'IMTBL_WIDGET_PROVIDER_EVENT';
|
|
69590
69567
|
// as per EIP-1193 spec
|
|
69591
69568
|
var ProviderEvent;
|
|
@@ -69620,9 +69597,9 @@ function addProviderListenersForWidgetRoot(provider) {
|
|
|
69620
69597
|
}
|
|
69621
69598
|
|
|
69622
69599
|
function sendProviderUpdatedEvent(eventData) {
|
|
69623
|
-
const providerUpdatedEvent = new CustomEvent(
|
|
69600
|
+
const providerUpdatedEvent = new CustomEvent(ro$1.IMTBL_WIDGETS_PROVIDER, {
|
|
69624
69601
|
detail: {
|
|
69625
|
-
type:
|
|
69602
|
+
type: oo$1.PROVIDER_UPDATED,
|
|
69626
69603
|
data: eventData,
|
|
69627
69604
|
},
|
|
69628
69605
|
});
|
|
@@ -69886,7 +69863,7 @@ function snapshot(proxyObject, handlePromise) {
|
|
|
69886
69863
|
|
|
69887
69864
|
const o$3=proxy({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),T$5={state:o$3,subscribe(e){return subscribe(o$3,()=>e(o$3))},push(e,t){e!==o$3.view&&(o$3.view=e,t&&(o$3.data=t),o$3.history.push(e));},reset(e){o$3.view=e,o$3.history=[e];},replace(e){o$3.history.length>1&&(o$3.history[o$3.history.length-1]=e,o$3.view=e);},goBack(){if(o$3.history.length>1){o$3.history.pop();const[e]=o$3.history.slice(-1);o$3.view=e;}},setData(e){o$3.data=e;}},a$3={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<"u"?Boolean(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return a$3.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const e=navigator.userAgent.toLowerCase();return a$3.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl(e){return e.startsWith("http://")||e.startsWith("https://")},isArray(e){return Array.isArray(e)&&e.length>0},formatNativeUrl(e,t,s){if(a$3.isHttpUrl(e))return this.formatUniversalUrl(e,t,s);let n=e;n.includes("://")||(n=e.replaceAll("/","").replaceAll(":",""),n=`${n}://`),n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,s);const i=encodeURIComponent(t);return `${n}wc?uri=${i}`},formatUniversalUrl(e,t,s){if(!a$3.isHttpUrl(e))return this.formatNativeUrl(e,t,s);let n=e;n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,s);const i=encodeURIComponent(t);return `${n}wc?uri=${i}`},async wait(e){return new Promise(t=>{setTimeout(t,e);})},openHref(e,t){window.open(e,t,"noreferrer noopener");},setWalletConnectDeepLink(e,t){try{localStorage.setItem(a$3.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}));}catch{console.info("Unable to set WalletConnect deep link");}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split("?");localStorage.setItem(a$3.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}));}catch{console.info("Unable to set WalletConnect android deep link");}},removeWalletConnectDeepLink(){try{localStorage.removeItem(a$3.WALLETCONNECT_DEEPLINK_CHOICE);}catch{console.info("Unable to remove WalletConnect deep link");}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(a$3.WCM_VERSION,"2.6.2");}catch{console.info("Unable to set Web3Modal version in storage");}},getWalletRouterData(){var e;const t=(e=T$5.state.data)==null?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},_$2=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),r$4=proxy({enabled:_$2,userSessionId:"",events:[],connectedWalletId:void 0}),R$2={state:r$4,subscribe(e){return subscribe(r$4.events,()=>e(snapshot(r$4.events[r$4.events.length-1])))},initialize(){r$4.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<"u"&&(r$4.userSessionId=crypto.randomUUID());},setConnectedWalletId(e){r$4.connectedWalletId=e;},click(e){if(r$4.enabled){const t={type:"CLICK",name:e.name,userSessionId:r$4.userSessionId,timestamp:Date.now(),data:e};r$4.events.push(t);}},track(e){if(r$4.enabled){const t={type:"TRACK",name:e.name,userSessionId:r$4.userSessionId,timestamp:Date.now(),data:e};r$4.events.push(t);}},view(e){if(r$4.enabled){const t={type:"VIEW",name:e.name,userSessionId:r$4.userSessionId,timestamp:Date.now(),data:e};r$4.events.push(t);}}},c$4=proxy({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),p$9={state:c$4,subscribe(e){return subscribe(c$4,()=>e(c$4))},setChains(e){c$4.chains=e;},setWalletConnectUri(e){c$4.walletConnectUri=e;},setIsCustomDesktop(e){c$4.isCustomDesktop=e;},setIsCustomMobile(e){c$4.isCustomMobile=e;},setIsDataLoaded(e){c$4.isDataLoaded=e;},setIsUiLoaded(e){c$4.isUiLoaded=e;},setIsAuth(e){c$4.isAuth=e;}},W$2=proxy({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),y$8={state:W$2,subscribe(e){return subscribe(W$2,()=>e(W$2))},setConfig(e){var t,s;R$2.initialize(),p$9.setChains(e.chains),p$9.setIsAuth(Boolean(e.enableAuthMode)),p$9.setIsCustomMobile(Boolean((t=e.mobileWallets)==null?void 0:t.length)),p$9.setIsCustomDesktop(Boolean((s=e.desktopWallets)==null?void 0:s.length)),a$3.setModalVersionInStorage(),Object.assign(W$2,e);}};var V$4=Object.defineProperty,D$4=Object.getOwnPropertySymbols,H$2=Object.prototype.hasOwnProperty,B$4=Object.prototype.propertyIsEnumerable,M$5=(e,t,s)=>t in e?V$4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,K$4=(e,t)=>{for(var s in t||(t={}))H$2.call(t,s)&&M$5(e,s,t[s]);if(D$4)for(var s of D$4(t))B$4.call(t,s)&&M$5(e,s,t[s]);return e};const L$7="https://explorer-api.walletconnect.com",E$7="wcm",O$5="js-2.6.2";async function w$5(e,t){const s=K$4({sdkType:E$7,sdkVersion:O$5},t),n=new URL(e,L$7);return n.searchParams.append("projectId",y$8.state.projectId),Object.entries(s).forEach(([i,l])=>{l&&n.searchParams.append(i,String(l));}),(await fetch(n)).json()}const m$4={async getDesktopListings(e){return w$5("/w3m/v1/getDesktopListings",e)},async getMobileListings(e){return w$5("/w3m/v1/getMobileListings",e)},async getInjectedListings(e){return w$5("/w3m/v1/getInjectedListings",e)},async getAllListings(e){return w$5("/w3m/v1/getAllListings",e)},getWalletImageUrl(e){return `${L$7}/w3m/v1/getWalletImage/${e}?projectId=${y$8.state.projectId}&sdkType=${E$7}&sdkVersion=${O$5}`},getAssetImageUrl(e){return `${L$7}/w3m/v1/getAssetImage/${e}?projectId=${y$8.state.projectId}&sdkType=${E$7}&sdkVersion=${O$5}`}};var z$7=Object.defineProperty,j$5=Object.getOwnPropertySymbols,J$2=Object.prototype.hasOwnProperty,q$4=Object.prototype.propertyIsEnumerable,k$3=(e,t,s)=>t in e?z$7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,F$1=(e,t)=>{for(var s in t||(t={}))J$2.call(t,s)&&k$3(e,s,t[s]);if(j$5)for(var s of j$5(t))q$4.call(t,s)&&k$3(e,s,t[s]);return e};const N$3=a$3.isMobile(),d$5=proxy({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),te$3={state:d$5,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=y$8.state;if(e==="NONE"||t==="ALL"&&!e)return d$5.recomendedWallets;if(a$3.isArray(e)){const s={recommendedIds:e.join(",")},{listings:n}=await m$4.getAllListings(s),i=Object.values(n);i.sort((l,v)=>{const b=e.indexOf(l.id),f=e.indexOf(v.id);return b-f}),d$5.recomendedWallets=i;}else {const{chains:s,isAuth:n}=p$9.state,i=s?.join(","),l=a$3.isArray(t),v={page:1,sdks:n?"auth_v1":void 0,entries:a$3.RECOMMENDED_WALLET_AMOUNT,chains:i,version:2,excludedIds:l?t.join(","):void 0},{listings:b}=N$3?await m$4.getMobileListings(v):await m$4.getDesktopListings(v);d$5.recomendedWallets=Object.values(b);}return d$5.recomendedWallets},async getWallets(e){const t=F$1({},e),{explorerRecommendedWalletIds:s,explorerExcludedWalletIds:n}=y$8.state,{recomendedWallets:i}=d$5;if(n==="ALL")return d$5.wallets;i.length?t.excludedIds=i.map(x=>x.id).join(","):a$3.isArray(s)&&(t.excludedIds=s.join(",")),a$3.isArray(n)&&(t.excludedIds=[t.excludedIds,n].filter(Boolean).join(",")),p$9.state.isAuth&&(t.sdks="auth_v1");const{page:l,search:v}=e,{listings:b,total:f}=N$3?await m$4.getMobileListings(t):await m$4.getDesktopListings(t),A=Object.values(b),U=v?"search":"wallets";return d$5[U]={listings:[...d$5[U].listings,...A],total:f,page:l??1},{listings:A,total:f}},getWalletImageUrl(e){return m$4.getWalletImageUrl(e)},getAssetImageUrl(e){return m$4.getAssetImageUrl(e)},resetSearch(){d$5.search={listings:[],total:0,page:1};}},I$4=proxy({open:!1}),se$3={state:I$4,subscribe(e){return subscribe(I$4,()=>e(I$4))},async open(e){return new Promise(t=>{const{isUiLoaded:s,isDataLoaded:n}=p$9.state;if(a$3.removeWalletConnectDeepLink(),p$9.setWalletConnectUri(e?.uri),p$9.setChains(e?.chains),T$5.reset("ConnectWallet"),s&&n)I$4.open=!0,t();else {const i=setInterval(()=>{const l=p$9.state;l.isUiLoaded&&l.isDataLoaded&&(clearInterval(i),I$4.open=!0,t());},200);}})},close(){I$4.open=!1;}};var G$2=Object.defineProperty,$$1=Object.getOwnPropertySymbols,Q$5=Object.prototype.hasOwnProperty,X$3=Object.prototype.propertyIsEnumerable,S$5=(e,t,s)=>t in e?G$2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Y$2=(e,t)=>{for(var s in t||(t={}))Q$5.call(t,s)&&S$5(e,s,t[s]);if($$1)for(var s of $$1(t))X$3.call(t,s)&&S$5(e,s,t[s]);return e};function Z$3(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const C$6=proxy({themeMode:Z$3()?"dark":"light"}),ne$4={state:C$6,subscribe(e){return subscribe(C$6,()=>e(C$6))},setThemeConfig(e){const{themeMode:t,themeVariables:s}=e;t&&(C$6.themeMode=t),s&&(C$6.themeVariables=Y$2({},s));}},g$5=proxy({open:!1,message:"",variant:"success"}),oe$4={state:g$5,subscribe(e){return subscribe(g$5,()=>e(g$5))},openToast(e,t){g$5.open=!0,g$5.message=e,g$5.variant=t;},closeToast(){g$5.open=!1;}};
|
|
69888
69865
|
|
|
69889
|
-
let d$4 = class d{constructor(e){this.openModal=se$3.open,this.closeModal=se$3.close,this.subscribeModal=se$3.subscribe,this.setTheme=ne$4.setThemeConfig,ne$4.setThemeConfig(e),y$8.setConfig(e),this.initUi();}async initUi(){if(typeof window<"u"){await import('./index-
|
|
69866
|
+
let d$4 = class d{constructor(e){this.openModal=se$3.open,this.closeModal=se$3.close,this.subscribeModal=se$3.subscribe,this.setTheme=ne$4.setThemeConfig,ne$4.setThemeConfig(e),y$8.setConfig(e),this.initUi();}async initUi(){if(typeof window<"u"){await import('./index-qgsQUTip.js');const e=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",e),p$9.setIsUiLoaded(!0);}}};
|
|
69890
69867
|
|
|
69891
69868
|
var index$1 = /*#__PURE__*/Object.freeze({
|
|
69892
69869
|
__proto__: null,
|
|
@@ -80464,8 +80441,8 @@ const walletConnectProviderInfo = {
|
|
|
80464
80441
|
icon: 'data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDggNDgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGc+PHBhdGggZD0iTTEwLjQyMzYgMTQuODY4NkMxNy45NTA3IDcuNTIzNzcgMzAuMTY5NCA3LjUyMzc3IDM3LjY5NjQgMTQuODY4NkwzOC42MDI2IDE1Ljc1OTNDMzguOTgyNiAxNi4xMjQ0IDM4Ljk4MjYgMTYuNzIzMSAzOC42MDI2IDE3LjA4ODFMMzUuNTA0MSAyMC4xMTA4QzM1LjMxNDEgMjAuMzAwNiAzNS4wMDcxIDIwLjMwMDYgMzQuODE3MSAyMC4xMTA4TDMzLjU3NDggMTguODk4OEMyOC4zMTMyIDEzLjc3MzUgMTkuODA2OSAxMy43NzM1IDE0LjU0NTIgMTguODk4OEwxMy4yMTUyIDIwLjE5ODRDMTMuMDI1MiAyMC4zODgyIDEyLjcxODMgMjAuMzg4MiAxMi41MjgzIDIwLjE5ODRMOS40Mjk3OCAxNy4xNzU3QzkuMDQ5NzcgMTYuODEwNyA5LjA0OTc3IDE2LjIxMiA5LjQyOTc4IDE1Ljg0N0wxMC40MjM2IDE0Ljg2ODZaTTQ0LjExMjcgMjEuMTE4M0w0Ni44NzUgMjMuODA1MUM0Ny4yNTUgMjQuMTcwMSA0Ny4yNTUgMjQuNzY4OCA0Ni44NzUgMjUuMTMzOUwzNC40MzcxIDM3LjI2ODJDMzQuMDU3MSAzNy42MzMyIDMzLjQ0MzMgMzcuNjMzMiAzMy4wNzc5IDM3LjI2ODJMMjQuMjUgMjguNjUzQzI0LjE2MjMgMjguNTY1NCAyNC4wMDE2IDI4LjU2NTQgMjMuOTEzOSAyOC42NTNMMTUuMDg2IDM3LjI2ODJDMTQuNzA2IDM3LjYzMzIgMTQuMDkyMiAzNy42MzMyIDEzLjcyNjggMzcuMjY4MkwxLjI0NTAzIDI1LjEzMzlDMC44NjUwMiAyNC43Njg4IDAuODY1MDIgMjQuMTcwMSAxLjI0NTAzIDIzLjgwNTFMNC4wMDczOCAyMS4xMTgzQzQuMzg3MzkgMjAuNzUzMyA1LjAwMTI1IDIwLjc1MzMgNS4zNjY2NCAyMS4xMTgzTDE0LjE5NDUgMjkuNzMzNUMxNC4yODIyIDI5LjgyMTEgMTQuNDQyOSAyOS44MjExIDE0LjUzMDYgMjkuNzMzNUwyMy4zNTg1IDIxLjExODNDMjMuNzM4NSAyMC43NTMzIDI0LjM1MjMgMjAuNzUzMyAyNC43MTc3IDIxLjExODNMMzMuNTQ1NiAyOS43MzM1QzMzLjYzMzMgMjkuODIxMSAzMy43OTQgMjkuODIxMSAzMy44ODE3IDI5LjczMzVMNDIuNzA5NiAyMS4xMTgzQzQzLjExODggMjAuNzUzMyA0My43MzI3IDIwLjc1MzMgNDQuMTEyNyAyMS4xMTgzWiIgZmlsbD0iIzM2OEFGQSI+PC9wYXRoPjwvZz48L3N2Zz4=',
|
|
80465
80442
|
uuid: 'walletconnect',
|
|
80466
80443
|
};
|
|
80467
|
-
const testnetModalChains = [`eip155:${
|
|
80468
|
-
const productionModalChains = [`eip155:${
|
|
80444
|
+
const testnetModalChains = [`eip155:${J$4.IMTBL_ZKEVM_TESTNET}`, `eip155:${J$4.SEPOLIA}`];
|
|
80445
|
+
const productionModalChains = [`eip155:${J$4.IMTBL_ZKEVM_MAINNET}`, `eip155:${J$4.ETHEREUM}`];
|
|
80469
80446
|
const darkThemeVariables = {
|
|
80470
80447
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
80471
80448
|
'--wcm-accent-fill-color': '#F3F3F3',
|
|
@@ -80562,7 +80539,7 @@ class WalletConnectManager {
|
|
|
80562
80539
|
? productionWalletWhitelist : sandboxWalletWhitelist,
|
|
80563
80540
|
explorerExcludedWalletIds: [],
|
|
80564
80541
|
themeMode: this.theme,
|
|
80565
|
-
themeVariables: this.theme ===
|
|
80542
|
+
themeVariables: this.theme === wo$1.DARK ? darkThemeVariables : lightThemeVariables,
|
|
80566
80543
|
});
|
|
80567
80544
|
this.walletConnectModal = modal;
|
|
80568
80545
|
}
|
|
@@ -80582,21 +80559,21 @@ class WalletConnectManager {
|
|
|
80582
80559
|
C$2.init({
|
|
80583
80560
|
projectId: this.walletConnectConfig.projectId,
|
|
80584
80561
|
chains: this.environment === K$7.PRODUCTION
|
|
80585
|
-
? [
|
|
80586
|
-
: [
|
|
80562
|
+
? [J$4.ETHEREUM]
|
|
80563
|
+
: [J$4.SEPOLIA],
|
|
80587
80564
|
optionalChains: this.environment === K$7.PRODUCTION
|
|
80588
|
-
? [
|
|
80589
|
-
: [
|
|
80565
|
+
? [J$4.IMTBL_ZKEVM_MAINNET, J$4.ETHEREUM]
|
|
80566
|
+
: [J$4.IMTBL_ZKEVM_TESTNET, J$4.SEPOLIA],
|
|
80590
80567
|
showQrModal: false,
|
|
80591
80568
|
metadata: this.walletConnectConfig.metadata,
|
|
80592
80569
|
qrModalOptions: {
|
|
80593
80570
|
themeMode: this.theme,
|
|
80594
80571
|
},
|
|
80595
80572
|
rpcMap: {
|
|
80596
|
-
[
|
|
80597
|
-
[
|
|
80598
|
-
[
|
|
80599
|
-
[
|
|
80573
|
+
[J$4.ETHEREUM]: 'https://checkout-api.immutable.com/v1/rpc/eth-mainnet',
|
|
80574
|
+
[J$4.IMTBL_ZKEVM_MAINNET]: 'https://rpc.immutable.com',
|
|
80575
|
+
[J$4.SEPOLIA]: 'https://checkout-api.sandbox.immutable.com/v1/rpc/eth-sepolia',
|
|
80576
|
+
[J$4.IMTBL_ZKEVM_TESTNET]: 'https://rpc.testnet.immutable.com',
|
|
80600
80577
|
},
|
|
80601
80578
|
})
|
|
80602
80579
|
.then((wcEthereumProvider) => {
|
|
@@ -82761,7 +82738,7 @@ var m = reactDomExports;
|
|
|
82761
82738
|
function getValidTheme(theme) {
|
|
82762
82739
|
if (!theme)
|
|
82763
82740
|
return DEFAULT_THEME$1;
|
|
82764
|
-
if (!Object.values(
|
|
82741
|
+
if (!Object.values(wo$1).includes(theme))
|
|
82765
82742
|
return DEFAULT_THEME$1;
|
|
82766
82743
|
return theme;
|
|
82767
82744
|
}
|
|
@@ -82878,7 +82855,7 @@ let Base$3 = class Base {
|
|
|
82878
82855
|
this.eventHandlers.set(type, callback);
|
|
82879
82856
|
if (this.eventHandlersFunction) {
|
|
82880
82857
|
window.removeEventListener(this.eventTopic, this.eventHandlersFunction);
|
|
82881
|
-
window.removeEventListener(
|
|
82858
|
+
window.removeEventListener(ro$1.IMTBL_WIDGETS_PROVIDER, this.eventHandlersFunction);
|
|
82882
82859
|
}
|
|
82883
82860
|
this.eventHandlersFunction = (event) => {
|
|
82884
82861
|
const matchingHandler = this.eventHandlers.get(event.detail.type);
|
|
@@ -82886,13 +82863,13 @@ let Base$3 = class Base {
|
|
|
82886
82863
|
matchingHandler(event.detail.data);
|
|
82887
82864
|
};
|
|
82888
82865
|
window.addEventListener(this.eventTopic, this.eventHandlersFunction);
|
|
82889
|
-
window.addEventListener(
|
|
82866
|
+
window.addEventListener(ro$1.IMTBL_WIDGETS_PROVIDER, this.eventHandlersFunction);
|
|
82890
82867
|
}
|
|
82891
82868
|
removeListener(type) {
|
|
82892
82869
|
this.eventHandlers.delete(type);
|
|
82893
82870
|
if (this.eventHandlersFunction) {
|
|
82894
82871
|
window.removeEventListener(this.eventTopic, this.eventHandlersFunction);
|
|
82895
|
-
window.removeEventListener(
|
|
82872
|
+
window.removeEventListener(ro$1.IMTBL_WIDGETS_PROVIDER, this.eventHandlersFunction);
|
|
82896
82873
|
}
|
|
82897
82874
|
if (this.eventHandlers.size <= 0)
|
|
82898
82875
|
return;
|
|
@@ -82902,7 +82879,7 @@ let Base$3 = class Base {
|
|
|
82902
82879
|
matchingHandler(event.detail.data);
|
|
82903
82880
|
};
|
|
82904
82881
|
window.addEventListener(this.eventTopic, this.eventHandlersFunction);
|
|
82905
|
-
window.addEventListener(
|
|
82882
|
+
window.addEventListener(ro$1.IMTBL_WIDGETS_PROVIDER, this.eventHandlersFunction);
|
|
82906
82883
|
}
|
|
82907
82884
|
strongConfig() {
|
|
82908
82885
|
return withDefaultWidgetConfigs({
|
|
@@ -82915,12 +82892,12 @@ let Base$3 = class Base {
|
|
|
82915
82892
|
}
|
|
82916
82893
|
// Subscribe to PROVIDER_UPDATED events from our widgets
|
|
82917
82894
|
setupProviderUpdatedListener() {
|
|
82918
|
-
window.addEventListener(
|
|
82895
|
+
window.addEventListener(ro$1.IMTBL_WIDGETS_PROVIDER, this.handleProviderUpdatedEvent);
|
|
82919
82896
|
const widgetRoot = this;
|
|
82920
82897
|
window.addEventListener(baseWidgetProviderEvent, () => widgetRoot.handleEIP1193ProviderEvents(widgetRoot));
|
|
82921
82898
|
}
|
|
82922
82899
|
setupDisconnectProviderListener() {
|
|
82923
|
-
window.addEventListener(
|
|
82900
|
+
window.addEventListener(ro$1.IMTBL_WALLET_WIDGET_EVENT, this.handleDisconnectEvent);
|
|
82924
82901
|
}
|
|
82925
82902
|
handleEIP1193ProviderEvents(widgetRoot) {
|
|
82926
82903
|
if (widgetRoot.browserProvider?.ethereumProvider) {
|
|
@@ -82937,7 +82914,7 @@ let Base$3 = class Base {
|
|
|
82937
82914
|
handleProviderUpdatedEvent = ((event) => {
|
|
82938
82915
|
const widgetRoot = this;
|
|
82939
82916
|
switch (event.detail.type) {
|
|
82940
|
-
case
|
|
82917
|
+
case oo$1.PROVIDER_UPDATED: {
|
|
82941
82918
|
const eventData = event.detail.data;
|
|
82942
82919
|
widgetRoot.browserProvider = eventData.provider;
|
|
82943
82920
|
this.render();
|
|
@@ -82951,7 +82928,7 @@ let Base$3 = class Base {
|
|
|
82951
82928
|
handleDisconnectEvent = ((event) => {
|
|
82952
82929
|
const widgetRoot = this;
|
|
82953
82930
|
switch (event.detail.type) {
|
|
82954
|
-
case
|
|
82931
|
+
case ao$1.DISCONNECT_WALLET: {
|
|
82955
82932
|
widgetRoot.browserProvider = undefined;
|
|
82956
82933
|
this.render();
|
|
82957
82934
|
break;
|
|
@@ -86219,7 +86196,7 @@ var Analytics = /** @class */ (function (_super) {
|
|
|
86219
86196
|
return __generator(this, function (_b) {
|
|
86220
86197
|
switch (_b.label) {
|
|
86221
86198
|
case 0: return [4 /*yield*/, import(
|
|
86222
|
-
/* webpackChunkName: "auto-track" */ './auto-track-
|
|
86199
|
+
/* webpackChunkName: "auto-track" */ './auto-track-DeLnQQ5M.js')];
|
|
86223
86200
|
case 1:
|
|
86224
86201
|
autotrack = _b.sent();
|
|
86225
86202
|
return [2 /*return*/, (_a = autotrack.link).call.apply(_a, __spreadArray$1([this], args, false))];
|
|
@@ -86238,7 +86215,7 @@ var Analytics = /** @class */ (function (_super) {
|
|
|
86238
86215
|
return __generator(this, function (_b) {
|
|
86239
86216
|
switch (_b.label) {
|
|
86240
86217
|
case 0: return [4 /*yield*/, import(
|
|
86241
|
-
/* webpackChunkName: "auto-track" */ './auto-track-
|
|
86218
|
+
/* webpackChunkName: "auto-track" */ './auto-track-DeLnQQ5M.js')];
|
|
86242
86219
|
case 1:
|
|
86243
86220
|
autotrack = _b.sent();
|
|
86244
86221
|
return [2 /*return*/, (_a = autotrack.link).call.apply(_a, __spreadArray$1([this], args, false))];
|
|
@@ -86257,7 +86234,7 @@ var Analytics = /** @class */ (function (_super) {
|
|
|
86257
86234
|
return __generator(this, function (_b) {
|
|
86258
86235
|
switch (_b.label) {
|
|
86259
86236
|
case 0: return [4 /*yield*/, import(
|
|
86260
|
-
/* webpackChunkName: "auto-track" */ './auto-track-
|
|
86237
|
+
/* webpackChunkName: "auto-track" */ './auto-track-DeLnQQ5M.js')];
|
|
86261
86238
|
case 1:
|
|
86262
86239
|
autotrack = _b.sent();
|
|
86263
86240
|
return [2 /*return*/, (_a = autotrack.form).call.apply(_a, __spreadArray$1([this], args, false))];
|
|
@@ -86276,7 +86253,7 @@ var Analytics = /** @class */ (function (_super) {
|
|
|
86276
86253
|
return __generator(this, function (_b) {
|
|
86277
86254
|
switch (_b.label) {
|
|
86278
86255
|
case 0: return [4 /*yield*/, import(
|
|
86279
|
-
/* webpackChunkName: "auto-track" */ './auto-track-
|
|
86256
|
+
/* webpackChunkName: "auto-track" */ './auto-track-DeLnQQ5M.js')];
|
|
86280
86257
|
case 1:
|
|
86281
86258
|
autotrack = _b.sent();
|
|
86282
86259
|
return [2 /*return*/, (_a = autotrack.form).call.apply(_a, __spreadArray$1([this], args, false))];
|
|
@@ -86426,7 +86403,7 @@ var Analytics = /** @class */ (function (_super) {
|
|
|
86426
86403
|
return [2 /*return*/, []];
|
|
86427
86404
|
}
|
|
86428
86405
|
return [4 /*yield*/, import(
|
|
86429
|
-
/* webpackChunkName: "queryString" */ './index-
|
|
86406
|
+
/* webpackChunkName: "queryString" */ './index-lgFyRHj_.js')];
|
|
86430
86407
|
case 1:
|
|
86431
86408
|
queryString = (_a.sent()).queryString;
|
|
86432
86409
|
return [2 /*return*/, queryString(this, query)];
|
|
@@ -89130,7 +89107,7 @@ function registerPlugins(writeKey, legacySettings, analytics, opts, options, plu
|
|
|
89130
89107
|
case 0:
|
|
89131
89108
|
if (!hasTsubMiddleware(legacySettings)) return [3 /*break*/, 2];
|
|
89132
89109
|
return [4 /*yield*/, import(
|
|
89133
|
-
/* webpackChunkName: "tsub-middleware" */ './index-
|
|
89110
|
+
/* webpackChunkName: "tsub-middleware" */ './index-BwNgGaGH.js').then(function (mod) {
|
|
89134
89111
|
return mod.tsubMiddleware(legacySettings.middlewareSettings.routingRules);
|
|
89135
89112
|
})];
|
|
89136
89113
|
case 1:
|
|
@@ -89143,7 +89120,7 @@ function registerPlugins(writeKey, legacySettings, analytics, opts, options, plu
|
|
|
89143
89120
|
tsubMiddleware = _d;
|
|
89144
89121
|
if (!(hasLegacyDestinations(legacySettings) || legacyIntegrationSources.length > 0)) return [3 /*break*/, 5];
|
|
89145
89122
|
return [4 /*yield*/, import(
|
|
89146
|
-
/* webpackChunkName: "ajs-destination" */ './index-
|
|
89123
|
+
/* webpackChunkName: "ajs-destination" */ './index-D18hBbWb.js').then(function (mod) {
|
|
89147
89124
|
return mod.ajsDestinations(writeKey, legacySettings, analytics.integrations, opts, tsubMiddleware, legacyIntegrationSources);
|
|
89148
89125
|
})];
|
|
89149
89126
|
case 4:
|
|
@@ -89156,7 +89133,7 @@ function registerPlugins(writeKey, legacySettings, analytics, opts, options, plu
|
|
|
89156
89133
|
legacyDestinations = _e;
|
|
89157
89134
|
if (!legacySettings.legacyVideoPluginsEnabled) return [3 /*break*/, 8];
|
|
89158
89135
|
return [4 /*yield*/, import(
|
|
89159
|
-
/* webpackChunkName: "legacyVideos" */ './index-
|
|
89136
|
+
/* webpackChunkName: "legacyVideos" */ './index-DpNna0MG.js').then(function (mod) {
|
|
89160
89137
|
return mod.loadLegacyVideoPlugins(analytics);
|
|
89161
89138
|
})];
|
|
89162
89139
|
case 7:
|
|
@@ -89165,7 +89142,7 @@ function registerPlugins(writeKey, legacySettings, analytics, opts, options, plu
|
|
|
89165
89142
|
case 8:
|
|
89166
89143
|
if (!((_a = opts.plan) === null || _a === void 0 ? void 0 : _a.track)) return [3 /*break*/, 10];
|
|
89167
89144
|
return [4 /*yield*/, import(
|
|
89168
|
-
/* webpackChunkName: "schemaFilter" */ './index-
|
|
89145
|
+
/* webpackChunkName: "schemaFilter" */ './index-Dpv6KyQF.js').then(function (mod) {
|
|
89169
89146
|
var _a;
|
|
89170
89147
|
return mod.schemaFilter((_a = opts.plan) === null || _a === void 0 ? void 0 : _a.track, legacySettings);
|
|
89171
89148
|
})];
|
|
@@ -89204,7 +89181,7 @@ function registerPlugins(writeKey, legacySettings, analytics, opts, options, plu
|
|
|
89204
89181
|
return enabled;
|
|
89205
89182
|
})) return [3 /*break*/, 17];
|
|
89206
89183
|
return [4 /*yield*/, import(
|
|
89207
|
-
/* webpackChunkName: "remoteMiddleware" */ './index-
|
|
89184
|
+
/* webpackChunkName: "remoteMiddleware" */ './index-ByDgwiba.js').then(function (_a) {
|
|
89208
89185
|
var remoteMiddlewares = _a.remoteMiddlewares;
|
|
89209
89186
|
return __awaiter$5(_this, void 0, void 0, function () {
|
|
89210
89187
|
var middleware, promises;
|
|
@@ -170637,7 +170614,7 @@ console.log(`
|
|
|
170637
170614
|
|
|
170638
170615
|
`);
|
|
170639
170616
|
|
|
170640
|
-
const widgetTheme = (theme) => (theme.toLowerCase() ===
|
|
170617
|
+
const widgetTheme = (theme) => (theme.toLowerCase() === wo$1.LIGHT.toLowerCase()
|
|
170641
170618
|
? base$2
|
|
170642
170619
|
: onDarkBase);
|
|
170643
170620
|
|
|
@@ -170665,12 +170642,12 @@ const tokenSymbolNameOverrides = {
|
|
|
170665
170642
|
};
|
|
170666
170643
|
const sortTokensByAmount = (config, tokens, chainId) => tokens.sort((a, b) => {
|
|
170667
170644
|
// make sure IMX is at the top of the list
|
|
170668
|
-
if (chainId ===
|
|
170645
|
+
if (chainId === config.l2ChainId
|
|
170669
170646
|
&& a.token.symbol.toLowerCase() === 'imx'
|
|
170670
170647
|
&& b.token.symbol.toLowerCase() !== 'imx') {
|
|
170671
170648
|
return -1;
|
|
170672
170649
|
}
|
|
170673
|
-
if (chainId ===
|
|
170650
|
+
if (chainId === config.l2ChainId
|
|
170674
170651
|
&& b.token.symbol.toLowerCase() === 'imx'
|
|
170675
170652
|
&& a.token.symbol.toLowerCase() !== 'imx') {
|
|
170676
170653
|
return 1;
|
|
@@ -170685,10 +170662,10 @@ const sortTokensByAmount = (config, tokens, chainId) => tokens.sort((a, b) => {
|
|
|
170685
170662
|
});
|
|
170686
170663
|
const sortNetworksCompareFn = (a, b, config) => {
|
|
170687
170664
|
// make sure zkEVM at start of the list then L1
|
|
170688
|
-
if (Number(a.chainId) ===
|
|
170665
|
+
if (Number(a.chainId) === config.l2ChainId) {
|
|
170689
170666
|
return -1;
|
|
170690
170667
|
}
|
|
170691
|
-
if (Number(a.chainId) ===
|
|
170668
|
+
if (Number(a.chainId) === config.l1ChainId) {
|
|
170692
170669
|
return 0;
|
|
170693
170670
|
}
|
|
170694
170671
|
return 1;
|
|
@@ -170763,11 +170740,11 @@ const tokenValueFormat = (s, maxDecimals = DEFAULT_TOKEN_FORMATTING_DECIMALS) =>
|
|
|
170763
170740
|
formatted = tokenValueFormatDecimals(formatted, 0);
|
|
170764
170741
|
return formatted;
|
|
170765
170742
|
};
|
|
170766
|
-
const isZkEvmChainId = (chainId) => chainId ===
|
|
170767
|
-
|| chainId ===
|
|
170768
|
-
|| chainId ===
|
|
170769
|
-
const isL1EthChainId = (chainId) => chainId ===
|
|
170770
|
-
|| chainId ===
|
|
170743
|
+
const isZkEvmChainId = (chainId) => chainId === J$4.IMTBL_ZKEVM_DEVNET
|
|
170744
|
+
|| chainId === J$4.IMTBL_ZKEVM_TESTNET
|
|
170745
|
+
|| chainId === J$4.IMTBL_ZKEVM_MAINNET;
|
|
170746
|
+
const isL1EthChainId = (chainId) => chainId === J$4.SEPOLIA
|
|
170747
|
+
|| chainId === J$4.ETHEREUM;
|
|
170771
170748
|
const isNativeToken = (address) => !address || address.toLocaleLowerCase() === NATIVE;
|
|
170772
170749
|
function getRemoteImage(environment, path) {
|
|
170773
170750
|
return `${CHECKOUT_CDN_BASE_URL[environment ?? K$7.PRODUCTION]}/v1/blob/img${path}`;
|
|
@@ -170791,7 +170768,7 @@ function getTokenImageByAddress(environment, address) {
|
|
|
170791
170768
|
return getRemoteImage(environment, `/tokens/${address.toLowerCase()}.svg`);
|
|
170792
170769
|
}
|
|
170793
170770
|
function getDefaultTokenImage(environment, theme) {
|
|
170794
|
-
return theme ===
|
|
170771
|
+
return theme === wo$1.LIGHT
|
|
170795
170772
|
? getRemoteImage(environment, '/tokens/defaultonlight.svg')
|
|
170796
170773
|
: getRemoteImage(environment, '/tokens/defaultondark.svg');
|
|
170797
170774
|
}
|
|
@@ -170861,7 +170838,7 @@ function isValidWalletProvider(walletProviderName) {
|
|
|
170861
170838
|
return true; // allow undefined as it may not be defined
|
|
170862
170839
|
if (walletProviderName === '')
|
|
170863
170840
|
return false;
|
|
170864
|
-
return Object.values(
|
|
170841
|
+
return Object.values(fe$4).includes(walletProviderName);
|
|
170865
170842
|
}
|
|
170866
170843
|
function isValidAmount(amount) {
|
|
170867
170844
|
if (amount === undefined)
|
|
@@ -170892,11 +170869,11 @@ function isWalletConnectProvider(provider) {
|
|
|
170892
170869
|
const getProviderDetailByProvider = (browserPovider, providers) => providers?.find((providerDetail) => providerDetail.provider === browserPovider.ethereumProvider);
|
|
170893
170870
|
function getWalletProviderNameByProvider(wrappedBrowserProvider, providers) {
|
|
170894
170871
|
if (isMetaMaskProvider(wrappedBrowserProvider))
|
|
170895
|
-
return
|
|
170872
|
+
return fe$4.METAMASK.toString();
|
|
170896
170873
|
if (isPassportProvider(wrappedBrowserProvider))
|
|
170897
|
-
return
|
|
170874
|
+
return fe$4.PASSPORT.toString();
|
|
170898
170875
|
if (isWalletConnectProvider(wrappedBrowserProvider))
|
|
170899
|
-
return
|
|
170876
|
+
return fe$4.WALLETCONNECT.toString();
|
|
170900
170877
|
return 'Other';
|
|
170901
170878
|
}
|
|
170902
170879
|
function getProviderSlugFromRdns(rdns) {
|
|
@@ -170942,7 +170919,7 @@ const connectEIP6963Provider = async (providerDetail, checkout, shouldRequestWal
|
|
|
170942
170919
|
const wrappedBrowserProvider = new D$6(providerDetail.provider);
|
|
170943
170920
|
try {
|
|
170944
170921
|
const requestWalletPermissions = shouldRequestWalletPermissions
|
|
170945
|
-
?? providerDetail.info.rdns ===
|
|
170922
|
+
?? providerDetail.info.rdns === qt$2.METAMASK;
|
|
170946
170923
|
const connectResult = await checkout.connect({
|
|
170947
170924
|
provider: wrappedBrowserProvider,
|
|
170948
170925
|
requestWalletPermissions,
|
|
@@ -171081,17 +171058,17 @@ const useProvidersContext = () => {
|
|
|
171081
171058
|
return context;
|
|
171082
171059
|
};
|
|
171083
171060
|
|
|
171084
|
-
const AddTokensWidget = React.lazy(() => import('./AddTokensWidget-
|
|
171061
|
+
const AddTokensWidget = React.lazy(() => import('./AddTokensWidget-CIX9CQkm.js'));
|
|
171085
171062
|
class AddTokens extends Base$3 {
|
|
171086
|
-
eventTopic =
|
|
171063
|
+
eventTopic = ro$1.IMTBL_ADD_TOKENS_WIDGET_EVENT;
|
|
171087
171064
|
getValidatedProperties({ config, }) {
|
|
171088
171065
|
let validatedConfig;
|
|
171089
171066
|
if (config) {
|
|
171090
171067
|
validatedConfig = config;
|
|
171091
|
-
if (config.theme ===
|
|
171092
|
-
validatedConfig.theme =
|
|
171068
|
+
if (config.theme === wo$1.LIGHT)
|
|
171069
|
+
validatedConfig.theme = wo$1.LIGHT;
|
|
171093
171070
|
else
|
|
171094
|
-
validatedConfig.theme =
|
|
171071
|
+
validatedConfig.theme = wo$1.DARK;
|
|
171095
171072
|
}
|
|
171096
171073
|
return {
|
|
171097
171074
|
config: validatedConfig,
|
|
@@ -171125,17 +171102,17 @@ class AddTokens extends Base$3 {
|
|
|
171125
171102
|
}
|
|
171126
171103
|
}
|
|
171127
171104
|
|
|
171128
|
-
const BridgeWidget = React.lazy(() => import('./BridgeWidget-
|
|
171105
|
+
const BridgeWidget = React.lazy(() => import('./BridgeWidget-DZoglU1Z.js').then(function (n) { return n.a; }));
|
|
171129
171106
|
class Bridge extends Base$3 {
|
|
171130
|
-
eventTopic =
|
|
171107
|
+
eventTopic = ro$1.IMTBL_BRIDGE_WIDGET_EVENT;
|
|
171131
171108
|
getValidatedProperties({ config }) {
|
|
171132
171109
|
let validatedConfig;
|
|
171133
171110
|
if (config) {
|
|
171134
171111
|
validatedConfig = config;
|
|
171135
|
-
if (config.theme ===
|
|
171136
|
-
validatedConfig.theme =
|
|
171112
|
+
if (config.theme === wo$1.LIGHT)
|
|
171113
|
+
validatedConfig.theme = wo$1.LIGHT;
|
|
171137
171114
|
else
|
|
171138
|
-
validatedConfig.theme =
|
|
171115
|
+
validatedConfig.theme = wo$1.DARK;
|
|
171139
171116
|
}
|
|
171140
171117
|
return {
|
|
171141
171118
|
config: validatedConfig,
|
|
@@ -171170,42 +171147,42 @@ class Bridge extends Base$3 {
|
|
|
171170
171147
|
|
|
171171
171148
|
function getChainNameById(chainId) {
|
|
171172
171149
|
switch (chainId) {
|
|
171173
|
-
case
|
|
171174
|
-
case
|
|
171175
|
-
case
|
|
171176
|
-
case
|
|
171177
|
-
case
|
|
171150
|
+
case J$4.ETHEREUM: return nt$1.ETHEREUM;
|
|
171151
|
+
case J$4.IMTBL_ZKEVM_TESTNET: return nt$1.IMTBL_ZKEVM_TESTNET;
|
|
171152
|
+
case J$4.IMTBL_ZKEVM_MAINNET: return nt$1.IMTBL_ZKEVM_MAINNET;
|
|
171153
|
+
case J$4.IMTBL_ZKEVM_DEVNET: return nt$1.IMTBL_ZKEVM_DEVNET;
|
|
171154
|
+
case J$4.SEPOLIA: return nt$1.SEPOLIA;
|
|
171178
171155
|
default: return '';
|
|
171179
171156
|
}
|
|
171180
171157
|
}
|
|
171181
171158
|
function getChainSlugById(chainId) {
|
|
171182
171159
|
switch (chainId) {
|
|
171183
|
-
case
|
|
171184
|
-
case
|
|
171185
|
-
case
|
|
171186
|
-
case
|
|
171187
|
-
case
|
|
171160
|
+
case J$4.ETHEREUM: return we$3.ETHEREUM;
|
|
171161
|
+
case J$4.IMTBL_ZKEVM_TESTNET: return we$3.IMTBL_ZKEVM_TESTNET;
|
|
171162
|
+
case J$4.IMTBL_ZKEVM_MAINNET: return we$3.IMTBL_ZKEVM_MAINNET;
|
|
171163
|
+
case J$4.IMTBL_ZKEVM_DEVNET: return we$3.IMTBL_ZKEVM_DEVNET;
|
|
171164
|
+
case J$4.SEPOLIA: return we$3.SEPOLIA;
|
|
171188
171165
|
default: return '';
|
|
171189
171166
|
}
|
|
171190
171167
|
}
|
|
171191
171168
|
function getChainIdBySlug(chainSlug) {
|
|
171192
171169
|
switch (chainSlug) {
|
|
171193
|
-
case
|
|
171194
|
-
case
|
|
171195
|
-
case
|
|
171196
|
-
case
|
|
171197
|
-
case
|
|
171170
|
+
case we$3.ETHEREUM: return J$4.ETHEREUM;
|
|
171171
|
+
case we$3.IMTBL_ZKEVM_TESTNET: return J$4.IMTBL_ZKEVM_TESTNET;
|
|
171172
|
+
case we$3.IMTBL_ZKEVM_MAINNET: return J$4.IMTBL_ZKEVM_MAINNET;
|
|
171173
|
+
case we$3.IMTBL_ZKEVM_DEVNET: return J$4.IMTBL_ZKEVM_DEVNET;
|
|
171174
|
+
case we$3.SEPOLIA: return J$4.SEPOLIA;
|
|
171198
171175
|
default: return 0;
|
|
171199
171176
|
}
|
|
171200
171177
|
}
|
|
171201
171178
|
function getNativeSymbolByChainSlug(chainSlug) {
|
|
171202
171179
|
switch (chainSlug) {
|
|
171203
|
-
case
|
|
171204
|
-
case
|
|
171180
|
+
case we$3.ETHEREUM:
|
|
171181
|
+
case we$3.SEPOLIA:
|
|
171205
171182
|
return 'ETH';
|
|
171206
|
-
case
|
|
171207
|
-
case
|
|
171208
|
-
case
|
|
171183
|
+
case we$3.IMTBL_ZKEVM_TESTNET:
|
|
171184
|
+
case we$3.IMTBL_ZKEVM_MAINNET:
|
|
171185
|
+
case we$3.IMTBL_ZKEVM_DEVNET:
|
|
171209
171186
|
return 'IMX';
|
|
171210
171187
|
default: return '';
|
|
171211
171188
|
}
|
|
@@ -171213,7 +171190,7 @@ function getNativeSymbolByChainSlug(chainSlug) {
|
|
|
171213
171190
|
|
|
171214
171191
|
const ConnectWidget$2 = React.lazy(() => Promise.resolve().then(function () { return ConnectWidget$1; }));
|
|
171215
171192
|
class Connect extends Base$3 {
|
|
171216
|
-
eventTopic =
|
|
171193
|
+
eventTopic = ro$1.IMTBL_CONNECT_WIDGET_EVENT;
|
|
171217
171194
|
getValidatedProperties({ config }) {
|
|
171218
171195
|
return {
|
|
171219
171196
|
config,
|
|
@@ -171224,25 +171201,25 @@ class Connect extends Base$3 {
|
|
|
171224
171201
|
// validating targetChainId per environment
|
|
171225
171202
|
if (!params.targetChainId
|
|
171226
171203
|
&& this.checkout.config.isProduction) {
|
|
171227
|
-
validatedParams.targetChainId =
|
|
171204
|
+
validatedParams.targetChainId = J$4.IMTBL_ZKEVM_MAINNET;
|
|
171228
171205
|
}
|
|
171229
171206
|
else if (params.targetChainId
|
|
171230
171207
|
&& this.checkout.config.isProduction
|
|
171231
|
-
&& (params.targetChainId !==
|
|
171208
|
+
&& (params.targetChainId !== J$4.ETHEREUM && params.targetChainId !== J$4.IMTBL_ZKEVM_MAINNET)) {
|
|
171232
171209
|
// eslint-disable-next-line max-len, no-console
|
|
171233
|
-
console.warn(`Cannot set targetChainId to ${params.targetChainId} in ${K$7.PRODUCTION} environment, defaulting to ${getChainNameById(
|
|
171234
|
-
validatedParams.targetChainId =
|
|
171210
|
+
console.warn(`Cannot set targetChainId to ${params.targetChainId} in ${K$7.PRODUCTION} environment, defaulting to ${getChainNameById(J$4.IMTBL_ZKEVM_MAINNET)}, chainId ${J$4.IMTBL_ZKEVM_MAINNET}`);
|
|
171211
|
+
validatedParams.targetChainId = J$4.IMTBL_ZKEVM_MAINNET;
|
|
171235
171212
|
}
|
|
171236
171213
|
if (!params.targetChainId
|
|
171237
171214
|
&& this.checkout.config.environment === K$7.SANDBOX) {
|
|
171238
|
-
validatedParams.targetChainId =
|
|
171215
|
+
validatedParams.targetChainId = J$4.IMTBL_ZKEVM_TESTNET;
|
|
171239
171216
|
}
|
|
171240
171217
|
else if (params.targetChainId
|
|
171241
171218
|
&& this.checkout.config.environment === K$7.SANDBOX
|
|
171242
|
-
&& (params.targetChainId !==
|
|
171219
|
+
&& (params.targetChainId !== J$4.SEPOLIA && params.targetChainId !== J$4.IMTBL_ZKEVM_TESTNET)) {
|
|
171243
171220
|
// eslint-disable-next-line max-len, no-console
|
|
171244
|
-
console.warn(`Cannot set targetChainId to ${params.targetChainId} in ${K$7.SANDBOX} environment, defaulting to ${getChainNameById(
|
|
171245
|
-
validatedParams.targetChainId =
|
|
171221
|
+
console.warn(`Cannot set targetChainId to ${params.targetChainId} in ${K$7.SANDBOX} environment, defaulting to ${getChainNameById(J$4.IMTBL_ZKEVM_TESTNET)}, chainId ${J$4.IMTBL_ZKEVM_TESTNET}`);
|
|
171222
|
+
validatedParams.targetChainId = J$4.IMTBL_ZKEVM_TESTNET;
|
|
171246
171223
|
}
|
|
171247
171224
|
return params;
|
|
171248
171225
|
}
|
|
@@ -171270,29 +171247,29 @@ function deduplicateSaleItemsArray(items) {
|
|
|
171270
171247
|
|
|
171271
171248
|
/** Orchestration Events List */
|
|
171272
171249
|
const commerceFlows = [
|
|
171273
|
-
|
|
171274
|
-
|
|
171275
|
-
|
|
171276
|
-
|
|
171277
|
-
|
|
171278
|
-
|
|
171279
|
-
|
|
171280
|
-
|
|
171281
|
-
|
|
171250
|
+
Ao$1.CONNECT,
|
|
171251
|
+
Ao$1.WALLET,
|
|
171252
|
+
Ao$1.SALE,
|
|
171253
|
+
Ao$1.SWAP,
|
|
171254
|
+
Ao$1.BRIDGE,
|
|
171255
|
+
Ao$1.ONRAMP,
|
|
171256
|
+
Ao$1.ADD_TOKENS,
|
|
171257
|
+
Ao$1.PURCHASE,
|
|
171258
|
+
Ao$1.TRANSFER,
|
|
171282
171259
|
];
|
|
171283
171260
|
|
|
171284
|
-
const CommerceWidget = React.lazy(() => import('./CommerceWidget-
|
|
171261
|
+
const CommerceWidget = React.lazy(() => import('./CommerceWidget-D8k1Bk8v.js'));
|
|
171285
171262
|
class CommerceWidgetRoot extends Base$3 {
|
|
171286
|
-
eventTopic =
|
|
171263
|
+
eventTopic = ro$1.IMTBL_COMMERCE_WIDGET_EVENT;
|
|
171287
171264
|
getValidatedProperties({ config, }) {
|
|
171288
171265
|
let validatedConfig;
|
|
171289
171266
|
if (config) {
|
|
171290
171267
|
validatedConfig = config;
|
|
171291
171268
|
// FIXME: Move default theme initialisation to Base class
|
|
171292
|
-
if (config.theme ===
|
|
171293
|
-
validatedConfig.theme =
|
|
171269
|
+
if (config.theme === wo$1.LIGHT)
|
|
171270
|
+
validatedConfig.theme = wo$1.LIGHT;
|
|
171294
171271
|
else
|
|
171295
|
-
validatedConfig.theme =
|
|
171272
|
+
validatedConfig.theme = wo$1.DARK;
|
|
171296
171273
|
}
|
|
171297
171274
|
// TODO: validate configs for each widget
|
|
171298
171275
|
return {
|
|
@@ -171466,23 +171443,23 @@ class CommerceWidgetRoot extends Base$3 {
|
|
|
171466
171443
|
const flowType = params.flow;
|
|
171467
171444
|
const supportedFlows = commerceFlows.join(', ');
|
|
171468
171445
|
switch (flowType) {
|
|
171469
|
-
case
|
|
171446
|
+
case Ao$1.CONNECT:
|
|
171470
171447
|
return this.getValidConnectFlowParams(params);
|
|
171471
|
-
case
|
|
171448
|
+
case Ao$1.WALLET:
|
|
171472
171449
|
return this.getValidWalletFlowParams(params);
|
|
171473
|
-
case
|
|
171450
|
+
case Ao$1.SALE:
|
|
171474
171451
|
return this.getValidSaleFlowParams(params);
|
|
171475
|
-
case
|
|
171452
|
+
case Ao$1.SWAP:
|
|
171476
171453
|
return this.getValidSwapFlowParams(params);
|
|
171477
|
-
case
|
|
171454
|
+
case Ao$1.BRIDGE:
|
|
171478
171455
|
return this.getValidBridgeFlowParams(params);
|
|
171479
|
-
case
|
|
171456
|
+
case Ao$1.ONRAMP:
|
|
171480
171457
|
return this.getValidOnRampFlowParams(params);
|
|
171481
|
-
case
|
|
171458
|
+
case Ao$1.ADD_TOKENS:
|
|
171482
171459
|
return this.getValidAddTokensFlowParams(params);
|
|
171483
|
-
case
|
|
171460
|
+
case Ao$1.PURCHASE:
|
|
171484
171461
|
return this.getValidPurchaseFlowParams(params);
|
|
171485
|
-
case
|
|
171462
|
+
case Ao$1.TRANSFER:
|
|
171486
171463
|
return this.getValidTransferFlowParams(params);
|
|
171487
171464
|
default:
|
|
171488
171465
|
// eslint-disable-next-line no-console
|
|
@@ -172108,9 +172085,9 @@ function ServiceUnavailableErrorView({ onCloseClick, onBackButtonClick, }) {
|
|
|
172108
172085
|
}
|
|
172109
172086
|
|
|
172110
172087
|
function sendConnectSuccessEvent(eventTarget, provider, walletProviderName, walletProviderInfo) {
|
|
172111
|
-
const successEvent = new CustomEvent(
|
|
172088
|
+
const successEvent = new CustomEvent(ro$1.IMTBL_CONNECT_WIDGET_EVENT, {
|
|
172112
172089
|
detail: {
|
|
172113
|
-
type:
|
|
172090
|
+
type: no$1.SUCCESS,
|
|
172114
172091
|
data: {
|
|
172115
172092
|
provider,
|
|
172116
172093
|
walletProviderName,
|
|
@@ -172124,9 +172101,9 @@ function sendConnectSuccessEvent(eventTarget, provider, walletProviderName, wall
|
|
|
172124
172101
|
eventTarget.dispatchEvent(successEvent);
|
|
172125
172102
|
}
|
|
172126
172103
|
function sendCloseWidgetEvent(eventTarget) {
|
|
172127
|
-
const closeWidgetEvent = new CustomEvent(
|
|
172104
|
+
const closeWidgetEvent = new CustomEvent(ro$1.IMTBL_CONNECT_WIDGET_EVENT, {
|
|
172128
172105
|
detail: {
|
|
172129
|
-
type:
|
|
172106
|
+
type: no$1.CLOSE_WIDGET,
|
|
172130
172107
|
data: {},
|
|
172131
172108
|
},
|
|
172132
172109
|
});
|
|
@@ -172136,9 +172113,9 @@ function sendCloseWidgetEvent(eventTarget) {
|
|
|
172136
172113
|
eventTarget.dispatchEvent(closeWidgetEvent);
|
|
172137
172114
|
}
|
|
172138
172115
|
function sendConnectFailedEvent(eventTarget, reason) {
|
|
172139
|
-
const failedEvent = new CustomEvent(
|
|
172116
|
+
const failedEvent = new CustomEvent(ro$1.IMTBL_CONNECT_WIDGET_EVENT, {
|
|
172140
172117
|
detail: {
|
|
172141
|
-
type:
|
|
172118
|
+
type: no$1.FAILURE,
|
|
172142
172119
|
data: {
|
|
172143
172120
|
reason,
|
|
172144
172121
|
},
|
|
@@ -172150,9 +172127,9 @@ function sendConnectFailedEvent(eventTarget, reason) {
|
|
|
172150
172127
|
eventTarget.dispatchEvent(failedEvent);
|
|
172151
172128
|
}
|
|
172152
172129
|
function sendWalletConnectProviderUpdatedEvent(eventTarget, ethereumProvider, walletConnectManager) {
|
|
172153
|
-
const successEvent = new CustomEvent(
|
|
172130
|
+
const successEvent = new CustomEvent(ro$1.IMTBL_CONNECT_WIDGET_EVENT, {
|
|
172154
172131
|
detail: {
|
|
172155
|
-
type:
|
|
172132
|
+
type: no$1.WALLETCONNECT_PROVIDER_UPDATED,
|
|
172156
172133
|
data: {
|
|
172157
172134
|
ethereumProvider,
|
|
172158
172135
|
walletConnectManager,
|
|
@@ -172331,8 +172308,8 @@ function WalletItem$1({ rc = jsx$1("span", {}), loading = false, recommended = f
|
|
|
172331
172308
|
const { isSmallScreenMode } = useIsSmallScreen();
|
|
172332
172309
|
const [busy, setBusy] = reactExports.useState(false);
|
|
172333
172310
|
const providerSlug = getProviderSlugFromRdns(providerInfo.rdns);
|
|
172334
|
-
const isPassport = providerSlug ===
|
|
172335
|
-
const isPassportOrMetamask = isPassport || providerSlug ===
|
|
172311
|
+
const isPassport = providerSlug === fe$4.PASSPORT;
|
|
172312
|
+
const isPassportOrMetamask = isPassport || providerSlug === fe$4.METAMASK;
|
|
172336
172313
|
const offsetStyles = { marginLeft: '65px' };
|
|
172337
172314
|
return (jsxs(MenuItem, { rc: reactExports.cloneElement(rc, {
|
|
172338
172315
|
onClick: async () => {
|
|
@@ -172380,14 +172357,14 @@ const processProviders = async (checkout, injectedProviders, priorityWalletRdns
|
|
|
172380
172357
|
// Attempt to fallback to window.ethereum if no EIP-6963 providers are found
|
|
172381
172358
|
// Assuming this is MetaMask on mobile
|
|
172382
172359
|
if (filteredProviders.length === 0 && window.ethereum) {
|
|
172383
|
-
filteredProviders.unshift(
|
|
172360
|
+
filteredProviders.unshift(gn(window.ethereum));
|
|
172384
172361
|
}
|
|
172385
172362
|
// Add passport from checkout config if not from injected providers
|
|
172386
172363
|
if (checkout?.passport
|
|
172387
|
-
&& priorityWalletRdns.includes(
|
|
172388
|
-
&& !filteredProviders.some((provider) => provider.info.rdns ===
|
|
172364
|
+
&& priorityWalletRdns.includes(qt$2.PASSPORT)
|
|
172365
|
+
&& !filteredProviders.some((provider) => provider.info.rdns === qt$2.PASSPORT)) {
|
|
172389
172366
|
const passportProvider = await getPassportProvider(checkout.passport);
|
|
172390
|
-
filteredProviders.unshift(
|
|
172367
|
+
filteredProviders.unshift(mn(passportProvider));
|
|
172391
172368
|
}
|
|
172392
172369
|
// Filter & sort providers
|
|
172393
172370
|
return filteredProviders
|
|
@@ -172558,7 +172535,7 @@ function WalletDrawer({ testId, drawerText, walletOptions, showWalletConnect = t
|
|
|
172558
172535
|
const unavailableIndex = disabledOptions?.findIndex(({ rdns }) => rdns === providerDetail.info.rdns) ?? -1;
|
|
172559
172536
|
const unavalable = unavailableIndex > -1;
|
|
172560
172537
|
const badge = unavalable ? (jsx$1(MenuItem.Badge, { variant: "dark", badgeContent: disabledOptions?.[unavailableIndex]?.label ?? t('drawers.wallet.noFunds') })) : undefined;
|
|
172561
|
-
return (jsx$1(WalletItem, { testId: testId, loading: walletItemLoading, providerInfo: providerDetail.info, onWalletItemClick: () => handleWalletItemClick(providerDetail), rc: jsx$1(motion$1.div, { variants: listItemVariants, custom: index }), size: menuItemSize, badge: badge, disabled: unavalable, recommended: providerDetail.info.rdns ===
|
|
172538
|
+
return (jsx$1(WalletItem, { testId: testId, loading: walletItemLoading, providerInfo: providerDetail.info, onWalletItemClick: () => handleWalletItemClick(providerDetail), rc: jsx$1(motion$1.div, { variants: listItemVariants, custom: index }), size: menuItemSize, badge: badge, disabled: unavalable, recommended: providerDetail.info.rdns === qt$2.PASSPORT }, providerDetail.info.rdns));
|
|
172562
172539
|
}), isWalletConnectEnabled && showWalletConnect && (jsx$1(motion$1.div, { variants: listItemVariants, custom: walletOptions.length, children: jsx$1(WalletConnectItem$1, { size: menuItemSize, loading: walletItemLoading, onWalletItemClick: handleWalletConnectClick }) }, "walletconnect")), bottomSlot && (jsx$1(motion$1.div, { variants: listItemVariants, custom: walletOptions.length + 1, children: bottomSlot }, "bottom-slot-item"))] })] }));
|
|
172563
172540
|
}
|
|
172564
172541
|
|
|
@@ -172673,13 +172650,13 @@ function WalletList(props) {
|
|
|
172673
172650
|
const [showNonPassportWarning, setShowNonPassportWarning] = reactExports.useState(false);
|
|
172674
172651
|
const [chosenProviderDetail, setChosenProviderDetail] = reactExports.useState();
|
|
172675
172652
|
const filteredProviders = reactExports.useMemo(() => providers
|
|
172676
|
-
.filter((provider) => !(provider.info.rdns ===
|
|
172653
|
+
.filter((provider) => !(provider.info.rdns === qt$2.PASSPORT))
|
|
172677
172654
|
.filter((provider) => !blocklistWalletRdns.includes(provider.info.rdns)), [providers]);
|
|
172678
172655
|
// Don't allow Passport if targetChainId is L1
|
|
172679
|
-
const passportProviderDetail = reactExports.useMemo(() => targetChainId !==
|
|
172656
|
+
const passportProviderDetail = reactExports.useMemo(() => targetChainId !== checkout.config.l1ChainId
|
|
172680
172657
|
&& providers
|
|
172681
172658
|
.filter((provider) => !blocklistWalletRdns.includes(provider.info.rdns))
|
|
172682
|
-
.find((provider) => provider.info.rdns ===
|
|
172659
|
+
.find((provider) => provider.info.rdns === qt$2.PASSPORT), [providers, checkout]);
|
|
172683
172660
|
const selectBrowserProvider = reactExports.useCallback((browserProvider, providerName) => {
|
|
172684
172661
|
connectDispatch({
|
|
172685
172662
|
payload: {
|
|
@@ -172732,7 +172709,7 @@ function WalletList(props) {
|
|
|
172732
172709
|
if (!checkout)
|
|
172733
172710
|
return;
|
|
172734
172711
|
try {
|
|
172735
|
-
const isMetaMask = providerDetail.info.rdns ===
|
|
172712
|
+
const isMetaMask = providerDetail.info.rdns === qt$2.METAMASK;
|
|
172736
172713
|
const browserProvider = new D$6(providerDetail.provider);
|
|
172737
172714
|
try {
|
|
172738
172715
|
// TODO: Find a nice way to detect if the wallet supports switching accounts via requestPermissions
|
|
@@ -172823,7 +172800,7 @@ function WalletList(props) {
|
|
|
172823
172800
|
setShowWalletDrawer(false);
|
|
172824
172801
|
};
|
|
172825
172802
|
const handleWalletItemClick = reactExports.useCallback(async (providerDetail) => {
|
|
172826
|
-
const isPassport = providerDetail.info.rdns ===
|
|
172803
|
+
const isPassport = providerDetail.info.rdns === qt$2.PASSPORT;
|
|
172827
172804
|
const hasSeenNonPassportWarning = localStorage.getItem('hasSeenNonPassportWarning');
|
|
172828
172805
|
if (!isPassport && !hasSeenNonPassportWarning) {
|
|
172829
172806
|
setChosenProviderDetail(providerDetail);
|
|
@@ -172863,11 +172840,11 @@ function WalletList(props) {
|
|
|
172863
172840
|
reactExports.useEffect(() => {
|
|
172864
172841
|
// Auto-trigger wallet connection via rdns
|
|
172865
172842
|
if (targetWalletRdns && targetWalletRdns?.length > 0) {
|
|
172866
|
-
if (targetWalletRdns ===
|
|
172843
|
+
if (targetWalletRdns === qt$2.PASSPORT
|
|
172867
172844
|
&& passportProviderDetail) {
|
|
172868
172845
|
handleWalletItemClick(passportProviderDetail);
|
|
172869
172846
|
}
|
|
172870
|
-
else if (targetWalletRdns ===
|
|
172847
|
+
else if (targetWalletRdns === qt$2.WALLETCONNECT
|
|
172871
172848
|
&& walletConnectItemRef.current) {
|
|
172872
172849
|
walletConnectItemRef.current.connect();
|
|
172873
172850
|
}
|
|
@@ -172948,7 +172925,7 @@ function SwitchNetworkEth() {
|
|
|
172948
172925
|
try {
|
|
172949
172926
|
const switchRes = await checkout.switchNetwork({
|
|
172950
172927
|
provider,
|
|
172951
|
-
chainId:
|
|
172928
|
+
chainId: checkout.config.l1ChainId,
|
|
172952
172929
|
});
|
|
172953
172930
|
connectDispatch({
|
|
172954
172931
|
payload: {
|
|
@@ -172970,7 +172947,7 @@ function SwitchNetworkEth() {
|
|
|
172970
172947
|
}
|
|
172971
172948
|
}, [provider, checkout, track]);
|
|
172972
172949
|
return (jsx$1(SimpleLayout, { testId: "switch-network-view", header: (jsx$1(HeaderNavigation, { transparent: true, onCloseButtonClick: sendCloseEvent })), footer: (jsx$1(FooterButton, { actionText: t(buttonTextKey), onActionClick: switchNetwork })), heroContent: jsx$1(EthereumPlanetHero, {}), floatHeader: true, children: jsx$1(SimpleTextBody, { heading: t('views.SWITCH_NETWORK.eth.heading', {
|
|
172973
|
-
networkName: getChainNameById(
|
|
172950
|
+
networkName: getChainNameById(checkout.config.l1ChainId),
|
|
172974
172951
|
}), children: t('views.SWITCH_NETWORK.eth.body') }) }));
|
|
172975
172952
|
}
|
|
172976
172953
|
|
|
@@ -172998,7 +172975,7 @@ function SwitchNetworkZkEVM() {
|
|
|
172998
172975
|
const currentChainId = await provider.send('eth_chainId', []);
|
|
172999
172976
|
// eslint-disable-next-line radix
|
|
173000
172977
|
const parsedChainId = Number(currentChainId.toString());
|
|
173001
|
-
if (parsedChainId ===
|
|
172978
|
+
if (parsedChainId === checkout.config.l2ChainId) {
|
|
173002
172979
|
connectDispatch({
|
|
173003
172980
|
payload: {
|
|
173004
172981
|
type: ConnectActions.SET_PROVIDER,
|
|
@@ -173035,7 +173012,7 @@ function SwitchNetworkZkEVM() {
|
|
|
173035
173012
|
const currentChainId = await provider.send('eth_chainId', []);
|
|
173036
173013
|
// eslint-disable-next-line radix
|
|
173037
173014
|
const parsedChainId = Number(currentChainId.toString());
|
|
173038
|
-
if (parsedChainId ===
|
|
173015
|
+
if (parsedChainId === checkout.config.l2ChainId) {
|
|
173039
173016
|
connectDispatch({
|
|
173040
173017
|
payload: {
|
|
173041
173018
|
type: ConnectActions.SET_PROVIDER,
|
|
@@ -173061,7 +173038,7 @@ function SwitchNetworkZkEVM() {
|
|
|
173061
173038
|
try {
|
|
173062
173039
|
await checkout.addNetwork({
|
|
173063
173040
|
provider,
|
|
173064
|
-
chainId:
|
|
173041
|
+
chainId: checkout.config.l2ChainId,
|
|
173065
173042
|
});
|
|
173066
173043
|
connectDispatch({
|
|
173067
173044
|
payload: {
|
|
@@ -173086,7 +173063,7 @@ function SwitchNetworkZkEVM() {
|
|
|
173086
173063
|
}
|
|
173087
173064
|
const switchRes = await checkout.switchNetwork({
|
|
173088
173065
|
provider,
|
|
173089
|
-
chainId:
|
|
173066
|
+
chainId: checkout.config.l2ChainId,
|
|
173090
173067
|
});
|
|
173091
173068
|
connectDispatch({
|
|
173092
173069
|
payload: {
|
|
@@ -173129,8 +173106,8 @@ function ConnectWidget({ config, sendSuccessEventOverride, sendCloseEventOverrid
|
|
|
173129
173106
|
let targetChain = targetChainId;
|
|
173130
173107
|
if (!targetChain) {
|
|
173131
173108
|
targetChain = checkout.config.isProduction
|
|
173132
|
-
?
|
|
173133
|
-
:
|
|
173109
|
+
? J$4.IMTBL_ZKEVM_MAINNET
|
|
173110
|
+
: J$4.IMTBL_ZKEVM_TESTNET;
|
|
173134
173111
|
}
|
|
173135
173112
|
reactExports.useEffect(() => {
|
|
173136
173113
|
if (!browserProvider)
|
|
@@ -173202,10 +173179,10 @@ function ConnectWidget({ config, sendSuccessEventOverride, sendCloseEventOverrid
|
|
|
173202
173179
|
walletProviderInfo = walletConnectProviderInfo;
|
|
173203
173180
|
}
|
|
173204
173181
|
else if (isPassportProvider(provider)) {
|
|
173205
|
-
walletProviderInfo =
|
|
173182
|
+
walletProviderInfo = We$5;
|
|
173206
173183
|
}
|
|
173207
173184
|
else if (isMetaMaskProvider(provider)) {
|
|
173208
|
-
walletProviderInfo =
|
|
173185
|
+
walletProviderInfo = De$3;
|
|
173209
173186
|
}
|
|
173210
173187
|
if (sendSuccessEventOverride) {
|
|
173211
173188
|
sendSuccessEventOverride();
|
|
@@ -173420,9 +173397,9 @@ function ConnectLoader({ children, params, widgetConfig, successEvent, closeEven
|
|
|
173420
173397
|
|
|
173421
173398
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
173422
173399
|
function sendOnRampWidgetCloseEvent(eventTarget) {
|
|
173423
|
-
const closeWidgetEvent = new CustomEvent(
|
|
173400
|
+
const closeWidgetEvent = new CustomEvent(ro$1.IMTBL_ONRAMP_WIDGET_EVENT, {
|
|
173424
173401
|
detail: {
|
|
173425
|
-
type:
|
|
173402
|
+
type: uo.CLOSE_WIDGET,
|
|
173426
173403
|
data: {},
|
|
173427
173404
|
},
|
|
173428
173405
|
});
|
|
@@ -173433,9 +173410,9 @@ function sendOnRampWidgetCloseEvent(eventTarget) {
|
|
|
173433
173410
|
eventTarget.dispatchEvent(closeWidgetEvent);
|
|
173434
173411
|
}
|
|
173435
173412
|
const sendOnRampSuccessEvent = (eventTarget, transactionHash) => {
|
|
173436
|
-
const successEvent = new CustomEvent(
|
|
173413
|
+
const successEvent = new CustomEvent(ro$1.IMTBL_ONRAMP_WIDGET_EVENT, {
|
|
173437
173414
|
detail: {
|
|
173438
|
-
type:
|
|
173415
|
+
type: uo.SUCCESS,
|
|
173439
173416
|
data: {
|
|
173440
173417
|
transactionHash,
|
|
173441
173418
|
},
|
|
@@ -173447,9 +173424,9 @@ const sendOnRampSuccessEvent = (eventTarget, transactionHash) => {
|
|
|
173447
173424
|
eventTarget.dispatchEvent(successEvent);
|
|
173448
173425
|
};
|
|
173449
173426
|
const sendOnRampFailedEvent = (eventTarget, reason) => {
|
|
173450
|
-
const failedEvent = new CustomEvent(
|
|
173427
|
+
const failedEvent = new CustomEvent(ro$1.IMTBL_ONRAMP_WIDGET_EVENT, {
|
|
173451
173428
|
detail: {
|
|
173452
|
-
type:
|
|
173429
|
+
type: uo.FAILURE,
|
|
173453
173430
|
data: {
|
|
173454
173431
|
reason,
|
|
173455
173432
|
timestamp: new Date().getTime(),
|
|
@@ -173465,7 +173442,7 @@ const sendOnRampFailedEvent = (eventTarget, reason) => {
|
|
|
173465
173442
|
function sendRequestOnrampEvent(eventTarget, imtblWidgetEvent, eventData) {
|
|
173466
173443
|
const requestOnrampEvent = new CustomEvent(imtblWidgetEvent, {
|
|
173467
173444
|
detail: {
|
|
173468
|
-
type:
|
|
173445
|
+
type: po$1.REQUEST_ONRAMP,
|
|
173469
173446
|
data: eventData,
|
|
173470
173447
|
},
|
|
173471
173448
|
});
|
|
@@ -173478,7 +173455,7 @@ function sendRequestOnrampEvent(eventTarget, imtblWidgetEvent, eventData) {
|
|
|
173478
173455
|
function sendRequestSwapEvent(eventTarget, imtblWidgetEvent, eventData) {
|
|
173479
173456
|
const requestSwapEvent = new CustomEvent(imtblWidgetEvent, {
|
|
173480
173457
|
detail: {
|
|
173481
|
-
type:
|
|
173458
|
+
type: po$1.REQUEST_SWAP,
|
|
173482
173459
|
data: eventData,
|
|
173483
173460
|
},
|
|
173484
173461
|
});
|
|
@@ -173492,7 +173469,7 @@ function sendRequestBridgeEvent(eventTarget, imtblWidgetEvent, eventData) {
|
|
|
173492
173469
|
// eslint-disable-next-line max-len
|
|
173493
173470
|
const requestBridgeEvent = new CustomEvent(imtblWidgetEvent, {
|
|
173494
173471
|
detail: {
|
|
173495
|
-
type:
|
|
173472
|
+
type: po$1.REQUEST_BRIDGE,
|
|
173496
173473
|
data: eventData,
|
|
173497
173474
|
},
|
|
173498
173475
|
});
|
|
@@ -173506,7 +173483,7 @@ function sendRequestGoBackEvent(eventTarget, imtblWidgetEvent, eventData) {
|
|
|
173506
173483
|
// eslint-disable-next-line max-len
|
|
173507
173484
|
const requestGoBackEvent = new CustomEvent(imtblWidgetEvent, {
|
|
173508
173485
|
detail: {
|
|
173509
|
-
type:
|
|
173486
|
+
type: po$1.REQUEST_GO_BACK,
|
|
173510
173487
|
data: eventData,
|
|
173511
173488
|
},
|
|
173512
173489
|
});
|
|
@@ -173520,7 +173497,7 @@ function sendRequestAddTokensEvent(eventTarget, imtblWidgetEvent, eventData) {
|
|
|
173520
173497
|
// eslint-disable-next-line max-len
|
|
173521
173498
|
const requestAddTokensEvent = new CustomEvent(imtblWidgetEvent, {
|
|
173522
173499
|
detail: {
|
|
173523
|
-
type:
|
|
173500
|
+
type: po$1.REQUEST_ADD_TOKENS,
|
|
173524
173501
|
data: eventData,
|
|
173525
173502
|
},
|
|
173526
173503
|
});
|
|
@@ -173538,17 +173515,17 @@ const orchestrationEvents = {
|
|
|
173538
173515
|
sendRequestAddTokensEvent,
|
|
173539
173516
|
};
|
|
173540
173517
|
|
|
173541
|
-
const OnRampWidget = React.lazy(() => import('./OnRampWidget-
|
|
173518
|
+
const OnRampWidget = React.lazy(() => import('./OnRampWidget-Cish1sa7.js'));
|
|
173542
173519
|
class OnRamp extends Base$3 {
|
|
173543
|
-
eventTopic =
|
|
173520
|
+
eventTopic = ro$1.IMTBL_ONRAMP_WIDGET_EVENT;
|
|
173544
173521
|
getValidatedProperties({ config }) {
|
|
173545
173522
|
let validatedConfig;
|
|
173546
173523
|
if (config) {
|
|
173547
173524
|
validatedConfig = config;
|
|
173548
|
-
if (config.theme ===
|
|
173549
|
-
validatedConfig.theme =
|
|
173525
|
+
if (config.theme === wo$1.LIGHT)
|
|
173526
|
+
validatedConfig.theme = wo$1.LIGHT;
|
|
173550
173527
|
else
|
|
173551
|
-
validatedConfig.theme =
|
|
173528
|
+
validatedConfig.theme = wo$1.DARK;
|
|
173552
173529
|
}
|
|
173553
173530
|
return {
|
|
173554
173531
|
config: validatedConfig,
|
|
@@ -173572,7 +173549,7 @@ class OnRamp extends Base$3 {
|
|
|
173572
173549
|
return validatedParams;
|
|
173573
173550
|
}
|
|
173574
173551
|
goBackEvent = (eventTarget) => {
|
|
173575
|
-
orchestrationEvents.sendRequestGoBackEvent(eventTarget,
|
|
173552
|
+
orchestrationEvents.sendRequestGoBackEvent(eventTarget, ro$1.IMTBL_ONRAMP_WIDGET_EVENT, {});
|
|
173576
173553
|
};
|
|
173577
173554
|
render() {
|
|
173578
173555
|
if (!this.reactRoot)
|
|
@@ -173580,21 +173557,21 @@ class OnRamp extends Base$3 {
|
|
|
173580
173557
|
const { t } = instance;
|
|
173581
173558
|
const connectLoaderParams = {
|
|
173582
173559
|
targetChainId: this.checkout.config.isProduction
|
|
173583
|
-
?
|
|
173584
|
-
:
|
|
173560
|
+
? J$4.IMTBL_ZKEVM_MAINNET
|
|
173561
|
+
: J$4.IMTBL_ZKEVM_TESTNET,
|
|
173585
173562
|
walletProviderName: this.parameters.walletProviderName,
|
|
173586
173563
|
browserProvider: this.browserProvider,
|
|
173587
173564
|
checkout: this.checkout,
|
|
173588
|
-
allowedChains: [
|
|
173565
|
+
allowedChains: [this.checkout.config.l1ChainId, this.checkout.config.l2ChainId],
|
|
173589
173566
|
};
|
|
173590
173567
|
this.reactRoot.render(jsx$1(React.StrictMode, { children: jsx$1(CustomAnalyticsProvider, { checkout: this.checkout, children: jsx$1(ThemeProvider, { id: "onramp-container", config: this.strongConfig(), children: jsx$1(HandoverProvider, { children: jsx$1(ConnectLoader, { widgetConfig: this.strongConfig(), params: connectLoaderParams, closeEvent: () => sendOnRampWidgetCloseEvent(window), goBackEvent: () => this.goBackEvent(window), showBackButton: this.parameters.showBackButton, children: jsx$1(reactExports.Suspense, { fallback: jsx$1(LoadingView, { loadingText: t('views.ONRAMP.initialLoadingText') }), children: jsx$1(OnRampWidget, { tokenAddress: this.parameters.tokenAddress, amount: this.parameters.amount, config: this.strongConfig(), showBackButton: this.parameters.showBackButton }) }) }) }) }) }) }));
|
|
173591
173568
|
}
|
|
173592
173569
|
}
|
|
173593
173570
|
|
|
173594
173571
|
const sendSaleWidgetCloseEvent = (eventTarget) => {
|
|
173595
|
-
const event = new CustomEvent(
|
|
173572
|
+
const event = new CustomEvent(ro$1.IMTBL_SALE_WIDGET_EVENT, {
|
|
173596
173573
|
detail: {
|
|
173597
|
-
type:
|
|
173574
|
+
type: so$1.CLOSE_WIDGET,
|
|
173598
173575
|
data: {},
|
|
173599
173576
|
},
|
|
173600
173577
|
});
|
|
@@ -173604,9 +173581,9 @@ const sendSaleWidgetCloseEvent = (eventTarget) => {
|
|
|
173604
173581
|
eventTarget.dispatchEvent(event);
|
|
173605
173582
|
};
|
|
173606
173583
|
const sendSaleSuccessEvent = (eventTarget, paymentMethod, transactions = [], tokenIds = [], transactionId = '') => {
|
|
173607
|
-
const event = new CustomEvent(
|
|
173584
|
+
const event = new CustomEvent(ro$1.IMTBL_SALE_WIDGET_EVENT, {
|
|
173608
173585
|
detail: {
|
|
173609
|
-
type:
|
|
173586
|
+
type: so$1.SUCCESS,
|
|
173610
173587
|
data: {
|
|
173611
173588
|
paymentMethod,
|
|
173612
173589
|
transactions,
|
|
@@ -173621,9 +173598,9 @@ const sendSaleSuccessEvent = (eventTarget, paymentMethod, transactions = [], tok
|
|
|
173621
173598
|
eventTarget.dispatchEvent(event);
|
|
173622
173599
|
};
|
|
173623
173600
|
const sendSaleFailedEvent = (eventTarget, reason, error, paymentMethod, transactions = [], transactionId = '') => {
|
|
173624
|
-
const event = new CustomEvent(
|
|
173601
|
+
const event = new CustomEvent(ro$1.IMTBL_SALE_WIDGET_EVENT, {
|
|
173625
173602
|
detail: {
|
|
173626
|
-
type:
|
|
173603
|
+
type: so$1.FAILURE,
|
|
173627
173604
|
data: {
|
|
173628
173605
|
reason,
|
|
173629
173606
|
error,
|
|
@@ -173640,9 +173617,9 @@ const sendSaleFailedEvent = (eventTarget, reason, error, paymentMethod, transact
|
|
|
173640
173617
|
eventTarget.dispatchEvent(event);
|
|
173641
173618
|
};
|
|
173642
173619
|
const sendSaleTransactionSuccessEvent = (eventTarget, paymentMethod, transactions) => {
|
|
173643
|
-
const event = new CustomEvent(
|
|
173620
|
+
const event = new CustomEvent(ro$1.IMTBL_SALE_WIDGET_EVENT, {
|
|
173644
173621
|
detail: {
|
|
173645
|
-
type:
|
|
173622
|
+
type: so$1.TRANSACTION_SUCCESS,
|
|
173646
173623
|
data: { paymentMethod, transactions },
|
|
173647
173624
|
},
|
|
173648
173625
|
});
|
|
@@ -173652,9 +173629,9 @@ const sendSaleTransactionSuccessEvent = (eventTarget, paymentMethod, transaction
|
|
|
173652
173629
|
eventTarget.dispatchEvent(event);
|
|
173653
173630
|
};
|
|
173654
173631
|
const sendSalePaymentMethodEvent = (eventTarget, paymentMethod) => {
|
|
173655
|
-
const event = new CustomEvent(
|
|
173632
|
+
const event = new CustomEvent(ro$1.IMTBL_SALE_WIDGET_EVENT, {
|
|
173656
173633
|
detail: {
|
|
173657
|
-
type:
|
|
173634
|
+
type: so$1.PAYMENT_METHOD,
|
|
173658
173635
|
data: { paymentMethod },
|
|
173659
173636
|
},
|
|
173660
173637
|
});
|
|
@@ -173664,9 +173641,9 @@ const sendSalePaymentMethodEvent = (eventTarget, paymentMethod) => {
|
|
|
173664
173641
|
eventTarget.dispatchEvent(event);
|
|
173665
173642
|
};
|
|
173666
173643
|
const sendSalePaymentTokenEvent = (eventTarget, details) => {
|
|
173667
|
-
const event = new CustomEvent(
|
|
173644
|
+
const event = new CustomEvent(ro$1.IMTBL_SALE_WIDGET_EVENT, {
|
|
173668
173645
|
detail: {
|
|
173669
|
-
type:
|
|
173646
|
+
type: so$1.PAYMENT_TOKEN,
|
|
173670
173647
|
data: { ...details },
|
|
173671
173648
|
},
|
|
173672
173649
|
});
|
|
@@ -173676,9 +173653,9 @@ const sendSalePaymentTokenEvent = (eventTarget, details) => {
|
|
|
173676
173653
|
eventTarget.dispatchEvent(event);
|
|
173677
173654
|
};
|
|
173678
173655
|
|
|
173679
|
-
const SaleWidget = React.lazy(() => import('./SaleWidget-
|
|
173656
|
+
const SaleWidget = React.lazy(() => import('./SaleWidget-B84V0S1J.js'));
|
|
173680
173657
|
class Sale extends Base$3 {
|
|
173681
|
-
eventTopic =
|
|
173658
|
+
eventTopic = ro$1.IMTBL_SALE_WIDGET_EVENT;
|
|
173682
173659
|
// TODO: add specific validation logic for the sale items
|
|
173683
173660
|
isValidArray(items) {
|
|
173684
173661
|
try {
|
|
@@ -173705,10 +173682,10 @@ class Sale extends Base$3 {
|
|
|
173705
173682
|
let validatedConfig;
|
|
173706
173683
|
if (config) {
|
|
173707
173684
|
validatedConfig = config;
|
|
173708
|
-
if (config.theme ===
|
|
173709
|
-
validatedConfig.theme =
|
|
173685
|
+
if (config.theme === wo$1.LIGHT)
|
|
173686
|
+
validatedConfig.theme = wo$1.LIGHT;
|
|
173710
173687
|
else
|
|
173711
|
-
validatedConfig.theme =
|
|
173688
|
+
validatedConfig.theme = wo$1.DARK;
|
|
173712
173689
|
}
|
|
173713
173690
|
return {
|
|
173714
173691
|
config: validatedConfig,
|
|
@@ -173753,11 +173730,11 @@ class Sale extends Base$3 {
|
|
|
173753
173730
|
const { t } = instance;
|
|
173754
173731
|
const connectLoaderParams = {
|
|
173755
173732
|
targetChainId: this.checkout.config.isProduction
|
|
173756
|
-
?
|
|
173757
|
-
:
|
|
173733
|
+
? J$4.IMTBL_ZKEVM_MAINNET
|
|
173734
|
+
: J$4.IMTBL_ZKEVM_TESTNET,
|
|
173758
173735
|
browserProvider: this.browserProvider,
|
|
173759
173736
|
checkout: this.checkout,
|
|
173760
|
-
allowedChains: [
|
|
173737
|
+
allowedChains: [this.checkout.config.l2ChainId],
|
|
173761
173738
|
};
|
|
173762
173739
|
const config = this.strongConfig();
|
|
173763
173740
|
this.reactRoot.render(jsx$1(React.StrictMode, { children: jsx$1(CustomAnalyticsProvider, { checkout: this.checkout, children: jsx$1(ThemeProvider, { id: "sale-container", config: config, children: jsx$1(HandoverProvider, { children: jsx$1(ConnectLoader, { widgetConfig: config, params: connectLoaderParams, closeEvent: () => {
|
|
@@ -173768,9 +173745,9 @@ class Sale extends Base$3 {
|
|
|
173768
173745
|
}
|
|
173769
173746
|
|
|
173770
173747
|
function sendSwapWidgetCloseEvent(eventTarget) {
|
|
173771
|
-
const closeWidgetEvent = new CustomEvent(
|
|
173748
|
+
const closeWidgetEvent = new CustomEvent(ro$1.IMTBL_SWAP_WIDGET_EVENT, {
|
|
173772
173749
|
detail: {
|
|
173773
|
-
type:
|
|
173750
|
+
type: io$1.CLOSE_WIDGET,
|
|
173774
173751
|
data: {},
|
|
173775
173752
|
},
|
|
173776
173753
|
});
|
|
@@ -173781,9 +173758,9 @@ function sendSwapWidgetCloseEvent(eventTarget) {
|
|
|
173781
173758
|
eventTarget.dispatchEvent(closeWidgetEvent);
|
|
173782
173759
|
}
|
|
173783
173760
|
const sendSwapSuccessEvent = (eventTarget, transactionHash) => {
|
|
173784
|
-
const successEvent = new CustomEvent(
|
|
173761
|
+
const successEvent = new CustomEvent(ro$1.IMTBL_SWAP_WIDGET_EVENT, {
|
|
173785
173762
|
detail: {
|
|
173786
|
-
type:
|
|
173763
|
+
type: io$1.SUCCESS,
|
|
173787
173764
|
data: {
|
|
173788
173765
|
transactionHash,
|
|
173789
173766
|
},
|
|
@@ -173795,9 +173772,9 @@ const sendSwapSuccessEvent = (eventTarget, transactionHash) => {
|
|
|
173795
173772
|
eventTarget.dispatchEvent(successEvent);
|
|
173796
173773
|
};
|
|
173797
173774
|
const sendSwapFailedEvent = (eventTarget, reason) => {
|
|
173798
|
-
const failedEvent = new CustomEvent(
|
|
173775
|
+
const failedEvent = new CustomEvent(ro$1.IMTBL_SWAP_WIDGET_EVENT, {
|
|
173799
173776
|
detail: {
|
|
173800
|
-
type:
|
|
173777
|
+
type: io$1.FAILURE,
|
|
173801
173778
|
data: {
|
|
173802
173779
|
reason,
|
|
173803
173780
|
timestamp: new Date().getTime(),
|
|
@@ -173810,9 +173787,9 @@ const sendSwapFailedEvent = (eventTarget, reason) => {
|
|
|
173810
173787
|
eventTarget.dispatchEvent(failedEvent);
|
|
173811
173788
|
};
|
|
173812
173789
|
const sendSwapRejectedEvent = (eventTarget, reason) => {
|
|
173813
|
-
const rejectedEvent = new CustomEvent(
|
|
173790
|
+
const rejectedEvent = new CustomEvent(ro$1.IMTBL_SWAP_WIDGET_EVENT, {
|
|
173814
173791
|
detail: {
|
|
173815
|
-
type:
|
|
173792
|
+
type: io$1.REJECTED,
|
|
173816
173793
|
data: {
|
|
173817
173794
|
reason,
|
|
173818
173795
|
timestamp: new Date().getTime(),
|
|
@@ -173825,17 +173802,17 @@ const sendSwapRejectedEvent = (eventTarget, reason) => {
|
|
|
173825
173802
|
eventTarget.dispatchEvent(rejectedEvent);
|
|
173826
173803
|
};
|
|
173827
173804
|
|
|
173828
|
-
const SwapWidget = React.lazy(() => import('./SwapWidget-
|
|
173805
|
+
const SwapWidget = React.lazy(() => import('./SwapWidget-EpPSGKqD.js').then(function (n) { return n.b; }));
|
|
173829
173806
|
class Swap extends Base$3 {
|
|
173830
|
-
eventTopic =
|
|
173807
|
+
eventTopic = ro$1.IMTBL_SWAP_WIDGET_EVENT;
|
|
173831
173808
|
getValidatedProperties({ config }) {
|
|
173832
173809
|
let validatedConfig;
|
|
173833
173810
|
if (config) {
|
|
173834
173811
|
validatedConfig = config;
|
|
173835
|
-
if (config.theme ===
|
|
173836
|
-
validatedConfig.theme =
|
|
173812
|
+
if (config.theme === wo$1.LIGHT)
|
|
173813
|
+
validatedConfig.theme = wo$1.LIGHT;
|
|
173837
173814
|
else
|
|
173838
|
-
validatedConfig.theme =
|
|
173815
|
+
validatedConfig.theme = wo$1.DARK;
|
|
173839
173816
|
}
|
|
173840
173817
|
return {
|
|
173841
173818
|
config: validatedConfig,
|
|
@@ -173874,21 +173851,21 @@ class Swap extends Base$3 {
|
|
|
173874
173851
|
const { t } = instance;
|
|
173875
173852
|
const connectLoaderParams = {
|
|
173876
173853
|
targetChainId: this.checkout.config.isProduction
|
|
173877
|
-
?
|
|
173878
|
-
:
|
|
173854
|
+
? J$4.IMTBL_ZKEVM_MAINNET
|
|
173855
|
+
: J$4.IMTBL_ZKEVM_TESTNET,
|
|
173879
173856
|
walletProviderName: this.parameters.walletProviderName,
|
|
173880
173857
|
browserProvider: this.browserProvider,
|
|
173881
173858
|
checkout: this.checkout,
|
|
173882
|
-
allowedChains: [
|
|
173859
|
+
allowedChains: [this.checkout.config.l2ChainId],
|
|
173883
173860
|
};
|
|
173884
|
-
this.reactRoot.render(jsx$1(React.StrictMode, { children: jsx$1(CustomAnalyticsProvider, { checkout: this.checkout, children: jsx$1(ThemeProvider, { id: "swap-container", config: this.strongConfig(), children: jsx$1(HandoverProvider, { children: jsx$1(ConnectLoader, { params: connectLoaderParams, widgetConfig: this.strongConfig(), closeEvent: () => sendSwapWidgetCloseEvent(window), children: jsx$1(reactExports.Suspense, { fallback: jsx$1(LoadingView, { loadingText: t('views.LOADING_VIEW.text') }), children: jsx$1(SwapWidget, { fromTokenAddress: this.parameters.fromTokenAddress, toTokenAddress: this.parameters.toTokenAddress, amount: this.parameters.amount, config: this.strongConfig(), autoProceed: this.parameters.autoProceed, direction: this.parameters.direction ??
|
|
173861
|
+
this.reactRoot.render(jsx$1(React.StrictMode, { children: jsx$1(CustomAnalyticsProvider, { checkout: this.checkout, children: jsx$1(ThemeProvider, { id: "swap-container", config: this.strongConfig(), children: jsx$1(HandoverProvider, { children: jsx$1(ConnectLoader, { params: connectLoaderParams, widgetConfig: this.strongConfig(), closeEvent: () => sendSwapWidgetCloseEvent(window), children: jsx$1(reactExports.Suspense, { fallback: jsx$1(LoadingView, { loadingText: t('views.LOADING_VIEW.text') }), children: jsx$1(SwapWidget, { fromTokenAddress: this.parameters.fromTokenAddress, toTokenAddress: this.parameters.toTokenAddress, amount: this.parameters.amount, config: this.strongConfig(), autoProceed: this.parameters.autoProceed, direction: this.parameters.direction ?? yo$1.FROM, showBackButton: this.parameters.showBackButton, walletProviderName: this.parameters.walletProviderName }) }) }) }) }) }) }));
|
|
173885
173862
|
}
|
|
173886
173863
|
}
|
|
173887
173864
|
|
|
173888
173865
|
function sendWalletWidgetCloseEvent(eventTarget) {
|
|
173889
|
-
const closeWidgetEvent = new CustomEvent(
|
|
173866
|
+
const closeWidgetEvent = new CustomEvent(ro$1.IMTBL_WALLET_WIDGET_EVENT, {
|
|
173890
173867
|
detail: {
|
|
173891
|
-
type:
|
|
173868
|
+
type: ao$1.CLOSE_WIDGET,
|
|
173892
173869
|
data: {},
|
|
173893
173870
|
},
|
|
173894
173871
|
});
|
|
@@ -173899,9 +173876,9 @@ function sendWalletWidgetCloseEvent(eventTarget) {
|
|
|
173899
173876
|
eventTarget.dispatchEvent(closeWidgetEvent);
|
|
173900
173877
|
}
|
|
173901
173878
|
function sendNetworkSwitchEvent(eventTarget, provider, network) {
|
|
173902
|
-
const walletWidgetSwitchNetworkEvent = new CustomEvent(
|
|
173879
|
+
const walletWidgetSwitchNetworkEvent = new CustomEvent(ro$1.IMTBL_WALLET_WIDGET_EVENT, {
|
|
173903
173880
|
detail: {
|
|
173904
|
-
type:
|
|
173881
|
+
type: ao$1.NETWORK_SWITCH,
|
|
173905
173882
|
data: {
|
|
173906
173883
|
network: network.name,
|
|
173907
173884
|
chainId: Number(network.chainId),
|
|
@@ -173915,9 +173892,9 @@ function sendNetworkSwitchEvent(eventTarget, provider, network) {
|
|
|
173915
173892
|
eventTarget.dispatchEvent(walletWidgetSwitchNetworkEvent);
|
|
173916
173893
|
}
|
|
173917
173894
|
function sendDisconnectWalletEvent(eventTarget) {
|
|
173918
|
-
const disconnectWalletEvent = new CustomEvent(
|
|
173895
|
+
const disconnectWalletEvent = new CustomEvent(ro$1.IMTBL_WALLET_WIDGET_EVENT, {
|
|
173919
173896
|
detail: {
|
|
173920
|
-
type:
|
|
173897
|
+
type: ao$1.DISCONNECT_WALLET,
|
|
173921
173898
|
data: {},
|
|
173922
173899
|
},
|
|
173923
173900
|
});
|
|
@@ -173927,17 +173904,17 @@ function sendDisconnectWalletEvent(eventTarget) {
|
|
|
173927
173904
|
eventTarget.dispatchEvent(disconnectWalletEvent);
|
|
173928
173905
|
}
|
|
173929
173906
|
|
|
173930
|
-
const WalletWidget = React.lazy(() => import('./WalletWidget-
|
|
173907
|
+
const WalletWidget = React.lazy(() => import('./WalletWidget-DxQcP7sk.js'));
|
|
173931
173908
|
class Wallet extends Base$3 {
|
|
173932
|
-
eventTopic =
|
|
173909
|
+
eventTopic = ro$1.IMTBL_WALLET_WIDGET_EVENT;
|
|
173933
173910
|
getValidatedProperties({ config }) {
|
|
173934
173911
|
let validatedConfig;
|
|
173935
173912
|
if (config) {
|
|
173936
173913
|
validatedConfig = config;
|
|
173937
|
-
if (config.theme ===
|
|
173938
|
-
validatedConfig.theme =
|
|
173914
|
+
if (config.theme === wo$1.LIGHT)
|
|
173915
|
+
validatedConfig.theme = wo$1.LIGHT;
|
|
173939
173916
|
else
|
|
173940
|
-
validatedConfig.theme =
|
|
173917
|
+
validatedConfig.theme = wo$1.DARK;
|
|
173941
173918
|
if (config?.showDisconnectButton === undefined) {
|
|
173942
173919
|
validatedConfig.showDisconnectButton = true;
|
|
173943
173920
|
}
|
|
@@ -173970,12 +173947,12 @@ class Wallet extends Base$3 {
|
|
|
173970
173947
|
const { t } = instance;
|
|
173971
173948
|
const connectLoaderParams = {
|
|
173972
173949
|
targetChainId: this.checkout.config.isProduction
|
|
173973
|
-
?
|
|
173974
|
-
:
|
|
173950
|
+
? J$4.IMTBL_ZKEVM_MAINNET
|
|
173951
|
+
: J$4.IMTBL_ZKEVM_TESTNET,
|
|
173975
173952
|
walletProviderName: this.parameters?.walletProviderName,
|
|
173976
173953
|
browserProvider: this.browserProvider,
|
|
173977
173954
|
checkout: this.checkout,
|
|
173978
|
-
allowedChains: [
|
|
173955
|
+
allowedChains: [this.checkout.config.l1ChainId, this.checkout.config.l2ChainId],
|
|
173979
173956
|
};
|
|
173980
173957
|
this.reactRoot.render(jsx$1(React.StrictMode, { children: jsx$1(CustomAnalyticsProvider, { checkout: this.checkout, children: jsx$1(ThemeProvider, { id: "wallet-container", config: this.strongConfig(), children: jsx$1(HandoverProvider, { children: jsx$1(ConnectLoader, { widgetConfig: this.strongConfig(), params: connectLoaderParams, closeEvent: () => sendWalletWidgetCloseEvent(window), children: jsx$1(reactExports.Suspense, { fallback: jsx$1(LoadingView, { loadingText: t('views.LOADING_VIEW.text') }), children: jsx$1(WalletWidget, { config: this.strongConfig(), walletConfig: {
|
|
173981
173958
|
showDisconnectButton: this.properties.config?.showDisconnectButton,
|
|
@@ -175879,7 +175856,7 @@ function PurchaseConnectWalletDrawer({ heading, visible, onClose, onConnect, onE
|
|
|
175879
175856
|
walletRdns: info.rdns,
|
|
175880
175857
|
},
|
|
175881
175858
|
});
|
|
175882
|
-
if (info.rdns ===
|
|
175859
|
+
if (info.rdns === qt$2.PASSPORT) {
|
|
175883
175860
|
const { isConnected } = await checkout.checkIsWalletConnected({
|
|
175884
175861
|
provider: new D$6(providerDetail.provider),
|
|
175885
175862
|
});
|
|
@@ -176366,9 +176343,9 @@ function HandoverContent({ headingText, subheadingText, primaryButtonText, onPri
|
|
|
176366
176343
|
|
|
176367
176344
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
176368
176345
|
function sendPurchaseCloseEvent(eventTarget) {
|
|
176369
|
-
const closeWidgetEvent = new CustomEvent(
|
|
176346
|
+
const closeWidgetEvent = new CustomEvent(ro$1.IMTBL_PURCHASE_WIDGET_EVENT, {
|
|
176370
176347
|
detail: {
|
|
176371
|
-
type:
|
|
176348
|
+
type: Co$1.CLOSE_WIDGET,
|
|
176372
176349
|
data: {},
|
|
176373
176350
|
},
|
|
176374
176351
|
});
|
|
@@ -176379,9 +176356,9 @@ function sendPurchaseCloseEvent(eventTarget) {
|
|
|
176379
176356
|
eventTarget.dispatchEvent(closeWidgetEvent);
|
|
176380
176357
|
}
|
|
176381
176358
|
function sendConnectProviderSuccessEvent(eventTarget, providerType, provider, providerInfo) {
|
|
176382
|
-
const successEvent = new CustomEvent(
|
|
176359
|
+
const successEvent = new CustomEvent(ro$1.IMTBL_PURCHASE_WIDGET_EVENT, {
|
|
176383
176360
|
detail: {
|
|
176384
|
-
type:
|
|
176361
|
+
type: Co$1.CONNECT_SUCCESS,
|
|
176385
176362
|
data: {
|
|
176386
176363
|
provider,
|
|
176387
176364
|
providerType,
|
|
@@ -176395,9 +176372,9 @@ function sendConnectProviderSuccessEvent(eventTarget, providerType, provider, pr
|
|
|
176395
176372
|
eventTarget.dispatchEvent(successEvent);
|
|
176396
176373
|
}
|
|
176397
176374
|
const sendPurchaseSuccessEvent = (eventTarget, transactionHash, fundingMethod) => {
|
|
176398
|
-
const successEvent = new CustomEvent(
|
|
176375
|
+
const successEvent = new CustomEvent(ro$1.IMTBL_PURCHASE_WIDGET_EVENT, {
|
|
176399
176376
|
detail: {
|
|
176400
|
-
type:
|
|
176377
|
+
type: Co$1.SUCCESS,
|
|
176401
176378
|
data: {
|
|
176402
176379
|
transactionHash,
|
|
176403
176380
|
fundingMethod,
|
|
@@ -176621,13 +176598,13 @@ function Purchase$1({ checkout, environmentId, onCloseButtonClick, showBackButto
|
|
|
176621
176598
|
(async () => {
|
|
176622
176599
|
const tokenAddress = quote.currency.address;
|
|
176623
176600
|
const tokenAmount = String(quote.totalCurrencyAmount);
|
|
176624
|
-
const isSufficientBalance = hasSufficientBalance(balances, tokenAddress,
|
|
176601
|
+
const isSufficientBalance = hasSufficientBalance(balances, tokenAddress, J$4.IMTBL_ZKEVM_MAINNET.toString(), tokenAmount);
|
|
176625
176602
|
if (isSufficientBalance) {
|
|
176626
|
-
const token = findToken(tokens, tokenAddress,
|
|
176627
|
-
const balance = findBalance(balances, tokenAddress,
|
|
176603
|
+
const token = findToken(tokens, tokenAddress, J$4.IMTBL_ZKEVM_MAINNET.toString());
|
|
176604
|
+
const balance = findBalance(balances, tokenAddress, J$4.IMTBL_ZKEVM_MAINNET.toString());
|
|
176628
176605
|
if (token && balance) {
|
|
176629
176606
|
const directCryptoRoute = {
|
|
176630
|
-
isInsufficientGas: !hasSufficientGas(balances,
|
|
176607
|
+
isInsufficientGas: !hasSufficientGas(balances, J$4.IMTBL_ZKEVM_MAINNET.toString(), fromProvider),
|
|
176631
176608
|
amountData: {
|
|
176632
176609
|
fromToken: token,
|
|
176633
176610
|
fromAmount: tokenAmount,
|
|
@@ -176641,7 +176618,7 @@ function Purchase$1({ checkout, environmentId, onCloseButtonClick, showBackButto
|
|
|
176641
176618
|
setSelectedDirectCryptoPayRoute(directCryptoRoute);
|
|
176642
176619
|
}
|
|
176643
176620
|
}
|
|
176644
|
-
const availableRoutes = await fetchRoutes(squid, tokens, balances,
|
|
176621
|
+
const availableRoutes = await fetchRoutes(squid, tokens, balances, J$4.IMTBL_ZKEVM_MAINNET.toString(), tokenAddress, tokenAmount, 5, 1000, true);
|
|
176645
176622
|
setRoutes(availableRoutes);
|
|
176646
176623
|
setFetchingRoutes(false);
|
|
176647
176624
|
setInsufficientBalance(availableRoutes.length === 0);
|
|
@@ -176755,7 +176732,7 @@ function Purchase$1({ checkout, environmentId, onCloseButtonClick, showBackButto
|
|
|
176755
176732
|
signResponse: signResponse.signResponse,
|
|
176756
176733
|
},
|
|
176757
176734
|
});
|
|
176758
|
-
const updatedAmountData = getFromAmountData(tokens, selectedRouteData.amountData.balance, String(quote.totalCurrencyAmount),
|
|
176735
|
+
const updatedAmountData = getFromAmountData(tokens, selectedRouteData.amountData.balance, String(quote.totalCurrencyAmount), J$4.IMTBL_ZKEVM_MAINNET.toString(), quote.currency.address, selectedRouteData.amountData.additionalBuffer);
|
|
176759
176736
|
if (!updatedAmountData)
|
|
176760
176737
|
return;
|
|
176761
176738
|
const postHooks = signResponse?.postHooks ? {
|
|
@@ -176852,7 +176829,7 @@ function Purchase$1({ checkout, environmentId, onCloseButtonClick, showBackButto
|
|
|
176852
176829
|
|| (!!selectedDirectCryptoPayRoute && !selectedDirectCryptoPayRoute.isInsufficientGas) || isPayWithCard);
|
|
176853
176830
|
const walletOptions = reactExports.useMemo(() => providers
|
|
176854
176831
|
.map((detail) => {
|
|
176855
|
-
if (detail.info.rdns ===
|
|
176832
|
+
if (detail.info.rdns === qt$2.PASSPORT) {
|
|
176856
176833
|
return {
|
|
176857
176834
|
...detail,
|
|
176858
176835
|
info: {
|
|
@@ -315007,7 +314984,7 @@ function WithCard(props) {
|
|
|
315007
314984
|
const { providersState: { toProviderInfo, toAddress, checkout, }, } = useProvidersContext();
|
|
315008
314985
|
const recipientEmail = '';
|
|
315009
314986
|
const recipientAddress = toAddress || '';
|
|
315010
|
-
const isPassportWallet = toProviderInfo?.rdns ===
|
|
314987
|
+
const isPassportWallet = toProviderInfo?.rdns === qt$2.PASSPORT;
|
|
315011
314988
|
const excludeFiatCurrencies = [];
|
|
315012
314989
|
const { environment } = checkout.config;
|
|
315013
314990
|
const executeTxn = signResponse?.transactions.find((txn) => txn.methodCall.startsWith('execute'));
|
|
@@ -315146,9 +315123,9 @@ function PurchaseWidget({ config, environmentId, items, showBackButton, }) {
|
|
|
315146
315123
|
objectFit: 'cover',
|
|
315147
315124
|
objectPosition: 'center',
|
|
315148
315125
|
} }), viewState.view.type === PurchaseWidgetViews.PURCHASE && (jsx$1(Purchase$1, { checkout: checkout, environmentId: environmentId, showBackButton: showBackButton, onCloseButtonClick: () => sendPurchaseCloseEvent(eventTarget), onBackButtonClick: () => {
|
|
315149
|
-
orchestrationEvents.sendRequestGoBackEvent(eventTarget,
|
|
315126
|
+
orchestrationEvents.sendRequestGoBackEvent(eventTarget, ro$1.IMTBL_PURCHASE_WIDGET_EVENT, {});
|
|
315150
315127
|
} })), viewState.view.type === PurchaseWidgetViews.PAY_WITH_CARD && (jsx$1(PayWithCard, { onCloseButtonClick: () => {
|
|
315151
|
-
orchestrationEvents.sendRequestGoBackEvent(eventTarget,
|
|
315128
|
+
orchestrationEvents.sendRequestGoBackEvent(eventTarget, ro$1.IMTBL_PURCHASE_WIDGET_EVENT, {});
|
|
315152
315129
|
}, onError: () => { } }))] }) }) }) }));
|
|
315153
315130
|
}
|
|
315154
315131
|
|
|
@@ -315176,16 +315153,16 @@ function isValidArray(items) {
|
|
|
315176
315153
|
}
|
|
315177
315154
|
|
|
315178
315155
|
class Purchase extends Base$3 {
|
|
315179
|
-
eventTopic =
|
|
315156
|
+
eventTopic = ro$1.IMTBL_PURCHASE_WIDGET_EVENT;
|
|
315180
315157
|
getValidatedProperties({ config, }) {
|
|
315181
315158
|
let validatedConfig;
|
|
315182
315159
|
if (config) {
|
|
315183
315160
|
validatedConfig = config;
|
|
315184
|
-
if (config.theme ===
|
|
315185
|
-
validatedConfig.theme =
|
|
315161
|
+
if (config.theme === wo$1.LIGHT) {
|
|
315162
|
+
validatedConfig.theme = wo$1.LIGHT;
|
|
315186
315163
|
}
|
|
315187
315164
|
else {
|
|
315188
|
-
validatedConfig.theme =
|
|
315165
|
+
validatedConfig.theme = wo$1.DARK;
|
|
315189
315166
|
}
|
|
315190
315167
|
}
|
|
315191
315168
|
return {
|
|
@@ -315245,55 +315222,55 @@ class WidgetsFactory {
|
|
|
315245
315222
|
const { provider } = props ?? {};
|
|
315246
315223
|
const config = props?.config || {};
|
|
315247
315224
|
switch (type) {
|
|
315248
|
-
case
|
|
315225
|
+
case Io$1.CONNECT: {
|
|
315249
315226
|
return new Connect(this.sdk, {
|
|
315250
315227
|
config: { ...this.widgetConfig, ...(config) },
|
|
315251
315228
|
provider,
|
|
315252
315229
|
});
|
|
315253
315230
|
}
|
|
315254
|
-
case
|
|
315231
|
+
case Io$1.BRIDGE: {
|
|
315255
315232
|
return new Bridge(this.sdk, {
|
|
315256
315233
|
config: { ...this.widgetConfig, ...(config) },
|
|
315257
315234
|
provider,
|
|
315258
315235
|
});
|
|
315259
315236
|
}
|
|
315260
|
-
case
|
|
315237
|
+
case Io$1.WALLET: {
|
|
315261
315238
|
return new Wallet(this.sdk, {
|
|
315262
315239
|
config: { ...this.widgetConfig, ...(config) },
|
|
315263
315240
|
provider,
|
|
315264
315241
|
});
|
|
315265
315242
|
}
|
|
315266
|
-
case
|
|
315243
|
+
case Io$1.SWAP: {
|
|
315267
315244
|
return new Swap(this.sdk, {
|
|
315268
315245
|
config: { ...this.widgetConfig, ...(config) },
|
|
315269
315246
|
provider,
|
|
315270
315247
|
});
|
|
315271
315248
|
}
|
|
315272
|
-
case
|
|
315249
|
+
case Io$1.ONRAMP: {
|
|
315273
315250
|
return new OnRamp(this.sdk, {
|
|
315274
315251
|
config: { ...this.widgetConfig, ...(config) },
|
|
315275
315252
|
provider,
|
|
315276
315253
|
});
|
|
315277
315254
|
}
|
|
315278
|
-
case
|
|
315255
|
+
case Io$1.SALE: {
|
|
315279
315256
|
return new Sale(this.sdk, {
|
|
315280
315257
|
config: { ...this.widgetConfig, ...(config) },
|
|
315281
315258
|
provider,
|
|
315282
315259
|
});
|
|
315283
315260
|
}
|
|
315284
|
-
case
|
|
315261
|
+
case Io$1.IMMUTABLE_COMMERCE: {
|
|
315285
315262
|
return new CommerceWidgetRoot(this.sdk, {
|
|
315286
315263
|
config: { ...this.widgetConfig, ...(config) },
|
|
315287
315264
|
provider,
|
|
315288
315265
|
});
|
|
315289
315266
|
}
|
|
315290
|
-
case
|
|
315267
|
+
case Io$1.ADD_TOKENS: {
|
|
315291
315268
|
return new AddTokens(this.sdk, {
|
|
315292
315269
|
config: { ...this.widgetConfig, ...(config) },
|
|
315293
315270
|
provider,
|
|
315294
315271
|
});
|
|
315295
315272
|
}
|
|
315296
|
-
case
|
|
315273
|
+
case Io$1.PURCHASE: {
|
|
315297
315274
|
return new Purchase(this.sdk, {
|
|
315298
315275
|
config: { ...this.widgetConfig, ...(config) },
|
|
315299
315276
|
provider,
|
|
@@ -315305,4 +315282,4 @@ class WidgetsFactory {
|
|
|
315305
315282
|
};
|
|
315306
315283
|
}
|
|
315307
315284
|
|
|
315308
|
-
export {
|
|
315285
|
+
export { isError$1 as $, Ao$1 as A, Box as B, Co$1 as C, Body as D, Eo$1 as E, useAnalytics as F, EventTargetContext as G, Heading as H, CryptoFiatContext as I, tokenValueFormat as J, getDefaultTokenImage as K, Link as L, HeaderNavigation as M, sendCloseWidgetEvent as N, orchestrationEvents as O, amountInputValidation as P, useTheme as Q, Ro$1 as R, Stack as S, To as T, UserJourney as U, ViewActions as V, CloudImage as W, getRemoteImage as X, CryptoFiatProvider as Y, ConnectLoaderContext as Z, isAddress as _, ao$1 as a, isNativeToken as a$, LoadingView as a0, CryptoFiatActions as a1, useViewState as a2, useEventTargetState as a3, commerceFlows as a4, SharedViews as a5, ErrorView as a6, ConnectWidget as a7, ProvidersContextProvider as a8, PurchaseWidget as a9, Drawer as aA, Divider as aB, useProvidersContext as aC, WalletDrawer as aD, UnableToConnectDrawer as aE, Fragment$1 as aF, qt$2 as aG, removeSpace as aH, getProviderSlugFromRdns as aI, D$6 as aJ, isPassportProvider as aK, connectEIP6963Provider as aL, identifyUser as aM, ConnectEIP6963ProviderError as aN, ProvidersContextActions as aO, MenuItem as aP, J$4 as aQ, SQUID_NATIVE_TOKEN as aR, commonjsRequire$1 as aS, OnboardingPagination as aT, ViewContext as aU, useHandover as aV, HandoverTarget as aW, APPROVE_TXN_ANIMATION as aX, RiveStateMachineInput as aY, HandoverContent as aZ, keyframes$2 as a_, ConnectLoader as aa, ViewContextProvider as ab, hFlex as ac, _defineProperty$1 as ad, _objectWithoutProperties as ae, useForwardLocalDomRef as af, _slicedToArray as ag, useResizeObserver as ah, usePrevious as ai, useGetMotionProfile as aj, useBrowserEffect as ak, merge$2 as al, getHeadingTextStyles as am, getMotionProfileSx as an, useConvertSxToEmotionStyles as ao, DUMMY_WIDTH_PUSHER_TEXT as ap, useGetSubcomponentChild as aq, flattenChildren as ar, vFlex as as, centerFlexChildren as at, SmartClone as au, FormControlLabel as av, FormControlValidation as aw, FormControlCaption as ax, getDefaultExportFromCjs$2 as ay, commonjsGlobal$1 as az, reactExports as b, sendSaleTransactionSuccessEvent as b$, getTokenImageByAddress as b0, FramedImage as b1, FramedIcon as b2, ButtCon as b3, TextInput as b4, VerticalMenu as b5, TOKEN_PRIORITY_ORDER as b6, EllipsizedText as b7, Tooltip as b8, Sticker as b9, EXECUTE_TXN_ANIMATION as bA, Trans as bB, useExecute as bC, getRouteChains as bD, t$5 as bE, convertToNetworkChangeableProvider as bF, verifyAndSwitchChain as bG, PriceDisplay as bH, viewReducer as bI, initialViewState as bJ, useSquid as bK, useTokens as bL, v4 as bM, K$7 as bN, isValidAddress as bO, fetchChains as bP, fetchBalances as bQ, ServiceUnavailableErrorView as bR, hexToText as bS, compareStr as bT, co$1 as bU, TransakIframe as bV, toPascalCase as bW, sendSaleWidgetCloseEvent as bX, toStringifyTransactions as bY, sendSaleSuccessEvent as bZ, sendSaleFailedEvent as b_, getDurationFormatted as ba, getTotalRouteFees as bb, getRouteAndTokenBalances as bc, Icon as bd, Badge as be, getFormattedAmounts as bf, getRemoteVideo as bg, FramedVideo as bh, listVariants as bi, motion$1 as bj, listItemVariants as bk, Banner as bl, Ot$2 as bm, xt$1 as bn, useRoutes as bo, useInjectedProviders as bp, hn as bq, RouteError as br, dist$2 as bs, SquidFooter as bt, TOOLKIT_SQUID_URL as bu, merge$1 as bv, SvgIcon as bw, WalletWarningHero as bx, getFormattedNumber as by, FIXED_HANDOVER_DURATION as bz, parseUnits$1 as c, heroBackGroundStyles as c$, sendSalePaymentMethodEvent as c0, sendSalePaymentTokenEvent as c1, LoadingOverlay as c2, HandoverDuration as c3, FooterLogo as c4, StatusType as c5, prettyFormatNumber as c6, ShimmerCircle as c7, Te$1 as c8, abbreviateWalletAddress as c9, PASSPORT_URL as cA, getChainImage as cB, getChainIdBySlug as cC, useWalletConnect as cD, Logo as cE, RawImage as cF, isWalletConnectProvider as cG, AXELAR_SCAN_URL as cH, getNativeSymbolByChainSlug as cI, retry as cJ, JsonRpcProvider as cK, DEFAULT_TRANSACTIONS_RETRY_POLICY as cL, getChainSlugById as cM, getChainNameById as cN, getWalletProviderNameByProvider as cO, isMetaMaskProvider as cP, fe$4 as cQ, ButtonNavigationStyles as cR, NATIVE as cS, ETH_TOKEN_SYMBOL as cT, st$1 as cU, DEFAULT_QUOTE_REFRESH_INTERVAL as cV, addChainChangedListener as cW, removeChainChangedListener as cX, IMX_TOKEN_SYMBOL as cY, DEFAULT_TOKEN_DECIMALS as cZ, CHECKOUT_CDN_BASE_URL as c_, formatUnits as ca, Caption as cb, tokenSymbolNameOverrides as cc, Re$4 as cd, Ce$3 as ce, M$7 as cf, ct$1 as cg, isGasFree as ch, eventTargetReducer as ci, initialEventTargetState as cj, EventTargetActions as ck, ConnectWidgetViews as cl, ConnectLoaderActions as cm, widgetTheme as cn, axios$1 as co, toQuantity as cp, toBeHex as cq, getAddress as cr, keccak256$1 as cs, AbiCoder as ct, concat$5 as cu, ZeroAddress as cv, nt$1 as cw, S$7 as cx, q$6 as cy, ShimmerBox as cz, Contract as d, te$3 as d$, heroImageStyles as d0, SimpleTextBody as d1, FooterButton as d2, getEthTokenImage as d3, WITHDRAWAL_CLAIM_GAS_LIMIT as d4, Ct$2 as d5, r$8 as d6, StatusView as d7, sendOnRampWidgetCloseEvent as d8, Vt$1 as d9, getTertiaryButtonStyles as dA, isChildSubcomponent as dB, FormControlWrapper as dC, Select as dD, DuoCon as dE, heroImageBottomAlign as dF, isDualVariantIcon as dG, DEFAULT_TOKEN_SYMBOLS as dH, getStartingSize as dI, DEFAULT_BUTTON_SIZE as dJ, getResponsiveSx as dK, BUTTON_SIZES as dL, setDefaultSxBackgroundColor as dM, ZERO_BALANCE_STRING as dN, sendNetworkSwitchEvent as dO, ge$4 as dP, sortNetworksCompareFn as dQ, sortTokensByAmount as dR, sendWalletWidgetCloseEvent as dS, sendDisconnectWalletEvent as dT, FAQS_LINK as dU, useBrowserLayoutEffect as dV, se$3 as dW, T$5 as dX, oe$4 as dY, R$2 as dZ, a$3 as d_, url as da, TRANSAK_ORIGIN as db, sendOnRampSuccessEvent as dc, sendOnRampFailedEvent as dd, quickswapFooterStyles as de, quickswapFooterLogoStyles as df, quickswapFooterDisclaimerTextStyles as dg, wo$1 as dh, getImxTokenImage as di, getCryptoToUSDConversion as dj, calculateFeesFiat as dk, parseEther as dl, ESTIMATE_DEBOUNCE as dm, DEFAULT_TOKEN_VALIDATION_DECIMALS as dn, sendSwapWidgetCloseEvent as dp, u$4 as dq, DEFAULT_BALANCE_RETRY_POLICY as dr, yo$1 as ds, sendSwapSuccessEvent as dt, sendSwapFailedEvent as du, sendSwapRejectedEvent as dv, motion$3 as dw, BaseClickable as dx, AnimatePresence$1 as dy, ClassNames as dz, ae$3 as e, p$9 as e0, ne$4 as e1, y$8 as e2, getAugmentedNamespace as e3, __awaiter$5 as e4, __generator as e5, loadScript as e6, getNextIntegrationsURL as e7, unloadScript as e8, __spreadArray$1 as e9, isOffline as ea, __assign as eb, ContextCancelation as ec, applyDestinationMiddleware as ed, dist$4 as ee, isServer as ef, mergedOptions as eg, isPlainObject$1 as eh, pWhile as ei, PriorityQueue as ej, PersistedPriorityQueue as ek, attempt as el, isOnline as em, Context as en, pTimeout as eo, gracefulDecodeURIComponent as ep, WidgetsFactory as eq, fo$1 as f, go$1 as g, formatZeroAmount as h, io$1 as i, calculateCryptoToFiat as j, useTranslation as k, lo$1 as l, mo$1 as m, no$1 as n, oo$1 as o, po$1 as p, dist$3 as q, ro$1 as r, so$1 as s, getRemoteRive as t, uo as u, tt$1 as v, jsx$1 as w, jsxs as x, Button as y, SimpleLayout as z };
|