1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="66acd75b-e5cb-a74c-946e-4ea125109ead")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,343585,684812,9467,e=>{"use strict";function t(e){let t=new Uint8Array(e),s="";for(let e of t)s+=String.fromCharCode(e);return btoa(s).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function s(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),s=(4-t.length%4)%4,i=atob(t.padEnd(t.length+s,"=")),r=new ArrayBuffer(i.length),n=new Uint8Array(r);for(let e=0;e<i.length;e++)n[e]=i.charCodeAt(e);return r}function i(){return r.stubThis(globalThis?.PublicKeyCredential!==void 0&&"function"==typeof globalThis.PublicKeyCredential)}let r={stubThis:e=>e};function n(e){let{id:t}=e;return{...e,id:s(t),transports:e.transports}}function o(e){return"localhost"===e||/^((xn--[a-z0-9-]+|[a-z0-9]+(-[a-z0-9]+)*)\.)+([a-z]{2,}|xn--[a-z0-9-]+)$/i.test(e)}class a extends Error{constructor({message:e,code:t,cause:s,name:i}){super(e,{cause:s}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=i??s.name,this.code=t}}let l=new class{constructor(){Object.defineProperty(this,"controller",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}createNewAbortSignal(){if(this.controller){let e=Error("Cancelling existing WebAuthn API call for new one");e.name="AbortError",this.controller.abort(e)}let e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){let e=Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}},c=["cross-platform","platform"];function u(e){if(e&&!(0>c.indexOf(e)))return e}async function d(e){let r,c,d,f,m;!e.optionsJSON&&e.challenge&&(console.warn("startRegistration() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information."),e={optionsJSON:e});let{optionsJSON:p,useAutoRegister:y=!1}=e;if(!i())throw Error("WebAuthn is not supported in this browser");let g={...p,challenge:s(p.challenge),user:{...p.user,id:s(p.user.id)},excludeCredentials:p.excludeCredentials?.map(n)},b={};y&&(b.mediation="conditional"),b.publicKey=g,b.signal=l.createNewAbortSignal();try{r=await navigator.credentials.create(b)}catch(e){throw function({error:e,options:t}){let{publicKey:s}=t;if(!s)throw Error("options was missing required publicKey property");if("AbortError"===e.name){if(t.signal instanceof AbortSignal)return new a({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if("ConstraintError"===e.name){if(s.authenticatorSelection?.requireResidentKey===!0)return new a({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});else if("conditional"===t.mediation&&s.authenticatorSelection?.userVerification==="required")return new a({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});else if(s.authenticatorSelection?.userVerification==="required")return new a({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else if("InvalidStateError"===e.name)return new a({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});else if("NotAllowedError"===e.name)return new a({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});else if("NotSupportedError"===e.name)return new a(0===s.pubKeyCredParams.filter(e=>"public-key"===e.type).length?{message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}:{message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});else if("SecurityError"===e.name){let t=globalThis.location.hostname;if(!o(t))return new a({message:`${globalThis.location.hostname}
2 is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e});if(s.rp.id!==t)return new a({message:`The RP ID "${s.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else if("TypeError"===e.name){if(s.user.id.byteLength<1||s.user.id.byteLength>64)return new a({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if("UnknownError"===e.name)return new a({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e});return e}({error:e,options:b})}if(!r)throw Error("Registration was not completed");let{id:v,rawId:w,response:A,type:S}=r;if("function"==typeof A.getTransports&&(d=A.getTransports()),"function"==typeof A.getPublicKeyAlgorithm)try{f=A.getPublicKeyAlgorithm()}catch(e){h("getPublicKeyAlgorithm()",e)}if("function"==typeof A.getPublicKey)try{let e=A.getPublicKey();null!==e&&(m=t(e))}catch(e){h("getPublicKey()",e)}if("function"==typeof A.getAuthenticatorData)try{c=t(A.getAuthenticatorData())}catch(e){h("getAuthenticatorData()",e)}return{id:v,rawId:t(w),response:{attestationObject:t(A.attestationObject),clientDataJSON:t(A.clientDataJSON),transports:d,publicKeyAlgorithm:f,publicKey:m,authenticatorData:c},type:S,clientExtensionResults:r.getClientExtensionResults(),authenticatorAttachment:u(r.authenticatorAttachment)}}function h(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them. 3`,t)}e.s(["startRegistration",0,d],684812);let f=e=>e;async function m(e){let r,c,d;!e.optionsJSON&&e.challenge&&(console.warn("startAuthentication() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information."),e={optionsJSON:e});let{optionsJSON:h,useBrowserAutofill:m=!1,verifyBrowserAutofillInput:p=!0}=e;if(!i())throw Error("WebAuthn is not supported in this browser");h.allowCredentials?.length!==0&&(r=h.allowCredentials?.map(n));let y={...h,challenge:s(h.challenge),allowCredentials:r},g={};if(m){if(!await function(){if(!i())return f(new Promise(e=>e(!1)));let e=globalThis.PublicKeyCredential;return e?.isConditionalMediationAvailable===void 0?f(new Promise(e=>e(!1))):f(e.isConditionalMediationAvailable())}())throw Error("Browser does not support WebAuthn autofill");if(document.querySelectorAll("input[autocomplete$='webauthn']").length<1&&p)throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');g.mediation="conditional",y.allowCredentials=[]}g.publicKey=y,g.signal=l.createNewAbortSignal();try{c=await navigator.credentials.get(g)}catch(e){throw function({error:e,options:t}){let{publicKey:s}=t;if(!s)throw Error("options was missing required publicKey property");if("AbortError"===e.name){if(t.signal instanceof AbortSignal)return new a({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if("NotAllowedError"===e.name)return new a({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});else if("SecurityError"===e.name){let t=globalThis.location.hostname;if(!o(t))return new a({message:`${globalThis.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e});if(s.rpId!==t)return new a({message:`The RP ID "${s.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else if("UnknownError"===e.name)return new a({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e});return e}({error:e,options:g})}if(!c)throw Error("Authentication was not completed");let{id:b,rawId:v,response:w,type:A}=c;return w.userHandle&&(d=t(w.userHandle)),{id:b,rawId:t(v),response:{authenticatorData:t(w.authenticatorData),clientDataJSON:t(w.clientDataJSON),signature:t(w.signature),userHandle:d},type:A,clientExtensionResults:c.getClientExtensionResults(),authenticatorAttachment:u(c.authenticatorAttachment)}}e.s(["startAuthentication",0,m],9467),e.s([],343585)},977914,e=>{"use strict";var t=e.i(775384),s=e.i(661332),i=e.i(3906);e.s(["useSuspenseQuery",0,function(e,r){return(0,s.useBaseQuery)({...e,enabled:!0,suspense:!0,throwOnError:t.defaultThrowOnError,placeholderData:void 0},i.QueryObserver,r)}])},461636,e=>{"use strict";let t;
3var s=e.i(651325),i=e.i(547447);function r(e,t,s){let i,r=s.initialDeps??[],n=!0;function o(){let o=e();return(o.length!==r.length||o.some((e,t)=>r[t]!==e))&&(r=o,i=t(...o),(null==s?void 0:s.onChange)&&!(n&&s.skipInitialOnChange)&&s.onChange(i),n=!1),i}return o.updateDeps=e=>{r=e},o}function n(e,t){if(void 0!==e)return e;throw Error(`Unexpected undefined${t?`: ${t}`:""}`)}let o=()=>{if(void 0!==t)return t;if("u"<typeof navigator)return t=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return t=!0;let e=navigator.maxTouchPoints;return t="MacIntel"===navigator.platform&&void 0!==e&&e>0},a=e=>{let{offsetWidth:t,offsetHeight:s}=e;return{width:t,height:s}},l=e=>e,c=e=>{let t=Math.max(e.startIndex-e.overscan,0),s=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,i=Array(s);for(let e=0;e<s;e++)i[e]=t+e;return i},u=(e,t)=>{let s=e.scrollElement;if(!s)return;let i=e.targetWindow;if(!i)return;let r=e=>{let{width:s,height:i}=e;t({width:Math.round(s),height:Math.round(i)})};if(r(a(s)),!i.ResizeObserver)return()=>{};let n=new i.ResizeObserver(t=>{let i=()=>{let e=t[0];if(null==e?void 0:e.borderBoxSize){let t=e.borderBoxSize[0];if(t)return void r({width:t.inlineSize,height:t.blockSize})}r(a(s))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()});return n.observe(s,{box:"border-box"}),()=>{n.unobserve(s)}},d={passive:!0},h="u"<typeof window||"onscrollend"in window,f=(e,t)=>((e,t,s)=>{var i,r;let n,o=e.scrollElement;if(!o)return;let a=e.targetWindow;if(!a)return;let l=e.options.useScrollendEvent&&h,c=0,u=l?null:(i=()=>t(c,!1),r=e.options.isScrollingResetDelay,Object.assign(function(...e){a.clearTimeout(n),n=a.setTimeout(()=>i.apply(this,e),r)},{cancel:()=>{a.clearTimeout(n)}})),f=e=>()=>{c=s(o),null==u||u(),t(c,e)},m=f(!0),p=f(!1);return o.addEventListener("scroll",m,d),l&&o.addEventListener("scrollend",p,d),()=>{o.removeEventListener("scroll",m),l&&o.removeEventListener("scrollend",p),null==u||u.cancel()}})(e,t,t=>{let{horizontal:s,isRtl:i}=e.options;return s?t.scrollLeft*(i&&-1||1):t.scrollTop}),m=(e,t,s)=>{if(s.options.useCachedMeasurements){let t=s.indexFromElement(e),i=s.options.getItemKey(t);return s.itemSizeCache.get(i)??s.options.estimateSize(t)}if(null==t?void 0:t.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[s.options.horizontal?"inlineSize":"blockSize"])}if(!t){let t=s.indexFromElement(e),i=s.options.getItemKey(t),r=s.itemSizeCache.get(i);if(void 0!==r)return r}return e[s.options.horizontal?"offsetWidth":"offsetHeight"]},p=(e,{adjustments:t=0,behavior:s},i)=>{var r,n;null==(n=null==(r=i.scrollElement)?void 0:r.scrollTo)||n.call(r,{[i.options.horizontal?"left":"top"]:e+t,behavior:s})};class y{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this._clampedAdjustment=null,this.elementsCache=new Map,this.now=()=>{var e,t,s;return(null==(s=null==(t=null==(e=this.targetWindow)?void 0:e.performance)?void 0:t.now)?void 0:s.call(t))??Date.now()},this.observer=(()=>{let e=null,t=()=>e||(this.targetWindow&&this.targetWindow.ResizeObserver?e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{let t=e.target,s=this.indexFromElement(t);if(!t.isConnected){for(let[e,s]of(this.observer.unobserve(t),this.elementsCache))if(s===t){this.elementsCache.delete(e);break}return}this.isIndexInRange(s)&&this.shouldMeasureDuringScroll(s)&&this.resizeItem(s,this.options.measureElement(t,e,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}):null);return{disconnect:()=>{var s;null==(s=t())||s.disconnect(),e=null},observe:e=>{var s;return null==(s=t())?void 0:s.observe(e,{box:"border-box"})},unobserve:e=>{var s;return null==(s=t())?void 0:s.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{var t,s;let i={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:l,rangeExtractor:c,onChange:()=>{},measureElement:m,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(let t in e){let s=e[t];void 0!==s&&(i[t]=s)}let r=this.options,n=null,o=null,a=!1;if(void 0!==r&&r.enabled&&i.enabled&&"end"===i.anchorTo&&null!==this.scrollElement){let e=r.count,l=i.count,c=this.getMeasurements(),u=e>0?(null==(t=c[0])?void 0:t.key)??r.getItemKey(0):null,d=e>0?(null==(s=c[e-1])?void 0:s.key)??r.getItemKey(e-1):null;if(l!==e||e>0&&l>0&&(i.getItemKey(0)!==u||i.getItemKey(l-1)!==d)){a=!0;let t=e>0?this.getVirtualItemForOffset(this.getScrollOffset())??c[0]:null;
3t&&(n=[t.key,this.getScrollOffset()-t.start]);let s=!0===i.followOnAppend?"auto":i.followOnAppend||null;s&&l>e&&this.isAtEnd(r.scrollEndThreshold)&&(0===e||i.getItemKey(l-1)!==d)&&(o=s)}}this.options=i,a&&(this.pendingMin=0,this.itemSizeCacheVersion++);let u=!1,d=0;if(n&&null!==this.scrollOffset){let[e,t]=n,s=this.getMeasurements(),{count:i,getItemKey:r}=this.options,o=0;for(;o<i&&r(o)!==e;)o++;if(o<i){let e=s[o];if(e){let s=Math.max(0,e.start+t);s!==this.scrollOffset&&(d=s-this.scrollOffset,this.scrollOffset=s,u=!0)}}}(u||o)&&(this.pendingScrollAnchor=[u?n[0]:null,u?n[1]:0,o,d])},this.notify=e=>{var t,s;null==(s=(t=this.options).onChange)||s.call(t,this,e)},this.maybeNotify=r(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),null!=this.rafId&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.isScrolling=!1,this.scrollDirection=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._clampedAdjustment=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;let t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t)return void this.maybeNotify();if(this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(null==(e=this.scrollElement)?void 0:e.window)??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{if(t&&null===this._intendedScrollOffset&&e===this.scrollOffset)return;null!==this._intendedScrollOffset&&1.5>Math.abs(e-this._intendedScrollOffset)&&(e=this._intendedScrollOffset),this._intendedScrollOffset=null,null!==this._clampedAdjustment&&Math.abs(e-this._clampedAdjustment.maxAtWrite)>=1.5&&(this._clampedAdjustment=null),this.scrollAdjustments=0;let s=this.getScrollOffset();this.scrollDirection=t?s===e?this.scrollDirection:s<e?"forward":"backward":null,this.scrollOffset=e,this.isScrolling=t,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){let e=this.scrollElement,t=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,null!==this._iosTouchEndTimerId&&null!=this.targetWindow&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},s=()=>{this._iosTouching=!1,o()&&null!=this.targetWindow&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};e.addEventListener("touchstart",t,d),e.addEventListener("touchend",s,d),this.unsubs.push(()=>{e.removeEventListener("touchstart",t),e.removeEventListener("touchend",s),null!==this._iosTouchEndTimerId&&null!=this.targetWindow&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}let s=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,s&&this.scrollElement&&this.options.enabled){let[e,t,i,r]=s;null===e||i||(o()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?0!==r&&(this._iosDeferredAdjustment+=r):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),i&&this.scrollToEnd({behavior:i})}this._retryClampedAdjustment()},this._retryClampedAdjustment=()=>{if(null===this._clampedAdjustment||!this.scrollElement||!this.options.enabled)return;let{target:e,maxAtWrite:t}=this._clampedAdjustment,s=this.getMaxScrollOffset();s>t+.5&&(this._clampedAdjustment=e>s+.5?{target:e,maxAtWrite:s}:null,this._scrollToOffset(e,{adjustments:void 0,behavior:void 0}))},this._flushIosDeferredIfReady=()=>
3{if(0===this._iosDeferredAdjustment||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;let e=this.getScrollOffset(),t=this.getMaxScrollOffset();if(e<0||e>t)return;if(this._iosDeferredAdjustment<0&&e>=t-1){this._iosDeferredAdjustment=0;return}let s=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(e,{adjustments:this.scrollAdjustments+=s,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??("function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=r(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(e,t,s,i,r,n,o,a)=>(void 0!==this.prevLanes&&this.prevLanes!==n&&(this.lanesChangedFlag=!0),this.prevLanes=n,this.pendingMin=null,{count:e,paddingStart:t,scrollMargin:s,getItemKey:i,enabled:r,lanes:n,laneAssignmentMode:o,gap:a}),{key:!1}),this.isIndexInRange=e=>e>=0&&e<this.options.count,this.getMeasurements=r(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:e,paddingStart:t,scrollMargin:s,getItemKey:i,enabled:r,lanes:n,laneAssignmentMode:o,gap:a},l)=>{let c=this.itemSizeCache;if(!r)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),0!==this.measurementsCache.length||this.lanesSettling||(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let u=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1),1===n){var d;let r,n=2*e,o=this._flatMeasurements;if(!o||o.length<n){let e=new Float64Array(n);o&&u>0&&e.set(o.subarray(0,2*u)),o=e,this._flatMeasurements=o}if(0===u)r=t+s;else{let e=u-1;r=o[2*e]+o[2*e+1]+a}for(let t=u;t<e;t++){let e=i(t),s=c.get(e),n="number"==typeof s?s:this.options.estimateSize(t);o[2*t]=r,o[2*t+1]=n,r+=n+a}let l=(d=o,new Proxy(Array(e),{get(t,s,r){if("string"==typeof s){let r=s.charCodeAt(0);if(r>=48&&r<=57){let r=+s;if(Number.isInteger(r)&&r>=0&&r<e){let e=t[r];if(!e){let s=d[2*r];e=t[r]={index:r,key:i(r),start:s,size:d[2*r+1],end:s+d[2*r+1],lane:0}}return e}}if("length"===s)return e}return Reflect.get(t,s,r)}}));return this.measurementsCache=l,l}let h=this.measurementsCache.slice(0,u),f=Array(n).fill(void 0),m=new Float64Array(n),p=0;for(let e=0;e<u;e++){let t=h[e];t&&(void 0===f[t.lane]&&p++,f[t.lane]=e,m[t.lane]=t.end)}for(let r=u;r<e;r++){let e,l,u=i(r),d=this.laneAssignments.get(r),y="estimate"===o||c.has(u);if(void 0!==d&&this.options.lanes>1){let i=f[e=d],r=void 0!==i?h[i]:void 0;l=r?r.end+a:t+s}else if(p===n){let t=0,s=m[0],i=f[0];for(let e=1;e<n;e++){let r=m[e];(r<s||r===s&&f[e]<i)&&(t=e,s=r,i=f[e])}e=t,l=s+a,y&&this.laneAssignments.set(r,e)}else e=r%this.options.lanes,l=t+s,y&&this.laneAssignments.set(r,e);let g=c.get(u),b="number"==typeof g?g:this.options.estimateSize(r),v=l+b;h[r]={index:r,start:l,size:b,end:v,key:u,lane:e},void 0===f[e]&&p++,f[e]=r,m[e]=v}return this.measurementsCache=h,h},{key:!1,debug:()=>this.options.debug}),this.calculateRange=r(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,s,i)=>0===e.length||0===t?(this.range=null,null):(this.range=function(e,t,s,i,r){let n=e.length-1;if(e.length<=i)return{startIndex:0,endIndex:n};if(1===i&&null!==r){let e=function(e,t,s){let i=0;for(;i<=t;){let r=(i+t)/2|0,n=e[2*r];if(n<s)i=r+1;else{if(!(n>s))return r;t=r-1}}return i>0?i-1:0}(r,n,s),i=e,o=s+t;
3for(;i<n&&r[2*i]+r[2*i+1]<o;)i++;return{startIndex:e,endIndex:i}}let o=g(0,n,t=>e[t].start,s),a=o;if(1===i)for(;a<n&&e[a].end<s+t;)a++;else if(i>1){let r=Array(i).fill(0);for(;a<n&&r.some(e=>e<s+t);){let t=e[a];r[t.lane]=t.end,a++}let l=Array(i).fill(s+t);for(;o>=0&&l.some(e=>e>=s);){let t=e[o];l[t.lane]=t.start,o--}o=Math.max(0,o-o%i),a=Math.min(n,a+(i-1-a%i))}return{startIndex:o,endIndex:a}}(e,t,s,i,1===i&&null!=this._flatMeasurements?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=r(()=>{let e=null,t=null,s=this.calculateRange();return s&&(e=s.startIndex,t=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,s,i,r)=>null===i||null===r?[]:e({startIndex:i,endIndex:r,overscan:t,count:s}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,s=e.getAttribute(t);return s?parseInt(s,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{var t;if(!this.scrollState||"smooth"!==this.scrollState.behavior)return!0;let s=this.scrollState.index??(null==(t=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))?void 0:t.index);if(void 0!==s&&this.range){let t=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),i=Math.max(0,s-t),r=Math.min(this.options.count-1,s+t);return e>=i&&e<=r}return!0},this.measureElement=e=>{if(!e)return void this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});let t=this.indexFromElement(e);if(!this.isIndexInRange(t))return;let s=this.options.getItemKey(t),i=this.elementsCache.get(s);i!==e&&(i&&this.observer.unobserve(i),this.observer.observe(e),this.elementsCache.set(s,e)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{var s,i;let r,n,o;if(!this.isIndexInRange(e))return;let a=this._flatMeasurements;if(1===this.options.lanes&&null!==a)o=this.options.getItemKey(e),n=a[2*e],r=a[2*e+1];else{let t=this.measurementsCache[e];if(!t)return;o=t.key,n=t.start,r=t.size}let l=this.itemSizeCache.get(o)??r,c=t-l;if(0!==c){let a="end"===this.options.anchorTo&&(null==(s=this.scrollState)?void 0:s.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,u=a?this.getTotalSize():0,d=this.getScrollOffset()+this.scrollAdjustments,h=this.itemSizeCache.has(o)?n+l<=d&&"backward"!==this.scrollDirection:n<d,f=(null==(i=this.scrollState)?void 0:i.behavior)!=="smooth"&&(void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[e]??{index:e,key:o,start:n,size:r,end:n+r,lane:0},c,this):h);(null===this.pendingMin||e<this.pendingMin)&&(this.pendingMin=e),this.itemSizeCache.set(o,t),this.itemSizeCacheVersion++;let m=!1;a?m=this.applyScrollAdjustment(this.getTotalSize()-u):f&&(m=this.applyScrollAdjustment(c)),this.notify(m),this._retryClampedAdjustment()}},this.getVirtualItems=r(()=>
3[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let s=[];for(let i=0,r=e.length;i<r;i++){let r=t[e[i]];s.push(r)}return s},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(0===t.length)return;let s=this._flatMeasurements,i=1===this.options.lanes&&null!=s,r=g(0,t.length-1,i?e=>s[2*e]:e=>n(t[e]).start,e);return n(t[r])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(e=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=e,this.getOffsetForAlignment=(e,t,s=0)=>
3{if(!this.scrollElement)return 0;let i=this.getSize(),r=this.getScrollOffset();return"auto"===t&&(t=e>=r+i?"end":"start"),"center"===t?e+=(s-i)/2:"end"===t&&(e-=i),Math.max(Math.min(this.getMaxScrollOffset(),e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));let s=this.getSize(),i=this.getScrollOffset(),r=this.measurementsCache[e];if(!r)return;if("auto"===t)if(r.end>=i+s-this.options.scrollPaddingEnd)t="end";else{if(!(r.start<=i+this.options.scrollPaddingStart))return[i,t];t="start"}if("end"===t&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let n="end"===t?r.end+this.options.scrollPaddingEnd:r.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(n,t,r.size),t]},this.scrollToOffset=(e,{align:t="start",behavior:s="auto"}={})=>{this._iosDeferredAdjustment=0;let i=this.getOffsetForAlignment(e,t),r=this.now();this.scrollState={index:null,align:t,behavior:s,startedAt:r,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t="auto",behavior:s="auto"}={})=>{this._iosDeferredAdjustment=0,e=Math.max(0,Math.min(e,this.options.count-1));let i=this.getOffsetForIndex(e,t);if(!i)return;let[r,n]=i,o=this.now();this.scrollState={index:e,align:n,behavior:s,startedAt:o,lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t="auto"}={})=>{let s=this.getScrollOffset()+e,i=this.now();this.scrollState={index:null,align:"start",behavior:t,startedAt:i,lastTargetOffset:s,stableFrames:0},this._scrollToOffset(s,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:e="auto"}={})=>{this.options.count>0?this.scrollToIndex(this.options.count-1,{align:"end",behavior:e}):this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:e})},this.getTotalSize=()=>{var e;let t,s=this.getMeasurements();if(0===s.length)t=this.options.paddingStart;else if(1===this.options.lanes){let i=s.length-1,r=this._flatMeasurements;t=null!=r?r[2*i]+r[2*i+1]:(null==(e=s[i])?void 0:e.end)??0}else{let e=Array(this.options.lanes).fill(null),i=s.length-1;for(;i>=0&&e.some(e=>null===e);){let t=s[i];null===e[t.lane]&&(e[t.lane]=t.end),i--}t=Math.max(...e.filter(e=>null!==e))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{let e=[];
3if(0===this.itemSizeCache.size)return e;for(let t of this.getMeasurements())t&&this.itemSizeCache.has(t.key)&&e.push({index:t.index,key:t.key,start:t.start,size:t.size,end:t.end,lane:t.lane});return e},this._scrollToOffset=(e,{adjustments:t,behavior:s})=>{this._intendedScrollOffset=e+(t??0),this.options.scrollToFn(e,{behavior:s,adjustments:t},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(e)}applyScrollAdjustment(e,t){if(0===e)return!1;if(o()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded))return this._iosDeferredAdjustment+=e,!1;{let s=this.getScrollOffset()+this.scrollAdjustments+e,i=this.scrollElement,r=null!==i&&("scrollHeight"in i||"document"in i)?this.getMaxScrollOffset():null;return this._clampedAdjustment=null!==r&&s>r+.5?{target:s,maxAtWrite:r}:null,this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=e,behavior:t}),null!==this.scrollOffset&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0}}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}null==this.rafId&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}let e=null!=this.scrollState.index?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,t=e?e[0]:this.scrollState.lastTargetOffset,s=t!==this.scrollState.lastTargetOffset;if(!s&&1.01>Math.abs(t-this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=1){this.getScrollOffset()!==t&&this._scrollToOffset(t,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,s){let e=this.getSize()||600,s=Math.abs(t-this.getScrollOffset()),i="smooth"===this.scrollState.behavior&&s>e;this.scrollState.lastTargetOffset=t,i||(this.scrollState.behavior="auto"),this._scrollToOffset(t,{adjustments:void 0,behavior:i?"smooth":"auto"})}this.scheduleScrollReconcile()}}let g=(e,t,s,i)=>{for(;e<=t;){let r=(e+t)/2|0,n=s(r);if(n<i)e=r+1;else{if(!(n>i))return r;t=r-1}}return e>0?e-1:0},b="u">typeof document?s.useLayoutEffect:s.useEffect;e.s(["useVirtualizer",0,function(e){return function({useFlushSync:e=!0,directDomUpdates:t=!1,directDomUpdatesMode:r="transform",...n}){let o=s.useReducer(e=>e+1,0)[1],a=s.useRef({enabled:t,mode:r,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});a.current.enabled=t,a.current.mode=r;let l=e=>{let t=a.current;if(!t.enabled||!t.container)return;let s=e.getTotalSize();if(s!==t.lastSize){t.lastSize=s;let i=e.options.horizontal?"width":"height";t.container.style[i]=`${s}px`}},c=e=>{let t=a.current;if(!t.enabled||!t.container)return;l(e);let s=!!e.options.horizontal,i="transform"===t.mode,r=s?"left":"top",n=e.options.scrollMargin;for(let o of e.getVirtualItems()){let a=o.start-n,l=e.elementsCache.get(o.key);l&&t.lastPositions.get(l)!==a&&(t.lastPositions.set(l,a),i?l.style.transform=s?`translate3d(${a}px, 0, 0)`:`translate3d(0, ${a}px, 0)`:l.style[r]=`${a}px`)}},u={...n,onChange:(t,s)=>{var r;let l=a.current,u=!0;if(l.enabled){c(t);let e=t.range,s=l.prevRange;(u=!s||s.isScrolling!==t.isScrolling||s.startIndex!==(null==e?void 0:e.startIndex)||s.endIndex!==(null==e?void 0:e.endIndex))&&(l.prevRange=e?{startIndex:e.startIndex,endIndex:e.endIndex,isScrolling:t.isScrolling}:null)}u&&(e&&s?(0,i.flushSync)(o):o()),null==(r=n.onChange)||r.call(n,t,s)}},[d]=s.useState(()=>{let e=new y(u);return Object.assign(e,{containerRef:t=>{let s=a.current;if(s.container=t,s.lastSize=null,t&&s.enabled){let i=e.getTotalSize();s.lastSize=i;let r=e.options.horizontal?"width":"height";t.style[r]=`${i}px`}}})});return d.setOptions(u),b(()=>d._didMount(),[]),b(()=>(l(d),d._willUpdate())),b(()=>{c(d)}),d}({observeElementRect:u,observeElementOffset:f,scrollToFn:p,...e})}],461636)},294545,e=>{"use strict";let t=(0,e.i(804123).default)("arrow-left-right",[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]]);e.s(["ArrowLeftRightIcon",0,t],294545)}
3,333436,e=>{"use strict";let t=(0,e.i(804123).default)("arrow-up-right",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);e.s(["ArrowUpRightIcon",0,t],333436)},234591,349712,e=>{"use strict";let t=(0,e.i(804123).default)("ellipsis-vertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);e.s(["default",0,t],349712),e.s(["EllipsisVerticalIcon",0,t],234591)},800749,e=>{"use strict";let t=(0,e.i(804123).default)("landmark",[["path",{d:"M10 18v-7",key:"wt116b"}],["path",{d:"M11.12 2.198a2 2 0 0 1 1.76.006l7.866 3.847c.476.233.31.949-.22.949H3.474c-.53 0-.695-.716-.22-.949z",key:"1m329m"}],["path",{d:"M14 18v-7",key:"vav6t3"}],["path",{d:"M18 18v-7",key:"aexdmj"}],["path",{d:"M3 22h18",key:"8prr45"}],["path",{d:"M6 18v-7",key:"1ivflk"}]]);e.s(["LandmarkIcon",0,t],800749)},554909,e=>{"use strict";let t=(0,e.i(804123).default)("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]);e.s(["LogOutIcon",0,t],554909)},273488,e=>{"use strict";let t=(0,e.i(804123).default)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);e.s(["default",0,t])},864516,456156,e=>{"use strict";let t=(0,e.i(804123).default)("percent",[["line",{x1:"19",x2:"5",y1:"5",y2:"19",key:"1x9vlm"}],["circle",{cx:"6.5",cy:"6.5",r:"2.5",key:"4mh3h7"}],["circle",{cx:"17.5",cy:"17.5",r:"2.5",key:"1mdrzq"}]]);e.s(["default",0,t],456156),e.s(["PercentIcon",0,t],864516)},808975,e=>{"use strict";let t=(0,e.i(804123).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["SearchIcon",0,t],808975)},116464,e=>{"use strict";let t=(0,e.i(804123).default)("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]]);e.s(["default",0,t])},194452,e=>{"use strict";var t=e.i(116464);e.s(["TrendingUpIcon",()=>t.default])},218807,e=>{"use strict";var t=e.i(314219),s=e.i(354254),i=e.i(139284),r=e.i(651325),n=e.i(610729);let o=(0,r.createContext)({}),a=(0,r.forwardRef)(function(e,a){[e,a]=(0,t.useContextProps)(e,a,o);let{isDisabled:l,isInvalid:c,isReadOnly:u,onHoverStart:d,onHoverChange:h,onHoverEnd:f,...m}=e;l??=!!e["aria-disabled"]&&"false"!==e["aria-disabled"],c??=!!e["aria-invalid"]&&"false"!==e["aria-invalid"];let{hoverProps:p,isHovered:y}=(0,s.useHover)({onHoverStart:d,onHoverChange:h,onHoverEnd:f,isDisabled:l}),{isFocused:g,isFocusVisible:b,focusProps:v}=(0,n.useFocusRing)({within:!0}),w=(0,t.useRenderProps)({...e,values:{isHovered:y,isFocusWithin:g,isFocusVisible:b,isDisabled:l,isInvalid:c},defaultClassName:"react-aria-Group"});return r.default.createElement(t.dom.div,{...(0,i.mergeProps)(m,v,p),...w,ref:a,role:e.role??"group",slot:e.slot??void 0,"data-focus-within":g||void 0,"data-hovered":y||void 0,"data-focus-visible":b||void 0,"data-disabled":l||void 0,"data-invalid":c||void 0,"data-readonly":u||void 0},w.children)});e.s(["Group",0,a,"GroupContext",0,o])},876294,e=>{"use strict";var t=e.i(314219),s=e.i(699935),i=e.i(139284),r=e.i(651325),n=e.i(610729),o=e.i(354254);let a=(0,r.createContext)({}),l=(0,s.createHideableComponent)(function(e,s){[e,s]=(0,t.useContextProps)(e,s,a);let{hoverProps:l,isHovered:c}=(0,o.useHover)({...e,isDisabled:e.disabled}),{isFocused:u,isFocusVisible:d,focusProps:h}=(0,n.useFocusRing)({isTextInput:!0,autoFocus:e.autoFocus}),f=!!e["aria-invalid"]&&"false"!==e["aria-invalid"],m=(0,t.useRenderProps)({...e,values:{isHovered:c,isFocused:u,isFocusVisible:d,isDisabled:e.disabled||!1,isInvalid:f},defaultClassName:"react-aria-Input"});return r.default.createElement(t.dom.input,{...(0,i.mergeProps)((e=>{let{onHoverStart:t,onHoverChange:s,onHoverEnd:i,...r}=e;return r})(e),h,l),...m,ref:s,"data-focused":u||void 0,"data-disabled":e.disabled||void 0,"data-hovered":c||void 0,"data-focus-visible":d||void 0,"data-invalid":f||void 0})});e.s(["Input",0,l,"InputContext",0,a])},706010,e=>{"use strict";var t=e.i(314219),s=e.i(914203),i=e.i(963704),r=e.i(295502),n=e.i(155391
3),o=e.i(468766),a=e.i(154187),l=e.i(139284),c=e.i(742744),u=e.i(88855),d=e.i(184697),h=e.i(382206),f=e.i(699935),m=e.i(907488),p=e.i(785827),y=e.i(651325),g=e.i(227990),b=e.i(766079);function v(e,t){let s=null;if(e){for(s=e.getFirstKey();null!=s&&(t.has(s)||e.getItem(s)?.props?.isDisabled)&&s!==e.getLastKey();)s=e.getKeyAfter(s);null!=s&&(t.has(s)||e.getItem(s)?.props?.isDisabled)&&s===e.getLastKey()&&(s=e.getFirstKey())}return s}var w=e.i(929635),A=e.i(610729),S=e.i(354254);e.i(357816);var x=e.i(660034);let E=(0,y.createContext)(null),O=(0,y.createContext)(null),I=(0,y.forwardRef)(function(e,s){[e,s]=(0,t.useContextProps)(e,s,E);let{children:i,orientation:r="horizontal"}=e;return i=(0,y.useMemo)(()=>"function"==typeof i?i({orientation:r,defaultChildren:null}):i,[i,r]),y.default.createElement(d.CollectionBuilder,{content:i},t=>y.default.createElement(C,{props:e,collection:t,tabsRef:s}))});function C({props:e,tabsRef:s,collection:i}){let{orientation:r="horizontal"}=e,n=function(e){let t=function(e){let[t,s]=(0,b.useControlledState)(e.selectedKey,e.defaultSelectedKey??null,e.onSelectionChange),i=(0,y.useMemo)(()=>null!=t?[t]:[],[t]),{collection:r,disabledKeys:n,selectionManager:o}=(0,g.useListState)({...e,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:i,onSelectionChange:i=>{if("all"===i)return;let r=i.values().next().value??null;r===t&&e.onSelectionChange&&e.onSelectionChange(r),s(r)}}),a=null!=t?r.getItem(t):null;return{collection:r,disabledKeys:n,selectionManager:o,selectedKey:t,setSelectedKey:s,selectedItem:a}}({...e,onSelectionChange:e.onSelectionChange?t=>{null!=t&&e.onSelectionChange?.(t)}:void 0,suppressTextValueWarning:!0,defaultSelectedKey:e.defaultSelectedKey??v(e.collection,e.disabledKeys?new Set(e.disabledKeys):new Set)??void 0}),{selectionManager:s,collection:i,selectedKey:r}=t,n=(0,y.useRef)(r);return(0,y.useEffect)(()=>{let o=r;null==e.selectedKey&&(s.isEmpty||null==o||!i.getItem(o))&&null!=(o=v(i,t.disabledKeys))&&s.setSelectedKeys([o]),(null==o||null!=s.focusedKey)&&(s.isFocused||o===n.current)||s.setFocusedKey(o),n.current=o}),{...t,isDisabled:e.isDisabled||!1}}({...e,collection:i,children:void 0}),{focusProps:o,isFocused:a,isFocusVisible:c}=(0,A.useFocusRing)({within:!0}),u=(0,y.useMemo)(()=>({orientation:r,isFocusWithin:a,isFocusVisible:c}),[r,a,c]),d=(0,t.useRenderProps)({...e,defaultClassName:"react-aria-Tabs",values:u}),h=(0,m.filterDOMProps)(e,{global:!0});return y.default.createElement(t.dom.div,{...(0,l.mergeProps)(h,d,o),ref:s,slot:e.slot||void 0,"data-focused":a||void 0,"data-orientation":r,"data-focus-visible":c||void 0,"data-disabled":n.isDisabled||void 0},y.default.createElement(t.Provider,{values:[[E,e],[O,n]]},d.children))}let T=(0,y.forwardRef)(function(e,t){return(0,y.useContext)(O)?y.default.createElement(k,{props:e,forwardedRef:t}):y.default.createElement(d.Collection,e)});function k({props:e,forwardedRef:i}){let o=(0,y.useContext)(O),{CollectionRoot:a}=(0,y.useContext)(s.CollectionRendererContext),{orientation:c="horizontal",keyboardActivation:u="automatic"}=(0,t.useSlottedContext)(E),d=(0,x.useObjectRef)(i),{tabListProps:h}=(0,n.useTabList)({...e,orientation:c,keyboardActivation:u},o,d),f=(0,t.useRenderProps)({...e,children:null,defaultClassName:"react-aria-TabList",values:{orientation:c,state:o}}),p=(0,m.filterDOMProps)(e,{global:!0});return delete p.id,y.default.createElement(t.dom.div,{...(0,l.mergeProps)(p,f,h),ref:d,"data-orientation":c||void 0},y.default.createElement(r.SharedElementTransition,null,y.default.createElement(a,{collection:o.collection,persistedKeys:(0,s.usePersistedKeys)(o.selectionManager.focusedKey)})))}class R extends h.CollectionNode{static{this.type="item"}}let M=(0,d.createLeafComponent)(R,(e,s,r)=>{let n=(0,y.useContext)(O),a=(0,x.useObjectRef)(s),{tabProps:c,isSelected:u,isDisabled:d,isPressed:h}=(0,o.useTab)({key:r.key,...e},n,a),{focusProps:f,isFocused:p,isFocusVisible:g}=(0,A.useFocusRing)(),{hoverProps:b,isHovered:v}=(0,S.useHover)({isDisabled:d,onHoverStart:e.onHoverStart,onHoverEnd:e.onHoverEnd,onHoverChange:e.onHoverChange}),w=(0,t.useRenderProps)({...e,id:void 0,children:r.rendered,defaultClassName:"react-aria-Tab",values:{isSelected:u,isDisabled:d,isFocused:p,isFocusVisible:g,isPressed:h,isHovered:v}}),E=r.props.href?t.dom.a:t.dom.div,I=(0,m.filterDOMProps)(e,{global:!0});return delete I.id,delete I.onClick,y.default.createElement(E,{...(0,l.mergeProps)(I,w,c,f,b),ref:a,"data-selected":u||void 0,"data-disabled":d||void 0,"data-focused":p||void 0,"data-focus-visible":g||void 0,"data-pressed":h||void 0,"data-hovered":v||void 0},y.default.createElement(i.SelectionIndicatorContext.Provider,{value:{isSelected:u}},w.children))}),P=(0,f.createHideableComponent)(function(e,t){let s=(0,y.useContext)(O),i=(0,x.useObjectRef)(t),r=s.selectedKey===e.id,[n,o]=(0,y.useState)(null!=s.selectedKey?r:null);null==n&&null!=s.selectedKey?o(r):!r&&n&&o(!1);let a=(0,w.useExitAnimation)(i,r);return r||e.shouldForceMount||a?y.default.createElement(j,{...e,tabPanelRef:i,isInitiallySelected:n||!1,isExiting:a}):null});function j(e){let i,r,n,o=(0,y.useContext)(O),{id:d,tabPanelRef:h,isInitiallySelected:f,isExiting:g,...b}=e,{tabPanelProps:v}=(i=(0,c.useHasTabbableChild)(h)?void 0:0,r=(0,a.generateId)(o,e.id??o?.selectedKey,"tabpanel"),n=(0,u.useLabels)({...e,id:r,"aria-labelledby":(0,a.generateId)(o,o?.selectedKey,"tab")}),{tabPanelProps:(0,l.mergeProps)(n,{tabIndex:i,role:"tabpanel","aria-describedby":e["aria-describedby"],"aria-details":e["aria-details"]}
3)}),{focusProps:S,isFocused:x,isFocusVisible:I}=(0,A.useFocusRing)(),C=o.selectedKey===e.id,T=(0,w.useEnterAnimation)(h)&&!f,k=(0,t.useRenderProps)({...e,defaultClassName:"react-aria-TabPanel",values:{isFocused:x,isFocusVisible:I,isInert:(0,p.inertValue)(!C),isEntering:T,isExiting:g,state:o}}),R=(0,m.filterDOMProps)(b,{global:!0});delete R.id;let M=C?(0,l.mergeProps)(R,v,S,k):(0,l.mergeProps)(R,k);return y.default.createElement(t.dom.div,{...M,ref:h,"data-focused":x||void 0,"data-focus-visible":I||void 0,inert:(0,p.inertValue)(!C||e.inert),"data-inert":C?void 0:"true","data-entering":T||void 0,"data-exiting":g||void 0},y.default.createElement(t.Provider,{values:[[E,null],[O,null]]},y.default.createElement(s.CollectionRendererContext.Provider,{value:s.DefaultCollectionRenderer},k.children)))}e.s(["Tab",0,M,"TabList",0,T,"TabPanel",0,P,"Tabs",0,I],706010)},742744,e=>{"use strict";var t=e.i(694597),s=e.i(357816),i=e.i(651325);e.s(["useHasTabbableChild",0,function(e,r){let n=r?.isDisabled,[o,a]=(0,i.useState)(!1);return(0,s.useLayoutEffect)(()=>{if(e?.current&&!n){let s=()=>{e.current&&a(!!(0,t.getFocusableTreeWalker)(e.current,{tabbable:!0}).nextNode())};s();let i=new MutationObserver(s);return i.observe(e.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{i.disconnect()}}}),!n&&o}])},155391,154187,468766,e=>{"use strict";var t=e.i(139284);let s=new WeakMap;function i(e,t,i){if(!e)return"";"string"==typeof t&&(t=t.replace(/\s+/g,""));let r=s.get(e);return`${r}-${i}-${t}`}e.s(["generateId",0,i,"tabsIds",0,s],154187);class r{constructor(e,t,s,i=new Set){this.collection=e,this.flipDirection="rtl"===t&&"horizontal"===s,this.disabledKeys=i,this.tabDirection="horizontal"===s}getKeyLeftOf(e){return this.flipDirection?this.getNextKey(e):this.getPreviousKey(e)}getKeyRightOf(e){return this.flipDirection?this.getPreviousKey(e):this.getNextKey(e)}isDisabled(e){return this.disabledKeys.has(e)||!!this.collection.getItem(e)?.props?.isDisabled}getFirstKey(){let e=this.collection.getFirstKey();return null!=e&&this.isDisabled(e)&&(e=this.getNextKey(e)),e}getLastKey(){let e=this.collection.getLastKey();return null!=e&&this.isDisabled(e)&&(e=this.getPreviousKey(e)),e}getKeyAbove(e){return this.tabDirection?null:this.getPreviousKey(e)}getKeyBelow(e){return this.tabDirection?null:this.getNextKey(e)}getNextKey(e){let t=e;do null==(t=this.collection.getKeyAfter(t))&&(t=this.collection.getFirstKey());while(null!=t&&this.isDisabled(t))return t}getPreviousKey(e){let t=e;do null==(t=this.collection.getKeyBefore(t))&&(t=this.collection.getLastKey());while(null!=t&&this.isDisabled(t))return t}}var n=e.i(432939),o=e.i(88855),a=e.i(973473),l=e.i(817347),c=e.i(651325);e.s(["useTabList",0,function(e,i,u){let{orientation:d="horizontal",keyboardActivation:h="automatic"}=e,{collection:f,selectionManager:m,disabledKeys:p}=i,{direction:y}=(0,a.useLocale)(),g=(0,c.useMemo)(()=>new r(f,y,d,p),[f,p,d,y]),{collectionProps:b}=(0,l.useSelectableCollection)({ref:u,selectionManager:m,keyboardDelegate:g,selectOnFocus:"automatic"===h,disallowEmptySelection:!0,scrollRef:u,linkBehavior:"selection"}),v=(0,n.useId)();s.set(i,v);let w=(0,o.useLabels)({...e,id:v});return{tabListProps:{...(0,t.mergeProps)(b,w),role:"tablist","aria-orientation":d,tabIndex:void 0}}}],155391);var u=e.i(907488),d=e.i(552739),h=e.i(725749),f=e.i(91534);e.s(["useTab",0,function(e,s,r){let{key:n,isDisabled:o,shouldSelectOnPressUp:a}=e,{selectionManager:l,selectedKey:c}=s,m=n===c,p=o||s.isDisabled||s.selectionManager.isDisabled(n),y=s.collection.getItem(n),{itemProps:g,isPressed:b}=(0,f.useSelectableItem)({selectionManager:l,key:n,ref:r,isDisabled:p,shouldSelectOnPressUp:a??y?.props.href!=null,linkBehavior:"selection"}),v=i(s,n,"tab"),w=i(s,n,"tabpanel"),{tabIndex:A}=g,S=(0,u.filterDOMProps)(y?.props,{labelable:!0});delete S.id;let x=(0,h.useLinkProps)(y?.props),{focusableProps:E}=(0,d.useFocusable)({...y?.props,isDisabled:p},r);return{tabProps:(0,t.mergeProps)(S,E,x,g,{id:v,"aria-selected":m,"aria-disabled":p||void 0,"aria-controls":m?w:void 0,tabIndex:p?void 0:A,role:"tab"}),isSelected:m,isDisabled:p,isPressed:b}}],468766)},900844,e=>{"use strict";
3var t=e.i(647712),s=e.i(651325);e.s(["useUpdateEffect",0,function(e,i){let r=(0,s.useRef)(!0),n=(0,s.useRef)(null),o=(0,t.useEffectEvent)(e);(0,s.useEffect)(()=>(r.current=!0,()=>{r.current=!1}),[]),(0,s.useEffect)(()=>{let e=n.current;r.current?r.current=!1:(!e||i.some((t,s)=>!Object.is(t,e[s])))&&o(),n.current=i},i)}])},459063,e=>{"use strict";var t=e.i(651325);let s=(0,t.createContext)(null),i={didCatch:!1,error:null};class r extends t.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=i}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(...e){let{didCatch:t}=this.state;t&&(this.props.onReset?.({args:e,reason:"imperative-api"}),this.setState(i))}componentDidCatch(e,t){this.props.onError?.(e,t)}componentDidUpdate(e,t){let{didCatch:s}=this.state,{resetKeys:r}=this.props;s&&t.didCatch&&function(e=[],t=[]){return e.length!==t.length||e.some((e,s)=>!Object.is(e,t[s]))}(e.resetKeys,r)&&(this.props.onReset?.({next:r,prev:e.resetKeys,reason:"keys"}),this.setState(i))}render(){let{children:e,fallbackRender:i,FallbackComponent:r,fallback:n}=this.props,{didCatch:o,error:a}=this.state,l=e;if(o){let e={error:a,resetErrorBoundary:this.resetErrorBoundary};if("function"==typeof i)l=i(e);else if(r)l=(0,t.createElement)(r,e);else if(void 0!==n)l=n;else throw a}return(0,t.createElement)(s.Provider,{value:{didCatch:o,error:a,resetErrorBoundary:this.resetErrorBoundary}},l)}}e.s(["ErrorBoundary",0,r])},554955,(e,t,s)=>{e.e,function(e,t){"use strict";var s,i=t&&"object"==typeof t&&"default"in t?t:{default:t};function r(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),s.push.apply(s,i)}return s}function n(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?r(Object(s),!0).forEach(function(t){o(e,t,s[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):r(Object(s)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))})}return e}function o(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function a(e,t){if(null==e)return{};var s,i,r=function(e,t){if(null==e)return{};var s,i,r={},n=Object.keys(e);for(i=0;i<n.length;i++)s=n[i],t.indexOf(s)>=0||(r[s]=e[s]);return r}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(i=0;i<n.length;i++)s=n[i],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(r[s]=e[s])}return r}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var s,i,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n=[],o=!0,a=!1;try{for(r=r.call(e);!(o=(s=r.next()).done)&&(n.push(s.value),!t||n.length!==t);o=!0);}catch(e){a=!0,i=e}finally{try{o||null==r.return||r.return()}finally{if(a)throw i}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var s=Object.prototype.toString.call(e).slice(8,-1);if("Object"===s&&e.constructor&&(s=e.constructor.name),"Map"===s||"Set"===s)return Array.from(e);if("Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return c(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var s=0,i=Array(t);s<t;s++)i[s]=e[s];return i}var u=["src","checkForExisting"],d={},h=i.default.useEffect,f=i.default.useState,m=function(e){var t=document.querySelector('script[src="'.concat(e,'"]'));if(t)return d[e]={loading:!1,error:null,scriptEl:t,subscribers:0}},p="u">typeof window&&void 0!==window.document;function y(e){var t=e.src,s=e.checkForExisting,i=void 0!==s&&s,r=a(e,u),n=t?d[t]:void 0;!n&&i&&t&&p&&(n=m(t));var o=l(f(n?n.loading:!!t),2),c=o[0],y=o[1],g=l(f(n?n.error:null),2),b=g[0],v=g[1],w=l(f(!1),2),A=w[0],S=w[1];return h(function(){if(p&&t&&!A&&!b){(n=d[t])||!i||(n=m(t)),n?e=n.scriptEl:((e=document.createElement("script")).src=t,Object.keys(r).forEach(function(t){void 0===e[t]?e.setAttribute(t,r[t]):e[t]=r[t]}),n=d[t]={loading:!0,error:null,scriptEl:e,subscribers:0});var e,s=n;s.subscribers+=1;var o=function(){s.loading=!1,y(!1),S(!0)},a=function(e){s.error=e,v(e)};return e.addEventListener("load",o),e.addEventListener("error",a),document.body.appendChild(e),function(){e.removeEventListener("load",o),e.removeEventListener("error",a),s.subscribers-=1,s.loading&&0===s.subscribers&&(e.remove(),d[t]===s&&delete d[t])}}},[t]),[c,b]}var g=function(e,t,s){var i={};return delete Object.assign(i,e,o({},s,e[t]))[t],i},b=function(e,t){var s={plaid:null,open:!1,onExitCallback:null};if("u"<typeof window||!window.Plaid)throw Error("Plaid not loaded");return s.plaid=t(n(n({},e),{},{onSuccess:function(t,i){s.open=!1,e.onSuccess(t,i)},onExit:function(t,i){s.open=!1,e.onExit&&e.onExit(t,i),s.onExitCallback&&s.onExitCallback()}})),{open:function(){s.plaid&&(s.open=!0,s.onExitCallback=null,s.plaid.open())},submit:function(e){s.plaid&&s.plaid.submit(e)},exit:function(e,t){if(!s.open||!s.plaid){t&&t();return}s.onExitCallback=t||null,s.plaid.exit(e),e&&e.force&&(s.open=!1)},destroy:function(){s.plaid&&(s.plaid.destroy(),s.plaid=null)}}},v="https://cdn.plaid.com/link/v2/stable/link-initialize.js",w=["cspNonce"],A=function(){},S=i.default.useEffect,x=i.default.useState,E=function(e){var t=l(y(n({src:v,checkForExisting:!0},e.cspNonce?{nonce:e.cspNonce}:{})),2),s=t[0],i=t[1],r=l(x(null),2),o=r[0],c=r[1],u=l(x(!1),2),d=u[0],h=u[1],f=(e.product||[]).slice().sort().join(",");return S(function(){if(!s&&(e.token||e.publicKey||e.receivedRedirectUri)){if(i||!window.Plaid)return void console.error("Error loading Plaid",i);null!=o&&o.exit({force:!0},function(){return o.destroy()}),e.cspNonce;var t,r,l=(t=n(n({},a(e,w)),{},{onLoad:function(){h(!0),e.onLoad&&e.onLoad()}}),r=window.Plaid.create,b(g(t,"publicKey","key"),r));return c(l),function(){return l.exit({force:!0},function(){return l.destroy()})}}},[s,i,e.publicKey,e.token,f]),{error:i,ready:null!=o&&(!s||d),submit:o?o.submit:A,exit:o?o.exit:A,open:o?o.open:function(){e.token||console.warn("react-plaid-link: You cannot call open() without a valid token supplied to usePlaidLink. This is a no-op.")}}},O=["children","style","className"],I=function(e){var t=e.children,s=e.style,r=e.className,o=E(n({},a(e,O))),l=o.error,c=o.open;return i.default.createElement("button",{disabled:!!l,type:"button",className:r,style:n({padding:"6px 4px",outline:"none",background:"#FFFFFF",border:"2px s
3olid #F1F1F1",borderRadius:"4px"},s),onClick:function(){return c()}},t)};I.displayName="PlaidLink";var C=i.default.useEffect,T=i.default.useMemo,k=i.default.useRef;e.PlaidLinkStableEvent=void 0,(s=e.PlaidLinkStableEvent||(e.PlaidLinkStableEvent={})).OPEN="OPEN",s.EXIT="EXIT",s.HANDOFF="HANDOFF",s.SELECT_INSTITUTION="SELECT_INSTITUTION",s.ERROR="ERROR",s.BANK_INCOME_INSIGHTS_COMPLETED="BANK_INCOME_INSIGHTS_COMPLETED",s.IDENTITY_MATCH_FAILED="IDENTITY_MATCH_FAILED",s.IDENTITY_MATCH_PASSED="IDENTITY_MATCH_PASSED",s.IDENTITY_VERIFICATION_PASS_SESSION="IDENTITY_VERIFICATION_PASS_SESSION",s.IDENTITY_VERIFICATION_FAIL_SESSION="IDENTITY_VERIFICATION_FAIL_SESSION",s.LAYER_READY="LAYER_READY",s.LAYER_NOT_AVAILABLE="LAYER_NOT_AVAILABLE",s.LAYER_AUTOFILL_NOT_AVAILABLE="LAYER_AUTOFILL_NOT_AVAILABLE",e.PlaidEmbeddedLink=function(e){var t=e.style,s=e.className,r=e.onSuccess,o=e.onExit,a=e.onLoad,c=e.onEvent,u=e.token,d=e.receivedRedirectUri,h=T(function(){return{onSuccess:r,onExit:o,onLoad:a,onEvent:c,token:u,receivedRedirectUri:d}},[r,o,a,c,u,d]),f=l(y(n({src:v,checkForExisting:!0},e.cspNonce?{nonce:e.cspNonce}:{})),2),m=f[0],p=f[1],g=k(null);return C(function(){if(!m){if(p||!window.Plaid)return void console.error("Error loading Plaid",p);if(null==h.token||""==h.token)return void console.error("A token is required to initialize embedded Plaid Link");var e=window.Plaid.createEmbedded(n({},h),g.current).destroy;return function(){e()}}},[m,p,h,g]),i.default.createElement("div",{style:t,className:s,ref:g})},e.PlaidLink=I,e.usePlaidLink=E,Object.defineProperty(e,"__esModule",{value:!0})}(s,e.r(651325))},579900,e=>{"use strict";var t=e.i(651325);function s(e){return null}s.getCollectionNode=function*(e,s){var i;let{childItems:r,title:n,children:o}=e,a=e.title||e.children,l=e.textValue||("string"==typeof a?a:"")||e["aria-label"]||"";l||s?.suppressTextValueWarning,yield{type:"item",props:e,rendered:a,textValue:l,"aria-label":e["aria-label"],hasChildNodes:null!=(i=e).hasChildItems?i.hasChildItems:!!(i.childItems||i.title&&t.default.Children.count(i.children)>0),*childNodes(){if(r)for(let e of r)yield{type:"item",value:e};else if(n){let e=[];t.default.Children.forEach(o,t=>{e.push({type:"item",element:t})}),yield*e}}}},e.s(["Item",0,s])},933939,(e,t,s)=>{"use strict";var i=e.r(651325),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=i.useSyncExternalStore,o=i.useRef,a=i.useEffect,l=i.useMemo,c=i.useDebugValue;s.useSyncExternalStoreWithSelector=function(e,t,s,i,u){var d=o(null);if(null===d.current){var h={hasValue:!1,value:null};d.current=h}else h=d.current;var f=n(e,(d=l(function(){function e(e){if(!a){if(a=!0,n=e,e=i(e),void 0!==u&&h.hasValue){var t=h.value;if(u(t,e))return o=t}return o=e}if(t=o,r(n,e))return t;var s=i(e);return void 0!==u&&u(t,s)?(n=e,t):(n=e,o=s)}var n,o,a=!1,l=void 0===s?null:s;return[function(){return e(t())},null===l?void 0:function(){return e(l())}]},[t,s,i,u]))[0],d[1]);return a(function(){h.hasValue=!0,h.value=f},[f]),c(f),f}},46450,(e,t,s)=>{"use strict";t.exports=e.r(933939)},38856,e=>{"use strict";var t=e.i(651325);let s=(e,t)=>{let s=e instanceof Map?e:new Map(e.entries()),i=t instanceof Map?t:new Map(t.entries());if(s.size!==i.size)return!1;for(let[e,t]of s)if(!i.has(e)||!Object.is(t,i.get(e)))return!1;return!0};e.s(["useShallow",0,function(e){let i=t.default.useRef(void 0);return t=>{let r=e(t);return!function(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;if(Symbol.iterator in e&&Symbol.iterator in t){if("entries"in e&&"entries"in t)return s(e,t);let i=e[Symbol.iterator](),r=t[Symbol.iterator](),n=i.next(),o=r.next();for(;!n.done&&!o.done;){if(!Object.is(n.value,o.value))return!1;n=i.next(),o=r.next()}return!!n.done&&!!o.done}return s({entries:()=>Object.entries(e)},{entries:()=>Object.entries(t)})}(i.current,r)?i.current=r:i.current}}],38856)},154007,e=>{"use strict";var t=e.i(596667),s=e.i(228454);e.s(["getOrganizationId",0,function(e){return t.IS_EU||e===s.Subdomain.Eu?"2":"1"}])},515585,986232,158677,373320,e=>{"use strict";
3var t=e.i(881821),s=e.i(651325),i=e.i(558114),r=e.i(185046),n=e.i(612190),o=e.i(417648),a=e.i(218807),l=e.i(820542),c=e.i(235819);e.i(957163);var u=e.i(525482);e.i(275633);var d=e.i(772992);e.i(660517);var h=e.i(723502),f=e.i(885884),m=e.i(766181),p=e.i(800749);e.i(717433);var y=e.i(557496);let g=(0,m.cva)("bg-base-background-l4 text-high-emphasis flex items-center justify-center rounded-full border border-transparent tabular-nums",{variants:{size:{default:"size-[34px]",sm:"size-6"}},defaultVariants:{size:"default"}}),b=(0,m.cva)("text-high-emphasis",{variants:{iconSize:{default:"size-5",sm:"size-3.5"}},defaultVariants:{iconSize:"default"}});function v({size:e,iconSize:s,noTooltip:n}){let o="sm"===e?1.4:1.6,a=(0,t.jsx)(f.default,{src:"/coins/eur.svg",alt:r.i18n._({id:"-RcdAS"}),width:("sm"===e?7:10)*o,height:("sm"===e?7:10)*o,quality:95});return(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("div",{className:(0,u.cn)(g({size:e})),children:(0,t.jsx)(p.LandmarkIcon,{className:(0,u.cn)(b({iconSize:s??("sm"===e?"sm":"default")}))})}),!0!==n?(0,t.jsx)(y.BpxTooltip,{text:(0,t.jsx)(i.Trans,{id:"ZanrGZ"}),buttonClassName:"absolute -right-0.5 -bottom-0.5",offset:2,placement:"bottom left",children:a}):(0,t.jsx)("div",{className:"absolute -right-0.5 -bottom-0.5",children:a})]})}e.s(["BankEurIcon",0,v],986232);let w=(0,m.cva)("bg-base-background-l4 text-high-emphasis flex items-center justify-center rounded-full border border-transparent tabular-nums",{variants:{size:{default:"size-[34px]",sm:"size-6"}},defaultVariants:{size:"default"}}),A=(0,m.cva)("text-high-emphasis",{variants:{iconSize:{default:"size-5",sm:"size-3.5"}},defaultVariants:{iconSize:"default"}});function S({size:e,iconSize:s,noTooltip:n}){let o="sm"===e?1.4:1.6,a=(0,t.jsx)(f.default,{src:"/coins/usd.svg",alt:r.i18n._({id:"txocgQ"}),width:("sm"===e?7:10)*o,height:("sm"===e?7:10)*o,quality:95});return(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("div",{className:(0,u.cn)(w({size:e})),children:(0,t.jsx)(p.LandmarkIcon,{className:(0,u.cn)(A({iconSize:s??("sm"===e?"sm":"default")}))})}),!0!==n?(0,t.jsx)(y.BpxTooltip,{text:(0,t.jsx)(i.Trans,{id:"hH76Ef"}),buttonClassName:"absolute -right-0.5 -bottom-0.5",offset:2,placement:"bottom left",children:a}):(0,t.jsx)("div",{className:"absolute -right-0.5 -bottom-0.5",children:a})]})}e.s(["BankUsdIcon",0,S],158677);var x=e.i(185619),E=e.i(325652),O=e.i(256362),I=e.i(489764),C=e.i(67944);e.i(138553);var T=e.i(20732),k=e.i(713794),R=e.i(953465);let M=e=>{let{className:i,selectedAsset:r,maxAmount:n,error:o,onSelectToken:d,onSetMax:h,isCash:f,isExternal:m,cashCurrency:p,control:y,name:g,rules:b,defaultValue:v,shouldUnregister:w,getInputRef:A,onBlur:S,onFocus:x,thousandSeparator:C=",",allowNegative:T=!1,onValueChange:k,variant:R="default",label:M,...q}=e,_=(0,s.useRef)(null);return(0,t.jsxs)("div",{children:[(0,t.jsxs)(a.Group,{className:(0,u.cn)("bg-base-background-l3 border-1.5 relative flex items-center gap-3 rounded-xl border-solid",o?"border-red-border":"focus-within:border-accent-blue border-transparent","secondary"===R?"p-4":"py-2.5 pr-3 pl-3.5",i),onBlur:S,onFocus:x,onClick:()=>_.current?.focus(),children:[(0,t.jsxs)(I.BpxYStack,{className:(0,u.cn)("flex-1","secondary"===R?"gap-3":"gap-2"),children:["secondary"===R&&(0,t.jsxs)(I.BpxXStack,{justified:"between",alignment:"center",children:[M?(0,t.jsx)(E.BpxLabel,{size:"sm",className:"text-high-emphasis",htmlFor:g,children:M}):null,(0,t.jsx)(P,{maxAmount:n,selectedAsset:r,isExternal:m,onSetMax:h})]}),(0,t.jsxs)(I.BpxXStack,{alignment:"center",justified:"between",children:[(0,t.jsx)(l.Controller,{control:y,name:g,rules:b,defaultValue:v,shouldUnregister:w,render:({field:e})=>(0,t.jsxs)(I.BpxYStack,{className:"gap-1",children:[(0,t.jsx)(c.NumericFormat,{...q,className:(0,u.cn)("placeholder-low-emphasis flex-1 border-0 bg-transparent p-0 focus:ring-0","secondary"===R?"":"text-sm"),thousandSeparator:C,allowNegative:T,value:e.value??"",name:e.name,id:e.name,onBlur:t=>{e.onBlur(),S?.(t)},onValueChange:(t,s)=>{e.onChange(t.value),k?.(t,s)},getInputRef:t=>{_.current=t,e.ref(t),"function"==typeof A?A(t):A&&(A.current=t)}}),"secondary"===R&&(0,t.jsx)(D,{amount:e.value,symbol:r?.symbol})]})}),"secondary"===R&&(0,t.jsx)(j,{selectedAsset:r,onSelectToken:d,isCash:f,isExternal:m,cashCurrency:p})]}),"default"===R&&(0,t.jsx)(P,{maxAmount:n,selectedAsset:r,isExternal:m,onSetMax:h})]}),"default"===R&&(0,t.jsx)(j,{selectedAsset:r,onSelectToken:d,isCash:f,isExternal:m,cashCurrency:p,symbolClassName:"text-sm"})]}),o?(0,t.jsx)(O.BpxValidationErrorText,{error:o}):null]})};function P({maxAmount:e,selectedAsset:s,isExternal:r,onSetMax:n,maximumFractionDigits:o=9,isMasked:a}){return e?(0,t.jsx)(x.BpxButtonLink,{className:`flex text-xs font-normal ${n?"text-accent-blue cursor-pointer":"text-med-emphasis hover:text-high-emphasis"}`,onPress:()=>{n?.(e.toString())},isDisabled:!n,children:(0,t.jsx)(i.Trans,{id:"sLVQ31",components:{0:(0,t.jsx)(d.AmountDisplay,{value:Number(e),symbol:s?.displaySymbol,maximumFractionDigits:o,isExternal:r,isMasked:a})}})}):null}function j({selectedAsset:e,onSelectToken:s,isCash:i,isExternal:a,cashCurrency:l,symbolClassName:c}){return(0,t.jsxs)(o.Button,{onPress:s,className:"text-med-emphasis hover:text-high-emphasis group flex gap-1",isDisabled:!s,children:[i?"EUR"===l?(0,t.jsx)(v,{size:"default",iconSize:"default",noTooltip:!0}):(0,t.jsx)(S,{size:"default",iconSize:"default",noTooltip:!0}):e?(0,t.jsx)(h.AssetAvatar,{asset:e,size:24,hideBorder:!0,hideName:!0,isExternal:a,symbolClassName:c,className:"gap-2"}):r.i18n._({id:"BLvvoR"}),s?(0,t.jsx)(n.ChevronDown,{className:"text-base-icon group-hover:text-base-icon-hover size-5 transition-colors"}):null]})}
3function D({amount:e,symbol:i}){let{data:r}=(0,R.useTickerData)(),{data:n}=(0,T.useBltPrice)(),o=(0,s.useMemo)(()=>i?(0,C.getPriceFromTickerData)(i,r,{[k.CustodyAsset.BLT]:n}):"0",[i,r,n]),a=(0,s.useMemo)(()=>Number(e)*Number(o),[e,o]);return(0,t.jsx)(d.AmountDisplay,{className:"text-med-emphasis text-xs font-medium",value:a,style:"currency"})}M.displayName="AssetAmountInput",e.s(["AssetAmountInput",0,M,"AvailableAmountButton",0,P],373320),e.s([],515585)},741535,e=>{"use strict";var t=e.i(881821),s=e.i(651325),i=e.i(185046),r=e.i(154007);e.i(717433);var n=e.i(637936),o=e.i(900027),a=e.i(855968),l=e.i(417163),c=e.i(489764),u=e.i(970783),d=e.i(884182);e.i(191377);var h=e.i(228454),f=e.i(31421),m=e.i(343990),p=e.i(521013);let y=(0,s.memo)(({side:e,symbol:y,isDisabled:g,isLoading:b,marketType:v,onClick:w,children:A,...S})=>{let x="futures"===v,E="prediction"===v,O="spot"===v,{data:I}=(0,m.useGetPredictionEvents)(void 0,{query:{enabled:!!y&&E}}),{ukCanTrade:C}=(0,d.useUkKycStatus)(),{data:T,isFetched:k}=(0,u.useUser)(),R=T?.permissions?.isPerpEnabled,M=T?.permissions?.isSpotEnabled,P=T?.permissions?.isPredictionEnabled,{data:j,isLoading:D}=(0,f.useGetCountryPermissions)({query:{enabled:x&&!1===R||O&&!1===M||E&&!1===P},request:{headers:{"X-Organization-Id":(0,r.getOrganizationId)((0,h.getSubdomain)())}}}),q=(0,s.useMemo)(()=>I?.flatMap(e=>e.predictionMarkets).find(e=>e.marketSymbol===y),[I,y]),_=(0,s.useMemo)(()=>{if(!q?.yesOutcomeLabel)return i.i18n._({id:"l75CjT"});let e=q.yesOutcomeLabel;return e[0].toUpperCase()+e.slice(1).toLowerCase()},[q?.yesOutcomeLabel]),F=(0,s.useMemo)(()=>{if(!q?.noOutcomeLabel)return i.i18n._({id:"1UzENP"});let e=q.noOutcomeLabel;return e[0].toUpperCase()+e.slice(1).toLowerCase()},[q?.noOutcomeLabel]),N=i.i18n._({id:"otaTjg"}),K=i.i18n._({id:"RRXpo1"});if(!k)return(0,t.jsx)(a.BpxSkeleton,{className:"h-12 w-full rounded-xl"});if(!T&&k)return(0,t.jsxs)(c.BpxYStack,{className:"gap-3",children:[(0,t.jsx)(o.BpxLinkButton,{href:"/signup",children:i.i18n._({id:"W-blxp"})}),(0,t.jsx)(o.BpxLinkButton,{variant:"secondary",href:"/login",children:i.i18n._({id:"OpTPq_"})})]});let{isPerpEnabled:B,isPredictionEnabled:L,isSpotEnabled:z}=j?.find(e=>e.countryCode===T?.countryCode)??{},U=e===p.Side.Bid?"bg-green-primary-button-background text-green-primary-button-text":e===p.Side.Ask?"bg-red-primary-button-background text-red-primary-button-text":"";if(E&&!1===P)return(0,t.jsx)(n.BpxButton,{isDisabled:!0,className:`text-xs whitespace-nowrap opacity-50! ${U}`,children:D?(0,t.jsx)(l.BpxSpinner,{className:"text-base-background-l0 mx-auto"}):!1===L?i.i18n._({id:"Jn-tJ6"}):i.i18n._({id:"MxqQb0"})});if(x&&!1===R)return(0,t.jsx)(n.BpxButton,{isDisabled:!0,className:`text-xs whitespace-nowrap opacity-50! ${U}`,children:D?(0,t.jsx)(l.BpxSpinner,{className:"text-base-background-l0 mx-auto"}):!1===B?i.i18n._({id:"HRXKBG"}):i.i18n._({id:"LQRleA"})});if(O&&!1===M)return(0,t.jsx)(n.BpxButton,{isDisabled:!0,className:`text-xs whitespace-nowrap opacity-50! ${U}`,children:D?(0,t.jsx)(l.BpxSpinner,{className:"text-base-background-l0 mx-auto"}):!1===z?i.i18n._({id:"Ugq7GF"}):i.i18n._({id:"-Jxh1c"})});let Q=x?i.i18n._({id:"8baerN"}):E?`${_} / ${N}`:i.i18n._({id:"qiOIiY"}),H=x?i.i18n._({id:"2GBHZF"}):E?`${F} / ${K}`:i.i18n._({id:"xNB0TS"});return(0,t.jsx)(n.BpxButton,{...S,onClick:w,isDisabled:g||!C||b,className:`${U} ${g?"opacity-50!":"active:scale-98"}`,children:(0,t.jsx)(c.BpxXStack,{className:"items-center justify-center",children:b?(0,t.jsx)(l.BpxSpinner,{className:"text-base-950!"}):A||(e===p.Side.Bid?Q:H)})})});e.s(["BuySellButton",0,y])},602293,402762,e=>{"use strict";var t=e.i(881821),s=e.i(462280);e.i(717433);var i=e.i(417163);e.s(["LoadingSpinner",0,function({className:e,large:r,spinnerClassName:n}){return(0,t.jsx)("div",{className:(0,s.twMerge)("flex h-full flex-1 items-center justify-center",e),children:r?(0,t.jsx)(i.BpxSpinner,{size:64,strokeWidth:2,className:n}):(0,t.jsx)(i.BpxSpinner,{className:n})})}],402762),e.s([],602293)},979018,e=>{"use strict";var t=e.i(881821),s=e.i(651325),i=e.i(185046),r=e.i(925920);e.i(717433);var n=e.i(256362),o=e.i(429575);let a=s.default.forwardRef(({minimumValue:e,minimumValueError:s,isDisabled:a,...l},c)=>{let{value:u,maxDecimals:d,suffix:h}=l,f=0===u.replace(/[-0.]/g,"").length,m=e||(d?Number(`0.${"0".repeat(d-1)}1`):0),p=!f&&m&&Math.abs(Number(u))<Number(m),y=h?` ${(0,r.getDisplayAssetSymbol)(h)}`:"",g=i.i18n._({id:"Bk6Jff",values:{minimumValueWithDefault:m,symbol
3:y}});return(0,t.jsx)(o.FormattedNumberInput,{ref:c,...l,isDisabled:a,children:p?(0,t.jsx)(n.BpxValidationErrorText,{error:{type:"min",message:s||g}}):null})});a.displayName="ValidatedFormattedNumberInput",e.s(["ValidatedFormattedNumberInput",0,a])},84035,e=>{"use strict";var t=e.i(881821),s=e.i(651325),i=e.i(461636),r=e.i(702574),n=e.i(397943),o=e.i(631712);e.i(957163);var a=e.i(525482);function l({items:e,listBoxProps:r,listBoxRef:n,state:o,hideCheckIcon:a,size:u="default",focusVariant:d="default",virtualize:h,optionClassName:f}){let m=(0,i.useVirtualizer)({count:e.length,getScrollElement:()=>h.parentRef.current,estimateSize:()=>h.estimateSize,overscan:h.overscan??10}),p=o.selectionManager.focusedKey;(0,s.useEffect)(()=>{if(null!=p){let t=e.findIndex(e=>e.key===p);-1!==t&&m.scrollToIndex(t,{align:"auto"})}},[p,e,m]);let y=m.getVirtualItems(),g=m.getTotalSize(),b=y.length>0?y[0].start:0,v=y.length>0?g-y[y.length-1].end:0;return(0,t.jsxs)("ul",{...r,ref:n,className:"w-full outline-hidden",children:[b>0&&(0,t.jsx)("li",{style:{height:b},"aria-hidden":!0}),y.map(s=>{let i=e[s.index];return(0,t.jsx)(c,{item:i,state:o,hideCheckIcon:a,size:u,focusVariant:d,optionClassName:f},i.key)}),v>0&&(0,t.jsx)("li",{style:{height:v},"aria-hidden":!0})]})}function c({item:e,state:i,hideCheckIcon:n,size:l="default",focusVariant:u="default",optionClassName:d}){let h=(0,s.useRef)(null),{optionProps:f,isDisabled:m,isSelected:p,isFocused:y}=(0,o.useOption)({key:e.key},i,h),g="function"==typeof d?d({item:e,isDisabled:m,isFocused:y,isSelected:p}):d;return(0,t.jsxs)("li",{...f,ref:h,className:(0,a.cn)("text-high-emphasis flex items-center justify-between px-3 text-sm font-normal outline-hidden","sm"===l?"py-1":"py-2.5",{"bg-base-background-l4":y&&"default"===u,"bg-base-background-l3 rounded-xl":y&&"rounded"===u},m?"cursor-default":"hover:cursor-pointer",g),children:[e.rendered,p&&!n?(0,t.jsx)(r.CheckIcon,{"aria-hidden":"true",className:"h-4 w-4"}):null]})}e.s(["BpxListBox",0,function(e){let i=(0,s.useRef)(null),{listBoxRef:r=i,state:o,hideCheckIcon:a,separatorIndexes:u,separators:d,range:h,size:f="default",focusVariant:m="default",virtualize:p,optionClassName:y}=e,{listBoxProps:g}=(0,n.useListBox)(e,o,r);if(p){let e=[...o.collection].slice(h?.[0],h?.[1]);return(0,t.jsx)(l,{items:e,listBoxProps:g,listBoxRef:r,state:o,hideCheckIcon:a,size:f,focusVariant:m,virtualize:p,optionClassName:y})}return(0,t.jsx)("ul",{...g,ref:r,className:"w-full outline-hidden",children:[...o.collection].slice(h?.[0],h?.[1]).map((e,i)=>(0,t.jsxs)(s.default.Fragment,{children:[u?.includes(i)&&(d?.[u.findIndex(e=>e===i)]??(0,t.jsx)("div",{className:"border-base-border-light mb-1 border-b pt-1"})),(0,t.jsx)(c,{item:e,state:o,hideCheckIcon:a,size:f,focusVariant:m,optionClassName:y})]},e.key))})}])},97489,e=>{"use strict";let t=[[1,4,7,12,14,17,19,21,25,28],[2,5,10,18,16,20,22,23,26,29],[3,6,8,9,11,13,15,24,27,30]],s=t[0].length,i=[{id:1,question:"What are the core cryptoasset services that Backpack Exchange offers?",options:[{id:"A",text:"Cryptoasset exchange services",correctAnswer:!0},{id:"B",text:"Cryptoasset custody and advisory services",correctAnswer:!1},{id:"C",text:"Managing portfolios of cryptoasset investments",correctAnswer:!1},{id:"D",text:"Issuing and marketing cryptoassets",correctAnswer:!1}],userAnswer:null,correctAnswerId:"A"},{id:2,question:"Which of the following services are provided by Backpack Exchange?",options:[{id:"A",text:"Cryptoasset issuance services",correctAnswer:!1},{id:"B",text:"Cryptoasset investment advisory services",correctAnswer:!1},{id:"C",text:"Managing portfolios of cryptoasset investments",correctAnswer:!1},{id:"D",text:"Cryptoasset exchange services",correctAnswer:!0}],userAnswer:null,correctAnswerId:"D"},{id:3,question:"What can you do on Backpack Exchange?",options:[{id:"A",text:"Obtaining advice about which cryptoasset to buy and sell.",correctAnswer:!1},{id:"B",text:"Buying and selling cryptoassets.",correctAnswer:!0},{id:"C",text:"Issue new cryptoassets.",correctAnswer:!1},{id:"D",text:"Securely store cryptoassets with third-party custodians.",correctAnswer:!1}],userAnswer:null,correctAnswerId:"B"},{id:4,question:"What might happen to your ability to manage and access your cryptoassets if Backpack Exchange becomes insolvent or ceases operations?",options:[{id:"A",text:"I retain beneficial ownership of the cryptoassets. However, my access to the cryptoassets could be delayed or restricted due to the insolvency process, and it may take time before I can regain control of my assets.",correctAnswer:!0},{id:"B",text:"I retain beneficial ownership of my crypto assets and I can retrieve and access them at any time.",correctAnswer:!1},{id:"C",text:"My cryptoassets would automatically be transferred to a new exchange platform of my choosing without any interruptions.",correctAnswer:!1},{id:"D",text:"There would be no impact on my access to cryptoassets, as Backpack Exchange would continue to manage my assets despite the insolvency.",correctAnswer:!1}],userAnswer:null,correctAnswerId:"A"},{id:5,question:"If Backpack Exchange fails, how might this affect the management and administration of your cryptoassets?",options:[{id:"A",text:"I retain beneficial ownership of my cryptoassets. My cryptoassets would remain fully accessible and managed as usual by a third-party service provider.",correctAnswer:!1},{id:"B",text:"While I maintain the beneficial ownership of the cryptoassets, management and administration of my cryptoassets could be disrupted, leading to delays or limitations in accessing or moving my assets.",correctAnswer:!0},{id:"C",text:"I would lose all rights to the management as well as the ownership of my cryptoassets, and they would be permanently frozen by the exchange.",correctAnswer:!1},{id:"D",text:"The government would step in and manage my cryptoassets without any changes in service.",correctAnswer:!1}],userAnswer:null,correctAnswerId:"B"},{id:6,question:"If Backpack Exchange fails or becomes insolvent, what impact could this have on your ability to access your cryptoassets?",options:[{id:"A",text:"I would lose ownership of my cryptoassets, which will automatically be transferred to a government agency that will manage them until the issue is resolved.",correctAnswer:!1},{id:"B",text:"Although I retain beneficial ownership of my cryptoassets, I may face delays in accessing my cryptoassets due to legal proceedings or asset recovery processes.",correctAnswer:!0},{id:"C",text:"My cryptoassets could be frozen indefinitely, with no possibility of retrieval.",correctAnswer:!1},{id:"D",text:"My cryptoassets are insured up to their full value, so I will face no loss or delay in accessing them regardless of Backpack Exchangeâs insolvency.",correctAnswer:!1}],userAnswer:null,correctAnswerId:"B"},{id:7,question:"When you purchase cryptoassets, what are your potential losses?",options:[{id:"A",text:"I could lose all my money as the value of the cryptoassets can change rapidly, decrease, and potentially even fall to zero.",correctAnswer:!0},{id:"B",text:"I am protected up to £85,000 under the Financial Services Compensation Scheme (FSCS).",correctAnswer:!1},{id:"C",text:"My losses are covered by insurance up to a certain amount.",correctAnswer:!1}
3,{id:"D",text:"I could lose a portion of my money depending on market conditions.",correctAnswer:!1}],userAnswer:null,correctAnswerId:"A"},{id:8,question:"Which factor is most likely to impact your ability to sell your cryptoassets on Backpack Exchange during periods of market volatility?",options:[{id:"A",text:"The exchange having too many registered users actively trading at once.",correctAnswer:!1},{id:"B",text:"My portfolio being well-diversified across different cryptoassets.",correctAnswer:!1},{id:"C",text:"Market illiquidity, where there are few buyers, making it difficult to sell my cryptoassets.",correctAnswer:!0},{id:"D",text:"The exchange automatically converting my cryptoassets into fiat currency.",correctAnswer:!1}],userAnswer:null,correctAnswerId:"C"},{id:9,question:"Which of the following describes a risk associated with trading cryptoassets on the Backpack Exchange?",options:[{id:"A",text:"Cyber-attacks.",correctAnswer:!0},{id:"B",text:"Access to exclusive trading tools.",correctAnswer:!1},{id:"C",text:"Low returns.",correctAnswer:!1},{id:"D",text:"Volatile markets.",correctAnswer:!1}],userAnswer:null,correctAnswerId:"A"},{id:10,question:"Which best describes cryptoasset volatility relative to volatility of other publicly traded asset classes?",options:[{id:"A",text:"Cryptoassets are generally more volatile than other publicly traded asset classes, and I can lose all of my money.",correctAnswer:!0},{id:"B",text:"Cryptoassets are generally less volatile than other publicly traded asset classes, and the risk of my losing all my money is low.",correctAnswer:!1},{id:"C",text:"Cryptoassets have a similar volatility profile to other publicly traded asset classes, and the risk of my losing all my money is similar to publicly traded stock.",correctAnswer:!1},{id:"D",text:"Cryptoassets have unpredictable volatility that can vary by market.",correctAnswer:!1}],userAnswer:null,correctAnswerId:"A"},{id:11,question:"How frequently might the value of your cryptoasset investments change?",options:[{id:"A",text:"Although global cryptoasset markets operate 24/7/365, the cryptoassets held in my Backpack Exchange account will only trade during normal UK market hours and their value will not change outside these times.",correctAnswer:!1},{id:"B",text:"Cryptoasset markets generally operate in line with traditional financial markets, meaning the value of my cryptoasset investments will only change during normal market hours.",correctAnswer:!1},{id:"C",text:"Cryptoasset markets operate 24/7/365 and the value of my cryptoasset investments could change at any time day or night, and the value might go to zero at any time.",correctAnswer:!0},{id:"D",text:"It depends on the jurisdiction of the primary exchange that the crypto-asset is listed on.",correctAnswer:!1}],userAnswer:null,correctAnswerId:"C"},{id:12,question:"Are material information about cryptoassets always publicly available?",options:[{id:"A",text:"Yes because cryptoassets are similar to publicly traded securities.",correctAnswer:!1},{id:"B",text:"Yes because the issuer of the cryptoassets is obliged to publish them.",correctAnswer:!1},{id:"C",text:"No, material information about crypto assets are not always available and I may be at an information disadvantage compared to other traders.",correctAnswer:!0},{id:"D",text:"Yes, but only when the cryptoasset is traded on a regulated cryptocurrency exchange.",correctAnswer:!1}],userAnswer:null,correctAnswerId:"C"},{id:13,question:"What is a prudent approach to managing the risk of your cryptoasset investments losing significant value?",options:[{id:"A",text:"Invest equally in multiple cryptoassets.",correctAnswer:!1},{id:"B",text:"Diversifying and not investing more than 10% of my net assets in cryptoassets.",correctAnswer:!0},{id:"C",text:"Focus on assets with higher market caps as they are safer.",correctAnswer:!1},{id:"D",text:"Adjust my portfolio based on third-party market reports and trends regularly.",correctAnswer:!1}],userAnswer:null,correctAnswerId:"B"},{id:14,question:"What could prevent you from being able to sell your cryptoassets on Backpack Exchange at the desired time?",options:[{id:"A",text:"Market illiquidity, where there are not enough buyers to purchase my assets.",correctAnswer:!0},{id:"B",text:"Stable market conditions that prevent any fluctuations in asset value.",correctAnswer:!1},{id:"C",text:"Having insufficient funds in my account to cover the transaction fees.",correctAnswer:!1},{id:"D",text:"The exchange automatically locking my assets for a predetermined period.",correctAnswer:!1}],userAnswer:null,correctAnswerId:"A"},{id:15,question:"Cryptoassets are highly volatile. Which of the following statements are accurate?",options:[{id:"A",text:"I can analyze and predict the performance of cryptoassets similar to publicly traded securities.",correctAnswer:!1},{id:"B",text:"The publicly available information about cryptoassets is similar to publicly traded securities.",correctAnswer:!1},{id:"C",text:"Cryptoasset markets are much more volatile, less transparent, and less predictable than publicly traded securities.",correctAnswer:!0},{id:"D",text:"There is more information available about cryptoassets than publicly traded securities, so cryptoasset investments are less complex than publicly traded securities.",correctAnswer:!1}],userAnswer:null,correctAnswerId:"C"},{id:16,question:"In which of the following scenarios might you be unable to sell your cryptoassets immediately on Backpack Exchange?",options:[{id:"A",text:"The value of my cryptoassets has
3increased significantly in a short period.",correctAnswer:!1},{id:"B",text:"There is a high volume of trading on the exchange, and the platform experiences an operational outage.",correctAnswer:!0},{id:"C",text:"The cryptoasset market is highly liquid, with many active buyers and sellers.",correctAnswer:!1},{id:"D",text:"I hold a diversified portfolio across several exchanges.",correctAnswer:!1}],userAnswer:null,correctAnswerId:"B"},{id:17,question:"Which of the following can be associated with cryptoassets?",options:[{id:"A",text:"Scams/Malware",correctAnswer:!0},{id:"B",text:"Investments are insured",correctAnswer:!1},{id:"C",text:"Limited volatility",correctAnswer:!1},{id:"D",text:"Fixed supply",correctAnswer:!1}],userAnswer:null,correctAnswerId:"A"},{id:18,question:"Which one of the following is CORRECT?",options:[{id:"A",text:"Cryptoassets only trade on regulated exchanges.",correctAnswer:!1},{id:"B",text:"Cryptoasset exchangeâs market data may not always be reliable.",correctAnswer:!0},{id:"C",text:"Cryptoasset exchanges are subject to the same trade reporting requirements as stock exchanges.",correctAnswer:!1},{id:"D",text:"Cryptoasset transactions are insured by the government.",correctAnswer:!1}],userAnswer:null,correctAnswerId:"B"},{id:19,question:"Which of the below is the most sensible investment strategy?",options:[{id:"A",text:"I should invest as much as I can in riskier assets to give me the best chance of outsized returns.",correctAnswer:!1},{id:"B",text:"Put all of my money into a single cryptoasset and hold for at least 5 years.",correctAnswer:!1},{id:"C",text:"I should invest no more than 10% of my net assets in high risk investments.",correctAnswer:!0},{id:"D",text:"I should focus on emerging cryptoassets to maximise the chance for rapid growth.",correctAnswer:!1}],userAnswer:null,correctAnswerId:"C"},{id:20,question:"What best describes a potential operational risk when using Backpack Exchange to buy/sell cryptoassets?",options:[{id:"A",text:"A malicious actor could break into Backpack Exchangeâs head office and steal my cryptoassets.",correctAnswer:!1},{id:"B",text:"Backpack Exchange could be subject to a cyber-attack which could compromise my account security details, which could lead to my account being used to make irreversible cryptocurrency transactions.",correctAnswer:!0},{id:"C",text:"If there is a fire at Backpack Exchangeâs headquarters, my cryptoassets could be lost.",correctAnswer:!1}],userAnswer:null,correctAnswerId:"B"},{id:21,question:"To what extent are your investments in cryptoassets on Backpack Exchange protected by the Financial Ombudsman Service (FOS) or the Financial Services Compensation Scheme (FSCS) in the UK, and what is the significance of the regulated status of the business offering or marketing the cryptoassets in relation to FCA regulation?",options:[{id:"A",text:"Limited protection under FSCS but no FOS coverage â Investments in cryptoassets on Backpack Exchange are not protected under FOS but may be protected under the FSCS.",correctAnswer:!1},{id:"B",text:"Limited protection under FOS but no FSCS coverage â The marketing of qualifying cryptoassets by Backpack Exchange is regulated by the FCA, but investment in cryptoassets is not protected by the FSCS.",correctAnswer:!1},{id:"C",text:"Protected under both FOS and FSCS â Investments in cryptoassets on Backpack Exchange are protected by both the FOS and FSCS because the exchange is fully regulated by the FCA for both marketing and investment activities.",correctAnswer:!1},{id:"D",text:"No protection but subject to FCA financial promotions regulation â There is no protection under the FOS or FSCS for investments in cryptoassets on Backpack Exchange, but the marketing of qualifying cryptoassets is regulated by the FCA.",correctAnswer:!0}],userAnswer:null,correctAnswerId:"D"},{id:22,question:"What regulatory protections currently apply to trading cryptoassets on Backpack Exchange in the UK?",options:[{id:"A",text:"They are not subject to any regulatory protections.",correctAnswer:!0},{id:"B",text:"They are protected by the UK Financial Ombudsman Service.",correctAnswer:!1},{id:"C",text:"They are protected by the Bank of England.",correctAnswer:!1},{id:"D",text:"They are protected under UK consumer rights laws.",correctAnswer:!1}],userAnswer:null,correctAnswerId:"A"},{id:23,question:"What is diversification?",options:[{id:"A",text:"Investing all of my assets into a single asset or asset class.",correctAnswer:!1},{id:"B",text:"Investing 50% of my assets into restricted mass market investments.",correctAnswer:!1},{id:"C",text:"Investing in a broad portfolio of assets and holding no more than 10% in restricted mass market investments.",correctAnswer:!0},{id:"D",text:"Investing 50% of assets to cryptoassets and 50% to traditional securities.",correctAnswer:!1}],userAnswer:null,correctAnswerId:"C"},{id:24,question:"What is the significance of the regulated status of a business offering or marketing qualifying cryptoassets in relation to consumer protection under the FCA in the UK?",options:[{id:"A",text:"The business must be fully regulated by the FCA for both marketing and investment â This provides complete protection under the Financial Ombudsman Service (FOS) and the Financial Services Compensation Scheme (FSCS).",correctAnswer:!1},{id:"B",text:"Only the marketing of qualifying cryptoassets may be regulated by the FCA â The FCA does not regulate the investment in cryptoassets, and therefore there is no protection under the FOS or FSCS.",correctAnswer:!0},{id:"C",text:"Investments in cryptoassets are automatically covered by the FSCS â Regardless of the regulated status of the business, all cryptoasset investments are protected.",correctAnswer:!1},{id:"D",text:"The business is exempt from FCA regulation â Because cryptoassets are not considered financial instruments, neither marketing nor investment activities are subject to FCA regulation.",correctAnswer:!1}],userAnswer:null,correctAnswerId:"B"},{id:25,question:"What is a primary risk associated with holding stablecoins like USDC or USDT?",options:[{id:"A",text:"They provide the same level of security as traditional bank deposits.",correctAnswer:!1},{id:"B",text:"They rely on reserves which may not be fully transparent or adequately maintained.",correctAnswer:!0},{id:"C",text:"Stablecoins are consistently insured by the issuing entity.",correctAnswer:!1},{id:"D",text:"They are regulated in the same way as traditional bank accounts.",correctAnswer:!1}],userAnswer:null,correctAnswerId:"B"}
3,{id:26,question:"What could cause a stablecoin like USDC or USDT to lose its peg to the US Dollar?",options:[{id:"A",text:"Changes in global interest rates impacting financial stability.",correctAnswer:!1},{id:"B",text:"Insolvency of the entity holding the reserves without adequate safeguards.",correctAnswer:!0},{id:"C",text:"An increase in the overall supply of the stablecoin beyond market demand.",correctAnswer:!1},{id:"D",text:"Introduction of a new central bank digital currency (CBDC).",correctAnswer:!1}],userAnswer:null,correctAnswerId:"B"},{id:27,question:"How does the risk profile of stablecoins compare to traditional fiat currencies?",options:[{id:"A",text:"Stablecoins are as secure as fiat currencies because they are backed by reserves.",correctAnswer:!1},{id:"B",text:"Stablecoins rely on the adequacy of its underlying reserves.",correctAnswer:!0},{id:"C",text:"Both are protected by insurance and provide similar levels of safety.",correctAnswer:!1},{id:"D",text:"Stablecoins are risk-free as they are pegged to the value of the US Dollar.",correctAnswer:!1}],userAnswer:null,correctAnswerId:"B"},{id:28,question:"What is a significant risk associated with memecoins?",options:[{id:"A",text:"Memecoins are highly speculative and often lack tangible utility or intrinsic value.",correctAnswer:!0},{id:"B",text:"Memecoins are treated like shares in a company and regulated as such.",correctAnswer:!1},{id:"C",text:"Memecoins are always backed by large corporations, making them a secure investment.",correctAnswer:!1},{id:"D",text:"Memecoins are stable investments like government bonds, providing stable returns.",correctAnswer:!1}],userAnswer:null,correctAnswerId:"A"},{id:29,question:"Why might the value of a memecoin be particularly volatile?",options:[{id:"A",text:"Because it is highly regulated and monitored by financial authorities.",correctAnswer:!1},{id:"B",text:"Due to high levels of speculation and trading based on social media hype, rather than any underlying value.",correctAnswer:!0},{id:"C",text:"Because memecoins are heavily traded on traditional stock exchanges, contributing to its volatility.",correctAnswer:!1},{id:"D",text:"Due to their intrinsic value tied to rare commodities.",correctAnswer:!1}],userAnswer:null,correctAnswerId:"B"},{id:30,question:"What should you be aware of when investing in a new memecoin?",options:[{id:"A",text:"Memecoins are highly speculative and can carry a high risk due to potential lack of liquidity, susceptibility to fraud, and extreme volatility.",correctAnswer:!0},{id:"B",text:"There is no risk, as all cryptocurrencies are protected by consumer protection schemes.",correctAnswer:!1},{id:"C",text:"Memecoins have the same level of security as government-backed securities.",correctAnswer:!1},{id:"D",text:"Investing in memecoins guarantees a steady return on investment over time.",correctAnswer:!1}],userAnswer:null,correctAnswerId:"A"}],r=i.reduce((e,t)=>({...e,[t.id]:t.correctAnswerId}),{});
3e.s(["UK_MAX_QUESTIONS",0,s,"UK_MINIMUM_QUIZ_SCORE",0,7/s*100,"UK_REQUIRED_CORRECT_ANSWERS",0,7,"collectUserAnswers",0,function(e,t){let s=[];return t.forEach(t=>{let i=e[t.id];if(i){let e=t.options.find(e=>e.id===i);e&&s.push({question:t.question,selectedAnswer:e.text})}}),s},"countCorrectAnswers",0,function(e){let t=0;for(let s in e)e[s]===r[Number(s)]&&t++;return t},"getQuizQuestionsForUserAttempt",0,function(e){let s=t[e||0]||t[0];return i.filter(e=>s.includes(e.id))},"getUserUkQuizScore",0,function(e){return Math.floor(e/s*100)}])},261305,182021,e=>{"use strict";var t=e.i(281849),s=e.i(483578);e.i(455934);var i=e.i(993581),r=e.i(638738),n=e.i(651325),o=e.i(185046);e.i(173566);var a=e.i(270008);let l=async(e,t)=>{let s,i;return(0,a.customInstance)((s=new URLSearchParams,Object.entries(e||{}).forEach(([e,t])=>{void 0!==t&&s.append(e,null===t?"null":String(t))}),(i=s.toString()).length>0?`/wapi/v1/keypair?${i}`:"/wapi/v1/keypair"),{...t,method:"POST"})};var c=e.i(650870),u=e.i(420853),d=e.i(447730);let h=new Map,f=0,m=async(e,t)=>{let s=u.useAppStore.getState().user?.id,i=f,r=await l({subaccountId:e},{signal:AbortSignal.timeout(2e4)});if(s!==u.useAppStore.getState().user?.id||i!==f)throw Error(o.i18n._({id:"95-YHs"}));if(null==r||null==r.signingKey||null==r.verifyingKey||!Number.isFinite(r.expiry))throw Error(o.i18n._({id:"nDumcJ"}));t({expiry:1e3*r.expiry,signingKey:r.signingKey,verifyingKey:r.verifyingKey},e)};function p(){i.OpenAPI.USERNAME=void 0,i.OpenAPI.PASSWORD=void 0,f+=1,h.clear()}e.s(["clearCredentials",0,p,"installActiveCredentials",0,function(){let{activeSubaccountId:e,keypairs:t}=d.useSubaccountStore.getState(),s=t[e??0];s?.verifyingKey&&s?.signingKey&&(i.OpenAPI.USERNAME=s.verifyingKey,i.OpenAPI.PASSWORD=s.signingKey)},"useSubaccountKeypair",0,()=>{let e=(0,d.useSubaccountStore)(e=>e.keypairs),t=(0,d.useSubaccountStore)(e=>e.refreshKeypair),s=(0,d.useSubaccountStore)(e=>e.deleteExpiredKeypair),i=(0,n.useCallback)((t,i)=>{let r=e[t??0];return null!=r&&(0,d.isKeypairExpired)(r,i)?(s(t,i),null):r},[e,s]);return{getOrIssueKeypair:(0,n.useCallback)(async(e,s=0)=>{let r=await (0,c.getServerTimestamp)(),n=i(e,r);if(null!=n&&n.expiry>r+s)return n;let a=e??0,l=`${u.useAppStore.getState().user?.id}:${a}`,f=h.get(l);if(null==f){let s=m(e,t).finally(()=>{h.get(l)===s&&h.delete(l)});h.set(l,s),f=s}await f;let p=d.useSubaccountStore.getState().keypairs[a];if(null==p)throw Error(o.i18n._({id:"J50LH3"}));return p},[i,t])}}],182021),e.s(["useLogoutMutation",0,function(){let e=(0,t.useQueryClient)();return(0,s.useLogoutUser)({...null!=i.OpenAPI.USERNAME?{request:{headers:{"X-Verifying-Key":i.OpenAPI.USERNAME}}}:{},mutation:{onSuccess:(t,s)=>{e.clear(),r.tokenRefreshManager.clearRefreshState(),p()}}})}],261305)},230985,e=>{"use strict";var t=e.i(988998);e.s(["useBorrowLendMarket",0,function(e){let{data:s}=(0,t.useBorrowLendMarkets)();return s?.find(t=>t.symbol===e)}])},411314,e=>{"use strict";var t=e.i(651325),s=e.i(185046),i=e.i(616427),r=e.i(66827),n=e.i(673819),o=e.i(970783);e.s(["useDepositAddress",0,function({blockchain:e,subaccountId:a}){let{data:l}=(0,o.useUser)(),c=l?.permissions?.isCryptoDepositEnabled||l?.permissions?.isFiatDepositEnabled,{data:u,isLoading:d,isFetching:h,isError:f}=(0,n.useGetDepositAddress)({blockchain:e,subaccountId:a},{query:{placeholderData:i.keepPreviousData,enabled:!!e}});(0,t.useEffect)(()=>{c&&null==u&&f&&r.toast.error(s.i18n._({id:"FIv5Le"}))},[u,f,c]);let[m,p]=(0,t.useState)(!1);return((0,t.useEffect)(()=>{let e=null;return d||h?e=setTimeout(()=>p(!0),1e3):p(!1),()=>{null!=e&&clearTimeout(e)}},[h,d]),c)?{data:u?.address,isLoading:m,isError:f}:{data:void 0,isLoading:m,isError:f}}])},391773,e=>{"use strict";var t=e.i(651325),s=e.i(925920),i=e.i(887134),r=e.i(243176),n=e.i(408087);e.s(["useDisplayAsset",0,function(e){let{isJP:s}=(0,r.useCompliance)();return(0,t.useMemo)(()=>s&&e?.symbol===i.QUOTE_SYMBOL?{...e,symbol:n.FiatAsset.JPY,logoUri:"/coins/jpy.svg"}:e,[s,e])},"useDisplayAssetSymbol",0,function(){let{isJP:e}=(0,r.useCompliance)();return(0,t.useCallback)(t=>{let i=(0,s.getDisplayAssetSymbol)(t);return e&&i===n.FiatAsset.USD?n.FiatAsset.JPY:i},[e])}])},192035,e=>{"use strict";var t=e.i(642541),s=e.i(78350);e.s(["useLiveMarkPriceData",0,e=>{let{data:i}=(0,s.useMarkPriceData)(e);return(0,t.useMarkPriceSubscription)(e),i}])},145360,e=>{"use strict";var t=e.i(616427),s=e.i(561204),i=e.i(199130);e.s(["usePositionImfModelQuery",0,function(e,r){return(0,s.useQuery)({queryKey:["/wapi/v1/riskDashboard/positionImfModel",e],queryFn:()=>(0,i.positionImfModel)(e),enabled:!!e&&(r?.enabled??!0),...r?.keepPreviousData?{placeholderData:t.keepPreviousData}:{}})}])},884182,e=>{"use strict";var t=e.i(651325),s=e.i(97489),i=e.i(774701),r=e.i(243176),n=e.i(970783);e.s(["useUkKycStatus",0,function(){let{data:e}=(0,n.useUser)(),o=e?.countryCode==="GB",a=(0,r.isUKCountrySpecificFields)(e?.countrySpecificFields)?e?.countrySpecificFields:void 0,{hoursRemaining:l,minutesRemaining:c,coolingOffTimeRemaining:u}=(0,t.useMemo)(()=>
3{if(!a?.appropriatenessQuizTimestamp)return{hoursRemaining:-1,minutesRemaining:-1,coolingOffTimeRemaining:-1};let e=new Date(new Date(a.appropriatenessQuizTimestamp+"Z").getTime()+864e5),t=new Date,s=e.getTime()-t.getTime();return s<=0?{hoursRemaining:0,minutesRemaining:0,coolingOffTimeRemaining:0}:{hoursRemaining:Math.floor(s/36e5),minutesRemaining:Math.floor(s%36e5/6e4),coolingOffTimeRemaining:s}},[a?.appropriatenessQuizTimestamp]),d=(0,t.useMemo)(()=>{if(!a?.appropriatenessQuizScore)return!1;let e=a?.appropriatenessQuizAttempts||0;return!!(e>1)&&!!(l>0)||!!(e>2)},[a?.appropriatenessQuizAttempts,a?.appropriatenessQuizScore,l]);if(!o||e?.userType===i.UserType.entity)return{ukCanTrade:!0,hoursRemaining:0,minutesRemaining:0,coolingPeriodOver:!0,ukQuizIncomplete:!1};let h=!a?.appropriatenessQuizTimestamp||a?.appropriatenessQuizScore&&a.appropriatenessQuizScore<s.UK_MINIMUM_QUIZ_SCORE,f=a?.appropriatenessQuizScore&&a.appropriatenessQuizScore>=s.UK_MINIMUM_QUIZ_SCORE&&(a.acceptanceTime||0==u);return{hoursRemaining:l,minutesRemaining:c,ukQuizIncomplete:h,maxAttemptsExceeded:a?.appropriatenessQuizScore&&a?.appropriatenessQuizAttempts&&a.appropriatenessQuizAttempts>2,coolingPeriodOver:f,ukCanTrade:!h&&f,retakeNotAllowed:d,quizPassed:a?.appropriatenessQuizScore&&a.appropriatenessQuizScore>
3=s.UK_MINIMUM_QUIZ_SCORE}}])},483578,e=>{"use strict";var t=e.i(173566),s=e.i(561204),i=e.i(270008);let r=async(e,t)=>{var s;return(0,i.customInstance)("/wapi/v1/user/password/reset",{...t,method:"POST",headers:{"Content-Type":"application/json",...!(s=t?.headers)?{}:s instanceof Headers?Object.fromEntries(s.entries()):Array.isArray(s)?Object.fromEntries(s):s},body:JSON.stringify(e)})},n=async(e,t)=>{var s;return(0,i.customInstance)("/wapi/v1/user/password/update",{...t,method:"POST",headers:{"Content-Type":"application/json",...!(s=t?.headers)?{}:s instanceof Headers?Object.fromEntries(s.entries()):Array.isArray(s)?Object.fromEntries(s):s},body:JSON.stringify(e)})},o=async(e,t)=>{var s;return(0,i.customInstance)("/wapi/v1/user/login/request",{...t,method:"POST",headers:{"Content-Type":"application/json",...!(s=t?.headers)?{}:s instanceof Headers?Object.fromEntries(s.entries()):Array.isArray(s)?Object.fromEntries(s):s},body:JSON.stringify(e)})},a=async(e,t)=>{var s;return(0,i.customInstance)("/wapi/v1/user/login/resend",{...t,method:"POST",headers:{"Content-Type":"application/json",...!(s=t?.headers)?{}:s instanceof Headers?Object.fromEntries(s.entries()):Array.isArray(s)?Object.fromEntries(s):s},body:JSON.stringify(e)})},l=async e=>(0,i.customInstance)("/wapi/v1/user/login/sso/challenge",{...e,method:"POST"}),c=async(e,t)=>{var s;return(0,i.customInstance)("/wapi/v1/user/login/sso",{...t,method:"POST",headers:{"Content-Type":"application/json",...!(s=t?.headers)?{}:s instanceof Headers?Object.fromEntries(s.entries()):Array.isArray(s)?Object.fromEntries(s):s},body:JSON.stringify(e)})},u=async(e,t)=>{var s;return(0,i.customInstance)("/wapi/v1/user/signup/sso/complete",{...t,method:"POST",headers:{"Content-Type":"application/json",...!(s=t?.headers)?{}:s instanceof Headers?Object.fromEntries(s.entries()):Array.isArray(s)?Object.fromEntries(s):s},body:JSON.stringify(e)})},d=async e=>(0,i.customInstance)("/wapi/v1/user/sso/identities",{...e,method:"GET"}),h=()=>["/wapi/v1/user/sso/identities"],f=async(e,t)=>{var s;return(0,i.customInstance)("/wapi/v1/user/sso/link",{...t,method:"POST",headers:{"Content-Type":"application/json",...!(s=t?.headers)?{}:s instanceof Headers?Object.fromEntries(s.entries()):Array.isArray(s)?Object.fromEntries(s):s},body:JSON.stringify(e)})},m=async(e,t)=>{var s;return(0,i.customInstance)("/wapi/v1/user/sso/unlink",{...t,method:"POST",headers:{"Content-Type":"application/json",...!(s=t?.headers)?{}:s instanceof Headers?Object.fromEntries(s.entries()):Array.isArray(s)?Object.fromEntries(s):s},body:JSON.stringify(e)})},p=async(e,t)=>{var s;return(0,i.customInstance)("/wapi/v1/user/sso/unlink/start",{...t,method:"POST",headers:{"Content-Type":"application/json",...!(s=t?.headers)?{}:s instanceof Headers?Object.fromEntries(s.entries()):Array.isArray(s)?Object.fromEntries(s):s},body:JSON.stringify(e)})},y=async(e,t)=>{var s;return(0,i.customInstance)("/wapi/v1/user/login/sso/link/confirm",{...t,method:"POST",headers:{"Content-Type":"application/json",...!(s=t?.headers)?{}:s instanceof Headers?Object.fromEntries(s.entries()):Array.isArray(s)?Object.fromEntries(s):s},body:JSON.stringify(e)})},g=async(e,t)=>{var s;return(0,i.customInstance)("/wapi/v1/user/login/confirm",{...t,method:"POST",headers:{"Content-Type":"application/json",...!(s=t?.headers)?{}:s instanceof Headers?Object.fromEntries(s.entries()):Array.isArray(s)?Object.fromEntries(s):s},body:JSON.stringify(e)})},b=async e=>(0,i.customInstance)("/wapi/v1/user/logout",{...e,method:"POST"});e.s(["completeSsoSignup",0,u,"confirmSsoLink",0,y,"createSsoChallenge",0,l,"getGetSsoIdentitiesQueryKey",0,h,"linkSsoIdentity",0,f,"loginConfirm",0,g,"loginRequest",0,o,"loginResend",0,a,"resetPassword",0,r,"ssoLogin",0,c,"startSsoUnlink",0,p,"unlinkSsoIdentity",0,m,"updatePassword",0,n,"useGetSsoIdentities",0,function(e,t){let i=(e=>{let{query:t,request:s}=e??{};return{queryKey:t?.queryKey??h(),queryFn:({signal:e})=>d({signal:e,...s}),...t}})(e);var r=(0,s.useQuery)(i,t);let n={queryKey:i.queryKey};for(let e of Object.keys(r))"queryKey"!==e&&Object.defineProperty(n,e,{enumerable:!0,configurable:!0,get:()=>r[e]});return n},"useLoginConfirm",0,(e,s)=>(0,t.useMutation)((e=>{let t=["loginConfirm"],{mutation:s,request:i}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:e=>{let{data:t}=e??{};
3return g(t,i)},...s}})(e),s),"useLogoutUser",0,(e,s)=>(0,t.useMutation)((e=>{let t=["logoutUser"],{mutation:s,request:i}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:()=>b(i),...s}})(e),s)])},194634,e=>{"use strict";var t=e.i(173566),s=e.i(561204),i=e.i(270008);let r=(e,t)=>{let s={queryKey:t};for(let t of Object.keys(e))"queryKey"!==t&&Object.defineProperty(s,t,{enumerable:!0,configurable:!0,get:()=>e[t]});return s},n=async(e,t)=>{let s,r;return(0,i.customInstance)((s=new URLSearchParams,Object.entries(e||{}).forEach(([e,t])=>{void 0!==t&&s.append(e,null===t?"null":String(t))}),(r=s.toString()).length>0?`/api/v1/borrowLend/position/liquidationPrice?${r}`:"/api/v1/borrowLend/position/liquidationPrice"),{...t,method:"GET"})},o=async(e,t)=>{var s;return(0,i.customInstance)("/api/v1/borrowLend",{...t,method:"POST",headers:{"Content-Type":"application/json",...!(s=t?.headers)?{}:s instanceof Headers?Object.fromEntries(s.entries()):Array.isArray(s)?Object.fromEntries(s):s},body:JSON.stringify(e)})},a=async(e,t)=>{let s,r;return(0,i.customInstance)((s=new URLSearchParams,Object.entries(e||{}).forEach(([e,t])=>{void 0!==t&&s.append(e,null===t?"null":String(t))}),(r=s.toString()).length>0?`/wapi/v1/history/borrowLend?${r}`:"/wapi/v1/history/borrowLend"),{...t,method:"GET"})},l=e=>["/wapi/v1/history/borrowLend",...e?[e]:[]],c=(e,t)=>{let{query:s,request:i}=t??{};return{queryKey:s?.queryKey??l(e),queryFn:({signal:t})=>a(e,{signal:t,...i}),...s}},u=async(e,t)=>{let s,r;return(0,i.customInstance)((s=new URLSearchParams,Object.entries(e||{}).forEach(([e,t])=>{void 0!==t&&s.append(e,null===t?"null":String(t))}),(r=s.toString()).length>0?`/wapi/v1/history/interest?${r}`:"/wapi/v1/history/interest"),{...t,method:"GET"})},d=async(e,t)=>{let s,r;return(0,i.customInstance)((s=new URLSearchParams,Object.entries(e||{}).forEach(([e,t])=>{void 0!==t&&s.append(e,null===t?"null":String(t))}),(r=s.toString()).length>0?`/wapi/v1/history/borrowLend/positions?${r}`:"/wapi/v1/history/borrowLend/positions"),{...t,method:"GET"})},h=e=>["/wapi/v1/history/borrowLend/positions",...e?[e]:[]],f=async(e,t)=>{let s,r;return(0,i.customInstance)((s=new URLSearchParams,Object.entries(e||{}).forEach(([e,t])=>{void 0!==t&&s.append(e,null===t?"null":String(t))}),(r=s.toString()).length>0?`/wapi/v1/history/interest/export?${r}`:"/wapi/v1/history/interest/export"),{...t,method:"GET"})},m=async(e,t)=>{let s,r;return(0,i.customInstance)((s=new URLSearchParams,Object.entries(e||{}).forEach(([e,t])=>{void 0!==t&&s.append(e,null===t?"null":String(t))}),(r=s.toString()).length>0?`/wapi/v1/history/lending/combined?${r}`:"/wapi/v1/history/lending/combined"),{...t,method:"GET"})},p=async(e,t)=>{let s,r;return(0,i.customInstance)((s=new URLSearchParams,Object.entries(e||{}).forEach(([e,t])=>{void 0!==t&&s.append(e,null===t?"null":String(t))}),(r=s.toString()).length>0?`/wapi/v1/history/lending/summary?${r}`:"/wapi/v1/history/lending/summary"),{...t,method:"GET"})},y=async(e,t)=>{let s,r;return(0,i.customInstance)((s=new URLSearchParams,Object.entries(e||{}).forEach(([e,t])=>{void 0!==t&&s.append(e,null===t?"null":String(t))}),(r=s.toString()).length>0?`/wapi/v1/history/interest/total?${r}`:"/wapi/v1/history/interest/total"),{...t,method:"GET"})},g=async(e,t)=>{let s,r;return(0,i.customInstance)((s=new URLSearchParams,Object.entries(e||{}).forEach(([e,t])=>{void 0!==t&&s.append(e,null===t?"null":String(t))}),(r=s.toString()).length>0?`/wapi/v1/history/lending/all?${r}`:"/wapi/v1/history/lending/all"),{...t,method:"GET"})};e.s(["exportInterestHistory",0,f,"getGetBorrowLendHistoryQueryKey",0,l,"getGetBorrowLendHistoryQueryOptions",0,c,"getGetBorrowLendPositionHistoryQueryKey",0,h,"getGetBorrowLendPositionHistoryQueryOptions",0,(e,t)=>{let{query:s,request:i}=t??{};return{queryKey:s?.queryKey??h(e),queryFn:({signal:t})=>d(e,{signal:t,...i}),...s}},"getGetInterestHistoryQueryOptions",0,(e,t)=>{let{query:s,request:i}=t??{};return{queryKey:s?.queryKey??["/wapi/v1/history/interest",...e?[e]:[]],queryFn:({signal:t})=>u(e,{signal:t,...i}),...s}},"getGetLendingAndStakingSummaryQueryOptions",0,(e,t)=>{let{query:s,request:i}=t??{};return{queryKey:s?.queryKey??["/wapi/v1/history/lending/summary",...e?[e]:[]],queryFn:({signal:t})=>p(e,{signal:t,...i}),...s}},"useExecuteBorrowLend",0,(e,s)=>(0,t.useMutation)((e=>{let t=["executeBorrowLend"],{mutation:s,request:i}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:e=>{let{data:t}=e??{};return o(t,i)},...s}})(e),s),"useGetBorrowLendEstimatedLiquidationPrice",0,function(e,t,i){let o=((e,t)=>{let{query:s,request:i}=t??{};return{queryKey:s?.queryKey??["/api/v1/borrowLend/position/liquidationPrice",...e?[e]:[]],queryFn:({signal:t})=>n(e,{signal:t,...i}),...s}})(e,t);return r((0,s.useQuery)(o,i),o.queryKey)},"useGetBorrowLendHistory",0,function(e,t,i){let n=c(e,t);return r((0,s.useQuery)(n,i),n.queryKey)},"useGetInterestTotal",0,function(e,t,i){let n=((e,t)=>{let{query:s,request:i}=t??{};return{queryKey:s?.queryKey??["/wapi/v1/history/interest/total",...e?[e]:[]],queryFn:({signal:t})=>y(e,{signal:t,...i}),...s}})(e,t);return r((0,s.useQuery)(n,i),n.queryKey)},"useGetLendingAndStakingCombinedHistory",0,function(e,t,i){let n=((e,t)=>{let{query:s,request:i}=t??{};return{queryKey:s?.queryKey??["/wapi/v1/history/lending/combined",...e?[e]:[]],queryFn:({signal:t})=>m(e,{signal:t,...i}),...s}})(e,t);return r((0,s.useQuery)(n,i),n.queryKey)},"useGetLendingYieldHistoryAll",0,function(e,t,i){let n=((e,t)=>{let{query:s,request:i}=t??{};return{queryKey:s?.queryKey??["/wapi/v1/history/lending/all",...e?[e]:[]],queryFn:({signal:t})=>g(e,{signal:t,...i}),...s}})(e,t);return r((0,s.useQuery)(n,i),n.queryKey)}])},31421,e=>{"use strict";var t=e.i(561204),s=e.i(977914),i=e.i(270008);let r=(e,t)=>{let s={queryKey:t};for(let t of Object.keys(e))"queryKey"!==t&&Object.defineProperty(s,t,{enumerable:!0,configurable:!0,get:()=>e[t]});return s},n=async e=>(0,i.customInstance)("/wapi/v1/country",{...e,method:"GET"}),o=async e=>(0,i.customInstance)("/wapi/v1/country/permissions",{...e,method:"GET"});e.s(["useGetCountriesSuspense",0,function(e,t){let i=(e=>{let{query:t,request:s}=e??{};return{queryKey:t?.queryKey??["/wapi/v1/country"],queryFn:({signal:e})=>n({signal:e,...s}),...t}})(e);
3return r((0,s.useSuspenseQuery)(i,t),i.queryKey)},"useGetCountryPermissions",0,function(e,s){let i=(e=>{let{query:t,request:s}=e??{};return{queryKey:t?.queryKey??["/wapi/v1/country/permissions"],queryFn:({signal:e})=>o({signal:e,...s}),...t}})(e);return r((0,t.useQuery)(i,s),i.queryKey)}])},116222,e=>{"use strict";e.s(["OrderTypeEnum",0,{Market:"Market",Limit:"Limit"}])},774701,e=>{"use strict";e.s(["UserType",0,{individual:"individual",entity:"entity"}])},923961,e=>{"use strict";var t=e.i(173566),s=e.i(561204),i=e.i(270008);let r=(e,t)=>{let s={queryKey:t};for(let t of Object.keys(e))"queryKey"!==t&&Object.defineProperty(s,t,{enumerable:!0,configurable:!0,get:()=>e[t]});return s},n=async e=>(0,i.customInstance)("/wapi/v1/capital/fiat/plaid/account",{...e,method:"GET"}),o=async e=>(0,i.customInstance)("/wapi/v1/capital/fiat/plaid/link/token",{...e,method:"GET"}),a=async e=>(0,i.customInstance)("/wapi/v1/capital/fiat/ach/deposits/bank-accounts",{...e,method:"GET"}),l=()=>["/wapi/v1/capital/fiat/ach/deposits/bank-accounts"],c=async(e,t)=>{var s;return(0,i.customInstance)("/wapi/v1/capital/fiat/ach/deposits/bank-accounts",{...t,method:"POST",headers:{"Content-Type":"application/json",...!(s=t?.headers)?{}:s instanceof Headers?Object.fromEntries(s.entries()):Array.isArray(s)?Object.fromEntries(s):s},body:JSON.stringify(e)})},u=async(e,t)=>{var s;return(0,i.customInstance)("/wapi/v1/capital/fiat/ach/deposits/authorize",{...t,method:"POST",headers:{"Content-Type":"application/json",...!(s=t?.headers)?{}:s instanceof Headers?Object.fromEntries(s.entries()):Array.isArray(s)?Object.fromEntries(s):s},body:JSON.stringify(e)})},d=async(e,t)=>{var s;return(0,i.customInstance)("/wapi/v1/capital/fiat/ach/recipients",{...t,method:"POST",headers:{"Content-Type":"application/json",...!(s=t?.headers)?{}:s instanceof Headers?Object.fromEntries(s.entries()):Array.isArray(s)?Object.fromEntries(s):s},body:JSON.stringify(e)})},h=async(e,t)=>{var s;return(0,i.customInstance)("/wapi/v1/capital/fiat/ach/withdraw",{...t,method:"POST",headers:{"Content-Type":"application/json",...!(s=t?.headers)?{}:s instanceof Headers?Object.fromEntries(s.entries()):Array.isArray(s)?Object.fromEntries(s):s},body:JSON.stringify(e)})};e.s(["getGetPlaidBankAccountsQueryKey",0,l,"getPlaidAccount",0,n,"getPlaidLinkToken",0,o,"useAddPlaidBankAccount",0,(e,s)=>(0,t.useMutation)((e=>{let t=["addPlaidBankAccount"],{mutation:s,request:i}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:e=>{let{data:t}=e??{};return c(t,i)},...s}})(e),s),"useAddPlaidRecipient",0,(e,s)=>(0,t.useMutation)((e=>{let t=["addPlaidRecipient"],{mutation:s,request:i}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:e=>{let{data:t}=e??{};return d(t,i)},...s}})(e),s),"useCreatePlaidTransferAuthorization",0,(e,s)=>(0,t.useMutation)((e=>{let t=["createPlaidTransferAuthorization"],{mutation:s,request:i}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:e=>{let{data:t}=e??{};return u(t,i)},...s}})(e),s),"useGetPlaidBankAccounts",0,function(e,t){let i=(e=>{let{query:t,request:s}=e??{};return{queryKey:t?.queryKey??l(),queryFn:({signal:e})=>a({signal:e,...s}),...t}})(e);return r((0,s.useQuery)(i,t),i.queryKey)},"useGetPlaidLinkToken",0,function(e,t){let i=(e=>{let{query:t,request:s}=e??{};return{queryKey:t?.queryKey??["/wapi/v1/capital/fiat/plaid/link/token"],queryFn:({signal:e})=>o({signal:e,...s}),...t}})(e);return r((0,s.useQuery)(i,t),i.queryKey)},"useRequestPlaidWithdrawal",0,(e,s)=>(0,t.useMutation)((e=>{let t=["requestPlaidWithdrawal"],{mutation:s,request:i}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:e=>{let{data:t}=e??{};return h(t,i)},...s}})(e),s)])},199130,e=>{"use strict";e.i(173566);var t=e.i(270008);let s=async(e,s)=>{var i;return(0,t.customInstance)("/wapi/v1/riskDashboard/collateralModel",{...s,method:"POST",headers:{"Content-Type":"application/json",...!(i=s?.headers)?{}:i instanceof Headers?Object.fromEntries(i.entries()):Array.isArray(i)?Object.fromEntries(i):i},body:JSON.stringify(e)})},i=async(e,s)=>{var i;return(0,t.customInstance)("/wapi/v1/riskDashboard/borrowImfModel",{...s,method:"POST",headers:{"Content-Type":"application/json",...!(i=s?.headers)?{}:i instanceof Headers?Object.fromEntries(i.entries()):Array.isArray(i)?Object.fromEntries(i):i},body:JSON.stringify(e)})},r=async(e,s)=>{var i;return(0,t.customInstance)("/wapi/v1/riskDashboard/borrowMmfModel",{...s,method:"POST",headers:{"Content-Type":"application/json",...!(i=s?.headers)?{}:i instanceof Headers?Object.fromEntries(i.entries()):Array.isArray(i)?Object.fromEntries(i):i},body:JSON.stringify(e)})},n=async(e,s)=>{var i;return(0,t.customInstance)("/wapi/v1/riskDashboard/positionImfModel",{...s,method:"POST",headers:{"Content-Type":"application/json",...!(i=s?.headers)?{}:i instanceof Headers?Object.fromEntries(i.entries()):Array.isArray(i)?Object.fromEntries(i):i},body:JSON.stringify(e)})},o=async(e,s)=>{var i;return(0,t.customInstance)("/wapi/v1/riskDashboard/positionMmfModel",{...s,method:"POST",headers:{"Content-Type":"application/json",...!(i=s?.headers)?{}:i instanceof Headers?Object.fromEntries(i.entries()):Array.isArray(i)?Object.fromEntries(i):i},body:JSON.stringify(e)})},a=async(e,s)=>{var i;return(0,t.customInstance)("/wapi/v1/riskDashboard/borrowInterestRateModel",{...s,method:"POST",headers:{"Content-Type":"application/json",...!(i=s?.headers)?{}:i instanceof Headers?Object.fromEntries(i.entries()):Array.isArray(i)?Object.fromEntries(i):i},body:JSON.stringify(e)})},l=async(e,s)=>{var i;return(0,t.customInstance)("/wapi/v1/riskDashboard/lendInterestRateModel",{...s,method:"POST",headers:{"Content-Type":"application/json",...!(i=s?.headers)?{}:i instanceof Headers?Object.fromEntries(i.entries()):Array.isArray(i)?Object.fromEntries(i):i},body:JSON.stringify(e)})},c=async(e,s)=>{var i;return(0,t.customInstance)("/wapi/v1/riskDashboard/borrowLendThrottleModel",{...s,method:"POST",headers:{"Content-Type":"application/json",...!(i=s?.headers)?{}:i instanceof Headers?Object.fromEntries(i.entries()):Array.isArray(i)?Object.fromEntries(i):i},body:JSON.stringify(e)})};e.s(["borrowImfModel",0,i,"borrowInterestRateModel",0,a,"borrowLendThrottleModel",0,c,"borrowMmfModel",0,r,"collateralModel",0,s,"lendInterestRateModel",0,l,"positionImfModel",0,n,"positionMmfModel",0,o])},455934,e=>{"use strict";e.i(638738),e.s([])},719921,e=>{"use strict";var t=e.i(651325),s=e.i(616427),i=e.i(281849),r=e.i(223808),n=e.i(998110),o=e.i(988998),a=e.i(110297),l=e.i(588),c=e.i(521013),u=e.i(420853),d=e.i(447730);e.i(51242);var h=e.i(591185),f=e.i(694256);e.s(["useMaxOrderBalance",0,function({side:e,orderPrice:m,market:p,margin:y,reduceOnly:g}){let{isBorrowLendEnabled:b}=(0,h.useFeatureFlags)(),v=(0,i.useQueryClient)(),{data:w}=(0,o.useBorrowLendMarkets)({query:{enabled:b&&p?.type==="spot"}}),A=w?.some(t=>
3e===c.Side.Ask?t.symbol===p?.baseSymbol:t.symbol===p?.quoteSymbol)??!1,S=p?.type==="futures"||p?.type==="spot"&&y&&A,x=(0,d.useSubaccountStore)(e=>e.activeSubaccountId),E=(0,u.useAppStore)(e=>e.isLoggedIn()),{data:O}=(0,f.useSubaccountBalances)(void 0,{enabled:!!p?.type&&"futures"!==p.type}),{data:I}=(0,a.useSubaccountBorrowLend)({subaccountId:x,queryOptions:{enabled:E&&b}}),{data:{netEquityAvailable:C}={}}=(0,n.useSubaccountCollateral)({subaccountId:x,queryOptions:{enabled:E&&S}}),T=(0,t.useMemo)(()=>(0,r.default)(e=>v.invalidateQueries(e),2e3),[v]);(0,t.useEffect)(()=>{T({predicate:t=>t.queryKey[0]===(0,l.getGetMaxOrderQuantityQueryKey)({symbol:p?.symbol,side:e,price:m})[0]})},[C,O,T]),(0,t.useEffect)(()=>()=>T.cancel(),[T]);let{data:{maxOrderQuantity:k="0",price:R}={},queryKey:M}=(0,l.useGetMaxOrderQuantity)({symbol:p?.symbol,side:e,price:m,subaccountId:x,autoBorrow:p?.type==="spot"&&A?y:void 0,autoBorrowRepay:p?.type==="spot"?y:void 0,autoLendRedeem:!0,reduceOnly:p?.type==="futures"?g:void 0},{query:{enabled:!!p&&E&&""!==m,placeholderData:s.keepPreviousData}}),P=p?.baseAsset?O?.[p.baseAsset.symbol]:null,j=p?.quoteAsset?O?.[p.quoteAsset.symbol]:null,D=e===c.Side.Ask?parseFloat(P?.available||"0"):parseFloat(j?.available||"0"),q=Number(I?.find(({symbol:t})=>t===(e===c.Side.Ask?p?.baseSymbol:p?.quoteSymbol))?.netQuantity);return{maxAvailableBalance:D,lentBalance:q>0?q:0,maxAvailableCollateral:parseFloat(0>Number(C)?"0":C||"0"),maxBaseQuantity:Number(k),maxBasePrice:Number(R),marginEnabled:S,hasBorrowMarket:A,getMaxOrderQuantityQueryKey:M}}])},453175,466250,e=>{"use strict";let t;var s=e.i(651325),i=e.i(567549),r=e.i(442354),n=e.i(881821),o=e.i(616427),a=e.i(130601),l=e.i(42156),c=e.i(412767),u=e.i(538122),d=e.i(249204),h=class extends u.Subscribable{#e;#t;#s;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#s=0}build(e,t,s){let i=new d.Mutation({client:e,mutationCache:this,mutationId:++this.#s,options:e.defaultMutationOptions(t),state:s});return this.add(i),i}add(e){this.#e.add(e);let t=f(e);
3if("string"==typeof t){let s=this.#t.get(t);s?s.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){let t=f(e);if("string"==typeof t){let s=this.#t.get(t);if(s)if(s.length>1){let t=s.indexOf(e);-1!==t&&s.splice(t,1)}else s[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){let t=f(e);if("string"!=typeof t)return!0;{let s=this.#t.get(t)?.find(e=>"pending"===e.state.status);return!s||s===e}}runNext(e){let t=f(e);return"string"==typeof t?this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){l.notifyManager.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,o.matchMutation)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,o.matchMutation)(e,t))}notify(e){l.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>
3e.state.isPaused);return l.notifyManager.batch(()=>Promise.all(e.map(e=>e.continue().catch(o.noop))))}};function f(e){return e.options.scope?.id}var m=u,p=e.i(190882),y=class extends m.Subscribable{#i;constructor(e={}){super(),this.config=e,this.#i=new Map}build(e,t,s){let i=t.queryKey,r=t.queryHash??(0,o.hashQueryKeyByOptions)(i,t),n=this.get(r);return n||(n=new p.Query({client:e,queryKey:i,queryHash:r,options:e.defaultQueryOptions(t),state:s,defaultOptions:e.getQueryDefaults(i)}),this.add(n)),n}add(e){this.#i.has(e.queryHash)||(this.#i.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#i.get(e.queryHash);t&&(e.destroy(),t===e&&this.#i.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){l.notifyManager.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#i.get(e)}getAll(){return[...this.#i.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,o.matchQuery)(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,o.matchQuery)(e,t)):t}notify(e){l.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){l.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){l.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},g=class{#r;#n;#o;#a;#l;#c;#u;#d;constructor(e={}){this.#r=e.queryCache||new y,this.#n=e.mutationCache||new h,this.#o=e.defaultOptions||{},this.#a=new Map,this.#l=new Map,this.#c=0}mount(){this.#c++,1===this.#c&&(this.#u=a.focusManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#r.onFocus())}),this.#d=c.onlineManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#r.onOnline())}))}unmount(){this.#c--,0===this.#c&&(this.#u?.(),this.#u=void 0,this.#d?.(),this.#d=void 0)}isFetching(e){return this.#r.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#n.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#r.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),s=this.#r.build(this,t),i=s.state.data;return void 0===i?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime((0,o.resolveQueryValue)(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return this.#r.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,s){let i=this.defaultQueryOptions({queryKey:e}),r=this.#r.get(i.queryHash)?.state.data,n=(0,o.functionalUpdate)(t,r);if(void 0!==n)return this.#r.build(this,i).setData(n,{...s,manual:!0})}setQueriesData(e,t,s){return l.notifyManager.batch(()=>this.#r.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,s)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#r.get(t.queryHash)?.state}removeQueries(e){let t=this.#r;l.notifyManager.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let s=this.#r;return l.notifyManager.batch(()=>{let i=s.findAll(e),r=new Set(i);return i.forEach(e=>{e.reset()}),this.refetchQueries({type:"active",predicate:e=>r.has(e)},t)})}cancelQueries(e,t={}){let s={revert:!0,...t};return Promise.all(l.notifyManager.batch(()=>this.#r.findAll(e).map(e=>e.cancel(s)))).then(o.noop).catch(o.noop)}invalidateQueries(e,t={}){return l.notifyManager.batch(()=>(this.#r.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 s={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(l.notifyManager.batch(()=>this.#r.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,s);return s.throwOnError||(t=t.catch(o.noop)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(o.noop)}async query(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let s=this.#r.build(this,t),i=s.isStaleByTime((0,o.resolveQueryValue)(t.staleTime,s))?await s.fetch(t):s.state.data,r=t.select;return r?r(i):i}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let s=this.#r.build(this,t);return s.isStaleByTime((0,o.resolveQueryValue)(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(o.noop).catch(o.noop)}infiniteQuery(e){return e._type="infinite",this.query(e)}
3fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(o.noop).catch(o.noop)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return c.onlineManager.isOnline()?this.#n.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#r}getMutationCache(){return this.#n}getDefaultOptions(){return this.#o}setDefaultOptions(e){this.#o=e}setQueryDefaults(e,t){this.#a.set((0,o.hashKey)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#a.values()],s={};return t.forEach(t=>{(0,o.partialMatchKey)(e,t.queryKey)&&Object.assign(s,t.defaultOptions)}),s}setMutationDefaults(e,t){this.#l.set((0,o.hashKey)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#l.values()],s={};return t.forEach(t=>{(0,o.partialMatchKey)(e,t.mutationKey)&&Object.assign(s,t.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#o.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,o.hashQueryKeyByOptions)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===o.skipToken&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#o.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#r.clear(),this.#n.clear()}},b=e.i(281849);function v(){return new g({defaultOptions:{queries:{staleTime:3e4,retry:!1,refetchOnWindowFocus:!1}}})}function w(){return o.isServer?v():(t||(t=v()),t)}e.s(["ReactQueryProvider",0,function({children:e}){let t=w();return(0,n.jsx)(b.QueryClientProvider,{client:t,children:e})},"getQueryClient",0,w],466250);var A=e.i(447547),S=e.i(713794),x=e.i(146855),E=e.i(953465);e.s(["getLatestFillForMarket",0,function(e){let t=w(),s=(0,x.getGetRecentTradesQueryKey)({symbol:e,limit:r.RECENT_TRADES_LIMIT}),i=t.getQueryData(s);return i?.[0]},"useRecentMarketTrades",0,()=>{let{marketName:e,tickPrecision:t,market:{quoteSymbol:n}={}}=(0,r.useMarket)(),{data:o}=(0,E.useTickerData)(),{data:a,isLoading:l}=(0,x.useGetRecentTrades)({symbol:e,limit:r.RECENT_TRADES_LIMIT},{query:{refetchOnWindowFocus:!0}}),c=(0,A.useNumberFormatter)({maximumFractionDigits:t,minimumFractionDigits:t}),u=(0,A.useNumberFormatter)({maximumFractionDigits:2,minimumFractionDigits:2}),d=(0,s.useMemo)(()=>o?.find(t=>t.symbol===e)?.lastPrice,[o,e]),h=a?.[0]?.price??d,f=(0,s.useMemo)(()=>{if(!h||!n||n===S.CustodyAsset.USDC)return h;let e=o?.find(e=>e.symbol===`${n}_${S.CustodyAsset.USDC}`)?.lastPrice;return e?(0,i.default)(h).times(e).toString():h},[h,n,o]);return{formattedLastPrice:h?c.format(Number(h)):"--",formattedLastPriceInUSDC:f?u.format(Number(f)):"--",latestPrice:h,latestPriceInUSDC:f,latestTrade:a?.[0],trades:a??[],isLoading:l}}],453175)},953465,e=>{"use strict";var t=e.i(651325),s=e.i(343990);e.s(["useTickerData",0,function(e){let i=(0,t.useCallback)(t=>e?t.find(t=>t.symbol===e):t,[e]);return(0,s.useGetTickers)(void 0,{query:{staleTime:3e3,select:i}})}])},891628,e=>{"use strict";var t=e.i(420853);e.s(["useTradeForm",0,function(){let e=(0,t.useAppStore)(e=>e.tradeForm),s=(0,t.useAppStore)(e=>e.setTradeForm);return{...e,setTradeForm:s}}])}]); 4 5//# debugId=66acd75b-e5cb-a74c-946e-4ea125109ead
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.