p.length-2?p.length-1:e.length-l;n>0;n--)if(void 0!==p[n])for(i=0;i0&&kn)s.push(e);else{for(;n>=i&&!c||c&&i1)throw new r.Exception("Uncaught Syntax error");return o[0].value>1e15?"Infinity":parseFloat(o[0].value.toFixed(15))},r.eval=function(e,t,n){return void 0===t?this.lex(e).toPostfix().postfixEval():void 0!==n?this.lex(e,t).toPostfix().postfixEval(n):void 0!==t.length?this.lex(e,t).toPostfix().postfixEval():this.lex(e).toPostfix().postfixEval(t)},e.exports=r},38617:function(e,t,n){"use strict";n.d(t,{F:function(){return u},f:function(){return c}});var r=n(2784);let i=["light","dark"],o="(prefers-color-scheme: dark)",a="undefined"==typeof window,s=(0,r.createContext)(void 0),l={setTheme:e=>{},themes:[]},u=()=>{var e;return null!==(e=(0,r.useContext)(s))&&void 0!==e?e:l},c=e=>(0,r.useContext)(s)?r.createElement(r.Fragment,null,e.children):r.createElement(f,e),d=["light","dark"],f=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:a=!0,storageKey:l="theme",themes:u=d,defaultTheme:c=n?"system":"light",attribute:f="data-theme",value:g,children:y,nonce:x})=>{let[b,w]=(0,r.useState)(()=>p(l,c)),[E,j]=(0,r.useState)(()=>p(l)),k=g?Object.values(g):u,S=(0,r.useCallback)(e=>{let r=e;if(!r)return;"system"===e&&n&&(r=v());let o=g?g[r]:r,s=t?m():null,l=document.documentElement;if("class"===f?(l.classList.remove(...k),o&&l.classList.add(o)):o?l.setAttribute(f,o):l.removeAttribute(f),a){let e=i.includes(c)?c:null,t=i.includes(r)?r:e;l.style.colorScheme=t}null==s||s()},[]),_=(0,r.useCallback)(e=>{w(e);try{localStorage.setItem(l,e)}catch(e){}},[e]),O=(0,r.useCallback)(t=>{let r=v(t);j(r),"system"===b&&n&&!e&&S("system")},[b,e]);(0,r.useEffect)(()=>{let e=window.matchMedia(o);return e.addListener(O),O(e),()=>e.removeListener(O)},[O]),(0,r.useEffect)(()=>{let e=e=>{e.key===l&&_(e.newValue||c)};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[_]),(0,r.useEffect)(()=>{S(null!=e?e:b)},[e,b]);let C=(0,r.useMemo)(()=>({theme:b,setTheme:_,forcedTheme:e,resolvedTheme:"system"===b?E:b,themes:n?[...u,"system"]:u,systemTheme:n?E:void 0}),[b,_,e,E,n,u]);return r.createElement(s.Provider,{value:C},r.createElement(h,{forcedTheme:e,disableTransitionOnChange:t,enableSystem:n,enableColorScheme:a,storageKey:l,themes:u,defaultTheme:c,attribute:f,value:g,children:y,attrs:k,nonce:x}),y)},h=(0,r.memo)(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:a,enableColorScheme:s,defaultTheme:l,value:u,attrs:c,nonce:d})=>{let f="system"===l,h="class"===n?`var d=document.documentElement,c=d.classList;c.remove(${c.map(e=>`'${e}'`).join(",")});`:`var d=document.documentElement,n='${n}',s='setAttribute';`,p=s?i.includes(l)&&l?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${l}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",m=(e,t=!1,r=!0)=>{let o=u?u[e]:e,a=t?e+"|| ''":`'${o}'`,l="";return s&&r&&!t&&i.includes(e)&&(l+=`d.style.colorScheme = '${e}';`),"class"===n?l+=t||o?`c.add(${a})`:"null":o&&(l+=`d[s](n,${a})`),l},v=e?`!function(){${h}${m(e)}}()`:a?`!function(){try{${h}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${f})){var t='${o}',m=window.matchMedia(t);if(m.media!==t||m.matches){${m("dark")}}else{${m("light")}}}else if(e){${u?`var x=${JSON.stringify(u)};`:""}${m(u?"x[e]":"e",!0)}}${f?"":"else{"+m(l,!1,!1)+"}"}${p}}catch(e){}}()`:`!function(){try{${h}var e=localStorage.getItem('${t}');if(e){${u?`var x=${JSON.stringify(u)};`:""}${m(u?"x[e]":"e",!0)}}else{${m(l,!1,!1)};}${p}}catch(t){}}();`;return r.createElement("script",{nonce:d,dangerouslySetInnerHTML:{__html:v}})},()=>!0),p=(e,t)=>{let n;if(!a){try{n=localStorage.getItem(e)||void 0}catch(e){}return n||t}},m=()=>{let e=document.createElement("style");return e.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(e)},1)}},v=e=>(e||(e=window.matchMedia(o)),e.matches?"dark":"light")},86570:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return n(76133)}])},4941:function(e,t,n){"use strict";n.d(t,{Ul:function(){return s},WD:function(){return l},fu:function(){return c},o4:function(){return u}});var r=n(52322),i=n(58815),o=n(82851),a=n(99182);function s(e){let{currentPage:t,parentPage:n,commandPage:s,className:l,...u}=e,c=(0,a.U8)(e=>e.search);if((null==n?void 0:n.namespace)===(null==t?void 0:t.namespace)&&!c)return(0,r.jsx)(a.mY.Item,{className:(0,o.cx)((0,i.Vkc)(),"group",l),value:"".concat(null==s?void 0:s.label," ").concat(u.children.toString()),...u})}function l(e){let{currentPage:t,commandPage:n,className:s,...l}=e,u=(0,a.U8)(e=>e.search),c=n.namespace.startsWith((null==t?void 0:t.namespace)||"");if(u&&c||n.namespace===(null==t?void 0:t.namespace))return(0,r.jsx)(a.mY.Item,{className:(0,o.cx)((0,i.Vkc)(),"group",s),value:"".concat(n.label," ").concat(l.children.toString()),...l})}function u(e){let{currentPage:t,commandPage:n,className:s,...l}=e,u=(0,a.U8)(e=>e.search),c=n.namespace.startsWith((null==t?void 0:t.namespace)||"");if(u&&c||!t||n.namespace===(null==t?void 0:t.namespace))return(0,r.jsx)(a.mY.Item,{className:(0,o.cx)((0,i.Vkc)(),"group",s),value:"".concat(n.label," ").concat(l.children.toString()),...l})}function c(e){let{heading:t,currentPage:n,commandPage:o,...s}=e,l=(0,a.U8)(e=>e.search);return(0,r.jsx)(a.mY.Group,{heading:l&&(null==n?void 0:n.namespace)!==o.namespace&&(0,r.jsx)(i.__J,{className:"px-1",size:"12",children:o.label}),...s})}n(2784)},3639:function(e,t,n){"use strict";n.d(t,{F:function(){return y}});var r=n(52322),i=n(4941);let o={namespace:"contracts/filterStatus",label:"Contracts filter by status"},a=[{id:"filterStatusActive",value:"active",label:"Contract is active"},{id:"filterStatusSuccessful",value:"successful",label:"Contract was successful"},{id:"filterStatusPending",value:"pending",label:"Contract is pending"},{id:"filterStatusRejected",value:"rejected",label:"Contract was rejected"},{id:"filterStatusFailed",value:"failed",label:"Contract has failed"}];function s(e){let{select:t,currentPage:n}=e;return(0,r.jsx)(i.fu,{currentPage:n,commandPage:o,children:a.map(e=>(0,r.jsx)(i.WD,{currentPage:n,commandPage:o,onSelect:()=>{t(e)},children:e.label},e.id+e.value))})}var l=n(22515),u=n(734);let c={namespace:"contracts/filterAddress",label:"Contracts filter by ID"};function d(e){let{select:t,currentPage:n}=e,{openDialog:o}=(0,l.Rh)(),a=(0,u.O)("");return(0,r.jsx)(i.fu,{currentPage:n,commandPage:c,children:(0,r.jsx)(i.WD,{currentPage:n,commandPage:c,onSelect:()=>{t(),o("contractsFilterContractId")},children:a.label})})}function f(e){let{select:t,currentPage:n,parentPage:o,commandPage:a}=e,{openDialog:s}=(0,l.Rh)();return(0,r.jsx)(i.Ul,{currentPage:n,parentPage:o,commandPage:a,onSelect:()=>{t(),s("contractsFilterContractId")},children:c.label})}function h(e){let{currentPage:t,select:n}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s,{currentPage:t,select:n}),(0,r.jsx)(d,{currentPage:t,select:n})]})}let p={namespace:"contracts",label:"Contracts"};function m(e){let{currentPage:t,parentPage:n,pushPage:a,select:s}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ul,{currentPage:t,parentPage:n,commandPage:p,onSelect:()=>{a(o)},children:o.label}),(0,r.jsx)(f,{currentPage:t,parentPage:n,commandPage:p,select:s})]})}var v=n(92838),g=n(2784);function y(e){let{currentPage:t,parentPage:n,pushPage:i,beforeSelect:o,afterSelect:a}=e,{setFilter:s}=(0,v.G)(),l=(0,g.useCallback)(e=>{o&&o(),e&&s(e),a&&a()},[s,o,a]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(m,{parentPage:n,currentPage:t,pushPage:i,select:l}),(0,r.jsx)(h,{currentPage:t,select:l})]})}},71930:function(e,t,n){"use strict";n.d(t,{_:function(){return i},h:function(){return o}});var r=n(27444);let i={home:"/",volumes:{index:"/volumes"},contracts:{index:"/contracts"},config:{index:"/config",host:"/config#host",pricing:"/config#pricing",dns:"/config#dns",bandwidth:"/config#bandwidth",registry:"/config#registry",accounts:"/config#accounts"},wallet:{view:"/wallet"},node:{index:"/node",txPool:"/node/txpool",peers:"/node/peers"},login:"/login"},o=r.dk},99957:function(e,t,n){"use strict";n.d(t,{iV:function(){return w},ZR:function(){return b}});var r=n(52322),i=n(2784),o=n(58815),a=n(27444);let s=[{value:"",label:"Off"},{value:"route53",label:"Route 53"},{value:"noip",label:"No-IP"},{value:"duckdns",label:"Duck DNS"},{value:"cloudflare",label:"Cloudflare"}],l={acceptingContracts:!1,netAddress:"",maxContractDuration:void 0,contractPrice:void 0,baseRPCPrice:void 0,sectorAccessPrice:void 0,collateralMultiplier:void 0,maxCollateral:void 0,storagePrice:void 0,egressPrice:void 0,ingressPrice:void 0,priceTableValidity:void 0,maxRegistryEntries:void 0,accountExpiry:void 0,maxAccountBalance:void 0,ingressLimit:void 0,egressLimit:void 0,dnsProvider:"",dnsIpv4:!1,dnsIpv6:!1,dnsDuckDnsToken:"",dnsNoIpEmail:"",dnsNoIpPassword:"",dnsAwsId:"",dnsAwsSecret:"",dnsAwsZoneId:"",dnsCloudflareToken:"",dnsCloudflareZoneId:""};var u=n(6391),c=n.n(u),d=n(96206),f=n(94977);function h(e,t){return new(c())(12960).times(e).div((0,o.S5V)(1)).times(t)}function p(e,t){return t?new(c())(new(c())(e).div(t.sc.usd).div(10).toFixed(0)).times(10):void 0}var m=n(63955),v=n(92762),g=n(2850),y=n(47025);let x=(0,i.createContext)({}),b=()=>(0,i.useContext)(x);function w(e){let{children:t}=e,n=function(){let e=(0,a.rV)({standalone:"configSettingsForm",config:{swr:{refreshInterval:(0,o.sWj)(1)}}}),t=(0,a.Te)(),n=(0,a.uo)({disabled:!e.data||!e.data.ddns.provider,config:{swr:{revalidateOnFocus:!1,errorRetryCount:0}}}),[u,x]=(0,v.Z)("v0/config/showAdvanced",{defaultValue:!1}),b=(0,m.cI)({mode:"all",defaultValues:l}),w=b.watch("storagePrice"),E=b.watch("collateralMultiplier"),j=(0,i.useCallback)(e=>{let t;let n=(t=null,"duckdns"===e.ddns.provider&&(t={dnsDuckDnsToken:e.ddns.options.token}),"noip"===e.ddns.provider&&(t={dnsNoIpEmail:e.ddns.options.email,dnsNoIpPassword:e.ddns.options.password}),"route53"===e.ddns.provider&&(t={dnsAwsId:e.ddns.options.ID,dnsAwsSecret:e.ddns.options.secret,dnsAwsZoneId:e.ddns.options.zoneID}),"cloudflare"===e.ddns.provider&&(t={dnsCloudflareToken:e.ddns.options.token,dnsCloudflareZoneId:e.ddns.options.zoneID}),{acceptingContracts:e.acceptingContracts,netAddress:e.netAddress,maxContractDuration:new(c())(e.maxContractDuration).div((0,o.S5V)(1)),contractPrice:(0,d.ll)(e.contractPrice,6),baseRPCPrice:(0,d.ll)((0,f.sS)(e.baseRPCPrice),6),sectorAccessPrice:(0,d.ll)((0,f.nS)(e.sectorAccessPrice),6),collateralMultiplier:new(c())(e.collateralMultiplier),maxCollateral:(0,d.ll)(e.maxCollateral,6),storagePrice:(0,d.ll)((0,f.SY)(e.storagePrice),6),egressPrice:(0,d.ll)((0,f.B1)(e.egressPrice),6),ingressPrice:(0,d.ll)((0,f.dK)(e.ingressPrice),6),priceTableValidity:new(c())(e.priceTableValidity).div(1e9).div(60),maxRegistryEntries:new(c())(e.maxRegistryEntries),accountExpiry:new(c())(e.accountExpiry).div(1e9).div(86400),maxAccountBalance:(0,d.ll)(e.maxAccountBalance,6),ingressLimit:(0,o.BTR)(new(c())(e.ingressLimit)),egressLimit:(0,o.BTR)(new(c())(e.egressLimit)),dnsProvider:e.ddns.provider,dnsIpv4:e.ddns.ipv4,dnsIpv6:e.ddns.ipv6,...t});return b.reset(n),n},[b]),k=(0,i.useMemo)(()=>[e.data],[e.data]),S=(0,i.useCallback)(()=>e.data?j(e.data):null,[j,e.data]),[_,O]=(0,i.useState)(!1);(0,i.useEffect)(()=>{if(!_){let e=S();e&&O(!0)}},[_,S]);let C=(0,i.useCallback)(async()=>{let t=await e.mutate();t?(j(t),await n.mutate()):(0,o.OHV)("Error fetching settings.")},[e,j,n]),M=(0,i.useCallback)(async n=>{if(e.data)try{var r;let i;let a={};u||(a.maxCollateral=h(n.storagePrice,n.collateralMultiplier));let s={...n,...a},l=await t.patch({payload:(r=e.data,i=null,"duckdns"===s.dnsProvider&&(i={token:s.dnsDuckDnsToken}),"noip"===s.dnsProvider&&(i={email:s.dnsNoIpEmail,password:s.dnsNoIpPassword}),"route53"===s.dnsProvider&&(i={ID:s.dnsAwsId,secret:s.dnsAwsSecret,zoneID:s.dnsAwsZoneId}),"cloudflare"===s.dnsProvider&&(i={token:s.dnsCloudflareToken,zoneID:s.dnsCloudflareZoneId}),{...r,acceptingContracts:s.acceptingContracts,netAddress:s.netAddress,maxContractDuration:Number(s.maxContractDuration.times((0,o.S5V)(1)).toFixed(0)),contractPrice:(0,d.qN)(s.contractPrice).toString(),baseRPCPrice:s.baseRPCPrice.div((0,d.ll)((0,f.sS)(1))).toFixed(0),sectorAccessPrice:s.sectorAccessPrice.div((0,d.ll)((0,f.nS)(1))).toFixed(0),collateralMultiplier:s.collateralMultiplier.toNumber(),maxCollateral:(0,d.qN)(s.maxCollateral).toString(),storagePrice:s.storagePrice.div((0,d.ll)((0,f.SY)(1))).toFixed(0),egressPrice:s.egressPrice.div((0,d.ll)((0,f.B1)(1))).toFixed(0),ingressPrice:s.ingressPrice.div((0,d.ll)((0,f.dK)(1))).toFixed(0),priceTableValidity:Number(s.priceTableValidity.times(60).times(1e9).toFixed(0)),maxRegistryEntries:Number(s.maxRegistryEntries.toFixed(0)),accountExpiry:Number(s.accountExpiry.times(86400).times(1e9).toFixed(0)),maxAccountBalance:(0,d.qN)(s.maxAccountBalance).toString(),ingressLimit:Number((0,o.YaL)(s.ingressLimit).toFixed(0)),egressLimit:Number((0,o.YaL)(s.egressLimit).toFixed(0)),ddns:{...null==r?void 0:r.ddns,provider:s.dnsProvider,ipv4:s.dnsIpv4,ipv6:s.dnsIpv6,options:i}})});if(l.error)throw Error(l.error);b.formState.dirtyFields.netAddress?(0,o.OPV)("Settings have been saved. Address has changed, make sure to re-announce the host.",{duration:2e4}):(0,o.OPV)("Settings have been saved."),await C()}catch(e){(0,o.OHV)(e.message),console.log(e)}},[b,u,e,t,C]),A=(0,y.BW)(),T=(0,i.useMemo)(()=>{var e;return function(e){let{showAdvanced:t,storageTBMonth:n,collateralMultiplier:i,rates:a}=e;return{acceptingContracts:{type:"boolean",category:"host",title:"Accepting contracts",description:(0,r.jsx)(r.Fragment,{children:"Whether or not the host is accepting contracts."}),validation:{}},netAddress:{type:"text",category:"host",title:"Address",description:(0,r.jsx)(r.Fragment,{children:"The network address of the host."}),placeholder:"my.host.com:9882",validation:{required:"required"}},maxContractDuration:{type:"number",category:"host",title:"Maximum contract duration",units:"months",decimalsLimit:2,suggestion:new(c())(6),suggestionTip:"The default maximum duration is 6 months.",description:(0,r.jsx)(r.Fragment,{children:"The maximum contract duration that the host will accept."}),hidden:!t,validation:{required:"required",validate:{min:e=>new(c())(e).gte((0,o.E6f)(4320))||"must be at least 1 month"}}},storagePrice:{title:"Storage price",type:"siacoin",category:"pricing",units:"SC/TB/month",decimalsLimitSc:6,suggestion:a?p(1,a):void 0,suggestionTip:"The suggested storage price in siacoins per TB per month.",description:(0,r.jsx)(r.Fragment,{children:"The host's storage price in siacoins per TB per month."}),validation:{required:"required"}},egressPrice:{title:"Egress price",type:"siacoin",category:"pricing",units:"SC/TB",decimalsLimitSc:6,suggestion:a?p(10,a):void 0,suggestionTip:"The suggested egress price in siacoins for egress per TB.",description:(0,r.jsx)(r.Fragment,{children:"The host's egress price in siacoins per TB."}),validation:{required:"required"}},ingressPrice:{title:"Ingress price",type:"siacoin",category:"pricing",units:"SC/TB",suggestion:a?p(.05,a):void 0,suggestionTip:"The suggested ingress price in siacoins per TB.",decimalsLimitSc:6,description:(0,r.jsx)(r.Fragment,{children:"The host's ingress price in siacoins per TB."}),validation:{required:"required"}},collateralMultiplier:{title:"Collateral multiplier",type:"number",category:"pricing",units:"* storage price",placeholder:"2",decimalsLimit:1,description:(0,r.jsx)(r.Fragment,{children:"The host's target collateral as a multiple of storage price."}),suggestion:new(c())(2),suggestionTip:"The default multiplier is 2x the storage price.",validation:{required:"required"}},maxCollateral:{title:"Maximum collateral",type:"siacoin",category:"pricing",decimalsLimitSc:6,suggestion:n&&i?h(n,i):void 0,suggestionTip:"The suggested maximum collateral.",description:(0,r.jsx)(r.Fragment,{children:"The host's maximum collateral in siacoins."}),hidden:!t,validation:{required:"required"}},contractPrice:{title:"Contract price",type:"siacoin",category:"pricing",decimalsLimitSc:6,suggestionTip:"The suggested contract price.",tipsDecimalsLimitSc:1,suggestion:new(c())(.2),description:(0,r.jsx)(r.Fragment,{children:"The host's contract price in siacoins."}),hidden:!t,validation:{required:"required"}},baseRPCPrice:{title:"Base RPC price",type:"siacoin",category:"pricing",units:"SC/million",suggestion:new(c())(1),suggestionTip:"The suggested base RPC price in siacoins per million calls.",decimalsLimitSc:6,description:(0,r.jsx)(r.Fragment,{children:"The host's base RPC price in siacoins per million calls."}),hidden:!t,validation:{required:"required"}},sectorAccessPrice:{title:"Sector access price",type:"siacoin",category:"pricing",units:"SC/million",decimalsLimitSc:6,suggestion:new(c())(1),suggestionTip:"The suggested sector access price in siacoins per million sectors.",description:(0,r.jsx)(r.Fragment,{children:"The host's sector access price in siacoins per million sectors."}),hidden:!t,validation:{required:"required"}},priceTableValidity:{title:"Price table validity",type:"number",category:"pricing",units:"minutes",suggestion:new(c())(30),suggestionTip:"The suggested price table validity.",description:(0,r.jsx)(r.Fragment,{children:"How long a renter's registered price table remains valid."}),hidden:!t,validation:{required:"required"}},maxRegistryEntries:{title:"Maximum registry size",type:"number",category:"registry",units:"entries",suggestion:new(c())(1e3),suggestionTip:"The suggested maximum registry size.",decimalsLimit:0,description:(0,r.jsx)(r.Fragment,{children:"The maximum number of registry entries that the host will store. Each registry entry is up to 113 bytes."}),hidden:!t,validation:{required:"required"}},accountExpiry:{title:"Expiry",type:"number",category:"RHP3",units:"days",suggestion:new(c())(30),suggestionTip:"The suggested account expiry.",description:(0,r.jsx)(r.Fragment,{children:"How long a renter's ephemeral accounts are inactive before the host prunes them and recovers the remaining funds."}),hidden:!t,validation:{required:"required",validate:{min:e=>new(c())(e).gte(7)||"must be at least 1 week"}}},maxAccountBalance:{title:"Maximum balance",type:"siacoin",category:"RHP3",suggestion:new(c())(10),suggestionTip:"The suggested maximum account balance.",description:(0,r.jsx)(r.Fragment,{children:"Maximum balance a renter's ephemeral account can have. When the limit is reached, deposits are rejected until some of the funds have been spent."}),hidden:!t,validation:{required:"required",validate:{min:e=>new(c())(e).gte(1)||"must be at least 1 SC"}}},ingressLimit:{title:"Ingress limit",type:"number",category:"bandwidth",units:"MB/second",description:(0,r.jsx)(r.Fragment,{children:"The maximum amount of ingress bandwidth traffic in MB per second."}),validation:{required:"required"}},egressLimit:{title:"Egress limit",type:"number",category:"bandwidth",units:"MB/second",description:(0,r.jsx)(r.Fragment,{children:"The maximum amount of egress bandwidth traffic in MB per second."}),validation:{required:"required"}},dnsProvider:{title:"Dynamic DNS Provider",type:"select",category:"DNS",options:s,description:(0,r.jsx)(r.Fragment,{children:"Enable dynamic DNS with one of the supported providers."}),validation:{validate:e=>!!s.find(t=>t.value===e)||"must be one of supported providers"}},dnsIpv4:{title:"IPv4",type:"boolean",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"Whether IPv4 is enabled."}),show:e=>!!e.dnsProvider,validation:{validate:(e,t)=>!t.dnsProvider||!!(e||t.dnsIpv6)||"at least one of IPv4 and IPv6 must be enabled"},trigger:["dnsIpv6"]},dnsIpv6:{type:"boolean",title:"IPv6",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"Whether IPv6 is enabled."}),show:e=>!!e.dnsProvider,validation:{validate:(e,t)=>!t.dnsProvider||!!(e||t.dnsIpv4)||"at least one of IPv4 and IPv6 must be enabled"},trigger:["dnsIpv4"]},dnsDuckDnsToken:{type:"text",title:"Token",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"DuckDNS token."}),show:e=>"duckdns"===e.dnsProvider,validation:{validate:(e,t)=>"duckdns"!==t.dnsProvider||!!e||"required"}},dnsNoIpEmail:{type:"text",title:"Email",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"No-IP email."}),show:e=>"noip"===e.dnsProvider,validation:{validate:(e,t)=>"noip"!==t.dnsProvider||!!e||"required"}},dnsNoIpPassword:{type:"password",title:"Password",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"No-IP password."}),show:e=>"noip"===e.dnsProvider,validation:{validate:(e,t)=>"noip"!==t.dnsProvider||!!e||"required"}},dnsAwsId:{type:"text",title:"ID",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"AWS Route53 ID."}),show:e=>"route53"===e.dnsProvider,validation:{validate:(e,t)=>"route53"!==t.dnsProvider||!!e||"required"}},dnsAwsSecret:{type:"password",title:"Secret",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"AWS Route53 secret."}),show:e=>"route53"===e.dnsProvider,validation:{validate:(e,t)=>"route53"!==t.dnsProvider||!!e||"required"}},dnsAwsZoneId:{type:"text",title:"Zone ID",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"AWS Route53 zone ID."}),show:e=>"route53"===e.dnsProvider,validation:{validate:(e,t)=>"route53"!==t.dnsProvider||!!e||"required"}},dnsCloudflareToken:{type:"text",title:"Token",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"Cloudflare token."}),show:e=>"cloudflare"===e.dnsProvider,validation:{validate:(e,t)=>"cloudflare"!==t.dnsProvider||!!e||"required"}},dnsCloudflareZoneId:{type:"text",title:"Zone ID",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"Cloudflare zone ID."}),show:e=>"cloudflare"===e.dnsProvider,validation:{validate:(e,t)=>"cloudflare"!==t.dnsProvider||!!e||"required"}}}}({showAdvanced:u,storageTBMonth:w,collateralMultiplier:E,rates:null===(e=A.data)||void 0===e?void 0:e.rates})},[u,w,E,A.data]),P=(0,o.WsO)(T),N=(0,i.useMemo)(()=>b.handleSubmit(M,P),[b,M,P]),R=(0,i.useCallback)(()=>{let e=b.getValues(),t=S();if(t)for(let[n,r]of(b.reset(t),Object.entries(e)))b.setValue(n,r,{shouldDirty:!0})},[b,S]),{isUnlocked:D}=(0,g.Hv)();(0,i.useEffect)(()=>{D&&C()},[D]),(0,i.useEffect)(()=>{b.formState.isSubmitting||R()},[b,u,k]);let L=Object.entries(b.formState.dirtyFields).filter(e=>{let[t,n]=e;return!!n}).length;return{fields:T,settings:e,dynDNSCheck:n,changeCount:L,revalidateAndResetFormData:C,form:b,onSubmit:N,showAdvanced:u,setShowAdvanced:x}}();return(0,r.jsx)(x.Provider,{value:n,children:t})}},92838:function(e,t,n){"use strict";n.d(t,{x:function(){return x},G:function(){return y}});var r=n(52322),i=n(58815),o=n(5632),a=n(27444),s=n(2784),l=n(56860),u=n(41775),c=n(96206),d=n(22515);function f(e){let{id:t,status:n,contentProps:o,buttonProps:l}=e,c=(0,a.kr)(),{openDialog:f}=(0,d.Rh)(),h=(0,s.useCallback)(async()=>{let e=await c.put({params:{id:t}});e.error?(0,i.OHV)(e.error):(0,i.OPV)((0,r.jsxs)(r.Fragment,{children:["Integrity check successfully started, depending on contract data size this operation can take a while. Check ",(0,r.jsx)(i.EKh,{children:"hostd"})," ",(0,r.jsx)(i.rUS,{onClick:()=>f("alerts"),children:"alerts"})," for status updates."]}),{duration:12e3})},[t,c,f]),p=["active","pending"].includes(n);return(0,r.jsxs)(i.h_2,{trigger:(0,r.jsx)(i.zxk,{variant:"ghost",icon:"hover",...l,children:(0,r.jsx)(u.iG7,{})}),contentProps:{align:"start",...o},children:[(0,r.jsx)("div",{className:"px-1.5 py-1",children:(0,r.jsxs)(i.xvT,{size:"14",weight:"medium",color:"subtle",children:["Contract ",t.slice(0,24),"..."]})}),(0,r.jsx)(i.Juw,{children:"Actions"}),(0,r.jsx)(i.ua7,{content:p?"Trigger a data integrity check":"Data integrity check only available for active or pending contracts",children:(0,r.jsx)("div",{children:(0,r.jsxs)(i.Xiv,{disabled:!p,onSelect:()=>h(),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(u.dDl,{})}),"Integrity check"]})})})]})}let h=[{id:"actions",label:"",fixed:!0,cellClassName:"w-[50px] !pl-2 !pr-4 [&+*]:!pl-0",render:e=>{let{data:{id:t,status:n}}=e;return(0,r.jsx)(f,{id:t,status:n})}},{id:"contractId",label:"contract ID",category:"general",render:e=>{let{data:t}=e,{id:n,renewedFrom:o,isRenewedFrom:a,renewedTo:s,isRenewedTo:l}=t;return(0,r.jsxs)("div",{className:"flex flex-col gap-1 w-full",children:[(0,r.jsx)(i.XxW,{size:"12",value:(0,i.I13)(n),label:"contract ID"}),a&&(0,r.jsx)(i.ua7,{content:"Renewed from",align:"start",children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(i.xvT,{color:"subtle",children:(0,r.jsx)(u.L6f,{className:"scale-75"})}),(0,r.jsx)(i.XxW,{color:"subtle",size:"10",value:(0,i.I13)(o),label:"contract ID"})]})}),l&&(0,r.jsx)(i.ua7,{content:"Renewed to",align:"start",children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(i.xvT,{color:"subtle",children:(0,r.jsx)(u.IRm,{className:"scale-75"})}),(0,r.jsx)(i.XxW,{color:"subtle",size:"10",value:(0,i.I13)(s),label:"contract ID"})]})})]})}},{id:"status",label:"status",category:"general",render:e=>{let{data:{status:t}}=e;return(0,r.jsx)(i.Cts,{variant:"active"===t?"amber":"failed"===t?"red":"pending"===t?"amber":"rejected"===t?"red":"successful"===t?"green":void 0,children:t})}},{id:"timeline",label:"timeline",category:"time",render:e=>{let{data:t,context:{currentHeight:n,contractsTimeRange:o}}=e,{contractHeightStart:a,contractHeightEnd:s,revision:l,status:u}=t;return(0,r.jsx)("div",{className:"w-[400px]",children:(0,r.jsx)(i.TaT,{currentHeight:n,contractHeightStart:a,contractHeightEnd:"rejected"===u?void 0:s,proofWindowHeightStart:"rejected"===u?void 0:l.windowStart,proofWindowHeightEnd:"rejected"===u?void 0:l.windowEnd,range:o})})}},{id:"contractHeightStart",label:"start date",category:"time",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{contractHeightStart:t},context:{currentHeight:n}}=e;return(0,r.jsx)(i.xvT,{size:"12",children:(0,c.rN)((0,i.jrD)(n,t))})}},{id:"contractHeightEnd",label:"expiration date",category:"time",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{contractHeightEnd:t},context:{currentHeight:n}}=e;return(0,r.jsx)(i.xvT,{size:"12",children:(0,c.rN)((0,i.jrD)(n,t))})}},{id:"payoutHeight",label:"payout date",category:"time",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{payoutHeight:t},context:{currentHeight:n}}=e;return(0,r.jsx)(i.xvT,{size:"12",children:(0,c.rN)((0,i.jrD)(n,t))})}},{id:"filesize",label:"data size",category:"general",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{revision:{filesize:t}}}=e;return(0,r.jsx)(i.m2c,{size:"12",value:t,variant:"value",format:e=>(0,c.vW)(e.toNumber())})}},{id:"fileMerkleRoot",label:"merkle root",category:"general",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{revision:{fileMerkleRoot:t}}}=e;return(0,r.jsx)(i.XxW,{size:"12",value:(0,i.I13)(t)})}},{id:"payout",label:"payout",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{revision:t}}=e;return(0,r.jsx)(i.ho9,{displayBoth:!0,size:"12",value:t.payout})}},{id:"remainingRenterFunds",label:"remaining renter funds",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{revision:t}}=e;return(0,r.jsx)(i.ho9,{displayBoth:!0,size:"12",value:t.remainingRenterFunds})}},{id:"lockedCollateral",label:"locked collateral",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{lockedCollateral:t}}=e;return(0,r.jsx)(i.ho9,{displayBoth:!0,size:"12",value:t})}},{id:"usageRiskedCollateral",label:"risked collateral",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{usage:t}}=e;return(0,r.jsx)(i.ho9,{displayBoth:!0,size:"12",value:t.riskedCollateral})}},{id:"usageTotal",label:"total usage",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{usage:t}}=e;return(0,r.jsx)(i.ho9,{displayBoth:!0,size:"12",value:t.total})}},{id:"usageStorage",label:"storage usage",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{usage:t}}=e;return(0,r.jsx)(i.ho9,{displayBoth:!0,size:"12",value:t.storage})}},{id:"usageIngress",label:"ingress usage",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{usage:t}}=e;return(0,r.jsx)(i.ho9,{displayBoth:!0,size:"12",value:t.ingress})}},{id:"usageEgress",label:"egress usage",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{usage:t}}=e;return(0,r.jsx)(i.ho9,{displayBoth:!0,size:"12",value:t.egress})}},{id:"usageAccountFunding",label:"account funding usage",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{usage:t}}=e;return(0,r.jsx)(i.ho9,{displayBoth:!0,size:"12",value:t.accountFunding})}},{id:"usageRpc",label:"RPC usage",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{usage:t}}=e;return(0,r.jsx)(i.ho9,{displayBoth:!0,size:"12",value:t.rpc})}}].map(e=>({...e,..."financial"===e.category?{icon:(0,r.jsx)(u.dZ8,{className:"relative opacity-50 scale-75"}),label:e.label,tip:"financial: ".concat(e.label)}:{label:e.label,tip:e.label}}));var p=n(6391),m=n.n(p),v=n(25573);let g=(0,s.createContext)({}),y=()=>(0,s.useContext)(g);function x(e){let{children:t}=e,n=function(){var e,t;let n=(0,o.useRouter)(),r=Number(n.query.limit||50),u=Number(n.query.offset||0),{filters:c,setFilter:d,removeFilter:f,removeLastFilter:p,resetFilters:g}=(0,i.Uu5)(),{configurableColumns:y,enabledColumns:x,sortableColumns:b,toggleColumnVisibility:w,setColumnsVisible:E,setColumnsHidden:j,toggleSort:k,setSortDirection:S,setSortField:_,sortField:O,sortDirection:C,resetDefaultColumnVisibility:M}=(0,i.oy6)("hostd/v0/contracts",{columns:h,columnsDefaultVisible:l.gd,sortOptions:l.Fo,defaultSortField:l.nw}),A=(0,a.GP)({payload:{limit:r,offset:u,sortField:null===(e=l.Fo.find(e=>e.id===O))||void 0===e?void 0:e.value,sortDesc:"desc"===C,contractIDs:c.filter(e=>"filterContractId"===e.id).map(e=>e.value),statuses:c.filter(e=>e.id.startsWith("filterStatus")).map(e=>e.value)},config:{swr:{refreshInterval:(0,i.XBW)(60)}}}),T=function(e){let{response:t}=e;return(0,s.useMemo)(()=>{var e;return t.data?(null===(e=t.data.contracts)||void 0===e?void 0:e.map(e=>(function(e){var t;let n=new(m())(e.usage.accountFunding||0),r=new(m())(e.usage.egress||0),i=new(m())(e.usage.ingress||0),o=new(m())(e.usage.riskedCollateral||0),a=new(m())(e.usage.rpc||0),s=new(m())(e.usage.storage||0),l=n.plus(r).plus(i).plus(a).plus(s),u=e.resolutionHeight>0?e.resolutionHeight+144:e.revision.windowEnd+144;return{id:e.revision.parentID,revision:{parentID:e.revision.parentID,unlockConditions:e.revision.unlockConditions,filesize:new(m())(e.revision.filesize||0),fileMerkleRoot:e.revision.fileMerkleRoot,windowStart:e.revision.windowStart,windowEnd:e.revision.windowEnd,payout:new(m())("active"==e.status||e.resolutionHeight>0?e.revision.validProofOutputs[1].value:e.revision.missedProofOutputs[1].value),remainingRenterFunds:new(m())((null===(t=e.revision.validProofOutputs)||void 0===t?void 0:t[0].value)||0),validProofOutputs:e.revision.validProofOutputs,missedProofOutputs:e.revision.missedProofOutputs,unlockHash:e.revision.unlockHash,revisionNumber:e.revision.revisionNumber},usage:{total:l,accountFunding:n,egress:r,ingress:i,riskedCollateral:o,rpc:a,storage:s},lockedCollateral:new(m())(e.lockedCollateral||0),hostSignature:e.hostSignature,renterSignature:e.renterSignature,status:e.status,negotiationHeight:e.negotiationHeight,formationConfirmed:e.formationConfirmed,revisionConfirmed:e.revisionConfirmed,resolutionHeight:e.resolutionHeight,payoutHeight:u,contractHeightStart:e.negotiationHeight,contractHeightEnd:e.revision.windowStart,renewedTo:e.renewedTo,renewedFrom:e.renewedFrom,isRenewedFrom:"fcid:0000000000000000000000000000000000000000000000000000000000000000"!==e.renewedFrom,isRenewedTo:"fcid:0000000000000000000000000000000000000000000000000000000000000000"!==e.renewedTo}})(e)))||[]:null},[t.data])}({response:A}),P=(0,s.useMemo)(()=>h.filter(e=>x.includes(e.id)),[x]),N=A.isValidating,R=A.error,D=(0,i.c2j)(T,N,R,c),{estimatedBlockHeight:L,isSynced:F,nodeBlockHeight:V}=(0,v.n)(),z=F?V:L,{range:I}=(0,s.useMemo)(()=>(0,i.EJC)(z,T||[]),[z,T]);return{dataState:D,offset:u,limit:r,cellContext:{contractsTimeRange:I,currentHeight:z},pageCount:(null==T?void 0:T.length)||0,totalCount:null===(t=A.data)||void 0===t?void 0:t.count,columns:P,dataset:T,configurableColumns:y,enabledColumns:x,sortableColumns:b,toggleColumnVisibility:w,setColumnsVisible:E,setColumnsHidden:j,toggleSort:k,setSortDirection:S,setSortField:_,sortField:O,sortDirection:C,resetDefaultColumnVisibility:M,filters:c,setFilter:d,removeFilter:f,removeLastFilter:p,resetFilters:g}}();return(0,r.jsx)(g.Provider,{value:n,children:t})}},56860:function(e,t,n){"use strict";n.d(t,{Fo:function(){return i},gd:function(){return r},nw:function(){return o}});let r=["contractId","status","usageTotal","lockedCollateral","timeline"],i=[{id:"status",value:"status",label:"status",category:"general"},{id:"timeline",value:"negotiationHeight",label:"timeline",category:"time"},{id:"contractHeightStart",value:"negotiationHeight",label:"start height",category:"time"},{id:"contractHeightEnd",value:"expirationHeight",label:"expiration height",category:"time"}],o="timeline"},22515:function(e,t,n){"use strict";n.d(t,{Tu:function(){return em},xQ:function(){return ev},Rh:function(){return ep}});var r=n(52322),i=n(2784),o=n(58815),a=n(27444),s=n(96206),l=n(63955);function u(e,t,n){var r=this,o=(0,i.useRef)(null),a=(0,i.useRef)(0),s=(0,i.useRef)(null),l=(0,i.useRef)([]),u=(0,i.useRef)(),c=(0,i.useRef)(),d=(0,i.useRef)(e),f=(0,i.useRef)(!0);(0,i.useEffect)(function(){d.current=e},[e]);var h=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw TypeError("Expected a function");t=+t||0;var p=!!(n=n||{}).leading,m=!("trailing"in n)||!!n.trailing,v="maxWait"in n,g=v?Math.max(+n.maxWait||0,t):null;return(0,i.useEffect)(function(){return f.current=!0,function(){f.current=!1}},[]),(0,i.useMemo)(function(){var e=function(e){var t=l.current,n=u.current;return l.current=u.current=null,a.current=e,c.current=d.current.apply(n,t)},n=function(e,t){h&&cancelAnimationFrame(s.current),s.current=h?requestAnimationFrame(e):setTimeout(e,t)},i=function(e){if(!f.current)return!1;var n=e-o.current;return!o.current||n>=t||n<0||v&&e-a.current>=g},y=function(t){return s.current=null,m&&l.current?e(t):(l.current=u.current=null,c.current)},x=function e(){var r=Date.now();if(i(r))return y(r);if(f.current){var s=t-(r-o.current);n(e,v?Math.min(s,g-(r-a.current)):s)}},b=function(){var d=Date.now(),h=i(d);if(l.current=[].slice.call(arguments),u.current=r,o.current=d,h){if(!s.current&&f.current)return a.current=o.current,n(x,t),p?e(o.current):c.current;if(v)return n(x,t),e(o.current)}return s.current||n(x,t),c.current};return b.cancel=function(){s.current&&(h?cancelAnimationFrame(s.current):clearTimeout(s.current)),a.current=0,l.current=o.current=u.current=s.current=null},b.isPending=function(){return!!s.current},b.flush=function(){return s.current?y(Date.now()):c.current},b},[p,v,t,g,m,h])}function c(e,t){return e===t}function d(e){return"function"==typeof e?function(){return e}:e}var f=n(99182),h=n(4941),p=n(41775);function m(e){let{search:t}=e;return(0,r.jsxs)(o.xvT,{color:"verySubtle",className:"flex flex-col gap-2 justify-center items-center mt-5 mb-3",children:[(0,r.jsx)(o.xvT,{color:"verySubtle",className:"flex gap-2 justify-center items-center",children:(0,r.jsx)(p.Qbr,{})}),(0,r.jsx)(o.xvT,{size:"12",color:"verySubtle",className:"flex justify-center",children:t?"No matching directory.":"Select a directory to get started."})]})}function v(){var e;let t=(0,a.On)({config:{swr:{revalidateOnFocus:!1,keepPreviousData:!0}}});return(null===(e=t.data)||void 0===e?void 0:e.OS)==="windows"?"\\":"/"}var g=n(5648),y=n.n(g),x=n(1573),b=n.n(x);function w(e){let{currentPath:t,childPath:n,separator:r}=e;return"\\"===t&&n.endsWith(":")?n+r:E(t,n,r)}function E(e,t,n){e=e===n?e:b()(e,n),t=y()(t,n);let r="";return(r=e.length?t.length&&t!==n?e===n?n+t:e+n+t:e:t).endsWith(":")?r+n:r}function j(){return(0,r.jsxs)(o.xvT,{color:"verySubtle",className:"flex flex-col gap-2 justify-center items-center mt-5 mb-3",children:[(0,r.jsx)(o.xvT,{color:"verySubtle",className:"flex gap-2 justify-center items-center",children:(0,r.jsx)(p.Qbr,{})}),(0,r.jsx)(o.xvT,{size:"12",color:"verySubtle",className:"flex justify-center",children:"Error loading directory."})]})}function k(e){let{path:t,onCreate:n}=e,s=v(),l=(0,a.Kw)(),[u,c]=(0,i.useState)(""),d=(0,i.useCallback)(async()=>{let e=await l.put({payload:{path:w({currentPath:t,childPath:u,separator:s})}});e.error?(0,o.OHV)("Error creating directory: ".concat(e.error)):(n(u),c(""))},[l,u,n,t,s]);return(0,r.jsxs)("div",{className:"flex items-center gap-2 overflow-hidden w-full",children:[(0,r.jsx)(o.xvT,{color:"verySubtle",className:"group-data-[selected=true]:text-gray-1000 dark:group-data-[selected=true]:text-graydark-1000",children:(0,r.jsx)(p.L37,{})}),(0,r.jsx)("div",{className:"flex-1",children:(0,r.jsx)(o.nvn,{focus:"none",variant:"ghost",placeholder:"type new directory name",className:"!pl-0 font-normal h-5",value:u,onChange:e=>{c(e.currentTarget.value)},onKeyUp:e=>{e.stopPropagation(),"Enter"===e.key&&d()},size:"small"})})]})}function S(e){let{path:t,setPath:n,commandPage:i,currentPage:a,beforeSelect:s,afterSelect:l}=e,u=v();return(0,r.jsx)(h.WD,{commandPage:i,currentPage:a,onSelect:()=>{t&&(s&&s(),n(function(e,t){if(e.endsWith(":\\"))return t;let n="".concat(e.split(t).slice(0,-1).join(t));return""===n?t:n.endsWith(":")?n+t:n}(t,u)),l&&l())},value:"..",children:(0,r.jsxs)("div",{className:"flex items-center gap-2 overflow-hidden",children:[(0,r.jsx)(o.xvT,{color:"verySubtle",className:"group-data-[selected=true]:text-gray-1000 dark:group-data-[selected=true]:text-graydark-1000",children:(0,r.jsx)(p.ROc,{size:16})}),(0,r.jsx)(o.xvT,{ellipsis:!0,children:".."})]})},"..")}let _={namespace:"volumes/directorySelect",label:"Directory select"};function O(e){var t,n,i,a,s,l,u;let{path:c,dir:d,setPath:g,currentPage:y,beforeSelect:x,afterSelect:b}=e,E=v(),O=(null===(t=d.data)||void 0===t?void 0:t.path)===E,C=(null===(n=d.data)||void 0===n?void 0:n.path)==="\\";return(0,r.jsxs)(h.fu,{currentPage:y,commandPage:_,children:[d.isValidating||!d.data||d.error?null:O?null:(0,r.jsx)(S,{path:d.data.path,setPath:g,currentPage:y,commandPage:_,afterSelect:b,beforeSelect:x}),(0,r.jsxs)(f.mY.Empty,{children:[!d.isValidating&&d.error?(0,r.jsx)(j,{}):null,d.isValidating||d.error||(null===(a=d.data)||void 0===a?void 0:null===(i=a.directories)||void 0===i?void 0:i.length)?null:(0,r.jsx)(m,{search:c})]}),!d.isValidating&&!d.error&&(null===(l=d.data)||void 0===l?void 0:null===(s=l.directories)||void 0===s?void 0:s.length)?d.data.directories.map(e=>(0,r.jsx)(h.WD,{commandPage:_,currentPage:y,onSelect:()=>{x&&x();let t=w({currentPath:d.data.path,childPath:e,separator:E});g(t),b&&b()},value:e,children:(0,r.jsxs)("div",{className:"flex items-center gap-2 overflow-hidden",children:[(0,r.jsx)(o.xvT,{color:"verySubtle",className:"group-data-[selected=true]:text-gray-1000 dark:group-data-[selected=true]:text-graydark-1000",children:(0,r.jsx)(p.ROc,{size:16})}),(0,r.jsx)(o.xvT,{ellipsis:!0,children:e})]})},e)):null,!C&&!d.isValidating&&!d.error&&(0,r.jsx)(h.WD,{commandPage:_,currentPage:y,value:"create new directory",children:(0,r.jsx)(k,{path:null===(u=d.data)||void 0===u?void 0:u.path,onCreate:e=>{d.mutate(t=>{var n;return{...t,directories:(null==t?void 0:null===(n=t.directories)||void 0===n?void 0:n.concat(e))||[e]}})}})})]})}function C(e){let{path:t,dir:n,onChange:i}=e;return(0,r.jsx)(f.mY,{label:"Select volume",shouldFilter:!1,children:(0,r.jsx)(o.s_4,{className:"h-[200px] p-1 overflow-hidden",children:(0,r.jsx)(o.xrM,{keyToResetScrollbars:t,children:(0,r.jsx)(f.mY.List,{children:(0,r.jsx)(O,{path:t,dir:n,setPath:i,currentPage:_})})})})})}var M=n(82851);function A(e){let{label:t,newSizeGB:n,currentSizeGB:i=0,maxSizeGB:a=0}=e,l=in,c=n>a;return(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsxs)("div",{className:"relative w-full h-1 rounded-lg bg-gray-300 dark:bg-graydark-300 overflow-hidden",children:[(0,r.jsx)("div",{className:(0,M.cx)("absolute h-1 rounded-tl-lg rounded-bl-lg",void 0!==n&&u?"bg-red-500 dark:bg-red-500":"bg-gray-700 dark:bg-graydark-800",l?"z-10":"z-0"),style:{width:a?"".concat(i/a*100,"%"):"0%"}}),(0,r.jsx)("div",{className:(0,M.cx)("absolute h-1 rounded-tl-lg rounded-bl-lg",c?"bg-amber-500 dark:bg-amber-500":void 0!==n&&l?"bg-green-500 dark:bg-green-500":"bg-gray-700 dark:bg-graydark-800",u?"z-10":"z-0"),style:{width:a?"".concat(n/a*100,"%"):"0%"}})]}),(0,r.jsxs)("div",{className:"h-4 flex justify-between",children:[t||(0,r.jsx)("div",{}),void 0!==n&&a?(0,r.jsx)(o.xvT,{size:"12",color:"subtle",children:"".concat((n/a*100).toFixed(0),"% of ").concat((0,s.vW)((0,o.Hzd)(a))," available")}):null]})]})}let T={size:void 0,name:"",path:"~",immediatePath:"~"};function P(e){var t;let{trigger:n,open:c,onOpenChange:d}=e,{closeDialog:f}=ep(),h=(0,a.HU)(),p=v(),m=(0,l.cI)({mode:"all",defaultValues:T}),g=m.watch("path"),y=m.watch("immediatePath"),x=m.watch("name"),b=m.watch("size"),w=u(()=>{g!==y&&m.setValue("path",y)},500);(0,i.useEffect)(()=>{w()},[y]),(0,i.useEffect)(()=>{g!==y&&m.setValue("immediatePath",g)},[g]);let j=(0,i.useCallback)(async e=>{let t=await h.post({payload:{localPath:E(g,x,p),maxSectors:(0,o.WN2)(e.size).toNumber()}});t.error?(0,o.OHV)(t.error):((0,o.OPV)("New volume created."),m.reset(T),f())},[m,h,f,x,g,p]),k=(0,a.cM)({disabled:!c,params:{path:""===g?p:g},config:{swr:{shouldRetryOnError:!1}}});(0,i.useEffect)(()=>{k.error&&m.setError("immediatePath",{message:"Directory does not exist"})},[k.error]),(0,i.useEffect)(()=>{k.data&&k.data.path!==g&&m.setValue("path",k.data.path)},[k.data]);let S=(null==b?void 0:b.toNumber())||0,_=k.data?(0,o.Uzc)(k.data.freeBytes).toNumber():0,O=(0,o.Uzc)((null===(t=k.data)||void 0===t?void 0:t.freeBytes)||0).toNumber(),M=(0,i.useMemo)(()=>({name:{type:"text",title:"Name",placeholder:"data.dat",validation:{required:"required"}},immediatePath:{type:"text",title:"Location",placeholder:"Enter a directory or select one below",validation:{required:"required",validate:{}}},path:{type:"text",title:"Location",validation:{required:"required",validate:{req:e=>"\\"!==e||"directory within a drive required"}}},size:{type:"number",title:"Size",decimalsLimit:0,units:"GB",placeholder:"1,000",validation:{required:"required",validate:{between:e=>{let t="Must be between ".concat((0,s.vW)((0,o.Hzd)(10))," and ").concat((0,s.vW)((0,o.Hzd)(O),{fixed:3}));return e<=O&&e>=10||t},nospace:()=>O>10||"not enough space in directory"}}}}),[O]),P=(0,o.WsO)(M);return m.register("path",M.path.validation),(0,r.jsx)(o.VqE,{title:"Create Volume",trigger:n,open:c,onOpenChange:e=>{e||m.reset(T),d(e)},contentVariants:{className:"w-[400px]"},onSubmit:m.handleSubmit(j,P),controls:(0,r.jsx)("div",{className:"flex flex-col gap-1",children:(0,r.jsx)(o.ZqQ,{form:m,children:"Create"})}),children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(o.nvN,{size:"14",children:"Create a new volume. Select a system directory and specific the size of the volume."}),(0,r.jsx)(o.yEL,{name:"name",form:m,fields:M}),(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsx)("div",{className:"flex flex-col gap-1",children:(0,r.jsx)(o.yEL,{name:"immediatePath",form:m,fields:M})}),(0,r.jsx)(C,{path:g,dir:k,onChange:e=>m.setValue("path",e,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0})})]}),(0,r.jsx)(o.jIp,{name:"size",form:m,fields:M}),(0,r.jsx)(A,{newSizeGB:S,currentSizeGB:0,maxSizeGB:_})]})})}let N={size:void 0};function R(e){var t,n;let{trigger:u,open:c,onOpenChange:d}=e,{id:f,closeDialog:h}=ep(),p=v(),m=(0,a.ST)({disabled:!f,params:{id:f}}),g=(0,a.cM)({disabled:!c||!m.data,params:{path:null===(t=m.data)||void 0===t?void 0:t.localPath.split(p).slice(0,-1).join(p)}}),y=(0,a.G)(),x=(0,l.cI)({mode:"all",defaultValues:N}),b=x.watch("size"),w=(0,i.useCallback)(async e=>{let t=await y.put({params:{id:Number(f)},payload:{maxSectors:(0,o.WN2)(e.size).toNumber()}});t.error?(0,o.OHV)(t.error):((0,o.OPV)("Volume resizing initiated."),x.reset(N),h())},[x,f,y,h]);(0,i.useEffect)(()=>{m.data&&x.reset(N)},[m.data]);let E=null==b?void 0:b.toNumber(),j=m.data?(0,o.bjP)(m.data.totalSectors).toNumber():0,k=g.data?(0,o.Uzc)(g.data.totalBytes).toNumber():0,S=j=1,O=(0,i.useMemo)(()=>({size:{type:"number",title:"New size",decimalsLimit:0,units:"GB",placeholder:"1,000",validation:{required:"required",validate:{between:e=>{let t="Must be between ".concat((0,s.vW)((0,o.Hzd)(10))," and ").concat((0,s.vW)((0,o.Hzd)(k),{fixed:3}));return e<=k&&e>=10||t}}}}}),[k]),C=(0,o.WsO)(O);return(0,r.jsx)(o.VqE,{title:"Resize Volume",trigger:u,open:c,onOpenChange:e=>{e||x.reset(N),d(e)},contentVariants:{className:"max-w-[400px]"},onSubmit:x.handleSubmit(w,C),controls:(0,r.jsx)("div",{className:"flex flex-col gap-1",children:(0,r.jsx)(o.ZqQ,{form:x,children:"Resize"})}),children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)(o.nvN,{size:"14",children:["Grow or shrink the volume. When growing a volume, make sure to check that there is enough space on-disk. When shrinking a volume, any data that needs to be moved will be placed into other volumes, meaning that no data will be lost. If ",(0,r.jsx)(o.EKh,{children:"hostd"})," is unable to migrate the data, an error will be returned and the operation will be stopped."]}),(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsx)(o.__J,{children:"Volume"}),(0,r.jsx)(o.xvT,{font:"mono",ellipsis:!0,children:null===(n=m.data)||void 0===n?void 0:n.localPath})]}),(0,r.jsx)(o.jIp,{name:"size",form:x,fields:O}),(0,r.jsx)(A,{currentSizeGB:j,newSizeGB:E,maxSizeGB:k,label:_?(0,r.jsx)(o.xvT,{size:"12",color:"subtle",children:S?"Increase by ".concat((0,s.vW)((0,o.Hzd)(E-j))):"Decrease by ".concat((0,s.vW)((0,o.Hzd)(j-E)))}):(0,r.jsx)(o.xvT,{size:"12",color:"subtle",children:"Current size is ".concat((0,s.vW)((0,o.Hzd)(j)))})})]})})}let D={path:"",force:!1};function L(e){var t,n,u;let{trigger:c,open:d,onOpenChange:f}=e,{id:h,closeDialog:p}=ep(),m=(0,a.uq)(),v=(0,a.ST)({disabled:!h,params:{id:h}}),g=(0,o.x9T)(null===(t=v.data)||void 0===t?void 0:t.totalSectors),y=(0,o.x9T)(null===(n=v.data)||void 0===n?void 0:n.usedSectors),x=null===(u=v.data)||void 0===u?void 0:u.localPath,b=(0,l.cI)({mode:"all",defaultValues:D}),w=(0,i.useCallback)(async e=>{var t;let n=await m.delete({params:{id:null===(t=v.data)||void 0===t?void 0:t.ID,force:e.force}});n.error?(0,o.OHV)(n.error):((0,o.OPV)("Volume permanently deleted."),b.reset(),p())},[b,v.data,m,p]),E=(0,i.useMemo)(()=>({path:{type:"text",title:"Path",placeholder:x,validation:{required:"required",validate:{equals:e=>e===x||"directory path does not match"}}},force:{type:"boolean",title:"Force",validation:{}}}),[x]),j=(0,o.WsO)(E);return(0,r.jsx)(o.VqE,{title:"Delete Volume",trigger:c,open:d,onOpenChange:e=>{e||b.reset(D),f(e)},contentVariants:{className:"w-[400px]"},onSubmit:b.handleSubmit(w,j),children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(o.nvN,{size:"14",children:"Are you sure you would like to delete the volume?"}),(0,r.jsxs)(o.nvN,{size:"14",children:[(0,r.jsx)(o.EKh,{children:"hostd"})," will move"," ",(0,r.jsx)(o.xvT,{weight:"semibold",children:(0,s.vW)(y)})," of stored data and will lose ",(0,r.jsx)(o.xvT,{weight:"semibold",children:(0,s.vW)(g)})," ","of storage capacity. It is not recommended to remove or resize volumes when contracts are about to expire."]}),(0,r.jsx)(o.nvN,{size:"14",children:"Enter the volume path to confirm the removal."}),(0,r.jsx)(o.yEL,{name:"path",form:b,fields:E}),(0,r.jsxs)("div",{className:"flex gap-1",children:[(0,r.jsx)(o.QBj,{name:"force",size:"medium",form:b,fields:E}),(0,r.jsx)(o.Yqd,{children:(0,r.jsx)("div",{className:"flex gap-1 max-w-[200px]",children:(0,r.jsx)(o.nvN,{size:"14",children:"Force deleting a volume will remove the volume even if the data can NOT be relocated - this will result in severe data loss and contract failure. Be extremely careful when using this option."})})})]}),(0,r.jsx)(o.ZqQ,{variant:"red",form:b,children:"Delete"})]})})}var F=n(6391),V=n.n(F);function z(){let{dialog:e,openDialog:t,closeDialog:n}=ep(),s=(0,a.Os)(),l=(0,a.cj)(),u=(0,i.useCallback)(async e=>{let{sc:t,address:n}=e,r=await l.post({payload:{address:n,amount:t.toString()}});return r.error?{error:r.error}:{transactionId:r.data}},[l]);return(0,r.jsx)(o.weF,{balance:s.data?new(V())(s.data.spendable):void 0,send:u,open:"sendSiacoin"===e,onOpenChange:r=>r?t(e):n()})}function I(){let{id:e,dialog:t,openDialog:n,closeDialog:s}=ep(),l=(0,a.Qq)({params:{},config:{swr:{revalidateOnFocus:!1,refreshInterval:6e4}},disabled:"transactionDetails"!==t}),u=(0,i.useMemo)(()=>{var t;let n=null===(t=l.data)||void 0===t?void 0:t.find(t=>t.ID===e);return n?{txType:(0,o.leQ)(n.transaction,n.source),inflow:n.inflow,outflow:n.outflow,timestamp:n.timestamp,raw:n.transaction}:null},[l,e]);return(0,r.jsx)(o.mPE,{id:e,transaction:u,open:"transactionDetails"===t,onOpenChange:e=>e?n(t):s()})}var Z=n(734),B=n(2850),H=n(71930),U=n(5632);let W={namespace:"wallet",label:"Wallet"};function q(e){let{currentPage:t,parentPage:n,pushPage:i}=e,{openDialog:s,closeDialog:l}=ep(),u=(0,U.useRouter)(),c=(0,a.On)({config:{swr:{revalidateOnFocus:!1,keepPreviousData:!0}}});return(0,r.jsxs)(h.fu,{currentPage:t,commandPage:W,children:[(0,r.jsx)(h.Ul,{currentPage:t,parentPage:n,commandPage:W,onSelect:()=>{i(W)},children:W.label}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:W,onSelect:()=>{u.push(H._.wallet.view),l()},children:"View wallet transactions"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:W,onSelect:()=>{s("sendSiacoin")},children:"Send siacoin"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:W,onSelect:()=>{s("addressDetails")},children:"Receive siacoin"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:W,onSelect:()=>{s("addressDetails")},children:"View wallet address"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:W,onSelect:()=>{var e;(0,o.vQq)(null===(e=c.data)||void 0===e?void 0:e.walletAddress,"wallet address"),l()},children:"Copy wallet address to clipboard"})]})}var $=n(38617);let Y={namespace:"settings",label:"Settings"};function G(e){let{currentPage:t,parentPage:n}=e,{openDialog:i,closeDialog:o}=ep(),{setTheme:a}=(0,$.F)(),{settings:s,setSettings:l,lock:u,currencyOptions:c,setCurrency:d}=(0,B.Hv)();return(0,r.jsxs)(h.fu,{currentPage:t,commandPage:Y,children:[(0,r.jsx)(h.Ul,{currentPage:t,parentPage:n,commandPage:Y,onSelect:()=>{i("settings")},children:"Open settings"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:Y,onSelect:()=>{l({siaCentral:!s.siaCentral}),o()},children:(s.siaCentral?"Disable":"Enable")+" external API - Sia Central exchange rates"}),(0,r.jsx)(h.o4,{currentPage:t,commandPage:Y,onSelect:()=>{u(),o()},children:"Lock hostd"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:Y,onSelect:()=>{i("settings")},children:"Open interface theme menu"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:Y,onSelect:()=>{a("system"),o()},children:"Set theme to system preference"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:Y,onSelect:()=>{a("dark"),o()},children:"Set theme to dark"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:Y,onSelect:()=>{a("light"),o()},children:"Set theme to light"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:Y,onSelect:()=>{i("settings")},children:"Open currency settings menu"}),c.map(e=>{let{id:n,label:i}=e;return(0,r.jsx)(h.WD,{currentPage:t,commandPage:Y,onSelect:()=>{d(n),o()},children:"Set currency to ".concat(i)},n)})]})}let X={namespace:"node",label:"Blockchain node"};function K(e){let{currentPage:t,parentPage:n,pushPage:i}=e,{openDialog:o,closeDialog:a}=ep(),s=(0,U.useRouter)();return(0,r.jsxs)(h.fu,{currentPage:t,commandPage:X,children:[(0,r.jsx)(h.Ul,{currentPage:t,parentPage:n,commandPage:X,onSelect:()=>{i(X)},children:X.label}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:X,onSelect:()=>{o("connectPeer")},children:"Connect to a peer"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:X,onSelect:()=>{s.push(H._.node.index),a()},children:"View peers"})]})}var Q=n(99957);let J={namespace:"configuration",label:"Configuration"};function ee(e){let{currentPage:t,parentPage:n,pushPage:i}=e,o=(0,U.useRouter)(),{showAdvanced:a}=(0,Q.ZR)(),{closeDialog:s}=ep();return(0,r.jsxs)(h.fu,{currentPage:t,commandPage:J,children:[(0,r.jsx)(h.Ul,{currentPage:t,parentPage:n,commandPage:J,onSelect:()=>{i(J)},children:J.label}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:J,onSelect:()=>{o.push(H._.config.index),s()},children:"Open configuration"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:J,onSelect:()=>{o.push(H._.config.host),s()},children:"Configure host"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:J,onSelect:()=>{o.push(H._.config.pricing),s()},children:"Configure pricing"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:J,onSelect:()=>{o.push(H._.config.dns),s()},children:"Configure DNS"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:J,onSelect:()=>{o.push(H._.config.bandwidth),s()},children:"Configure bandwidth"}),a&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.WD,{currentPage:t,commandPage:J,onSelect:()=>{o.push(H._.config.registry),s()},children:"Configure registry"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:J,onSelect:()=>{o.push(H._.config.accounts),s()},children:"Configure accounts"})]})]})}var et=n(92838);function en(e){let{search:t}=e;return(0,r.jsxs)(o.xvT,{color:"verySubtle",className:"flex flex-col gap-2 justify-center items-center mt-5 mb-3",children:[(0,r.jsx)(o.xvT,{color:"verySubtle",className:"flex gap-2 justify-center items-center",children:(0,r.jsx)(p.owP,{})}),(0,r.jsx)(o.xvT,{size:"12",color:"verySubtle",className:"flex justify-center",children:t?"No results matching query.":"Type a query to get started."})]})}var er=n(3639);let ei={namespace:"contracts",label:"Contracts"};function eo(e){let{currentPage:t,parentPage:n,pushPage:i,beforeSelect:o,afterSelect:a}=e,s=(0,U.useRouter)(),{closeDialog:l}=ep();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.Ul,{currentPage:t,parentPage:n,commandPage:n,onSelect:()=>{i(ei)},children:ei.label}),(0,r.jsx)(h.fu,{currentPage:t,commandPage:ei,children:(0,r.jsx)(h.WD,{currentPage:t,commandPage:ei,onSelect:()=>{s.push(H._.contracts.index),l()},children:"View contracts"})}),(0,r.jsx)(er.F,{parentPage:ei,currentPage:t,beforeSelect:o,afterSelect:a,pushPage:i})]})}let ea={namespace:"volumes",label:"Volumes"};function es(e){let{currentPage:t,parentPage:n,pushPage:i}=e,o=(0,U.useRouter)(),{openDialog:a,closeDialog:s}=ep();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.Ul,{currentPage:t,parentPage:n,commandPage:n,onSelect:()=>{i(ea)},children:ea.label}),(0,r.jsxs)(h.fu,{currentPage:t,commandPage:ea,children:[(0,r.jsx)(h.WD,{currentPage:t,commandPage:ea,onSelect:()=>{o.push(H._.volumes.index),s()},children:"View volumes"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:ea,onSelect:()=>{a("volumeCreate")},children:"Create volume"})]})]})}function el(e){var t,n,a,s,l,h,p,m,v;let{panel:g}=e,y=(0,U.useRouter)(),{resetFilters:x}=(0,et.G)(),{closeDialog:b}=ep(),[w,E]=(0,i.useState)(""),[j]=(s=t&&t.equalityFn||c,h=(a=(n=(0,i.useState)(d(w)))[1],l=[n[0],(0,i.useCallback)(function(e){return a(d(e))},[])])[0],p=l[1],m=u((0,i.useCallback)(function(e){return p(e)},[p]),500,t),s((v=(0,i.useRef)(w)).current,w)||(m(w),v.current=w),[h,m]),[k,S]=(0,i.useState)([]),_=k[k.length-1],O=0===k.length,C=(0,i.useCallback)(e=>{S(t=>[...t,e])},[S]),A=(0,i.useCallback)(()=>{b()},[b]),T=(0,i.useCallback)(()=>{E("")},[E]),P=(null==_?void 0:_.empty)||en;return(0,r.jsxs)(f.mY,{label:"Command Menu",loop:!0,className:(0,M.cx)(g&&(0,o.z$)()),onKeyDown:e=>{(k.length>0&&"Escape"===e.key||"Backspace"===e.key&&!w)&&(e.preventDefault(),S(e=>e.slice(0,-1)))},children:[_&&(0,r.jsx)(o.__J,{className:"px-2",children:_.label}),(0,r.jsx)(f.mY.Input,{value:w,onValueChange:E,className:(0,o.cEb)({variant:"ghost",focus:"none"}),placeholder:(null==_?void 0:_.prompt)||(O?"Search for commands, eg: theme, redundancy":"Search commands")}),(0,r.jsx)(o.Z0O,{className:"my-2"}),(0,r.jsxs)(f.mY.List,{children:[(0,r.jsx)(f.mY.Empty,{children:(0,r.jsx)(P,{search:w,debouncedSearch:j})}),(0,r.jsx)(G,{currentPage:_,pushPage:C}),(0,r.jsx)(q,{currentPage:_,pushPage:C}),(0,r.jsx)(es,{currentPage:_,pushPage:C}),(0,r.jsx)(eo,{currentPage:_,pushPage:C,beforeSelect:()=>{A(),x()},afterSelect:()=>{y.pathname.startsWith(H._.contracts.index)||y.push(H._.contracts.index),T()}}),(0,r.jsx)(ee,{currentPage:_,pushPage:C}),(0,r.jsx)(K,{currentPage:_,pushPage:C})]})]})}function eu(e){let{open:t,onOpenChange:n,setOpen:a}=e,{isUnlocked:s}=(0,B.Hv)(),{isConnected:l}=(0,o.Y97)({route:H.h});return(0,i.useEffect)(()=>{if(!s||!l)return;let e=e=>{"k"===e.key&&e.metaKey&&a()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[s,l,a]),(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(o.VqE,{open:t,onOpenChange:n,contentVariants:{className:"!absolute !p-1 w-[450px] top-[200px]"},bodyClassName:"!px-1 !py-1",closeClassName:"hidden",children:(0,r.jsx)(el,{})})})}function ec(e){let{open:t,onOpenChange:n}=e,s=(0,a.Z7)(),l=(0,a.Uy)(),u=(0,i.useCallback)(async e=>{let t=await l.post({payload:[e]});t.error?(0,o.OHV)("Error dismissing alert."):(0,o.OPV)("Alert has been dismissed.")},[l]),c=(0,i.useCallback)(async(e,t)=>{if(!s.data)return;let n=await l.post({payload:e});n.error?(0,o.OHV)(t?"Error dismissing all ".concat(t," alerts."):"Error dismissing all alerts."):(0,o.OPV)(t?"All ".concat(t," alerts have been dismissed."):"All alerts have been dismissed.")},[l,s]);return(0,r.jsx)(o.hcY,{open:t,onOpenChange:e=>{n(e)},alerts:s,dataFieldOrder:ed,dataFields:ef,dismissMany:c,dismissOne:u})}let ed=["error","contractID","blockHeight","resolution","volume","volumeID","elapsed","error","checked","missing","corrupt","total","oldSectors","currentSectors","targetSectors","migratedSectors","migrated","target","force"],ef={error:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"error"}),(0,r.jsx)(o.xvT,{color:"contrast",children:t})]})}},contractId:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"contract ID"}),(0,r.jsx)(o.XxW,{value:String(t)})]})}},blockHeight:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"block height"}),(0,r.jsx)(o.XxW,{value:String(t),type:"block"})]})}},resolution:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"resolution"}),(0,r.jsx)(o.XxW,{value:String(t)})]})}},volume:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"volume"}),(0,r.jsx)(o.XxW,{value:String(t)})]})}},volumeID:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"volume ID"}),(0,r.jsx)(o.XxW,{value:String(t)})]})}},elapsed:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"elapsed"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:(0,s.bc)(Number(t))})]})}},checked:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"checked"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},missing:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"missing"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},corrupt:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"corrupt"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},total:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"total"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},oldSectors:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"old sectors"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},currentSectors:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"current sectors"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},targetSectors:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"target sectors"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},migratedSectors:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"migrated sectors"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},migrated:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"migrated"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},target:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"target"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},force:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"force"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t?"true":"false"})]})}}},eh=(0,i.createContext)({}),ep=()=>(0,i.useContext)(eh);function em(e){let{children:t}=e,n=function(){let[e,t]=(0,i.useState)(),[n,r]=(0,i.useState)(),o=(0,i.useCallback)((e,n)=>{t(e),r(n)},[t,r]),[a,s]=(0,i.useState)(),l=(0,i.useCallback)(e=>{t("confirm"),s(e)},[t,s]),u=(0,i.useCallback)(()=>{t(void 0),r(void 0),s(void 0)},[t,r,s]),c=(0,i.useCallback)(e=>{e||u()},[u]);return{dialog:e,id:n,openDialog:o,confirm:a,openConfirmDialog:l,closeDialog:u,onOpenChange:c}}();return(0,r.jsx)(eh.Provider,{value:n,children:t})}function ev(){var e;let{dialog:t,openDialog:n,openConfirmDialog:i,onOpenChange:s,closeDialog:l,confirm:u}=ep(),c=(0,a.Wl)(),d=(0,a.Os)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(eu,{open:"cmdk"===t,onOpenChange:s,setOpen:()=>n("cmdk")}),(0,r.jsx)(o.DLL,{open:"settings"===t,onOpenChange:s}),(0,r.jsx)(ec,{open:"alerts"===t,onOpenChange:s}),(0,r.jsx)(z,{}),(0,r.jsx)(o.YNn,{open:"addressDetails"===t,address:null===(e=d.data)||void 0===e?void 0:e.address,isValidating:d.isValidating,onOpenChange:e=>e?n(t):l()}),(0,r.jsx)(I,{}),(0,r.jsx)(o.D_D,{connect:e=>c.put({payload:{address:e}}),open:"connectPeer"===t,onOpenChange:e=>e?n(t):l()}),(0,r.jsx)(P,{open:"volumeCreate"===t,onOpenChange:e=>e?n(t):l()}),(0,r.jsx)(R,{open:"volumeResize"===t,onOpenChange:e=>e?n(t):l()}),(0,r.jsx)(L,{open:"volumeDelete"===t,onOpenChange:e=>e?n(t):l()}),(0,r.jsx)(Z.Y,{open:"contractsFilterContractId"===t,onOpenChange:e=>e?n(t):l()}),(0,r.jsx)(o.QHy,{open:"confirm"===t,params:u,onOpenChange:e=>e?i(u):l()})]})}},5187:function(e,t,n){"use strict";n.d(t,{C:function(){return E},B:function(){return w}});var r=n(52322),i=n(2784),o=n(58815),a=n(96206);let s={successful:{color:o.O9T.green[600]},active:{color:o.O9T.amber[600]},pending:{color:o.O9T.amber[600],pattern:!0},rejected:{color:o.O9T.red[600]},failed:{color:o.O9T.red[600]},storage:{label:"storage",color:o.O9T.emerald[600]},storagePhysical:{color:o.O9T.indigo[600]},ingress:{label:"ingress",color:o.O9T.pink[600]},egress:{label:"egress",color:o.O9T.blue[600]},registry:{label:"registry",color:o.O9T.purple[600]},storageWrites:{label:"storage write",color:o.O9T.pink[600]},storageReads:{label:"storage read",color:o.O9T.blue[600]},registryReads:{label:"registry reads",color:o.O9T.green[600]},registryWrites:{label:"registry writes",color:o.O9T.yellow[600]},rpc:{label:"RPC",color:o.O9T.slate[500]},capacityStorage:{label:"capacity",color:o.O9T.neutral[500]},capacityRegistry:{label:"capacity",color:o.O9T.neutral[500]},contract:{color:o.O9T.red[800]},collateral:{color:o.O9T.amber[600]},sectorsTemp:{label:"temp sectors",color:o.O9T.amber[600]},sectorsContract:{label:"contract sectors",color:o.O9T.green[600]},sectorAccess:{label:"sector access",color:o.O9T.blue[600]},sc:{color:o.O9T.green[600]},sf:{color:o.O9T.amber[600]},locked:{color:o.O9T.purple[600]},risked:{color:o.O9T.amber[600]},burnt:{color:o.O9T.red[600]}};var l=n(27444);function u(e,t,n){return{...e,category:t,pattern:n}}function c(e,t,n){return{...e,category:t,label:n}}var d=n(6391),f=n.n(d),h=n(14817),p=n(66700);function m(e,t){for(var n=Math.abs(e).toString();n.length"7"===e.value),b=(0,i.createContext)({}),w=()=>(0,i.useContext)(b);function E(e){let{children:t}=e,n=function(){let[e,t]=(0,y.Z)("v0/metrics/dataTimeSpan",{defaultValue:x.value}),[n,d]=(0,y.Z)("v0/metrics/dataInterval",{defaultValue:x.interval}),b=function(e){let[t,n]=(0,i.useState)(new Date().getTime());return(0,i.useEffect)(()=>{n(new Date().getTime());let t=setInterval(()=>{n(new Date().getTime()),console.log("reset time range")},(0,h.uQ)(e));return()=>clearInterval(t)},[e]),t}(n),w=(0,i.useMemo)(()=>(0,o.OQF)(e,b),[e,b]),E=(0,i.useCallback)(e=>{let n=h.lv.find(t=>t.value===e);d(n.interval),t(n.value)},[t,d]),j=(0,i.useMemo)(()=>(0,o.kOJ)(n),[n]),k=(0,l.KU)({params:{interval:n,start:function(e,t){(0,v.Z)(1,arguments);var n=(0,p.Z)(e);if(isNaN(n.getTime()))throw RangeError("Invalid time value");var r=null!=t&&t.format?String(t.format):"extended",i=null!=t&&t.representation?String(t.representation):"complete";if("extended"!==r&&"basic"!==r)throw RangeError("format must be 'extended' or 'basic'");if("date"!==i&&"time"!==i&&"complete"!==i)throw RangeError("representation must be 'date', 'time', or 'complete'");var o="",a="",s="extended"===r?"-":"";if("time"!==i){var l=m(n.getDate(),2),u=m(n.getMonth()+1,2),c=m(n.getFullYear(),4);o="".concat(c).concat(s).concat(u).concat(s).concat(l)}if("date"!==i){var d=n.getTimezoneOffset();if(0!==d){var f=Math.abs(d),h=m(Math.floor(f/60),2),g=m(f%60,2);a="".concat(d<0?"+":"-").concat(h,":").concat(g)}else a="Z";var y=m(n.getHours(),2),x=m(n.getMinutes(),2),b=m(n.getSeconds(),2),w=""===o?"":"T",E=[y,x,b].join("extended"===r?":":"");o="".concat(o).concat(w).concat(E).concat(a)}return o}(new Date(w.start-(0,h.uQ)(n)))},config:{swr:{revalidateOnFocus:!1,refreshInterval:(0,o.sWj)(5)}}}),S=(0,i.useMemo)(()=>{var e;let t=(0,o.Y_Z)(null===(e=k.data)||void 0===e?void 0:e.map(e=>({storagePotential:Number(e.revenue.potential.storage),ingressPotential:Number(e.revenue.potential.ingress),egressPotential:Number(e.revenue.potential.egress),rpcPotential:Number(e.revenue.potential.rpc),storage:Number(e.revenue.earned.storage),ingress:Number(e.revenue.earned.ingress),egress:Number(e.revenue.earned.egress),rpc:Number(e.revenue.earned.rpc),potential:new(f())(e.revenue.potential.storage).plus(e.revenue.potential.ingress).plus(e.revenue.potential.egress).plus(e.revenue.potential.rpc).toNumber(),earned:new(f())(e.revenue.earned.storage).plus(e.revenue.earned.ingress).plus(e.revenue.earned.egress).plus(e.revenue.earned.rpc).toNumber(),timestamp:new Date(e.timestamp).getTime()})),"delta"),n=(0,o.fVJ)(t),i=t.map(e=>({storagePotential:Math.max(e.storagePotential,0),ingressPotential:Math.max(e.ingressPotential,0),egressPotential:Math.max(e.egressPotential,0),rpcPotential:Math.max(e.rpcPotential,0),storage:Math.max(e.storage,0),ingress:Math.max(e.ingress,0),egress:Math.max(e.egress,0),rpc:Math.max(e.rpc,0),timestamp:new Date(e.timestamp).getTime()}));return{data:i,stats:n,config:{enabledGraph:["storage","storagePotential","ingress","ingressPotential","egress","egressPotential","rpc","rpcPotential"],enabledTip:["storage","storagePotential","ingress","ingressPotential","egress","egressPotential","rpc","rpcPotential"],categories:["earned","potential"],data:{storagePotential:u(s.storage,"potential",!0),ingressPotential:u(s.ingress,"potential",!0),egressPotential:u(s.egress,"potential",!0),registryReadPotential:u(s.registryReads,"potential",!0),registryWritePotential:u(s.registryWrites,"potential",!0),rpcPotential:u(s.rpc,"potential",!0),storage:u(s.storage,"earned"),ingress:u(s.ingress,"earned"),egress:u(s.egress,"earned"),registryRead:u(s.registryReads,"earned"),registryWrite:u(s.registryWrites,"earned"),rpc:u(s.rpc,"earned"),earned:c({},"earned","total"),potential:c({},"potential","total")},formatComponent:function(e){let{value:t}=e;return(0,r.jsx)(o.ho9,{variant:"value",value:new(f())(t)})},formatTickY:e=>(0,a.Vz)(e,{fixed:0,dynamicUnits:!0}),formatTimestamp:j,disableAnimations:!0,chartType:"barstack",stackOffset:"diverging"},isLoading:k.isValidating}},[k,j]),_=(0,i.useMemo)(()=>{var e;let t=(0,o.Y_Z)(null===(e=k.data)||void 0===e?void 0:e.map(e=>({locked:Number(e.contracts.lockedCollateral),risked:Number(e.contracts.riskedCollateral),timestamp:new Date(e.timestamp).getTime()})).slice(1),"none"),n=(0,o.fVJ)(t);return{data:t,stats:n,config:{enabledGraph:["locked","risked"],enabledTip:["locked","risked"],data:{locked:s.locked,risked:s.risked},formatComponent:function(e){let{value:t}=e;return(0,r.jsx)(o.ho9,{variant:"value",value:new(f())(t)})},formatTimestamp:j,formatTickY:e=>(0,a.Vz)(e,{fixed:0,dynamicUnits:!0}),disableAnimations:!0,chartType:"area",curveType:"linear",stackOffset:"none"},isLoading:k.isValidating}},[k,j]),O=(0,i.useMemo)(()=>{var e;let t=(0,o.Y_Z)(null===(e=k.data)||void 0===e?void 0:e.map(e=>({baseRPC:(0,g.sS)(e.pricing.baseRPCPrice).toNumber(),collateral:(0,g.c5)(new(f())(e.pricing.storagePrice).times(e.pricing.collateralMultiplier)).toNumber(),contract:Number(e.pricing.contractPrice),egress:(0,g.B1)(e.pricing.egressPrice).toNumber(),ingress:(0,g.dK)(e.pricing.ingressPrice).toNumber(),sectorAccess:(0,g.nS)(e.pricing.sectorAccessPrice).toNumber(),storage:(0,g.SY)(e.pricing.storagePrice).toNumber(),timestamp:new Date(e.timestamp).getTime()})).slice(1),"none"),n=(0,o.fVJ)(t);return{data:t,stats:n,config:{enabledGraph:["storage","ingress","egress","collateral","contract","sectorAccess","baseRPC"],enabledTip:["storage","ingress","egress","collateral","contract","sectorAccess","baseRPC"],data:{baseRPC:s.rpc,sectorAccess:s.sectorAccess,contract:s.contract,collateral:s.collateral,egress:s.egress,ingress:s.ingress,storage:s.storage},formatComponent:function(e){let{value:t}=e;return(0,r.jsx)(o.ho9,{variant:"value",value:new(f())(t)})},formatTimestamp:j,formatTickY:e=>(0,a.Vz)(e,{fixed:0,dynamicUnits:!0}),disableAnimations:!0,chartType:"line",curveType:"linear",stackOffset:"none"},isLoading:k.isValidating}},[k,j]),C=(0,i.useMemo)(()=>{var e;let t=(0,o.Y_Z)(null===(e=k.data)||void 0===e?void 0:e.map(e=>({active:e.contracts.active,failed:e.contracts.failed,pending:e.contracts.pending,rejected:e.contracts.rejected,successful:e.contracts.successful,timestamp:new Date(e.timestamp).getTime()})).slice(1),"none"),n=(0,o.fVJ)(t);return{data:t,stats:n,config:{enabledGraph:["successful","active","pending","rejected","failed"],enabledTip:["successful","active","pending","rejected","failed"],data:{active:s.active,failed:s.failed,pending:s.pending,rejected:s.rejected,successful:s.successful},format:e=>"".concat(e," contracts"),formatTimestamp:j,formatTickY:e=>(0,a.yF)(e),disableAnimations:!0,chartType:"areastack",curveType:"linear",stackOffset:"none"},isLoading:k.isValidating}},[k,j]),M=(0,i.useMemo)(()=>{var e;let t=(0,o.Y_Z)(null===(e=k.data)||void 0===e?void 0:e.map(e=>({maxSectors:(0,o.B$N)(e.storage.totalSectors).times(4).toNumber(),tempSectors:(0,o.B$N)(e.storage.tempSectors).times(4).toNumber(),physicalSectors:(0,o.B$N)(e.storage.physicalSectors).times(4).toNumber(),contractSectors:(0,o.B$N)(e.storage.contractSectors).times(4).toNumber(),timestamp:new Date(e.timestamp).getTime()})).slice(1),"none"),n=(0,o.fVJ)(t);return{data:t,stats:n,config:{enabledGraph:["contractSectors","physicalSectors","tempSectors","maxSectors"],enabledTip:["contractSectors","physicalSectors","tempSectors","maxSectors"],categories:["storage used","storage capacity"],data:{maxSectors:c(s.capacityStorage,"storage capacity","sectors"),physicalSectors:c(s.storagePhysical,"storage used","sectors physical"),tempSectors:c(s.sectorsTemp,"storage used","sectors temp"),contractSectors:c(s.storage,"storage used","sectors contract")},format:e=>(0,a.vW)(e),formatTimestamp:j,formatTickY:e=>(0,a.vW)(e,{fixed:0}),disableAnimations:!0,chartType:"line",curveType:"linear",stackOffset:"none"},isLoading:k.isValidating}},[k,j]),A=(0,i.useMemo)(()=>{var e;let t=(0,o.Y_Z)(null===(e=k.data)||void 0===e?void 0:e.map(e=>({storageReads:e.storage.reads,storageWrites:e.storage.writes,timestamp:new Date(e.timestamp).getTime()})),"delta"),n=(0,o.fVJ)(t);return{data:t,stats:n,config:{enabledGraph:["storageReads","storageWrites"],enabledTip:["storageReads","storageWrites"],data:{storageReads:s.storageReads,storageWrites:s.storageWrites},format:e=>(0,a.yF)(e),formatTickY:e=>(0,a.yF)(e),formatTimestamp:j,disableAnimations:!0,chartType:"line",curveType:"linear",stackOffset:"none"},isLoading:k.isValidating}},[k,j]),T=(0,i.useMemo)(()=>{var e;let t=(0,o.Y_Z)(null===(e=k.data)||void 0===e?void 0:e.map(e=>({egress:e.data.rhp3.egress+e.data.rhp2.egress,ingress:e.data.rhp3.ingress+e.data.rhp2.ingress,timestamp:new Date(e.timestamp).getTime()})),"delta"),n=(0,o.fVJ)(t);return{data:t,stats:n,config:{enabledGraph:["ingress","egress"],enabledTip:["ingress","egress"],data:{ingress:s.ingress,egress:s.egress},format:e=>(0,a.vW)(e),formatTimestamp:j,formatTickY:e=>(0,a.vW)(e,{fixed:0}),disableAnimations:!0,chartType:"line",curveType:"linear",stackOffset:"none"},isLoading:k.isValidating}},[k,j]);return{dataTimeSpan:e,setDataTimeSpan:E,timeRange:w,dataInterval:n,setDataInterval:d,operations:A,revenue:S,collateral:_,contracts:C,storage:M,pricing:O,bandwidth:T}}();return(0,r.jsx)(b.Provider,{value:n,children:t})}},14817:function(e,t,n){"use strict";n.d(t,{lv:function(){return i},uQ:function(){return o}});var r=n(58815);let i=[{label:"1D",interval:"15m",value:"1"},{label:"7D",interval:"hourly",value:"7"},{label:"1M",interval:"daily",value:"30"},{label:"3M",interval:"daily",value:"90"},{label:"1Y",interval:"daily",value:"365"},{label:"ALL",interval:"weekly",value:"all"}];function o(e){return"5m"===e?(0,r.sWj)(5):"15m"===e?(0,r.sWj)(15):"hourly"===e?(0,r.ytg)(1):"daily"===e?(0,r.NrH)(1):"weekly"===e?(0,r.NrH)(7):"monthly"===e?(0,r.NrH)(30):"yearly"===e?(0,r.NrH)(365):0}},63171:function(e,t,n){"use strict";n.d(t,{n:function(){return h},v:function(){return p}});var r=n(52322),i=n(58815),o=n(27444),a=n(2784),s=n(22515),l=n(6391),u=n.n(l),c=n(5632);let d=[],f=(0,a.createContext)({}),h=()=>(0,a.useContext)(f);function p(e){let{children:t}=e,n=function(){let e=(0,c.useRouter)(),t=Number(e.query.limit||50),n=Number(e.query.offset||0),r=(0,o.Qq)({params:{limit:t,offset:n},config:{swr:{refreshInterval:(0,i.XBW)(60)}}}),l=(0,o.a0)({config:{swr:{refreshInterval:(0,i.XBW)(60)}}}),{openDialog:f}=(0,s.Rh)(),h=(0,a.useMemo)(()=>l.data&&r.data?[...(l.data||[]).map(e=>({type:"transaction",txType:(0,i.leQ)(e.transaction,e.source),hash:e.ID,timestamp:new Date(e.timestamp).getTime(),sc:new(u())(e.inflow).minus(e.outflow),unconfirmed:!0})),...(r.data||[]).map(e=>({type:"transaction",txType:(0,i.leQ)(e.transaction,e.source),hash:e.ID,timestamp:new Date(e.timestamp).getTime(),onClick:()=>f("transactionDetails",e.ID),sc:new(u())(e.inflow).minus(e.outflow)})).sort((e,t)=>e.timestamp{let e=new Date().getTime(),t=(0,i.NrH)(30);return new Date(e-t).toISOString()},[]),m=(0,o.KU)({params:{interval:"daily",start:p}}),v=(0,a.useMemo)(()=>(m.data||[]).map(e=>({sc:Number(e.balance),timestamp:new Date(e.timestamp).getTime()})).sort((e,t)=>e.timestamp>=t.timestamp?1:-1),[m.data]),g=r.error,y=(0,i.c2j)(h,r.isValidating,g,d);return{balances:v,metrics:m,dataset:h,error:g,dataState:y,offset:n,limit:t,pageCount:(null==h?void 0:h.length)||0}}();return(0,r.jsx)(f.Provider,{value:n,children:t})}},78743:function(e,t,n){"use strict";n.d(t,{Y:function(){return y},F:function(){return g}});var r=n(52322),i=n(58815),o=n(27444),a=n(2784);let s=["actions","path","storage","available","readOnly","successfulReads","successfulWrites","failedReads","failedWrites"];var l=n(41775),u=n(96206),c=n(22515);function d(e){var t,n;let{id:a,contentProps:s,buttonProps:u}=e,{openDialog:d}=(0,c.Rh)(),h=(0,o.Rz)(),p=(0,o.ST)({params:{id:a}}),m=(0,o._3)(),v=p.data&&"ready"==p.data.status,g=p.data&&!["ready","unavailable"].includes(p.data.status);return(0,r.jsxs)(i.h_2,{trigger:(0,r.jsx)(i.zxk,{variant:"ghost",icon:"hover",...u,children:(0,r.jsx)(l.iG7,{})}),contentProps:{align:"start",...s},children:[(0,r.jsx)("div",{className:"px-1.5 py-1",children:(0,r.jsxs)(i.xvT,{size:"14",weight:"medium",color:"subtle",children:["Volume ",p.data?(0,i.$Gg)(null===(t=p.data)||void 0===t?void 0:t.localPath,24):a]})}),(0,r.jsx)(i.Juw,{children:"Actions"}),g?(0,r.jsxs)(i.Xiv,{onSelect:async()=>{var e;let t=null===(e=p.data)||void 0===e?void 0:e.status,n=await m.delete({params:{id:Number(a)}});n.error?(0,i.OHV)("Error canceling volume ".concat(f(t),".")):(0,i.OPV)("Successfully canceled volume ".concat(f(t),"."))},children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(l.PcV,{})}),"Cancel ".concat(f(null===(n=p.data)||void 0===n?void 0:n.status))]}):null,p.data?(0,r.jsxs)(i.Xiv,{disabled:!v,onSelect:async()=>{let e=!p.data.readOnly,t=await h.put({params:{id:Number(a)},payload:{readOnly:e}});t.error?(0,i.OHV)(e?"Error setting volume to read-only.":"Error setting volume to read/write."):(0,i.OPV)(e?"Volume set to read-only.":"Volume set to read/write.")},children:[(0,r.jsx)(i.KpP,{children:p.data.readOnly?(0,r.jsx)(l.dr6,{}):(0,r.jsx)(l.Lur,{})}),p.data.readOnly?"Set to read/write":"Set to read-only"]}):null,(0,r.jsxs)(i.Xiv,{disabled:!v,onSelect:()=>d("volumeResize",a),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(l.BB5,{})}),"Resize"]}),(0,r.jsxs)(i.Xiv,{disabled:g,onSelect:()=>d("volumeDelete",a),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(l.Jrl,{})}),"Delete"]})]})}function f(e){return"resizing"===e?"resize":"creating"===e?"creation":"removing"===e?"removal":"operation"}let h=[{id:"actions",label:"",fixed:!0,cellClassName:"w-[50px] !pl-2 !pr-4 [&+*]:!pl-0",render:e=>{let{data:t}=e;return(0,r.jsx)(d,{id:t.id})}},{id:"path",label:"path",category:"general",render:e=>{let{data:t}=e;return(0,r.jsx)(i.xvT,{font:"mono",ellipsis:!0,children:t.localPath})}},{id:"available",label:"status",category:"general",render:e=>{var t;let{data:n}=e;return(0,r.jsx)(i.ua7,{side:"right",content:n.available?"available":(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.xvT,{children:"unavailable"}),(0,r.jsx)("div",{className:"flex flex-col",children:null===(t=n.errors)||void 0===t?void 0:t.map(e=>(0,r.jsx)(i.xvT,{size:"10",noWrap:!0,children:e},e))})]}),children:(0,r.jsxs)("div",{className:"flex gap-2 items-center",children:[n.available&&"ready"===n.status&&(0,r.jsx)(i.xvT,{color:"green",children:(0,r.jsx)(l.DI$,{})}),n.available&&"ready"!==n.status&&(0,r.jsx)(i.xvT,{color:"amber",children:(0,r.jsx)(l.dsj,{})}),!n.available&&(0,r.jsx)(i.xvT,{color:"amber",children:(0,r.jsx)(l.SmH,{})}),(0,r.jsx)(i.xvT,{size:"12",className:"relative -top-px",children:n.status})]})})}},{id:"readOnly",label:"read/write",category:"general",render:e=>{let{data:t}=e;return t.readOnly?(0,r.jsx)(i.ua7,{content:"Read-only",children:(0,r.jsx)(i.xvT,{children:(0,r.jsx)(l.Lur,{})})}):(0,r.jsx)(i.ua7,{content:"Read and write enabled",children:(0,r.jsx)(i.xvT,{color:"subtle",children:(0,r.jsx)(l.dr6,{})})})}},{id:"storage",label:"storage",category:"general",render:e=>{let{data:t}=e;return(0,r.jsx)("div",{className:"flex gap-1 w-full max-w-[200px] pt-[10px]",children:(0,r.jsx)(i.kod,{variant:"accent",value:t.usedBytes,max:t.totalBytes,label:"".concat((0,u.vW)(t.usedBytes)," / ").concat((0,u.vW)(t.totalBytes))})})}},{id:"successfulReads",label:"successful reads",category:"operations",render:e=>{let{data:t}=e;return(0,r.jsx)(i.m2c,{variant:"value",size:"12",value:t.successfulReads,format:e=>e.toNumber().toLocaleString()})}},{id:"successfulWrites",label:"successful writes",category:"operations",render:e=>{let{data:t}=e;return(0,r.jsx)(i.m2c,{variant:"value",size:"12",value:t.successfulWrites,format:e=>e.toNumber().toLocaleString()})}},{id:"failedReads",label:"failed reads",category:"operations",render:e=>{let{data:t}=e;return(0,r.jsx)(i.m2c,{variant:"value",size:"12",value:t.failedReads,format:e=>e.toNumber().toLocaleString()})}},{id:"failedWrites",label:"failed writes",category:"operations",render:e=>{let{data:t}=e;return(0,r.jsx)(i.m2c,{variant:"value",size:"12",value:t.failedWrites,format:e=>e.toNumber().toLocaleString()})}}];var p=n(6391),m=n.n(p);let v=(0,a.createContext)({}),g=()=>(0,a.useContext)(v);function y(e){let{children:t}=e,n=function(){let{configurableColumns:e,enabledColumns:t,toggleColumnVisibility:n,setColumnsVisible:r,setColumnsHidden:l,toggleSort:u,setSortDirection:c,setSortField:d,sortField:f,sortDirection:p,resetDefaultColumnVisibility:v}=(0,i.oy6)("hostd/v0/volumes",{columns:h,columnsDefaultVisible:s}),g=(0,o.Fn)({config:{swr:{refreshInterval:e=>(null==e?void 0:e.find(e=>!["ready","unavailable"].includes(e.status)))?(0,i.XBW)(5):(0,i.XBW)(60)}}}),y=function(e){let{response:t}=e;return(0,a.useMemo)(()=>{var e;return t.data?(null===(e=t.data)||void 0===e?void 0:e.map(e=>({id:String(e.ID),ID:e.ID,localPath:e.localPath,usedSectors:e.usedSectors,usedBytes:new(m())(e.usedSectors).times((0,i.B$N)(4)).toNumber(),totalBytes:new(m())(e.totalSectors).times((0,i.B$N)(4)).toNumber(),totalSectors:e.totalSectors,status:e.status,readOnly:e.readOnly,available:e.available,failedReads:new(m())(e.failedReads),failedWrites:new(m())(e.failedWrites),successfulReads:new(m())(e.successfulReads),successfulWrites:new(m())(e.successfulWrites),errors:e.errors})))||[]:null},[t.data])}({response:g}),x=(0,a.useMemo)(()=>h.filter(e=>t.includes(e.id)),[t]),b=g.isValidating,w=g.error,E=(0,i.c2j)(y,b,w,[]);return{dataState:E,totalCount:(null==y?void 0:y.length)||0,isLoading:g.isValidating,columns:x,dataset:y,configurableColumns:e,enabledColumns:t,toggleColumnVisibility:n,setColumnsVisible:r,setColumnsHidden:l,toggleSort:u,setSortDirection:c,setSortField:d,sortField:f,sortDirection:p,resetDefaultColumnVisibility:v}}();return(0,r.jsx)(v.Provider,{value:n,children:t})}},734:function(e,t,n){"use strict";n.d(t,{O:function(){return u},Y:function(){return f}});var r=n(52322),i=n(58815),o=n(92838),a=n(63397),s=n(24511),l=n(22515);function u(e){return{id:"filterContractId",value:e,label:"contract ID is ".concat(e)}}let c={contractId:""},d=s.Ry().shape({contractId:s.Z_().required("Required")});function f(e){let{trigger:t,open:n,onOpenChange:s}=e,{closeDialog:f}=(0,l.Rh)(),{setFilter:h}=(0,o.G)(),p=(0,a.TA)({initialValues:c,validationSchema:d,onSubmit:e=>{h(u(e.contractId)),p.resetForm(),f()}});return(0,r.jsx)(i.VqE,{trigger:t,title:"Filter by contract ID",open:n,onOpenChange:e=>{e||p.resetForm(),s(e)},contentVariants:{className:"w-[400px]"},onSubmit:p.handleSubmit,children:(0,r.jsx)("div",{className:"flex flex-col gap-4",children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(i.cB7,{formik:p,title:"Contract ID",name:"contractId",placeholder:"Exact match for contract ID",autoComplete:"off",type:"text",variants:{size:"medium"}}),(0,r.jsx)(i.IKw,{formik:p,size:"medium",children:"Filter"})]})})})}},25573:function(e,t,n){"use strict";n.d(t,{n:function(){return o}});var r=n(2850),i=n(27444);function o(){var e,t,n,o;let{isUnlocked:a}=(0,r.Hv)(),s=(0,i.d$)({config:{swr:{refreshInterval:e=>(null==e?void 0:e.synced)?6e4:1e4}}}),l=(0,i.nH)(),u=s.data?null===(e=s.data)||void 0===e?void 0:e.chainIndex.height:0,c=(0,i.Os)({config:{swr:{refreshInterval:e=>(null==e?void 0:e.scanHeight)>=u?6e4:1e4}}}),d=a&&u&&l?Number((100*Math.min(u/l,1)).toFixed(1)):0,f=a&&u&&c.data?Number((100*Math.min(c.data.scanHeight/l,1)).toFixed(1)):0;return{isSynced:null===(t=s.data)||void 0===t?void 0:t.synced,isWalletSynced:(null===(n=s.data)||void 0===n?void 0:n.synced)&&(null===(o=c.data)||void 0===o?void 0:o.scanHeight)>=u-1,nodeBlockHeight:u,estimatedBlockHeight:l,syncPercent:d,walletScanPercent:f,moreThan100BlocksToSync:!!u&&!!l&&l-u>100,firstTimeSyncing:!!u&&!!l&&l-u>5e4}}},94977:function(e,t,n){"use strict";n.d(t,{B1:function(){return m},K9:function(){return c},LP:function(){return v},SY:function(){return s},c5:function(){return h},co:function(){return l},dK:function(){return g},dz:function(){return a},nS:function(){return d},rZ:function(){return f},s2:function(){return p},sS:function(){return u}});var r=n(58815),i=n(6391),o=n.n(i);let a="/TB/month";function s(e){return new(o())(e).times((0,r.xf5)(1)).times((0,r.S5V)(1))}let l="/million";function u(e){return new(o())(e).times(1e7)}let c="/million";function d(e){return new(o())(e).times(1e7)}let f="/TB/month";function h(e){return new(o())(e).times((0,r.xf5)(1)).times((0,r.S5V)(1))}let p="/TB";function m(e){return new(o())(e).times((0,r.xf5)(1))}let v="/TB";function g(e){return new(o())(e).times((0,r.xf5)(1))}},76133:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return M}});var r=n(52322);n(37832);var i=n(58815),o=n(92838),a=n(5187),s=n(22515),l=n(78743),u=n(99957),c=n(41775),d=n(25573),f=n(71930),h=n(27444),p=n(6391),m=n.n(p),v=n(96206),g=n(2850),y=n(92762);function x(){var e,t;let{isUnlocked:n}=(0,g.Hv)(),{openDialog:o}=(0,s.Rh)(),{dataset:a}=(0,l.F)(),u=(0,h.rV)(),p=(0,h.Os)(),[x,w]=(0,y.Z)("v0/hostd/onboarding/maximized",{defaultValue:!0}),E=(0,d.n)();if(!n)return null;let j=new(m())((null===(e=p.data)||void 0===e?void 0:e.confirmed)||0),k=(0,v.qN)(5e3),S=p.data&&j.gte(k),_=(null==a?void 0:a.length)>0,O=null===(t=u.data)||void 0===t?void 0:t.acceptingContracts,C=E.isSynced,M=[S,_,O,C],A=M.length,T=M.filter(e=>e).length;return A===T?null:x?(0,r.jsx)("div",{className:"z-20 fixed bottom-5 left-1/2 -translate-x-1/2 flex justify-center",children:(0,r.jsx)(i.s_4,{className:"w-[400px] flex flex-col max-h-[600px]",children:(0,r.jsxs)(i.xrM,{children:[(0,r.jsxs)("div",{className:"flex justify-between items-center px-3 py-2 border-b border-gray-200 dark:border-graydark-300",children:[(0,r.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,r.jsx)(i.TRl,{}),(0,r.jsx)(i.xvT,{size:"20",weight:"semibold",children:"Welcome to Sia"})]}),(0,r.jsx)(i.zxk,{variant:"ghost",onClick:()=>w(!1),children:(0,r.jsx)(c.mli,{})})]}),(0,r.jsx)("div",{className:"flex justify-between items-center px-3 py-2 border-b border-gray-200 dark:border-graydark-300",children:(0,r.jsx)(i.xvT,{size:"14",children:"Get set up by completing the following steps. Once they are complete, your host is ready to store data."})}),(0,r.jsx)(b,{title:(0,r.jsx)(i.rUS,{href:f._.wallet.view,onClick:()=>o("addressDetails"),ellipsis:!0,size:"14",underline:"hover",children:"Step 1: Fund your wallet"}),description:"Fund your wallet with at least ".concat((0,v.Vz)(k)," siacoin to cover required contract collateral.").concat(E.isWalletSynced?"":" Balance will not be accurate until wallet is finished scanning."),action:S?(0,r.jsx)(i.xvT,{color:"green",children:(0,r.jsx)(c.Y3p,{})}):(0,r.jsxs)(r.Fragment,{children:[!E.isWalletSynced&&(0,r.jsx)(i.ua7,{content:"Wallet scanning progress ".concat(E.walletScanPercent,"%"),children:(0,r.jsxs)(i.xvT,{size:"14",children:[E.walletScanPercent,"%"]})}),(0,r.jsx)(i.rUS,{href:f._.wallet.view,onClick:()=>o("addressDetails"),children:(0,r.jsx)(c.V8Q,{})}),(0,r.jsx)(i.xvT,{color:"amber",children:(0,r.jsx)(c.Fs9,{})})]})}),(0,r.jsx)(b,{title:(0,r.jsx)(i.rUS,{href:f._.volumes.index,ellipsis:!0,size:"14",underline:"hover",children:"Step 2: Add a volume"}),description:"Add a system volume that will be used to store data.",action:_?(0,r.jsx)(i.xvT,{color:"green",children:(0,r.jsx)(c.Y3p,{})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.rUS,{href:f._.volumes.index,children:(0,r.jsx)(c.V8Q,{})}),(0,r.jsx)(i.xvT,{color:"amber",children:(0,r.jsx)(c.Fs9,{})})]})}),(0,r.jsx)(b,{title:(0,r.jsx)(i.rUS,{href:f._.config.index,ellipsis:!0,size:"14",underline:"hover",children:"Step 3: Configure pricing and settings"}),description:"Configure your host's pricing and settings and start accepting contracts.",action:O?(0,r.jsx)(i.xvT,{color:"green",children:(0,r.jsx)(c.Y3p,{})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.rUS,{href:f._.config.index,children:(0,r.jsx)(c.V8Q,{})}),(0,r.jsx)(i.xvT,{color:"amber",children:(0,r.jsx)(c.Fs9,{})})]})}),(0,r.jsx)(b,{title:(0,r.jsx)(i.rUS,{href:f._.node.index,underline:"hover",ellipsis:!0,size:"14",children:"Step 4: Wait for the blockchain to sync"}),description:"The blockchain will sync in the background, this takes some time. No user action required.",action:C?(0,r.jsx)(i.xvT,{color:"green",children:(0,r.jsx)(c.Y3p,{})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.xvT,{ellipsis:!0,size:"14",children:[E.syncPercent,"%"]}),(0,r.jsx)(i.xvT,{color:"amber",children:(0,r.jsx)(c.hzZ,{})})]})})]})})}):(0,r.jsx)("div",{className:"z-30 fixed bottom-5 left-1/2 -translate-x-1/2 flex justify-center",children:(0,r.jsx)(i.zxk,{onClick:()=>w(!0),size:"large",className:"flex gap-3 !px-3",children:(0,r.jsxs)(i.xvT,{className:"flex items-center gap-1",children:[(0,r.jsx)(i.TRl,{}),"Setup: ",T,"/",A," steps complete"]})})})}function b(e){let{title:t,action:n,description:o}=e;return(0,r.jsx)("div",{className:"border-t first:border-t-0 border-gray-200 dark:border-graydark-300 px-3 py-2",children:(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,r.jsx)("div",{className:"flex-1 flex items-center",children:t}),n]}),(0,r.jsx)("div",{className:"pr-5",children:(0,r.jsx)(i.xvT,{size:"12",color:"subtle",children:o})})]})})}var w=n(63171);function E(e){let{children:t}=e;return(0,r.jsx)(s.Tu,{children:(0,r.jsx)(u.iV,{children:(0,r.jsx)(w.v,{children:(0,r.jsx)(l.Y,{children:(0,r.jsx)(o.x,{children:(0,r.jsxs)(a.C,{children:[(0,r.jsx)(s.xQ,{}),(0,r.jsx)(x,{}),t]})})})})})})}var j=n(1240),k=n.n(j),S=n(49854),_=n.n(S),O=n(82851);let C=(0,O.cx)(k().variable,_().variable);function M(e){let{Component:t,pageProps:n}=e;return(0,r.jsx)(i.PD$,{className:C,fallback:n.fallback,passwordProtectRequestHooks:!0,lockRoutes:f._,children:(0,r.jsx)(E,{children:(0,r.jsx)(t,{...n})})})}},58815:function(e,t,n){"use strict";let r,i,o,a;n.d(t,{hcY:function(){return SV},tU3:function(){return SR},zXq:function(){return SJ},juT:function(){return So},Cts:function(){return lf},Z58:function(){return _P},WVB:function(){return c_},zxk:function(){return s5},b0u:function(){return EP},EKh:function(){return lm},vRO:function(){return Or},QHy:function(){return _1},TaT:function(){return _G},eQh:function(){return lg},HfT:function(){return _3},ncR:function(){return kW},A06:function(){return _F},Vy9:function(){return _V},VqE:function(){return l3},h_2:function(){return cT},Xiv:function(){return cP},Juw:function(){return cN},KpP:function(){return cR},XOF:function(){return kU},jIp:function(){return Oi},QBj:function(){return Oo},yEL:function(){return SG},cB7:function(){return kK},ZqQ:function(){return kX},IKw:function(){return k4},Hzd:function(){return Ox},WN2:function(){return Ok},X6q:function(){return cz},Yqd:function(){return fb},__J:function(){return cY},rUS:function(){return cK},TRl:function(){return cJ},YaL:function(){return Ow},kFS:function(){return cO},FzK:function(){return _Q},Clw:function(){return cS},B$N:function(){return Ov},PD$:function(){return Oc},Wxm:function(){return fk},uDJ:function(){return k6},wFK:function(){return k8},s_4:function(){return tG},nvN:function(){return t$},u5Q:function(){return _N},j4H:function(){return fw},J2e:function(){return df},kod:function(){return d_},xrM:function(){return l1},PhF:function(){return fj},Z0O:function(){return cb},DLL:function(){return _E},KJW:function(){return Su},rsf:function(){return fI},D_D:function(){return _f},xf5:function(){return Og},iA_:function(){return k3},t6k:function(){return _5},xvT:function(){return tq},nvn:function(){return dJ},ua7:function(){return s4},mPE:function(){return _h},XxW:function(){return kg},m2c:function(){return kj},ho9:function(){return kE},QUh:function(){return _k},weF:function(){return S9},YNn:function(){return _v},DmW:function(){return _g},jrD:function(){return _B},E6f:function(){return _Z},Uzc:function(){return Oy},BTR:function(){return Ob},O9T:function(){return mJ},fVJ:function(){return _M},vQq:function(){return kl},NrH:function(){return EO},Y_Z:function(){return _S},EJC:function(){return OS},kOJ:function(){return _C},OQF:function(){return __},leQ:function(){return kf},ytg:function(){return E_},Vkc:function(){return cE},sWj:function(){return ES},S5V:function(){return _z},z$:function(){return tY},XBW:function(){return EC},x9T:function(){return OE},bjP:function(){return Oj},I13:function(){return kc},cEb:function(){return dQ},OHV:function(){return ko},OPV:function(){return ki},$Gg:function(){return ku},Y97:function(){return SN},c2j:function(){return SD},WsO:function(){return SY},Uu5:function(){return Om},oy6:function(){return Op}});var s,l,u,c,d,f,h,p,m,v,g,y,x=n(52322),b=n(2784),w=n.t(b,2),E=n(7896),j=n(34540),k=n(26215),S=n(99575);function _(e){let t=e+"CollectionProvider",[n,r]=(0,j.b)(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=e+"CollectionSlot",s=b.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=o(a,n),s=(0,k.e)(t,i.collectionRef);return b.createElement(S.g7,{ref:s},r)}),l=e+"CollectionItemSlot",u="data-radix-collection-item",c=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,a=b.useRef(null),s=(0,k.e)(t,a),c=o(l,n);return b.useEffect(()=>(c.itemMap.set(a,{ref:a,...i}),()=>void c.itemMap.delete(a))),b.createElement(S.g7,{[u]:"",ref:s},r)});return[{Provider:e=>{let{scope:t,children:n}=e,r=b.useRef(null),o=b.useRef(new Map).current;return b.createElement(i,{scope:t,itemMap:o,collectionRef:r},n)},Slot:s,ItemSlot:c},function(t){let n=o(e+"CollectionConsumer",t),r=b.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${u}]`)),r=Array.from(n.itemMap.values()),i=r.sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current));return i},[n.collectionRef,n.itemMap]);return r},r]}var O=n(41816),C=n(73597),M=n(72130),A=n(64680),T=n(28245),P=n(26074);let N="Collapsible",[R,D]=(0,j.b)(N),[L,F]=R(N),V=((e,t)=>{let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:a,...s}=e,[l=!1,u]=(0,C.T)({prop:r,defaultProp:i,onChange:a});return(0,b.createElement)(L,{scope:n,disabled:o,contentId:(0,P.M)(),open:l,onOpenToggle:(0,b.useCallback)(()=>u(e=>!e),[u])},(0,b.createElement)(M.WV.div,(0,E.Z)({"data-state":I(l),"data-disabled":o?"":void 0},s,{ref:t})))},"CollapsibleContent"),z=((e,t)=>{let{forceMount:n,...r}=e,i=F(V,e.__scopeCollapsible);return(0,b.createElement)(T.z,{present:n||i.open},({present:e})=>(0,b.createElement)(z,(0,E.Z)({},r,{ref:t,present:e})))},(0,b.forwardRef)((e,t)=>{let{__scopeCollapsible:n,present:r,children:i,...o}=e,a=F(V,n),[s,l]=(0,b.useState)(r),u=(0,b.useRef)(null),c=(0,k.e)(t,u),d=(0,b.useRef)(0),f=d.current,h=(0,b.useRef)(0),p=h.current,m=a.open||s,v=(0,b.useRef)(m),g=(0,b.useRef)();return(0,b.useEffect)(()=>{let e=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,A.b)(()=>{let e=u.current;if(e){g.current=g.current||{transitionDuration:e.style.transitionDuration,animationDuration:e.style.animationDuration,animationFillMode:e.style.animationFillMode},e.style.transitionDuration="0s",e.style.animationDuration="0s",e.style.animationFillMode="none";let t=e.getBoundingClientRect();d.current=t.height,h.current=t.width,v.current||(e.style.transitionDuration=g.current.transitionDuration,e.style.animationDuration=g.current.animationDuration,e.style.animationFillMode=g.current.animationFillMode),l(r)}},[a.open,r]),(0,b.createElement)(M.WV.div,(0,E.Z)({"data-state":I(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!m},o,{ref:c,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":p?`${p}px`:void 0,...e.style}}),m&&i)}));function I(e){return e?"open":"closed"}let Z="Accordion",B=["Home","End","ArrowDown","ArrowUp"],[H,U,W]=_(Z),[q,$]=(0,j.b)(Z,[W,D]),Y=(D(),b.forwardRef((e,t)=>{let{type:n,...r}=e;return b.createElement(H.Provider,{scope:e.__scopeAccordion},"multiple"===n?b.createElement(ee,(0,E.Z)({},r,{ref:t})):b.createElement(J,(0,E.Z)({},r,{ref:t})))}));Y.propTypes={type(e){let t=e.value||e.defaultValue;return e.type&&!["single","multiple"].includes(e.type)?Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`."):"multiple"===e.type&&"string"==typeof t?Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`."):"single"===e.type&&Array.isArray(t)?Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`."):null}};let[G,X]=q(Z),[K,Q]=q(Z,{collapsible:!1}),J=b.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},collapsible:o=!1,...a}=e,[s,l]=(0,C.T)({prop:n,defaultProp:r,onChange:i});return b.createElement(G,{scope:e.__scopeAccordion,value:s?[s]:[],onItemOpen:l,onItemClose:b.useCallback(()=>o&&l(""),[o,l])},b.createElement(K,{scope:e.__scopeAccordion,collapsible:o},b.createElement(er,(0,E.Z)({},a,{ref:t}))))}),ee=b.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...o}=e,[a=[],s]=(0,C.T)({prop:n,defaultProp:r,onChange:i}),l=b.useCallback(e=>s((t=[])=>[...t,e]),[s]),u=b.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return b.createElement(G,{scope:e.__scopeAccordion,value:a,onItemOpen:l,onItemClose:u},b.createElement(K,{scope:e.__scopeAccordion,collapsible:!0},b.createElement(er,(0,E.Z)({},o,{ref:t}))))}),[et,en]=q(Z),er=b.forwardRef((e,t)=>{let{__scopeAccordion:n,disabled:r,...i}=e,o=b.useRef(null),a=(0,k.e)(o,t),s=U(n),l=(0,O.M)(e.onKeyDown,e=>{var t;if(!B.includes(e.key))return;let n=e.target,r=s().filter(e=>{var t;return!(null!==(t=e.ref.current)&&void 0!==t&&t.disabled)}),i=r.findIndex(e=>e.ref.current===n),o=r.length;if(-1===i)return;e.preventDefault();let a=i;switch(e.key){case"Home":a=0;break;case"End":a=o-1;break;case"ArrowDown":a=i+1;break;case"ArrowUp":(a=i-1)<0&&(a=o-1)}let l=a%o;null===(t=r[l].ref.current)||void 0===t||t.focus()});return b.createElement(et,{scope:n,disabled:r},b.createElement(H.Slot,{scope:n},b.createElement(M.WV.div,(0,E.Z)({},i,{ref:a,onKeyDown:r?void 0:l}))))}),[ei,eo]=q("AccordionItem");var ea=n(82851),es=n(83317);function el(e){return e.split("-")[0]}function eu(e){return e.split("-")[1]}function ec(e){return["top","bottom"].includes(el(e))?"x":"y"}function ed(e){return"y"===e?"height":"width"}function ef(e,t,n){let r,{reference:i,floating:o}=e,a=i.x+i.width/2-o.width/2,s=i.y+i.height/2-o.height/2,l=ec(t),u=ed(l),c=i[u]/2-o[u]/2,d="x"===l;switch(el(t)){case"top":r={x:a,y:i.y-o.height};break;case"bottom":r={x:a,y:i.y+i.height};break;case"right":r={x:i.x+i.width,y:s};break;case"left":r={x:i.x-o.width,y:s};break;default:r={x:i.x,y:i.y}}switch(eu(t)){case"start":r[l]-=c*(n&&d?-1:1);break;case"end":r[l]+=c*(n&&d?-1:1)}return r}let eh=async(e,t,n)=>{let{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await (null==a.isRTL?void 0:a.isRTL(t)),l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:c}=ef(l,r,s),d=r,f={},h=0;for(let n=0;n({name:"arrow",options:e,async fn(t){let{element:n,padding:r=0}=null!=e?e:{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(null==n)return{};let u=ep(r),c={x:i,y:o},d=ec(a),f=eu(a),h=ed(d),p=await l.getDimensions(n),m="y"===d?"top":"left",v="y"===d?"bottom":"right",g=s.reference[h]+s.reference[d]-c[d]-s.floating[h],y=c[d]-s.reference[d],x=await (null==l.getOffsetParent?void 0:l.getOffsetParent(n)),b=x?"y"===d?x.clientHeight||0:x.clientWidth||0:0;0===b&&(b=s.floating[h]);let w=u[m],E=b-p[h]-u[v],j=b/2-p[h]/2+(g/2-y/2),k=ey(w,eg(j,E)),S=("start"===f?u[m]:u[v])>0&&j!==k&&s.reference[h]<=s.floating[h];return{[d]:c[d]-(S?jeb[e])}let eE={start:"end",end:"start"};function ej(e){return e.replace(/start|end/g,e=>eE[e])}let ek=["top","right","bottom","left"];ek.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);let eS=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r,i,o;let{placement:a,middlewareData:s,rects:l,initialPlacement:u,platform:c,elements:d}=t,{mainAxis:f=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...g}=e,y=el(a),x=p||(y!==u&&v?function(e){let t=ew(e);return[ej(e),t,ej(t)]}(u):[ew(u)]),b=[u,...x],w=await ev(t,g),E=[],j=(null==(n=s.flip)?void 0:n.overflows)||[];if(f&&E.push(w[y]),h){let{main:e,cross:t}=function(e,t,n){void 0===n&&(n=!1);let r=eu(e),i=ec(e),o=ed(i),a="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=ew(a)),{main:a,cross:ew(a)}}(a,l,await (null==c.isRTL?void 0:c.isRTL(d.floating)));E.push(w[e],w[t])}if(j=[...j,{placement:a,overflows:E}],!E.every(e=>e<=0)){let e=(null!=(r=null==(i=s.flip)?void 0:i.index)?r:0)+1,t=b[e];if(t)return{data:{index:e,overflows:j},reset:{placement:t}};let n="bottom";switch(m){case"bestFit":{let e=null==(o=j.map(e=>[e,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:o[0].placement;e&&(n=e);break}case"initialPlacement":n=u}if(a!==n)return{reset:{placement:n}}}return{}}}};function e_(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function eO(e){return ek.some(t=>e[t]>=0)}let eC=function(e){let{strategy:t="referenceHidden",...n}=void 0===e?{}:e;return{name:"hide",async fn(e){let{rects:r}=e;switch(t){case"referenceHidden":{let t=e_(await ev(e,{...n,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:eO(t)}}}case"escaped":{let t=e_(await ev(e,{...n,altBoundary:!0}),r.floating);return{data:{escapedOffsets:t,escaped:eO(t)}}}default:return{}}}}},eM=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){let{x:n,y:r}=t,i=await async function(e,t){let{placement:n,platform:r,elements:i}=e,o=await (null==r.isRTL?void 0:r.isRTL(i.floating)),a=el(n),s=eu(n),l="x"===ec(n),u=["left","top"].includes(a)?-1:1,c=o&&l?-1:1,d="function"==typeof t?t(e):t,{mainAxis:f,crossAxis:h,alignmentAxis:p}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&"number"==typeof p&&(h="end"===s?-1*p:p),l?{x:h*c,y:f*u}:{x:f*u,y:h*c}}(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function eA(e){return"x"===e?"y":"x"}let eT=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=e,u={x:n,y:r},c=await ev(t,l),d=ec(el(i)),f=eA(d),h=u[d],p=u[f];if(o){let e="y"===d?"bottom":"right";h=ey(h+c["y"===d?"top":"left"],eg(h,h-c[e]))}a&&(p=ey(p+c["y"===f?"top":"left"],eg(p,p-c["y"===f?"bottom":"right"])));let m=s.fn({...t,[d]:h,[f]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},eP=function(e){return void 0===e&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,c={x:n,y:r},d=ec(i),f=eA(d),h=c[d],p=c[f],m="function"==typeof s?s({...o,placement:i}):s,v="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){let e="y"===d?"height":"width",t=o.reference[d]-o.floating[e]+v.mainAxis,n=o.reference[d]+o.reference[e]-v.mainAxis;hn&&(h=n)}if(u){var g,y,x,b;let e="y"===d?"width":"height",t=["top","left"].includes(el(i)),n=o.reference[f]-o.floating[e]+(t&&null!=(g=null==(y=a.offset)?void 0:y[f])?g:0)+(t?0:v.crossAxis),r=o.reference[f]+o.reference[e]+(t?0:null!=(x=null==(b=a.offset)?void 0:b[f])?x:0)-(t?v.crossAxis:0);pr&&(p=r)}return{[d]:h,[f]:p}}}};function eN(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function eR(e){if(null==e)return window;if(!eN(e)){let t=e.ownerDocument;return t&&t.defaultView||window}return e}function eD(e){return eR(e).getComputedStyle(e)}function eL(e){return eN(e)?"":e?(e.nodeName||"").toLowerCase():""}function eF(){let e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map(e=>e.brand+"/"+e.version).join(" "):navigator.userAgent}function eV(e){return e instanceof eR(e).HTMLElement}function ez(e){return e instanceof eR(e).Element}function eI(e){return"undefined"!=typeof ShadowRoot&&(e instanceof eR(e).ShadowRoot||e instanceof ShadowRoot)}function eZ(e){let{overflow:t,overflowX:n,overflowY:r}=eD(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function eB(e){let t=/firefox/i.test(eF()),n=eD(e);return"none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||["transform","perspective"].includes(n.willChange)||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter}function eH(){return!/^((?!chrome|android).)*safari/i.test(eF())}let eU=Math.min,eW=Math.max,eq=Math.round;function e$(e,t,n){var r,i,o,a;void 0===t&&(t=!1),void 0===n&&(n=!1);let s=e.getBoundingClientRect(),l=1,u=1;t&&eV(e)&&(l=e.offsetWidth>0&&eq(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&eq(s.height)/e.offsetHeight||1);let c=ez(e)?eR(e):window,d=!eH()&&n,f=(s.left+(d&&null!=(r=null==(i=c.visualViewport)?void 0:i.offsetLeft)?r:0))/l,h=(s.top+(d&&null!=(o=null==(a=c.visualViewport)?void 0:a.offsetTop)?o:0))/u,p=s.width/l,m=s.height/u;return{width:p,height:m,top:h,right:f+p,bottom:h+m,left:f,x:f,y:h}}function eY(e){return((e instanceof eR(e).Node?e.ownerDocument:e.document)||window.document).documentElement}function eG(e){return ez(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function eX(e){return e$(eY(e)).left+eG(e).scrollLeft}function eK(e){return"html"===eL(e)?e:e.assignedSlot||e.parentNode||(eI(e)?e.host:null)||eY(e)}function eQ(e){return eV(e)&&"fixed"!==getComputedStyle(e).position?e.offsetParent:null}function eJ(e){let t=eR(e),n=eQ(e);for(;n&&["table","td","th"].includes(eL(n))&&"static"===getComputedStyle(n).position;)n=eQ(n);return n&&("html"===eL(n)||"body"===eL(n)&&"static"===getComputedStyle(n).position&&!eB(n))?t:n||function(e){let t=eK(e);for(eI(t)&&(t=t.host);eV(t)&&!["html","body"].includes(eL(t));){if(eB(t))return t;t=t.parentNode}return null}(e)||t}function e0(e){if(eV(e))return{width:e.offsetWidth,height:e.offsetHeight};let t=e$(e);return{width:t.width,height:t.height}}function e1(e,t){var n;void 0===t&&(t=[]);let r=function e(t){let n=eK(t);return["html","body","#document"].includes(eL(n))?t.ownerDocument.body:eV(n)&&eZ(n)?n:e(n)}(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=eR(r),a=i?[o].concat(o.visualViewport||[],eZ(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(e1(a))}function e2(e,t,n){return"viewport"===t?em(function(e,t){let n=eR(e),r=eY(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;let e=eH();(e||!e&&"fixed"===t)&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}(e,n)):ez(t)?function(e,t){let n=e$(e,!1,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,n):em(function(e){var t;let n=eY(e),r=eG(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=eW(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=eW(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+eX(e),l=-r.scrollTop;return"rtl"===eD(i||n).direction&&(s+=eW(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}(eY(e)))}let e4={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,o=[..."clippingAncestors"===n?function(e){let t=e1(e),n=["absolute","fixed"].includes(eD(e).position)&&eV(e)?eJ(e):e;return ez(n)?t.filter(e=>ez(e)&&function(e,t){let n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&eI(n)){let n=t;do{if(n&&e===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(e,n)&&"body"!==eL(e)):[]}(t):[].concat(n),r],a=o[0],s=o.reduce((e,n)=>{let r=e2(t,n,i);return e.top=eW(r.top,e.top),e.right=eU(r.right,e.right),e.bottom=eU(r.bottom,e.bottom),e.left=eW(r.left,e.left),e},e2(t,a,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e,i=eV(n),o=eY(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0},s={x:0,y:0};if((i||!i&&"fixed"!==r)&&(("body"!==eL(n)||eZ(o))&&(a=eG(n)),eV(n))){let e=e$(n,!0);s.x=e.x+n.clientLeft,s.y=e.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}},isElement:ez,getDimensions:e0,getOffsetParent:eJ,getDocumentElement:eY,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:function(e,t,n){let r=eV(t),i=eY(t),o=e$(e,r&&function(e){let t=e$(e);return eq(t.width)!==e.offsetWidth||eq(t.height)!==e.offsetHeight}(t),"fixed"===n),a={scrollLeft:0,scrollTop:0},s={x:0,y:0};if(r||!r&&"fixed"!==n){if(("body"!==eL(t)||eZ(i))&&(a=eG(t)),eV(t)){let e=e$(t,!0);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else i&&(s.x=eX(i))}return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}(t,eJ(n),r),floating:{...e0(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===eD(e).direction};function e3(e,t,n,r){void 0===r&&(r={});let{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,c=l||u?[...ez(e)?e1(e):[],...e1(t)]:[];c.forEach(e=>{l&&e.addEventListener("scroll",n,{passive:!0}),u&&e.addEventListener("resize",n)});let d,f=null;if(a){let r=!0;f=new ResizeObserver(()=>{r||n(),r=!1}),ez(e)&&!s&&f.observe(e),f.observe(t)}let h=s?e$(e):null;return s&&function t(){let r=e$(e);h&&(r.x!==h.x||r.y!==h.y||r.width!==h.width||r.height!==h.height)&&n(),h=r,d=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach(e=>{l&&e.removeEventListener("scroll",n),u&&e.removeEventListener("resize",n)}),null==(e=f)||e.disconnect(),f=null,s&&cancelAnimationFrame(d)}}let e5=(e,t,n)=>eh(e,t,{platform:e4,...n});var e6=n(28316),e8="undefined"!=typeof document?b.useLayoutEffect:b.useEffect;function e7(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=void 0===e?{}:e,o=b.useRef(null),a=b.useRef(null),s=function(e){let t=b.useRef(e);return e8(()=>{t.current=e}),t}(i),l=b.useRef(null),[u,c]=b.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[d,f]=b.useState(t);!function e(t,n){let r,i,o;if(t===n)return!0;if(typeof t!=typeof n)return!1;if("function"==typeof t&&t.toString()===n.toString())return!0;if(t&&n&&"object"==typeof t){if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!=i--;)if(!e(t[i],n[i]))return!1;return!0}if((r=(o=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;0!=i--;){let r=o[i];if(("_owner"!==r||!t.$$typeof)&&!e(t[r],n[r]))return!1}return!0}return t!=t&&n!=n}(null==d?void 0:d.map(e=>{let{options:t}=e;return t}),null==t?void 0:t.map(e=>{let{options:t}=e;return t}))&&f(t);let h=b.useCallback(()=>{o.current&&a.current&&e5(o.current,a.current,{middleware:d,placement:n,strategy:r}).then(e=>{p.current&&e6.flushSync(()=>{c(e)})})},[d,n,r]);e8(()=>{p.current&&h()},[h]);let p=b.useRef(!1);e8(()=>(p.current=!0,()=>{p.current=!1}),[]);let m=b.useCallback(()=>{if("function"==typeof l.current&&(l.current(),l.current=null),o.current&&a.current){if(s.current){let e=s.current(o.current,a.current,h);l.current=e}else h()}},[h,s]),v=b.useCallback(e=>{o.current=e,m()},[m]),g=b.useCallback(e=>{a.current=e,m()},[m]),y=b.useMemo(()=>({reference:o,floating:a}),[]);return b.useMemo(()=>({...u,update:h,refs:y,reference:v,floating:g}),[u,h,y,v,g])}let e9=e=>{let{element:t,padding:n}=e;return{name:"arrow",options:e,fn(e){if(Object.prototype.hasOwnProperty.call(t,"current")){if(null!=t.current)return ex({element:t.current,padding:n}).fn(e)}else if(t)return ex({element:t,padding:n}).fn(e);return{}}}},te=(0,b.forwardRef)((e,t)=>{let{children:n,width:r=10,height:i=5,...o}=e;return(0,b.createElement)(M.WV.svg,(0,E.Z)({},o,{ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:(0,b.createElement)("polygon",{points:"0,0 30,0 15,10"}))});function tt(e){let[t,n]=(0,b.useState)(void 0);return(0,A.b)(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let r,i;if(!Array.isArray(t)||!t.length)return;let o=t[0];if("borderBoxSize"in o){let e=o.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,i=t.blockSize}else r=e.offsetWidth,i=e.offsetHeight;n({width:r,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}let tn="Popper",[tr,ti]=(0,j.b)(tn),[to,ta]=tr(tn),ts=(0,b.forwardRef)((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,o=ta("PopperAnchor",n),a=(0,b.useRef)(null),s=(0,k.e)(t,a);return(0,b.useEffect)(()=>{o.onAnchorChange((null==r?void 0:r.current)||a.current)}),r?null:(0,b.createElement)(M.WV.div,(0,E.Z)({},i,{ref:s}))}),tl="PopperContent",[tu,tc]=tr(tl),[td,tf]=tr(tl,{hasParent:!1,positionUpdateFns:new Set}),th=(0,b.forwardRef)((e,t)=>{var n,r,i,o,a,s,l,u;let{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:h="center",alignOffset:p=0,arrowPadding:m=0,collisionBoundary:v=[],collisionPadding:g=0,sticky:y="partial",hideWhenDetached:x=!1,avoidCollisions:w=!0,...E}=e,j=ta(tl,c),[S,_]=(0,b.useState)(null),O=(0,k.e)(t,e=>_(e)),[C,T]=(0,b.useState)(null),P=tt(C),N=null!==(n=null==P?void 0:P.width)&&void 0!==n?n:0,R=null!==(r=null==P?void 0:P.height)&&void 0!==r?r:0,D="number"==typeof g?g:{top:0,right:0,bottom:0,left:0,...g},L=Array.isArray(v)?v:[v],F=L.length>0,V={padding:D,boundary:L.filter(tg),altBoundary:F},{reference:z,floating:I,strategy:Z,x:B,y:H,placement:U,middlewareData:W,update:q}=e7({strategy:"fixed",placement:d+("center"!==h?"-"+h:""),whileElementsMounted:e3,middleware:[eM({mainAxis:f+R,alignmentAxis:p}),w?eT({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?eP():void 0,...V}):void 0,C?e9({element:C,padding:m}):void 0,w?eS({...V}):void 0,ty({arrowWidth:N,arrowHeight:R}),x?eC({strategy:"referenceHidden"}):void 0].filter(tv)});(0,A.b)(()=>{z(j.anchor)},[z,j.anchor]);let $=null!==B&&null!==H,[Y,G]=tx(U),X=null===(i=W.arrow)||void 0===i?void 0:i.x,K=null===(o=W.arrow)||void 0===o?void 0:o.y,Q=(null===(a=W.arrow)||void 0===a?void 0:a.centerOffset)!==0,[J,ee]=(0,b.useState)();(0,A.b)(()=>{S&&ee(window.getComputedStyle(S).zIndex)},[S]);let{hasParent:et,positionUpdateFns:en}=tf(tl,c),er=!et;(0,b.useLayoutEffect)(()=>{if(!er)return en.add(q),()=>{en.delete(q)}},[er,en,q]),(0,b.useLayoutEffect)(()=>{er&&$&&Array.from(en).reverse().forEach(e=>requestAnimationFrame(e))},[er,$,en]);let ei={"data-side":Y,"data-align":G,...E,ref:O,style:{...E.style,animation:$?void 0:"none",opacity:null!==(s=W.hide)&&void 0!==s&&s.referenceHidden?0:void 0}};return(0,b.createElement)("div",{ref:I,"data-radix-popper-content-wrapper":"",style:{position:Z,left:0,top:0,transform:$?`translate3d(${Math.round(B)}px, ${Math.round(H)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:J,"--radix-popper-transform-origin":[null===(l=W.transformOrigin)||void 0===l?void 0:l.x,null===(u=W.transformOrigin)||void 0===u?void 0:u.y].join(" ")}},(0,b.createElement)(tu,{scope:c,placedSide:Y,onArrowChange:T,arrowX:X,arrowY:K,shouldHideArrow:Q},er?(0,b.createElement)(td,{scope:c,hasParent:!0,positionUpdateFns:en},(0,b.createElement)(M.WV.div,ei)):(0,b.createElement)(M.WV.div,ei)))}),tp={top:"bottom",right:"left",bottom:"top",left:"right"},tm=(0,b.forwardRef)(function(e,t){let{__scopePopper:n,...r}=e,i=tc("PopperArrow",n),o=tp[i.placedSide];return(0,b.createElement)("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0}},(0,b.createElement)(te,(0,E.Z)({},r,{ref:t,style:{...r.style,display:"block"}})))});function tv(e){return void 0!==e}function tg(e){return null!==e}let ty=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;let{placement:s,rects:l,middlewareData:u}=t,c=(null===(n=u.arrow)||void 0===n?void 0:n.centerOffset)!==0,d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[h,p]=tx(s),m={start:"0%",center:"50%",end:"100%"}[p],v=(null!==(r=null===(i=u.arrow)||void 0===i?void 0:i.x)&&void 0!==r?r:0)+d/2,g=(null!==(o=null===(a=u.arrow)||void 0===a?void 0:a.y)&&void 0!==o?o:0)+f/2,y="",x="";return"bottom"===h?(y=c?m:`${v}px`,x=`${-f}px`):"top"===h?(y=c?m:`${v}px`,x=`${l.floating.height+f}px`):"right"===h?(y=`${-f}px`,x=c?m:`${g}px`):"left"===h&&(y=`${l.floating.width+f}px`,x=c?m:`${g}px`),{data:{x:y,y:x}}}});function tx(e){let[t,n="center"]=e.split("-");return[t,n]}let tb=e=>{let{__scopePopper:t,children:n}=e,[r,i]=(0,b.useState)(null);return(0,b.createElement)(to,{scope:t,anchor:r,onAnchorChange:i},n)};var tw=n(6500);let tE=(0,b.forwardRef)((e,t)=>(0,b.createElement)(M.WV.span,(0,E.Z)({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))),[tj,tk]=(0,j.b)("Tooltip",[ti]),tS=ti(),t_="tooltip.open",[tO,tC]=tj("TooltipProvider"),tM="Tooltip",[tA,tT]=tj(tM),tP="TooltipTrigger",tN=(0,b.forwardRef)((e,t)=>{let{__scopeTooltip:n,...r}=e,i=tT(tP,n),o=tC(tP,n),a=tS(n),s=(0,b.useRef)(null),l=(0,k.e)(t,s,i.onTriggerChange),u=(0,b.useRef)(!1),c=(0,b.useRef)(!1),d=(0,b.useCallback)(()=>u.current=!1,[]);return(0,b.useEffect)(()=>()=>document.removeEventListener("pointerup",d),[d]),(0,b.createElement)(ts,(0,E.Z)({asChild:!0},a),(0,b.createElement)(M.WV.button,(0,E.Z)({"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute},r,{ref:l,onPointerMove:(0,O.M)(e.onPointerMove,e=>{"touch"===e.pointerType||c.current||o.isPointerInTransitRef.current||(i.onTriggerEnter(),c.current=!0)}),onPointerLeave:(0,O.M)(e.onPointerLeave,()=>{i.onTriggerLeave(),c.current=!1}),onPointerDown:(0,O.M)(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:(0,O.M)(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:(0,O.M)(e.onBlur,i.onClose),onClick:(0,O.M)(e.onClick,e=>{let t=0===e.detail;t&&i.onClose()})})))}),tR="TooltipPortal",[tD,tL]=tj(tR,{forceMount:void 0}),tF="TooltipContent",tV=(0,b.forwardRef)((e,t)=>{let n=tL(tF,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,a=tT(tF,e.__scopeTooltip);return(0,b.createElement)(T.z,{present:r||a.open},a.disableHoverableContent?(0,b.createElement)(tB,(0,E.Z)({side:i},o,{ref:t})):(0,b.createElement)(tz,(0,E.Z)({side:i},o,{ref:t})))}),tz=(0,b.forwardRef)((e,t)=>{let n=tT(tF,e.__scopeTooltip),r=tC(tF,e.__scopeTooltip),i=(0,b.useRef)(null),o=(0,k.e)(t,i),[a,s]=(0,b.useState)(null),{trigger:l,onClose:u}=n,c=i.current,{onPointerInTransitChange:d}=r,f=(0,b.useCallback)(()=>{s(null),d(!1)},[d]),h=(0,b.useCallback)((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=function(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:return null}}(r,n.getBoundingClientRect()),o="right"===i||"bottom"===i?-5:5,a="right"===i||"left"===i?{x:e.clientX+o,y:e.clientY}:{x:e.clientX,y:e.clientY+o},l=function(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}(t.getBoundingClientRect()),u=function(e){let t=e.slice();return t.sort((e,t)=>e.xt.x?1:e.yt.y?1:0),function(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return(n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y)?t:t.concat(n)}(t)}([a,...l]);s(u),d(!0)},[d]);return(0,b.useEffect)(()=>()=>f(),[f]),(0,b.useEffect)(()=>{if(l&&c){let e=e=>h(e,c),t=e=>h(e,l);return l.addEventListener("pointerleave",e),c.addEventListener("pointerleave",t),()=>{l.removeEventListener("pointerleave",e),c.removeEventListener("pointerleave",t)}}},[l,c,h,f]),(0,b.useEffect)(()=>{if(a){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=(null==l?void 0:l.contains(t))||(null==c?void 0:c.contains(t)),i=!function(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,o=t.length-1;er!=u>r&&n<(l-a)*(r-s)/(u-s)+a;c&&(i=!i)}return i}(n,a);r?f():i&&(f(),u())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[l,c,a,u,f]),(0,b.createElement)(tB,(0,E.Z)({},e,{ref:o}))}),[tI,tZ]=tj(tM,{isInside:!1}),tB=(0,b.forwardRef)((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:a,...s}=e,l=tT(tF,n),u=tS(n),{onClose:c}=l;return(0,b.useEffect)(()=>(document.addEventListener(t_,c),()=>document.removeEventListener(t_,c)),[c]),(0,b.useEffect)(()=>{if(l.trigger){let e=e=>{let t=e.target;null!=t&&t.contains(l.trigger)&&c()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[l.trigger,c]),(0,b.createElement)(es.XB,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:e=>e.preventDefault(),onDismiss:c},(0,b.createElement)(th,(0,E.Z)({"data-state":l.stateAttribute},u,s,{ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)"}}),(0,b.createElement)(S.A4,null,r),(0,b.createElement)(tI,{scope:n,isInside:!0},(0,b.createElement)(tE,{id:l.contentId,role:"tooltip"},i||r))))}),tH=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i=!1,onOpenChange:o,disableHoverableContent:a,delayDuration:s}=e,l=tC(tM,e.__scopeTooltip),u=tS(t),[c,d]=(0,b.useState)(null),f=(0,P.M)(),h=(0,b.useRef)(0),p=null!=a?a:l.disableHoverableContent,m=null!=s?s:l.delayDuration,v=(0,b.useRef)(!1),[g=!1,y]=(0,C.T)({prop:r,defaultProp:i,onChange:e=>{e?(l.onOpen(),document.dispatchEvent(new CustomEvent(t_))):l.onClose(),null==o||o(e)}}),x=(0,b.useMemo)(()=>g?v.current?"delayed-open":"instant-open":"closed",[g]),w=(0,b.useCallback)(()=>{window.clearTimeout(h.current),v.current=!1,y(!0)},[y]),E=(0,b.useCallback)(()=>{window.clearTimeout(h.current),y(!1)},[y]),j=(0,b.useCallback)(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,y(!0)},m)},[m,y]);return(0,b.useEffect)(()=>()=>window.clearTimeout(h.current),[]),(0,b.createElement)(tb,u,(0,b.createElement)(tA,{scope:t,contentId:f,open:g,stateAttribute:x,trigger:c,onTriggerChange:d,onTriggerEnter:(0,b.useCallback)(()=>{l.isOpenDelayed?j():w()},[l.isOpenDelayed,j,w]),onTriggerLeave:(0,b.useCallback)(()=>{p?E():window.clearTimeout(h.current)},[E,p]),onOpen:w,onClose:E,disableHoverableContent:p},n))},tU=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,o=tT(tR,t);return(0,b.createElement)(tD,{scope:t,forceMount:n},(0,b.createElement)(T.z,{present:n||o.open},(0,b.createElement)(tw.h,{asChild:!0,container:i},r)))},tW=(0,ea.j)([],{variants:{display:{default:"inline-block",none:""},font:{mono:"font-mono",sans:"font-sans"},color:{verySubtle:"text-gray-700 dark:text-graydark-700",subtle:"text-gray-1000 dark:text-graydark-1000",contrast:"text-gray-1100 dark:text-white",lo:"text-white dark:text-graydark-50",accent:"text-accent-1100 dark:text-accentdark-1100",red:"text-red-700 dark:text-red-400",green:"text-emerald-700 dark:text-emerald-500",amber:"text-amber-600 dark:text-amber-500",none:""},weight:{extrabold:"font-extrabold",bold:"font-bold",medium:"font-medium",semibold:"font-semibold",regular:"font-normal",normal:"font-normal",light:"font-light",none:""},size:{10:"text-xxs",12:"text-xs",14:"text-sm",16:"text-base",18:"text-lg",20:"text-xl",24:"text-2xl",30:"text-3xl",36:"text-4xl",40:"text-5xl",48:"text-5xl",60:"text-6xl",64:"text-6xl"},scaleSize:{12:"text-xxs md:text-xs",14:"text-xs md:text-sm",16:"text-sm md:text-base",18:"text-base md:text-lg",20:"text-base md:text-xl",24:"text-xl md:text-2xl",30:"text-2xl md:text-3xl",36:"text-3xl md:text-4xl",40:"text-4xl md:text-5xl",48:"text-4xl md:text-5xl",60:"text-5xl md:text-6xl",64:"text-5xl md:text-6xl"},noWrap:{true:"whitespace-nowrap"},underline:{accent:"underline underline-offset-2 decoration-2 decoration-accent-900 dark:decoration-accentdark-900",show:"underline underline-offset-2 decoration-gray-1100 dark:decoration-gray-500",hover:"hover:underline underline-offset-2 decoration-gray-1100 dark:decoration-gray-500",none:""},ellipsis:{true:"overflow-hidden text-ellipsis whitespace-nowrap"},wrapEllipsis:{true:"overflow-hidden text-ellipsis"}},defaultVariants:{display:"default",weight:"regular",font:"sans",color:"contrast",underline:"none"}}),tq=b.forwardRef((e,t)=>{let{tag:n="span",className:r,font:i,color:o,weight:a,size:s,scaleSize:l,noWrap:u,underline:c,ellipsis:d,wrapEllipsis:f,...h}=e;return(0,x.jsx)(n,{ref:t,className:(0,ea.cx)(r,tW({font:i,color:o,weight:a,size:s,scaleSize:l,underline:c,noWrap:u,ellipsis:d,wrapEllipsis:f})),...h})}),t$=b.forwardRef((e,t)=>{let{size:n="18",...r}=e;return(0,x.jsx)(tq,{tag:"p",...r,ref:t,weight:"regular",scaleSize:n,color:"subtle",className:(0,ea.cx)("leading-relaxed md:leading-relaxed",e.className)})}),tY=(0,ea.j)(["bg-white dark:bg-graydark-200","transition-shadow ease-in-out duration-300","shadow-sm hover:shadow","rounded","border","border-gray-400 dark:border-graydark-400"]),tG=b.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,x.jsx)("div",{ref:t,className:tY({className:n}),...r})});var tX=n(34406);let tK=(void 0===tX||tX.env,"production"),tQ=1/60*1e3,tJ="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),t0="undefined"!=typeof window?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(tJ()),tQ),t1=!0,t2=!1,t4=!1,t3={delta:0,timestamp:0},t5=["read","update","preRender","render","postRender"],t6=t5.reduce((e,t)=>(e[t]=function(e){let t=[],n=[],r=0,i=!1,o=!1,a=new WeakSet,s={schedule:(e,o=!1,s=!1)=>{let l=s&&i,u=l?t:n;return o&&a.add(e),-1===u.indexOf(e)&&(u.push(e),l&&i&&(r=t.length)),e},cancel:e=>{let t=n.indexOf(e);-1!==t&&n.splice(t,1),a.delete(e)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length)for(let n=0;nt2=!0),e),{}),t8=t5.reduce((e,t)=>{let n=t6[t];return e[t]=(e,t=!1,r=!1)=>(t2||nn(),n.schedule(e,t,r)),e},{}),t7=t5.reduce((e,t)=>(e[t]=t6[t].cancel,e),{}),t9=t5.reduce((e,t)=>(e[t]=()=>t6[t].process(t3),e),{}),ne=e=>t6[e].process(t3),nt=e=>{t2=!1,t3.delta=t1?tQ:Math.max(Math.min(e-t3.timestamp,40),1),t3.timestamp=e,t4=!0,t5.forEach(ne),t4=!1,t2&&(t1=!1,t0(nt))},nn=()=>{t2=!0,t1=!0,t4||t0(nt)},nr=()=>t3,ni="undefined"!=typeof document,no=ni?b.useLayoutEffect:b.useEffect;function na(){let e=(0,b.useRef)(!1);return no(()=>(e.current=!0,()=>{e.current=!1}),[]),e}let ns=(0,b.createContext)(null);function nl(e){let t=(0,b.useRef)(null);return null===t.current&&(t.current=e()),t.current}class nu extends b.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){let e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function nc({children:e,isPresent:t}){let n=(0,b.useId)(),r=(0,b.useRef)(null),i=(0,b.useRef)({width:0,height:0,top:0,left:0});return(0,b.useInsertionEffect)(()=>{let{width:e,height:o,top:a,left:s}=i.current;if(t||!r.current||!e||!o)return;r.current.dataset.motionPopId=n;let l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(`
+ */var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,h=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,g=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,x=n?Symbol.for("react.responder"):60118,b=n?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case d:case o:case s:case a:case h:return e;default:switch(e=e&&e.$$typeof){case u:case f:case v:case m:case l:return e;default:return t}}case i:return t}}}function E(e){return w(e)===d}t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=l,t.Element=r,t.ForwardRef=f,t.Fragment=o,t.Lazy=v,t.Memo=m,t.Portal=i,t.Profiler=s,t.StrictMode=a,t.Suspense=h,t.isAsyncMode=function(e){return E(e)||w(e)===c},t.isConcurrentMode=E,t.isContextConsumer=function(e){return w(e)===u},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===f},t.isFragment=function(e){return w(e)===o},t.isLazy=function(e){return w(e)===v},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===i},t.isProfiler=function(e){return w(e)===s},t.isStrictMode=function(e){return w(e)===a},t.isSuspense=function(e){return w(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===s||e===a||e===h||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===m||e.$$typeof===l||e.$$typeof===u||e.$$typeof===f||e.$$typeof===y||e.$$typeof===x||e.$$typeof===b||e.$$typeof===g)},t.typeOf=w},73887:function(e,t,n){"use strict";e.exports=n(43459)},62333:function(e,t){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */t.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<>1,c=-7,d=n?i-1:0,f=n?-1:1,h=e[t+d];for(d+=f,o=h&(1<<-c)-1,h>>=-c,c+=s;c>0;o=256*o+e[t+d],d+=f,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+e[t+d],d+=f,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:(h?-1:1)*(1/0);a+=Math.pow(2,r),o-=u}return(h?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,l,u=8*o-i-1,c=(1<>1,f=23===i?5960464477539062e-23:0,h=r?0:o-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+d>=1?t+=f/l:t+=f*Math.pow(2,1-d),t*l>=2&&(a++,l/=2),a+d>=c?(s=0,a=c):a+d>=1?(s=(t*l-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[n+h]=255&s,h+=p,s/=256,i-=8);for(a=a<0;e[n+h]=255&a,h+=p,a/=256,u-=8);e[n+h-p]|=128*m}},39515:function(e,t,n){var r=n(38761)(n(37772),"DataView");e.exports=r},89612:function(e,t,n){var r=n(52118),i=n(96909),o=n(98138),a=n(4174),s=n(7942);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1}},34893:function(e){e.exports=function(e,t,n){for(var r=-1,i=null==e?0:e.length;++r=200&&(d=l,f=!1,t=new r(t));t:for(;++c0&&o(c)?n>1?e(c,n-1,o,a,s):r(s,c):a||(s[s.length]=c)}return s}},15308:function(e,t,n){var r=n(55463)();e.exports=r},26548:function(e,t,n){var r=n(15308),i=n(90249);e.exports=function(e,t){return e&&r(e,t,i)}},13324:function(e,t,n){var r=n(17297),i=n(33812);e.exports=function(e,t){t=r(t,e);for(var n=0,o=t.length;null!=e&&n=120&&g.length>=120)?new r(h&&g):void 0}g=e[0];var y=-1,x=p[0];t:for(;++yi?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r=200){var m=t?null:s(e);if(m)return l(m);f=!1,c=a,p=new r}else p=t?[]:h;t:for(;++u=i?e:r(e,t,n)}},10768:function(e,t,n){var r=n(77832);e.exports=function(e,t){for(var n=e.length;n--&&r(t,e[n],0)>-1;);return n}},51821:function(e,t,n){var r=n(77832);e.exports=function(e,t){for(var n=-1,i=e.length;++n-1;);return n}},79882:function(e,t,n){var r=n(79162);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},92175:function(e,t,n){e=n.nmd(e);var r=n(37772),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}},34727:function(e,t,n){var r=n(79882);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},96058:function(e){var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},70169:function(e,t,n){var r=n(50857),i=r?r.prototype:void 0,o=i?i.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},6190:function(e,t,n){var r=n(79882);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},27520:function(e,t,n){var r=n(4795);e.exports=function(e,t){if(e!==t){var n=void 0!==e,i=null===e,o=e==e,a=r(e),s=void 0!==t,l=null===t,u=t==t,c=r(t);if(!l&&!c&&!a&&e>t||a&&s&&u&&!l&&!c||i&&s&&u||!n&&u||!o)return 1;if(!i&&!a&&!c&&e=l)return u;return u*("desc"==n[i]?-1:1)}}return e.index-t.index}},51522:function(e){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,s&&i(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),t=Object(t);++rc))return!1;var f=l.get(e),h=l.get(t);if(f&&h)return f==t&&h==e;var p=-1,m=!0,v=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++p-1&&e%1==0&&e-1}},94769:function(e,t,n){var r=n(22218);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},92411:function(e,t,n){var r=n(89612),i=n(80235),o=n(10326);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},36417:function(e,t,n){var r=n(27937);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},86928:function(e,t,n){var r=n(27937);e.exports=function(e){return r(this,e).get(e)}},79493:function(e,t,n){var r=n(27937);e.exports=function(e){return r(this,e).has(e)}},24150:function(e,t,n){var r=n(27937);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},75179:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}},73477:function(e){e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},77777:function(e,t,n){var r=n(30733);e.exports=function(e){var t=r(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}},99191:function(e,t,n){var r=n(38761)(Object,"create");e.exports=r},54248:function(e,t,n){var r=n(60241)(Object.keys,Object);e.exports=r},62966:function(e){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},4146:function(e,t,n){e=n.nmd(e);var r=n(51242),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i&&r.process,s=function(){try{var e=o&&o.require&&o.require("util").types;if(e)return e;return a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},37157:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},60241:function(e){e.exports=function(e,t){return function(n){return e(t(n))}}},43114:function(e,t,n){var r=n(49432),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,a=-1,s=i(o.length-t,0),l=Array(s);++a0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},15243:function(e,t,n){var r=n(80235);e.exports=function(){this.__data__=new r,this.size=0}},72858:function(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},4417:function(e){e.exports=function(e){return this.__data__.get(e)}},8605:function(e){e.exports=function(e){return this.__data__.has(e)}},71418:function(e,t,n){var r=n(80235),i=n(10326),o=n(96738);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(e,t),this.size=n.size,this}},66024:function(e){e.exports=function(e,t,n){for(var r=n-1,i=e.length;++r=t||n<0||v&&r>=c}function b(){var e,n,r,o=i();if(x(o))return w(o);f=setTimeout(b,(e=o-h,n=o-p,r=t-e,v?s(r,c-n):r))}function w(e){return(f=void 0,g&&l)?y(e):(l=u=void 0,d)}function E(){var e,n=i(),r=x(n);if(l=arguments,u=this,h=n,r){if(void 0===f)return p=e=h,f=setTimeout(b,t),m?y(e):d;if(v)return clearTimeout(f),f=setTimeout(b,t),y(h)}return void 0===f&&(f=setTimeout(b,t)),d}return t=o(t)||0,r(n)&&(m=!!n.leading,c=(v="maxWait"in n)?a(o(n.maxWait)||0,t):c,g="trailing"in n?!!n.trailing:g),E.cancel=function(){void 0!==f&&clearTimeout(f),p=0,l=h=u=f=void 0},E.flush=function(){return void 0===f?d:w(i())},E}},97329:function(e,t,n){var r=n(61655),i=n(66188),o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,a=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=i(e))&&e.replace(o,r).replace(a,"")}},17335:function(e,t,n){var r=n(85246),i=n(62034),o=n(36060),a=n(93746),s=o(function(e,t){return a(e)?r(e,i(t,1,a,!0)):[]});e.exports=s},45861:function(e,t,n){e.exports=n(28460)},41225:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},35676:function(e,t,n){var r=n(62034);e.exports=function(e){return(null==e?0:e.length)?r(e,1):[]}},72579:function(e,t,n){var r=n(13324);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},3440:function(e,t,n){var r=n(13940),i=n(36740),o=Object.prototype.hasOwnProperty,a=i(function(e,t,n){o.call(e,n)?e[n].push(t):r(e,n,[t])});e.exports=a},93352:function(e,t,n){var r=n(32726),i=n(1369);e.exports=function(e,t){return null!=e&&i(e,t,r)}},95041:function(e,t,n){var r=n(20187),i=n(1369);e.exports=function(e,t){return null!=e&&i(e,t,r)}},23059:function(e){e.exports=function(e){return e}},30898:function(e,t,n){var r=n(50343),i=n(88390),o=n(36060),a=n(5642),s=o(function(e){var t=r(e,a);return t.length&&t[0]===e[0]?i(t):[]});e.exports=s},79631:function(e,t,n){var r=n(15183),i=n(15125),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return i(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},86152:function(e){var t=Array.isArray;e.exports=t},67878:function(e,t,n){var r=n(61049),i=n(61158);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},93746:function(e,t,n){var r=n(67878),i=n(15125);e.exports=function(e){return i(e)&&r(e)}},73226:function(e,t,n){e=n.nmd(e);var r=n(37772),i=n(36330),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,s=a&&a.exports===o?r.Buffer:void 0,l=s?s.isBuffer:void 0;e.exports=l||i},18149:function(e,t,n){var r=n(88746);e.exports=function(e,t){return r(e,t)}},61049:function(e,t,n){var r=n(53366),i=n(29259);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},61158:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},4714:function(e,t,n){var r=n(74511),i=n(47826),o=n(4146),a=o&&o.isMap,s=a?i(a):r;e.exports=s},29259:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},15125:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},97030:function(e,t,n){var r=n(53366),i=n(47353),o=n(15125),a=Object.prototype,s=Function.prototype.toString,l=a.hasOwnProperty,u=s.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=r(e))return!1;var t=i(e);if(null===t)return!0;var n=l.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&s.call(n)==u}},43679:function(e,t,n){var r=n(8109),i=n(47826),o=n(4146),a=o&&o.isSet,s=a?i(a):r;e.exports=s},4795:function(e,t,n){var r=n(53366),i=n(15125);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},77598:function(e,t,n){var r=n(35522),i=n(47826),o=n(4146),a=o&&o.isTypedArray,s=a?i(a):r;e.exports=s},90249:function(e,t,n){var r=n(1634),i=n(86411),o=n(67878);e.exports=function(e){return o(e)?r(e):i(e)}},18582:function(e,t,n){var r=n(1634),i=n(18390),o=n(67878);e.exports=function(e){return o(e)?r(e,!0):i(e)}},56974:function(e){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},19950:function(e,t,n){var r=n(13940),i=n(26548),o=n(68286);e.exports=function(e,t){var n={};return t=o(t,3),i(e,function(e,i,o){r(n,t(e,i,o),e)}),n}},34519:function(e,t,n){var r=n(13940),i=n(26548),o=n(68286);e.exports=function(e,t){var n={};return t=o(t,3),i(e,function(e,i,o){r(n,i,t(e,i,o))}),n}},30733:function(e,t,n){var r=n(96738);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},98537:function(e,t,n){var r=n(84565),i=n(97263)(function(e,t,n){r(e,t,n)});e.exports=i},34291:function(e){e.exports=function(){}},61100:function(e,t,n){var r=n(37772);e.exports=function(){return r.Date.now()}},17620:function(e,t,n){var r=n(50343),i=n(18874),o=n(29078),a=n(17297),s=n(752),l=n(48642),u=n(29097),c=n(76939),d=u(function(e,t){var n={};if(null==e)return n;var u=!1;t=r(t,function(t){return t=a(t,e),u||(u=t.length>1),t}),s(e,c(e),n),u&&(n=i(n,7,l));for(var d=t.length;d--;)o(n,t[d]);return n});e.exports=d},65798:function(e,t,n){var r=n(20256),i=n(82952),o=n(21401),a=n(33812);e.exports=function(e){return o(e)?r(a(e)):i(e)}},57370:function(e,t,n){var r=n(34311)(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()});e.exports=r},829:function(e,t,n){var r=n(62034),i=n(23813),o=n(36060),a=n(82406),s=o(function(e,t){if(null==e)return[];var n=t.length;return n>1&&a(e,t[0],t[1])?t=[]:n>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),i(e,r(t,1),[])});e.exports=s},30981:function(e){e.exports=function(){return[]}},36330:function(e){e.exports=function(){return!1}},12436:function(e,t,n){var r=n(54073),i=n(29259);e.exports=function(e,t,n){var o=!0,a=!0;if("function"!=typeof e)throw TypeError("Expected a function");return i(n)&&(o="leading"in n?!!n.leading:o,a="trailing"in n?!!n.trailing:a),r(e,t,{leading:o,maxWait:t,trailing:a})}},61258:function(e,t,n){var r=n(36473),i=n(89419),o=n(38101),a=Math.min;e.exports=function(e,t){if((e=o(e))<1||e>9007199254740991)return[];var n=4294967295,s=a(e,4294967295);t=i(t),e-=4294967295;for(var l=r(s,t);++n"+t.value+""+i[o].show+""+e.value+"",type:10}):r.push({value:(1!=t.type?"(":"")+t.value+(1!=t.type?")":"")+""+e.value+"",type:1})):2===i[o].type||9===i[o].type?(e=r.pop(),t=r.pop(),r.push({value:(1!=t.type?"(":"")+t.value+(1!=t.type?")":"")+i[o].show+(1!=e.type?"(":"")+e.value+(1!=e.type?")":""),type:i[o].type})):12===i[o].type&&(e=r.pop(),t=r.pop(),n=r.pop(),r.push({value:i[o].show+"("+n.value+","+t.value+","+e.value+")",type:12}));return r[0].value},e.exports=r},66655:function(e,t,n){"use strict";var r=n(72346);function i(e,t){for(var n=0;np.length-2?p.length-1:e.length-l;n>0;n--)if(void 0!==p[n])for(i=0;i0&&kn)s.push(e);else{for(;n>=i&&!c||c&&i1)throw new r.Exception("Uncaught Syntax error");return o[0].value>1e15?"Infinity":parseFloat(o[0].value.toFixed(15))},r.eval=function(e,t,n){return void 0===t?this.lex(e).toPostfix().postfixEval():void 0!==n?this.lex(e,t).toPostfix().postfixEval(n):void 0!==t.length?this.lex(e,t).toPostfix().postfixEval():this.lex(e).toPostfix().postfixEval(t)},e.exports=r},38617:function(e,t,n){"use strict";n.d(t,{F:function(){return u},f:function(){return c}});var r=n(2784);let i=["light","dark"],o="(prefers-color-scheme: dark)",a="undefined"==typeof window,s=(0,r.createContext)(void 0),l={setTheme:e=>{},themes:[]},u=()=>{var e;return null!==(e=(0,r.useContext)(s))&&void 0!==e?e:l},c=e=>(0,r.useContext)(s)?r.createElement(r.Fragment,null,e.children):r.createElement(f,e),d=["light","dark"],f=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:a=!0,storageKey:l="theme",themes:u=d,defaultTheme:c=n?"system":"light",attribute:f="data-theme",value:g,children:y,nonce:x})=>{let[b,w]=(0,r.useState)(()=>p(l,c)),[E,j]=(0,r.useState)(()=>p(l)),k=g?Object.values(g):u,S=(0,r.useCallback)(e=>{let r=e;if(!r)return;"system"===e&&n&&(r=v());let o=g?g[r]:r,s=t?m():null,l=document.documentElement;if("class"===f?(l.classList.remove(...k),o&&l.classList.add(o)):o?l.setAttribute(f,o):l.removeAttribute(f),a){let e=i.includes(c)?c:null,t=i.includes(r)?r:e;l.style.colorScheme=t}null==s||s()},[]),_=(0,r.useCallback)(e=>{w(e);try{localStorage.setItem(l,e)}catch(e){}},[e]),O=(0,r.useCallback)(t=>{let r=v(t);j(r),"system"===b&&n&&!e&&S("system")},[b,e]);(0,r.useEffect)(()=>{let e=window.matchMedia(o);return e.addListener(O),O(e),()=>e.removeListener(O)},[O]),(0,r.useEffect)(()=>{let e=e=>{e.key===l&&_(e.newValue||c)};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[_]),(0,r.useEffect)(()=>{S(null!=e?e:b)},[e,b]);let C=(0,r.useMemo)(()=>({theme:b,setTheme:_,forcedTheme:e,resolvedTheme:"system"===b?E:b,themes:n?[...u,"system"]:u,systemTheme:n?E:void 0}),[b,_,e,E,n,u]);return r.createElement(s.Provider,{value:C},r.createElement(h,{forcedTheme:e,disableTransitionOnChange:t,enableSystem:n,enableColorScheme:a,storageKey:l,themes:u,defaultTheme:c,attribute:f,value:g,children:y,attrs:k,nonce:x}),y)},h=(0,r.memo)(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:a,enableColorScheme:s,defaultTheme:l,value:u,attrs:c,nonce:d})=>{let f="system"===l,h="class"===n?`var d=document.documentElement,c=d.classList;c.remove(${c.map(e=>`'${e}'`).join(",")});`:`var d=document.documentElement,n='${n}',s='setAttribute';`,p=s?i.includes(l)&&l?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${l}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",m=(e,t=!1,r=!0)=>{let o=u?u[e]:e,a=t?e+"|| ''":`'${o}'`,l="";return s&&r&&!t&&i.includes(e)&&(l+=`d.style.colorScheme = '${e}';`),"class"===n?l+=t||o?`c.add(${a})`:"null":o&&(l+=`d[s](n,${a})`),l},v=e?`!function(){${h}${m(e)}}()`:a?`!function(){try{${h}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${f})){var t='${o}',m=window.matchMedia(t);if(m.media!==t||m.matches){${m("dark")}}else{${m("light")}}}else if(e){${u?`var x=${JSON.stringify(u)};`:""}${m(u?"x[e]":"e",!0)}}${f?"":"else{"+m(l,!1,!1)+"}"}${p}}catch(e){}}()`:`!function(){try{${h}var e=localStorage.getItem('${t}');if(e){${u?`var x=${JSON.stringify(u)};`:""}${m(u?"x[e]":"e",!0)}}else{${m(l,!1,!1)};}${p}}catch(t){}}();`;return r.createElement("script",{nonce:d,dangerouslySetInnerHTML:{__html:v}})},()=>!0),p=(e,t)=>{let n;if(!a){try{n=localStorage.getItem(e)||void 0}catch(e){}return n||t}},m=()=>{let e=document.createElement("style");return e.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(e)},1)}},v=e=>(e||(e=window.matchMedia(o)),e.matches?"dark":"light")},86570:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return n(76133)}])},4941:function(e,t,n){"use strict";n.d(t,{Ul:function(){return s},WD:function(){return l},fu:function(){return c},o4:function(){return u}});var r=n(52322),i=n(97096),o=n(82851),a=n(99182);function s(e){let{currentPage:t,parentPage:n,commandPage:s,className:l,...u}=e,c=(0,a.U8)(e=>e.search);if((null==n?void 0:n.namespace)===(null==t?void 0:t.namespace)&&!c)return(0,r.jsx)(a.mY.Item,{className:(0,o.cx)((0,i.Vkc)(),"group",l),value:"".concat(null==s?void 0:s.label," ").concat(u.children.toString()),...u})}function l(e){let{currentPage:t,commandPage:n,className:s,...l}=e,u=(0,a.U8)(e=>e.search),c=n.namespace.startsWith((null==t?void 0:t.namespace)||"");if(u&&c||n.namespace===(null==t?void 0:t.namespace))return(0,r.jsx)(a.mY.Item,{className:(0,o.cx)((0,i.Vkc)(),"group",s),value:"".concat(n.label," ").concat(l.children.toString()),...l})}function u(e){let{currentPage:t,commandPage:n,className:s,...l}=e,u=(0,a.U8)(e=>e.search),c=n.namespace.startsWith((null==t?void 0:t.namespace)||"");if(u&&c||!t||n.namespace===(null==t?void 0:t.namespace))return(0,r.jsx)(a.mY.Item,{className:(0,o.cx)((0,i.Vkc)(),"group",s),value:"".concat(n.label," ").concat(l.children.toString()),...l})}function c(e){let{heading:t,currentPage:n,commandPage:o,...s}=e,l=(0,a.U8)(e=>e.search);return(0,r.jsx)(a.mY.Group,{heading:l&&(null==n?void 0:n.namespace)!==o.namespace&&(0,r.jsx)(i.__J,{className:"px-1",size:"12",children:o.label}),...s})}n(2784)},3639:function(e,t,n){"use strict";n.d(t,{F:function(){return y}});var r=n(52322),i=n(4941);let o={namespace:"contracts/filterStatus",label:"Contracts filter by status"},a=[{id:"filterStatusActive",value:"active",label:"Contract is active"},{id:"filterStatusSuccessful",value:"successful",label:"Contract was successful"},{id:"filterStatusPending",value:"pending",label:"Contract is pending"},{id:"filterStatusRejected",value:"rejected",label:"Contract was rejected"},{id:"filterStatusFailed",value:"failed",label:"Contract has failed"}];function s(e){let{select:t,currentPage:n}=e;return(0,r.jsx)(i.fu,{currentPage:n,commandPage:o,children:a.map(e=>(0,r.jsx)(i.WD,{currentPage:n,commandPage:o,onSelect:()=>{t(e)},children:e.label},e.id+e.value))})}var l=n(22515),u=n(734);let c={namespace:"contracts/filterAddress",label:"Contracts filter by ID"};function d(e){let{select:t,currentPage:n}=e,{openDialog:o}=(0,l.Rh)(),a=(0,u.O)("");return(0,r.jsx)(i.fu,{currentPage:n,commandPage:c,children:(0,r.jsx)(i.WD,{currentPage:n,commandPage:c,onSelect:()=>{t(),o("contractsFilterContractId")},children:a.label})})}function f(e){let{select:t,currentPage:n,parentPage:o,commandPage:a}=e,{openDialog:s}=(0,l.Rh)();return(0,r.jsx)(i.Ul,{currentPage:n,parentPage:o,commandPage:a,onSelect:()=>{t(),s("contractsFilterContractId")},children:c.label})}function h(e){let{currentPage:t,select:n}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s,{currentPage:t,select:n}),(0,r.jsx)(d,{currentPage:t,select:n})]})}let p={namespace:"contracts",label:"Contracts"};function m(e){let{currentPage:t,parentPage:n,pushPage:a,select:s}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ul,{currentPage:t,parentPage:n,commandPage:p,onSelect:()=>{a(o)},children:o.label}),(0,r.jsx)(f,{currentPage:t,parentPage:n,commandPage:p,select:s})]})}var v=n(92838),g=n(2784);function y(e){let{currentPage:t,parentPage:n,pushPage:i,beforeSelect:o,afterSelect:a}=e,{setFilter:s}=(0,v.G)(),l=(0,g.useCallback)(e=>{o&&o(),e&&s(e),a&&a()},[s,o,a]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(m,{parentPage:n,currentPage:t,pushPage:i,select:l}),(0,r.jsx)(h,{currentPage:t,select:l})]})}},71930:function(e,t,n){"use strict";n.d(t,{_:function(){return i},h:function(){return o}});var r=n(27444);let i={home:"/",volumes:{index:"/volumes"},contracts:{index:"/contracts"},config:{index:"/config",host:"/config#host",pricing:"/config#pricing",dns:"/config#dns",bandwidth:"/config#bandwidth",registry:"/config#registry",accounts:"/config#accounts"},wallet:{view:"/wallet"},node:{index:"/node",txPool:"/node/txpool",peers:"/node/peers"},login:"/login"},o=r.dk},99957:function(e,t,n){"use strict";n.d(t,{iV:function(){return w},ZR:function(){return b}});var r=n(52322),i=n(2784),o=n(97096),a=n(27444);let s=[{value:"",label:"Off"},{value:"route53",label:"Route 53"},{value:"noip",label:"No-IP"},{value:"duckdns",label:"Duck DNS"},{value:"cloudflare",label:"Cloudflare"}],l={acceptingContracts:!1,netAddress:"",maxContractDuration:void 0,contractPrice:void 0,baseRPCPrice:void 0,sectorAccessPrice:void 0,collateralMultiplier:void 0,maxCollateral:void 0,storagePrice:void 0,egressPrice:void 0,ingressPrice:void 0,priceTableValidity:void 0,maxRegistryEntries:void 0,accountExpiry:void 0,maxAccountBalance:void 0,ingressLimit:void 0,egressLimit:void 0,dnsProvider:"",dnsIpv4:!1,dnsIpv6:!1,dnsDuckDnsToken:"",dnsNoIpEmail:"",dnsNoIpPassword:"",dnsAwsId:"",dnsAwsSecret:"",dnsAwsZoneId:"",dnsCloudflareToken:"",dnsCloudflareZoneId:""};var u=n(25205),c=n(6391),d=n.n(c),f=n(94977);function h(e,t){return new(d())(12960).times(e).div((0,u.S5)(1)).times(t)}function p(e,t){return t?new(d())(new(d())(e).div(t.sc.usd).div(10).toFixed(0)).times(10):void 0}var m=n(63955),v=n(92762),g=n(95753),y=n(47025);let x=(0,i.createContext)({}),b=()=>(0,i.useContext)(x);function w(e){let{children:t}=e,n=function(){let e=(0,a.rV)({standalone:"configSettingsForm",config:{swr:{refreshInterval:(0,o.sWj)(1)}}}),t=(0,a.Te)(),n=(0,a.uo)({disabled:!e.data||!e.data.ddns.provider,config:{swr:{revalidateOnFocus:!1,errorRetryCount:0}}}),[c,x]=(0,v.Z)("v0/config/showAdvanced",{defaultValue:!1}),b=(0,m.cI)({mode:"all",defaultValues:l}),w=b.watch("storagePrice"),E=b.watch("collateralMultiplier"),j=(0,i.useCallback)(e=>{let t;let n=(t=null,"duckdns"===e.ddns.provider&&(t={dnsDuckDnsToken:e.ddns.options.token}),"noip"===e.ddns.provider&&(t={dnsNoIpEmail:e.ddns.options.email,dnsNoIpPassword:e.ddns.options.password}),"route53"===e.ddns.provider&&(t={dnsAwsId:e.ddns.options.id,dnsAwsSecret:e.ddns.options.secret,dnsAwsZoneId:e.ddns.options.zoneID}),"cloudflare"===e.ddns.provider&&(t={dnsCloudflareToken:e.ddns.options.token,dnsCloudflareZoneId:e.ddns.options.zoneID}),{acceptingContracts:e.acceptingContracts,netAddress:e.netAddress,maxContractDuration:new(d())(e.maxContractDuration).div((0,u.S5)(1)),contractPrice:(0,u.ll)(e.contractPrice,6),baseRPCPrice:(0,u.ll)((0,f.sS)(e.baseRPCPrice),6),sectorAccessPrice:(0,u.ll)((0,f.nS)(e.sectorAccessPrice),6),collateralMultiplier:new(d())(e.collateralMultiplier),maxCollateral:(0,u.ll)(e.maxCollateral,6),storagePrice:(0,u.ll)((0,f.SY)(e.storagePrice),6),egressPrice:(0,u.ll)((0,f.B1)(e.egressPrice),6),ingressPrice:(0,u.ll)((0,f.dK)(e.ingressPrice),6),priceTableValidity:new(d())(e.priceTableValidity).div(1e9).div(60),maxRegistryEntries:new(d())(e.maxRegistryEntries),accountExpiry:new(d())(e.accountExpiry).div(1e9).div(86400),maxAccountBalance:(0,u.ll)(e.maxAccountBalance,6),ingressLimit:(0,u.BT)(new(d())(e.ingressLimit)),egressLimit:(0,u.BT)(new(d())(e.egressLimit)),dnsProvider:e.ddns.provider,dnsIpv4:e.ddns.ipv4,dnsIpv6:e.ddns.ipv6,...t});return b.reset(n),n},[b]),k=(0,i.useMemo)(()=>[e.data],[e.data]),S=(0,i.useCallback)(()=>e.data?j(e.data):null,[j,e.data]),[_,O]=(0,i.useState)(!1);(0,i.useEffect)(()=>{if(!_){let e=S();e&&O(!0)}},[_,S]);let C=(0,i.useCallback)(async()=>{let t=await e.mutate();t?(j(t),await n.mutate()):(0,o.OHV)("Error fetching settings.")},[e,j,n]),M=(0,i.useCallback)(async n=>{if(e.data)try{var r;let i;let a={};c||(a.maxCollateral=h(n.storagePrice,n.collateralMultiplier));let s={...n,...a},l=await t.patch({payload:(r=e.data,i=null,"duckdns"===s.dnsProvider&&(i={token:s.dnsDuckDnsToken}),"noip"===s.dnsProvider&&(i={email:s.dnsNoIpEmail,password:s.dnsNoIpPassword}),"route53"===s.dnsProvider&&(i={id:s.dnsAwsId,secret:s.dnsAwsSecret,zoneID:s.dnsAwsZoneId}),"cloudflare"===s.dnsProvider&&(i={token:s.dnsCloudflareToken,zoneID:s.dnsCloudflareZoneId}),{...r,acceptingContracts:s.acceptingContracts,netAddress:s.netAddress,maxContractDuration:Number(s.maxContractDuration.times((0,u.S5)(1)).toFixed(0)),contractPrice:(0,u.qN)(s.contractPrice).toString(),baseRPCPrice:s.baseRPCPrice.div((0,u.ll)((0,f.sS)(1))).toFixed(0),sectorAccessPrice:s.sectorAccessPrice.div((0,u.ll)((0,f.nS)(1))).toFixed(0),collateralMultiplier:s.collateralMultiplier.toNumber(),maxCollateral:(0,u.qN)(s.maxCollateral).toString(),storagePrice:s.storagePrice.div((0,u.ll)((0,f.SY)(1))).toFixed(0),egressPrice:s.egressPrice.div((0,u.ll)((0,f.B1)(1))).toFixed(0),ingressPrice:s.ingressPrice.div((0,u.ll)((0,f.dK)(1))).toFixed(0),priceTableValidity:Number(s.priceTableValidity.times(60).times(1e9).toFixed(0)),maxRegistryEntries:Number(s.maxRegistryEntries.toFixed(0)),accountExpiry:Number(s.accountExpiry.times(86400).times(1e9).toFixed(0)),maxAccountBalance:(0,u.qN)(s.maxAccountBalance).toString(),ingressLimit:Number((0,u.Y)(s.ingressLimit).toFixed(0)),egressLimit:Number((0,u.Y)(s.egressLimit).toFixed(0)),ddns:{...null==r?void 0:r.ddns,provider:s.dnsProvider,ipv4:s.dnsIpv4,ipv6:s.dnsIpv6,options:i}})});if(l.error)throw Error(l.error);b.formState.dirtyFields.netAddress?(0,o.OPV)("Settings have been saved. Address has changed, make sure to re-announce the host.",{duration:2e4}):(0,o.OPV)("Settings have been saved."),await C()}catch(e){(0,o.OHV)(e.message),console.log(e)}},[b,c,e,t,C]),A=(0,y.BW)(),T=(0,i.useMemo)(()=>{var e;return function(e){let{showAdvanced:t,storageTBMonth:n,collateralMultiplier:i,rates:o}=e;return{acceptingContracts:{type:"boolean",category:"host",title:"Accepting contracts",description:(0,r.jsx)(r.Fragment,{children:"Whether or not the host is accepting contracts."}),validation:{}},netAddress:{type:"text",category:"host",title:"Address",description:(0,r.jsx)(r.Fragment,{children:"The network address of the host."}),placeholder:"my.host.com:9882",validation:{required:"required"}},maxContractDuration:{type:"number",category:"host",title:"Maximum contract duration",units:"months",decimalsLimit:2,suggestion:new(d())(6),suggestionTip:"The default maximum duration is 6 months.",description:(0,r.jsx)(r.Fragment,{children:"The maximum contract duration that the host will accept."}),hidden:!t,validation:{required:"required",validate:{min:e=>new(d())(e).gte((0,u.E6)(4320))||"must be at least 1 month"}}},storagePrice:{title:"Storage price",type:"siacoin",category:"pricing",units:"SC/TB/month",decimalsLimitSc:6,suggestion:o?p(1,o):void 0,suggestionTip:"The suggested storage price in siacoins per TB per month.",description:(0,r.jsx)(r.Fragment,{children:"The host's storage price in siacoins per TB per month."}),validation:{required:"required"}},egressPrice:{title:"Egress price",type:"siacoin",category:"pricing",units:"SC/TB",decimalsLimitSc:6,suggestion:o?p(10,o):void 0,suggestionTip:"The suggested egress price in siacoins for egress per TB.",description:(0,r.jsx)(r.Fragment,{children:"The host's egress price in siacoins per TB."}),validation:{required:"required"}},ingressPrice:{title:"Ingress price",type:"siacoin",category:"pricing",units:"SC/TB",suggestion:o?p(.05,o):void 0,suggestionTip:"The suggested ingress price in siacoins per TB.",decimalsLimitSc:6,description:(0,r.jsx)(r.Fragment,{children:"The host's ingress price in siacoins per TB."}),validation:{required:"required"}},collateralMultiplier:{title:"Collateral multiplier",type:"number",category:"pricing",units:"* storage price",placeholder:"2",decimalsLimit:1,description:(0,r.jsx)(r.Fragment,{children:"The host's target collateral as a multiple of storage price."}),suggestion:new(d())(2),suggestionTip:"The default multiplier is 2x the storage price.",validation:{required:"required"}},maxCollateral:{title:"Maximum collateral",type:"siacoin",category:"pricing",decimalsLimitSc:6,suggestion:n&&i?h(n,i):void 0,suggestionTip:"The suggested maximum collateral.",description:(0,r.jsx)(r.Fragment,{children:"The host's maximum collateral in siacoins."}),hidden:!t,validation:{required:"required"}},contractPrice:{title:"Contract price",type:"siacoin",category:"pricing",decimalsLimitSc:6,suggestionTip:"The suggested contract price.",tipsDecimalsLimitSc:1,suggestion:new(d())(.2),description:(0,r.jsx)(r.Fragment,{children:"The host's contract price in siacoins."}),hidden:!t,validation:{required:"required"}},baseRPCPrice:{title:"Base RPC price",type:"siacoin",category:"pricing",units:"SC/million",suggestion:new(d())(1),suggestionTip:"The suggested base RPC price in siacoins per million calls.",decimalsLimitSc:6,description:(0,r.jsx)(r.Fragment,{children:"The host's base RPC price in siacoins per million calls."}),hidden:!t,validation:{required:"required"}},sectorAccessPrice:{title:"Sector access price",type:"siacoin",category:"pricing",units:"SC/million",decimalsLimitSc:6,suggestion:new(d())(1),suggestionTip:"The suggested sector access price in siacoins per million sectors.",description:(0,r.jsx)(r.Fragment,{children:"The host's sector access price in siacoins per million sectors."}),hidden:!t,validation:{required:"required"}},priceTableValidity:{title:"Price table validity",type:"number",category:"pricing",units:"minutes",suggestion:new(d())(30),suggestionTip:"The suggested price table validity.",description:(0,r.jsx)(r.Fragment,{children:"How long a renter's registered price table remains valid."}),hidden:!t,validation:{required:"required"}},maxRegistryEntries:{title:"Maximum registry size",type:"number",category:"registry",units:"entries",suggestion:new(d())(1e3),suggestionTip:"The suggested maximum registry size.",decimalsLimit:0,description:(0,r.jsx)(r.Fragment,{children:"The maximum number of registry entries that the host will store. Each registry entry is up to 113 bytes."}),hidden:!t,validation:{required:"required"}},accountExpiry:{title:"Expiry",type:"number",category:"RHP3",units:"days",suggestion:new(d())(30),suggestionTip:"The suggested account expiry.",description:(0,r.jsx)(r.Fragment,{children:"How long a renter's ephemeral accounts are inactive before the host prunes them and recovers the remaining funds."}),hidden:!t,validation:{required:"required",validate:{min:e=>new(d())(e).gte(7)||"must be at least 1 week"}}},maxAccountBalance:{title:"Maximum balance",type:"siacoin",category:"RHP3",suggestion:new(d())(10),suggestionTip:"The suggested maximum account balance.",description:(0,r.jsx)(r.Fragment,{children:"Maximum balance a renter's ephemeral account can have. When the limit is reached, deposits are rejected until some of the funds have been spent."}),hidden:!t,validation:{required:"required",validate:{min:e=>new(d())(e).gte(1)||"must be at least 1 SC"}}},ingressLimit:{title:"Ingress limit",type:"number",category:"bandwidth",units:"MB/second",description:(0,r.jsx)(r.Fragment,{children:"The maximum amount of ingress bandwidth traffic in MB per second."}),validation:{required:"required"}},egressLimit:{title:"Egress limit",type:"number",category:"bandwidth",units:"MB/second",description:(0,r.jsx)(r.Fragment,{children:"The maximum amount of egress bandwidth traffic in MB per second."}),validation:{required:"required"}},dnsProvider:{title:"Dynamic DNS Provider",type:"select",category:"DNS",options:s,description:(0,r.jsx)(r.Fragment,{children:"Enable dynamic DNS with one of the supported providers."}),validation:{validate:e=>!!s.find(t=>t.value===e)||"must be one of supported providers"}},dnsIpv4:{title:"IPv4",type:"boolean",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"Whether IPv4 is enabled."}),show:e=>!!e.dnsProvider,validation:{validate:(e,t)=>!t.dnsProvider||!!(e||t.dnsIpv6)||"at least one of IPv4 and IPv6 must be enabled"},trigger:["dnsIpv6"]},dnsIpv6:{type:"boolean",title:"IPv6",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"Whether IPv6 is enabled."}),show:e=>!!e.dnsProvider,validation:{validate:(e,t)=>!t.dnsProvider||!!(e||t.dnsIpv4)||"at least one of IPv4 and IPv6 must be enabled"},trigger:["dnsIpv4"]},dnsDuckDnsToken:{type:"text",title:"Token",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"DuckDNS token."}),show:e=>"duckdns"===e.dnsProvider,validation:{validate:(e,t)=>"duckdns"!==t.dnsProvider||!!e||"required"}},dnsNoIpEmail:{type:"text",title:"Email",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"No-IP email."}),show:e=>"noip"===e.dnsProvider,validation:{validate:(e,t)=>"noip"!==t.dnsProvider||!!e||"required"}},dnsNoIpPassword:{type:"password",title:"Password",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"No-IP password."}),show:e=>"noip"===e.dnsProvider,validation:{validate:(e,t)=>"noip"!==t.dnsProvider||!!e||"required"}},dnsAwsId:{type:"text",title:"ID",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"AWS Route53 ID."}),show:e=>"route53"===e.dnsProvider,validation:{validate:(e,t)=>"route53"!==t.dnsProvider||!!e||"required"}},dnsAwsSecret:{type:"password",title:"Secret",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"AWS Route53 secret."}),show:e=>"route53"===e.dnsProvider,validation:{validate:(e,t)=>"route53"!==t.dnsProvider||!!e||"required"}},dnsAwsZoneId:{type:"text",title:"Zone ID",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"AWS Route53 zone ID."}),show:e=>"route53"===e.dnsProvider,validation:{validate:(e,t)=>"route53"!==t.dnsProvider||!!e||"required"}},dnsCloudflareToken:{type:"text",title:"Token",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"Cloudflare token."}),show:e=>"cloudflare"===e.dnsProvider,validation:{validate:(e,t)=>"cloudflare"!==t.dnsProvider||!!e||"required"}},dnsCloudflareZoneId:{type:"text",title:"Zone ID",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"Cloudflare zone ID."}),show:e=>"cloudflare"===e.dnsProvider,validation:{validate:(e,t)=>"cloudflare"!==t.dnsProvider||!!e||"required"}}}}({showAdvanced:c,storageTBMonth:w,collateralMultiplier:E,rates:null===(e=A.data)||void 0===e?void 0:e.rates})},[c,w,E,A.data]),P=(0,o.WsO)(T),N=(0,i.useMemo)(()=>b.handleSubmit(M,P),[b,M,P]),R=(0,i.useCallback)(()=>{let e=b.getValues(),t=S();if(t)for(let[n,r]of(b.reset(t),Object.entries(e)))b.setValue(n,r,{shouldDirty:!0})},[b,S]),{isUnlockedAndAuthedRoute:D}=(0,g.Hv)();(0,i.useEffect)(()=>{D&&C()},[D]),(0,i.useEffect)(()=>{b.formState.isSubmitting||R()},[b,c,k]);let L=Object.entries(b.formState.dirtyFields).filter(e=>{let[t,n]=e;return!!n}).length;return{fields:T,settings:e,dynDNSCheck:n,changeCount:L,revalidateAndResetFormData:C,form:b,onSubmit:N,showAdvanced:c,setShowAdvanced:x}}();return(0,r.jsx)(x.Provider,{value:n,children:t})}},92838:function(e,t,n){"use strict";n.d(t,{x:function(){return b},G:function(){return x}});var r=n(52322),i=n(97096),o=n(5632),a=n(27444),s=n(2784),l=n(56860),u=n(41775),c=n(25205),d=n(22515);function f(e){let{id:t,status:n,contentProps:o,buttonProps:l}=e,c=(0,a.kr)(),{openDialog:f}=(0,d.Rh)(),h=(0,s.useCallback)(async()=>{let e=await c.put({params:{id:t}});e.error?(0,i.OHV)(e.error):(0,i.OPV)((0,r.jsxs)(r.Fragment,{children:["Integrity check successfully started, depending on contract data size this operation can take a while. Check ",(0,r.jsx)(i.EKh,{children:"hostd"})," ",(0,r.jsx)(i.rUS,{onClick:()=>f("alerts"),children:"alerts"})," for status updates."]}),{duration:12e3})},[t,c,f]),p=["active","pending"].includes(n);return(0,r.jsxs)(i.h_2,{trigger:(0,r.jsx)(i.zxk,{variant:"ghost",icon:"hover",...l,children:(0,r.jsx)(u.iG7,{})}),contentProps:{align:"start",...o},children:[(0,r.jsx)("div",{className:"px-1.5 py-1",children:(0,r.jsxs)(i.xvT,{size:"14",weight:"medium",color:"subtle",children:["Contract ",t.slice(0,24),"..."]})}),(0,r.jsx)(i.Juw,{children:"Actions"}),(0,r.jsx)(i.ua7,{content:p?"Trigger a data integrity check":"Data integrity check only available for active or pending contracts",children:(0,r.jsx)("div",{children:(0,r.jsxs)(i.Xiv,{disabled:!p,onSelect:()=>h(),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(u.dDl,{})}),"Integrity check"]})})})]})}let h=[{id:"actions",label:"",fixed:!0,cellClassName:"w-[50px] !pl-2 !pr-4 [&+*]:!pl-0",render:e=>{let{data:{id:t,status:n}}=e;return(0,r.jsx)(f,{id:t,status:n})}},{id:"contractId",label:"contract ID",category:"general",render:e=>{let{data:t,context:n}=e,{id:o,renewedFrom:a,isRenewedFrom:s,renewedTo:l,isRenewedTo:c}=t;return(0,r.jsxs)("div",{className:"flex flex-col gap-1 w-full",children:[(0,r.jsx)(i.XxW,{size:"12",value:(0,i.I13)(o),type:"contract",siascanUrl:n.siascanUrl}),s&&(0,r.jsx)(i.ua7,{content:"Renewed from",align:"start",children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(i.xvT,{color:"subtle",children:(0,r.jsx)(u.L6f,{className:"scale-75"})}),(0,r.jsx)(i.XxW,{color:"subtle",size:"10",type:"contract",value:(0,i.I13)(a),siascanUrl:n.siascanUrl})]})}),c&&(0,r.jsx)(i.ua7,{content:"Renewed to",align:"start",children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(i.xvT,{color:"subtle",children:(0,r.jsx)(u.IRm,{className:"scale-75"})}),(0,r.jsx)(i.XxW,{color:"subtle",size:"10",value:(0,i.I13)(l),type:"contract",siascanUrl:n.siascanUrl})]})})]})}},{id:"status",label:"status",category:"general",render:e=>{let{data:{status:t}}=e;return(0,r.jsx)(i.Cts,{variant:"active"===t?"amber":"failed"===t?"red":"pending"===t?"amber":"rejected"===t?"red":"successful"===t?"green":void 0,children:t})}},{id:"timeline",label:"timeline",category:"time",render:e=>{let{data:t,context:{currentHeight:n,contractsTimeRange:o}}=e,{contractHeightStart:a,contractHeightEnd:s,revision:l,status:u}=t;return(0,r.jsx)("div",{className:"w-[400px]",children:(0,r.jsx)(i.TaT,{currentHeight:n,contractHeightStart:a,contractHeightEnd:"rejected"===u?void 0:s,proofWindowHeightStart:"rejected"===u?void 0:l.windowStart,proofWindowHeightEnd:"rejected"===u?void 0:l.windowEnd,range:o})})}},{id:"contractHeightStart",label:"start date",category:"time",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{contractHeightStart:t},context:{currentHeight:n}}=e;return(0,r.jsx)(i.xvT,{size:"12",children:(0,c.rN)((0,c.jr)(n,t))})}},{id:"contractHeightEnd",label:"expiration date",category:"time",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{contractHeightEnd:t},context:{currentHeight:n}}=e;return(0,r.jsx)(i.xvT,{size:"12",children:(0,c.rN)((0,c.jr)(n,t))})}},{id:"payoutHeight",label:"payout date",category:"time",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{payoutHeight:t},context:{currentHeight:n}}=e;return(0,r.jsx)(i.xvT,{size:"12",children:(0,c.rN)((0,c.jr)(n,t))})}},{id:"filesize",label:"data size",category:"general",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{revision:{filesize:t}}}=e;return(0,r.jsx)(i.m2c,{size:"12",value:t,variant:"value",format:e=>(0,c.vW)(e.toNumber())})}},{id:"fileMerkleRoot",label:"merkle root",category:"general",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{revision:{fileMerkleRoot:t}}}=e;return(0,r.jsx)(i.XxW,{size:"12",value:(0,i.I13)(t)})}},{id:"payout",label:"payout",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{revision:t}}=e;return(0,r.jsx)(i.ho9,{displayBoth:!0,size:"12",value:t.payout})}},{id:"remainingRenterFunds",label:"remaining renter funds",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{revision:t}}=e;return(0,r.jsx)(i.ho9,{displayBoth:!0,size:"12",value:t.remainingRenterFunds})}},{id:"lockedCollateral",label:"locked collateral",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{lockedCollateral:t}}=e;return(0,r.jsx)(i.ho9,{displayBoth:!0,size:"12",value:t})}},{id:"usageRiskedCollateral",label:"risked collateral",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{usage:t}}=e;return(0,r.jsx)(i.ho9,{displayBoth:!0,size:"12",value:t.riskedCollateral})}},{id:"usageTotal",label:"total usage",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{usage:t}}=e;return(0,r.jsx)(i.ho9,{displayBoth:!0,size:"12",value:t.total})}},{id:"usageStorage",label:"storage usage",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{usage:t}}=e;return(0,r.jsx)(i.ho9,{displayBoth:!0,size:"12",value:t.storage})}},{id:"usageIngress",label:"ingress usage",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{usage:t}}=e;return(0,r.jsx)(i.ho9,{displayBoth:!0,size:"12",value:t.ingress})}},{id:"usageEgress",label:"egress usage",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{usage:t}}=e;return(0,r.jsx)(i.ho9,{displayBoth:!0,size:"12",value:t.egress})}},{id:"usageAccountFunding",label:"account funding usage",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{usage:t}}=e;return(0,r.jsx)(i.ho9,{displayBoth:!0,size:"12",value:t.accountFunding})}},{id:"usageRpc",label:"RPC usage",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{usage:t}}=e;return(0,r.jsx)(i.ho9,{displayBoth:!0,size:"12",value:t.rpc})}}].map(e=>({...e,..."financial"===e.category?{icon:(0,r.jsx)(u.dZ8,{className:"relative opacity-50 scale-75"}),label:e.label,tip:"financial: ".concat(e.label)}:{label:e.label,tip:e.label}}));var p=n(6391),m=n.n(p),v=n(25573),g=n(90089);let y=(0,s.createContext)({}),x=()=>(0,s.useContext)(y);function b(e){let{children:t}=e,n=function(){var e,t;let n=(0,o.useRouter)(),r=Number(n.query.limit||50),u=Number(n.query.offset||0),{filters:c,setFilter:d,removeFilter:f,removeLastFilter:p,resetFilters:y}=(0,i.Uu5)(),{configurableColumns:x,enabledColumns:b,sortableColumns:w,toggleColumnVisibility:E,setColumnsVisible:j,setColumnsHidden:k,toggleSort:S,setSortDirection:_,setSortField:O,sortField:C,sortDirection:M,resetDefaultColumnVisibility:A}=(0,i.oy6)("hostd/v0/contracts",{columns:h,columnsDefaultVisible:l.gd,sortOptions:l.Fo,defaultSortField:l.nw}),T=(0,a.GP)({payload:{limit:r,offset:u,sortField:null===(e=l.Fo.find(e=>e.id===C))||void 0===e?void 0:e.value,sortDesc:"desc"===M,contractIDs:c.filter(e=>"filterContractId"===e.id).map(e=>e.value),statuses:c.filter(e=>e.id.startsWith("filterStatus")).map(e=>e.value)},config:{swr:{refreshInterval:(0,i.XBW)(60)}}}),P=function(e){let{response:t}=e;return(0,s.useMemo)(()=>{var e;return t.data?(null===(e=t.data.contracts)||void 0===e?void 0:e.map(e=>(function(e){var t;let n=new(m())(e.usage.accountFunding||0),r=new(m())(e.usage.egress||0),i=new(m())(e.usage.ingress||0),o=new(m())(e.usage.riskedCollateral||0),a=new(m())(e.usage.rpc||0),s=new(m())(e.usage.storage||0),l=n.plus(r).plus(i).plus(a).plus(s),u=e.resolutionHeight>0?e.resolutionHeight+144:e.revision.windowEnd+144;return{id:e.revision.parentID,revision:{parentID:e.revision.parentID,unlockConditions:e.revision.unlockConditions,filesize:new(m())(e.revision.filesize||0),fileMerkleRoot:e.revision.fileMerkleRoot,windowStart:e.revision.windowStart,windowEnd:e.revision.windowEnd,payout:new(m())("active"==e.status||e.resolutionHeight>0?e.revision.validProofOutputs[1].value:e.revision.missedProofOutputs[1].value),remainingRenterFunds:new(m())((null===(t=e.revision.validProofOutputs)||void 0===t?void 0:t[0].value)||0),validProofOutputs:e.revision.validProofOutputs,missedProofOutputs:e.revision.missedProofOutputs,unlockHash:e.revision.unlockHash,revisionNumber:e.revision.revisionNumber},usage:{total:l,accountFunding:n,egress:r,ingress:i,riskedCollateral:o,rpc:a,storage:s},lockedCollateral:new(m())(e.lockedCollateral||0),hostSignature:e.hostSignature,renterSignature:e.renterSignature,status:e.status,negotiationHeight:e.negotiationHeight,formationConfirmed:e.formationConfirmed,revisionConfirmed:e.revisionConfirmed,resolutionHeight:e.resolutionHeight,payoutHeight:u,contractHeightStart:e.negotiationHeight,contractHeightEnd:e.revision.windowStart,renewedTo:e.renewedTo,renewedFrom:e.renewedFrom,isRenewedFrom:"fcid:0000000000000000000000000000000000000000000000000000000000000000"!==e.renewedFrom,isRenewedTo:"fcid:0000000000000000000000000000000000000000000000000000000000000000"!==e.renewedTo}})(e)))||[]:null},[t.data])}({response:T}),N=(0,s.useMemo)(()=>h.filter(e=>b.includes(e.id)),[b]),R=T.isValidating,D=T.error,L=(0,i.c2j)(P,R,D,c),{estimatedBlockHeight:F,isSynced:V,nodeBlockHeight:z}=(0,v.n)(),I=V?z:F,{range:Z}=(0,s.useMemo)(()=>(0,i.EJC)(I,P||[]),[I,P]),B=(0,g.B)(),H=(0,s.useMemo)(()=>({contractsTimeRange:Z,currentHeight:I,siascanUrl:B}),[Z,I,B]);return{dataState:L,offset:u,limit:r,cellContext:H,pageCount:(null==P?void 0:P.length)||0,totalCount:null===(t=T.data)||void 0===t?void 0:t.count,columns:N,dataset:P,configurableColumns:x,enabledColumns:b,sortableColumns:w,toggleColumnVisibility:E,setColumnsVisible:j,setColumnsHidden:k,toggleSort:S,setSortDirection:_,setSortField:O,sortField:C,sortDirection:M,resetDefaultColumnVisibility:A,filters:c,setFilter:d,removeFilter:f,removeLastFilter:p,resetFilters:y}}();return(0,r.jsx)(y.Provider,{value:n,children:t})}},56860:function(e,t,n){"use strict";n.d(t,{Fo:function(){return i},gd:function(){return r},nw:function(){return o}});let r=["contractId","status","usageTotal","lockedCollateral","timeline"],i=[{id:"status",value:"status",label:"status",category:"general"},{id:"timeline",value:"negotiationHeight",label:"timeline",category:"time"},{id:"contractHeightStart",value:"negotiationHeight",label:"start height",category:"time"},{id:"contractHeightEnd",value:"expirationHeight",label:"expiration height",category:"time"}],o="timeline"},22515:function(e,t,n){"use strict";n.d(t,{Tu:function(){return ev},xQ:function(){return eg},Rh:function(){return em}});var r=n(52322),i=n(2784),o=n(97096),a=n(27444),s=n(25205),l=n(63955);function u(e,t,n){var r=this,o=(0,i.useRef)(null),a=(0,i.useRef)(0),s=(0,i.useRef)(null),l=(0,i.useRef)([]),u=(0,i.useRef)(),c=(0,i.useRef)(),d=(0,i.useRef)(e),f=(0,i.useRef)(!0);(0,i.useEffect)(function(){d.current=e},[e]);var h=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw TypeError("Expected a function");t=+t||0;var p=!!(n=n||{}).leading,m=!("trailing"in n)||!!n.trailing,v="maxWait"in n,g=v?Math.max(+n.maxWait||0,t):null;return(0,i.useEffect)(function(){return f.current=!0,function(){f.current=!1}},[]),(0,i.useMemo)(function(){var e=function(e){var t=l.current,n=u.current;return l.current=u.current=null,a.current=e,c.current=d.current.apply(n,t)},n=function(e,t){h&&cancelAnimationFrame(s.current),s.current=h?requestAnimationFrame(e):setTimeout(e,t)},i=function(e){if(!f.current)return!1;var n=e-o.current;return!o.current||n>=t||n<0||v&&e-a.current>=g},y=function(t){return s.current=null,m&&l.current?e(t):(l.current=u.current=null,c.current)},x=function e(){var r=Date.now();if(i(r))return y(r);if(f.current){var s=t-(r-o.current);n(e,v?Math.min(s,g-(r-a.current)):s)}},b=function(){var d=Date.now(),h=i(d);if(l.current=[].slice.call(arguments),u.current=r,o.current=d,h){if(!s.current&&f.current)return a.current=o.current,n(x,t),p?e(o.current):c.current;if(v)return n(x,t),e(o.current)}return s.current||n(x,t),c.current};return b.cancel=function(){s.current&&(h?cancelAnimationFrame(s.current):clearTimeout(s.current)),a.current=0,l.current=o.current=u.current=s.current=null},b.isPending=function(){return!!s.current},b.flush=function(){return s.current?y(Date.now()):c.current},b},[p,v,t,g,m,h])}function c(e,t){return e===t}function d(e){return"function"==typeof e?function(){return e}:e}var f=n(99182),h=n(4941),p=n(41775);function m(e){let{search:t}=e;return(0,r.jsxs)(o.xvT,{color:"verySubtle",className:"flex flex-col gap-2 justify-center items-center mt-5 mb-3",children:[(0,r.jsx)(o.xvT,{color:"verySubtle",className:"flex gap-2 justify-center items-center",children:(0,r.jsx)(p.Qbr,{})}),(0,r.jsx)(o.xvT,{size:"12",color:"verySubtle",className:"flex justify-center",children:t?"No matching directory.":"Select a directory to get started."})]})}function v(){var e;let t=(0,a.On)({config:{swr:{revalidateOnFocus:!1,keepPreviousData:!0}}});return(null===(e=t.data)||void 0===e?void 0:e.os)==="windows"?"\\":"/"}var g=n(5648),y=n.n(g),x=n(1573),b=n.n(x);function w(e){let{currentPath:t,childPath:n,separator:r}=e;return"\\"===t&&n.endsWith(":")?n+r:E(t,n,r)}function E(e,t,n){e=e===n?e:b()(e,n),t=y()(t,n);let r="";return(r=e.length?t.length&&t!==n?e===n?n+t:e+n+t:e:t).endsWith(":")?r+n:r}function j(){return(0,r.jsxs)(o.xvT,{color:"verySubtle",className:"flex flex-col gap-2 justify-center items-center mt-5 mb-3",children:[(0,r.jsx)(o.xvT,{color:"verySubtle",className:"flex gap-2 justify-center items-center",children:(0,r.jsx)(p.Qbr,{})}),(0,r.jsx)(o.xvT,{size:"12",color:"verySubtle",className:"flex justify-center",children:"Error loading directory."})]})}function k(e){let{path:t,onCreate:n}=e,s=v(),l=(0,a.Kw)(),[u,c]=(0,i.useState)(""),d=(0,i.useCallback)(async()=>{let e=await l.put({payload:{path:w({currentPath:t,childPath:u,separator:s})}});e.error?(0,o.OHV)("Error creating directory: ".concat(e.error)):(n(u),c(""))},[l,u,n,t,s]);return(0,r.jsxs)("div",{className:"flex items-center gap-2 overflow-hidden w-full",children:[(0,r.jsx)(o.xvT,{color:"verySubtle",className:"group-data-[selected=true]:text-gray-1000 dark:group-data-[selected=true]:text-graydark-1000",children:(0,r.jsx)(p.L37,{})}),(0,r.jsx)("div",{className:"flex-1",children:(0,r.jsx)(o.nvn,{focus:"none",variant:"ghost",placeholder:"type new directory name",className:"!pl-0 font-normal h-5",value:u,onChange:e=>{c(e.currentTarget.value)},onKeyUp:e=>{e.stopPropagation(),"Enter"===e.key&&d()},size:"small"})})]})}function S(e){let{path:t,setPath:n,commandPage:i,currentPage:a,beforeSelect:s,afterSelect:l}=e,u=v();return(0,r.jsx)(h.WD,{commandPage:i,currentPage:a,onSelect:()=>{t&&(s&&s(),n(function(e,t){if(e.endsWith(":\\"))return t;let n="".concat(e.split(t).slice(0,-1).join(t));return""===n?t:n.endsWith(":")?n+t:n}(t,u)),l&&l())},value:"..",children:(0,r.jsxs)("div",{className:"flex items-center gap-2 overflow-hidden",children:[(0,r.jsx)(o.xvT,{color:"verySubtle",className:"group-data-[selected=true]:text-gray-1000 dark:group-data-[selected=true]:text-graydark-1000",children:(0,r.jsx)(p.ROc,{size:16})}),(0,r.jsx)(o.xvT,{ellipsis:!0,children:".."})]})},"..")}let _={namespace:"volumes/directorySelect",label:"Directory select"};function O(e){var t,n,i,a,s,l,u;let{path:c,dir:d,setPath:g,currentPage:y,beforeSelect:x,afterSelect:b}=e,E=v(),O=(null===(t=d.data)||void 0===t?void 0:t.path)===E,C=(null===(n=d.data)||void 0===n?void 0:n.path)==="\\";return(0,r.jsxs)(h.fu,{currentPage:y,commandPage:_,children:[d.isValidating||!d.data||d.error?null:O?null:(0,r.jsx)(S,{path:d.data.path,setPath:g,currentPage:y,commandPage:_,afterSelect:b,beforeSelect:x}),(0,r.jsxs)(f.mY.Empty,{children:[!d.isValidating&&d.error?(0,r.jsx)(j,{}):null,d.isValidating||d.error||(null===(a=d.data)||void 0===a?void 0:null===(i=a.directories)||void 0===i?void 0:i.length)?null:(0,r.jsx)(m,{search:c})]}),!d.isValidating&&!d.error&&(null===(l=d.data)||void 0===l?void 0:null===(s=l.directories)||void 0===s?void 0:s.length)?d.data.directories.map(e=>(0,r.jsx)(h.WD,{commandPage:_,currentPage:y,onSelect:()=>{x&&x();let t=w({currentPath:d.data.path,childPath:e,separator:E});g(t),b&&b()},value:e,children:(0,r.jsxs)("div",{className:"flex items-center gap-2 overflow-hidden",children:[(0,r.jsx)(o.xvT,{color:"verySubtle",className:"group-data-[selected=true]:text-gray-1000 dark:group-data-[selected=true]:text-graydark-1000",children:(0,r.jsx)(p.ROc,{size:16})}),(0,r.jsx)(o.xvT,{ellipsis:!0,children:e})]})},e)):null,!C&&!d.isValidating&&!d.error&&(0,r.jsx)(h.WD,{commandPage:_,currentPage:y,value:"create new directory",children:(0,r.jsx)(k,{path:null===(u=d.data)||void 0===u?void 0:u.path,onCreate:e=>{d.mutate(t=>{var n;return{...t,directories:(null==t?void 0:null===(n=t.directories)||void 0===n?void 0:n.concat(e))||[e]}})}})})]})}function C(e){let{path:t,dir:n,onChange:i}=e;return(0,r.jsx)(f.mY,{label:"Select volume",shouldFilter:!1,children:(0,r.jsx)(o.s_4,{className:"h-[200px] p-1 overflow-hidden",children:(0,r.jsx)(o.xrM,{keyToResetScrollbars:t,children:(0,r.jsx)(f.mY.List,{children:(0,r.jsx)(O,{path:t,dir:n,setPath:i,currentPage:_})})})})})}var M=n(82851);function A(e){let{label:t,newSizeGB:n,currentSizeGB:i=0,maxSizeGB:a=0}=e,l=in,c=n>a;return(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsxs)("div",{className:"relative w-full h-1 rounded-lg bg-gray-300 dark:bg-graydark-300 overflow-hidden",children:[(0,r.jsx)("div",{className:(0,M.cx)("absolute h-1 rounded-tl-lg rounded-bl-lg",void 0!==n&&u?"bg-red-500 dark:bg-red-500":"bg-gray-700 dark:bg-graydark-800",l?"z-10":"z-0"),style:{width:a?"".concat(i/a*100,"%"):"0%"}}),(0,r.jsx)("div",{className:(0,M.cx)("absolute h-1 rounded-tl-lg rounded-bl-lg",c?"bg-amber-500 dark:bg-amber-500":void 0!==n&&l?"bg-green-500 dark:bg-green-500":"bg-gray-700 dark:bg-graydark-800",u?"z-10":"z-0"),style:{width:a?"".concat(n/a*100,"%"):"0%"}})]}),(0,r.jsxs)("div",{className:"h-4 flex justify-between",children:[t||(0,r.jsx)("div",{}),void 0!==n&&a?(0,r.jsx)(o.xvT,{size:"12",color:"subtle",children:"".concat((n/a*100).toFixed(0),"% of ").concat((0,s.vW)((0,s.Hz)(a))," available")}):null]})]})}let T={size:void 0,name:"",path:"~",immediatePath:"~"};function P(e){var t;let{trigger:n,open:c,onOpenChange:d}=e,{closeDialog:f}=em(),h=(0,a.HU)(),p=v(),m=(0,l.cI)({mode:"all",defaultValues:T}),g=m.watch("path"),y=m.watch("immediatePath"),x=m.watch("name"),b=m.watch("size"),w=u(()=>{g!==y&&m.setValue("path",y)},500);(0,i.useEffect)(()=>{w()},[y]),(0,i.useEffect)(()=>{g!==y&&m.setValue("immediatePath",g)},[g]);let j=(0,i.useCallback)(async e=>{let t=await h.post({payload:{localPath:E(g,x,p),maxSectors:(0,o.WN2)(e.size).toNumber()}});t.error?(0,o.OHV)(t.error):((0,o.OPV)("New volume created."),m.reset(T),f())},[m,h,f,x,g,p]),k=(0,a.cM)({disabled:!c,params:{path:""===g?p:g},config:{swr:{shouldRetryOnError:!1}}});(0,i.useEffect)(()=>{k.error&&m.setError("immediatePath",{message:"Directory does not exist"})},[k.error]),(0,i.useEffect)(()=>{k.data&&k.data.path!==g&&m.setValue("path",k.data.path)},[k.data]);let S=(null==b?void 0:b.toNumber())||0,_=k.data?(0,s.Uz)(k.data.freeBytes).toNumber():0,O=(0,s.Uz)((null===(t=k.data)||void 0===t?void 0:t.freeBytes)||0).toNumber(),M=(0,i.useMemo)(()=>({name:{type:"text",title:"Name",placeholder:"data.dat",validation:{required:"required"}},immediatePath:{type:"text",title:"Location",placeholder:"Enter a directory or select one below",validation:{required:"required",validate:{}}},path:{type:"text",title:"Location",validation:{required:"required",validate:{req:e=>"\\"!==e||"directory within a drive required"}}},size:{type:"number",title:"Size",decimalsLimit:0,units:"GB",placeholder:"1,000",validation:{required:"required",validate:{between:e=>{let t="Must be between ".concat((0,s.vW)((0,s.Hz)(10))," and ").concat((0,s.vW)((0,s.Hz)(O),{fixed:3}));return e<=O&&e>=10||t},nospace:()=>O>10||"not enough space in directory"}}}}),[O]),P=(0,o.WsO)(M);return m.register("path",M.path.validation),(0,r.jsx)(o.VqE,{title:"Create Volume",trigger:n,open:c,onOpenChange:e=>{e||m.reset(T),d(e)},contentVariants:{className:"w-[400px]"},onSubmit:m.handleSubmit(j,P),controls:(0,r.jsx)("div",{className:"flex flex-col gap-1",children:(0,r.jsx)(o.ZqQ,{form:m,children:"Create"})}),children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(o.nvN,{size:"14",children:"Create a new volume. Select a system directory and specific the size of the volume."}),(0,r.jsx)(o.yEL,{name:"name",form:m,fields:M}),(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsx)("div",{className:"flex flex-col gap-1",children:(0,r.jsx)(o.yEL,{name:"immediatePath",form:m,fields:M})}),(0,r.jsx)(C,{path:g,dir:k,onChange:e=>m.setValue("path",e,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0})})]}),(0,r.jsx)(o.jIp,{name:"size",form:m,fields:M}),(0,r.jsx)(A,{newSizeGB:S,currentSizeGB:0,maxSizeGB:_})]})})}let N={size:void 0};function R(e){var t,n;let{trigger:u,open:c,onOpenChange:d}=e,{id:f,closeDialog:h}=em(),p=v(),m=(0,a.ST)({disabled:!f,params:{id:f}}),g=(0,a.cM)({disabled:!c||!m.data,params:{path:null===(t=m.data)||void 0===t?void 0:t.localPath.split(p).slice(0,-1).join(p)}}),y=(0,a.G)(),x=(0,l.cI)({mode:"all",defaultValues:N}),b=x.watch("size"),w=(0,i.useCallback)(async e=>{let t=await y.put({params:{id:Number(f)},payload:{maxSectors:(0,o.WN2)(e.size).toNumber()}});t.error?(0,o.OHV)(t.error):((0,o.OPV)("Volume resizing initiated."),x.reset(N),h())},[x,f,y,h]);(0,i.useEffect)(()=>{m.data&&x.reset(N)},[m.data]);let E=null==b?void 0:b.toNumber(),j=m.data?(0,o.bjP)(m.data.totalSectors).toNumber():0,k=g.data?(0,s.Uz)(g.data.totalBytes).toNumber():0,S=j=1,O=(0,i.useMemo)(()=>({size:{type:"number",title:"New size",decimalsLimit:0,units:"GB",placeholder:"1,000",validation:{required:"required",validate:{between:e=>{let t="Must be between ".concat((0,s.vW)((0,s.Hz)(10))," and ").concat((0,s.vW)((0,s.Hz)(k),{fixed:3}));return e<=k&&e>=10||t}}}}}),[k]),C=(0,o.WsO)(O);return(0,r.jsx)(o.VqE,{title:"Resize Volume",trigger:u,open:c,onOpenChange:e=>{e||x.reset(N),d(e)},contentVariants:{className:"max-w-[400px]"},onSubmit:x.handleSubmit(w,C),controls:(0,r.jsx)("div",{className:"flex flex-col gap-1",children:(0,r.jsx)(o.ZqQ,{form:x,children:"Resize"})}),children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)(o.nvN,{size:"14",children:["Grow or shrink the volume. When growing a volume, make sure to check that there is enough space on-disk. When shrinking a volume, any data that needs to be moved will be placed into other volumes, meaning that no data will be lost. If ",(0,r.jsx)(o.EKh,{children:"hostd"})," is unable to migrate the data, an error will be returned and the operation will be stopped."]}),(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsx)(o.__J,{children:"Volume"}),(0,r.jsx)(o.xvT,{font:"mono",ellipsis:!0,children:null===(n=m.data)||void 0===n?void 0:n.localPath})]}),(0,r.jsx)(o.jIp,{name:"size",form:x,fields:O}),(0,r.jsx)(A,{currentSizeGB:j,newSizeGB:E,maxSizeGB:k,label:_?(0,r.jsx)(o.xvT,{size:"12",color:"subtle",children:S?"Increase by ".concat((0,s.vW)((0,s.Hz)(E-j))):"Decrease by ".concat((0,s.vW)((0,s.Hz)(j-E)))}):(0,r.jsx)(o.xvT,{size:"12",color:"subtle",children:"Current size is ".concat((0,s.vW)((0,s.Hz)(j)))})})]})})}let D={path:"",force:!1};function L(e){var t,n,u;let{trigger:c,open:d,onOpenChange:f}=e,{id:h,closeDialog:p}=em(),m=(0,a.uq)(),v=(0,a.ST)({disabled:!h,params:{id:h}}),g=(0,o.x9T)(null===(t=v.data)||void 0===t?void 0:t.totalSectors),y=(0,o.x9T)(null===(n=v.data)||void 0===n?void 0:n.usedSectors),x=null===(u=v.data)||void 0===u?void 0:u.localPath,b=(0,l.cI)({mode:"all",defaultValues:D}),w=(0,i.useCallback)(async e=>{var t;let n=await m.delete({params:{id:null===(t=v.data)||void 0===t?void 0:t.id,force:e.force}});n.error?(0,o.OHV)(n.error):((0,o.OPV)("Volume permanently deleted."),b.reset(),p())},[b,v.data,m,p]),E=(0,i.useMemo)(()=>({path:{type:"text",title:"Path",placeholder:x,validation:{required:"required",validate:{equals:e=>e===x||"directory path does not match"}}},force:{type:"boolean",title:"Force",validation:{}}}),[x]),j=(0,o.WsO)(E);return(0,r.jsx)(o.VqE,{title:"Delete Volume",trigger:c,open:d,onOpenChange:e=>{e||b.reset(D),f(e)},contentVariants:{className:"w-[400px]"},onSubmit:b.handleSubmit(w,j),children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(o.nvN,{size:"14",children:"Are you sure you would like to delete the volume?"}),(0,r.jsxs)(o.nvN,{size:"14",children:[(0,r.jsx)(o.EKh,{children:"hostd"})," will move"," ",(0,r.jsx)(o.xvT,{weight:"semibold",children:(0,s.vW)(y)})," of stored data and will lose ",(0,r.jsx)(o.xvT,{weight:"semibold",children:(0,s.vW)(g)})," ","of storage capacity. It is not recommended to remove or resize volumes when contracts are about to expire."]}),(0,r.jsx)(o.nvN,{size:"14",children:"Enter the volume path to confirm the removal."}),(0,r.jsx)(o.yEL,{name:"path",form:b,fields:E}),(0,r.jsxs)("div",{className:"flex gap-1",children:[(0,r.jsx)(o.QBj,{name:"force",size:"medium",form:b,fields:E}),(0,r.jsx)(o.Yqd,{children:(0,r.jsx)("div",{className:"flex gap-1 max-w-[200px]",children:(0,r.jsx)(o.nvN,{size:"14",children:"Force deleting a volume will remove the volume even if the data can NOT be relocated - this will result in severe data loss and contract failure. Be extremely careful when using this option."})})})]}),(0,r.jsx)(o.ZqQ,{variant:"red",form:b,children:"Delete"})]})})}var F=n(6391),V=n.n(F);function z(){let{dialog:e,openDialog:t,closeDialog:n}=em(),s=(0,a.Os)(),l=(0,a.cj)(),u=(0,i.useCallback)(async e=>{let{sc:t,address:n}=e,r=await l.post({payload:{address:n,amount:t.toString()}});return r.error?{error:r.error}:{transactionId:r.data}},[l]);return(0,r.jsx)(o.weF,{balance:s.data?new(V())(s.data.spendable):void 0,send:u,open:"sendSiacoin"===e,onOpenChange:r=>r?t(e):n()})}var I=n(63171);function Z(){let{id:e,dialog:t,openDialog:n,closeDialog:a}=em(),{dataset:s}=(0,I.n)(),l=(0,i.useMemo)(()=>null==s?void 0:s.find(t=>t.id===e),[s,e]);return(0,r.jsx)(o.mPE,{id:e,transaction:l,open:"transactionDetails"===t,onOpenChange:e=>e?n(t):a()})}var B=n(734),H=n(95753),U=n(71930),W=n(5632);let q={namespace:"wallet",label:"Wallet"};function $(e){let{currentPage:t,parentPage:n,pushPage:i}=e,{openDialog:s,closeDialog:l}=em(),u=(0,W.useRouter)(),c=(0,a.On)({config:{swr:{revalidateOnFocus:!1,keepPreviousData:!0}}});return(0,r.jsxs)(h.fu,{currentPage:t,commandPage:q,children:[(0,r.jsx)(h.Ul,{currentPage:t,parentPage:n,commandPage:q,onSelect:()=>{i(q)},children:q.label}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:q,onSelect:()=>{u.push(U._.wallet.view),l()},children:"View wallet transactions"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:q,onSelect:()=>{s("sendSiacoin")},children:"Send siacoin"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:q,onSelect:()=>{s("addressDetails")},children:"Receive siacoin"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:q,onSelect:()=>{s("addressDetails")},children:"View wallet address"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:q,onSelect:()=>{var e;(0,o.vQq)(null===(e=c.data)||void 0===e?void 0:e.walletAddress,"wallet address"),l()},children:"Copy wallet address to clipboard"})]})}var Y=n(38617);let G={namespace:"settings",label:"Settings"};function X(e){let{currentPage:t,parentPage:n}=e,{openDialog:i,closeDialog:o}=em(),{setTheme:a}=(0,Y.F)(),{settings:s,setSettings:l,lock:u,currencyOptions:c,setCurrency:d}=(0,H.Hv)();return(0,r.jsxs)(h.fu,{currentPage:t,commandPage:G,children:[(0,r.jsx)(h.Ul,{currentPage:t,parentPage:n,commandPage:G,onSelect:()=>{i("settings")},children:"Open settings"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:G,onSelect:()=>{l({siaCentral:!s.siaCentral}),o()},children:(s.siaCentral?"Disable":"Enable")+" external API - Sia Central exchange rates"}),(0,r.jsx)(h.o4,{currentPage:t,commandPage:G,onSelect:()=>{u(),o()},children:"Lock hostd"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:G,onSelect:()=>{i("settings")},children:"Open interface theme menu"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:G,onSelect:()=>{a("system"),o()},children:"Set theme to system preference"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:G,onSelect:()=>{a("dark"),o()},children:"Set theme to dark"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:G,onSelect:()=>{a("light"),o()},children:"Set theme to light"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:G,onSelect:()=>{i("settings")},children:"Open currency settings menu"}),c.map(e=>{let{id:n,label:i}=e;return(0,r.jsx)(h.WD,{currentPage:t,commandPage:G,onSelect:()=>{d(n),o()},children:"Set currency to ".concat(i)},n)})]})}let K={namespace:"node",label:"Blockchain node"};function Q(e){let{currentPage:t,parentPage:n,pushPage:i}=e,{openDialog:o,closeDialog:a}=em(),s=(0,W.useRouter)();return(0,r.jsxs)(h.fu,{currentPage:t,commandPage:K,children:[(0,r.jsx)(h.Ul,{currentPage:t,parentPage:n,commandPage:K,onSelect:()=>{i(K)},children:K.label}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:K,onSelect:()=>{o("connectPeer")},children:"Connect to a peer"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:K,onSelect:()=>{s.push(U._.node.index),a()},children:"View peers"})]})}var J=n(99957);let ee={namespace:"configuration",label:"Configuration"};function et(e){let{currentPage:t,parentPage:n,pushPage:i}=e,o=(0,W.useRouter)(),{showAdvanced:a}=(0,J.ZR)(),{closeDialog:s}=em();return(0,r.jsxs)(h.fu,{currentPage:t,commandPage:ee,children:[(0,r.jsx)(h.Ul,{currentPage:t,parentPage:n,commandPage:ee,onSelect:()=>{i(ee)},children:ee.label}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:ee,onSelect:()=>{o.push(U._.config.index),s()},children:"Open configuration"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:ee,onSelect:()=>{o.push(U._.config.host),s()},children:"Configure host"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:ee,onSelect:()=>{o.push(U._.config.pricing),s()},children:"Configure pricing"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:ee,onSelect:()=>{o.push(U._.config.dns),s()},children:"Configure DNS"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:ee,onSelect:()=>{o.push(U._.config.bandwidth),s()},children:"Configure bandwidth"}),a&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.WD,{currentPage:t,commandPage:ee,onSelect:()=>{o.push(U._.config.registry),s()},children:"Configure registry"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:ee,onSelect:()=>{o.push(U._.config.accounts),s()},children:"Configure accounts"})]})]})}var en=n(92838);function er(e){let{search:t}=e;return(0,r.jsxs)(o.xvT,{color:"verySubtle",className:"flex flex-col gap-2 justify-center items-center mt-5 mb-3",children:[(0,r.jsx)(o.xvT,{color:"verySubtle",className:"flex gap-2 justify-center items-center",children:(0,r.jsx)(p.owP,{})}),(0,r.jsx)(o.xvT,{size:"12",color:"verySubtle",className:"flex justify-center",children:t?"No results matching query.":"Type a query to get started."})]})}var ei=n(3639);let eo={namespace:"contracts",label:"Contracts"};function ea(e){let{currentPage:t,parentPage:n,pushPage:i,beforeSelect:o,afterSelect:a}=e,s=(0,W.useRouter)(),{closeDialog:l}=em();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.Ul,{currentPage:t,parentPage:n,commandPage:n,onSelect:()=>{i(eo)},children:eo.label}),(0,r.jsx)(h.fu,{currentPage:t,commandPage:eo,children:(0,r.jsx)(h.WD,{currentPage:t,commandPage:eo,onSelect:()=>{s.push(U._.contracts.index),l()},children:"View contracts"})}),(0,r.jsx)(ei.F,{parentPage:eo,currentPage:t,beforeSelect:o,afterSelect:a,pushPage:i})]})}let es={namespace:"volumes",label:"Volumes"};function el(e){let{currentPage:t,parentPage:n,pushPage:i}=e,o=(0,W.useRouter)(),{openDialog:a,closeDialog:s}=em();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.Ul,{currentPage:t,parentPage:n,commandPage:n,onSelect:()=>{i(es)},children:es.label}),(0,r.jsxs)(h.fu,{currentPage:t,commandPage:es,children:[(0,r.jsx)(h.WD,{currentPage:t,commandPage:es,onSelect:()=>{o.push(U._.volumes.index),s()},children:"View volumes"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:es,onSelect:()=>{a("volumeCreate")},children:"Create volume"})]})]})}function eu(e){var t,n,a,s,l,h,p,m,v;let{panel:g}=e,y=(0,W.useRouter)(),{resetFilters:x}=(0,en.G)(),{closeDialog:b}=em(),[w,E]=(0,i.useState)(""),[j]=(s=t&&t.equalityFn||c,h=(a=(n=(0,i.useState)(d(w)))[1],l=[n[0],(0,i.useCallback)(function(e){return a(d(e))},[])])[0],p=l[1],m=u((0,i.useCallback)(function(e){return p(e)},[p]),500,t),s((v=(0,i.useRef)(w)).current,w)||(m(w),v.current=w),[h,m]),[k,S]=(0,i.useState)([]),_=k[k.length-1],O=0===k.length,C=(0,i.useCallback)(e=>{S(t=>[...t,e])},[S]),A=(0,i.useCallback)(()=>{b()},[b]),T=(0,i.useCallback)(()=>{E("")},[E]),P=(null==_?void 0:_.empty)||er;return(0,r.jsxs)(f.mY,{label:"Command Menu",loop:!0,className:(0,M.cx)(g&&(0,o.z$)()),onKeyDown:e=>{(k.length>0&&"Escape"===e.key||"Backspace"===e.key&&!w)&&(e.preventDefault(),S(e=>e.slice(0,-1)))},children:[_&&(0,r.jsx)(o.__J,{className:"px-2",children:_.label}),(0,r.jsx)(f.mY.Input,{value:w,onValueChange:E,className:(0,o.cEb)({variant:"ghost",focus:"none"}),placeholder:(null==_?void 0:_.prompt)||(O?"Search for commands, eg: theme, redundancy":"Search commands")}),(0,r.jsx)(o.Z0O,{className:"my-2"}),(0,r.jsxs)(f.mY.List,{children:[(0,r.jsx)(f.mY.Empty,{children:(0,r.jsx)(P,{search:w,debouncedSearch:j})}),(0,r.jsx)(X,{currentPage:_,pushPage:C}),(0,r.jsx)($,{currentPage:_,pushPage:C}),(0,r.jsx)(el,{currentPage:_,pushPage:C}),(0,r.jsx)(ea,{currentPage:_,pushPage:C,beforeSelect:()=>{A(),x()},afterSelect:()=>{y.pathname.startsWith(U._.contracts.index)||y.push(U._.contracts.index),T()}}),(0,r.jsx)(et,{currentPage:_,pushPage:C}),(0,r.jsx)(Q,{currentPage:_,pushPage:C})]})]})}function ec(e){let{open:t,onOpenChange:n,setOpen:a}=e,{isUnlockedAndAuthedRoute:s}=(0,H.Hv)(),{isConnected:l}=(0,o.Y97)({route:U.h});return(0,i.useEffect)(()=>{if(!s||!l)return;let e=e=>{"k"===e.key&&e.metaKey&&a()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[s,l,a]),(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(o.VqE,{open:t,onOpenChange:n,contentVariants:{className:"!absolute !p-1 w-[450px] top-[200px]"},bodyClassName:"!px-1 !py-1",closeClassName:"hidden",children:(0,r.jsx)(eu,{})})})}function ed(e){let{open:t,onOpenChange:n}=e,s=(0,a.Z7)(),l=(0,a.Uy)(),u=(0,i.useCallback)(async e=>{let t=await l.post({payload:[e]});t.error?(0,o.OHV)("Error dismissing alert."):(0,o.OPV)("Alert has been dismissed.")},[l]),c=(0,i.useCallback)(async(e,t)=>{if(!s.data)return;let n=await l.post({payload:e});n.error?(0,o.OHV)(t?"Error dismissing all ".concat(t," alerts."):"Error dismissing all alerts."):(0,o.OPV)(t?"All ".concat(t," alerts have been dismissed."):"All alerts have been dismissed.")},[l,s]);return(0,r.jsx)(o.hcY,{open:t,onOpenChange:e=>{n(e)},alerts:s,dataFieldOrder:ef,dataFields:eh,dismissMany:c,dismissOne:u})}let ef=["error","contractID","blockHeight","resolution","volume","volumeID","elapsed","error","checked","missing","corrupt","total","oldSectors","currentSectors","targetSectors","migratedSectors","migrated","target","force"],eh={error:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"error"}),(0,r.jsx)(o.xvT,{color:"contrast",children:t})]})}},contractId:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"contract ID"}),(0,r.jsx)(o.XxW,{value:String(t)})]})}},blockHeight:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"block height"}),(0,r.jsx)(o.XxW,{value:String(t),type:"block"})]})}},resolution:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"resolution"}),(0,r.jsx)(o.XxW,{value:String(t)})]})}},volume:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"volume"}),(0,r.jsx)(o.XxW,{value:String(t)})]})}},volumeID:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"volume ID"}),(0,r.jsx)(o.XxW,{value:String(t)})]})}},elapsed:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"elapsed"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:(0,s.bc)(Number(t))})]})}},checked:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"checked"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},missing:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"missing"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},corrupt:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"corrupt"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},total:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"total"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},oldSectors:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"old sectors"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},currentSectors:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"current sectors"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},targetSectors:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"target sectors"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},migratedSectors:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"migrated sectors"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},migrated:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"migrated"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},target:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"target"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},force:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"force"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t?"true":"false"})]})}}},ep=(0,i.createContext)({}),em=()=>(0,i.useContext)(ep);function ev(e){let{children:t}=e,n=function(){let[e,t]=(0,i.useState)(),[n,r]=(0,i.useState)(),o=(0,i.useCallback)((e,n)=>{t(e),r(n)},[t,r]),[a,s]=(0,i.useState)(),l=(0,i.useCallback)(e=>{t("confirm"),s(e)},[t,s]),u=(0,i.useCallback)(()=>{t(void 0),r(void 0),s(void 0)},[t,r,s]),c=(0,i.useCallback)(e=>{e||u()},[u]);return{dialog:e,id:n,openDialog:o,confirm:a,openConfirmDialog:l,closeDialog:u,onOpenChange:c}}();return(0,r.jsx)(ep.Provider,{value:n,children:t})}function eg(){var e;let{dialog:t,openDialog:n,openConfirmDialog:i,onOpenChange:s,closeDialog:l,confirm:u}=em(),c=(0,a.Wl)(),d=(0,a.Os)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(ec,{open:"cmdk"===t,onOpenChange:s,setOpen:()=>n("cmdk")}),(0,r.jsx)(o.DLL,{open:"settings"===t,onOpenChange:s}),(0,r.jsx)(ed,{open:"alerts"===t,onOpenChange:s}),(0,r.jsx)(z,{}),(0,r.jsx)(o.YNn,{open:"addressDetails"===t,address:null===(e=d.data)||void 0===e?void 0:e.address,isValidating:d.isValidating,onOpenChange:e=>e?n(t):l()}),(0,r.jsx)(Z,{}),(0,r.jsx)(o.D_D,{connect:e=>c.put({payload:{address:e}}),open:"connectPeer"===t,onOpenChange:e=>e?n(t):l()}),(0,r.jsx)(P,{open:"volumeCreate"===t,onOpenChange:e=>e?n(t):l()}),(0,r.jsx)(R,{open:"volumeResize"===t,onOpenChange:e=>e?n(t):l()}),(0,r.jsx)(L,{open:"volumeDelete"===t,onOpenChange:e=>e?n(t):l()}),(0,r.jsx)(B.Y,{open:"contractsFilterContractId"===t,onOpenChange:e=>e?n(t):l()}),(0,r.jsx)(o.QHy,{open:"confirm"===t,params:u,onOpenChange:e=>e?i(u):l()})]})}},5187:function(e,t,n){"use strict";n.d(t,{C:function(){return E},B:function(){return w}});var r=n(52322),i=n(2784),o=n(97096),a=n(25205);let s={successful:{color:o.O9T.green[600]},active:{color:o.O9T.amber[600]},pending:{color:o.O9T.amber[600],pattern:!0},rejected:{color:o.O9T.red[600]},failed:{color:o.O9T.red[600]},storage:{label:"storage",color:o.O9T.emerald[600]},storagePhysical:{color:o.O9T.indigo[600]},ingress:{label:"ingress",color:o.O9T.pink[600]},egress:{label:"egress",color:o.O9T.blue[600]},registry:{label:"registry",color:o.O9T.purple[600]},storageWrites:{label:"storage write",color:o.O9T.pink[600]},storageReads:{label:"storage read",color:o.O9T.blue[600]},registryReads:{label:"registry reads",color:o.O9T.green[600]},registryWrites:{label:"registry writes",color:o.O9T.yellow[600]},rpc:{label:"RPC",color:o.O9T.slate[500]},capacityStorage:{label:"capacity",color:o.O9T.neutral[500]},capacityRegistry:{label:"capacity",color:o.O9T.neutral[500]},contract:{color:o.O9T.red[800]},collateral:{color:o.O9T.amber[600]},sectorsTemp:{label:"temp sectors",color:o.O9T.amber[600]},sectorsContract:{label:"contract sectors",color:o.O9T.green[600]},sectorAccess:{label:"sector access",color:o.O9T.blue[600]},sc:{color:o.O9T.green[600]},sf:{color:o.O9T.amber[600]},locked:{color:o.O9T.purple[600]},risked:{color:o.O9T.amber[600]},burnt:{color:o.O9T.red[600]}};var l=n(27444);function u(e,t,n){return{...e,category:t,pattern:n}}function c(e,t,n){return{...e,category:t,label:n}}var d=n(6391),f=n.n(d),h=n(14817),p=n(66700);function m(e,t){for(var n=Math.abs(e).toString();n.length"7"===e.value),b=(0,i.createContext)({}),w=()=>(0,i.useContext)(b);function E(e){let{children:t}=e,n=function(){let[e,t]=(0,y.Z)("v0/metrics/dataTimeSpan",{defaultValue:x.value}),[n,d]=(0,y.Z)("v0/metrics/dataInterval",{defaultValue:x.interval}),b=function(e){let[t,n]=(0,i.useState)(new Date().getTime());return(0,i.useEffect)(()=>{n(new Date().getTime());let t=setInterval(()=>{n(new Date().getTime()),console.log("reset time range")},(0,h.uQ)(e));return()=>clearInterval(t)},[e]),t}(n),w=(0,i.useMemo)(()=>(0,o.OQF)(e,b),[e,b]),E=(0,i.useCallback)(e=>{let n=h.lv.find(t=>t.value===e);d(n.interval),t(n.value)},[t,d]),j=(0,i.useMemo)(()=>(0,o.kOJ)(n),[n]),k=(0,l.KU)({params:{interval:n,start:function(e,t){(0,v.Z)(1,arguments);var n=(0,p.Z)(e);if(isNaN(n.getTime()))throw RangeError("Invalid time value");var r=null!=t&&t.format?String(t.format):"extended",i=null!=t&&t.representation?String(t.representation):"complete";if("extended"!==r&&"basic"!==r)throw RangeError("format must be 'extended' or 'basic'");if("date"!==i&&"time"!==i&&"complete"!==i)throw RangeError("representation must be 'date', 'time', or 'complete'");var o="",a="",s="extended"===r?"-":"";if("time"!==i){var l=m(n.getDate(),2),u=m(n.getMonth()+1,2),c=m(n.getFullYear(),4);o="".concat(c).concat(s).concat(u).concat(s).concat(l)}if("date"!==i){var d=n.getTimezoneOffset();if(0!==d){var f=Math.abs(d),h=m(Math.floor(f/60),2),g=m(f%60,2);a="".concat(d<0?"+":"-").concat(h,":").concat(g)}else a="Z";var y=m(n.getHours(),2),x=m(n.getMinutes(),2),b=m(n.getSeconds(),2),w=""===o?"":"T",E=[y,x,b].join("extended"===r?":":"");o="".concat(o).concat(w).concat(E).concat(a)}return o}(new Date(w.start-(0,h.uQ)(n)))},config:{swr:{revalidateOnFocus:!1,refreshInterval:(0,o.sWj)(5)}}}),S=(0,i.useMemo)(()=>{var e;let t=(0,o.Y_Z)(null===(e=k.data)||void 0===e?void 0:e.map(e=>({storagePotential:Number(e.revenue.potential.storage),ingressPotential:Number(e.revenue.potential.ingress),egressPotential:Number(e.revenue.potential.egress),rpcPotential:Number(e.revenue.potential.rpc),storage:Number(e.revenue.earned.storage),ingress:Number(e.revenue.earned.ingress),egress:Number(e.revenue.earned.egress),rpc:Number(e.revenue.earned.rpc),potential:new(f())(e.revenue.potential.storage).plus(e.revenue.potential.ingress).plus(e.revenue.potential.egress).plus(e.revenue.potential.rpc).toNumber(),earned:new(f())(e.revenue.earned.storage).plus(e.revenue.earned.ingress).plus(e.revenue.earned.egress).plus(e.revenue.earned.rpc).toNumber(),timestamp:new Date(e.timestamp).getTime()})),"delta"),n=(0,o.fVJ)(t),i=t.map(e=>({storagePotential:Math.max(e.storagePotential,0),ingressPotential:Math.max(e.ingressPotential,0),egressPotential:Math.max(e.egressPotential,0),rpcPotential:Math.max(e.rpcPotential,0),storage:Math.max(e.storage,0),ingress:Math.max(e.ingress,0),egress:Math.max(e.egress,0),rpc:Math.max(e.rpc,0),timestamp:new Date(e.timestamp).getTime()}));return{data:i,stats:n,config:{enabledGraph:["storage","storagePotential","ingress","ingressPotential","egress","egressPotential","rpc","rpcPotential"],enabledTip:["storage","storagePotential","ingress","ingressPotential","egress","egressPotential","rpc","rpcPotential"],categories:["earned","potential"],data:{storagePotential:u(s.storage,"potential",!0),ingressPotential:u(s.ingress,"potential",!0),egressPotential:u(s.egress,"potential",!0),registryReadPotential:u(s.registryReads,"potential",!0),registryWritePotential:u(s.registryWrites,"potential",!0),rpcPotential:u(s.rpc,"potential",!0),storage:u(s.storage,"earned"),ingress:u(s.ingress,"earned"),egress:u(s.egress,"earned"),registryRead:u(s.registryReads,"earned"),registryWrite:u(s.registryWrites,"earned"),rpc:u(s.rpc,"earned"),earned:c({},"earned","total"),potential:c({},"potential","total")},formatComponent:function(e){let{value:t}=e;return(0,r.jsx)(o.ho9,{variant:"value",value:new(f())(t)})},formatTickY:e=>(0,a.Vz)(e,{fixed:0,dynamicUnits:!0}),formatTimestamp:j,disableAnimations:!0,chartType:"barstack",stackOffset:"diverging"},isLoading:k.isValidating}},[k,j]),_=(0,i.useMemo)(()=>{var e;let t=(0,o.Y_Z)(null===(e=k.data)||void 0===e?void 0:e.map(e=>({locked:Number(e.contracts.lockedCollateral),risked:Number(e.contracts.riskedCollateral),timestamp:new Date(e.timestamp).getTime()})).slice(1),"none"),n=(0,o.fVJ)(t);return{data:t,stats:n,config:{enabledGraph:["locked","risked"],enabledTip:["locked","risked"],data:{locked:s.locked,risked:s.risked},formatComponent:function(e){let{value:t}=e;return(0,r.jsx)(o.ho9,{variant:"value",value:new(f())(t)})},formatTimestamp:j,formatTickY:e=>(0,a.Vz)(e,{fixed:0,dynamicUnits:!0}),disableAnimations:!0,chartType:"area",curveType:"linear",stackOffset:"none"},isLoading:k.isValidating}},[k,j]),O=(0,i.useMemo)(()=>{var e;let t=(0,o.Y_Z)(null===(e=k.data)||void 0===e?void 0:e.map(e=>({baseRPC:(0,g.sS)(e.pricing.baseRPCPrice).toNumber(),collateral:(0,g.c5)(new(f())(e.pricing.storagePrice).times(e.pricing.collateralMultiplier)).toNumber(),contract:Number(e.pricing.contractPrice),egress:(0,g.B1)(e.pricing.egressPrice).toNumber(),ingress:(0,g.dK)(e.pricing.ingressPrice).toNumber(),sectorAccess:(0,g.nS)(e.pricing.sectorAccessPrice).toNumber(),storage:(0,g.SY)(e.pricing.storagePrice).toNumber(),timestamp:new Date(e.timestamp).getTime()})).slice(1),"none"),n=(0,o.fVJ)(t);return{data:t,stats:n,config:{enabledGraph:["storage","ingress","egress","collateral","contract","sectorAccess","baseRPC"],enabledTip:["storage","ingress","egress","collateral","contract","sectorAccess","baseRPC"],data:{baseRPC:s.rpc,sectorAccess:s.sectorAccess,contract:s.contract,collateral:s.collateral,egress:s.egress,ingress:s.ingress,storage:s.storage},formatComponent:function(e){let{value:t}=e;return(0,r.jsx)(o.ho9,{variant:"value",value:new(f())(t)})},formatTimestamp:j,formatTickY:e=>(0,a.Vz)(e,{fixed:0,dynamicUnits:!0}),disableAnimations:!0,chartType:"line",curveType:"linear",stackOffset:"none"},isLoading:k.isValidating}},[k,j]),C=(0,i.useMemo)(()=>{var e;let t=(0,o.Y_Z)(null===(e=k.data)||void 0===e?void 0:e.map(e=>({active:e.contracts.active,failed:e.contracts.failed,pending:e.contracts.pending,rejected:e.contracts.rejected,successful:e.contracts.successful,timestamp:new Date(e.timestamp).getTime()})).slice(1),"none"),n=(0,o.fVJ)(t);return{data:t,stats:n,config:{enabledGraph:["successful","active","pending","rejected","failed"],enabledTip:["successful","active","pending","rejected","failed"],data:{active:s.active,failed:s.failed,pending:s.pending,rejected:s.rejected,successful:s.successful},format:e=>"".concat(e," contracts"),formatTimestamp:j,formatTickY:e=>(0,a.yF)(e),disableAnimations:!0,chartType:"areastack",curveType:"linear",stackOffset:"none"},isLoading:k.isValidating}},[k,j]),M=(0,i.useMemo)(()=>{var e;let t=(0,o.Y_Z)(null===(e=k.data)||void 0===e?void 0:e.map(e=>({maxSectors:(0,a.B$)(e.storage.totalSectors).times(4).toNumber(),tempSectors:(0,a.B$)(e.storage.tempSectors).times(4).toNumber(),physicalSectors:(0,a.B$)(e.storage.physicalSectors).times(4).toNumber(),contractSectors:(0,a.B$)(e.storage.contractSectors).times(4).toNumber(),timestamp:new Date(e.timestamp).getTime()})).slice(1),"none"),n=(0,o.fVJ)(t);return{data:t,stats:n,config:{enabledGraph:["contractSectors","physicalSectors","tempSectors","maxSectors"],enabledTip:["contractSectors","physicalSectors","tempSectors","maxSectors"],categories:["storage used","storage capacity"],data:{maxSectors:c(s.capacityStorage,"storage capacity","sectors"),physicalSectors:c(s.storagePhysical,"storage used","sectors physical"),tempSectors:c(s.sectorsTemp,"storage used","sectors temp"),contractSectors:c(s.storage,"storage used","sectors contract")},format:e=>(0,a.vW)(e),formatTimestamp:j,formatTickY:e=>(0,a.vW)(e,{fixed:0}),disableAnimations:!0,chartType:"line",curveType:"linear",stackOffset:"none"},isLoading:k.isValidating}},[k,j]),A=(0,i.useMemo)(()=>{var e;let t=(0,o.Y_Z)(null===(e=k.data)||void 0===e?void 0:e.map(e=>({storageReads:e.storage.reads,storageWrites:e.storage.writes,timestamp:new Date(e.timestamp).getTime()})),"delta"),n=(0,o.fVJ)(t);return{data:t,stats:n,config:{enabledGraph:["storageReads","storageWrites"],enabledTip:["storageReads","storageWrites"],data:{storageReads:s.storageReads,storageWrites:s.storageWrites},format:e=>(0,a.yF)(e),formatTickY:e=>(0,a.yF)(e),formatTimestamp:j,disableAnimations:!0,chartType:"line",curveType:"linear",stackOffset:"none"},isLoading:k.isValidating}},[k,j]),T=(0,i.useMemo)(()=>{var e;let t=(0,o.Y_Z)(null===(e=k.data)||void 0===e?void 0:e.map(e=>({egress:e.data.rhp3.egress+e.data.rhp2.egress,ingress:e.data.rhp3.ingress+e.data.rhp2.ingress,timestamp:new Date(e.timestamp).getTime()})),"delta"),n=(0,o.fVJ)(t);return{data:t,stats:n,config:{enabledGraph:["ingress","egress"],enabledTip:["ingress","egress"],data:{ingress:s.ingress,egress:s.egress},format:e=>(0,a.vW)(e),formatTimestamp:j,formatTickY:e=>(0,a.vW)(e,{fixed:0}),disableAnimations:!0,chartType:"line",curveType:"linear",stackOffset:"none"},isLoading:k.isValidating}},[k,j]);return{dataTimeSpan:e,setDataTimeSpan:E,timeRange:w,dataInterval:n,setDataInterval:d,operations:A,revenue:S,collateral:_,contracts:C,storage:M,pricing:O,bandwidth:T}}();return(0,r.jsx)(b.Provider,{value:n,children:t})}},14817:function(e,t,n){"use strict";n.d(t,{lv:function(){return i},uQ:function(){return o}});var r=n(97096);let i=[{label:"1D",interval:"15m",value:"1"},{label:"7D",interval:"hourly",value:"7"},{label:"1M",interval:"daily",value:"30"},{label:"3M",interval:"daily",value:"90"},{label:"1Y",interval:"daily",value:"365"},{label:"ALL",interval:"weekly",value:"all"}];function o(e){return"5m"===e?(0,r.sWj)(5):"15m"===e?(0,r.sWj)(15):"hourly"===e?(0,r.ytg)(1):"daily"===e?(0,r.NrH)(1):"weekly"===e?(0,r.NrH)(7):"monthly"===e?(0,r.NrH)(30):"yearly"===e?(0,r.NrH)(365):0}},63171:function(e,t,n){"use strict";n.d(t,{n:function(){return p},v:function(){return m}});var r=n(52322),i=n(97096),o=n(27444),a=n(2784),s=n(22515),l=n(6391),u=n.n(l),c=n(5632),d=n(90089);let f=[],h=(0,a.createContext)({}),p=()=>(0,a.useContext)(h);function m(e){let{children:t}=e,n=function(){let e=(0,c.useRouter)(),t=Number(e.query.limit||50),n=Number(e.query.offset||0),r=(0,o.Qq)({params:{limit:t,offset:n},config:{swr:{refreshInterval:(0,i.XBW)(60)}}}),l=(0,o.a0)({config:{swr:{refreshInterval:(0,i.XBW)(60)}}}),{openDialog:h}=(0,s.Rh)(),p=(0,d.B)(),m=(0,a.useMemo)(()=>l.data&&r.data?[...(l.data||[]).map(e=>{let t="transaction"!==e.source;return{id:e.id,type:"transaction",unconfirmed:!0,txType:(0,i.leQ)(e.transaction,e.source),hash:e.id,inflow:e.inflow,outflow:e.outflow,sc:new(u())(e.inflow).minus(e.outflow),siascanUrl:t?void 0:p,timestamp:new Date(e.timestamp).getTime(),onClick:()=>h("transactionDetails",e.id),raw:e.transaction}}),...(r.data||[]).map(e=>{let t="transaction"!==e.source;return{id:e.id,type:"transaction",unconfirmed:!1,txType:(0,i.leQ)(e.transaction,e.source),hash:e.id,inflow:e.inflow,outflow:e.outflow,sc:new(u())(e.inflow).minus(e.outflow),siascanUrl:t?void 0:p,timestamp:new Date(e.timestamp).getTime(),onClick:()=>h("transactionDetails",e.id),raw:e.transaction}}).sort((e,t)=>e.timestamp{let e=new Date().getTime(),t=(0,i.NrH)(30);return new Date(e-t).toISOString()},[]),g=(0,o.KU)({params:{interval:"daily",start:v}}),y=(0,a.useMemo)(()=>(g.data||[]).map(e=>({sc:Number(e.balance),timestamp:new Date(e.timestamp).getTime()})).sort((e,t)=>e.timestamp>=t.timestamp?1:-1),[g.data]),x=r.error,b=(0,i.c2j)(m,r.isValidating,x,f);return{balances:y,metrics:g,dataset:m,error:x,dataState:b,offset:n,limit:t,pageCount:(null==m?void 0:m.length)||0}}();return(0,r.jsx)(h.Provider,{value:n,children:t})}},78743:function(e,t,n){"use strict";n.d(t,{Y:function(){return y},F:function(){return g}});var r=n(52322),i=n(97096),o=n(27444),a=n(2784);let s=["actions","path","storage","available","readOnly","successfulReads","successfulWrites","failedReads","failedWrites"];var l=n(41775),u=n(25205),c=n(22515);function d(e){var t,n;let{id:a,contentProps:s,buttonProps:u}=e,{openDialog:d}=(0,c.Rh)(),h=(0,o.Rz)(),p=(0,o.ST)({params:{id:a}}),m=(0,o._3)(),v=p.data&&"ready"==p.data.status,g=p.data&&!["ready","unavailable"].includes(p.data.status);return(0,r.jsxs)(i.h_2,{trigger:(0,r.jsx)(i.zxk,{variant:"ghost",icon:"hover",...u,children:(0,r.jsx)(l.iG7,{})}),contentProps:{align:"start",...s},children:[(0,r.jsx)("div",{className:"px-1.5 py-1",children:(0,r.jsxs)(i.xvT,{size:"14",weight:"medium",color:"subtle",children:["Volume ",p.data?(0,i.$Gg)(null===(t=p.data)||void 0===t?void 0:t.localPath,24):a]})}),(0,r.jsx)(i.Juw,{children:"Actions"}),g?(0,r.jsxs)(i.Xiv,{onSelect:async()=>{var e;let t=null===(e=p.data)||void 0===e?void 0:e.status,n=await m.delete({params:{id:Number(a)}});n.error?(0,i.OHV)("Error canceling volume ".concat(f(t),".")):(0,i.OPV)("Successfully canceled volume ".concat(f(t),"."))},children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(l.PcV,{})}),"Cancel ".concat(f(null===(n=p.data)||void 0===n?void 0:n.status))]}):null,p.data?(0,r.jsxs)(i.Xiv,{disabled:!v,onSelect:async()=>{let e=!p.data.readOnly,t=await h.put({params:{id:Number(a)},payload:{readOnly:e}});t.error?(0,i.OHV)(e?"Error setting volume to read-only.":"Error setting volume to read/write."):(0,i.OPV)(e?"Volume set to read-only.":"Volume set to read/write.")},children:[(0,r.jsx)(i.KpP,{children:p.data.readOnly?(0,r.jsx)(l.dr6,{}):(0,r.jsx)(l.Lur,{})}),p.data.readOnly?"Set to read/write":"Set to read-only"]}):null,(0,r.jsxs)(i.Xiv,{disabled:!v,onSelect:()=>d("volumeResize",a),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(l.BB5,{})}),"Resize"]}),(0,r.jsxs)(i.Xiv,{disabled:g,onSelect:()=>d("volumeDelete",a),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(l.Jrl,{})}),"Delete"]})]})}function f(e){return"resizing"===e?"resize":"creating"===e?"creation":"removing"===e?"removal":"operation"}let h=[{id:"actions",label:"",fixed:!0,cellClassName:"w-[50px] !pl-2 !pr-4 [&+*]:!pl-0",render:e=>{let{data:t}=e;return(0,r.jsx)(d,{id:t.id})}},{id:"path",label:"path",category:"general",render:e=>{let{data:t}=e;return(0,r.jsx)(i.xvT,{font:"mono",ellipsis:!0,children:t.localPath})}},{id:"available",label:"status",category:"general",render:e=>{var t;let{data:n}=e;return(0,r.jsx)(i.ua7,{side:"right",content:n.available?"available":(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.xvT,{children:"unavailable"}),(0,r.jsx)("div",{className:"flex flex-col",children:null===(t=n.errors)||void 0===t?void 0:t.map(e=>(0,r.jsx)(i.xvT,{size:"10",noWrap:!0,children:e},e))})]}),children:(0,r.jsxs)("div",{className:"flex gap-2 items-center",children:[n.available&&"ready"===n.status&&(0,r.jsx)(i.xvT,{color:"green",children:(0,r.jsx)(l.DI$,{})}),n.available&&"ready"!==n.status&&(0,r.jsx)(i.xvT,{color:"amber",children:(0,r.jsx)(l.dsj,{})}),!n.available&&(0,r.jsx)(i.xvT,{color:"amber",children:(0,r.jsx)(l.SmH,{})}),(0,r.jsx)(i.xvT,{size:"12",className:"relative -top-px",children:n.status})]})})}},{id:"readOnly",label:"read/write",category:"general",render:e=>{let{data:t}=e;return t.readOnly?(0,r.jsx)(i.ua7,{content:"Read-only",children:(0,r.jsx)(i.xvT,{children:(0,r.jsx)(l.Lur,{})})}):(0,r.jsx)(i.ua7,{content:"Read and write enabled",children:(0,r.jsx)(i.xvT,{color:"subtle",children:(0,r.jsx)(l.dr6,{})})})}},{id:"storage",label:"storage",category:"general",render:e=>{let{data:t}=e;return(0,r.jsx)("div",{className:"flex gap-1 w-full max-w-[200px] pt-[10px]",children:(0,r.jsx)(i.kod,{variant:"accent",value:t.usedBytes,max:t.totalBytes,label:"".concat((0,u.vW)(t.usedBytes)," / ").concat((0,u.vW)(t.totalBytes))})})}},{id:"successfulReads",label:"successful reads",category:"operations",render:e=>{let{data:t}=e;return(0,r.jsx)(i.m2c,{variant:"value",size:"12",value:t.successfulReads,format:e=>e.toNumber().toLocaleString()})}},{id:"successfulWrites",label:"successful writes",category:"operations",render:e=>{let{data:t}=e;return(0,r.jsx)(i.m2c,{variant:"value",size:"12",value:t.successfulWrites,format:e=>e.toNumber().toLocaleString()})}},{id:"failedReads",label:"failed reads",category:"operations",render:e=>{let{data:t}=e;return(0,r.jsx)(i.m2c,{variant:"value",size:"12",value:t.failedReads,format:e=>e.toNumber().toLocaleString()})}},{id:"failedWrites",label:"failed writes",category:"operations",render:e=>{let{data:t}=e;return(0,r.jsx)(i.m2c,{variant:"value",size:"12",value:t.failedWrites,format:e=>e.toNumber().toLocaleString()})}}];var p=n(6391),m=n.n(p);let v=(0,a.createContext)({}),g=()=>(0,a.useContext)(v);function y(e){let{children:t}=e,n=function(){let{configurableColumns:e,enabledColumns:t,toggleColumnVisibility:n,setColumnsVisible:r,setColumnsHidden:l,toggleSort:c,setSortDirection:d,setSortField:f,sortField:p,sortDirection:v,resetDefaultColumnVisibility:g}=(0,i.oy6)("hostd/v0/volumes",{columns:h,columnsDefaultVisible:s}),y=(0,o.Fn)({config:{swr:{refreshInterval:e=>(null==e?void 0:e.find(e=>!["ready","unavailable"].includes(e.status)))?(0,i.XBW)(5):(0,i.XBW)(60)}}}),x=function(e){let{response:t}=e;return(0,a.useMemo)(()=>{var e;return t.data?(null===(e=t.data)||void 0===e?void 0:e.map(e=>({id:String(e.id),localPath:e.localPath,usedSectors:e.usedSectors,usedBytes:new(m())(e.usedSectors).times((0,u.B$)(4)).toNumber(),totalBytes:new(m())(e.totalSectors).times((0,u.B$)(4)).toNumber(),totalSectors:e.totalSectors,status:e.status,readOnly:e.readOnly,available:e.available,failedReads:new(m())(e.failedReads),failedWrites:new(m())(e.failedWrites),successfulReads:new(m())(e.successfulReads),successfulWrites:new(m())(e.successfulWrites),errors:e.errors})))||[]:null},[t.data])}({response:y}),b=(0,a.useMemo)(()=>h.filter(e=>t.includes(e.id)),[t]),w=y.isValidating,E=y.error,j=(0,i.c2j)(x,w,E,[]);return{dataState:j,totalCount:(null==x?void 0:x.length)||0,isLoading:y.isValidating,columns:b,dataset:x,configurableColumns:e,enabledColumns:t,toggleColumnVisibility:n,setColumnsVisible:r,setColumnsHidden:l,toggleSort:c,setSortDirection:d,setSortField:f,sortField:p,sortDirection:v,resetDefaultColumnVisibility:g}}();return(0,r.jsx)(v.Provider,{value:n,children:t})}},734:function(e,t,n){"use strict";n.d(t,{O:function(){return u},Y:function(){return f}});var r=n(52322),i=n(97096),o=n(92838),a=n(63397),s=n(24511),l=n(22515);function u(e){return{id:"filterContractId",value:e,label:"contract ID is ".concat(e)}}let c={contractId:""},d=s.Ry().shape({contractId:s.Z_().required("Required")});function f(e){let{trigger:t,open:n,onOpenChange:s}=e,{closeDialog:f}=(0,l.Rh)(),{setFilter:h}=(0,o.G)(),p=(0,a.TA)({initialValues:c,validationSchema:d,onSubmit:e=>{h(u(e.contractId)),p.resetForm(),f()}});return(0,r.jsx)(i.VqE,{trigger:t,title:"Filter by contract ID",open:n,onOpenChange:e=>{e||p.resetForm(),s(e)},contentVariants:{className:"w-[400px]"},onSubmit:p.handleSubmit,children:(0,r.jsx)("div",{className:"flex flex-col gap-4",children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(i.cB7,{formik:p,title:"Contract ID",name:"contractId",placeholder:"Exact match for contract ID",autoComplete:"off",type:"text",variants:{size:"medium"}}),(0,r.jsx)(i.IKw,{formik:p,size:"medium",children:"Filter"})]})})})}},90089:function(e,t,n){"use strict";n.d(t,{B:function(){return o}});var r=n(97096),i=n(27444);function o(){var e;let t=(0,i.On)();return(null===(e=t.data)||void 0===e?void 0:e.network)==="Zen Testnet"?r.nNd.explore.testnetZen:r.nNd.explore.mainnet}},25573:function(e,t,n){"use strict";n.d(t,{n:function(){return o}});var r=n(95753),i=n(27444);function o(){var e,t,n,o;let{isUnlockedAndAuthedRoute:a}=(0,r.Hv)(),s=(0,i.d$)({config:{swr:{refreshInterval:e=>(null==e?void 0:e.synced)?6e4:1e4}}}),l=(0,i.nH)(),u=s.data?null===(e=s.data)||void 0===e?void 0:e.chainIndex.height:0,c=(0,i.Os)({config:{swr:{refreshInterval:e=>(null==e?void 0:e.scanHeight)>=u?6e4:1e4}}}),d=a&&u&&l?Number((100*Math.min(u/l,1)).toFixed(1)):0,f=a&&u&&c.data?Number((100*Math.min(c.data.scanHeight/l,1)).toFixed(1)):0;return{isSynced:null===(t=s.data)||void 0===t?void 0:t.synced,isWalletSynced:(null===(n=s.data)||void 0===n?void 0:n.synced)&&(null===(o=c.data)||void 0===o?void 0:o.scanHeight)>=u-1,nodeBlockHeight:u,estimatedBlockHeight:l,syncPercent:d,walletScanPercent:f,moreThan100BlocksToSync:!!u&&!!l&&l-u>100,firstTimeSyncing:!!u&&!!l&&l-u>5e4}}},94977:function(e,t,n){"use strict";n.d(t,{B1:function(){return m},K9:function(){return c},LP:function(){return v},SY:function(){return s},c5:function(){return h},co:function(){return l},dK:function(){return g},dz:function(){return a},nS:function(){return d},rZ:function(){return f},s2:function(){return p},sS:function(){return u}});var r=n(25205),i=n(6391),o=n.n(i);let a="/TB/month";function s(e){return new(o())(e).times((0,r.xf)(1)).times((0,r.S5)(1))}let l="/million";function u(e){return new(o())(e).times(1e7)}let c="/million";function d(e){return new(o())(e).times(1e7)}let f="/TB/month";function h(e){return new(o())(e).times((0,r.xf)(1)).times((0,r.S5)(1))}let p="/TB";function m(e){return new(o())(e).times((0,r.xf)(1))}let v="/TB";function g(e){return new(o())(e).times((0,r.xf)(1))}},76133:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return M}});var r=n(52322);n(37832);var i=n(97096),o=n(92838),a=n(5187),s=n(22515),l=n(78743),u=n(99957),c=n(41775),d=n(25573),f=n(71930),h=n(27444),p=n(6391),m=n.n(p),v=n(25205),g=n(95753),y=n(92762);function x(){var e;let{isUnlockedAndAuthedRoute:t}=(0,g.Hv)(),{openDialog:n}=(0,s.Rh)(),{dataset:o}=(0,l.F)(),a=(0,h.rV)(),u=(0,h.Os)(),[p,x]=(0,y.Z)("v0/hostd/onboarding/maximized",{defaultValue:!0}),w=(0,d.n)();if(!t)return null;let E=new(m())(u.data?u.data.confirmed+u.data.unconfirmed:0),j=(0,v.qN)(0),k=u.data&&E.gt(j),S=(null==o?void 0:o.length)>0,_=null===(e=a.data)||void 0===e?void 0:e.acceptingContracts,O=w.isSynced,C=[k,S,_,O],M=C.length,A=C.filter(e=>e).length;return M===A?null:p?(0,r.jsx)("div",{className:"z-20 fixed bottom-5 left-1/2 -translate-x-1/2 flex justify-center",children:(0,r.jsx)(i.s_4,{className:"w-[400px] flex flex-col max-h-[600px]",children:(0,r.jsxs)(i.xrM,{children:[(0,r.jsxs)("div",{className:"flex justify-between items-center px-3 py-2 border-b border-gray-200 dark:border-graydark-300",children:[(0,r.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,r.jsx)(i.TRl,{}),(0,r.jsx)(i.xvT,{size:"20",weight:"semibold",children:"Welcome to Sia"})]}),(0,r.jsx)(i.zxk,{variant:"ghost",onClick:()=>x(!1),children:(0,r.jsx)(c.mli,{})})]}),(0,r.jsx)("div",{className:"flex justify-between items-center px-3 py-2 border-b border-gray-200 dark:border-graydark-300",children:(0,r.jsx)(i.xvT,{size:"14",children:"Get set up by completing the following steps. Once they are complete, your host is ready to store data."})}),(0,r.jsx)(b,{title:(0,r.jsx)(i.rUS,{href:f._.wallet.view,onClick:()=>n("addressDetails"),ellipsis:!0,size:"14",underline:"hover",children:"Step 1: Fund your wallet"}),description:"Fund your wallet with siacoin to cover required contract collateral.".concat(w.isWalletSynced?"":" Balance will not be accurate until wallet is finished scanning."),action:k?(0,r.jsx)(i.xvT,{color:"green",children:(0,r.jsx)(c.Y3p,{})}):(0,r.jsxs)(r.Fragment,{children:[!w.isWalletSynced&&(0,r.jsx)(i.ua7,{content:"Wallet scanning progress ".concat(w.walletScanPercent,"%"),children:(0,r.jsxs)(i.xvT,{size:"14",children:[w.walletScanPercent,"%"]})}),(0,r.jsx)(i.rUS,{href:f._.wallet.view,onClick:()=>n("addressDetails"),children:(0,r.jsx)(c.V8Q,{})}),(0,r.jsx)(i.xvT,{color:"amber",children:(0,r.jsx)(c.Fs9,{})})]})}),(0,r.jsx)(b,{title:(0,r.jsx)(i.rUS,{href:f._.volumes.index,ellipsis:!0,size:"14",underline:"hover",children:"Step 2: Add a volume"}),description:"Add a system volume that will be used to store data.",action:S?(0,r.jsx)(i.xvT,{color:"green",children:(0,r.jsx)(c.Y3p,{})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.rUS,{href:f._.volumes.index,children:(0,r.jsx)(c.V8Q,{})}),(0,r.jsx)(i.xvT,{color:"amber",children:(0,r.jsx)(c.Fs9,{})})]})}),(0,r.jsx)(b,{title:(0,r.jsx)(i.rUS,{href:f._.config.index,ellipsis:!0,size:"14",underline:"hover",children:"Step 3: Configure pricing and settings"}),description:"Configure your host's pricing and settings and start accepting contracts.",action:_?(0,r.jsx)(i.xvT,{color:"green",children:(0,r.jsx)(c.Y3p,{})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.rUS,{href:f._.config.index,children:(0,r.jsx)(c.V8Q,{})}),(0,r.jsx)(i.xvT,{color:"amber",children:(0,r.jsx)(c.Fs9,{})})]})}),(0,r.jsx)(b,{title:(0,r.jsx)(i.rUS,{href:f._.node.index,underline:"hover",ellipsis:!0,size:"14",children:"Step 4: Wait for the blockchain to sync"}),description:"The blockchain will sync in the background, this takes some time. No user action required.",action:O?(0,r.jsx)(i.xvT,{color:"green",children:(0,r.jsx)(c.Y3p,{})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.xvT,{ellipsis:!0,size:"14",children:[w.syncPercent,"%"]}),(0,r.jsx)(i.xvT,{color:"amber",children:(0,r.jsx)(c.hzZ,{})})]})})]})})}):(0,r.jsx)("div",{className:"z-30 fixed bottom-5 left-1/2 -translate-x-1/2 flex justify-center",children:(0,r.jsx)(i.zxk,{onClick:()=>x(!0),size:"large",className:"flex gap-3 !px-3",children:(0,r.jsxs)(i.xvT,{className:"flex items-center gap-1",children:[(0,r.jsx)(i.TRl,{}),"Setup: ",A,"/",M," steps complete"]})})})}function b(e){let{title:t,action:n,description:o}=e;return(0,r.jsx)("div",{className:"border-t first:border-t-0 border-gray-200 dark:border-graydark-300 px-3 py-2",children:(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,r.jsx)("div",{className:"flex-1 flex items-center",children:t}),n]}),(0,r.jsx)("div",{className:"pr-5",children:(0,r.jsx)(i.xvT,{size:"12",color:"subtle",children:o})})]})})}var w=n(63171);function E(e){let{children:t}=e;return(0,r.jsx)(s.Tu,{children:(0,r.jsx)(u.iV,{children:(0,r.jsx)(w.v,{children:(0,r.jsx)(l.Y,{children:(0,r.jsx)(o.x,{children:(0,r.jsxs)(a.C,{children:[(0,r.jsx)(s.xQ,{}),(0,r.jsx)(x,{}),t]})})})})})})}var j=n(1240),k=n.n(j),S=n(49854),_=n.n(S),O=n(82851);let C=(0,O.cx)(k().variable,_().variable);function M(e){let{Component:t,pageProps:n}=e;return(0,r.jsx)(i.PD$,{className:C,fallback:n.fallback,passwordProtectRequestHooks:!0,lockRoutes:f._,children:(0,r.jsx)(E,{children:(0,r.jsx)(t,{...n})})})}},97096:function(e,t,n){"use strict";let r,i,o,a;n.d(t,{hcY:function(){return SI},tU3:function(){return SL},zXq:function(){return S1},juT:function(){return Ss},Cts:function(){return lf},Z58:function(){return _R},WVB:function(){return c_},zxk:function(){return s5},b0u:function(){return EP},EKh:function(){return lm},vRO:function(){return Ot},QHy:function(){return _J},TaT:function(){return _$},eQh:function(){return lg},HfT:function(){return _2},ncR:function(){return k$},A06:function(){return _z},Vy9:function(){return _I},VqE:function(){return l3},h_2:function(){return cT},Xiv:function(){return cP},Juw:function(){return cN},KpP:function(){return cR},XOF:function(){return kq},jIp:function(){return On},QBj:function(){return Or},yEL:function(){return SK},cB7:function(){return kJ},ZqQ:function(){return kQ},IKw:function(){return k5},WN2:function(){return Ov},X6q:function(){return cz},Yqd:function(){return fb},__J:function(){return cY},rUS:function(){return cK},TRl:function(){return cJ},kFS:function(){return cO},FzK:function(){return _X},Clw:function(){return cS},PD$:function(){return Ol},Wxm:function(){return fk},uDJ:function(){return k7},wFK:function(){return k9},s_4:function(){return tG},nvN:function(){return t$},u5Q:function(){return _D},j4H:function(){return fw},J2e:function(){return df},kod:function(){return d_},xrM:function(){return l1},PhF:function(){return fj},Z0O:function(){return cb},DLL:function(){return _k},KJW:function(){return Sd},rsf:function(){return fI},D_D:function(){return _p},iA_:function(){return k6},t6k:function(){return _4},xvT:function(){return tq},nvn:function(){return dJ},ua7:function(){return s4},mPE:function(){return _m},XxW:function(){return ky},m2c:function(){return kS},ho9:function(){return kk},QUh:function(){return __},weF:function(){return _t},YNn:function(){return _y},DmW:function(){return _x},O9T:function(){return mJ},fVJ:function(){return _T},vQq:function(){return kl},NrH:function(){return EO},Y_Z:function(){return _O},EJC:function(){return Og},kOJ:function(){return _A},OQF:function(){return _C},leQ:function(){return kf},ytg:function(){return E_},Vkc:function(){return cE},sWj:function(){return ES},z$:function(){return tY},XBW:function(){return EC},x9T:function(){return Op},bjP:function(){return Om},I13:function(){return kc},cEb:function(){return dQ},OHV:function(){return ko},OPV:function(){return ki},$Gg:function(){return ku},Y97:function(){return SD},c2j:function(){return SF},WsO:function(){return SX},Uu5:function(){return Oh},oy6:function(){return Of},nNd:function(){return _b}});var s,l,u,c,d,f,h,p,m,v,g,y,x=n(52322),b=n(2784),w=n.t(b,2),E=n(7896),j=n(34540),k=n(26215),S=n(99575);function _(e){let t=e+"CollectionProvider",[n,r]=(0,j.b)(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=e+"CollectionSlot",s=b.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=o(a,n),s=(0,k.e)(t,i.collectionRef);return b.createElement(S.g7,{ref:s},r)}),l=e+"CollectionItemSlot",u="data-radix-collection-item",c=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,a=b.useRef(null),s=(0,k.e)(t,a),c=o(l,n);return b.useEffect(()=>(c.itemMap.set(a,{ref:a,...i}),()=>void c.itemMap.delete(a))),b.createElement(S.g7,{[u]:"",ref:s},r)});return[{Provider:e=>{let{scope:t,children:n}=e,r=b.useRef(null),o=b.useRef(new Map).current;return b.createElement(i,{scope:t,itemMap:o,collectionRef:r},n)},Slot:s,ItemSlot:c},function(t){let n=o(e+"CollectionConsumer",t),r=b.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${u}]`)),r=Array.from(n.itemMap.values()),i=r.sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current));return i},[n.collectionRef,n.itemMap]);return r},r]}var O=n(41816),C=n(73597),M=n(72130),A=n(64680),T=n(28245),P=n(26074);let N="Collapsible",[R,D]=(0,j.b)(N),[L,F]=R(N),V=((e,t)=>{let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:a,...s}=e,[l=!1,u]=(0,C.T)({prop:r,defaultProp:i,onChange:a});return(0,b.createElement)(L,{scope:n,disabled:o,contentId:(0,P.M)(),open:l,onOpenToggle:(0,b.useCallback)(()=>u(e=>!e),[u])},(0,b.createElement)(M.WV.div,(0,E.Z)({"data-state":I(l),"data-disabled":o?"":void 0},s,{ref:t})))},"CollapsibleContent"),z=((e,t)=>{let{forceMount:n,...r}=e,i=F(V,e.__scopeCollapsible);return(0,b.createElement)(T.z,{present:n||i.open},({present:e})=>(0,b.createElement)(z,(0,E.Z)({},r,{ref:t,present:e})))},(0,b.forwardRef)((e,t)=>{let{__scopeCollapsible:n,present:r,children:i,...o}=e,a=F(V,n),[s,l]=(0,b.useState)(r),u=(0,b.useRef)(null),c=(0,k.e)(t,u),d=(0,b.useRef)(0),f=d.current,h=(0,b.useRef)(0),p=h.current,m=a.open||s,v=(0,b.useRef)(m),g=(0,b.useRef)();return(0,b.useEffect)(()=>{let e=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,A.b)(()=>{let e=u.current;if(e){g.current=g.current||{transitionDuration:e.style.transitionDuration,animationDuration:e.style.animationDuration,animationFillMode:e.style.animationFillMode},e.style.transitionDuration="0s",e.style.animationDuration="0s",e.style.animationFillMode="none";let t=e.getBoundingClientRect();d.current=t.height,h.current=t.width,v.current||(e.style.transitionDuration=g.current.transitionDuration,e.style.animationDuration=g.current.animationDuration,e.style.animationFillMode=g.current.animationFillMode),l(r)}},[a.open,r]),(0,b.createElement)(M.WV.div,(0,E.Z)({"data-state":I(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!m},o,{ref:c,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":p?`${p}px`:void 0,...e.style}}),m&&i)}));function I(e){return e?"open":"closed"}let Z="Accordion",B=["Home","End","ArrowDown","ArrowUp"],[H,U,W]=_(Z),[q,$]=(0,j.b)(Z,[W,D]),Y=(D(),b.forwardRef((e,t)=>{let{type:n,...r}=e;return b.createElement(H.Provider,{scope:e.__scopeAccordion},"multiple"===n?b.createElement(ee,(0,E.Z)({},r,{ref:t})):b.createElement(J,(0,E.Z)({},r,{ref:t})))}));Y.propTypes={type(e){let t=e.value||e.defaultValue;return e.type&&!["single","multiple"].includes(e.type)?Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`."):"multiple"===e.type&&"string"==typeof t?Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`."):"single"===e.type&&Array.isArray(t)?Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`."):null}};let[G,X]=q(Z),[K,Q]=q(Z,{collapsible:!1}),J=b.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},collapsible:o=!1,...a}=e,[s,l]=(0,C.T)({prop:n,defaultProp:r,onChange:i});return b.createElement(G,{scope:e.__scopeAccordion,value:s?[s]:[],onItemOpen:l,onItemClose:b.useCallback(()=>o&&l(""),[o,l])},b.createElement(K,{scope:e.__scopeAccordion,collapsible:o},b.createElement(er,(0,E.Z)({},a,{ref:t}))))}),ee=b.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...o}=e,[a=[],s]=(0,C.T)({prop:n,defaultProp:r,onChange:i}),l=b.useCallback(e=>s((t=[])=>[...t,e]),[s]),u=b.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return b.createElement(G,{scope:e.__scopeAccordion,value:a,onItemOpen:l,onItemClose:u},b.createElement(K,{scope:e.__scopeAccordion,collapsible:!0},b.createElement(er,(0,E.Z)({},o,{ref:t}))))}),[et,en]=q(Z),er=b.forwardRef((e,t)=>{let{__scopeAccordion:n,disabled:r,...i}=e,o=b.useRef(null),a=(0,k.e)(o,t),s=U(n),l=(0,O.M)(e.onKeyDown,e=>{var t;if(!B.includes(e.key))return;let n=e.target,r=s().filter(e=>{var t;return!(null!==(t=e.ref.current)&&void 0!==t&&t.disabled)}),i=r.findIndex(e=>e.ref.current===n),o=r.length;if(-1===i)return;e.preventDefault();let a=i;switch(e.key){case"Home":a=0;break;case"End":a=o-1;break;case"ArrowDown":a=i+1;break;case"ArrowUp":(a=i-1)<0&&(a=o-1)}let l=a%o;null===(t=r[l].ref.current)||void 0===t||t.focus()});return b.createElement(et,{scope:n,disabled:r},b.createElement(H.Slot,{scope:n},b.createElement(M.WV.div,(0,E.Z)({},i,{ref:a,onKeyDown:r?void 0:l}))))}),[ei,eo]=q("AccordionItem");var ea=n(82851),es=n(83317);function el(e){return e.split("-")[0]}function eu(e){return e.split("-")[1]}function ec(e){return["top","bottom"].includes(el(e))?"x":"y"}function ed(e){return"y"===e?"height":"width"}function ef(e,t,n){let r,{reference:i,floating:o}=e,a=i.x+i.width/2-o.width/2,s=i.y+i.height/2-o.height/2,l=ec(t),u=ed(l),c=i[u]/2-o[u]/2,d="x"===l;switch(el(t)){case"top":r={x:a,y:i.y-o.height};break;case"bottom":r={x:a,y:i.y+i.height};break;case"right":r={x:i.x+i.width,y:s};break;case"left":r={x:i.x-o.width,y:s};break;default:r={x:i.x,y:i.y}}switch(eu(t)){case"start":r[l]-=c*(n&&d?-1:1);break;case"end":r[l]+=c*(n&&d?-1:1)}return r}let eh=async(e,t,n)=>{let{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await (null==a.isRTL?void 0:a.isRTL(t)),l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:c}=ef(l,r,s),d=r,f={},h=0;for(let n=0;n({name:"arrow",options:e,async fn(t){let{element:n,padding:r=0}=null!=e?e:{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(null==n)return{};let u=ep(r),c={x:i,y:o},d=ec(a),f=eu(a),h=ed(d),p=await l.getDimensions(n),m="y"===d?"top":"left",v="y"===d?"bottom":"right",g=s.reference[h]+s.reference[d]-c[d]-s.floating[h],y=c[d]-s.reference[d],x=await (null==l.getOffsetParent?void 0:l.getOffsetParent(n)),b=x?"y"===d?x.clientHeight||0:x.clientWidth||0:0;0===b&&(b=s.floating[h]);let w=u[m],E=b-p[h]-u[v],j=b/2-p[h]/2+(g/2-y/2),k=ey(w,eg(j,E)),S=("start"===f?u[m]:u[v])>0&&j!==k&&s.reference[h]<=s.floating[h];return{[d]:c[d]-(S?jeb[e])}let eE={start:"end",end:"start"};function ej(e){return e.replace(/start|end/g,e=>eE[e])}let ek=["top","right","bottom","left"];ek.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);let eS=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r,i,o;let{placement:a,middlewareData:s,rects:l,initialPlacement:u,platform:c,elements:d}=t,{mainAxis:f=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...g}=e,y=el(a),x=p||(y!==u&&v?function(e){let t=ew(e);return[ej(e),t,ej(t)]}(u):[ew(u)]),b=[u,...x],w=await ev(t,g),E=[],j=(null==(n=s.flip)?void 0:n.overflows)||[];if(f&&E.push(w[y]),h){let{main:e,cross:t}=function(e,t,n){void 0===n&&(n=!1);let r=eu(e),i=ec(e),o=ed(i),a="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=ew(a)),{main:a,cross:ew(a)}}(a,l,await (null==c.isRTL?void 0:c.isRTL(d.floating)));E.push(w[e],w[t])}if(j=[...j,{placement:a,overflows:E}],!E.every(e=>e<=0)){let e=(null!=(r=null==(i=s.flip)?void 0:i.index)?r:0)+1,t=b[e];if(t)return{data:{index:e,overflows:j},reset:{placement:t}};let n="bottom";switch(m){case"bestFit":{let e=null==(o=j.map(e=>[e,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:o[0].placement;e&&(n=e);break}case"initialPlacement":n=u}if(a!==n)return{reset:{placement:n}}}return{}}}};function e_(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function eO(e){return ek.some(t=>e[t]>=0)}let eC=function(e){let{strategy:t="referenceHidden",...n}=void 0===e?{}:e;return{name:"hide",async fn(e){let{rects:r}=e;switch(t){case"referenceHidden":{let t=e_(await ev(e,{...n,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:eO(t)}}}case"escaped":{let t=e_(await ev(e,{...n,altBoundary:!0}),r.floating);return{data:{escapedOffsets:t,escaped:eO(t)}}}default:return{}}}}},eM=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){let{x:n,y:r}=t,i=await async function(e,t){let{placement:n,platform:r,elements:i}=e,o=await (null==r.isRTL?void 0:r.isRTL(i.floating)),a=el(n),s=eu(n),l="x"===ec(n),u=["left","top"].includes(a)?-1:1,c=o&&l?-1:1,d="function"==typeof t?t(e):t,{mainAxis:f,crossAxis:h,alignmentAxis:p}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&"number"==typeof p&&(h="end"===s?-1*p:p),l?{x:h*c,y:f*u}:{x:f*u,y:h*c}}(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function eA(e){return"x"===e?"y":"x"}let eT=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=e,u={x:n,y:r},c=await ev(t,l),d=ec(el(i)),f=eA(d),h=u[d],p=u[f];if(o){let e="y"===d?"bottom":"right";h=ey(h+c["y"===d?"top":"left"],eg(h,h-c[e]))}a&&(p=ey(p+c["y"===f?"top":"left"],eg(p,p-c["y"===f?"bottom":"right"])));let m=s.fn({...t,[d]:h,[f]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},eP=function(e){return void 0===e&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,c={x:n,y:r},d=ec(i),f=eA(d),h=c[d],p=c[f],m="function"==typeof s?s({...o,placement:i}):s,v="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){let e="y"===d?"height":"width",t=o.reference[d]-o.floating[e]+v.mainAxis,n=o.reference[d]+o.reference[e]-v.mainAxis;hn&&(h=n)}if(u){var g,y,x,b;let e="y"===d?"width":"height",t=["top","left"].includes(el(i)),n=o.reference[f]-o.floating[e]+(t&&null!=(g=null==(y=a.offset)?void 0:y[f])?g:0)+(t?0:v.crossAxis),r=o.reference[f]+o.reference[e]+(t?0:null!=(x=null==(b=a.offset)?void 0:b[f])?x:0)-(t?v.crossAxis:0);pr&&(p=r)}return{[d]:h,[f]:p}}}};function eN(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function eR(e){if(null==e)return window;if(!eN(e)){let t=e.ownerDocument;return t&&t.defaultView||window}return e}function eD(e){return eR(e).getComputedStyle(e)}function eL(e){return eN(e)?"":e?(e.nodeName||"").toLowerCase():""}function eF(){let e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map(e=>e.brand+"/"+e.version).join(" "):navigator.userAgent}function eV(e){return e instanceof eR(e).HTMLElement}function ez(e){return e instanceof eR(e).Element}function eI(e){return"undefined"!=typeof ShadowRoot&&(e instanceof eR(e).ShadowRoot||e instanceof ShadowRoot)}function eZ(e){let{overflow:t,overflowX:n,overflowY:r}=eD(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function eB(e){let t=/firefox/i.test(eF()),n=eD(e);return"none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||["transform","perspective"].includes(n.willChange)||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter}function eH(){return!/^((?!chrome|android).)*safari/i.test(eF())}let eU=Math.min,eW=Math.max,eq=Math.round;function e$(e,t,n){var r,i,o,a;void 0===t&&(t=!1),void 0===n&&(n=!1);let s=e.getBoundingClientRect(),l=1,u=1;t&&eV(e)&&(l=e.offsetWidth>0&&eq(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&eq(s.height)/e.offsetHeight||1);let c=ez(e)?eR(e):window,d=!eH()&&n,f=(s.left+(d&&null!=(r=null==(i=c.visualViewport)?void 0:i.offsetLeft)?r:0))/l,h=(s.top+(d&&null!=(o=null==(a=c.visualViewport)?void 0:a.offsetTop)?o:0))/u,p=s.width/l,m=s.height/u;return{width:p,height:m,top:h,right:f+p,bottom:h+m,left:f,x:f,y:h}}function eY(e){return((e instanceof eR(e).Node?e.ownerDocument:e.document)||window.document).documentElement}function eG(e){return ez(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function eX(e){return e$(eY(e)).left+eG(e).scrollLeft}function eK(e){return"html"===eL(e)?e:e.assignedSlot||e.parentNode||(eI(e)?e.host:null)||eY(e)}function eQ(e){return eV(e)&&"fixed"!==getComputedStyle(e).position?e.offsetParent:null}function eJ(e){let t=eR(e),n=eQ(e);for(;n&&["table","td","th"].includes(eL(n))&&"static"===getComputedStyle(n).position;)n=eQ(n);return n&&("html"===eL(n)||"body"===eL(n)&&"static"===getComputedStyle(n).position&&!eB(n))?t:n||function(e){let t=eK(e);for(eI(t)&&(t=t.host);eV(t)&&!["html","body"].includes(eL(t));){if(eB(t))return t;t=t.parentNode}return null}(e)||t}function e0(e){if(eV(e))return{width:e.offsetWidth,height:e.offsetHeight};let t=e$(e);return{width:t.width,height:t.height}}function e1(e,t){var n;void 0===t&&(t=[]);let r=function e(t){let n=eK(t);return["html","body","#document"].includes(eL(n))?t.ownerDocument.body:eV(n)&&eZ(n)?n:e(n)}(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=eR(r),a=i?[o].concat(o.visualViewport||[],eZ(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(e1(a))}function e2(e,t,n){return"viewport"===t?em(function(e,t){let n=eR(e),r=eY(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;let e=eH();(e||!e&&"fixed"===t)&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}(e,n)):ez(t)?function(e,t){let n=e$(e,!1,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,n):em(function(e){var t;let n=eY(e),r=eG(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=eW(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=eW(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+eX(e),l=-r.scrollTop;return"rtl"===eD(i||n).direction&&(s+=eW(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}(eY(e)))}let e4={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,o=[..."clippingAncestors"===n?function(e){let t=e1(e),n=["absolute","fixed"].includes(eD(e).position)&&eV(e)?eJ(e):e;return ez(n)?t.filter(e=>ez(e)&&function(e,t){let n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&eI(n)){let n=t;do{if(n&&e===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(e,n)&&"body"!==eL(e)):[]}(t):[].concat(n),r],a=o[0],s=o.reduce((e,n)=>{let r=e2(t,n,i);return e.top=eW(r.top,e.top),e.right=eU(r.right,e.right),e.bottom=eU(r.bottom,e.bottom),e.left=eW(r.left,e.left),e},e2(t,a,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e,i=eV(n),o=eY(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0},s={x:0,y:0};if((i||!i&&"fixed"!==r)&&(("body"!==eL(n)||eZ(o))&&(a=eG(n)),eV(n))){let e=e$(n,!0);s.x=e.x+n.clientLeft,s.y=e.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}},isElement:ez,getDimensions:e0,getOffsetParent:eJ,getDocumentElement:eY,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:function(e,t,n){let r=eV(t),i=eY(t),o=e$(e,r&&function(e){let t=e$(e);return eq(t.width)!==e.offsetWidth||eq(t.height)!==e.offsetHeight}(t),"fixed"===n),a={scrollLeft:0,scrollTop:0},s={x:0,y:0};if(r||!r&&"fixed"!==n){if(("body"!==eL(t)||eZ(i))&&(a=eG(t)),eV(t)){let e=e$(t,!0);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else i&&(s.x=eX(i))}return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}(t,eJ(n),r),floating:{...e0(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===eD(e).direction};function e3(e,t,n,r){void 0===r&&(r={});let{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,c=l||u?[...ez(e)?e1(e):[],...e1(t)]:[];c.forEach(e=>{l&&e.addEventListener("scroll",n,{passive:!0}),u&&e.addEventListener("resize",n)});let d,f=null;if(a){let r=!0;f=new ResizeObserver(()=>{r||n(),r=!1}),ez(e)&&!s&&f.observe(e),f.observe(t)}let h=s?e$(e):null;return s&&function t(){let r=e$(e);h&&(r.x!==h.x||r.y!==h.y||r.width!==h.width||r.height!==h.height)&&n(),h=r,d=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach(e=>{l&&e.removeEventListener("scroll",n),u&&e.removeEventListener("resize",n)}),null==(e=f)||e.disconnect(),f=null,s&&cancelAnimationFrame(d)}}let e5=(e,t,n)=>eh(e,t,{platform:e4,...n});var e6=n(28316),e8="undefined"!=typeof document?b.useLayoutEffect:b.useEffect;function e7(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=void 0===e?{}:e,o=b.useRef(null),a=b.useRef(null),s=function(e){let t=b.useRef(e);return e8(()=>{t.current=e}),t}(i),l=b.useRef(null),[u,c]=b.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[d,f]=b.useState(t);!function e(t,n){let r,i,o;if(t===n)return!0;if(typeof t!=typeof n)return!1;if("function"==typeof t&&t.toString()===n.toString())return!0;if(t&&n&&"object"==typeof t){if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!=i--;)if(!e(t[i],n[i]))return!1;return!0}if((r=(o=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;0!=i--;){let r=o[i];if(("_owner"!==r||!t.$$typeof)&&!e(t[r],n[r]))return!1}return!0}return t!=t&&n!=n}(null==d?void 0:d.map(e=>{let{options:t}=e;return t}),null==t?void 0:t.map(e=>{let{options:t}=e;return t}))&&f(t);let h=b.useCallback(()=>{o.current&&a.current&&e5(o.current,a.current,{middleware:d,placement:n,strategy:r}).then(e=>{p.current&&e6.flushSync(()=>{c(e)})})},[d,n,r]);e8(()=>{p.current&&h()},[h]);let p=b.useRef(!1);e8(()=>(p.current=!0,()=>{p.current=!1}),[]);let m=b.useCallback(()=>{if("function"==typeof l.current&&(l.current(),l.current=null),o.current&&a.current){if(s.current){let e=s.current(o.current,a.current,h);l.current=e}else h()}},[h,s]),v=b.useCallback(e=>{o.current=e,m()},[m]),g=b.useCallback(e=>{a.current=e,m()},[m]),y=b.useMemo(()=>({reference:o,floating:a}),[]);return b.useMemo(()=>({...u,update:h,refs:y,reference:v,floating:g}),[u,h,y,v,g])}let e9=e=>{let{element:t,padding:n}=e;return{name:"arrow",options:e,fn(e){if(Object.prototype.hasOwnProperty.call(t,"current")){if(null!=t.current)return ex({element:t.current,padding:n}).fn(e)}else if(t)return ex({element:t,padding:n}).fn(e);return{}}}},te=(0,b.forwardRef)((e,t)=>{let{children:n,width:r=10,height:i=5,...o}=e;return(0,b.createElement)(M.WV.svg,(0,E.Z)({},o,{ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:(0,b.createElement)("polygon",{points:"0,0 30,0 15,10"}))});function tt(e){let[t,n]=(0,b.useState)(void 0);return(0,A.b)(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let r,i;if(!Array.isArray(t)||!t.length)return;let o=t[0];if("borderBoxSize"in o){let e=o.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,i=t.blockSize}else r=e.offsetWidth,i=e.offsetHeight;n({width:r,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}let tn="Popper",[tr,ti]=(0,j.b)(tn),[to,ta]=tr(tn),ts=(0,b.forwardRef)((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,o=ta("PopperAnchor",n),a=(0,b.useRef)(null),s=(0,k.e)(t,a);return(0,b.useEffect)(()=>{o.onAnchorChange((null==r?void 0:r.current)||a.current)}),r?null:(0,b.createElement)(M.WV.div,(0,E.Z)({},i,{ref:s}))}),tl="PopperContent",[tu,tc]=tr(tl),[td,tf]=tr(tl,{hasParent:!1,positionUpdateFns:new Set}),th=(0,b.forwardRef)((e,t)=>{var n,r,i,o,a,s,l,u;let{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:h="center",alignOffset:p=0,arrowPadding:m=0,collisionBoundary:v=[],collisionPadding:g=0,sticky:y="partial",hideWhenDetached:x=!1,avoidCollisions:w=!0,...E}=e,j=ta(tl,c),[S,_]=(0,b.useState)(null),O=(0,k.e)(t,e=>_(e)),[C,T]=(0,b.useState)(null),P=tt(C),N=null!==(n=null==P?void 0:P.width)&&void 0!==n?n:0,R=null!==(r=null==P?void 0:P.height)&&void 0!==r?r:0,D="number"==typeof g?g:{top:0,right:0,bottom:0,left:0,...g},L=Array.isArray(v)?v:[v],F=L.length>0,V={padding:D,boundary:L.filter(tg),altBoundary:F},{reference:z,floating:I,strategy:Z,x:B,y:H,placement:U,middlewareData:W,update:q}=e7({strategy:"fixed",placement:d+("center"!==h?"-"+h:""),whileElementsMounted:e3,middleware:[eM({mainAxis:f+R,alignmentAxis:p}),w?eT({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?eP():void 0,...V}):void 0,C?e9({element:C,padding:m}):void 0,w?eS({...V}):void 0,ty({arrowWidth:N,arrowHeight:R}),x?eC({strategy:"referenceHidden"}):void 0].filter(tv)});(0,A.b)(()=>{z(j.anchor)},[z,j.anchor]);let $=null!==B&&null!==H,[Y,G]=tx(U),X=null===(i=W.arrow)||void 0===i?void 0:i.x,K=null===(o=W.arrow)||void 0===o?void 0:o.y,Q=(null===(a=W.arrow)||void 0===a?void 0:a.centerOffset)!==0,[J,ee]=(0,b.useState)();(0,A.b)(()=>{S&&ee(window.getComputedStyle(S).zIndex)},[S]);let{hasParent:et,positionUpdateFns:en}=tf(tl,c),er=!et;(0,b.useLayoutEffect)(()=>{if(!er)return en.add(q),()=>{en.delete(q)}},[er,en,q]),(0,b.useLayoutEffect)(()=>{er&&$&&Array.from(en).reverse().forEach(e=>requestAnimationFrame(e))},[er,$,en]);let ei={"data-side":Y,"data-align":G,...E,ref:O,style:{...E.style,animation:$?void 0:"none",opacity:null!==(s=W.hide)&&void 0!==s&&s.referenceHidden?0:void 0}};return(0,b.createElement)("div",{ref:I,"data-radix-popper-content-wrapper":"",style:{position:Z,left:0,top:0,transform:$?`translate3d(${Math.round(B)}px, ${Math.round(H)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:J,"--radix-popper-transform-origin":[null===(l=W.transformOrigin)||void 0===l?void 0:l.x,null===(u=W.transformOrigin)||void 0===u?void 0:u.y].join(" ")}},(0,b.createElement)(tu,{scope:c,placedSide:Y,onArrowChange:T,arrowX:X,arrowY:K,shouldHideArrow:Q},er?(0,b.createElement)(td,{scope:c,hasParent:!0,positionUpdateFns:en},(0,b.createElement)(M.WV.div,ei)):(0,b.createElement)(M.WV.div,ei)))}),tp={top:"bottom",right:"left",bottom:"top",left:"right"},tm=(0,b.forwardRef)(function(e,t){let{__scopePopper:n,...r}=e,i=tc("PopperArrow",n),o=tp[i.placedSide];return(0,b.createElement)("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0}},(0,b.createElement)(te,(0,E.Z)({},r,{ref:t,style:{...r.style,display:"block"}})))});function tv(e){return void 0!==e}function tg(e){return null!==e}let ty=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;let{placement:s,rects:l,middlewareData:u}=t,c=(null===(n=u.arrow)||void 0===n?void 0:n.centerOffset)!==0,d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[h,p]=tx(s),m={start:"0%",center:"50%",end:"100%"}[p],v=(null!==(r=null===(i=u.arrow)||void 0===i?void 0:i.x)&&void 0!==r?r:0)+d/2,g=(null!==(o=null===(a=u.arrow)||void 0===a?void 0:a.y)&&void 0!==o?o:0)+f/2,y="",x="";return"bottom"===h?(y=c?m:`${v}px`,x=`${-f}px`):"top"===h?(y=c?m:`${v}px`,x=`${l.floating.height+f}px`):"right"===h?(y=`${-f}px`,x=c?m:`${g}px`):"left"===h&&(y=`${l.floating.width+f}px`,x=c?m:`${g}px`),{data:{x:y,y:x}}}});function tx(e){let[t,n="center"]=e.split("-");return[t,n]}let tb=e=>{let{__scopePopper:t,children:n}=e,[r,i]=(0,b.useState)(null);return(0,b.createElement)(to,{scope:t,anchor:r,onAnchorChange:i},n)};var tw=n(6500);let tE=(0,b.forwardRef)((e,t)=>(0,b.createElement)(M.WV.span,(0,E.Z)({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))),[tj,tk]=(0,j.b)("Tooltip",[ti]),tS=ti(),t_="tooltip.open",[tO,tC]=tj("TooltipProvider"),tM="Tooltip",[tA,tT]=tj(tM),tP="TooltipTrigger",tN=(0,b.forwardRef)((e,t)=>{let{__scopeTooltip:n,...r}=e,i=tT(tP,n),o=tC(tP,n),a=tS(n),s=(0,b.useRef)(null),l=(0,k.e)(t,s,i.onTriggerChange),u=(0,b.useRef)(!1),c=(0,b.useRef)(!1),d=(0,b.useCallback)(()=>u.current=!1,[]);return(0,b.useEffect)(()=>()=>document.removeEventListener("pointerup",d),[d]),(0,b.createElement)(ts,(0,E.Z)({asChild:!0},a),(0,b.createElement)(M.WV.button,(0,E.Z)({"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute},r,{ref:l,onPointerMove:(0,O.M)(e.onPointerMove,e=>{"touch"===e.pointerType||c.current||o.isPointerInTransitRef.current||(i.onTriggerEnter(),c.current=!0)}),onPointerLeave:(0,O.M)(e.onPointerLeave,()=>{i.onTriggerLeave(),c.current=!1}),onPointerDown:(0,O.M)(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:(0,O.M)(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:(0,O.M)(e.onBlur,i.onClose),onClick:(0,O.M)(e.onClick,e=>{let t=0===e.detail;t&&i.onClose()})})))}),tR="TooltipPortal",[tD,tL]=tj(tR,{forceMount:void 0}),tF="TooltipContent",tV=(0,b.forwardRef)((e,t)=>{let n=tL(tF,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,a=tT(tF,e.__scopeTooltip);return(0,b.createElement)(T.z,{present:r||a.open},a.disableHoverableContent?(0,b.createElement)(tB,(0,E.Z)({side:i},o,{ref:t})):(0,b.createElement)(tz,(0,E.Z)({side:i},o,{ref:t})))}),tz=(0,b.forwardRef)((e,t)=>{let n=tT(tF,e.__scopeTooltip),r=tC(tF,e.__scopeTooltip),i=(0,b.useRef)(null),o=(0,k.e)(t,i),[a,s]=(0,b.useState)(null),{trigger:l,onClose:u}=n,c=i.current,{onPointerInTransitChange:d}=r,f=(0,b.useCallback)(()=>{s(null),d(!1)},[d]),h=(0,b.useCallback)((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=function(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:return null}}(r,n.getBoundingClientRect()),o="right"===i||"bottom"===i?-5:5,a="right"===i||"left"===i?{x:e.clientX+o,y:e.clientY}:{x:e.clientX,y:e.clientY+o},l=function(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}(t.getBoundingClientRect()),u=function(e){let t=e.slice();return t.sort((e,t)=>e.xt.x?1:e.yt.y?1:0),function(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return(n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y)?t:t.concat(n)}(t)}([a,...l]);s(u),d(!0)},[d]);return(0,b.useEffect)(()=>()=>f(),[f]),(0,b.useEffect)(()=>{if(l&&c){let e=e=>h(e,c),t=e=>h(e,l);return l.addEventListener("pointerleave",e),c.addEventListener("pointerleave",t),()=>{l.removeEventListener("pointerleave",e),c.removeEventListener("pointerleave",t)}}},[l,c,h,f]),(0,b.useEffect)(()=>{if(a){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=(null==l?void 0:l.contains(t))||(null==c?void 0:c.contains(t)),i=!function(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,o=t.length-1;er!=u>r&&n<(l-a)*(r-s)/(u-s)+a;c&&(i=!i)}return i}(n,a);r?f():i&&(f(),u())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[l,c,a,u,f]),(0,b.createElement)(tB,(0,E.Z)({},e,{ref:o}))}),[tI,tZ]=tj(tM,{isInside:!1}),tB=(0,b.forwardRef)((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:a,...s}=e,l=tT(tF,n),u=tS(n),{onClose:c}=l;return(0,b.useEffect)(()=>(document.addEventListener(t_,c),()=>document.removeEventListener(t_,c)),[c]),(0,b.useEffect)(()=>{if(l.trigger){let e=e=>{let t=e.target;null!=t&&t.contains(l.trigger)&&c()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[l.trigger,c]),(0,b.createElement)(es.XB,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:e=>e.preventDefault(),onDismiss:c},(0,b.createElement)(th,(0,E.Z)({"data-state":l.stateAttribute},u,s,{ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)"}}),(0,b.createElement)(S.A4,null,r),(0,b.createElement)(tI,{scope:n,isInside:!0},(0,b.createElement)(tE,{id:l.contentId,role:"tooltip"},i||r))))}),tH=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i=!1,onOpenChange:o,disableHoverableContent:a,delayDuration:s}=e,l=tC(tM,e.__scopeTooltip),u=tS(t),[c,d]=(0,b.useState)(null),f=(0,P.M)(),h=(0,b.useRef)(0),p=null!=a?a:l.disableHoverableContent,m=null!=s?s:l.delayDuration,v=(0,b.useRef)(!1),[g=!1,y]=(0,C.T)({prop:r,defaultProp:i,onChange:e=>{e?(l.onOpen(),document.dispatchEvent(new CustomEvent(t_))):l.onClose(),null==o||o(e)}}),x=(0,b.useMemo)(()=>g?v.current?"delayed-open":"instant-open":"closed",[g]),w=(0,b.useCallback)(()=>{window.clearTimeout(h.current),v.current=!1,y(!0)},[y]),E=(0,b.useCallback)(()=>{window.clearTimeout(h.current),y(!1)},[y]),j=(0,b.useCallback)(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,y(!0)},m)},[m,y]);return(0,b.useEffect)(()=>()=>window.clearTimeout(h.current),[]),(0,b.createElement)(tb,u,(0,b.createElement)(tA,{scope:t,contentId:f,open:g,stateAttribute:x,trigger:c,onTriggerChange:d,onTriggerEnter:(0,b.useCallback)(()=>{l.isOpenDelayed?j():w()},[l.isOpenDelayed,j,w]),onTriggerLeave:(0,b.useCallback)(()=>{p?E():window.clearTimeout(h.current)},[E,p]),onOpen:w,onClose:E,disableHoverableContent:p},n))},tU=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,o=tT(tR,t);return(0,b.createElement)(tD,{scope:t,forceMount:n},(0,b.createElement)(T.z,{present:n||o.open},(0,b.createElement)(tw.h,{asChild:!0,container:i},r)))},tW=(0,ea.j)([],{variants:{display:{default:"inline-block",none:""},font:{mono:"font-mono",sans:"font-sans"},color:{verySubtle:"text-gray-700 dark:text-graydark-700",subtle:"text-gray-1000 dark:text-graydark-1000",contrast:"text-gray-1100 dark:text-white",lo:"text-white dark:text-graydark-50",accent:"text-accent-1100 dark:text-accentdark-1100",red:"text-red-700 dark:text-red-400",green:"text-emerald-700 dark:text-emerald-500",amber:"text-amber-600 dark:text-amber-500",none:""},weight:{extrabold:"font-extrabold",bold:"font-bold",medium:"font-medium",semibold:"font-semibold",regular:"font-normal",normal:"font-normal",light:"font-light",none:""},size:{10:"text-xxs",12:"text-xs",14:"text-sm",16:"text-base",18:"text-lg",20:"text-xl",24:"text-2xl",30:"text-3xl",36:"text-4xl",40:"text-5xl",48:"text-5xl",60:"text-6xl",64:"text-6xl"},scaleSize:{12:"text-xxs md:text-xs",14:"text-xs md:text-sm",16:"text-sm md:text-base",18:"text-base md:text-lg",20:"text-base md:text-xl",24:"text-xl md:text-2xl",30:"text-2xl md:text-3xl",36:"text-3xl md:text-4xl",40:"text-4xl md:text-5xl",48:"text-4xl md:text-5xl",60:"text-5xl md:text-6xl",64:"text-5xl md:text-6xl"},noWrap:{true:"whitespace-nowrap"},underline:{accent:"underline underline-offset-2 decoration-2 decoration-accent-900 dark:decoration-accentdark-900",show:"underline underline-offset-2 decoration-gray-1100 dark:decoration-gray-500",hover:"hover:underline underline-offset-2 decoration-gray-1100 dark:decoration-gray-500",none:""},ellipsis:{true:"overflow-hidden text-ellipsis whitespace-nowrap"},wrapEllipsis:{true:"overflow-hidden text-ellipsis"}},defaultVariants:{display:"default",weight:"regular",font:"sans",color:"contrast",underline:"none"}}),tq=b.forwardRef((e,t)=>{let{tag:n="span",className:r,font:i,color:o,weight:a,size:s,scaleSize:l,noWrap:u,underline:c,ellipsis:d,wrapEllipsis:f,...h}=e;return(0,x.jsx)(n,{ref:t,className:(0,ea.cx)(r,tW({font:i,color:o,weight:a,size:s,scaleSize:l,underline:c,noWrap:u,ellipsis:d,wrapEllipsis:f})),...h})}),t$=b.forwardRef((e,t)=>{let{size:n="18",...r}=e;return(0,x.jsx)(tq,{tag:"p",...r,ref:t,weight:"regular",scaleSize:n,color:"subtle",className:(0,ea.cx)("leading-relaxed md:leading-relaxed",e.className)})}),tY=(0,ea.j)(["bg-white dark:bg-graydark-200","transition-shadow ease-in-out duration-300","shadow-sm hover:shadow","rounded","border","border-gray-400 dark:border-graydark-400"]),tG=b.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,x.jsx)("div",{ref:t,className:tY({className:n}),...r})});var tX=n(34406);let tK=(void 0===tX||tX.env,"production"),tQ=1/60*1e3,tJ="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),t0="undefined"!=typeof window?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(tJ()),tQ),t1=!0,t2=!1,t4=!1,t3={delta:0,timestamp:0},t5=["read","update","preRender","render","postRender"],t6=t5.reduce((e,t)=>(e[t]=function(e){let t=[],n=[],r=0,i=!1,o=!1,a=new WeakSet,s={schedule:(e,o=!1,s=!1)=>{let l=s&&i,u=l?t:n;return o&&a.add(e),-1===u.indexOf(e)&&(u.push(e),l&&i&&(r=t.length)),e},cancel:e=>{let t=n.indexOf(e);-1!==t&&n.splice(t,1),a.delete(e)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length)for(let n=0;nt2=!0),e),{}),t8=t5.reduce((e,t)=>{let n=t6[t];return e[t]=(e,t=!1,r=!1)=>(t2||nn(),n.schedule(e,t,r)),e},{}),t7=t5.reduce((e,t)=>(e[t]=t6[t].cancel,e),{}),t9=t5.reduce((e,t)=>(e[t]=()=>t6[t].process(t3),e),{}),ne=e=>t6[e].process(t3),nt=e=>{t2=!1,t3.delta=t1?tQ:Math.max(Math.min(e-t3.timestamp,40),1),t3.timestamp=e,t4=!0,t5.forEach(ne),t4=!1,t2&&(t1=!1,t0(nt))},nn=()=>{t2=!0,t1=!0,t4||t0(nt)},nr=()=>t3,ni="undefined"!=typeof document,no=ni?b.useLayoutEffect:b.useEffect;function na(){let e=(0,b.useRef)(!1);return no(()=>(e.current=!0,()=>{e.current=!1}),[]),e}let ns=(0,b.createContext)(null);function nl(e){let t=(0,b.useRef)(null);return null===t.current&&(t.current=e()),t.current}class nu extends b.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){let e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function nc({children:e,isPresent:t}){let n=(0,b.useId)(),r=(0,b.useRef)(null),i=(0,b.useRef)({width:0,height:0,top:0,left:0});return(0,b.useInsertionEffect)(()=>{let{width:e,height:o,top:a,left:s}=i.current;if(t||!r.current||!e||!o)return;r.current.dataset.motionPopId=n;let l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(`
[data-motion-pop-id="${n}"] {
position: absolute !important;
width: ${e}px !important;
@@ -44,7 +44,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
-***************************************************************************** */var d0=function(){return(d0=Object.assign||function(e){for(var t,n=1,r=arguments.length;n1){if(e.includes(t)){var r=e.split(t),i=r[0],o=r[1];if(o.length>n)return""+i+t+o.slice(0,n)}var a=e.length>n?RegExp("(\\d+)(\\d{"+n+"})"):RegExp("(\\d)(\\d+)"),s=e.match(a);if(s){var i=s[1],o=s[2];return""+i+t+o}}return e},d9=function(e,t){var n=t.groupSeparator,r=t.decimalSeparator,i=RegExp("\\d([^"+d2(void 0===n?",":n)+d2(void 0===r?".":r)+"0-9]+)"),o=e.match(i);return o?o[1]:void 0},fe=function(e){var t=e.value,n=e.decimalSeparator,r=e.intlConfig,i=e.decimalScale,o=e.prefix,a=void 0===o?"":o,s=e.suffix,l=void 0===s?"":s;if(""===t||void 0===t)return"";if("-"===t)return"-";var u=RegExp("^\\d?-"+(a?d2(a)+"?":"")+"\\d").test(t),c="."!==n?ft(t,n,u):t,d=fn((r?new Intl.NumberFormat(r.locale,r.currency?{style:"currency",currency:r.currency,minimumFractionDigits:i||0,maximumFractionDigits:20}:void 0):new Intl.NumberFormat(void 0,{minimumFractionDigits:i||0,maximumFractionDigits:20})).formatToParts(Number(c)),e),f=d9(d,d0({},e)),h=t.slice(-1)===n?n:"",p=(c.match(RegExp("\\d+\\.(\\d+)"))||[])[1];return(void 0===i&&p&&n&&(d=d.includes(n)?d.replace(RegExp("(\\d+)("+d2(n)+")(\\d+)","g"),"$1$2"+p):f&&!l?d.replace(f,""+n+p+f):""+d+n+p),l&&h)?""+d+h+l:f&&h?d.replace(f,""+h+f):f&&l?d.replace(f,""+h+l):[d,h,l].join("")},ft=function(e,t,n){var r=e;return t&&"."!==t&&(r=r.replace(RegExp(d2(t),"g"),"."),n&&"-"===t&&(r="-"+r.slice(1))),r},fn=function(e,t){var n=t.prefix,r=t.groupSeparator,i=t.decimalSeparator,o=t.decimalScale,a=t.disableGroupSeparators,s=void 0!==a&&a;return e.reduce(function(e,t,a){var l=t.type,u=t.value;return 0===a&&n?"minusSign"===l?[u,n]:"currency"===l?d1(d1([],e),[n]):[n,u]:"currency"===l?n?e:d1(d1([],e),[u]):"group"===l?s?e:d1(d1([],e),[void 0!==r?r:u]):"decimal"===l?void 0!==o&&0===o?e:d1(d1([],e),[void 0!==i?i:u]):"fraction"===l?d1(d1([],e),[void 0!==o?u.slice(0,o):u]):d1(d1([],e),[u])},[""]).join("")},fr={currencySymbol:"",groupSeparator:"",decimalSeparator:"",prefix:"",suffix:""},fi=function(e){var t=e||{},n=t.locale,r=t.currency;return(n?new Intl.NumberFormat(n,r?{currency:r,style:"currency"}:void 0):new Intl.NumberFormat).formatToParts(1000.1).reduce(function(e,t,n){return"currency"===t.type?0===n?d0(d0({},e),{currencySymbol:t.value,prefix:t.value}):d0(d0({},e),{currencySymbol:t.value,suffix:t.value}):"group"===t.type?d0(d0({},e),{groupSeparator:t.value}):"decimal"===t.type?d0(d0({},e),{decimalSeparator:t.value}):e},fr)},fo=function(e){return RegExp(/\d/,"gi").test(e)},fa=function(e,t,n){if(void 0===t&&(t="."),void 0===n||""===e||void 0===e)return e;if(!e.match(/\d/g))return"";var r=e.split(t),i=r[0],o=r[1];if(0===n)return i;var a=o||"";if(a.lengtht.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}(e,["allowDecimals","allowNegativeValue","id","name","className","customInput","decimalsLimit","defaultValue","disabled","maxLength","value","onValueChange","fixedDecimalLength","placeholder","decimalScale","prefix","suffix","intlConfig","step","min","max","disableGroupSeparators","disableAbbreviations","decimalSeparator","groupSeparator","onChange","onFocus","onBlur","onKeyDown","onKeyUp","transformRawValue"]);if(O&&fo(O))throw Error("decimalSeparator cannot be a number");if(C&&fo(C))throw Error("groupSeparator cannot be a number");var L=(0,b.useMemo)(function(){return fi(x)},[x]),F=O||L.decimalSeparator||"",V=C||L.groupSeparator||"";if(F&&V&&F===V&&!1===S)throw Error("decimalSeparator cannot be the same as groupSeparator");var z={decimalSeparator:F,groupSeparator:V,disableGroupSeparators:S,intlConfig:x,prefix:g||L.prefix,suffix:y},I={decimalSeparator:F,groupSeparator:V,allowDecimals:void 0===n||n,decimalsLimit:l||p||2,allowNegativeValue:void 0===r||r,disableAbbreviations:void 0!==_&&_,prefix:g||L.prefix,transformRawValue:R},Z=null!=u?fe(d0(d0({},z),{decimalScale:v,value:String(u)})):null!=f?fe(d0(d0({},z),{decimalScale:v,value:String(f)})):"",B=(0,b.useState)(Z),H=B[0],U=B[1],W=(0,b.useState)(!1),q=W[0],$=W[1],Y=(0,b.useState)(0),G=Y[0],X=Y[1],K=(0,b.useState)(0),Q=K[0],J=K[1],ee=(0,b.useState)(null),et=ee[0],en=ee[1],er=t||(0,b.useRef)(null),ei=function(e,t){$(!0);var n=fs({selectionStart:t,value:e,lastKeyStroke:et,stateValue:H,groupSeparator:V}),r=n.modifiedValue,i=n.cursorPosition,a=d8(d0({value:r},I));if(!d||!(a.replace(/-/g,"").length>d)){if(""===a||"-"===a||a===F){h&&h(void 0,o,{float:null,formatted:"",value:""}),U(a);return}var s=parseFloat(a.replace(F,".")),l=fe(d0({value:a},z));if(null!=i){var u=i+(l.length-e.length);X(u=u<=0?g?g.length:0:u),J(Q+1)}U(l),h&&h(a,o,{float:s,formatted:l,value:a})}};(0,b.useEffect)(function(){q&&"-"!==H&&er&&"object"==typeof er&&er.current&&er.current.setSelectionRange(G,G)},[H,G,er,q,Q]);var eo=d0({type:"text",inputMode:"decimal",id:i,name:o,className:a,onChange:function(e){var t=e.target;ei(t.value,t.selectionStart),M&&M(e)},onBlur:function(e){var t=e.target.value,n=d8(d0({value:t},I));if("-"===n||!n){U(""),T&&T(e);return}var r=fa(d7(n,F,p),F,void 0!==v?v:p),i=parseFloat(r.replace(F,".")),a=fe(d0(d0({},z),{value:r}));h&&h(r,o,{float:i,formatted:a,value:r}),U(a),T&&T(e)},onFocus:function(e){return A&&A(e),H?H.length:0},onKeyDown:function(e){var t=e.key;if(en(t),w&&("ArrowUp"===t||"ArrowDown"===t)){e.preventDefault(),X(H.length);var n=parseFloat(null!=f?String(f).replace(F,"."):d8(d0({value:H},I)))||0,r="ArrowUp"===t?n+w:n-w;if(void 0!==E&&rj)return;var i=String(w).includes(".")?Number(String(w).split(".")[1].length):void 0;ei(String(i?r.toFixed(i):r).replace(".",F))}P&&P(e)},onKeyUp:function(e){var t=e.key,n=e.currentTarget.selectionStart;if("ArrowUp"!==t&&"ArrowDown"!==t&&"-"!==H){var r=d9(H,{groupSeparator:V,decimalSeparator:F});if(r&&n&&n>H.length-r.length&&er&&"object"==typeof er&&er.current){var i=H.length-r.length;er.current.setSelectionRange(i,i)}}N&&N(e)},placeholder:m,disabled:void 0!==c&&c,value:null==f||"-"===H||F&&H===F?H:fe(d0(d0({},z),{decimalScale:q?void 0:v,value:String(f)})),ref:er},D);return s?b.createElement(s,d0({},eo)):b.createElement("input",d0({},eo))});function fu(e){let{units:t,variant:n,size:r="small",state:i,noSpin:o,focus:a,cursor:s,className:l,decimalsLimit:u,onValueChange:c,...d}=e,[f,h]=(0,b.useState)();return(0,b.useEffect)(()=>{h(navigator.language)},[]),(0,x.jsxs)("div",{className:"relative",children:[(0,x.jsx)(fl,{...d,decimalsLimit:u,intlConfig:f?{locale:f}:void 0,allowDecimals:!!u,autoComplete:"off",spellCheck:!1,onValueChange:c,className:(0,ea.cx)(dQ({variant:n,size:r,state:i,focus:a,noSpin:o,cursor:s,className:l}),t?"pr-9":"")}),t&&(0,x.jsx)("div",{className:(0,ea.cx)("flex items-center absolute top-0 h-full","small"===r?"right-2":"","medium"===r?"right-3":"","large"===r?"right-3":""),children:(0,x.jsx)(tq,{size:"12",weight:"medium",color:"subtle",children:t})})]})}fl.displayName="CurrencyInput";var fc=n(6391),fd=n.n(fc);function ff(e,t){return e.decimalPlaces()>t?e.toFixed(t):e.toString()}let fh=(0,b.forwardRef)(function(e,t){let{value:n,placeholder:r=new(fd())(100),decimalsLimit:i=6,onChange:o,size:a="small",units:s,error:l,changed:u,onBlur:c,onFocus:d,...f}=e,h=(0,b.useMemo)(()=>new(fd())(n),[n]),[p,m]=(0,b.useState)(""),v=(0,b.useMemo)(()=>fp(p),[p]),g=(0,b.useCallback)(e=>{o&&o((e=fp(e))&&!isNaN(Number(e))?new(fd())(e):void 0)},[o]),y=(0,b.useCallback)(e=>{m(e),g(e)},[m,g]);return(0,b.useEffect)(()=>{if(!h.isEqualTo(v)){let e=ff(h,i);m(e)}},[h]),(0,x.jsx)(fu,{ref:t,...f,"data-testid":"numberfield",size:a,placeholder:r.isNaN()?"":ff(r,i),units:s,value:"NaN"!==p?p:"",decimalsLimit:i,onBlur:e=>{c&&c(e)},onFocus:e=>{d&&d(e)},onValueChange:e=>y(e||"")})});function fp(e){return(null==e?void 0:e.replace(/,/g,"."))||""}var fm=n(2850),fv=n(47025);let fg=new(fd())(0),fy=(0,b.forwardRef)(function(e,t){let{sc:n,placeholder:r=new(fd())(100),decimalsLimitFiat:i=6,decimalsLimitSc:o=6,onChange:a,size:s="medium",units:l="SC",showFiat:u=!0,error:c,changed:d,prefix:f,onBlur:h,onFocus:p,...m}=e,v=(0,b.useMemo)(()=>new(fd())(void 0===n?NaN:n),[n]),{settings:g}=(0,fm.Hv)(),y=(0,fv.BW)({config:{swr:{revalidateOnFocus:!1}}}),w=(0,b.useMemo)(()=>{var e;return g.siaCentral&&y.data?new(fd())((null===(e=y.data)||void 0===e?void 0:e.rates.sc[g.currency.id])||fg):fg},[y.data,g]),[E,j]=(0,b.useState)(),[k,S]=(0,b.useState)(""),[_,O]=(0,b.useState)(""),C=(0,b.useMemo)(()=>fx(k),[k]),M=(0,b.useMemo)(()=>fx(_),[_]),A=(0,b.useCallback)(e=>{a&&a((e=fx(e))&&!isNaN(Number(e))?new(fd())(e):void 0)},[a]),T=(0,b.useCallback)(e=>{let t=ff(e,i);O(t)},[O,i]),P=(0,b.useCallback)(e=>{let t=ff(e,o);return S(t),A(t),t},[S,o,A]),N=(0,b.useCallback)(e=>{S(e),A(e)},[S,A]),R=(0,b.useCallback)(e=>{let t=new(fd())(e).times(w);T(t)},[T,w]),D=(0,b.useCallback)(e=>{let t=new(fd())(e).dividedBy(w);P(t)},[P,w]),[L,F]=(0,b.useState)(!1);return(0,b.useEffect)(()=>{if(!v.isEqualTo(C)){let e=ff(v,o);S(e),"fiat"!==E&&R(e)}L||F(!0)},[v]),(0,b.useEffect)(()=>{L&&R(C)},[w]),(0,b.useEffect)(()=>{"sc"===E&&R(C)},[C]),(0,b.useEffect)(()=>{"fiat"===E&&D(M)},[M]),(0,x.jsxs)("div",{ref:t,className:(0,ea.cx)("flex flex-col bg-white dark:bg-graydark-50","focus-within:ring ring-blue-500 dark:ring-blue-200","border",c?"border-red-500 dark:border-red-400":d?"border-green-500 dark:border-green-400":"border-gray-200 dark:border-graydark-200","rounded"),children:[(0,x.jsx)(fu,{...m,"data-testid":"scInput",size:s,variant:"ghost",focus:"none",placeholder:ff(r,o),units:l,value:"NaN"!==k?k:"",decimalsLimit:o,allowNegativeValue:!1,onBlur:e=>{j(void 0),h&&h(e)},onFocus:e=>{j("sc"),p&&p(e)},onValueChange:e=>{N(e||"")}}),u&&g.siaCentral&&(0,x.jsx)(fu,{...m,"data-testid":"fiatInput",size:s,variant:"ghost",focus:"none",value:"NaN"!==_?_:"",units:g.currency.label,decimalsLimit:i,allowNegativeValue:!1,placeholder:"".concat(g.currency.prefix).concat(w?w.times(r).toFixed(i):"0.42"),prefix:f||g.currency.prefix,onFocus:e=>{j("fiat"),p&&p(e)},onBlur:e=>{j(void 0),h&&h(e)},onValueChange:e=>{O(e||"")}})]})});function fx(e){return(null==e?void 0:e.replace(/,/g,"."))||""}function fb(e){let{children:t}=e;return(0,x.jsx)(s4,{content:t,children:(0,x.jsx)("div",{className:"relative flex items-center inline mx-1",children:(0,x.jsx)(tq,{color:"subtle",children:(0,x.jsx)(s6.RdX,{className:"scale-75"})})})})}function fw(e){let{values:t,options:n,onChange:r}=e;return(0,x.jsx)("div",{className:"flex flex-wrap gap-1",children:n.map(e=>(0,x.jsx)(s5,{variant:t.includes(e.value)?"active":"inactive",onClick:()=>{r(e.value)},children:e.label},e.value))})}let fE=(0,ea.j)(["font-sans","font-normal","tabular-nums","flex-shrink-0","rounded","flex items-center","bg-white dark:bg-graydark-200","hover:bg-gray-50 dark:hover:bg-graydark-300","disabled:bg-gray-200 disabled:dark:bg-graydark-200","autofill:bg-blue-100 autofill:dark:bg-blue-800","border","focus-within:z-10","focus-within:ring ring-blue-500 dark:ring-blue-200","text-gray-1100 dark:text-white","[&>select:disabled]:text-gray-600 [&>select:disabled]:dark:text-graydark-700"],{variants:{size:{small:"h-7 text-sm px-1",medium:"h-10 text-base px-3",large:"h-12 text-lg px-3"},state:{default:["border-gray-400 dark:border-graydark-400","enabled:hover:border-gray-500 enabled:hover:dark:border-graydark-500"],invalid:["border-red-500 dark:border-red-400"],valid:["border-green-500 dark:border-green-400"]}},defaultVariants:{state:"default",size:"small"}}),fj=b.forwardRef((e,t)=>{let{size:n,state:r,icon:i,className:o,...a}=e;return(0,x.jsxs)("div",{className:fE({size:n,state:r,className:o}),children:[i,(0,x.jsx)("select",{ref:t,...a,className:"appearance-none flex-1 bg-transparent outline-none w-full h-full pl-1 pr-1"}),(0,x.jsx)(s6.Cp0,{className:"pointer-events-none scale-75"})]})}),fk=b.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,x.jsx)("option",{ref:t,...r,className:(0,ea.cx)("bg-white dark:bg-graydark-200","text-gray-1100 dark:text-white",n)})}),fS=(0,ea.j)(["bg-gray-300 dark:bg-graydark-300","relative","overflow-hidden","animate-pulse","rounded"]);function f_(e){let{className:t}=e;return(0,x.jsx)("div",{className:fS({className:t})})}let fO=(0,ea.j)(["rounded-full flex-shrink-0"],{variants:{size:{default:"w-2 h-2"}},defaultVariants:{size:"default"}}),fC=b.forwardRef((e,t)=>{let{size:n,className:r,...i}=e;return(0,x.jsx)("div",{ref:t,className:fO({size:n,className:r}),...i})}),fM="Switch",[fA,fT]=(0,j.b)(fM),[fP,fN]=fA(fM),fR=(0,b.forwardRef)((e,t)=>{let{__scopeSwitch:n,"aria-labelledby":r,name:i,checked:o,defaultChecked:a,required:s,disabled:l,value:u="on",onCheckedChange:c,...d}=e,[f,h]=(0,b.useState)(null),p=(0,k.e)(t,e=>h(e)),m=c$(f),v=(0,b.useRef)(!1),g=!f||!!f.closest("form"),[y=!1,x]=(0,C.T)({prop:o,defaultProp:a,onChange:c});return(0,b.createElement)(fP,{scope:n,checked:y,disabled:l},(0,b.createElement)(M.WV.button,(0,E.Z)({type:"button",role:"switch","aria-checked":y,"aria-labelledby":r||m,"aria-required":s,"data-state":fF(y),"data-disabled":l?"":void 0,disabled:l,value:u},d,{ref:p,onClick:(0,O.M)(e.onClick,e=>{x(e=>!e),g&&(v.current=e.isPropagationStopped(),v.current||e.stopPropagation())})})),g&&(0,b.createElement)(fL,{control:f,bubbles:!v.current,name:i,value:u,checked:y,required:s,disabled:l,style:{transform:"translateX(-100%)"}}))}),fD=(0,b.forwardRef)((e,t)=>{let{__scopeSwitch:n,...r}=e,i=fN("SwitchThumb",n);return(0,b.createElement)(M.WV.span,(0,E.Z)({"data-state":fF(i.checked),"data-disabled":i.disabled?"":void 0},r,{ref:t}))}),fL=e=>{let{control:t,checked:n,bubbles:r=!0,...i}=e,o=(0,b.useRef)(null),a=dO(n),s=tt(t);return(0,b.useEffect)(()=>{let e=o.current,t=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(t,"checked"),s=i.set;if(a!==n&&s){let t=new Event("click",{bubbles:r});s.call(e,n),e.dispatchEvent(t)}},[a,n,r]),(0,b.createElement)("input",(0,E.Z)({type:"checkbox","aria-hidden":!0,defaultChecked:n},i,{tabIndex:-1,ref:o,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function fF(e){return e?"checked":"unchecked"}let fV=(0,ea.j)(["absolute left-0 rounded-full","transition-transform","bg-white dark:bg-graydark-500"],{variants:{size:{small:["w-3 h-3","translate-x-px","data-[state=checked]:translate-x-[9px]"],medium:["w-5 h-5","translate-x-0.5","data-[state=checked]:translate-x-[20px]"]}},defaultVariants:{size:"small"}}),fz=(0,ea.j)(["select-none outline-none","relative inline-flex items-center justify-center","m-0 rounded-full","focus:ring ring-blue-500 dark:ring-blue-200","border","bg-gray-300 dark:bg-graydark-50","autofill:bg-blue-100 autofill:dark:bg-blue-800","border-gray-400 dark:border-graydark-400","enabled:hover:border-gray-500 enabled:hover:dark:border-graydark-500","disabled:cursor-default","enabled:data-[state=checked]:bg-green-600 dark:enabled:data-[state=checked]:bg-green-500","disabled:data-[state=checked]:bg-green-600/50 dark:disabled:data-[state=checked]:bg-green-500/50"],{variants:{size:{small:"w-6 h-4",medium:"w-11 h-6"},state:{default:["border-gray-400 dark:border-graydark-400","enabled:hover:border-gray-500 enabled:hover:dark:border-graydark-500"],invalid:["border-red-500 dark:border-red-400"],valid:["border-green-500 dark:border-green-400"]}},defaultVariants:{size:"small",state:"default"}}),fI=(0,b.forwardRef)((e,t)=>{let{size:n,state:r,className:i,children:o,...a}=e;return(0,x.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,x.jsx)(fR,{className:fz({size:n,state:r,className:i}),...a,ref:t,children:(0,x.jsx)(fD,{className:fV({size:n})})}),o&&(0,x.jsx)(tq,{color:a.disabled?"subtle":"contrast",children:o})]})}),fZ=(0,b.forwardRef)((e,t)=>{let{children:n,...r}=e,i=b.Children.toArray(n),o=i.find(fU);if(o){let e=o.props.children,n=i.map(t=>t!==o?t:b.Children.count(e)>1?b.Children.only(null):(0,b.isValidElement)(e)?e.props.children:null);return(0,b.createElement)(fB,(0,E.Z)({},r,{ref:t}),(0,b.isValidElement)(e)?(0,b.cloneElement)(e,void 0,n):null)}return(0,b.createElement)(fB,(0,E.Z)({},r,{ref:t}),n)});fZ.displayName="Slot";let fB=(0,b.forwardRef)((e,t)=>{let{children:n,...r}=e;return(0,b.isValidElement)(n)?(0,b.cloneElement)(n,{...function(e,t){let n={...t};for(let r in t){let i=e[r],o=t[r],a=/^on[A-Z]/.test(r);a?i&&o?n[r]=(...e)=>{o(...e),i(...e)}:i&&(n[r]=i):"style"===r?n[r]={...i,...o}:"className"===r&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props),ref:(0,k.F)(t,n.ref)}):b.Children.count(n)>1?b.Children.only(null):null});fB.displayName="SlotClone";let fH=({children:e})=>(0,b.createElement)(b.Fragment,null,e);function fU(e){return(0,b.isValidElement)(e)&&e.type===fH}let fW=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let n=(0,b.forwardRef)((e,n)=>{let{asChild:r,...i}=e,o=r?fZ:t;return(0,b.useEffect)(()=>{window[Symbol.for("radix-ui")]=!0},[]),(0,b.createElement)(o,(0,E.Z)({},i,{ref:n}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),fq=(0,b.forwardRef)((e,t)=>{let{children:n,width:r=10,height:i=5,...o}=e;return(0,b.createElement)(fW.svg,(0,E.Z)({},o,{ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:(0,b.createElement)("polygon",{points:"0,0 30,0 15,10"}))}),f$="Popper",[fY,fG]=(0,j.b)(f$),[fX,fK]=fY(f$),fQ=(0,b.forwardRef)((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,o=fK("PopperAnchor",n),a=(0,b.useRef)(null),s=(0,k.e)(t,a);return(0,b.useEffect)(()=>{o.onAnchorChange((null==r?void 0:r.current)||a.current)}),r?null:(0,b.createElement)(fW.div,(0,E.Z)({},i,{ref:s}))}),fJ="PopperContent",[f0,f1]=fY(fJ),[f2,f4]=fY(fJ,{hasParent:!1,positionUpdateFns:new Set}),f3=(0,b.forwardRef)((e,t)=>{var n,r,i,o,a,s,l,u,c;let{__scopePopper:d,side:f="bottom",sideOffset:h=0,align:p="center",alignOffset:m=0,arrowPadding:v=0,collisionBoundary:g=[],collisionPadding:y=0,sticky:x="partial",hideWhenDetached:w=!1,avoidCollisions:E=!0,onPlaced:j,...S}=e,_=fK(fJ,d),[O,C]=(0,b.useState)(null),M=(0,k.e)(t,e=>C(e)),[T,P]=(0,b.useState)(null),N=tt(T),R=null!==(n=null==N?void 0:N.width)&&void 0!==n?n:0,D=null!==(r=null==N?void 0:N.height)&&void 0!==r?r:0,L="number"==typeof y?y:{top:0,right:0,bottom:0,left:0,...y},F=Array.isArray(g)?g:[g],V=F.length>0,z={padding:L,boundary:F.filter(f8),altBoundary:V},{reference:I,floating:Z,strategy:B,x:H,y:U,placement:W,middlewareData:q,update:$}=e7({strategy:"fixed",placement:f+("center"!==p?"-"+p:""),whileElementsMounted:e3,middleware:[f7(),eM({mainAxis:h+D,alignmentAxis:m}),E?eT({mainAxis:!0,crossAxis:!1,limiter:"partial"===x?eP():void 0,...z}):void 0,T?e9({element:T,padding:v}):void 0,E?eS({...z}):void 0,{name:"size",options:c={...z,apply:({elements:e,availableWidth:t,availableHeight:n})=>{e.floating.style.setProperty("--radix-popper-available-width",`${t}px`),e.floating.style.setProperty("--radix-popper-available-height",`${n}px`)}},async fn(e){let t,n;let{placement:r,rects:i,platform:o,elements:a}=e,{apply:s,...l}=c,u=await ev(e,l),d=el(r),f=eu(r);"top"===d||"bottom"===d?(t=d,n=f===(await (null==o.isRTL?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(n=d,t="end"===f?"top":"bottom");let h=ey(u.left,0),p=ey(u.right,0),m=ey(u.top,0),v=ey(u.bottom,0),g={availableHeight:i.floating.height-(["left","right"].includes(r)?2*(0!==m||0!==v?m+v:ey(u.top,u.bottom)):u[t]),availableWidth:i.floating.width-(["top","bottom"].includes(r)?2*(0!==h||0!==p?h+p:ey(u.left,u.right)):u[n])},y=await o.getDimensions(a.floating);null==s||s({...e,...g});let x=await o.getDimensions(a.floating);return y.width!==x.width||y.height!==x.height?{reset:{rects:!0}}:{}}},f9({arrowWidth:R,arrowHeight:D}),w?eC({strategy:"referenceHidden"}):void 0].filter(f6)});(0,A.b)(()=>{I(_.anchor)},[I,_.anchor]);let Y=null!==H&&null!==U,[G,X]=he(W),K=(0,s9.W)(j);(0,A.b)(()=>{Y&&(null==K||K())},[Y,K]);let Q=null===(i=q.arrow)||void 0===i?void 0:i.x,J=null===(o=q.arrow)||void 0===o?void 0:o.y,ee=(null===(a=q.arrow)||void 0===a?void 0:a.centerOffset)!==0,[et,en]=(0,b.useState)();(0,A.b)(()=>{O&&en(window.getComputedStyle(O).zIndex)},[O]);let{hasParent:er,positionUpdateFns:ei}=f4(fJ,d),eo=!er;(0,b.useLayoutEffect)(()=>{if(!eo)return ei.add($),()=>{ei.delete($)}},[eo,ei,$]),(0,A.b)(()=>{eo&&Y&&Array.from(ei).reverse().forEach(e=>requestAnimationFrame(e))},[eo,Y,ei]);let ea={"data-side":G,"data-align":X,...S,ref:M,style:{...S.style,animation:Y?void 0:"none",opacity:null!==(s=q.hide)&&void 0!==s&&s.referenceHidden?0:void 0}};return(0,b.createElement)("div",{ref:Z,"data-radix-popper-content-wrapper":"",style:{position:B,left:0,top:0,transform:Y?`translate3d(${Math.round(H)}px, ${Math.round(U)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:et,"--radix-popper-transform-origin":[null===(l=q.transformOrigin)||void 0===l?void 0:l.x,null===(u=q.transformOrigin)||void 0===u?void 0:u.y].join(" ")},dir:e.dir},(0,b.createElement)(f0,{scope:d,placedSide:G,onArrowChange:P,arrowX:Q,arrowY:J,shouldHideArrow:ee},eo?(0,b.createElement)(f2,{scope:d,hasParent:!0,positionUpdateFns:ei},(0,b.createElement)(fW.div,ea)):(0,b.createElement)(fW.div,ea)))}),f5={top:"bottom",right:"left",bottom:"top",left:"right"};function f6(e){return void 0!==e}function f8(e){return null!==e}let f7=()=>({name:"anchorCssProperties",fn(e){let{rects:t,elements:n}=e,{width:r,height:i}=t.reference;return n.floating.style.setProperty("--radix-popper-anchor-width",`${r}px`),n.floating.style.setProperty("--radix-popper-anchor-height",`${i}px`),{}}}),f9=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;let{placement:s,rects:l,middlewareData:u}=t,c=(null===(n=u.arrow)||void 0===n?void 0:n.centerOffset)!==0,d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[h,p]=he(s),m={start:"0%",center:"50%",end:"100%"}[p],v=(null!==(r=null===(i=u.arrow)||void 0===i?void 0:i.x)&&void 0!==r?r:0)+d/2,g=(null!==(o=null===(a=u.arrow)||void 0===a?void 0:a.y)&&void 0!==o?o:0)+f/2,y="",x="";return"bottom"===h?(y=c?m:`${v}px`,x=`${-f}px`):"top"===h?(y=c?m:`${v}px`,x=`${l.floating.height+f}px`):"right"===h?(y=`${-f}px`,x=c?m:`${g}px`):"left"===h&&(y=`${l.floating.width+f}px`,x=c?m:`${g}px`),{data:{x:y,y:x}}}});function he(e){let[t,n="center"]=e.split("-");return[t,n]}let ht=e=>{let{__scopePopper:t,children:n}=e,[r,i]=(0,b.useState)(null);return(0,b.createElement)(fX,{scope:t,anchor:r,onAnchorChange:i},n)},hn=(0,b.forwardRef)((e,t)=>{var n;let{container:r=null==globalThis?void 0:null===(n=globalThis.document)||void 0===n?void 0:n.body,...i}=e;return r?e6.createPortal((0,b.createElement)(fW.div,(0,E.Z)({},i,{ref:t})),r):null}),hr="dismissableLayer.update",hi=(0,b.createContext)({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ho=(0,b.forwardRef)((e,t)=>{var n;let{disableOutsidePointerEvents:i=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,onDismiss:u,...c}=e,d=(0,b.useContext)(hi),[f,h]=(0,b.useState)(null),p=null!==(n=null==f?void 0:f.ownerDocument)&&void 0!==n?n:null==globalThis?void 0:globalThis.document,[,m]=(0,b.useState)({}),v=(0,k.e)(t,e=>h(e)),g=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),x=g.indexOf(y),w=f?g.indexOf(f):-1,j=d.layersWithOutsidePointerEventsDisabled.size>0,S=w>=x,_=function(e,t=null==globalThis?void 0:globalThis.document){let n=(0,s9.W)(e),r=(0,b.useRef)(!1),i=(0,b.useRef)(()=>{});return(0,b.useEffect)(()=>{let e=e=>{if(e.target&&!r.current){let r={originalEvent:e};function o(){hs("dismissableLayer.pointerDownOutside",n,r,{discrete:!0})}"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=o,t.addEventListener("click",i.current,{once:!0})):o()}r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}(e=>{let t=e.target,n=[...d.branches].some(e=>e.contains(t));!S||n||(null==a||a(e),null==l||l(e),e.defaultPrevented||null==u||u())},p),C=function(e,t=null==globalThis?void 0:globalThis.document){let n=(0,s9.W)(e),r=(0,b.useRef)(!1);return(0,b.useEffect)(()=>{let e=e=>{e.target&&!r.current&&hs("dismissableLayer.focusOutside",n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}(e=>{let t=e.target,n=[...d.branches].some(e=>e.contains(t));n||(null==s||s(e),null==l||l(e),e.defaultPrevented||null==u||u())},p);return!function(e,t=null==globalThis?void 0:globalThis.document){let n=(0,s9.W)(e);(0,b.useEffect)(()=>{let e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)},[n,t])}(e=>{let t=w===d.layers.size-1;t&&(null==o||o(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))},p),(0,b.useEffect)(()=>{if(f)return i&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(r=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),ha(),()=>{i&&1===d.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=r)}},[f,p,i,d]),(0,b.useEffect)(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),ha())},[f,d]),(0,b.useEffect)(()=>{let e=()=>m({});return document.addEventListener(hr,e),()=>document.removeEventListener(hr,e)},[]),(0,b.createElement)(fW.div,(0,E.Z)({},c,{ref:v,style:{pointerEvents:j?S?"auto":"none":void 0,...e.style},onFocusCapture:(0,O.M)(e.onFocusCapture,C.onFocusCapture),onBlurCapture:(0,O.M)(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:(0,O.M)(e.onPointerDownCapture,_.onPointerDownCapture)}))});function ha(){let e=new CustomEvent(hr);document.dispatchEvent(e)}function hs(e,t,n,{discrete:r}){let i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});(t&&i.addEventListener(e,t,{once:!0}),r)?i&&(0,e6.flushSync)(()=>i.dispatchEvent(o)):i.dispatchEvent(o)}let hl="HoverCard",[hu,hc]=(0,j.b)(hl,[fG]),hd=fG(),[hf,hh]=hu(hl),hp=(0,b.forwardRef)((e,t)=>{let{__scopeHoverCard:n,...r}=e,i=hh("HoverCardTrigger",n),o=hd(n);return(0,b.createElement)(fQ,(0,E.Z)({asChild:!0},o),(0,b.createElement)(fW.a,(0,E.Z)({"data-state":i.open?"open":"closed"},r,{ref:t,onPointerEnter:(0,O.M)(e.onPointerEnter,hw(i.onOpen)),onPointerLeave:(0,O.M)(e.onPointerLeave,hw(i.onClose)),onFocus:(0,O.M)(e.onFocus,i.onOpen),onBlur:(0,O.M)(e.onBlur,i.onClose),onTouchStart:(0,O.M)(e.onTouchStart,e=>e.preventDefault())})))}),hm="HoverCardPortal",[hv,hg]=hu(hm,{forceMount:void 0}),hy="HoverCardContent",hx=(0,b.forwardRef)((e,t)=>{let n=hg(hy,e.__scopeHoverCard),{forceMount:r=n.forceMount,...i}=e,o=hh(hy,e.__scopeHoverCard);return(0,b.createElement)(T.z,{present:r||o.open},(0,b.createElement)(hb,(0,E.Z)({"data-state":o.open?"open":"closed"},i,{onPointerEnter:(0,O.M)(e.onPointerEnter,hw(o.onOpen)),onPointerLeave:(0,O.M)(e.onPointerLeave,hw(o.onClose)),ref:t})))}),hb=(0,b.forwardRef)((e,t)=>{let{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,...l}=e,u=hh(hy,n),c=hd(n),d=(0,b.useRef)(null),f=(0,k.e)(t,d),[h,p]=(0,b.useState)(!1);return(0,b.useEffect)(()=>{if(h){let e=document.body;return i=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=i,e.style.webkitUserSelect=i}}},[h]),(0,b.useEffect)(()=>{if(d.current){let e=()=>{p(!1),u.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var e;let t=(null===(e=document.getSelection())||void 0===e?void 0:e.toString())!=="";t&&(u.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerup",e),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!1}}},[u.isPointerDownOnContentRef,u.hasSelectionRef]),(0,b.useEffect)(()=>{if(d.current){let e=function(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}(d.current);e.forEach(e=>e.setAttribute("tabindex","-1"))}}),(0,b.createElement)(ho,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:s,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:(0,O.M)(a,e=>{e.preventDefault()}),onDismiss:u.onDismiss},(0,b.createElement)(f3,(0,E.Z)({},c,l,{onPointerDown:(0,O.M)(l.onPointerDown,e=>{e.currentTarget.contains(e.target)&&p(!0),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!0}),ref:f,style:{...l.style,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)",userSelect:h?"text":void 0,WebkitUserSelect:h?"text":void 0}})))});function hw(e){return t=>"touch"===t.pointerType?void 0:e()}let hE=e=>{let{__scopeHoverCard:t,children:n,open:r,defaultOpen:i,onOpenChange:o,openDelay:a=700,closeDelay:s=300}=e,l=hd(t),u=(0,b.useRef)(0),c=(0,b.useRef)(0),d=(0,b.useRef)(!1),f=(0,b.useRef)(!1),[h=!1,p]=(0,C.T)({prop:r,defaultProp:i,onChange:o}),m=(0,b.useCallback)(()=>{clearTimeout(c.current),u.current=window.setTimeout(()=>p(!0),a)},[a,p]),v=(0,b.useCallback)(()=>{clearTimeout(u.current),d.current||f.current||(c.current=window.setTimeout(()=>p(!1),s))},[s,p]),g=(0,b.useCallback)(()=>p(!1),[p]);return(0,b.useEffect)(()=>()=>{clearTimeout(u.current),clearTimeout(c.current)},[]),(0,b.createElement)(hf,{scope:t,open:h,onOpenChange:p,onOpen:m,onClose:v,onDismiss:g,hasSelectionRef:d,isPointerDownOnContentRef:f},(0,b.createElement)(ht,l,n))},hj=e=>{let{__scopeHoverCard:t,forceMount:n,children:r,container:i}=e,o=hh(hm,t);return(0,b.createElement)(hv,{scope:t,forceMount:n},(0,b.createElement)(T.z,{present:n||o.open},(0,b.createElement)(hn,{asChild:!0,container:i},r)))},hk=(0,ea.j)(["relative","z-10","data-[side=top]:bottom-1","data-[side=top]:origin-bottom","data-[side=bottom]:top-1","data-[side=bottom]:origin-top","data-[side=left]:right-1","data-[side=left]:origin-right","data-[side=right]:left-1","data-[side=right]:origin-left"]),hS=(0,ea.cx)(tY(),"max-w-sm","py-0.5","px-1"),h_={show:{opacity:[0,1],scale:[.95,1],transition:{duration:.1,ease:"easeOut"}},exit:{opacity:[1,0],scale:[1,.95],transition:{duration:.1,ease:"easeIn"}}},hO=b.forwardRef((e,t)=>{let{trigger:n,children:r,rootProps:i,contentProps:o}=e,{className:a,...s}=o||{},{open:l,onOpenChange:u}=s1({open:null==i?void 0:i.open,onOpenChange:null==i?void 0:i.onOpenChange});return(0,x.jsxs)(hE,{open:l,onOpenChange:u,...i,children:[n&&(0,x.jsx)(hp,{asChild:!0,children:n}),(0,x.jsx)(ny,{children:l?(0,x.jsx)(hj,{forceMount:!0,children:(0,x.jsx)(hx,{asChild:!0,forceMount:!0,ref:t,...s,children:(0,x.jsx)(s0.div,{variants:h_,initial:"init",animate:"show",exit:"exit",className:hk(),children:(0,x.jsx)("div",{className:(0,ea.cx)(hS,a),children:r})})})}):null})]})});function hC(e,t=[]){let n=[],r=()=>{let t=n.map(e=>(0,b.createContext)(e));return function(n){let r=(null==n?void 0:n[e])||t;return(0,b.useMemo)(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return r.scopeName=e,[function(t,r){let i=(0,b.createContext)(r),o=n.length;function a(t){let{scope:n,children:r,...a}=t,s=(null==n?void 0:n[e][o])||i,l=(0,b.useMemo)(()=>a,Object.values(a));return(0,b.createElement)(s.Provider,{value:l},r)}return n=[...n,r],a.displayName=t+"Provider",[a,function(n,a){let s=(null==a?void 0:a[e][o])||i,l=(0,b.useContext)(s);if(l)return l;if(void 0!==r)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e),o=i[`__scope${r}`];return{...t,...o}},{});return(0,b.useMemo)(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}(r,...t)]}function hM(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function hA(...e){return t=>e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}function hT(...e){return(0,b.useCallback)(hA(...e),e)}let hP=(0,b.forwardRef)((e,t)=>{let{children:n,...r}=e,i=b.Children.toArray(n),o=i.find(hD);if(o){let e=o.props.children,n=i.map(t=>t!==o?t:b.Children.count(e)>1?b.Children.only(null):(0,b.isValidElement)(e)?e.props.children:null);return(0,b.createElement)(hN,(0,E.Z)({},r,{ref:t}),(0,b.isValidElement)(e)?(0,b.cloneElement)(e,void 0,n):null)}return(0,b.createElement)(hN,(0,E.Z)({},r,{ref:t}),n)});hP.displayName="Slot";let hN=(0,b.forwardRef)((e,t)=>{let{children:n,...r}=e;return(0,b.isValidElement)(n)?(0,b.cloneElement)(n,{...function(e,t){let n={...t};for(let r in t){let i=e[r],o=t[r],a=/^on[A-Z]/.test(r);a?i&&o?n[r]=(...e)=>{o(...e),i(...e)}:i&&(n[r]=i):"style"===r?n[r]={...i,...o}:"className"===r&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props),ref:t?hA(t,n.ref):n.ref}):b.Children.count(n)>1?b.Children.only(null):null});hN.displayName="SlotClone";let hR=({children:e})=>(0,b.createElement)(b.Fragment,null,e);function hD(e){return(0,b.isValidElement)(e)&&e.type===hR}let hL=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let n=(0,b.forwardRef)((e,n)=>{let{asChild:r,...i}=e,o=r?hP:t;return(0,b.useEffect)(()=>{window[Symbol.for("radix-ui")]=!0},[]),(0,b.createElement)(o,(0,E.Z)({},i,{ref:n}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function hF(e){let t=(0,b.useRef)(e);return(0,b.useEffect)(()=>{t.current=e}),(0,b.useMemo)(()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)},[])}let hV=(null==globalThis?void 0:globalThis.document)?b.useLayoutEffect:()=>{},hz=e=>{let{present:t,children:n}=e,r=function(e){var t;let[n,r]=(0,b.useState)(),i=(0,b.useRef)({}),o=(0,b.useRef)(e),a=(0,b.useRef)("none"),s=e?"mounted":"unmounted",[l,u]=(t={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},(0,b.useReducer)((e,n)=>{let r=t[e][n];return null!=r?r:e},s));return(0,b.useEffect)(()=>{let e=hI(i.current);a.current="mounted"===l?e:"none"},[l]),hV(()=>{let t=i.current,n=o.current,r=n!==e;if(r){let r=a.current,i=hI(t);e?u("MOUNT"):"none"===i||(null==t?void 0:t.display)==="none"?u("UNMOUNT"):n&&r!==i?u("ANIMATION_OUT"):u("UNMOUNT"),o.current=e}},[e,u]),hV(()=>{if(n){let e=e=>{let t=hI(i.current),r=t.includes(e.animationName);e.target===n&&r&&(0,e6.flushSync)(()=>u("ANIMATION_END"))},t=e=>{e.target===n&&(a.current=hI(i.current))};return n.addEventListener("animationstart",t),n.addEventListener("animationcancel",e),n.addEventListener("animationend",e),()=>{n.removeEventListener("animationstart",t),n.removeEventListener("animationcancel",e),n.removeEventListener("animationend",e)}}u("ANIMATION_END")},[n,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:(0,b.useCallback)(e=>{e&&(i.current=getComputedStyle(e)),r(e)},[])}}(t),i="function"==typeof n?n({present:r.isPresent}):b.Children.only(n),o=hT(r.ref,i.ref),a="function"==typeof n;return a||r.isPresent?(0,b.cloneElement)(i,{ref:o}):null};function hI(e){return(null==e?void 0:e.animationName)||"none"}hz.displayName="Presence";let hZ=w["useId".toString()]||(()=>void 0),hB=0;function hH(e){let t=e+"CollectionProvider",[n,r]=hC(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=e+"CollectionSlot",s=b.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=o(a,n),s=hT(t,i.collectionRef);return b.createElement(hP,{ref:s},r)}),l=e+"CollectionItemSlot",u="data-radix-collection-item",c=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,a=b.useRef(null),s=hT(t,a),c=o(l,n);return b.useEffect(()=>(c.itemMap.set(a,{ref:a,...i}),()=>void c.itemMap.delete(a))),b.createElement(hP,{[u]:"",ref:s},r)});return[{Provider:e=>{let{scope:t,children:n}=e,r=b.useRef(null),o=b.useRef(new Map).current;return b.createElement(i,{scope:t,itemMap:o,collectionRef:r},n)},Slot:s,ItemSlot:c},function(t){let n=o(e+"CollectionConsumer",t),r=b.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${u}]`)),r=Array.from(n.itemMap.values()),i=r.sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current));return i},[n.collectionRef,n.itemMap]);return r},r]}let hU="dismissableLayer.update",hW=(0,b.createContext)({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),hq=(0,b.forwardRef)((e,t)=>{var n;let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,onDismiss:u,...c}=e,d=(0,b.useContext)(hW),[f,h]=(0,b.useState)(null),p=null!==(n=null==f?void 0:f.ownerDocument)&&void 0!==n?n:null==globalThis?void 0:globalThis.document,[,m]=(0,b.useState)({}),v=hT(t,e=>h(e)),g=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),x=g.indexOf(y),w=f?g.indexOf(f):-1,j=d.layersWithOutsidePointerEventsDisabled.size>0,k=w>=x,S=function(e,t=null==globalThis?void 0:globalThis.document){let n=hF(e),r=(0,b.useRef)(!1),i=(0,b.useRef)(()=>{});return(0,b.useEffect)(()=>{let e=e=>{if(e.target&&!r.current){let r={originalEvent:e};function o(){hY("dismissableLayer.pointerDownOutside",n,r,{discrete:!0})}"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=o,t.addEventListener("click",i.current,{once:!0})):o()}r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}(e=>{let t=e.target,n=[...d.branches].some(e=>e.contains(t));!k||n||(null==a||a(e),null==l||l(e),e.defaultPrevented||null==u||u())},p),_=function(e,t=null==globalThis?void 0:globalThis.document){let n=hF(e),r=(0,b.useRef)(!1);return(0,b.useEffect)(()=>{let e=e=>{e.target&&!r.current&&hY("dismissableLayer.focusOutside",n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}(e=>{let t=e.target,n=[...d.branches].some(e=>e.contains(t));n||(null==s||s(e),null==l||l(e),e.defaultPrevented||null==u||u())},p);return!function(e,t=null==globalThis?void 0:globalThis.document){let n=hF(e);(0,b.useEffect)(()=>{let e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)},[n,t])}(e=>{let t=w===d.layers.size-1;t&&(null==i||i(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))},p),(0,b.useEffect)(()=>{if(f)return r&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(o=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),h$(),()=>{r&&1===d.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=o)}},[f,p,r,d]),(0,b.useEffect)(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),h$())},[f,d]),(0,b.useEffect)(()=>{let e=()=>m({});return document.addEventListener(hU,e),()=>document.removeEventListener(hU,e)},[]),(0,b.createElement)(hL.div,(0,E.Z)({},c,{ref:v,style:{pointerEvents:j?k?"auto":"none":void 0,...e.style},onFocusCapture:hM(e.onFocusCapture,_.onFocusCapture),onBlurCapture:hM(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:hM(e.onPointerDownCapture,S.onPointerDownCapture)}))});function h$(){let e=new CustomEvent(hU);document.dispatchEvent(e)}function hY(e,t,n,{discrete:r}){var i,o;let a=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?(i=a,o=s,i&&(0,e6.flushSync)(()=>i.dispatchEvent(o))):a.dispatchEvent(s)}(e,t)=>(0,b.createElement)(hL.span,(0,E.Z)({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));let hG="NavigationMenu",[hX,hK,hQ]=hH(hG),[hJ,h0,h1]=hH(hG),[h2,h4]=hC(hG,[hQ,h1]),[h3,h5]=h2(hG),[h6,h8]=h2(hG),[h7,h9]=h2("NavigationMenuItem"),pe=((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=h5("NavigationMenuIndicator",n),o=hK(n),[a,s]=(0,b.useState)(null),[l,u]=(0,b.useState)(null),c="horizontal"===i.orientation,d=!!i.value;(0,b.useEffect)(()=>{var e;let t=o(),n=null===(e=t.find(e=>e.value===i.value))||void 0===e?void 0:e.ref.current;n&&s(n)},[o,i.value]);let f=()=>{a&&u({size:c?a.offsetWidth:a.offsetHeight,offset:c?a.offsetLeft:a.offsetTop})};return pa(a,f),pa(i.indicatorTrack,f),l?(0,b.createElement)(hL.div,(0,E.Z)({"aria-hidden":!0,"data-state":d?"visible":"hidden","data-orientation":i.orientation},r,{ref:t,style:{position:"absolute",...c?{left:0,width:l.size+"px",transform:`translateX(${l.offset}px)`}:{top:0,height:l.size+"px",transform:`translateY(${l.offset}px)`},...r.style}})):null},"NavigationMenuContent"),pt=((e,t)=>{let n=h5(pe,e.__scopeNavigationMenu),{onViewportContentChange:r,onViewportContentRemove:i}=n;return hV(()=>{r(e.value,{ref:t,...e})},[e,t,r]),hV(()=>()=>i(e.value),[e.value,i]),null},"navigationMenu.rootContentDismiss"),pn=(0,b.forwardRef)((e,t)=>{let{__scopeNavigationMenu:n,value:r,triggerRef:i,focusProxyRef:o,wasEscapeCloseRef:a,onRootContentClose:s,onContentFocusOutside:l,...u}=e,c=h5(pe,n),d=(0,b.useRef)(null),f=hT(d,t),h=function(e,t){return`${e}-trigger-${t}`}(c.baseId,r),p=function(e,t){return`${e}-content-${t}`}(c.baseId,r),m=hK(n),v=(0,b.useRef)(null),{onItemDismiss:g}=c;(0,b.useEffect)(()=>{let e=d.current;if(c.isRootMenu&&e){let t=()=>{var t;g(),s(),e.contains(document.activeElement)&&(null===(t=i.current)||void 0===t||t.focus())};return e.addEventListener(pt,t),()=>e.removeEventListener(pt,t)}},[c.isRootMenu,e.value,i,g,s]);let y=(0,b.useMemo)(()=>{let e=m(),t=e.map(e=>e.value);"rtl"===c.dir&&t.reverse();let n=t.indexOf(c.value),i=t.indexOf(c.previousValue),o=r===c.value,a=i===t.indexOf(r);if(!o&&!a)return v.current;let s=(()=>{if(n!==i){if(o&&-1!==i)return n>i?"from-end":"from-start";if(a&&-1!==n)return n>i?"to-start":"to-end"}return null})();return v.current=s,s},[c.previousValue,c.value,c.dir,m,r]);return(0,b.createElement)(pr,{asChild:!0},(0,b.createElement)(hq,(0,E.Z)({id:p,"aria-labelledby":h,"data-motion":y,"data-orientation":c.orientation},u,{ref:f,onDismiss:()=>{var e;let t=new Event(pt,{bubbles:!0,cancelable:!0});null===(e=d.current)||void 0===e||e.dispatchEvent(t)},onFocusOutside:hM(e.onFocusOutside,e=>{var t;l();let n=e.target;null!==(t=c.rootNavigationMenu)&&void 0!==t&&t.contains(n)&&e.preventDefault()}),onPointerDownOutside:hM(e.onPointerDownOutside,e=>{var t;let n=e.target,r=m().some(e=>{var t;return null===(t=e.ref.current)||void 0===t?void 0:t.contains(n)}),i=c.isRootMenu&&(null===(t=c.viewport)||void 0===t?void 0:t.contains(n));(r||i||!c.isRootMenu)&&e.preventDefault()}),onKeyDown:hM(e.onKeyDown,e=>{let t=e.altKey||e.ctrlKey||e.metaKey,n="Tab"===e.key&&!t;if(n){let t=function(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}(e.currentTarget),n=document.activeElement,i=t.findIndex(e=>e===n),a=e.shiftKey,s=a?t.slice(0,i).reverse():t.slice(i+1,t.length);if(po(s))e.preventDefault();else{var r;null===(r=o.current)||void 0===r||r.focus()}}}),onEscapeKeyDown:hM(e.onEscapeKeyDown,e=>{a.current=!0})})))}),pr=((e,t)=>{let{__scopeNavigationMenu:n,children:r,...i}=e,o=h5("NavigationMenuViewport",n),a=hT(t,o.onViewportChange),s=h8(pe,e.__scopeNavigationMenu),[l,u]=(0,b.useState)(null),[c,d]=(0,b.useState)(null),f=l?(null==l?void 0:l.width)+"px":void 0,h=l?(null==l?void 0:l.height)+"px":void 0,p=!!o.value,m=p?o.value:o.previousValue;return pa(c,()=>{c&&u({width:c.offsetWidth,height:c.offsetHeight})}),(0,b.createElement)(hL.div,(0,E.Z)({"data-state":function(e){return e?"open":"closed"}(p),"data-orientation":o.orientation},i,{ref:a,style:{pointerEvents:!p&&o.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":f,"--radix-navigation-menu-viewport-height":h,...i.style},onPointerEnter:hM(e.onPointerEnter,o.onContentEnter),onPointerLeave:hM(e.onPointerLeave,function(e){return t=>"mouse"===t.pointerType?e(t):void 0}(o.onContentLeave))}),Array.from(s.items).map(([e,{ref:t,forceMount:n,...r}])=>{let i=m===e;return(0,b.createElement)(hz,{key:e,present:n||i},(0,b.createElement)(pn,(0,E.Z)({},r,{ref:hA(t,e=>{i&&e&&d(e)})})))}))},(0,b.forwardRef)((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=h5("FocusGroup",n);return(0,b.createElement)(hJ.Provider,{scope:n},(0,b.createElement)(hJ.Slot,{scope:n},(0,b.createElement)(hL.div,(0,E.Z)({dir:i.dir},r,{ref:t}))))})),pi=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"];(e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=h0(n),o=h5("FocusGroupItem",n);return(0,b.createElement)(hJ.ItemSlot,{scope:n},(0,b.createElement)(hL.button,(0,E.Z)({},r,{ref:t,onKeyDown:hM(e.onKeyDown,e=>{let t=["Home","End",...pi].includes(e.key);if(t){let t=i().map(e=>e.ref.current),n="rtl"===o.dir?"ArrowRight":"ArrowLeft";if([n,"ArrowUp","End"].includes(e.key)&&t.reverse(),pi.includes(e.key)){let n=t.indexOf(e.currentTarget);t=t.slice(n+1)}setTimeout(()=>po(t)),e.preventDefault()}})})))};function po(e){let t=document.activeElement;return e.some(e=>e===t||(e.focus(),document.activeElement!==t))}function pa(e,t){let n=hF(t);hV(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}var ps=n(38617);let pl=b.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,x.jsx)(dq,{...r,ref:t,className:(0,ea.cx)("select-none flex items-center rounded cursor-pointer","focus:ring ring-blue-500 dark:ring-blue-200","text-gray-700 dark:text-graydark-700","data-[state=checked]:text-gray-1100 data-[state=checked]:dark:text-white",n)})});function pu(e){let{className:t,tooltipClassName:n,tabIndex:r}=e,{theme:i,setTheme:o}=(0,ps.F)();return(0,x.jsxs)(dW,{value:i,tabIndex:r,className:(0,ea.cx)("flex gap-4",t),onValueChange:e=>o(e),children:[(0,x.jsx)(pl,{value:"system",children:(0,x.jsx)(s4,{className:n,sideOffset:16,content:"System",children:(0,x.jsx)(s6.$Iz,{})})}),(0,x.jsx)(pl,{value:"light",children:(0,x.jsx)(s4,{className:n,sideOffset:16,content:"Light",children:(0,x.jsx)(s6.JaG,{})})}),(0,x.jsx)(pl,{value:"dark",children:(0,x.jsx)(s4,{className:n,sideOffset:16,content:"Dark",children:(0,x.jsx)(s6.osk,{})})})]})}var pc=n(14582),pd=n(63739),pf=n(13980),ph=n.n(pf),pp=n(72779),pm=n.n(pp),pv=n(47440),pg=n(59309),py=n(19067),px=n(71220),pb=n(28142);function pw(e){return"bandwidth"in e?e.bandwidth():0}var pE=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function pj(){return(pj=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,pE),g=null!=m?m:(0,px.Z)(r,void 0===f?10:f),y=(null!=p?p:0)+pw(r)/2,x=g.map(function(e,t){var n,o=(null!=(n=(0,pb.Z)(r(e)))?n:0)+y;return{index:t,from:new py.Z({x:0,y:o}),to:new py.Z({x:i,y:o})}});return b.createElement(pg.Z,{className:pm()("visx-rows",c),top:void 0===t?0:t,left:void 0===n?0:n},d?d({lines:x}):x.map(function(e){var t=e.from,n=e.to,r=e.index;return b.createElement(pv.default,pj({key:"row-line-"+r,from:t,to:n,stroke:a,strokeWidth:l,strokeDasharray:u,style:h},v))}))}pk.propTypes={tickValues:ph().array,width:ph().number.isRequired};var pS=["top","left","scale","height","stroke","strokeWidth","strokeDasharray","className","numTicks","lineStyle","offset","tickValues","children"];function p_(){return(p_=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,pS),g=null!=p?p:(0,px.Z)(r,void 0===d?10:d),y=(null!=h?h:0)+pw(r)/2,x=g.map(function(e,t){var n,o=(null!=(n=(0,pb.Z)(r(e)))?n:0)+y;return{index:t,from:new py.Z({x:o,y:0}),to:new py.Z({x:o,y:i})}});return b.createElement(pg.Z,{className:pm()("visx-columns",c),top:void 0===t?0:t,left:void 0===n?0:n},m?m({lines:x}):x.map(function(e){var t=e.from,n=e.to,r=e.index;return b.createElement(pv.default,p_({key:"column-line-"+r,from:t,to:n,stroke:a,strokeWidth:l,strokeDasharray:u,style:f},v))}))}pO.propTypes={tickValues:ph().array,height:ph().number.isRequired};var pC=n(64183),pM=n(8597);function pA(e){var t=e.id,n=e.width,r=e.height,i=e.children;return b.createElement("defs",null,b.createElement("pattern",{id:t,width:n,height:r,patternUnits:"userSpaceOnUse"},i))}pA.propTypes={id:ph().string.isRequired,width:ph().number.isRequired,height:ph().number.isRequired,children:ph().node.isRequired};var pT={horizontal:"horizontal",vertical:"vertical",diagonal:"diagonal",diagonalRightToLeft:"diagonalRightToLeft"};function pP(e){var t=e.id,n=e.width,r=e.height,i=e.stroke,o=e.strokeWidth,a=e.strokeDasharray,s=e.strokeLinecap,l=void 0===s?"square":s,u=e.shapeRendering,c=void 0===u?"auto":u,d=e.orientation,f=void 0===d?["vertical"]:d,h=e.background,p=e.className,m=Array.isArray(f)?f:[f];return b.createElement(pA,{id:t,width:n,height:r},!!h&&b.createElement("rect",{className:pm()("visx-pattern-line-background"),width:n,height:r,fill:h}),m.map(function(e,n){return b.createElement("path",{key:"visx-"+t+"-line-"+e+"-"+n,className:pm()("visx-pattern-line",p),d:function(e){var t=e.height;switch(e.orientation){case pT.horizontal:return"M 0,"+t/2+" l "+t+",0";case pT.diagonal:return"M 0,"+t+" l "+t+","+-t+" M "+-t/4+","+t/4+" l "+t/2+","+-t/2+"\n M "+3/4*t+","+5/4*t+" l "+t/2+","+-t/2;case pT.diagonalRightToLeft:return"M 0,0 l "+t+","+t+"\n M "+-t/4+","+3/4*t+" l "+t/2+","+t/2+"\n M "+3/4*t+","+-t/4+" l "+t/2+","+t/2;case pT.vertical:default:return"M "+t/2+", 0 l 0, "+t}}({orientation:e,height:r}),stroke:i,strokeWidth:o,strokeDasharray:a,strokeLinecap:l,shapeRendering:c})}))}pP.propTypes={id:ph().string.isRequired,width:ph().number.isRequired,height:ph().number.isRequired,className:ph().string,background:ph().string,stroke:ph().string,strokeWidth:ph().oneOfType([ph().number,ph().string]),strokeDasharray:ph().oneOfType([ph().string,ph().number]),strokeLinecap:ph().oneOf(["square","butt","round","inherit"]),shapeRendering:ph().oneOfType([ph().string,ph().number]),orientation:ph().array};var pN=["tooltipOpen"];function pR(){return(pR=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,pD);return b.createElement("div",pL({ref:t,className:pm()("visx-tooltip",n),style:pL({top:null==r||null==l?r:r+l,left:null==i||null==a?i:i+a},m&&{position:"absolute"},!h&&c)},v),d)});function pz(){return(pz=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,pU),g=!1,y=!1;if(u&&l){var x=void 0===r?0:r,w=void 0===f?0:f;if(l.width){var E=x+o+u.width-l.width,j=u.width-x-o;g=E>0&&E>j}else{var k=x+o+u.width-window.innerWidth,S=u.width-x-o;g=k>0&&k>S}if(l.height){var _=w+s+u.height-l.height,O=u.height-w-s;y=_>0&&_>O}else y=w+s+u.height>window.innerHeight;x=g?x-u.width-o:x+o,w=y?w-u.height-s:w+s,t="translate("+(x=Math.round(x))+"px, "+(w=Math.round(w))+"px)"}return b.createElement(pV,pW({ref:m,style:pW({left:0,top:0,transform:t},!p&&d)},v),b.createElement(pH,{value:{isFlippedVertically:!y,isFlippedHorizontally:!g}},n))}pq.propTypes={nodeRef:ph().oneOfType([ph().string,ph().func,ph().object])};var p$=((Ez=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={rect:void 0,parentRect:void 0},n.nodeRef=b.createRef(),n.getRects=n.getRects.bind(function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n)),n}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,pI(t,e);var n=t.prototype;return n.componentDidMount=function(){var e,t=this;this.node=null!=(e=this.nodeRef)&&e.current?this.nodeRef.current:e6.findDOMNode(this),this.setState(function(){return t.getRects()})},n.getRects=function(){if(!this.node)return this.state;var e=this.node,t=e.parentNode;return{rect:e.getBoundingClientRect?e.getBoundingClientRect():pZ,parentRect:null!=t&&t.getBoundingClientRect?t.getBoundingClientRect():pZ}},n.render=function(){return b.createElement(pq,pz({nodeRef:this.nodeRef,getRects:this.getRects},this.state,this.props))},t}(b.PureComponent)).displayName="withBoundingRects("+(pq.displayName||"")+")",Ez),pY=n(99985);function pG(e,t){if("invert"in e&&void 0!==e.invert)return e.invert(t).valueOf();var n=e.range(),r=n[0],i=n[1],o=0,a=("step"in e&&void 0!==e.step?e.step():1)*(i-r)/Math.abs(i-r);if(a>0)for(;t>r+a*(o+1);)o+=1;else for(;t0?Math.min(e.dx,t.bounds.x1-a):Math.max(e.dx,t.bounds.x0-r),u=e.dy>0?Math.min(e.dy,t.bounds.y1-s):Math.max(e.dy,t.bounds.y0-i);return p3({},t,{isBrushing:!0,extent:p3({},t.extent,{x0:r+l,x1:a+l,y0:i+u,y1:s+u})})})},t.selectionDragEnd=function(){var e=t.props,n=e.updateBrush,r=e.onBrushEnd,i=e.onMoveSelectionChange;e.isControlled||n(function(e){var t=p3({},e,{isBrushing:!1,start:p3({},e.start,{x:Math.min(e.extent.x0,e.extent.x1),y:Math.min(e.extent.y0,e.extent.y1)}),end:p3({},e.end,{x:Math.max(e.extent.x0,e.extent.x1),y:Math.max(e.extent.y0,e.extent.y1)})});return r&&r(t),t}),i&&i()},t}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,p5(t,e),t.prototype.render=function(){var e=this.props,t=e.width,n=e.height,r=e.stageWidth,i=e.stageHeight,o=e.brush,a=e.disableDraggingSelection,s=e.onMouseLeave,l=e.onMouseMove,u=e.onMouseUp,c=e.onClick,d=e.selectedBoxStyle,f=e.isControlled,h=e.isDragInProgress;return b.createElement(pY.Z,{width:t,height:n,resetOnStart:!0,onDragStart:this.selectionDragStart,onDragMove:this.selectionDragMove,onDragEnd:this.selectionDragEnd,isDragging:f?h:void 0},function(e){var h=e.isDragging,p=e.dragStart,m=e.dragEnd,v=e.dragMove;return b.createElement("g",null,h&&b.createElement("rect",{width:r,height:i,fill:"transparent",onPointerUp:f?void 0:m,onPointerMove:v,onPointerLeave:f?void 0:m,style:p6}),b.createElement("rect",p3({x:Math.min(o.extent.x0,o.extent.x1),y:Math.min(o.extent.y0,o.extent.y1),width:t,height:n,className:"visx-brush-selection",onPointerDown:a?void 0:p,onPointerLeave:function(e){s&&s(e)},onPointerMove:function(e){v(e),l&&l(e)},onPointerUp:function(e){f||m(e),u&&u(e)},onClick:function(e){c&&c(e)},style:{pointerEvents:o.isBrushing||o.activeHandle?"none":"all",cursor:a?void 0:"move"}},d)))})},t}(b.Component);function p7(){return(p7=Object.assign?Object.assign.bind():function(e){for(var t=1;t0?Math.min(l,e.bounds.x1-o):Math.max(l,e.bounds.x0-n),c=u>0?Math.min(u,e.bounds.y1-a):Math.max(u,e.bounds.y0-r);return p7({},e,{isBrushing:!0,extent:p7({},e.extent,{x0:n+s,y0:r+c,x1:o+s,y1:a+c})})}),"select"===i&&n.updateBrush(function(e){var t=e.start,r=t.x,i=t.y,o={x:Math.min(Math.max(r+l,e.bounds.x0),e.bounds.x1),y:Math.min(Math.max(i+u,e.bounds.y0),e.bounds.y1)},a=n.getExtent(s,o);return p7({},e,{end:o,extent:a})})}},n.getExtent=function(e,t){var r=n.props,i=r.brushDirection,o=r.width,a=r.height;return{x0:"vertical"===i?0:Math.min(e.x||0,t.x||0),x1:"vertical"===i?o:Math.max(e.x||0,t.x||0),y0:"horizontal"===i?0:Math.min(e.y||0,t.y||0),y1:"horizontal"===i?a:Math.max(e.y||0,t.y||0)}},n.handleDragStart=function(e){var t=n.props,r=t.onBrushStart,i=t.left,o=t.top,a=t.inheritedMargin,s=t.useWindowMoveEvents,l=null!=a&&a.left?a.left:0,u=null!=a&&a.top?a.top:0,c={x:(e.x||0)+e.dx-i-l,y:(e.y||0)+e.dy-o-u},d=p7({},c);r&&r(c),n.updateBrush(function(t){return p7({},t,{start:c,end:d,extent:{x0:-1,x1:-1,y0:-1,y1:-1},isBrushing:!0,brushingType:"select",brushPageOffset:s?pK(e.event):void 0})})},n.handleBrushStart=function(e){var t=n.props,r=t.onBrushStart,i=t.left,o=t.top,a=t.inheritedMargin;if(r){var s=null!=a&&a.left?a.left:0,l=null!=a&&a.top?a.top:0;r({x:(e.x||0)+e.dx-i-s,y:(e.y||0)+e.dy-o-l})}},n.handleDragMove=function(e){var t=n.props,r=t.left,i=t.top,o=t.inheritedMargin,a=t.useWindowMoveEvents;if(e.isDragging&&!a){var s=(null==o?void 0:o.left)||0,l=(null==o?void 0:o.top)||0,u={x:(e.x||0)+e.dx-r-s,y:(e.y||0)+e.dy-i-l};n.updateBrush(function(e){var t=e.start,r=n.getExtent(t,u);return p7({},e,{end:u,extent:r})})}},n.handleDragEnd=function(){var e=n.props,t=e.onBrushEnd,r=e.resetOnEnd;e.useWindowMoveEvents||n.updateBrush(function(e){var i=e.extent,o=p7({},e,{start:{x:i.x0,y:i.y0},end:{x:i.x1,y:i.y1},isBrushing:!1,brushingType:void 0,activeHandle:null});return t&&t(o),r&&n.reset(),o})},n.getBrushWidth=function(){var e=n.state.extent,t=e.x0,r=e.x1;return Math.max(Math.max(t,r)-Math.min(t,r),0)},n.getBrushHeight=function(){var e=n.state.extent,t=e.y1,r=e.y0;return Math.max(Math.max(r,t)-Math.min(r,t),0)},n.handles=function(){var e=n.props.handleSize,t=n.state.extent,r=t.x0,i=t.x1,o=t.y0,a=t.y1,s=e/2,l=n.getBrushWidth(),u=n.getBrushHeight();return{top:{x:r-s,y:o-s,height:e,width:l+e},bottom:{x:r-s,y:a-s,height:e,width:l+e},right:{x:i-s,y:o-s,height:u+e,width:e},left:{x:r-s,y:o-s,height:u+e,width:e}}},n.corners=function(){var e=n.props.handleSize,t=n.state.extent,r=t.x0,i=t.x1,o=t.y0,a=t.y1,s=e/2;return{topLeft:{x:Math.min(r,i)-s,y:Math.min(o,a)-s,width:e,height:e},topRight:{x:Math.max(r,i)-s,y:Math.min(o,a)-s,width:e,height:e},bottomLeft:{x:Math.min(r,i)-s,y:Math.max(o,a)-s,width:e,height:e},bottomRight:{x:Math.max(r,i)-s,y:Math.max(o,a)-s,width:e,height:e}}},n.updateBrush=function(e){var t=n.props.onChange;n.setState(e,function(){t&&t(n.state)})},n.reset=function(){var e=n.props,t=e.width,r=e.height;n.updateBrush(function(){return{start:{x:0,y:0},end:{x:0,y:0},extent:{x0:-1,x1:-1,y0:-1,y1:-1},bounds:{x0:0,x1:t,y0:0,y1:r},isBrushing:!1,brushPageOffset:void 0,activeHandle:null,brushingType:void 0}})},n.handleBrushingTypeChange=function(e,t){n.updateBrush(function(n){var r=p7({},n,{brushingType:e,isBrushing:void 0!==e});return(t||void 0===e)&&(r.brushPageOffset=t),r})};var n,r=t.initialBrushPosition,i=r?n.getExtent(r.start,r.end):{x0:-1,x1:-1,y0:-1,y1:-1};return n.state={start:{x:Math.max(0,i.x0),y:Math.max(0,i.y0)},end:{x:Math.max(0,i.x1),y:Math.max(0,i.y1)},extent:i,bounds:{x0:0,x1:n.props.width,y0:0,y1:n.props.height},isBrushing:!1,brushingType:void 0,activeHandle:null},n}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,p9(t,e);var n=t.prototype;return n.componentDidUpdate=function(e){var t=this;(this.props.width!==e.width||this.props.height!==e.height)&&this.setState(function(n){var r=n.start,i=n.end,o=n.extent;if(!(-1===o.x0&&-1===o.x1&&-1===o.y0&&-1===o.y1)){var a=t.props.width/e.width,s=t.props.height/e.height;r={x:a*o.x0,y:s*o.y0},i={x:a*o.x1,y:s*o.y1},o=t.getExtent(r,i)}return{start:r,end:i,extent:o,bounds:{x0:0,x1:t.props.width,y0:0,y1:t.props.height}}})},n.componentDidMount=function(){this.props.useWindowMoveEvents&&(window.addEventListener("mouseup",this.handleWindowPointerUp),window.addEventListener("mousemove",this.handleWindowPointerMove))},n.componentWillUnmount=function(){this.props.useWindowMoveEvents&&(window.removeEventListener("mouseup",this.handleWindowPointerUp),window.removeEventListener("mousemove",this.handleWindowPointerMove))},n.render=function(){var e=this,t=this.state,n=t.start,r=t.end,i=this.props,o=i.top,a=i.left,s=i.width,l=i.height,u=i.onMouseLeave,c=i.onMouseUp,d=i.onMouseMove,f=i.onBrushEnd,h=i.onClick,p=i.resizeTriggerAreas,m=i.selectedBoxStyle,v=i.disableDraggingSelection,g=i.clickSensitivity,y=i.useWindowMoveEvents,x=i.renderBrushHandle,w=this.state.brushingType,E=this.handles(),j=this.corners(),k=this.getBrushWidth(),S=this.getBrushHeight(),_=new Set(p);return b.createElement(pg.Z,{className:"visx-brush",top:o,left:a},b.createElement(pY.Z,{width:s,height:l,resetOnStart:!0,onDragStart:this.handleDragStart,onDragMove:this.handleDragMove,onDragEnd:this.handleDragEnd,isDragging:y?"select"===w:void 0},function(t){var n=t.dragStart,r=t.isDragging,i=t.dragMove,o=t.dragEnd;return b.createElement(pc.Z,{className:"visx-brush-overlay",fill:"transparent",x:0,y:0,width:s,height:l,onDoubleClick:function(){return e.reset()},onClick:function(t){var n=e.mouseUpTime-e.mouseDownTime;h&&n=0||(i[n]=e[n]);return i}(e,ma),g=o,y=s,x=a,w=l;return void 0!==m&&!m||g||y||x||w||(g="0",y="0",x="0",w="1"),b.createElement("defs",null,b.createElement("linearGradient",ms({id:n,x1:g,y1:x,x2:y,y2:w,gradientTransform:h?"rotate("+h+")":p},v),!!t&&t,!t&&b.createElement("stop",{offset:void 0===u?"0%":u,stopColor:r,stopOpacity:void 0===c?1:c}),!t&&b.createElement("stop",{offset:void 0===d?"100%":d,stopColor:i,stopOpacity:void 0===f?1:f})))}function mu(e,t){return null==e||null==t?NaN:et?1:e>=t?0:NaN}function mc(e,t){return null==e||null==t?NaN:te?1:t>=e?0:NaN}function md(){return 0}function mf(e,t){let n,r;if(void 0===t)for(let t of e)null!=t&&(void 0===n?t>=t&&(n=r=t):(n>t&&(n=t),r=o&&(n=r=o):(n>o&&(n=o),r=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n=i)&&(n=i)}return n}ml.propTypes={id:ph().string.isRequired,from:ph().string,to:ph().string,x1:ph().oneOfType([ph().string,ph().number]),x2:ph().oneOfType([ph().string,ph().number]),y1:ph().oneOfType([ph().string,ph().number]),y2:ph().oneOfType([ph().string,ph().number]),fromOffset:ph().oneOfType([ph().string,ph().number]),fromOpacity:ph().oneOfType([ph().string,ph().number]),toOffset:ph().oneOfType([ph().string,ph().number]),toOpacity:ph().oneOfType([ph().string,ph().number]),rotate:ph().oneOfType([ph().string,ph().number]),transform:ph().string,children:ph().node,vertical:ph().bool};var mp=n(12436),mm=n.n(mp),mv=n(55746),mg=n(45742),my=n(27266),mx=["id","markerWidth","markerHeight","markerUnits","children"];function mb(){return(mb=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,mx);return b.createElement("defs",null,b.createElement("marker",mb({id:t,markerWidth:void 0===n?3:n,markerHeight:void 0===r?3:r,markerUnits:void 0===i?"userSpaceOnUse":i},a),o))}mw.propTypes={id:ph().string.isRequired,size:ph().number,markerWidth:ph().oneOfType([ph().string,ph().number]),markerHeight:ph().oneOfType([ph().string,ph().number]),markerUnits:ph().string,refX:ph().oneOfType([ph().string,ph().number]),refY:ph().oneOfType([ph().string,ph().number]),strokeWidth:ph().number,children:ph().node.isRequired};var mE=["id","size","strokeWidth"];function mj(){return(mj=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,mE),s=2*r+o,l=s/2;return b.createElement(mw,mj({id:t,markerWidth:s,markerHeight:s,refX:0,refY:l,orient:"auto-start-reverse",markerUnits:"strokeWidth",strokeWidth:o},a),b.createElement("circle",{r:r,cx:l,cy:l}))}var mS=n(64170),m_={top:"top",left:"left",bottom:"bottom"};function mO(){return(mO=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,mD),k=null!=g?g:"tickFormat"in v?v.tickFormat():mP.Z,S=h===m_.left,_=h===m_.top,O=_||h===m_.bottom,C=function(e,t){if(void 0===t&&(t="center"),"start"!==t&&"bandwidth"in e){var n=e.bandwidth();return"center"===t&&(n/=2),e.round()&&(n=Math.round(n)),function(t){var r=e(t);return"number"==typeof r?r+n:r}}return e}(v),M=S||_?-1:1,A=v.range(),T=(void 0===(t=m)&&(t=0),"number"==typeof t?{start:t,end:t}:mR({start:0,end:0},t)),P=mN({x:Number(A[0])+.5-T.start,y:0},O),N=mN({x:Number(A[A.length-1])+.5+T.end,y:0},O),R=(null!=w?w:(0,px.Z)(v,d)).filter(function(e){return!l||0!==e&&"0"!==e}).map(function(e,t){return{value:e,index:t}}),D=R.map(function(e){var t=e.value,n=e.index,r=(0,pb.Z)(C(t));return{value:t,index:n,from:mN({x:r,y:0},O),to:mN({x:r,y:x*M},O),formattedValue:k(t,n,R)}});return b.createElement(pg.Z,{className:pm()("visx-axis",i),top:void 0===E?0:E,left:void 0===u?0:u},r(mL({},j,{axisFromPoint:P,axisToPoint:N,hideAxisLine:void 0!==o&&o,hideTicks:void 0!==a&&a,hideZero:l,horizontal:O,numTicks:d,orientation:h,rangePadding:m,scale:v,tickFormat:k,tickLength:x,tickPosition:C,tickSign:M,ticks:D})))}var mV=["axisClassName","labelOffset","tickLabelProps","tickLength"];function mz(){return(mz=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,mV);return b.createElement(mF,mz({axisClassName:pm()("visx-axis-bottom",t),labelOffset:void 0===n?8:n,orientation:m_.bottom,tickLabelProps:void 0===r?mI:r,tickLength:void 0===i?8:i},o))}var mB=["axisClassName","labelOffset","tickLabelProps","tickLength"];function mH(){return(mH=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,mB);return b.createElement(mF,mH({axisClassName:pm()("visx-axis-left",t),labelOffset:void 0===n?36:n,orientation:m_.left,tickLabelProps:void 0===r?mU:r,tickLength:void 0===i?8:i},o))}let mq=e=>new Date((null==e?void 0:e.timestamp)||0),m$=e=>(null==e?void 0:e.value)||0,mY="var(--colors-hiContrast)",mG={textAnchor:"middle",fontFamily:"var(--fonts-sans)",fontSize:10,fill:mY},mX={dx:"-0.25em",dy:"0.25em",fontFamily:"var(--fonts-sans)",fontSize:10,textAnchor:"end",fill:mY};function mK(e){let{data:t,gradientColor:n,width:r,yMax:i,margin:o,xScale:a,yScale:s,hideBottomAxis:l=!1,hideLeftAxis:u=!1,top:c,left:d,curve:f="step",children:h}=e;return r<10?null:(0,x.jsxs)(pg.Z,{left:d||o.left,top:c||o.top,children:[(0,x.jsx)(mk,{id:"marker-circle",fill:"var(--colors-accent11)",size:1.5,refX:1.5}),(0,x.jsx)(ml,{id:"gradient",from:n,fromOpacity:1,to:n,toOpacity:.2}),(0,x.jsx)(mv.Z,{data:t,x:e=>a(mq(e))||0,y:e=>s(m$(e))||0,yScale:s,strokeWidth:1,stroke:"url(#gradient)",fill:"url(#gradient)",markerMid:"url(#marker-circle)",curve:"step"===f?mg.ZP:my.Z}),!l&&(0,x.jsx)(mZ,{top:i,scale:a,numTicks:r>520?10:5,stroke:mY,tickStroke:mY,tickLabelProps:()=>mG}),!u&&(0,x.jsx)(mW,{scale:s,numTicks:5,stroke:mY,tickStroke:mY,tickLabelProps:()=>mX}),h]})}var mQ=n(6692);let mJ={inherit:mQ.inherit,current:mQ.current,transparent:mQ.transparent,black:mQ.black,white:mQ.white,slate:mQ.slate,zinc:mQ.zinc,neutral:mQ.neutral,stone:mQ.stone,red:mQ.red,orange:mQ.orange,amber:mQ.amber,yellow:mQ.yellow,lime:mQ.lime,green:mQ.green,emerald:mQ.emerald,teal:mQ.teal,cyan:mQ.cyan,sky:mQ.sky,blue:mQ.blue,indigo:mQ.indigo,violet:mQ.violet,purple:mQ.purple,fuchsia:mQ.fuchsia,pink:mQ.pink,rose:mQ.rose,mask:"rgba(30, 169, 76, .3)",accent:{50:"#F6FFF9",100:"#E9FBEF",200:"#D5F2DE",300:"#C9EED4",400:"#BBE8C9",500:"#9BDAAE",600:"#71C48A",700:"#3EAA5F",800:"#05872D",900:"#056B24",1e3:"#04511B",1100:"#011F0A"},accentdark:{50:"#05150A",100:"#051C0C",200:"#062811",300:"#073515",400:"#064018",500:"#075820",600:"#056824",700:"#077A2A",800:"#05872D",900:"#069F35",1e3:"#2FA052",1100:"#D9F4E1"},gray:{50:"hsl(206, 30.0%, 98.8%)",100:"hsl(210, 16.7%, 97.6%)",200:"hsl(209, 13.3%, 95.3%)",300:"hsl(209, 12.2%, 93.2%)",400:"hsl(208, 11.7%, 91.1%)",500:"hsl(208, 11.3%, 88.9%)",600:"hsl(207, 11.1%, 85.9%)",700:"hsl(205, 10.7%, 78.0%)",800:"hsl(206, 6.0%, 56.1%)",900:"hsl(206, 5.8%, 52.3%)",1e3:"hsl(206, 6.0%, 43.5%)",1100:"hsl(206, 24.0%, 9.0%)"},graydark:{50:"hsl(200, 7.0%, 8.8%)",100:"hsl(195, 7.1%, 11.0%)",200:"hsl(197, 6.8%, 13.6%)",300:"hsl(198, 6.6%, 15.8%)",400:"hsl(199, 6.4%, 17.9%)",500:"hsl(201, 6.2%, 20.5%)",600:"hsl(203, 6.0%, 24.3%)",700:"hsl(207, 5.6%, 31.6%)",800:"hsl(206, 6.0%, 43.9%)",900:"hsl(206, 5.2%, 49.5%)",1e3:"hsl(206, 6.0%, 63.0%)",1100:"hsl(210, 6.0%, 93.0%)"}};var m0=n(96206);let m1={top:10,bottom:15,left:10,right:10},m2="brush_pattern",m4="brush_gradient",m3=mm()(e=>e(),15),m5=function(e){let t,n,r;function i(e,r,i=0,o=e.length){if(i>>1;0>n(e[t],r)?i=t+1:o=t}while(imu(e(t),n),r=(t,n)=>e(t)-n):(t=e===mu||e===mc?e:md,n=e,r=e),{left:i,center:function(e,t,n=0,o=e.length){let a=i(e,t,n,o-1);return a>n&&r(e[a-1],t)>-r(e[a],t)?a-1:a},right:function(e,r,i=0,o=e.length){if(i>>1;0>=n(e[t],r)?i=t+1:o=t}while(inew Date((null==e?void 0:e.timestamp)||0)).left;void 0===EI&&(EI={style:{position:"relative",width:"inherit",height:"inherit"}}),void 0===EZ&&(EZ=function(e,t){return b.createElement("div",t,e)});var m6=n(70390),m8=n(3440),m7=n.n(m8);function m9(e){let{id:t,width:n,height:r,accessors:i,animationTrajectory:o,curve:a,data:s,config:l,scales:u,enabledGraph:c,enabledTip:d,isStack:f,todayOffset:h,numTicks:p,renderAreaSeries:m,renderAreaStack:v,renderBarGroup:g,renderBarStack:y,enableTooltipGlyph:w,renderTooltipGlyph:E,renderLineSeries:j,sharedTooltip:k,showHorizontalCrosshair:S,showTooltip:_,showVerticalCrosshair:O,snapTooltipToDatum:C,stackOffset:M,margin:A,theme:T,xAxisOrientation:P,yAxisOrientation:N,AreaSeries:R,AreaStack:D,Axis:L,BarGroup:F,BarSeries:V,BarStack:z,Grid:I,LineSeries:Z,Tooltip:B,XYChart:H}=e;return(0,x.jsxs)(H,{theme:T.xyChartTheme,xScale:u.x,yScale:u.y,height:Math.min(400,r),margin:A,captureEvents:!0,children:[(0,x.jsx)("g",{children:(0,x.jsx)("rect",{className:"fill-gray-600 dark:fill-graydark-600 h-full w-px y-0",style:{left:"".concat(100*h,"%")}})},"today-line-".concat(n,"-").concat(r)),(0,x.jsx)(ml,{id:"gradient-default",from:"gray",fromOpacity:1,to:"gray",toOpacity:.4}),Object.entries(l.data).map(e=>{let[n,r]=e,i=r.color;return(0,x.jsxs)(b.Fragment,{children:[(0,x.jsx)(pP,{id:"pattern-".concat(ve(t,n)),height:6,width:6,stroke:i,strokeWidth:.5,orientation:["diagonal"]}),(0,x.jsx)(ml,{id:"gradient-".concat(ve(t,n)),from:i,fromOpacity:1,to:i,toOpacity:f?.4:1})]},n)}),(0,x.jsx)(I,{rows:!1,columns:!0,strokeDasharray:"1,3",animationTrajectory:o,numTicks:p},"grid-".concat(o)),y&&(0,x.jsx)(z,{offset:l.stackOffset,children:c.map(e=>(0,x.jsx)(V,{dataKey:e,data:s,xAccessor:i.x[e],yAccessor:i.y[e],colorAccessor:()=>vt(t,e,l)},e))}),g&&(0,x.jsx)(F,{children:c.map(e=>(0,x.jsx)(V,{dataKey:e,data:s,xAccessor:i.x[e],yAccessor:i.y[e],colorAccessor:()=>vt(t,e,l)},e))}),m&&(0,x.jsx)(x.Fragment,{children:c.map(e=>(0,x.jsx)(R,{dataKey:e,data:s,xAccessor:i.x[e],yAccessor:i.y[e],stroke:vt(t,e,l),fill:vt(t,e,l),curve:a},e))}),v&&(0,x.jsx)(D,{curve:a,offset:l.stackOffset,renderLine:"wiggle"!==M,children:c.map(e=>(0,x.jsx)(R,{dataKey:e,data:s,xAccessor:i.x[e],yAccessor:i.y[e],stroke:vt(t,e,l),fill:vt(t,e,l)},e))}),j&&(0,x.jsx)(x.Fragment,{children:c.map(e=>{var t,n;return(0,x.jsx)(Z,{dataKey:e,data:s,xAccessor:i.x[e],yAccessor:i.y[e],stroke:(null===(n=l.data)||void 0===n?void 0:null===(t=n[e])||void 0===t?void 0:t.color)||"gray",curve:a},e)})}),(0,x.jsx)(L,{orientation:P,numTicks:p,animationTrajectory:o,tickFormat:e=>(0,m0.rN)(e),tickLength:12,tickLabelProps:e=>({...e,fill:T.labels.color,fontFamily:T.labels.fontFamily,y:"14px",fontWeight:"500",fontSize:"8"})},"time-axis-".concat(o)),(0,x.jsx)(L,{label:null==M?"SC":"expand"===M?"Fraction of total":"",orientation:N,numTicks:p,tickLength:12,animationTrajectory:o,tickFormat:l.formatTickY,tickTransform:"translate(-300px, 0)",tickLabelProps:e=>({...e,fill:T.labels.color,fontFamily:T.labels.fontFamily,fontWeight:"500",fontSize:"8"})},"temp-axis-".concat(o)),_&&(0,x.jsx)(B,{showHorizontalCrosshair:S,showVerticalCrosshair:O,snapTooltipToDatumX:C,snapTooltipToDatumY:C,showDatumGlyph:C&&!g,showSeriesGlyphs:k&&!g,renderGlyph:w?E:void 0,renderTooltip:e=>{var t,n;let{tooltipData:r}=e,o=null==r?void 0:null===(t=r.nearestDatum)||void 0===t?void 0:t.datum,a=null==r?void 0:null===(n=r.nearestDatum)||void 0===n?void 0:n.key,s=k?d:a?[a]:[],u=l.formatTimestamp||(e=>(0,m0.rN)(e,{timeStyle:"short",hour12:!1})),c=s.map(e=>{var t,n;return{key:e,category:(null===(n=l.data)||void 0===n?void 0:null===(t=n[e])||void 0===t?void 0:t.category)||""}}),h=m7()(c,"category"),p=l.categories?l.categories.map(e=>[e,h[e]]):Object.entries(h);return(0,x.jsxs)("div",{className:(0,ea.cx)("flex flex-col gap-2 py-1"),children:[(0,x.jsx)(tq,{font:"mono",size:"12",color:"contrast",className:"text-end",children:o?u(i.date(o)):"No date"}),(0,x.jsx)(cb,{color:"panel",className:"w-full"}),(0,x.jsx)("div",{className:(0,ea.cx)("grid gap-x-6 gap-y-4",p.length>1?"grid-cols-2":"grid-cols-1"),children:p.map(e=>{let[t,n]=e,r=o?n.reduce((e,t)=>{let{key:n}=t,r=i.y[n](o);return null==r||Number.isNaN(r)?e:e+r},0):0,s=null==l?void 0:l.formatComponent;return(0,x.jsxs)("div",{className:"flex flex-col gap-2 w-[250px]",children:[t&&(0,x.jsx)(tq,{weight:"semibold",children:t}),(0,x.jsxs)("div",{className:"grid grid-cols-2 gap-x-2 gap-y-1 items-center",children:[n.map(e=>{var t,n,r,u;let{key:c}=e,d=o&&i.y[c](o);return(0,x.jsxs)(b.Fragment,{children:[(0,x.jsx)(tq,{color:"accent",style:{color:null===(n=l.data)||void 0===n?void 0:null===(t=n[c])||void 0===t?void 0:t.color},className:(0,ea.cx)(a===c?"underline":""),children:(null===(u=l.data)||void 0===u?void 0:null===(r=u[c])||void 0===r?void 0:r.label)||c}),(0,x.jsx)(tq,{size:"12",style:{textAlign:"end"},className:(0,ea.cx)(a===c?"underline":""),children:null==d||Number.isNaN(d)?"–":s?(0,x.jsx)(s,{value:d}):l.format?l.format(d):d})]},c)}),n.length>1&&f&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(tq,{className:"pt-2",children:"total"}),(0,x.jsx)(tq,{size:"12",weight:"bold",className:"pt-2 text-end",children:s?(0,x.jsx)(s,{value:r}):l.format?l.format(r):r})]})]})]},t)})})]})}})]})}function ve(e,t){return"".concat(e,"-").concat(t)}function vt(e,t,n){var r;let i=ve(e,t);return(null===(r=n.data)||void 0===r?void 0:r[t])?n.data[t].pattern?"url(#pattern-".concat(i,")"):"url(#gradient-".concat(i,")"):"url(#gradient-default)"}var vn=n(24037),vr=n(86707);function vi(e){var t=e.top,n=e.left,r=e.className,i=e.children;return b.createElement(pg.Z,{className:pm()("visx-glyph",r),top:void 0===t?0:t,left:void 0===n?0:n},i)}vi.propTypes={top:ph().number,left:ph().number,className:ph().string,children:ph().node};var vo=["children","className","top","left","size"];function va(){return(va=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,vo),s=(0,vn.Z)();return(s.type(vr.Z),"number"==typeof o?s.size(o):o&&s.size(o),t)?b.createElement(b.Fragment,null,t({path:s})):b.createElement(vi,{top:r,left:i},b.createElement("path",va({className:pm()("visx-glyph-star",n),d:s()||""},a)))}vs.propTypes={children:ph().func,className:ph().string,top:ph().number,left:ph().number,size:ph().oneOfType([ph().number,ph().func])};var vl=["top","left","className"];function vu(){return(vu=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,vl);return b.createElement(vi,{top:void 0===t?0:t,left:void 0===n?0:n},b.createElement("circle",vu({className:pm()("visx-glyph-dot",r)},i)))}vc.propTypes={className:ph().string,top:ph().number,left:ph().number,r:ph().number,cx:ph().number,cy:ph().number};var vd=n(9135),vf=["children","className","top","left","size"];function vh(){return(vh=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,vf),s=(0,vn.Z)();return(s.type(vd.Z),"number"==typeof o?s.size(o):o&&s.size(o),t)?b.createElement(b.Fragment,null,t({path:s})):b.createElement(vi,{top:r,left:i},b.createElement("path",vh({className:pm()("visx-glyph-cross",n),d:s()||""},a)))}vp.propTypes={children:ph().func,className:ph().string,top:ph().number,left:ph().number,size:ph().oneOfType([ph().number,ph().func])};var vm=n(46385),vv=n(20651),vg={red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"]},vy=vg.gray,vx=vy[7],vb=[vg.cyan[9],vg.cyan[3],vg.yellow[5],vg.red[4],vg.grape[8],vg.grape[5],vg.pink[9]];function vw(){return(vw=Object.assign?Object.assign.bind():function(e){for(var t=1;t{for(var n in t)v_(e,n,{get:t[n],enumerable:!0})})(vO,{assign:()=>v5,colors:()=>v2,createStringInterpolator:()=>EU,skipAnimation:()=>v4,to:()=>EW,willAdvance:()=>v3});var vC=vU(),vM=e=>vI(e,vC),vA=vU();vM.write=e=>vI(e,vA);var vT=vU();vM.onStart=e=>vI(e,vT);var vP=vU();vM.onFrame=e=>vI(e,vP);var vN=vU();vM.onFinish=e=>vI(e,vN);var vR=[];vM.setTimeout=(e,t)=>{let n=vM.now()+t,r=()=>{let e=vR.findIndex(e=>e.cancel==r);~e&&vR.splice(e,1),vV-=~e?1:0},i={time:n,handler:e,cancel:r};return vR.splice(vD(n),0,i),vV+=1,vZ(),i};var vD=e=>~(~vR.findIndex(t=>t.time>e)||~vR.length);vM.cancel=e=>{vT.delete(e),vP.delete(e),vN.delete(e),vC.delete(e),vA.delete(e)},vM.sync=e=>{vz=!0,vM.batchedUpdates(e),vz=!1},vM.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,vM.onStart(n)}return r.handler=e,r.cancel=()=>{vT.delete(n),t=null},r};var vL="undefined"!=typeof window?window.requestAnimationFrame:()=>{};vM.use=e=>vL=e,vM.now="undefined"!=typeof performance?()=>performance.now():Date.now,vM.batchedUpdates=e=>e(),vM.catch=console.error,vM.frameLoop="always",vM.advance=()=>{"demand"!==vM.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):vH()};var vF=-1,vV=0,vz=!1;function vI(e,t){vz?(t.delete(e),e(0)):(t.add(e),vZ())}function vZ(){vF<0&&(vF=0,"demand"!==vM.frameLoop&&vL(vB))}function vB(){~vF&&(vL(vB),vM.batchedUpdates(vH))}function vH(){let e=vF;vF=vM.now();let t=vD(vF);if(t&&(vW(vR.splice(0,t),e=>e.handler()),vV-=t),!vV){vF=-1;return}vT.flush(),vC.flush(e?Math.min(64,vF-e):16.667),vP.flush(),vA.flush(),vN.flush()}function vU(){let e=new Set,t=e;return{add(n){vV+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(vV-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,vV-=t.size,vW(t,t=>t(n)&&e.add(t)),vV+=e.size,t=e)}}}function vW(e,t){e.forEach(e=>{try{t(e)}catch(e){vM.catch(e)}})}function vq(){}var v$=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),vY={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function vG(e,t){if(vY.arr(e)){if(!vY.arr(t)||e.length!==t.length)return!1;for(let n=0;ne.forEach(t);function vK(e,t,n){if(vY.arr(e)){for(let r=0;rvY.und(e)?[]:vY.arr(e)?e:[e];function vJ(e,t){if(e.size){let n=Array.from(e);e.clear(),vX(n,t)}}var v0=(e,...t)=>vJ(e,e=>e(...t)),v1=()=>"undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),v2=null,v4=!1,v3=vq,v5=e=>{e.to&&(EW=e.to),e.now&&(vM.now=e.now),void 0!==e.colors&&(v2=e.colors),null!=e.skipAnimation&&(v4=e.skipAnimation),e.createStringInterpolator&&(EU=e.createStringInterpolator),e.requestAnimationFrame&&vM.use(e.requestAnimationFrame),e.batchedUpdates&&(vM.batchedUpdates=e.batchedUpdates),e.willAdvance&&(v3=e.willAdvance),e.frameLoop&&(vM.frameLoop=e.frameLoop)},v6=new Set,v8=[],v7=[],v9=0,ge={get idle(){return!v6.size&&!v8.length},start(e){v9>e.priority?(v6.add(e),vM.onStart(gt)):(gn(e),vM(gi))},advance:gi,sort(e){if(v9)vM.onFrame(()=>ge.sort(e));else{let t=v8.indexOf(e);~t&&(v8.splice(t,1),gr(e))}},clear(){v8=[],v6.clear()}};function gt(){v6.forEach(gn),v6.clear(),vM(gi)}function gn(e){v8.includes(e)||gr(e)}function gr(e){v8.splice(function(e,t){let n=e.findIndex(t);return n<0?e.length:n}(v8,t=>t.priority>e.priority),0,e)}function gi(e){let t=v7;for(let n=0;n0}var go="[-+]?\\d*\\.?\\d+",ga=go+"%";function gs(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var gl=RegExp("rgb"+gs(go,go,go)),gu=RegExp("rgba"+gs(go,go,go,go)),gc=RegExp("hsl"+gs(go,ga,ga)),gd=RegExp("hsla"+gs(go,ga,ga,go)),gf=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,gh=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,gp=/^#([0-9a-fA-F]{6})$/,gm=/^#([0-9a-fA-F]{8})$/;function gv(e,t,n){return(n<0&&(n+=1),n>1&&(n-=1),n<1/6)?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function gg(e,t,n){let r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,o=gv(i,r,e+1/3),a=gv(i,r,e),s=gv(i,r,e-1/3);return Math.round(255*o)<<24|Math.round(255*a)<<16|Math.round(255*s)<<8}function gy(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function gx(e){let t=parseFloat(e);return(t%360+360)%360/360}function gb(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function gw(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function gE(e){let t;let n="number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=gp.exec(e))?parseInt(t[1]+"ff",16)>>>0:v2&&void 0!==v2[e]?v2[e]:(t=gl.exec(e))?(gy(t[1])<<24|gy(t[2])<<16|gy(t[3])<<8|255)>>>0:(t=gu.exec(e))?(gy(t[1])<<24|gy(t[2])<<16|gy(t[3])<<8|gb(t[4]))>>>0:(t=gf.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=gm.exec(e))?parseInt(t[1],16)>>>0:(t=gh.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=gc.exec(e))?(255|gg(gx(t[1]),gw(t[2]),gw(t[3])))>>>0:(t=gd.exec(e))?(gg(gx(t[1]),gw(t[2]),gw(t[3]))|gb(t[4]))>>>0:null;if(null===n)return e;n=n||0;let r=(4278190080&n)>>>24,i=(16711680&n)>>>16,o=(65280&n)>>>8,a=(255&n)/255;return`rgba(${r}, ${i}, ${o}, ${a})`}var gj=(e,t,n)=>{if(vY.fun(e))return e;if(vY.arr(e))return gj({range:e,output:t,extrapolate:n});if(vY.str(e.output[0]))return EU(e);let r=e.output,i=e.range||[0,1],o=e.extrapolateLeft||e.extrapolate||"extend",a=e.extrapolateRight||e.extrapolate||"extend",s=e.easing||(e=>e);return t=>{let n=function(e,t){for(var n=1;n=e);++n);return n-1}(t,i);return function(e,t,n,r,i,o,a,s,l){let u=l?l(e):e;if(un){if("identity"===s)return u;"clamp"===s&&(u=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?u=-u:n===1/0?u-=t:u=(u-t)/(n-t),u=o(u),r===-1/0?u=-u:i===1/0?u+=r:u=u*(i-r)+r,u)}(t,i[n],i[n+1],r[n],r[n+1],s,o,a,e.map)}},gk=Symbol.for("FluidValue.get"),gS=Symbol.for("FluidValue.observers"),g_=e=>!!(e&&e[gk]),gO=e=>e&&e[gk]?e[gk]():e,gC=e=>e[gS]||null;function gM(e,t){let n=e[gS];n&&n.forEach(e=>{e.eventObserved?e.eventObserved(t):e(t)})}var gA=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");gT(this,e)}},gT=(e,t)=>gR(e,gk,t);function gP(e,t){if(e[gk]){let n=e[gS];n||gR(e,gS,n=new Set),!n.has(t)&&(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function gN(e,t){let n=e[gS];if(n&&n.has(t)){let r=n.size-1;r?n.delete(t):e[gS]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var gR=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),gD=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,gL=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,gF=RegExp(`(${gD.source})(%|[a-z]+)`,"i"),gV=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,gz=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,gI=e=>{let[t,n]=gZ(e);if(!t||v1())return e;let r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){let e=window.getComputedStyle(document.documentElement).getPropertyValue(n);if(e)return e}else if(n&&gz.test(n))return gI(n);else if(n)return n;return e},gZ=e=>{let t=gz.exec(e);if(!t)return[,];let[,n,r]=t;return[n,r]},gB=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,gH=e=>{Eq||(Eq=v2?RegExp(`(${Object.keys(v2).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map(e=>gO(e).replace(gz,gI).replace(gL,gE).replace(Eq,gE)),n=t.map(e=>e.match(gD).map(Number)),r=n[0].map((e,t)=>n.map(e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})),i=r.map(t=>gj({...e,output:t}));return e=>{let n=!gF.test(t[0])&&t.find(e=>gF.test(e))?.replace(gD,""),r=0;return t[0].replace(gD,()=>`${i[r++](e)}${n||""}`).replace(gV,gB)}},gU="react-spring: ",gW=e=>{let t=!1;if("function"!=typeof e)throw TypeError(`${gU}once requires a function parameter`);return(...n)=>{t||(e(...n),t=!0)}},gq=gW(console.warn),g$=gW(console.warn);function gY(e){return vY.str(e)&&("#"==e[0]||/\d/.test(e)||!v1()&&gz.test(e)||e in(v2||{}))}var gG=v1()?b.useEffect:b.useLayoutEffect,gX=()=>{let e=(0,b.useRef)(!1);return gG(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function gK(){let e=(0,b.useState)()[1],t=gX();return()=>{t.current&&e(Math.random())}}var gQ=e=>(0,b.useEffect)(e,gJ),gJ=[];function g0(e){let t=(0,b.useRef)();return(0,b.useEffect)(()=>{t.current=e}),t.current}var g1=Symbol.for("Animated:node"),g2=e=>!!e&&e[g1]===e,g4=e=>e&&e[g1],g3=(e,t)=>v$(e,g1,t),g5=e=>e&&e[g1]&&e[g1].getPayload(),g6=class{constructor(){g3(this,this)}getPayload(){return this.payload||[]}},g8=class extends g6{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,vY.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new g8(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return vY.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){let{done:e}=this;this.done=!1,vY.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},g7=class extends g8{constructor(e){super(0),this._string=null,this._toString=gj({output:[e,e]})}static create(e){return new g7(e)}getValue(){let e=this._string;return null==e?this._string=this._toString(this._value):e}setValue(e){if(vY.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=gj({output:[this.getValue(),e]})),this._value=0,super.reset()}},g9={dependencies:null},ye=class extends g6{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){let t={};return vK(this.source,(n,r)=>{g2(n)?t[r]=n.getValue(e):g_(n)?t[r]=gO(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&vX(this.payload,e=>e.reset())}_makePayload(e){if(e){let t=new Set;return vK(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){g9.dependencies&&g_(e)&&g9.dependencies.add(e);let t=g5(e);t&&vX(t,e=>this.add(e))}},yt=class extends ye{constructor(e){super(e)}static create(e){return new yt(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){let t=this.getPayload();return e.length==t.length?t.map((t,n)=>t.setValue(e[n])).some(Boolean):(super.setValue(e.map(yn)),!0)}};function yn(e){let t=gY(e)?g7:g8;return t.create(e)}function yr(e){let t=g4(e);return t?t.constructor:vY.arr(e)?yt:gY(e)?g7:g8}var yi=(e,t)=>{let n=!vY.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,b.forwardRef)((r,i)=>{let o=(0,b.useRef)(null),a=n&&(0,b.useCallback)(e=>{o.current=(i&&(vY.fun(i)?i(e):i.current=e),e)},[i]),[s,l]=function(e,t){let n=new Set;return g9.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new ye(e),g9.dependencies=null,[e,n]}(r,t),u=gK(),c=()=>{let e=o.current;if(n&&!e)return;let r=!!e&&t.applyAnimatedValues(e,s.getValue(!0));!1===r&&u()},d=new yo(c,l),f=(0,b.useRef)();gG(()=>(f.current=d,vX(l,e=>gP(e,d)),()=>{f.current&&(vX(f.current.deps,e=>gN(e,f.current)),vM.cancel(f.current.update))})),(0,b.useEffect)(c,[]),gQ(()=>()=>{let e=f.current;vX(e.deps,t=>gN(t,e))});let h=t.getComponentProps(s.getValue());return b.createElement(e,{...h,ref:a})})},yo=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&vM.write(this.update)}},ya=Symbol.for("AnimatedComponent"),ys=e=>vY.str(e)?e:e&&vY.str(e.displayName)?e.displayName:vY.fun(e)&&e.name||null;function yl(e,...t){return vY.fun(e)?e(...t):e}var yu=(e,t)=>!0===e||!!(t&&e&&(vY.fun(e)?e(t):vQ(e).includes(t))),yc=(e,t)=>vY.obj(e)?t&&e[t]:e,yd=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,yf=e=>e,yh=(e,t=yf)=>{let n=yp;e.default&&!0!==e.default&&(n=Object.keys(e=e.default));let r={};for(let i of n){let n=t(e[i],i);vY.und(n)||(r[i]=n)}return r},yp=["config","onProps","onStart","onChange","onPause","onResume","onRest"],ym={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function yv(e){let t=function(e){let t={},n=0;if(vK(e,(e,r)=>{!ym[r]&&(t[r]=e,n++)}),n)return t}(e);if(t){let n={to:t};return vK(e,(e,r)=>r in t||(n[r]=e)),n}return{...e}}function yg(e){return e=gO(e),vY.arr(e)?e.map(yg):gY(e)?vO.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function yy(e){for(let t in e)return!0;return!1}function yx(e){return vY.fun(e)||vY.arr(e)&&vY.obj(e[0])}function yb(e,t){e.ref?.delete(e),t?.delete(e)}function yw(e,t){t&&e.ref!==t&&(e.ref?.delete(e),t.add(e),e.ref=t)}var yE={tension:170,friction:26,mass:1,damping:1,easing:e=>e,clamp:!1},yj=class{constructor(){this.velocity=0,Object.assign(this,yE)}};function yk(e,t){if(vY.und(t.decay)){let n=!vY.und(t.tension)||!vY.und(t.friction);!n&&vY.und(t.frequency)&&vY.und(t.damping)&&vY.und(t.mass)||(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}var yS=[],y_=class{constructor(){this.changed=!1,this.values=yS,this.toValues=null,this.fromValues=yS,this.config=new yj,this.immediate=!1}};function yO(e,{key:t,props:n,defaultProps:r,state:i,actions:o}){return new Promise((a,s)=>{let l,u;let c=yu(n.cancel??r?.cancel,t);if(c)h();else{vY.und(n.pause)||(i.paused=yu(n.pause,t));let e=r?.pause;!0!==e&&(e=i.paused||yu(e,t)),l=yl(n.delay||0,t),e?(i.resumeQueue.add(f),o.pause()):(o.resume(),f())}function d(){i.resumeQueue.add(f),i.timeouts.delete(u),u.cancel(),l=u.time-vM.now()}function f(){l>0&&!vO.skipAnimation?(i.delayed=!0,u=vM.setTimeout(h,l),i.pauseQueue.add(d),i.timeouts.add(u)):h()}function h(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(d),i.timeouts.delete(u),e<=(i.cancelId||0)&&(c=!0);try{o.start({...n,callId:e,cancel:c},a)}catch(e){s(e)}}})}var yC=(e,t)=>1==t.length?t[0]:t.some(e=>e.cancelled)?yT(e.get()):t.every(e=>e.noop)?yM(e.get()):yA(e.get(),t.every(e=>e.finished)),yM=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),yA=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),yT=e=>({value:e,cancelled:!0,finished:!1});function yP(e,t,n,r){let{callId:i,parentId:o,onRest:a}=t,{asyncTo:s,promise:l}=n;return o||e!==s||t.reset?n.promise=(async()=>{let u,c,d;n.asyncId=i,n.asyncTo=e;let f=yh(t,(e,t)=>"onRest"===t?void 0:e),h=new Promise((e,t)=>(u=e,c=t)),p=e=>{let t=i<=(n.cancelId||0)&&yT(r)||i!==n.asyncId&&yA(r,!1);if(t)throw e.result=t,c(e),e},m=(e,t)=>{let o=new yR,a=new yD;return(async()=>{if(vO.skipAnimation)throw yN(n),a.result=yA(r,!1),c(a),a;p(o);let s=vY.obj(e)?{...e}:{...t,to:e};s.parentId=i,vK(f,(e,t)=>{vY.und(s[t])&&(s[t]=e)});let l=await r.start(s);return p(o),n.paused&&await new Promise(e=>{n.resumeQueue.add(e)}),l})()};if(vO.skipAnimation)return yN(n),yA(r,!1);try{let t;t=vY.arr(e)?(async e=>{for(let t of e)await m(t)})(e):Promise.resolve(e(m,r.stop.bind(r))),await Promise.all([t.then(u),h]),d=yA(r.get(),!0,!1)}catch(e){if(e instanceof yR)d=e.result;else if(e instanceof yD)d=e.result;else throw e}finally{i==n.asyncId&&(n.asyncId=o,n.asyncTo=o?s:void 0,n.promise=o?l:void 0)}return vY.fun(a)&&vM.batchedUpdates(()=>{a(d,r,r.item)}),d})():l}function yN(e,t){vJ(e.timeouts,e=>e.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var yR=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},yD=class extends Error{constructor(){super("SkipAnimationSignal")}},yL=e=>e instanceof yV,yF=1,yV=class extends gA{constructor(){super(...arguments),this.id=yF++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=g4(this);return e&&e.getValue()}to(...e){return vO.to(this,e)}interpolate(...e){return gq(`${gU}The "interpolate" function is deprecated in v9 (use "to" instead)`),vO.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){gM(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||ge.sort(this),gM(this,{type:"priority",parent:this,priority:e})}},yz=Symbol.for("SpringPhase"),yI=e=>(1&e[yz])>0,yZ=e=>(2&e[yz])>0,yB=e=>(4&e[yz])>0,yH=(e,t)=>t?e[yz]|=3:e[yz]&=-3,yU=(e,t)=>t?e[yz]|=4:e[yz]&=-5,yW=class extends yV{constructor(e,t){if(super(),this.animation=new y_,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!vY.und(e)||!vY.und(t)){let n=vY.obj(e)?{...e}:{...t,from:e};vY.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(yZ(this)||this._state.asyncTo)||yB(this)}get goal(){return gO(this.animation.to)}get velocity(){let e=g4(this);return e instanceof g8?e.lastVelocity||0:e.getPayload().map(e=>e.lastVelocity||0)}get hasAnimated(){return yI(this)}get isAnimating(){return yZ(this)}get isPaused(){return yB(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1,r=this.animation,{toValues:i}=r,{config:o}=r,a=g5(r.to);!a&&g_(r.to)&&(i=vQ(gO(r.to))),r.values.forEach((s,l)=>{if(s.done)return;let u=s.constructor==g7?1:a?a[l].lastPosition:i[l],c=r.immediate,d=u;if(!c){let t;if(d=s.lastPosition,o.tension<=0){s.done=!0;return}let n=s.elapsedTime+=e,i=r.fromValues[l],a=null!=s.v0?s.v0:s.v0=vY.arr(o.velocity)?o.velocity[l]:o.velocity,f=o.precision||(i==u?.005:Math.min(1,.001*Math.abs(u-i)));if(vY.und(o.duration)){if(o.decay){let e=!0===o.decay?.998:o.decay,r=Math.exp(-(1-e)*n);d=i+a/(1-e)*(1-r),c=Math.abs(s.lastPosition-d)<=f,t=a*r}else{t=null==s.lastVelocity?a:s.lastVelocity;let n=o.restVelocity||f/10,r=o.clamp?0:o.bounce,l=!vY.und(r),h=i==u?s.v0>0:in)&&(c=Math.abs(u-d)<=f));++e){l&&(d==u||d>u==h)&&(t=-t*r,d=u);let e=-(1e-6*o.tension)*(d-u),n=-(.001*o.friction)*t,i=(e+n)/o.mass;t+=1*i,d+=1*t}}}else{let r=1;o.duration>0&&(this._memoizedDuration!==o.duration&&(this._memoizedDuration=o.duration,s.durationProgress>0&&(s.elapsedTime=o.duration*s.durationProgress,n=s.elapsedTime+=e)),r=(r=(o.progress||0)+n/this._memoizedDuration)>1?1:r<0?0:r,s.durationProgress=r),t=((d=i+o.easing(r)*(u-i))-s.lastPosition)/e,c=1==r}s.lastVelocity=t,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),c=!0)}a&&!a[l].done&&(c=!1),c?s.done=!0:t=!1,s.setValue(d,o.round)&&(n=!0)});let s=g4(this),l=s.getValue();if(t){let e=gO(r.to);(l!==e||n)&&!o.decay?(s.setValue(e),this._onChange(e)):n&&o.decay&&this._onChange(l),this._stop()}else n&&this._onChange(l)}set(e){return vM.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(yZ(this)){let{to:e,config:t}=this.animation;vM.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){let t=this.queue||(this.queue=[]);return t.push(e),this}start(e,t){let n;return vY.und(e)?(n=this.queue||[],this.queue=[]):n=[vY.obj(e)?e:{...t,to:e}],Promise.all(n.map(e=>{let t=this._update(e);return t})).then(e=>yC(this,e))}stop(e){let{to:t}=this.animation;return this._focus(this.get()),yN(this._state,e&&this._lastCallId),vM.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){let t=this.key||"",{to:n,from:r}=e;(null==(n=vY.obj(n)?n[t]:n)||yx(n))&&(n=void 0),null==(r=vY.obj(r)?r[t]:r)&&(r=void 0);let i={to:n,from:r};return yI(this)||(e.reverse&&([n,r]=[r,n]),r=gO(r),vY.und(r)?g4(this)||this._set(n):this._set(r)),i}_update({...e},t){let{key:n,defaultProps:r}=this;e.default&&Object.assign(r,yh(e,(e,t)=>/^on/.test(t)?yc(e,n):e)),yK(this,e,"onProps"),yQ(this,"onProps",e,this);let i=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");let o=this._state;return yO(++this._lastCallId,{key:n,props:e,defaultProps:r,state:o,actions:{pause:()=>{yB(this)||(yU(this,!0),v0(o.pauseQueue),yQ(this,"onPause",yA(this,yq(this,this.animation.to)),this))},resume:()=>{yB(this)&&(yU(this,!1),yZ(this)&&this._resume(),v0(o.resumeQueue),yQ(this,"onResume",yA(this,yq(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(n=>{if(e.loop&&n.finished&&!(t&&n.noop)){let t=y$(e);if(t)return this._update(t,!0)}return n})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(yT(this));let r=!vY.und(e.to),i=!vY.und(e.from);if(r||i){if(!(t.callId>this._lastToId))return n(yT(this));this._lastToId=t.callId}let{key:o,defaultProps:a,animation:s}=this,{to:l,from:u}=s,{to:c=l,from:d=u}=e;i&&!r&&(!t.default||vY.und(c))&&(c=d),t.reverse&&([c,d]=[d,c]);let f=!vG(d,u);f&&(s.from=d),d=gO(d);let h=!vG(c,l);h&&this._focus(c);let p=yx(t.to),{config:m}=s,{decay:v,velocity:g}=m;(r||i)&&(m.velocity=0),t.config&&!p&&function(e,t,n){for(let r in n&&(yk(n={...n},t),t={...n,...t}),yk(e,t),Object.assign(e,t),yE)null==e[r]&&(e[r]=yE[r]);let{frequency:r,damping:i}=e,{mass:o}=e;vY.und(r)||(r<.01&&(r=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/r,2)*o,e.friction=4*Math.PI*i*o/r)}(m,yl(t.config,o),t.config!==a.config?yl(a.config,o):void 0);let y=g4(this);if(!y||vY.und(c))return n(yA(this,!0));let x=vY.und(t.reset)?i&&!t.default:!vY.und(d)&&yu(t.reset,o),b=x?d:this.get(),w=yg(c),E=vY.num(w)||vY.arr(w)||gY(w),j=!p&&(!E||yu(a.immediate||t.immediate,o));if(h){let e=yr(c);if(e!==y.constructor){if(j)y=this._set(w);else throw Error(`Cannot animate between ${y.constructor.name} and ${e.name}, as the "to" prop suggests`)}}let k=y.constructor,S=g_(c),_=!1;if(!S){let e=x||!yI(this)&&f;(h||e)&&(S=!(_=vG(yg(b),w))),(vG(s.immediate,j)||j)&&vG(m.decay,v)&&vG(m.velocity,g)||(S=!0)}if(_&&yZ(this)&&(s.changed&&!x?S=!0:S||this._stop(l)),!p&&((S||g_(l))&&(s.values=y.getPayload(),s.toValues=g_(c)?null:k==g7?[1]:vQ(w)),s.immediate==j||(s.immediate=j,j||x||this._set(l)),S)){let{onRest:e}=s;vX(yX,e=>yK(this,t,e));let r=yA(this,yq(this,l));v0(this._pendingCalls,r),this._pendingCalls.add(n),s.changed&&vM.batchedUpdates(()=>{s.changed=!x,e?.(r,this),x?yl(a.onRest,r):s.onStart?.(r,this)})}x&&this._set(b),p?n(yP(t.to,t,this._state,this)):S?this._start():yZ(this)&&!h?this._pendingCalls.add(n):n(yM(b))}_focus(e){let t=this.animation;e!==t.to&&(gC(this)&&this._detach(),t.to=e,gC(this)&&this._attach())}_attach(){let e=0,{to:t}=this.animation;g_(t)&&(gP(t,this),yL(t)&&(e=t.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;g_(e)&&gN(e,this)}_set(e,t=!0){let n=gO(e);if(!vY.und(n)){let e=g4(this);if(!e||!vG(n,e.getValue())){let r=yr(n);e&&e.constructor==r?e.setValue(n):g3(this,r.create(n)),e&&vM.batchedUpdates(()=>{this._onChange(n,t)})}}return g4(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,yQ(this,"onStart",yA(this,yq(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),yl(this.animation.onChange,e,this)),yl(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){let e=this.animation;g4(this).reset(gO(e.to)),e.immediate||(e.fromValues=e.values.map(e=>e.lastPosition)),yZ(this)||(yH(this,!0),yB(this)||this._resume())}_resume(){vO.skipAnimation?this.finish():ge.start(this)}_stop(e,t){if(yZ(this)){yH(this,!1);let n=this.animation;vX(n.values,e=>{e.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),gM(this,{type:"idle",parent:this});let r=t?yT(this.get()):yA(this.get(),yq(this,e??n.to));v0(this._pendingCalls,r),n.changed&&(n.changed=!1,yQ(this,"onRest",r,this))}}};function yq(e,t){let n=yg(t),r=yg(e.get());return vG(r,n)}function y$(e,t=e.loop,n=e.to){let r=yl(t);if(r){let i=!0!==r&&yv(r),o=(i||e).reverse,a=!i||i.reset;return yY({...e,loop:t,default:!1,pause:void 0,to:!o||yx(n)?n:void 0,from:a?e.from:void 0,reset:a,...i})}}function yY(e){let{to:t,from:n}=e=yv(e),r=new Set;return vY.obj(t)&&yG(t,r),vY.obj(n)&&yG(n,r),e.keys=r.size?Array.from(r):null,e}function yG(e,t){vK(e,(e,n)=>null!=e&&t.add(n))}var yX=["onStart","onRest","onChange","onPause","onResume"];function yK(e,t,n){e.animation[n]=t[n]!==yd(t,n)?yc(t[n],e.key):void 0}function yQ(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var yJ=["onStart","onChange","onRest"],y0=1,y1=class{constructor(e,t){this.id=y0++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){let e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(let t in e){let n=e[t];vY.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(yY(e)),this}start(e){let{queue:t}=this;return(e?t=vQ(e).map(yY):this.queue=[],this._flush)?this._flush(this,t):(y7(this,t),y2(this,t))}stop(e,t){if(!!e!==e&&(t=e),t){let n=this.springs;vX(vQ(t),t=>n[t].stop(!!e))}else yN(this._state,this._lastAsyncId),this.each(t=>t.stop(!!e));return this}pause(e){if(vY.und(e))this.start({pause:!0});else{let t=this.springs;vX(vQ(e),e=>t[e].pause())}return this}resume(e){if(vY.und(e))this.start({pause:!1});else{let t=this.springs;vX(vQ(e),e=>t[e].resume())}return this}each(e){vK(this.springs,e)}_onFrame(){let{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,i=this._changed.size>0;(r&&!this._started||i&&!this._started)&&(this._started=!0,vJ(e,([e,t])=>{t.value=this.get(),e(t,this,this._item)}));let o=!r&&this._started,a=i||o&&n.size?this.get():null;i&&t.size&&vJ(t,([e,t])=>{t.value=a,e(t,this,this._item)}),o&&(this._started=!1,vJ(n,([e,t])=>{t.value=a,e(t,this,this._item)}))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}vM.onFrame(this._onFrame)}};function y2(e,t){return Promise.all(t.map(t=>y4(e,t))).then(t=>yC(e,t))}async function y4(e,t,n){let{keys:r,to:i,from:o,loop:a,onRest:s,onResolve:l}=t,u=vY.obj(t.default)&&t.default;a&&(t.loop=!1),!1===i&&(t.to=null),!1===o&&(t.from=null);let c=vY.arr(i)||vY.fun(i)?i:void 0;c?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):vX(yJ,n=>{let r=t[n];if(vY.fun(r)){let i=e._events[n];t[n]=({finished:e,cancelled:t})=>{let n=i.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):i.set(r,{value:null,finished:e||!1,cancelled:t||!1})},u&&(u[n]=t[n])}});let d=e._state;!d.paused===t.pause?(d.paused=t.pause,v0(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);let f=(r||Object.keys(e.springs)).map(n=>e.springs[n].start(t)),h=!0===t.cancel||!0===yd(t,"cancel");(c||h&&d.asyncId)&&f.push(yO(++e._lastAsyncId,{props:t,state:d,actions:{pause:vq,resume:vq,start(t,n){h?(yN(d,e._lastAsyncId),n(yT(e))):(t.onRest=s,n(yP(c,t,d,e)))}}})),d.paused&&await new Promise(e=>{d.resumeQueue.add(e)});let p=yC(e,await Promise.all(f));if(a&&p.finished&&!(n&&p.noop)){let n=y$(t,a,i);if(n)return y7(e,[n]),y4(e,n,!0)}return l&&vM.batchedUpdates(()=>l(p,e,e.item)),p}function y3(e,t){let n={...e.springs};return t&&vX(vQ(t),e=>{vY.und(e.keys)&&(e=yY(e)),vY.obj(e.to)||(e={...e,to:void 0}),y8(n,e,e=>y6(e))}),y5(e,n),n}function y5(e,t){vK(t,(t,n)=>{e.springs[n]||(e.springs[n]=t,gP(t,e))})}function y6(e,t){let n=new yW;return n.key=e,t&&gP(n,t),n}function y8(e,t,n){t.keys&&vX(t.keys,r=>{let i=e[r]||(e[r]=n(r));i._prepareNode(t)})}function y7(e,t){vX(t,t=>{y8(e.springs,t,t=>y6(t,e))})}var y9=({children:e,...t})=>{let n=(0,b.useContext)(xe),r=t.pause||!!n.pause,i=t.immediate||!!n.immediate;t=function(e,t){let[n]=(0,b.useState)(()=>({inputs:t,result:e()})),r=(0,b.useRef)(),i=r.current,o=i;if(o){let n=!!(t&&o.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n{r.current=o,i==n&&(n.inputs=n.result=void 0)},[o]),o.result}(()=>({pause:r,immediate:i}),[r,i]);let{Provider:o}=xe;return b.createElement(o,{value:t},e)},xe=(Object.assign(y9,b.createContext({})),y9.Provider._context=y9,y9.Consumer._context=y9,y9);y9.Provider=xe.Provider,y9.Consumer=xe.Consumer;var xt=()=>{let e=[],t=function(t){g$(`${gU}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`);let r=[];return vX(e,(e,i)=>{if(vY.und(t))r.push(e.start());else{let o=n(t,e,i);o&&r.push(e.start(o))}}),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){let n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return vX(e,e=>e.pause(...arguments)),this},t.resume=function(){return vX(e,e=>e.resume(...arguments)),this},t.set=function(t){vX(e,(e,n)=>{let r=vY.fun(t)?t(n,e):t;r&&e.set(r)})},t.start=function(t){let n=[];return vX(e,(e,r)=>{if(vY.und(t))n.push(e.start());else{let i=this._getProps(t,e,r);i&&n.push(e.start(i))}}),n},t.stop=function(){return vX(e,e=>e.stop(...arguments)),this},t.update=function(t){return vX(e,(e,n)=>e.update(this._getProps(t,e,n))),this};let n=function(e,t,n){return vY.fun(e)?e(n,t):e};return t._getProps=n,t};function xn(e,t){let n=vY.fun(e),[[r],i]=function(e,t,n){let r=vY.fun(t)&&t;r&&!n&&(n=[]);let i=(0,b.useMemo)(()=>r||3==arguments.length?xt():void 0,[]),o=(0,b.useRef)(0),a=gK(),s=(0,b.useMemo)(()=>({ctrls:[],queue:[],flush(e,t){let n=y3(e,t),r=o.current>0&&!s.queue.length&&!Object.keys(n).some(t=>!e.springs[t]);return r?y2(e,t):new Promise(r=>{y5(e,n),s.queue.push(()=>{r(y2(e,t))}),a()})}}),[]),l=(0,b.useRef)([...s.ctrls]),u=[],c=g0(e)||0;function d(e,n){for(let i=e;i{vX(l.current.slice(e,c),e=>{yb(e,i),e.stop(!0)}),l.current.length=e,d(c,e)},[e]),(0,b.useMemo)(()=>{d(0,Math.min(c,e))},n);let f=l.current.map((e,t)=>y3(e,u[t])),h=(0,b.useContext)(y9),p=g0(h),m=h!==p&&yy(h);gG(()=>{o.current++,s.ctrls=l.current;let{queue:e}=s;e.length&&(s.queue=[],vX(e,e=>e())),vX(l.current,(e,t)=>{i?.add(e),m&&e.start({default:h});let n=u[t];n&&(yw(e,n.ref),e.ref?e.queue.push(n):e.start(n))})}),gQ(()=>()=>{vX(s.ctrls,e=>e.stop(!0))});let v=f.map(e=>({...e}));return i?[v,i]:v}(1,n?e:[e],n?t||[]:t);return n||2==arguments.length?[r,i]:r}function xr(e,t,n){let r=vY.fun(t)&&t,{reset:i,sort:o,trail:a=0,expires:s=!0,exitBeforeEnter:l=!1,onDestroyed:u,ref:c,config:d}=r?r():t,f=(0,b.useMemo)(()=>r||3==arguments.length?xt():void 0,[]),h=vQ(e),p=[],m=(0,b.useRef)(null),v=i?null:m.current;gG(()=>{m.current=p}),gQ(()=>(vX(p,e=>{f?.add(e.ctrl),e.ctrl.ref=f}),()=>{vX(m.current,e=>{e.expired&&clearTimeout(e.expirationId),yb(e.ctrl,f),e.ctrl.stop(!0)})}));let g=function(e,{key:t,keys:n=t},r){if(null===n){let t=new Set;return e.map(e=>{let n=r&&r.find(n=>n.item===e&&"leave"!==n.phase&&!t.has(n));return n?(t.add(n),n.key):xi++})}return vY.und(n)?e:vY.fun(n)?e.map(n):vQ(n)}(h,r?r():t,v),y=i&&m.current||[];gG(()=>vX(y,({ctrl:e,item:t,key:n})=>{yb(e,f),yl(u,t,n)}));let x=[];if(v&&vX(v,(e,t)=>{e.expired?(clearTimeout(e.expirationId),y.push(e)):~(t=x[t]=g.indexOf(e.key))&&(p[t]=e)}),vX(h,(e,t)=>{p[t]||(p[t]={key:g[t],item:e,phase:"mount",ctrl:new y1},p[t].ctrl.item=e)}),x.length){let e=-1,{leave:n}=r?r():t;vX(x,(t,r)=>{let i=v[r];~t?(e=p.indexOf(i),p[e]={...i,item:h[t]}):n&&p.splice(++e,0,i)})}vY.fun(o)&&p.sort((e,t)=>o(e.item,t.item));let w=-a,E=gK(),j=yh(t),k=new Map,S=(0,b.useRef)(new Map),_=(0,b.useRef)(!1);vX(p,(e,n)=>{let i,o;let u=e.key,f=e.phase,h=r?r():t,p=yl(h.delay||0,u);if("mount"==f)i=h.enter,o="enter";else{let e=0>g.indexOf(u);if("leave"!=f){if(e)i=h.leave,o="leave";else{if(!(i=h.update))return;o="update"}}else{if(e)return;i=h.enter,o="enter"}}if(i=yl(i,e.item,n),!(i=vY.obj(i)?yv(i):{to:i}).config){let t=d||j.config;i.config=yl(t,e.item,n,o)}w+=a;let y={...j,delay:p+w,ref:c,immediate:h.immediate,reset:!1,...i};if("enter"==o&&vY.und(y.from)){let i=r?r():t,o=vY.und(i.initial)||v?i.from:i.initial;y.from=yl(o,e.item,n)}let{onResolve:x}=y;y.onResolve=e=>{yl(x,e);let t=m.current,n=t.find(e=>e.key===u);if(n){if(e.cancelled&&"update"!=n.phase)return;if(n.ctrl.idle){let e=t.every(e=>e.ctrl.idle);if("leave"==n.phase){let t=yl(s,n.item);if(!1!==t){let r=!0===t?0:t;if(n.expired=!0,!e&&r>0){r<=2147483647&&(n.expirationId=setTimeout(E,r));return}}}e&&t.some(e=>e.expired)&&(S.current.delete(n),l&&(_.current=!0),E())}}};let b=y3(e.ctrl,y);"leave"===o&&l?S.current.set(e,{phase:o,springs:b,payload:y}):k.set(e,{phase:o,springs:b,payload:y})});let O=(0,b.useContext)(y9),C=g0(O),M=O!==C&&yy(O);gG(()=>{M&&vX(p,e=>{e.ctrl.start({default:O})})},[O]),vX(k,(e,t)=>{if(S.current.size){let e=p.findIndex(e=>e.key===t.key);p.splice(e,1)}}),gG(()=>{vX(S.current.size?S.current:k,({phase:e,payload:t},n)=>{let{ctrl:r}=n;n.phase=e,f?.add(r),M&&"enter"==e&&r.start({default:O}),t&&(yw(r,t.ref),(r.ref||f)&&!_.current?r.update(t):(r.start(t),_.current&&(_.current=!1)))})},i?void 0:n);let A=e=>b.createElement(b.Fragment,null,p.map((t,n)=>{let{springs:r}=k.get(t)||t.ctrl,i=e({...r},t.item,t,n);return i&&i.type?b.createElement(i.type,{...i.props,key:vY.str(t.key)||vY.num(t.key)?t.key:t.ctrl.id,ref:i.ref}):i}));return f?[A,f]:A}var xi=1,xo=class extends yV{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=gj(...t);let n=this._get(),r=yr(n);g3(this,r.create(n))}advance(e){let t=this._get(),n=this.get();vG(t,n)||(g4(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&xs(this._active)&&xl(this)}_get(){let e=vY.arr(this.source)?this.source.map(gO):vQ(gO(this.source));return this.calc(...e)}_start(){this.idle&&!xs(this._active)&&(this.idle=!1,vX(g5(this),e=>{e.done=!1}),vO.skipAnimation?(vM.batchedUpdates(()=>this.advance()),xl(this)):ge.start(this))}_attach(){let e=1;vX(vQ(this.source),t=>{g_(t)&&gP(t,this),yL(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){vX(vQ(this.source),e=>{g_(e)&&gN(e,this)}),this._active.clear(),xl(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=vQ(this.source).reduce((e,t)=>Math.max(e,(yL(t)?t.priority:0)+1),0))}};function xa(e){return!1!==e.idle}function xs(e){return!e.size||Array.from(e).every(xa)}function xl(e){e.idle||(e.idle=!0,vX(g5(e),e=>{e.done=!0}),gM(e,{type:"idle",parent:e}))}var xu=(e,...t)=>new xo(e,t);vO.assign({createStringInterpolator:gH,to:(e,t)=>new xo(e,t)}),ge.advance;var xc=/^--/,xd={},xf={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},xh=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),xp=["Webkit","Ms","Moz","O"];xf=Object.keys(xf).reduce((e,t)=>(xp.forEach(n=>e[xh(n,t)]=e[t]),e),xf);var xm=/^(matrix|translate|scale|rotate|skew)/,xv=/^(translate)/,xg=/^(rotate|skew)/,xy=(e,t)=>vY.num(e)&&0!==e?e+t:e,xx=(e,t)=>vY.arr(e)?e.every(e=>xx(e,t)):vY.num(e)?e===t:parseFloat(e)===t,xb=class extends ye{constructor({x:e,y:t,z:n,...r}){let i=[],o=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),o.push(e=>[`translate3d(${e.map(e=>xy(e,"px")).join(",")})`,xx(e,0)])),vK(r,(e,t)=>{if("transform"===t)i.push([e||""]),o.push(e=>[e,""===e]);else if(xm.test(t)){if(delete r[t],vY.und(e))return;let n=xv.test(t)?"px":xg.test(t)?"deg":"";i.push(vQ(e)),o.push("rotate3d"===t?([e,t,r,i])=>[`rotate3d(${e},${t},${r},${xy(i,n)})`,xx(i,0)]:e=>[`${t}(${e.map(e=>xy(e,n)).join(",")})`,xx(e,t.startsWith("scale")?1:0)])}}),i.length&&(r.transform=new xw(i,o)),super(r)}},xw=class extends gA{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return vX(this.inputs,(n,r)=>{let i=gO(n[0]),[o,a]=this.transforms[r](vY.arr(i)?i:n.map(gO));e+=" "+o,t=t&&a}),t?"none":e}observerAdded(e){1==e&&vX(this.inputs,e=>vX(e,e=>g_(e)&&gP(e,this)))}observerRemoved(e){0==e&&vX(this.inputs,e=>vX(e,e=>g_(e)&&gN(e,this)))}eventObserved(e){"change"==e.type&&(this._value=null),gM(this,e)}};vO.assign({batchedUpdates:e6.unstable_batchedUpdates,createStringInterpolator:gH,colors:{transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199}});var xE=((e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=e=>new ye(e),getComponentProps:r=e=>e}={})=>{let i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},o=e=>{let t=ys(e)||"Anonymous";return(e=vY.str(e)?o[e]||(o[e]=yi(e,i)):e[ya]||(e[ya]=yi(e,i))).displayName=`Animated(${t})`,e};return vK(e,(t,n)=>{vY.arr(e)&&(n=ys(t)),o[n]=o(t)}),{animated:o}})(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;let n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,{style:r,children:i,scrollTop:o,scrollLeft:a,viewBox:s,...l}=t,u=Object.values(l),c=Object.keys(l).map(t=>n||e.hasAttribute(t)?t:xd[t]||(xd[t]=t.replace(/([A-Z])/g,e=>"-"+e.toLowerCase())));for(let t in void 0!==i&&(e.textContent=i),r)if(r.hasOwnProperty(t)){var d;let n=null==(d=r[t])||"boolean"==typeof d||""===d?"":"number"!=typeof d||0===d||xc.test(t)||xf.hasOwnProperty(t)&&xf[t]?(""+d).trim():d+"px";xc.test(t)?e.style.setProperty(t,n):e.style[t]=n}c.forEach((t,n)=>{e.setAttribute(t,u[n])}),void 0!==o&&(e.scrollTop=o),void 0!==a&&(e.scrollLeft=a),void 0!==s&&e.setAttribute("viewBox",s)},createAnimatedStyle:e=>new xb(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}).animated,xj=n(23442),xk=(0,b.createContext)({});function xS(e){var t=e.x,n=e.y,r=e.dx,i=e.dy,o=e.children,a=(0,b.useMemo)(function(){return{x:t,y:n,dx:r,dy:i}},[t,n,r,i]);return b.createElement(xk.Provider,{value:a},o)}function x_(){return(x_=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,xP),p=(0,b.useContext)(xM)||{},m=p.innerHeight,v=p.innerWidth,g=p.margin,y=p.xScale,x=p.yScale,w=p.dataRegistry,E=(0,b.useMemo)(function(){return y?xA(y):0},[y]),j=(0,b.useMemo)(function(){return x?xA(x):0},[x]);if((!s||!l)&&!a)return console.warn("[@visx/xychart/BaseAnnotation]: dataKey or x/yAccessors must be specified."),null;var k=s&&l||null==a?null:null==w?void 0:w.get(a),S=s||(null==k?void 0:k.xAccessor),_=l||(null==k?void 0:k.yAccessor);if(!y||!x||!v||!m||!S||!_||!g)return null;var O=(null!=(t=(0,pb.Z)(y(S(o))))?t:NaN)+E/2,C=(null!=(n=(0,pb.Z)(x(_(o))))?n:NaN)+j/2,M=O+c+16>g.left+v?-c:c,A=C+f+16>g.top+m?-f:f;return xT(O)&&xT(C)?b.createElement(r,xN({width:v,height:m},h,{x:O,y:C,dx:M,dy:A}),i):null}xR.propTypes={dataKey:ph().string,xAccessor:ph().func,yAccessor:ph().func};var xD=["x","y","AnnotationComponent"],xL=["editable"];function xF(){return(xF=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function xz(e){var t=e.x,n=void 0===t?0:t,r=e.y,i=void 0===r?0:r,o=e.AnnotationComponent,a=xV(e,xD),s=(0,b.useRef)({x:n,y:i}),l=xn({from:{x:s.current.x-n,y:s.current.y-i},to:{x:0,y:0},reset:!0});return(0,b.useEffect)(function(){s.current={x:n,y:i}},[n,i]),b.createElement(xE.g,{transform:xu([l.x,l.y],function(e,t){return"translate("+e+", "+t+")"})},b.createElement(o,xF({x:n,y:i},a)))}function xI(e){var t=e.editable,n=xV(e,xL),r=(0,b.useCallback)(function(e){return b.createElement(xz,xF({AnnotationComponent:t?xC:xS},e))},[t]);return b.createElement(xR,xF({AnnotationComponent:r},n))}xI.propTypes={editable:ph().bool};var xZ=n(12766),xB=n(54073),xH=n.n(xB),xU=["d","stroke","fill"];function xW(){return(xW=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,xU),o=(0,b.useRef)(t),a=(0,b.useCallback)(xH()(function(e){o.current=e},50),[]),s=(0,xZ.interpolatePath)(o.current,t);a(t);var l=xn({from:{t:0},to:{t:1},reset:!0,delay:0}).t,u=xn({stroke:void 0===n?"transparent":n,fill:void 0===r?"transparent":r});return b.createElement(xE.path,xW({className:"visx-path",d:l.to(s),stroke:u.stroke,fill:u.fill},i))}var x$=n(12935),xY=n(12151);function xG(){return(xG=Object.assign?Object.assign.bind():function(e){for(var t=1;tt?1:e>=t?0:NaN}function x6(e){let t=e,n=e;function r(e,t,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;0>n(e[o],t)?r=o+1:i=o}return r}return 1===e.length&&(t=(t,n)=>e(t)-n,n=(t,n)=>x5(e(t),n)),{left:r,center:function(e,n,i,o){null==i&&(i=0),null==o&&(o=e.length);let a=r(e,n,i,o-1);return a>i&&t(e[a-1],n)>-t(e[a],n)?a-1:a},right:function(e,t,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;n(e[o],t)>0?i=o:r=o+1}return r}}}let x8=x6(x5);x8.right;let x7=x8.left;function x9(e){var t,n,r=e.scale,i=e.accessor,o=e.scaledValue,a=e.data;if("invert"in r&&"function"==typeof r.invert){var s=x6(i).left,l=Number(r.invert(o)),u=s(a,l),c=a[u-1],d=a[u];n=(t=!c||Math.abs(l-i(c))>Math.abs(l-i(d))?d:c)===c?u-1:u}else{if(!("step"in r)||void 0===r.step)return console.warn("[visx/xychart/findNearestDatum] encountered incompatible scale type, bailing"),null;var f=r.domain(),h=r.range().map(Number),p=[].concat(h).sort(function(e,t){return e-t}),m=x7(function(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),o=Array(i);++r=0||(i[n]=e[n]);return i}(e,bd),O=(0,b.useContext)(xM),C=O.colorScale,M=O.theme,A=O.horizontal,T=(0,b.useMemo)(function(){return w?xK(E,w):void 0},[E,w]),P=(0,b.useMemo)(function(){return xK(E,x)},[E,x]),N=(0,b.useMemo)(function(){return k?xK(S,k):void 0},[S,k]),R=(0,b.useMemo)(function(){return xK(S,j)},[S,j]),D=(0,b.useCallback)(function(e){return xT(E(x(e)))&&xT(S(j(e)))},[E,x,S,j]),L=null!=(t=null!=(n=null==C?void 0:C(l))?n:null==M?void 0:null==(r=M.colors)?void 0:r[0])?t:"#222",F="AREASERIES_EVENT_SOURCE-"+l,V=ba({dataKey:l,enableEvents:void 0===v||v,onBlur:c,onFocus:d,onPointerMove:f,onPointerOut:h,onPointerUp:p,onPointerDown:m,source:F,allowedSources:[xJ,F]}),z=(0,b.useMemo)(function(){var e=xQ(A?E:S);return A?{x0:null!=T?T:e,x1:P,y:R}:{x:P,y0:null!=N?N:e,y1:R}},[E,S,A,P,R,T,N]),I=!!(d||c),Z=(0,b.useCallback)(function(e){var t=e.glyphs;return I?t.map(function(e){return b.createElement(b.Fragment,{key:e.key},bc(bf({},e,{color:"transparent",onFocus:V.onFocus,onBlur:V.onBlur})))}):null},[I,V.onFocus,V.onBlur]);return b.createElement(b.Fragment,null,b.createElement(x$.Z,bf({},z,_,{curve:a,defined:D}),function(e){var t=e.path;return b.createElement(o,bf({className:"visx-area",stroke:"transparent",fill:L,strokeLinecap:"round"},_,{d:t(s)||""},V))}),y&&b.createElement(xY.Z,bf({x:P,y:R,defined:D,curve:a},u),function(e){var t=e.path;return b.createElement(o,bf({className:"visx-line",fill:"transparent",stroke:L,strokeWidth:2,pointerEvents:"none",strokeLinecap:"round"},u,{d:t(s)||""}))}),I&&b.createElement(bl,{dataKey:l,data:s,xAccessor:x,yAccessor:j,xScale:E,yScale:S,renderGlyphs:Z}))}bh.propTypes={renderLine:ph().bool};var bp=xX(bh);function bm(){return(bm=Object.assign?Object.assign.bind():function(e){for(var t=1;t1)for(var n,r,i,o=1,a=e[t[0]],s=a.length;o=0;)n[t]=t;return n}function bE(e,t){return e[t]}function bj(e){let t=[];return t.key=e,t}Array.prototype.slice;var bk=n(74322),bS=n(58543);function b_(e,t){let n,r;if(void 0===t)for(let t of e)null!=t&&(void 0===n?t>=t&&(n=r=t):(n>t&&(n=t),r=o&&(n=r=o):(n>o&&(n=o),r=0?"positiveSum":"negativeSum"]+=i})}}),Object.values(e)},[o,l]),d=(0,b.useMemo)(function(){var e=r?null:c.some(function(e){return e.negativeSum<0}),t=function(){var e=bx([]),t=bw,n=bb,r=bE;function i(i){var o,a,s,l=Array.from(e.apply(this,arguments),bj),u=l.length,c=-1;for(let e of i)for(a=0,++c;a0&&0===r&&(o?i.xScale=function(e){return e.domain(b_(e.domain().concat(f)))}:i.yScale=function(e){return e.domain(b_(e.domain().concat(f)))}),i}).filter(function(e){return e}))),function(){return s(u)}},[u,f,o,d,a,s,l]),{seriesChildren:l,dataKeys:u,stackedData:d}}function bP(e,t,n){var r,i,o,a,s=e.xScale,l=e.yScale,u=e.point,c=(n?bt:be)(e),d=(null==c?void 0:c.index)==null?null:t[c.index];return c&&d&&u?{index:c.index,datum:d,distanceX:n&&u.x>=(null!=(r=s((0,by.l8)(c.datum)))?r:1/0)&&u.x<=(null!=(i=s((0,by.xf)(c.datum)))?i:-1/0)?0:c.distanceX,distanceY:n?c.distanceY:u.y<=(null!=(o=l((0,by.l8)(c.datum)))?o:-1/0)&&u.y>=(null!=(a=l((0,by.xf)(c.datum)))?a:1/0)?0:c.distanceY}:null}var bN=["data","dataKey","xAccessor","yAccessor","curve","PathComponent","lineProps","renderLine"];function bR(){return(bR=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(a,bN)),u=bR({fill:null!=(n=null!=(r=null==g?void 0:g(e.key))?r:null==j?void 0:null==(i=j.colors)?void 0:i[0])?n:"#222"},l);return{key:t+"-"+e.key,accessors:C,data:e,areaProps:u,lineProps:s}})},[O,C,g,_,j]),A=(0,b.useCallback)(function(e){var t,n,r=null==(t=_.find(function(t){return t.props.dataKey===e.dataKey}))?void 0:null==(n=t.props)?void 0:n.data;return r?bP(e,r,x):null},[_,x]),T="AREASTACK_EVENT_SOURCE-"+S.join("-"),P=ba({dataKey:S,enableEvents:void 0===o||o,findNearestDatum:A,onBlur:s,onFocus:l,onPointerMove:u,onPointerOut:c,onPointerUp:d,onPointerDown:f,source:T,allowedSources:[xJ,T]}),N=!!(l||s),R=(0,b.useCallback)(function(e){var t=e.glyphs;return N?t.map(function(e){return b.createElement(b.Fragment,{key:e.key},bc(bR({},e,{color:"transparent",onFocus:P.onFocus,onBlur:P.onBlur})))}):null},[N,P.onFocus,P.onBlur]);return!S.some(function(e){return null==y.get(e)})&&w&&E&&g?b.createElement("g",{className:"visx-area-stack"},M.map(function(e){return b.createElement(x$.Z,bR({key:e.key,curve:i},e.accessors),function(t){var r=t.path;return b.createElement(n,bR({className:"visx-area",stroke:"transparent",d:r(e.data)||""},e.areaProps,P))})}),m&&M.map(function(e){return b.createElement(bg.Z,bR({key:"line-"+e.key,x:e.accessors.x||e.accessors.x1,y:e.accessors.y||e.accessors.y1,defined:e.accessors.defined,curve:i},e.lineProps),function(t){var r=t.path;return b.createElement(n,bR({className:"visx-line",fill:"transparent",stroke:e.areaProps.fill,strokeWidth:2,pointerEvents:"none"},e.lineProps,{d:r(e.data)||""}))})}),N&&M.map(function(e,t){var n=M[M.length-t-1];return b.createElement(bl,{key:"glyphs-"+n.key,dataKey:n.key,data:n.data,xAccessor:n.accessors.x||n.accessors.x1,yAccessor:n.accessors.y||n.accessors.y1,xScale:bD,yScale:bD,renderGlyphs:R})})):null}function bF(){return(bF=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,bI),c=(0,b.useContext)(xM),d=c.theme,f=c.xScale,h=c.yScale,p=c.margin,m=c.width,v=c.height,g=u.orientation,y=(0,b.useMemo)(function(){var e,t,n,r;return"left"===g||"right"===g?null==d?void 0:null==(e=d.axisStyles)?void 0:null==(t=e.y)?void 0:t[g]:null==d?void 0:null==(n=d.axisStyles)?void 0:null==(r=n.x)?void 0:r[g]},[d,g]),x=u.tickLabelProps,w=(0,b.useMemo)(function(){return x||y?function(e,t,n){return bZ({},null==y?void 0:y.tickLabel,{width:"left"===g||"right"===g?null==p?void 0:p[g]:void 0},null==x?void 0:x(e,t,n))}:void 0},[x,y,g,p]),E="bottom"===g?(null!=v?v:0)-(null!=(t=null==p?void 0:p.bottom)?t:0):"top"===g&&null!=(n=null==p?void 0:p.top)?n:0,j="left"===g?null!=(r=null==p?void 0:p.left)?r:0:"right"===g?(null!=m?m:0)-(null!=(i=null==p?void 0:p.right)?i:0):0,k="left"===g||"right"===g?h:f;return k?b.createElement(l,bZ({top:E,left:j,labelProps:null==y?void 0:y.axisLabel,stroke:null==y?void 0:null==(o=y.axisLine)?void 0:o.stroke,strokeWidth:null==y?void 0:null==(a=y.axisLine)?void 0:a.strokeWidth,tickLength:null==y?void 0:y.tickLength,tickStroke:null==y?void 0:null==(s=y.tickLine)?void 0:s.stroke},u,{tickLabelProps:w,scale:k})):null}function bH(){return(bH=Object.assign?Object.assign.bind():function(e){for(var t=1;t=h&&l.y<=p;return bq({},u,{distanceX:0,distanceY:m?0:Math.abs(l.y-(h+p)/2)})}var v=a(i(u.datum)),g=(null!=v?v:1/0)+(null!=c?c:1/0),y=g+d,x=l.x>=g&&l.x<=y;return bq({},u,{distanceY:0,distanceX:x?0:Math.abs(l.x-(g+y)/2)})}(e,k,v)},[k,v]),_="BARGROUP_EVENT_SOURCE-"+j.join("-")+"}",O=ba({dataKey:j,enableEvents:void 0===f||f,findNearestDatum:S,onBlur:a,onFocus:s,onPointerMove:l,onPointerOut:u,onPointerUp:c,onPointerDown:d,source:_,allowedSources:[xJ,_]}),C=(0,b.useMemo)(function(){return x?xQ(x):0},[x]),M=(0,b.useMemo)(function(){return w?xQ(w):0},[w]),A=j.map(function(e){return m.get(e)});if(A.some(function(e){return null==e})||!x||!w||!p)return null;var T=xA(k),P=A.map(function(e){var t,n=e.xAccessor,r=e.yAccessor,i=e.data,o=e.key,a=function(e){var t,i;return v?(null!=(t=x(n(e)))?t:NaN)-C:(null!=(i=w(r(e)))?i:NaN)-M},s=v?function(e){var t;return null!=(t=w(r(e)))?t:NaN}:function(e){var t;return null!=(t=x(n(e)))?t:NaN},l=null!=(t=k(o))?t:0,u=v?function(e){return C+Math.min(0,a(e))}:function(e){return s(e)+l},c=v?function(e){return s(e)+l}:function(e){return M+Math.min(0,a(e))},d=v?function(e){return Math.abs(a(e))}:function(){return T},f=v?function(){return T}:function(e){return Math.abs(a(e))},h=E.find(function(e){return e.props.dataKey===o}),m=(null==h?void 0:h.props)||{},g=m.colorAccessor;return{key:o,radius:m.radius,radiusAll:m.radiusAll,radiusBottom:m.radiusBottom,radiusLeft:m.radiusLeft,radiusRight:m.radiusRight,radiusTop:m.radiusTop,bars:i.map(function(e,t){var n,r=u(e);if(!xT(r))return null;var i=c(e);if(!xT(i))return null;var a=d(e);if(!xT(a))return null;var s=f(e);return xT(s)?{key:o+"-"+t,x:r,y:i,width:a,height:s,fill:null!=(n=null==g?void 0:g(e,t))?n:p(o)}:null}).filter(function(e){return e})}});return b.createElement("g",{className:"visx-bar-group"},P.map(function(e){return e&&b.createElement(o,b$({horizontal:v,xScale:x,yScale:w},e,O,{key:e.key}))}))}bY.propTypes={children:ph().node.isRequired,padding:ph().number,sortBars:ph().func};var bG=n(10897),bX=function(e){return!!(null==e?void 0:e.includes("url("))},bK=function(e){return bX(e)?"rgba(0,0,0,0.1)":e},bQ=["bars","xScale","yScale","horizontal","radius","radiusAll","radiusTop","radiusRight","radiusBottom","radiusLeft"],bJ=["bars","xScale","yScale","horizontal","radius","radiusAll","radiusTop","radiusRight","radiusBottom","radiusLeft"];function b0(){return(b0=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function b2(e){return{x:e.x,y:e.y,width:e.width,height:e.height,fill:bK(e.fill),opacity:1}}function b4(e){var t=e.bars,n=(e.xScale,e.yScale,e.horizontal,e.radius),r=e.radiusAll,i=e.radiusTop,o=e.radiusRight,a=e.radiusBottom,s=e.radiusLeft,l=b1(e,bQ);return b.createElement(b.Fragment,null,t.map(function(e){var t=e.key,u=e.fill,c=e.x,d=e.y,f=e.width,h=e.height;return b.createElement(bG.Z,{key:t,x:c,y:d,width:f,height:h,radius:n,all:r,top:i,right:o,bottom:a,left:s},function(e){var t=e.path;return b.createElement(xq,b0({className:"visx-bar visx-bar-rounded",d:t,fill:u},l))})}))}function b3(e){var t,n,r,i=e.bars,o=e.xScale,a=e.yScale,s=e.horizontal,l=(e.radius,e.radiusAll,e.radiusTop,e.radiusRight,e.radiusBottom,e.radiusLeft,b1(e,bJ)),u=xr(i,b0({},(n=(t={horizontal:s,scale:s?o:a}).scale,r=!!t.horizontal,(0,b.useMemo)(function(){var e=xQ(n);function t(t){var n=t.x,i=t.y,o=t.width,a=t.height;return{x:r?null!=e?e:0:n,y:r?i:null!=e?e:0,width:r?0:o,height:r?a:0,fill:bK(t.fill),opacity:0}}return{unique:!0,from:t,leave:t,enter:b2,update:b2,keys:function(e){return e.key}}},[n,r])))),c=!!(l.onFocus||l.onBlur);return b.createElement(b.Fragment,null,u(function(e,t,n){var r=e.x,i=e.y,o=e.width,a=e.height,s=e.fill,u=e.opacity,d=n.key;return null==t||null==d?null:b.createElement(xE.rect,b0({key:d,tabIndex:c?0:void 0,className:"visx-bar",x:r,y:i,width:o,height:a,fill:bX(t.fill)?t.fill:s,opacity:u},l))}))}function b5(e){return null==e.radius?b.createElement(b3,e):b.createElement(b4,b0({},e,{radius:e.radius}))}function b6(){return(b6=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,b7),E=(0,b.useContext)(xM),j=E.colorScale,k=E.horizontal,S=E.theme,_=E.innerWidth,O=E.innerHeight,C=(0,b.useMemo)(function(){return xK(g,v)},[g,v]),M=(0,b.useMemo)(function(){return xK(x,y)},[x,y]),A=xA(k?x:g)||(k?void 0===O?0:O:void 0===_?0:_)/s.length*(1-Math.min(1,Math.max(0,void 0===o?.1:o))),T=(0,b.useMemo)(function(){return g?xQ(g):0},[g]),P=(0,b.useMemo)(function(){return x?xQ(x):0},[x]),N=null!=(t=null!=(n=null==j?void 0:j(l))?n:null==S?void 0:null==(r=S.colors)?void 0:r[0])?t:"#222",R=(0,b.useMemo)(function(){var e=k?0:-A/2,t=k?-A/2:0;return s.map(function(n,r){var i,o=C(n)+e;if(!xT(o))return null;var s=M(n)+t;if(!xT(s))return null;var l=k?o-T:s-P;return xT(l)?{key:""+r,x:k?T+Math.min(0,l):o,y:k?s:P+Math.min(0,l),width:k?Math.abs(l):A,height:k?A:Math.abs(l),fill:null!=(i=null==a?void 0:a(n,r))?i:N}:null}).filter(function(e){return e})},[A,N,a,s,C,M,k,T,P]),D="BARSERIES_EVENT_SOURCE-"+l,L=ba({dataKey:l,enableEvents:void 0===m||m,onBlur:u,onFocus:c,onPointerMove:d,onPointerOut:f,onPointerUp:h,onPointerDown:p,source:D,allowedSources:[xJ,D]});return b.createElement("g",{className:"vx-bar-series"},b.createElement(i,b9({bars:R,horizontal:k,xScale:g,yScale:x},L,w)))}we.propTypes={barPadding:ph().number,colorAccessor:ph().func};var wt=xX(we),wn=["colorAccessor"];function wr(){return(wr=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,wn);return b.createElement(wt,wr({},n,{colorAccessor:t,BarsComponent:b5}))}var wo=n(15590);function wa(){return(wa=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,wf),i=(0,b.useCallback)(function(e){return b.createElement(wd,wh({},e,{renderGlyph:n}))},[n]);return b.createElement(bu,wh({},r,{renderGlyphs:i}))}var wm=n(93353),wv=n(63962),wg=["rows","columns","GridRowsComponent","GridColumnsComponent"];function wy(){return(wy=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,wg),l=(0,b.useContext)(xM),u=l.theme,c=l.xScale,d=l.yScale,f=l.margin,h=l.innerWidth,p=l.innerHeight,m=null==u?void 0:u.gridStyles;return b.createElement(b.Fragment,null,n&&d&&null!=h&&b.createElement(o,wy({left:null==f?void 0:f.left,lineStyle:m,width:h,scale:d},s)),i&&c&&null!=p&&b.createElement(a,wy({top:null==f?void 0:f.top,lineStyle:m,height:p,scale:c},s)))}wx.propTypes={rows:ph().bool,columns:ph().bool};var wb=["animationTrajectory"];function ww(){return(ww=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,wb),r=(0,b.useMemo)(function(){return function(e){return b.createElement(wm.Z,ww({},e,{animationTrajectory:t}))}},[t]),i=(0,b.useMemo)(function(){return function(e){return b.createElement(wv.Z,ww({},e,{animationTrajectory:t}))}},[t]);return b.createElement(wx,ww({GridRowsComponent:r,GridColumnsComponent:i},n))}var wj=["colorAccessor","curve","data","dataKey","onBlur","onFocus","onPointerMove","onPointerOut","onPointerUp","onPointerDown","enableEvents","xAccessor","xScale","yAccessor","yScale","PathComponent"];function wk(){return(wk=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,wj),j=(0,b.useContext)(xM),k=j.colorScale,S=j.theme,_=(0,b.useMemo)(function(){return xK(v,m)},[v,m]),O=(0,b.useMemo)(function(){return xK(y,g)},[y,g]),C=(0,b.useCallback)(function(e){return xT(v(m(e)))&&xT(y(g(e)))},[v,m,y,g]),M=null!=(t=null!=(n=null==k?void 0:k(s))?n:null==S?void 0:null==(r=S.colors)?void 0:r[0])?t:"#222",A="LINESERIES_EVENT_SOURCE-"+s,T=ba({dataKey:s,enableEvents:void 0===p||p,onBlur:l,onFocus:u,onPointerMove:c,onPointerOut:d,onPointerUp:f,onPointerDown:h,source:A,allowedSources:[xJ,A]}),P=!!(u||l),N=(0,b.useCallback)(function(e){var t=e.glyphs;return P?t.map(function(e){return b.createElement(b.Fragment,{key:e.key},bc(wk({},e,{color:"transparent",onFocus:T.onFocus,onBlur:T.onBlur})))}):null},[P,T.onFocus,T.onBlur]);return b.createElement(b.Fragment,null,b.createElement(xY.Z,wk({x:_,y:O,defined:C,curve:o},E),function(e){var t,n=e.path;return b.createElement(w,wk({stroke:null!=(t=null==i?void 0:i(s))?t:M,strokeWidth:2,fill:"transparent",strokeLinecap:"round"},E,{d:n(a)||""},T))}),P&&b.createElement(bl,{dataKey:s,data:a,xAccessor:m,yAccessor:g,xScale:v,yScale:y,renderGlyphs:N}))}wS.propTypes={colorAccessor:ph().func};var w_=xX(wS);function wO(){return(wO=Object.assign?Object.assign.bind():function(e){for(var t=1;twT.every(n=>e[n]===t[n]);function wN(e,t){return(wN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var wR=function(e){function t(){return e.apply(this,arguments)||this}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,wN(t,e);var n=t.prototype;return n.componentWillUnmount=function(){this.node&&document.body&&(document.body.removeChild(this.node),delete this.node)},n.render=function(){return(this.node||"undefined"==typeof document||(this.node=document.createElement("div"),null!=this.props.zIndex&&(this.node.style.zIndex=""+this.props.zIndex),document.body.append(this.node)),this.node)?e6.createPortal(this.props.children,this.node):null},t}(b.PureComponent);wR.propTypes={zIndex:ph().oneOfType([ph().number,ph().string])};var wD=["detectBounds","zIndex"],wL=["left","top","detectBounds","zIndex"];function wF(){return(wF=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}var wz=["debounce","detectBounds","horizontalCrosshairStyle","glyphStyle","renderTooltip","renderGlyph","resizeObserverPolyfill","scroll","showDatumGlyph","showHorizontalCrosshair","showSeriesGlyphs","showVerticalCrosshair","snapTooltipToDatumX","snapTooltipToDatumY","verticalCrosshairStyle","zIndex"],wI=["x","y"];function wZ(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}function wB(){return(wB=Object.assign?Object.assign.bind():function(e){for(var t=1;t(f.current=!0,()=>void(f.current=!1)));let[h,p,m]=(0,b.useMemo)(()=>{let e=()=>{if(!u.current.element)return;let{left:e,top:t,width:n,height:r,bottom:i,right:a,x:s,y:c}=u.current.element.getBoundingClientRect(),d={left:e,top:t,width:n,height:r,bottom:i,right:a,x:s,y:c};u.current.element instanceof HTMLElement&&o&&(d.height=u.current.element.offsetHeight,d.width=u.current.element.offsetWidth),Object.freeze(d),f.current&&!wP(u.current.lastBounds,d)&&l(u.current.lastBounds=d)};return[e,d?wA()(e,d):e,c?wA()(e,c):e]},[l,o,c,d]);function v(){u.current.scrollContainers&&(u.current.scrollContainers.forEach(e=>e.removeEventListener("scroll",m,!0)),u.current.scrollContainers=null),u.current.resizeObserver&&(u.current.resizeObserver.disconnect(),u.current.resizeObserver=null)}function g(){u.current.element&&(u.current.resizeObserver=new a(m),u.current.resizeObserver.observe(u.current.element),r&&u.current.scrollContainers&&u.current.scrollContainers.forEach(e=>e.addEventListener("scroll",m,{capture:!0,passive:!0})))}return t=!!r,(0,b.useEffect)(()=>{if(t)return window.addEventListener("scroll",m,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",m,!0)},[m,t]),(0,b.useEffect)(()=>(window.addEventListener("resize",p),()=>void window.removeEventListener("resize",p)),[p]),(0,b.useEffect)(()=>{v(),g()},[r,m,p]),(0,b.useEffect)(()=>v,[]),[e=>{e&&e!==u.current.element&&(v(),u.current.element=e,u.current.scrollContainers=function e(t){let n=[];if(!t||t===document.body)return n;let{overflow:r,overflowX:i,overflowY:o}=window.getComputedStyle(t);return[r,i,o].some(e=>"auto"===e||"scroll"===e)&&n.push(t),[...n,...e(t.parentElement)]}(e),g())},s,h]}(wV(ei,wD)))[0],ec=el[1],ed=el[2],ef=(0,b.useMemo)(function(){return function(e){var t=e.left,n=e.top,r=e.detectBounds,i=e.zIndex,o=wV(e,wL),a=null==i?es:i,s=(null==r?ea:r)?p$:pV,l=(void 0===t?0:t)+(ec.left||0)+window.scrollX,u=(void 0===n?0:n)+(ec.top||0)+window.scrollY;return b.createElement(wR,{zIndex:a},b.createElement(s,wF({left:l,top:u},o)))}},[ea,es,ec.left,ec.top]),{containerRef:eu,containerBounds:ec,forceRefreshBounds:ed,TooltipInPortal:ef}),L=D.containerRef,F=D.TooltipInPortal,V=D.forceRefreshBounds,z=(0,b.useCallback)(function(e){var t;L(null!=(t=null==e?void 0:e.parentElement)?t:null)},[L]),I=null!=R&&R.tooltipOpen?o(wB({},R,{colorScale:_})):null,Z=(null==R?void 0:R.tooltipOpen)&&null!=I,B=(0,b.useRef)(!1);(0,b.useEffect)(function(){Z&&!B.current&&V(),B.current=Z},[Z,V]);var H=null==R?void 0:R.tooltipLeft,U=null==R?void 0:R.tooltipTop,W=T?xA(T):0,q=P?xA(P):0,$=(0,b.useCallback)(function(e,t){var n,r,i=null==N?void 0:N.get(e),o=null==i?void 0:i.xAccessor,a=null==i?void 0:i.yAccessor;return{left:T&&o?null!=(n=Number(T(o(t)))+W/2)?n:0:void 0,top:P&&a?null!=(r=Number(P(a(t)))+q/2)?r:0:void 0}},[N,W,q,T,P]),Y=null==R?void 0:null==(eh=R.tooltipData)?void 0:eh.nearestDatum,G=null!=(ep=null==Y?void 0:Y.key)?ep:"";if(Z&&Y&&(y||w)){var X=$(G,Y.datum),K=X.left,Q=X.top;H=y&&xT(K)?K:H,U=w&&xT(Q)?Q:U}var J=[];if(Z&&(void 0!==c&&c||p)){var ee=Number(null!=(e_=null==i?void 0:i.radius)?e_:4);if(p)Object.values(null!=(eO=null==R?void 0:null==(eC=R.tooltipData)?void 0:eC.datumByKey)?eO:{}).forEach(function(e){var t,n,r,o=e.key,a=e.datum,s=e.index,l=null!=(t=null!=(n=null==_?void 0:_(o))?n:null==O?void 0:null==(r=O.htmlLabel)?void 0:r.color)?t:"#222",u=$(o,a),c=u.left,d=u.top;xT(c)&&xT(d)&&J.push({key:o,color:l,datum:a,index:s,size:ee,x:c,y:d,glyphStyle:i,isNearestDatum:!!Y&&Y.key===o})});else if(Y){var et=$(G,Y.datum),en=et.left,er=et.top;if(xT(en)&&xT(er)){var ei,eo,ea,es,el,eu,ec,ed,ef,eh,ep,em,ev,eg,ey,ex,eb,ew,eE,ej,ek,eS,e_,eO,eC,eM,eA,eT,eP,eN,eR,eD=null!=(eM=null!=(eA=null!=(eT=null!=(eP=G&&(null==_?void 0:_(G)))?eP:null)?eT:null==O?void 0:null==(eN=O.gridStyles)?void 0:eN.stroke)?eA:null==O?void 0:null==(eR=O.htmlLabel)?void 0:eR.color)?eM:"#222";J.push({key:G,color:eD,datum:Y.datum,index:Y.index,size:ee,x:en,y:er,glyphStyle:i,isNearestDatum:!0})}}}return b.createElement(b.Fragment,null,b.createElement("svg",{ref:z,style:wU}),Z&&b.createElement(b.Fragment,null,v&&b.createElement(F,{className:"visx-crosshair visx-crosshair-vertical",left:H,top:null==A?void 0:A.top,offsetLeft:0,offsetTop:0,detectBounds:!1,style:wH},b.createElement("svg",{width:"1",height:C,overflow:"visible"},b.createElement("line",wB({x1:0,x2:0,y1:0,y2:C,strokeWidth:1.5,stroke:null!=(em=null!=(ev=null==O?void 0:null==(eg=O.gridStyles)?void 0:eg.stroke)?ev:null==O?void 0:null==(ey=O.htmlLabel)?void 0:ey.color)?em:"#222"},E)))),f&&b.createElement(F,{className:"visx-crosshair visx-crosshair-horizontal",left:null==A?void 0:A.left,top:U,offsetLeft:0,offsetTop:0,detectBounds:!1,style:wH},b.createElement("svg",{width:M,height:"1",overflow:"visible"},b.createElement("line",wB({x1:0,x2:M,y1:0,y2:0,strokeWidth:1.5,stroke:null!=(ex=null!=(eb=null==O?void 0:null==(ew=O.gridStyles)?void 0:ew.stroke)?eb:null==O?void 0:null==(eE=O.htmlLabel)?void 0:eE.color)?ex:"#222"},r)))),J.map(function(e,t){var n=e.x,r=e.y,i=wZ(e,wI);return b.createElement(F,{key:t,className:"visx-tooltip-glyph",left:n,top:r,offsetLeft:0,offsetTop:0,detectBounds:!1,style:wH},b.createElement("svg",{overflow:"visible"},s(wB({x:0,y:0},i))))}),b.createElement(F,wB({left:H,top:U,style:wB({},pF,{background:null!=(ej=null==O?void 0:O.backgroundColor)?ej:"white",boxShadow:"0 1px 2px "+(null!=O&&null!=(ek=O.htmlLabel)&&ek.color?(null==O?void 0:null==(eS=O.htmlLabel)?void 0:eS.color)+"55":"#22222255")},null==O?void 0:O.htmlLabel)},k),I)))}function wY(e){var t=(0,b.useContext)(x0);return null!=t&&t.tooltipOpen?b.createElement(w$,e):null}function wG(e){var t=e.children,n=(0,b.useMemo)(function(){var e;return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r&&r.push(n)||e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)},emit:function(t,n){(e.get(t)||[]).slice().map(function(e){e(n)}),(e.get("*")||[]).slice().map(function(e){e(t,n)})}}},[]);return b.createElement(x1.Provider,{value:n},t)}function wX(){return(wX=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(t,pN);return pR({},e(n),{tooltipOpen:!0})}:{tooltipOpen:!0,tooltipLeft:e.tooltipLeft,tooltipTop:e.tooltipTop,tooltipData:e.tooltipData})},[r]),o=(0,b.useCallback)(function(){return r({tooltipOpen:!1,tooltipLeft:void 0,tooltipTop:void 0,tooltipData:void 0})},[r]),{tooltipOpen:n.tooltipOpen,tooltipLeft:n.tooltipLeft,tooltipTop:n.tooltipTop,tooltipData:n.tooltipData,updateTooltip:r,showTooltip:i,hideTooltip:o}),c=u.tooltipOpen,d=u.tooltipLeft,f=u.tooltipTop,h=u.tooltipData,p=u.updateTooltip,m=u.hideTooltip,v=(0,b.useRef)(null),g=(0,b.useRef)(function(e){var t=e.svgPoint,n=e.index,r=e.key,i=e.datum,o=e.distanceX,a=e.distanceY;v.current&&(v.current.cancel(),v.current=null);var s=Math.sqrt(Math.pow(xT(o)?o:1/0,2)+Math.pow(xT(a)?a:1/0,2));p(function(e){var o,a,l,u=e.tooltipData,c=null!=u&&u.nearestDatum&&xT(u.nearestDatum.distance)?u.nearestDatum.distance:1/0;return{tooltipOpen:!0,tooltipLeft:null==t?void 0:t.x,tooltipTop:null==t?void 0:t.y,tooltipData:{nearestDatum:(null!=(o=null==u?void 0:null==(a=u.nearestDatum)?void 0:a.key)?o:"")!==r&&c0&&o>0&&y({width:m,height:o,margin:l})},[y,m,o,l]);var E=x4({source:xJ});return(bo({dataKey:"nearest"===(void 0===h?"nearest":h)?bi:br,onPointerMove:u,onPointerOut:c,onPointerUp:d,onPointerDown:f,allowedSources:Ee}),y)?null==m||null==o?b.createElement(m6.Z,null,function(t){return b.createElement(Et,w7({},e,{width:null==e.width?t.width:e.width,height:null==e.height?t.height:e.height}))}):null==x?b.createElement(wK,null,b.createElement(Et,e)):null==w?b.createElement(wG,null,b.createElement(Et,e)):m>0&&o>0?b.createElement("svg",{width:m,height:o,"aria-label":void 0===t?"XYChart":t},i,r&&b.createElement("rect",w7({x:l.left,y:l.top,width:m-l.left-l.right,height:o-l.top-l.bottom,fill:"transparent"},E))):null:v&&g?b.createElement(w8,{xScale:v,yScale:g,theme:p,initialDimensions:{width:m,height:o,margin:l},horizontal:a},b.createElement(Et,e)):(console.warn("[@visx/xychart] XYChart: When no DataProvider is available in context, you must pass xScale & yScale config to XYChart."),null)}function En(e){return b.createElement(bp,e)}function Er(e){return b.createElement(bL,e)}function Ei(){return(Ei=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function Ec(e){var t=e.bars,n=(e.horizontal,e.xScale,e.yScale,e.radius),r=e.radiusAll,i=e.radiusTop,o=e.radiusRight,a=e.radiusBottom,s=e.radiusLeft,l=Eu(e,Ea),u=!!(l.onFocus||l.onBlur);return b.createElement(b.Fragment,null,t.map(function(e){var t=e.key,c=Eu(e,Es);return null==n?b.createElement("rect",El({key:t,className:"visx-bar",tabIndex:u?0:void 0},c,l)):b.createElement(bG.Z,El({key:t,className:"visx-bar",tabIndex:u?0:void 0,radius:n,all:r,top:i,right:o,bottom:a,left:s},c,l))}))}function Ed(){return(Ed=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,Eh);return b.createElement(wt,Ep({},n,{colorAccessor:t,BarsComponent:Ec}))};function Ev(){return(Ev=Object.assign?Object.assign.bind():function(e){for(var t=1;tr(e),className:"flex flex-col gap-1",children:[(0,x.jsx)(dX,{value:"line",children:"Line"}),(0,x.jsx)(dX,{disabled:p||m,value:"areastack",children:"Area Stack"}),(0,x.jsx)(dX,{disabled:p||m,value:"barstack",children:"Bar Stack"}),(0,x.jsx)(dX,{disabled:p,value:"area",children:"Area"}),(0,x.jsx)(dX,{disabled:p,value:"bargroup",children:"Bar Group"})]})]}),(0,x.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,x.jsx)(tq,{weight:"semibold",children:"Stack series offset"}),(0,x.jsxs)(dK,{value:l,onValueChange:e=>u(e),className:"flex flex-col gap-1",children:[(0,x.jsxs)(dX,{disabled:!s,value:"none",children:["None",(0,x.jsx)(fb,{children:"zero-baseline"})]}),(0,x.jsxs)(dX,{disabled:!s,value:"diverging",children:["Diverging",(0,x.jsx)(fb,{children:"non zero-baseline"})]}),(0,x.jsxs)(dX,{disabled:!s,value:"expand",children:["Expand",(0,x.jsx)(fb,{children:"values sum to 1"})]}),(0,x.jsxs)(dX,{disabled:!s,value:"wiggle",children:["Wiggle",(0,x.jsx)(fb,{children:"stream graph"})]})]})]}),(0,x.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,x.jsx)(tq,{weight:"semibold",children:"Curve shape"}),(0,x.jsxs)(dK,{value:i,onValueChange:e=>o(e),className:"flex flex-col gap-1",children:[(0,x.jsx)(dX,{disabled:!a,value:"linear",children:"Linear"}),(0,x.jsx)(dX,{disabled:!a,value:"cardinal",children:"Cardinal"}),(0,x.jsx)(dX,{disabled:!a,value:"step",children:"Step"})]})]}),(0,x.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,x.jsx)(tq,{weight:"semibold",children:"Axes"}),(0,x.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,x.jsxs)(dK,{value:c,onValueChange:e=>d(e),className:"flex flex-col gap-1",children:[(0,x.jsx)(dX,{value:"bottom",children:"Bottom"}),(0,x.jsx)(dX,{value:"top",children:"Top"})]}),(0,x.jsxs)(dK,{value:f,onValueChange:e=>h(e),className:"flex flex-col gap-2",children:[(0,x.jsx)(dX,{value:"left",children:"Left"}),(0,x.jsx)(dX,{value:"right",children:"Right"})]})]})]})]})})}let EA=(0,b.forwardRef)((e,t)=>{let{className:n}=e;return(0,x.jsxs)("div",{ref:t,className:(0,ea.cx)("flex gap-1 items-center",n),children:[(0,x.jsx)(ET,{}),(0,x.jsx)(ET,{}),(0,x.jsx)(ET,{})]})});function ET(){return(0,x.jsx)("div",{className:"w-1 h-1 bg-slate-400 dark:bg-slate-200 rounded-full animate-pulselight [&:nth-child(2)]:animation-delay-500 [&:nth-child(3)]:animation-delay-1000"})}function EP(e){let{id:t,height:n,data:r,config:i,actionsLeft:o,isLoading:a,actionsRight:s,variant:l="panel",allowConfiguration:u=!0}=e,c=function(e,t,n){let r=(0,b.useMemo)(()=>{if(t.sort((e,t)=>e.timestamp>t.timestamp?1:-1),0===t.length)return[];let e=t[t.length-1];return[...t,{...e,timestamp:e.timestamp+EO(1)}]},[t]),i=(0,b.useMemo)(()=>{if(r.length<2)return 0;let e=[r[0].timestamp,r[r.length-1].timestamp],t=new Date().getTime();return t>e[0]&&t"dark"===s?vS:vk,[s]),[u,c]=(0,b.useState)("center"),[d,f]=(0,b.useState)([!1,!1]),[h,p]=d,[m,v]=(0,b.useState)("bottom"),[g,y]=(0,b.useState)("right"),[w,E]=(0,b.useState)(!0),[j,k]=(0,b.useState)(!0),[S,_]=(0,b.useState)(!1),[O,C]=(0,b.useState)(!0),[M,A]=(0,b.useState)(!0),T=n.chartType||"areastack",P=n.curveType||"linear",N=n.stackOffset||"none",[R,D]=(0,b.useState)(T),[L,F]=(0,b.useState)(P),[V,z]=(0,b.useState)(N),I=l.xyChartTheme.gridStyles.stroke,[Z,B]=(0,b.useState)(!1),[H,U]=(0,b.useState)("star"),W=(0,b.useCallback)(e=>{let{x:t,y:n,size:r,color:i,onPointerMove:o,onPointerOut:a,onPointerUp:s,isNearestDatum:l}=e,u={onPointerMove:o,onPointerOut:a,onPointerUp:s};return"star"===H?(0,x.jsx)(vs,{left:t,top:n,stroke:I,fill:i,size:10*r,...u}):"circle"===H?(0,x.jsx)(vc,{left:t,top:n,stroke:I,fill:i,r:r,...u}):"cross"===H?(0,x.jsx)(vp,{left:t,top:n,stroke:I,fill:i,size:10*r,...u}):(0,x.jsx)("text",{x:t,y:n,dx:"-0.75em",dy:"0.25em",fontSize:14,...u,children:l?"\uD83C\uDF4D":"\uD83C\uDF4C"})},[H,I]),q=(0,b.useMemo)(()=>Object.keys(Ek()(t[0],"timestamp")),[t]),$=(0,b.useMemo)(()=>n.enabledGraph||q,[q,n]),Y=(0,b.useMemo)(()=>n.enabledTip||q,[q,n]),G=(0,b.useMemo)(()=>({x:q.reduce((e,t)=>({...e,[t]:e=>e.timestamp}),{}),y:q.reduce((e,t)=>({...e,[t]:e=>e[t]}),{}),date:e=>e.timestamp}),[q]),X=["line","area","areastack"].includes(R),K=["barstack","areastack"].includes(R),Q=(0,b.useMemo)(()=>({x:{type:"band",paddingInner:X?1:.3},y:{type:"linear"}}),[X]),J=(0,b.useMemo)(()=>"cardinal"===L&&vm.ZP||"step"===L&&mg.ZP||vv.Z,[L]),ee=(0,b.useMemo)(()=>({top:30,bottom:"top"===m?0:20,right:"right"===g?60:0,left:"left"===g?60:0}),[m,g]);return{id:e,accessors:G,animationTrajectory:u,config:n,scales:Q,data:r,curve:J,chartData:t,numTicks:4,isLine:X,isStack:K,todayOffset:i,initialChartType:T,initialCurveType:P,initialStackOffset:N,chartType:R,curveType:L,keys:q,enabledGraph:$,enabledTip:Y,renderBarGroup:"bargroup"===R,renderBarStack:"barstack"===R,enableTooltipGlyph:Z,renderTooltipGlyph:W,renderAreaSeries:"area"===R,renderAreaStack:"areastack"===R,renderLineSeries:"line"===R,sharedTooltip:M,showGridColumns:p,showGridRows:h,showHorizontalCrosshair:S,showTooltip:w,showVerticalCrosshair:j,snapTooltipToDatum:!K&&O,stackOffset:V,theme:l,margin:ee,xAxisOrientation:m,yAxisOrientation:g,setUseAnimatedComponents:a,setAnimationTrajectory:c,setGridProps:f,setXAxisOrientation:v,setYAxisOrientation:y,setShowTooltip:E,setShowVerticalCrosshair:k,setShowHorizontalCrosshair:_,setSnapTooltipToDatum:C,setSharedTooltip:A,setChartType:D,setCurveType:F,setStackOffset:z,setEnableTooltipGlyph:B,setTooltipGlyphComponent:U,...o?{Annotation:xI,AreaSeries:bv,AreaStack:bV,Axis:bU,BarGroup:b8,BarSeries:wi,BarStack:wu,GlyphSeries:wp,Grid:wE,LineSeries:wC,Tooltip:wY,XYChart:Et}:{AreaSeries:En,AreaStack:Er,Axis:Eo,BarGroup:Ef,BarSeries:Em,BarStack:Eg,Grid:Ew,LineSeries:EE,Tooltip:wY,XYChart:Et}}}(t,r,i),d=(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)("div",{className:"flex gap-2 absolute top-3 right-4",children:[s,"panel"===l&&u&&(0,x.jsx)(EM,{...c})]}),(0,x.jsx)("div",{className:"flex gap-2 absolute top-3 left-4",children:o}),(0,x.jsx)(m6.Z,{children:e=>{let{width:t,height:n}=e;return a?(0,x.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,x.jsx)(EA,{className:"scale-150"})}):(0,x.jsx)(m9,{...c,width:t,height:n})}})]});return"panel"===l?(0,x.jsx)(tG,{className:"relative p-px",style:{height:n},children:d}):(0,x.jsx)("div",{className:"relative p-px",style:{height:n},children:d})}/*! *****************************************************************************
+***************************************************************************** */var d0=function(){return(d0=Object.assign||function(e){for(var t,n=1,r=arguments.length;n1){if(e.includes(t)){var r=e.split(t),i=r[0],o=r[1];if(o.length>n)return""+i+t+o.slice(0,n)}var a=e.length>n?RegExp("(\\d+)(\\d{"+n+"})"):RegExp("(\\d)(\\d+)"),s=e.match(a);if(s){var i=s[1],o=s[2];return""+i+t+o}}return e},d9=function(e,t){var n=t.groupSeparator,r=t.decimalSeparator,i=RegExp("\\d([^"+d2(void 0===n?",":n)+d2(void 0===r?".":r)+"0-9]+)"),o=e.match(i);return o?o[1]:void 0},fe=function(e){var t=e.value,n=e.decimalSeparator,r=e.intlConfig,i=e.decimalScale,o=e.prefix,a=void 0===o?"":o,s=e.suffix,l=void 0===s?"":s;if(""===t||void 0===t)return"";if("-"===t)return"-";var u=RegExp("^\\d?-"+(a?d2(a)+"?":"")+"\\d").test(t),c="."!==n?ft(t,n,u):t,d=fn((r?new Intl.NumberFormat(r.locale,r.currency?{style:"currency",currency:r.currency,minimumFractionDigits:i||0,maximumFractionDigits:20}:void 0):new Intl.NumberFormat(void 0,{minimumFractionDigits:i||0,maximumFractionDigits:20})).formatToParts(Number(c)),e),f=d9(d,d0({},e)),h=t.slice(-1)===n?n:"",p=(c.match(RegExp("\\d+\\.(\\d+)"))||[])[1];return(void 0===i&&p&&n&&(d=d.includes(n)?d.replace(RegExp("(\\d+)("+d2(n)+")(\\d+)","g"),"$1$2"+p):f&&!l?d.replace(f,""+n+p+f):""+d+n+p),l&&h)?""+d+h+l:f&&h?d.replace(f,""+h+f):f&&l?d.replace(f,""+h+l):[d,h,l].join("")},ft=function(e,t,n){var r=e;return t&&"."!==t&&(r=r.replace(RegExp(d2(t),"g"),"."),n&&"-"===t&&(r="-"+r.slice(1))),r},fn=function(e,t){var n=t.prefix,r=t.groupSeparator,i=t.decimalSeparator,o=t.decimalScale,a=t.disableGroupSeparators,s=void 0!==a&&a;return e.reduce(function(e,t,a){var l=t.type,u=t.value;return 0===a&&n?"minusSign"===l?[u,n]:"currency"===l?d1(d1([],e),[n]):[n,u]:"currency"===l?n?e:d1(d1([],e),[u]):"group"===l?s?e:d1(d1([],e),[void 0!==r?r:u]):"decimal"===l?void 0!==o&&0===o?e:d1(d1([],e),[void 0!==i?i:u]):"fraction"===l?d1(d1([],e),[void 0!==o?u.slice(0,o):u]):d1(d1([],e),[u])},[""]).join("")},fr={currencySymbol:"",groupSeparator:"",decimalSeparator:"",prefix:"",suffix:""},fi=function(e){var t=e||{},n=t.locale,r=t.currency;return(n?new Intl.NumberFormat(n,r?{currency:r,style:"currency"}:void 0):new Intl.NumberFormat).formatToParts(1000.1).reduce(function(e,t,n){return"currency"===t.type?0===n?d0(d0({},e),{currencySymbol:t.value,prefix:t.value}):d0(d0({},e),{currencySymbol:t.value,suffix:t.value}):"group"===t.type?d0(d0({},e),{groupSeparator:t.value}):"decimal"===t.type?d0(d0({},e),{decimalSeparator:t.value}):e},fr)},fo=function(e){return RegExp(/\d/,"gi").test(e)},fa=function(e,t,n){if(void 0===t&&(t="."),void 0===n||""===e||void 0===e)return e;if(!e.match(/\d/g))return"";var r=e.split(t),i=r[0],o=r[1];if(0===n)return i;var a=o||"";if(a.lengtht.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}(e,["allowDecimals","allowNegativeValue","id","name","className","customInput","decimalsLimit","defaultValue","disabled","maxLength","value","onValueChange","fixedDecimalLength","placeholder","decimalScale","prefix","suffix","intlConfig","step","min","max","disableGroupSeparators","disableAbbreviations","decimalSeparator","groupSeparator","onChange","onFocus","onBlur","onKeyDown","onKeyUp","transformRawValue"]);if(O&&fo(O))throw Error("decimalSeparator cannot be a number");if(C&&fo(C))throw Error("groupSeparator cannot be a number");var L=(0,b.useMemo)(function(){return fi(x)},[x]),F=O||L.decimalSeparator||"",V=C||L.groupSeparator||"";if(F&&V&&F===V&&!1===S)throw Error("decimalSeparator cannot be the same as groupSeparator");var z={decimalSeparator:F,groupSeparator:V,disableGroupSeparators:S,intlConfig:x,prefix:g||L.prefix,suffix:y},I={decimalSeparator:F,groupSeparator:V,allowDecimals:void 0===n||n,decimalsLimit:l||p||2,allowNegativeValue:void 0===r||r,disableAbbreviations:void 0!==_&&_,prefix:g||L.prefix,transformRawValue:R},Z=null!=u?fe(d0(d0({},z),{decimalScale:v,value:String(u)})):null!=f?fe(d0(d0({},z),{decimalScale:v,value:String(f)})):"",B=(0,b.useState)(Z),H=B[0],U=B[1],W=(0,b.useState)(!1),q=W[0],$=W[1],Y=(0,b.useState)(0),G=Y[0],X=Y[1],K=(0,b.useState)(0),Q=K[0],J=K[1],ee=(0,b.useState)(null),et=ee[0],en=ee[1],er=t||(0,b.useRef)(null),ei=function(e,t){$(!0);var n=fs({selectionStart:t,value:e,lastKeyStroke:et,stateValue:H,groupSeparator:V}),r=n.modifiedValue,i=n.cursorPosition,a=d8(d0({value:r},I));if(!d||!(a.replace(/-/g,"").length>d)){if(""===a||"-"===a||a===F){h&&h(void 0,o,{float:null,formatted:"",value:""}),U(a);return}var s=parseFloat(a.replace(F,".")),l=fe(d0({value:a},z));if(null!=i){var u=i+(l.length-e.length);X(u=u<=0?g?g.length:0:u),J(Q+1)}U(l),h&&h(a,o,{float:s,formatted:l,value:a})}};(0,b.useEffect)(function(){q&&"-"!==H&&er&&"object"==typeof er&&er.current&&er.current.setSelectionRange(G,G)},[H,G,er,q,Q]);var eo=d0({type:"text",inputMode:"decimal",id:i,name:o,className:a,onChange:function(e){var t=e.target;ei(t.value,t.selectionStart),M&&M(e)},onBlur:function(e){var t=e.target.value,n=d8(d0({value:t},I));if("-"===n||!n){U(""),T&&T(e);return}var r=fa(d7(n,F,p),F,void 0!==v?v:p),i=parseFloat(r.replace(F,".")),a=fe(d0(d0({},z),{value:r}));h&&h(r,o,{float:i,formatted:a,value:r}),U(a),T&&T(e)},onFocus:function(e){return A&&A(e),H?H.length:0},onKeyDown:function(e){var t=e.key;if(en(t),w&&("ArrowUp"===t||"ArrowDown"===t)){e.preventDefault(),X(H.length);var n=parseFloat(null!=f?String(f).replace(F,"."):d8(d0({value:H},I)))||0,r="ArrowUp"===t?n+w:n-w;if(void 0!==E&&rj)return;var i=String(w).includes(".")?Number(String(w).split(".")[1].length):void 0;ei(String(i?r.toFixed(i):r).replace(".",F))}P&&P(e)},onKeyUp:function(e){var t=e.key,n=e.currentTarget.selectionStart;if("ArrowUp"!==t&&"ArrowDown"!==t&&"-"!==H){var r=d9(H,{groupSeparator:V,decimalSeparator:F});if(r&&n&&n>H.length-r.length&&er&&"object"==typeof er&&er.current){var i=H.length-r.length;er.current.setSelectionRange(i,i)}}N&&N(e)},placeholder:m,disabled:void 0!==c&&c,value:null==f||"-"===H||F&&H===F?H:fe(d0(d0({},z),{decimalScale:q?void 0:v,value:String(f)})),ref:er},D);return s?b.createElement(s,d0({},eo)):b.createElement("input",d0({},eo))});function fu(e){let{units:t,variant:n,size:r="small",state:i,noSpin:o,focus:a,cursor:s,className:l,decimalsLimit:u,onValueChange:c,...d}=e,[f,h]=(0,b.useState)();return(0,b.useEffect)(()=>{h(navigator.language)},[]),(0,x.jsxs)("div",{className:"relative",children:[(0,x.jsx)(fl,{...d,decimalsLimit:u,intlConfig:f?{locale:f}:void 0,allowDecimals:!!u,autoComplete:"off",spellCheck:!1,onValueChange:c,transformRawValue:e=>{if(e.length>0){if("."===e[0])return"0."+e.slice(1);if(","===e[0])return"0,"+e.slice(1)}return e},className:(0,ea.cx)(dQ({variant:n,size:r,state:i,focus:a,noSpin:o,cursor:s,className:l}),t?"pr-9":"")}),t&&(0,x.jsx)("div",{className:(0,ea.cx)("flex items-center absolute top-0 h-full","small"===r?"right-2":"","medium"===r?"right-3":"","large"===r?"right-3":""),children:(0,x.jsx)(tq,{size:"12",weight:"medium",color:"subtle",children:t})})]})}fl.displayName="CurrencyInput";var fc=n(6391),fd=n.n(fc);function ff(e,t){return e.decimalPlaces()>t?e.toFixed(t):e.toString()}let fh=(0,b.forwardRef)(function(e,t){let{value:n,placeholder:r=new(fd())(100),decimalsLimit:i=6,onChange:o,size:a="small",units:s,error:l,changed:u,onBlur:c,onFocus:d,...f}=e,h=(0,b.useMemo)(()=>new(fd())(n),[n]),[p,m]=(0,b.useState)(""),v=(0,b.useMemo)(()=>fp(p),[p]),g=(0,b.useCallback)(e=>{o&&o((e=fp(e))&&!isNaN(Number(e))?new(fd())(e):void 0)},[o]),y=(0,b.useCallback)(e=>{m(e),g(e)},[m,g]);return(0,b.useEffect)(()=>{if(!h.isEqualTo(v)){let e=ff(h,i);m(e)}},[h]),(0,x.jsx)(fu,{ref:t,...f,"data-testid":"numberfield",size:a,placeholder:r.isNaN()?"":ff(r,i),units:s,value:"NaN"!==p?p:"",decimalsLimit:i,onBlur:e=>{c&&c(e)},onFocus:e=>{d&&d(e)},onValueChange:e=>y(e||"")})});function fp(e){return(null==e?void 0:e.replace(/,/g,"."))||""}var fm=n(95753),fv=n(47025);let fg=new(fd())(0),fy=(0,b.forwardRef)(function(e,t){let{sc:n,placeholder:r=new(fd())(100),decimalsLimitFiat:i=6,decimalsLimitSc:o=6,onChange:a,size:s="medium",units:l="SC",showFiat:u=!0,error:c,changed:d,prefix:f,onBlur:h,onFocus:p,...m}=e,v=(0,b.useMemo)(()=>new(fd())(void 0===n?NaN:n),[n]),{settings:g}=(0,fm.Hv)(),y=(0,fv.BW)({config:{swr:{revalidateOnFocus:!1}}}),w=(0,b.useMemo)(()=>{var e;return g.siaCentral&&y.data?new(fd())((null===(e=y.data)||void 0===e?void 0:e.rates.sc[g.currency.id])||fg):fg},[y.data,g]),[E,j]=(0,b.useState)(),[k,S]=(0,b.useState)(""),[_,O]=(0,b.useState)(""),C=(0,b.useMemo)(()=>fx(k),[k]),M=(0,b.useMemo)(()=>fx(_),[_]),A=(0,b.useCallback)(e=>{a&&a((e=fx(e))&&!isNaN(Number(e))?new(fd())(e):void 0)},[a]),T=(0,b.useCallback)(e=>{let t=ff(e,i);O(t)},[O,i]),P=(0,b.useCallback)(e=>{let t=ff(e,o);return S(t),A(t),t},[S,o,A]),N=(0,b.useCallback)(e=>{S(e),A(e)},[S,A]),R=(0,b.useCallback)(e=>{let t=new(fd())(e).times(w);T(t)},[T,w]),D=(0,b.useCallback)(e=>{let t=new(fd())(e).dividedBy(w);P(t)},[P,w]),[L,F]=(0,b.useState)(!1);return(0,b.useEffect)(()=>{if(!v.isEqualTo(C)){let e=ff(v,o);S(e),"fiat"!==E&&R(e)}L||F(!0)},[v]),(0,b.useEffect)(()=>{L&&R(C)},[w]),(0,b.useEffect)(()=>{"sc"===E&&R(C)},[C]),(0,b.useEffect)(()=>{"fiat"===E&&D(M)},[M]),(0,x.jsxs)("div",{ref:t,className:(0,ea.cx)("flex flex-col bg-white dark:bg-graydark-50","focus-within:ring ring-blue-500 dark:ring-blue-200","border",c?"border-red-500 dark:border-red-400":d?"border-green-500 dark:border-green-400":"border-gray-200 dark:border-graydark-200","rounded"),children:[(0,x.jsx)(fu,{...m,"data-testid":"scInput",size:s,variant:"ghost",focus:"none",placeholder:ff(r,o),units:l,value:"NaN"!==k?k:"",decimalsLimit:o,allowNegativeValue:!1,onBlur:e=>{j(void 0),h&&h(e)},onFocus:e=>{j("sc"),p&&p(e)},onValueChange:e=>{N(e||"")}}),u&&g.siaCentral&&(0,x.jsx)(fu,{...m,"data-testid":"fiatInput",size:s,variant:"ghost",focus:"none",value:"NaN"!==_?_:"",units:g.currency.label,decimalsLimit:i,allowNegativeValue:!1,placeholder:"".concat(g.currency.prefix).concat(w?w.times(r).toFixed(i):"0.42"),prefix:f||g.currency.prefix,onFocus:e=>{j("fiat"),p&&p(e)},onBlur:e=>{j(void 0),h&&h(e)},onValueChange:e=>{O(e||"")}})]})});function fx(e){return(null==e?void 0:e.replace(/,/g,"."))||""}function fb(e){let{children:t}=e;return(0,x.jsx)(s4,{content:t,children:(0,x.jsx)("div",{className:"relative items-center inline mx-1",children:(0,x.jsx)(tq,{color:"subtle",children:(0,x.jsx)(s6.RdX,{className:"scale-75"})})})})}function fw(e){let{values:t,options:n,onChange:r}=e;return(0,x.jsx)("div",{className:"flex flex-wrap gap-1",children:n.map(e=>(0,x.jsx)(s5,{variant:t.includes(e.value)?"active":"inactive",onClick:()=>{r(e.value)},children:e.label},e.value))})}let fE=(0,ea.j)(["font-sans","font-normal","tabular-nums","flex-shrink-0","rounded","flex items-center","bg-white dark:bg-graydark-200","hover:bg-gray-50 dark:hover:bg-graydark-300","disabled:bg-gray-200 disabled:dark:bg-graydark-200","autofill:bg-blue-100 autofill:dark:bg-blue-800","border","focus-within:z-10","focus-within:ring ring-blue-500 dark:ring-blue-200","text-gray-1100 dark:text-white","[&>select:disabled]:text-gray-600 [&>select:disabled]:dark:text-graydark-700"],{variants:{size:{small:"h-7 text-sm px-1",medium:"h-10 text-base px-3",large:"h-12 text-lg px-3"},state:{default:["border-gray-400 dark:border-graydark-400","enabled:hover:border-gray-500 enabled:hover:dark:border-graydark-500"],invalid:["border-red-500 dark:border-red-400"],valid:["border-green-500 dark:border-green-400"]}},defaultVariants:{state:"default",size:"small"}}),fj=b.forwardRef((e,t)=>{let{size:n,state:r,icon:i,className:o,...a}=e;return(0,x.jsxs)("div",{className:fE({size:n,state:r,className:o}),children:[i,(0,x.jsx)("select",{ref:t,...a,className:"appearance-none flex-1 bg-transparent outline-none w-full h-full pl-1 pr-1"}),(0,x.jsx)(s6.Cp0,{className:"pointer-events-none scale-75"})]})}),fk=b.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,x.jsx)("option",{ref:t,...r,className:(0,ea.cx)("bg-white dark:bg-graydark-200","text-gray-1100 dark:text-white",n)})}),fS=(0,ea.j)(["bg-gray-300 dark:bg-graydark-300","relative","overflow-hidden","animate-pulse","rounded"]);function f_(e){let{className:t}=e;return(0,x.jsx)("div",{className:fS({className:t})})}let fO=(0,ea.j)(["rounded-full flex-shrink-0"],{variants:{size:{default:"w-2 h-2"}},defaultVariants:{size:"default"}}),fC=b.forwardRef((e,t)=>{let{size:n,className:r,...i}=e;return(0,x.jsx)("div",{ref:t,className:fO({size:n,className:r}),...i})}),fM="Switch",[fA,fT]=(0,j.b)(fM),[fP,fN]=fA(fM),fR=(0,b.forwardRef)((e,t)=>{let{__scopeSwitch:n,"aria-labelledby":r,name:i,checked:o,defaultChecked:a,required:s,disabled:l,value:u="on",onCheckedChange:c,...d}=e,[f,h]=(0,b.useState)(null),p=(0,k.e)(t,e=>h(e)),m=c$(f),v=(0,b.useRef)(!1),g=!f||!!f.closest("form"),[y=!1,x]=(0,C.T)({prop:o,defaultProp:a,onChange:c});return(0,b.createElement)(fP,{scope:n,checked:y,disabled:l},(0,b.createElement)(M.WV.button,(0,E.Z)({type:"button",role:"switch","aria-checked":y,"aria-labelledby":r||m,"aria-required":s,"data-state":fF(y),"data-disabled":l?"":void 0,disabled:l,value:u},d,{ref:p,onClick:(0,O.M)(e.onClick,e=>{x(e=>!e),g&&(v.current=e.isPropagationStopped(),v.current||e.stopPropagation())})})),g&&(0,b.createElement)(fL,{control:f,bubbles:!v.current,name:i,value:u,checked:y,required:s,disabled:l,style:{transform:"translateX(-100%)"}}))}),fD=(0,b.forwardRef)((e,t)=>{let{__scopeSwitch:n,...r}=e,i=fN("SwitchThumb",n);return(0,b.createElement)(M.WV.span,(0,E.Z)({"data-state":fF(i.checked),"data-disabled":i.disabled?"":void 0},r,{ref:t}))}),fL=e=>{let{control:t,checked:n,bubbles:r=!0,...i}=e,o=(0,b.useRef)(null),a=dO(n),s=tt(t);return(0,b.useEffect)(()=>{let e=o.current,t=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(t,"checked"),s=i.set;if(a!==n&&s){let t=new Event("click",{bubbles:r});s.call(e,n),e.dispatchEvent(t)}},[a,n,r]),(0,b.createElement)("input",(0,E.Z)({type:"checkbox","aria-hidden":!0,defaultChecked:n},i,{tabIndex:-1,ref:o,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function fF(e){return e?"checked":"unchecked"}let fV=(0,ea.j)(["absolute left-0 rounded-full","transition-transform","bg-white dark:bg-graydark-500"],{variants:{size:{small:["w-3 h-3","translate-x-px","data-[state=checked]:translate-x-[9px]"],medium:["w-5 h-5","translate-x-0.5","data-[state=checked]:translate-x-[20px]"]}},defaultVariants:{size:"small"}}),fz=(0,ea.j)(["select-none outline-none","relative inline-flex items-center justify-center","m-0 rounded-full","focus:ring ring-blue-500 dark:ring-blue-200","border","bg-gray-300 dark:bg-graydark-50","autofill:bg-blue-100 autofill:dark:bg-blue-800","border-gray-400 dark:border-graydark-400","enabled:hover:border-gray-500 enabled:hover:dark:border-graydark-500","disabled:cursor-default","enabled:data-[state=checked]:bg-green-600 dark:enabled:data-[state=checked]:bg-green-500","disabled:data-[state=checked]:bg-green-600/50 dark:disabled:data-[state=checked]:bg-green-500/50"],{variants:{size:{small:"w-6 h-4",medium:"w-11 h-6"},state:{default:["border-gray-400 dark:border-graydark-400","enabled:hover:border-gray-500 enabled:hover:dark:border-graydark-500"],invalid:["border-red-500 dark:border-red-400"],valid:["border-green-500 dark:border-green-400"]}},defaultVariants:{size:"small",state:"default"}}),fI=(0,b.forwardRef)((e,t)=>{let{size:n,state:r,className:i,children:o,...a}=e;return(0,x.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,x.jsx)(fR,{className:fz({size:n,state:r,className:i}),...a,ref:t,children:(0,x.jsx)(fD,{className:fV({size:n})})}),o&&(0,x.jsx)(tq,{color:a.disabled?"subtle":"contrast",children:o})]})}),fZ=(0,b.forwardRef)((e,t)=>{let{children:n,...r}=e,i=b.Children.toArray(n),o=i.find(fU);if(o){let e=o.props.children,n=i.map(t=>t!==o?t:b.Children.count(e)>1?b.Children.only(null):(0,b.isValidElement)(e)?e.props.children:null);return(0,b.createElement)(fB,(0,E.Z)({},r,{ref:t}),(0,b.isValidElement)(e)?(0,b.cloneElement)(e,void 0,n):null)}return(0,b.createElement)(fB,(0,E.Z)({},r,{ref:t}),n)});fZ.displayName="Slot";let fB=(0,b.forwardRef)((e,t)=>{let{children:n,...r}=e;return(0,b.isValidElement)(n)?(0,b.cloneElement)(n,{...function(e,t){let n={...t};for(let r in t){let i=e[r],o=t[r],a=/^on[A-Z]/.test(r);a?i&&o?n[r]=(...e)=>{o(...e),i(...e)}:i&&(n[r]=i):"style"===r?n[r]={...i,...o}:"className"===r&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props),ref:(0,k.F)(t,n.ref)}):b.Children.count(n)>1?b.Children.only(null):null});fB.displayName="SlotClone";let fH=({children:e})=>(0,b.createElement)(b.Fragment,null,e);function fU(e){return(0,b.isValidElement)(e)&&e.type===fH}let fW=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let n=(0,b.forwardRef)((e,n)=>{let{asChild:r,...i}=e,o=r?fZ:t;return(0,b.useEffect)(()=>{window[Symbol.for("radix-ui")]=!0},[]),(0,b.createElement)(o,(0,E.Z)({},i,{ref:n}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),fq=(0,b.forwardRef)((e,t)=>{let{children:n,width:r=10,height:i=5,...o}=e;return(0,b.createElement)(fW.svg,(0,E.Z)({},o,{ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:(0,b.createElement)("polygon",{points:"0,0 30,0 15,10"}))}),f$="Popper",[fY,fG]=(0,j.b)(f$),[fX,fK]=fY(f$),fQ=(0,b.forwardRef)((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,o=fK("PopperAnchor",n),a=(0,b.useRef)(null),s=(0,k.e)(t,a);return(0,b.useEffect)(()=>{o.onAnchorChange((null==r?void 0:r.current)||a.current)}),r?null:(0,b.createElement)(fW.div,(0,E.Z)({},i,{ref:s}))}),fJ="PopperContent",[f0,f1]=fY(fJ),[f2,f4]=fY(fJ,{hasParent:!1,positionUpdateFns:new Set}),f3=(0,b.forwardRef)((e,t)=>{var n,r,i,o,a,s,l,u,c;let{__scopePopper:d,side:f="bottom",sideOffset:h=0,align:p="center",alignOffset:m=0,arrowPadding:v=0,collisionBoundary:g=[],collisionPadding:y=0,sticky:x="partial",hideWhenDetached:w=!1,avoidCollisions:E=!0,onPlaced:j,...S}=e,_=fK(fJ,d),[O,C]=(0,b.useState)(null),M=(0,k.e)(t,e=>C(e)),[T,P]=(0,b.useState)(null),N=tt(T),R=null!==(n=null==N?void 0:N.width)&&void 0!==n?n:0,D=null!==(r=null==N?void 0:N.height)&&void 0!==r?r:0,L="number"==typeof y?y:{top:0,right:0,bottom:0,left:0,...y},F=Array.isArray(g)?g:[g],V=F.length>0,z={padding:L,boundary:F.filter(f8),altBoundary:V},{reference:I,floating:Z,strategy:B,x:H,y:U,placement:W,middlewareData:q,update:$}=e7({strategy:"fixed",placement:f+("center"!==p?"-"+p:""),whileElementsMounted:e3,middleware:[f7(),eM({mainAxis:h+D,alignmentAxis:m}),E?eT({mainAxis:!0,crossAxis:!1,limiter:"partial"===x?eP():void 0,...z}):void 0,T?e9({element:T,padding:v}):void 0,E?eS({...z}):void 0,{name:"size",options:c={...z,apply:({elements:e,availableWidth:t,availableHeight:n})=>{e.floating.style.setProperty("--radix-popper-available-width",`${t}px`),e.floating.style.setProperty("--radix-popper-available-height",`${n}px`)}},async fn(e){let t,n;let{placement:r,rects:i,platform:o,elements:a}=e,{apply:s,...l}=c,u=await ev(e,l),d=el(r),f=eu(r);"top"===d||"bottom"===d?(t=d,n=f===(await (null==o.isRTL?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(n=d,t="end"===f?"top":"bottom");let h=ey(u.left,0),p=ey(u.right,0),m=ey(u.top,0),v=ey(u.bottom,0),g={availableHeight:i.floating.height-(["left","right"].includes(r)?2*(0!==m||0!==v?m+v:ey(u.top,u.bottom)):u[t]),availableWidth:i.floating.width-(["top","bottom"].includes(r)?2*(0!==h||0!==p?h+p:ey(u.left,u.right)):u[n])},y=await o.getDimensions(a.floating);null==s||s({...e,...g});let x=await o.getDimensions(a.floating);return y.width!==x.width||y.height!==x.height?{reset:{rects:!0}}:{}}},f9({arrowWidth:R,arrowHeight:D}),w?eC({strategy:"referenceHidden"}):void 0].filter(f6)});(0,A.b)(()=>{I(_.anchor)},[I,_.anchor]);let Y=null!==H&&null!==U,[G,X]=he(W),K=(0,s9.W)(j);(0,A.b)(()=>{Y&&(null==K||K())},[Y,K]);let Q=null===(i=q.arrow)||void 0===i?void 0:i.x,J=null===(o=q.arrow)||void 0===o?void 0:o.y,ee=(null===(a=q.arrow)||void 0===a?void 0:a.centerOffset)!==0,[et,en]=(0,b.useState)();(0,A.b)(()=>{O&&en(window.getComputedStyle(O).zIndex)},[O]);let{hasParent:er,positionUpdateFns:ei}=f4(fJ,d),eo=!er;(0,b.useLayoutEffect)(()=>{if(!eo)return ei.add($),()=>{ei.delete($)}},[eo,ei,$]),(0,A.b)(()=>{eo&&Y&&Array.from(ei).reverse().forEach(e=>requestAnimationFrame(e))},[eo,Y,ei]);let ea={"data-side":G,"data-align":X,...S,ref:M,style:{...S.style,animation:Y?void 0:"none",opacity:null!==(s=q.hide)&&void 0!==s&&s.referenceHidden?0:void 0}};return(0,b.createElement)("div",{ref:Z,"data-radix-popper-content-wrapper":"",style:{position:B,left:0,top:0,transform:Y?`translate3d(${Math.round(H)}px, ${Math.round(U)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:et,"--radix-popper-transform-origin":[null===(l=q.transformOrigin)||void 0===l?void 0:l.x,null===(u=q.transformOrigin)||void 0===u?void 0:u.y].join(" ")},dir:e.dir},(0,b.createElement)(f0,{scope:d,placedSide:G,onArrowChange:P,arrowX:Q,arrowY:J,shouldHideArrow:ee},eo?(0,b.createElement)(f2,{scope:d,hasParent:!0,positionUpdateFns:ei},(0,b.createElement)(fW.div,ea)):(0,b.createElement)(fW.div,ea)))}),f5={top:"bottom",right:"left",bottom:"top",left:"right"};function f6(e){return void 0!==e}function f8(e){return null!==e}let f7=()=>({name:"anchorCssProperties",fn(e){let{rects:t,elements:n}=e,{width:r,height:i}=t.reference;return n.floating.style.setProperty("--radix-popper-anchor-width",`${r}px`),n.floating.style.setProperty("--radix-popper-anchor-height",`${i}px`),{}}}),f9=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;let{placement:s,rects:l,middlewareData:u}=t,c=(null===(n=u.arrow)||void 0===n?void 0:n.centerOffset)!==0,d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[h,p]=he(s),m={start:"0%",center:"50%",end:"100%"}[p],v=(null!==(r=null===(i=u.arrow)||void 0===i?void 0:i.x)&&void 0!==r?r:0)+d/2,g=(null!==(o=null===(a=u.arrow)||void 0===a?void 0:a.y)&&void 0!==o?o:0)+f/2,y="",x="";return"bottom"===h?(y=c?m:`${v}px`,x=`${-f}px`):"top"===h?(y=c?m:`${v}px`,x=`${l.floating.height+f}px`):"right"===h?(y=`${-f}px`,x=c?m:`${g}px`):"left"===h&&(y=`${l.floating.width+f}px`,x=c?m:`${g}px`),{data:{x:y,y:x}}}});function he(e){let[t,n="center"]=e.split("-");return[t,n]}let ht=e=>{let{__scopePopper:t,children:n}=e,[r,i]=(0,b.useState)(null);return(0,b.createElement)(fX,{scope:t,anchor:r,onAnchorChange:i},n)},hn=(0,b.forwardRef)((e,t)=>{var n;let{container:r=null==globalThis?void 0:null===(n=globalThis.document)||void 0===n?void 0:n.body,...i}=e;return r?e6.createPortal((0,b.createElement)(fW.div,(0,E.Z)({},i,{ref:t})),r):null}),hr="dismissableLayer.update",hi=(0,b.createContext)({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ho=(0,b.forwardRef)((e,t)=>{var n;let{disableOutsidePointerEvents:i=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,onDismiss:u,...c}=e,d=(0,b.useContext)(hi),[f,h]=(0,b.useState)(null),p=null!==(n=null==f?void 0:f.ownerDocument)&&void 0!==n?n:null==globalThis?void 0:globalThis.document,[,m]=(0,b.useState)({}),v=(0,k.e)(t,e=>h(e)),g=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),x=g.indexOf(y),w=f?g.indexOf(f):-1,j=d.layersWithOutsidePointerEventsDisabled.size>0,S=w>=x,_=function(e,t=null==globalThis?void 0:globalThis.document){let n=(0,s9.W)(e),r=(0,b.useRef)(!1),i=(0,b.useRef)(()=>{});return(0,b.useEffect)(()=>{let e=e=>{if(e.target&&!r.current){let r={originalEvent:e};function o(){hs("dismissableLayer.pointerDownOutside",n,r,{discrete:!0})}"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=o,t.addEventListener("click",i.current,{once:!0})):o()}r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}(e=>{let t=e.target,n=[...d.branches].some(e=>e.contains(t));!S||n||(null==a||a(e),null==l||l(e),e.defaultPrevented||null==u||u())},p),C=function(e,t=null==globalThis?void 0:globalThis.document){let n=(0,s9.W)(e),r=(0,b.useRef)(!1);return(0,b.useEffect)(()=>{let e=e=>{e.target&&!r.current&&hs("dismissableLayer.focusOutside",n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}(e=>{let t=e.target,n=[...d.branches].some(e=>e.contains(t));n||(null==s||s(e),null==l||l(e),e.defaultPrevented||null==u||u())},p);return!function(e,t=null==globalThis?void 0:globalThis.document){let n=(0,s9.W)(e);(0,b.useEffect)(()=>{let e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)},[n,t])}(e=>{let t=w===d.layers.size-1;t&&(null==o||o(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))},p),(0,b.useEffect)(()=>{if(f)return i&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(r=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),ha(),()=>{i&&1===d.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=r)}},[f,p,i,d]),(0,b.useEffect)(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),ha())},[f,d]),(0,b.useEffect)(()=>{let e=()=>m({});return document.addEventListener(hr,e),()=>document.removeEventListener(hr,e)},[]),(0,b.createElement)(fW.div,(0,E.Z)({},c,{ref:v,style:{pointerEvents:j?S?"auto":"none":void 0,...e.style},onFocusCapture:(0,O.M)(e.onFocusCapture,C.onFocusCapture),onBlurCapture:(0,O.M)(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:(0,O.M)(e.onPointerDownCapture,_.onPointerDownCapture)}))});function ha(){let e=new CustomEvent(hr);document.dispatchEvent(e)}function hs(e,t,n,{discrete:r}){let i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});(t&&i.addEventListener(e,t,{once:!0}),r)?i&&(0,e6.flushSync)(()=>i.dispatchEvent(o)):i.dispatchEvent(o)}let hl="HoverCard",[hu,hc]=(0,j.b)(hl,[fG]),hd=fG(),[hf,hh]=hu(hl),hp=(0,b.forwardRef)((e,t)=>{let{__scopeHoverCard:n,...r}=e,i=hh("HoverCardTrigger",n),o=hd(n);return(0,b.createElement)(fQ,(0,E.Z)({asChild:!0},o),(0,b.createElement)(fW.a,(0,E.Z)({"data-state":i.open?"open":"closed"},r,{ref:t,onPointerEnter:(0,O.M)(e.onPointerEnter,hw(i.onOpen)),onPointerLeave:(0,O.M)(e.onPointerLeave,hw(i.onClose)),onFocus:(0,O.M)(e.onFocus,i.onOpen),onBlur:(0,O.M)(e.onBlur,i.onClose),onTouchStart:(0,O.M)(e.onTouchStart,e=>e.preventDefault())})))}),hm="HoverCardPortal",[hv,hg]=hu(hm,{forceMount:void 0}),hy="HoverCardContent",hx=(0,b.forwardRef)((e,t)=>{let n=hg(hy,e.__scopeHoverCard),{forceMount:r=n.forceMount,...i}=e,o=hh(hy,e.__scopeHoverCard);return(0,b.createElement)(T.z,{present:r||o.open},(0,b.createElement)(hb,(0,E.Z)({"data-state":o.open?"open":"closed"},i,{onPointerEnter:(0,O.M)(e.onPointerEnter,hw(o.onOpen)),onPointerLeave:(0,O.M)(e.onPointerLeave,hw(o.onClose)),ref:t})))}),hb=(0,b.forwardRef)((e,t)=>{let{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,...l}=e,u=hh(hy,n),c=hd(n),d=(0,b.useRef)(null),f=(0,k.e)(t,d),[h,p]=(0,b.useState)(!1);return(0,b.useEffect)(()=>{if(h){let e=document.body;return i=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=i,e.style.webkitUserSelect=i}}},[h]),(0,b.useEffect)(()=>{if(d.current){let e=()=>{p(!1),u.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var e;let t=(null===(e=document.getSelection())||void 0===e?void 0:e.toString())!=="";t&&(u.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerup",e),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!1}}},[u.isPointerDownOnContentRef,u.hasSelectionRef]),(0,b.useEffect)(()=>{if(d.current){let e=function(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}(d.current);e.forEach(e=>e.setAttribute("tabindex","-1"))}}),(0,b.createElement)(ho,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:s,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:(0,O.M)(a,e=>{e.preventDefault()}),onDismiss:u.onDismiss},(0,b.createElement)(f3,(0,E.Z)({},c,l,{onPointerDown:(0,O.M)(l.onPointerDown,e=>{e.currentTarget.contains(e.target)&&p(!0),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!0}),ref:f,style:{...l.style,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)",userSelect:h?"text":void 0,WebkitUserSelect:h?"text":void 0}})))});function hw(e){return t=>"touch"===t.pointerType?void 0:e()}let hE=e=>{let{__scopeHoverCard:t,children:n,open:r,defaultOpen:i,onOpenChange:o,openDelay:a=700,closeDelay:s=300}=e,l=hd(t),u=(0,b.useRef)(0),c=(0,b.useRef)(0),d=(0,b.useRef)(!1),f=(0,b.useRef)(!1),[h=!1,p]=(0,C.T)({prop:r,defaultProp:i,onChange:o}),m=(0,b.useCallback)(()=>{clearTimeout(c.current),u.current=window.setTimeout(()=>p(!0),a)},[a,p]),v=(0,b.useCallback)(()=>{clearTimeout(u.current),d.current||f.current||(c.current=window.setTimeout(()=>p(!1),s))},[s,p]),g=(0,b.useCallback)(()=>p(!1),[p]);return(0,b.useEffect)(()=>()=>{clearTimeout(u.current),clearTimeout(c.current)},[]),(0,b.createElement)(hf,{scope:t,open:h,onOpenChange:p,onOpen:m,onClose:v,onDismiss:g,hasSelectionRef:d,isPointerDownOnContentRef:f},(0,b.createElement)(ht,l,n))},hj=e=>{let{__scopeHoverCard:t,forceMount:n,children:r,container:i}=e,o=hh(hm,t);return(0,b.createElement)(hv,{scope:t,forceMount:n},(0,b.createElement)(T.z,{present:n||o.open},(0,b.createElement)(hn,{asChild:!0,container:i},r)))},hk=(0,ea.j)(["relative","z-10","data-[side=top]:bottom-1","data-[side=top]:origin-bottom","data-[side=bottom]:top-1","data-[side=bottom]:origin-top","data-[side=left]:right-1","data-[side=left]:origin-right","data-[side=right]:left-1","data-[side=right]:origin-left"]),hS=(0,ea.cx)(tY(),"max-w-sm","py-0.5","px-1"),h_={show:{opacity:[0,1],scale:[.95,1],transition:{duration:.1,ease:"easeOut"}},exit:{opacity:[1,0],scale:[1,.95],transition:{duration:.1,ease:"easeIn"}}},hO=b.forwardRef((e,t)=>{let{trigger:n,children:r,rootProps:i,contentProps:o}=e,{className:a,...s}=o||{},{open:l,onOpenChange:u}=s1({open:null==i?void 0:i.open,onOpenChange:null==i?void 0:i.onOpenChange});return(0,x.jsxs)(hE,{open:l,onOpenChange:u,...i,children:[n&&(0,x.jsx)(hp,{asChild:!0,children:n}),(0,x.jsx)(ny,{children:l?(0,x.jsx)(hj,{forceMount:!0,children:(0,x.jsx)(hx,{asChild:!0,forceMount:!0,ref:t,...s,children:(0,x.jsx)(s0.div,{variants:h_,initial:"init",animate:"show",exit:"exit",className:hk(),children:(0,x.jsx)("div",{className:(0,ea.cx)(hS,a),children:r})})})}):null})]})});function hC(e,t=[]){let n=[],r=()=>{let t=n.map(e=>(0,b.createContext)(e));return function(n){let r=(null==n?void 0:n[e])||t;return(0,b.useMemo)(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return r.scopeName=e,[function(t,r){let i=(0,b.createContext)(r),o=n.length;function a(t){let{scope:n,children:r,...a}=t,s=(null==n?void 0:n[e][o])||i,l=(0,b.useMemo)(()=>a,Object.values(a));return(0,b.createElement)(s.Provider,{value:l},r)}return n=[...n,r],a.displayName=t+"Provider",[a,function(n,a){let s=(null==a?void 0:a[e][o])||i,l=(0,b.useContext)(s);if(l)return l;if(void 0!==r)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e),o=i[`__scope${r}`];return{...t,...o}},{});return(0,b.useMemo)(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}(r,...t)]}function hM(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function hA(...e){return t=>e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}function hT(...e){return(0,b.useCallback)(hA(...e),e)}let hP=(0,b.forwardRef)((e,t)=>{let{children:n,...r}=e,i=b.Children.toArray(n),o=i.find(hD);if(o){let e=o.props.children,n=i.map(t=>t!==o?t:b.Children.count(e)>1?b.Children.only(null):(0,b.isValidElement)(e)?e.props.children:null);return(0,b.createElement)(hN,(0,E.Z)({},r,{ref:t}),(0,b.isValidElement)(e)?(0,b.cloneElement)(e,void 0,n):null)}return(0,b.createElement)(hN,(0,E.Z)({},r,{ref:t}),n)});hP.displayName="Slot";let hN=(0,b.forwardRef)((e,t)=>{let{children:n,...r}=e;return(0,b.isValidElement)(n)?(0,b.cloneElement)(n,{...function(e,t){let n={...t};for(let r in t){let i=e[r],o=t[r],a=/^on[A-Z]/.test(r);a?i&&o?n[r]=(...e)=>{o(...e),i(...e)}:i&&(n[r]=i):"style"===r?n[r]={...i,...o}:"className"===r&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props),ref:t?hA(t,n.ref):n.ref}):b.Children.count(n)>1?b.Children.only(null):null});hN.displayName="SlotClone";let hR=({children:e})=>(0,b.createElement)(b.Fragment,null,e);function hD(e){return(0,b.isValidElement)(e)&&e.type===hR}let hL=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let n=(0,b.forwardRef)((e,n)=>{let{asChild:r,...i}=e,o=r?hP:t;return(0,b.useEffect)(()=>{window[Symbol.for("radix-ui")]=!0},[]),(0,b.createElement)(o,(0,E.Z)({},i,{ref:n}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function hF(e){let t=(0,b.useRef)(e);return(0,b.useEffect)(()=>{t.current=e}),(0,b.useMemo)(()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)},[])}let hV=(null==globalThis?void 0:globalThis.document)?b.useLayoutEffect:()=>{},hz=e=>{let{present:t,children:n}=e,r=function(e){var t;let[n,r]=(0,b.useState)(),i=(0,b.useRef)({}),o=(0,b.useRef)(e),a=(0,b.useRef)("none"),s=e?"mounted":"unmounted",[l,u]=(t={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},(0,b.useReducer)((e,n)=>{let r=t[e][n];return null!=r?r:e},s));return(0,b.useEffect)(()=>{let e=hI(i.current);a.current="mounted"===l?e:"none"},[l]),hV(()=>{let t=i.current,n=o.current,r=n!==e;if(r){let r=a.current,i=hI(t);e?u("MOUNT"):"none"===i||(null==t?void 0:t.display)==="none"?u("UNMOUNT"):n&&r!==i?u("ANIMATION_OUT"):u("UNMOUNT"),o.current=e}},[e,u]),hV(()=>{if(n){let e=e=>{let t=hI(i.current),r=t.includes(e.animationName);e.target===n&&r&&(0,e6.flushSync)(()=>u("ANIMATION_END"))},t=e=>{e.target===n&&(a.current=hI(i.current))};return n.addEventListener("animationstart",t),n.addEventListener("animationcancel",e),n.addEventListener("animationend",e),()=>{n.removeEventListener("animationstart",t),n.removeEventListener("animationcancel",e),n.removeEventListener("animationend",e)}}u("ANIMATION_END")},[n,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:(0,b.useCallback)(e=>{e&&(i.current=getComputedStyle(e)),r(e)},[])}}(t),i="function"==typeof n?n({present:r.isPresent}):b.Children.only(n),o=hT(r.ref,i.ref),a="function"==typeof n;return a||r.isPresent?(0,b.cloneElement)(i,{ref:o}):null};function hI(e){return(null==e?void 0:e.animationName)||"none"}hz.displayName="Presence";let hZ=w["useId".toString()]||(()=>void 0),hB=0;function hH(e){let t=e+"CollectionProvider",[n,r]=hC(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=e+"CollectionSlot",s=b.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=o(a,n),s=hT(t,i.collectionRef);return b.createElement(hP,{ref:s},r)}),l=e+"CollectionItemSlot",u="data-radix-collection-item",c=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,a=b.useRef(null),s=hT(t,a),c=o(l,n);return b.useEffect(()=>(c.itemMap.set(a,{ref:a,...i}),()=>void c.itemMap.delete(a))),b.createElement(hP,{[u]:"",ref:s},r)});return[{Provider:e=>{let{scope:t,children:n}=e,r=b.useRef(null),o=b.useRef(new Map).current;return b.createElement(i,{scope:t,itemMap:o,collectionRef:r},n)},Slot:s,ItemSlot:c},function(t){let n=o(e+"CollectionConsumer",t),r=b.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${u}]`)),r=Array.from(n.itemMap.values()),i=r.sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current));return i},[n.collectionRef,n.itemMap]);return r},r]}let hU="dismissableLayer.update",hW=(0,b.createContext)({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),hq=(0,b.forwardRef)((e,t)=>{var n;let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,onDismiss:u,...c}=e,d=(0,b.useContext)(hW),[f,h]=(0,b.useState)(null),p=null!==(n=null==f?void 0:f.ownerDocument)&&void 0!==n?n:null==globalThis?void 0:globalThis.document,[,m]=(0,b.useState)({}),v=hT(t,e=>h(e)),g=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),x=g.indexOf(y),w=f?g.indexOf(f):-1,j=d.layersWithOutsidePointerEventsDisabled.size>0,k=w>=x,S=function(e,t=null==globalThis?void 0:globalThis.document){let n=hF(e),r=(0,b.useRef)(!1),i=(0,b.useRef)(()=>{});return(0,b.useEffect)(()=>{let e=e=>{if(e.target&&!r.current){let r={originalEvent:e};function o(){hY("dismissableLayer.pointerDownOutside",n,r,{discrete:!0})}"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=o,t.addEventListener("click",i.current,{once:!0})):o()}r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}(e=>{let t=e.target,n=[...d.branches].some(e=>e.contains(t));!k||n||(null==a||a(e),null==l||l(e),e.defaultPrevented||null==u||u())},p),_=function(e,t=null==globalThis?void 0:globalThis.document){let n=hF(e),r=(0,b.useRef)(!1);return(0,b.useEffect)(()=>{let e=e=>{e.target&&!r.current&&hY("dismissableLayer.focusOutside",n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}(e=>{let t=e.target,n=[...d.branches].some(e=>e.contains(t));n||(null==s||s(e),null==l||l(e),e.defaultPrevented||null==u||u())},p);return!function(e,t=null==globalThis?void 0:globalThis.document){let n=hF(e);(0,b.useEffect)(()=>{let e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)},[n,t])}(e=>{let t=w===d.layers.size-1;t&&(null==i||i(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))},p),(0,b.useEffect)(()=>{if(f)return r&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(o=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),h$(),()=>{r&&1===d.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=o)}},[f,p,r,d]),(0,b.useEffect)(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),h$())},[f,d]),(0,b.useEffect)(()=>{let e=()=>m({});return document.addEventListener(hU,e),()=>document.removeEventListener(hU,e)},[]),(0,b.createElement)(hL.div,(0,E.Z)({},c,{ref:v,style:{pointerEvents:j?k?"auto":"none":void 0,...e.style},onFocusCapture:hM(e.onFocusCapture,_.onFocusCapture),onBlurCapture:hM(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:hM(e.onPointerDownCapture,S.onPointerDownCapture)}))});function h$(){let e=new CustomEvent(hU);document.dispatchEvent(e)}function hY(e,t,n,{discrete:r}){var i,o;let a=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?(i=a,o=s,i&&(0,e6.flushSync)(()=>i.dispatchEvent(o))):a.dispatchEvent(s)}(e,t)=>(0,b.createElement)(hL.span,(0,E.Z)({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));let hG="NavigationMenu",[hX,hK,hQ]=hH(hG),[hJ,h0,h1]=hH(hG),[h2,h4]=hC(hG,[hQ,h1]),[h3,h5]=h2(hG),[h6,h8]=h2(hG),[h7,h9]=h2("NavigationMenuItem"),pe=((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=h5("NavigationMenuIndicator",n),o=hK(n),[a,s]=(0,b.useState)(null),[l,u]=(0,b.useState)(null),c="horizontal"===i.orientation,d=!!i.value;(0,b.useEffect)(()=>{var e;let t=o(),n=null===(e=t.find(e=>e.value===i.value))||void 0===e?void 0:e.ref.current;n&&s(n)},[o,i.value]);let f=()=>{a&&u({size:c?a.offsetWidth:a.offsetHeight,offset:c?a.offsetLeft:a.offsetTop})};return pa(a,f),pa(i.indicatorTrack,f),l?(0,b.createElement)(hL.div,(0,E.Z)({"aria-hidden":!0,"data-state":d?"visible":"hidden","data-orientation":i.orientation},r,{ref:t,style:{position:"absolute",...c?{left:0,width:l.size+"px",transform:`translateX(${l.offset}px)`}:{top:0,height:l.size+"px",transform:`translateY(${l.offset}px)`},...r.style}})):null},"NavigationMenuContent"),pt=((e,t)=>{let n=h5(pe,e.__scopeNavigationMenu),{onViewportContentChange:r,onViewportContentRemove:i}=n;return hV(()=>{r(e.value,{ref:t,...e})},[e,t,r]),hV(()=>()=>i(e.value),[e.value,i]),null},"navigationMenu.rootContentDismiss"),pn=(0,b.forwardRef)((e,t)=>{let{__scopeNavigationMenu:n,value:r,triggerRef:i,focusProxyRef:o,wasEscapeCloseRef:a,onRootContentClose:s,onContentFocusOutside:l,...u}=e,c=h5(pe,n),d=(0,b.useRef)(null),f=hT(d,t),h=function(e,t){return`${e}-trigger-${t}`}(c.baseId,r),p=function(e,t){return`${e}-content-${t}`}(c.baseId,r),m=hK(n),v=(0,b.useRef)(null),{onItemDismiss:g}=c;(0,b.useEffect)(()=>{let e=d.current;if(c.isRootMenu&&e){let t=()=>{var t;g(),s(),e.contains(document.activeElement)&&(null===(t=i.current)||void 0===t||t.focus())};return e.addEventListener(pt,t),()=>e.removeEventListener(pt,t)}},[c.isRootMenu,e.value,i,g,s]);let y=(0,b.useMemo)(()=>{let e=m(),t=e.map(e=>e.value);"rtl"===c.dir&&t.reverse();let n=t.indexOf(c.value),i=t.indexOf(c.previousValue),o=r===c.value,a=i===t.indexOf(r);if(!o&&!a)return v.current;let s=(()=>{if(n!==i){if(o&&-1!==i)return n>i?"from-end":"from-start";if(a&&-1!==n)return n>i?"to-start":"to-end"}return null})();return v.current=s,s},[c.previousValue,c.value,c.dir,m,r]);return(0,b.createElement)(pr,{asChild:!0},(0,b.createElement)(hq,(0,E.Z)({id:p,"aria-labelledby":h,"data-motion":y,"data-orientation":c.orientation},u,{ref:f,onDismiss:()=>{var e;let t=new Event(pt,{bubbles:!0,cancelable:!0});null===(e=d.current)||void 0===e||e.dispatchEvent(t)},onFocusOutside:hM(e.onFocusOutside,e=>{var t;l();let n=e.target;null!==(t=c.rootNavigationMenu)&&void 0!==t&&t.contains(n)&&e.preventDefault()}),onPointerDownOutside:hM(e.onPointerDownOutside,e=>{var t;let n=e.target,r=m().some(e=>{var t;return null===(t=e.ref.current)||void 0===t?void 0:t.contains(n)}),i=c.isRootMenu&&(null===(t=c.viewport)||void 0===t?void 0:t.contains(n));(r||i||!c.isRootMenu)&&e.preventDefault()}),onKeyDown:hM(e.onKeyDown,e=>{let t=e.altKey||e.ctrlKey||e.metaKey,n="Tab"===e.key&&!t;if(n){let t=function(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}(e.currentTarget),n=document.activeElement,i=t.findIndex(e=>e===n),a=e.shiftKey,s=a?t.slice(0,i).reverse():t.slice(i+1,t.length);if(po(s))e.preventDefault();else{var r;null===(r=o.current)||void 0===r||r.focus()}}}),onEscapeKeyDown:hM(e.onEscapeKeyDown,e=>{a.current=!0})})))}),pr=((e,t)=>{let{__scopeNavigationMenu:n,children:r,...i}=e,o=h5("NavigationMenuViewport",n),a=hT(t,o.onViewportChange),s=h8(pe,e.__scopeNavigationMenu),[l,u]=(0,b.useState)(null),[c,d]=(0,b.useState)(null),f=l?(null==l?void 0:l.width)+"px":void 0,h=l?(null==l?void 0:l.height)+"px":void 0,p=!!o.value,m=p?o.value:o.previousValue;return pa(c,()=>{c&&u({width:c.offsetWidth,height:c.offsetHeight})}),(0,b.createElement)(hL.div,(0,E.Z)({"data-state":function(e){return e?"open":"closed"}(p),"data-orientation":o.orientation},i,{ref:a,style:{pointerEvents:!p&&o.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":f,"--radix-navigation-menu-viewport-height":h,...i.style},onPointerEnter:hM(e.onPointerEnter,o.onContentEnter),onPointerLeave:hM(e.onPointerLeave,function(e){return t=>"mouse"===t.pointerType?e(t):void 0}(o.onContentLeave))}),Array.from(s.items).map(([e,{ref:t,forceMount:n,...r}])=>{let i=m===e;return(0,b.createElement)(hz,{key:e,present:n||i},(0,b.createElement)(pn,(0,E.Z)({},r,{ref:hA(t,e=>{i&&e&&d(e)})})))}))},(0,b.forwardRef)((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=h5("FocusGroup",n);return(0,b.createElement)(hJ.Provider,{scope:n},(0,b.createElement)(hJ.Slot,{scope:n},(0,b.createElement)(hL.div,(0,E.Z)({dir:i.dir},r,{ref:t}))))})),pi=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"];(e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=h0(n),o=h5("FocusGroupItem",n);return(0,b.createElement)(hJ.ItemSlot,{scope:n},(0,b.createElement)(hL.button,(0,E.Z)({},r,{ref:t,onKeyDown:hM(e.onKeyDown,e=>{let t=["Home","End",...pi].includes(e.key);if(t){let t=i().map(e=>e.ref.current),n="rtl"===o.dir?"ArrowRight":"ArrowLeft";if([n,"ArrowUp","End"].includes(e.key)&&t.reverse(),pi.includes(e.key)){let n=t.indexOf(e.currentTarget);t=t.slice(n+1)}setTimeout(()=>po(t)),e.preventDefault()}})})))};function po(e){let t=document.activeElement;return e.some(e=>e===t||(e.focus(),document.activeElement!==t))}function pa(e,t){let n=hF(t);hV(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}var ps=n(38617);let pl=b.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,x.jsx)(dq,{...r,ref:t,className:(0,ea.cx)("select-none flex items-center rounded cursor-pointer","focus:ring ring-blue-500 dark:ring-blue-200","text-gray-700 dark:text-graydark-700","data-[state=checked]:text-gray-1100 data-[state=checked]:dark:text-white",n)})});function pu(e){let{className:t,tooltipClassName:n,tabIndex:r}=e,{theme:i,setTheme:o}=(0,ps.F)();return(0,x.jsxs)(dW,{value:i,tabIndex:r,className:(0,ea.cx)("flex gap-4",t),onValueChange:e=>o(e),children:[(0,x.jsx)(pl,{value:"system",children:(0,x.jsx)(s4,{className:n,sideOffset:16,content:"System",children:(0,x.jsx)(s6.$Iz,{})})}),(0,x.jsx)(pl,{value:"light",children:(0,x.jsx)(s4,{className:n,sideOffset:16,content:"Light",children:(0,x.jsx)(s6.JaG,{})})}),(0,x.jsx)(pl,{value:"dark",children:(0,x.jsx)(s4,{className:n,sideOffset:16,content:"Dark",children:(0,x.jsx)(s6.osk,{})})})]})}var pc=n(14582),pd=n(63739),pf=n(13980),ph=n.n(pf),pp=n(72779),pm=n.n(pp),pv=n(47440),pg=n(59309),py=n(19067),px=n(71220),pb=n(28142);function pw(e){return"bandwidth"in e?e.bandwidth():0}var pE=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function pj(){return(pj=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,pE),g=null!=m?m:(0,px.Z)(r,void 0===f?10:f),y=(null!=p?p:0)+pw(r)/2,x=g.map(function(e,t){var n,o=(null!=(n=(0,pb.Z)(r(e)))?n:0)+y;return{index:t,from:new py.Z({x:0,y:o}),to:new py.Z({x:i,y:o})}});return b.createElement(pg.Z,{className:pm()("visx-rows",c),top:void 0===t?0:t,left:void 0===n?0:n},d?d({lines:x}):x.map(function(e){var t=e.from,n=e.to,r=e.index;return b.createElement(pv.default,pj({key:"row-line-"+r,from:t,to:n,stroke:a,strokeWidth:l,strokeDasharray:u,style:h},v))}))}pk.propTypes={tickValues:ph().array,width:ph().number.isRequired};var pS=["top","left","scale","height","stroke","strokeWidth","strokeDasharray","className","numTicks","lineStyle","offset","tickValues","children"];function p_(){return(p_=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,pS),g=null!=p?p:(0,px.Z)(r,void 0===d?10:d),y=(null!=h?h:0)+pw(r)/2,x=g.map(function(e,t){var n,o=(null!=(n=(0,pb.Z)(r(e)))?n:0)+y;return{index:t,from:new py.Z({x:o,y:0}),to:new py.Z({x:o,y:i})}});return b.createElement(pg.Z,{className:pm()("visx-columns",c),top:void 0===t?0:t,left:void 0===n?0:n},m?m({lines:x}):x.map(function(e){var t=e.from,n=e.to,r=e.index;return b.createElement(pv.default,p_({key:"column-line-"+r,from:t,to:n,stroke:a,strokeWidth:l,strokeDasharray:u,style:f},v))}))}pO.propTypes={tickValues:ph().array,height:ph().number.isRequired};var pC=n(64183),pM=n(8597);function pA(e){var t=e.id,n=e.width,r=e.height,i=e.children;return b.createElement("defs",null,b.createElement("pattern",{id:t,width:n,height:r,patternUnits:"userSpaceOnUse"},i))}pA.propTypes={id:ph().string.isRequired,width:ph().number.isRequired,height:ph().number.isRequired,children:ph().node.isRequired};var pT={horizontal:"horizontal",vertical:"vertical",diagonal:"diagonal",diagonalRightToLeft:"diagonalRightToLeft"};function pP(e){var t=e.id,n=e.width,r=e.height,i=e.stroke,o=e.strokeWidth,a=e.strokeDasharray,s=e.strokeLinecap,l=void 0===s?"square":s,u=e.shapeRendering,c=void 0===u?"auto":u,d=e.orientation,f=void 0===d?["vertical"]:d,h=e.background,p=e.className,m=Array.isArray(f)?f:[f];return b.createElement(pA,{id:t,width:n,height:r},!!h&&b.createElement("rect",{className:pm()("visx-pattern-line-background"),width:n,height:r,fill:h}),m.map(function(e,n){return b.createElement("path",{key:"visx-"+t+"-line-"+e+"-"+n,className:pm()("visx-pattern-line",p),d:function(e){var t=e.height;switch(e.orientation){case pT.horizontal:return"M 0,"+t/2+" l "+t+",0";case pT.diagonal:return"M 0,"+t+" l "+t+","+-t+" M "+-t/4+","+t/4+" l "+t/2+","+-t/2+"\n M "+3/4*t+","+5/4*t+" l "+t/2+","+-t/2;case pT.diagonalRightToLeft:return"M 0,0 l "+t+","+t+"\n M "+-t/4+","+3/4*t+" l "+t/2+","+t/2+"\n M "+3/4*t+","+-t/4+" l "+t/2+","+t/2;case pT.vertical:default:return"M "+t/2+", 0 l 0, "+t}}({orientation:e,height:r}),stroke:i,strokeWidth:o,strokeDasharray:a,strokeLinecap:l,shapeRendering:c})}))}pP.propTypes={id:ph().string.isRequired,width:ph().number.isRequired,height:ph().number.isRequired,className:ph().string,background:ph().string,stroke:ph().string,strokeWidth:ph().oneOfType([ph().number,ph().string]),strokeDasharray:ph().oneOfType([ph().string,ph().number]),strokeLinecap:ph().oneOf(["square","butt","round","inherit"]),shapeRendering:ph().oneOfType([ph().string,ph().number]),orientation:ph().array};var pN=["tooltipOpen"];function pR(){return(pR=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,pD);return b.createElement("div",pL({ref:t,className:pm()("visx-tooltip",n),style:pL({top:null==r||null==l?r:r+l,left:null==i||null==a?i:i+a},m&&{position:"absolute"},!h&&c)},v),d)});function pz(){return(pz=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,pU),g=!1,y=!1;if(u&&l){var x=void 0===r?0:r,w=void 0===f?0:f;if(l.width){var E=x+o+u.width-l.width,j=u.width-x-o;g=E>0&&E>j}else{var k=x+o+u.width-window.innerWidth,S=u.width-x-o;g=k>0&&k>S}if(l.height){var _=w+s+u.height-l.height,O=u.height-w-s;y=_>0&&_>O}else y=w+s+u.height>window.innerHeight;x=g?x-u.width-o:x+o,w=y?w-u.height-s:w+s,t="translate("+(x=Math.round(x))+"px, "+(w=Math.round(w))+"px)"}return b.createElement(pV,pW({ref:m,style:pW({left:0,top:0,transform:t},!p&&d)},v),b.createElement(pH,{value:{isFlippedVertically:!y,isFlippedHorizontally:!g}},n))}pq.propTypes={nodeRef:ph().oneOfType([ph().string,ph().func,ph().object])};var p$=((Ez=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={rect:void 0,parentRect:void 0},n.nodeRef=b.createRef(),n.getRects=n.getRects.bind(function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n)),n}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,pI(t,e);var n=t.prototype;return n.componentDidMount=function(){var e,t=this;this.node=null!=(e=this.nodeRef)&&e.current?this.nodeRef.current:e6.findDOMNode(this),this.setState(function(){return t.getRects()})},n.getRects=function(){if(!this.node)return this.state;var e=this.node,t=e.parentNode;return{rect:e.getBoundingClientRect?e.getBoundingClientRect():pZ,parentRect:null!=t&&t.getBoundingClientRect?t.getBoundingClientRect():pZ}},n.render=function(){return b.createElement(pq,pz({nodeRef:this.nodeRef,getRects:this.getRects},this.state,this.props))},t}(b.PureComponent)).displayName="withBoundingRects("+(pq.displayName||"")+")",Ez),pY=n(99985);function pG(e,t){if("invert"in e&&void 0!==e.invert)return e.invert(t).valueOf();var n=e.range(),r=n[0],i=n[1],o=0,a=("step"in e&&void 0!==e.step?e.step():1)*(i-r)/Math.abs(i-r);if(a>0)for(;t>r+a*(o+1);)o+=1;else for(;t0?Math.min(e.dx,t.bounds.x1-a):Math.max(e.dx,t.bounds.x0-r),u=e.dy>0?Math.min(e.dy,t.bounds.y1-s):Math.max(e.dy,t.bounds.y0-i);return p3({},t,{isBrushing:!0,extent:p3({},t.extent,{x0:r+l,x1:a+l,y0:i+u,y1:s+u})})})},t.selectionDragEnd=function(){var e=t.props,n=e.updateBrush,r=e.onBrushEnd,i=e.onMoveSelectionChange;e.isControlled||n(function(e){var t=p3({},e,{isBrushing:!1,start:p3({},e.start,{x:Math.min(e.extent.x0,e.extent.x1),y:Math.min(e.extent.y0,e.extent.y1)}),end:p3({},e.end,{x:Math.max(e.extent.x0,e.extent.x1),y:Math.max(e.extent.y0,e.extent.y1)})});return r&&r(t),t}),i&&i()},t}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,p5(t,e),t.prototype.render=function(){var e=this.props,t=e.width,n=e.height,r=e.stageWidth,i=e.stageHeight,o=e.brush,a=e.disableDraggingSelection,s=e.onMouseLeave,l=e.onMouseMove,u=e.onMouseUp,c=e.onClick,d=e.selectedBoxStyle,f=e.isControlled,h=e.isDragInProgress;return b.createElement(pY.Z,{width:t,height:n,resetOnStart:!0,onDragStart:this.selectionDragStart,onDragMove:this.selectionDragMove,onDragEnd:this.selectionDragEnd,isDragging:f?h:void 0},function(e){var h=e.isDragging,p=e.dragStart,m=e.dragEnd,v=e.dragMove;return b.createElement("g",null,h&&b.createElement("rect",{width:r,height:i,fill:"transparent",onPointerUp:f?void 0:m,onPointerMove:v,onPointerLeave:f?void 0:m,style:p6}),b.createElement("rect",p3({x:Math.min(o.extent.x0,o.extent.x1),y:Math.min(o.extent.y0,o.extent.y1),width:t,height:n,className:"visx-brush-selection",onPointerDown:a?void 0:p,onPointerLeave:function(e){s&&s(e)},onPointerMove:function(e){v(e),l&&l(e)},onPointerUp:function(e){f||m(e),u&&u(e)},onClick:function(e){c&&c(e)},style:{pointerEvents:o.isBrushing||o.activeHandle?"none":"all",cursor:a?void 0:"move"}},d)))})},t}(b.Component);function p7(){return(p7=Object.assign?Object.assign.bind():function(e){for(var t=1;t0?Math.min(l,e.bounds.x1-o):Math.max(l,e.bounds.x0-n),c=u>0?Math.min(u,e.bounds.y1-a):Math.max(u,e.bounds.y0-r);return p7({},e,{isBrushing:!0,extent:p7({},e.extent,{x0:n+s,y0:r+c,x1:o+s,y1:a+c})})}),"select"===i&&n.updateBrush(function(e){var t=e.start,r=t.x,i=t.y,o={x:Math.min(Math.max(r+l,e.bounds.x0),e.bounds.x1),y:Math.min(Math.max(i+u,e.bounds.y0),e.bounds.y1)},a=n.getExtent(s,o);return p7({},e,{end:o,extent:a})})}},n.getExtent=function(e,t){var r=n.props,i=r.brushDirection,o=r.width,a=r.height;return{x0:"vertical"===i?0:Math.min(e.x||0,t.x||0),x1:"vertical"===i?o:Math.max(e.x||0,t.x||0),y0:"horizontal"===i?0:Math.min(e.y||0,t.y||0),y1:"horizontal"===i?a:Math.max(e.y||0,t.y||0)}},n.handleDragStart=function(e){var t=n.props,r=t.onBrushStart,i=t.left,o=t.top,a=t.inheritedMargin,s=t.useWindowMoveEvents,l=null!=a&&a.left?a.left:0,u=null!=a&&a.top?a.top:0,c={x:(e.x||0)+e.dx-i-l,y:(e.y||0)+e.dy-o-u},d=p7({},c);r&&r(c),n.updateBrush(function(t){return p7({},t,{start:c,end:d,extent:{x0:-1,x1:-1,y0:-1,y1:-1},isBrushing:!0,brushingType:"select",brushPageOffset:s?pK(e.event):void 0})})},n.handleBrushStart=function(e){var t=n.props,r=t.onBrushStart,i=t.left,o=t.top,a=t.inheritedMargin;if(r){var s=null!=a&&a.left?a.left:0,l=null!=a&&a.top?a.top:0;r({x:(e.x||0)+e.dx-i-s,y:(e.y||0)+e.dy-o-l})}},n.handleDragMove=function(e){var t=n.props,r=t.left,i=t.top,o=t.inheritedMargin,a=t.useWindowMoveEvents;if(e.isDragging&&!a){var s=(null==o?void 0:o.left)||0,l=(null==o?void 0:o.top)||0,u={x:(e.x||0)+e.dx-r-s,y:(e.y||0)+e.dy-i-l};n.updateBrush(function(e){var t=e.start,r=n.getExtent(t,u);return p7({},e,{end:u,extent:r})})}},n.handleDragEnd=function(){var e=n.props,t=e.onBrushEnd,r=e.resetOnEnd;e.useWindowMoveEvents||n.updateBrush(function(e){var i=e.extent,o=p7({},e,{start:{x:i.x0,y:i.y0},end:{x:i.x1,y:i.y1},isBrushing:!1,brushingType:void 0,activeHandle:null});return t&&t(o),r&&n.reset(),o})},n.getBrushWidth=function(){var e=n.state.extent,t=e.x0,r=e.x1;return Math.max(Math.max(t,r)-Math.min(t,r),0)},n.getBrushHeight=function(){var e=n.state.extent,t=e.y1,r=e.y0;return Math.max(Math.max(r,t)-Math.min(r,t),0)},n.handles=function(){var e=n.props.handleSize,t=n.state.extent,r=t.x0,i=t.x1,o=t.y0,a=t.y1,s=e/2,l=n.getBrushWidth(),u=n.getBrushHeight();return{top:{x:r-s,y:o-s,height:e,width:l+e},bottom:{x:r-s,y:a-s,height:e,width:l+e},right:{x:i-s,y:o-s,height:u+e,width:e},left:{x:r-s,y:o-s,height:u+e,width:e}}},n.corners=function(){var e=n.props.handleSize,t=n.state.extent,r=t.x0,i=t.x1,o=t.y0,a=t.y1,s=e/2;return{topLeft:{x:Math.min(r,i)-s,y:Math.min(o,a)-s,width:e,height:e},topRight:{x:Math.max(r,i)-s,y:Math.min(o,a)-s,width:e,height:e},bottomLeft:{x:Math.min(r,i)-s,y:Math.max(o,a)-s,width:e,height:e},bottomRight:{x:Math.max(r,i)-s,y:Math.max(o,a)-s,width:e,height:e}}},n.updateBrush=function(e){var t=n.props.onChange;n.setState(e,function(){t&&t(n.state)})},n.reset=function(){var e=n.props,t=e.width,r=e.height;n.updateBrush(function(){return{start:{x:0,y:0},end:{x:0,y:0},extent:{x0:-1,x1:-1,y0:-1,y1:-1},bounds:{x0:0,x1:t,y0:0,y1:r},isBrushing:!1,brushPageOffset:void 0,activeHandle:null,brushingType:void 0}})},n.handleBrushingTypeChange=function(e,t){n.updateBrush(function(n){var r=p7({},n,{brushingType:e,isBrushing:void 0!==e});return(t||void 0===e)&&(r.brushPageOffset=t),r})};var n,r=t.initialBrushPosition,i=r?n.getExtent(r.start,r.end):{x0:-1,x1:-1,y0:-1,y1:-1};return n.state={start:{x:Math.max(0,i.x0),y:Math.max(0,i.y0)},end:{x:Math.max(0,i.x1),y:Math.max(0,i.y1)},extent:i,bounds:{x0:0,x1:n.props.width,y0:0,y1:n.props.height},isBrushing:!1,brushingType:void 0,activeHandle:null},n}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,p9(t,e);var n=t.prototype;return n.componentDidUpdate=function(e){var t=this;(this.props.width!==e.width||this.props.height!==e.height)&&this.setState(function(n){var r=n.start,i=n.end,o=n.extent;if(!(-1===o.x0&&-1===o.x1&&-1===o.y0&&-1===o.y1)){var a=t.props.width/e.width,s=t.props.height/e.height;r={x:a*o.x0,y:s*o.y0},i={x:a*o.x1,y:s*o.y1},o=t.getExtent(r,i)}return{start:r,end:i,extent:o,bounds:{x0:0,x1:t.props.width,y0:0,y1:t.props.height}}})},n.componentDidMount=function(){this.props.useWindowMoveEvents&&(window.addEventListener("mouseup",this.handleWindowPointerUp),window.addEventListener("mousemove",this.handleWindowPointerMove))},n.componentWillUnmount=function(){this.props.useWindowMoveEvents&&(window.removeEventListener("mouseup",this.handleWindowPointerUp),window.removeEventListener("mousemove",this.handleWindowPointerMove))},n.render=function(){var e=this,t=this.state,n=t.start,r=t.end,i=this.props,o=i.top,a=i.left,s=i.width,l=i.height,u=i.onMouseLeave,c=i.onMouseUp,d=i.onMouseMove,f=i.onBrushEnd,h=i.onClick,p=i.resizeTriggerAreas,m=i.selectedBoxStyle,v=i.disableDraggingSelection,g=i.clickSensitivity,y=i.useWindowMoveEvents,x=i.renderBrushHandle,w=this.state.brushingType,E=this.handles(),j=this.corners(),k=this.getBrushWidth(),S=this.getBrushHeight(),_=new Set(p);return b.createElement(pg.Z,{className:"visx-brush",top:o,left:a},b.createElement(pY.Z,{width:s,height:l,resetOnStart:!0,onDragStart:this.handleDragStart,onDragMove:this.handleDragMove,onDragEnd:this.handleDragEnd,isDragging:y?"select"===w:void 0},function(t){var n=t.dragStart,r=t.isDragging,i=t.dragMove,o=t.dragEnd;return b.createElement(pc.Z,{className:"visx-brush-overlay",fill:"transparent",x:0,y:0,width:s,height:l,onDoubleClick:function(){return e.reset()},onClick:function(t){var n=e.mouseUpTime-e.mouseDownTime;h&&n=0||(i[n]=e[n]);return i}(e,ma),g=o,y=s,x=a,w=l;return void 0!==m&&!m||g||y||x||w||(g="0",y="0",x="0",w="1"),b.createElement("defs",null,b.createElement("linearGradient",ms({id:n,x1:g,y1:x,x2:y,y2:w,gradientTransform:h?"rotate("+h+")":p},v),!!t&&t,!t&&b.createElement("stop",{offset:void 0===u?"0%":u,stopColor:r,stopOpacity:void 0===c?1:c}),!t&&b.createElement("stop",{offset:void 0===d?"100%":d,stopColor:i,stopOpacity:void 0===f?1:f})))}function mu(e,t){return null==e||null==t?NaN:et?1:e>=t?0:NaN}function mc(e,t){return null==e||null==t?NaN:te?1:t>=e?0:NaN}function md(){return 0}function mf(e,t){let n,r;if(void 0===t)for(let t of e)null!=t&&(void 0===n?t>=t&&(n=r=t):(n>t&&(n=t),r=o&&(n=r=o):(n>o&&(n=o),r=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n=i)&&(n=i)}return n}ml.propTypes={id:ph().string.isRequired,from:ph().string,to:ph().string,x1:ph().oneOfType([ph().string,ph().number]),x2:ph().oneOfType([ph().string,ph().number]),y1:ph().oneOfType([ph().string,ph().number]),y2:ph().oneOfType([ph().string,ph().number]),fromOffset:ph().oneOfType([ph().string,ph().number]),fromOpacity:ph().oneOfType([ph().string,ph().number]),toOffset:ph().oneOfType([ph().string,ph().number]),toOpacity:ph().oneOfType([ph().string,ph().number]),rotate:ph().oneOfType([ph().string,ph().number]),transform:ph().string,children:ph().node,vertical:ph().bool};var mp=n(12436),mm=n.n(mp),mv=n(55746),mg=n(45742),my=n(27266),mx=["id","markerWidth","markerHeight","markerUnits","children"];function mb(){return(mb=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,mx);return b.createElement("defs",null,b.createElement("marker",mb({id:t,markerWidth:void 0===n?3:n,markerHeight:void 0===r?3:r,markerUnits:void 0===i?"userSpaceOnUse":i},a),o))}mw.propTypes={id:ph().string.isRequired,size:ph().number,markerWidth:ph().oneOfType([ph().string,ph().number]),markerHeight:ph().oneOfType([ph().string,ph().number]),markerUnits:ph().string,refX:ph().oneOfType([ph().string,ph().number]),refY:ph().oneOfType([ph().string,ph().number]),strokeWidth:ph().number,children:ph().node.isRequired};var mE=["id","size","strokeWidth"];function mj(){return(mj=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,mE),s=2*r+o,l=s/2;return b.createElement(mw,mj({id:t,markerWidth:s,markerHeight:s,refX:0,refY:l,orient:"auto-start-reverse",markerUnits:"strokeWidth",strokeWidth:o},a),b.createElement("circle",{r:r,cx:l,cy:l}))}var mS=n(64170),m_={top:"top",left:"left",bottom:"bottom"};function mO(){return(mO=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,mD),k=null!=g?g:"tickFormat"in v?v.tickFormat():mP.Z,S=h===m_.left,_=h===m_.top,O=_||h===m_.bottom,C=function(e,t){if(void 0===t&&(t="center"),"start"!==t&&"bandwidth"in e){var n=e.bandwidth();return"center"===t&&(n/=2),e.round()&&(n=Math.round(n)),function(t){var r=e(t);return"number"==typeof r?r+n:r}}return e}(v),M=S||_?-1:1,A=v.range(),T=(void 0===(t=m)&&(t=0),"number"==typeof t?{start:t,end:t}:mR({start:0,end:0},t)),P=mN({x:Number(A[0])+.5-T.start,y:0},O),N=mN({x:Number(A[A.length-1])+.5+T.end,y:0},O),R=(null!=w?w:(0,px.Z)(v,d)).filter(function(e){return!l||0!==e&&"0"!==e}).map(function(e,t){return{value:e,index:t}}),D=R.map(function(e){var t=e.value,n=e.index,r=(0,pb.Z)(C(t));return{value:t,index:n,from:mN({x:r,y:0},O),to:mN({x:r,y:x*M},O),formattedValue:k(t,n,R)}});return b.createElement(pg.Z,{className:pm()("visx-axis",i),top:void 0===E?0:E,left:void 0===u?0:u},r(mL({},j,{axisFromPoint:P,axisToPoint:N,hideAxisLine:void 0!==o&&o,hideTicks:void 0!==a&&a,hideZero:l,horizontal:O,numTicks:d,orientation:h,rangePadding:m,scale:v,tickFormat:k,tickLength:x,tickPosition:C,tickSign:M,ticks:D})))}var mV=["axisClassName","labelOffset","tickLabelProps","tickLength"];function mz(){return(mz=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,mV);return b.createElement(mF,mz({axisClassName:pm()("visx-axis-bottom",t),labelOffset:void 0===n?8:n,orientation:m_.bottom,tickLabelProps:void 0===r?mI:r,tickLength:void 0===i?8:i},o))}var mB=["axisClassName","labelOffset","tickLabelProps","tickLength"];function mH(){return(mH=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,mB);return b.createElement(mF,mH({axisClassName:pm()("visx-axis-left",t),labelOffset:void 0===n?36:n,orientation:m_.left,tickLabelProps:void 0===r?mU:r,tickLength:void 0===i?8:i},o))}let mq=e=>new Date((null==e?void 0:e.timestamp)||0),m$=e=>(null==e?void 0:e.value)||0,mY="var(--colors-hiContrast)",mG={textAnchor:"middle",fontFamily:"var(--fonts-sans)",fontSize:10,fill:mY},mX={dx:"-0.25em",dy:"0.25em",fontFamily:"var(--fonts-sans)",fontSize:10,textAnchor:"end",fill:mY};function mK(e){let{data:t,gradientColor:n,width:r,yMax:i,margin:o,xScale:a,yScale:s,hideBottomAxis:l=!1,hideLeftAxis:u=!1,top:c,left:d,curve:f="step",children:h}=e;return r<10?null:(0,x.jsxs)(pg.Z,{left:d||o.left,top:c||o.top,children:[(0,x.jsx)(mk,{id:"marker-circle",fill:"var(--colors-accent11)",size:1.5,refX:1.5}),(0,x.jsx)(ml,{id:"gradient",from:n,fromOpacity:1,to:n,toOpacity:.2}),(0,x.jsx)(mv.Z,{data:t,x:e=>a(mq(e))||0,y:e=>s(m$(e))||0,yScale:s,strokeWidth:1,stroke:"url(#gradient)",fill:"url(#gradient)",markerMid:"url(#marker-circle)",curve:"step"===f?mg.ZP:my.Z}),!l&&(0,x.jsx)(mZ,{top:i,scale:a,numTicks:r>520?10:5,stroke:mY,tickStroke:mY,tickLabelProps:()=>mG}),!u&&(0,x.jsx)(mW,{scale:s,numTicks:5,stroke:mY,tickStroke:mY,tickLabelProps:()=>mX}),h]})}var mQ=n(6692);let mJ={inherit:mQ.inherit,current:mQ.current,transparent:mQ.transparent,black:mQ.black,white:mQ.white,slate:mQ.slate,zinc:mQ.zinc,neutral:mQ.neutral,stone:mQ.stone,red:mQ.red,orange:mQ.orange,amber:mQ.amber,yellow:mQ.yellow,lime:mQ.lime,green:mQ.green,emerald:mQ.emerald,teal:mQ.teal,cyan:mQ.cyan,sky:mQ.sky,blue:mQ.blue,indigo:mQ.indigo,violet:mQ.violet,purple:mQ.purple,fuchsia:mQ.fuchsia,pink:mQ.pink,rose:mQ.rose,mask:"rgba(30, 169, 76, .3)",accent:{50:"#F6FFF9",100:"#E9FBEF",200:"#D5F2DE",300:"#C9EED4",400:"#BBE8C9",500:"#9BDAAE",600:"#71C48A",700:"#3EAA5F",800:"#05872D",900:"#056B24",1e3:"#04511B",1100:"#011F0A"},accentdark:{50:"#05150A",100:"#051C0C",200:"#062811",300:"#073515",400:"#064018",500:"#075820",600:"#056824",700:"#077A2A",800:"#05872D",900:"#069F35",1e3:"#2FA052",1100:"#D9F4E1"},gray:{50:"hsl(206, 30.0%, 98.8%)",100:"hsl(210, 16.7%, 97.6%)",200:"hsl(209, 13.3%, 95.3%)",300:"hsl(209, 12.2%, 93.2%)",400:"hsl(208, 11.7%, 91.1%)",500:"hsl(208, 11.3%, 88.9%)",600:"hsl(207, 11.1%, 85.9%)",700:"hsl(205, 10.7%, 78.0%)",800:"hsl(206, 6.0%, 56.1%)",900:"hsl(206, 5.8%, 52.3%)",1e3:"hsl(206, 6.0%, 43.5%)",1100:"hsl(206, 24.0%, 9.0%)"},graydark:{50:"hsl(200, 7.0%, 8.8%)",100:"hsl(195, 7.1%, 11.0%)",200:"hsl(197, 6.8%, 13.6%)",300:"hsl(198, 6.6%, 15.8%)",400:"hsl(199, 6.4%, 17.9%)",500:"hsl(201, 6.2%, 20.5%)",600:"hsl(203, 6.0%, 24.3%)",700:"hsl(207, 5.6%, 31.6%)",800:"hsl(206, 6.0%, 43.9%)",900:"hsl(206, 5.2%, 49.5%)",1e3:"hsl(206, 6.0%, 63.0%)",1100:"hsl(210, 6.0%, 93.0%)"}};var m0=n(25205);let m1={top:10,bottom:15,left:10,right:10},m2="brush_pattern",m4="brush_gradient",m3=mm()(e=>e(),15),m5=function(e){let t,n,r;function i(e,r,i=0,o=e.length){if(i>>1;0>n(e[t],r)?i=t+1:o=t}while(imu(e(t),n),r=(t,n)=>e(t)-n):(t=e===mu||e===mc?e:md,n=e,r=e),{left:i,center:function(e,t,n=0,o=e.length){let a=i(e,t,n,o-1);return a>n&&r(e[a-1],t)>-r(e[a],t)?a-1:a},right:function(e,r,i=0,o=e.length){if(i>>1;0>=n(e[t],r)?i=t+1:o=t}while(inew Date((null==e?void 0:e.timestamp)||0)).left;void 0===EI&&(EI={style:{position:"relative",width:"inherit",height:"inherit"}}),void 0===EZ&&(EZ=function(e,t){return b.createElement("div",t,e)});var m6=n(70390),m8=n(3440),m7=n.n(m8);function m9(e){let{id:t,width:n,height:r,accessors:i,animationTrajectory:o,curve:a,data:s,config:l,scales:u,enabledGraph:c,enabledTip:d,isStack:f,todayOffset:h,numTicks:p,renderAreaSeries:m,renderAreaStack:v,renderBarGroup:g,renderBarStack:y,enableTooltipGlyph:w,renderTooltipGlyph:E,renderLineSeries:j,sharedTooltip:k,showHorizontalCrosshair:S,showTooltip:_,showVerticalCrosshair:O,snapTooltipToDatum:C,stackOffset:M,margin:A,theme:T,xAxisOrientation:P,yAxisOrientation:N,AreaSeries:R,AreaStack:D,Axis:L,BarGroup:F,BarSeries:V,BarStack:z,Grid:I,LineSeries:Z,Tooltip:B,XYChart:H}=e;return(0,x.jsxs)(H,{theme:T.xyChartTheme,xScale:u.x,yScale:u.y,height:Math.min(400,r),margin:A,captureEvents:!0,children:[(0,x.jsx)("g",{children:(0,x.jsx)("rect",{className:"fill-gray-600 dark:fill-graydark-600 h-full w-px y-0",style:{left:"".concat(100*h,"%")}})},"today-line-".concat(n,"-").concat(r)),(0,x.jsx)(ml,{id:"gradient-default",from:"gray",fromOpacity:1,to:"gray",toOpacity:.4}),Object.entries(l.data).map(e=>{let[n,r]=e,i=r.color;return(0,x.jsxs)(b.Fragment,{children:[(0,x.jsx)(pP,{id:"pattern-".concat(ve(t,n)),height:6,width:6,stroke:i,strokeWidth:.5,orientation:["diagonal"]}),(0,x.jsx)(ml,{id:"gradient-".concat(ve(t,n)),from:i,fromOpacity:1,to:i,toOpacity:f?.4:1})]},n)}),(0,x.jsx)(I,{rows:!1,columns:!0,strokeDasharray:"1,3",animationTrajectory:o,numTicks:p},"grid-".concat(o)),y&&(0,x.jsx)(z,{offset:l.stackOffset,children:c.map(e=>(0,x.jsx)(V,{dataKey:e,data:s,xAccessor:i.x[e],yAccessor:i.y[e],colorAccessor:()=>vt(t,e,l)},e))}),g&&(0,x.jsx)(F,{children:c.map(e=>(0,x.jsx)(V,{dataKey:e,data:s,xAccessor:i.x[e],yAccessor:i.y[e],colorAccessor:()=>vt(t,e,l)},e))}),m&&(0,x.jsx)(x.Fragment,{children:c.map(e=>(0,x.jsx)(R,{dataKey:e,data:s,xAccessor:i.x[e],yAccessor:i.y[e],stroke:vt(t,e,l),fill:vt(t,e,l),curve:a},e))}),v&&(0,x.jsx)(D,{curve:a,offset:l.stackOffset,renderLine:"wiggle"!==M,children:c.map(e=>(0,x.jsx)(R,{dataKey:e,data:s,xAccessor:i.x[e],yAccessor:i.y[e],stroke:vt(t,e,l),fill:vt(t,e,l)},e))}),j&&(0,x.jsx)(x.Fragment,{children:c.map(e=>{var t,n;return(0,x.jsx)(Z,{dataKey:e,data:s,xAccessor:i.x[e],yAccessor:i.y[e],stroke:(null===(n=l.data)||void 0===n?void 0:null===(t=n[e])||void 0===t?void 0:t.color)||"gray",curve:a},e)})}),(0,x.jsx)(L,{orientation:P,numTicks:p,animationTrajectory:o,tickFormat:e=>(0,m0.rN)(e),tickLength:12,tickLabelProps:e=>({...e,fill:T.labels.color,fontFamily:T.labels.fontFamily,y:"14px",fontWeight:"500",fontSize:"8"})},"time-axis-".concat(o)),(0,x.jsx)(L,{label:null==M?"SC":"expand"===M?"Fraction of total":"",orientation:N,numTicks:p,tickLength:12,animationTrajectory:o,tickFormat:l.formatTickY,tickTransform:"translate(-300px, 0)",tickLabelProps:e=>({...e,fill:T.labels.color,fontFamily:T.labels.fontFamily,fontWeight:"500",fontSize:"8"})},"temp-axis-".concat(o)),_&&(0,x.jsx)(B,{showHorizontalCrosshair:S,showVerticalCrosshair:O,snapTooltipToDatumX:C,snapTooltipToDatumY:C,showDatumGlyph:C&&!g,showSeriesGlyphs:k&&!g,renderGlyph:w?E:void 0,renderTooltip:e=>{var t,n;let{tooltipData:r}=e,o=null==r?void 0:null===(t=r.nearestDatum)||void 0===t?void 0:t.datum,a=null==r?void 0:null===(n=r.nearestDatum)||void 0===n?void 0:n.key,s=k?d:a?[a]:[],u=l.formatTimestamp||(e=>(0,m0.rN)(e,{timeStyle:"short",hour12:!1})),c=s.map(e=>{var t,n;return{key:e,category:(null===(n=l.data)||void 0===n?void 0:null===(t=n[e])||void 0===t?void 0:t.category)||""}}),h=m7()(c,"category"),p=l.categories?l.categories.map(e=>[e,h[e]]):Object.entries(h);return(0,x.jsxs)("div",{className:(0,ea.cx)("flex flex-col gap-2 py-1"),children:[(0,x.jsx)(tq,{font:"mono",size:"12",color:"contrast",className:"text-end",children:o?u(i.date(o)):"No date"}),(0,x.jsx)(cb,{color:"panel",className:"w-full"}),(0,x.jsx)("div",{className:(0,ea.cx)("grid gap-x-6 gap-y-4",p.length>1?"grid-cols-2":"grid-cols-1"),children:p.map(e=>{let[t,n]=e,r=o?n.reduce((e,t)=>{let{key:n}=t,r=i.y[n](o);return null==r||Number.isNaN(r)?e:e+r},0):0,s=null==l?void 0:l.formatComponent;return(0,x.jsxs)("div",{className:"flex flex-col gap-2 w-[250px]",children:[t&&(0,x.jsx)(tq,{weight:"semibold",children:t}),(0,x.jsxs)("div",{className:"grid grid-cols-2 gap-x-2 gap-y-1 items-center",children:[n.map(e=>{var t,n,r,u;let{key:c}=e,d=o&&i.y[c](o);return(0,x.jsxs)(b.Fragment,{children:[(0,x.jsx)(tq,{color:"accent",style:{color:null===(n=l.data)||void 0===n?void 0:null===(t=n[c])||void 0===t?void 0:t.color},className:(0,ea.cx)(a===c?"underline":""),children:(null===(u=l.data)||void 0===u?void 0:null===(r=u[c])||void 0===r?void 0:r.label)||c}),(0,x.jsx)(tq,{size:"12",style:{textAlign:"end"},className:(0,ea.cx)(a===c?"underline":""),children:null==d||Number.isNaN(d)?"–":s?(0,x.jsx)(s,{value:d}):l.format?l.format(d):d})]},c)}),n.length>1&&f&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(tq,{className:"pt-2",children:"total"}),(0,x.jsx)(tq,{size:"12",weight:"bold",className:"pt-2 text-end",children:s?(0,x.jsx)(s,{value:r}):l.format?l.format(r):r})]})]})]},t)})})]})}})]})}function ve(e,t){return"".concat(e,"-").concat(t)}function vt(e,t,n){var r;let i=ve(e,t);return(null===(r=n.data)||void 0===r?void 0:r[t])?n.data[t].pattern?"url(#pattern-".concat(i,")"):"url(#gradient-".concat(i,")"):"url(#gradient-default)"}var vn=n(24037),vr=n(86707);function vi(e){var t=e.top,n=e.left,r=e.className,i=e.children;return b.createElement(pg.Z,{className:pm()("visx-glyph",r),top:void 0===t?0:t,left:void 0===n?0:n},i)}vi.propTypes={top:ph().number,left:ph().number,className:ph().string,children:ph().node};var vo=["children","className","top","left","size"];function va(){return(va=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,vo),s=(0,vn.Z)();return(s.type(vr.Z),"number"==typeof o?s.size(o):o&&s.size(o),t)?b.createElement(b.Fragment,null,t({path:s})):b.createElement(vi,{top:r,left:i},b.createElement("path",va({className:pm()("visx-glyph-star",n),d:s()||""},a)))}vs.propTypes={children:ph().func,className:ph().string,top:ph().number,left:ph().number,size:ph().oneOfType([ph().number,ph().func])};var vl=["top","left","className"];function vu(){return(vu=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,vl);return b.createElement(vi,{top:void 0===t?0:t,left:void 0===n?0:n},b.createElement("circle",vu({className:pm()("visx-glyph-dot",r)},i)))}vc.propTypes={className:ph().string,top:ph().number,left:ph().number,r:ph().number,cx:ph().number,cy:ph().number};var vd=n(9135),vf=["children","className","top","left","size"];function vh(){return(vh=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,vf),s=(0,vn.Z)();return(s.type(vd.Z),"number"==typeof o?s.size(o):o&&s.size(o),t)?b.createElement(b.Fragment,null,t({path:s})):b.createElement(vi,{top:r,left:i},b.createElement("path",vh({className:pm()("visx-glyph-cross",n),d:s()||""},a)))}vp.propTypes={children:ph().func,className:ph().string,top:ph().number,left:ph().number,size:ph().oneOfType([ph().number,ph().func])};var vm=n(46385),vv=n(20651),vg={red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"]},vy=vg.gray,vx=vy[7],vb=[vg.cyan[9],vg.cyan[3],vg.yellow[5],vg.red[4],vg.grape[8],vg.grape[5],vg.pink[9]];function vw(){return(vw=Object.assign?Object.assign.bind():function(e){for(var t=1;t{for(var n in t)v_(e,n,{get:t[n],enumerable:!0})})(vO,{assign:()=>v5,colors:()=>v2,createStringInterpolator:()=>EU,skipAnimation:()=>v4,to:()=>EW,willAdvance:()=>v3});var vC=vU(),vM=e=>vI(e,vC),vA=vU();vM.write=e=>vI(e,vA);var vT=vU();vM.onStart=e=>vI(e,vT);var vP=vU();vM.onFrame=e=>vI(e,vP);var vN=vU();vM.onFinish=e=>vI(e,vN);var vR=[];vM.setTimeout=(e,t)=>{let n=vM.now()+t,r=()=>{let e=vR.findIndex(e=>e.cancel==r);~e&&vR.splice(e,1),vV-=~e?1:0},i={time:n,handler:e,cancel:r};return vR.splice(vD(n),0,i),vV+=1,vZ(),i};var vD=e=>~(~vR.findIndex(t=>t.time>e)||~vR.length);vM.cancel=e=>{vT.delete(e),vP.delete(e),vN.delete(e),vC.delete(e),vA.delete(e)},vM.sync=e=>{vz=!0,vM.batchedUpdates(e),vz=!1},vM.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,vM.onStart(n)}return r.handler=e,r.cancel=()=>{vT.delete(n),t=null},r};var vL="undefined"!=typeof window?window.requestAnimationFrame:()=>{};vM.use=e=>vL=e,vM.now="undefined"!=typeof performance?()=>performance.now():Date.now,vM.batchedUpdates=e=>e(),vM.catch=console.error,vM.frameLoop="always",vM.advance=()=>{"demand"!==vM.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):vH()};var vF=-1,vV=0,vz=!1;function vI(e,t){vz?(t.delete(e),e(0)):(t.add(e),vZ())}function vZ(){vF<0&&(vF=0,"demand"!==vM.frameLoop&&vL(vB))}function vB(){~vF&&(vL(vB),vM.batchedUpdates(vH))}function vH(){let e=vF;vF=vM.now();let t=vD(vF);if(t&&(vW(vR.splice(0,t),e=>e.handler()),vV-=t),!vV){vF=-1;return}vT.flush(),vC.flush(e?Math.min(64,vF-e):16.667),vP.flush(),vA.flush(),vN.flush()}function vU(){let e=new Set,t=e;return{add(n){vV+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(vV-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,vV-=t.size,vW(t,t=>t(n)&&e.add(t)),vV+=e.size,t=e)}}}function vW(e,t){e.forEach(e=>{try{t(e)}catch(e){vM.catch(e)}})}function vq(){}var v$=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),vY={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function vG(e,t){if(vY.arr(e)){if(!vY.arr(t)||e.length!==t.length)return!1;for(let n=0;ne.forEach(t);function vK(e,t,n){if(vY.arr(e)){for(let r=0;rvY.und(e)?[]:vY.arr(e)?e:[e];function vJ(e,t){if(e.size){let n=Array.from(e);e.clear(),vX(n,t)}}var v0=(e,...t)=>vJ(e,e=>e(...t)),v1=()=>"undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),v2=null,v4=!1,v3=vq,v5=e=>{e.to&&(EW=e.to),e.now&&(vM.now=e.now),void 0!==e.colors&&(v2=e.colors),null!=e.skipAnimation&&(v4=e.skipAnimation),e.createStringInterpolator&&(EU=e.createStringInterpolator),e.requestAnimationFrame&&vM.use(e.requestAnimationFrame),e.batchedUpdates&&(vM.batchedUpdates=e.batchedUpdates),e.willAdvance&&(v3=e.willAdvance),e.frameLoop&&(vM.frameLoop=e.frameLoop)},v6=new Set,v8=[],v7=[],v9=0,ge={get idle(){return!v6.size&&!v8.length},start(e){v9>e.priority?(v6.add(e),vM.onStart(gt)):(gn(e),vM(gi))},advance:gi,sort(e){if(v9)vM.onFrame(()=>ge.sort(e));else{let t=v8.indexOf(e);~t&&(v8.splice(t,1),gr(e))}},clear(){v8=[],v6.clear()}};function gt(){v6.forEach(gn),v6.clear(),vM(gi)}function gn(e){v8.includes(e)||gr(e)}function gr(e){v8.splice(function(e,t){let n=e.findIndex(t);return n<0?e.length:n}(v8,t=>t.priority>e.priority),0,e)}function gi(e){let t=v7;for(let n=0;n0}var go="[-+]?\\d*\\.?\\d+",ga=go+"%";function gs(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var gl=RegExp("rgb"+gs(go,go,go)),gu=RegExp("rgba"+gs(go,go,go,go)),gc=RegExp("hsl"+gs(go,ga,ga)),gd=RegExp("hsla"+gs(go,ga,ga,go)),gf=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,gh=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,gp=/^#([0-9a-fA-F]{6})$/,gm=/^#([0-9a-fA-F]{8})$/;function gv(e,t,n){return(n<0&&(n+=1),n>1&&(n-=1),n<1/6)?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function gg(e,t,n){let r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,o=gv(i,r,e+1/3),a=gv(i,r,e),s=gv(i,r,e-1/3);return Math.round(255*o)<<24|Math.round(255*a)<<16|Math.round(255*s)<<8}function gy(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function gx(e){let t=parseFloat(e);return(t%360+360)%360/360}function gb(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function gw(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function gE(e){let t;let n="number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=gp.exec(e))?parseInt(t[1]+"ff",16)>>>0:v2&&void 0!==v2[e]?v2[e]:(t=gl.exec(e))?(gy(t[1])<<24|gy(t[2])<<16|gy(t[3])<<8|255)>>>0:(t=gu.exec(e))?(gy(t[1])<<24|gy(t[2])<<16|gy(t[3])<<8|gb(t[4]))>>>0:(t=gf.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=gm.exec(e))?parseInt(t[1],16)>>>0:(t=gh.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=gc.exec(e))?(255|gg(gx(t[1]),gw(t[2]),gw(t[3])))>>>0:(t=gd.exec(e))?(gg(gx(t[1]),gw(t[2]),gw(t[3]))|gb(t[4]))>>>0:null;if(null===n)return e;n=n||0;let r=(4278190080&n)>>>24,i=(16711680&n)>>>16,o=(65280&n)>>>8,a=(255&n)/255;return`rgba(${r}, ${i}, ${o}, ${a})`}var gj=(e,t,n)=>{if(vY.fun(e))return e;if(vY.arr(e))return gj({range:e,output:t,extrapolate:n});if(vY.str(e.output[0]))return EU(e);let r=e.output,i=e.range||[0,1],o=e.extrapolateLeft||e.extrapolate||"extend",a=e.extrapolateRight||e.extrapolate||"extend",s=e.easing||(e=>e);return t=>{let n=function(e,t){for(var n=1;n=e);++n);return n-1}(t,i);return function(e,t,n,r,i,o,a,s,l){let u=l?l(e):e;if(un){if("identity"===s)return u;"clamp"===s&&(u=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?u=-u:n===1/0?u-=t:u=(u-t)/(n-t),u=o(u),r===-1/0?u=-u:i===1/0?u+=r:u=u*(i-r)+r,u)}(t,i[n],i[n+1],r[n],r[n+1],s,o,a,e.map)}},gk=Symbol.for("FluidValue.get"),gS=Symbol.for("FluidValue.observers"),g_=e=>!!(e&&e[gk]),gO=e=>e&&e[gk]?e[gk]():e,gC=e=>e[gS]||null;function gM(e,t){let n=e[gS];n&&n.forEach(e=>{e.eventObserved?e.eventObserved(t):e(t)})}var gA=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");gT(this,e)}},gT=(e,t)=>gR(e,gk,t);function gP(e,t){if(e[gk]){let n=e[gS];n||gR(e,gS,n=new Set),!n.has(t)&&(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function gN(e,t){let n=e[gS];if(n&&n.has(t)){let r=n.size-1;r?n.delete(t):e[gS]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var gR=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),gD=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,gL=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,gF=RegExp(`(${gD.source})(%|[a-z]+)`,"i"),gV=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,gz=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,gI=e=>{let[t,n]=gZ(e);if(!t||v1())return e;let r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){let e=window.getComputedStyle(document.documentElement).getPropertyValue(n);if(e)return e}else if(n&&gz.test(n))return gI(n);else if(n)return n;return e},gZ=e=>{let t=gz.exec(e);if(!t)return[,];let[,n,r]=t;return[n,r]},gB=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,gH=e=>{Eq||(Eq=v2?RegExp(`(${Object.keys(v2).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map(e=>gO(e).replace(gz,gI).replace(gL,gE).replace(Eq,gE)),n=t.map(e=>e.match(gD).map(Number)),r=n[0].map((e,t)=>n.map(e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})),i=r.map(t=>gj({...e,output:t}));return e=>{let n=!gF.test(t[0])&&t.find(e=>gF.test(e))?.replace(gD,""),r=0;return t[0].replace(gD,()=>`${i[r++](e)}${n||""}`).replace(gV,gB)}},gU="react-spring: ",gW=e=>{let t=!1;if("function"!=typeof e)throw TypeError(`${gU}once requires a function parameter`);return(...n)=>{t||(e(...n),t=!0)}},gq=gW(console.warn),g$=gW(console.warn);function gY(e){return vY.str(e)&&("#"==e[0]||/\d/.test(e)||!v1()&&gz.test(e)||e in(v2||{}))}var gG=v1()?b.useEffect:b.useLayoutEffect,gX=()=>{let e=(0,b.useRef)(!1);return gG(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function gK(){let e=(0,b.useState)()[1],t=gX();return()=>{t.current&&e(Math.random())}}var gQ=e=>(0,b.useEffect)(e,gJ),gJ=[];function g0(e){let t=(0,b.useRef)();return(0,b.useEffect)(()=>{t.current=e}),t.current}var g1=Symbol.for("Animated:node"),g2=e=>!!e&&e[g1]===e,g4=e=>e&&e[g1],g3=(e,t)=>v$(e,g1,t),g5=e=>e&&e[g1]&&e[g1].getPayload(),g6=class{constructor(){g3(this,this)}getPayload(){return this.payload||[]}},g8=class extends g6{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,vY.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new g8(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return vY.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){let{done:e}=this;this.done=!1,vY.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},g7=class extends g8{constructor(e){super(0),this._string=null,this._toString=gj({output:[e,e]})}static create(e){return new g7(e)}getValue(){let e=this._string;return null==e?this._string=this._toString(this._value):e}setValue(e){if(vY.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=gj({output:[this.getValue(),e]})),this._value=0,super.reset()}},g9={dependencies:null},ye=class extends g6{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){let t={};return vK(this.source,(n,r)=>{g2(n)?t[r]=n.getValue(e):g_(n)?t[r]=gO(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&vX(this.payload,e=>e.reset())}_makePayload(e){if(e){let t=new Set;return vK(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){g9.dependencies&&g_(e)&&g9.dependencies.add(e);let t=g5(e);t&&vX(t,e=>this.add(e))}},yt=class extends ye{constructor(e){super(e)}static create(e){return new yt(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){let t=this.getPayload();return e.length==t.length?t.map((t,n)=>t.setValue(e[n])).some(Boolean):(super.setValue(e.map(yn)),!0)}};function yn(e){let t=gY(e)?g7:g8;return t.create(e)}function yr(e){let t=g4(e);return t?t.constructor:vY.arr(e)?yt:gY(e)?g7:g8}var yi=(e,t)=>{let n=!vY.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,b.forwardRef)((r,i)=>{let o=(0,b.useRef)(null),a=n&&(0,b.useCallback)(e=>{o.current=(i&&(vY.fun(i)?i(e):i.current=e),e)},[i]),[s,l]=function(e,t){let n=new Set;return g9.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new ye(e),g9.dependencies=null,[e,n]}(r,t),u=gK(),c=()=>{let e=o.current;if(n&&!e)return;let r=!!e&&t.applyAnimatedValues(e,s.getValue(!0));!1===r&&u()},d=new yo(c,l),f=(0,b.useRef)();gG(()=>(f.current=d,vX(l,e=>gP(e,d)),()=>{f.current&&(vX(f.current.deps,e=>gN(e,f.current)),vM.cancel(f.current.update))})),(0,b.useEffect)(c,[]),gQ(()=>()=>{let e=f.current;vX(e.deps,t=>gN(t,e))});let h=t.getComponentProps(s.getValue());return b.createElement(e,{...h,ref:a})})},yo=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&vM.write(this.update)}},ya=Symbol.for("AnimatedComponent"),ys=e=>vY.str(e)?e:e&&vY.str(e.displayName)?e.displayName:vY.fun(e)&&e.name||null;function yl(e,...t){return vY.fun(e)?e(...t):e}var yu=(e,t)=>!0===e||!!(t&&e&&(vY.fun(e)?e(t):vQ(e).includes(t))),yc=(e,t)=>vY.obj(e)?t&&e[t]:e,yd=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,yf=e=>e,yh=(e,t=yf)=>{let n=yp;e.default&&!0!==e.default&&(n=Object.keys(e=e.default));let r={};for(let i of n){let n=t(e[i],i);vY.und(n)||(r[i]=n)}return r},yp=["config","onProps","onStart","onChange","onPause","onResume","onRest"],ym={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function yv(e){let t=function(e){let t={},n=0;if(vK(e,(e,r)=>{!ym[r]&&(t[r]=e,n++)}),n)return t}(e);if(t){let n={to:t};return vK(e,(e,r)=>r in t||(n[r]=e)),n}return{...e}}function yg(e){return e=gO(e),vY.arr(e)?e.map(yg):gY(e)?vO.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function yy(e){for(let t in e)return!0;return!1}function yx(e){return vY.fun(e)||vY.arr(e)&&vY.obj(e[0])}function yb(e,t){e.ref?.delete(e),t?.delete(e)}function yw(e,t){t&&e.ref!==t&&(e.ref?.delete(e),t.add(e),e.ref=t)}var yE={tension:170,friction:26,mass:1,damping:1,easing:e=>e,clamp:!1},yj=class{constructor(){this.velocity=0,Object.assign(this,yE)}};function yk(e,t){if(vY.und(t.decay)){let n=!vY.und(t.tension)||!vY.und(t.friction);!n&&vY.und(t.frequency)&&vY.und(t.damping)&&vY.und(t.mass)||(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}var yS=[],y_=class{constructor(){this.changed=!1,this.values=yS,this.toValues=null,this.fromValues=yS,this.config=new yj,this.immediate=!1}};function yO(e,{key:t,props:n,defaultProps:r,state:i,actions:o}){return new Promise((a,s)=>{let l,u;let c=yu(n.cancel??r?.cancel,t);if(c)h();else{vY.und(n.pause)||(i.paused=yu(n.pause,t));let e=r?.pause;!0!==e&&(e=i.paused||yu(e,t)),l=yl(n.delay||0,t),e?(i.resumeQueue.add(f),o.pause()):(o.resume(),f())}function d(){i.resumeQueue.add(f),i.timeouts.delete(u),u.cancel(),l=u.time-vM.now()}function f(){l>0&&!vO.skipAnimation?(i.delayed=!0,u=vM.setTimeout(h,l),i.pauseQueue.add(d),i.timeouts.add(u)):h()}function h(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(d),i.timeouts.delete(u),e<=(i.cancelId||0)&&(c=!0);try{o.start({...n,callId:e,cancel:c},a)}catch(e){s(e)}}})}var yC=(e,t)=>1==t.length?t[0]:t.some(e=>e.cancelled)?yT(e.get()):t.every(e=>e.noop)?yM(e.get()):yA(e.get(),t.every(e=>e.finished)),yM=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),yA=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),yT=e=>({value:e,cancelled:!0,finished:!1});function yP(e,t,n,r){let{callId:i,parentId:o,onRest:a}=t,{asyncTo:s,promise:l}=n;return o||e!==s||t.reset?n.promise=(async()=>{let u,c,d;n.asyncId=i,n.asyncTo=e;let f=yh(t,(e,t)=>"onRest"===t?void 0:e),h=new Promise((e,t)=>(u=e,c=t)),p=e=>{let t=i<=(n.cancelId||0)&&yT(r)||i!==n.asyncId&&yA(r,!1);if(t)throw e.result=t,c(e),e},m=(e,t)=>{let o=new yR,a=new yD;return(async()=>{if(vO.skipAnimation)throw yN(n),a.result=yA(r,!1),c(a),a;p(o);let s=vY.obj(e)?{...e}:{...t,to:e};s.parentId=i,vK(f,(e,t)=>{vY.und(s[t])&&(s[t]=e)});let l=await r.start(s);return p(o),n.paused&&await new Promise(e=>{n.resumeQueue.add(e)}),l})()};if(vO.skipAnimation)return yN(n),yA(r,!1);try{let t;t=vY.arr(e)?(async e=>{for(let t of e)await m(t)})(e):Promise.resolve(e(m,r.stop.bind(r))),await Promise.all([t.then(u),h]),d=yA(r.get(),!0,!1)}catch(e){if(e instanceof yR)d=e.result;else if(e instanceof yD)d=e.result;else throw e}finally{i==n.asyncId&&(n.asyncId=o,n.asyncTo=o?s:void 0,n.promise=o?l:void 0)}return vY.fun(a)&&vM.batchedUpdates(()=>{a(d,r,r.item)}),d})():l}function yN(e,t){vJ(e.timeouts,e=>e.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var yR=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},yD=class extends Error{constructor(){super("SkipAnimationSignal")}},yL=e=>e instanceof yV,yF=1,yV=class extends gA{constructor(){super(...arguments),this.id=yF++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=g4(this);return e&&e.getValue()}to(...e){return vO.to(this,e)}interpolate(...e){return gq(`${gU}The "interpolate" function is deprecated in v9 (use "to" instead)`),vO.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){gM(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||ge.sort(this),gM(this,{type:"priority",parent:this,priority:e})}},yz=Symbol.for("SpringPhase"),yI=e=>(1&e[yz])>0,yZ=e=>(2&e[yz])>0,yB=e=>(4&e[yz])>0,yH=(e,t)=>t?e[yz]|=3:e[yz]&=-3,yU=(e,t)=>t?e[yz]|=4:e[yz]&=-5,yW=class extends yV{constructor(e,t){if(super(),this.animation=new y_,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!vY.und(e)||!vY.und(t)){let n=vY.obj(e)?{...e}:{...t,from:e};vY.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(yZ(this)||this._state.asyncTo)||yB(this)}get goal(){return gO(this.animation.to)}get velocity(){let e=g4(this);return e instanceof g8?e.lastVelocity||0:e.getPayload().map(e=>e.lastVelocity||0)}get hasAnimated(){return yI(this)}get isAnimating(){return yZ(this)}get isPaused(){return yB(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1,r=this.animation,{toValues:i}=r,{config:o}=r,a=g5(r.to);!a&&g_(r.to)&&(i=vQ(gO(r.to))),r.values.forEach((s,l)=>{if(s.done)return;let u=s.constructor==g7?1:a?a[l].lastPosition:i[l],c=r.immediate,d=u;if(!c){let t;if(d=s.lastPosition,o.tension<=0){s.done=!0;return}let n=s.elapsedTime+=e,i=r.fromValues[l],a=null!=s.v0?s.v0:s.v0=vY.arr(o.velocity)?o.velocity[l]:o.velocity,f=o.precision||(i==u?.005:Math.min(1,.001*Math.abs(u-i)));if(vY.und(o.duration)){if(o.decay){let e=!0===o.decay?.998:o.decay,r=Math.exp(-(1-e)*n);d=i+a/(1-e)*(1-r),c=Math.abs(s.lastPosition-d)<=f,t=a*r}else{t=null==s.lastVelocity?a:s.lastVelocity;let n=o.restVelocity||f/10,r=o.clamp?0:o.bounce,l=!vY.und(r),h=i==u?s.v0>0:in)&&(c=Math.abs(u-d)<=f));++e){l&&(d==u||d>u==h)&&(t=-t*r,d=u);let e=-(1e-6*o.tension)*(d-u),n=-(.001*o.friction)*t,i=(e+n)/o.mass;t+=1*i,d+=1*t}}}else{let r=1;o.duration>0&&(this._memoizedDuration!==o.duration&&(this._memoizedDuration=o.duration,s.durationProgress>0&&(s.elapsedTime=o.duration*s.durationProgress,n=s.elapsedTime+=e)),r=(r=(o.progress||0)+n/this._memoizedDuration)>1?1:r<0?0:r,s.durationProgress=r),t=((d=i+o.easing(r)*(u-i))-s.lastPosition)/e,c=1==r}s.lastVelocity=t,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),c=!0)}a&&!a[l].done&&(c=!1),c?s.done=!0:t=!1,s.setValue(d,o.round)&&(n=!0)});let s=g4(this),l=s.getValue();if(t){let e=gO(r.to);(l!==e||n)&&!o.decay?(s.setValue(e),this._onChange(e)):n&&o.decay&&this._onChange(l),this._stop()}else n&&this._onChange(l)}set(e){return vM.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(yZ(this)){let{to:e,config:t}=this.animation;vM.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){let t=this.queue||(this.queue=[]);return t.push(e),this}start(e,t){let n;return vY.und(e)?(n=this.queue||[],this.queue=[]):n=[vY.obj(e)?e:{...t,to:e}],Promise.all(n.map(e=>{let t=this._update(e);return t})).then(e=>yC(this,e))}stop(e){let{to:t}=this.animation;return this._focus(this.get()),yN(this._state,e&&this._lastCallId),vM.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){let t=this.key||"",{to:n,from:r}=e;(null==(n=vY.obj(n)?n[t]:n)||yx(n))&&(n=void 0),null==(r=vY.obj(r)?r[t]:r)&&(r=void 0);let i={to:n,from:r};return yI(this)||(e.reverse&&([n,r]=[r,n]),r=gO(r),vY.und(r)?g4(this)||this._set(n):this._set(r)),i}_update({...e},t){let{key:n,defaultProps:r}=this;e.default&&Object.assign(r,yh(e,(e,t)=>/^on/.test(t)?yc(e,n):e)),yK(this,e,"onProps"),yQ(this,"onProps",e,this);let i=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");let o=this._state;return yO(++this._lastCallId,{key:n,props:e,defaultProps:r,state:o,actions:{pause:()=>{yB(this)||(yU(this,!0),v0(o.pauseQueue),yQ(this,"onPause",yA(this,yq(this,this.animation.to)),this))},resume:()=>{yB(this)&&(yU(this,!1),yZ(this)&&this._resume(),v0(o.resumeQueue),yQ(this,"onResume",yA(this,yq(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(n=>{if(e.loop&&n.finished&&!(t&&n.noop)){let t=y$(e);if(t)return this._update(t,!0)}return n})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(yT(this));let r=!vY.und(e.to),i=!vY.und(e.from);if(r||i){if(!(t.callId>this._lastToId))return n(yT(this));this._lastToId=t.callId}let{key:o,defaultProps:a,animation:s}=this,{to:l,from:u}=s,{to:c=l,from:d=u}=e;i&&!r&&(!t.default||vY.und(c))&&(c=d),t.reverse&&([c,d]=[d,c]);let f=!vG(d,u);f&&(s.from=d),d=gO(d);let h=!vG(c,l);h&&this._focus(c);let p=yx(t.to),{config:m}=s,{decay:v,velocity:g}=m;(r||i)&&(m.velocity=0),t.config&&!p&&function(e,t,n){for(let r in n&&(yk(n={...n},t),t={...n,...t}),yk(e,t),Object.assign(e,t),yE)null==e[r]&&(e[r]=yE[r]);let{frequency:r,damping:i}=e,{mass:o}=e;vY.und(r)||(r<.01&&(r=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/r,2)*o,e.friction=4*Math.PI*i*o/r)}(m,yl(t.config,o),t.config!==a.config?yl(a.config,o):void 0);let y=g4(this);if(!y||vY.und(c))return n(yA(this,!0));let x=vY.und(t.reset)?i&&!t.default:!vY.und(d)&&yu(t.reset,o),b=x?d:this.get(),w=yg(c),E=vY.num(w)||vY.arr(w)||gY(w),j=!p&&(!E||yu(a.immediate||t.immediate,o));if(h){let e=yr(c);if(e!==y.constructor){if(j)y=this._set(w);else throw Error(`Cannot animate between ${y.constructor.name} and ${e.name}, as the "to" prop suggests`)}}let k=y.constructor,S=g_(c),_=!1;if(!S){let e=x||!yI(this)&&f;(h||e)&&(S=!(_=vG(yg(b),w))),(vG(s.immediate,j)||j)&&vG(m.decay,v)&&vG(m.velocity,g)||(S=!0)}if(_&&yZ(this)&&(s.changed&&!x?S=!0:S||this._stop(l)),!p&&((S||g_(l))&&(s.values=y.getPayload(),s.toValues=g_(c)?null:k==g7?[1]:vQ(w)),s.immediate==j||(s.immediate=j,j||x||this._set(l)),S)){let{onRest:e}=s;vX(yX,e=>yK(this,t,e));let r=yA(this,yq(this,l));v0(this._pendingCalls,r),this._pendingCalls.add(n),s.changed&&vM.batchedUpdates(()=>{s.changed=!x,e?.(r,this),x?yl(a.onRest,r):s.onStart?.(r,this)})}x&&this._set(b),p?n(yP(t.to,t,this._state,this)):S?this._start():yZ(this)&&!h?this._pendingCalls.add(n):n(yM(b))}_focus(e){let t=this.animation;e!==t.to&&(gC(this)&&this._detach(),t.to=e,gC(this)&&this._attach())}_attach(){let e=0,{to:t}=this.animation;g_(t)&&(gP(t,this),yL(t)&&(e=t.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;g_(e)&&gN(e,this)}_set(e,t=!0){let n=gO(e);if(!vY.und(n)){let e=g4(this);if(!e||!vG(n,e.getValue())){let r=yr(n);e&&e.constructor==r?e.setValue(n):g3(this,r.create(n)),e&&vM.batchedUpdates(()=>{this._onChange(n,t)})}}return g4(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,yQ(this,"onStart",yA(this,yq(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),yl(this.animation.onChange,e,this)),yl(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){let e=this.animation;g4(this).reset(gO(e.to)),e.immediate||(e.fromValues=e.values.map(e=>e.lastPosition)),yZ(this)||(yH(this,!0),yB(this)||this._resume())}_resume(){vO.skipAnimation?this.finish():ge.start(this)}_stop(e,t){if(yZ(this)){yH(this,!1);let n=this.animation;vX(n.values,e=>{e.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),gM(this,{type:"idle",parent:this});let r=t?yT(this.get()):yA(this.get(),yq(this,e??n.to));v0(this._pendingCalls,r),n.changed&&(n.changed=!1,yQ(this,"onRest",r,this))}}};function yq(e,t){let n=yg(t),r=yg(e.get());return vG(r,n)}function y$(e,t=e.loop,n=e.to){let r=yl(t);if(r){let i=!0!==r&&yv(r),o=(i||e).reverse,a=!i||i.reset;return yY({...e,loop:t,default:!1,pause:void 0,to:!o||yx(n)?n:void 0,from:a?e.from:void 0,reset:a,...i})}}function yY(e){let{to:t,from:n}=e=yv(e),r=new Set;return vY.obj(t)&&yG(t,r),vY.obj(n)&&yG(n,r),e.keys=r.size?Array.from(r):null,e}function yG(e,t){vK(e,(e,n)=>null!=e&&t.add(n))}var yX=["onStart","onRest","onChange","onPause","onResume"];function yK(e,t,n){e.animation[n]=t[n]!==yd(t,n)?yc(t[n],e.key):void 0}function yQ(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var yJ=["onStart","onChange","onRest"],y0=1,y1=class{constructor(e,t){this.id=y0++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){let e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(let t in e){let n=e[t];vY.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(yY(e)),this}start(e){let{queue:t}=this;return(e?t=vQ(e).map(yY):this.queue=[],this._flush)?this._flush(this,t):(y7(this,t),y2(this,t))}stop(e,t){if(!!e!==e&&(t=e),t){let n=this.springs;vX(vQ(t),t=>n[t].stop(!!e))}else yN(this._state,this._lastAsyncId),this.each(t=>t.stop(!!e));return this}pause(e){if(vY.und(e))this.start({pause:!0});else{let t=this.springs;vX(vQ(e),e=>t[e].pause())}return this}resume(e){if(vY.und(e))this.start({pause:!1});else{let t=this.springs;vX(vQ(e),e=>t[e].resume())}return this}each(e){vK(this.springs,e)}_onFrame(){let{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,i=this._changed.size>0;(r&&!this._started||i&&!this._started)&&(this._started=!0,vJ(e,([e,t])=>{t.value=this.get(),e(t,this,this._item)}));let o=!r&&this._started,a=i||o&&n.size?this.get():null;i&&t.size&&vJ(t,([e,t])=>{t.value=a,e(t,this,this._item)}),o&&(this._started=!1,vJ(n,([e,t])=>{t.value=a,e(t,this,this._item)}))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}vM.onFrame(this._onFrame)}};function y2(e,t){return Promise.all(t.map(t=>y4(e,t))).then(t=>yC(e,t))}async function y4(e,t,n){let{keys:r,to:i,from:o,loop:a,onRest:s,onResolve:l}=t,u=vY.obj(t.default)&&t.default;a&&(t.loop=!1),!1===i&&(t.to=null),!1===o&&(t.from=null);let c=vY.arr(i)||vY.fun(i)?i:void 0;c?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):vX(yJ,n=>{let r=t[n];if(vY.fun(r)){let i=e._events[n];t[n]=({finished:e,cancelled:t})=>{let n=i.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):i.set(r,{value:null,finished:e||!1,cancelled:t||!1})},u&&(u[n]=t[n])}});let d=e._state;!d.paused===t.pause?(d.paused=t.pause,v0(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);let f=(r||Object.keys(e.springs)).map(n=>e.springs[n].start(t)),h=!0===t.cancel||!0===yd(t,"cancel");(c||h&&d.asyncId)&&f.push(yO(++e._lastAsyncId,{props:t,state:d,actions:{pause:vq,resume:vq,start(t,n){h?(yN(d,e._lastAsyncId),n(yT(e))):(t.onRest=s,n(yP(c,t,d,e)))}}})),d.paused&&await new Promise(e=>{d.resumeQueue.add(e)});let p=yC(e,await Promise.all(f));if(a&&p.finished&&!(n&&p.noop)){let n=y$(t,a,i);if(n)return y7(e,[n]),y4(e,n,!0)}return l&&vM.batchedUpdates(()=>l(p,e,e.item)),p}function y3(e,t){let n={...e.springs};return t&&vX(vQ(t),e=>{vY.und(e.keys)&&(e=yY(e)),vY.obj(e.to)||(e={...e,to:void 0}),y8(n,e,e=>y6(e))}),y5(e,n),n}function y5(e,t){vK(t,(t,n)=>{e.springs[n]||(e.springs[n]=t,gP(t,e))})}function y6(e,t){let n=new yW;return n.key=e,t&&gP(n,t),n}function y8(e,t,n){t.keys&&vX(t.keys,r=>{let i=e[r]||(e[r]=n(r));i._prepareNode(t)})}function y7(e,t){vX(t,t=>{y8(e.springs,t,t=>y6(t,e))})}var y9=({children:e,...t})=>{let n=(0,b.useContext)(xe),r=t.pause||!!n.pause,i=t.immediate||!!n.immediate;t=function(e,t){let[n]=(0,b.useState)(()=>({inputs:t,result:e()})),r=(0,b.useRef)(),i=r.current,o=i;if(o){let n=!!(t&&o.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n{r.current=o,i==n&&(n.inputs=n.result=void 0)},[o]),o.result}(()=>({pause:r,immediate:i}),[r,i]);let{Provider:o}=xe;return b.createElement(o,{value:t},e)},xe=(Object.assign(y9,b.createContext({})),y9.Provider._context=y9,y9.Consumer._context=y9,y9);y9.Provider=xe.Provider,y9.Consumer=xe.Consumer;var xt=()=>{let e=[],t=function(t){g$(`${gU}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`);let r=[];return vX(e,(e,i)=>{if(vY.und(t))r.push(e.start());else{let o=n(t,e,i);o&&r.push(e.start(o))}}),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){let n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return vX(e,e=>e.pause(...arguments)),this},t.resume=function(){return vX(e,e=>e.resume(...arguments)),this},t.set=function(t){vX(e,(e,n)=>{let r=vY.fun(t)?t(n,e):t;r&&e.set(r)})},t.start=function(t){let n=[];return vX(e,(e,r)=>{if(vY.und(t))n.push(e.start());else{let i=this._getProps(t,e,r);i&&n.push(e.start(i))}}),n},t.stop=function(){return vX(e,e=>e.stop(...arguments)),this},t.update=function(t){return vX(e,(e,n)=>e.update(this._getProps(t,e,n))),this};let n=function(e,t,n){return vY.fun(e)?e(n,t):e};return t._getProps=n,t};function xn(e,t){let n=vY.fun(e),[[r],i]=function(e,t,n){let r=vY.fun(t)&&t;r&&!n&&(n=[]);let i=(0,b.useMemo)(()=>r||3==arguments.length?xt():void 0,[]),o=(0,b.useRef)(0),a=gK(),s=(0,b.useMemo)(()=>({ctrls:[],queue:[],flush(e,t){let n=y3(e,t),r=o.current>0&&!s.queue.length&&!Object.keys(n).some(t=>!e.springs[t]);return r?y2(e,t):new Promise(r=>{y5(e,n),s.queue.push(()=>{r(y2(e,t))}),a()})}}),[]),l=(0,b.useRef)([...s.ctrls]),u=[],c=g0(e)||0;function d(e,n){for(let i=e;i{vX(l.current.slice(e,c),e=>{yb(e,i),e.stop(!0)}),l.current.length=e,d(c,e)},[e]),(0,b.useMemo)(()=>{d(0,Math.min(c,e))},n);let f=l.current.map((e,t)=>y3(e,u[t])),h=(0,b.useContext)(y9),p=g0(h),m=h!==p&&yy(h);gG(()=>{o.current++,s.ctrls=l.current;let{queue:e}=s;e.length&&(s.queue=[],vX(e,e=>e())),vX(l.current,(e,t)=>{i?.add(e),m&&e.start({default:h});let n=u[t];n&&(yw(e,n.ref),e.ref?e.queue.push(n):e.start(n))})}),gQ(()=>()=>{vX(s.ctrls,e=>e.stop(!0))});let v=f.map(e=>({...e}));return i?[v,i]:v}(1,n?e:[e],n?t||[]:t);return n||2==arguments.length?[r,i]:r}function xr(e,t,n){let r=vY.fun(t)&&t,{reset:i,sort:o,trail:a=0,expires:s=!0,exitBeforeEnter:l=!1,onDestroyed:u,ref:c,config:d}=r?r():t,f=(0,b.useMemo)(()=>r||3==arguments.length?xt():void 0,[]),h=vQ(e),p=[],m=(0,b.useRef)(null),v=i?null:m.current;gG(()=>{m.current=p}),gQ(()=>(vX(p,e=>{f?.add(e.ctrl),e.ctrl.ref=f}),()=>{vX(m.current,e=>{e.expired&&clearTimeout(e.expirationId),yb(e.ctrl,f),e.ctrl.stop(!0)})}));let g=function(e,{key:t,keys:n=t},r){if(null===n){let t=new Set;return e.map(e=>{let n=r&&r.find(n=>n.item===e&&"leave"!==n.phase&&!t.has(n));return n?(t.add(n),n.key):xi++})}return vY.und(n)?e:vY.fun(n)?e.map(n):vQ(n)}(h,r?r():t,v),y=i&&m.current||[];gG(()=>vX(y,({ctrl:e,item:t,key:n})=>{yb(e,f),yl(u,t,n)}));let x=[];if(v&&vX(v,(e,t)=>{e.expired?(clearTimeout(e.expirationId),y.push(e)):~(t=x[t]=g.indexOf(e.key))&&(p[t]=e)}),vX(h,(e,t)=>{p[t]||(p[t]={key:g[t],item:e,phase:"mount",ctrl:new y1},p[t].ctrl.item=e)}),x.length){let e=-1,{leave:n}=r?r():t;vX(x,(t,r)=>{let i=v[r];~t?(e=p.indexOf(i),p[e]={...i,item:h[t]}):n&&p.splice(++e,0,i)})}vY.fun(o)&&p.sort((e,t)=>o(e.item,t.item));let w=-a,E=gK(),j=yh(t),k=new Map,S=(0,b.useRef)(new Map),_=(0,b.useRef)(!1);vX(p,(e,n)=>{let i,o;let u=e.key,f=e.phase,h=r?r():t,p=yl(h.delay||0,u);if("mount"==f)i=h.enter,o="enter";else{let e=0>g.indexOf(u);if("leave"!=f){if(e)i=h.leave,o="leave";else{if(!(i=h.update))return;o="update"}}else{if(e)return;i=h.enter,o="enter"}}if(i=yl(i,e.item,n),!(i=vY.obj(i)?yv(i):{to:i}).config){let t=d||j.config;i.config=yl(t,e.item,n,o)}w+=a;let y={...j,delay:p+w,ref:c,immediate:h.immediate,reset:!1,...i};if("enter"==o&&vY.und(y.from)){let i=r?r():t,o=vY.und(i.initial)||v?i.from:i.initial;y.from=yl(o,e.item,n)}let{onResolve:x}=y;y.onResolve=e=>{yl(x,e);let t=m.current,n=t.find(e=>e.key===u);if(n){if(e.cancelled&&"update"!=n.phase)return;if(n.ctrl.idle){let e=t.every(e=>e.ctrl.idle);if("leave"==n.phase){let t=yl(s,n.item);if(!1!==t){let r=!0===t?0:t;if(n.expired=!0,!e&&r>0){r<=2147483647&&(n.expirationId=setTimeout(E,r));return}}}e&&t.some(e=>e.expired)&&(S.current.delete(n),l&&(_.current=!0),E())}}};let b=y3(e.ctrl,y);"leave"===o&&l?S.current.set(e,{phase:o,springs:b,payload:y}):k.set(e,{phase:o,springs:b,payload:y})});let O=(0,b.useContext)(y9),C=g0(O),M=O!==C&&yy(O);gG(()=>{M&&vX(p,e=>{e.ctrl.start({default:O})})},[O]),vX(k,(e,t)=>{if(S.current.size){let e=p.findIndex(e=>e.key===t.key);p.splice(e,1)}}),gG(()=>{vX(S.current.size?S.current:k,({phase:e,payload:t},n)=>{let{ctrl:r}=n;n.phase=e,f?.add(r),M&&"enter"==e&&r.start({default:O}),t&&(yw(r,t.ref),(r.ref||f)&&!_.current?r.update(t):(r.start(t),_.current&&(_.current=!1)))})},i?void 0:n);let A=e=>b.createElement(b.Fragment,null,p.map((t,n)=>{let{springs:r}=k.get(t)||t.ctrl,i=e({...r},t.item,t,n);return i&&i.type?b.createElement(i.type,{...i.props,key:vY.str(t.key)||vY.num(t.key)?t.key:t.ctrl.id,ref:i.ref}):i}));return f?[A,f]:A}var xi=1,xo=class extends yV{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=gj(...t);let n=this._get(),r=yr(n);g3(this,r.create(n))}advance(e){let t=this._get(),n=this.get();vG(t,n)||(g4(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&xs(this._active)&&xl(this)}_get(){let e=vY.arr(this.source)?this.source.map(gO):vQ(gO(this.source));return this.calc(...e)}_start(){this.idle&&!xs(this._active)&&(this.idle=!1,vX(g5(this),e=>{e.done=!1}),vO.skipAnimation?(vM.batchedUpdates(()=>this.advance()),xl(this)):ge.start(this))}_attach(){let e=1;vX(vQ(this.source),t=>{g_(t)&&gP(t,this),yL(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){vX(vQ(this.source),e=>{g_(e)&&gN(e,this)}),this._active.clear(),xl(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=vQ(this.source).reduce((e,t)=>Math.max(e,(yL(t)?t.priority:0)+1),0))}};function xa(e){return!1!==e.idle}function xs(e){return!e.size||Array.from(e).every(xa)}function xl(e){e.idle||(e.idle=!0,vX(g5(e),e=>{e.done=!0}),gM(e,{type:"idle",parent:e}))}var xu=(e,...t)=>new xo(e,t);vO.assign({createStringInterpolator:gH,to:(e,t)=>new xo(e,t)}),ge.advance;var xc=/^--/,xd={},xf={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},xh=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),xp=["Webkit","Ms","Moz","O"];xf=Object.keys(xf).reduce((e,t)=>(xp.forEach(n=>e[xh(n,t)]=e[t]),e),xf);var xm=/^(matrix|translate|scale|rotate|skew)/,xv=/^(translate)/,xg=/^(rotate|skew)/,xy=(e,t)=>vY.num(e)&&0!==e?e+t:e,xx=(e,t)=>vY.arr(e)?e.every(e=>xx(e,t)):vY.num(e)?e===t:parseFloat(e)===t,xb=class extends ye{constructor({x:e,y:t,z:n,...r}){let i=[],o=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),o.push(e=>[`translate3d(${e.map(e=>xy(e,"px")).join(",")})`,xx(e,0)])),vK(r,(e,t)=>{if("transform"===t)i.push([e||""]),o.push(e=>[e,""===e]);else if(xm.test(t)){if(delete r[t],vY.und(e))return;let n=xv.test(t)?"px":xg.test(t)?"deg":"";i.push(vQ(e)),o.push("rotate3d"===t?([e,t,r,i])=>[`rotate3d(${e},${t},${r},${xy(i,n)})`,xx(i,0)]:e=>[`${t}(${e.map(e=>xy(e,n)).join(",")})`,xx(e,t.startsWith("scale")?1:0)])}}),i.length&&(r.transform=new xw(i,o)),super(r)}},xw=class extends gA{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return vX(this.inputs,(n,r)=>{let i=gO(n[0]),[o,a]=this.transforms[r](vY.arr(i)?i:n.map(gO));e+=" "+o,t=t&&a}),t?"none":e}observerAdded(e){1==e&&vX(this.inputs,e=>vX(e,e=>g_(e)&&gP(e,this)))}observerRemoved(e){0==e&&vX(this.inputs,e=>vX(e,e=>g_(e)&&gN(e,this)))}eventObserved(e){"change"==e.type&&(this._value=null),gM(this,e)}};vO.assign({batchedUpdates:e6.unstable_batchedUpdates,createStringInterpolator:gH,colors:{transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199}});var xE=((e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=e=>new ye(e),getComponentProps:r=e=>e}={})=>{let i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},o=e=>{let t=ys(e)||"Anonymous";return(e=vY.str(e)?o[e]||(o[e]=yi(e,i)):e[ya]||(e[ya]=yi(e,i))).displayName=`Animated(${t})`,e};return vK(e,(t,n)=>{vY.arr(e)&&(n=ys(t)),o[n]=o(t)}),{animated:o}})(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;let n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,{style:r,children:i,scrollTop:o,scrollLeft:a,viewBox:s,...l}=t,u=Object.values(l),c=Object.keys(l).map(t=>n||e.hasAttribute(t)?t:xd[t]||(xd[t]=t.replace(/([A-Z])/g,e=>"-"+e.toLowerCase())));for(let t in void 0!==i&&(e.textContent=i),r)if(r.hasOwnProperty(t)){var d;let n=null==(d=r[t])||"boolean"==typeof d||""===d?"":"number"!=typeof d||0===d||xc.test(t)||xf.hasOwnProperty(t)&&xf[t]?(""+d).trim():d+"px";xc.test(t)?e.style.setProperty(t,n):e.style[t]=n}c.forEach((t,n)=>{e.setAttribute(t,u[n])}),void 0!==o&&(e.scrollTop=o),void 0!==a&&(e.scrollLeft=a),void 0!==s&&e.setAttribute("viewBox",s)},createAnimatedStyle:e=>new xb(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}).animated,xj=n(23442),xk=(0,b.createContext)({});function xS(e){var t=e.x,n=e.y,r=e.dx,i=e.dy,o=e.children,a=(0,b.useMemo)(function(){return{x:t,y:n,dx:r,dy:i}},[t,n,r,i]);return b.createElement(xk.Provider,{value:a},o)}function x_(){return(x_=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,xP),p=(0,b.useContext)(xM)||{},m=p.innerHeight,v=p.innerWidth,g=p.margin,y=p.xScale,x=p.yScale,w=p.dataRegistry,E=(0,b.useMemo)(function(){return y?xA(y):0},[y]),j=(0,b.useMemo)(function(){return x?xA(x):0},[x]);if((!s||!l)&&!a)return console.warn("[@visx/xychart/BaseAnnotation]: dataKey or x/yAccessors must be specified."),null;var k=s&&l||null==a?null:null==w?void 0:w.get(a),S=s||(null==k?void 0:k.xAccessor),_=l||(null==k?void 0:k.yAccessor);if(!y||!x||!v||!m||!S||!_||!g)return null;var O=(null!=(t=(0,pb.Z)(y(S(o))))?t:NaN)+E/2,C=(null!=(n=(0,pb.Z)(x(_(o))))?n:NaN)+j/2,M=O+c+16>g.left+v?-c:c,A=C+f+16>g.top+m?-f:f;return xT(O)&&xT(C)?b.createElement(r,xN({width:v,height:m},h,{x:O,y:C,dx:M,dy:A}),i):null}xR.propTypes={dataKey:ph().string,xAccessor:ph().func,yAccessor:ph().func};var xD=["x","y","AnnotationComponent"],xL=["editable"];function xF(){return(xF=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function xz(e){var t=e.x,n=void 0===t?0:t,r=e.y,i=void 0===r?0:r,o=e.AnnotationComponent,a=xV(e,xD),s=(0,b.useRef)({x:n,y:i}),l=xn({from:{x:s.current.x-n,y:s.current.y-i},to:{x:0,y:0},reset:!0});return(0,b.useEffect)(function(){s.current={x:n,y:i}},[n,i]),b.createElement(xE.g,{transform:xu([l.x,l.y],function(e,t){return"translate("+e+", "+t+")"})},b.createElement(o,xF({x:n,y:i},a)))}function xI(e){var t=e.editable,n=xV(e,xL),r=(0,b.useCallback)(function(e){return b.createElement(xz,xF({AnnotationComponent:t?xC:xS},e))},[t]);return b.createElement(xR,xF({AnnotationComponent:r},n))}xI.propTypes={editable:ph().bool};var xZ=n(12766),xB=n(54073),xH=n.n(xB),xU=["d","stroke","fill"];function xW(){return(xW=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,xU),o=(0,b.useRef)(t),a=(0,b.useCallback)(xH()(function(e){o.current=e},50),[]),s=(0,xZ.interpolatePath)(o.current,t);a(t);var l=xn({from:{t:0},to:{t:1},reset:!0,delay:0}).t,u=xn({stroke:void 0===n?"transparent":n,fill:void 0===r?"transparent":r});return b.createElement(xE.path,xW({className:"visx-path",d:l.to(s),stroke:u.stroke,fill:u.fill},i))}var x$=n(12935),xY=n(12151);function xG(){return(xG=Object.assign?Object.assign.bind():function(e){for(var t=1;tt?1:e>=t?0:NaN}function x6(e){let t=e,n=e;function r(e,t,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;0>n(e[o],t)?r=o+1:i=o}return r}return 1===e.length&&(t=(t,n)=>e(t)-n,n=(t,n)=>x5(e(t),n)),{left:r,center:function(e,n,i,o){null==i&&(i=0),null==o&&(o=e.length);let a=r(e,n,i,o-1);return a>i&&t(e[a-1],n)>-t(e[a],n)?a-1:a},right:function(e,t,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;n(e[o],t)>0?i=o:r=o+1}return r}}}let x8=x6(x5);x8.right;let x7=x8.left;function x9(e){var t,n,r=e.scale,i=e.accessor,o=e.scaledValue,a=e.data;if("invert"in r&&"function"==typeof r.invert){var s=x6(i).left,l=Number(r.invert(o)),u=s(a,l),c=a[u-1],d=a[u];n=(t=!c||Math.abs(l-i(c))>Math.abs(l-i(d))?d:c)===c?u-1:u}else{if(!("step"in r)||void 0===r.step)return console.warn("[visx/xychart/findNearestDatum] encountered incompatible scale type, bailing"),null;var f=r.domain(),h=r.range().map(Number),p=[].concat(h).sort(function(e,t){return e-t}),m=x7(function(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),o=Array(i);++r=0||(i[n]=e[n]);return i}(e,bd),O=(0,b.useContext)(xM),C=O.colorScale,M=O.theme,A=O.horizontal,T=(0,b.useMemo)(function(){return w?xK(E,w):void 0},[E,w]),P=(0,b.useMemo)(function(){return xK(E,x)},[E,x]),N=(0,b.useMemo)(function(){return k?xK(S,k):void 0},[S,k]),R=(0,b.useMemo)(function(){return xK(S,j)},[S,j]),D=(0,b.useCallback)(function(e){return xT(E(x(e)))&&xT(S(j(e)))},[E,x,S,j]),L=null!=(t=null!=(n=null==C?void 0:C(l))?n:null==M?void 0:null==(r=M.colors)?void 0:r[0])?t:"#222",F="AREASERIES_EVENT_SOURCE-"+l,V=ba({dataKey:l,enableEvents:void 0===v||v,onBlur:c,onFocus:d,onPointerMove:f,onPointerOut:h,onPointerUp:p,onPointerDown:m,source:F,allowedSources:[xJ,F]}),z=(0,b.useMemo)(function(){var e=xQ(A?E:S);return A?{x0:null!=T?T:e,x1:P,y:R}:{x:P,y0:null!=N?N:e,y1:R}},[E,S,A,P,R,T,N]),I=!!(d||c),Z=(0,b.useCallback)(function(e){var t=e.glyphs;return I?t.map(function(e){return b.createElement(b.Fragment,{key:e.key},bc(bf({},e,{color:"transparent",onFocus:V.onFocus,onBlur:V.onBlur})))}):null},[I,V.onFocus,V.onBlur]);return b.createElement(b.Fragment,null,b.createElement(x$.Z,bf({},z,_,{curve:a,defined:D}),function(e){var t=e.path;return b.createElement(o,bf({className:"visx-area",stroke:"transparent",fill:L,strokeLinecap:"round"},_,{d:t(s)||""},V))}),y&&b.createElement(xY.Z,bf({x:P,y:R,defined:D,curve:a},u),function(e){var t=e.path;return b.createElement(o,bf({className:"visx-line",fill:"transparent",stroke:L,strokeWidth:2,pointerEvents:"none",strokeLinecap:"round"},u,{d:t(s)||""}))}),I&&b.createElement(bl,{dataKey:l,data:s,xAccessor:x,yAccessor:j,xScale:E,yScale:S,renderGlyphs:Z}))}bh.propTypes={renderLine:ph().bool};var bp=xX(bh);function bm(){return(bm=Object.assign?Object.assign.bind():function(e){for(var t=1;t1)for(var n,r,i,o=1,a=e[t[0]],s=a.length;o=0;)n[t]=t;return n}function bE(e,t){return e[t]}function bj(e){let t=[];return t.key=e,t}Array.prototype.slice;var bk=n(74322),bS=n(58543);function b_(e,t){let n,r;if(void 0===t)for(let t of e)null!=t&&(void 0===n?t>=t&&(n=r=t):(n>t&&(n=t),r=o&&(n=r=o):(n>o&&(n=o),r=0?"positiveSum":"negativeSum"]+=i})}}),Object.values(e)},[o,l]),d=(0,b.useMemo)(function(){var e=r?null:c.some(function(e){return e.negativeSum<0}),t=function(){var e=bx([]),t=bw,n=bb,r=bE;function i(i){var o,a,s,l=Array.from(e.apply(this,arguments),bj),u=l.length,c=-1;for(let e of i)for(a=0,++c;a0&&0===r&&(o?i.xScale=function(e){return e.domain(b_(e.domain().concat(f)))}:i.yScale=function(e){return e.domain(b_(e.domain().concat(f)))}),i}).filter(function(e){return e}))),function(){return s(u)}},[u,f,o,d,a,s,l]),{seriesChildren:l,dataKeys:u,stackedData:d}}function bP(e,t,n){var r,i,o,a,s=e.xScale,l=e.yScale,u=e.point,c=(n?bt:be)(e),d=(null==c?void 0:c.index)==null?null:t[c.index];return c&&d&&u?{index:c.index,datum:d,distanceX:n&&u.x>=(null!=(r=s((0,by.l8)(c.datum)))?r:1/0)&&u.x<=(null!=(i=s((0,by.xf)(c.datum)))?i:-1/0)?0:c.distanceX,distanceY:n?c.distanceY:u.y<=(null!=(o=l((0,by.l8)(c.datum)))?o:-1/0)&&u.y>=(null!=(a=l((0,by.xf)(c.datum)))?a:1/0)?0:c.distanceY}:null}var bN=["data","dataKey","xAccessor","yAccessor","curve","PathComponent","lineProps","renderLine"];function bR(){return(bR=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(a,bN)),u=bR({fill:null!=(n=null!=(r=null==g?void 0:g(e.key))?r:null==j?void 0:null==(i=j.colors)?void 0:i[0])?n:"#222"},l);return{key:t+"-"+e.key,accessors:C,data:e,areaProps:u,lineProps:s}})},[O,C,g,_,j]),A=(0,b.useCallback)(function(e){var t,n,r=null==(t=_.find(function(t){return t.props.dataKey===e.dataKey}))?void 0:null==(n=t.props)?void 0:n.data;return r?bP(e,r,x):null},[_,x]),T="AREASTACK_EVENT_SOURCE-"+S.join("-"),P=ba({dataKey:S,enableEvents:void 0===o||o,findNearestDatum:A,onBlur:s,onFocus:l,onPointerMove:u,onPointerOut:c,onPointerUp:d,onPointerDown:f,source:T,allowedSources:[xJ,T]}),N=!!(l||s),R=(0,b.useCallback)(function(e){var t=e.glyphs;return N?t.map(function(e){return b.createElement(b.Fragment,{key:e.key},bc(bR({},e,{color:"transparent",onFocus:P.onFocus,onBlur:P.onBlur})))}):null},[N,P.onFocus,P.onBlur]);return!S.some(function(e){return null==y.get(e)})&&w&&E&&g?b.createElement("g",{className:"visx-area-stack"},M.map(function(e){return b.createElement(x$.Z,bR({key:e.key,curve:i},e.accessors),function(t){var r=t.path;return b.createElement(n,bR({className:"visx-area",stroke:"transparent",d:r(e.data)||""},e.areaProps,P))})}),m&&M.map(function(e){return b.createElement(bg.Z,bR({key:"line-"+e.key,x:e.accessors.x||e.accessors.x1,y:e.accessors.y||e.accessors.y1,defined:e.accessors.defined,curve:i},e.lineProps),function(t){var r=t.path;return b.createElement(n,bR({className:"visx-line",fill:"transparent",stroke:e.areaProps.fill,strokeWidth:2,pointerEvents:"none"},e.lineProps,{d:r(e.data)||""}))})}),N&&M.map(function(e,t){var n=M[M.length-t-1];return b.createElement(bl,{key:"glyphs-"+n.key,dataKey:n.key,data:n.data,xAccessor:n.accessors.x||n.accessors.x1,yAccessor:n.accessors.y||n.accessors.y1,xScale:bD,yScale:bD,renderGlyphs:R})})):null}function bF(){return(bF=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,bI),c=(0,b.useContext)(xM),d=c.theme,f=c.xScale,h=c.yScale,p=c.margin,m=c.width,v=c.height,g=u.orientation,y=(0,b.useMemo)(function(){var e,t,n,r;return"left"===g||"right"===g?null==d?void 0:null==(e=d.axisStyles)?void 0:null==(t=e.y)?void 0:t[g]:null==d?void 0:null==(n=d.axisStyles)?void 0:null==(r=n.x)?void 0:r[g]},[d,g]),x=u.tickLabelProps,w=(0,b.useMemo)(function(){return x||y?function(e,t,n){return bZ({},null==y?void 0:y.tickLabel,{width:"left"===g||"right"===g?null==p?void 0:p[g]:void 0},null==x?void 0:x(e,t,n))}:void 0},[x,y,g,p]),E="bottom"===g?(null!=v?v:0)-(null!=(t=null==p?void 0:p.bottom)?t:0):"top"===g&&null!=(n=null==p?void 0:p.top)?n:0,j="left"===g?null!=(r=null==p?void 0:p.left)?r:0:"right"===g?(null!=m?m:0)-(null!=(i=null==p?void 0:p.right)?i:0):0,k="left"===g||"right"===g?h:f;return k?b.createElement(l,bZ({top:E,left:j,labelProps:null==y?void 0:y.axisLabel,stroke:null==y?void 0:null==(o=y.axisLine)?void 0:o.stroke,strokeWidth:null==y?void 0:null==(a=y.axisLine)?void 0:a.strokeWidth,tickLength:null==y?void 0:y.tickLength,tickStroke:null==y?void 0:null==(s=y.tickLine)?void 0:s.stroke},u,{tickLabelProps:w,scale:k})):null}function bH(){return(bH=Object.assign?Object.assign.bind():function(e){for(var t=1;t=h&&l.y<=p;return bq({},u,{distanceX:0,distanceY:m?0:Math.abs(l.y-(h+p)/2)})}var v=a(i(u.datum)),g=(null!=v?v:1/0)+(null!=c?c:1/0),y=g+d,x=l.x>=g&&l.x<=y;return bq({},u,{distanceY:0,distanceX:x?0:Math.abs(l.x-(g+y)/2)})}(e,k,v)},[k,v]),_="BARGROUP_EVENT_SOURCE-"+j.join("-")+"}",O=ba({dataKey:j,enableEvents:void 0===f||f,findNearestDatum:S,onBlur:a,onFocus:s,onPointerMove:l,onPointerOut:u,onPointerUp:c,onPointerDown:d,source:_,allowedSources:[xJ,_]}),C=(0,b.useMemo)(function(){return x?xQ(x):0},[x]),M=(0,b.useMemo)(function(){return w?xQ(w):0},[w]),A=j.map(function(e){return m.get(e)});if(A.some(function(e){return null==e})||!x||!w||!p)return null;var T=xA(k),P=A.map(function(e){var t,n=e.xAccessor,r=e.yAccessor,i=e.data,o=e.key,a=function(e){var t,i;return v?(null!=(t=x(n(e)))?t:NaN)-C:(null!=(i=w(r(e)))?i:NaN)-M},s=v?function(e){var t;return null!=(t=w(r(e)))?t:NaN}:function(e){var t;return null!=(t=x(n(e)))?t:NaN},l=null!=(t=k(o))?t:0,u=v?function(e){return C+Math.min(0,a(e))}:function(e){return s(e)+l},c=v?function(e){return s(e)+l}:function(e){return M+Math.min(0,a(e))},d=v?function(e){return Math.abs(a(e))}:function(){return T},f=v?function(){return T}:function(e){return Math.abs(a(e))},h=E.find(function(e){return e.props.dataKey===o}),m=(null==h?void 0:h.props)||{},g=m.colorAccessor;return{key:o,radius:m.radius,radiusAll:m.radiusAll,radiusBottom:m.radiusBottom,radiusLeft:m.radiusLeft,radiusRight:m.radiusRight,radiusTop:m.radiusTop,bars:i.map(function(e,t){var n,r=u(e);if(!xT(r))return null;var i=c(e);if(!xT(i))return null;var a=d(e);if(!xT(a))return null;var s=f(e);return xT(s)?{key:o+"-"+t,x:r,y:i,width:a,height:s,fill:null!=(n=null==g?void 0:g(e,t))?n:p(o)}:null}).filter(function(e){return e})}});return b.createElement("g",{className:"visx-bar-group"},P.map(function(e){return e&&b.createElement(o,b$({horizontal:v,xScale:x,yScale:w},e,O,{key:e.key}))}))}bY.propTypes={children:ph().node.isRequired,padding:ph().number,sortBars:ph().func};var bG=n(10897),bX=function(e){return!!(null==e?void 0:e.includes("url("))},bK=function(e){return bX(e)?"rgba(0,0,0,0.1)":e},bQ=["bars","xScale","yScale","horizontal","radius","radiusAll","radiusTop","radiusRight","radiusBottom","radiusLeft"],bJ=["bars","xScale","yScale","horizontal","radius","radiusAll","radiusTop","radiusRight","radiusBottom","radiusLeft"];function b0(){return(b0=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function b2(e){return{x:e.x,y:e.y,width:e.width,height:e.height,fill:bK(e.fill),opacity:1}}function b4(e){var t=e.bars,n=(e.xScale,e.yScale,e.horizontal,e.radius),r=e.radiusAll,i=e.radiusTop,o=e.radiusRight,a=e.radiusBottom,s=e.radiusLeft,l=b1(e,bQ);return b.createElement(b.Fragment,null,t.map(function(e){var t=e.key,u=e.fill,c=e.x,d=e.y,f=e.width,h=e.height;return b.createElement(bG.Z,{key:t,x:c,y:d,width:f,height:h,radius:n,all:r,top:i,right:o,bottom:a,left:s},function(e){var t=e.path;return b.createElement(xq,b0({className:"visx-bar visx-bar-rounded",d:t,fill:u},l))})}))}function b3(e){var t,n,r,i=e.bars,o=e.xScale,a=e.yScale,s=e.horizontal,l=(e.radius,e.radiusAll,e.radiusTop,e.radiusRight,e.radiusBottom,e.radiusLeft,b1(e,bJ)),u=xr(i,b0({},(n=(t={horizontal:s,scale:s?o:a}).scale,r=!!t.horizontal,(0,b.useMemo)(function(){var e=xQ(n);function t(t){var n=t.x,i=t.y,o=t.width,a=t.height;return{x:r?null!=e?e:0:n,y:r?i:null!=e?e:0,width:r?0:o,height:r?a:0,fill:bK(t.fill),opacity:0}}return{unique:!0,from:t,leave:t,enter:b2,update:b2,keys:function(e){return e.key}}},[n,r])))),c=!!(l.onFocus||l.onBlur);return b.createElement(b.Fragment,null,u(function(e,t,n){var r=e.x,i=e.y,o=e.width,a=e.height,s=e.fill,u=e.opacity,d=n.key;return null==t||null==d?null:b.createElement(xE.rect,b0({key:d,tabIndex:c?0:void 0,className:"visx-bar",x:r,y:i,width:o,height:a,fill:bX(t.fill)?t.fill:s,opacity:u},l))}))}function b5(e){return null==e.radius?b.createElement(b3,e):b.createElement(b4,b0({},e,{radius:e.radius}))}function b6(){return(b6=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,b7),E=(0,b.useContext)(xM),j=E.colorScale,k=E.horizontal,S=E.theme,_=E.innerWidth,O=E.innerHeight,C=(0,b.useMemo)(function(){return xK(g,v)},[g,v]),M=(0,b.useMemo)(function(){return xK(x,y)},[x,y]),A=xA(k?x:g)||(k?void 0===O?0:O:void 0===_?0:_)/s.length*(1-Math.min(1,Math.max(0,void 0===o?.1:o))),T=(0,b.useMemo)(function(){return g?xQ(g):0},[g]),P=(0,b.useMemo)(function(){return x?xQ(x):0},[x]),N=null!=(t=null!=(n=null==j?void 0:j(l))?n:null==S?void 0:null==(r=S.colors)?void 0:r[0])?t:"#222",R=(0,b.useMemo)(function(){var e=k?0:-A/2,t=k?-A/2:0;return s.map(function(n,r){var i,o=C(n)+e;if(!xT(o))return null;var s=M(n)+t;if(!xT(s))return null;var l=k?o-T:s-P;return xT(l)?{key:""+r,x:k?T+Math.min(0,l):o,y:k?s:P+Math.min(0,l),width:k?Math.abs(l):A,height:k?A:Math.abs(l),fill:null!=(i=null==a?void 0:a(n,r))?i:N}:null}).filter(function(e){return e})},[A,N,a,s,C,M,k,T,P]),D="BARSERIES_EVENT_SOURCE-"+l,L=ba({dataKey:l,enableEvents:void 0===m||m,onBlur:u,onFocus:c,onPointerMove:d,onPointerOut:f,onPointerUp:h,onPointerDown:p,source:D,allowedSources:[xJ,D]});return b.createElement("g",{className:"vx-bar-series"},b.createElement(i,b9({bars:R,horizontal:k,xScale:g,yScale:x},L,w)))}we.propTypes={barPadding:ph().number,colorAccessor:ph().func};var wt=xX(we),wn=["colorAccessor"];function wr(){return(wr=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,wn);return b.createElement(wt,wr({},n,{colorAccessor:t,BarsComponent:b5}))}var wo=n(15590);function wa(){return(wa=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,wf),i=(0,b.useCallback)(function(e){return b.createElement(wd,wh({},e,{renderGlyph:n}))},[n]);return b.createElement(bu,wh({},r,{renderGlyphs:i}))}var wm=n(93353),wv=n(63962),wg=["rows","columns","GridRowsComponent","GridColumnsComponent"];function wy(){return(wy=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,wg),l=(0,b.useContext)(xM),u=l.theme,c=l.xScale,d=l.yScale,f=l.margin,h=l.innerWidth,p=l.innerHeight,m=null==u?void 0:u.gridStyles;return b.createElement(b.Fragment,null,n&&d&&null!=h&&b.createElement(o,wy({left:null==f?void 0:f.left,lineStyle:m,width:h,scale:d},s)),i&&c&&null!=p&&b.createElement(a,wy({top:null==f?void 0:f.top,lineStyle:m,height:p,scale:c},s)))}wx.propTypes={rows:ph().bool,columns:ph().bool};var wb=["animationTrajectory"];function ww(){return(ww=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,wb),r=(0,b.useMemo)(function(){return function(e){return b.createElement(wm.Z,ww({},e,{animationTrajectory:t}))}},[t]),i=(0,b.useMemo)(function(){return function(e){return b.createElement(wv.Z,ww({},e,{animationTrajectory:t}))}},[t]);return b.createElement(wx,ww({GridRowsComponent:r,GridColumnsComponent:i},n))}var wj=["colorAccessor","curve","data","dataKey","onBlur","onFocus","onPointerMove","onPointerOut","onPointerUp","onPointerDown","enableEvents","xAccessor","xScale","yAccessor","yScale","PathComponent"];function wk(){return(wk=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,wj),j=(0,b.useContext)(xM),k=j.colorScale,S=j.theme,_=(0,b.useMemo)(function(){return xK(v,m)},[v,m]),O=(0,b.useMemo)(function(){return xK(y,g)},[y,g]),C=(0,b.useCallback)(function(e){return xT(v(m(e)))&&xT(y(g(e)))},[v,m,y,g]),M=null!=(t=null!=(n=null==k?void 0:k(s))?n:null==S?void 0:null==(r=S.colors)?void 0:r[0])?t:"#222",A="LINESERIES_EVENT_SOURCE-"+s,T=ba({dataKey:s,enableEvents:void 0===p||p,onBlur:l,onFocus:u,onPointerMove:c,onPointerOut:d,onPointerUp:f,onPointerDown:h,source:A,allowedSources:[xJ,A]}),P=!!(u||l),N=(0,b.useCallback)(function(e){var t=e.glyphs;return P?t.map(function(e){return b.createElement(b.Fragment,{key:e.key},bc(wk({},e,{color:"transparent",onFocus:T.onFocus,onBlur:T.onBlur})))}):null},[P,T.onFocus,T.onBlur]);return b.createElement(b.Fragment,null,b.createElement(xY.Z,wk({x:_,y:O,defined:C,curve:o},E),function(e){var t,n=e.path;return b.createElement(w,wk({stroke:null!=(t=null==i?void 0:i(s))?t:M,strokeWidth:2,fill:"transparent",strokeLinecap:"round"},E,{d:n(a)||""},T))}),P&&b.createElement(bl,{dataKey:s,data:a,xAccessor:m,yAccessor:g,xScale:v,yScale:y,renderGlyphs:N}))}wS.propTypes={colorAccessor:ph().func};var w_=xX(wS);function wO(){return(wO=Object.assign?Object.assign.bind():function(e){for(var t=1;twT.every(n=>e[n]===t[n]);function wN(e,t){return(wN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var wR=function(e){function t(){return e.apply(this,arguments)||this}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,wN(t,e);var n=t.prototype;return n.componentWillUnmount=function(){this.node&&document.body&&(document.body.removeChild(this.node),delete this.node)},n.render=function(){return(this.node||"undefined"==typeof document||(this.node=document.createElement("div"),null!=this.props.zIndex&&(this.node.style.zIndex=""+this.props.zIndex),document.body.append(this.node)),this.node)?e6.createPortal(this.props.children,this.node):null},t}(b.PureComponent);wR.propTypes={zIndex:ph().oneOfType([ph().number,ph().string])};var wD=["detectBounds","zIndex"],wL=["left","top","detectBounds","zIndex"];function wF(){return(wF=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}var wz=["debounce","detectBounds","horizontalCrosshairStyle","glyphStyle","renderTooltip","renderGlyph","resizeObserverPolyfill","scroll","showDatumGlyph","showHorizontalCrosshair","showSeriesGlyphs","showVerticalCrosshair","snapTooltipToDatumX","snapTooltipToDatumY","verticalCrosshairStyle","zIndex"],wI=["x","y"];function wZ(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}function wB(){return(wB=Object.assign?Object.assign.bind():function(e){for(var t=1;t(f.current=!0,()=>void(f.current=!1)));let[h,p,m]=(0,b.useMemo)(()=>{let e=()=>{if(!u.current.element)return;let{left:e,top:t,width:n,height:r,bottom:i,right:a,x:s,y:c}=u.current.element.getBoundingClientRect(),d={left:e,top:t,width:n,height:r,bottom:i,right:a,x:s,y:c};u.current.element instanceof HTMLElement&&o&&(d.height=u.current.element.offsetHeight,d.width=u.current.element.offsetWidth),Object.freeze(d),f.current&&!wP(u.current.lastBounds,d)&&l(u.current.lastBounds=d)};return[e,d?wA()(e,d):e,c?wA()(e,c):e]},[l,o,c,d]);function v(){u.current.scrollContainers&&(u.current.scrollContainers.forEach(e=>e.removeEventListener("scroll",m,!0)),u.current.scrollContainers=null),u.current.resizeObserver&&(u.current.resizeObserver.disconnect(),u.current.resizeObserver=null)}function g(){u.current.element&&(u.current.resizeObserver=new a(m),u.current.resizeObserver.observe(u.current.element),r&&u.current.scrollContainers&&u.current.scrollContainers.forEach(e=>e.addEventListener("scroll",m,{capture:!0,passive:!0})))}return t=!!r,(0,b.useEffect)(()=>{if(t)return window.addEventListener("scroll",m,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",m,!0)},[m,t]),(0,b.useEffect)(()=>(window.addEventListener("resize",p),()=>void window.removeEventListener("resize",p)),[p]),(0,b.useEffect)(()=>{v(),g()},[r,m,p]),(0,b.useEffect)(()=>v,[]),[e=>{e&&e!==u.current.element&&(v(),u.current.element=e,u.current.scrollContainers=function e(t){let n=[];if(!t||t===document.body)return n;let{overflow:r,overflowX:i,overflowY:o}=window.getComputedStyle(t);return[r,i,o].some(e=>"auto"===e||"scroll"===e)&&n.push(t),[...n,...e(t.parentElement)]}(e),g())},s,h]}(wV(ei,wD)))[0],ec=el[1],ed=el[2],ef=(0,b.useMemo)(function(){return function(e){var t=e.left,n=e.top,r=e.detectBounds,i=e.zIndex,o=wV(e,wL),a=null==i?es:i,s=(null==r?ea:r)?p$:pV,l=(void 0===t?0:t)+(ec.left||0)+window.scrollX,u=(void 0===n?0:n)+(ec.top||0)+window.scrollY;return b.createElement(wR,{zIndex:a},b.createElement(s,wF({left:l,top:u},o)))}},[ea,es,ec.left,ec.top]),{containerRef:eu,containerBounds:ec,forceRefreshBounds:ed,TooltipInPortal:ef}),L=D.containerRef,F=D.TooltipInPortal,V=D.forceRefreshBounds,z=(0,b.useCallback)(function(e){var t;L(null!=(t=null==e?void 0:e.parentElement)?t:null)},[L]),I=null!=R&&R.tooltipOpen?o(wB({},R,{colorScale:_})):null,Z=(null==R?void 0:R.tooltipOpen)&&null!=I,B=(0,b.useRef)(!1);(0,b.useEffect)(function(){Z&&!B.current&&V(),B.current=Z},[Z,V]);var H=null==R?void 0:R.tooltipLeft,U=null==R?void 0:R.tooltipTop,W=T?xA(T):0,q=P?xA(P):0,$=(0,b.useCallback)(function(e,t){var n,r,i=null==N?void 0:N.get(e),o=null==i?void 0:i.xAccessor,a=null==i?void 0:i.yAccessor;return{left:T&&o?null!=(n=Number(T(o(t)))+W/2)?n:0:void 0,top:P&&a?null!=(r=Number(P(a(t)))+q/2)?r:0:void 0}},[N,W,q,T,P]),Y=null==R?void 0:null==(eh=R.tooltipData)?void 0:eh.nearestDatum,G=null!=(ep=null==Y?void 0:Y.key)?ep:"";if(Z&&Y&&(y||w)){var X=$(G,Y.datum),K=X.left,Q=X.top;H=y&&xT(K)?K:H,U=w&&xT(Q)?Q:U}var J=[];if(Z&&(void 0!==c&&c||p)){var ee=Number(null!=(e_=null==i?void 0:i.radius)?e_:4);if(p)Object.values(null!=(eO=null==R?void 0:null==(eC=R.tooltipData)?void 0:eC.datumByKey)?eO:{}).forEach(function(e){var t,n,r,o=e.key,a=e.datum,s=e.index,l=null!=(t=null!=(n=null==_?void 0:_(o))?n:null==O?void 0:null==(r=O.htmlLabel)?void 0:r.color)?t:"#222",u=$(o,a),c=u.left,d=u.top;xT(c)&&xT(d)&&J.push({key:o,color:l,datum:a,index:s,size:ee,x:c,y:d,glyphStyle:i,isNearestDatum:!!Y&&Y.key===o})});else if(Y){var et=$(G,Y.datum),en=et.left,er=et.top;if(xT(en)&&xT(er)){var ei,eo,ea,es,el,eu,ec,ed,ef,eh,ep,em,ev,eg,ey,ex,eb,ew,eE,ej,ek,eS,e_,eO,eC,eM,eA,eT,eP,eN,eR,eD=null!=(eM=null!=(eA=null!=(eT=null!=(eP=G&&(null==_?void 0:_(G)))?eP:null)?eT:null==O?void 0:null==(eN=O.gridStyles)?void 0:eN.stroke)?eA:null==O?void 0:null==(eR=O.htmlLabel)?void 0:eR.color)?eM:"#222";J.push({key:G,color:eD,datum:Y.datum,index:Y.index,size:ee,x:en,y:er,glyphStyle:i,isNearestDatum:!0})}}}return b.createElement(b.Fragment,null,b.createElement("svg",{ref:z,style:wU}),Z&&b.createElement(b.Fragment,null,v&&b.createElement(F,{className:"visx-crosshair visx-crosshair-vertical",left:H,top:null==A?void 0:A.top,offsetLeft:0,offsetTop:0,detectBounds:!1,style:wH},b.createElement("svg",{width:"1",height:C,overflow:"visible"},b.createElement("line",wB({x1:0,x2:0,y1:0,y2:C,strokeWidth:1.5,stroke:null!=(em=null!=(ev=null==O?void 0:null==(eg=O.gridStyles)?void 0:eg.stroke)?ev:null==O?void 0:null==(ey=O.htmlLabel)?void 0:ey.color)?em:"#222"},E)))),f&&b.createElement(F,{className:"visx-crosshair visx-crosshair-horizontal",left:null==A?void 0:A.left,top:U,offsetLeft:0,offsetTop:0,detectBounds:!1,style:wH},b.createElement("svg",{width:M,height:"1",overflow:"visible"},b.createElement("line",wB({x1:0,x2:M,y1:0,y2:0,strokeWidth:1.5,stroke:null!=(ex=null!=(eb=null==O?void 0:null==(ew=O.gridStyles)?void 0:ew.stroke)?eb:null==O?void 0:null==(eE=O.htmlLabel)?void 0:eE.color)?ex:"#222"},r)))),J.map(function(e,t){var n=e.x,r=e.y,i=wZ(e,wI);return b.createElement(F,{key:t,className:"visx-tooltip-glyph",left:n,top:r,offsetLeft:0,offsetTop:0,detectBounds:!1,style:wH},b.createElement("svg",{overflow:"visible"},s(wB({x:0,y:0},i))))}),b.createElement(F,wB({left:H,top:U,style:wB({},pF,{background:null!=(ej=null==O?void 0:O.backgroundColor)?ej:"white",boxShadow:"0 1px 2px "+(null!=O&&null!=(ek=O.htmlLabel)&&ek.color?(null==O?void 0:null==(eS=O.htmlLabel)?void 0:eS.color)+"55":"#22222255")},null==O?void 0:O.htmlLabel)},k),I)))}function wY(e){var t=(0,b.useContext)(x0);return null!=t&&t.tooltipOpen?b.createElement(w$,e):null}function wG(e){var t=e.children,n=(0,b.useMemo)(function(){var e;return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r&&r.push(n)||e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)},emit:function(t,n){(e.get(t)||[]).slice().map(function(e){e(n)}),(e.get("*")||[]).slice().map(function(e){e(t,n)})}}},[]);return b.createElement(x1.Provider,{value:n},t)}function wX(){return(wX=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(t,pN);return pR({},e(n),{tooltipOpen:!0})}:{tooltipOpen:!0,tooltipLeft:e.tooltipLeft,tooltipTop:e.tooltipTop,tooltipData:e.tooltipData})},[r]),o=(0,b.useCallback)(function(){return r({tooltipOpen:!1,tooltipLeft:void 0,tooltipTop:void 0,tooltipData:void 0})},[r]),{tooltipOpen:n.tooltipOpen,tooltipLeft:n.tooltipLeft,tooltipTop:n.tooltipTop,tooltipData:n.tooltipData,updateTooltip:r,showTooltip:i,hideTooltip:o}),c=u.tooltipOpen,d=u.tooltipLeft,f=u.tooltipTop,h=u.tooltipData,p=u.updateTooltip,m=u.hideTooltip,v=(0,b.useRef)(null),g=(0,b.useRef)(function(e){var t=e.svgPoint,n=e.index,r=e.key,i=e.datum,o=e.distanceX,a=e.distanceY;v.current&&(v.current.cancel(),v.current=null);var s=Math.sqrt(Math.pow(xT(o)?o:1/0,2)+Math.pow(xT(a)?a:1/0,2));p(function(e){var o,a,l,u=e.tooltipData,c=null!=u&&u.nearestDatum&&xT(u.nearestDatum.distance)?u.nearestDatum.distance:1/0;return{tooltipOpen:!0,tooltipLeft:null==t?void 0:t.x,tooltipTop:null==t?void 0:t.y,tooltipData:{nearestDatum:(null!=(o=null==u?void 0:null==(a=u.nearestDatum)?void 0:a.key)?o:"")!==r&&c0&&o>0&&y({width:m,height:o,margin:l})},[y,m,o,l]);var E=x4({source:xJ});return(bo({dataKey:"nearest"===(void 0===h?"nearest":h)?bi:br,onPointerMove:u,onPointerOut:c,onPointerUp:d,onPointerDown:f,allowedSources:Ee}),y)?null==m||null==o?b.createElement(m6.Z,null,function(t){return b.createElement(Et,w7({},e,{width:null==e.width?t.width:e.width,height:null==e.height?t.height:e.height}))}):null==x?b.createElement(wK,null,b.createElement(Et,e)):null==w?b.createElement(wG,null,b.createElement(Et,e)):m>0&&o>0?b.createElement("svg",{width:m,height:o,"aria-label":void 0===t?"XYChart":t},i,r&&b.createElement("rect",w7({x:l.left,y:l.top,width:m-l.left-l.right,height:o-l.top-l.bottom,fill:"transparent"},E))):null:v&&g?b.createElement(w8,{xScale:v,yScale:g,theme:p,initialDimensions:{width:m,height:o,margin:l},horizontal:a},b.createElement(Et,e)):(console.warn("[@visx/xychart] XYChart: When no DataProvider is available in context, you must pass xScale & yScale config to XYChart."),null)}function En(e){return b.createElement(bp,e)}function Er(e){return b.createElement(bL,e)}function Ei(){return(Ei=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function Ec(e){var t=e.bars,n=(e.horizontal,e.xScale,e.yScale,e.radius),r=e.radiusAll,i=e.radiusTop,o=e.radiusRight,a=e.radiusBottom,s=e.radiusLeft,l=Eu(e,Ea),u=!!(l.onFocus||l.onBlur);return b.createElement(b.Fragment,null,t.map(function(e){var t=e.key,c=Eu(e,Es);return null==n?b.createElement("rect",El({key:t,className:"visx-bar",tabIndex:u?0:void 0},c,l)):b.createElement(bG.Z,El({key:t,className:"visx-bar",tabIndex:u?0:void 0,radius:n,all:r,top:i,right:o,bottom:a,left:s},c,l))}))}function Ed(){return(Ed=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,Eh);return b.createElement(wt,Ep({},n,{colorAccessor:t,BarsComponent:Ec}))};function Ev(){return(Ev=Object.assign?Object.assign.bind():function(e){for(var t=1;tr(e),className:"flex flex-col gap-1",children:[(0,x.jsx)(dX,{value:"line",children:"Line"}),(0,x.jsx)(dX,{disabled:p||m,value:"areastack",children:"Area Stack"}),(0,x.jsx)(dX,{disabled:p||m,value:"barstack",children:"Bar Stack"}),(0,x.jsx)(dX,{disabled:p,value:"area",children:"Area"}),(0,x.jsx)(dX,{disabled:p,value:"bargroup",children:"Bar Group"})]})]}),(0,x.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,x.jsx)(tq,{weight:"semibold",children:"Stack series offset"}),(0,x.jsxs)(dK,{value:l,onValueChange:e=>u(e),className:"flex flex-col gap-1",children:[(0,x.jsxs)(dX,{disabled:!s,value:"none",children:["None",(0,x.jsx)(fb,{children:"zero-baseline"})]}),(0,x.jsxs)(dX,{disabled:!s,value:"diverging",children:["Diverging",(0,x.jsx)(fb,{children:"non zero-baseline"})]}),(0,x.jsxs)(dX,{disabled:!s,value:"expand",children:["Expand",(0,x.jsx)(fb,{children:"values sum to 1"})]}),(0,x.jsxs)(dX,{disabled:!s,value:"wiggle",children:["Wiggle",(0,x.jsx)(fb,{children:"stream graph"})]})]})]}),(0,x.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,x.jsx)(tq,{weight:"semibold",children:"Curve shape"}),(0,x.jsxs)(dK,{value:i,onValueChange:e=>o(e),className:"flex flex-col gap-1",children:[(0,x.jsx)(dX,{disabled:!a,value:"linear",children:"Linear"}),(0,x.jsx)(dX,{disabled:!a,value:"cardinal",children:"Cardinal"}),(0,x.jsx)(dX,{disabled:!a,value:"step",children:"Step"})]})]}),(0,x.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,x.jsx)(tq,{weight:"semibold",children:"Axes"}),(0,x.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,x.jsxs)(dK,{value:c,onValueChange:e=>d(e),className:"flex flex-col gap-1",children:[(0,x.jsx)(dX,{value:"bottom",children:"Bottom"}),(0,x.jsx)(dX,{value:"top",children:"Top"})]}),(0,x.jsxs)(dK,{value:f,onValueChange:e=>h(e),className:"flex flex-col gap-2",children:[(0,x.jsx)(dX,{value:"left",children:"Left"}),(0,x.jsx)(dX,{value:"right",children:"Right"})]})]})]})]})})}let EA=(0,b.forwardRef)((e,t)=>{let{className:n}=e;return(0,x.jsxs)("div",{ref:t,className:(0,ea.cx)("flex gap-1 items-center",n),children:[(0,x.jsx)(ET,{}),(0,x.jsx)(ET,{}),(0,x.jsx)(ET,{})]})});function ET(){return(0,x.jsx)("div",{className:"w-1 h-1 bg-slate-400 dark:bg-slate-200 rounded-full animate-pulselight [&:nth-child(2)]:animation-delay-500 [&:nth-child(3)]:animation-delay-1000"})}function EP(e){let{id:t,height:n,data:r,config:i,actionsLeft:o,isLoading:a,actionsRight:s,emptyState:l,variant:u="panel",allowConfiguration:c=!0}=e,d=function(e,t,n){let r=(0,b.useMemo)(()=>{if(t.sort((e,t)=>e.timestamp>t.timestamp?1:-1),0===t.length)return[];let e=t[t.length-1];return[...t,{...e,timestamp:e.timestamp+EO(1)}]},[t]),i=(0,b.useMemo)(()=>{if(r.length<2)return 0;let e=[r[0].timestamp,r[r.length-1].timestamp],t=new Date().getTime();return t>e[0]&&t"dark"===s?vS:vk,[s]),[u,c]=(0,b.useState)("center"),[d,f]=(0,b.useState)([!1,!1]),[h,p]=d,[m,v]=(0,b.useState)("bottom"),[g,y]=(0,b.useState)("right"),[w,E]=(0,b.useState)(!0),[j,k]=(0,b.useState)(!0),[S,_]=(0,b.useState)(!1),[O,C]=(0,b.useState)(!0),[M,A]=(0,b.useState)(!0),T=n.chartType||"areastack",P=n.curveType||"linear",N=n.stackOffset||"none",[R,D]=(0,b.useState)(T),[L,F]=(0,b.useState)(P),[V,z]=(0,b.useState)(N),I=l.xyChartTheme.gridStyles.stroke,[Z,B]=(0,b.useState)(!1),[H,U]=(0,b.useState)("star"),W=(0,b.useCallback)(e=>{let{x:t,y:n,size:r,color:i,onPointerMove:o,onPointerOut:a,onPointerUp:s,isNearestDatum:l}=e,u={onPointerMove:o,onPointerOut:a,onPointerUp:s};return"star"===H?(0,x.jsx)(vs,{left:t,top:n,stroke:I,fill:i,size:10*r,...u}):"circle"===H?(0,x.jsx)(vc,{left:t,top:n,stroke:I,fill:i,r:r,...u}):"cross"===H?(0,x.jsx)(vp,{left:t,top:n,stroke:I,fill:i,size:10*r,...u}):(0,x.jsx)("text",{x:t,y:n,dx:"-0.75em",dy:"0.25em",fontSize:14,...u,children:l?"\uD83C\uDF4D":"\uD83C\uDF4C"})},[H,I]),q=(0,b.useMemo)(()=>Object.keys(Ek()(t[0],"timestamp")),[t]),$=(0,b.useMemo)(()=>n.enabledGraph||q,[q,n]),Y=(0,b.useMemo)(()=>n.enabledTip||q,[q,n]),G=(0,b.useMemo)(()=>({x:q.reduce((e,t)=>({...e,[t]:e=>e.timestamp}),{}),y:q.reduce((e,t)=>({...e,[t]:e=>e[t]}),{}),date:e=>e.timestamp}),[q]),X=["line","area","areastack"].includes(R),K=["barstack","areastack"].includes(R),Q=(0,b.useMemo)(()=>({x:{type:"band",paddingInner:X?1:.3},y:{type:"linear"}}),[X]),J=(0,b.useMemo)(()=>"cardinal"===L&&vm.ZP||"step"===L&&mg.ZP||vv.Z,[L]),ee=(0,b.useMemo)(()=>({top:30,bottom:"top"===m?0:20,right:"right"===g?60:0,left:"left"===g?60:0}),[m,g]);return{id:e,accessors:G,animationTrajectory:u,config:n,scales:Q,data:r,curve:J,chartData:t,numTicks:4,isLine:X,isStack:K,todayOffset:i,initialChartType:T,initialCurveType:P,initialStackOffset:N,chartType:R,curveType:L,keys:q,enabledGraph:$,enabledTip:Y,renderBarGroup:"bargroup"===R,renderBarStack:"barstack"===R,enableTooltipGlyph:Z,renderTooltipGlyph:W,renderAreaSeries:"area"===R,renderAreaStack:"areastack"===R,renderLineSeries:"line"===R,sharedTooltip:M,showGridColumns:p,showGridRows:h,showHorizontalCrosshair:S,showTooltip:w,showVerticalCrosshair:j,snapTooltipToDatum:!K&&O,stackOffset:V,theme:l,margin:ee,xAxisOrientation:m,yAxisOrientation:g,setUseAnimatedComponents:a,setAnimationTrajectory:c,setGridProps:f,setXAxisOrientation:v,setYAxisOrientation:y,setShowTooltip:E,setShowVerticalCrosshair:k,setShowHorizontalCrosshair:_,setSnapTooltipToDatum:C,setSharedTooltip:A,setChartType:D,setCurveType:F,setStackOffset:z,setEnableTooltipGlyph:B,setTooltipGlyphComponent:U,...o?{Annotation:xI,AreaSeries:bv,AreaStack:bV,Axis:bU,BarGroup:b8,BarSeries:wi,BarStack:wu,GlyphSeries:wp,Grid:wE,LineSeries:wC,Tooltip:wY,XYChart:Et}:{AreaSeries:En,AreaStack:Er,Axis:Eo,BarGroup:Ef,BarSeries:Em,BarStack:Eg,Grid:Ew,LineSeries:EE,Tooltip:wY,XYChart:Et}}}(t,r,i),f=(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)("div",{className:"flex gap-2 absolute top-3 right-4",children:[s,"panel"===u&&c&&(0,x.jsx)(EM,{...d})]}),(0,x.jsx)("div",{className:"flex gap-2 absolute top-3 left-4",children:o}),(0,x.jsx)(m6.Z,{children:e=>{let{width:t,height:n}=e;return a?(0,x.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,x.jsx)(EA,{className:"scale-150"})}):0===r.length&&l?l:(0,x.jsx)(m9,{...d,width:t,height:n})}})]});return"panel"===u?(0,x.jsx)(tG,{className:"relative p-px",style:{height:n},children:f}):(0,x.jsx)("div",{className:"relative p-px",style:{height:n},children:f})}/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
@@ -57,7 +57,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
-***************************************************************************** */function EN(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})}function ER(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]"object"==typeof window?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||E7,je=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,jt=/\/\*[^]*?\*\/|\s\s+|\n/g,jn=(e,t)=>{let n="",r="",i="";for(let o in e){let a=e[o];"@"==o[0]?"i"==o[1]?n=o+" "+a+";":r+="f"==o[1]?jn(a,o):o+"{"+jn(a,"k"==o[1]?"":t)+"}":"object"==typeof a?r+=jn(a,t?t.replace(/([^,])+/g,e=>o.replace(/(^:.*)|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):o):null!=a&&(o=o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=jn.p?jn.p(o,a):o+":"+a+";")}return n+(t&&i?t+"{"+i+"}":i)+r},jr={},ji=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+ji(e[n]);return t}return e},jo=(e,t,n,r,i)=>{var o;let a=ji(e),s=jr[a]||(jr[a]=(e=>{let t=0,n=11;for(;t>>0;return"go"+n})(a));if(!jr[s]){let t=a!==e?e:(e=>{let t,n=[{}];for(;t=je.exec(e.replace(jt,""));)t[4]?n.shift():t[3]?n.unshift(n[0][t[3]]=n[0][t[3]]||{}):n[0][t[1]]=t[2];return n[0]})(e);jr[s]=jn(i?{["@keyframes "+s]:t}:t,n?"":"."+s)}return o=jr[s],-1==t.data.indexOf(o)&&(t.data=r?o+t.data:t.data+o),s},ja=(e,t,n)=>e.reduce((e,r,i)=>{let o=t[i];if(o&&o.call){let e=o(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;o=t?"."+t:e&&"object"==typeof e?e.props?"":jn(e,""):!1===e?"":e}return e+r+(null==o?"":o)},"");function js(e){let t=this||{},n=e.call?e(t.p):e;return jo(n.unshift?n.raw?ja(n,[].slice.call(arguments,1),t.p):n.reduce((e,n)=>Object.assign(e,n&&n.call?n(t.p):n),{}):n,E9(t.target),t.g,t.o,t.k)}js.bind({g:1});let jl,ju,jc,jd=js.bind({k:1});function jf(e,t){let n=this||{};return function(){let r=arguments;function i(o,a){let s=Object.assign({},o),l=s.className||i.className;n.p=Object.assign({theme:ju&&ju()},s),n.o=/ *go\d+/.test(l),s.className=js.apply(n,r)+(l?" "+l:""),t&&(s.ref=a);let u=e;return e[0]&&(u=s.as||e,delete s.as),jc&&u[0]&&jc(s),jl(u,s)}return t?t(i):i}}function jh(){return(jh=Object.assign||function(e){for(var t=1;t-1&&jE.splice(e,1)}},[n]);var i=n.toasts.map(function(t){var n,r,i;return jh({},e,e[t.type],t,{duration:t.duration||(null==(n=e[t.type])?void 0:n.duration)||(null==(r=e)?void 0:r.duration)||jS[t.type],style:jh({},e.style,null==(i=e[t.type])?void 0:i.style,t.style)})});return jh({},n,{toasts:i})},jO=function(e){return function(t,n){var r,i=(void 0===(r=e)&&(r="blank"),jh({createdAt:Date.now(),visible:!0,type:r,ariaProps:{role:"status","aria-live":"polite"},message:t,pauseDuration:0},n,{id:(null==n?void 0:n.id)||jv()}));return jk({type:y.UPSERT_TOAST,toast:i}),i.id}},jC=function(e,t){return jO("blank")(e,t)};jC.error=jO("error"),jC.success=jO("success"),jC.loading=jO("loading"),jC.custom=jO("custom"),jC.dismiss=function(e){jk({type:y.DISMISS_TOAST,toastId:e})},jC.remove=function(e){return jk({type:y.REMOVE_TOAST,toastId:e})},jC.promise=function(e,t,n){var r=jC.loading(t.loading,jh({},n,null==n?void 0:n.loading));return e.then(function(e){return jC.success(jm(t.success,e),jh({id:r},n,null==n?void 0:n.success)),e}).catch(function(e){jC.error(jm(t.error,e),jh({id:r},n,null==n?void 0:n.error))}),e};var jM=function(e){var t=j_(e),n=t.toasts,r=t.pausedAt;(0,b.useEffect)(function(){if(!r){var e=Date.now(),t=n.map(function(t){if(t.duration!==1/0){var n=(t.duration||0)+t.pauseDuration-(e-t.createdAt);if(n<0){t.visible&&jC.dismiss(t.id);return}return setTimeout(function(){return jC.dismiss(t.id)},n)}});return function(){t.forEach(function(e){return e&&clearTimeout(e)})}}},[n,r]);var i=(0,b.useMemo)(function(){return{startPause:function(){jk({type:y.START_PAUSE,time:Date.now()})},endPause:function(){r&&jk({type:y.END_PAUSE,time:Date.now()})},updateHeight:function(e,t){return jk({type:y.UPDATE_TOAST,toast:{id:e,height:t}})},calculateOffset:function(e,t){var r,i=t||{},o=i.reverseOrder,a=void 0!==o&&o,s=i.gutter,l=void 0===s?8:s,u=i.defaultPosition,c=n.filter(function(t){return(t.position||u)===(e.position||u)&&t.height}),d=c.findIndex(function(t){return t.id===e.id}),f=c.filter(function(e,t){return t * {\n pointer-events: auto;\n }\n"]);return j9=function(){return e},e}c=b.createElement,jn.p=void 0,jl=c,ju=void 0,jc=void 0;var ke=function(e,t){var n=e.includes("top"),r=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return jh({left:0,right:0,display:"flex",position:"absolute",transition:jg()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:"translateY("+t*(n?1:-1)+"px)"},n?{top:0}:{bottom:0},r)},kt=js(j9()),kn=function(e){var t=e.reverseOrder,n=e.position,r=void 0===n?"top-center":n,i=e.toastOptions,o=e.gutter,a=e.children,s=e.containerStyle,l=e.containerClassName,u=jM(i),c=u.toasts,d=u.handlers;return(0,b.createElement)("div",{style:jh({position:"fixed",zIndex:9999,top:16,left:16,right:16,bottom:16,pointerEvents:"none"},s),className:l,onMouseEnter:d.startPause,onMouseLeave:d.endPause},c.map(function(e){var n,i=e.position||r,s=ke(i,d.calculateOffset(e,{reverseOrder:t,gutter:o,defaultPosition:r})),l=e.height?void 0:(n=function(t){d.updateHeight(e.id,t.height)},function(e){e&&setTimeout(function(){n(e.getBoundingClientRect())})});return(0,b.createElement)("div",{ref:l,className:e.visible?kt:"",key:e.id,style:s},"custom"===e.type?jm(e.message,e):a?a(e):(0,b.createElement)(j7,{toast:e,position:i}))}))};let kr=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};jC((0,x.jsx)(tq,{wrapEllipsis:!0,children:"string"==typeof e&&e.length>200?"".concat(e.slice(0,200)):e}),ka(t))},ki=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};jC.success((0,x.jsx)(tq,{wrapEllipsis:!0,children:"string"==typeof e&&e.length>200?"".concat(e.slice(0,200),"..."):e}),ka(t))},ko=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};jC.error((0,x.jsx)(tq,{wrapEllipsis:!0,children:"string"==typeof e&&e.length>200?"".concat(e.slice(0,200),"..."):e}),ka(t))};function ka(){let{className:e,...t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{position:"top-center",duration:6e3,className:(0,ea.cx)(tY(),"font-sans font-normal","text-gray-1100 dark:text-white","max-w-[800px] overflow-hidden text-ellipsis","[&>div]:overflow-hidden","[&>div]:flex-1",e),success:{icon:(0,x.jsx)("div",{className:"!flex-none w-5",children:(0,x.jsx)(s6.tEK,{className:"w-5 text-green-600"})})},error:{icon:(0,x.jsx)("div",{className:"!flex-none w-5",children:(0,x.jsx)(s6.Jsc,{className:"w-5 text-red-600"})})},...t}}function ks(){return(0,x.jsx)(kn,{toastOptions:ka()})}let kl=(e,t)=>{let n=t?"Copied ".concat(t," to clipboard"):"Copied to clipboard";kr(n),function(e){EN(this,void 0,void 0,function(){return ER(this,function(t){var n;if(EJ)return ED("Using `navigator.clipboard.writeText()`."),[2,EJ(e)];if(!function(e){return EN(this,void 0,void 0,function(){var t;return ER(this,function(n){var r,i,o,a,s,l,u,c;if(t="text/plain"in e,"undefined"==typeof ClipboardEvent&&void 0!==E1.clipboardData&&void 0!==E1.clipboardData.setData){if(!t)throw Error("No `text/plain` value was specified.");if(r=e["text/plain"],E1.clipboardData.setData("Text",r))return[2,!0];throw Error("Copying failed, possibly because the user rejected it.")}return E3(e)?(ED("regular execCopy worked"),[2,!0]):navigator.userAgent.indexOf("Edge")>-1?(ED('UA "Edge" => assuming success'),[2,!0]):E5(document.body,e)?(ED("copyUsingTempSelection worked"),[2,!0]):((i=document.createElement("div")).setAttribute("style","-webkit-user-select: text !important"),i.textContent="temporary element",document.body.appendChild(i),o=E5(i,e),document.body.removeChild(i),o)?(ED("copyUsingTempElem worked"),[2,!0]):(a=e["text/plain"],ED("copyTextUsingDOM"),(s=document.createElement("div")).setAttribute("style","-webkit-user-select: text !important"),l=s,s.attachShadow&&(ED("Using shadow DOM."),l=s.attachShadow({mode:"open"})),(u=document.createElement("span")).innerText=a,l.appendChild(u),document.body.appendChild(s),E6(u),c=document.execCommand("copy"),E8(),document.body.removeChild(s),c)?(ED("copyTextUsingDOM worked"),[2,!0]):[2,!1]})})}(((n={})["text/plain"]=e,n)))throw Error("writeText() failed");return[2]})})}(e)};function ku(e,t){return e?t&&e.length>t?"".concat(e.slice(0,t),"..."):"".concat(e.slice(0,t)):""}function kc(e){return(e||"").replace(/^addr:/,"").replace(/^txid:/,"").replace(/^fcid:/,"").replace(/^h:/,"").replace(/^scoid:/,"").replace(/^sfoid:/,"").replace(/^key:/,"")}function kd(e,t,n){return t?"".concat(e," ").concat(ku(t,n)):"".concat(e)}function kf(e,t){return"miner"===t?"minerPayout":"siafundClaim"===t?"siafundClaim":"contract"===t?"contractPayout":"foundation"===t?"foundationSubsidy":e.storageProofs&&e.storageProofs.length>0?"storageProof":e.fileContracts&&e.fileContracts.length>0&&e.fileContractRevisions&&e.fileContractRevisions.length>0?"contractRenewal":e.fileContractRevisions&&e.fileContractRevisions.length>0?"contractRevision":e.fileContracts&&e.fileContracts.length>0?"contractFormation":e.arbitraryData&&e.arbitraryData.length>0&&0===atob(e.arbitraryData[0]).indexOf("HostAnnouncement")?"hostAnnouncement":e.siafundOutputs&&e.siafundOutputs.length>0?"siafund":e.siacoinOutputs&&e.siacoinOutputs.length>0?"siacoin":void 0}let kh={transaction:"transaction",contract:"contract",block:"block",output:"output",address:"address",ip:"IP"},kp={siacoin:"siacoin transfer",siafund:"siafund transfer",contractFormation:"contract formation",contractRenewal:"contract renewal",contractRevision:"contract revision",contractPayout:"contract payout",storageProof:"storage proof",minerPayout:"miner payout",siafundClaim:"siafund claim",foundationSubsidy:"foundation subsidy",hostAnnouncement:"host announcement"};function km(e){return e?kh[e]:void 0}function kv(e){return e?kp[e]:void 0}function kg(e){let{value:t,displayValue:n,type:r,label:i,href:o,maxLength:a,size:s,scaleSize:l,weight:u,color:c="contrast",className:d}=e,f=i||km(r),h=a||("ip"===r?20:12),p=kc(t),m=n||p,v="".concat(null==m?void 0:m.slice(0,h)).concat(((null==m?void 0:m.length)||0)>h?"...":"");return(0,x.jsxs)("div",{className:(0,ea.cx)("flex items-center",d),children:[o?(0,x.jsx)(cK,{href:o,underline:"hover",size:s,scaleSize:l,color:c,weight:u,ellipsis:!0,children:v}):(0,x.jsx)(tq,{size:s,scaleSize:l,color:c,weight:u,ellipsis:!0,children:v}),(0,x.jsx)("div",{className:"ml-1 flex items-center",children:(0,x.jsx)(s5,{variant:"ghost",size:"none",onClick:e=>{e.stopPropagation(),kl(p,f)},children:(0,x.jsx)(tq,{color:c,children:(0,x.jsx)(s6.olJ,{className:"10"===s?"scale-75":"scale-90"})})})})]})}function ky(e){let{value:t,size:n,scaleSize:r,tooltip:i="",variant:o="change"}=e,a=(0,m0.yF)(String(t),{units:"SF"});return(0,x.jsx)(s4,{content:(i?"".concat(i," "):"")+a,children:(0,x.jsxs)(tq,{size:n,scaleSize:r,weight:"medium",font:"mono",color:"change"===o?t>0?"green":t<0?"red":"subtle":"contrast",children:["change"===o&&t>0?"+":"",a]})})}function kx(e){let{value:t,size:n,scaleSize:r,tooltip:i="",variant:o="change",color:a,fixed:s=3,dynamicUnits:l=!0,hastingUnits:u=!0,extendedSuffix:c,showTooltip:d=!0}=e,f=t.isGreaterThan(0)?"+":t.isLessThan(0)?"-":"",h=a||("change"===o?t.isGreaterThan(0)?"green":t.isLessThan(0)?"red":"subtle":"contrast"),p=(0,x.jsxs)(tq,{size:n,scaleSize:r,weight:"medium",font:"mono",ellipsis:!0,color:h,children:["change"===o?"".concat(f).concat((0,m0.Vz)(t.absoluteValue(),{fixed:s,dynamicUnits:l})):(0,m0.Vz)(t,{fixed:s,dynamicUnits:l,hastingUnits:u}),(0,x.jsx)(tq,{size:"20",weight:"medium",font:"mono",ellipsis:!0,color:"subtle",children:c?"".concat(c):""})]});return d?(0,x.jsx)(s4,{content:(i?"".concat(i," "):"")+(0,m0.Vz)(t,{fixed:16,dynamicUnits:!1}),children:p}):p}function kb(e){let{sc:t,size:n,scaleSize:r,color:i,tooltip:o="",variant:a="change",fixed:s,fixedTip:l=20,showTooltip:u=!0}=e,c=(0,fv.BW)(),{settings:{currency:d}}=(0,fm.Hv)(),f=t.isZero()?"":t.isGreaterThan(0)&&"change"===a?"+":t.isLessThan(0)?"-":"",h=i||("change"===a?t.isGreaterThan(0)?"green":t.isLessThan(0)?"red":"subtle":"contrast");if(!c.data)return null;let p=new(fd())(c.data.rates.sc[d.id]||1).times(t).div(1e24),m=void 0!==s?s:d.fixed,v=(0,x.jsx)(tq,{size:n,scaleSize:r,weight:"medium",font:"mono",ellipsis:!0,color:h,children:"".concat(f).concat(d.prefix).concat(kw(p.absoluteValue(),m))});return u?(0,x.jsx)(s4,{content:(o?"".concat(o," "):"")+"".concat(f).concat(d.prefix).concat(kw(p.absoluteValue(),l)),children:v}):v}function kw(e,t){let[n,r]=e.toFixed(t).split("."),i=new Intl.NumberFormat().format(parseInt(n));return r?"".concat(i).concat(Intl.NumberFormat().format(1.1).charAt(1)).concat(r):i}function kE(e){let{value:t,size:n,scaleSize:r,tooltip:i="",variant:o="change",fixed:a=3,fixedFiat:s,fixedTipFiat:l,dynamicUnits:u=!0,hastingUnits:c=!0,extendedSuffix:d,showTooltip:f=!0,displayBoth:h=!1,displayBothDirection:p="column"}=e,{settings:{currencyDisplay:m}}=(0,fm.Hv)(),v=(0,fv.BW)(),g=(0,b.useMemo)(()=>(0,x.jsx)(kx,{value:t,size:n,color:h&&"row"===p&&"bothPreferFiat"===m?"subtle":void 0,scaleSize:r,tooltip:i,variant:o,fixed:a,dynamicUnits:u,hastingUnits:c,extendedSuffix:d,showTooltip:f}),[t,n,r,i,o,a,u,c,d,f,m,h,p]),y=(0,b.useMemo)(()=>(0,x.jsx)(kb,{sc:t,size:n,color:h&&"row"===p&&"bothPreferSc"===m?"subtle":void 0,scaleSize:r,tooltip:i,variant:o,fixed:s,fixedTip:l,dynamicUnits:u,hastingUnits:c,extendedSuffix:d,showTooltip:f}),[t,n,r,i,o,s,l,u,c,d,f,m,h,p]);return"sc"!==m&&v.data?"fiat"===m?y:"bothPreferSc"===m?h?(0,x.jsxs)("div",{className:"column"===p?"flex flex-col items-end":"flex gap-1",children:[g,y]}):g:"bothPreferFiat"===m?h?(0,x.jsxs)("div",{className:"column"===p?"flex flex-col items-end":"flex gap-1",children:[y,g]}):y:g:g}function kj(e){let{value:t,size:n="14",weight:r="semibold",tooltip:i="",variant:o="change",color:a,format:s}=e,l=t.isGreaterThan(0)?"+":t.isLessThan(0)?"-":"",u="change"===o?t.isGreaterThan(0)?"green":t.isLessThan(0)?"red":"subtle":"contrast";return(0,x.jsx)(s4,{content:(i?"".concat(i," "):"")+s(t),children:(0,x.jsx)(tq,{size:n,weight:r,font:"mono",ellipsis:!0,color:a||u,children:"change"===o?"".concat(l).concat(s(t.absoluteValue())):s(t)})})}var kk=n(61258),kS=n.n(kk);function k_(e){let{skeletonCount:t=10}=e;return(0,x.jsx)(x.Fragment,{children:kS()(t,e=>(0,x.jsxs)("div",{className:(0,ea.cx)("relative flex gap-4 p-3.5",(0,ea.cx)("border-t border-gray-200 dark:border-graydark-300","first:border-none")),children:[(0,x.jsx)(f_,{className:"w-[60px] h-[50px]"}),(0,x.jsxs)("div",{className:"flex flex-col gap-2 w-full",children:[(0,x.jsx)(f_,{className:"w-[90%] h-[20px]"}),(0,x.jsx)(f_,{className:"w-[140px] h-[14px]"})]})]},e))})}var kO=n(66700),kC=n(19785);function kM(e,t){(0,kC.Z)(2,arguments);var n=(0,kO.Z)(e),r=(0,kO.Z)(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}var kA={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}},kT={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function kP(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var kN={date:kP({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:kP({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:kP({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},kR={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function kD(e){return function(t,n){var r,i=n||{};if("formatting"===(i.context?String(i.context):"standalone")&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,a=i.width?String(i.width):o;r=e.formattingValues[a]||e.formattingValues[o]}else{var s=e.defaultWidth,l=i.width?String(i.width):e.defaultWidth;r=e.values[l]||e.values[s]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function kL(e){return function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.width,o=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;var s=a[0],l=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(l)?function(e,t){for(var n=0;n0?"in "+r:r+" ago":r},formatLong:kN,formatRelative:function(e,t,n,r){return kR[e]},localize:{ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:kD({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:kD({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:kD({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:kD({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:kD({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(d={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(d.matchPattern);if(!n)return null;var r=n[0],i=e.match(d.parsePattern);if(!i)return null;var o=d.valueCallback?d.valueCallback(i[0]):i[0];return{value:o=t.valueCallback?t.valueCallback(o):o,rest:e.slice(r.length)}}),era:kL({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:kL({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:kL({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:kL({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:kL({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function kV(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}var kz=n(23779),kI=n.n(kz);function kZ(e){let{type:t,label:n,initials:r,href:i,src:o,shape:a}=e,s=(0,x.jsx)(lc,{interactive:!!i,fallback:r||t&&(t||n||"").split(" ").map(e=>e.charAt(0).toUpperCase).join(""),src:o,shape:a||(t&&"address"!==t&&"block"!==t?"circle":"square")}),l=i&&(0,x.jsx)(cK,{href:i,underline:"none",children:s}),u=l||s;return t?(0,x.jsx)(s4,{content:n||km(t),children:(0,x.jsx)("div",{className:"",children:u})}):u}function kB(e){let{label:t,type:n,avatar:r,avatarShape:i,initials:o,href:a,onClick:s,children:l}=e;return(0,x.jsxs)("div",{className:(0,ea.cx)("flex gap-4 p-4",(0,ea.cx)("border-t border-gray-200 dark:border-graydark-300","first:border-none")),onClick:s,children:[(0,x.jsx)(kZ,{label:t,type:n,shape:i,src:r,initials:o||(n||t||"").split(" ").map(e=>e.charAt(0).toUpperCase()).join(""),href:a}),l]})}function kH(e){let t=e.sc,n=e.sf,r=e.hash&&(0,x.jsx)(kg,{value:e.hash,type:e.type,label:e.label,href:e.href,color:"subtle"}),i=e.label||"transaction"===e.type&&e.txType&&kv(e.txType)||km(e.type),o=!function(e){if(!e)return!1;try{return new URL(e),!0}catch(e){return!1}}(i)?kI()(i):i;return(0,x.jsx)(kB,{...e,children:(0,x.jsxs)("div",{className:"flex flex-col items-center gap-1 w-full",children:[(0,x.jsxs)("div",{className:"flex gap-2 items-center w-full",children:[(0,x.jsxs)("div",{className:"flex gap-2 items-center",children:[e.height&&e.blockHref&&(0,x.jsx)(tq,{color:"subtle",weight:"semibold",children:(0,x.jsx)(cK,{href:e.blockHref,underline:"none",children:(0,m0.yF)(e.height)})}),(0,x.jsx)(tq,{weight:"medium",children:o||r})]}),(0,x.jsx)("div",{className:"flex-1"}),!!t&&(0,x.jsx)(kE,{variant:e.scVariant,value:t}),!!n&&(0,x.jsx)(ky,{variant:e.sfVariant,value:n})]}),(0,x.jsxs)("div",{className:"flex justify-between w-full",children:[(0,x.jsx)("div",{className:"flex gap-1",children:!!o&&r}),(0,x.jsxs)("div",{className:"flex gap-1 items-center",children:[e.unconfirmed?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(tq,{color:"verySubtle",children:"unconfirmed"}),e.timestamp?(0,x.jsx)(tq,{color:"verySubtle",children:(0,x.jsx)(s6.Bpb,{className:"scale-50"})}):null]}):null,e.timestamp&&(0,x.jsx)(tq,{color:"subtle",children:function(e,t){var n,r,i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,kC.Z)(2,arguments);var a=o.locale||kF;if(!a.formatDistance)throw RangeError("locale must contain formatDistance property");var s=kM(e,t);if(isNaN(s))throw RangeError("Invalid time value");var l=function(e,t){if(null==e)throw TypeError("assign requires that input parameter not be null or undefined");for(var n in t=t||{})Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}({},o);l.addSuffix=!!o.addSuffix,l.comparison=s,s>0?(n=(0,kO.Z)(t),r=(0,kO.Z)(e)):(n=(0,kO.Z)(e),r=(0,kO.Z)(t));var u=function(e,t,n){(0,kC.Z)(2,arguments);var r,i=function(e,t){return(0,kC.Z)(2,arguments),(0,kO.Z)(e).getTime()-(0,kO.Z)(t).getTime()}(e,t)/1e3;return((r=null==n?void 0:n.roundingMethod)?kA[r]:kA.trunc)(i)}(r,n),c=Math.round((u-(kV(r)-kV(n))/1e3)/60);if(c<2){if(o.includeSeconds){if(u<5)return a.formatDistance("lessThanXSeconds",5,l);if(u<10)return a.formatDistance("lessThanXSeconds",10,l);if(u<20)return a.formatDistance("lessThanXSeconds",20,l);if(u<40)return a.formatDistance("halfAMinute",null,l);else if(u<60)return a.formatDistance("lessThanXMinutes",1,l);else return a.formatDistance("xMinutes",1,l)}return 0===c?a.formatDistance("lessThanXMinutes",1,l):a.formatDistance("xMinutes",c,l)}if(c<45)return a.formatDistance("xMinutes",c,l);if(c<90)return a.formatDistance("aboutXHours",1,l);if(c<1440){var d=Math.round(c/60);return a.formatDistance("aboutXHours",d,l)}if(c<2520)return a.formatDistance("xDays",1,l);if(c<43200){var f=Math.round(c/1440);return a.formatDistance("xDays",f,l)}if(c<86400)return i=Math.round(c/43200),a.formatDistance("aboutXMonths",i,l);if((i=function(e,t){(0,kC.Z)(2,arguments);var n,r=(0,kO.Z)(e),i=(0,kO.Z)(t),o=kM(r,i),a=Math.abs(function(e,t){(0,kC.Z)(2,arguments);var n=(0,kO.Z)(e),r=(0,kO.Z)(t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}(r,i));if(a<1)n=0;else{1===r.getMonth()&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-o*a);var s=kM(r,i)===-o;(function(e){(0,kC.Z)(1,arguments);var t=(0,kO.Z)(e);return(function(e){(0,kC.Z)(1,arguments);var t=(0,kO.Z)(e);return t.setHours(23,59,59,999),t})(t).getTime()===(function(e){(0,kC.Z)(1,arguments);var t=(0,kO.Z)(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t})(t).getTime()})((0,kO.Z)(e))&&1===a&&1===kM(e,i)&&(s=!1),n=o*(a-Number(s))}return 0===n?0:n}(r,n))<12){var h=Math.round(c/43200);return a.formatDistance("xMonths",h,l)}var p=i%12,m=Math.floor(i/12);return p<3?a.formatDistance("aboutXYears",m,l):p<9?a.formatDistance("overXYears",m,l):a.formatDistance("almostXYears",m+1,l)}(new Date(e.timestamp),new Date,{addSuffix:!0})})]})]})]})})}function kU(e){let{title:t,actions:n,dataset:r,isLoading:i,emptyState:o,emptyMessage:a,skeletonCount:s=10,children:l}=e,u="emptyState";return!i||(null==r?void 0:r.length)||l||(u="skeleton"),((null==r?void 0:r.length)||l)&&(u="currentData"),(0,x.jsx)(tG,{children:(0,x.jsxs)("div",{className:"flex flex-col rounded overflow-hidden",children:[(t||n)&&(0,x.jsxs)("div",{className:"flex items-center p-4 border-b border-gray-200 dark:border-graydark-300",children:[t&&(0,x.jsx)(cz,{size:"20",font:"mono",ellipsis:!0,children:t}),(0,x.jsx)("div",{className:"flex-1"}),n]}),(0,x.jsxs)("div",{className:"flex flex-col rounded overflow-hidden",children:["emptyState"===u&&(o||(0,x.jsx)("div",{className:(0,ea.cx)("flex items-center justify-center h-[84px]",(0,ea.cx)("border-t border-gray-200 dark:border-graydark-300","first:border-none")),children:(0,x.jsx)(tq,{size:"18",color:"subtle",children:a||"No results"})})),"currentData"===u&&(l||(null==r?void 0:r.map((e,t)=>(0,x.jsx)(kH,{...e},e.hash||e.label||t)))),"skeleton"===u&&(0,x.jsx)(k_,{skeletonCount:s})]})]})})}function kW(e){let{label:t,entityType:n,entityValue:r,actions:i,href:o,value:a,extendedSuffix:s,hash:l,sc:u,sf:c,comment:d,commentTip:f,scaleSize:h="40",isLoading:p,onClick:m}=e,v=(0,x.jsx)(tq,{color:"subtle",size:"12",className:"h-6",children:d});return(0,x.jsx)(tG,{children:(0,x.jsx)("div",{className:(0,ea.cx)("flex items-center py-2 px-4 h-full min-w-[250px]",m?"cursor-pointer":""),onClick:m,children:(0,x.jsxs)("div",{className:"flex flex-col gap-4 flex-wrap items-start w-full",children:[(0,x.jsxs)("div",{className:"flex relative top-px flex-1 w-full gap-6 items-center justify-between",children:[(0,x.jsx)(tq,{color:"subtle",ellipsis:!0,scaleSize:"14",children:"string"==typeof t?kI()(t):t}),i]}),(0,x.jsxs)("div",{className:"flex flex-col items-end md:items-start gap-2 md:flex-2",children:[p?(0,x.jsx)(f_,{className:"h-12 w-[150px]"}):(0,x.jsxs)(x.Fragment,{children:[void 0!==u&&(0,x.jsx)(kE,{extendedSuffix:s,scaleSize:h,variant:"value",value:u,fixed:0}),void 0!==c&&(0,x.jsx)(ky,{scaleSize:h,variant:"value",value:c}),n&&(r?(0,x.jsx)(kg,{scaleSize:h,label:km(n),href:o,value:r,displayValue:"block"===n&&r?Number(r).toLocaleString():r,className:"relative top-0.5"}):(0,x.jsx)(tq,{font:"mono",weight:"medium",scaleSize:h,children:"-"})),l&&(0,x.jsx)(kg,{scaleSize:h,label:"hash",value:l}),void 0!==a&&(0,x.jsx)(tq,{font:"mono",weight:"medium",scaleSize:h,ellipsis:!0,children:a})]}),v?(0,x.jsx)("div",{className:"mt-1",children:p?(0,x.jsx)("div",{className:"mt-1 h-6 justify-center",children:(0,x.jsx)(f_,{className:"h-4 w-[100px]"})}):f?(0,x.jsx)(s4,{content:f,children:v}):v}):null]})]})})})}function kq(e){let{title:t,actions:n,name:r}=e;return(0,x.jsxs)("div",{className:"flex gap-0.5 items-center",children:[t?(0,x.jsx)(cY,{htmlFor:r,noWrap:!0,children:t}):null,n]})}function k$(e){var t;let{form:n,name:r}=e,i=n.formState.errors[r],o=null===(t=n.formState.errors[r])||void 0===t?void 0:t.message;return i?(0,x.jsx)(tq,{size:"14",color:"red",children:o}):null}function kY(e){let{form:t,title:n,actions:r,name:i,className:o,wrap:a}=e,s=t.formState.errors[i];return n||s?(0,x.jsxs)("div",{className:(0,ea.cx)("flex justify-between items-center gap-x-4 overflow-hidden",a?"flex-wrap":"",o),children:[(0,x.jsx)(kq,{name:i,title:n,actions:r}),(0,x.jsx)(k$,{form:t,name:i})]}):null}function kG(e){let{children:t,...n}=e;return(0,x.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,x.jsx)(kY,{...n}),t]})}function kX(e){let{form:t,size:n="medium",variant:r="accent",children:i}=e;return(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(s5,{size:n,variant:r,state:t.formState.isSubmitting?"waiting":void 0,type:"submit",children:t.formState.isSubmitting?(0,x.jsx)(EA,{}):i})})}function kK(e){let{formik:t,title:n,name:r,placeholder:i,disabled:o,readOnly:a,autoComplete:s="off",spellCheck:l=!1,tabIndex:u,allowDecimals:c=!1,decimalsLimitFiat:d=3,decimalsLimitSc:f=3,decimalsLimit:h=2,disableGroupSeparators:p=!1,showFiat:m=!0,units:v,type:g,variants:y}=e;return(0,x.jsx)(k2,{formik:t,title:n,name:r,children:"number"===g?(0,x.jsx)(kJ,{formik:t,name:r,units:v,disabled:o,readOnly:a,tabIndex:u,decimalsLimit:h,allowDecimals:c,disableGroupSeparators:p,placeholder:i,variants:y}):"siacoin"===g?(0,x.jsx)(k0,{formik:t,name:r,disabled:o,readOnly:a,placeholder:i,tabIndex:u,showFiat:m,decimalsLimitFiat:d,decimalsLimitSc:f,variants:y}):(0,x.jsx)(kQ,{formik:t,name:r,autoComplete:s,disabled:o,readOnly:a,placeholder:i,tabIndex:u,spellCheck:l,type:g,variants:y})})}function kQ(e){let{formik:t,name:n,placeholder:r,autoComplete:i="off",disabled:o,readOnly:a,tabIndex:s,spellCheck:l=!1,type:u,variants:c}=e;return(0,x.jsx)(dJ,{id:n,name:n,autoComplete:i,disabled:o,spellCheck:l,placeholder:r,tabIndex:s,readOnly:a||t.isSubmitting,type:u,onBlur:t.handleBlur,onChange:t.handleChange,value:t.values[n]||"",...c})}function kJ(e){let{formik:t,name:n,units:r,disabled:i,readOnly:o,tabIndex:a,placeholder:s,decimalsLimit:l,allowDecimals:u=!1,disableGroupSeparators:c=!1,variants:d}=e;return(0,x.jsx)(fh,{id:n,units:r,name:n,placeholder:new(fd())(s),disabled:i,allowDecimals:u,decimalsLimit:l,disableGroupSeparators:c,readOnly:o||t.isSubmitting,tabIndex:a,onBlur:t.handleBlur,onChange:e=>t.setFieldValue(n,e),value:t.values[n],...d})}function k0(e){let{formik:t,name:n,disabled:r,readOnly:i,tabIndex:o,placeholder:a,showFiat:s,decimalsLimitFiat:l=3,decimalsLimitSc:u=3,variants:c}=e;return(0,x.jsx)(fy,{id:n,name:n,disabled:r,showFiat:s,decimalsLimitFiat:l,decimalsLimitSc:u,readOnly:i||t.isSubmitting,tabIndex:o,onFocus:()=>t.setFieldTouched(n),sc:new(fd())(t.values[n]),placeholder:new(fd())(a),onChange:e=>t.setFieldValue(n,null==e?void 0:e.toString()),...c})}function k1(e){var t,n;let{formik:r,title:i,name:o,withStatusError:a=!1,className:s}=e,l=r.errors[o]&&r.touched[o]||a&&(null===(t=r.status)||void 0===t?void 0:t.error),u=r.errors[o]||a&&(null===(n=r.status)||void 0===n?void 0:n.error);return(i||l)&&(0,x.jsxs)("div",{className:(0,ea.cx)("flex justify-between items-center gap-4",s),children:[i?(0,x.jsx)(cY,{htmlFor:o,children:i}):(0,x.jsx)("div",{}),l&&(0,x.jsx)(tq,{size:"14",color:"red",children:u})]})}function k2(e){let{children:t,...n}=e;return(0,x.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,x.jsx)(k1,{...n}),t]})}function k4(e){var t;let{formik:n,size:r="medium",variant:i="accent",withStatusError:o=!0,children:a}=e;return(0,x.jsxs)(x.Fragment,{children:[o&&(null===(t=n.status)||void 0===t?void 0:t.error)&&(0,x.jsx)(tq,{color:"red",children:n.status.error}),(0,x.jsx)(s5,{size:r,variant:i,state:n.isSubmitting?"waiting":void 0,type:"submit",children:n.isSubmitting?(0,x.jsx)(EA,{}):a})]})}function k3(e){let{columns:t,data:n,context:r,sortField:i,sortDirection:o,sortableColumns:a,toggleSort:s,summary:l,rowSize:u="default",pageSize:c,isLoading:d,emptyState:f,focusId:h,focusColor:p="default"}=e,m="emptyState";!d||(null==n?void 0:n.length)||(m="skeleton"),(null==n?void 0:n.length)&&(m="currentData");let v=(0,b.useCallback)((e,n,r)=>(0,ea.cx)(0===e?"pl-6":"pl-4",e===t.length-1?"pr-6":"pr-4",r?[0===e?"rounded-tl-lg":"",e===t.length-1?"rounded-tr-lg":""]:"",n),[t]),g=(0,b.useCallback)((e,t)=>(0,ea.cx)("flex items-center",t),[]);return(0,x.jsxs)(tG,{children:[(0,x.jsxs)("table",{className:"relative z-10 table-auto border-collapse w-full",children:[(0,x.jsx)("thead",{className:(0,ea.cx)("sticky top-0 z-20 bg-white dark:bg-graydark-100","shadow-border-b shadow-gray-400 dark:shadow-graydark-300"),children:(0,x.jsx)("tr",{children:t.map((e,t)=>{let{id:n,icon:r,label:l,tip:u,cellClassName:c,contentClassName:d}=e,f=(null==a?void 0:a.includes(n))&&!!s,h=i===n;return(0,x.jsx)("th",{className:(0,ea.cx)(v(t,c,!1),"border-b border-gray-400 dark:border-graydark-400"),children:(0,x.jsx)("div",{className:(0,ea.cx)("overflow-hidden","py-3"),children:(0,x.jsxs)("div",{onClick:()=>{f&&s(n)},className:(0,ea.cx)(g(t,d),f?"cursor-pointer":""),children:[(0,x.jsx)(s4,{content:u,children:(0,x.jsxs)(tq,{color:"subtle",className:"relative flex gap-1",ellipsis:!0,children:[r?(0,x.jsx)("div",{children:r}):null,(0,x.jsx)(tq,{ellipsis:!0,size:"12",weight:"medium",children:l})]})}),h&&(0,x.jsx)(tq,{color:"contrast",children:"asc"===o?(0,x.jsx)(s6.kqg,{className:"scale-75"}):(0,x.jsx)(s6.EMN,{className:"scale-75"})}),f&&!h&&(0,x.jsx)(tq,{color:"verySubtle",children:(0,x.jsx)(s6.kqg,{className:"scale-75"})})]})})},n)})})}),(0,x.jsxs)("tbody",{className:"bg-gray-50 dark:bg-graydark-50",children:[l&&(0,x.jsx)("tr",{className:"bg-gray-50 dark:bg-graydark-50 border-l border-r border-b border-gray-200 dark:border-graydark-200",children:t.map((e,t)=>{let{id:n,summary:r,contentClassName:i,cellClassName:o}=e;return(0,x.jsx)("td",{className:v(t,o,!1),children:(0,x.jsx)("div",{className:g(t,i),children:r&&r()})},n)})}),"currentData"===m&&(null==n?void 0:n.map(e=>(0,x.jsx)("tr",{id:e.id,onClick:e.onClick,className:(0,ea.cx)("border-b border-gray-200/50 dark:border-graydark-100",e.onClick?"cursor-pointer":""),children:t.map((t,n)=>{let{id:i,render:o,contentClassName:a,cellClassName:s}=t;return(0,x.jsx)("td",{className:(0,ea.cx)(v(n,s,!1),h&&h===e.id?["shadow-border-y","first:shadow-border-tlb","last:shadow-border-trb"]:"","default"===p?"!shadow-blue-900 dark:!shadow-blue-200":"","blue"===p?"!shadow-blue-500 dark:!shadow-blue-400":"","red"===p?"!shadow-red-500 dark:!shadow-red-400":"","amber"===p?"!shadow-amber-500 dark:!shadow-amber-500":"","green"===p?"!shadow-green-500 dark:!shadow-green-400":""),children:(0,x.jsx)("div",{className:(0,ea.cx)(g(n,a),"dense"===u?"h-[50px]":"h-[100px]"),children:(0,x.jsx)(o,{data:e,context:r})})},"".concat(i,"/").concat(e.id))})},e.id))),"skeleton"===m&&kS()(c).map(e=>(0,x.jsx)("tr",{className:"border-b border-gray-200/50 dark:border-graydark-100",children:t.map((e,t)=>{let{id:n,contentClassName:r,cellClassName:i}=e;return(0,x.jsx)("td",{className:v(t,i,!1),children:(0,x.jsx)("div",{className:(0,ea.cx)(g(t,r),"dense"===u?"h-[50px]":"h-[100px]")})},"".concat(t,"/").concat(n))})},e))]})]}),"emptyState"===m&&f]})}var k5=n(5632);function k6(e){let{offset:t,limit:n,datasetTotal:r,isLoading:i}=e,o=(0,k5.useRouter)();return(0,x.jsxs)(lg,{children:[(0,x.jsx)(s5,{icon:"contrast",disabled:t<=0,size:"small",variant:"gray",className:"rounded-r-none",onClick:()=>o.push({query:{...o.query,offset:0}}),children:(0,x.jsx)("div",{className:"flex scale-[0.65]",children:(0,x.jsx)(s6.XJM,{})})}),(0,x.jsx)(s5,{icon:"contrast",disabled:t<=0,size:"small",variant:"gray",className:"rounded-none",onClick:()=>o.push({query:{...o.query,offset:Math.max(t-n,0)}}),children:(0,x.jsx)(s6.bdU,{})}),(0,x.jsx)(s5,{state:"waiting",className:"rounded-none px-3",children:r>0?"".concat(t+1," - ").concat(Math.min(t+n,r)," of ").concat(r?r.toLocaleString():""):i?(0,x.jsx)(EA,{className:"px-2"}):"No results"}),(0,x.jsx)(s5,{icon:"contrast",disabled:t+n>=r,size:"small",variant:"gray",className:"rounded-none",onClick:()=>o.push({query:{...o.query,offset:Math.min(t+n,r)}}),children:(0,x.jsx)(s6.VUy,{})}),(0,x.jsx)(s5,{icon:"contrast",disabled:t+n>=r,size:"small",variant:"gray",className:"rounded-l-none",onClick:()=>o.push({query:{...o.query,offset:Math.floor(r/n)*n}}),children:(0,x.jsx)("div",{className:"flex",style:{transform:"scale(0.65)"},children:(0,x.jsx)(s6.RRj,{})})})]})}function k8(e){let{offset:t,limit:n,pageTotal:r,isLoading:i}=e,o=(0,k5.useRouter)(),a=Math.min(t+n,t+r);return(0,x.jsxs)(lg,{children:[(0,x.jsx)(s5,{icon:"contrast",disabled:t<=0,size:"small",variant:"gray",className:"rounded-r-none",onClick:()=>o.push({query:{...o.query,offset:0}}),children:(0,x.jsx)("div",{className:"flex scale-[0.65]",children:(0,x.jsx)(s6.XJM,{})})}),(0,x.jsx)(s5,{icon:"contrast",disabled:t<=0,size:"small",variant:"gray",className:"rounded-none",onClick:()=>o.push({query:{...o.query,offset:Math.max(t-n,0)}}),children:(0,x.jsx)(s6.bdU,{})}),i?(0,x.jsx)(s5,{className:"rounded-none px-3",state:"waiting",color:"subtle",children:(0,x.jsx)(EA,{className:"px-2"})}):r?(0,x.jsxs)(s5,{className:"rounded-none px-3",state:"waiting",children:[t+1," - ",a]}):(0,x.jsx)(s5,{className:"rounded-none px-3",state:"waiting",color:"subtle",children:"none"}),(0,x.jsx)(s5,{icon:"contrast",disabled:!(r>=n),size:"small",variant:"gray",className:"rounded-none",onClick:()=>o.push({query:{...o.query,offset:t+n}}),children:(0,x.jsx)(s6.VUy,{})})]})}function k7(e){let{title:t,nav:n,stats:r,actions:i}=e;return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)("div",{className:"flex items-center gap-2 px-6 h-14 z-10 bg-white dark:bg-graydark-50 border-b border-gray-500 dark:border-graydark-500",children:[t?"string"==typeof t?(0,x.jsx)(tq,{font:"mono",size:"18",weight:"bold",className:"hidden lg:block relative -top-px",children:t}):t:null,(0,x.jsxs)("div",{className:"flex-1 flex gap-4 items-center justify-between h-full px-1 -mx-1 overflow-x-hidden",children:[(0,x.jsx)("div",{className:"flex gap-2 items-center h-full flex-1 overflow-x-hidden",children:n}),(0,x.jsx)("div",{className:"flex gap-2 items-center h-full",children:i})]})]}),r&&(0,x.jsx)("div",{className:"flex items-center gap-2 px-6 py-2 h-14 z-10 bg-gray-50 dark:bg-graydark-50 border-b border-gray-300 dark:border-graydark-300",children:r})]})}let k9=("string"==typeof(f={src:"/_next/static/media/background-pattern.b997b25c.jpg",height:104,width:34,blurDataURL:"data:image/jpeg;base64,/9j/2wBDAAoHBwgHBgoICAgLCgoLDhgQDg0NDh0VFhEYIx8lJCIfIiEmKzcvJik0KSEiMEExNDk7Pj4+JS5ESUM8SDc9Pjv/2wBDAQoLCw4NDhwQEBw7KCIoOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozv/wAARCAAIAAMDASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAX/xAAZEAADAAMAAAAAAAAAAAAAAAAAAQISIpH/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8ArRbxWi6AAP/Z",blurWidth:3,blurHeight:8})?{src:f}:f).src;function Se(e){let{children:t}=e;return(0,x.jsxs)("div",{className:"relative -z-10 opacity-100 pointer-events-none",children:[(0,x.jsx)("div",{className:"fixed top-0 left-0 right-0 bottom-0 z-10 bg-white dark:bg-graydark-50"}),(0,x.jsx)("div",{className:"fixed top-0 left-0 right-0 w-[200vw] h-[200vh] opacity-30 z-30 translate-x[-50vw] translate-y[-100vh]",style:{backgroundImage:"url(".concat(k9,")"),backgroundPositionY:"bottom",backgroundSize:"auto"}}),(0,x.jsx)("div",{className:"fixed top-0 left-0 right-0 bottom-0 opacity-95 z-40 bg-white dark:bg-graydark-50"}),t]})}var St=n(97729),Sn=n.n(St);function Sr(e){let{appName:t,title:n,children:r}=e,i=n?"".concat(t," - ").concat(n):t;return(0,x.jsxs)(Sn(),{children:[(0,x.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0"}),(0,x.jsx)("link",{rel:"apple-touch-icon",sizes:"180x180",href:"/apple-touch-icon.png"}),(0,x.jsx)("link",{rel:"icon",type:"image/png",sizes:"32x32",href:"/favicon-32x32.png"}),(0,x.jsx)("link",{rel:"icon",type:"image/png",sizes:"16x16",href:"/favicon-16x16.png"}),(0,x.jsx)("link",{rel:"manifest",href:"/site.webmanifest"}),(0,x.jsx)("link",{rel:"mask-icon",href:"/safari-pinned-tab.svg",color:"#1ed660"}),(0,x.jsx)("meta",{name:"msapplication-TileColor",content:"#2b5797"}),(0,x.jsx)("meta",{name:"theme-color",content:"#ffffff"}),r,(0,x.jsx)("title",{children:i})]})}function Si(e){let{appName:t,title:n,children:r}=e;return(0,x.jsxs)("div",{className:"h-screen",children:[(0,x.jsx)(Sr,{appName:t,title:n}),r]})}function So(e){let{appName:t,title:n,children:r,filters:i,actions:o}=e;return(0,x.jsxs)(Si,{appName:t,title:n,children:[(0,x.jsx)(Se,{}),(0,x.jsx)("div",{className:"flex h-full",children:(0,x.jsxs)("div",{className:"flex flex-col flex-1",children:[(0,x.jsx)(k7,{nav:i,actions:o}),(0,x.jsx)("div",{className:"flex-1",children:(0,x.jsx)(lx,{className:"h-full",children:r})})]})})]})}function Sa(e){let{side:t,balanceSc:n,children:r}=e;return n?(0,x.jsx)(s4,{side:t,content:(0,x.jsxs)("div",{className:"flex flex-col justify-center gap-2",children:[(0,x.jsxs)("div",{className:"flex gap-4",children:[(0,x.jsxs)("div",{className:"flex flex-col flex-1",children:[(0,x.jsx)(tq,{children:"spendable"}),(0,x.jsx)(tq,{color:"subtle",children:"All confirmed outputs not in-use."})]}),(0,x.jsx)("div",{className:"flex justify-end",children:(0,x.jsx)(kE,{displayBoth:!0,variant:"value",value:n.spendable})})]}),(0,x.jsx)(cb,{className:"w-full"}),(0,x.jsxs)("div",{className:"flex gap-4",children:[(0,x.jsxs)("div",{className:"flex flex-col flex-1",children:[(0,x.jsx)(tq,{children:"confirmed"}),(0,x.jsx)(tq,{color:"subtle",children:"All confirmed outputs."})]}),(0,x.jsx)("div",{className:"flex justify-end",children:(0,x.jsx)(kE,{displayBoth:!0,variant:"value",value:n.confirmed})})]}),(0,x.jsx)(cb,{className:"w-full"}),(0,x.jsxs)("div",{className:"flex gap-4",children:[(0,x.jsxs)("div",{className:"flex flex-col flex-1",children:[(0,x.jsx)(tq,{children:"unconfirmed"}),(0,x.jsx)(tq,{color:"subtle",children:"All unconfirmed outputs not in-use."})]}),(0,x.jsx)("div",{className:"flex justify-end",children:(0,x.jsx)(kE,{displayBoth:!0,variant:"value",value:n.unconfirmed})})]})]}),children:(0,x.jsx)("div",{children:r})}):null}function Ss(e){let{balanceSc:t,isSynced:n,syncingMessage:r}=e;if(!t)return null;let i=(0,x.jsx)(kE,{showTooltip:!1,value:t.spendable.plus(t.unconfirmed),variant:"value",size:"12",fixed:0,fixedFiat:0});return n?(0,x.jsx)(Sa,{side:"right",balanceSc:t,children:i}):(0,x.jsx)(s4,{side:"right",content:r||"Blockchain is syncing, balance may be incorrect.",children:(0,x.jsx)("div",{children:i})})}var Sl=n(82876);function Su(e){let{title:t,children:n,route:r,onClick:i}=e,o=(0,Sl.usePathname)(),a=r&&("/"===r?o===r:null==o?void 0:o.startsWith(r));return r?(0,x.jsx)(cK,{href:r,className:"no-underline",children:(0,x.jsx)(s4,{side:"right",align:"center",delayDuration:0,sideOffset:5,content:t,children:(0,x.jsx)(s5,{icon:"contrast",size:"none",variant:"state","data-state":a?"open":"closed",onClick:i,children:n})})}):(0,x.jsx)(s4,{side:"right",align:"center",delayDuration:0,sideOffset:5,content:t,children:(0,x.jsx)(s5,{icon:"contrast",size:"none",variant:"state","data-state":a?"open":"closed",onClick:i,children:n})})}function Sc(e){let{walletBalanceSc:t,isSynced:n,routes:r}=e;return(0,x.jsx)(Su,{title:"Wallet",route:r.wallet.view,children:(0,x.jsxs)("div",{className:"flex flex-col gap-3 items-center",children:[(0,x.jsx)(s6.oaN,{}),n&&t&&(0,x.jsx)(Ss,{isSynced:n,balanceSc:t})]})})}function Sd(e){let{routes:t,profile:n,isSynced:r,showWallet:i=!0,walletBalanceSc:o,lock:a,openSettings:s,children:l}=e;return(0,x.jsx)(tG,{className:"relative overflow-hidden z-10 h-full w-[75px] rounded-none border-y-0",children:(0,x.jsxs)("div",{className:"flex flex-col items-center h-full",children:[(0,x.jsx)("div",{className:"flex items-center justify-center",style:{height:"".concat(60,"px")},children:n||(0,x.jsx)(cJ,{size:30})}),(0,x.jsxs)("div",{className:"flex flex-col gap-6 items-center pt-4 pb-6 h-full",children:[(0,x.jsx)("div",{className:"flex flex-col gap-6 items-center",children:l}),(0,x.jsx)("div",{className:"flex-1"}),(0,x.jsx)(cb,{className:"w-full"}),i&&(0,x.jsx)(Sc,{routes:t,isSynced:r,walletBalanceSc:o}),(0,x.jsx)(Su,{title:"Blockchain node",route:t.node.index,children:(0,x.jsx)(s6.kBK,{})}),(0,x.jsx)(Su,{title:"App preferences",onClick:()=>s(),children:(0,x.jsx)(s6.UG6,{})}),(0,x.jsx)(Su,{title:"Lock app",onClick:a,children:(0,x.jsx)(s6.mBM,{})})]})]})})}var Sf=Object.create,Sh=Object.defineProperty,Sp=Object.getOwnPropertyDescriptor,Sm=Object.getOwnPropertyNames,Sv=Object.getPrototypeOf,Sg=Object.prototype.hasOwnProperty,Sy=(v=null!=(m=(h=(e,t)=>{var r,i;r=e,i=function(e){var t,n=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,r=2*536870912,i=new WeakMap,o=(t=function(e,t){return i.set(e,t),t},function(e){var o=i.get(e),a=void 0===o?e.size:on)throw Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;e.has(a);)a=Math.floor(Math.random()*n);return t(e,a)});e.addUniqueNumber=function(e){var t=o(e);return e.add(t),t},e.generateUniqueNumber=o},"object"==typeof e&&"u">typeof t?i(e):"function"==typeof define&&n.amdO?define(["exports"],i):i((r="u">typeof globalThis?globalThis:r||self).fastUniqueNumbers={})},()=>(p||h((p={exports:{}}).exports,p),p.exports))())?Sf(Sv(m)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of Sm(t))Sg.call(e,n)||void 0===n||Sh(e,n,{get:()=>t[n],enumerable:!(r=Sp(t,n))||r.enumerable});return e})(m&&m.__esModule?v:Sh(v,"default",{value:m,enumerable:!0}),m)),Sx=e=>void 0!==e.method&&"call"===e.method,Sb=e=>null===e.error&&"number"==typeof e.id;g=e=>{let t=new Map([[0,()=>{}]]),n=new Map([[0,()=>{}]]),r=new Map,i=new Worker(e);return i.addEventListener("message",({data:e})=>{if(Sx(e)){let{params:{timerId:i,timerType:o}}=e;if("interval"===o){let e=t.get(i);if("number"==typeof e){let t=r.get(e);if(void 0===t||t.timerId!==i||t.timerType!==o)throw Error("The timer is in an undefined state.")}else if("u">typeof e)e();else throw Error("The timer is in an undefined state.")}else if("timeout"===o){let e=n.get(i);if("number"==typeof e){let t=r.get(e);if(void 0===t||t.timerId!==i||t.timerType!==o)throw Error("The timer is in an undefined state.")}else if("u">typeof e)e(),n.delete(i);else throw Error("The timer is in an undefined state.")}}else if(Sb(e)){let{id:i}=e,o=r.get(i);if(void 0===o)throw Error("The timer is in an undefined state.");let{timerId:a,timerType:s}=o;r.delete(i),"interval"===s?t.delete(a):n.delete(a)}else{let{error:{message:t}}=e;throw Error(t)}}),{clearInterval:e=>{let n=(0,Sy.generateUniqueNumber)(r);r.set(n,{timerId:e,timerType:"interval"}),t.set(e,n),i.postMessage({id:n,method:"clear",params:{timerId:e,timerType:"interval"}})},clearTimeout:e=>{let t=(0,Sy.generateUniqueNumber)(r);r.set(t,{timerId:e,timerType:"timeout"}),n.set(e,t),i.postMessage({id:t,method:"clear",params:{timerId:e,timerType:"timeout"}})},setInterval:(e,n)=>{let r=(0,Sy.generateUniqueNumber)(t);return t.set(r,()=>{e(),"function"==typeof t.get(r)&&i.postMessage({id:null,method:"set",params:{delay:n,now:performance.now(),timerId:r,timerType:"interval"}})}),i.postMessage({id:null,method:"set",params:{delay:n,now:performance.now(),timerId:r,timerType:"interval"}}),r},setTimeout:(e,t)=>{let r=(0,Sy.generateUniqueNumber)(n);return n.set(r,e),i.postMessage({id:null,method:"set",params:{delay:t,now:performance.now(),timerId:r,timerType:"timeout"}}),r}}},a=null,()=>{if(null!==a)return a;let e=new Blob(['(()=>{"use strict";const e=new Map,t=new Map,r=(e,t)=>{let r,o;const i=performance.now();r=i,o=e-Math.max(0,i-t);return{expected:r+o,remainingDelay:o}},o=(e,t,r,i)=>{const s=performance.now();s>r?postMessage({id:null,method:"call",params:{timerId:t,timerType:i}}):e.set(t,setTimeout(o,r-s,e,t,r,i))};addEventListener("message",(i=>{let{data:s}=i;try{if("clear"===s.method){const{id:r,params:{timerId:o,timerType:i}}=s;if("interval"===i)(t=>{const r=e.get(t);if(void 0===r)throw new Error(\'There is no interval scheduled with the given id "\'.concat(t,\'".\'));clearTimeout(r),e.delete(t)})(o),postMessage({error:null,id:r});else{if("timeout"!==i)throw new Error(\'The given type "\'.concat(i,\'" is not supported\'));(e=>{const r=t.get(e);if(void 0===r)throw new Error(\'There is no timeout scheduled with the given id "\'.concat(e,\'".\'));clearTimeout(r),t.delete(e)})(o),postMessage({error:null,id:r})}}else{if("set"!==s.method)throw new Error(\'The given method "\'.concat(s.method,\'" is not supported\'));{const{params:{delay:i,now:n,timerId:a,timerType:d}}=s;if("interval"===d)((t,i,s)=>{const{expected:n,remainingDelay:a}=r(t,s);e.set(i,setTimeout(o,a,e,i,n,"interval"))})(i,a,n);else{if("timeout"!==d)throw new Error(\'The given type "\'.concat(d,\'" is not supported\'));((e,i,s)=>{const{expected:n,remainingDelay:a}=r(e,s);t.set(i,setTimeout(o,a,t,i,n,"timeout"))})(i,a,n)}}}}catch(e){postMessage({error:{message:e.message},id:s.id,result:null})}}))})();'],{type:"application/javascript; charset=utf-8"}),t=URL.createObjectURL(e);return a=g(t),setTimeout(()=>URL.revokeObjectURL(t)),a};var Sw=(typeof window>"u"?"undefined":typeof window)=="object",SE={setTimeout:Sw?setTimeout.bind(window):setTimeout,clearTimeout:Sw?clearTimeout.bind(window):clearTimeout,setInterval:Sw?setInterval.bind(window):setInterval,clearInterval:Sw?clearInterval.bind(window):clearInterval},Sj={},Sk=class{name;closed=!1;mc=new MessageChannel;constructor(e){this.name=e,Sj[e]=Sj[e]||[],Sj[e].push(this),this.mc.port1.start(),this.mc.port2.start(),this.onStorage=this.onStorage.bind(this),window.addEventListener("storage",this.onStorage)}onStorage(e){if(e.storageArea!==window.localStorage||e.key.substring(0,this.name.length)!==this.name||null===e.newValue)return;let t=JSON.parse(e.newValue);this.mc.port2.postMessage(t)}postMessage(e){if(this.closed)throw Error("InvalidStateError");let t=JSON.stringify(e),n=`${this.name}:${String(Date.now())}${String(Math.random())}`;window.localStorage.setItem(n,t),SE.setTimeout(()=>{window.localStorage.removeItem(n)},500),Sj[this.name].forEach(e=>{e!==this&&e.mc.port2.postMessage(JSON.parse(t))})}close(){if(this.closed)return;this.closed=!0,this.mc.port1.close(),this.mc.port2.close(),window.removeEventListener("storage",this.onStorage);let e=Sj[this.name].indexOf(this);Sj[this.name].splice(e,1)}get onmessage(){return this.mc.port1.onmessage}set onmessage(e){this.mc.port1.onmessage=e}get onmessageerror(){return this.mc.port1.onmessageerror}set onmessageerror(e){this.mc.port1.onmessageerror=e}addEventListener(e,t){return this.mc.port1.addEventListener(e,t)}removeEventListener(e,t){return this.mc.port1.removeEventListener(e,t)}dispatchEvent(e){return this.mc.port1.dispatchEvent(e)}},SS=typeof window>"u"?void 0:"function"==typeof window.BroadcastChannel?window.BroadcastChannel:Sk;function S_(){return Math.random().toString(36).substring(2)}var SO=class{options;channel;token=S_();isLeader=!1;isDead=!1;isApplying=!1;reApply=!1;intervals=[];listeners=[];deferred;constructor(e,t){this.channel=e,this.options=t,this.apply=this.apply.bind(this),this.awaitLeadership=this.awaitLeadership.bind(this),this.sendAction=this.sendAction.bind(this)}async apply(){if(this.isLeader||this.isDead)return!1;if(this.isApplying)return this.reApply=!0,!1;this.isApplying=!0;let e=!1,t=t=>{let{token:n,action:r}=t.data;n!==this.token&&(0===r&&n>this.token&&(e=!0),1===r&&(e=!0))};this.channel.addEventListener("message",t);try{return this.sendAction(0),await function(e=0){return new Promise(t=>SE.setTimeout(t,e))}(this.options.responseTime),this.channel.removeEventListener("message",t),this.isApplying=!1,e?!!this.reApply&&this.apply():(this.assumeLead(),!0)}catch{return!1}}awaitLeadership(){if(this.isLeader)return Promise.resolve();let e=!1,t=null;return new Promise(n=>{let r=()=>{if(e)return;e=!0;try{SE.clearInterval(t)}catch{}let r=this.intervals.indexOf(t);r>=0&&this.intervals.splice(r,1),this.channel.removeEventListener("message",i),n()};t=SE.setInterval(()=>{this.apply().then(()=>{this.isLeader&&r()})},this.options.fallbackInterval),this.intervals.push(t);let i=e=>{let{action:t}=e.data;2===t&&this.apply().then(()=>{this.isLeader&&r()})};this.channel.addEventListener("message",i)})}sendAction(e){this.channel.postMessage({action:e,token:this.token})}assumeLead(){this.isLeader=!0;let e=e=>{let{action:t}=e.data;0===t&&this.sendAction(1)};return this.channel.addEventListener("message",e),this.listeners.push(e),this.sendAction(1)}waitForLeadership(){return this.deferred||(this.deferred=this.awaitLeadership()),this.deferred}close(){if(!this.isDead){this.isDead=!0,this.isLeader=!1,this.sendAction(2);try{this.listeners.forEach(e=>this.channel.removeEventListener("message",e)),this.intervals.forEach(e=>SE.clearInterval(e))}catch{}}}},SC=class{channel;options;elector;token=S_();registry=new Map;allIdle=!1;isLastActive=!1;constructor(e){let{channelName:t}=e;this.options=e,this.channel=new SS(t),this.registry.set(this.token,1),e.leaderElection&&(this.elector=new SO(this.channel,{fallbackInterval:2e3,responseTime:100}),this.elector.waitForLeadership()),this.channel.addEventListener("message",e=>{let{action:t,token:n,data:r}=e.data;switch(t){case 3:this.registry.set(n,2);break;case 4:this.registry.delete(n);break;case 5:this.idle(n);break;case 6:this.active(n);break;case 7:this.prompt(n);break;case 8:this.start(n);break;case 9:this.reset(n);break;case 10:this.activate(n);break;case 11:this.pause(n);break;case 12:this.resume(n);break;case 13:this.options.onMessage(r)}}),this.send(3)}get isLeader(){if(!this.elector)throw Error('❌ Leader election is not enabled. To Enable it set the "leaderElection" property to true.');return this.elector.isLeader}prompt(e=this.token){this.registry.set(e,0);let t=[...this.registry.values()].every(e=>0===e);e===this.token&&this.send(7),t&&this.options.onPrompt()}idle(e=this.token){this.registry.set(e,2);let t=[...this.registry.values()].every(e=>2===e);e===this.token&&this.send(5),!this.allIdle&&t&&(this.allIdle=!0,this.options.onIdle())}active(e=this.token){this.allIdle=!1,this.registry.set(e,1);let t=[...this.registry.values()].some(e=>1===e);e===this.token&&this.send(6),t&&this.options.onActive(),this.isLastActive=e===this.token}start(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(8):this.options.start(!0),this.isLastActive=e===this.token}reset(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(9):this.options.reset(!0),this.isLastActive=e===this.token}activate(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(10):this.options.activate(!0),this.isLastActive=e===this.token}pause(e=this.token){e===this.token?this.send(11):this.options.pause(!0)}resume(e=this.token){e===this.token?this.send(12):this.options.resume(!0)}message(e){try{this.channel.postMessage({action:13,token:this.token,data:e})}catch{}}send(e){try{this.channel.postMessage({action:e,token:this.token})}catch{}}close(){this.options.leaderElection&&this.elector.close(),this.send(4),this.channel.close()}},SM=Sw?document:null,SA=["mousemove","keydown","wheel","DOMMouseScroll","mousewheel","mousedown","touchstart","touchmove","MSPointerDown","MSPointerMove","visibilitychange","focus"];function ST(e,t){let n=0;return function(...r){let i=new Date().getTime();if(!(i-nDate.now();function SN(e){let{route:t}=e,n=(0,fm.Nf)({route:t,config:{swr:{refreshInterval:3e4}}});return{isConnected:!n.error,isValidating:n.isValidating}}function SR(e){let{appName:t,title:n,navTitle:r,profile:i,size:o="4",banner:a,nav:s,actions:l,stats:u,children:c,sidenav:d,connectivityRoute:f,isSynced:h,showWallet:p,walletBalanceSc:m,routes:v,scroll:g=!0,openSettings:y}=e,{lock:w,settings:E}=(0,fm.Hv)();return!function(e){let{lock:t,route:n,routes:r}=e,{isConnected:i,isValidating:o}=SN({route:n}),{settings:a}=(0,fm.Hv)(),s=(0,k5.useRouter)();(0,b.useEffect)(()=>{if(o)return;let e=!s.asPath.startsWith(r.login),n=!a.password||!i;if(e&&n){t();return}},[s,a.password,i,o])}({lock:w,route:f,routes:v}),!function(e){let{enabled:t,lock:n,lockTimeout:r}=e,i=(0,b.useCallback)(()=>{n()},[n]);!function({timeout:e=12e5,promptTimeout:t=0,promptBeforeIdle:n=0,element:r=SM,events:i=SA,timers:o,immediateEvents:a=[],onPresenceChange:s=()=>{},onPrompt:l=()=>{},onIdle:u=()=>{},onActive:c=()=>{},onAction:d=()=>{},onMessage:f=()=>{},debounce:h=0,throttle:p=0,eventsThrottle:m=200,startOnMount:v=!0,startManually:g=!1,stopOnIdle:y=!1,crossTab:x=!1,name:w="idle-timer",syncTimers:E=0,leaderElection:j=!1,disabled:k=!1}={}){let S=(0,b.useRef)(SP()),_=(0,b.useRef)(SP()),O=(0,b.useRef)(null),C=(0,b.useRef)(null),M=(0,b.useRef)(0),A=(0,b.useRef)(0),T=(0,b.useRef)(0),P=(0,b.useRef)(0),N=(0,b.useRef)(!1),R=(0,b.useRef)(!1),D=(0,b.useRef)(!1),L=(0,b.useRef)(!0),F=(0,b.useRef)(!1),V=(0,b.useRef)(null),z=(0,b.useRef)(null),I=(0,b.useRef)(e),Z=(0,b.useRef)(0);(0,b.useEffect)(()=>{if(t&&console.warn("⚠️ IdleTimer -- The `promptTimeout` property has been deprecated in favor of `promptBeforeIdle`. It will be removed in the next major release."),n&&t)throw Error("❌ Both promptTimeout and promptBeforeIdle can not be set. The promptTimeout property will be deprecated in a future version.");if(e>=2147483647)throw Error(`\u274C The value for the timeout property must fit in a 32 bit signed integer, 2147483647.`);if(t>=2147483647)throw Error(`\u274C The value for the promptTimeout property must fit in a 32 bit signed integer, 2147483647.`);if(n>=2147483647)throw Error(`\u274C The value for the promptBeforeIdle property must fit in a 32 bit signed integer, 2147483647.`);if(n>=e)throw Error(`\u274C The value for the promptBeforeIdle property must be less than the timeout property, ${e}.`);if(n?(I.current=e-n,Z.current=n):(I.current=e,Z.current=t),!L.current){if(g||k)return;N.current&&(X.current(null,eT),z.current&&z.current.active()),ed()}},[e,t,n,g,k]);let B=(0,b.useRef)(y);(0,b.useEffect)(()=>{B.current=y},[y]);let H=(0,b.useRef)(a),U=(0,b.useRef)(r),W=(0,b.useRef)([...new Set([...i,...a]).values()]),q=(0,b.useRef)(k);(0,b.useEffect)(()=>{q.current=k,!L.current&&(k?ep():g||ed())},[k]);let $=(0,b.useRef)(s);(0,b.useEffect)(()=>{$.current=s},[s]);let Y=(0,b.useRef)(l);(0,b.useEffect)(()=>{Y.current=l},[l]);let G=(0,b.useRef)(u);(0,b.useEffect)(()=>{G.current=u},[u]);let X=(0,b.useRef)(c);(0,b.useEffect)(()=>{X.current=c},[c]);let K=(0,b.useRef)(d);(0,b.useEffect)(()=>{K.current=d},[d]);let Q=(0,b.useRef)(f);(0,b.useEffect)(()=>{Q.current=f},[f]);let J=(0,b.useMemo)(()=>{let e=(e,t)=>K.current(e,t);return h>0?function(e,t){let n;function r(...i){n&&clearTimeout(n),n=setTimeout(()=>{e(...i),n=null},t)}return r.cancel=function(){clearTimeout(n)},r}(e,h):p>0?ST(e,p):e},[p,h]),ee=(0,b.useRef)();(0,b.useEffect)(()=>{x&&E&&(ee.current=ST(()=>{z.current.active()},E))},[x,E]);let et=()=>{null!==V.current&&(SE.clearTimeout(V.current),V.current=null)},en=(e,t=!0)=>{et(),V.current=SE.setTimeout(ea,e||I.current),t&&(C.current=SP())},er=e=>{R.current||N.current||(Y.current(e,eT),$.current({type:"active",prompted:!0},eT)),P.current=0,T.current=SP(),R.current=!0,en(Z.current,!1)},ei=()=>{et(),N.current||(G.current(null,eT),$.current({type:"idle"},eT)),N.current=!0,O.current=SP(),B.current?ec():R.current&&(T.current=0,R.current=!1)},eo=e=>{et(),(N.current||R.current)&&(X.current(e,eT),$.current({type:"active",prompted:!1},eT)),R.current=!1,T.current=0,N.current=!1,M.current+=SP()-O.current,A.current+=SP()-O.current,eu(),en()},ea=e=>{if(!N.current){J.cancel&&J.cancel();let t=SP()-C.current;if(!(I.current+Z.current0&&!R.current){z.current?z.current.prompt():er(e);return}z.current?z.current.idle():ei();return}z.current?z.current.active():eo(e)},es=e=>{if(v||C.current||(C.current=SP(),X.current(null,eT)),J(e,eT),R.current)return;if(et(),!N.current&&H.current.includes(e.type)){ea(e);return}let t=SP()-C.current;if(N.current&&!y||!N.current&&t>=I.current){ea(e);return}D.current=!1,P.current=0,T.current=0,en(),x&&E&&ee.current()},el=(0,b.useRef)(es);(0,b.useEffect)(()=>{let e=F.current;e&&ec(),m>0?el.current=ST(es,m):el.current=es,e&&eu()},[m,p,h,K,x,E]);let eu=()=>{Sw&&U.current&&(F.current||(W.current.forEach(e=>{U.current.addEventListener(e,el.current,{capture:!0,passive:!0})}),F.current=!0))},ec=(e=!1)=>{Sw&&U.current&&(F.current||e)&&(W.current.forEach(e=>{U.current.removeEventListener(e,el.current,{capture:!0})}),F.current=!1)},ed=(0,b.useCallback)(e=>!q.current&&(et(),eu(),N.current=!1,R.current=!1,D.current=!1,P.current=0,T.current=0,z.current&&!e&&z.current.start(),en(),!0),[V,N,q,I,z]),ef=(0,b.useCallback)(e=>!q.current&&(et(),eu(),_.current=SP(),M.current+=SP()-O.current,A.current+=SP()-O.current,M.current=0,N.current=!1,R.current=!1,D.current=!1,P.current=0,T.current=0,z.current&&!e&&z.current.reset(),g||en(),!0),[V,N,I,g,q,z]),eh=(0,b.useCallback)(e=>!q.current&&(et(),eu(),(N.current||R.current)&&eo(),N.current=!1,R.current=!1,D.current=!1,P.current=0,T.current=0,_.current=SP(),z.current&&!e&&z.current.activate(),en(),!0),[V,N,R,q,I,z]),ep=(0,b.useCallback)((e=!1)=>!q.current&&!D.current&&(P.current=eE(),D.current=!0,ec(),et(),z.current&&!e&&z.current.pause(),!0),[V,q,z]),em=(0,b.useCallback)((e=!1)=>!q.current&&!!D.current&&(D.current=!1,R.current||eu(),N.current||en(P.current),T.current&&(T.current=SP()),z.current&&!e&&z.current.resume(),!0),[V,I,q,P,z]),ev=(0,b.useCallback)((e,t)=>(z.current?(t&&Q.current(e,eT),z.current.message(e)):t&&Q.current(e,eT),!0),[f]),eg=(0,b.useCallback)(()=>N.current,[N]),ey=(0,b.useCallback)(()=>R.current,[R]),ex=(0,b.useCallback)(()=>z.current?z.current.isLeader:null,[z]),eb=(0,b.useCallback)(()=>z.current?z.current.isLastActive:null,[z]),ew=(0,b.useCallback)(()=>z.current?z.current.token:null,[z]),eE=(0,b.useCallback)(()=>{if(D.current)return P.current;let e=Math.floor((P.current?P.current:Z.current+I.current)-(C.current?SP()-C.current:0));return e<0?0:Math.abs(e)},[I,Z,R,P,C]),ej=(0,b.useCallback)(()=>Math.round(SP()-_.current),[_]),ek=(0,b.useCallback)(()=>Math.round(SP()-S.current),[S]),eS=(0,b.useCallback)(()=>O.current?new Date(O.current):null,[O]),e_=(0,b.useCallback)(()=>C.current?new Date(C.current):null,[C]),eO=(0,b.useCallback)(()=>N.current?Math.round(SP()-O.current+M.current):Math.round(M.current),[O,M]),eC=(0,b.useCallback)(()=>N.current?Math.round(SP()-O.current+A.current):Math.round(A.current),[O,A]),eM=(0,b.useCallback)(()=>{let e=Math.round(ej()-eO());return e>=0?e:0},[O,M]),eA=(0,b.useCallback)(()=>{let e=Math.round(ek()-eC());return e>=0?e:0},[O,M]);(0,b.useEffect)(()=>{if(h>0&&p>0)throw Error("❌ onAction can either be throttled or debounced, not both.");o&&(SE.setTimeout=o.setTimeout,SE.clearTimeout=o.clearTimeout,SE.setInterval=o.setInterval,SE.clearInterval=o.clearInterval);let e=()=>{z.current&&z.current.close(),J.cancel&&J.cancel(),et(),ec(!0)};return Sw&&window.addEventListener("beforeunload",e),()=>{Sw&&window.removeEventListener("beforeunload",e),z.current&&z.current.close(),J.cancel&&J.cancel(),et(),ec(!0)}},[]),(0,b.useEffect)(()=>{z.current&&z.current.close(),x?z.current=new SC({channelName:w,leaderElection:j,onPrompt:()=>{er()},onIdle:()=>{ei()},onActive:()=>{eo()},onMessage:e=>{Q.current(e,eT)},start:ed,reset:ef,activate:eh,pause:ep,resume:em}):z.current=null},[x,w,j,Y,G,X,Q,ed,ef,ep,em]),(0,b.useEffect)(()=>{L.current||(et(),ec(!0)),g||k||(v?ed():eu())},[g,v,k,L]),(0,b.useEffect)(()=>{if(!L.current){let e=[...new Set([...i,...a]).values()];ec(),W.current=e,U.current=r,H.current=a,g||k||(v?ed():eu())}},[r,JSON.stringify(i),JSON.stringify(a),L,k,g,v]),(0,b.useEffect)(()=>{L.current&&(L.current=!1)},[L]);let eT={message:ev,start:ed,reset:ef,activate:eh,pause:ep,resume:em,isIdle:eg,isPrompted:ey,isLeader:ex,isLastActiveTab:eb,getTabId:ew,getRemainingTime:eE,getElapsedTime:ej,getTotalElapsedTime:ek,getLastIdleTime:eS,getLastActiveTime:e_,getIdleTime:eO,getTotalIdleTime:eC,getActiveTime:eM,getTotalActiveTime:eA,setOnPresenceChange:e=>{s=e,$.current=e},setOnPrompt:e=>{l=e,Y.current=e},setOnIdle:e=>{u=e,G.current=e},setOnActive:e=>{c=e,X.current=e},setOnAction:e=>{d=e,K.current=e},setOnMessage:e=>{f=e,Q.current=e}}}({disabled:!t,onIdle:i,timeout:r,throttle:5e3,eventsThrottle:5e3})}({enabled:!!E.autoLock,lockTimeout:E.autoLockTimeout,lock:w}),(0,x.jsxs)(Si,{appName:t,title:n,children:[(0,x.jsx)(Se,{}),(0,x.jsxs)("div",{className:"flex flex-col h-full w-full",children:[a,(0,x.jsxs)("div",{className:"flex flex-1 w-full overflow-hidden",children:[(0,x.jsx)(Sd,{routes:v,profile:i,openSettings:y,lock:w,showWallet:p,walletBalanceSc:m,isSynced:h,children:d}),(0,x.jsxs)("div",{className:"flex flex-col flex-1 overflow-hidden",children:[(0,x.jsx)(k7,{title:void 0===r?n:r,nav:s,actions:l,stats:u}),g?(0,x.jsx)(l1,{className:"z-0",children:(0,x.jsx)(lx,{size:o,pad:!1,children:(0,x.jsx)("div",{className:"flex flex-col gap-5",children:c})})}):(0,x.jsx)(lx,{size:o,pad:!1,className:"flex-1 flex flex-col gap-5 overflow-hidden",children:c})]})]})]})]})}function SD(e,t,n,r){let[i,o]=(0,b.useState)();return(0,b.useEffect)(()=>{!t&&e&&o(e.length)},[t,e,o]),(0,b.useMemo)(()=>n?"error":void 0===i||i>0&&!e?"loading":0===i?0===r.length?"noneYet":"noneMatchingFilters":void 0,[e,i,n,r])}function SL(e){let{filtered:t}=e;return(0,x.jsxs)("div",{className:"flex flex-col gap-8 justify-center items-center h-[300px]",children:[(0,x.jsx)(tq,{children:(0,x.jsx)(s6.Hb6,{className:"scale-[200%]"})}),(0,x.jsx)(tq,{color:"subtle",className:"text-center max-w-[500px]",children:t?"No matching alerts.":"There are currently no alerts."})]})}(0,b.createContext)(null).Consumer;let SF=[];function SV(e){let{open:t,onOpenChange:n,dismissOne:r,dismissMany:i,alerts:o,dataFieldOrder:a,dataFields:s}=e,l=SD(o.data,o.isValidating,o.error,SF),[u,c]=(0,b.useState)(),d=(0,b.useMemo)(()=>{var e;return(null===(e=o.data)||void 0===e?void 0:e.filter(e=>!u||e.severity===u))||[]},[o.data,u]),f=(0,b.useCallback)(e=>{let t=Object.keys(e).sort((e,t)=>{let n=a.indexOf(e),r=a.indexOf(t);return -1===n&&-1===r?0:-1===n?1:-1===r?-1:n-r});return t},[a]);return(0,x.jsx)(l3,{open:t,onOpenChange:e=>{n(e)},contentVariants:{className:"w-[500px] h-[80vh]"},title:(0,x.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,x.jsxs)(cz,{size:"20",children:["Alerts ",o.data?"(".concat(o.data.length,")"):""]}),(0,x.jsxs)("div",{className:"flex gap-1",children:[(0,x.jsx)(s5,{variant:"info"===u?"accent":"gray",onClick:()=>"info"===u?c(void 0):c("info"),children:"info"}),(0,x.jsx)(s5,{variant:"warning"===u?"accent":"gray",onClick:()=>"warning"===u?c(void 0):c("warning"),children:"warning"}),(0,x.jsx)(s5,{variant:"error"===u?"accent":"gray",onClick:()=>"error"===u?c(void 0):c("error"),children:"error"}),(0,x.jsx)(s5,{variant:"critical"===u?"accent":"gray",onClick:()=>"critical"===u?c(void 0):c("critical"),children:"critical"}),(0,x.jsx)("div",{className:"flex-1"}),!l&&!!d.length&&(0,x.jsxs)(s5,{tip:u?"dismiss ".concat(d.length):"dismiss all",onClick:()=>i(d.map(e=>e.id),u),children:[(0,x.jsx)(s6.NlZ,{}),d.length>0?" ".concat(d.length):""]})]})]}),children:(0,x.jsxs)("div",{className:(0,ea.cx)("flex flex-col overflow-hidden -m-4","border-t border-gray-200 dark:border-graydark-300"),children:["noneYet"===l&&(0,x.jsx)(SL,{filtered:!1}),"error"===l&&(0,x.jsx)("div",{className:(0,ea.cx)("flex items-center justify-center h-[100px]",SZ()),children:(0,x.jsx)(tq,{size:"18",color:"subtle",children:o.error.message})}),"loading"===l&&(0,x.jsx)(SI,{}),!l&&(0,x.jsx)("div",{className:"flex flex-col",children:d.length?d.map(e=>(0,x.jsxs)("div",{className:(0,ea.cx)("flex flex-col gap-1 w-full p-4","border-t border-gray-200 dark:border-graydark-300","first:border-none"),children:[(0,x.jsxs)("div",{className:"flex justify-between gap-1 w-full",children:[(0,x.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,x.jsxs)(tq,{weight:"medium",className:"w-full",children:[e.severity,": ",e.message]})}),(0,x.jsx)(s5,{tip:"Dismiss alert",onClick:()=>r(e.id),children:(0,x.jsx)(s6.NlZ,{})})]}),(0,x.jsxs)("div",{className:"flex justify-between w-full",children:[(0,x.jsx)(tq,{color:"subtle",ellipsis:!0,children:"timestamp"}),(0,x.jsx)(tq,{color:"contrast",ellipsis:!0,children:(0,m0.rN)(e.timestamp,{timeStyle:"medium"})})]}),f(e.data).map(t=>{var n;let r=e.data[t];if(null==r||"object"==typeof r&&!Object.keys(r).length)return null;let i=(null==s?void 0:null===(n=s[t])||void 0===n?void 0:n.render)||Sz;return(0,x.jsx)(i,{label:t,value:r},t)})]},e.id)):(0,x.jsx)(SL,{filtered:!!u})})]})})}function Sz(e){let{label:t,value:n}=e;return(0,x.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,x.jsx)(tq,{color:"subtle",children:t}),(0,x.jsx)(tq,{color:"contrast",ellipsis:!0,children:String(n)})]})}function SI(){return(0,x.jsx)(x.Fragment,{children:kS()(10,e=>(0,x.jsx)("div",{className:(0,ea.cx)("relative flex gap-4 p-3.5",SZ()),children:(0,x.jsxs)("div",{className:"flex flex-col gap-2 w-full",children:[(0,x.jsxs)("div",{className:"flex justify-between gap-2 w-full",children:[(0,x.jsx)(f_,{className:"w-[160px] h-[20px]"}),(0,x.jsx)(f_,{className:"w-[160px] h-[20px]"})]}),(0,x.jsx)(f_,{className:"w-[100px] h-[20px]"}),(0,x.jsx)(f_,{className:"w-full h-[120px]"})]})},e))})}function SZ(){return(0,ea.cx)("border-t border-gray-200 dark:border-graydark-300","first:border-none")}var SB=n(89644),SH=n.n(SB),SU=n(63955),SW=n(45861),Sq=n.n(SW);function S$(e){let{form:t,field:n,name:r}=e,i=t.watch(r),o=t.formState.touchedFields[r]&&!!t.formState.errors[r],{ref:a,onChange:s,onBlur:l}=t.register(r,n.validation),u=(0,b.useCallback)(e=>{var r;s(e),null===(r=n.trigger)||void 0===r||r.forEach(e=>t.trigger(e))},[s,t,n]),c=(0,b.useCallback)((e,i)=>{var o;t.setValue(r,e,"boolean"==typeof i?i?{shouldValidate:!0,shouldDirty:!0,shouldTouch:!0}:void 0:i),null===(o=n.trigger)||void 0===o||o.forEach(e=>t.trigger(e))},[r,t,n]);return{ref:a,name:r,value:i,error:o,onBlur:l,onChange:u,setValue:c}}function SY(e){return(0,b.useCallback)(t=>{ko(Sq()(t).map(t=>{let[n,r]=t;return"".concat(e[n].title||n,": ").concat(null==r?void 0:r.message)}).join(", "))},[e])}function SG(e){let{name:t,form:n,fields:r,size:i="small",autoComplete:o,spellCheck:a,state:s=!0,group:l=!0}=e,u=r[t],{ref:c,onChange:d,onBlur:f,error:h}=S$({name:t,form:n,field:u}),p=(0,x.jsx)(dJ,{ref:c,name:t,placeholder:u.placeholder,size:i,autoComplete:o,type:u.type,readOnly:u.readOnly,spellCheck:a,onClick:u.onClick,state:s?h?"invalid":n.formState.dirtyFields[t]?"valid":"default":"default",onChange:d,onBlur:f});return l?(0,x.jsx)(kG,{title:u.title,actions:u.actions,name:t,form:n,children:p}):p}var SX=n(829),SK=n.n(SX);async function SQ(e){let{api:t,route:n,password:r}=e;try{return await SH().get("".concat(t,"/api").concat(n),{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Basic "+btoa(":".concat(r))},timeout:1e4}),{}}catch(n){let e=n.code,t=n.response;if((null==t?void 0:t.status)===504)return{error:"Error, check that daemon is running"};if((null==t?void 0:t.status)===401)return{error:"Error, wrong password"};if("ECONNABORTED"===e)return{error:"Error, daemon did not respond"};return{error:"Error, something went wrong"}}}function SJ(e){let{appName:t,route:n,routes:r}=e,i=(0,k5.useRouter)(),{settings:o,setSettings:a}=(0,fm.Hv)(),{allowCustomApi:s}=o,l=(0,b.useMemo)(()=>({api:o.api,password:""}),[o.api]),u=(0,SU.cI)({mode:"onBlur",defaultValues:l});(0,b.useEffect)(()=>{u.clearErrors()},[s]);let c=(0,b.useCallback)(async e=>{let t="";if(s){let n=new URL(e.api);t="".concat(n.protocol,"//").concat(n.host)}let{error:c}=await SQ({api:t,route:n,password:e.password});c?u.setError("password",{message:c}):(a({api:t,password:e.password,recentApis:{...o.recentApis,[t]:{lastUsed:new Date().getTime()}}}),i.push(i.query.prev?decodeURIComponent(i.query.prev):r.home),u.reset(l))},[s,u,i,r,o,a,l,n]),d=function(e){let{allowCustomApi:t}=e;return{api:{type:"text",title:"API",placeholder:"http://127.0.0.1:9980",validation:{validate:{required:e=>!t||!!e||"API is required",url:e=>{try{let t=new URL(e);return!!t.protocol&&!!t.host||"invalid API URL"}catch(e){return"invalid API URL"}},https:e=>{let t="https:"===window.location.protocol;return!t||t&&e.startsWith("https")||"API must use HTTPS"}}}},password:{type:"password",title:"Password",placeholder:"Enter password",validation:{required:"password is required"}}}}({allowCustomApi:s}),f=SY(d),h=u.formState.errors.api||u.formState.errors.password,p=SK()(Object.entries(o.recentApis),e=>{let[t,{lastUsed:n}]=e;return-n}).map(e=>{let[t]=e;return t});return(0,x.jsx)("div",{className:"flex flex-col items-center justify-center gap-6 h-full",children:(0,x.jsx)(tG,{className:"relative top-[-50px] w-[300px] p-2.5",children:(0,x.jsxs)("div",{className:"flex flex-col justify-between h-full",children:[(0,x.jsxs)("div",{className:"flex justify-between items-center",children:[(0,x.jsx)(tq,{font:"mono",weight:"bold",size:"20",children:t}),(0,x.jsx)(cT,{trigger:(0,x.jsx)(s5,{icon:"hover",variant:"ghost",children:(0,x.jsx)(s6.shL,{})}),children:(0,x.jsx)(cP,{onSelect:()=>a({allowCustomApi:!s}),children:s?"Hide custom API":"Show custom API"})})]}),(0,x.jsx)(cb,{className:"w-full mt-2 mb-3"}),(0,x.jsx)("form",{onSubmit:u.handleSubmit(c,f),children:(0,x.jsxs)("div",{className:"flex flex-col gap-1.5",children:[s?(0,x.jsxs)(lg,{children:[(0,x.jsx)(SG,{name:"api",form:u,fields:d,group:!1}),p.length>1&&(0,x.jsx)(cT,{trigger:(0,x.jsx)(s5,{type:"button",children:(0,x.jsx)(s6.wGX,{})}),children:p.map(e=>(0,x.jsx)(cP,{onSelect:()=>u.setValue("api",e),children:e},e))})]}):null,(0,x.jsx)(SG,{name:"password",form:u,fields:d,group:!1}),h&&(0,x.jsx)(tq,{size:"14",color:"red",children:h.message}),(0,x.jsx)(kX,{size:"small",form:u,children:"Unlock"})]})})]})})})}var S0=n(63397),S1=n(24511);let S2={address:"",siacoin:void 0,includeFee:!1},S4=S1.Ry().shape({address:S1.Z_().required("Required"),siacoin:S1.Z_().required("Required").test("greater than zero","Must be greater than zero",e=>!new(fd())(e||0).isZero())});function S3(e){let{address:t,siacoin:n,fee:r,transactionId:i}=e,o=n.plus(r);return(0,x.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,x.jsxs)("div",{className:"flex gap-6 justify-between items-center",children:[(0,x.jsx)(tq,{color:"verySubtle",noWrap:!0,children:"Address"}),(0,x.jsx)(kg,{value:t,type:"address"})]}),(0,x.jsxs)("div",{className:"flex gap-2 justify-between items-center",children:[(0,x.jsx)(tq,{color:"verySubtle",noWrap:!0,children:"Amount"}),(0,x.jsx)("div",{className:"flex relative top-[-0.5px]",children:(0,x.jsx)(kx,{size:"14",value:n,variant:"value",dynamicUnits:!1})})]}),(0,x.jsxs)("div",{className:"flex gap-2 justify-between items-center",children:[(0,x.jsx)(tq,{color:"verySubtle",noWrap:!0,children:"Network fee"}),(0,x.jsx)("div",{className:"flex relative top-[-0.5px]",children:(0,x.jsx)(kx,{size:"14",value:r,variant:"value",dynamicUnits:!1})})]}),(0,x.jsxs)("div",{className:"flex items-center gap-2 justify-between",children:[(0,x.jsx)(tq,{color:"verySubtle",noWrap:!0,children:"Total"}),(0,x.jsx)("div",{className:"flex relative top-[-0.5px]",children:(0,x.jsx)(kx,{size:"14",value:o,variant:"value",dynamicUnits:!1})})]}),i&&(0,x.jsxs)("div",{className:"flex gap-6 items-center justify-between",children:[(0,x.jsx)(tq,{color:"verySubtle",noWrap:!0,children:"Transaction ID"}),(0,x.jsx)(kg,{value:i,type:"transaction"})]})]})}function S5(e){let{activeStep:t,steps:n,onChange:r}=e,i=n.findIndex(e=>e.id===t),o=n.length-1;return(0,x.jsxs)("div",{className:"relative w-full mt-8 mb-3",children:[(0,x.jsx)("div",{className:"absolute w-full h-1 bg-gray-500 dark:bg-graydark-500 rounded-lg"}),(0,x.jsx)("div",{className:"absolute h-1 bg-accent-800 dark:bg-accentdark-800 rounded-lg",style:{width:"".concat(i/o*100,"%")}}),n.map((e,n)=>{let{id:a,label:s}=e,l=t===a,u=i>=n,c=n===o,d=0===n,f=u&&i!==o;return(0,x.jsxs)("div",{className:(0,ea.cx)("absolute h-2 w-2 -top-0.5",f?"cursor-pointer":"cursor-default"),style:{left:"calc(".concat(n/o*100,"% - ").concat(c?8:d?0:4,"px)")},onClick:()=>{f&&r(a)},children:[(0,x.jsx)(tq,{color:l?"contrast":"verySubtle",className:(0,ea.cx)("absolute top-[-30px]",d?"left-0":"",c?"right-0":"",d||c?"":"-translate-x-1/2"),noWrap:!0,children:s}),(0,x.jsx)("div",{className:(0,ea.cx)("absolute left-0 top-0 h-full w-full rounded-lg border",u?"bg-accent-800 dark-accentdark-800":"bg-gray-500 dark:bg-graydark-500",u?"border-accent-900 dark:border-accentdark-900":"border-gray-600 dark:border-graydark-600")}),l&&(0,x.jsx)("div",{className:"absolute left-0 top-0 h-full w-full rounded-lg bg-accent-800 dark:bg-accentdark-800 animate-pingslow"})]},a)})]})}function S6(e){let{data:{address:t,siacoin:n},fee:r,transactionId:i}=e;return(0,x.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,x.jsx)(S3,{address:t,siacoin:n,fee:r,transactionId:i}),(0,x.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 my-4",children:[(0,x.jsx)(tq,{children:(0,x.jsx)(s6.Z$8,{})}),(0,x.jsx)(tq,{children:"Transaction successfully broadcasted."})]})]})}let S8=(0,m0.qN)(.00393),S7={address:"",siacoin:new(fd())(0),includeFee:!1};function S9(e){let{trigger:t,open:n,onOpenChange:r,balance:i,send:o}=e,[a,s]=(0,b.useState)("setup"),[l,u]=(0,b.useState)(),[c,d]=(0,b.useState)(S7),f=function(e){let{balance:t,fee:n,onComplete:r}=e,i=(0,S0.TA)({initialValues:S2,validationSchema:S4,onSubmit:async e=>{if(!e.siacoin)return;let o=e.includeFee?(0,m0.qN)(e.siacoin).minus(n):(0,m0.qN)(e.siacoin);if(t){if(t.isLessThan((0,m0.qN)(e.siacoin).plus(n))){i.setStatus({error:"Not enough funds in wallet."});return}i.setStatus({}),r({includeFee:e.includeFee,address:e.address,siacoin:o})}}}),o=(0,m0.qN)(i.values.siacoin||0),a=(0,x.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,x.jsx)(kK,{formik:i,variants:{size:"medium"},title:"Address",name:"address",placeholder:"e3b1050aef388438668b52983cf78f40925af8f0aa8b9de80c18eadcefce8388d168a313e3f2",autoComplete:"off",type:"text"}),(0,x.jsx)(kK,{formik:i,title:"Siacoin",name:"siacoin",placeholder:"100",type:"siacoin"}),(0,x.jsxs)("div",{className:"flex items-center",children:[(0,x.jsx)(fI,{name:"includeFee",onCheckedChange:e=>i.setFieldValue("includeFee",e),children:"Include fee"}),(0,x.jsx)(fb,{children:"Include or exclude the network fee from the above transaction value."}),(0,x.jsx)("div",{className:"flex flex-1"})]}),(0,x.jsxs)("div",{className:"flex flex-col gap-2 my-1",children:[(0,x.jsxs)("div",{className:"flex gap-2 justify-between items-center",children:[(0,x.jsx)(tq,{color:"verySubtle",children:"Network fee"}),(0,x.jsx)("div",{className:"flex relative top-[-0.5px]",children:(0,x.jsx)(kx,{size:"14",value:n,variant:"value",dynamicUnits:!1})})]}),(0,x.jsxs)("div",{className:"flex justify-between gap-2 items-center",children:[(0,x.jsx)(tq,{color:"verySubtle",children:"Total"}),(0,x.jsx)("div",{className:"flex relative top-[-0.5px]",children:(0,x.jsx)(kx,{size:"14",value:i.values.includeFee?o:o.plus(n),variant:"value",dynamicUnits:!1})})]})]})]});return{formik:i,form:a}}({balance:i,fee:S8,onComplete:e=>{d(e),s("confirm")}}),h=function(e){let{send:t,formData:n,fee:r,onConfirm:i}=e,{address:o,siacoin:a}=n||{},s=(0,S0.TA)({initialValues:{},onSubmit:async()=>{let{transactionId:e,error:n}=await t({address:o,sc:a});if(n){s.setStatus({error:n});return}i({transactionId:e})}}),l=(0,x.jsx)("div",{className:"flex flex-col gap-4",children:(0,x.jsx)(S3,{address:o,siacoin:a,fee:r})});return{form:l,formik:s}}({fee:S8,formData:c,send:o,onConfirm:e=>{let{transactionId:t}=e;u(t),s("done")}}),p=(0,b.useMemo)(()=>"setup"===a?{submitLabel:"Generate transaction",formik:f.formik}:"confirm"===a?{submitLabel:"Broadcast transaction",formik:h.formik}:void 0,[a,f,h]);return(0,x.jsx)(l3,{trigger:t,open:n,onOpenChange:e=>{e||(f.formik.resetForm(),h.formik.resetForm(),s("setup")),r(e)},title:"Send siacoin",onSubmit:p?p.formik.handleSubmit:void 0,controls:p&&(0,x.jsx)("div",{className:"flex flex-col gap-1",children:(0,x.jsx)(k4,{formik:p.formik,children:p.submitLabel})}),contentVariants:{className:"w-[400px]"},children:(0,x.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,x.jsx)(S5,{onChange:e=>s(e),activeStep:a,steps:[{id:"setup",label:"Setup"},{id:"confirm",label:"Confirm"},{id:"done",label:"Complete"}]}),(0,x.jsx)(cb,{className:"w-full mt-4"}),"setup"===a&&f.form,"confirm"===a&&h.form,"done"===a&&(0,x.jsx)(S6,{data:c,fee:S8,transactionId:l})]})})}let _e="[a-fA-F\\d:]",_t=e=>e&&e.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(_e,")|(?<=").concat(_e,")(?=\\s|$))"):"",_n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",_r="[a-fA-F\\d]{1,4}",_i="\n(?:\n(?:".concat(_r,":){7}(?:").concat(_r,"|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:").concat(_r,":){6}(?:").concat(_n,"|:").concat(_r,"|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:").concat(_r,":){5}(?::").concat(_n,"|(?::").concat(_r,"){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:").concat(_r,":){4}(?:(?::").concat(_r,"){0,1}:").concat(_n,"|(?::").concat(_r,"){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:").concat(_r,":){3}(?:(?::").concat(_r,"){0,2}:").concat(_n,"|(?::").concat(_r,"){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:").concat(_r,":){2}(?:(?::").concat(_r,"){0,3}:").concat(_n,"|(?::").concat(_r,"){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:").concat(_r,":){1}(?:(?::").concat(_r,"){0,4}:").concat(_n,"|(?::").concat(_r,"){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::").concat(_r,"){0,5}:").concat(_n,"|(?::").concat(_r,"){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n").replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),_o=new RegExp("(?:^".concat(_n,"$)|(?:^").concat(_i,"$)")),_a=new RegExp("^".concat(_n,"$")),_s=new RegExp("^".concat(_i,"$")),_l=e=>e&&e.exact?_o:RegExp("(?:".concat(_t(e)).concat(_n).concat(_t(e),")|(?:").concat(_t(e)).concat(_i).concat(_t(e),")"),"g");_l.v4=e=>e&&e.exact?_a:RegExp("".concat(_t(e)).concat(_n).concat(_t(e)),"g"),_l.v6=e=>e&&e.exact?_s:RegExp("".concat(_t(e)).concat(_i).concat(_t(e)),"g");let _u=()=>RegExp("^(((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))|((([a-zA-Z]|[a-zA-Z][a-zA-Z0-9-]*[a-zA-Z0-9]).)+([A-Za-z|[A-Za-z][A-Za-z0-9-]*[A-Za-z0-9])))$","g"),_c={port:9981,ip:""},_d=S1.Ry().shape({port:S1.Rx().required("Required").min(0,"Out of valid range").max(65535,"Out of valid range"),ip:S1.Z_().required("Required").test("ip","Invalid hostname or IP address",e=>_u().test(e||""))});function _f(e){let{trigger:t,open:n,connect:r,onOpenChange:i}=e,o=(0,S0.TA)({initialValues:_c,validationSchema:_d,onSubmit:async(e,t)=>{let n="".concat(e.ip,":").concat(e.port),o=await r(n);if(o.error){let e=o.error.replace("invalid peer address: address ".concat(n,":"),"");t.setStatus({error:e})}else kr("Connected to peer"),t.resetForm(),i(!1)}});return(0,x.jsx)(l3,{trigger:t,title:"Connect peer",open:n,onOpenChange:e=>{e||o.resetForm(),i(e)},contentVariants:{className:"w-[400px]"},children:(0,x.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,x.jsx)(t$,{size:"14",children:"Connect to a peer by IP address."}),(0,x.jsx)("form",{onSubmit:o.handleSubmit,children:(0,x.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,x.jsx)(kK,{formik:o,title:"Address",name:"ip",placeholder:"host.acme.com or 127.0.0.1",autoComplete:"off",type:"text",variants:{size:"medium"}}),(0,x.jsx)(kK,{formik:o,title:"Port",name:"port",disableGroupSeparators:!0,placeholder:"9981",autoComplete:"off",type:"number",variants:{size:"medium"}}),(0,x.jsx)(k4,{formik:o,size:"medium",children:"Connect"})]})})]})})}function _h(e){var t;let{id:n,transaction:r,trigger:i,open:o,onOpenChange:a}=e;return(0,x.jsx)(l3,{title:kd((null==r?void 0:r.txType)?kI()(kv(r.txType)):"Transaction",n,16),trigger:i,open:o,onOpenChange:a,contentVariants:{className:"w-[800px]"},children:r?(0,x.jsxs)("div",{className:"flex flex-col gap-4 pb-10 w-full overflow-hidden",children:[(0,x.jsxs)("div",{className:"flex flex-wrap gap-4",children:[(0,x.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,x.jsx)(tq,{children:"Inflow"}),(0,x.jsx)(kx,{value:new(fd())((null==r?void 0:r.inflow)||0)})]}),(0,x.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,x.jsx)(tq,{children:"Outflow"}),(0,x.jsx)(kx,{value:new(fd())((null==r?void 0:r.outflow)||0).negated()})]}),(0,x.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,x.jsx)(tq,{children:"Miner fee"}),(0,x.jsx)(kx,{value:new(fd())((null==r?void 0:null===(t=r.raw.minerFees)||void 0===t?void 0:t.reduce((e,t)=>e.plus(t),new(fd())(0)))||0)})]}),(0,x.jsx)("div",{className:"flex-1"}),(0,x.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,x.jsx)(tq,{children:"Timestamp"}),(0,x.jsx)(tq,{children:(0,m0.rN)((null==r?void 0:r.timestamp)||0,{timeStyle:"short"})})]})]}),(0,x.jsx)(lh,{children:JSON.stringify(null==r?void 0:r.raw,null,2)})]}):(0,x.jsx)(tq,{children:"Could not find transaction in wallet"})})}S1.Ry().shape({address:S1.Z_().required("Required"),description:S1.Z_().required("Required"),index:S1.Rx().integer().required("Required")});var _p=n(38001);function _m(e){let{title:t,description:n,address:r}=e;return(0,x.jsxs)("div",{className:"flex flex-col gap-4 items-center justify-center",children:[t&&(0,x.jsx)(cz,{size:"20",font:"mono",children:t}),n&&(0,x.jsx)(tq,{children:n}),(0,x.jsx)("div",{className:"relative p-[5px] bg-white h-[210px] w-[210px]",children:(0,x.jsx)("div",{className:"absolute",children:(0,x.jsx)(_p.Z,{size:200,value:r})})}),(0,x.jsx)(kg,{type:"address",value:r})]})}function _v(e){let{address:t,isValidating:n,trigger:r,open:i,onOpenChange:o}=e;return(0,x.jsx)(l3,{title:kd("Address",kc(t)||"",16),trigger:r,open:i,onOpenChange:o,contentVariants:{className:"w-[400px]"},children:(0,x.jsx)("div",{className:"flex flex-col gap-4",children:t||n?(0,x.jsx)(_m,{address:t||""}):(0,x.jsx)(tq,{children:"Could not retreive wallet address"})})})}function _g(e){let{isSynced:t,isWalletSynced:n,syncPercent:r,walletScanPercent:i}=e;return t?n?null:(0,x.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,x.jsx)(tq,{color:"amber",children:(0,x.jsx)(s6.qdM,{})}),(0,x.jsxs)(tq,{size:"14",children:["Wallet is scanning (",i,"%), transaction data may be incomplete."]})]}):(0,x.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,x.jsx)(tq,{color:"amber",children:(0,x.jsx)(s6.qdM,{})}),(0,x.jsxs)(tq,{size:"14",children:["Blockchain is syncing (",r,"%), transaction data may be incomplete."]})]})}let _y={docs:{index:"https://docs.sia.tech",sia101:"https://docs.sia.tech/get-started-with-sia/sia101",renterd:"https://docs.sia.tech/renting/about-renting",hostd:"https://docs.sia.tech/hosting/about-hosting-on-sia",walletd:"https://docs.sia.tech/wallet/wallet-overview",renting:"https://docs.sia.tech/renting/about-renting",wallet:"https://docs.sia.tech/wallet/wallet-overview",hosting:"https://docs.sia.tech/hosting/about-hosting-on-sia",mining:"https://docs.sia.tech/mining/about-mining-on-sia",embarcadero:"https://github.com/SiaFoundation/embarcadero",siad:"https://api.sia.tech",siaui:"https://docs.sia.tech/your-sia-wallet/sia-ui-faqs",brand:"https://docs.sia.tech/sia-integrations/sia-brand-guidelines"},website:{index:"https://sia.tech",tos:"https://sia.tech/terms-of-service",privacy:"https://sia.tech/privacy-policy"},github:{index:"https://github.com/SiaFoundation",embarcadero:"https://github.com/SiaFoundation/embarcadero",siad:"https://github.com/SiaFoundation/siad",renterd:"https://github.com/SiaFoundation/renterd",walletd:"https://github.com/SiaFoundation/walletd",hostd:"https://github.com/SiaFoundation/hostd",siaui:"https://gitlab.com/NebulousLabs/Sia-UI"},discord:"https://sia.tech/discord"};function _x(){let{settings:e,setCurrency:t,currencyOptions:n}=(0,fm.Hv)();return(0,x.jsx)(fj,{disabled:!e.siaCentral,value:e.currency.id,onChange:e=>t(e.currentTarget.value),children:n.map(e=>{let{id:t,label:n}=e;return(0,x.jsx)(fk,{value:t,children:n},t)})})}let _b=[{id:"sc",label:"Siacoin"},{id:"fiat",label:"Fiat"},{id:"bothPreferSc",label:"Both - prefer siacoin"},{id:"bothPreferFiat",label:"Both - prefer fiat"}];function _w(){let{settings:e,setSettings:t}=(0,fm.Hv)();return(0,x.jsx)(fj,{disabled:!e.siaCentral,value:e.currencyDisplay,onChange:e=>t({currencyDisplay:e.currentTarget.value}),children:_b.map(e=>{let{id:t,label:n}=e;return(0,x.jsx)(fk,{value:t,children:n},t)})})}function _E(e){let{open:t,onOpenChange:n,securityEl:r,showGpuSetting:i}=e,{settings:o,setSettings:a,gpu:s}=(0,fm.Hv)();return(0,x.jsx)(l3,{open:t,title:"App preferences",onOpenChange:n,contentVariants:{className:"w-[450px]"},children:(0,x.jsxs)("div",{className:"flex flex-col gap-6 mb-2",children:[(0,x.jsx)("div",{className:"flex flex-col gap-4",children:(0,x.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,x.jsx)(tq,{size:"16",weight:"bold",children:"Display"}),(0,x.jsx)(t$,{size:"14",children:"Configure visual and locale display preferences."}),(0,x.jsx)(s7,{children:(0,x.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,x.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,x.jsx)(tq,{children:(0,x.jsx)(s6.RdX,{})}),(0,x.jsx)(cz,{size:"20",className:"flex-1",children:"Currency display"}),(0,x.jsx)(_w,{})]}),(0,x.jsx)(t$,{size:"14",children:"Select whether you would like to see currency values in siacoin, fiat, or both. Fiat requires Sia Central third-party data enabled under Privacy."})]})}),(0,x.jsx)(s7,{children:(0,x.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,x.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,x.jsx)(tq,{children:(0,x.jsx)(s6.RdX,{})}),(0,x.jsx)(cz,{size:"20",className:"flex-1",children:"Fiat"}),(0,x.jsx)(_x,{})]}),(0,x.jsx)(t$,{size:"14",children:"Select a fiat currency for price conversions from Siacoin. Requires Sia Central third-party data enabled under Privacy."})]})}),(0,x.jsx)(s7,{children:(0,x.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,x.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,x.jsx)(tq,{children:(0,x.jsx)(s6.RdX,{})}),(0,x.jsx)(cz,{size:"20",className:"flex-1",children:"Theme"}),(0,x.jsx)(pu,{})]}),(0,x.jsx)(t$,{size:"14",children:"Switch between a dark or light mode, or follow your system's settings."})]})}),i&&(0,x.jsx)(s7,{children:(0,x.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,x.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,x.jsx)(tq,{children:(0,x.jsx)(s6.RdX,{})}),(0,x.jsx)(cz,{size:"20",className:"flex-1",children:"GPU"}),(0,x.jsx)(fI,{disabled:!s.canGpuRender,checked:s.canGpuRender&&s.isGpuEnabled,onCheckedChange:s.setIsGpuEnabled,size:"medium"})]}),(0,x.jsxs)(t$,{size:"14",children:["Enable features that require a GPU."," ",s.canGpuRender?"":"This device does not support GPU rendering."]})]})})]})}),(0,x.jsx)(cb,{className:"w-full"}),(0,x.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,x.jsx)(tq,{size:"16",weight:"bold",children:"Security"}),(0,x.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,x.jsx)(t$,{size:"14",children:"Configure security preferences."}),(0,x.jsx)(s7,{children:(0,x.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,x.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,x.jsx)(tq,{children:(0,x.jsx)(s6.RdX,{})}),(0,x.jsx)(cz,{size:"20",className:"flex-1",children:"Lock app"}),(0,x.jsx)(fI,{size:"medium",checked:o.autoLock,onCheckedChange:e=>a({autoLock:e})}),(0,x.jsxs)(fj,{disabled:!o.autoLock,value:String(o.autoLockTimeout),onChange:e=>{a({autoLockTimeout:Number(e.currentTarget.value)})},children:[(0,x.jsx)(fk,{value:ES(5),children:"5 minutes"}),(0,x.jsx)(fk,{value:ES(10),children:"10 minutes"}),(0,x.jsx)(fk,{value:ES(20),children:"20 minutes"}),(0,x.jsx)(fk,{value:ES(30),children:"30 minutes"}),(0,x.jsx)(fk,{value:ES(60),children:"1 hour"})]})]}),(0,x.jsx)(t$,{size:"14",children:"Automatically lock the app after a certain period of inactivity."})]})}),r]})]}),(0,x.jsx)(cb,{className:"w-full"}),(0,x.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,x.jsx)(tq,{size:"16",weight:"bold",children:"Privacy"}),(0,x.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,x.jsx)(t$,{size:"14",children:"Configure privacy preferences. The app uses the third-party APIs listed below to improve the user experience. All third-party APIs are optional and can be toggled on or off."}),(0,x.jsx)(s7,{children:(0,x.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,x.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,x.jsx)(tq,{children:(0,x.jsx)(s6.RdX,{})}),(0,x.jsx)(cz,{size:"20",className:"flex-1",children:"Sia Central"}),(0,x.jsx)(fI,{size:"medium",checked:o.siaCentral,onCheckedChange:e=>a({siaCentral:e})})]}),(0,x.jsx)(t$,{size:"14",children:"The app fetches Siacoin exchange rates from the Sia Central API."})]})})]})]}),(0,x.jsx)(cb,{className:"w-full"}),(0,x.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,x.jsx)(tq,{size:"16",weight:"bold",children:"Help"}),(0,x.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,x.jsx)(t$,{size:"14",children:"Find information about the Sia software at our website, documentation site, and on Github. Join our active Discord community for discussion and help troubleshooting issues."}),(0,x.jsxs)("div",{className:"flex gap-4",children:[(0,x.jsxs)(cK,{href:_y.website.index,target:"_blank",className:"flex items-center gap-1",children:[(0,x.jsx)(s6.lq1,{}),"Website"]}),(0,x.jsxs)(cK,{href:_y.docs.index,target:"_blank",className:"flex items-center gap-1",children:[(0,x.jsx)(s6.RdX,{}),"Docs"]}),(0,x.jsxs)(cK,{href:_y.github.index,target:"_blank",className:"flex items-center gap-1",children:[(0,x.jsx)(s6.Sfn,{}),"About"]}),(0,x.jsxs)(cK,{href:_y.discord,target:"_blank",className:"flex items-center gap-1",children:[(0,x.jsx)(s6.b47,{}),"Discord"]})]})]})]})]})})}function _j(e){let{balanceSc:t,isSynced:n,syncingMessage:r}=e;return t?n?(0,x.jsx)(Sa,{side:"bottom",balanceSc:t,children:(0,x.jsx)(tG,{className:"hidden sm:flex h-7 px-3 items-center",children:(0,x.jsx)(kE,{variant:"value",value:t.spendable,size:"12",showTooltip:!1})})}):(0,x.jsx)(s4,{content:r||"Blockchain is syncing, balance may be incorrect.",children:(0,x.jsxs)(tG,{className:"hidden sm:flex h-7 pl-2 pr-3 gap-1.5 items-center",children:[(0,x.jsx)(tq,{color:"amber",children:(0,x.jsx)(s6.qdM,{})}),(0,x.jsx)(kE,{variant:"value",value:t.spendable,size:"12",showTooltip:!1})]})}):null}function _k(e){let{isSynced:t,isWalletSynced:n,syncPercent:r,walletScanPercent:i,balanceSc:o,sendSiacoin:a,receiveSiacoin:s}=e;return(0,x.jsxs)(x.Fragment,{children:[o&&(0,x.jsx)(_j,{isSynced:t&&n,syncingMessage:t?"Wallet is scanning (".concat(i,"%), balance may be incorrect."):"Blockchain is syncing (".concat(r,"%), balance may be incorrect."),balanceSc:o}),s&&(0,x.jsxs)(s5,{size:"small",onClick:s,children:[(0,x.jsx)(s6.xHM,{}),"Receive"]}),(0,x.jsxs)(s5,{size:"small",variant:"accent",onClick:a,children:[(0,x.jsx)(s6.rW0,{}),"Send"]})]})}function _S(e,t){if(!e||!e.length)return[];let n=Object.keys(Ek()(e[0],"timestamp"));e.sort((e,t)=>e.timestamp>t.timestamp?1:-1);let r=[];return"delta"===t?e.forEach((t,i)=>{let o={...t};0!==i&&(n.forEach(n=>{let r=t[n],a=e[i-1][n];o[n]=r-a}),r.push(o))}):r=e,r}function __(e,t){return"all"===e?{start:new Date(2022,1,1).getTime(),end:t}:{start:t-EO(Number(e)),end:t}}let _O={"5m":e=>{let t=e+ES(5);return"5m interval from ".concat((0,m0.rN)(e,{timeStyle:"short",hour12:!1})," to ").concat((0,m0.rN)(t,{timeStyle:"short",hour12:!1}))},"15m":e=>{let t=e+ES(15);return"15m interval from ".concat((0,m0.rN)(e,{timeStyle:"short",hour12:!1})," to ").concat((0,m0.rN)(t,{timeStyle:"short",hour12:!1}))},hourly:e=>{let t=e+E_(1);return"Hour interval from ".concat((0,m0.rN)(e,{timeStyle:"short",hour12:!1})," to ").concat((0,m0.rN)(t,{timeStyle:"short",hour12:!1}))},daily:e=>{let t=e+E_(24);return"Day interval from ".concat((0,m0.rN)(e)," to ").concat((0,m0.rN)(t))},weekly:e=>{let t=e+EO(7);return"Week interval from ".concat((0,m0.rN)(e)," to ").concat((0,m0.rN)(t))},monthly:e=>{let t=e+EO(30);return"Month interval from ".concat((0,m0.rN)(e)," to ").concat((0,m0.rN)(t))},yearly:e=>{let t=e+EO(365);return"Year interval from ".concat((0,m0.rN)(e)," to ").concat((0,m0.rN)(t))},default:e=>"".concat((0,m0.rN)(e))};function _C(e){return _O[e]||_O.default}function _M(e){if(!e||!e.length)return{};let t=Object.keys(Ek()(e[0],"timestamp"));e.sort((e,t)=>e.timestamp>t.timestamp?1:-1);let n=t.reduce((t,n)=>({...t,[n]:function(e,t){var n,r;let i=(null===(n=t[0])||void 0===n?void 0:n[e])||0,o=(null===(r=t[t.length-1])||void 0===r?void 0:r[e])||0,a=t.reduce((t,n)=>t+(n[e]||0),0);return _A({total:a,start:i,end:o,count:t.length})}(n,e)}),{});return{...n,total:function(e,t){let n=_T(e,t[0]),r=_T(e,t[t.length-1]),i=t.reduce((t,n)=>t+_T(e,n),0);return _A({total:i,start:n,end:r,count:t.length})}(t,e)}}function _A(e){let{total:t,start:n,end:r,count:i}=e,o=r-n;return{total:t,diff:o,change:0===n?void 0:o/n*100,latest:r,average:t/i}}function _T(e,t){return e.reduce((e,n)=>e+((null==t?void 0:t[n])||0),0)}function _P(e){let{balances:t,isLoading:n,chartType:r="area"}=e,{resolvedTheme:i}=(0,ps.F)(),o=(0,b.useMemo)(()=>"light"===i?{sc:{label:"siacoin",color:mJ.accent[800]}}:{sc:{label:"siacoin",color:mJ.accentdark[800]}},[i]),a=(0,b.useMemo)(()=>{let e=_S(t,"none"),i=_M(t);return{data:e,stats:i,config:{enabledGraph:["sc"],enabledTip:["sc"],data:{sc:o.sc},format:e=>(0,m0.Vz)(e),formatTimestamp:_C("default"),formatTickY:e=>(0,m0.Vz)(e,{fixed:0,dynamicUnits:!0}),disableAnimations:!0,chartType:r},isLoading:n}},[t,n,o,r]);return(0,x.jsx)("div",{className:"relative",children:(0,x.jsx)(EP,{id:"balance",height:200,allowConfiguration:!1,data:a.data,config:a.config})})}function _N(e){let{peers:t,isLoading:n,connectPeer:r}=e;return(0,x.jsx)(kU,{title:"Peers",actions:(0,x.jsx)(s5,{onClick:r,children:"Connect"}),isLoading:n,dataset:(null==t?void 0:t.map(e=>({type:"ip",hash:e})))||[]})}function _R(e){let{size:t,label:n,enabled:r=!0,onChange:i,color:o}=e;return(0,x.jsxs)("div",{className:(0,ea.cx)("flex gap-1.5 items-center",r?"opacity-100":"opacity-50",i?"cursor-pointer":"cursor-auto",i&&(r?"hover:opacity-90":"hover:opacity-60")),onClick:()=>i&&i(!r),children:[o&&(0,x.jsx)("div",{className:"relative top-px",children:(0,x.jsx)(fC,{style:{backgroundColor:o}})}),(0,x.jsx)(tq,{size:t,children:n})]})}var _D=n(92762);let _L={total:"total",average:"average",latest:"latest"};function _F(e){let{category:t,label:n,color:r,sc:i,value:o,extendedSuffix:a,format:s=e=>e.toFixed(2),defaultMode:l,enabledModes:u=["total","average","latest"],isLoading:c,showChange:d=!0}=e,[f,h]=(0,_D.Z)("v0/datum/".concat(t,"/").concat(n),{defaultValue:l});return(0,x.jsx)(kW,{isLoading:c,label:(0,x.jsx)(_R,{label:n,color:r}),actions:(0,x.jsx)(fj,{onChange:e=>h(e.currentTarget.value),defaultValue:f,children:u.map(e=>(0,x.jsx)(fk,{value:e,children:_L[e]},e))}),sc:(null==i?void 0:i[f])!==void 0?new(fd())(i[f]):void 0,extendedSuffix:a,value:(null==o?void 0:o[f])!==void 0&&s?s(o[f]):void 0,comment:i?(0,x.jsxs)("div",{className:"flex items-center gap-4",children:[(0,x.jsx)(kE,{tooltip:"Net change over time range:",fixedTipFiat:10,value:new(fd())(i.diff)}),d&&void 0!==i.change&&(0,x.jsx)(s4,{content:"Percent change over time range",children:(0,x.jsxs)(tq,{size:"14",weight:"semibold",font:"mono",ellipsis:!0,color:"verySubtle",children:[i.change.toFixed(2),"%"]})})]}):o&&(0,x.jsxs)("div",{className:"flex items-center gap-4",children:[(0,x.jsx)(kj,{tooltip:"Net change over time range:",format:e=>s(e.toNumber()),value:new(fd())(o.diff)}),d&&void 0!==o.change&&(0,x.jsx)(s4,{content:"Percent change over time range",children:(0,x.jsxs)(tq,{size:"14",weight:"semibold",font:"mono",ellipsis:!0,color:"verySubtle",children:[o.change.toFixed(2),"%"]})})]})})}function _V(e){let{children:t,bleed:n}=e;return(0,x.jsx)("div",{className:(0,ea.cx)(n?"-mx-5 overflow-hidden":""),children:(0,x.jsx)(l1,{children:(0,x.jsx)("div",{className:(0,ea.cx)("flex gap-4 py-4",n?"px-5 w-fit":""),children:t})})})}function _z(e){return 4320*e}function _I(e){return e/16666666666666669e-22}function _Z(e){return e/4320}function _B(e,t){return new Date().getTime()+_I(t-e)}function _H(e){let{children:t,variant:n,align:r}=e;return(0,x.jsx)("div",{className:"relative",style:{top:"primary"===n?"6px":void 0,left:"start"===r?"0px":void 0,right:"end"===r?"0px":void 0},children:(0,x.jsx)(tq,{size:"10",color:"primary"===n?"contrast":"verySubtle",dir:"start"===r?"rtl":"ltr",weight:"primary"===n?"semibold":"regular",ellipsis:!0,children:t})})}function _U(e){let{date:t,align:n,variant:r}=e;return t?(0,x.jsx)(_H,{variant:r,align:n,children:(0,m0.rN)(t)}):null}function _W(e){let{blockHeight:t,align:n,variant:r}=e;return t?(0,x.jsx)(_H,{variant:r,align:n,children:t.toLocaleString()}):null}function _q(e){let{label:t,currentHeight:n,range:r,startHeight:i,endHeight:o,color:a,align:s,rounded:l,className:u,showDates:c}=e;if(!i||!o)return null;let d=r.endHeight-r.startHeight,f=_I(d),h=_B(n,r.startHeight),p=_B(n,i),m=_B(n,o),v=(p-h)/f,g=(m-h)/f;return(0,x.jsxs)("div",{className:(0,ea.cx)("group flex items-center justify-center","absolute -top-[5px] h-4","cursor-pointer","transition-colors"),style:{left:_$(v),width:_$(g-v)},children:[(0,x.jsx)("div",{className:(0,ea.cx)("z-0 absolute w-full h-full","rounded-md","group-hover:bg-blue-500/10 dark:group-hover:bg-blue-200/10"),style:{width:"calc(100% + 8px)",left:"-4px"}}),(0,x.jsx)("div",{className:(0,ea.cx)("z-10 absolute w-full h-1.5",u,"start"===l?"rounded-l-lg":"end"===l?"rounded-r-lg":"rounded-lg","border-y","start"===l?"border-l":"end"===l?"border-r":"border","blue"===a?["bg-blue-300 dark:bg-blue-300","group-hover:bg-blue-400 dark:group-hover:bg-blue-400","border-blue-500/50 dark:border-blue-500/50"]:[],"green"===a?["bg-green-300 dark:bg-green-300","group-hover:bg-green-400 dark:group-hover:bg-green-400","border-green-500/50 dark:border-green-500/50"]:[],"amber"===a?["bg-amber-300 dark:bg-amber-300","group-hover:bg-amber-400 dark:group-hover:bg-amber-400","border-amber-500/50 dark:border-amber-500/50"]:[])}),(0,x.jsxs)("div",{className:"hidden group-hover:flex absolute justify-between gap-2 bottom-[100%]",style:"center"===s?{width:"100%"}:"end"===s?{right:_$(1-g)}:{left:_$(v)},children:[(0,x.jsx)(_W,{blockHeight:i,align:"start",variant:"primary"}),(0,x.jsx)(_H,{variant:"primary",children:t}),(0,x.jsx)(_W,{blockHeight:o,align:"end",variant:"primary"})]}),c&&(0,x.jsxs)("div",{className:"flex group-hover/segments:hidden absolute justify-between gap-2 top-[100%]",style:"center"===s?{width:"100%"}:"end"===s?{right:_$(1-g)}:{left:_$(v)},children:[(0,x.jsx)(_U,{date:p,align:"start",variant:"secondary"}),(0,x.jsx)(_U,{date:m,align:"start",variant:"secondary"})]}),(0,x.jsxs)("div",{className:"hidden group-hover:flex absolute justify-between gap-2 top-[100%]",style:"center"===s?{width:"100%"}:"end"===s?{right:_$(1-g)}:{left:_$(v)},children:[(0,x.jsx)(_U,{date:p,align:"start",variant:"secondary"}),(0,x.jsx)(_U,{date:m,align:"start",variant:"secondary"})]})]})}function _$(e){return"".concat(100*e,"%")}function _Y(e){let{currentHeight:t,eventHeight:n,range:r,label:i,bottomLabel:o,color:a,className:s,unconfirmedPing:l=!0}=e,u=!!n&&n>t,c=n&&!u&&t-n<6,d=r.endHeight-r.startHeight,f=_I(d),h=_B(t,r.startHeight),p=n?_B(t,n):0;return n?(0,x.jsx)("div",{className:(0,ea.cx)("group","absolute -top-[5px] w-4 h-4","flex items-center justify-center","rounded-full cursor-pointer","-translate-x-1/2",s),style:{left:"".concat(100*(p?(p-h)/f:0),"%")},children:(0,x.jsxs)("div",{className:(0,ea.cx)("relative w-full h-full","flex items-center justify-center","rounded-full cursor-pointer"),children:[l&&c&&(0,x.jsx)("div",{className:(0,ea.cx)("z-0 absolute w-1.5 h-1.5","rounded-full","bg-amber-500 dark:bg-amber-200","animate-pingslow")}),(0,x.jsx)("div",{className:(0,ea.cx)("z-0 absolute w-4 h-4","rounded-full","group-hover:bg-blue-500/10 dark:group-hover:bg-blue-200/10")}),(0,x.jsx)("div",{className:(0,ea.cx)("absolute w-1.5 h-1.5","rounded-full","border","green"===a?["bg-green-500 dark:bg-green-500","group-hover:bg-green-600 dark:group-hover:bg-green-600","border-white dark:border-white"]:[],"amber"===a?["bg-amber-500 dark:bg-amber-500","group-hover:bg-amber-600 dark:group-hover:bg-amber-600","border-white dark:border-white"]:[],"gray"===a?["bg-gray-700 dark:bg-graydark-900","group-hover:bg-gray-800 dark:group-hover:bg-graydark-800","border-white dark:border-white"]:[],"blue"===a?["bg-blue-300 dark:bg-blue-300","group-hover:bg-blue-400 dark:group-hover:bg-blue-400","border-white dark:border-white"]:[])}),(0,x.jsxs)("div",{className:"hidden group-hover:flex absolute justify-between gap-1 bottom-[100%] left-1.5",children:[(0,x.jsx)(_W,{blockHeight:n,align:"start",variant:"primary"}),(0,x.jsx)(_H,{variant:"primary",children:i})]}),(0,x.jsxs)("div",{className:"hidden group-hover:flex absolute justify-between gap-1 top-[100%] left-1.5",children:[(0,x.jsx)(_U,{date:p,align:"start",variant:"secondary"}),o&&(0,x.jsx)(_H,{variant:"secondary",children:o})]})]})}):null}function _G(e){let{currentHeight:t,contractHeightStart:n,contractHeightEnd:r,proofWindowHeightStart:i,proofWindowHeightEnd:o,revisionHeight:a,proofHeight:s,range:l}=e,u=t-n<6;return(0,x.jsx)("div",{className:"group/main relative w-full",children:(0,x.jsx)("div",{className:"relative py-6",children:(0,x.jsxs)("div",{className:"relative z-10 h-1.5",children:[(0,x.jsx)("div",{className:"absolute h-full w-full bg-gray-300 dark:bg-graydark-400 rounded-lg"}),(0,x.jsxs)("div",{className:"group/segments",children:[(0,x.jsx)(_q,{label:"contract duration",currentHeight:t,startHeight:n,endHeight:r,range:l,color:"blue",align:"center",rounded:"start",className:u?"border-dotted opacity-50":"",showDates:!0}),(0,x.jsx)(_q,{label:"proof window",currentHeight:t,startHeight:i,endHeight:o,range:l,color:"green",align:"end",rounded:"end",className:u?"border-dotted opacity-50":""}),(0,x.jsx)(_Y,{label:"contract formation",bottomLabel:u?"unconfirmed":"",currentHeight:t,eventHeight:n,range:l,color:u?"amber":"blue",className:"z-20"}),(0,x.jsx)(_Y,{label:"last revision",currentHeight:t,eventHeight:a,range:l,color:"green",className:"z-20"}),(0,x.jsx)(_Y,{label:"storage proof",currentHeight:t,eventHeight:s,range:l,color:"green",className:"z-20"}),(0,x.jsx)(_Y,{label:"current block",currentHeight:t,eventHeight:t,range:l,color:"gray",className:"z-10",unconfirmedPing:!1})]})]})})})}var _X=n(17335),_K=n.n(_X);function _Q(e){let{label:t,columns:n,enabled:r,setColumnsVisible:i,setColumnsHidden:o}=e,a=0===_K()(n,r).length,s=_K()(n,r).length===n.length;return(0,x.jsxs)(c_,{children:[(0,x.jsx)(cY,{children:t}),(0,x.jsxs)(cO,{children:[(0,x.jsx)(s5,{tip:"".concat(t,": show all"),icon:a?"contrast":"hover",variant:"ghost",onClick:e=>{e.stopPropagation(),i(n)},children:(0,x.jsx)(s6.xVB,{})}),(0,x.jsx)(s5,{icon:s?"contrast":"hover",tip:"".concat(t,": hide all"),variant:"ghost",onClick:e=>{e.stopPropagation(),o(n)},children:(0,x.jsx)(s6.pHg,{})})]})]})}function _J(e){let{title:t,children:n}=e;return(0,x.jsxs)("div",{className:"flex flex-col gap-6",children:[t&&(0,x.jsx)(cz,{anchorLink:!0,size:"24",children:t}),(0,x.jsx)(tG,{className:"p-6",children:(0,x.jsx)("div",{className:"flex flex-col gap-6",children:n})})]})}function _0(e){let{title:t,description:n,control:r}=e;return(0,x.jsxs)("div",{className:"flex gap-10 justify-between",children:[(0,x.jsxs)("div",{className:"flex flex-col gap-2 max-w-[600px]",children:[(0,x.jsx)(cz,{size:"20",children:t}),(0,x.jsx)(t$,{size:"14",children:n})]}),(0,x.jsx)("div",{className:"",children:r})]})}function _1(e){let{open:t,params:n,trigger:r,onOpenChange:i}=e,{body:o,title:a,variant:s,action:l,onConfirm:u}=n||{},c=(0,SU.cI)(),d=(0,b.useCallback)(()=>{u&&u(),i(!1)},[u,i]);return(0,x.jsx)(l3,{title:a,trigger:r,open:t,onOpenChange:i,contentVariants:{className:"w-[400px]"},children:(0,x.jsx)("form",{onSubmit:c.handleSubmit(d),children:(0,x.jsxs)("div",{className:"flex flex-col gap-4",children:[o,(0,x.jsx)("div",{className:"flex gap-1 justify-end",children:(0,x.jsx)(kX,{variant:s,form:c,size:"small",children:l})})]})})})}function _2(e){let{name:t,peerCount:n,isSynced:r,nodeBlockHeight:i,connectPeer:o}=e;return(0,x.jsxs)("div",{className:"flex justify-between items-center",children:[(0,x.jsx)(tq,{font:"mono",weight:"bold",size:"20",children:t}),(0,x.jsxs)("div",{className:"flex items-center",children:[n?(0,x.jsxs)(s5,{className:"relative left-2 only:left-0",variant:"ghost",onClick:o,tip:"".concat(n," connected peers"),children:[(0,x.jsx)(tq,{color:"subtle",children:n.toLocaleString()}),(0,x.jsx)(s6.RK4,{})]}):null,i&&r?(0,x.jsx)(s4,{content:"Blockchain is synced",children:(0,x.jsx)("div",{className:"relative left-2",children:(0,x.jsxs)(s5,{variant:"ghost",state:"waiting",children:[(0,x.jsx)(tq,{color:"subtle",children:i.toLocaleString()}),(0,x.jsx)(tq,{color:"green",children:(0,x.jsx)(s6.Y3p,{})})]})})}):null]})]})}function _4(e){let{nodeBlockHeight:t,networkBlockHeight:n,moreThan100BlocksToSync:r,percent:i}=e;return(0,x.jsxs)("div",{className:"flex flex-col justify-between h-full mb-1",children:[(0,x.jsx)(d_,{variant:"accent",value:t&&n?t:0,max:n||1,className:""}),(0,x.jsxs)("div",{className:"flex justify-between mt-1.5",children:[(0,x.jsx)(tq,{color:"subtle",size:"10",children:"Syncing..."}),t&&n?r?(0,x.jsx)(tq,{color:"subtle",size:"10",children:"".concat(t.toLocaleString()," / ").concat(n.toLocaleString()," (").concat(i,"%)")}):(0,x.jsx)(tq,{color:"subtle",size:"10",children:"(".concat(i,"%)")}):null]})]})}function _3(e){let{name:t,peerCount:n,connectPeer:r,isSynced:i,syncPercent:o,nodeBlockHeight:a,estimatedBlockHeight:s,firstTimeSyncing:l,moreThan100BlocksToSync:u,children:c}=e;return(0,x.jsx)(hO,{rootProps:{openDelay:100},contentProps:{side:"right",align:"start",sideOffset:5,className:"!max-w-none"},trigger:(0,x.jsxs)("div",{className:"relative hover:scale-105 transition-transform",children:[i||100===o||0===o?null:(0,x.jsx)("div",{className:"absolute -bottom-2.5 w-full flex justify-center",children:(0,x.jsxs)(tq,{className:"bg-amber-500 py-px px-1 rounded-sm scale-75",size:"10",children:[o,"%"]})}),(0,x.jsx)(cJ,{size:30})]}),children:(0,x.jsxs)("div",{className:"flex flex-col gap-2 px-1 pt-1 pb-2 w-[300px]",children:[(0,x.jsx)(_2,{nodeBlockHeight:a,isSynced:i,name:t,peerCount:n,connectPeer:r}),i?(0,x.jsx)(cb,{className:"w-full mb-0.5"}):(0,x.jsx)(_4,{percent:o,nodeBlockHeight:a,networkBlockHeight:s,moreThan100BlocksToSync:u}),l&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(tq,{color:"contrast",size:"14",children:"Welcome to Sia! The blockchain is syncing to the current network height. Depending on your system this process may take a while."}),(0,x.jsx)(cb,{className:"w-full mb-1"})]}),c]})})}function _5(e){let{testnetName:t}=e;return(0,x.jsxs)("div",{className:"flex gap-2 items-center justify-center py-2 px-3 bg-amber-600 dark:bg-amber-500",children:[(0,x.jsx)(tq,{color:"lo",children:(0,x.jsx)(s6.RdX,{})}),(0,x.jsxs)(tq,{size:"14",color:"lo",children:["You are on the ",t,"."]})]})}function _6(e){let{type:t,label:n,link:r,tip:i,icon:o,value:a,onClick:s,decimalsLimit:l,units:u}=e;return(0,x.jsxs)("div",{className:"flex justify-between items-center",children:[(0,x.jsx)(s4,{align:"start",side:"bottom",content:i,children:(0,x.jsxs)("div",{className:"flex gap-1 items-center relative overflow-hidden",children:[(0,x.jsx)(tq,{className:"flex relative",children:o||(0,x.jsx)(s6.RdX,{})}),(0,x.jsx)(tq,{size:"12",ellipsis:!0,children:r?(0,x.jsx)(cK,{href:r,target:"_blank",children:n}):n})]})}),(0,x.jsx)("div",{className:(0,ea.cx)("flex items-center",s?"cursor-pointer":""),onClick:()=>{s&&s(a)},children:"siacoin"===t?(0,x.jsx)(kx,{value:a,variant:"value",size:"12",fixed:l,dynamicUnits:!1,showTooltip:!1}):(0,x.jsx)(kj,{value:a,variant:"value",size:"12",format:e=>"".concat(ff(e,l)," ").concat(u)})})]})}function _8(e){let{name:t,form:n,fields:r}=e,i=r[t],{average:o,suggestion:a,placeholder:s,units:l,suggestionTip:u,averageTip:c,after:d,decimalsLimitSc:f=6,decimalsLimitFiat:h=6,tipsDecimalsLimitSc:p=0}=i,{setValue:m,value:v,error:g}=S$({name:t,field:i,form:n}),y=d||(()=>null),w=(0,b.useMemo)(()=>s?new(fd())(s):a&&"boolean"!=typeof a?new(fd())(a):void 0,[s,a]);return(0,x.jsxs)("div",{className:"flex flex-col gap-3 items-end",children:[(0,x.jsxs)("div",{className:"flex flex-col gap-3 w-[220px]",children:[(0,x.jsx)(fy,{name:t,size:"small",sc:v,units:l,decimalsLimitSc:f,decimalsLimitFiat:h,error:g,changed:n.formState.dirtyFields[t],placeholder:w,onChange:e=>{m(e,!0)},onBlur:()=>{m(v,!0)}}),(0,x.jsx)(y,{name:t,form:n,fields:r}),o&&(0,x.jsx)(_6,{type:"siacoin",label:"Network average",tip:c||"Averages provided by Sia Central.",decimalsLimit:p,value:(0,m0.qN)(o),onClick:()=>{m(o,!0)}}),a&&u&&(0,x.jsx)(_6,{type:"siacoin",label:"Suggestion",tip:u,decimalsLimit:p,value:(0,m0.qN)(a),onClick:()=>{m(a,!0)}})]}),(0,x.jsx)("div",{className:"h-[20px]",children:(0,x.jsx)(kY,{form:n,name:t})})]})}function _7(e){let{name:t,form:n,fields:r}=e,i=r[t],{average:o,averageTip:a,suggestion:s,suggestionTip:l,decimalsLimit:u=2,placeholder:c,units:d}=i,{setValue:f,value:h,error:p}=S$({form:n,field:i,name:t}),m=(0,b.useMemo)(()=>c?new(fd())(c):s&&"boolean"!=typeof s?new(fd())(s):void 0,[c,s]);return(0,x.jsxs)("div",{className:"flex flex-col gap-3 items-end",children:[(0,x.jsxs)("div",{className:"flex flex-col gap-3 w-[220px]",children:[(0,x.jsx)(fh,{name:t,value:h,units:d,decimalsLimit:u,placeholder:m,state:p?"invalid":n.formState.dirtyFields[t]?"valid":"default",onChange:e=>{let t=void 0!==e?new(fd())(e):void 0;f(t,!0)},onBlur:()=>{f(h,!0)}}),(0,x.jsxs)("div",{className:"flex flex-col gap-2",children:[o&&(0,x.jsx)(_6,{type:"number",label:"Network average",tip:a||"Averages provided by Sia Central.",decimalsLimit:u,value:o,units:d,onClick:()=>{f(o,!0)}}),s&&l&&(0,x.jsx)(_6,{type:"number",label:"Suggestion",tip:l,decimalsLimit:u,value:s,units:d,onClick:()=>{f(s,!0)}})]})]}),(0,x.jsx)("div",{className:"h-[20px]",children:(0,x.jsx)(kY,{form:n,name:t})})]})}function _9(e){let{label:t,link:n,tip:r,value:i,onClick:o}=e;return(0,x.jsxs)("div",{className:"flex justify-between items-center",children:[(0,x.jsx)(s4,{align:"start",side:"bottom",content:r,children:(0,x.jsxs)("div",{className:"flex gap-1 items-center relative overflow-hidden",children:[(0,x.jsx)(tq,{className:"flex relative",children:(0,x.jsx)(s6.RdX,{})}),(0,x.jsx)(tq,{size:"12",children:n?(0,x.jsx)(cK,{href:n,target:"_blank",children:t}):t})]})}),(0,x.jsx)("div",{className:"flex cursor-pointer items-center",onClick:o,children:(0,x.jsx)(tq,{size:"12",children:(0,x.jsx)(lm,{children:i})})})]})}function Oe(e){let{name:t,form:n,fields:r,type:i}=e,o=r[t],{placeholder:a,suggestion:s,suggestionTip:l}=o,{ref:u,onChange:c,setValue:d,onBlur:f,error:h}=S$({name:t,form:n,field:o});return(0,x.jsxs)("div",{className:"flex flex-col gap-3 items-end",children:[(0,x.jsxs)("div",{className:"flex flex-col gap-3 w-[220px]",children:[(0,x.jsx)(dJ,{ref:u,name:t,placeholder:a,type:i,state:h?"invalid":n.formState.dirtyFields[t]?"valid":"default",onChange:c,onBlur:f}),(0,x.jsx)("div",{className:"flex flex-col gap-2",children:s&&l&&(0,x.jsx)(_9,{label:"Suggestion",tip:l,value:s,onClick:()=>{d(s,!0)}})})]}),(0,x.jsx)("div",{className:"h-[20px]",children:(0,x.jsx)(kY,{form:n,name:t})})]})}function Ot(e){let{name:t,form:n,fields:r}=e,i=r[t],{suggestion:o,suggestionTip:a}=i,{setValue:s,value:l,error:u}=S$({name:t,field:i,form:n});return(0,x.jsxs)("div",{className:"flex flex-col gap-3 items-end",children:[(0,x.jsxs)("div",{className:"flex flex-col gap-3 w-[220px]",children:[(0,x.jsx)("div",{className:"flex justify-end w-full",children:(0,x.jsx)(fI,{name:t,size:"medium",checked:l,state:u?"invalid":n.formState.dirtyFields[t]?"valid":"default",onCheckedChange:e=>{s(e,!0)},onBlur:()=>{s(l,!0)}})}),(0,x.jsx)("div",{className:"flex flex-col gap-2",children:void 0!==o&&a&&(0,x.jsx)(_9,{label:"Suggestion",tip:a,value:o?"on":"off",onClick:()=>{s(o,!0)}})})]}),(0,x.jsx)("div",{className:"h-[20px]",children:(0,x.jsx)(kY,{form:n,name:t})})]})}function On(e){let{name:t,form:n,fields:r}=e,i=r[t],{options:o,suggestion:a,suggestionTip:s}=i,{ref:l,onChange:u,setValue:c,onBlur:d,value:f,error:h}=S$({name:t,form:n,field:i});return(0,x.jsxs)("div",{className:"flex flex-col gap-3 items-end",children:[(0,x.jsxs)("div",{className:"flex flex-col gap-3 w-[220px]",children:[(0,x.jsx)("div",{className:"flex justify-end w-full",children:(0,x.jsx)(fj,{ref:l,name:t,size:"small",value:f,state:h?"invalid":n.formState.dirtyFields[t]?"valid":"default",onChange:u,onBlur:d,children:null==o?void 0:o.map(e=>(0,x.jsx)(fk,{value:e.value,children:e.label},e.value))})}),(0,x.jsx)("div",{className:"flex flex-col gap-2",children:void 0!==a&&s&&(0,x.jsx)(_9,{label:"Suggestion",tip:s,value:a?"on":"off",onClick:()=>{c(a,!0)}})})]}),(0,x.jsx)("div",{className:"h-[20px]",children:(0,x.jsx)(kY,{form:n,name:t})})]})}function Or(e){let{title:t,category:n,form:r,fields:i}=e,o=Object.entries(i).filter(e=>{let[t,i]=e;return i.category===n&&!i.hidden&&(!i.show||i.show(r.getValues()))});return 0===o.length?null:(0,x.jsx)(_J,{title:t,children:o.map((e,t)=>{let[n,a]=e;return(0,x.jsxs)(b.Fragment,{children:[(0,x.jsx)(_0,{title:a.title,description:a.description,control:"number"===a.type?(0,x.jsx)(_7,{form:r,name:n,fields:i}):"siacoin"===a.type?(0,x.jsx)(_8,{form:r,name:n,fields:i}):"text"===a.type?(0,x.jsx)(Oe,{form:r,name:n,fields:i}):"password"===a.type?(0,x.jsx)(Oe,{form:r,type:"password",fields:i,name:n}):"boolean"===a.type?(0,x.jsx)(Ot,{form:r,name:n,fields:i}):"select"===a.type?(0,x.jsx)(On,{form:r,name:n,fields:i}):null}),t{let t=void 0!==e?new(fd())(e):void 0;u(t,!0)},onBlur:()=>{u(d,!0)}})})}function Oo(e){let{name:t,form:n,fields:r,size:i="medium",group:o=!0,children:a}=e,s=r[t],{setValue:l,value:u,error:c}=S$({name:t,field:s,form:n}),d=(0,x.jsxs)("div",{className:"flex gap-1 items-center",children:[(0,x.jsx)(fI,{name:t,size:i,checked:u,state:c?"invalid":n.formState.dirtyFields[t]?"valid":"default",onCheckedChange:e=>{l(e,!0)},onBlur:()=>{l(u,!0)}}),a]});return o?(0,x.jsx)(kG,{title:s.title,name:t,form:n,children:d}):d}var Oa=n(75652),Os=n.n(Oa);s6.lg1,s6.eHR,s6.I$H,s6.KiD,s6.P5r,s6.CCF,s6.w9S,s6.EL$,s6.aPl,s6.wEY,s6.EOT,s6.kSc,s6.W$S,s6.lJ7,s6.ORH,s6.ka0,s6.BdP,s6.d19,s6.Mes,s6.VUg,s6.U_S,s6.T85;let Ol=e=>{let{__scopeTooltip:t,delayDuration:n=700,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=e,[a,s]=(0,b.useState)(!0),l=(0,b.useRef)(!1),u=(0,b.useRef)(0);return(0,b.useEffect)(()=>{let e=u.current;return()=>window.clearTimeout(e)},[]),(0,b.createElement)(tO,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:(0,b.useCallback)(()=>{window.clearTimeout(u.current),s(!1)},[]),onClose:(0,b.useCallback)(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>s(!0),r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:(0,b.useCallback)(e=>{l.current=e},[]),disableHoverableContent:i},o)};function Ou(e){let{children:t}=e,[n,r]=(0,b.useState)(!1);return(0,b.useEffect)(()=>{r(!0)},[]),(0,x.jsx)("div",{children:n?t:null})}function Oc(e){let{className:t,passwordProtectRequestHooks:n,fallback:r,children:i,lockRoutes:o}=e;return(0,x.jsx)(Ou,{children:(0,x.jsx)(fm.kl,{fallback:r,children:(0,x.jsx)(ps.f,{attribute:"class",children:(0,x.jsx)(Ol,{children:(0,x.jsx)(fm.bW,{lockRoutes:o,passwordProtectRequestHooks:n,children:(0,x.jsxs)("div",{id:"root",className:t,children:[(0,x.jsx)(ks,{}),i]})})})})})})}var Od=n(30898),Of=n.n(Od);let Oh=[];function Op(e,t){let{columns:n,columnsDefaultVisible:r,defaultSortField:i,sortOptions:o,disabledCategories:a}={disabledCategories:Oh,...t},[s,l]=(0,_D.Z)("".concat(e,"/enabledColumns"),{defaultValue:r}),u=(0,b.useCallback)(e=>{l(t=>t.includes(e)?t.filter(t=>t!==e):t.concat(e))},[l]),c=(0,b.useCallback)(e=>{l(t=>Os()([...t,...e]))},[l]),d=(0,b.useCallback)(e=>{l(t=>_K()(t,e))},[l]),f=(0,b.useCallback)(()=>{l(r)},[l,r]),h=(0,b.useMemo)(()=>n.filter(e=>{let t=null==a?void 0:a.includes(e.category||"");return!e.fixed&&!t}),[n,a]),p=(0,b.useMemo)(()=>n.filter(e=>{let t=e.fixed||s.includes(e.id),n=null==a?void 0:a.includes(e.category||"");return t&&!n}).map(e=>e.id),[n,s,a]),{sortField:m,sortDirection:v,setSortField:g,setSortDirection:y,toggleSort:x}=function(e,t){let{defaultSortField:n,sortOptions:r,enabledColumns:i}=t,[o,a]=(0,_D.Z)("".concat(e,"/sortField"),{defaultValue:n}),[s,l]=(0,_D.Z)("".concat(e,"/sortDirection"),{defaultValue:"desc"}),u=(0,b.useCallback)(e=>{if(o!==e){a(e),l("asc");return}l(e=>"desc"===e?"asc":"desc")},[o,a,l]),c=(0,b.useMemo)(()=>{if(!r)return[];let e=r.map(e=>e.id);return Of()(e,i)},[r,i]);return{toggleSort:u,setSortDirection:l,setSortField:a,sortableColumns:c,sortField:o,sortDirection:s}}(e,{defaultSortField:i,sortOptions:o,enabledColumns:p}),w=(0,b.useMemo)(()=>{if(!o)return[];let e=o.map(e=>e.id);return Of()(e,p)},[o,p]);return{configurableColumns:h,enabledColumns:p,toggleColumnVisibility:u,toggleSort:x,setSortDirection:y,setSortField:g,sortableColumns:w,sortField:m,setColumnsVisible:c,setColumnsHidden:d,sortDirection:v,resetDefaultColumnVisibility:f}}function Om(){let e=(0,k5.useRouter)(),[t,n]=(0,b.useState)([]),r=(0,b.useCallback)(()=>{let t={...e.query};delete t.limit,delete t.offset,e.replace({query:t})},[e]),i=(0,b.useCallback)(e=>{n(t=>{let n=t.filter(t=>t.id!==e.id);return n.concat(e)}),r()},[n,r]),o=(0,b.useCallback)(()=>{n([]),r()},[n,r]),a=(0,b.useCallback)(e=>{n(t=>t.filter(t=>t.id!==e)),r()},[n,r]),s=(0,b.useCallback)(()=>{t.length&&(n(e=>e.slice(0,-1)),r())},[t,n,r]);return{filters:t,setFilter:i,removeFilter:a,removeLastFilter:s,resetFilters:o}}function Ov(e){return new(fd())(e).times(1024).times(1024)}function Og(e){return new(fd())(e).times(1e3).times(1e3).times(1e3).times(1e3)}function Oy(e){return new(fd())(e).div(1e3).div(1e3).div(1e3)}function Ox(e){return new(fd())(e).times(1e3).times(1e3).times(1e3)}function Ob(e){return new(fd())(e).div(1e3).div(1e3)}function Ow(e){return new(fd())(e).times(1e3).times(1e3)}function OE(e){return Ov(e).times(4)}function Oj(e){return Oy(OE(e))}function Ok(e){var t;return(t=Ox(e),new(fd())(t).div(1024).div(1024)).div(4).integerValue()}function OS(e,t){let n=t.reduce((e,t)=>{let n=e.startHeight,r=e.endHeight;return t.contractHeightStartr&&(r=t.contractHeightEnd),{startHeight:n,endHeight:r}},{startHeight:e,endHeight:0});n.endHeight=Math.max(n.endHeight,e)+720,n.startHeight=n.startHeight-720;let r=[],i=n.startHeight;for(;i<=n.endHeight;)r.push(i),i+=EO(1);let o=r.reduce((e,t)=>({...e,[t]:{total:null,timestamp:t}}),{});return{allDatesMap:o,range:n}}new(fd())(0)},2850:function(e,t,n){"use strict";n.d(t,{bW:function(){return F},kl:function(){return $},gw:function(){return o},Tc:function(){return W},du:function(){return q},Hv:function(){return L},iv:function(){return U},Nf:function(){return H},E:function(){return B},mw:function(){return z},q0:function(){return V},Tb:function(){return M},V1:function(){return Z},I7:function(){return I}});var r=n(79381);function i(e,t){return!e||t?null:e}function o(e){return new Promise(t=>setTimeout(t,e))}var a=n(89644),s=n.n(a),l=n(2784);function u(e){return{...e,config:{...null==e?void 0:e.config}}}function c(e){return{...e,config:{...null==e?void 0:e.config}}}function d(e){return{...e,config:{...null==e?void 0:e.config}}}function f(e,t,n){return(null==n?void 0:n.api)||(null==t?void 0:t.api)||e.api}function h(e,t,n){var r,i;let o=function(e,t,n){var r,i,o,a;let s={"Content-Type":"application/json",...null===(i=t.config)||void 0===i?void 0:null===(r=i.axios)||void 0===r?void 0:r.headers,...null==n?void 0:null===(a=n.config)||void 0===a?void 0:null===(o=a.axios)||void 0===o?void 0:o.headers},l=f(e,t,n);return e.api===l&&e.password&&(s.Authorization="Basic "+btoa(":".concat(e.password))),s}(e,t,n);return{responseType:"json",...null===(r=t.config)||void 0===r?void 0:r.axios,...null==n?void 0:null===(i=n.config)||void 0===i?void 0:i.axios,headers:o}}function p(e,t,n,r){if(!t)return null;let i=(null==n?void 0:n.params)||{};if(r&&r.params&&(i={...i,...r.params}),!(t=function(e,t){if(e&&t){let n=Object.keys(t);for(let r of n){let n=String(t[r]);e.includes(":".concat(r))?e=e.replace(":".concat(r),n):e.includes("?")?e+="&".concat(r,"=").concat(encodeURIComponent(n)):e+="?".concat(r,"=").concat(encodeURIComponent(n))}}return e}(t,i)))return null;let o=f(e,n,r);return o===e.api?"".concat(o,"/api").concat(t):"".concat(o).concat(t)}function m(e,t,n,r){let i=f(e,n,r);return i===e.api?t.replace("".concat(i,"/api"),""):t.replace(i,"")}var v=n(52322),g=n(82876),y=n(92762);function x(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})}let b=["geforce 320m","geforce 8600","geforce 8600m gt","geforce 8800 gs","geforce 8800 gt","geforce 9400","geforce 9400m g","geforce 9400m","geforce 9600m gt","geforce 9600m","geforce fx go5200","geforce gt 120","geforce gt 130","geforce gt 330m","geforce gtx 285","google swiftshader","intel g41","intel g45","intel gma 4500mhd","intel gma x3100","intel hd 3000","intel q45","legacy","mali-2","mali-3","mali-4","quadro fx 1500","quadro fx 4","quadro fx 5","radeon hd 2400","radeon hd 2600","radeon hd 4670","radeon hd 4850","radeon hd 4870","radeon hd 5670","radeon hd 5750","radeon hd 6290","radeon hd 6300","radeon hd 6310","radeon hd 6320","radeon hd 6490m","radeon hd 6630m","radeon hd 6750m","radeon hd 6770m","radeon hd 6970m","sgx 543","sgx543"];function w(e){return e=e.toLowerCase().replace(/.*angle ?\((.+)\)(?: on vulkan [0-9.]+)?$/i,"$1").replace(/\s(\d{1,2}gb|direct3d.+$)|\(r\)| \([^)]+\)$/g,"").replace(/(?:vulkan|opengl) \d+\.\d+(?:\.\d+)?(?: \((.*)\))?/,"$1")}let E="undefined"==typeof window,j=(()=>{if(E)return;let{userAgent:e,platform:t,maxTouchPoints:n}=window.navigator,r=/(iphone|ipod|ipad)/i.test(e),i="iPad"===t||"MacIntel"===t&&n>0&&!window.MSStream;return{isIpad:i,isMobile:/android/i.test(e)||r||i,isSafari12:/Version\/12.+Safari/.test(e)}})();class k extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}}let S=[],_=[];function O(e){return null!=e}let C=({mobileTiers:e=[0,15,30,60],desktopTiers:t=[0,15,30,60],override:n={},glContext:r,failIfMajorPerformanceCaveat:i=!1,benchmarksURL:o="https://unpkg.com/detect-gpu@5.0.34/dist/benchmarks"}={})=>x(void 0,void 0,void 0,function*(){let a={};if(E)return{tier:0,type:"SSR"};let{isIpad:s=!!(null==j?void 0:j.isIpad),isMobile:l=!!(null==j?void 0:j.isMobile),screenSize:u=window.screen,loadBenchmarks:c=e=>x(void 0,void 0,void 0,function*(){let t=yield fetch(`${o}/${e}`).then(e=>e.json());if(4>parseInt(t.shift().split(".")[0],10))throw new k("Detect GPU benchmark data is out of date. Please update to version 4x");return t})}=n,{renderer:d}=n,f=(e,t,n,r,i)=>({device:i,fps:r,gpu:n,isMobile:l,tier:e,type:t}),h,p="";if(d)h=[d=w(d)];else{var m;let e=r||function(e,t=!1){let n={alpha:!1,antialias:!1,depth:!1,failIfMajorPerformanceCaveat:t,powerPreference:"high-performance",stencil:!1};e&&delete n.powerPreference;let r=window.document.createElement("canvas"),i=r.getContext("webgl",n)||r.getContext("experimental-webgl",n);return null!=i?i:void 0}(null==j?void 0:j.isSafari12,i);if(!e)return f(0,"WEBGL_UNSUPPORTED");let t=e.getExtension("WEBGL_debug_renderer_info");if(t&&(d=e.getParameter(t.UNMASKED_RENDERER_WEBGL)),!d)return f(1,"FALLBACK");p=d,h="apple gpu"===(m=d=w(d))?function(e,t,n){let r;if(!n)return[t];let i=function(e){let t=e.createShader(35633),n=e.createShader(35632),r=e.createProgram();if(!(n&&t&&r))return;e.shaderSource(t,"\n precision highp float;\n attribute vec3 aPosition;\n varying float vvv;\n void main() {\n vvv = 0.31622776601683794;\n gl_Position = vec4(aPosition, 1.0);\n }\n "),e.shaderSource(n,"\n precision highp float;\n varying float vvv;\n void main() {\n vec4 enc = vec4(1.0, 255.0, 65025.0, 16581375.0) * vvv;\n enc = fract(enc);\n enc -= enc.yzww * vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);\n gl_FragColor = enc;\n }\n "),e.compileShader(t),e.compileShader(n),e.attachShader(r,t),e.attachShader(r,n),e.linkProgram(r),e.detachShader(r,t),e.detachShader(r,n),e.deleteShader(t),e.deleteShader(n),e.useProgram(r);let i=e.createBuffer();e.bindBuffer(34962,i),e.bufferData(34962,new Float32Array([-1,-1,0,3,-1,0,-1,3,0]),35044);let o=e.getAttribLocation(r,"aPosition");e.vertexAttribPointer(o,3,5126,!1,0,0),e.enableVertexAttribArray(o),e.clearColor(1,1,1,1),e.clear(16384),e.viewport(0,0,1,1),e.drawArrays(4,0,3);let a=new Uint8Array(4);return e.readPixels(0,0,1,1,6408,5121,a),e.deleteProgram(r),e.deleteBuffer(i),a.join("")}(e),o="801621810",a="8016218135",s="80162181161",l=(null==j?void 0:j.isIpad)?[["a7",s,12],["a8",a,15],["a8x",a,15],["a9",a,15],["a9x",a,15],["a10",a,15],["a10x",a,15],["a12",o,15],["a12x",o,15],["a12z",o,15],["a14",o,15],["m1",o,15]]:[["a7",s,12],["a8",a,12],["a9",a,15],["a10",a,15],["a11",o,15],["a12",o,15],["a13",o,15],["a14",o,15]];return"80162181255"===i?r=l.filter(([,,e])=>e>=14):(r=l.filter(([,e])=>e===i)).length||(r=l),r.map(([e])=>`apple ${e} gpu`)}(e,m,l):[m]}let v=(yield Promise.all(h.map(function(e){var t;return x(this,void 0,void 0,function*(){let n;let r=(e=>{let t=l?["adreno","apple","mali-t","mali","nvidia","powervr","samsung"]:["intel","apple","amd","radeon","nvidia","geforce"];for(let n of t)if(e.includes(n))return n})(e);if(!r)return;let i=`${l?"m":"d"}-${r}${s?"-ipad":""}.json`,o=a[i]=null!==(t=a[i])&&void 0!==t?t:c(i);try{n=yield o}catch(e){if(e instanceof k)throw e;return}let d=function(e){var t;let n=(e=e.replace(/\([^)]+\)/,"")).match(/\d+/)||e.match(/(\W|^)([A-Za-z]{1,3})(\W|$)/g);return null!==(t=null==n?void 0:n.join("").replace(/\W|amd/g,""))&&void 0!==t?t:""}(e),f=n.filter(([,e])=>e===d);f.length||(f=n.filter(([t])=>t.includes(e)));let h=f.length;if(0===h)return;let p=e.split(/[.,()\[\]/\s]/g).sort().filter((e,t,n)=>0===t||e!==n[t-1]).join(" "),m,[v,,,,g]=h>1?f.map(e=>[e,function(e,t){if(e===t)return 0;let n=e;e.length>t.length&&(e=t,t=n);let r=e.length,i=t.length;for(;r>0&&e.charCodeAt(~-r)===t.charCodeAt(~-i);)r--,i--;let o,a=0;for(;au?l>u?u+1:l:l>s?s+1:l;return u}(p,e[2])]).sort(([,e],[,t])=>e-t)[0][0]:f[0],y=Number.MAX_VALUE,{devicePixelRatio:x}=window,b=u.width*x*u.height*x;for(let e of g){let[t,n]=e,r=t*n,i=Math.abs(b-r);ie===n?t-r:e-n);if(!v.length){let e=b.find(e=>d.includes(e));return e?f(0,"BLOCKLISTED",e):f(1,"FALLBACK",`${d} (${p})`)}let[,g,y,C]=v[0];if(-1===g)return f(0,"BLOCKLISTED",y,g,C);let M=l?e:t,A=0;for(let e=0;e=M[e]&&(A=e);return f(A,"BENCHMARK",y,g,C)});function M(){var e,t;let n=null===(e=(t=window).matchMedia)||void 0===e?void 0:e.call(t,"(prefers-reduced-motion: reduce)");return!n||!!n.matches}let A=(0,l.createContext)({}),T=()=>(0,l.useContext)(A);function P(e){let{children:t}=e,n=function(){let[e,t]=(0,l.useState)({}),n=(0,l.useCallback)((e,n)=>{t(t=>({...t,[e]:{key:e,...n}}))},[t]),r=(0,l.useCallback)(e=>{t(t=>(delete t[e],{...t}))},[t]),i=(0,l.useCallback)(()=>{t({})},[t]),o=(0,l.useMemo)(()=>Object.entries(e).map(e=>e[1]),[e]);return{setWorkflow:n,removeWorkflow:r,resetWorkflows:i,workflows:o}}();return(0,v.jsx)(A.Provider,{value:n,children:t})}let N=[{id:"usd",label:"USD",prefix:"$",fixed:2},{id:"cad",label:"CAD",prefix:"$",fixed:2},{id:"eur",label:"EUR",prefix:"€",fixed:2},{id:"gbp",label:"GBP",prefix:"\xa3",fixed:2},{id:"jpy",label:"JPY",prefix:"\xa5",fixed:2},{id:"aud",label:"AUD",prefix:"$",fixed:2},{id:"rub",label:"RUB",prefix:"₽",fixed:2},{id:"cny",label:"CNY",prefix:"\xa5",fixed:2},{id:"btc",label:"BTC",prefix:"₿",fixed:6},{id:"eth",label:"ETH",prefix:"Ξ",fixed:6}],R={api:"",allowCustomApi:!1,siaCentral:!0,password:void 0,currency:N[0],currencyDisplay:"bothPreferSc",recentApis:{},autoLock:!1,autoLockTimeout:6e5},D=(0,l.createContext)({}),L=()=>(0,l.useContext)(D);function F(e){let{children:t,...n}=e,i=function(e){let{passwordProtectRequestHooks:t,lockRoutes:n,defaultSettings:i}=e,o=(0,l.useMemo)(()=>({...R,...i}),[i]),[a,s]=(0,y.Z)("v0/settings",{defaultValue:o});(0,l.useEffect)(()=>{s(e=>({...o,...e}))},[]);let u=(0,l.useMemo)(()=>({...o,...a}),[a,o]),{resetWorkflows:c}=T(),d=(0,l.useCallback)(e=>{s(t=>({...t,...e}))},[s]),f=(0,l.useCallback)(e=>{let t=N.find(t=>t.id===e);t&&d({currency:t})},[d]),h=(0,g.useRouter)(),p=(0,g.usePathname)(),[m,v]=(0,l.useState)({}),x=(0,l.useCallback)((e,t)=>{v(n=>({...n,[e]:t}))},[v]),b=(0,l.useCallback)(()=>{for(let[e,t]of(n&&h.push("".concat(n.login,"?prev=").concat([n.login].includes(p)?n.home:p)),d({password:""}),c(),(0,r.JG)(()=>!0,void 0,{revalidate:!1}),Object.entries(m)))t&&t()},[h,n,d,c,m,p]),w=(0,l.useMemo)(()=>!!u.password,[u]),E=function(){let e=M(),[t,n]=(0,l.useState)(!1),[r,i]=(0,l.useState)(!1),[{isGpuEnabled:o,hasUserSet:a},s]=(0,y.Z)("v1/gpuFeatures",{defaultValue:{isGpuEnabled:!e,hasUserSet:!1}}),u=(0,l.useCallback)(function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];s(n=>({...n,isGpuEnabled:e,hasUserSet:t}))},[s]),c=(0,l.useCallback)(async()=>{let e=!1;{let t=await C();console.log("GPU",t),e=t.tier>0,!a&&t.tier<2&&u(!1,!1)}i(e),n(!0)},[i,u,a]);return(0,l.useEffect)(()=>{c()},[]),{hasCheckedGpu:t,canGpuRender:r,isGpuEnabled:o,shouldRender:r&&o,setCanGpuRender:i,setIsGpuEnabled:u}}();return{settings:u,setSettings:d,setCurrency:f,currencyOptions:N,gpu:E,lock:b,isUnlocked:w,passwordProtectRequestHooks:t,setOnLockCallback:x}}(n);return(0,v.jsx)(D.Provider,{value:i,children:t})}function V(e){var t;let n=(0,l.useMemo)(()=>c(e),[e]),{settings:o,passwordProtectRequestHooks:a}=L(),u=p(o,n.route,n,void 0),d=(0,l.useMemo)(()=>i(u?"".concat(u).concat(JSON.stringify(void 0!==e.payload?e.payload:"")):null,n.disabled||a&&!o.password),[u,e,n,a,o]);return(0,r.ZP)(d,async()=>{if(!n.route)throw Error("No route");let t=h(o,n,void 0);if(!u)throw Error("No route");try{let n=await s().post(u,e.payload,t);return n.data}catch(t){let e=Error(t.response.data);throw e.status=t.response.status||500,e}},null===(t=n.config)||void 0===t?void 0:t.swr)}function z(e,t){let{setWorkflow:n,removeWorkflow:i}=T(),{mutate:o}=(0,r.kY)(),{settings:a}=L(),l=u(e);return{post:async e=>{let r=d(e);try{let u;let c=h(a,l,r),d=p(a,l.route,l,r);if(!d)throw Error("No route");"payload"in r&&(u=r.payload);let f="".concat(d).concat(JSON.stringify(void 0!==e.payload?e.payload:"")),v=m(a,d,e,r);n(f,{path:v,payload:u});let g=await s().post(d,u,c);return t&&await t(function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e,i=arguments.length>2?arguments[2]:void 0;return o(n=>{if("string"!=typeof n)return!1;let i=m(a,n,e,r);return t(i)},n,i)},r,g),i(f),{status:g.status,data:g.data}}catch(e){var u,c;return{status:null===(u=e.response)||void 0===u?void 0:u.status,error:(null===(c=e.response)||void 0===c?void 0:c.data)||e.message}}}}}function I(e){var t;let n=(0,l.useMemo)(()=>c(e),[e]),{settings:o,passwordProtectRequestHooks:a}=L(),u=p(o,n.route,n,void 0),d=(0,l.useMemo)(()=>i(u?"".concat(u).concat(JSON.stringify(void 0!==e.payload?e.payload:"")):null,n.disabled||a&&!o.password),[u,e,n,a,o]);return(0,r.ZP)(d,async()=>{if(!n.route)throw Error("No route");let t=h(o,n,void 0);if(!u)throw Error("No route");try{let n=await s().put(u,e.payload,t);return n.data}catch(t){let e=Error(t.response.data);throw e.status=t.response.status||500,e}},null===(t=n.config)||void 0===t?void 0:t.swr)}function Z(e,t){let{mutate:n}=(0,r.kY)(),{settings:i}=L(),{setWorkflow:o,removeWorkflow:a}=T(),l=u(e);return{put:async e=>{let r=d(e);try{let u;let c=h(i,l,r),d=p(i,l.route,l,r);if(!d)throw Error("No route");"payload"in r&&(u=r.payload);let f="".concat(d).concat(JSON.stringify(void 0!==e.payload?e.payload:"")),v=m(i,d,e,r);o(f,{path:v,payload:u});let g=await s().put(d,u,c);return t&&await t(function(t){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e,a=arguments.length>2?arguments[2]:void 0;return n(n=>{if("string"!=typeof n)return!1;let o=m(i,n,e,r);return t(o)},o,a)},r,g),a(f),{status:g.status,data:g.data}}catch(e){var u,c;return{status:null===(u=e.response)||void 0===u?void 0:u.status,error:(null===(c=e.response)||void 0===c?void 0:c.data)||e.message}}}}}function B(e,t){let{mutate:n}=(0,r.kY)(),{settings:i}=L(),{setWorkflow:o,removeWorkflow:a}=T(),l=u(e);return{patch:async e=>{let r=d(e);try{let u;let c=h(i,l,r),d=p(i,l.route,l,r);if(!d)throw Error("No route");"payload"in r&&(u=r.payload);let f="".concat(d).concat(JSON.stringify(void 0!==e.payload?e.payload:"")),v=m(i,d,e,r);o(f,{path:v,payload:u});let g=await s().patch(d,u,c);return t&&await t(function(t){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e,a=arguments.length>2?arguments[2]:void 0;return n(n=>{if("string"!=typeof n)return!1;let o=m(i,n,e,r);return t(o)},o,a)},r,g),a(f),{status:g.status,data:g.data}}catch(e){var u,c;return{status:null===(u=e.response)||void 0===u?void 0:u.status,error:(null===(c=e.response)||void 0===c?void 0:c.data)||e.message}}}}}function H(e){var t;let n=(0,l.useMemo)(()=>c(e),[e]),{settings:o,passwordProtectRequestHooks:a}=L(),u=p(o,n.route,n,void 0);return(0,r.ZP)(i(e.standalone?"".concat(e.standalone,"/").concat(u):u,n.disabled||a&&!o.password),async()=>{if(!n.route)throw Error("No route");let e=h(o,n,void 0);if(!u)throw Error("No route");try{let t=await s().get(u,e);return t.data}catch(t){let e=Error(t.response.data);throw e.status=t.response.status||500,e}},null===(t=n.config)||void 0===t?void 0:t.swr)}function U(e,t){let{mutate:n}=(0,r.kY)(),{settings:i}=L(),{setWorkflow:o,removeWorkflow:a}=T(),l=u(e);return{delete:async e=>{let r=d(e);try{let u=h(i,l,r),c=p(i,l.route,l,r);if(!c)throw Error("No route");let d=m(i,c,e,r);o(c,{path:d});let f=await s().delete(c,u);return t&&await t(function(t){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e,a=arguments.length>2?arguments[2]:void 0;return n(n=>{if("string"!=typeof n)return!1;let o=m(i,n,e,r);return t(o)},o,a)},r,f),a(c),{status:f.status,data:f.data}}catch(e){var u,c;return{status:null===(u=e.response)||void 0===u?void 0:u.status,error:(null===(c=e.response)||void 0===c?void 0:c.data)||e.message}}}}}function W(){return Math.round((new Date().getTime()-14336e8)/6e5)}function q(){return Math.round((new Date().getTime()-16736e8)/6e5)}function $(e){let{fallback:t,cacheProvider:n,children:i}=e;return(0,v.jsx)(P,{children:(0,v.jsx)(r.J$,{value:{fallback:t||{},provider:n},children:i})})}},27444:function(e,t,n){"use strict";n.d(t,{dk:function(){return o},Z7:function(){return F},Uy:function(){return V},GP:function(){return y},kr:function(){return x},nH:function(){return l},KU:function(){return b},rV:function(){return E},Az:function(){return k},uo:function(){return S},Te:function(){return j},d$:function(){return s},On:function(){return a},Wl:function(){return d},cQ:function(){return c},cM:function(){return R},Kw:function(){return D},hV:function(){return g},ST:function(){return O},_3:function(){return N},HU:function(){return M},uq:function(){return T},G:function(){return P},Rz:function(){return A},Fn:function(){return _},Os:function(){return f},a0:function(){return m},cj:function(){return v},Qq:function(){return h}});var r=n(2850),i=n(79381);let o="/state/host";function a(e){return(0,r.Nf)({...e,route:o})}function s(e){return(0,r.Nf)({...e,route:"/state/consensus"})}function l(){let e=a({config:{swr:{revalidateOnFocus:!1}}}),t=(0,i.ZP)(e,()=>{var t;return(null===(t=e.data)||void 0===t?void 0:t.network)==="Zen Testnet"?(0,r.du)():(0,r.Tc)()},{refreshInterval:6e4,keepPreviousData:!0});return t.data||0}let u="/syncer/peers";function c(e){return(0,r.Nf)({...e,route:u})}function d(e){return(0,r.V1)({...e,route:"/syncer/peers"},async e=>{e(e=>e===u)})}function f(e){return(0,r.Nf)({...e,route:"/wallet"})}function h(e){return(0,r.Nf)({...e,route:"/wallet/transactions"})}let p="/wallet/pending";function m(e){return(0,r.Nf)({...e,route:p})}function v(e){return(0,r.mw)({...e,route:"/wallet/send"},async e=>{await (0,r.gw)(2e3),e(e=>e.startsWith(p))})}function g(e){return(0,r.Nf)({...e,route:"/tpool/fee"})}function y(e){return(0,r.q0)({...e,route:"/contracts"})}function x(e){return(0,r.V1)({...e,route:"/contracts/:id/integrity"})}function b(e){return(0,r.Nf)({...e,route:"/metrics/:interval"})}let w="/settings";function E(e){return(0,r.Nf)({...e,route:w})}function j(e){return(0,r.E)({...e,route:"/settings"},async e=>{await e(e=>e.startsWith(w))})}function k(e){return(0,r.mw)({...e,route:"/settings/announce"})}function S(e){return(0,r.I7)({...e,payload:{},route:"/settings/ddns/update"})}function _(e){return(0,r.Nf)({...e,route:"/volumes"})}function O(e){return(0,r.Nf)({...e,route:"/volumes/:id"})}let C="/volumes";function M(e){return(0,r.mw)({...e,route:C},async e=>{e(e=>e.startsWith(C))})}function A(e){return(0,r.V1)({...e,route:"/volumes/:id"},async e=>{e(e=>e.startsWith(C))})}function T(e){return(0,r.iv)({...e,route:"/volumes/:id"},async e=>{e(e=>e.startsWith(C))})}function P(e){return(0,r.V1)({...e,route:"/volumes/:id/resize"},async e=>{await (0,r.gw)(1e4),e(e=>e.startsWith(C))})}function N(e){return(0,r.iv)({...e,route:"/volumes/:id/cancel"},async e=>{await (0,r.gw)(3e3),e(e=>e.startsWith(C))})}function R(e){return(0,r.Nf)({...e,route:"/system/dir"})}function D(e){return(0,r.V1)({...e,route:"/system/dir"})}let L="/alerts";function F(e){return(0,r.Nf)({...e,route:L})}function V(e){return(0,r.mw)({...e,route:"/alerts/dismiss"},async e=>{e(e=>e.startsWith(L))})}},41775:function(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}n.d(t,{RVU:function(){return tL},eHR:function(){return tU},xHM:function(){return tW},IRm:function(){return tq},L6f:function(){return t$},rW0:function(){return tY},osk:function(){return tG},JaG:function(){return tX},wWN:function(){return is},Dkj:function(){return iy},cfm:function(){return tQ},YV2:function(){return t6},EMN:function(){return t8},bdU:function(){return t7},VUy:function(){return t9},Cp0:function(){return ne},kqg:function(){return nt},Mes:function(){return nn},DI$:function(){return ni},NlZ:function(){return nf},Y3p:function(){return np},Z$8:function(){return nh},tEK:function(){return nm},PcV:function(){return ng},QN4:function(){return nv},Jsc:function(){return ny},wEY:function(){return nw},olJ:function(){return nE},KiD:function(){return nS},dDl:function(){return n_},Jrl:function(){return nM},aPl:function(){return nA},kBK:function(){return ip},Bpb:function(){return nP},iG7:function(){return nF},dr6:function(){return nV},d19:function(){return nz},w9S:function(){return nI},VBo:function(){return il},Hb6:function(){return nH},CCF:function(){return nU},Qbr:function(){return nY},L37:function(){return nG},ROc:function(){return iv},UG6:function(){return im},lq1:function(){return nX},zvn:function(){return iu},K2o:function(){return ih},EL$:function(){return nQ},BdP:function(){return n3},dsj:function(){return n5},P5r:function(){return n6},RdX:function(){return n8},U_S:function(){return n7},V8Q:function(){return rn},POp:function(){return rr},kSc:function(){return ri},mBM:function(){return id},Lur:function(){return rl},b47:function(){return ru},Sfn:function(){return rc},W$S:function(){return rv},T85:function(){return rg},Ckx:function(){return ry},dZ8:function(){return rb},EOT:function(){return rx},RK4:function(){return rE},XJM:function(){return r_},RRj:function(){return rO},ka0:function(){return rC},hzZ:function(){return rA},VUg:function(){return rD},owP:function(){return rL},Fs9:function(){return rF},wGX:function(){return rV},Wet:function(){return rB},BB5:function(){return rH},ZEk:function(){return rU},$Iz:function(){return rY},shL:function(){return rG},hiv:function(){return rX},mli:function(){return rQ},lJ7:function(){return ig},ORH:function(){return r0},xVB:function(){return r6},pHg:function(){return r8},I$H:function(){return r9},HCc:function(){return r7},oaN:function(){return ic},qdM:function(){return ie},SmH:function(){return ii},lg1:function(){return io}});var a,s,l,u,c,d,f,h,p,m,v,g,y,x,b,w,E,j,k,S,_,O,C,M,A,T,P,N,R,D,L,F,V,z,I,Z,B,H,U,W,q,$,Y,G,X,K,Q,J,ee,et,en,er,ei,eo,ea,es,el,eu,ec,ed,ef,eh,ep,em,ev,eg,ey,ex,eb,ew,eE,ej,ek,eS,e_,eO,eC,eM,eA,eT,eP,eN,eR,eD,eL,eF,eV,ez,eI,eZ,eB,eH,eU,eW,eq,e$,eY,eG,eX,eK,eQ,eJ,e0,e1,e2,e4,e3,e5,e6,e8,e7,e9,te,tt,tn,tr,ti,to,ta,ts,tl,tu,tc,td,tf,th,tp,tm,tv,tg,ty,tx,tb,tw,tE=["width","height","viewBox"],tj=["tabindex"],tk={focusable:"false",preserveAspectRatio:"xMidYMid meet"},tS=n(13980),t_=n.n(tS),tO=n(2784);function tC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tM(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var tP=["className","children","tabIndex"],tN=["tabindex"],tR=tO.forwardRef(function(e,t){var n=e.className,r=e.children,a=e.tabIndex,s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.width,n=e.height,r=e.viewBox,a=void 0===r?"0 0 ".concat(t," ").concat(n):r,s=o(e,tE),l=s.tabindex,u=o(s,tj),c=i(i(i({},tk),u),{},{width:t,height:n,viewBox:a});return c["aria-label"]||c["aria-labelledby"]||c.title?(c.role="img",null!=l&&(c.focusable="true",c.tabindex=l)):c["aria-hidden"]=!0,c}(tM(tM({},tT(e,tP)),{},{tabindex:a})),l=s.tabindex,u=tT(s,tN);return n&&(u.className=n),null!=l&&(u.tabIndex=l),t&&(u.ref=t),tO.createElement("svg",u,r)});tR.displayName="Icon",tR.propTypes={"aria-hidden":t_().string,"aria-label":t_().string,"aria-labelledby":t_().string,children:t_().node,className:t_().string,height:t_().oneOfType([t_().number,t_().string]),preserveAspectRatio:t_().string,tabIndex:t_().string,viewBox:t_().string,width:t_().oneOfType([t_().number,t_().string]),xmlns:t_().string},tR.defaultProps={xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid meet"};var tD=["children"],tL=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,tD);return tO.createElement(tR,tA({width:20,height:20,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),a||(a=tO.createElement("path",{d:"M17 15L17 8 15 8 15 15 8 15 8 17 15 17 15 24 17 24 17 17 24 17 24 15z"})),n)}),tF=["children"],tV=["children"],tz=["children"],tI=["children"],tZ=["children"],tB=["children"],tH=["children"],tU=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,tF);return tO.createElement(tR,tA({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),s||(s=tO.createElement("path",{d:"M14 19H18V21H14z"})),l||(l=tO.createElement("path",{d:"M6,2V28a2,2,0,0,0,2,2H24a2,2,0,0,0,2-2V2ZM24,28H8V16H24Zm0-14H8V10H24ZM8,8V4H24V8Z"})),n)}),tW=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,tV);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),u||(u=tO.createElement("path",{d:"M22 26L22 24 9.41 24 26 7.41 24.59 6 8 22.59 8 10 6 10 6 26 22 26z"})),n)}),tq=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,tz);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),c||(c=tO.createElement("path",{d:"M10 26L10 24 22.59 24 6 7.41 7.41 6 24 22.59 24 10 26 10 26 26 10 26z"})),n)}),t$=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,tI);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),d||(d=tO.createElement("path",{d:"M22 6L22 8 9.41 8 26 24.59 24.59 26 8 9.41 8 22 6 22 6 6 22 6z"})),n)}),tY=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,tZ);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),f||(f=tO.createElement("path",{d:"M10 6L10 8 22.59 8 6 24.59 7.41 26 24 9.41 24 22 26 22 26 6 10 6z"})),n)}),tG=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,tB);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),h||(h=tO.createElement("path",{d:"M7.2,2.3c-1,4.4,1.7,8.7,6.1,9.8c0.1,0,0.1,0,0.2,0c-1.1,1.2-2.7,1.8-4.3,1.8c-0.1,0-0.2,0-0.2,0C5.6,13.8,3,11,3.2,7.7 C3.2,5.3,4.8,3.1,7.2,2.3 M8,1L8,1C4.1,1.6,1.5,5.3,2.1,9.1c0.6,3.3,3.4,5.8,6.8,5.9c0.1,0,0.2,0,0.3,0c2.3,0,4.4-1.1,5.8-3 c0.2-0.2,0.1-0.6-0.1-0.7c-0.1-0.1-0.2-0.1-0.3-0.1c-3.9-0.3-6.7-3.8-6.4-7.6C8.3,3,8.4,2.4,8.6,1.8c0.1-0.3,0-0.6-0.3-0.7 C8.1,1,8.1,1,8,1z"})),n)}),tX=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,tH);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),p||(p=tO.createElement("path",{d:"M7.5 1H8.5V3.5H7.5z"})),m||(m=tO.createElement("path",{d:"M10.8 3.4H13.3V4.4H10.8z",transform:"rotate(-45.001 12.074 3.922)"})),v||(v=tO.createElement("path",{d:"M12.5 7.5H15V8.5H12.5z"})),g||(g=tO.createElement("path",{d:"M11.6 10.8H12.6V13.3H11.6z",transform:"rotate(-45.001 12.077 12.075)"})),y||(y=tO.createElement("path",{d:"M7.5 12.5H8.5V15H7.5z"})),x||(x=tO.createElement("path",{d:"M2.7 11.6H5.2V12.6H2.7z",transform:"rotate(-45.001 3.929 12.078)"})),b||(b=tO.createElement("path",{d:"M1 7.5H3.5V8.5H1z"})),w||(w=tO.createElement("path",{d:"M3.4 2.7H4.4V5.2H3.4z",transform:"rotate(-45.001 3.926 3.925)"})),E||(E=tO.createElement("path",{d:"M8,6c1.1,0,2,0.9,2,2s-0.9,2-2,2S6,9.1,6,8S6.9,6,8,6 M8,5C6.3,5,5,6.3,5,8s1.3,3,3,3s3-1.3,3-3S9.7,5,8,5z"})),n)}),tK=["children"],tQ=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,tK);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),j||(j=tO.createElement("path",{d:"M26,6V8.17L5.64,11.87a2,2,0,0,0-1.64,2v4.34a2,2,0,0,0,1.64,2L8,20.56V24a2,2,0,0,0,2,2h8a2,2,0,0,0,2-2V22.74l6,1.09V26h2V6ZM18,24H10V20.93l8,1.45ZM6,18.17V13.83L26,10.2V21.8Z"})),n)}),tJ=["children"],t0=["children"],t1=["children"],t2=["children"],t4=["children"],t3=["children"],t5=["children"],t6=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,tJ);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),k||(k=tO.createElement("path",{d:"M26,4H22V2H20V4H12V2H10V4H6A2.0025,2.0025,0,0,0,4,6V26a2.0025,2.0025,0,0,0,2,2H26a2.0025,2.0025,0,0,0,2-2V6A2.0025,2.0025,0,0,0,26,4ZM6,6h4V8h2V6h8V8h2V6h4l0,4H6Zm0,6h5v6H6ZM19,26H13V20h6Zm0-8H13V12h6Zm2,8V20h5l.0012,6Z"})),n)}),t8=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,t0);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),S||(S=tO.createElement("path",{d:"M24 12L16 22 8 12z"})),n)}),t7=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,t1);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),_||(_=tO.createElement("path",{d:"M20 24L10 16 20 8z"})),n)}),t9=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,t2);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),O||(O=tO.createElement("path",{d:"M12 8L22 16 12 24z"})),n)}),ne=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,t4);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),C||(C=tO.createElement("path",{d:"M24 24L16 32 8 24zM8 8L16 0 24 8z"})),n)}),nt=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,t3);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),M||(M=tO.createElement("path",{d:"M8 20L16 10 24 20z"})),n)}),nn=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,t5);return tO.createElement(tR,tA({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),A||(A=tO.createElement("path",{d:"M30,15H27.9492A12.0071,12.0071,0,0,0,17,4.0508V2H15V4.0508A12.0071,12.0071,0,0,0,4.0508,15H2v2H4.0508A12.0071,12.0071,0,0,0,15,27.9492V30h2V27.9492A12.0071,12.0071,0,0,0,27.9492,17H30ZM17,25.9492V22H15v3.9492A10.0166,10.0166,0,0,1,6.0508,17H10V15H6.0508A10.0166,10.0166,0,0,1,15,6.0508V10h2V6.0508A10.0166,10.0166,0,0,1,25.9492,15H22v2h3.9492A10.0166,10.0166,0,0,1,17,25.9492Z"})),n)}),nr=["children"],ni=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,nr);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),T||(T=tO.createElement("path",{d:"M26,4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V6A2,2,0,0,0,26,4ZM14,21.5,9,16.5427,10.5908,15,14,18.3456,21.4087,11l1.5918,1.5772Z"})),P||(P=tO.createElement("path",{fill:"none",d:"M14,21.5,9,16.5427,10.5908,15,14,18.3456,21.4087,11l1.5918,1.5772Z","data-icon-path":"inner-path"})),n)}),no=["children"],na=["children"],ns=["children"],nl=["children"],nu=["children"],nc=["children"],nd=["children"],nf=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,no);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),N||(N=tO.createElement("path",{d:"M13 24L4 15 5.414 13.586 13 21.171 26.586 7.586 28 9 13 24z"})),n)}),nh=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,na);return tO.createElement(tR,tA({width:32,height:32,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),R||(R=tO.createElement("path",{d:"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2ZM14,21.5908l-5-5L10.5906,15,14,18.4092,21.41,11l1.5957,1.5859Z"})),D||(D=tO.createElement("path",{fill:"none",d:"M14 21.591L9 16.591 10.591 15 14 18.409 21.41 11 23.005 12.585 14 21.591z","data-icon-path":"inner-path"})),n)}),np=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,ns);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),L||(L=tO.createElement("path",{d:"M8,1C4.1,1,1,4.1,1,8c0,3.9,3.1,7,7,7s7-3.1,7-7C15,4.1,11.9,1,8,1z M7,11L4.3,8.3l0.9-0.8L7,9.3l4-3.9l0.9,0.8L7,11z"})),F||(F=tO.createElement("path",{d:"M7,11L4.3,8.3l0.9-0.8L7,9.3l4-3.9l0.9,0.8L7,11z","data-icon-path":"inner-path",opacity:"0"})),n)}),nm=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,nl);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),V||(V=tO.createElement("path",{d:"M14 21.414L9 16.413 10.413 15 14 18.586 21.585 11 23 12.415 14 21.414z"})),z||(z=tO.createElement("path",{d:"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,26A12,12,0,1,1,28,16,12,12,0,0,1,16,28Z"})),n)}),nv=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,nu);return tO.createElement(tR,tA({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),I||(I=tO.createElement("path",{d:"M24 9.4L22.6 8 16 14.6 9.4 8 8 9.4 14.6 16 8 22.6 9.4 24 16 17.4 22.6 24 24 22.6 17.4 16 24 9.4z"})),n)}),ng=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,nc);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),Z||(Z=tO.createElement("path",{d:"M24 9.4L22.6 8 16 14.6 9.4 8 8 9.4 14.6 16 8 22.6 9.4 24 16 17.4 22.6 24 24 22.6 17.4 16 24 9.4z"})),n)}),ny=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,nd);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),B||(B=tO.createElement("path",{d:"M16,2C8.2,2,2,8.2,2,16s6.2,14,14,14s14-6.2,14-14S23.8,2,16,2z M16,28C9.4,28,4,22.6,4,16S9.4,4,16,4s12,5.4,12,12 S22.6,28,16,28z"})),H||(H=tO.createElement("path",{d:"M21.4 23L16 17.6 10.6 23 9 21.4 14.4 16 9 10.6 10.6 9 16 14.4 21.4 9 23 10.6 17.6 16 23 21.4z"})),n)}),nx=["children"],nb=["children"],nw=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,nx);return tO.createElement(tR,tA({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),U||(U=tO.createElement("path",{d:"M31 16L24 23 22.59 21.59 28.17 16 22.59 10.41 24 9 31 16zM1 16L8 9 9.41 10.41 3.83 16 9.41 21.59 8 23 1 16z"})),W||(W=tO.createElement("path",{d:"M5.91 15H26.080000000000002V17H5.91z",transform:"rotate(-75 15.996 16)"})),n)}),nE=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,nb);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),q||(q=tO.createElement("path",{d:"M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z"})),$||($=tO.createElement("path",{d:"M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z"})),n)}),nj=["children"],nk=["children"],nS=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,nj);return tO.createElement(tR,tA({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),Y||(Y=tO.createElement("path",{d:"M21,12V10H17V7H15v3H13a2.002,2.002,0,0,0-2,2v3a2.002,2.002,0,0,0,2,2h6v3H11v2h4v3h2V22h2a2.0023,2.0023,0,0,0,2-2V17a2.002,2.002,0,0,0-2-2H13V12Z"})),G||(G=tO.createElement("path",{d:"M16,4A12,12,0,1,1,4,16,12.0353,12.0353,0,0,1,16,4m0-2A14,14,0,1,0,30,16,14.0412,14.0412,0,0,0,16,2Z"})),n)}),n_=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,nk);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),X||(X=tO.createElement("path",{d:"M23 27.18L20.41 24.59 19 26 23 30 30 23 28.59 21.59 23 27.18z"})),K||(K=tO.createElement("circle",{cx:"11",cy:"8",r:"1"})),Q||(Q=tO.createElement("circle",{cx:"11",cy:"16",r:"1"})),J||(J=tO.createElement("circle",{cx:"11",cy:"24",r:"1"})),ee||(ee=tO.createElement("path",{d:"M24,3H8A2,2,0,0,0,6,5V27a2,2,0,0,0,2,2h8V27H8V21H26V5A2,2,0,0,0,24,3Zm0,16H8V13H24Zm0-8H8V5H24Z"})),n)}),nO=["children"],nC=["children"],nM=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,nO);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),et||(et=tO.createElement("path",{d:"M12 12H14V24H12zM18 12H20V24H18z"})),en||(en=tO.createElement("path",{d:"M4 6V8H6V28a2 2 0 002 2H24a2 2 0 002-2V8h2V6zM8 28V8H24V28zM12 2H20V4H12z"})),n)}),nA=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,nC);return tO.createElement(tR,tA({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),er||(er=tO.createElement("path",{d:"M8 4V8H4V4H8M2 2v8h8V2zM18 7v4H14V7h4M12 5v8h8V5zM8 16v4H4V16H8M2 14v8h8V14z"})),ei||(ei=tO.createElement("path",{d:"M22,10v6H16v6H10v8H30V10Zm-4,8h4v4H18ZM16,28H12V24h4Zm6,0H18V24h4Zm6,0H24V24h4Zm0-6H24V18h4Zm-4-6V12h4v4Z"})),n)}),nT=["children"],nP=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,nT);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eo||(eo=tO.createElement("circle",{cx:"16",cy:"16",r:"8"})),n)}),nN=["children"],nR=["children"],nD=["children"],nL=["children"],nF=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,nN);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),ea||(ea=tO.createElement("path",{d:"M10 6H14V10H10zM18 6H22V10H18zM10 14H14V18H10zM18 14H22V18H18zM10 22H14V26H10zM18 22H22V26H18z"})),n)}),nV=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,nR);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),es||(es=tO.createElement("path",{d:"M2 26H30V28H2zM25.4 9c.8-.8.8-2 0-2.8 0 0 0 0 0 0l-3.6-3.6c-.8-.8-2-.8-2.8 0 0 0 0 0 0 0l-15 15V24h6.4L25.4 9zM20.4 4L24 7.6l-3 3L17.4 7 20.4 4zM6 22v-3.6l10-10 3.6 3.6-10 10H6z"})),n)}),nz=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,nD);return tO.createElement(tR,tA({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),el||(el=tO.createElement("path",{d:"M21,30a8,8,0,1,1,8-8A8,8,0,0,1,21,30Zm0-14a6,6,0,1,0,6,6A6,6,0,0,0,21,16Z"})),eu||(eu=tO.createElement("path",{d:"M22.59 25L20 22.41 20 18 22 18 22 21.59 24 23.59 22.59 25z"})),ec||(ec=tO.createElement("path",{d:"M28,6a2,2,0,0,0-2-2H22V2H20V4H12V2H10V4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2h4V26H6V6h4V8h2V6h8V8h2V6h4v6h2Z"})),n)}),nI=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,nL);return tO.createElement(tR,tA({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),ed||(ed=tO.createElement("path",{d:"M18 31h2V29a1.0006 1.0006 0 011-1h6a1.0006 1.0006 0 011 1v2h2V29a3.0033 3.0033 0 00-3-3H21a3.0033 3.0033 0 00-3 3zM24 25a4 4 0 114-4A4.0039 4.0039 0 0124 25zm0-6a2 2 0 102 2A2.0027 2.0027 0 0024 19zM2 31H4V29a1.0009 1.0009 0 011-1h6a1.0009 1.0009 0 011 1v2h2V29a3.0033 3.0033 0 00-3-3H5a3.0033 3.0033 0 00-3 3zM8 25a4 4 0 114-4A4.0042 4.0042 0 018 25zm0-6a2 2 0 102 2A2.0023 2.0023 0 008 19zM18 16h2V14a1.0009 1.0009 0 011-1h6a1.0009 1.0009 0 011 1v2h2V14a3.0033 3.0033 0 00-3-3H21a3.0033 3.0033 0 00-3 3zM24 10a4 4 0 114-4A4.0042 4.0042 0 0124 10zm0-6a2 2 0 102 2A2.0023 2.0023 0 0024 4zM2 16H4V14a1.0013 1.0013 0 011-1h6a1.0013 1.0013 0 011 1v2h2V14a3.0033 3.0033 0 00-3-3H5a3.0033 3.0033 0 00-3 3zM8 10a4 4 0 114-4A4.0045 4.0045 0 018 10zM8 4a2 2 0 102 2A2.002 2.002 0 008 4z"})),n)}),nZ=["children"],nB=["children"],nH=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,nZ);return tO.createElement(tR,tA({width:32,height:32,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),ef||(ef=tO.createElement("path",{d:"M18,28H14a2,2,0,0,1-2-2V18.41L4.59,11A2,2,0,0,1,4,9.59V6A2,2,0,0,1,6,4H26a2,2,0,0,1,2,2V9.59A2,2,0,0,1,27.41,11L20,18.41V26A2,2,0,0,1,18,28ZM6,6V9.59l8,8V26h4V17.59l8-8V6Z"})),n)}),nU=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,nB);return tO.createElement(tR,tA({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eh||(eh=tO.createElement("path",{d:"M2 28H30V30H2zM27 11a1 1 0 001-1V7a1 1 0 00-.66-.94l-11-4a1 1 0 00-.68 0l-11 4A1 1 0 004 7v3a1 1 0 001 1H6V24H4v2H28V24H26V11zM6 7.7L16 4.06 26 7.7V9H6zM18 24H14V11h4zM8 11h4V24H8zM24 24H20V11h4z"})),n)}),nW=["children"],nq=["children"],n$=["children"],nY=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,nW);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),ep||(ep=tO.createElement("path",{d:"M11.17,6l3.42,3.41.58.59H28V26H4V6h7.17m0-2H4A2,2,0,0,0,2,6V26a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2H16L12.59,4.59A2,2,0,0,0,11.17,4Z"})),n)}),nG=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,nq);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),em||(em=tO.createElement("path",{d:"M26 20L24 20 24 24 20 24 20 26 24 26 24 30 26 30 26 26 30 26 30 24 26 24z"})),ev||(ev=tO.createElement("path",{d:"M28,8H16l-3.4-3.4C12.2,4.2,11.7,4,11.2,4H4C2.9,4,2,4.9,2,6v20c0,1.1,0.9,2,2,2h14v-2H4V6h7.2l3.4,3.4l0.6,0.6H28v8h2v-8 C30,8.9,29.1,8,28,8z"})),n)}),nX=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,n$);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eg||(eg=tO.createElement("path",{d:"M14,4a7,7,0,1,1-7,7,7,7,0,0,1,7-7m0-2a9,9,0,1,0,9,9A9,9,0,0,0,14,2Z"})),ey||(ey=tO.createElement("path",{d:"M28,11a13.9563,13.9563,0,0,0-4.1051-9.8949L22.4813,2.5187A11.9944,11.9944,0,0,1,5.5568,19.5194l-.0381-.0381L4.1051,20.8949A13.9563,13.9563,0,0,0,14,25v3H10v2H20V28H16V24.84A14.0094,14.0094,0,0,0,28,11Z"})),n)}),nK=["children"],nQ=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,nK);return tO.createElement(tR,tA({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),ex||(ex=tO.createElement("path",{d:"M16,.0005,4,5.9784V20.0443a12,12,0,0,0,24,0V5.9784Zm6.83,27.3138L16,23.9119V26.14l5.0361,2.5088A10.0025,10.0025,0,0,1,6,20.0443V7.21L16,2.2284,26,7.21v3.75L16,5.9783V8.2062l10,4.9816v3.75L16,11.9562v2.2279l10,4.9815v.8787a9.9045,9.9045,0,0,1-.37,2.6871L16,17.934v2.2279l8.8952,4.4313A10.0252,10.0252,0,0,1,22.83,27.3143Z"})),n)}),nJ=["children"],n0=["children"],n1=["children"],n2=["children"],n4=["children"],n3=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,nJ);return tO.createElement(tR,tA({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eb||(eb=tO.createElement("path",{d:"M11 24H21V26H11zM13 28H19V30H13zM16 2A10 10 0 006 12a9.19 9.19 0 003.46 7.62c1 .93 1.54 1.46 1.54 2.38h2c0-1.84-1.11-2.87-2.19-3.86A7.2 7.2 0 018 12a8 8 0 0116 0 7.2 7.2 0 01-2.82 6.14c-1.07 1-2.18 2-2.18 3.86h2c0-.92.53-1.45 1.54-2.39A9.18 9.18 0 0026 12 10 10 0 0016 2z"})),n)}),n5=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,n0);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),ew||(ew=tO.createElement("path",{d:"M16,2A14,14,0,1,0,30,16,14.0158,14.0158,0,0,0,16,2Zm0,26A12,12,0,0,1,16,4V16l8.4812,8.4814A11.9625,11.9625,0,0,1,16,28Z"})),n)}),n6=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,n1);return tO.createElement(tR,tA({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eE||(eE=tO.createElement("path",{d:"M29.53,6.15a1,1,0,0,0-1,0L20,10.38V7a1,1,0,0,0-1.45-.89L10,10.38V3A1,1,0,0,0,9,2H3A1,1,0,0,0,2,3V28H30V7A1,1,0,0,0,29.53,6.15ZM22,26H18V19h4Zm6,0H24V18a1,1,0,0,0-1-1H17a1,1,0,0,0-1,1v8H4V4H8v9.62l10-5v5l10-5Z"})),n)}),n8=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,n2);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),ej||(ej=tO.createElement("path",{d:"M8.5 11L8.5 6.5 6.5 6.5 6.5 7.5 7.5 7.5 7.5 11 6 11 6 12 10 12 10 11zM8 3.5c-.4 0-.8.3-.8.8S7.6 5 8 5c.4 0 .8-.3.8-.8S8.4 3.5 8 3.5z"})),ek||(ek=tO.createElement("path",{d:"M8,15c-3.9,0-7-3.1-7-7s3.1-7,7-7s7,3.1,7,7S11.9,15,8,15z M8,2C4.7,2,2,4.7,2,8s2.7,6,6,6s6-2.7,6-6S11.3,2,8,2z"})),n)}),n7=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,n4);return tO.createElement(tR,tA({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eS||(eS=tO.createElement("path",{d:"M29.88,15.52l-6-11A1,1,0,0,0,23,4H9a1,1,0,0,0-.88.52l-6,11a1,1,0,0,0,0,1l6,11A1,1,0,0,0,9,28H23a1,1,0,0,0,.88-.52l6-11A1,1,0,0,0,29.88,15.52ZM22.93,7l4.39,8h-9.5ZM16,14.14,10.82,6H21.18ZM9.07,7l5.11,8H4.68ZM4.68,17h9.5L9.07,25ZM16,17.86,21.18,26H10.82ZM22.93,25l-5.11-8h9.5Z"})),n)}),n9=["children"],re=["children"],rt=["children"],rn=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,n9);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),e_||(e_=tO.createElement("path",{d:"M13,14H3c-0.6,0-1-0.4-1-1V3c0-0.6,0.4-1,1-1h5v1H3v10h10V8h1v5C14,13.6,13.6,14,13,14z"})),eO||(eO=tO.createElement("path",{d:"M10 1L10 2 13.3 2 9 6.3 9.7 7 14 2.7 14 6 15 6 15 1z"})),n)}),rr=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,re);return tO.createElement(tR,tA({width:20,height:20,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eC||(eC=tO.createElement("path",{d:"M29.25,6.76a6,6,0,0,0-8.5,0l1.42,1.42a4,4,0,1,1,5.67,5.67l-8,8a4,4,0,1,1-5.67-5.66l1.41-1.42-1.41-1.42-1.42,1.42a6,6,0,0,0,0,8.5A6,6,0,0,0,17,25a6,6,0,0,0,4.27-1.76l8-8A6,6,0,0,0,29.25,6.76Z"})),eM||(eM=tO.createElement("path",{d:"M4.19,24.82a4,4,0,0,1,0-5.67l8-8a4,4,0,0,1,5.67,0A3.94,3.94,0,0,1,19,14a4,4,0,0,1-1.17,2.85L15.71,19l1.42,1.42,2.12-2.12a6,6,0,0,0-8.51-8.51l-8,8a6,6,0,0,0,0,8.51A6,6,0,0,0,7,28a6.07,6.07,0,0,0,4.28-1.76L9.86,24.82A4,4,0,0,1,4.19,24.82Z"})),n)}),ri=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,rt);return tO.createElement(tR,tA({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eA||(eA=tO.createElement("path",{d:"M16 8H30V10H16zM6 10.59L3.41 8 2 9.41 6 13.41 14 5.41 12.59 4 6 10.59zM16 22H30V24H16zM6 24.59L3.41 22 2 23.41 6 27.41 14 19.41 12.59 18 6 24.59z"})),n)}),ro=["children"],ra=["children"],rs=["children"],rl=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,ro);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eT||(eT=tO.createElement("path",{d:"M24,14H22V8A6,6,0,0,0,10,8v6H8a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H24a2,2,0,0,0,2-2V16A2,2,0,0,0,24,14ZM12,8a4,4,0,0,1,8,0v6H12ZM24,28H8V16H24Z"})),n)}),ru=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,ra);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eP||(eP=tO.createElement("path",{d:"M13.647,14.907a1.4482,1.4482,0,1,0,1.326,1.443A1.385,1.385,0,0,0,13.647,14.907Zm4.745,0a1.4482,1.4482,0,1,0,1.326,1.443A1.385,1.385,0,0,0,18.392,14.907Z"})),eN||(eN=tO.createElement("path",{d:"M24.71,4H7.29A2.6714,2.6714,0,0,0,4.625,6.678V24.254A2.6714,2.6714,0,0,0,7.29,26.932H22.032l-.689-2.405,1.664,1.547L24.58,27.53,27.375,30V6.678A2.6714,2.6714,0,0,0,24.71,4ZM19.692,20.978s-.468-.559-.858-1.053a4.1021,4.1021,0,0,0,2.353-1.547,7.4391,7.4391,0,0,1-1.495.767,8.5564,8.5564,0,0,1-1.885.559,9.1068,9.1068,0,0,1-3.367-.013,10.9127,10.9127,0,0,1-1.911-.559,7.6184,7.6184,0,0,1-.949-.442c-.039-.026-.078-.039-.117-.065a.18.18,0,0,1-.052-.039c-.234-.13-.364-.221-.364-.221a4.0432,4.0432,0,0,0,2.275,1.534c-.39.494-.871,1.079-.871,1.079a4.7134,4.7134,0,0,1-3.965-1.976,17.409,17.409,0,0,1,1.872-7.579,6.4285,6.4285,0,0,1,3.653-1.365l.13.156a8.77,8.77,0,0,0-3.419,1.703s.286-.156.767-.377a9.7625,9.7625,0,0,1,2.951-.819,1.2808,1.2808,0,0,1,.221-.026,11,11,0,0,1,2.626-.026A10.5971,10.5971,0,0,1,21.2,11.917a8.6518,8.6518,0,0,0-3.237-1.651l.182-.208a6.4285,6.4285,0,0,1,3.653,1.365,17.409,17.409,0,0,1,1.872,7.579A4.752,4.752,0,0,1,19.692,20.978Z"})),n)}),rc=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,rs);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eR||(eR=tO.createElement("path",{fillRule:"evenodd",d:"M16,2a14,14,0,0,0-4.43,27.28c.7.13,1-.3,1-.67s0-1.21,0-2.38c-3.89.84-4.71-1.88-4.71-1.88A3.71,3.71,0,0,0,6.24,22.3c-1.27-.86.1-.85.1-.85A2.94,2.94,0,0,1,8.48,22.9a3,3,0,0,0,4.08,1.16,2.93,2.93,0,0,1,.88-1.87c-3.1-.36-6.37-1.56-6.37-6.92a5.4,5.4,0,0,1,1.44-3.76,5,5,0,0,1,.14-3.7s1.17-.38,3.85,1.43a13.3,13.3,0,0,1,7,0c2.67-1.81,3.84-1.43,3.84-1.43a5,5,0,0,1,.14,3.7,5.4,5.4,0,0,1,1.44,3.76c0,5.38-3.27,6.56-6.39,6.91a3.33,3.33,0,0,1,.95,2.59c0,1.87,0,3.38,0,3.84s.25.81,1,.67A14,14,0,0,0,16,2Z"})),n)}),rd=["children"],rf=["children"],rh=["children"],rp=["children"],rm=["children"],rv=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,rd);return tO.createElement(tR,tA({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eD||(eD=tO.createElement("path",{d:"M16.59 20.41L20.17 24 20.17 24 16.58 27.59 18 29 23 24 18 19 16.59 20.41zM23.59 20.41L27.17 24 27.17 24 23.58 27.59 25 29 30 24 25 19 23.59 20.41z"})),eL||(eL=tO.createElement("path",{d:"M14,23H4V7.91l11.43,7.91a1,1,0,0,0,1.14,0L28,7.91V17h2V7a2,2,0,0,0-2-2H4A2,2,0,0,0,2,7V23a2,2,0,0,0,2,2H14ZM25.8,7,16,13.78,6.2,7Z"})),n)}),rg=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,rf);return tO.createElement(tR,tA({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eF||(eF=tO.createElement("path",{d:"M25.3943,24a7.8772,7.8772,0,0,0-1.6707-8.5684,3.918,3.918,0,0,0-1.0844-4.414l2.7759-2.7759a2.0025,2.0025,0,0,0,0-2.8286L22.5869,2.5849a2.0021,2.0021,0,0,0-2.8286,0L6.5859,15.7573a2.0027,2.0027,0,0,0,0,2.8286l2.8282,2.8282a2.0024,2.0024,0,0,0,2.8286,0l4.7749-4.7754a3.9329,3.9329,0,0,0,5.5139.4326A5.9442,5.9442,0,0,1,23.1775,24H16v4H4v2H28V24ZM10.8281,20,8,17.1714,9.8787,15.293l2.8283,2.8281ZM16,14a3.9811,3.9811,0,0,0,.0762.7524L14.1211,16.707l-2.8284-2.8281,9.88-9.88L24.001,6.8271l-3.2488,3.2491A3.9771,3.9771,0,0,0,16,14Zm4,2a2,2,0,1,1,2-2A2.0023,2.0023,0,0,1,20,16Zm6,12H18V26h8Z"})),n)}),ry=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,rh);return tO.createElement(tR,tA({width:32,height:32,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eV||(eV=tO.createElement("path",{d:"M16,2C8.2,2,2,8.2,2,16s6.2,14,14,14s14-6.2,14-14S23.8,2,16,2z M16,28C9.4,28,4,22.6,4,16S9.4,4,16,4s12,5.4,12,12 S22.6,28,16,28z"})),ez||(ez=tO.createElement("path",{d:"M21.4 23L16 17.6 10.6 23 9 21.4 14.4 16 9 10.6 10.6 9 16 14.4 21.4 9 23 10.6 17.6 16 23 21.4z"})),n)}),rx=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,rp);return tO.createElement(tR,tA({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eI||(eI=tO.createElement("path",{d:"M2 22H30V24H2zM2 26H30V28H2zM24 10a2 2 0 102 2 2 2 0 00-2-2zM16 16a4 4 0 114-4A4.0045 4.0045 0 0116 16zm0-6a2 2 0 102 2A2.002 2.002 0 0016 10zM8 10a2 2 0 102 2 2 2 0 00-2-2z"})),eZ||(eZ=tO.createElement("path",{d:"M28,20H4a2.0051,2.0051,0,0,1-2-2V6A2.0051,2.0051,0,0,1,4,4H28a2.0051,2.0051,0,0,1,2,2V18A2.0027,2.0027,0,0,1,28,20ZM28,6H4V18H28Z"})),n)}),rb=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,rm);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eB||(eB=tO.createElement("path",{d:"M2 22H30V24H2zM2 26H30V28H2zM24 10a2 2 0 102 2 2 2 0 00-2-2zM16 16a4 4 0 114-4A4.0045 4.0045 0 0116 16zm0-6a2 2 0 102 2A2.002 2.002 0 0016 10zM8 10a2 2 0 102 2 2 2 0 00-2-2z"})),eH||(eH=tO.createElement("path",{d:"M28,20H4a2.0051,2.0051,0,0,1-2-2V6A2.0051,2.0051,0,0,1,4,4H28a2.0051,2.0051,0,0,1,2,2V18A2.0027,2.0027,0,0,1,28,20ZM28,6H4V18H28Z"})),n)}),rw=["children"],rE=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,rw);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eU||(eU=tO.createElement("circle",{cx:"21",cy:"26",r:"2"})),eW||(eW=tO.createElement("circle",{cx:"21",cy:"6",r:"2"})),eq||(eq=tO.createElement("circle",{cx:"4",cy:"16",r:"2"})),e$||(e$=tO.createElement("path",{d:"M28,12a3.9962,3.9962,0,0,0-3.8579,3H19.8579a3.9655,3.9655,0,0,0-5.4914-2.6426L11.19,8.3872A3.9626,3.9626,0,0,0,12,6a4,4,0,1,0-4,4,3.96,3.96,0,0,0,1.6338-.3574l3.176,3.97a3.9239,3.9239,0,0,0,0,4.7744l-3.1758,3.97A3.96,3.96,0,0,0,8,22a4,4,0,1,0,4,4,3.9624,3.9624,0,0,0-.81-2.3872l3.1758-3.97A3.9658,3.9658,0,0,0,19.8579,17h4.2842A3.9934,3.9934,0,1,0,28,12ZM6,6A2,2,0,1,1,8,8,2.0023,2.0023,0,0,1,6,6ZM8,28a2,2,0,1,1,2-2A2.0023,2.0023,0,0,1,8,28Zm8-10a2,2,0,1,1,2-2A2.0023,2.0023,0,0,1,16,18Zm12,0a2,2,0,1,1,2-2A2.0023,2.0023,0,0,1,28,18Z"})),n)}),rj=["children"],rk=["children"],rS=["children"],r_=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,rj);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eY||(eY=tO.createElement("path",{d:"M14 16L24 6 25.4 7.4 16.8 16 25.4 24.6 24 26zM8 4H10V28H8z"})),n)}),rO=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,rk);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eG||(eG=tO.createElement("path",{d:"M18 16L8 26 6.6 24.6 15.2 16 6.6 7.4 8 6zM22 4H24V28H22z"})),n)}),rC=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,rS);return tO.createElement(tR,tA({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eX||(eX=tO.createElement("path",{d:"M21,2a8.9977,8.9977,0,0,0-8.6119,11.6118L2,24v6H8L18.3881,19.6118A9,9,0,1,0,21,2Zm0,16a7.0125,7.0125,0,0,1-2.0322-.3022L17.821,17.35l-.8472.8472-3.1811,3.1812L12.4141,20,11,21.4141l1.3787,1.3786-1.5859,1.586L9.4141,23,8,24.4141l1.3787,1.3786L7.1716,28H4V24.8284l9.8023-9.8023.8472-.8474-.3473-1.1467A7,7,0,1,1,21,18Z"})),eK||(eK=tO.createElement("circle",{cx:"22",cy:"10",r:"2"})),n)}),rM=["children"],rA=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,rM);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),eQ||(eQ=tO.createElement("path",{d:"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2ZM8,18a2,2,0,1,1,2-2A2,2,0,0,1,8,18Zm8,0a2,2,0,1,1,2-2A2,2,0,0,1,16,18Zm8,0a2,2,0,1,1,2-2A2,2,0,0,1,24,18Z"})),eJ||(eJ=tO.createElement("path",{fill:"none",d:"M10,16a2,2,0,1,1-2-2A2,2,0,0,1,10,16Zm6-2a2,2,0,1,0,2,2A2,2,0,0,0,16,14Zm8,0a2,2,0,1,0,2,2A2,2,0,0,0,24,14Z","data-icon-path":"inner-path"})),n)}),rT=["children"],rP=["children"],rN=["children"],rR=["children"],rD=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,rT);return tO.createElement(tR,tA({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),e0||(e0=tO.createElement("path",{d:"M30 18A6 6 0 1020 22.46v7.54l4-1.8926 4 1.8926V22.46A5.98 5.98 0 0030 18zm-4 8.84l-2-.9467L22 26.84V23.65a5.8877 5.8877 0 004 0zM24 22a4 4 0 114-4A4.0045 4.0045 0 0124 22zM9 14H16V16H9zM9 8H19V10H9z"})),e1||(e1=tO.createElement("path",{d:"M6,30a2.0021,2.0021,0,0,1-2-2V4A2.0021,2.0021,0,0,1,6,2H22a2.0021,2.0021,0,0,1,2,2V8H22V4H6V28H16v2Z"})),n)}),rL=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,rP);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),e2||(e2=tO.createElement("circle",{cx:"11",cy:"15.5",r:"1.5"})),e4||(e4=tO.createElement("path",{d:"M12,12H10V8h2a2,2,0,0,0,0-4H10A2.0023,2.0023,0,0,0,8,6v.5H6V6a4.0045,4.0045,0,0,1,4-4h2a4,4,0,0,1,0,8Z"})),e3||(e3=tO.createElement("path",{d:"M22.4479,21.0337A10.971,10.971,0,0,0,19.9211,4.7446l-.999,1.73A8.9967,8.9967,0,1,1,5,14H3a10.9916,10.9916,0,0,0,18.0338,8.4478L28.5859,30,30,28.5859Z"})),n)}),rF=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,rN);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),e5||(e5=tO.createElement("path",{d:"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,26A12,12,0,1,1,28,16,12,12,0,0,1,16,28Z"})),n)}),rV=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,rR);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),e6||(e6=tO.createElement("path",{d:"M20.59 22L15 16.41 15 7 17 7 17 15.58 22 20.59 20.59 22z"})),e8||(e8=tO.createElement("path",{d:"M16,2A13.94,13.94,0,0,0,6,6.23V2H4v8h8V8H7.08A12,12,0,1,1,4,16H2A14,14,0,1,0,16,2Z"})),n)}),rz=["children"],rI=["children"],rZ=["children"],rB=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,rz);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),e7||(e7=tO.createElement("path",{d:"M18,28A12,12,0,1,0,6,16v6.2L2.4,18.6,1,20l6,6,6-6-1.4-1.4L8,22.2V16H8A10,10,0,1,1,18,26Z"})),n)}),rH=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,rI);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),e9||(e9=tO.createElement("path",{d:"M29,10H3a1,1,0,0,0-1,1V21a1,1,0,0,0,1,1H29a1,1,0,0,0,1-1V11A1,1,0,0,0,29,10ZM28,20H4V12H8v4h2V12h5v4h2V12h5v4h2V12h4Z"})),n)}),rU=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,rZ);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),te||(te=tO.createElement("path",{d:"M13.9,4.6l-2.5-2.5C11.3,2.1,11.1,2,11,2H3C2.4,2,2,2.4,2,3v10c0,0.6,0.4,1,1,1h10c0.6,0,1-0.4,1-1V5 C14,4.9,13.9,4.7,13.9,4.6z M6,3h4v2H6V3z M10,13H6V9h4V13z M11,13V9c0-0.6-0.4-1-1-1H6C5.4,8,5,8.4,5,9v4H3V3h2v2c0,0.6,0.4,1,1,1 h4c0.6,0,1-0.4,1-1V3.2l2,2V13H11z"})),n)}),rW=["children"],rq=["children"],r$=["children"],rY=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,rW);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tt||(tt=tO.createElement("path",{d:"M28,4H4A2,2,0,0,0,2,6V22a2,2,0,0,0,2,2h8v4H8v2H24V28H20V24h8a2,2,0,0,0,2-2V6A2,2,0,0,0,28,4ZM18,28H14V24h4Zm10-6H4V6H28Z"})),n)}),rG=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,rq);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tn||(tn=tO.createElement("path",{d:"M13.5,8.4c0-0.1,0-0.3,0-0.4c0-0.1,0-0.3,0-0.4l1-0.8c0.4-0.3,0.4-0.9,0.2-1.3l-1.2-2C13.3,3.2,13,3,12.6,3 c-0.1,0-0.2,0-0.3,0.1l-1.2,0.4c-0.2-0.1-0.4-0.3-0.7-0.4l-0.3-1.3C10.1,1.3,9.7,1,9.2,1H6.8c-0.5,0-0.9,0.3-1,0.8L5.6,3.1 C5.3,3.2,5.1,3.3,4.9,3.4L3.7,3C3.6,3,3.5,3,3.4,3C3,3,2.7,3.2,2.5,3.5l-1.2,2C1.1,5.9,1.2,6.4,1.6,6.8l0.9,0.9c0,0.1,0,0.3,0,0.4 c0,0.1,0,0.3,0,0.4L1.6,9.2c-0.4,0.3-0.5,0.9-0.2,1.3l1.2,2C2.7,12.8,3,13,3.4,13c0.1,0,0.2,0,0.3-0.1l1.2-0.4 c0.2,0.1,0.4,0.3,0.7,0.4l0.3,1.3c0.1,0.5,0.5,0.8,1,0.8h2.4c0.5,0,0.9-0.3,1-0.8l0.3-1.3c0.2-0.1,0.4-0.2,0.7-0.4l1.2,0.4 c0.1,0,0.2,0.1,0.3,0.1c0.4,0,0.7-0.2,0.9-0.5l1.1-2c0.2-0.4,0.2-0.9-0.2-1.3L13.5,8.4z M12.6,12l-1.7-0.6c-0.4,0.3-0.9,0.6-1.4,0.8 L9.2,14H6.8l-0.4-1.8c-0.5-0.2-0.9-0.5-1.4-0.8L3.4,12l-1.2-2l1.4-1.2c-0.1-0.5-0.1-1.1,0-1.6L2.2,6l1.2-2l1.7,0.6 C5.5,4.2,6,4,6.5,3.8L6.8,2h2.4l0.4,1.8c0.5,0.2,0.9,0.5,1.4,0.8L12.6,4l1.2,2l-1.4,1.2c0.1,0.5,0.1,1.1,0,1.6l1.4,1.2L12.6,12z"})),tr||(tr=tO.createElement("path",{d:"M8,11c-1.7,0-3-1.3-3-3s1.3-3,3-3s3,1.3,3,3C11,9.6,9.7,11,8,11C8,11,8,11,8,11z M8,6C6.9,6,6,6.8,6,7.9C6,7.9,6,8,6,8 c0,1.1,0.8,2,1.9,2c0,0,0.1,0,0.1,0c1.1,0,2-0.8,2-1.9c0,0,0-0.1,0-0.1C10,6.9,9.2,6,8,6C8.1,6,8,6,8,6z"})),n)}),rX=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,r$);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),ti||(ti=tO.createElement("path",{d:"M30 8h-4.1c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2v2h14.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30V8zM21 12c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3S22.7 12 21 12zM2 24h4.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30v-2H15.9c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2V24zM11 20c1.7 0 3 1.3 3 3s-1.3 3-3 3-3-1.3-3-3S9.3 20 11 20z"})),n)}),rK=["children"],rQ=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,rK);return tO.createElement(tR,tA({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),to||(to=tO.createElement("path",{d:"M8 15H24V17H8z"})),n)}),rJ=["children"],r0=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,rJ);return tO.createElement(tR,tA({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),ta||(ta=tO.createElement("path",{d:"M23,9h6a2,2,0,0,0,2-2V3a2,2,0,0,0-2-2H23a2,2,0,0,0-2,2V4H11V3A2,2,0,0,0,9,1H3A2,2,0,0,0,1,3V7A2,2,0,0,0,3,9H9a2,2,0,0,0,2-2V6h4V26a2.0023,2.0023,0,0,0,2,2h4v1a2,2,0,0,0,2,2h6a2,2,0,0,0,2-2V25a2,2,0,0,0-2-2H23a2,2,0,0,0-2,2v1H17V17h4v1a2,2,0,0,0,2,2h6a2,2,0,0,0,2-2V14a2,2,0,0,0-2-2H23a2,2,0,0,0-2,2v1H17V6h4V7A2,2,0,0,0,23,9Zm0-6h6V7H23ZM9,7H3V3H9ZM23,25h6v4H23Zm0-11h6v4H23Z",transform:"translate(0 .005)"})),n)}),r1=["children"],r2=["children"],r4=["children"],r3=["children"],r5=["children"],r6=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,r1);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),ts||(ts=tO.createElement("path",{d:"M15.5,7.8C14.3,4.7,11.3,2.6,8,2.5C4.7,2.6,1.7,4.7,0.5,7.8c0,0.1,0,0.2,0,0.3c1.2,3.1,4.1,5.2,7.5,5.3 c3.3-0.1,6.3-2.2,7.5-5.3C15.5,8.1,15.5,7.9,15.5,7.8z M8,12.5c-2.7,0-5.4-2-6.5-4.5c1-2.5,3.8-4.5,6.5-4.5s5.4,2,6.5,4.5 C13.4,10.5,10.6,12.5,8,12.5z"})),tl||(tl=tO.createElement("path",{d:"M8,5C6.3,5,5,6.3,5,8s1.3,3,3,3s3-1.3,3-3S9.7,5,8,5z M8,10c-1.1,0-2-0.9-2-2s0.9-2,2-2s2,0.9,2,2S9.1,10,8,10z"})),n)}),r8=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,r2);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tu||(tu=tO.createElement("path",{d:"M2.6,11.3l0.7-0.7C2.6,9.8,1.9,9,1.5,8c1-2.5,3.8-4.5,6.5-4.5c0.7,0,1.4,0.1,2,0.4l0.8-0.8C9.9,2.7,9,2.5,8,2.5 C4.7,2.6,1.7,4.7,0.5,7.8c0,0.1,0,0.2,0,0.3C1,9.3,1.7,10.4,2.6,11.3z"})),tc||(tc=tO.createElement("path",{d:"M6 7.9c.1-1 .9-1.8 1.8-1.8l.9-.9C7.2 4.7 5.5 5.6 5.1 7.2 5 7.7 5 8.3 5.1 8.8L6 7.9zM15.5 7.8c-.6-1.5-1.6-2.8-2.9-3.7L15 1.7 14.3 1 1 14.3 1.7 15l2.6-2.6c1.1.7 2.4 1 3.7 1.1 3.3-.1 6.3-2.2 7.5-5.3C15.5 8.1 15.5 7.9 15.5 7.8zM10 8c0 1.1-.9 2-2 2-.3 0-.7-.1-1-.3L9.7 7C9.9 7.3 10 7.6 10 8zM8 12.5c-1 0-2.1-.3-3-.8l1.3-1.3c1.4.9 3.2.6 4.2-.8.7-1 .7-2.4 0-3.4l1.4-1.4c1.1.8 2 1.9 2.6 3.2C13.4 10.5 10.6 12.5 8 12.5z"})),n)}),r7=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,r4);return tO.createElement(tR,tA({width:32,height:32,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),td||(td=tO.createElement("path",{d:"M22 17H24V19H22z"})),tf||(tf=tO.createElement("path",{d:"M28,8H4V5H26V3H4A2,2,0,0,0,2,5V26a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10A2,2,0,0,0,28,8ZM4,26V10H28v3H20a2,2,0,0,0-2,2v6a2,2,0,0,0,2,2h8v3ZM28,15v6H20V15Z"})),n)}),r9=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,r3);return tO.createElement(tR,tA({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),th||(th=tO.createElement("path",{d:"M22 17H24V19H22z"})),tp||(tp=tO.createElement("path",{d:"M28,8H4V5H26V3H4A2,2,0,0,0,2,5V26a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10A2,2,0,0,0,28,8ZM4,26V10H28v3H20a2,2,0,0,0-2,2v6a2,2,0,0,0,2,2h8v3ZM28,15v6H20V15Z"})),n)}),ie=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,r5);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tm||(tm=tO.createElement("path",{d:"M8,1C4.1,1,1,4.1,1,8s3.1,7,7,7s7-3.1,7-7S11.9,1,8,1z M8,14c-3.3,0-6-2.7-6-6s2.7-6,6-6s6,2.7,6,6S11.3,14,8,14z"})),tv||(tv=tO.createElement("path",{d:"M7.5 4H8.5V9H7.5zM8 10.2c-.4 0-.8.3-.8.8s.3.8.8.8c.4 0 .8-.3.8-.8S8.4 10.2 8 10.2z"})),n)}),it=["children"],ir=["children"],ii=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,it);return tO.createElement(tR,tA({width:16,height:16,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tg||(tg=tO.createElement("path",{d:"M26.0022,4H5.998A1.998,1.998,0,0,0,4,5.998V26.002A1.998,1.998,0,0,0,5.998,28H26.0022A1.9979,1.9979,0,0,0,28,26.002V5.998A1.9979,1.9979,0,0,0,26.0022,4ZM14.8752,8h2.25V18h-2.25ZM16,24a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,24Z"})),ty||(ty=tO.createElement("path",{fill:"none",d:"M14.8751,8h2.25V18h-2.25ZM16,24a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,24Z","data-icon-path":"inner-path"})),n)}),io=tO.forwardRef(function(e,t){var n=e.children,r=tT(e,ir);return tO.createElement(tR,tA({width:24,height:24,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},r),tx||(tx=tO.createElement("path",{d:"M29.3164,8.0513l-18-6A1,1,0,0,0,10.4,2.2L4,7V2H2V30H4V11l6.4,4.8a1,1,0,0,0,.9165.1489l18-6a1,1,0,0,0,0-1.8974ZM10,13,4.6665,9,10,5Zm4-.0542-2,.667V4.3872l2,.667Zm4-1.333-2,.6665V5.7207l2,.6665Zm2-.667V7.0542L25.8379,9Z"})),tb||(tb=tO.createElement("path",{d:"M20,22a4,4,0,0,0-8,0h2a2,2,0,1,1,2,2H8v2h8A4.0045,4.0045,0,0,0,20,22Z"})),tw||(tw=tO.createElement("path",{d:"M26,22a4.0045,4.0045,0,0,0-4,4h2a2,2,0,1,1,2,2H12v2H26a4,4,0,0,0,0-8Z"})),n)}),ia=n(52322);function is(e){let{size:t=24}=e;return(0,ia.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:"currentColor",viewBox:"0 0 512 512",children:(0,ia.jsx)("path",{d:"M464 64C490.5 64 512 85.49 512 112V176C512 202.5 490.5 224 464 224H48C21.49 224 0 202.5 0 176V112C0 85.49 21.49 64 48 64H464zM448 128H320V160H448V128zM464 288C490.5 288 512 309.5 512 336V400C512 426.5 490.5 448 464 448H48C21.49 448 0 426.5 0 400V336C0 309.5 21.49 288 48 288H464zM192 352V384H448V352H192z"})})}function il(e){let{size:t=24,className:n}=e;return(0,ia.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,className:n,fill:"currentColor",viewBox:"0 0 384 512",children:(0,ia.jsx)("path",{d:"M256 0v128h128L256 0zM224 128L224 0H48C21.49 0 0 21.49 0 48v416C0 490.5 21.49 512 48 512h288c26.51 0 48-21.49 48-48V160h-127.1C238.3 160 224 145.7 224 128zM64 72C64 67.63 67.63 64 72 64h80C156.4 64 160 67.63 160 72v16C160 92.38 156.4 96 152 96h-80C67.63 96 64 92.38 64 88V72zM64 136C64 131.6 67.63 128 72 128h80C156.4 128 160 131.6 160 136v16C160 156.4 156.4 160 152 160h-80C67.63 160 64 156.4 64 152V136zM304 384c8.875 0 16 7.125 16 16S312.9 416 304 416h-47.25c-16.38 0-31.25-9.125-38.63-23.88c-2.875-5.875-8-6.5-10.12-6.5s-7.25 .625-10 6.125l-7.75 15.38C187.6 412.6 181.1 416 176 416H174.9c-6.5-.5-12-4.75-14-11L144 354.6L133.4 386.5C127.5 404.1 111 416 92.38 416H80C71.13 416 64 408.9 64 400S71.13 384 80 384h12.38c4.875 0 9.125-3.125 10.62-7.625l18.25-54.63C124.5 311.9 133.6 305.3 144 305.3s19.5 6.625 22.75 16.5l13.88 41.63c19.75-16.25 54.13-9.75 66 14.12c2 4 6 6.5 10.12 6.5H304z"})})}function iu(e){let{size:t=24,className:n}=e;return(0,ia.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:"currentColor",viewBox:"0 0 512 512",className:n,children:(0,ia.jsx)("path",{d:"M464 288h-416C21.5 288 0 309.5 0 336v96C0 458.5 21.5 480 48 480h416c26.5 0 48-21.5 48-48v-96C512 309.5 490.5 288 464 288zM320 416c-17.62 0-32-14.38-32-32s14.38-32 32-32s32 14.38 32 32S337.6 416 320 416zM416 416c-17.62 0-32-14.38-32-32s14.38-32 32-32s32 14.38 32 32S433.6 416 416 416zM464 32h-416C21.5 32 0 53.5 0 80v192.4C13.41 262.3 29.92 256 48 256h416c18.08 0 34.59 6.254 48 16.41V80C512 53.5 490.5 32 464 32z"})})}function ic(e){let{size:t=24,className:n}=e;return(0,ia.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:t,width:t,className:n,fill:"currentColor",viewBox:"0 0 512 512",children:(0,ia.jsx)("path",{d:"M448 32C465.7 32 480 46.33 480 64C480 81.67 465.7 96 448 96H80C71.16 96 64 103.2 64 112C64 120.8 71.16 128 80 128H448C483.3 128 512 156.7 512 192V416C512 451.3 483.3 480 448 480H64C28.65 480 0 451.3 0 416V96C0 60.65 28.65 32 64 32H448zM416 336C433.7 336 448 321.7 448 304C448 286.3 433.7 272 416 272C398.3 272 384 286.3 384 304C384 321.7 398.3 336 416 336z"})})}function id(e){let{size:t=24}=e;return(0,ia.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:"currentColor",viewBox:"0 0 448 512",children:(0,ia.jsx)("path",{d:"M80 192V144C80 64.47 144.5 0 224 0C303.5 0 368 64.47 368 144V192H384C419.3 192 448 220.7 448 256V448C448 483.3 419.3 512 384 512H64C28.65 512 0 483.3 0 448V256C0 220.7 28.65 192 64 192H80zM144 192H304V144C304 99.82 268.2 64 224 64C179.8 64 144 99.82 144 144V192z"})})}function ih(e){let{size:t=24}=e;return(0,ia.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:"currentColor",viewBox:"0 0 576 512",children:(0,ia.jsx)("path",{d:"M575.8 255.5C575.8 273.5 560.8 287.6 543.8 287.6H511.8L512.5 447.7C512.5 450.5 512.3 453.1 512 455.8V472C512 494.1 494.1 512 472 512H456C454.9 512 453.8 511.1 452.7 511.9C451.3 511.1 449.9 512 448.5 512H392C369.9 512 352 494.1 352 472V384C352 366.3 337.7 352 320 352H256C238.3 352 224 366.3 224 384V472C224 494.1 206.1 512 184 512H128.1C126.6 512 125.1 511.9 123.6 511.8C122.4 511.9 121.2 512 120 512H104C81.91 512 64 494.1 64 472V360C64 359.1 64.03 358.1 64.09 357.2V287.6H32.05C14.02 287.6 0 273.5 0 255.5C0 246.5 3.004 238.5 10.01 231.5L266.4 8.016C273.4 1.002 281.4 0 288.4 0C295.4 0 303.4 2.004 309.5 7.014L564.8 231.5C572.8 238.5 576.9 246.5 575.8 255.5L575.8 255.5z"})})}function ip(e){let{size:t=24}=e;return(0,ia.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:"currentColor",viewBox:"0 0 448 512",children:(0,ia.jsx)("path",{d:"M7.994 153.5c1.326 0 2.687 .3508 3.975 1.119L208 271.5v223.8c0 9.741-7.656 16.71-16.01 16.71c-2.688 0-5.449-.7212-8.05-2.303l-152.2-92.47C12.13 405.3 0 383.3 0 359.5v-197.7C0 156.1 3.817 153.5 7.994 153.5zM426.2 117.2c0 2.825-1.352 5.647-4.051 7.248L224 242.6L25.88 124.4C23.19 122.8 21.85 119.1 21.85 117.2c0-2.8 1.32-5.603 3.965-7.221l165.1-100.9C201.7 3.023 212.9 0 224 0s22.27 3.023 32.22 9.07l165.1 100.9C424.8 111.6 426.2 114.4 426.2 117.2zM440 153.5C444.2 153.5 448 156.1 448 161.8v197.7c0 23.75-12.12 45.75-31.78 57.69l-152.2 92.5C261.5 511.3 258.7 512 256 512C247.7 512 240 505 240 495.3V271.5l196-116.9C437.3 153.8 438.7 153.5 440 153.5z"})})}function im(e){let{size:t=24}=e;return(0,ia.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:t,height:t,fill:"currentColor",children:(0,ia.jsx)("path",{d:"M495.9 166.6C499.2 175.2 496.4 184.9 489.6 191.2L446.3 230.6C447.4 238.9 448 247.4 448 256C448 264.6 447.4 273.1 446.3 281.4L489.6 320.8C496.4 327.1 499.2 336.8 495.9 345.4C491.5 357.3 486.2 368.8 480.2 379.7L475.5 387.8C468.9 398.8 461.5 409.2 453.4 419.1C447.4 426.2 437.7 428.7 428.9 425.9L373.2 408.1C359.8 418.4 344.1 427 329.2 433.6L316.7 490.7C314.7 499.7 307.7 506.1 298.5 508.5C284.7 510.8 270.5 512 255.1 512C241.5 512 227.3 510.8 213.5 508.5C204.3 506.1 197.3 499.7 195.3 490.7L182.8 433.6C167 427 152.2 418.4 138.8 408.1L83.14 425.9C74.3 428.7 64.55 426.2 58.63 419.1C50.52 409.2 43.12 398.8 36.52 387.8L31.84 379.7C25.77 368.8 20.49 357.3 16.06 345.4C12.82 336.8 15.55 327.1 22.41 320.8L65.67 281.4C64.57 273.1 64 264.6 64 256C64 247.4 64.57 238.9 65.67 230.6L22.41 191.2C15.55 184.9 12.82 175.3 16.06 166.6C20.49 154.7 25.78 143.2 31.84 132.3L36.51 124.2C43.12 113.2 50.52 102.8 58.63 92.95C64.55 85.8 74.3 83.32 83.14 86.14L138.8 103.9C152.2 93.56 167 84.96 182.8 78.43L195.3 21.33C197.3 12.25 204.3 5.04 213.5 3.51C227.3 1.201 241.5 0 256 0C270.5 0 284.7 1.201 298.5 3.51C307.7 5.04 314.7 12.25 316.7 21.33L329.2 78.43C344.1 84.96 359.8 93.56 373.2 103.9L428.9 86.14C437.7 83.32 447.4 85.8 453.4 92.95C461.5 102.8 468.9 113.2 475.5 124.2L480.2 132.3C486.2 143.2 491.5 154.7 495.9 166.6V166.6zM256 336C300.2 336 336 300.2 336 255.1C336 211.8 300.2 175.1 256 175.1C211.8 175.1 176 211.8 176 255.1C176 300.2 211.8 336 256 336z"})})}function iv(e){let{size:t=24}=e;return(0,ia.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",height:t,width:t,fill:"currentColor",children:(0,ia.jsx)("path",{d:"M64 480H448c35.3 0 64-28.7 64-64V160c0-35.3-28.7-64-64-64H298.5c-17 0-33.3-6.7-45.3-18.7L226.7 50.7c-12-12-28.3-18.7-45.3-18.7H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64z"})})}function ig(e){let{size:t=24}=e;return(0,ia.jsxs)("svg",{version:"1.1",id:"icon",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:t,height:t,fill:"currentColor",viewBox:"0 0 32 32",children:[(0,ia.jsx)("polygon",{points:"23,9.2 20.4,6.6 19,8 23,12 30,5 28.6,3.6 "}),(0,ia.jsx)("polygon",{points:"12,5.4 10.6,4 8,6.6 5.4,4 4,5.4 6.6,8 4,10.6 5.4,12 8,9.4 10.6,12 12,10.6 9.4,8 "}),(0,ia.jsx)("polygon",{points:"12,21.4 10.6,20 8,22.6 5.4,20 4,21.4 6.6,24 4,26.6 5.4,28 8,25.4 10.6,28 12,26.6 9.4,24 "}),(0,ia.jsx)("polygon",{points:"17,15 17,2 15,2 15,15 2,15 2,17 15,17 15,30 17,30 17,17 30,17 30,15 "}),(0,ia.jsx)("rect",{fill:"none",width:"32",height:"32"})]})}function iy(e){let{size:t=24}=e;return(0,ia.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:t,width:t,fill:"currentColor",viewBox:"0 0 448 512",children:(0,ia.jsx)("path",{d:"M224 0c-17.7 0-32 14.3-32 32V51.2C119 66 64 130.6 64 208v18.8c0 47-17.3 92.4-48.5 127.6l-7.4 8.3c-8.4 9.4-10.4 22.9-5.3 34.4S19.4 416 32 416H416c12.6 0 24-7.4 29.2-18.9s3.1-25-5.3-34.4l-7.4-8.3C401.3 319.2 384 273.9 384 226.8V208c0-77.4-55-142-128-156.8V32c0-17.7-14.3-32-32-32zm45.3 493.3c12-12 18.7-28.3 18.7-45.3H224 160c0 17 6.7 33.3 18.7 45.3s28.3 18.7 45.3 18.7s33.3-6.7 45.3-18.7z"})})}},47025:function(e,t,n){"use strict";n.d(t,{BW:function(){return i}});var r=n(2850);function i(e){let{settings:t}=(0,r.Hv)();return(0,r.Nf)({api:"https://api.siacentral.com/v2",...e,route:"/market/exchange-rate?currencies=sc",disabled:(null==e?void 0:e.disabled)||!t.siaCentral})}n(98537)},96206:function(e,t,n){"use strict";n.d(t,{vW:function(){return o},rN:function(){return l},yF:function(){return s},Vz:function(){return h},bc:function(){return a},qN:function(){return d},ll:function(){return c}}),n(81395),n(18149);var r=n(6391),i=n.n(r);function o(e,t){let n="number"==typeof e?e:e instanceof i()?e.toNumber():Number(e),{fixed:r=2}=t||{};if(!n)return"0 B";if(n<1e3)return"".concat(n," B");let o=Math.floor(Math.log10(n)/Math.log10(1e3)),a=n/Math.pow(1e3,o);return a.toFixed(r)+" "+["B","KB","MB","GB","TB","PB","EB"][o]}function a(e){return 0===e?"0ms":(e/=1e6)<1e3?" ".concat(Math.floor(100*e)/100,"ms"):(e/=1e3)<60?"".concat(Math.floor(100*e)/100,"s"):"".concat(Math.floor(e/60*100)/100,"m")}function s(e,t){let{fixed:n=0,units:r="",abbreviated:o=!1}=t||{},a=new(i())(e||0);if(o){let e=a.toNumber();if(e<1e3)return a.toString();let t=["","K","M","B","t","q","Q","s","S","o","n","d","U","D"],i=Math.floor(Math.log10(e)/Math.log10(1e3)),o=e/Math.pow(1e3,i);return"".concat(o.toFixed(n)).concat(t[i]?" ".concat(t[i]):"").concat(r?" ".concat(r):"")}return"".concat(a.toFormat(n)).concat(r?" ".concat(r):"")}function l(e,t){let n;return n=navigator.language,new Intl.DateTimeFormat(n,{dateStyle:"short",...t}).format(new Date(e))}r.BigNumber.config({EXPONENTIAL_AT:1e9}),r.BigNumber.config({DECIMAL_PLACES:30});let u=new r.BigNumber("10").exponentiatedBy(24);function c(e,t){return void 0!==t?new r.BigNumber(new r.BigNumber(e).dividedBy(u).toFixed(t)):new r.BigNumber(e).dividedBy(u)}function d(e){return new r.BigNumber(new r.BigNumber(e).times(u).toFixed(0))}let f={fixed:3,dynamicUnits:!0,hastingUnits:!1};function h(e,t){let{fixed:n,dynamicUnits:i,hastingUnits:o}={...f,...t},a=new r.BigNumber(1e12),s=new r.BigNumber(1e3),l=new r.BigNumber(e),u=new r.BigNumber(e).abs(),d=l.isNegative()?"-":"";if(!i)return"".concat(d).concat(c(u).toFormat(n)," SC");if(u.dividedBy(a).isLessThan(1))return o?"".concat(d).concat(u," H"):"".concat(d,"0 SC");let h=["pS","nS","uS","mS","SC","KS","MS","GS","TS"];for(let e=0;ee.multipliedBy(s),new r.BigNumber(1)),i=u.dividedBy(a.multipliedBy(t));if(i.isLessThan(s)||e===h.length-1)return"".concat(d).concat(i.toFormat(n)," ").concat(h[e])}return""}},2271:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createAsyncLocalStorage",{enumerable:!0,get:function(){return o}});let n=Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class r{disable(){throw n}getStore(){}run(){throw n}exit(){throw n}enterWith(){throw n}}let i=globalThis.AsyncLocalStorage;function o(){return i?new i:new r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},26252:function(e,t,n){"use strict";function r(e){}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"clientHookInServerComponentError",{enumerable:!0,get:function(){return r}}),n(43219),n(2784),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},55046:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ReadonlyURLSearchParams:function(){return h},useSearchParams:function(){return p},usePathname:function(){return m},ServerInsertedHTMLContext:function(){return l.ServerInsertedHTMLContext},useServerInsertedHTML:function(){return l.useServerInsertedHTML},useRouter:function(){return v},useParams:function(){return g},useSelectedLayoutSegments:function(){return y},useSelectedLayoutSegment:function(){return x},redirect:function(){return u.redirect},permanentRedirect:function(){return u.permanentRedirect},RedirectType:function(){return u.RedirectType},notFound:function(){return c.notFound}});let r=n(2784),i=n(60587),o=n(58839),a=n(26252),s=n(4424),l=n(44673),u=n(75903),c=n(47067),d=Symbol("internal for urlsearchparams readonly");function f(){return Error("ReadonlyURLSearchParams cannot be modified")}class h{[Symbol.iterator](){return this[d][Symbol.iterator]()}append(){throw f()}delete(){throw f()}set(){throw f()}sort(){throw f()}constructor(e){this[d]=e,this.entries=e.entries.bind(e),this.forEach=e.forEach.bind(e),this.get=e.get.bind(e),this.getAll=e.getAll.bind(e),this.has=e.has.bind(e),this.keys=e.keys.bind(e),this.values=e.values.bind(e),this.toString=e.toString.bind(e),this.size=e.size}}function p(){(0,a.clientHookInServerComponentError)("useSearchParams");let e=(0,r.useContext)(o.SearchParamsContext),t=(0,r.useMemo)(()=>e?new h(e):null,[e]);return t}function m(){return(0,a.clientHookInServerComponentError)("usePathname"),(0,r.useContext)(o.PathnameContext)}function v(){(0,a.clientHookInServerComponentError)("useRouter");let e=(0,r.useContext)(i.AppRouterContext);if(null===e)throw Error("invariant expected app router to be mounted");return e}function g(){(0,a.clientHookInServerComponentError)("useParams");let e=(0,r.useContext)(i.GlobalLayoutRouterContext),t=(0,r.useContext)(o.PathParamsContext);return e?function e(t,n){void 0===n&&(n={});let r=t[1];for(let t of Object.values(r)){let r=t[0],i=Array.isArray(r),o=i?r[1]:r;if(!o||o.startsWith("__PAGE__"))continue;let a=i&&("c"===r[2]||"oc"===r[2]);a?n[r[0]]=r[1].split("/"):i&&(n[r[0]]=r[1]),n=e(t,n)}return n}(e.tree):t}function y(e){void 0===e&&(e="children"),(0,a.clientHookInServerComponentError)("useSelectedLayoutSegments");let{tree:t}=(0,r.useContext)(i.LayoutRouterContext);return function e(t,n,r,i){let o;if(void 0===r&&(r=!0),void 0===i&&(i=[]),r)o=t[1][n];else{var a;let e=t[1];o=null!=(a=e.children)?a:Object.values(e)[0]}if(!o)return i;let l=o[0],u=(0,s.getSegmentValue)(l);return!u||u.startsWith("__PAGE__")?i:(i.push(u),e(o,n,!1,i))}(t,e)}function x(e){void 0===e&&(e="children"),(0,a.clientHookInServerComponentError)("useSelectedLayoutSegment");let t=y(e);return 0===t.length?null:t[0]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},47067:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{notFound:function(){return r},isNotFoundError:function(){return i}});let n="NEXT_NOT_FOUND";function r(){let e=Error(n);throw e.digest=n,e}function i(e){return(null==e?void 0:e.digest)===n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},75903:function(e,t,n){"use strict";var r,i;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{RedirectType:function(){return r},getRedirectError:function(){return s},redirect:function(){return l},permanentRedirect:function(){return u},isRedirectError:function(){return c},getURLFromRedirectError:function(){return d},getRedirectTypeFromError:function(){return f}});let o=n(7552),a="NEXT_REDIRECT";function s(e,t,n){void 0===n&&(n=!1);let r=Error(a);r.digest=a+";"+t+";"+e+";"+n;let i=o.requestAsyncStorage.getStore();return i&&(r.mutableCookies=i.mutableCookies),r}function l(e,t){throw void 0===t&&(t="replace"),s(e,t,!1)}function u(e,t){throw void 0===t&&(t="replace"),s(e,t,!0)}function c(e){if("string"!=typeof(null==e?void 0:e.digest))return!1;let[t,n,r,i]=e.digest.split(";",4);return t===a&&("replace"===n||"push"===n)&&"string"==typeof r&&("true"===i||"false"===i)}function d(e){return c(e)?e.digest.split(";",3)[2]:null}function f(e){if(!c(e))throw Error("Not a redirect error");return e.digest.split(";",3)[1]}(i=r||(r={})).push="push",i.replace="replace",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7552:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"requestAsyncStorage",{enumerable:!0,get:function(){return i}});let r=n(2271),i=(0,r.createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4424:function(e,t){"use strict";function n(e){return Array.isArray(e)?e[1]:e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentValue",{enumerable:!0,get:function(){return n}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},23116:function(e,t){"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{PrefetchKind:function(){return n},ACTION_REFRESH:function(){return i},ACTION_NAVIGATE:function(){return o},ACTION_RESTORE:function(){return a},ACTION_SERVER_PATCH:function(){return s},ACTION_PREFETCH:function(){return l},ACTION_FAST_REFRESH:function(){return u},ACTION_SERVER_ACTION:function(){return c}});let i="refresh",o="navigate",a="restore",s="server-patch",l="prefetch",u="fast-refresh",c="server-action";(r=n||(n={})).AUTO="auto",r.FULL="full",r.TEMPORARY="temporary",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},25146:function(e,t,n){"use strict";function r(e,t,n,r){return!1}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return r}}),n(67858),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},80920:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return y}});let r=n(43219),i=n(16794),o=i._(n(2784)),a=r._(n(28316)),s=r._(n(37412)),l=n(31918),u=n(97686),c=n(45802);n(84759);let d=n(54365),f=r._(n(2088)),h={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0};function p(e,t,n,r,i,o){let a=null==e?void 0:e.src;if(!e||e["data-loaded-src"]===a)return;e["data-loaded-src"]=a;let s="decode"in e?e.decode():Promise.resolve();s.catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&i(!0),null==n?void 0:n.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let r=!1,i=!1;n.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>r,isPropagationStopped:()=>i,persist:()=>{},preventDefault:()=>{r=!0,t.preventDefault()},stopPropagation:()=>{i=!0,t.stopPropagation()}})}(null==r?void 0:r.current)&&r.current(e)}})}function m(e){let[t,n]=o.version.split("."),r=parseInt(t,10),i=parseInt(n,10);return r>18||18===r&&i>=3?{fetchPriority:e}:{fetchpriority:e}}let v=(0,o.forwardRef)((e,t)=>{let{src:n,srcSet:r,sizes:i,height:a,width:s,decoding:l,className:u,style:c,fetchPriority:d,placeholder:f,loading:h,unoptimized:v,fill:g,onLoadRef:y,onLoadingCompleteRef:x,setBlurComplete:b,setShowAltText:w,onLoad:E,onError:j,...k}=e;return o.default.createElement("img",{...k,...m(d),loading:h,width:s,height:a,decoding:l,"data-nimg":g?"fill":"1",className:u,style:c,sizes:i,srcSet:r,src:n,ref:(0,o.useCallback)(e=>{t&&("function"==typeof t?t(e):"object"==typeof t&&(t.current=e)),e&&(j&&(e.src=e.src),e.complete&&p(e,f,y,x,b,v))},[n,f,y,x,b,j,v,t]),onLoad:e=>{let t=e.currentTarget;p(t,f,y,x,b,v)},onError:e=>{w(!0),"empty"!==f&&b(!0),j&&j(e)}})});function g(e){let{isAppRouter:t,imgAttributes:n}=e,r={as:"image",imageSrcSet:n.srcSet,imageSizes:n.sizes,crossOrigin:n.crossOrigin,referrerPolicy:n.referrerPolicy,...m(n.fetchPriority)};return t&&a.default.preload?(a.default.preload(n.src,r),null):o.default.createElement(s.default,null,o.default.createElement("link",{key:"__nimg-"+n.src+n.srcSet+n.sizes,rel:"preload",href:n.srcSet?void 0:n.src,...r}))}let y=(0,o.forwardRef)((e,t)=>{let n=(0,o.useContext)(d.RouterContext),r=(0,o.useContext)(c.ImageConfigContext),i=(0,o.useMemo)(()=>{let e=h||r||u.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),n=e.deviceSizes.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:n}},[r]),{onLoad:a,onLoadingComplete:s}=e,p=(0,o.useRef)(a);(0,o.useEffect)(()=>{p.current=a},[a]);let m=(0,o.useRef)(s);(0,o.useEffect)(()=>{m.current=s},[s]);let[y,x]=(0,o.useState)(!1),[b,w]=(0,o.useState)(!1),{props:E,meta:j}=(0,l.getImgProps)(e,{defaultLoader:f.default,imgConf:i,blurComplete:y,showAltText:b});return o.default.createElement(o.default.Fragment,null,o.default.createElement(v,{...E,unoptimized:j.unoptimized,placeholder:j.placeholder,fill:j.fill,onLoadRef:p,onLoadingCompleteRef:m,setBlurComplete:x,setShowAltText:w,ref:t}),j.priority?o.default.createElement(g,{isAppRouter:!n,imgAttributes:E}):null)});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},13814:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return b}});let r=n(43219),i=r._(n(2784)),o=n(31068),a=n(33134),s=n(39585),l=n(51570),u=n(19868),c=n(54365),d=n(60587),f=n(93629),h=n(25146),p=n(10694),m=n(23116),v=new Set;function g(e,t,n,r,i,o){if(!o&&!(0,a.isLocalURL)(t))return;if(!r.bypassPrefetchedCheck){let i=void 0!==r.locale?r.locale:"locale"in e?e.locale:void 0,o=t+"%"+n+"%"+i;if(v.has(o))return;v.add(o)}let s=o?e.prefetch(t,i):e.prefetch(t,n,r);Promise.resolve(s).catch(e=>{})}function y(e){return"string"==typeof e?e:(0,s.formatUrl)(e)}let x=i.default.forwardRef(function(e,t){let n,r;let{href:s,as:v,children:x,prefetch:b=null,passHref:w,replace:E,shallow:j,scroll:k,locale:S,onClick:_,onMouseEnter:O,onTouchStart:C,legacyBehavior:M=!1,...A}=e;n=x,M&&("string"==typeof n||"number"==typeof n)&&(n=i.default.createElement("a",null,n));let T=i.default.useContext(c.RouterContext),P=i.default.useContext(d.AppRouterContext),N=null!=T?T:P,R=!T,D=!1!==b,L=null===b?m.PrefetchKind.AUTO:m.PrefetchKind.FULL,{href:F,as:V}=i.default.useMemo(()=>{if(!T){let e=y(s);return{href:e,as:v?y(v):e}}let[e,t]=(0,o.resolveHref)(T,s,!0);return{href:e,as:v?(0,o.resolveHref)(T,v):t||e}},[T,s,v]),z=i.default.useRef(F),I=i.default.useRef(V);M&&(r=i.default.Children.only(n));let Z=M?r&&"object"==typeof r&&r.ref:t,[B,H,U]=(0,f.useIntersection)({rootMargin:"200px"}),W=i.default.useCallback(e=>{(I.current!==V||z.current!==F)&&(U(),I.current=V,z.current=F),B(e),Z&&("function"==typeof Z?Z(e):"object"==typeof Z&&(Z.current=e))},[V,Z,F,U,B]);i.default.useEffect(()=>{N&&H&&D&&g(N,F,V,{locale:S},{kind:L},R)},[V,F,H,S,D,null==T?void 0:T.locale,N,R,L]);let q={ref:W,onClick(e){M||"function"!=typeof _||_(e),M&&r.props&&"function"==typeof r.props.onClick&&r.props.onClick(e),N&&!e.defaultPrevented&&function(e,t,n,r,o,s,l,u,c,d){let{nodeName:f}=e.currentTarget,h="A"===f.toUpperCase();if(h&&(function(e){let t=e.currentTarget,n=t.getAttribute("target");return n&&"_self"!==n||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!c&&!(0,a.isLocalURL)(n)))return;e.preventDefault();let p=()=>{let e=null==l||l;"beforePopState"in t?t[o?"replace":"push"](n,r,{shallow:s,locale:u,scroll:e}):t[o?"replace":"push"](r||n,{forceOptimisticNavigation:!d,scroll:e})};c?i.default.startTransition(p):p()}(e,N,F,V,E,j,k,S,R,D)},onMouseEnter(e){M||"function"!=typeof O||O(e),M&&r.props&&"function"==typeof r.props.onMouseEnter&&r.props.onMouseEnter(e),N&&(D||!R)&&g(N,F,V,{locale:S,priority:!0,bypassPrefetchedCheck:!0},{kind:L},R)},onTouchStart(e){M||"function"!=typeof C||C(e),M&&r.props&&"function"==typeof r.props.onTouchStart&&r.props.onTouchStart(e),N&&(D||!R)&&g(N,F,V,{locale:S,priority:!0,bypassPrefetchedCheck:!0},{kind:L},R)}};if((0,l.isAbsoluteUrl)(V))q.href=V;else if(!M||w||"a"===r.type&&!("href"in r.props)){let e=void 0!==S?S:null==T?void 0:T.locale,t=(null==T?void 0:T.isLocaleDomain)&&(0,h.getDomainLocale)(V,e,null==T?void 0:T.locales,null==T?void 0:T.domainLocales);q.href=t||(0,p.addBasePath)((0,u.addLocale)(V,e,null==T?void 0:T.defaultLocale))}return M?i.default.cloneElement(r,q):i.default.createElement("a",{...A,...q},n)}),b=x;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},93629:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return l}});let r=n(2784),i=n(30857),o="function"==typeof IntersectionObserver,a=new Map,s=[];function l(e){let{rootRef:t,rootMargin:n,disabled:l}=e,u=l||!o,[c,d]=(0,r.useState)(!1),f=(0,r.useRef)(null),h=(0,r.useCallback)(e=>{f.current=e},[]);(0,r.useEffect)(()=>{if(o){if(u||c)return;let e=f.current;if(e&&e.tagName){let r=function(e,t,n){let{id:r,observer:i,elements:o}=function(e){let t;let n={root:e.root||null,margin:e.rootMargin||""},r=s.find(e=>e.root===n.root&&e.margin===n.margin);if(r&&(t=a.get(r)))return t;let i=new Map,o=new IntersectionObserver(e=>{e.forEach(e=>{let t=i.get(e.target),n=e.isIntersecting||e.intersectionRatio>0;t&&n&&t(n)})},e);return t={id:n,observer:o,elements:i},s.push(n),a.set(n,t),t}(n);return o.set(e,t),i.observe(e),function(){if(o.delete(e),i.unobserve(e),0===o.size){i.disconnect(),a.delete(r);let e=s.findIndex(e=>e.root===r.root&&e.margin===r.margin);e>-1&&s.splice(e,1)}}}(e,e=>e&&d(e),{root:null==t?void 0:t.current,rootMargin:n});return r}}else if(!c){let e=(0,i.requestIdleCallback)(()=>d(!0));return()=>(0,i.cancelIdleCallback)(e)}},[u,n,t,c,f.current]);let p=(0,r.useCallback)(()=>{d(!1)},[]);return[h,c,p]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},31918:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImgProps",{enumerable:!0,get:function(){return s}}),n(84759);let r=n(69933),i=n(97686);function o(e){return void 0!==e.default}function a(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function s(e,t){var n;let s,l,u,{src:c,sizes:d,unoptimized:f=!1,priority:h=!1,loading:p,className:m,quality:v,width:g,height:y,fill:x=!1,style:b,onLoad:w,onLoadingComplete:E,placeholder:j="empty",blurDataURL:k,fetchPriority:S,layout:_,objectFit:O,objectPosition:C,lazyBoundary:M,lazyRoot:A,...T}=e,{imgConf:P,showAltText:N,blurComplete:R,defaultLoader:D}=t,L=P||i.imageConfigDefault;if("allSizes"in L)s=L;else{let e=[...L.deviceSizes,...L.imageSizes].sort((e,t)=>e-t),t=L.deviceSizes.sort((e,t)=>e-t);s={...L,allSizes:e,deviceSizes:t}}let F=T.loader||D;delete T.loader,delete T.srcSet;let V="__next_img_default"in F;if(V){if("custom"===s.loader)throw Error('Image with src "'+c+'" is missing "loader" prop.\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader')}else{let e=F;F=t=>{let{config:n,...r}=t;return e(r)}}if(_){"fill"===_&&(x=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[_];e&&(b={...b,...e});let t={responsive:"100vw",fill:"100vw"}[_];t&&!d&&(d=t)}let z="",I=a(g),Z=a(y);if("object"==typeof(n=c)&&(o(n)||void 0!==n.src)){let e=o(c)?c.default:c;if(!e.src)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received "+JSON.stringify(e));if(!e.height||!e.width)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received "+JSON.stringify(e));if(l=e.blurWidth,u=e.blurHeight,k=k||e.blurDataURL,z=e.src,!x){if(I||Z){if(I&&!Z){let t=I/e.width;Z=Math.round(e.height*t)}else if(!I&&Z){let t=Z/e.height;I=Math.round(e.width*t)}}else I=e.width,Z=e.height}}let B=!h&&("lazy"===p||void 0===p);(!(c="string"==typeof c?c:z)||c.startsWith("data:")||c.startsWith("blob:"))&&(f=!0,B=!1),s.unoptimized&&(f=!0),V&&c.endsWith(".svg")&&!s.dangerouslyAllowSVG&&(f=!0),h&&(S="high");let H=a(v),U=Object.assign(x?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:O,objectPosition:C}:{},N?{}:{color:"transparent"},b),W=R||"empty"===j?null:"blur"===j?'url("data:image/svg+xml;charset=utf-8,'+(0,r.getImageBlurSvg)({widthInt:I,heightInt:Z,blurWidth:l,blurHeight:u,blurDataURL:k||"",objectFit:U.objectFit})+'")':'url("'+j+'")',q=W?{backgroundSize:U.objectFit||"cover",backgroundPosition:U.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:W}:{},$=function(e){let{config:t,src:n,unoptimized:r,width:i,quality:o,sizes:a,loader:s}=e;if(r)return{src:n,srcSet:void 0,sizes:void 0};let{widths:l,kind:u}=function(e,t,n){let{deviceSizes:r,allSizes:i}=e;if(n){let e=/(^|\s)(1?\d?\d)vw/g,t=[];for(let r;r=e.exec(n);r)t.push(parseInt(r[2]));if(t.length){let e=.01*Math.min(...t);return{widths:i.filter(t=>t>=r[0]*e),kind:"w"}}return{widths:i,kind:"w"}}if("number"!=typeof t)return{widths:r,kind:"w"};let o=[...new Set([t,2*t].map(e=>i.find(t=>t>=e)||i[i.length-1]))];return{widths:o,kind:"x"}}(t,i,a),c=l.length-1;return{sizes:a||"w"!==u?a:"100vw",srcSet:l.map((e,r)=>s({config:t,src:n,quality:o,width:e})+" "+("w"===u?e:r+1)+u).join(", "),src:s({config:t,src:n,quality:o,width:l[c]})}}({config:s,src:c,unoptimized:f,width:I,quality:H,sizes:d,loader:F}),Y={...T,loading:B?"lazy":p,fetchPriority:S,width:I,height:Z,decoding:"async",className:m,style:{...U,...q},sizes:$.sizes,srcSet:$.srcSet,src:$.src},G={unoptimized:f,priority:h,placeholder:j,fill:x};return{props:Y,meta:G}}},69933:function(e,t){"use strict";function n(e){let{widthInt:t,heightInt:n,blurWidth:r,blurHeight:i,blurDataURL:o,objectFit:a}=e,s=r?40*r:t,l=i?40*i:n,u=s&&l?"viewBox='0 0 "+s+" "+l+"'":"";return"%3Csvg xmlns='http://www.w3.org/2000/svg' "+u+"%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='"+(u?"none":"contain"===a?"xMidYMid":"cover"===a?"xMidYMid slice":"none")+"' style='filter: url(%23b);' href='"+o+"'/%3E%3C/svg%3E"}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImageBlurSvg",{enumerable:!0,get:function(){return n}})},81963:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{default:function(){return u},unstable_getImgProps:function(){return l}});let r=n(43219),i=n(31918),o=n(84759),a=n(80920),s=r._(n(2088)),l=e=>{(0,o.warnOnce)("Warning: unstable_getImgProps() is experimental and may change or be removed at any time. Use at your own risk.");let{props:t}=(0,i.getImgProps)(e,{defaultLoader:s.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0}});for(let[e,n]of Object.entries(t))void 0===n&&delete t[e];return{props:t}},u=a.Image},2088:function(e,t){"use strict";function n(e){let{config:t,src:n,width:r,quality:i}=e;return t.path+"?url="+encodeURIComponent(n)+"&w="+r+"&q="+(i||75)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r}}),n.__next_img_default=!0;let r=n},44673:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ServerInsertedHTMLContext:function(){return o},useServerInsertedHTML:function(){return a}});let r=n(16794),i=r._(n(2784)),o=i.default.createContext(null);function a(e){let t=(0,i.useContext)(o);t&&t(e)}},37832:function(){},49854:function(e){e.exports={style:{fontFamily:"'__IBM_Plex_Mono_355ef5', '__IBM_Plex_Mono_Fallback_355ef5'"},className:"__className_355ef5",variable:"__variable_355ef5"}},1240:function(e){e.exports={style:{fontFamily:"'__IBM_Plex_Sans_829fdc', '__IBM_Plex_Sans_Fallback_829fdc'"},className:"__className_829fdc",variable:"__variable_829fdc"}},97729:function(e,t,n){e.exports=n(37412)},96577:function(e,t,n){e.exports=n(81963)},39097:function(e,t,n){e.exports=n(13814)},82876:function(e,t,n){e.exports=n(55046)},5632:function(e,t,n){e.exports=n(60222)},24470:function(e){var t=String,n=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t}};e.exports=n(),e.exports.createColors=n},34406:function(e){var t,n,r,i=e.exports={};function o(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var l=[],u=!1,c=-1;function d(){u&&r&&(u=!1,r.length?l=r.concat(l):c=-1,l.length&&f())}function f(){if(!u){var e=s(d);u=!0;for(var t=l.length;t;){for(r=l,l=[];++c1)for(var n=1;n=this._maxSize&&this.clear(),!(e in this._values)&&this._size++,this._values[e]=t};var n=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,i=/^\d/,o=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,a=/^\s*(['"]?)(.*?)(\1)\s*$/,s=new t(512),l=new t(512),u=new t(512);function c(e){return s.get(e)||s.set(e,d(e).map(function(e){return e.replace(a,"$2")}))}function d(e){return e.match(n)||[""]}function f(e){return"string"==typeof e&&e&&-1!==["'",'"'].indexOf(e.charAt(0))}e.exports={Cache:t,split:d,normalizePath:c,setter:function(e){var t=c(e);return l.get(e)||l.set(e,function(e,n){for(var r=0,i=t.length,o=e;r>>7-e%8&1)==1},put:function(e,t){for(var n=0;n>>t-n-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},81432:function(e){e.exports={L:1,M:0,Q:3,H:2}},84695:function(e,t,n){var r=n(35856);function i(e,t){if(void 0==e.length)throw Error(e.length+"/"+t);for(var n=0;n=7&&this.setupTypeNumber(e),null==this.dataCache&&(this.dataCache=l.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},u.setupPositionProbePattern=function(e,t){for(var n=-1;n<=7;n++)if(!(e+n<=-1)&&!(this.moduleCount<=e+n))for(var r=-1;r<=7;r++)t+r<=-1||this.moduleCount<=t+r||(0<=n&&n<=6&&(0==r||6==r)||0<=r&&r<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=r&&r<=4?this.modules[e+n][t+r]=!0:this.modules[e+n][t+r]=!1)},u.getBestMaskPattern=function(){for(var e=0,t=0,n=0;n<8;n++){this.makeImpl(!0,n);var r=a.getLostPoint(this);(0==n||e>r)&&(e=r,t=n)}return t},u.createMovieClip=function(e,t,n){var r=e.createEmptyMovieClip(t,n);this.make();for(var i=0;i>n&1)==1;this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=r}for(var n=0;n<18;n++){var r=!e&&(t>>n&1)==1;this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=r}},u.setupTypeInfo=function(e,t){for(var n=this.errorCorrectLevel<<3|t,r=a.getBCHTypeInfo(n),i=0;i<15;i++){var o=!e&&(r>>i&1)==1;i<6?this.modules[i][8]=o:i<8?this.modules[i+1][8]=o:this.modules[this.moduleCount-15+i][8]=o}for(var i=0;i<15;i++){var o=!e&&(r>>i&1)==1;i<8?this.modules[8][this.moduleCount-i-1]=o:i<9?this.modules[8][15-i-1+1]=o:this.modules[8][15-i-1]=o}this.modules[this.moduleCount-8][8]=!e},u.mapData=function(e,t){for(var n=-1,r=this.moduleCount-1,i=7,o=0,s=this.moduleCount-1;s>0;s-=2)for(6==s&&s--;;){for(var l=0;l<2;l++)if(null==this.modules[r][s-l]){var u=!1;o>>i&1)==1),a.getMask(t,r,s-l)&&(u=!u),this.modules[r][s-l]=u,-1==--i&&(o++,i=7)}if((r+=n)<0||this.moduleCount<=r){r-=n,n=-n;break}}},l.PAD0=236,l.PAD1=17,l.createData=function(e,t,n){for(var r=i.getRSBlocks(e,t),s=new o,u=0;u8*d)throw Error("code length overflow. ("+s.getLengthInBits()+">"+8*d+")");for(s.getLengthInBits()+4<=8*d&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(!1);for(;!(s.getLengthInBits()>=8*d)&&(s.put(l.PAD0,8),!(s.getLengthInBits()>=8*d));)s.put(l.PAD1,8);return l.createBytes(s,r)},l.createBytes=function(e,t){for(var n=0,r=0,i=0,o=Array(t.length),l=Array(t.length),u=0;u=0?p.get(m):0}}for(var v=0,f=0;f=256;)e-=255;return t.EXP_TABLE[e]},EXP_TABLE:Array(256),LOG_TABLE:Array(256)},n=0;n<8;n++)t.EXP_TABLE[n]=1<=0;)t^=s.G15<=0;)t^=s.G18<>>=1;return t},getPatternPosition:function(e){return s.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,n){switch(e){case a.PATTERN000:return(t+n)%2==0;case a.PATTERN001:return t%2==0;case a.PATTERN010:return n%3==0;case a.PATTERN011:return(t+n)%3==0;case a.PATTERN100:return(Math.floor(t/2)+Math.floor(n/3))%2==0;case a.PATTERN101:return t*n%2+t*n%3==0;case a.PATTERN110:return(t*n%2+t*n%3)%2==0;case a.PATTERN111:return(t*n%3+(t+n)%2)%2==0;default:throw Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new i([1],0),n=0;n5&&(n+=3+o-5)}for(var r=0;r=0)&&Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["children","size","title","xmlns"]);return o.default.createElement("svg",r({},s,{height:n,width:n,xmlns:a}),i?o.default.createElement("title",null,i):null,t)};l.propTypes=s,l.defaultProps={title:void 0,xmlns:"http://www.w3.org/2000/svg"},t.default=l},38001:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["bgColor","fgColor","level","size","value"]),h=new i.default(-1,o.default[a]);h.addData(d),h.make();var p=h.modules,m=s/p.length;return l.default.createElement(c.default,r({},f,{size:s}),p.map(function(e,r){return e.map(function(e,i){var o=Math.round(i*m),a=Math.round(r*m),s=Math.round((i+1)*m)-o,c=Math.round((r+1)*m)-a;return l.default.createElement(u.default,{key:"rectangle-"+r+"-"+i,d:"M 0 0 L "+s+" 0 L "+s+" "+c+" L 0 "+c+" Z",fill:e?n:t,transformX:o,transformY:a})})}))};h.propTypes=f,h.defaultProps={bgColor:"#FFFFFF",fgColor:"#000000",level:"L",size:256},t.Z=(0,s.memo)(h)},88965:function(e,t,n){"use strict";n.d(t,{Z:function(){return U}});var r,i,o,a,s,l,u=function(){return(u=Object.assign||function(e){for(var t,n=1,r=arguments.length;nt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}"function"==typeof SuppressedError&&SuppressedError;var d=n(2784),f="right-scroll-bar-position",h="width-before-scroll-bar",p=(void 0===r&&(r={}),(void 0===i&&(i=function(e){return e}),o=[],a=!1,s={read:function(){if(a)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:null},useMedium:function(e){var t=i(e,a);return o.push(t),function(){o=o.filter(function(e){return e!==t})}},assignSyncMedium:function(e){for(a=!0;o.length;){var t=o;o=[],t.forEach(e)}o={push:function(t){return e(t)},filter:function(){return o}}},assignMedium:function(e){a=!0;var t=[];if(o.length){var n=o;o=[],n.forEach(e),t=o}var r=function(){var n=t;t=[],n.forEach(e)},i=function(){return Promise.resolve().then(r)};i(),o={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),o}}}}).options=u({async:!0,ssr:!1},r),s),m=function(){},v=d.forwardRef(function(e,t){var n,r,i,o=d.useRef(null),a=d.useState({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:m}),s=a[0],l=a[1],f=e.forwardProps,h=e.children,v=e.className,g=e.removeScrollBar,y=e.enabled,x=e.shards,b=e.sideCar,w=e.noIsolation,E=e.inert,j=e.allowPinchZoom,k=e.as,S=void 0===k?"div":k,_=c(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),O=(n=[o,t],r=function(e){return n.forEach(function(t){return"function"==typeof t?t(e):t&&(t.current=e),t})},(i=(0,d.useState)(function(){return{value:null,callback:r,facade:{get current(){return i.value},set current(value){var e=i.value;e!==value&&(i.value=value,i.callback(value,e))}}}})[0]).callback=r,i.facade),C=u(u({},_),s);return d.createElement(d.Fragment,null,y&&d.createElement(b,{sideCar:p,removeScrollBar:g,shards:x,noIsolation:w,inert:E,setCallbacks:l,allowPinchZoom:!!j,lockRef:o}),f?d.cloneElement(d.Children.only(h),u(u({},C),{ref:O})):d.createElement(S,u({},C,{className:v,ref:O}),h))});v.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},v.classNames={fullWidth:h,zeroRight:f};var g=function(e){var t=e.sideCar,n=c(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error("Sidecar medium not found");return d.createElement(r,u({},n))};g.isSideCarExport=!0;var y=function(){var e=0,t=null;return{add:function(r){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=l||n.nc;return t&&e.setAttribute("nonce",t),e}())){var i,o;(i=t).styleSheet?i.styleSheet.cssText=r:i.appendChild(document.createTextNode(r)),o=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(o)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},x=function(){var e=y();return function(t,n){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},b=function(){var e=x();return function(t){return e(t.styles,t.dynamic),null}},w={left:0,top:0,right:0,gap:0},E=function(e){return parseInt(e||"",10)||0},j=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],i=t["padding"===e?"paddingRight":"marginRight"];return[E(n),E(r),E(i)]},k=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return w;var t=j(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},S=b(),_=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(i,"px;\n padding-top: ").concat(o,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(f," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(h," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(f," .").concat(f," {\n right: 0 ").concat(r,";\n }\n \n .").concat(h," .").concat(h," {\n margin-right: 0 ").concat(r,";\n }\n \n body {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},O=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=void 0===r?"margin":r,o=d.useMemo(function(){return k(i)},[i]);return d.createElement(S,{styles:_(o,!t,i,n?"":"!important")})},C=!1;if("undefined"!=typeof window)try{var M=Object.defineProperty({},"passive",{get:function(){return C=!0,!0}});window.addEventListener("test",M,M),window.removeEventListener("test",M,M)}catch(e){C=!1}var A=!!C&&{passive:!1},T=function(e){var t=window.getComputedStyle(e);return"hidden"!==t.overflowY&&!(t.overflowY===t.overflowX&&"visible"===t.overflowY)},P=function(e){var t=window.getComputedStyle(e);return"hidden"!==t.overflowX&&!(t.overflowY===t.overflowX&&"visible"===t.overflowX)},N=function(e,t){var n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),R(e,n)){var r=D(e,n);if(r[1]>r[2])return!0}n=n.parentNode}while(n&&n!==document.body);return!1},R=function(e,t){return"v"===e?T(t):P(t)},D=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},L=function(e,t,n,r,i){var o,a=(o=window.getComputedStyle(t).direction,"h"===e&&"rtl"===o?-1:1),s=a*r,l=n.target,u=t.contains(l),c=!1,d=s>0,f=0,h=0;do{var p=D(e,l),m=p[0],v=p[1]-p[2]-a*m;(m||v)&&R(e,l)&&(f+=v,h+=m),l=l.parentNode}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return d&&(i&&0===f||!i&&s>f)?c=!0:!d&&(i&&0===h||!i&&-s>h)&&(c=!0),c},F=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},V=function(e){return[e.deltaX,e.deltaY]},z=function(e){return e&&"current"in e?e.current:e},I=0,Z=[],B=(p.useMedium(function(e){var t=d.useRef([]),n=d.useRef([0,0]),r=d.useRef(),i=d.useState(I++)[0],o=d.useState(function(){return b()})[0],a=d.useRef(e);d.useEffect(function(){a.current=e},[e]),d.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=(function(e,t,n){if(n||2==arguments.length)for(var r,i=0,o=t.length;iMath.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=N(d,c);if(!f)return!0;if(f?i=d:(i="v"===d?"h":"v",f=N(d,c)),!f)return!1;if(!r.current&&"changedTouches"in e&&(l||u)&&(r.current=i),!i)return!0;var h=r.current||i;return L(h,t,e,"h"===h?l:u,!0)},[]),l=d.useCallback(function(e){if(Z.length&&Z[Z.length-1]===o){var n="deltaY"in e?V(e):F(e),r=t.current.filter(function(t){var r;return t.name===e.type&&t.target===e.target&&(r=t.delta)[0]===n[0]&&r[1]===n[1]})[0];if(r&&r.should){e.preventDefault();return}if(!r){var i=(a.current.shards||[]).map(z).filter(Boolean).filter(function(t){return t.contains(e.target)});(i.length>0?s(e,i[0]):!a.current.noIsolation)&&e.preventDefault()}}},[]),u=d.useCallback(function(e,n,r,i){var o={name:e,delta:n,target:r,should:i};t.current.push(o),setTimeout(function(){t.current=t.current.filter(function(e){return e!==o})},1)},[]),c=d.useCallback(function(e){n.current=F(e),r.current=void 0},[]),f=d.useCallback(function(t){u(t.type,V(t),t.target,s(t,e.lockRef.current))},[]),h=d.useCallback(function(t){u(t.type,F(t),t.target,s(t,e.lockRef.current))},[]);d.useEffect(function(){return Z.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",l,A),document.addEventListener("touchmove",l,A),document.addEventListener("touchstart",c,A),function(){Z=Z.filter(function(e){return e!==o}),document.removeEventListener("wheel",l,A),document.removeEventListener("touchmove",l,A),document.removeEventListener("touchstart",c,A)}},[]);var p=e.removeScrollBar,m=e.inert;return d.createElement(d.Fragment,null,m?d.createElement(o,{styles:"\n .block-interactivity-".concat(i," {pointer-events: none;}\n .allow-interactivity-").concat(i," {pointer-events: all;}\n")}):null,p?d.createElement(O,{gapMode:"margin"}):null)}),g),H=d.forwardRef(function(e,t){return d.createElement(v,u({},e,{ref:t,sideCar:B}))});H.classNames=v.classNames;var U=H},32718:function(e,t,n){var r,i=n(58085),o=n(41964),a=n(53207),s=/(\+|\-|\*|\\|[^a-z]|)(\s*)(\()/g;e.exports=function(e,t){return r=0,t=Math.pow(10,void 0===t?5:t),o(e=e.replace(/\n+/g," "),/((?:\-[a-z]+\-)?calc)\(/,function e(n,o,l){if(r++>100)throw r=0,Error("Call stack overflow for "+l);if(""===n)throw Error(o+"(): '"+l+"' must contain a non-whitespace string");var u,c=function(e){for(var t=[],n=[],r=/[\.0-9]([%a-z]+)/gi,i=r.exec(e);i;)i&&i[1]&&(-1===n.indexOf(i[1].toLowerCase())&&(t.push(i[1]),n.push(i[1].toLowerCase())),i=r.exec(e));return t}(n=function(t,n){t=t.replace(/((?:\-[a-z]+\-)?calc)/g,"");for(var r,o="",a=t;r=s.exec(a);){r[0].index>0&&(o+=a.substring(0,r[0].index));var l=i("(",")",a.substring([0].index));if(""===l.body)throw Error("'"+t+"' must contain a non-whitespace string");var u=e(l.body,"",n);o+=l.pre+u,a=l.post}return o+a}(n,l));if(c.length>1||n.indexOf("var(")>-1)return o+"("+n+")";var d=c[0]||"";"%"===d&&(n=n.replace(/\b[0-9\.]+%/g,function(e){return .01*parseFloat(e.slice(0,-1))}));var f=n.replace(RegExp(d,"gi"),"");try{u=a.eval(f)}catch(e){return o+"("+n+")"}return"%"===d&&(u*=100),(o.length||"%"===d)&&(u=Math.round(u*t)/t),u+=d})}},58085:function(e){function t(e,t,i){e instanceof RegExp&&(e=n(e,i)),t instanceof RegExp&&(t=n(t,i));var o=r(e,t,i);return o&&{start:o[0],end:o[1],pre:i.slice(0,o[0]),body:i.slice(o[0]+e.length,o[1]),post:i.slice(o[1]+t.length)}}function n(e,t){var n=t.match(e);return n?n[0]:null}function r(e,t,n){var r,i,o,a,s,l=n.indexOf(e),u=n.indexOf(t,l+1),c=l;if(l>=0&&u>0){for(r=[],o=n.length;c>=0&&!s;)c==l?(r.push(c),l=n.indexOf(e,c+1)):1==r.length?s=[r.pop(),u]:((i=r.pop())=0?l:u;r.length&&(s=[o,a])}return s}e.exports=t,t.range=r},41964:function(e,t,n){var r=n(82294);e.exports=function e(t,n,i){return(function(e,t){var n=[],i="string"==typeof t?RegExp("\\b("+t+")\\("):t;do{var o=i.exec(e);if(!o)break;if(void 0===o[1])throw Error("Missing the first couple of parenthesis to get the function identifier in "+t);var a=o[1],s=o.index,l=r("(",")",e.substring(s));if(!l||l.start!==o[0].length-1)throw SyntaxError(a+"(): missing closing ')' in the value '"+e+"'");n.push({matches:l,functionIdentifier:a}),e=l.post}while(i.test(e));return n})(t,n).reduce(function(r,o){var a,s;return r.replace(o.functionIdentifier+"("+o.matches.body+")",(a=o.matches.body,s=o.functionIdentifier,i(e(a,n,i),s,t)))},t)}},6692:function(e,t,n){let r=n(83128);e.exports=(r.__esModule?r:{default:r}).default},83128:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:()=>a});let i=(r=n(37540))&&r.__esModule?r:{default:r};function o({version:e,from:t,to:n}){i.default.warn(`${t}-color-renamed`,[`As of Tailwind CSS ${e}, \`${t}\` has been renamed to \`${n}\`.`,"Update your configuration file to silence this warning."])}let a={inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"},get lightBlue(){return o({version:"v2.2",from:"lightBlue",to:"sky"}),this.sky},get warmGray(){return o({version:"v3.0",from:"warmGray",to:"stone"}),this.stone},get trueGray(){return o({version:"v3.0",from:"trueGray",to:"neutral"}),this.neutral},get coolGray(){return o({version:"v3.0",from:"coolGray",to:"gray"}),this.gray},get blueGray(){return o({version:"v3.0",from:"blueGray",to:"slate"}),this.slate}}},37540:function(e,t,n){"use strict";var r,i=n(34406);Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{dim:()=>l,default:()=>u});let o=(r=n(24470))&&r.__esModule?r:{default:r},a=new Set;function s(e,t,n){(void 0===i||!i.env.JEST_WORKER_ID)&&(n&&a.has(n)||(n&&a.add(n),console.warn(""),t.forEach(t=>console.warn(e,"-",t))))}function l(e){return o.default.dim(e)}let u={info(e,t){s(o.default.bold(o.default.cyan("info")),...Array.isArray(e)?[e]:[t,e])},warn(e,t){s(o.default.bold(o.default.yellow("warn")),...Array.isArray(e)?[e]:[t,e])},risk(e,t){s(o.default.bold(o.default.magenta("risk")),...Array.isArray(e)?[e]:[t,e])}}},95159:function(e){function t(e,t){var n=e.length,r=Array(n),i={},o=n,a=function(e){for(var t=new Map,n=0,r=e.length;n{},{isPersistent:!0,removeItem:()=>{}}];let l=null==t?void 0:t.serializer;return function(e,t,n=!0,l=function(e){return"undefined"===e?void 0:JSON.parse(e)},u=JSON.stringify){i.has(e)||void 0===t||null!==s(()=>localStorage.getItem(e))||s(()=>localStorage.setItem(e,u(t)));let c=(0,r.useRef)({item:null,parsed:t}),d=(0,r.useSyncExternalStore)((0,r.useCallback)(t=>{let n=n=>{e===n&&t()};return o.add(n),()=>{o.delete(n)}},[e]),()=>{var n;let r=null!==(n=s(()=>localStorage.getItem(e)))&&void 0!==n?n:null;if(i.has(e))c.current={item:r,parsed:i.get(e)};else if(r!==c.current.item){let e;try{e=null===r?t:l(r)}catch(n){e=t}c.current={item:r,parsed:e}}return c.current.parsed},()=>t),f=(0,r.useCallback)(t=>{let n=t instanceof Function?t(c.current.parsed):t;try{localStorage.setItem(e,u(n)),i.delete(e)}catch(t){i.set(e,n)}a(e)},[e,u]);return(0,r.useEffect)(()=>{if(!n)return;let t=t=>{t.storageArea===s(()=>localStorage)&&t.key===e&&a(e)};return window.addEventListener("storage",t),()=>window.removeEventListener("storage",t)},[e,n]),(0,r.useMemo)(()=>[d,f,{isPersistent:d===t||!i.has(e),removeItem(){s(()=>localStorage.removeItem(e)),i.delete(e),a(e)}}],[e,f,d,t])}(e,n,null==t?void 0:t.storageSync,null==l?void 0:l.parse,null==l?void 0:l.stringify)}},20452:function(e,t,n){"use strict";/**
+***************************************************************************** */function EN(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})}function ER(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]"object"==typeof window?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||E7,je=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,jt=/\/\*[^]*?\*\/|\s\s+|\n/g,jn=(e,t)=>{let n="",r="",i="";for(let o in e){let a=e[o];"@"==o[0]?"i"==o[1]?n=o+" "+a+";":r+="f"==o[1]?jn(a,o):o+"{"+jn(a,"k"==o[1]?"":t)+"}":"object"==typeof a?r+=jn(a,t?t.replace(/([^,])+/g,e=>o.replace(/(^:.*)|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):o):null!=a&&(o=o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=jn.p?jn.p(o,a):o+":"+a+";")}return n+(t&&i?t+"{"+i+"}":i)+r},jr={},ji=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+ji(e[n]);return t}return e},jo=(e,t,n,r,i)=>{var o;let a=ji(e),s=jr[a]||(jr[a]=(e=>{let t=0,n=11;for(;t>>0;return"go"+n})(a));if(!jr[s]){let t=a!==e?e:(e=>{let t,n=[{}];for(;t=je.exec(e.replace(jt,""));)t[4]?n.shift():t[3]?n.unshift(n[0][t[3]]=n[0][t[3]]||{}):n[0][t[1]]=t[2];return n[0]})(e);jr[s]=jn(i?{["@keyframes "+s]:t}:t,n?"":"."+s)}return o=jr[s],-1==t.data.indexOf(o)&&(t.data=r?o+t.data:t.data+o),s},ja=(e,t,n)=>e.reduce((e,r,i)=>{let o=t[i];if(o&&o.call){let e=o(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;o=t?"."+t:e&&"object"==typeof e?e.props?"":jn(e,""):!1===e?"":e}return e+r+(null==o?"":o)},"");function js(e){let t=this||{},n=e.call?e(t.p):e;return jo(n.unshift?n.raw?ja(n,[].slice.call(arguments,1),t.p):n.reduce((e,n)=>Object.assign(e,n&&n.call?n(t.p):n),{}):n,E9(t.target),t.g,t.o,t.k)}js.bind({g:1});let jl,ju,jc,jd=js.bind({k:1});function jf(e,t){let n=this||{};return function(){let r=arguments;function i(o,a){let s=Object.assign({},o),l=s.className||i.className;n.p=Object.assign({theme:ju&&ju()},s),n.o=/ *go\d+/.test(l),s.className=js.apply(n,r)+(l?" "+l:""),t&&(s.ref=a);let u=e;return e[0]&&(u=s.as||e,delete s.as),jc&&u[0]&&jc(s),jl(u,s)}return t?t(i):i}}function jh(){return(jh=Object.assign||function(e){for(var t=1;t-1&&jE.splice(e,1)}},[n]);var i=n.toasts.map(function(t){var n,r,i;return jh({},e,e[t.type],t,{duration:t.duration||(null==(n=e[t.type])?void 0:n.duration)||(null==(r=e)?void 0:r.duration)||jS[t.type],style:jh({},e.style,null==(i=e[t.type])?void 0:i.style,t.style)})});return jh({},n,{toasts:i})},jO=function(e){return function(t,n){var r,i=(void 0===(r=e)&&(r="blank"),jh({createdAt:Date.now(),visible:!0,type:r,ariaProps:{role:"status","aria-live":"polite"},message:t,pauseDuration:0},n,{id:(null==n?void 0:n.id)||jv()}));return jk({type:y.UPSERT_TOAST,toast:i}),i.id}},jC=function(e,t){return jO("blank")(e,t)};jC.error=jO("error"),jC.success=jO("success"),jC.loading=jO("loading"),jC.custom=jO("custom"),jC.dismiss=function(e){jk({type:y.DISMISS_TOAST,toastId:e})},jC.remove=function(e){return jk({type:y.REMOVE_TOAST,toastId:e})},jC.promise=function(e,t,n){var r=jC.loading(t.loading,jh({},n,null==n?void 0:n.loading));return e.then(function(e){return jC.success(jm(t.success,e),jh({id:r},n,null==n?void 0:n.success)),e}).catch(function(e){jC.error(jm(t.error,e),jh({id:r},n,null==n?void 0:n.error))}),e};var jM=function(e){var t=j_(e),n=t.toasts,r=t.pausedAt;(0,b.useEffect)(function(){if(!r){var e=Date.now(),t=n.map(function(t){if(t.duration!==1/0){var n=(t.duration||0)+t.pauseDuration-(e-t.createdAt);if(n<0){t.visible&&jC.dismiss(t.id);return}return setTimeout(function(){return jC.dismiss(t.id)},n)}});return function(){t.forEach(function(e){return e&&clearTimeout(e)})}}},[n,r]);var i=(0,b.useMemo)(function(){return{startPause:function(){jk({type:y.START_PAUSE,time:Date.now()})},endPause:function(){r&&jk({type:y.END_PAUSE,time:Date.now()})},updateHeight:function(e,t){return jk({type:y.UPDATE_TOAST,toast:{id:e,height:t}})},calculateOffset:function(e,t){var r,i=t||{},o=i.reverseOrder,a=void 0!==o&&o,s=i.gutter,l=void 0===s?8:s,u=i.defaultPosition,c=n.filter(function(t){return(t.position||u)===(e.position||u)&&t.height}),d=c.findIndex(function(t){return t.id===e.id}),f=c.filter(function(e,t){return t * {\n pointer-events: auto;\n }\n"]);return j9=function(){return e},e}c=b.createElement,jn.p=void 0,jl=c,ju=void 0,jc=void 0;var ke=function(e,t){var n=e.includes("top"),r=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return jh({left:0,right:0,display:"flex",position:"absolute",transition:jg()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:"translateY("+t*(n?1:-1)+"px)"},n?{top:0}:{bottom:0},r)},kt=js(j9()),kn=function(e){var t=e.reverseOrder,n=e.position,r=void 0===n?"top-center":n,i=e.toastOptions,o=e.gutter,a=e.children,s=e.containerStyle,l=e.containerClassName,u=jM(i),c=u.toasts,d=u.handlers;return(0,b.createElement)("div",{style:jh({position:"fixed",zIndex:9999,top:16,left:16,right:16,bottom:16,pointerEvents:"none"},s),className:l,onMouseEnter:d.startPause,onMouseLeave:d.endPause},c.map(function(e){var n,i=e.position||r,s=ke(i,d.calculateOffset(e,{reverseOrder:t,gutter:o,defaultPosition:r})),l=e.height?void 0:(n=function(t){d.updateHeight(e.id,t.height)},function(e){e&&setTimeout(function(){n(e.getBoundingClientRect())})});return(0,b.createElement)("div",{ref:l,className:e.visible?kt:"",key:e.id,style:s},"custom"===e.type?jm(e.message,e):a?a(e):(0,b.createElement)(j7,{toast:e,position:i}))}))};let kr=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};jC((0,x.jsx)(tq,{wrapEllipsis:!0,children:"string"==typeof e&&e.length>200?"".concat(e.slice(0,200)):e}),ka(t))},ki=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};jC.success((0,x.jsx)(tq,{wrapEllipsis:!0,children:"string"==typeof e&&e.length>200?"".concat(e.slice(0,200),"..."):e}),ka(t))},ko=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};jC.error((0,x.jsx)(tq,{wrapEllipsis:!0,children:"string"==typeof e&&e.length>200?"".concat(e.slice(0,200),"..."):e}),ka(t))};function ka(){let{className:e,...t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{position:"top-center",duration:6e3,className:(0,ea.cx)(tY(),"font-sans font-normal","text-gray-1100 dark:text-white","max-w-[800px] overflow-hidden text-ellipsis","[&>div]:overflow-hidden","[&>div]:flex-1",e),success:{icon:(0,x.jsx)("div",{className:"!flex-none w-5",children:(0,x.jsx)(s6.tEK,{className:"w-5 text-green-600"})})},error:{icon:(0,x.jsx)("div",{className:"!flex-none w-5",children:(0,x.jsx)(s6.Jsc,{className:"w-5 text-red-600"})})},...t}}function ks(){return(0,x.jsx)(kn,{toastOptions:ka()})}let kl=(e,t)=>{let n=t?"Copied ".concat(t," to clipboard"):"Copied to clipboard";kr(n),function(e){EN(this,void 0,void 0,function(){return ER(this,function(t){var n;if(EJ)return ED("Using `navigator.clipboard.writeText()`."),[2,EJ(e)];if(!function(e){return EN(this,void 0,void 0,function(){var t;return ER(this,function(n){var r,i,o,a,s,l,u,c;if(t="text/plain"in e,"undefined"==typeof ClipboardEvent&&void 0!==E1.clipboardData&&void 0!==E1.clipboardData.setData){if(!t)throw Error("No `text/plain` value was specified.");if(r=e["text/plain"],E1.clipboardData.setData("Text",r))return[2,!0];throw Error("Copying failed, possibly because the user rejected it.")}return E3(e)?(ED("regular execCopy worked"),[2,!0]):navigator.userAgent.indexOf("Edge")>-1?(ED('UA "Edge" => assuming success'),[2,!0]):E5(document.body,e)?(ED("copyUsingTempSelection worked"),[2,!0]):((i=document.createElement("div")).setAttribute("style","-webkit-user-select: text !important"),i.textContent="temporary element",document.body.appendChild(i),o=E5(i,e),document.body.removeChild(i),o)?(ED("copyUsingTempElem worked"),[2,!0]):(a=e["text/plain"],ED("copyTextUsingDOM"),(s=document.createElement("div")).setAttribute("style","-webkit-user-select: text !important"),l=s,s.attachShadow&&(ED("Using shadow DOM."),l=s.attachShadow({mode:"open"})),(u=document.createElement("span")).innerText=a,l.appendChild(u),document.body.appendChild(s),E6(u),c=document.execCommand("copy"),E8(),document.body.removeChild(s),c)?(ED("copyTextUsingDOM worked"),[2,!0]):[2,!1]})})}(((n={})["text/plain"]=e,n)))throw Error("writeText() failed");return[2]})})}(e)};function ku(e,t){return e?t&&e.length>t?"".concat(e.slice(0,t),"..."):"".concat(e.slice(0,t)):""}function kc(e){return(e||"").replace(/^addr:/,"").replace(/^txid:/,"").replace(/^fcid:/,"").replace(/^h:/,"").replace(/^scoid:/,"").replace(/^sfoid:/,"").replace(/^key:/,"")}function kd(e,t,n){return t?"".concat(e," ").concat(ku(t,n)):"".concat(e)}function kf(e,t){return"miner"===t?"minerPayout":"siafundClaim"===t?"siafundClaim":"contract"===t?"contractPayout":"foundation"===t?"foundationSubsidy":e.storageProofs&&e.storageProofs.length>0?"storageProof":e.fileContracts&&e.fileContracts.length>0&&e.fileContractRevisions&&e.fileContractRevisions.length>0?"contractRenewal":e.fileContractRevisions&&e.fileContractRevisions.length>0?"contractRevision":e.fileContracts&&e.fileContracts.length>0?"contractFormation":e.arbitraryData&&e.arbitraryData.length>0&&0===atob(e.arbitraryData[0]).indexOf("HostAnnouncement")?"hostAnnouncement":e.siafundOutputs&&e.siafundOutputs.length>0?"siafund":e.siacoinOutputs&&e.siacoinOutputs.length>0?"siacoin":void 0}let kh={transaction:"transaction",contract:"contract",block:"block",output:"output",address:"address",hostIp:"host",hostPublicKey:"host",ip:"IP"},kp={transaction:"transaction ID",contract:"contract ID",block:"block",output:"output ID",address:"address",hostIp:"host address",hostPublicKey:"host public key",ip:"IP"},km={siacoin:"siacoin transfer",siafund:"siafund transfer",contractFormation:"contract formation",contractRenewal:"contract renewal",contractRevision:"contract revision",contractPayout:"contract payout",storageProof:"storage proof",minerPayout:"miner payout",siafundClaim:"siafund claim",foundationSubsidy:"foundation subsidy",hostAnnouncement:"host announcement"};function kv(e){return e?kh[e]:void 0}function kg(e){return e?km[e]:void 0}function ky(e){let{value:t,displayValue:n,type:r,label:i,href:o,maxLength:a,size:s,scaleSize:l,weight:u,color:c="contrast",className:d,siascanUrl:f}=e,h=i||(r?kp[r]:void 0),p=a||(r&&["ip","hostIp"].includes(r)?20:12),m=kc(t),v=n||m,g="".concat(null==v?void 0:v.slice(0,p)).concat(((null==v?void 0:v.length)||0)>p?"...":"");return(0,x.jsxs)("div",{className:(0,ea.cx)("flex items-center",d),children:[o?(0,x.jsx)(cK,{href:o,underline:"hover",size:s,scaleSize:l,color:c,weight:u,ellipsis:!0,children:g}):(0,x.jsx)(tq,{size:s,scaleSize:l,color:c,weight:u,ellipsis:!0,children:g}),(0,x.jsx)("div",{className:"ml-1 flex items-center",children:(0,x.jsx)(kx,{cleanValue:m,label:h,size:s,siascanUrl:f,type:r})})]})}function kx(e){var t;let{size:n,cleanValue:r,label:i,siascanUrl:o,type:a}=e;return(0,x.jsxs)(cT,{trigger:(0,x.jsx)(s5,{size:"none",variant:"ghost",children:(0,x.jsx)(s6.EMN,{className:"10"===n?"scale-75":"scale-90"})}),contentProps:{align:"end"},children:[(0,x.jsxs)(cP,{onSelect:e=>{kl(r,i)},onClick:e=>{e.stopPropagation()},children:[(0,x.jsx)(cR,{children:(0,x.jsx)(s6.olJ,{})}),"Copy to clipboard"]}),o&&a&&(t=a)&&["hostIp","hostPublicKey","contract","address","transaction","block"].includes(t)&&(0,x.jsx)(cK,{target:"_blank",href:function(e,t,n){switch(t){case"hostIp":case"hostPublicKey":return"".concat(e,"/host/").concat(n);case"contract":return"".concat(e,"/contract/").concat(n);case"transaction":return"".concat(e,"/tx/").concat(n);case"address":return"".concat(e,"/address/").concat(n);case"block":return"".concat(e,"/block/").concat(n);default:return""}}(o,a,r),className:"block w-full",underline:"none",children:(0,x.jsxs)(cP,{onClick:e=>{e.stopPropagation()},children:[(0,x.jsx)(cR,{children:(0,x.jsx)(s6.V8Q,{})}),"View on Siascan"]})})]})}function kb(e){let{value:t,size:n,scaleSize:r,tooltip:i="",variant:o="change"}=e,a=(0,m0.yF)(String(t),{units:"SF"});return(0,x.jsx)(s4,{content:(i?"".concat(i," "):"")+a,children:(0,x.jsxs)(tq,{size:n,scaleSize:r,weight:"medium",font:"mono",color:"change"===o?t>0?"green":t<0?"red":"subtle":"contrast",children:["change"===o&&t>0?"+":"",a]})})}function kw(e){let{value:t,size:n,scaleSize:r,tooltip:i="",variant:o="change",color:a,fixed:s=3,dynamicUnits:l=!0,hastingUnits:u=!0,extendedSuffix:c,showTooltip:d=!0}=e,f=t.isGreaterThan(0)?"+":t.isLessThan(0)?"-":"",h=a||("change"===o?t.isGreaterThan(0)?"green":t.isLessThan(0)?"red":"subtle":"contrast"),p=(0,x.jsxs)(tq,{size:n,scaleSize:r,weight:"medium",font:"mono",ellipsis:!0,color:h,children:["change"===o?"".concat(f).concat((0,m0.Vz)(t.absoluteValue(),{fixed:s,dynamicUnits:l})):(0,m0.Vz)(t,{fixed:s,dynamicUnits:l,hastingUnits:u}),(0,x.jsx)(tq,{size:"20",weight:"medium",font:"mono",ellipsis:!0,color:"subtle",children:c?"".concat(c):""})]});return d?(0,x.jsx)(s4,{content:(i?"".concat(i," "):"")+(0,m0.Vz)(t,{fixed:16,dynamicUnits:!1}),children:p}):p}function kE(e){let{sc:t,size:n,scaleSize:r,color:i,tooltip:o="",variant:a="change",fixed:s,fixedTip:l=20,showTooltip:u=!0}=e,c=(0,fv.BW)(),{settings:{currency:d}}=(0,fm.Hv)(),f=t.isZero()?"":t.isGreaterThan(0)&&"change"===a?"+":t.isLessThan(0)?"-":"",h=i||("change"===a?t.isGreaterThan(0)?"green":t.isLessThan(0)?"red":"subtle":"contrast");if(!c.data)return null;let p=new(fd())(c.data.rates.sc[d.id]||1).times(t).div(1e24),m=void 0!==s?s:d.fixed,v=(0,x.jsx)(tq,{size:n,scaleSize:r,weight:"medium",font:"mono",ellipsis:!0,color:h,children:"".concat(f).concat(d.prefix).concat(kj(p.absoluteValue(),m))});return u?(0,x.jsx)(s4,{content:(o?"".concat(o," "):"")+"".concat(f).concat(d.prefix).concat(kj(p.absoluteValue(),l)),children:v}):v}function kj(e,t){let[n,r]=e.toFixed(t).split("."),i=new Intl.NumberFormat().format(parseInt(n));return r?"".concat(i).concat(Intl.NumberFormat().format(1.1).charAt(1)).concat(r):i}function kk(e){let{value:t,size:n,scaleSize:r,tooltip:i="",variant:o="change",fixed:a=3,fixedFiat:s,fixedTipFiat:l,dynamicUnits:u=!0,hastingUnits:c=!0,extendedSuffix:d,showTooltip:f=!0,displayBoth:h=!1,displayBothDirection:p="column"}=e,{settings:{currencyDisplay:m}}=(0,fm.Hv)(),v=(0,fv.BW)(),g=(0,b.useMemo)(()=>(0,x.jsx)(kw,{value:t,size:n,color:h&&"row"===p&&"bothPreferFiat"===m?"subtle":void 0,scaleSize:r,tooltip:i,variant:o,fixed:a,dynamicUnits:u,hastingUnits:c,extendedSuffix:d,showTooltip:f}),[t,n,r,i,o,a,u,c,d,f,m,h,p]),y=(0,b.useMemo)(()=>(0,x.jsx)(kE,{sc:t,size:n,color:h&&"row"===p&&"bothPreferSc"===m?"subtle":void 0,scaleSize:r,tooltip:i,variant:o,fixed:s,fixedTip:l,dynamicUnits:u,hastingUnits:c,extendedSuffix:d,showTooltip:f}),[t,n,r,i,o,s,l,u,c,d,f,m,h,p]);return"sc"!==m&&v.data?"fiat"===m?y:"bothPreferSc"===m?h?(0,x.jsxs)("div",{className:"column"===p?"flex flex-col items-end":"flex gap-1",children:[g,y]}):g:"bothPreferFiat"===m?h?(0,x.jsxs)("div",{className:"column"===p?"flex flex-col items-end":"flex gap-1",children:[y,g]}):y:g:g}function kS(e){let{value:t,size:n="14",weight:r="semibold",tooltip:i="",variant:o="change",color:a,format:s}=e,l=t.isGreaterThan(0)?"+":t.isLessThan(0)?"-":"",u="change"===o?t.isGreaterThan(0)?"green":t.isLessThan(0)?"red":"subtle":"contrast";return(0,x.jsx)(s4,{content:(i?"".concat(i," "):"")+s(t),children:(0,x.jsx)(tq,{size:n,weight:r,font:"mono",ellipsis:!0,color:a||u,children:"change"===o?"".concat(l).concat(s(t.absoluteValue())):s(t)})})}var k_=n(61258),kO=n.n(k_);function kC(e){let{skeletonCount:t=10}=e;return(0,x.jsx)(x.Fragment,{children:kO()(t,e=>(0,x.jsxs)("div",{className:(0,ea.cx)("relative flex gap-4 p-3.5",(0,ea.cx)("border-t border-gray-200 dark:border-graydark-300","first:border-none")),children:[(0,x.jsx)(f_,{className:"w-[60px] h-[50px]"}),(0,x.jsxs)("div",{className:"flex flex-col gap-2 w-full",children:[(0,x.jsx)(f_,{className:"w-[90%] h-[20px]"}),(0,x.jsx)(f_,{className:"w-[140px] h-[14px]"})]})]},e))})}var kM=n(66700),kA=n(19785);function kT(e,t){(0,kA.Z)(2,arguments);var n=(0,kM.Z)(e),r=(0,kM.Z)(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}var kP={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}},kN={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function kR(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var kD={date:kR({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:kR({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:kR({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},kL={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function kF(e){return function(t,n){var r,i=n||{};if("formatting"===(i.context?String(i.context):"standalone")&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,a=i.width?String(i.width):o;r=e.formattingValues[a]||e.formattingValues[o]}else{var s=e.defaultWidth,l=i.width?String(i.width):e.defaultWidth;r=e.values[l]||e.values[s]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function kV(e){return function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.width,o=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;var s=a[0],l=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(l)?function(e,t){for(var n=0;n