PageSourceSearch

https://taostats.io/_next/static/chunks/14w1l16agkge5.js

js taostats.io collected 2026-09-25 18:47:16 UTC 300,478 bytes, 4 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,929717,e=>{"use strict";var t=e.i(429427),s=e.i(371330),n=e.i(271645),l=e.i(394487),i=e.i(601893),r=e.i(700020);let a=(0,r.forwardRefWithAs)(function(e,a){var o;let u=(0,i.useDisabled)(),{disabled:c=u||!1,autoFocus:d=!1,...p}=e,{isFocusVisible:m,focusProps:f}=(0,t.useFocusRing)({autoFocus:d}),{isHovered:h,hoverProps:x}=(0,s.useHover)({isDisabled:c}),{pressed:v,pressProps:b}=(0,l.useActivePress)({disabled:c}),g=(0,r.mergeProps)({ref:a,type:null!=(o=p.type)?o:"button",disabled:c||void 0,autoFocus:d},f,x,b),y=(0,n.useMemo)(()=>({disabled:c,hover:h,focus:m,active:v,autofocus:d}),[c,h,m,v,d]);return(0,r.useRender)()({ourProps:g,theirProps:p,slot:y,defaultTag:"button",name:"Button"})});e.s(["Button",0,a])},24489,e=>{"use strict";var t=e.i(429427),s=e.i(371330),n=e.i(271645),l=e.i(394487),i=e.i(503269),r=e.i(214520),a=e.i(746725),o=e.i(914189),u=e.i(601893),c=e.i(140721),d=e.i(942803),p=e.i(233538),m=e.i(694421),f=e.i(700020),h=e.i(35889),x=e.i(998348),v=e.i(722678);let b=(0,f.forwardRefWithAs)(function(e,b){let g=(0,n.useId)(),y=(0,d.useProvidedId)(),w=(0,u.useDisabled)(),{id:C=y||`headlessui-checkbox-${g}`,disabled:S=w||!1,autoFocus:N=!1,checked:k,defaultChecked:E,onChange:j,name:T,value:R,form:I,indeterminate:L=!1,tabIndex:O=0,...M}=e,F=(0,r.useDefaultValue)(E),[_,P]=(0,i.useControllable)(k,j,null!=F&&F),D=(0,v.useLabelledBy)(),A=(0,h.useDescribedBy)(),B=(0,a.useDisposables)(),[z,W]=(0,n.useState)(!1),H=(0,o.useEvent)(()=>{W(!0),null==P||P(!_),B.nextFrame(()=>{W(!1)})}),V=(0,o.useEvent)(e=>{if((0,p.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();e.preventDefault(),H()}),K=(0,o.useEvent)(e=>{e.key===x.Keys.Space?(e.preventDefault(),H()):e.key===x.Keys.Enter&&(0,m.attemptSubmit)(e.currentTarget)}),G=(0,o.useEvent)(e=>e.preventDefault()),{isFocusVisible:U,focusProps:$}=(0,t.useFocusRing)({autoFocus:N}),{isHovered:Z,hoverProps:J}=(0,s.useHover)({isDisabled:S}),{pressed:q,pressProps:Q}=(0,l.useActivePress)({disabled:S}),X=(0,f.mergeProps)({ref:b,id:C,role:"checkbox","aria-checked":L?"mixed":_?"true":"false","aria-labelledby":D,"aria-describedby":A,"aria-disabled":!!S||void 0,indeterminate:L?"true":void 0,tabIndex:S?void 0:O,onKeyUp:S?void 0:K,onKeyPress:S?void 0:G,onClick:S?void 0:V},$,J,Q),Y=(0,n.useMemo)(()=>({checked:_,disabled:S,hover:Z,focus:U,active:q,indeterminate:L,changing:z,autofocus:N}),[_,L,S,Z,U,q,z,N]),ee=(0,n.useCallback)(()=>{if(void 0!==F)return null==P?void 0:P(F)},[P,F]),et=(0,f.useRender)();return n.default.createElement(n.default.Fragment,null,null!=T&&n.default.createElement(c.FormFields,{disabled:S,data:{[T]:R||"on"},overrides:{type:"checkbox",checked:_},form:I,onReset:ee}),et({ourProps:X,theirProps:M,slot:Y,defaultTag:"span",name:"Checkbox"}))});e.s(["Checkbox",0,b])},326962,e=>{"use strict";var t=e.i(271645),s=e.i(674175),n=e.i(700020),l=e.i(929717);let i=(0,n.forwardRefWithAs)(function(e,i){let r=(0,s.useClose)();return t.default.createElement(l.Button,{ref:i,...(0,n.mergeProps)({onClick:r},e)})});e.s(["CloseButton",0,i])},762630,e=>{"use strict";let t,s,n,l,i;var r=e.i(429427),a=e.i(371330),o=e.i(271645),u=e.i(174080);function c(e,t,s){let n,l=s.initialDeps??[];function i(){var i,r,a,o;let u,c;s.key&&(null==(i=s.debug)?void 0:i.call(s))&&(u=Date.now());let d=e();if(!(d.length!==l.length||d.some((e,t)=>l[t]!==e)))return n;if(l=d,s.key&&(null==(r=s.debug)?void 0:r.call(s))&&(c=Date.now()),n=t(...d),s.key&&(null==(a=s.debug)?void 0:a.call(s))){let e=Math.round((Date.now()-u)*100)/100,t=Math.round((Date.now()-c)*100)/100,n=t/16,l=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${l(t,5)} /${l(e,5)} ms`,`
2            font-size: .6rem;
3            font-weight: bold;
4            color: hsl(${Math.max(0,Math.min(120-120*n,120))}deg 100% 31%);`,null==s?void 0:s.key)}return null==(o=null==s?void 0:s.onChange)||o.call(s,n),n}return i.updateDeps=e=>{l=e},i}function d(e,t){if(void 0!==e)return e;throw Error(`Unexpected undefined${t?`: ${t}`:""}`)}let p=e=>{let{offsetWidth:t,offsetHeight:s}=e;return{width:t,height:s}},m=e=>e,f=e=>{let t=Math.max(e.startIndex-e.overscan,0),s=Math.min(e.endIndex+e.overscan,e.count-1),n=[];for(let e=t;e<=s;e++)n.push(e);return n},h=(e,t)=>{let s=e.scrollElement;if(!s)return;let n=e.targetWindow;if(!n)return;let l=e=>{let{width:s,height:n}=e;t({width:Math.round(s),height:Math.round(n)})};if(l(p(s)),!n.ResizeObserver)return()=>{};let i=new n.ResizeObserver(t=>{let n=()=>{let e=t[0];if(null==e?void 0:e.borderBoxSize){let t=e.borderBoxSize[0];if(t)return void l({width:t.inlineSize,height:t.blockSize})}l(p(s))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(n):n()});return i.observe(s,{box:"border-box"}),()=>{i.unobserve(s)}},x={passive:!0},v="u"<typeof window||"onscrollend"in window,b=(e,t)=>{var s,n;let l,i=e.scrollElement;if(!i)return;let r=e.targetWindow;if(!r)return;let a=0,o=e.options.useScrollendEvent&&v?()=>void 0:(s=()=>{t(a,!1)},n=e.options.isScrollingResetDelay,function(...e){r.clearTimeout(l),l=r.setTimeout(()=>s.apply(this,e),n)}),u=s=>()=>{let{horizontal:n,isRtl:l}=e.options;a=n?i.scrollLeft*(l&&-1||1):i.scrollTop,o(),t(a,s)},c=u(!0),d=u(!1);d(),i.addEventListener("scroll",c,x);let p=e.options.useScrollendEvent&&v;return p&&i.addEventListener("scrollend",d,x),()=>{i.removeEventListener("scroll",c),p&&i.removeEventListener("scrollend",d)}},g=(e,t,s)=>{if(null==t?void 0:t.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[s.options.horizontal?"inlineSize":"blockSize"])}return e[s.options.horizontal?"offsetWidth":"offsetHeight"]}
vendor: 2,924 bytes, line 4
4,y=(e,{adjustments:t=0,behavior:s},n)=>{var l,i;null==(i=null==(l=n.scrollElement)?void 0:l.scrollTo)||i.call(l,{[n.options.horizontal?"left":"top"]:e+t,behavior:s})};class w{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null,t=()=>e||(this.targetWindow&&this.targetWindow.ResizeObserver?e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{this._measureElement(e.target,e)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}):null);return{disconnect:()=>{var s;null==(s=t())||s.disconnect(),e=null},observe:e=>{var s;return null==(s=t())?void 0:s.observe(e,{box:"border-box"})},unobserve:e=>{var s;return null==(s=t())?void 0:s.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([t,s])=>{void 0===s&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:m,rangeExtractor:f,onChange:()=>{},measureElement:g,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...e}},this.notify=e=>{var t,s;null==(s=(t=this.options).onChange)||s.call(t,this,e)},this.maybeNotify=c(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;let t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t)return void this.maybeNotify();this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(null==(e=this.scrollElement)?void 0:e.window)??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?"forward":"backward":null,this.scrollOffset=e,this.isScrolling=t,this.maybeNotify()}))}}
4,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??("function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{let s=new Map,n=new Map;for(let l=t-1;l>=0;l--){let t=e[l];if(s.has(t.lane))continue;let i=n.get(t.lane);if(null==i||t.end>i.end?n.set(t.lane,t):t.end<i.end&&s.set(t.lane,!0),s.size===this.options.lanes)break}return n.size===this.options.lanes?Array.from(n.values()).sort((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=c(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(e,t,s,n,l)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:s,getItemKey:n,enabled:l}),{key:!1}),this.getMeasurements=c(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:s,getItemKey:n,enabled:l},i)=>{if(!l)return this.measurementsCache=[],this.itemSizeCache.clear(),[];0===this.measurementsCache.length&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let r=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];let a=this.measurementsCache.slice(0,r);for(let l=r;l<e;l++){let e=n(l),r=1===this.options.lanes?a[l-1]:this.getFurthestMeasurement(a,l),o=r?r.end+this.options.gap:t+s,u=i.get(e),c="number"==typeof u?u:this.options.estimateSize(l),d=o+c,p=r?r.lane:l%this.options.lanes;a[l]={index:l,start:o,size:c,end:d,key:e,lane:p}}return this.measurementsCache=a,a},{key:!1,debug:()=>this.options.debug}),this.calculateRange=c(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,s,n)=>this.range=e.length>0&&t>0?function({measurements:e,outerSize:t,scrollOffset:s,lanes:n}){let l=e.length-1;if(e.length<=n)return{startIndex:0,endIndex:l};let i=C(0,l,t=>e[t].start,s),r=i;if(1===n)for(;r<l&&e[r].end<s+t;)r++;else if(n>1){let a=Array(n).fill(0);for(;r<l&&a.some(e=>e<s+t);){let t=e[r];a[t.lane]=t.end,r++}let o=Array(n).fill(s+t);for(;i>=0&&o.some(e=>e>=s);){let t=e[i];o[t.lane]=t.start,i--}i=Math.max(0,i-i%n),r=Math.min(l,r+(n-1-r%n))}return{startIndex:i,endIndex:r}}({measurements:e,outerSize:t,scrollOffset:s,lanes:n}):null,{key:!1,debug:()=>this.options.debug}
4),this.getVirtualIndexes=c(()=>{let e=null,t=null,s=this.calculateRange();return s&&(e=s.startIndex,t=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,s,n,l)=>null===n||null===l?[]:e({startIndex:n,endIndex:l,overscan:t,count:s}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,s=e.getAttribute(t);return s?parseInt(s,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this._measureElement=(e,t)=>{let s=this.indexFromElement(e),n=this.measurementsCache[s];if(!n)return;let l=n.key,i=this.elementsCache.get(l);i!==e&&(i&&this.observer.unobserve(i),this.observer.observe(e),this.elementsCache.set(l,e)),e.isConnected&&this.resizeItem(s,this.options.measureElement(e,t,this))},this.resizeItem=(e,t)=>{let s=this.measurementsCache[e];if(!s)return;let n=t-(this.itemSizeCache.get(s.key)??s.size);0!==n&&((void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(s,n,this):s.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=n,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(s.index),this.itemSizeCache=new Map(this.itemSizeCache.set(s.key,t)),this.notify(!1))},this.measureElement=e=>{e?this._measureElement(e,void 0):this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))})},this.getVirtualItems=c(()=>
4[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let s=[];for(let n=0,l=e.length;n<l;n++){let l=t[e[n]];s.push(l)}return s},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(0!==t.length)return d(t[C(0,t.length-1,e=>d(t[e]).start,e)])},this.getOffsetForAlignment=(e,t,s=0)=>{let n=this.getSize(),l=this.getScrollOffset();return"auto"===t&&(t=e>=l+n?"end":"start"),"center"===t?e+=(s-n)/2:"end"===t&&(e-=n),Math.max(Math.min(this.getTotalSize()+this.options.scrollMargin-n,e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));let s=this.measurementsCache[e];if(!s)return;let n=this.getSize(),l=this.getScrollOffset();if("auto"===t)if(s.end>=l+n-this.options.scrollPaddingEnd)t="end";else{if(!(s.start<=l+this.options.scrollPaddingStart))return[l,t];t="start"}let i="end"===t?s.end+this.options.scrollPaddingEnd:s.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(i,t,s.size),t]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(e,{align:t="start",behavior:s}={})=>{"smooth"===s&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,t),{adjustments:void 0,behavior:s})},this.scrollToIndex=(e,{align:t="auto",behavior:s}={})=>{"smooth"===s&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),e=Math.max(0,Math.min(e,this.options.count-1));let n=0,l=t=>{if(!this.targetWindow)return;let n=this.getOffsetForIndex(e,t);if(!n)return void console.warn("Failed to get offset for index:",e);let[l,r]=n;this._scrollToOffset(l,{adjustments:void 0,behavior:s}),this.targetWindow.requestAnimationFrame(()=>{let t=this.getScrollOffset(),s=this.getOffsetForIndex(e,r);s?1.01>Math.abs(s[0]-t)||i(r):console.warn("Failed to get offset for index:",e)})},i=t=>{this.targetWindow&&(++n<10?this.targetWindow.requestAnimationFrame(()=>l(t)):console.warn(`Failed to scroll to index ${e} after 10 attempts.`))};l(t)},this.scrollBy=(e,{behavior:t}={})=>{"smooth"===t&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adju
4stments:void 0,behavior:t})},this.getTotalSize=()=>{var e;let t,s=this.getMeasurements();if(0===s.length)t=this.options.paddingStart;else if(1===this.options.lanes)t=(null==(e=s[s.length-1])?void 0:e.end)??0;else{let e=Array(this.options.lanes).fill(null),n=s.length-1;for(;n>=0&&e.some(e=>null===e);){let t=s[n];null===e[t.lane]&&(e[t.lane]=t.end),n--}t=Math.max(...e.filter(e=>null!==e))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:s})=>{this.options.scrollToFn(e,{behavior:s,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(e)}}let C=(e,t,s,n)=>{for(;e<=t;){let l=(e+t)/2|0,i=s(l);if(i<n)e=l+1;else{if(!(i>n))return l;t=l-1}}return e>0?e-1:0},S="u">typeof document?o.useLayoutEffect:o.useEffect;var N=e.i(394487),k=e.i(436289),E=e.i(503269),j=e.i(214520),T=e.i(746725),R=e.i(992704),I=e.i(914189),L=e.i(684653),O=e.i(835696),M=e.i(941444),F=e.i(877891),_=e.i(952744),P=e.i(605083),D=e.i(157138),A=e.i(813581),B=e.i(693456);function z(e){let t=(0,o.useRef)({value:"",selectionStart:null,selectionEnd:null});return(0,B.useEventListener)(e,"blur",e=>{let s=e.target;A.isHTMLInputElement(s)&&(t.current={value:s.value,selectionStart:s.selectionStart,selectionEnd:s.selectionEnd})}),(0,I.useEvent)(()=>{if(document.activeElement!==e&&A.isHTMLInputElement(e)&&e.isConnected){if(e.focus({preventScroll:!0}),e.value!==t.current.value)e.setSelectionRange(e.value.length,e.value.length);else{let{selectionStart:s,selectionEnd:n}=t.current;null!==s&&null!==n&&e.setSelectionRange(s,n)}t.current={value:"",selectionStart:null,selectionEnd:null}}})}var W=e.i(144279),H=e.i(101852),V=e.i(294316),K=e.i(571616),G=e.i(83733),U=e.i(340143),$=e.i(833633),Z=e.i(601893),J=e.i(919751),q=e.i(140721),Q=e.i(904016),X=e.i(942803),Y=e.i(233137),ee=e.i(341650),et=e.i(140407),es=e.i(103935),en=e.i(233538),el=e.i(65659),ei=e.i(544508),er=e.i(397701),ea=e.i(309507),eo=e.i(700020),eu=e.i(35889),ec=e.i(998348),ed=e.i(722678),ep=((t=ep||{})[t.Left=0]="Left",t[t.Right=2]="Right",t),em=e.i(635307),ef=e.i(825720),eh=e.i(652265),ex=Object.defineProperty,ev=(e,t,s)=>{let n;return(n="symbol"!=typeof t?t+"":t)in e?ex(e,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[n]=s,s},eb=((s=eb||{})[s.Open=0]="Open",s[s.Closed=1]="Closed",s),eg=((n=eg||{})[n.Single=0]="Single",n[n.Multi=1]="Multi",n),ey=((l=ey||{})[l.Pointer=0]="Pointer",l[l.Focus=1]="Focus",l[l.Other=2]="Other",l),ew=((i=ew||{})[i.OpenCombobox=0]="OpenCombobox",i[i.CloseCombobox=1]="CloseCombobox",i[i.GoToOption=2]="GoToOption",i[i.SetTyping=3]="SetTyping",i[i.RegisterOption=4]="RegisterOption",i[i.UnregisterOption=5]="UnregisterOption",i[i.DefaultToFirstOption=6]="DefaultToFirstOption",i[i.SetActivationTrigger=7]="SetActivationTrigger",i[i.UpdateVirtualConfiguration=8]="UpdateVirtualConfiguration",i[i.SetInputElement=9]="SetInputElement",i[i.SetButtonElement=10]="SetButtonElement",i[i.SetOptionsElement=11]="SetOptionsElement",i);function eC(e,t=e=>e){let s=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,n=t(e.options.slice()),l=n.length>0&&null!==n[0].dataRef.current.order?n.sort((e,t)=>e.dataRef.current.order-t.dataRef.current.order):(0,eh.sortByDomNode)(n,e=>e.dataRef.current.domRef.current),i=s?l.indexOf(s):null;return -1===i&&(i=null),{options:l,activeOptionIndex:i}}let eS={1(e){var t;return null!=(t=e.dataRef.current)&&t.disabled||1===e.comboboxState?e:{...e,activeOptionIndex:null,comboboxState:1,isTyping:!1,activationTrigger:2,__demoMode:!1}},0(e){var t,s;if(null!=(t=e.dataRef.current)&&t.disabled||0===e.comboboxState)return e;if(null!=(s=e.dataRef.current)&&s.value){let t=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(-1!==t)return{...e,activeOptionIndex:t,comboboxState:0,__demoMode:!1}}return{...e,comboboxState:0,__demoMode:!1}},3:(e,t)=>e.isTyping===t.isTyping?e:{...e,isTyping:t.isTyping},2(e,t){var s,n,l,i;if(null!=(s=e.dataRef.current)&&s.disabled||e.optionsElement&&!(null!=(n=e.dataRef.current)&&n.optionsPropsRef.current.static)&&1===e.comboboxState)return e;if(e.virtual){let{options:s,disabled:n}=e.virtual,i=t.focus===el.Focus.Specific?t.idx:(0,el.calculateActiveIndex)(t,{resolveItems:()=>s,resolveActiveIndex:()=>{var t,l;
4return null!=(l=null!=(t=e.activeOptionIndex)?t:s.findIndex(e=>!n(e)))?l:null},resolveDisabled:n,resolveId(){throw Error("Function not implemented.")}}),r=null!=(l=t.trigger)?l:2;return e.activeOptionIndex===i&&e.activationTrigger===r?e:{...e,activeOptionIndex:i,activationTrigger:r,isTyping:!1,__demoMode:!1}}let r=eC(e);if(null===r.activeOptionIndex){let e=r.options.findIndex(e=>!e.dataRef.current.disabled);-1!==e&&(r.activeOptionIndex=e)}let a=t.focus===el.Focus.Specific?t.idx:(0,el.calculateActiveIndex)(t,{resolveItems:()=>r.options,resolveActiveIndex:()=>r.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled}),o=null!=(i=t.trigger)?i:2;return e.activeOptionIndex===a&&e.activationTrigger===o?e:{...e,...r,isTyping:!1,activeOptionIndex:a,activationTrigger:o,__demoMode:!1}},4:(e,t)=>{var s,n,l,i;if(null!=(s=e.dataRef.current)&&s.virtual)return{...e,options:[...e.options,t.payload]};let r=t.payload,a=eC(e,e=>(e.push(r),e));null===e.activeOptionIndex&&null!=(l=(n=e.dataRef.current).isSelected)&&l.call(n,t.payload.dataRef.current.value)&&(a.activeOptionIndex=a.options.indexOf(r));let o={...e,...a,activationTrigger:2};return null!=(i=e.dataRef.current)&&i.__demoMode&&void 0===e.dataRef.current.value&&(o.activeOptionIndex=0),o},5:(e,t)=>{var s;if(null!=(s=e.dataRef.current)&&s.virtual)return{...e,options:e.options.filter(e=>e.id!==t.id)};let n=eC(e,e=>{let s=e.findIndex(e=>e.id===t.id);return -1!==s&&e.splice(s,1),e});return{...e,...n,activationTrigger:2}},6:(e,t)=>e.defaultToFirstOption===t.value?e:{...e,defaultToFirstOption:t.value},7:(e,t)=>e.activationTrigger===t.trigger?e:{...e,activationTrigger:t.trigger},8:(e,t)=>
4{var s,n;if(null===e.virtual)return{...e,virtual:{options:t.options,disabled:null!=(s=t.disabled)?s:()=>!1}};if(e.virtual.options===t.options&&e.virtual.disabled===t.disabled)return e;let l=e.activeOptionIndex;if(null!==e.activeOptionIndex){let s=t.options.indexOf(e.virtual.options[e.activeOptionIndex]);l=-1!==s?s:null}return{...e,activeOptionIndex:l,virtual:{options:t.options,disabled:null!=(n=t.disabled)?n:()=>!1}}},9:(e,t)=>e.inputElement===t.element?e:{...e,inputElement:t.element},10:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},11:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element}};class eN extends ef.Machine{constructor(e){super(e),ev(this,"actions",{onChange:e=>{let{onChange:t,compare:s,mode:n,value:l}=this.state.dataRef.current;return(0,er.match)(n,{0:()=>null==t?void 0:t(e),1:()=>{let n=l.slice(),i=n.findIndex(t=>s(t,e));return -1===i?n.push(e):n.splice(i,1),null==t?void 0:t(n)}})},registerOption:(e,t)=>(this.send({type:4,payload:{id:e,dataRef:t}}),()=>{this.state.activeOptionIndex===this.state.dataRef.current.calculateIndex(t.current.value)&&this.send({type:6,value:!0}),this.send({type:5,id:e})}),goToOption:(e,t)=>(this.send({type:6,value:!1}),this.send({type:2,...e,trigger:t})),setIsTyping:e=>{this.send({type:3,isTyping:e})},closeCombobox:()=>{var e,t;this.send({type:1}),this.send({type:6,value:!1}),null==(t=(e=this.state.dataRef.current).onClose)||t.call(e)},openCombobox:()=>{this.send({type:0}),this.send({type:6,value:!0})},setActivationTrigger:e=>{this.send({type:7,trigger:e})},selectActiveOption:()=>{let e=this.selectors.activeOptionIndex(this.state);if(null!==e){if(this.actions.setIsTyping(!1),this.state.virtual)this.actions.onChange(this.state.virtual.options[e]);else{let{dataRef:t}=this.state.options[e];this.actions.onChange(t.current.value)}this.actions.goToOption({focus:el.Focus.Specific,idx:e})}},setInputElement:e=>{this.send({type:9,element:e})},setButtonElement:e=>{this.send({type:10,element:e})},setOptionsElement:e=>{this.send({type:11,element:e})}}),ev(this,"selectors",{activeDescendantId:e=>{var t,s;let n=this.selectors.activeOptionIndex(e);if(null!==n)return e.virtual?null==(s=e.options.find(t=>!t.dataRef.current.disabled&&e.dataRef.current.compare(t.dataRef.current.value,e.virtual.options[n])))?void 0:s.id:null==(t=e.options[n])?void 0:t.id},activeOptionIndex:e=>{if(e.defaultToFirstOption&&null===e.activeOptionIndex&&(e.virtual?e.virtual.options.length>0:e.options.length>0)){if(e.virtual){let{options:t,disabled:s}=e.virtual,n=t.findIndex(e=>{var t;return!(null!=(t=null==s?void 0:s(e))&&t)});if(-1!==n)return n}let t=e.options.findIndex(e=>!e.dataRef.current.disabled);if(-1!==t)return t}return e.activeOptionIndex},activeOption:e=>{var t,s;let n=this.selectors.activeOptionIndex(e);return null===n?null:e.virtual?e.virtual.options[null!=n?n:0]:null!=(s=null==(t=e.options[n])?void 0:t.dataRef.current.value)?s:null},isActive:(e,t,s)=>{var n;let l=this.selectors.activeOptionIndex(e);return null!==l&&(e.virtual?l===e.dataRef.current.calculateIndex(t):(null==(n=e.options[l])?void 0:n.id)===s)},shouldScrollIntoView:(e,t,s)=>!(e.virtual||e.__demoMode||0!==e.comboboxState||0===e.activationTrigger||!this.selectors.isActive(e,t,s))});{let e=this.state.id,t=ee.stackMachines.get(null);this.disposables.add(t.on(ee.ActionTypes.Push,s=>{t.selectors.isTop(s,e)||0!==this.state.comboboxState||this.actions.closeCombobox()})),this.on(0,()=>t.actions.push(e)),this.on(1,()=>t.actions.pop(e))}}static new({id:e,virtual:t=null,__demoMode:s=!1}){var n;return new eN({id:e,dataRef:{current:{}},comboboxState:+!s,isTyping:!1,options:[],virtual:t?{options:t.options,disabled:null!=(n=t.disabled)?n:()=>!1}:null,activeOptionIndex:null,activationTrigger:2,inputElement:null,buttonElement:null,optionsElement:null,__demoMode:s})}reduce(e,t){return(0,er.match)(t.type,eS,e,t)}}var ek=e.i(526599);let eE=(0,o.createContext)(null);function ej(e){let t=(0,o.useContext)(eE);if(null===t){let t=Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,eT),t}return t}function eT({id:e,virtual:t=null,__demoMode:s=!1}){let n=(0,o.useMemo)(()=>eN.new({id:e,virtual:t,__demoMode:s}),[]);return(0,ek.useOnUnmount)(()=>n.dispose()),n}let eR=(0,o.createContext)(null);function eI(e){let t=(0,o.useContext)(eR);if(null===t){let t=Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,eI),t}return t}eR.displayName="ComboboxDataContext";let eL=(0,o.createContext)(null);function eO(e){let t=ej("VirtualProvider"),{options:s}=eI("VirtualProvider").virtual,n=(0,et.useSlice)(t,e=>e.optionsElement),[l,i]=(0,o.useMemo)(()=>
4{if(!n)return[0,0];let e=window.getComputedStyle(n);return[parseFloat(e.paddingBlockStart||e.paddingTop),parseFloat(e.paddingBlockEnd||e.paddingBottom)]},[n]),r=function(e){let t=o.useReducer(()=>({}),{})[1],s={...e,onChange:(s,n)=>{var l;n?(0,u.flushSync)(t):t(),null==(l=e.onChange)||l.call(e,s,n)}},[n]=o.useState(()=>new w(s));return n.setOptions(s),S(()=>n._didMount(),[]),S(()=>n._willUpdate()),n}({observeElementRect:h,observeElementOffset:b,scrollToFn:y,...{enabled:0!==s.length,scrollPaddingStart:l,scrollPaddingEnd:i,count:s.length,estimateSize:()=>40,getScrollElement:()=>t.state.optionsElement,overscan:12}}),[a,c]=(0,o.useState)(0);(0,O.useIsoMorphicEffect)(()=>{c(e=>e+1)},[s]);let d=r.getVirtualItems(),p=(0,et.useSlice)(t,e=>e.activationTrigger===ey.Pointer),m=(0,et.useSlice)(t,t.selectors.activeOptionIndex);return 0===d.length?null:o.default.createElement(eL.Provider,{value:r},o.default.createElement("div",{style:{position:"relative",width:"100%",height:`${r.getTotalSize()}px`},ref:e=>{e&&(p||null!==m&&s.length>m&&r.scrollToIndex(m))}},d.map(t=>{var n;return o.default.createElement(o.Fragment,{key:t.key},o.default.cloneElement(null==(n=e.children)?void 0:n.call(e,{...e.slot,option:s[t.index]}),{key:`${a}-${t.key}`,"data-index":t.index,"aria-setsize":s.length,"aria-posinset":t.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${t.start}px)`,overflowAnchor:"none"}}))})))}let eM=o.Fragment,eF=eo.RenderFeatures.RenderStrategy|eo.RenderFeatures.Static,e_=(0,eo.forwardRefWithAs)(function(e,t){let s=(0,o.useId)(),n=(0,Z.useDisabled)(),{value:l,defaultValue:i,onChange:r,form:a,name:u,by:c,invalid:d=!1,disabled:p=n||!1,onClose:m,__demoMode:f=!1,multiple:h=!1,immediate:x=!1,virtual:v=null,nullable:b,...g}=e,y=(0,j.useDefaultValue)(i),[w=h?[]:void 0,C]=(0,E.useControllable)(l,r,y),S=eT({id:s,virtual:v,__demoMode:f}),N=(0,o.useRef)({static:!1,hold:!1}),T=(0,k.useByComparator)(c),R=(0,I.useEvent)(e=>v?null===c?v.options.indexOf(e):v.options.findIndex(t=>T(t,e)):S.state.options.findIndex(t=>T(t.dataRef.current.value,e))),L=(0,o.useCallback)(e=>(0,er.match)(P.mode,{[eg.Multi]:()=>w.some(t=>T(t,e)),[eg.Single]:()=>T(w,e)}),[w]),M=(0,et.useSlice)(S,e=>e.virtual),F=(0,I.useEvent)(()=>null==m?void 0:m()),P=(0,o.useMemo)(()=>({__demoMode:f,immediate:x,optionsPropsRef:N,value:w,defaultValue:y,disabled:p,invalid:d,mode:h?eg.Multi:eg.Single,virtual:v?M:null,onChange:C,isSelected:L,calculateIndex:R,compare:T,onClose:F}),[w,y,p,d,h,C,L,f,S,v,M,F]);(0,O.useIsoMorphicEffect)(()=>{var e;v&&S.send({type:ew.UpdateVirtualConfiguration,options:v.options,disabled:null!=(e=v.disabled)?e:null})},[v,null==v?void 0:v.options,null==v?void 0:v.disabled]),(0,O.useIsoMorphicEffect)(()=>{S.state.dataRef.current=P},[P]);let[D,A,B,z]=(0,et.useSlice)(S,e=>[e.comboboxState,e.buttonElement,e.inputElement,e.optionsElement]),W=ee.stackMachines.get(null),H=(0,et.useSlice)(W,(0,o.useCallback)(e=>W.selectors.isTop(e,s),[W,s]));(0,_.useOutsideClick)(H,[A,B,z],()=>S.actions.closeCombobox());let V=(0,et.useSlice)(S,S.selectors.activeOptionIndex),K=(0,et.useSlice)(S,S.selectors.activeOption),G=(0,o.useMemo)(()=>({open:D===eb.Open,disabled:p,invalid:d,activeIndex:V,activeOption:K,value:w}),[P,p,w,d,K,D]),[U,$]=(0,ed.useLabels)(),Q=(0,o.useCallback)(()=>{if(void 0!==y)return null==C?void 0:C(y)},[C,y]),X=(0,eo.useRender)();return o.default.createElement($,{value:U,props:{htmlFor:null==B?void 0:B.id},slot:{open:D===eb.Open,disabled:p}},o.default.createElement(J.FloatingProvider,null,o.default.createElement(eR.Provider,{value:P},o.default.createElement(eE.Provider,{value:S},o.default.createElement(Y.OpenClosedProvider,{value:(0,er.match)(D,{[eb.Open]:Y.State.Open,[eb.Closed]:Y.State.Closed})},null!=u&&o.default.createElement(q.FormFields,{disabled:p,data:null!=w?{[u]:w}:{},form:a,onReset:Q}),X({ourProps:null===t?{}:{ref:t},theirProps:g,slot:G,defaultTag:eM,name:"Combobox"}))))))}),eP=(0,eo.forwardRefWithAs)(function(e,t){let s=ej("Combobox.Button"),n=eI("Combobox.Button"),[l,i]=(0,o.useState)(null),c=(0,V.useSyncRefs)(t,i,s.actions.setButtonElement),d=(0,o.useId)(),{id:p=`headlessui-combobox-button-${d}`,disabled:m=n.disabled||!1,autoFocus:f=!1,...h}=e,[x,v,b]=(0,et.useSlice)(s,e=>[e.comboboxState,e.inputElement,e.optionsElement]),g=z(v),y=x===eb.Open;(0,D.useQuickRelease)(y,{trigger:l,action:(0,o.useCallback)(e=>{if(null!=l&&l.contains(e.target)||null!=v&&v.contains(e.target))return D.Action.Ignore;let t=e.target.closest('[role="option"]:not([data-disabled])');return A.isHTMLElement(t)?D.Action.Select(t):null!=b&&b.contains(e.target)?D.Action.Ignore:D.Action.Close},[l,v,b]),close:s.actions.closeCombobox,select:s.actions.selectActiveOption});let w=(0,I.useEvent)(e=>{switch(e.key){case ec.Keys.Space:case ec.Keys.Enter:e.preventDefault(),e.stopPropagation(),s.state.comboboxState===eb.Closed&&(0,u.flushSync)(()=>s.actions.openCombobox()),g();return;case ec.Keys.ArrowDown:e.preventDefault(),e.stopPropagation(),s.state.comboboxState===eb.Closed&&((0,u.flushSync)(()=>s.actions.openCombobox()),s.state.dataRef.current.value||s.actions.goToOption({focus:el.Focus.First})),g();return;case ec.Keys.ArrowUp:e.preventDefault(),e.stopPropagation(),s.state.comboboxState===eb.Closed&&((0,u.flushSync)(()=>s.actions.openCombobox()),s.state.dataRef.current.value||s.actions.goToOption({focus:el.Focus.Last})),g();return;case ec.Keys.Escape:if(s.state.comboboxState!==eb.Open)return;e.preventDefault(),s.state.optionsElement&&!n.optionsPropsRef.current.static&&e.stopPropagation(),(0,u.flushSync)(()=>s.actions.closeCombobox()),g();return;default:return}}),C=(0,I.useEvent)(e=>{e.preventDefault(),(0,en.isDisabledReactIssue7711)(e.currentTarget)||(e.button===ep.Left&&(s.state.comboboxState===eb.Open?s.actions.closeCombobox():s.actions.openCombobox()),g())}),S=(0,ed.useLabelledBy)([p]),{isFocusVisible:k,focusProps:E}=(0,r.useFocusRing)({autoFocus:f}),{isHovered:j,hoverProps:T}=(0,a.useHover)({isDisabled:m}),{pressed:R,pressProps:L}=(0,N.useActivePress)({disabled:m}),O=(0,o.useMemo)(()=>({open:x===eb.Open,active:R||x===eb.Open,disabled:m,invalid:n.invalid,value:n.value,hover:j,focus:k}),[n,j,k,R,m,x]),M=(0,eo.mergeProps)({ref:c,id:p,type:(0,W.useResolveButtonType)(e,l),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":null==b?void 0:b.id,"aria-expanded":x===eb.Open,"aria-labelledby":S,disabled:m||void 0,autoFocus:f,onPointerDown:C,onKeyDown:w}
4,E,T,L);return(0,eo.useRender)()({ourProps:M,theirProps:h,slot:O,defaultTag:"button",name:"Combobox.Button"})}),eD=(0,eo.forwardRefWithAs)(function(e,t){var s,n;let l=ej("Combobox.Input"),i=eI("Combobox.Input"),c=(0,o.useId)(),d=(0,X.useProvidedId)(),{id:p=d||`headlessui-combobox-input-${c}`,onChange:m,displayValue:f,disabled:h=i.disabled||!1,autoFocus:x=!1,type:v="text",...b}=e,[g]=(0,et.useSlice)(l,e=>[e.inputElement]),y=(0,o.useRef)(null),w=(0,V.useSyncRefs)(y,t,(0,J.useFloatingReference)(),l.actions.setInputElement),C=(0,P.useOwnerDocument)(g),[S,N]=(0,et.useSlice)(l,e=>[e.comboboxState,e.isTyping]),k=(0,T.useDisposables)(),E=(0,I.useEvent)(()=>{l.actions.onChange(null),l.state.optionsElement&&(l.state.optionsElement.scrollTop=0),l.actions.goToOption({focus:el.Focus.Nothing})}),j=(0,o.useMemo)(()=>{var e;return"function"==typeof f&&void 0!==i.value?null!=(e=f(i.value))?e:"":"string"==typeof i.value?i.value:""},[i.value,f]);(0,$.useWatch)(([e,t],[s,n])=>{if(l.state.isTyping)return;let i=y.current;i&&((n===eb.Open&&t===eb.Closed||e!==s)&&(i.value=e),requestAnimationFrame(()=>{if(l.state.isTyping||!i||(null==C?void 0:C.activeElement)!==i)return;let{selectionStart:e,selectionEnd:t}=i;0===Math.abs((null!=t?t:0)-(null!=e?e:0))&&0===e&&i.setSelectionRange(i.value.length,i.value.length)}))},[j,S,C,N]),(0,$.useWatch)(([e],[t])=>{if(e===eb.Open&&t===eb.Closed){if(l.state.isTyping)return;let e=y.current;if(!e)return;let t=e.value,{selectionStart:s,selectionEnd:n,selectionDirection:i}=e;e.value="",e.value=t,null!==i?e.setSelectionRange(s,n,i):e.setSelectionRange(s,n)}},[S]);let R=(0,o.useRef)(!1),L=(0,I.useEvent)(()=>{R.current=!0}),O=(0,I.useEvent)(()=>{k.nextFrame(()=>{R.current=!1})}),M=(0,I.useEvent)(e=>{switch(l.actions.setIsTyping(!0),e.key){case ec.Keys.Enter:if(l.state.comboboxState!==eb.Open||R.current)return;if(e.preventDefault(),e.stopPropagation(),null===l.selectors.activeOptionIndex(l.state))return void l.actions.closeCombobox();l.actions.selectActiveOption(),i.mode===eg.Single&&l.actions.closeCombobox();break;case ec.Keys.ArrowDown:return e.preventDefault(),e.stopPropagation(),(0,er.match)(l.state.comboboxState,{[eb.Open]:()=>l.actions.goToOption({focus:el.Focus.Next}),[eb.Closed]:()=>l.actions.openCombobox()});case ec.Keys.ArrowUp:return e.preventDefault(),e.stopPropagation(),(0,er.match)(l.state.comboboxState,{[eb.Open]:()=>l.actions.goToOption({focus:el.Focus.Previous}),[eb.Closed]:()=>{(0,u.flushSync)(()=>l.actions.openCombobox()),i.value||l.actions.goToOption({focus:el.Focus.Last})}});case ec.Keys.Home:if(e.shiftKey)break;return e.preventDefault(),e.stopPropagation(),l.actions.goToOption({focus:el.Focus.First});case ec.Keys.PageUp:return e.preventDefault(),e.stopPropagation(),l.actions.goToOption({focus:el.Focus.First});case ec.Keys.End:if(e.shiftKey)break;return e.preventDefault(),e.stopPropagation(),l.actions.goToOption({focus:el.Focus.Last});case ec.Keys.PageDown:return e.preventDefault(),e.stopPropagation(),l.actions.goToOption({focus:el.Focus.Last});case ec.Keys.Escape:return l.state.comboboxState!==eb.Open?void 0:(e.preventDefault(),l.state.optionsElement&&!i.optionsPropsRef.current.static&&e.stopPropagation(),i.mode===eg.Single&&null===i.value&&E(),l.actions.closeCombobox());case ec.Keys.Tab:if(l.state.comboboxState!==eb.Open)return;i.mode===eg.Single&&l.state.activationTrigger!==ey.Focus&&l.actions.selectActiveOption(),l.actions.closeCombobox()}}),F=(0,I.useEvent)(e=>{null==m||m(e),i.mode===eg.Single&&""===e.target.value&&E(),l.actions.openCombobox()}),_=(0,I.useEvent)(e=>{var t,s,n;let r=null!=(t=e.relatedTarget)?t:es.history.find(t=>t!==e.currentTarget);if(!(null!=(s=l.state.optionsElement)&&s.contains(r))&&!(null!=(n=l.state.buttonElement)&&n.contains(r))&&l.state.comboboxState===eb.Open)return e.preventDefault(),i.mode===eg.Single&&null===i.value&&E(),l.actions.closeCombobox()}),D=(0,I.useEvent)(e=>{var t,s,n;let r=null!=(t=e.relatedTarget)?t:es.history.find(t=>t!==e.currentTarget);null!=(s=l.state.buttonElement)&&s.contains(r)||null!=(n=l.state.optionsElement)&&n.contains(r)||i.disabled||i.immediate&&l.state.comboboxState!==eb.Open&&k.microTask(()=>{(0,u.flushSync)(()=>l.actions.openCombobox()),l.actions.setActivationTrigger(ey.Focus)})}),A=(0,ed.useLabelledBy)(),B=(0,eu.useDescribedBy)(),{isFocused:z,focusProps:W}=(0,r.useFocusRing)({autoFocus:x}),{isHovered:H,hoverProps:K}=(0,a.useHover)({isDisabled:h}),G=(0,et.useSlice)(l,e=>e.optionsElement),U=(0,o.useMemo)(()=>({open:S===eb.Open,disabled:h,invalid:i.invalid,hover:H,focus:z,autofocus:x}),[i,H,z,x,h,i.invalid]),Z=(0,eo.mergeProps)({ref:w,id:p,role:"combobox",type:v,"aria-controls":null==G?void 0:G.id,"aria-expanded":S===eb.Open,"aria-activedescendant":(0,et.useSlice)(l,l.selectors.activeDescendantId),"aria-labelledby":A,"aria-describedby":B,"aria-autocomplete":"list",defaultValue:null!=(n=null!=(s=e.defaultValue)?s:void 0!==i.defaultValue?null==f?void 0:f(i.defaultValue):null)?n:i.defaultValue,disabled:h||void 0,autoFocus:x,onCompositionStart:L,onCompositionEnd:O,onKeyDown:M,onChange:F,onFocus:D,onBlur:_},W,K);return(0,eo.useRender)()({ourProps:Z,theirProps:b,slot:U,defaultTag:"input",name:"Combobox.Input"})}),eA=ed.Label,eB=(0,eo.forwardRefWithAs)(function(e,t){var s,n,l;let i=(0,o.useId)(),{id:r=`headlessui-combobox-options-${i}`,hold:a=!1,anchor:u,portal:c=!1,modal:d=!0,transition:p=!1,...m}=e,f=ej("Combobox.Options"),h=eI("Combobox.Options"),x=(0,J.useResolvedAnchor)(u);x&&(c=!0);let[v,b]=(0,J.useFloatingPanel)(x),[g,y]=(0,o.useState)(null),w=(0,J.useFloatingPanelProps)(),C=(0,V.useSyncRefs)(t,x?v:null,f.actions.setOptionsElement,y),[S,N,k,E,j]=(0,et.useSlice)(f,e=>[e.comboboxState,e.inputElement,e.buttonElement,e.optionsElement,e.activationTrigger]),T=(0,P.useOwnerDocument)(N||k),M=(0,P.useOwnerDocument)(E),_=(0,Y.useOpenClosed)(),[D,A]=(0,G.useTransition)(p,g,null!==_?(_&Y.State.Open)===Y.State.Open:S===eb.Open);(0,F.useOnDisappear)(D,N,f.actions.closeCombobox);let B=!h.__demoMode&&d&&S===eb.Open;(0,H.useScrollLock)(B,M);let z=!h.__demoMode&&d&&S===eb.Open;(0,L.useInertOthers)(z,{allowed:(0,o.useCallback)(()=>
4[N,k,E],[N,k,E])}),(0,O.useIsoMorphicEffect)(()=>{var t;h.optionsPropsRef.current.static=null!=(t=e.static)&&t},[h.optionsPropsRef,e.static]),(0,O.useIsoMorphicEffect)(()=>{h.optionsPropsRef.current.hold=a},[h.optionsPropsRef,a]),(0,U.useTreeWalker)(S===eb.Open,{container:E,accept:e=>"option"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let W=(0,ed.useLabelledBy)([null==k?void 0:k.id]),K=(0,o.useMemo)(()=>({open:S===eb.Open,option:void 0}),[S]),$=(0,I.useEvent)(()=>{f.actions.setActivationTrigger(ey.Pointer)}),Z=(0,I.useEvent)(e=>{e.preventDefault(),f.actions.setActivationTrigger(ey.Pointer)}),q=(0,eo.mergeProps)(x?w():{},{"aria-labelledby":W,role:"listbox","aria-multiselectable":h.mode===eg.Multi||void 0,id:r,ref:C,style:{...m.style,...b,"--input-width":(0,R.useElementSize)(N,!0).width,"--button-width":(0,R.useElementSize)(k,!0).width},onWheel:j===ey.Pointer?void 0:$,onMouseDown:Z,...(0,G.transitionDataAttributes)(A)}),X=D&&S===eb.Closed,ee=(0,Q.useFrozenData)(X,null==(s=h.virtual)?void 0:s.options),es=(0,Q.useFrozenData)(X,h.value),en=(0,I.useEvent)(e=>h.compare(es,e)),el=(0,o.useMemo)(()=>{if(!h.virtual)return h;if(void 0===ee)throw Error("Missing `options` in virtual mode");return ee!==h.virtual.options?{...h,virtual:{...h.virtual,options:ee}}:h},[h,ee,null==(n=h.virtual)?void 0:n.options]);h.virtual&&Object.assign(m,{children:o.default.createElement(eR.Provider,{value:el},o.default.createElement(eO,{slot:K},m.children))});let ei=(0,eo.useRender)(),er=(0,o.useMemo)(()=>h.mode===eg.Multi?h:{...h,isSelected:en},[h,en]);return o.default.createElement(em.Portal,{enabled:!!c&&(e.static||D),ownerDocument:T},o.default.createElement(eR.Provider,{value:er},ei({ourProps:q,theirProps:{...m,children:o.default.createElement(Q.Frozen,{freeze:X},"function"==typeof m.children?null==(l=m.children)?void 0:l.call(m,K):m.children)},slot:K,defaultTag:"div",features:eF,visible:D,name:"Combobox.Options"}
4)))}),ez=(0,eo.forwardRefWithAs)(function(e,t){var s,n,l;let i=eI("Combobox.Option"),r=ej("Combobox.Option"),a=(0,o.useId)(),{id:u=`headlessui-combobox-option-${a}`,value:c,disabled:d=null!=(l=null==(n=null==(s=i.virtual)?void 0:s.disabled)?void 0:n.call(s,c))&&l,order:p=null,...m}=e,[f]=(0,et.useSlice)(r,e=>[e.inputElement]),h=z(f),x=(0,et.useSlice)(r,(0,o.useCallback)(e=>r.selectors.isActive(e,c,u),[c,u])),v=i.isSelected(c),b=(0,o.useRef)(null),g=(0,M.useLatestValue)({disabled:d,value:c,domRef:b,order:p}),y=(0,o.useContext)(eL),w=(0,V.useSyncRefs)(t,b,y?y.measureElement:null),C=(0,I.useEvent)(()=>{r.actions.setIsTyping(!1),r.actions.onChange(c)});(0,O.useIsoMorphicEffect)(()=>r.actions.registerOption(u,g),[g,u]);let S=(0,et.useSlice)(r,(0,o.useCallback)(e=>r.selectors.shouldScrollIntoView(e,c,u),[c,u]));(0,O.useIsoMorphicEffect)(()=>{if(S)return(0,ei.disposables)().requestAnimationFrame(()=>{var e,t;null==(t=null==(e=b.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})})},[S,b]);let N=(0,I.useEvent)(e=>{e.preventDefault(),e.button===ep.Left&&(d||(C(),(0,ea.isMobile)()||requestAnimationFrame(()=>h()),i.mode===eg.Single&&r.actions.closeCombobox()))}),k=(0,I.useEvent)(()=>{if(d)return r.actions.goToOption({focus:el.Focus.Nothing});let e=i.calculateIndex(c);r.actions.goToOption({focus:el.Focus.Specific,idx:e})}),E=(0,K.useTrackedPointer)(),j=(0,I.useEvent)(e=>E.update(e)),T=(0,I.useEvent)(e=>{if(!E.wasMoved(e)||d||x)return;let t=i.calculateIndex(c);r.actions.goToOption({focus:el.Focus.Specific,idx:t},ey.Pointer)}),R=(0,I.useEvent)(e=>{E.wasMoved(e)&&(d||x&&(i.optionsPropsRef.current.hold||r.actions.goToOption({focus:el.Focus.Nothing})))}),L=(0,o.useMemo)(()=>({active:x,focus:x,selected:v,disabled:d}),[x,v,d]);return(0,eo.useRender)()({ourProps:{id:u,ref:w,role:"option",tabIndex:!0===d?void 0:-1,"aria-disabled":!0===d||void 0,"aria-selected":v,disabled:void 0,onMouseDown:N,onFocus:k,onPointerEnter:j,onMouseEnter:j,onPointerMove:T,onMouseMove:T,onPointerLeave:R,onMouseLeave:R},theirProps:m,slot:L,defaultTag:"div",name:"Combobox.Option"})}),eW=Object.assign(e_,{Input:eD,Button:eP,Label:eA,Options:eB,Option:ez});e.s(["Combobox",0,eW,"ComboboxButton",0,eP,"ComboboxInput",0,eD,"ComboboxLabel",0,eA,"ComboboxOption",0,ez,"ComboboxOptions",0,eB],762630)},476481,e=>{"use strict";var t=e.i(429427),s=e.i(371330),n=e.i(271645),l=e.i(394487),i=e.i(700020);let r=n.Fragment,a=(0,i.forwardRefWithAs)(function(e,a){let{...o}=e,{isFocusVisible:u,focusProps:c}=(0,t.useFocusRing)(),{isHovered:d,hoverProps:p}=(0,s.useHover)({isDisabled:!1}),{pressed:m,pressProps:f}=(0,l.useActivePress)({disabled:!1}),h=(0,i.mergeProps)({ref:a},c,p,f),x=(0,n.useMemo)(()=>({hover:d,focus:u,active:m}),[d,u,m]);return(0,i.useRender)()({ourProps:h,theirProps:o,slot:x,defaultTag:r,name:"DataInteractive"})});e.s(["DataInteractive",0,a])},886148,e=>{"use strict";let t,s;var n,l=e.i(429427),i=e.i(371330),r=e.i(271645),a=e.i(394487),o=e.i(914189),u=e.i(144279),c=e.i(294316),d=e.i(83733),p=e.i(674175),m=e.i(233137),f=e.i(233538),h=e.i(813581),x=e.i(397701),v=e.i(402155),b=e.i(700020);let g=null!=(n=r.default.startTransition)?n:function(e){e()};var y=e.i(998348),w=((t=w||{})[t.Open=0]="Open",t[t.Closed=1]="Closed",t),C=((s=C||{})[s.ToggleDisclosure=0]="ToggleDisclosure",s[s.CloseDisclosure=1]="CloseDisclosure",s[s.SetButtonId=2]="SetButtonId",s[s.SetPanelId=3]="SetPanelId",s[s.SetButtonElement=4]="SetButtonElement",s[s.SetPanelElement=5]="SetPanelElement",s);let S={0:e=>({...e,disclosureState:(0,x.match)(e.disclosureState,{0:1,1:0})}),1:e=>1===e.disclosureState?e:{...e,disclosureState:1},2:(e,t)=>e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId},3:(e,t)=>e.panelId===t.panelId?e:{...e,panelId:t.panelId},4:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},5:(e,t)=>e.panelElement===t.element?e:{...e,panelElement:t.element}},N=(0,r.createContext)(null);function k(e){let t=(0,r.useContext)(N);if(null===t){let t=Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,k),t}return t}N.displayName="DisclosureContext";let E=(0,r.createContext)(null);E.displayName="DisclosureAPIContext";let j=(0,r.createContext)(null);function T(e,t){return(0,x.match)(t.type,S,e,t)}j.displayName="DisclosurePanelContext";let R=r.Fragment,I=b.RenderFeatures.RenderStrategy|b.RenderFeatures.Static,L=(0,b.forwardRefWithAs)(function(e,t){let{defaultOpen:s=!1,...n}=e,l=(0,r.useRef)(null),i=(0,c.useSyncRefs)(t,(0,c.optionalRef)(e=>{l.current=e},void 0===e.as||e.as===r.Fragment)),a=(0,r.useReducer)(T,{disclosureState:+!s,buttonElement:null,panelElement:null,buttonId:null,panelId:null}),[{disclosureState:u,buttonId:d},f]=a,g=(0,o.useEvent)(e=>{f({type:1});let t=(0,v.getOwnerDocument)(l);if(!t||!d)return;let s=e?h.isHTMLorSVGElement(e)?e:"current"in e&&h.isHTMLorSVGElement(e.current)?e.current:t.getElementById(d):t.getElementById(d);null==s||s.focus()}),y=(0,r.useMemo)(()=>({close:g}),[g]),w=(0,r.useMemo)(()=>({open:0===u,close:g}),[u,g]),C=(0,b.useRender)();return r.default.createElement(N.Provider,{value:a},r.default.createElement(E.Provider,{value:y},r.default.createElement(p.CloseProvider,{value:g},r.default.createElement(m.OpenClosedProvider,{value:(0,x.match)(u,{0:m.State.Open,1:m.State.Closed})},C({ourProps:{ref:i},theirProps:n,slot:w,defaultTag:R,name:"Disclosure"})))))}),O=(0,b.forwardRefWithAs)(function(e,t){let s=(0,r.useId)(),{id:n=`headlessui-disclosure-button-${s}`,disabled:d=!1,autoFocus:p=!1,...m}=e,[h,x]=k("Disclosure.Button"),v=(0,r.useContext)(j),g=null!==v&&v===h.panelId,w=(0,r.useRef)(null),C=(0,c.useSyncRefs)(w,t,(0,o.useEvent)(e=>{if(!g)return x({type:4,element:e})}));(0,r.useEffect)(()=>
4{if(!g)return x({type:2,buttonId:n}),()=>{x({type:2,buttonId:null})}},[n,x,g]);let S=(0,o.useEvent)(e=>{var t;if(g){if(1===h.disclosureState)return;switch(e.key){case y.Keys.Space:case y.Keys.Enter:e.preventDefault(),e.stopPropagation(),x({type:0}),null==(t=h.buttonElement)||t.focus()}}else switch(e.key){case y.Keys.Space:case y.Keys.Enter:e.preventDefault(),e.stopPropagation(),x({type:0})}}),N=(0,o.useEvent)(e=>{e.key===y.Keys.Space&&e.preventDefault()}),E=(0,o.useEvent)(e=>{var t;(0,f.isDisabledReactIssue7711)(e.currentTarget)||d||(g?(x({type:0}),null==(t=h.buttonElement)||t.focus()):x({type:0}))}),{isFocusVisible:T,focusProps:R}=(0,l.useFocusRing)({autoFocus:p}),{isHovered:I,hoverProps:L}=(0,i.useHover)({isDisabled:d}),{pressed:O,pressProps:M}=(0,a.useActivePress)({disabled:d}),F=(0,r.useMemo)(()=>({open:0===h.disclosureState,hover:I,active:O,disabled:d,focus:T,autofocus:p}),[h,I,O,T,d,p]),_=(0,u.useResolveButtonType)(e,h.buttonElement),P=g?(0,b.mergeProps)({ref:C,type:_,disabled:d||void 0,autoFocus:p,onKeyDown:S,onClick:E},R,L,M):(0,b.mergeProps)({ref:C,id:n,type:_,"aria-expanded":0===h.disclosureState,"aria-controls":h.panelElement?h.panelId:void 0,disabled:d||void 0,autoFocus:p,onKeyDown:S,onKeyUp:N,onClick:E},R,L,M);return(0,b.useRender)()({ourProps:P,theirProps:m,slot:F,defaultTag:"button",name:"Disclosure.Button"})}),M=(0,b.forwardRefWithAs)(function(e,t){let s=(0,r.useId)(),{id:n=`headlessui-disclosure-panel-${s}`,transition:l=!1,...i}=e,[a,u]=k("Disclosure.Panel"),{close:p}=function e(t){let s=(0,r.useContext)(E);if(null===s){let s=Error(`<${t} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(s,e),s}return s}("Disclosure.Panel"),[f,h]=(0,r.useState)(null),x=(0,c.useSyncRefs)(t,(0,o.useEvent)(e=>{g(()=>u({type:5,element:e}))}),h);(0,r.useEffect)(()=>(u({type:3,panelId:n}),()=>{u({type:3,panelId:null})}),[n,u]);let v=(0,m.useOpenClosed)(),[y,w]=(0,d.useTransition)(l,f,null!==v?(v&m.State.Open)===m.State.Open:0===a.disclosureState),C=(0,r.useMemo)(()=>({open:0===a.disclosureState,close:p}),[a.disclosureState,p]),S={ref:x,id:n,...(0,d.transitionDataAttributes)(w)},N=(0,b.useRender)();return r.default.createElement(m.ResetOpenClosedProvider,null,r.default.createElement(j.Provider,{value:a.panelId},N({ourProps:S,theirProps:i,slot:C,defaultTag:"div",features:I,visible:y,name:"Disclosure.Panel"})))}),F=Object.assign(L,{Button:O,Panel:M});e.s(["Disclosure",0,F,"DisclosureButton",0,O,"DisclosurePanel",0,M],886148)},639100,e=>{"use strict";var t=e.i(271645),s=e.i(601893),n=e.i(140721),l=e.i(942803),i=e.i(700020),r=e.i(35889),a=e.i(722678);let o=(0,i.forwardRefWithAs)(function(e,o){let u=`headlessui-control-${(0,t.useId)()}`,[c,d]=(0,a.useLabels)(),[p,m]=(0,r.useDescriptions)(),f=(0,s.useDisabled)(),{disabled:h=f||!1,...x}=e,v=(0,t.useMemo)(()=>({disabled:h}),[h]),b=(0,i.useRender)();return t.default.createElement(s.DisabledProvider,{value:h},t.default.createElement(d,{value:c},t.default.createElement(m,{value:p},t.default.createElement(l.IdProvider,{id:u},b({ourProps:{ref:o,disabled:h||void 0,"aria-disabled":h||void 0},theirProps:{...x,children:t.default.createElement(n.FormFieldsProvider,null,"function"==typeof x.children?x.children(v):x.children)},slot:v,defaultTag:"div",name:"Field"})))))});e.s(["Field",0,o])},98631,e=>{"use strict";var t=e.i(271645),s=e.i(813581),n=e.i(294316),l=e.i(601893),i=e.i(700020),r=e.i(722678);let a="fieldset",o=(0,i.forwardRefWithAs)(function(e,o){var u;let c=(0,l.useDisabled)(),{disabled:d=c||!1,...p}=e,[m,f]=function(e){let n="string"==typeof e?e:void 0,[l,i]=(0,t.useState)(n);return[null!=n?n:l,(0,t.useCallback)(e=>{n||s.isHTMLElement(e)&&i(e.tagName.toLowerCase())},[n])]}
4(null!=(u=e.as)?u:a),h=(0,n.useSyncRefs)(o,f),[x,v]=(0,r.useLabels)(),b=(0,t.useMemo)(()=>({disabled:d}),[d]),g="fieldset"===m?{ref:h,"aria-labelledby":x,disabled:d||void 0}:{ref:h,role:"group","aria-labelledby":x,"aria-disabled":d||void 0},y=(0,i.useRender)();return t.default.createElement(l.DisabledProvider,{value:d},t.default.createElement(v,null,y({ourProps:g,theirProps:p,slot:b,defaultTag:a,name:"Fieldset"})))});e.s(["Fieldset",0,o],98631)},813589,e=>{"use strict";var t=e.i(429427),s=e.i(371330),n=e.i(271645),l=e.i(601893),i=e.i(942803),r=e.i(700020),a=e.i(35889),o=e.i(722678);let u=(0,r.forwardRefWithAs)(function(e,u){let c=(0,n.useId)(),d=(0,i.useProvidedId)(),p=(0,l.useDisabled)(),{id:m=d||`headlessui-input-${c}`,disabled:f=p||!1,autoFocus:h=!1,invalid:x=!1,...v}=e,b=(0,o.useLabelledBy)(),g=(0,a.useDescribedBy)(),{isFocused:y,focusProps:w}=(0,t.useFocusRing)({autoFocus:h}),{isHovered:C,hoverProps:S}=(0,s.useHover)({isDisabled:f}),N=(0,r.mergeProps)({ref:u,id:m,"aria-labelledby":b,"aria-describedby":g,"aria-invalid":x?"true":void 0,disabled:f||void 0,autoFocus:h},w,S),k=(0,n.useMemo)(()=>({disabled:f,invalid:x,hover:C,focus:y,autofocus:h}),[f,x,C,y,h]);return(0,r.useRender)()({ourProps:N,theirProps:v,slot:k,defaultTag:"input",name:"Input"})});e.s(["Input",0,u])},722678,942803,e=>{"use strict";var t=e.i(271645),s=e.i(914189),n=e.i(835696),l=e.i(294316),i=e.i(601893);let r=(0,t.createContext)(void 0);function a(){return(0,t.useContext)(r)}e.s(["IdProvider",0,function({id:e,children:s}){return t.default.createElement(r.Provider,{value:e},s)},"useProvidedId",0,a],942803);var o=e.i(813581),u=e.i(700020);let c=(0,t.createContext)(null);function d(){let e=(0,t.useContext)(c);if(null===e){let e=Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,d),e}return e}function p(e){var s,n,l;let i=null!=(n=null==(s=(0,t.useContext)(c))?void 0:s.value)?n:void 0;return(null!=(l=null==e?void 0:e.length)?l:0)>0?[i,...e].filter(Boolean).join(" "):i}c.displayName="LabelContext";let m=Object.assign((0,u.forwardRefWithAs)(function(e,r){var c;let p=(0,t.useId)(),m=d(),f=a(),h=(0,i.useDisabled)(),{id:x=`headlessui-label-${p}`,htmlFor:v=null!=f?f:null==(c=m.props)?void 0:c.htmlFor,passive:b=!1,...g}=e,y=(0,l.useSyncRefs)(r);(0,n.useIsoMorphicEffect)(()=>m.register(x),[x,m.register]);let w=(0,s.useEvent)(e=>{let t=e.currentTarget;if(!(e.target!==e.currentTarget&&o.isInteractiveElement(e.target))&&(o.isHTMLLabelElement(t)&&e.preventDefault(),m.props&&"onClick"in m.props&&"function"==typeof m.props.onClick&&m.props.onClick(e),o.isHTMLLabelElement(t))){let e=document.getElementById(t.htmlFor);if(e){let t=e.getAttribute("disabled");if("true"===t||""===t)return;let s=e.getAttribute("aria-disabled");if("true"===s||""===s)return;(o.isHTMLInputElement(e)&&("file"===e.type||"radio"===e.type||"checkbox"===e.type)||"radio"===e.role||"checkbox"===e.role||"switch"===e.role)&&e.click(),e.focus({preventScroll:!0})}}}),C=h||!1,S=(0,t.useMemo)(()=>({...m.slot,disabled:C}),[m.slot,C]),N={ref:y,...m.props,id:x,htmlFor:v,onClick:w};return b&&("onClick"in N&&(delete N.htmlFor,delete N.onClick),"onClick"in g&&delete g.onClick),(0,u.useRender)()({ourProps:N,theirProps:g,slot:S,defaultTag:v?"label":"div",name:m.name||"Label"})}),{});e.s(["Label",0,m,"useLabelContext",0,d,"useLabelledBy",0,p,"useLabels",0,function({inherit:e=!1}={}){let n=p(),[l,i]=(0,t.useState)([]),r=e?[n,...l].filter(Boolean):l;return[r.length>0?r.join(" "):void 0,(0,t.useMemo)(()=>function(e){let n=(0,s.useEvent)(e=>(i(t=>[...t,e]),()=>i(t=>{let s=t.slice(),n=s.indexOf(e);return -1!==n&&s.splice(n,1),s}))),l=(0,t.useMemo)(()=>({register:n,slot:e.slot,name:e.name,props:e.props,value:e.value}),[n,e.slot,e.name,e.props,e.value]);return t.default.createElement(c.Provider,{value:l},e.children)},[i])]}],722678)},758246,e=>{"use strict";var t=e.i(271645),s=e.i(700020),n=e.i(722678);n.Label;let l=(0,s.forwardRefWithAs)(function(e,s){return t.default.createElement(n.Label,{as:"div",ref:s,...e})});e.s(["Legend",0,l])},495470,e=>{"use strict";let t,s,n,l;var i=e.i(429427),r=e.i(371330),a=e.i(271645),o=e.i(174080),u=e.i(394487),c=e.i(436289),d=e.i(503269),p=e.i(214520),m=e.i(814379),f=e.i(746725),h=e.i(992704),x=e.i(914189),v=e.i(684653),b=e.i(835696),g=e.i(941444),y=e.i(877891),w=e.i(952744),C=e.i(605083),S=e.i(157138),N=e.i(144279),k=e.i(101852),E=e.i(294316),j=e.i(249578),T=e.i(571616),R=e.i(83733),I=e.i(601893),L=e.i(919751),O=e.i(140721),M=e.i(904016),F=e.i(942803),_=e.i(233137),P=e.i(341650),D=e.i(140407),A=e.i(233538),B=e.i(65659),z=e.i(544508),W=e.i(813581),H=e.i(652265),V=e.i(694421),K=e.i(397701),G=e.i(402155),U=e.i(700020),$=e.i(35889),Z=e.i(998348),J=e.i(722678),q=e.i(635307),Q=e.i(825720),X=Object.defineProperty,Y=(e,t,s)=>{let n;return(n="symbol"!=typeof t?t+"":t)in e?X(e,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[n]=s,s},ee=((t=ee||{})[t.Open=0]="Open",t[t.Closed=1]="Closed",t),et=((s=et||{})[s.Single=0]="Single",s[s.Multi=1]="Multi",s),es=((n=es||{})[n.Pointer=0]="Pointer",n[n.Other=1]="Other",n),en=((l=en||{})[l.OpenListbox=0]="OpenListbox",l[l.CloseListbox=1]="CloseListbox",l[l.GoToOption=2]="GoToOption",l[l.Search=3]="Search",l[l.ClearSearch=4]="ClearSearch",l[l.RegisterOptions=5]="RegisterOptions",l[l.UnregisterOptions=6]="UnregisterOptions",l[l.SetButtonElement=7]="SetButtonElement",l[l.SetOptionsElement=8]="SetOptionsElement",l[l.SortOptions=9]="SortOptions",l);function el(e,t=e=>e){let s=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,n=(0,H.sortByDomNode)(t(e.options.slice()),e=>e.dataRef.current.domRef.current),l=s?n.indexOf(s):null;return -1===l&&(l=null),{options:n,activeOptionIndex:l}}let ei={1:e=>e.dataRef.current.disabled||1===e.listboxState?e:{...e,activeOptionIndex:null,pendingFocus:{focus:B.Focus.Nothing},listboxState:1,__demoMode:!1},0(e,t){if(e.dataRef.current.disabled||0===e.listboxState)return e;let s=e.activeOptionIndex,{isSelected:n}=e.dataRef.current,l=e.options.findIndex(e=>n(e.dataRef.current.value));return -1!==l&&(s=l),{...e,pendingFocus:t.focus,listboxState:0,activeOptionIndex:s,__demoMode:!1}},2(e,t){var s,n,l,i,r;if(e.dataRef.current.disabled||1===e.listboxState)return e;let a={...e,searchQuery:"",activationTrigger:null!=(s=t.trigger)?s:1,__demoMode:!1};if(t.focus===B.Focus.Nothing)return{...a,activeOptionIndex:null};if(t.focus===B.Focus.Specific)return{...a,activeOptionIndex:e.options.findIndex(e=>e.id===t.id)};if(t.focus===B.Focus.Previous){let s=e.activeOptionIndex;if(null!==s){let i=e.options[s].dataRef.current.domRef,r=(0,B.calculateActiveIndex)(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==r){let t=e.options[r].dataRef.current.domRef;if((null==(n=i.current)?void 0:n.previousElementSibling)===t.current||(null==(l=t.current)?void 0:l.previousElementSibling)===null)return{...a,activeOptionIndex:r}}}}else if(t.focus===B.Focus.Next){let s=e.activeOptionIndex;if(null!==s){let n=e.options[s].dataRef.current.domRef,l=(0,B.calculateActiveIndex)(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==l){let t=e.options[l].dataRef.current.domRef;if((null==(i=n.current)?void 0:i.nextElementSibling)===t.current||(null==(r=t.current)?void 0:r.nextElementSibling)===null)return{...a,activeOptionIndex:l}}}}let o=el(e),u=(0,B.calculateActiveIndex)(t,{resolveItems:()=>o.options,resolveActiveIndex:()=>o.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...a,...o,activeOptionIndex:u}},3:(e,t)=>
4{if(e.dataRef.current.disabled||1===e.listboxState)return e;let s=+(""===e.searchQuery),n=e.searchQuery+t.value.toLowerCase(),l=(null!==e.activeOptionIndex?e.options.slice(e.activeOptionIndex+s).concat(e.options.slice(0,e.activeOptionIndex+s)):e.options).find(e=>{var t;return!e.dataRef.current.disabled&&(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(n))}),i=l?e.options.indexOf(l):-1;return -1===i||i===e.activeOptionIndex?{...e,searchQuery:n}:{...e,searchQuery:n,activeOptionIndex:i,activationTrigger:1}},4:e=>e.dataRef.current.disabled||1===e.listboxState||""===e.searchQuery?e:{...e,searchQuery:""},5:(e,t)=>{let s=e.options.concat(t.options),n=e.activeOptionIndex;if(e.pendingFocus.focus!==B.Focus.Nothing&&(n=(0,B.calculateActiveIndex)(e.pendingFocus,{resolveItems:()=>s,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled})),null===e.activeOptionIndex){let{isSelected:t}=e.dataRef.current;if(t){let e=s.findIndex(e=>null==t?void 0:t(e.dataRef.current.value));-1!==e&&(n=e)}}return{...e,options:s,activeOptionIndex:n,pendingFocus:{focus:B.Focus.Nothing},pendingShouldSort:!0}},6:(e,t)=>{let s=e.options,n=[],l=new Set(t.options);for(let[e,t]of s.entries())if(l.has(t.id)&&(n.push(e),l.delete(t.id),0===l.size))break;if(n.length>0)for(let e of(s=s.slice(),n.reverse()))s.splice(e,1);return{...e,options:s,activationTrigger:1}},7:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},8:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element},9:e=>e.pendingShouldSort?{...e,...el(e),pendingShouldSort:!1}:e};class er extends Q.Machine{constructor(e){super(e),Y(this,"actions",{onChange:e=>{let{onChange:t,compare:s,mode:n,value:l}=this.state.dataRef.current;return(0,K.match)(n,{0:()=>null==t?void 0:t(e),1:()=>{let n=l.slice(),i=n.findIndex(t=>s(t,e));return -1===i?n.push(e):n.splice(i,1),null==t?void 0:t(n)}})},registerOption:(0,Q.batch)(()=>{let e=[],t=new Set;return[(s,n)=>{t.has(n)||(t.add(n),e.push({id:s,dataRef:n}))},()=>(t.clear(),this.send({type:5,options:e.splice(0)}))]}),unregisterOption:(0,Q.batch)(()=>{let e=[];return[t=>e.push(t),()=>{this.send({type:6,options:e.splice(0)})}]}),goToOption:(0,Q.batch)(()=>{let e=null;return[(t,s)=>{e={type:2,...t,trigger:s}},()=>e&&this.send(e)]}),closeListbox:()=>{this.send({type:1})},openListbox:e=>{this.send({type:0,focus:e})},selectActiveOption:()=>{if(null!==this.state.activeOptionIndex){let{dataRef:e,id:t}=this.state.options[this.state.activeOptionIndex];this.actions.onChange(e.current.value),this.send({type:2,focus:B.Focus.Specific,id:t})}},selectOption:e=>{let t=this.state.options.find(t=>t.id===e);t&&this.actions.onChange(t.dataRef.current.value)},search:e=>{this.send({type:3,value:e})},clearSearch:()=>{this.send({type:4})},setButtonElement:e=>{this.send({type:7,element:e})},setOptionsElement:e=>{this.send({type:8,element:e})}}),Y(this,"selectors",{activeDescendantId(e){var t;let s=e.activeOptionIndex,n=e.options;return null===s||null==(t=n[s])?void 0:t.id},isActive(e,t){var s;let n=e.activeOptionIndex,l=e.options;return null!==n&&(null==(s=l[n])?void 0:s.id)===t},shouldScrollIntoView(e,t){return!e.__demoMode&&0===e.listboxState&&0!==e.activationTrigger&&this.isActive(e,t)}}),this.on(5,()=>{requestAnimationFrame(()=>{this.send({type:9})})});{let e=this.state.id,t=P.stackMachines.get(null);this.disposables.add(t.on(P.ActionTypes.Push,s=>{t.selectors.isTop(s,e)||0!==this.state.listboxState||this.actions.closeListbox()})),this.on(0,()=>t.actions.push(e)),this.on(1,()=>t.actions.pop(e))}}static new({id:e,__demoMode:t=!1}){return new er({id:e,dataRef:{current:{}},listboxState:+!t,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,buttonElement:null,optionsElement:null,pendingShouldSort:!1,pendingFocus:{focus:B.Focus.Nothing},__demoMode:t})}reduce(e,t){return(0,K.match)(t.type,ei,e,t)}}var ea=e.i(526599);let eo=(0,a.createContext)(null);function eu(e){let t=(0,a.useContext)(eo);if(null===t){let t=Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,ec),t}return t}function ec({id:e,__demoMode:t=!1}){let s=(0,a.useMemo)(()=>er.new({id:e,__demoMode:t}),[]);return(0,ea.useOnUnmount)(()=>s.dispose()),s}let ed=(0,a.createContext)(null);function ep(e){let t=(0,a.useContext)(ed);if(null===t){let t=Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,ep),t}return t}ed.displayName="ListboxDataContext";let em=a.Fragment,ef=(0,a.createContext)(!1),eh=U.RenderFeatures.RenderStrategy|U.RenderFeatures.Static,ex=a.Fragment,ev=(0,U.forwardRefWithAs)(function(e,t){let s=(0,a.useId)(),n=(0,I.useDisabled)(),{value:l,defaultValue:i,form:r,name:o,onChange:u,by:m,invalid:f=!1,disabled:h=n||!1,horizontal:x=!1,multiple:v=!1,__demoMode:g=!1,...y}=e,C=x?"horizontal":"vertical",S=(0,E.useSyncRefs)(t),N=(0,p.useDefaultValue)(i),[k=v?[]:void 0,j]=(0,d.useControllable)(l,u,N),T=ec({id:s,__demoMode:g}),R=(0,a.useRef)({static:!1,hold:!1}),M=(0,a.useRef)(new Map),F=(0,c.useByComparator)(m),A=(0,a.useCallback)(e=>(0,K.match)(B.mode,{[et.Multi]:()=>k.some(t=>F(t,e)),[et.Single]:()=>F(k,e)}),[k]),B=(0,a.useMemo)(()=>({value:k,disabled:h,invalid:f,mode:v?et.Multi:et.Single,orientation:C,onChange:j,compare:F,isSelected:A,optionsPropsRef:R,listRef:M}),[k,h,f,v,C,j,F,A,R,M]);(0,b.useIsoMorphicEffect)(()=>{T.state.dataRef.current=B},[B]);let z=(0,D.useSlice)(T,e=>e.listboxState),W=P.stackMachines.get(null),V=(0,D.useSlice)(W,(0,a.useCallback)(e=>W.selectors.isTop(e,s),[W,s])),[G,$]=(0,D.useSlice)(T,e=>[e.buttonElement,e.optionsElement]);(0,w.useOutsideClick)(V,[G,$],(e,t)=>{T.send({type:en.CloseListbox}),(0,H.isFocusableElement)(t,H.FocusableMode.Loose)||(e.preventDefault(),null==G||G.focus())});let Z=(0,a.useMemo)(()=>({open:z===ee.Open,disabled:h,invalid:f,value:k}),[z,h,f,k]),[q,Q]=(0,J.useLabels)({inherit:!0}),X=(0,a.useCallback)(()=>
4{if(void 0!==N)return null==j?void 0:j(N)},[j,N]),Y=(0,U.useRender)();return a.default.createElement(Q,{value:q,props:{htmlFor:null==G?void 0:G.id},slot:{open:z===ee.Open,disabled:h}},a.default.createElement(L.FloatingProvider,null,a.default.createElement(eo.Provider,{value:T},a.default.createElement(ed.Provider,{value:B},a.default.createElement(_.OpenClosedProvider,{value:(0,K.match)(z,{[ee.Open]:_.State.Open,[ee.Closed]:_.State.Closed})},null!=o&&null!=k&&a.default.createElement(O.FormFields,{disabled:h,data:{[o]:k},form:r,onReset:X}),Y({ourProps:{ref:S},theirProps:y,slot:Z,defaultTag:em,name:"Listbox"}))))))}),eb=(0,U.forwardRefWithAs)(function(e,t){let s=(0,a.useId)(),n=(0,F.useProvidedId)(),l=ep("Listbox.Button"),c=eu("Listbox.Button"),{id:d=n||`headlessui-listbox-button-${s}`,disabled:p=l.disabled||!1,autoFocus:m=!1,...f}=e,h=(0,E.useSyncRefs)(t,(0,L.useFloatingReference)(),c.actions.setButtonElement),v=(0,L.useFloatingReferenceProps)(),[b,g,y]=(0,D.useSlice)(c,e=>[e.listboxState,e.buttonElement,e.optionsElement]),w=b===ee.Open;(0,S.useQuickRelease)(w,{trigger:g,action:(0,a.useCallback)(e=>{if(null!=g&&g.contains(e.target))return S.Action.Ignore;let t=e.target.closest('[role="option"]:not([data-disabled])');return W.isHTMLElement(t)?S.Action.Select(t):null!=y&&y.contains(e.target)?S.Action.Ignore:S.Action.Close},[g,y]),close:c.actions.closeListbox,select:c.actions.selectActiveOption});let C=(0,x.useEvent)(e=>{switch(e.key){case Z.Keys.Enter:(0,V.attemptSubmit)(e.currentTarget);break;case Z.Keys.Space:case Z.Keys.ArrowDown:e.preventDefault(),c.actions.openListbox({focus:l.value?B.Focus.Nothing:B.Focus.First});break;case Z.Keys.ArrowUp:e.preventDefault(),c.actions.openListbox({focus:l.value?B.Focus.Nothing:B.Focus.Last})}}),k=(0,x.useEvent)(e=>{e.key===Z.Keys.Space&&e.preventDefault()}),j=(0,x.useEvent)(e=>{var t;if(0===e.button){if((0,A.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();c.state.listboxState===ee.Open?((0,o.flushSync)(()=>c.actions.closeListbox()),null==(t=c.state.buttonElement)||t.focus({preventScroll:!0})):(e.preventDefault(),c.actions.openListbox({focus:B.Focus.Nothing}))}}),T=(0,x.useEvent)(e=>e.preventDefault()),R=(0,J.useLabelledBy)([d]),I=(0,$.useDescribedBy)(),{isFocusVisible:O,focusProps:M}=(0,i.useFocusRing)({autoFocus:m}),{isHovered:_,hoverProps:P}=(0,r.useHover)({isDisabled:p}),{pressed:z,pressProps:H}=(0,u.useActivePress)({disabled:p}),K=(0,a.useMemo)(()=>({open:b===ee.Open,active:z||b===ee.Open,disabled:p,invalid:l.invalid,value:l.value,hover:_,focus:O,autofocus:m}),[b,l.value,p,_,O,z,l.invalid,m]),G=(0,D.useSlice)(c,e=>e.listboxState===ee.Open),q=(0,U.mergeProps)(v(),{ref:h,id:d,type:(0,N.useResolveButtonType)(e,g),"aria-haspopup":"listbox","aria-controls":null==y?void 0:y.id,"aria-expanded":G,"aria-labelledby":R,"aria-describedby":I,disabled:p||void 0,autoFocus:m,onKeyDown:C,onKeyUp:k,onKeyPress:T,onPointerDown:j},M,P,H);return(0,U.useRender)()({ourProps:q,theirProps:f,slot:K,defaultTag:"button",name:"Listbox.Button"})}),eg=J.Label,ey=(0,U.forwardRefWithAs)(function(e,t){let s=(0,a.useId)(),{id:n=`headlessui-listbox-options-${s}`,anchor:l,portal:i=!1,modal:r=!0,transition:u=!1,...c}=e,d=(0,L.useResolvedAnchor)(l),[p,b]=(0,a.useState)(null);d&&(i=!0);let g=ep("Listbox.Options"),w=eu("Listbox.Options"),[S,N,j,T]=(0,D.useSlice)(w,e=>[e.listboxState,e.buttonElement,e.optionsElement,e.__demoMode]),I=(0,C.useOwnerDocument)(N),O=(0,C.useOwnerDocument)(j),F=(0,_.useOpenClosed)(),[P,A]=(0,R.useTransition)(u,p,null!==F?(F&_.State.Open)===_.State.Open:S===ee.Open);(0,y.useOnDisappear)(P,N,w.actions.closeListbox);let z=!T&&r&&S===ee.Open;(0,k.useScrollLock)(z,O);let W=!T&&r&&S===ee.Open;(0,v.useInertOthers)(W,{allowed:(0,a.useCallback)(()=>[N,j],[N,j])});let V=S!==ee.Open,$=!(0,m.useDidElementMove)(V,N)&&P,J=P&&S===ee.Closed,Q=(0,M.useFrozenData)(J,g.value),X=(0,x.useEvent)(e=>g.compare(Q,e)),Y=(0,D.useSlice)(w,e=>{var t;if(null==d||!(null!=(t=null==d?void 0:d.to)&&t.includes("selection")))return null;let s=e.options.findIndex(e=>X(e.dataRef.current.value));return -1===s&&(s=0),s}),es=(()=>
4{if(null==d)return;if(null===Y)return{...d,inner:void 0};let e=Array.from(g.listRef.current.values());return{...d,inner:{listRef:{current:e},index:Y}}})(),[en,el]=(0,L.useFloatingPanel)(es),ei=(0,L.useFloatingPanelProps)(),er=(0,E.useSyncRefs)(t,d?en:null,w.actions.setOptionsElement,b),ea=(0,f.useDisposables)();(0,a.useEffect)(()=>{var e;j&&S===ee.Open&&j!==(null==(e=(0,G.getOwnerDocument)(j))?void 0:e.activeElement)&&(null==j||j.focus({preventScroll:!0}))},[S,j]);let eo=(0,x.useEvent)(e=>{var t,s;switch(ea.dispose(),e.key){case Z.Keys.Space:if(""!==w.state.searchQuery)return e.preventDefault(),e.stopPropagation(),w.actions.search(e.key);case Z.Keys.Enter:if(e.preventDefault(),e.stopPropagation(),null!==w.state.activeOptionIndex){let{dataRef:e}=w.state.options[w.state.activeOptionIndex];w.actions.onChange(e.current.value)}g.mode===et.Single&&((0,o.flushSync)(()=>w.actions.closeListbox()),null==(t=w.state.buttonElement)||t.focus({preventScroll:!0}));break;case(0,K.match)(g.orientation,{vertical:Z.Keys.ArrowDown,horizontal:Z.Keys.ArrowRight}):return e.preventDefault(),e.stopPropagation(),w.actions.goToOption({focus:B.Focus.Next});case(0,K.match)(g.orientation,{vertical:Z.Keys.ArrowUp,horizontal:Z.Keys.ArrowLeft}):return e.preventDefault(),e.stopPropagation(),w.actions.goToOption({focus:B.Focus.Previous});case Z.Keys.Home:case Z.Keys.PageUp:return e.preventDefault(),e.stopPropagation(),w.actions.goToOption({focus:B.Focus.First});case Z.Keys.End:case Z.Keys.PageDown:return e.preventDefault(),e.stopPropagation(),w.actions.goToOption({focus:B.Focus.Last});case Z.Keys.Escape:e.preventDefault(),e.stopPropagation(),(0,o.flushSync)(()=>w.actions.closeListbox()),null==(s=w.state.buttonElement)||s.focus({preventScroll:!0});return;case Z.Keys.Tab:e.preventDefault(),e.stopPropagation(),(0,o.flushSync)(()=>w.actions.closeListbox()),(0,H.focusFrom)(w.state.buttonElement,e.shiftKey?H.Focus.Previous:H.Focus.Next);break;default:1===e.key.length&&(w.actions.search(e.key),ea.setTimeout(()=>w.actions.clearSearch(),350))}}),ec=(0,D.useSlice)(w,e=>{var t;return null==(t=e.buttonElement)?void 0:t.id}),em=(0,a.useMemo)(()=>({open:S===ee.Open}),[S]),ef=(0,U.mergeProps)(d?ei():{},{id:n,ref:er,"aria-activedescendant":(0,D.useSlice)(w,w.selectors.activeDescendantId),"aria-multiselectable":g.mode===et.Multi||void 0,"aria-labelledby":ec,"aria-orientation":g.orientation,onKeyDown:eo,role:"listbox",tabIndex:S===ee.Open?0:void 0,style:{...c.style,...el,"--button-width":(0,h.useElementSize)(N,!0).width},...(0,R.transitionDataAttributes)(A)}),ex=(0,U.useRender)(),ev=(0,a.useMemo)(()=>g.mode===et.Multi?g:{...g,isSelected:X},[g,X]);return a.default.createElement(q.Portal,{enabled:!!i&&(e.static||P),ownerDocument:I},a.default.createElement(ed.Provider,{value:ev},ex({ourProps:ef,theirProps:c,slot:em,defaultTag:"div",features:eh,visible:$,name:"Listbox.Options"}
4)))}),ew=(0,U.forwardRefWithAs)(function(e,t){let s=(0,a.useId)(),{id:n=`headlessui-listbox-option-${s}`,disabled:l=!1,value:i,...r}=e,u=!0===(0,a.useContext)(ef),c=ep("Listbox.Option"),d=eu("Listbox.Option"),p=(0,D.useSlice)(d,e=>d.selectors.isActive(e,n)),m=c.isSelected(i),f=(0,a.useRef)(null),h=(0,j.useTextValue)(f),v=(0,g.useLatestValue)({disabled:l,value:i,domRef:f,get textValue(){return h()}}),y=(0,E.useSyncRefs)(t,f,e=>{e?c.listRef.current.set(n,e):c.listRef.current.delete(n)}),w=(0,D.useSlice)(d,e=>d.selectors.shouldScrollIntoView(e,n));(0,b.useIsoMorphicEffect)(()=>{if(w)return(0,z.disposables)().requestAnimationFrame(()=>{var e,t;null==(t=null==(e=f.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})})},[w,f]),(0,b.useIsoMorphicEffect)(()=>{if(!u)return d.actions.registerOption(n,v),()=>d.actions.unregisterOption(n)},[v,n,u]);let C=(0,x.useEvent)(e=>{var t;if(l)return e.preventDefault();d.actions.onChange(i),c.mode===et.Single&&((0,o.flushSync)(()=>d.actions.closeListbox()),null==(t=d.state.buttonElement)||t.focus({preventScroll:!0}))}),S=(0,x.useEvent)(()=>{if(l)return d.actions.goToOption({focus:B.Focus.Nothing});d.actions.goToOption({focus:B.Focus.Specific,id:n})}),N=(0,T.useTrackedPointer)(),k=(0,x.useEvent)(e=>{N.update(e),!l&&(p||d.actions.goToOption({focus:B.Focus.Specific,id:n},es.Pointer))}),R=(0,x.useEvent)(e=>{N.wasMoved(e)&&(l||p||d.actions.goToOption({focus:B.Focus.Specific,id:n},es.Pointer))}),I=(0,x.useEvent)(e=>{N.wasMoved(e)&&(l||p&&d.actions.goToOption({focus:B.Focus.Nothing}))}),L=(0,a.useMemo)(()=>({active:p,focus:p,selected:m,disabled:l,selectedOption:m&&u}),[p,m,l,u]),O=u?{}:{id:n,ref:y,role:"option",tabIndex:!0===l?void 0:-1,"aria-disabled":!0===l||void 0,"aria-selected":m,disabled:void 0,onClick:C,onFocus:S,onPointerEnter:k,onMouseEnter:k,onPointerMove:R,onMouseMove:R,onPointerLeave:I,onMouseLeave:I},M=(0,U.useRender)();return!m&&u?null:M({ourProps:O,theirProps:r,slot:L,defaultTag:"div",name:"Listbox.Option"})}),eC=(0,U.forwardRefWithAs)(function(e,t){let{options:s,placeholder:n,...l}=e,i={ref:(0,E.useSyncRefs)(t)},r=ep("ListboxSelectedOption"),o=(0,a.useMemo)(()=>({}),[]),u=void 0===r.value||null===r.value||r.mode===et.Multi&&Array.isArray(r.value)&&0===r.value.length,c=(0,U.useRender)();return a.default.createElement(ef.Provider,{value:!0},c({ourProps:i,theirProps:{...l,children:a.default.createElement(a.default.Fragment,null,n&&u?n:s)},slot:o,defaultTag:ex,name:"ListboxSelectedOption"}))}),eS=Object.assign(ev,{Button:eb,Label:eg,Options:ey,Option:ew,SelectedOption:eC});e.s(["Listbox",0,eS,"ListboxButton",0,eb,"ListboxLabel",0,eg,"ListboxOption",0,ew,"ListboxOptions",0,ey,"ListboxSelectedOption",0,eC],495470)},989895,e=>{"use strict";let t,s,n;var l=e.i(429427),i=e.i(371330),r=e.i(271645),a=e.i(174080),o=e.i(394487),u=e.i(814379),c=e.i(746725),d=e.i(992704),p=e.i(914189),m=e.i(684653),f=e.i(835696),h=e.i(877891),x=e.i(952744),v=e.i(605083),b=e.i(157138),g=e.i(144279),y=e.i(101852),w=e.i(294316),C=e.i(249578),S=e.i(571616),N=e.i(83733),k=e.i(340143),E=e.i(919751),j=e.i(233137),T=e.i(341650),R=e.i(140407),I=e.i(233538),L=e.i(65659),O=e.i(544508),M=e.i(813581),F=e.i(652265),_=e.i(397701),P=e.i(700020),D=e.i(35889),A=e.i(998348),B=e.i(722678),z=e.i(635307),W=e.i(825720),H=Object.defineProperty,V=(e,t,s)=>{let n;return(n="symbol"!=typeof t?t+"":t)in e?H(e,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[n]=s,s},K=((t=K||{})[t.Open=0]="Open",t[t.Closed=1]="Closed",t),G=((s=G||{})[s.Pointer=0]="Pointer",s[s.Other=1]="Other",s),U=((n=U||{})[n.OpenMenu=0]="OpenMenu",n[n.CloseMenu=1]="CloseMenu",n[n.GoToItem=2]="GoToItem",n[n.Search=3]="Search",n[n.ClearSearch=4]="ClearSearch",n[n.RegisterItems=5]="RegisterItems",n[n.UnregisterItems=6]="UnregisterItems",n[n.SetButtonElement=7]="SetButtonElement",n[n.SetItemsElement=8]="SetItemsElement",n[n.SortItems=9]="SortItems",n);function $(e,t=e=>e){let s=null!==e.activeItemIndex?e.items[e.activeItemIndex]:null,n=(0,F.sortByDomNode)(t(e.items.slice()),e=>e.dataRef.current.domRef.current),l=s?n.indexOf(s):null;return -1===l&&(l=null),{items:n,activeItemIndex:l}}let Z={1:e=>1===e.menuState?e:{...e,activeItemIndex:null,pendingFocus:{focus:L.Focus.Nothing},menuState:1},0:(e,t)=>0===e.menuState?e:{...e,__demoMode:!1,pendingFocus:t.focus,menuState:0},2:(e,t)=>{var s,n,l,i,r;if(1===e.menuState)return e;let a={...e,searchQuery:"",activationTrigger:null!=(s=t.trigger)?s:1,__demoMode:!1};if(t.focus===L.Focus.Nothing)return{...a,activeItemIndex:null};if(t.focus===L.Focus.Specific)return{...a,activeItemIndex:e.items.findIndex(e=>e.id===t.id)};if(t.focus===L.Focus.Previous){let s=e.activeItemIndex;if(null!==s){let i=e.items[s].dataRef.current.domRef,r=(0,L.calculateActiveIndex)(t,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==r){let t=e.items[r].dataRef.current.domRef;if((null==(n=i.current)?void 0:n.previousElementSibling)===t.current||(null==(l=t.current)?void 0:l.previousElementSibling)===null)return{...a,activeItemIndex:r}}}}else if(t.focus===L.Focus.Next){let s=e.activeItemIndex;if(null!==s){let n=e.items[s].dataRef.current.domRef,l=(0,L.calculateActiveIndex)(t,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==l){let t=e.items[l].dataRef.current.domRef;if((null==(i=n.current)?void 0:i.nextElementSibling)===t.current||(null==(r=t.current)?void 0:r.nextElementSibling)===null)return{...a,activeItemIndex:l}}}}let o=$(e),u=(0,L.calculateActiveIndex)(t,{resolveItems:()=>o.items,resolveActiveIndex:()=>o.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...a,...o,activeItemIndex:u}},3:(e,t)=>
4{let s=+(""===e.searchQuery),n=e.searchQuery+t.value.toLowerCase(),l=(null!==e.activeItemIndex?e.items.slice(e.activeItemIndex+s).concat(e.items.slice(0,e.activeItemIndex+s)):e.items).find(e=>{var t;return(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(n))&&!e.dataRef.current.disabled}),i=l?e.items.indexOf(l):-1;return -1===i||i===e.activeItemIndex?{...e,searchQuery:n}:{...e,searchQuery:n,activeItemIndex:i,activationTrigger:1}},4:e=>""===e.searchQuery?e:{...e,searchQuery:"",searchActiveItemIndex:null},5:(e,t)=>{let s=e.items.concat(t.items.map(e=>e)),n=e.activeItemIndex;return e.pendingFocus.focus!==L.Focus.Nothing&&(n=(0,L.calculateActiveIndex)(e.pendingFocus,{resolveItems:()=>s,resolveActiveIndex:()=>e.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled})),{...e,items:s,activeItemIndex:n,pendingFocus:{focus:L.Focus.Nothing},pendingShouldSort:!0}},6:(e,t)=>{let s=e.items,n=[],l=new Set(t.items);for(let[e,t]of s.entries())if(l.has(t.id)&&(n.push(e),l.delete(t.id),0===l.size))break;if(n.length>0)for(let e of(s=s.slice(),n.reverse()))s.splice(e,1);return{...e,items:s,activationTrigger:1}},7:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},8:(e,t)=>e.itemsElement===t.element?e:{...e,itemsElement:t.element},9:e=>e.pendingShouldSort?{...e,...$(e),pendingShouldSort:!1}:e};class J extends W.Machine{constructor(e){super(e),V(this,"actions",{registerItem:(0,W.batch)(()=>{let e=[],t=new Set;return[(s,n)=>{t.has(n)||(t.add(n),e.push({id:s,dataRef:n}))},()=>(t.clear(),this.send({type:5,items:e.splice(0)}))]}),unregisterItem:(0,W.batch)(()=>{let e=[];return[t=>e.push(t),()=>this.send({type:6,items:e.splice(0)})]})}),V(this,"selectors",{activeDescendantId(e){var t;let s=e.activeItemIndex,n=e.items;return null===s||null==(t=n[s])?void 0:t.id},isActive(e,t){var s;let n=e.activeItemIndex,l=e.items;return null!==n&&(null==(s=l[n])?void 0:s.id)===t},shouldScrollIntoView(e,t){return!e.__demoMode&&0===e.menuState&&0!==e.activationTrigger&&this.isActive(e,t)}}),this.on(5,()=>{this.disposables.requestAnimationFrame(()=>{this.send({type:9})})});{let e=this.state.id,t=T.stackMachines.get(null);this.disposables.add(t.on(T.ActionTypes.Push,s=>{t.selectors.isTop(s,e)||0!==this.state.menuState||this.send({type:1})})),this.on(0,()=>t.actions.push(e)),this.on(1,()=>t.actions.pop(e))}}static new({id:e,__demoMode:t=!1}){return new J({id:e,__demoMode:t,menuState:+!t,buttonElement:null,itemsElement:null,items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1,pendingShouldSort:!1,pendingFocus:{focus:L.Focus.Nothing}})}reduce(e,t){return(0,_.match)(t.type,Z,e,t)}}var q=e.i(526599);let Q=(0,r.createContext)(null);function X(e){let t=(0,r.useContext)(Q);if(null===t){let t=Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Y),t}return t}function Y({id:e,__demoMode:t=!1}){let s=(0,r.useMemo)(()=>J.new({id:e,__demoMode:t}),[]);return(0,q.useOnUnmount)(()=>s.dispose()),s}let ee=r.Fragment,et=P.RenderFeatures.RenderStrategy|P.RenderFeatures.Static,es=r.Fragment,en=(0,P.forwardRefWithAs)(function(e,t){let s=(0,r.useId)(),{__demoMode:n=!1,...l}=e,i=Y({id:s,__demoMode:n}),[a,o,u]=(0,R.useSlice)(i,e=>[e.menuState,e.itemsElement,e.buttonElement]),c=(0,w.useSyncRefs)(t),d=T.stackMachines.get(null),m=(0,R.useSlice)(d,(0,r.useCallback)(e=>d.selectors.isTop(e,s),[d,s]));(0,x.useOutsideClick)(m,[u,o],(e,t)=>{var s;i.send({type:U.CloseMenu}),(0,F.isFocusableElement)(t,F.FocusableMode.Loose)||(e.preventDefault(),null==(s=i.state.buttonElement)||s.focus())});let f=(0,p.useEvent)(()=>{i.send({type:U.CloseMenu})}),h=(0,r.useMemo)(()=>({open:a===K.Open,close:f}),[a,f]),v=(0,P.useRender)();return r.default.createElement(E.FloatingProvider,null,r.default.createElement(Q.Provider,{value:i},r.default.createElement(j.OpenClosedProvider,{value:(0,_.match)(a,{[K.Open]:j.State.Open,[K.Closed]:j.State.Closed})},v({ourProps:{ref:c},theirProps:l,slot:h,defaultTag:ee,name:"Menu"}))))}),el=(0,P.forwardRefWithAs)(function(e,t){let s=X("Menu.Button"),n=(0,r.useId)(),{id:u=`headlessui-menu-button-${n}`,disabled:c=!1,autoFocus:d=!1,...m}=e,f=(0,r.useRef)(null),h=(0,E.useFloatingReferenceProps)(),x=(0,w.useSyncRefs)(t,f,(0,E.useFloatingReference)(),(0,p.useEvent)(e=>s.send({type:U.SetButtonElement,element:e}))),v=(0,p.useEvent)(e=>{switch(e.key){case A.Keys.Space:case A.Keys.Enter:case A.Keys.ArrowDown:e.preventDefault(),e.stopPropagation(),s.send({type:U.OpenMenu,focus:{focus:L.Focus.First}});break;case A.Keys.ArrowUp:e.preventDefault(),e.stopPropagation(),s.send({type:U.OpenMenu,focus:{focus:L.Focus.Last}})}}),y=(0,p.useEvent)(e=>{e.key===A.Keys.Space&&e.preventDefault()}),[C,S,N]=(0,R.useSlice)(s,e=>[e.menuState,e.buttonElement,e.itemsElement]),k=C===K.Open;(0,b.useQuickRelease)(k,{trigger:S,action:(0,r.useCallback)(e=>{if(null!=S&&S.contains(e.target))return b.Action.Ignore;let t=e.target.closest('[role="menuitem"]:not([data-disabled])');return M.isHTMLElement(t)?b.Action.Select(t):null!=N&&N.contains(e.target)?b.Action.Ignore:b.Action.Close},[S,N]),close:(0,r.useCallback)(()=>s.send({type:U.CloseMenu}),[]),select:(0,r.useCallback)(e=>e.click(),[])});let j=(0,p.useEvent)(e=>{var t;if(0===e.button){if((0,I.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();c||(C===K.Open?((0,a.flushSync)(()=>s.send({type:U.CloseMenu}
4)),null==(t=f.current)||t.focus({preventScroll:!0})):(e.preventDefault(),s.send({type:U.OpenMenu,focus:{focus:L.Focus.Nothing},trigger:G.Pointer})))}}),{isFocusVisible:T,focusProps:O}=(0,l.useFocusRing)({autoFocus:d}),{isHovered:F,hoverProps:_}=(0,i.useHover)({isDisabled:c}),{pressed:D,pressProps:B}=(0,o.useActivePress)({disabled:c}),z=(0,r.useMemo)(()=>({open:C===K.Open,active:D||C===K.Open,disabled:c,hover:F,focus:T,autofocus:d}),[C,F,T,D,c,d]),W=(0,P.mergeProps)(h(),{ref:x,id:u,type:(0,g.useResolveButtonType)(e,f.current),"aria-haspopup":"menu","aria-controls":null==N?void 0:N.id,"aria-expanded":C===K.Open,disabled:c||void 0,autoFocus:d,onKeyDown:v,onKeyUp:y,onPointerDown:j},O,_,B);return(0,P.useRender)()({ourProps:W,theirProps:m,slot:z,defaultTag:"button",name:"Menu.Button"})}),ei=(0,P.forwardRefWithAs)(function(e,t){let s=(0,r.useId)(),{id:n=`headlessui-menu-items-${s}`,anchor:l,portal:i=!1,modal:o=!0,transition:f=!1,...x}=e,b=(0,E.useResolvedAnchor)(l),g=X("Menu.Items"),[C,S]=(0,E.useFloatingPanel)(b),T=(0,E.useFloatingPanelProps)(),[I,O]=(0,r.useState)(null),M=(0,w.useSyncRefs)(t,b?C:null,(0,p.useEvent)(e=>g.send({type:U.SetItemsElement,element:e})),O),[_,D]=(0,R.useSlice)(g,e=>[e.menuState,e.buttonElement]),B=(0,v.useOwnerDocument)(D),W=(0,v.useOwnerDocument)(I);b&&(i=!0);let H=(0,j.useOpenClosed)(),[V,G]=(0,N.useTransition)(f,I,null!==H?(H&j.State.Open)===j.State.Open:_===K.Open);(0,h.useOnDisappear)(V,D,()=>{g.send({type:U.CloseMenu})});let $=(0,R.useSlice)(g,e=>e.__demoMode),Z=!$&&o&&_===K.Open;(0,y.useScrollLock)(Z,W);let J=!$&&o&&_===K.Open;(0,m.useInertOthers)(J,{allowed:(0,r.useCallback)(()=>[D,I],[D,I])});let q=_!==K.Open,Q=!(0,u.useDidElementMove)(q,D)&&V;(0,r.useEffect)(()=>{I&&_===K.Open&&I!==(null==W?void 0:W.activeElement)&&I.focus({preventScroll:!0})},[_,I,W]),(0,k.useTreeWalker)(_===K.Open,{container:I,accept:e=>"menuitem"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let Y=(0,c.useDisposables)(),ee=(0,p.useEvent)(e=>{var t,s,n;switch(Y.dispose(),e.key){case A.Keys.Space:if(""!==g.state.searchQuery)return e.preventDefault(),e.stopPropagation(),g.send({type:U.Search,value:e.key});case A.Keys.Enter:if(e.preventDefault(),e.stopPropagation(),null!==g.state.activeItemIndex){let{dataRef:e}=g.state.items[g.state.activeItemIndex];null==(s=null==(t=e.current)?void 0:t.domRef.current)||s.click()}g.send({type:U.CloseMenu}),(0,F.restoreFocusIfNecessary)(g.state.buttonElement);break;case A.Keys.ArrowDown:return e.preventDefault(),e.stopPropagation(),g.send({type:U.GoToItem,focus:L.Focus.Next});case A.Keys.ArrowUp:return e.preventDefault(),e.stopPropagation(),g.send({type:U.GoToItem,focus:L.Focus.Previous});case A.Keys.Home:case A.Keys.PageUp:return e.preventDefault(),e.stopPropagation(),g.send({type:U.GoToItem,focus:L.Focus.First});case A.Keys.End:case A.Keys.PageDown:return e.preventDefault(),e.stopPropagation(),g.send({type:U.GoToItem,focus:L.Focus.Last});case A.Keys.Escape:e.preventDefault(),e.stopPropagation(),(0,a.flushSync)(()=>g.send({type:U.CloseMenu})),null==(n=g.state.buttonElement)||n.focus({preventScroll:!0});break;case A.Keys.Tab:e.preventDefault(),e.stopPropagation(),(0,a.flushSync)(()=>g.send({type:U.CloseMenu})),(0,F.focusFrom)(g.state.buttonElement,e.shiftKey?F.Focus.Previous:F.Focus.Next);break;default:1===e.key.length&&(g.send({type:U.Search,value:e.key}),Y.setTimeout(()=>g.send({type:U.ClearSearch}),350))}}),es=(0,p.useEvent)(e=>{e.key===A.Keys.Space&&e.preventDefault()}),en=(0,r.useMemo)(()=>({open:_===K.Open}),[_]),el=(0,P.mergeProps)(b?T():{},{"aria-activedescendant":(0,R.useSlice)(g,g.selectors.activeDescendantId),"aria-labelledby":(0,R.useSlice)(g,e=>{var t;return null==(t=e.buttonElement)?void 0:t.id}),id:n,onKeyDown:ee,onKeyUp:es,role:"menu",tabIndex:_===K.Open?0:void 0,ref:M,style:{...x.style,...S,"--button-width":(0,d.useElementSize)(D,!0).width},...(0,N.transitionDataAttributes)(G)}),ei=(0,P.useRender)();return r.default.createElement(z.Portal,{enabled:!!i&&(e.static||V),ownerDocument:B},ei({ourProps:el,theirProps:x,slot:en,defaultTag:"div",features:et,visible:Q,name:"Menu.Items"}))}),er=(0,P.forwardRefWithAs)(function(e,t){let s=(0,r.useId)(),{id:n=`headlessui-menu-item-${s}`,disabled:l=!1,...i}=e,a=X("Menu.Item"),o=(0,R.useSlice)(a,e=>a.selectors.isActive(e,n)),u=(0,r.useRef)(null),c=(0,w.useSyncRefs)(t,u),d=(0,R.useSlice)(a,e=>a.selectors.shouldScrollIntoView(e,n));(0,f.useIsoMorphicEffect)(()=>
4{if(d)return(0,O.disposables)().requestAnimationFrame(()=>{var e,t;null==(t=null==(e=u.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})})},[d,u]);let m=(0,C.useTextValue)(u),h=(0,r.useRef)({disabled:l,domRef:u,get textValue(){return m()}});(0,f.useIsoMorphicEffect)(()=>{h.current.disabled=l},[h,l]),(0,f.useIsoMorphicEffect)(()=>(a.actions.registerItem(n,h),()=>a.actions.unregisterItem(n)),[h,n]);let x=(0,p.useEvent)(()=>{a.send({type:U.CloseMenu})}),v=(0,p.useEvent)(e=>{if(l)return e.preventDefault();a.send({type:U.CloseMenu}),(0,F.restoreFocusIfNecessary)(a.state.buttonElement)}),b=(0,p.useEvent)(()=>{if(l)return a.send({type:U.GoToItem,focus:L.Focus.Nothing});a.send({type:U.GoToItem,focus:L.Focus.Specific,id:n})}),g=(0,S.useTrackedPointer)(),y=(0,p.useEvent)(e=>{g.update(e),!l&&(o||a.send({type:U.GoToItem,focus:L.Focus.Specific,id:n,trigger:G.Pointer}))}),N=(0,p.useEvent)(e=>{g.wasMoved(e)&&(l||o||a.send({type:U.GoToItem,focus:L.Focus.Specific,id:n,trigger:G.Pointer}))}),k=(0,p.useEvent)(e=>{g.wasMoved(e)&&(l||o&&a.send({type:U.GoToItem,focus:L.Focus.Nothing}))}),[E,j]=(0,B.useLabels)(),[T,I]=(0,D.useDescriptions)(),M=(0,r.useMemo)(()=>({active:o,focus:o,disabled:l,close:x}),[o,l,x]),_=(0,P.useRender)();return r.default.createElement(j,null,r.default.createElement(I,null,_({ourProps:{id:n,ref:c,role:"menuitem",tabIndex:!0===l?void 0:-1,"aria-disabled":!0===l||void 0,"aria-labelledby":E,"aria-describedby":T,disabled:void 0,onClick:v,onFocus:b,onPointerEnter:y,onMouseEnter:y,onPointerMove:N,onMouseMove:N,onPointerLeave:k,onMouseLeave:k},theirProps:i,slot:M,defaultTag:es,name:"Menu.Item"})))}),ea=(0,P.forwardRefWithAs)(function(e,t){let[s,n]=(0,B.useLabels)(),l=(0,P.useRender)();return r.default.createElement(n,null,l({ourProps:{ref:t,"aria-labelledby":s,role:"group"},theirProps:e,slot:{},defaultTag:"div",name:"Menu.Section"}))}),eo=(0,P.forwardRefWithAs)(function(e,t){let s=(0,r.useId)(),{id:n=`headlessui-menu-heading-${s}`,...l}=e,i=(0,B.useLabelContext)();(0,f.useIsoMorphicEffect)(()=>i.register(n),[n,i.register]);let a={id:n,ref:t,role:"presentation",...i.props};return(0,P.useRender)()({ourProps:a,theirProps:l,slot:{},defaultTag:"header",name:"Menu.Heading"})}),eu=(0,P.forwardRefWithAs)(function(e,t){return(0,P.useRender)()({ourProps:{ref:t,role:"separator"},theirProps:e,slot:{},defaultTag:"div",name:"Menu.Separator"})}),ec=Object.assign(en,{Button:el,Items:ei,Item:er,Section:ea,Heading:eo,Separator:eu});e.s(["Menu",0,ec,"MenuButton",0,el,"MenuHeading",0,eo,"MenuItem",0,er,"MenuItems",0,ei,"MenuSection",0,ea,"MenuSeparator",0,eu],989895)},998307,e=>{"use strict";let t,s;var n=e.i(429427),l=e.i(371330),i=e.i(271645),r=e.i(394487),a=e.i(992704),o=e.i(914189),u=e.i(693456),c=e.i(835696),d=e.i(941444),p=e.i(877891),m=e.i(952744),f=e.i(605083),h=e.i(144279),x=e.i(185935),v=e.i(101852),b=e.i(294316),g=e.i(661130),y=e.i(83733),w=e.i(674175),C=e.i(919751),S=e.i(2788),N=e.i(233137),k=e.i(140407),E=e.i(233538),j=e.i(813581),T=e.i(652265),R=e.i(397701),I=e.i(402155),L=e.i(700020),O=e.i(998348),M=e.i(635307),F=e.i(825720),_=e.i(341650),P=Object.defineProperty,D=(e,t,s)=>{let n;return(n="symbol"!=typeof t?t+"":t)in e?P(e,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[n]=s,s},A=((t=A||{})[t.Open=0]="Open",t[t.Closed=1]="Closed",t),B=((s=B||{})[s.OpenPopover=0]="OpenPopover",s[s.ClosePopover=1]="ClosePopover",s[s.SetButton=2]="SetButton",s[s.SetButtonId=3]="SetButtonId",s[s.SetPanel=4]="SetPanel",s[s.SetPanelId=5]="SetPanelId",s);let z={0:e=>0===e.popoverState?e:{...e,popoverState:0,__demoMode:!1},1:e=>1===e.popoverState?e:{...e,popoverState:1,__demoMode:!1},2:(e,t)=>e.button===t.button?e:{...e,button:t.button},3:(e,t)=>
4e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId},4:(e,t)=>e.panel===t.panel?e:{...e,panel:t.panel},5:(e,t)=>e.panelId===t.panelId?e:{...e,panelId:t.panelId}};class W extends F.Machine{constructor(e){super(e),D(this,"actions",{close:()=>this.send({type:1}),refocusableClose:e=>{this.actions.close();let t=e?j.isHTMLElement(e)?e:"current"in e&&j.isHTMLElement(e.current)?e.current:this.state.button:this.state.button;null==t||t.focus()},open:()=>this.send({type:0}),setButtonId:e=>this.send({type:3,buttonId:e}),setButton:e=>this.send({type:2,button:e}),setPanelId:e=>this.send({type:5,panelId:e}),setPanel:e=>this.send({type:4,panel:e})}),D(this,"selectors",{isPortalled:e=>{if(!e.button||!e.panel)return!1;for(let t of document.querySelectorAll("body > *"))if(Number(null==t?void 0:t.contains(e.button))^Number(null==t?void 0:t.contains(e.panel)))return!0;let t=(0,T.getFocusableElements)(),s=t.indexOf(e.button),n=(s+t.length-1)%t.length,l=(s+1)%t.length,i=t[n],r=t[l];return!e.panel.contains(i)&&!e.panel.contains(r)}});{let e=this.state.id,t=_.stackMachines.get(null);this.on(0,()=>t.actions.push(e)),this.on(1,()=>t.actions.pop(e))}}static new({id:e,__demoMode:t=!1}){return new W({id:e,__demoMode:t,popoverState:+!t,buttons:{current:[]},button:null,buttonId:null,panel:null,panelId:null,beforePanelSentinel:{current:null},afterPanelSentinel:{current:null},afterButtonSentinel:{current:null}})}reduce(e,t){return(0,R.match)(t.type,z,e,t)}}var H=e.i(526599);let V=(0,i.createContext)(null);function K(e){let t=(0,i.useContext)(V);if(null===t){let t=Error(`<${e} /> is missing a parent <Popover /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,K),t}return t}let G=(0,i.createContext)(null);function U(){return(0,i.useContext)(G)}G.displayName="PopoverGroupContext";let $=(0,i.createContext)(null);$.displayName="PopoverPanelContext";let Z=L.RenderFeatures.RenderStrategy|L.RenderFeatures.Static;function J(e,t){let s=(0,i.useId)(),{id:n=`headlessui-popover-backdrop-${s}`,transition:l=!1,...r}=e,a=K("Popover.Backdrop"),u=(0,k.useSlice)(a,(0,i.useCallback)(e=>e.popoverState,[])),[c,d]=(0,i.useState)(null),p=(0,b.useSyncRefs)(t,d),m=(0,N.useOpenClosed)(),[f,h]=(0,y.useTransition)(l,c,null!==m?(m&N.State.Open)===N.State.Open:u===A.Open),x=(0,o.useEvent)(e=>{if((0,E.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();a.actions.close()}),v=(0,i.useMemo)(()=>({open:u===A.Open}),[u]),g={ref:p,id:n,"aria-hidden":!0,onClick:x,...(0,y.transitionDataAttributes)(h)};return(0,L.useRender)()({ourProps:g,theirProps:r,slot:v,defaultTag:"div",features:Z,visible:f,name:"Popover.Backdrop"})}let q=L.RenderFeatures.RenderStrategy|L.RenderFeatures.Static,Q=(0,L.forwardRefWithAs)(function(e,t){var s;let n=(0,i.useId)(),{__demoMode:l=!1,...r}=e,a=function({id:e,__demoMode:t=!1}){let s=(0,i.useMemo)(()=>W.new({id:e,__demoMode:t}),[]);return(0,H.useOnUnmount)(()=>s.dispose()),s}({id:n,__demoMode:l}),c=(0,i.useRef)(null),p=(0,b.useSyncRefs)(t,(0,b.optionalRef)(e=>{c.current=e})),[h,v,g,y,S]=(0,k.useSlice)(a,(0,i.useCallback)(e=>[e.popoverState,e.button,e.panel,e.buttonId,e.panelId],[])),E=(0,f.useOwnerDocument)(null!=(s=c.current)?s:v),I=(0,d.useLatestValue)(y),O=(0,d.useLatestValue)(S),F=(0,i.useMemo)(()=>({buttonId:I,panelId:O,close:a.actions.close}),[I,O,a]),_=U(),P=null==_?void 0:_.registerPopover,D=(0,o.useEvent)(()=>{var e;return null!=(e=null==_?void 0:_.isFocusWithinPopoverGroup())?e:(null==E?void 0:E.activeElement)&&((null==v?void 0:v.contains(E.activeElement))||(null==g?void 0:g.contains(E.activeElement)))});(0,i.useEffect)(()=>null==P?void 0:P(F),[P,F]);let[B,z]=(0,M.useNestedPortals)(),K=(0,x.useMainTreeNode)(v),G=(0,x.useRootContainers)({mainTreeNode:K,portals:B,defaultContainers:[{get current(){return a.state.button}},{get current(){return a.state.panel}}]});(0,u.useEventListener)(null==E?void 0:E.defaultView,"focus",e=>{var t,s,n,l,i,r;e.target!==window&&j.isHTMLorSVGElement(e.target)&&a.state.popoverState===A.Open&&(D()||a.state.button&&a.state.panel&&(G.contains(e.target)||null!=(s=null==(t=a.state.beforePanelSentinel.current)?void 0:t.contains)&&s.call(t,e.target)||null!=(l=null==(n=a.state.afterPanelSentinel.current)?void 0:n.contains)&&l.call(n,e.target)||null!=(r=null==(i=a.state.afterButtonSentinel.current)?void 0:i.contains)&&r.call(i,e.target)||a.actions.close()))},!0);let Z=h===A.Open;
4(0,m.useOutsideClick)(Z,G.resolveContainers,(e,t)=>{a.actions.close(),(0,T.isFocusableElement)(t,T.FocusableMode.Loose)||(e.preventDefault(),null==v||v.focus())});let J=(0,i.useMemo)(()=>({open:h===A.Open,close:a.actions.refocusableClose}),[h,a]),q=(0,k.useSlice)(a,(0,i.useCallback)(e=>(0,R.match)(e.popoverState,{[A.Open]:N.State.Open,[A.Closed]:N.State.Closed}),[])),Q=(0,L.useRender)();return i.default.createElement(x.MainTreeProvider,{node:K},i.default.createElement(C.FloatingProvider,null,i.default.createElement($.Provider,{value:null},i.default.createElement(V.Provider,{value:a},i.default.createElement(w.CloseProvider,{value:a.actions.refocusableClose},i.default.createElement(N.OpenClosedProvider,{value:q},i.default.createElement(z,null,Q({ourProps:{ref:p},theirProps:r,slot:J,defaultTag:"div",name:"Popover"}))))))))}),X=(0,L.forwardRefWithAs)(function(e,t){let s=(0,i.useId)(),{id:a=`headlessui-popover-button-${s}`,disabled:u=!1,autoFocus:c=!1,...d}=e,p=K("Popover.Button"),[m,x,v,y,w,N,I]=(0,k.useSlice)(p,(0,i.useCallback)(e=>[e.popoverState,p.selectors.isPortalled(e),e.button,e.buttonId,e.panel,e.panelId,e.afterButtonSentinel],[])),M=(0,i.useRef)(null),F=`headlessui-focus-sentinel-${(0,i.useId)()}`,_=U(),P=null==_?void 0:_.closeOthers,D=null!==(0,i.useContext)($);(0,i.useEffect)(()=>{if(!D)return p.actions.setButtonId(a),()=>p.actions.setButtonId(null)},[D,a,p]);let[B]=(0,i.useState)(()=>Symbol()),z=(0,b.useSyncRefs)(M,t,(0,C.useFloatingReference)(),(0,o.useEvent)(e=>{if(!D){if(e)p.state.buttons.current.push(B);else{let e=p.state.buttons.current.indexOf(B);-1!==e&&p.state.buttons.current.splice(e,1)}p.state.buttons.current.length>1&&console.warn("You are already using a <Popover.Button /> but only 1 <Popover.Button /> is supported."),e&&p.actions.setButton(e)}})),W=(0,b.useSyncRefs)(M,t),H=(0,f.useOwnerDocument)(M),V=(0,o.useEvent)(e=>{var t,s,n;if(D){if(p.state.popoverState===A.Closed)return;switch(e.key){case O.Keys.Space:case O.Keys.Enter:e.preventDefault(),null==(s=(t=e.target).click)||s.call(t),p.actions.close(),null==(n=p.state.button)||n.focus()}}else switch(e.key){case O.Keys.Space:case O.Keys.Enter:e.preventDefault(),e.stopPropagation(),p.state.popoverState===A.Closed?(null==P||P(p.state.buttonId),p.actions.open()):p.actions.close();break;case O.Keys.Escape:if(p.state.popoverState!==A.Open)return null==P?void 0:P(p.state.buttonId);if(!M.current||null!=H&&H.activeElement&&!M.current.contains(H.activeElement))return;e.preventDefault(),e.stopPropagation(),p.actions.close()}}),G=(0,o.useEvent)(e=>{D||e.key===O.Keys.Space&&e.preventDefault()}),Z=(0,o.useEvent)(e=>{var t,s;(0,E.isDisabledReactIssue7711)(e.currentTarget)||u||(D?(p.actions.close(),null==(t=p.state.button)||t.focus()):(e.preventDefault(),e.stopPropagation(),p.state.popoverState===A.Closed?(null==P||P(p.state.buttonId),p.actions.open()):p.actions.close(),null==(s=p.state.button)||s.focus()))}),J=(0,o.useEvent)(e=>{e.preventDefault(),e.stopPropagation()}),{isFocusVisible:q,focusProps:Q}=(0,n.useFocusRing)({autoFocus:c}),{isHovered:X,hoverProps:Y}=(0,l.useHover)({isDisabled:u}),{pressed:ee,pressProps:et}=(0,r.useActivePress)({disabled:u}),es=m===A.Open,en=(0,i.useMemo)(()=>({open:es,active:ee||es,disabled:u,hover:X,focus:q,autofocus:c}),[es,X,q,ee,u,c]),el=(0,h.useResolveButtonType)(e,v),ei=D?(0,L.mergeProps)({ref:W,type:el,onKeyDown:V,onClick:Z,disabled:u||void 0,autoFocus:c},Q,Y,et):(0,L.mergeProps)({ref:z,id:y,type:el,"aria-expanded":m===A.Open,"aria-controls":w?N:void 0,disabled:u||void 0,autoFocus:c,onKeyDown:V,onKeyUp:G,onClick:Z,onMouseDown:J},Q,Y,et),er=(0,g.useTabDirection)(),ea=(0,o.useEvent)(()=>{if(!j.isHTMLElement(p.state.panel))return;let e=p.state.panel;(0,R.match)(er.current,{[g.Direction.Forwards]:()=>(0,T.focusIn)(e,T.Focus.First),[g.Direction.Backwards]:()=>(0,T.focusIn)(e,T.Focus.Last)})===T.FocusResult.Error&&(0,T.focusIn)((0,T.getFocusableElements)().filter(e=>"true"!==e.dataset.headlessuiFocusGuard),(0,R.match)(er.current,{[g.Direction.Forwards]:T.Focus.Next,[g.Direction.Backwards]:T.Focus.Previous}),{relativeTo:p.state.button})}),eo=(0,L.useRender)();return i.default.createElement(i.default.Fragment,null,eo({ourProps:ei,theirProps:d,slot:en,defaultTag:"button",name:"Popover.Button"}),es&&!D&&x&&i.default.createElement(S.Hidden,{id:F,ref:I,features:S.HiddenFeatures.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:ea}))}),Y=(0,L.forwardRefWithAs)(J),ee=(0,L.forwardRefWithAs)(J),et=(0,L.forwardRefWithAs)(function(e,t){let s=(0,i.useId)(),{id:n=`headlessui-popover-panel-${s}`,focus:l=!1,anchor:r,portal:u=!1,modal:d=!1,transition:m=!1,...h}=e,x=K("Popover.Panel"),E=(0,k.useSlice)(x,x.selectors.isPortalled),[j,I,F,_,P]=(0,k.useSlice)(x,(0,i.useCallback)(e=>[e.popoverState,e.button,e.__demoMode,e.beforePanelSentinel,e.afterPanelSentinel],[])),D=`headlessui-focus-sentinel-before-${s}`,B=`headlessui-focus-sentinel-after-${s}`,z=(0,i.useRef)(null),W=(0,C.useResolvedAnchor)(r),[H,V]=(0,C.useFloatingPanel)(W),G=(0,C.useFloatingPanelProps)();W&&(u=!0);let[U,Z]=(0,i.useState)(null),J=(0,b.useSyncRefs)(z,t,W?H:null,x.actions.setPanel,Z),Q=(0,f.useOwnerDocument)(I),X=(0,f.useOwnerDocument)(z);(0,c.useIsoMorphicEffect)(()=>(x.actions.setPanelId(n),()=>x.actions.setPanelId(null)),[n,x]);let Y=(0,N.useOpenClosed)(),[ee,et]=(0,y.useTransition)(m,U,null!==Y?(Y&N.State.Open)===N.State.Open:j===A.Open);(0,p.useOnDisappear)(ee,I,x.actions.close),(0,v.useScrollLock)(!F&&d&&ee,X);let es=(0,o.useEvent)(e=>{var t;if(e.key===O.Keys.Escape){if(x.state.popoverState!==A.Open||!z.current||null!=X&&X.activeElement&&!z.current.contains(X.activeElement))return;e.preventDefault(),e.stopPropagation(),x.actions.close(),null==(t=x.state.button)||t.focu
4s()}});(0,i.useEffect)(()=>{var t;e.static||j===A.Closed&&(null==(t=e.unmount)||t)&&x.actions.setPanel(null)},[j,e.unmount,e.static,x]),(0,i.useEffect)(()=>{if(F||!l||j!==A.Open||!z.current)return;let e=null==X?void 0:X.activeElement;z.current.contains(e)||(0,T.focusIn)(z.current,T.Focus.First)},[F,l,z.current,j]);let en=(0,i.useMemo)(()=>({open:j===A.Open,close:x.actions.refocusableClose}),[j,x]),el=(0,L.mergeProps)(W?G():{},{ref:J,id:n,onKeyDown:es,onBlur:l&&j===A.Open?e=>{var t,s,n,l,i;let r=e.relatedTarget;r&&z.current&&(null!=(t=z.current)&&t.contains(r)||(x.actions.close(),(null!=(n=null==(s=_.current)?void 0:s.contains)&&n.call(s,r)||null!=(i=null==(l=P.current)?void 0:l.contains)&&i.call(l,r))&&r.focus({preventScroll:!0})))}:void 0,tabIndex:-1,style:{...h.style,...V,"--button-width":(0,a.useElementSize)(I,!0).width},...(0,y.transitionDataAttributes)(et)}),ei=(0,g.useTabDirection)(),er=(0,o.useEvent)(()=>{let e=z.current;e&&(0,R.match)(ei.current,{[g.Direction.Forwards]:()=>{var t;(0,T.focusIn)(e,T.Focus.First)===T.FocusResult.Error&&(null==(t=x.state.afterPanelSentinel.current)||t.focus())},[g.Direction.Backwards]:()=>{var e;null==(e=x.state.button)||e.focus({preventScroll:!0})}})}),ea=(0,o.useEvent)(()=>{let e=z.current;e&&(0,R.match)(ei.current,{[g.Direction.Forwards]:()=>{if(!x.state.button)return;let e=(0,T.getFocusableElements)(),t=e.indexOf(x.state.button),s=e.slice(0,t+1),n=[...e.slice(t+1),...s];for(let e of n.slice())if("true"===e.dataset.headlessuiFocusGuard||null!=U&&U.contains(e)){let t=n.indexOf(e);-1!==t&&n.splice(t,1)}(0,T.focusIn)(n,T.Focus.First,{sorted:!1})},[g.Direction.Backwards]:()=>{var t;(0,T.focusIn)(e,T.Focus.Previous)===T.FocusResult.Error&&(null==(t=x.state.button)||t.focus())}})}),eo=(0,L.useRender)();return i.default.createElement(N.ResetOpenClosedProvider,null,i.default.createElement($.Provider,{value:n},i.default.createElement(w.CloseProvider,{value:x.actions.refocusableClose},i.default.createElement(M.Portal,{enabled:!!u&&(e.static||ee),ownerDocument:Q},ee&&E&&i.default.createElement(S.Hidden,{id:D,ref:_,features:S.HiddenFeatures.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:er}),eo({ourProps:el,theirProps:h,slot:en,defaultTag:"div",features:q,visible:ee,name:"Popover.Panel"}),ee&&E&&i.default.createElement(S.Hidden,{id:B,ref:P,features:S.HiddenFeatures.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:ea})))))}),es=(0,L.forwardRefWithAs)(function(e,t){let s=(0,i.useRef)(null),n=(0,b.useSyncRefs)(s,t),[l,r]=(0,i.useState)([]),a=(0,o.useEvent)(e=>{r(t=>{let s=t.indexOf(e);if(-1!==s){let e=t.slice();return e.splice(s,1),e}return t})}),u=(0,o.useEvent)(e=>(r(t=>[...t,e]),()=>a(e))),c=(0,o.useEvent)(()=>{var e;let t=(0,I.getOwnerDocument)(s);if(!t)return!1;let n=t.activeElement;return!!(null!=(e=s.current)&&e.contains(n))||l.some(e=>{var s,l;return(null==(s=t.getElementById(e.buttonId.current))?void 0:s.contains(n))||(null==(l=t.getElementById(e.panelId.current))?void 0:l.contains(n))})}),d=(0,o.useEvent)(e=>{for(let t of l)t.buttonId.current!==e&&t.close()}),p=(0,i.useMemo)(()=>({registerPopover:u,unregisterPopover:a,isFocusWithinPopoverGroup:c,closeOthers:d}),[u,a,c,d]),m=(0,i.useMemo)(()=>({}),[]),f=(0,L.useRender)();return i.default.createElement(x.MainTreeProvider,null,i.default.createElement(G.Provider,{value:p},f({ourProps:{ref:n},theirProps:e,slot:m,defaultTag:"div",name:"Popover.Group"})))}),en=Object.assign(Q,{Button:X,Backdrop:ee,Overlay:Y,Panel:et,Group:es});e.s(["Popover",0,en,"PopoverBackdrop",0,ee,"PopoverButton",0,X,"PopoverGroup",0,es,"PopoverOverlay",0,Y,"PopoverPanel",0,et],998307)},153501,e=>{"use strict";let t;var s=e.i(429427),n=e.i(371330),l=e.i(271645),i=e.i(436289),r=e.i(503269),a=e.i(214520),o=e.i(914189),u=e.i(835696),c=e.i(941444),d=e.i(294316),p=e.i(601893),m=e.i(140721),f=e.i(942803),h=e.i(233538),x=e.i(652265),v=e.i(694421),b=e.i(397701),g=e.i(402155),y=e.i(700020),w=e.i(35889),C=e.i(998348),S=e.i(722678),N=((t=N||{})[t.RegisterOption=0]="RegisterOption",t[t.UnregisterOption=1]="UnregisterOption",t);let k={0(e,t){let s=[...e.options,{id:t.id,element:t.element,propsRef:t.propsRef}];return{...e,options:(0,x.sortByDomNode)(s,e=>e.element.current)}},1(e,t){let s=e.options.slice(),n=e.options.findIndex(e=>e.id===t.id);return -1===n?e:(s.splice(n,1),{...e,options:s})}},E=(0,l.createContext)(null);function j(e){let t=(0,l.useContext)(E);if(null===t){let t=Error(`<${e} /> is missing a parent <RadioGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,j),t}return t}E.displayName="RadioGroupDataContext";let T=(0,l.createContext)(null);function R(e){let t=(0,l.useContext)(T);if(null===t){let t=Error(`<${e} /> is missing a parent <RadioGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,R),t}return t}function I(e,t){return(0,b.match)(t.type,k,e,t)}T.displayName="RadioGroupActionsContext";let L=(0,y.forwardRefWithAs)(function(e,t){let s=(0,l.useId)(),n=(0,p.useDisabled)(),{id:u=`headlessui-radiogroup-${s}`,value:c,form:f,name:h,onChange:b,by:N,disabled:k=n||!1,defaultValue:j,tabIndex:R=0,...L}=e,O=(0,i.useByComparator)(N),[M,F]=(0,l.useReducer)(I,{options:[]}),_=M.options,[P,D]=(0,S.useLabels)(),[A,B]=(0,w.useDescriptions)(),z=(0,l.useRef)(null),W=(0,d.useSyncRefs)(z,t),H=(0,a.useDefaultValue)(j),[V,K]=(0,r.useControllable)(c,b,H),G=(0,l.useMemo)(()=>_.find(e=>!e.propsRef.current.disabled),[_]),U=(0,l.useMemo)(()=>_.some(e=>O(e.propsRef.current.value,V)),[_,V]),$=(0,o.useEvent)(e=>{var t;if(k||O(e,V))return!1;let s=null==(t=_.find(t=>O(t.propsRef.current.value,e)))?void 0:t.propsRef.current;return(null==s||!s.disabled)&&(null==K||K(e),!0)}),Z=(0,o.useEvent)(e=>{let t=z.current;if(!t)return;let s=(0,g.getOwnerDocument)(t),n=_.filter(e=>!1===e.propsRef.current.disabled).map(e=>e.element.current);switch(e.key){case C.Keys.Enter:(0,v.attemptSubmit)(e.currentTarget);break;case C.Keys.ArrowLeft:case C.Keys.ArrowUp:if(e.preventDefault(),e.stopPropagation(),(0,x.focusIn)(n,x.Focus.Previous|x.Focus.WrapAround)===x.FocusResult.Success){let e=_.find(e=>e.element.current===(null==s?void 0:s.activeElement));e&&$(e.propsRef.current.value)}break;case C.Keys.ArrowRight:case C.Keys.ArrowDown:if(e.preventDefault(),e.stopPropagation(),(0,x.focusIn)(n,x.Focus.Next|x.Focus.WrapAround)===x.FocusResult.Success){let e=_.find(e=>e.element.current===(null==s?void 0:s.activeElement));e&&$(e.propsRef.current.value)}break;case C.Keys.Space:{e.preventDefault(),e.stopPropagation();let t=_.find(e=>e.element.current===(null==s?void 0:s.activeElement));t&&$(t.propsRef.current.value)}}}),J=(0,o.useEvent)(e=>(F({type:0,...e}),()=>F({type:1,id:e.id}))),q=(0,l.useMemo)(()=>({value:V,firstOption:G,containsCheckedOption:U,disabled:k,compare:O,tabIndex:R,...M}),[V,G,U,k,O,R,M]),Q=(0,l.useMemo)(()=>({registerOption:J,change:$}),[J,$]),X=(0,l.useMemo)(()=>({value:V}
4),[V]),Y=(0,l.useCallback)(()=>{if(void 0!==H)return $(H)},[$,H]),ee=(0,y.useRender)();return l.default.createElement(B,{name:"RadioGroup.Description"},l.default.createElement(D,{name:"RadioGroup.Label"},l.default.createElement(T.Provider,{value:Q},l.default.createElement(E.Provider,{value:q},null!=h&&l.default.createElement(m.FormFields,{disabled:k,data:{[h]:V||"on"},overrides:{type:"radio",checked:null!=V},form:f,onReset:Y}),ee({ourProps:{ref:W,id:u,role:"radiogroup","aria-labelledby":P,"aria-describedby":A,onKeyDown:Z},theirProps:L,slot:X,defaultTag:"div",name:"RadioGroup"})))))}),O=(0,y.forwardRefWithAs)(function(e,t){var i;let r=j("RadioGroup.Option"),a=R("RadioGroup.Option"),p=(0,l.useId)(),{id:m=`headlessui-radiogroup-option-${p}`,value:f,disabled:x=r.disabled||!1,autoFocus:v=!1,...b}=e,g=(0,l.useRef)(null),C=(0,d.useSyncRefs)(g,t),[N,k]=(0,S.useLabels)(),[E,T]=(0,w.useDescriptions)(),I=(0,c.useLatestValue)({value:f,disabled:x});(0,u.useIsoMorphicEffect)(()=>a.registerOption({id:m,element:g,propsRef:I}),[m,a,g,I]);let L=(0,o.useEvent)(e=>{var t;if((0,h.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();a.change(f)&&(null==(t=g.current)||t.focus())}),O=(null==(i=r.firstOption)?void 0:i.id)===m,{isFocusVisible:M,focusProps:F}=(0,s.useFocusRing)({autoFocus:v}),{isHovered:_,hoverProps:P}=(0,n.useHover)({isDisabled:x}),D=r.compare(r.value,f),A=(0,y.mergeProps)({ref:C,id:m,role:"radio","aria-checked":D?"true":"false","aria-labelledby":N,"aria-describedby":E,"aria-disabled":!!x||void 0,tabIndex:x?-1:D||!r.containsCheckedOption&&O?r.tabIndex:-1,onClick:x?void 0:L,autoFocus:v},F,P),B=(0,l.useMemo)(()=>({checked:D,disabled:x,active:M,hover:_,focus:M,autofocus:v}),[D,x,_,M,v]),z=(0,y.useRender)();return l.default.createElement(T,{name:"RadioGroup.Description"},l.default.createElement(k,{name:"RadioGroup.Label"},z({ourProps:A,theirProps:b,slot:B,defaultTag:"div",name:"RadioGroup.Option"})))}),M=(0,y.forwardRefWithAs)(function(e,t){var i;let r=j("Radio"),a=R("Radio"),m=(0,l.useId)(),x=(0,f.useProvidedId)(),v=(0,p.useDisabled)(),{id:b=x||`headlessui-radio-${m}`,value:g,disabled:C=r.disabled||v||!1,autoFocus:N=!1,...k}=e,E=(0,l.useRef)(null),T=(0,d.useSyncRefs)(E,t),I=(0,S.useLabelledBy)(),L=(0,w.useDescribedBy)(),O=(0,c.useLatestValue)({value:g,disabled:C});(0,u.useIsoMorphicEffect)(()=>a.registerOption({id:b,element:E,propsRef:O}),[b,a,E,O]);let M=(0,o.useEvent)(e=>{var t;if((0,h.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();a.change(g)&&(null==(t=E.current)||t.focus())}),{isFocusVisible:F,focusProps:_}=(0,s.useFocusRing)({autoFocus:N}),{isHovered:P,hoverProps:D}=(0,n.useHover)({isDisabled:C}),A=(null==(i=r.firstOption)?void 0:i.id)===b,B=r.compare(r.value,g),z=(0,y.mergeProps)({ref:T,id:b,role:"radio","aria-checked":B?"true":"false","aria-labelledby":I,"aria-describedby":L,"aria-disabled":!!C||void 0,tabIndex:C?-1:B||!r.containsCheckedOption&&A?r.tabIndex:-1,autoFocus:N,onClick:C?void 0:M},_,D),W=(0,l.useMemo)(()=>({checked:B,disabled:C,hover:P,focus:F,autofocus:N}),[B,C,P,F,N]);return(0,y.useRender)()({ourProps:z,theirProps:k,slot:W,defaultTag:"span",name:"Radio"})}),F=S.Label,_=w.Description,P=Object.assign(L,{Option:O,Radio:M,Label:F,Description:_});e.s(["Radio",0,M,"RadioGroup",0,P,"RadioGroupDescription",0,_,"RadioGroupLabel",0,F,"RadioGroupOption",0,O])},662499,e=>{"use strict";var t=e.i(429427),s=e.i(371330),n=e.i(271645),l=e.i(394487),i=e.i(601893),r=e.i(942803),a=e.i(700020),o=e.i(35889),u=e.i(722678);let c=(0,a.forwardRefWithAs)(function(e,c){let d=(0,n.useId)(),p=(0,r.useProvidedId)(),m=(0,i.useDisabled)(),{id:f=p||`headlessui-select-${d}`,disabled:h=m||!1,invalid:x=!1,autoFocus:v=!1,...b}=e,g=(0,u.useLabelledBy)(),y=(0,o.useDescribedBy)(),{isFocusVisible:w,focusProps:C}=(0,t.useFocusRing)({autoFocus:v}),{isHovered:S,hoverProps:N}=(0,s.useHover)({isDisabled:h}),{pressed:k,pressProps:E}=(0,l.useActivePress)({disabled:h}),j=(0,a.mergeProps)({ref:c,id:f,"aria-labelledby":g,"aria-describedby":y,"aria-invalid":x?"true":void 0,disabled:h||void 0,autoFocus:v},C,N,E),T=(0,n.useMemo)(()=>({disabled:h,invalid:x,hover:S,focus:w,active:k,autofocus:v}),[h,x,S,w,k,v]);return(0,a.useRender)()({ourProps:j,theirProps:b,slot:T,defaultTag:"select",name:"Select"})});e.s(["Select",0,c])},368497,e=>{"use strict";var t=e.i(429427),s=e.i(371330),n=e.i(271645),l=e.i(394487),i=e.i(503269),r=e.i(214520),a=e.i(746725),o=e.i(914189),u=e.i(144279),c=e.i(294316),d=e.i(601893),p=e.i(140721),m=e.i(942803),f=e.i(233538),h=e.i(813581),x=e.i(694421),v=e.i(700020),b=e.i(35889),g=e.i(998348),y=e.i(722678);let w=(0,n.createContext)(null);w.displayName="GroupContext";let C=n.Fragment,S=(0,v.forwardRefWithAs)(function(e,h){var C;let S=(0,n.useId)(),N=(0,m.useProvidedId)(),k=(0,d.useDisabled)(),{id:E=N||`headlessui-switch-${S}`,disabled:j=k||!1,checked:T,defaultChecked:R,onChange:I,name:L,value:O,form:M,autoFocus:
4F=!1,..._}=e,P=(0,n.useContext)(w),[D,A]=(0,n.useState)(null),B=(0,n.useRef)(null),z=(0,c.useSyncRefs)(B,h,null===P?null:P.setSwitch,A),W=(0,r.useDefaultValue)(R),[H,V]=(0,i.useControllable)(T,I,null!=W&&W),K=(0,a.useDisposables)(),[G,U]=(0,n.useState)(!1),$=(0,o.useEvent)(()=>{U(!0),null==V||V(!H),K.nextFrame(()=>{U(!1)})}),Z=(0,o.useEvent)(e=>{if((0,f.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();e.preventDefault(),$()}),J=(0,o.useEvent)(e=>{e.key===g.Keys.Space?(e.preventDefault(),$()):e.key===g.Keys.Enter&&(0,x.attemptSubmit)(e.currentTarget)}),q=(0,o.useEvent)(e=>e.preventDefault()),Q=(0,y.useLabelledBy)(),X=(0,b.useDescribedBy)(),{isFocusVisible:Y,focusProps:ee}=(0,t.useFocusRing)({autoFocus:F}),{isHovered:et,hoverProps:es}=(0,s.useHover)({isDisabled:j}),{pressed:en,pressProps:el}=(0,l.useActivePress)({disabled:j}),ei=(0,n.useMemo)(()=>({checked:H,disabled:j,hover:et,focus:Y,active:en,autofocus:F,changing:G}),[H,et,Y,en,j,G,F]),er=(0,v.mergeProps)({id:E,ref:z,role:"switch",type:(0,u.useResolveButtonType)(e,D),tabIndex:-1===e.tabIndex?0:null!=(C=e.tabIndex)?C:0,"aria-checked":H,"aria-labelledby":Q,"aria-describedby":X,disabled:j||void 0,autoFocus:F,onClick:Z,onKeyUp:J,onKeyPress:q},ee,es,el),ea=(0,n.useCallback)(()=>{if(void 0!==W)return null==V?void 0:V(W)},[V,W]),eo=(0,v.useRender)();return n.default.createElement(n.default.Fragment,null,null!=L&&n.default.createElement(p.FormFields,{disabled:j,data:{[L]:O||"on"},overrides:{type:"checkbox",checked:H},form:M,onReset:ea}),eo({ourProps:er,theirProps:_,slot:ei,defaultTag:"button",name:"Switch"}))}),N=function(e){var t;
4let[s,l]=(0,n.useState)(null),[i,r]=(0,y.useLabels)(),[a,o]=(0,b.useDescriptions)(),u=(0,n.useMemo)(()=>({switch:s,setSwitch:l}),[s,l]),c=(0,v.useRender)();return n.default.createElement(o,{name:"Switch.Description",value:a},n.default.createElement(r,{name:"Switch.Label",value:i,props:{htmlFor:null==(t=u.switch)?void 0:t.id,onClick(e){s&&(h.isHTMLLabelElement(e.currentTarget)&&e.preventDefault(),s.click(),s.focus({preventScroll:!0}))}}},n.default.createElement(w.Provider,{value:u},c({ourProps:{},theirProps:e,slot:{},defaultTag:C,name:"Switch.Group"}))))},k=y.Label,E=b.Description,j=Object.assign(S,{Group:N,Label:k,Description:E});e.s(["Switch",0,j,"SwitchDescription",0,E,"SwitchGroup",0,N,"SwitchLabel",0,k])},970554,e=>{"use strict";let t,s,n;var l=e.i(429427),i=e.i(371330),r=e.i(271645),a=e.i(394487),o=e.i(914189),u=e.i(835696),c=e.i(941444),d=e.i(144279),p=e.i(294316),m=e.i(553521),f=e.i(2788);function h({onFocus:e}){let[t,s]=(0,r.useState)(!0),n=(0,m.useIsMounted)();return t?r.default.createElement(f.Hidden,{as:"button",type:"button",features:f.HiddenFeatures.Focusable,onFocus:t=>{t.preventDefault();let l,i=50;l=requestAnimationFrame(function t(){if(i--<=0){l&&cancelAnimationFrame(l);return}if(e()){if(cancelAnimationFrame(l),!n.current)return;s(!1);return}l=requestAnimationFrame(t)})}}):null}var x=e.i(652265),v=e.i(397701),b=e.i(368578),g=e.i(402155),y=e.i(700020);let w=r.createContext(null);function C({children:e}){let t=r.useRef({groups:new Map,get(e,t){var s;let n=this.groups.get(e);n||(n=new Map,this.groups.set(e,n));let l=null!=(s=n.get(t))?s:0;return n.set(t,l+1),[Array.from(n.keys()).indexOf(t),function(){let e=n.get(t);e>1?n.set(t,e-1):n.delete(t)}]}});return r.createElement(w.Provider,{value:t},e)}function S(e){let t=r.useContext(w);if(!t)throw Error("You must wrap your component in a <StableCollection>");let s=r.useId(),[n,l]=t.current.get(e,s);return r.useEffect(()=>l,[]),n}var N=e.i(998348),k=((t=k||{})[t.Forwards=0]="Forwards",t[t.Backwards=1]="Backwards",t),E=((s=E||{})[s.Less=-1]="Less",s[s.Equal=0]="Equal",s[s.Greater=1]="Greater",s),j=((n=j||{})[n.SetSelectedIndex=0]="SetSelectedIndex",n[n.RegisterTab=1]="RegisterTab",n[n.UnregisterTab=2]="UnregisterTab",n[n.RegisterPanel=3]="RegisterPanel",n[n.UnregisterPanel=4]="UnregisterPanel",n);let T={0(e,t){var s;let n=(0,x.sortByDomNode)(e.tabs,e=>e.current),l=(0,x.sortByDomNode)(e.panels,e=>e.current),i=n.filter(e=>{var t;return!(null!=(t=e.current)&&t.hasAttribute("disabled"))}),r={...e,tabs:n,panels:l};if(t.index<0||t.index>n.length-1){let s=(0,v.match)(Math.sign(t.index-e.selectedIndex),{[-1]:()=>1,0:()=>(0,v.match)(Math.sign(t.index),{[-1]:()=>0,0:()=>0,1:()=>1}),1:()=>0});if(0===i.length)return r;let l=(0,v.match)(s,{0:()=>n.indexOf(i[0]),1:()=>n.indexOf(i[i.length-1])});return{...r,selectedIndex:-1===l?e.selectedIndex:l}}let a=n.slice(0,t.index),o=[...n.slice(t.index),...a].find(e=>i.includes(e));if(!o)return r;let u=null!=(s=n.indexOf(o))?s:e.selectedIndex;return -1===u&&(u=e.selectedIndex),{...r,selectedIndex:u}},1(e,t){if(e.tabs.includes(t.tab))return e;let s=e.tabs[e.selectedIndex],n=(0,x.sortByDomNode)([...e.tabs,t.tab],e=>e.current),l=e.selectedIndex;return e.info.current.isControlled||-1===(l=n.indexOf(s))&&(l=e.selectedIndex),{...e,tabs:n,selectedIndex:l}},2:(e,t)=>({...e,tabs:e.tabs.filter(e=>e!==t.tab)}),3:(e,t)=>e.panels.includes(t.panel)?e:{...e,panels:(0,x.sortByDomNode)([...e.panels,t.panel],e=>e.current)},4:(e,t)=>({...e,panels:e.panels.filter(e=>e!==t.panel)})},R=(0,r.createContext)(null);function I(e){let t=(0,r.useContext)(R);if(null===t){let t=Error(`<${e} /> is missing a parent <Tab.Group /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,I),t}return t}R.displayName="TabsDataContext";let L=(0,r.createContext)(null);function O(e){let t=(0,r.useContext)(L);if(null===t){let t=Error(`<${e} /> is missing a parent <Tab.Group /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,O),t}return t}function M(e,t){return(0,v.match)(t.type,T,e,t)}L.displayName="TabsActionsContext";let F=y.RenderFeatures.RenderStrategy|y.RenderFeatures.Static,_=(0,y.forwardRefWithAs)(function(e,t){var s,n;let c=(0,r.useId)(),{id:m=`headlessui-tabs-tab-${c}`,disabled:f=!1,autoFocus:h=!1,...w}=e,{orientation:C,activation:k,selectedIndex:E,tabs:j,panels:T}=I("Tab"),R=O("Tab"),L=I("Tab"),[M,F]=(0,r.useState)(null),_=(0,r.useRef)(null),P=(0,p.useSyncRefs)(_,t,F);(0,u.useIsoMorphicEffect)(()=>R.registerTab(_),[R,_]);let D=S("tabs"),A=j.indexOf(_);-1===A&&(A=D);let B=A===E,z=(0,o.useEvent)(e=>{var t;let s=e();if(s===x.FocusResult.Success&&"auto"===k){let e=null==(t=(0,g.getOwnerDocument)(_))?void 0:t.activeElement,s=L.tabs.findIndex(t=>t.current===e);-1!==s&&R.change(s)}return s}),W=(0,o.useEvent)(e=>{let t=j.map(e=>
4e.current).filter(Boolean);if(e.key===N.Keys.Space||e.key===N.Keys.Enter){e.preventDefault(),e.stopPropagation(),R.change(A);return}switch(e.key){case N.Keys.Home:case N.Keys.PageUp:return e.preventDefault(),e.stopPropagation(),z(()=>(0,x.focusIn)(t,x.Focus.First));case N.Keys.End:case N.Keys.PageDown:return e.preventDefault(),e.stopPropagation(),z(()=>(0,x.focusIn)(t,x.Focus.Last))}if(z(()=>(0,v.match)(C,{vertical:()=>e.key===N.Keys.ArrowUp?(0,x.focusIn)(t,x.Focus.Previous|x.Focus.WrapAround):e.key===N.Keys.ArrowDown?(0,x.focusIn)(t,x.Focus.Next|x.Focus.WrapAround):x.FocusResult.Error,horizontal:()=>e.key===N.Keys.ArrowLeft?(0,x.focusIn)(t,x.Focus.Previous|x.Focus.WrapAround):e.key===N.Keys.ArrowRight?(0,x.focusIn)(t,x.Focus.Next|x.Focus.WrapAround):x.FocusResult.Error}))===x.FocusResult.Success)return e.preventDefault()}),H=(0,r.useRef)(!1),V=(0,o.useEvent)(()=>{var e;H.current||(H.current=!0,null==(e=_.current)||e.focus({preventScroll:!0}),R.change(A),(0,b.microTask)(()=>{H.current=!1}))}),K=(0,o.useEvent)(e=>{e.preventDefault()}),{isFocusVisible:G,focusProps:U}=(0,l.useFocusRing)({autoFocus:h}),{isHovered:$,hoverProps:Z}=(0,i.useHover)({isDisabled:f}),{pressed:J,pressProps:q}=(0,a.useActivePress)({disabled:f}),Q=(0,r.useMemo)(()=>({selected:B,hover:$,active:J,focus:G,autofocus:h,disabled:f}),[B,$,G,J,h,f]),X=(0,y.mergeProps)({ref:P,onKeyDown:W,onMouseDown:K,onClick:V,id:m,role:"tab",type:(0,d.useResolveButtonType)(e,M),"aria-controls":null==(n=null==(s=T[A])?void 0:s.current)?void 0:n.id,"aria-selected":B,tabIndex:B?0:-1,disabled:f||void 0,autoFocus:h},U,Z,q);return(0,y.useRender)()({ourProps:X,theirProps:w,slot:Q,defaultTag:"button",name:"Tabs.Tab"})}),P=(0,y.forwardRefWithAs)(function(e,t){let{defaultIndex:s=0,vertical:n=!1,manual:l=!1,onChange:i,selectedIndex:a=null,...d}=e,m=n?"vertical":"horizontal",f=l?"manual":"auto",v=null!==a,b=(0,c.useLatestValue)({isControlled:v}),g=(0,p.useSyncRefs)(t),[w,S]=(0,r.useReducer)(M,{info:b,selectedIndex:null!=a?a:s,tabs:[],panels:[]}),N=(0,r.useMemo)(()=>({selectedIndex:w.selectedIndex}),[w.selectedIndex]),k=(0,c.useLatestValue)(i||(()=>{})),E=(0,c.useLatestValue)(w.tabs),j=(0,r.useMemo)(()=>({orientation:m,activation:f,...w}),[m,f,w]),T=(0,o.useEvent)(e=>(S({type:1,tab:e}),()=>S({type:2,tab:e}))),I=(0,o.useEvent)(e=>(S({type:3,panel:e}),()=>S({type:4,panel:e}))),O=(0,o.useEvent)(e=>{F.current!==e&&k.current(e),v||S({type:0,index:e})}),F=(0,c.useLatestValue)(v?e.selectedIndex:w.selectedIndex),_=(0,r.useMemo)(()=>({registerTab:T,registerPanel:I,change:O}),[]);(0,u.useIsoMorphicEffect)(()=>{S({type:0,index:null!=a?a:s})},[a]),(0,u.useIsoMorphicEffect)(()=>{if(void 0===F.current||w.tabs.length<=0)return;let e=(0,x.sortByDomNode)(w.tabs,e=>e.current);e.some((e,t)=>w.tabs[t]!==e)&&O(e.indexOf(w.tabs[F.current]))});let P=(0,y.useRender)();return r.default.createElement(C,null,r.default.createElement(L.Provider,{value:_},r.default.createElement(R.Provider,{value:j},j.tabs.length<=0&&r.default.createElement(h,{onFocus:()=>{var e,t;for(let s of E.current)if((null==(e=s.current)?void 0:e.tabIndex)===0)return null==(t=s.current)||t.focus(),!0;return!1}}),P({ourProps:{ref:g},theirProps:d,slot:N,defaultTag:"div",name:"Tabs"}))))}),D=(0,y.forwardRefWithAs)(function(e,t){let{orientation:s,selectedIndex:n}=I("Tab.List"),l=(0,p.useSyncRefs)(t),i=(0,r.useMemo)(()=>({selectedIndex:n}),[n]);return(0,y.useRender)()({ourProps:{ref:l,role:"tablist","aria-orientation":s},theirProps:e,slot:i,defaultTag:"div",name:"Tabs.List"})}),A=(0,y.forwardRefWithAs)(function(e,t){let{selectedIndex:s}=I("Tab.Panels"),n=(0,p.useSyncRefs)(t),l=(0,r.useMemo)(()=>({selectedIndex:s}),[s]);return(0,y.useRender)()({ourProps:{ref:n},theirProps:e,slot:l,defaultTag:"div",name:"Tabs.Panels"})}),B=(0,y.forwardRefWithAs)(function(e,t){var s,n,i,a;let o=(0,r.useId)(),{id:c=`headlessui-tabs-panel-${o}`,tabIndex:d=0,...m}=e,{selectedIndex:h,tabs:x,panels:v}=I("Tab.Panel"),b=O("Tab.Panel"),g=(0,r.useRef)(null),w=(0,p.useSyncRefs)(g,t);(0,u.useIsoMorphicEffect)(()=>b.registerPanel(g),[b,g]);let C=S("panels"),N=v.indexOf(g);-1===N&&(N=C);let k=N===h,{isFocusVisible:E,focusProps:j}=(0,l.useFocusRing)(),T=(0,r.useMemo)(()=>({selected:k,focus:E}),[k,E]),R=(0,y.mergeProps)({ref:w,id:c,role:"tabpanel","aria-labelledby":null==(n=null==(s=x[N])?void 0:s.current)?void 0:n.id,tabIndex:k?d:-1},j),L=(0,y.useRender)();return k||null!=(i=m.unmount)&&!i||null!=(a=m.static)&&a?L({ourProps:R,theirProps:m,slot:T,defaultTag:"div",features:F,visible:k,name:"Tabs.Panel"}):r.default.createElement(f.Hidden,{"aria-hidden":"true",...R})}),z=Object.assign(_,{Group:P,List:D,Panels:A,Panel:B});e.s(["Tab",0,z,"TabGroup",0,P,"TabList",0,D,"TabPanel",0,B,"TabPanels",0,A],970
4554)},154324,e=>{"use strict";var t=e.i(429427),s=e.i(371330),n=e.i(271645),l=e.i(601893),i=e.i(942803),r=e.i(700020),a=e.i(35889),o=e.i(722678);let u=(0,r.forwardRefWithAs)(function(e,u){let c=(0,n.useId)(),d=(0,i.useProvidedId)(),p=(0,l.useDisabled)(),{id:m=d||`headlessui-textarea-${c}`,disabled:f=p||!1,autoFocus:h=!1,invalid:x=!1,...v}=e,b=(0,o.useLabelledBy)(),g=(0,a.useDescribedBy)(),{isFocused:y,focusProps:w}=(0,t.useFocusRing)({autoFocus:h}),{isHovered:C,hoverProps:S}=(0,s.useHover)({isDisabled:f}),N=(0,r.mergeProps)({ref:u,id:m,"aria-labelledby":b,"aria-describedby":g,"aria-invalid":x?"true":void 0,disabled:f||void 0,autoFocus:h},w,S),k=(0,n.useMemo)(()=>({disabled:f,invalid:x,hover:C,focus:y,autofocus:h}),[f,x,C,y,h]);return(0,r.useRender)()({ourProps:N,theirProps:v,slot:k,defaultTag:"textarea",name:"Textarea"})});e.s(["Textarea",0,u])},394487,e=>{"use strict";var t=e.i(271645),s=e.i(402155),n=e.i(746725),l=e.i(914189);e.s(["useActivePress",0,function({disabled:e=!1}={}){let i=(0,t.useRef)(null),[r,a]=(0,t.useState)(!1),o=(0,n.useDisposables)(),u=(0,l.useEvent)(()=>{i.current=null,a(!1),o.dispose()}),c=(0,l.useEvent)(e=>{if(o.dispose(),null===i.current){i.current=e.currentTarget,a(!0);{let t=(0,s.getOwnerDocument)(e.currentTarget);o.addEventListener(t,"pointerup",u,!1),o.addEventListener(t,"pointermove",e=>{if(i.current){var t,s;let n,l;a((n=e.width/2,l=e.height/2,t={top:e.clientY-l,right:e.clientX+n,bottom:e.clientY+l,left:e.clientX-n},s=i.current.getBoundingClientRect(),!(!t||!s||t.right<s.left||t.left>s.right||t.bottom<s.top||t.top>s.bottom)))}},!1),o.addEventListener(t,"pointercancel",u,!1)}}});return{pressed:r,pressProps:e?{}:{onPointerDown:c,onPointerUp:u,onClick:u}}}])},436289,e=>{"use strict";var t=e.i(271645);function s(e,t){return null!==e&&null!==t&&"object"==typeof e&&"object"==typeof t&&"id"in e&&"id"in t?e.id===t.id:e===t}e.s(["useByComparator",0,function(e=s){return(0,t.useCallback)((t,s)=>"string"==typeof e?(null==t?void 0:t[e])===(null==s?void 0:s[e]):e(t,s),[e])}])},503269,214520,e=>{"use strict";var t=e.i(271645),s=e.i(914189);e.s(["useControllable",0,function(e,n,l){let[i,r]=(0,t.useState)(l),a=void 0!==e,o=(0,t.useRef)(a),u=(0,t.useRef)(!1),c=(0,t.useRef)(!1);return!a||o.current||u.current?a||!o.current||c.current||(c.current=!0,o.current=a,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(u.current=!0,o.current=a,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[a?e:i,(0,s.useEvent)(e=>(a||r(e),null==n?void 0:n(e)))]}],503269),e.s(["useDefaultValue",0,function(e){let[s]=(0,t.useState)(e);return s}],214520)},814379,249578,e=>{"use strict";var t=e.i(271645),s=e.i(835696);e.s(["useDidElementMove",0,function(e,n){let l=(0,t.useRef)({left:0,top:0});if((0,s.useIsoMorphicEffect)(()=>{if(!n)return;let e=n.getBoundingClientRect();e&&(l.current=e)},[e,n]),null==n||!e||n===document.activeElement)return!1;let i=n.getBoundingClientRect();return i.top!==l.current.top||i.left!==l.current.left}],814379);var n=e.i(813581);let l=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function i(e){var t,s;let i=null!=(t=e.innerText)?t:"",r=e.cloneNode(!0);if(!n.isHTMLElement(r))return i;let a=!1;for(let e of r.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))e.remove(),a=!0;let o=a?null!=(s=r.innerText)?s:"":i;return l.test(o)&&(o=o.replace(l,"")),o}var r=e.i(914189);e.s(["useTextValue",0,function(e){let s=(0,t.useRef)(""),n=(0,t.useRef)("");return(0,r.useEvent)(()=>{let t=e.current;if(!t)return"";let l=t.innerText;if(s.current===l)return n.current;let r=(function(e){let t=e.getAttribute("aria-label");if("string"==typeof t)return t.trim();let s=e.getAttribute("aria-labelledby");if(s){let e=s.split(" ").map(e=>{let t=document.getElementById(e);if(t){let e=t.getAttribute("aria-label");return"string"==typeof e?e.trim():i(t).trim()}return null}
4).filter(Boolean);if(e.length>0)return e.join(", ")}return i(e).trim()})(t).trim().toLowerCase();return s.current=l,n.current=r,r})}],249578)},992704,919751,e=>{"use strict";var t=e.i(271645),s=e.i(835696);e.s(["useElementSize",0,function(e,n=!1){let[l,i]=(0,t.useReducer)(()=>({}),{}),r=(0,t.useMemo)(()=>(function(e){if(null===e)return{width:0,height:0};let{width:t,height:s}=e.getBoundingClientRect();return{width:t,height:s}})(e),[e,l]);return(0,s.useIsoMorphicEffect)(()=>{if(!e)return;let t=new ResizeObserver(i);return t.observe(e),()=>{t.disconnect()}},[e]),n?{width:`${r.width}px`,height:`${r.height}px`}:r}],992704);var n=e.i(953760),l=e.i(408632),i=e.i(229315),r=e.i(343084),a="u"<typeof Element;a||Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,a||Element.prototype.getRootNode;var o=e.i(174080);let u={...t},c=u.useInsertionEffect||(e=>e());function d(e){let s=t.useRef(()=>{});return c(()=>{s.current=e}),t.useCallback(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return null==s.current?void 0:s.current(...t)},[])}var p="u">typeof document?t.useLayoutEffect:t.useEffect;let m=!1,f=0,h=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+f++,x=u.useId||function(){let[e,s]=t.useState(()=>m?h():void 0);return p(()=>{null==e&&s(h())},[]),t.useEffect(()=>{m=!0},[]),e},v=t.createContext(null),b=t.createContext(null),g="active",y="selected";function w(e,t,s){let n=new Map,l="item"===s,i=e;if(l&&e){let{[g]:t,[y]:s,...n}=e;i=n}return{..."floating"===s&&{tabIndex:-1,"data-floating-ui-focusable":""},...i,...t.map(t=>{let n=t?t[s]:null;return"function"==typeof n?e?n(e):null:n}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[s,i]=t;if(!(l&&[g,y].includes(s)))if(0===s.indexOf("on")){if(n.has(s)||n.set(s,[]),"function"==typeof i){var r;null==(r=n.get(s))||r.push(i),e[s]=function(){for(var e,t=arguments.length,l=Array(t),i=0;i<t;i++)l[i]=arguments[i];return null==(e=n.get(s))?void 0:e.map(e=>e(...l)).find(e=>void 0!==e)}}}else e[s]=i}),e),{})}}function C(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}var S=e.i(746725),N=e.i(914189),k=e.i(813581);let E=(0,t.createContext)({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});E.displayName="FloatingContext";let j=(0,t.createContext)(null);function T(e,n,l){let i=(0,S.useDisposables)(),r=(0,N.useEvent)((e,t)=>{if(null==e)return[l,null];if("number"==typeof e)return[e,null];if("string"==typeof e){if(!t)return[l,null];let s=R(e,t);return[s,n=>{let l=function e(t){let s=/var\((.*)\)/.exec(t);if(s){let t=s[1].indexOf(",");if(-1===t)return[s[1]];let n=s[1].slice(0,t).trim(),l=s[1].slice(t+1).trim();return l?[n,...e(l)]:[n]}return[]}(e);{let r=l.map(e=>window.getComputedStyle(t).getPropertyValue(e));i.requestAnimationFrame(function a(){i.nextFrame(a);let o=!1;for(let[e,s]of l.entries()){let n=window.getComputedStyle(t).getPropertyValue(s);if(r[e]!==n){r[e]=n,o=!0;break}}if(!o)return;let u=R(e,t);s!==u&&(n(u),s=u)})}return i.dispose}]}return[l,null]}),a=(0,t.useMemo)(()=>r(e,n)[0],[e,n]),[o=a,u]=(0,t.useState)();return(0,s.useIsoMorphicEffect)(()=>{let[t,s]=r(e,n);if(u(t),s)return s(u)},[e,n]),o}function R(e,t){let s=document.createElement("div");t.appendChild(s),s.style.setProperty("margin-top","0px","important"),s.style.setProperty("margin-top",e,"important");let n=parseFloat(window.getComputedStyle(s).marginTop)||0;return t.removeChild(s),n}j.displayName="PlacementContext",e.s(["FloatingProvider",0,function({children:e,enabled:a=!0}){var u,c,m,f,h,g,y;let S,R,I,L,O,M,F,_,P,D,[A,B]=(0,t.useState)(null),[z,W]=(0,t.useState)(0),H=(0,t.useRef)(null),[V,K]=(0,t.useState)(null);c=V,(0,s.useIsoMorphicEffect)(()=>{if(!c)return;let e=new MutationObserver(()=>{let e=window.getComputedStyle(c).maxHeight,t=parseFloat(e);if(isNaN(t))return;let s=parseInt(e);isNaN(s)||t!==s&&(c.style.maxHeight=`${Math.ceil(t)}px`)});return e.observe(c,{attributes:!0,attributeFilter:["style"]}),()=>{e.disconnect()}},[c]);let G=a&&null!==A&&null!==V,{to:U="bottom",gap:$=0,offset:Z=0,padding:J=0,inner:q}=(m=A,f=V,S=T(null!=(h=null==m?void 0:m.gap)?h:"var(--anchor-gap, 0)",f),R=T(null!=(g=null==m?void 0:m.offset)?g:"var(--anchor-offset, 0)",f),I=T(null!=(y=null==m?void 0:m.padding)?y:"var(--anchor-padding, 0)",f),{...m,gap:S,offset:R,padding:I}),[Q,X="center"]=U.split(" ");(0,s.useIsoMorphicEffect)(()=>{G&&W(0)},[G]);let{refs:Y,floatingStyles:ee,context:et}=function(e){void 0===e&&(e={});let{nodeId:s}=e,n=function(e){var s;let{open:n=!1,onOpenChange:l,elements:i}=e,r=x(),a=t.useRef({}),[o]=t.useState(()=>{let e;
4return e=new Map,{emit(t,s){var n;null==(n=e.get(t))||n.forEach(e=>e(s))},on(t,s){e.set(t,[...e.get(t)||[],s])},off(t,s){var n;e.set(t,(null==(n=e.get(t))?void 0:n.filter(e=>e!==s))||[])}}}),u=null!=((null==(s=t.useContext(v))?void 0:s.id)||null),[c,p]=t.useState(i.reference),m=d((e,t,s)=>{a.current.openEvent=e?t:void 0,o.emit("openchange",{open:e,event:t,reason:s,nested:u}),null==l||l(e,t,s)}),f=t.useMemo(()=>({setPositionReference:p}),[]),h=t.useMemo(()=>({reference:c||i.reference||null,floating:i.floating||null,domReference:i.reference}),[c,i.reference,i.floating]);return t.useMemo(()=>({dataRef:a,open:n,onOpenChange:m,elements:h,events:o,floatingId:r,refs:f}),[n,m,h,o,r,f])}({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,a=r.elements,[o,u]=t.useState(null),[c,m]=t.useState(null),f=(null==a?void 0:a.domReference)||o,h=t.useRef(null),g=t.useContext(b);p(()=>{f&&(h.current=f)},[f]);let y=(0,l.useFloating)({...e,elements:{...a,...c&&{reference:c}}}),w=t.useCallback(e=>{let t=(0,i.isElement)(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;m(t),y.refs.setReference(t)},[y.refs]),C=t.useCallback(e=>{((0,i.isElement)(e)||null===e)&&(h.current=e,u(e)),((0,i.isElement)(y.refs.reference.current)||null===y.refs.reference.current||null!==e&&!(0,i.isElement)(e))&&y.refs.setReference(e)},[y.refs]),S=t.useMemo(()=>({...y.refs,setReference:C,setPositionReference:w,domReference:h}),[y.refs,C,w]),N=t.useMemo(()=>({...y.elements,domReference:f}),[y.elements,f]),k=t.useMemo(()=>({...y,...r,refs:S,elements:N,nodeId:s}),[y,S,N,s,r]);return p(()=>{r.dataRef.current.floatingContext=k;let e=null==g?void 0:g.nodesRef.current.find(e=>e.id===s);e&&(e.context=k)}),t.useMemo(()=>({...y,context:k,refs:S,elements:N}),[y,S,N,k])}({open:G,placement:"selection"===Q?"center"===X?"bottom":`bottom-${X}`:"center"===X?`${Q}`:`${Q}-${X}`,strategy:"absolute",transform:!1,middleware:[(0,l.offset)({mainAxis:"selection"===Q?0:$,crossAxis:Z}),(0,l.shift)({padding:J}),"selection"!==Q&&(0,l.flip)({padding:J}),"selection"===Q&&q?{name:"inner",options:L={...q,padding:J,overflowRef:H,offset:z,minItemsVisible:4,referenceOverflowThreshold:J,onFallbackChange(e){var t,s;if(!e)return;let n=et.elements.floating;if(!n)return;let l=parseFloat(getComputedStyle(n).scrollPaddingBottom)||0,i=Math.min(4,n.childElementCount),r=0,a=0;for(let e of null!=(s=null==(t=et.elements.floating)?void 0:t.childNodes)?s:[])if(k.isHTMLElement(e)){let t=e.offsetTop,s=t+e.clientHeight+l,o=n.scrollTop,u=o+n.clientHeight;if(t>=o&&s<=u)i--;else{a=Math.max(0,Math.min(s,u)-Math.max(t,o)),r=e.clientHeight;break}}i>=1&&W(e=>{let t=r*i-a+l;return e>=t?e:t})}},async fn(e){let{listRef:t,overflowRef:s,onFallbackChange:i,offset:a=0,index:u=0,minItemsVisible:c=4,referenceOverflowThreshold:d=0,scrollRef:p,...m}=(0,r.evaluate)(L,e),{rects:f,elements:{floating:h}}=e,x=t.current[u],v=(null==p?void 0:p.current)||h,b=h.clientTop||v.clientTop,g=0!==h.clientTop,y=0!==v.clientTop,w=h===v;if(!x)return{};let S={...e,...await (0,l.offset)(-x.offsetTop-h.clientTop-f.reference.height/2-x.offsetHeight/2-a).fn(e)},N=await (0,n.detectOverflow)(C(S,v.scrollHeight+b+h.clientTop),m),k=await (0,n.detectOverflow)(S,{...m,elementContext:"reference"}),E=(0,r.max)(0,N.top),j=S.y+E,T=(v.scrollHeight>v.clientHeight?e=>e:r.round)((0,r.max)(0,v.scrollHeight+(g&&w||y?2*b:0)-E-(0,r.max)(0,N.bottom)));if(v.style.maxHeight=T+"px",v.scrollTop=E,i){let e=v.offsetHeight<x.offsetHeight*(0,r.min)(c,t.current.length)-1||k.top>=-d||k.bottom>=-d;o.flushSync(()=>i(e))}return s&&(s.current=await (0,n.detectOverflow)(C({...S,y:j},v.offsetHeight+b+h.clientTop),m)),{y:j}}}:null,(0,l.size)({padding:J,apply({availableWidth:e,availableHeight:t,elements:s}){Object.assign(s.floating.style,{overflow:"auto",maxWidth:`${e}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${t}px)`})}})].filter(Boolean),whileElementsMounted:n.autoUpdate}),[es=Q,en=X]=et.placement.split("-");"selection"===Q&&(es="selection");let el=(0,t.useMemo)(()=>({anchor:[es,en].filter(Boolean).join(" ")}),[es,en]),{getReferenceProps:ei,getFloatingProps:er}=(O=(u=[function(e,s){let{open:n,elements:l}=e,{enabled:i=!0,overflowRef:r,scrollRef:a,onChange:u}=s,c=d(u),p=t.useRef(!1),m=t.useRef(null),f=t.useRef(null);t.useEffect(()=>{if(!i)return;function e(e){if(e.ctrlKey||!t||null==r.current)return;let s=e.deltaY,n=r.current.top>=-.5,l=r.current.bottom>=-.5,i=t.scrollHeight-t.clientHeight,a=s<0?-1:1,u=s<0?"max":"min";if(!(t.scrollHeight<=t.clientHeight))if(!n&&s>0||!l&&s<0)e.preventDefault(),o.flushSync(()=>{c(e=>e+Math[u](s,i*a))});else{let e;/firefox/i.test((e=navigator.userAgentData)&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:s}=e;return t+"/"+s}).join(" "):navigator.userAgent)&&(t.scrollTop+=s)}}let t=(null==a?void 0:a.current)||l.floating;if(n&&t)return t.addEventListener("wheel",e),requestAnimationFrame(()=>{m.current=t.scrollTop,null!=r.current&&(f.current={...r.current})}),()=>{m.current=null,f.current=null,t.removeEventListener("wheel",e)}},[i,n,l.floating,r,a,c]);let h=t.useMemo(()=>({onKeyDown(){p.current=!0},onWheel(){p.current=!1},onPointerMove(){p.current=!1},onScroll(){let e=(null==a?void 0:a.current)||l.floating;if(r.current&&e&&p.current){if(null!==m.current){let t=e.scrollTop-m.current;(r.current.bottom<-.5&&t<-1||r.current.top<-.5&&t>1)&&o.flushSync(()=>c(e=>e+t))}requestAnimationFrame(()=>{m.current=e.scrollTop})}}}),[l.floating,c,r,a]);return t.useMemo(()=>i?{floating:h}:{},[i,h])}(et,{overflowRef:H,onChange:W})]).map(e=>null==e?void 0:e.reference),M=u.map(e=>null==e?void 0:e.floating),F=u.map(e=>null==e?void 0:e.item),_=t.useCallback(e=>w(e,u,"reference"),O),P=t.useCallback(e=>w(e,u,"floating"),M),D=t.useCallback(e=>w(e,u,"item"),F),t.useMemo(()=>({getReferenceProps:_,getFloatingProps:P,getItemProps:D}),[_,P,D])),ea=(0,N.useEvent)(e=>{K(e),Y.setFloating(e)});return t.createElement(j.Provider,{value:B},t.createElement(E.Provider,{value:{setFloating:ea,setReference:Y.setReference,styles:ee,getReferenceProps:ei,getFloatingProps:er,slot:el}},e))},"useFloatingPanel",0,function(e=null){!1===e&&(e=null),"string"==typeof e&&(e={to:e});let n=(0,t.useContext)(j),l=(0,t.useMemo)(()=>e,[JSON.stringify(e,(e,t)=>{var s;return null!=(s=null==t?void 0:t.outerHTML)?s:t})]);(0,s.useIsoMorphicEffect)(()=>{null==n||n(null!=l?l:null)},[n,l]);let i=(0,t.useContext)(E);return(0,t.useMemo)(()=>[i.setFloating,e?i.styles:{}],[i.setFloating,e,i.styles])},"useFloatingPanelProps",0,function(){let{getFloatingProps:e,slot:s}=(0,t.useContext)(E);return(0,t.useCallback)((...t)=>Object.assign({},e(...t),{"data-anchor":s.anchor}),[e,s])},"useFloatingReference",0,function(){return(0,t.useContext)(E).setReference},"useFloatingReferenceProps",0,function(){return(0,t.useContext)(E).getReferenceProps},"useResolvedAnchor",0,function(e){return(0,t.useMemo)(()=>e?"string"==typeof e?{to:e}:e:null,[e])}],919751)},157138,571616,65659,e=>{"use strict";let t,s;var n=e.i(271645),l=e.i(813581),i=e.i(22357),r=((t=r||{})[t.Ignore=0]="Ignore",t[t.Select=1]="Select",t[t.Close=2]="Close",t);function a(e){return[e.screenX,e.screenY]}e.s(["Action",0,{Ignore:{kind:0},Select:e=>({kind:1,target:e}),Close:{kind:2}},"useQuickRelease",0,function(e,{trigger:t,action:s,close:r,select:a}){let o=(0,n.useRef)(null);(0,i.useDocumentEvent)(e&&null!==t,"pointerdown",e=>{l.isNode(null==e?void 0:e.target)&&null!=t&&t.contains(e.target)&&(o.current=ne
4w Date)}),(0,i.useDocumentEvent)(e&&null!==t,"pointerup",e=>{if(null===o.current||!l.isHTMLorSVGElement(e.target))return;let t=s(e),n=new Date().getTime()-o.current.getTime();switch(o.current=null,t.kind){case 0:return;case 1:n>200&&(a(t.target),r());break;case 2:r()}},{capture:!0})}],157138),e.s(["useTrackedPointer",0,function(){let e=(0,n.useRef)([-1,-1]);return{wasMoved(t){let s=a(t);return(e.current[0]!==s[0]||e.current[1]!==s[1])&&(e.current=s,!0)},update(t){e.current=a(t)}}}],571616);var o=((s=o||{})[s.First=0]="First",s[s.Previous=1]="Previous",s[s.Next=2]="Next",s[s.Last=3]="Last",s[s.Specific=4]="Specific",s[s.Nothing=5]="Nothing",s);e.s(["Focus",0,o,"calculateActiveIndex",0,function(e,t){let s=t.resolveItems();if(s.length<=0)return null;let n=t.resolveActiveIndex(),l=null!=n?n:-1;switch(e.focus){case 0:for(let e=0;e<s.length;++e)if(!t.resolveDisabled(s[e],e,s))return e;return n;case 1:-1===l&&(l=s.length);for(let e=l-1;e>=0;--e)if(!t.resolveDisabled(s[e],e,s))return e;return n;case 2:for(let e=l+1;e<s.length;++e)if(!t.resolveDisabled(s[e],e,s))return e;return n;case 3:for(let e=s.length-1;e>=0;--e)if(!t.resolveDisabled(s[e],e,s))return e;return n;case 4:for(let n=0;n<s.length;++n)if(t.resolveId(s[n],n,s)===e.id)return n;return n;case 5:return null;default:throw Error("Unexpected object: "+e)}}],65659)},144279,e=>{"use strict";var t=e.i(271645);e.s(["useResolveButtonType",0,function(e,s){return(0,t.useMemo)(()=>{var t;if(e.type)return e.type;let n=null!=(t=e.as)?t:"button";if("string"==typeof n&&"button"===n.toLowerCase()||(null==s?void 0:s.tagName)==="BUTTON"&&!s.hasAttribute("type"))return"button"},[e.type,e.as,s])}])},340143,e=>{"use strict";var t=e.i(271645),s=e.i(402155),n=e.i(835696);e.s(["useTreeWalker",0,function(e,{container:l,accept:i,walk:r}){let a=(0,t.useRef)(i),o=(0,t.useRef)(r);(0,t.useEffect)(()=>{a.current=i,o.current=r},[i,r]),(0,n.useIsoMorphicEffect)(()=>{if(!l||!e)return;let t=(0,s.getOwnerDocument)(l);if(!t)return;let n=a.current,i=o.current,r=Object.assign(e=>n(e),{acceptNode:n}),u=t.createTreeWalker(l,NodeFilter.SHOW_ELEMENT,r,!1);for(;u.nextNode();)i(u.currentNode)},[l,e,a,o])}])},140721,694421,e=>{"use strict";var t=e.i(271645),s=e.i(174080),n=e.i(746725);function l(e={},t=null,s=[]){for(let[n,r]of Object.entries(e))!function e(t,s,n){if(Array.isArray(n))for(let[l,r]of n.entries())e(t,i(s,l.toString()),r);else n instanceof Date?t.push([s,n.toISOString()]):"boolean"==typeof n?t.push([s,n?"1":"0"]):"string"==typeof n?t.push([s,n]):"number"==typeof n?t.push([s,`${n}`]):null==n?t.push([s,""]):l(n,s,t)}(s,i(t,n),r);return s}function i(e,t){return e?e+"["+t+"]":t}e.s(["attemptSubmit",0,function(e){var t,s;let n=null!=(t=null==e?void 0:e.form)?t:e.closest("form");if(n){for(let t of n.elements)if(t!==e&&("INPUT"===t.tagName&&"submit"===t.type||"BUTTON"===t.tagName&&"submit"===t.type||"INPUT"===t.nodeName&&"image"===t.type))return void t.click();null==(s=n.requestSubmit)||s.call(n)}},"objectToFormEntries",0,l],694421);var r=e.i(700020),a=e.i(2788);let o=(0,t.createContext)(null);function u({children:e}){let n=(0,t.useContext)(o);if(!n)return t.default.createElement(t.default.Fragment,null,e);let{target:l}=n;return l?(0,s.createPortal)(t.default.createElement(t.default.Fragment,null,e),l):null}function c({setForm:e,formId:s}){return(0,t.useEffect)(()=>{if(s){let t=document.getElementById(s);t&&e(t)}},[e,s]),s?null:t.default.createElement(a.Hidden,{features:a.HiddenFeatures.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:t=>{if(!t)return;let s=t.closest("form");s&&e(s)}})}e.s(["FormFields",0,function({data:e,form:s,disabled:i,onReset:o,overrides:d}){let[p,m]=(0,t.useState)(null),f=(0,n.useDisposables)();return(0,t.useEffect)(()=>{if(o&&p)return f.addEventListener(p,"reset",o)},[p,s,o]),t.default.createElement(u,null,t.default.createElement(c,{setForm:m,formId:s}),l(e).map(([e,n])=>t.default.createElement(a.Hidden,{features:a.HiddenFeatures.Hidden,...(0,r.compact)({key:e,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:s,disabled:i,name:e,value:n,...d})})))},"FormFieldsProvider",0,function(e){let[s,n]=(0,t.useState)(null);return t.default.createElement(o.Provider,{value:{target:s}},e.children,t.default.createElement(a.Hidden,{features:a.HiddenFeatures.Hidden,ref:n}))}],140721)},904016,e=>{"use strict";var t=e.i(271645);
4function s(e,s){let[n,l]=(0,t.useState)(s);return e||n===s||l(s),e?n:s}e.s(["Frozen",0,function({children:e,freeze:n}){let l=s(n,e);return t.default.createElement(t.default.Fragment,null,l)},"useFrozenData",0,s])},233538,e=>{"use strict";var t=e.i(813581);e.s(["isDisabledReactIssue7711",0,function(e){let s=e.parentElement,n=null;for(;s&&!t.isHTMLFieldSetElement(s);)t.isHTMLLegendElement(s)&&(n=s),s=s.parentElement;let l=(null==s?void 0:s.getAttribute("disabled"))==="";return!(l&&function(e){if(!e)return!1;let s=e.previousElementSibling;for(;null!==s;){if(t.isHTMLLegendElement(s))return!1;s=s.previousElementSibling}return!0}(n))&&l}])},429427,371330,e=>{"use strict";let t;var s=e.i(271645);let n="u">typeof document?s.default.useLayoutEffect:()=>{},l=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])'];l.join(":not([hidden]),"),l.push('[tabindex]:not([tabindex="-1"]):not([disabled])'),l.join(':not([hidden]):not([tabindex="-1"]),');let i=e=>{var t;return null!=(t=null==e?void 0:e.ownerDocument)?t:document},r=e=>e&&"window"in e&&e.window===e?e:i(e).defaultView||window;function a(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function o(e){var t;let l,i=(0,s.useRef)({isFocused:!1,observer:null});n(()=>{let e=i.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]);let r=(t=t=>{null==e||e(t)},l=(0,s.useRef)(null),n(()=>{l.current=t},[t]),(0,s.useCallback)((...e)=>{let t=l.current;return null==t?void 0:t(...e)},[]));return(0,s.useCallback)(e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){i.current.isFocused=!0;let t=e.target;t.addEventListener("focusout",e=>{i.current.isFocused=!1,t.disabled&&r(a(e)),i.current.observer&&(i.current.observer.disconnect(),i.current.observer=null)},{once:!0}),i.current.observer=new MutationObserver(()=>{if(i.current.isFocused&&t.disabled){var e;null==(e=i.current.observer)||e.disconnect();let s=t===document.activeElement?null:document.activeElement;t.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),t.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),i.current.observer.observe(t,{attributes:!0,attributeFilter:["disabled"]})}},[r])}function u(e){var t;return!("u"<typeof window)&&null!=window.navigator&&((null==(t=window.navigator.userAgentData)?void 0:t.brands.some(t=>e.test(t.brand)))||e.test(window.navigator.userAgent))}function c(e){var t;return"u">typeof window&&null!=window.navigator&&e.test((null==(t=window.navigator.userAgentData)?void 0:t.platform)||window.navigator.platform)}function d(e){let t=null;return()=>(null==t&&(t=e()),t)}let p=d(function(){return c(/^Mac/i)}),m=d(function(){return c(/^iPhone/i)}),f=d(function(){return c(/^iPad/i)||p()&&navigator.maxTouchPoints>1}),h=d(function(){return m()||f()});d(function(){return p()||h()}),d(function(){return u(/AppleWebKit/i)&&!x()});let x=d(function(){return u(/Chrome/i)}),v=d(function(){return u(/Android/i)});d(function(){return u(/Firefox/i)});let b={prefix:String(Math.round(1e10*Math.random())),current:0};s.default.createContext(b),s.default.createContext(!1),"u">typeof window&&window.document&&window.document.createElement,new WeakMap;s.default.useId;let g=null,y=new Set,w=new Map,C=!1,S=!1,N={Tab:!0,Escape:!0};function k(e,t){for(let s of y)s(e,t)}function E(e){C=!0,e.metaKey||!p()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(g="keyboard",k("keyboard",e))}
4function j(e){g="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(C=!0,k("pointer",e))}function T(e){(0===e.mozInputSource&&e.isTrusted||(v()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType))&&(C=!0,g="virtual")}function R(e){e.target!==window&&e.target!==document&&e.isTrusted&&(C||S||(g="virtual",k("virtual",e)),C=!1,S=!1)}function I(){C=!1,S=!0}function L(e){if("u"<typeof window||"u"<typeof document||w.get(r(e)))return;let t=r(e),s=i(e),n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){C=!0,n.apply(this,arguments)},s.addEventListener("keydown",E,!0),s.addEventListener("keyup",E,!0),s.addEventListener("click",T,!0),t.addEventListener("focus",R,!0),t.addEventListener("blur",I,!1),"u">typeof PointerEvent&&(s.addEventListener("pointerdown",j,!0),s.addEventListener("pointermove",j,!0),s.addEventListener("pointerup",j,!0)),t.addEventListener("beforeunload",()=>{O(e)},{once:!0}),w.set(t,{focus:n})}let O=(e,t)=>{let s=r(e),n=i(e);t&&n.removeEventListener("DOMContentLoaded",t),w.has(s)&&(s.HTMLElement.prototype.focus=w.get(s).focus,n.removeEventListener("keydown",E,!0),n.removeEventListener("keyup",E,!0),n.removeEventListener("click",T,!0),s.removeEventListener("focus",R,!0),s.removeEventListener("blur",I,!1),"u">typeof PointerEvent&&(n.removeEventListener("pointerdown",j,!0),n.removeEventListener("pointermove",j,!0),n.removeEventListener("pointerup",j,!0)),w.delete(s))};function M(){return"pointer"!==g}"u">typeof document&&("loading"!==(t=i(void 0)).readyState?L(void 0):t.addEventListener("DOMContentLoaded",()=>{L(void 0)}));let F=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function _(e,t){return!!t&&!!e&&e.contains(t)}function P(){let e=(0,s.useRef)(new Map),t=(0,s.useCallback)((t,s,n,l)=>{let i=(null==l?void 0:l.once)?(...t)=>{e.current.delete(n),n(...t)}:n;e.current.set(n,{type:s,eventTarget:t,fn:i,options:l}),t.addEventListener(s,i,l)},[]),n=(0,s.useCallback)((t,s,n,l)=>{var i;let r=(null==(i=e.current.get(n))?void 0:i.fn)||n;t.removeEventListener(s,r,l),e.current.delete(n)},[]),l=(0,s.useCallback)(()=>{e.current.forEach((e,t)=>{n(e.eventTarget,e.type,t,e.options)})},[n]);return(0,s.useEffect)(()=>l,[l]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:l}}e.s(["useFocusRing",0,function(e={}){var t;let{autoFocus:n=!1,isTextInput:l,within:u}=e,c=(0,s.useRef)({isFocused:!1,isFocusVisible:n||M()}
4),[d,p]=(0,s.useState)(!1),[m,f]=(0,s.useState)(()=>c.current.isFocused&&c.current.isFocusVisible),h=(0,s.useCallback)(()=>f(c.current.isFocused&&c.current.isFocusVisible),[]),x=(0,s.useCallback)(e=>{c.current.isFocused=e,p(e),h()},[h]);t={isTextInput:l},L(),(0,s.useEffect)(()=>{let e=(e,s)=>{var n;let l,a,o,u,d;n=!!(null==t?void 0:t.isTextInput),l=i(null==s?void 0:s.target),a="u">typeof window?r(null==s?void 0:s.target).HTMLInputElement:HTMLInputElement,o="u">typeof window?r(null==s?void 0:s.target).HTMLTextAreaElement:HTMLTextAreaElement,u="u">typeof window?r(null==s?void 0:s.target).HTMLElement:HTMLElement,d="u">typeof window?r(null==s?void 0:s.target).KeyboardEvent:KeyboardEvent,(n=n||l.activeElement instanceof a&&!F.has(l.activeElement.type)||l.activeElement instanceof o||l.activeElement instanceof u&&l.activeElement.isContentEditable)&&"keyboard"===e&&s instanceof d&&!N[s.key]||(e=>{c.current.isFocusVisible=e,h()})(M())};return y.add(e),()=>{y.delete(e)}},[]);let{focusProps:v}=function(e){let{isDisabled:t,onFocus:n,onBlur:l,onFocusChange:r}=e,a=(0,s.useCallback)(e=>{if(e.target===e.currentTarget)return l&&l(e),r&&r(!1),!0},[l,r]),u=o(a),c=(0,s.useCallback)(e=>{var t;let s=i(e.target),l=s?((e=document)=>e.activeElement)(s):((e=document)=>e.activeElement)();e.target===e.currentTarget&&l===(t=e.nativeEvent,t.target)&&(n&&n(e),r&&r(!0),u(e))},[r,n,u]);return{focusProps:{onFocus:!t&&(n||r||l)?c:void 0,onBlur:!t&&(l||r)?a:void 0}}}({isDisabled:u,onFocusChange:x}),{focusWithinProps:b}=function(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:l,onFocusWithinChange:r}=e,u=(0,s.useRef)({isFocusWithin:!1}),{addGlobalListener:c,removeAllGlobalListeners:d}=P(),p=(0,s.useCallback)(e=>{e.currentTarget.contains(e.target)&&u.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(u.current.isFocusWithin=!1,d(),n&&n(e),r&&r(!1))},[n,r,u,d]),m=o(p),f=(0,s.useCallback)(e=>{var t;if(!e.currentTarget.contains(e.target))return;let s=i(e.target),n=((e=document)=>e.activeElement)(s);if(!u.current.isFocusWithin&&n===(t=e.nativeEvent,t.target)){l&&l(e),r&&r(!0),u.current.isFocusWithin=!0,m(e);let t=e.currentTarget;c(s,"focus",e=>{if(u.current.isFocusWithin&&!_(t,e.target)){let n=new s.defaultView.FocusEvent("blur",{relatedTarget:e.target});Object.defineProperty(n,"target",{value:t}),Object.defineProperty(n,"currentTarget",{value:t}),p(a(n))}},{capture:!0})}},[l,r,m,c,p]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:f,onBlur:p}}}({isDisabled:!u,onFocusWithinChange:x});return{isFocused:d,isFocusVisible:m,focusProps:u?b:v}}],429427);let D=!1,A=0;function B(e){"touch"===e.pointerType&&(D=!0,setTimeout(()=>{D=!1},50))}function z(){if("u">typeof document)return"u">typeof PointerEvent&&document.addEventListener("pointerup",B),A++,()=>{!(--A>0)&&"u">typeof PointerEvent&&document.removeEventListener("pointerup",B)}}e.s(["useHover",0,function(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:l,isDisabled:r}=e,[a,o]=(0,s.useState)(!1),u=(0,s.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,s.useEffect)(z,[]);let{addGlobalListener:c,removeAllGlobalListeners:d}=P(),{hoverProps:p,triggerHoverEnd:m}=(0,s.useMemo)(()=>{let e=(e,t)=>{let s=u.target;u.pointerType="",u.target=null,"touch"!==t&&u.isHovered&&s&&(u.isHovered=!1,d(),l&&l({type:"hoverend",target:s,pointerType:t}),n&&n(!1),o(!1))},s={};return"u">typeof PointerEvent&&(s.onPointerEnter=s=>{D&&"mouse"===s.pointerType||((s,l)=>{if(u.pointerType=l,r||"touch"===l||u.isHovered||!s.currentTarget.contains(s.target))return;u.isHovered=!0;let a=s.currentTarget;u.target=a,c(i(s.target),"pointerover",t=>{u.isHovered&&u.target&&!_(u.target,t.target)&&e(t,t.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:a,pointerType:l}),n&&n(!0),o(!0)})(s,s.pointerType)},s.onPointerLeave=t=>{!r&&t.currentTarget.contains(t.target)&&e(t,t.pointerType)}),{hoverProps:s,triggerHoverEnd:e}},[t,n,l,r,u,c,d]);return(0,s.useEffect)(()=>{r&&m({currentTarget:u.target},u.pointerType)},[r]),{hoverProps:p,isHovered:a}}],371330)},961888,e=>{"use strict";
4let t=(0,e.i(475254).default)("Blocks",[["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["path",{d:"M10 21V8a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1H3",key:"1fpvtg"}]]);e.s(["Blocks",0,t],961888)},316251,e=>{"use strict";var t=e.i(843476),s=e.i(271645);let n=({size:e=24,color:t="currentColor",...n})=>s.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},s.createElement("path",{d:"M16.111 3C19.633 3 22 6.353 22 9.48 22 15.814 12.178 21 12 21c-.178 0-10-5.186-10-11.52C2 6.352 4.367 3 7.889 3 9.91 3 11.233 4.024 12 4.924 12.767 4.024 14.089 3 16.111 3Z"}));n.displayName="HeartRounded";var l=e.i(481355),i=e.i(846932),r=e.i(166540),a=e.i(657688),o=e.i(833401),u=e.i(927231),c=e.i(251458),d=e.i(99161),p=e.i(767683),m=e.i(88956),f=e.i(503975),h=e.i(674842),x=e.i(539910),v=e.i(456466),b=e.i(24874),g=e.i(447721);let y=()=>{let e=(0,m.useUiTranslations)();return(0,t.jsxs)(x.Flex,{col:!0,className:"items-start gap-x-10 gap-y-5 sm:flex-row sm:items-center",children:[(0,t.jsxs)("div",{className:"flex flex-row items-center gap-1.5",children:[(0,t.jsx)(g.Text,{isMono:!0,level:p.isNewLookEnabled?"TextSmMedium":"xs",children:e.footer.support}),(0,t.jsx)(h.AddressKeyText,{textLevel:p.isNewLookEnabled?"TextSmMedium":"xs",hotOrColdKey:"5GKH9FPPnWSUoeeTJp19wVtd84XqFW4pyK2ijV2GsFbhTrP1",className:(0,f.cn)(p.isNewLookEnabled?"text-brand":"text-accent-1","font-mono")}),(0,t.jsx)(n,{size:16,fill:"currentColor",className:(0,f.cn)(p.isNewLookEnabled?"text-brand":"text-accent-1")})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1 lg:flex-row",children:[(0,t.jsxs)(g.Text,{isMono:!0,level:p.isNewLookEnabled?"TextSmMedium":"xs",children:[e.footer.poweredBy," ",(0,t.jsxs)("span",{className:"group inline-flex items-center gap-0 transition-[gap] duration-300 hover:gap-1",children:[(0,t.jsx)(v.Link,{href:"https://blockmachine.io/bittensor-rpc",className:(0,f.cn)('relative inline-block after:absolute after:bottom-0 after:left-0 after:h-px after:w-full after:origin-left after:scale-x-0 after:bg-current after:transition-transform after:duration-300 after:content-[""] hover:after:scale-x-100',p.isNewLookEnabled?"text-brand":"text-accent-1"),target:"_blank",rel:"noopener noreferrer",children:"Blockmachine"}),p.isNewLookEnabled?(0,t.jsx)(l.LinkExternal01,{size:14,"aria-hidden":!0,className:(0,f.cn)("text-brand w-0 shrink-0 overflow-hidden opacity-0 transition-all duration-300 group-hover:w-3.5 group-hover:opacity-100")}):(0,t.jsx)(o.BiLinkExternal,{size:14,"aria-hidden":!0,className:(0,f.cn)("text-accent-1 w-0 shrink-0 overflow-hidden opacity-0 transition-all duration-300 group-hover:w-3.5 group-hover:opacity-100")})]})]}),(0,t.jsx)(g.Text,{isMono:!0,level:p.isNewLookEnabled?"TextSmMedium":"xs",className:p.isNewLookEnabled?"text-secondary":"text-[#949494]",children:e.footer.rpcInfrastructure})]})]})},w=()=>{let e=(0,m.useUiTranslations)();return(0,t.jsxs)(g.Text,{level:p.isNewLookEnabled?"sm":"xs",className:p.isNewLookEnabled?"text-primary text-balance font-mono uppercase":"font-base text-[#808080]",children:["© ",(0,r.utc)().toDate().getUTCFullYear()," ",e.footer.copyright]})},C=({title:e,items:s})=>{let{getWebUrl:n,getDashUrl:l}=(0,c.useUrlResolver)();return(0,t.jsxs)("div",{className:"xs:col-span-2 col-span-1 flex w-full flex-col gap-3",children:[(0,t.jsx)(g.Text,{level:p.isNewLookEnabled?"sm":"md",className:p.isNewLookEnabled?"text-primary font-mono font-medium uppercase":"font-medium",children:e}),(0,t.jsx)("div",{className:"flex flex-col gap-2",children:s.map(e=>(0,t.jsx)(v.Link,{className:(0,f.cn)("whitespace-nowrap text-sm hover:opacity-70",p.isNewLookEnabled?"text-secondary font-mono uppercase":"text-[#ABABAB]"),href:"web"===e.type?n(e.url):"dash"===e.type?l(e.url):e.url,target:"absolute"===e.type?"_blank":void 0,rel:"absolute"===e.type?"noopener noreferrer":void 0,children:e.label},e.label))})]})},S=()=>(0,t.jsx)(x.Flex,{className:(0,f.cn)("items-center gap-3",p.isNewLookEnabled?"":"py-8"),children:u.socials.map(e=>(0,t.jsx)(v.Link,{href:e.url,className:"text-3xl hover:opacity-70",children:(0,t.jsx)(e.Icon,{})},e.url))});e.s(["BottomBar",0,function(){let e=(0,u.getDeveloperList)(!0),s=(0,u.getProList)(),n=(0,m.useUiTranslations)(),l=n.footer.links,r=e=>e.map(e=>({...e,label:l[e.label]??e.label})),o=n.footer.sections;return(0,t.jsxs)(x.Flex,{col:!0,className:(0,f.cn)("overflow-hidden",p.isNewLookEnabled?"bg-footer gap-2xl pt-5xl xl:pb-5xl w-full pb-[calc(env(safe-area-inset-bottom)+var(--mobile-nav-reserved-space))] backdrop-blur-2xl xl:gap-14":"relative gap-2.5 bg-[#141414]/80 bg-cover px-10 lg:px-3 xl:px-10 2xl:px-20"),style:p.isNewLookEnabled?{"--mobile-nav-reserved-space"
4:`${u.MOBILE_BOTTOM_NAV_RESERVED_SPACE_PX}px`}:void 0,children:[p.isNewLookEnabled?(0,t.jsxs)("div",{className:"gap-2xl xl:gap-5xl max-w-nl-wide md:px-6xl px-xl xl:px-8xl mx-auto flex w-full flex-col justify-between xl:flex-row",children:[(0,t.jsxs)(x.Flex,{col:!0,className:"gap-xl xl:gap-3xl xl:max-w-xl",children:[(0,t.jsxs)(x.Flex,{className:"gap-xl items-center justify-between",children:[(0,t.jsx)(b.TaostatsLogo,{width:148,height:28,className:"h-auto max-w-36"}),(0,t.jsx)("div",{className:"xl:hidden",children:(0,t.jsx)(S,{})})]}),(0,t.jsx)(g.Text,{level:"sm",className:"text-tertiary text-balance",children:n.footer.description}),(0,t.jsx)("div",{className:"hidden xl:flex",children:(0,t.jsx)(S,{})})]}),(0,t.jsxs)("div",{className:"border-primary gap-2xl pt-2xl xl:gap-5xl grid grid-cols-2 border-t md:grid-cols-3 xl:flex xl:border-none xl:pt-0",children:[(0,t.jsxs)("div",{className:"gap-2xl flex flex-col xl:w-[200px]",children:[(0,t.jsx)(C,{title:o.Blockchain,items:r(u.blockChainList)}),(0,t.jsx)(C,{title:o.App,items:r(u.appLinksList)})]}),(0,t.jsxs)("div",{className:"gap-2xl flex flex-col xl:w-[200px]",children:[(0,t.jsx)(C,{title:o.Network,items:r(u.networkList)}),(0,t.jsx)(C,{title:o.Investors,items:r(u.investorsList)})]}),(0,t.jsxs)("div",{className:"gap-2xl hidden flex-col md:flex xl:w-[200px]",children:[(0,t.jsx)(C,{title:o.Developers,items:r(e)}),(0,t.jsx)(C,{title:o.Pro,items:r(s)})]}),(0,t.jsx)("div",{className:"gap-2xl flex flex-col md:hidden",children:(0,t.jsx)(C,{title:o.Developers,items:r(e)})}),(0,t.jsx)("div",{className:"gap-2xl flex flex-col md:hidden",children:(0,t.jsx)(C,{title:o.Pro,items:r(s)})})]})]}):(0,t.jsxs)(x.Flex,{col:!0,className:"mb-11 gap-6 sm:px-10 lg:flex-row",children:[(0,t.jsxs)(x.Flex,{col:!0,className:"mt-8 w-full lg:mt-12 lg:w-1/2",children:[(0,t.jsx)(a.default,{src:d.imagePaths.logo.taostats,alt:"taostats Logo· Official Block Explorer & Gateway to Bittensor",height:40,width:256,className:"h-10 w-40 sm:h-16",loading:"lazy"}),(0,t.jsx)(x.Flex,{col:!0,className:"mt-8 w-full max-w-[414px] gap-4",children:u.footerDescription.map(e=>(0,t.jsx)(g.Text,{level:"sm",className:"font-light text-[#949494]",children:e},e))}),(0,t.jsx)(S,{})]}),(0,t.jsx)("div",{className:"mt-12 w-full px-0 lg:mt-16 lg:w-1/2",children:(0,t.jsxs)("div",{className:"grid w-full grid-cols-6 gap-5",children:[(0,t.jsxs)("div",{className:"xs:col-span-4 col-span-6 grid w-full grid-cols-2",children:[(0,t.jsxs)("div",{className:"col-span-1 flex w-full flex-col gap-5",children:[(0,t.jsx)(C,{title:o.Blockchain,items:r(u.blockChainList)}),(0,t.jsx)(C,{title:o.App,items:r(u.appLinksList)})]}),(0,t.jsxs)("div",{className:"col-span-1 flex w-full flex-col gap-5",children:[(0,t.jsx)(C,{title:o.Network,items:r(u.networkList)}),(0,t.jsx)(C,{title:o.Investors,items:r(u.investorsList)})]})]}),(0,t.jsxs)("div",{className:"xs:col-span-2 col-span-6 grid w-full grid-cols-2 gap-5",children:[(0,t.jsx)(C,{title:o.Developers,items:r(e)}),(0,t.jsx)(C,{title:o.Pro,items:r(s)})]})]})})]}),(0,t.jsxs)(x.Flex,{col:!0,className:(0,f.cn)(p.isNewLookEnabled?"border-primary gap-2xl pt-2xl max-w-nl-wide md:px-6xl px-xl xl:px-8xl relative z-10 mx-auto w-full flex-col-reverse justify-between border-t 2xl:w-full 2xl:flex-row-reverse 2xl:border-none 2xl:pt-0":"relative z-10 mb-10 justify-between gap-4 sm:pl-10 lg:flex-row-reverse lg:pr-28 xl:pr-20"),children:[(0,t.jsx)(y,{}),(0,t.jsx)(w,{})]}),p.isNewLookEnabled?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.motion.div,{initial:{scale:.8,opacity:0,rotate:45,x:400,y:200},animate:{scale:1,opacity:1,rotate:0,x:0,y:0},transition:{duration:.4},className:"pointer-events-none absolute -bottom-20 left-2/4 h-40 w-[40rem] rounded-full bg-[#00DBBC] bg-opacity-50 blur-[100px]"}),(0,t.jsx)(i.motion.div,{initial:{scale:.8,opacity:0,rotate:45,x:400,y:200},animate:{scale:1,opacity:1,rotate:0,x:0,y:0},transition:{duration:.4},className:"pointer-events-none absolute -bottom-20 left-1/3 h-40 w-[40rem] rounded-full bg-[#7D6250] bg-opacity-50 blur-[100px]"}),(0,t.jsx)(i.motion.div,{initial:{scale:.8,opacity:0,rotate:45,x:-400,y:200}
4,animate:{scale:1,opacity:1,rotate:0,x:0,y:0},transition:{duration:.4},className:"pointer-events-none absolute -bottom-20 left-1/4 h-40 w-[40rem] rounded-full bg-[#FF8B25] bg-opacity-50 blur-[100px]"})]})]})}],316251)},394414,e=>{"use strict";var t=e.i(843476),s=e.i(271645),n=e.i(618566),l=e.i(640602),i=e.i(450270),r=e.i(456466),a=e.i(447721);e.s(["Breadcrumbs",0,()=>{let{windowSize:e}=(0,i.useWindowSize)(),o=(0,n.usePathname)().split("/").filter(e=>""!==e),u=e=>e.split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");return(0,t.jsx)("div",{className:"flex h-14 w-full items-center justify-start gap-3 overflow-x-auto border-b border-neutral-900 px-2 md:px-10",children:o.map((n,i)=>{let c=i===o.length-1,d=`/${o.slice(0,i+1).join("/")}`;return!d.endsWith("s")&&!d.endsWith("/evm")&&Number.isNaN(Number(n))&&(d+="s"),(0,t.jsx)(s.default.Fragment,{children:c?(0,t.jsx)(a.Text,{level:"sm",children:(e.width??0)>596?u(n.replace(/_/g," ")):(0,l.walletFormat)(u(n.replace(/_/g," ")))}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.Link,{href:d,children:(0,t.jsx)(a.Text,{level:"sm",className:"hover:text-ocean truncate break-words",children:u(n.replace(/_/g," "))})}),(0,t.jsx)(a.Text,{level:"sm",className:"opacity-40",children:"/"})]})},n)})})}])},789060,e=>{"use strict";var t=e.i(843476),s=e.i(271645),n=e.i(174080),l=e.i(318995);let i=({size:e=24,color:t="currentColor",...n})=>s.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},s.createElement("path",{d:"M3 12h18M3 6h18M9 18h12"}));i.displayName="Menu04";var r=e.i(170149),a=e.i(519069),o=e.i(927231),u=e.i(526747),c=e.i(88956),d=e.i(251458),p=e.i(356143),m=e.i(770486),f=e.i(47192);let h=/\/subnets\/(?<netuid>\d+)/,x=/\/validators\/(?<hotkey>[^/?#]+)/;var v=e.i(402216),b=e.i(365205),g=e.i(420676),y=e.i(608968),w=e.i(579133),C=e.i(503975),S=e.i(767683),N=e.i(456466),k=e.i(447721);let E={paddingBottom:`calc(env(safe-area-inset-bottom) + ${w.NEW_LOOK_SPACING_SCALE.lg})`};function j({navRef:e,isOpen:s,activeIndicatorLeftPx:n,routeActiveTab:l,overlayTab:i,tabs:r,tabIconSizes:a,tabIconTabletSizeClasses:o,onTabClick:u,onSetTabButtonRef:c}){return(0,t.jsx)("div",{className:"bg-secondary border-primary fixed inset-x-0 bottom-0 z-50 border-t shadow-[0_-8px_24px_rgba(0,0,0,0.25)] backdrop-blur-xl xl:hidden",children:(0,t.jsxs)("nav",{ref:e,"aria-label":"Mobile bottom navigation",className:(0,C.cn)("max-w-168 relative mx-auto w-full",S.isNewLookEnabled?"px-xl pt-lg":"px-4 pt-3"),style:E,children:[s&&null!==n?(0,t.jsx)("div",{className:"bg-fg-brand absolute top-[-1px] h-[2px] w-[27px] rounded-bl-[2px] rounded-br-[2px] shadow-[0_4px_10.4px_rgba(0,219,188,0.57)]",style:{left:`${n}px`}}):null,(0,t.jsx)("ul",{className:(0,C.cn)("flex items-start justify-between",S.isNewLookEnabled?"gap-md":"gap-2"),children:r.map(({id:e,label:n,Icon:r})=>{let d=e===l,p=s&&e===i,m=a[e],f="Home"===e,h=(0,C.cn)("flex w-full flex-col items-center justify-between pb-0 pt-0 transition-colors",p||d?"text-fg-primary":"text-fg-tertiary hover:text-fg-primary"),x=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"flex h-6 items-center justify-center md:h-8",children:(0,t.jsx)(r,{size:m,className:(0,C.cn)(p?"text-fg-brand":d?"text-fg-primary":"text-fg-tertiary",o[e])})}),(0,t.jsx)(k.Text,{level:f||p||d?"TextXsMedium":"TextXsRegular",className:(0,C.cn)(p?"text-fg-brand":d?"text-fg-primary":"text-fg-tertiary","md:text-sm"),children:n})]});return(0,t.jsx)("li",{className:"flex-1",children:f?(0,t.jsx)(N.Link,{href:"/","aria-label":n,"aria-current":d?"page":void 0,className:h,onClick:()=>{u(e)},children:x}):(0,t.jsx)("button",{ref:t=>{c(e,t)},type:"button","aria-label":n,"aria-current":d?"page":void 0,className:h,onClick:()=>{u(e)},children:x})},e)})})]})})}var T=e.i(7062),R=e.i(88653),I=e.i(846932),L=e.i(51861),O=e.i(345333);let M=(0,e.i(475254).default)("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);var F=e.i(107233),_=e.i(357729),P=e.i(15610),D=e.i(764241),A=e.i(689932);function B({children:e,className:s}){return(0,t.jsx)("div",{className:(0,C.cn)("border-primary p-md flex w-full flex-col rounded-lg border","bg-[linear-gradient(0deg,rgba(27,28,31,0.3),rgba(27,28,31,0.3)),linear-gradient(0deg,rgba(255,255,255,0)_34.52%,rgba(255,255,255,0.02)_100%)]",s),children:e})}function z({title:e,href:s,onNavigate:n,iconClassName:l="text-fg-primary"}){return(0,t.jsxs)(N.Link,{href:s,className:"border-primary flex items-center justify-between border-b pb-2",onClick:n,children:[(0,t.jsx)(k.Text,{level:"TextSmMedium",className:"text-fg-primary font-mono uppercase",children:e}),(0,t.jsx)(A.ChevronRight,{size:20,className:l})]})}function W({title:e,onClick:s,trailing:n}){return(0,t.jsxs)("button",{type:"button",className:"flex w-full items-center justify-between text-left",onClick:s,children:[(0,t.jsx)(k.Text,{level:"TextSmMedium",className:"text-fg-primary font-mono uppercase",children:e}),n]})}function H({href:e,onNavigate:s,children:n,iconClassName:l="text-fg-tertiary shrink-0"}){return(0,t.jsxs)(N.Link,{href:e,className:"text-fg-secondary hover:text-fg-primary flex items-center justify-between gap-3 rounded-md px-2 py-2 transition-colors",onClick:s,children:[(0,t.jsx)("div",{className:"min-w-0 flex-1",children:n}),(0,t.jsx)(A.ChevronRight,{size:20,className:l})]})}function V({children:e,className:s}){return(0,t.jsx)("ul",{className:(0,C.cn)("gap-md flex flex-col",s),children:e})}function K({children:e,className:s}){return(0,t.jsx)(k.Text,{level:"TextSmRegular",className:(0,C.cn)("truncate text-inherit",s),children:e})}function G({children:e,className:s}){return(0,t.jsx)(k.Text,{level:"TextXsRegular",className:(0,C.cn)("text-fg-tertiary truncate",s),children:e})}function U({item:e}){if("subnet"===e.resultType&&"number"==typeof e.subnetNetuid)return(0,t.jsx)(P.SubnetNameDisplayV2,{inline:!0,netuid:e.subnetNetuid,subnetName:e.subnetName??e.label});if("validator"===e.resultType&&e.address)return(0,t.jsx)(_.AddressFormatter,{info:e.address,isValidator:!0,noCopy:!0,noLink:!0,rootClassName:"min-w-0 max-w-full flex-1",className:"text-fg-primary min-w-0",textClassName:"text-fg-primary"});if(("connected-wallet"===e.resultType||"account"===e.resultType||"exchange"===e.resultType)&&e.address){let s=e.label!==e.address?e.label:void 0;return(0,t.jsx)(_.AddressFormatter,{info:e.address,nameOverride:s,noCopy:!0,noLink:!0,rootClassName:"min-w-0 max-w-full flex-1",className:"text-fg-primary min-w-0",textClassName:"text-fg-primary"})}return(0,t.jsx)(K,{className:"text-fg-primary",children:e.label})}function $({isMoreSearchActive:e,moreSearchResults:s,moreOverlaySections:n,openM
4oreSectionId:l,onClose:i,onToggleMoreSection:r}){let a=(0,c.useUiTranslations)();return(0,t.jsxs)("div",{className:"gap-lg flex w-full flex-1 flex-col",children:[e?(0,t.jsx)(B,{children:s.length>0?(0,t.jsx)(V,{children:s.map(e=>(0,t.jsx)("li",{children:(0,t.jsxs)(H,{href:e.href,onNavigate:i,children:[(0,t.jsx)(U,{item:e}),(0,t.jsx)(G,{children:e.subtitle})]})},`${e.sectionTitle}-${e.href}`))}):(0,t.jsx)(k.Text,{level:"TextSmRegular",className:"text-fg-tertiary",children:a.search.noResults})}):n.map(e=>{let s=l===e.id;return(0,t.jsxs)(B,{children:[(0,t.jsx)(W,{title:e.title,onClick:()=>{r(e.id)},trailing:s?(0,t.jsx)(M,{size:20,className:"text-fg-primary"}):(0,t.jsx)(F.Plus,{size:20,className:"text-fg-primary"})}),(0,t.jsx)("div",{className:`grid transition-all duration-300 ease-out ${s?"grid-rows-[1fr] pt-1 opacity-100":"grid-rows-[0fr] opacity-0"}`,children:(0,t.jsx)("div",{className:"overflow-hidden",children:(0,t.jsx)(V,{children:e.items.map(s=>(0,t.jsx)("li",{children:(0,t.jsx)(H,{href:s.href,onNavigate:i,children:(0,t.jsx)(K,{children:s.label})})},`${e.id}-${s.label}-${s.href}`))})})})]},e.id)}),e?null:(0,t.jsx)("div",{className:"mt-auto w-full",children:(0,t.jsx)(D.WalletConnector,{fullWidth:!0})})]})}function Z({completeDashNavigationLinks:e,onClose:s}){let{getDashUrl:n}=(0,d.useUrlResolver)(),l=(0,c.useUiTranslations)().dashboard,i=l.labels,r=l.descriptions,a=e=>{let l=e.newLookIcon??e.Icon,a=i[e.labelKey??e.label]??e.label,o=e.description?r[e.descriptionKey??e.label]??e.description:void 0;return(0,t.jsxs)(N.Link,{href:n(e.href),target:e.target,className:"hover:bg-navitem-selected hover:border-primary gap-lg p-md flex items-center rounded-xl border border-transparent",onClick:s,children:[(0,t.jsx)("div",{className:"bg-tertiary flex h-9 w-9 shrink-0 items-center justify-center rounded-sm",style:{backgroundImage:"linear-gradient(0deg, rgb(var(--nl-fg-primary) / 0) 34.52%, rgb(var(--nl-fg-primary) / 0.02) 100%), linear-gradient(0deg, rgb(var(--nl-bg-tertiary) / 1), rgb(var(--nl-bg-tertiary) / 1))",boxShadow:"inset 0px 0.73px 0px 0px rgb(var(--nl-fg-primary) / 0.15)"},children:(0,t.jsx)(l,{className:"text-fg-brand",size:20})}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,t.jsx)(k.Text,{level:"TextSmMedium",className:"text-fg-primary truncate",children:a}),o?(0,t.jsx)(k.Text,{level:"TextSmRegular",className:"text-fg-tertiary truncate",children:o}):null]}),(0,t.jsx)(A.ChevronRight,{size:20,className:"text-fg-secondary shrink-0"})]})};return(0,t.jsxs)("div",{className:"gap-4xl flex w-full flex-col",children:[(0,t.jsxs)("section",{className:"gap-lg flex w-full flex-col",children:[(0,t.jsx)(k.Text,{level:"TextSmMedium",className:"text-fg-tertiary uppercase",children:l.sectionInvestors}),(0,t.jsx)("div",{className:"flex flex-col gap-2",children:e.dashboardItems.map(e=>(0,t.jsx)("div",{children:a(e)},e.label))})]}),(0,t.jsxs)("section",{className:"gap-lg flex w-full flex-col",children:[(0,t.jsx)(k.Text,{level:"TextSmMedium",className:"text-fg-tertiary uppercase",children:l.sectionBuilders}),(0,t.jsx)("div",{className:"flex flex-col gap-2",children:e.developerItems.map(e=>(0,t.jsx)("div",{children:a(e)},e.label))})]})]})}function J({title:e,href:s,items:n,onClose:l,renderItem:i}){return(0,t.jsxs)(B,{children:[(0,t.jsx)(z,{title:e,href:s,onNavigate:l}),(0,t.jsx)("div",{children:(0,t.jsx)(V,{children:n.map(e=>(0,t.jsx)("li",{children:(0,t.jsx)(H,{href:e.href,onNavigate:l,children:i(e)})},`${e.label}-${e.href}`))})})]})}function q({title:e,href:s,items:n,onClose:l}){return(0,t.jsx)(J,{title:e,href:s,items:n,onClose:l,renderItem:e=>{let s=e.subnetNetuid;return"number"==typeof s&&Number.isFinite(s)?(0,t.jsx)(P.SubnetNameDisplayV2,{inline:!0,netuid:s,subnetName:e.subnetName,subnetClassName:"text-sm",netuidClassName:"text-sm"}):(0,t.jsx)(K,{children:e.label})}})}function Q({title:e,href:s,items:n,onClose:l}){return(0,t.jsx)(J,{title:e,href:s,items:n,onClose:l,renderItem:e=>{let s=e.validatorHotkey;return"string"==typeof s&&s.length>0?(0,t.jsx)(_.AddressFormatter,{info:s,isValidator:!0,noLink:!0,noCopy:!0,rootClassName:"min-w-0 max-w-full flex-1",className:"text-fg-primary min-w-0 text-sm",textClassName:"text-fg-primary"}):(0,t.jsx)(K,{children:e.label})}})}let X={duration:.2,ease:"easeOut"},Y={duration:.25,ease:"easeOut"},ee={duration:.18,ease:"easeOut"};function et({isOpen:e,overlayTab:s,activeLabel:n,showSearchInput:l,searchPlaceholder:i,headerBottom:r,moreOverlaySections:a,completeDashNavigationLinks:o,openMoreSectionId:u,isMoreSearchActive:c,moreSearchResults:d,filteredOverlayItems:p,overlayContentTitle:m,overlayContentHref:f,listEndSpacerHeight:h,isOverlayLoading:x,onClose:v,onToggleMoreSection:b,setGlobalFilter:g}){return(0,t.jsxs)(R.AnimatePresence,{children:[e?(0,t.jsx)(I.motion.button,{type:"button","aria-label":"Close mobile navigation panel backdrop",className:"fixed inset-x-0 bottom-0 z-40 bg-black/60 xl:hidden",style:{to
4p:r},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:X,onClick:v},"mobile-nav-backdrop"):null,e?(0,t.jsxs)(I.motion.div,{className:"bg-primary fixed inset-x-0 bottom-0 z-40 flex flex-col overflow-y-auto [-ms-overflow-style:none] [scrollbar-width:none] xl:hidden [&::-webkit-scrollbar]:hidden",style:{top:r},initial:{opacity:0,y:16},animate:{opacity:1,y:0},exit:{opacity:0,y:16},transition:Y,children:[(0,t.jsx)("button",{type:"button","aria-label":"Close mobile navigation panel",className:"text-fg-secondary hover:text-fg-primary bg-secondary/60 right-2xl top-lg absolute z-10 flex size-9 items-center justify-center rounded-full transition-colors",onClick:v,children:(0,t.jsx)(T.XClose,{className:"size-xl"})}),(0,t.jsxs)("div",{className:"px-2xl flex min-h-full flex-col pt-14",children:[(0,t.jsx)(R.AnimatePresence,{mode:"wait",initial:!1,children:(0,t.jsxs)(I.motion.div,{className:"flex min-h-0 flex-1 flex-col",initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0,y:-8},transition:ee,children:[l?(0,t.jsx)("div",{className:"mb-lg w-full",children:(0,t.jsx)(L.SearchInputV2,{type:"Menu",searchPlaceholder:i,setGlobalFilter:g,inputStyleClassName:"w-full"},s)}):null,x?(0,t.jsx)("div",{className:"flex flex-1 items-center justify-center py-10",children:(0,t.jsx)(O.Spinner,{size:"lg"})}):"More"===s?(0,t.jsx)($,{isMoreSearchActive:c,moreSearchResults:d,moreOverlaySections:a,openMoreSectionId:u,onClose:v,onToggleMoreSection:b}):"Subnets"===s?(0,t.jsx)(q,{title:m??n,href:f??"/",items:p,onClose:v}):"Validators"===s?(0,t.jsx)(Q,{title:m??n,href:f??"/",items:p,onClose:v}):(0,t.jsx)(Z,{completeDashNavigationLinks:o,onClose:v})]},s)}),(0,t.jsx)("div",{"aria-hidden":"true",className:"w-full shrink-0",style:{height:h}})]})]},"mobile-nav-panel"):null]})}let es={Home:22,Subnets:22,Validators:24,Pro:18,More:22},en={Home:"md:size-7",Subnets:"md:size-7",Validators:"md:size-8",Pro:"md:size-6",More:"md:size-7"},el=`calc(env(safe-area-inset-bottom) + ${o.MOBILE_BOTTOM_NAV_BAR_HEIGHT_PX+24}px)`,ei=[a.appRoutes.base.landing,a.appRoutes.subnets.home,a.appRoutes.blockchain.blocks,a.appRoutes.blockchain.transfer,a.appRoutes.blockchain.delegation,a.appRoutes.blockchain.accounts,a.appRoutes.blockchain.extrinsic,a.appRoutes.blockchain.event,a.appRoutes.blockchain.tokenomics,a.appRoutes.validator.home,a.appRoutes.analytics.exchanges];function er({className:e,size:s=22}){return(0,t.jsx)("svg",{width:s,height:s,viewBox:"0 0 22 22",fill:"none",className:e,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,t.jsxs)("g",{children:[(0,t.jsx)("path",{d:"M16.1563 16.5117L11.6445 13.9336V19.3562L16.1563 21.957V16.5117Z",fill:"currentColor",fillOpacity:"0.95"}),(0,t.jsx)("path",{d:"M17.4453 21.9568L21.6437 19.5568C21.862 19.4474 22 19.2245 22 18.9802V13.9336L17.4453 16.5116V21.9568Z",fill:"currentColor",fillOpacity:"0.95"}),(0,t.jsx)("path",{d:"M10.7382 0.0125466L6.26562 2.34763L10.9999 5.03704L15.7342 2.34763L11.2616 0.0125466C11.0951 -0.0614739 10.9047 -0.0614739 10.7382 0.0125466Z",fill:"currentColor",fillOpacity:"0.95"}),(0,t.jsx)("path",{d:"M21.5877 12.6845L16.8007 10.3125L12.0566 12.6845L16.8007 15.3957L21.5877 12.6845Z",fill:"currentColor",fillOpacity:"0.95"}),(0,t.jsx)("path",{d:"M0.356171 19.557L4.55469 21.957V16.5117L0 13.9336V18.9804C0 19.2246 0.137802 19.4475 0.356171 19.557Z",fill:"currentColor",fillOpacity:"0.95"}),(0,t.jsx)("path",{d:"M5.84375 21.9568L10.3555 19.37V13.9336L5.84375 16.5116V21.9568Z",fill:"currentColor",fillOpacity:"0.95"}),(0,t.jsx)("path",{d:"M0.412109 12.6845L5.1991 15.3957L9.94312 12.6845L5.1991 10.3125L0.412109 12.6845Z",fill:"currentColor",fillOpacity:"0.95"}),(0,t.jsx)("path",{d:"M11.6445 11.4496L16.1563 9.19327V3.57812L11.6445 6.15608V11.4496Z",fill:"currentColor",fillOpacity:"0.95"}),(0,t.jsx)("path",{d:"M5.84375 9.19344L10.3555 11.4498V6.15625L5.84375 3.57812V9.19344Z",fill:"currentColor",fillOpacity:"0.95"})]})})}function ea({className:e,size:s=22}){return(0,t.jsxs)("svg",{width:s,height:s,viewBox:"0 0 22 22",fill:"none",className:e,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M9.87321 1C7.39108 1 5.37891 3.01217 5.37891 5.49431C5.37891 7.97645 7.39108 9.9886 9.87321 9.9886C12.3553 9.9886 14.3675 7.97645 14.3
4675 5.49431C14.3675 3.01217 12.3553 1 9.87321 1Z",fill:"currentColor",fillOpacity:"0.95"}),(0,t.jsx)("path",{d:"M10.3202 12.1839C10.5729 11.817 10.3299 11.2574 9.88441 11.2573H8.68822C4.99442 11.2573 2 14.2517 2 17.9455C2 19.4529 3.222 20.6749 4.72941 20.6749H9.95051C10.4014 20.6749 10.6439 20.1012 10.3822 19.7341C9.61399 18.657 9.16211 17.3386 9.16211 15.9148C9.16211 14.5297 9.58975 13.2444 10.3202 12.1839Z",fill:"currentColor",fillOpacity:"0.95"}),(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.8327 15.9149C20.8327 18.7234 18.5559 21.0002 15.7474 21.0002C12.9389 21.0002 10.6621 18.7234 10.6621 15.9149C10.6621 13.1064 12.9389 10.8296 15.7474 10.8296C18.5559 10.8296 20.8327 13.1064 20.8327 15.9149ZM18.6574 13.9826C18.969 14.2556 19.0004 14.7294 18.7275 15.041L16.1586 17.974C15.6803 18.5201 14.8389 18.5452 14.3288 18.0286L12.8862 16.5675C12.5952 16.2728 12.5982 15.7979 12.893 15.5069C13.1877 15.2159 13.6626 15.2189 13.9536 15.5136L14.8296 16.4009C15.0336 16.6075 15.3702 16.5975 15.5615 16.379L17.5991 14.0527C17.872 13.7411 18.3459 13.7097 18.6574 13.9826Z",fill:"currentColor",fillOpacity:"0.95"})]})}function eo({className:e,size:s=18}){return(0,t.jsx)(p.Taostats,{className:e,width:s,height:s})}e.s(["MobileBottomNavV2",0,function({completeWebNavigationLinks:e,completeDashNavigationLinks:a,validators:p,isLoading:w}){let[C,S]=(0,s.useState)(!1),[N,k]=(0,s.useState)("Home"),[E,T]=(0,s.useState)(null),[R,I]=(0,s.useState)(""),L=(0,u.useLocaleStrippedPathname)(),{getWebUrl:O}=(0,d.useUrlResolver)(),M=(0,c.useUiTranslations)(),F=(0,s.useContext)(m.NavigationContext),{state:{accounts:_}}=(0,r.useChainAndWalletContext)(),{headerBottom:P,activeIndicatorLeftPx:D,navRef:A,tabButtonRefs:B}=(({isOpen:e,overlayTab:t,indicatorWidth:n})=>{let l=(0,f.useSecondaryNavHeaderBottom)(o.MOBILE_BOTTOM_NAV_TOP_TRIM_PX,e),[i,r]=(0,s.useState)(null),a=(0,s.useRef)(null),u=(0,s.useRef)({Home:null,Subnets:null,Validators:null,Pro:null,More:null});return(0,s.useEffect)(()=>{let s=()=>{if(!e)return void r(null);let s=a.current,l=u.current[t];if(!s||!l)return;let i=s.getBoundingClientRect(),o=l.getBoundingClientRect(),c=n/2;r(o.left+o.width/2-i.left-c)},l=window.requestAnimationFrame(s);return window.addEventListener("resize",s),()=>{window.cancelAnimationFrame(l),window.removeEventListener("resize",s)}},[n,e,t]),{headerBottom:l,activeIndicatorLeftPx:i,navRef:a,tabButtonRefs:u}})({isOpen:C,overlayTab:N,indicatorWidth:27}),z="/"===L?"Home":L.startsWith("/subnets")?"Subnets":L.startsWith("/validators")?"Validators":L.startsWith("/pro")?"Pro":"More",W=(0,s.useMemo)(()=>[{id:"Home",label:M.mobileNav.tabs.home,Icon:l.HomeLine},{id:"Subnets",label:M.navigation.sections.subnets,Icon:er},{id:"Validators",label:M.navigation.sections.validators,Icon:ea},{id:"Pro",label:M.footer.sections.Pro,Icon:eo},{id:"More",label:M.mobileNav.tabs.more,Icon:i}],[M.mobileNav.tabs.home,M.mobileNav.tabs.more,M.navigation.sections.subnets,M.navigation.sections.validators,M.footer.sections.Pro]);(0,s.useEffect)(()=>{C||k(z)},[C,z]),(0,s.useEffect)(()=>{I("")},[C,N]),(0,s.useEffect)(()=>{T(null)},[C,N]),(0,s.useEffect)(()=>{if(!C)return;let e=document.body.style.overflow,t=document.body.style.touchAction,s=document.documentElement.style.overflow;return document.body.style.overflow="hidden",document.body.style.touchAction="none",document.documentElement.style.overflow="hidden",()=>{document.body.style.overflow=e,document.body.style.touchAction=t,document.documentElement.style.overflow=s}},[C]);let{activeLabel:H,overlayContent:V,moreOverlaySections:K,moreSearchSections:G,showSearchInput:U,filteredOverlayItems:$,searchPlaceholder:Z}=(({overlayTab:e,globalFilter:t,completeWebNavigationLinks:n,completeDashNavigationLinks:l,validators:i})=>{let r=(0,c.useUiTranslations)(),a=(0,s.useMemo)(()=>{if("Subnets"===e){let e=n.find(e=>"subnets"===e.id);if(!e)return null;let t=(e.children??[]).map(e=>{let t=h.exec(e.href),s=t?.groups?.netuid?Number.parseInt(t.groups.netuid,10):NaN,n=e.label.includes(":")?e.label.split(":").slice(1).join(":").trim():e.label;return{...e,searchText:`${n} ${Number.isFinite(s)?s:""}`,subnetNetuid:s,subnetName:n}});return{title:e.label,href:e.href,items:t}}if("Validators"===e){let e=n.find(e=>"validators"===e.id);if(!e)return null;let t=new Map(i.map(e=>
4[e.hotkey.ss58,e.coldkey.ss58])),s=(e.children??[]).map(e=>{let s=x.exec(e.href),n=s?.groups?.hotkey??"",l=t.get(n)??"";return{...e,searchText:`${e.label} ${l} ${n}`,validatorHotkey:n}});return{title:e.label,href:e.href,items:s}}if("Pro"===e){let e=[...l.dashboardItems,...l.developerItems].map(e=>({label:e.label,href:e.href,searchText:e.label,Icon:e.newLookIcon}));return{title:r.footer.sections.Pro,href:l.dashboardItems[0]?.href??"/dashboard",items:e}}return null},[l.dashboardItems,l.developerItems,n,e,r.footer.sections.Pro,i]),o=(0,s.useMemo)(()=>"More"!==e?[]:n.filter(e=>"subnets"!==e.id&&"validators"!==e.id).map(e=>{let t=[{label:e.label,href:e.href,searchText:e.label},...(e.children??[]).map(e=>({...e,searchText:e.label}))];return{id:e.id,title:e.label,items:t}}),[n,e]),u=(0,s.useMemo)(()=>{if("More"!==e)return[];let t=[...l.dashboardItems,...l.developerItems].map(e=>({label:e.label,href:e.href,searchText:e.label}));return 0===t.length?o:[...o,{id:"pro",title:r.footer.sections.Pro,items:t}]},[l.dashboardItems,l.developerItems,o,e,r.footer.sections.Pro]),d="Subnets"===e||"Validators"===e||"More"===e,p=t.trim().toLowerCase(),m=(0,s.useMemo)(()=>a?.items.filter(t=>"Subnets"!==e&&"Validators"!==e||0===p.length||t.searchText.toLowerCase().includes(p))??[],[a?.items,e,p]),f="Subnets"===e?r.search.filterBySubnetOrNetuid:"Validators"===e?r.search.filterByValidator:r.search.filterBySiteOrBlockchain;return{activeLabel:e,overlayContent:a,moreOverlaySections:o,moreSearchSections:u,showSearchInput:d,filteredOverlayItems:m,searchPlaceholder:f}})({overlayTab:N,globalFilter:R,completeWebNavigationLinks:e,completeDashNavigationLinks:a,validators:p}),J=F?.latestBlock??0x5f5e0ff,q=(0,s.useMemo)(()=>F?.validatorData??[],[F?.validatorData]),{isMoreSearchActive:Q,moreSearchResults:X}=(({overlayTab:e,globalFilter:t,sitePages:n,getWebUrl:l,latestBlockNumber:i,subnetData:r,validatorData:a,connectedAccounts:o,moreOverlaySections:u})=>{let d=(0,c.useUiTranslations)().search.groups,p=t.trim().toLowerCase(),m="More"===e&&p.length>0,{results:f,accountSearchSuggestions:h,pageSearchResults:x,chainSearchResults:w}=(({isActive:e,globalFilter:t,sitePages:n,getWebUrl:l,latestBlockNumber:i,subnetData:r,validatorData:a,connectedAccounts:o,sections:u})=>{let c=t.trim().toLowerCase(),d=(0,b.useAccountSearchSuggestions)({globalFilter:t,connectedAccounts:o,validatorData:a}),p=(0,y.useSitePageSearchResults)({query:c,pages:n,getWebUrl:l}),m=(0,g.useChainSearchResults)({globalFilter:t,latestBlockNumber:i,subnetData:r,validatorData:a,accountSearchSuggestions:d,getWebUrl:l}),f=(0,s.useMemo)(()=>0===c.length?[]:u.flatMap(e=>e.items.map(t=>({label:t.label,href:t.href,sectionTitle:e.title,searchText:`${e.title} ${t.searchText}`,resultType:"page",subtitle:e.title}))).filter(e=>e.searchText.toLowerCase().includes(c)),[u,c]);return{results:(0,s.useMemo)(()=>e?Array.from(new Map([...p,...m,...f].map(e=>[e.href,e])).values()):[],[m,e,p,f]),accountSearchSuggestions:d,pageSearchResults:p,chainSearchResults:m}})({isActive:m,globalFilter:t,sitePages:n,getWebUrl:l,latestBlockNumber:i,subnetData:r,validatorData:a,connectedAccounts:o,sections:u}),C=(0,s.useMemo)(()=>e=>e.map(e=>({...e,subtitle:(0,v.localizeSearchResultSubtitle)(e,d)})),[d]);return{isMoreSearchActive:m,moreSearchResults:C(f),accountSearchSuggestions:h,pageSearchResults:C(x),chainSearchResults:C(w)}})({overlayTab:N,globalFilter:R,sitePages:ei,getWebUrl:O,latestBlockNumber:J,subnetData:(0,s.useMemo)(()=>F?.subnetData??[],[F?.subnetData]),validatorData:q,connectedAccounts:_,moreOverlaySections:G}),Y="u">typeof document;return(0,t.jsxs)(t.Fragment,{children:[Y?(0,n.createPortal)((0,t.jsx)(et,{isOpen:C,overlayTab:N,activeLabel:H,showSearchInput:U,searchPlaceholder:Z,headerBottom:P,moreOverlaySections:K,openMoreSectionId:E,isMoreSearchActive:Q,moreSearchResults:X,filteredOverlayItems:$,completeDashNavigationLinks:a,overlayContentTitle:V?.title,overlayContentHref:V?.href,listEndSpacerHeight:el,isOverlayLoading:!!w&&("Subnets"===N||"Validators"===N),onClose:()=>{S(!1)},onToggleMoreSection:e=>{T(t=>t===e?null:e)},setGlobalFilter:I}),document.body):null,(0,t.jsx)(j,{isOpen:C,navRef:A,activeIndicatorLeftPx:D,routeActiveTab:z,overlayTab:N,tabs:W,tabIconSizes:es,tabIconTabletSizeClasses:en,onTabClick:e=>{"Home"===e?S(!1):(k(e),S(!0))},onSetTabButtonRef:(e,t)=>{B.current[e]=t}})]})}],789060)},497935,e=>{"use strict";var t=e.i(843476),s=e.i(271645),n=e.i(503975),l=e.i(44490),i=e.i(767683),r=e.i(526747),a=e.i(34935),o=e.i(689932),u=e.i(833401),c=e.i(88956),d=e.i(251458),p=e.i(55442),m=e.i(539910),f=e.i(456466),h=e.i(369845),x=e.i(447721);function v(){return(0,t.jsxs)("svg",{width:"316",height:"167",viewBox:"0 0 316 167",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"h-full w-full object-contain","aria-hidden":"true",children:[(0,t.jsxs)("g",{clipPath:"url(#clip0_15067_300234)",children:[(0,t.jsx)("path",{d:"M225.608 96.2159C215.965 93.8956 206.292 97.0596 199.813 103.659",stroke:"#EBC247",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round"}),(0,t.jsx)("path",{d:"M200.658 142.5C203.973 145.634 208.131 147.984 212.892 149.099C227.507 152.625 242.182 143.615 245.708 129",stroke:"#EBC247",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round"}),(0,t.jsx)("path",{d:"M219.583 134.667L223.169 119.781C223.169 119.781 223.41 114.869 218.679 113.543L213.557 134.606C213.557 134.606 213.828 141.688 222.024 139.699C222.024 139.699 218.499 139.066 219.583 134.636V134.667Z",fill:"#00DBBC"}),(0,t.jsx)("path",{d:"M236.669 112.488L212.984 106.702C208.645 106.311 207.168 110.71 207.168 110.71L230.732 116.436C235.644 117.34 236.699 112.488 236.699 112.488H236.669Z",fill:"#00DBBC"}),(0,t.jsx)("path",{opacity:"0.29",d:"M264.18 50.9258H245.105C243.324 50.9258 241.881 52.3693 241.881 54.1501V114.056C241.881 115.836 243.324 117.28 245.105 117.28H264.18C265.96 117.28 267.404 115.836 267.404 114.056V54.1501C267.404 52.3693 265.96 50.9258 264.18 50.9258Z",fill:"#00DBBC"}),(0,t.jsx)("path",{d:"M254.657 116.648V136.868",stroke:"#00DBBC",strokeWidth:"3.01335",strokeMiterlimit:"10"}),(0,t.jsx)("path",{d:"M254.657 27.9648V50.2637",stroke:"#00DBBC",strokeWidth:"4",strokeMiterlimit:"10"}),(0,t.jsx)("path",{d:"M266.952 51.7997L241.881 50.9258V117.31",stroke:"#00DBBC",strokeWidth:"3.01335",strokeLinecap:"round",strokeLinejoin:"round"}),(0,t.jsx)("path",{opacity:"0.5",d:"M196.168 96.6684C222.862 96.6684 244.502 75.0284 244.502 48.3342C244.502 21.64 222.862 0 196.168 0C169.474 0 147.834 21.64 147.834 48.3342C147.834 75.0284 169.474 96.6684 196.168 96.6684Z",fill:"url(#paint0_linear_15067_300234)"}),(0,t.jsx)("path",{opacity:"0.2",d:"M104.323 133.25C101.611 132.407 104.685 121.709 105.438 119.51C109.235 108.692 117.522 103.93 128.31 101.58L129.244 101.851C134.336 110.5 149.072 110.59 158.051 109.957C165.525 109.445 172.274 107.878 176.915 101.
467C191.771 105.106 202.92 117.099 202.016 132.678C200.901 133.461 179.024 139.669 177.789 138.976C175.137 137.409 178.15 131.051 177.337 124.482C176.764 119.871 172.636 116.466 167.995 116.526L136.657 116.767C132.317 116.798 128.701 120.233 128.611 124.572C128.46 131.111 129.244 139.307 127.014 139.307L104.353 133.281L104.323 133.25Z",fill:"#00DBBC"}),(0,t.jsx)("path",{d:"M151.091 36.4017C171.763 34.9552 187.914 52.5532 183.274 73.1344C181.224 82.3251 167.725 91.9679 158.594 93.0828C111.978 98.9287 108.331 39.3849 151.091 36.4017ZM176.885 53.9092C168.99 44.9897 153.02 43.0612 142.051 46.1046C119.24 52.4628 117.251 77.3531 141.026 83.6209C146.42 85.0372 157.841 86.0316 165.676 83.9524C170.828 82.5662 175.559 78.9502 176.162 78.2571C178.964 75.0931 180.742 70.6936 181.014 68.2227C181.616 62.8589 180.471 57.9471 176.915 53.8791L176.885 53.9092Z",fill:"#00DBBC"}),(0,t.jsx)("path",{d:"M134.156 93.2934C134.97 93.1427 139.972 95.7643 142.021 96.2163C148.078 97.5422 160.433 97.6024 166.249 95.5835C168.931 94.6494 173.692 90.1293 173.179 97.3011C172.547 106.612 155.853 107.245 148.952 106.763C145.848 106.522 136.808 104.895 134.699 102.906C132.77 101.128 130.751 93.9563 134.156 93.3235V93.2934Z",fill:"#008F7A"}),(0,t.jsx)("path",{opacity:"0.2",d:"M192.011 103.51C187.37 102.304 183.814 98.5679 178.42 98.6583L175.799 91.5769C177.185 90.1908 182.398 82.5971 183.392 82.2958C185.894 81.5123 189.751 81.5726 192.011 85.731C194.482 93.4753 194.331 98.146 192.011 103.51Z",fill:"#00DBBC"}),(0,t.jsx)("path",{opacity:"0.2",d:"M112.398 85.7006C114.025 82.8681 118.274 81.3011 121.016 82.2654C122.312 82.7174 125.627 89.5879 127.947 90.3713C128.972 91.9985 127.194 96.609 126.26 98.2663C121.95 99.3813 117.4 100.526 113.935 103.449L112.398 102.515C111.012 99.6525 107.848 93.5655 112.398 85.7006Z",fill:"#00DBBC"}),(0,t.jsx)("path",{d:"M118.878 74.3403C118.185 77.896 112.489 78.3782 111.616 74.4909C110.953 71.5378 109.808 61.7143 111.616 59.7255C112.821 58.3695 118.908 58.6106 118.908 60.2679C118.908 63.5223 119.36 71.9899 118.908 74.3101L118.878 74.3403Z",fill:"#00DBBC"}),(0,t.jsx)("path",{d:"M186.828 60.2681C187.19 58.4902 192.704 59.3038 193.096 60.5091C195.868 69.0369 192.975 81.2711 186.828 75.2746V60.2982V60.2681Z",fill:"#00DBBC"}),(0,t.jsx)("path",{d:"M176.884 53.9092C180.469 57.9772 181.584 62.8588 180.982 68.2527C180.711 70.7237 178.059 76.8408 176.13 78.2872C175.377 78.8296 166.216 83.8317 165.644 83.9824C152.264 86.9054 146.388 85.0974 140.995 83.6509C117.249 77.3832 119.208 52.4627 142.019 46.1347C152.988 43.0912 168.989 44.9896 176.853 53.9393L176.884 53.9092ZM145.906 51.9203C142.712 48.7865 130.146 54.3913 132.557 60.0865C136.625 63.8532 150.276 56.2294 145.906 51.9203Z",fill:"url(#paint1_linear_15067_300234)"}),(0,t.jsx)("path",{d:"M145.907 51.9204C150.306 56.2295 136.626 63.8533 132.558 60.0866C130.117 54.3914 142.713 48.7865 145.907 51.9204Z",fill:"white"}),(0,t.jsx)("path",{d:"M147.563 143.437L139.246 141.418C137.167 141.418 135.51 139.73 135.51 137.681V129.756C135.51 127.677 137.197 126.02 139.246 126.02H148.136C150.215 126.02 151.872 127.707 151.872 129.756L151.33 139.73C151.33 141.809 149.642 143.467 147.593 143.467L147.563 143.437Z",fill:"#EB5347"}),(0,t.jsx)("path",{d:"M164.228 129.726C166.724 129.726 168.748 127.702 168.748 125.206C168.748 122.709 166.724 120.686 164.228 120.686C161.732 120.686 159.708 122.709 159.708 125.206C159.708 127.702 161.732 129.726 164.228 129.726Z",fill:"#EBC247"}),(0,t.jsx)("path",{d:"M193.066 126.832L188.637 128.188C187.281 128.61 185.834 127.947 185.292 126.651L184.509 124.904C183.846 123.397 184.659 121.619 186.226 121.137L190.656 119.781C192.012 119.359 193.458 120.022 194.001 121.318L194.784 123.065C195.447 124.572 194.633 126.35 193.066 126.832Z",fill:"#00DBBC"}),(0,t.jsx)("path",{d:"M116.104 83.0781C116.104 83.0781 111.464 86.212 110.801 91.5456C110.379 94.9206 110.349 100.073 112.428 102.544",stroke:"#00DBBC",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round"}),(0,t.jsx)("path",{d:"M57.5264 63.4609H38.4518C36.6711 63.4609 35.2275 64.9045 35.2275 66.6852V102.484C35.2275 104.265 36.6711 105.708 38.4518 105.708H57.5264C59.3071 105.708 60.7506 104.265 60.7506 102.484V66.6852C60.7506 64.9045 59.3071 63.4609 57.5264 63.4609Z",fill:"#00DBBC"}),(0,t.jsx)("path",{d:"M48.0049 40.4688V149.371",stroke:"#00DBBC",strokeWidth:"4",strokeMiterlimit:"10"}),(0,t.jsx)("path",{d:"M92.418 96.127H73.3434C71.5627 96.127 70.1191 97.5705 70.1191 99.3512V144.19C70.1191 145.971 71.5627 147.414 73.3434 147.414H92.418C94.1987 147.414 95.6422 145.971 95.6422 144.19V99.3512C95.6422 97.5705 94.1987 96.127 92.418 96.127Z",fill:"#EB5347"}),(0,t.jsx)("path",{d:"M82.8975 27.9648V167.001",stroke:"#EB5347",strokeWidth:"4",strokeMiterlimit:"10"}),(0,t.jsx)("path",{d:"M119.117 39.0234C120.714 34.7746 124.089 31.4298 128.308 29.8327C129.182 29.5012 129.182 28.326 128.308 27.9946C124.059 26.3975 120.714 23.0527 119.117 18.8038C118.786 17.93 117.61 17.93 117.309 18.8038C115.712 23.0527 112.337 26.3975 108.118 27.9946C107.244 28.326 107.244 29.5012 108.118 29.8327C112.367 31.4298 115.712 34.7746 117.309 39.0234C117.64 39.8973 118.816 39.8973 119.117 39.0234Z",fill:"#EBC247"}),(0,t.jsx)("path",{d:"M101.31 133.251C101.31 133.251 103.208 114.236 111.736 109.174C120.264 104.112 129.213 101.852 129.213 101.852C129.213 101.852 134.276 110.59 148.318 109.807C148.318 109.807 148.167 114.026 141.779 114.387C135.391 114.749 131.594 113.905 126.471 113.875C119.269 113.815 114.478 117.642 115.472 124.904C116.286 130.87 116.196 133.673 114.146 134.667C111.585 135.933 104.323 133.221 101.31 133.221V133.251Z",fill:"#00DBBC"}),(0,t.jsx)("path",{d:"M134.576 94.6484C134.576 94.6484 132.286 97.6618 134.817 101.067",stroke:"#00DBBC",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round"}),(0,t.jsx)("path",{d:"M309.622 88.5928C312.118 88.5928 314.142 86.5691 314.142 84.0728C314.142 81.5764 312.118 79.5527 309.622 79.5527C307.125 79.5527 305.102 81.5764 305.102 84.0728C305.102 86.5691 307.125 88.5928 309.622 88.5928Z",stroke:"#00DBBC",strokeWidth:"4",strokeLinejoin:"round"}),(0,t.jsx)("path",{d:"M8.34581 77.3837L11.54 85.7608C11.8714 86.6046 11.4496 87.5387 10.6058 87.8702L2.2287 91.0644C0.87269 91.5766 -0.453185 90.1905 0.149486 88.8646L5.33245 77.2933C5.93512 75.9675 7.83353 76.0277 8.34581 77.3837
4Z",fill:"#008F7A"})]}),(0,t.jsxs)("defs",{children:[(0,t.jsxs)("linearGradient",{id:"paint0_linear_15067_300234",x1:"141.657",y1:"12.7465",x2:"282.892",y2:"104.925",gradientUnits:"userSpaceOnUse",children:[(0,t.jsx)("stop",{stopColor:"#EBC247"}),(0,t.jsx)("stop",{offset:"0.1",stopColor:"#EBC247",stopOpacity:"0.7"}),(0,t.jsx)("stop",{offset:"0.19",stopColor:"#EBC247",stopOpacity:"0.45"}),(0,t.jsx)("stop",{offset:"0.27",stopColor:"#EBC247",stopOpacity:"0.26"}),(0,t.jsx)("stop",{offset:"0.34",stopColor:"#EBC247",stopOpacity:"0.12"}),(0,t.jsx)("stop",{offset:"0.4",stopColor:"#EBC247",stopOpacity:"0.03"}),(0,t.jsx)("stop",{offset:"0.44",stopColor:"#EBC247",stopOpacity:"0"})]}),(0,t.jsxs)("linearGradient",{id:"paint1_linear_15067_300234",x1:"153.711",y1:"7.35285",x2:"152.475",y2:"71.9893",gradientUnits:"userSpaceOnUse",children:[(0,t.jsx)("stop",{stopColor:"#EB5347"}),(0,t.jsx)("stop",{offset:"0.1",stopColor:"#EB5547",stopOpacity:"0.97"}),(0,t.jsx)("stop",{offset:"0.23",stopColor:"#EB5E47",stopOpacity:"0.9"}),(0,t.jsx)("stop",{offset:"0.38",stopColor:"#EB6B47",stopOpacity:"0.78"}),(0,t.jsx)("stop",{offset:"0.55",stopColor:"#EB7E47",stopOpacity:"0.61"}),(0,t.jsx)("stop",{offset:"0.73",stopColor:"#EB9647",stopOpacity:"0.39"}),(0,t.jsx)("stop",{offset:"0.91",stopColor:"#EBB347",stopOpacity:"0.13"}),(0,t.jsx)("stop",{offset:"1",stopColor:"#EBC247",stopOpacity:"0"})]}),(0,t.jsx)("clipPath",{id:"clip0_15067_300234",children:(0,t.jsx)("rect",{width:"315.649",height:"167",fill:"white"})})]})]})}var b=e.i(155001),g=e.i(657688);let y={src:e.i(395178).default,width:450,height:436,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAw0lEQVR42k3NzQqCQBDA8V1zt7LdDkURZoe89Cl9uLtanaqToCB06hE6e6jeuF7Cyay0gT8MzA8Goc9gQqhZNwyV5f33vSOt1W5fRuPJYzyZPqezed57L0Cn002c1TpdSAnS80Ec9rAMAyiAORwmbhylIo5AnWLws3bHYwl6lpW4np+6UoHYbEEoD1whS8CbTdXvW7fs1TWvmzWw7gWwbbsWBIHhOE6Fc45RlWJ0Ds0fwJRSwhinjDGq6zrBmkZww6i+AC4OLLugbO4eAAAAAElFTkSuQmCC"};var w=e.i(854761);function C({item:e}){let{getDashUrl:s}=(0,d.useUrlResolver)(),n=(0,c.useUiTranslations)(),l=n.dashboard.labels,i=n.dashboard.descriptions,r=e.newLookIcon??e.Icon,a=l[e.labelKey??e.label]??e.label,u=e.description?i[e.descriptionKey??e.label]??e.description:void 0;return(0,t.jsxs)(f.Link,{href:s(e.href),target:e.target,className:"hover:bg-navitem-selected hover:border-primary gap-lg p-md flex items-center rounded-xl border border-transparent",children:[(0,t.jsx)("div",{className:"bg-tertiary  flex h-9 w-9 shrink-0 items-center justify-center rounded-sm",style:{backgroundImage:"linear-gradient(0deg, rgb(var(--nl-fg-primary) / 0) 34.52%, rgb(var(--nl-fg-primary) / 0.02) 100%), linear-gradient(0deg, rgb(var(--nl-bg-tertiary) / 1), rgb(var(--nl-bg-tertiary) / 1))",boxShadow:"inset 0px 0.73px 0px 0px rgb(var(--nl-fg-primary) / 0.15)"},children:(0,t.jsx)(r,{className:"text-fg-brand",size:20})}),(0,t.jsxs)("div",{className:"flex flex-1 flex-col",children:[(0,t.jsx)(x.Text,{level:"TextSmMedium",className:"text-fg-primary",children:a}),u?(0,t.jsx)(x.Text,{level:"TextSmRegular",className:"text-fg-tertiary",children:u}):null]}),(0,t.jsx)(o.ChevronRight,{size:20,className:"text-fg-secondary"})]})}function S({completeProNavigationLinks:e}){var s;let n,{getDashUrl:l}=(0,d.useUrlResolver)(),i=(0,c.useUiTranslations)().dashboard,r=i.labels,a=i.descriptions,o=i.featuredLabel,u=e.dashboardItems.find(e=>"Portfolio"===e.label),p=i.heroTitle??r[u?.labelKey??u?.label??""]??"Portfolio Tracker",h=i.heroDescription??(u?a[u.descriptionKey??u.label]??u.description:"View earnings, delegations, and asset breakdowns."),v=i.heroCtaLabel??"View Earnings",{firstColumnItems:N,secondColumnItems:k}=(n=Math.ceil((s=e.dashboardItems).length/2),{firstColumnItems:s.slice(0,n),secondColumnItems:s.slice(n)});return(0,t.jsxs)("div",{className:"max-w-screen-3xl mx-auto grid w-full grid-cols-5 gap-4 px-5 lg:px-6",children:[(0,t.jsxs)(m.Flex,{col:!0,className:"gap-lg col-span-2",children:[(0,t.jsx)(x.Text,{level:"TextSmMedium",className:"text-fg-tertiary uppercase",children:i.sectionInvestors}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,t.jsx)("div",{className:"flex flex-col gap-2",children:N.map(e=>(0,t.jsx)(C,{item:e},e.label))}),(0,t.jsx)("div",{className:"flex flex-col gap-2",children:k.map(e=>(0,t.jsx)(C,{item:e},e.label))})]})]}),(0,t.jsxs)(m.Flex,{col:!0,className:"gap-lg col-span-1",children:[(0,t.jsx)(x.Text,{level:"TextSmMedium",className:"text-fg-tertiary uppercase",children:i.sectionBuilders}),(0,t.jsx)("div",{className:"flex flex-col gap-2",children:e.developerItems.map(e=>(0,t.jsx)(C,{item:e},e.label))})]}),(0,t.jsx)("div",{className:"col-span-2 rounded-2xl px-6 pt-8",children:u?(0,t.jsx)(f.Link,{href:l(u.href),className:"bg-tertiary border-primary hover:bg-navitem-selected relative flex min-h-[218px] w-full overflow-hidden rounded-xl border shadow-[0px_0px_0px_1px_rgba(0,0,0,0.48)]",children:(0,t.jsxs)("div",{className:"relative flex w-full items-stretch",children:[(0,t.jsxs)("div",{className:"gap-lg relative z-10 -mr-16 flex flex-1 flex-col justify-center px-6 py-6",children:[(0,t.jsxs)("div",{className:"gap-xs flex flex-col",children:[(0,t.jsx)(x.Text,{level:"TextXsMedium",className:"text-fg-brand uppercase",children:o}),(0,t.jsx)(x.Text,{level:"TextXlMedium",className:"text-fg-primary",children:p}),(0,t.jsx)(x.Text,{level:"TextSmRegular",className:"text-fg-tertiary max-w-76 leading-snug",children:h})]}),(0,t.jsx)(w.NewLookButton,{size:"sm",hierarchy:"primary",asChild:!0,className:"w-fit",iconTrailing:(0,t.jsx)(b.ArrowUpRight,{size:14}),children:(0,t.jsx)("span",{children:v})})]}),(0,t.jsx)("div",{className:"relative z-0 w-56 shrink-0 overflow-hidden",children:(0,t.jsx)(g.default,{"aria-hidden":"true",src:y,alt:"",width:450,height:436,loading:"lazy"})})]})}):null})]})}function N({item:e}){let{getDashUrl:s}=(0,d.useUrlResolver)(),n=(0,c.useUiTranslations)(),l=n.dashboard.labels,r=n.dashboard.descriptions,a=l[e.label]??e.label,p=e.description?r[e.label]??e.description:void 0;return(0,t.jsxs)(f.Link,{href:s(e.href),target:e.target,className:"bg-hero-primary hover:bg-navitem-selected flex items-center gap-3 rounded-xl p-3",children:[(0,t.jsx)("div",{className:"bg-accent-1/15 flex h-10 w-10 shrink-0 items-center justify-center rounded-lg",children:(0,t.jsx)(e.Icon,{className:i.isNewLookEnabled?"text-fg-primary":"text-white",size:20})}),(0,t.jsxs)("div",{className:"flex flex-1 flex-col",children:[(0,t.jsx)(x.Text,{level:"sm",className:i.isNewLookEnabled?"text-fg-primary font-medium":"font-medium text-white",children:a}),p?(0,t.jsx)(x.Text,{level:"xs",className:i.isNewLookEnabled?"text-fg-secondary mt-1":"mt-1 text-gray-400",children:p}):null]}),i.isNewLookEnabled?(0,t.jsx)(o.ChevronRight,{size:20,className:"text-fg-secondary"}):(0,t.jsx)(u.BiChevronRight,{size:20,className:"text-gray-500"})]})}function k({completeDashNavigationLinks:e}){let{getDashUrl:l}=(0,d.useUrlResolver)(),r=(0,c.useUiTranslations)(),o=r.dashboard.labels,b=r.dashboard.descriptions,[g,y]=(0,s.use
4State)(!1),w=(0,s.useRef)(null),C=(0,s.useRef)(null),E=()=>{null!=C.current&&(window.clearTimeout(C.current),C.current=null)},j=()=>{null!=w.current&&(window.clearTimeout(w.current),w.current=null),E()},T=()=>{j(),C.current=window.setTimeout(()=>{C.current=null,y(!1)},250)};(0,s.useEffect)(()=>j,[]);let R=(0,s.useMemo)(()=>e.dashboardItems.find(e=>"Portfolio"===e.label),[e.dashboardItems]),I=(0,s.useMemo)(()=>e.dashboardItems.filter(e=>"Portfolio"!==e.label),[e.dashboardItems]);return(0,t.jsxs)("div",{className:(0,n.cn)("hidden items-center rounded-lg border md:flex",i.isNewLookEnabled?"border-secondary bg-secondary-btn-bg gap-2 px-2 py-1":"-mt-1 h-10 border-[#B3B3B3] bg-white px-3 py-2"),onMouseEnter:()=>{g?E():(j(),w.current=window.setTimeout(()=>{w.current=null,y(!0)},250))},onMouseLeave:T,children:[(0,t.jsx)(f.Link,{href:l("/"),rel:"noopener noreferrer",className:"flex flex-row items-center gap-2",children:i.isNewLookEnabled?(0,t.jsxs)(m.Flex,{className:"items-center gap-2",children:[(0,t.jsxs)(x.Text,{level:"sm",className:"font-mono font-bold uppercase",children:["taostats"," "]}),(0,t.jsx)(x.Text,{level:"xs",className:"text-brand bg-brand-secondary rounded px-1 py-0.5 font-mono font-medium",children:"Pro"})]}):(0,t.jsxs)(x.Text,{as:"div",level:"sm",className:"flex flex-row items-center gap-1.5 truncate font-medium leading-[18px] text-black",children:["taostats",(0,t.jsx)(p.Badge,{variant:"green4",className:"rounded-md px-1.5 py-0.5 text-[10px]",children:"Pro"})]})}),(0,t.jsxs)(h.Popover,{open:g,onOpenChange:e=>{j(),y(e)},children:[(0,t.jsx)(h.PopoverTrigger,{className:"outline-none",children:i.isNewLookEnabled?(0,t.jsx)(a.ChevronDown,{className:"text-fg-primary",size:16}):(0,t.jsx)(u.BiChevronDown,{size:24,color:"black",className:"ml-2"})}),(0,t.jsx)(h.PopoverContent,{align:i.isNewLookEnabled?"center":"end",collisionPadding:i.isNewLookEnabled?0:void 0,onMouseEnter:()=>{j(),y(!0)},onMouseLeave:T,className:(0,n.cn)("bg-popover flex flex-col border",i.isNewLookEnabled?"border-primary py-lg mt-4 w-screen rounded-none border-x-0":"mt-3 w-[580px] rounded-2xl border-[#FFFFFF1F] p-5"),children:i.isNewLookEnabled?(0,t.jsx)(S,{completeProNavigationLinks:e}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x.Text,{level:"xs",className:"text-white-500 mb-4 uppercase opacity-60",children:r.dashboard.sectionInvestors}),(0,t.jsxs)("div",{className:"flex gap-2",children:[R?(0,t.jsxs)(f.Link,{href:l(R.href),className:"bg-hero-primary hover:bg-navitem-selected flex flex-1 flex-col overflow-hidden rounded-xl",children:[(0,t.jsx)("div",{className:"relative min-h-40 w-full",children:(0,t.jsx)(v,{})}),(0,t.jsxs)("div",{className:"flex-1 p-2",children:[(0,t.jsx)(x.Text,{level:"md",className:"font-semibold text-white",children:o[R.label]??R.label}),(0,t.jsx)(x.Text,{level:"xs",className:"mt-2 leading-snug text-gray-400",children:b[R.label]??R.description})]})]}):null,(0,t.jsx)("div",{className:"flex flex-1 flex-col gap-2",children:I.map(e=>(0,t.jsx)(N,{item:e},e.label))})]}),(0,t.jsxs)("div",{className:"mt-2 pt-4",children:[(0,t.jsx)(x.Text,{level:"xs",className:"text-white-500 mb-4 px-3 uppercase opacity-60",children:r.dashboard.sectionBuilders}),(0,t.jsx)("div",{className:"grid grid-cols-2 gap-2",children:e.developerItems.map(e=>(0,t.jsx)("div",{className:e.fullWidth?"col-span-2":"",children:(0,t.jsx)(N,{item:e})},e.label))})]})]})})]})]})}var E=e.i(509072),j=e.i(295620),T=e.i(235079);let R=(0,e.i(475254).default)("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);var I=e.i(710656),L=e.i(511152),O=e.i(979294),M=e.i(170149),F=e.i(524092),_=e.i(519069),P=e.i(552051),D=e.i(807317),A=e.i(770486),B=e.i(402216),z=e.i(365205),W=e.i(420676),H=e.i(608968),V=e.i(618566),K=e.i(357729),G=e.i(310844),U=e.i(15610);let $=(0,s.memo)(({userInput:e,setUserInput:l,searchGroups:r,setModalOpen:a,setRecentlySearched:o,inputRef:d})=>{let p=(0,c.useUiTranslations)();return(0,t.jsxs)(G.Command,{filter:()=>1,children:[(0,t.jsx)(G.CommandInput,{ref:d,value:e,onValueChange:e=>{l(e)},placeholder:p.search.popoverPlaceholder,trailing:(0,t.jsxs)("button",{type:"button",onClick:()=>{a?.(!1)},className:(0,n.cn)("ring-offset-app-bg focus:ring-ring ml-2 shrink-0 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-offset-2",i.isNewLookEnabled&&"text-fg-primary"),children:[(0,t.jsx)(u.BiX,{className:"h-6 w-6"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})}),(0,t.jsxs)(G.CommandList,{children:[(0,t.jsx)(G.CommandEmpty,{children:p.search.noResults}),r.map((e,n)=>(0,t.jsxs)(s.Fragment,{children:[n>0&&(0,t.jsx)(G.CommandSeparator,{}),(0,t.jsx)(Z,{setRecentlySearched:o,heading:e.heading,items:e.items,setModalOpen:a})]},e.heading))]})]})});$.displayName="SearchPopover";let Z=({heading:e,items:s,setModalOpen:l,setRecentlySearched:i})=>{let r=(0,V.useRouter)();return(0,t.jsx)(G.CommandGroup,{className:"p-4",heading:e,children:s.map(e=>(0,t.jsx)(G.CommandItem,{value:e.filter||e.title,className:(0,n.cn)("rounded-lg p-4"),onSelect:()=>{let t={title:e.title,href:e.href,filter:e.filter,type:e.type,subt
4itle:e.subtitle,address:e.address,subnetNetuid:e.subnetNetuid,subnetName:e.subnetName,icon:e.icon};i?.(e=>e.some(e=>e.href===t.href)?e:[...e,t]),r.push(e.href),l&&l(!1)},children:(0,t.jsx)(f.Link,{className:"flex h-full w-full items-start justify-between",href:e.href,children:(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-3",children:["page"===e.type&&e.icon?(0,t.jsx)("div",{className:"bg-ocean/10 text-ocean rounded-md p-1",children:(0,t.jsx)(e.icon,{size:15})}):null,(0,t.jsxs)("div",{className:"min-w-0",children:["subnet"===e.type&&"number"==typeof e.subnetNetuid?(0,t.jsx)(U.SubnetNameDisplayV2,{inline:!0,netuid:e.subnetNetuid,subnetName:e.subnetName??e.title}):"validator"===e.type&&e.address?(0,t.jsx)(K.AddressFormatter,{info:e.address,isValidator:!0,noCopy:!0,noLink:!0,rootClassName:"min-w-0 max-w-full flex-1",className:"text-fg-primary min-w-0",textClassName:"text-fg-primary"}):(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)(x.Text,{level:"TextSmRegular",className:"text-fg-primary truncate",children:e.title}),e.address&&e.address!==e.title?(0,t.jsx)(x.Text,{level:"TextXsRegular",className:"text-fg-tertiary truncate",children:e.address}):null]}),e.subtitle?(0,t.jsx)(x.Text,{level:"TextXsRegular",className:"text-fg-tertiary",children:e.subt
4itle}):null]})]})})},`${e.href}-${e.title}`))})},J=[{href:_.appRoutes.base.landing,icon:u.BiHome},{href:_.appRoutes.subnets.home,icon:u.BiNetworkChart},{href:_.appRoutes.blockchain.blocks,icon:u.BiCubeAlt},{href:_.appRoutes.blockchain.transfer,icon:u.BiMoney},{href:_.appRoutes.blockchain.delegation,icon:u.BiSolidArrowToRight},{href:_.appRoutes.blockchain.accounts,icon:u.BiWallet},{href:_.appRoutes.blockchain.extrinsic,icon:L.FaRegCalendarAlt},{href:_.appRoutes.blockchain.event,icon:O.GoIssueOpened},{href:_.appRoutes.blockchain.tokenomics,icon:u.BiCoin},{href:_.appRoutes.validator.home,icon:u.BiCheckDouble},{href:_.appRoutes.analytics.exchanges,icon:I.CgArrowsExchange}],q=({completeDashNavigationLinks:e})=>{let{getWebUrl:n}=(0,d.useUrlResolver)(),l=(0,s.useContext)(A.NavigationContext),r=(0,c.useUiTranslations)().search.groups,[a,o]=(0,P.useSearchModalOpen)(),[u,p]=(0,s.useState)(""),m=(0,s.useRef)(null),f=l?.latestBlock??0x5f5e0ff,[h,x]=(0,s.useState)([]),{state:{accounts:v}}=(0,M.useChainAndWalletContext)(),b=["input","textarea"];(0,j.useKeyDown)(["Shift","F"],e=>{"F"!==e.key||!e.shiftKey||a||e.target instanceof Element&&b.includes(e.target.tagName.toLowerCase())||(o(!0),e.preventDefault())}),(0,j.useKeyDown)(["Escape"],e=>{a&&(o(!1),e.preventDefault())});let g=(0,s.useMemo)(()=>new Map(J.map(e=>[e.href,e.icon])),[]),y=(0,s.useMemo)(()=>[...e.dashboardItems,...e.developerItems],[e]),w=(0,s.useMemo)(()=>new Map(y.map(e=>[e.label,e.Icon])),[y]),C=(0,F.useDebounce)(u,300),S=C.trim().toLowerCase(),N=(0,H.useSitePageSearchResults)({query:S,pages:J.map(e=>e.href),getWebUrl:n}),k=(0,s.useMemo)(()=>0===S.length?[]:y.filter(e=>e.label.toLowerCase().includes(S)).map(e=>({label:e.label,href:e.href,sectionTitle:"Pages",searchText:e.label,resultType:"page",subtitle:"Page"})),[S,y]),E=(0,z.useAccountSearchSuggestions)({globalFilter:C,connectedAccounts:v,validatorData:l?.validatorData??[]}),I=(0,W.useChainSearchResults)({globalFilter:C,latestBlockNumber:f,subnetData:l?.subnetData??[],validatorData:l?.validatorData??[],accountSearchSuggestions:E,getWebUrl:n}),L=(0,s.useMemo)(()=>{let e=[{heading:r["Recent Searches"],items:h.slice(0,3)},{heading:r.Pages,items:[...N,...k].map(e=>({title:e.label,href:e.href,type:e.resultType,subtitle:(0,B.localizeSearchResultSubtitle)(e,r),icon:g.get(e.label)??w.get(e.label)}))}],t={Block:r.Block,Address:r.Address,Subnet:r.Subnet,Exchange:r.Exchange,Validator:r.Validator,Hash:r.Hash,Extrinsic:r.Extrinsic,Event:r.Event,"Connected Wallet":r["Connected Wallet"],Account:r.Account},s=new Map;return I.forEach(e=>{let t=s.get(e.sectionTitle)??[];t.push({title:e.label,href:e.href,filter:e.searchText,type:e.resultType,subtitle:(0,B.localizeSearchResultSubtitle)(e,r),address:e.address,subnetNetuid:e.subnetNetuid,subnetName:e.subnetName}),s.set(e.sectionTitle,t)}),s.forEach((s,n)=>{e.push({heading:t[n]??n,items:s})}),e},[I,g,N,w,k,h,r]);return(0,t.jsxs)("div",{className:"flex-1 justify-end gap-1.5 px-4 lg:justify-start",children:[i.isNewLookEnabled?(0,t.jsx)(T.SearchLg,{size:16,className:"text-fg-tertiary cursor-pointer",onClick:()=>{o(!0)}}):(0,t.jsx)(R,{size:16,className:"cursor-pointer",onClick:()=>{o(!0)}}),(0,t.jsx)(D.ModalWrapper,{showModal:a,setShowModal:o,contentClassName:"p-0 border-none lg:w-1/2",hideClose:!0,onOpenAutoFocus:e=>{e.preventDefault(),m.current?.focus()},children:(0,t.jsx)($,{userInput:u,setUserInput:p,searchGroups:L,setModalOpen:o,setRecentlySearched:x,inputRef:m})})]})};var Q=e.i(481355),X=e.i(463059),Y=e.i(348099);function ee({title:e,href:s,icon:n,leftContent:l,children:r}){return i.isNewLookEnabled?(0,t.jsxs)("div",{className:"border-primary flex items-center justify-between border-b px-5 py-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)(E.NavigationMenuLink,{asChild:!0,children:(0,t.jsxs)(f.Link,{href:s,className:"text-primary flex items-center gap-1.5",children:[(0,t.jsx)("span",{children:e}),(0,t.jsx)(Q.LinkExternal01,{size:14,className:"text-fg-tertiary"})]})}),l]}),r?(0,t.jsx)("div",{className:"flex items-center gap-6 2xl:gap-8",children:r}):null]}):r?(0,t.jsxs)("div",{className:"mx-10 mb-3 mt-10 flex flex-row items-center justify-between rounded-xl bg-[#242424] py-2 pl-3 pr-2",children:[(0,t.jsxs)("div",{className:"flex flex-row items-end gap-4",children:[(0,t.jsxs)("div",{className:"flex flex-row gap-2",children:[(0,t.jsx)("div",{className:"rotate-180 border-[2px] border-[#00DBBC]"}),(0,t.jsx)(E.NavigationMenuLink,{asChild:!0,children:(0,t.jsx)(f.Link,{href:s,children:(0,t.jsxs)(x.Text,{level:"lg",className:"flex items-center gap-2 text-white",children:[n?(0,t.jsx)(n,{className:"text-ocean",size:16}):null,e]}
4)})})]}),l]}),(0,t.jsx)("div",{className:"flex flex-row items-center gap-8",children:r})]}):(0,t.jsx)(E.NavigationMenuLink,{asChild:!0,children:(0,t.jsx)(f.Link,{href:s,className:"w-full",children:(0,t.jsx)(Y.Button,{variant:"empty",className:"group w-full justify-start border-b border-neutral-900 !py-8 px-8 hover:bg-neutral-800",children:(0,t.jsxs)(x.Text,{level:"lg",className:"flex items-center gap-2 text-white",children:[n?(0,t.jsx)(n,{className:"text-ocean",size:16}):null,e]})})})})}function et({children:e,className:s}){return(0,t.jsx)("div",{className:(0,n.cn)(i.isNewLookEnabled?"px-5 py-4":"bg-background grid gap-x-5 gap-y-1 p-5",s),children:e})}function es({title:e}){return(0,t.jsx)(x.Text,{level:"sm",className:(0,n.cn)("font-medium",i.isNewLookEnabled?"text-fg-tertiary px-3 font-mono uppercase":"text-neutral-400"),children:e})}function en({items:e}){let s=e.reduce((e,t)=>{let s=t.groupTitle??"";return e[s]??=[],e[s].push(t),e},{});return(0,t.jsx)("div",{className:(0,n.cn)("grid grid-cols-3",i.isNewLookEnabled?"gap-x-2xl":"gap-x-5"),children:Object.entries(s).map(([e,s])=>(0,t.jsxs)("div",{className:(0,n.cn)("flex flex-col",i.isNewLookEnabled?"gap-lg":"gap-2"),children:[e?(0,t.jsx)(es,{title:e}):null,(0,t.jsx)("div",{className:(0,n.cn)("flex flex-col",i.isNewLookEnabled?"gap-xxs":"gap-1"),children:s.map(e=>(0,t.jsx)(el,{href:e.href,children:e.label},`${e.groupTitle}-${e.label}`))})]},e))})}function el({href:e,children:s,className:l}){return(0,t.jsx)(E.NavigationMenuLink,{asChild:!0,children:(0,t.jsx)(f.Link,{href:e,className:(0,n.cn)("text-sm",i.isNewLookEnabled?"px-lg py-md text-primary hover:border-primary hover:bg-secondary flex items-center justify-between rounded-sm border border-transparent":"-mx-3 truncate rounded-md px-3 py-1 text-white hover:bg-[#202020] hover:text-white",l),children:i.isNewLookEnabled?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"truncate",children:s}),(0,t.jsx)(X.ChevronRight,{size:10,className:"text-fg-tertiary ml-2 shrink-0"})]}):s})})}function ei({label:e,href:s,active:l,loading:r,mainIcon:a,onLinkClick:o}){return(0,t.jsx)(E.NavigationMenuTrigger,{loading:r,className:i.isNewLookEnabled?(0,n.cn)("rounded-none border-b-2 pb-1.5",l?"border-fg-primary":"border-transparent"):l?"border-accent-1 rounded-none border-b":void 0,children:(0,t.jsx)(f.Link,{href:s,onClick:o,children:a?(0,t.jsx)(a,{className:"-mb-0.5"}):(0,t.jsx)(x.Text,{level:"sm",className:i.isNewLookEnabled?(0,n.cn)("group-hover/trigger:text-primary font-mono",l?"text-primary":"text-tertiary"):"",children:e})})})}let er=({activeMenuId:e,activeSectionId:s,completeWebNavigationLinks:l,onLinkClick:i})=>(0,t.jsx)(t.Fragment,{children:l.filter(e=>"analytics"===e.id).map(({id:l,label:r,mainIcon:a,children:o,Icon:u,href:c})=>(0,t.jsxs)(E.NavigationMenuItem,{value:l,className:"hidden xl:flex",children:[(0,t.jsx)(ei,{label:r,href:c,active:s===l,mainIcon:a,onLinkClick:i}),(0,t.jsxs)(E.NavigationMenuContent,{className:(0,n.cn)(""===e&&"hidden"),onClick:i,children:[(0,t.jsx)(ee,{title:r,href:c,icon:u}),(0,t.jsx)(et,{className:"w-[800px]",children:(0,t.jsx)(en,{items:o??[]})})]})]},l))}),ea=({activeMenuId:e,activeSectionId:s,completeWebNavigationLinks:l,onLinkClick:i})=>(0,t.jsx)(t.Fragment,{children:l.filter(e=>"blockchain"===e.id).map(({id:l,label:r,mainIcon:a,children:o,Icon:u,href:c})=>(0,t.jsxs)(E.NavigationMenuItem,{value:l,className:"hidden xl:flex",children:[(0,t.jsx)(ei,{label:r,href:c,active:s===l,mainIcon:a,onLinkClick:i}),(0,t.jsxs)(E.NavigationMenuContent,{className:(0,n.cn)(""===e&&"hidden"),onClick:i,children:[(0,t.jsx)(ee,{title:r,href:c,icon:u}),(0,t.jsx)(et,{className:"w-[400px] md:w-[500px] lg:w-[600px]",children:(0,t.jsx)(en,{items:o??[]})})]})]},l))}),eo=({activeMenuId:e,activeSectionId:s,completeWebNavigationLinks:l,onLinkClick:r})=>(0,t.jsx)(t.Fragment,{children:l.filter(e=>"investors"===e.id).map(({id:l,label:a,mainIcon:o,children:u,Icon:c,href:d})=>(0,t.jsxs)(E.NavigationMenuItem,{value:l,className:"hidden xl:flex",children:[(0,t.jsx)(ei,{label:a,href:d,active:s===l,mainIcon:o,onLinkClick:r}),(0,t.jsxs)(E.NavigationMenuContent,{className:(0,n.cn)(""===e&&"hidden"),onClick:r,children:[(0,t.jsx)(ee,{title:a,href:d,icon:c}),(0,t.jsx)(et,{className:"w-[500px]",children:(0,t.jsx)("div",{className:(0,n.cn)("flex flex-col",i.isNewLookEnabled?"gap-xxs":"gap-1"),children:u?.map(({label:e,groupTitle:s,href:n})=>(0,t.jsx)(el,{href:n,className:i.isNewLookEnabled?void 0:"py-2",children:e},`${s}-${e}`))})})]})]},l))});var eu=e.i(604032),ec=e.i(677883),ed=e.i(640602),ep=e.i(275552),em=e.i(927231),ef=e.i(63213),eh=e.i(940141);function ex(e){return(0,eh.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M3 3l18 18"},child:[]},{tag:"path",attr:{d:"M10.012 6.016l1.981 -4.014l3.086 6.253l6.9 1l-4.421 4.304m.012 4.01l.588 3.426l-6.158 -3.245l-6.172 3.245l1.179 -6.873l-5 -4.867l6.327 -.917"},child:[]}]})(e)}let ev={src:e.i(864456).default,width:244,height:244,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAtUlEQVR42n2JMQqDQBBFZ7KuCJE0rgsWsU5hob2VaJcrGK8l2HoABRtru9Sx0ksoCLtddlIFAvnw4PE+MMagKAqcpsnSWjtKKYc8z3OkD4zAuq7MnOfjOCRBviwLy7IMYBgG3Pfdmuf50nXdjXgZ37bN6vseoa5rbNvWflRVFCfJGMfJWJZlRK1pGgTf90FKyT3PS69h+CSEEGkQBLbp8BkinjjnwnXdO0FODb5Hwcwmfs5/ewPfSkRom+3ijwAAAABJRU5ErkJggg=="};function eb({label:e}){return(0,t.jsx)("div",{className:"flex w-full flex-col items-center justify-center",children:i.isNewLookEnabled?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.default,{src:ev,alt:"",width:244,height:244,className:"h-auto max-h-full max-w-full"}),(0,t.jsx)("p",{className:"text-fg-tertiary -mt-8 text-sm font-medium",children:e})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"flex h-[72px] w-[72px] items-center justify-center rounded-full bg-[#323232]",children:(0,t.jsx)(ex,{size:24,className:"opacity-60"})}),(0,t.jsx)("div",{className:"mt-3 text-xs font-medium text-[#909090]",children:e})]})})}var eg=e.i(7062),ey=e.i(225913),ew=e.i(114674);let eC=(0,ey.cva)("flex h-8 w-full rounded-md border items-center border-input bg-neutral-900 gap-2 px-3 py-1 text-sm r
4ing-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{intent:{primary:["bg-neutral-900","text-white","hover:bg-neutral-800"],secondary:["bg-white","text-gray-800","border-gray-400","hover:bg-gray-100"]},size:{small:["w-70","py-1","px-4"],default:["py-1","px-3"]}},defaultVariants:{intent:"primary",size:"default"}}),eS=(0,ey.cva)("flex h-8 w-full items-center gap-2 rounded-md border border-primary bg-secondary px-3 py-1 text-sm text-fg-primary disabled:cursor-not-allowed disabled:opacity-50",{variants:{intent:{primary:["bg-secondary","text-fg-primary"],secondary:["bg-tertiary","text-fg-tertiary","border-primary"]},size:{small:["w-70","py-1","px-4"],default:["py-1","px-3"]}},defaultVariants:{intent:"primary",size:"default"}}),eN=({intent:e,size:s,placeholder:l,icon:r,value:a,setValue:o,className:u,inputClassName:c,onKeyUp:d,onFocus:p,onClick:m,onBlur:f,type:h,clearIcon:x,maxLength:v,iconClassName:b,iconSize:g=14,rightContent:y,inputRef:w,customIcon:C})=>{let S=i.isNewLookEnabled?eS({intent:e,size:s}):eC({intent:e,size:s});return(0,t.jsxs)("div",{className:(0,n.cn)(S,u),children:[C??(r?(0,t.jsx)(r,{size:g,className:(0,n.cn)("text-neutral-500",b)}):null),(0,t.jsx)("input",{ref:w,onChange:e=>o?.(e.target.value),value:a,className:(0,n.cn)("h-full w-full flex-1 bg-transparent text-xs placeholder:text-neutral-500 focus:border-none focus:outline-none focus:ring-0",c),placeholder:l,onKeyUp:d,onFocus:p,onClick:m,onBlur:f,type:h,maxLength:v}),x&&a&&a.length>0?i.isNewLookEnabled?(0,t.jsx)("button",{type:"button",onClick:()=>o?.(""),className:"text-fg-tertiary hover:text-fg-primary flex shrink-0 items-center justify-center transition-colors","aria-label":"Clear input",children:(0,t.jsx)(eg.XClose,{size:16})}):(0,t.jsx)(ew.HiXMark,{cursor:"pointer",size:18,onClick:()=>o?.(""),className:"bg-label-secondary/30 rounded-full p-0.5"}):null,y]})},ek=({closeIcon:e,searchPlaceholder:n,setGlobalFilter:l,inputRef:r,legacyRightContent:a})=>{let[o,c]=(0,s.useState)(""),d=(0,s.useCallback)(e=>{"Enter"===e.key&&l(o)},[o,l]);(0,s.useEffect)(()=>{let e=setInterval(()=>{l(o)},1e3);return()=>{clearInterval(e)}},[o,l]);let p=(0,t.jsx)("div",{className:"bg-secondary flex h-5 w-5 items-center justify-center rounded-md shadow-[0_1.99px_0_0_rgba(0,0,0,0.03)] backdrop-blur-sm",children:(0,t.jsx)("span",{className:"text-fg-primary text-xs leading-none",children:"/"})});return(0,t.jsx)(eN,{size:"small",value:o,setValue:c,icon:i.isNewLookEnabled?T.SearchLg:u.BiSearch,placeholder:n,onKeyUp:d,clearIcon:e,className:i.isNewLookEnabled?"border-primary bg-tertiary ml-1 h-9 w-[340px] rounded-md border px-3 py-1.5":"ml-1 !h-9 w-[340px] rounded-full border border-[#262626] bg-[#2E2E2E] px-3 py-2",inputClassName:i.isNewLookEnabled?"text-fg-secondary text-[13px] font-normal leading-4 placeholder:text-fg-tertiary placeholder:font-medium":"font-normal text-[13px] leading-4 text-[#909090]",iconClassName:"h-5 w-5",rightContent:i.isNewLookEnabled?p:a,inputRef:r,customIcon:i.isNewLookEnabled?(0,t.jsx)(T.SearchLg,{size:20,className:"text-fg-tertiary"}):void 0})};var eE=e.i(367177),ej=e.i(672464),eT=e.i(265172),eR=e.i(483937),eI=e.i(679853),eL=e.i(947565),eO=e.i(387865),eM=e.i(522679),eF=e.i(283939),e_=e.i(242314),eP=e.i(580883),eD=e.i(770703),eA=e.i(932281);let eB=(0,eD.default)(()=>e.A(235007).then(e=>e.SubnetsLastDaysChart),{loadableGenerated:{modules:[385713]},loading:()=>(0,t.jsx)(eA.Skeleton,{className:(0,n.cn)("w-30 h-4")})}),ez=e=>(0,t.jsxs)("svg",{width:"1.5em",height:"1.5em",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 3118.1 2721.3",color:"white",...e,children:[(0,t.jsx)("title",{children:"Bittensor"}),(0,t.jsx)("path",{d:"M1808.1,1907.8c-78.4,52.6-159,55.4-240.5,19.1c-76.2-34-111.3-97.6-111.5-179.7c-0.6-236.6-0.2-473.2-0.2-709.9\n		c0-14.4,0-28.7,0-47.2c-147,0-292.1,0-436.8,0c-9.2-88.9,66.2-185.9,152.2-198.2c36-5.1,72.6-7.9,109-8\n		c259-0.7,517.9-0.4,776.9-0.4c14.2,0,28.5,0,42.8,0c-1.2,110-78.1,201-202.2,204.2c-126.1,3.3-252.3,0.7-379.9,2.9\n		c66,27.5,118,69.7,141.7,138c10,28.9,16,60.7,16.3,91.2c1.5,176.1-1,352.3,1.3,528.4C1678.7,1866.8,1722.4,1886,1808.1,1907.8z",fill:"
4currentColor"})]}),eW=["netuid","subnet_name"],eH=(0,eT.atomWithStorage)("subnets-menu-ag-grid-column-state-v2",null),eV=(0,e_.getGridOptions)({pagination:!1,defaultColDef:{sortable:!0,resizable:!1,unSortIcon:!0},headerHeight:34,rowHeight:40});function eK({value:e}){if(void 0===e)return null;let s=e>=0;return(0,t.jsx)(x.Text,{isNum:!0,level:"xs",className:(0,n.cn)("flex w-fit flex-row items-center gap-0.5 truncate rounded-full px-1 py-0 font-normal",s?"bg-accent-1/10 text-accent-1":"bg-accent-2/10 text-accent-2"),children:`${(0,eR.format)(e,"0.00")}%`})}let eG=({data:e})=>(0,t.jsx)(eK,{value:e?.price_change_1_hour}),eU=({data:e})=>(0,t.jsx)(eK,{value:e?.price_change_1_day}),e$=({data:e})=>(0,t.jsx)(eK,{value:e?.price_change_1_week}),eZ=({data:e})=>(0,t.jsx)(eK,{value:e?.price_change_1_month}),eJ=({value:e})=>null==e?null:(0,t.jsx)(x.Text,{level:"xs",className:"pl-1.5 text-[11px] font-normal text-[#949494]",isNum:!0,children:e}),eq=e=>{let t=e.node;if(!t||t.rowPinned)return null;let s=t.rowIndex;return"number"==typeof s?s+1:null},eQ=({netuid:e,subnetName:s,toggleSubnetWatch:n})=>{let l=(0,ep.useIsSubnetWatched)(e);return(0,t.jsxs)("div",{className:"flex h-full min-w-0 items-center gap-1.5",children:[l?i.isNewLookEnabled?(0,t.jsx)(eu.Star01,{size:16,className:"text-accent-1 shrink-0 cursor-pointer",fill:"currentColor",onClick:t=>{t.stopPropagation(),t.preventDefault(),n(e)}}):(0,t.jsx)(u.BiSolidStar,{size:16,color:"#00DBBC",className:"shrink-0 cursor-pointer",onClick:t=>{t.stopPropagation(),t.preventDefault(),n(e)}}):i.isNewLookEnabled?(0,t.jsx)(eu.Star01,{size:16,className:"text-fg-tertiary shrink-0 cursor-pointer",onClick:t=>{t.stopPropagation(),t.preventDefault(),n(e)}}):(0,t.jsx)(u.BiStar,{size:16,className:"shrink-0 cursor-pointer opacity-20",onClick:t=>{t.stopPropagation(),t.preventDefault(),n(e)}}),(0,t.jsx)(eM.SubnetNameDisplay,{fromNavMenu:!0,isClickable:!0,netuid:e,subnetName:s,className:"flex min-w-0 flex-1",small:!0,subnetNameParentContainer:"gap-0",netuidClassName:"-mt-1.5 !text-[10px]",subnetClassName:"font-normal text-xs leading-16 tracking-tight"})]})},eX=e=>{let s=e.data;if(!s)return null;let{setSubnetsWatchList:n}=e.context;return(0,t.jsx)(eQ,{netuid:s.netuid,subnetName:s.subnet_name.replace((0,ec.default)(),""),toggleSubnetWatch:e=>{n(t=>t.includes(e)?t.filter(t=>t!==e):t.concat(e))}})},eY=e=>(0,eL.parseNumber)(e.data?.price).toLocaleString("en-US",{minimumFractionDigits:6,maximumFractionDigits:6}),e0=e=>{let s=Number(e.value??0);return(0,t.jsxs)(x.Text,{level:"buttonSmall",className:"leading-16 flex items-center whitespace-nowrap text-xs font-normal tracking-tight",isNum:!0,children:[(0,t.jsx)(ez,{className:"-mb-0.25 -mr-1"}),(0,eR.format)(s,"0.00a")]})},e1=({data:e})=>{let s=e?.emission;return"number"!=typeof s?null:(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[e?.subnet_emission_enabled===!1?i.isNewLookEnabled?(0,t.jsx)(eE.PauseCircle,{size:14,className:"text-fg-secondary shrink-0"}):(0,t.jsx)(u.BiPauseCircle,{size:14,className:"shrink-0 text-white/60"}):null,(0,t.jsx)(eF.TableText,{amount:s,level:"labelExtraSmall",percentage:!0,isNum:!0})]})},e2=({data:e})=>e?!(e.market_cap<=0)&&isFinite(e.market_cap)&&isFinite(e.tao_volume_24_hr)?(0,t.jsxs)(x.Text,{level:"labelExtraSmall",isNum:!0,children:[(0,eR.format)(e.volume_mc,"0.00"),"%"]}):(0,t.jsx)(x.Text,{level:"xs",className:"leading-16 text-xs font-normal tracking-tight",children:"—"}):null,e4=({data:e})=>e?.netuid===0?(0,t.jsx)(x.Text,{level:"labelSmall",children:"NA"}):e?.netuid===void 0?null:(0,t.jsx)(eF.TableText,{amount:100*e.root_prop,percentage:!0,level:"labelExtraSmall",isNum:!0}),e5=e=>{let s=e.data;return s&&s.seven_day_prices.length?(0,t.jsx)("div",{className:"flex h-full w-full items-center",style:{minHeight:40},children:(0,t.jsx)(eB,{data:s.seven_day_prices,state:s.price_change_1_week>=0,className:"!h-4 w-full"})}):null};function e6({initialData:e,subnetsWatchList:l,watchList:r,setSubnetsWatchList:a,search:o,fromNavMenu:u=!1}){let d=(0,s.useRef)(null),[p,m]=(0,ej.useAtom)(eH),[f]=(0,ep.useShowRootSubnet)(),[h]=(0,ep.useShowInactiveSubnets)(),{autoSizeStrategy:x}=(0,eO.useTableSizeUtils)(),v=(0,c.useUiTranslations)(),b=(0,s.useMemo)(()=>e.reduce((e,t)=>
4{if(!f&&0===t.netuid||!h&&t.startup_mode||r&&!l.includes(t.netuid))return e;let s={netuid:t.netuid,emission:(0,eI.taoEmissionTotalPercent)(Number(t.emission||0),Number(t.excess_tao||0)),subnet_emission_enabled:t.subnet_emission_enabled,price:Number(t.price),market_cap:Number(t.market_cap)/ed.taoDivider,liquidity:Number(t.liquidity)/ed.taoDivider,volume_mc:!(0>=Number(t.market_cap))&&isFinite(Number(t.market_cap))&&isFinite(Number(t.tao_volume_24_hr))?Number(t.tao_volume_24_hr)/Number(t.market_cap)*100:0,seven_day_prices:t.seven_day_prices,price_change_1_hour:Number(t.price_change_1_hour),price_change_1_day:Number(t.price_change_1_day),price_change_1_week:Number(t.price_change_1_week),price_change_1_month:Number(t.price_change_1_month),subnet_name:t.subnet_name,tao_volume_24_hr:Number(t.tao_volume_24_hr)/ed.taoDivider,startup_mode:t.startup_mode,root_prop:Number(t.root_prop)};return(0,ed.getFilter)(s,o,[...eW])&&e.push(s),e},[]).sort((e,t)=>t.market_cap-e.market_cap),[e,o,h,f,l,r]),g=(0,s.useMemo)(()=>({"subnet-row-watched":e=>!r&&l.includes(e.data?.netuid??-1)}),[l,r]),y=(0,s.useCallback)(e=>{d.current=e.api,p?.length&&e.api.applyColumnState({state:p,applyOrder:!0})},[p]),w=(0,s.useCallback)(e=>{m(e.api.getColumnState()),e.api.refreshCells({columns:["row_number"],force:!0})},[m]),C=(0,s.useCallback)(e=>`row-${e.data.netuid}`,[]);(0,s.useEffect)(()=>{d.current&&p?.length&&d.current.applyColumnState({state:p,applyOrder:!0})},[p]);let S=(0,s.useMemo)(()=>[{colId:"row_number",headerName:v.subnetsGrid.rankSymbol,width:35,maxWidth:35,pinned:"left",suppressMovable:!0,sortable:!1,filter:!1,valueGetter:eq,cellRenderer:eJ},{colId:"subnet",headerName:v.subnetsGrid.subnet,width:200,minWidth:125,pinned:"left",suppressMovable:!0,getQuickFilterText:e=>{let t=e.data;return t?`${t.netuid} ${t.subnet_name}`.trim():""},cellRenderer:eX,valueGetter:e=>e.data?.netuid},{field:"emission",headerName:v.subnetsGrid.emission,width:105,type:"rightAligned",cellRenderer:e1},{field:"price",headerName:v.subnetsGrid.priceT,width:120,type:"rightAligned",cellRenderer:eY},{field:"price_change_1_hour",headerName:v.subnetsGrid.change1h,width:110,type:"rightAligned",cellRenderer:eG},{field:"price_change_1_day",headerName:v.subnetsGrid.change1d,width:110,type:"rightAligned",cellRenderer:eU},{field:"price_change_1_week",headerName:v.subnetsGrid.change1w,width:110,type:"rightAligned",cellRenderer:e$},{field:"price_change_1_month",headerName:v.subnetsGrid.change1m,width:110,type:"rightAligned",cellRenderer:eZ},{field:"market_cap",headerName:v.subnetsGrid.mCap,width:120,sort:"desc",sortIndex:0,type:"rightAligned",cellRenderer:e0},{field:"tao_volume_24_hr",headerName:v.subnetsGrid.vol24h,width:130,type:"rightAligned",cellRenderer:e0},{field:"volume_mc",headerName:v.subnetsGrid.volCap,width:120,type:"rightAligned",cellRenderer:e2},{field:"liquidity",headerName:v.subnetsGrid.liquidity,width:130,type:"rightAligned",cellRenderer:e0},{field:"root_prop",headerName:v.subnetsGrid.rootProp,width:120,type:"rightAligned",cellRenderer:e4},{field:"seven_day_prices",headerName:v.subnetsGrid.last7Days,width:160,sortable:!1,cellRenderer:e5}],[v]),N=b.length>0;return(0,t.jsx)("div",{className:(0,n.cn)("flex w-full",i.isNewLookEnabled?"pb-3":"px-10 pb-5"),children:N?(0,t.jsx)("div",{className:"max-h-[min(620px,calc(100vh-270px))] min-h-0 w-full overflow-auto overscroll-contain",children:(0,t.jsx)(eP.TaostatsDataGrid,{containerClassName:(0,n.cn)("w-full",i.isNewLookEnabled&&"taostats-table-new-look"),getRowId:C,rowData:b,rowClassRules:g,columnDefs:S,gridOptions:eV,autoSizeStrategy:x,animateColumnResizing:!0,context:{setSubnetsWatchList:a,fromNavMenu:u},domLayout:"autoHeight",suppressColumnVirtualisation:!0,onGridReady:y,onSortChanged:w})}):(0,t.jsx)(eb,{label:v.noFavourites.subnets})})}var e3=e.i(789579);let e7=({size:e=24,color:t="currentColor",...n})=>s.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},s.createElement("path",{d:"M21 12H9m12-6H9m12 12H9m-4-6a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm0-6a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm0 12a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"}));function e8({selectedMode:e,setSelectedMode:s,storageKey:n}){return(0,t.jsxs)(m.Flex,{className:"gap-1",children:[(0,t.jsx)(e9,{selected:"list"===e,setSelected:()=>{(0,ed.setCookie)({name:n,value:JSON.stringify(!0)}),s("list")},storageKey:n,icon:(0,t.jsx)(e7,{size:16})}),(0,t.jsx)(e9,{selected:"grid"===e,setSelected:()=>{(0,ed.setCookie)({name:n,value:JSON.stringify(!1)}),s("grid")},storageKey:n,icon:(0,t.jsx)(e3.DotsGrid,{size:16})})]})}
4function e9({selected:e,setSelected:s,icon:n}){return(0,t.jsx)(w.NewLookButton,{size:"sm",hierarchy:"outline",selected:e,onClick:()=>{s(!0)},children:n})}e7.displayName="List";let te=["netuid","subnet_name"],tt=({activeMenuId:e,activeSectionId:l,isLoading:r,onLinkClick:a})=>{let{getWebUrl:o}=(0,d.useUrlResolver)(),p=(0,c.useUiTranslations)(),h=p.navigation.sections.subnets,v=(0,s.useContext)(A.NavigationContext),[g,y]=(0,s.useState)(!0),[C,S]=(0,ep.useSubnetsWatchList)(),[N]=(0,ep.useShowFavouriteSubnetsNavMenu)(),[k]=(0,ep.useShowRootSubnet)(),[j]=(0,ep.useShowInactiveSubnets)(),[T,R]=(0,s.useState)(""),L=(0,s.useRef)(null),O=(0,s.useMemo)(()=>(v?.subnetPoolData??[]).slice().sort((e,t)=>e.netuid-t.netuid),[v?.subnetPoolData]),M=O.filter(({netuid:e})=>!N||C.find(t=>t===e)).filter(e=>(k||0!==e.netuid)&&(j||!e.startup_mode)).filter(e=>(0,ed.getFilter)(e,T,te));return(0,s.useEffect)(()=>{y(JSON.parse((0,ed.getCookie)(em.LOCAL_STORAGE_SUBNETS_MENU_SWITCH_ON_LIST_MODE)??"true"))},[]),(0,s.useEffect)(()=>{if(!i.isNewLookEnabled||"subnets"!==e)return;let t=e=>{"/"===e.key&&L.current?.closest('[data-state="open"]')&&document.activeElement!==L.current&&(e.preventDefault(),L.current.focus())};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[e]),(0,t.jsxs)(E.NavigationMenuItem,{value:"subnets",className:"hidden xl:flex",children:[(0,t.jsx)(ei,{label:h,href:o(_.appRoutes.subnets.home),active:"subnets"===l,loading:r,onLinkClick:a}),!r&&(0,t.jsxs)(E.NavigationMenuContent,{className:(0,n.cn)("overflow-hidden","subnets"===e?"!w-full":""),children:[(0,t.jsxs)(ee,{title:h,href:o(_.appRoutes.subnets.home),leftContent:(0,t.jsxs)("div",{className:(0,n.cn)("flex flex-row",i.isNewLookEnabled?"":"-mb-0.25 items-center"),children:[(0,t.jsx)(x.Text,{level:i.isNewLookEnabled?"TextXsMedium":"xs",className:(0,n.cn)(i.isNewLookEnabled?"text-tertiary":"-mb-0.25 text-white opacity-60"),children:p.navLinks.subnetsValue}),(0,t.jsxs)(x.Text,{level:i.isNewLookEnabled?"TextXsMedium":"base",className:(0,n.cn)("flex flex-row",i.isNewLookEnabled?"text-primary":"items-center text-white"),children:[(0,t.jsx)(ez,{className:"-mb-0.25 -mr-1"}),v?.subnetPoolData.filter(e=>0!==e.netuid).reduce((e,t)=>e+(t.startup_mode?0:Number(t.price)),0).toFixed(2)]})]}),children:[i.isNewLookEnabled?(0,t.jsx)(w.NewLookButton,{size:"sm",hierarchy:"secondary-gray",asChild:!0,iconTrailing:(0,t.jsx)(b.ArrowUpRight,{size:14}),children:(0,t.jsx)(f.Link,{href:o(_.appRoutes.subnets.sales),onClick:a,children:"Subnets for Sale"})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(m.Flex,{className:"items-center gap-4",children:[(0,t.jsx)(ef.FavouriteSubnetsNavMenuCheckbox,{}),(0,t.jsx)(ef.RootSubnetCheckbox,{}),(0,t.jsx)(ef.InactiveSubnetsCheckbox,{})]}),(0,t.jsx)(E.NavigationMenuLink,{asChild:!0,className:"flex h-7 cursor-pointer flex-row items-center justify-center gap-1 rounded-lg border border-white/40 bg-[#1D1D1D] px-2 py-1 text-white shadow-[0px_5px_23.8px_0px_rgba(0,0,0,0.25)] hover:bg-[#1D1D1D]/50",children:(0,t.jsx)(f.Link,{href:o(_.appRoutes.subnets.sales),onClick:a,children:(0,t.jsx)(x.Text,{level:"sm",className:"text-white/80 hover:text-white",children:"Subnets for Sale"})})})]}),(0,t.jsx)(ek,{setGlobalFilter:R,closeIcon:!0,searchPlaceholder:"Filter by Subnet or Netuid",inputRef:L}),i.isNewLookEnabled?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ef.FavouriteSubnetsNavMenuCheckbox,{}),(0,t.jsx)(e8,{selectedMode:g?"list":"grid",setSelectedMode:e=>{y("list"===e)},storageKey:em.LOCAL_STORAGE_SUBNETS_MENU_SWITCH_ON_LIST_MODE})]}):(0,t.jsxs)("div",{className:"flex flex-row gap-2 rounded-xl border border-[#323232] bg-[#1D1D1D] p-1",children:[(0,t.jsx)(Y.Button,{className:(0,n.cn)("h-fit cursor-pointer p-2",g?"border border-[#00DBBC] bg-[#00DBBC]/10 hover:bg-[#00DBBC]/10":"border-transparent bg-transparent hover:bg-transparent"),onClick:()=>{(0,ed.setCookie)({name:em.LOCAL_STORAGE_SUBNETS_MENU_SWITCH_ON_LIST_MODE,value:JSON.stringify(!0)}),y(!0)},children:(0,t.jsx)(u.BiListUl,{size:16,className:(0,n.cn)("text-white",g?"opacity-100":"opacity-40")})}),(0,t.jsx)(Y.Button,{className:(0,n.cn)("h-fit cursor-pointer p-2",g?"border-transparent bg-transparent hover:bg-transparent":"border border-[#00DBBC] bg-[#00DBBC]/10 hover:bg-[#00DBBC]/10"),onClick:()=>{(0,ed.setCookie)({name:em.LOCAL_STORAGE_SUBNETS_MENU_SWITCH_ON_LIST_MODE,value:JSON.stringify(!1)}),y(!1)},children:(0,t.jsx)(I.CgMenuGridR,{size:16,className:(0,n.cn)("text-white",g?"opacity-40":"opacity-100")})})]})]}),(0,t.jsx)(et,{className:(0,n.cn)("!w-full","max-h-[calc(100vh-240p
4x)] overflow-y-auto overflow-x-hidden"),children:g?(0,t.jsx)(e6,{initialData:v?.subnetPoolData??[],subnetsWatchList:C,setSubnetsWatchList:S,search:T,watchList:N,fromNavMenu:!0}):M.length?(0,t.jsx)("ul",{className:(0,n.cn)("grid grid-flow-col gap-x-3 gap-y-1 lg:gap-x-5",i.isNewLookEnabled?"":"-right-2 left-auto w-[96vw] p-5"),style:{gridTemplateColumns:"repeat(6, minmax(0, 1fr))",gridTemplateRows:`repeat(${Math.ceil(O.length/6)}, minmax(0, 1fr))`},children:M.map(({netuid:e})=>{let s=v?.subnetData?.find(t=>t.netuid===e)?.subnet_name.replace((0,ec.default)(),"")??"Unknown";return(0,t.jsxs)("div",{className:"flex flex-row items-center gap-1 pl-3",children:[void 0!==C.find(t=>t===e)?i.isNewLookEnabled?(0,t.jsx)(eu.Star01,{size:16,className:"text-accent-1 flex-shrink-0 cursor-pointer",fill:"currentColor",onClick:()=>{S(t=>t.filter(t=>t!==e))}}):(0,t.jsx)(u.BiSolidStar,{size:16,color:"#00DBBC",className:"flex-shrink-0 cursor-pointer",onClick:()=>{S(t=>t.filter(t=>t!==e))}}):i.isNewLookEnabled?(0,t.jsx)(eu.Star01,{size:16,className:"text-fg-tertiary flex-shrink-0 cursor-pointer",onClick:()=>{S(t=>t.includes(e)?t:[...t,e])}}):(0,t.jsx)(u.BiStar,{size:16,className:"flex-shrink-0 cursor-pointer opacity-20",onClick:()=>{S(t=>t.includes(e)?t:[...t,e])}}),i.isNewLookEnabled?(0,t.jsx)(w.NewLookButton,{asChild:!0,hierarchy:"link",className:"min-w-0 flex-1 justify-start",children:(0,t.jsxs)(f.Link,{href:o(_.appRoutes.subnets.detail(e.toString())),onClick:a,children:[(0,t.jsxs)(x.Text,{level:"TextSmRegular",className:"text-fg-tertiary font-mono",children:[e,":"]}),(0,t.jsx)(x.Text,{level:"TextSmRegular",className:"truncate",children:s.length>0?s:"Unknown"})]},e)},e):(0,t.jsx)(E.NavigationMenuLink,{asChild:!0,children:(0,t.jsxs)(f.Link,{href:o(_.appRoutes.subnets.detail(e.toString())),onClick:a,className:"flex w-full items-center gap-1 rounded-md py-1 pl-1 pr-3 text-sm text-white hover:bg-[#202020] hover:text-white",children:[(0,t.jsxs)("p",{className:"text-smt h-5 flex-shrink-0 pt-0.5 text-end font-mono opacity-60",children:[e,":"]})," ",(0,t.jsx)("p",{className:"truncate",children:s.length>0?s:"Unknown"})]},e)})]},e)})}):(0,t.jsx)("div",{className:"flex h-60 w-full flex-col items-center justify-center",children:(0,t.jsx)(eb,{label:p.noFavourites.subnets})})})]})]},"subnets")};var ts=e.i(682830),tn=e.i(152990),tl=e.i(69462);let ti=({row:e})=>{let s=Number(e.original.active_subnets);return(0,t.jsx)("div",{className:"flex w-14 justify-end !text-white",children:s})},tr=()=>(0,t.jsx)("span",{className:"flex justify-end",children:"Active"}),ta=()=>(0,t.jsx)("span",{className:"flex w-44",children:"Name / Address"}),to=({row:e})=>{let s=e.original.global_alpha_stake_as_tao/ed.taoDivider;return(0,t.jsx)("div",{className:"flex w-24 justify-end",children:(0,t.jsxs)("div",{className:"flex items-center whitespace-nowrap text-sm",children:[(0,t.jsx)(ez,{className:"mb-0.25 -mr-1"}),s.toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:0})]})})},tu=()=>(0,t.jsx)("span",{className:"flex w-24 justify-end",children:"Alpha Stake"}),tc=({row:e})=>(0,t.jsxs)("div",{className:"flex w-48 flex-col gap-1",children:[(0,t.jsxs)("div",{className:"flex flex-row justify-between",children:[(0,t.jsxs)("div",{className:"flex flex-row items-end gap-1",children:[(0,t.jsx)("div",{className:"text-xs font-normal opacity-60",children:"Root"}),(0,t.jsx)("div",{className:"flex flex-row items-end",children:(0,t.jsxs)("p",{className:"flex flex-row items-end text-sm font-normal leading-[18px]",children:[(0,eR.format)(1/((0,eL.parseNumber)(e.original.weighted_root_stake)+(0,eL.parseNumber)(e.original.global_alpha_stake_as_tao))*(0,eL.parseNumber)(e.original.weighted_root_stake)*100,"0.00a"),(0,t.jsx)("span",{className:"ml-0.5 text-sm font-normal leading-[18px]",children:"%"})]})})]}),(0,t.jsxs)("div",{className:"flex flex-row items-end gap-1",children:[(0,t.jsx)("div",{className:"text-xs font-normal opacity-60",children:"Alpha"}),(0,t.jsx)("div",{className:"flex flex-row items-end",children:(0,t.jsxs)("p",{className:"flex flex-row items-end text-sm font-normal leading-[18px]",children:[(0,eR.format)(1/((0,eL.parseNumber)(e.original.weighted_root_stake)+(0,eL.parseNumber)(e.original.global_alpha_stake_as_tao))*(0,eL.parseNumber)(e.original.global_alpha_stake_as_tao)*100,"0.00a"),(0,t.jsx)("span",{className:"ml-0.5 text-sm font-normal leading-[18px]",children:"%"})]})})]})]}),(0,t.jsxs)("div",{className:"flex flex-row gap-0.5",children:[(0,t.jsx)("div",{className:"h-2 w-full rounded-full border border-[#262626] bg-[#00DBBC]",style:{width:`${1/((0,eL.parseNumber)(e.original.weighted_root_stake)+(0,eL.parseNumber)(e.original.global_alpha_stake_as_tao))*(0,eL.parseNumber)(e.original.weighted_root_stake)*100}%`}}),(0,t.jsx)("div",{className:"h-2 w-full rounded-full border border-[#262626] bg-[#EB5347]",style:{width:`${1/((0,eL.parseNumber)(e.original.weighted_root_stake)+(0,eL.parseNumber)(e.original.global_alpha_stake_as_tao))*(0,eL.parseNumber)(e.original.global_alpha_stake_as_tao)*100}%`}})]})]}),td=({row:e})=>{let s=Number(e.getValue("dominance"));return(0,t.jsxs)("div",{className:"flex w-[68px] justify-end !text-white",children:[s,"%"]})},tp=()=>(0,t.jsx)("span",{className:"flex w-[68px] justify-end",children:"Dominance"}),tm=({row:e})=>{let s=Number(e.original.global_nominators);return(0,t.jsx)("div",{className:"flex w-10 justify-end !text-white",children:s})},tf=()=>(0,t.jsx)("span",{className:"flex justify-end",children:"Noms"});var th=e.i(473665);let tx=({row:e})=>{let s=Number(e.original.global_nominators_24_hr_change);return(0,t.jsx)("div",{className:"flex w-16 justify-end",children:(0,t.jsxs)("div",{className:(0,n.cn)("flex flex-row items-center justify-center gap-0.5 rounded-full px-2 py-0.5",s>=0&&"bg-[#BAEB471A] text-[#00DBBC]",s<0&&"bg-[#EB53471A] text-[#EB5347]"),children:[s>=0?(0,t.jsx)(th.MdOutlineNorthEast,{size:16}):(0,t.jsx)(th.MdCallReceived,{size:16}),(0,t.jsx)("p",{className:"text-xs",children:s})]})})},tv=()=>(0,t.jsx)("span",{className:"flex w-16 justify-end",children:"24h"}),tb=({row:e})=>{let s=Number(e.getValue("rank"));return(0,t.jsx)("div",{className:"flex w-4 justify-end !text-white",children:s})},tg=()=>(0,t.jsx)("span",{className:"flex justify-end",children:"Rank"}),ty=({row:e})=>{let s=e.original.root_stake/ed.taoDivider;return(0,t.jsx)("div",{className:"flex w-[124px] justify-end",children:(0,t.jsxs)("div",{className:"flex items-center whitespace-nowrap text-sm",children:[(0,t.jsx)(ez,{className:"mb-0.25 -mr-1"}
4),s.toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:0})]})})},tw=()=>(0,t.jsx)("span",{className:"flex w-[124px] justify-end",children:"Root Stake"}),tC=({row:e})=>{let s=e.original.weighted_root_stake/ed.taoDivider;return(0,t.jsx)("div",{className:"flex w-[124px] justify-end",children:(0,t.jsxs)("div",{className:"flex items-center whitespace-nowrap text-sm",children:[(0,t.jsx)(ez,{className:"mb-0.25 -mr-1"}),s.toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:0})]})})},tS=()=>(0,t.jsx)("span",{className:"flex w-[124px] justify-end",children:"Root Weight (0.18)"}),tN=({row:e})=>{let s=(100*Number(e.getValue("take"))).toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:2});return(0,t.jsxs)("div",{className:"flex w-11 justify-end !text-white",children:[s,"%"]})},tk=()=>(0,t.jsx)("span",{className:"flex w-11 justify-end",children:"Take"}),tE=({row:e})=>{let s=e.original.global_weighted_stake/ed.taoDivider;return(0,t.jsx)("div",{className:"flex w-24 justify-end",children:(0,t.jsxs)("div",{className:"flex items-center whitespace-nowrap text-sm",children:[(0,t.jsx)(ez,{className:"mb-0.25 -mr-1"}),s.toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:0})]})})},tj=()=>(0,t.jsx)("span",{className:"flex w-20 justify-end",children:"Total Weight"}),tT=({row:e,validatorsWatchList:s,setValidatorsWatchList:n})=>(0,t.jsx)(t.Fragment,{children:s.includes(e.original.id)?i.isNewLookEnabled?(0,t.jsx)(eu.Star01,{size:16,className:"text-accent-1 flex-shrink-0 cursor-pointer",fill:"currentColor",onClick:t=>{let s;t.stopPropagation(),t.preventDefault();let l=JSON.parse((0,ed.getCookie)(em.LOCAL_STORAGE_VALIDATORS_WATCHLIST)??"[]");l.includes(e.original.id)?n(s=l.filter(t=>t!==e.original.id)):n(s=l),(0,ed.setCookie)({name:em.LOCAL_STORAGE_VALIDATORS_WATCHLIST,value:JSON.stringify(s)})}}):(0,t.jsx)(u.BiSolidStar,{size:16,color:"#00DBBC",className:"flex-shrink-0 cursor-pointer",onClick:t=>{let s;t.stopPropagation(),t.preventDefault();let l=JSON.parse((0,ed.getCookie)(em.LOCAL_STORAGE_VALIDATORS_WATCHLIST)??"[]");l.includes(e.original.id)?n(s=l.filter(t=>t!==e.original.id)):n(s=l),(0,ed.setCookie)({name:em.LOCAL_STORAGE_VALIDATORS_WATCHLIST,value:JSON.stringify(s)})}}):i.isNewLookEnabled?(0,t.jsx)(eu.Star01,{size:16,className:"text-fg-tertiary flex-shrink-0 cursor-pointer",onClick:t=>{t.stopPropagation(),t.preventDefault();let s=JSON.parse((0,ed.getCookie)(em.LOCAL_STORAGE_VALIDATORS_WATCHLIST)??"[]");s.includes(e.original.id)||(s.push(e.original.id),n(s)),(0,ed.setCookie)({name:em.LOCAL_STORAGE_VALIDATORS_WATCHLIST,value:JSON.stringify(s)})}}):(0,t.jsx)(u.BiStar,{size:16,className:"flex-shrink-0 cursor-pointer opacity-20",onClick:t=>{t.stopPropagation(),t.preventDefault();let s=JSON.parse((0,ed.getCookie)(em.LOCAL_STORAGE_VALIDATORS_WATCHLIST)??"[]");s.includes(e.original.id)||(s.push(e.original.id),n(s)),(0,ed.setCookie)({name:em.LOCAL_STORAGE_VALIDATORS_WATCHLIST,value:JSON.stringify(s)})}})}),tR=({row:e})=>{let s=Number(e.original.global_weighted_stake_24_hr_change);return(0,t.jsx)("div",{className:"flex w-[124px] justify-end",children:(0,t.jsxs)("div",{className:(0,n.cn)("flex w-fit flex-row items-center gap-0.5 rounded-full px-2 py-0.5 text-xs",s>=0?"bg-[#00DBBC1A] text-[#00DBBC]":"bg-[#EB53471A] text-[#EB5347]"),children:[s>=0?(0,t.jsx)(th.MdOutlineNorthEast,{size:16}):(0,t.jsx)(th.MdCallReceived,{size:16}),(0,t.jsx)(ez,{className:(0,n.cn)("-ml-1 -mr-1.5",s>=0?"text-[#00DBBC]":"text-[#EB5347]")}),(0,eR.format)(s,"0.00a")]})})},tI=()=>(0,t.jsx)("span",{className:"flex w-[124px] justify-end",children:"Weight Change (24h)"}),tL=["id","name"];function tO({initialData:e,validatorsWatchList:l,watchValidator:r,setValidatorsWatchList:a,search:o,fromNavMenu:u=!1}){let{getWebUrl:p}=(0,d.useUrlResolver)(),m=(0,V.useRouter)(),f=(0,c.useUiTranslations)(),h=(0,s.useMemo)(()=>e.map(e=>({id:e.hotkey.ss58,name:e.name??"",rank:e.rank,dominance:Number(e.dominance),root_rank:e.root_rank,alpha_rank:e.alpha_rank,global_nominators:e.global_nominators,global_nominators_24_hr_change:e.global_nominators_24_hr_change,global_weighted_stake:Number(e.global_weighted_stake),weighted_root_stake:Number(e.weighted_root_stake),global_alpha_stake_as_tao:Number(e.global_alpha_stake_as_tao),take:e.take,active_subnets:e.active_subnets,root_stake:Number(e.root_stake),global_weighted_stake_24_hr_change:Number(e.global_weighted_stake_24_hr_change)/ed.taoDivider})).filter(e=>!r||l.find(t=>t===e.id)).filter(e=>(0,ed.getFilter)(e,o,tL)),[e,o,l,r]),x=[{accessorKey:"watch",header:"",cell:e=>(0,t.jsx)(tT,{...e,validatorsWatchList:l,setValidatorsWatchList:a}),enableSorting:!1},{accessorKey:"rank",header:tg,cell:tb},{accessorKey:"id",header:ta,cell:e=>{let s;return s=e.row.original.id,(0,t.jsx)("div",{className:"flex w-52",children:(0,t.jsx)(K.AddressFormatter,{uid:s,noColor:!1,isEncoded:!0,isValidator:!0,className:"text-sm",rootClassName:"!max-w-52",textClassName:"flex-shrink-[1]",underline:"shrink-[unset] min-w-0",fromNavMenu:u})})},enableSorting:!1},{accessorKey:"dominance",header:tp,cell:td},{accessorKey:"global_nominators",header:tf,cell:tm},{accessorKey:"global_nominators_24_hr_change",header:tv,cell:tx},{accessorKey:"active_subnets",header:tr,cell:ti},{accessorKey:"global_weighted_stake",header:tj,cell:tE}
4,{accessorKey:"global_weighted_stake_24_hr_change",header:tI,cell:tR},{accessorKey:"root_stake",header:tw,cell:ty},{accessorKey:"weighted_root_stake",header:tS,cell:tC},{accessorKey:"global_alpha_stake_as_tao",header:tu,cell:to},{accessorKey:"chart",header:"",cell:tc,enableSorting:!1},{accessorKey:"take",header:tk,cell:tN}],v=(0,tn.useReactTable)({data:h,columns:x,getCoreRowModel:(0,ts.getCoreRowModel)(),getPaginationRowModel:(0,ts.getPaginationRowModel)(),getSortedRowModel:(0,ts.getSortedRowModel)(),manualPagination:!0,debugTable:!0}),b=(0,s.useCallback)((e,{original:t})=>{let s=p(_.appRoutes.validator.detail(t.id));if(u){let e=document.querySelector('[data-state="open"], [aria-expanded="true"]');e&&e.click()}e.metaKey||e.ctrlKey?window.open(s,"_blank"):m.push(s)},[u,p,m]);return(0,t.jsx)("div",{className:(0,n.cn)("flex max-h-[calc(100vh-270px)] w-full overflow-y-auto",i.isNewLookEnabled?"pb-3":"px-10"),children:h.length>0?(0,t.jsx)(tl.DataTable,{table:v,hasBorder:!1,small:!0,tableCellClassName:"px-2 py-0 sm:py-0 h-10",onRowClick:(e,t)=>{b(e,t)},rootClassName:"h-full"}):(0,t.jsx)(eb,{label:f.noFavourites.validators})})}var tM=e.i(733095),tF=e.i(494480),t_=e.i(534328),tP=e.i(357773);let tD=["id","name"],tA=(0,eT.atomWithStorage)("validators-menu-ag-grid-column-state-v1",null),tB=(0,e_.getGridOptions)({pagination:!1,defaultColDef:{sortable:!0,resizable:!1,unSortIcon:!0},headerHeight:34,rowHeight:40}),tz=e=>{let s=e.data;if(!s)return null;let{validatorsWatchList:l,setValidatorsWatchList:i}=e.context,r=l.includes(s.id);return(0,t.jsx)(eu.Star01,{size:16,className:(0,n.cn)("shrink-0 cursor-pointer",r?"text-accent-1":"text-fg-tertiary"),fill:r?"currentColor":void 0,onClick:e=>{var t;let n,l;e.stopPropagation(),e.preventDefault(),t=s.id,i(l=(n=JSON.parse((0,ed.getCookie)(em.LOCAL_STORAGE_VALIDATORS_WATCHLIST)??"[]")).includes(t)?n.filter(e=>e!==t):n.concat(t)),(0,ed.setCookie)({name:em.LOCAL_STORAGE_VALIDATORS_WATCHLIST,value:JSON.stringify(l)})}})},tW=({data:e})=>e?(0,t.jsx)(eF.TableText,{info:String(e.rank),className:"font-mono-num text-xs font-normal",isNum:!0}):null,tH=e=>{let s=e.data;return s?(0,t.jsx)(K.AddressFormatter,{info:s.id,nameOverride:s.name||void 0,noColor:!1,isEncoded:!0,isValidator:!0,className:"font-mono-num text-xs font-normal",rootClassName:"!max-w-52",textClassName:"flex-shrink-[1]",underline:"shrink-[unset] min-w-0",fromNavMenu:e.context.fromNavMenu}):null},tV=e=>(0,t.jsx)(eF.TableText,{info:String(e.value??0),className:"font-mono-num text-xs font-normal",percentage:!0,isNum:!0}),tK=e=>(0,t.jsx)(eF.TableText,{info:String(e.value??0),className:"font-mono-num text-xs font-normal",isNum:!0}),tG=({data:e})=>{if(!e)return null;let s=e.global_nominators_24_hr_change,n=s>=0;return(0,t.jsx)(tP.PillV2,{type:"semiTransparent",size:"small",colour:n?"teal":"red",leadingIcon:n?(0,t.jsx)(tF.TrendUp02,{size:16}):(0,t.jsx)(tM.TrendDown02,{size:16}),children:Math.abs(s)})},tU=e=>{let s=Number(e.value??0)/ed.taoDivider;return(0,t.jsxs)(x.Text,{level:"TextXsRegular",className:"leading-16 flex items-center justify-end whitespace-nowrap text-xs font-normal tracking-tight",isNum:!0,children:[(0,t.jsx)(ez,{className:"-mb-0.25 -mr-1"}),s.toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:0})]})},t$=({data:e})=>{if(!e)return null;let s=e.global_weighted_stake_24_hr_change,l=s>=0;return(0,t.jsxs)(tP.PillV2,{type:"semiTransparent",size:"small",colour:l?"teal":"red",leadingIcon:l?(0,t.jsx)(tF.TrendUp02,{size:16}):(0,t.jsx)(tM.TrendDown02,{size:16}),children:[(0,t.jsx)(ez,{className:(0,n.cn)("-ml-1 -mr-1.5 h-5 w-5",l?"text-positive-trend":"text-negative-trend")}),(0,eR.format)(Math.abs(s),"0.00a")]})},tZ=({data:e})=>e?(0,t.jsx)(eF.TableText,{amount:100*Number(e.take),className:"font-mono-num text-xs font-normal",percentage:!0,isNum:!0}):null,tJ=({data:e})=>e?(0,t.jsx)(t_.DtaoPercentage,{isMono:!0,root:e.weighted_root_stake,stake:e.global_alpha_stake_as_tao,leftContent:"Root",rightContent:"Alpha",className:"w-48",contentClassName:"font-mono-num font-medium text-xs leading-3"}):null;function tq({initialData:e,validatorsWatchList:l,setValidatorsWatchList:i,search:r,watchValidator:a,fromNavMenu:o=!1}){let u=(0,V.useRouter)(),p=(0,c.useUiTranslations)(),{getWebUrl:m}=(0,d.useUrlResolver)(),f=(0,s.useRef)(null),[h,x]=(0,ej.useAtom)(tA),{autoSizeStrategy:v}=(0,eO.useTableSizeUtils)(),b=(0,s.useMemo)(()=>e.map(e=>
4({id:e.hotkey.ss58,name:e.name??"",rank:e.rank,dominance:Number(e.dominance),root_rank:e.root_rank,alpha_rank:e.alpha_rank,global_nominators:e.global_nominators,global_nominators_24_hr_change:e.global_nominators_24_hr_change,global_weighted_stake:Number(e.global_weighted_stake),weighted_root_stake:Number(e.weighted_root_stake),global_alpha_stake_as_tao:Number(e.global_alpha_stake_as_tao),take:e.take,active_subnets:e.active_subnets,root_stake:Number(e.root_stake),global_weighted_stake_24_hr_change:Number(e.global_weighted_stake_24_hr_change)/ed.taoDivider})).filter(e=>!a||l.find(t=>t===e.id)).filter(e=>(0,ed.getFilter)(e,r,[...tD])),[e,r,l,a]),g=(0,s.useMemo)(()=>({"validator-row-watched":e=>!a&&l.includes(e.data?.id??"")}),[l,a]),y=(0,s.useCallback)(e=>{f.current=e.api,h?.length&&e.api.applyColumnState({state:h,applyOrder:!0})},[h]),w=(0,s.useCallback)(e=>{x(e.api.getColumnState())},[x]),C=(0,s.useCallback)(e=>`row-${e.data.id}`,[]),S=(0,s.useCallback)(e=>{let t=e.data?.id;if(!t)return;if(o){let e=document.querySelector('[data-state="open"], [aria-expanded="true"]');e&&e.click()}let s=m(_.appRoutes.validator.detail(t)),n=e.event;n instanceof MouseEvent&&(n.metaKey||n.ctrlKey)?window.open(s,"_blank"):u.push(s)},[o,m,u]);(0,s.useEffect)(()=>{f.current&&h?.length&&f.current.applyColumnState({state:h,applyOrder:!0})},[h]);let N=(0,s.useMemo)(()=>[{colId:"watch",headerName:"",width:40,maxWidth:40,pinned:"left",suppressMovable:!0,sortable:!1,filter:!1,cellRenderer:tz},{type:"rightAligned",colId:"rank",field:"rank",headerName:p.validatorsGrid.rank,width:72,pinned:"left",suppressMovable:!0,cellRenderer:tW},{colId:"id",field:"id",headerName:p.validatorsGrid.nameOrAddress,width:220,minWidth:180,pinned:"left",suppressMovable:!0,sortable:!1,cellRenderer:tH,getQuickFilterText:e=>{let t=e.data;return t?`${t.name} ${t.id}`.trim():""}},{type:"rightAligned",field:"dominance",headerName:p.validatorsGrid.dominance,width:100,cellRenderer:tV},{type:"rightAligned",field:"global_nominators",headerName:p.validatorsGrid.noms,width:90,cellRenderer:tK},{type:"rightAligned",field:"global_nominators_24_hr_change",headerName:p.validatorsGrid.twentyFourH,width:100,cellRenderer:tG},{type:"rightAligned",field:"active_subnets",headerName:p.validatorsGrid.active,width:90,cellRenderer:tK},{type:"rightAligned",field:"global_weighted_stake",headerName:p.validatorsGrid.totalWeight,width:130,cellRenderer:tU},{type:"rightAligned",field:"global_weighted_stake_24_hr_change",headerName:p.validatorsGrid.weightChange24h,width:170,cellRenderer:t$},{type:"rightAligned",field:"root_stake",headerName:p.validatorsGrid.rootStake,width:130,cellRenderer:tU},{type:"rightAligned",field:"weighted_root_stake",headerName:p.validatorsGrid.rootWeightPct,width:150,cellRenderer:tU},{type:"rightAligned",field:"global_alpha_stake_as_tao",headerName:p.validatorsGrid.alphaStake,width:130,cellRenderer:tU},{colId:"chart",headerName:"",width:200,sortable:!1,cellRenderer:tJ},{type:"rightAligned",field:"take",headerName:p.validatorsGrid.take,width:80,cellRenderer:tZ}],[p]),k=b.length>0;return(0,t.jsx)("div",{className:(0,n.cn)("flex w-full pb-3"),children:k?(0,t.jsx)("div",{className:"max-h-[min(620px,calc(100vh-270px))] min-h-0 w-full overflow-auto overscroll-contain",children:(0,t.jsx)(eP.TaostatsDataGrid,{containerClassName:(0,n.cn)("w-full taostats-table-new-look"),getRowId:C,rowData:b,rowClassRules:g,columnDefs:N,gridOptions:tB,autoSizeStrategy:v,animateColumnResizing:!0,context:{validatorsWatchList:l,setValidatorsWatchList:i,fromNavMenu:o},domLayout:"autoHeight",suppressColumnVirtualisation:!0,onGridReady:y,onSortChanged:w,onRowClicked:S})}):(0,t.jsx)(eb,{label:p.noFavourites.validators})})}let tQ=["id","name"],tX=({activeMenuId:e,activeSectionId:l,validators:r,completeWebNavigationLinks:a,isLoading:o,onLinkClick:p})=>{let{getWebUrl:m}=(0,d.useUrlResolver)(),h=(0,c.useUiTranslations)(),[v,b]=(0,s.useState)(""),[g,y]=(0,s.useState)([]),[C,S]=(0,s.useState)(!1),[N,k]=(0,s.useState)(!1),j=(0,s.useRef)(null);return(0,s.useEffect)(()=>{y(JSON.parse((0,ed.getCookie)(em.LOCAL_STORAGE_VALIDATORS_WATCHLIST)??"[]")),S(JSON.parse((0,ed.getCookie)(em.LOCAL_STORAGE_VALIDATORS_WATCH_VIEW)??"false")),
4k(JSON.parse((0,ed.getCookie)(em.LOCAL_STORAGE_VALIDATORS_MENU_SWITCH)??"false"))},[]),(0,s.useEffect)(()=>{if(!i.isNewLookEnabled||"validators"!==e)return;let t=e=>{"/"===e.key&&j.current?.closest('[data-state="open"]')&&document.activeElement!==j.current&&(e.preventDefault(),j.current.focus())};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[e]),(0,t.jsx)(t.Fragment,{children:a.filter(e=>"validators"===e.id).map(({id:s,label:a,mainIcon:c,children:d,href:T})=>(0,t.jsxs)(E.NavigationMenuItem,{value:"validators",className:"hidden xl:flex",children:[(0,t.jsx)(ei,{label:a,href:T,active:l===s,loading:o,mainIcon:c,onLinkClick:p}),!o&&(0,t.jsxs)(E.NavigationMenuContent,{className:(0,n.cn)("!w-full overflow-hidden",""===e&&"hidden"),children:[(0,t.jsxs)(ee,{title:a,href:m(_.appRoutes.validator.home),children:[(0,t.jsx)(ek,{setGlobalFilter:b,closeIcon:!0,searchPlaceholder:h.search.filterByValidator,inputRef:j,legacyRightContent:C?(0,t.jsx)(u.BiSolidStar,{size:16,color:"#00DBBC",className:"flex-shrink-0 cursor-pointer",onClick:()=>{(0,ed.setCookie)({name:em.LOCAL_STORAGE_VALIDATORS_WATCH_VIEW,value:JSON.stringify(!1)}),S(!1)}}):(0,t.jsx)(u.BiStar,{size:16,className:"flex-shrink-0 cursor-pointer opacity-20",onClick:()=>{(0,ed.setCookie)({name:em.LOCAL_STORAGE_VALIDATORS_WATCH_VIEW,value:JSON.stringify(!0)}),S(!0)}})}),i.isNewLookEnabled?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(Y.Button,{variant:"ghost",type:"button",className:"h-fit cursor-pointer p-2",onClick:()=>{(0,ed.setCookie)({name:em.LOCAL_STORAGE_VALIDATORS_WATCH_VIEW,value:JSON.stringify(!C)}),S(!C)},children:C?(0,t.jsx)(eu.Star01,{size:16,className:"text-accent-1 cursor-pointer",fill:"currentColor"}):(0,t.jsx)(eu.Star01,{size:16,className:"text-fg-tertiary cursor-pointer"})}),(0,t.jsx)(e8,{selectedMode:N?"list":"grid",setSelectedMode:e=>{k("list"===e)},storageKey:em.LOCAL_STORAGE_VALIDATORS_MENU_SWITCH})]}):(0,t.jsxs)("div",{className:"flex flex-row gap-2 rounded-xl border border-[#323232] bg-[#1D1D1D] p-1",children:[(0,t.jsx)(Y.Button,{className:(0,n.cn)("h-fit cursor-pointer p-2",N?"border border-[#00DBBC] bg-[#00DBBC]/10 hover:bg-[#00DBBC]/10":"border-transparent bg-transparent hover:bg-transparent"),onClick:()=>{(0,ed.setCookie)({name:em.LOCAL_STORAGE_VALIDATORS_MENU_SWITCH,value:JSON.stringify(!0)}),k(!0)},children:(0,t.jsx)(u.BiListUl,{size:16,className:(0,n.cn)("text-white",N?"opacity-100":"opacity-40")})}),(0,t.jsx)(Y.Button,{className:(0,n.cn)("h-fit cursor-pointer p-2",N?"border-transparent bg-transparent hover:bg-transparent":"border border-[#00DBBC] bg-[#00DBBC]/10 hover:bg-[#00DBBC]/10"),onClick:()=>{(0,ed.setCookie)({name:em.LOCAL_STORAGE_VALIDATORS_MENU_SWITCH,value:JSON.stringify(!1)}),k(!1)},children:(0,t.jsx)(I.CgMenuGridR,{size:16,className:(0,n.cn)("text-white",N?"opacity-40":"opacity-100")})})]})]}),(0,t.jsx)(et,{className:(0,n.cn)("!w-full",!N&&"max-h-[calc(100vh-240px)] overflow-y-auto overflow-x-hidden"),children:N?i.isNewLookEnabled?(0,t.jsx)(tq,{initialData:r,validatorsWatchList:g,setValidatorsWatchList:y,search:v,watchValidator:C,fromNavMenu:!0}):(0,t.jsx)(tO,{initialData:r,validatorsWatchList:g,setValidatorsWatchList:y,search:v,watchValidator:C,fromNavMenu:!0}):r.filter(e=>!C||g.find(t=>t===e.hotkey.ss58)).length?(0,t.jsx)("ul",{className:(0,n.cn)("grid grid-flow-col gap-x-3 gap-y-1 pr-5 lg:gap-x-5"),style:{gridTemplateColumns:"repeat(6, minmax(0, 1fr))",gridTemplateRows:`repeat(${Math.ceil((d?.length??0)/6)}, minmax(0, 1fr))`},children:r.filter(({hotkey:e})=>!C||g.find(t=>t===e.ss58)).filter(e=>(0,ed.getFilter)(e,v,tQ)).map((e,s)=>(0,t.jsxs)("div",{className:"flex flex-row items-center gap-1 pl-3",children:[void 0!==g.find(t=>t===e.hotkey.ss58)?i.isNewLookEnabled?(0,t.jsx)(eu.Star01,{size:16,className:"text-accent-1 flex-shrink-0 cursor-pointer",fill:"currentColor",onClick:()=>{let t,s=JSON.parse((0,ed.getCookie)(em.LOCAL_STORAGE_VALIDATORS_WATCHLIST)??"[]");void 0!==s.find(t=>t===e.hotkey.ss58)?y(t=s.filter(t=>t!==e.hotkey.ss58)):y(t=s),(0,ed.setCookie)({name:em.LOCAL_STORAGE_VALIDATORS_WATCHLIST,value:JSON.stringify(t)})}}):(0,t.jsx)(u.BiSolidStar,{size:16,color:"#00DBBC",className:"flex-shrink-0 cursor-pointer",onClick:()=>{let t,s=JSON.parse((0,ed.getCookie)(em.LOCAL_STORAGE_VALIDATORS_WATCHLIST)??"[]");void 0!==s.find(t=>
4t===e.hotkey.ss58)?y(t=s.filter(t=>t!==e.hotkey.ss58)):y(t=s),(0,ed.setCookie)({name:em.LOCAL_STORAGE_VALIDATORS_WATCHLIST,value:JSON.stringify(t)})}}):i.isNewLookEnabled?(0,t.jsx)(eu.Star01,{size:16,className:"text-fg-tertiary flex-shrink-0 cursor-pointer opacity-40",onClick:()=>{let t=JSON.parse((0,ed.getCookie)(em.LOCAL_STORAGE_VALIDATORS_WATCHLIST)??"[]");void 0===t.find(t=>t===e.hotkey.ss58)&&(t.push(e.hotkey.ss58),y(t)),(0,ed.setCookie)({name:em.LOCAL_STORAGE_VALIDATORS_WATCHLIST,value:JSON.stringify(t)})}}):(0,t.jsx)(u.BiStar,{size:16,className:"flex-shrink-0 cursor-pointer opacity-20",onClick:()=>{let t=JSON.parse((0,ed.getCookie)(em.LOCAL_STORAGE_VALIDATORS_WATCHLIST)??"[]");void 0===t.find(t=>t===e.hotkey.ss58)&&(t.push(e.hotkey.ss58),y(t)),(0,ed.setCookie)({name:em.LOCAL_STORAGE_VALIDATORS_WATCHLIST,value:JSON.stringify(t)})}}),i.isNewLookEnabled?(0,t.jsx)(w.NewLookButton,{asChild:!0,hierarchy:"link",className:"min-w-0 flex-1 justify-start",children:(0,t.jsxs)(f.Link,{href:m(_.appRoutes.validator.detail(e.hotkey.ss58)),onClick:p,children:[(0,t.jsxs)(x.Text,{level:"TextSmRegular",className:"text-fg-tertiary font-mono",children:[s+1,":"]}),(0,t.jsx)(x.Text,{level:"TextSmRegular",className:"min-w-0 truncate",children:e.name})]})},`index-${e.hotkey.ss58}`):(0,t.jsx)(E.NavigationMenuLink,{asChild:!0,children:(0,t.jsxs)(f.Link,{href:m(_.appRoutes.validator.detail(e.hotkey.ss58)),onClick:p,className:"flex w-full items-center gap-1 rounded-md py-1 pl-1 pr-3 text-sm text-white hover:bg-[#202020] hover:text-white",children:[(0,t.jsxs)("p",{className:"text-smt h-5 flex-shrink-0 pt-0.5 text-end font-mono opacity-60",children:[s+1,":"]}),(0,t.jsx)("span",{className:"truncate",children:e.name})]},`index-${e.hotkey.ss58}`)})]},`index-${e.hotkey.ss58}`))}):(0,t.jsx)("div",{className:"flex h-60 w-full flex-col items-center justify-center",children:(0,t.jsx)(eb,{label:h.noFavourites.validators})})})]})]},"validators"))})},tY=i.isNewLookEnabled?(0,n.cn)(E.NAV_WIDE_DROPDOWN_CLASS,"fixed left-1/2 z-50 w-full max-w-nl-wide -translate-x-1/2"):"w-[96vw] left-auto -right-2";e.s(["default",0,function({validators:e,completeWebNavigationLinks:a,completeDashNavigationLinks:o,isLoading:u}
4){let c=(0,r.useLocaleStrippedPathname)(),[d,p]=(0,s.useState)(""),m=(0,s.useRef)(!1),f=(0,s.useRef)(null),[h,x]=(0,s.useState)(""),v=(0,s.useRef)(null),b=()=>{p(""),m.current=!0,f.current&&clearTimeout(f.current),f.current=window.setTimeout(()=>{m.current=!1},800),v.current&&clearTimeout(v.current),v.current=window.setTimeout(()=>{x("")},200)},g=(0,s.useMemo)(()=>{if("/"===c)return"home";if(l.isDocsEnabled&&("/docs"===c||c.startsWith("/docs/")))return"";if(c.includes("/subnets"))return"subnets";for(let e of a){if(e.href.endsWith(c))return e.id;if(e.children){for(let t of e.children)if(t.href.endsWith(c))return e.id}}return c.includes("/blocks")?"blockchain":c.includes("/validators")?"validators":c.includes("/analytics")?"analytics":c.includes("/yield")?"investors":""},[a,c]);return(0,s.useEffect)(()=>()=>{v.current&&clearTimeout(v.current),f.current&&clearTimeout(f.current)},[]),(0,t.jsx)(E.NavigationMenu,{delayDuration:250,skipDelayDuration:300,value:d,viewportClassName:(0,n.cn)("subnets"===h||"validators"===h?"!w-full":""),wrapperClassName:(0,n.cn)("subnets"===h||"validators"===h?tY:"investors"===h?"!left-52":""),onValueChange:e=>{m.current&&""!==e||(p(e),v.current&&clearTimeout(v.current),""===e?v.current=window.setTimeout(()=>{x(e=>e===h?"":e)},200):x(e))},children:(0,t.jsxs)(E.NavigationMenuList,{children:[(0,t.jsx)(tt,{activeMenuId:h,activeSectionId:g,isLoading:u,onLinkClick:b}),(0,t.jsx)(ea,{activeMenuId:h,activeSectionId:g,completeWebNavigationLinks:a,onLinkClick:b}),(0,t.jsx)(tX,{activeMenuId:h,activeSectionId:g,validators:e,completeWebNavigationLinks:a,isLoading:u,onLinkClick:b}),(0,t.jsx)(er,{activeMenuId:h,activeSectionId:g,completeWebNavigationLinks:a,onLinkClick:b}),(0,t.jsx)(eo,{activeMenuId:h,activeSectionId:g,completeWebNavigationLinks:a,onLinkClick:b}),(0,t.jsx)(E.NavigationMenuItem,{className:i.isNewLookEnabled?"hidden xl:block":void 0,children:(0,t.jsx)(q,{completeDashNavigationLinks:o})}),(0,t.jsx)(E.NavigationMenuItem,{className:"hidden pl-4 xl:block",children:(0,t.jsx)(k,{completeDashNavigationLinks:o})})]})})}],497935)},180038,255482,e=>{"use strict";var t=e.i(843476),s=e.i(271645),n=e.i(618566),l=e.i(251458),i=e.i(519069),r=e.i(767683),a=e.i(503975),o=e.i(142660),u=e.i(55442),c=e.i(348099),d=e.i(456466),p=e.i(903294),m=e.i(105243),f=e.i(24874),h=e.i(447721);let x=e=>(0,t.jsxs)("svg",{width:"19",height:"12",viewBox:"0 0 19 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,t.jsx)("title",{children:"TwoLine"}),(0,t.jsx)("rect",{width:"13",height:"4",rx:"2",fill:"#D9D9D9"}),(0,t.jsx)("rect",{x:"6",y:"8",width:"13",height:"4",rx:"2",fill:"#D9D9D9"})]});var v=e.i(735356),b=e.i(961888),g=e.i(72664),y=e.i(788712),w=e.i(78094);let C=[{id:"subnets",label:"Subnets",Icon:b.Blocks,href:i.appRoutes.subnets.home,children:[]},{id:"blockchain",label:"Blockchain",Icon:g.Box,href:i.appRoutes.blockchain.blocks,children:[{label:"Blocks",href:i.appRoutes.blockchain.blocks,groupTitle:"Substrate"},{label:"Transfers",href:i.appRoutes.blockchain.transfer,groupTitle:"Substrate"},{label:"Delegation",href:i.appRoutes.blockchain.delegation,groupTitle:"Substrate"},{label:"Accounts",href:i.appRoutes.blockchain.accounts,groupTitle:"Substrate"},{label:"Extrinsics",href:i.appRoutes.blockchain.extrinsic,groupTitle:"Substrate"},{label:"Calls",href:i.appRoutes.blockchain.calls,groupTitle:"Substrate"},{label:"Events",href:i.appRoutes.blockchain.event,groupTitle:"Substrate"},{label:"Blocks",href:i.appRoutes.evm.blocks,groupTitle:"EVM"},{label:"Transactions",href:i.appRoutes.evm.transaction,groupTitle:"EVM"},{label:"Contracts",href:i.appRoutes.evm.contracts,groupTitle:"EVM"},{label:"EVM Explorer",href:"https://evm.taostats.io",groupTitle:"EVM"},{label:"Runtime",href:i.appRoutes.blockchain.runtime,groupTitle:"Core"},{label:"Sudo",href:i.appRoutes.blockchain.sudo,groupTitle:"Core"},{label:"Settings",href:i.appRoutes.blockchain.settings,groupTitle:"Core"}]},{id:"validators",label:"Validators",href:i.appRoutes.validator.home,Icon:w.Network,children:[]},{id:"analytics",label:"Analytics",Icon:v.AreaChart,href:i.appRoutes.analytics.home,children:[{label:"Staking vs Price History",href:i.appRoutes.analytics.chartDetails("stats"),groupTitle:"Price"},{label:"Daily Price Changes",href:i.appRoutes.analytics.chartDetails("price"),groupTitle:"Price"},{label:"Recent Exchange Transactions",href:i.appRoutes.analytics.chartDetails("exchanges"),groupTitle:"Transactions"},{label:"New Account Balances",href:i.appRoutes.analytics.chartDetails("accounts"),groupTitle:"Transactions"},{label:"Heatmap of Hotkey vs Netuid",href:i.appRoutes.analytics.chartDetails("heatmap"),groupTitle:"Transactions"},{label:"Top 50 Bittensor Account Balances",href:i.appRoutes.analytics.chartDetails("balances"),groupTitle:"Transactions"},{label:"Recent Largest Transactions",href:i.appRoutes.analytics.chartDetails("transactions"),groupTitle:"Transactions"},{label:"Realtime Transaction Volume",href:i.appRoutes.analytics.chartDetails("latest"),groupTitle:"Transactions"},{label:"Chain Block Production",href:i.appRoutes.analytics.chartDetails("blocks"),groupTitle:"Subnets & Chain"},{label:"Miner Age vs. Incentive",href:i.appRoutes.analytics.chartDetails("incentive"),groupTitle:"Subnets & Chain"},{label:"1D Subnet Emissions vs. Recycled",href:i.appRoutes.analytics.chartDetails("emissions"),groupTitle:"Subnets & Chain"},{label:"Subnet Growth",href:i.appRoutes.analytics.chartDetails("subnets"),groupTitle:"Subnets & Chain"},{label:"Tao Staked Over Time",href:i.appRoutes.analytics.chartDetails("tao-stake-over-time"),groupTitle:"Subnets & Chain"},{label:"TAO Injected vs. TAO In",href:i.appRoutes.analytics.chartDetails("tao-injected-v
4s-tao-in"),groupTitle:"Subnets & Chain"},{label:"Extrinsics Outcomes",href:i.appRoutes.analytics.chartDetails("extrinsic"),groupTitle:"Subnets & Chain"},{label:"Daily Registration Recycle",href:i.appRoutes.analytics.chartDetails("recycle"),groupTitle:"Subnets & Chain"},{label:"Historical Root",href:i.appRoutes.analytics.historical,groupTitle:"Subnets & Chain"}]},{id:"investors",label:"Investors",Icon:y.CircleDollarSign,href:i.appRoutes.blockchain.tokenomics,children:[{label:"Swap",href:i.appRoutes.swap},{label:"Root Claim",href:i.appRoutes.rootClaim},{label:"Yield",href:i.appRoutes.yield},{label:"Tokenomics",href:i.appRoutes.blockchain.tokenomics},{label:"Where to Buy",href:i.appRoutes.buy},{label:"Chrome Extension",href:i.appRoutes.chromeExtension}]}];e.s(["websiteNavigationLinks",0,C],255482),e.s(["default",0,function({completeWebNavigationLinks:e,completeDashNavigationLinks:v,isLoading:b=!1}){let{getDashUrl:g,getWebUrl:y}=(0,l.useUrlResolver)(),[w,S]=(0,s.useState)(!1),N=(0,n.usePathname)(),[k,E]=(0,s.useState)(""),[j,T]=(0,s.useState)("");return(0,s.useEffect)(()=>{if(T(N),"/"===N)return void E("");for(let e of C){if(e.href===N)return void E(e.label);for(let t of e.children??[])if(t.href===N)return void E(e.label)}}
4,[N]),(0,t.jsxs)(m.Sheet,{open:w,onOpenChange:e=>{S(e)},children:[(0,t.jsx)(m.SheetTrigger,{asChild:!0,className:"flex xl:hidden",children:(0,t.jsx)(c.Button,{variant:r.isNewLookEnabled?"secondaryGrey":"secondary2",size:r.isNewLookEnabled?"xs":"sm",className:r.isNewLookEnabled?"":"h-10 sm:-mt-1 sm:ml-1",children:(0,t.jsx)(x,{})})}),(0,t.jsxs)(m.SheetContent,{className:(0,a.cn)("h-full overflow-auto",r.isNewLookEnabled?"border-primary bg-primary":"border-dark-gray bg-[#121212]"),children:[(0,t.jsx)(m.SheetTitle,{className:"sr-only",children:"Navigation"}),(0,t.jsx)(m.SheetHeader,{children:(0,t.jsx)(d.Link,{href:"/",children:(0,t.jsx)(f.TaostatsLogo,{width:101,height:40})})}),(0,t.jsxs)(o.Accordion,{type:"single",collapsible:!0,className:"mx-auto flex w-full max-w-sm flex-col gap-2 py-8",value:k,onValueChange:e=>{E(e)},children:[e.map(({id:e,label:s,mainIcon:n,href:l,children:i})=>(0,t.jsxs)(o.AccordionItem,{value:e,className:r.isNewLookEnabled?"border-primary":"border-dark-gray",children:[(0,t.jsx)(o.AccordionTrigger,{className:"p-0 hover:no-underline",loading:b?"subnets"===e||"validators"===e:void 0,children:(0,t.jsx)(c.Button,{variant:"link",asChild:!0,className:"rounded-none text-base transition-colors hover:border-b hover:no-underline",onClick:()=>{S(!1)},children:(0,t.jsx)(d.Link,{href:l,children:n?(0,t.jsx)(n,{className:"-mb-0.5 -ml-1.5"}):(0,t.jsx)(h.Text,{level:"sm",className:r.isNewLookEnabled?"text-fg-primary":"text-white",children:s})})})}),(0,t.jsx)(o.AccordionContent,{children:(0,t.jsx)("div",{className:"flex flex-col px-4",children:Object.entries(i?.reduce((e,t)=>{let s=t.groupTitle??"";return e[s]??=[],e[s].push(t),e},{})??{}).map(([s,n])=>(0,t.jsxs)("div",{className:"mb-4",children:[s&&"Validators"!==s?(0,t.jsx)(h.Text,{level:"sm",className:r.isNewLookEnabled?"text-fg-secondary mb-1 font-medium":"mb-1 font-medium text-neutral-400",children:s}):null,(0,t.jsx)("div",{className:"flex flex-col",children:n.map(({label:n,href:l})=>(0,t.jsxs)("div",{children:[(0,t.jsx)(c.Button,{variant:"link",size:"sm",asChild:!0,className:(0,a.cn)("w-max rounded-none px-2 hover:no-underline",j===l?"border-accent-1 text-accent-1 border-b":r.isNewLookEnabled?"text-fg-secondary transition-colors hover:border-b":"text-white/60 transition-colors hover:border-b"),onClick:()=>{S(!1)},children:(0,t.jsx)(d.Link,{href:l,children:"subnets"===e||"validators"===e&&"Validators"===s?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-smt w-9 text-end font-mono",children:`${n.split(":")[0]}:`}),n.split(":")[1]]}):n})},n),"validators"===e&&"Validators"!==s&&(0,t.jsx)(p.Separator,{className:"my-1"})]},`${s}-${n}`))})]},s))})})]},e)),(0,t.jsxs)(o.AccordionItem,{value:"dashboard",className:r.isNewLookEnabled?"border-primary":"border-dark-gray",children:[(0,t.jsx)(o.AccordionTrigger,{className:"p-0 hover:no-underline",children:(0,t.jsx)(c.Button,{variant:"link",asChild:!0,className:"rounded-none text-base transition-colors hover:border-b hover:no-underline",onClick:()=>{S(!1)},children:(0,t.jsx)(d.Link,{href:g("/"),children:(0,t.jsxs)(h.Text,{as:"span",level:"sm",className:r.isNewLookEnabled?"text-fg-primary flex items-center gap-1.5":"flex items-center gap-1.5 text-white",children:["taostats",(0,t.jsx)(u.Badge,{variant:"green4",className:"rounded-md px-1.5 py-0.5 text-[10px]",children:"Pro"})]})})})}),(0,t.jsx)(o.AccordionContent,{children:(0,t.jsxs)("div",{className:"flex flex-col",children:[v.dashboardItems.map(e=>(0,t.jsx)(c.Button,{variant:"link",size:"sm",asChild:!0,className:(0,a.cn)("w-max rounded-none px-2 hover:no-underline",j===e.href?"border-accent-1 text-accent-1 border-b":r.isNewLookEnabled?"text-fg-secondary transition-colors hover:border-b":"text-white/60 transition-colors hover:border-b"),onClick:()=>{S(!1)},children:(0,t.jsxs)(d.Link,{href:e.href,className:"flex flex-row items-center gap-4 px-4 py-4",children:[(0,t.jsx)(e.Icon,{size:24,className:"opacity-60"}),e.label]},e.label)},e.label)),(0,t.jsx)(h.Text,{level:"sm",className:r.isNewLookEnabled?"text-fg-secondary mb-1 px-4 pt-2 font-medium":"mb-1 px-4 pt-2 font-medium text-neutral-400",children:"Developers"}),v.developerItems.map(e=>(0,t.jsxs)(d.Link,{href:e.href,className:(0,a.cn)("flex flex-row items-center gap-1 px-4 py-2",r.isNewLookEnabled?"hover:bg-primary":"hover:bg-[#111111]"),children:[(0,t.jsx)(e.Icon,{size:24,className:"opacity-60"}),(0,t.jsx)(h.Text,{level:"sm",className:r.isNewLookEnabled?"text-fg-secondary font-medium":"font-medium text-gray-400",children:e.label})]},e.label))]})})]}),(0,t.jsx)(c.Button,{variant:"link",asChild:!0,className:"justify-start rounded-none text-base transition-colors hover:border-b hover:no-underline",onClick:()=>{S(!1)},children:(0,t.jsx)(d.Link,{href:y(i.appRoutes.subnets.sales),children:(0,t.jsx)(h.Text,{level:"sm",className:r.isNewLookEnabled?"text-fg-primary":"text-white",children:"Subnets for Sale"})})})]})]})]})}],180038)},365205,420676,608968,e=>{"use strict";var t=e.i(271645),s=e.i(619273),n=e.i(266027),l=e.i(580725),i=e.i(268225),r=e.i(402216);e.s(["useAccountSearchSuggestions",0,({globalFilter:e,connectedAccounts:a,validatorData:o})=>{let u=e.trim(),c=(0,r.normalizeForMatch)(e),d=(0,r.isColdkeyLike)(e),p=(0,n.useQuery)({queryKey:["secondary-nav-account-search",u],enabled:d,staleTime:6e4,placeholderData:s.keepPreviousData,queryFn:async()=>{let e=new URLSearchParams({search:u,limit:"20",page:"1"}),t=await fetch(`/api/metagraph/metagraph?${e.toString()}`);if(!t.ok)throw Error("Failed to search metagraph accounts");return await t.json()}});return(0,t.useMemo)(()=>
4{if(!d)return[];let e=a.filter(e=>(0,r.normalizeForMatch)(e.address).includes(c)).map(e=>({label:e.meta.name||e.address,address:e.address,source:"Connected Wallet",kind:"connected-wallet"})),t=new Map;o.forEach(e=>{let s=e.name||"Validator account",n=e.coldkey.ss58;(0,r.normalizeForMatch)(n).includes(c)&&t.set(n,{label:s,source:"Validator",kind:"validator"});let l=e.hotkey.ss58;(0,r.normalizeForMatch)(l).includes(c)&&t.set(l,{label:s,source:"Validator",kind:"validator"})});let s=Array.from(t.entries()).map(([e,t])=>({label:t.label,address:e,source:t.source,kind:t.kind})),n=new Map;(p.data?.data??[]).forEach(e=>{let t=e.coldkey.ss58,s=e.hotkey.ss58;if((0,r.normalizeForMatch)(t).includes(c)){let e=i.ExchangeAddressMapping[t]?.name??(0,l.getColdkeyName)(t);n.set(t,{label:e??t,address:t,source:"Account",kind:"account"})}if((0,r.normalizeForMatch)(s).includes(c)){let e=i.ExchangeAddressMapping[s]?.name??(0,l.getColdkeyName)(s);n.set(s,{label:e??s,address:s,source:"Account",kind:"account"})}});let u=Array.from(n.values()),m=new Map;return[...e,...s,...u].forEach(e=>{let t=e.address.toLowerCase();m.has(t)||m.set(t,e)}),Array.from(m.values())},[a,p.data?.data,c,d,o])}],365205),e.s(["useChainSearchResults",0,({globalFilter:e,latestBlockNumber:s,subnetData:n,validatorData:l,accountSearchSuggestions:a,getWebUrl:o})=>(0,t.useMemo)(()=>{let t=e.trim();if(0===t.length)return[];let u=l.find(e=>e.hotkey.ss58===t)??null,c=l.filter(e=>e.name?.toLowerCase().includes(t.toLowerCase())),d=/^[0-9]+$/.test(t)&&Number(t)>=0&&Number(t)<=s?[{label:t,href:o(`/block/${t}/extrinsics`),sectionTitle:"Block",searchText:t,resultType:"block",subtitle:"Block"}]:[],p=/^[1-9A-HJ-NP-Za-km-z]{25,}$/.test(t)?[{label:t,href:o(`/account/${t}`),sectionTitle:"Address",searchText:t,resultType:"account",subtitle:"Account",address:t}]:[],m=a.map(e=>({label:e.label,href:o(`/account/${e.address}`),sectionTitle:e.source,searchText:`${e.address} ${e.label} ${e.source}`,resultType:e.kind,subtitle:e.source,address:e.address})),f=/^(?:subnet )?(?<netuid>\d{1,2})$/i.exec(t),h=f?n.find(e=>e.netuid===Number(f.groups?.netuid)):null,x=n.filter(e=>e.subnet_name.toLowerCase().includes(t.toLowerCase())),v=(h?[h]:x.slice(0,5)).map(e=>({label:e.subnet_name,href:o(`/subnets/${e.netuid}`),sectionTitle:"Subnet",searchText:`${e.subnet_name} ${e.netuid}`,resultType:"subnet",subtitle:"Subnet",subnetNetuid:e.netuid,subnetName:e.subnet_name})),b=Object.entries(i.ExchangeAddressMapping).filter(e=>!!e[1]).filter(([,e])=>e.name.toLowerCase().includes(t.toLowerCase())).map(([e,t])=>({label:t.name,href:o(`/account/${e}`),sectionTitle:"Exchange",searchText:`${t.name} ${e}`,resultType:"exchange",subtitle:"Account",address:e})),g=(u?[u]:c.slice(0,5)).filter(e=>!!e.hotkey.ss58).map(e=>({label:e.hotkey.ss58,href:o(`/validators/${e.hotkey.ss58}`),sectionTitle:"Validator",searchText:t,resultType:"validator",subtitle:"Validator",address:e.hotkey.ss58})),y=/^0x[a-fA-F0-9]{64}$/.test(t)?[{label:t,href:o(`/hash/${t}`),sectionTitle:"Hash",searchText:t,resultType:"hash",subtitle:"Hash",address:t}]:[],w=/^\d+-\d+$/.test(t)?[{label:t,href:o(`/extrinsic/${t}`),sectionTitle:"Extrinsic",searchText:t,resultType:"extrinsic",subtitle:"Extrinsic"},{label:t,href:o(`/event/${t}`),sectionTitle:"Event",searchText:t,resultType:"event",subtitle:"Event"}]:[];return(0,r.dedupeSearchResultsByAddress)([...d,...v,...b,...g,...m,...p,...y,...w])},[a,o,e,s,n,l])],420676),e.s(["useSitePageSearchResults",0,({query:e,pages:s,getWebUrl:n})=>(0,t.useMemo)(()=>0===e.length?[]:s.filter(t=>t.toLowerCase().includes(e)).map(e=>({label:e,href:n(e),sectionTitle:"Pages",searchText:e,resultType:"page",subtitle:"Page"})),[n,s,e])],608968)},456613,e=>{"use strict";var t=e.i(843476);e.s(["TableConfigColumns",0,function({columns:e,onToggleColumn:s}){return(0,t.jsx)("div",{className:"mt-1 flex flex-wrap gap-3",children:e.map(e=>(0,t.jsxs)("label",{className:"flex items-center gap-1",children:[(0,t.jsx)("input",{type:"checkbox",className:"h-3 w-3 accent-[#00DBBC]",checked:e.checked,disabled:e.disabled,onChange:t=>{s(e.id,t.target.checked)}}),e.label]},e.id))})}])},17693,e=>{"use strict";var t=e.i(843476),s=e.i(271645);let n=({size:e=24,color:t="currentColor",...n})=>s.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},s.createElement("path",{d:"M7 20.662A9.995 9.995 0 0 0 12 12a9.996 9.996 0 0 0-5-8.662M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));n.displayName="CircleCut";let l=({size:e=24,color:t="currentColor",...n})=>s.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},s.createElement("path",{d:"M21.955 12.956a8 8 0 1 1-10.91-10.911C5.97 2.526 2 6.799 2 12c0 5.523 4.477 10 10 10 5.2 0 9.473-3.97 9.955-9.044Z"}));l.displayName="Moon02";let i=({size:e=24,color:t="currentColor",...n})=>s.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},s.createElement("path",{d:"M12 2v2m0 16v2M4 12H2m4.314-5.686L4.9 4.9m12.786 1.414L19.1 4.9M6.314 17.69 4.9 19.104m12.786-1.414 1.414 1.414M22 12h-2m-3 0a5 5 0 1 1-10 0 5 5 0 0 1 10 0Z"}));i.displayName="Sun";var r=e.i(452787),a=e.i(854761);let o={light:i,dark:l,system:n},u={light:"Light",dark:"Dark",system:"System"},c={light:"dark",dark:"system",system:"light"};e.s(["ThemeModeToggle",0,function(){let{mode:e,setMode:s}=(0,r.useThemeMode)(),n=o[e];return(0,t.jsx)(a.NewLookButton,{hierarchy:"secondary-gray",size:"2xs","aria-label":`Theme: ${u[e]}`,title:`Theme: ${u[e]}`,className:"text-fg-secondary hover:text-fg-primary",onClick:()=>{s(c[e])},children:(0,t.jsx)(n,{size:14})})}],17693)},407296,e=>{"use strict";var t=e.i(764241),s=e.i(366550);e.s(["WalletConfigDialog",()=>t.WalletConfigDialog,"WalletConnector",()=>t.WalletConnector,"useWalletConfigState",()=>s.useWalletConfigState])},764241,e=>{"use strict";var t=e.i(843476),s=e.i(271645),n=e.i(948148),l=e.i(833401),i=e.i(468888),r=e.i(386173),a=e.i(469449),o=e.i(170149),u=e.i(503975),c=e.i(767683),d=e.i(640602),p=e.i(55442),m=e.i(621747),f=e.i(539910);let h=e=>{let{className:s,children:n,isSelected:l=!1,isEnabled:i=!0,...r}=e;return(0,t.jsx)(x,{className:(0,u.cn)("bg-card/80 border-card/80 border p-4",i&&"hover:bg-card cursor-pointer transition-all duration-500 hover:scale-[1.025] hover:border-white/20",l&&"bg-accent-1/25 hover:bg-accent-1/30",l&&i&&"hover:bg-accent-1/30",s),...r,children:n})},x=({children:e,className:s,contentContainerClassName:n,onClick:l})=>(0,t.jsx)("div",{className:(0,u.cn)("bg-card rounded-xl p-6",s),onClick:l,children:(0,t.jsx)(f.Flex,{col:!0,className:(0,u.cn)("gap-6",n),children:e})});var v=e.i(927359),b=e.i(450188),g=e.i(515339),y=e.i(456466),w=e.i(6
453533),C=e.i(954502);function S({isVisible:e=!1,selectedNetwork:s,onNetworkChange:n}){return e?(0,t.jsx)(C.Combobox,{options:Object.values(w.NETWORKS).map(e=>({value:e.id,label:e.name})),value:s.id,onChange:e=>{n(e),window.location.reload()}}):null}var N=e.i(903294),k=e.i(447721),E=e.i(689932),j=e.i(657688),T=e.i(927231),R=e.i(44194),I=e.i(612649);function L({className:e}){let s=(0,n.useTranslations)("walletCta"),l=(0,I.useWalletInstallCta)(),i=l?.kind==="ios-app"||l?.kind==="android-app";return(0,t.jsxs)("div",{className:(0,u.cn)("border-primary relative overflow-hidden rounded-2xl border",e),children:[(0,t.jsx)("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-y-0 right-[-85px] z-0 hidden h-full md:block",children:(0,t.jsx)(j.default,{src:"/images/wallet-connect/hero.png",alt:"",width:782,height:573,sizes:"(max-width: 767px) 1px, 600px",className:"absolute top-1/2 right-0 h-[160%] w-auto max-w-none -translate-y-1/2"})}),(0,t.jsxs)(f.Flex,{col:!0,className:"gap-xl p-2xl sm:p-3xl relative z-10 items-center justify-center text-center md:min-h-[200px] md:items-start md:text-left",children:[(0,t.jsxs)(f.Flex,{col:!0,className:"gap-md items-center md:items-start",children:[(0,t.jsx)(k.Text,{level:"DisplayXsMedium",children:s("title")}),(0,t.jsx)(k.Text,{level:"TextSmMedium",isMono:!0,className:(0,u.cn)("text-fg-tertiary uppercase",i?null:"whitespace-nowrap"),children:s(i?"mobileDescription":"extensionDescription")})]}),i&&l?(0,t.jsx)(R.TaostatsStoreBadgeLink,{store:"ios-app"===l.kind?"ios":"android",href:l.href}):(0,t.jsxs)(y.Link,{href:l?.href??T.taostatsChromeWalletUrl,target:"_blank",rel:"noopener noreferrer",className:"text-fg-brand gap-xs inline-flex w-fit items-center underline underline-offset-4",children:[(0,t.jsx)(k.Text,{level:"TextMdMedium",className:"text-fg-brand",children:s("installButtonLabel")}),(0,t.jsx)(E.ChevronRight,{className:"size-4"})]}),(0,t.jsx)("div",{className:"flex w-full items-center justify-center md:hidden",children:(0,t.jsx)(j.default,{src:"/images/wallet-connect/hero.png",alt:"",width:640,height:640,className:"h-auto w-full max-w-[280px]"})})]})]})}var O=e.i(96048);let M={taostats:"/images/icons/taostats.svg","taostats-dev":"/images/icons/taostats-dev.svg","taostats-internal":"/images/icons/taostats-internal.svg",talisman:"/images/icons/talisman-icon.png","polkadot-js":"/images/icons/polkadot-icon.svg","subwallet-js":"/images/icons/subwallet-icon.svg"},F=e=>e.split(/[-_]/).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),_=({source:e,size:s=40,className:n})=>{let l=M[e.toLowerCase()],i=F(e);return l?(0,t.jsx)("div",{className:(0,u.cn)("shrink-0 overflow-hidden rounded-full",n),style:{width:s,height:s},children:(0,t.jsx)(j.default,{src:l,alt:i,width:s,height:s,className:"h-full w-full object-cover"})}):(0,t.jsx)("div",{className:(0,u.cn)("flex shrink-0 items-center justify-center rounded-full font-semibold text-white",n),style:{width:s,height:s,backgroundColor:"#00DBBC",color:"#000",fontSize:Math.round(.4*s)},"aria-hidden":!0,children:i.charAt(0).toUpperCase()})},P=({source:e,className:s})=>{let n=e||"extension";return(0,t.jsxs)(p.Badge,{variant:"green5",className:(0,u.cn)("gap-1.5 py-0.5 pl-1 pr-2",s),children:[(0,t.jsx)(_,{source:n,size:18}),F(n)]})};var D=e.i(366550),A=e.i(728129),B=e.i(615024);let z=["accounts","extensions","chain","settings"],W=({activeTab:e,onTabChange:s})=>{let l=(0,n.useTranslations)("walletConnector.tabs"),i=z.map(e=>({id:e,label:l(e)}));if(c.isNewLookEnabled){let n=i.map(({id:e,label:t})=>({tabId:e,label:t,onClick:()=>{s(e)}}));return(0,t.jsx)(B.TabsV2,{items:n,activeTabId:e,type:"button-brand",size:"sm",fullWidth:!0,centreLabels:!0,alwaysHorizontal:!0})}return(0,t.jsx)(f.Flex,{className:"w-full",children:i.map(({id:n,label:l})=>(0,t.jsx)("button",{type:"button",onClick:()=>{s(n)},className:(0,u.cn)("flex-1 border-b-2 px-2 py-2 text-center text-sm transition-colors sm:px-4",e===n?"border-white text-white":"border-transparent text-white/60 hover:text-white/80"),children:l},n))})},H=(e,t=6)=>e?e.length<=t+3?e:`${e.slice(0,t)}...${e.slice(-3)}`:"",V=()=>{let e=(0,n.useTranslations)("walletConnector.chainStatus"),{socket:s,isConnecting:a,isConnectedToCh
4ain:o,isError:d,isDisconnected:x,connectionError:v,reconnect:b}=(0,r.useChainApi)(),g=(({isConnecting:e,isConnectedToChain:t,isError:s,isDisconnected:n,t:l})=>e?{label:l("connecting"),variant:"blue1",showReconnect:!0}:t?{label:l("connected"),variant:"green2",showReconnect:!1}:s?{label:l("failed"),variant:"red2",showReconnect:!0}:n?{label:l("disconnected"),variant:"red2",showReconnect:!0}:{label:l("connecting"),variant:"blue1",showReconnect:!0})({isConnecting:a,isConnectedToChain:o,isError:d,isDisconnected:x,t:e});return(0,t.jsxs)(h,{isEnabled:!1,children:[(0,t.jsxs)(f.Flex,{col:!0,className:"items-start gap-2 sm:flex-row sm:items-center sm:justify-between sm:gap-3",children:[(0,t.jsx)(k.Text,{level:"sm",className:(0,u.cn)("w-full min-w-0 truncate font-mono sm:flex-1",c.isNewLookEnabled?"text-fg-secondary":"text-white/80"),title:s||void 0,children:s||"—"}),(0,t.jsx)(p.Badge,{variant:g.variant,children:g.label})]}),d&&v?(0,t.jsx)(k.Text,{level:"sm",className:"text-red-300/90",children:(0,i.formatChainConnectionError)(v)}):null,x?(0,t.jsx)(k.Text,{level:"sm",className:"text-white/70",children:e("disconnectedMessage")}):null,g.showReconnect?(0,t.jsxs)(m.MotionButton,{variant:"cta2",size:"sm",className:"w-full sm:w-auto",disabled:a,onClick:()=>{b()},children:[e("reconnect"),a?(0,t.jsx)(l.BiLoaderCircle,{size:18,className:"ml-2 animate-spin"}):(0,t.jsx)(l.BiLink,{size:18,className:"ml-2"})]}):null]})},K=({account:e,isSelected:s,onSelect:i})=>{let r=(0,n.useTranslations)("walletConnector.accountRow");return(0,t.jsx)(h,{isSelected:s,onClick:i,children:(0,t.jsxs)(f.Flex,{col:!0,className:"gap-2",children:[(0,t.jsxs)(f.Flex,{className:"items-center gap-2 max-sm:justify-between",children:[(0,t.jsx)(k.Text,{children:e.meta.name}),s?(0,t.jsxs)(p.Badge,{variant:"green2",children:[(0,t.jsx)(l.BiCheck,{className:"mr-1",size:16})," ",r("selected")]}):null]}),(0,t.jsxs)(f.Flex,{className:"justify-between",children:[(0,t.jsxs)(f.Flex,{className:"items-center gap-2 px-1",children:[(0,t.jsx)(k.Text,{level:"sm",isMono:!0,className:(0,u.cn)("truncate",c.isNewLookEnabled?"text-fg-secondary":"text-white/60"),children:(0,d.truncateString)(e.address,6)}),(0,t.jsxs)(f.Flex,{className:"items-center gap-1",children:[(0,t.jsx)(b.CopyButton,{size:14,value:e.address,className:c.isNewLookEnabled?"text-fg-secondary":"text-white"}),(0,t.jsx)(y.Link,{href:`/account/${e.address}`,target:"_blank",rel:"noopener noreferrer",className:(0,u.cn)("hover:text-accent-1 p-0 transition-colors duration-300",c.isNewLookEnabled?"text-fg-secondary":"text-white"),"aria-label":r("viewAccountAriaLabel"),children:(0,t.jsx)(l.BiLinkExternal,{size:14})})]})]}),(0,t.jsx)(P,{source:e.meta.source||"extension"})]})]})})},G=({extension:e,isEnabling:s,onEnable:i})=>{let r=(0,n.useTranslations)("walletConnector.extensionRow");return(0,t.jsx)(h,{isEnabled:!1,children:(0,t.jsxs)(f.Flex,{className:"items-center justify-between gap-3",children:[(0,t.jsxs)(f.Flex,{className:"min-w-0 flex-1 items-center gap-3",children:[(0,t.jsx)(_,{source:e.name}),(0,t.jsxs)(f.Flex,{col:!0,className:"min-w-0 gap-1",children:[(0,t.jsx)(k.Text,{children:F(e.name)}),(0,t.jsxs)(k.Text,{level:"xs",className:c.isNewLookEnabled?"text-fg-secondary":"text-white/60",children:[e.name,"unknown"!==e.version?` \xb7 v${e.version}`:""]})]})]}),(0,t.jsxs)(m.MotionButton,{variant:"primary",size:"sm",disabled:s,onClick:i,children:[r("enable"),s?(0,t.jsx)(l.BiLoaderCircle,{size:16,className:"ml-2 animate-spin"}):null]})]})})},U=({extension:e,onRemove:s})=>{let i=(0,n.useTranslations)("walletConnector.extensionRow");return(0,t.jsx)(h,{isEnabled:!1,children:(0,t.jsxs)(f.Flex,{className:"items-center justify-between gap-3",children:[(0,t.jsxs)(f.Flex,{className:"min-w-0 flex-1 items-center gap-3",children:[(0,t.jsx)(_,{source:e.name}),(0,t.jsxs)(f.Flex,{col:!0,className:"min-w-0 gap-1",children:[(0,t.jsx)(k.Text,{children:F(e.name)}),(0,t.jsxs)(k.Text,{level:"xs",className:c.isNewLookEnabled?"text-fg-secondary":"text-white/60",children:[e.name,"unknown"!==e.version?` \xb7 v${e.version}`:""]})]})]}),(0,t.jsxs)(m.MotionButton,{variant:c.isNewLookEnabled?"secondaryGrey":"cta2",size:"sm",className:"shrink-0","aria-label":i("stopUsingAriaLabel",{extension:F(e.name)}),onClick:s,children:[i("remove"),(0,t.jsx)(l.BiTrash,{size:16,className:"ml-2"})]})]})})},$=()=>()=>{},Z=()=>!0,J=()=>!1;e.s(["WalletConfigDialog",0,()=>{let e=(0,n.useTranslations)("walletConnector.dialog"),{closeWalletConfigDialog:i,isWalletConfigOpen:r}=(0,D.useWalletConfigState)(),{state:{accounts:d,currentAccount:p},setCurrentAccount:x,disconnectWallet:b,detectedExtensions:y,enabledExtensions:w,extensionsPendingEnable:C,enableExtension:E,forgetExtension:j,refreshAccounts:T,isRefreshingAccounts:R,enablingExtension:I}=(0,o.useChainAndWalletContext)(),{isCurrentAccount:M}=(()=>{let{state:{currentAccount:e}}=(0,o.useChainAndWalletContext)();return{isCurrentAccount:(0,s.useCallback)(t=>e?.address===t.address&&e.meta.source===t.meta.source,[e])}}
4)(),{showWalletNameInTopBar:F,setShowWalletNameInTopBar:_}=(0,D.useWalletConnectorDisplaySettings)(),P=(0,a.useNetworkSelectorData)(),[A,B]=(0,s.useState)("accounts");(0,s.useEffect)(()=>{r&&(B("accounts"),0===d.length&&T())},[r,d.length,T]);let z=e=>{_(!0===e)},H=y.length>0,$=d.length>0,Z=w.length>0;return(0,t.jsx)(g.Dialog,{HeaderIcon:l.BiWallet,closeFn:i,isOpen:!0,title:e("title"),containerClassName:"flex min-h-full items-start justify-center p-4 pb-8 pt-20 text-center sm:px-8 sm:pt-24",children:(0,t.jsxs)(f.Flex,{col:!0,className:"gap-4",children:[(0,t.jsx)(W,{activeTab:A,onTabChange:B}),(0,t.jsx)(N.Separator,{className:c.isNewLookEnabled?"bg-border-primary":"bg-white/15"}),"accounts"===A?(0,t.jsxs)(f.Flex,{col:!0,className:"gap-4",children:[H?null:c.isNewLookEnabled?(0,t.jsx)(L,{}):(0,t.jsx)(O.ConnectWalletCard,{}),H?(0,t.jsxs)(f.Flex,{col:!0,className:"gap-4",children:[(0,t.jsxs)(f.Flex,{col:!0,className:"justify-between gap-4 sm:flex-row sm:items-center sm:gap-0",children:[(0,t.jsxs)(f.Flex,{className:"items-center gap-2",children:[(0,t.jsx)(k.Text,{className:"ml-2",children:e("availableAccounts")}),(0,t.jsx)(m.MotionButton,{variant:c.isNewLookEnabled?"secondaryGrey":"cta3",size:"xs","aria-label":e("refreshAccountsAriaLabel"),onClick:()=>{T()},children:(0,t.jsx)(l.BiRefresh,{size:16,className:(0,u.cn)(R&&"animate-spin")})})]}),p?(0,t.jsxs)(m.MotionButton,{variant:"cta2",size:"sm",className:"w-full text-sm sm:w-auto",onClick:()=>{b()},children:[e("disconnect"),(0,t.jsx)(l.BiWallet,{size:20,className:"ml-2"})]}):null]}),$?(0,t.jsx)(f.Flex,{col:!0,className:"gap-2",children:d.map(e=>(0,t.jsx)(K,{account:e,isSelected:M(e),onSelect:()=>{x(e)}},`${e.meta.source}:${e.address}`))}):(0,t.jsx)(k.Text,{level:"sm",className:(0,u.cn)("ml-2",c.isNewLookEnabled?"text-fg-secondary":"text-white/60"),children:e(Z?"noAccountsRefresh":"enableExtensionHint")}),C.length>0?(0,t.jsxs)(f.Flex,{col:!0,className:"gap-2",children:[(0,t.jsx)(k.Text,{className:"ml-2",children:e("detectedExtensions")}),(0,t.jsx)(f.Flex,{col:!0,className:"gap-2",children:C.map(e=>(0,t.jsx)(G,{extension:e,isEnabling:I===e.name,onEnable:()=>{E(e.name)}},e.name))})]}):null]}):null]}):null,"extensions"===A?(0,t.jsxs)(f.Flex,{col:!0,className:"gap-4",children:[Z?(0,t.jsx)(k.Text,{level:"xs",className:(0,u.cn)("ml-2",c.isNewLookEnabled?"text-fg-secondary":"text-white/60"),children:e("extensionsAutoLoadHint")}):null,Z?(0,t.jsx)(f.Flex,{col:!0,className:"gap-2",children:w.map(e=>(0,t.jsx)(U,{extension:e,onRemove:()=>{j(e.name)}},e.name))}):(0,t.jsx)(k.Text,{level:"sm",className:(0,u.cn)("ml-2",c.isNewLookEnabled?"text-fg-secondary":"text-white/60"),children:e("noExtensionsConnected")})]}):null,"chain"===A?(0,t.jsxs)(f.Flex,{col:!0,className:"gap-4",children:[(0,t.jsxs)(f.Flex,{col:!0,className:"gap-2",children:[(0,t.jsx)(k.Text,{className:"ml-2",children:e("chainConnection")}),P.showNetworkSelector?(0,t.jsx)(S,{selectedNetwork:P.selectedNetwork,isVisible:P.showNetworkSelector,onNetworkChange:P.setSelectedNetworkId}):null]}),(0,t.jsx)(V,{})]}):null,"settings"===A?(0,t.jsx)(f.Flex,{col:!0,className:"gap-4",children:(0,t.jsx)(h,{onClick:()=>{z(!F)},children:(0,t.jsxs)(f.Flex,{className:"items-start justify-between gap-4",children:[(0,t.jsxs)(f.Flex,{col:!0,className:"gap-1",children:[(0,t.jsx)(k.Text,{level:"sm",children:e("showWalletName")}),(0,t.jsx)(k.Text,{level:"xs",className:c.isNewLookEnabled?"text-fg-secondary":"text-white/60",children:e("showWalletNameDescription")})]}),(0,t.jsx)(v.Checkbox,{checked:F,onCheckedChange:z,"aria-label":e("showWalletNameAriaLabel"),className:"mt-0.5"})]})})}):null,(0,t.jsxs)(m.MotionButton,{variant:"cta2",onClick:i,children:[e("close"),(0,t.jsx)(l.BiXCircle,{size:20,className:"ml-2"})]})]})})},"WalletConnector",0,({fullWidth:e=!1}={})=>{let i=(0,n.useTranslations)("walletConnector.navButton"),{state:{currentAccount:a}}=(0,o.useChainAndWalletContext)(),{isConnectedToChain:p}=(0,r.useChainApi)(),{showWalletNameInTopBar:f}=(0,D.useWalletConnectorDisplaySettings)(),h=(0,s.useRef)(null),{openWalletConfigDialog:x}
4=(0,D.useWalletConfigState)(),v=(0,s.useSyncExternalStore)($,Z,J),b=v?a:null,g=!!b,y=(0,A.walletChainStatusIndicatorClassName)(g,v&&p),w=f&&b?.meta.name?b.meta.name:H(b?.address||"",6);return c.isNewLookEnabled?(0,t.jsxs)(m.MotionButton,{ref:h,className:(0,u.cn)(e&&"w-full justify-center py-3"),variant:"secondary",size:"2xs",font:"mono",onClick:()=>{x(h)},children:[(0,t.jsx)(l.BiWallet,{size:14}),(0,t.jsx)("div",{className:e?void 0:"hidden md:inline",children:b?(0,t.jsx)("span",{className:e?void 0:"hidden lg:inline",children:w}):(0,t.jsxs)(t.Fragment,{children:[i("connect"),(0,t.jsxs)("span",{className:e?void 0:"hidden xl:inline",children:[" ",i("wallet")]})]})}),(0,t.jsx)("div",{className:(0,u.cn)("ml-1 h-2 w-2 shrink-0 rounded-full",y)})]}):(0,t.jsxs)(m.MotionButton,{ref:h,className:"flex h-6 flex-row items-center gap-1 rounded px-2",onClick:()=>{x(h)},children:[(0,t.jsx)(l.BiWallet,{}),b?(0,t.jsx)(t.Fragment,{children:f?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(k.Text,{level:"buttonSmall",className:"text-white/80 sm:hidden",children:(0,d.truncateStringWithMax)(b.meta.name,9)}),(0,t.jsx)(k.Text,{level:"buttonSmall",className:"hidden text-white/80 sm:inline",children:w})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(k.Text,{level:"buttonSmall",className:"font-mono text-white/80 sm:hidden",children:H(b.address,3)}),(0,t.jsx)(k.Text,{level:"buttonSmall",className:"hidden font-mono text-white/80 sm:inline",children:H(b.address,6)})]})}):(0,t.jsx)(k.Text,{level:"buttonSmall",className:"text-white/80",children:"Connect Wallet"}),(0,t.jsx)("div",{className:(0,u.cn)("ml-1 h-2 w-2 shrink-0 rounded-full",y)})]})}],764241)},47192,e=>{"use strict";var t=e.i(271645);let s='[data-ts-secondary-nav-root="true"]';e.s(["useSecondaryNavHeaderBottom",0,(e=0,n)=>{let[l,i]=(0,t.useState)(56-e);return(0,t.useEffect)(()=>{let t=null,n=()=>{t=null;let n=document.querySelector(s);if(n){let{bottom:t}=n.getBoundingClientRect();i(Math.max(0,t-e))}},l=()=>{null===t&&(t=window.requestAnimationFrame(n))};n(),l(),window.addEventListener("resize",l),window.addEventListener("scroll",l,{passive:!0});let r=document.querySelector(s),a=null;return r&&"u">typeof ResizeObserver&&(a=new ResizeObserver(l)).observe(r),()=>{null!==t&&window.cancelAnimationFrame(t),window.removeEventListener("resize",l),window.removeEventListener("scroll",l),a?.disconnect()}},[e,n]),l}])}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.