From ec3685152d717fd3e7002c9161b2607a82d6bd02 Mon Sep 17 00:00:00 2001 From: XueMoMo <2681350846@qq.com> Date: Mon, 12 Aug 2024 06:28:18 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20crustio/?= =?UTF-8?q?crust-files@6db4cd6e6b7dc7a871bac72546c1ff5af602a277=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/404/index.html | 2 +- .../_buildManifest.js | 0 .../_ssgManifest.js | 0 ...app-c731668041705172496b.js => _app-4c4ab82e0f2473666959.js} | 2 +- docs/docs/CrustFiles_DeveloperGuide/index.html | 2 +- docs/docs/CrustFiles_FAQ/index.html | 2 +- docs/docs/CrustFiles_ShareandEarn/index.html | 2 +- docs/docs/CrustFiles_Users/index.html | 2 +- docs/docs/CrustFiles_Welcome/index.html | 2 +- docs/files/index.html | 2 +- docs/files/vault/index.html | 2 +- docs/home/index.html | 2 +- docs/index.html | 2 +- docs/invite_bonus_guide/index.html | 2 +- docs/mobile/index.html | 2 +- docs/rewards_history/index.html | 2 +- docs/setting/index.html | 2 +- docs/share-earn/index.html | 2 +- docs/share/index.html | 2 +- docs/user/index.html | 2 +- 20 files changed, 18 insertions(+), 18 deletions(-) rename docs/_next/static/{wePOh3D8IL0sTLAI3Q-XE => 4T8sMMro0eCvpY-51kErm}/_buildManifest.js (100%) rename docs/_next/static/{wePOh3D8IL0sTLAI3Q-XE => 4T8sMMro0eCvpY-51kErm}/_ssgManifest.js (100%) rename docs/_next/static/chunks/pages/{_app-c731668041705172496b.js => _app-4c4ab82e0f2473666959.js} (68%) diff --git a/docs/404/index.html b/docs/404/index.html index dda0ed62..a04a9558 100644 --- a/docs/404/index.html +++ b/docs/404/index.html @@ -1 +1 @@ -
\ No newline at end of file + \ No newline at end of file diff --git a/docs/_next/static/wePOh3D8IL0sTLAI3Q-XE/_buildManifest.js b/docs/_next/static/4T8sMMro0eCvpY-51kErm/_buildManifest.js similarity index 100% rename from docs/_next/static/wePOh3D8IL0sTLAI3Q-XE/_buildManifest.js rename to docs/_next/static/4T8sMMro0eCvpY-51kErm/_buildManifest.js diff --git a/docs/_next/static/wePOh3D8IL0sTLAI3Q-XE/_ssgManifest.js b/docs/_next/static/4T8sMMro0eCvpY-51kErm/_ssgManifest.js similarity index 100% rename from docs/_next/static/wePOh3D8IL0sTLAI3Q-XE/_ssgManifest.js rename to docs/_next/static/4T8sMMro0eCvpY-51kErm/_ssgManifest.js diff --git a/docs/_next/static/chunks/pages/_app-c731668041705172496b.js b/docs/_next/static/chunks/pages/_app-4c4ab82e0f2473666959.js similarity index 68% rename from docs/_next/static/chunks/pages/_app-c731668041705172496b.js rename to docs/_next/static/chunks/pages/_app-4c4ab82e0f2473666959.js index 5c70b3d0..88851877 100644 --- a/docs/_next/static/chunks/pages/_app-c731668041705172496b.js +++ b/docs/_next/static/chunks/pages/_app-4c4ab82e0f2473666959.js @@ -1020,4 +1020,4 @@ width: 16px; `,_h=Qo(Rs)` margin-top: 32px; -`,Sh=e=>{const t=Ps(e),r=Ri(cl),[n,i]=Si(!0),[o,a]=Si(!1);let s,c;ki((()=>{const e=Na();a(!!e&&"sent"in e&&e.sent)})),(null==r?void 0:r.wallet)&&"universalLink"in r.wallet&&("universal-link"===r.wallet.openMethod||Wr(r.wallet.universalLink)&&ys())&&(s=r.wallet.universalLink),(null==r?void 0:r.wallet)&&"deepLink"in r.wallet&&("custom-deeplink"===r.wallet.openMethod||Wr(r.wallet.deepLink)&&ys())&&(c=r.wallet.deepLink);const u=()=>{const e=Na(),t="returnStrategy"in e?e.returnStrategy:Pf.returnStrategy,r=!n();i(!1),Wr(s)?fd(s,{returnStrategy:t,twaReturnUrl:"twaReturnUrl"in e?e.twaReturnUrl:Pf.twaReturnUrl,forceRedirect:r}):dd(s,c,{returnStrategy:t,forceRedirect:r},(()=>{}))};return $i(yh,no(t,{get children(){return[Mi((()=>e.icon)),$i(bh,{get translationKey(){return e.headerTranslationKey},get translationValues(){return e.headerTranslationValues}}),$i(vh,{get translationKey(){return e.textTranslationKey},get translationValues(){return e.textTranslationValues}}),$i(ao,{get when(){return!o()&&("open-wallet"===e.showButton&&s||"open-wallet"!==e.showButton)},get children(){return $i(wh,{disabled:!0,"data-tc-connect-button-loading":"true",get children(){return $i(xh,{})}})}}),$i(ao,{get when(){return o()},get children(){return[$i(ao,{get when(){return"open-wallet"!==e.showButton},get children(){return $i(_h,{onClick:()=>e.onClose(),get children(){return $i(ud,{translationKey:"common.close",children:"Close"})}})}}),$i(ao,{get when(){return"open-wallet"===e.showButton&&s},get children(){return $i(_h,{onClick:u,get children(){return $i(ud,{translationKey:"common.openWallet",children:"Open wallet"})}})}})]}})]}}))},Ah=e=>{const t=Ri(cl),[r]=Oc();return $i(Sh,{headerTranslationKey:"actionModal.confirmTransaction.header",get headerTranslationValues(){return{name:t.wallet&&"name"in t.wallet?t.wallet.name:r("common.yourWallet",{},"Your wallet")}},textTranslationKey:"actionModal.confirmTransaction.text",get icon(){return $i(du,{size:"m"})},onClose:()=>e.onClose(),showButton:"open-wallet","data-tc-confirm-modal":"true"})},Eh=e=>$i(Sh,{headerTranslationKey:"actionModal.transactionCanceled.header",textTranslationKey:"actionModal.transactionCanceled.text",get icon(){return $i(cu,{size:"m"})},onClose:()=>e.onClose(),"data-tc-transaction-canceled-modal":"true"}),kh=e=>$i(Sh,{headerTranslationKey:"actionModal.transactionSent.header",textTranslationKey:"actionModal.transactionSent.text",get icon(){return $i(iu,{size:"m"})},onClose:()=>e.onClose(),"data-tc-transaction-sent-modal":"true"}),Mh=()=>$i(cc,{get opened(){var e;return Mi((()=>null!==Na()))()&&!0===(null==(e=Na())?void 0:e.openModal)},get enableAndroidBackHandler(){return Pf.enableAndroidBackHandler},onClose:()=>La(null),"data-tc-actions-modal-container":"true",get children(){return $i(so,{get children(){return[$i(co,{get when(){return"transaction-sent"===Na().name},get children(){return $i(kh,{onClose:()=>La(null)})}}),$i(co,{get when(){return"transaction-canceled"===Na().name},get children(){return $i(Eh,{onClose:()=>La(null)})}}),$i(co,{get when(){return"confirm-transaction"===Na().name},get children(){return $i(Ah,{onClose:()=>La(null)})}})]}})}}),Ch=()=>{const{locale:e}=Oc()[1];ki((()=>e(Pf.language))),ki((()=>{Ta()&&il()}));const t=Ri(Fa),r=Ri(cl),[n,i]=Si(!1),o=()=>{var e;return"loading"===(null==(e=Pf.connectRequestParameters)?void 0:e.state)},a=Mi((()=>{var e;if(!o())return null==(e=Pf.connectRequestParameters)?void 0:e.value})),s=e=>{r.closeSingleWalletModal(e)};return Ii(t.onStatusChange((e=>{e&&s("wallet-selected")}))),Ii((()=>{i(!1)})),$i(Tf,{get opened(){return Ta()},get enableAndroidBackHandler(){return Pf.enableAndroidBackHandler},onClose:()=>s("action-cancelled"),onClickQuestion:()=>i((e=>!e)),"data-tc-wallets-modal-container":"true",get children(){return[$i(ao,{get when(){return n()},get children(){return $i(Ad,{onBackClick:()=>i(!1)})}}),$i(ao,{get when(){return!n()},get children(){return[$i(ao,{get when(){return o()},get children(){return[$i(If,{translationKey:"walletModal.loading",children:"Wallets list is loading"}),$i(Of,{get children(){return $i(du,{size:"m"})}})]}}),$i(ao,{get when(){return!o()},get children(){return $i(Bo,{get component(){return rl()?Fd:pd},get wallet(){return Ia()},get additionalRequest(){return a()},onBackClick:()=>{},backDisabled:!0})}})]}})]}})},Th=e=>{const t=Tc(Da,Pf.language);return customElements.define(ea,class extends HTMLElement{}),document.body.hasAttribute("ontouchstart")||document.body.setAttribute("ontouchstart",""),$i(Ic.Provider,{value:t,get children(){return $i(cl.Provider,{get value(){return e.tonConnectUI},get children(){return $i(Fa.Provider,{get value(){return Pf.connector},get children(){return[$i(na,{}),$i(Xo,{theme:as,get children(){return[$i(ao,{get when(){return Pf.buttonRootId},get children(){return $i(Ro,{get mount(){return document.getElementById(Pf.buttonRootId)},get children(){return $i(Cf,{})}})}}),$i(Bo,{component:ea,get children(){return[$i(mh,{}),$i(Ch,{}),$i(Mh,{})]}})]}})]}})}})}})},Ih=()=>{setTimeout((()=>Ea({status:"opened",closeReason:null})))},Oh=e=>{setTimeout((()=>Ea({status:"closed",closeReason:e})))},Ph=e=>{setTimeout((()=>Ca({status:"opened",closeReason:null,walletInfo:e})))},Rh=e=>{setTimeout((()=>Ca({status:"closed",closeReason:e})))},Bh=e=>{setTimeout((()=>La(e)))},Nh=()=>{setTimeout((()=>La(null)))},Lh=()=>Pa(),jh=()=>Ba(null),Dh=(e,t)=>function(e,t,r,n={}){let i;return _i((n=>{i=n,t===document?e():So(t,e(),t.firstChild?null:void 0,r)}),n.owner),()=>{i(),t.textContent=""}}((()=>$i(Th,{tonConnectUI:t})),document.getElementById(e));class Uh{constructor(e){ai(this,"connector"),ai(this,"setConnectRequestParametersCallback"),ai(this,"consumers",[]),ai(this,"tracker"),ai(this,"state",Aa()),this.connector=e.connector,this.tracker=e.tracker,this.setConnectRequestParametersCallback=e.setConnectRequestParametersCallback,ki((()=>{const e=Aa();this.state=e,this.consumers.forEach((t=>t(e)))}))}open(){return si(this,null,(function*(){this.tracker.trackConnectionStarted();const e=(yield this.connector.getWallets()).find(hn);return e?this.connectEmbeddedWallet(e):this.openWalletsModal()}))}close(e="action-cancelled"){"action-cancelled"===e&&this.tracker.trackConnectionError("Connection was cancelled"),Oh(e)}onStateChange(e){return this.consumers.push(e),()=>{this.consumers=this.consumers.filter((t=>t!==e))}}connectEmbeddedWallet(e){const t=t=>{Ba(e),this.connector.connect({jsBridgeKey:e.jsBridgeKey},t)},r=Pf.connectRequestParameters;"loading"===(null==r?void 0:r.state)?this.setConnectRequestParametersCallback(t):t(null==r?void 0:r.value)}openWalletsModal(){return si(this,null,(function*(){return ys()&&bs(),Ih(),new Promise((e=>{const t=this.onStateChange((r=>{const{status:n}=r;"opened"===n&&(t(),e())}))}))}))}}class Fh{constructor(e){ai(this,"connector"),ai(this,"consumers",[]),this.connector=e.connector,ki((()=>{const e=Na();this.consumers.forEach((t=>t(e)))}))}onStateChange(e){return this.consumers.push(e),()=>{this.consumers=this.consumers.filter((t=>t!==e))}}}class Hh{constructor(e){ai(this,"connector"),ai(this,"setConnectRequestParametersCallback"),ai(this,"consumers",[]),ai(this,"tracker"),ai(this,"state",Ma()),this.connector=e.connector,this.tracker=e.tracker,this.setConnectRequestParametersCallback=e.setConnectRequestParametersCallback,ki((()=>{const e=Ma();this.state=e,this.consumers.forEach((t=>t(e)))}))}open(e){return si(this,null,(function*(){this.tracker.trackConnectionStarted();const t=Nf(yield this.connector.getWallets(),Pf.walletsListConfiguration),r=t.find(hn);if(!!r)return this.connectEmbeddedWallet(r);const n=t.filter(pn).find((t=>Uf(t,e)));if(!!n)return this.openSingleWalletModal(n);const i=`Trying to open modal window with unknown wallet "${e}".`;throw this.tracker.trackConnectionError(i),new ca(i)}))}close(e="action-cancelled"){"action-cancelled"===e&&this.tracker.trackConnectionError("Connection was cancelled"),Rh("action-cancelled")}onStateChange(e){return this.consumers.push(e),()=>{this.consumers=this.consumers.filter((t=>t!==e))}}connectEmbeddedWallet(e){const t=t=>{Ba(e),this.connector.connect({jsBridgeKey:e.jsBridgeKey},t)},r=Pf.connectRequestParameters;"loading"===(null==r?void 0:r.state)?this.setConnectRequestParametersCallback(t):t(null==r?void 0:r.value)}openSingleWalletModal(e){return si(this,null,(function*(){return ys()&&bs(),Ph(e),new Promise((e=>{const t=this.onStateChange((r=>{const{status:n}=r;"opened"===n&&(t(),e())}))}))}))}}class zh{constructor(e){var t;ai(this,"eventPrefix","ton-connect-ui-"),ai(this,"tonConnectUiVersion"),ai(this,"tonConnectSdkVersion",null),ai(this,"eventDispatcher"),this.eventDispatcher=null!=(t=null==e?void 0:e.eventDispatcher)?t:new Rn,this.tonConnectUiVersion=e.tonConnectUiVersion,this.init().catch()}get version(){return wn({ton_connect_sdk_lib:this.tonConnectSdkVersion,ton_connect_ui_lib:this.tonConnectUiVersion})}init(){return si(this,null,(function*(){try{yield this.setRequestVersionHandler(),this.tonConnectSdkVersion=yield this.requestTonConnectSdkVersion()}catch(Bp){}}))}setRequestVersionHandler(){return si(this,null,(function*(){yield this.eventDispatcher.addEventListener("ton-connect-ui-request-version",(()=>si(this,null,(function*(){yield this.eventDispatcher.dispatchEvent("ton-connect-ui-response-version",vn(this.tonConnectUiVersion))}))))}))}requestTonConnectSdkVersion(){return si(this,null,(function*(){return new Promise(((e,t)=>si(this,null,(function*(){try{yield this.eventDispatcher.addEventListener("ton-connect-response-version",(t=>{e(t.detail.version)}),{once:!0}),yield this.eventDispatcher.dispatchEvent("ton-connect-request-version",{type:"request-version"})}catch(Bp){t(Bp)}}))))}))}dispatchUserActionEvent(e){var t;try{null==(t=this.eventDispatcher)||t.dispatchEvent(`${this.eventPrefix}${e.type}`,e).catch()}catch(Bp){}}trackConnectionStarted(...e){try{const t=_n(this.version,...e);this.dispatchUserActionEvent(t)}catch(Bp){}}trackConnectionCompleted(...e){try{const t=Sn(this.version,...e);this.dispatchUserActionEvent(t)}catch(Bp){}}trackConnectionError(...e){try{const t=An(this.version,...e);this.dispatchUserActionEvent(t)}catch(Bp){}}trackConnectionRestoringStarted(...e){try{const t=En(this.version,...e);this.dispatchUserActionEvent(t)}catch(Bp){}}trackConnectionRestoringCompleted(...e){try{const t=kn(this.version,...e);this.dispatchUserActionEvent(t)}catch(Bp){}}trackConnectionRestoringError(...e){try{const t=Mn(this.version,...e);this.dispatchUserActionEvent(t)}catch(Bp){}}trackDisconnection(...e){try{const t=Pn(this.version,...e);this.dispatchUserActionEvent(t)}catch(Bp){}}trackTransactionSentForSignature(...e){try{const t=Tn(this.version,...e);this.dispatchUserActionEvent(t)}catch(Bp){}}trackTransactionSigned(...e){try{const t=In(this.version,...e);this.dispatchUserActionEvent(t)}catch(Bp){}}trackTransactionSigningFailed(...e){try{const t=On(this.version,...e);this.dispatchUserActionEvent(t)}catch(Bp){}}}class qh{constructor(e){if(ai(this,"walletInfoStorage",new xa),ai(this,"preferredWalletStorage",new _a),ai(this,"tracker"),ai(this,"walletInfo",null),ai(this,"systemThemeChangeUnsubscribe",null),ai(this,"actionsConfiguration"),ai(this,"walletsList"),ai(this,"connectRequestParametersCallback"),ai(this,"connector"),ai(this,"modal"),ai(this,"singleWalletModal"),ai(this,"transactionModal"),ai(this,"connectionRestored",Promise.resolve(!1)),e&&"connector"in e&&e.connector)this.connector=e.connector;else{if(!(e&&"manifestUrl"in e&&e.manifestUrl))throw new ca("You have to specify a `manifestUrl` or a `connector` in the options.");this.connector=new Nn({manifestUrl:e.manifestUrl,eventDispatcher:null==e?void 0:e.eventDispatcher})}this.tracker=new zh({eventDispatcher:null==e?void 0:e.eventDispatcher,tonConnectUiVersion:"2.0.5"}),this.modal=new Uh({connector:this.connector,tracker:this.tracker,setConnectRequestParametersCallback:e=>{this.connectRequestParametersCallback=e}}),this.singleWalletModal=new Hh({connector:this.connector,tracker:this.tracker,setConnectRequestParametersCallback:e=>{this.connectRequestParametersCallback=e}}),this.transactionModal=new Fh({connector:this.connector}),this.walletsList=this.getWallets(),this.walletsList.then((e=>{return pa((t=e.map((e=>e.imageUrl)),[...new Set(t)]));var t}));const t=this.normalizeWidgetRoot(null==e?void 0:e.widgetRootId);this.subscribeToWalletChange(),!1!==(null==e?void 0:e.restoreConnection)&&(this.connectionRestored=function(e){return si(this,null,(function*(){return yield new Promise((e=>requestAnimationFrame(e))),e()}))}((()=>si(this,null,(function*(){return this.tracker.trackConnectionRestoringStarted(),yield this.connector.restoreConnection(),this.connector.connected?this.tracker.trackConnectionRestoringCompleted(this.wallet):(this.tracker.trackConnectionRestoringError("Connection was not restored"),this.walletInfoStorage.removeWalletInfo()),this.connector.connected}))))),this.uiOptions=os(e,{uiPreferences:{theme:"SYSTEM"}});const r=this.preferredWalletStorage.getPreferredWalletAppName();Rf({connector:this.connector,preferredWalletAppName:r}),Dh(t,this)}static getWallets(){return Nn.getWallets()}get connected(){return this.connector.connected}get account(){return this.connector.account}get wallet(){return this.connector.wallet?ii(ii({},this.connector.wallet),this.walletInfo):null}set uiOptions(e){var t,r,n,i,o,a,s;this.checkButtonRootExist(e.buttonRootId),this.actionsConfiguration=e.actionsConfiguration,(null==(t=e.uiPreferences)?void 0:t.theme)?"SYSTEM"!==(null==(r=e.uiPreferences)?void 0:r.theme)?(null==(n=this.systemThemeChangeUnsubscribe)||n.call(this),ls(e.uiPreferences.theme,e.uiPreferences.colorsSet)):(ls(window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches?No.LIGHT:No.DARK,e.uiPreferences.colorsSet),this.systemThemeChangeUnsubscribe||(this.systemThemeChangeUnsubscribe=function(e){const t=t=>e(t.matches?No.DARK:No.LIGHT);return window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t),()=>window.matchMedia("(prefers-color-scheme: dark)").removeEventListener("change",t)}(ls))):(null==(i=e.uiPreferences)?void 0:i.colorsSet)&&(a=e.uiPreferences.colorsSet,us[No.DARK]=os(a[No.DARK],us[No.DARK]),us[No.LIGHT]=os(a[No.LIGHT],us[No.LIGHT]),ss((e=>({colors:os(us[e.theme],cs[e.theme])})))),(null==(o=e.uiPreferences)?void 0:o.borderRadius)&&(s=e.uiPreferences.borderRadius,ss({borderRadius:s})),Rf((t=>{var r,n;const i=os(ii(ii(ii(ii({},e.language&&{language:e.language}),!!(null==(r=e.actionsConfiguration)?void 0:r.returnStrategy)&&{returnStrategy:e.actionsConfiguration.returnStrategy}),!!(null==(n=e.actionsConfiguration)?void 0:n.twaReturnUrl)&&{twaReturnUrl:e.actionsConfiguration.twaReturnUrl}),!!e.walletsListConfiguration&&{walletsListConfiguration:e.walletsListConfiguration}),Ga(t));return void 0!==e.buttonRootId&&(i.buttonRootId=e.buttonRootId),void 0!==e.enableAndroidBackHandler&&(i.enableAndroidBackHandler=e.enableAndroidBackHandler),i}))}setConnectRequestParameters(e){var t;Rf({connectRequestParameters:e}),"ready"!==(null==e?void 0:e.state)&&e||null==(t=this.connectRequestParametersCallback)||t.call(this,null==e?void 0:e.value)}getWallets(){return si(this,null,(function*(){return this.connector.getWallets()}))}onStatusChange(e,t){return this.connector.onStatusChange((t=>si(this,null,(function*(){if(t){const r=yield this.getSelectedWalletInfo(t);e(ii(ii({},t),r||this.walletInfoStorage.getWalletInfo()))}else e(t)}))),t)}openModal(){return si(this,null,(function*(){return this.modal.open()}))}closeModal(e){this.modal.close(e)}onModalStateChange(e){return this.modal.onStateChange(e)}get modalState(){return this.modal.state}openSingleWalletModal(e){return si(this,null,(function*(){return this.singleWalletModal.open(e)}))}closeSingleWalletModal(e){this.singleWalletModal.close(e)}onSingleWalletModalStateChange(e){return this.singleWalletModal.onStateChange(e)}get singleWalletModalState(){return this.singleWalletModal.state}connectWallet(){return si(this,null,(function*(){const e=(yield this.getWallets()).find(hn);return e?yield this.connectEmbeddedWallet(e):yield this.connectExternalWallet()}))}disconnect(){return this.tracker.trackDisconnection(this.wallet,"dapp"),Nh(),jh(),this.walletInfoStorage.removeWalletInfo(),this.connector.disconnect()}sendTransaction(e,t){return si(this,null,(function*(){if(this.tracker.trackTransactionSentForSignature(this.wallet,e),!this.connected)throw this.tracker.trackTransactionSigningFailed(this.wallet,e,"Wallet was not connected"),new ca("Connect wallet to send a transaction.");ys()&&bs();const{notifications:r,modals:n,returnStrategy:i,twaReturnUrl:o,skipRedirectToWallet:a}=this.getModalsAndNotificationsConfiguration(t);Bh({name:"confirm-transaction",showNotification:r.includes("before"),openModal:n.includes("before"),sent:!1});const s=()=>{c.signal.aborted||(Bh({name:"confirm-transaction",showNotification:r.includes("before"),openModal:n.includes("before"),sent:!0}),this.walletInfo&&"universalLink"in this.walletInfo&&("universal-link"===this.walletInfo.openMethod||"custom-deeplink"===this.walletInfo.openMethod)&&(Wr(this.walletInfo.universalLink)?fd(this.walletInfo.universalLink,{returnStrategy:i,twaReturnUrl:o||Pf.twaReturnUrl,forceRedirect:!1}):dd(this.walletInfo.universalLink,this.walletInfo.deepLink,{returnStrategy:i,forceRedirect:!1},(()=>{}))))},c=new AbortController,u=this.onTransactionModalStateChange((e=>{(null==e?void 0:e.openModal)||(u(),e||c.abort())}));try{const t=yield this.waitForSendTransaction({transaction:e,signal:c.signal},s);return this.tracker.trackTransactionSigned(this.wallet,e,t),Bh({name:"transaction-sent",showNotification:r.includes("success"),openModal:n.includes("success")}),t}catch(Bp){throw Bh({name:"transaction-canceled",showNotification:r.includes("error"),openModal:n.includes("error")}),Bp instanceof Er?Bp:(console.error(Bp),new ca("Unhandled error:"+Bp))}finally{u()}}))}connectEmbeddedWallet(e){return si(this,null,(function*(){const t=t=>{Ba(e),this.connector.connect({jsBridgeKey:e.jsBridgeKey},t)},r=Pf.connectRequestParameters;return"loading"===(null==r?void 0:r.state)?this.connectRequestParametersCallback=t:t(null==r?void 0:r.value),yield this.waitForWalletConnection({ignoreErrors:!1})}))}connectExternalWallet(){return si(this,null,(function*(){const e=new AbortController;Ih();const t=this.onModalStateChange((r=>{const{status:n,closeReason:i}=r;"opened"!==n&&(t(),"action-cancelled"===i&&e.abort())}));return yield this.waitForWalletConnection({ignoreErrors:!0,signal:e.signal})}))}waitForWalletConnection(e){return si(this,null,(function*(){return new Promise(((t,r)=>{this.tracker.trackConnectionStarted();const{ignoreErrors:n=!1,signal:i=null}=e;if(i&&i.aborted)return this.tracker.trackConnectionError("Connection was cancelled"),r(new ca("Wallet was not connected"));const o=e=>si(this,null,(function*(){if(e)this.tracker.trackConnectionCompleted(e),s(),t(e);else{if(this.tracker.trackConnectionError("Connection was cancelled"),n)return;s(),r(new ca("Wallet was not connected"))}})),a=e=>{this.tracker.trackConnectionError(e.message),n||(s(),r(e))},s=this.onStatusChange((e=>o(e)),(e=>a(e)));i&&i.addEventListener("abort",(()=>{s(),r(new ca("Wallet was not connected"))}),{once:!0})}))}))}waitForSendTransaction(e,t){return si(this,null,(function*(){return new Promise(((r,n)=>{const{transaction:i,signal:o}=e;if(o.aborted)return this.tracker.trackTransactionSigningFailed(this.wallet,i,"Transaction was cancelled"),n(new ca("Transaction was not sent"));const a=e=>si(this,null,(function*(){r(e)})),s=()=>{this.tracker.trackTransactionSigningFailed(this.wallet,i,"Transaction was cancelled"),n(new ca("Transaction was not sent"))};o.addEventListener("abort",s,{once:!0}),this.connector.sendTransaction(i,{onRequestSent:t,signal:o}).then((e=>(o.removeEventListener("abort",s),a(e)))).catch((e=>(o.removeEventListener("abort",s),(e=>{n(e)})(e))))}))}))}onTransactionModalStateChange(e){return this.transactionModal.onStateChange(e)}subscribeToWalletChange(){this.connector.onStatusChange((e=>si(this,null,(function*(){var t;e?(yield this.updateWalletInfo(e),this.setPreferredWalletAppName((null==(t=this.walletInfo)?void 0:t.appName)||e.device.appName)):this.walletInfoStorage.removeWalletInfo()}))))}setPreferredWalletAppName(e){this.preferredWalletStorage.setPreferredWalletAppName(e),Rf({preferredWalletAppName:e})}getSelectedWalletInfo(e){return si(this,null,(function*(){let t,r=Lh();if(!r)return null;if("name"in r)t=r;else{const n=Nf(yield this.walletsList,Pf.walletsListConfiguration).find((t=>Uf(t,e.device.appName)));if(!n)throw new ca(`Cannot find WalletInfo for the '${e.device.appName}' wallet`);t=ii(ii({},n),r)}return t}))}updateWalletInfo(e){return si(this,null,(function*(){const t=yield this.getSelectedWalletInfo(e);if(t)return this.walletInfo=t,void this.walletInfoStorage.setWalletInfo(t);const r=this.walletInfoStorage.getWalletInfo();this.walletInfo=r||((yield this.walletsList).find((t=>Uf(t,e.device.appName)))||null)}))}normalizeWidgetRoot(e){if(!e||!document.getElementById(e)){e="tc-widget-root";const t=document.createElement("div");t.id=e,document.body.appendChild(t)}return e}checkButtonRootExist(e){if(null!=e&&!document.getElementById(e))throw new ca(`${e} element not found in the document.`)}getModalsAndNotificationsConfiguration(e){var t,r,n,i,o,a;const s=["before","success","error"];let c=s;(null==(t=this.actionsConfiguration)?void 0:t.notifications)&&"all"!==(null==(r=this.actionsConfiguration)?void 0:r.notifications)&&(c=this.actionsConfiguration.notifications),(null==e?void 0:e.notifications)&&(c="all"===e.notifications?s:e.notifications);let u=["before"];(null==(n=this.actionsConfiguration)?void 0:n.modals)&&(u="all"===this.actionsConfiguration.modals?s:this.actionsConfiguration.modals),(null==e?void 0:e.modals)&&(u="all"===e.modals?s:e.modals);const l=(null==e?void 0:e.returnStrategy)||(null==(i=this.actionsConfiguration)?void 0:i.returnStrategy)||"back",f=(null==e?void 0:e.twaReturnUrl)||(null==(o=this.actionsConfiguration)?void 0:o.twaReturnUrl);let d=(null==e?void 0:e.skipRedirectToWallet)||(null==(a=this.actionsConfiguration)?void 0:a.skipRedirectToWallet)||"ios";return ys()&&(d="never"),{notifications:c,modals:u,returnStrategy:l,twaReturnUrl:f,skipRedirectToWallet:d}}}var Vh,Wh=Object.defineProperty,Gh=Object.getOwnPropertySymbols,Kh=Object.prototype.hasOwnProperty,Zh=Object.prototype.propertyIsEnumerable,Xh=(e,t,r)=>t in e?Wh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Yh=(e,t)=>{for(var r in t||(t={}))Kh.call(t,r)&&Xh(e,r,t[r]);if(Gh)for(var r of Gh(t))Zh.call(t,r)&&Xh(e,r,t[r]);return e},Jh={exports:{}},Qh={};!function(e){e.exports=function(){if(Vh)return Qh;Vh=1;var e=l,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function a(e,r,a){var s,c={},u=null,l=null;for(s in void 0!==a&&(u=""+a),void 0!==r.key&&(u=""+r.key),void 0!==r.ref&&(l=r.ref),r)n.call(r,s)&&!o.hasOwnProperty(s)&&(c[s]=r[s]);if(e&&e.defaultProps)for(s in r=e.defaultProps)void 0===c[s]&&(c[s]=r[s]);return{$$typeof:t,type:e,key:u,ref:l,props:c,_owner:i.current}}return Qh.Fragment=r,Qh.jsx=a,Qh.jsxs=a,Qh}()}(Jh);const $h=Jh.exports.jsx;function ep(){return"undefined"!==typeof window}const tp=(0,l.createContext)(null);let rp=null;(0,l.memo)((e=>{var t=e,{children:r}=t,n=((e,t)=>{var r={};for(var n in e)Kh.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&Gh)for(var n of Gh(e))t.indexOf(n)<0&&Zh.call(e,n)&&(r[n]=e[n]);return r})(t,["children"]);return ep()&&!rp&&(rp=new qh(n)),$h(tp.Provider,{value:rp,children:r})}));class np extends ca{constructor(...e){super(...e),Object.setPrototypeOf(this,np.prototype)}}class ip extends np{constructor(...e){super(...e),Object.setPrototypeOf(this,ip.prototype)}}function op(){const e=(0,l.useContext)(tp),t=(0,l.useCallback)((t=>{e&&(e.uiOptions=t)}),[e]);return ep()?(function(e){if(!e)throw new ip("You should addc&&(h.c.length=c):n&&(h=h.mod(t))}if(i){if(0===(i=a(i/2)))break;d=i%2}else if($(e=e.times(r),e.e+1,1),14 =0;n--){for(var u=t.words[n],l=c-1;l>=0;l--){var f=u>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===n&&0===l)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}c=26}return i},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new M(e)},i(M,k),M.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},M.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},M.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},M.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},M.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},89509:function(e,t,r){var n=r(48764),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"===typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!==typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"===typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},2399:function(e,t,r){"use strict";var n,i=r(34155),o=r(48764),a=o.Buffer,s={};for(n in o)o.hasOwnProperty(n)&&"SlowBuffer"!==n&&"Buffer"!==n&&(s[n]=o[n]);var c=s.Buffer={};for(n in a)a.hasOwnProperty(n)&&"allocUnsafe"!==n&&"allocUnsafeSlow"!==n&&(c[n]=a[n]);if(s.Buffer.prototype=a.prototype,c.from&&c.from!==Uint8Array.from||(c.from=function(e,t,r){if("number"===typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&"undefined"===typeof e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return a(e,t,r)}),c.alloc||(c.alloc=function(e,t,r){if("number"!==typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var n=a(e);return t&&0!==t.length?"string"===typeof r?n.fill(t,r):n.fill(t):n.fill(0),n}),!s.kStringMaxLength)try{s.kStringMaxLength=i.binding("buffer").kStringMaxLength}catch(u){}s.constants||(s.constants={MAX_LENGTH:s.kMaxLength},s.kStringMaxLength&&(s.constants.MAX_STRING_LENGTH=s.kStringMaxLength)),e.exports=s},73151:function(e,t,r){const n=r(75180);n.async=r(9084),e.exports=n},9084:function(e,t,r){const n=r(55835),{checkAndInit:i,smix:o}=r(15427);e.exports=async function(e,t,r,a,s,c,u,l){const{XY:f,V:d,B32:h,x:p,_X:g,B:m,tickCallback:y}=i(e,t,r,a,s,c,u);for(var b=0;b',r+="";for(var n=0;n
"},y.createSvgTag=function(e,t,r,n){var i={};"object"==typeof arguments[0]&&(e=(i=arguments[0]).cellSize,t=i.margin,r=i.alt,n=i.title),e=e||2,t=void 0===t?4*e:t,(r="string"==typeof r?{text:r}:r||{}).text=r.text||null,r.id=r.text?r.id||"qrcode-description":null,(n="string"==typeof n?{text:n}:n||{}).text=n.text||null,n.id=n.text?n.id||"qrcode-title":null;var o,a,s,c,u=y.getModuleCount()*e+2*t,l="";for(c="l"+e+",0 0,"+e+" -"+e+",0 0,-"+e+"z ",l+='"},y.createDataURL=function(e,t){e=e||2,t=void 0===t?4*e:t;var r=y.getModuleCount()*e+2*t,n=t,i=r-t;return b(r,r,(function(t,r){if(n<=t&&t"};var M=function(e){for(var t="",r=0;r=c&&f>=c&&l=49?u-49+10:u>=17?u-17+10:u,n(u>=0&&a0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch(C){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){return(this.red?">>32-t}function c(e,t,r){let n;for(n=0;n<16;n++)t[n]=(255&e[4*n+0])<<0,t[n]|=(255&e[4*n+1])<<8,t[n]|=(255&e[4*n+2])<<16,t[n]|=(255&e[4*n+3])<<24;for(l(t,0,r,0,16),n=8;n>0;n-=2)r[4]^=s(r[0]+r[12],7),r[8]^=s(r[4]+r[0],9),r[12]^=s(r[8]+r[4],13),r[0]^=s(r[12]+r[8],18),r[9]^=s(r[5]+r[1],7),r[13]^=s(r[9]+r[5],9),r[1]^=s(r[13]+r[9],13),r[5]^=s(r[1]+r[13],18),r[14]^=s(r[10]+r[6],7),r[2]^=s(r[14]+r[10],9),r[6]^=s(r[2]+r[14],13),r[10]^=s(r[6]+r[2],18),r[3]^=s(r[15]+r[11],7),r[7]^=s(r[3]+r[15],9),r[11]^=s(r[7]+r[3],13),r[15]^=s(r[11]+r[7],18),r[1]^=s(r[0]+r[3],7),r[2]^=s(r[1]+r[0],9),r[3]^=s(r[2]+r[1],13),r[0]^=s(r[3]+r[2],18),r[6]^=s(r[5]+r[4],7),r[7]^=s(r[6]+r[5],9),r[4]^=s(r[7]+r[6],13),r[5]^=s(r[4]+r[7],18),r[11]^=s(r[10]+r[9],7),r[8]^=s(r[11]+r[10],9),r[9]^=s(r[8]+r[11],13),r[10]^=s(r[9]+r[8],18),r[12]^=s(r[15]+r[14],7),r[13]^=s(r[12]+r[15],9),r[14]^=s(r[13]+r[12],13),r[15]^=s(r[14]+r[13],18);for(n=0;n<16;++n)t[n]=r[n]+t[n];for(n=0;n<16;n++){let r=4*n;e[r+0]=t[n]>>0&255,e[r+1]=t[n]>>8&255,e[r+2]=t[n]>>16&255,e[r+3]=t[n]>>24&255}}function u(e,t,r,n,i){for(let o=0;o 0 and a power of 2");if(r>o/128/a)throw Error("Parameter N is too large");if(a>o/128/s)throw Error("Parameter r is too large");let l,f=n.alloc(256*a),d=n.alloc(128*a*r),h=new Int32Array(16),p=new Int32Array(16),g=n.alloc(64),m=i.pbkdf2Sync(e,t,1,128*s*a,"sha256");if(u){let e=s*r*2,t=0;l=function(){++t,t%1e3===0&&u({current:t,total:e,percent:t/e*100})}}return{XY:f,V:d,B32:h,x:p,_X:g,B:m,tickCallback:l}},smix:async function(e,t,r,n,i,o,s,c,l,f,d){d=d||5e3;let h,p=128*r;for(e.copy(o,0,t,t+p),h=0;h1?s-1:0),u=1;u=i(t,r)&&e