@tonconnect/ui 2.0.1-beta.7 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tonconnect-ui.min.js +1 -1
- package/dist/tonconnect-ui.min.js.map +1 -1
- package/lib/index.cjs +1 -1
- package/lib/index.cjs.map +1 -1
- package/lib/index.mjs +1 -1
- package/lib/index.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -596,7 +596,7 @@ var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnP
|
|
|
596
596
|
> div:first-child {
|
|
597
597
|
margin-top: 20px;
|
|
598
598
|
}
|
|
599
|
-
`;function Ia(e){return e.split("-")[0]}function Na(e,t,n){let{reference:r,floating:o}=e;const i=r.x+r.width/2-o.width/2,s=r.y+r.height/2-o.height/2,a=function(e){return["top","bottom"].includes(Ia(e))?"x":"y"}(t),l="y"===a?"height":"width";const c=r[l]/2-o[l]/2,u="x"===a;let d;switch(Ia(t)){case"top":d={x:i,y:r.y-o.height};break;case"bottom":d={x:i,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:s};break;case"left":d={x:r.x-o.width,y:s};break;default:d={x:r.x,y:r.y}}switch(function(e){return e.split("-")[1]}(t)){case"start":d[a]-=c*(n&&u?-1:1);break;case"end":d[a]+=c*(n&&u?-1:1)}return d}const Ua=(e,t,n)=>__async(this,null,(function*(){const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=yield null==s.isRTL?void 0:s.isRTL(t);if("production"!=={}.NODE_ENV){if(null==s&&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(" ")),a.filter((e=>{let{name:t}=e;return"autoPlacement"===t||"flip"===t})).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 s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Na(c,r,l),h=r,f={},g=0;for(let n=0;n<a.length;n++){const{name:i,fn:p}=a[n],{x:w,y:m,data:v,reset:y}=yield p({x:u,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:f,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=w?w:u,d=null!=m?m:d,f=__spreadProps(__spreadValues({},f),{[i]:__spreadValues(__spreadValues({},f[i]),v)}),"production"!=={}.NODE_ENV&&g>50&&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(" ")),y&&g<=50&&(g++,"object"==typeof y&&(y.placement&&(h=y.placement),y.rects&&(c=!0===y.rects?yield s.getElementRects({reference:e,floating:t,strategy:o}):y.rects),({x:u,y:d}=Na(c,h,l))),n=-1)}return{x:u,y:d,placement:h,strategy:o,middlewareData:f}}));function Wa(e){return __spreadProps(__spreadValues({},e),{top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height})}function ja(e){var t;return(null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Ba(e){return ja(e).getComputedStyle(e)}function Ha(e){return qa(e)?(e.nodeName||"").toLowerCase():""}let Ka;function Da(){if(Ka)return Ka;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(Ka=e.brands.map((e=>e.brand+"/"+e.version)).join(" "),Ka):navigator.userAgent}function Fa(e){return e instanceof ja(e).HTMLElement}function Va(e){return e instanceof ja(e).Element}function qa(e){return e instanceof ja(e).Node}function za(e){if("undefined"==typeof ShadowRoot)return!1;return e instanceof ja(e).ShadowRoot||e instanceof ShadowRoot}function Za(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ba(e);return/auto|scroll|overlay|hidden/.test(t+r+n)&&!["inline","contents"].includes(o)}function Ga(e){return["table","td","th"].includes(Ha(e))}function Ya(e){const t=/firefox/i.test(Da()),n=Ba(e),r=n.backdropFilter||n.WebkitBackdropFilter;return"none"!==n.transform||"none"!==n.perspective||!!r&&"none"!==r||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter||["transform","perspective"].some((e=>n.willChange.includes(e)))||["paint","layout","strict","content"].some((e=>{const t=n.contain;return null!=t&&t.includes(e)}))}function Qa(){return!/^((?!chrome|android).)*safari/i.test(Da())}function Ja(e){return["html","body","#document"].includes(Ha(e))}const Xa=Math.min,el=Math.max,tl=Math.round,nl={x:1,y:1};function rl(e){const t=!Va(e)&&e.contextElement?e.contextElement:Va(e)?e:null;if(!t)return nl;const n=t.getBoundingClientRect(),r=Ba(t);if("border-box"!==r.boxSizing)return Fa(t)?{x:t.offsetWidth>0&&tl(n.width)/t.offsetWidth||1,y:t.offsetHeight>0&&tl(n.height)/t.offsetHeight||1}:nl;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 ol(e,t,n,r){var o,i,s,a;void 0===t&&(t=!1),void 0===n&&(n=!1);const l=e.getBoundingClientRect();let c=nl;t&&(r?Va(r)&&(c=rl(r)):c=rl(e));const u=Va(e)?ja(e):window,d=!Qa()&&n,h=(l.left+(d&&null!=(o=null==(i=u.visualViewport)?void 0:i.offsetLeft)?o:0))/c.x,f=(l.top+(d&&null!=(s=null==(a=u.visualViewport)?void 0:a.offsetTop)?s:0))/c.y,g=l.width/c.x,p=l.height/c.y;return{width:g,height:p,top:f,right:h+g,bottom:f+p,left:h,x:h,y:f}}function il(e){return((qa(e)?e.ownerDocument:e.document)||window.document).documentElement}function sl(e){return Va(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function al(e){return ol(il(e)).left+sl(e).scrollLeft}function ll(e,t,n){const r=Fa(t),o=il(t),i=ol(e,!0,"fixed"===n,t);let s={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==Ha(t)||Za(o))&&(s=sl(t)),Fa(t)){const e=ol(t,!0);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=al(o));return{x:i.left+s.scrollLeft-a.x,y:i.top+s.scrollTop-a.y,width:i.width,height:i.height}}function cl(e){if("html"===Ha(e))return e;const t=e.assignedSlot||e.parentNode||(za(e)?e.host:null)||il(e);return za(t)?t.host:t}function ul(e){return Fa(e)&&"fixed"!==Ba(e).position?e.offsetParent:null}function dl(e){const t=ja(e);let n=ul(e);for(;n&&Ga(n)&&"static"===Ba(n).position;)n=ul(n);return n&&("html"===Ha(n)||"body"===Ha(n)&&"static"===Ba(n).position&&!Ya(n))?t:n||function(e){let t=cl(e);for(;Fa(t)&&!Ja(t);){if(Ya(t))return t;t=cl(t)}return null}(e)||t}function hl(e){const t=cl(e);return Ja(t)?e.ownerDocument.body:Fa(t)&&Za(t)?t:hl(t)}function fl(e,t){var n;void 0===t&&(t=[]);const r=hl(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=ja(r);return o?t.concat(i,i.visualViewport||[],Za(r)?r:[]):t.concat(r,fl(r))}function gl(e,t,n){return"viewport"===t?Wa(function(e,t){const n=ja(e),r=il(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const e=Qa();(e||!e&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}(e,n)):Va(t)?function(e,t){const n=ol(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Fa(e)?rl(e):{x:1,y:1},s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{top:c,left:l,right:l+s,bottom:c+a,x:l,y:c,width:s,height:a}}(t,n):Wa(function(e){var t;const n=il(e),r=sl(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=el(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=el(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let a=-r.scrollLeft+al(e);const l=-r.scrollTop;return"rtl"===Ba(o||n).direction&&(a+=el(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:a,y:l}}(il(e)))}const pl={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let r=fl(e).filter((e=>Va(e)&&"body"!==Ha(e))),o=null;const i="fixed"===Ba(e).position;let s=i?cl(e):e;for(;Va(s)&&!Ja(s);){const e=Ba(s),t=Ya(s);(i?t||o:t||"static"!==e.position||!o||!["absolute","fixed"].includes(o.position))?o=e:r=r.filter((e=>e!==s)),s=cl(s)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=i[0],a=i.reduce(((e,n)=>{const r=gl(t,n,o);return e.top=el(r.top,e.top),e.right=Xa(r.right,e.right),e.bottom=Xa(r.bottom,e.bottom),e.left=el(r.left,e.left),e}),gl(t,s,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=Fa(n),i=il(n);if(n===i)return t;let s={scrollLeft:0,scrollTop:0},a={x:1,y:1};const l={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==Ha(n)||Za(i))&&(s=sl(n)),Fa(n))){const e=ol(n);a=rl(n),l.x=e.x+n.clientLeft,l.y=e.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-s.scrollLeft*a.x+l.x,y:t.y*a.y-s.scrollTop*a.y+l.y}},isElement:Va,getDimensions:function(e){if(Fa(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=ol(e);return{width:t.width,height:t.height}},getOffsetParent:dl,getDocumentElement:il,getScale:rl,getElementRects(e){return __async(this,null,(function*(){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||dl,i=this.getDimensions;return{reference:ll(t,yield o(n),r),floating:__spreadValues({x:0,y:0},yield i(n))}}))},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===Ba(e).direction};function wl(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=!0,animationFrame:a=!1}=r,l=o&&!a,c=l||i?[...Va(e)?fl(e):e.contextElement?fl(e.contextElement):[],...fl(t)]:[];c.forEach((e=>{l&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));let u,d=null;if(s){let r=!0;d=new ResizeObserver((()=>{r||n(),r=!1})),Va(e)&&!a&&d.observe(e),Va(e)||!e.contextElement||a||d.observe(e.contextElement),d.observe(t)}let h=a?ol(e):null;return a&&function t(){const r=ol(e);!h||r.x===h.x&&r.y===h.y&&r.width===h.width&&r.height===h.height||n();h=r,u=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{l&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==(e=d)||e.disconnect(),d=null,a&&cancelAnimationFrame(u)}}const ml=(e,t,n)=>{const r=new Map,o=__spreadValues({platform:pl},n),i=__spreadProps(__spreadValues({},o.platform),{_c:r});return Ua(e,t,__spreadProps(__spreadValues({},o),{platform:i}))};const vl=Zt('<tc-root data-tc-dropdown-container="true"></tc-root>'),yl=()=>{const t=Ln(),n=ut(br),r=ut(Xs),[o,i]=Xe(!1),[s,a]=Xe(n.account),[l,c]=Xe(!0);let u;const[d,h]=Xe(),[f,g]=Xe(),p=function(e,t,n){let r=()=>{var e;return null!=(e=null==n?void 0:n.placement)?e:"bottom"},o=()=>{var e;return null!=(e=null==n?void 0:n.strategy)?e:"absolute"},[i,s]=Xe({x:null,y:null,placement:r(),strategy:o(),middlewareData:{}}),[a,l]=Xe();nt((()=>{let e=a();if(e)throw e.value}));let c=rt((()=>(e(),t(),{})));function u(){let i=e(),a=t();if(i&&a){let e=c();ml(i,a,{middleware:null==n?void 0:n.middleware,placement:r(),strategy:o()}).then((t=>{e===c()&&s(t)}),(e=>{l(e)}))}}return nt((()=>{let i=e(),s=t();if(null==n||n.middleware,r(),o(),i&&s)if(null!=n&&n.whileElementsMounted){let e=n.whileElementsMounted(i,s,u);e&&at(e)}else u()})),{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:u}}(f,d,{whileElementsMounted:wl,placement:"bottom-end"});r.connectionRestored.then((()=>c(!1)));const w=n.onStatusChange((e=>{if(!e)return i(!1),a(null),void c(!1);a(e.account),c(!1)})),m=e=>{if(!s()||!o())return;const t=f().contains(e.target),n=u.contains(e.target);t||n||i(!1)};var v;return v=()=>{document.body.addEventListener("click",m)},nt((()=>st(v))),at((()=>{document.body.removeEventListener("click",m),w()})),Tt(hn,{component:On,get children(){return[Tt(Ut,{get when(){return l()},get children(){return Tt(Ta,{disabled:!0,"data-tc-connect-button-loading":"true",get children(){return Tt(Aa,{})}})}}),Tt(Ut,{get when(){return!l()},get children(){return[Tt(Ut,{get when(){return!s()},get children(){return Tt(La,{onClick:()=>r.openModal(),"data-tc-connect-button":"true",scale:"s",get children(){return[Tt(Vi,{get fill(){return t.colors.connectButton.foreground}}),Tt(Si,{translationKey:"button.connectWallet",fontSize:"15px",lineHeight:"18px",fontWeight:"590",get color(){return t.colors.connectButton.foreground},children:"Connect wallet"})]}})}}),Tt(Ut,{get when(){return s()},get children(){return Tt(Oa,{get children(){return[Tt(Ma,{onClick:()=>i((e=>!e)),ref:g,"data-tc-dropdown-button":"true",scale:"s",get children(){return[Tt(Si,{fontSize:"15px",fontWeight:"590",lineHeight:"18px",get children(){return(()=>{const t=s();if(t){const n=$e(t.address,t.chain===e.CHAIN.TESTNET);return n.slice(0,4)+"…"+n.slice(-4)}return""})()}}),Tt($o,{direction:"bottom"})]}}),Tt(dn,{get children(){const e=st((()=>document.importNode(vl,!0)));return Jt(h,e),e.style.setProperty("z-index","999"),e._$owner=Ve,Xt(e,Tt(Eo,{onBeforeEnter:e=>{Zo(e,[{opacity:0,transform:"translateY(-8px)"},{opacity:1,transform:"translateY(0)"}],{duration:150})},onExit:(e,t)=>{Zo(e,[{opacity:1,transform:"translateY(0)"},{opacity:0,transform:"translateY(-8px)"}],{duration:150}).finished.then(t)},get children(){return Tt(Ut,{get when(){return o()},get children(){return Tt($a,{get hidden(){return!o()},onClose:()=>i(!1),ref(e){"function"==typeof u?u(e):u=e}})}})}}),null),Xt(e,Tt(Pa,{}),null),tt((t=>{var n,r;const o=p.strategy,i=`${null!=(n=p.y)?n:0}px`,s=`${null!=(r=p.x)?r:0}px`;return o!==t._v$&&e.style.setProperty("position",t._v$=o),i!==t._v$2&&e.style.setProperty("top",t._v$2=i),s!==t._v$3&&e.style.setProperty("left",t._v$3=s),t}),{_v$:void 0,_v$2:void 0,_v$3:void 0}),e}})]}})}})]}})]}})},bl=Tn(Xo)`
|
|
599
|
+
`;function Ia(e){return e.split("-")[0]}function Na(e,t,n){let{reference:r,floating:o}=e;const i=r.x+r.width/2-o.width/2,s=r.y+r.height/2-o.height/2,a=function(e){return["top","bottom"].includes(Ia(e))?"x":"y"}(t),l="y"===a?"height":"width";const c=r[l]/2-o[l]/2,u="x"===a;let d;switch(Ia(t)){case"top":d={x:i,y:r.y-o.height};break;case"bottom":d={x:i,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:s};break;case"left":d={x:r.x-o.width,y:s};break;default:d={x:r.x,y:r.y}}switch(function(e){return e.split("-")[1]}(t)){case"start":d[a]-=c*(n&&u?-1:1);break;case"end":d[a]+=c*(n&&u?-1:1)}return d}const Ua=(e,t,n)=>__async(this,null,(function*(){const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=yield null==s.isRTL?void 0:s.isRTL(t);if("production"!=={}.NODE_ENV){if(null==s&&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(" ")),a.filter((e=>{let{name:t}=e;return"autoPlacement"===t||"flip"===t})).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 s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Na(c,r,l),h=r,f={},g=0;for(let n=0;n<a.length;n++){const{name:i,fn:p}=a[n],{x:w,y:m,data:v,reset:y}=yield p({x:u,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:f,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=w?w:u,d=null!=m?m:d,f=__spreadProps(__spreadValues({},f),{[i]:__spreadValues(__spreadValues({},f[i]),v)}),"production"!=={}.NODE_ENV&&g>50&&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(" ")),y&&g<=50&&(g++,"object"==typeof y&&(y.placement&&(h=y.placement),y.rects&&(c=!0===y.rects?yield s.getElementRects({reference:e,floating:t,strategy:o}):y.rects),({x:u,y:d}=Na(c,h,l))),n=-1)}return{x:u,y:d,placement:h,strategy:o,middlewareData:f}}));function Wa(e){return __spreadProps(__spreadValues({},e),{top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height})}function ja(e){var t;return(null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Ba(e){return ja(e).getComputedStyle(e)}function Ha(e){return qa(e)?(e.nodeName||"").toLowerCase():""}let Ka;function Da(){if(Ka)return Ka;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(Ka=e.brands.map((e=>e.brand+"/"+e.version)).join(" "),Ka):navigator.userAgent}function Fa(e){return e instanceof ja(e).HTMLElement}function Va(e){return e instanceof ja(e).Element}function qa(e){return e instanceof ja(e).Node}function za(e){if("undefined"==typeof ShadowRoot)return!1;return e instanceof ja(e).ShadowRoot||e instanceof ShadowRoot}function Za(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ba(e);return/auto|scroll|overlay|hidden/.test(t+r+n)&&!["inline","contents"].includes(o)}function Ga(e){return["table","td","th"].includes(Ha(e))}function Ya(e){const t=/firefox/i.test(Da()),n=Ba(e),r=n.backdropFilter||n.WebkitBackdropFilter;return"none"!==n.transform||"none"!==n.perspective||!!r&&"none"!==r||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter||["transform","perspective"].some((e=>n.willChange.includes(e)))||["paint","layout","strict","content"].some((e=>{const t=n.contain;return null!=t&&t.includes(e)}))}function Qa(){return!/^((?!chrome|android).)*safari/i.test(Da())}function Ja(e){return["html","body","#document"].includes(Ha(e))}const Xa=Math.min,el=Math.max,tl=Math.round,nl={x:1,y:1};function rl(e){const t=!Va(e)&&e.contextElement?e.contextElement:Va(e)?e:null;if(!t)return nl;const n=t.getBoundingClientRect(),r=Ba(t);if("border-box"!==r.boxSizing)return Fa(t)?{x:t.offsetWidth>0&&tl(n.width)/t.offsetWidth||1,y:t.offsetHeight>0&&tl(n.height)/t.offsetHeight||1}:nl;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 ol(e,t,n,r){var o,i,s,a;void 0===t&&(t=!1),void 0===n&&(n=!1);const l=e.getBoundingClientRect();let c=nl;t&&(r?Va(r)&&(c=rl(r)):c=rl(e));const u=Va(e)?ja(e):window,d=!Qa()&&n,h=(l.left+(d&&null!=(o=null==(i=u.visualViewport)?void 0:i.offsetLeft)?o:0))/c.x,f=(l.top+(d&&null!=(s=null==(a=u.visualViewport)?void 0:a.offsetTop)?s:0))/c.y,g=l.width/c.x,p=l.height/c.y;return{width:g,height:p,top:f,right:h+g,bottom:f+p,left:h,x:h,y:f}}function il(e){return((qa(e)?e.ownerDocument:e.document)||window.document).documentElement}function sl(e){return Va(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function al(e){return ol(il(e)).left+sl(e).scrollLeft}function ll(e,t,n){const r=Fa(t),o=il(t),i=ol(e,!0,"fixed"===n,t);let s={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==Ha(t)||Za(o))&&(s=sl(t)),Fa(t)){const e=ol(t,!0);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=al(o));return{x:i.left+s.scrollLeft-a.x,y:i.top+s.scrollTop-a.y,width:i.width,height:i.height}}function cl(e){if("html"===Ha(e))return e;const t=e.assignedSlot||e.parentNode||(za(e)?e.host:null)||il(e);return za(t)?t.host:t}function ul(e){return Fa(e)&&"fixed"!==Ba(e).position?e.offsetParent:null}function dl(e){const t=ja(e);let n=ul(e);for(;n&&Ga(n)&&"static"===Ba(n).position;)n=ul(n);return n&&("html"===Ha(n)||"body"===Ha(n)&&"static"===Ba(n).position&&!Ya(n))?t:n||function(e){let t=cl(e);for(;Fa(t)&&!Ja(t);){if(Ya(t))return t;t=cl(t)}return null}(e)||t}function hl(e){const t=cl(e);return Ja(t)?e.ownerDocument.body:Fa(t)&&Za(t)?t:hl(t)}function fl(e,t){var n;void 0===t&&(t=[]);const r=hl(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=ja(r);return o?t.concat(i,i.visualViewport||[],Za(r)?r:[]):t.concat(r,fl(r))}function gl(e,t,n){return"viewport"===t?Wa(function(e,t){const n=ja(e),r=il(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const e=Qa();(e||!e&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}(e,n)):Va(t)?function(e,t){const n=ol(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Fa(e)?rl(e):{x:1,y:1},s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{top:c,left:l,right:l+s,bottom:c+a,x:l,y:c,width:s,height:a}}(t,n):Wa(function(e){var t;const n=il(e),r=sl(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=el(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=el(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let a=-r.scrollLeft+al(e);const l=-r.scrollTop;return"rtl"===Ba(o||n).direction&&(a+=el(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:a,y:l}}(il(e)))}const pl={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let r=fl(e).filter((e=>Va(e)&&"body"!==Ha(e))),o=null;const i="fixed"===Ba(e).position;let s=i?cl(e):e;for(;Va(s)&&!Ja(s);){const e=Ba(s),t=Ya(s);(i?t||o:t||"static"!==e.position||!o||!["absolute","fixed"].includes(o.position))?o=e:r=r.filter((e=>e!==s)),s=cl(s)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=i[0],a=i.reduce(((e,n)=>{const r=gl(t,n,o);return e.top=el(r.top,e.top),e.right=Xa(r.right,e.right),e.bottom=Xa(r.bottom,e.bottom),e.left=el(r.left,e.left),e}),gl(t,s,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=Fa(n),i=il(n);if(n===i)return t;let s={scrollLeft:0,scrollTop:0},a={x:1,y:1};const l={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==Ha(n)||Za(i))&&(s=sl(n)),Fa(n))){const e=ol(n);a=rl(n),l.x=e.x+n.clientLeft,l.y=e.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-s.scrollLeft*a.x+l.x,y:t.y*a.y-s.scrollTop*a.y+l.y}},isElement:Va,getDimensions:function(e){if(Fa(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=ol(e);return{width:t.width,height:t.height}},getOffsetParent:dl,getDocumentElement:il,getScale:rl,getElementRects(e){return __async(this,null,(function*(){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||dl,i=this.getDimensions;return{reference:ll(t,yield o(n),r),floating:__spreadValues({x:0,y:0},yield i(n))}}))},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===Ba(e).direction};function wl(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=!0,animationFrame:a=!1}=r,l=o&&!a,c=l||i?[...Va(e)?fl(e):e.contextElement?fl(e.contextElement):[],...fl(t)]:[];c.forEach((e=>{l&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));let u,d=null;if(s){let r=!0;d=new ResizeObserver((()=>{r||n(),r=!1})),Va(e)&&!a&&d.observe(e),Va(e)||!e.contextElement||a||d.observe(e.contextElement),d.observe(t)}let h=a?ol(e):null;return a&&function t(){const r=ol(e);!h||r.x===h.x&&r.y===h.y&&r.width===h.width&&r.height===h.height||n();h=r,u=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{l&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==(e=d)||e.disconnect(),d=null,a&&cancelAnimationFrame(u)}}const ml=(e,t,n)=>{const r=new Map,o=__spreadValues({platform:pl},n),i=__spreadProps(__spreadValues({},o.platform),{_c:r});return Ua(e,t,__spreadProps(__spreadValues({},o),{platform:i}))};const vl=Zt('<tc-root data-tc-dropdown-container="true"></tc-root>'),yl=()=>{const t=Ln(),n=ut(br),r=ut(Xs),[o,i]=Xe(!1),[s,a]=Xe(n.account),[l,c]=Xe(!n.account);let u;const[d,h]=Xe(),[f,g]=Xe(),p=function(e,t,n){let r=()=>{var e;return null!=(e=null==n?void 0:n.placement)?e:"bottom"},o=()=>{var e;return null!=(e=null==n?void 0:n.strategy)?e:"absolute"},[i,s]=Xe({x:null,y:null,placement:r(),strategy:o(),middlewareData:{}}),[a,l]=Xe();nt((()=>{let e=a();if(e)throw e.value}));let c=rt((()=>(e(),t(),{})));function u(){let i=e(),a=t();if(i&&a){let e=c();ml(i,a,{middleware:null==n?void 0:n.middleware,placement:r(),strategy:o()}).then((t=>{e===c()&&s(t)}),(e=>{l(e)}))}}return nt((()=>{let i=e(),s=t();if(null==n||n.middleware,r(),o(),i&&s)if(null!=n&&n.whileElementsMounted){let e=n.whileElementsMounted(i,s,u);e&&at(e)}else u()})),{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:u}}(f,d,{whileElementsMounted:wl,placement:"bottom-end"});r.connectionRestored.then((()=>c(!1)));const w=n.onStatusChange((e=>{if(!e)return i(!1),a(null),void c(!1);a(e.account),c(!1)})),m=e=>{if(!s()||!o())return;const t=f().contains(e.target),n=u.contains(e.target);t||n||i(!1)};var v;return v=()=>{document.body.addEventListener("click",m)},nt((()=>st(v))),at((()=>{document.body.removeEventListener("click",m),w()})),Tt(hn,{component:On,get children(){return[Tt(Ut,{get when(){return l()},get children(){return Tt(Ta,{disabled:!0,"data-tc-connect-button-loading":"true",get children(){return Tt(Aa,{})}})}}),Tt(Ut,{get when(){return!l()},get children(){return[Tt(Ut,{get when(){return!s()},get children(){return Tt(La,{onClick:()=>r.openModal(),"data-tc-connect-button":"true",scale:"s",get children(){return[Tt(Vi,{get fill(){return t.colors.connectButton.foreground}}),Tt(Si,{translationKey:"button.connectWallet",fontSize:"15px",lineHeight:"18px",fontWeight:"590",get color(){return t.colors.connectButton.foreground},children:"Connect wallet"})]}})}}),Tt(Ut,{get when(){return s()},get children(){return Tt(Oa,{get children(){return[Tt(Ma,{onClick:()=>i((e=>!e)),ref:g,"data-tc-dropdown-button":"true",scale:"s",get children(){return[Tt(Si,{fontSize:"15px",fontWeight:"590",lineHeight:"18px",get children(){return(()=>{const t=s();if(t){const n=$e(t.address,t.chain===e.CHAIN.TESTNET);return n.slice(0,4)+"…"+n.slice(-4)}return""})()}}),Tt($o,{direction:"bottom"})]}}),Tt(dn,{get children(){const e=st((()=>document.importNode(vl,!0)));return Jt(h,e),e.style.setProperty("z-index","999"),e._$owner=Ve,Xt(e,Tt(Eo,{onBeforeEnter:e=>{Zo(e,[{opacity:0,transform:"translateY(-8px)"},{opacity:1,transform:"translateY(0)"}],{duration:150})},onExit:(e,t)=>{Zo(e,[{opacity:1,transform:"translateY(0)"},{opacity:0,transform:"translateY(-8px)"}],{duration:150}).finished.then(t)},get children(){return Tt(Ut,{get when(){return o()},get children(){return Tt($a,{get hidden(){return!o()},onClose:()=>i(!1),ref(e){"function"==typeof u?u(e):u=e}})}})}}),null),Xt(e,Tt(Pa,{}),null),tt((t=>{var n,r;const o=p.strategy,i=`${null!=(n=p.y)?n:0}px`,s=`${null!=(r=p.x)?r:0}px`;return o!==t._v$&&e.style.setProperty("position",t._v$=o),i!==t._v$2&&e.style.setProperty("top",t._v$2=i),s!==t._v$3&&e.style.setProperty("left",t._v$3=s),t}),{_v$:void 0,_v$2:void 0,_v$3:void 0}),e}})]}})}})]}})]}})},bl=Tn(Xo)`
|
|
600
600
|
padding-left: 24px;
|
|
601
601
|
padding-right: 24px;
|
|
602
602
|
padding-top: 18px;
|