1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`5e5a46e8-f29a-487c-9c8c-aad62eb8f9fe`,e._sentryDebugIdIdentifier=`sentry-dbid-5e5a46e8-f29a-487c-9c8c-aad62eb8f9fe`)}catch{}})();import{g as e}from"./BNWMsBwf.js";import{A as t,B as n,C as r,N as i,O as a,P as o,St as s,_ as c,m as l,wt as u,xt as d,yt as f,z as p}from"./CyU4sjus.js";import{$ as m,D as h,E as g,Ft as _,Gt as v,Ht as y,L as b,Lt as ee,Rt as te,Xt as x,_ as S,b as C,bt as w,ct as T,et as E,ft as D,g as O,h as ne,jt as re,k,mt as A,o as j,qt as M,tt as N,v as P,wt as F,xt as I,y as L,z as R}from"./Dxi30lUR.js";import{_t as z,gt as B}from"./BsygFA5q.js";import{n as V,t as H}from"./KsEOCrV5.js";import{t as ie}from"./DHJcRVlE.js";import{t as ae}from"./UQsPw9wn.js";import{b as U,l as oe,r as se,y as ce}from"./DXLa04CY.js";import{T as le,t as ue,x as de}from"./Cz3xdBrx.js";import{E as W,S as G,_ as fe,d as pe,f as me,h as he,i as ge,l as _e,m as ve,o as ye,p as K,r as be,s as xe,u as Se}from"./B-BjsAs0.js";import{t as Ce}from"./B7NckJ8C.js";import{c as we,d as Te,i as Ee,l as De,n as Oe,r as ke,s as Ae}from"./BmDAMQyc.js";import{t as je}from"./BMJyLNvL.js";import{t as Me}from"./CtEwaiIP.js";import{n as Ne,t as Pe}from"./Cpr7ZMs0.js";import{n as Fe,r as Ie,t as Le}from"./BpOOZ2kl.js";import{n as Re,t as ze}from"./DdXP-LsW.js";import{t as q}from"./CBmA1iE8.js";import{n as Be,t as Ve}from"./CNOmfYMf.js";import{_ as He,h as Ue,m as We,r as J,t as Ge}from"./CanTIfpD.js";import{n as Y,t as Ke}from"./BiLaqDCa.js";import{a as qe,r as Je}from"./BxK7Vo76.js";import{d as Ye,t as Xe,u as Ze}from"./Wg8hvaKJ.js";import{n as Qe}from"./CUoHcVCh.js";import{t as $e}from"./FLMXV913.js";function X(e,t,n){let r=e.findIndex(e=>ae(e,t)),i=e.findIndex(e=>ae(e,n));if(r===-1||i===-1)return[];let[a,o]=[r,i].sort((e,t)=>e-t);return e.slice(a,o+1)}function et(){return{ALT:`Alt`,ARROW_DOWN:`ArrowDown`,ARROW_LEFT:`ArrowLeft`,ARROW_RIGHT:`ArrowRight`,ARROW_UP:`ArrowUp`,BACKSPACE:`Backspace`,CAPS_LOCK:`CapsLock`,CONTROL:`Control`,DELETE:`Delete`,END:`End`,ENTER:`Enter`,ESCAPE:`Escape`,F1:`F1`,F10:`F10`,F11:`F11`,F12:`F12`,F2:`F2`,F3:`F3`,F4:`F4`,F5:`F5`,F6:`F6`,F7:`F7`,F8:`F8`,F9:`F9`,HOME:`Home`,META:`Meta`,PAGE_DOWN:`PageDown`,PAGE_UP:`PageUp`,SHIFT:`Shift`,SPACE:` `,TAB:`Tab`,CTRL:`Control`,ASTERISK:`*`,SPACE_CODE:`Space`}}function tt(e){return e?.querySelector(`[data-state=checked]`)}function nt(e,t,n){return e===void 0?!1:Array.isArray(e)?e.some(e=>Z(e,t,n)):Z(e,t,n)}function Z(e,t,n){return e===void 0||t===void 0?!1:typeof e==`string`?e===t:typeof n==`function`?n(e,t):typeof n==`string`?e?.[n]===t?.[n]:ae(e,t)}var[rt,it]=W(`ListboxRoot`),[at,ot]=W(`ListboxHighlightScroll`),st=k({__name:`ListboxRoot`,props:{modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},multiple:{type:Boolean,required:!1},orientation:{type:String,required:!1,default:`vertical`},dir:{type:String,required:!1},disabled:{type:Boolean,required:!1},selectionBehavior:{type:String,required:!1,default:`toggle`},highlightOnHover:{type:Boolean,required:!1},by:{type:[String,Function],required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:[`update:modelValue`,`highlight`,`entryFocus`,`leave`],setup(e,{expose:t,emit:i}){let a=e,s=i,{multiple:c,highlightOnHover:l,orientation:u,disabled:d,selectionBehavior:f,dir:p}=o(a),{getItems:m}=Ke({isProvider:!0}),{handleTypeaheadSearch:h}=Fe(),{primitiveElement:g,currentElement:_}=Y(),v=et(),b=Me(p),ee=at(null);ot({suppressHighlightScroll:r(!1),onHighlightScrollRequest:()=>{}});let te=Re(_),x=r(),S=r(!1),C=r(!0),w=le(a,`modelValue`,s,{defaultValue:a.defaultValue??(c.value?[]:void 0),passive:a.modelValue===void 0,deep:!0});function T(e){if(S.value=!0,a.multiple){let t=Array.isArray(w.value)?[...w.value]:[],n=t.findIndex(t=>Z(t,e,a.by));a.selectionBehavior===`toggle`?(n===-1?t.push(e):t.splice(n,1),w.value=t):(w.value=[e],x.value=e)}else a.selectionBehavior===`toggle`&&Z(w.value,e,a.by)?w.value=void 0:w.value=e;setTimeout(()=>{S.value=!1},1)}let E=r(null),D=r(null),O=r(!1),ne=r(!1),re=se(),k=se(),j=se();function F(){return m().map(e=>e.ref).filter(e=>e.dataset.disabled!==``)}
1function R(e,t=!0,n){if(!e)return;E.value=e;let r=ee?.suppressHighlightScroll.value??!1;(n??C.value)&&(r?E.value.focus({preventScroll:!0}):E.value.focus()),r?ee?.onHighlightScrollRequest(t?()=>{let e=E.value;e?.isConnected&&e.scrollIntoView({block:`nearest`})}:void 0):t&&E.value.scrollIntoView({block:`nearest`});let i=m().find(t=>t.ref===e);s(`highlight`,i)}function z(e){if(O.value)j.trigger(e);else{let t=m().find(t=>Z(t.value,e,a.by));t&&(E.value=t.ref,R(t.ref))}}function B(e){if(E.value&&E.value.isConnected){if(e.ctrlKey||e.metaKey||e.altKey)return;e.preventDefault(),e.stopPropagation(),ne.value||E.value.click()}}function V(e){if(C.value){if(S.value=!0,O.value)k.trigger(e);else{let t=e.altKey||e.ctrlKey||e.metaKey;if(t&&e.key===`a`&&c.value){let t=m(),n=t.map(e=>e.value);w.value=[...n],e.preventDefault();let r=t.at(-1);r&&R(r.ref)}else if(!t){let t=h(e.key,m());t&&R(t)}}setTimeout(()=>{S.value=!1},1)}}function H(){ne.value=!0}function ie(){N(()=>{ne.value=!1})}function ae(){N(()=>{ue(new KeyboardEvent(`keydown`,{key:`PageUp`}))})}function U(e){let t=E.value;t?.isConnected&&(D.value=t),E.value=null,s(`leave`,e)}function ce(e){let t=new CustomEvent(`listbox.entryFocus`,{bubbles:!1,cancelable:!0});if(e.currentTarget?.dispatchEvent(t),s(`entryFocus`,t),!t.defaultPrevented){if(D.value)R(D.value);else{let e=F()?.[0];R(e)}}}function ue(e){let t=qe(e,u.value,b.value);if(!t)return;let n=F();if(E.value){if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let e=n.indexOf(E.value);n=n.slice(e+1)}de(e,n[0])}if(n.length){let e=!E.value&&t===`prev`?n.length-1:0;R(n[e])}if(O.value)return k.trigger(e)}function de(e,t){if(!O.value&&a.selectionBehavior===`replace`&&c.value&&Array.isArray(w.value)&&(!e.altKey&&!e.ctrlKey&&!e.metaKey||e.shiftKey)&&e.shiftKey){let n=m().filter(e=>e.ref.dataset.disabled!==``),r=n.find(e=>e.ref===t)?.value;if(e.key===v.END?r=n.at(-1)?.value:e.key===v.HOME&&(r=n[0]?.value),!r||!x.value)return;let i=X(n.map(e=>e.value),x.value,r);w.value=i}}async function W(e,t=!0){if(oe){if(await N(),O.value)re.trigger({event:e,scroll:t});else{let e=F(),n=e.find(e=>e.dataset.state===`checked`),r=t?void 0:!1;n?R(n,t,r):e.length&&R(e[0],t,r)}}}let fe=!1;return y(w,()=>{if(!S.value){let e=fe;fe=!0,N(()=>{W(void 0,e)})}},{immediate:!0,deep:!0}),t({highlightedElement:E,highlightItem:z,highlightFirstItem:ae,highlightSelected:W,getItems:m}),it({modelValue:w,onValueChange:T,multiple:c,orientation:u,dir:b,disabled:d,highlightOnHover:l,highlightedElement:E,isVirtual:O,virtualFocusHook:re,virtualKeydownHook:k,virtualHighlightHook:j,by:a.by,firstValue:x,selectionBehavior:f,focusable:C,onLeave:U,onEnter:ce,changeHighlight:R,onKeydownEnter:B,onKeydownNavigation:ue,onKeydownTypeAhead:V,onCompositionStart:H,onCompositionEnd:ie,highlightFirstItem:ae}),(e,t)=>(A(),P(n(G),{ref_key:`primitiveElement`,ref:g,as:e.as,"as-child":e.asChild,dir:n(b),"data-disabled":n(d)?``:void 0,onPointerleave:U,onFocusout:t[0]||=async e=>{let t=e.relatedTarget||e.target;await N(),E.value&&n(_)&&!n(_).contains(t)&&U(e)}},{default:M(()=>[I(e.$slots,`default`,{modelValue:n(w)}),n(te)&&e.name?(A(),P(n(ze),{key:0,name:e.name,value:n(w),disabled:n(d),required:e.required},null,8,[`name`,`value`,`disabled`,`required`])):L(`v-if`,!0)]),_:3},8,[`as`,`as-child`,`dir`,`data-disabled`]))}}),ct=k({__name:`ListboxContent`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let{CollectionSlot:t}=Ke(),r=rt(),i=U(!1,10);return(e,a)=>(A(),P(n(t),null,{default:M(()=>[h(n(G),{role:`listbox`,as:e.as,"as-child":e.asChild,tabindex:n(r).focusable.value?n(r).highlightedElement.value?`-1`:`0`:`-1`,"aria-orientation":n(r).orientation.value,"aria-multiselectable":!!n(r).multiple.value,"data-orientation":n(r).orientation.value,onMousedown:a[0]||=z(e=>i.value=!0,[`left`]),onFocus:a[1]||=e=>{n(i)||n(r).onEnter(e)},onKeydown:[a[2]||=B(e=>{(n(r).orientation.value!==`vertical`||e.key!==`ArrowLeft`&&e.key!==`ArrowRight`)&&(n(r).orientation.value!==`horizontal`||e.key!==`ArrowUp`&&e.key!==`ArrowDown`)&&(e.preventDefault(),n(r).focusable.value&&n(r).onKeydownNavigation(e))},[`down`,`up`,`left`,`right`,`home`,`end`]),B(n(r).onKeydownEnter,[`enter`]),n(r).onKeydownTypeAhead]},{default:M(()=>[I(e.$slots,`default`)]),_:3},8,[`as`,`as-child`,`tabindex`,`aria-orientation`,`aria-multiselectable`,`data-orientation`,`onKeydown`])]),_:3}))}}),lt=k({__name:`ListboxFilter`,props:{modelValue:{type:String,required:!1},autoFocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`input`}},emits:[`update:modelValue`],setup(e,{emit:t}){let i=e,a=le(i,`modelValue`,t,{defaultValue:``,passive:i.modelValue===void 0}),o=rt(),{primitiveElement:s,currentElement:c}=Y(),l=O(()=>i.disabled||o.disabled.value||!1),u=r();v(()=>u.value=o.highlightedElement.value?.id),T(()=>{o.focusable.value=!1,setTimeout(()=>{i.autoFocus&&c.value?.focus()},1)}),D(()=>{o.focusable.value=!0});let{isComposing:d,shouldDeferInput:f,handleCompositionStart:p,handleCompositionUpdate:m,handleCompositionEnd:h}=je(e=>{a.value=e.target.value,o.onCompositionEnd(),o.highlightFirstItem()});function g(){o.onCompositionStart(),p()}function _(e){f.value||(a.value=e.target.value,o.highlightFirstItem())}function y(e){d.value||(e.preventDefault(),o.onKeydownNavigation(e))}function b(e){d.value||o.onKeydownEnter(e)}return(e,t)=>(A(),P(n(G),{ref_key:`primitiveElement`,ref:s,as:e.as,"as-child":e.asChild,value:n(a),disabled:l.value?``:void 0,"data-disabled":l.value?``:void 0,"aria-disabled":l.value??void 0,"aria-activedescendant":u.value,type:`text`,onKeydown:[B(y,[`down`,`up`,`home`,`end`]),B(b,[`enter`])],onInput:_,onCompositionstart:g,onCompositionupdate:n(m),onCompositionend:n(h)},{default:M(()=>[I(e.$slots,`default`,{modelValue:n(a)})]),_:3},8,[`as`,`as-child`,`value`,`disabled`,`data-disabled`,`aria-disabled`,`aria-activedescendant`,`onCompositionupdate`,`onCompositionend`]))}}),[Q,ut]=W(`ListboxGroup`),dt=k({__name:`ListboxGroup`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e,r=V(void 0,`reka-listbox-group`);return ut({id:r}),(e,i)=>(A(),P(n(G),E({role:`group`},t,{"aria-labelledby":n(r)}),{default:M(()=>[I(e.$slots,`default`)]),_:3},16,[`aria-labelledby`]))}}),ft=`listbox.select`,[pt,mt]=W(`ListboxItem`),ht=k({__name:`ListboxItem`,props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`div`}},emits:[`select`],setup(e,{emit:t}){let r=e,i=t,a=V(void 0,`reka-listbox-item`),{CollectionItem:o}=Ke(),{forwardRef:s,currentElement:c}=q(),l=rt(),u=O(()=>c.value!=null&&c.value===l.highlightedElement.value),d=O(()=>nt(l.modelValue.value,r.value,l.by)),f=O(()=>l.disabled.value||r.disabled);async function p(e){i(`select`,e),!e?.defaultPrevented&&!f.value&&e&&(l.onValueChange(r.value),l.changeHighlight(c.value))}function m(e){let t={originalEvent:e,value:r.value};Te(ft,p,t)}return mt({isSelected:d}),(e,t)=>(A(),P(n(o),{value:e.value},{default:M(()=>[x([u.value,d.value,f.value,n(l).focusable.value],()=>h(n(G),E({id:n(a)},e.$attrs,{ref:n(s),role:`option`,tabindex:n(l).focusable.value?u.value?`0`:`-1`:-1,"aria-selected":d.value,as:e.as,"as-child":e.asChild,disabled:f.value?``:void 0,"data-disabled":f.value?``:void 0,"data-highlighted":u.value?``:void 0,"data-state":d.value?`checked`:`unchecked`,onClick:m,onKeydown:B(z(m,[`prevent`]),[`space`]),onPointermove:t[0]||=()=>{n(l).highlightedElement.value!==n(c)&&n(l).highlightOnHover.value&&n(l).changeHighlight(n(c),!1,!1)}}),{default:M(()=>[I(e.$slots,`default`)]),_:3},16,[`id`,`tabindex`,`aria-selected`,`as`,`as-child`,`disabled`,`data-disabled`,`data-highlighted`,`data-state`,`onKeydown`]),t,1)]),_:3},8,[`value`]))}}),gt=k({__name:`ListboxItemIndicator`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let t=e;q();let r=pt();return(e,i)=>n(r).isSelected.value?(A(),P(n(G),E({key:0,"aria-hidden":`true`},t),{default:M(()=>[I(e.$slots,`default`)]),_:3},16)):L(`v-if`,!0)}});function _t(e){return typeof e==`object`?e.key:e}function vt(e,t){let n=e.length;return new Proxy(e,{get(e,r,i){if(typeof r==`string`){let i=r.charCodeAt(0);if(i>=48&&i<=57){let i=+r;if(Number.isInteger(i)&&i>=0&&i<n){let n=e[i];if(typeof n!=`object`){let r=t[i*2];n=e[i]={index:i,key:n,start:r,size:t[i*2+1],end:r+t[i*2+1],lane:0}}return n}}if(r===`length`)return n}return Reflect.get(e,r,i)}})}function yt(e,t,n){let r=n.initialDeps??[],i,a=!0;function o(){let o=e();return o.length!==r.length||o.some((e,t)=>r[t]!==e)?(r=o,i=t(...o),n?.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(i),a=!1,i):i}return o.updateDeps=e=>{r=e},o}function bt(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var xt=(e,t)=>
1Math.abs(e-t)<1.01,St=(e,t,n)=>{let r;return Object.assign(function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)},{cancel:()=>{e.clearTimeout(r)}})},Ct,wt=()=>{if(Ct!==void 0)return Ct;if(typeof navigator>`u`)return Ct=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return Ct=!0;let e=navigator.maxTouchPoints;return Ct=navigator.platform===`MacIntel`&&e!==void 0&&e>0},Tt=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},Et=e=>e,Dt=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,r=Array(n);for(let e=0;e<n;e++)r[e]=t+e;return r},Ot=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=e=>{let{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(Tt(n)),!r.ResizeObserver)return()=>{};let a=new r.ResizeObserver(t=>{let r=()=>{let e=t[0];if(e?.borderBoxSize){let t=e.borderBoxSize[0];if(t){i({width:t.inlineSize,height:t.blockSize});return}}i(Tt(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return a.observe(n,{box:`border-box`}),()=>{a.unobserve(n)}},kt={passive:!0},At=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=()=>{t({width:n.innerWidth,height:n.innerHeight})};return r(),n.addEventListener(`resize`,r,kt),()=>{n.removeEventListener(`resize`,r)}},jt=typeof window>`u`||`onscrollend`in window,Mt=(e,t,n)=>{let r=e.scrollElement;if(!r)return;let i=e.targetWindow;if(!i)return;let a=e.options.useScrollendEvent&&jt,o=0,s=a?null:St(i,()=>t(n(r),!1),e.options.isScrollingResetDelay),c=e=>()=>{o=n(r),s?.(),t(o,e)},l=c(!0),u=c(!1);return r.addEventListener(`scroll`,l,kt),a&&r.addEventListener(`scrollend`,u,kt),()=>{r.removeEventListener(`scroll`,l),a&&r.removeEventListener(`scrollend`,u),s?.cancel()}},Nt=(e,t)=>Mt(e,t,t=>{let{horizontal:n,isRtl:r}=e.options;return n?t.scrollLeft*(r&&-1||1):t.scrollTop}),Pt=(e,t)=>Mt(e,t,t=>e.options.horizontal?t.scrollX:t.scrollY),Ft=(e,t,n)=>{if(n.options.useCachedMeasurements){let t=n.indexFromElement(e),r=n.options.getItemKey(t);return n.itemSizeCache.get(r)??n.options.estimateSize(t)}if(t?.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?`inlineSize`:`blockSize`])}if(!t){let t=n.indexFromElement(e),r=n.options.getItemKey(t),i=n.itemSizeCache.get(r);if(i!==void 0)return i}return e[n.options.horizontal?`offsetWidth`:`offsetHeight`]},It=(e,{adjustments:t=0,behavior:n},r)=>{var i,a;(a=(i=r.scrollElement)?.scrollTo)==null||a.call(i,{[r.options.horizontal?`left`:`top`]:e+t,behavior:n})},Lt=It,Rt=It;function zt(e,t,n,r){if(t===0)return!1;let i=r(0),a=new Set,o=0;for(;o<e;){let e=n(o);if(e===i)break;a.add(e),o++}let s=e-o;if(s===0||s>=t)return!1;for(let e=0;e<s;e++)if(r(e)!==n(o+e))return!1;for(let e=s;e<t;e++)if(a.has(r(e)))return!1;return!0}var Bt=class{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this._clampedAdjustment=null,this.elementsCache=new Map,this.now=()=>{var e;return((e=this.targetWindow?.performance)?.now)?.call(e)??Date.now()},this.observer=(()=>{let e=null,t=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{let t=e.target,n=this.indexFromElement(t);if(!t.isConnected){this.observer.unobserve(t);for(let[e,n]of this.elementsCache)if(n===t){this.elementsCache.delete(e);break}return}this.isIndexInRange(n)&&this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,e,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}));return{disconnect:()=>{var n;(n=t())==null||n.disconnect(),e=null},observe:e=>t()?.observe(e,{box:`border-box`}),unobserve:e=>t()?.unobserve(e)}})(),this.range=null,this.setOptions=e=>{let t={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Et,rangeExtractor:Dt,onChange:()=>{},measureElement:Ft,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:`data-index`,initialMeasurementsCache:[],lanes:1,anchorTo:`start`,followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:`estimate`,useCachedMeasurements:!1};for(let n in e){let r=e[n];r!==void 0&&(t[n]=r)}let n=this.options,r=null,i=null,a=!1;if(n!==void 0&&n.enabled&&t.enabled&&t.anchorTo===`end`&&this.scrollElement!==null){let e=n.count,o=t.count,s=this.getMeasurements(),c=this._singleLaneMeasurements?.items??s,l=e=>_t(c[e]),u=e>0?l(0):null,d=e>0?l(e-1):null;if(o!==e||e>0&&o>0&&(t.getItemKey(0)!==u||t.getItemKey(o-1)!==d)){a=!0;let c=e>0?this.getVirtualItemForOffset(this.getScrollOffset())??s[0]:null;
1c&&(r=[c.key,this.getScrollOffset()-c.start]);let u=t.followOnAppend===!0?`auto`:t.followOnAppend||null;u&&o>0&&this.isAtEnd(n.scrollEndThreshold)&&(e===0||t.getItemKey(o-1)!==d)&&(o>e||zt(e,o,l,t.getItemKey))&&(i=u)}}this.options=t,a&&(this.pendingMin=0,this.itemSizeCacheVersion++);let o=!1,s=0;if(r&&this.scrollOffset!==null){let[e,t]=r,n=this.getMeasurements(),{count:a,getItemKey:c}=this.options,l=0;for(;l<a&&c(l)!==e;)l++;if(l<a){let e=n[l];if(e){let n=Math.max(0,e.start+t);!i&&n!==this.scrollOffset&&(s=n-this.scrollOffset,this.scrollOffset=n,o=!0)}}}(o||i)&&(this.pendingScrollAnchor=[o?r[0]:null,o?r[1]:0,i,s])},this.notify=e=>{var t,n;(n=(t=this.options).onChange)==null||n.call(t,this,e)},this.maybeNotify=yt(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.isScrolling=!1,this.scrollDirection=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._clampedAdjustment=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{let e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}if(this.scrollElement=e,this.targetWindow=this.scrollElement&&`ownerDocument`in this.scrollElement?this.scrollElement.ownerDocument.defaultView:this.scrollElement?.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)=>{if(t&&this._intendedScrollOffset===null&&e===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(e-this._intendedScrollOffset)<1.5&&(e=this._intendedScrollOffset),this._intendedScrollOffset=null,this._clampedAdjustment!==null&&Math.abs(e-this._clampedAdjustment.maxAtWrite)>=1.5&&(this._clampedAdjustment=null),this.scrollAdjustments=0;let n=this.getScrollOffset();this.scrollDirection=t?n===e?this.scrollDirection:n<e?`forward`:`backward`:null,this.scrollOffset=e,this.isScrolling=t,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),`addEventListener`in this.scrollElement){let e=this.scrollElement,t=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},n=()=>{this._iosTouching=!1,wt()&&this.targetWindow!=null&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};e.addEventListener(`touchstart`,t,kt),e.addEventListener(`touchend`,n,kt),this.unsubs.push(()=>{e.removeEventListener(`touchstart`,t),e.removeEventListener(`touchend`,n),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}let t=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,t&&this.scrollElement&&this.options.enabled){let[e,n,r,i]=t;e!==null&&!r&&(wt()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?i!==0&&(this._iosDeferredAdjustment+=i):this.scrollState?.behavior===`smooth`&&!xt(this.getScrollOffset()-i,this.scrollState.lastTargetOffset)||this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),r&&this.scrollToEnd({behavior:r})}this._retryClampedAdjustment()},this._retryClampedAdjustment=()=>{if(this._clampedAdjustment===null||!this.scrollElement||!this.options.enabled)return;let{target:e,maxAtWrite:t}=this._clampedAdjustment,n=this.getMaxScrollOffset();n>t+.5&&(this._clampedAdjustment=e>n+.5?{target:e,maxAtWrite:n}:null,this._scrollToOffset(e,{adjustments:void 0,behavior:void 0}))},this._flushIosDeferredIfReady=()=>
vendor: 10,182 bytes, line 1
1{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;let e=this.getScrollOffset(),t=this.getMaxScrollOffset();if(e<0||e>t)return;if(this._iosDeferredAdjustment<0&&e>=t-1){this._iosDeferredAdjustment=0;return}let n=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(e,{adjustments:this.scrollAdjustments+=n,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?`width`:`height`]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset==`function`?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=yt(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(e,t,n,r,i,a,o,s)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMin=null,{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o,gap:s}),{key:!1}),this.isIndexInRange=e=>e>=0&&e<this.options.count,this.getMeasurements=yt(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o,gap:s},c)=>{let l=this.itemSizeCache;if(!i)return this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let u=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1),a===1){let i=e*2,a=this._singleLaneMeasurements?.flat;if(!a||a.length<i){let e=new Float64Array(i);a&&u>0&&e.set(a.subarray(0,u*2)),a=e}let o=u===0?Array(e):this._singleLaneMeasurements.items.slice(),c;if(u===0)c=t+n;else{let e=u-1;c=a[e*2]+a[e*2+1]+s}for(let t=u;t<e;t++){let e=r(t);o[t]=e;let n=l.get(e),i=typeof n==`number`?n:this.options.estimateSize(t);a[t*2]=c,a[t*2+1]=i,c+=i+s}this._singleLaneMeasurements={flat:a,items:o};let d=vt(o,a);return this.measurementsCache=d,d}let d=this.measurementsCache.slice(0,u),f=Array(a).fill(void 0),p=new Float64Array(a),m=0;for(let e=0;e<u;e++){let t=d[e];t&&(f[t.lane]===void 0&&m++,f[t.lane]=e,p[t.lane]=t.end)}for(let i=u;i<e;i++){let e=r(i),c=this.laneAssignments.get(i),u,h,g=o===`estimate`||l.has(e);if(c!==void 0&&this.options.lanes>1){u=c;let e=f[u],r=e===void 0?void 0:d[e];h=r?r.end+s:t+n}else if(m===a){let e=0,t=p[0],n=f[0];for(let r=1;r<a;r++){let i=p[r];(i<t||i===t&&f[r]<n)&&(e=r,t=i,n=f[r])}u=e,h=t+s,g&&this.laneAssignments.set(i,u)}else u=i%this.options.lanes,h=t+n,g&&this.laneAssignments.set(i,u);let _=l.get(e),v=typeof _==`number`?_:this.options.estimateSize(i),y=h+v;d[i]={index:i,start:h,size:v,end:y,key:e,lane:u},f[u]===void 0&&m++,f[u]=i,p[u]=y}return this.measurementsCache=d,d},{key:!1,debug:()=>this.options.debug}),this.calculateRange=yt(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>e.length===0||t===0?(this.range=null,null):(this.range=Ut(e,t,n,r,r===1&&this._singleLaneMeasurements!==null?this._singleLaneMeasurements.flat:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=yt(()=>{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,r,i)=>r===null||i===null?[]:e({startIndex:r,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=>{if(!this.scrollState||this.scrollState.behavior!==`smooth`)return!0;let t=this.scrollState.index??this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)?.index;if(t!==void 0&&this.range){let n=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,t-n),i=Math.min(this.options.count-1,t+n);return e>=r&&e<=i}return!0},this.measureElement=e=>{if(!e){this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});return}let t=this.indexFromElement(e);if(!this.isIndexInRange(t))return;let n=this.options.getItemKey(t),r=this.elementsCache.get(n);r!==e&&(r&&this.observer.unobserve(r),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)=>{if(!this.isIndexInRange(e))return;let n,r,i,a=this._singleLaneMeasurements?.flat;if(this.options.lanes===1&&a!=null)i=this.options.getItemKey(e),r=a[e*2],n=a[e*2+1];else{let t=this.measurementsCache[e];if(!t)return;i=t.key,r=t.start,n=t.size}let o=this.itemSizeCache.get(i)??n,s=t-o;if(s!==0){let a=this.options.anchorTo===`end`&&this.scrollState?.behavior!==`smooth`&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,c=a?this.getTotalSize():0,l=this.getScrollOffset()+this.scrollAdjustments,u=this.itemSizeCache.has(i)?r+o<=l&&this.scrollDirection!==`backward`:r<l,d=this.scrollState?.behavior!==`smooth`&&(this.shouldAdjustScrollPositionOnItemSizeChange===void 0?u:this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[e]??{index:e,key:i,start:r,size:n,end:r+n,lane:0},s,this));(this.pendingMin===null||e<this.pendingMin)&&(this.pendingMin=e),this.itemSizeCache.set(i,t),this.itemSizeCacheVersion++;let f=!1;a?f=this.applyScrollAdjustment(this.getTotalSize()-c):d&&(f=this.applyScrollAdjustment(s)),this.notify(f),this._retryClampedAdjustment()}},this.getVirtualItems=yt(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let r=0,i=e.length;r<i;r++){let i=t[e[r]];n.push(i)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(t.length===0)return;let n=this._singleLaneMeasurements?.flat,r=this.options.lanes===1&&n!=null;return bt(t[Vt(0,t.length-1,r?e=>n[e*2]:e=>bt(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.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(e=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=e,this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();t===`auto`&&(t=e>=i+r?`end`:`start`),t===`center`?e+=(n-r)/2:t===`end`&&(e-=r);let a=this.getMaxScrollOffset();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,t=`auto`)=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.getSize(),r=this.getScrollOffset(),i=this.measurementsCache[e];if(!i)return;if(t===`auto`){if(i.end>=r+n-this.options.scrollPaddingEnd)t=`end`;else if(i.start<=r+this.options.scrollPaddingStart)t=`start`;else return[r,t]}if(t===`end`&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let a=t===`end`?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,t,i.size),t]},this.scrollToOffset=(e,{align:t=`start`,behavior:n=`auto`}={})=>{this._iosDeferredAdjustment=0;let r=this.getOffsetForAlignment(e,t),i=this.now();this.scrollState={index:null,align:t,behavior:n,startedAt:i,lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t=`auto`,behavior:n=`auto`}={})=>{this._iosDeferredAdjustment=0,e=Math.max(0,Math.min(e,this.options.count-1));let r=this.getOffsetForIndex(e,t);if(!r)return;let[i,a]=r,o=this.now();this.scrollState={index:e,align:a,behavior:n,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t=`auto`}={})=>{let n=this.getScrollOffset()+e,r=this.now();this.scrollState={index:null,align:`start`,behavior:t,startedAt:r,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:e=`auto`}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:`end`,behavior:e});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:e})},this.getTotalSize=()=>{let e=this.getMeasurements(),t;if(e.length===0)t=this.options.paddingStart;else if(this.options.lanes===1){let n=e.length-1,r=this._singleLaneMeasurements?.flat;t=r==null?e[n]?.end??0:r[n*2]+r[n*2+1]}else{let n=Array(this.options.lanes).fill(null),r=e.length-1;for(;r>=0&&n.some(e=>e===null);){let t=e[r];n[t.lane]===null&&(n[t.lane]=t.end),r--}t=Math.max(...n.filter(e=>e!==null))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{let e=[];
1if(this.itemSizeCache.size===0)return e;let t=this.getMeasurements();for(let n of t)n&&this.itemSizeCache.has(n.key)&&e.push({index:n.index,key:n.key,start:n.start,size:n.size,end:n.end,lane:n.lane});return e},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this._intendedScrollOffset=e+(t??0),this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(e)}applyScrollAdjustment(e,t){if(e===0)return!1;if(wt()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded))return this._iosDeferredAdjustment+=e,!1;{let n=this.getScrollOffset()+this.scrollAdjustments+e,r=this.scrollElement,i=r!==null&&(`scrollHeight`in r||`document`in r)?this.getMaxScrollOffset():null;return this._clampedAdjustment=i!==null&&n>i+.5?{target:n,maxAtWrite:i}:null,this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=e,behavior:t}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0}}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}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=this.scrollState.index==null?void 0:this.getOffsetForIndex(this.scrollState.index,this.scrollState.align),t=e?e[0]:this.scrollState.lastTargetOffset,n=t!==this.scrollState.lastTargetOffset;if(!n&&xt(t,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=1){this.getScrollOffset()!==t&&this._scrollToOffset(t,{adjustments:void 0,behavior:`auto`}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,n){let e=this.getSize()||600,n=Math.abs(t-this.getScrollOffset()),r=this.scrollState.behavior===`smooth`&&n>e;this.scrollState.lastTargetOffset=t,r||(this.scrollState.behavior=`auto`),this._scrollToOffset(t,{adjustments:void 0,behavior:r?`smooth`:`auto`})}this.scheduleScrollReconcile()}},Vt=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,a=n(i);if(a<r)e=i+1;else if(a>r)t=i-1;else return i}return e>0?e-1:0};function Ht(e,t,n){let r=0;for(;r<=t;){let i=(r+t)/2|0,a=e[i*2];if(a<n)r=i+1;else if(a>n)t=i-1;else return i}return r>0?r-1:0}function Ut(e,t,n,r,i){let a=e.length-1;if(e.length<=r)return{startIndex:0,endIndex:a};if(r===1&&i!==null){let e=Ht(i,a,n),r=e,o=n+t;for(;r<a&&i[r*2]+i[r*2+1]<o;)r++;return{startIndex:e,endIndex:r}}let o=Vt(0,a,t=>e[t].start,n),s=o;if(r===1)for(;s<a&&e[s].end<n+t;)s++;else if(r>1){let i=Array(r).fill(0);for(;s<a&&i.some(e=>e<n+t);){let t=e[s];i[t.lane]=t.end,s++}let c=Array(r).fill(n+t);for(;o>=0&&c.some(e=>e>=n);){let t=e[o];c[t.lane]=t.start,o--}o=Math.max(0,o-o%r),s=Math.min(a,s+(r-1-s%r))}return{startIndex:o,endIndex:s}}function Wt(e){let t=new Bt(n(e)),r=a(t),i=t._didMount();return y(()=>n(e).getScrollElement(),e=>{e&&t._willUpdate()},{immediate:!0}),y(()=>n(e),e=>{t.setOptions({...e,onChange:(t,n)=>{var i;p(r),(i=e.onChange)==null||i.call(e,t,n)}}),t._willUpdate(),p(r)},{immediate:!0}),c(i),r}function Gt(e){return Wt(O(()=>({observeElementRect:Ot,observeElementOffset:Nt,scrollToFn:Rt,...n(e)})))}function Kt(e){return Wt(O(()=>({getScrollElement:()=>typeof document<`u`?window:null,observeElementRect:At,observeElementOffset:Pt,scrollToFn:Lt,initialOffset:()=>typeof document<`u`?window.scrollY:0,...n(e)})))}var qt=k({__name:`ListboxVirtualizer`,props:{options:{type:Array,required:!0},overscan:{type:Number,required:!1},estimateSize:{type:[Number,Function],required:!1},textContent:{type:Function,required:!1}},setup(e){let t=e,r=ee(),i=rt(),a=de(),{getItems:o}=Ke();i.isVirtual.value=!0;let c=O(()=>{let e=a.value;if(e){let t=window.getComputedStyle(e);return{start:Number.parseFloat(t.paddingBlockStart||t.paddingTop),end:Number.parseFloat(t.paddingBlockEnd||t.paddingBottom)}}return{start:0,end:0}}),l=Gt({get scrollPaddingStart(){return c.value.start},get scrollPaddingEnd(){return c.value.end},get count(){return t.options.length},get horizontal(){return i.orientation.value===`horizontal`},estimateSize(e){return typeof t.estimateSize==`function`?t.estimateSize(e):t.estimateSize??28},getScrollElement(){return a.value},overscan:t.overscan??12}),u=O(()=>l.value.getVirtualItems().map(e=>{let n=r.default({option:t.options[e.index],virtualizer:l.value,virtualItem:e})[0],i=n.type===j&&Array.isArray(n.children)?n.children.find(e=>typeof e.type!=`symbol`):n;return{item:e,is:ne(i,{key:`${e.key}`,"data-index":e.index,"aria-setsize":t.options.length,"aria-posinset":e.index+1,style:{position:`absolute`,top:0,left:0,transform:`translateY(${e.start}px)`,overflowAnchor:`none`}})}}));i.virtualFocusHook.on(({event:e,scroll:n})=>{let r=t.options.findIndex(e=>Array.isArray(i.modelValue.value)?Z(e,i.modelValue.value[0],i.by):Z(e,i.modelValue.value,i.by));r===-1?n?i.highlightFirstItem():requestAnimationFrame(()=>{let e=o().find(e=>e.ref.dataset.disabled!==``)?.ref;e&&i.changeHighlight(e,!1,!1)}):(e?.preventDefault(),l.value.scrollToIndex(r,{align:`start`}),requestAnimationFrame(()=>{let t=tt(a.value);if(t){let r=e?!0:n?void 0:!1;i.changeHighlight(t,n,r)}}))}),i.virtualHighlightHook.on(e=>{let n=t.options.findIndex(t=>Z(t,e,i.by));l.value.scrollToIndex(n,{align:`start`}),requestAnimationFrame(()=>{let e=tt(a.value);e&&i.changeHighlight(e)})});let d=U(``,1e3),f=O(()=>{let e=e=>t.textContent?t.textContent(e):e?.toString().toLowerCase();return t.options.map((t,n)=>({index:n,textContent:e(t)}))});
1function p(e,n){if(!i.firstValue?.value||!i.multiple.value||!Array.isArray(i.modelValue.value))return;let r=o().filter(e=>e.ref.dataset.disabled!==``).find(e=>e.ref===i.highlightedElement.value)?.value;if(!r)return;let a=null;switch(n){case`prev`:case`next`:a=X(t.options,i.firstValue.value,r);break;case`first`:a=X(t.options,i.firstValue.value,t.options?.[0]);break;case`last`:a=X(t.options,i.firstValue.value,t.options.at(-1))}i.modelValue.value=a}return i.virtualKeydownHook.on(e=>{let n=e.altKey||e.ctrlKey||e.metaKey;if(e.key===`Tab`&&!n)return;let r=Je[e.key];if(n&&e.key===`a`&&i.multiple.value?(e.preventDefault(),i.modelValue.value=[...t.options],r=`last`):e.shiftKey&&r&&p(e,r),[`first`,`last`].includes(r)){e.preventDefault();let n=r===`first`?0:t.options.length-1;l.value.scrollToIndex(n),requestAnimationFrame(()=>{let e=o(),t=r===`first`?e[0]:e.at(-1);t&&i.changeHighlight(t.ref)})}else if(!r&&!n){d.value+=e.key;let t=Number(Ce()?.getAttribute(`data-index`)),n=f.value[t].textContent,r=f.value.map(e=>e.textContent??``),o=Le(r,d.value,n),s=f.value.find(e=>e.textContent===o);s&&(l.value.scrollToIndex(s.index,{align:`start`}),requestAnimationFrame(()=>{let e=a.value.querySelector(`[data-index="${s.index}"]`);e instanceof HTMLElement&&i.changeHighlight(e)}))}}),(e,t)=>(A(),C(`div`,{"data-reka-virtualizer":``,style:s({position:`relative`,width:`100%`,height:`${n(l).getTotalSize()}px`})},[(A(!0),C(j,null,w(u.value,({is:e,item:t})=>(A(),P(F(e),{key:t.index}))),128))],4))}});function Jt(e){let t=r(`inline`),n=r(!1),i=r(),a=O(()=>t.value===`popper`&&!n.value),o;ot({suppressHighlightScroll:a,onHighlightScrollRequest(e){o=e}});function s(e,r){(i.value!==e||t.value!==r)&&(n.value=!1,o=void 0),i.value=e,t.value=r}function c(r){if(i.value!==r||t.value!==`popper`||n.value)return;n.value=!0;let a=o;o=void 0,e.value&&a?.()}function l(e){i.value===e&&(i.value=void 0,t.value=`inline`,n.value=!1,o=void 0)}return{onContentPositionChange:s,onContentPlaced:c,onContentUnmount:l}}var[$,Yt]=W(`ComboboxRoot`),Xt=k({__name:`ComboboxRoot`,props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1},resetSearchTermOnBlur:{type:Boolean,required:!1,default:!0},resetSearchTermOnSelect:{type:Boolean,required:!1,default:!0},openOnFocus:{type:Boolean,required:!1,default:!1},openOnClick:{type:Boolean,required:!1,default:!1},ignoreFilter:{type:Boolean,required:!1},resetModelValueOnClear:{type:Boolean,required:!1,default:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},multiple:{type:Boolean,required:!1},dir:{type:String,required:!1},disabled:{type:Boolean,required:!1},highlightOnHover:{type:Boolean,required:!1,default:!0},by:{type:[String,Function],required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:[`update:modelValue`,`highlight`,`update:open`],setup(e,{expose:t,emit:i}){let a=e,s=i,{primitiveElement:c,currentElement:u}=Y(),{multiple:d,disabled:f,ignoreFilter:p,resetSearchTermOnSelect:m,openOnFocus:g,openOnClick:_,dir:v,resetModelValueOnClear:y,highlightOnHover:ee}=o(a),te=Me(v),x=le(a,`modelValue`,s,{defaultValue:a.defaultValue??(d.value?[]:void 0),passive:a.modelValue===void 0,deep:!0}),S=le(a,`open`,s,{defaultValue:a.defaultOpen,passive:a.open===void 0});async function C(e){S.value=e,B.value=``,e?(await N(),c.value?.highlightSelected(),D.value=!0,re.value?.focus()):(D.value=!1,setTimeout(()=>{!e&&a.resetSearchTermOnBlur&&w.trigger()},1))}let w=se(),D=r(!1),ne=r(!1),re=r(),k=r(),j=O(()=>c.value?.highlightedElement??void 0),F=Jt(S),L=r(new Map),R=r(new Map),{contains:z}=Ne({sensitivity:`base`}),B=r(``),V=O(e=>{if(!B.value||a.ignoreFilter||ne.value)return{count:L.value.size,items:e?.items??new Map,groups:e?.groups??new Set(R.value.keys())};let t=0,n=new Map,r=new Set;for(let[e,r]of L.value){let i=z(r,B.value);n.set(e,+!!i),i&&t++}for(let[e,t]of R.value)for(let i of t)if(n.get(i)>0){r.add(e);break}return{count:t,items:n,groups:r}}),H=b();return T(()=>{H?.exposed&&(H.exposed.highlightItem=c.value?.highlightItem,H.exposed.highlightFirstItem=c.value?.highlightFirstItem,H.exposed.highlightSelected=c.value?.highlightSelected)}),t({filtered:V,highlightedElement:j,highlightItem:c.value?.highlightItem,highlightFirstItem:c.value?.highlightFirstItem,highlightSelected:c.value?.highlightSelected}),Yt({modelValue:x,multiple:d,disabled:f,open:S,onOpenChange:C,...F,contentId:``,isUserInputted:D,isVirtual:ne,inputElement:re,highlightedElement:j,onInputElementChange:e=>re.value=e,triggerElement:k,onTriggerElementChange:e=>k.value=e,parentElement:u,resetSearchTermOnSelect:m,onResetSearchTerm:w.on,allItems:L,allGroups:R,filterSearch:B,filterState:V,ignoreFilter:p,openOnFocus:g,openOnClick:_,resetModelValueOnClear:y}),(e,t)=>(A(),P(n(Ue),null,{default:M(()=>[h(n(st),E({ref_key:`primitiveElement`,ref:c},e.$attrs,{modelValue:n(x),"onUpdate:modelValue":t[0]||=e=>l(x)?x.value=e:null,style:{pointerEvents:n(S)?`auto`:void 0},as:e.as,"as-child":e.asChild,dir:n(te),multiple:n(d),name:e.name,required:e.required,disabled:n(f),"highlight-on-hover":n(ee),by:a.by,onHighlight:t[1]||=e=>s(`highlight`,e)}),{default:M(()=>[I(e.$slots,`default`,{open:n(S),modelValue:n(x)})]),_:3},16,[`modelValue`,`style`,`as`,`as-child`,`dir`,`multiple`,`name`,`required`,`disabled`,`highlight-on-hover`,`by`])]),_:3}))}}),Zt=k({__name:`ComboboxAnchor`,props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let{forwardRef:t}=q();return(e,r)=>(A(),P(n(We),{"as-child":``,reference:e.reference},{default:M(()=>[h(n(G),E({ref:n(t),"as-child":e.asChild,as:e.as},e.$attrs),{default:M(()=>[I(e.$slots,`default`)]),_:3},16,[`as-child`,`as`])]),_:3},8,[`reference`]))}}),[Qt,$t]=W(`ComboboxContent`),en=k({__name:`ComboboxContentImpl`,props:{position:{type:String,required:!1,default:`inline`},bodyLock:{type:Boolean,required:!1},hideWhenEmpty:{type:Boolean,required:!1},memoDependencies:{type:Array,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},dir:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`],setup(e,{emit:t}){let i=e,a=t,{position:s}=o(i),c=$(),l=Symbol(`ComboboxContent`);y(s,e=>c.onContentPositionChange(l,e),{immediate:!0});let u=O(()=>c.ignoreFilter.value?c.allItems.value.size===0:c.filterState.value.count===0),{forwardRef:d,currentElement:f}=q();De(i.bodyLock),Ie(),we(c.parentElement);let p=O(()=>i.position===`popper`?i:{}),m=Be(p.value),g={boxSizing:`border-box`,"--reka-combobox-content-transform-origin":`var(--reka-popper-transform-origin)`,"--reka-combobox-content-available-width":`var(--reka-popper-available-width)`,"--reka-combobox-content-available-height":`var(--reka-popper-available-height)`,"--reka-combobox-trigger-width":`var(--reka-popper-anchor-width)`,"--reka-combobox-trigger-height":`var(--reka-popper-anchor-height)`};$t({position:s});let _=r(!1);T(()=>{c.inputElement.value&&(_.value=f.value.contains(c.inputElement.value),_.value&&c.inputElement.value.focus())}),D(()=>{c.onContentUnmount(l);let e=Ce();_.value&&(!e||e===document.body)&&c.triggerElement.value?.focus()});function v(e){if(c.parentElement.value?.contains(e))return!0;let t=(e instanceof Element?e.closest(`label`):null)?.control;return!!t&&!!c.parentElement.value?.contains(t)}let b={placed:()=>c.onContentPlaced(l)};return(e,t)=>(A(),P(n(ct),{"as-child":``},{default:M(()=>[h(n(Ee),{"as-child":``,onMountAutoFocus:t[5]||=z(()=>{},[`prevent`]),onUnmountAutoFocus:t[6]||=z(()=>{},[`prevent`])},{default:M(()=>[h(n(Ae),{"as-child":``,"disable-outside-pointer-events":e.disableOutsidePointerEvents,onDismiss:t[0]||=e=>n(c).onOpenChange(!1),onFocusOutside:t[1]||=e=>{v(e.target)&&e.preventDefault(),a(`focusOutside`,e)},onInteractOutside:t[2]||=e=>a(`interactOutside`,e),onEscapeKeyDown:t[3]||=e=>a(`escapeKeyDown`,e),onPointerDownOutside:t[4]||=e=>{v(e.target)&&e.preventDefault(),a(`pointerDownOutside`,e)}},{default:M(()=>[(A(),P(F(n(s)===`popper`?n(J):n(G)),E({...e.$attrs,...n(m)},{id:n(c).contentId,ref:n(d),"memo-dependencies":n(s)===`popper`?[n(c).filterSearch.value,n(c).filterState.value]:void 0,"data-state":n(c).open.value?`open`:`closed`,"data-empty":u.value?``:void 0,style:{display:i.hideWhenEmpty&&u.value?`none`:`flex`,flexDirection:`column`,outline:`none`,...n(s)===`popper`?g:{}}},re(n(s)===`popper`?b:{})),{default:M(()=>[I(e.$slots,`default`)]),_:3},16,[`id`,`memo-dependencies`,`data-state`,`data-empty`,`style`]))]),_:3},8,[`disable-outside-pointer-events`])]),_:3})]),_:3}))}}),tn=k({__name:`ComboboxArrow`,props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`svg`}},setup(e){let t=e,r=$(),i=Qt();return q(),(e,a)=>n(r).open.value&&n(i).position.value===`popper`?(A(),P(n(Ge),d(E({key:0},t)),{default:M(()=>[I(e.$slots,`default`)]),_:3},16)):L(`v-if`,!0)}}),nn=k({__name:`ComboboxCancel`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e;q();let r=$();function i(){r.filterSearch.value=``,r.inputElement.value&&(r.inputElement.value.value=``,r.inputElement.value.focus()),r.resetModelValueOnClear?.value&&(r.modelValue.value=r.multiple.value?[]:null)}return(e,r)=>(A(),P(n(G),E({type:e.as===`button`?`button`:void 0},t,{tabindex:`-1`,onClick:i}),{default:M(()=>[I(e.$slots,`default`)]),_:3},16,[`type`]))}}),rn=k({__name:`ComboboxContent`,props:{forceMount:{type:Boolean,required:!1},position:{type:String,required:!1},bodyLock:{type:Boolean,required:!1},hideWhenEmpty:{type:Boolean,required:!1},memoDependencies:{type:Array,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},dir:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`],setup(e,{emit:t}){let r=He(e,t),{forwardRef:i}=q(),a=$();return a.contentId||=V(void 0,`reka-combobox-content`),(e,t)=>(A(),P(n(H),{present:e.forceMount||n(a).open.value},{default:M(()=>[h(en,E({...n(r),...e.$attrs},{ref:n(i)}),{default:M(()=>[I(e.$slots,`default`)]),_:3},16)]),_:3},8,[`present`]))}}),an=k({__name:`ComboboxEmpty`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e,r=$(),i=O(()=>r.ignoreFilter.value?r.allItems.value.size===0:r.filterState.value.count===0);return(e,r)=>i.value?(A(),P(n(G),d(E({key:0},t)),{default:M(()=>[I(e.$slots,`default`,{},()=>
1[r[0]||=g(`No options`)])]),_:3},16)):L(`v-if`,!0)}}),[on,sn]=W(`ComboboxGroup`),cn=k({__name:`ComboboxGroup`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e,r=V(void 0,`reka-combobox-group`),i=$(),a=O(()=>i.ignoreFilter.value?!0:!i.filterSearch.value||i.filterState.value.groups.has(r)),o=sn({id:r,labelId:``});return T(()=>{i.allGroups.value.has(r)||i.allGroups.value.set(r,new Set)}),D(()=>{i.allGroups.value.delete(r)}),(e,i)=>(A(),P(n(dt),E({id:n(r),"aria-labelledby":n(o).labelId},t,{hidden:!a.value||void 0}),{default:M(()=>[I(e.$slots,`default`)]),_:3},16,[`id`,`aria-labelledby`,`hidden`]))}}),ln=k({__name:`ComboboxInput`,props:{displayValue:{type:Function,required:!1},modelValue:{type:String,required:!1},autoFocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`input`}},emits:[`update:modelValue`],setup(e,{emit:t}){let r=e,i=t,a=$(),o=rt(),{primitiveElement:s,currentElement:c}=Y(),u=le(r,`modelValue`,i,{passive:r.modelValue===void 0});T(()=>{c.value&&a.onInputElementChange(c.value)});let{isComposing:d,shouldDeferInput:f,handleCompositionStart:p,handleCompositionUpdate:m,handleCompositionEnd:h}=je(e=>{let t=e.target;t&&_(t.value)});function g(e){d.value||(e.preventDefault(),a.open.value||a.onOpenChange(!0))}function _(e){a.open.value?a.filterSearch.value=e:(a.onOpenChange(!0),N(()=>{e&&(a.filterSearch.value=e,o.highlightFirstItem())}))}function v(e){f.value||_(e.target.value)}function b(){a.openOnFocus.value&&!a.open.value&&a.onOpenChange(!0)}function ee(e){if(!a.open.value)return;let t=e.relatedTarget;if(!t)return;let n=a.parentElement.value?.contains(t),r=document.getElementById(a.contentId)?.contains(t);!n&&!r&&requestAnimationFrame(()=>{if(!a.open.value)return;let e=document.activeElement;!a.parentElement.value?.contains(e)&&!document.getElementById(a.contentId)?.contains(e)&&a.onOpenChange(!1)})}function te(){a.openOnClick.value&&!a.open.value&&a.onOpenChange(!0)}function x(){let e=a.modelValue.value;r.displayValue?u.value=r.displayValue(e):!a.multiple.value&&e&&!Array.isArray(e)?typeof e==`object`?u.value=``:u.value=e.toString():u.value=``,N(()=>{u.value=u.value})}return a.onResetSearchTerm(()=>{x()}),y(a.modelValue,async()=>{!a.isUserInputted.value&&a.resetSearchTermOnSelect.value&&x()},{immediate:!0,deep:!0}),y(a.filterState,(e,t)=>{!a.isVirtual.value&&t.count===0&&o.highlightFirstItem()}),(e,t)=>(A(),P(n(lt),{ref_key:`primitiveElement`,ref:s,modelValue:n(u),"onUpdate:modelValue":t[0]||=e=>l(u)?u.value=e:null,as:e.as,"as-child":e.asChild,"auto-focus":e.autoFocus,disabled:e.disabled,"aria-expanded":n(a).open.value,"aria-controls":n(a).contentId,"aria-autocomplete":`list`,role:`combobox`,autocomplete:`off`,onClick:te,onInput:v,onKeydown:B(g,[`down`,`up`]),onFocus:b,onBlur:ee,onCompositionstart:n(p),onCompositionupdate:n(m),onCompositionend:n(h)},{default:M(()=>[I(e.$slots,`default`)]),_:3},8,[`modelValue`,`as`,`as-child`,`auto-focus`,`disabled`,`aria-expanded`,`aria-controls`,`onCompositionstart`,`onCompositionupdate`,`onCompositionend`]))}}),un=k({__name:`ComboboxItem`,props:{textValue:{type:String,required:!1},value:{type:null,required:!0},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`select`],setup(e,{emit:t}){let r=e,i=t,a=V(void 0,`reka-combobox-item`),o=$(),s=on(null),{primitiveElement:c,currentElement:l}=Y();if(r.value===``)throw Error(`A <ComboboxItem /> must have a value prop that is not an empty string. This is because the Combobox value can be set to an empty string to clear the selection and show the placeholder.`);let d=O(()=>{if(o.isVirtual.value||o.ignoreFilter.value||!o.filterSearch.value)return!0;{let e=o.filterState.value.items.get(a);return e===void 0||e>0}});return T(()=>{o.allItems.value.set(a,r.textValue||l.value.textContent||l.value.innerText);let e=s?.id;e&&(o.allGroups.value.has(e)?o.allGroups.value.get(e)?.add(a):o.allGroups.value.set(e,new Set([a])))}),D(()=>{o.allItems.value.delete(a)}),(e,t)=>
1d.value?x([d.value,n(o).filterSearch.value,n(o).disabled.value,e.disabled,r.value,r.as,r.asChild,...Object.values(e.$attrs)],()=>(A(),P(n(ht),E({key:0},r,{id:n(a),ref_key:`primitiveElement`,ref:c,disabled:n(o).disabled.value||e.disabled,onSelect:t[0]||=t=>{i(`select`,t),!t.defaultPrevented&&(!n(o).multiple.value&&!e.disabled&&!n(o).disabled.value?(t.preventDefault(),n(o).onOpenChange(!1),n(o).modelValue.value=r.value):n(o).multiple.value&&n(o).inputElement.value?.focus())}}),{default:M(()=>[I(e.$slots,`default`,{},()=>[g(u(e.value),1)])]),_:3},16,[`id`,`disabled`])),t,1):L(`v-if`,!0)}}),dn=k({__name:`ComboboxItemIndicator`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let t=e;return(e,r)=>(A(),P(n(gt),d(R(t)),{default:M(()=>[I(e.$slots,`default`)]),_:3},16))}}),fn=k({__name:`ComboboxLabel`,props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`div`}},setup(e){let t=e;q();let r=on({id:``,labelId:``});return r.labelId||=V(void 0,`reka-combobox-group-label`),(e,i)=>(A(),P(n(G),E(t,{id:n(r).labelId}),{default:M(()=>[I(e.$slots,`default`)]),_:3},16,[`id`]))}}),pn=k({__name:`ComboboxPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let t=e;return(e,r)=>(A(),P(n(ke),d(R(t)),{default:M(()=>[I(e.$slots,`default`)]),_:3},16))}}),mn=k({__name:`ComboboxSeparator`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e;return q(),(e,r)=>(A(),P(n(G),E(t,{"aria-hidden":`true`}),{default:M(()=>[I(e.$slots,`default`)]),_:3},16))}}),hn=k({__name:`ComboboxTrigger`,props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e,{forwardRef:r,currentElement:i}=q(),a=$(),o=O(()=>t.disabled||a.disabled.value||!1);return T(()=>{i.value&&a.onTriggerElementChange(i.value)}),(e,i)=>(A(),P(n(G),E(t,{ref:n(r),type:e.as===`button`?`button`:void 0,tabindex:`-1`,"aria-label":`Show popup`,"aria-haspopup":`listbox`,"aria-expanded":n(a).open.value,"aria-controls":n(a).contentId,"data-state":n(a).open.value?`open`:`closed`,disabled:o.value,"data-disabled":o.value?``:void 0,"aria-disabled":o.value??void 0,onClick:i[0]||=e=>n(a).onOpenChange(!n(a).open.value)}),{default:M(()=>[I(e.$slots,`default`)]),_:3},16,[`type`,`aria-expanded`,`aria-controls`,`data-state`,`disabled`,`data-disabled`,`aria-disabled`]))}}),gn=k({__name:`ComboboxVirtualizer`,props:{options:{type:Array,required:!0},overscan:{type:Number,required:!1},estimateSize:{type:[Number,Function],required:!1},textContent:{type:Function,required:!1}},setup(e){let t=e,n=$();return n.isVirtual.value=!0,(e,n)=>(A(),P(qt,d(R(t)),{default:M(t=>[I(e.$slots,`default`,d(R(t)))]),_:3},16))}});function _n(e,t){if(typeof e!=`object`||!e)return!1;let n=K(e,t);return n!=null&&n!==``}function vn(e,t){let n=t?{xs:44,sm:48,md:52,lg:56,xl:60}:{xs:24,sm:28,md:32,lg:36,xl:40};return n[e]??n.md}function yn(e,t,n,r){let i=vn(t,!0),a=vn(t,!1);return r?()=>i:n?t=>_n(e[t],n)?i:a:()=>a}var bn={slots:{base:[`relative group rounded-md inline-flex items-center disabled:cursor-not-allowed disabled:opacity-75`,`transition-colors`],leading:`absolute inset-y-0 start-0 flex items-center`,leadingIcon:`shrink-0 text-dimmed`,leadingAvatar:`shrink-0`,leadingAvatarSize:``,trailing:`absolute inset-y-0 end-0 flex items-center`,trailingIcon:`shrink-0 text-dimmed`,value:`truncate pointer-events-none`,placeholder:`truncate text-dimmed`,arrow:`fill-bg stroke-default`,content:[`max-h-[min(15rem,var(--reka-select-content-available-height,15rem))] w-(--reka-select-trigger-width) bg-default shadow-lg rounded-md ring ring-default overflow-hidden origin-(--reka-select-content-transform-origin) pointer-events-auto flex flex-col`,`max-h-[min(15rem,var(--reka-combobox-content-available-height,15rem))] origin-(--reka-combobox-content-transform-origin) w-(--reka-combobox-trigger-width)`],viewport:`relative scroll-py-1 overflow-y-auto flex-1`,group:`p-1 isolate`,empty:`text-center text-muted`,label:`font-semibold text-highlighted`,separator:`-mx-1 my-1 h-px bg-border`,item:[`group relative w-full flex items-start select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75 text-default data-highlighted:not-data-disabled:text-highlighted data-highlighted:not-data-disabled:before:bg-elevated/50`,`transition-colors before:transition-colors`],itemLeadingIcon:[`shrink-0 text-dimmed group-data-highlighted:not-group-data-disabled:text-default`,`transition-colors`],itemLeadingAvatar:`shrink-0`,itemLeadingAvatarSize:``,itemLeadingChip:`shrink-0`,itemLeadingChipSize:``,itemTrailing:`ms-auto inline-flex gap-1.5 items-center`,itemTrailingIcon:`shrink-0`,itemWrapper:`flex-1 flex flex-col min-w-0`,itemLabel:`truncate`,itemDescription:`truncate text-muted`,input:`border-b border-default`,focusScope:`flex flex-col min-h-0`,trailingClear:`p-0`},variants:{fieldGroup:{horizontal:`not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none focus-visible:z-[1]`,vertical:`not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none focus-visible:z-[1]`},size:{xs:{base:`px-2 py-1 text-sm/4 gap-1`,leading:`ps-2`,trailing:`pe-2`,leadingIcon:`size-4`,leadingAvatarSize:`3xs`,trailingIcon:`size-4`,label:`p-1 text-[10px]/3 gap-1`,item:`p-1 text-xs gap-1`,itemLeadingIcon:`size-4`,itemLeadingAvatarSize:`3xs`,itemLeadingChip:`size-4`,itemLeadingChipSize:`sm`,itemTrailingIcon:`size-4`,empty:`p-2 text-xs`},sm:{base:`px-2.5 py-1.5 text-sm/4 gap-1.5`,leading:`ps-2.5`,trailing:`pe-2.5`,leadingIcon:`size-4`,leadingAvatarSize:`3xs`,trailingIcon:`size-4`,label:`p-1.5 text-[10px]/3 gap-1.5`,item:`p-1.5 text-xs gap-1.5`,itemLeadingIcon:`size-4`,itemLeadingAvatarSize:`3xs`,itemLeadingChip:`size-4`,itemLeadingChipSize:`sm`,itemTrailingIcon:`size-4`,empty:`p-2.5 text-xs`},md:{base:`px-2.5 py-1.5 text-base/5 gap-1.5`,leading:`ps-2.5`,trailing:`pe-2.5`,leadingIcon:`size-5`,leadingAvatarSize:`2xs`,trailingIcon:`size-5`,label:`p-1.5 text-xs gap-1.5`,item:`p-1.5 text-sm gap-1.5`,itemLeadingIcon:`size-5`,itemLeadingAvatarSize:`2xs`,itemLeadingChip:`size-5`,itemLeadingChipSize:`md`,itemTrailingIcon:`size-5`,empty:`p-2.5 text-sm`},lg:{base:`px-3 py-2 text-base/5 gap-2`,leading:`ps-3`,trailing:`pe-3`,leadingIcon:`size-5`,leadingAvatarSize:`2xs`,trailingIcon:`size-5`,label:`p-2 text-xs gap-2`,item:`p-2 text-sm gap-2`,itemLeadingIcon:`size-5`,itemLeadingAvatarSize:`2xs`,itemLeadingChip:`size-5`,itemLeadingChipSize:`md`,itemTrailingIcon:`size-5`,empty:`p-3 text-sm`},xl:{base:`px-3 py-2 text-base gap-2`,leading:`ps-3`,trailing:`pe-3`,leadingIcon:`size-6`,leadingAvatarSize:`xs`,trailingIcon:`size-6`,label:`p-2 text-sm gap-2`,item:`p-2 text-base gap-2`,itemLeadingIcon:`size-6`,itemLeadingAvatarSize:`xs`,itemLeadingChip:`size-6`,itemLeadingChipSize:`lg`,itemTrailingIcon:`size-6`,empty:`p-3 text-base`}},variant:{outline:`text-highlighted bg-default ring ring-inset ring-accented hover:bg-elevated disabled:bg-default`,soft:`text-highlighted bg-elevated/50 hover:bg-elevated focus:bg-elevated disabled:bg-elevated/50`,subtle:`text-highlighted bg-elevated ring ring-inset ring-accented hover:bg-accented/75 disabled:bg-elevated`,ghost:`text-highlighted bg-transparent hover:bg-elevated focus:bg-elevated disabled:bg-transparent dark:disabled:bg-transparent`,none:`text-highlighted bg-transparent focus:outline-none`},color:{primary:``,secondary:``,success:``,info:``,warning:``,error:``,neutral:``},leading:{true:``},trailing:{true:``},loading:{true:``},highlight:{true:``},fixed:{false:``},type:{file:`file:me-1.5 file:font-medium file:text-muted file:outline-none`},position:{popper:{content:`data-[state=open]:animate-[scale-in_100ms_var(--ease-out)] data-[state=closed]:animate-[scale-out_100ms_var(--ease-out)]`},"item-aligned":{content:``}},multiple:{true:``},virtualize:{true:{viewport:`p-1 isolate`},false:{viewport:`divide-y divide-default`}}},compoundVariants:[{color:`primary`,variant:[`outline`,`subtle`],class:`outline-primary/25 focus-visible:outline-3 focus-visible:ring-primary`},{color:`secondary`,variant:[`outline`,`subtle`],class:`outline-secondary/25 focus-visible:outline-3 focus-visible:ring-secondary`},{color:`success`,variant:[`outline`,`subtle`],class:`outline-success/25 focus-visible:outline-3 focus-visible:ring-success`},{color:`info`,variant:[`outline`,`subtle`],class:`outline-info/25 focus-visible:outline-3 focus-visible:ring-info`},{color:`warning`,variant:[`outline`,`subtle`],class:`outline-warning/25 focus-visible:outline-3 focus-visible:ring-warning`},{color:`error`,variant:[`outline`,`subtle`],class:`outline-error/25 focus-visible:outline-3 focus-visible:ring-error`},{color:`primary`,variant:[`soft`,`ghost`],class:`outline-primary/25 focus-visible:outline-3`},{color:`secondary`,variant:[`soft`,`ghost`],class:`outline-secondary/25 focus-visible:outline-3`},{color:`success`,variant:[`soft`,`ghost`],class:`outline-success/25 focus-visible:outline-3`},{color:`info`,variant:[`soft`,`ghost`],class:`outline-info/25 focus-visible:outline-3`},{color:`warning`,variant:[`soft`,`ghost`],class:`outline-warning/25 focus-visible:outline-3`},{color:`error`,variant:[`soft`,`ghost`],class:`outline-error/25 focus-visible:outline-3`},{color:`primary`,highlight:!0,class:`ring ring-inset ring-primary`},{color:`secondary`,highlight:!0,class:`ring ring-inset ring-secondary`},{color:`success`,highlight:!0,class:`ring ring-inset ring-success`},{color:`info`,highlight:!0,class:`ring ring-inset ring-info`},{color:`warning`,highlight:!0,class:`ring ring-inset ring-warning`},{color:`error`,highlight:!0,class:`ring ring-inset ring-error`},{color:`neutral`,variant:[`outline`,`subtle`],class:`outline-inverted/25 focus-visible:outline-3 focus-visible:ring-inverted`},{color:`neutral`,variant:[`soft`,`ghost`],class:`outline-inverted/25 focus-visible:outline-3`},{color:`neutral`,highlight:!0,class:`ring ring-inset ring-inverted`},{leading:!0,size:`xs`,class:`ps-7`},{leading:!0,size:`sm`,class:`ps-8`},{leading:!0,size:`md`,class:`ps-9`},{leading:!0,size:`lg`,class:`ps-10`},{leading:!0,size:`xl`,class:`ps-11`},{trailing:!0,size:`xs`,class:`pe-7`},{trailing:!0,size:`sm`,class:`pe-8`},{trailing:!0,size:`md`,class:`pe-9`},{trailing:!0,size:`lg`,class:`pe-10`},{trailing:!0,size:`xl`,class:`pe-11`},{loading:!0,leading:!0,class:{leadingIcon:`animate-spin`}},{loading:!0,leading:!1,trailing:!0,class:{trailingIcon:`animate-spin`}},{fixed:!1,size:`xs`,class:`md:text-xs`},{fixed:!1,size:`sm`,class:`md:text-xs`},{fixed:!1,size:`md`,class:`md:text-sm`},{fixed:!1,size:`lg`,class:`md:text-sm`}],defaultVariants:{size:`md`,color:`primary`,variant:`outline`,position:`popper`}},xn=Object.assign({inheritAttrs:!1},{__name:`USelectMenu`,props:m({id:{type:String,required:!1},placeholder:{type:String,required:!1},searchInput:{type:[Boolean,Object],required:!1,default:!0},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},required:{type:Boolean,required:!1},trailingIcon:{type:null,required:!1},selectedIcon:{type:null,required:!1},clear:{type:[Boolean,Object],required:!1},clearIcon:{type:null,required:!1},content:{type:Object,required:!1},arrow:{type:[Boolean,Object],required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},virtualize:{type:[Boolean,Object],required:!1,default:!1},valueKey:{type:null,required:!1},labelKey:{type:null,required:!1,default:`label`},descriptionKey:{type:null,required:!1,default:`description`},items:{type:null,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1},modelModifiers:{type:null,required:!1},multiple:{type:Boolean,required:!1},highlight:{type:Boolean,required:!1},fixed:{type:Boolean,required:!1},createItem:{type:[Boolean,String,Object],required:!1},filterFields:{type:Array,required:!1},ignoreFilter:{type:Boolean,required:!1},autofocus:{type:Boolean,required:!1},autofocusDelay:{type:Number,required:!1,default:0},class:{type:null,required:!1},ui:{type:Object,required:!1},open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},name:{type:String,required:!1},resetSearchTermOnBlur:{type:Boolean,required:!1,default:!0},resetSearchTermOnSelect:{type:Boolean,required:!1,default:!0},resetModelValueOnClear:{type:Boolean,required:!1,default:!0},highlightOnHover:{type:Boolean,required:!1},by:{type:[String,Function],required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:null,required:!1},trailing:{type:Boolean,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1}},{searchTerm:{type:String,default:``},searchTermModifiers:{}}),emits:m([`change`,`blur`,`focus`,`create`,`clear`,`highlight`,`update:modelValue`,`update:open`],[`update:searchTerm`]),setup(a,{expose:o,emit:s}){let l=a,p=s,m=ee(),v=pe(`selectMenu`,l),b=_(a,`searchTerm`,{type:String,default:``}),{t:x}=Qe(),D=ie(),{filterGroups:ne}=Pe(),re=Se(ce(v,`modelValue`,`defaultValue`,`open`,`defaultOpen`,`required`,`multiple`,`resetSearchTermOnBlur`,`resetSearchTermOnSelect`,`resetModelValueOnClear`,`highlightOnHover`,`by`),p),k=Oe(i(()=>v.portal)),F=i(()=>e(v.content,{side:`bottom`,sideOffset:8,collisionPadding:8,position:`popper`})),V=i(()=>e(v.arrow,{rounded:!0}
1)),H=O(()=>typeof v.clear==`object`?v.clear:{}),ae=i(()=>v.virtualize?e(typeof v.virtualize==`boolean`?{}:v.virtualize,{estimateSize:yn(Je.value,ze.value??`md`,v.descriptionKey,!!m[`item-description`])}):!1),U=i(()=>e(v.searchInput,{placeholder:x(`selectMenu.search`),variant:`none`,fixed:v.fixed})),{emitFormBlur:oe,emitFormFocus:se,emitFormInput:le,emitFormChange:de,size:W,color:G,id:Ce,name:we,highlight:Te,disabled:De,ariaAttrs:ke}=Ze(l),{orientation:Ae,size:je}=_e(l),{isLeading:Me,isTrailing:Ne,leadingIconName:Fe,trailingIconName:Ie}=Ye(O(()=>({icon:v.icon,leading:v.leading,leadingIcon:v.leadingIcon,trailing:v.trailing,trailingIcon:v.trailingIcon??D.ui.icons.chevronDown,loading:v.loading,loadingIcon:v.loadingIcon}))),Le=O(()=>G.value??v.color),Re=O(()=>Te.value??v.highlight),ze=O(()=>je.value??W.value??v.size),q=O(()=>De.value??v.disabled),[Be,He]=ue(),[Ue,We]=ue({props:{item:{type:[Object,String,Number,Boolean],required:!0},index:{type:Number,required:!1}}}),J=O(()=>ye({extend:bn,...D.ui?.selectMenu||{}})({color:Le.value,variant:v.variant,size:ze.value,loading:v.loading,highlight:Re.value,fixed:v.fixed,leading:Me.value||!!v.avatar||!!m.leading,trailing:Ne.value||!!m.trailing,fieldGroup:Ae.value,virtualize:!!v.virtualize,multiple:v.multiple}));function Ge(e){if(v.multiple&&Array.isArray(e)){let t=e.map(e=>ve(Ke.value,e,{labelKey:v.labelKey,valueKey:v.valueKey,by:v.by})).filter(e=>e!=null&&e!==``);return t.length>0?t.join(`, `):void 0}return ve(Ke.value,e,{labelKey:v.labelKey,valueKey:v.valueKey,by:v.by})}let Y=O(()=>v.items?.length?he(v.items)?v.items:[v.items]:[]),Ke=O(()=>Y.value.flatMap(e=>e)),qe=O(()=>{if(v.ignoreFilter||!b.value)return Y.value;let e=Array.isArray(v.filterFields)?v.filterFields:[v.labelKey];return ne(Y.value,b.value,{fields:e,isStructural:e=>Q(e)&&!!e.type&&[`label`,`separator`].includes(e.type)})}),Je=O(()=>qe.value.flatMap(e=>e)),X=O(()=>{if(!v.createItem||!b.value)return!1;let e=v.valueKey?{[v.valueKey]:b.value}:b.value;return typeof v.createItem==`object`&&v.createItem.when===`always`||v.createItem===`always`?!Je.value.find(t=>me(t,e,v.by??v.valueKey)):!Je.value.length}),et=O(()=>typeof v.createItem==`object`?v.createItem.position:`bottom`),tt=te(`triggerRef`);function nt(){v.autofocus&&tt.value?.$el?.focus({focusVisible:!0})}let Z;T(()=>{Z=setTimeout(()=>{nt()},v.autofocusDelay)}),c(()=>clearTimeout(Z));function rt(e){if(t(v.modelValue)===e)return;v.modelModifiers?.trim&&(typeof e==`string`||e==null)&&(e=e?.trim()??null),v.modelModifiers?.number&&(e=fe(e)),v.modelModifiers?.nullable&&(e??=null),v.modelModifiers?.optional&&!v.modelModifiers?.nullable&&e!==null&&(e??=void 0);let n=new Event(`change`,{target:{value:e}});p(`change`,n),de(),le(),v.resetSearchTermOnSelect&&(b.value=``)}let it=r(!1),at;c(()=>clearTimeout(at));function ot(e){if(it.value=e,e){let e=new FocusEvent(`focus`);p(`focus`,e),se(),clearTimeout(at)}else{let e=new FocusEvent(`blur`);p(`blur`,e),oe(),v.resetSearchTermOnBlur&&(at=setTimeout(()=>{b.value=``},100))}}function st(e){if(it.value)return;let t=e.currentTarget;e.preventDefault(),t.click()}function ct(e){e.preventDefault(),e.stopPropagation(),p(`create`,b.value)}function lt(e,t){if(Q(t)){if(t.disabled){e.preventDefault();return}t.onSelect?.(e)}}function Q(e){return typeof e==`object`&&!!e}function ut(e){return v.multiple&&Array.isArray(e)?e.length===0:e==null||e===``}function dt(){q.value||p(`clear`)}function ft(e){U.value.autofocus===!1&&e.preventDefault()}let pt=te(`viewportRef`),mt=te(`comboboxRootRef`);return y(()=>v.items,async()=>{it.value&&v.createItem&&(await N(),mt.value?.highlightFirstItem?.())},{flush:`post`}),o({triggerRef:i(()=>tt.value?.$el),viewportRef:i(()=>pt.value)}),(e,t)=>(A(),C(j,null,[h(n(Be),null,{default:M(()=>[h(n(un),{"data-slot":`item`,class:f(J.value.item({class:n(v).ui?.item})),value:b.value,onSelect:ct},{default:M(()=>[S(`span`,{"data-slot":`itemLabel`,class:f(J.value.itemLabel({class:n(v).ui?.itemLabel}))},[I(e.$slots,`create-item-label`,{item:b.value},()=>[g(u(n(x)(`selectMenu.create`,{label:b.value})),1)])],2)]),_:3},8,[`class`,`value`])]),_:3}
1),h(n(Ue),null,{default:M(({item:t,index:r})=>[Q(t)&&t.type===`label`?(A(),P(n(fn),{key:0,"data-slot":`label`,class:f(J.value.label({class:[n(v).ui?.label,t.ui?.label,t.class]}))},{default:M(()=>[g(u(n(K)(t,n(v).labelKey)),1)]),_:2},1032,[`class`])):Q(t)&&t.type===`separator`?(A(),P(n(mn),{key:1,"data-slot":`separator`,class:f(J.value.separator({class:[n(v).ui?.separator,t.ui?.separator,t.class]}))},null,8,[`class`])):(A(),P(n(un),{key:2,"data-slot":`item`,class:f(J.value.item({class:[n(v).ui?.item,Q(t)&&t.ui?.item,Q(t)&&t.class]})),disabled:Q(t)&&t.disabled,value:n(v).valueKey&&Q(t)?n(K)(t,n(v).valueKey):t,onSelect:e=>lt(e,t)},{default:M(()=>[I(e.$slots,`item`,{item:t,index:r,ui:J.value},()=>[I(e.$slots,`item-leading`,{item:t,index:r,ui:J.value},()=>[Q(t)&&t.icon?(A(),P(Ve,{key:0,name:t.icon,"data-slot":`itemLeadingIcon`,class:f(J.value.itemLeadingIcon({class:[n(v).ui?.itemLeadingIcon,t.ui?.itemLeadingIcon]}))},null,8,[`name`,`class`])):Q(t)&&t.avatar?(A(),P(be,E({key:1,size:t.ui?.itemLeadingAvatarSize||n(v).ui?.itemLeadingAvatarSize||J.value.itemLeadingAvatarSize()},t.avatar,{"data-slot":`itemLeadingAvatar`,class:J.value.itemLeadingAvatar({class:[n(v).ui?.itemLeadingAvatar,t.ui?.itemLeadingAvatar]})}),null,16,[`size`,`class`])):Q(t)&&t.chip?(A(),P(ge,E({key:2,size:t.ui?.itemLeadingChipSize||n(v).ui?.itemLeadingChipSize||J.value.itemLeadingChipSize(),inset:``,standalone:``},t.chip,{"data-slot":`itemLeadingChip`,class:J.value.itemLeadingChip({class:[n(v).ui?.itemLeadingChip,t.ui?.itemLeadingChip]})}),null,16,[`size`,`class`])):L(``,!0)]),S(`span`,{"data-slot":`itemWrapper`,class:f(J.value.itemWrapper({class:[n(v).ui?.itemWrapper,Q(t)&&t.ui?.itemWrapper]}))},[S(`span`,{"data-slot":`itemLabel`,class:f(J.value.itemLabel({class:[n(v).ui?.itemLabel,Q(t)&&t.ui?.itemLabel]}))},[I(e.$slots,`item-label`,{item:t,index:r},()=>[g(u(Q(t)?n(K)(t,n(v).labelKey):t),1)])],2),Q(t)&&(n(K)(t,n(v).descriptionKey)||m[`item-description`])?(A(),C(`span`,{key:0,"data-slot":`itemDescription`,class:f(J.value.itemDescription({class:[n(v).ui?.itemDescription,Q(t)&&t.ui?.itemDescription]}))},[I(e.$slots,`item-description`,{item:t,index:r},()=>[g(u(n(K)(t,n(v).descriptionKey)),1)])],2)):L(``,!0)],2),S(`span`,{"data-slot":`itemTrailing`,class:f(J.value.itemTrailing({class:[n(v).ui?.itemTrailing,Q(t)&&t.ui?.itemTrailing]}))},[I(e.$slots,`item-trailing`,{item:t,index:r,ui:J.value}),h(n(dn),{"as-child":``},{default:M(()=>[h(Ve,{name:n(v).selectedIcon||n(D).ui.icons.check,"data-slot":`itemTrailingIcon`,class:f(J.value.itemTrailingIcon({class:[n(v).ui?.itemTrailingIcon,Q(t)&&t.ui?.itemTrailingIcon]}))},null,8,[`name`,`class`])]),_:2},1024)],2)])]),_:2},1032,[`class`,`disabled`,`value`,`onSelect`]))]),_:3}),h(n(Xt),E({ref_key:`comboboxRootRef`,ref:mt},n(re),{"ignore-filter":``,"as-child":``,name:n(we),disabled:q.value,"onUpdate:modelValue":rt,"onUpdate:open":ot}),{default:M(({modelValue:r,open:i})=>[h(n(Zt),{"as-child":``},{default:M(()=>[h(n(hn),E({id:n(Ce),ref_key:`triggerRef`,ref:tt,"data-slot":`base`,class:J.value.base({class:[n(v).ui?.base,n(v).class]}),tabindex:`0`},{"aria-label":void 0,...e.$attrs,...n(ke)},{onKeydown:[B(st,[`down`]),B(st,[`up`])]}),{default:M(()=>[n(Me)||n(v).avatar||m.leading?(A(),C(`span`,{key:0,"data-slot":`leading`,class:f(J.value.leading({class:n(v).ui?.leading}))},[I(e.$slots,`leading`,{modelValue:r,open:i,ui:J.value},()=>[n(Me)&&n(Fe)?(A(),P(Ve,{key:0,name:n(Fe),"data-slot":`leadingIcon`,class:f(J.value.leadingIcon({class:n(v).ui?.leadingIcon}))},null,8,[`name`,`class`])):n(v).avatar?(A(),P(be,E({key:1,size:n(v).ui?.itemLeadingAvatarSize||J.value.itemLeadingAvatarSize()},n(v).avatar,{"data-slot":`itemLeadingAvatar`,class:J.value.itemLeadingAvatar({class:n(v).ui?.itemLeadingAvatar})}),null,16,[`size`,`class`])):L(``,!0)])],2)):L(``,!0),I(e.$slots,`default`,{modelValue:r,open:i,ui:J.value},()=>[(A(!0),C(j,null,w([Ge(r)],e=>(A(),C(j,{key:e},[e==null?(A(),C(`span`,{key:1,"data-slot":`placeholder`,class:f(J.value.placeholder({class:n(v).ui?.placeholder}))},u(n(v).placeholder??`\xA0`),3)):(A(),C(`span`,{key:0,"data-slot":`value`,class:f(J.value.value({class:n(v).ui?.value}))},u(e),3))],64))),128))]),n(Ne)||m.trailing||n(v).clear?(A(),C(`span`,{key:1,"data-slot":`trailing`,class:f(J.value.trailing({class:n(v).ui?.trailing}))},[I(e.$slots,`trailing`,{modelValue:r,open:i,ui:J.value},()=>[n(v).clear&&!q.value&&!ut(r)?(A(),P(n(nn),{key:0,"as-child":``},{default:M(()=>[h(Xe,E({as:`span`,icon:n(v).clearIcon||n(D).ui.icons.close,size:ze.value,variant:`link`,color:`neutral`,tabindex:`-1`},H.value,{"data-slot":`trailingClear`,class:J.value.trailingClear({class:n(v).ui?.trailingClear}),onClick:z(dt,[`stop`])}),null,16,[`icon`,`size`,`class`])]),_:1})):n(Ie)?(A(),P(Ve,{key:1,name:n(Ie),"data-slot":`trailingIcon`,class:f(J.value.trailingIcon({class:n(v).ui?.trailingIcon}))},null,8,[`name`,`class`])):L(``,!0)])],2)):L(``,!0)]),_:2},1040,[`id`,`class`])]),_:2},1024),h(n(pn),d(R(n(k))),{default:M(()=>[h(n(xe),null,{default:M(()=>[h(n(rn),E({"data-slot":`content`,class:J.value.content({class:n(v).ui?.content})},F.value),{default:M(()=>[h(n(Ee),{trapped:``,"data-slot":`focusScope`,class:f(J.value.focusScope({class:n(v).ui?.focu
1sScope})),onMountAutoFocus:ft},{default:M(()=>[I(e.$slots,`content-top`),n(v).searchInput?(A(),P(n(ln),{key:0,modelValue:b.value,"onUpdate:modelValue":t[1]||=e=>b.value=e,"display-value":()=>b.value,"as-child":``},{default:M(()=>[h($e,E({autofocus:``,autocomplete:`off`,size:ze.value},U.value,{"model-modifiers":{trim:n(v).modelModifiers?.trim},"data-slot":`input`,class:J.value.input({class:n(v).ui?.input}),onChange:t[0]||=z(()=>{},[`stop`])}),null,16,[`size`,`model-modifiers`,`class`])]),_:1},8,[`modelValue`,`display-value`])):L(``,!0),h(n(an),{"data-slot":`empty`,class:f(J.value.empty({class:n(v).ui?.empty}))},{default:M(()=>[I(e.$slots,`empty`,{searchTerm:b.value},()=>[g(u(b.value?n(x)(`selectMenu.noMatch`,{searchTerm:b.value}):n(x)(`selectMenu.noData`)),1)])]),_:3},8,[`class`]),S(`div`,{ref_key:`viewportRef`,ref:pt,role:`presentation`,"data-slot":`viewport`,class:f(J.value.viewport({class:n(v).ui?.viewport}))},[n(v).virtualize?(A(),C(j,{key:0},[X.value&&et.value===`top`?(A(),P(n(He),{key:0})):L(``,!0),h(n(gn),E({options:Je.value,"text-content":e=>
1Q(e)?n(K)(e,n(v).labelKey):String(e)},ae.value),{default:M(({option:e,virtualItem:t})=>[h(n(We),{item:e,index:t.index},null,8,[`item`,`index`])]),_:1},16,[`options`,`text-content`]),X.value&&et.value===`bottom`?(A(),P(n(He),{key:1})):L(``,!0)],64)):(A(),C(j,{key:1},[X.value&&et.value===`top`?(A(),P(n(cn),{key:0,"data-slot":`group`,class:f(J.value.group({class:n(v).ui?.group}))},{default:M(()=>[h(n(He))]),_:1},8,[`class`])):L(``,!0),(A(!0),C(j,null,w(qe.value,(e,t)=>(A(),P(n(cn),{key:`group-${t}`,"data-slot":`group`,class:f(J.value.group({class:n(v).ui?.group}))},{default:M(()=>[(A(!0),C(j,null,w(e,(e,r)=>(A(),P(n(We),{key:`group-${t}-${r}`,item:e,index:r},null,8,[`item`,`index`]))),128))]),_:2},1032,[`class`]))),128)),X.value&&et.value===`bottom`?(A(),P(n(cn),{key:1,"data-slot":`group`,class:f(J.value.group({class:n(v).ui?.group}))},{default:M(()=>[h(n(He))]),_:1},8,[`class`])):L(``,!0)],64))],2),I(e.$slots,`content-bottom`)]),_:3},8,[`class`]),n(v).arrow?(A(),P(n(tn),E({key:0},V.value,{"data-slot":`arrow`,class:J.value.arrow({class:n(v).ui?.arrow})}),null,16,[`class`])):L(``,!0)]),_:3},16,[`class`])]),_:3})]),_:3},16)]),_:3},16,[`name`,`disabled`])],64))}});export{et as i,Gt as n,Kt as r,xn as t};
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.