From a5342313887f6cfb36d880d879f2daf886526981 Mon Sep 17 00:00:00 2001 From: colton <1679963578@qq.com> Date: Wed, 23 Oct 2024 15:05:12 +0800 Subject: [PATCH] UPDATE URL --- docs/CNAME | 1 - docs/assets/index-C2pHj7tE.css | 1 - docs/assets/index-CVaz9a9X.js | 1104 -------------------------------- src/components/ATable.tsx | 4 +- src/pages/files.tsx | 3 +- 5 files changed, 3 insertions(+), 1110 deletions(-) delete mode 100644 docs/CNAME delete mode 100644 docs/assets/index-C2pHj7tE.css delete mode 100644 docs/assets/index-CVaz9a9X.js diff --git a/docs/CNAME b/docs/CNAME deleted file mode 100644 index ba19087..0000000 --- a/docs/CNAME +++ /dev/null @@ -1 +0,0 @@ -mini-app.crust.network \ No newline at end of file diff --git a/docs/assets/index-C2pHj7tE.css b/docs/assets/index-C2pHj7tE.css deleted file mode 100644 index ec23405..0000000 --- a/docs/assets/index-C2pHj7tE.css +++ /dev/null @@ -1 +0,0 @@ -:root{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;display:flex;place-items:center;min-width:320px;min-height:100vh}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:#1a1a1a;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}@media (prefers-color-scheme: light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.mx-\[0\.185rem\]{margin-left:.185rem;margin-right:.185rem}.my-5{margin-top:1.25rem;margin-bottom:1.25rem}.mb-40{margin-bottom:10rem}.mt-10{margin-top:2.5rem}.mt-5{margin-top:1.25rem}.flex{display:flex}.table{display:table}.h-\[32px\]{height:32px}.h-\[50px\]{height:50px}.w-\[100px\]{width:100px}.w-\[150px\]{width:150px}.w-\[200px\]{width:200px}.w-full{width:100%}.min-w-\[32px\]{min-width:32px}.cursor-pointer{cursor:pointer}.items-center{align-items:center}.justify-center{justify-content:center}.gap-5{gap:1.25rem}.overflow-auto{overflow:auto}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-\[\#1980B6\]{--tw-border-opacity: 1;border-color:rgb(25 128 182 / var(--tw-border-opacity))}.border-\[\#snow\]{border-color:#snow}.border-b-\[\#FFFFFF\]{--tw-border-opacity: 1;border-bottom-color:rgb(255 255 255 / var(--tw-border-opacity))}.bg-\[\#FAFAFA\]{--tw-bg-opacity: 1;background-color:rgb(250 250 250 / var(--tw-bg-opacity))}.bg-\[\#FFFFFF\]{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.text-left{text-align:left}.text-center{text-align:center}.text-\[0\.8125rem\]{font-size:.8125rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-semibold{font-weight:600}.leading-8{line-height:2rem}.text-\[\#1980B6\]{--tw-text-opacity: 1;color:rgb(25 128 182 / var(--tw-text-opacity))}.text-\[gray\]{--tw-text-opacity: 1;color:rgb(128 128 128 / var(--tw-text-opacity))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}#root{max-width:1280px;margin:0 auto;padding:1rem;text-align:center}body{background-color:#f0f8ff}.logo{height:6em;padding:1.5em;will-change:filter;transition:filter .3s}.logo:hover{filter:drop-shadow(0 0 2em #646cffaa)}.logo.react:hover{filter:drop-shadow(0 0 2em #61dafbaa)}@keyframes logo-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media (prefers-reduced-motion: no-preference){a:nth-of-type(2) .logo{animation:logo-spin infinite 20s linear}}.card{padding:2em}.read-the-docs{color:#888}table,th,td{border:1px solid white;padding-left:5px;padding-right:5px;color:#000;font-family:Nunito,sans-serif}table,th{width:500px}table{border-radius:10px;font-size:15px}@media (max-width: 900px){.mo\:w-\[350px\]{width:350px}} diff --git a/docs/assets/index-CVaz9a9X.js b/docs/assets/index-CVaz9a9X.js deleted file mode 100644 index f16100a..0000000 --- a/docs/assets/index-CVaz9a9X.js +++ /dev/null @@ -1,1104 +0,0 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var gh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ki(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Np(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var ph={exports:{}},gu={},mh={exports:{}},Xe={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var gs=Symbol.for("react.element"),$p=Symbol.for("react.portal"),Ip=Symbol.for("react.fragment"),Bp=Symbol.for("react.strict_mode"),Op=Symbol.for("react.profiler"),Up=Symbol.for("react.provider"),Dp=Symbol.for("react.context"),jp=Symbol.for("react.forward_ref"),Fp=Symbol.for("react.suspense"),Wp=Symbol.for("react.memo"),Hp=Symbol.for("react.lazy"),jd=Symbol.iterator;function zp(e){return e===null||typeof e!="object"?null:(e=jd&&e[jd]||e["@@iterator"],typeof e=="function"?e:null)}var vh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},yh=Object.assign,wh={};function qi(e,t,n){this.props=e,this.context=t,this.refs=wh,this.updater=n||vh}qi.prototype.isReactComponent={};qi.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};qi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function xh(){}xh.prototype=qi.prototype;function af(e,t,n){this.props=e,this.context=t,this.refs=wh,this.updater=n||vh}var uf=af.prototype=new xh;uf.constructor=af;yh(uf,qi.prototype);uf.isPureReactComponent=!0;var Fd=Array.isArray,Ch=Object.prototype.hasOwnProperty,cf={current:null},bh={key:!0,ref:!0,__self:!0,__source:!0};function Sh(e,t,n){var r,o={},i=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(i=""+t.key),t)Ch.call(t,r)&&!bh.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(s===1)o.children=n;else if(1>>1,Je=Z[Ze];if(0>>1;Zeo(Me,pe))fto(Pn,Me)?(Z[Ze]=Pn,Z[ft]=pe,Ze=ft):(Z[Ze]=Me,Z[mt]=pe,Ze=mt);else if(fto(Pn,pe))Z[Ze]=Pn,Z[ft]=pe,Ze=ft;else break e}}return ie}function o(Z,ie){var pe=Z.sortIndex-ie.sortIndex;return pe!==0?pe:Z.id-ie.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,s=l.now();e.unstable_now=function(){return l.now()-s}}var u=[],c=[],f=1,g=null,h=3,b=!1,y=!1,S=!1,P=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(Z){for(var ie=n(c);ie!==null;){if(ie.callback===null)r(c);else if(ie.startTime<=Z)r(c),ie.sortIndex=ie.expirationTime,t(u,ie);else break;ie=n(c)}}function _(Z){if(S=!1,C(Z),!y)if(n(u)!==null)y=!0,ye(A);else{var ie=n(c);ie!==null&&Te(_,ie.startTime-Z)}}function A(Z,ie){y=!1,S&&(S=!1,E(T),T=-1),b=!0;var pe=h;try{for(C(ie),g=n(u);g!==null&&(!(g.expirationTime>ie)||Z&&!N());){var Ze=g.callback;if(typeof Ze=="function"){g.callback=null,h=g.priorityLevel;var Je=Ze(g.expirationTime<=ie);ie=e.unstable_now(),typeof Je=="function"?g.callback=Je:g===n(u)&&r(u),C(ie)}else r(u);g=n(u)}if(g!==null)var ct=!0;else{var mt=n(c);mt!==null&&Te(_,mt.startTime-ie),ct=!1}return ct}finally{g=null,h=pe,b=!1}}var I=!1,M=null,T=-1,L=5,O=-1;function N(){return!(e.unstable_now()-OZ||125Ze?(Z.sortIndex=pe,t(c,Z),n(u)===null&&Z===n(c)&&(S?(E(T),T=-1):S=!0,Te(_,pe-Ze))):(Z.sortIndex=Je,t(u,Z),y||b||(y=!0,ye(A))),Z},e.unstable_shouldYield=N,e.unstable_wrapCallback=function(Z){var ie=h;return function(){var pe=h;h=ie;try{return Z.apply(this,arguments)}finally{h=pe}}}})(Th);Ah.exports=Th;var t5=Ah.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var n5=hn,jn=t5;function ne(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Kc=Object.prototype.hasOwnProperty,r5=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Hd={},zd={};function o5(e){return Kc.call(zd,e)?!0:Kc.call(Hd,e)?!1:r5.test(e)?zd[e]=!0:(Hd[e]=!0,!1)}function i5(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function l5(e,t,n,r){if(t===null||typeof t>"u"||i5(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Sn(e,t,n,r,o,i,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}var ln={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ln[e]=new Sn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ln[t]=new Sn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ln[e]=new Sn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ln[e]=new Sn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ln[e]=new Sn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ln[e]=new Sn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ln[e]=new Sn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ln[e]=new Sn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ln[e]=new Sn(e,5,!1,e.toLowerCase(),null,!1,!1)});var df=/[\-:]([a-z])/g;function hf(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(df,hf);ln[t]=new Sn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(df,hf);ln[t]=new Sn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(df,hf);ln[t]=new Sn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ln[e]=new Sn(e,1,!1,e.toLowerCase(),null,!1,!1)});ln.xlinkHref=new Sn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ln[e]=new Sn(e,1,!1,e.toLowerCase(),null,!0,!0)});function gf(e,t,n,r){var o=ln.hasOwnProperty(t)?ln[t]:null;(o!==null?o.type!==0:r||!(2s||o[l]!==i[s]){var u=` -`+o[l].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=l&&0<=s);break}}}finally{nc=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?gl(e):""}function s5(e){switch(e.tag){case 5:return gl(e.type);case 16:return gl("Lazy");case 13:return gl("Suspense");case 19:return gl("SuspenseList");case 0:case 2:case 15:return e=rc(e.type,!1),e;case 11:return e=rc(e.type.render,!1),e;case 1:return e=rc(e.type,!0),e;default:return""}}function Yc(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case fi:return"Fragment";case ci:return"Portal";case qc:return"Profiler";case pf:return"StrictMode";case Qc:return"Suspense";case Gc:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ph:return(e.displayName||"Context")+".Consumer";case Rh:return(e._context.displayName||"Context")+".Provider";case mf:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case vf:return t=e.displayName||null,t!==null?t:Yc(e.type)||"Memo";case no:t=e._payload,e=e._init;try{return Yc(e(t))}catch{}}return null}function a5(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Yc(t);case 8:return t===pf?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Co(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Nh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function u5(e){var t=Nh(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(l){r=""+l,i.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ns(e){e._valueTracker||(e._valueTracker=u5(e))}function $h(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Nh(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function wa(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Zc(e,t){var n=t.checked;return Pt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Kd(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Co(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Ih(e,t){t=t.checked,t!=null&&gf(e,"checked",t,!1)}function Jc(e,t){Ih(e,t);var n=Co(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Xc(e,t.type,n):t.hasOwnProperty("defaultValue")&&Xc(e,t.type,Co(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function qd(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Xc(e,t,n){(t!=="number"||wa(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var pl=Array.isArray;function Ai(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=$s.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Wl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var El={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},c5=["Webkit","ms","Moz","O"];Object.keys(El).forEach(function(e){c5.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),El[t]=El[e]})});function Dh(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||El.hasOwnProperty(e)&&El[e]?(""+t).trim():t+"px"}function jh(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Dh(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var f5=Pt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function n0(e,t){if(t){if(f5[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ne(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ne(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ne(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ne(62))}}function r0(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var o0=null;function yf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var i0=null,Ti=null,Li=null;function Yd(e){if(e=vs(e)){if(typeof i0!="function")throw Error(ne(280));var t=e.stateNode;t&&(t=wu(t),i0(e.stateNode,e.type,t))}}function Fh(e){Ti?Li?Li.push(e):Li=[e]:Ti=e}function Wh(){if(Ti){var e=Ti,t=Li;if(Li=Ti=null,Yd(e),t)for(e=0;e>>=0,e===0?32:31-(b5(e)/S5|0)|0}var Is=64,Bs=4194304;function ml(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Sa(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,l=n&268435455;if(l!==0){var s=l&~o;s!==0?r=ml(s):(i&=l,i!==0&&(r=ml(i)))}else l=n&~o,l!==0?r=ml(l):i!==0&&(r=ml(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function ps(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-lr(t),e[t]=n}function A5(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=_l),i1=" ",l1=!1;function a2(e,t){switch(e){case"keyup":return tm.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function u2(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var di=!1;function rm(e,t){switch(e){case"compositionend":return u2(t);case"keypress":return t.which!==32?null:(l1=!0,i1);case"textInput":return e=t.data,e===i1&&l1?null:e;default:return null}}function om(e,t){if(di)return e==="compositionend"||!_f&&a2(e,t)?(e=l2(),la=Sf=ao=null,di=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=c1(n)}}function h2(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?h2(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function g2(){for(var e=window,t=wa();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=wa(e.document)}return t}function Af(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function hm(e){var t=g2(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&h2(n.ownerDocument.documentElement,n)){if(r!==null&&Af(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=f1(n,i);var l=f1(n,r);o&&l&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,hi=null,f0=null,Tl=null,d0=!1;function d1(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;d0||hi==null||hi!==wa(r)||(r=hi,"selectionStart"in r&&Af(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Tl&&Ql(Tl,r)||(Tl=r,r=_a(f0,"onSelect"),0mi||(e.current=y0[mi],y0[mi]=null,mi--)}function Ct(e,t){mi++,y0[mi]=e.current,e.current=t}var bo={},mn=To(bo),An=To(!1),Go=bo;function Bi(e,t){var n=e.type.contextTypes;if(!n)return bo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Tn(e){return e=e.childContextTypes,e!=null}function Ta(){Et(An),Et(mn)}function w1(e,t,n){if(mn.current!==bo)throw Error(ne(168));Ct(mn,t),Ct(An,n)}function S2(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(ne(108,a5(e)||"Unknown",o));return Pt({},n,r)}function La(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||bo,Go=mn.current,Ct(mn,e),Ct(An,An.current),!0}function x1(e,t,n){var r=e.stateNode;if(!r)throw Error(ne(169));n?(e=S2(e,t,Go),r.__reactInternalMemoizedMergedChildContext=e,Et(An),Et(mn),Ct(mn,e)):Et(An),Ct(An,n)}var Mr=null,xu=!1,vc=!1;function E2(e){Mr===null?Mr=[e]:Mr.push(e)}function km(e){xu=!0,E2(e)}function Lo(){if(!vc&&Mr!==null){vc=!0;var e=0,t=yt;try{var n=Mr;for(yt=1;e>=l,o-=l,Ir=1<<32-lr(t)+o|n<T?(L=M,M=null):L=M.sibling;var O=h(E,M,C[T],_);if(O===null){M===null&&(M=L);break}e&&M&&O.alternate===null&&t(E,M),w=i(O,w,T),I===null?A=O:I.sibling=O,I=O,M=L}if(T===C.length)return n(E,M),kt&&Io(E,T),A;if(M===null){for(;TT?(L=M,M=null):L=M.sibling;var N=h(E,M,O.value,_);if(N===null){M===null&&(M=L);break}e&&M&&N.alternate===null&&t(E,M),w=i(N,w,T),I===null?A=N:I.sibling=N,I=N,M=L}if(O.done)return n(E,M),kt&&Io(E,T),A;if(M===null){for(;!O.done;T++,O=C.next())O=g(E,O.value,_),O!==null&&(w=i(O,w,T),I===null?A=O:I.sibling=O,I=O);return kt&&Io(E,T),A}for(M=r(E,M);!O.done;T++,O=C.next())O=b(M,E,T,O.value,_),O!==null&&(e&&O.alternate!==null&&M.delete(O.key===null?T:O.key),w=i(O,w,T),I===null?A=O:I.sibling=O,I=O);return e&&M.forEach(function(R){return t(E,R)}),kt&&Io(E,T),A}function P(E,w,C,_){if(typeof C=="object"&&C!==null&&C.type===fi&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case Ms:e:{for(var A=C.key,I=w;I!==null;){if(I.key===A){if(A=C.type,A===fi){if(I.tag===7){n(E,I.sibling),w=o(I,C.props.children),w.return=E,E=w;break e}}else if(I.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===no&&S1(A)===I.type){n(E,I.sibling),w=o(I,C.props),w.ref=ul(E,I,C),w.return=E,E=w;break e}n(E,I);break}else t(E,I);I=I.sibling}C.type===fi?(w=Ho(C.props.children,E.mode,_,C.key),w.return=E,E=w):(_=ga(C.type,C.key,C.props,null,E.mode,_),_.ref=ul(E,w,C),_.return=E,E=_)}return l(E);case ci:e:{for(I=C.key;w!==null;){if(w.key===I)if(w.tag===4&&w.stateNode.containerInfo===C.containerInfo&&w.stateNode.implementation===C.implementation){n(E,w.sibling),w=o(w,C.children||[]),w.return=E,E=w;break e}else{n(E,w);break}else t(E,w);w=w.sibling}w=kc(C,E.mode,_),w.return=E,E=w}return l(E);case no:return I=C._init,P(E,w,I(C._payload),_)}if(pl(C))return y(E,w,C,_);if(ol(C))return S(E,w,C,_);Hs(E,C)}return typeof C=="string"&&C!==""||typeof C=="number"?(C=""+C,w!==null&&w.tag===6?(n(E,w.sibling),w=o(w,C),w.return=E,E=w):(n(E,w),w=Ec(C,E.mode,_),w.return=E,E=w),l(E)):n(E,w)}return P}var Ui=T2(!0),L2=T2(!1),Ma=To(null),Na=null,wi=null,Pf=null;function Mf(){Pf=wi=Na=null}function Nf(e){var t=Ma.current;Et(Ma),e._currentValue=t}function C0(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Pi(e,t){Na=e,Pf=wi=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(_n=!0),e.firstContext=null)}function Xn(e){var t=e._currentValue;if(Pf!==e)if(e={context:e,memoizedValue:t,next:null},wi===null){if(Na===null)throw Error(ne(308));wi=e,Na.dependencies={lanes:0,firstContext:e}}else wi=wi.next=e;return t}var Do=null;function $f(e){Do===null?Do=[e]:Do.push(e)}function R2(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,$f(t)):(n.next=o.next,o.next=n),t.interleaved=n,zr(e,r)}function zr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var ro=!1;function If(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function P2(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Dr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function mo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,at&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,zr(e,n)}return o=r.interleaved,o===null?(t.next=t,$f(r)):(t.next=o.next,o.next=t),r.interleaved=t,zr(e,n)}function aa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,xf(e,n)}}function E1(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var l={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=l:i=i.next=l,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function $a(e,t,n,r){var o=e.updateQueue;ro=!1;var i=o.firstBaseUpdate,l=o.lastBaseUpdate,s=o.shared.pending;if(s!==null){o.shared.pending=null;var u=s,c=u.next;u.next=null,l===null?i=c:l.next=c,l=u;var f=e.alternate;f!==null&&(f=f.updateQueue,s=f.lastBaseUpdate,s!==l&&(s===null?f.firstBaseUpdate=c:s.next=c,f.lastBaseUpdate=u))}if(i!==null){var g=o.baseState;l=0,f=c=u=null,s=i;do{var h=s.lane,b=s.eventTime;if((r&h)===h){f!==null&&(f=f.next={eventTime:b,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var y=e,S=s;switch(h=t,b=n,S.tag){case 1:if(y=S.payload,typeof y=="function"){g=y.call(b,g,h);break e}g=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=S.payload,h=typeof y=="function"?y.call(b,g,h):y,h==null)break e;g=Pt({},g,h);break e;case 2:ro=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,h=o.effects,h===null?o.effects=[s]:h.push(s))}else b={eventTime:b,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},f===null?(c=f=b,u=g):f=f.next=b,l|=h;if(s=s.next,s===null){if(s=o.shared.pending,s===null)break;h=s,s=h.next,h.next=null,o.lastBaseUpdate=h,o.shared.pending=null}}while(!0);if(f===null&&(u=g),o.baseState=u,o.firstBaseUpdate=c,o.lastBaseUpdate=f,t=o.shared.interleaved,t!==null){o=t;do l|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);Jo|=l,e.lanes=l,e.memoizedState=g}}function k1(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=wc.transition;wc.transition={};try{e(!1),t()}finally{yt=n,wc.transition=r}}function Q2(){return er().memoizedState}function Lm(e,t,n){var r=yo(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},G2(e))Y2(t,n);else if(n=R2(e,t,n,r),n!==null){var o=wn();sr(n,e,r,o),Z2(n,t,r)}}function Rm(e,t,n){var r=yo(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(G2(e))Y2(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var l=t.lastRenderedState,s=i(l,n);if(o.hasEagerState=!0,o.eagerState=s,ur(s,l)){var u=t.interleaved;u===null?(o.next=o,$f(t)):(o.next=u.next,u.next=o),t.interleaved=o;return}}catch{}finally{}n=R2(e,t,o,r),n!==null&&(o=wn(),sr(n,e,r,o),Z2(n,t,r))}}function G2(e){var t=e.alternate;return e===Rt||t!==null&&t===Rt}function Y2(e,t){Ll=Ba=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Z2(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,xf(e,n)}}var Oa={readContext:Xn,useCallback:cn,useContext:cn,useEffect:cn,useImperativeHandle:cn,useInsertionEffect:cn,useLayoutEffect:cn,useMemo:cn,useReducer:cn,useRef:cn,useState:cn,useDebugValue:cn,useDeferredValue:cn,useTransition:cn,useMutableSource:cn,useSyncExternalStore:cn,useId:cn,unstable_isNewReconciler:!1},Pm={readContext:Xn,useCallback:function(e,t){return hr().memoizedState=[e,t===void 0?null:t],e},useContext:Xn,useEffect:A1,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ca(4194308,4,H2.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ca(4194308,4,e,t)},useInsertionEffect:function(e,t){return ca(4,2,e,t)},useMemo:function(e,t){var n=hr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=hr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Lm.bind(null,Rt,e),[r.memoizedState,e]},useRef:function(e){var t=hr();return e={current:e},t.memoizedState=e},useState:_1,useDebugValue:Hf,useDeferredValue:function(e){return hr().memoizedState=e},useTransition:function(){var e=_1(!1),t=e[0];return e=Tm.bind(null,e[1]),hr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Rt,o=hr();if(kt){if(n===void 0)throw Error(ne(407));n=n()}else{if(n=t(),Jt===null)throw Error(ne(349));Zo&30||I2(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,A1(O2.bind(null,r,i,e),[e]),r.flags|=2048,ns(9,B2.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=hr(),t=Jt.identifierPrefix;if(kt){var n=Br,r=Ir;n=(r&~(1<<32-lr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=es++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[gr]=t,e[Zl]=r,s3(e,t,!1,!1),t.stateNode=e;e:{switch(l=r0(n,r),n){case"dialog":bt("cancel",e),bt("close",e),o=r;break;case"iframe":case"object":case"embed":bt("load",e),o=r;break;case"video":case"audio":for(o=0;oFi&&(t.flags|=128,r=!0,cl(i,!1),t.lanes=4194304)}else{if(!r)if(e=Ia(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),cl(i,!0),i.tail===null&&i.tailMode==="hidden"&&!l.alternate&&!kt)return fn(t),null}else 2*Dt()-i.renderingStartTime>Fi&&n!==1073741824&&(t.flags|=128,r=!0,cl(i,!1),t.lanes=4194304);i.isBackwards?(l.sibling=t.child,t.child=l):(n=i.last,n!==null?n.sibling=l:t.child=l,i.last=l)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Dt(),t.sibling=null,n=Tt.current,Ct(Tt,r?n&1|2:n&1),t):(fn(t),null);case 22:case 23:return Gf(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Bn&1073741824&&(fn(t),t.subtreeFlags&6&&(t.flags|=8192)):fn(t),null;case 24:return null;case 25:return null}throw Error(ne(156,t.tag))}function Dm(e,t){switch(Lf(t),t.tag){case 1:return Tn(t.type)&&Ta(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Di(),Et(An),Et(mn),Uf(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Of(t),null;case 13:if(Et(Tt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ne(340));Oi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Et(Tt),null;case 4:return Di(),null;case 10:return Nf(t.type._context),null;case 22:case 23:return Gf(),null;case 24:return null;default:return null}}var Vs=!1,dn=!1,jm=typeof WeakSet=="function"?WeakSet:Set,de=null;function xi(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Bt(e,t,r)}else n.current=null}function R0(e,t,n){try{n()}catch(r){Bt(e,t,r)}}var U1=!1;function Fm(e,t){if(h0=Ea,e=g2(),Af(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var l=0,s=-1,u=-1,c=0,f=0,g=e,h=null;t:for(;;){for(var b;g!==n||o!==0&&g.nodeType!==3||(s=l+o),g!==i||r!==0&&g.nodeType!==3||(u=l+r),g.nodeType===3&&(l+=g.nodeValue.length),(b=g.firstChild)!==null;)h=g,g=b;for(;;){if(g===e)break t;if(h===n&&++c===o&&(s=l),h===i&&++f===r&&(u=l),(b=g.nextSibling)!==null)break;g=h,h=g.parentNode}g=b}n=s===-1||u===-1?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(g0={focusedElem:e,selectionRange:n},Ea=!1,de=t;de!==null;)if(t=de,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,de=e;else for(;de!==null;){t=de;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var S=y.memoizedProps,P=y.memoizedState,E=t.stateNode,w=E.getSnapshotBeforeUpdate(t.elementType===t.type?S:nr(t.type,S),P);E.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var C=t.stateNode.containerInfo;C.nodeType===1?C.textContent="":C.nodeType===9&&C.documentElement&&C.removeChild(C.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ne(163))}}catch(_){Bt(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,de=e;break}de=t.return}return y=U1,U1=!1,y}function Rl(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&R0(t,n,i)}o=o.next}while(o!==r)}}function Su(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function P0(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function c3(e){var t=e.alternate;t!==null&&(e.alternate=null,c3(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[gr],delete t[Zl],delete t[v0],delete t[Sm],delete t[Em])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function f3(e){return e.tag===5||e.tag===3||e.tag===4}function D1(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||f3(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function M0(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Aa));else if(r!==4&&(e=e.child,e!==null))for(M0(e,t,n),e=e.sibling;e!==null;)M0(e,t,n),e=e.sibling}function N0(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(N0(e,t,n),e=e.sibling;e!==null;)N0(e,t,n),e=e.sibling}var tn=null,rr=!1;function eo(e,t,n){for(n=n.child;n!==null;)d3(e,t,n),n=n.sibling}function d3(e,t,n){if(yr&&typeof yr.onCommitFiberUnmount=="function")try{yr.onCommitFiberUnmount(pu,n)}catch{}switch(n.tag){case 5:dn||xi(n,t);case 6:var r=tn,o=rr;tn=null,eo(e,t,n),tn=r,rr=o,tn!==null&&(rr?(e=tn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):tn.removeChild(n.stateNode));break;case 18:tn!==null&&(rr?(e=tn,n=n.stateNode,e.nodeType===8?mc(e.parentNode,n):e.nodeType===1&&mc(e,n),Kl(e)):mc(tn,n.stateNode));break;case 4:r=tn,o=rr,tn=n.stateNode.containerInfo,rr=!0,eo(e,t,n),tn=r,rr=o;break;case 0:case 11:case 14:case 15:if(!dn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,l=i.destroy;i=i.tag,l!==void 0&&(i&2||i&4)&&R0(n,t,l),o=o.next}while(o!==r)}eo(e,t,n);break;case 1:if(!dn&&(xi(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Bt(n,t,s)}eo(e,t,n);break;case 21:eo(e,t,n);break;case 22:n.mode&1?(dn=(r=dn)||n.memoizedState!==null,eo(e,t,n),dn=r):eo(e,t,n);break;default:eo(e,t,n)}}function j1(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new jm),t.forEach(function(r){var o=Ym.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function tr(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=l),r&=~i}if(r=o,r=Dt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Hm(r/1960))-r,10e?16:e,uo===null)var r=!1;else{if(e=uo,uo=null,ja=0,at&6)throw Error(ne(331));var o=at;for(at|=4,de=e.current;de!==null;){var i=de,l=i.child;if(de.flags&16){var s=i.deletions;if(s!==null){for(var u=0;uDt()-qf?Wo(e,0):Kf|=n),Ln(e,t)}function x3(e,t){t===0&&(e.mode&1?(t=Bs,Bs<<=1,!(Bs&130023424)&&(Bs=4194304)):t=1);var n=wn();e=zr(e,t),e!==null&&(ps(e,t,n),Ln(e,n))}function Gm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),x3(e,n)}function Ym(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ne(314))}r!==null&&r.delete(t),x3(e,n)}var C3;C3=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||An.current)_n=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return _n=!1,Om(e,t,n);_n=!!(e.flags&131072)}else _n=!1,kt&&t.flags&1048576&&k2(t,Pa,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;fa(e,t),e=t.pendingProps;var o=Bi(t,mn.current);Pi(t,n),o=jf(null,t,r,e,o,n);var i=Ff();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Tn(r)?(i=!0,La(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,If(t),o.updater=bu,t.stateNode=o,o._reactInternals=t,S0(t,r,e,n),t=_0(null,t,r,!0,i,n)):(t.tag=0,kt&&i&&Tf(t),yn(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(fa(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=Jm(r),e=nr(r,e),o){case 0:t=k0(null,t,r,e,n);break e;case 1:t=I1(null,t,r,e,n);break e;case 11:t=N1(null,t,r,e,n);break e;case 14:t=$1(null,t,r,nr(r.type,e),n);break e}throw Error(ne(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:nr(r,o),k0(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:nr(r,o),I1(e,t,r,o,n);case 3:e:{if(o3(t),e===null)throw Error(ne(387));r=t.pendingProps,i=t.memoizedState,o=i.element,P2(e,t),$a(t,r,null,n);var l=t.memoizedState;if(r=l.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=ji(Error(ne(423)),t),t=B1(e,t,r,n,o);break e}else if(r!==o){o=ji(Error(ne(424)),t),t=B1(e,t,r,n,o);break e}else for(On=po(t.stateNode.containerInfo.firstChild),Dn=t,kt=!0,or=null,n=L2(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Oi(),r===o){t=Vr(e,t,n);break e}yn(e,t,r,n)}t=t.child}return t;case 5:return M2(t),e===null&&x0(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,l=o.children,p0(r,o)?l=null:i!==null&&p0(r,i)&&(t.flags|=32),r3(e,t),yn(e,t,l,n),t.child;case 6:return e===null&&x0(t),null;case 13:return i3(e,t,n);case 4:return Bf(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ui(t,null,r,n):yn(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:nr(r,o),N1(e,t,r,o,n);case 7:return yn(e,t,t.pendingProps,n),t.child;case 8:return yn(e,t,t.pendingProps.children,n),t.child;case 12:return yn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,l=o.value,Ct(Ma,r._currentValue),r._currentValue=l,i!==null)if(ur(i.value,l)){if(i.children===o.children&&!An.current){t=Vr(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){l=i.child;for(var u=s.firstContext;u!==null;){if(u.context===r){if(i.tag===1){u=Dr(-1,n&-n),u.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?u.next=u:(u.next=f.next,f.next=u),c.pending=u}}i.lanes|=n,u=i.alternate,u!==null&&(u.lanes|=n),C0(i.return,n,t),s.lanes|=n;break}u=u.next}}else if(i.tag===10)l=i.type===t.type?null:i.child;else if(i.tag===18){if(l=i.return,l===null)throw Error(ne(341));l.lanes|=n,s=l.alternate,s!==null&&(s.lanes|=n),C0(l,n,t),l=i.sibling}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===t){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}yn(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Pi(t,n),o=Xn(o),r=r(o),t.flags|=1,yn(e,t,r,n),t.child;case 14:return r=t.type,o=nr(r,t.pendingProps),o=nr(r.type,o),$1(e,t,r,o,n);case 15:return t3(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:nr(r,o),fa(e,t),t.tag=1,Tn(r)?(e=!0,La(t)):e=!1,Pi(t,n),J2(t,r,o),S0(t,r,o,n),_0(null,t,r,!0,e,n);case 19:return l3(e,t,n);case 22:return n3(e,t,n)}throw Error(ne(156,t.tag))};function b3(e,t){return Gh(e,t)}function Zm(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Gn(e,t,n,r){return new Zm(e,t,n,r)}function Zf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Jm(e){if(typeof e=="function")return Zf(e)?1:0;if(e!=null){if(e=e.$$typeof,e===mf)return 11;if(e===vf)return 14}return 2}function wo(e,t){var n=e.alternate;return n===null?(n=Gn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ga(e,t,n,r,o,i){var l=2;if(r=e,typeof e=="function")Zf(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case fi:return Ho(n.children,o,i,t);case pf:l=8,o|=8;break;case qc:return e=Gn(12,n,t,o|2),e.elementType=qc,e.lanes=i,e;case Qc:return e=Gn(13,n,t,o),e.elementType=Qc,e.lanes=i,e;case Gc:return e=Gn(19,n,t,o),e.elementType=Gc,e.lanes=i,e;case Mh:return ku(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Rh:l=10;break e;case Ph:l=9;break e;case mf:l=11;break e;case vf:l=14;break e;case no:l=16,r=null;break e}throw Error(ne(130,e==null?e:typeof e,""))}return t=Gn(l,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Ho(e,t,n,r){return e=Gn(7,e,r,t),e.lanes=n,e}function ku(e,t,n,r){return e=Gn(22,e,r,t),e.elementType=Mh,e.lanes=n,e.stateNode={isHidden:!1},e}function Ec(e,t,n){return e=Gn(6,e,null,t),e.lanes=n,e}function kc(e,t,n){return t=Gn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Xm(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ic(0),this.expirationTimes=ic(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ic(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Jf(e,t,n,r,o,i,l,s,u){return e=new Xm(e,t,n,s,u),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Gn(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},If(i),e}function ev(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(_3)}catch(e){console.error(e)}}_3(),_h.exports=Wn;var iv=_h.exports,Q1=iv;Vc.createRoot=Q1.createRoot,Vc.hydrateRoot=Q1.hydrateRoot;var A3={exports:{}};(function(e){(function(t,n){e.exports?e.exports=n():(t.nacl||(t.nacl={}),t.nacl.util=n())})(gh,function(){var t={};function n(r){if(!/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(r))throw new TypeError("invalid encoding")}return t.decodeUTF8=function(r){if(typeof r!="string")throw new TypeError("expected string");var o,i=unescape(encodeURIComponent(r)),l=new Uint8Array(i.length);for(o=0;o"u"?typeof Buffer.from<"u"?(t.encodeBase64=function(r){return Buffer.from(r).toString("base64")},t.decodeBase64=function(r){return n(r),new Uint8Array(Array.prototype.slice.call(Buffer.from(r,"base64"),0))}):(t.encodeBase64=function(r){return new Buffer(r).toString("base64")},t.decodeBase64=function(r){return n(r),new Uint8Array(Array.prototype.slice.call(new Buffer(r,"base64"),0))}):(t.encodeBase64=function(r){var o,i=[],l=r.length;for(o=0;o>24&255,d[v+1]=p>>16&255,d[v+2]=p>>8&255,d[v+3]=p&255,d[v+4]=a>>24&255,d[v+5]=a>>16&255,d[v+6]=a>>8&255,d[v+7]=a&255}function S(d,v,p,a,x){var $,B=0;for($=0;$>>8)-1}function P(d,v,p,a){return S(d,v,p,a,16)}function E(d,v,p,a){return S(d,v,p,a,32)}function w(d,v,p,a){for(var x=a[0]&255|(a[1]&255)<<8|(a[2]&255)<<16|(a[3]&255)<<24,$=p[0]&255|(p[1]&255)<<8|(p[2]&255)<<16|(p[3]&255)<<24,B=p[4]&255|(p[5]&255)<<8|(p[6]&255)<<16|(p[7]&255)<<24,K=p[8]&255|(p[9]&255)<<8|(p[10]&255)<<16|(p[11]&255)<<24,re=p[12]&255|(p[13]&255)<<8|(p[14]&255)<<16|(p[15]&255)<<24,ve=a[4]&255|(a[5]&255)<<8|(a[6]&255)<<16|(a[7]&255)<<24,se=v[0]&255|(v[1]&255)<<8|(v[2]&255)<<16|(v[3]&255)<<24,it=v[4]&255|(v[5]&255)<<8|(v[6]&255)<<16|(v[7]&255)<<24,ce=v[8]&255|(v[9]&255)<<8|(v[10]&255)<<16|(v[11]&255)<<24,Re=v[12]&255|(v[13]&255)<<8|(v[14]&255)<<16|(v[15]&255)<<24,$e=a[8]&255|(a[9]&255)<<8|(a[10]&255)<<16|(a[11]&255)<<24,Fe=p[16]&255|(p[17]&255)<<8|(p[18]&255)<<16|(p[19]&255)<<24,je=p[20]&255|(p[21]&255)<<8|(p[22]&255)<<16|(p[23]&255)<<24,Ie=p[24]&255|(p[25]&255)<<8|(p[26]&255)<<16|(p[27]&255)<<24,Ue=p[28]&255|(p[29]&255)<<8|(p[30]&255)<<16|(p[31]&255)<<24,Be=a[12]&255|(a[13]&255)<<8|(a[14]&255)<<16|(a[15]&255)<<24,he=x,we=$,ae=B,ge=K,me=re,le=ve,U=se,D=it,J=ce,V=Re,q=$e,te=Fe,ke=je,We=Ie,Ve=Ue,He=Be,k,Ge=0;Ge<20;Ge+=2)k=he+ke|0,me^=k<<7|k>>>25,k=me+he|0,J^=k<<9|k>>>23,k=J+me|0,ke^=k<<13|k>>>19,k=ke+J|0,he^=k<<18|k>>>14,k=le+we|0,V^=k<<7|k>>>25,k=V+le|0,We^=k<<9|k>>>23,k=We+V|0,we^=k<<13|k>>>19,k=we+We|0,le^=k<<18|k>>>14,k=q+U|0,Ve^=k<<7|k>>>25,k=Ve+q|0,ae^=k<<9|k>>>23,k=ae+Ve|0,U^=k<<13|k>>>19,k=U+ae|0,q^=k<<18|k>>>14,k=He+te|0,ge^=k<<7|k>>>25,k=ge+He|0,D^=k<<9|k>>>23,k=D+ge|0,te^=k<<13|k>>>19,k=te+D|0,He^=k<<18|k>>>14,k=he+ge|0,we^=k<<7|k>>>25,k=we+he|0,ae^=k<<9|k>>>23,k=ae+we|0,ge^=k<<13|k>>>19,k=ge+ae|0,he^=k<<18|k>>>14,k=le+me|0,U^=k<<7|k>>>25,k=U+le|0,D^=k<<9|k>>>23,k=D+U|0,me^=k<<13|k>>>19,k=me+D|0,le^=k<<18|k>>>14,k=q+V|0,te^=k<<7|k>>>25,k=te+q|0,J^=k<<9|k>>>23,k=J+te|0,V^=k<<13|k>>>19,k=V+J|0,q^=k<<18|k>>>14,k=He+Ve|0,ke^=k<<7|k>>>25,k=ke+He|0,We^=k<<9|k>>>23,k=We+ke|0,Ve^=k<<13|k>>>19,k=Ve+We|0,He^=k<<18|k>>>14;he=he+x|0,we=we+$|0,ae=ae+B|0,ge=ge+K|0,me=me+re|0,le=le+ve|0,U=U+se|0,D=D+it|0,J=J+ce|0,V=V+Re|0,q=q+$e|0,te=te+Fe|0,ke=ke+je|0,We=We+Ie|0,Ve=Ve+Ue|0,He=He+Be|0,d[0]=he>>>0&255,d[1]=he>>>8&255,d[2]=he>>>16&255,d[3]=he>>>24&255,d[4]=we>>>0&255,d[5]=we>>>8&255,d[6]=we>>>16&255,d[7]=we>>>24&255,d[8]=ae>>>0&255,d[9]=ae>>>8&255,d[10]=ae>>>16&255,d[11]=ae>>>24&255,d[12]=ge>>>0&255,d[13]=ge>>>8&255,d[14]=ge>>>16&255,d[15]=ge>>>24&255,d[16]=me>>>0&255,d[17]=me>>>8&255,d[18]=me>>>16&255,d[19]=me>>>24&255,d[20]=le>>>0&255,d[21]=le>>>8&255,d[22]=le>>>16&255,d[23]=le>>>24&255,d[24]=U>>>0&255,d[25]=U>>>8&255,d[26]=U>>>16&255,d[27]=U>>>24&255,d[28]=D>>>0&255,d[29]=D>>>8&255,d[30]=D>>>16&255,d[31]=D>>>24&255,d[32]=J>>>0&255,d[33]=J>>>8&255,d[34]=J>>>16&255,d[35]=J>>>24&255,d[36]=V>>>0&255,d[37]=V>>>8&255,d[38]=V>>>16&255,d[39]=V>>>24&255,d[40]=q>>>0&255,d[41]=q>>>8&255,d[42]=q>>>16&255,d[43]=q>>>24&255,d[44]=te>>>0&255,d[45]=te>>>8&255,d[46]=te>>>16&255,d[47]=te>>>24&255,d[48]=ke>>>0&255,d[49]=ke>>>8&255,d[50]=ke>>>16&255,d[51]=ke>>>24&255,d[52]=We>>>0&255,d[53]=We>>>8&255,d[54]=We>>>16&255,d[55]=We>>>24&255,d[56]=Ve>>>0&255,d[57]=Ve>>>8&255,d[58]=Ve>>>16&255,d[59]=Ve>>>24&255,d[60]=He>>>0&255,d[61]=He>>>8&255,d[62]=He>>>16&255,d[63]=He>>>24&255}function C(d,v,p,a){for(var x=a[0]&255|(a[1]&255)<<8|(a[2]&255)<<16|(a[3]&255)<<24,$=p[0]&255|(p[1]&255)<<8|(p[2]&255)<<16|(p[3]&255)<<24,B=p[4]&255|(p[5]&255)<<8|(p[6]&255)<<16|(p[7]&255)<<24,K=p[8]&255|(p[9]&255)<<8|(p[10]&255)<<16|(p[11]&255)<<24,re=p[12]&255|(p[13]&255)<<8|(p[14]&255)<<16|(p[15]&255)<<24,ve=a[4]&255|(a[5]&255)<<8|(a[6]&255)<<16|(a[7]&255)<<24,se=v[0]&255|(v[1]&255)<<8|(v[2]&255)<<16|(v[3]&255)<<24,it=v[4]&255|(v[5]&255)<<8|(v[6]&255)<<16|(v[7]&255)<<24,ce=v[8]&255|(v[9]&255)<<8|(v[10]&255)<<16|(v[11]&255)<<24,Re=v[12]&255|(v[13]&255)<<8|(v[14]&255)<<16|(v[15]&255)<<24,$e=a[8]&255|(a[9]&255)<<8|(a[10]&255)<<16|(a[11]&255)<<24,Fe=p[16]&255|(p[17]&255)<<8|(p[18]&255)<<16|(p[19]&255)<<24,je=p[20]&255|(p[21]&255)<<8|(p[22]&255)<<16|(p[23]&255)<<24,Ie=p[24]&255|(p[25]&255)<<8|(p[26]&255)<<16|(p[27]&255)<<24,Ue=p[28]&255|(p[29]&255)<<8|(p[30]&255)<<16|(p[31]&255)<<24,Be=a[12]&255|(a[13]&255)<<8|(a[14]&255)<<16|(a[15]&255)<<24,he=x,we=$,ae=B,ge=K,me=re,le=ve,U=se,D=it,J=ce,V=Re,q=$e,te=Fe,ke=je,We=Ie,Ve=Ue,He=Be,k,Ge=0;Ge<20;Ge+=2)k=he+ke|0,me^=k<<7|k>>>25,k=me+he|0,J^=k<<9|k>>>23,k=J+me|0,ke^=k<<13|k>>>19,k=ke+J|0,he^=k<<18|k>>>14,k=le+we|0,V^=k<<7|k>>>25,k=V+le|0,We^=k<<9|k>>>23,k=We+V|0,we^=k<<13|k>>>19,k=we+We|0,le^=k<<18|k>>>14,k=q+U|0,Ve^=k<<7|k>>>25,k=Ve+q|0,ae^=k<<9|k>>>23,k=ae+Ve|0,U^=k<<13|k>>>19,k=U+ae|0,q^=k<<18|k>>>14,k=He+te|0,ge^=k<<7|k>>>25,k=ge+He|0,D^=k<<9|k>>>23,k=D+ge|0,te^=k<<13|k>>>19,k=te+D|0,He^=k<<18|k>>>14,k=he+ge|0,we^=k<<7|k>>>25,k=we+he|0,ae^=k<<9|k>>>23,k=ae+we|0,ge^=k<<13|k>>>19,k=ge+ae|0,he^=k<<18|k>>>14,k=le+me|0,U^=k<<7|k>>>25,k=U+le|0,D^=k<<9|k>>>23,k=D+U|0,me^=k<<13|k>>>19,k=me+D|0,le^=k<<18|k>>>14,k=q+V|0,te^=k<<7|k>>>25,k=te+q|0,J^=k<<9|k>>>23,k=J+te|0,V^=k<<13|k>>>19,k=V+J|0,q^=k<<18|k>>>14,k=He+Ve|0,ke^=k<<7|k>>>25,k=ke+He|0,We^=k<<9|k>>>23,k=We+ke|0,Ve^=k<<13|k>>>19,k=Ve+We|0,He^=k<<18|k>>>14;d[0]=he>>>0&255,d[1]=he>>>8&255,d[2]=he>>>16&255,d[3]=he>>>24&255,d[4]=le>>>0&255,d[5]=le>>>8&255,d[6]=le>>>16&255,d[7]=le>>>24&255,d[8]=q>>>0&255,d[9]=q>>>8&255,d[10]=q>>>16&255,d[11]=q>>>24&255,d[12]=He>>>0&255,d[13]=He>>>8&255,d[14]=He>>>16&255,d[15]=He>>>24&255,d[16]=U>>>0&255,d[17]=U>>>8&255,d[18]=U>>>16&255,d[19]=U>>>24&255,d[20]=D>>>0&255,d[21]=D>>>8&255,d[22]=D>>>16&255,d[23]=D>>>24&255,d[24]=J>>>0&255,d[25]=J>>>8&255,d[26]=J>>>16&255,d[27]=J>>>24&255,d[28]=V>>>0&255,d[29]=V>>>8&255,d[30]=V>>>16&255,d[31]=V>>>24&255}function _(d,v,p,a){w(d,v,p,a)}function A(d,v,p,a){C(d,v,p,a)}var I=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function M(d,v,p,a,x,$,B){var K=new Uint8Array(16),re=new Uint8Array(64),ve,se;for(se=0;se<16;se++)K[se]=0;for(se=0;se<8;se++)K[se]=$[se];for(;x>=64;){for(_(re,K,B,I),se=0;se<64;se++)d[v+se]=p[a+se]^re[se];for(ve=1,se=8;se<16;se++)ve=ve+(K[se]&255)|0,K[se]=ve&255,ve>>>=8;x-=64,v+=64,a+=64}if(x>0)for(_(re,K,B,I),se=0;se=64;){for(_(B,$,x,I),re=0;re<64;re++)d[v+re]=B[re];for(K=1,re=8;re<16;re++)K=K+($[re]&255)|0,$[re]=K&255,K>>>=8;p-=64,v+=64}if(p>0)for(_(B,$,x,I),re=0;re>>13|p<<3)&8191,a=d[4]&255|(d[5]&255)<<8,this.r[2]=(p>>>10|a<<6)&7939,x=d[6]&255|(d[7]&255)<<8,this.r[3]=(a>>>7|x<<9)&8191,$=d[8]&255|(d[9]&255)<<8,this.r[4]=(x>>>4|$<<12)&255,this.r[5]=$>>>1&8190,B=d[10]&255|(d[11]&255)<<8,this.r[6]=($>>>14|B<<2)&8191,K=d[12]&255|(d[13]&255)<<8,this.r[7]=(B>>>11|K<<5)&8065,re=d[14]&255|(d[15]&255)<<8,this.r[8]=(K>>>8|re<<8)&8191,this.r[9]=re>>>5&127,this.pad[0]=d[16]&255|(d[17]&255)<<8,this.pad[1]=d[18]&255|(d[19]&255)<<8,this.pad[2]=d[20]&255|(d[21]&255)<<8,this.pad[3]=d[22]&255|(d[23]&255)<<8,this.pad[4]=d[24]&255|(d[25]&255)<<8,this.pad[5]=d[26]&255|(d[27]&255)<<8,this.pad[6]=d[28]&255|(d[29]&255)<<8,this.pad[7]=d[30]&255|(d[31]&255)<<8};N.prototype.blocks=function(d,v,p){for(var a=this.fin?0:2048,x,$,B,K,re,ve,se,it,ce,Re,$e,Fe,je,Ie,Ue,Be,he,we,ae,ge=this.h[0],me=this.h[1],le=this.h[2],U=this.h[3],D=this.h[4],J=this.h[5],V=this.h[6],q=this.h[7],te=this.h[8],ke=this.h[9],We=this.r[0],Ve=this.r[1],He=this.r[2],k=this.r[3],Ge=this.r[4],lt=this.r[5],st=this.r[6],qe=this.r[7],nt=this.r[8],rt=this.r[9];p>=16;)x=d[v+0]&255|(d[v+1]&255)<<8,ge+=x&8191,$=d[v+2]&255|(d[v+3]&255)<<8,me+=(x>>>13|$<<3)&8191,B=d[v+4]&255|(d[v+5]&255)<<8,le+=($>>>10|B<<6)&8191,K=d[v+6]&255|(d[v+7]&255)<<8,U+=(B>>>7|K<<9)&8191,re=d[v+8]&255|(d[v+9]&255)<<8,D+=(K>>>4|re<<12)&8191,J+=re>>>1&8191,ve=d[v+10]&255|(d[v+11]&255)<<8,V+=(re>>>14|ve<<2)&8191,se=d[v+12]&255|(d[v+13]&255)<<8,q+=(ve>>>11|se<<5)&8191,it=d[v+14]&255|(d[v+15]&255)<<8,te+=(se>>>8|it<<8)&8191,ke+=it>>>5|a,ce=0,Re=ce,Re+=ge*We,Re+=me*(5*rt),Re+=le*(5*nt),Re+=U*(5*qe),Re+=D*(5*st),ce=Re>>>13,Re&=8191,Re+=J*(5*lt),Re+=V*(5*Ge),Re+=q*(5*k),Re+=te*(5*He),Re+=ke*(5*Ve),ce+=Re>>>13,Re&=8191,$e=ce,$e+=ge*Ve,$e+=me*We,$e+=le*(5*rt),$e+=U*(5*nt),$e+=D*(5*qe),ce=$e>>>13,$e&=8191,$e+=J*(5*st),$e+=V*(5*lt),$e+=q*(5*Ge),$e+=te*(5*k),$e+=ke*(5*He),ce+=$e>>>13,$e&=8191,Fe=ce,Fe+=ge*He,Fe+=me*Ve,Fe+=le*We,Fe+=U*(5*rt),Fe+=D*(5*nt),ce=Fe>>>13,Fe&=8191,Fe+=J*(5*qe),Fe+=V*(5*st),Fe+=q*(5*lt),Fe+=te*(5*Ge),Fe+=ke*(5*k),ce+=Fe>>>13,Fe&=8191,je=ce,je+=ge*k,je+=me*He,je+=le*Ve,je+=U*We,je+=D*(5*rt),ce=je>>>13,je&=8191,je+=J*(5*nt),je+=V*(5*qe),je+=q*(5*st),je+=te*(5*lt),je+=ke*(5*Ge),ce+=je>>>13,je&=8191,Ie=ce,Ie+=ge*Ge,Ie+=me*k,Ie+=le*He,Ie+=U*Ve,Ie+=D*We,ce=Ie>>>13,Ie&=8191,Ie+=J*(5*rt),Ie+=V*(5*nt),Ie+=q*(5*qe),Ie+=te*(5*st),Ie+=ke*(5*lt),ce+=Ie>>>13,Ie&=8191,Ue=ce,Ue+=ge*lt,Ue+=me*Ge,Ue+=le*k,Ue+=U*He,Ue+=D*Ve,ce=Ue>>>13,Ue&=8191,Ue+=J*We,Ue+=V*(5*rt),Ue+=q*(5*nt),Ue+=te*(5*qe),Ue+=ke*(5*st),ce+=Ue>>>13,Ue&=8191,Be=ce,Be+=ge*st,Be+=me*lt,Be+=le*Ge,Be+=U*k,Be+=D*He,ce=Be>>>13,Be&=8191,Be+=J*Ve,Be+=V*We,Be+=q*(5*rt),Be+=te*(5*nt),Be+=ke*(5*qe),ce+=Be>>>13,Be&=8191,he=ce,he+=ge*qe,he+=me*st,he+=le*lt,he+=U*Ge,he+=D*k,ce=he>>>13,he&=8191,he+=J*He,he+=V*Ve,he+=q*We,he+=te*(5*rt),he+=ke*(5*nt),ce+=he>>>13,he&=8191,we=ce,we+=ge*nt,we+=me*qe,we+=le*st,we+=U*lt,we+=D*Ge,ce=we>>>13,we&=8191,we+=J*k,we+=V*He,we+=q*Ve,we+=te*We,we+=ke*(5*rt),ce+=we>>>13,we&=8191,ae=ce,ae+=ge*rt,ae+=me*nt,ae+=le*qe,ae+=U*st,ae+=D*lt,ce=ae>>>13,ae&=8191,ae+=J*Ge,ae+=V*k,ae+=q*He,ae+=te*Ve,ae+=ke*We,ce+=ae>>>13,ae&=8191,ce=(ce<<2)+ce|0,ce=ce+Re|0,Re=ce&8191,ce=ce>>>13,$e+=ce,ge=Re,me=$e,le=Fe,U=je,D=Ie,J=Ue,V=Be,q=he,te=we,ke=ae,v+=16,p-=16;this.h[0]=ge,this.h[1]=me,this.h[2]=le,this.h[3]=U,this.h[4]=D,this.h[5]=J,this.h[6]=V,this.h[7]=q,this.h[8]=te,this.h[9]=ke},N.prototype.finish=function(d,v){var p=new Uint16Array(10),a,x,$,B;if(this.leftover){for(B=this.leftover,this.buffer[B++]=1;B<16;B++)this.buffer[B]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(a=this.h[1]>>>13,this.h[1]&=8191,B=2;B<10;B++)this.h[B]+=a,a=this.h[B]>>>13,this.h[B]&=8191;for(this.h[0]+=a*5,a=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=a,a=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=a,p[0]=this.h[0]+5,a=p[0]>>>13,p[0]&=8191,B=1;B<10;B++)p[B]=this.h[B]+a,a=p[B]>>>13,p[B]&=8191;for(p[9]-=8192,x=(a^1)-1,B=0;B<10;B++)p[B]&=x;for(x=~x,B=0;B<10;B++)this.h[B]=this.h[B]&x|p[B];for(this.h[0]=(this.h[0]|this.h[1]<<13)&65535,this.h[1]=(this.h[1]>>>3|this.h[2]<<10)&65535,this.h[2]=(this.h[2]>>>6|this.h[3]<<7)&65535,this.h[3]=(this.h[3]>>>9|this.h[4]<<4)&65535,this.h[4]=(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14)&65535,this.h[5]=(this.h[6]>>>2|this.h[7]<<11)&65535,this.h[6]=(this.h[7]>>>5|this.h[8]<<8)&65535,this.h[7]=(this.h[8]>>>8|this.h[9]<<5)&65535,$=this.h[0]+this.pad[0],this.h[0]=$&65535,B=1;B<8;B++)$=(this.h[B]+this.pad[B]|0)+($>>>16)|0,this.h[B]=$&65535;d[v+0]=this.h[0]>>>0&255,d[v+1]=this.h[0]>>>8&255,d[v+2]=this.h[1]>>>0&255,d[v+3]=this.h[1]>>>8&255,d[v+4]=this.h[2]>>>0&255,d[v+5]=this.h[2]>>>8&255,d[v+6]=this.h[3]>>>0&255,d[v+7]=this.h[3]>>>8&255,d[v+8]=this.h[4]>>>0&255,d[v+9]=this.h[4]>>>8&255,d[v+10]=this.h[5]>>>0&255,d[v+11]=this.h[5]>>>8&255,d[v+12]=this.h[6]>>>0&255,d[v+13]=this.h[6]>>>8&255,d[v+14]=this.h[7]>>>0&255,d[v+15]=this.h[7]>>>8&255},N.prototype.update=function(d,v,p){var a,x;if(this.leftover){for(x=16-this.leftover,x>p&&(x=p),a=0;a=16&&(x=p-p%16,this.blocks(d,v,x),v+=x,p-=x),p){for(a=0;a>16&1),$[p-1]&=65535;$[15]=B[15]-32767-($[14]>>16&1),x=$[15]>>16&1,$[14]&=65535,Z(B,$,1-x)}for(p=0;p<16;p++)d[2*p]=B[p]&255,d[2*p+1]=B[p]>>8}function pe(d,v){var p=new Uint8Array(32),a=new Uint8Array(32);return ie(p,d),ie(a,v),E(p,0,a,0)}function Ze(d){var v=new Uint8Array(32);return ie(v,d),v[0]&1}function Je(d,v){var p;for(p=0;p<16;p++)d[p]=v[2*p]+(v[2*p+1]<<8);d[15]&=32767}function ct(d,v,p){for(var a=0;a<16;a++)d[a]=v[a]+p[a]}function mt(d,v,p){for(var a=0;a<16;a++)d[a]=v[a]-p[a]}function Me(d,v,p){var a,x,$=0,B=0,K=0,re=0,ve=0,se=0,it=0,ce=0,Re=0,$e=0,Fe=0,je=0,Ie=0,Ue=0,Be=0,he=0,we=0,ae=0,ge=0,me=0,le=0,U=0,D=0,J=0,V=0,q=0,te=0,ke=0,We=0,Ve=0,He=0,k=p[0],Ge=p[1],lt=p[2],st=p[3],qe=p[4],nt=p[5],rt=p[6],Ot=p[7],vt=p[8],Nt=p[9],$t=p[10],It=p[11],zt=p[12],sn=p[13],an=p[14],un=p[15];a=v[0],$+=a*k,B+=a*Ge,K+=a*lt,re+=a*st,ve+=a*qe,se+=a*nt,it+=a*rt,ce+=a*Ot,Re+=a*vt,$e+=a*Nt,Fe+=a*$t,je+=a*It,Ie+=a*zt,Ue+=a*sn,Be+=a*an,he+=a*un,a=v[1],B+=a*k,K+=a*Ge,re+=a*lt,ve+=a*st,se+=a*qe,it+=a*nt,ce+=a*rt,Re+=a*Ot,$e+=a*vt,Fe+=a*Nt,je+=a*$t,Ie+=a*It,Ue+=a*zt,Be+=a*sn,he+=a*an,we+=a*un,a=v[2],K+=a*k,re+=a*Ge,ve+=a*lt,se+=a*st,it+=a*qe,ce+=a*nt,Re+=a*rt,$e+=a*Ot,Fe+=a*vt,je+=a*Nt,Ie+=a*$t,Ue+=a*It,Be+=a*zt,he+=a*sn,we+=a*an,ae+=a*un,a=v[3],re+=a*k,ve+=a*Ge,se+=a*lt,it+=a*st,ce+=a*qe,Re+=a*nt,$e+=a*rt,Fe+=a*Ot,je+=a*vt,Ie+=a*Nt,Ue+=a*$t,Be+=a*It,he+=a*zt,we+=a*sn,ae+=a*an,ge+=a*un,a=v[4],ve+=a*k,se+=a*Ge,it+=a*lt,ce+=a*st,Re+=a*qe,$e+=a*nt,Fe+=a*rt,je+=a*Ot,Ie+=a*vt,Ue+=a*Nt,Be+=a*$t,he+=a*It,we+=a*zt,ae+=a*sn,ge+=a*an,me+=a*un,a=v[5],se+=a*k,it+=a*Ge,ce+=a*lt,Re+=a*st,$e+=a*qe,Fe+=a*nt,je+=a*rt,Ie+=a*Ot,Ue+=a*vt,Be+=a*Nt,he+=a*$t,we+=a*It,ae+=a*zt,ge+=a*sn,me+=a*an,le+=a*un,a=v[6],it+=a*k,ce+=a*Ge,Re+=a*lt,$e+=a*st,Fe+=a*qe,je+=a*nt,Ie+=a*rt,Ue+=a*Ot,Be+=a*vt,he+=a*Nt,we+=a*$t,ae+=a*It,ge+=a*zt,me+=a*sn,le+=a*an,U+=a*un,a=v[7],ce+=a*k,Re+=a*Ge,$e+=a*lt,Fe+=a*st,je+=a*qe,Ie+=a*nt,Ue+=a*rt,Be+=a*Ot,he+=a*vt,we+=a*Nt,ae+=a*$t,ge+=a*It,me+=a*zt,le+=a*sn,U+=a*an,D+=a*un,a=v[8],Re+=a*k,$e+=a*Ge,Fe+=a*lt,je+=a*st,Ie+=a*qe,Ue+=a*nt,Be+=a*rt,he+=a*Ot,we+=a*vt,ae+=a*Nt,ge+=a*$t,me+=a*It,le+=a*zt,U+=a*sn,D+=a*an,J+=a*un,a=v[9],$e+=a*k,Fe+=a*Ge,je+=a*lt,Ie+=a*st,Ue+=a*qe,Be+=a*nt,he+=a*rt,we+=a*Ot,ae+=a*vt,ge+=a*Nt,me+=a*$t,le+=a*It,U+=a*zt,D+=a*sn,J+=a*an,V+=a*un,a=v[10],Fe+=a*k,je+=a*Ge,Ie+=a*lt,Ue+=a*st,Be+=a*qe,he+=a*nt,we+=a*rt,ae+=a*Ot,ge+=a*vt,me+=a*Nt,le+=a*$t,U+=a*It,D+=a*zt,J+=a*sn,V+=a*an,q+=a*un,a=v[11],je+=a*k,Ie+=a*Ge,Ue+=a*lt,Be+=a*st,he+=a*qe,we+=a*nt,ae+=a*rt,ge+=a*Ot,me+=a*vt,le+=a*Nt,U+=a*$t,D+=a*It,J+=a*zt,V+=a*sn,q+=a*an,te+=a*un,a=v[12],Ie+=a*k,Ue+=a*Ge,Be+=a*lt,he+=a*st,we+=a*qe,ae+=a*nt,ge+=a*rt,me+=a*Ot,le+=a*vt,U+=a*Nt,D+=a*$t,J+=a*It,V+=a*zt,q+=a*sn,te+=a*an,ke+=a*un,a=v[13],Ue+=a*k,Be+=a*Ge,he+=a*lt,we+=a*st,ae+=a*qe,ge+=a*nt,me+=a*rt,le+=a*Ot,U+=a*vt,D+=a*Nt,J+=a*$t,V+=a*It,q+=a*zt,te+=a*sn,ke+=a*an,We+=a*un,a=v[14],Be+=a*k,he+=a*Ge,we+=a*lt,ae+=a*st,ge+=a*qe,me+=a*nt,le+=a*rt,U+=a*Ot,D+=a*vt,J+=a*Nt,V+=a*$t,q+=a*It,te+=a*zt,ke+=a*sn,We+=a*an,Ve+=a*un,a=v[15],he+=a*k,we+=a*Ge,ae+=a*lt,ge+=a*st,me+=a*qe,le+=a*nt,U+=a*rt,D+=a*Ot,J+=a*vt,V+=a*Nt,q+=a*$t,te+=a*It,ke+=a*zt,We+=a*sn,Ve+=a*an,He+=a*un,$+=38*we,B+=38*ae,K+=38*ge,re+=38*me,ve+=38*le,se+=38*U,it+=38*D,ce+=38*J,Re+=38*V,$e+=38*q,Fe+=38*te,je+=38*ke,Ie+=38*We,Ue+=38*Ve,Be+=38*He,x=1,a=$+x+65535,x=Math.floor(a/65536),$=a-x*65536,a=B+x+65535,x=Math.floor(a/65536),B=a-x*65536,a=K+x+65535,x=Math.floor(a/65536),K=a-x*65536,a=re+x+65535,x=Math.floor(a/65536),re=a-x*65536,a=ve+x+65535,x=Math.floor(a/65536),ve=a-x*65536,a=se+x+65535,x=Math.floor(a/65536),se=a-x*65536,a=it+x+65535,x=Math.floor(a/65536),it=a-x*65536,a=ce+x+65535,x=Math.floor(a/65536),ce=a-x*65536,a=Re+x+65535,x=Math.floor(a/65536),Re=a-x*65536,a=$e+x+65535,x=Math.floor(a/65536),$e=a-x*65536,a=Fe+x+65535,x=Math.floor(a/65536),Fe=a-x*65536,a=je+x+65535,x=Math.floor(a/65536),je=a-x*65536,a=Ie+x+65535,x=Math.floor(a/65536),Ie=a-x*65536,a=Ue+x+65535,x=Math.floor(a/65536),Ue=a-x*65536,a=Be+x+65535,x=Math.floor(a/65536),Be=a-x*65536,a=he+x+65535,x=Math.floor(a/65536),he=a-x*65536,$+=x-1+37*(x-1),x=1,a=$+x+65535,x=Math.floor(a/65536),$=a-x*65536,a=B+x+65535,x=Math.floor(a/65536),B=a-x*65536,a=K+x+65535,x=Math.floor(a/65536),K=a-x*65536,a=re+x+65535,x=Math.floor(a/65536),re=a-x*65536,a=ve+x+65535,x=Math.floor(a/65536),ve=a-x*65536,a=se+x+65535,x=Math.floor(a/65536),se=a-x*65536,a=it+x+65535,x=Math.floor(a/65536),it=a-x*65536,a=ce+x+65535,x=Math.floor(a/65536),ce=a-x*65536,a=Re+x+65535,x=Math.floor(a/65536),Re=a-x*65536,a=$e+x+65535,x=Math.floor(a/65536),$e=a-x*65536,a=Fe+x+65535,x=Math.floor(a/65536),Fe=a-x*65536,a=je+x+65535,x=Math.floor(a/65536),je=a-x*65536,a=Ie+x+65535,x=Math.floor(a/65536),Ie=a-x*65536,a=Ue+x+65535,x=Math.floor(a/65536),Ue=a-x*65536,a=Be+x+65535,x=Math.floor(a/65536),Be=a-x*65536,a=he+x+65535,x=Math.floor(a/65536),he=a-x*65536,$+=x-1+37*(x-1),d[0]=$,d[1]=B,d[2]=K,d[3]=re,d[4]=ve,d[5]=se,d[6]=it,d[7]=ce,d[8]=Re,d[9]=$e,d[10]=Fe,d[11]=je,d[12]=Ie,d[13]=Ue,d[14]=Be,d[15]=he}function ft(d,v){Me(d,v,v)}function Pn(d,v){var p=n(),a;for(a=0;a<16;a++)p[a]=v[a];for(a=253;a>=0;a--)ft(p,p),a!==2&&a!==4&&Me(p,p,v);for(a=0;a<16;a++)d[a]=p[a]}function H(d,v){var p=n(),a;for(a=0;a<16;a++)p[a]=v[a];for(a=250;a>=0;a--)ft(p,p),a!==1&&Me(p,p,v);for(a=0;a<16;a++)d[a]=p[a]}function z(d,v,p){var a=new Uint8Array(32),x=new Float64Array(80),$,B,K=n(),re=n(),ve=n(),se=n(),it=n(),ce=n();for(B=0;B<31;B++)a[B]=v[B];for(a[31]=v[31]&127|64,a[0]&=248,Je(x,p),B=0;B<16;B++)re[B]=x[B],se[B]=K[B]=ve[B]=0;for(K[0]=se[0]=1,B=254;B>=0;--B)$=a[B>>>3]>>>(B&7)&1,Z(K,re,$),Z(ve,se,$),ct(it,K,ve),mt(K,K,ve),ct(ve,re,se),mt(re,re,se),ft(se,it),ft(ce,K),Me(K,ve,K),Me(ve,re,it),ct(it,K,ve),mt(K,K,ve),ft(re,K),mt(ve,se,ce),Me(K,ve,u),ct(K,K,se),Me(ve,ve,K),Me(K,se,ce),Me(se,re,x),ft(re,it),Z(K,re,$),Z(ve,se,$);for(B=0;B<16;B++)x[B+16]=K[B],x[B+32]=ve[B],x[B+48]=re[B],x[B+64]=se[B];var Re=x.subarray(32),$e=x.subarray(16);return Pn(Re,Re),Me($e,$e,Re),ie(d,$e),0}function j(d,v){return z(d,v,i)}function Q(d,v){return r(v,32),j(d,v)}function G(d,v,p){var a=new Uint8Array(32);return z(a,p,v),A(d,o,a,I)}var oe=Y,xe=ee;function be(d,v,p,a,x,$){var B=new Uint8Array(32);return G(B,x,$),oe(d,v,p,a,B)}function dt(d,v,p,a,x,$){var B=new Uint8Array(32);return G(B,x,$),xe(d,v,p,a,B)}var wt=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function _e(d,v,p,a){for(var x=new Int32Array(16),$=new Int32Array(16),B,K,re,ve,se,it,ce,Re,$e,Fe,je,Ie,Ue,Be,he,we,ae,ge,me,le,U,D,J,V,q,te,ke=d[0],We=d[1],Ve=d[2],He=d[3],k=d[4],Ge=d[5],lt=d[6],st=d[7],qe=v[0],nt=v[1],rt=v[2],Ot=v[3],vt=v[4],Nt=v[5],$t=v[6],It=v[7],zt=0;a>=128;){for(me=0;me<16;me++)le=8*me+zt,x[me]=p[le+0]<<24|p[le+1]<<16|p[le+2]<<8|p[le+3],$[me]=p[le+4]<<24|p[le+5]<<16|p[le+6]<<8|p[le+7];for(me=0;me<80;me++)if(B=ke,K=We,re=Ve,ve=He,se=k,it=Ge,ce=lt,Re=st,$e=qe,Fe=nt,je=rt,Ie=Ot,Ue=vt,Be=Nt,he=$t,we=It,U=st,D=It,J=D&65535,V=D>>>16,q=U&65535,te=U>>>16,U=(k>>>14|vt<<18)^(k>>>18|vt<<14)^(vt>>>9|k<<23),D=(vt>>>14|k<<18)^(vt>>>18|k<<14)^(k>>>9|vt<<23),J+=D&65535,V+=D>>>16,q+=U&65535,te+=U>>>16,U=k&Ge^~k<,D=vt&Nt^~vt&$t,J+=D&65535,V+=D>>>16,q+=U&65535,te+=U>>>16,U=wt[me*2],D=wt[me*2+1],J+=D&65535,V+=D>>>16,q+=U&65535,te+=U>>>16,U=x[me%16],D=$[me%16],J+=D&65535,V+=D>>>16,q+=U&65535,te+=U>>>16,V+=J>>>16,q+=V>>>16,te+=q>>>16,ae=q&65535|te<<16,ge=J&65535|V<<16,U=ae,D=ge,J=D&65535,V=D>>>16,q=U&65535,te=U>>>16,U=(ke>>>28|qe<<4)^(qe>>>2|ke<<30)^(qe>>>7|ke<<25),D=(qe>>>28|ke<<4)^(ke>>>2|qe<<30)^(ke>>>7|qe<<25),J+=D&65535,V+=D>>>16,q+=U&65535,te+=U>>>16,U=ke&We^ke&Ve^We&Ve,D=qe&nt^qe&rt^nt&rt,J+=D&65535,V+=D>>>16,q+=U&65535,te+=U>>>16,V+=J>>>16,q+=V>>>16,te+=q>>>16,Re=q&65535|te<<16,we=J&65535|V<<16,U=ve,D=Ie,J=D&65535,V=D>>>16,q=U&65535,te=U>>>16,U=ae,D=ge,J+=D&65535,V+=D>>>16,q+=U&65535,te+=U>>>16,V+=J>>>16,q+=V>>>16,te+=q>>>16,ve=q&65535|te<<16,Ie=J&65535|V<<16,We=B,Ve=K,He=re,k=ve,Ge=se,lt=it,st=ce,ke=Re,nt=$e,rt=Fe,Ot=je,vt=Ie,Nt=Ue,$t=Be,It=he,qe=we,me%16===15)for(le=0;le<16;le++)U=x[le],D=$[le],J=D&65535,V=D>>>16,q=U&65535,te=U>>>16,U=x[(le+9)%16],D=$[(le+9)%16],J+=D&65535,V+=D>>>16,q+=U&65535,te+=U>>>16,ae=x[(le+1)%16],ge=$[(le+1)%16],U=(ae>>>1|ge<<31)^(ae>>>8|ge<<24)^ae>>>7,D=(ge>>>1|ae<<31)^(ge>>>8|ae<<24)^(ge>>>7|ae<<25),J+=D&65535,V+=D>>>16,q+=U&65535,te+=U>>>16,ae=x[(le+14)%16],ge=$[(le+14)%16],U=(ae>>>19|ge<<13)^(ge>>>29|ae<<3)^ae>>>6,D=(ge>>>19|ae<<13)^(ae>>>29|ge<<3)^(ge>>>6|ae<<26),J+=D&65535,V+=D>>>16,q+=U&65535,te+=U>>>16,V+=J>>>16,q+=V>>>16,te+=q>>>16,x[le]=q&65535|te<<16,$[le]=J&65535|V<<16;U=ke,D=qe,J=D&65535,V=D>>>16,q=U&65535,te=U>>>16,U=d[0],D=v[0],J+=D&65535,V+=D>>>16,q+=U&65535,te+=U>>>16,V+=J>>>16,q+=V>>>16,te+=q>>>16,d[0]=ke=q&65535|te<<16,v[0]=qe=J&65535|V<<16,U=We,D=nt,J=D&65535,V=D>>>16,q=U&65535,te=U>>>16,U=d[1],D=v[1],J+=D&65535,V+=D>>>16,q+=U&65535,te+=U>>>16,V+=J>>>16,q+=V>>>16,te+=q>>>16,d[1]=We=q&65535|te<<16,v[1]=nt=J&65535|V<<16,U=Ve,D=rt,J=D&65535,V=D>>>16,q=U&65535,te=U>>>16,U=d[2],D=v[2],J+=D&65535,V+=D>>>16,q+=U&65535,te+=U>>>16,V+=J>>>16,q+=V>>>16,te+=q>>>16,d[2]=Ve=q&65535|te<<16,v[2]=rt=J&65535|V<<16,U=He,D=Ot,J=D&65535,V=D>>>16,q=U&65535,te=U>>>16,U=d[3],D=v[3],J+=D&65535,V+=D>>>16,q+=U&65535,te+=U>>>16,V+=J>>>16,q+=V>>>16,te+=q>>>16,d[3]=He=q&65535|te<<16,v[3]=Ot=J&65535|V<<16,U=k,D=vt,J=D&65535,V=D>>>16,q=U&65535,te=U>>>16,U=d[4],D=v[4],J+=D&65535,V+=D>>>16,q+=U&65535,te+=U>>>16,V+=J>>>16,q+=V>>>16,te+=q>>>16,d[4]=k=q&65535|te<<16,v[4]=vt=J&65535|V<<16,U=Ge,D=Nt,J=D&65535,V=D>>>16,q=U&65535,te=U>>>16,U=d[5],D=v[5],J+=D&65535,V+=D>>>16,q+=U&65535,te+=U>>>16,V+=J>>>16,q+=V>>>16,te+=q>>>16,d[5]=Ge=q&65535|te<<16,v[5]=Nt=J&65535|V<<16,U=lt,D=$t,J=D&65535,V=D>>>16,q=U&65535,te=U>>>16,U=d[6],D=v[6],J+=D&65535,V+=D>>>16,q+=U&65535,te+=U>>>16,V+=J>>>16,q+=V>>>16,te+=q>>>16,d[6]=lt=q&65535|te<<16,v[6]=$t=J&65535|V<<16,U=st,D=It,J=D&65535,V=D>>>16,q=U&65535,te=U>>>16,U=d[7],D=v[7],J+=D&65535,V+=D>>>16,q+=U&65535,te+=U>>>16,V+=J>>>16,q+=V>>>16,te+=q>>>16,d[7]=st=q&65535|te<<16,v[7]=It=J&65535|V<<16,zt+=128,a-=128}return a}function Mt(d,v,p){var a=new Int32Array(8),x=new Int32Array(8),$=new Uint8Array(256),B,K=p;for(a[0]=1779033703,a[1]=3144134277,a[2]=1013904242,a[3]=2773480762,a[4]=1359893119,a[5]=2600822924,a[6]=528734635,a[7]=1541459225,x[0]=4089235720,x[1]=2227873595,x[2]=4271175723,x[3]=1595750129,x[4]=2917565137,x[5]=725511199,x[6]=4215389547,x[7]=327033209,_e(a,x,v,p),p%=128,B=0;B=0;--x)a=p[x/8|0]>>(x&7)&1,Xr(d,v,a),Ft(v,d),Ft(d,d),Xr(d,v,a)}function Nn(d,v){var p=[n(),n(),n(),n()];ye(p[0],g),ye(p[1],h),ye(p[2],s),Me(p[3],g,h),Mn(d,p,v)}function De(d,v,p){var a=new Uint8Array(64),x=[n(),n(),n(),n()],$;for(p||r(v,32),Mt(a,v,32),a[0]&=248,a[31]&=127,a[31]|=64,Nn(x,a),Gt(d,x),$=0;$<32;$++)v[$+32]=d[$];return 0}var et=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function Ne(d,v){var p,a,x,$;for(a=63;a>=32;--a){for(p=0,x=a-32,$=a-12;x<$;++x)v[x]+=p-16*v[a]*et[x-(a-32)],p=Math.floor((v[x]+128)/256),v[x]-=p*256;v[x]+=p,v[a]=0}for(p=0,x=0;x<32;x++)v[x]+=p-(v[31]>>4)*et[x],p=v[x]>>8,v[x]&=255;for(x=0;x<32;x++)v[x]-=p*et[x];for(a=0;a<32;a++)v[a+1]+=v[a]>>8,d[a]=v[a]&255}function gt(d){var v=new Float64Array(64),p;for(p=0;p<64;p++)v[p]=d[p];for(p=0;p<64;p++)d[p]=0;Ne(d,v)}function Vn(d,v,p,a){var x=new Uint8Array(64),$=new Uint8Array(64),B=new Uint8Array(64),K,re,ve=new Float64Array(64),se=[n(),n(),n(),n()];Mt(x,a,32),x[0]&=248,x[31]&=127,x[31]|=64;var it=p+64;for(K=0;K>7&&mt(d[0],l,d[0]),Me(d[3],d[0],d[1]),0)}function tt(d,v,p,a){var x,$=new Uint8Array(32),B=new Uint8Array(64),K=[n(),n(),n(),n()],re=[n(),n(),n(),n()];if(p<64||Kn(re,a))return-1;for(x=0;x=0},t.sign.keyPair=function(){var d=new Uint8Array(No),v=new Uint8Array(si);return De(d,v),{publicKey:d,secretKey:v}},t.sign.keyPair.fromSecretKey=function(d){if($n(d),d.length!==si)throw new Error("bad secret key size");for(var v=new Uint8Array(No),p=0;p=e.length)throw new Error("Index is out of buffer");const n=e.slice(0,t),r=e.slice(t);return[n,r]}function _c(e){let t="";return e.forEach(n=>{t+=("0"+(n&255).toString(16)).slice(-2)}),t}function za(e){if(e.length%2!==0)throw new Error(`Cannot convert ${e} to bytesArray`);const t=new Uint8Array(e.length/2);for(let n=0;n{var o,i;if(!((o=void 0)===null||o===void 0)&&o.aborted){r(new Se("Delay aborted"));return}const l=setTimeout(()=>n(),e);(i=void 0)===null||i===void 0||i.addEventListener("abort",()=>{clearTimeout(l),r(new Se("Delay aborted"))})})})}function ir(e){const t=new AbortController;return e!=null&&e.aborted?t.abort():e==null||e.addEventListener("abort",()=>t.abort(),{once:!0}),t}function Nl(e,t){var n,r;return fe(this,void 0,void 0,function*(){const o=(n=t==null?void 0:t.attempts)!==null&&n!==void 0?n:10,i=(r=t==null?void 0:t.delayMs)!==null&&r!==void 0?r:200,l=ir(t==null?void 0:t.signal);if(typeof e!="function")throw new Se(`Expected a function, got ${typeof e}`);let s=0,u;for(;sfe(this,void 0,void 0,function*(){if(i=g??null,l==null||l.abort(),l=ir(g),l.signal.aborted)throw new Se("Resource creation was aborted");r=h??null;const b=e(l.signal,...h);o=b;const y=yield b;if(o!==b&&y!==n)throw yield t(y),new Se("Resource creation was aborted by a new resource creation");return n=y,n});return{create:s,current:()=>n??null,dispose:()=>fe(this,void 0,void 0,function*(){try{const g=n;n=null;const h=o;o=null;try{l==null||l.abort()}catch{}yield Promise.allSettled([g?t(g):Promise.resolve(),h?t(yield h):Promise.resolve()])}catch{}}),recreate:g=>fe(this,void 0,void 0,function*(){const h=n,b=o,y=r,S=i;if(yield P3(g),h===n&&b===o&&y===r&&S===i)return yield s(i,...y??[]);throw new Se("Resource recreation was aborted by a new resource creation")})}}function Tv(e,t){const n=t==null?void 0:t.timeout,r=t==null?void 0:t.signal,o=ir(r);return new Promise((i,l)=>{if(o.signal.aborted){l(new Se("Operation aborted"));return}let s;typeof n<"u"&&(s=setTimeout(()=>{o.abort(),l(new Se(`Timeout after ${n}ms`))},n)),o.signal.addEventListener("abort",()=>{clearTimeout(s),l(new Se("Operation aborted"))},{once:!0});const u={timeout:n,abort:o.signal};e(i,l,u).finally(()=>clearTimeout(s))})}class Ac{constructor(t,n,r,o,i){this.bridgeUrl=n,this.sessionId=r,this.listener=o,this.errorsListener=i,this.ssePath="events",this.postPath="message",this.heartbeatMessage="heartbeat",this.defaultTtl=300,this.defaultReconnectDelay=5e3,this.eventSource=Av((l,s)=>fe(this,void 0,void 0,function*(){const u={bridgeUrl:this.bridgeUrl,ssePath:this.ssePath,sessionId:this.sessionId,bridgeGatewayStorage:this.bridgeGatewayStorage,errorHandler:this.errorsHandler.bind(this),messageHandler:this.messagesHandler.bind(this),signal:l,openingDeadlineMS:s};return yield Lv(u)}),l=>fe(this,void 0,void 0,function*(){l.close()})),this.bridgeGatewayStorage=new Ev(t,n)}get isReady(){const t=this.eventSource.current();return(t==null?void 0:t.readyState)===EventSource.OPEN}get isClosed(){const t=this.eventSource.current();return(t==null?void 0:t.readyState)!==EventSource.OPEN}get isConnecting(){const t=this.eventSource.current();return(t==null?void 0:t.readyState)===EventSource.CONNECTING}registerSession(t){return fe(this,void 0,void 0,function*(){yield this.eventSource.create(t==null?void 0:t.signal,t==null?void 0:t.openingDeadlineMS)})}send(t,n,r,o){var i;return fe(this,void 0,void 0,function*(){const l={};typeof o=="number"?l.ttl=o:(l.ttl=o==null?void 0:o.ttl,l.signal=o==null?void 0:o.signal,l.attempts=o==null?void 0:o.attempts);const s=new URL(L3(this.bridgeUrl,this.postPath));s.searchParams.append("client_id",this.sessionId),s.searchParams.append("to",n),s.searchParams.append("ttl",((l==null?void 0:l.ttl)||this.defaultTtl).toString()),s.searchParams.append("topic",r);const u=nd.encode(t);yield Nl(c=>fe(this,void 0,void 0,function*(){const f=yield this.post(s,u,c.signal);if(!f.ok)throw new Se(`Bridge send failed, status ${f.status}`)}),{attempts:(i=l==null?void 0:l.attempts)!==null&&i!==void 0?i:Number.MAX_SAFE_INTEGER,delayMs:5e3,signal:l==null?void 0:l.signal})})}pause(){this.eventSource.dispose().catch(t=>xr(`Bridge pause failed, ${t}`))}unPause(){return fe(this,void 0,void 0,function*(){yield this.eventSource.recreate(0)})}close(){return fe(this,void 0,void 0,function*(){yield this.eventSource.dispose().catch(t=>xr(`Bridge close failed, ${t}`))})}setListener(t){this.listener=t}setErrorsListener(t){this.errorsListener=t}post(t,n,r){return fe(this,void 0,void 0,function*(){const o=yield fetch(t,{method:"post",body:n,signal:r});if(!o.ok)throw new Se(`Bridge send failed, status ${o.status}`);return o})}errorsHandler(t,n){return fe(this,void 0,void 0,function*(){if(this.isConnecting){xr("Bridge error",JSON.stringify(n));return}if(this.isReady){try{this.errorsListener(n)}catch{}return}if(this.isClosed)return t.close(),Vt(`Bridge reconnecting, ${this.defaultReconnectDelay}ms delay`),yield this.eventSource.recreate(this.defaultReconnectDelay);throw new Se("Bridge error, unknown state")})}messagesHandler(t){return fe(this,void 0,void 0,function*(){if(t.data===this.heartbeatMessage||(yield this.bridgeGatewayStorage.storeLastEventId(t.lastEventId),this.isClosed))return;let n;try{n=JSON.parse(t.data)}catch(r){throw new Se(`Bridge message parse failed, message ${r.data}`)}this.listener(n)})}}function Lv(e){return fe(this,void 0,void 0,function*(){return yield Tv((t,n,r)=>fe(this,void 0,void 0,function*(){var o;const l=ir(r.signal).signal;if(l.aborted){n(new Se("Bridge connection aborted"));return}const s=new URL(L3(e.bridgeUrl,e.ssePath));s.searchParams.append("client_id",e.sessionId);const u=yield e.bridgeGatewayStorage.getLastEventId();if(u&&s.searchParams.append("last_event_id",u),l.aborted){n(new Se("Bridge connection aborted"));return}const c=new EventSource(s.toString());c.onerror=f=>fe(this,void 0,void 0,function*(){if(l.aborted){c.close(),n(new Se("Bridge connection aborted"));return}try{const g=yield e.errorHandler(c,f);g!==c&&c.close(),g&&g!==c&&t(g)}catch(g){c.close(),n(g)}}),c.onopen=()=>{if(l.aborted){c.close(),n(new Se("Bridge connection aborted"));return}t(c)},c.onmessage=f=>{if(l.aborted){c.close(),n(new Se("Bridge connection aborted"));return}e.messageHandler(f)},(o=e.signal)===null||o===void 0||o.addEventListener("abort",()=>{c.close(),n(new Se("Bridge connection aborted"))})}),{timeout:e.openingDeadlineMS,signal:e.signal})})}function $l(e){return!("connectEvent"in e)}class is{constructor(t){this.storage=t,this.storeKey="ton-connect-storage_bridge-connection"}storeConnection(t){return fe(this,void 0,void 0,function*(){if(t.type==="injected")return this.storage.setItem(this.storeKey,JSON.stringify(t));if(!$l(t)){const r={sessionKeyPair:t.session.sessionCrypto.stringifyKeypair(),walletPublicKey:t.session.walletPublicKey,bridgeUrl:t.session.bridgeUrl},o={type:"http",connectEvent:t.connectEvent,session:r,lastWalletEventId:t.lastWalletEventId,nextRpcRequestId:t.nextRpcRequestId};return this.storage.setItem(this.storeKey,JSON.stringify(o))}const n={type:"http",connectionSource:t.connectionSource,sessionCrypto:t.sessionCrypto.stringifyKeypair()};return this.storage.setItem(this.storeKey,JSON.stringify(n))})}removeConnection(){return fe(this,void 0,void 0,function*(){return this.storage.removeItem(this.storeKey)})}getConnection(){return fe(this,void 0,void 0,function*(){const t=yield this.storage.getItem(this.storeKey);if(!t)return null;const n=JSON.parse(t);if(n.type==="injected")return n;if("connectEvent"in n){const r=new U0(n.session.sessionKeyPair);return{type:"http",connectEvent:n.connectEvent,lastWalletEventId:n.lastWalletEventId,nextRpcRequestId:n.nextRpcRequestId,session:{sessionCrypto:r,bridgeUrl:n.session.bridgeUrl,walletPublicKey:n.session.walletPublicKey}}}return{type:"http",sessionCrypto:new U0(n.sessionCrypto),connectionSource:n.connectionSource}})}getHttpConnection(){return fe(this,void 0,void 0,function*(){const t=yield this.getConnection();if(!t)throw new Se("Trying to read HTTP connection source while nothing is stored");if(t.type==="injected")throw new Se("Trying to read HTTP connection source while injected connection is stored");return t})}getHttpPendingConnection(){return fe(this,void 0,void 0,function*(){const t=yield this.getConnection();if(!t)throw new Se("Trying to read HTTP connection source while nothing is stored");if(t.type==="injected")throw new Se("Trying to read HTTP connection source while injected connection is stored");if(!$l(t))throw new Se("Trying to read HTTP-pending connection while http connection is stored");return t})}getInjectedConnection(){return fe(this,void 0,void 0,function*(){const t=yield this.getConnection();if(!t)throw new Se("Trying to read Injected bridge connection source while nothing is stored");if((t==null?void 0:t.type)==="http")throw new Se("Trying to read Injected bridge connection source while HTTP connection is stored");return t})}storedConnectionType(){return fe(this,void 0,void 0,function*(){const t=yield this.storage.getItem(this.storeKey);return t?JSON.parse(t).type:null})}storeLastWalletEventId(t){return fe(this,void 0,void 0,function*(){const n=yield this.getConnection();if(n&&n.type==="http"&&!$l(n))return n.lastWalletEventId=t,this.storeConnection(n)})}getLastWalletEventId(){return fe(this,void 0,void 0,function*(){const t=yield this.getConnection();if(t&&"lastWalletEventId"in t)return t.lastWalletEventId})}increaseNextRpcRequestId(){return fe(this,void 0,void 0,function*(){const t=yield this.getConnection();if(t&&"nextRpcRequestId"in t){const n=t.nextRpcRequestId||0;return t.nextRpcRequestId=n+1,this.storeConnection(t)}})}getNextRpcRequestId(){return fe(this,void 0,void 0,function*(){const t=yield this.getConnection();return t&&"nextRpcRequestId"in t&&t.nextRpcRequestId||0})}}const M3=2;class ls{constructor(t,n){this.storage=t,this.walletConnectionSource=n,this.type="http",this.standardUniversalLink="tc://",this.pendingRequests=new Map,this.session=null,this.gateway=null,this.pendingGateways=[],this.listeners=[],this.defaultOpeningDeadlineMS=5e3,this.connectionStorage=new is(t)}static fromStorage(t){return fe(this,void 0,void 0,function*(){const r=yield new is(t).getHttpConnection();return $l(r)?new ls(t,r.connectionSource):new ls(t,{bridgeUrl:r.session.bridgeUrl})})}connect(t,n){var r;const o=ir(n==null?void 0:n.signal);(r=this.abortController)===null||r===void 0||r.abort(),this.abortController=o,this.closeGateways();const i=new U0;this.session={sessionCrypto:i,bridgeUrl:"bridgeUrl"in this.walletConnectionSource?this.walletConnectionSource.bridgeUrl:""},this.connectionStorage.storeConnection({type:"http",connectionSource:this.walletConnectionSource,sessionCrypto:i}).then(()=>fe(this,void 0,void 0,function*(){o.signal.aborted||(yield Nl(s=>this.openGateways(i,{openingDeadlineMS:n==null?void 0:n.openingDeadlineMS,signal:s==null?void 0:s.signal}),{attempts:Number.MAX_SAFE_INTEGER,delayMs:5e3,signal:o.signal}))}));const l="universalLink"in this.walletConnectionSource&&this.walletConnectionSource.universalLink?this.walletConnectionSource.universalLink:this.standardUniversalLink;return this.generateUniversalLink(l,t)}restoreConnection(t){var n,r;return fe(this,void 0,void 0,function*(){const o=ir(t==null?void 0:t.signal);if((n=this.abortController)===null||n===void 0||n.abort(),this.abortController=o,o.signal.aborted)return;this.closeGateways();const i=yield this.connectionStorage.getHttpConnection();if(!i||o.signal.aborted)return;const l=(r=t==null?void 0:t.openingDeadlineMS)!==null&&r!==void 0?r:this.defaultOpeningDeadlineMS;if($l(i))return this.session={sessionCrypto:i.sessionCrypto,bridgeUrl:"bridgeUrl"in this.walletConnectionSource?this.walletConnectionSource.bridgeUrl:""},yield this.openGateways(i.sessionCrypto,{openingDeadlineMS:l,signal:o==null?void 0:o.signal});if(Array.isArray(this.walletConnectionSource))throw new Se("Internal error. Connection source is array while WalletConnectionSourceHTTP was expected.");if(this.session=i.session,this.gateway&&(Vt("Gateway is already opened, closing previous gateway"),yield this.gateway.close()),this.gateway=new Ac(this.storage,this.walletConnectionSource.bridgeUrl,i.session.sessionCrypto.sessionId,this.gatewayListener.bind(this),this.gatewayErrorsListener.bind(this)),!o.signal.aborted){this.listeners.forEach(s=>s(i.connectEvent));try{yield Nl(s=>this.gateway.registerSession({openingDeadlineMS:l,signal:s.signal}),{attempts:Number.MAX_SAFE_INTEGER,delayMs:5e3,signal:o.signal})}catch{yield this.disconnect({signal:o.signal});return}}})}sendRequest(t,n){const r={};return typeof n=="function"?r.onRequestSent=n:(r.onRequestSent=n==null?void 0:n.onRequestSent,r.signal=n==null?void 0:n.signal,r.attempts=n==null?void 0:n.attempts),new Promise((o,i)=>fe(this,void 0,void 0,function*(){var l;if(!this.gateway||!this.session||!("walletPublicKey"in this.session))throw new Se("Trying to send bridge request without session");const s=(yield this.connectionStorage.getNextRpcRequestId()).toString();yield this.connectionStorage.increaseNextRpcRequestId(),Vt("Send http-bridge request:",Object.assign(Object.assign({},t),{id:s}));const u=this.session.sessionCrypto.encrypt(JSON.stringify(Object.assign(Object.assign({},t),{id:s})),za(this.session.walletPublicKey));try{yield this.gateway.send(u,this.session.walletPublicKey,t.method,{attempts:r==null?void 0:r.attempts,signal:r==null?void 0:r.signal}),(l=r==null?void 0:r.onRequestSent)===null||l===void 0||l.call(r),this.pendingRequests.set(s.toString(),o)}catch(c){i(c)}}))}closeConnection(){this.closeGateways(),this.listeners=[],this.session=null,this.gateway=null}disconnect(t){return fe(this,void 0,void 0,function*(){return new Promise(n=>fe(this,void 0,void 0,function*(){let r=!1,o=null;const i=()=>{r||(r=!0,this.removeBridgeAndSession().then(n))};try{this.closeGateways();const l=ir(t==null?void 0:t.signal);o=setTimeout(()=>{l.abort()},this.defaultOpeningDeadlineMS),yield this.sendRequest({method:"disconnect",params:[]},{onRequestSent:i,signal:l.signal,attempts:1})}catch(l){Vt("Disconnect error:",l),r||this.removeBridgeAndSession().then(n)}finally{o&&clearTimeout(o),i()}}))})}listen(t){return this.listeners.push(t),()=>this.listeners=this.listeners.filter(n=>n!==t)}pause(){var t;(t=this.gateway)===null||t===void 0||t.pause(),this.pendingGateways.forEach(n=>n.pause())}unPause(){return fe(this,void 0,void 0,function*(){const t=this.pendingGateways.map(n=>n.unPause());this.gateway&&t.push(this.gateway.unPause()),yield Promise.all(t)})}pendingGatewaysListener(t,n,r){return fe(this,void 0,void 0,function*(){if(!this.pendingGateways.includes(t)){yield t.close();return}return this.closeGateways({except:t}),this.gateway&&(Vt("Gateway is already opened, closing previous gateway"),yield this.gateway.close()),this.session.bridgeUrl=n,this.gateway=t,this.gateway.setErrorsListener(this.gatewayErrorsListener.bind(this)),this.gateway.setListener(this.gatewayListener.bind(this)),this.gatewayListener(r)})}gatewayListener(t){return fe(this,void 0,void 0,function*(){const n=JSON.parse(this.session.sessionCrypto.decrypt(nd.decode(t.message).toUint8Array(),za(t.from)));if(Vt("Wallet message received:",n),!("event"in n)){const o=n.id.toString(),i=this.pendingRequests.get(o);if(!i){Vt(`Response id ${o} doesn't match any request's id`);return}i(n),this.pendingRequests.delete(o);return}if(n.id!==void 0){const o=yield this.connectionStorage.getLastWalletEventId();if(o!==void 0&&n.id<=o){xr(`Received event id (=${n.id}) must be greater than stored last wallet event id (=${o}) `);return}n.event!=="connect"&&(yield this.connectionStorage.storeLastWalletEventId(n.id))}const r=this.listeners;n.event==="connect"&&(yield this.updateSession(n,t.from)),n.event==="disconnect"&&(Vt("Removing bridge and session: received disconnect event"),yield this.removeBridgeAndSession()),r.forEach(o=>o(n))})}gatewayErrorsListener(t){return fe(this,void 0,void 0,function*(){throw new Se(`Bridge error ${JSON.stringify(t)}`)})}updateSession(t,n){return fe(this,void 0,void 0,function*(){this.session=Object.assign(Object.assign({},this.session),{walletPublicKey:n});const r=t.payload.items.find(i=>i.name==="ton_addr"),o=Object.assign(Object.assign({},t),{payload:Object.assign(Object.assign({},t.payload),{items:[r]})});yield this.connectionStorage.storeConnection({type:"http",session:this.session,lastWalletEventId:t.id,connectEvent:o,nextRpcRequestId:0})})}removeBridgeAndSession(){return fe(this,void 0,void 0,function*(){this.closeConnection(),yield this.connectionStorage.removeConnection()})}generateUniversalLink(t,n){return zo(t)?this.generateTGUniversalLink(t,n):this.generateRegularUniversalLink(t,n)}generateRegularUniversalLink(t,n){const r=new URL(t);return r.searchParams.append("v",M3.toString()),r.searchParams.append("id",this.session.sessionCrypto.sessionId),r.searchParams.append("r",JSON.stringify(n)),r.toString()}generateTGUniversalLink(t,n){const o=this.generateRegularUniversalLink("about:blank",n).split("?")[1],i="tonconnect-"+R3(o),l=this.convertToDirectLink(t),s=new URL(l);return s.searchParams.append("startapp",i),s.toString()}convertToDirectLink(t){const n=new URL(t);return n.searchParams.has("attach")&&(n.searchParams.delete("attach"),n.pathname+="/start"),n.toString()}openGateways(t,n){return fe(this,void 0,void 0,function*(){if(Array.isArray(this.walletConnectionSource)){this.pendingGateways.map(r=>r.close().catch()),this.pendingGateways=this.walletConnectionSource.map(r=>{const o=new Ac(this.storage,r.bridgeUrl,t.sessionId,()=>{},()=>{});return o.setListener(i=>this.pendingGatewaysListener(o,r.bridgeUrl,i)),o}),yield Promise.allSettled(this.pendingGateways.map(r=>Nl(o=>this.pendingGateways.some(i=>i===r)?r.registerSession({openingDeadlineMS:n==null?void 0:n.openingDeadlineMS,signal:o.signal}):r.close(),{attempts:Number.MAX_SAFE_INTEGER,delayMs:5e3,signal:n==null?void 0:n.signal})));return}else return this.gateway&&(Vt("Gateway is already opened, closing previous gateway"),yield this.gateway.close()),this.gateway=new Ac(this.storage,this.walletConnectionSource.bridgeUrl,t.sessionId,this.gatewayListener.bind(this),this.gatewayErrorsListener.bind(this)),yield this.gateway.registerSession({openingDeadlineMS:n==null?void 0:n.openingDeadlineMS,signal:n==null?void 0:n.signal})})}closeGateways(t){var n;(n=this.gateway)===null||n===void 0||n.close(),this.pendingGateways.filter(r=>r!==(t==null?void 0:t.except)).forEach(r=>r.close()),this.pendingGateways=[]}}function e4(e,t){return N3(e,[t])}function N3(e,t){return!e||typeof e!="object"?!1:t.every(n=>n in e)}function Rv(e){try{return!e4(e,"tonconnect")||!e4(e.tonconnect,"walletInfo")?!1:N3(e.tonconnect.walletInfo,["name","app_name","image","about_url","platforms"])}catch{return!1}}let Pv=class yl{constructor(){this.storage={}}static getInstance(){return yl.instance||(yl.instance=new yl),yl.instance}get length(){return Object.keys(this.storage).length}clear(){this.storage={}}getItem(t){var n;return(n=this.storage[t])!==null&&n!==void 0?n:null}key(t){var n;const r=Object.keys(this.storage);return t<0||t>=r.length?null:(n=r[t])!==null&&n!==void 0?n:null}removeItem(t){delete this.storage[t]}setItem(t,n){this.storage[t]=n}};function Iu(){if(!(typeof window>"u"))return window}function Mv(){const e=Iu();if(!e)return[];try{return Object.keys(e)}catch{return[]}}function Nv(){if(!(typeof document>"u"))return document}function $v(){var e;const t=(e=Iu())===null||e===void 0?void 0:e.location.origin;return t?t+"/tonconnect-manifest.json":""}function Iv(){if(Bv())return localStorage;if(Ov())throw new Se("`localStorage` is unavailable, but it is required for TonConnect. For more details, see https://github.com/ton-connect/sdk/tree/main/packages/sdk#init-connector");return Pv.getInstance()}function Bv(){try{return typeof localStorage<"u"}catch{return!1}}function Ov(){return typeof process<"u"&&process.versions!=null&&process.versions.node!=null}class kn{constructor(t,n){this.injectedWalletKey=n,this.type="injected",this.unsubscribeCallback=null,this.listenSubscriptions=!1,this.listeners=[];const r=kn.window;if(!kn.isWindowContainsWallet(r,n))throw new id;this.connectionStorage=new is(t),this.injectedWallet=r[n].tonconnect}static fromStorage(t){return fe(this,void 0,void 0,function*(){const r=yield new is(t).getInjectedConnection();return new kn(t,r.jsBridgeKey)})}static isWalletInjected(t){return kn.isWindowContainsWallet(this.window,t)}static isInsideWalletBrowser(t){return kn.isWindowContainsWallet(this.window,t)?this.window[t].tonconnect.isWalletBrowser:!1}static getCurrentlyInjectedWallets(){return this.window?Mv().filter(([r,o])=>Rv(o)).map(([r,o])=>({name:o.tonconnect.walletInfo.name,appName:o.tonconnect.walletInfo.app_name,aboutUrl:o.tonconnect.walletInfo.about_url,imageUrl:o.tonconnect.walletInfo.image,tondns:o.tonconnect.walletInfo.tondns,jsBridgeKey:r,injected:!0,embedded:o.tonconnect.isWalletBrowser,platforms:o.tonconnect.walletInfo.platforms})):[]}static isWindowContainsWallet(t,n){return!!t&&n in t&&typeof t[n]=="object"&&"tonconnect"in t[n]}connect(t){this._connect(M3,t)}restoreConnection(){return fe(this,void 0,void 0,function*(){try{Vt("Injected Provider restoring connection...");const t=yield this.injectedWallet.restoreConnection();Vt("Injected Provider restoring connection response",t),t.event==="connect"?(this.makeSubscriptions(),this.listeners.forEach(n=>n(t))):yield this.connectionStorage.removeConnection()}catch(t){yield this.connectionStorage.removeConnection(),console.error(t)}})}closeConnection(){this.listenSubscriptions&&this.injectedWallet.disconnect(),this.closeAllListeners()}disconnect(){return fe(this,void 0,void 0,function*(){return new Promise(t=>{const n=()=>{this.closeAllListeners(),this.connectionStorage.removeConnection().then(t)};try{this.injectedWallet.disconnect(),n()}catch(r){Vt(r),this.sendRequest({method:"disconnect",params:[]},n)}})})}closeAllListeners(){var t;this.listenSubscriptions=!1,this.listeners=[],(t=this.unsubscribeCallback)===null||t===void 0||t.call(this)}listen(t){return this.listeners.push(t),()=>this.listeners=this.listeners.filter(n=>n!==t)}sendRequest(t,n){var r;return fe(this,void 0,void 0,function*(){const o={};typeof n=="function"?o.onRequestSent=n:(o.onRequestSent=n==null?void 0:n.onRequestSent,o.signal=n==null?void 0:n.signal);const i=(yield this.connectionStorage.getNextRpcRequestId()).toString();yield this.connectionStorage.increaseNextRpcRequestId(),Vt("Send injected-bridge request:",Object.assign(Object.assign({},t),{id:i}));const l=this.injectedWallet.send(Object.assign(Object.assign({},t),{id:i}));return l.then(s=>Vt("Wallet message received:",s)),(r=o==null?void 0:o.onRequestSent)===null||r===void 0||r.call(o),l})}_connect(t,n){return fe(this,void 0,void 0,function*(){try{Vt(`Injected Provider connect request: protocolVersion: ${t}, message:`,n);const r=yield this.injectedWallet.connect(t,n);Vt("Injected Provider connect response:",r),r.event==="connect"&&(yield this.updateSession(),this.makeSubscriptions()),this.listeners.forEach(o=>o(r))}catch(r){Vt("Injected Provider connect error:",r);const o={event:"connect_error",payload:{code:0,message:r==null?void 0:r.toString()}};this.listeners.forEach(i=>i(o))}})}makeSubscriptions(){this.listenSubscriptions=!0,this.unsubscribeCallback=this.injectedWallet.listen(t=>{Vt("Wallet message received:",t),this.listenSubscriptions&&this.listeners.forEach(n=>n(t)),t.event==="disconnect"&&this.disconnect()})}updateSession(){return this.connectionStorage.storeConnection({type:"injected",jsBridgeKey:this.injectedWalletKey,nextRpcRequestId:0})}}kn.window=Iu();class Uv{constructor(){this.localStorage=Iv()}getItem(t){return fe(this,void 0,void 0,function*(){return this.localStorage.getItem(t)})}removeItem(t){return fe(this,void 0,void 0,function*(){this.localStorage.removeItem(t)})}setItem(t,n){return fe(this,void 0,void 0,function*(){this.localStorage.setItem(t,n)})}}function Vo(e){return Dv(e)&&e.injected}function Bu(e){return Vo(e)&&e.embedded}function Dv(e){return"jsBridgeKey"in e}function sd(e){return"bridgeUrl"in e}const jv=[{app_name:"telegram-wallet",name:"Wallet",image:"https://wallet.tg/images/logo-288.png",about_url:"https://wallet.tg/",universal_url:"https://t.me/wallet?attach=wallet",bridge:[{type:"sse",url:"https://bridge.tonapi.io/bridge"}],platforms:["ios","android","macos","windows","linux"]},{app_name:"tonkeeper",name:"Tonkeeper",image:"https://tonkeeper.com/assets/tonconnect-icon.png",tondns:"tonkeeper.ton",about_url:"https://tonkeeper.com",universal_url:"https://app.tonkeeper.com/ton-connect",deepLink:"tonkeeper-tc://",bridge:[{type:"sse",url:"https://bridge.tonapi.io/bridge"},{type:"js",key:"tonkeeper"}],platforms:["ios","android","chrome","firefox","macos"]},{app_name:"mytonwallet",name:"MyTonWallet",image:"https://mytonwallet.io/icon-256.png",about_url:"https://mytonwallet.io",universal_url:"https://connect.mytonwallet.org",bridge:[{type:"js",key:"mytonwallet"},{type:"sse",url:"https://tonconnectbridge.mytonwallet.org/bridge/"}],platforms:["chrome","windows","macos","linux","ios","android","firefox"]},{app_name:"openmask",name:"OpenMask",image:"https://raw.githubusercontent.com/OpenProduct/openmask-extension/main/public/openmask-logo-288.png",about_url:"https://www.openmask.app/",bridge:[{type:"js",key:"openmask"}],platforms:["chrome"]},{app_name:"tonhub",name:"Tonhub",image:"https://tonhub.com/tonconnect_logo.png",about_url:"https://tonhub.com",universal_url:"https://tonhub.com/ton-connect",bridge:[{type:"js",key:"tonhub"},{type:"sse",url:"https://connect.tonhubapi.com/tonconnect"}],platforms:["ios","android"]},{app_name:"dewallet",name:"DeWallet",image:"https://app.delabwallet.com/logo_black.png",about_url:"https://delabwallet.com",bridge:[{type:"js",key:"dewallet"}],platforms:["chrome"]},{app_name:"xtonwallet",name:"XTONWallet",image:"https://xtonwallet.com/assets/img/icon-256-back.png",about_url:"https://xtonwallet.com",bridge:[{type:"js",key:"xtonwallet"}],platforms:["chrome","firefox"]},{app_name:"tonwallet",name:"TON Wallet",image:"https://wallet.ton.org/assets/ui/qr-logo.png",about_url:"https://chrome.google.com/webstore/detail/ton-wallet/nphplpgoakhhjchkkhmiggakijnkhfnd",bridge:[{type:"js",key:"tonwallet"}],platforms:["chrome"]}];class D0{constructor(t){this.walletsListCache=null,this.walletsListCacheCreationTimestamp=null,this.walletsListSource="https://raw.githubusercontent.com/ton-blockchain/wallets-list/main/wallets-v2.json",t!=null&&t.walletsListSource&&(this.walletsListSource=t.walletsListSource),t!=null&&t.cacheTTLMs&&(this.cacheTTLMs=t.cacheTTLMs)}getWallets(){return fe(this,void 0,void 0,function*(){return this.cacheTTLMs&&this.walletsListCacheCreationTimestamp&&Date.now()>this.walletsListCacheCreationTimestamp+this.cacheTTLMs&&(this.walletsListCache=null),this.walletsListCache||(this.walletsListCache=this.fetchWalletsList(),this.walletsListCache.then(()=>{this.walletsListCacheCreationTimestamp=Date.now()}).catch(()=>{this.walletsListCache=null,this.walletsListCacheCreationTimestamp=null})),this.walletsListCache})}getEmbeddedWallet(){return fe(this,void 0,void 0,function*(){const n=(yield this.getWallets()).filter(Bu);return n.length!==1?null:n[0]})}fetchWalletsList(){return fe(this,void 0,void 0,function*(){let t=[];try{if(t=yield(yield fetch(this.walletsListSource)).json(),!Array.isArray(t))throw new ld("Wrong wallets list format, wallets list must be an array.");const o=t.filter(i=>!this.isCorrectWalletConfigDTO(i));o.length&&(xr(`Wallet(s) ${o.map(i=>i.name).join(", ")} config format is wrong. They were removed from the wallets list.`),t=t.filter(i=>this.isCorrectWalletConfigDTO(i)))}catch(r){xr(r),t=jv}let n=[];try{n=kn.getCurrentlyInjectedWallets()}catch(r){xr(r)}return this.mergeWalletsLists(this.walletConfigDTOListToWalletConfigList(t),n)})}walletConfigDTOListToWalletConfigList(t){return t.map(n=>{const o={name:n.name,appName:n.app_name,imageUrl:n.image,aboutUrl:n.about_url,tondns:n.tondns,platforms:n.platforms};return n.bridge.forEach(i=>{if(i.type==="sse"&&(o.bridgeUrl=i.url,o.universalLink=n.universal_url,o.deepLink=n.deepLink),i.type==="js"){const l=i.key;o.jsBridgeKey=l,o.injected=kn.isWalletInjected(l),o.embedded=kn.isInsideWalletBrowser(l)}}),o})}mergeWalletsLists(t,n){return[...new Set(t.concat(n).map(o=>o.name)).values()].map(o=>{const i=t.find(s=>s.name===o),l=n.find(s=>s.name===o);return Object.assign(Object.assign({},i&&Object.assign({},i)),l&&Object.assign({},l))})}isCorrectWalletConfigDTO(t){if(!t||typeof t!="object")return!1;const n="name"in t,r="app_name"in t,o="image"in t,i="about_url"in t,l="platforms"in t;if(!n||!o||!i||!l||!r||!t.platforms||!Array.isArray(t.platforms)||!t.platforms.length||!("bridge"in t)||!Array.isArray(t.bridge)||!t.bridge.length)return!1;const s=t.bridge;if(s.some(f=>!f||typeof f!="object"||!("type"in f)))return!1;const u=s.find(f=>f.type==="sse");if(u&&(!("url"in u)||!u.url||!t.universal_url))return!1;const c=s.find(f=>f.type==="js");return!(c&&(!("key"in c)||!c.key))}}class qa extends Se{get info(){return"Wallet doesn't support requested feature method."}constructor(...t){super(...t),Object.setPrototypeOf(this,qa.prototype)}}function Fv(e,t){const n=e.includes("SendTransaction"),r=e.find(o=>o&&typeof o=="object"&&o.name==="SendTransaction");if(!n&&!r)throw new qa("Wallet doesn't support SendTransaction feature.");if(r&&r.maxMessages!==void 0){if(r.maxMessages{var s,u;return{address:(s=l.address)!==null&&s!==void 0?s:null,amount:(u=l.amount)!==null&&u!==void 0?u:null}})}}function W3(e,t,n){return Object.assign(Object.assign({type:"transaction-sent-for-signature"},Yi(e,t)),ad(t,n))}function H3(e,t,n,r){return Object.assign(Object.assign({type:"transaction-signed",is_success:!0,signed_transaction:r.boc},Yi(e,t)),ad(t,n))}function z3(e,t,n,r,o){return Object.assign(Object.assign({type:"transaction-signing-failed",is_success:!1,error_message:r,error_code:o??null},Yi(e,t)),ad(t,n))}function V3(e,t,n){return Object.assign({type:"disconnection",scope:n},Yi(e,t))}class K3{constructor(){this.window=Iu()}dispatchEvent(t,n){var r;return fe(this,void 0,void 0,function*(){const o=new CustomEvent(t,{detail:n});(r=this.window)===null||r===void 0||r.dispatchEvent(o)})}addEventListener(t,n,r){var o;return fe(this,void 0,void 0,function*(){return(o=this.window)===null||o===void 0||o.addEventListener(t,n,r),()=>{var i;return(i=this.window)===null||i===void 0?void 0:i.removeEventListener(t,n)}})}}class Wv{constructor(t){var n;this.eventPrefix="ton-connect-",this.tonConnectUiVersion=null,this.eventDispatcher=(n=t==null?void 0:t.eventDispatcher)!==null&&n!==void 0?n:new K3,this.tonConnectSdkVersion=t.tonConnectSdkVersion,this.init().catch()}get version(){return oi({ton_connect_sdk_lib:this.tonConnectSdkVersion,ton_connect_ui_lib:this.tonConnectUiVersion})}init(){return fe(this,void 0,void 0,function*(){try{yield this.setRequestVersionHandler(),this.tonConnectUiVersion=yield this.requestTonConnectUiVersion()}catch{}})}setRequestVersionHandler(){return fe(this,void 0,void 0,function*(){yield this.eventDispatcher.addEventListener("ton-connect-request-version",()=>fe(this,void 0,void 0,function*(){yield this.eventDispatcher.dispatchEvent("ton-connect-response-version",I3(this.tonConnectSdkVersion))}))})}requestTonConnectUiVersion(){return fe(this,void 0,void 0,function*(){return new Promise((t,n)=>fe(this,void 0,void 0,function*(){try{yield this.eventDispatcher.addEventListener("ton-connect-ui-response-version",r=>{t(r.detail.version)},{once:!0}),yield this.eventDispatcher.dispatchEvent("ton-connect-ui-request-version",$3())}catch(r){n(r)}}))})}dispatchUserActionEvent(t){try{this.eventDispatcher.dispatchEvent(`${this.eventPrefix}${t.type}`,t).catch()}catch{}}trackConnectionStarted(...t){try{const n=B3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackConnectionCompleted(...t){try{const n=O3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackConnectionError(...t){try{const n=U3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackConnectionRestoringStarted(...t){try{const n=D3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackConnectionRestoringCompleted(...t){try{const n=j3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackConnectionRestoringError(...t){try{const n=F3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackDisconnection(...t){try{const n=V3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackTransactionSentForSignature(...t){try{const n=W3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackTransactionSigned(...t){try{const n=H3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackTransactionSigningFailed(...t){try{const n=z3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}}const Hv="3.0.3";class ei{constructor(t){if(this.walletsList=new D0,this._wallet=null,this.provider=null,this.statusChangeSubscriptions=[],this.statusChangeErrorSubscriptions=[],this.dappSettings={manifestUrl:(t==null?void 0:t.manifestUrl)||$v(),storage:(t==null?void 0:t.storage)||new Uv},this.walletsList=new D0({walletsListSource:t==null?void 0:t.walletsListSource,cacheTTLMs:t==null?void 0:t.walletsListCacheTTLMs}),this.tracker=new Wv({eventDispatcher:t==null?void 0:t.eventDispatcher,tonConnectSdkVersion:Hv}),!this.dappSettings.manifestUrl)throw new rd("Dapp tonconnect-manifest.json must be specified if window.location.origin is undefined. See more https://github.com/ton-connect/docs/blob/main/requests-responses.md#app-manifest");this.bridgeConnectionStorage=new is(this.dappSettings.storage),t!=null&&t.disableAutoPauseConnection||this.addWindowFocusAndBlurSubscriptions()}static getWallets(){return this.walletsList.getWallets()}get connected(){return this._wallet!==null}get account(){var t;return((t=this._wallet)===null||t===void 0?void 0:t.account)||null}get wallet(){return this._wallet}set wallet(t){this._wallet=t,this.statusChangeSubscriptions.forEach(n=>n(this._wallet))}getWallets(){return this.walletsList.getWallets()}onStatusChange(t,n){return this.statusChangeSubscriptions.push(t),n&&this.statusChangeErrorSubscriptions.push(n),()=>{this.statusChangeSubscriptions=this.statusChangeSubscriptions.filter(r=>r!==t),n&&(this.statusChangeErrorSubscriptions=this.statusChangeErrorSubscriptions.filter(r=>r!==n))}}connect(t,n){var r,o;const i={};if(typeof n=="object"&&"tonProof"in n&&(i.request=n),typeof n=="object"&&("openingDeadlineMS"in n||"signal"in n||"request"in n)&&(i.request=n==null?void 0:n.request,i.openingDeadlineMS=n==null?void 0:n.openingDeadlineMS,i.signal=n==null?void 0:n.signal),this.connected)throw new od;const l=ir(i==null?void 0:i.signal);if((r=this.abortController)===null||r===void 0||r.abort(),this.abortController=l,l.signal.aborted)throw new Se("Connection was aborted");return(o=this.provider)===null||o===void 0||o.closeConnection(),this.provider=this.createProvider(t),l.signal.addEventListener("abort",()=>{var s;(s=this.provider)===null||s===void 0||s.closeConnection(),this.provider=null}),this.tracker.trackConnectionStarted(),this.provider.connect(this.createConnectRequest(i==null?void 0:i.request),{openingDeadlineMS:i==null?void 0:i.openingDeadlineMS,signal:l.signal})}restoreConnection(t){var n,r;return fe(this,void 0,void 0,function*(){this.tracker.trackConnectionRestoringStarted();const o=ir(t==null?void 0:t.signal);if((n=this.abortController)===null||n===void 0||n.abort(),this.abortController=o,o.signal.aborted){this.tracker.trackConnectionRestoringError("Connection restoring was aborted");return}const[i,l]=yield Promise.all([this.bridgeConnectionStorage.storedConnectionType(),this.walletsList.getEmbeddedWallet()]);if(o.signal.aborted){this.tracker.trackConnectionRestoringError("Connection restoring was aborted");return}let s=null;try{switch(i){case"http":s=yield ls.fromStorage(this.dappSettings.storage);break;case"injected":s=yield kn.fromStorage(this.dappSettings.storage);break;default:if(l)s=this.createProvider(l);else return}}catch{this.tracker.trackConnectionRestoringError("Provider is not restored"),yield this.bridgeConnectionStorage.removeConnection(),s==null||s.closeConnection(),s=null;return}if(o.signal.aborted){s==null||s.closeConnection(),this.tracker.trackConnectionRestoringError("Connection restoring was aborted");return}if(!s){xr("Provider is not restored"),this.tracker.trackConnectionRestoringError("Provider is not restored");return}(r=this.provider)===null||r===void 0||r.closeConnection(),this.provider=s,s.listen(this.walletEventsListener.bind(this));const u=()=>{this.tracker.trackConnectionRestoringError("Connection restoring was aborted"),s==null||s.closeConnection(),s=null};return o.signal.addEventListener("abort",u),yield Nl(c=>fe(this,void 0,void 0,function*(){yield s==null?void 0:s.restoreConnection({openingDeadlineMS:t==null?void 0:t.openingDeadlineMS,signal:c.signal}),o.signal.removeEventListener("abort",u),this.connected?this.tracker.trackConnectionRestoringCompleted(this.wallet):this.tracker.trackConnectionRestoringError("Connection restoring failed")}),{attempts:Number.MAX_SAFE_INTEGER,delayMs:5e3,signal:t==null?void 0:t.signal})})}sendTransaction(t,n){return fe(this,void 0,void 0,function*(){const r={};typeof n=="function"?r.onRequestSent=n:(r.onRequestSent=n==null?void 0:n.onRequestSent,r.signal=n==null?void 0:n.signal);const o=ir(r==null?void 0:r.signal);if(o.signal.aborted)throw new Se("Transaction sending was aborted");this.checkConnection(),Fv(this.wallet.device.features,{requiredMessagesNumber:t.messages.length}),this.tracker.trackTransactionSentForSignature(this.wallet,t);const{validUntil:i}=t,l=yv(t,["validUntil"]),s=t.from||this.account.address,u=t.network||this.account.chain,c=yield this.provider.sendRequest(Gs.convertToRpcRequest(Object.assign(Object.assign({},l),{valid_until:i,from:s,network:u})),{onRequestSent:r.onRequestSent,signal:o.signal});if(Gs.isError(c))return this.tracker.trackTransactionSigningFailed(this.wallet,t,c.error.message,c.error.code),Gs.parseAndThrowError(c);const f=Gs.convertFromRpcResponse(c);return this.tracker.trackTransactionSigned(this.wallet,t,f),f})}disconnect(t){var n;return fe(this,void 0,void 0,function*(){if(!this.connected)throw new Va;const r=ir(t==null?void 0:t.signal),o=this.abortController;if(this.abortController=r,r.signal.aborted)throw new Se("Disconnect was aborted");this.onWalletDisconnected("dapp"),yield(n=this.provider)===null||n===void 0?void 0:n.disconnect({signal:r.signal}),o==null||o.abort()})}pauseConnection(){var t;((t=this.provider)===null||t===void 0?void 0:t.type)==="http"&&this.provider.pause()}unPauseConnection(){var t;return((t=this.provider)===null||t===void 0?void 0:t.type)!=="http"?Promise.resolve():this.provider.unPause()}addWindowFocusAndBlurSubscriptions(){const t=Nv();if(t)try{t.addEventListener("visibilitychange",()=>{t.hidden?this.pauseConnection():this.unPauseConnection().catch()})}catch(n){xr("Cannot subscribe to the document.visibilitychange: ",n)}}createProvider(t){let n;return!Array.isArray(t)&&wv(t)?n=new kn(this.dappSettings.storage,t.jsBridgeKey):n=new ls(this.dappSettings.storage,t),n.listen(this.walletEventsListener.bind(this)),n}walletEventsListener(t){switch(t.event){case"connect":this.onWalletConnected(t.payload);break;case"connect_error":this.onWalletConnectError(t.payload);break;case"disconnect":this.onWalletDisconnected("wallet")}}onWalletConnected(t){const n=t.items.find(i=>i.name==="ton_addr"),r=t.items.find(i=>i.name==="ton_proof");if(!n)throw new Se("ton_addr connection item was not found");const o={device:t.device,provider:this.provider.type,account:{address:n.address,chain:n.network,walletStateInit:n.walletStateInit,publicKey:n.publicKey}};r&&(o.connectItems={tonProof:r}),this.wallet=o,this.tracker.trackConnectionCompleted(o)}onWalletConnectError(t){const n=Cv.parseError(t);if(this.statusChangeErrorSubscriptions.forEach(r=>r(n)),Vt(n),this.tracker.trackConnectionError(t.message,t.code),n instanceof Pu||n instanceof Ru)throw xr(n),n}onWalletDisconnected(t){this.tracker.trackDisconnection(this.wallet,t),this.wallet=null}checkConnection(){if(!this.connected)throw new Va}createConnectRequest(t){const n=[{name:"ton_addr"}];return t!=null&&t.tonProof&&n.push({name:"ton_proof",payload:t.tonProof}),{manifestUrl:this.dappSettings.manifestUrl,items:n}}}ei.walletsList=new D0;ei.isWalletInjected=e=>kn.isWalletInjected(e);ei.isInsideWalletBrowser=e=>kn.isInsideWalletBrowser(e);const zv=81,Vv=128;function ud(e,t=!1){const{wc:n,hex:r}=Kv(e);let o=zv;t&&(o|=Vv);const i=new Int8Array(34);i[0]=o,i[1]=n,i.set(r,2);const l=new Uint8Array(36);return l.set(i),l.set(qv(i),34),nd.encode(l).replace(/\+/g,"-").replace(/\//g,"_")}function Kv(e){if(!e.includes(":"))throw new Si(`Wrong address ${e}. Address must include ":".`);const t=e.split(":");if(t.length!==2)throw new Si(`Wrong address ${e}. Address must include ":" only once.`);const n=parseInt(t[0]);if(n!==0&&n!==-1)throw new Si(`Wrong address ${e}. WC must be eq 0 or -1, but ${n} received.`);const r=t[1];if((r==null?void 0:r.length)!==64)throw new Si(`Wrong address ${e}. Hex part must be 64bytes length, but ${r==null?void 0:r.length} received.`);return{wc:n,hex:Qv(r)}}function qv(e){let n=0;const r=new Uint8Array(e.length+2);r.set(e);for(let o of r){let i=128;for(;i>0;)n<<=1,o&i&&(n+=1),i>>=1,n>65535&&(n&=65535,n^=4129)}return new Uint8Array([Math.floor(n/256),n%256])}const j0={};for(let e=0;e<=255;e++){let t=e.toString(16);t.length<2&&(t="0"+t),j0[t]=e}function Qv(e){e=e.toLowerCase();const t=e.length;if(t%2!==0)throw new Ka("Hex string must have length a multiple of 2: "+e);const n=t/2,r=new Uint8Array(n);for(let o=0;o0?tt.length===2?typeof tt[1]==s?this[tt[0]]=tt[1].call(this,vn):this[tt[0]]=tt[1]:tt.length===3?typeof tt[1]===s&&!(tt[1].exec&&tt[1].test)?this[tt[0]]=vn?tt[1].call(this,vn,tt[2]):r:this[tt[0]]=vn?vn.replace(tt[1],tt[2]):r:tt.length===4&&(this[tt[0]]=vn?tt[3].call(this,vn.replace(tt[1],tt[2])):r):this[tt]=vn||r;Ne+=2}},_e=function(De,et){for(var Ne in et)if(typeof et[Ne]===c&&et[Ne].length>0){for(var gt=0;gt2&&(Le[h]="iPad",Le[y]=_),Le},this.getEngine=function(){var Le={};return Le[b]=r,Le[P]=r,wt.call(Le,gt,Kn.engine),Le},this.getOS=function(){var Le={};return Le[b]=r,Le[P]=r,wt.call(Le,gt,Kn.os),tt&&!Le[b]&&Vn&&Vn.platform&&Vn.platform!="Unknown"&&(Le[b]=Vn.platform.replace(/chrome os/i,z).replace(/macos/i,j)),Le},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return gt},this.setUA=function(Le){return gt=typeof Le===f&&Le.length>T?dt(Le,T):Le,this},this.setUA(gt),this};Gt.VERSION=o,Gt.BROWSER=G([b,P,g]),Gt.CPU=G([E]),Gt.DEVICE=G([h,S,y,w,C,A,_,I,M]),Gt.ENGINE=Gt.OS=G([b,P]),e.exports&&(t=e.exports=Gt),t.UAParser=Gt;var Mn=typeof n!==u&&(n.jQuery||n.Zepto);if(Mn&&!Mn.ua){var Nn=new Gt;Mn.ua=Nn.getResult(),Mn.ua.get=function(){return Nn.getUA()},Mn.ua.set=function(De){Nn.setUA(De);var et=Nn.getResult();for(var Ne in et)Mn.ua[Ne]=et[Ne]}}})(typeof window=="object"?window:gh)})(F0,F0.exports);var Gv=F0.exports;const Yv=Ki(Gv);var Zv=function(t){return Jv(t)&&!Xv(t)};function Jv(e){return!!e&&typeof e=="object"}function Xv(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||n6(e)}var e6=typeof Symbol=="function"&&Symbol.for,t6=e6?Symbol.for("react.element"):60103;function n6(e){return e.$$typeof===t6}function r6(e){return Array.isArray(e)?[]:{}}function ss(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Wi(r6(e),e,t):e}function o6(e,t,n){return e.concat(t).map(function(r){return ss(r,n)})}function i6(e,t){if(!t.customMerge)return Wi;var n=t.customMerge(e);return typeof n=="function"?n:Wi}function l6(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function t4(e){return Object.keys(e).concat(l6(e))}function q3(e,t){try{return t in e}catch{return!1}}function s6(e,t){return q3(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function a6(e,t,n){var r={};return n.isMergeableObject(e)&&t4(e).forEach(function(o){r[o]=ss(e[o],n)}),t4(t).forEach(function(o){s6(e,o)||(q3(e,o)&&n.isMergeableObject(t[o])?r[o]=i6(o,n)(e[o],t[o],n):r[o]=ss(t[o],n))}),r}function Wi(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||o6,n.isMergeableObject=n.isMergeableObject||Zv,n.cloneUnlessOtherwiseSpecified=ss;var r=Array.isArray(t),o=Array.isArray(e),i=r===o;return i?r?n.arrayMerge(e,t,n):a6(e,t,n):ss(t,n)}Wi.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,o){return Wi(r,o,n)},{})};var u6=Wi,c6=u6;const f6=Ki(c6);var Q3={exports:{}};/*! - Copyright (c) 2018 Jed Watson. - Licensed under the MIT License (MIT), see - http://jedwatson.github.io/classnames -*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var i="",l=0;lt in e?h6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ht=(e,t)=>{for(var n in t||(t={}))m6.call(t,n)&&W0(e,n,t[n]);if(n4)for(var n of n4(t))v6.call(t,n)&&W0(e,n,t[n]);return e},Un=(e,t)=>g6(e,p6(t)),Ee=(e,t,n)=>(W0(e,typeof t!="symbol"?t+"":t,n),n),ut=(e,t,n)=>new Promise((r,o)=>{var i=u=>{try{s(n.next(u))}catch(c){o(c)}},l=u=>{try{s(n.throw(u))}catch(c){o(c)}},s=u=>u.done?r(u.value):Promise.resolve(u.value).then(i,l);s((n=n.apply(e,t)).next())}),r4,o4,i4,l4,s4,a4,u4,c4;const _t={};function y6(e){_t.context=e}const w6=(e,t)=>e===t,cr=Symbol("solid-proxy"),H0=Symbol("solid-track"),Qa={equals:w6};let G3=tg;const Gr=1,Ga=2,Y3={owned:null,cleanups:null,context:null,owner:null},Tc={};var qt=null;let Ko=null,At=null,pn=null,jr=null,cd=0;function Il(e,t){const n=At,r=qt,o=e.length===0,i=o?Y3:{owned:null,cleanups:null,context:null,owner:t===void 0?r:t},l=o?e:()=>e(()=>en(()=>ju(i)));qt=i,At=null;try{return Eo(l,!0)}finally{At=n,qt=r}}function Ae(e,t){t=t?Object.assign({},Qa,t):Qa;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=o=>(typeof o=="function"&&(o=o(n.value)),eg(n,o));return[X3.bind(n),r]}function Ya(e,t,n){const r=Du(e,t,!0,Gr);Zi(r)}function Qe(e,t,n){const r=Du(e,t,!1,Gr);Zi(r)}function Xt(e,t,n){G3=A6;const r=Du(e,t,!1,Gr);r.user=!0,jr?jr.push(r):Zi(r)}function ue(e,t,n){n=n?Object.assign({},Qa,n):Qa;const r=Du(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Zi(r),X3.bind(r)}function x6(e,t,n){let r,o,i;arguments.length===2&&typeof t=="object"||arguments.length===1?(r=!0,o=e,i={}):(r=e,o=t,i={});let l=null,s=Tc,u=null,c=!1,f="initialValue"in i,g=typeof r=="function"&&ue(r);const h=new Set,[b,y]=(i.storage||Ae)(i.initialValue),[S,P]=Ae(void 0),[E,w]=Ae(void 0,{equals:!1}),[C,_]=Ae(f?"ready":"unresolved");if(_t.context){u=`${_t.context.id}${_t.context.count++}`;let L;i.ssrLoadFrom==="initial"?s=i.initialValue:_t.load&&(L=_t.load(u))&&(s=L[0])}function A(L,O,N,R){return l===L&&(l=null,f=!0,(L===s||O===s)&&i.onHydrated&&queueMicrotask(()=>i.onHydrated(R,{value:O})),s=Tc,I(O,N)),O}function I(L,O){Eo(()=>{O===void 0&&y(()=>L),_(O!==void 0?"errored":"ready"),P(O);for(const N of h.keys())N.decrement();h.clear()},!1)}function M(){const L=E6,O=b(),N=S();if(N!==void 0&&!l)throw N;return At&&!At.user&&L&&Ya(()=>{E(),l&&(L.resolved||h.has(L)||(L.increment(),h.add(L)))}),O}function T(L=!0){if(L!==!1&&c)return;c=!1;const O=g?g():r;if(O==null||O===!1){A(l,en(b));return}const N=s!==Tc?s:en(()=>o(O,{value:b(),refetching:L}));return typeof N!="object"||!(N&&"then"in N)?(A(l,N,void 0,O),N):(l=N,c=!0,queueMicrotask(()=>c=!1),Eo(()=>{_(f?"refreshing":"pending"),w()},!1),N.then(R=>A(N,R,void 0,O),R=>A(N,void 0,rg(R),O)))}return Object.defineProperties(M,{state:{get:()=>C()},error:{get:()=>S()},loading:{get(){const L=C();return L==="pending"||L==="refreshing"}},latest:{get(){if(!f)return M();const L=S();if(L&&!l)throw L;return b()}}}),g?Ya(()=>T(!1)):T(!1),[M,{refetch:T,mutate:y}]}function Z3(e){return Eo(e,!1)}function en(e){if(At===null)return e();const t=At;At=null;try{return e()}finally{At=t}}function C6(e,t,n){const r=Array.isArray(e);let o;return i=>{let l;if(r){l=Array(e.length);for(let u=0;ut(l,o,i));return o=l,s}}function b6(e){Xt(()=>en(e))}function xn(e){return qt===null||(qt.cleanups===null?qt.cleanups=[e]:qt.cleanups.push(e)),e}function J3(){return At}function S6(){return qt}function Ou(e,t){const n=Symbol("context");return{id:n,Provider:T6(n),defaultValue:e}}function Cn(e){let t;return(t=ig(qt,e.id))!==void 0?t:e.defaultValue}function Uu(e){const t=ue(e),n=ue(()=>z0(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}let E6;function X3(){const e=Ko;if(this.sources&&(this.state||e))if(this.state===Gr||e)Zi(this);else{const t=pn;pn=null,Eo(()=>Ja(this),!1),pn=t}if(At){const t=this.observers?this.observers.length:0;At.sources?(At.sources.push(this),At.sourceSlots.push(t)):(At.sources=[this],At.sourceSlots=[t]),this.observers?(this.observers.push(At),this.observerSlots.push(At.sources.length-1)):(this.observers=[At],this.observerSlots=[At.sources.length-1])}return this.value}function eg(e,t,n){let r=e.value;return(!e.comparator||!e.comparator(r,t))&&(e.value=t,e.observers&&e.observers.length&&Eo(()=>{for(let o=0;o1e6)throw pn=[],new Error},!1)),t}function Zi(e){if(!e.fn)return;ju(e);const t=qt,n=At,r=cd;At=qt=e,k6(e,e.value,r),At=n,qt=t}function k6(e,t,n){let r;try{r=e.fn(t)}catch(o){e.pure&&(e.state=Gr,e.owned&&e.owned.forEach(ju),e.owned=null),og(o)}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?eg(e,r):e.value=r,e.updatedAt=n)}function Du(e,t,n,r=Gr,o){const i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:qt,context:null,pure:n};return qt===null||qt!==Y3&&(qt.owned?qt.owned.push(i):qt.owned=[i]),i}function Za(e){const t=Ko;if(e.state===0||t)return;if(e.state===Ga||t)return Ja(e);if(e.suspense&&en(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt=0;r--)if(e=n[r],e.state===Gr||t)Zi(e);else if(e.state===Ga||t){const o=pn;pn=null,Eo(()=>Ja(e,n[0]),!1),pn=o}}function Eo(e,t){if(pn)return e();let n=!1;t||(pn=[]),jr?n=!0:jr=[],cd++;try{const r=e();return _6(n),r}catch(r){n||(jr=null),pn=null,og(r)}}function _6(e){if(pn&&(tg(pn),pn=null),e)return;const t=jr;jr=null,t.length&&Eo(()=>G3(t),!1)}function tg(e){for(let t=0;to=en(()=>(qt.context={[e]:r.value},Uu(()=>r.children))),void 0),o}}const L6=Symbol("fallback");function f4(e){for(let t=0;t1?[]:null;return xn(()=>f4(i)),()=>{let u=e()||[],c,f;return u[H0],en(()=>{let h=u.length,b,y,S,P,E,w,C,_,A;if(h===0)l!==0&&(f4(i),i=[],r=[],o=[],l=0,s&&(s=[])),n.fallback&&(r=[L6],o[0]=Il(I=>(i[0]=I,n.fallback())),l=1);else if(l===0){for(o=new Array(h),f=0;f=w&&_>=w&&r[C]===u[_];C--,_--)S[_]=o[C],P[_]=i[C],s&&(E[_]=s[C]);for(b=new Map,y=new Array(_+1),f=_;f>=w;f--)A=u[f],c=b.get(A),y[f]=c===void 0?-1:c,b.set(A,f);for(c=w;c<=C;c++)A=r[c],f=b.get(A),f!==void 0&&f!==-1?(S[f]=o[c],P[f]=i[c],s&&(E[f]=s[c]),f=y[f],b.set(A,f)):i[c]();for(f=w;fe(t||{}))}function Ys(){return!0}const V0={get(e,t,n){return t===cr?n:e.get(t)},has(e,t){return t===cr?!0:e.has(t)},set:Ys,deleteProperty:Ys,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Ys,deleteProperty:Ys}},ownKeys(e){return e.keys()}};function Lc(e){return(e=typeof e=="function"?e():e)?e:{}}function Cr(...e){let t=!1;for(let r=0;r=0;o--){const i=Lc(e[o])[r];if(i!==void 0)return i}},has(r){for(let o=e.length-1;o>=0;o--)if(r in Lc(e[o]))return!0;return!1},keys(){const r=[];for(let o=0;o=0;r--)if(e[r]){const o=Object.getOwnPropertyDescriptors(e[r]);for(const i in o)i in n||Object.defineProperty(n,i,{enumerable:!0,get(){for(let l=e.length-1;l>=0;l--){const s=(e[l]||{})[i];if(s!==void 0)return s}}})}return n}function fd(e,...t){const n=new Set(t.flat());if(cr in e){const o=t.map(i=>new Proxy({get(l){return i.includes(l)?e[l]:void 0},has(l){return i.includes(l)&&l in e},keys(){return i.filter(l=>l in e)}},V0));return o.push(new Proxy({get(i){return n.has(i)?void 0:e[i]},has(i){return n.has(i)?!1:i in e},keys(){return Object.keys(e).filter(i=>!n.has(i))}},V0)),o}const r=Object.getOwnPropertyDescriptors(e);return t.push(Object.keys(r).filter(o=>!n.has(o))),t.map(o=>{const i={};for(let l=0;le.fallback};return ue(R6(()=>e.each,e.children,t||void 0))}function Pe(e){let t=!1;const n=e.keyed,r=ue(()=>e.when,void 0,{equals:(o,i)=>t?o===i:!o==!i});return ue(()=>{const o=r();if(o){const i=e.children,l=typeof i=="function"&&i.length>0;return t=n||l,l?en(()=>i(o)):i}return e.fallback},void 0,void 0)}function xs(e){let t=!1,n=!1;const r=(l,s)=>l[0]===s[0]&&(t?l[1]===s[1]:!l[1]==!s[1])&&l[2]===s[2],o=Uu(()=>e.children),i=ue(()=>{let l=o();Array.isArray(l)||(l=[l]);for(let s=0;s{const[l,s,u]=i();if(l<0)return e.fallback;const c=u.children,f=typeof c=="function"&&c.length>0;return t=n||f,f?en(()=>c(s)):c},void 0,void 0)}function nn(e){return e}const P6=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],M6=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...P6]),N6=new Set(["innerHTML","textContent","innerText","children"]),$6=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),d4=Object.assign(Object.create(null),{class:"className",formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly"}),I6=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),B6=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),O6={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function U6(e,t,n){let r=n.length,o=t.length,i=r,l=0,s=0,u=t[o-1].nextSibling,c=null;for(;lf-s){const y=t[l];for(;s{o=i,t===document?e():gn(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{o(),t.textContent=""}}function Ye(e,t,n){if(typeof window>"u")return null;const r=document.createElement("template");r.innerHTML=e;let o=r.content.firstChild;return n&&(o=o.firstChild),o}function j6(e,t=window.document){const n=t[h4]||(t[h4]=new Set);for(let r=0,o=e.length;ro.call(e,n[1],i))}else e.addEventListener(t,n)}function H6(e,t,n={}){const r=Object.keys(t||{}),o=Object.keys(n);let i,l;for(i=0,l=o.length;io.children=as(e,t.children,o.children)),Qe(()=>t.ref&&t.ref(e)),Qe(()=>V6(e,t,n,!0,o,!0)),o}function Bl(e,t,n){return en(()=>e(t,n))}function gn(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return as(e,t,r,n);Qe(o=>as(e,t(),o,n),r)}function V6(e,t,n,r,o={},i=!1){t||(t={});for(const l in o)if(!(l in t)){if(l==="children")continue;o[l]=p4(e,l,null,o[l],n,i)}for(const l in t){if(l==="children")continue;const s=t[l];o[l]=p4(e,l,s,o[l],n,i)}}function K6(e){let t,n;return!_t.context||!(t=_t.registry.get(n=G6()))?e.cloneNode(!0):(_t.completed&&_t.completed.add(t),_t.registry.delete(n),t)}function q6(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function g4(e,t,n){const r=t.trim().split(/\s+/);for(let o=0,i=r.length;o-1&&O6[t.split(":")[0]];c?F6(e,c,t,n):Ce(e,$6[t]||t,n)}return n}function Q6(e){const t=`$$${e.type}`;let n=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==n&&Object.defineProperty(e,"target",{configurable:!0,value:n}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return n||document}}),_t.registry&&!_t.done&&(_t.done=!0,document.querySelectorAll("[id^=pl-]").forEach(r=>{for(;r&&r.nodeType!==8&&r.nodeValue!=="pl-"+e;){let o=r.nextSibling;r.remove(),r=o}r&&r.remove()}));n;){const r=n[t];if(r&&!n.disabled){const o=n[`${t}Data`];if(o!==void 0?r.call(n,o,e):r.call(n,e),e.cancelBubble)return}n=n._$host||n.parentNode||n.host}}function as(e,t,n,r,o){for(_t.context&&!n&&(n=[...e.childNodes]);typeof n=="function";)n=n();if(t===n)return n;const i=typeof t,l=r!==void 0;if(e=l&&n[0]&&n[0].parentNode||e,i==="string"||i==="number"){if(_t.context)return n;if(i==="number"&&(t=t.toString()),l){let s=n[0];s&&s.nodeType===3?s.data=t:s=document.createTextNode(t),n=ui(e,n,r,s)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||i==="boolean"){if(_t.context)return n;n=ui(e,n,r)}else{if(i==="function")return Qe(()=>{let s=t();for(;typeof s=="function";)s=s();n=as(e,s,n,r)}),()=>n;if(Array.isArray(t)){const s=[],u=n&&Array.isArray(n);if(K0(s,t,n,o))return Qe(()=>n=as(e,s,n,r,!0)),()=>n;if(_t.context){if(!s.length)return n;for(let c=0;c=0;l--){const s=t[l];if(o!==s){const u=s.parentNode===e;!i&&!l?u?e.replaceChild(o,s):e.insertBefore(o,n):u&&s.remove()}else i=!0}}else e.insertBefore(o,n);return[o]}function G6(){const e=_t.context;return`${e.id}${e.count++}`}const Y6="http://www.w3.org/2000/svg";function sg(e,t=!1){return t?document.createElementNS(Y6,e):document.createElement(e)}function ag(e){const{useShadow:t}=e,n=document.createTextNode(""),r=e.mount||document.body;function o(){if(_t.context){const[i,l]=Ae(!1);return queueMicrotask(()=>l(!0)),()=>i()&&e.children}else return()=>e.children}if(r instanceof HTMLHeadElement){const[i,l]=Ae(!1),s=()=>l(!0);Il(u=>gn(r,()=>i()?u():o()(),null)),xn(()=>{_t.context?queueMicrotask(s):s()})}else{const i=sg(e.isSVG?"g":"div",e.isSVG),l=t&&i.attachShadow?i.attachShadow({mode:"open"}):i;Object.defineProperty(i,"_$host",{get(){return n.parentNode},configurable:!0}),gn(l,o()),r.appendChild(i),e.ref&&e.ref(i),xn(()=>r.removeChild(i))}return n}function Hi(e){const[t,n]=fd(e,["component"]),r=ue(()=>t.component);return ue(()=>{const o=r();switch(typeof o){case"function":return en(()=>o(n));case"string":const i=B6.has(o),l=_t.context?K6():sg(o,i);return lg(l,n,i),l}})}var Lt=(e=>(e.DARK="DARK",e.LIGHT="LIGHT",e))(Lt||{});let Z6={data:""},J6=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||Z6,X6=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,e8=/\/\*[^]*?\*\/| +/g,v4=/\n+/g,Oo=(e,t)=>{let n="",r="",o="";for(let i in e){let l=e[i];i[0]=="@"?i[1]=="i"?n=i+" "+l+";":r+=i[1]=="f"?Oo(l,i):i+"{"+Oo(l,i[1]=="k"?"":t)+"}":typeof l=="object"?r+=Oo(l,t?t.replace(/([^,])+/g,s=>i.replace(/(^:.*)|([^,])+/g,u=>/&/.test(u)?u.replace(/&/g,s):s?s+" "+u:u)):i):l!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=Oo.p?Oo.p(i,l):i+":"+l+";")}return n+(t&&o?t+"{"+o+"}":o)+r},Rr={},ug=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+ug(e[n]);return t}return e},t8=(e,t,n,r,o)=>{let i=ug(e),l=Rr[i]||(Rr[i]=(u=>{let c=0,f=11;for(;c>>0;return"go"+f})(i));if(!Rr[l]){let u=i!==e?e:(c=>{let f,g,h=[{}];for(;f=X6.exec(c.replace(e8,""));)f[4]?h.shift():f[3]?(g=f[3].replace(v4," ").trim(),h.unshift(h[0][g]=h[0][g]||{})):h[0][f[1]]=f[2].replace(v4," ").trim();return h[0]})(e);Rr[l]=Oo(o?{["@keyframes "+l]:u}:u,n?"":"."+l)}let s=n&&Rr.g?Rr.g:null;return n&&(Rr.g=Rr[l]),((u,c,f,g)=>{g?c.data=c.data.replace(g,u):c.data.indexOf(u)===-1&&(c.data=f?u+c.data:c.data+u)})(Rr[l],t,r,s),l},n8=(e,t,n)=>e.reduce((r,o,i)=>{let l=t[i];if(l&&l.call){let s=l(n),u=s&&s.props&&s.props.className||/^go/.test(s)&&s;l=u?"."+u:s&&typeof s=="object"?s.props?"":Oo(s,""):s===!1?"":s}return r+o+(l??"")},"");function Kr(e){let t=this||{},n=e.call?e(t.p):e;return t8(n.unshift?n.raw?n8(n,[].slice.call(arguments,1),t.p):n.reduce((r,o)=>Object.assign(r,o&&o.call?o(t.p):o),{}):n,J6(t.target),t.g,t.o,t.k)}Kr.bind({g:1});let r8=Kr.bind({k:1});const hd=Ou();function o8(e){return m(hd.Provider,{value:e.theme,get children(){return e.children}})}function xt(){return Cn(hd)}function cg(e){let t=this||{};return(...n)=>{const r=o=>{const i=Cn(hd),l=Cr(o,{theme:i}),s=Cr(l,{get class(){const b=l.class,y="class"in l&&/^go[0-9]+/.test(b);let S=Kr.apply({target:t.target,o:y,p:l,g:t.g},n);return[b,S].filter(Boolean).join(" ")}}),[u,c]=fd(s,["as","theme"]),f=c,g=u.as||e;let h;return typeof g=="function"?h=g(f):t.g==1?(h=document.createElement(g),lg(h,f)):h=Hi(Cr({component:g},f)),h};return r.class=o=>en(()=>Kr.apply({target:t.target,p:o,g:t.g},n)),r}}const W=new Proxy(cg,{get(e,t){return e(t)}});function i8(){const e=cg.call({g:1},"div").apply(null,arguments);return function(n){return e(n),null}}const Nr="tc-root",gd="tc-disable-scroll",Rc="tc-using-mouse",l8=()=>{document.body.addEventListener("mousedown",()=>document.body.classList.add(Rc)),document.body.addEventListener("keydown",t=>{t.key==="Tab"&&document.body.classList.remove(Rc)});const e=i8` - ${Nr} * { - margin: 0; - padding: 0; - box-sizing: border-box; - - font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, Tahoma, Verdana, sans-serif; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - -webkit-tap-highlight-color: transparent; - } - - ${Nr} img { - -webkit-user-select: none; - -webkit-touch-callout: none; - } - - ${Nr} *:focus { - outline: #08f auto 2px; - } - - ${Nr} li { - list-style: none; - } - - ${Nr} button { - outline: none; - } - - body.${gd} { - position: fixed; - overflow-y: scroll; - right: 0; - left: 0; - } - - body.${Rc} ${Nr} *:focus { - outline: none; - } -`;return m(e,{})};function s8(e){e[0]==="#"&&(e=e.slice(1));const t=parseInt(e,16),n=t>>16&255,r=t>>8&255,o=t&255;return[n,r,o].join(",")}function Cs(e,t){return e[0]==="#"&&(e=s8(e)),`rgba(${e}, ${t})`}function br(e){return e.toString()+"px"}const wl=class{constructor(){Ee(this,"storage",{})}static getInstance(){return wl.instance||(wl.instance=new wl),wl.instance}get length(){return Object.keys(this.storage).length}clear(){this.storage={}}getItem(e){var t;return(t=this.storage[e])!=null?t:null}key(e){var t;const n=Object.keys(this.storage);return e<0||e>=n.length?null:(t=n[e])!=null?t:null}removeItem(e){delete this.storage[e]}setItem(e,t){this.storage[e]=t}};let fg=wl;Ee(fg,"instance");class Ut extends Se{constructor(...t){super(...t),Object.setPrototypeOf(this,Ut.prototype)}}function pa(...e){try{console.debug("[TON_CONNECT_UI]",...e)}catch{}}function a8(...e){try{console.error("[TON_CONNECT_UI]",...e)}catch{}}function u8(...e){try{console.warn("[TON_CONNECT_UI]",...e)}catch{}}function Xa(e,t="_self"){pa("openLink",e,t),window.open(e,t,"noopener noreferrer")}function St(e){Xa(e,"_blank")}function co(e,t){const n=()=>{Ke("safari")||mr("android")&&Ke("firefox")||t()},r=setTimeout(()=>n(),200);window.addEventListener("blur",()=>clearTimeout(r),{once:!0}),Xa(e,"_self")}function c8(){return window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches?Lt.LIGHT:Lt.DARK}function f8(e){const t=n=>e(n.matches?Lt.DARK:Lt.LIGHT);return window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t),()=>window.matchMedia("(prefers-color-scheme: dark)").removeEventListener("change",t)}function d8(){document.documentElement.scrollHeight!==document.documentElement.clientHeight&&(document.body.style.top=br(-document.documentElement.scrollTop),document.body.classList.add(gd))}function h8(){document.body.classList.remove(gd),document.documentElement.scrollTo({top:-parseFloat(getComputedStyle(document.body).top)}),document.body.style.top="auto"}function g8(){document.body.hasAttribute("ontouchstart")||document.body.setAttribute("ontouchstart","")}function p8(){customElements.define(Nr,class extends HTMLElement{})}function dg(e){return ut(this,null,function*(){yield new Promise(t=>requestAnimationFrame(t)),e()})}function m8(e){return ut(this,null,function*(){return yield new Promise(t=>requestAnimationFrame(t)),e()})}function hg(e){document.readyState!=="complete"?window.addEventListener("load",()=>dg(()=>hg(e)),{once:!0}):e.forEach(t=>{const n=new window.Image;n.src=t})}function Yr(){if(typeof window<"u")return window}function pd(){if(v8())return localStorage;if(y8())throw new Ut("`localStorage` is unavailable, but it is required for TonConnect. For more details, see https://github.com/ton-connect/sdk/tree/main/packages/sdk#init-connector");return fg.getInstance()}function v8(){try{return typeof localStorage<"u"}catch{return!1}}function y8(){return typeof process<"u"&&process.versions!=null&&process.versions.node!=null}function md(){var e,t,n;const r=new Yv().getResult(),o=(e=r.os.name)==null?void 0:e.toLowerCase(),i=(t=r.device.model)==null?void 0:t.toLowerCase();let l;switch(!0){case i==="ipad":l="ipad";break;case o==="ios":l="ios";break;case o==="android":l="android";break;case o==="mac os":l="macos";break;case o==="linux":l="linux";break;case(o==null?void 0:o.includes("windows")):l="windows";break}const s=(n=r.browser.name)==null?void 0:n.toLowerCase();let u;switch(!0){case s==="chrome":u="chrome";break;case s==="firefox":u="firefox";break;case(s==null?void 0:s.includes("safari")):u="safari";break;case(s==null?void 0:s.includes("opera")):u="opera";break}return{os:l,browser:u}}function mr(...e){return e.includes(md().os)}function Ke(...e){return e.includes(md().browser)}function Zs(e,t){const n=new URL(e);return t+n.search}class w8{constructor(){Ee(this,"localStorage"),Ee(this,"storageKey","ton-connect-ui_wallet-info"),this.localStorage=pd()}setWalletInfo(t){this.localStorage.setItem(this.storageKey,JSON.stringify(t))}getWalletInfo(){const t=this.localStorage.getItem(this.storageKey);return t?JSON.parse(t):null}removeWalletInfo(){this.localStorage.removeItem(this.storageKey)}}class x8{constructor(){Ee(this,"localStorage"),Ee(this,"storageKey","ton-connect-ui_preferred-wallet"),this.localStorage=pd()}setPreferredWalletAppName(t){this.localStorage.setItem(this.storageKey,t)}getPreferredWalletAppName(){return this.localStorage.getItem(this.storageKey)||void 0}}class gg{constructor(){Ee(this,"localStorage"),Ee(this,"storageKey","ton-connect-ui_last-selected-wallet-info"),this.localStorage=pd()}setLastSelectedWalletInfo(t){this.localStorage.setItem(this.storageKey,JSON.stringify(t))}getLastSelectedWalletInfo(){const t=this.localStorage.getItem(this.storageKey);return t?JSON.parse(t):null}removeLastSelectedWalletInfo(){this.localStorage.removeItem(this.storageKey)}}const[q0,y4]=Ae({status:"closed",closeReason:null}),w4=ue(()=>q0().status==="opened"),[eu,x4]=Ae({status:"closed",closeReason:null}),C4=ue(()=>eu().status==="opened"),C8=ue(()=>{const e=eu();return e.status==="opened"?e.walletInfo:null});let Ei=typeof window<"u"?new gg:void 0;const[b8,S8]=Ae((Ei==null?void 0:Ei.getLastSelectedWalletInfo())||null),rn=e=>{Ei||(Ei=new gg),e?Ei.setLastSelectedWalletInfo(e):Ei.removeLastSelectedWalletInfo(),S8(e)},[$r,ki]=Ae(null),E8={close:"Close",openWallet:"Open wallet",copyLink:"Copy Link",linkCopied:"Link Copied",copied:"Copied",yourWallet:"Your Wallet",retry:"Retry",get:"GET",mobile:"Mobile",browserExtension:"Browser Extension",desktop:"Desktop"},k8={connectWallet:"Connect Wallet",dropdown:{copy:"Copy address",copied:"Address copied!",disconnect:"Disconnect"}},_8={confirm:{header:"Open {{ name }} to confirm the transaction."},transactionSent:{header:"Transaction sent",text:"Your transaction will be processed in a few seconds."},transactionCanceled:{header:"Transaction canceled",text:"There will be no changes to your account."}},A8={walletOn:"Wallet On",recent:"Recent",installed:"Installed",popular:"Popular"},T8={loading:"Loading wallets",wallets:"Wallets",mobileUniversalModal:{connectYourWallet:"Connect your wallet",openWalletOnTelegramOrSelect:"Open Wallet in Telegram or select your wallet to connect",openWalletOnTelegram:"Open Wallet in Telegram",openLink:"Open Link",scan:"Scan with your mobile wallet"},desktopUniversalModal:{connectYourWallet:"Connect your wallet",scan:"Scan with your mobile wallet",availableWallets:"Available wallets"},mobileConnectionModal:{showQR:"Show QR Code",scanQR:"Scan the QR code below with your phone’s or {{ name }}’s camera",continueIn:"Continue in {{ name }}…",connectionDeclined:"Connection declined"},desktopConnectionModal:{scanQR:"Scan the QR code below with your phone’s or {{ name }}’s camera",continueInExtension:"Continue in {{ name }} browser extension…",dontHaveExtension:"Seems you don't have installed {{ name }} browser extension",getWallet:"Get {{ name }}",continueOnDesktop:"Continue in {{ name }} on desktop…",openWalletOnTelegram:"Open Wallet in Telegram on desktop",connectionDeclined:"Connection declined"},infoModal:{whatIsAWallet:"What is a wallet",secureDigitalAssets:"Secure digital assets storage",walletProtects:"A wallet protects and manages your digital assets including TON, tokens and collectables.",controlIdentity:"Control your Web3 identity",manageIdentity:"Manage your digital identity and access decentralized applications with ease. Maintain control over your data and engage securely in the blockchain ecosystem.",effortlessCryptoTransactions:"Effortless crypto transactions",easilySend:"Easily send, receive, monitor your cryptocurrencies. Streamline your operations with decentralized applications.",getAWallet:"Get a Wallet"}},L8={confirmTransaction:{header:"Confirm the transaction in {{ name }}",text:"It will only take a moment."},transactionSent:"$notifications.transactionSent",transactionCanceled:"$notifications.transactionCanceled"},R8={common:E8,button:k8,notifications:_8,walletItem:A8,walletModal:T8,actionModal:L8},P8={close:"Закрыть",openWallet:"Открыть кошелёк",copyLink:"Копировать ссылку",linkCopied:"Ссылка скопирована",copied:"Ссылка скопирована",yourWallet:"Ваш кошелёк",retry:"Повторить",get:"Скачать",mobile:"Мобильный",browserExtension:"Расширение",desktop:"Десктоп"},M8={connectWallet:"Подключить кошелёк",dropdown:{copy:"Скопировать адрес",copied:"Адрес скопирован!",disconnect:"Отключить кошелёк"}},N8={confirm:{header:"Откройте {{ name }}, чтобы подтвердить транзакцию."},transactionSent:{header:"Транзакция отправлена",text:"Ваша транзакция будет обработана через несколько секунд."},transactionCanceled:{header:"Транзакция отменена",text:"Состояние вашего счёта не изменится."}},$8={walletOn:"Wallet в",recent:"Недавний",installed:"Установлен",popular:"Популярен"},I8={loading:"Кошельки загружаются",wallets:"Кошельки",mobileUniversalModal:{connectYourWallet:"Подключите кошелёк",openWalletOnTelegramOrSelect:"Подключите Wallet в Telegram или выберете кошелёк для подключения",openWalletOnTelegram:"Открыть Wallet в Telegram",openLink:"Открыть ссылку",scan:"Отсканируйте камерой вашего телефона"},desktopUniversalModal:{connectYourWallet:"Подключите кошелёк",scan:"Отсканируйте QR-код камерой вашего телефона",availableWallets:"Доступные кошельки"},mobileConnectionModal:{showQR:"Показать QR-код",scanQR:"Отсканируйте QR-код ниже камерой в приложении {{ name }}, или камерой телефона",continueIn:"Продолжите в {{ name }}…",connectionDeclined:"Подключение отклонено"},desktopConnectionModal:{scanQR:"Отсканируйте QR-код ниже камерой в приложении {{ name }}, или камерой телефона",continueInExtension:"Откройте браузерное расширение {{ name }}",dontHaveExtension:"Похоже, у вас не установлено браузерное расширение {{ name }}",getWallet:"Скачать {{ name }}",continueOnDesktop:"Откройте {{ name }} на компьютере…",openWalletOnTelegram:"Открыть Wallet в Telegram",connectionDeclined:"Подключение отклонено"},infoModal:{whatIsAWallet:"Что такое кошелёк?",secureDigitalAssets:"Надежное хранилище цифровых активов",walletProtects:"Кошелёк защищает ваши цифровые активы, включая TON, токены и предметы коллекционирования, и управляет ими.",controlIdentity:"Контроль своей личности Web3",manageIdentity:"Управляйте своей цифровой идентификацией и с легкостью получайте доступ к децентрализованным приложениям. Сохраняйте контроль над своими данными и безопасно участвуйте в экосистеме блокчейна.",effortlessCryptoTransactions:"Простые криптотранзакции",easilySend:"Легко отправляйте, получайте и отслеживайте свои криптовалюты. Оптимизируйте свои операции с помощью децентрализованных приложений.",getAWallet:"Скачать кошелёк"}},B8={confirmTransaction:{header:"Подтвердите действие в {{ name }}",text:"Это займет пару секунд."},transactionSent:"$notifications.transactionSent",transactionCanceled:"$notifications.transactionCanceled"},O8={common:P8,button:M8,notifications:N8,walletItem:$8,walletModal:I8,actionModal:B8},U8={en:b4(R8),ru:b4(O8)};function b4(e){const t="$",n=r=>{Object.entries(r).forEach(([o,i])=>{if(typeof i=="object"&&i)return n(i);if(typeof i=="string"){if(i[0]===t){const l=i.slice(1).split(".");let s=e;l.forEach(u=>{if(u in s)s=s[u];else throw new Error(`Cannot parse translations: there is no property ${u} in translation`)}),r[o]=s}i.slice(0,2)===`\\${t}`&&(r[o]=i.slice(1))}})};return n(e),e}const Ji=Ou(),Q0=Symbol("store-raw"),us=Symbol("store-node"),D8=Symbol("store-name");function pg(e,t){let n=e[cr];if(!n&&(Object.defineProperty(e,cr,{value:n=new Proxy(e,W8)}),!Array.isArray(e))){const r=Object.keys(e),o=Object.getOwnPropertyDescriptors(e);for(let i=0,l=r.length;ie[cr][t]),n}function mg(e){if(J3()){const t=vd(e);(t._||(t._=vg()))()}}function F8(e){return mg(e),Reflect.ownKeys(e)}function vg(e){const[t,n]=Ae(e,{equals:!1,internal:!0});return t.$=n,t}const W8={get(e,t,n){if(t===Q0)return e;if(t===cr)return n;if(t===H0)return mg(e),n;const r=vd(e),o=r.hasOwnProperty(t);let i=o?r[t]():e[t];if(t===us||t==="__proto__")return i;if(!o){const l=Object.getOwnPropertyDescriptor(e,t);J3()&&(typeof i!="function"||e.hasOwnProperty(t))&&!(l&&l.get)&&(i=G0(r,t,i)())}return tu(i)?pg(i):i},has(e,t){return t===Q0||t===cr||t===H0||t===us||t==="__proto__"?!0:(this.get(e,t,e),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:F8,getOwnPropertyDescriptor:j8};function nu(e,t,n,r=!1){if(!r&&e[t]===n)return;const o=e[t],i=e.length;n===void 0?delete e[t]:e[t]=n;let l=vd(e),s;(s=G0(l,t,o))&&s.$(()=>n),Array.isArray(e)&&e.length!==i&&(s=G0(l,"length",i))&&s.$(e.length),(s=l._)&&s.$()}function yg(e,t){const n=Object.keys(t);for(let r=0;r1){r=t.shift();const l=typeof r,s=Array.isArray(e);if(Array.isArray(r)){for(let u=0;u1){xl(e[r],t,[r].concat(n));return}o=e[r],n=[r].concat(n)}let i=t[0];typeof i=="function"&&(i=i(o,n),i===o)||r===void 0&&i==null||(i=zi(i),r===void 0||tu(o)&&tu(i)&&!Array.isArray(i)?yg(o,i):nu(e,r,i))}function yd(...[e,t]){const n=zi(e||{}),r=Array.isArray(n),o=pg(n);function i(...l){Z3(()=>{r&&l.length===1?H8(n,l[0]):xl(n,l)})}return[o,i]}const wg={constant:{black:"#000000",white:"#FFFFFF"},connectButton:{background:"#0098EA",foreground:"#FFFFFF"},accent:"#0098EA",telegramButton:"#0098EA",icon:{primary:"#0F0F0F",secondary:"#7A8999",tertiary:"#C1CAD2",success:"#29CC6A",error:"#F5A73B"},background:{primary:"#FFFFFF",secondary:"#F1F3F5",segment:"#FFFFFF",tint:"#F1F3F5",qr:"#F1F3F5"},text:{primary:"#0F0F0F",secondary:"#6A7785"}},z8={constant:{black:"#000000",white:"#FFFFFF"},connectButton:{background:"#0098EA",foreground:"#FFFFFF"},accent:"#E5E5EA",telegramButton:"#31A6F5",icon:{primary:"#E5E5EA",secondary:"#909099",tertiary:"#434347",success:"#29CC6A",error:"#F5A73B"},background:{primary:"#121214",secondary:"#18181A",segment:"#262629",tint:"#222224",qr:"#FFFFFF"},text:{primary:"#E5E5EA",secondary:"#7D7D85"}};/*! - * is-plain-object - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */function S4(e){return Object.prototype.toString.call(e)==="[object Object]"}function V8(e){var t,n;return S4(e)===!1?!1:(t=e.constructor,t===void 0?!0:(n=t.prototype,!(S4(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}function xo(e,t){return e?f6(t,e,{arrayMerge:(r,o,i)=>o,isMergeableObject:V8}):t}const[K8,wd]=yd({theme:Lt.LIGHT,colors:wg,borderRadius:"m"}),xg={[Lt.LIGHT]:wg,[Lt.DARK]:z8},pr={[Lt.LIGHT]:void 0,[Lt.DARK]:void 0};function Pc(e,t){t&&(pr[Lt.DARK]=xo(t[Lt.DARK],pr[Lt.DARK]),pr[Lt.LIGHT]=xo(t[Lt.LIGHT],pr[Lt.LIGHT])),wd({theme:e,colors:xo(pr[e],xg[e])})}function q8(e){wd({borderRadius:e})}function Q8(e){pr[Lt.DARK]=xo(e[Lt.DARK],pr[Lt.DARK]),pr[Lt.LIGHT]=xo(e[Lt.LIGHT],pr[Lt.LIGHT]),wd(t=>({colors:xo(pr[t.theme],xg[t.theme])}))}const G8=W.div` - background-color: ${e=>e.theme.colors.background.secondary}; -`,ii=e=>{let t;const[n,r]=Ae(null);return Xt(()=>{const o=new window.Image;return o.src=e.src,o.alt=e.alt||"",o.setAttribute("draggable","false"),e.class&&o.classList.add(e.class),o.complete?r(o):(o.addEventListener("load",()=>r(o)),()=>o.removeEventListener("load",()=>r(o)))}),[m(Pe,{get when(){return n()},get children(){return n()}}),m(Pe,{get when(){return!n()},get children(){return m(G8,{get class(){return e.class},ref(o){const i=t;typeof i=="function"?i(o):t=o}})}})]};let qo={};try{let e=location.hash.toString();qo=Y8(e)}catch{}let cs="unknown";qo!=null&&qo.tgWebAppPlatform&&(cs=(r4=qo.tgWebAppPlatform)!=null?r4:"unknown");if(cs==="unknown"){const e=Yr();cs=(l4=(i4=(o4=e==null?void 0:e.Telegram)==null?void 0:o4.WebApp)==null?void 0:i4.platform)!=null?l4:"unknown"}let ru="6.0";qo!=null&&qo.tgWebAppVersion&&(ru=qo.tgWebAppVersion);if(!ru){const e=Yr();ru=(u4=(a4=(s4=e==null?void 0:e.Telegram)==null?void 0:s4.WebApp)==null?void 0:a4.version)!=null?u4:"6.0"}function Or(...e){return e.includes(cs)}function qr(){var e;return cs!=="unknown"||!!((e=Yr())!=null&&e.TelegramWebviewProxy)}function xd(){bg("web_app_expand",{})}function Cl(e,t){const n=new URL(e);if(n.protocol!=="http:"&&n.protocol!=="https:"){if(t)return t();throw new Ut(`Url protocol is not supported: ${n}`)}if(n.hostname!=="t.me"){if(t)return t();throw new Ut(`Url host is not supported: ${n}`)}const r=n.pathname+n.search;Cg()||X8("6.1")?bg("web_app_open_tg_link",{path_full:r}):St("https://t.me"+r)}function Cg(){try{const e=Yr();return e?e.parent!=null&&e!==e.parent:!1}catch{return!1}}function bg(e,t){try{const n=Yr();if(!n)throw new Ut("Can't post event to parent window: window is not defined");if(n.TelegramWebviewProxy!==void 0)pa("postEvent",e,t),n.TelegramWebviewProxy.postEvent(e,JSON.stringify(t));else if(n.external&&"notify"in n.external)pa("postEvent",e,t),n.external.notify(JSON.stringify({eventType:e,eventData:t}));else if(Cg()){const r="*",o=JSON.stringify({eventType:e,eventData:t});pa("postEvent",e,t),n.parent.postMessage(o,r)}else throw new Ut("Can't post event to TMA")}catch(n){a8(`Can't post event to parent window: ${n}`)}}function Y8(e){e=e.replace(/^#/,"");let t={};if(!e.length)return t;if(e.indexOf("=")<0&&e.indexOf("?")<0)return t._path=ou(e),t;let n=e.indexOf("?");if(n>=0){let o=e.substr(0,n);t._path=ou(o),e=e.substr(n+1)}let r=Z8(e);for(let o in r)t[o]=r[o];return t}function ou(e){try{return e=e.replace(/\+/g,"%20"),decodeURIComponent(e)}catch{return e}}function Z8(e){let t={};if(!e.length)return t;let n=e.split("&"),r,o,i,l;for(r=0;rs?1:-1;return 0}function X8(e){return J8(ru,e)>=0}const Fo={mobile:440,tablet:1020};function _i(e){const t=Yr();if(!t)return e==="desktop";if(Or("weba"))return!0;const n=t.innerWidth;switch(e){case"desktop":return n>Fo.tablet;case"tablet":return n>Fo.mobile;default:case"mobile":return n<=Fo.mobile||mr("ios","android","ipad")}}function zn(e){switch(e){case"mobile":return`@media (max-width: ${Fo.mobile}px)`;case"tablet":return`@media (max-width: ${Fo.tablet}px) (min-width: ${Fo.mobile}px)`;default:case"desktop":return`@media (min-width: ${Fo.tablet}px)`}}const bs="@media (hover: none)",Ss="@media not all and (hover: none)",ey={m:"100vh",s:"8px",none:"0"},Mc={s:.02,m:.04},ty=W.button` - display: ${e=>e.leftIcon||e.rightIcon?"flex":"inline-block"}; - gap: ${e=>e.leftIcon||e.rightIcon?"6px":"unset"}; - align-items: ${e=>e.leftIcon||e.rightIcon?"center":"unset"}; - justify-content: ${e=>e.leftIcon||e.rightIcon?"space-between":"unset"}; - background-color: ${e=>e.appearance==="flat"?"transparent":e.appearance==="secondary"?e.theme.colors.background.tint:Cs(e.theme.colors.accent,.12)}; - color: ${e=>e.appearance==="secondary"?e.theme.colors.text.primary:e.theme.colors.accent}; - - padding: ${e=>e.appearance==="flat"?"0":"9px 16px"}; - padding-left: ${e=>e.leftIcon&&e.appearance!=="flat"?"12px":"16px"}; - padding-right: ${e=>e.rightIcon&&e.appearance!=="flat"?"12px":"16px"}; - border: none; - border-radius: ${e=>ey[e.theme.borderRadius]}; - cursor: ${e=>e.disabled?"not-allowed":"pointer"}; - - font-size: 14px; - font-weight: 590; - line-height: 18px; - - transition: transform 0.125s ease-in-out; - - ${Ss} { - &:hover { - transform: ${e=>e.disabled?"unset":`scale(${1+Mc[e.scale]})`}; - } - } - - &:active { - transform: ${e=>e.disabled?"unset":`scale(${1-Mc[e.scale]})`}; - } - - ${bs} { - &:active { - transform: ${e=>e.disabled?"unset":`scale(${1-Mc[e.scale]*2})`}; - } - } -`;function Es(e){const t=en(()=>Object.keys(e).filter(r=>r.startsWith("data-"))),[n]=fd(e,t);return n}const jt=e=>{const t=Es(e);return m(ty,Cr({get appearance(){return e.appearance||"primary"},get class(){return e.class},onClick:n=>{var r;return(r=e.onClick)==null?void 0:r.call(e,n)},onMouseEnter:n=>{var r;return(r=e.onMouseEnter)==null?void 0:r.call(e,n)},onMouseLeave:n=>{var r;return(r=e.onMouseLeave)==null?void 0:r.call(e,n)},ref(n){const r=e.ref;typeof r=="function"?r(n):e.ref=n},get disabled(){return e.disabled},get scale(){return e.scale||"m"},get leftIcon(){return!!e.leftIcon},get rightIcon(){return!!e.rightIcon},"data-tc-button":"true"},t,{get children(){return[ue(()=>e.leftIcon),ue(()=>e.children),ue(()=>e.rightIcon)]}}))};function iu(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}const Cd=e=>{let t,n=!0;const[r,o]=Ae(),[i,l]=Ae(),s=Uu(()=>e.children),{onBeforeEnter:u,onEnter:c,onAfterEnter:f,onBeforeExit:g,onExit:h,onAfterExit:b}=e,y=ue(()=>{const E=e.name||"s";return{enterActiveClass:e.enterActiveClass||E+"-enter-active",enterClass:e.enterClass||E+"-enter",enterToClass:e.enterToClass||E+"-enter-to",exitActiveClass:e.exitActiveClass||E+"-exit-active",exitClass:e.exitClass||E+"-exit",exitToClass:e.exitToClass||E+"-exit-to"}});function S(E,w){if(!n||e.appear){let C=function(M){E&&(!M||M.target===E)&&(E.removeEventListener("transitionend",C),E.removeEventListener("animationend",C),E.classList.remove(...A),E.classList.remove(...I),Z3(()=>{r()!==E&&o(E),i()===E&&l(void 0)}),f&&f(E),e.mode==="inout"&&P(E,w))};const _=y().enterClass.split(" "),A=y().enterActiveClass.split(" "),I=y().enterToClass.split(" ");u&&u(E),E.classList.add(..._),E.classList.add(...A),iu(()=>{E.classList.remove(..._),E.classList.add(...I),c&&c(E,()=>C()),(!c||c.length<2)&&(E.addEventListener("transitionend",C),E.addEventListener("animationend",C))})}w&&!e.mode?l(E):o(E)}function P(E,w){const C=y().exitClass.split(" "),_=y().exitActiveClass.split(" "),A=y().exitToClass.split(" ");if(!w.parentNode)return I();g&&g(w),w.classList.add(...C),w.classList.add(..._),iu(()=>{w.classList.remove(...C),w.classList.add(...A)}),h&&h(w,()=>I()),(!h||h.length<2)&&(w.addEventListener("transitionend",I),w.addEventListener("animationend",I));function I(M){(!M||M.target===w)&&(w.removeEventListener("transitionend",I),w.removeEventListener("animationend",I),w.classList.remove(..._),w.classList.remove(...A),r()===w&&o(void 0),b&&b(w),e.mode==="outin"&&S(E,w))}}return Ya(E=>{for(t=s();typeof t=="function";)t=t();return en(()=>(t&&t!==E&&(e.mode!=="outin"?S(t,E):n&&o(t)),E&&E!==t&&e.mode!=="inout"&&P(t,E),n=!1,t))}),[r,i]};function Js(e){const{top:t,bottom:n,left:r,right:o,width:i,height:l}=e.getBoundingClientRect(),s=e.parentNode.getBoundingClientRect();return{top:t-s.top,bottom:n,left:r-s.left,right:o,width:i,height:l}}const ny=e=>{const t=Uu(()=>e.children),n=ue(()=>{const b=e.name||"s";return{enterActiveClass:e.enterActiveClass||b+"-enter-active",enterClass:e.enterClass||b+"-enter",enterToClass:e.enterToClass||b+"-enter-to",exitActiveClass:e.exitActiveClass||b+"-exit-active",exitClass:e.exitClass||b+"-exit",exitToClass:e.exitToClass||b+"-exit-to",moveClass:e.moveClass||b+"-move"}}),{onBeforeEnter:r,onEnter:o,onAfterEnter:i,onBeforeExit:l,onExit:s,onAfterExit:u}=e,[c,f]=Ae();let g=[],h=!0;return Ya(()=>{const b=t(),y=[...b],S=new Set(b),P=new Set(g),E=n().enterClass.split(" "),w=n().enterActiveClass.split(" "),C=n().enterToClass.split(" "),_=n().exitClass.split(" "),A=n().exitActiveClass.split(" "),I=n().exitToClass.split(" ");for(let M=0;M{T.classList.remove(...E),T.classList.add(...C),o&&o(T,()=>L()),(!o||o.length<2)&&(T.addEventListener("transitionend",L),T.addEventListener("animationend",L))})}}for(let M=0;MN!==T),f(g))};y.splice(M,0,T),l&&l(T),T.classList.add(..._),T.classList.add(...A),iu(()=>{T.classList.remove(..._),T.classList.add(...I)}),s&&s(T,()=>L()),(!s||s.length<2)&&(T.addEventListener("transitionend",L),T.addEventListener("animationend",L))}}g=y,f(y)}),Xt(b=>{const y=c();return y.forEach(S=>{let P;(P=b.get(S))?P.new&&(P.new=!1,P.newPos=Js(S)):b.set(S,P={pos:Js(S),new:!h}),P.new&&S.addEventListener("transitionend",()=>{P.new=!1,S.parentNode&&(P.newPos=Js(S))},{once:!0}),P.newPos&&(P.pos=P.newPos),P.newPos=Js(S)}),h?(h=!1,b):(y.forEach(S=>{const P=b.get(S),E=P.pos,w=P.newPos,C=E.left-w.left,_=E.top-w.top;if(C||_){P.moved=!0;const A=S.style;A.transform=`translate(${C}px,${_}px)`,A.transitionDuration="0s"}}),document.body.offsetHeight,y.forEach(S=>{const P=b.get(S);if(P.moved){let E=function(_){_&&_.target!==S||!S.parentNode||(!_||/transform$/.test(_.propertyName))&&(S.removeEventListener("transitionend",E),S.classList.remove(...C))};P.moved=!1;const w=S.style,C=n().moveClass.split(" ");S.classList.add(...C),w.transform=w.transitionDuration="",S.addEventListener("transitionend",E)}}),b)},new Map),c};function ry(e,t){const n=r=>{var o;return!e.contains(r.target)&&((o=t())==null?void 0:o())};document.body.addEventListener("click",n),xn(()=>document.body.removeEventListener("click",n))}function oy(e,t){const n=r=>{var o,i;r.key==="Escape"&&((o=document.activeElement)==null||o.blur(),(i=t())==null||i())};document.body.addEventListener("keydown",n),xn(()=>document.body.removeEventListener("keydown",n))}function iy(e,t){const{isEnabled:n,onClose:r}=t();if(!n||!(md().os==="android"))return;window.history.pushState(ly,"");const i=l=>{l.preventDefault(),r()};window.addEventListener("popstate",i,{once:!0}),xn(()=>{window.removeEventListener("popstate",i),dg(()=>{var l;((l=window.history.state)==null?void 0:l[Sg])===!0&&window.history.back()})})}const Sg="androidBackHandler",ly={[Sg]:!0},sy=Ye('',4,!0),ay={left:0,top:90,right:180,bottom:270},Eg=e=>{const t=xt(),n=()=>e.fill||t.colors.icon.secondary,r=()=>e.direction||"left",o=W("svg")` - transform: rotate(${i=>ay[i.svgDirection]}deg); - transition: transform 0.1s ease-in-out; - `;return m(o,{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",get svgDirection(){return r()},get children(){const i=sy.cloneNode(!0);return Qe(()=>Ce(i,"fill",n())),i}})},uy=Ye(''),cy=e=>{const t=xt(),n=()=>e.fill||t.colors.icon.secondary;return(()=>{const r=uy.cloneNode(!0),o=r.firstChild;return Qe(()=>Ce(o,"fill",n())),r})()},fy=W.button` - padding: 0; - display: flex; - justify-content: center; - align-items: center; - width: 32px; - height: 32px; - border-radius: 50%; - background-color: ${e=>e.theme.colors.background.tint}; - border: none; - cursor: pointer; - - transition: transform 0.125s ease-in-out; - - ${Ss} { - &:hover { - transform: scale(1.04); - } - } - - &:active { - transform: scale(0.96); - } - - ${bs} { - &:active { - transform: scale(0.92); - } - } -`,li=e=>{const t=Es(e),n=()=>e.icon||"close";return m(fy,Cr({get class(){return e.class},onClick:()=>e.onClick(),"data-tc-icon-button":"true"},t,{get children(){return[m(Pe,{get when(){return!!e.children},get children(){return e.children}}),m(Pe,{get when(){return!e.children},get children(){return m(xs,{get children(){return[m(nn,{get when(){return n()==="close"},get children(){return m(cy,{get fill(){return e.fill}})}}),m(nn,{get when(){return n()==="arrow"},get children(){return m(Eg,{get fill(){return e.fill}})}}),m(nn,{get when(){return n()==="question"},get children(){return m(pw,{get fill(){return e.fill}})}}),m(nn,{get when(){return typeof n()!="string"},get children(){return n()}})]}})}})]}}))},$i={m:"24px",s:"16px",none:"0"},dy=W.div` - display: flex; - position: fixed; - z-index: 1000; - left: 0; - top: 0; - width: 100%; - height: 100%; - background-color: rgba(0, 0, 0, 0.4); - padding: 20px 0; - overflow-y: auto; - - ${zn("mobile")} { - padding-bottom: 0; - } -`,hy=Kr` - box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 16px 64px rgba(0, 0, 0, 0.16); - width: fit-content; - margin: auto; - - ${zn("mobile")} { - width: 100%; - height: fit-content; - margin: auto 0 0 0; - } -`,gy=W.div` - position: relative; - min-height: 100px; - width: 416px; - padding: 44px 56px 24px; - - box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.04); - - background-color: ${e=>e.theme.colors.background.primary}; - border-radius: ${e=>$i[e.theme.borderRadius]}; - - ${zn("mobile")} { - width: 100%; - } -`,py=W(li)` - position: absolute; - right: 16px; - top: 16px; -`,my=W.div` - display: flex; - justify-content: space-between; - align-items: center; - padding: 16px 16px 16px 18px; - border-radius: 0 0 ${e=>$i[e.theme.borderRadius]} - ${e=>$i[e.theme.borderRadius]}; -`,vy=W(li)` - background-color: ${e=>Cs(e.theme.colors.icon.secondary,.12)}; -`;class yy{constructor(){Ee(this,"currentTime",0)}}const bl=class{constructor(){Ee(this,"currentTime",0),Ee(this,"playbackRate",1),Ee(this,"startTime",null),Ee(this,"timeline",new yy),Ee(this,"finished",Promise.resolve(this)),Ee(this,"effect",null),Ee(this,"id",""),Ee(this,"pending",!1),Ee(this,"playState","finished"),Ee(this,"replaceState","active"),Ee(this,"ready",Promise.resolve(this)),Ee(this,"oncancel",null),Ee(this,"onfinish",null),Ee(this,"onremove",null)}static create(){return bl._instance||(u8("Animation is not supported in this environment: please consider using the `web-animations-js` polyfill to provide a fallback implementation of the Web Animations API."),bl._instance=new bl),bl._instance}cancel(){}finish(){}pause(){}play(){}reverse(){}addEventListener(e,t,n){}dispatchEvent(e){return!1}removeEventListener(e,t,n){}updatePlaybackRate(e){}commitStyles(){}persist(){}};let kg=bl;Ee(kg,"_instance",null);function vr(e,t,n){return"animate"in e?e.animate(t,n):kg.create()}const wy=Ye("
"),xy=ry,Cy=oy,by=iy,_g=e=>{const t=xt(),n=Es(e);return Xt(()=>{e.opened?d8():h8()}),m(Cd,{onBeforeEnter:r=>{const o=_i("mobile")?200:100;vr(r,[{opacity:0},{opacity:1}],{duration:o}),_i("mobile")&&vr(r.firstElementChild,[{transform:"translateY(390px)"},{transform:"translateY(0)"}],{duration:o})},onExit:(r,o)=>{const i=_i("mobile")?200:100,l=vr(r,[{opacity:1},{opacity:0}],{duration:i});if(_i("mobile")){const s=vr(r.firstElementChild,[{transform:"translateY(0)"},{transform:"translateY(390px)"}],{duration:i});Promise.all([l.finished,s.finished]).then(o)}else l.finished.then(o)},get children(){return m(Pe,{get when(){return e.opened},get children(){return m(dy,Cr({"data-tc-modal":"true"},n,{get children(){const r=wy.cloneNode(!0);return Bl(by,r,()=>({isEnabled:e.enableAndroidBackHandler,onClose:()=>e.onClose()})),Bl(Cy,r,()=>()=>e.onClose()),Bl(xy,r,()=>()=>e.onClose()),gn(r,m(gy,{get class(){return e.class},get children(){return[m(py,{icon:"close",onClick:()=>e.onClose()}),ue(()=>e.children)]}}),null),gn(r,m(Pe,{get when(){return e.onClickQuestion},get children(){return m(my,{get children(){return[m(hw,{}),m(vy,{get onClick(){return e.onClickQuestion},icon:"question"})]}})}}),null),Qe(()=>dd(r,Ni(hy,Kr` - border-radius: ${$i[t.borderRadius]}; - background-color: ${t.colors.background.tint}; - - ${zn("mobile")} { - border-radius: ${$i[t.borderRadius]} - ${$i[t.borderRadius]} 0 0; - } - `))),r}}))}})}})},Sy={m:"22px",s:"12px",none:"0"},Ey={m:"18px",s:"8px",none:"0"},ky=W.div` - display: grid; - grid-template: 1fr / 1fr 1fr; - width: fit-content; - justify-items: center; - gap: 4px; - - position: relative; - padding: 4px; - border-radius: ${e=>Sy[e.theme.borderRadius]}; - - background-color: ${e=>e.theme.colors.background.secondary}; -`,_y=W.div` - position: absolute; - top: 4px; - left: 4px; - - height: calc(100% - 8px); - width: calc(50% - 4px); - - border-radius: ${e=>Ey[e.theme.borderRadius]}; - background-color: ${e=>e.theme.colors.background.segment}; - - transform: ${e=>e.right?"translateX(100%)":"translateX(0)"}; - - transition: transform 0.13s ease-in-out; -`,E4=W.input` - display: none; -`,k4=W.label` - padding: 9px 12px; - z-index: 1; - - cursor: ${e=>e.isActive?"default":"pointer"}; - - transition: transform 0.13s ease-in-out; - - &:hover { - transform: ${e=>e.isActive?"none":"scale(1.025)"}; - } - - > * { - ${e=>e.isActive?"":`color: ${e.theme.colors.text.secondary};`} - } -`,Ay=e=>{const t="tabBar"+Math.floor(Math.random()*1e4);return m(ky,{get class(){return e.class},"data-tc-tab-bar":"true",get children(){return[m(_y,{get right(){return e.selectedTabIndex===1}}),m(k4,{get isActive(){return e.selectedTabIndex===0},get children(){return[m(E4,{type:"radio",name:t,get checked(){return e.selectedTabIndex===0},onInput:()=>{var n;return(n=e.onSelectedTabIndexChange)==null?void 0:n.call(e,0)}}),ue(()=>e.tab1)]}}),m(k4,{get isActive(){return e.selectedTabIndex===1},get children(){return[m(E4,{type:"radio",get checked(){return e.selectedTabIndex===1},name:t,onInput:()=>{var n;return(n=e.onSelectedTabIndexChange)==null?void 0:n.call(e,1)}}),ue(()=>e.tab2)]}})]}})},Ty={m:"16px",s:"12px",none:"0"},Ly={m:"12px",s:"8px",none:"0"},Ag=256,Y0=60,_4=48,A4=24,ma=W.div` - width: 52px; - height: 52px; - background: transparent; - position: absolute; - right: 0; - bottom: 0; - - display: flex; - align-items: center; - justify-content: center; - transition: transform 0.125s ease-in-out; -`,Ry=W.button` - display: flex; - align-items: center; - position: relative; - background-color: ${e=>e.theme.colors.background.qr}; - border-radius: ${e=>Ty[e.theme.borderRadius]}; - padding: ${br(A4)} 0; - height: ${br(Ag+A4*2)}; - width: 100%; - - overflow: hidden; - cursor: pointer; - border: none; - - ${Ss} { - &:hover { - ${ma.class} { - transform: scale(1.04); - } - } - } - - &:active { - ${ma.class} { - transform: scale(0.96); - } - } - - ${bs} { - &:active { - ${ma.class} { - transform: scale(0.92); - } - } - } -`,Py=W.div` - position: relative; - - width: fit-content; - margin: 0 auto; - - > div:first-child { - display: flex; - align-items: center; - justify-content: center; - } - - rect { - fill: transparent; - } - - path { - fill: ${e=>e.theme.colors.constant.black}; - } -`,My=W.div` - position: absolute; - width: ${br(Y0)}; - height: ${br(Y0)}; - background: ${e=>e.theme.colors.background.qr}; - - display: flex; - align-items: center; - justify-content: center; -`,Ny=W(ii)` - width: ${e=>br(e.size)}; - height: ${e=>br(e.size)}; - border-radius: ${e=>Ly[e.theme.borderRadius]}; - background-color: ${e=>e.theme.colors.background.qr}; -`,$y=W.div` - position: absolute; - bottom: 14px; - left: 50%; - transform: translate(-50%, 0); - - display: flex; - gap: 6px; - align-items: center; - border-radius: 18px; - min-width: 126px; - padding: 9px 16px 9px 10px; - - filter: drop-shadow(0px 2px 8px rgba(0, 0, 0, 0.08)); - background-color: ${e=>e.theme.colors.background.segment}; -`;var Tg={exports:{}};(function(e,t){var n=function(){var r=function(A,I){var M=236,T=17,L=A,O=i[I],N=null,R=0,X=null,Y=[],ee={},ye=function(H,z){R=L*4+17,N=function(j){for(var Q=new Array(j),G=0;G=7&&Ze(H),X==null&&(X=Me(L,O,Y)),ct(X,z)},Te=function(H,z){for(var j=-1;j<=7;j+=1)if(!(H+j<=-1||R<=H+j))for(var Q=-1;Q<=7;Q+=1)z+Q<=-1||R<=z+Q||(0<=j&&j<=6&&(Q==0||Q==6)||0<=Q&&Q<=6&&(j==0||j==6)||2<=j&&j<=4&&2<=Q&&Q<=4?N[H+j][z+Q]=!0:N[H+j][z+Q]=!1)},Z=function(){for(var H=0,z=0,j=0;j<8;j+=1){ye(!0,j);var Q=s.getLostPoint(ee);(j==0||H>Q)&&(H=Q,z=j)}return z},ie=function(){for(var H=8;H>j&1)==1;N[Math.floor(j/3)][j%3+R-8-3]=Q}for(var j=0;j<18;j+=1){var Q=!H&&(z>>j&1)==1;N[j%3+R-8-3][Math.floor(j/3)]=Q}},Je=function(H,z){for(var j=O<<3|z,Q=s.getBCHTypeInfo(j),G=0;G<15;G+=1){var oe=!H&&(Q>>G&1)==1;G<6?N[G][8]=oe:G<8?N[G+1][8]=oe:N[R-15+G][8]=oe}for(var G=0;G<15;G+=1){var oe=!H&&(Q>>G&1)==1;G<8?N[8][R-G-1]=oe:G<9?N[8][15-G-1+1]=oe:N[8][15-G-1]=oe}N[R-8][8]=!H},ct=function(H,z){for(var j=-1,Q=R-1,G=7,oe=0,xe=s.getMaskFunction(z),be=R-1;be>0;be-=2)for(be==6&&(be-=1);;){for(var dt=0;dt<2;dt+=1)if(N[Q][be-dt]==null){var wt=!1;oe>>G&1)==1);var _e=xe(Q,be-dt);_e&&(wt=!wt),N[Q][be-dt]=wt,G-=1,G==-1&&(oe+=1,G=7)}if(Q+=j,Q<0||R<=Q){Q-=j,j=-j;break}}},mt=function(H,z){for(var j=0,Q=0,G=0,oe=new Array(z.length),xe=new Array(z.length),be=0;be=0?Xr.getAt(Gt):0}}for(var Mn=0,_e=0;_ebe*8)throw"code length overflow. ("+G.getLengthInBits()+">"+be*8+")";for(G.getLengthInBits()+4<=be*8&&G.put(0,4);G.getLengthInBits()%8!=0;)G.putBit(!1);for(;!(G.getLengthInBits()>=be*8||(G.put(M,8),G.getLengthInBits()>=be*8));)G.put(T,8);return mt(G,Q)};ee.addData=function(H,z){z=z||"Byte";var j=null;switch(z){case"Numeric":j=h(H);break;case"Alphanumeric":j=b(H);break;case"Byte":j=y(H);break;case"Kanji":j=S(H);break;default:throw"mode:"+z}Y.push(j),X=null},ee.isDark=function(H,z){if(H<0||R<=H||z<0||R<=z)throw H+","+z;return N[H][z]},ee.getModuleCount=function(){return R},ee.make=function(){if(L<1){for(var H=1;H<40;H++){for(var z=f.getRSBlocks(H,O),j=g(),Q=0;Q"u"?H*4:z;var j="";j+='";for(var G=0;G';j+=""}return j+="",j+="
",j},ee.createSvgTag=function(H,z,j,Q){var G={};typeof arguments[0]=="object"&&(G=arguments[0],H=G.cellSize,z=G.margin,j=G.alt,Q=G.title),H=H||2,z=typeof z>"u"?H*4:z,j=typeof j=="string"?{text:j}:j||{},j.text=j.text||null,j.id=j.text?j.id||"qrcode-description":null,Q=typeof Q=="string"?{text:Q}:Q||{},Q.text=Q.text||null,Q.id=Q.text?Q.id||"qrcode-title":null;var oe=ee.getModuleCount()*H+z*2,xe,be,dt,wt,_e="",Mt;for(Mt="l"+H+",0 0,"+H+" -"+H+",0 0,-"+H+"z ",_e+=''+ft(Q.text)+"":"",_e+=j.text?''+ft(j.text)+"":"",_e+='',_e+='"u"?H*4:z;var j=ee.getModuleCount()*H+z*2,Q=z,G=j-z;return _(j,j,function(oe,xe){if(Q<=oe&&oe"u"?H*4:z;var Q=ee.getModuleCount()*H+z*2,G="";return G+="",G};var ft=function(H){for(var z="",j=0;j":z+=">";break;case"&":z+="&";break;case'"':z+=""";break;default:z+=Q;break}}return z},Pn=function(H){var z=1;H=typeof H>"u"?z*2:H;var j=ee.getModuleCount()*z+H*2,Q=H,G=j-H,oe,xe,be,dt,wt,_e={"██":"█","█ ":"▀"," █":"▄"," ":" "},Mt={"██":"▀","█ ":"▀"," █":" "," ":" "},Ft="";for(oe=0;oe=G?Mt[wt]:_e[wt];Ft+=` -`}return j%2&&H>0?Ft.substring(0,Ft.length-j-1)+Array(j+1).join("▀"):Ft.substring(0,Ft.length-1)};return ee.createASCII=function(H,z){if(H=H||1,H<2)return Pn(z);H-=1,z=typeof z>"u"?H*2:z;var j=ee.getModuleCount()*H+z*2,Q=z,G=j-z,oe,xe,be,dt,wt=Array(H+1).join("██"),_e=Array(H+1).join(" "),Mt="",Ft="";for(oe=0;oe>>8),O.push(X&255)):O.push(T)}}return O}};var o={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},i={L:1,M:0,Q:3,H:2},l={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},s=function(){var A=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],I=1335,M=7973,T=21522,L={},O=function(N){for(var R=0;N!=0;)R+=1,N>>>=1;return R};return L.getBCHTypeInfo=function(N){for(var R=N<<10;O(R)-O(I)>=0;)R^=I<=0;)R^=M<5&&(X+=3+ye-5)}for(var Y=0;Y=256;)L-=255;return A[L]},T}();function c(A,I){if(typeof A.length>"u")throw A.length+"/"+I;var M=function(){for(var L=0;L"u")throw"bad rs block @ typeNumber:"+L+"/errorCorrectionLevel:"+O;for(var R=N.length/3,X=[],Y=0;Y>>7-T%8&1)==1},M.put=function(T,L){for(var O=0;O>>L-O-1&1)==1)},M.getLengthInBits=function(){return I},M.putBit=function(T){var L=Math.floor(I/8);A.length<=L&&A.push(0),T&&(A[L]|=128>>>I%8),I+=1},M},h=function(A){var I=o.MODE_NUMBER,M=A,T={};T.getMode=function(){return I},T.getLength=function(N){return M.length},T.write=function(N){for(var R=M,X=0;X+2>>8&255)*192+(X&255),O.put(X,13),R+=2}if(R>>8)},I.writeBytes=function(M,T,L){T=T||0,L=L||M.length;for(var O=0;O0&&(M+=","),M+=A[T];return M+="]",M},I},E=function(){var A=0,I=0,M=0,T="",L={},O=function(R){T+=String.fromCharCode(N(R&63))},N=function(R){if(!(R<0)){if(R<26)return 65+R;if(R<52)return 97+(R-26);if(R<62)return 48+(R-52);if(R==62)return 43;if(R==63)return 47}throw"n:"+R};return L.writeByte=function(R){for(A=A<<8|R&255,I+=8,M+=1;I>=6;)O(A>>>I-6),I-=6},L.flush=function(){if(I>0&&(O(A<<6-I),A=0,I=0),M%3!=0)for(var R=3-M%3,X=0;X=I.length){if(L==0)return-1;throw"unexpected end of file./"+L}var R=I.charAt(M);if(M+=1,R=="=")return L=0,-1;if(R.match(/^\s$/))continue;T=T<<6|N(R.charCodeAt(0)),L+=6}var X=T>>>L-8&255;return L-=8,X};var N=function(R){if(65<=R&&R<=90)return R-65;if(97<=R&&R<=122)return R-97+26;if(48<=R&&R<=57)return R-48+52;if(R==43)return 62;if(R==47)return 63;throw"c:"+R};return O},C=function(A,I){var M=A,T=I,L=new Array(A*I),O={};O.setPixel=function(Y,ee,ye){L[ee*M+Y]=ye},O.write=function(Y){Y.writeString("GIF87a"),Y.writeShort(M),Y.writeShort(T),Y.writeByte(128),Y.writeByte(0),Y.writeByte(0),Y.writeByte(0),Y.writeByte(0),Y.writeByte(0),Y.writeByte(255),Y.writeByte(255),Y.writeByte(255),Y.writeString(","),Y.writeShort(0),Y.writeShort(0),Y.writeShort(M),Y.writeShort(T),Y.writeByte(0);var ee=2,ye=R(ee);Y.writeByte(ee);for(var Te=0;ye.length-Te>255;)Y.writeByte(255),Y.writeBytes(ye,Te,255),Te+=255;Y.writeByte(ye.length-Te),Y.writeBytes(ye,Te,ye.length-Te),Y.writeByte(0),Y.writeString(";")};var N=function(Y){var ee=Y,ye=0,Te=0,Z={};return Z.write=function(ie,pe){if(ie>>>pe)throw"length over";for(;ye+pe>=8;)ee.writeByte(255&(ie<>>=8-ye,Te=0,ye=0;Te=ie<0&&ee.writeByte(Te)},Z},R=function(Y){for(var ee=1<>6,128|u&63):u<55296||u>=57344?l.push(224|u>>12,128|u>>6&63,128|u&63):(s++,u=65536+((u&1023)<<10|i.charCodeAt(s)&1023),l.push(240|u>>18,128|u>>12&63,128|u>>6&63,128|u&63))}return l}return o(r)}})(),function(r){e.exports=r()}(function(){return n})})(Tg);const Iy=Tg.exports;function bd(e){return ut(this,null,function*(){try{if(!(navigator!=null&&navigator.clipboard))throw new Ut("Clipboard API not available");return yield navigator.clipboard.writeText(e)}catch{}By(e)})}function By(e){const t=document.createElement("textarea");t.value=e,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy")}finally{document.body.removeChild(t)}}const Oy=Ye("
"),Fu=e=>{let t,n,r;const[o,i]=Ae(!1),[l,s]=Ae(_4);Xt(()=>{const h=Iy(0,"L");h.addData(e.sourceUrl),h.make(),t.innerHTML=h.createSvgTag(4,0);const b=t.firstElementChild.clientWidth,y=Math.round(Ag/b*1e5)/1e5;if(r){const S=Math.ceil(Y0/(y*4))*4,P=br(Math.ceil((b-S)/(2*4))*4);r.style.top=P,r.style.left=P,r.style.height=br(S),r.style.width=br(S),s(Math.round(_4/y))}n.style.transform=`scale(${y})`});let u=null;return m(Ry,{get class(){return e.class},onClick:()=>{i(!0),bd(e.sourceUrl),u!=null&&clearTimeout(u),u=setTimeout(()=>i(!1),1500)},get children(){return[m(Py,{ref(f){const g=n;typeof g=="function"?g(f):n=f},get children(){return[(()=>{const f=Oy.cloneNode(!0),g=t;return typeof g=="function"?Bl(g,f):t=f,f})(),m(Pe,{get when(){return e.imageUrl},get children(){return m(My,{ref(f){const g=r;typeof g=="function"?g(f):r=f},get children(){return m(Ny,{get src(){return e.imageUrl},alt:"",get size(){return l()}})}})}})]}}),m(Cd,{onBeforeEnter:f=>{vr(f,[{opacity:0,transform:"translate(-50%, 44px)"},{opacity:1,transform:"translate(-50%, 0)"}],{duration:150,easing:"ease-out"})},onExit:(f,g)=>{vr(f,[{opacity:1,transform:"translate(-50%, 0)"},{opacity:0,transform:"translate(-50%, 44px)"}],{duration:150,easing:"ease-out"}).finished.then(()=>{g()})},get children(){return m(Pe,{get when(){return o()&&!e.disableCopy},get children(){return m($y,{get children(){return[m(Ed,{size:"xs"}),m(Fn,{translationKey:"common.linkCopied",children:"Link Copied"})]}})}})}}),m(Pe,{get when(){return!e.disableCopy},get children(){return m(ma,{get children(){return m(Pg,{})}})}})]}})};var Z0=(e,t,n)=>{const r=t.trim().split(".").reduce((o,i)=>o?o[i]:void 0,e);return r!==void 0?r:n},Uy=(e,t,n=/{{(.*?)}}/g)=>e.replace(n,(r,o)=>Z0(t,o,"")),Dy=(e={},t=navigator.language in e?navigator.language:Object.keys(e)[0])=>{const[n,r]=Ae(t),[o,i]=yd(e);return[(u,c,f)=>{const g=Z0(o[n()],u,f||"");return typeof g=="function"?g(c):typeof g=="string"?Uy(g,c||{}):g},{add(u,c){i(u,f=>Object.assign(f||{},c))},locale:u=>u?r(u):n(),dict:u=>Z0(o,u)}]},Lg=Ou({}),kr=()=>Cn(Lg);const jy=W.div` - font-style: normal; - font-weight: ${e=>e.fontWeight}; - font-size: ${e=>e.fontSize}; - line-height: ${e=>e.lineHeight}; - - color: ${e=>e.color}; -`,Fn=e=>{const t=xt(),[n]=kr();let r;const o=()=>e.color||t.colors.text.primary,i=Cr({fontSize:"14px",fontWeight:"510",lineHeight:"130%"},e);return Xt(()=>{r&&i.cursor!=="unset"&&getComputedStyle(r).cursor!=="pointer"&&(r.style.cursor="default")}),m(jy,{get fontSize(){return i.fontSize},get fontWeight(){return i.fontWeight},get lineHeight(){return i.lineHeight},get color(){return o()},get class(){return i.class},ref(l){const s=r;typeof s=="function"?s(l):r=l},"data-tc-text":"true",get children(){var l;return ue(()=>!!i.translationKey)()?n(i.translationKey,i.translationValues,(l=i.children)==null?void 0:l.toString()):i.children}})},Fy=W.div` - position: relative; - - &::after { - content: ''; - display: block; - position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; - border: 0.5px solid rgba(0, 0, 0, 0.08); - - border-radius: inherit; - } -`,Wy=W(ii)` - width: 100%; - height: 100%; - border-radius: inherit; -`,Rg=e=>m(Fy,{get class(){return e.class},get children(){return m(Wy,{get src(){return e.src}})}}),Hy={m:"16px",s:"12px",none:"0"},zy={m:"6px",s:"6px",none:"0"},Vy=W.button` - position: relative; - cursor: pointer; - border: none; - background-color: unset; - padding: 8px 4px; - width: 92px; - display: flex; - flex-direction: column; - align-items: center; - - transition: transform 0.125s ease-in-out; - - ${Ss} { - &:hover { - transform: scale(1.04); - } - } - - &:active { - transform: scale(0.96); - } - - ${zn("mobile")} { - padding: 8px 4px; - width: 82px; - } - - ${bs} { - &:active { - transform: scale(0.92); - } - } -`,Ky=W(Rg)` - width: 60px; - height: 60px; - border-radius: ${e=>Hy[e.theme.borderRadius]}; - - margin-bottom: 8px; -`,qy=W(ii)` - position: absolute; - right: 10px; - top: 50px; - width: 24px; - height: 24px; - border-radius: ${e=>zy[e.theme.borderRadius]}; - box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.08); -`,Qy=W(Fn)` - max-width: 90px; - font-weight: 590; - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; - - ${zn("mobile")} { - max-width: 80px; - } -`,Gy=W(Fn)` - font-weight: 510; - max-width: 90px; - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; - color: ${e=>e.colorPrimary?e.theme.colors.text.primary:e.theme.colors.text.secondary}; - - ${zn("mobile")} { - max-width: 80px; - } -`,lu=e=>m(Vy,{get class(){return e.class},onClick:()=>e.onClick(),"data-tc-wallet-item":"true",get children(){return[ue(()=>ue(()=>typeof e.icon=="string")()?m(Ky,{get src(){return e.icon}}):e.icon),ue(()=>ue(()=>!!e.badgeUrl)()&&m(qy,{get src(){return e.badgeUrl}})),m(Qy,{get children(){return e.name}}),ue(()=>ue(()=>!!e.secondLine)()&&m(Gy,{get colorPrimary(){var t;return(t=e.secondLineColorPrimary)!=null?t:!0},get children(){return e.secondLine}}))]}}),Yy=W.h1` - font-style: normal; - font-weight: 700; - font-size: 20px; - line-height: 28px; - - text-align: center; - - color: ${e=>e.theme.colors.text.primary}; - - margin-top: 0; - margin-bottom: 0; - - cursor: default; -`,_r=e=>{const[t]=kr();return m(Yy,{get class(){return e.class},"data-tc-h1":"true",get children(){var n;return ue(()=>!!e.translationKey)()?t(e.translationKey,e.translationValues,(n=e.children)==null?void 0:n.toString()):e.children}})},Zy=W.h2` - font-style: normal; - font-weight: 510; - font-size: 16px; - line-height: 22px; - - text-align: center; - - color: ${e=>e.theme.colors.text.secondary}; - - margin-top: 0; - margin-bottom: 32px; - - cursor: default; -`,Ro=e=>{const[t]=kr();return m(Zy,{get class(){return e.class},"data-tc-h2":"true",get children(){var n;return ue(()=>!!e.translationKey)()?t(e.translationKey,e.translationValues,(n=e.children)==null?void 0:n.toString()):e.children}})},Jy=W.h3` - font-style: normal; - font-weight: 590; - font-size: 16px; - line-height: 20px; - - color: ${e=>e.theme.colors.text.primary}; - - margin-top: 0; - margin-bottom: 0; - - cursor: default; -`,Sd=e=>{const[t]=kr();return m(Jy,{"data-tc-h3":"true",get class(){return e.class},get children(){var n;return ue(()=>!!e.translationKey)()?t(e.translationKey,e.translationValues,(n=e.children)==null?void 0:n.toString()):e.children}})},Xy=Ye(''),ew=e=>{const t=xt(),n=()=>e.fill||t.colors.icon.secondary;return(()=>{const r=Xy.cloneNode(!0),o=r.firstChild;return Qe(i=>{const l=n(),s=n();return l!==i._v$&&Ce(r,"fill",i._v$=l),s!==i._v$2&&Ce(o,"fill",i._v$2=s),i},{_v$:void 0,_v$2:void 0}),r})()},tw=Ye(''),nw=e=>{const t=xt(),n=()=>e.fill||t.colors.icon.primary;return(()=>{const r=tw.cloneNode(!0),o=r.firstChild;return Qe(()=>Ce(o,"fill",n())),r})()},rw=Ye(''),ow=Ye(''),iw=Ye(''),Ed=e=>{const t=xt(),n=()=>e.size||"s",r=()=>e.fill||t.colors.icon.success;return ue((()=>{const o=ue(()=>n()==="xs");return()=>o()?(()=>{const i=rw.cloneNode(!0),l=i.firstChild,s=l.firstChild,u=s.nextSibling;return Qe(c=>{const f=e.class,g=r(),h=t.colors.constant.white;return f!==c._v$&&Ce(i,"class",c._v$=f),g!==c._v$2&&Ce(s,"fill",c._v$2=g),h!==c._v$3&&Ce(u,"stroke",c._v$3=h),c},{_v$:void 0,_v$2:void 0,_v$3:void 0}),i})():(()=>{const i=ue(()=>n()==="s");return()=>i()?(()=>{const l=ow.cloneNode(!0),s=l.firstChild,u=s.nextSibling;return Qe(c=>{const f=e.class,g=r(),h=t.colors.constant.white;return f!==c._v$4&&Ce(l,"class",c._v$4=f),g!==c._v$5&&Ce(s,"fill",c._v$5=g),h!==c._v$6&&Ce(u,"fill",c._v$6=h),c},{_v$4:void 0,_v$5:void 0,_v$6:void 0}),l})():(()=>{const l=iw.cloneNode(!0),s=l.firstChild,u=s.nextSibling;return Qe(c=>{const f=e.class,g=r(),h=t.colors.constant.white;return f!==c._v$7&&Ce(l,"class",c._v$7=f),g!==c._v$8&&Ce(s,"fill",c._v$8=g),h!==c._v$9&&Ce(u,"fill",c._v$9=h),c},{_v$7:void 0,_v$8:void 0,_v$9:void 0}),l})()})()})())},lw=Ye(''),sw=Ye(''),aw=Ye(''),Wu=e=>{const t=xt(),n=()=>e.size||"m",r=()=>e.fill||t.colors.icon.error;return ue((()=>{const o=ue(()=>n()==="m");return()=>o()?(()=>{const i=lw.cloneNode(!0),l=i.firstChild,s=l.nextSibling;return Qe(u=>{const c=e.class,f=r(),g=t.colors.constant.white;return c!==u._v$&&Ce(i,"class",u._v$=c),f!==u._v$2&&Ce(l,"fill",u._v$2=f),g!==u._v$3&&Ce(s,"fill",u._v$3=g),u},{_v$:void 0,_v$2:void 0,_v$3:void 0}),i})():(()=>{const i=ue(()=>n()==="s");return()=>i()?(()=>{const l=sw.cloneNode(!0),s=l.firstChild,u=s.nextSibling;return Qe(c=>{const f=e.class,g=r(),h=t.colors.constant.white;return f!==c._v$4&&Ce(l,"class",c._v$4=f),g!==c._v$5&&Ce(s,"fill",c._v$5=g),h!==c._v$6&&Ce(u,"stroke",c._v$6=h),c},{_v$4:void 0,_v$5:void 0,_v$6:void 0}),l})():(()=>{const l=aw.cloneNode(!0),s=l.firstChild,u=s.nextSibling;return Qe(c=>{const f=e.class,g=r(),h=t.colors.constant.white;return f!==c._v$7&&Ce(l,"class",c._v$7=f),g!==c._v$8&&Ce(s,"fill",c._v$8=g),h!==c._v$9&&Ce(u,"fill",c._v$9=h),c},{_v$7:void 0,_v$8:void 0,_v$9:void 0}),l})()})()})())},uw=Ye(''),cw=Ye(''),fw=Ye(''),Zr=e=>{const t=xt(),n=()=>e.size||"xs",r=()=>e.fill||t.colors.icon.tertiary,o=r8` - 0% { - transform: rotate(0deg); - } - 100% { - transform: rotate(360deg); - } - `,i=Kr` - animation: ${o} 1s linear infinite; - `;return ue((()=>{const l=ue(()=>n()==="xs");return()=>l()?(()=>{const s=uw.cloneNode(!0),u=s.firstChild;return Qe(c=>{const f=Ni(i,e.class),g=r();return f!==c._v$&&Ce(s,"class",c._v$=f),g!==c._v$2&&Ce(u,"fill",c._v$2=g),c},{_v$:void 0,_v$2:void 0}),s})():(()=>{const s=ue(()=>n()==="s");return()=>s()?(()=>{const u=cw.cloneNode(!0),c=u.firstChild;return Qe(f=>{const g=Ni(i,e.class),h=r();return g!==f._v$3&&Ce(u,"class",f._v$3=g),h!==f._v$4&&Ce(c,"fill",f._v$4=h),f},{_v$3:void 0,_v$4:void 0}),u})():(()=>{const u=fw.cloneNode(!0),c=u.firstChild;return Qe(f=>{const g=Ni(i,e.class),h=r();return g!==f._v$5&&Ce(u,"class",f._v$5=g),h!==f._v$6&&Ce(c,"stroke",f._v$6=h),f},{_v$5:void 0,_v$6:void 0}),u})()})()})())},dw=Ye(''),hw=()=>{const e=xt(),t=()=>e.theme===Lt.DARK?e.colors.constant.white:e.colors.constant.black;return(()=>{const n=dw.cloneNode(!0),r=n.firstChild,o=r.nextSibling,i=o.nextSibling;return Qe(()=>Ce(i,"fill",t())),n})()},gw=Ye(''),pw=e=>{const t=xt(),n=()=>e.fill||t.colors.icon.secondary;return(()=>{const r=gw.cloneNode(!0),o=r.firstChild;return Qe(()=>Ce(o,"fill",n())),r})()},mw=Ye(''),vw=e=>{const t=xt(),n=()=>e.fill||t.colors.icon.primary;return(()=>{const r=mw.cloneNode(!0),o=r.firstChild;return Qe(()=>Ce(o,"fill",n())),r})()},yw=Ye(''),ww=e=>{const t=xt(),n=()=>e.fill||t.colors.icon.primary;return(()=>{const r=yw.cloneNode(!0),o=r.firstChild;return Qe(()=>Ce(o,"fill",n())),r})()},xw=Ye(''),Cw=e=>{const t=xt(),n=()=>e.fill||t.colors.icon.primary;return(()=>{const r=xw.cloneNode(!0),o=r.firstChild;return Qe(()=>Ce(o,"fill",n())),r})()},bw=Ye(''),Ol=e=>{const t=xt(),n=()=>e.fill||t.colors.accent;return(()=>{const r=bw.cloneNode(!0),o=r.firstChild,i=o.firstChild;return Qe(()=>Ce(i,"fill",n())),r})()},Sw=Ye(''),T4=e=>{const t=xt(),n=()=>e.fill||t.colors.accent;return(()=>{const r=Sw.cloneNode(!0),o=r.firstChild;return Qe(()=>Ce(o,"fill",n())),r})()},Ew=Ye(''),kw=e=>{const t=xt(),n=()=>e.fill||t.colors.accent;return(()=>{const r=Ew.cloneNode(!0),o=r.firstChild,i=o.firstChild;return Qe(()=>Ce(i,"fill",n())),r})()},_w=Ye(''),Aw=e=>{const t=xt(),n=()=>e.fill||t.colors.icon.secondary;return(()=>{const r=_w.cloneNode(!0),o=r.firstChild;return Qe(i=>{const l=e.class,s=n();return l!==i._v$&&Ce(r,"class",i._v$=l),s!==i._v$2&&Ce(o,"fill",i._v$2=s),i},{_v$:void 0,_v$2:void 0}),r})()},Tw=Ye(''),Lw=e=>{const t=xt(),n=()=>e.fill||t.colors.icon.secondary;return(()=>{const r=Tw.cloneNode(!0),o=r.firstChild;return Qe(i=>{const l=e.class,s=n();return l!==i._v$&&Ce(r,"class",i._v$=l),s!==i._v$2&&Ce(o,"fill",i._v$2=s),i},{_v$:void 0,_v$2:void 0}),r})()},Rw=Ye(''),Pw=e=>{const t=xt(),n=()=>e.fill||t.colors.icon.secondary;return(()=>{const r=Rw.cloneNode(!0),o=r.firstChild;return Qe(i=>{const l=e.class,s=n();return l!==i._v$&&Ce(r,"class",i._v$=l),s!==i._v$2&&Ce(o,"fill",i._v$2=s),i},{_v$:void 0,_v$2:void 0}),r})()},Mw=Ye(''),Nw=e=>{const t=xt(),n=()=>e.fill||t.colors.constant.white;return(()=>{const r=Mw.cloneNode(!0),o=r.firstChild;return Qe(i=>{const l=e.class,s=n();return l!==i._v$&&Ce(r,"class",i._v$=l),s!==i._v$2&&Ce(o,"fill",i._v$2=s),i},{_v$:void 0,_v$2:void 0}),r})()},$w=Ye(''),Iw=e=>{const t=xt(),n=()=>e.fill||t.colors.icon.secondary;return(()=>{const r=$w.cloneNode(!0),o=r.firstChild;return Qe(i=>{const l=e.class,s=n();return l!==i._v$&&Ce(r,"class",i._v$=l),s!==i._v$2&&Ce(o,"fill",i._v$2=s),i},{_v$:void 0,_v$2:void 0}),r})()},Bw=Ye(''),Pg=e=>{const t=xt(),n=()=>e.fill||t.colors.icon.secondary;return(()=>{const r=Bw.cloneNode(!0),o=r.firstChild;return Qe(i=>{const l=n(),s=n();return l!==i._v$&&Ce(r,"fill",i._v$=l),s!==i._v$2&&Ce(o,"fill",i._v$2=s),i},{_v$:void 0,_v$2:void 0}),r})()},Ow=Ye(''),J0=e=>{const t=xt(),n=()=>e.fill||t.colors.icon.secondary;return(()=>{const r=Ow.cloneNode(!0),o=r.firstChild;return Qe(()=>Ce(o,"fill",n())),r})()},Uw={m:"16px",s:"12px",none:"0"},Dw={m:"6px",s:"6px",none:"0"},jw=W.div` - width: 60px; - height: 60px; - padding: 8px; - margin-bottom: 8px; - border-radius: ${e=>Uw[e.theme.borderRadius]}; - background-color: ${e=>e.theme.colors.background.tint}; - display: grid; - grid-template: 1fr 1fr / 1fr 1fr; - gap: 4px; -`,Fw=W(Rg)` - width: 20px; - height: 20px; - border-radius: ${e=>Dw[e.theme.borderRadius]}; -`,Mg=e=>m(lu,{get name(){return e.labelLine1},get secondLine(){return e.labelLine2},get icon(){return m(jw,{get children(){return m(ws,{each:[0,1,2,3],children:t=>m(Fw,{get src(){return e.images[t]}})})}})},onClick:()=>e.onClick()}),Fr="telegram-wallet",ks={TON:"https://raw.githubusercontent.com/ton-connect/sdk/main/assets/ton-icon-48.png",TG:"https://raw.githubusercontent.com/ton-connect/sdk/main/assets/tg.png"},Ng=e=>{const[t]=kr(),n=()=>{if(e.wallet.appName!==Fr){if("isPreferred"in e.wallet&&e.wallet.isPreferred)return t("walletItem.recent",{},"Recent");if(Vo(e.wallet))return t("walletItem.installed",{},"Installed");if(e.wallet.name==="Tonkeeper")return t("walletItem.popular",{},"Popular")}};return ue((()=>{const r=ue(()=>e.wallet.appName===Fr);return()=>r()?m(lu,{get icon(){return e.wallet.imageUrl},get name(){return t("walletItem.walletOn",{},"Wallet On")},secondLine:"Telegram",get badgeUrl(){return ks.TG},onClick:()=>e.onClick()}):m(lu,{get icon(){return e.wallet.imageUrl},get name(){return e.wallet.name},get secondLine(){return n()},secondLineColorPrimary:!1,onClick:()=>e.onClick()})})())},Ww=W.div` - width: 100%; - overflow-y: auto; - max-height: ${e=>e.maxHeight}; - - scrollbar-width: none; - &&::-webkit-scrollbar { - display: none; - } - - &&::-webkit-scrollbar-track { - background: transparent; - } - - &&::-webkit-scrollbar-thumb { - display: none; - } -`,Hw=W.div` - height: 1px; - margin: 0 -24px; - width: calc(100% + 48px); - opacity: 0.08; - background: ${e=>e.isShown?e.theme.colors.icon.secondary:"transparent"}; - transition: background 0.15s ease-in-out; - - ${zn("mobile")} { - width: 100%; - margin: 0; - } -`,[zw,Vw]=Ae(((c4=Yr())==null?void 0:c4.innerHeight)||0);Yr()&&window.addEventListener("resize",()=>Vw(window.innerHeight));const[Vi,Kw]=Ae(_i("mobile")),su=()=>Kw(_i("mobile"));Yr()&&(window.addEventListener("resize",()=>su()),window.addEventListener("load",()=>su(),{once:!0}));const $g=e=>{const[t,n]=Ae(!1),r=l=>{n(l.target.scrollTop>0)},o=()=>Vi()?150:200,i=()=>e.maxHeight!==void 0?`${e.maxHeight}px`:`${zw()-o()}px`;return[m(Hw,{get isShown(){return t()}}),m(Ww,{get maxHeight(){return i()},onScroll:r,get class(){return e.class},get children(){return e.children}})]},qw=W.a` - display: block; - text-decoration: unset; -`,au=e=>m(qw,Cr({get href(){return e.href},get target(){return e.blank?"_blank":"_self"},get class(){return e.class}},()=>e.blank?{rel:"noreferrer noopener"}:{},{get children(){return e.children}})),Po=Ou(),Qw=Ye(''),Gw=e=>{const t=xt(),n=()=>e.fill||t.colors.icon.primary;return(()=>{const r=Qw.cloneNode(!0),o=r.firstChild;return Qe(i=>{const l=e.class,s=n();return l!==i._v$&&Ce(r,"class",i._v$=l),s!==i._v$2&&Ce(o,"fill",i._v$2=s),i},{_v$:void 0,_v$2:void 0}),r})()},Yw=Ye(''),Zw=e=>{const t=xt(),n=()=>e.fill||t.colors.icon.primary;return(()=>{const r=Yw.cloneNode(!0),o=r.firstChild,i=o.nextSibling;return Qe(l=>{const s=n(),u=n();return s!==l._v$&&Ce(o,"fill",l._v$=s),u!==l._v$2&&Ce(i,"fill",l._v$2=u),l},{_v$:void 0,_v$2:void 0}),r})()},Jw={m:"8px",s:"4px",none:"0"},Xw={m:"16px",s:"8px",none:"0"},e9=W.div` - width: 256px; - box-shadow: 0 4px 24px rgba(0, 0, 0, 0.16); - border-radius: ${e=>Xw[e.theme.borderRadius]}; - - background-color: ${e=>e.theme.colors.background.primary} - - color: ${e=>e.theme.colors.text.primary} -`,t9=W.ul` - background-color: ${e=>e.theme.colors.background.primary}; - padding: 8px; -`,L4=W.button` - display: flex; - align-items: center; - gap: 8px; - height: 40px; - padding-left: 8px; - width: 100%; - - background-color: ${e=>e.theme.colors.background.primary}; - border: none; - border-radius: ${e=>Jw[e.theme.borderRadius]}; - cursor: pointer; - - transition: background-color, transform 0.1s ease-in-out; - - &:hover { - background-color: ${e=>e.theme.colors.background.secondary}; - } - - &:active { - transform: scale(0.96); - } -`,R4=Ye("
  • "),Nc=e=>m(Fn,{get translationKey(){return e.translationKey},fontSize:"15px",fontWeight:"590",get children(){return e.children}}),n9=e=>{const t=Cn(Po),[n,r]=Ae(!1),o=()=>ut(void 0,null,function*(){const l=ud(t.account.address,t.account.chain===Ha.TESTNET);yield bd(l),r(!0),setTimeout(()=>r(!1),1e3)}),i=()=>{t.disconnect(),e.onClose()};return m(e9,{ref(l){const s=e.ref;typeof s=="function"?s(l):e.ref=l},get class(){return e.class},"data-tc-dropdown":"true",get children(){return m(t9,{get children(){return[(()=>{const l=R4.cloneNode(!0);return gn(l,m(L4,{onClick:()=>o(),get children(){return[m(Gw,{}),m(Pe,{get when(){return!n()},get children(){return m(Nc,{translationKey:"button.dropdown.copy",children:"Copy address"})}}),m(Pe,{get when(){return n()},get children(){return m(Nc,{translationKey:"button.dropdown.copied",children:"Address copied!"})}})]}})),l})(),(()=>{const l=R4.cloneNode(!0);return gn(l,m(L4,{onClick:()=>i(),get children(){return[m(Zw,{}),m(Nc,{translationKey:"button.dropdown.disconnect",children:"Disconnect"})]}})),l})()]}})}})},r9={m:"16px",s:"8px",none:"0"},o9=W.div` - width: 256px; - padding: 12px 16px; - display: flex; - gap: 9px; - - background-color: ${e=>e.theme.colors.background.primary}; - box-shadow: 0 4px 24px rgba(0, 0, 0, 0.16); - border-radius: ${e=>r9[e.theme.borderRadius]}; -`,i9=W.div` - width: 192px; - - > h3 { - font-size: 15px; - } -`,l9=W(Fn)` - margin-top: 4px; - color: ${e=>e.theme.colors.text.secondary}; -`,kd=e=>{const t=Es(e);return m(o9,Cr({get class(){return e.class},"data-tc-notification":"true"},t,{get children(){return[m(i9,{get children(){return[m(Sd,{get translationKey(){return e.header.translationKey},get translationValues(){return e.header.translationValues},get children(){return e.children}}),m(Pe,{get when(){return e.text},get children(){return m(l9,{get translationKey(){return e.text.translationKey},get translationValues(){return e.text.translationValues}})}})]}}),ue(()=>e.icon)]}}))},s9=W(Zr)` - align-self: center; -`,a9=e=>{const t=Cn(Po),[n]=kr(),r=()=>t.wallet&&"name"in t.wallet?t.wallet.name:n("common.yourWallet",{},"Your wallet");return m(kd,{get header(){return{translationKey:"notifications.confirm.header",translationValues:{name:r()}}},get class(){return e.class},get icon(){return m(s9,{})},"data-tc-notification-confirm":"true",children:"Confirm operation in your wallet"})},u9=W(Wu)` - margin-top: 2px; -`,c9=e=>m(kd,{header:{translationKey:"notifications.transactionCanceled.header"},text:{translationKey:"notifications.transactionCanceled.text"},get icon(){return m(u9,{size:"xs"})},get class(){return e.class},"data-tc-notification-tx-cancelled":"true",children:"Transaction cancelled"}),f9=W(Ed)` - margin-top: 2px; -`,d9=e=>m(kd,{header:{translationKey:"notifications.transactionSent.header"},text:{translationKey:"notifications.transactionSent.text"},get icon(){return m(f9,{})},get class(){return e.class},"data-tc-notification-tx-sent":"true",children:"Transaction sent"}),$c=Kr` - transform: translateY(-8px); - margin-bottom: 12px; -`,h9={timeout:4500},[P4,g9]=Ae(null);function p9(e){const{timeout:t}=ht(ht({},h9),e),[n,r]=Ae([]),[o,i]=Ae([]);return Xt(C6($r,l=>{var s;if(!l||!l.showNotification||P4()===l||((s=P4())==null?void 0:s.name)==="confirm-transaction"&&l.name==="confirm-transaction")return;g9(l),r(f=>f.filter(g=>g.action!=="confirm-transaction"));const u={action:l.name};r(f=>[...f,u]);const c=setTimeout(()=>{r(f=>f.filter(g=>g!==u)),i(f=>f.filter(g=>g!==c))},t);i(f=>[...f,c])})),xn(()=>{o().forEach(l=>clearTimeout(l))}),n}const m9=Ye('
    '),v9=e=>{const t=p9();return(()=>{const n=m9.cloneNode(!0);return gn(n,m(ny,{onBeforeEnter:r=>{vr(r,[{opacity:0,transform:"translateY(0)"},{opacity:1,transform:"translateY(-8px)"}],{duration:200})},onExit:(r,o)=>{vr(r,[{opacity:1,transform:"translateY(-8px)"},{opacity:0,transform:"translateY(-30px)"}],{duration:200}).finished.then(o)},get children(){return m(ws,{get each(){return t()},children:r=>m(xs,{get children(){return[m(nn,{get when(){return r.action==="transaction-sent"},get children(){return m(d9,{class:$c})}}),m(nn,{get when(){return r.action==="transaction-canceled"},get children(){return m(c9,{class:$c})}}),m(nn,{get when(){return r.action==="confirm-transaction"},get children(){return m(a9,{class:$c})}})]}})})}})),Qe(()=>dd(n,e.class)),n})()},Ig=W(jt)` - background-color: ${e=>e.theme.colors.connectButton.background}; - color: ${e=>e.theme.colors.connectButton.foreground}; - box-shadow: ${e=>`0 4px 24px ${Cs(e.theme.colors.constant.black,.16)}`}; - padding: 8px 16px 8px 12px; - - display: flex; - align-items: center; - gap: 4px; - height: 40px; -`,y9=W(Ig)` - padding: 12px 16px; - min-width: 148px; - justify-content: center; - background-color: ${e=>e.theme.colors.background.primary}; -`,w9=W(jt)` - min-width: 148px; - height: 40px; - - background-color: ${e=>e.theme.colors.background.primary}; - color: ${e=>e.theme.colors.connectButton.foreground}; - box-shadow: ${e=>`0 4px 24px ${Cs(e.theme.colors.constant.black,.16)}`}; - - display: flex; - align-items: center; - justify-content: center; -`,x9=W(Zr)` - height: 18px; - width: 18px; -`,C9=W.div` - width: fit-content; - display: flex; - flex-direction: column; - align-items: flex-end; -`,b9=W(n9)` - box-sizing: border-box; - overflow: hidden; - margin-top: 12px; -`,S9=W(v9)` - > div:first-child { - margin-top: 20px; - } -`;function Bg(e){return e.split("-")[0]}function E9(e){return e.split("-")[1]}function k9(e){return["top","bottom"].includes(Bg(e))?"x":"y"}function _9(e){return e==="y"?"height":"width"}function M4(e,t,n){let{reference:r,floating:o}=e;const i=r.x+r.width/2-o.width/2,l=r.y+r.height/2-o.height/2,s=k9(t),u=_9(s),c=r[u]/2-o[u]/2,f=Bg(t),g=s==="x";let h;switch(f){case"top":h={x:i,y:r.y-o.height};break;case"bottom":h={x:i,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:l};break;case"left":h={x:r.x-o.width,y:l};break;default:h={x:r.x,y:r.y}}switch(E9(t)){case"start":h[s]-=c*(n&&g?-1:1);break;case"end":h[s]+=c*(n&&g?-1:1);break}return h}const A9=(e,t,n)=>ut(void 0,null,function*(){const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,s=i.filter(Boolean),u=yield l.isRTL==null?void 0:l.isRTL(t);if({}.NODE_ENV!=="production"){if(l==null&&console.error(["Floating UI: `platform` property was not passed to config. If you","want to use Floating UI on the web, install @floating-ui/dom","instead of the /core package. Otherwise, you can create your own","`platform`: https://floating-ui.com/docs/platform"].join(" ")),s.filter(S=>{let{name:P}=S;return P==="autoPlacement"||P==="flip"}).length>1)throw new Error(["Floating UI: duplicate `flip` and/or `autoPlacement` middleware","detected. This will lead to an infinite loop. Ensure only one of","either has been passed to the `middleware` array."].join(" "));(!e||!t)&&console.error(["Floating UI: The reference and/or floating element was not defined","when `computePosition()` was called. Ensure that both elements have","been created and can be measured."].join(" "))}let c=yield l.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:g}=M4(c,r,u),h=r,b={},y=0;for(let S=0;S50&&console.warn(["Floating UI: The middleware lifecycle appears to be running in an","infinite loop. This is usually caused by a `reset` continually","being returned without a break condition."].join(" ")),A&&y<=50){y++,typeof A=="object"&&(A.placement&&(h=A.placement),A.rects&&(c=A.rects===!0?yield l.getElementRects({reference:e,floating:t,strategy:o}):A.rects),{x:f,y:g}=M4(c,h,u)),S=-1;continue}}return{x:f,y:g,placement:h,strategy:o,middlewareData:b}});function N4(e){return Un(ht({},e),{top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height})}function Jr(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Sr(e){return Jr(e).getComputedStyle(e)}function ko(e){return Ug(e)?(e.nodeName||"").toLowerCase():""}let Xs;function Og(){if(Xs)return Xs;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(Xs=e.brands.map(t=>t.brand+"/"+t.version).join(" "),Xs):navigator.userAgent}function Er(e){return e instanceof Jr(e).HTMLElement}function Zn(e){return e instanceof Jr(e).Element}function Ug(e){return e instanceof Jr(e).Node}function $4(e){if(typeof ShadowRoot>"u")return!1;const t=Jr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Hu(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Sr(e);return/auto|scroll|overlay|hidden/.test(t+r+n)&&!["inline","contents"].includes(o)}function T9(e){return["table","td","th"].includes(ko(e))}function _d(e){const t=/firefox/i.test(Og()),n=Sr(e),r=n.backdropFilter||n.WebkitBackdropFilter;return n.transform!=="none"||n.perspective!=="none"||(r?r!=="none":!1)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)||["transform","perspective"].some(o=>n.willChange.includes(o))||["paint","layout","strict","content"].some(o=>{const i=n.contain;return i!=null?i.includes(o):!1})}function Dg(){return!/^((?!chrome|android).)*safari/i.test(Og())}function Ad(e){return["html","body","#document"].includes(ko(e))}const I4=Math.min,Ul=Math.max,B4=Math.round,X0={x:1,y:1};function fs(e){const t=!Zn(e)&&e.contextElement?e.contextElement:Zn(e)?e:null;if(!t)return X0;const n=t.getBoundingClientRect(),r=Sr(t);if(r.boxSizing!=="border-box")return Er(t)?{x:t.offsetWidth>0&&B4(n.width)/t.offsetWidth||1,y:t.offsetHeight>0&&B4(n.height)/t.offsetHeight||1}:X0;let o=n.width/parseFloat(r.width),i=n.height/parseFloat(r.height);return(!o||!Number.isFinite(o))&&(o=1),(!i||!Number.isFinite(i))&&(i=1),{x:o,y:i}}function _o(e,t,n,r){var o,i,l,s;t===void 0&&(t=!1),n===void 0&&(n=!1);const u=e.getBoundingClientRect();let c=X0;t&&(r?Zn(r)&&(c=fs(r)):c=fs(e));const f=Zn(e)?Jr(e):window,g=!Dg()&&n,h=(u.left+(g&&(o=(i=f.visualViewport)==null?void 0:i.offsetLeft)!=null?o:0))/c.x,b=(u.top+(g&&(l=(s=f.visualViewport)==null?void 0:s.offsetTop)!=null?l:0))/c.y,y=u.width/c.x,S=u.height/c.y;return{width:y,height:S,top:b,right:h+y,bottom:b+S,left:h,x:h,y:b}}function Mo(e){return((Ug(e)?e.ownerDocument:e.document)||window.document).documentElement}function zu(e){return Zn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function jg(e){return _o(Mo(e)).left+zu(e).scrollLeft}function L9(e,t,n){const r=Er(t),o=Mo(t),i=_o(e,!0,n==="fixed",t);let l={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((ko(t)!=="body"||Hu(o))&&(l=zu(t)),Er(t)){const u=_o(t,!0);s.x=u.x+t.clientLeft,s.y=u.y+t.clientTop}else o&&(s.x=jg(o));return{x:i.left+l.scrollLeft-s.x,y:i.top+l.scrollTop-s.y,width:i.width,height:i.height}}function ds(e){if(ko(e)==="html")return e;const t=e.assignedSlot||e.parentNode||($4(e)?e.host:null)||Mo(e);return $4(t)?t.host:t}function O4(e){return!Er(e)||Sr(e).position==="fixed"?null:e.offsetParent}function R9(e){let t=ds(e);for(;Er(t)&&!Ad(t);){if(_d(t))return t;t=ds(t)}return null}function U4(e){const t=Jr(e);let n=O4(e);for(;n&&T9(n)&&Sr(n).position==="static";)n=O4(n);return n&&(ko(n)==="html"||ko(n)==="body"&&Sr(n).position==="static"&&!_d(n))?t:n||R9(e)||t}function P9(e){if(Er(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=_o(e);return{width:t.width,height:t.height}}function M9(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=Er(n),i=Mo(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0},s={x:1,y:1};const u={x:0,y:0};if((o||!o&&r!=="fixed")&&((ko(n)!=="body"||Hu(i))&&(l=zu(n)),Er(n))){const c=_o(n);s=fs(n),u.x=c.x+n.clientLeft,u.y=c.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-l.scrollLeft*s.x+u.x,y:t.y*s.y-l.scrollTop*s.y+u.y}}function N9(e,t){const n=Jr(e),r=Mo(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,s=0,u=0;if(o){i=o.width,l=o.height;const c=Dg();(c||!c&&t==="fixed")&&(s=o.offsetLeft,u=o.offsetTop)}return{width:i,height:l,x:s,y:u}}function $9(e){var t;const n=Mo(e),r=zu(e),o=(t=e.ownerDocument)==null?void 0:t.body,i=Ul(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),l=Ul(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let s=-r.scrollLeft+jg(e);const u=-r.scrollTop;return Sr(o||n).direction==="rtl"&&(s+=Ul(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:l,x:s,y:u}}function Fg(e){const t=ds(e);return Ad(t)?e.ownerDocument.body:Er(t)&&Hu(t)?t:Fg(t)}function Dl(e,t){var n;t===void 0&&(t=[]);const r=Fg(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=Jr(r);return o?t.concat(i,i.visualViewport||[],Hu(r)?r:[]):t.concat(r,Dl(r))}function I9(e,t){const n=_o(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Er(e)?fs(e):{x:1,y:1},l=e.clientWidth*i.x,s=e.clientHeight*i.y,u=o*i.x,c=r*i.y;return{top:c,left:u,right:u+l,bottom:c+s,x:u,y:c,width:l,height:s}}function D4(e,t,n){return t==="viewport"?N4(N9(e,n)):Zn(t)?I9(t,n):N4($9(Mo(e)))}function B9(e,t){const n=t.get(e);if(n)return n;let r=Dl(e).filter(s=>Zn(s)&&ko(s)!=="body"),o=null;const i=Sr(e).position==="fixed";let l=i?ds(e):e;for(;Zn(l)&&!Ad(l);){const s=Sr(l),u=_d(l);(i?!u&&!o:!u&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position))?r=r.filter(f=>f!==l):o=s,l=ds(l)}return t.set(e,r),r}function O9(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const l=[...n==="clippingAncestors"?B9(t,this._c):[].concat(n),r],s=l[0],u=l.reduce((c,f)=>{const g=D4(t,f,o);return c.top=Ul(g.top,c.top),c.right=I4(g.right,c.right),c.bottom=I4(g.bottom,c.bottom),c.left=Ul(g.left,c.left),c},D4(t,s,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}const U9={getClippingRect:O9,convertOffsetParentRelativeRectToViewportRelativeRect:M9,isElement:Zn,getDimensions:P9,getOffsetParent:U4,getDocumentElement:Mo,getScale:fs,getElementRects(e){return ut(this,null,function*(){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||U4,i=this.getDimensions;return{reference:L9(t,yield o(n),r),floating:ht({x:0,y:0},yield i(n))}})},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Sr(e).direction==="rtl"};function D9(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:l=!0,animationFrame:s=!1}=r,u=o&&!s,c=u||i?[...Zn(e)?Dl(e):e.contextElement?Dl(e.contextElement):[],...Dl(t)]:[];c.forEach(y=>{u&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});let f=null;if(l){let y=!0;f=new ResizeObserver(()=>{y||n(),y=!1}),Zn(e)&&!s&&f.observe(e),!Zn(e)&&e.contextElement&&!s&&f.observe(e.contextElement),f.observe(t)}let g,h=s?_o(e):null;s&&b();function b(){const y=_o(e);h&&(y.x!==h.x||y.y!==h.y||y.width!==h.width||y.height!==h.height)&&n(),h=y,g=requestAnimationFrame(b)}return n(),()=>{var y;c.forEach(S=>{u&&S.removeEventListener("scroll",n),i&&S.removeEventListener("resize",n)}),(y=f)==null||y.disconnect(),f=null,s&&cancelAnimationFrame(g)}}const j9=(e,t,n)=>{const r=new Map,o=ht({platform:U9},n),i=Un(ht({},o.platform),{_c:r});return A9(e,t,Un(ht({},o),{platform:i}))};function F9(e,t,n){let r=()=>{var g;return(g=n==null?void 0:n.placement)!=null?g:"bottom"},o=()=>{var g;return(g=n==null?void 0:n.strategy)!=null?g:"absolute"},[i,l]=Ae({x:null,y:null,placement:r(),strategy:o(),middlewareData:{}}),[s,u]=Ae();Xt(()=>{let g=s();if(g)throw g.value});let c=ue(()=>(e(),t(),{}));function f(){let g=e(),h=t();if(g&&h){let b=c();j9(g,h,{middleware:n==null?void 0:n.middleware,placement:r(),strategy:o()}).then(y=>{b===c()&&l(y)},y=>{u(y)})}}return Xt(()=>{let g=e(),h=t();if(n==null||n.middleware,r(),o(),g&&h)if(n!=null&&n.whileElementsMounted){let b=n.whileElementsMounted(g,h,f);b&&xn(b)}else f()}),{get x(){return i().x},get y(){return i().y},get placement(){return i().placement},get strategy(){return i().strategy},get middlewareData(){return i().middlewareData},update:f}}const W9=Ye(''),H9=()=>{const e=xt(),t=Cn(Ji),n=Cn(Po),[r,o]=Ae(!1),[i,l]=Ae(t.account),[s,u]=Ae(!t.account);let c;const[f,g]=Ae(),[h,b]=Ae(),y=F9(h,f,{whileElementsMounted:D9,placement:"bottom-end"}),S=()=>{const w=i();if(w){const C=ud(w.address,w.chain===Ha.TESTNET);return C.slice(0,4)+"…"+C.slice(-4)}return""};n.connectionRestored.then(()=>u(!1));const P=t.onStatusChange(w=>{if(!w){o(!1),l(null),u(!1);return}l(w.account),u(!1)}),E=w=>{if(!i()||!r())return;const C=h().contains(w.target),_=c.contains(w.target);!C&&!_&&o(!1)};return b6(()=>{document.body.addEventListener("click",E)}),xn(()=>{document.body.removeEventListener("click",E),P()}),m(Hi,{component:Nr,get children(){return[m(Pe,{get when(){return s()},get children(){return m(w9,{disabled:!0,"data-tc-connect-button-loading":"true",get children(){return m(x9,{})}})}}),m(Pe,{get when(){return!s()},get children(){return[m(Pe,{get when(){return!i()},get children(){return m(Ig,{onClick:()=>n.openModal(),"data-tc-connect-button":"true",scale:"s",get children(){return[m(nw,{get fill(){return e.colors.connectButton.foreground}}),m(Fn,{translationKey:"button.connectWallet",fontSize:"15px",lineHeight:"18px",fontWeight:"590",get color(){return e.colors.connectButton.foreground},children:"Connect wallet"})]}})}}),m(Pe,{get when(){return i()},get children(){return m(C9,{get children(){return[m(y9,{onClick:()=>o(w=>!w),ref:b,"data-tc-dropdown-button":"true",scale:"s",get children(){return[m(Fn,{fontSize:"15px",fontWeight:"590",lineHeight:"18px",get children(){return S()}}),m(Eg,{direction:"bottom"})]}}),m(ag,{get children(){const w=en(()=>document.importNode(W9,!0));return Bl(g,w),w.style.setProperty("z-index","999"),w._$owner=S6(),gn(w,m(Cd,{onBeforeEnter:C=>{vr(C,[{opacity:0,transform:"translateY(-8px)"},{opacity:1,transform:"translateY(0)"}],{duration:150})},onExit:(C,_)=>{vr(C,[{opacity:1,transform:"translateY(0)"},{opacity:0,transform:"translateY(-8px)"}],{duration:150}).finished.then(_)},get children(){return m(Pe,{get when(){return r()},get children(){return m(b9,{get hidden(){return!r()},onClose:()=>o(!1),ref(C){const _=c;typeof _=="function"?_(C):c=C}})}})}}),null),gn(w,m(S9,{}),null),Qe(C=>{var _,A;const I=y.strategy,M=`${(_=y.y)!=null?_:0}px`,T=`${(A=y.x)!=null?A:0}px`;return I!==C._v$&&w.style.setProperty("position",C._v$=I),M!==C._v$2&&w.style.setProperty("top",C._v$2=M),T!==C._v$3&&w.style.setProperty("left",C._v$3=T),C},{_v$:void 0,_v$2:void 0,_v$3:void 0}),w}})]}})}})]}})]}})},Wg=W(_g)` - padding-left: 24px; - padding-right: 24px; - padding-top: 18px; - padding-bottom: 0; - - ${zn("mobile")} { - padding-left: 0; - padding-right: 0; - - min-height: 364px; - } -`,Hg=W(_r)` - margin-top: 12px; - - ${zn("mobile")} { - padding: 0 10px; - } -`,zg=W.div` - margin: 30px 0; - width: 100%; - display: flex; - justify-content: center; - - ${zn("mobile")} { - height: 160px; - align-items: center; - } -`;W(Fn)` - min-width: 84px; - text-align: center; - font-weight: 590; -`;W(Ay)` - margin: 0 auto 22px; -`;const[ot,ea]=yd({buttonRootId:null,language:"en",returnStrategy:"back",twaReturnUrl:void 0,walletsListConfiguration:{},enableAndroidBackHandler:!0});function z9(e){return[...new Set(e)]}function V9(e,t,n){return t.map(r=>{const o=n.find(i=>i[e]===r[e]);return n=n.filter(i=>i[e]!==r[e]),o===void 0?r:o}).concat(n)}function K9(e){return"jsBridgeKey"in e?Un(ht({},e),{injected:ei.isWalletInjected(e.jsBridgeKey),embedded:ei.isInsideWalletBrowser(e.jsBridgeKey)}):e}function Td(e,t){var n;return t&&(n=t.includeWallets)!=null&&n.length&&(e=V9("name",e,t.includeWallets.map(K9))),e}function j4(e){return e.platforms.some(t=>["macos","linux","windows"].includes(t))}function jl(e){return e.platforms.some(t=>["ios","android"].includes(t))}function F4(e){return e.platforms.some(t=>["chrome","firefox","safari"].includes(t))}function so(e,t){return t?e.name.toLowerCase()===t.toLowerCase()||e.appName.toLowerCase()===t.toLowerCase():!1}const q9=W.div` - display: flex; - flex-direction: column; - align-items: center; -`,Q9=W(_r)` - margin-bottom: 18px; -`;W.div` - height: 1px; - margin: 0 -24px; - width: calc(100% + 48px); - opacity: 0.12; - background: ${e=>e.isShown?e.theme.colors.icon.secondary:"transparent"}; - transition: background 0.15s ease-in-out; - - ${zn("mobile")} { - width: 100%; - } -`;const G9=W.ul` - display: grid; - grid-template-columns: repeat(auto-fit, 92px); - grid-template-rows: auto; - align-content: flex-start; - justify-content: center; - row-gap: 8px; - width: 100%; - padding: 0 0 16px; - align-self: flex-start; - max-width: 400px; - margin: 0 auto; - - > li { - display: block; - height: fit-content; - } - - ${zn("mobile")} { - grid-template-columns: repeat(auto-fit, 82px); - } -`;W(jt)` - display: block; - margin: 0 auto 1px; - font-size: 15px; -`;const Y9=W(li)` - position: absolute; - top: 16px; - left: 16px; -`,Z9=W(Ng)` - height: 100%; -`,J9=Ye("
  • "),X9=e=>{const t=()=>Vi()?void 0:510,n=()=>Vi()?e.walletsList.filter(jl):e.walletsList;return m(q9,{"data-tc-wallets-modal-list":"true",get children(){return[m(Y9,{icon:"arrow",onClick:()=>e.onBack()}),m(Q9,{translationKey:"walletModal.wallets",children:"Wallets"}),m($g,{get maxHeight(){return t()},get children(){return m(G9,{get children(){return m(ws,{get each(){return n()},children:r=>(()=>{const o=J9.cloneNode(!0);return gn(o,m(Z9,{wallet:r,onClick:()=>e.onSelect(r)})),o})()})}})}})]}})},e7={m:"16px",s:"12px",none:"0"},t7={m:"6px",s:"6px",none:"0"},n7=W.div` - display: flex; - flex-direction: column; -`,r7=W.div` - flex: 1; - margin-top: ${e=>e.qr?"0":"18px"}; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - min-height: 232px; -`,o7=W(Fu)` - margin-bottom: 24px; -`,i7=W(_r)` - max-width: 288px; - margin: 0 auto 2px; -`,l7=W(Ro)` - max-width: 288px; - text-align: center; - margin: 0 auto 20px; -`,s7=W(li)` - position: absolute; - top: 16px; - left: 16px; -`,Sl=W.div` - display: flex; - justify-content: center; - gap: 8px; - padding-bottom: 16px; -`,a7=W(Sl)` - padding-bottom: 0; -`,Ic=W(jt)` - margin-bottom: 24px; -`,u7=W(Zr)` - margin-bottom: 18px; - margin-top: 2px; -`,c7=W(Wu)` - margin-bottom: 16px; -`,ta=W(Ro)` - color: ${e=>e.theme.colors.text.secondary}; - text-align: center; - margin-bottom: 20px; -`,f7=W(jt)` - margin-top: -8px; - margin-bottom: 24px; - width: 100%; - padding: 12px 12px 12px 20px; - border-radius: ${e=>e7[e.theme.borderRadius]}; - font-size: 16px; - line-height: 20px; -`,d7=W(ii)` - width: 32px; - height: 32px; - border-radius: ${e=>t7[e.theme.borderRadius]}; -`,Yt=e=>{const[t]=kr();return ue(()=>{var n;return t(e.translationKey,e.translationValues,(n=e.children)==null?void 0:n.toString())})};function pt(e,t){let n;typeof t=="string"?n=t:n=qr()?t.twaReturnUrl||t.returnStrategy:"none";const r=h7(e,"ret",n);if(!zo(e))return r;const o=r.slice(r.lastIndexOf("&")+1);return r.slice(0,r.lastIndexOf("&"))+"-"+R3(o)}function _s(e,t){t=ht({},t);const n=g7(e),r=new URL(n);if(r.searchParams.has("startapp")||r.searchParams.append("startapp","tonconnect"),qr())Or("ios","android","macos")?(t.returnStrategy="back",t.twaReturnUrl=void 0,Cl(pt(r.toString(),t))):Or("tdesktop")||Or("weba")?Cl(pt(r.toString(),t)):Or("web")?(t.returnStrategy="back",t.twaReturnUrl=void 0,Cl(pt(r.toString(),t))):St(pt(r.toString(),t));else if(mr("ios")){t.returnStrategy==="back"&&(Ke("safari")?t.returnStrategy="back":Ke("chrome")?t.returnStrategy="googlechrome://":Ke("firefox")?t.returnStrategy="firefox://":Ke("opera")?t.returnStrategy="opera-http://":t.returnStrategy=location.href);const o=Ke("chrome"),i=Ke("firefox");if((o||i)&&!t.forceRedirect){const s=pt(r.toString(),t.returnStrategy),u=na(s);co(u,()=>St(s))}else{const s=pt(r.toString(),t.returnStrategy);St(s)}}else if(mr("android")){t.returnStrategy="none";const o=Ke("chrome"),i=Ke("firefox");if((o||i)&&!t.forceRedirect){const s=pt(r.toString(),t.returnStrategy),u=na(s);co(u,()=>St(s))}else{const s=pt(r.toString(),t.returnStrategy);St(s)}}else if(mr("ipad")){t.returnStrategy==="back"&&(Ke("safari")?t.returnStrategy="back":Ke("chrome")?t.returnStrategy="googlechrome://":Ke("firefox")?t.returnStrategy="firefox://":Ke("opera")?t.returnStrategy="opera-http://":t.returnStrategy=location.href);const o=Ke("chrome"),i=Ke("firefox");if((o||i)&&!t.forceRedirect){const s=pt(r.toString(),t.returnStrategy),u=na(s);co(u,()=>St(s))}else{const s=pt(r.toString(),t.returnStrategy);St(s)}}else if(mr("macos","windows","linux"))if(t.returnStrategy="none",t.twaReturnUrl=void 0,t.forceRedirect)St(pt(r.toString(),t));else{const o=pt(r.toString(),t),i=na(o);co(i,()=>St(o))}else St(pt(r.toString(),t))}function As(e,t,n,r){if(n=ht({},n),qr())if(Or("ios","android")){n.returnStrategy==="back"&&(n.returnStrategy="tg://resolve"),r("universal-link");const o=pt(e,n.returnStrategy);Cl(o,()=>{r("universal-link"),St(o)})}else if(Or("macos","tdesktop")){n.returnStrategy==="back"&&(n.returnStrategy="tg://resolve");const o=pt(e,n.returnStrategy);!!t&&!n.forceRedirect?(r("custom-deeplink"),co(Zs(o,t),()=>{r("universal-link"),St(o)})):(r("universal-link"),St(o))}else if(Or("weba")){n.returnStrategy==="back"&&(Ke("safari")?n.returnStrategy=location.href:Ke("chrome")?n.returnStrategy="googlechrome://":Ke("firefox")?n.returnStrategy="firefox://":Ke("opera")?n.returnStrategy="opera-http://":n.returnStrategy=location.href);const o=pt(e,n.returnStrategy);!!t&&!n.forceRedirect?(r("custom-deeplink"),co(Zs(o,t),()=>{r("universal-link"),St(o)})):(r("universal-link"),St(o))}else if(Or("web")){n.returnStrategy==="back"&&(Ke("safari")?n.returnStrategy=location.href:Ke("chrome")?n.returnStrategy="googlechrome://":Ke("firefox")?n.returnStrategy="firefox://":Ke("opera")?n.returnStrategy="opera-http://":n.returnStrategy=location.href);const o=pt(e,n.returnStrategy);!!t&&!n.forceRedirect?(r("custom-deeplink"),co(Zs(o,t),()=>{r("universal-link"),St(o)})):(r("universal-link"),St(o))}else{r("universal-link");const o=pt(e,n.returnStrategy);St(o)}else if(mr("ios"))n.returnStrategy==="back"&&(Ke("safari")?n.returnStrategy="none":Ke("chrome")?n.returnStrategy="googlechrome://":Ke("firefox")?n.returnStrategy="firefox://":Ke("opera")?n.returnStrategy="opera-http://":n.returnStrategy=location.href),Ke("chrome")?(r("universal-link"),Xa(pt(e,n.returnStrategy),"_self")):(r("universal-link"),St(pt(e,n.returnStrategy)));else if(mr("android"))n.returnStrategy==="back"&&(Ke("chrome")?n.returnStrategy="googlechrome://":Ke("firefox")?n.returnStrategy="firefox://":Ke("opera")?n.returnStrategy="opera-http://":n.returnStrategy=location.href),r("universal-link"),St(pt(e,n.returnStrategy));else if(mr("ipad"))n.returnStrategy==="back"&&(Ke("safari")?n.returnStrategy="none":Ke("chrome")?n.returnStrategy="googlechrome://":Ke("firefox")?n.returnStrategy="firefox://":Ke("opera")?n.returnStrategy="opera-http://":n.returnStrategy=location.href),Ke("chrome")?(r("universal-link"),Xa(pt(e,n.returnStrategy),"_self")):(r("universal-link"),St(pt(e,n.returnStrategy)));else if(mr("macos","windows","linux")){n.returnStrategy==="back"&&(Ke("safari")?n.returnStrategy="none":Ke("chrome")?n.returnStrategy="googlechrome://":Ke("firefox")?n.returnStrategy="firefox://":Ke("opera")?n.returnStrategy="opera-http://":n.returnStrategy="none");const o=pt(e,n.returnStrategy);!!t&&!n.forceRedirect?(r("custom-deeplink"),co(Zs(o,t),()=>{r("universal-link"),St(o)})):(r("universal-link"),St(o))}else r("universal-link"),St(pt(e,n.returnStrategy))}function h7(e,t,n){const r=new URL(e);return r.searchParams.append(t,n),r.toString()}function g7(e){const t=new URL(e);return t.searchParams.has("attach")&&(t.searchParams.delete("attach"),t.pathname+="/start"),t.toString()}function na(e){const t=new URL(e),[,n,r]=t.pathname.split("/"),o=t.searchParams.get("startapp");return`tg://resolve?domain=${n}&appname=${r}&startapp=${o}`}const Vg=e=>{const[t,n]=Ae("mobile"),[r,o]=Ae(!1),[i,l]=Ae(),[s,u]=Ae(!0),c=Cn(Ji),f=c.onStatusChange(()=>{},()=>{e.wallet.appName!==Fr&&o(!0)});xn(f);const g=()=>{try{const P=c.connect({universalLink:e.wallet.universalLink,bridgeUrl:e.wallet.bridgeUrl},e.additionalRequest);l(P)}catch{}};Xt(()=>{en(t)!=="extension"&&(jl(e.wallet)||j4(e.wallet))&&g()});const h=()=>{o(!1),t()==="extension"&&g(),n("mobile"),rn(Un(ht({},e.wallet),{openMethod:"qrcode"}))},b=()=>{o(!1),t()==="extension"&&g(),n("desktop");const P=!s();u(!1),As(i(),e.wallet.deepLink,{returnStrategy:ot.returnStrategy,forceRedirect:P},E=>{rn(Un(ht({},e.wallet),{openMethod:E}))})},y=()=>{const P=!s();u(!1),rn(Un(ht({},e.wallet),{openMethod:"universal-link"})),_s(i(),{returnStrategy:ot.returnStrategy,twaReturnUrl:ot.twaReturnUrl,forceRedirect:P})},S=()=>{o(!1),n("extension"),Vo(e.wallet)&&(rn(e.wallet),c.connect({jsBridgeKey:e.wallet.jsBridgeKey},e.additionalRequest))};return jl(e.wallet)?h():F4(e.wallet)?S():b(),m(n7,{"data-tc-wallets-modal-connection-desktop":"true",get children(){return[m(Pe,{get when(){return!e.backDisabled},get children(){return m(s7,{icon:"arrow",onClick:()=>e.onBackClick()})}}),m(i7,{get children(){return e.wallet.name}}),m(Pe,{get when(){return t()==="mobile"},get children(){return m(l7,{translationKey:"walletModal.desktopConnectionModal.scanQR",get translationValues(){return{name:e.wallet.name}},get children(){return["Scan the QR code below with your phone’s or ",ue(()=>e.wallet.name),"’s camera"]}})}}),m(r7,{get qr(){return t()==="mobile"},get children(){return m(xs,{get children(){return[m(nn,{get when(){return t()==="mobile"},get children(){return m(o7,{disableCopy:!1,get sourceUrl(){return pt(i(),"none")},get imageUrl(){return e.wallet.imageUrl}})}}),m(nn,{get when(){return r()},get children(){return[m(c7,{size:"s"}),m(ta,{translationKey:"walletModal.desktopConnectionModal.connectionDeclined",children:"Connection declined"}),m(Sl,{get children(){return m(jt,{get leftIcon(){return m(Ol,{})},get onClick(){return t()==="extension"?S:b},get children(){return m(Yt,{translationKey:"common.retry",children:"Retry"})}})}})]}}),m(nn,{get when(){return t()==="extension"},get children(){return[m(Pe,{get when(){return Vo(e.wallet)},get children(){return[m(u7,{size:"s"}),m(ta,{translationKey:"walletModal.desktopConnectionModal.continueInExtension",get translationValues(){return{name:e.wallet.name}},get children(){return["Continue in ",ue(()=>e.wallet.name)," browser extension…"]}}),m(Sl,{get children(){return m(jt,{get leftIcon(){return m(Ol,{})},onClick:S,get children(){return m(Yt,{translationKey:"common.retry",children:"Retry"})}})}})]}}),m(Pe,{get when(){return!Vo(e.wallet)},get children(){return[m(ta,{translationKey:"walletModal.desktopConnectionModal.dontHaveExtension",get translationValues(){return{name:e.wallet.name}},get children(){return["Seems you don't have installed ",ue(()=>e.wallet.name)," browser extension"]}}),m(Sl,{get children(){return m(au,{get href(){return e.wallet.aboutUrl},blank:!0,get children(){return m(jt,{get rightIcon(){return m(T4,{})},onClick:S,get children(){return m(Yt,{translationKey:"walletModal.desktopConnectionModal.getWallet",get translationValues(){return{name:e.wallet.name}},get children(){return["Get ",ue(()=>e.wallet.name)]}})}})}})}})]}})]}}),m(nn,{get when(){return t()==="desktop"},get children(){return[m(Zr,{size:"m"}),m(ta,{translationKey:"walletModal.desktopConnectionModal.continueOnDesktop",get translationValues(){return{name:e.wallet.name}},get children(){return["Continue in ",ue(()=>e.wallet.name)," on desktop…"]}}),m(Sl,{get children(){return[m(jt,{get leftIcon(){return m(Ol,{})},onClick:b,get children(){return m(Yt,{translationKey:"common.retry",children:"Retry"})}}),m(au,{get href(){return e.wallet.aboutUrl},blank:!0,get children(){return m(jt,{get rightIcon(){return m(T4,{})},get children(){return m(Yt,{translationKey:"walletModal.desktopConnectionModal.getWallet",get translationValues(){return{name:e.wallet.name}},get children(){return["Get ",ue(()=>e.wallet.name)]}})}})}})]}})]}})]}})}}),m(Pe,{get when(){return e.wallet.appName===Fr},get children(){return m(f7,{get rightIcon(){return m(d7,{get src(){return ks.TG}})},scale:"s",onClick:y,get children(){return m(Yt,{translationKey:"walletModal.desktopConnectionModal.openWalletOnTelegram",children:"Open Wallet in Telegram on desktop"})}})}}),m(Pe,{get when(){return e.wallet.appName!==Fr},get children(){return m(a7,{get children(){return[m(Pe,{get when(){return ue(()=>t()!=="mobile")()&&jl(e.wallet)},get children(){return m(Ic,{appearance:"secondary",get leftIcon(){return m(ww,{})},onClick:h,get children(){return m(Yt,{translationKey:"common.mobile",children:"Mobile"})}})}}),m(Pe,{get when(){return ue(()=>t()!=="extension")()&&F4(e.wallet)},get children(){return m(Ic,{appearance:"secondary",get leftIcon(){return m(vw,{})},onClick:S,get children(){return m(Yt,{translationKey:"common.browserExtension",children:"Browser Extension"})}})}}),m(Pe,{get when(){return ue(()=>t()!=="desktop")()&&j4(e.wallet)},get children(){return m(Ic,{appearance:"secondary",get leftIcon(){return m(Cw,{})},onClick:b,get children(){return m(Yt,{translationKey:"common.desktop",children:"Desktop"})}})}})]}})}})]}})},p7=W.div``,m7=W(li)` - position: absolute; - top: 16px; - left: 16px; -`,v7=W(_r)` - margin-bottom: 18px; -`,Bc=W.div` - padding: 16px 0; - display: flex; - flex-direction: column; - align-items: center; -`,Oc=Kr` - margin-bottom: 12px; -`,Uc=W(Sd)` - text-align: center; - margin-bottom: 4px; -`,Dc=W(Fn)` - text-align: center; - max-width: 352px; - color: ${e=>e.theme.colors.text.secondary}; -`,y7=W.div` - padding: 16px 24px 24px; - display: flex; - align-items: center; - justify-content: center; - gap: 8px; -`,w7={GET_A_WALLET:"https://ton.org/wallets?filters[wallet_features][slug][$in]=dapp-auth&pagination[limit]=-1"},Kg=e=>m(p7,{"data-tc-wallets-modal-info":"true",get children(){return[m(m7,{icon:"arrow",onClick:()=>e.onBackClick()}),m(v7,{translationKey:"walletModal.infoModal.whatIsAWallet",children:"What is a wallet"}),m($g,{get children(){return[m(Bc,{get children(){return[m(Aw,{class:Oc}),m(Uc,{translationKey:"walletModal.infoModal.secureDigitalAssets",children:"Secure digital assets storage"}),m(Dc,{translationKey:"walletModal.infoModal.walletProtects",children:"A wallet protects and manages your digital assets including TON, tokens and collectables."})]}}),m(Bc,{get children(){return[m(Lw,{class:Oc}),m(Uc,{translationKey:"walletModal.infoModal.controlIdentity",children:"Control your Web3 identity"}),m(Dc,{translationKey:"walletModal.infoModal.manageIdentity",children:"Manage your digital identity and access decentralized applications with ease. Maintain control over your data and engage securely in the blockchain ecosystem."})]}}),m(Bc,{get children(){return[m(Pw,{class:Oc}),m(Uc,{translationKey:"walletModal.infoModal.effortlessCryptoTransactions",children:"Effortless crypto transactions"}),m(Dc,{translationKey:"walletModal.infoModal.easilySend",children:"Easily send, receive, monitor your cryptocurrencies. Streamline your operations with decentralized applications."})]}}),m(y7,{get children(){return m(au,{get href(){return w7.GET_A_WALLET},blank:!0,get children(){return m(jt,{get rightIcon(){return m(kw,{})},get children(){return m(Yt,{translationKey:"walletModal.infoModal.getAWallet",children:"Get a Wallet"})}})}})}})]}})]}}),x7=W.div``,C7=W.div` - flex: 1; - margin-top: 18px; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - min-height: 232px; -`,b7=W(_r)` - max-width: 262px; - margin: 0 auto 8px; -`,S7=W(li)` - position: absolute; - top: 16px; - left: 16px; -`,E7=W.div` - padding: 16px; - display: flex; - align-items: center; - gap: 12px; - border-top: 0.5px solid ${e=>Cs(e.theme.colors.icon.secondary,.2)}; -`,k7=W(ii)` - width: 36px; - height: 36px; - border-radius: 10px; -`,_7=W(au)` - margin-left: auto; -`,A7=W(Zr)` - margin-bottom: 18px; - margin-top: 2px; -`,T7=W(Wu)` - margin-bottom: 16px; -`,W4=W(Ro)` - color: ${e=>e.theme.colors.text.secondary}; - text-align: center; - margin-bottom: 20px; -`,H4=W.div` - display: flex; - justify-content: center; - gap: 8px; - padding-bottom: 16px; -`,L7=W(_r)` - margin-bottom: 2px; - padding: 0 64px; -`,R7=W(Ro)` - margin-bottom: 20px; - padding: 0 64px; - min-height: 44px; -`,P7=W.div` - padding: 0 24px 24px; -`,M7=e=>[m(L7,{get children(){return e.walletInfo.name}}),m(R7,{translationKey:"walletModal.mobileConnectionModal.scanQR",get translationValues(){return{name:e.walletInfo.name}},get children(){return["Scan the QR code below with your phone’s or ",ue(()=>e.walletInfo.name),"’s camera"]}}),m(P7,{get children(){return m(Fu,{get imageUrl(){return e.walletInfo.imageUrl},get sourceUrl(){return pt(e.universalLink,"none")},disableCopy:!0})}})],qg=e=>{const t=xt(),[n,r]=Ae(!0),[o,i]=Ae(!1),[l,s]=Ae(!1),u=Cn(Ji),c=u.onStatusChange(()=>{},()=>{s(!0)}),f=ue(()=>u.connect({universalLink:e.wallet.universalLink,bridgeUrl:e.wallet.bridgeUrl},e.additionalRequest)),g=()=>{rn(Un(ht({},e.wallet),{openMethod:"universal-link"})),_s(f(),{returnStrategy:ot.returnStrategy,twaReturnUrl:ot.twaReturnUrl,forceRedirect:!0})},h=()=>{const P=f();if(zo(P))return g();s(!1);const E=!n();r(!1),As(f(),e.wallet.deepLink,{returnStrategy:ot.returnStrategy,forceRedirect:E},w=>{rn(Un(ht({},e.wallet),{openMethod:w}))})},b=()=>{s(!1),i(!0),rn(Un(ht({},e.wallet),{openMethod:"qrcode"}))},y=()=>{i(!1),rn(Un(ht({},e.wallet),{openMethod:"universal-link"}))},S=()=>{o()?y():e.onBackClick()};return xn(c),h(),m(x7,{"data-tc-wallets-modal-connection-mobile":"true",get children(){return[m(Pe,{get when(){return!e.backDisabled||o()},get children(){return m(S7,{icon:"arrow",onClick:S})}}),m(Pe,{get when(){return o()},get children(){return m(M7,{get universalLink(){return f()},get walletInfo(){return e.wallet}})}}),m(Pe,{get when(){return!o()},get children(){return[m(b7,{get children(){return e.wallet.name}}),m(C7,{get children(){return[m(Pe,{get when(){return l()},get children(){return[m(T7,{size:"s"}),m(W4,{translationKey:"walletModal.mobileConnectionModal.connectionDeclined",children:"Connection declined"}),m(H4,{get children(){return[m(jt,{get leftIcon(){return m(Ol,{})},onClick:h,get children(){return m(Yt,{translationKey:"common.retry",children:"Retry"})}}),m(jt,{get leftIcon(){return m(J0,{get fill(){return t.colors.accent}})},onClick:b,get children(){return m(Yt,{translationKey:"walletModal.mobileConnectionModal.showQR",children:"Show QR Code"})}})]}})]}}),m(Pe,{get when(){return!l()},get children(){return[m(A7,{size:"s"}),m(W4,{translationKey:"walletModal.mobileConnectionModal.continueIn",get translationValues(){return{name:e.wallet.name}},get children(){return["Continue in ",ue(()=>e.wallet.name),"…"]}}),m(H4,{get children(){return[m(jt,{get leftIcon(){return m(Ol,{})},onClick:h,get children(){return m(Yt,{translationKey:"common.retry",children:"Retry"})}}),m(jt,{get leftIcon(){return m(J0,{get fill(){return t.colors.accent}})},onClick:b,get children(){return m(Yt,{translationKey:"walletModal.mobileConnectionModal.showQR",children:"Show QR Code"})}})]}})]}})]}}),m(E7,{get children(){return[m(k7,{get src(){return e.wallet.imageUrl}}),m(Sd,{get children(){return e.wallet.name}}),m(_7,{get href(){return e.wallet.aboutUrl},blank:!0,get children(){return m(jt,{get children(){return m(Yt,{translationKey:"common.get",children:"GET"})}})}})]}})]}})]}})},Qg={m:"16px",s:"12px",none:"0"},N7={m:"6px",s:"6px",none:"0"},$7=W.ul` - display: flex; - justify-content: space-between; - margin: 0 auto; - width: fit-content; - max-width: 100%; - min-width: 100%; - height: fit-content; - overflow-x: auto; - overflow-y: hidden; - padding: 0 13px 24px; - - &&::-webkit-scrollbar { - display: none; - } - - -ms-overflow-style: none; - scrollbar-width: none; - - > li { - height: fit-content; - } -`,z4=W.li` - width: 82px; - min-width: 82px; - height: 124px; - display: flex; - flex-direction: column; - align-items: center; - padding: 8px 4px; - - text-align: center; - cursor: pointer; - - transition: transform 0.1s ease-in-out; - - ${Ss} { - &:hover { - transform: scale(1.04); - } - } - - &:active { - transform: scale(0.96); - } - - ${bs} { - &:active { - transform: scale(0.92); - } - } -`,I7=W.div` - width: 1px; - margin: 0 10px; - height: 24px; - position: relative; - top: 26px; - - background-color: ${e=>e.theme.colors.icon.secondary}; - opacity: 0.2; -`,V4=W.div` - width: 60px; - height: 60px; - border-radius: ${e=>Qg[e.theme.borderRadius]}; - display: flex; - align-items: center; - justify-content: center; - - background-color: ${e=>e.theme.colors.background.tint}; - margin-bottom: 8px; -`,B7=W(_r)` - margin-top: 38px; - margin-bottom: 4px; - padding: 0 24px; -`,O7=W(Ro)` - margin-bottom: 24px; - padding: 0 24px; - min-height: 44px; -`;W(jt)` - display: block; - margin: 0 auto; -`;const U7=W(jt)` - margin: 0 24px 24px; - width: calc(100% - 48px); - border-radius: ${e=>Qg[e.theme.borderRadius]}; - padding: 14px 16px 14px 14px; - background-color: ${e=>e.theme.colors.telegramButton}; - - color: ${e=>e.theme.colors.constant.white}; - font-weight: 590; - font-size: 16px; - line-height: 20px; -`,D7=W(ii)` - border-radius: ${e=>N7[e.theme.borderRadius]}; - width: 24px; - height: 24px; -`,K4=W(li)` - position: absolute; - top: 16px; - left: 16px; -`,j7=W(_r)` - margin-bottom: 2px; - padding: 0 64px; -`,F7=W(Ro)` - margin-bottom: 20px; - padding: 0 64px; -`,W7=W.div` - padding: 0 24px 24px; -`,H7=e=>[m(j7,{translationKey:"walletModal.mobileUniversalModal.connectYourWallet",children:"Connect your wallet"}),m(F7,{translationKey:"walletModal.mobileUniversalModal.scan",children:"Scan with your mobile wallet"}),m(W7,{get children(){return m(Fu,{get imageUrl(){return ks.TON},get sourceUrl(){return pt(e.universalLink,"none")},disableCopy:!0})}})];function Gg(e){const t=new Set(e.filter(sd).map(n=>n.bridgeUrl));return Array.from(t).map(n=>({bridgeUrl:n}))}function Yg(e,t){const n=new Set(e==null?void 0:e.map(o=>o.bridgeUrl)),r=new Set(t==null?void 0:t.map(o=>o.bridgeUrl));return n.size===r.size&&[...n].every(o=>r.has(o))}const q4=Ye("
  • "),z7=Ye('
    '),V7=e=>{const[t,n]=Ae(!1),[r,o]=Ae(!0),[i,l]=Ae(null),s=ot.connector,u=()=>e.walletsList.filter(C=>jl(C)&&C.appName!==Fr),c=()=>u().length>7,f=ue(()=>Gg(e.walletsList),null,{equals:Yg}),g=()=>(i()||l(s.connect(f(),e.additionalRequest)),i());rn({openMethod:"universal-link"});const[h,b]=Ae(void 0),y=()=>ut(void 0,null,function*(){h()!==void 0&&clearTimeout(h()),yield bd(g());const C=setTimeout(()=>b(void 0),1500);b(C)}),S=()=>{const C=!r();o(!1),As(g(),void 0,{returnStrategy:ot.returnStrategy,forceRedirect:C},_=>{rn({openMethod:_})})},P=()=>{l(null);const C=e.walletsList.find(I=>I.appName===Fr);if(!C||!sd(C))throw new Ut("@wallet bot not found in the wallets list");const _=s.connect({bridgeUrl:C.bridgeUrl,universalLink:C.universalLink},e.additionalRequest),A=!r();o(!1),_s(_,{returnStrategy:ot.returnStrategy,twaReturnUrl:ot.twaReturnUrl,forceRedirect:A})},E=()=>{n(!0),rn({openMethod:"qrcode"})},w=()=>{n(!1),rn({openMethod:"universal-link"})};return(()=>{const C=z7.cloneNode(!0);return gn(C,m(Pe,{get when(){return t()},get children(){return[m(K4,{icon:"arrow",onClick:w}),m(H7,{get universalLink(){return g()}})]}}),null),gn(C,m(Pe,{get when(){return!t()},get children(){return[m(K4,{get icon(){return m(J0,{})},onClick:E}),m(B7,{translationKey:"walletModal.mobileUniversalModal.connectYourWallet",children:"Connect your wallet"}),m(O7,{translationKey:"walletModal.mobileUniversalModal.openWalletOnTelegramOrSelect",children:"Open Wallet in Telegram or select your wallet to connect"}),m(U7,{get leftIcon(){return m(Nw,{})},get rightIcon(){return m(D7,{get src(){return ks.TG}})},onClick:P,scale:"s",get children(){return m(Yt,{translationKey:"walletModal.mobileUniversalModal.openWalletOnTelegram",children:"Open Wallet in Telegram"})}}),m($7,{get children(){return[m(ws,{get each(){return ue(()=>!!c())()?u().slice(0,4):u()},children:_=>(()=>{const A=q4.cloneNode(!0);return gn(A,m(lu,{get icon(){return _.imageUrl},get name(){return _.name},onClick:()=>e.onSelect(_)})),A})()}),m(Pe,{get when(){return c()},get children(){const _=q4.cloneNode(!0);return gn(_,m(Mg,{labelLine1:"View all",labelLine2:"wallets",get images(){return u().slice(3,7).map(A=>A.imageUrl)},onClick:()=>e.onSelectAllWallets()})),_}}),m(I7,{children:" "}),m(z4,{onClick:S,get children(){return[m(V4,{get children(){return m(ew,{})}}),m(Fn,{fontWeight:590,translationKey:"walletModal.mobileUniversalModal.openLink",children:"Open Link"})]}}),m(z4,{onClick:y,get children(){return[m(V4,{get children(){return ue(()=>h()!==void 0)()?m(Iw,{}):m(Pg,{})}}),m(Fn,{fontWeight:590,get translationKey(){return h()!==void 0?"common.copied":"common.copyLink"},get children(){return h()!==void 0?"Copied":"Copy Link"}})]}})]}})]}}),null),C})()},Zg={m:"16px",s:"8px",none:"0"},K7={m:"8px",s:"4px",none:"0"},q7=W.div` - display: flex; - flex-direction: column; - align-items: center; - padding-bottom: 16px; -`,Q7=W(Ro)` - max-width: 320px; - margin-top: 2px; - margin-bottom: 20px; -`,G7=W(Ro)` - margin-bottom: 16px; -`,Y7=W(Fu)` - margin-bottom: 24px; -`,Z7=W.ul` - display: flex; -`;W.div` - display: flex; - gap: 16px; - width: 100%; -`;W(jt)` - position: relative; - font-size: 16px; - line-height: 20px; - width: 100%; - padding: 0 16px; - height: 56px; - border-radius: ${e=>Zg[e.theme.borderRadius]}; - - &:hover { - ${e=>e.disableEventsAnimation?"transform: unset;":""} - } - - &:active { - ${e=>e.disableEventsAnimation?"transform: unset;":""} - } -`;W.ul` - position: absolute; - bottom: 100%; - left: 0; - margin: 0; - padding: 8px; - width: 188px; - transform: translateY(-16px); - - background-color: ${e=>e.theme.colors.background.primary}; - border-radius: ${e=>Zg[e.theme.borderRadius]}; - box-shadow: 0 4px 24px rgba(0, 0, 0, 0.16); -`;W.li` - padding: 8px; - - display: flex; - align-items: center; - gap: 8px; - - cursor: pointer; - border-radius: ${e=>K7[e.theme.borderRadius]}; - - transition: background-color, transform 0.1s ease-in-out; - - &:hover { - background-color: ${e=>e.theme.colors.background.secondary}; - } - - &:active { - transform: scale(0.96); - } -`;W(ii)` - width: 24px; - height: 24px; - - border-radius: 6px; -`;W.div` - margin-top: 23px; - margin-bottom: 1px; - width: 100%; - display: flex; - justify-content: center; - align-items: center; -`;W(Fn)` - color: ${e=>e.theme.colors.text.secondary}; - font-size: 16px; -`;const J7=Ye("
  • "),X7=e=>{const[t,n]=Ae(!1),r=ot.connector,o=ue(()=>Gg(e.walletsList),null,{equals:Yg});rn({openMethod:"qrcode"});const i=ue(()=>r.connect(o(),e.additionalRequest));return m(q7,{onClick:()=>n(!1),"data-tc-wallets-modal-universal-desktop":"true",get children(){return[m(_r,{translationKey:"walletModal.desktopUniversalModal.connectYourWallet",children:"Connect your wallet"}),m(Q7,{translationKey:"walletModal.desktopUniversalModal.scan",children:"Scan with your mobile wallet"}),m(Y7,{get sourceUrl(){return pt(i(),"none")},get disableCopy(){return t()},get imageUrl(){return ks.TON}}),m(G7,{translationKey:"walletModal.desktopUniversalModal.availableWallets",children:"Available wallets"}),m(Z7,{get children(){return[m(ws,{get each(){return e.walletsList.slice(0,3)},children:l=>(()=>{const s=J7.cloneNode(!0);return gn(s,m(Ng,{wallet:l,onClick:()=>e.onSelect(l)})),s})()}),m(Mg,{labelLine1:"View all",labelLine2:"wallets",get images(){return e.walletsList.slice(3,7).map(l=>l.imageUrl)},onClick:()=>e.onSelectAllWallets()})]}})]}})},ex=()=>{const{locale:e}=kr()[1];Xt(()=>e(ot.language)),Xt(()=>{w4()?su():(i(null),s("universal"),c(!1))});const t=Cn(Ji),n=Cn(Po),[r]=x6(()=>n.getWallets()),[o,i]=Ae(null),[l,s]=Ae("universal"),[u,c]=Ae(!1),f=ue(()=>{if(r.state!=="ready")return null;let w=Td(r(),ot.walletsListConfiguration);const C=w.filter(Vo),_=w.filter(L=>!Vo(L));w=(C||[]).concat(_);const A=ot.preferredWalletAppName,I=w.find(L=>so(L,A)),M=w.filter(L=>so(L,A)).length>=2;A&&I&&!M&&(w=[Un(ht({},I),{isPreferred:!0})].concat(w.filter(L=>!so(L,A))));const T=w.find(L=>so(L,Fr));return T&&(w=[T].concat(w.filter(L=>!so(L,Fr)))),w}),g=()=>{var w;return((w=ot.connectRequestParameters)==null?void 0:w.state)==="loading"},h=ue(()=>{var w;if(!g())return(w=ot.connectRequestParameters)==null?void 0:w.value}),b=w=>{n.closeModal(w)},y=t.onStatusChange(w=>{w&&b("wallet-selected")}),S=()=>{s("all-wallets")},P=()=>{s("universal")},E=()=>{i(null)};return xn(()=>{i(null),c(!1)}),xn(y),m(Wg,{get opened(){return w4()},get enableAndroidBackHandler(){return ot.enableAndroidBackHandler},onClose:()=>b("action-cancelled"),onClickQuestion:()=>c(w=>!w),"data-tc-wallets-modal-container":"true",get children(){return[m(Pe,{get when(){return u()},get children(){return m(Kg,{onBackClick:()=>c(!1)})}}),m(Pe,{get when(){return!u()},get children(){return[m(Pe,{get when(){return g()||!f()},get children(){return[m(Hg,{translationKey:"walletModal.loading",children:"Wallets list is loading"}),m(zg,{get children(){return m(Zr,{size:"m"})}})]}}),m(Pe,{get when(){return ue(()=>!g())()&&f()},get children(){return m(xs,{get children(){return[m(nn,{get when(){return o()},get children(){return m(Hi,{get component(){return Vi()?qg:Vg},get wallet(){return o()},get additionalRequest(){return h()},onBackClick:E})}}),m(nn,{get when(){return l()==="universal"},get children(){return m(Hi,{get component(){return Vi()?V7:X7},onSelect:i,get walletsList(){return f()},get additionalRequest(){return h()},onSelectAllWallets:S})}}),m(nn,{get when(){return l()==="all-wallets"},get children(){return m(X9,{get walletsList(){return f()},onBack:P,onSelect:i})}})]}})}})]}})]}})},tx=W.div` - display: flex; - flex-direction: column; - align-items: center; - padding-bottom: 8px; -`,nx=W(_r)` - margin-top: 16px; -`,rx=W(Fn)` - font-weight: 510; - font-size: 16px; - line-height: 20px; - text-align: center; - max-width: 250px; - - color: ${e=>e.theme.colors.text.secondary}; -`,ox=W(jt)` - min-width: 112px; - margin-top: 32px; -`,ix=W(Zr)` - height: 16px; - width: 16px; -`,Q4=W(jt)` - margin-top: 32px; -`,Ld=e=>{const t=Es(e),n=Cn(Po),[r,o]=Ae(!0),[i,l]=Ae(!1);Xt(()=>{const f=$r();l(!!f&&"sent"in f&&f.sent)});let s;n!=null&&n.wallet&&"universalLink"in n.wallet&&(n.wallet.openMethod==="universal-link"||zo(n.wallet.universalLink)&&qr())&&(s=n.wallet.universalLink);let u;n!=null&&n.wallet&&"deepLink"in n.wallet&&(n.wallet.openMethod==="custom-deeplink"||zo(n.wallet.deepLink)&&qr())&&(u=n.wallet.deepLink);const c=()=>{const f=$r(),g="returnStrategy"in f?f.returnStrategy:ot.returnStrategy,h=!r();o(!1),zo(s)?_s(s,{returnStrategy:g,twaReturnUrl:"twaReturnUrl"in f?f.twaReturnUrl:ot.twaReturnUrl,forceRedirect:h}):As(s,u,{returnStrategy:g,forceRedirect:h},()=>{})};return m(tx,Cr(t,{get children(){return[ue(()=>e.icon),m(nx,{get translationKey(){return e.headerTranslationKey},get translationValues(){return e.headerTranslationValues}}),m(rx,{get translationKey(){return e.textTranslationKey},get translationValues(){return e.textTranslationValues}}),m(Pe,{get when(){return!i()&&(e.showButton==="open-wallet"&&s||e.showButton!=="open-wallet")},get children(){return m(ox,{disabled:!0,"data-tc-connect-button-loading":"true",get children(){return m(ix,{})}})}}),m(Pe,{get when(){return i()},get children(){return[m(Pe,{get when(){return e.showButton!=="open-wallet"},get children(){return m(Q4,{onClick:()=>e.onClose(),get children(){return m(Yt,{translationKey:"common.close",children:"Close"})}})}}),m(Pe,{get when(){return e.showButton==="open-wallet"&&s},get children(){return m(Q4,{onClick:c,get children(){return m(Yt,{translationKey:"common.openWallet",children:"Open wallet"})}})}})]}})]}}))},lx=e=>{const t=Cn(Po),[n]=kr(),r=()=>t.wallet&&"name"in t.wallet?t.wallet.name:n("common.yourWallet",{},"Your wallet");return m(Ld,{headerTranslationKey:"actionModal.confirmTransaction.header",get headerTranslationValues(){return{name:r()}},textTranslationKey:"actionModal.confirmTransaction.text",get icon(){return m(Zr,{size:"m"})},onClose:()=>e.onClose(),showButton:"open-wallet","data-tc-confirm-modal":"true"})},sx=e=>m(Ld,{headerTranslationKey:"actionModal.transactionCanceled.header",textTranslationKey:"actionModal.transactionCanceled.text",get icon(){return m(Wu,{size:"m"})},onClose:()=>e.onClose(),"data-tc-transaction-canceled-modal":"true"}),ax=e=>m(Ld,{headerTranslationKey:"actionModal.transactionSent.header",textTranslationKey:"actionModal.transactionSent.text",get icon(){return m(Ed,{size:"m"})},onClose:()=>e.onClose(),"data-tc-transaction-sent-modal":"true"}),ux=()=>m(_g,{get opened(){var e;return ue(()=>$r()!==null)()&&((e=$r())==null?void 0:e.openModal)===!0},get enableAndroidBackHandler(){return ot.enableAndroidBackHandler},onClose:()=>ki(null),"data-tc-actions-modal-container":"true",get children(){return m(xs,{get children(){return[m(nn,{get when(){return $r().name==="transaction-sent"},get children(){return m(ax,{onClose:()=>ki(null)})}}),m(nn,{get when(){return $r().name==="transaction-canceled"},get children(){return m(sx,{onClose:()=>ki(null)})}}),m(nn,{get when(){return $r().name==="confirm-transaction"},get children(){return m(lx,{onClose:()=>ki(null)})}})]}})}}),cx=()=>{const{locale:e}=kr()[1];Xt(()=>e(ot.language)),Xt(()=>{C4()&&su()});const t=Cn(Ji),n=Cn(Po),[r,o]=Ae(!1),i=()=>{var c;return((c=ot.connectRequestParameters)==null?void 0:c.state)==="loading"},l=ue(()=>{var c;if(!i())return(c=ot.connectRequestParameters)==null?void 0:c.value}),s=c=>{n.closeSingleWalletModal(c)},u=t.onStatusChange(c=>{c&&s("wallet-selected")});return xn(u),xn(()=>{o(!1)}),m(Wg,{get opened(){return C4()},get enableAndroidBackHandler(){return ot.enableAndroidBackHandler},onClose:()=>s("action-cancelled"),onClickQuestion:()=>o(c=>!c),"data-tc-wallets-modal-container":"true",get children(){return[m(Pe,{get when(){return r()},get children(){return m(Kg,{onBackClick:()=>o(!1)})}}),m(Pe,{get when(){return!r()},get children(){return[m(Pe,{get when(){return i()},get children(){return[m(Hg,{translationKey:"walletModal.loading",children:"Wallets list is loading"}),m(zg,{get children(){return m(Zr,{size:"m"})}})]}}),m(Pe,{get when(){return!i()},get children(){return m(Hi,{get component(){return Vi()?qg:Vg},get wallet(){return C8()},get additionalRequest(){return l()},onBackClick:()=>{},backDisabled:!0})}})]}})]}})},fx=e=>{const t=Dy(U8,ot.language);return p8(),g8(),m(Lg.Provider,{value:t,get children(){return m(Po.Provider,{get value(){return e.tonConnectUI},get children(){return m(Ji.Provider,{get value(){return ot.connector},get children(){return[m(l8,{}),m(o8,{theme:K8,get children(){return[m(Pe,{get when(){return ot.buttonRootId},get children(){return m(ag,{get mount(){return document.getElementById(ot.buttonRootId)},get children(){return m(H9,{})}})}}),m(Hi,{component:Nr,get children(){return[m(ex,{}),m(cx,{}),m(ux,{})]}})]}})]}})}})}})},In={openWalletsModal:()=>void setTimeout(()=>y4({status:"opened",closeReason:null})),closeWalletsModal:e=>void setTimeout(()=>y4({status:"closed",closeReason:e})),openSingleWalletModal:e=>{setTimeout(()=>x4({status:"opened",closeReason:null,walletInfo:e}))},closeSingleWalletModal:e=>void setTimeout(()=>x4({status:"closed",closeReason:e})),setAction:e=>void setTimeout(()=>ki(e)),clearAction:()=>void setTimeout(()=>ki(null)),getSelectedWalletInfo:()=>b8(),removeSelectedWalletInfo:()=>rn(null),renderApp:(e,t)=>D6(()=>m(fx,{tonConnectUI:t}),document.getElementById(e))};class dx{constructor(t){Ee(this,"connector"),Ee(this,"setConnectRequestParametersCallback"),Ee(this,"consumers",[]),Ee(this,"tracker"),Ee(this,"state",q0()),this.connector=t.connector,this.tracker=t.tracker,this.setConnectRequestParametersCallback=t.setConnectRequestParametersCallback,Xt(()=>{const n=q0();this.state=n,this.consumers.forEach(r=>r(n))})}open(){return ut(this,null,function*(){this.tracker.trackConnectionStarted();const n=(yield this.connector.getWallets()).find(Bu);return n?this.connectEmbeddedWallet(n):this.openWalletsModal()})}close(t="action-cancelled"){t==="action-cancelled"&&this.tracker.trackConnectionError("Connection was cancelled"),In.closeWalletsModal(t)}onStateChange(t){return this.consumers.push(t),()=>{this.consumers=this.consumers.filter(n=>n!==t)}}connectEmbeddedWallet(t){const n=o=>{rn(t),this.connector.connect({jsBridgeKey:t.jsBridgeKey},o)},r=ot.connectRequestParameters;(r==null?void 0:r.state)==="loading"?this.setConnectRequestParametersCallback(n):n(r==null?void 0:r.value)}openWalletsModal(){return ut(this,null,function*(){return qr()&&xd(),In.openWalletsModal(),new Promise(t=>{const n=this.onStateChange(r=>{const{status:o}=r;o==="opened"&&(n(),t())})})})}}class hx{constructor(t){Ee(this,"connector"),Ee(this,"consumers",[]),this.connector=t.connector,Xt(()=>{const n=$r();this.consumers.forEach(r=>r(n))})}onStateChange(t){return this.consumers.push(t),()=>{this.consumers=this.consumers.filter(n=>n!==t)}}}class gx{constructor(t){Ee(this,"connector"),Ee(this,"setConnectRequestParametersCallback"),Ee(this,"consumers",[]),Ee(this,"tracker"),Ee(this,"state",eu()),this.connector=t.connector,this.tracker=t.tracker,this.setConnectRequestParametersCallback=t.setConnectRequestParametersCallback,Xt(()=>{const n=eu();this.state=n,this.consumers.forEach(r=>r(n))})}open(t){return ut(this,null,function*(){this.tracker.trackConnectionStarted();const n=yield this.connector.getWallets(),r=Td(n,ot.walletsListConfiguration),o=r.find(Bu);if(!!o)return this.connectEmbeddedWallet(o);const s=r.filter(sd).find(f=>so(f,t));if(!!s)return this.openSingleWalletModal(s);const c=`Trying to open modal window with unknown wallet "${t}".`;throw this.tracker.trackConnectionError(c),new Ut(c)})}close(t="action-cancelled"){t==="action-cancelled"&&this.tracker.trackConnectionError("Connection was cancelled"),In.closeSingleWalletModal("action-cancelled")}onStateChange(t){return this.consumers.push(t),()=>{this.consumers=this.consumers.filter(n=>n!==t)}}connectEmbeddedWallet(t){const n=o=>{rn(t),this.connector.connect({jsBridgeKey:t.jsBridgeKey},o)},r=ot.connectRequestParameters;(r==null?void 0:r.state)==="loading"?this.setConnectRequestParametersCallback(n):n(r==null?void 0:r.value)}openSingleWalletModal(t){return ut(this,null,function*(){return qr()&&xd(),In.openSingleWalletModal(t),new Promise(n=>{const r=this.onStateChange(o=>{const{status:i}=o;i==="opened"&&(r(),n())})})})}}class px{constructor(t){Ee(this,"eventPrefix","ton-connect-ui-"),Ee(this,"tonConnectUiVersion"),Ee(this,"tonConnectSdkVersion",null),Ee(this,"eventDispatcher");var n;this.eventDispatcher=(n=t==null?void 0:t.eventDispatcher)!=null?n:new K3,this.tonConnectUiVersion=t.tonConnectUiVersion,this.init().catch()}get version(){return oi({ton_connect_sdk_lib:this.tonConnectSdkVersion,ton_connect_ui_lib:this.tonConnectUiVersion})}init(){return ut(this,null,function*(){try{yield this.setRequestVersionHandler(),this.tonConnectSdkVersion=yield this.requestTonConnectSdkVersion()}catch{}})}setRequestVersionHandler(){return ut(this,null,function*(){yield this.eventDispatcher.addEventListener("ton-connect-ui-request-version",()=>ut(this,null,function*(){yield this.eventDispatcher.dispatchEvent("ton-connect-ui-response-version",I3(this.tonConnectUiVersion))}))})}requestTonConnectSdkVersion(){return ut(this,null,function*(){return new Promise((t,n)=>ut(this,null,function*(){try{yield this.eventDispatcher.addEventListener("ton-connect-response-version",r=>{t(r.detail.version)},{once:!0}),yield this.eventDispatcher.dispatchEvent("ton-connect-request-version",$3())}catch(r){n(r)}}))})}dispatchUserActionEvent(t){var n;try{(n=this.eventDispatcher)==null||n.dispatchEvent(`${this.eventPrefix}${t.type}`,t).catch()}catch{}}trackConnectionStarted(...t){try{const n=B3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackConnectionCompleted(...t){try{const n=O3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackConnectionError(...t){try{const n=U3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackConnectionRestoringStarted(...t){try{const n=D3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackConnectionRestoringCompleted(...t){try{const n=j3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackConnectionRestoringError(...t){try{const n=F3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackDisconnection(...t){try{const n=V3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackTransactionSentForSignature(...t){try{const n=W3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackTransactionSigned(...t){try{const n=H3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackTransactionSigningFailed(...t){try{const n=z3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}}const mx="2.0.5";class vx{constructor(t){if(Ee(this,"walletInfoStorage",new w8),Ee(this,"preferredWalletStorage",new x8),Ee(this,"tracker"),Ee(this,"walletInfo",null),Ee(this,"systemThemeChangeUnsubscribe",null),Ee(this,"actionsConfiguration"),Ee(this,"walletsList"),Ee(this,"connectRequestParametersCallback"),Ee(this,"connector"),Ee(this,"modal"),Ee(this,"singleWalletModal"),Ee(this,"transactionModal"),Ee(this,"connectionRestored",Promise.resolve(!1)),t&&"connector"in t&&t.connector)this.connector=t.connector;else if(t&&"manifestUrl"in t&&t.manifestUrl)this.connector=new ei({manifestUrl:t.manifestUrl,eventDispatcher:t==null?void 0:t.eventDispatcher});else throw new Ut("You have to specify a `manifestUrl` or a `connector` in the options.");this.tracker=new px({eventDispatcher:t==null?void 0:t.eventDispatcher,tonConnectUiVersion:mx}),this.modal=new dx({connector:this.connector,tracker:this.tracker,setConnectRequestParametersCallback:o=>{this.connectRequestParametersCallback=o}}),this.singleWalletModal=new gx({connector:this.connector,tracker:this.tracker,setConnectRequestParametersCallback:o=>{this.connectRequestParametersCallback=o}}),this.transactionModal=new hx({connector:this.connector}),this.walletsList=this.getWallets(),this.walletsList.then(o=>hg(z9(o.map(i=>i.imageUrl))));const n=this.normalizeWidgetRoot(t==null?void 0:t.widgetRootId);this.subscribeToWalletChange(),(t==null?void 0:t.restoreConnection)!==!1&&(this.connectionRestored=m8(()=>ut(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=xo(t,{uiPreferences:{theme:"SYSTEM"}});const r=this.preferredWalletStorage.getPreferredWalletAppName();ea({connector:this.connector,preferredWalletAppName:r}),In.renderApp(n,this)}static getWallets(){return ei.getWallets()}get connected(){return this.connector.connected}get account(){return this.connector.account}get wallet(){return this.connector.wallet?ht(ht({},this.connector.wallet),this.walletInfo):null}set uiOptions(t){var n,r,o,i,l;this.checkButtonRootExist(t.buttonRootId),this.actionsConfiguration=t.actionsConfiguration,(n=t.uiPreferences)!=null&&n.theme?((r=t.uiPreferences)==null?void 0:r.theme)!=="SYSTEM"?((o=this.systemThemeChangeUnsubscribe)==null||o.call(this),Pc(t.uiPreferences.theme,t.uiPreferences.colorsSet)):(Pc(c8(),t.uiPreferences.colorsSet),this.systemThemeChangeUnsubscribe||(this.systemThemeChangeUnsubscribe=f8(Pc))):(i=t.uiPreferences)!=null&&i.colorsSet&&Q8(t.uiPreferences.colorsSet),(l=t.uiPreferences)!=null&&l.borderRadius&&q8(t.uiPreferences.borderRadius),ea(s=>{var u,c;const f=xo(ht(ht(ht(ht({},t.language&&{language:t.language}),!!((u=t.actionsConfiguration)!=null&&u.returnStrategy)&&{returnStrategy:t.actionsConfiguration.returnStrategy}),!!((c=t.actionsConfiguration)!=null&&c.twaReturnUrl)&&{twaReturnUrl:t.actionsConfiguration.twaReturnUrl}),!!t.walletsListConfiguration&&{walletsListConfiguration:t.walletsListConfiguration}),zi(s));return t.buttonRootId!==void 0&&(f.buttonRootId=t.buttonRootId),t.enableAndroidBackHandler!==void 0&&(f.enableAndroidBackHandler=t.enableAndroidBackHandler),f})}setConnectRequestParameters(t){var n;ea({connectRequestParameters:t}),((t==null?void 0:t.state)==="ready"||!t)&&((n=this.connectRequestParametersCallback)==null||n.call(this,t==null?void 0:t.value))}getWallets(){return ut(this,null,function*(){return this.connector.getWallets()})}onStatusChange(t,n){return this.connector.onStatusChange(r=>ut(this,null,function*(){if(r){const o=yield this.getSelectedWalletInfo(r);t(ht(ht({},r),o||this.walletInfoStorage.getWalletInfo()))}else t(r)}),n)}openModal(){return ut(this,null,function*(){return this.modal.open()})}closeModal(t){this.modal.close(t)}onModalStateChange(t){return this.modal.onStateChange(t)}get modalState(){return this.modal.state}openSingleWalletModal(t){return ut(this,null,function*(){return this.singleWalletModal.open(t)})}closeSingleWalletModal(t){this.singleWalletModal.close(t)}onSingleWalletModalStateChange(t){return this.singleWalletModal.onStateChange(t)}get singleWalletModalState(){return this.singleWalletModal.state}connectWallet(){return ut(this,null,function*(){const n=(yield this.getWallets()).find(Bu);return n?yield this.connectEmbeddedWallet(n):yield this.connectExternalWallet()})}disconnect(){return this.tracker.trackDisconnection(this.wallet,"dapp"),In.clearAction(),In.removeSelectedWalletInfo(),this.walletInfoStorage.removeWalletInfo(),this.connector.disconnect()}sendTransaction(t,n){return ut(this,null,function*(){if(this.tracker.trackTransactionSentForSignature(this.wallet,t),!this.connected)throw this.tracker.trackTransactionSigningFailed(this.wallet,t,"Wallet was not connected"),new Ut("Connect wallet to send a transaction.");qr()&&xd();const{notifications:r,modals:o,returnStrategy:i,twaReturnUrl:l,skipRedirectToWallet:s}=this.getModalsAndNotificationsConfiguration(n);In.setAction({name:"confirm-transaction",showNotification:r.includes("before"),openModal:o.includes("before"),sent:!1});const u=()=>{c.signal.aborted||(In.setAction({name:"confirm-transaction",showNotification:r.includes("before"),openModal:o.includes("before"),sent:!0}),this.walletInfo&&"universalLink"in this.walletInfo&&(this.walletInfo.openMethod==="universal-link"||this.walletInfo.openMethod==="custom-deeplink")&&(zo(this.walletInfo.universalLink)?_s(this.walletInfo.universalLink,{returnStrategy:i,twaReturnUrl:l||ot.twaReturnUrl,forceRedirect:!1}):As(this.walletInfo.universalLink,this.walletInfo.deepLink,{returnStrategy:i,forceRedirect:!1},()=>{})))},c=new AbortController,f=this.onTransactionModalStateChange(g=>{g!=null&&g.openModal||(f(),g||c.abort())});try{const g=yield this.waitForSendTransaction({transaction:t,signal:c.signal},u);return this.tracker.trackTransactionSigned(this.wallet,t,g),In.setAction({name:"transaction-sent",showNotification:r.includes("success"),openModal:o.includes("success")}),g}catch(g){throw In.setAction({name:"transaction-canceled",showNotification:r.includes("error"),openModal:o.includes("error")}),g instanceof Se?g:(console.error(g),new Ut("Unhandled error:"+g))}finally{f()}})}connectEmbeddedWallet(t){return ut(this,null,function*(){const n=o=>{rn(t),this.connector.connect({jsBridgeKey:t.jsBridgeKey},o)},r=ot.connectRequestParameters;return(r==null?void 0:r.state)==="loading"?this.connectRequestParametersCallback=n:n(r==null?void 0:r.value),yield this.waitForWalletConnection({ignoreErrors:!1})})}connectExternalWallet(){return ut(this,null,function*(){const t=new AbortController;In.openWalletsModal();const n=this.onModalStateChange(r=>{const{status:o,closeReason:i}=r;o!=="opened"&&(n(),i==="action-cancelled"&&t.abort())});return yield this.waitForWalletConnection({ignoreErrors:!0,signal:t.signal})})}waitForWalletConnection(t){return ut(this,null,function*(){return new Promise((n,r)=>{this.tracker.trackConnectionStarted();const{ignoreErrors:o=!1,signal:i=null}=t;if(i&&i.aborted)return this.tracker.trackConnectionError("Connection was cancelled"),r(new Ut("Wallet was not connected"));const l=c=>ut(this,null,function*(){if(c)this.tracker.trackConnectionCompleted(c),u(),n(c);else{if(this.tracker.trackConnectionError("Connection was cancelled"),o)return;u(),r(new Ut("Wallet was not connected"))}}),s=c=>{this.tracker.trackConnectionError(c.message),!o&&(u(),r(c))},u=this.onStatusChange(c=>l(c),c=>s(c));i&&i.addEventListener("abort",()=>{u(),r(new Ut("Wallet was not connected"))},{once:!0})})})}waitForSendTransaction(t,n){return ut(this,null,function*(){return new Promise((r,o)=>{const{transaction:i,signal:l}=t;if(l.aborted)return this.tracker.trackTransactionSigningFailed(this.wallet,i,"Transaction was cancelled"),o(new Ut("Transaction was not sent"));const s=f=>ut(this,null,function*(){r(f)}),u=f=>{o(f)},c=()=>{this.tracker.trackTransactionSigningFailed(this.wallet,i,"Transaction was cancelled"),o(new Ut("Transaction was not sent"))};l.addEventListener("abort",c,{once:!0}),this.connector.sendTransaction(i,{onRequestSent:n,signal:l}).then(f=>(l.removeEventListener("abort",c),s(f))).catch(f=>(l.removeEventListener("abort",c),u(f)))})})}onTransactionModalStateChange(t){return this.transactionModal.onStateChange(t)}subscribeToWalletChange(){this.connector.onStatusChange(t=>ut(this,null,function*(){var n;t?(yield this.updateWalletInfo(t),this.setPreferredWalletAppName(((n=this.walletInfo)==null?void 0:n.appName)||t.device.appName)):this.walletInfoStorage.removeWalletInfo()}))}setPreferredWalletAppName(t){this.preferredWalletStorage.setPreferredWalletAppName(t),ea({preferredWalletAppName:t})}getSelectedWalletInfo(t){return ut(this,null,function*(){let n=In.getSelectedWalletInfo();if(!n)return null;let r;if("name"in n)r=n;else{const i=Td(yield this.walletsList,ot.walletsListConfiguration).find(l=>so(l,t.device.appName));if(!i)throw new Ut(`Cannot find WalletInfo for the '${t.device.appName}' wallet`);r=ht(ht({},i),n)}return r})}updateWalletInfo(t){return ut(this,null,function*(){const n=yield this.getSelectedWalletInfo(t);if(n){this.walletInfo=n,this.walletInfoStorage.setWalletInfo(n);return}const r=this.walletInfoStorage.getWalletInfo();if(r){this.walletInfo=r;return}this.walletInfo=(yield this.walletsList).find(o=>so(o,t.device.appName))||null})}normalizeWidgetRoot(t){if(!t||!document.getElementById(t)){t="tc-widget-root";const n=document.createElement("div");n.id=t,document.body.appendChild(n)}return t}checkButtonRootExist(t){if(t!=null&&!document.getElementById(t))throw new Ut(`${t} element not found in the document.`)}getModalsAndNotificationsConfiguration(t){var n,r,o,i,l,s;const u=["before","success","error"];let c=u;(n=this.actionsConfiguration)!=null&&n.notifications&&((r=this.actionsConfiguration)==null?void 0:r.notifications)!=="all"&&(c=this.actionsConfiguration.notifications),t!=null&&t.notifications&&(t.notifications==="all"?c=u:c=t.notifications);let f=["before"];(o=this.actionsConfiguration)!=null&&o.modals&&(this.actionsConfiguration.modals==="all"?f=u:f=this.actionsConfiguration.modals),t!=null&&t.modals&&(t.modals==="all"?f=u:f=t.modals);const g=(t==null?void 0:t.returnStrategy)||((i=this.actionsConfiguration)==null?void 0:i.returnStrategy)||"back",h=(t==null?void 0:t.twaReturnUrl)||((l=this.actionsConfiguration)==null?void 0:l.twaReturnUrl);let b=(t==null?void 0:t.skipRedirectToWallet)||((s=this.actionsConfiguration)==null?void 0:s.skipRedirectToWallet)||"ios";return qr()&&(b="never"),{notifications:c,modals:f,returnStrategy:g,twaReturnUrl:h,skipRedirectToWallet:b}}}var yx=Object.defineProperty,uu=Object.getOwnPropertySymbols,Jg=Object.prototype.hasOwnProperty,Xg=Object.prototype.propertyIsEnumerable,G4=(e,t,n)=>t in e?yx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wx=(e,t)=>{for(var n in t||(t={}))Jg.call(t,n)&&G4(e,n,t[n]);if(uu)for(var n of uu(t))Xg.call(t,n)&&G4(e,n,t[n]);return e},xx=(e,t)=>{var n={};for(var r in e)Jg.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&uu)for(var r of uu(e))t.indexOf(r)<0&&Xg.call(e,r)&&(n[r]=e[r]);return n},ep={exports:{}},dl={};/** - * @license React - * react-jsx-runtime.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Y4;function Cx(){if(Y4)return dl;Y4=1;var e=Ur,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function l(s,u,c){var f,g={},h=null,b=null;c!==void 0&&(h=""+c),u.key!==void 0&&(h=""+u.key),u.ref!==void 0&&(b=u.ref);for(f in u)r.call(u,f)&&!i.hasOwnProperty(f)&&(g[f]=u[f]);if(s&&s.defaultProps)for(f in u=s.defaultProps,u)g[f]===void 0&&(g[f]=u[f]);return{$$typeof:t,type:s,key:h,ref:b,props:g,_owner:o.current}}return dl.Fragment=n,dl.jsx=l,dl.jsxs=l,dl}(function(e){e.exports=Cx()})(ep);const tp=ep.exports.jsx;function np(){return typeof window<"u"}function bx(){return!np()}const rp=hn.createContext(null);let jc=null;const Sx=e=>{var t=e,{children:n}=t,r=xx(t,["children"]);return np()&&!jc&&(jc=new vx(r)),tp(rp.Provider,{value:jc,children:n})},Ex=hn.memo(Sx);class Rd extends Ut{constructor(...t){super(...t),Object.setPrototypeOf(this,Rd.prototype)}}class Pd extends Rd{constructor(...t){super(...t),Object.setPrototypeOf(this,Pd.prototype)}}function kx(e){if(!e)throw new Pd("You should add on the top of the app to use TonConnect");return!0}function op(){const e=hn.useContext(rp),t=hn.useCallback(n=>{e&&(e.uiOptions=n)},[e]);return bx()?[null,()=>{}]:(kx(e),[e,t])}const Z4="ton-connect-button",_x=({className:e,style:t})=>{const[n,r]=op();return hn.useEffect(()=>(r({buttonRootId:Z4}),()=>r({buttonRootId:null})),[r]),tp("div",{id:Z4,className:e,style:wx({width:"fit-content"},t)})},Ax=hn.memo(_x);function Tx(){const[e]=op(),[t,n]=hn.useState((e==null?void 0:e.wallet)||null);return hn.useEffect(()=>{if(e)return n(e.wallet),e.onStatusChange(r=>{n(r)})},[e]),t}function ip(e,t){return function(){return e.apply(t,arguments)}}const{toString:Lx}=Object.prototype,{getPrototypeOf:Md}=Object,Vu=(e=>t=>{const n=Lx.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),fr=e=>(e=e.toLowerCase(),t=>Vu(t)===e),Ku=e=>t=>typeof t===e,{isArray:Xi}=Array,hs=Ku("undefined");function Rx(e){return e!==null&&!hs(e)&&e.constructor!==null&&!hs(e.constructor)&&Jn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const lp=fr("ArrayBuffer");function Px(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&lp(e.buffer),t}const Mx=Ku("string"),Jn=Ku("function"),sp=Ku("number"),qu=e=>e!==null&&typeof e=="object",Nx=e=>e===!0||e===!1,va=e=>{if(Vu(e)!=="object")return!1;const t=Md(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},$x=fr("Date"),Ix=fr("File"),Bx=fr("Blob"),Ox=fr("FileList"),Ux=e=>qu(e)&&Jn(e.pipe),Dx=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Jn(e.append)&&((t=Vu(e))==="formdata"||t==="object"&&Jn(e.toString)&&e.toString()==="[object FormData]"))},jx=fr("URLSearchParams"),[Fx,Wx,Hx,zx]=["ReadableStream","Request","Response","Headers"].map(fr),Vx=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ts(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Xi(e))for(r=0,o=e.length;r0;)if(o=n[r],t===o.toLowerCase())return o;return null}const up=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,cp=e=>!hs(e)&&e!==up;function ef(){const{caseless:e}=cp(this)&&this||{},t={},n=(r,o)=>{const i=e&&ap(t,o)||o;va(t[i])&&va(r)?t[i]=ef(t[i],r):va(r)?t[i]=ef({},r):Xi(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r(Ts(t,(o,i)=>{n&&Jn(o)?e[i]=ip(o,n):e[i]=o},{allOwnKeys:r}),e),qx=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Qx=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Gx=(e,t,n,r)=>{let o,i,l;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)l=o[i],(!r||r(l,e,t))&&!s[l]&&(t[l]=e[l],s[l]=!0);e=n!==!1&&Md(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Yx=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Zx=e=>{if(!e)return null;if(Xi(e))return e;let t=e.length;if(!sp(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Jx=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Md(Uint8Array)),Xx=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},eC=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},tC=fr("HTMLFormElement"),nC=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),J4=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),rC=fr("RegExp"),fp=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ts(n,(o,i)=>{let l;(l=t(o,i,e))!==!1&&(r[i]=l||o)}),Object.defineProperties(e,r)},oC=e=>{fp(e,(t,n)=>{if(Jn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Jn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},iC=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return Xi(e)?r(e):r(String(e).split(t)),n},lC=()=>{},sC=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Fc="abcdefghijklmnopqrstuvwxyz",X4="0123456789",dp={DIGIT:X4,ALPHA:Fc,ALPHA_DIGIT:Fc+Fc.toUpperCase()+X4},aC=(e=16,t=dp.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function uC(e){return!!(e&&Jn(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const cC=e=>{const t=new Array(10),n=(r,o)=>{if(qu(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=Xi(r)?[]:{};return Ts(r,(l,s)=>{const u=n(l,o+1);!hs(u)&&(i[s]=u)}),t[o]=void 0,i}}return r};return n(e,0)},fC=fr("AsyncFunction"),dC=e=>e&&(qu(e)||Jn(e))&&Jn(e.then)&&Jn(e.catch),F={isArray:Xi,isArrayBuffer:lp,isBuffer:Rx,isFormData:Dx,isArrayBufferView:Px,isString:Mx,isNumber:sp,isBoolean:Nx,isObject:qu,isPlainObject:va,isReadableStream:Fx,isRequest:Wx,isResponse:Hx,isHeaders:zx,isUndefined:hs,isDate:$x,isFile:Ix,isBlob:Bx,isRegExp:rC,isFunction:Jn,isStream:Ux,isURLSearchParams:jx,isTypedArray:Jx,isFileList:Ox,forEach:Ts,merge:ef,extend:Kx,trim:Vx,stripBOM:qx,inherits:Qx,toFlatObject:Gx,kindOf:Vu,kindOfTest:fr,endsWith:Yx,toArray:Zx,forEachEntry:Xx,matchAll:eC,isHTMLForm:tC,hasOwnProperty:J4,hasOwnProp:J4,reduceDescriptors:fp,freezeMethods:oC,toObjectSet:iC,toCamelCase:nC,noop:lC,toFiniteNumber:sC,findKey:ap,global:up,isContextDefined:cp,ALPHABET:dp,generateString:aC,isSpecCompliantForm:uC,toJSONObject:cC,isAsyncFn:fC,isThenable:dC};function ze(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}F.inherits(ze,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:F.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const hp=ze.prototype,gp={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{gp[e]={value:e}});Object.defineProperties(ze,gp);Object.defineProperty(hp,"isAxiosError",{value:!0});ze.from=(e,t,n,r,o,i)=>{const l=Object.create(hp);return F.toFlatObject(e,l,function(u){return u!==Error.prototype},s=>s!=="isAxiosError"),ze.call(l,e.message,t,n,r,o),l.cause=e,l.name=e.name,i&&Object.assign(l,i),l};const hC=null;function tf(e){return F.isPlainObject(e)||F.isArray(e)}function pp(e){return F.endsWith(e,"[]")?e.slice(0,-2):e}function eh(e,t,n){return e?e.concat(t).map(function(o,i){return o=pp(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function gC(e){return F.isArray(e)&&!e.some(tf)}const pC=F.toFlatObject(F,{},null,function(t){return/^is[A-Z]/.test(t)});function Qu(e,t,n){if(!F.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=F.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(S,P){return!F.isUndefined(P[S])});const r=n.metaTokens,o=n.visitor||f,i=n.dots,l=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&F.isSpecCompliantForm(t);if(!F.isFunction(o))throw new TypeError("visitor must be a function");function c(y){if(y===null)return"";if(F.isDate(y))return y.toISOString();if(!u&&F.isBlob(y))throw new ze("Blob is not supported. Use a Buffer instead.");return F.isArrayBuffer(y)||F.isTypedArray(y)?u&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function f(y,S,P){let E=y;if(y&&!P&&typeof y=="object"){if(F.endsWith(S,"{}"))S=r?S:S.slice(0,-2),y=JSON.stringify(y);else if(F.isArray(y)&&gC(y)||(F.isFileList(y)||F.endsWith(S,"[]"))&&(E=F.toArray(y)))return S=pp(S),E.forEach(function(C,_){!(F.isUndefined(C)||C===null)&&t.append(l===!0?eh([S],_,i):l===null?S:S+"[]",c(C))}),!1}return tf(y)?!0:(t.append(eh(P,S,i),c(y)),!1)}const g=[],h=Object.assign(pC,{defaultVisitor:f,convertValue:c,isVisitable:tf});function b(y,S){if(!F.isUndefined(y)){if(g.indexOf(y)!==-1)throw Error("Circular reference detected in "+S.join("."));g.push(y),F.forEach(y,function(E,w){(!(F.isUndefined(E)||E===null)&&o.call(t,E,F.isString(w)?w.trim():w,S,h))===!0&&b(E,S?S.concat(w):[w])}),g.pop()}}if(!F.isObject(e))throw new TypeError("data must be an object");return b(e),t}function th(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Nd(e,t){this._pairs=[],e&&Qu(e,this,t)}const mp=Nd.prototype;mp.append=function(t,n){this._pairs.push([t,n])};mp.toString=function(t){const n=t?function(r){return t.call(this,r,th)}:th;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function mC(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function vp(e,t,n){if(!t)return e;const r=n&&n.encode||mC,o=n&&n.serialize;let i;if(o?i=o(t,n):i=F.isURLSearchParams(t)?t.toString():new Nd(t,n).toString(r),i){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class nh{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){F.forEach(this.handlers,function(r){r!==null&&t(r)})}}const yp={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},vC=typeof URLSearchParams<"u"?URLSearchParams:Nd,yC=typeof FormData<"u"?FormData:null,wC=typeof Blob<"u"?Blob:null,xC={isBrowser:!0,classes:{URLSearchParams:vC,FormData:yC,Blob:wC},protocols:["http","https","file","blob","url","data"]},$d=typeof window<"u"&&typeof document<"u",CC=(e=>$d&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),bC=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",SC=$d&&window.location.href||"http://localhost",EC=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:$d,hasStandardBrowserEnv:CC,hasStandardBrowserWebWorkerEnv:bC,origin:SC},Symbol.toStringTag,{value:"Module"})),ar={...EC,...xC};function kC(e,t){return Qu(e,new ar.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return ar.isNode&&F.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function _C(e){return F.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function AC(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r=n.length;return l=!l&&F.isArray(o)?o.length:l,u?(F.hasOwnProp(o,l)?o[l]=[o[l],r]:o[l]=r,!s):((!o[l]||!F.isObject(o[l]))&&(o[l]=[]),t(n,r,o[l],i)&&F.isArray(o[l])&&(o[l]=AC(o[l])),!s)}if(F.isFormData(e)&&F.isFunction(e.entries)){const n={};return F.forEachEntry(e,(r,o)=>{t(_C(r),o,n,0)}),n}return null}function TC(e,t,n){if(F.isString(e))try{return(t||JSON.parse)(e),F.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Ls={transitional:yp,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=F.isObject(t);if(i&&F.isHTMLForm(t)&&(t=new FormData(t)),F.isFormData(t))return o?JSON.stringify(wp(t)):t;if(F.isArrayBuffer(t)||F.isBuffer(t)||F.isStream(t)||F.isFile(t)||F.isBlob(t)||F.isReadableStream(t))return t;if(F.isArrayBufferView(t))return t.buffer;if(F.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return kC(t,this.formSerializer).toString();if((s=F.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Qu(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),TC(t)):t}],transformResponse:[function(t){const n=this.transitional||Ls.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(F.isResponse(t)||F.isReadableStream(t))return t;if(t&&F.isString(t)&&(r&&!this.responseType||o)){const l=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(s){if(l)throw s.name==="SyntaxError"?ze.from(s,ze.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ar.classes.FormData,Blob:ar.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};F.forEach(["delete","get","head","post","put","patch"],e=>{Ls.headers[e]={}});const LC=F.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),RC=e=>{const t={};let n,r,o;return e&&e.split(` -`).forEach(function(l){o=l.indexOf(":"),n=l.substring(0,o).trim().toLowerCase(),r=l.substring(o+1).trim(),!(!n||t[n]&&LC[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},rh=Symbol("internals");function hl(e){return e&&String(e).trim().toLowerCase()}function ya(e){return e===!1||e==null?e:F.isArray(e)?e.map(ya):String(e)}function PC(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const MC=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Wc(e,t,n,r,o){if(F.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!F.isString(t)){if(F.isString(r))return t.indexOf(r)!==-1;if(F.isRegExp(r))return r.test(t)}}function NC(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function $C(e,t){const n=F.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,l){return this[r].call(this,t,o,i,l)},configurable:!0})})}class Rn{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(s,u,c){const f=hl(u);if(!f)throw new Error("header name must be a non-empty string");const g=F.findKey(o,f);(!g||o[g]===void 0||c===!0||c===void 0&&o[g]!==!1)&&(o[g||u]=ya(s))}const l=(s,u)=>F.forEach(s,(c,f)=>i(c,f,u));if(F.isPlainObject(t)||t instanceof this.constructor)l(t,n);else if(F.isString(t)&&(t=t.trim())&&!MC(t))l(RC(t),n);else if(F.isHeaders(t))for(const[s,u]of t.entries())i(u,s,r);else t!=null&&i(n,t,r);return this}get(t,n){if(t=hl(t),t){const r=F.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return PC(o);if(F.isFunction(n))return n.call(this,o,r);if(F.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=hl(t),t){const r=F.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Wc(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(l){if(l=hl(l),l){const s=F.findKey(r,l);s&&(!n||Wc(r,r[s],s,n))&&(delete r[s],o=!0)}}return F.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||Wc(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return F.forEach(this,(o,i)=>{const l=F.findKey(r,i);if(l){n[l]=ya(o),delete n[i];return}const s=t?NC(i):String(i).trim();s!==i&&delete n[i],n[s]=ya(o),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return F.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&F.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[rh]=this[rh]={accessors:{}}).accessors,o=this.prototype;function i(l){const s=hl(l);r[s]||($C(o,l),r[s]=!0)}return F.isArray(t)?t.forEach(i):i(t),this}}Rn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);F.reduceDescriptors(Rn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});F.freezeMethods(Rn);function Hc(e,t){const n=this||Ls,r=t||n,o=Rn.from(r.headers);let i=r.data;return F.forEach(e,function(s){i=s.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function xp(e){return!!(e&&e.__CANCEL__)}function el(e,t,n){ze.call(this,e??"canceled",ze.ERR_CANCELED,t,n),this.name="CanceledError"}F.inherits(el,ze,{__CANCEL__:!0});function Cp(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ze("Request failed with status code "+n.status,[ze.ERR_BAD_REQUEST,ze.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function IC(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function BC(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,l;return t=t!==void 0?t:1e3,function(u){const c=Date.now(),f=r[i];l||(l=c),n[o]=u,r[o]=c;let g=i,h=0;for(;g!==o;)h+=n[g++],g=g%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),c-lr)return o&&(clearTimeout(o),o=null),n=s,e.apply(null,arguments);o||(o=setTimeout(()=>(o=null,n=Date.now(),e.apply(null,arguments)),r-(s-n)))}}const cu=(e,t,n=3)=>{let r=0;const o=BC(50,250);return OC(i=>{const l=i.loaded,s=i.lengthComputable?i.total:void 0,u=l-r,c=o(u),f=l<=s;r=l;const g={loaded:l,total:s,progress:s?l/s:void 0,bytes:u,rate:c||void 0,estimated:c&&s&&f?(s-l)/c:void 0,event:i,lengthComputable:s!=null};g[t?"download":"upload"]=!0,e(g)},n)},UC=ar.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function o(i){let l=i;return t&&(n.setAttribute("href",l),l=n.href),n.setAttribute("href",l),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(l){const s=F.isString(l)?o(l):l;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}(),DC=ar.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const l=[e+"="+encodeURIComponent(t)];F.isNumber(n)&&l.push("expires="+new Date(n).toGMTString()),F.isString(r)&&l.push("path="+r),F.isString(o)&&l.push("domain="+o),i===!0&&l.push("secure"),document.cookie=l.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function jC(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function FC(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function bp(e,t){return e&&!jC(t)?FC(e,t):t}const oh=e=>e instanceof Rn?{...e}:e;function ti(e,t){t=t||{};const n={};function r(c,f,g){return F.isPlainObject(c)&&F.isPlainObject(f)?F.merge.call({caseless:g},c,f):F.isPlainObject(f)?F.merge({},f):F.isArray(f)?f.slice():f}function o(c,f,g){if(F.isUndefined(f)){if(!F.isUndefined(c))return r(void 0,c,g)}else return r(c,f,g)}function i(c,f){if(!F.isUndefined(f))return r(void 0,f)}function l(c,f){if(F.isUndefined(f)){if(!F.isUndefined(c))return r(void 0,c)}else return r(void 0,f)}function s(c,f,g){if(g in t)return r(c,f);if(g in e)return r(void 0,c)}const u={url:i,method:i,data:i,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:s,headers:(c,f)=>o(oh(c),oh(f),!0)};return F.forEach(Object.keys(Object.assign({},e,t)),function(f){const g=u[f]||o,h=g(e[f],t[f],f);F.isUndefined(h)&&g!==s||(n[f]=h)}),n}const Sp=e=>{const t=ti({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:l,auth:s}=t;t.headers=l=Rn.from(l),t.url=vp(bp(t.baseURL,t.url),e.params,e.paramsSerializer),s&&l.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let u;if(F.isFormData(n)){if(ar.hasStandardBrowserEnv||ar.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if((u=l.getContentType())!==!1){const[c,...f]=u?u.split(";").map(g=>g.trim()).filter(Boolean):[];l.setContentType([c||"multipart/form-data",...f].join("; "))}}if(ar.hasStandardBrowserEnv&&(r&&F.isFunction(r)&&(r=r(t)),r||r!==!1&&UC(t.url))){const c=o&&i&&DC.read(i);c&&l.set(o,c)}return t},WC=typeof XMLHttpRequest<"u",HC=WC&&function(e){return new Promise(function(n,r){const o=Sp(e);let i=o.data;const l=Rn.from(o.headers).normalize();let{responseType:s}=o,u;function c(){o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let f=new XMLHttpRequest;f.open(o.method.toUpperCase(),o.url,!0),f.timeout=o.timeout;function g(){if(!f)return;const b=Rn.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),S={data:!s||s==="text"||s==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:b,config:e,request:f};Cp(function(E){n(E),c()},function(E){r(E),c()},S),f=null}"onloadend"in f?f.onloadend=g:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(g)},f.onabort=function(){f&&(r(new ze("Request aborted",ze.ECONNABORTED,o,f)),f=null)},f.onerror=function(){r(new ze("Network Error",ze.ERR_NETWORK,o,f)),f=null},f.ontimeout=function(){let y=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const S=o.transitional||yp;o.timeoutErrorMessage&&(y=o.timeoutErrorMessage),r(new ze(y,S.clarifyTimeoutError?ze.ETIMEDOUT:ze.ECONNABORTED,o,f)),f=null},i===void 0&&l.setContentType(null),"setRequestHeader"in f&&F.forEach(l.toJSON(),function(y,S){f.setRequestHeader(S,y)}),F.isUndefined(o.withCredentials)||(f.withCredentials=!!o.withCredentials),s&&s!=="json"&&(f.responseType=o.responseType),typeof o.onDownloadProgress=="function"&&f.addEventListener("progress",cu(o.onDownloadProgress,!0)),typeof o.onUploadProgress=="function"&&f.upload&&f.upload.addEventListener("progress",cu(o.onUploadProgress)),(o.cancelToken||o.signal)&&(u=b=>{f&&(r(!b||b.type?new el(null,e,f):b),f.abort(),f=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const h=IC(o.url);if(h&&ar.protocols.indexOf(h)===-1){r(new ze("Unsupported protocol "+h+":",ze.ERR_BAD_REQUEST,e));return}f.send(i||null)})},zC=(e,t)=>{let n=new AbortController,r;const o=function(u){if(!r){r=!0,l();const c=u instanceof Error?u:this.reason;n.abort(c instanceof ze?c:new el(c instanceof Error?c.message:c))}};let i=t&&setTimeout(()=>{o(new ze(`timeout ${t} of ms exceeded`,ze.ETIMEDOUT))},t);const l=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(u=>{u&&(u.removeEventListener?u.removeEventListener("abort",o):u.unsubscribe(o))}),e=null)};e.forEach(u=>u&&u.addEventListener&&u.addEventListener("abort",o));const{signal:s}=n;return s.unsubscribe=l,[s,()=>{i&&clearTimeout(i),i=null}]},VC=function*(e,t){let n=e.byteLength;if(!t||n{const i=KC(e,t,o);let l=0;return new ReadableStream({type:"bytes",async pull(s){const{done:u,value:c}=await i.next();if(u){s.close(),r();return}let f=c.byteLength;n&&n(l+=f),s.enqueue(new Uint8Array(c))},cancel(s){return r(s),i.return()}},{highWaterMark:2})},lh=(e,t)=>{const n=e!=null;return r=>setTimeout(()=>t({lengthComputable:n,total:e,loaded:r}))},Gu=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Ep=Gu&&typeof ReadableStream=="function",nf=Gu&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),qC=Ep&&(()=>{let e=!1;const t=new Request(ar.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})(),sh=64*1024,rf=Ep&&!!(()=>{try{return F.isReadableStream(new Response("").body)}catch{}})(),fu={stream:rf&&(e=>e.body)};Gu&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!fu[t]&&(fu[t]=F.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new ze(`Response type '${t}' is not supported`,ze.ERR_NOT_SUPPORT,r)})})})(new Response);const QC=async e=>{if(e==null)return 0;if(F.isBlob(e))return e.size;if(F.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(F.isArrayBufferView(e))return e.byteLength;if(F.isURLSearchParams(e)&&(e=e+""),F.isString(e))return(await nf(e)).byteLength},GC=async(e,t)=>{const n=F.toFiniteNumber(e.getContentLength());return n??QC(t)},YC=Gu&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:l,onDownloadProgress:s,onUploadProgress:u,responseType:c,headers:f,withCredentials:g="same-origin",fetchOptions:h}=Sp(e);c=c?(c+"").toLowerCase():"text";let[b,y]=o||i||l?zC([o,i],l):[],S,P;const E=()=>{!S&&setTimeout(()=>{b&&b.unsubscribe()}),S=!0};let w;try{if(u&&qC&&n!=="get"&&n!=="head"&&(w=await GC(f,r))!==0){let I=new Request(t,{method:"POST",body:r,duplex:"half"}),M;F.isFormData(r)&&(M=I.headers.get("content-type"))&&f.setContentType(M),I.body&&(r=ih(I.body,sh,lh(w,cu(u)),null,nf))}F.isString(g)||(g=g?"cors":"omit"),P=new Request(t,{...h,signal:b,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",withCredentials:g});let C=await fetch(P);const _=rf&&(c==="stream"||c==="response");if(rf&&(s||_)){const I={};["status","statusText","headers"].forEach(T=>{I[T]=C[T]});const M=F.toFiniteNumber(C.headers.get("content-length"));C=new Response(ih(C.body,sh,s&&lh(M,cu(s,!0)),_&&E,nf),I)}c=c||"text";let A=await fu[F.findKey(fu,c)||"text"](C,e);return!_&&E(),y&&y(),await new Promise((I,M)=>{Cp(I,M,{data:A,headers:Rn.from(C.headers),status:C.status,statusText:C.statusText,config:e,request:P})})}catch(C){throw E(),C&&C.name==="TypeError"&&/fetch/i.test(C.message)?Object.assign(new ze("Network Error",ze.ERR_NETWORK,e,P),{cause:C.cause||C}):ze.from(C,C&&C.code,e,P)}}),of={http:hC,xhr:HC,fetch:YC};F.forEach(of,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const ah=e=>`- ${e}`,ZC=e=>F.isFunction(e)||e===null||e===!1,kp={getAdapter:e=>{e=F.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i`adapter ${s} `+(u===!1?"is not supported by the environment":"is not available in the build"));let l=t?i.length>1?`since : -`+i.map(ah).join(` -`):" "+ah(i[0]):"as no adapter specified";throw new ze("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return r},adapters:of};function zc(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new el(null,e)}function uh(e){return zc(e),e.headers=Rn.from(e.headers),e.data=Hc.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),kp.getAdapter(e.adapter||Ls.adapter)(e).then(function(r){return zc(e),r.data=Hc.call(e,e.transformResponse,r),r.headers=Rn.from(r.headers),r},function(r){return xp(r)||(zc(e),r&&r.response&&(r.response.data=Hc.call(e,e.transformResponse,r.response),r.response.headers=Rn.from(r.response.headers))),Promise.reject(r)})}const _p="1.7.2",Id={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Id[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const ch={};Id.transitional=function(t,n,r){function o(i,l){return"[Axios v"+_p+"] Transitional option '"+i+"'"+l+(r?". "+r:"")}return(i,l,s)=>{if(t===!1)throw new ze(o(l," has been removed"+(n?" in "+n:"")),ze.ERR_DEPRECATED);return n&&!ch[l]&&(ch[l]=!0,console.warn(o(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,l,s):!0}};function JC(e,t,n){if(typeof e!="object")throw new ze("options must be an object",ze.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],l=t[i];if(l){const s=e[i],u=s===void 0||l(s,i,e);if(u!==!0)throw new ze("option "+i+" must be "+u,ze.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ze("Unknown option "+i,ze.ERR_BAD_OPTION)}}const lf={assertOptions:JC,validators:Id},to=lf.validators;class Qo{constructor(t){this.defaults=t,this.interceptors={request:new nh,response:new nh}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=` -`+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ti(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&lf.assertOptions(r,{silentJSONParsing:to.transitional(to.boolean),forcedJSONParsing:to.transitional(to.boolean),clarifyTimeoutError:to.transitional(to.boolean)},!1),o!=null&&(F.isFunction(o)?n.paramsSerializer={serialize:o}:lf.assertOptions(o,{encode:to.function,serialize:to.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=i&&F.merge(i.common,i[n.method]);i&&F.forEach(["delete","get","head","post","put","patch","common"],y=>{delete i[y]}),n.headers=Rn.concat(l,i);const s=[];let u=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(n)===!1||(u=u&&S.synchronous,s.unshift(S.fulfilled,S.rejected))});const c=[];this.interceptors.response.forEach(function(S){c.push(S.fulfilled,S.rejected)});let f,g=0,h;if(!u){const y=[uh.bind(this),void 0];for(y.unshift.apply(y,s),y.push.apply(y,c),h=y.length,f=Promise.resolve(n);g{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const l=new Promise(s=>{r.subscribe(s),i=s}).then(o);return l.cancel=function(){r.unsubscribe(i)},l},t(function(i,l,s){r.reason||(r.reason=new el(i,l,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Bd(function(o){t=o}),cancel:t}}}function XC(e){return function(n){return e.apply(null,n)}}function eb(e){return F.isObject(e)&&e.isAxiosError===!0}const sf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(sf).forEach(([e,t])=>{sf[t]=e});function Ap(e){const t=new Qo(e),n=ip(Qo.prototype.request,t);return F.extend(n,Qo.prototype,t,{allOwnKeys:!0}),F.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Ap(ti(e,o))},n}const Ht=Ap(Ls);Ht.Axios=Qo;Ht.CanceledError=el;Ht.CancelToken=Bd;Ht.isCancel=xp;Ht.VERSION=_p;Ht.toFormData=Qu;Ht.AxiosError=ze;Ht.Cancel=Ht.CanceledError;Ht.all=function(t){return Promise.all(t)};Ht.spread=XC;Ht.isAxiosError=eb;Ht.mergeConfig=ti;Ht.AxiosHeaders=Rn;Ht.formToJSON=e=>wp(F.isHTMLForm(e)?new FormData(e):e);Ht.getAdapter=kp.getAdapter;Ht.HttpStatusCode=sf;Ht.default=Ht;const tb=e=>{const t=new Date(e*1e3/1e3),n=t.getFullYear(),r=("0"+(t.getMonth()+1)).slice(-2),o=("0"+t.getDate()).slice(-2),i=("0"+t.getHours()).slice(-2),l=("0"+t.getMinutes()).slice(-2);return`${n}-${r}-${o} ${i}:${l}`},nb=e=>{if(e===0)return"0 B";const t=["B","KB","MB","GB","TB"],n=parseInt(String(Math.floor(Math.log(e)/Math.log(1024))));return`${(e/Math.pow(1024,n)).toFixed(2)} ${t[n]}`},fh=(e,t,n)=>{if(e.length<=t+n)return e;const r=e.slice(0,t),o=e.slice(-n);return`${r}...${o}`},rb=({header:e=[],data:t=[]})=>Oe.jsx(Oe.Fragment,{children:Oe.jsxs("table",{className:" overflow-auto",children:[Oe.jsx("tr",{className:" bg-[#FAFAFA] rounded-lg h-[50px] w-[200px] border-b-[#FFFFFF] ",children:e.map((n,r)=>Oe.jsx("th",{className:" w-full",children:n.name},`table_${r}`))}),t.length>0&&t.map((n,r)=>Oe.jsxs("tr",{className:"bg-[#FFFFFF] border-b",children:[Oe.jsx("td",{children:Oe.jsx("div",{className:"w-[150px]",children:fh(n.fileName,10,4)})}),Oe.jsx("td",{children:Oe.jsx("div",{className:"w-[100px]",children:fh(n.id,5,5)})}),Oe.jsx("td",{children:Oe.jsx("div",{className:"w-[100px]",children:nb(Number(n.fileSize))})}),Oe.jsx("td",{children:Oe.jsx("div",{className:"w-[150px]",children:tb(Number(n.uploadDate))})}),Oe.jsx("td",{children:Oe.jsx("div",{className:"w-[100px]",children:n.from})})]},`col_${r}`))]})});var Tp={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},dh=Ur.createContext&&Ur.createContext(Tp),ob=["attr","size","title"];function ib(e,t){if(e==null)return{};var n=lb(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function lb(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function du(){return du=Object.assign?Object.assign.bind():function(e){for(var t=1;tUr.createElement(t.tag,hu({key:n},t.attr),Lp(t.child)))}function Yu(e){return t=>Ur.createElement(cb,du({attr:hu({},e.attr)},t),Lp(e.child))}function cb(e){var t=n=>{var{attr:r,size:o,title:i}=e,l=ib(e,ob),s=o||n.size||"1em",u;return n.className&&(u=n.className),e.className&&(u=(u?u+" ":"")+e.className),Ur.createElement("svg",du({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,l,{className:u,style:hu(hu({color:e.color||n.color},n.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),i&&Ur.createElement("title",null,i),e.children)};return dh!==void 0?Ur.createElement(dh.Consumer,null,n=>t(n)):t(Tp)}function fb(e){return Yu({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"15 18 9 12 15 6"},child:[]}]})(e)}function db(e){return Yu({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"9 18 15 12 9 6"},child:[]}]})(e)}function hb(e){return Yu({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"11 17 6 12 11 7"},child:[]},{tag:"polyline",attr:{points:"18 17 13 12 18 7"},child:[]}]})(e)}function gb(e){return Yu({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"13 17 18 12 13 7"},child:[]},{tag:"polyline",attr:{points:"6 17 11 12 6 7"},child:[]}]})(e)}const $o="...",pb=e=>{const t=(b,y)=>{const S=[];if(y){for(let P=b;Ps<=1?[]:s<=6?t(s).map(b=>({name:`${b+1}`})):o<=3?t(o+1).map(b=>({name:`${b+1}`})).concat([{name:$o},{name:""+s}]):o>=s-2?[{name:"1"},{name:$o}].concat(t(o-2,s).map(b=>({name:`${b+1}`}))):[{name:"1"},{name:$o},{name:o-1+""},{name:o+""},{name:o+1+""},{name:$o},{name:s+""}],[s,o]),c=()=>{i&&o{o!==1&&i&&i(1,s)},g=()=>{i&&o>1&&i(o-1,s)},h=()=>{s!==o&&i&&i(s)};return n<=r?null:Oe.jsx("div",{className:Ni("flex justify-center text-[0.8125rem] text-center leading-8 font-semibold",l),children:Oe.jsxs("div",{className:"flex",children:[s>1&&Oe.jsxs("div",{className:"flex",children:[Oe.jsx("span",{onClick:f,className:"mx-[0.185rem] flex justify-center items-center cursor-pointer border min-w-[32px] h-[32px] ",children:Oe.jsx(hb,{className:"text-[gray]"})}),Oe.jsx("span",{onClick:g,className:"mx-[0.185rem] flex justify-center items-center cursor-pointer border min-w-[32px] h-[32px] ",children:Oe.jsx(fb,{className:"text-[gray]"})})]}),u.map((b,y)=>Oe.jsx("div",{className:Ni(b.name===""+o?"text-[#1980B6] border-[#1980B6]":"text-[gray]",{omit:b.name===$o},"mx-[0.185rem] flex items-center justify-center min-w-[32px] h-[32px] px-1.5 ",b.name!=$o&&"border cursor-pointer"),onClick:()=>{i&&b.name!==$o&&i(+b.name,s)},children:b.name},`key_page_${y}`)),s>1&&Oe.jsxs("div",{className:"flex",children:[Oe.jsx("span",{onClick:c,className:"mx-[0.185rem] flex justify-center items-center cursor-pointer border min-w-[32px] h-[32px] ",children:Oe.jsx(db,{className:"text-[gray]"})}),Oe.jsx("span",{onClick:h,className:" mx-[0.185rem] flex justify-center items-center cursor-pointer border min-w-[32px] h-[32px] ",children:Oe.jsx(gb,{className:"text-[gray]"})})]})]})})},mb=()=>{var s,u,c,f;const[e,t]=hn.useState(),n=Tx(),[r,o]=hn.useState(1),i=(n==null?void 0:n.account.address)&&ud(n.account.address,!1),l=hn.useCallback(async()=>{if(!i)return;const{status:g,data:h={success:!1,data:[]}}=await Ht(`https://tonbags-api.crust.network/users?address=${i}&page=${r}&pageSize=10`);g===200&&h.success===!0&&(t({}),t(h))},[i,r]);return hn.useEffect(()=>{l()},[l]),Oe.jsxs("div",{className:" mb-40",children:[Oe.jsx("div",{className:" flex justify-center",children:Oe.jsx(Ax,{})}),i&&Oe.jsx("div",{className:" border-[#snow] my-5 ",children:Oe.jsxs("div",{children:[Oe.jsx("div",{className:" text-xl text-left text-black ",children:"My Files"}),Oe.jsxs("div",{className:" flex w-full gap-5 mt-5 text-black",children:[Oe.jsxs("div",{children:["Files Stored: ",((s=e==null?void 0:e.pagination)==null?void 0:s.totalRecords)||""]}),Oe.jsxs("div",{children:["Space Usage: ",e==null?void 0:e.countFileSize]})]}),Oe.jsx("div",{className:"mt-5 mo:w-[350px] overflow-auto ",children:Oe.jsx(rb,{header:[{name:"Name"},{name:"BagID"},{name:"Size"},{name:"Upload Date"},{name:"From"}],data:e==null?void 0:e.data})}),Oe.jsx("div",{className:" mt-10",children:Oe.jsx(pb,{onChange:(g,h)=>{o(g)},total:((u=e==null?void 0:e.pagination)==null?void 0:u.totalRecords)||0,pgSize:((c=e==null?void 0:e.pagination)==null?void 0:c.pageSize)||1,pgNum:((f=e==null?void 0:e.pagination)==null?void 0:f.page)||10})})]})})]})};function vb(){return Oe.jsx(mb,{})}Vc.createRoot(document.getElementById("root")).render(Oe.jsx(Ur.StrictMode,{children:Oe.jsx(Ex,{manifestUrl:"https://mini-app.crust.network/tonconnect-manifest.json",children:Oe.jsx(vb,{})})})); diff --git a/src/components/ATable.tsx b/src/components/ATable.tsx index 56a7d2f..7118ce4 100644 --- a/src/components/ATable.tsx +++ b/src/components/ATable.tsx @@ -11,8 +11,8 @@ type ATableProps = { const ATable: FC = ({ header = [], data = [], loading }) => { const fileHost = (item: data) => { - const cru_host = import.meta.env.VITE_API_DOWNLOAD_CRU_URL || '' - const ton_host = import.meta.env.VITE_API_DOWNLOAD_TON_URL || '' + const cru_host = 'https://gw.crust-gateway.xyz/ipfs' + const ton_host = 'https://ton-gateway.crust.network/gateway' if (!cru_host || !ton_host) return let host = `${item.bagId ? ton_host : cru_host}/${item.cid || item.bagId}?filename=${encodeURI(item.fileName)}` return host diff --git a/src/pages/files.tsx b/src/pages/files.tsx index 8f9d4bf..c976b61 100644 --- a/src/pages/files.tsx +++ b/src/pages/files.tsx @@ -45,9 +45,8 @@ const Files = () => { // const userFriendlyAddress = tonAdd?.account.address && toUserFriendlyAddress(tonAdd.account.address, false) const getCurrentUserInfo = async () => { - const baseUrl = import.meta.env.VITE_API_BASEURL || '' setLoading(true) - const url = `${baseUrl}?address=${add.address}&page=${pgNum}&pageSize=10` + const url = `https://tonbags-api.crust.network/users?address=${add.address}&page=${pgNum}&pageSize=10` if (!add?.address) return fetch(url, { headers: { 'Content-Type': 'application/json' }