PageSourceSearch

https://oew-b2c.pages.dev/_nuxt/D_yEjp1J.js

js oew-b2c.pages.dev collected 2026-10-03 05:29:30 UTC 54,920 bytes, 4 lines download raw bytes

1import{bm as pt,bd as qe,b$ as He,bH as Ue,bI as De,bJ as bt,bW as mt,c0 as ht,bM as ie,c1 as Pe,c2 as gt,c3 as yt,bP as Ot,bL as me,bK as St,c4 as Be}from"./CeBkcFdT.js";import{d as g,u as Ie,y as It,w as X,o as xt,Q as Fe,b as $,F as Ae,z as G,I as ce,i as Ve,l as ye,A as ve,n as H,V as ze,r as Ct,B as ke,N as Rt,c as L,X as te,R as N,Y as se,M as K,a6 as _,a7 as P,_ as he,U as le,a9 as ne,S as Se,a8 as re,Z as Re,J as Mt,aa as wt,ac as Tt,a2 as Le,T as Et,t as Me,ax as At}from"./bHGN7eKL.js";import{o as Te,t as je}from"./Db9Tl-1-.js";import{i as ue,b as C,A as ee,N as fe,o as z,u as U,T as xe,l as Ke,a as ae,t as Qe,E as Je,s as Vt}from"./CxDNZeNt.js";import{i as zt,n as kt,w as Ge,O as Ye,a as $t,h as Dt}from"./Q2Xbmkci.js";import{s as Xe}from"./DWCIUJv3.js";import{c as V,u as Ze,i as Pt,f as Ee,p as Bt}from"./R47RSu1j.js";import{f as _e,u as et}from"./DztSFLEE.js";import{u as Ft}from"./CEY6xG2W.js";import{u as Lt}from"./QG8GSRO6.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},u=new e.Error().stack;u&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[u]="ba17bfc9-a732-4364-80cd-c7665bb65de4",e._sentryDebugIdIdentifier="sentry-dbid-ba17bfc9-a732-4364-80cd-c7665bb65de4")}catch{}})();function de(e,u,n){let o=n.initialDeps??[],t;return()=>{var i,l,a,m;let c;n.key&&((i=n.debug)!=null&&i.call(n))&&(c=Date.now());const d=e();if(!(d.length!==o.length||d.some((w,M)=>o[M]!==w)))return t;o=d;let f;if(n.key&&((l=n.debug)!=null&&l.call(n))&&(f=Date.now()),t=u(...d),n.key&&((a=n.debug)!=null&&a.call(n))){const w=Math.round((Date.now()-c)*100)/100,M=Math.round((Date.now()-f)*100)/100,R=M/16,B=(k,O)=>{for(k=String(k);k.length<O;)k=" "+k;return k};console.info(`%c⏱ ${B(M,5)} /${B(w,5)} ms`,`
2            font-size: .6rem;
3            font-weight: bold;
4            color: hsl(${Math.max(0,Math.min(120-120*R,120))}deg 100% 31%);`,n==null?void 0:n.key)}return(m=n==null?void 0:n.onChange)==null||m.call(n,t),t}}function we(e,u){if(e===void 0)throw new Error("Unexpected undefined");return e}const jt=(e,u)=>Math.abs(e-u)<1,Nt=(e,u,n)=>{let o;return function(...t){e.clearTimeout(o),o=e.setTimeout(()=>u.apply(this,t),n)}},Wt=e=>e,qt=e=>{const u=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),o=[];for(let t=u;t<=n;t++)o.push(t);return o},Ht=(e,u)=>{const n=e.scrollElement;if(!n)return;const o=e.targetWindow;if(!o)return;const t=l=>{const{width:a,height:m}=l;u({width:Math.round(a),height:Math.round(m)})};if(t(n.getBoundingClientRect()),!o.ResizeObserver)return()=>{};const i=new o.ResizeObserver(l=>{const a=()=>{const m=l[0];if(m!=null&&m.borderBoxSize){const c=m.borderBoxSize[0];if(c){t({width:c.inlineSize,height:c.blockSize});return}}t(n.getBoundingClientRect())};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()});return i.observe(n,{box:"border-box"}),()=>{i.unobserve(n)}},Ne={passive:!0},We=typeof window>"u"?!0:"onscrollend"in window,Ut=(e,u)=>{const n=e.scrollElement;if(!n)return;const o=e.targetWindow;if(!o)return;let t=0;const i=e.options.useScrollendEvent&&We?()=>{}:Nt(o,()=>{u(t,!1)},e.options.isScrollingResetDelay),l=d=>()=>{const{horizontal:s,isRtl:f}=e.options;t=s?n.scrollLeft*(f&&-1||1):n.scrollTop,i(),u(t,d)},a=l(!0),m=l(!1);m(),n.addEventListener("scroll",a,Ne);const c=e.options.useScrollendEvent&&We;return c&&n.addEventListener("scrollend",m,Ne),()=>{n.removeEventListener("scroll",a),c&&n.removeEventListener("scrollend",m)}},Kt=(e,u,n)=>{if(u!=null&&u.borderBoxSize){const o=u.borderBoxSize[0];if(o)return Math.round(o[n.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[n.options.horizontal?"width":"height"])}
vendor: 5,211 bytes, line 4
4,Qt=(e,{adjustments:u=0,behavior:n},o)=>{var t,i;const l=e+u;(i=(t=o.scrollElement)==null?void 0:t.scrollTo)==null||i.call(t,{[o.options.horizontal?"left":"top"]:l,behavior:n})};class Jt{constructor(u){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const o=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(t=>{t.forEach(i=>{const l=()=>{this._measureElement(i.target,i)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()})}));return{disconnect:()=>{var t;(t=o())==null||t.disconnect(),n=null},observe:t=>{var i;return(i=o())==null?void 0:i.observe(t,{box:"border-box"})},unobserve:t=>{var i;return(i=o())==null?void 0:i.unobserve(t)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([o,t])=>{typeof t>"u"&&delete n[o]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Wt,rangeExtractor:qt,onChange:()=>{},measureElement:Kt,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!0,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var o,t;(t=(o=this.options).onChange)==null||t.call(o,this,n)},this.maybeNotify=de(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{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(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const o=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==o){if(this.cleanup(),!o){this.maybeNotify();return}this.scrollElement=o,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(t=>{this.observer.observe(t)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,t=>{this.scrollRect=t,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(t,i)=>{this.scrollAdjustments=0,this.scrollDirection=i?this.getScrollOffset()<t?"forward":"backward":null,this.scrollOffset=t,this.isScrolling=i,this.maybeNotify()}))}},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.getFurthestMeasurement=(n,o)=>{const t=new Map,i=new Map;for(let l=o-1;l>=0;l--){const a=n[l];if(t.has(a.lane))continue;const m=i.get(a.lane);if(m==null||a.end>m.end?i.set(a.lane,a):a.end<m.end&&t.set(a.lane,!0),t.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((l,a)=>l.end===a.end?l.index-a.index:l.end-a.end)[0]:void 0},this.getMeasurementOptions=de(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,o,t,i,l)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:o,scrollMargin:t,getItemKey:i,enabled:l}),{key:!1}),this.getMeasurements=de(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:o,scrollMargin:t,getItemKey:i,enabled:l},a)=>{if(!l)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(d=>{this.itemSizeCache.set(d.key,d.size)}));const m=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const c=this.measurementsCache.slice(0,m);for(let d=m;d<n;d++){const s=i(d),f=this.options.lanes===1?c[d-1]:this.getFurthestMeasurement(c,d),w=f?f.end+this.options.gap:o+t,M=a.get(s),R=typeof M=="number"?M:this.options.estimateSize(d),B=w+R,k=f?f.lane:d%this.options.lanes;c[d]={index:d,start:w,size:R,end:B,key:s,lane:k}}return this.measurementsCache=c,c},{key:!1,debug:()=>this.options.debug}),this.calculateRange=de(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,o,t,i)=>this.range=n.length>0&&o>0?Gt({measurements:n,outerSize:o,scrollOffset:t,lanes:i}):null,{key:!1,debug:()=>this.options.debug}
vendor: 1,553 bytes, line 4
4),this.getVirtualIndexes=de(()=>{let n=null,o=null;const t=this.calculateRange();return t&&(n=t.startIndex,o=t.endIndex),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,o]},(n,o,t,i,l)=>i===null||l===null?[]:n({startIndex:i,endIndex:l,overscan:o,count:t}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const o=this.options.indexAttribute,t=n.getAttribute(o);return t?parseInt(t,10):(console.warn(`Missing attribute name '${o}={index}' on measured element.`),-1)},this._measureElement=(n,o)=>{const t=this.indexFromElement(n),i=this.measurementsCache[t];if(!i)return;const l=i.key,a=this.elementsCache.get(l);a!==n&&(a&&this.observer.unobserve(a),this.observer.observe(n),this.elementsCache.set(l,n)),n.isConnected&&this.resizeItem(t,this.options.measureElement(n,o,this))},this.resizeItem=(n,o)=>{const t=this.measurementsCache[n];if(!t)return;const i=this.itemSizeCache.get(t.key)??t.size,l=o-i;l!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(t,l,this):t.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=l,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(t.index),this.itemSizeCache=new Map(this.itemSizeCache.set(t.key,o)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((o,t)=>{o.isConnected||(this.observer.unobserve(o),this.elementsCache.delete(t))});return}this._measureElement(n,void 0)},this.getVirtualItems=de(()=>
4[this.getVirtualIndexes(),this.getMeasurements()],(n,o)=>{const t=[];for(let i=0,l=n.length;i<l;i++){const a=n[i],m=o[a];t.push(m)}return t},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const o=this.getMeasurements();if(o.length!==0)return we(o[tt(0,o.length-1,t=>we(o[t]).start,n)])},this.getOffsetForAlignment=(n,o,t=0)=>{const i=this.getSize(),l=this.getScrollOffset();o==="auto"&&(o=n>=l+i?"end":"start"),o==="center"?n+=(t-i)/2:o==="end"&&(n-=i);const a=this.options.horizontal?"scrollWidth":"scrollHeight",c=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[a]:this.scrollElement[a]:0)-i;return Math.max(Math.min(c,n),0)},this.getOffsetForIndex=(n,o="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const t=this.measurementsCache[n];if(!t)return;const i=this.getSize(),l=this.getScrollOffset();if(o==="auto")if(t.end>=l+i-this.options.scrollPaddingEnd)o="end";else if(t.start<=l+this.options.scrollPaddingStart)o="start";else return[l,o];const a=o==="end"?t.end+this.options.scrollPaddingEnd:t.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,o,t.size),o]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(n,{align:o="start",behavior:t}={})=>{this.cancelScrollToIndex(),t==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,o),{adjustments:void 0,behavior:t})},this.scrollToIndex=(n,{align:o="auto",behavior:t}={})=>{n=Math.max(0,Math.min(n,this.options.count-1)),this.cancelScrollToIndex(),t==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const i=this.getOffsetForIndex(n,o);if(!i)return;const[l,a]=i;this._scrollToOffset(l,{adjustments:void 0,behavior:t}),t!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(n))){const[c]=we(this.getOffsetForIndex(n,a));jt(c,this.getScrollOffset())||this.scrollToIndex(n,{align:a,behavior:t})}else this.scrollToIndex(n,{align:a,behavior:t})}))},this.scrollBy=(n,{behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:o})},this.getTotalSize=()=>{var n;const o=this.getMeasurements();let t;return o.length===0?t=this.options.paddingStart:t=this.options.lanes===1?((n=o[o.length-1])==null?void 0:n.end)??0:Math.max(...o.slice(-this.options.lanes).map(i=>i.end)),Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:o,behavior:t})=>{this.options.scrollToFn(n,{behavior:t,adjustments:o},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(u)}}const tt=(e,u,n,o)=>{for(;e<=u;){const t=(e+u)/2|0,i=n(t);if(i<o)e=t+1;else if(i>o)u=t-1;else return t}return e>0?e-1:0};function Gt({measurements:e,outerSize:u,scrollOffset:n,lanes:o}){const t=e.length-1;let l=tt(0,t,m=>e[m].start,n),a=l;for(;a<t&&e[a].end<n+u;)a++;return o>1&&(l=Math.max(0,l-l%o),a=Math.min(t,a+(o-1-a%o))),{startIndex:l,endIndex:a}}function Yt(e){const u=new Jt(Ie(e)),n=It(u),o=u._didMount();return X(()=>Ie(e).getScrollElement(),t=>{t&&u._willUpdate()},{immediate:!0}),X(()=>Ie(e),t=>{u.setOptions({...t,onChange:(i,l)=>{var a;Fe(n),(a=t.onChange)==null||a.call(t,i,l)}}),u._willUpdate(),Fe(n)},{immediate:!0}),xt(o),n}function Xt(e){return Yt(g(()=>({observeElementRect:Ht,observeElementOffset:Ut,scrollToFn:Qt,...Ie(e)})))}function lt(e,u,n){let o=$(n==null?void 0:n.value),t=g(()=>e.value!==void 0);return[g(()=>t.value?e.value:o.value),function(i){return t.value||(o.value=i),u==null?void 0:u(i)}]}function Zt(){let e=Te();return Ae(()=>
4e.dispose()),e}function _t(){let e=Zt();return u=>{e.dispose(),e.nextFrame(u)}}var nt=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(nt||{});function $e(e={},u=null,n=[]){for(let[o,t]of Object.entries(e))ot(n,at(u,o),t);return n}function at(e,u){return e?e+"["+u+"]":u}function ot(e,u,n){if(Array.isArray(n))for(let[o,t]of n.entries())ot(e,at(u,o.toString()),t);else n instanceof Date?e.push([u,n.toISOString()]):typeof n=="boolean"?e.push([u,n?"1":"0"]):typeof n=="string"?e.push([u,n]):typeof n=="number"?e.push([u,`${n}`]):n==null?e.push([u,""]):$e(n,u,e)}var el={};function tl(e,u){return e===u}var ll=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(ll||{}),nl=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(nl||{}),al=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(al||{});let it=Symbol("ComboboxContext");function pe(e){let u=Ve(it,null);if(u===null){let n=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,pe),n}return u}let ut=Symbol("VirtualContext"),ol=G({name:"VirtualProvider",setup(e,{slots:u}){let n=pe("VirtualProvider"),o=g(()=>{let a=C(n.optionsRef);if(!a)return{start:0,end:0};let m=window.getComputedStyle(a);return{start:parseFloat(m.paddingBlockStart||m.paddingTop),end:parseFloat(m.paddingBlockEnd||m.paddingBottom)}}),t=Xt(g(()=>({scrollPaddingStart:o.value.start,scrollPaddingEnd:o.value.end,count:n.virtual.value.options.length,estimateSize(){return 40},getScrollElement(){return C(n.optionsRef)},overscan:12}))),i=g(()=>{var a;return(a=n.virtual.value)==null?void 0:a.options}),l=$(0);return X([i],()=>{l.value+=1}),ke(ut,n.virtual.value?t:null),()=>[ve("div",{style:{position:"relative",width:"100%",height:`${t.value.getTotalSize()}px`},ref:a=>{if(a){if(typeof process<"u"&&el.JEST_WORKER_ID!==void 0||n.activationTrigger.value===0)return;n.activeOptionIndex.value!==null&&n.virtual.value.options.length>n.activeOptionIndex.value&&t.value.scrollToIndex(n.activeOptionIndex.value)}}},t.value.getVirtualItems().map(a=>Rt(u.default({option:n.virtual.value.options[a.index],open:n.comboboxState.value===0})[0],{key:`${l.value}-${a.index}`,"data-index":a.index,"aria-setsize":n.virtual.value.options.length,"aria-posinset":a.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${a.start}px)`,overflowAnchor:"none"}})))]}}),il=G({name:"Combobox",emits:{"update:modelValue":e=>!0},props:{as:{type:[Object,String],default:"template"},disabled:{type:[Boolean],default:!1},by:{type:[String,Function],nullable:!0,default:null},modelValue:{type:[Object,String,Number,Boolean],default:void 0},defaultValue:{type:[Object,String,Number,Boolean],default:void 0},form:{type:String,optional:!0},name:{type:String,optional:!0},nullable:{type:Boolean,default:!1},multiple:{type:[Boolean],default:!1},immediate:{type:[Boolean],default:!1},virtual:{type:Object,default:null}},inheritAttrs:!1,setup(e,{slots:u,attrs:n,emit:o}){let t=$(1),i=$(null),l=$(null),a=$(null),m=$(null),c=$({static:!1,hold:!1}),d=$([]),s=$(null),f=$(2),w=$(!1);function M(b=y=>y){let y=s.value!==null?d.value[s.value]:null,x=b(d.value.slice()),T=x.length>0&&x[0].dataRef.order.value!==null?x.sort((F,q)=>F.dataRef.order.value-q.dataRef.order.value):Ye(x,F=>C(F.dataRef.domRef)),D=y?T.indexOf(y):null;return D===-1&&(D=null),{options:T,activeOptionIndex:D}}let R=g(()=>e.multiple?1:0),B=g(()=>e.nullable),[k,O]=lt(g(()=>e.modelValue),b=>o("update:modelValue",b),g(()=>e.defaultValue)),v=g(()=>k.value===void 0?U(R.value,{1:[],0:void 0}):k.value),h=null,r=null;function S(b){return U(R.value,{0(){return O==null?void 0:O(b)},1:()=>{let y=L(p.value.value).slice(),x=L(b),T=y.findIndex(D=>p.compare(x,L(D)));return T===-1?y.push(x):y.splice(T,1),O==null?void 0:O(y)}})}let I=g(()=>{});X([I],([b],[y])=>{if(p.virtual.value&&b&&y&&s.value!==null){let x=b.indexOf(y[s.value]);x!==-1?s.value=x:s.value=null}});let p={comboboxState:t,value:v,mode:R,compare(b,y){if(typeof e.by=="string"){let x=e.by;return(b==null?void 0:b[x])===(y==null?void 0:y[x])}return e.by===null?tl(b,y):e.by(b,y)},calculateIndex(b){return p.virtual.value?e.by===null?p.virtual.value.options.indexOf(b):p.virtual.value.options.findIndex(y=>p.compare(y,b)):d.value.findIndex(y=>p.compare(y.dataRef.value,b))},defaultValue:g(()=>e.defaultValue),nullable:B,immediate:g(()=>!1),virtual:g(()=>null),inputRef:l,labelRef:i,buttonRef:a,optionsRef:m,disabled:g(()=>e.disabled),options:d,change(b){O(b)},activeOptionIndex:g(()=>{if(w.value&&s.value===null&&(p.virtual.value?p.virtual.value.options.length>0:d.value.length>0)){if(p.virtual.value){let y=p.virtual.value.options.findIndex(x=>{var T;return!((T=p.virtual.value)!=null&&T.disabled(x))});if(y!==-1)return y}let b=d.value.findIndex(y=>!y.dataRef.disabled);if(b!==-1)return b}return s.value}),activationTrigger:f,optionsPropsRef:c,closeCombobox(){w.value=!1,!e.disabled&&t.value!==1&&(t.value=1,s.value=null)},openCombobox(){if(w.value=!0,!e.disabled&&t.value!==0){if(p.value.value){let b=p.calculateIndex(p.value.value);b!==-1&&(s.value=b)}t.value=0}},setActivationTrigger(b){f.value=b},goToOption(b,y,x){w.value=!1,h!==null&&cancelAnimationFrame(h),h=requestAnimationFrame(()=>{if(e.disabled||m.value&&!c.value.static&&t.value===1)return;if(p.virtual.value){s.value=b===V.Specific?y:Ee({focus:b},{resolveItems:()=>p.virtual.value.options,resolveActiveIndex:()=>{var F,q;return(q=(F=p.activeOptionIndex.value)!=null?F:p.virtual.value.options.findIndex(Q=>{var oe;return!((oe=p.virtual.value)!=null&&oe.disabled(Q))}
4))!=null?q:null},resolveDisabled:F=>p.virtual.value.disabled(F),resolveId(){throw new Error("Function not implemented.")}}),f.value=x??2;return}let T=M();if(T.activeOptionIndex===null){let F=T.options.findIndex(q=>!q.dataRef.disabled);F!==-1&&(T.activeOptionIndex=F)}let D=b===V.Specific?y:Ee({focus:b},{resolveItems:()=>T.options,resolveActiveIndex:()=>T.activeOptionIndex,resolveId:F=>F.id,resolveDisabled:F=>F.dataRef.disabled});s.value=D,f.value=x??2,d.value=T.options})},selectOption(b){let y=d.value.find(T=>T.id===b);if(!y)return;let{dataRef:x}=y;S(x.value)},selectActiveOption(){if(p.activeOptionIndex.value!==null){if(p.virtual.value)S(p.virtual.value.options[p.activeOptionIndex.value]);else{let{dataRef:b}=d.value[p.activeOptionIndex.value];S(b.value)}p.goToOption(V.Specific,p.activeOptionIndex.value)}},registerOption(b,y){let x=Ct({id:b,dataRef:y});if(p.virtual.value){d.value.push(x);return}r&&cancelAnimationFrame(r);let T=M(D=>(D.push(x),D));s.value===null&&p.isSelected(y.value.value)&&(T.activeOptionIndex=T.options.indexOf(x)),d.value=T.options,s.value=T.activeOptionIndex,f.value=2,T.options.some(D=>!C(D.dataRef.domRef))&&(r=requestAnimationFrame(()=>{let D=M();d.value=D.options,s.value=D.activeOptionIndex}))},unregisterOption(b,y){if(h!==null&&cancelAnimationFrame(h),y&&(w.value=!0),p.virtual.value){d.value=d.value.filter(T=>T.id!==b);return}let x=M(T=>{let D=T.findIndex(F=>F.id===b);return D!==-1&&T.splice(D,1),T});d.value=x.options,s.value=x.activeOptionIndex,f.value=2},isSelected(b){return U(R.value,{0:()=>p.compare(L(p.value.value),L(b)),1:()=>L(p.value.value).some(y=>p.compare(L(y),L(b)))})},isActive(b){return s.value===p.calculateIndex(b)}};Ge([l,a,m],()=>p.closeCombobox(),g(()=>t.value===0)),ke(it,p),Qe(g(()=>U(t.value,{0:ae.Open,1:ae.Closed})));let E=g(()=>{var b;return(b=C(l))==null?void 0:b.closest("form")});return ce(()=>{X([E],()=>{if(!E.value||e.defaultValue===void 0)return;function b(){p.change(e.defaultValue)}return E.value.addEventListener("reset",b),()=>{var y;(y=E.value)==null||y.removeEventListener("reset",b)}},{immediate:!0})}),()=>{var b,y,x;let{name:T,disabled:D,form:F,...q}=e,Q={open:t.value===0,disabled:D,activeIndex:p.activeOptionIndex.value,activeOption:p.activeOptionIndex.value===null?null:p.virtual.value?p.virtual.value.options[(b=p.activeOptionIndex.value)!=null?b:0]:(x=(y=p.options.value[p.activeOptionIndex.value])==null?void 0:y.dataRef.value)!=null?x:null,value:v.value};return ve(ze,[...T!=null&&v.value!=null?$e({[T]:v.value}).map(([oe,Z])=>ve(_e,Je({features:et.Hidden,key:oe,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:F,disabled:D,name:oe,value:Z}))):[],ee({theirProps:{...n,...xe(q,["by","defaultValue","immediate","modelValue","multiple","nullable","onUpdate:modelValue","virtual"])},ourProps:{},slot:Q,slots:u,attrs:n,name:"Combobox"})])}}}),ul=G({name:"ComboboxButton",props:{as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(e,{attrs:u,slots:n,expose:o}){var t;let i=(t=e.id)!=null?t:`headlessui-combobox-button-${ue()}`,l=pe("ComboboxButton");o({el:l.buttonRef,$el:l.buttonRef});function a(d){l.disabled.value||(l.comboboxState.value===0?l.closeCombobox():(d.preventDefault(),l.openCombobox()),H(()=>{var s;return(s=C(l.inputRef))==null?void 0:s.focus({preventScroll:!0})}
4))}function m(d){switch(d.key){case z.ArrowDown:d.preventDefault(),d.stopPropagation(),l.comboboxState.value===1&&l.openCombobox(),H(()=>{var s;return(s=l.inputRef.value)==null?void 0:s.focus({preventScroll:!0})});return;case z.ArrowUp:d.preventDefault(),d.stopPropagation(),l.comboboxState.value===1&&(l.openCombobox(),H(()=>{l.value.value||l.goToOption(V.Last)})),H(()=>{var s;return(s=l.inputRef.value)==null?void 0:s.focus({preventScroll:!0})});return;case z.Escape:if(l.comboboxState.value!==0)return;d.preventDefault(),l.optionsRef.value&&!l.optionsPropsRef.value.static&&d.stopPropagation(),l.closeCombobox(),H(()=>{var s;return(s=l.inputRef.value)==null?void 0:s.focus({preventScroll:!0})});return}}let c=Xe(g(()=>({as:e.as,type:u.type})),l.buttonRef);return()=>{var d,s;let f={open:l.comboboxState.value===0,disabled:l.disabled.value,value:l.value.value},{...w}=e,M={ref:l.buttonRef,id:i,type:c.value,tabindex:"-1","aria-haspopup":"listbox","aria-controls":(d=C(l.optionsRef))==null?void 0:d.id,"aria-expanded":l.comboboxState.value===0,"aria-labelledby":l.labelRef.value?[(s=C(l.labelRef))==null?void 0:s.id,i].join(" "):void 0,disabled:l.disabled.value===!0?!0:void 0,onKeydown:m,onClick:a};return ee({ourProps:M,theirProps:w,slot:f,attrs:u,slots:n,name:"ComboboxButton"})}}}),sl=G({name:"ComboboxInput",props:{as:{type:[Object,String],default:"input"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},displayValue:{type:Function},defaultValue:{type:String,default:void 0},id:{type:String,default:null}},emits:{change:e=>!0},setup(e,{emit:u,attrs:n,slots:o,expose:t}){var i;let l=(i=e.id)!=null?i:`headlessui-combobox-input-${ue()}`,a=pe("ComboboxInput"),m=g(()=>zt(C(a.inputRef))),c={value:!1};t({el:a.inputRef,$el:a.inputRef});function d(){a.change(null);let r=C(a.optionsRef);r&&(r.scrollTop=0),a.goToOption(V.Nothing)}let s=g(()=>{var r;let S=a.value.value;return C(a.inputRef)?typeof e.displayValue<"u"&&S!==void 0?(r=e.displayValue(S))!=null?r:"":typeof S=="string"?S:"":""});ce(()=>{X([s,a.comboboxState,m],([r,S],[I,p])=>{if(c.value)return;let E=C(a.inputRef);E&&((p===0&&S===1||r!==I)&&(E.value=r),requestAnimationFrame(()=>{var b;if(c.value||!E||((b=m.value)==null?void 0:b.activeElement)!==E)return;let{selectionStart:y,selectionEnd:x}=E;Math.abs((x??0)-(y??0))===0&&y===0&&E.setSelectionRange(E.value.length,E.value.length)}))},{immediate:!0}),X([a.comboboxState],([r],[S])=>{if(r===0&&S===1){if(c.value)return;let I=C(a.inputRef);if(!I)return;let p=I.value,{selectionStart:E,selectionEnd:b,selectionDirection:y}=I;I.value="",I.value=p,y!==null?I.setSelectionRange(E,b,y):I.setSelectionRange(E,b)}})});let f=$(!1);function w(){f.value=!0}function M(){Te().nextFrame(()=>{f.value=!1})}let R=_t();function B(r){switch(c.value=!0,R(()=>{c.value=!1}),r.key){case z.Enter:if(c.value=!1,a.comboboxState.value!==0||f.value)return;if(r.preventDefault(),r.stopPropagation(),a.activeOptionIndex.value===null){a.closeCombobox();return}a.selectActiveOption(),a.mode.value===0&&a.closeCombobox();break;case z.ArrowDown:return c.value=!1,r.preventDefault(),r.stopPropagation(),U(a.comboboxState.value,{0:()=>a.goToOption(V.Next),1:()=>a.openCombobox()});case z.ArrowUp:return c.value=!1,r.preventDefault(),r.stopPropagation(),U(a.comboboxState.value,{0:()=>a.goToOption(V.Previous),1:()=>{a.openCombobox(),H(()=>{a.value.value||a.goToOption(V.Last)})}});case z.Home:if(r.shiftKey)break;return c.value=!1,r.preventDefault(),r.stopPropagation(),a.goToOption(V.First);case z.PageUp:return c.value=!1,r.preventDefault(),r.stopPropagation(),a.goToOption(V.First);case z.End:if(r.shiftKey)break;return c.value=!1,r.preventDefault(),r.stopPropagation(),a.goToOption(V.Last);case z.PageDown:return c.value=!1,r.preventDefault(),r.stopPropagation(),a.goToOption(V.Last);case z.Escape:if(c.value=!1,a.comboboxState.value!==0)return;r.preventDefault(),a.optionsRef.value&&!a.optionsPropsRef.value.static&&r.stopPropagation(),a.nullable.value&&a.mode.value===0&&a.value.value===null&&d(),a.closeCombobox();break;case z.Tab:if(c.value=!1,a.comboboxState.value!==0)return;a.mode.value===0&&a.activationTrigger.value!==1&&a.selectActiveOption(),a.closeCombobox();break}}function k(r){u("change",r),a.nullable.value&&a.mode.value===0&&r.target.value===""&&d(),a.openCombobox()}function O(r){var S,I,p;let E=(S=r.relatedTarget)!=null?S:je.find(b=>b!==r.currentTarget);if(c.value=!1,!((I=C(a.optionsRef))!=null&&I.contains(E))&&!((p=C(a.buttonRef))!=null&&p.contains(E))&&a.comboboxState.value===0)return r.preventDefault(),a.mode.value===0&&(a.nullable.value&&a.value.value===null?d():a.activationTrigger.value!==1&&a.selectActiveOption()),a.closeCombobox()}function v(r){var S,I,p;let E=(S=r.relatedTarget)!=null?S:je.find(b=>b!==r.currentTarget);(I=C(a.buttonRef))!=null&&I.contains(E)||(p=C(a.optionsRef))!=null&&p.contains(E)||a.disabled.value||a.immediate.value&&a.comboboxState.value!==0&&(a.openCombobox(),Te().nextFrame(()=>{a.setActivationTrigger(1)}))}let h=g(()=>{var r,S,I,p;return(p=(I=(S=e.defaultValue)!=null?S:a.defaultValue.value!==void 0?(r=e.displayValue)==null?void 0:r.call(e,a.defaultValue.value):null)!=null?I:a.defaultValue.value)!=null?p:""});return()=>{var r,S,I,p,E,b,y;
4let x={open:a.comboboxState.value===0},{displayValue:T,onChange:D,...F}=e,q={"aria-controls":(r=a.optionsRef.value)==null?void 0:r.id,"aria-expanded":a.comboboxState.value===0,"aria-activedescendant":a.activeOptionIndex.value===null?void 0:a.virtual.value?(S=a.options.value.find(Q=>!a.virtual.value.disabled(Q.dataRef.value)&&a.compare(Q.dataRef.value,a.virtual.value.options[a.activeOptionIndex.value])))==null?void 0:S.id:(I=a.options.value[a.activeOptionIndex.value])==null?void 0:I.id,"aria-labelledby":(b=(p=C(a.labelRef))==null?void 0:p.id)!=null?b:(E=C(a.buttonRef))==null?void 0:E.id,"aria-autocomplete":"list",id:l,onCompositionstart:w,onCompositionend:M,onKeydown:B,onInput:k,onFocus:v,onBlur:O,role:"combobox",type:(y=n.type)!=null?y:"text",tabIndex:0,ref:a.inputRef,defaultValue:h.value,disabled:a.disabled.value===!0?!0:void 0};return ee({ourProps:q,theirProps:F,slot:x,attrs:n,slots:o,features:fe.RenderStrategy|fe.Static,name:"ComboboxInput"})}}}),rl=G({name:"ComboboxOptions",props:{as:{type:[Object,String],default:"ul"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},hold:{type:[Boolean],default:!1}},setup(e,{attrs:u,slots:n,expose:o}){let t=pe("ComboboxOptions"),i=`headlessui-combobox-options-${ue()}`;o({el:t.optionsRef,$el:t.optionsRef}),ye(()=>{t.optionsPropsRef.value.static=e.static}),ye(()=>{t.optionsPropsRef.value.hold=e.hold});let l=Ke(),a=g(()=>l!==null?(l.value&ae.Open)===ae.Open:t.comboboxState.value===0);Pt({container:g(()=>C(t.optionsRef)),enabled:g(()=>t.comboboxState.value===0),accept(c){return c.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:c.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(c){c.setAttribute("role","none")}});function m(c){c.preventDefault()}return()=>{var c,d,s;let f={open:t.comboboxState.value===0},w={"aria-labelledby":(s=(c=C(t.labelRef))==null?void 0:c.id)!=null?s:(d=C(t.buttonRef))==null?void 0:d.id,id:i,ref:t.optionsRef,role:"listbox","aria-multiselectable":t.mode.value===1?!0:void 0,onMousedown:m},M=xe(e,["hold"]);return ee({ourProps:w,theirProps:M,slot:f,attrs:u,slots:t.virtual.value&&t.comboboxState.value===0?{...n,default:()=>[ve(ol,{},n.default)]}:n,features:fe.RenderStrategy|fe.Static,visible:a.value,name:"ComboboxOptions"})}}}),dl=G({name:"ComboboxOption",props:{as:{type:[Object,String],default:"li"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},order:{type:[Number],default:null}},setup(e,{slots:u,attrs:n,expose:o}){let t=pe("ComboboxOption"),i=`headlessui-combobox-option-${ue()}`,l=$(null),a=g(()=>e.disabled);o({el:l,$el:l});let m=g(()=>{var O;return t.virtual.value?t.activeOptionIndex.value===t.calculateIndex(e.value):t.activeOptionIndex.value===null?!1:((O=t.options.value[t.activeOptionIndex.value])==null?void 0:O.id)===i}),c=g(()=>t.isSelected(e.value)),d=Ve(ut,null),s=g(()=>({disabled:e.disabled,value:e.value,domRef:l,order:g(()=>e.order)}));ce(()=>t.registerOption(i,s)),Ae(()=>t.unregisterOption(i,m.value)),ye(()=>{let O=C(l);O&&(d==null||d.value.measureElement(O))}),ye(()=>{t.comboboxState.value===0&&m.value&&(t.virtual.value||t.activationTrigger.value!==0&&H(()=>{var O,v;return(v=(O=C(l))==null?void 0:O.scrollIntoView)==null?void 0:v.call(O,{block:"nearest"})}))});function f(O){O.preventDefault(),O.button===nt.Left&&(a.value||(t.selectOption(i),kt()||requestAnimationFrame(()=>{var v;return(v=C(t.inputRef))==null?void 0:v.focus({preventScroll:!0})}),t.mode.value===0&&t.closeCombobox()))}function w(){var O;if(e.disabled||(O=t.virtual.value)!=null&&O.disabled(e.value))return t.goToOption(V.Nothing);let v=t.calculateIndex(e.value);t.goToOption(V.Specific,v)}let M=Ze();function R(O){M.update(O)}function B(O){var v;if(!M.wasMoved(O)||e.disabled||(v=t.virtual.value)!=null&&v.disabled(e.value)||m.value)return;let h=t.calculateIndex(e.value);t.goToOption(V.Specific,h,0)}function k(O){var v;M.wasMoved(O)&&(e.disabled||(v=t.virtual.value)!=null&&v.disabled(e.value)||m.value&&(t.optionsPropsRef.value.hold||t.goToOption(V.Nothing)))}return()=>{let{disabled:O}=e,v={active:m.value,selected:c.value,disabled:O},h={id:i,ref:l,role:"option",tabIndex:O===!0?void 0:-1,"aria-disabled":O===!0?!0:void 0,"aria-selected":c.value,disabled:void 0,onMousedown:f,onFocus:w,onPointerenter:R,onMouseenter:R,onPointermove:B,onMousemove:B,onPointerleave:k,onMouseleave:k},r=xe(e,["order","value"]);return ee({ourProps:h,theirProps:r,slot:v,attrs:n,slots:u,name:"ComboboxOption"})}}});function cl(e,u){return e===u}var vl=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(vl||{}),fl=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(fl||{}),pl=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(pl||{});function bl(e){requestAnimationFrame(()=>requestAnimationFrame(e))}let st=Symbol("ListboxContext");function Ce(e){let u=Ve(st,null);if(u===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Ce),n}return u}let ml=G({name:"Listbox",emits:{"update:modelValue":e=>!0},props:{as:{type:[Object,String],default:"template"},disabled:{type:[Boolean],default:!1},by:{type:[String,Function],default:()=>cl},horizontal:{type:[Boolean],default:!1},modelValue:{type:[Object,String,Number,Boolean],default:void 0},defaultValue:{type:[Object,String,Number,Boolean],default:void 0},form:{type:String,optional:!0},name:{type:String,optional:!0},multiple:{type:[Boolean],default:!1}},inheritAttrs:!1,setup(e,{slots:u,attrs:n,emit:o}){let t=$(1),i=$(null),l=$(null),a=$(null),m=$([]),c=$(""),d=$(null),s=$(1);function f(v=h=>h){let h=d.value!==null?m.value[d.value]:null,r=Ye(v(m.value.slice()),I=>C(I.dataRef.domRef)),S=h?r.indexOf(h):null;return S===-1&&(S=null),{options:r,activeOptionIndex:S}}let w=g(()=>e.multiple?1:0),[M,R]=lt(g(()=>e.modelValue),v=>o("update:modelValue",v),g(()=>e.defaultValue)),B=g(()=>M.value===void 0?U(w.value,{1:[],0:void 0}
4):M.value),k={listboxState:t,value:B,mode:w,compare(v,h){if(typeof e.by=="string"){let r=e.by;return(v==null?void 0:v[r])===(h==null?void 0:h[r])}return e.by(v,h)},orientation:g(()=>e.horizontal?"horizontal":"vertical"),labelRef:i,buttonRef:l,optionsRef:a,disabled:g(()=>e.disabled),options:m,searchQuery:c,activeOptionIndex:d,activationTrigger:s,closeListbox(){e.disabled||t.value!==1&&(t.value=1,d.value=null)},openListbox(){e.disabled||t.value!==0&&(t.value=0)},goToOption(v,h,r){if(e.disabled||t.value===1)return;let S=f(),I=Ee(v===V.Specific?{focus:V.Specific,id:h}:{focus:v},{resolveItems:()=>S.options,resolveActiveIndex:()=>S.activeOptionIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.disabled});c.value="",d.value=I,s.value=r??1,m.value=S.options},search(v){if(e.disabled||t.value===1)return;let h=c.value!==""?0:1;c.value+=v.toLowerCase();let r=(d.value!==null?m.value.slice(d.value+h).concat(m.value.slice(0,d.value+h)):m.value).find(I=>I.dataRef.textValue.startsWith(c.value)&&!I.dataRef.disabled),S=r?m.value.indexOf(r):-1;S===-1||S===d.value||(d.value=S,s.value=1)},clearSearch(){e.disabled||t.value!==1&&c.value!==""&&(c.value="")},registerOption(v,h){let r=f(S=>[...S,{id:v,dataRef:h}]);m.value=r.options,d.value=r.activeOptionIndex},unregisterOption(v){let h=f(r=>{let S=r.findIndex(I=>I.id===v);return S!==-1&&r.splice(S,1),r});m.value=h.options,d.value=h.activeOptionIndex,s.value=1},theirOnChange(v){e.disabled||R(v)},select(v){e.disabled||R(U(w.value,{0:()=>v,1:()=>{let h=L(k.value.value).slice(),r=L(v),S=h.findIndex(I=>k.compare(r,L(I)));return S===-1?h.push(r):h.splice(S,1),h}}))}};Ge([l,a],(v,h)=>{var r;k.closeListbox(),$t(h,Dt.Loose)||(v.preventDefault(),(r=C(l))==null||r.focus())},g(()=>t.value===0)),ke(st,k),Qe(g(()=>U(t.value,{0:ae.Open,1:ae.Closed})));let O=g(()=>{var v;return(v=C(l))==null?void 0:v.closest("form")});return ce(()=>{X([O],()=>{if(!O.value||e.defaultValue===void 0)return;function v(){k.theirOnChange(e.defaultValue)}return O.value.addEventListener("reset",v),()=>{var h;(h=O.value)==null||h.removeEventListener("reset",v)}},{immediate:!0})}),()=>{let{name:v,modelValue:h,disabled:r,form:S,...I}=e,p={open:t.value===0,disabled:r,value:B.value};return ve(ze,[...v!=null&&B.value!=null?$e({[v]:B.value}).map(([E,b])=>ve(_e,Je({features:et.Hidden,key:E,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:S,disabled:r,name:E,value:b}))):[],ee({ourProps:{},theirProps:{...n,...xe(I,["defaultValue","onUpdate:modelValue","horizontal","multiple","by"])},slot:p,slots:u,attrs:n,name:"Listbox"})])}}}),hl=G({name:"ListboxButton",props:{as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(e,{attrs:u,slots:n,expose:o}){var t;let i=(t=e.id)!=null?t:`headlessui-listbox-button-${ue()}`,l=Ce("ListboxButton");o({el:l.buttonRef,$el:l.buttonRef});function a(s){switch(s.key){case z.Space:case z.Enter:case z.ArrowDown:s.preventDefault(),l.openListbox(),H(()=>{var f;(f=C(l.optionsRef))==null||f.focus({preventScroll:!0}),l.value.value||l.goToOption(V.First)});break;case z.ArrowUp:s.preventDefault(),l.openListbox(),H(()=>{var f;(f=C(l.optionsRef))==null||f.focus({preventScroll:!0}),l.value.value||l.goToOption(V.Last)});break}}function m(s){switch(s.key){case z.Space:s.preventDefault();break}}function c(s){l.disabled.value||(l.listboxState.value===0?(l.closeListbox(),H(()=>{var f;return(f=C(l.buttonRef))==null?void 0:f.focus({preventScroll:!0})}
4)):(s.preventDefault(),l.openListbox(),bl(()=>{var f;return(f=C(l.optionsRef))==null?void 0:f.focus({preventScroll:!0})})))}let d=Xe(g(()=>({as:e.as,type:u.type})),l.buttonRef);return()=>{var s,f;let w={open:l.listboxState.value===0,disabled:l.disabled.value,value:l.value.value},{...M}=e,R={ref:l.buttonRef,id:i,type:d.value,"aria-haspopup":"listbox","aria-controls":(s=C(l.optionsRef))==null?void 0:s.id,"aria-expanded":l.listboxState.value===0,"aria-labelledby":l.labelRef.value?[(f=C(l.labelRef))==null?void 0:f.id,i].join(" "):void 0,disabled:l.disabled.value===!0?!0:void 0,onKeydown:a,onKeyup:m,onClick:c};return ee({ourProps:R,theirProps:M,slot:w,attrs:u,slots:n,name:"ListboxButton"})}}}),gl=G({name:"ListboxOptions",props:{as:{type:[Object,String],default:"ul"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:null}},setup(e,{attrs:u,slots:n,expose:o}){var t;let i=(t=e.id)!=null?t:`headlessui-listbox-options-${ue()}`,l=Ce("ListboxOptions"),a=$(null);o({el:l.optionsRef,$el:l.optionsRef});function m(s){switch(a.value&&clearTimeout(a.value),s.key){case z.Space:if(l.searchQuery.value!=="")return s.preventDefault(),s.stopPropagation(),l.search(s.key);case z.Enter:if(s.preventDefault(),s.stopPropagation(),l.activeOptionIndex.value!==null){let f=l.options.value[l.activeOptionIndex.value];l.select(f.dataRef.value)}l.mode.value===0&&(l.closeListbox(),H(()=>{var f;return(f=C(l.buttonRef))==null?void 0:f.focus({preventScroll:!0})}
4));break;case U(l.orientation.value,{vertical:z.ArrowDown,horizontal:z.ArrowRight}):return s.preventDefault(),s.stopPropagation(),l.goToOption(V.Next);case U(l.orientation.value,{vertical:z.ArrowUp,horizontal:z.ArrowLeft}):return s.preventDefault(),s.stopPropagation(),l.goToOption(V.Previous);case z.Home:case z.PageUp:return s.preventDefault(),s.stopPropagation(),l.goToOption(V.First);case z.End:case z.PageDown:return s.preventDefault(),s.stopPropagation(),l.goToOption(V.Last);case z.Escape:s.preventDefault(),s.stopPropagation(),l.closeListbox(),H(()=>{var f;return(f=C(l.buttonRef))==null?void 0:f.focus({preventScroll:!0})});break;case z.Tab:s.preventDefault(),s.stopPropagation();break;default:s.key.length===1&&(l.search(s.key),a.value=setTimeout(()=>l.clearSearch(),350));break}}let c=Ke(),d=g(()=>c!==null?(c.value&ae.Open)===ae.Open:l.listboxState.value===0);return()=>{var s,f;let w={open:l.listboxState.value===0},{...M}=e,R={"aria-activedescendant":l.activeOptionIndex.value===null||(s=l.options.value[l.activeOptionIndex.value])==null?void 0:s.id,"aria-multiselectable":l.mode.value===1?!0:void 0,"aria-labelledby":(f=C(l.buttonRef))==null?void 0:f.id,"aria-orientation":l.orientation.value,id:i,onKeydown:m,role:"listbox",tabIndex:0,ref:l.optionsRef};return ee({ourProps:R,theirProps:M,slot:w,attrs:u,slots:n,features:fe.RenderStrategy|fe.Static,visible:d.value,name:"ListboxOptions"})}}}),yl=G({name:"ListboxOption",props:{as:{type:[Object,String],default:"li"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},id:{type:String,default:null}},setup(e,{slots:u,attrs:n,expose:o}){var t;let i=(t=e.id)!=null?t:`headlessui-listbox-option-${ue()}`,l=Ce("ListboxOption"),a=$(null);o({el:a,$el:a});let m=g(()=>l.activeOptionIndex.value!==null?l.options.value[l.activeOptionIndex.value].id===i:!1),c=g(()=>U(l.mode.value,{0:()=>l.compare(L(l.value.value),L(e.value)),1:()=>L(l.value.value).some(v=>l.compare(L(v),L(e.value)))})),d=g(()=>U(l.mode.value,{1:()=>{var v;let h=L(l.value.value);return((v=l.options.value.find(r=>h.some(S=>l.compare(L(S),L(r.dataRef.value)))))==null?void 0:v.id)===i},0:()=>c.value})),s=Bt(a),f=g(()=>({disabled:e.disabled,value:e.value,get textValue(){return s()},domRef:a}));ce(()=>l.registerOption(i,f)),Ae(()=>l.unregisterOption(i)),ce(()=>{X([l.listboxState,c],()=>{l.listboxState.value===0&&c.value&&U(l.mode.value,{1:()=>{d.value&&l.goToOption(V.Specific,i)},0:()=>{l.goToOption(V.Specific,i)}})},{immediate:!0})}),ye(()=>{l.listboxState.value===0&&m.value&&l.activationTrigger.value!==0&&H(()=>{var v,h;return(h=(v=C(a))==null?void 0:v.scrollIntoView)==null?void 0:h.call(v,{block:"nearest"})})});function w(v){if(e.disabled)return v.preventDefault();l.select(e.value),l.mode.value===0&&(l.closeListbox(),H(()=>{var h;return(h=C(l.buttonRef))==null?void 0:h.focus({preventScroll:!0})}
4))}function M(){if(e.disabled)return l.goToOption(V.Nothing);l.goToOption(V.Specific,i)}let R=Ze();function B(v){R.update(v)}function k(v){R.wasMoved(v)&&(e.disabled||m.value||l.goToOption(V.Specific,i,0))}function O(v){R.wasMoved(v)&&(e.disabled||m.value&&l.goToOption(V.Nothing))}return()=>{let{disabled:v}=e,h={active:m.value,selected:c.value,disabled:v},{value:r,disabled:S,...I}=e,p={id:i,ref:a,role:"option",tabIndex:v===!0?void 0:-1,"aria-disabled":v===!0?!0:void 0,"aria-selected":c.value,disabled:void 0,onClick:w,onFocus:M,onPointerenter:B,onMouseenter:B,onPointermove:k,onMousemove:k,onPointerleave:O,onMouseleave:O};return ee({ourProps:p,theirProps:I,slot:h,attrs:n,slots:u,name:"ListboxOption"})}}});const Y=Ue(ie.ui.strategy,ie.ui.select,gt),ge=Ue(ie.ui.strategy,ie.ui.selectMenu,yt),Ol=G({components:{HCombobox:il,HComboboxButton:ul,HComboboxOptions:rl,HComboboxOption:dl,HComboboxInput:sl,HListbox:ml,HListboxButton:hl,HListboxOptions:gl,HListboxOption:yl,UIcon:qe,UAvatar:He},inheritAttrs:!1,props:{modelValue:{type:[String,Number,Object,Array,Boolean],default:""},query:{type:String,default:null},by:{type:String,default:void 0},options:{type:Array,default:()=>[]},id:{type:String,default:null},name:{type:String,default:null},required:{type:Boolean,default:!1},icon:{type:String,default:null},loadingIcon:{type:String,default:()=>Y.default.loadingIcon},leadingIcon:{type:String,default:null},trailingIcon:{type:String,default:()=>Y.default.trailingIcon},trailing:{type:Boolean,default:!1},leading:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},selectedIcon:{type:String,default:()=>ge.default.selectedIcon},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},searchable:{type:[Boolean,Function],default:!1},searchablePlaceholder:{type:String,default:()=>ge.default.searchablePlaceholder.label},searchableLazy:{type:Boolean,default:!1},clearSearchOnClose:{type:Boolean,default:()=>ge.default.clearSearchOnClose},debounce:{type:Number,default:200},creatable:{type:Boolean,default:!1},showCreateOptionWhen:{type:[String,Function],default:()=>ge.default.showCreateOptionWhen},placeholder:{type:String,default:null},padded:{type:Boolean,default:!0},size:{type:String,default:null,validator(e){return Object.keys(Y.size).includes(e)}},color:{type:String,default:()=>Y.default.color,validator(e){return[...ie.ui.colors,...Object.keys(Y.color)].includes(e)}},variant:{type:String,default:()=>Y.default.variant,validator(e){return[...Object.keys(Y.variant),...Object.values(Y.color).flatMap(u=>Object.keys(u))].includes(e)}},optionAttribute:{type:String,default:"label"},valueAttribute:{type:String,default:null},searchAttributes:{type:Array,default:null},inputTargetForm:{type:String,default:null},popper:{type:Object,default:()=>({})},selectClass:{type:String,default:null},class:{type:[String,Object,Array],default:()=>""},ui:{type:Object,default:()=>({})},uiMenu:{type:Object,default:()=>({})}},emits:["update:modelValue","update:query","open","close","change"],setup(e,{emit:u,slots:n}){const{ui:o,attrs:t}=De("select",Me(e,"ui"),Y,Me(e,"class")),{ui:i}=De("selectMenu",Me(e,"uiMenu"),ge),l=g(()=>Ot({},e.popper,i.value.popper)),[a,m]=Ft(l.value),c=g(()=>{if(!e.by)return;if(typeof e.by=="function")return e.by;const A=e.by;return A.indexOf(".")>0?(j,J)=>Z(j,A)===Z(J,A):A}),{size:d,rounded:s}=bt({ui:o,props:e}),{emitFormBlur:f,emitFormChange:w,inputId:M,color:R,size:B,name:k}=Lt(e,Y),O=g(()=>d.value??B.value),v=$(""),h=g({get(){return e.query??v.value},set(A){v.value=A,u("update:query",A)}}),r=g(()=>{function A(j,J){return c.value&&typeof c.value!="function"&&typeof j=="object"&&typeof J=="object"?Be(j[c.value],J[c.value]):Be(j,J)}function W(j){return e.valueAttribute?Z(j,e.valueAttribute):j}if(e.multiple){const j=e.modelValue;return!Array.isArray(j)||!j.length?[]:Q.value.filter(J=>{const be=W(J);return j.some(ft=>A(ft,be))})}return Q.value.find(j=>{const J=W(j);return A(J,L(e.modelValue))})??e.modelValue}),S=g(()=>e.modelValue?Array.isArray(e.modelValue)&&e.modelValue.length?`${e.modelValue.length} selected`:["string","number"].includes(typeof e.modelValue)?e.valueAttribute?Z(r.value,e.optionAttribute):e.modelValue:Z(e.modelValue,e.optionAttribute):null),I=g(()=>{var W,j;const A=((j=(W=o.value.color)==null?void 0:W[R.value])==null?void 0:j[e.variant])||o.value.variant[e.variant];return St(me(o.value.base,i.value.select,s.value,o.value.size[O.value],o.value.gap[O.value],e.padded?o.value.padding[O.value]:"p-0",A==null?void 0:A.replaceAll("{color}",R.value),(p.value||n.leading)&&o.value.leading.padding[O.value],(E.value||n.trailing)&&o.value.trailing.padding[O.value]),e.placeholder&&(!e.modelValue||Array.isArray(e.modelValue)&&!e.modelValue.length)&&o.value.placeholder,e.selectClass)}),p=g(()=>e.icon&&e.leading||e.icon&&!e.trailing||e.loading&&!e.trailing||e.leadingIcon),E=g(()=>e.icon&&e.trailing||e.loading&&e.trailing||e.trailingIcon),b=g(()=>e.loading?e.loadingIcon:e.leadingIcon||e.icon),y=g(()=>e.loading&&!p.value?e.loadingIcon:e.trailingIcon||e.icon),x=g(()=>me(o.value.icon.leading.wrapper,o.value.icon.leading.pointer,o.value.icon.leading.padding[O.value])),T=g(()=>me(o.value.icon.base,R.value&&ie.ui.colors.includes(R.value)&&o.value.icon.color.replaceAll("{color}",R.value),o.value.icon.size[O.value],e.loading&&o.value.icon.loading)),D=g(()=>me(o.value.icon.trailing.wrapper,o.value.icon.trailing.pointer,o.value.icon.trailing.padding[O.value])),F=g(()=>me(o.value.icon.base,R.value&&ie.ui.colors.includes(R.value)&&o.value.icon.color.replaceAll("{color}",R.value),o.value.icon.size[O.value],e.loading&&!p.value&&o.value.icon.loading)),q=e.searchable&&typeof e.searchable=="function"?mt(e.searchable,e.debounce):void 0,Q=ht(async()=>q?await q(h.value):e.options||[],[],{lazy:e.searchableLazy});function oe(A){return A.replace(/[.*+?^${}()|[\]\\]/g,W=>`\\${W}`)}function Z(A,W){return Pe(A,W)}const Oe=g(()=>{if(!h.value||q)return Q.value;const A=oe(h.value);return Q.value.filter(W=>{var j;return((j=e.searchAttributes)!=null&&j.length?e.searchAttributes:[e.optionAttribute]).some(J=>{if(["string","number"].includes(typeof W))return String(W).search(new RegExp(A,"i"))!==-1;const be=Pe(W,J);
4return be!=null&&String(be).search(new RegExp(A,"i"))!==-1})})}),rt=g(()=>h.value===""||e.showCreateOptionWhen==="empty"&&Oe.value.length||e.showCreateOptionWhen==="always"&&Oe.value.find(W=>["string","number"].includes(typeof W)?W===h.value:Z(W,e.optionAttribute)===h.value)||typeof e.showCreateOptionWhen=="function"&&!e.showCreateOptionWhen(h.value,Oe.value)?null:["string","number"].includes(typeof e.modelValue)?h.value:{[e.optionAttribute]:h.value});function dt(){e.clearSearchOnClose&&(h.value="")}X(m,A=>{A?u("open"):(dt(),u("close"),f())});function ct(A){L(e.modelValue)!==A&&(u("update:modelValue",A),u("change",A),w())}function vt(A){h.value=A.target.value}return Vt(()=>At()),{ui:o,uiMenu:i,attrs:t,name:k,inputId:M,popper:l,trigger:a,container:m,selected:r,label:S,accessor:Z,isLeading:p,isTrailing:E,selectClass:I,leadingIconName:b,leadingIconClass:T,leadingWrapperIconClass:x,trailingIconName:y,trailingIconClass:F,trailingWrapperIconClass:D,filteredOptions:Oe,createOption:rt,query:h,onUpdate:ct,onQueryChange:vt,by:c}}}),Sl=["value","required","form"],Il=["id","disabled"],xl={class:"truncate"};function Cl(e,u,n,o,t,i){const l=qe,a=Mt("HComboboxInput"),m=He;return N(),te(he(e.searchable?"HCombobox":"HListbox"),{by:e.by,name:e.name,"model-value":e.multiple?Array.isArray(e.modelValue)?e.modelValue:[]:e.modelValue,multiple:e.multiple,disabled:e.disabled,as:"div",class:P(e.ui.wrapper),"onUpdate:modelValue":e.onUpdate},{default:se(({open:c})=>[e.required?(N(),K("input",{key:0,value:e.modelValue,required:e.required,class:P(e.uiMenu.required),form:e.inputTargetForm,tabindex:"-1","aria-hidden":"true"},null,10,Sl)):_("",!0),(N(),te(he(e.searchable?"HComboboxButton":"HListboxButton"),{ref:"trigger",as:"div",role:"button",class:P(e.uiMenu.trigger)},{default:se(()=>[le(e.$slots,"default",{open:c,disabled:e.disabled,loading:e.loading},()=>[ne("button",Re({id:e.inputId,class:e.selectClass,disabled:e.disabled,type:"button"},e.attrs),[e.isLeading&&e.leadingIconName||e.$slots.leading?(N(),K("span",{key:0,class:P(e.leadingWrapperIconClass)},[le(e.$slots,"leading",{selected:e.selected,disabled:e.disabled,loading:e.loading},()=>[Se(l,{name:e.leadingIconName,class:P(e.leadingIconClass)},null,8,["name","class"])])],2)):_("",!0),le(e.$slots,"label",{selected:e.selected},()=>[e.label?(N(),K("span",{key:0,class:P(e.uiMenu.label)},re(e.label),3)):(N(),K("span",{key:1,class:P(e.uiMenu.label)},re(e.placeholder||" "),3))]),e.isTrailing&&e.trailingIconName||e.$slots.trailing?(N(),K("span",{key:1,class:P(e.trailingWrapperIconClass)},[le(e.$slots,"trailing",{selected:e.selected,disabled:e.disabled,loading:e.loading},()=>[Se(l,{name:e.trailingIconName,class:P(e.trailingIconClass),"aria-hidden":"true"},null,8,["name","class"])])],2)):_("",!0)],16,Il)])]),_:2},1032,["class"])),c?(N(),K("div",{key:1,ref:"container",class:P([e.uiMenu.container,e.uiMenu.width])},[Se(Et,Re({appear:""},e.uiMenu.transition),{default:se(()=>[ne("div",null,[e.popper.arrow?(N(),K("div",{key:0,"data-popper-arrow":"",class:P(Object.values(e.uiMenu.arrow))},null,2)):_("",!0),(N(),te(he(e.searchable?"HComboboxOptions":"HListboxOptions"),{static:"",class:P([e.uiMenu.base,e.uiMenu.ring,e.uiMenu.rounded,e.uiMenu.shadow,e.uiMenu.background,e.uiMenu.padding,e.uiMenu.height])},{default:se(()=>{var d,s;return[e.searchable?(N(),te(a,{key:0,"display-value":()=>e.query,name:"q",placeholder:e.searchablePlaceholder,autofocus:"",autocomplete:"off",class:P(e.uiMenu.input),onChange:e.onQueryChange},null,8,["display-value","placeholder","class","onChange"])):_("",!0),(N(!0),K(ze,null,wt(e.filteredOptions,(f,w)=>(N(),te(he(e.searchable?"HComboboxOption":"HListboxOption"),{key:w,as:"template",value:e.valueAttribute?e.accessor(f,e.valueAttribute):f,disabled:f.disabled},{default:se(({active:M,selected:R,disabled:B})=>[ne("li",{class:P([e.uiMenu.option.base,e.uiMenu.option.rounded,e.uiMenu.option.padding,e.uiMenu.option.size,e.uiMenu.option.color,M?e.uiMenu.option.active:e.uiMenu.option.inactive,R&&e.uiMenu.option.selected,B&&e.uiMenu.option.disabled])},[ne("div",{class:P(e.uiMenu.option.container)},[le(e.$slots,"option",{option:f,active:M,selected:R},()=>
4[f.icon?(N(),te(l,{key:0,name:f.icon,class:P([e.uiMenu.option.icon.base,M?e.uiMenu.option.icon.active:e.uiMenu.option.icon.inactive,f.iconClass]),"aria-hidden":"true"},null,8,["name","class"])):f.avatar?(N(),te(m,Re({key:1,ref_for:!0},{size:e.uiMenu.option.avatar.size,...f.avatar},{class:e.uiMenu.option.avatar.base,"aria-hidden":"true"}),null,16,["class"])):f.chip?(N(),K("span",{key:2,class:P(e.uiMenu.option.chip.base),style:Tt({background:`#${f.chip}`})},null,6)):_("",!0),ne("span",xl,re(["string","number"].includes(typeof f)?f:e.accessor(f,e.optionAttribute)),1)])],2),R?(N(),K("span",{key:0,class:P([e.uiMenu.option.selectedIcon.wrapper,e.uiMenu.option.selectedIcon.padding])},[Se(l,{name:e.selectedIcon,class:P(e.uiMenu.option.selectedIcon.base),"aria-hidden":"true"},null,8,["name","class"])],2)):_("",!0)],2)]),_:2},1032,["value","disabled"]))),128)),e.creatable&&e.createOption?(N(),te(he(e.searchable?"HComboboxOption":"HListboxOption"),{key:1,value:e.createOption,as:"template"},{default:se(({active:f,selected:w})=>[ne("li",{class:P([e.uiMenu.option.base,e.uiMenu.option.rounded,e.uiMenu.option.padding,e.uiMenu.option.size,e.uiMenu.option.color,f?e.uiMenu.option.active:e.uiMenu.option.inactive])},[ne("div",{class:P(e.uiMenu.option.container)},[le(e.$slots,"option-create",{option:e.createOption,active:f,selected:w},()=>[ne("span",{class:P(e.uiMenu.option.create)},'Create "'+re(typeof e.createOption=="string"?e.createOption:e.accessor(e.createOption,e.optionAttribute))+'"',3)])],2)],2)]),_:3},8,["value"])):e.searchable&&e.query&&!((d=e.filteredOptions)!=null&&d.length)?(N(),K("p",{key:2,class:P(e.uiMenu.option.empty)},[le(e.$slots,"option-empty",{query:e.query},()=>[Le(re(e.uiMenu.default.optionEmpty.label.replace("{query}",e.query)),1)])],2)):(s=e.filteredOptions)!=null&&s.length?_("",!0):(N(),K("p",{key:3,class:P(e.uiMenu.empty)},[le(e.$slots,"empty",{query:e.query},()=>[Le(re(e.uiMenu.default.empty.label),1)])],2))]}),_:3},8,["class"]))])]),_:3},16)],2)):_("",!0)]),_:3},8,["by","name","model-value","multiple","disabled","class","onUpdate:modelValue"])}const Dl=pt(Ol,[["render",Cl]]);export{gl as A,yl as F,ml as I,Dl as _,sl as i,hl as j,il as l,ul as n,dl as r,rl as u};

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.