(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,653356,e=>{"use strict";var t=e.i(942347);let n=t.forwardRef(function(e,n){let{title:o,titleId:i,...s}=e;return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":i},s),o?t.createElement("title",{id:i},o):null,t.createElement("path",{d:"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z"}))});e.s(["XMarkIcon",0,n],653356)},537638,108044,788545,77456,145298,19580,e=>{"use strict";let t,n,o,i;var s=e.i(508757),l=e.i(502611),a=e.i(942347),r=e.i(939050),u=e.i(511299);function c(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}function d(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c;return(0,a.useCallback)((t,n)=>"string"==typeof e?(null==t?void 0:t[e])===(null==n?void 0:n[e]):e(t,n),[e])}e.s(["useByComparator",()=>d],108044);var p=e.i(88206);function h(e,t,n){let[o,i]=(0,a.useState)(n),s=void 0!==e,l=(0,a.useRef)(s),u=(0,a.useRef)(!1),c=(0,a.useRef)(!1);return!s||l.current||u.current?s||!l.current||c.current||(c.current=!0,l.current=s,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,l.current=s,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.")),[s?e:o,(0,p.useEvent)(e=>(s||(0,r.flushSync)(()=>i(e)),null==t?void 0:t(e)))]}function f(e){let[t]=(0,a.useState)(e);return t}e.s(["useControllable",()=>h],788545),e.s(["useDefaultValue",()=>f],77456);var m=e.i(704903),v=e.i(255073),g=e.i(84148),b=e.i(767104),x=e.i(637759),S=e.i(519574),O=e.i(918031),E=e.i(602874),y=e.i(22091),I=e.i(791764),C=e.i(627493),R=e.i(479936),w=e.i(749744),T=e.i(983877),P=e.i(318605),M=e.i(259416),F=e.i(775085),A=e.i(437627),k=e.i(644635);function D(e,t){return e?e+"["+t+"]":t}var L=e.i(360538),j=e.i(340617);let N=(0,a.createContext)(null);function z(e){let{children:t}=e,n=(0,a.useContext)(N);if(!n)return a.default.createElement(a.default.Fragment,null,t);let{target:o}=n;return o?(0,r.createPortal)(a.default.createElement(a.default.Fragment,null,t),o):null}function _(e){let{data:t,form:n,disabled:o,onReset:i,overrides:s}=e,[l,r]=(0,a.useState)(null),u=(0,m.useDisposables)();return(0,a.useEffect)(()=>{if(i&&l)return u.addEventListener(l,"reset",i)},[l,n,i]),a.default.createElement(z,null,a.default.createElement(B,{setForm:r,formId:n}),(function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];for(let[i,s]of Object.entries(t))!function t(n,o,i){if(Array.isArray(i))for(let[e,s]of i.entries())t(n,D(o,e.toString()),s);else i instanceof Date?n.push([o,i.toISOString()]):"boolean"==typeof i?n.push([o,i?"1":"0"]):"string"==typeof i?n.push([o,i]):"number"==typeof i?n.push([o,`${i}`]):null==i?n.push([o,""]):function(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;let t=Object.getPrototypeOf(e);return null===t||null===Object.getPrototypeOf(t)}(i)&&!(0,a.isValidElement)(i)&&e(i,o,n)}(o,D(n,i),s);return o})(t).map(e=>{let[t,i]=e;return a.default.createElement(j.Hidden,{features:j.HiddenFeatures.Hidden,...(0,L.compact)({key:t,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:n,disabled:o,name:t,value:i,...s})})}))}function B(e){let{setForm:t,formId:n}=e;return(0,a.useEffect)(()=>{if(n){let e=document.getElementById(n);e&&t(e)}},[t,n]),n?null:a.default.createElement(j.Hidden,{features:j.HiddenFeatures.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:e=>{if(!e)return;let n=e.closest("form");n&&t(n)}})}e.s(["FormFields",()=>_],145298);let V=a.default.forwardRef(function(e,t){let{children:n,freeze:o}=e,i=K(o,n);return(0,a.isValidElement)(i)?(0,a.cloneElement)(i,{ref:t}):a.default.createElement(a.default.Fragment,null,i)});function K(e,t){let[n,o]=(0,a.useState)(t);return e||n===t||o(t),e?n:t}e.s(["Frozen",()=>V,"useFrozenData",()=>K],19580);var W=e.i(807406),$=e.i(324798),H=e.i(242904),U=e.i(154260),q=e.i(566136),Q=e.i(273293),G=e.i(314608),Z=e.i(278650),X=e.i(621621),J=e.i(64123),Y=e.i(134874),ee=e.i(470045),et=e.i(282595),en=e.i(872116),eo=e.i(857374),ei=e.i(77793),es=Object.defineProperty,el=(e,t,n)=>{let o;return(o="symbol"!=typeof t?t+"":t)in e?es(e,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[o]=n,n},ea=((t=ea||{})[t.Open=0]="Open",t[t.Closed=1]="Closed",t),er=((n=er||{})[n.Single=0]="Single",n[n.Multi=1]="Multi",n),eu=((o=eu||{})[o.Pointer=0]="Pointer",o[o.Other=1]="Other",o),ec=((i=ec||{})[i.OpenListbox=0]="OpenListbox",i[i.CloseListbox=1]="CloseListbox",i[i.GoToOption=2]="GoToOption",i[i.Search=3]="Search",i[i.ClearSearch=4]="ClearSearch",i[i.SelectOption=5]="SelectOption",i[i.RegisterOptions=6]="RegisterOptions",i[i.UnregisterOptions=7]="UnregisterOptions",i[i.SetButtonElement=8]="SetButtonElement",i[i.SetOptionsElement=9]="SetOptionsElement",i[i.SortOptions=10]="SortOptions",i[i.MarkButtonAsMoved=11]="MarkButtonAsMoved",i);function ed(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e,n=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,o=(0,Z.sortByDomNode)(t(e.options.slice()),e=>e.dataRef.current.domRef.current),i=n?o.indexOf(n):null;return -1===i&&(i=null),{options:o,activeOptionIndex:i}}let ep={1(e){if(e.dataRef.current.disabled||1===e.listboxState)return e;let t=e.buttonElement?ei.ElementPositionState.Tracked((0,ei.computeVisualPosition)(e.buttonElement)):e.buttonPositionState;return{...e,activeOptionIndex:null,pendingFocus:{focus:q.Focus.Nothing},listboxState:1,__demoMode:!1,buttonPositionState:t}},0(e,t){if(e.dataRef.current.disabled||0===e.listboxState)return e;let n=e.activeOptionIndex,{isSelected:o}=e.dataRef.current,i=e.options.findIndex(e=>o(e.dataRef.current.value));return -1!==i&&(n=i),{...e,frozenValue:!1,pendingFocus:t.focus,listboxState:0,activeOptionIndex:n,__demoMode:!1,buttonPositionState:ei.ElementPositionState.Idle}},2(e,t){var n,o,i,s,l;if(e.dataRef.current.disabled||1===e.listboxState)return e;let a={...e,searchQuery:"",activationTrigger:null!=(n=t.trigger)?n:1,__demoMode:!1};if(t.focus===q.Focus.Nothing)return{...a,activeOptionIndex:null};if(t.focus===q.Focus.Specific)return{...a,activeOptionIndex:e.options.findIndex(e=>e.id===t.id)};if(t.focus===q.Focus.Previous){let n=e.activeOptionIndex;if(null!==n){let s=e.options[n].dataRef.current.domRef,l=(0,q.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==(o=s.current)?void 0:o.previousElementSibling)===t.current||(null==(i=t.current)?void 0:i.previousElementSibling)===null)return{...a,activeOptionIndex:l}}}}else if(t.focus===q.Focus.Next){let n=e.activeOptionIndex;if(null!==n){let o=e.options[n].dataRef.current.domRef,i=(0,q.calculateActiveIndex)(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==i){let t=e.options[i].dataRef.current.domRef;if((null==(s=o.current)?void 0:s.nextElementSibling)===t.current||(null==(l=t.current)?void 0:l.nextElementSibling)===null)return{...a,activeOptionIndex:i}}}}let r=ed(e),u=(0,q.calculateActiveIndex)(t,{resolveItems:()=>r.options,resolveActiveIndex:()=>r.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...a,...r,activeOptionIndex:u}},3:(e,t)=>{if(e.dataRef.current.disabled||1===e.listboxState)return e;let n=+(""===e.searchQuery),o=e.searchQuery+t.value.toLowerCase(),i=(null!==e.activeOptionIndex?e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n)):e.options).find(e=>{var t;return!e.dataRef.current.disabled&&(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(o))}),s=i?e.options.indexOf(i):-1;return -1===s||s===e.activeOptionIndex?{...e,searchQuery:o}:{...e,searchQuery:o,activeOptionIndex:s,activationTrigger:1}},4:e=>e.dataRef.current.disabled||1===e.listboxState||""===e.searchQuery?e:{...e,searchQuery:""},5:e=>0===e.dataRef.current.mode?{...e,frozenValue:!0}:{...e},6:(e,t)=>{let n=e.options.concat(t.options),o=e.activeOptionIndex;if(e.pendingFocus.focus!==q.Focus.Nothing&&(o=(0,q.calculateActiveIndex)(e.pendingFocus,{resolveItems:()=>n,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=n.findIndex(e=>null==t?void 0:t(e.dataRef.current.value));-1!==e&&(o=e)}}return{...e,options:n,activeOptionIndex:o,pendingFocus:{focus:q.Focus.Nothing},pendingShouldSort:!0}},7:(e,t)=>{let n=e.options,o=[],i=new Set(t.options);for(let[e,t]of n.entries())if(i.has(t.id)&&(o.push(e),i.delete(t.id),0===i.size))break;if(o.length>0)for(let e of(n=n.slice(),o.reverse()))n.splice(e,1);return{...e,options:n,activationTrigger:1}},8:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},9:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element},10:e=>e.pendingShouldSort?{...e,...ed(e),pendingShouldSort:!1}:e,11:e=>"Tracked"!==e.buttonPositionState.kind?e:{...e,buttonPositionState:ei.ElementPositionState.Moved}};class eh extends eo.Machine{constructor(e){super(e),el(this,"actions",{onChange:e=>{let{onChange:t,compare:n,mode:o,value:i}=this.state.dataRef.current;return(0,X.match)(o,{0:()=>null==t?void 0:t(e),1:()=>{let o=i.slice(),s=o.findIndex(t=>n(t,e));return -1===s?o.push(e):o.splice(s,1),null==t?void 0:t(o)}})},registerOption:(0,eo.batch)(()=>{let e=[],t=new Set;return[(n,o)=>{t.has(o)||(t.add(o),e.push({id:n,dataRef:o}))},()=>(t.clear(),this.send({type:6,options:e.splice(0)}))]}),unregisterOption:(0,eo.batch)(()=>{let e=[];return[t=>e.push(t),()=>{this.send({type:7,options:e.splice(0)})}]}),goToOption:(0,eo.batch)(()=>{let e=null;return[(t,n)=>{e={type:2,...t,trigger:n}},()=>e&&this.send(e)]}),closeListbox:()=>{this.send({type:1})},openListbox:e=>{this.send({type:0,focus:e})},selectActiveOption:()=>{var e;if(null!==this.state.activeOptionIndex){let{dataRef:e}=this.state.options[this.state.activeOptionIndex];this.actions.selectOption(e.current.value)}else 0===this.state.dataRef.current.mode&&(this.actions.closeListbox(),null==(e=this.state.buttonElement)||e.focus({preventScroll:!0}))},selectOption:e=>{this.send({type:5,value:e})},search:e=>{this.send({type:3,value:e})},clearSearch:()=>{this.send({type:4})},setButtonElement:e=>{this.send({type:8,element:e})},setOptionsElement:e=>{this.send({type:9,element:e})}}),el(this,"selectors",{activeDescendantId(e){var t;let n=e.activeOptionIndex,o=e.options;return null===n||null==(t=o[n])?void 0:t.id},isActive(e,t){var n;let o=e.activeOptionIndex,i=e.options;return null!==o&&(null==(n=i[o])?void 0:n.id)===t},hasFrozenValue:e=>e.frozenValue,shouldScrollIntoView(e,t){return!e.__demoMode&&0===e.listboxState&&0!==e.activationTrigger&&this.isActive(e,t)},didButtonMove:e=>"Moved"===e.buttonPositionState.kind}),this.on(6,()=>{requestAnimationFrame(()=>{this.send({type:10})})});{let e=this.state.id,t=H.stackMachines.get(null);this.disposables.add(t.on(H.ActionTypes.Push,n=>{t.selectors.isTop(n,e)||0!==this.state.listboxState||this.actions.closeListbox()})),this.on(0,()=>t.actions.push(e)),this.on(1,()=>t.actions.pop(e))}this.disposables.group(e=>{this.on(1,t=>{t.buttonElement&&(e.dispose(),e.add((0,ei.detectMovement)(t.buttonElement,t.buttonPositionState,()=>{this.send({type:11})})))})}),this.on(5,(e,t)=>{var n;this.actions.onChange(t.value),0===this.state.dataRef.current.mode&&(this.actions.closeListbox(),null==(n=this.state.buttonElement)||n.focus({preventScroll:!0}))})}static new(e){let{id:t,__demoMode:n=!1}=e;return new eh({id:t,dataRef:{current:{}},listboxState:+!n,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,buttonElement:null,optionsElement:null,pendingShouldSort:!1,pendingFocus:{focus:q.Focus.Nothing},frozenValue:!1,__demoMode:n,buttonPositionState:ei.ElementPositionState.Idle})}reduce(e,t){return(0,X.match)(t.type,ep,e,t)}}var ef=e.i(196163);let em=(0,a.createContext)(null);function ev(e){let t=(0,a.useContext)(em);if(null===t){let t=Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,eg),t}return t}function eg(e){let{id:t,__demoMode:n=!1}=e,o=(0,a.useMemo)(()=>eh.new({id:t,__demoMode:n}),[]);return(0,ef.useOnUnmount)(()=>o.dispose()),o}let eb=(0,a.createContext)(null);function ex(e){let t=(0,a.useContext)(eb);if(null===t){let t=Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,ex),t}return t}eb.displayName="ListboxDataContext";let eS=a.Fragment,eO=(0,a.createContext)(!1),eE=L.RenderFeatures.RenderStrategy|L.RenderFeatures.Static,ey=a.Fragment,eI=(0,L.forwardRefWithAs)(function(e,t){let n=(0,a.useId)(),o=(0,A.useDisabled)(),{value:i,defaultValue:s,form:l,name:r,onChange:u,by:c,invalid:p=!1,disabled:m=o||!1,horizontal:v=!1,multiple:g=!1,__demoMode:b=!1,...S}=e,O=(0,T.useSyncRefs)(t),y=f(s),[I=g?[]:void 0,C]=h(i,u,y),R=eg({id:n,__demoMode:b}),P=(0,a.useRef)({static:!1,hold:!1}),M=(0,a.useRef)(new Map),F=d(c),D=(0,a.useCallback)(e=>(0,X.match)(j.mode,{[er.Multi]:()=>I.some(t=>F(t,e)),[er.Single]:()=>F(I,e)}),[I]),j=(0,w.useSlot)({value:I,disabled:m,invalid:p,mode:g?er.Multi:er.Single,orientation:v?"horizontal":"vertical",onChange:C,compare:F,isSelected:D,optionsPropsRef:P,listRef:M});(0,x.useIsoMorphicEffect)(()=>{R.state.dataRef.current=j},[j]);let N=(0,U.useSlice)(R,e=>e.listboxState),z=H.stackMachines.get(null),B=(0,U.useSlice)(z,(0,a.useCallback)(e=>z.selectors.isTop(e,n),[z,n])),[V,K]=(0,U.useSlice)(R,e=>[e.buttonElement,e.optionsElement]);(0,E.useOutsideClick)(B,[V,K],(e,t)=>{R.send({type:ec.CloseListbox}),(0,Z.isFocusableElement)(t,Z.FocusableMode.Loose)||(e.preventDefault(),null==V||V.focus())});let W=(0,w.useSlot)({open:N===ea.Open,disabled:m,invalid:p,value:I}),[q,Q]=(0,et.useLabels)({inherit:!0}),G=(0,a.useCallback)(()=>{if(void 0!==y)return null==C?void 0:C(y)},[C,y]),J=(0,L.useRender)();return a.default.createElement(Q,{value:q,props:{htmlFor:null==V?void 0:V.id},slot:{open:N===ea.Open,disabled:m}},a.default.createElement(k.FloatingProvider,null,a.default.createElement(em.Provider,{value:R},a.default.createElement(eb.Provider,{value:j},a.default.createElement($.OpenClosedProvider,{value:(0,X.match)(N,{[ea.Open]:$.State.Open,[ea.Closed]:$.State.Closed})},null!=r&&null!=I&&a.default.createElement(_,{disabled:m,data:{[r]:I},form:l,onReset:G}),J({ourProps:{ref:O},theirProps:S,slot:W,defaultTag:eS,name:"Listbox"}))))))}),eC=(0,L.forwardRefWithAs)(function(e,t){let n=(0,a.useId)(),o=(0,W.useProvidedId)(),i=ex("Listbox.Button"),c=ev("Listbox.Button"),{id:d=o||`headlessui-listbox-button-${n}`,disabled:h=i.disabled||!1,autoFocus:f=!1,...m}=e,v=(0,T.useSyncRefs)(t,(0,k.useFloatingReference)(),c.actions.setButtonElement),b=(0,k.useFloatingReferenceProps)(),[x,S,O]=(0,U.useSlice)(c,e=>[e.listboxState,e.buttonElement,e.optionsElement]),E=x===ea.Open;(0,I.useQuickRelease)(E,{trigger:S,action:(0,a.useCallback)(e=>{if(null!=S&&S.contains(e.target))return I.Action.Ignore;let t=e.target.closest('[role="option"]:not([data-disabled])');return G.isHTMLElement(t)?I.Action.Select(t):null!=O&&O.contains(e.target)?I.Action.Ignore:I.Action.Close},[S,O]),close:c.actions.closeListbox,select:c.actions.selectActiveOption});let y=(0,p.useEvent)(e=>{switch(e.key){case ee.Keys.Enter:!function(e){var t,n;let o=null!=(t=null==e?void 0:e.form)?t:e.closest("form");if(o){for(let t of o.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==(n=o.requestSubmit)||n.call(o)}}(e.currentTarget);break;case ee.Keys.Space:case ee.Keys.ArrowDown:e.preventDefault(),c.actions.openListbox({focus:i.value?q.Focus.Nothing:q.Focus.First});break;case ee.Keys.ArrowUp:e.preventDefault(),c.actions.openListbox({focus:i.value?q.Focus.Nothing:q.Focus.Last})}}),R=(0,p.useEvent)(e=>{e.key===ee.Keys.Space&&e.preventDefault()}),P=(0,g.useHandleToggle)(e=>{var t;c.state.listboxState===ea.Open?((0,r.flushSync)(()=>c.actions.closeListbox()),null==(t=c.state.buttonElement)||t.focus({preventScroll:!0})):(e.preventDefault(),c.actions.openListbox({focus:q.Focus.Nothing}))}),M=(0,p.useEvent)(e=>e.preventDefault()),F=(0,et.useLabelledBy)([d]),A=(0,Y.useDescribedBy)(),{isFocusVisible:D,focusProps:j}=(0,s.useFocusRing)({autoFocus:f}),{isHovered:N,hoverProps:z}=(0,l.useHover)({isDisabled:h}),{pressed:_,pressProps:B}=(0,u.useActivePress)({disabled:h}),V=(0,w.useSlot)({open:x===ea.Open,active:_||x===ea.Open,disabled:h,invalid:i.invalid,value:i.value,hover:N,focus:D,autofocus:f}),K=(0,U.useSlice)(c,e=>e.listboxState===ea.Open),$=(0,L.mergeProps)(b(),{ref:v,id:d,type:(0,C.useResolveButtonType)(e,S),"aria-haspopup":"listbox","aria-controls":null==O?void 0:O.id,"aria-expanded":K,"aria-labelledby":F,"aria-describedby":A,disabled:h||void 0,autoFocus:f,onKeyDown:y,onKeyUp:R,onKeyPress:M},P,j,z,B);return(0,L.useRender)()({ourProps:$,theirProps:m,slot:V,defaultTag:"button",name:"Listbox.Button"})}),eR=et.Label,ew=(0,L.forwardRefWithAs)(function(e,t){let n=(0,a.useId)(),{id:o=`headlessui-listbox-options-${n}`,anchor:i,portal:s=!1,modal:l=!0,transition:u=!1,...c}=e,d=(0,k.useResolvedAnchor)(i),[h,f]=(0,a.useState)(null);d&&(s=!0);let g=ex("Listbox.Options"),x=ev("Listbox.Options"),[S,E,I,C]=(0,U.useSlice)(x,e=>[e.listboxState,e.buttonElement,e.optionsElement,e.__demoMode]),P=(0,y.useOwnerDocument)(E),M=(0,y.useOwnerDocument)(I),A=(0,$.useOpenClosed)(),[D,j]=(0,F.useTransition)(u,h,null!==A?(A&$.State.Open)===$.State.Open:S===ea.Open);(0,O.useOnDisappear)(D,E,x.actions.closeListbox);let N=!C&&l&&S===ea.Open;(0,R.useScrollLock)(N,M);let z=!C&&l&&S===ea.Open;(0,b.useInertOthers)(z,{allowed:(0,a.useCallback)(()=>[E,I],[E,I])});let _=!(0,U.useSlice)(x,x.selectors.didButtonMove)&&D,B=K((0,U.useSlice)(x,x.selectors.hasFrozenValue)&&!e.static,g.value),V=(0,a.useCallback)(e=>g.compare(B,e),[g.compare,B]),W=(0,U.useSlice)(x,e=>{var t;if(null==d||!(null!=(t=null==d?void 0:d.to)&&t.includes("selection")))return null;let n=e.options.findIndex(e=>V(e.dataRef.current.value));return -1===n&&(n=0),n}),H=(()=>{if(null==d)return;if(null===W)return{...d,inner:void 0};let e=Array.from(g.listRef.current.values());return{...d,inner:{listRef:{current:e},index:W}}})(),[Q,G]=(0,k.useFloatingPanel)(H),Y=(0,k.useFloatingPanelProps)(),et=(0,T.useSyncRefs)(t,d?Q:null,x.actions.setOptionsElement,f),eo=(0,m.useDisposables)();(0,a.useEffect)(()=>{I&&S===ea.Open&&((0,J.isActiveElement)(I)||null==I||I.focus({preventScroll:!0}))},[S,I]);let ei=(0,p.useEvent)(e=>{var t;switch(eo.dispose(),e.key){case ee.Keys.Space:if(""!==x.state.searchQuery)return e.preventDefault(),e.stopPropagation(),x.actions.search(e.key);case ee.Keys.Enter:e.preventDefault(),e.stopPropagation(),x.actions.selectActiveOption();break;case(0,X.match)(g.orientation,{vertical:ee.Keys.ArrowDown,horizontal:ee.Keys.ArrowRight}):return e.preventDefault(),e.stopPropagation(),x.actions.goToOption({focus:q.Focus.Next});case(0,X.match)(g.orientation,{vertical:ee.Keys.ArrowUp,horizontal:ee.Keys.ArrowLeft}):return e.preventDefault(),e.stopPropagation(),x.actions.goToOption({focus:q.Focus.Previous});case ee.Keys.Home:case ee.Keys.PageUp:return e.preventDefault(),e.stopPropagation(),x.actions.goToOption({focus:q.Focus.First});case ee.Keys.End:case ee.Keys.PageDown:return e.preventDefault(),e.stopPropagation(),x.actions.goToOption({focus:q.Focus.Last});case ee.Keys.Escape:e.preventDefault(),e.stopPropagation(),(0,r.flushSync)(()=>x.actions.closeListbox()),null==(t=x.state.buttonElement)||t.focus({preventScroll:!0});return;case ee.Keys.Tab:e.preventDefault(),e.stopPropagation(),(0,r.flushSync)(()=>x.actions.closeListbox()),(0,Z.focusFrom)(x.state.buttonElement,e.shiftKey?Z.Focus.Previous:Z.Focus.Next);break;default:1===e.key.length&&(x.actions.search(e.key),eo.setTimeout(()=>x.actions.clearSearch(),350))}}),es=(0,U.useSlice)(x,e=>{var t;return null==(t=e.buttonElement)?void 0:t.id}),el=(0,w.useSlot)({open:S===ea.Open}),eu=(0,L.mergeProps)(d?Y():{},{id:o,ref:et,"aria-activedescendant":(0,U.useSlice)(x,x.selectors.activeDescendantId),"aria-multiselectable":g.mode===er.Multi||void 0,"aria-labelledby":es,"aria-orientation":g.orientation,onKeyDown:ei,role:"listbox",tabIndex:S===ea.Open?0:void 0,style:{...c.style,...G,"--button-width":(0,v.useElementSize)(D,E,!0).width},...(0,F.transitionDataAttributes)(j)}),ec=(0,L.useRender)(),ed=(0,a.useMemo)(()=>g.mode===er.Multi?g:{...g,isSelected:V},[g,V]);return a.default.createElement(en.Portal,{enabled:!!s&&(e.static||D),ownerDocument:P},a.default.createElement(eb.Provider,{value:ed},ec({ourProps:eu,theirProps:c,slot:el,defaultTag:"div",features:eE,visible:_,name:"Listbox.Options"})))}),eT=(0,L.forwardRefWithAs)(function(e,t){let n=(0,a.useId)(),{id:o=`headlessui-listbox-option-${n}`,disabled:i=!1,value:s,...l}=e,r=!0===(0,a.useContext)(eO),u=ex("Listbox.Option"),c=ev("Listbox.Option"),d=(0,U.useSlice)(c,e=>c.selectors.isActive(e,o)),h=u.isSelected(s),f=(0,a.useRef)(null),m=(0,P.useTextValue)(f),v=(0,S.useLatestValue)({disabled:i,value:s,domRef:f,get textValue(){return m()}}),g=(0,T.useSyncRefs)(t,f,e=>{e?u.listRef.current.set(o,e):u.listRef.current.delete(o)}),b=(0,U.useSlice)(c,e=>c.selectors.shouldScrollIntoView(e,o));(0,x.useIsoMorphicEffect)(()=>{if(b)return(0,Q.disposables)().requestAnimationFrame(()=>{var e,t;null==(t=null==(e=f.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})})},[b,f]),(0,x.useIsoMorphicEffect)(()=>{if(!r)return c.actions.registerOption(o,v),()=>c.actions.unregisterOption(o)},[v,o,r]);let O=(0,p.useEvent)(e=>{if(i)return e.preventDefault();c.actions.selectOption(s)}),E=(0,p.useEvent)(()=>{if(i)return c.actions.goToOption({focus:q.Focus.Nothing});c.actions.goToOption({focus:q.Focus.Specific,id:o})}),y=(0,M.useTrackedPointer)(),I=(0,p.useEvent)(e=>y.update(e)),C=(0,p.useEvent)(e=>{y.wasMoved(e)&&(i||d&&c.state.activationTrigger===eu.Pointer||c.actions.goToOption({focus:q.Focus.Specific,id:o},eu.Pointer))}),R=(0,p.useEvent)(e=>{y.wasMoved(e)&&(i||d&&c.state.activationTrigger===eu.Pointer&&c.actions.goToOption({focus:q.Focus.Nothing}))}),F=(0,w.useSlot)({active:d,focus:d,selected:h,disabled:i,selectedOption:h&&r}),A=r?{}:{id:o,ref:g,role:"option",tabIndex:!0===i?void 0:-1,"aria-disabled":!0===i||void 0,"aria-selected":h,disabled:void 0,onClick:O,onFocus:E,onPointerEnter:I,onMouseEnter:I,onPointerMove:C,onMouseMove:C,onPointerLeave:R,onMouseLeave:R},k=(0,L.useRender)();return!h&&r?null:k({ourProps:A,theirProps:l,slot:F,defaultTag:"div",name:"Listbox.Option"})}),eP=Object.assign(eI,{Button:eC,Label:eR,Options:ew,Option:eT,SelectedOption:(0,L.forwardRefWithAs)(function(e,t){let{options:n,placeholder:o,...i}=e,s={ref:(0,T.useSyncRefs)(t)},l=ex("ListboxSelectedOption"),r=(0,w.useSlot)({}),u=void 0===l.value||null===l.value||l.mode===er.Multi&&Array.isArray(l.value)&&0===l.value.length,c=(0,L.useRender)();return a.default.createElement(eO.Provider,{value:!0},c({ourProps:s,theirProps:{...i,children:a.default.createElement(a.default.Fragment,null,o&&u?o:n)},slot:r,defaultTag:ey,name:"ListboxSelectedOption"}))})});e.s(["Listbox",()=>eP,"ListboxButton",()=>eC,"ListboxOption",()=>eT,"ListboxOptions",()=>ew],537638)},299951,516457,e=>{"use strict";let t,n,o,i;var s=e.i(162115),l=e.i(508757),a=e.i(502611),r=e.i(942347),u=e.i(939050);function c(e,t,n){let o,i=n.initialDeps??[],s=!0;function l(){var l,a,r;let u,c;n.key&&(null==(l=n.debug)?void 0:l.call(n))&&(u=Date.now());let d=e();if(!(d.length!==i.length||d.some((e,t)=>i[t]!==e)))return o;if(i=d,n.key&&(null==(a=n.debug)?void 0:a.call(n))&&(c=Date.now()),o=t(...d),n.key&&(null==(r=n.debug)?void 0:r.call(n))){let e=Math.round((Date.now()-u)*100)/100,t=Math.round((Date.now()-c)*100)/100,o=t/16,i=(e,t)=>{for(e=String(e);e.length{i=e},l}function d(e,t){if(void 0!==e)return e;throw Error(`Unexpected undefined${t?`: ${t}`:""}`)}e.i(722428);let p=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},h=e=>e,f=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),o=[];for(let e=t;e<=n;e++)o.push(e);return o},m=(e,t)=>{let n=e.scrollElement;if(!n)return;let o=e.targetWindow;if(!o)return;let i=e=>{let{width:n,height:o}=e;t({width:Math.round(n),height:Math.round(o)})};if(i(p(n)),!o.ResizeObserver)return()=>{};let s=new o.ResizeObserver(t=>{let o=()=>{let e=t[0];if(null==e?void 0:e.borderBoxSize){let t=e.borderBoxSize[0];if(t)return void i({width:t.inlineSize,height:t.blockSize})}i(p(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()});return s.observe(n,{box:"border-box"}),()=>{s.unobserve(n)}},v={passive:!0},g="u"{var n,o;let i,s=e.scrollElement;if(!s)return;let l=e.targetWindow;if(!l)return;let a=0,r=e.options.useScrollendEvent&&g?()=>void 0:(n=()=>{t(a,!1)},o=e.options.isScrollingResetDelay,function(){for(var e=arguments.length,t=Array(e),s=0;sn.apply(this,t),o)}),u=n=>()=>{let{horizontal:o,isRtl:i}=e.options;a=o?s.scrollLeft*(i&&-1||1):s.scrollTop,r(),t(a,n)},c=u(!0),d=u(!1);s.addEventListener("scroll",c,v);let p=e.options.useScrollendEvent&&g;return p&&s.addEventListener("scrollend",d,v),()=>{s.removeEventListener("scroll",c),p&&s.removeEventListener("scrollend",d)}},x=(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"]},S=(e,t,n)=>{var o,i;let{adjustments:s=0,behavior:l}=t;null==(i=null==(o=n.scrollElement)?void 0:o.scrollTo)||i.call(o,{[n.options.horizontal?"left":"top"]:e+s,behavior:l})};class O{constructor(e){var t=this;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=>{let[n,o]=t;void 0===o&&delete e[n]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:h,rangeExtractor:f,onChange:()=>{},measureElement:x,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,n;null==(n=(t=this.options).onChange)||n.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(),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,o=new Map;for(let i=t-1;i>=0;i--){let t=e[i];if(n.has(t.lane))continue;let s=o.get(t.lane);if(null==s||t.end>s.end?o.set(t.lane,t):t.ende.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,this.options.lanes],(e,t,n,o,i,s)=>(void 0!==this.prevLanes&&this.prevLanes!==s&&(this.lanesChangedFlag=!0),this.prevLanes=s,this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:n,getItemKey:o,enabled:i,lanes:s}),{key:!1}),this.getMeasurements=c(()=>[this.getMeasurementOptions(),this.itemSizeCache],(e,t)=>{let{count:n,paddingStart:o,scrollMargin:i,getItemKey:s,enabled:l,lanes:a}=e;if(!l)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(let e of this.laneAssignments.keys())e>=n&&this.laneAssignments.delete(e);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 r=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1);let u=this.measurementsCache.slice(0,r),c=Array(a).fill(void 0);for(let e=0;e1){let e=c[n=r],t=void 0!==e?u[e]:void 0;l=t?t.end+this.options.gap:o+i}else{let t=1===this.options.lanes?u[e-1]:this.getFurthestMeasurement(u,e);l=t?t.end+this.options.gap:o+i,n=t?t.lane:e%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(e,n)}let d=t.get(a),p="number"==typeof d?d:this.options.estimateSize(e),h=l+p;u[e]={index:e,start:l,size:p,end:h,key:a,lane:n},c[n]=e}return this.measurementsCache=u,u},{key:!1,debug:()=>this.options.debug}),this.calculateRange=c(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,o)=>this.range=e.length>0&&t>0?function(e){let{measurements:t,outerSize:n,scrollOffset:o,lanes:i}=e,s=t.length-1;if(t.length<=i)return{startIndex:0,endIndex:s};let l=E(0,s,e=>t[e].start,o),a=l;if(1===i)for(;a1){let e=Array(i).fill(0);for(;ae=0&&r.some(e=>e>=o);){let e=t[l];r[e.lane]=e.start,l--}l=Math.max(0,l-l%i),a=Math.min(s,a+(i-1-a%i))}return{startIndex:l,endIndex:a}}({measurements:e,outerSize:t,scrollOffset:n,lanes:o}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=c(()=>{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,o,i)=>null===o||null===i?[]:e({startIndex:o,endIndex:i,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)),o=Math.max(0,n-t),i=Math.min(this.options.count-1,n+t);return e>=o&&e<=i}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),o=this.elementsCache.get(n);o!==e&&(o&&this.observer.unobserve(o),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 o=this.measurementsCache[e];if(!o)return;let i=t-(this.itemSizeCache.get(o.key)??o.size);0!==i&&((null==(n=this.scrollState)?void 0:n.behavior)!=="smooth"&&(void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(o,i,this):o.start[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let o=0,i=e.length;othis.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(0!==t.length)return d(t[E(0,t.length-1,e=>d(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=function(e,n){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!t.scrollElement)return 0;let i=t.getSize(),s=t.getScrollOffset();return"auto"===n&&(n=e>=s+i?"end":"start"),"center"===n?e+=(o-i)/2:"end"===n&&(e-=i),Math.max(Math.min(t.getMaxScrollOffset(),e),0)},this.getOffsetForIndex=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto";e=Math.max(0,Math.min(e,t.options.count-1));let o=t.getSize(),i=t.getScrollOffset(),s=t.measurementsCache[e];if(!s)return;if("auto"===n)if(s.end>=i+o-t.options.scrollPaddingEnd)n="end";else{if(!(s.start<=i+t.options.scrollPaddingStart))return[i,n];n="start"}if("end"===n&&e===t.options.count-1)return[t.getMaxScrollOffset(),n];let l="end"===n?s.end+t.options.scrollPaddingEnd:s.start-t.options.scrollPaddingStart;return[t.getOffsetForAlignment(l,n,s.size),n]},this.scrollToOffset=function(e){let{align:n="start",behavior:o="auto"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.getOffsetForAlignment(e,n),s=t.now();t.scrollState={index:null,align:n,behavior:o,startedAt:s,lastTargetOffset:i,stableFrames:0},t._scrollToOffset(i,{adjustments:void 0,behavior:o}),t.scheduleScrollReconcile()},this.scrollToIndex=function(e){let{align:n="auto",behavior:o="auto"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=Math.max(0,Math.min(e,t.options.count-1));let i=t.getOffsetForIndex(e,n);if(!i)return;let[s,l]=i,a=t.now();t.scrollState={index:e,align:l,behavior:o,startedAt:a,lastTargetOffset:s,stableFrames:0},t._scrollToOffset(s,{adjustments:void 0,behavior:o}),t.scheduleScrollReconcile()},this.scrollBy=function(e){let{behavior:n="auto"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=t.getScrollOffset()+e,i=t.now();t.scrollState={index:null,align:"start",behavior:n,startedAt:i,lastTargetOffset:o,stableFrames:0},t._scrollToOffset(o,{adjustments:void 0,behavior:n}),t.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),o=n.length-1;for(;o>=0&&e.some(e=>null===e);){let t=n[o];null===e[t.lane]&&(e[t.lane]=t.end),o--}t=Math.max(...e.filter(e=>null!==e))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,t)=>{let{adjustments:n,behavior:o}=t;this.options.scrollToFn(e,{behavior:o,adjustments:n},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 E=(e,t,n,o)=>{for(;e<=t;){let i=(e+t)/2|0,s=n(i);if(so))return i;t=i-1}}return e>0?e-1:0},y="u">typeof document?r.useLayoutEffect:r.useEffect;var I=e.i(511299),C=e.i(108044),R=e.i(788545),w=e.i(77456),T=e.i(704903),P=e.i(255073),M=e.i(88206),F=e.i(84148),A=e.i(767104),k=e.i(637759),D=e.i(519574),L=e.i(918031),j=e.i(602874),N=e.i(22091),z=e.i(791764),_=e.i(314608),B=e.i(64123),V=e.i(650714);function K(e){let t=(0,r.useRef)({value:"",selectionStart:null,selectionEnd:null});return(0,V.useEventListener)(e,"blur",e=>{let n=e.target;_.isHTMLInputElement(n)&&(t.current={value:n.value,selectionStart:n.selectionStart,selectionEnd:n.selectionEnd})}),(0,M.useEvent)(()=>{if(!(0,B.isActiveElement)(e)&&_.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:n,selectionEnd:o}=t.current;null!==n&&null!==o&&e.setSelectionRange(n,o)}t.current={value:"",selectionStart:null,selectionEnd:null}}})}var W=e.i(627493),$=e.i(479936),H=e.i(749744),U=e.i(983877),q=e.i(259416),Q=e.i(775085),G=e.i(617829),Z=e.i(874026),X=e.i(437627),J=e.i(644635),Y=e.i(145298),ee=e.i(19580),et=e.i(807406),en=e.i(324798),eo=e.i(242904),ei=e.i(154260),es=e.i(719600),el=e.i(566136),ea=e.i(273293),er=e.i(621621),eu=e.i(151295),ec=e.i(360538),ed=e.i(134874),ep=e.i(470045),eh=e.i(282595),ef=e.i(484402),em=e.i(872116),ev=e.i(857374),eg=e.i(77793),eb=e.i(278650),ex=Object.defineProperty,eS=(e,t,n)=>{let o;return(o="symbol"!=typeof t?t+"":t)in e?ex(e,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[o]=n,n},eO=((t=eO||{})[t.Open=0]="Open",t[t.Closed=1]="Closed",t),eE=((n=eE||{})[n.Single=0]="Single",n[n.Multi=1]="Multi",n),ey=((o=ey||{})[o.Pointer=0]="Pointer",o[o.Focus=1]="Focus",o[o.Other=2]="Other",o),eI=((i=eI||{})[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[i.MarkInputAsMoved=12]="MarkInputAsMoved",i);function eC(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e,n=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,o=t(e.options.slice()),i=o.length>0&&null!==o[0].dataRef.current.order?o.sort((e,t)=>e.dataRef.current.order-t.dataRef.current.order):(0,eb.sortByDomNode)(o,e=>e.dataRef.current.domRef.current),s=n?i.indexOf(n):null;return -1===s&&(s=null),{options:i,activeOptionIndex:s}}let eR={1(e){var t;if(null!=(t=e.dataRef.current)&&t.disabled||1===e.comboboxState)return e;let n=e.inputElement?eg.ElementPositionState.Tracked((0,eg.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:eg.ElementPositionState.Idle}}return{...e,comboboxState:0,inputPositionState:eg.ElementPositionState.Idle,__demoMode:!1}},3:(e,t)=>e.isTyping===t.isTyping?e:{...e,isTyping:t.isTyping},2(e,t){var n,o,i,s;if(null!=(n=e.dataRef.current)&&n.disabled||e.optionsElement&&!(null!=(o=e.dataRef.current)&&o.optionsPropsRef.current.static)&&1===e.comboboxState)return e;if(e.virtual){let{options:n,disabled:o}=e.virtual,s=t.focus===el.Focus.Specific?t.idx:(0,el.calculateActiveIndex)(t,{resolveItems:()=>n,resolveActiveIndex:()=>{var t,i;return null!=(i=null!=(t=e.activeOptionIndex)?t:n.findIndex(e=>!o(e)))?i:null},resolveDisabled:o,resolveId(){throw Error("Function not implemented.")}}),l=null!=(i=t.trigger)?i:2;return e.activeOptionIndex===s&&e.activationTrigger===l?e:{...e,activeOptionIndex:s,activationTrigger:l,isTyping:!1,__demoMode:!1}}let l=eC(e);if(null===l.activeOptionIndex){let e=l.options.findIndex(e=>!e.dataRef.current.disabled);-1!==e&&(l.activeOptionIndex=e)}let a=t.focus===el.Focus.Specific?t.idx:(0,el.calculateActiveIndex)(t,{resolveItems:()=>l.options,resolveActiveIndex:()=>l.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled}),r=null!=(s=t.trigger)?s:2;return e.activeOptionIndex===a&&e.activationTrigger===r?e:{...e,...l,isTyping:!1,activeOptionIndex:a,activationTrigger:r,__demoMode:!1}},4:(e,t)=>{var n,o,i,s;if(null!=(n=e.dataRef.current)&&n.virtual)return{...e,options:[...e.options,t.payload]};let l=t.payload,a=eC(e,e=>(e.push(l),e));null===e.activeOptionIndex&&null!=(i=(o=e.dataRef.current).isSelected)&&i.call(o,t.payload.dataRef.current.value)&&(a.activeOptionIndex=a.options.indexOf(l));let r={...e,...a,activationTrigger:2};return null!=(s=e.dataRef.current)&&s.__demoMode&&void 0===e.dataRef.current.value&&(r.activeOptionIndex=0),r},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 o=eC(e,e=>{let n=e.findIndex(e=>e.id===t.id);return -1!==n&&e.splice(n,1),e});return{...e,...o,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,o;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 i=e.activeOptionIndex;if(null!==e.activeOptionIndex){let n=t.options.indexOf(e.virtual.options[e.activeOptionIndex]);i=-1!==n?n:null}return{...e,activeOptionIndex:i,virtual:{options:t.options,disabled:null!=(o=t.disabled)?o:()=>!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:eg.ElementPositionState.Moved}};class ew extends ev.Machine{constructor(e){super(e),eS(this,"actions",{onChange:e=>{let{onChange:t,compare:n,mode:o,value:i}=this.state.dataRef.current;return(0,er.match)(o,{0:()=>null==t?void 0:t(e),1:()=>{let o=i.slice(),s=o.findIndex(t=>n(t,e));return -1===s?o.push(e):o.splice(s,1),null==t?void 0:t(o)}})},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})}}),eS(this,"selectors",{activeDescendantId:e=>{var t,n;let o=this.selectors.activeOptionIndex(e);if(null!==o)return e.virtual?null==(n=e.options.find(t=>!t.dataRef.current.disabled&&e.dataRef.current.compare(t.dataRef.current.value,e.virtual.options[o])))?void 0:n.id:null==(t=e.options[o])?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,o=t.findIndex(e=>{var t;return!(null!=(t=null==n?void 0:n(e))&&t)});if(-1!==o)return o}let t=e.options.findIndex(e=>!e.dataRef.current.disabled);if(-1!==t)return t}return e.activeOptionIndex},activeOption:e=>{var t,n;let o=this.selectors.activeOptionIndex(e);return null===o?null:e.virtual?e.virtual.options[null!=o?o:0]:null!=(n=null==(t=e.options[o])?void 0:t.dataRef.current.value)?n:null},isActive:(e,t,n)=>{var o;let i=this.selectors.activeOptionIndex(e);return null!==i&&(e.virtual?i===e.dataRef.current.calculateIndex(t):(null==(o=e.options[i])?void 0:o.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=eo.stackMachines.get(null);this.disposables.add(t.on(eo.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,eg.detectMovement)(t.inputElement,t.inputPositionState,()=>{this.send({type:12})})))})})}static new(e){var t;let{id:n,virtual:o=null,__demoMode:i=!1}=e;return new ew({id:n,dataRef:{current:{}},comboboxState:+!i,isTyping:!1,options:[],virtual:o?{options:o.options,disabled:null!=(t=o.disabled)?t:()=>!1}:null,activeOptionIndex:null,activationTrigger:2,inputElement:null,buttonElement:null,optionsElement:null,__demoMode:i,inputPositionState:eg.ElementPositionState.Idle})}reduce(e,t){return(0,er.match)(t.type,eR,e,t)}}var eT=e.i(196163);let eP=(0,r.createContext)(null);function eM(e){let t=(0,r.useContext)(eP);if(null===t){let t=Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,eF),t}return t}function eF(e){let{id:t,virtual:n=null,__demoMode:o=!1}=e,i=(0,r.useMemo)(()=>ew.new({id:t,virtual:n,__demoMode:o}),[]);return(0,eT.useOnUnmount)(()=>i.dispose()),i}let eA=(0,r.createContext)(null);function ek(e){let t=(0,r.useContext)(eA);if(null===t){let t=Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,ek),t}return t}eA.displayName="ComboboxDataContext";let eD=(0,r.createContext)(null);function eL(e){let t=eM("VirtualProvider"),{options:n}=ek("VirtualProvider").virtual,o=(0,ei.useSlice)(t,e=>e.optionsElement),[i,s]=(0,r.useMemo)(()=>{if(!o)return[0,0];let e=window.getComputedStyle(o);return[parseFloat(e.paddingBlockStart||e.paddingTop),parseFloat(e.paddingBlockEnd||e.paddingBottom)]},[o]),l=function(e){let{useFlushSync:t=!0,...n}=e,o=r.useReducer(()=>({}),{})[1],i={...n,onChange:(e,i)=>{var s;t&&i?(0,u.flushSync)(o):o(),null==(s=n.onChange)||s.call(n,e,i)}},[s]=r.useState(()=>new O(i));return s.setOptions(i),y(()=>s._didMount(),[]),y(()=>s._willUpdate()),s}({observeElementRect:m,observeElementOffset:b,scrollToFn:S,...{enabled:0!==n.length,scrollPaddingStart:i,scrollPaddingEnd:s,count:n.length,estimateSize:()=>40,getScrollElement:()=>t.state.optionsElement,overscan:12}}),[a,c]=(0,r.useState)(0);(0,k.useIsoMorphicEffect)(()=>{c(e=>e+1)},[n]);let d=l.getVirtualItems(),p=(0,ei.useSlice)(t,e=>e.activationTrigger===ey.Pointer),h=(0,ei.useSlice)(t,t.selectors.activeOptionIndex);return 0===d.length?null:r.default.createElement(eD.Provider,{value:l},r.default.createElement("div",{style:{position:"relative",width:"100%",height:`${l.getTotalSize()}px`},ref:e=>{e&&(p||null!==h&&n.length>h&&l.scrollToIndex(h))}},d.map(t=>{var o;return r.default.createElement(r.Fragment,{key:t.key},r.default.cloneElement(null==(o=e.children)?void 0:o.call(e,{...e.slot,option:n[t.index]}),{key:`${a}-${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 ej=r.Fragment,eN=ec.RenderFeatures.RenderStrategy|ec.RenderFeatures.Static,ez=(0,ec.forwardRefWithAs)(function(e,t){let n=(0,r.useId)(),o=(0,X.useDisabled)(),{value:i,defaultValue:s,onChange:l,form:a,name:u,by:c,invalid:d=!1,disabled:p=o||!1,onClose:h,__demoMode:f=!1,multiple:m=!1,immediate:v=!1,virtual:g=null,nullable:b,...x}=e,S=(0,w.useDefaultValue)(s),[O=m?[]:void 0,E]=(0,R.useControllable)(i,l,S),y=eF({id:n,virtual:g,__demoMode:f}),I=(0,r.useRef)({static:!1,hold:!1}),T=(0,C.useByComparator)(c),P=(0,M.useEvent)(e=>g?null===c?g.options.indexOf(e):g.options.findIndex(t=>T(t,e)):y.state.options.findIndex(t=>T(t.dataRef.current.value,e))),F=(0,r.useCallback)(e=>(0,er.match)(L.mode,{[eE.Multi]:()=>O.some(t=>T(t,e)),[eE.Single]:()=>T(O,e)}),[O]),A=(0,ei.useSlice)(y,e=>e.virtual),D=(0,M.useEvent)(()=>null==h?void 0:h()),L=(0,r.useMemo)(()=>({__demoMode:f,immediate:v,optionsPropsRef:I,value:O,defaultValue:S,disabled:p,invalid:d,mode:m?eE.Multi:eE.Single,virtual:g?A:null,onChange:E,isSelected:F,calculateIndex:P,compare:T,onClose:D}),[f,v,I,O,S,p,d,m,g,A,E,F,P,T,D]);(0,k.useIsoMorphicEffect)(()=>{var e;g&&y.send({type:eI.UpdateVirtualConfiguration,options:g.options,disabled:null!=(e=g.disabled)?e:null})},[g,null==g?void 0:g.options,null==g?void 0:g.disabled]),(0,k.useIsoMorphicEffect)(()=>{y.state.dataRef.current=L},[L]);let[N,z,_,B]=(0,ei.useSlice)(y,e=>[e.comboboxState,e.buttonElement,e.inputElement,e.optionsElement]),V=eo.stackMachines.get(null),K=(0,ei.useSlice)(V,(0,r.useCallback)(e=>V.selectors.isTop(e,n),[V,n]));(0,j.useOutsideClick)(K,[z,_,B],()=>y.actions.closeCombobox());let W=(0,ei.useSlice)(y,y.selectors.activeOptionIndex),$=(0,ei.useSlice)(y,y.selectors.activeOption),U=(0,H.useSlot)({open:N===eO.Open,disabled:p,invalid:d,activeIndex:W,activeOption:$,value:O}),[q,Q]=(0,eh.useLabels)(),G=(0,r.useCallback)(()=>{if(void 0!==S)return null==E?void 0:E(S)},[E,S]),Z=(0,ec.useRender)();return r.default.createElement(Q,{value:q,props:{htmlFor:null==_?void 0:_.id},slot:{open:N===eO.Open,disabled:p}},r.default.createElement(J.FloatingProvider,null,r.default.createElement(eA.Provider,{value:L},r.default.createElement(eP.Provider,{value:y},r.default.createElement(en.OpenClosedProvider,{value:(0,er.match)(N,{[eO.Open]:en.State.Open,[eO.Closed]:en.State.Closed})},null!=u&&r.default.createElement(Y.FormFields,{disabled:p,data:null!=O?{[u]:O}:{},form:a,onReset:G}),Z({ourProps:null===t?{}:{ref:t},theirProps:x,slot:U,defaultTag:ej,name:"Combobox"}))))))}),e_=(0,ec.forwardRefWithAs)(function(e,t){let n=eM("Combobox.Button"),o=ek("Combobox.Button"),[i,s]=(0,r.useState)(null),c=(0,U.useSyncRefs)(t,s,n.actions.setButtonElement),d=(0,r.useId)(),{id:p=`headlessui-combobox-button-${d}`,disabled:h=o.disabled||!1,autoFocus:f=!1,...m}=e,[v,g,b]=(0,ei.useSlice)(n,e=>[e.comboboxState,e.inputElement,e.optionsElement]),x=K(g),S=v===eO.Open;(0,z.useQuickRelease)(S,{trigger:i,action:(0,r.useCallback)(e=>{if(null!=i&&i.contains(e.target)||null!=g&&g.contains(e.target))return z.Action.Ignore;let t=e.target.closest('[role="option"]:not([data-disabled])');return _.isHTMLElement(t)?z.Action.Select(t):null!=b&&b.contains(e.target)?z.Action.Ignore:z.Action.Close},[i,g,b]),close:n.actions.closeCombobox,select:n.actions.selectActiveOption});let O=(0,M.useEvent)(e=>{switch(e.key){case ep.Keys.Space:case ep.Keys.Enter:e.preventDefault(),e.stopPropagation(),n.state.comboboxState===eO.Closed&&(0,u.flushSync)(()=>n.actions.openCombobox()),x();return;case ep.Keys.ArrowDown:e.preventDefault(),e.stopPropagation(),n.state.comboboxState===eO.Closed&&((0,u.flushSync)(()=>n.actions.openCombobox()),n.state.dataRef.current.value||n.actions.goToOption({focus:el.Focus.First})),x();return;case ep.Keys.ArrowUp:e.preventDefault(),e.stopPropagation(),n.state.comboboxState===eO.Closed&&((0,u.flushSync)(()=>n.actions.openCombobox()),n.state.dataRef.current.value||n.actions.goToOption({focus:el.Focus.Last})),x();return;case ep.Keys.Escape:if(n.state.comboboxState!==eO.Open)return;e.preventDefault(),n.state.optionsElement&&!o.optionsPropsRef.current.static&&e.stopPropagation(),(0,u.flushSync)(()=>n.actions.closeCombobox()),x();return;default:return}}),E=(0,F.useHandleToggle)(()=>{n.state.comboboxState===eO.Open?n.actions.closeCombobox():n.actions.openCombobox(),x()}),y=(0,eh.useLabelledBy)([p]),{isFocusVisible:C,focusProps:R}=(0,l.useFocusRing)({autoFocus:f}),{isHovered:w,hoverProps:T}=(0,a.useHover)({isDisabled:h}),{pressed:P,pressProps:A}=(0,I.useActivePress)({disabled:h}),k=(0,H.useSlot)({open:v===eO.Open,active:P||v===eO.Open,disabled:h,invalid:o.invalid,value:o.value,hover:w,focus:C}),D=(0,ec.mergeProps)({ref:c,id:p,type:(0,W.useResolveButtonType)(e,i),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":null==b?void 0:b.id,"aria-expanded":v===eO.Open,"aria-labelledby":y,disabled:h||void 0,autoFocus:f,onKeyDown:O},E,R,T,A);return(0,ec.useRender)()({ourProps:D,theirProps:m,slot:k,defaultTag:"button",name:"Combobox.Button"})}),eB=(0,ec.forwardRefWithAs)(function(e,t){var n,o;let i=eM("Combobox.Input"),s=ek("Combobox.Input"),c=(0,r.useId)(),d=(0,et.useProvidedId)(),{id:p=d||`headlessui-combobox-input-${c}`,onChange:h,displayValue:f,disabled:m=s.disabled||!1,autoFocus:v=!1,type:g="text",...b}=e,x=(0,r.useRef)(null),S=(0,U.useSyncRefs)(x,t,(0,J.useFloatingReference)(),i.actions.setInputElement),[O,E]=(0,ei.useSlice)(i,e=>[e.comboboxState,e.isTyping]),y=(0,T.useDisposables)(),I=(0,M.useEvent)(()=>{i.actions.onChange(null),i.state.optionsElement&&(i.state.optionsElement.scrollTop=0),i.actions.goToOption({focus:el.Focus.Nothing})}),C=(0,r.useMemo)(()=>{var e;return"function"==typeof f&&void 0!==s.value?null!=(e=f(s.value))?e:"":"string"==typeof s.value?s.value:""},[s.value,f]);(0,Z.useWatch)((e,t)=>{let[n,o]=e,[s,l]=t;if(i.state.isTyping)return;let a=x.current;a&&((l===eO.Open&&o===eO.Closed||n!==s)&&(a.value=n),requestAnimationFrame(()=>{if(i.state.isTyping||!a||(0,B.isActiveElement)(a))return;let{selectionStart:e,selectionEnd:t}=a;0===Math.abs((null!=t?t:0)-(null!=e?e:0))&&0===e&&a.setSelectionRange(a.value.length,a.value.length)}))},[C,O,E]),(0,Z.useWatch)((e,t)=>{let[n]=e,[o]=t;if(n===eO.Open&&o===eO.Closed){if(i.state.isTyping)return;let e=x.current;if(!e)return;let t=e.value,{selectionStart:n,selectionEnd:o,selectionDirection:s}=e;e.value="",e.value=t,null!==s?e.setSelectionRange(n,o,s):e.setSelectionRange(n,o)}},[O]);let R=(0,r.useRef)(!1),w=(0,M.useEvent)(()=>{R.current=!0}),P=(0,M.useEvent)(()=>{y.nextFrame(()=>{R.current=!1})}),F=(0,M.useEvent)(e=>{switch(i.actions.setIsTyping(!0),e.key){case ep.Keys.Enter:if(i.state.comboboxState!==eO.Open||R.current)return;if(e.preventDefault(),e.stopPropagation(),null===i.selectors.activeOptionIndex(i.state))return void i.actions.closeCombobox();i.actions.selectActiveOption(),s.mode===eE.Single&&i.actions.closeCombobox();break;case ep.Keys.ArrowDown:return e.preventDefault(),e.stopPropagation(),(0,er.match)(i.state.comboboxState,{[eO.Open]:()=>i.actions.goToOption({focus:el.Focus.Next}),[eO.Closed]:()=>i.actions.openCombobox()});case ep.Keys.ArrowUp:return e.preventDefault(),e.stopPropagation(),(0,er.match)(i.state.comboboxState,{[eO.Open]:()=>i.actions.goToOption({focus:el.Focus.Previous}),[eO.Closed]:()=>{(0,u.flushSync)(()=>i.actions.openCombobox()),s.value||i.actions.goToOption({focus:el.Focus.Last})}});case ep.Keys.Home:if(i.state.comboboxState===eO.Closed||e.shiftKey)break;return e.preventDefault(),e.stopPropagation(),i.actions.goToOption({focus:el.Focus.First});case ep.Keys.PageUp:return e.preventDefault(),e.stopPropagation(),i.actions.goToOption({focus:el.Focus.First});case ep.Keys.End:if(i.state.comboboxState===eO.Closed||e.shiftKey)break;return e.preventDefault(),e.stopPropagation(),i.actions.goToOption({focus:el.Focus.Last});case ep.Keys.PageDown:return e.preventDefault(),e.stopPropagation(),i.actions.goToOption({focus:el.Focus.Last});case ep.Keys.Escape:return i.state.comboboxState!==eO.Open?void 0:(e.preventDefault(),i.state.optionsElement&&!s.optionsPropsRef.current.static&&e.stopPropagation(),s.mode===eE.Single&&null===s.value&&I(),i.actions.closeCombobox());case ep.Keys.Tab:if(i.actions.setIsTyping(!1),i.state.comboboxState!==eO.Open)return;s.mode===eE.Single&&i.state.activationTrigger!==ey.Focus&&i.actions.selectActiveOption(),i.actions.closeCombobox()}}),A=(0,M.useEvent)(e=>{null==h||h(e),s.mode===eE.Single&&""===e.target.value&&I(),i.actions.openCombobox()}),k=(0,M.useEvent)(e=>{var t,n,o;let l=null!=(t=e.relatedTarget)?t:es.history.find(t=>t!==e.currentTarget);if(!(null!=(n=i.state.optionsElement)&&n.contains(l))&&!(null!=(o=i.state.buttonElement)&&o.contains(l))&&i.state.comboboxState===eO.Open)return e.preventDefault(),s.mode===eE.Single&&null===s.value&&I(),i.actions.closeCombobox()}),D=(0,M.useEvent)(e=>{var t,n,o;let l=null!=(t=e.relatedTarget)?t:es.history.find(t=>t!==e.currentTarget);null!=(n=i.state.buttonElement)&&n.contains(l)||null!=(o=i.state.optionsElement)&&o.contains(l)||s.disabled||s.immediate&&i.state.comboboxState!==eO.Open&&y.microTask(()=>{(0,u.flushSync)(()=>i.actions.openCombobox()),i.actions.setActivationTrigger(ey.Focus)})}),L=(0,eh.useLabelledBy)(),j=(0,ed.useDescribedBy)(),{isFocused:N,focusProps:z}=(0,l.useFocusRing)({autoFocus:v}),{isHovered:_,hoverProps:V}=(0,a.useHover)({isDisabled:m}),K=(0,ei.useSlice)(i,e=>e.optionsElement),W=(0,H.useSlot)({open:O===eO.Open,disabled:m,invalid:s.invalid,hover:_,focus:N,autofocus:v}),$=(0,ec.mergeProps)({ref:S,id:p,role:"combobox",type:g,"aria-controls":null==K?void 0:K.id,"aria-expanded":O===eO.Open,"aria-activedescendant":(0,ei.useSlice)(i,i.selectors.activeDescendantId),"aria-labelledby":L,"aria-describedby":j,"aria-autocomplete":"list",defaultValue:null!=(o=null!=(n=e.defaultValue)?n:void 0!==s.defaultValue?null==f?void 0:f(s.defaultValue):null)?o:s.defaultValue,disabled:m||void 0,autoFocus:v,onCompositionStart:w,onCompositionEnd:P,onKeyDown:F,onChange:A,onFocus:D,onBlur:k},z,V);return(0,ec.useRender)()({ourProps:$,theirProps:b,slot:W,defaultTag:"input",name:"Combobox.Input"})}),eV=eh.Label,eK=(0,ec.forwardRefWithAs)(function(e,t){var n,o,i;let s=(0,r.useId)(),{id:l=`headlessui-combobox-options-${s}`,hold:a=!1,anchor:u,portal:c=!1,modal:d=!0,transition:p=!1,...h}=e,f=eM("Combobox.Options"),m=ek("Combobox.Options"),v=(0,J.useResolvedAnchor)(u);v&&(c=!0);let[g,b]=(0,J.useFloatingPanel)(v),[x,S]=(0,r.useState)(null),O=(0,J.useFloatingPanelProps)(),E=(0,U.useSyncRefs)(t,v?g:null,f.actions.setOptionsElement,S),[y,I,C,R,w]=(0,ei.useSlice)(f,e=>[e.comboboxState,e.inputElement,e.buttonElement,e.optionsElement,e.activationTrigger]),T=(0,N.useOwnerDocument)(I||C),F=(0,N.useOwnerDocument)(R),D=(0,en.useOpenClosed)(),[j,z]=(0,Q.useTransition)(p,x,null!==D?(D&en.State.Open)===en.State.Open:y===eO.Open);(0,L.useOnDisappear)(j,I,f.actions.closeCombobox);let _=!m.__demoMode&&d&&y===eO.Open;(0,$.useScrollLock)(_,F);let B=!m.__demoMode&&d&&y===eO.Open;(0,A.useInertOthers)(B,{allowed:(0,r.useCallback)(()=>[I,C,R],[I,C,R])});let V=!(0,ei.useSlice)(f,f.selectors.didInputMove)&&j;(0,k.useIsoMorphicEffect)(()=>{var t;m.optionsPropsRef.current.static=null!=(t=e.static)&&t},[m.optionsPropsRef,e.static]),(0,k.useIsoMorphicEffect)(()=>{m.optionsPropsRef.current.hold=a},[m.optionsPropsRef,a]),(0,G.useTreeWalker)(y===eO.Open,{container:R,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,eh.useLabelledBy)([null==C?void 0:C.id]),W=(0,H.useSlot)({open:y===eO.Open,option:void 0}),q=(0,M.useEvent)(()=>{f.actions.setActivationTrigger(ey.Pointer)}),Z=(0,M.useEvent)(e=>{e.preventDefault(),f.actions.setActivationTrigger(ey.Pointer)}),X=(0,ec.mergeProps)(v?O():{},{"aria-labelledby":K,role:"listbox","aria-multiselectable":m.mode===eE.Multi||void 0,id:l,ref:E,style:{...h.style,...b,"--input-width":(0,P.useElementSize)(j,I,!0).width,"--button-width":(0,P.useElementSize)(j,C,!0).width},onWheel:w===ey.Pointer?void 0:q,onMouseDown:Z,...(0,Q.transitionDataAttributes)(z)}),Y=j&&y===eO.Closed&&!e.static,et=(0,ee.useFrozenData)(Y,null==(n=m.virtual)?void 0:n.options),eo=(0,ee.useFrozenData)(Y,m.value),es=(0,r.useCallback)(e=>m.compare(eo,e),[m.compare,eo]),el=(0,r.useMemo)(()=>{if(!m.virtual)return m;if(void 0===et)throw Error("Missing `options` in virtual mode");return et!==m.virtual.options?{...m,virtual:{...m.virtual,options:et}}:m},[m,et,null==(o=m.virtual)?void 0:o.options]);m.virtual&&Object.assign(h,{children:r.default.createElement(eA.Provider,{value:el},r.default.createElement(eL,{slot:W},h.children))});let ea=(0,ec.useRender)(),er=(0,r.useMemo)(()=>m.mode===eE.Multi?m:{...m,isSelected:es},[m,es]);return r.default.createElement(em.Portal,{enabled:!!c&&(e.static||j),ownerDocument:T},r.default.createElement(eA.Provider,{value:er},ea({ourProps:X,theirProps:{...h,children:r.default.createElement(ee.Frozen,{freeze:Y},"function"==typeof h.children?null==(i=h.children)?void 0:i.call(h,W):h.children)},slot:W,defaultTag:"div",features:eN,visible:V,name:"Combobox.Options"})))}),eW=(0,ec.forwardRefWithAs)(function(e,t){var n,o,i;let s=ek("Combobox.Option"),l=eM("Combobox.Option"),a=(0,r.useId)(),{id:u=`headlessui-combobox-option-${a}`,value:c,disabled:d=null!=(i=null==(o=null==(n=s.virtual)?void 0:n.disabled)?void 0:o.call(n,c))&&i,order:p=null,...h}=e,[f]=(0,ei.useSlice)(l,e=>[e.inputElement]),m=K(f),v=(0,ei.useSlice)(l,(0,r.useCallback)(e=>l.selectors.isActive(e,c,u),[c,u])),g=s.isSelected(c),b=(0,r.useRef)(null),x=(0,D.useLatestValue)({disabled:d,value:c,domRef:b,order:p}),S=(0,r.useContext)(eD),O=(0,U.useSyncRefs)(t,b,S?S.measureElement:null),E=(0,M.useEvent)(()=>{l.actions.setIsTyping(!1),l.actions.onChange(c)});(0,k.useIsoMorphicEffect)(()=>l.actions.registerOption(u,x),[x,u]);let y=(0,ei.useSlice)(l,(0,r.useCallback)(e=>l.selectors.shouldScrollIntoView(e,c,u),[c,u]));(0,k.useIsoMorphicEffect)(()=>{if(y)return(0,ea.disposables)().requestAnimationFrame(()=>{var e,t;null==(t=null==(e=b.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})})},[y,b]);let I=(0,M.useEvent)(e=>{e.preventDefault(),e.button===ef.MouseButton.Left&&(d||(E(),(0,eu.isMobile)()||requestAnimationFrame(()=>m()),s.mode===eE.Single&&l.actions.closeCombobox()))}),C=(0,M.useEvent)(()=>{if(d)return l.actions.goToOption({focus:el.Focus.Nothing});let e=s.calculateIndex(c);l.actions.goToOption({focus:el.Focus.Specific,idx:e})}),R=(0,q.useTrackedPointer)(),w=(0,M.useEvent)(e=>R.update(e)),T=(0,M.useEvent)(e=>{if(!R.wasMoved(e)||d||v&&l.state.activationTrigger===ey.Pointer)return;let t=s.calculateIndex(c);l.actions.goToOption({focus:el.Focus.Specific,idx:t},ey.Pointer)}),P=(0,M.useEvent)(e=>{R.wasMoved(e)&&(d||v&&(s.optionsPropsRef.current.hold||l.state.activationTrigger===ey.Pointer&&l.actions.goToOption({focus:el.Focus.Nothing})))}),F=(0,H.useSlot)({active:v,focus:v,selected:g,disabled:d});return(0,ec.useRender)()({ourProps:{id:u,ref:O,role:"option",tabIndex:!0===d?void 0:-1,"aria-disabled":!0===d||void 0,"aria-selected":g,disabled:void 0,onMouseDown:I,onFocus:C,onPointerEnter:w,onMouseEnter:w,onPointerMove:T,onMouseMove:T,onPointerLeave:P,onMouseLeave:P},theirProps:h,slot:F,defaultTag:"div",name:"Combobox.Option"})}),e$=Object.assign(ez,{Input:eB,Button:e_,Label:eV,Options:eK,Option:eW});var eH=e.i(537638);let eU=r.forwardRef(function(e,t){let{title:n,titleId:o,...i}=e;return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":o},i),n?r.createElement("title",{id:o},n):null,r.createElement("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))});e.s(["ChevronDownIcon",0,eU],516457);let eq=r.forwardRef(function(e,t){let{title:n,titleId:o,...i}=e;return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":o},i),n?r.createElement("title",{id:o},n):null,r.createElement("path",{fillRule:"evenodd",d:"M9.47 6.47a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 1 1-1.06 1.06L10 8.06l-3.72 3.72a.75.75 0 0 1-1.06-1.06l4.25-4.25Z",clipRule:"evenodd"}))});var eQ=e.i(653356),eG=e.i(869931);e.i(816688);var eZ=e.i(675066),eX=e.i(391185),eJ=e.i(935139),eY=e.i(500536);let e0=[{value:1,name:"option1"},{value:2,name:"option2"},{value:3,name:"option3"},{value:4,name:"option4"},{value:5,name:"option5"},{value:6,name:"option6"},{value:7,name:"option7"}],e1=e=>{let{className:t,wrapperClassName:n="",renderTrigger:o,items:i=e0,defaultValue:l=1,disabled:a=!1,onSelect:u,onOpenChange:c,placeholder:d,optionWrapClassName:p,optionClassName:h,hideChecked:f,notClearable:m,renderOption:v,isLoading:g=!1}=e,{t:b}=(0,eZ.useTranslation)(),x=d||b("placeholder.select",{ns:"common"}),[S,O]=(0,r.useState)(null);(0,r.useEffect)(()=>{!(S&&i.some(e=>e.value===S.value))&&O(i.find(e=>e.value===l)??null)},[l,i,S]);let E=(0,r.useRef)(null);return(0,s.jsx)(eH.Listbox,{ref:E,value:S,onChange:e=>{a||(O(e),u(e))},children:e=>{let{open:l}=e;return(0,s.jsxs)("div",{className:(0,eJ.cn)("group/simple-select relative h-9",n),children:[o&&(0,s.jsx)(eH.ListboxButton,{className:"w-full",children:o(S,l)}),!o&&(0,s.jsxs)(eH.ListboxButton,{onClick:()=>{c?.(l)},className:(0,eJ.cn)(`flex h-full w-full items-center rounded-lg border-0 bg-components-input-bg-normal pl-3 pr-10 focus-visible:bg-state-base-hover-alt focus-visible:outline-none group-hover/simple-select:bg-state-base-hover-alt sm:text-sm sm:leading-6 ${a?"cursor-not-allowed":"cursor-pointer"}`,t),children:[(0,s.jsx)("span",{className:(0,eJ.cn)("block truncate text-left text-components-input-text-filled system-sm-regular",!S?.name&&"text-components-input-text-placeholder"),children:S?.name??x}),(0,s.jsx)("span",{className:"absolute inset-y-0 right-0 flex items-center pr-2",children:g?(0,s.jsx)(eG.RiLoader4Line,{className:"h-3.5 w-3.5 animate-spin text-text-secondary"}):S&&!m?(0,s.jsx)(eQ.XMarkIcon,{onClick:e=>{e.stopPropagation(),O(null),u({name:"",value:""})},className:"h-4 w-4 cursor-pointer text-text-quaternary","aria-hidden":"false"}):l?(0,s.jsx)(eq,{className:"h-4 w-4 text-text-quaternary group-hover/simple-select:text-text-secondary","aria-hidden":"true"}):(0,s.jsx)(eU,{className:"h-4 w-4 text-text-quaternary group-hover/simple-select:text-text-secondary","aria-hidden":"true"})})]}),!a&&(0,s.jsx)(eH.ListboxOptions,{className:(0,eJ.cn)("absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-xl border-[0.5px] border-components-panel-border bg-components-panel-bg-blur px-1 py-1 text-base shadow-lg backdrop-blur-sm focus:outline-none sm:text-sm",p),children:i.map(e=>e.isGroup?(0,s.jsx)("div",{className:"select-none px-3 py-1.5 text-xs font-medium uppercase tracking-wide text-text-tertiary",children:e.name},e.value):(0,s.jsx)(eH.ListboxOption,{className:(0,eJ.cn)("relative cursor-pointer select-none rounded-lg py-2 pl-3 pr-9 text-text-secondary hover:bg-state-base-hover",h),value:e,disabled:e.disabled||a,children:t=>{let{selected:n}=t;return(0,s.jsx)(s.Fragment,{children:v?v({item:e,selected:n}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:(0,eJ.cn)("block",n&&"font-normal"),children:e.name}),n&&!f&&(0,s.jsx)("span",{className:(0,eJ.cn)("absolute inset-y-0 right-0 flex items-center pr-2 text-text-accent"),children:(0,s.jsx)(eG.RiCheckLine,{className:"h-4 w-4","aria-hidden":"true"})})]})})}},e.value))})]})}})},e5=e=>{let{value:t,onSelect:n,items:o,placeholder:i,installedValue:l,renderTrigger:a,triggerClassName:u,triggerClassNameFn:c,popupClassName:d,popupInnerClassName:p,readonly:h,hideChecked:f}=e,{t:m}=(0,eZ.useTranslation)(),[v,g]=(0,r.useState)(!1),b=i||m("placeholder.select",{ns:"common"}),x=t?o.find(e=>e.value===t):void 0;return(0,s.jsxs)(eX.PortalToFollowElem,{open:v,onOpenChange:g,placement:"bottom-start",offset:4,triggerPopupSameWidth:!0,children:[(0,s.jsx)(eX.PortalToFollowElemTrigger,{onClick:()=>!h&&g(e=>!e),className:"w-full",children:a?a(x):(0,s.jsxs)("div",{className:(0,eJ.cn)(` group flex h-9 items-center justify-between rounded-lg border-0 bg-components-input-bg-normal px-2.5 text-sm hover:bg-state-base-hover-alt ${h?"cursor-not-allowed":"cursor-pointer"} `,u,c?.(v)),title:x?.name,children:[(0,s.jsx)("span",{className:` grow truncate text-text-secondary ${!x?.name&&"text-components-input-text-placeholder"} `,children:x?.name??b}),(0,s.jsx)("div",{className:"mx-0.5",children:!!(l&&x&&x.value!==l)&&(0,s.jsxs)(eY.default,{children:[l," ","->"," ",x.value," "]})}),(0,s.jsx)(eU,{className:"h-4 w-4 shrink-0 text-text-quaternary group-hover:text-text-secondary"})]})}),(0,s.jsx)(eX.PortalToFollowElemContent,{className:`z-20 ${d}`,children:(0,s.jsx)("div",{className:(0,eJ.cn)("max-h-60 overflow-auto rounded-xl border-[0.5px] border-components-panel-border bg-components-panel-bg px-1 py-1 text-base shadow-lg focus:outline-none sm:text-sm",p),children:o.map(e=>(0,s.jsxs)("div",{className:` flex h-9 cursor-pointer items-center justify-between rounded-lg px-2.5 text-text-secondary hover:bg-state-base-hover ${e.value===t&&"bg-state-base-hover"} `,title:e.name,onClick:()=>{n(e),g(!1)},children:[(0,s.jsxs)("span",{className:"w-0 grow truncate",title:e.name,children:[(0,s.jsx)("span",{className:"truncate",children:e.name}),e.value===l&&(0,s.jsx)(eY.default,{uppercase:!0,className:"ml-1 shrink-0",children:"INSTALLED"})]}),!f&&e.value===t&&(0,s.jsx)(eG.RiCheckLine,{className:"h-4 w-4 shrink-0 text-text-accent"}),e.extra]},e.value))})})]})},e2=r.memo(e=>{let{className:t,items:n=e0,defaultValue:o=1,disabled:i=!1,onSelect:l,allowSearch:a=!0,bgClassName:u="bg-components-input-bg-normal",overlayClassName:c,optionClassName:d,renderOption:p}=e,[h,f]=(0,r.useState)(""),[m,v]=(0,r.useState)(!1),[g,b]=(0,r.useState)(null);(0,r.useEffect)(()=>{b(o&&n.find(e=>e.value===o)||null)},[o,n]);let x=""===h?n:n.filter(e=>e.name.toLowerCase().includes(h.toLowerCase()));return(0,s.jsx)(e$,{as:"div",disabled:i,value:g,className:t,onChange:e=>{i||(b(e),v(!1),l(e))},children:(0,s.jsxs)("div",{className:(0,eJ.cn)("relative"),children:[(0,s.jsxs)("div",{className:"group text-text-secondary",children:[a?(0,s.jsx)(eB,{className:`w-full rounded-lg border-0 ${u} py-1.5 pl-3 pr-10 shadow-sm focus-visible:bg-state-base-hover focus-visible:outline-none group-hover:bg-state-base-hover sm:text-sm sm:leading-6 ${i?"cursor-not-allowed":"cursor-pointer"}`,onChange:e=>{i||f(e.target.value)},displayValue:e=>e?.name}):(0,s.jsx)(e_,{onClick:()=>{i||v(!m)},className:(0,eJ.cn)(`flex h-9 w-full items-center rounded-lg border-0 ${u} py-1.5 pl-3 pr-10 shadow-sm focus-visible:bg-state-base-hover focus-visible:outline-none group-hover:bg-state-base-hover sm:text-sm sm:leading-6`,d),children:(0,s.jsx)("div",{className:"w-0 grow truncate text-left",title:g?.name,children:g?.name})}),(0,s.jsx)(e_,{className:"absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none",onClick:()=>{i||v(!m)},children:m?(0,s.jsx)(eq,{className:"h-5 w-5"}):(0,s.jsx)(eU,{className:"h-5 w-5"})})]}),x.length>0&&m&&(0,s.jsx)(eK,{className:`absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md border-[0.5px] border-components-panel-border bg-components-panel-bg-blur px-1 py-1 text-base shadow-lg backdrop-blur-sm focus:outline-none sm:text-sm ${c}`,children:x.map(e=>(0,s.jsx)(eW,{value:e,className:e=>{let{active:t}=e;return(0,eJ.cn)("relative cursor-default select-none rounded-lg py-2 pl-3 pr-9 text-text-secondary hover:bg-state-base-hover",t?"bg-state-base-hover":"",d)},children:t=>{let{selected:n}=t;return(0,s.jsx)(s.Fragment,{children:p?p({item:e,selected:n}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:(0,eJ.cn)("block",n&&"font-normal"),children:e.name}),n&&(0,s.jsx)("span",{className:(0,eJ.cn)("absolute inset-y-0 right-0 flex items-center pr-4 text-text-secondary"),children:(0,s.jsx)(eG.RiCheckLine,{className:"h-4 w-4","aria-hidden":"true"})})]})})}},e.value))})]})})});e.s(["PortalSelect",()=>e5,"SimpleSelect",()=>e1,"default",0,e2],299951)}]);