1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[423],{2189:(e,t,i)=>{i.d(t,{Rt:()=>s});var l=i(14188);function s(e,t){let{rootEl:i,...s}=t||{};e&&i&&(0,l.ZU)(i)&&(i.scrollHeight>i.clientHeight||i.scrollWidth>i.clientWidth)&&e.scrollIntoView(s)}},12641:(e,t,i)=>{i.d(t,{gC:()=>e$,Yq:()=>e1,JK:()=>e6,mP:()=>e0,b3:()=>eQ,eb:()=>eY,h3:()=>eZ,h:()=>eJ,TR:()=>e8,lE:()=>ez,H5:()=>eX,bq:()=>eq,NM:()=>eB});var l=i(88053),s=i(10246),r=i(4793),n=i(80980),[o,a]=(0,n.q)({name:"SelectContext",hookName:"useSelectContext",providerName:"<SelectProvider />"}),d=i(38057),u=i(42115),c=(0,d.forwardRef)((e,t)=>{let i=a(),s=(0,u.v)(i.getClearTriggerProps(),e);return(0,l.jsx)(r.X.button,{...s,ref:t})});c.displayName="SelectClearTrigger";var h=i(18143),g=i(83928),p=i(68360),m=(0,d.forwardRef)((e,t)=>{let i=a(),s=(0,p.c)(),n=(0,u.v)(i.getContentProps(),s.getPresenceProps(),e),o=(0,h.s)(s.ref,t);return(0,l.jsx)(g.d,{presence:s,children:(0,l.jsx)(r.X.div,{...n,ref:o})})});m.displayName="SelectContent";var f=e=>e.children(a()),v=(0,d.forwardRef)((e,t)=>{let i=a(),s=(0,u.v)(i.getControlProps(),e);return(0,l.jsx)(r.X.div,{...s,ref:t})});v.displayName="SelectControl";var I=i(24328),E=(0,d.forwardRef)((e,t)=>{let i=a(),s=(0,u.v)(i.getHiddenSelectProps(),e),n=0===i.value.length,o=(0,I.f)();return(0,l.jsxs)(r.X.select,{"aria-describedby":o?.ariaDescribedby,...s,ref:t,children:[n&&(0,l.jsx)("option",{value:""}),i.collection.items.map((e,t)=>(0,l.jsx)("option",{value:i.collection.getItemValue(e)??"",disabled:i.collection.getItemDisabled(e),children:i.collection.stringifyItem(e)},t))]})});E.displayName="SelectHiddenSelect";var y=(0,d.forwardRef)((e,t)=>{let i=a(),s=(0,u.v)(i.getIndicatorProps(),e);return(0,l.jsx)(r.X.div,{...s,ref:t})});y.displayName="SelectIndicator";var T=i(18532),[O,b]=(0,n.q)({name:"SelectItemContext",hookName:"useSelectItemContext",providerName:"<SelectItemProvider />"}),[C,R]=(0,n.q)({name:"SelectItemPropsContext",hookName:"useSelectItemPropsContext",providerName:"<SelectItemPropsProvider />"}),x=(0,T.P)(),S=(0,d.forwardRef)((e,t)=>{let[i,s]=x(e,["item","persistFocus"]),n=a(),o=(0,u.v)(n.getItemProps(i),s),d=n.getItemState(i);return(0,l.jsx)(C,{value:i,children:(0,l.jsx)(O,{value:d,children:(0,l.jsx)(r.X.div,{...o,ref:t})})})});S.displayName="SelectItem";var L=e=>e.children(b()),[V,P]=(0,n.q)({name:"SelectItemGroupPropsContext",hookName:"useSelectItemGroupPropsContext",providerName:"<SelectItemGroupPropsProvider />"}),k=(0,T.P)(),w=(0,d.forwardRef)((e,t)=>{let i=(0,d.useId)(),[s,n]=k(e,["id"]),o={id:i,...s},c=a(),h=(0,u.v)(c.getItemGroupProps(o),n);return(0,l.jsx)(V,{value:o,children:(0,l.jsx)(r.X.div,{...h,ref:t})})});w.displayName="SelectItemGroup";var G=(0,d.forwardRef)((e,t)=>{let i=a(),s=P(),n=(0,u.v)(i.getItemGroupLabelProps({htmlFor:s.id}),e);return(0,l.jsx)(r.X.div,{...n,ref:t})});G.displayName="SelectItemGroupLabel";var A=(0,d.forwardRef)((e,t)=>{let i=a(),s=R(),n=(0,u.v)(i.getItemIndicatorProps(s),e);return(0,l.jsx)(r.X.div,{...n,ref:t})});A.displayName="SelectItemIndicator";var N=(0,d.forwardRef)((e,t)=>{let i=a(),s=R(),n=(0,u.v)(i.getItemTextProps(s),e);return(0,l.jsx)(r.X.span,{...n,ref:t})});N.displayName="SelectItemText";var H=(0,d.forwardRef)((e,t)=>{let i=a(),s=(0,u.v)(i.getLabelProps(),e);return(0,l.jsx)(r.X.label,{...s,ref:t})});H.displayName="SelectLabel";var F=(0,d.forwardRef)((e,t)=>{let i=a(),s=(0,u.v)(i.getListProps(),e);return(0,l.jsx)(r.X.div,{...s,ref:t})});F.displayName="SelectList";var M=(0,d.forwardRef)((e,t)=>{let i=a(),s=(0,u.v)(i.getPositionerProps(),e);return(0,p.c)().unmounted?null:(0,l.jsx)(r.X.div,{...s,ref:t})});M.displayName="SelectPositioner";var D=i(54880),j=i(60630),_=i(91854),K=i(51584),W=i(58504),U=i(63061),X=i(64978),q=i(24492),z=i(2189),$=i(55225),B=i(4772),Y=i(76179),J=i(13390),Z=i(88346),Q=i(24384),ee=i(6979),et=i(62766),ei=i(98184),el=e=>new ei.J(e);el.empty=()=>new ei.J({items:[]});var es=e=>e.ids?.content??`select:${e.id}:content`,er=e=>e.ids?.trigger??`select:${e.id}:trigger`,en=e=>e.ids?.clearTrigger??`select:${e.id}:clear-trigger`,eo=e=>e.ids?.label??`select:${e.id}:label`,ea=(e,t)=>e.ids?.item?.(t)??`select:${e.id}:option:${t}`,ed=e=>e.ids?.hiddenSelect??`select:${e.id}:select`,eu=e=>e.ids?.positioner??`select:${e.id}:positioner`,ec=(e,t)=>e.ids?.itemGroupLabel?.(t)??`select:${e.id}:optgroup-label:${t}`,eh=e=>e.getById(ed(e)),eg=e=>
1e.getById(es(e)),ep=e=>e.getById(er(e)),em=e=>e.getById(eu(e)),ef=(e,t)=>null==t?null:e.getById(ea(e,t)),{and:ev,not:eI,or:eE}=(0,W.b6)(),ey=(0,W.Op)({props:({props:e})=>({loopFocus:!1,closeOnSelect:!e.multiple,composite:!0,defaultValue:[],...e,collection:e.collection??el.empty(),positioning:{placement:"bottom-start",gutter:8,...e.positioning}}),context({prop:e,bindable:t,getContext:i}){let l=e("value")??e("defaultValue")??[],s=e("collection").findMany(l);return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:Q.n,onChange(t){let l=i(),s=e("collection"),r=l.get("selectedItemMap"),n=(0,et.TZ)({values:t,collection:s,selectedItemMap:r}),o=e("value")??t,a=o===t?n:(0,et.TZ)({values:o,collection:s,selectedItemMap:n.nextSelectedItemMap});return l.set("selectedItemMap",a.nextSelectedItemMap),e("onValueChange")?.({value:t,items:n.selectedItems})}})),highlightedValue:t(()=>({defaultValue:e("defaultHighlightedValue")||null,value:e("highlightedValue"),onChange(t){e("onHighlightChange")?.({highlightedValue:t,highlightedItem:e("collection").find(t),highlightedIndex:e("collection").indexOf(t)})}})),currentPlacement:t(()=>({defaultValue:void 0})),fieldsetDisabled:t(()=>({defaultValue:!1})),highlightedItem:t(()=>({defaultValue:null})),selectedItemMap:t(()=>({defaultValue:(0,et.nk)({selectedItems:s,collection:e("collection")})}))}},refs:()=>({typeahead:{...X.t.defaultOptions}}),computed:{hasSelectedItems:({context:e})=>e.get("value").length>0,isTypingAhead:({refs:e})=>""!==e.get("typeahead").keysSoFar,isDisabled:({prop:e,context:t})=>!!e("disabled")||!!t.get("fieldsetDisabled"),isInteractive:({prop:e})=>!(e("disabled")||e("readOnly")),selectedItems:({context:e,prop:t})=>(0,et.KH)({values:e.get("value"),collection:t("collection"),selectedItemMap:e.get("selectedItemMap")}),valueAsString:({computed:e,prop:t})=>t("collection").stringifyItems(e("selectedItems"))},initialState:({prop:e})=>e("open")||e("defaultOpen")?"open":"idle",entry:["syncSelectElement"],watch({context:e,prop:t,track:i,action:l}){i([()=>e.get("value").toString()],()=>{l(["syncSelectedItems","syncSelectElement","dispatchChangeEvent"])}),i([()=>t("open")],()=>{l(["toggleVisibility"])}),i([()=>e.get("highlightedValue")],()=>{l(["syncHighlightedItem"])}),i([()=>t("collection").toString()],()=>{l(["syncCollection"])})},on:{"HIGHLIGHTED_VALUE.SET":{actions:["setHighlightedItem"]},"HIGHLIGHTED_VALUE.CLEAR":{actions:["clearHighlightedItem"]},"ITEM.SELECT":{actions:["selectItem"]},"ITEM.CLEAR":{actions:["clearItem"]},"VALUE.SET":{actions:["setSelectedItems"]},"VALUE.CLEAR":{actions:["clearSelectedItems"]},"CLEAR.CLICK":{actions:["clearSelectedItems","focusTriggerEl"]}},effects:["trackFormControlState"],states:{idle:{tags:["closed"],on:{"CONTROLLED.OPEN":[{guard:"isTriggerClickEvent",target:"open",actions:["setInitialFocus","highlightFirstSelectedItem"]},{target:"open",actions:["setInitialFocus"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus","highlightFirstSelectedItem"]}],"TRIGGER.FOCUS":{target:"focused"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen"]}]}},focused:{tags:["closed"],on:{"CONTROLLED.OPEN":[{guard:"isTriggerClickEvent",target:"open",actions:["setInitialFocus","highlightFirstSelectedItem"]},{guard:"isTriggerArrowUpEvent",target:"open",actions:["setInitialFocus","highlightComputedLastItem"]},{guard:eE("isTriggerArrowDownEvent","isTriggerEnterEvent"),target:"open",actions:["setInitialFocus","highlightComputedFirstItem"]},{target:"open",actions:["setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen"]}],"TRIGGER.BLUR":{target:"idle"},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightFirstSelectedItem"]}],"TRIGGER.ENTER":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightComputedFirstItem"]}],"TRIGGER.ARROW_UP":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightComputedLastItem"]}],"TRIGGER.ARROW_DOWN":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightComputedFirstItem"]}
1],"TRIGGER.ARROW_LEFT":[{guard:ev(eI("multiple"),"hasSelectedItems"),actions:["selectPreviousItem"]},{guard:eI("multiple"),actions:["selectLastItem"]}],"TRIGGER.ARROW_RIGHT":[{guard:ev(eI("multiple"),"hasSelectedItems"),actions:["selectNextItem"]},{guard:eI("multiple"),actions:["selectFirstItem"]}],"TRIGGER.HOME":{guard:eI("multiple"),actions:["selectFirstItem"]},"TRIGGER.END":{guard:eI("multiple"),actions:["selectLastItem"]},"TRIGGER.TYPEAHEAD":{guard:eI("multiple"),actions:["selectMatchingItem"]}}},open:{tags:["open"],exit:["scrollContentToTop"],effects:["trackDismissableElement","trackFocusVisible","computePlacement","scrollToHighlightedItem"],on:{"CONTROLLED.CLOSE":[{guard:"restoreFocus",target:"focused",actions:["focusTriggerEl","clearHighlightedItem"]},{target:"idle",actions:["clearHighlightedItem"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{guard:"restoreFocus",target:"focused",actions:["invokeOnClose","focusTriggerEl","clearHighlightedItem"]},{target:"idle",actions:["invokeOnClose","clearHighlightedItem"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","clearHighlightedItem"]}],"ITEM.CLICK":[{guard:ev("closeOnSelect","isOpenControlled"),actions:["selectHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectHighlightedItem","invokeOnClose","focusTriggerEl","clearHighlightedItem"]},{actions:["selectHighlightedItem"]}],"CONTENT.HOME":{actions:["highlightFirstItem"]},"CONTENT.END":{actions:["highlightLastItem"]},"CONTENT.ARROW_DOWN":[{guard:ev("hasHighlightedItem","loop","isLastItemHighlighted"),actions:["highlightFirstItem"]},{guard:"hasHighlightedItem",actions:["highlightNextItem"]},{actions:["highlightFirstItem"]}],"CONTENT.ARROW_UP":[{guard:ev("hasHighlightedItem","loop","isFirstItemHighlighted"),actions:["highlightLastItem"]},{guard:"hasHighlightedItem",actions:["highlightPreviousItem"]},{actions:["highlightLastItem"]}],"CONTENT.TYPEAHEAD":{actions:["highlightMatchingItem"]},"ITEM.POINTER_MOVE":{actions:["highlightItem"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedItem"]},"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{loop:({prop:e})=>!!e("loopFocus"),multiple:({prop:e})=>!!e("multiple"),hasSelectedItems:({computed:e})=>!!e("hasSelectedItems"),hasHighlightedItem:({context:e})=>null!=e.get("highlightedValue"),isFirstItemHighlighted:({context:e,prop:t})=>e.get("highlightedValue")===t("collection").firstValue,isLastItemHighlighted:({context:e,prop:t})=>e.get("highlightedValue")===t("collection").lastValue,closeOnSelect:({prop:e,event:t})=>!!(t.closeOnSelect??e("closeOnSelect")),restoreFocus:({event:e})=>eT(e),isOpenControlled:({prop:e})=>void 0!==e("open"),isTriggerClickEvent:({event:e})=>e.previousEvent?.type==="TRIGGER.CLICK",isTriggerEnterEvent:({event:e})=>e.previousEvent?.type==="TRIGGER.ENTER",isTriggerArrowUpEvent:({event:e})=>e.previousEvent?.type==="TRIGGER.ARROW_UP",isTriggerArrowDownEvent:({event:e})=>e.previousEvent?.type==="TRIGGER.ARROW_DOWN"},effects:{trackFocusVisible:({scope:e})=>(0,J.Yy)({root:e.getRootNode?.()}),trackFormControlState:({context:e,scope:t})=>(0,q.$S)(eh(t),{onFieldsetDisabledChange(t){e.set("fieldsetDisabled",t)},onFormReset(){let t=e.initial("value");e.set("value",t)}}),trackDismissableElement({scope:e,send:t,prop:i}){let l=!0;return(0,U.u)(()=>eg(e),{type:"listbox",defer:!0,exclude:[ep(e),e.getById(en(e))],onFocusOutside:i("onFocusOutside"),onPointerDownOutside:i("onPointerDownOutside"),onInteractOutside(e){i("onInteractOutside")?.(e),l=!(e.detail.focusable||e.detail.contextmenu)},onDismiss(){t({type:"CLOSE",src:"interact-outside",restoreFocus:l})}})},computePlacement({context:e,prop:t,scope:i}){let l=t("positioning");return e.set("currentPlacement",l.placement),(0,Z.O)(()=>ep(i),()=>em(i),{defer:!0,...l,onComplete(t){e.set("currentPlacement",t.placement)}})},scrollToHighlightedItem({context:e,prop:t,scope:i}){let l=l=>{let s=e.get("highlightedValue");if(null==s||"pointer"===(0,J.ME)())return;let r=eg(i),n=t("scrollToIndexFn");if(n){let e=t("collection").indexOf(s);n?.({index:e,immediate:l,getElement:()=>ef(i,s)});return}let o=ef(i,s);(0,z.Rt)(o,{rootEl:r,block:"nearest"})};return(0,$.er)(()=>{(0,J.Cl)("virtual"),l(!0)}),(0,B.m)(()=>eg(i),{defer:!0,attributes:["data-activedescendant"],callback(){l(!1)}})}},actions:{reposition({context:e,prop:t,scope:i,event:l}){(0,Z.O)(ep(i),()=>em(i),{...t("positioning"),...l.options,defer:!0,listeners:!1,onComplete(t){e.set("currentPlacement",t.placement)}})},toggleVisibility({send:e,prop:t,event:i}){e({type:t("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:i})},highlightPreviousItem({context:e,prop:t}){let i=e.get("highlightedValue");if(null==i)return;let l=t("collection").getPreviousValue(i,1,t("loopFocus"));null!=l&&e.set("highlightedValue",l)}
1,highlightNextItem({context:e,prop:t}){let i=e.get("highlightedValue");if(null==i)return;let l=t("collection").getNextValue(i,1,t("loopFocus"));null!=l&&e.set("highlightedValue",l)},highlightFirstItem({context:e,prop:t}){let i=t("collection").firstValue;e.set("highlightedValue",i)},highlightLastItem({context:e,prop:t}){let i=t("collection").lastValue;e.set("highlightedValue",i)},setInitialFocus({scope:e}){(0,$.er)(()=>{let t=(0,Y.R)({root:eg(e)});t?.focus({preventScroll:!0})})},focusTriggerEl({event:e,scope:t}){eT(e)&&(0,$.er)(()=>{let e=ep(t);e?.focus({preventScroll:!0})})},selectHighlightedItem({context:e,prop:t,event:i}){let l=i.value??e.get("highlightedValue");null!=l&&t("collection").has(l)&&(t("onSelect")?.({value:l}),l=t("deselectable")&&!t("multiple")&&e.get("value").includes(l)?null:l,e.set("value",e=>null==l?[]:t("multiple")?(0,ee.Xx)(e,l):[l]))},highlightComputedFirstItem({context:e,prop:t,computed:i}){let l=t("collection"),s=i("hasSelectedItems")?l.sort(e.get("value"))[0]:l.firstValue;e.set("highlightedValue",s)},highlightComputedLastItem({context:e,prop:t,computed:i}){let l=t("collection"),s=i("hasSelectedItems")?l.sort(e.get("value"))[0]:l.lastValue;e.set("highlightedValue",s)},highlightFirstSelectedItem({context:e,prop:t,computed:i}){if(!i("hasSelectedItems"))return;let l=t("collection").sort(e.get("value"))[0];e.set("highlightedValue",l)}
1,highlightItem({context:e,event:t}){e.set("highlightedValue",t.value)},highlightMatchingItem({context:e,prop:t,event:i,refs:l}){let s=t("collection").search(i.key,{state:l.get("typeahead"),currentValue:e.get("highlightedValue")});null!=s&&e.set("highlightedValue",s)},setHighlightedItem({context:e,event:t}){e.set("highlightedValue",t.value)},clearHighlightedItem({context:e}){e.set("highlightedValue",null)},selectItem({context:e,prop:t,event:i}){t("onSelect")?.({value:i.value});let l=t("deselectable")&&!t("multiple")&&e.get("value").includes(i.value)?null:i.value;e.set("value",e=>null==l?[]:t("multiple")?(0,ee.Xx)(e,l):[l])},clearItem({context:e,event:t}){e.set("value",e=>e.filter(e=>e!==t.value))},setSelectedItems({context:e,event:t}){e.set("value",t.value)},clearSelectedItems({context:e}){e.set("value",[])},selectPreviousItem({context:e,prop:t}){let[i]=e.get("value"),l=t("collection").getPreviousValue(i);l&&e.set("value",[l])},selectNextItem({context:e,prop:t}){let[i]=e.get("value"),l=t("collection").getNextValue(i);l&&e.set("value",[l])},selectFirstItem({context:e,prop:t}){let i=t("collection").firstValue;i&&e.set("value",[i])},selectLastItem({context:e,prop:t}){let i=t("collection").lastValue;i&&e.set("value",[i])},selectMatchingItem({context:e,prop:t,event:i,refs:l}){let s=t("collection").search(i.key,{state:l.get("typeahead"),currentValue:e.get("value")[0]});null!=s&&e.set("value",[s])},scrollContentToTop({prop:e,scope:t}){if(e("scrollToIndexFn")){let i=e("collection").firstValue;e("scrollToIndexFn")?.({index:0,immediate:!0,getElement:()=>ef(t,i)})}else eg(t)?.scrollTo(0,0)},invokeOnOpen({prop:e,context:t}){e("onOpenChange")?.({open:!0,value:t.get("value")})},invokeOnClose({prop:e,context:t}){e("onOpenChange")?.({open:!1,value:t.get("value")})},syncSelectElement({context:e,prop:t,scope:i}){let l=eh(i);if(l){if(0===e.get("value").length&&!t("multiple")){l.selectedIndex=-1;return}for(let t of l.options)t.selected=e.get("value").includes(t.value)}},syncCollection({context:e,prop:t}){let i=t("collection"),l=i.find(e.get("highlightedValue"));l&&e.set("highlightedItem",l);let s=(0,et.TZ)({values:e.get("value"),collection:i,selectedItemMap:e.get("selectedItemMap")});e.set("selectedItemMap",s.nextSelectedItemMap)},syncSelectedItems({context:e,prop:t}){let i=(0,et.TZ)({values:e.get("value"),collection:t("collection"),selectedItemMap:e.get("selectedItemMap")});e.set("selectedItemMap",i.nextSelectedItemMap)},syncHighlightedItem({context:e,prop:t}){let i=t("collection"),l=e.get("highlightedValue"),s=l?i.find(l):null;e.set("highlightedItem",s)},dispatchChangeEvent({scope:e}){queueMicrotask(()=>{let t=eh(e);if(!t)return;let i=new(e.getWin()).Event("change",{bubbles:!0,composed:!0});t.dispatchEvent((0,q.D_)(i))})}}}});function eT(e){let t=e.restoreFocus??e.previousEvent?.restoreFocus;return null==t||!!t}var eO=i(98477),eb=i(88652),eC=i(69630),eR=i(6778),ex=i(9362),eS=i(30308),eL=i(59203),eV=i(25076),eP=i(56980),ek={clearTriggerLabel:"Clear value"},ew=i(50362),eG=i(21817),eA=(0,d.forwardRef)((e,t)=>{let[i,s]=(0,D.s)(e),[n,a]=(0,T.P)()(s,["closeOnSelect","collection","composite","defaultHighlightedValue","defaultOpen","defaultValue","deselectable","disabled","form","highlightedValue","id","ids","invalid","loopFocus","multiple","name","onFocusOutside","onHighlightChange","onInteractOutside","onOpenChange","onPointerDownOutside","onSelect","onValueChange","open","positioning","readOnly","required","scrollToIndexFn","translations","autoComplete","value"]),c=(e=>{let t=(0,d.useId)(),{dir:i}=(0,K.g)(),{getRootNode:l}=(0,_.w)(),s=(0,I.f)(),r={id:t,ids:{label:s?.ids.label,hiddenSelect:s?.ids.control},disabled:s?.disabled,readOnly:s?.readOnly,invalid:s?.invalid,required:s?.required,dir:i,getRootNode:l,...e};return function(e,t){let{context:i,prop:l,scope:s,state:r,computed:n,send:o}=e,a=(0,eL.QL)(ek,l("translations")),d=l("disabled")||i.get("fieldsetDisabled"),u=!!l("invalid"),c=!!l("required"),h=!!l("readOnly"),g=l("composite"),p=l("collection"),m=r.hasTag("open"),f=r.matches("focused"),v=i.get("highlightedValue"),I=i.get("highlightedItem"),E=n("selectedItems"),y=i.get("currentPlacement"),T=y?(0,ex.bf)(y):void 0,O=n("isTypingAhead"),b=n("isInteractive"),C=v?ea(s,v):void 0;
1function R(e){let t=p.getItemDisabled(e.item),l=p.getItemValue(e.item);return(0,eV.D8)(l,()=>`[zag-js] No value found for item ${JSON.stringify(e.item)}`),{value:l,disabled:!!(d||t),highlighted:v===l,selected:i.get("value").includes(l)}}let x=(0,eS.a)({...l("positioning"),placement:y});return{open:m,focused:f,empty:0===i.get("value").length,highlightedItem:I,highlightedValue:v,selectedItems:E,hasSelectedItems:n("hasSelectedItems"),value:i.get("value"),valueAsString:n("valueAsString"),collection:p,multiple:!!l("multiple"),disabled:!!d,reposition(e={}){o({type:"POSITIONING.SET",options:e})},focus(){ep(s)?.focus({preventScroll:!0})},setOpen(e){r.hasTag("open")!==e&&o({type:e?"OPEN":"CLOSE"})},selectValue(e){o({type:"ITEM.SELECT",value:e})},setValue(e){o({type:"VALUE.SET",value:e})},selectAll(){o({type:"VALUE.SET",value:p.getValues()})},setHighlightValue(e){o({type:"HIGHLIGHTED_VALUE.SET",value:e})},clearHighlightValue(){o({type:"HIGHLIGHTED_VALUE.CLEAR"})},clearValue(e){e?o({type:"ITEM.CLEAR",value:e}):o({type:"VALUE.CLEAR"})},getItemState:R,getRootProps:()=>t.element({...eP.r.root.attrs,dir:l("dir"),id:s.ids?.root??`select:${s.id}`,"data-invalid":(0,eO.sE)(u),"data-readonly":(0,eO.sE)(h)}),getLabelProps:()=>t.label({dir:l("dir"),id:eo(s),...eP.r.label.attrs,"data-disabled":(0,eO.sE)(d),"data-invalid":(0,eO.sE)(u),"data-readonly":(0,eO.sE)(h),"data-required":(0,eO.sE)(c),htmlFor:ed(s),onClick(e){!e.defaultPrevented&&(d||ep(s)?.focus({preventScroll:!0}))}}),getControlProps:()=>t.element({...eP.r.control.attrs,dir:l("dir"),id:s.ids?.control??`select:${s.id}:control`,"data-state":m?"open":"closed","data-focus":(0,eO.sE)(f),"data-disabled":(0,eO.sE)(d),"data-invalid":(0,eO.sE)(u)}),getValueTextProps:()=>t.element({...eP.r.valueText.attrs,dir:l("dir"),"data-disabled":(0,eO.sE)(d),"data-invalid":(0,eO.sE)(u),"data-focus":(0,eO.sE)(f)}),getTriggerProps:()=>t.button({id:er(s),disabled:d,dir:l("dir"),type:"button",role:"combobox","aria-controls":es(s),"aria-expanded":m,"aria-haspopup":"listbox","data-state":m?"open":"closed","aria-invalid":u,"aria-required":c,"aria-labelledby":eo(s),...eP.r.trigger.attrs,"data-disabled":(0,eO.sE)(d),"data-invalid":(0,eO.sE)(u),"data-readonly":(0,eO.sE)(h),"data-placement":y,"data-side":T,"data-placeholder-shown":(0,eO.sE)(!n("hasSelectedItems")),onClick(e){b&&(e.defaultPrevented||o({type:"TRIGGER.CLICK"}))},onFocus(){o({type:"TRIGGER.FOCUS"})},onBlur(){o({type:"TRIGGER.BLUR"})},onKeyDown(e){if(e.defaultPrevented||!b)return;let t={ArrowUp(){o({type:"TRIGGER.ARROW_UP"})},ArrowDown(e){o({type:e.altKey?"OPEN":"TRIGGER.ARROW_DOWN"})},ArrowLeft(){o({type:"TRIGGER.ARROW_LEFT"})},ArrowRight(){o({type:"TRIGGER.ARROW_RIGHT"})},Home(){o({type:"TRIGGER.HOME"})},End(){o({type:"TRIGGER.END"})},Enter(){o({type:"TRIGGER.ENTER"})},Space(e){O?o({type:"TRIGGER.TYPEAHEAD",key:e.key}):o({type:"TRIGGER.ENTER"})}}[(0,eb.K)(e,{dir:l("dir"),orientation:"vertical"})];if(t){t(e),e.preventDefault();return}X.t.isValidEvent(e)&&(o({type:"TRIGGER.TYPEAHEAD",key:e.key}),e.preventDefault())}}),getIndicatorProps:()=>t.element({...eP.r.indicator.attrs,dir:l("dir"),"aria-hidden":!0,"data-state":m?"open":"closed","data-disabled":(0,eO.sE)(d),"data-invalid":(0,eO.sE)(u),"data-readonly":(0,eO.sE)(h)}),getItemProps(e){let i=R(e);return t.element({id:ea(s,i.value),role:"option",...eP.r.item.attrs,dir:l("dir"),"data-value":i.value,"aria-selected":i.selected,"data-state":i.selected?"checked":"unchecked","data-highlighted":(0,eO.sE)(i.highlighted),"data-disabled":(0,eO.sE)(i.disabled),"aria-disabled":(0,eO.rq)(i.disabled),onPointerMove(e){i.disabled||"mouse"!==e.pointerType||"pointer"!==(0,J.ME)()||i.value!==v&&o({type:"ITEM.POINTER_MOVE",value:i.value})},onClick(e){!e.defaultPrevented&&(i.disabled||o({type:"ITEM.CLICK",src:"pointerup",value:i.value}))},onPointerLeave(t){i.disabled||e.persistFocus||"mouse"!==t.pointerType||"pointer"===(0,J.ME)()&&o({type:"ITEM.POINTER_LEAVE"})}})},getItemTextProps(e){let i=R(e);return t.element({...eP.r.itemText.attrs,"data-state":i.selected?"checked":"unchecked","data-disabled":(0,eO.sE)(i.disabled),"data-highlighted":(0,eO.sE)(i.highlighted)})},getItemIndicatorProps(e){let i=R(e);return t.element({"aria-hidden":!0,...eP.r.itemIndicator.attrs,"data-state":i.selected?"checked":"unchecked",hidden:!i.selected})},getItemGroupLabelProps(e){let{htmlFor:i}=e;return t.element({...eP.r.itemGroupLabel.attrs,id:ec(s,i),dir:l("dir"),role:"presentation"})},getItemGroupProps(e){let{id:i}=e;return t.element({...eP.r.itemGroup.attrs,"data-disabled":(0,eO.sE)(d),id:s.ids?.itemGroup?.(i)??`select:${s.id}:optgroup:${i}`,"aria-labelledby":ec(s,i),role:"group",dir:l("dir")})},getClearTriggerProps:()=>t.button({...eP.r.clearTrigger.attrs,id:en(s),type:"button","aria-label":a.clearTriggerLabel,"data-invalid":(0,eO.sE)(u),disabled:d,hidden:!n("hasSelectedItems"),dir:l("dir"),onClick(e){e.defaultPrevented||o({type:"CLEAR.CLICK"})}}),getHiddenSelectProps(){let e=i.get("value"),r=l("multiple")?e:e?.[0],n=e=>{let t,i=(0,eb.mK)(e);(0,q.Aj)(i)||o({type:"VALUE.SET",value:(t=e.currentTarget).multiple?Array.from(t.selectedOptions,e=>e.value):t.value?[t.value]:[]})};return t.select({name:l("name"),form:l("form"),disabled:d,multiple:l("multiple"),required:l("required"),"aria-hidden":!0,id:ed(s),defaultValue:r,style:eC.f,tabIndex:-1,autoComplete:l("autoComplete"),onChange:n,onInput:n,onFocus(){ep(s)?.focu
1s({preventScroll:!0})},"aria-labelledby":eo(s)})},getPositionerProps:()=>t.element({...eP.r.positioner.attrs,dir:l("dir"),id:eu(s),style:x.floating}),getContentProps:()=>t.element({hidden:!m,dir:l("dir"),id:es(s),role:g?"listbox":"dialog",...eP.r.content.attrs,"data-state":m?"open":"closed","data-placement":y,"data-side":T,"data-activedescendant":C,"aria-activedescendant":g?C:void 0,"aria-multiselectable":!!l("multiple")&&!!g||void 0,"aria-labelledby":eo(s),tabIndex:0,onKeyDown(e){if(!b||!(0,eR.gR)(e.currentTarget,(0,eb.wt)(e)))return;if("Tab"===e.key&&!(0,Y.K)(e))return void e.preventDefault();let t={ArrowUp(){o({type:"CONTENT.ARROW_UP"})},ArrowDown(){o({type:"CONTENT.ARROW_DOWN"})},Home(){o({type:"CONTENT.HOME"})},End(){o({type:"CONTENT.END"})},Enter(){o({type:"ITEM.CLICK",src:"keydown.enter"})},Space(e){O?o({type:"CONTENT.TYPEAHEAD",key:e.key}):t.Enter?.(e)}},i=t[(0,eb.K)(e)];if(i){i(e),e.preventDefault();return}let l=(0,eb.wt)(e);!(0,eR.fg)(l)&&X.t.isValidEvent(e)&&(o({type:"CONTENT.TYPEAHEAD",key:e.key}),e.preventDefault())}}),getListProps:()=>t.element({...eP.r.list.attrs,tabIndex:0,role:g?void 0:"listbox","aria-labelledby":er(s),"aria-activedescendant":g?void 0:C,"aria-multiselectable":!!(!g&&l("multiple"))||void 0})}}((0,ew.z)(ey,r),eG._)})(n),h=(0,j.x)((0,u.v)({present:c.open},i)),g=(0,u.v)(c.getRootProps(),a);return(0,l.jsx)(o,{value:c,children:(0,l.jsx)(p.j,{value:h,children:(0,l.jsx)(r.X.div,{...g,ref:t})})})}),eN=(0,d.forwardRef)((e,t)=>{let[i,s]=(0,D.s)(e),[{value:n},a]=(0,T.P)()(s,["value"]),d=(0,j.x)((0,u.v)({present:n.open},i)),c=(0,u.v)(n.getRootProps(),a);return(0,l.jsx)(o,{value:n,children:(0,l.jsx)(p.j,{value:d,children:(0,l.jsx)(r.X.div,{...c,ref:t})})})}),eH=(0,d.forwardRef)((e,t)=>{let i=a(),s=(0,u.v)(i.getTriggerProps(),e);return(0,l.jsx)(r.X.button,{...s,ref:t})});eH.displayName="SelectTrigger";var eF=(0,d.forwardRef)((e,t)=>{let{children:i,placeholder:s,...n}=e,o=a(),d=(0,u.v)(o.getValueTextProps(),n);return(0,l.jsx)(r.X.span,{...d,ref:t,children:i||o.valueAsString||s})});eF.displayName="SelectValueText";var eM=(0,s.I)({ClearTrigger:()=>c,Content:()=>m,Context:()=>f,Control:()=>v,HiddenSelect:()=>E,Indicator:()=>y,Item:()=>S,ItemContext:()=>L,ItemGroup:()=>w,ItemGroupLabel:()=>G,ItemIndicator:()=>A,ItemText:()=>N,Label:()=>H,List:()=>F,Positioner:()=>M,Root:()=>eA,RootProvider:()=>eN,Trigger:()=>eH,ValueText:()=>eF}),eD=i(80577),ej=i(9006);let{withProvider:e_,withContext:eK,useStyles:eW,PropsProvider:eU}=(0,eD.c)({key:"select"});e_(eM.RootProvider,"root",{forwardAsChild:!0});let eX=e_(eM.Root,"root",{forwardAsChild:!0,defaultProps:{positioning:{sameWidth:!0}}}),eq=eK(eM.Trigger,"trigger",{forwardAsChild:!0}),ez=eK(eM.Positioner,"positioner",{forwardAsChild:!0}),e$=eK(eM.Content,"content",{forwardAsChild:!0});eK(eM.List,"list",{forwardAsChild:!0});let eB=eK(eM.ValueText,"valueText",{forwardAsChild:!0});eK(eM.ClearTrigger,"clearTrigger",{forwardAsChild:!0,defaultProps:{children:(0,l.jsx)(ej.US,{boxSize:"1em"})}}),eK(eM.ItemGroup,"itemGroup",{forwardAsChild:!0}),eK(eM.ItemGroupLabel,"itemGroupLabel",{forwardAsChild:!0});let eY=eK(eM.Item,"item",{forwardAsChild:!0}),eJ=eK(eM.ItemText,"itemText",{forwardAsChild:!0}),eZ=eK(eM.ItemIndicator,"itemIndicator",{forwardAsChild:!0,defaultProps:{children:(0,l.jsx)(ej.Sr,{})}}),eQ=eK("div","indicatorGroup"),e0=eK(eM.Indicator,"indicator",{forwardAsChild:!0,defaultProps:{children:(0,l.jsx)(ej.D3,{})}}),e1=eK(eM.Control,"control",{forwardAsChild:!0}),e8=eK(eM.Label,"label",{forwardAsChild:!0});eM.Context;let e6=eM.HiddenSelect;eM.ItemContext},13390:(e,t,i)=>{i.d(t,{Cl:()=>O,ME:()=>T,Yy:()=>C,pP:()=>b});var l=i(20611),s=i(88652),r=i(6778),n=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),o=null,a=new Set,d=new Map,u=!1,c=null,h=!1,g=null,p={Tab:!0,Escape:!0};function m(e,t){for(let i of a)i(e,t)}function f(e){c=null,u=!0,e.metaKey||!(0,l.cX)()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(o="keyboard",m("keyboard",e))}function v(e){("pointermove"!==e.type&&"mousemove"!==e.type||g?.x!==e.clientX||g?.y!==e.clientY)&&(g={x:e.clientX,y:e.clientY}
1,o="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(c=null,u=!0,m("pointer",e)))}function I(e){if((0,s.YF)(e)){c=null,u=!0,o="virtual";return}c=null;let t=(0,s.wt)(e),i=t?.closest("label"),l=i?.control;if(!i||!l||l.matches(":disabled"))return;let n=t?.closest("a[href],audio[controls],button,details,embed,iframe,img[controls],img[usemap],input,select,textarea,video[controls]");n&&i.contains(n)&&n!==l||l!==(0,r.bq)(i.ownerDocument)&&(c=l)}function E(e){let t=(0,s.wt)(e),i=t===c;t!==(0,r.zk)(t)&&t!==(0,r.YE)(t)&&e.isTrusted&&(u||i||h||(o="virtual",m("virtual",e)),u=!1,c=null,h=!1)}function y(){u=!1,c=null,h=!0}function T(){return o}function O(e){o=e,m(e,null)}function b(){return"keyboard"===o||"virtual"===o}function C(e={}){let{isTextInput:t,autoFocus:i,onChange:l,root:c}=e;!function(e){if("undefined"==typeof window||d.get((0,r.zk)(e)))return;let t=(0,r.zk)(e),i=(0,r.YE)(e),l=t.HTMLElement.prototype.focus;try{Object.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,value:function(){u=!0,l.apply(this,arguments)}})}catch{}i.addEventListener("keydown",f,!0),i.addEventListener("keyup",f,!0),i.addEventListener("click",I,!0),t.addEventListener("focus",E,!0),t.addEventListener("blur",y,!1),void 0!==t.PointerEvent?(i.addEventListener("pointerdown",v,!0),i.addEventListener("pointermove",v,!0),i.addEventListener("pointerup",v,!0)):(i.addEventListener("mousedown",v,!0),i.addEventListener("mousemove",v,!0),i.addEventListener("mouseup",v,!0)),t.addEventListener("beforeunload",()=>{((e,t)=>{let i=(0,r.zk)(e),l=(0,r.YE)(e);t&&l.removeEventListener("DOMContentLoaded",t);let s=d.get(i);if(s){try{Object.defineProperty(i.HTMLElement.prototype,"focus",{configurable:!0,value:s.focus})}catch{}l.removeEventListener("keydown",f,!0),l.removeEventListener("keyup",f,!0),l.removeEventListener("click",I,!0),i.removeEventListener("focus",E,!0),i.removeEventListener("blur",y,!1),void 0!==i.PointerEvent?(l.removeEventListener("pointerdown",v,!0),l.removeEventListener("pointermove",v,!0),l.removeEventListener("pointerup",v,!0)):(l.removeEventListener("mousedown",v,!0),l.removeEventListener("mousemove",v,!0),l.removeEventListener("mouseup",v,!0)),d.delete(i)}})(e)},{once:!0}),d.set(t,{focus:l})}(c),l?.({isFocusVisible:i||b(),modality:o});let h=(e,i)=>{(function(e,t,i){let l=i?(0,s.wt)(i):null,o=(0,r.YE)(l),a=(0,r.zk)(l),d=(0,r.bq)(o);return!((e=e||d instanceof a.HTMLInputElement&&!n.has(d?.type)||d instanceof a.HTMLTextAreaElement||d instanceof a.HTMLElement&&d.isContentEditable)&&"keyboard"===t&&i instanceof a.KeyboardEvent&&!Reflect.has(p,i.key))})(!!t,e,i)&&l?.({isFocusVisible:b(),modality:e})};return a.add(h),()=>{a.delete(h)}}},24492:(e,t,i)=>{i.d(t,{$S:()=>n,Aj:()=>a,D_:()=>d,_T:()=>s,uf:()=>r});var l=i(6778);function s(e,t){if(!e)return;let i=function(e,t){let{type:i="HTMLInputElement",property:s="value"}=t;return Object.getOwnPropertyDescriptor((0,l.zk)(e)[i].prototype,s)??{}}(e,{type:"HTMLInputElement",property:"checked"});i.set?.call(e,t),t?e.setAttribute("checked",""):e.removeAttribute("checked")}function r(e,t){let{checked:i,bubbles:r=!0}=t;if(!e)return;let n=(0,l.zk)(e);if(!(e instanceof n.HTMLInputElement))return;s(e,i);let o=new n.Event("click",{bubbles:r});e.dispatchEvent(d(o))}function n(e,t){if(!e)return;let{onFieldsetDisabledChange:i,onFormReset:s}=t,r=[function(e,t){if(!e)return;let i=e.matches("textarea, input, select, button")?e.form:e.closest("form"),l=e=>{e.defaultPrevented||t()};return i?.addEventListener("reset",l,{passive:!0}),()=>i?.removeEventListener("reset",l)}(e,s),function(e,t){let i=e?.closest("fieldset");if(!i)return;t(i.disabled);let s=new((0,l.zk)(i)).MutationObserver(()=>t(i.disabled));return s.observe(i,{attributes:!0,attributeFilter:["disabled"]}),()=>s.disconnect()}(e,i)];return()=>r.forEach(e=>e?.())}var o=Symbol.for("zag.changeEvent");function a(e){return Object.prototype.hasOwnProperty.call(e,o)}function d(e){return a(e)||Object.defineProperty(e,o,{value:!0}),e}},62766:(e,t,i)=>{function l({values:e,collection:t,selectedItemMap:i}){let l=[];for(let s of e){let e=t.find(s)??i.get(s);null!=e&&l.push(e)}return l}function s({selectedItemMap:e,values:t,selectedItems:i,collection:l}){let s=new Map(e);
1for(let e of i){let t=l.getItemValue(e);null!=t&&s.set(t,e)}let r=new Set(t);for(let e of s.keys())r.has(e)||s.delete(e);return s}function r({values:e,collection:t,selectedItemMap:i}){let r=l({values:e,collection:t,selectedItemMap:i}),n=s({selectedItemMap:i,values:e,selectedItems:r,collection:t});return{selectedItems:r,nextSelectedItemMap:n}}function n({selectedItems:e,collection:t}){return s({selectedItemMap:new Map,values:e.map(e=>t.getItemValue(e)).filter(Boolean),selectedItems:e,collection:t})}i.d(t,{KH:()=>l,TZ:()=>r,nk:()=>n})},64978:(e,t,i)=>{i.d(t,{t:()=>r});var l=i(2124),s=i(98477),r=Object.assign(function(e,t){let{state:i,activeId:r,key:n,timeout:o=350,itemToId:a}=t,d=i.keysSoFar+n,u=d.length>1&&Array.from(d).every(e=>e===d[0])?d[0]:d,c=function(e,t,i,r=l.p_){let n=i?(0,l.hJ)(e,i,r):-1,o=i?(0,s.LV)(e,n):e;return 1===t.length&&(o=o.filter(e=>r(e)!==i)),o.find(e=>{let i;return i=(e.dataset?.valuetext??e.textContent??"").split("").map(e=>{let t=e.charCodeAt(0);return t>0&&t<128?e:t>=128&&t<=255?`/x${t.toString(16)}`.replace("/","\\"):""}).join("").trim(),i.trim().toLowerCase().startsWith(t.toLowerCase())})}(e.slice(),u,r,a);function h(){clearTimeout(i.timer),i.timer=-1}return!function e(t){i.keysSoFar=t,h(),""!==t&&(i.timer=+setTimeout(()=>{e(""),h()},o))}(d),c},{defaultOptions:{keysSoFar:"",timer:-1},isValidEvent:function(e){return 1===e.key.length&&!e.ctrlKey&&!e.metaKey}})},69630:(e,t,i)=>{i.d(t,{f:()=>l});var l={border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},75645:(e,t,i)=>{i.d(t,{R:()=>s});var l=i(98184),s=e=>new l.J(e)},90463:(e,t,i)=>{i.d(t,{I:()=>n});var l=i(6778),s=i(20611),r=i(55225);function n(e){let t=()=>{let t=(0,l.zk)(e);e.dispatchEvent(new t.MouseEvent("click"))};(0,s.gm)()?(0,r.nz)(e,"keyup",t):queueMicrotask(t)}},98184:(e,t,i)=>{i.d(t,{J:()=>a});var l=Object.defineProperty,s=(e,t,i)=>((e,t,i)=>t in e?l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i)(e,"symbol"!=typeof t?t+"":t,i),r=i(48291),n=i(24384),o={itemToValue:e=>"string"==typeof e?e:(0,r.Gv)(e)&&(0,r.cK)(e,"value")?e.value:"",itemToString:e=>"string"==typeof e?e:(0,r.Gv)(e)&&(0,r.cK)(e,"label")?e.label:o.itemToValue(e),isItemDisabled:e=>!!((0,r.Gv)(e)&&(0,r.cK)(e,"disabled"))&&!!e.disabled},a=class e{constructor(t){s(this,"options",t),s(this,"items"),s(this,"indexMap",null),s(this,"copy",t=>new e({...this.options,items:t??[...this.items]})),s(this,"isEqual",e=>(0,n.n)(this.items,e.items)),s(this,"setItems",e=>this.copy(e)),s(this,"getValues",(e=this.items)=>{let t=[];for(let i of e){let e=this.getItemValue(i);null!=e&&t.push(e)}return t}),s(this,"find",e=>{if(null==e)return null;let t=this.indexOf(e);return -1!==t?this.at(t):null}),s(this,"findMany",e=>{let t=[];for(let i of e){let e=this.find(i);null!=e&&t.push(e)}return t}),s(this,"at",e=>{if(!this.options.groupBy&&!this.options.groupSort)return this.items[e]??null;let t=0;for(let[,i]of this.group())for(let l of i){if(t===e)return l;t++}return null}),s(this,"sortFn",(e,t)=>(this.indexOf(e)??0)-(this.indexOf(t)??0)),s(this,"sort",e=>[...e].sort(this.sortFn.bind(this))),s(this,"getItemValue",e=>null==e?null:this.options.itemToValue?.(e)??o.itemToValue(e)),s(this,"getItemDisabled",e=>null!=e&&(this.options.isItemDisabled?.(e)??o.isItemDisabled(e))),s(this,"stringifyItem",e=>null==e?null:this.options.itemToString?.(e)??o.itemToString(e)),s(this,"stringify",e=>null==e?null:this.stringifyItem(this.find(e))),s(this,"stringifyItems",(e,t=", ")=>{let i=[];for(let t of e){let e=this.stringifyItem(t);null!=e&&i.push(e)}return i.join(t)}),s(this,"stringifyMany",(e,t)=>this.stringifyItems(this.findMany(e),t)),s(this,"has",e=>-1!==this.indexOf(e)),s(this,"hasItem",e=>null!=e&&this.has(this.getItemValue(e))),s(this,"group",()=>{let{groupBy:e,groupSort:t}=this.options;if(!e)return[["",[...this.items]]];let i=new Map;this.items.forEach((t,l)=>{let s=e(t,l);i.has(s)||i.set(s,[]),i.get(s).push(t)});let l=Array.from(i.entries());return t&&l.sort(([e],[i])=>{if("function"==typeof t)return t(e,i);if(Array.isArray(t)){let l=t.indexOf(e),s=t.indexOf(i);return -1===l?1:-1===s?-1:l-s}return"asc"===t?e.localeCompare(i):"desc"===t?i.localeCompare(e):0}),l}),s(this,"getNextValue",(e,t=1,i=!1)=>{let l=this.indexOf(e);if(-1===l)return null;for(l=i?Math.min(l+t,this.size-1):l+t;l<=this.size&&this.getItemDisabled(this.at(l));)l++;
1return this.getItemValue(this.at(l))}),s(this,"getPreviousValue",(e,t=1,i=!1)=>{let l=this.indexOf(e);if(-1===l)return null;for(l=i?Math.max(l-t,0):l-t;l>=0&&this.getItemDisabled(this.at(l));)l--;return this.getItemValue(this.at(l))}),s(this,"indexOf",e=>{if(null==e)return -1;if(!this.options.groupBy&&!this.options.groupSort)return this.items.findIndex(t=>this.getItemValue(t)===e);if(!this.indexMap){this.indexMap=new Map;let e=0;for(let[,t]of this.group())for(let i of t){let t=this.getItemValue(i);null!=t&&this.indexMap.set(t,e),e++}}return this.indexMap.get(e)??-1}),s(this,"getByText",(e,t)=>{let i=null!=t?this.indexOf(t):-1,l=1===e.length;for(let s=0;s<this.items.length;s++){let r=this.items[(i+s+1)%this.items.length];if((!l||this.getItemValue(r)!==t)&&!this.getItemDisabled(r)&&d(this.stringifyItem(r),e))return r}}),s(this,"search",(e,t)=>{let{state:i,currentValue:l,timeout:s=350}=t,r=i.keysSoFar+e,n=r.length>1&&Array.from(r).every(e=>e===r[0])?r[0]:r,o=this.getByText(n,l),a=this.getItemValue(o);function d(){clearTimeout(i.timer),i.timer=-1}return!function e(t){i.keysSoFar=t,d(),""!==t&&(i.timer=+setTimeout(()=>{e(""),d()},s))}(r),a}),s(this,"update",(e,t)=>{let i=this.indexOf(e);return -1===i?this:this.copy([...this.items.slice(0,i),t,...this.items.slice(i+1)])}),s(this,"upsert",(e,t,i="append")=>{let l=this.indexOf(e);return -1===l?("append"===i?this.append:this.prepend)(t):this.copy([...this.items.slice(0,l),t,...this.items.slice(l+1)])}),s(this,"insert",(e,...t)=>this.copy(u(this.items,e,...t))),s(this,"insertBefore",(e,...t)=>{let i=this.indexOf(e);if(-1===i)if(0!==this.items.length)return this;else i=0;return this.copy(u(this.items,i,...t))}),s(this,"insertAfter",(e,...t)=>{let i=this.indexOf(e);if(-1===i)if(0!==this.items.length)return this;else i=0;return this.copy(u(this.items,i+1,...t))}),s(this,"prepend",(...e)=>this.copy(u(this.items,0,...e))),s(this,"append",(...e)=>this.copy(u(this.items,this.items.length,...e))),s(this,"filter",e=>{let t=this.items.filter((t,i)=>e(this.stringifyItem(t),i,t));return this.copy(t)}),s(this,"remove",(...e)=>{let t=e.map(e=>"string"==typeof e?e:this.getItemValue(e));return this.copy(this.items.filter(e=>{let i=this.getItemValue(e);return null!=i&&!t.includes(i)}))}),s(this,"move",(e,t)=>{let i=this.indexOf(e);return -1===i?this:this.copy(c(this.items,[i],t))}),s(this,"moveBefore",(e,...t)=>{let i=this.items.findIndex(t=>this.getItemValue(t)===e);if(-1===i)return this;let l=t.map(e=>this.items.findIndex(t=>this.getItemValue(t)===e)).sort((e,t)=>e-t);return this.copy(c(this.items,l,i))}),s(this,"moveAfter",(e,...t)=>{let i=this.items.findIndex(t=>this.getItemValue(t)===e);if(-1===i)return this;let l=t.map(e=>this.items.findIndex(t=>this.getItemValue(t)===e)).sort((e,t)=>e-t);return this.copy(c(this.items,l,i+1))}),s(this,"reorder",(e,t)=>this.copy(c(this.items,[e],t))),s(this,"compareValue",(e,t)=>{let i=this.indexOf(e),l=this.indexOf(t);return i<l?-1:+(i>l)}),s(this,"range",(e,t)=>{let i=[],l=e;for(;null!=l;){if(this.find(l)&&i.push(l),l===t)return i;l=this.getNextValue(l)}return[]}),s(this,"getValueRange",(e,t)=>e&&t?0>=this.compareValue(e,t)?this.range(e,t):this.range(t,e):[]),s(this,"toString",()=>{let e="";for(let t of this.items){let i=this.getItemValue(t);e+=[i,this.stringifyItem(t),this.getItemDisabled(t)].filter(Boolean).join(":")+","}return e}),s(this,"toJSON",()=>({size:this.size,first:this.firstValue,last:this.lastValue})),this.items=[...t.items]}get size(){return this.items.length}get firstValue(){let e=0;for(;this.getItemDisabled(this.at(e));)e++;return this.getItemValue(this.at(e))}get lastValue(){let e=this.size-1;for(;this.getItemDisabled(this.at(e));)e--;return this.getItemValue(this.at(e))}*[Symbol.iterator](){yield*this.items}},d=(e,t)=>!!e?.toLowerCase().startsWith(t.toLowerCase());function u(e,t,...i){return[...e.slice(0,t),...i,...e.slice(t)]}function c(e,t,i){let l=(t=[...t].sort((e,t)=>e-t)).map(t=>e[t]);for(let i=t.length-1;i>=0;i--)e=[...e.slice(0,t[i]),...e.slice(t[i]+1)];return i=Math.max(0,i-t.filter(e=>e<i).length),[...e.slice(0,i),...l,...e.slice(i)]}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.