@tokenflight/swap 0.1.1 → 0.1.2

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/deposit.js CHANGED
@@ -1 +1 @@
1
- import"./dist-QzDwShnx.js";import"./widget-Bf9MCT78.js";import{n as e,t}from"./register-deposit-TIxgJ8p6.js";export{e as TokenFlightDeposit,t as registerDepositElement};
1
+ import"./dist-D4PEwqKq.js";import"./widget-9I201q7O.js";import{n as e,t}from"./register-deposit-COFuKwk-.js";export{e as TokenFlightDeposit,t as registerDepositElement};
@@ -0,0 +1,2 @@
1
+ function e(t){"@babel/helpers - typeof";return e=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},e(t)}function t(t,n){if(e(t)!=`object`||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,n||`default`);if(e(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(t)}function n(n){var r=t(n,`string`);return e(r)==`symbol`?r:r+``}function r(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i=class extends Error{constructor(e,t,n){let i=`${e.status||e.status===0?e.status:``} ${e.statusText??``}`.trim(),a=i?`status code ${i}`:`an unknown error`;super(`Request failed with ${a}: ${t.method} ${t.url}`),r(this,`response`,void 0),r(this,`request`,void 0),r(this,`options`,void 0),this.name=`HTTPError`,this.response=e,this.request=t,this.options=n}},a=class extends Error{constructor(e){let t=`Non-error value was thrown`;try{typeof e==`string`?t=e:e&&typeof e==`object`&&`message`in e&&typeof e.message==`string`&&(t=e.message)}catch{}super(t),r(this,`name`,`NonError`),r(this,`value`,void 0),this.value=e}},o=class extends Error{constructor(e){let t=e?.cause?e.cause instanceof Error?e.cause:new a(e.cause):void 0;super(e?.code?`Forced retry: ${e.code}`:`Forced retry`,t?{cause:t}:void 0),r(this,`name`,`ForceRetryError`),r(this,`customDelay`,void 0),r(this,`code`,void 0),r(this,`customRequest`,void 0),this.customDelay=e?.delay,this.code=e?.code,this.customRequest=e?.request}},s=(()=>{let e=!1,t=!1,n=typeof globalThis.ReadableStream==`function`,r=typeof globalThis.Request==`function`;if(n&&r)try{t=new globalThis.Request(`https://empty.invalid`,{body:new globalThis.ReadableStream,method:`POST`,get duplex(){return e=!0,`half`}}).headers.has(`Content-Type`)}catch(e){if(e instanceof Error&&e.message===`unsupported BodyInit type`)return!1;throw e}return e&&!t})(),c=typeof globalThis.AbortController==`function`,l=typeof globalThis.AbortSignal==`function`&&typeof globalThis.AbortSignal.any==`function`,u=typeof globalThis.ReadableStream==`function`,d=typeof globalThis.FormData==`function`,f=[`get`,`post`,`put`,`patch`,`head`,`delete`],p={json:`application/json`,text:`text/*`,formData:`multipart/form-data`,arrayBuffer:`*/*`,blob:`*/*`,bytes:`*/*`},m=2147483647,h=new TextEncoder().encode(`------WebKitFormBoundaryaxpyiPgbbPti10Rw`).length,g=Symbol(`stop`),_=class{constructor(e){r(this,`options`,void 0),this.options=e}},v=e=>new _(e),y={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},b={next:!0},x={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},S=e=>{if(!e)return 0;if(e instanceof FormData){let t=0;for(let[n,r]of e)t+=h,t+=new TextEncoder().encode(`Content-Disposition: form-data; name="${n}"`).length,t+=typeof r==`string`?new TextEncoder().encode(r).length:r.size;return t}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength;if(typeof e==`string`)return new TextEncoder().encode(e).length;if(e instanceof URLSearchParams)return new TextEncoder().encode(e.toString()).length;if(`byteLength`in e)return e.byteLength;if(typeof e==`object`&&e)try{let t=JSON.stringify(e);return new TextEncoder().encode(t).length}catch{return 0}return 0},ee=(e,t,n)=>{let r,i=0;return e.pipeThrough(new TransformStream({transform(e,a){if(a.enqueue(e),r){i+=r.byteLength;let e=t===0?0:i/t;e>=1&&(e=1-2**-52),n?.({percent:e,totalBytes:Math.max(t,i),transferredBytes:i},r)}r=e},flush(){r&&(i+=r.byteLength,n?.({percent:1,totalBytes:Math.max(t,i),transferredBytes:i},r))}}))},te=(e,t)=>{if(!e.body)return e;if(e.status===204)return new Response(null,{status:e.status,statusText:e.statusText,headers:e.headers});let n=Math.max(0,Number(e.headers.get(`content-length`))||0);return new Response(ee(e.body,n,t),{status:e.status,statusText:e.statusText,headers:e.headers})},ne=(e,t,n)=>{if(!e.body)return e;let r=S(n??e.body);return new Request(e,{duplex:`half`,body:ee(e.body,r,t)})},C=e=>typeof e==`object`&&!!e,re=(...e)=>{for(let t of e)if((!C(t)||Array.isArray(t))&&t!==void 0)throw TypeError("The `options` argument must be an object");return ce({},...e)},ie=(e={},t={})=>{let n=new globalThis.Headers(e),r=t instanceof globalThis.Headers,i=new globalThis.Headers(t);for(let[e,t]of i.entries())r&&t===`undefined`||t===void 0?n.delete(e):n.set(e,t);return n};function ae(e,t,n){return Object.hasOwn(t,n)&&t[n]===void 0?[]:ce(e[n]??[],t[n]??[])}var oe=(e={},t={})=>({beforeRequest:ae(e,t,`beforeRequest`),beforeRetry:ae(e,t,`beforeRetry`),afterResponse:ae(e,t,`afterResponse`),beforeError:ae(e,t,`beforeError`)}),se=(e,t)=>{let n=new URLSearchParams;for(let r of[e,t])if(r!==void 0)if(r instanceof URLSearchParams)for(let[e,t]of r.entries())n.append(e,t);else if(Array.isArray(r))for(let e of r){if(!Array.isArray(e)||e.length!==2)throw TypeError(`Array search parameters must be provided in [[key, value], ...] format`);n.append(String(e[0]),String(e[1]))}else if(C(r))for(let[e,t]of Object.entries(r))t!==void 0&&n.append(e,String(t));else{let e=new URLSearchParams(r);for(let[t,r]of e.entries())n.append(t,r)}return n},ce=(...e)=>{let t={},n={},r={},i,a=[];for(let o of e)if(Array.isArray(o))Array.isArray(t)||(t=[]),t=[...t,...o];else if(C(o)){for(let[e,n]of Object.entries(o)){if(e===`signal`&&n instanceof globalThis.AbortSignal){a.push(n);continue}if(e===`context`){if(n!=null&&(!C(n)||Array.isArray(n)))throw TypeError("The `context` option must be an object");t={...t,context:n==null?{}:{...t.context,...n}};continue}if(e===`searchParams`){i=n==null?void 0:i===void 0?n:se(i,n);continue}C(n)&&e in t&&(n=ce(t[e],n)),t={...t,[e]:n}}C(o.hooks)&&(r=oe(r,o.hooks),t.hooks=r),C(o.headers)&&(n=ie(n,o.headers),t.headers=n)}return i!==void 0&&(t.searchParams=i),a.length>0&&(a.length===1?t.signal=a[0]:l?t.signal=AbortSignal.any(a):t.signal=a.at(-1)),t},le=e=>f.includes(e)?e.toUpperCase():e,ue={limit:2,methods:[`get`,`put`,`head`,`delete`,`options`,`trace`],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:[413,429,503],maxRetryAfter:1/0,backoffLimit:1/0,delay:e=>.3*2**(e-1)*1e3,jitter:void 0,retryOnTimeout:!1},de=(e={})=>{if(typeof e==`number`)return{...ue,limit:e};if(e.methods&&!Array.isArray(e.methods))throw Error(`retry.methods must be an array`);if(e.methods&&(e.methods=e.methods.map(e=>e.toLowerCase())),e.statusCodes&&!Array.isArray(e.statusCodes))throw Error(`retry.statusCodes must be an array`);let t=Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0));return{...ue,...t}},fe=class extends Error{constructor(e){super(`Request timed out: ${e.method} ${e.url}`),r(this,`request`,void 0),this.name=`TimeoutError`,this.request=e}};async function pe(e,t,n,r){return new Promise((i,a)=>{let o=setTimeout(()=>{n&&n.abort(),a(new fe(e))},r.timeout);r.fetch(e,t).then(i).catch(a).then(()=>{clearTimeout(o)})})}async function me(e,{signal:t}){return new Promise((n,r)=>{t&&(t.throwIfAborted(),t.addEventListener(`abort`,i,{once:!0}));function i(){clearTimeout(a),r(t.reason)}let a=setTimeout(()=>{t?.removeEventListener(`abort`,i),n()},e)})}var he=(e,t)=>{let n={};for(let r in t)Object.hasOwn(t,r)&&!(r in x)&&!(r in y)&&(!(r in e)||r in b)&&(n[r]=t[r]);return n},ge=e=>e===void 0?!1:Array.isArray(e)?e.length>0:e instanceof URLSearchParams?e.size>0:typeof e==`object`?Object.keys(e).length>0:typeof e==`string`?e.trim().length>0:!!e;function _e(e){return e instanceof i||e?.name===i.name}function ve(e){return e instanceof fe||e?.name===fe.name}function ye(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function be(e,t){ye(e,t),t.add(e)}function w(e,t,n){ye(e,t),t.set(e,n)}function T(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function E(e,t){return e.get(T(e,t))}function D(e,t,n){return e.set(T(e,t),n),n}var xe=new WeakMap,Se=new WeakMap,Ce=new WeakMap,O=new WeakMap,we=new WeakMap,Te=new WeakMap,Ee=new WeakMap,k=new WeakSet,De=class e{static create(t,n){let r=new e(t,n),a=T(k,r,Pe).call(r,async()=>{if(typeof E(O,r).timeout==`number`&&E(O,r).timeout>2147483647)throw RangeError(`The \`timeout\` option cannot be greater than ${m}`);await Promise.resolve();let e=await T(k,r,Fe).call(r);for(let t of E(O,r).hooks.afterResponse){let n=T(k,r,je).call(r,e.clone()),i;try{i=await t(r.request,T(k,r,Ie).call(r),n,{retryCount:E(Se,r)})}catch(t){throw T(k,r,Ne).call(r,n),T(k,r,Ne).call(r,e),t}if(i instanceof _)throw T(k,r,Ne).call(r,n),T(k,r,Ne).call(r,e),new o(i.options);let a=i instanceof globalThis.Response?i:e;n!==a&&T(k,r,Ne).call(r,n),e!==a&&T(k,r,Ne).call(r,e),e=a}if(T(k,r,je).call(r,e),!e.ok&&(typeof E(O,r).throwHttpErrors==`function`?E(O,r).throwHttpErrors(e.status):E(O,r).throwHttpErrors)){let t=new i(e,r.request,T(k,r,Ie).call(r));for(let e of E(O,r).hooks.beforeError)t=await e(t,{retryCount:E(Se,r)});throw t}if(E(O,r).onDownloadProgress){if(typeof E(O,r).onDownloadProgress!=`function`)throw TypeError("The `onDownloadProgress` option must be a function");if(!u)throw Error("Streams are not supported in your environment. `ReadableStream` is missing.");let t=e.clone();return T(k,r,Ne).call(r,e),te(t,E(O,r).onDownloadProgress)}return e}).finally(()=>{let e=E(we,r);T(k,r,Me).call(r,e?.body??void 0),T(k,r,Me).call(r,r.request.body??void 0)});for(let[e,t]of Object.entries(p))e===`bytes`&&typeof globalThis.Response?.prototype?.bytes!=`function`||(a[e]=async()=>{r.request.headers.set(`accept`,r.request.headers.get(`accept`)||t);let i=await a;if(e===`json`){if(i.status===204)return``;let e=await i.text();return e===``?``:n.parseJson?n.parseJson(e):JSON.parse(e)}return i[e]()});return a}constructor(t,n={}){if(be(this,k),r(this,`request`,void 0),w(this,xe,void 0),w(this,Se,0),w(this,Ce,void 0),w(this,O,void 0),w(this,we,void 0),w(this,Te,void 0),w(this,Ee,void 0),D(Ce,this,t),D(O,this,{...n,headers:ie(E(Ce,this).headers,n.headers),hooks:oe({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},n.hooks),method:le(n.method??E(Ce,this).method??`GET`),prefixUrl:String(n.prefixUrl||``),retry:de(n.retry),throwHttpErrors:n.throwHttpErrors??!0,timeout:n.timeout??1e4,fetch:n.fetch??globalThis.fetch.bind(globalThis),context:n.context??{}}),typeof E(Ce,this)!=`string`&&!(E(Ce,this)instanceof URL||E(Ce,this)instanceof globalThis.Request))throw TypeError("`input` must be a string, URL, or Request");if(E(O,this).prefixUrl&&typeof E(Ce,this)==`string`){if(E(Ce,this).startsWith(`/`))throw Error("`input` must not begin with a slash when using `prefixUrl`");E(O,this).prefixUrl.endsWith(`/`)||(E(O,this).prefixUrl+=`/`),D(Ce,this,E(O,this).prefixUrl+E(Ce,this))}c&&l&&(D(Te,this,E(O,this).signal??E(Ce,this).signal),D(xe,this,new globalThis.AbortController),E(O,this).signal=E(Te,this)?AbortSignal.any([E(Te,this),E(xe,this).signal]):E(xe,this).signal),s&&(E(O,this).duplex=`half`),E(O,this).json!==void 0&&(E(O,this).body=E(O,this).stringifyJson?.(E(O,this).json)??JSON.stringify(E(O,this).json),E(O,this).headers.set(`content-type`,E(O,this).headers.get(`content-type`)??`application/json`));let i=n.headers&&new globalThis.Headers(n.headers).has(`content-type`);if(E(Ce,this)instanceof globalThis.Request&&(d&&E(O,this).body instanceof globalThis.FormData||E(O,this).body instanceof URLSearchParams)&&!i&&E(O,this).headers.delete(`content-type`),this.request=new globalThis.Request(E(Ce,this),E(O,this)),ge(E(O,this).searchParams)){let t=`?`+(typeof E(O,this).searchParams==`string`?E(O,this).searchParams.replace(/^\?/,``):new URLSearchParams(Oe.call(e,E(O,this).searchParams)).toString()),n=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,t);this.request=new globalThis.Request(n,E(O,this))}if(E(O,this).onUploadProgress){if(typeof E(O,this).onUploadProgress!=`function`)throw TypeError("The `onUploadProgress` option must be a function");if(!s)throw Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request=T(k,this,Re).call(this,this.request,E(O,this).body??void 0)}}};function Oe(e){return e&&typeof e==`object`&&!Array.isArray(e)&&!(e instanceof URLSearchParams)?Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0)):e}function ke(){let e=E(O,this).retry.delay(E(Se,this)),t=e;E(O,this).retry.jitter===!0?t=Math.random()*e:typeof E(O,this).retry.jitter==`function`&&(t=E(O,this).retry.jitter(e),(!Number.isFinite(t)||t<0)&&(t=e));let n=E(O,this).retry.backoffLimit??1/0;return Math.min(n,t)}async function Ae(e){var t;if(D(Se,this,(t=E(Se,this),t++,t)),E(Se,this)>E(O,this).retry.limit)throw e;let n=e instanceof Error?e:new a(e);if(n instanceof o)return n.customDelay??T(k,this,ke).call(this);if(!E(O,this).retry.methods.includes(this.request.method.toLowerCase()))throw e;if(E(O,this).retry.shouldRetry!==void 0){let t=await E(O,this).retry.shouldRetry({error:n,retryCount:E(Se,this)});if(t===!1)throw e;if(t===!0)return T(k,this,ke).call(this)}if(ve(e)&&!E(O,this).retry.retryOnTimeout)throw e;if(_e(e)){if(!E(O,this).retry.statusCodes.includes(e.response.status))throw e;let t=e.response.headers.get(`Retry-After`)??e.response.headers.get(`RateLimit-Reset`)??e.response.headers.get(`X-RateLimit-Retry-After`)??e.response.headers.get(`X-RateLimit-Reset`)??e.response.headers.get(`X-Rate-Limit-Reset`);if(t&&E(O,this).retry.afterStatusCodes.includes(e.response.status)){let e=Number(t)*1e3;Number.isNaN(e)?e=Date.parse(t)-Date.now():e>=Date.parse(`2024-01-01`)&&(e-=Date.now());let n=E(O,this).retry.maxRetryAfter??e;return e<n?e:n}if(e.response.status===413)throw e}return T(k,this,ke).call(this)}function je(e){return E(O,this).parseJson&&(e.json=async()=>E(O,this).parseJson(await e.text())),e}function Me(e){e&&e.cancel().catch(()=>void 0)}function Ne(e){T(k,this,Me).call(this,e.body??void 0)}async function Pe(e){try{return await e()}catch(t){let n=Math.min(await T(k,this,Ae).call(this,t),m);if(E(Se,this)<1)throw t;if(await me(n,E(Te,this)?{signal:E(Te,this)}:{}),t instanceof o&&t.customRequest){let e=E(O,this).signal?new globalThis.Request(t.customRequest,{signal:E(O,this).signal}):new globalThis.Request(t.customRequest);T(k,this,Le).call(this,e)}for(let e of E(O,this).hooks.beforeRetry){let n=await e({request:this.request,options:T(k,this,Ie).call(this),error:t,retryCount:E(Se,this)});if(n instanceof globalThis.Request){T(k,this,Le).call(this,n);break}if(n instanceof globalThis.Response)return n;if(n===g)return}return T(k,this,Pe).call(this,e)}}async function Fe(){E(xe,this)?.signal.aborted&&(D(xe,this,new globalThis.AbortController),E(O,this).signal=E(Te,this)?AbortSignal.any([E(Te,this),E(xe,this).signal]):E(xe,this).signal,this.request=new globalThis.Request(this.request,{signal:E(O,this).signal}));for(let e of E(O,this).hooks.beforeRequest){let t=await e(this.request,T(k,this,Ie).call(this),{retryCount:E(Se,this)});if(t instanceof Response)return t;if(t instanceof globalThis.Request){T(k,this,Le).call(this,t);break}}let e=he(this.request,E(O,this));return D(we,this,this.request),this.request=E(we,this).clone(),E(O,this).timeout===!1?E(O,this).fetch(E(we,this),e):pe(E(we,this),e,E(xe,this),E(O,this))}function Ie(){if(!E(Ee,this)){let{hooks:e,...t}=E(O,this);D(Ee,this,Object.freeze(t))}return E(Ee,this)}function Le(e){D(Ee,this,void 0),this.request=T(k,this,Re).call(this,e)}function Re(e,t){return!E(O,this).onUploadProgress||!e.body?e:ne(e,E(O,this).onUploadProgress,t??E(O,this).body??void 0)}var ze=e=>{let t=(t,n)=>De.create(t,re(e,n));for(let n of f)t[n]=(t,r)=>De.create(t,re(e,r,{method:n}));return t.create=e=>ze(re(e)),t.extend=t=>(typeof t==`function`&&(t=t(e??{})),ze(re(e,t))),t.stop=g,t.retry=v,t},Be=ze(),A={INVALID_CONFIG:`TF1001`,INVALID_TOKEN_IDENTIFIER:`TF1002`,INVALID_AMOUNT:`TF1003`,MISSING_REQUIRED_CONFIG:`TF1004`,WALLET_NOT_CONNECTED:`TF2001`,WALLET_CONNECTION_FAILED:`TF2002`,WALLET_ACTION_FAILED:`TF2003`,WALLET_ACTION_REJECTED:`TF2004`,UNSUPPORTED_ACTION_TYPE:`TF2005`,API_REQUEST_FAILED:`TF3001`,API_TIMEOUT:`TF3002`,API_INVALID_RESPONSE:`TF3003`,QUOTE_FAILED:`TF3004`,QUOTE_EXPIRED:`TF3005`,DEPOSIT_BUILD_FAILED:`TF3006`,DEPOSIT_SUBMIT_FAILED:`TF3007`,ORDER_FAILED:`TF3008`,TRANSACTION_FAILED:`TF4001`,TRANSACTION_REJECTED:`TF4002`,INSUFFICIENT_BALANCE:`TF4003`,ELEMENT_NOT_FOUND:`TF5001`,INITIALIZATION_FAILED:`TF5002`,FIAT_QUOTE_FAILED:`TF6001`,FIAT_ORDER_FAILED:`TF6002`,FIAT_STATUS_FAILED:`TF6003`,FIAT_PROVIDER_ERROR:`TF6004`,FIAT_AMOUNT_OUT_OF_RANGE:`TF6005`},Ve={[A.INVALID_CONFIG]:`Invalid configuration provided`,[A.INVALID_TOKEN_IDENTIFIER]:`Invalid token identifier format`,[A.INVALID_AMOUNT]:`Invalid amount value`,[A.MISSING_REQUIRED_CONFIG]:`Missing required configuration field`,[A.WALLET_NOT_CONNECTED]:`Wallet is not connected`,[A.WALLET_CONNECTION_FAILED]:`Failed to connect wallet`,[A.WALLET_ACTION_FAILED]:`Wallet action failed`,[A.WALLET_ACTION_REJECTED]:`Wallet action was rejected by user`,[A.UNSUPPORTED_ACTION_TYPE]:`Unsupported wallet action type`,[A.API_REQUEST_FAILED]:`API request failed`,[A.API_TIMEOUT]:`API request timed out`,[A.API_INVALID_RESPONSE]:`Invalid API response`,[A.QUOTE_FAILED]:`Failed to get quote`,[A.QUOTE_EXPIRED]:`Quote has expired`,[A.DEPOSIT_BUILD_FAILED]:`Failed to build deposit transaction`,[A.DEPOSIT_SUBMIT_FAILED]:`Failed to submit deposit`,[A.ORDER_FAILED]:`Order processing failed`,[A.TRANSACTION_FAILED]:`Transaction failed`,[A.TRANSACTION_REJECTED]:`Transaction was rejected`,[A.INSUFFICIENT_BALANCE]:`Insufficient balance`,[A.ELEMENT_NOT_FOUND]:`Target DOM element not found`,[A.INITIALIZATION_FAILED]:`Widget initialization failed`,[A.FIAT_QUOTE_FAILED]:`Failed to get fiat quote`,[A.FIAT_ORDER_FAILED]:`Failed to create fiat order`,[A.FIAT_STATUS_FAILED]:`Failed to get fiat order status`,[A.FIAT_PROVIDER_ERROR]:`Fiat provider error`,[A.FIAT_AMOUNT_OUT_OF_RANGE]:`Fiat amount is out of range`},j=class extends Error{constructor(e,t,n){let r=typeof t==`string`?t:t instanceof Error||typeof t==`object`&&t&&`message`in t&&typeof t.message==`string`?t.message:Ve[e]??`Unknown error`;super(r),this.name=`TokenFlightError`,this.code=e,this.details=n}},He=`https://api.hyperstream.dev`,Ue=15e3,We=class{constructor(e){this.baseUrl=e.baseUrl.replace(/\/$/,``),this.ky=Be.create({prefixUrl:this.baseUrl,timeout:Ue,retry:0,headers:{"X-TF-SDK-Version":`0.1.2`}})}async request(e){try{return await e}catch(e){if(e instanceof j)throw e;if(e instanceof fe)throw new j(A.API_TIMEOUT,`API request timed out`,e);if(e instanceof i){let t=``;try{t=await e.response.json()}catch{t=await e.response.text().catch(()=>``)}let n=typeof t==`object`&&t&&`message`in t?String(t.message):`API request failed: ${e.response.status} ${e.response.statusText}`;throw new j(A.API_REQUEST_FAILED,n,{status:e.response.status,body:t})}throw new j(A.API_REQUEST_FAILED,`API request failed: ${String(e)}`,e)}}getQuotes(e,t){return this.request(this.ky.post(`v1/quotes`,{json:e,signal:t}).json())}buildDeposit(e,t){return this.request(this.ky.post(`v1/deposit/build`,{json:e,signal:t}).json())}submitDeposit(e,t){return this.request(this.ky.put(`v1/deposit/submit`,{json:e,signal:t}).json())}getOrdersByAddress(e,t){let n={};return t?.orderIds?.length&&(n.orderIds=t.orderIds.join(`,`)),t?.limit&&(n.limit=t.limit.toString()),t?.cursor&&(n.cursor=t.cursor.toString()),this.request(this.ky.get(`v1/orders/${encodeURIComponent(e)}`,{searchParams:n}).json())}async getOrderById(e,t){return(await this.getOrdersByAddress(e,{orderIds:[t]})).data[0]??null}getTokens(e){let t={};return e?.q&&(t.q=e.q),e?.chainIds?.length&&(t.chainIds=e.chainIds.join(`,`)),e?.limit&&(t.limit=e.limit.toString()),e?.cursor&&(t.cursor=e.cursor.toString()),this.request(this.ky.get(`v1/tokens`,{searchParams:t}).json())}searchTokens(e,t){let n={q:e};return t?.chainIds?.length&&(n.chainIds=t.chainIds.join(`,`)),this.request(this.ky.get(`v1/tokens/search`,{searchParams:n}).json())}getTopTokens(e){let t={};return e?.chainIds?.length&&(t.chainIds=e.chainIds.join(`,`)),this.request(this.ky.get(`v1/tokens/top`,{searchParams:t}).json())}getTokenBalances(e,t){let n={};return t?.chainIds?.length&&(n.chainIds=t.chainIds.join(`,`)),this.request(this.ky.get(`v1/tokens/balances/${encodeURIComponent(e)}`,{searchParams:n}).json())}getChains(){return this.request(this.ky.get(`v1/chains`).json())}},Ge=`https://fiat.hyperstream.dev`,Ke=15e3,qe=class{constructor(e){this.baseUrl=e.baseUrl.replace(/\/$/,``),this.ky=Be.create({prefixUrl:this.baseUrl,timeout:Ke,retry:0,headers:{"X-TF-SDK-Version":`0.1.2`}})}async request(e){try{return await e}catch(e){if(e instanceof j)throw e;if(e instanceof fe)throw new j(A.API_TIMEOUT,`Fiat API request timed out`,e);if(e instanceof i){let t=``;try{t=await e.response.json()}catch{t=await e.response.text().catch(()=>``)}let n=typeof t==`object`&&t&&`message`in t?String(t.message):`Fiat API request failed: ${e.response.status} ${e.response.statusText}`;throw new j(A.API_REQUEST_FAILED,n,{status:e.response.status,body:t})}throw new j(A.API_REQUEST_FAILED,`Fiat API request failed: ${String(e)}`,e)}}getProviders(){return this.request(this.ky.get(`v1/fiat/providers`).json())}getQuote(e,t){return this.request(this.ky.post(`v1/fiat/quote`,{json:e,signal:t}).json())}createOrder(e,t){return this.request(this.ky.post(`v1/fiat/order`,{json:e,signal:t}).json())}getStatus(e,t,n){let r=n?{force:`1`}:void 0;return this.request(this.ky.get(`v1/fiat/status/${encodeURIComponent(e)}`,{signal:t,searchParams:r}).json())}},Je=[`filled`,`refunded`,`failed`],Ye=new Set([`completed`,`failed`,`canceled`]),M={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return Xe(this.context.count)},getNextContextId(){return Xe(this.context.count++)}};function Xe(e){let t=String(e),n=t.length-1;return M.context.id+(n?String.fromCharCode(96+n):``)+t}function Ze(e){M.context=e}function Qe(){return{...M.context,id:M.getNextContextId(),count:0}}var $e=(e,t)=>e===t,et=Symbol(`solid-proxy`),tt=typeof Proxy==`function`,nt=Symbol(`solid-track`),rt={equals:$e},it=null,at=Vt,ot=1,st=2,ct={owned:null,cleanups:null,context:null,owner:null},lt={},N=null,P=null,ut=null,dt=null,F=null,I=null,ft=null,pt=0;function mt(e,t){let n=F,r=N,i=e.length===0,a=t===void 0?r:t,o=i?ct:{owned:null,cleanups:null,context:a?a.context:null,owner:a},s=i?e:()=>e(()=>B(()=>Kt(o)));N=o,F=null;try{return zt(s,!0)}finally{F=n,N=r}}function L(e,t){t=t?Object.assign({},rt,t):rt;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0};return[Nt.bind(n),e=>(typeof e==`function`&&(e=P&&P.running&&P.sources.has(n)?e(n.tValue):e(n.value)),Pt(n,e))]}function ht(e,t,n){let r=Lt(e,t,!0,ot);ut&&P&&P.running?I.push(r):Ft(r)}function R(e,t,n){let r=Lt(e,t,!1,ot);ut&&P&&P.running?I.push(r):Ft(r)}function gt(e,t,n){at=Ut;let r=Lt(e,t,!1,ot),i=Mt&&At(Mt);i&&(r.suspense=i),(!n||!n.render)&&(r.user=!0),ft?ft.push(r):Ft(r)}function z(e,t,n){n=n?Object.assign({},rt,n):rt;let r=Lt(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,ut&&P&&P.running?(r.tState=ot,I.push(r)):Ft(r),Nt.bind(r)}function _t(e){return e&&typeof e==`object`&&`then`in e}function vt(e,t,n){let r,i,a;typeof t==`function`?(r=e,i=t,a=n||{}):(r=!0,i=e,a=t||{});let o=null,s=lt,c=null,l=!1,u=!1,d=`initialValue`in a,f=typeof r==`function`&&z(r),p=new Set,[m,h]=(a.storage||L)(a.initialValue),[g,_]=L(void 0),[v,y]=L(void 0,{equals:!1}),[b,x]=L(d?`ready`:`unresolved`);M.context&&(c=M.getNextContextId(),a.ssrLoadFrom===`initial`?s=a.initialValue:M.load&&M.has(c)&&(s=M.load(c)));function S(e,t,n,r){return o===e&&(o=null,r!==void 0&&(d=!0),(e===s||t===s)&&a.onHydrated&&queueMicrotask(()=>a.onHydrated(r,{value:t})),s=lt,P&&e&&l?(P.promises.delete(e),l=!1,zt(()=>{P.running=!0,ee(t,n)},!1)):ee(t,n)),t}function ee(e,t){zt(()=>{t===void 0&&h(()=>e),x(t===void 0?d?`ready`:`unresolved`:`errored`),_(t);for(let e of p.keys())e.decrement();p.clear()},!1)}function te(){let e=Mt&&At(Mt),t=m(),n=g();if(n!==void 0&&!o)throw n;return F&&!F.user&&e&&ht(()=>{v(),o&&(e.resolved&&P&&l?P.promises.add(o):p.has(e)||(e.increment(),p.add(e)))}),t}function ne(e=!0){if(e!==!1&&u)return;u=!1;let t=f?f():r;if(l=P&&P.running,t==null||t===!1){S(o,B(m));return}P&&o&&P.promises.delete(o);let n,a=s===lt?B(()=>{try{return i(t,{value:m(),refetching:e})}catch(e){n=e}}):s;if(n!==void 0){S(o,void 0,Jt(n),t);return}else if(!_t(a))return S(o,a,void 0,t),a;return o=a,`v`in a?(a.s===1?S(o,a.v,void 0,t):S(o,void 0,Jt(a.v),t),a):(u=!0,queueMicrotask(()=>u=!1),zt(()=>{x(d?`refreshing`:`pending`),y()},!1),a.then(e=>S(a,e,void 0,t),e=>S(a,void 0,Jt(e),t)))}Object.defineProperties(te,{state:{get:()=>b()},error:{get:()=>g()},loading:{get(){let e=b();return e===`pending`||e===`refreshing`}},latest:{get(){if(!d)return te();let e=g();if(e&&!o)throw e;return m()}}});let C=N;return f?ht(()=>(C=N,ne(!1))):ne(!1),[te,{refetch:e=>Tt(C,()=>ne(e)),mutate:h}]}function yt(e){return zt(e,!1)}function B(e){if(!dt&&F===null)return e();let t=F;F=null;try{return dt?dt.untrack(e):e()}finally{F=t}}function bt(e,t,n){let r=Array.isArray(e),i,a=n&&n.defer;return n=>{let o;if(r){o=Array(e.length);for(let t=0;t<e.length;t++)o[t]=e[t]()}else o=e();if(a)return a=!1,n;let s=B(()=>t(o,i,n));return i=o,s}}function xt(e){gt(()=>B(e))}function St(e){return N===null||(N.cleanups===null?N.cleanups=[e]:N.cleanups.push(e)),e}function Ct(){return F}function wt(){return N}function Tt(e,t){let n=N,r=F;N=e,F=null;try{return zt(t,!0)}catch(e){Xt(e)}finally{N=n,F=r}}function Et(e){if(P&&P.running)return e(),P.done;let t=F,n=N;return Promise.resolve().then(()=>{F=t,N=n;let r;return(ut||Mt)&&(r=P||(P={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0}),r.done||(r.done=new Promise(e=>r.resolve=e)),r.running=!0),zt(e,!1),F=N=null,r?r.done:void 0})}var[Dt,Ot]=L(!1);function kt(e,t){let n=Symbol(`context`);return{id:n,Provider:Qt(n),defaultValue:e}}function At(e){let t;return N&&N.context&&(t=N.context[e.id])!==void 0?t:e.defaultValue}function jt(e){let t=z(e),n=z(()=>Zt(t()));return n.toArray=()=>{let e=n();return Array.isArray(e)?e:e==null?[]:[e]},n}var Mt;function Nt(){let e=P&&P.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===ot)Ft(this);else{let e=I;I=null,zt(()=>Wt(this),!1),I=e}if(F){let e=this.observers?this.observers.length:0;F.sources?(F.sources.push(this),F.sourceSlots.push(e)):(F.sources=[this],F.sourceSlots=[e]),this.observers?(this.observers.push(F),this.observerSlots.push(F.sources.length-1)):(this.observers=[F],this.observerSlots=[F.sources.length-1])}return e&&P.sources.has(this)?this.tValue:this.value}function Pt(e,t,n){let r=P&&P.running&&P.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(P){let r=P.running;(r||!n&&P.sources.has(e))&&(P.sources.add(e),e.tValue=t),r||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&zt(()=>{for(let t=0;t<e.observers.length;t+=1){let n=e.observers[t],r=P&&P.running;r&&P.disposed.has(n)||((r?!n.tState:!n.state)&&(n.pure?I.push(n):ft.push(n),n.observers&&Gt(n)),r?n.tState=ot:n.state=ot)}if(I.length>1e6)throw I=[],Error()},!1)}return t}function Ft(e){if(!e.fn)return;Kt(e);let t=pt;It(e,P&&P.running&&P.sources.has(e)?e.tValue:e.value,t),P&&!P.running&&P.sources.has(e)&&queueMicrotask(()=>{zt(()=>{P&&(P.running=!0),F=N=e,It(e,e.tValue,t),F=N=null},!1)})}function It(e,t,n){let r,i=N,a=F;F=N=e;try{r=e.fn(t)}catch(t){return e.pure&&(P&&P.running?(e.tState=ot,e.tOwned&&e.tOwned.forEach(Kt),e.tOwned=void 0):(e.state=ot,e.owned&&e.owned.forEach(Kt),e.owned=null)),e.updatedAt=n+1,Xt(t)}finally{F=a,N=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&`observers`in e?Pt(e,r,!0):P&&P.running&&e.pure?(P.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function Lt(e,t,n,r=ot,i){let a={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:N,context:N?N.context:null,pure:n};if(P&&P.running&&(a.state=0,a.tState=r),N===null||N!==ct&&(P&&P.running&&N.pure?N.tOwned?N.tOwned.push(a):N.tOwned=[a]:N.owned?N.owned.push(a):N.owned=[a]),dt&&a.fn){let[e,t]=L(void 0,{equals:!1}),n=dt.factory(a.fn,t);St(()=>n.dispose());let r=dt.factory(a.fn,()=>Et(t).then(()=>r.dispose()));a.fn=t=>(e(),P&&P.running?r.track(t):n.track(t))}return a}function Rt(e){let t=P&&P.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===st)return Wt(e);if(e.suspense&&B(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<pt);){if(t&&P.disposed.has(e))return;(t?e.tState:e.state)&&n.push(e)}for(let r=n.length-1;r>=0;r--){if(e=n[r],t){let t=e,i=n[r+1];for(;(t=t.owner)&&t!==i;)if(P.disposed.has(t))return}if((t?e.tState:e.state)===ot)Ft(e);else if((t?e.tState:e.state)===st){let t=I;I=null,zt(()=>Wt(e,n[0]),!1),I=t}}}function zt(e,t){if(I)return e();let n=!1;t||(I=[]),ft?n=!0:ft=[],pt++;try{let t=e();return Bt(n),t}catch(e){n||(ft=null),I=null,Xt(e)}}function Bt(e){if(I&&(ut&&P&&P.running?Ht(I):Vt(I),I=null),e)return;let t;if(P){if(!P.promises.size&&!P.queue.size){let e=P.sources,n=P.disposed;ft.push.apply(ft,P.effects),t=P.resolve;for(let e of ft)`tState`in e&&(e.state=e.tState),delete e.tState;P=null,zt(()=>{for(let e of n)Kt(e);for(let t of e){if(t.value=t.tValue,t.owned)for(let e=0,n=t.owned.length;e<n;e++)Kt(t.owned[e]);t.tOwned&&(t.owned=t.tOwned),delete t.tValue,delete t.tOwned,t.tState=0}Ot(!1)},!1)}else if(P.running){P.running=!1,P.effects.push.apply(P.effects,ft),ft=null,Ot(!0);return}}let n=ft;ft=null,n.length&&zt(()=>at(n),!1),t&&t()}function Vt(e){for(let t=0;t<e.length;t++)Rt(e[t])}function Ht(e){for(let t=0;t<e.length;t++){let n=e[t],r=P.queue;r.has(n)||(r.add(n),ut(()=>{r.delete(n),zt(()=>{P.running=!0,Rt(n)},!1),P&&(P.running=!1)}))}}function Ut(e){let t,n=0;for(t=0;t<e.length;t++){let r=e[t];r.user?e[n++]=r:Rt(r)}if(M.context){if(M.count){M.effects||(M.effects=[]),M.effects.push(...e.slice(0,n));return}Ze()}for(M.effects&&(M.done||!M.count)&&(e=[...M.effects,...e],n+=M.effects.length,delete M.effects),t=0;t<n;t++)Rt(e[t])}function Wt(e,t){let n=P&&P.running;n?e.tState=0:e.state=0;for(let r=0;r<e.sources.length;r+=1){let i=e.sources[r];if(i.sources){let e=n?i.tState:i.state;e===ot?i!==t&&(!i.updatedAt||i.updatedAt<pt)&&Rt(i):e===st&&Wt(i,t)}}}function Gt(e){let t=P&&P.running;for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=st:r.state=st,r.pure?I.push(r):ft.push(r),r.observers&&Gt(r))}}function Kt(e){let t;if(e.sources)for(;e.sources.length;){let t=e.sources.pop(),n=e.sourceSlots.pop(),r=t.observers;if(r&&r.length){let e=r.pop(),i=t.observerSlots.pop();n<r.length&&(e.sourceSlots[i]=n,r[n]=e,t.observerSlots[n]=i)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)Kt(e.tOwned[t]);delete e.tOwned}if(P&&P.running&&e.pure)qt(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)Kt(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}P&&P.running?e.tState=0:e.state=0}function qt(e,t){if(t||(e.tState=0,P.disposed.add(e)),e.owned)for(let t=0;t<e.owned.length;t++)qt(e.owned[t])}function Jt(e){return e instanceof Error?e:Error(typeof e==`string`?e:`Unknown error`,{cause:e})}function Yt(e,t,n){try{for(let n of t)n(e)}catch(e){Xt(e,n&&n.owner||null)}}function Xt(e,t=N){let n=it&&t&&t.context&&t.context[it],r=Jt(e);if(!n)throw r;ft?ft.push({fn(){Yt(r,n,t)},state:ot}):Yt(r,n,t)}function Zt(e){if(typeof e==`function`&&!e.length)return Zt(e());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++){let r=Zt(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function Qt(e,t){return function(t){let n;return R(()=>n=B(()=>(N.context={...N.context,[e]:t.value},jt(()=>t.children))),void 0),n}}var $t=Symbol(`fallback`);function en(e){for(let t=0;t<e.length;t++)e[t]()}function tn(e,t,n={}){let r=[],i=[],a=[],o=0,s=t.length>1?[]:null;return St(()=>en(a)),()=>{let c=e()||[],l=c.length,u,d;return c[nt],B(()=>{let e,t,p,m,h,g,_,v,y;if(l===0)o!==0&&(en(a),a=[],r=[],i=[],o=0,s&&(s=[])),n.fallback&&(r=[$t],i[0]=mt(e=>(a[0]=e,n.fallback())),o=1);else if(o===0){for(i=Array(l),d=0;d<l;d++)r[d]=c[d],i[d]=mt(f);o=l}else{for(p=Array(l),m=Array(l),s&&(h=Array(l)),g=0,_=Math.min(o,l);g<_&&r[g]===c[g];g++);for(_=o-1,v=l-1;_>=g&&v>=g&&r[_]===c[v];_--,v--)p[v]=i[_],m[v]=a[_],s&&(h[v]=s[_]);for(e=new Map,t=Array(v+1),d=v;d>=g;d--)y=c[d],u=e.get(y),t[d]=u===void 0?-1:u,e.set(y,d);for(u=g;u<=_;u++)y=r[u],d=e.get(y),d!==void 0&&d!==-1?(p[d]=i[u],m[d]=a[u],s&&(h[d]=s[u]),d=t[d],e.set(y,d)):a[u]();for(d=g;d<l;d++)d in p?(i[d]=p[d],a[d]=m[d],s&&(s[d]=h[d],s[d](d))):i[d]=mt(f);i=i.slice(0,o=l),r=c.slice(0)}return i});function f(e){if(a[d]=e,s){let[e,n]=L(d);return s[d]=n,t(c[d],e)}return t(c[d])}}}function nn(e,t,n={}){let r=[],i=[],a=[],o=[],s=0,c;return St(()=>en(a)),()=>{let l=e()||[],u=l.length;return l[nt],B(()=>{if(u===0)return s!==0&&(en(a),a=[],r=[],i=[],s=0,o=[]),n.fallback&&(r=[$t],i[0]=mt(e=>(a[0]=e,n.fallback())),s=1),i;for(r[0]===$t&&(a[0](),a=[],r=[],i=[],s=0),c=0;c<u;c++)c<r.length&&r[c]!==l[c]?o[c](()=>l[c]):c>=r.length&&(i[c]=mt(d));for(;c<r.length;c++)a[c]();return s=o.length=a.length=u,r=l.slice(0),i=i.slice(0,s)});function d(e){a[c]=e;let[n,r]=L(l[c]);return o[c]=r,t(n,c)}}}var rn=!1;function V(e,t){if(rn&&M.context){let n=M.context;Ze(Qe());let r=B(()=>e(t||{}));return Ze(n),r}return B(()=>e(t||{}))}function an(){return!0}var on={get(e,t,n){return t===et?n:e.get(t)},has(e,t){return t===et?!0:e.has(t)},set:an,deleteProperty:an,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:an,deleteProperty:an}},ownKeys(e){return e.keys()}};function sn(e){return(e=typeof e==`function`?e():e)?e:{}}function cn(){for(let e=0,t=this.length;e<t;++e){let t=this[e]();if(t!==void 0)return t}}function ln(...e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];t=t||!!r&&et in r,e[n]=typeof r==`function`?(t=!0,z(r)):r}if(tt&&t)return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){let r=sn(e[n])[t];if(r!==void 0)return r}},has(t){for(let n=e.length-1;n>=0;n--)if(t in sn(e[n]))return!0;return!1},keys(){let t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(sn(e[n])));return[...new Set(t)]}},on);let n={},r=Object.create(null);for(let t=e.length-1;t>=0;t--){let i=e[t];if(!i)continue;let a=Object.getOwnPropertyNames(i);for(let e=a.length-1;e>=0;e--){let t=a[e];if(t===`__proto__`||t===`constructor`)continue;let o=Object.getOwnPropertyDescriptor(i,t);if(!r[t])r[t]=o.get?{enumerable:!0,configurable:!0,get:cn.bind(n[t]=[o.get.bind(i)])}:o.value===void 0?void 0:o;else{let e=n[t];e&&(o.get?e.push(o.get.bind(i)):o.value!==void 0&&e.push(()=>o.value))}}}let i={},a=Object.keys(r);for(let e=a.length-1;e>=0;e--){let t=a[e],n=r[t];n&&n.get?Object.defineProperty(i,t,n):i[t]=n?n.value:void 0}return i}function un(e,...t){let n=t.length;if(tt&&et in e){let r=n>1?t.flat():t[0],i=t.map(t=>new Proxy({get(n){return t.includes(n)?e[n]:void 0},has(n){return t.includes(n)&&n in e},keys(){return t.filter(t=>t in e)}},on));return i.push(new Proxy({get(t){return r.includes(t)?void 0:e[t]},has(t){return r.includes(t)?!1:t in e},keys(){return Object.keys(e).filter(e=>!r.includes(e))}},on)),i}let r=[];for(let e=0;e<=n;e++)r[e]={};for(let i of Object.getOwnPropertyNames(e)){let a=n;for(let e=0;e<t.length;e++)if(t[e].includes(i)){a=e;break}let o=Object.getOwnPropertyDescriptor(e,i);!o.get&&!o.set&&o.enumerable&&o.writable&&o.configurable?r[a][i]=o.value:Object.defineProperty(r[a],i,o)}return r}var dn=e=>`Stale read from <${e}>.`;function fn(e){let t=`fallback`in e&&{fallback:()=>e.fallback};return z(tn(()=>e.each,e.children,t||void 0))}function pn(e){let t=`fallback`in e&&{fallback:()=>e.fallback};return z(nn(()=>e.each,e.children,t||void 0))}function H(e){let t=e.keyed,n=z(()=>e.when,void 0,void 0),r=t?n:z(n,void 0,{equals:(e,t)=>!e==!t});return z(()=>{let i=r();if(i){let a=e.children;return typeof a==`function`&&a.length>0?B(()=>a(t?i:()=>{if(!B(r))throw dn(`Show`);return n()})):a}return e.fallback},void 0,void 0)}function mn(e){let t=jt(()=>e.children),n=z(()=>{let e=t(),n=Array.isArray(e)?e:[e],r=()=>void 0;for(let e=0;e<n.length;e++){let t=e,i=n[e],a=r,o=z(()=>a()?void 0:i.when,void 0,void 0),s=i.keyed?o:z(o,void 0,{equals:(e,t)=>!e==!t});r=()=>a()||(s()?[t,o,i]:void 0)}return r});return z(()=>{let t=n()();if(!t)return e.fallback;let[r,i,a]=t,o=a.children;return typeof o==`function`&&o.length>0?B(()=>o(a.keyed?i():()=>{if(B(n)()?.[0]!==r)throw dn(`Match`);return i()})):o},void 0,void 0)}function hn(e){return e}var gn=new Set([`className`,`value`,`readOnly`,`noValidate`,`formNoValidate`,`isMap`,`noModule`,`playsInline`,`adAuctionHeaders`,`allowFullscreen`,`browsingTopics`,`defaultChecked`,`defaultMuted`,`defaultSelected`,`disablePictureInPicture`,`disableRemotePlayback`,`preservesPitch`,`shadowRootClonable`,`shadowRootCustomElementRegistry`,`shadowRootDelegatesFocus`,`shadowRootSerializable`,`sharedStorageWritable`,...`allowfullscreen.async.alpha.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.hidden.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.adauctionheaders.browsingtopics.credentialless.defaultchecked.defaultmuted.defaultselected.defer.disablepictureinpicture.disableremoteplayback.preservespitch.shadowrootclonable.shadowrootcustomelementregistry.shadowrootdelegatesfocus.shadowrootserializable.sharedstoragewritable`.split(`.`)]),_n=new Set([`innerHTML`,`textContent`,`innerText`,`children`]),vn=Object.assign(Object.create(null),{className:`class`,htmlFor:`for`}),yn=Object.assign(Object.create(null),{class:`className`,novalidate:{$:`noValidate`,FORM:1},formnovalidate:{$:`formNoValidate`,BUTTON:1,INPUT:1},ismap:{$:`isMap`,IMG:1},nomodule:{$:`noModule`,SCRIPT:1},playsinline:{$:`playsInline`,VIDEO:1},readonly:{$:`readOnly`,INPUT:1,TEXTAREA:1},adauctionheaders:{$:`adAuctionHeaders`,IFRAME:1},allowfullscreen:{$:`allowFullscreen`,IFRAME:1},browsingtopics:{$:`browsingTopics`,IMG:1},defaultchecked:{$:`defaultChecked`,INPUT:1},defaultmuted:{$:`defaultMuted`,AUDIO:1,VIDEO:1},defaultselected:{$:`defaultSelected`,OPTION:1},disablepictureinpicture:{$:`disablePictureInPicture`,VIDEO:1},disableremoteplayback:{$:`disableRemotePlayback`,AUDIO:1,VIDEO:1},preservespitch:{$:`preservesPitch`,AUDIO:1,VIDEO:1},shadowrootclonable:{$:`shadowRootClonable`,TEMPLATE:1},shadowrootdelegatesfocus:{$:`shadowRootDelegatesFocus`,TEMPLATE:1},shadowrootserializable:{$:`shadowRootSerializable`,TEMPLATE:1},sharedstoragewritable:{$:`sharedStorageWritable`,IFRAME:1,IMG:1}});function bn(e,t){let n=yn[e];return typeof n==`object`?n[t]?n.$:void 0:n}var xn=new Set([`beforeinput`,`click`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`]),Sn=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.feDropShadow.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`.split(`.`)),Cn={xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`},wn=e=>z(()=>e());function Tn(e,t,n){let r=n.length,i=t.length,a=r,o=0,s=0,c=t[i-1].nextSibling,l=null;for(;o<i||s<a;){if(t[o]===n[s]){o++,s++;continue}for(;t[i-1]===n[a-1];)i--,a--;if(i===o){let t=a<r?s?n[s-1].nextSibling:n[a-s]:c;for(;s<a;)e.insertBefore(n[s++],t)}else if(a===s)for(;o<i;)(!l||!l.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[a-1]&&n[s]===t[i-1]){let r=t[--i].nextSibling;e.insertBefore(n[s++],t[o++].nextSibling),e.insertBefore(n[--a],r),t[i]=n[a]}else{if(!l){l=new Map;let e=s;for(;e<a;)l.set(n[e],e++)}let r=l.get(t[o]);if(r!=null)if(s<r&&r<a){let c=o,u=1,d;for(;++c<i&&c<a&&!((d=l.get(t[c]))==null||d!==r+u);)u++;if(u>r-s){let i=t[o];for(;s<r;)e.insertBefore(n[s++],i)}else e.replaceChild(n[s++],t[o++])}else o++;else t[o++].remove()}}}var En=`_$DX_DELEGATE`;function Dn(e,t,n,r={}){let i;return mt(r=>{i=r,t===document?e():q(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=``}}function U(e,t,n,r){let i,a=()=>{let t=r?document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`template`):document.createElement(`template`);return t.innerHTML=e,n?t.content.firstChild.firstChild:r?t.firstChild:t.content.firstChild},o=t?()=>B(()=>document.importNode(i||(i=a()),!0)):()=>(i||(i=a())).cloneNode(!0);return o.cloneNode=o,o}function On(e,t=window.document){let n=t[En]||(t[En]=new Set);for(let r=0,i=e.length;r<i;r++){let i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,Hn))}}function W(e,t,n){Rn(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function kn(e,t,n,r){Rn(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function An(e,t,n){Rn(e)||(n?e.setAttribute(t,``):e.removeAttribute(t))}function G(e,t){Rn(e)||(t==null?e.removeAttribute(`class`):e.className=t)}function K(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){let r=n[0];e.addEventListener(t,n[0]=t=>r.call(e,n[1],t))}else e.addEventListener(t,n,typeof n!=`function`&&n)}function jn(e,t,n={}){let r=Object.keys(t||{}),i=Object.keys(n),a,o;for(a=0,o=i.length;a<o;a++){let r=i[a];!r||r===`undefined`||t[r]||(Bn(e,r,!1),delete n[r])}for(a=0,o=r.length;a<o;a++){let i=r[a],o=!!t[i];!i||i===`undefined`||n[i]===o||!o||(Bn(e,i,!0),n[i]=o)}return n}function Mn(e,t,n){if(!t)return n?W(e,`style`):t;let r=e.style;if(typeof t==`string`)return r.cssText=t;typeof n==`string`&&(r.cssText=n=void 0),n||(n={}),t||(t={});let i,a;for(a in n)t[a]??r.removeProperty(a),delete n[a];for(a in t)i=t[a],i!==n[a]&&(r.setProperty(a,i),n[a]=i);return n}function Nn(e,t,n){n==null?e.style.removeProperty(t):e.style.setProperty(t,n)}function Pn(e,t={},n,r){let i={};return r||R(()=>i.children=Un(e,t.children,i.children)),R(()=>typeof t.ref==`function`&&Fn(t.ref,e)),R(()=>In(e,t,n,!0,i,!0)),i}function Fn(e,t,n){return B(()=>e(t,n))}function q(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!=`function`)return Un(e,t,r,n);R(r=>Un(e,t(),r,n),r)}function In(e,t,n,r,i={},a=!1){t||(t={});for(let r in i)if(!(r in t)){if(r===`children`)continue;i[r]=Vn(e,r,null,i[r],n,a,t)}for(let o in t){if(o===`children`){r||Un(e,t.children);continue}let s=t[o];i[o]=Vn(e,o,s,i[o],n,a,t)}}function Ln(e){let t,n;return!Rn()||!(t=M.registry.get(n=qn()))?e():(M.completed&&M.completed.add(t),M.registry.delete(n),t)}function Rn(e){return!!M.context&&!M.done&&(!e||e.isConnected)}function zn(e){return e.toLowerCase().replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function Bn(e,t,n){let r=t.trim().split(/\s+/);for(let t=0,i=r.length;t<i;t++)e.classList.toggle(r[t],n)}function Vn(e,t,n,r,i,a,o){let s,c,l,u,d;if(t===`style`)return Mn(e,n,r);if(t===`classList`)return jn(e,n,r);if(n===r)return r;if(t===`ref`)a||n(e);else if(t.slice(0,3)===`on:`){let i=t.slice(3);r&&e.removeEventListener(i,r,typeof r!=`function`&&r),n&&e.addEventListener(i,n,typeof n!=`function`&&n)}else if(t.slice(0,10)===`oncapture:`){let i=t.slice(10);r&&e.removeEventListener(i,r,!0),n&&e.addEventListener(i,n,!0)}else if(t.slice(0,2)===`on`){let i=t.slice(2).toLowerCase(),a=xn.has(i);if(!a&&r){let t=Array.isArray(r)?r[0]:r;e.removeEventListener(i,t)}(a||n)&&(K(e,i,n,a),a&&On([i]))}else if(t.slice(0,5)===`attr:`)W(e,t.slice(5),n);else if(t.slice(0,5)===`bool:`)An(e,t.slice(5),n);else if((d=t.slice(0,5)===`prop:`)||(l=_n.has(t))||!i&&((u=bn(t,e.tagName))||(c=gn.has(t)))||(s=e.nodeName.includes(`-`)||`is`in o)){if(d)t=t.slice(5),c=!0;else if(Rn(e))return n;t===`class`||t===`className`?G(e,n):s&&!c&&!l?e[zn(t)]=n:e[u||t]=n}else{let r=i&&t.indexOf(`:`)>-1&&Cn[t.split(`:`)[0]];r?kn(e,r,t,n):W(e,vn[t]||t,n)}return n}function Hn(e){if(M.registry&&M.events&&M.events.find(([t,n])=>n===e))return;let t=e.target,n=`$$${e.type}`,r=e.target,i=e.currentTarget,a=t=>Object.defineProperty(e,`target`,{configurable:!0,value:t}),o=()=>{let r=t[n];if(r&&!t.disabled){let i=t[`${n}Data`];if(i===void 0?r.call(t,e):r.call(t,i,e),e.cancelBubble)return}return t.host&&typeof t.host!=`string`&&!t.host._$host&&t.contains(e.target)&&a(t.host),!0},s=()=>{for(;o()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,`currentTarget`,{configurable:!0,get(){return t||document}}),M.registry&&!M.done&&(M.done=_$HY.done=!0),e.composedPath){let n=e.composedPath();a(n[0]);for(let e=0;e<n.length-2&&(t=n[e],o());e++){if(t._$host){t=t._$host,s();break}if(t.parentNode===i)break}}else s();a(r)}function Un(e,t,n,r,i){let a=Rn(e);if(a){!n&&(n=[...e.childNodes]);let t=[];for(let e=0;e<n.length;e++){let r=n[e];r.nodeType===8&&r.data.slice(0,2)===`!$`?r.remove():t.push(r)}n=t}for(;typeof n==`function`;)n=n();if(t===n)return n;let o=typeof t,s=r!==void 0;if(e=s&&n[0]&&n[0].parentNode||e,o===`string`||o===`number`){if(a||o===`number`&&(t=t.toString(),t===n))return n;if(s){let i=n[0];i&&i.nodeType===3?i.data!==t&&(i.data=t):i=document.createTextNode(t),n=Kn(e,n,r,i)}else n=n!==``&&typeof n==`string`?e.firstChild.data=t:e.textContent=t}else if(t==null||o===`boolean`){if(a)return n;n=Kn(e,n,r)}else if(o===`function`)return R(()=>{let i=t();for(;typeof i==`function`;)i=i();n=Un(e,i,n,r)}),()=>n;else if(Array.isArray(t)){let o=[],c=n&&Array.isArray(n);if(Wn(o,t,n,i))return R(()=>n=Un(e,o,n,r,!0)),()=>n;if(a){if(!o.length)return n;if(r===void 0)return n=[...e.childNodes];let t=o[0];if(t.parentNode!==e)return n;let i=[t];for(;(t=t.nextSibling)!==r;)i.push(t);return n=i}if(o.length===0){if(n=Kn(e,n,r),s)return n}else c?n.length===0?Gn(e,o,r):Tn(e,n,o):(n&&Kn(e),Gn(e,o));n=o}else if(t.nodeType){if(a&&t.parentNode)return n=s?[t]:t;if(Array.isArray(n)){if(s)return n=Kn(e,n,r,t);Kn(e,n,null,t)}else n==null||n===``||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}return n}function Wn(e,t,n,r){let i=!1;for(let a=0,o=t.length;a<o;a++){let o=t[a],s=n&&n[e.length],c;if(!(o==null||o===!0||o===!1))if((c=typeof o)==`object`&&o.nodeType)e.push(o);else if(Array.isArray(o))i=Wn(e,o,s)||i;else if(c===`function`)if(r){for(;typeof o==`function`;)o=o();i=Wn(e,Array.isArray(o)?o:[o],Array.isArray(s)?s:[s])||i}else e.push(o),i=!0;else{let t=String(o);s&&s.nodeType===3&&s.data===t?e.push(s):e.push(document.createTextNode(t))}}return i}function Gn(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function Kn(e,t,n,r){if(n===void 0)return e.textContent=``;let i=r||document.createTextNode(``);if(t.length){let r=!1;for(let a=t.length-1;a>=0;a--){let o=t[a];if(i!==o){let t=o.parentNode===e;!r&&!a?t?e.replaceChild(i,o):e.insertBefore(i,n):t&&o.remove()}else r=!0}}else e.insertBefore(i,n);return[i]}function qn(){return M.getNextContextId()}var Jn=`http://www.w3.org/2000/svg`;function Yn(e,t=!1,n=void 0){return t?document.createElementNS(Jn,e):document.createElement(e,{is:n})}function Xn(e){let{useShadow:t}=e,n=document.createTextNode(``),r=()=>e.mount||document.body,i=wt(),a,o=!!M.context;return gt(()=>{o&&(wt().user=o=!1),a||(a=Tt(i,()=>z(()=>e.children)));let s=r();if(s instanceof HTMLHeadElement){let[e,t]=L(!1);mt(t=>q(s,()=>e()?t():a(),null)),St(()=>t(!0))}else{let r=Yn(e.isSVG?`g`:`div`,e.isSVG),i=t&&r.attachShadow?r.attachShadow({mode:`open`}):r;Object.defineProperty(r,`_$host`,{get(){return n.parentNode},configurable:!0}),q(i,a),s.appendChild(r),e.ref&&e.ref(r),St(()=>s.removeChild(r))}},void 0,{render:!o}),n}function Zn(e,t){let n=z(e);return z(()=>{let e=n();switch(typeof e){case`function`:return B(()=>e(t));case`string`:let n=Sn.has(e),r=M.context?Ln():Yn(e,n,B(()=>t.is));return Pn(r,t,n),r}})}function Qn(e){let[,t]=un(e,[`component`]);return Zn(()=>e.component,t)}var $n=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},er,tr,nr={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},rr=new(er=new WeakMap,tr=new WeakMap,class{constructor(){w(this,er,nr),w(this,tr,!1)}setTimeoutProvider(e){process.env.NODE_ENV!==`production`&&E(tr,this)&&E(er,this),D(er,this,e),process.env.NODE_ENV!==`production`&&D(tr,this,!1)}setTimeout(e,t){return process.env.NODE_ENV!==`production`&&D(tr,this,!0),E(er,this).setTimeout(e,t)}clearTimeout(e){E(er,this).clearTimeout(e)}setInterval(e,t){return process.env.NODE_ENV!==`production`&&D(tr,this,!0),E(er,this).setInterval(e,t)}clearInterval(e){E(er,this).clearInterval(e)}});function ir(e){setTimeout(e,0)}var ar=typeof window>`u`||`Deno`in globalThis;function or(){}function sr(e,t){return typeof e==`function`?e(t):e}function cr(e){return typeof e==`number`&&e>=0&&e!==1/0}function lr(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ur(e,t){return typeof e==`function`?e(t):e}function dr(e,t){return typeof e==`function`?e(t):e}function fr(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==mr(o,t.options))return!1}else if(!gr(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function pr(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(hr(t.options.mutationKey)!==hr(a))return!1}else if(!gr(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function mr(e,t){return(t?.queryKeyHashFn||hr)(e)}function hr(e){return JSON.stringify(e,(e,t)=>xr(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function gr(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>gr(e[n],t[n])):!1}var _r=Object.prototype.hasOwnProperty;function vr(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=br(e)&&br(t);if(!r&&!(xr(e)&&xr(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:_r.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=vr(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function yr(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function br(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function xr(e){if(!Sr(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!Sr(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function Sr(e){return Object.prototype.toString.call(e)===`[object Object]`}function Cr(e){return new Promise(t=>{rr.setTimeout(t,e)})}function wr(e,t,n){if(typeof n.structuralSharing==`function`)return n.structuralSharing(e,t);if(n.structuralSharing!==!1){if(process.env.NODE_ENV!==`production`)try{return vr(e,t)}catch(e){throw e}return vr(e,t)}return t}function Tr(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function Er(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Dr=Symbol();function Or(e,t){return process.env.NODE_ENV!==`production`&&e.queryFn,!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Dr?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function kr(e,t){return typeof e==`function`?e(...t):!!e}function Ar(e,t,n){let r=!1,i;return Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(i??(i=t()),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var jr,Mr,Nr,Pr=new(jr=new WeakMap,Mr=new WeakMap,Nr=new WeakMap,class extends $n{constructor(){super(),w(this,jr,void 0),w(this,Mr,void 0),w(this,Nr,void 0),D(Nr,this,e=>{if(!ar&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}})}onSubscribe(){E(Mr,this)||this.setEventListener(E(Nr,this))}onUnsubscribe(){this.hasListeners()||(E(Mr,this)?.call(this),D(Mr,this,void 0))}setEventListener(e){D(Nr,this,e),E(Mr,this)?.call(this),D(Mr,this,e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()}))}setFocused(e){E(jr,this)!==e&&(D(jr,this,e),this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof E(jr,this)==`boolean`?E(jr,this):globalThis.document?.visibilityState!==`hidden`}});function Fr(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}function Ir(e){let t;if(e.then(e=>(t=e,e),or)?.catch(or),t!==void 0)return{data:t}}function Lr(e){return e}function Rr(e,t,n){if(typeof t!=`object`||!t)return;let r=e.getMutationCache(),i=e.getQueryCache(),a=n?.defaultOptions?.deserializeData??e.getDefaultOptions().hydrate?.deserializeData??Lr,o=t.mutations||[],s=t.queries||[];o.forEach(({state:t,...i})=>{r.build(e,{...e.getDefaultOptions().hydrate?.mutations,...n?.defaultOptions?.mutations,...i},t)}),s.forEach(({queryKey:t,state:r,queryHash:o,meta:s,promise:c,dehydratedAt:l})=>{let u=c?Ir(c):void 0,d=r.data===void 0?u?.data:r.data,f=d===void 0?d:a(d),p=i.get(o),m=p?.state.status===`pending`,h=p?.state.fetchStatus===`fetching`;if(p){let e=u&&l!==void 0&&l>p.state.dataUpdatedAt;if(r.dataUpdatedAt>p.state.dataUpdatedAt||e){let{fetchStatus:e,...t}=r;p.setState({...t,data:f})}}else p=i.build(e,{...e.getDefaultOptions().hydrate?.queries,...n?.defaultOptions?.queries,queryKey:t,queryHash:o,meta:s},{...r,data:f,fetchStatus:`idle`,status:f===void 0?r.status:`success`});c&&!m&&!h&&(l===void 0||l>p.state.dataUpdatedAt)&&p.fetch(void 0,{initialPromise:Promise.resolve(c).then(a)}).catch(or)})}var zr=ir;function Br(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=zr,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var Vr=Br(),Hr,Ur,Wr,Gr=new(Hr=new WeakMap,Ur=new WeakMap,Wr=new WeakMap,class extends $n{constructor(){super(),w(this,Hr,!0),w(this,Ur,void 0),w(this,Wr,void 0),D(Wr,this,e=>{if(!ar&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}})}onSubscribe(){E(Ur,this)||this.setEventListener(E(Wr,this))}onUnsubscribe(){this.hasListeners()||(E(Ur,this)?.call(this),D(Ur,this,void 0))}setEventListener(e){D(Wr,this,e),E(Ur,this)?.call(this),D(Ur,this,e(this.setOnline.bind(this)))}setOnline(e){E(Hr,this)!==e&&(D(Hr,this,e),this.listeners.forEach(t=>{t(e)}))}isOnline(){return E(Hr,this)}});function Kr(e){return Math.min(1e3*2**e,3e4)}function qr(e){return(e??`online`)===`online`?Gr.isOnline():!0}var Jr=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function Yr(e){let t=!1,n=0,r,i=Fr(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new Jr(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>Pr.isFocused()&&(e.networkMode===`always`||Gr.isOnline())&&e.canRun(),u=()=>qr(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(ar?0:3),o=e.retryDelay??Kr,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),Cr(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var Xr,Zr=(Xr=new WeakMap,class{constructor(){w(this,Xr,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),cr(this.gcTime)&&D(Xr,this,rr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ar?1/0:300*1e3))}clearGcTimeout(){E(Xr,this)&&(rr.clearTimeout(E(Xr,this)),D(Xr,this,void 0))}}),Qr,$r,ei,ti,ni,ri,ii,ai,oi=(Qr=new WeakMap,$r=new WeakMap,ei=new WeakMap,ti=new WeakMap,ni=new WeakMap,ri=new WeakMap,ii=new WeakMap,ai=new WeakSet,class extends Zr{constructor(e){super(),be(this,ai),w(this,Qr,void 0),w(this,$r,void 0),w(this,ei,void 0),w(this,ti,void 0),w(this,ni,void 0),w(this,ri,void 0),w(this,ii,void 0),D(ii,this,!1),D(ri,this,e.defaultOptions),this.setOptions(e.options),this.observers=[],D(ti,this,e.client),D(ei,this,E(ti,this).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,D(Qr,this,ui(this.options)),this.state=e.state??E(Qr,this),this.scheduleGc()}get meta(){return this.options.meta}get promise(){return E(ni,this)?.promise}setOptions(e){if(this.options={...E(ri,this),...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=ui(this.options);e.data!==void 0&&(this.setState(li(e.data,e.dataUpdatedAt)),D(Qr,this,e))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&E(ei,this).remove(this)}setData(e,t){let n=wr(this.state.data,e,this.options);return T(ai,this,si).call(this,{data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){T(ai,this,si).call(this,{type:`setState`,state:e,setStateOptions:t})}cancel(e){let t=E(ni,this)?.promise;return E(ni,this)?.cancel(e),t?t.then(or).catch(or):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(E(Qr,this))}isActive(){return this.observers.some(e=>dr(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Dr||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>ur(e.options.staleTime,this)===`static`):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!lr(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),E(ni,this)?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),E(ni,this)?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),E(ei,this).notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(E(ni,this)&&(E(ii,this)?E(ni,this).cancel({revert:!0}):E(ni,this).cancelRetry()),this.scheduleGc()),E(ei,this).notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||T(ai,this,si).call(this,{type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&E(ni,this)?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(E(ni,this))return E(ni,this).continueRetry(),E(ni,this).promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}process.env.NODE_ENV!==`production`&&Array.isArray(this.options.queryKey);let n=new AbortController,r=e=>{Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(D(ii,this,!0),n.signal)})},i=()=>{let e=Or(this.options,t),n=(()=>{let e={client:E(ti,this),queryKey:this.queryKey,meta:this.meta};return r(e),e})();return D(ii,this,!1),this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:E(ti,this),state:this.state,fetchFn:i};return r(e),e})();this.options.behavior?.onFetch(a,this),D($r,this,this.state),(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&T(ai,this,si).call(this,{type:`fetch`,meta:a.fetchOptions?.meta}),D(ni,this,Yr({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof Jr&&e.revert&&this.setState({...E($r,this),fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{T(ai,this,si).call(this,{type:`failed`,failureCount:e,error:t})},onPause:()=>{T(ai,this,si).call(this,{type:`pause`})},onContinue:()=>{T(ai,this,si).call(this,{type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}));try{let e=await E(ni,this).start();if(e===void 0)throw process.env.NODE_ENV,Error(`${this.queryHash} data is undefined`);return this.setData(e),E(ei,this).config.onSuccess?.(e,this),E(ei,this).config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof Jr){if(e.silent)return E(ni,this).promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw T(ai,this,si).call(this,{type:`error`,error:e}),E(ei,this).config.onError?.(e,this),E(ei,this).config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}});function si(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...ci(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...li(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return D($r,this,e.manual?n:void 0),n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}})(this.state),Vr.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),E(ei,this).notify({query:this,type:`updated`,action:e})})}function ci(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:qr(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function li(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function ui(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var di,J,fi,pi,mi,hi,gi,_i,vi,yi,bi,xi,Si,Ci,wi,Y,Ti=(di=new WeakMap,J=new WeakMap,fi=new WeakMap,pi=new WeakMap,mi=new WeakMap,hi=new WeakMap,gi=new WeakMap,_i=new WeakMap,vi=new WeakMap,yi=new WeakMap,bi=new WeakMap,xi=new WeakMap,Si=new WeakMap,Ci=new WeakMap,wi=new WeakMap,Y=new WeakSet,class extends $n{constructor(e,t){super(),be(this,Y),w(this,di,void 0),w(this,J,void 0),w(this,fi,void 0),w(this,pi,void 0),w(this,mi,void 0),w(this,hi,void 0),w(this,gi,void 0),w(this,_i,void 0),w(this,vi,void 0),w(this,yi,void 0),w(this,bi,void 0),w(this,xi,void 0),w(this,Si,void 0),w(this,Ci,void 0),w(this,wi,new Set),this.options=t,D(di,this,e),D(_i,this,null),D(gi,this,Fr()),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(E(J,this).addObserver(this),Ii(E(J,this),this.options)?T(Y,this,Ei).call(this):this.updateResult(),T(Y,this,Ai).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Li(E(J,this),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Li(E(J,this),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,T(Y,this,ji).call(this),T(Y,this,Mi).call(this),E(J,this).removeObserver(this)}setOptions(e){let t=this.options,n=E(J,this);if(this.options=E(di,this).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof dr(this.options.enabled,E(J,this))!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);T(Y,this,Ni).call(this),E(J,this).setOptions(this.options),t._defaulted&&!yr(this.options,t)&&E(di,this).getQueryCache().notify({type:`observerOptionsUpdated`,query:E(J,this),observer:this});let r=this.hasListeners();r&&Ri(E(J,this),n,this.options,t)&&T(Y,this,Ei).call(this),this.updateResult(),r&&(E(J,this)!==n||dr(this.options.enabled,E(J,this))!==dr(t.enabled,E(J,this))||ur(this.options.staleTime,E(J,this))!==ur(t.staleTime,E(J,this)))&&T(Y,this,Di).call(this);let i=T(Y,this,Oi).call(this);r&&(E(J,this)!==n||dr(this.options.enabled,E(J,this))!==dr(t.enabled,E(J,this))||i!==E(Ci,this))&&T(Y,this,ki).call(this,i)}getOptimisticResult(e){let t=E(di,this).getQueryCache().build(E(di,this),e),n=this.createResult(t,e);return Bi(this,n)&&(D(pi,this,n),D(hi,this,this.options),D(mi,this,E(J,this).state)),n}getCurrentResult(){return E(pi,this)}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&E(gi,this).status===`pending`&&E(gi,this).reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){E(wi,this).add(e)}getCurrentQuery(){return E(J,this)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=E(di,this).defaultQueryOptions(e),n=E(di,this).getQueryCache().build(E(di,this),t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return T(Y,this,Ei).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),E(pi,this)))}createResult(e,t){let n=E(J,this),r=this.options,i=E(pi,this),a=E(mi,this),o=E(hi,this),s=e===n?E(fi,this):e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Ii(e,t),o=i&&Ri(e,n,t,r);(a||o)&&(l={...l,...ci(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(E(bi,this)?.state.data,E(bi,this)):t.placeholderData,e!==void 0&&(m=`success`,d=wr(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===E(vi,this))d=E(yi,this);else try{D(vi,this,t.select),d=t.select(d),d=wr(i?.data,d,t),D(yi,this,d),D(_i,this,null)}catch(e){D(_i,this,e)}E(_i,this)&&(f=E(_i,this),d=E(yi,this),p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,x={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:l.dataUpdateCount>0||l.errorUpdateCount>0,isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:zi(e,t),refetch:this.refetch,promise:E(gi,this),isEnabled:dr(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=x.data!==void 0,r=x.status===`error`&&!t,i=e=>{r?e.reject(x.error):t&&e.resolve(x.data)},a=()=>{i(D(gi,this,x.promise=Fr()))},o=E(gi,this);switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||x.data!==o.value)&&a();break;case`rejected`:(!r||x.error!==o.reason)&&a();break}}return x}updateResult(){let e=E(pi,this),t=this.createResult(E(J,this),this.options);D(mi,this,E(J,this).state),D(hi,this,this.options),E(mi,this).data!==void 0&&D(bi,this,E(J,this)),!yr(t,e)&&(D(pi,this,t),T(Y,this,Pi).call(this,{listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!E(wi,this).size)return!0;let r=new Set(n??E(wi,this));return this.options.throwOnError&&r.add(`error`),Object.keys(E(pi,this)).some(t=>{let n=t;return E(pi,this)[n]!==e[n]&&r.has(n)})})()}))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&T(Y,this,Ai).call(this)}});function Ei(e){T(Y,this,Ni).call(this);let t=E(J,this).fetch(this.options,e);return e?.throwOnError||(t=t.catch(or)),t}function Di(){T(Y,this,ji).call(this);let e=ur(this.options.staleTime,E(J,this));if(ar||E(pi,this).isStale||!cr(e))return;let t=lr(E(pi,this).dataUpdatedAt,e)+1;D(xi,this,rr.setTimeout(()=>{E(pi,this).isStale||this.updateResult()},t))}function Oi(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(E(J,this)):this.options.refetchInterval)??!1}function ki(e){T(Y,this,Mi).call(this),D(Ci,this,e),!(ar||dr(this.options.enabled,E(J,this))===!1||!cr(E(Ci,this))||E(Ci,this)===0)&&D(Si,this,rr.setInterval(()=>{(this.options.refetchIntervalInBackground||Pr.isFocused())&&T(Y,this,Ei).call(this)},E(Ci,this)))}function Ai(){T(Y,this,Di).call(this),T(Y,this,ki).call(this,T(Y,this,Oi).call(this))}function ji(){E(xi,this)&&(rr.clearTimeout(E(xi,this)),D(xi,this,void 0))}function Mi(){E(Si,this)&&(rr.clearInterval(E(Si,this)),D(Si,this,void 0))}function Ni(){let e=E(di,this).getQueryCache().build(E(di,this),this.options);if(e===E(J,this))return;let t=E(J,this);D(J,this,e),D(fi,this,e.state),this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}function Pi(e){Vr.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(E(pi,this))}),E(di,this).getQueryCache().notify({query:E(J,this),type:`observerResultsUpdated`})})}function Fi(e,t){return dr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&t.retryOnMount===!1)}function Ii(e,t){return Fi(e,t)||e.state.data!==void 0&&Li(e,t,t.refetchOnMount)}function Li(e,t,n){if(dr(t.enabled,e)!==!1&&ur(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&zi(e,t)}return!1}function Ri(e,t,n,r){return(e!==t||dr(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&zi(e,n)}function zi(e,t){return dr(t.enabled,e)!==!1&&e.isStaleByTime(ur(t.staleTime,e))}function Bi(e,t){return!yr(e.getCurrentResult(),t)}function Vi(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{Ar(e,()=>t.signal,()=>n=!0)},u=Or(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject();if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?Er:Tr;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?Ui:Hi,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:Hi(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function Hi(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Ui(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Wi,Gi,Ki,qi,Ji,Yi=(Wi=new WeakMap,Gi=new WeakMap,Ki=new WeakMap,qi=new WeakMap,Ji=new WeakSet,class extends Zr{constructor(e){super(),be(this,Ji),w(this,Wi,void 0),w(this,Gi,void 0),w(this,Ki,void 0),w(this,qi,void 0),D(Wi,this,e.client),this.mutationId=e.mutationId,D(Ki,this,e.mutationCache),D(Gi,this,[]),this.state=e.state||Zi(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){E(Gi,this).includes(e)||(E(Gi,this).push(e),this.clearGcTimeout(),E(Ki,this).notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){D(Gi,this,E(Gi,this).filter(t=>t!==e)),this.scheduleGc(),E(Ki,this).notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){E(Gi,this).length||(this.state.status===`pending`?this.scheduleGc():E(Ki,this).remove(this))}continue(){return E(qi,this)?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{T(Ji,this,Xi).call(this,{type:`continue`})},n={client:E(Wi,this),meta:this.options.meta,mutationKey:this.options.mutationKey};D(qi,this,Yr({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{T(Ji,this,Xi).call(this,{type:`failed`,failureCount:e,error:t})},onPause:()=>{T(Ji,this,Xi).call(this,{type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>E(Ki,this).canRun(this)}));let r=this.state.status===`pending`,i=!E(qi,this).canStart();try{if(r)t();else{T(Ji,this,Xi).call(this,{type:`pending`,variables:e,isPaused:i}),E(Ki,this).config.onMutate&&await E(Ki,this).config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&T(Ji,this,Xi).call(this,{type:`pending`,context:t,variables:e,isPaused:i})}let a=await E(qi,this).start();return await E(Ki,this).config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await E(Ki,this).config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),T(Ji,this,Xi).call(this,{type:`success`,data:a}),a}catch(t){try{await E(Ki,this).config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await E(Ki,this).config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw T(Ji,this,Xi).call(this,{type:`error`,error:t}),t}finally{E(Ki,this).runNext(this)}}});function Xi(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}})(this.state),Vr.batch(()=>{E(Gi,this).forEach(t=>{t.onMutationUpdate(e)}),E(Ki,this).notify({mutation:this,type:`updated`,action:e})})}function Zi(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Qi,$i,ea,ta=(Qi=new WeakMap,$i=new WeakMap,ea=new WeakMap,class extends $n{constructor(e={}){super(),w(this,Qi,void 0),w(this,$i,void 0),w(this,ea,void 0),this.config=e,D(Qi,this,new Set),D($i,this,new Map),D(ea,this,0)}build(e,t,n){var r;let i=new Yi({client:e,mutationCache:this,mutationId:D(ea,this,(r=E(ea,this),++r)),options:e.defaultMutationOptions(t),state:n});return this.add(i),i}add(e){E(Qi,this).add(e);let t=na(e);if(typeof t==`string`){let n=E($i,this).get(t);n?n.push(e):E($i,this).set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(E(Qi,this).delete(e)){let t=na(e);if(typeof t==`string`){let n=E($i,this).get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&E($i,this).delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=na(e);if(typeof t==`string`){let n=E($i,this).get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=na(e);return typeof t==`string`?(E($i,this).get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){Vr.batch(()=>{E(Qi,this).forEach(e=>{this.notify({type:`removed`,mutation:e})}),E(Qi,this).clear(),E($i,this).clear()})}getAll(){return Array.from(E(Qi,this))}find(e){let t={exact:!0,...e};return this.getAll().find(e=>pr(t,e))}findAll(e={}){return this.getAll().filter(t=>pr(e,t))}notify(e){Vr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return Vr.batch(()=>Promise.all(e.map(e=>e.continue().catch(or))))}});function na(e){return e.options.scope?.id}var ra,ia=(ra=new WeakMap,class extends $n{constructor(e={}){super(),w(this,ra,void 0),this.config=e,D(ra,this,new Map)}build(e,t,n){let r=t.queryKey,i=t.queryHash??mr(r,t),a=this.get(i);return a||(a=new oi({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){E(ra,this).has(e.queryHash)||(E(ra,this).set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=E(ra,this).get(e.queryHash);t&&(e.destroy(),t===e&&E(ra,this).delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){Vr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return E(ra,this).get(e)}getAll(){return[...E(ra,this).values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>fr(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>fr(e,t)):t}notify(e){Vr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Vr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Vr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}}),X,aa,oa,sa,ca,la,ua,da,fa=(X=new WeakMap,aa=new WeakMap,oa=new WeakMap,sa=new WeakMap,ca=new WeakMap,la=new WeakMap,ua=new WeakMap,da=new WeakMap,class{constructor(e={}){w(this,X,void 0),w(this,aa,void 0),w(this,oa,void 0),w(this,sa,void 0),w(this,ca,void 0),w(this,la,void 0),w(this,ua,void 0),w(this,da,void 0),D(X,this,e.queryCache||new ia),D(aa,this,e.mutationCache||new ta),D(oa,this,e.defaultOptions||{}),D(sa,this,new Map),D(ca,this,new Map),D(la,this,0)}mount(){var e;D(la,this,(e=E(la,this),e++,e)),E(la,this)===1&&(D(ua,this,Pr.subscribe(async e=>{e&&(await this.resumePausedMutations(),E(X,this).onFocus())})),D(da,this,Gr.subscribe(async e=>{e&&(await this.resumePausedMutations(),E(X,this).onOnline())})))}unmount(){var e;D(la,this,(e=E(la,this),e--,e)),E(la,this)===0&&(E(ua,this)?.call(this),D(ua,this,void 0),E(da,this)?.call(this),D(da,this,void 0))}isFetching(e){return E(X,this).findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return E(aa,this).findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return E(X,this).get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=E(X,this).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ur(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return E(X,this).findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=E(X,this).get(r.queryHash)?.state.data,a=sr(t,i);if(a!==void 0)return E(X,this).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Vr.batch(()=>E(X,this).findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return E(X,this).get(t.queryHash)?.state}removeQueries(e){let t=E(X,this);Vr.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=E(X,this);return Vr.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=Vr.batch(()=>E(X,this).findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(or).catch(or)}invalidateQueries(e,t={}){return Vr.batch(()=>(E(X,this).findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=Vr.batch(()=>E(X,this).findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(or)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(or)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=E(X,this).build(this,t);return n.isStaleByTime(ur(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(or).catch(or)}fetchInfiniteQuery(e){return e.behavior=Vi(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(or).catch(or)}ensureInfiniteQueryData(e){return e.behavior=Vi(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Gr.isOnline()?E(aa,this).resumePausedMutations():Promise.resolve()}getQueryCache(){return E(X,this)}getMutationCache(){return E(aa,this)}getDefaultOptions(){return E(oa,this)}setDefaultOptions(e){D(oa,this,e)}setQueryDefaults(e,t){E(sa,this).set(hr(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...E(sa,this).values()],n={};return t.forEach(t=>{gr(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){E(ca,this).set(hr(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...E(ca,this).values()],n={};return t.forEach(t=>{gr(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...E(oa,this).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=mr(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===Dr&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...E(oa,this).mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){E(X,this).clear(),E(aa,this).clear()}}),pa=Symbol(`store-raw`),ma=Symbol(`store-node`),ha=Symbol(`store-has`),ga=Symbol(`store-self`);function _a(e){let t=e[et];if(!t&&(Object.defineProperty(e,et,{value:t=new Proxy(e,Ta)}),!Array.isArray(e))){let n=Object.keys(e),r=Object.getOwnPropertyDescriptors(e);for(let i=0,a=n.length;i<a;i++){let a=n[i];r[a].get&&Object.defineProperty(e,a,{enumerable:r[a].enumerable,get:r[a].get.bind(t)})}}return t}function va(e){let t;return typeof e==`object`&&!!e&&(e[et]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function ya(e,t=new Set){let n,r,i,a;if(n=e!=null&&e[pa])return n;if(!va(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let n=0,a=e.length;n<a;n++)i=e[n],(r=ya(i,t))!==i&&(e[n]=r)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);let n=Object.keys(e),o=Object.getOwnPropertyDescriptors(e);for(let s=0,c=n.length;s<c;s++)a=n[s],!o[a].get&&(i=e[a],(r=ya(i,t))!==i&&(e[a]=r))}return e}function ba(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function xa(e,t,n){if(e[t])return e[t];let[r,i]=L(n,{equals:!1,internal:!0});return r.$=i,e[t]=r}function Sa(e,t){let n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===et||t===ma?n:(delete n.value,delete n.writable,n.get=()=>e[et][t],n)}function Ca(e){Ct()&&xa(ba(e,ma),ga)()}function wa(e){return Ca(e),Reflect.ownKeys(e)}var Ta={get(e,t,n){if(t===pa)return e;if(t===et)return n;if(t===nt)return Ca(e),n;let r=ba(e,ma),i=r[t],a=i?i():e[t];if(t===ma||t===ha||t===`__proto__`)return a;if(!i){let n=Object.getOwnPropertyDescriptor(e,t);Ct()&&(typeof a!=`function`||e.hasOwnProperty(t))&&!(n&&n.get)&&(a=xa(r,t,a)())}return va(a)?_a(a):a},has(e,t){return t===pa||t===et||t===nt||t===ma||t===ha||t===`__proto__`?!0:(Ct()&&xa(ba(e,ha),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:wa,getOwnPropertyDescriptor:Sa};function Ea(e,t,n,r=!1){if(!r&&e[t]===n)return;let i=e[t],a=e.length;n===void 0?(delete e[t],e[ha]&&e[ha][t]&&i!==void 0&&e[ha][t].$()):(e[t]=n,e[ha]&&e[ha][t]&&i===void 0&&e[ha][t].$());let o=ba(e,ma),s;if((s=xa(o,t,i))&&s.$(()=>n),Array.isArray(e)&&e.length!==a){for(let t=e.length;t<a;t++)(s=o[t])&&s.$();(s=xa(o,`length`,a))&&s.$(e.length)}(s=o[ga])&&s.$()}function Da(e,t){let n=Object.keys(t);for(let r=0;r<n.length;r+=1){let i=n[r];Ea(e,i,t[i])}}function Oa(e,t){if(typeof t==`function`&&(t=t(e)),t=ya(t),Array.isArray(t)){if(e===t)return;let n=0,r=t.length;for(;n<r;n++){let r=t[n];e[n]!==r&&Ea(e,n,r)}Ea(e,`length`,r)}else Da(e,t)}function ka(e,t,n=[]){let r,i=e;if(t.length>1){r=t.shift();let a=typeof r,o=Array.isArray(e);if(Array.isArray(r)){for(let i=0;i<r.length;i++)ka(e,[r[i]].concat(t),n);return}else if(o&&a===`function`){for(let i=0;i<e.length;i++)r(e[i],i)&&ka(e,[i].concat(t),n);return}else if(o&&a===`object`){let{from:i=0,to:a=e.length-1,by:o=1}=r;for(let r=i;r<=a;r+=o)ka(e,[r].concat(t),n);return}else if(t.length>1){ka(e[r],t,[r].concat(n));return}i=e[r],n=[r].concat(n)}let a=t[0];typeof a==`function`&&(a=a(i,n),a===i)||r===void 0&&a==null||(a=ya(a),r===void 0||va(i)&&va(a)&&!Array.isArray(a)?Da(i,a):Ea(e,r,a))}function Aa(...[e,t]){let n=ya(e||{}),r=Array.isArray(n),i=_a(n);function a(...e){yt(()=>{r&&e.length===1?Oa(n,e[0]):ka(n,e)})}return[i,a]}var ja=Symbol(`store-root`);function Ma(e,t,n,r,i){let a=t[n];if(e===a)return;let o=Array.isArray(e);if(n!==ja&&(!va(e)||!va(a)||o!==Array.isArray(a)||i&&e[i]!==a[i])){Ea(t,n,e);return}if(o){if(e.length&&a.length&&(!r||i&&e[0]&&e[0][i]!=null)){let t,n,o,s,c,l,u,d;for(o=0,s=Math.min(a.length,e.length);o<s&&(a[o]===e[o]||i&&a[o]&&e[o]&&a[o][i]&&a[o][i]===e[o][i]);o++)Ma(e[o],a,o,r,i);let f=Array(e.length),p=new Map;for(s=a.length-1,c=e.length-1;s>=o&&c>=o&&(a[s]===e[c]||i&&a[s]&&e[c]&&a[s][i]&&a[s][i]===e[c][i]);s--,c--)f[c]=a[s];if(o>c||o>s){for(n=o;n<=c;n++)Ea(a,n,e[n]);for(;n<e.length;n++)Ea(a,n,f[n]),Ma(e[n],a,n,r,i);a.length>e.length&&Ea(a,`length`,e.length);return}for(u=Array(c+1),n=c;n>=o;n--)l=e[n],d=i&&l?l[i]:l,t=p.get(d),u[n]=t===void 0?-1:t,p.set(d,n);for(t=o;t<=s;t++)l=a[t],d=i&&l?l[i]:l,n=p.get(d),n!==void 0&&n!==-1&&(f[n]=a[t],n=u[n],p.set(d,n));for(n=o;n<e.length;n++)n in f?(Ea(a,n,f[n]),Ma(e[n],a,n,r,i)):Ea(a,n,e[n])}else for(let t=0,n=e.length;t<n;t++)Ma(e[t],a,t,r,i);a.length>e.length&&Ea(a,`length`,e.length);return}let s=Object.keys(e);for(let t=0,n=s.length;t<n;t++)Ma(e[s[t]],a,s[t],r,i);let c=Object.keys(a);for(let t=0,n=c.length;t<n;t++)e[c[t]]===void 0&&Ea(a,c[t],void 0)}function Na(e,t={}){let{merge:n,key:r=`id`}=t,i=ya(e);return e=>{if(!va(e)||!va(i))return i;let t=Ma(i,{[ja]:e},ja,n,r);return t===void 0?e:t}}var Pa=kt(void 0),Fa=e=>{if(e)return e;let t=At(Pa);if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t()},Ia=e=>(R(t=>(t?.(),e.client.mount(),e.client.unmount.bind(e.client))),St(()=>e.client.unmount()),V(Pa.Provider,{value:()=>e.client,get children(){return e.children}})),La=kt(()=>!1),Ra=()=>At(La);La.Provider;function za(e,t,n,r){if(n===!1)return t;if(typeof n==`function`){let r=n(e.data,t.data);return{...t,data:r}}let i=t.data;if(e.data===void 0)try{i=structuredClone(i)}catch{}let a=Na(i,{key:n})(e.data);return{...t,data:a}}var Ba=(e,t)=>t;function Va(e,t,n){let r=z(()=>Fa(n?.())),i=Ra(),a=z(()=>{let t=r().defaultQueryOptions(e());return t._optimisticResults=i()?`isRestoring`:`optimistic`,t.structuralSharing=!1,t}),o=a(),[s,c]=L(new t(r(),a())),l=s().getOptimisticResult(a()),[u,d]=Aa(l),f=()=>s().subscribe(e=>{l=e,queueMicrotask(()=>{h&&v()})});function p(e){let t=s().options,n=t.reconcile;d(r=>za(r,e,n===void 0?!1:n,t.queryHash))}function m(){return[()=>u,e=>{let t=ya(u);if(typeof e==`function`&&(e=e(t)),e?.hydrationData){let{hydrationData:t,...n}=e;e=n}p(e)}]}let h=null,g=null,[_,{refetch:v}]=vt(()=>{let e=s();return new Promise((t,n)=>{if(g=t,!h&&!i()&&(h=f()),e.updateResult(),l.isError&&!l.isFetching&&!i()&&kr(e.options.throwOnError,[l.error,e.getCurrentQuery()]))return p(l),n(l.error);if(!l.isLoading)return g=null,t(Ba(e.getCurrentQuery(),l));p(l)})},{storage:m,get deferStream(){return e().deferStream},onHydrated(e,t){if(t.value&&`hydrationData`in t.value&&Rr(r(),{queries:[{...t.value.hydrationData}]}),h)return;let n={...o};(o.staleTime||!o.initialData)&&t.value&&(n.refetchOnMount=!1),s().setOptions(n),p(s().getOptimisticResult(n)),h=f()}});return ht(bt(r,e=>{h&&h();let n=new t(e,a());h=f(),c(n)},{defer:!0})),ht(bt(i,e=>{e||v()},{defer:!0})),St(()=>{h&&(h(),h=null),g&&(g(l),g=null)}),ht(bt([s,a],([e,t])=>{e.setOptions(t),p(e.getOptimisticResult(t)),v()},{defer:!0})),new Proxy(u,{get(e,t){return t===`data`?u.data===void 0?_()?.data:_.latest?.data:Reflect.get(e,t)}})}function Ha(e,t){return Va(z(()=>e()),Ti,t)}var Ua=class extends fa{constructor(e={}){super(e)}},Wa={"--tf-bg":`#ffffff`,"--tf-bg-secondary":`#f8f9fb`,"--tf-bg-elevated":`#ffffff`,"--tf-surface":`#ffffff`,"--tf-surface-hover":`#f3f4f8`,"--tf-text":`#0f1419`,"--tf-text-secondary":`#5e6673`,"--tf-text-tertiary":`#9ba3af`,"--tf-text-on-primary":`#ffffff`,"--tf-border":`#e8eaef`,"--tf-border-light":`#f0f1f5`,"--tf-primary":`#6C5CE7`,"--tf-primary-alpha":`rgba(108,92,231,0.12)`,"--tf-primary-light":`rgba(108,92,231,0.1)`,"--tf-primary-glow":`rgba(108,92,231,0.15)`,"--tf-success":`#00C48C`,"--tf-success-bg":`rgba(0,196,140,0.08)`,"--tf-error":`#FF4757`,"--tf-error-bg":`rgba(255,71,87,0.08)`,"--tf-error-alpha":`rgba(255,71,87,0.06)`,"--tf-warning":`#FFAA00`,"--tf-warning-bg":`rgba(255,170,0,0.08)`,"--tf-shadow":`0 2px 16px rgba(0,0,0,0.06), 0 0 1px rgba(0,0,0,0.1)`,"--tf-shadow-lg":`0 8px 40px rgba(0,0,0,0.08), 0 0 1px rgba(0,0,0,0.1)`,"--tf-input-bg":`#f5f6f8`,"--tf-glass":`rgba(255,255,255,0.7)`,"--tf-skeleton":`#e8eaef`,"--tf-radius-xs":`6px`,"--tf-radius-sm":`8px`,"--tf-radius":`12px`,"--tf-radius-lg":`16px`,"--tf-radius-xl":`20px`,"--tf-button-radius":`var(--tf-radius-lg)`,"--tf-widget-max-width":`400px`,"--tf-accent":`var(--tf-primary)`,"--tf-accent-light":`var(--tf-primary-light)`,"--tf-accent-glow":`var(--tf-primary-glow)`},Ga={"--tf-bg":`#0d0f14`,"--tf-bg-secondary":`#141720`,"--tf-bg-elevated":`#1e2230`,"--tf-surface":`#181b25`,"--tf-surface-hover":`#1e2230`,"--tf-text":`#eef0f6`,"--tf-text-secondary":`#8b93a5`,"--tf-text-tertiary":`#555d6e`,"--tf-text-on-primary":`#ffffff`,"--tf-border":`#252a38`,"--tf-border-light":`#1e2230`,"--tf-primary":`#8B7CF6`,"--tf-primary-alpha":`rgba(139,124,246,0.15)`,"--tf-primary-light":`rgba(139,124,246,0.1)`,"--tf-primary-glow":`rgba(139,124,246,0.2)`,"--tf-success":`#34D399`,"--tf-success-bg":`rgba(52,211,153,0.1)`,"--tf-error":`#F87171`,"--tf-error-bg":`rgba(248,113,113,0.1)`,"--tf-error-alpha":`rgba(248,113,113,0.06)`,"--tf-warning":`#FBBF24`,"--tf-warning-bg":`rgba(251,191,36,0.1)`,"--tf-shadow":`0 2px 16px rgba(0,0,0,0.3), 0 0 1px rgba(0,0,0,0.5)`,"--tf-shadow-lg":`0 8px 40px rgba(0,0,0,0.4), 0 0 1px rgba(0,0,0,0.5)`,"--tf-input-bg":`#141720`,"--tf-glass":`rgba(13,15,20,0.7)`,"--tf-skeleton":`#252a38`,"--tf-radius-xs":`6px`,"--tf-radius-sm":`8px`,"--tf-radius":`12px`,"--tf-radius-lg":`16px`,"--tf-radius-xl":`20px`,"--tf-button-radius":`var(--tf-radius-lg)`,"--tf-widget-max-width":`400px`,"--tf-accent":`var(--tf-primary)`,"--tf-accent-light":`var(--tf-primary-light)`,"--tf-accent-glow":`var(--tf-primary-glow)`};function Ka(e){return Object.entries(e).map(([e,t])=>`${e}: ${t};`).join(`
2
+ `)}function qa(e){if(typeof window>`u`||!window.matchMedia)return()=>{};let t=window.matchMedia(`(prefers-color-scheme: dark)`),n=()=>e(t.matches?Ga:Wa);return t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)}function Ja(e,t){for(let[n,r]of Object.entries(t))r!==void 0&&/^--tf-[a-z]/.test(n)&&(/[\n\r\0]/.test(r)||e.style.setProperty(n,r))}var Ya=new Ua({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1}}});function Xa(e){if(typeof e==`string`){let t=document.querySelector(e);if(!t)throw new j(A.ELEMENT_NOT_FOUND,`Element not found: ${e}`);return t}return e}function Za(e,t){var n,r,i,a,o,s,c,l;return n=new WeakMap,r=new WeakMap,i=new WeakMap,a=new WeakMap,o=new WeakMap,s=new WeakMap,c=new WeakMap,l=new WeakSet,class{constructor(e){be(this,l),w(this,n,null),w(this,r,null),w(this,i,void 0),w(this,a,null),w(this,o,void 0),w(this,s,void 0),w(this,c,void 0),D(i,this,Xa(e.container)),D(o,this,e.config),D(s,this,e.walletAdapter),D(c,this,e.callbacks)}initialize(){E(n,this)&&this.destroy();let t=document.createElement(`div`);E(i,this).appendChild(t);let r=t.attachShadow({mode:`open`});D(a,this,r);let f=document.createElement(`style`),p=E(o,this).theme??`light`;T(l,this,u).call(this,f,p),r.appendChild(f),T(l,this,d).call(this,f);let m=document.createElement(`div`);r.appendChild(m),E(o,this).customColors&&Ja(t,E(o,this).customColors);let h=E(o,this),g=E(s,this),_=E(c,this);D(n,this,Dn(()=>V(Ia,{client:Ya,get children(){return e(h,g,_)}}),m))}destroy(){E(r,this)&&(E(r,this).call(this),D(r,this,null)),E(n,this)&&(E(n,this).call(this),D(n,this,null)),D(a,this,null),E(i,this).innerHTML=``}setTheme(e){D(o,this,{...E(o,this),theme:e});let t=E(a,this);if(t){let n=t.querySelector(`style`);n&&(T(l,this,u).call(this,n,e),T(l,this,d).call(this,n))}}setCustomColors(e){let t=E(a,this)?.host;t&&Ja(t,e)}};function u(e,n){e.textContent=`:host { ${Ka((n===`auto`?typeof window<`u`&&window.matchMedia?.(`(prefers-color-scheme: dark)`).matches===!0:n===`dark`)?Ga:Wa)} }\n${t()}`}function d(e){E(r,this)&&(E(r,this).call(this),D(r,this,null)),E(o,this).theme===`auto`&&D(r,this,qa(n=>{e.textContent=`:host { ${Ka(n)} }\n${t()}`}))}}var Qa={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},$a=U(`<svg>`),eo=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},to=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),no=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),ro=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),io=e=>{let t=no(e);return t.charAt(0).toUpperCase()+t.slice(1)},ao=e=>{let[t,n]=un(e,[`color`,`size`,`strokeWidth`,`children`,`class`,`name`,`iconNode`,`absoluteStrokeWidth`]);return(()=>{var e=$a();return Pn(e,ln(Qa,{get width(){return t.size??Qa.width},get height(){return t.size??Qa.height},get stroke(){return t.color??Qa.stroke},get"stroke-width"(){return wn(()=>!!t.absoluteStrokeWidth)()?Number(t.strokeWidth??Qa[`stroke-width`])*24/Number(t.size):Number(t.strokeWidth??Qa[`stroke-width`])},get class(){return to(`lucide`,`lucide-icon`,...t.name==null?[]:[`lucide-${ro(io(t.name))}`,`lucide-${ro(t.name)}`],t.class==null?``:t.class)},get"aria-hidden"(){return!t.children&&!eo(n)?`true`:void 0}},n),!0,!0),q(e,V(fn,{get each(){return t.iconNode},children:([e,t])=>V(Qn,ln({component:e},t))})),e})()},oo=[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]],so=e=>V(ao,ln(e,{iconNode:oo,name:`arrow-down`})),co=[[`path`,{d:`m21 16-4 4-4-4`,key:`f6ql7i`}],[`path`,{d:`M17 20V4`,key:`1ejh1v`}],[`path`,{d:`m3 8 4-4 4 4`,key:`11wl7u`}],[`path`,{d:`M7 4v16`,key:`1glfcx`}]],lo=e=>V(ao,ln(e,{iconNode:co,name:`arrow-up-down`})),uo=[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]],fo=e=>V(ao,ln(e,{iconNode:uo,name:`chevron-down`})),po=[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]],mo=e=>V(ao,ln(e,{iconNode:po,name:`arrow-left`})),ho=[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]],go=e=>V(ao,ln(e,{iconNode:ho,name:`arrow-right`})),_o=[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]],vo=e=>V(ao,ln(e,{iconNode:_o,name:`chevron-right`})),yo=[[`rect`,{width:`20`,height:`14`,x:`2`,y:`5`,rx:`2`,key:`ynyp8z`}],[`line`,{x1:`2`,x2:`22`,y1:`10`,y2:`10`,key:`1b3vmo`}]],bo=e=>V(ao,ln(e,{iconNode:yo,name:`credit-card`})),xo=[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]],So=e=>V(ao,ln(e,{iconNode:xo,name:`check`})),Co=[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]],wo=e=>V(ao,ln(e,{iconNode:Co,name:`x`})),To=[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]],Eo=e=>V(ao,ln(e,{iconNode:To,name:`external-link`})),Do=[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]],Oo=e=>V(ao,ln(e,{iconNode:Do,name:`search`})),ko=[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]],Ao=e=>V(ao,ln(e,{iconNode:ko,name:`pencil`})),jo=[[`path`,{d:`M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1`,key:`18etb6`}],[`path`,{d:`M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4`,key:`xoc0q4`}]],Mo=e=>V(ao,ln(e,{iconNode:jo,name:`wallet`})),No=[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],Po=e=>V(ao,ln(e,{iconNode:No,name:`triangle-alert`})),Fo={tokenIcon:`tf-c63ac0`,tokenIconImg:`tf-59aca7`,chainDot:`tf-dbfbb3`,chainDotImg:`tf-f89395`,footer:`tf-cdfe94`,footerText:`tf-7c0c36`,footerIcon:`tf-26d5ea`,footerBrand:`tf-8b1e15`,footerBrandAccent:`tf-3852e5`,footerArrow:`tf-b35860`},Io=U(`<svg viewBox="0 0 100 100"fill=none xmlns=http://www.w3.org/2000/svg aria-label=TokenFlight role=img style=border-radius:18%;flex-shrink:0><defs><linearGradient id=tf-logo-bg x1=0 y1=0 x2=0 y2=1><stop offset=0% stop-color=#6672FF></stop><stop offset=100% stop-color=#9CA2FF></stop></linearGradient></defs><rect width=100 height=100 rx=18 ry=18 fill=url(#tf-logo-bg)></rect><path d="M74.15 24.2L71.2 24.35 66.7 26.5 55.3 37.25 50.05 36.35 51.45 34 49.2 31.65 48.3 31.85 44.7 35.4 27.45 32.45 25.75 32.85 23.75 34.4 41.6 43.2 45.55 46.9 34.85 59.2 25 57.95 22.65 59.6 31.15 64.7 30.1 68.75 33.95 67.35 39.1 76.05 40.8 73.7 39.45 63.7 51.65 52.95 55.4 56.8 64.45 74.45 66.3 70.9 63.4 53.9 67.15 49.4 65.05 47.15 62.45 48.6 61.55 43.2 72.4 31.6 74.55 26.75Z"fill=white>`),Lo=U(`<svg viewBox="0 0 100 100"fill=none xmlns=http://www.w3.org/2000/svg style=border-radius:18%;flex-shrink:0><defs><linearGradient id=tf-sm-logo-bg x1=0 y1=0 x2=0 y2=1><stop offset=0% stop-color=#6672FF></stop><stop offset=100% stop-color=#9CA2FF></stop></linearGradient></defs><rect width=100 height=100 rx=18 ry=18 fill=url(#tf-sm-logo-bg)></rect><path d="M74.15 24.2L71.2 24.35 66.7 26.5 55.3 37.25 50.05 36.35 51.45 34 49.2 31.65 48.3 31.85 44.7 35.4 27.45 32.45 25.75 32.85 23.75 34.4 41.6 43.2 45.55 46.9 34.85 59.2 25 57.95 22.65 59.6 31.15 64.7 30.1 68.75 33.95 67.35 39.1 76.05 40.8 73.7 39.45 63.7 51.65 52.95 55.4 56.8 64.45 74.45 66.3 70.9 63.4 53.9 67.15 49.4 65.05 47.15 62.45 48.6 61.55 43.2 72.4 31.6 74.55 26.75Z"fill=white>`),Ro=U(`<div>`),zo=U(`<img>`),Bo=U(`<img alt>`),Vo=U(`<a href=https://tokenflight.ai target=_blank rel="noopener noreferrer"part=fee-info data-testid=footer><span>Powered by</span><span>Token<span>Flight`);function Ho(e,t){if(e)return`${e.replace(/\/$/,``)}/v1/chain/${t}/icon`}function Uo(e){let t=()=>e.size??28;return(()=>{var e=Io();return R(n=>{var r=t(),i=t();return r!==n.e&&W(e,`width`,n.e=r),i!==n.t&&W(e,`height`,n.t=i),n},{e:void 0,t:void 0}),e})()}function Wo(e){let t=()=>e.size??16;return(()=>{var e=Lo();return R(n=>{var r=t(),i=t();return r!==n.e&&W(e,`width`,n.e=r),i!==n.t&&W(e,`height`,n.t=i),n},{e:void 0,t:void 0}),e})()}var Go={USDC:`$`,ETH:`Ξ`,USDT:`₮`,WBTC:`₿`,DAI:`◈`,ARB:`A`,SOL:`◎`};function Ko(e){let t=()=>e.size??36,n=()=>Go[e.symbol]??e.symbol[0]??`?`,[r,i]=L(!1),a=()=>!!e.logoURI&&!r();return(()=>{var r=Ro();return q(r,(()=>{var r=wn(()=>!!a());return()=>r()?(()=>{var n=zo();return K(n,`error`,()=>i(!0)),R(r=>{var i=e.logoURI,a=e.symbol,o=t(),s=t(),c=Fo.tokenIconImg;return i!==r.e&&W(n,`src`,r.e=i),a!==r.t&&W(n,`alt`,r.t=a),o!==r.a&&W(n,`width`,r.a=o),s!==r.o&&W(n,`height`,r.o=s),c!==r.i&&G(n,r.i=c),r},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),n})():n()})()),R(n=>{var i=Fo.tokenIcon,o={width:`${t()}px`,height:`${t()}px`,...a()?{}:{background:`linear-gradient(135deg, ${e.color}, ${e.color}cc)`,"font-size":`${t()*.42}px`,"box-shadow":`0 2px 8px ${e.color}33`}};return i!==n.e&&G(r,n.e=i),n.t=Mn(r,o,n.t),n},{e:void 0,t:void 0}),r})()}function qo(e){let t=()=>e.size??8,[n,r]=L(!1),i=()=>!!e.iconUrl&&!n();return(()=>{var n=Ro();return q(n,(()=>{var n=wn(()=>!!i());return()=>n()&&(()=>{var n=Bo();return K(n,`error`,()=>r(!0)),R(r=>{var i=e.iconUrl,a=t(),o=t(),s=Fo.chainDotImg;return i!==r.e&&W(n,`src`,r.e=i),a!==r.t&&W(n,`width`,r.t=a),o!==r.a&&W(n,`height`,r.a=o),s!==r.o&&G(n,r.o=s),r},{e:void 0,t:void 0,a:void 0,o:void 0}),n})()})()),R(r=>{var a=Fo.chainDot,o={width:`${t()}px`,height:`${t()}px`,...i()?{}:{background:e.color?e.color:`conic-gradient(#627EEA 0deg 90deg, #0052FF 90deg 180deg, #28A0F0 180deg 270deg, #9945FF 270deg 360deg)`}};return a!==r.e&&G(n,r.e=a),r.t=Mn(n,o,r.t),r},{e:void 0,t:void 0}),n})()}function Jo(){return(()=>{var e=Vo(),t=e.firstChild,n=t.nextSibling,r=n.firstChild.nextSibling;return q(e,V(Wo,{size:14}),n),q(e,V(Eo,{size:12,get class(){return Fo.footerArrow}}),null),R(i=>{var a=Fo.footer,o=Fo.footerText,s=Fo.footerBrand,c=Fo.footerBrandAccent;return a!==i.e&&G(e,i.e=a),o!==i.t&&G(t,i.t=o),s!==i.a&&G(n,i.a=s),c!==i.o&&G(r,i.o=c),i},{e:void 0,t:void 0,a:void 0,o:void 0}),e})()}var Yo=/^[a-zA-Z]{2,3}(-[a-zA-Z0-9]{1,8})*$/;function Xo(e,t){if(typeof e!=`string`||e.trim()===``)throw Error(`[fluenti] ${t}: locale must be a non-empty string, got ${JSON.stringify(e)}`);if(!Yo.test(e))throw Error(`[fluenti] ${t}: locale must be a valid BCP 47 tag (e.g. "en", "en-US"), got ${JSON.stringify(e)}`)}var Zo=class{constructor(){r(this,`_catalogs`,Object.create(null))}get(e,t){let n=this._catalogs[e];if(n)return Object.hasOwn(n,t)?n[t]:void 0}set(e,t){let n=this._catalogs[e];n?this._catalogs[e]={...n,...t}:this._catalogs[e]={...t}}has(e,t){let n=this._catalogs[e];return n?Object.hasOwn(n,t):!1}getLocales(){return Object.keys(this._catalogs)}};function Qo(e,t){return t===void 0?e:JSON.stringify([e,t])}function $o(e,t){let n=Qo(e,t),r=2166136261;for(let e=0;e<n.length;e++)r^=n.charCodeAt(e),r=Math.imul(r,16777619);return(r>>>0).toString(36)}function es(e,t){return $o(e,t)}function ts(e){return typeof e.id==`string`&&e.id.length>0?e.id:typeof e.message==`string`?es(e.message,e.context):e.id??``}function ns(e,t){let n=e[0];for(let r=0;r<t.length;r++)n+=`{arg${r}}`+e[r+1];return n}function rs(e){return(e.id===void 0||e.id===``)&&e.message!==void 0?{...e,id:es(e.message,e.context)}:e}function is(e,...t){let n=ns(e,t);return{id:es(n),message:n}}is.descriptor=rs;var as={short:{year:`numeric`,month:`numeric`,day:`numeric`},long:{year:`numeric`,month:`long`,day:`numeric`,weekday:`long`},time:{hour:`numeric`,minute:`numeric`},datetime:{year:`numeric`,month:`short`,day:`numeric`,hour:`numeric`,minute:`numeric`}},os={en:`USD`,"en-US":`USD`,"en-GB":`GBP`,"en-AU":`AUD`,"en-CA":`CAD`,ja:`JPY`,"ja-JP":`JPY`,"zh-CN":`CNY`,"zh-TW":`TWD`,de:`EUR`,"de-DE":`EUR`,fr:`EUR`,"fr-FR":`EUR`,es:`EUR`,"es-ES":`EUR`,ko:`KRW`,"ko-KR":`KRW`,ar:`SAR`,"ar-SA":`SAR`},ss={currency:e=>({style:`currency`,currency:os[e]??os[e.split(`-`)[0]]??`USD`}),percent:{style:`percent`},decimal:{minimumFractionDigits:2,maximumFractionDigits:2}};function cs(e,t,n,r){return t?e.replace(/\{(\w+)\}/g,(e,n)=>{let r=t[n];return r==null?e:String(r)}):e}function ls(e){Xo(e.locale,`createFluentiCore`);let t=e.locale,n=new Zo,r=e.interpolate??cs,i=e.diagnostics&&`missingKey`in e.diagnostics?e.diagnostics:void 0;for(let[t,r]of Object.entries(e.messages))n.set(t,r);function a(n,r){return e.transform?e.transform(n,r,t):n}function o(t,n,i,o){return typeof t==`function`?a(t(n),o):t.includes(`{`)?a(r(t,n,i,e.formatters),o):a(t,o)}function s(r,a){let s=n.get(t,r);if(s!==void 0)return o(s,a,t,r);if(e.fallbackLocale){let s=n.get(e.fallbackLocale,r);if(s!==void 0)return i?.fallbackUsed(t,e.fallbackLocale,r),o(s,a,e.fallbackLocale,r)}let c=e.fallbackChain?.[t]??e.fallbackChain?.[`*`];if(c)for(let e of c){let s=n.get(e,r);if(s!==void 0)return i?.fallbackUsed(t,e,r),o(s,a,e,r)}}function c(n){if(e.missing)try{let r=e.missing(t,n);if(r!==void 0)return a(r,n)}catch{}}let l=e.devWarnings||typeof process<`u`&&process.env?.FLUENTI_DEBUG===`true`;function u(n,o){let u=s(n,o);if(u!==void 0)return u;let d=c(n);return d===void 0?n.includes(`{`)?a(r(n,o,t,e.formatters),n):(i?.missingKey(t,n),l?`[!] ${n}`:n):d}return{get locale(){return t},set locale(n){Xo(n,`locale setter`);let r=t;t=n,r!==n&&e.onLocaleChange?.(n,r)},t(n,...i){if(Array.isArray(n)&&`raw`in n){let e=ns(n,i),t=Object.fromEntries(i.map((e,t)=>[`arg${t}`,e])),r=s(es(e),t);return r===void 0?u(e,t):r}let o=n,l=i[0];if(typeof o==`object`){let n=o,i=ts(n);if(i){let e=s(i,l);if(e!==void 0)return e;let t=c(i);if(t!==void 0)return t}if(n.message!==void 0){let o=i||n.message;return a(r(n.message,l,t,e.formatters),o)}return i}return u(o,l)},setLocale(n){Xo(n,`setLocale`);let r=t;t=n,r!==n&&e.onLocaleChange?.(n,r)},loadMessages(e,t){n.set(e,t)},getLocales(){return n.getLocales()},d(n,r){let i=typeof n==`number`?new Date(n):n;if(r===`relative`&&!e.dateFormats?.relative){let e=i.getTime()-Date.now(),n=Math.abs(e),r=e<0?-1:1,a=`second`,o=Math.round(n/1e3);n>=864e5?(a=`day`,o=Math.round(n/864e5)):n>=36e5?(a=`hour`,o=Math.round(n/36e5)):n>=6e4&&(a=`minute`,o=Math.round(n/6e4));try{return new Intl.RelativeTimeFormat(t,{numeric:`auto`}).format(r*o,a)}catch{return`Invalid Date`}}let a=r?e.dateFormats?.[r]??as[r]:void 0,o=typeof a==`string`?void 0:a;try{return new Intl.DateTimeFormat(t,o).format(i)}catch{return`Invalid Date`}},n(n,r){let i=r?e.numberFormats?.[r]??ss[r]:void 0,a=typeof i==`function`?i(t):i;return new Intl.NumberFormat(t,a).format(n)},format(n,i){return r(n,i,t,e.formatters)},...i?{diagnostics:i}:{}}}var us=Symbol.for(`fluenti.runtime.solid.v1`);function ds(){let e=globalThis[us];return typeof e==`object`&&e?e:null}function fs(e){return typeof e==`object`&&e&&`default`in e?e.default:e}var ps={en:`USD`,"en-US":`USD`,"en-GB":`GBP`,"en-AU":`AUD`,"en-CA":`CAD`,"zh-CN":`CNY`,"zh-TW":`TWD`,"zh-HK":`HKD`,ja:`JPY`,"ja-JP":`JPY`,ko:`KRW`,"ko-KR":`KRW`,de:`EUR`,"de-DE":`EUR`,"de-AT":`EUR`,fr:`EUR`,"fr-FR":`EUR`,"fr-CA":`CAD`,es:`EUR`,"es-ES":`EUR`,"es-MX":`MXN`,pt:`EUR`,"pt-BR":`BRL`,"pt-PT":`EUR`,it:`EUR`,ru:`RUB`,ar:`SAR`,hi:`INR`},ms={short:{year:`numeric`,month:`numeric`,day:`numeric`},long:{year:`numeric`,month:`long`,day:`numeric`,weekday:`long`},time:{hour:`numeric`,minute:`numeric`},datetime:{year:`numeric`,month:`short`,day:`numeric`,hour:`numeric`,minute:`numeric`}},hs={currency:e=>({style:`currency`,currency:ps[e]??ps[e.split(`-`)[0]]??`USD`}),percent:{style:`percent`},decimal:{minimumFractionDigits:2,maximumFractionDigits:2}};function gs(e){let[t,n]=L(e.locale),[r,i]=L(!1),a=new Set([e.locale]),[o,s]=L(new Set(a)),c={...e.messages},l=e,u=l.lazyLocaleLoading??e.splitting??!1,d={locale:e.locale,messages:e.messages??{},dateFormats:{...ms,...l.dateFormats},numberFormats:{...hs,...l.numberFormats}};e.fallbackLocale!==void 0&&(d.fallbackLocale=e.fallbackLocale),l.fallbackChain!==void 0&&(d.fallbackChain=l.fallbackChain),e.missing!==void 0&&(d.missing=e.missing),l.diagnostics!==void 0&&(d.diagnostics=l.diagnostics),l.interpolate!==void 0&&(d.interpolate=l.interpolate),d.devWarnings=d.devWarnings??(typeof process<`u`&&process.env.NODE_ENV===`development`);let f=ls(d);function p(e,...n){let r=t();return f.locale!==r&&(f.locale=r),Array.isArray(e)&&`raw`in e?f.t(e,...n):f.t(e,n[0])}let m=(e,t)=>{f.loadMessages(e,t),c[e]={...c[e],...t},a.add(e),s(new Set(a))},h=0,g=async e=>{if(!u||!l.chunkLoader){n(e);return}let t=ds();if(a.has(e)){try{t?.__switchLocale&&await t.__switchLocale(e)}catch{}n(e);return}let r=++h;i(!0);try{let i=fs(await l.chunkLoader(e));if(f.loadMessages(e,i),c[e]={...c[e],...i},a.add(e),s(new Set(a)),r!==h)return;try{t?.__switchLocale&&await t.__switchLocale(e)}catch{}if(r!==h)return;n(e)}finally{r===h&&i(!1)}},_=new Set;return{locale:t,setLocale:g,t:p,loadMessages:m,getLocales:()=>f.getLocales(),d:(e,n)=>{let r=t();return f.locale!==r&&(f.locale=r),f.d(e,n)},n:(e,n)=>{let r=t();return f.locale!==r&&(f.locale=r),f.n(e,n)},format:(e,n)=>{let r=t();return f.locale!==r&&(f.locale=r),f.format(e,n)},isLoading:r,loadedLocales:o,preloadLocale:e=>{if(!u||a.has(e)||!l.chunkLoader||_.has(e))return;_.add(e);let t=ds();l.chunkLoader(e).then(async n=>{let r=fs(n);f.loadMessages(e,r),c[e]={...c[e],...r},a.add(e),s(new Set(a)),t?.__preloadLocale&&await t.__preloadLocale(e)}).catch(e=>{}).finally(()=>{_.delete(e)})},te:(e,n)=>{let r=c[n??t()];return r!==void 0&&e in r},tm:(e,n)=>{let r=c[n??t()];return r?r[e]:void 0}}}var _s=kt(),vs=e=>{let t=gs(e);return V(_s.Provider,{value:t,get children(){return e.children}})};function ys(){let e=At(_s);if(e)return e;throw Error(`useI18n() must be used inside an <I18nProvider>.`)}var bs={amount:`tf-59b76a`,muted:`tf-a859d8`},xs=U(`<input type=number inputmode=decimal part=input>`);function Ss(e){let{t}=ys(),n=null,[r,i]=L(e.value);gt(()=>{i(e.value)});let a=t=>{let r=t.target.value;r=r.replace(/[^0-9.]/g,``);let a=r.indexOf(`.`);a!==-1&&(r=r.slice(0,a+1)+r.slice(a+1).replace(/\./g,``)),i(r),n&&clearTimeout(n),n=setTimeout(()=>{e.onChange(r)},500)};return St(()=>{n&&clearTimeout(n)}),(()=>{var n=xs();return K(n,`input`,a),R(r=>{var i=bs.amount,a=e.disabled,o=e.placeholder??t({id:`epw9f3`,message:`0`});return i!==r.e&&G(n,r.e=i),a!==r.t&&(n.disabled=r.t=a),o!==r.a&&W(n,`placeholder`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),R(()=>n.value=r()),n})()}function Cs(e,t){if(!e||t<0)return`0`;let n;try{n=(e.startsWith(`0x`),BigInt(e).toString())}catch{return`0`}let r=n.startsWith(`-`),i=r?n.slice(1):n;if(t===0)return r?`-${i}`:i;let a=i.padStart(t+1,`0`),o=a.slice(0,a.length-t),s=a.slice(a.length-t).replace(/0+$/,``),c=s?`${o}.${s}`:o;return r?`-${c}`:c}function ws(e,t){if(!e||!/^-?\d+(?:\.\d*)?$/.test(e))return`0`;let n=e.startsWith(`-`),r=(n?e.slice(1):e).split(`.`),i=((r[0]??`0`)+(r[1]??``).slice(0,t).padEnd(t,`0`)).replace(/^0+/,``)||`0`;return n?`-${i}`:i}function Ts(e,t,n,r){if(!e||!n||e===`0`||t<0||r<0)return`0`;let i,a;try{i=BigInt(e),a=BigInt(n)}catch{return`0`}if(i===0n)return`0`;let o=10n**BigInt(8),s=(a*10n**BigInt(t)*o/(i*10n**BigInt(r))).toString().padStart(9,`0`),c=s.slice(0,s.length-8),l=s.slice(s.length-8).replace(/0+$/,``);return l?`${c}.${l}`:c}function Es(e){let t=e.split(`.`),n=t[0]??`0`,r=n.startsWith(`-`),i=(r?n.slice(1):n).replace(/\B(?=(\d{3})+(?!\d))/g,`,`),a=r?`-${i}`:i;return t[1]===void 0?a:`${a}.${t[1]}`}function Ds(e,t=6){if(!e||e===`0`)return`0`;let n=e.split(`.`),r=n[0]??`0`;if(!n[1])return e;let i=n[1];if(r!==`0`&&r!==`-0`){let e=i.slice(0,t).replace(/0+$/,``);return e?`${r}.${e}`:r}let a=i.search(/[1-9]/);if(a===-1)return`0`;let o=a+t,s=i.slice(0,o).replace(/0+$/,``);return s?`${r}.${s}`:`0`}var Os={1:{symbol:`ETH`,decimals:18},10:{symbol:`ETH`,decimals:18},8453:{symbol:`ETH`,decimals:18},42161:{symbol:`ETH`,decimals:18},324:{symbol:`ETH`,decimals:18},59144:{symbol:`ETH`,decimals:18},11155111:{symbol:`ETH`,decimals:18},11155420:{symbol:`ETH`,decimals:18},1313161554:{symbol:`ETH`,decimals:18},56:{symbol:`BNB`,decimals:18},137:{symbol:`POL`,decimals:18},43114:{symbol:`AVAX`,decimals:18},20011e6:{symbol:`SOL`,decimals:9}};function ks(e){return Os[e]??{symbol:`ETH`,decimals:18}}function As(e){let t=Number(e);return Number.isFinite(t)?t===0?`0`:t>=1?Ds(e,4):t>=.01?Ds(e,6):Ds(e,8):e}function js(e,t){let{symbol:n,decimals:r}=ks(t),i=(e??``).trim();if(!i)return{amount:`0`,symbol:n};try{return i.includes(`.`)?{amount:As(i),symbol:n}:{amount:As(Cs(i,r)),symbol:n}}catch{return{amount:i,symbol:n}}}var Ms={significantNumber:`tf-ba406b`,zeroCount:`tf-9d81a4`,tooltip:`tf-7977ef`,"tf-value-update":`tf-6887ec`},Ns=U(`<span><span></span><span aria-hidden=true></span><span>`),Ps=U(`<span>`);function Fs(e){if(e==null)return null;if(typeof e==`bigint`)return e.toString();let t=String(e).trim();if(!t)return null;let n=Number(t);return Number.isFinite(n)?t:null}function Is(e){return e.includes(`.`)?e.replace(/(\.\d*?[1-9])0+$/,`$1`).replace(/\.0+$/,``).replace(/\.$/,``):e}function Ls(e,t,n){if(!Number.isFinite(e))return null;if(n!==void 0)return e.toFixed(n);if(e===0)return`0`;let r=Math.abs(e)<1?e.toPrecision(t):e.toLocaleString(`en-US`,{useGrouping:!0,maximumSignificantDigits:t});if(!/[eE]/.test(r))return r;let[i,a]=r.toLowerCase().split(`e`);if(!i||a===void 0)return r;let o=Number(a);if(!Number.isFinite(o))return r;let s=i.startsWith(`-`)?`-`:``,[c,l=``]=(s?i.slice(1):i).split(`.`),u=`${c??``}${l}`,d=(c?.length??0)+o;return d<=0?`${s}0.${`0`.repeat(Math.abs(d))}${u}`:d>=u.length?`${s}${u}${`0`.repeat(d-u.length)}`:`${s}${u.slice(0,d)}.${u.slice(d)}`}function Rs(e,t,n){let r=Fs(e);if(!r)return null;let i=Ls(Number(r),t,n);if(!i)return null;let a=Is(i),o=a.match(/^(-?\d+)\.(0+)(\d*)$/);if(!o)return a;let s=o[1],c=o[2],l=o[3]??``;return!s||!c||c.length<3?a:{prefix:`${s}.${c.charAt(0)}`,zeroCount:c.length,suffix:l}}function zs(e){let t=()=>e.digits??8,n=z(()=>Rs(e.value,t(),e.fixedDecimals)),r=z(()=>{let t=n();if(t===null||typeof t==`string`)return null;let r=Ls(Number(e.value??0),18);return r?Is(r):null});return wn(()=>{let e=n();if(e===null)return null;if(typeof e==`string`)return e;let t=(()=>{var t=Ns(),n=t.firstChild,r=n.nextSibling,i=r.nextSibling;return q(n,()=>e.prefix),q(r,()=>e.zeroCount),q(i,()=>e.suffix),R(e=>{var n=Ms.significantNumber,i=Ms.zeroCount;return n!==e.e&&G(t,e.e=n),i!==e.t&&G(r,e.t=i),e},{e:void 0,t:void 0}),t})(),i=r();return i?(()=>{var e=Ps();return W(e,`title`,i),q(e,t),R(()=>G(e,Ms.tooltip)),e})():t})}var Bs={countdown:`tf-216412`,clickable:`tf-40ee76`,ring:`tf-52dc68`,ringSpinning:`tf-25c5c8`,spin:`tf-27c522`,text:`tf-fd32be`},Vs=U(`<span>s`),Hs=U(`<div><svg width=14 height=14 viewBox="0 0 16 16"><circle cx=8 cy=8 r=6 fill=none stroke=var(--tf-border) stroke-width=2></circle><circle cx=8 cy=8 r=6 fill=none stroke=var(--tf-accent) stroke-width=2 stroke-linecap=round transform="rotate(-90 8 8)">`);function Us(e){let t=2*Math.PI*6,n=()=>t*(1-e.secondsRemaining()/e.totalSeconds),r=()=>e.isRefreshing?.()??!1;return(()=>{var i=Hs(),a=i.firstChild,o=a.firstChild.nextSibling;return K(i,`click`,()=>e.onRefresh?.()),q(i,V(H,{get when(){return!r()},get children(){var t=Vs(),n=t.firstChild;return q(t,()=>e.secondsRemaining(),n),R(()=>G(t,Bs.text)),t}}),a),R(s=>{var c=`${Bs.countdown} ${e.onRefresh?Bs.clickable:``}`,l=`${Bs.ring} ${r()?Bs.ringSpinning:``}`,u=String(t),d=r()?t*.75:n(),f=r()?`none`:`stroke-dashoffset 1s linear`;return c!==s.e&&G(i,s.e=c),l!==s.t&&W(a,`class`,s.t=l),u!==s.a&&W(o,`stroke-dasharray`,s.a=u),d!==s.o&&W(o,`stroke-dashoffset`,s.o=d),f!==s.i&&Nn(o,`transition`,s.i=f),s},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),i})()}var Ws=`tf-1019c2`,Gs=`tf-4922f1`,Ks=`tf-57f45f`,qs=`tf-a57ec8`,Js=`tf-d74ccc`,Ys=`tf-92e7a8`,Xs=`tf-d20f50`,Zs=`tf-a9a96f`,Qs=`tf-0134eb`,$s=`tf-91635c`,ec=`tf-ca1291`,tc=`tf-a249b3`,nc=`tf-adeddd`,rc={quote:Ws,"tf-slide-up":`tf-42889f`,row:Gs,value:Ks,loading:qs,skeletonRow:Js,skeletonLabel:Ys,skeletonLabelShort:Xs,skeletonValue:Zs,skeletonValueShort:Qs,skeletonValueTiny:$s,rowRecipient:ec,rowError:tc,rowRecipientEmpty:nc,"tf-recipient-pulse":`tf-d990e5`},ic=`tf-1ac2ef`,ac=`tf-90e981`,oc=`tf-68a980`,sc=`tf-e7b9c7`,cc=`tf-b4f391`,lc=`tf-118b57`,uc=`tf-07225e`,dc=`tf-d01dff`,fc=`tf-5bb68c`,pc=`tf-04e1e2`,mc=`tf-d01908`,hc=`tf-1cc72b`,gc=`tf-480f1a`,_c=`tf-bc7950`,vc=`tf-d9b7b4`,yc=`tf-9398ea`,bc=`tf-2d9323`,xc=`tf-4567e1`,Sc=`tf-58881e`,Cc=`tf-c7b4d2`,wc=`tf-771a48`,Tc=`tf-e2b7ba`,Ec=`tf-6f7fab`,Dc=`tf-b15cde`,Oc=`tf-52678c`,kc=`tf-25f74d`,Ac=`tf-b385cd`,jc=`tf-dc46f6`,Mc=`tf-58158c`,Nc=`tf-6f8fbb`,Pc=`tf-2a2ad5`,Fc={skeleton:ic,pulse:ac,selectorOverlay:oc,"tf-fade-in":`tf-ed0355`,container:sc,noBg:cc,noBorder:lc,accentLine:uc,ctaWrapper:dc,ctaWrapperReceive:fc,noOffer:pc,"tf-slide-up":`tf-b61e63`,noOfferIcon:mc,noOfferText:hc,explorerLink:gc,explorerLinkReceive:_c,recipientBadge:vc,recipientBadgeEmpty:yc,recipientBadgeText:bc,recipientBadgeLocked:xc,recipientPlaceholder:Sc,flexCenter:Cc,flexCol:wc,flexRow:Tc,flexBetween:Ec,fadeIn:Dc,idleCard:Oc,idleIcon:kc,idleTitle:Ac,idleSub:jc,payMethodTabs:Mc,payMethodTab:Nc,payMethodTabActive:Pc},Ic=U(`<div part=price-preview aria-hidden=true><div><div></div><div></div></div><div><div></div><div>`),Lc=U(`<div><span></span><span>`),Rc=U(`<div><span>`),zc=U(`<div part=price-preview>`);function Bc(){return(()=>{var e=Ic(),t=e.firstChild,n=t.firstChild,r=n.nextSibling,i=t.nextSibling,a=i.firstChild,o=a.nextSibling;return R(s=>{var c=`${rc.quote} ${rc.loading}`,l=rc.skeletonRow,u=`${Fc.skeleton} ${rc.skeletonLabel}`,d=`${Fc.skeleton} ${rc.skeletonValue} ${rc.skeletonValueShort}`,f=rc.skeletonRow,p=`${Fc.skeleton} ${rc.skeletonLabel} ${rc.skeletonLabelShort}`,m=`${Fc.skeleton} ${rc.skeletonValue} ${rc.skeletonValueTiny}`;return c!==s.e&&G(e,s.e=c),l!==s.t&&G(t,s.t=l),u!==s.a&&G(n,s.a=u),d!==s.o&&G(r,s.o=d),f!==s.i&&G(i,s.i=f),p!==s.n&&G(a,s.n=p),m!==s.s&&G(o,s.s=m),s},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),e})()}function Vc(e){let{t}=ys(),n=e=>e>=60?t({id:`knrcsh`,message:`~{value}m`},{value:Math.round(e/60)}):t({id:`ek03j3`,message:`~{value}s`},{value:e}),r=z(()=>js(e.route.quote.estimatedGas,e.fromToken.chainId)),i=[(()=>{var n=Lc(),i=n.firstChild,a=i.nextSibling;return q(i,()=>t({id:`9l4mg3`,message:`Fee`})),q(a,V(H,{get when(){return e.route.quote.estimatedGas},fallback:`-`,get children(){return[`~`,V(zs,{get value(){return r().amount},digits:8}),` `,wn(()=>r().symbol)]}})),R(e=>{var t=rc.row,r=rc.value;return t!==e.e&&G(n,e.e=t),r!==e.t&&G(a,e.t=r),e},{e:void 0,t:void 0}),n})(),(()=>{var r=Lc(),i=r.firstChild,a=i.nextSibling;return q(i,()=>t({id:`f45rwo`,message:`Est. time`})),q(a,()=>n(e.route.quote.expectedDurationSeconds)),R(e=>{var t=rc.row,n=rc.value;return t!==e.e&&G(r,e.e=t),n!==e.t&&G(a,e.t=n),e},{e:void 0,t:void 0}),r})()];return V(H,{get when(){return!e.inline},get fallback(){return[i,V(H,{get when(){return e.showCountdown?.()},get children(){var n=Rc(),r=n.firstChild;return q(r,()=>t({id:`1xnfoqn`,message:`Quote refreshes in`})),q(n,V(Us,{get secondsRemaining(){return e.countdownSeconds},get totalSeconds(){return e.countdownTotal??30}}),null),R(()=>G(n,rc.row)),n}})]},get children(){var n=zc();return q(n,i,null),q(n,V(H,{get when(){return e.showCountdown?.()},get children(){var n=Rc(),r=n.firstChild;return q(r,()=>t({id:`1xnfoqn`,message:`Quote refreshes in`})),q(n,V(Us,{get secondsRemaining(){return e.countdownSeconds},get totalSeconds(){return e.countdownTotal??30}}),null),R(()=>G(n,rc.row)),n}}),null),R(()=>G(n,rc.quote)),n}})}var Hc=`tf-2de115`,Uc=`tf-47dc2a`,Wc=`tf-44b8f1`,Gc=`tf-04fe16`,Kc=`tf-65cf23`,qc=`tf-2f0314`,Jc=`tf-20b1ac`,Yc=`tf-e6dae0`,Xc=`tf-8a3bc2`,Zc=`tf-90e712`,Qc={btnPrimary:Hc,executing:Uc,btnConnect:Wc,btnRecipient:Gc,"tf-recipient-pulse":`tf-d53743`,btnSuccess:Kc,btnError:qc,btnInner:Jc,spinner:Yc,spin:Xc,spinnerSm:Zc},$c=U(`<div part=button-primary data-testid=btn-primary>`),el=U(`<button part=button-primary data-testid=btn-primary>`),tl=U(`<button part=button-secondary data-testid=btn-connect>`),nl=U(`<button part=button-primary data-testid=btn-primary disabled><span><span>`),rl=U(`<button part=button-primary data-testid=btn-recipient>`),il=U(`<button part=button-primary data-testid=btn-primary disabled style=opacity:0.6>`);function al(e){let{t}=ys();return V(mn,{get children(){return[V(hn,{get when(){return e.phase===`success`},get children(){var n=$c();return q(n,V(So,{size:18}),null),q(n,()=>e.label??t({id:`cjn1xs`,message:`Swap Successful`}),null),R(()=>G(n,Qc.btnSuccess)),n}}),V(hn,{get when(){return e.phase===`error`},get children(){var n=el();return K(n,`click`,e.onRetry),q(n,V(wo,{size:16}),null),q(n,()=>e.errorLabel||t({id:`1hb73om`,message:`Transaction failed — Retry`}),null),R(()=>G(n,Qc.btnError)),n}}),V(hn,{get when(){return!e.isConnected},get children(){var n=tl();return K(n,`click`,e.onConnect),q(n,()=>t({id:`u61kge`,message:`Connect Wallet`})),R(()=>G(n,Qc.btnConnect)),n}}),V(hn,{get when(){return e.phase===`submitting`||e.phase===`building`||e.phase===`awaiting-wallet`||e.phase===`tracking`},get children(){var e=nl(),n=e.firstChild,r=n.firstChild;return q(n,()=>t({id:`1ih47b3`,message:`Executing...`}),null),R(t=>{var i=`${Qc.btnPrimary} ${Qc.executing}`,a=Qc.btnInner,o=Qc.spinner;return i!==t.e&&G(e,t.e=i),a!==t.t&&G(n,t.t=a),o!==t.a&&G(r,t.a=o),t},{e:void 0,t:void 0,a:void 0}),e}}),V(hn,{get when(){return e.needsRecipient},get children(){var n=rl();return K(n,`click`,e.onEnterRecipient),q(n,()=>t({id:`wx5bee`,message:`Enter Recipient Address`})),R(()=>G(n,Qc.btnRecipient)),n}}),V(hn,{get when(){return e.insufficientBalance},get children(){var e=il();return q(e,()=>t({id:`fcy4ey`,message:`Insufficient balance`})),R(()=>G(e,Qc.btnPrimary)),e}}),V(hn,{get when(){return e.hasQuote},get children(){var n=el();return K(n,`click`,e.onConfirm),q(n,()=>e.label??t({id:`ibrnk6`,message:`Confirm Swap`})),R(()=>G(n,Qc.btnPrimary)),n}}),V(hn,{get when(){return e.phase===`idle`||e.phase===`quoting`||e.phase===`quoted`},get children(){var e=il();return q(e,()=>t({id:`1x5xdes`,message:`Review Swap`})),R(()=>G(e,Qc.btnPrimary)),e}})]}})}var ol=20011e6;function sl(e){return e===ol}function cl(e){return e!==ol}function ll(e){return sl(e)?`solana`:`evm`}function ul(e,t){return ll(e)!==ll(t)}function dl(e){return sl(e)?`11111111111111111111111111111111`:`0x0000000000000000000000000000000000000000`}function fl(e,t){return t?.get(e)?.name??`Chain ${e}`}function pl(e,t){return t===`evm`?/^0x[0-9a-fA-F]{40}$/.test(e):/^[1-9A-HJ-NP-Za-km-z]{32,44}$/.test(e)}function ml(e,t,n){if(!t)return null;let r=n?.get(e)?.blockExplorers?.default?.url;return r?`${r}/tx/${t}`:null}function hl(e){return e.length<=14?e:`${e.slice(0,6)}...${e.slice(-4)}`}var gl=`tf-5835df`,_l=`tf-9322ae`,vl=`tf-7d5519`,yl=`tf-0b8d30`,bl=`tf-bfbd0b`,xl=`tf-7e8fdf`,Sl=`tf-37f3cf`,Cl=`tf-9401fd`,wl=`tf-832fae`,Tl=`tf-b557fc`,El=`tf-2b42d5`,Dl=`tf-5953e8`,Ol=`tf-a168c7`,kl=`tf-062404`,Al=`tf-26af4c`,jl=`tf-4b9be7`,Ml=`tf-036db2`,Nl=`tf-09b7bb`,Pl=`tf-aef7e0`,Fl=`tf-5c628c`,Il=`tf-a5abdf`,Ll=`tf-9efe7c`,Rl=`tf-d36961`,zl=`tf-5c7806`,Bl=`tf-185719`,Vl=`tf-84527b`,Hl=`tf-417d35`,Ul=`tf-aad7e9`,Wl=`tf-8de1c6`,Gl=`tf-bcb46a`,Kl=`tf-16cfdc`,ql=`tf-0aa291`,Jl=`tf-234e31`,Yl=`tf-adb588`,Xl=`tf-11fa21`,Zl=`tf-4f7573`,Ql=`tf-c918a2`,$l=`tf-ad7aab`,eu=`tf-603d2e`,tu=`tf-1e22cb`,Z={progress:gl,"tf-scale-in":`tf-e061c9`,header:_l,tokenCol:vl,tokenColFrom:yl,tokenColInner:bl,tokenIconWrap:xl,chainBadge:Sl,tokenInfo:Cl,tokenAmount:wl,tokenChain:Tl,fiatBadge:El,arrow:Dl,via:Ol,viaIcon:kl,steps:Al,step:jl,stepIcon:Ml,stepIconCompleted:Nl,"tf-step-complete":`tf-3cfd5b`,stepIconActive:Pl,stepIconPending:Fl,stepIconWarning:Il,stepSpinner:Ll,progressSpin:Rl,stepSpinnerWarning:zl,stepBody:Bl,completed:Vl,warning:Hl,stepTitle:Ul,pending:Wl,stepSubtitle:Gl,active:Kl,stepExplorer:ql,failure:Jl,failureMessage:Yl,failureLink:Xl,failureBtn:Zl,retry:Ql,retryHidden:$l,retryHint:eu,retryBtn:tu},nu=U(`<div><div><div><div><div></div></div><div><div></div><span></span></div></div></div><div></div><div><div><div><div></div></div><div><div></div><span>`),ru=U(`<img>`),iu=U(`<div>`),au=U(`<div><button>`),ou=U(`<a target=_blank rel="noopener noreferrer"> `),su=U(`<button>`),cu=U(`<div><div>`),lu=U(`<div part=progress><div>`),uu=U(`<div><div></div><div><div></div><div><span>`),du=U(`<span style=font-size:14px>!`),fu=U(`<span>`);function pu(e){if(e.style.transform=``,e.scrollWidth>e.clientWidth){let t=e.clientWidth/e.scrollWidth;e.style.transform=`scale(${t})`,e.style.transformOrigin=`left`}}function mu(e){let{t}=ys(),n=()=>e.fromToken?fl(e.fromToken.chainId,e.chainMap):``,r=()=>e.toToken?fl(e.toToken.chainId,e.chainMap):``,i=z(()=>{let i=e.order,a=i?.status??null,o,s=e.providerName??`Provider`,c=a===`deposited`||a===`published`||a===`filled`||a===`refund_pending`||i?.stepsCompleted?.includes(`deposited`)===!0||!!i?.transactions?.deposit,l=a===`refund_pending`||a===`refunded`,u=a===`filled`,d=a===`failed`,f=e.phase===`building`||e.phase===`awaiting-wallet`,p={title:t(f?{id:`6gkge0`,message:`Sign in wallet`}:{id:`1o4ofyx`,message:`Signed in wallet`}),subtitle:t(f?{id:`1bze7sg`,message:`Confirm in your wallet...`}:{id:`tgp8yw`,message:`Signature submitted`}),status:f?`active`:`completed`,explorerUrl:null,isWarning:!1},m=i?.depositTxHash??``,h=i?.transactions?.deposit?.chainId??e.fromToken?.chainId,g=h&&m?ml(h,m,e.chainMap):null,_=f?`pending`:c?`completed`:`active`,v=f?t({id:`10ioi7e`,message:`Waiting for confirmation...`}):c?t({id:`6c5l2f`,message:`Confirmed on-chain`}):m?`${t({id:`10ioi7e`,message:`Waiting for confirmation...`})} · ${hl(m)}`:t({id:`10ioi7e`,message:`Waiting for confirmation...`}),y={title:(o=n(),t({id:`1nn0owb`,message:`Deposit on {chain}`},{chain:o})),subtitle:v,status:_,explorerUrl:g,isWarning:!1},b=`pending`,x=t({id:`1y28pgi`,message:`Provider filling your order`}),S=t({id:`1t86tnu`,message:`Via {provider}`},{provider:s}),ee=!1;l?(x=t({id:`12rrl0i`,message:`Order expired`}),S=t({id:`1hdpo6q`,message:`No filler accepted the order`}),b=`completed`,ee=!0):d?(x=t({id:`1ok4m5g`,message:`Order failed`}),S=t({id:`9p7amh`,message:`Could not be completed`}),b=`completed`,ee=!0):u?b=`completed`:(a===`deposited`||a===`published`)&&(b=`active`);let te={title:x,subtitle:S,status:b,explorerUrl:null,isWarning:ee},ne=`pending`;o=r();let C=t({id:`1ixbbo7`,message:`Filled on {chain}`},{chain:o}),re=t({id:`cnwfg3`,message:`Tokens delivered`}),ie=!1,ae=null;if(u){ne=`completed`;let t=i?.transactions?.fill?.txHash,n=i?.transactions?.fill?.chainId??e.toToken?.chainId;t&&n&&(ae=ml(n,t,e.chainMap))}else if(a===`refund_pending`)C=t({id:`1nhkl7x`,message:`Refund in progress`}),o=n(),re=t({id:`27fhcv`,message:`Returning tokens on {chain}`},{chain:o}),ne=`active`,ie=!0;else if(a===`refunded`){C=t({id:`1nhkl7x`,message:`Refund in progress`}),o=n(),re=t({id:`27fhcv`,message:`Returning tokens on {chain}`},{chain:o}),ne=`completed`,ie=!0;let r=i?.transactions?.refund?.txHash,a=i?.transactions?.refund?.chainId??e.fromToken?.chainId;r&&a&&(ae=ml(a,r,e.chainMap))}else d&&(C=t({id:`1ok4m5g`,message:`Order failed`}),re=t({id:`115lknq`,message:`Delivery unsuccessful`}),ne=`completed`,ie=!0);let oe=[p,y,te,{title:C,subtitle:re,status:ne,explorerUrl:ae,isWarning:ie}];if(e.executionError){for(let t=oe.length-1;t>=0;t--){let n=oe[t];if(n&&n.status===`active`){oe[t]={...n,subtitle:e.executionError,isWarning:!0};break}}let t=oe[0];t&&!oe.some(e=>e.isWarning&&e.status===`active`)&&(oe[0]={...t,subtitle:e.executionError,status:`active`,isWarning:!0})}return oe}),a=()=>{let t=e.order?.status;return t===`failed`||t===`refunded`},o=()=>{let t=e.order?.transactions?.refund?.txHash,n=e.order?.transactions?.refund?.chainId??e.fromToken?.chainId;return t&&n?ml(n,t,e.chainMap):null},s=()=>{let n=e.providerName;return t({id:`14j1lze`,message:`via {provider}`},{provider:n})};return(()=>{var c=lu(),l=c.firstChild;return q(c,V(H,{get when(){return wn(()=>!!e.fromToken)()&&e.toToken},get children(){return[(()=>{var t=nu(),i=t.firstChild,a=i.firstChild,o=a.firstChild,s=o.firstChild,c=o.nextSibling,l=c.firstChild,u=l.nextSibling,d=i.nextSibling,f=d.nextSibling,p=f.firstChild,m=p.firstChild,h=m.firstChild,g=m.nextSibling,_=g.firstChild,v=_.nextSibling;return q(o,V(Ko,{get symbol(){return e.fromToken.symbol??`?`},color:`#2775CA`,size:32,get logoURI(){return e.fromToken.logoURI}}),s),q(s,V(qo,{color:null,size:14,get iconUrl(){return Ho(e.apiEndpoint,e.fromToken.chainId)}})),Fn(t=>gt(()=>{e.inputAmount,e.fromToken,pu(t)}),l),q(l,V(H,{get when(){return e.inputAmount},get children(){return[V(zs,{get value(){return e.inputAmount},digits:6}),` `]}}),null),q(l,()=>e.fromToken.symbol??``,null),q(u,n),q(d,V(go,{size:14})),q(m,V(Ko,{get symbol(){return e.toToken.symbol??`?`},color:`#0052FF`,size:32,get logoURI(){return e.toToken.logoURI}}),h),q(h,V(qo,{color:null,size:14,get iconUrl(){return Ho(e.apiEndpoint,e.toToken.chainId)}})),Fn(t=>gt(()=>{e.outputAmount,e.toToken,pu(t)}),_),q(_,V(H,{get when(){return e.outputAmount},get children(){return[V(zs,{get value(){return e.outputAmount},digits:6}),` `]}}),null),q(_,()=>e.toToken.symbol??``,null),q(v,r),R(e=>{var n=Z.header,r=`${Z.tokenCol} ${Z.tokenColFrom}`,y=Z.tokenColInner,b=Z.tokenIconWrap,x=Z.chainBadge,S=Z.tokenInfo,ee=Z.tokenAmount,te=Z.tokenChain,ne=Z.arrow,C=Z.tokenCol,re=Z.tokenColInner,ie=Z.tokenIconWrap,ae=Z.chainBadge,oe=Z.tokenInfo,se=Z.tokenAmount,ce=Z.tokenChain;return n!==e.e&&G(t,e.e=n),r!==e.t&&G(i,e.t=r),y!==e.a&&G(a,e.a=y),b!==e.o&&G(o,e.o=b),x!==e.i&&G(s,e.i=x),S!==e.n&&G(c,e.n=S),ee!==e.s&&G(l,e.s=ee),te!==e.h&&G(u,e.h=te),ne!==e.r&&G(d,e.r=ne),C!==e.d&&G(f,e.d=C),re!==e.l&&G(p,e.l=re),ie!==e.u&&G(m,e.u=ie),ae!==e.c&&G(h,e.c=ae),oe!==e.w&&G(g,e.w=oe),se!==e.m&&G(_,e.m=se),ce!==e.f&&G(v,e.f=ce),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0,c:void 0,w:void 0,m:void 0,f:void 0}),t})(),V(H,{get when(){return e.providerName},get children(){var t=iu();return q(t,V(H,{get when(){return e.providerIcon},get children(){var t=ru();return R(n=>{var r=e.providerIcon,i=e.providerName,a=Z.viaIcon;return r!==n.e&&W(t,`src`,n.e=r),i!==n.t&&W(t,`alt`,n.t=i),a!==n.a&&G(t,n.a=a),n},{e:void 0,t:void 0,a:void 0}),t}}),null),q(t,s,null),R(()=>G(t,Z.via)),t}})]}}),l),q(l,V(pn,{get each(){return i()},children:(e,n)=>{let r=()=>{let t=e();return t.isWarning?`${Z.step} ${Z.warning}`:t.status===`completed`?`${Z.step} ${Z.completed}`:t.status===`active`?`${Z.step} ${Z.active}`:`${Z.step} ${Z.pending}`};return(()=>{var i=uu(),a=i.firstChild,o=a.nextSibling,s=o.firstChild,c=s.nextSibling,l=c.firstChild;return q(a,()=>{let t=e();return t.status===`completed`&&!t.isWarning?V(So,{size:14}):t.status===`active`&&t.isWarning?du():t.status===`active`?(()=>{var e=iu();return R(()=>G(e,Z.stepSpinner)),e})():t.isWarning&&t.status===`completed`?du():(()=>{var e=fu();return q(e,n+1),e})()}),q(s,()=>e().title),q(l,()=>e().subtitle),q(c,V(H,{get when(){return e().explorerUrl},get children(){var n=ou(),r=n.firstChild;return q(n,()=>t({id:`q5w460`,message:`View`}),r),q(n,V(Eo,{size:10}),null),R(t=>{var r=e().explorerUrl,i=Z.stepExplorer;return r!==t.e&&W(n,`href`,t.e=r),i!==t.t&&G(n,t.t=i),t},{e:void 0,t:void 0}),n}}),null),R(t=>{var n=r(),l=(()=>{let t=e();return`${Z.stepIcon} ${t.isWarning&&(t.status===`completed`||t.status===`active`)?Z.stepIconWarning:t.status===`completed`?Z.stepIconCompleted:t.status===`active`?Z.stepIconActive:Z.stepIconPending}`})(),u=Z.stepBody,d=Z.stepTitle,f=Z.stepSubtitle;return n!==t.e&&G(i,t.e=n),l!==t.t&&G(a,t.t=l),u!==t.a&&G(o,t.a=u),d!==t.o&&G(s,t.o=d),f!==t.i&&G(c,t.i=f),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),i})()}})),q(c,V(H,{get when(){return e.onRetry},get children(){var n=au(),r=n.firstChild;return K(r,`click`,e.onRetry),q(r,()=>t({id:`zkouah`,message:`Retry`})),R(t=>{var i=`${Z.retry}${e.executionError?``:` ${Z.retryHidden}`}`,a=Z.retryBtn;return i!==t.e&&G(n,t.e=i),a!==t.t&&G(r,t.t=a),t},{e:void 0,t:void 0}),n}}),null),q(c,V(H,{get when(){return a()},get children(){var n=cu(),r=n.firstChild;return q(r,(()=>{var n=wn(()=>e.order?.status===`refunded`);return()=>n()?t({id:`t1rvqg`,message:`Your funds have been returned to your wallet.`}):t({id:`rvctng`,message:`Your order could not be completed.`})})()),q(n,V(H,{get when(){return o()},get children(){var e=ou(),n=e.firstChild;return q(e,()=>t({id:`1c5n7ll`,message:`Refund tx`}),n),q(e,V(Eo,{size:10}),null),R(t=>{var n=o(),r=Z.failureLink;return n!==t.e&&W(e,`href`,t.e=n),r!==t.t&&G(e,t.t=r),t},{e:void 0,t:void 0}),e}}),null),q(n,V(H,{get when(){return e.onNewSwap},get children(){var n=su();return K(n,`click`,e.onNewSwap),q(n,(()=>{var n=wn(()=>e.mode===`receive`);return()=>n()?t({id:`3u5vqs`,message:`New Purchase`}):t({id:`pmqvh0`,message:`New Swap`})})()),R(()=>G(n,Z.failureBtn)),n}}),null),R(e=>{var t=Z.failure,i=Z.failureMessage;return t!==e.e&&G(n,e.e=t),i!==e.t&&G(r,e.t=i),e},{e:void 0,t:void 0}),n}}),null),R(e=>{var t=Z.progress,n=Z.steps;return t!==e.e&&G(c,e.e=t),n!==e.t&&G(l,e.t=n),e},{e:void 0,t:void 0}),c})()}var hu=`tf-e6f4f9`,gu=`tf-02c58b`,_u=`tf-8975d9`,vu={wrapper:hu,fadeOut:gu,"tf-crossfade-out":`tf-c1e2f1`,fadeIn:_u,"tf-crossfade-in":`tf-c41d8a`},yu=U(`<div>`),bu=500;function xu(e){let t=typeof window<`u`&&window.matchMedia?.(`(prefers-reduced-motion: reduce)`)?.matches===!0,n=()=>t?0:e.duration??bu,[r,i]=L(e.current),[a,o]=L(null),s;gt(bt(()=>e.current,(e,t)=>{e===t||!t||(s&&clearTimeout(s),o(t),i(e),s=setTimeout(()=>{o(null)},n()+50))})),St(()=>{s&&clearTimeout(s)});let c=e=>r()===e||a()===e,l=e=>a()===e?vu.fadeOut:a()!==null&&r()===e?vu.fadeIn:void 0;return(()=>{var t=yu();return q(t,V(H,{get when(){return c(`form`)},get children(){var t=yu();return q(t,()=>e.views.form()),R(()=>G(t,l(`form`))),t}}),null),q(t,V(H,{get when(){return c(`tracking`)},get children(){var t=yu();return q(t,()=>e.views.tracking()),R(()=>G(t,l(`tracking`))),t}}),null),q(t,V(H,{get when(){return c(`success`)},get children(){var t=yu();return q(t,()=>e.views.success()),R(()=>G(t,l(`success`))),t}}),null),R(()=>G(t,vu.wrapper)),t})()}function Su(e){return e.length<=14?e:`${e.slice(0,6)}...${e.slice(-4)}`}function Cu(e){return e.charAt(0).toUpperCase()+e.slice(1)}var wu=`tf-e98a9a`,Tu=`tf-1f9019`,Eu=`tf-fd4d56`,Du=`tf-d3c8df`,Ou=`tf-9e3a66`,ku=`tf-db06d4`,Au=`tf-c9a5e1`,ju=`tf-7b3b5b`,Mu=`tf-651299`,Nu=`tf-f52291`,Pu=`tf-8cfc86`,Fu=`tf-5f768d`,Iu=`tf-75f592`,Lu=`tf-73910d`,Ru=`tf-1afb0a`,zu=`tf-92a530`,Bu=`tf-6e8c3e`,Vu=`tf-4b5396`,Hu=`tf-63cca1`,Uu=`tf-18c122`,Wu=`tf-d7e813`,Q={page:wu,hero:Tu,"tf-success-pop":`tf-36c468`,"tf-pulse-ring":`tf-13e6cd`,heroInner:Eu,heroCheck:Du,"tf-check-draw":`tf-dc4326`,title:Ou,subtitle:ku,receivedCard:Au,"tf-scale-in":`tf-2b6de5`,receivedIconWrap:ju,"tf-slide-up":`tf-5b8ef8`,receivedChainBadge:Mu,receivedAmount:Nu,receivedSymbol:Pu,receivedChainName:Fu,journey:Iu,journeyToggle:Lu,"journeyToggle--open":`tf-ae94a0`,journeyChevron:Ru,"journeyChevron--open":`tf-7737cf`,journeyBody:zu,journeyRow:Bu,journeyLabel:Vu,journeyValue:Hu,journeyLink:Uu,primaryBtn:Wu},Gu=U(`<div><div>`),Ku=U(`<div><span></span><span>`),qu=U(`<div><span></span><a target=_blank rel="noopener noreferrer"> `),Ju=U(`<div>`),Yu=U(`<div><button><span> <span style=font-family:var(--tf-font-family-mono);font-weight:600;color:var(--tf-text)> </span> </span><span>`),Xu=U(`<div part=success data-testid=success-page><div><div><div><svg width=28 height=28 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2.5 stroke-linecap=round stroke-linejoin=round><polyline points="4,12 10,18 20,6"></polyline></svg></div></div></div><div data-testid=success-title></div><div></div><div><div><span></span><span></span></div></div><button data-testid=success-primary-btn>`),Zu=U(`<div part=success>`);function Qu(e){let{t}=ys(),[n,r]=L(!1),i=()=>e.order,a=()=>{let t=i();return!t?.destAmount||typeof e.toToken?.decimals!=`number`?t?.destAmount??`0`:Ds(Cs(t.destAmount,e.toToken.decimals),6)},o=()=>{let t=i();return!t?.srcAmount||typeof e.fromToken?.decimals!=`number`?t?.srcAmount??`0`:Ds(Cs(t.srcAmount,e.fromToken.decimals),6)},s=()=>{let e=i();if(!e)return null;let t=Date.parse(e.createdAt),n=Date.parse(e.updatedAt);if(Number.isNaN(t)||Number.isNaN(n))return null;let r=Math.round((n-t)/1e3);return r>0?r:null},c=()=>{let t=i();if(!t)return null;let n=t.transactions?.deposit?.txHash??t.depositTxHash,r=t.transactions?.deposit?.chainId??t.fromChainId;return n?ml(r,n,e.chainMap):null},l=()=>{let t=i();if(!t)return null;let n=t.transactions?.fill?.txHash,r=t.transactions?.fill?.chainId??t.toChainId;return n?ml(r,n,e.chainMap):null},u=()=>{let t=i();return t?fl(t.toChainId,e.chainMap):``},d=()=>{let t=i();return t?fl(t.fromChainId,e.chainMap):``},f=()=>e.mode===`receive`?t({id:`3u5vqs`,message:`New Purchase`}):t({id:`pmqvh0`,message:`New Swap`}),p=()=>s()===null?t({id:`17wtaao`,message:`Your tokens have been delivered`}):t({id:`biwlqk`,message:`Delivered in {seconds}s`},{seconds:String(s())}),m=()=>t({id:`k47stp`,message:`on {chain}`},{chain:u()}),h=()=>t({id:`k47stp`,message:`on {chain}`},{chain:d()});return V(H,{get when(){return i()},get fallback(){return(()=>{var e=Zu();return R(()=>G(e,Q.page)),e})()},get children(){var s=Xu(),u=s.firstChild,d=u.firstChild,g=d.firstChild,_=u.nextSibling,v=_.nextSibling,y=v.nextSibling,b=y.firstChild,x=b.firstChild,S=x.nextSibling,ee=y.nextSibling;return q(_,()=>t({id:`mnlddk`,message:`Tokens Landed!`})),q(v,p),q(y,V(H,{get when(){return e.toToken},get children(){var t=Gu(),n=t.firstChild;return q(t,V(Ko,{get symbol(){return e.toToken.symbol??`?`},color:`#0052FF`,size:40,get logoURI(){return e.toToken.logoURI}}),n),q(n,V(qo,{color:null,size:14,get iconUrl(){return Ho(e.apiEndpoint,i().toChainId)}})),R(e=>{var r=Q.receivedIconWrap,i=Q.receivedChainBadge;return r!==e.e&&G(t,e.e=r),i!==e.t&&G(n,e.t=i),e},{e:void 0,t:void 0}),t}}),b),q(b,V(zs,{get value(){return a()},digits:8}),x),q(x,()=>e.toToken?.symbol??``),q(S,m),q(s,V(H,{get when(){return e.fromToken},get children(){var a=Yu(),s=a.firstChild,u=s.firstChild,d=u.firstChild,f=d.nextSibling,p=f.firstChild;f.nextSibling;var m=u.nextSibling;return K(s,`click`,()=>r(!n())),q(u,()=>t({id:`6s9hn9`,message:`From`}),d),q(f,V(zs,{get value(){return o()},digits:6}),p),q(f,()=>e.fromToken.symbol??``,null),q(u,h,null),q(m,V(fo,{size:14})),q(a,V(H,{get when(){return n()},get children(){var n=Ju();return q(n,V(H,{get when(){return i()?.author},get children(){var e=Ku(),n=e.firstChild,r=n.nextSibling;return q(n,()=>t({id:`1rnxx1g`,message:`Sender`})),q(r,()=>Su(i().author)),R(t=>{var i=Q.journeyRow,a=Q.journeyLabel,o=Q.journeyValue;return i!==t.e&&G(e,t.e=i),a!==t.t&&G(n,t.t=a),o!==t.a&&G(r,t.a=o),t},{e:void 0,t:void 0,a:void 0}),e}}),null),q(n,V(H,{get when(){return i()?.recipient},get children(){var e=Ku(),n=e.firstChild,r=n.nextSibling;return q(n,()=>t({id:`1oncz6g`,message:`Recipient`})),q(r,()=>Su(i().recipient)),R(t=>{var i=Q.journeyRow,a=Q.journeyLabel,o=Q.journeyValue;return i!==t.e&&G(e,t.e=i),a!==t.t&&G(n,t.t=a),o!==t.a&&G(r,t.a=o),t},{e:void 0,t:void 0,a:void 0}),e}}),null),q(n,V(H,{get when(){return c()},get children(){var e=qu(),n=e.firstChild,r=n.nextSibling,i=r.firstChild;return q(n,()=>t({id:`tjg3i3`,message:`Deposit tx`})),q(r,()=>t({id:`10v0i5g`,message:`View on Explorer`}),i),q(r,V(Eo,{size:10}),null),R(t=>{var i=Q.journeyRow,a=Q.journeyLabel,o=c(),s=Q.journeyLink;return i!==t.e&&G(e,t.e=i),a!==t.t&&G(n,t.t=a),o!==t.a&&W(r,`href`,t.a=o),s!==t.o&&G(r,t.o=s),t},{e:void 0,t:void 0,a:void 0,o:void 0}),e}}),null),q(n,V(H,{get when(){return l()},get children(){var e=qu(),n=e.firstChild,r=n.nextSibling,i=r.firstChild;return q(n,()=>t({id:`bdo3n8`,message:`Fill tx`})),q(r,()=>t({id:`10v0i5g`,message:`View on Explorer`}),i),q(r,V(Eo,{size:10}),null),R(t=>{var i=Q.journeyRow,a=Q.journeyLabel,o=l(),s=Q.journeyLink;return i!==t.e&&G(e,t.e=i),a!==t.t&&G(n,t.t=a),o!==t.a&&W(r,`href`,t.a=o),s!==t.o&&G(r,t.o=s),t},{e:void 0,t:void 0,a:void 0,o:void 0}),e}}),null),q(n,V(H,{get when(){return e.providerName},get children(){var n=Ku(),r=n.firstChild,i=r.nextSibling;return q(r,()=>t({id:`evz7q4`,message:`Provider`})),q(i,()=>e.providerName),R(e=>{var t=Q.journeyRow,a=Q.journeyLabel,o=Q.journeyValue;return t!==e.e&&G(n,e.e=t),a!==e.t&&G(r,e.t=a),o!==e.a&&G(i,e.a=o),e},{e:void 0,t:void 0,a:void 0}),n}}),null),R(()=>G(n,Q.journeyBody)),n}}),null),R(e=>{var t=Q.journey,r=`${Q.journeyToggle}${n()?` ${Q[`journeyToggle--open`]}`:``}`,i=`${Q.journeyChevron}${n()?` ${Q[`journeyChevron--open`]}`:``}`;return t!==e.e&&G(a,e.e=t),r!==e.t&&G(s,e.t=r),i!==e.a&&G(m,e.a=i),e},{e:void 0,t:void 0,a:void 0}),a}}),ee),K(ee,`click`,e.onNewSwap),q(ee,f),R(e=>{var t=Q.page,n=Q.hero,r=Q.heroInner,i=Q.heroCheck,a=Q.title,o=Q.subtitle,c=Q.receivedCard,l=Q.receivedAmount,f=Q.receivedSymbol,p=Q.receivedChainName,m=Q.primaryBtn;return t!==e.e&&G(s,e.e=t),n!==e.t&&G(u,e.t=n),r!==e.a&&G(d,e.a=r),i!==e.o&&G(g,e.o=i),a!==e.i&&G(_,e.i=a),o!==e.n&&G(v,e.n=o),c!==e.s&&G(y,e.s=c),l!==e.h&&G(b,e.h=l),f!==e.r&&G(x,e.r=f),p!==e.d&&G(S,e.d=p),m!==e.l&&G(ee,e.l=m),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0}),s}})}var $u=`tf-9b9575`,ed=`tf-140273`,td=`tf-fce59b`,nd=`tf-45030f`,rd=`tf-ce0622`,id=`tf-0c1692`,ad=`tf-64aa3f`,od=`tf-9819ca`,sd=`tf-d9fcd6`,cd=`tf-4ad0e7`,ld=`tf-9ea859`,ud=`tf-25e112`,dd=`tf-478cb9`,fd=`tf-125be5`,pd=`tf-bb4fb1`,md=`tf-ad5703`,hd=`tf-de9986`,gd=`tf-7ac0fe`,_d=`tf-c6ef08`,vd=`tf-3643cf`,yd=`tf-9b3d59`,bd=`tf-a4cc17`,xd=`tf-7f1baf`,Sd=`tf-9171a2`,Cd=`tf-71ea5d`,wd=`tf-dfb33a`,Td=`tf-43fbf4`,Ed=`tf-61ca3c`,Dd=`tf-512365`,Od=`tf-9f601f`,kd=`tf-a0b0d9`,Ad=`tf-1e7a62`,jd=`tf-67f18a`,Md=`tf-cd76b9`,Nd=`tf-189814`,Pd=`tf-8f4efd`,Fd=`tf-6d4840`,Id=`tf-51bf2b`,Ld=`tf-87740a`,Rd=`tf-2ee375`,zd=`tf-0afeec`,Bd=`tf-ea8b28`,Vd=`tf-74f38a`,Hd=`tf-d9b5e6`,Ud=`tf-635e96`,$={overlay:$u,"tf-ts-fade":`tf-9e8870`,selector:ed,"tf-ts-slide":`tf-c66348`,selectorNoBorder:td,header:nd,titleRow:rd,title:id,close:ad,search:od,focused:sd,searchIcon:cd,searchInput:ld,chainFilter:ud,chainFilterBtn:dd,active:fd,chainFilterSkeleton:pd,divider:md,tokenList:hd,tokenListSkeleton:gd,tokenListItemSkeleton:_d,tokenListSkeletonLeft:vd,tokenListSkeletonIcon:yd,tokenListSkeletonInfo:bd,tokenListSkeletonRight:xd,tokenListSkeletonLine:Sd,primary:Cd,secondary:wd,balance:Td,usd:Ed,tokenListItem:Dd,highlighted:Od,tokenListLeft:kd,tokenListIconWrap:Ad,chainIndicator:jd,tokenListInfo:Md,symbolRow:Nd,symbol:Pd,tokenTag:Fd,name:Id,tokenListRight:Ld,zero:Rd,emptyState:zd,emptyStateIcon:Bd,emptyStateTitle:Vd,emptyStateDesc:Hd,emptyStateBtn:Ud};function Wd(e){return new Map(e.map(e=>[e.id,e]))}var Gd=`tf:token:`,Kd=1440*60*1e3,qd=200;function Jd(e,t,n){return[`tokenInfo`,n??`__default__`,e,t.toLowerCase()]}function Yd(e,t){return`${Gd}${e}:${t.toLowerCase()}`}function Xd(e,t,n){return Ya.getQueryData(Jd(e,t,n))??null}function Zd(e,t){Ya.setQueryData(Jd(e.chainId,e.address,t),e)}function Qd(e,t){try{let n=Yd(e,t),r=localStorage.getItem(n);if(!r)return null;let i=JSON.parse(r);return Date.now()-i.timestamp>Kd?(localStorage.removeItem(n),null):i.token}catch{return null}}function $d(e){try{let t=Yd(e.chainId,e.address),n={token:e,timestamp:Date.now()};localStorage.setItem(t,JSON.stringify(n)),ef()}catch{}}function ef(){let e=[];for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);if(n?.startsWith(Gd))try{let t=localStorage.getItem(n);if(t){let r=JSON.parse(t);e.push({key:n,timestamp:r.timestamp})}}catch{n&&localStorage.removeItem(n)}}if(e.length<=qd)return;e.sort((e,t)=>e.timestamp-t.timestamp);let t=e.length-qd;for(let n=0;n<t;n++)localStorage.removeItem(e[n].key)}function tf(e,t){$d(e),Zd(e,t)}function nf(){try{let e=[];for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);n?.startsWith(Gd)&&e.push(n)}for(let t of e)localStorage.removeItem(t)}catch{}}async function rf(e,t,n,r){let i=(r?.baseUrl??n)?.replace(/\/$/,``),a=Xd(e,t,i);if(a)return a;let o=Qd(e,t);if(o)return Zd(o,i),o;let s=n=>({chainId:n.chainId??e,address:n.address??t,symbol:n.symbol,name:n.name,decimals:n.decimals,logoURI:n.logoURI,...Number.isFinite(Number(n.extensions?.price?.usd??``))?{priceUsd:Number(n.extensions?.price?.usd??``)}:{}}),c=n=>{let r=t.toLowerCase();return n.find(t=>Number(t.chainId)===e&&t.address.toLowerCase()===r)};if(r||n)try{let a=c((await(r??new We({baseUrl:n})).searchTokens(t,{chainIds:[e]})).data??[]);if(a){let e=s(a);return tf(e,i),e}throw new j(A.INVALID_TOKEN_IDENTIFIER,`Token not found for chain ${e}: ${t}`)}catch(e){if(e instanceof j)throw e}return{chainId:e,address:t,decimals:void 0}}var af=[{thresholdMs:1e4,intervalMs:1e3},{thresholdMs:3e4,intervalMs:2e3},{thresholdMs:6e4,intervalMs:3e3},{thresholdMs:12e4,intervalMs:5e3}],of=1e4;function sf(e){let{orderStatus:t,dataUpdatedAt:n,now:r=Date.now()}=e;if(t&&Je.includes(t))return!1;if(n===0)return af[0].intervalMs;let i=r-n;for(let e of af)if(i<e.thresholdMs)return e.intervalMs;return of}function cf(e,t){return Ha(()=>({queryKey:[`chains`,e()?.baseUrl??`__default__`],queryFn:async()=>{let t=e();if(!t)throw Error(`Missing client`);return t.getChains()},enabled:t()&&!!e(),staleTime:600*1e3}))}function lf(e,t,n){return Ha(()=>({queryKey:[`quote`,e()?.baseUrl??`__default__`,t()],queryFn:async({signal:n})=>{let r=e(),i=t();if(!r||!i)throw Error(`Missing client or request`);return r.getQuotes(i,n)},enabled:n()&&!!e()&&!!t(),staleTime:15e3,refetchOnWindowFocus:!1}))}function uf(e,t,n,r){return Ha(()=>{let i=n(),a=t();return{queryKey:[`order`,e()?.baseUrl??`__default__`,a,i],queryFn:async()=>{let t=e();if(!t||!i||!a)throw Error(`Missing client, address, or orderId`);return t.getOrderById(a,i)},enabled:r()&&!!e()&&!!i&&!!a,staleTime:5e3,refetchInterval:e=>sf({orderStatus:e.state.data?.status,dataUpdatedAt:e.state.dataUpdatedAt??0})}})}function df(e,t,n,r){return Ha(()=>({queryKey:[`searchTokens`,e()?.baseUrl??`__default__`,t(),r?.()?.join(`,`)??`all`],queryFn:async()=>{let n=e(),i=t();if(!n||!i)throw Error(`Missing client or query`);let a=r?.();return n.searchTokens(i,a?.length?{chainIds:a}:void 0)},select:e=>e.data,enabled:n()&&!!e()&&!!t(),staleTime:30*1e3}))}function ff(e,t,n){return Ha(()=>({queryKey:[`topTokens`,e()?.baseUrl??`__default__`,n?.()?.join(`,`)??`all`],queryFn:async()=>{let t=e();if(!t)throw Error(`Missing client`);let r=n?.();return t.getTopTokens(r?.length?{chainIds:r}:void 0)},enabled:t()&&!!e(),staleTime:300*1e3}))}function pf(e,t){return Ha(()=>({queryKey:[`fiatProviders`,e()?.baseUrl??`__default__`],queryFn:async()=>{let t=e();if(!t)throw Error(`Missing client`);return t.getProviders()},enabled:t()&&!!e(),staleTime:600*1e3}))}function mf(e,t,n){return Ha(()=>({queryKey:[`fiatQuote`,e()?.baseUrl??`__default__`,t()],queryFn:async({signal:n})=>{let r=e(),i=t();if(!r||!i)throw Error(`Missing client or request`);return r.getQuote(i,n)},enabled:n()&&!!e()&&!!t(),staleTime:3e4,refetchOnWindowFocus:!1}))}function hf(e,t,n,r){return Ha(()=>{let i=t(),a=r?.()??!1;return{queryKey:[`fiatStatus`,e()?.baseUrl??`__default__`,i],queryFn:async({signal:t})=>{let n=e();if(!n||!i)throw Error(`Missing client or orderId`);return n.getStatus(i,t,a)},enabled:n()&&!!e()&&!!i,staleTime:5e3,gcTime:0,refetchInterval:e=>{let t=e.state.data?.status;return t&&Ye.has(t)?!1:3e3}}})}function gf(e,t,n,r){return Ha(()=>({queryKey:[`tokenBalances`,e()?.baseUrl??`__default__`,t(),r?.()?.join(`,`)??`all`],queryFn:async()=>{let n=e(),i=t();if(!n||!i)throw Error(`Missing client or address`);let a=pl(i,`solana`),o=r?.()?.filter(a?sl:cl);return n.getTokenBalances(i,o?.length?{chainIds:o}:void 0)},enabled:n()&&!!e()&&!!t(),staleTime:30*1e3}))}function _f(e,t=500){let[n,r]=L(e),i=null;return St(()=>{i!==null&&clearTimeout(i)}),[n,e=>{i!==null&&clearTimeout(i),i=setTimeout(()=>{r(()=>e),i=null},t)},e=>{i!==null&&(clearTimeout(i),i=null),r(()=>e)}]}var vf=U(`<div><button data-testid=chain-filter-btn>All Chains`),yf=U(`<div data-token-selector><div role=dialog part=token-selector data-testid=selector><div><div><span data-testid=selector-title></span><button data-testid=selector-close></button></div><div><span></span><input data-testid=selector-search-input></div></div><div></div><div>`),bf=U(`<div aria-hidden=true>`),xf=U(`<div>`),Sf=U(`<button data-testid=chain-filter-btn>`),Cf=U(`<div><div><div></div><div><div></div><div></div></div></div><div><div></div><div>`),wf=U(`<button><svg width=14 height=14 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><rect x=2 y=2 width=20 height=8 rx=2></rect><rect x=2 y=14 width=20 height=8 rx=2>`),Tf=U(`<div><div><svg width=28 height=28 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round><circle cx=11 cy=11 r=8></circle><path d="m21 21-4.35-4.35"></path></svg></div><div></div><div>`),Ef=U(`<span>`),Df=U(`<div><div></div><div>`),Of=U(`<button data-testid=token-list-item><div><div><div></div></div><div><div><span></span></div><span>`),kf=[`108px`,`80px`,`92px`,`84px`],Af=[0,1,2,3,4];function jf(e){return!Number.isFinite(e)||e<=0?`$0`:e<.01?`<$0.01`:`$${Es(e.toFixed(2).replace(/\.?0+$/,``))}`}function Mf(e,t){let n=Number(e.chainId),r=Number.isFinite(n)?n:0,i=r>0?t?.get(r):void 0,a=typeof e.decimals==`number`&&e.decimals>=0?e.decimals:18,o=e.extensions?.balance,s=o!==void 0&&o!==`0`,c=o===void 0?null:s?Es(Ds(Cs(o,a),2)):`0`,l=Number(e.extensions?.price?.usd??``),u=s?Number(Cs(o,a)):0,d=Number.isFinite(l)&&Number.isFinite(u)?u*l:0;return{symbol:e.symbol,name:e.name,chain:i?.name??(r>0?`Chain ${r}`:`Unknown Chain`),chainId:r,color:`#888`,balance:c,usd:c===null?``:jf(d),address:e.address,decimals:a,logoURI:e.logoURI,priceUsd:Number.isFinite(l)?l:void 0}}function Nf(e){let{t}=ys(),n=()=>e.selectingFor===`from`,[r,i]=L(``),[a,o]=_f(``,300),[s,c]=L(`All Chains`),[l,u]=L(!1),d=cf(()=>e.client??null,()=>!!e.client),f=gf(()=>e.client??null,()=>e.walletAddress??null,()=>!!e.client&&!!e.walletAddress&&n(),()=>void 0),p=z(()=>{let t=d.data;if(!t)return[];if(n()){let e=f.data;if(!e?.length)return[];let n=new Set(e.map(e=>Number(e.chainId)));return t.filter(e=>n.has(e.id))}let r=e.supportedChainIds;if(r?.length){let e=new Set(r);return t.filter(t=>e.has(t.id))}return t}),m=z(()=>d.isPending&&!d.data),h=()=>e.client?.baseUrl,g=z(()=>{if(s()===`All Chains`)return e.supportedChainIds?.length?e.supportedChainIds:void 0;let t=p().find(e=>e.name===s());return t?[t.id]:void 0}),_=z(()=>g()??(e.supportedChainIds?.length?e.supportedChainIds:void 0)),v=ff(()=>e.client??null,()=>!!e.client&&!n(),()=>g()),y=gf(()=>e.client??null,()=>e.walletAddress??null,()=>!!e.client&&!!e.walletAddress,()=>g()),b=df(()=>e.client??null,()=>a().trim(),()=>!!e.client&&!n()&&!!a().trim(),()=>_()),x=z(()=>{let e=d.data;return e?Wd(e):new Map}),S=z(()=>{let e=y.data;if(!e)return new Map;let t=new Map;for(let n of e)t.set(`${n.chainId}:${n.address.toLowerCase()}`,n);return t}),ee=(e,t)=>{if(e.extensions?.balance!==void 0)return e;let n=t.get(`${e.chainId}:${e.address.toLowerCase()}`);return n?.extensions?.balance?{...e,extensions:{...e.extensions,balance:n.extensions.balance}}:e},te=z(()=>{let e=x(),t=S(),n=v.data;return n?n.map(n=>Mf(ee(n,t),e)):[]}),ne=z(()=>{let e=x(),t=y.data;return t?t.map(t=>Mf(t,e)):[]}),C=z(()=>{let e=x(),t=S(),n=b.data;return n?n.map(n=>Mf(ee(n,t),e)):null}),re=z(()=>{if(C()!==null)return C();if(e.allowedTokens&&e.tokens?.length)return e.tokens;let t=n()?ne():te();return t.length>0?t:e.tokens??[]}),ie=z(()=>{let t=e.allowedTokens,n=e.tokenTags,i=re().filter(e=>{if(t&&e.address&&!t.has(`${e.chainId}:${e.address.toLowerCase()}`)||s()!==`All Chains`&&e.chain!==s())return!1;if(!b.data&&r()){let t=r().toLowerCase();if(!e.symbol.toLowerCase().includes(t)&&!e.name.toLowerCase().includes(t))return!1}return!0});if(n&&Object.keys(n).length>0){let e=e=>!!e.address&&!!n[`eip155:${e.chainId}:${e.address.toLowerCase()}`];i.sort((t,n)=>(e(n)?1:0)-(e(t)?1:0))}return i}),ae=z(()=>n()?(y.isPending||y.isFetching)&&!y.data:(v.isPending||v.isFetching)&&!v.data),oe=z(()=>b.isFetching&&!b.data),se=z(()=>oe()||ae()),ce=t=>{t.key===`Escape`&&e.onClose()},le=t=>{t.target===t.currentTarget&&e.onClose()},ue=t=>{t.address&&tf({chainId:t.chainId,address:t.address,symbol:t.symbol,name:t.name,decimals:t.decimals,logoURI:t.logoURI,priceUsd:t.priceUsd}),e.onSelect(t)};return(()=>{var n=yf(),a=n.firstChild,d=a.firstChild,f=d.firstChild,g=f.firstChild,_=g.nextSibling,v=f.nextSibling,y=v.firstChild,b=y.nextSibling,x=d.nextSibling,S=x.nextSibling;return K(n,`click`,le),K(n,`keydown`,ce),q(g,(()=>{var n=wn(()=>e.selectingFor===`from`);return()=>n()?t({id:`1t0r88u`,message:`Select payment token`}):t({id:`1ix1b7w`,message:`Select destination token`})})()),K(_,`click`,e.onClose),q(_,V(wo,{size:18})),q(y,V(Oo,{size:14})),K(b,`blur`,()=>u(!1)),K(b,`focus`,()=>u(!0)),K(b,`input`,e=>{let t=e.target.value;i(t),o(t)}),q(d,V(H,{get when(){return!m()},get fallback(){return(()=>{var e=bf();return q(e,V(fn,{each:kf,children:e=>(()=>{var t=xf();return Nn(t,`width`,e),R(()=>G(t,`${Fc.skeleton} ${$.chainFilterSkeleton}`)),t})()})),R(()=>G(e,$.chainFilter)),e})()},get children(){var e=vf(),t=e.firstChild,n=t.firstChild;return K(t,`click`,()=>c(`All Chains`)),q(t,V(qo,{size:14}),n),q(e,V(fn,{get each(){return p()},children:e=>(()=>{var t=Sf();return K(t,`click`,()=>c(e.name)),q(t,V(qo,{size:14,get iconUrl(){return Ho(h(),e.id)}}),null),q(t,()=>e.name,null),R(()=>G(t,`${$.chainFilterBtn} ${s()===e.name?$.active:``}`)),t})()}),null),R(n=>{var r=$.chainFilter,i=`${$.chainFilterBtn} ${s()===`All Chains`?$.active:``}`;return r!==n.e&&G(e,n.e=r),i!==n.t&&G(t,n.t=i),n},{e:void 0,t:void 0}),e}}),null),q(S,V(H,{get when(){return!se()},get fallback(){return(()=>{var e=bf();return q(e,V(fn,{each:Af,children:()=>(()=>{var e=Cf(),t=e.firstChild,n=t.firstChild,r=n.nextSibling,i=r.firstChild,a=i.nextSibling,o=t.nextSibling,s=o.firstChild,c=s.nextSibling;return R(l=>{var u=$.tokenListItemSkeleton,d=$.tokenListSkeletonLeft,f=`${Fc.skeleton} ${$.tokenListSkeletonIcon}`,p=$.tokenListSkeletonInfo,m=`${Fc.skeleton} ${$.tokenListSkeletonLine} ${$.primary}`,h=`${Fc.skeleton} ${$.tokenListSkeletonLine} ${$.secondary}`,g=$.tokenListSkeletonRight,_=`${Fc.skeleton} ${$.tokenListSkeletonLine} ${$.balance}`,v=`${Fc.skeleton} ${$.tokenListSkeletonLine} ${$.usd}`;return u!==l.e&&G(e,l.e=u),d!==l.t&&G(t,l.t=d),f!==l.a&&G(n,l.a=f),p!==l.o&&G(r,l.o=p),m!==l.i&&G(i,l.i=m),h!==l.n&&G(a,l.n=h),g!==l.s&&G(o,l.s=g),_!==l.h&&G(s,l.h=_),v!==l.r&&G(c,l.r=v),l},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0}),e})()})),R(()=>G(e,$.tokenListSkeleton)),e})()},get children(){return V(fn,{get each(){return ie()},get fallback(){return(()=>{var e=Tf(),n=e.firstChild,r=n.nextSibling,i=r.nextSibling;return q(r,()=>t({id:`19is1h8`,message:`No tokens found`})),q(i,()=>t({id:`13x5i2v`,message:`Try selecting a different chain or search for a specific token`})),q(e,V(H,{get when(){return s()!==`All Chains`},get children(){var e=wf();return e.firstChild,K(e,`click`,()=>c(`All Chains`)),q(e,()=>t({id:`1qbiehv`,message:`View All Chains`}),null),R(()=>G(e,$.emptyStateBtn)),e}}),null),R(t=>{var a=$.emptyState,o=$.emptyStateIcon,s=$.emptyStateTitle,c=$.emptyStateDesc;return a!==t.e&&G(e,t.e=a),o!==t.t&&G(n,t.t=o),s!==t.a&&G(r,t.a=s),c!==t.o&&G(i,t.o=c),t},{e:void 0,t:void 0,a:void 0,o:void 0}),e})()},children:t=>{let n=()=>t.balance!==null,r=()=>t.balance!==null&&t.balance!==`0`,i=()=>null,a=()=>{let n=e.tokenTags;if(!(!n||!t.address))return n[`eip155:${t.chainId}:${t.address.toLowerCase()}`]};return(()=>{var e=Of(),o=e.firstChild,s=o.firstChild,c=s.firstChild,l=s.nextSibling,u=l.firstChild,d=u.firstChild,f=u.nextSibling;return K(e,`click`,()=>ue(t)),q(s,V(Ko,{get symbol(){return t.symbol},get color(){return t.color},size:36,get logoURI(){return t.logoURI}}),c),q(c,V(qo,{get color(){return i()},size:11,get iconUrl(){return wn(()=>t.chainId>0)()?Ho(h(),t.chainId):void 0}})),q(d,()=>t.symbol),q(u,V(H,{get when(){return a()},get children(){var e=Ef();return q(e,a),R(()=>G(e,$.tokenTag)),e}}),null),q(f,()=>t.chain),q(e,V(H,{get when(){return n()},get children(){var e=Df(),n=e.firstChild,i=n.nextSibling;return q(n,()=>t.balance),q(i,()=>t.usd),R(t=>{var a=$.tokenListRight,o=`${$.balance} ${r()?``:$.zero}`,s=$.usd;return a!==t.e&&G(e,t.e=a),o!==t.t&&G(n,t.t=o),s!==t.a&&G(i,t.a=s),t},{e:void 0,t:void 0,a:void 0}),e}}),null),R(t=>{var n=$.tokenListItem,r=$.tokenListLeft,i=$.tokenListIconWrap,a=$.chainIndicator,p=$.tokenListInfo,m=$.symbolRow,h=$.symbol,g=$.name;return n!==t.e&&G(e,t.e=n),r!==t.t&&G(o,t.t=r),i!==t.a&&G(s,t.a=i),a!==t.o&&G(c,t.o=a),p!==t.i&&G(l,t.i=p),m!==t.n&&G(u,t.n=m),h!==t.s&&G(d,t.s=h),g!==t.h&&G(f,t.h=g),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0}),e})()}})}})),R(r=>{var i=$.overlay,o=`${$.selector}${e.noBorder?` ${$.selectorNoBorder}`:``}`,s=e.selectingFor===`from`?t({id:`1t0r88u`,message:`Select payment token`}):t({id:`1ix1b7w`,message:`Select destination token`}),c=$.header,u=$.titleRow,p=$.title,m=$.close,h=t({id:`1l0xxoj`,message:`Close`}),ee=`${$.search} ${l()?$.focused:``}`,te=$.searchIcon,ne=$.searchInput,C=t({id:`dizog6`,message:`Search by name or address`}),re=$.divider,ie=$.tokenList;return i!==r.e&&G(n,r.e=i),o!==r.t&&G(a,r.t=o),s!==r.a&&W(a,`aria-label`,r.a=s),c!==r.o&&G(d,r.o=c),u!==r.i&&G(f,r.i=u),p!==r.n&&G(g,r.n=p),m!==r.s&&G(_,r.s=m),h!==r.h&&W(_,`aria-label`,r.h=h),ee!==r.r&&G(v,r.r=ee),te!==r.d&&G(y,r.d=te),ne!==r.l&&G(b,r.l=ne),C!==r.u&&W(b,`placeholder`,r.u=C),re!==r.c&&G(x,r.c=re),ie!==r.w&&G(S,r.w=ie),r},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0,c:void 0,w:void 0}),R(()=>b.value=r()),n})()}var Pf=`tf-636daf`,Ff=`tf-fddfab`,If=`tf-970eb9`,Lf=`tf-de123a`,Rf=`tf-0445e3`,zf=`tf-9a65ec`,Bf=`tf-c5ea21`,Vf=`tf-9d4bba`,Hf=`tf-cb9b60`,Uf=`tf-2cba65`,Wf={editor:Pf,"tf-recipient-slide":`tf-6933ac`,header:Ff,title:If,close:Lf,body:Rf,textarea:zf,textareaError:Bf,error:Vf,footer:Hf,confirm:Uf},Gf=U(`<div data-testid=recipient-editor><div><span></span><button aria-label=Close data-testid=recipient-editor-close></button></div><div><textarea rows=3 autocomplete=off data-testid=recipient-editor-input></textarea></div><div><button data-testid=recipient-editor-confirm>`),Kf=U(`<span data-testid=recipient-editor-error>`);function qf(e){let{t}=ys(),[n,r]=L(e.initialValue),i=z(()=>{let t=n().trim();return t?pl(t,e.chainType):!1}),a=z(()=>{let t=n().trim();return t.length>0&&!pl(t,e.chainType)}),o=()=>{let t=n().trim();t&&i()&&e.onConfirm(t)};return(()=>{var s=Gf(),c=s.firstChild,l=c.firstChild,u=l.nextSibling,d=c.nextSibling,f=d.firstChild,p=d.nextSibling,m=p.firstChild;return q(l,()=>t({id:`18cmny0`,message:`Recipient Address`})),K(u,`click`,()=>e.onClose()),q(u,V(wo,{size:18})),K(f,`keydown`,e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),o())}),K(f,`input`,e=>r(e.target.value)),W(f,`spellcheck`,!1),q(d,(()=>{var e=wn(()=>!!a());return()=>e()&&(()=>{var e=Kf();return q(e,()=>t({id:`fo0vw0`,message:`Invalid address for this chain`})),R(()=>G(e,Wf.error)),e})()})(),null),K(m,`click`,o),q(m,()=>t({id:`18tbqwf`,message:`Confirm`})),R(e=>{var n=Wf.editor,r=Wf.header,o=Wf.title,h=Wf.close,g=Wf.body,_=`${Wf.textarea} ${a()?Wf.textareaError:``}`,v=t({id:`fpand1`,message:`Enter destination address`}),y=Wf.footer,b=`${Qc.btnPrimary} ${Wf.confirm}`,x=!i();return n!==e.e&&G(s,e.e=n),r!==e.t&&G(c,e.t=r),o!==e.a&&G(l,e.a=o),h!==e.o&&G(u,e.o=h),g!==e.i&&G(d,e.i=g),_!==e.n&&G(f,e.n=_),v!==e.s&&W(f,`placeholder`,e.s=v),y!==e.h&&G(p,e.h=y),b!==e.r&&G(m,e.r=b),x!==e.d&&(m.disabled=e.d=x),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0}),R(()=>f.value=n()),s})()}function Jf(e,t,n,r,i){return e||(t?`error`:n&&r===0&&i?`quoting`:r>0?`quoted`:`idle`)}function Yf(e,t,n,r){return e||(t?`error`:n&&r===0?`quoting`:r>0?`quoted`:`idle`)}function Xf(){let[e,t]=L(null),[n,r]=L(null),[i,a]=L(``),[o,s]=L(null),[c,l]=L(null),[u,d]=L(null),[f,p]=L(null),[m,h]=L(null),[g,_]=L(null);function v(e){c()!==e&&l(e)}function y(e){o()!==e&&s(e)}function b(){yt(()=>{h(null),_(null)})}function x(){yt(()=>{a(``),p(null),d(null),h(null),_(null)})}return{fromToken:e,toToken:n,inputAmount:i,recipient:o,walletAddress:c,execPhase:u,order:f,error:m,errorCode:g,setFromToken:t,setToToken:r,setInputAmount:a,setRecipient:y,setWalletAddress:v,setExecPhase:d,setOrder:p,setError:h,setErrorCode:_,clearError:b,reset:x}}function Zf(){let[e,t]=L(null),[n,r]=L(``),[i,a]=L(null),[o,s]=L(null),[c,l]=L(null),[u,d]=L(null),[f,p]=L(null),[m,h]=L(null),[g,_]=L(null);function v(e){c()!==e&&l(e)}function y(e){o()!==e&&s(e)}function b(){yt(()=>{h(null),_(null)})}function x(){yt(()=>{a(null),p(null),d(null),h(null),_(null)})}return{targetToken:e,targetAmount:n,fromToken:i,recipient:o,walletAddress:c,execPhase:u,order:f,error:m,errorCode:g,setTargetToken:t,setTargetAmount:r,setFromToken:a,setRecipient:y,setWalletAddress:v,setExecPhase:d,setOrder:p,setError:h,setErrorCode:_,clearError:b,reset:x}}var Qf={eip155:{1:1,137:137,42161:42161,8453:8453,10:10,56:56,43114:43114},solana:{"5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp":20011e6}};function $f(e){if(typeof e==`object`&&e){if(typeof e.chainId!=`number`||typeof e.address!=`string`)throw new j(A.INVALID_TOKEN_IDENTIFIER,`Token target must have numeric chainId and string address`,e);return{chainId:e.chainId,address:e.address}}if(typeof e!=`string`)throw new j(A.INVALID_TOKEN_IDENTIFIER,`Token identifier must be a string or TokenTarget object`,e);if(e.startsWith(`{`)){try{let t=JSON.parse(e);if(typeof t.chainId==`number`&&typeof t.address==`string`)return{chainId:t.chainId,address:t.address}}catch{}throw new j(A.INVALID_TOKEN_IDENTIFIER,`Invalid JSON token identifier`,e)}let t=e.split(`:`);if(t.length!==3)throw new j(A.INVALID_TOKEN_IDENTIFIER,`Invalid CAIP-10 format: expected "namespace:reference:address", got "${e}"`,e);let[n,r,i]=t;if(!n||!r||!i)throw new j(A.INVALID_TOKEN_IDENTIFIER,`CAIP-10 parts cannot be empty`,e);let a=Qf[n],o;if(a&&a[r]!==void 0)o=a[r];else if(n===`eip155`){if(o=parseInt(r,10),isNaN(o))throw new j(A.INVALID_TOKEN_IDENTIFIER,`Invalid EIP-155 chain reference: "${r}"`,e)}else throw new j(A.INVALID_TOKEN_IDENTIFIER,`Unknown CAIP-10 namespace: "${n}"`,e);return{chainId:o,address:i}}function ep(e){let t=new Set;for(let n of e)try{let{chainId:e,address:r}=$f(n);t.add(`${e}:${r.toLowerCase()}`)}catch{}return t}function tp(e){return e?.includes(`1-click`)??!1}function np(e){try{return e.startsWith(`0x`),BigInt(e)}catch{return null}}function rp(e){let t=[];for(let n of e){let e=np(n.quote.amountOut);e!==null&&t.push({routeId:n.routeId,amountOut:e,etaSeconds:Number.isFinite(n.quote.expectedDurationSeconds)?n.quote.expectedDurationSeconds:2**53-1,isGuaranteedOutput:!1,isOneClick:tp(n.tags)})}return t}function ip(e,t){let n=[];for(let r of e){let e=np(r.quote.amountIn);if(e===null)continue;let i=t===`EXACT_OUTPUT`&&r.exactOutMethod===`native`;n.push({routeId:r.routeId,amountIn:e,etaSeconds:Number.isFinite(r.quote.expectedDurationSeconds)?r.quote.expectedDurationSeconds:2**53-1,isGuaranteedOutput:i,isOneClick:tp(r.tags)})}return n}function ap(e){if(e.length===0)return[];let t=e[0].amountOut;for(let n of e)n.amountOut>t&&(t=n.amountOut);let n=t*999n/1000n,r=[...e.filter(e=>e.amountOut>=n)].sort((e,t)=>{if(e.isGuaranteedOutput!==t.isGuaranteedOutput)return e.isGuaranteedOutput?-1:1;if(e.isOneClick!==t.isOneClick)return e.isOneClick?-1:1;let n=e.etaSeconds-t.etaSeconds;return n===0?t.amountOut>e.amountOut?1:t.amountOut<e.amountOut?-1:0:n}),i=new Set(r.map(e=>e.routeId)),a=e.filter(e=>!i.has(e.routeId)).sort((e,t)=>t.amountOut>e.amountOut?1:t.amountOut<e.amountOut?-1:0);return[...r.map(e=>e.routeId),...a.map(e=>e.routeId)]}function op(e){if(e.length===0)return[];let t=e[0].amountIn;for(let n of e)n.amountIn<t&&(t=n.amountIn);let n=t*1001n/1000n,r=[...e.filter(e=>e.amountIn<=n)].sort((e,t)=>{if(e.isGuaranteedOutput!==t.isGuaranteedOutput)return e.isGuaranteedOutput?-1:1;if(e.isOneClick!==t.isOneClick)return e.isOneClick?-1:1;let n=e.etaSeconds-t.etaSeconds;return n===0?e.amountIn>t.amountIn?1:e.amountIn<t.amountIn?-1:0:n}),i=new Set(r.map(e=>e.routeId)),a=e.filter(e=>!i.has(e.routeId)).sort((e,t)=>e.amountIn>t.amountIn?1:e.amountIn<t.amountIn?-1:0);return[...r.map(e=>e.routeId),...a.map(e=>e.routeId)]}function sp(e){return ap(rp(e))[0]??null}function cp(e,t){return op(ip(e,t))[0]??null}var lp={"en-US":()=>import(`./en-US-Dg7NZU3M.js`),"zh-CN":()=>import(`./zh-CN-CuSlgEdI.js`),"zh-TW":()=>import(`./zh-TW-DkEqrPgE.js`),"ja-JP":()=>import(`./ja-JP-FXTra_NF.js`),"ko-KR":()=>import(`./ko-KR-D4gcrXFl.js`)},up={locale:`en-US`,fallbackLocale:`en-US`,messages:{},lazyLocaleLoading:!0,chunkLoader:async e=>{let t=lp[e];return t?t():{}}},dp=e=>vs({...up,get children(){return e.children}}),fp={},pp=new Map;function mp(e,t){return t?e.replace(/\{(\w+)\}/g,(e,n)=>n in t?String(t[n]):`{${n}}`):e}function hp(e,...t){if(typeof e==`string`)return e;if(typeof e==`object`&&`message`in e){let n=e.message,r=t[0];if(pp.size>0){let e=pp.get(n);if(e&&e in fp){let t=fp[e];if(typeof t==`function`)return t(r??{});if(typeof t==`string`)return mp(t,r)}}return mp(n,r)}let n=e,r=n[0]??``;for(let e=1;e<n.length;e++)r+=String(t[e-1]??``)+(n[e]??``);return r}function gp(e){let[t,n]=L(!1),[r,i]=L(null),a=()=>{let t=e.walletAdapter();return t&&t.supportedActionTypes.some(e=>e.startsWith(`solana_`))?`solana`:`evm`},o;return gt(bt(e.walletAdapter,s=>{if(o?.(),o=void 0,!s)return;let c=s.isConnected();n(c),c&&s.getAddress().then(t=>{i(t),e.onAddressChange(t),e.callbacks()?.onWalletConnected?.({address:t??``,chainType:a()})});let l=async()=>{let o=await s.getAddress();t()&&r()===o||(yt(()=>{n(!0),i(o),e.onAddressChange(o)}),e.callbacks()?.onWalletConnected?.({address:o??``,chainType:a()}))},u=()=>{t()&&(yt(()=>{n(!1),i(null),e.onAddressChange(null)}),e.onDisconnect?.())};s.on(`connect`,l),s.on(`disconnect`,u),o=()=>{s.off(`connect`,l),s.off(`disconnect`,u)}})),St(()=>o?.()),{isConnected:t,walletAddress:r,detectChainType:a,handleConnect:async()=>{let t=e.walletAdapter();if(!t){e.callbacks()?.onConnectWallet?.();return}try{await t.connect()}catch{e.onConnectError?.(`Failed to connect wallet`,A.WALLET_CONNECTION_FAILED)}}}}function _p(e){let t=e.intervalSeconds??30,[n,r]=L(t);return gt(bt(e.phase,n=>{if(n!==`quoted`){r(t);return}r(t);let i=setInterval(()=>{r(n=>n<=1?(e.onExpired(),t):n-1)},1e3);St(()=>clearInterval(i))})),{countdownSeconds:n,resetCountdown:()=>{r(t)}}}function vp(e){let t=z(()=>{let t=e.toToken();if(!t||!e.isConnected())return!1;let n=e.walletAddress();return n?!pl(n,ll(t.chainId)):!1}),n=z(()=>e.recipient()||(e.isConnected()&&e.walletAddress()&&!t()?e.walletAddress():null));return gt(bt(t,n=>{if(n&&!e.recipient()&&e.walletAdapter()){let n=e.toToken();if(!n)return;let r=ll(n.chainId);e.walletAdapter().getAddress(r).then(n=>{n&&pl(n,r)&&!e.recipient()&&t()&&e.setRecipient(n)}).catch(()=>{})}})),{needRecipient:t,recipientDisplay:n,handleRecipientChange:t=>{e.setRecipient(t.trim()||null)}}}function yp(e){let t=uf(e.client,e.walletAddress,e.trackingOrderId,()=>e.phase()===`tracking`&&!!e.trackingOrderId());return gt(bt(()=>t.data,t=>{if(!t||e.execPhase()!==`tracking`)return;let n=t.status===`filled`||t.stepsCompleted?.includes(`filled`),r=t.status===`failed`||t.status===`refunded`;yt(()=>{e.setOrder(t),n?(e.setExecPhase(`success`),Ya.invalidateQueries({queryKey:[`tokenBalances`,e.client().baseUrl]}),e.onOrderFilled(t)):r&&(Ya.invalidateQueries({queryKey:[`tokenBalances`,e.client().baseUrl]}),e.onOrderFailed(t))})})),{orderQuery:t}}function bp(){let[e,t]=L(null),[n,r]=L(null),[i,a]=L(null),[o,s]=L(null),[c,l]=L(null);return{trackingOrderId:e,trackingProviderName:n,trackingProviderIcon:i,trackingInputAmount:o,executionError:c,setTrackingOrderId:t,setTrackingProviderName:r,setTrackingProviderIcon:a,setTrackingInputAmount:s,setExecutionError:l}}var xp=new Set([`eth_sign`]);async function Sp(e,t,n){let r,i;if(t.kind===`CONTRACT_CALL`&&t.approvals){for(let a of t.approvals)if(a.type===`eip1193_request`){if(xp.has(a.request.method))throw new j(A.WALLET_ACTION_FAILED,`Blocked wallet method: ${a.request.method}`);let t=await e.executeWalletAction({type:`eip1193_request`,chainId:n,method:a.request.method,params:a.request.params});if(!t.success)throw new j(A.WALLET_ACTION_FAILED,t.error??`Wallet action failed`);a.deposit&&(r=t.txHash??r)}else if(a.type===`solana_sendTransaction`){let t=await e.executeWalletAction({type:`solana_signTransaction`,transaction:a.transaction});if(!t.success)throw new j(A.WALLET_ACTION_FAILED,t.error??`Wallet action failed`);a.deposit&&(i=typeof t.data==`string`?t.data:void 0)}}if(!r&&!i)throw new j(A.TRANSACTION_FAILED,`No deposit transaction received`);return{txHash:r,signedTransaction:i}}async function Cp(e,t,n,r){return e.submitDeposit(r.signedTransaction?{quoteId:t,routeId:n,signedTransaction:r.signedTransaction}:{quoteId:t,routeId:n,txHash:r.txHash})}function wp(e,t){let n=e instanceof Error?e.message:typeof e==`string`?e:`Transaction failed`;return e instanceof j?t?.onSwapError?.({code:e.code,message:e.message,details:e.details}):t?.onSwapError?.({code:A.TRANSACTION_FAILED,message:String(e)}),n}function Tp(e,t){yt(()=>{e.setTrackingOrderId(null),e.setTrackingProviderName(null),e.setTrackingProviderIcon(null),e.setTrackingInputAmount(null),e.setExecutionError(null)}),Ya.removeQueries({queryKey:[`quote`,t]}),Ya.removeQueries({queryKey:[`order`,t]})}function Ep(e){let t=bp();return{trackingOrderId:t.trackingOrderId,trackingProviderName:t.trackingProviderName,trackingProviderIcon:t.trackingProviderIcon,executionError:t.executionError,handleConfirm:async()=>{let n=e.routes(),r=e.quoteId(),i=n.find(t=>t.routeId===e.selectedRouteId())??n[0];if(!i||!r||!e.client()||!e.walletAdapter())return;if(e.needRecipient()&&!e.recipient()){e.setError(`Recipient address is required for cross-chain swaps`),e.setErrorCode(A.INVALID_CONFIG);return}let a=ll(e.fromToken().chainId),o=e.walletAddress();if(!o){e.setError(`Wallet not connected`),e.setErrorCode(A.WALLET_CONNECTION_FAILED);return}if(!pl(o,a)){e.setError(hp`Wallet doesn't match source chain`),e.setErrorCode(A.INVALID_CONFIG);return}t.setTrackingProviderName(i.routeId??null);let s=e.apiEndpoint()??`https://api.hyperstream.dev`;t.setTrackingProviderIcon(i.icon?`${s}${i.icon}`:null),t.setExecutionError(null),e.setExecPhase(`building`);try{let n=await e.client().buildDeposit({from:o,quoteId:r,routeId:i.routeId});e.setExecPhase(`awaiting-wallet`);let a=await Sp(e.walletAdapter(),n,e.fromToken().chainId);e.setExecPhase(`submitting`);let s=await Cp(e.client(),r,i.routeId,a);e.setExecPhase(`tracking`),t.setTrackingOrderId(s.orderId)}catch(n){let r=wp(n,e.callbacks());t.setExecutionError(r)}},handleRetry:()=>{t.setExecutionError(null),e.setExecPhase(null)},handleNewSwap:()=>{e.storeReset(),Tp(t,e.client().baseUrl),e.onReset?.()}}}var Dp=`tf-dc5721`,Op=`tf-68123c`,kp=`tf-532d07`,Ap=`tf-b7936a`,jp=`tf-883305`,Mp=`tf-bc1b05`,Np=`tf-98d625`,Pp=`tf-dd09ea`,Fp=`tf-018710`,Ip=`tf-21456c`,Lp=`tf-6da3db`,Rp=`tf-d25568`,zp=`tf-11bb1d`,Bp=`tf-677ece`,Vp=`tf-635915`,Hp=`tf-b8a04a`,Up=`tf-0d1ef8`,Wp=`tf-d04a4e`,Gp=`tf-d7140f`,Kp=`tf-dcd620`,qp=`tf-038cf1`,Jp=`tf-33c9cb`,Yp=`tf-b1e4a6`,Xp=`tf-d168ae`,Zp=`tf-b2b098`,Qp=`tf-92acfd`,$p=`tf-5f8805`,em=`tf-af41ab`,tm=`tf-18c3f4`,nm=`tf-85dacd`,rm=`tf-8a93b8`,im=`tf-ae3eb4`,am=`tf-93effc`,om=`tf-a04b23`,sm=`tf-57762e`,cm={header:Dp,headerLeft:Op,"headerLeft--hidden":`tf-43dda9`,headerLogoImage:kp,headerTitle:Ap,headerTitleAccent:jp,breadcrumb:Mp,panelWrapper:Np,breadcrumbLink:Pp,breadcrumbSep:Fp,breadcrumbCurrent:Ip,headerRight:Lp,walletDot:Rp,"walletDot--success":`tf-16ce7d`,walletAddress:zp,"panelWrapper--to":`tf-8b7743`,"panelWrapper--noArrow":`tf-fdf8be`,panel:Bp,panelHeader:Vp,panelHeaderRight:Hp,panelLabel:Up,panelBalance:Wp,panelRow:Gp,tokenBtn:Kp,"tokenBtn--locked":`tf-6859a9`,"tokenBtn--select":`tf-e25a5c`,tokenName:qp,tokenNameAccent:Jp,caret:Yp,panelFooter:Xp,panelFiatRow:Zp,fiat:Qp,"fiat--hidden":`tf-bd2f5c`,maxBtn:$p,swapArrow:em,swapArrowInner:tm,"swapArrowInner--disabled":`tf-194ce7`,mergedPanel:nm,mergedSection:rm,panelDivider:im,swapArrowCircle:am,"swapArrowCircle--disabled":`tf-cede4f`,tokenIconWrap:om,tokenChainDot:sm,"tf-fade-in":`tf-07c947`},lm=`.tf-2de115{border-radius:var(--tf-button-radius);background:linear-gradient(135deg, var(--tf-primary), color-mix(in srgb, var(--tf-primary) 80%, #000));width:100%;color:var(--tf-text-on-primary);font-weight:600;font-size:var(--tf-font-xl);cursor:pointer;box-shadow:0 4px 16px var(--tf-primary-glow);letter-spacing:-.01em;font-family:var(--tf-font-family);border:none;padding:14px 0;transition:transform .15s,opacity .15s,box-shadow .15s}.tf-2de115:hover{opacity:.95;box-shadow:0 6px 20px var(--tf-primary-glow);transform:translateY(-1px)}.tf-2de115:active{transform:translateY(0)}.tf-47dc2a{background:var(--tf-primary);cursor:wait;opacity:.85}.tf-44b8f1{border-radius:var(--tf-button-radius);border:1px solid var(--tf-primary);background:var(--tf-primary-light);width:100%;color:var(--tf-primary);font-weight:600;font-size:var(--tf-font-xl);cursor:pointer;font-family:var(--tf-font-family);padding:14px 0;transition:transform .15s,background .15s}.tf-44b8f1:hover{transform:translateY(-1px)}.tf-44b8f1:active{transform:translateY(0)}.tf-04fe16{border-radius:var(--tf-button-radius);border:1.5px dashed var(--tf-primary);background:var(--tf-primary-light);width:100%;color:var(--tf-primary);font-weight:600;font-size:var(--tf-font-xl);cursor:pointer;font-family:var(--tf-font-family);padding:14px 0;transition:transform .15s,background .15s;animation:2s ease-in-out infinite tf-d53743}.tf-04fe16:hover{background:var(--tf-primary-glow);transform:translateY(-1px)}.tf-04fe16:active{transform:translateY(0)}.tf-65cf23{border-radius:var(--tf-button-radius);text-align:center;background:var(--tf-success-bg);width:100%;color:var(--tf-success);font-weight:600;font-size:var(--tf-font-xl);border:none;justify-content:center;align-items:center;gap:8px;padding:14px 0;display:flex}.tf-2f0314{border-radius:var(--tf-button-radius);text-align:center;background:var(--tf-error-bg);width:100%;color:var(--tf-error);font-weight:600;font-size:var(--tf-font-xl);cursor:pointer;border:none;justify-content:center;align-items:center;gap:8px;padding:14px 0;display:flex}.tf-20b1ac{justify-content:center;align-items:center;gap:8px;display:flex}.tf-e6dae0{border:2px solid #ffffff4d;border-top-color:var(--tf-text-on-primary,#fff);border-radius:50%;width:16px;height:16px;animation:.8s linear infinite tf-8a3bc2;display:inline-block}.tf-90e712{width:14px;height:14px}@keyframes tf-8a3bc2{to{transform:rotate(360deg)}}`,um=`.tf-59b76a{font-size:var(--tf-font-amount);letter-spacing:-.02em;color:var(--tf-text);font-weight:700;line-height:100%;font-family:var(--tf-font-family);text-align:left;background:0 0;border:none;outline:none;width:100%;min-width:0}.tf-59b76a::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.tf-59b76a::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.tf-59b76a{-moz-appearance:textfield}.tf-59b76a::placeholder,.tf-a859d8{color:var(--tf-text-tertiary)}`,dm=`@keyframes tf-c1e2f1{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.97)}}@keyframes tf-c41d8a{0%{opacity:0;transform:scale(.97)}to{opacity:1;transform:scale(1)}}.tf-e6f4f9{position:relative}.tf-02c58b{z-index:1;pointer-events:none;width:100%;animation:.35s both tf-c1e2f1;position:absolute;top:0;left:0}.tf-8975d9{animation:.4s .1s both tf-c41d8a}`,fm=`@keyframes tf-d36961{to{transform:rotate(360deg)}}@keyframes tf-3cfd5b{0%{transform:scale(1)}50%{transform:scale(1.15)}to{transform:scale(1)}}.tf-5835df{box-sizing:border-box;width:100%;min-width:0;padding:24px 20px 16px;animation:.3s both tf-e061c9;overflow:hidden}.tf-9322ae{border-bottom:1px solid var(--tf-border-light);justify-content:center;align-items:center;gap:12px;margin-bottom:4px;padding-bottom:20px;display:flex}.tf-7d5519{flex:1;justify-content:flex-start;align-items:center;min-width:0;display:flex}.tf-0b8d30{justify-content:flex-end}.tf-bfbd0b{align-items:center;gap:8px;min-width:0;display:flex}.tf-7e8fdf{flex-shrink:0;width:32px;height:32px;position:relative}.tf-37f3cf{background:var(--tf-bg);border:1.5px solid var(--tf-bg);border-radius:50%;justify-content:center;align-items:center;width:16px;height:16px;display:flex;position:absolute;bottom:-2px;right:-2px}.tf-9401fd{flex-direction:column;min-width:0;display:flex;overflow:hidden}.tf-832fae{font-family:var(--tf-font-family-mono);font-weight:600;font-size:var(--tf-font-lg);color:var(--tf-text);white-space:nowrap;line-height:1.2}.tf-b557fc{font-size:var(--tf-font-sm);color:var(--tf-text-tertiary);font-weight:500;line-height:1.2}.tf-2b42d5{background:var(--tf-primary-light);border:1px solid color-mix(in srgb, var(--tf-primary) 30%, transparent);width:32px;height:32px;font-size:var(--tf-font-lg);color:var(--tf-primary);border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;font-weight:700;display:flex}.tf-5953e8{color:var(--tf-text-tertiary);flex-shrink:0}.tf-a168c7{text-align:center;font-size:var(--tf-font-sm);color:var(--tf-text-tertiary);justify-content:center;align-items:center;gap:6px;padding-bottom:16px;display:flex}.tf-062404{object-fit:contain;border-radius:4px;width:16px;height:16px}.tf-26af4c{flex-direction:column;display:flex}.tf-4b9be7{gap:12px;display:flex}.tf-036db2{width:28px;height:28px;font-size:var(--tf-font-base);z-index:1;border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;font-weight:600;display:flex}.tf-09b7bb{background:var(--tf-success-bg);color:var(--tf-success);animation:.4s tf-3cfd5b}.tf-aef7e0{background:var(--tf-primary-light)}.tf-5c628c{background:var(--tf-input-bg);color:var(--tf-text-tertiary);border:1px solid var(--tf-border-light)}.tf-a5abdf{background:var(--tf-error-bg);color:var(--tf-error)}.tf-9efe7c{border:2px solid var(--tf-primary-light);border-top-color:var(--tf-primary);border-radius:50%;width:14px;height:14px;animation:.8s linear infinite tf-d36961}.tf-5c7806{border-color:color-mix(in srgb, var(--tf-error) 20%, transparent);border-top-color:var(--tf-error)}.tf-185719{flex:1;min-width:0;padding-bottom:20px;position:relative}.tf-185719:before{content:"";background:var(--tf-border-light);width:2px;position:absolute;top:28px;bottom:0;left:-26px}.tf-4b9be7:last-child .tf-185719:before{display:none}.tf-4b9be7:last-child .tf-185719{padding-bottom:4px}.tf-84527b .tf-185719:before{background:var(--tf-success)}.tf-417d35 .tf-185719:before{background:var(--tf-error)}.tf-aad7e9{font-size:var(--tf-font-md);color:var(--tf-text);font-weight:600;line-height:28px}.tf-8de1c6 .tf-aad7e9{color:var(--tf-text-tertiary)}.tf-417d35 .tf-aad7e9{color:var(--tf-error)}.tf-bcb46a{font-size:var(--tf-font-sm);color:var(--tf-text-tertiary);word-break:break-word;overflow-wrap:break-word;flex-wrap:wrap;align-items:center;gap:6px;margin-top:2px;display:flex}.tf-16cfdc .tf-bcb46a{color:var(--tf-primary)}.tf-0aa291{font-size:var(--tf-font-sm);color:var(--tf-primary);align-items:center;gap:3px;text-decoration:none;transition:opacity .15s;display:inline-flex}.tf-0aa291:hover{opacity:.7}.tf-234e31{border-radius:var(--tf-radius);background:var(--tf-error-alpha,#ef44440f);border:1px solid var(--tf-error-bg);text-align:center;margin-top:20px;padding:16px}.tf-adb588{font-size:var(--tf-font-md);color:var(--tf-text-secondary);margin-bottom:12px;line-height:1.5}.tf-11fa21{font-size:var(--tf-font-base);color:var(--tf-primary);align-items:center;gap:4px;margin-bottom:12px;text-decoration:none;transition:opacity .15s;display:inline-flex}.tf-11fa21:hover{opacity:.7}.tf-4f7573{border-radius:var(--tf-radius);background:linear-gradient(135deg, var(--tf-success), color-mix(in srgb, var(--tf-success) 80%, #000));width:100%;color:var(--tf-text-on-primary);font-size:var(--tf-font-lg);cursor:pointer;border:none;padding:12px;font-weight:600;transition:opacity .2s,transform .15s}.tf-4f7573:hover{opacity:.9;transform:translateY(-1px)}.tf-4f7573:active{transform:scale(.98)}.tf-c918a2{text-align:center;margin-top:16px}.tf-ad7aab{visibility:hidden;pointer-events:none}.tf-603d2e{font-size:var(--tf-font-sm);color:var(--tf-text-tertiary);margin-bottom:8px}.tf-1e22cb{border-radius:var(--tf-radius);background:var(--tf-bg-secondary);width:100%;color:var(--tf-text);font-size:var(--tf-font-lg);cursor:pointer;border:1px solid var(--tf-border);padding:12px;font-weight:600;transition:opacity .2s,transform .15s}.tf-1e22cb:hover{opacity:.85;transform:translateY(-1px)}.tf-1e22cb:active{transform:scale(.98)}`,pm=`.tf-216412{align-items:center;gap:4px;display:inline-flex}.tf-40ee76{cursor:pointer;border-radius:4px;margin:-2px -4px;padding:2px 4px;transition:background .15s}.tf-40ee76:hover{background:var(--tf-surface-hover)}.tf-52dc68{flex-shrink:0}.tf-25c5c8{animation:.8s linear infinite tf-27c522}@keyframes tf-27c522{to{transform:rotate(360deg)}}.tf-fd32be{font-size:var(--tf-font-sm);color:var(--tf-text-secondary);min-width:20px}`,mm=`.tf-1019c2{background:var(--tf-bg-secondary);border-radius:var(--tf-radius-lg);border:1px solid var(--tf-border-light);min-height:80px;font-size:var(--tf-font-base);color:var(--tf-text-secondary);box-sizing:border-box;flex-direction:column;margin:12px 20px 0;padding:14px;animation:.25s both tf-42889f;display:flex}.tf-4922f1{flex:1;justify-content:space-between;align-items:center;display:flex}.tf-57f45f{font-family:var(--tf-font-family-mono);font-size:var(--tf-font-sm)}.tf-a57ec8{box-sizing:border-box;height:80px}.tf-d74ccc{flex:1;justify-content:space-between;align-items:center;display:flex}.tf-92e7a8{width:68px;height:14px}.tf-d20f50{width:56px}.tf-a9a96f{width:150px;height:14px}.tf-0134eb{width:126px}.tf-91635c{width:80px}.tf-ca1291{cursor:pointer;border-bottom:1px solid var(--tf-border-light);margin-bottom:10px;transition:opacity .15s}.tf-ca1291:hover{opacity:.7}.tf-ca1291 .tf-57f45f{align-items:center;gap:4px;display:inline-flex}.tf-ca1291 .tf-57f45f svg{opacity:.35;flex-shrink:0;transition:opacity .15s}.tf-ca1291:hover .tf-57f45f svg{opacity:.7}.tf-a249b3 .tf-recipient-placeholder{color:var(--tf-error)}.tf-adeddd{border:1px dashed var(--tf-primary);border-radius:var(--tf-radius);margin-bottom:10px;padding:8px 12px;animation:2s ease-in-out infinite tf-d990e5}.tf-adeddd .tf-recipient-placeholder{color:var(--tf-primary);font-style:normal}`,hm=`.tf-636daf{background:var(--tf-bg);border-radius:var(--tf-radius-xl) var(--tf-radius-xl) 0 0;flex-direction:column;width:100%;height:300px;animation:.3s cubic-bezier(.32,.72,0,1) both tf-6933ac;display:flex;overflow:hidden;box-shadow:0 -4px 24px #00000026}@keyframes tf-6933ac{0%{transform:translateY(100%)}to{transform:translateY(0)}}.tf-fddfab{border-bottom:1px solid var(--tf-border-light);justify-content:space-between;align-items:center;padding:16px 20px;display:flex}.tf-970eb9{font-size:var(--tf-font-2xl);color:var(--tf-text);font-weight:600}.tf-de123a{cursor:pointer;color:var(--tf-text-secondary);border-radius:var(--tf-radius-xs);background:0 0;border:none;justify-content:center;align-items:center;padding:4px;transition:background .15s;display:flex}.tf-de123a:hover{background:var(--tf-bg-elevated)}.tf-0445e3{flex-direction:column;flex:1;gap:8px;padding:16px 20px;display:flex}.tf-9a65ec{background:var(--tf-input-bg);border:1px solid var(--tf-border-light);border-radius:var(--tf-radius);width:100%;min-height:80px;font-size:var(--tf-font-lg);font-family:var(--tf-font-family-mono);color:var(--tf-text);resize:none;box-sizing:border-box;outline:none;padding:12px 14px;transition:border-color .2s,box-shadow .2s}.tf-9a65ec::placeholder{color:var(--tf-text-tertiary)}.tf-9a65ec:focus{border-color:var(--tf-primary);box-shadow:0 0 0 3px var(--tf-primary-alpha)}.tf-c5ea21{border-color:var(--tf-error)}.tf-c5ea21:focus{border-color:var(--tf-error);box-shadow:0 0 0 3px var(--tf-error-alpha)}.tf-9d4bba{font-size:var(--tf-font-base);color:var(--tf-error);padding:0 2px}.tf-cb9b60{padding:16px 20px 20px}.tf-2cba65{width:100%}.tf-2cba65:disabled{opacity:.5;cursor:not-allowed}`,gm=`@keyframes tf-6887ec{0%{opacity:.6}to{opacity:1}}.tf-ba406b{align-items:baseline;transition:opacity .15s;display:inline-flex}.tf-9d81a4{opacity:.85;font-size:.7em;line-height:1}.tf-7977ef{cursor:help}`,_m=`@keyframes tf-07c947{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.tf-dc5721{box-sizing:border-box;justify-content:space-between;align-items:center;height:65px;padding:0 20px;display:flex}.tf-68123c{align-items:center;gap:7px;display:flex}.tf-43dda9{visibility:hidden}.tf-532d07{object-fit:contain;flex-shrink:0;width:22px;height:22px}.tf-b7936a{font-size:var(--tf-font-xl);letter-spacing:-.01em;font-weight:600}.tf-883305{color:var(--tf-primary)}.tf-bc1b05{font-size:var(--tf-font-sm);align-items:center;gap:5px;padding:12px 20px 0;display:flex}.tf-bc1b05+.tf-98d625{padding-top:10px}.tf-dd09ea{cursor:pointer;font-family:var(--tf-font-family);font-size:var(--tf-font-sm);color:var(--tf-primary);background:0 0;border:none;padding:0;font-weight:500;transition:opacity .15s}.tf-dd09ea:hover{opacity:.8}.tf-018710{color:var(--tf-text-tertiary);font-weight:400}.tf-21456c{color:var(--tf-text-secondary);font-weight:500}.tf-6da3db{cursor:pointer;border-radius:var(--tf-radius-sm);background:0 0;border:none;align-items:center;gap:6px;padding:4px 8px;font-family:inherit;transition:background .15s;display:flex}.tf-6da3db:hover{background:var(--tf-surface-hover)}.tf-6da3db:focus-visible{outline:2px solid var(--tf-primary);outline-offset:2px}.tf-d25568{background:var(--tf-primary);width:8px;height:8px;box-shadow:0 0 8px var(--tf-primary-glow);border-radius:50%}.tf-16ce7d{background:var(--tf-success);box-shadow:0 0 8px var(--tf-success)}.tf-11bb1d{font-size:var(--tf-font-base);color:var(--tf-text-secondary);font-family:var(--tf-font-family-mono)}.tf-98d625,.tf-8b7743{padding:0 20px}.tf-fdf8be{margin-top:6px}.tf-677ece{background:var(--tf-input-bg);border-radius:var(--tf-radius-lg);border:1px solid var(--tf-border-light);padding:14px 16px;transition:border-color .2s,background .25s,box-shadow .2s}.tf-635915{justify-content:space-between;align-items:center;margin-bottom:8px;display:flex}.tf-b8a04a{align-items:center;gap:8px;display:inline-flex}.tf-0d1ef8{font-size:var(--tf-font-base);color:var(--tf-text-tertiary);text-align:left;font-weight:500}.tf-d04a4e{font-size:var(--tf-font-sm);color:var(--tf-text-tertiary);font-family:var(--tf-font-family-mono)}.tf-d7140f{justify-content:space-between;align-items:center;display:flex}.tf-dcd620{background:var(--tf-surface);border-radius:var(--tf-radius-sm);box-sizing:border-box;border:1px solid var(--tf-border);cursor:pointer;height:36px;font-family:var(--tf-font-family);flex-shrink:0;align-items:center;gap:8px;padding:6px 12px 6px 8px;transition:background .15s,border-color .15s,transform .1s;display:flex}.tf-dcd620:hover{background:var(--tf-surface-hover);transform:scale(1.02)}.tf-6859a9{cursor:default;pointer-events:none}.tf-6859a9:hover{background:var(--tf-surface);transform:none}.tf-e25a5c{padding:0 12px}.tf-038cf1{font-size:var(--tf-font-lg);color:var(--tf-text);font-weight:600}.tf-33c9cb{font-size:var(--tf-font-md);color:var(--tf-primary);font-weight:600}.tf-b1e4a6{font-size:var(--tf-font-xs);color:var(--tf-text-tertiary);align-items:center;display:inline-flex}.tf-d168ae{min-height:16px;font-size:var(--tf-font-base);justify-content:space-between;align-items:center;margin-top:6px;line-height:100%;display:flex}.tf-b2b098{justify-content:space-between;align-items:center;height:16px;margin-top:6px;display:flex}.tf-92acfd{min-height:16px;font-size:var(--tf-font-base);color:var(--tf-text-tertiary);line-height:100%;display:inline-block}.tf-bd2f5c{visibility:hidden}.tf-5f8805{font-size:var(--tf-font-sm);color:var(--tf-primary);background:var(--tf-primary-light);border-radius:var(--tf-radius-xs);cursor:pointer;font-weight:600;font-family:var(--tf-font-family);border:none;padding:2px 8px}.tf-5f8805:hover{opacity:.8}.tf-af41ab{z-index:2;justify-content:center;margin:-6px 0;display:flex;position:relative}.tf-18c3f4{-webkit-appearance:none;appearance:none;border-radius:var(--tf-radius-sm);background:var(--tf-surface);border:3px solid var(--tf-bg);cursor:pointer;width:36px;height:36px;font-size:var(--tf-font-lg);color:var(--tf-text-secondary);justify-content:center;align-items:center;padding:0;transition:transform .2s,background .15s,color .15s,border-color .15s;display:flex;box-shadow:0 2px 8px #0000000f}.tf-18c3f4:hover{color:var(--tf-primary);background:color-mix(in srgb, var(--tf-primary) 12%, var(--tf-surface));border-color:var(--tf-primary);transform:scale(1.1)}.tf-18c3f4:active{transform:scale(.95)rotate(180deg)}.tf-194ce7{cursor:default;color:var(--tf-text-tertiary)}.tf-194ce7:hover{color:var(--tf-text-tertiary);background:var(--tf-surface);border-color:var(--tf-bg);transform:none}.tf-194ce7:active{transform:none}.tf-85dacd{background:var(--tf-input-bg);border-radius:var(--tf-radius-lg);border:1px solid var(--tf-border-light);transition:border-color .2s,background .25s,box-shadow .2s}.tf-8a93b8{padding:14px 16px}.tf-ae3eb4{background:var(--tf-border-light);height:1px;margin:0 16px;position:relative}.tf-93effc{-webkit-appearance:none;appearance:none;background:var(--tf-input-bg);border:1px solid var(--tf-border-light);cursor:pointer;width:28px;height:28px;color:var(--tf-text-secondary);z-index:1;border-radius:50%;justify-content:center;align-items:center;padding:0;font-family:inherit;transition:transform .2s,background .15s,color .15s,border-color .15s;display:flex;position:absolute;top:50%;left:50%;transform:translate(-50%)translateY(-50%)}.tf-93effc:hover{color:var(--tf-primary);border-color:var(--tf-primary);transform:translate(-50%)translateY(-50%)scale(1.1)}.tf-93effc:active{transform:translate(-50%)translateY(-50%)scale(.95)rotate(180deg)}.tf-cede4f{cursor:default;color:var(--tf-text-tertiary)}.tf-cede4f:hover{color:var(--tf-text-tertiary);border-color:var(--tf-border-light);transform:translate(-50%)translateY(-50%)}.tf-cede4f:active{transform:translate(-50%)translateY(-50%)}.tf-a04b23{flex-shrink:0;position:relative}.tf-57762e{position:absolute;bottom:-2px;right:-2px}`,vm=`.tf-9b9575{border-radius:var(--tf-radius-xl);z-index:10;background:#00000059;align-items:flex-end;animation:.2s both tf-9e8870;display:flex;position:absolute;top:0;bottom:0;left:0;right:0;overflow:hidden}@keyframes tf-9e8870{0%{opacity:0}to{opacity:1}}@keyframes tf-c66348{0%{transform:translateY(100%)}to{transform:translateY(0)}}.tf-140273{border-radius:var(--tf-radius-xl) var(--tf-radius-xl) 0 0;background:var(--tf-bg);width:100%;font-family:var(--tf-font-family);color:var(--tf-text);flex-direction:column;height:calc(100% - 45px);animation:.3s cubic-bezier(.32,.72,0,1) both tf-c66348;display:flex;overflow:hidden;box-shadow:0 -4px 24px #00000026}.tf-fce59b{box-shadow:none}.tf-45030f{flex-shrink:0;padding:18px 20px 0}.tf-ce0622{justify-content:space-between;align-items:center;margin-bottom:14px;display:flex}.tf-0c1692{font-size:var(--tf-font-xl);font-weight:600}.tf-64aa3f{border-radius:var(--tf-radius-sm);cursor:pointer;width:28px;height:28px;color:var(--tf-text-tertiary);font-size:var(--tf-font-2xl);background:var(--tf-input-bg);font-weight:300;font-family:var(--tf-font-family);border:none;justify-content:center;align-items:center;display:flex}.tf-9819ca{background:var(--tf-input-bg);border-radius:var(--tf-radius);border:1px solid var(--tf-border-light);align-items:center;gap:10px;padding:10px 14px;transition:border-color .15s;display:flex}.tf-9819ca.tf-d9fcd6{border-color:var(--tf-primary)}.tf-4ad0e7{color:var(--tf-text-tertiary);font-size:var(--tf-font-lg);flex-shrink:0}.tf-9ea859{font-size:var(--tf-font-lg);color:var(--tf-text);font-family:var(--tf-font-family);background:0 0;border:none;outline:none;flex:1;transition:border-color .15s}.tf-9ea859:focus{outline:none}.tf-9ea859::placeholder{color:var(--tf-text-tertiary)}.tf-25e112{gap:4px;margin-top:12px;padding-bottom:14px;display:flex;overflow-x:auto}.tf-478cb9{border-radius:var(--tf-radius-sm);font-size:var(--tf-font-sm);cursor:pointer;white-space:nowrap;font-weight:500;font-family:var(--tf-font-family);background:var(--tf-input-bg);color:var(--tf-text-secondary);border:none;align-items:center;gap:5px;padding:4px 10px;display:flex}.tf-478cb9.tf-125be5{background:var(--tf-primary-light);color:var(--tf-primary);outline:1px solid var(--tf-primary);outline-offset:-1px}.tf-bb4fb1{border-radius:var(--tf-radius-sm);flex-shrink:0;height:24px}.tf-ad5703{background:var(--tf-border);flex-shrink:0;height:1px;margin:0 20px}.tf-de9986{flex:1;min-height:0;padding:6px 8px 16px;overflow-y:auto}.tf-7ac0fe{flex-direction:column;display:flex}.tf-c6ef08{border-radius:var(--tf-radius);justify-content:space-between;align-items:center;padding:10px 12px;display:flex}.tf-3643cf{align-items:center;gap:12px;display:flex}.tf-9b3d59{border-radius:50%;width:36px;height:36px}.tf-a4cc17{flex-direction:column;gap:6px;display:flex}.tf-7f1baf{flex-direction:column;align-items:flex-end;gap:6px;display:flex}.tf-9171a2{height:10px}.tf-9171a2.tf-71ea5d{width:88px}.tf-9171a2.tf-dfb33a{width:64px}.tf-9171a2.tf-43fbf4{width:56px}.tf-9171a2.tf-61ca3c{width:44px}.tf-512365{border-radius:var(--tf-radius);cursor:pointer;width:100%;font-family:var(--tf-font-family);background:0 0;border:none;justify-content:space-between;align-items:center;padding:10px 12px;transition:background .1s;display:flex}.tf-512365:hover{background:var(--tf-surface-hover)}.tf-512365:active{transform:scale(.98)}.tf-512365.tf-9f601f{background:var(--tf-primary-light)}.tf-a0b0d9{align-items:center;gap:12px;display:flex}.tf-1e7a62{position:relative}.tf-67f18a{background:var(--tf-surface);border:1px solid var(--tf-border);border-radius:50%;justify-content:center;align-items:center;width:13px;height:13px;display:flex;position:absolute;bottom:-1px;right:-1px}.tf-cd76b9{text-align:left;flex-direction:column;align-items:flex-start;display:flex}.tf-189814{align-items:center;gap:5px;display:flex}.tf-8f4efd{font-size:var(--tf-font-lg);color:var(--tf-text);font-weight:600;line-height:20px}.tf-6d4840{font-size:var(--tf-font-2xs);background:var(--tf-success-bg);color:var(--tf-success);letter-spacing:.03em;border-radius:3px;padding:1px 4px;font-weight:700}.tf-51bf2b{font-size:var(--tf-font-sm);color:var(--tf-text-tertiary);line-height:16px}.tf-87740a{text-align:right}.tf-43fbf4{color:var(--tf-text);font-size:var(--tf-font-md);font-weight:500;font-family:var(--tf-font-family-mono)}.tf-43fbf4.tf-2ee375{color:var(--tf-text-tertiary)}.tf-61ca3c{font-size:var(--tf-font-sm);color:var(--tf-text-tertiary);font-family:var(--tf-font-family-mono)}.tf-0afeec{flex-direction:column;justify-content:center;align-items:center;gap:12px;min-height:200px;padding:40px 32px;display:flex}.tf-ea8b28{background:var(--tf-primary-light);width:64px;height:64px;color:var(--tf-text-tertiary);border-radius:50%;justify-content:center;align-items:center;margin-bottom:4px;display:flex}.tf-74f38a{font-size:var(--tf-font-lg);color:var(--tf-text);font-weight:600}.tf-d9b5e6{font-size:var(--tf-font-sm);color:var(--tf-text-tertiary);text-align:center;max-width:280px;line-height:1.5}.tf-635e96{background:var(--tf-primary-light);color:var(--tf-primary);font-size:var(--tf-font-sm);font-weight:600;font-family:var(--tf-font-family);cursor:pointer;border:none;border-radius:10px;align-items:center;gap:6px;margin-top:4px;padding:10px 20px;transition:background .15s;display:flex}.tf-635e96:hover{background:var(--tf-primary-alpha)}`,ym=`@keyframes tf-36c468{0%{opacity:0;transform:scale(.3)}to{opacity:1;transform:scale(1)}}@keyframes tf-dc4326{0%{stroke-dashoffset:24px}to{stroke-dashoffset:0}}@keyframes tf-13e6cd{0%{opacity:.5;transform:scale(1)}to{opacity:0;transform:scale(1.6)}}@keyframes tf-2b6de5{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}@keyframes tf-5b8ef8{0%{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}.tf-e98a9a{box-sizing:border-box;flex-direction:column;flex:1;align-items:center;width:100%;min-width:0;padding:28px 20px 24px;display:flex}.tf-1f9019{background:linear-gradient(145deg, var(--tf-success), color-mix(in srgb, var(--tf-success) 80%, white));width:64px;height:64px;box-shadow:0 2px 8px color-mix(in srgb, var(--tf-success) 30%, transparent), 0 8px 32px color-mix(in srgb, var(--tf-success) 20%, transparent);border-radius:50%;justify-content:center;align-items:center;margin-bottom:16px;padding:2px;animation:.5s cubic-bezier(.34,1.56,.64,1) both tf-36c468;display:flex;position:relative}.tf-1f9019:before{content:"";border:2px solid var(--tf-success);pointer-events:none;border-radius:50%;animation:3s ease-out infinite tf-13e6cd;position:absolute;top:-2px;bottom:-2px;left:-2px;right:-2px}.tf-fd4d56{background:var(--tf-bg);border-radius:50%;justify-content:center;align-items:center;width:100%;height:100%;display:flex}.tf-d3c8df{color:var(--tf-success);display:flex}.tf-d3c8df svg{stroke-dasharray:24;stroke-dashoffset:24px;animation:.4s .35s forwards tf-dc4326}.tf-9e3a66{font-size:var(--tf-font-heading);color:var(--tf-text);letter-spacing:-.01em;margin-bottom:4px;font-weight:700}.tf-db06d4{font-size:var(--tf-font-md);color:var(--tf-text-secondary);margin-bottom:20px}.tf-c9a5e1{border-radius:var(--tf-radius-lg);background:linear-gradient(135deg, color-mix(in srgb, var(--tf-success) 8%, transparent), color-mix(in srgb, var(--tf-success) 4%, transparent));border:1px solid color-mix(in srgb, var(--tf-success) 15%, transparent);flex-direction:column;align-items:center;gap:6px;width:100%;margin-bottom:16px;padding:20px;animation:.4s .2s both tf-2b6de5;display:flex;position:relative;overflow:hidden}.tf-c9a5e1:after{content:"";background:radial-gradient(ellipse at center, color-mix(in srgb, var(--tf-success) 12%, transparent), transparent 70%);pointer-events:none;width:60%;height:40px;position:absolute;bottom:-20px;left:50%;transform:translate(-50%)}.tf-7b3b5b{width:40px;height:40px;margin-bottom:4px;animation:.3s .1s both tf-5b8ef8;position:relative}.tf-651299{background:var(--tf-bg);border:1.5px solid color-mix(in srgb, var(--tf-success) 15%, transparent);border-radius:50%;justify-content:center;align-items:center;width:16px;height:16px;display:flex;position:absolute;bottom:-2px;right:-2px}.tf-f52291{font-size:var(--tf-font-amount-lg);color:var(--tf-text);font-weight:700;font-family:var(--tf-font-family-mono);letter-spacing:-.02em;flex-wrap:wrap;justify-content:center;align-items:baseline;gap:8px;animation:.3s .2s both tf-5b8ef8;display:flex}.tf-8cfc86{font-size:var(--tf-font-lg);color:var(--tf-text-secondary);font-weight:500;animation:.3s .25s both tf-5b8ef8}.tf-5f768d{font-size:var(--tf-font-sm);font-weight:500;font-family:var(--tf-font-family);color:var(--tf-text-tertiary);letter-spacing:0;animation:.3s .3s both tf-5b8ef8}.tf-75f592{width:100%;margin-bottom:16px}.tf-73910d{background:var(--tf-input-bg);border:1px solid var(--tf-border-light);border-radius:var(--tf-radius-sm);cursor:pointer;width:100%;font-size:var(--tf-font-base);color:var(--tf-text-secondary);font-weight:500;font-family:var(--tf-font-family);justify-content:space-between;align-items:center;padding:10px 14px;transition:background .15s;display:flex}.tf-73910d:hover{background:var(--tf-bg-secondary)}.tf-ae94a0{border-radius:var(--tf-radius-sm) var(--tf-radius-sm) 0 0}.tf-1afb0a{color:var(--tf-text-tertiary);justify-content:center;align-items:center;transition:transform .2s;display:flex}.tf-7737cf{transform:rotate(180deg)}.tf-92a530{border:1px solid var(--tf-border-light);border-radius:0 0 var(--tf-radius-sm) var(--tf-radius-sm);background:var(--tf-input-bg);border-top:none;padding:8px 14px 12px;animation:.15s both tf-5b8ef8}.tf-6e8c3e{font-size:var(--tf-font-sm);justify-content:space-between;align-items:center;padding:5px 0;display:flex}.tf-4b5396{color:var(--tf-text-tertiary);font-weight:500}.tf-63cca1{color:var(--tf-text-secondary);font-family:var(--tf-font-family-mono);font-size:var(--tf-font-sm);align-items:center;gap:4px;display:flex}.tf-18c122{color:var(--tf-primary);font-size:var(--tf-font-sm);font-family:var(--tf-font-family-mono);align-items:center;gap:3px;text-decoration:none;transition:opacity .15s;display:inline-flex}.tf-18c122:hover{opacity:.7}.tf-d7e813{border-radius:var(--tf-radius-lg);background:var(--tf-primary);width:100%;color:var(--tf-text-on-primary);font-weight:600;font-size:var(--tf-font-xl);cursor:pointer;font-family:var(--tf-font-family);box-shadow:0 4px 16px color-mix(in srgb, var(--tf-primary) 25%, transparent);border:none;margin-top:auto;padding:14px 0;transition:transform .15s,opacity .15s}.tf-d7e813:hover{opacity:.95;transform:translateY(-1px)}.tf-d7e813:active{transform:translateY(0)}`,bm=`.tf-c63ac0{color:var(--tf-text-on-primary);font-weight:700;font-family:var(--tf-font-family);border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;display:flex;overflow:hidden}.tf-59aca7{object-fit:cover;border-radius:50%;width:100%;height:100%}.tf-dbfbb3{border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;display:flex;overflow:hidden}.tf-f89395{object-fit:cover;border-radius:50%;width:100%;height:100%;display:block}.tf-cdfe94{justify-content:center;align-items:center;gap:6px;margin:8px 20px 0;padding:12px 0 14px;text-decoration:none;display:flex}.tf-7c0c36{font-size:var(--tf-font-sm);color:var(--tf-text-tertiary)}.tf-26d5ea{font-size:var(--tf-font-base);line-height:1}.tf-8b1e15{font-size:var(--tf-font-sm);letter-spacing:.02em;color:var(--tf-text-secondary);font-weight:600}.tf-3852e5,.tf-b35860{color:var(--tf-primary)}`,xm=`@keyframes tf-80a677{to{transform:rotate(360deg)}}@keyframes tf-d97ff2{0%,to{opacity:1}50%{opacity:.4}}@keyframes tf-c3558b{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@keyframes tf-89a83e{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(6px)}}@keyframes tf-ca9155{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}@keyframes tf-d2dbc4{0%{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}@keyframes tf-83b1f2{0%{opacity:.5;transform:scale(.98)}to{opacity:1;transform:scale(1)}}@keyframes tf-54b7e7{0%,to{border-color:var(--tf-primary)}50%{border-color:var(--tf-primary-light)}}@keyframes tf-194f18{to{transform:rotate(360deg)}}@keyframes tf-cdef4a{0%{opacity:0;transform:scale(.3)}50%{transform:scale(1.05)}70%{transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes tf-fd8795{0%{transform:translateY(0)rotate(0)}to{transform:translateY(-4px)rotate(8deg)}}@media (prefers-reduced-motion:reduce){*,:before,:after{transition-duration:.01ms!important;animation-duration:.01ms!important}}*,:before,:after{box-sizing:border-box;margin:0;padding:0}:host{color:var(--tf-text);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--tf-font-family:"DM Sans", sans-serif;--tf-font-family-mono:"JetBrains Mono", monospace;font-family:var(--tf-font-family);--tf-font-2xs:10px;--tf-font-xs:11px;--tf-font-sm:12px;--tf-font-base:13px;--tf-font-md:14px;--tf-font-lg:15px;--tf-font-xl:16px;--tf-font-2xl:17px;--tf-font-heading:20px;--tf-font-amount:28px;--tf-font-amount-lg:24px;--tf-font-amount-sm:22px;display:block}button:focus-visible{outline:2px solid var(--tf-primary);outline-offset:2px;border-radius:4px}a:focus-visible{outline:2px solid var(--tf-primary);outline-offset:2px;border-radius:4px}`,Sm=`@keyframes tf-90e981{0%,to{opacity:1}50%{opacity:.4}}.tf-1ac2ef{border-radius:var(--tf-radius-xs);background:var(--tf-skeleton);animation:1.5s ease-in-out infinite tf-90e981}.tf-68a980{border-radius:var(--tf-radius-xl);z-index:10;background:#0009;align-items:flex-end;animation:.2s both tf-ed0355;display:flex;position:absolute;top:0;bottom:0;left:0;right:0;overflow:hidden}.tf-e7b9c7{width:100%;min-height:500px;max-width:var(--tf-widget-max-width,400px);border-radius:var(--tf-radius-xl);background:var(--tf-bg);border:1px solid var(--tf-border);min-width:360px;box-shadow:var(--tf-shadow-lg);font-family:var(--tf-font-family);color:var(--tf-text);flex-direction:column;transition:background .25s,border-color .25s,box-shadow .25s;display:flex;position:relative;overflow:hidden}.tf-b4f391{background:0 0}.tf-118b57{box-shadow:none;border:none}.tf-118b57 .tf-07225e{display:none}.tf-07225e{background:linear-gradient(90deg, transparent, var(--tf-primary), transparent);opacity:.6;height:2px}.tf-d01dff{padding:12px 20px 0;animation:.3s .1s both tf-ed0355}.tf-5bb68c{padding:12px 20px 0}.tf-04e1e2{background:var(--tf-bg-secondary);border-radius:var(--tf-radius-lg);border:1px solid var(--tf-border-light);box-sizing:border-box;flex-direction:column;justify-content:center;align-items:center;gap:8px;min-height:120px;margin:12px 20px 0;padding:14px;animation:.25s both tf-b61e63;display:flex}.tf-d01908{color:var(--tf-text-tertiary);opacity:.4}.tf-1cc72b{font-size:var(--tf-font-base);color:var(--tf-text-secondary)}.tf-480f1a{text-align:center;padding:0 20px 16px}.tf-480f1a a{font-size:var(--tf-font-base);color:var(--tf-primary);font-family:var(--tf-font-family-mono);text-decoration:none}.tf-bc7950{text-align:center;margin-top:8px;margin-bottom:10px}.tf-bc7950 a{font-size:var(--tf-font-sm);color:var(--tf-primary);font-family:var(--tf-font-family-mono);text-decoration:none}.tf-d9b7b4{background:var(--tf-surface);border:1px solid var(--tf-border);border-radius:var(--tf-radius-xs);cursor:pointer;font-size:var(--tf-font-sm);font-family:var(--tf-font-family-mono);color:var(--tf-text-secondary);align-items:center;gap:4px;padding:2px 8px;transition:background .15s,border-color .15s;display:inline-flex}.tf-d9b7b4:hover{background:var(--tf-surface-hover)}.tf-d9b7b4 svg{opacity:.4;transition:opacity .15s}.tf-d9b7b4:hover svg{opacity:.7}.tf-9398ea{border-style:dashed;border-color:var(--tf-primary)}.tf-9398ea .tf-2d9323{color:var(--tf-primary);font-style:italic;font-family:var(--tf-font-family)}.tf-4567e1{cursor:default;opacity:.8}.tf-4567e1:hover{background:var(--tf-surface)}.tf-58881e{color:var(--tf-text-tertiary);font-style:italic}.tf-c7b4d2{justify-content:center;align-items:center;display:flex}.tf-771a48{flex-direction:column;display:flex}.tf-e2b7ba{align-items:center;display:flex}.tf-6f7fab{justify-content:space-between;align-items:center;display:flex}.tf-b15cde{animation:.2s both tf-ed0355}.tf-52678c{flex-direction:column;justify-content:center;align-items:center;gap:10px;display:flex}.tf-25f74d{background:linear-gradient(180deg, color-mix(in srgb, var(--tf-primary) 12%, transparent) 0%, color-mix(in srgb, var(--tf-primary) 3%, transparent) 100%);width:40px;height:40px;color:var(--tf-primary);border-radius:50%;justify-content:center;align-items:center;display:flex}.tf-b385cd{color:var(--tf-text-secondary);font-size:13px;font-weight:600}.tf-dc46f6{color:var(--tf-text-tertiary);font-size:11px}.tf-58158c{background:color-mix(in srgb, var(--tf-surface) 60%, var(--tf-bg));border-radius:var(--tf-radius-sm);gap:2px;padding:3px;display:flex}.tf-6f8fbb{border-radius:var(--tf-radius-sm);color:color-mix(in srgb, var(--tf-text-tertiary) 65%, transparent);font-size:var(--tf-font-sm);cursor:pointer;font-weight:500;font-family:var(--tf-font-family);background:0 0;border:none;padding:5px 14px;transition:background .15s,color .15s,box-shadow .15s}.tf-6f8fbb:hover{color:var(--tf-text-secondary)}.tf-2a2ad5{background:var(--tf-surface);color:var(--tf-text);font-weight:600;box-shadow:0 1px 3px #00000026}`;function Cm(e){if(e!=null){if(typeof e==`boolean`)return e;if(typeof e==`string`){let t=e.trim().toLowerCase();if(t===``||t===`true`||t===`1`||t===`yes`)return!0;if(t===`false`||t===`0`||t===`no`)return!1}}}var[wm,Tm]=L(),[Em,Dm]=L(),[Om,km]=L(),[Am,jm]=L(),[Mm,Nm]=L(),[Pm,Fm]=L();function Im(e){`walletAdapter`in e&&Tm(()=>e.walletAdapter),`callbacks`in e&&Dm(()=>e.callbacks),`customColors`in e&&km(()=>e.customColors),`apiEndpoint`in e&&jm(e.apiEndpoint),`theme`in e&&Nm(e.theme),`locale`in e&&Fm(e.locale)}function Lm(e){return Object.keys(e).reduce((t,n)=>{let r=e[n];return t[n]=Object.assign({},r),Wm(r.value)&&!Gm(r.value)&&!Array.isArray(r.value)&&(t[n].value=Object.assign({},r.value)),Array.isArray(r.value)&&(t[n].value=r.value.slice(0)),t},{})}function Rm(e){return e?Object.keys(e).reduce((t,n)=>{let r=e[n];return t[n]=Wm(r)&&`value`in r?r:{value:r},t[n].attribute||(t[n].attribute=Um(n)),t[n].parse=`parse`in t[n]?t[n].parse:typeof t[n].value!=`string`,t},{}):{}}function zm(e){return Object.keys(e).reduce((t,n)=>(t[n]=e[n].value,t),{})}function Bm(e,t){let n=Lm(t);return Object.keys(t).forEach(t=>{let r=n[t],i=e.getAttribute(r.attribute),a=e[t];i!=null&&(r.value=r.parse?Vm(i):i),a!=null&&(r.value=Array.isArray(a)?a.slice(0):a),r.reflect&&Hm(e,r.attribute,r.value,!!r.parse),Object.defineProperty(e,t,{get(){return r.value},set(e){let n=r.value;r.value=e,r.reflect&&Hm(this,r.attribute,r.value,!!r.parse);for(let r=0,i=this.__propertyChangedCallbacks.length;r<i;r++)this.__propertyChangedCallbacks[r](t,e,n)},enumerable:!0,configurable:!0})}),n}function Vm(e){if(e)try{return JSON.parse(e)}catch{return e}}function Hm(e,t,n,r){if(n==null||n===!1)return e.removeAttribute(t);let i=r?JSON.stringify(n):n;e.__updating[t]=!0,i===`true`&&(i=``),e.setAttribute(t,i),Promise.resolve().then(()=>delete e.__updating[t])}function Um(e){return e.replace(/\.?([A-Z]+)/g,(e,t)=>`-`+t.toLowerCase()).replace(`_`,`-`).replace(/^-/,``)}function Wm(e){return e!=null&&(typeof e==`object`||typeof e==`function`)}function Gm(e){return Object.prototype.toString.call(e)===`[object Function]`}function Km(e){return typeof e==`function`&&e.toString().indexOf(`class`)===0}var qm;function Jm(e,t){let n=Object.keys(t);return class extends e{static get observedAttributes(){return n.map(e=>t[e].attribute)}constructor(){super(),this.__initialized=!1,this.__released=!1,this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props={};for(let e of n)this[e]=void 0}connectedCallback(){if(this.__initialized)return;this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props=Bm(this,t);let e=zm(this.props),n=this.Component,r=qm;try{qm=this,this.__initialized=!0,Km(n)?new n(e,{element:this}):n(e,{element:this})}finally{qm=r}}async disconnectedCallback(){if(await Promise.resolve(),this.isConnected)return;this.__propertyChangedCallbacks.length=0;let e=null;for(;e=this.__releaseCallbacks.pop();)e(this);delete this.__initialized,this.__released=!0}attributeChangedCallback(e,n,r){if(this.__initialized&&!this.__updating[e]&&(e=this.lookupProp(e),e in t)){if(r==null&&!this[e])return;this[e]=t[e].parse?Vm(r):r}}lookupProp(e){if(t)return n.find(n=>e===n||e===t[n].attribute)}get renderRoot(){return this.shadowRoot||this.attachShadow({mode:`open`})}addReleaseCallback(e){this.__releaseCallbacks.push(e)}addPropertyChangedCallback(e){this.__propertyChangedCallbacks.push(e)}}}function Ym(e,t={},n={}){let{BaseElement:r=HTMLElement,extension:i,customElements:a=window.customElements}=n;return n=>{if(!e)throw Error(`tag is required to register a Component`);let o=a.get(e);return o?(o.prototype.Component=n,o):(o=Jm(r,Rm(t)),o.prototype.Component=n,o.prototype.registeredTag=e,a.define(e,o,i),o)}}function Xm(e){let t=Object.keys(e),n={};for(let r=0;r<t.length;r++){let[i,a]=L(e[t[r]]);Object.defineProperty(n,t[r],{get:i,set(e){a(()=>e)}})}return n}function Zm(e){if(e.assignedSlot&&e.assignedSlot._$owner)return e.assignedSlot._$owner;let t=e.parentNode;for(;t&&!t._$owner&&!(t.assignedSlot&&t.assignedSlot._$owner);)t=t.parentNode;return t&&t.assignedSlot?t.assignedSlot._$owner:e._$owner}function Qm(e){return(t,n)=>{let{element:r}=n;return mt(i=>{let a=Xm(t);r.addPropertyChangedCallback((e,t)=>a[e]=t),r.addReleaseCallback(()=>{r.renderRoot.textContent=``,i()});let o=e(a,n);return q(r.renderRoot,o)},Zm(r))}}function $m(e,t,n){return arguments.length===2&&(n=t,t={}),Ym(e,t)(Qm(n))}export{lf as $,so as $t,Cp as A,bt as An,Ds as At,ep as B,A as Bn,Ho as Bt,lm as C,yt as Cn,Bc as Ct,Sp as D,R as Dn,zs as Dt,bp as E,z as En,Us as Et,dp as F,qe as Fn,ys as Ft,Jf as G,wo as Gt,Zf as H,Mo as Ht,ip as I,Je as In,Uo as It,_f as J,vo as Jt,qf as K,So as Kt,cp as L,Ge as Ln,qo as Lt,vp as M,xt as Mn,Cs as Mt,_p as N,j as Nn,Ss as Nt,wp as O,L as On,Es as Ot,gp as P,We as Pn,bs as Pt,hf as Q,lo as Qt,sp as R,He as Rn,Jo as Rt,um as S,mn as Sn,Vc as St,Ep as T,gt as Tn,rc as Tt,Xf as U,Ao as Ut,$f as V,Po as Vt,Yf as W,Eo as Wt,pf as X,mo as Xt,cf as Y,go as Yt,mf as Z,fo as Zt,hm as _,Fn as _n,ul as _t,Om as a,Wa as an,Q as at,fm as b,hn as bn,al as bt,wm as c,Xn as cn,xu as ct,xm as d,q as dn,ml as dt,ao as en,gf as et,bm as f,wn as fn,ol as ft,gm as g,U as gn,pl as gt,_m as h,Mn as hn,dl as ht,Em as i,Ga as in,Qu as it,yp as j,St as jn,ws as jt,Tp as k,ln as kn,Ts as kt,Cm as l,K as ln,mu as lt,vm as m,Nn as mn,ll as mt,Im as n,Ya as nn,rf as nt,Pm as o,qa as on,Cu as ot,ym as p,W as pn,fl as pt,Nf as q,bo as qt,Am as r,Ka as rn,Wd as rt,Mm as s,Ia as sn,Su as st,$m as t,Za as tn,nf as tt,Sm as u,G as un,Z as ut,mm as v,fn as vn,cl as vt,cm as w,V as wn,Fc as wt,dm as x,H as xn,Qc as xt,pm as y,pn as yn,sl as yt,op as z,Ye as zn,Ko as zt};
package/dist/fiat.js CHANGED
@@ -1 +1 @@
1
- import"./dist-QzDwShnx.js";import"./widget-Bf9MCT78.js";import{n as e,t}from"./register-deposit-TIxgJ8p6.js";export{e as TokenFlightFiat,t as registerFiatElement};
1
+ import"./dist-D4PEwqKq.js";import"./widget-9I201q7O.js";import{n as e,t}from"./register-deposit-COFuKwk-.js";export{e as TokenFlightFiat,t as registerFiatElement};
package/dist/receive.js CHANGED
@@ -1 +1 @@
1
- import"./dist-QzDwShnx.js";import"./widget-Bf9MCT78.js";import{n as e,t}from"./register-deposit-TIxgJ8p6.js";export{e as TokenFlightReceive,t as registerReceiveElement};
1
+ import"./dist-D4PEwqKq.js";import"./widget-9I201q7O.js";import{n as e,t}from"./register-deposit-COFuKwk-.js";export{e as TokenFlightReceive,t as registerReceiveElement};
@@ -0,0 +1 @@
1
+ import{En as e,On as t,a as n,an as r,c as i,dn as a,gn as o,i as s,in as c,jn as l,l as u,n as d,nn as f,o as p,on as m,pn as h,r as g,rn as _,s as v,sn as y,t as b,tn as x,wn as S}from"./dist-D4PEwqKq.js";import{n as C,t as w}from"./widget-9I201q7O.js";function T(e){if(e)return e.map(e=>e===`wallet`?`crypto`:`card`)}var E=x((e,t,n)=>S(C,{config:{apiEndpoint:e.apiEndpoint,fiatApiEndpoint:e.fiatApiEndpoint,theme:e.theme,locale:e.locale,customColors:e.customColors,titleText:e.titleText,titleImageUrl:e.titleImageUrl,hideTitle:e.hideTitle,hidePoweredBy:e.hidePoweredBy,noBackground:e.noBackground,noBorder:e.noBorder,toToken:e.target,fromToken:e.fromToken,tradeType:e.amount?`EXACT_OUTPUT`:`EXACT_INPUT`,amount:e.amount,recipient:e.recipient,methods:T(e.methods),icon:e.targetIcon,fiatCurrency:e.fiatCurrency,fiatPaymentMode:e.fiatPaymentMode},walletAdapter:t,callbacks:n}),()=>w),D=o(`<style>`);function O(e){if(!e)return``;let t=e.trim();if(t.startsWith(`[`))try{let e=JSON.parse(t);if(Array.isArray(e))return e}catch{}return t}function k(e){if(e)try{let t=JSON.parse(e.trim());if(Array.isArray(t))return t}catch{}}function A(e){if(e)return e.map(e=>e===`wallet`?`crypto`:`card`)}function j(o){o&&d(o),!(typeof customElements>`u`)&&(customElements.get(`tokenflight-deposit`)||b(`tokenflight-deposit`,{"api-endpoint":``,target:``,amount:``,"from-token":``,recipient:``,methods:``,"target-icon":``,"fiat-currency":``,"fiat-payment-mode":``,"title-text":``,"title-image":``,theme:``,locale:``,"csp-nonce":``,"hide-title":!1,"hide-powered-by":!1,"no-background":!1,"no-border":!1},(o,{element:d})=>{let b=k(o.methods),x={apiEndpoint:o[`api-endpoint`]||g()||void 0,toToken:O(o.target),fromToken:o[`from-token`]||void 0,tradeType:o.amount?`EXACT_OUTPUT`:`EXACT_INPUT`,amount:o.amount||void 0,recipient:o.recipient||void 0,methods:A(b),icon:o[`target-icon`]||void 0,fiatCurrency:o[`fiat-currency`]||void 0,fiatPaymentMode:o[`fiat-payment-mode`]||void 0,titleText:o[`title-text`]||void 0,titleImageUrl:o[`title-image`]||void 0,theme:o.theme||v()||`light`,locale:o.locale||p()||`en-US`,hideTitle:u(o[`hide-title`]),hidePoweredBy:u(o[`hide-powered-by`]),noBackground:u(o[`no-background`]),noBorder:u(o[`no-border`])},T=o[`csp-nonce`]||void 0,[E,j]=t(typeof window<`u`&&window.matchMedia?.(`(prefers-color-scheme: dark)`).matches===!0);l(m(e=>{j(e===c)}));let M=d.__customColors,N=e(()=>{let e=o.theme||v()||`light`,t=(e===`auto`?E():e===`dark`)?c:r,i=n();return`:host { ${_(i||M?{...t,...i,...M}:t)} }\n${w}`}),P=d.__walletAdapter,F=d.__callbacks;return[(()=>{var e=D();return h(e,`nonce`,T),a(e,N),e})(),S(y,{client:f,get children(){return S(C,{config:x,get walletAdapter(){return P??i()},get callbacks(){return F?{...s(),...F}:s()}})}})]}))}export{E as n,j as t};