(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,98091,e=>{"use strict";let t,n,i,o;e.i(47167);var s=e.i(43476),l=e.i(81933),r=e.i(83222),a=e.i(33336),u=e.i(71645),c=e.i(74080);function d(e,t,n){let i,o=n.initialDeps??[],s=!0;function l(){var l,r,a;let u,c;n.key&&(null==(l=n.debug)?void 0:l.call(n))&&(u=Date.now());let d=e();if(!(d.length!==o.length||d.some((e,t)=>o[t]!==e)))return i;if(o=d,n.key&&(null==(r=n.debug)?void 0:r.call(n))&&(c=Date.now()),i=t(...d),n.key&&(null==(a=n.debug)?void 0:a.call(n))){let e=Math.round((Date.now()-u)*100)/100,t=Math.round((Date.now()-c)*100)/100,i=t/16,o=(e,t)=>{for(e=String(e);e.length{o=e},l}function h(e,t){if(void 0!==e)return e;throw Error(`Unexpected undefined${t?`: ${t}`:""}`)}let p=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},m=e=>e,f=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),i=[];for(let e=t;e<=n;e++)i.push(e);return i},g=(e,t)=>{let n=e.scrollElement;if(!n)return;let i=e.targetWindow;if(!i)return;let o=e=>{let{width:n,height:i}=e;t({width:Math.round(n),height:Math.round(i)})};if(o(p(n)),!i.ResizeObserver)return()=>{};let s=new i.ResizeObserver(t=>{let i=()=>{let e=t[0];if(null==e?void 0:e.borderBoxSize){let t=e.borderBoxSize[0];if(t)return void o({width:t.inlineSize,height:t.blockSize})}o(p(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()});return s.observe(n,{box:"border-box"}),()=>{s.unobserve(n)}},v={passive:!0},x="u"{var n,i;let o,s=e.scrollElement;if(!s)return;let l=e.targetWindow;if(!l)return;let r=0,a=e.options.useScrollendEvent&&x?()=>void 0:(n=()=>{t(r,!1)},i=e.options.isScrollingResetDelay,function(...e){l.clearTimeout(o),o=l.setTimeout(()=>n.apply(this,e),i)}),u=n=>()=>{let{horizontal:i,isRtl:o}=e.options;r=i?s.scrollLeft*(o&&-1||1):s.scrollTop,a(),t(r,n)},c=u(!0),d=u(!1);s.addEventListener("scroll",c,v);let h=e.options.useScrollendEvent&&x;return h&&s.addEventListener("scrollend",d,v),()=>{s.removeEventListener("scroll",c),h&&s.removeEventListener("scrollend",d)}},S=(e,t,n)=>{if(null==t?void 0:t.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},y=(e,{adjustments:t=0,behavior:n},i)=>{var o,s;null==(s=null==(o=i.scrollElement)?void 0:o.scrollTo)||s.call(o,{[i.options.horizontal?"left":"top"]:e+t,behavior:n})};class E{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var e,t,n;return(null==(n=null==(t=null==(e=this.targetWindow)?void 0:e.performance)?void 0:t.now)?void 0:n.call(t))??Date.now()},this.observer=(()=>{let e=null,t=()=>e||(this.targetWindow&&this.targetWindow.ResizeObserver?e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{let t=e.target,n=this.indexFromElement(t);t.isConnected?this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,e,this)):this.observer.unobserve(t)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}):null);return{disconnect:()=>{var n;null==(n=t())||n.disconnect(),e=null},observe:e=>{var n;return null==(n=t())?void 0:n.observe(e,{box:"border-box"})},unobserve:e=>{var n;return null==(n=t())?void 0:n.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([t,n])=>{void 0===n&&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:S,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,laneAssignmentMode:"estimate",...e}},this.notify=e=>{var t,n;null==(n=(t=this.options).onChange)||n.call(t,this,e)},this.maybeNotify=d(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),null!=this.rafId&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.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.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()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 n=new Map,i=new Map;for(let o=t-1;o>=0;o--){let t=e[o];if(n.has(t.lane))continue;let s=i.get(t.lane);if(null==s||t.end>s.end?i.set(t.lane,t):t.ende.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=d(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode],(e,t,n,i,o,s,l)=>(void 0!==this.prevLanes&&this.prevLanes!==s&&(this.lanesChangedFlag=!0),this.prevLanes=s,this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:n,getItemKey:i,enabled:o,lanes:s,laneAssignmentMode:l}),{key:!1}),this.getMeasurements=d(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:n,getItemKey:i,enabled:o,lanes:s,laneAssignmentMode:l},r)=>{if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),0!==this.measurementsCache.length||this.lanesSettling||(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let a=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1);let u=this.measurementsCache.slice(0,a),c=Array(s).fill(void 0);for(let e=0;e1){let i=c[e=d],o=void 0!==i?u[i]:void 0;s=o?o.end+this.options.gap:t+n}else{let i=1===this.options.lanes?u[o-1]:this.getFurthestMeasurement(u,o);s=i?i.end+this.options.gap:t+n,e=i?i.lane:o%this.options.lanes,this.options.lanes>1&&h&&this.laneAssignments.set(o,e)}let p=r.get(a),m="number"==typeof p?p:this.options.estimateSize(o),f=s+m;u[o]={index:o,start:s,size:m,end:f,key:a,lane:e},c[e]=o}return this.measurementsCache=u,u},{key:!1,debug:()=>this.options.debug}),this.calculateRange=d(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,i)=>this.range=e.length>0&&t>0?function({measurements:e,outerSize:t,scrollOffset:n,lanes:i}){let o=e.length-1;if(e.length<=i)return{startIndex:0,endIndex:o};let s=O(0,o,t=>e[t].start,n),l=s;if(1===i)for(;l1){let r=Array(i).fill(0);for(;le=0&&a.some(e=>e>=n);){let t=e[s];a[t.lane]=t.start,s--}s=Math.max(0,s-s%i),l=Math.min(o,l+(i-1-l%i))}return{startIndex:s,endIndex:l}}({measurements:e,outerSize:t,scrollOffset:n,lanes:i}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=d(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,i,o)=>null===i||null===o?[]:e({startIndex:i,endIndex:o,overscan:t,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{var t;if(!this.scrollState||"smooth"!==this.scrollState.behavior)return!0;let n=this.scrollState.index??(null==(t=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))?void 0:t.index);if(void 0!==n&&this.range){let t=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),i=Math.max(0,n-t),o=Math.min(this.options.count-1,n+t);return e>=i&&e<=o}return!0},this.measureElement=e=>{if(!e)return void this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});let t=this.indexFromElement(e),n=this.options.getItemKey(t),i=this.elementsCache.get(n);i!==e&&(i&&this.observer.unobserve(i),this.observer.observe(e),this.elementsCache.set(n,e)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{var n;let i=this.measurementsCache[e];if(!i)return;let o=t-(this.itemSizeCache.get(i.key)??i.size);0!==o&&((null==(n=this.scrollState)?void 0:n.behavior)!=="smooth"&&(void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(i,o,this):i.start[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let i=0,o=e.length;ithis.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(0!==t.length)return h(t[O(0,t.length-1,e=>h(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let i=this.getSize(),o=this.getScrollOffset();return"auto"===t&&(t=e>=o+i?"end":"start"),"center"===t?e+=(n-i)/2:"end"===t&&(e-=i),Math.max(Math.min(this.getMaxScrollOffset(),e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.getSize(),i=this.getScrollOffset(),o=this.measurementsCache[e];if(!o)return;if("auto"===t)if(o.end>=i+n-this.options.scrollPaddingEnd)t="end";else{if(!(o.start<=i+this.options.scrollPaddingStart))return[i,t];t="start"}if("end"===t&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let s="end"===t?o.end+this.options.scrollPaddingEnd:o.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,t,o.size),t]},this.scrollToOffset=(e,{align:t="start",behavior:n="auto"}={})=>{let i=this.getOffsetForAlignment(e,t),o=this.now();this.scrollState={index:null,align:t,behavior:n,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t="auto",behavior:n="auto"}={})=>{e=Math.max(0,Math.min(e,this.options.count-1));let i=this.getOffsetForIndex(e,t);if(!i)return;let[o,s]=i,l=this.now();this.scrollState={index:e,align:s,behavior:n,startedAt:l,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t="auto"}={})=>{let n=this.getScrollOffset()+e,i=this.now();this.scrollState={index:null,align:"start",behavior:t,startedAt:i,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.getTotalSize=()=>{var e;let t,n=this.getMeasurements();if(0===n.length)t=this.options.paddingStart;else if(1===this.options.lanes)t=(null==(e=n[n.length-1])?void 0:e.end)??0;else{let e=Array(this.options.lanes).fill(null),i=n.length-1;for(;i>=0&&e.some(e=>null===e);){let t=n[i];null===e[t.lane]&&(e[t.lane]=t.end),i--}t=Math.max(...e.filter(e=>null!==e))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(e)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}null==this.rafId&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}let e=null!=this.scrollState.index?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,t=e?e[0]:this.scrollState.lastTargetOffset,n=t!==this.scrollState.lastTargetOffset;if(!n&&1.01>Math.abs(t-this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=1){this.scrollState=null;return}}else this.scrollState.stableFrames=0,n&&(this.scrollState.lastTargetOffset=t,this.scrollState.behavior="auto",this._scrollToOffset(t,{adjustments:void 0,behavior:"auto"}));this.scheduleScrollReconcile()}}let O=(e,t,n,i)=>{for(;e<=t;){let o=(e+t)/2|0,s=n(o);if(si))return o;t=o-1}}return e>0?e-1:0},C="u">typeof document?u.useLayoutEffect:u.useEffect;var I=e.i(94487),w=e.i(36289),T=e.i(3269),M=e.i(14520),R=e.i(46725),F=e.i(92704),P=e.i(14189),k=e.i(88374),A=e.i(84653),_=e.i(35696),D=e.i(41444),z=e.i(77891),L=e.i(52744),j=e.i(5083),N=e.i(57138),B=e.i(13581),W=e.i(2155);function V(e){var t,n,i;let o,s=(0,u.useRef)({value:"",selectionStart:null,selectionEnd:null});return t=e,n="blur",i=e=>{let t=e.target;B.isHTMLInputElement(t)&&(s.current={value:t.value,selectionStart:t.selectionStart,selectionEnd:t.selectionEnd})},o=(0,D.useLatestValue)(i),(0,u.useEffect)(()=>{function e(e){o.current(e)}return(t=null!=t?t:window).addEventListener(n,e,void 0),()=>t.removeEventListener(n,e,void 0)},[t,n,void 0]),(0,P.useEvent)(()=>{if(!(0,W.isActiveElement)(e)&&B.isHTMLInputElement(e)&&e.isConnected){if(e.focus({preventScroll:!0}),e.value!==s.current.value)e.setSelectionRange(e.value.length,e.value.length);else{let{selectionStart:t,selectionEnd:n}=s.current;null!==t&&null!==n&&e.setSelectionRange(t,n)}s.current={value:"",selectionStart:null,selectionEnd:null}}})}var K=e.i(44279),H=e.i(1852),$=e.i(55743),U=e.i(94316),q=e.i(71616),Z=e.i(83733);function G(e,t){let n=(0,u.useRef)([]),i=(0,P.useEvent)(e);(0,u.useEffect)(()=>{let e=[...n.current];for(let[o,s]of t.entries())if(n.current[o]!==s){let o=i(t,e);return n.current=t,o}},[i,...t])}var J=e.i(1893),Q=e.i(19751),X=e.i(40721),Y=e.i(4016),ee=e.i(42803),et=e.i(33137),en=e.i(41650),ei=e.i(40407),eo=e.i(52265);let es=[];function el(){"loading"!==document.readyState&&((()=>{function e(e){if(!B.isHTMLorSVGElement(e.target)||e.target===document.body||es[0]===e.target)return;let t=e.target;t=t.closest(eo.focusableSelector),es.unshift(null!=t?t:e.target),(es=es.filter(e=>null!=e&&e.isConnected)).splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})})(),document.removeEventListener("DOMContentLoaded",el))}"u">typeof window&&"u">typeof document&&(document.addEventListener("DOMContentLoaded",el),el());var er=e.i(65659),ea=e.i(44508),eu=e.i(97701),ec=e.i(9507),ed=e.i(20),eh=e.i(35889),ep=e.i(98348),em=e.i(22678),ef=e.i(63516),eg=e.i(35307),ev=e.i(25720),ex=e.i(67310),eb=Object.defineProperty,eS=(e,t,n)=>{let i;return(i="symbol"!=typeof t?t+"":t)in e?eb(e,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[i]=n,n},ey=((t=ey||{})[t.Open=0]="Open",t[t.Closed=1]="Closed",t),eE=((n=eE||{})[n.Single=0]="Single",n[n.Multi=1]="Multi",n),eO=((i=eO||{})[i.Pointer=0]="Pointer",i[i.Focus=1]="Focus",i[i.Other=2]="Other",i),eC=((o=eC||{})[o.OpenCombobox=0]="OpenCombobox",o[o.CloseCombobox=1]="CloseCombobox",o[o.GoToOption=2]="GoToOption",o[o.SetTyping=3]="SetTyping",o[o.RegisterOption=4]="RegisterOption",o[o.UnregisterOption=5]="UnregisterOption",o[o.DefaultToFirstOption=6]="DefaultToFirstOption",o[o.SetActivationTrigger=7]="SetActivationTrigger",o[o.UpdateVirtualConfiguration=8]="UpdateVirtualConfiguration",o[o.SetInputElement=9]="SetInputElement",o[o.SetButtonElement=10]="SetButtonElement",o[o.SetOptionsElement=11]="SetOptionsElement",o[o.MarkInputAsMoved=12]="MarkInputAsMoved",o);function eI(e,t=e=>e){let n=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,i=t(e.options.slice()),o=i.length>0&&null!==i[0].dataRef.current.order?i.sort((e,t)=>e.dataRef.current.order-t.dataRef.current.order):(0,eo.sortByDomNode)(i,e=>e.dataRef.current.domRef.current),s=n?o.indexOf(n):null;return -1===s&&(s=null),{options:o,activeOptionIndex:s}}let ew={1(e){var t;if(null!=(t=e.dataRef.current)&&t.disabled||1===e.comboboxState)return e;let n=e.inputElement?ex.ElementPositionState.Tracked((0,ex.computeVisualPosition)(e.inputElement)):e.inputPositionState;return{...e,activeOptionIndex:null,comboboxState:1,isTyping:!1,activationTrigger:2,inputPositionState:n,__demoMode:!1}},0(e){var t,n;if(null!=(t=e.dataRef.current)&&t.disabled||0===e.comboboxState)return e;if(null!=(n=e.dataRef.current)&&n.value){let t=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(-1!==t)return{...e,activeOptionIndex:t,comboboxState:0,__demoMode:!1,inputPositionState:ex.ElementPositionState.Idle}}return{...e,comboboxState:0,inputPositionState:ex.ElementPositionState.Idle,__demoMode:!1}},3:(e,t)=>e.isTyping===t.isTyping?e:{...e,isTyping:t.isTyping},2(e,t){var n,i,o,s;if(null!=(n=e.dataRef.current)&&n.disabled||e.optionsElement&&!(null!=(i=e.dataRef.current)&&i.optionsPropsRef.current.static)&&1===e.comboboxState)return e;if(e.virtual){let{options:n,disabled:i}=e.virtual,s=t.focus===er.Focus.Specific?t.idx:(0,er.calculateActiveIndex)(t,{resolveItems:()=>n,resolveActiveIndex:()=>{var t,o;return null!=(o=null!=(t=e.activeOptionIndex)?t:n.findIndex(e=>!i(e)))?o:null},resolveDisabled:i,resolveId(){throw Error("Function not implemented.")}}),l=null!=(o=t.trigger)?o:2;return e.activeOptionIndex===s&&e.activationTrigger===l?e:{...e,activeOptionIndex:s,activationTrigger:l,isTyping:!1,__demoMode:!1}}let l=eI(e);if(null===l.activeOptionIndex){let e=l.options.findIndex(e=>!e.dataRef.current.disabled);-1!==e&&(l.activeOptionIndex=e)}let r=t.focus===er.Focus.Specific?t.idx:(0,er.calculateActiveIndex)(t,{resolveItems:()=>l.options,resolveActiveIndex:()=>l.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled}),a=null!=(s=t.trigger)?s:2;return e.activeOptionIndex===r&&e.activationTrigger===a?e:{...e,...l,isTyping:!1,activeOptionIndex:r,activationTrigger:a,__demoMode:!1}},4:(e,t)=>{var n,i,o,s;if(null!=(n=e.dataRef.current)&&n.virtual)return{...e,options:[...e.options,t.payload]};let l=t.payload,r=eI(e,e=>(e.push(l),e));null===e.activeOptionIndex&&null!=(o=(i=e.dataRef.current).isSelected)&&o.call(i,t.payload.dataRef.current.value)&&(r.activeOptionIndex=r.options.indexOf(l));let a={...e,...r,activationTrigger:2};return null!=(s=e.dataRef.current)&&s.__demoMode&&void 0===e.dataRef.current.value&&(a.activeOptionIndex=0),a},5:(e,t)=>{var n;if(null!=(n=e.dataRef.current)&&n.virtual)return{...e,options:e.options.filter(e=>e.id!==t.id)};let i=eI(e,e=>{let n=e.findIndex(e=>e.id===t.id);return -1!==n&&e.splice(n,1),e});return{...e,...i,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)=>{var n,i;if(null===e.virtual)return{...e,virtual:{options:t.options,disabled:null!=(n=t.disabled)?n:()=>!1}};if(e.virtual.options===t.options&&e.virtual.disabled===t.disabled)return e;let o=e.activeOptionIndex;if(null!==e.activeOptionIndex){let n=t.options.indexOf(e.virtual.options[e.activeOptionIndex]);o=-1!==n?n:null}return{...e,activeOptionIndex:o,virtual:{options:t.options,disabled:null!=(i=t.disabled)?i:()=>!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},12:e=>"Tracked"!==e.inputPositionState.kind?e:{...e,inputPositionState:ex.ElementPositionState.Moved}};class eT extends ev.Machine{constructor(e){super(e),eS(this,"actions",{onChange:e=>{let{onChange:t,compare:n,mode:i,value:o}=this.state.dataRef.current;return(0,eu.match)(i,{0:()=>null==t?void 0:t(e),1:()=>{let i=o.slice(),s=i.findIndex(t=>n(t,e));return -1===s?i.push(e):i.splice(s,1),null==t?void 0:t(i)}})},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:er.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})}}),eS(this,"selectors",{activeDescendantId:e=>{var t,n;let i=this.selectors.activeOptionIndex(e);if(null!==i)return e.virtual?null==(n=e.options.find(t=>!t.dataRef.current.disabled&&e.dataRef.current.compare(t.dataRef.current.value,e.virtual.options[i])))?void 0:n.id:null==(t=e.options[i])?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:n}=e.virtual,i=t.findIndex(e=>{var t;return!(null!=(t=null==n?void 0:n(e))&&t)});if(-1!==i)return i}let t=e.options.findIndex(e=>!e.dataRef.current.disabled);if(-1!==t)return t}return e.activeOptionIndex},activeOption:e=>{var t,n;let i=this.selectors.activeOptionIndex(e);return null===i?null:e.virtual?e.virtual.options[null!=i?i:0]:null!=(n=null==(t=e.options[i])?void 0:t.dataRef.current.value)?n:null},isActive:(e,t,n)=>{var i;let o=this.selectors.activeOptionIndex(e);return null!==o&&(e.virtual?o===e.dataRef.current.calculateIndex(t):(null==(i=e.options[o])?void 0:i.id)===n)},shouldScrollIntoView:(e,t,n)=>!(e.virtual||e.__demoMode||0!==e.comboboxState||0===e.activationTrigger||!this.selectors.isActive(e,t,n)),didInputMove:e=>"Moved"===e.inputPositionState.kind});{let e=this.state.id,t=en.stackMachines.get(null);this.disposables.add(t.on(en.ActionTypes.Push,n=>{t.selectors.isTop(n,e)||0!==this.state.comboboxState||this.actions.closeCombobox()})),this.on(0,()=>t.actions.push(e)),this.on(1,()=>t.actions.pop(e))}this.disposables.group(e=>{this.on(1,t=>{t.inputElement&&(e.dispose(),e.add((0,ex.detectMovement)(t.inputElement,t.inputPositionState,()=>{this.send({type:12})})))})})}static new({id:e,virtual:t=null,__demoMode:n=!1}){var i;return new eT({id:e,dataRef:{current:{}},comboboxState:+!n,isTyping:!1,options:[],virtual:t?{options:t.options,disabled:null!=(i=t.disabled)?i:()=>!1}:null,activeOptionIndex:null,activationTrigger:2,inputElement:null,buttonElement:null,optionsElement:null,__demoMode:n,inputPositionState:ex.ElementPositionState.Idle})}reduce(e,t){return(0,eu.match)(t.type,ew,e,t)}}var eM=e.i(26599);let eR=(0,u.createContext)(null);function eF(e){let t=(0,u.useContext)(eR);if(null===t){let t=Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,eP),t}return t}function eP({id:e,virtual:t=null,__demoMode:n=!1}){let i=(0,u.useMemo)(()=>eT.new({id:e,virtual:t,__demoMode:n}),[]);return(0,eM.useOnUnmount)(()=>i.dispose()),i}let ek=(0,u.createContext)(null);function eA(e){let t=(0,u.useContext)(ek);if(null===t){let t=Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,eA),t}return t}ek.displayName="ComboboxDataContext";let e_=(0,u.createContext)(null);function eD(e){let t=eF("VirtualProvider"),{options:n}=eA("VirtualProvider").virtual,i=(0,ei.useSlice)(t,e=>e.optionsElement),[o,s]=(0,u.useMemo)(()=>{if(!i)return[0,0];let e=window.getComputedStyle(i);return[parseFloat(e.paddingBlockStart||e.paddingTop),parseFloat(e.paddingBlockEnd||e.paddingBottom)]},[i]),l=function({useFlushSync:e=!0,...t}){let n=u.useReducer(()=>({}),{})[1],i={...t,onChange:(i,o)=>{var s;e&&o?(0,c.flushSync)(n):n(),null==(s=t.onChange)||s.call(t,i,o)}},[o]=u.useState(()=>new E(i));return o.setOptions(i),C(()=>o._didMount(),[]),C(()=>o._willUpdate()),o}({observeElementRect:g,observeElementOffset:b,scrollToFn:y,...{enabled:0!==n.length,scrollPaddingStart:o,scrollPaddingEnd:s,count:n.length,estimateSize:()=>40,getScrollElement:()=>t.state.optionsElement,overscan:12}}),[r,a]=(0,u.useState)(0);(0,_.useIsoMorphicEffect)(()=>{a(e=>e+1)},[n]);let d=l.getVirtualItems(),h=(0,ei.useSlice)(t,e=>e.activationTrigger===eO.Pointer),p=(0,ei.useSlice)(t,t.selectors.activeOptionIndex);return 0===d.length?null:u.default.createElement(e_.Provider,{value:l},u.default.createElement("div",{style:{position:"relative",width:"100%",height:`${l.getTotalSize()}px`},ref:e=>{e&&(h||null!==p&&n.length>p&&l.scrollToIndex(p))}},d.map(t=>{var i;return u.default.createElement(u.Fragment,{key:t.key},u.default.cloneElement(null==(i=e.children)?void 0:i.call(e,{...e.slot,option:n[t.index]}),{key:`${r}-${t.key}`,"data-index":t.index,"aria-setsize":n.length,"aria-posinset":t.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${t.start}px)`,overflowAnchor:"none"}}))})))}let ez=u.Fragment,eL=ed.RenderFeatures.RenderStrategy|ed.RenderFeatures.Static,ej=(0,ed.forwardRefWithAs)(function(e,t){let n=(0,u.useId)(),i=(0,J.useDisabled)(),{value:o,defaultValue:s,onChange:l,form:r,name:a,by:c,invalid:d=!1,disabled:h=i||!1,onClose:p,__demoMode:m=!1,multiple:f=!1,immediate:g=!1,virtual:v=null,nullable:x,...b}=e,S=(0,M.useDefaultValue)(s),[y=f?[]:void 0,E]=(0,T.useControllable)(o,l,S),O=eP({id:n,virtual:v,__demoMode:m}),C=(0,u.useRef)({static:!1,hold:!1}),I=(0,w.useByComparator)(c),R=(0,P.useEvent)(e=>v?null===c?v.options.indexOf(e):v.options.findIndex(t=>I(t,e)):O.state.options.findIndex(t=>I(t.dataRef.current.value,e))),F=(0,u.useCallback)(e=>(0,eu.match)(D.mode,{[eE.Multi]:()=>y.some(t=>I(t,e)),[eE.Single]:()=>I(y,e)}),[y]),k=(0,ei.useSlice)(O,e=>e.virtual),A=(0,P.useEvent)(()=>null==p?void 0:p()),D=(0,u.useMemo)(()=>({__demoMode:m,immediate:g,optionsPropsRef:C,value:y,defaultValue:S,disabled:h,invalid:d,mode:f?eE.Multi:eE.Single,virtual:v?k:null,onChange:E,isSelected:F,calculateIndex:R,compare:I,onClose:A}),[m,g,C,y,S,h,d,f,v,k,E,F,R,I,A]);(0,_.useIsoMorphicEffect)(()=>{var e;v&&O.send({type:eC.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,_.useIsoMorphicEffect)(()=>{O.state.dataRef.current=D},[D]);let[z,j,N,B]=(0,ei.useSlice)(O,e=>[e.comboboxState,e.buttonElement,e.inputElement,e.optionsElement]),W=en.stackMachines.get(null),V=(0,ei.useSlice)(W,(0,u.useCallback)(e=>W.selectors.isTop(e,n),[W,n]));(0,L.useOutsideClick)(V,[j,N,B],()=>O.actions.closeCombobox());let K=(0,ei.useSlice)(O,O.selectors.activeOptionIndex),H=(0,ei.useSlice)(O,O.selectors.activeOption),U=(0,$.useSlot)({open:z===ey.Open,disabled:h,invalid:d,activeIndex:K,activeOption:H,value:y}),[q,Z]=(0,em.useLabels)(),G=(0,u.useCallback)(()=>{if(void 0!==S)return null==E?void 0:E(S)},[E,S]),Y=(0,ed.useRender)();return u.default.createElement(Z,{value:q,props:{htmlFor:null==N?void 0:N.id},slot:{open:z===ey.Open,disabled:h}},u.default.createElement(Q.FloatingProvider,null,u.default.createElement(ek.Provider,{value:D},u.default.createElement(eR.Provider,{value:O},u.default.createElement(et.OpenClosedProvider,{value:(0,eu.match)(z,{[ey.Open]:et.State.Open,[ey.Closed]:et.State.Closed})},null!=a&&u.default.createElement(X.FormFields,{disabled:h,data:null!=y?{[a]:y}:{},form:r,onReset:G}),Y({ourProps:null===t?{}:{ref:t},theirProps:b,slot:U,defaultTag:ez,name:"Combobox"}))))))}),eN=(0,ed.forwardRefWithAs)(function(e,t){let n=eF("Combobox.Button"),i=eA("Combobox.Button"),[o,s]=(0,u.useState)(null),l=(0,U.useSyncRefs)(t,s,n.actions.setButtonElement),d=(0,u.useId)(),{id:h=`headlessui-combobox-button-${d}`,disabled:p=i.disabled||!1,autoFocus:m=!1,...f}=e,[g,v,x]=(0,ei.useSlice)(n,e=>[e.comboboxState,e.inputElement,e.optionsElement]),b=V(v),S=g===ey.Open;(0,N.useQuickRelease)(S,{trigger:o,action:(0,u.useCallback)(e=>{if(null!=o&&o.contains(e.target)||null!=v&&v.contains(e.target))return N.Action.Ignore;let t=e.target.closest('[role="option"]:not([data-disabled])');return B.isHTMLElement(t)?N.Action.Select(t):null!=x&&x.contains(e.target)?N.Action.Ignore:N.Action.Close},[o,v,x]),close:n.actions.closeCombobox,select:n.actions.selectActiveOption});let y=(0,P.useEvent)(e=>{switch(e.key){case ep.Keys.Space:case ep.Keys.Enter:e.preventDefault(),e.stopPropagation(),n.state.comboboxState===ey.Closed&&(0,c.flushSync)(()=>n.actions.openCombobox()),b();return;case ep.Keys.ArrowDown:e.preventDefault(),e.stopPropagation(),n.state.comboboxState===ey.Closed&&((0,c.flushSync)(()=>n.actions.openCombobox()),n.state.dataRef.current.value||n.actions.goToOption({focus:er.Focus.First})),b();return;case ep.Keys.ArrowUp:e.preventDefault(),e.stopPropagation(),n.state.comboboxState===ey.Closed&&((0,c.flushSync)(()=>n.actions.openCombobox()),n.state.dataRef.current.value||n.actions.goToOption({focus:er.Focus.Last})),b();return;case ep.Keys.Escape:if(n.state.comboboxState!==ey.Open)return;e.preventDefault(),n.state.optionsElement&&!i.optionsPropsRef.current.static&&e.stopPropagation(),(0,c.flushSync)(()=>n.actions.closeCombobox()),b();return;default:return}}),E=(0,k.useHandleToggle)(()=>{n.state.comboboxState===ey.Open?n.actions.closeCombobox():n.actions.openCombobox(),b()}),O=(0,em.useLabelledBy)([h]),{isFocusVisible:C,focusProps:w}=(0,r.useFocusRing)({autoFocus:m}),{isHovered:T,hoverProps:M}=(0,a.useHover)({isDisabled:p}),{pressed:R,pressProps:F}=(0,I.useActivePress)({disabled:p}),A=(0,$.useSlot)({open:g===ey.Open,active:R||g===ey.Open,disabled:p,invalid:i.invalid,value:i.value,hover:T,focus:C}),_=(0,ed.mergeProps)({ref:l,id:h,type:(0,K.useResolveButtonType)(e,o),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":null==x?void 0:x.id,"aria-expanded":g===ey.Open,"aria-labelledby":O,disabled:p||void 0,autoFocus:m,onKeyDown:y},E,w,M,F);return(0,ed.useRender)()({ourProps:_,theirProps:f,slot:A,defaultTag:"button",name:"Combobox.Button"})}),eB=(0,ed.forwardRefWithAs)(function(e,t){var n,i;let o=eF("Combobox.Input"),s=eA("Combobox.Input"),l=(0,u.useId)(),d=(0,ee.useProvidedId)(),{id:h=d||`headlessui-combobox-input-${l}`,onChange:p,displayValue:m,disabled:f=s.disabled||!1,autoFocus:g=!1,type:v="text",...x}=e,b=(0,u.useRef)(null),S=(0,U.useSyncRefs)(b,t,(0,Q.useFloatingReference)(),o.actions.setInputElement),[y,E]=(0,ei.useSlice)(o,e=>[e.comboboxState,e.isTyping]),O=(0,R.useDisposables)(),C=(0,P.useEvent)(()=>{o.actions.onChange(null),o.state.optionsElement&&(o.state.optionsElement.scrollTop=0),o.actions.goToOption({focus:er.Focus.Nothing})});G(([e,t],[n,i])=>{if(o.state.isTyping)return;let s=b.current;s&&((i===ey.Open&&t===ey.Closed||e!==n)&&(s.value=e),requestAnimationFrame(()=>{if(o.state.isTyping||!s||(0,W.isActiveElement)(s))return;let{selectionStart:e,selectionEnd:t}=s;0===Math.abs((null!=t?t:0)-(null!=e?e:0))&&0===e&&s.setSelectionRange(s.value.length,s.value.length)}))},[(0,u.useMemo)(()=>{var e;return"function"==typeof m&&void 0!==s.value?null!=(e=m(s.value))?e:"":"string"==typeof s.value?s.value:""},[s.value,m]),y,E]),G(([e],[t])=>{if(e===ey.Open&&t===ey.Closed){if(o.state.isTyping)return;let e=b.current;if(!e)return;let t=e.value,{selectionStart:n,selectionEnd:i,selectionDirection:s}=e;e.value="",e.value=t,null!==s?e.setSelectionRange(n,i,s):e.setSelectionRange(n,i)}},[y]);let I=(0,u.useRef)(!1),w=(0,P.useEvent)(()=>{I.current=!0}),T=(0,P.useEvent)(()=>{O.nextFrame(()=>{I.current=!1})}),M=(0,P.useEvent)(e=>{switch(o.actions.setIsTyping(!0),e.key){case ep.Keys.Enter:if(o.state.comboboxState!==ey.Open||I.current)return;if(e.preventDefault(),e.stopPropagation(),null===o.selectors.activeOptionIndex(o.state))return void o.actions.closeCombobox();o.actions.selectActiveOption(),s.mode===eE.Single&&o.actions.closeCombobox();break;case ep.Keys.ArrowDown:return e.preventDefault(),e.stopPropagation(),(0,eu.match)(o.state.comboboxState,{[ey.Open]:()=>o.actions.goToOption({focus:er.Focus.Next}),[ey.Closed]:()=>o.actions.openCombobox()});case ep.Keys.ArrowUp:return e.preventDefault(),e.stopPropagation(),(0,eu.match)(o.state.comboboxState,{[ey.Open]:()=>o.actions.goToOption({focus:er.Focus.Previous}),[ey.Closed]:()=>{(0,c.flushSync)(()=>o.actions.openCombobox()),s.value||o.actions.goToOption({focus:er.Focus.Last})}});case ep.Keys.Home:if(o.state.comboboxState===ey.Closed||e.shiftKey)break;return e.preventDefault(),e.stopPropagation(),o.actions.goToOption({focus:er.Focus.First});case ep.Keys.PageUp:return e.preventDefault(),e.stopPropagation(),o.actions.goToOption({focus:er.Focus.First});case ep.Keys.End:if(o.state.comboboxState===ey.Closed||e.shiftKey)break;return e.preventDefault(),e.stopPropagation(),o.actions.goToOption({focus:er.Focus.Last});case ep.Keys.PageDown:return e.preventDefault(),e.stopPropagation(),o.actions.goToOption({focus:er.Focus.Last});case ep.Keys.Escape:return o.state.comboboxState!==ey.Open?void 0:(e.preventDefault(),o.state.optionsElement&&!s.optionsPropsRef.current.static&&e.stopPropagation(),s.mode===eE.Single&&null===s.value&&C(),o.actions.closeCombobox());case ep.Keys.Tab:if(o.actions.setIsTyping(!1),o.state.comboboxState!==ey.Open)return;s.mode===eE.Single&&o.state.activationTrigger!==eO.Focus&&o.actions.selectActiveOption(),o.actions.closeCombobox()}}),F=(0,P.useEvent)(e=>{null==p||p(e),s.mode===eE.Single&&""===e.target.value&&C(),o.actions.openCombobox()}),k=(0,P.useEvent)(e=>{var t,n,i;let l=null!=(t=e.relatedTarget)?t:es.find(t=>t!==e.currentTarget);if(!(null!=(n=o.state.optionsElement)&&n.contains(l))&&!(null!=(i=o.state.buttonElement)&&i.contains(l))&&o.state.comboboxState===ey.Open)return e.preventDefault(),s.mode===eE.Single&&null===s.value&&C(),o.actions.closeCombobox()}),A=(0,P.useEvent)(e=>{var t,n,i;let l=null!=(t=e.relatedTarget)?t:es.find(t=>t!==e.currentTarget);null!=(n=o.state.buttonElement)&&n.contains(l)||null!=(i=o.state.optionsElement)&&i.contains(l)||s.disabled||s.immediate&&o.state.comboboxState!==ey.Open&&O.microTask(()=>{(0,c.flushSync)(()=>o.actions.openCombobox()),o.actions.setActivationTrigger(eO.Focus)})}),_=(0,em.useLabelledBy)(),D=(0,eh.useDescribedBy)(),{isFocused:z,focusProps:L}=(0,r.useFocusRing)({autoFocus:g}),{isHovered:j,hoverProps:N}=(0,a.useHover)({isDisabled:f}),B=(0,ei.useSlice)(o,e=>e.optionsElement),V=(0,$.useSlot)({open:y===ey.Open,disabled:f,invalid:s.invalid,hover:j,focus:z,autofocus:g}),K=(0,ed.mergeProps)({ref:S,id:h,role:"combobox",type:v,"aria-controls":null==B?void 0:B.id,"aria-expanded":y===ey.Open,"aria-activedescendant":(0,ei.useSlice)(o,o.selectors.activeDescendantId),"aria-labelledby":_,"aria-describedby":D,"aria-autocomplete":"list",defaultValue:null!=(i=null!=(n=e.defaultValue)?n:void 0!==s.defaultValue?null==m?void 0:m(s.defaultValue):null)?i:s.defaultValue,disabled:f||void 0,autoFocus:g,onCompositionStart:w,onCompositionEnd:T,onKeyDown:M,onChange:F,onFocus:A,onBlur:k},L,N);return(0,ed.useRender)()({ourProps:K,theirProps:x,slot:V,defaultTag:"input",name:"Combobox.Input"})}),eW=em.Label,eV=(0,ed.forwardRefWithAs)(function(e,t){var n,i,o;let s=(0,u.useId)(),{id:l=`headlessui-combobox-options-${s}`,hold:r=!1,anchor:a,portal:c=!1,modal:d=!0,transition:h=!1,...p}=e,m=eF("Combobox.Options"),f=eA("Combobox.Options"),g=(0,Q.useResolvedAnchor)(a);g&&(c=!0);let[v,x]=(0,Q.useFloatingPanel)(g),[b,S]=(0,u.useState)(null),y=(0,Q.useFloatingPanelProps)(),E=(0,U.useSyncRefs)(t,g?v:null,m.actions.setOptionsElement,S),[O,C,I,w,T]=(0,ei.useSlice)(m,e=>[e.comboboxState,e.inputElement,e.buttonElement,e.optionsElement,e.activationTrigger]),M=(0,j.useOwnerDocument)(C||I),R=(0,j.useOwnerDocument)(w),k=(0,et.useOpenClosed)(),[D,L]=(0,Z.useTransition)(h,b,null!==k?(k&et.State.Open)===et.State.Open:O===ey.Open);(0,z.useOnDisappear)(D,C,m.actions.closeCombobox);let N=!f.__demoMode&&d&&O===ey.Open;(0,H.useScrollLock)(N,R);let B=!f.__demoMode&&d&&O===ey.Open;(0,A.useInertOthers)(B,{allowed:(0,u.useCallback)(()=>[C,I,w],[C,I,w])});let V=!(0,ei.useSlice)(m,m.selectors.didInputMove)&&D;(0,_.useIsoMorphicEffect)(()=>{var t;f.optionsPropsRef.current.static=null!=(t=e.static)&&t},[f.optionsPropsRef,e.static]),(0,_.useIsoMorphicEffect)(()=>{f.optionsPropsRef.current.hold=r},[f.optionsPropsRef,r]),function(e,{container:t,accept:n,walk:i}){let o=(0,u.useRef)(n),s=(0,u.useRef)(i);(0,u.useEffect)(()=>{o.current=n,s.current=i},[n,i]),(0,_.useIsoMorphicEffect)(()=>{if(!t||!e)return;let n=(0,W.getOwnerDocument)(t);if(!n)return;let i=o.current,l=s.current,r=Object.assign(e=>i(e),{acceptNode:i}),a=n.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,r,!1);for(;a.nextNode();)l(a.currentNode)},[t,e,o,s])}(O===ey.Open,{container:w,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 K=(0,em.useLabelledBy)([null==I?void 0:I.id]),q=(0,$.useSlot)({open:O===ey.Open,option:void 0}),G=(0,P.useEvent)(()=>{m.actions.setActivationTrigger(eO.Pointer)}),J=(0,P.useEvent)(e=>{e.preventDefault(),m.actions.setActivationTrigger(eO.Pointer)}),X=(0,ed.mergeProps)(g?y():{},{"aria-labelledby":K,role:"listbox","aria-multiselectable":f.mode===eE.Multi||void 0,id:l,ref:E,style:{...p.style,...x,"--input-width":(0,F.useElementSize)(D,C,!0).width,"--button-width":(0,F.useElementSize)(D,I,!0).width},onWheel:T===eO.Pointer?void 0:G,onMouseDown:J,...(0,Z.transitionDataAttributes)(L)}),ee=D&&O===ey.Closed&&!e.static,en=(0,Y.useFrozenData)(ee,null==(n=f.virtual)?void 0:n.options),eo=(0,Y.useFrozenData)(ee,f.value),es=(0,u.useCallback)(e=>f.compare(eo,e),[f.compare,eo]),el=(0,u.useMemo)(()=>{if(!f.virtual)return f;if(void 0===en)throw Error("Missing `options` in virtual mode");return en!==f.virtual.options?{...f,virtual:{...f.virtual,options:en}}:f},[f,en,null==(i=f.virtual)?void 0:i.options]);f.virtual&&Object.assign(p,{children:u.default.createElement(ek.Provider,{value:el},u.default.createElement(eD,{slot:q},p.children))});let er=(0,ed.useRender)(),ea=(0,u.useMemo)(()=>f.mode===eE.Multi?f:{...f,isSelected:es},[f,es]);return u.default.createElement(eg.Portal,{enabled:!!c&&(e.static||D),ownerDocument:M},u.default.createElement(ek.Provider,{value:ea},er({ourProps:X,theirProps:{...p,children:u.default.createElement(Y.Frozen,{freeze:ee},"function"==typeof p.children?null==(o=p.children)?void 0:o.call(p,q):p.children)},slot:q,defaultTag:"div",features:eL,visible:V,name:"Combobox.Options"})))}),eK=(0,ed.forwardRefWithAs)(function(e,t){var n,i,o;let s=eA("Combobox.Option"),l=eF("Combobox.Option"),r=(0,u.useId)(),{id:a=`headlessui-combobox-option-${r}`,value:c,disabled:d=null!=(o=null==(i=null==(n=s.virtual)?void 0:n.disabled)?void 0:i.call(n,c))&&o,order:h=null,...p}=e,[m]=(0,ei.useSlice)(l,e=>[e.inputElement]),f=V(m),g=(0,ei.useSlice)(l,(0,u.useCallback)(e=>l.selectors.isActive(e,c,a),[c,a])),v=s.isSelected(c),x=(0,u.useRef)(null),b=(0,D.useLatestValue)({disabled:d,value:c,domRef:x,order:h}),S=(0,u.useContext)(e_),y=(0,U.useSyncRefs)(t,x,S?S.measureElement:null),E=(0,P.useEvent)(()=>{l.actions.setIsTyping(!1),l.actions.onChange(c)});(0,_.useIsoMorphicEffect)(()=>l.actions.registerOption(a,b),[b,a]);let O=(0,ei.useSlice)(l,(0,u.useCallback)(e=>l.selectors.shouldScrollIntoView(e,c,a),[c,a]));(0,_.useIsoMorphicEffect)(()=>{if(O)return(0,ea.disposables)().requestAnimationFrame(()=>{var e,t;null==(t=null==(e=x.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})})},[O,x]);let C=(0,P.useEvent)(e=>{e.preventDefault(),e.button===ef.MouseButton.Left&&(d||(E(),(0,ec.isMobile)()||requestAnimationFrame(()=>f()),s.mode===eE.Single&&l.actions.closeCombobox()))}),I=(0,P.useEvent)(()=>{if(d)return l.actions.goToOption({focus:er.Focus.Nothing});let e=s.calculateIndex(c);l.actions.goToOption({focus:er.Focus.Specific,idx:e})}),w=(0,q.useTrackedPointer)(),T=(0,P.useEvent)(e=>w.update(e)),M=(0,P.useEvent)(e=>{if(!w.wasMoved(e)||d||g&&l.state.activationTrigger===eO.Pointer)return;let t=s.calculateIndex(c);l.actions.goToOption({focus:er.Focus.Specific,idx:t},eO.Pointer)}),R=(0,P.useEvent)(e=>{w.wasMoved(e)&&(d||g&&(s.optionsPropsRef.current.hold||l.state.activationTrigger===eO.Pointer&&l.actions.goToOption({focus:er.Focus.Nothing})))}),F=(0,$.useSlot)({active:g,focus:g,selected:v,disabled:d});return(0,ed.useRender)()({ourProps:{id:a,ref:y,role:"option",tabIndex:!0===d?void 0:-1,"aria-disabled":!0===d||void 0,"aria-selected":v,disabled:void 0,onMouseDown:C,onFocus:I,onPointerEnter:T,onMouseEnter:T,onPointerMove:M,onMouseMove:M,onPointerLeave:R,onMouseLeave:R},theirProps:p,slot:F,defaultTag:"div",name:"Combobox.Option"})}),eH=Object.assign(ej,{Input:eB,Button:eN,Label:eW,Options:eV,Option:eK});var e$=e.i(7670),eU=e.i(5550),eq=e.i(22016),eZ=e.i(18566),eG=e.i(14329);let eJ=e=>{let t,n,i=(0,l.c)(3);return i[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,s.jsx)("path",{d:"M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"}),i[0]=t):t=i[0],i[1]!==e?(n=(0,s.jsx)("svg",{viewBox:"0 0 16 16",fill:"currentColor",...e,children:t}),i[1]=e,i[2]=n):n=i[2],n},eQ=e=>{let t,n,i,o=(0,l.c)(4);return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,s.jsx)("circle",{className:"x:opacity-25",cx:12,cy:12,r:10,strokeWidth:4}),n=(0,s.jsx)("path",{className:"x:opacity-75",fill:"currentColor",stroke:"none",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"}),o[0]=t,o[1]=n):(t=o[0],n=o[1]),o[2]!==e?(i=(0,s.jsxs)("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",...e,children:[t,n]}),o[2]=e,o[3]=i):i=o[3],i};async function eX(){window.pagefind=await import((0,eU.addBasePath)("/_pagefind/pagefind.js")),await window.pagefind.options({baseUrl:"/"})}let eY=new Set(["INPUT","SELECT","BUTTON","TEXTAREA"]);s.Fragment;let e0=e=>{let t,n,i,o,r=(0,l.c)(8),{data:a}=e;return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,e$.default)("x:mx-2.5 x:mb-2 x:not-first:mt-6 x:select-none x:border-b x:border-black/10 x:px-2.5 x:pb-1.5 x:text-xs x:font-semibold x:uppercase x:text-gray-600 x:dark:border-white/20 x:dark:text-gray-300","x:contrast-more:border-gray-600 x:contrast-more:text-gray-900 x:contrast-more:dark:border-gray-50 x:contrast-more:dark:text-gray-50"),r[0]=t):t=r[0],r[1]!==a.meta.title?(n=(0,s.jsx)("div",{className:t,children:a.meta.title}),r[1]=a.meta.title,r[2]=n):n=r[2],r[3]!==a.sub_results?(i=a.sub_results.map(e7),r[3]=a.sub_results,r[4]=i):i=r[4],r[5]!==n||r[6]!==i?(o=(0,s.jsxs)(s.Fragment,{children:[n,i]}),r[5]=n,r[6]=i,r[7]=o):o=r[7],o};function e1(e){return e.data()}function e5(e){let t=e.url.replace(/\.html$/,"").replace(/\.html#/,"#");return{...e,url:t}}function e2(e){return{...e,sub_results:e.sub_results.map(e5)}}function e3(e){let{focus:t}=e;return(0,e$.default)("x:rounded-lg x:px-3 x:py-2 x:transition-all","x:w-full x:md:w-64","x:text-base x:leading-tight x:md:text-sm",t?"x:bg-transparent x:nextra-focus":"x:bg-black/[.05] x:dark:bg-gray-50/10","x:placeholder:text-gray-600 x:dark:placeholder:text-gray-400","x:contrast-more:border x:contrast-more:border-current","x:[&::-webkit-search-cancel-button]:appearance-none")}function e4(e){return(0,s.jsx)(e0,{data:e},e.url)}function e6(e){let{focus:t}=e;return(0,e$.default)("x:mx-2.5 x:break-words x:rounded-md","x:contrast-more:border",t?"x:text-primary-600 x:contrast-more:border-current x:bg-primary-500/10":"x:text-gray-800 x:dark:text-gray-300 x:contrast-more:border-transparent","x:block x:scroll-m-12 x:px-2.5 x:py-2")}function e7(e){return(0,s.jsxs)(eK,{as:eq.default,value:e,href:e.url,className:e6,children:[(0,s.jsx)("div",{className:"x:text-base x:font-semibold x:leading-5",children:e.title}),(0,s.jsx)("div",{className:(0,e$.default)("x:mt-1 x:text-sm x:leading-[1.35rem] x:text-gray-600 x:dark:text-gray-400 x:contrast-more:dark:text-gray-50","x:[&_mark]:bg-primary-600/80 x:[&_mark]:text-white"),dangerouslySetInnerHTML:{__html:e.excerpt}})]},e.url)}e.s(["Search",0,e=>{let t,n,i,o,r,a,c,d,h,p,m,f,g,v,x,b,S,y,E,O,C,I,w,T,M,R,F,P=(0,l.c)(60);P[0]!==e?({className:t,emptyResult:r,errorText:a,loading:c,placeholder:d,searchOptions:o,onSearch:n,...i}=e,P[0]=e,P[1]=t,P[2]=n,P[3]=i,P[4]=o,P[5]=r,P[6]=a,P[7]=c,P[8]=d):(t=P[1],n=P[2],i=P[3],o=P[4],r=P[5],a=P[6],c=P[7],d=P[8]);let k=void 0===r?"No results found.":r,A=void 0===a?"Failed to load search index.":a,_=void 0===c?"Loading…":c,D=void 0===d?"Search documentation…":d,[z,L]=(0,u.useState)(!0),[j,N]=(0,u.useState)("");P[9]===Symbol.for("react.memo_cache_sentinel")?(h=[],P[9]=h):h=P[9];let[B,W]=(0,u.useState)(h),[V,K]=(0,u.useState)(""),H=(0,u.useDeferredValue)(V);P[10]!==H||P[11]!==o?(p=()=>{(async e=>{if(!e){W([]),N("");return}if(L(!0),!window.pagefind)try{await eX()}catch(e){N(e instanceof Error?`${e.constructor.name}: ${e.message}`:String(e)),L(!1);return}let t=await window.pagefind.debouncedSearch(e,o);if(!t)return;let n=await Promise.all(t.results.map(e1));L(!1),N(""),W(n.map(e2))})(H)},P[10]=H,P[11]=o,P[12]=p):p=P[12],P[13]!==H?(m=[H],P[13]=H,P[14]=m):m=P[14],(0,u.useEffect)(p,m);let $=(0,eZ.useRouter)(),[U,q]=(0,u.useState)(!1),Z=(0,eG.useMounted)(),G=(0,u.useRef)(null);P[15]===Symbol.for("react.memo_cache_sentinel")?(f=()=>{let e=function(e){let t=document.activeElement;!t||eY.has(t.tagName)||t.isContentEditable||("/"===e.key||"k"===e.key&&!e.shiftKey&&(navigator.userAgent.includes("Mac")?e.metaKey:e.ctrlKey))&&(e.preventDefault(),G.current.focus({preventScroll:!0}))};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},g=[],P[15]=f,P[16]=g):(f=P[15],g=P[16]),(0,u.useEffect)(f,g);let J=(!Z||U)&&"x:invisible x:opacity-0";P[17]!==J?(v=(0,e$.default)("x:absolute x:my-1.5 x:select-none x:pointer-events-none x:end-1.5 x:transition-all","x:h-5 x:rounded x:bg-nextra-bg x:px-1.5 x:font-mono x:text-[11px] x:font-medium x:text-gray-600 x:dark:text-gray-400","x:border nextra-border","x:contrast-more:text-current","x:items-center x:gap-1 x:flex","x:max-sm:hidden not-prose",J),P[17]=J,P[18]=v):v=P[18],P[19]!==Z?(x=Z&&navigator.userAgent.includes("Mac")?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"x:text-xs",children:"⌘"}),"K"]}):"CTRL K",P[19]=Z,P[20]=x):x=P[20],P[21]!==v||P[22]!==x?(b=(0,s.jsx)("kbd",{className:v,children:x}),P[21]=v,P[22]=x,P[23]=b):b=P[23];let Q=b;P[24]===Symbol.for("react.memo_cache_sentinel")?(S=e=>{q("focus"===e.type)},P[24]=S):S=P[24];let X=S;P[25]!==n?(y=e=>{let{value:t}=e.currentTarget;K(t),n?.(t)},P[25]=n,P[26]=y):y=P[26];let Y=y;P[27]!==$?(E=e=>{if(!e)return;G.current.blur();let[t,n]=e.url.split("#");location.pathname===t?location.href=`#${n}`:$.push(e.url),K("")},P[27]=$,P[28]=E):E=P[28];let ee=E;return P[29]!==t?(O=(0,e$.default)("nextra-search","x:relative x:flex x:items-center","x:text-gray-900 x:dark:text-gray-300","x:contrast-more:text-gray-800 x:contrast-more:dark:text-gray-300",t),P[29]=t,P[30]=O):O=P[30],P[31]!==Y||P[32]!==D||P[33]!==i||P[34]!==V?(C=(0,s.jsx)(eB,{spellCheck:!1,autoComplete:"off",type:"search",...i,ref:G,className:e3,onChange:Y,onFocus:X,onBlur:X,value:V,placeholder:D}),P[31]=Y,P[32]=D,P[33]=i,P[34]=V,P[35]=C):C=P[35],P[36]!==Q||P[37]!==O||P[38]!==C?(I=(0,s.jsxs)("div",{className:O,children:[C,Q]}),P[36]=Q,P[37]=O,P[38]=C,P[39]=I):I=P[39],P[40]===Symbol.for("react.memo_cache_sentinel")?(w={to:"top end",gap:10,padding:16},P[40]=w):w=P[40],P[41]!==j||P[42]!==z||P[43]!==B?(T=(0,e$.default)("nextra-search-results","nextra-scrollbar x:max-md:h-full","x:border x:border-gray-200 x:text-gray-100 x:dark:border-neutral-800","x:z-30 x:rounded-xl x:py-2.5 x:shadow-xl","x:contrast-more:border x:contrast-more:border-gray-900 x:contrast-more:dark:border-gray-50","x:backdrop-blur-md x:bg-nextra-bg/70","x:motion-reduce:transition-none","x:origin-top x:transition x:duration-200 x:ease-out x:data-closed:scale-95 x:data-closed:opacity-0 x:empty:invisible",j||z||!B.length?["x:md:min-h-28 x:grow x:flex x:justify-center x:text-sm x:gap-2 x:px-8",j?"x:text-red-500 x:items-start":"x:text-gray-400 x:items-center"]:"x:md:max-h-[min(calc(100vh-5rem),400px)]!","x:w-full x:md:w-[576px]"),P[41]=j,P[42]=z,P[43]=B,P[44]=T):T=P[44],P[45]!==H||P[46]!==k||P[47]!==j||P[48]!==A||P[49]!==z||P[50]!==_||P[51]!==B?(M=j?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(eJ,{height:"1.25em",className:"x:shrink-0"}),(0,s.jsxs)("div",{className:"x:grid",children:[(0,s.jsx)("b",{className:"x:mb-2",children:A}),j]})]}):z?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(eQ,{height:"20",className:"x:shrink-0 x:animate-spin"}),_]}):B.length?B.map(e4):H&&k,P[45]=H,P[46]=k,P[47]=j,P[48]=A,P[49]=z,P[50]=_,P[51]=B,P[52]=M):M=P[52],P[53]!==T||P[54]!==M?(R=(0,s.jsx)(eV,{transition:!0,anchor:w,className:T,children:M}),P[53]=T,P[54]=M,P[55]=R):R=P[55],P[56]!==ee||P[57]!==I||P[58]!==R?(F=(0,s.jsxs)(eH,{onChange:ee,children:[I,R]}),P[56]=ee,P[57]=I,P[58]=R,P[59]=F):F=P[59],F},"importPagefind",0,eX],98091)},6344,e=>{"use strict";var t=e.i(43476),n=e.i(81933),i=e.i(18566),o=e.i(68386);e.s(["LastUpdated",0,e=>{let s,l,r,a,u,c=(0,n.c)(15),{date:d,children:h,locale:p}=e,m=void 0===h?"Last updated on":h,f=void 0===p?"en":p,{i18n:g}=(0,o.useThemeConfig)(),v=(0,i.usePathname)();if(!d)return null;c[0]!==g.length||c[1]!==f||c[2]!==v?(s=g.length?v.split("/",2)[1]:f,c[0]=g.length,c[1]=f,c[2]=v,c[3]=s):s=c[3];let x=s;return c[4]!==d?(l=d.toISOString(),c[4]=d,c[5]=l):l=c[5],c[6]!==d||c[7]!==x?(r=d.toLocaleDateString(x,{day:"numeric",month:"long",year:"numeric"}),c[6]=d,c[7]=x,c[8]=r):r=c[8],c[9]!==l||c[10]!==r?(a=(0,t.jsx)("time",{dateTime:l,suppressHydrationWarning:!0,children:r}),c[9]=l,c[10]=r,c[11]=a):a=c[11],c[12]!==m||c[13]!==a?(u=(0,t.jsxs)(t.Fragment,{children:[m," ",a]}),c[12]=m,c[13]=a,c[14]=u):u=c[14],u}])}]);