PageSourceSearch

https://jyllands-posten.dk/_next/static/chunks/2omhjdjzdgwp9.js

js jyllands-posten.dk collected 2026-09-24 08:44:11 UTC 41,434 bytes, 4 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,673407,e=>{"use strict";let t,o,n,i;var s=e.i(341412),l=e.i(912067),a=e.i(920001),r=e.i(112845);function u(e,t,o){let n,i=o.initialDeps??[];function s(){var s,l,a,r;let u,c;o.key&&(null==(s=o.debug)?void 0:s.call(o))&&(u=Date.now());let d=e();if(!(d.length!==i.length||d.some((e,t)=>i[t]!==e)))return n;if(i=d,o.key&&(null==(l=o.debug)?void 0:l.call(o))&&(c=Date.now()),n=t(...d),o.key&&(null==(a=o.debug)?void 0:a.call(o))){let e=Math.round((Date.now()-u)*100)/100,t=Math.round((Date.now()-c)*100)/100,n=t/16,i=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${i(t,5)} /${i(e,5)} ms`,`
2            font-size: .6rem;
3            font-weight: bold;
4            color: hsl(${Math.max(0,Math.min(120-120*n,120))}deg 100% 31%);`,null==o?void 0:o.key)}return null==(r=null==o?void 0:o.onChange)||r.call(o,n),n}return s.updateDeps=e=>{i=e},s}function c(e,t){if(void 0!==e)return e;throw Error(`Unexpected undefined${t?`: ${t}`:""}`)}let d=e=>{let{offsetWidth:t,offsetHeight:o}=e;return{width:t,height:o}},p=e=>e,h=e=>{let t=Math.max(e.startIndex-e.overscan,0),o=Math.min(e.endIndex+e.overscan,e.count-1),n=[];for(let e=t;e<=o;e++)n.push(e);return n},m=(e,t)=>{let o=e.scrollElement;if(!o)return;let n=e.targetWindow;if(!n)return;let i=e=>{let{width:o,height:n}=e;t({width:Math.round(o),height:Math.round(n)})};if(i(d(o)),!n.ResizeObserver)return()=>{};let s=new n.ResizeObserver(t=>{let n=()=>{let e=t[0];if(null==e?void 0:e.borderBoxSize){let t=e.borderBoxSize[0];if(t)return void i({width:t.inlineSize,height:t.blockSize})}i(d(o))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(n):n()});return s.observe(o,{box:"border-box"}),()=>{s.unobserve(o)}},f={passive:!0},v="u"<typeof window||"onscrollend"in window,g=(e,t)=>{var o,n;let i,s=e.scrollElement;if(!s)return;let l=e.targetWindow;if(!l)return;let a=0,r=e.options.useScrollendEvent&&v?()=>void 0:(o=()=>{t(a,!1)},n=e.options.isScrollingResetDelay,function(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];l.clearTimeout(i),i=l.setTimeout(()=>o.apply(this,t),n)}),u=o=>()=>{let{horizontal:n,isRtl:i}=e.options;a=n?s.scrollLeft*(i&&-1||1):s.scrollTop,r(),t(a,o)},c=u(!0),d=u(!1);d(),s.addEventListener("scroll",c,f);let p=e.options.useScrollendEvent&&v;return p&&s.addEventListener("scrollend",d,f),()=>{s.removeEventListener("scroll",c),p&&s.removeEventListener("scrollend",d)}},b=(e,t,o)=>{if(null==t?void 0:t.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[o.options.horizontal?"inlineSize":"blockSize"])}return e[o.options.horizontal?"offsetWidth":"offsetHeight"]},x=(e,t,o)=>{var n,i;let{adjustments:s=0,behavior:l}=t;null==(i=null==(n=o.scrollElement)?void 0:n.scrollTo)||i.call(n,{[o.options.horizontal?"left":"top"]:e+s,behavior:l})};class S{constructor(e){var t=this;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 e=null,t=()=>e||(this.targetWindow&&this.targetWindow.ResizeObserver?e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{this._measureElement(e.target,e)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}):null);return{disconnect:()=>{var o;null==(o=t())||o.disconnect(),e=null},observe:e=>{var o;return null==(o=t())?void 0:o.observe(e,{box:"border-box"})},unobserve:e=>{var o;return null==(o=t())?void 0:o.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(t=>{let[o,n]=t;void 0===n&&delete e[o]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:p,rangeExtractor:h,onChange:()=>{},measureElement:b,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...e}},this.notify=e=>{var t,o;null==(o=(t=this.options).onChange)||o.call(t,this,e)},this.maybeNotify=u(()=>(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=()=>
4{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;let t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t)return void this.maybeNotify();this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(null==(e=this.scrollElement)?void 0:e.window)??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?"forward":"backward":null,this.scrollOffset=e,this.isScrolling=t,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??("function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{let o=new Map,n=new Map;for(let i=t-1;i>=0;i--){let t=e[i];if(o.has(t.lane))continue;let s=n.get(t.lane);if(null==s||t.end>s.end?n.set(t.lane,t):t.end<s.end&&o.set(t.lane,!0),o.size===this.options.lanes)break}return n.size===this.options.lanes?Array.from(n.values()).sort((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=u(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(e,t,o,n,i)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:o,getItemKey:n,enabled:i}),{key:!1}),this.getMeasurements=u(()=>[this.getMeasurementOptions(),this.itemSizeCache],(e,t)=>{let{count:o,paddingStart:n,scrollMargin:i,getItemKey:s,enabled:l}=e;if(!l)return this.measurementsCache=[],this.itemSizeCache.clear(),[];0===this.measurementsCache.length&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let a=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];let r=this.measurementsCache.slice(0,a);for(let e=a;e<o;e++){let o=s(e),l=1===this.options.lanes?r[e-1]:this.getFurthestMeasurement(r,e),a=l?l.end+this.options.gap:n+i,u=t.get(o),c="number"==typeof u?u:this.options.estimateSize(e),d=a+c,p=l?l.lane:e%this.options.lanes;r[e]={index:e,start:a,size:c,end:d,key:o,lane:p}}return this.measurementsCache=r,r},{key:!1,debug:()=>this.options.debug}),this.calculateRange=u(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,o,n)=>this.range=e.length>0&&t>0?function(e){let{measurements:t,outerSize:o,scrollOffset:n,lanes:i}=e,s=t.length-1;if(t.length<=i)return{startIndex:0,endIndex:s};let l=O(0,s,e=>t[e].start,n),a=l;if(1===i)for(;a<s&&t[a].end<n+o;)a++;else if(i>1){let e=Array(i).fill(0);for(;a<s&&e.some(e=>e<n+o);){let o=t[a];e[o.lane]=o.end,a++}let r=Array(i).fill(n+o);for(;l>=0&&r.some(e=>e>=n);){let e=t[l];r[e.lane]=e.start,l--}l=Math.max(0,l-l%i),a=Math.min(s,a+(i-1-a%i))}return{startIndex:l,endIndex:a}}({measurements:e,outerSize:t,scrollOffset:o,lanes:n}):null,{key:!1,debug:()=>this.options.debug}
4),this.getVirtualIndexes=u(()=>{let e=null,t=null,o=this.calculateRange();return o&&(e=o.startIndex,t=o.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,o,n,i)=>null===n||null===i?[]:e({startIndex:n,endIndex:i,overscan:t,count:o}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,o=e.getAttribute(t);return o?parseInt(o,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this._measureElement=(e,t)=>{let o=this.indexFromElement(e),n=this.measurementsCache[o];if(!n)return;let i=n.key,s=this.elementsCache.get(i);s!==e&&(s&&this.observer.unobserve(s),this.observer.observe(e),this.elementsCache.set(i,e)),e.isConnected&&this.resizeItem(o,this.options.measureElement(e,t,this))},this.resizeItem=(e,t)=>{let o=this.measurementsCache[e];if(!o)return;let n=t-(this.itemSizeCache.get(o.key)??o.size);0!==n&&((void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(o,n,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=n,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,t)),this.notify(!1))},this.measureElement=e=>{e?this._measureElement(e,void 0):this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))})},this.getVirtualItems=u(()=>
4[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let o=[];for(let n=0,i=e.length;n<i;n++){let i=t[e[n]];o.push(i)}return o},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(0!==t.length)return c(t[O(0,t.length-1,e=>c(t[e]).start,e)])},this.getOffsetForAlignment=function(e,o){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=t.getSize(),s=t.getScrollOffset();return"auto"===o&&(o=e>=s+i?"end":"start"),"center"===o?e+=(n-i)/2:"end"===o&&(e-=i),Math.max(Math.min(t.getTotalSize()-i,e),0)},this.getOffsetForIndex=function(e){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto";e=Math.max(0,Math.min(e,t.options.count-1));let n=t.measurementsCache[e];if(!n)return;let i=t.getSize(),s=t.getScrollOffset();if("auto"===o)if(n.end>=s+i-t.options.scrollPaddingEnd)o="end";else{if(!(n.start<=s+t.options.scrollPaddingStart))return[s,o];o="start"}let l="end"===o?n.end+t.options.scrollPaddingEnd:n.start-t.options.scrollPaddingStart;return[t.getOffsetForAlignment(l,o,n.size),o]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{null!==this.scrollToIndexTimeoutId&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=function(e){let{align:o="start",behavior:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.cancelScrollToIndex(),"smooth"===n&&t.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),t._scrollToOffset(t.getOffsetForAlignment(e,o),{adjustments:void 0,behavior:n})},this.scrollToIndex=function(e){let{align:o="auto",behavior:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=Math.max(0,Math.min(e,t.options.count-1)),t.cancelScrollToIndex(),"smooth"===n&&t.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");let i=t.getOffsetForIndex(e,o);if(!i)return;let[s,l]=i;t._scrollToOffset(s,{adjustments:void 0,behavior:n}),"smooth"!==n&&t.isDynamicMode()&&t.targetWindow&&(t.scrollToIndexTimeoutId=t.targetWindow.setTimeout(()=>{if(t.scrollToIndexTimeoutId=null,t.elementsCache.has(t.options.getItemKey(e))){let o=t.getOffsetForIndex(e,l);if(!o)return;let[i]=o;1>=Math.abs(i-t.getScrollOffset())||t.scrollToIndex(e,{align:l,behavior:n})}else t.scrollToIndex(e,{align:l,behavior:n})}))},this.scrollBy=function(e){let{behavior:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.cancelScrollToIndex(),"smooth"===o&&t.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),t._scrollToOffset(t.getScrollOffset()+e,{adju
4stments:void 0,behavior:o})},this.getTotalSize=()=>{var e;let t,o=this.getMeasurements();if(0===o.length)t=this.options.paddingStart;else if(1===this.options.lanes)t=(null==(e=o[o.length-1])?void 0:e.end)??0;else{let e=Array(this.options.lanes).fill(null),n=o.length-1;for(;n>=0&&e.some(e=>null===e);){let t=o[n];null===e[t.lane]&&(e[t.lane]=t.end),n--}t=Math.max(...e.filter(e=>null!==e))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,t)=>{let{adjustments:o,behavior:n}=t;this.options.scrollToFn(e,{behavior:n,adjustments:o},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(e)}}let O=(e,t,o,n)=>{for(;e<=t;){let i=(e+t)/2|0,s=o(i);if(s<n)e=i+1;else{if(!(s>n))return i;t=i-1}}return e>0?e-1:0},E="u">typeof document?a.useLayoutEffect:a.useEffect;var y=e.i(757112),I=e.i(752409),C=e.i(706480),T=e.i(827522),M=e.i(354014),R=e.i(866133),P=e.i(321586),w=e.i(599574),F=e.i(632236),A=e.i(929642),D=e.i(784873),k=e.i(975839),z=e.i(401790),_=e.i(421600),L=e.i(5085),B=e.i(679291),W=e.i(818737),V=e.i(840245);function K(e){let t=(0,a.useRef)({value:"",selectionStart:null,selectionEnd:null});return(0,V.useEventListener)(e,"blur",e=>{let o=e.target;B.isHTMLInputElement(o)&&(t.current={value:o.value,selectionStart:o.selectionStart,selectionEnd:o.selectionEnd})}),(0,P.useEvent)(()=>{if(!(0,W.isActiveElement)(e)&&B.isHTMLInputElement(e)&&e.isConnected){if(e.focus({preventScroll:!0}),e.value!==t.current.value)e.setSelectionRange(e.value.length,e.value.length);else{let{selectionStart:o,selectionEnd:n}=t.current;null!==o&&null!==n&&e.setSelectionRange(o,n)}t.current={value:"",selectionStart:null,selectionEnd:null}}})}var N=e.i(308437),j=e.i(218723),$=e.i(185562),U=e.i(229734),H=e.i(711173),q=e.i(46823),G=e.i(867104),J=e.i(704856),Q=e.i(288820),Y=e.i(420453),X=e.i(24969),Z=e.i(694507),ee=e.i(799139),et=e.i(325951),eo=e.i(737940),en=e.i(38444),ei=e.i(751711),es=e.i(766772),el=e.i(10921),ea=e.i(514292),er=e.i(489372),eu=e.i(203462),ec=e.i(65458),ed=e.i(953828),ep=e.i(317464),eh=e.i(703494),em=e.i(963274),ef=e.i(380455),ev=e.i(523329),eg=e.i(396774),eb=Object.defineProperty,ex=(e,t,o)=>{let n;return(n="symbol"!=typeof t?t+"":t)in e?eb(e,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[n]=o,o},eS=((t=eS||{})[t.Open=0]="Open",t[t.Closed=1]="Closed",t),eO=((o=eO||{})[o.Single=0]="Single",o[o.Multi=1]="Multi",o),eE=((n=eE||{})[n.Pointer=0]="Pointer",n[n.Focus=1]="Focus",n[n.Other=2]="Other",n),ey=((i=ey||{})[i.OpenCombobox=0]="OpenCombobox",i[i.CloseCombobox=1]="CloseCombobox",i[i.GoToOption=2]="GoToOption",i[i.SetTyping=3]="SetTyping",i[i.RegisterOption=4]="RegisterOption",i[i.UnregisterOption=5]="UnregisterOption",i[i.DefaultToFirstOption=6]="DefaultToFirstOption",i[i.SetActivationTrigger=7]="SetActivationTrigger",i[i.UpdateVirtualConfiguration=8]="UpdateVirtualConfiguration",i[i.SetInputElement=9]="SetInputElement",i[i.SetButtonElement=10]="SetButtonElement",i[i.SetOptionsElement=11]="SetOptionsElement",i[i.MarkInputAsMoved=12]="MarkInputAsMoved",i);function eI(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e,o=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,n=t(e.options.slice()),i=n.length>0&&null!==n[0].dataRef.current.order?n.sort((e,t)=>e.dataRef.current.order-t.dataRef.current.order):(0,eg.sortByDomNode)(n,e=>e.dataRef.current.domRef.current),s=o?i.indexOf(o):null;return -1===s&&(s=null),{options:i,activeOptionIndex:s}}let eC={1(e){var t;if(null!=(t=e.dataRef.current)&&t.disabled||1===e.comboboxState)return e;let o=e.inputElement?ev.ElementPositionState.Tracked((0,ev.computeVisualPosition)(e.inputElement)):e.inputPositionState;return{...e,activeOptionIndex:null,comboboxState:1,isTyping:!1,activationTrigger:2,inputPositionState:o,__demoMode:!1}},0(e){var t,o;if(null!=(t=e.dataRef.current)&&t.disabled||0===e.comboboxState)return e;if(null!=(o=e.dataRef.current)&&o.value){let t=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(-1!==t)return{...e,activeOptionIndex:t,comboboxState:0,__demoMode:!1,inputPositionState:ev.ElementPositionState.Idle}}return{...e,comboboxState:0,inputPositionState:ev.ElementPositionState.Idle,__demoMode:!1}},3:(e,t)=>
4e.isTyping===t.isTyping?e:{...e,isTyping:t.isTyping},2(e,t){var o,n,i,s;if(null!=(o=e.dataRef.current)&&o.disabled||e.optionsElement&&!(null!=(n=e.dataRef.current)&&n.optionsPropsRef.current.static)&&1===e.comboboxState)return e;if(e.virtual){let{options:o,disabled:n}=e.virtual,s=t.focus===es.Focus.Specific?t.idx:(0,es.calculateActiveIndex)(t,{resolveItems:()=>o,resolveActiveIndex:()=>{var t,i;return null!=(i=null!=(t=e.activeOptionIndex)?t:o.findIndex(e=>!n(e)))?i:null},resolveDisabled:n,resolveId(){throw Error("Function not implemented.")}}),l=null!=(i=t.trigger)?i:2;return e.activeOptionIndex===s&&e.activationTrigger===l?e:{...e,activeOptionIndex:s,activationTrigger:l,isTyping:!1,__demoMode:!1}}let l=eI(e);if(null===l.activeOptionIndex){let e=l.options.findIndex(e=>!e.dataRef.current.disabled);-1!==e&&(l.activeOptionIndex=e)}let a=t.focus===es.Focus.Specific?t.idx:(0,es.calculateActiveIndex)(t,{resolveItems:()=>l.options,resolveActiveIndex:()=>l.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled}),r=null!=(s=t.trigger)?s:2;return e.activeOptionIndex===a&&e.activationTrigger===r?e:{...e,...l,isTyping:!1,activeOptionIndex:a,activationTrigger:r,__demoMode:!1}},4:(e,t)=>{var o,n,i,s;if(null!=(o=e.dataRef.current)&&o.virtual)return{...e,options:[...e.options,t.payload]};let l=t.payload,a=eI(e,e=>(e.push(l),e));null===e.activeOptionIndex&&null!=(i=(n=e.dataRef.current).isSelected)&&i.call(n,t.payload.dataRef.current.value)&&(a.activeOptionIndex=a.options.indexOf(l));let r={...e,...a,activationTrigger:2};return null!=(s=e.dataRef.current)&&s.__demoMode&&void 0===e.dataRef.current.value&&(r.activeOptionIndex=0),r},5:(e,t)=>{var o;if(null!=(o=e.dataRef.current)&&o.virtual)return{...e,options:e.options.filter(e=>e.id!==t.id)};let n=eI(e,e=>{let o=e.findIndex(e=>e.id===t.id);return -1!==o&&e.splice(o,1),e});return{...e,...n,activationTrigger:2}},6:(e,t)=>e.defaultToFirstOption===t.value?e:{...e,defaultToFirstOption:t.value},7:(e,t)=>e.activationTrigger===t.trigger?e:{...e,activationTrigger:t.trigger},8:(e,t)=>
4{var o,n;if(null===e.virtual)return{...e,virtual:{options:t.options,disabled:null!=(o=t.disabled)?o:()=>!1}};if(e.virtual.options===t.options&&e.virtual.disabled===t.disabled)return e;let i=e.activeOptionIndex;if(null!==e.activeOptionIndex){let o=t.options.indexOf(e.virtual.options[e.activeOptionIndex]);i=-1!==o?o:null}return{...e,activeOptionIndex:i,virtual:{options:t.options,disabled:null!=(n=t.disabled)?n:()=>!1}}},9:(e,t)=>e.inputElement===t.element?e:{...e,inputElement:t.element},10:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},11:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element},12:e=>"Tracked"!==e.inputPositionState.kind?e:{...e,inputPositionState:ev.ElementPositionState.Moved}};class eT extends ef.Machine{constructor(e){super(e),ex(this,"actions",{onChange:e=>{let{onChange:t,compare:o,mode:n,value:i}=this.state.dataRef.current;return(0,ea.match)(n,{0:()=>null==t?void 0:t(e),1:()=>{let n=i.slice(),s=n.findIndex(t=>o(t,e));return -1===s?n.push(e):n.splice(s,1),null==t?void 0:t(n)}})},registerOption:(e,t)=>(this.send({type:4,payload:{id:e,dataRef:t}}),()=>{this.state.activeOptionIndex===this.state.dataRef.current.calculateIndex(t.current.value)&&this.send({type:6,value:!0}),this.send({type:5,id:e})}),goToOption:(e,t)=>(this.send({type:6,value:!1}),this.send({type:2,...e,trigger:t})),setIsTyping:e=>{this.send({type:3,isTyping:e})},closeCombobox:()=>{var e,t;this.send({type:1}),this.send({type:6,value:!1}),null==(t=(e=this.state.dataRef.current).onClose)||t.call(e)},openCombobox:()=>{this.send({type:0}),this.send({type:6,value:!0})},setActivationTrigger:e=>{this.send({type:7,trigger:e})},selectActiveOption:()=>{let e=this.selectors.activeOptionIndex(this.state);if(null!==e){if(this.actions.setIsTyping(!1),this.state.virtual)this.actions.onChange(this.state.virtual.options[e]);else{let{dataRef:t}=this.state.options[e];this.actions.onChange(t.current.value)}this.actions.goToOption({focus:es.Focus.Specific,idx:e})}},setInputElement:e=>{this.send({type:9,element:e})},setButtonElement:e=>{this.send({type:10,element:e})},setOptionsElement:e=>{this.send({type:11,element:e})}}),ex(this,"selectors",{activeDescendantId:e=>{var t,o;let n=this.selectors.activeOptionIndex(e);if(null!==n)return e.virtual?null==(o=e.options.find(t=>!t.dataRef.current.disabled&&e.dataRef.current.compare(t.dataRef.current.value,e.virtual.options[n])))?void 0:o.id:null==(t=e.options[n])?void 0:t.id},activeOptionIndex:e=>{if(e.defaultToFirstOption&&null===e.activeOptionIndex&&(e.virtual?e.virtual.options.length>0:e.options.length>0)){if(e.virtual){let{options:t,disabled:o}=e.virtual,n=t.findIndex(e=>{var t;return!(null!=(t=null==o?void 0:o(e))&&t)});if(-1!==n)return n}let t=e.options.findIndex(e=>!e.dataRef.current.disabled);if(-1!==t)return t}return e.activeOptionIndex},activeOption:e=>{var t,o;let n=this.selectors.activeOptionIndex(e);return null===n?null:e.virtual?e.virtual.options[null!=n?n:0]:null!=(o=null==(t=e.options[n])?void 0:t.dataRef.current.value)?o:null},isActive:(e,t,o)=>{var n;let i=this.selectors.activeOptionIndex(e);return null!==i&&(e.virtual?i===e.dataRef.current.calculateIndex(t):(null==(n=e.options[i])?void 0:n.id)===o)},shouldScrollIntoView:(e,t,o)=>!(e.virtual||e.__demoMode||0!==e.comboboxState||0===e.activationTrigger||!this.selectors.isActive(e,t,o)),didInputMove:e=>"Moved"===e.inputPositionState.kind});{let e=this.state.id,t=eo.stackMachines.get(null);this.disposables.add(t.on(eo.ActionTypes.Push,o=>{t.selectors.isTop(o,e)||0!==this.state.comboboxState||this.actions.closeCombobox()})),this.on(0,()=>t.actions.push(e)),this.on(1,()=>t.actions.pop(e))}this.disposables.group(e=>{this.on(1,t=>{t.inputElement&&(e.dispose(),e.add((0,ev.detectMovement)(t.inputElement,t.inputPositionState,()=>{this.send({type:12})})))})})}static new(e){var t;let{id:o,virtual:n=null,__demoMode:i=!1}=e;return new eT({id:o,dataRef:{current:{}},comboboxState:+!i,isTyping:!1,options:[],virtual:n?{options:n.options,disabled:null!=(t=n.disabled)?t:()=>!1}:null,activeOptionIndex:null,activationTrigger:2,inputElement:null,buttonElement:null,optionsElement:null,__demoMode:i,inputPositionState:ev.ElementPositionState.Idle})}reduce(e,t){return(0,ea.match)(t.type,eC,e,t)}}var eM=e.i(661462);let eR=(0,a.createContext)(null);function eP(e){let t=(0,a.useContext)(eR);if(null===t){let t=Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,ew),t}return t}function ew(e){let{id:t,virtual:o=null,__demoMode:n=!1}=e,i=(0,a.useMemo)(()=>eT.new({id:t,virtual:o,__demoMode:n}),[]);return(0,eM.useOnUnmount)(()=>i.dispose()),i}let eF=(0,a.createContext)(null);function eA(e){let t=(0,a.useContext)(eF);if(null===t){let t=Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,eA),t}return t}eF.displayName="ComboboxDataContext";let eD=(0,a.createContext)(null);function ek(e){let t=eP("VirtualProvider"),{options:o}=eA("VirtualProvider").virtual,n=(0,en.useSlice)(t,e=>e.optionsElement),[i,s]=(0,a.useMemo)(()=>
4{if(!n)return[0,0];let e=window.getComputedStyle(n);return[parseFloat(e.paddingBlockStart||e.paddingTop),parseFloat(e.paddingBlockEnd||e.paddingBottom)]},[n]),l=function(e){let t=a.useReducer(()=>({}),{})[1],o={...e,onChange:(o,n)=>{var i;n?(0,r.flushSync)(t):t(),null==(i=e.onChange)||i.call(e,o,n)}},[n]=a.useState(()=>new S(o));return n.setOptions(o),E(()=>n._didMount(),[]),E(()=>n._willUpdate()),n}({observeElementRect:m,observeElementOffset:g,scrollToFn:x,...{enabled:0!==o.length,scrollPaddingStart:i,scrollPaddingEnd:s,count:o.length,estimateSize:()=>40,getScrollElement:()=>t.state.optionsElement,overscan:12}}),[u,c]=(0,a.useState)(0);(0,A.useIsoMorphicEffect)(()=>{c(e=>e+1)},[o]);let d=l.getVirtualItems(),p=(0,en.useSlice)(t,e=>e.activationTrigger===eE.Pointer),h=(0,en.useSlice)(t,t.selectors.activeOptionIndex);return 0===d.length?null:a.default.createElement(eD.Provider,{value:l},a.default.createElement("div",{style:{position:"relative",width:"100%",height:`${l.getTotalSize()}px`},ref:e=>{e&&(p||null!==h&&o.length>h&&l.scrollToIndex(h))}},d.map(t=>{var n;return a.default.createElement(a.Fragment,{key:t.key},a.default.cloneElement(null==(n=e.children)?void 0:n.call(e,{...e.slot,option:o[t.index]}),{key:`${u}-${t.key}`,"data-index":t.index,"aria-setsize":o.length,"aria-posinset":t.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${t.start}px)`,overflowAnchor:"none"}}))})))}let ez=a.Fragment,e_=eu.RenderFeatures.RenderStrategy|eu.RenderFeatures.Static,eL=(0,eu.forwardRefWithAs)(function(e,t){let o=(0,a.useId)(),n=(0,Q.useDisabled)(),{value:i,defaultValue:s,onChange:l,form:r,name:u,by:c,invalid:d=!1,disabled:p=n||!1,onClose:h,__demoMode:m=!1,multiple:f=!1,immediate:v=!1,virtual:g=null,nullable:b,...x}=e,S=(0,T.useDefaultValue)(s),[O=f?[]:void 0,E]=(0,C.useControllable)(i,l,S),y=ew({id:o,virtual:g,__demoMode:m}),M=(0,a.useRef)({static:!1,hold:!1}),R=(0,I.useByComparator)(c),w=(0,P.useEvent)(e=>g?null===c?g.options.indexOf(e):g.options.findIndex(t=>R(t,e)):y.state.options.findIndex(t=>R(t.dataRef.current.value,e))),F=(0,a.useCallback)(e=>(0,ea.match)(_.mode,{[eO.Multi]:()=>O.some(t=>R(t,e)),[eO.Single]:()=>R(O,e)}),[O]),D=(0,en.useSlice)(y,e=>e.virtual),k=(0,P.useEvent)(()=>null==h?void 0:h()),_=(0,a.useMemo)(()=>({__demoMode:m,immediate:v,optionsPropsRef:M,value:O,defaultValue:S,disabled:p,invalid:d,mode:f?eO.Multi:eO.Single,virtual:g?D:null,onChange:E,isSelected:F,calculateIndex:w,compare:R,onClose:k}),[m,v,M,O,S,p,d,f,g,D,E,F,w,R,k]);(0,A.useIsoMorphicEffect)(()=>{var e;g&&y.send({type:ey.UpdateVirtualConfiguration,options:g.options,disabled:null!=(e=g.disabled)?e:null})},[g,null==g?void 0:g.options,null==g?void 0:g.disabled]),(0,A.useIsoMorphicEffect)(()=>{y.state.dataRef.current=_},[_]);let[L,B,W,V]=(0,en.useSlice)(y,e=>[e.comboboxState,e.buttonElement,e.inputElement,e.optionsElement]),K=eo.stackMachines.get(null),N=(0,en.useSlice)(K,(0,a.useCallback)(e=>K.selectors.isTop(e,o),[K,o]));(0,z.useOutsideClick)(N,[B,W,V],()=>y.actions.closeCombobox());let j=(0,en.useSlice)(y,y.selectors.activeOptionIndex),U=(0,en.useSlice)(y,y.selectors.activeOption),H=(0,$.useSlot)({open:L===eS.Open,disabled:p,invalid:d,activeIndex:j,activeOption:U,value:O}),[q,G]=(0,ep.useLabels)(),J=(0,a.useCallback)(()=>{if(void 0!==S)return null==E?void 0:E(S)},[E,S]),Z=(0,eu.useRender)();return a.default.createElement(G,{value:q,props:{htmlFor:null==W?void 0:W.id},slot:{open:L===eS.Open,disabled:p}},a.default.createElement(Y.FloatingProvider,null,a.default.createElement(eF.Provider,{value:_},a.default.createElement(eR.Provider,{value:y},a.default.createElement(et.OpenClosedProvider,{value:(0,ea.match)(L,{[eS.Open]:et.State.Open,[eS.Closed]:et.State.Closed})},null!=u&&a.default.createElement(X.FormFields,{disabled:p,data:null!=O?{[u]:O}:{},form:r,onReset:J}),Z({ourProps:null===t?{}:{ref:t},theirProps:x,slot:H,defaultTag:ez,name:"Combobox"}))))))}),eB=(0,eu.forwardRefWithAs)(function(e,t){let o=eP("Combobox.Button"),n=eA("Combobox.Button"),[i,u]=(0,a.useState)(null),c=(0,U.useSyncRefs)(t,u,o.actions.setButtonElement),d=(0,a.useId)(),{id:p=`headlessui-combobox-button-${d}`,disabled:h=n.disabled||!1,autoFocus:m=!1,...f}=e,[v,g,b]=(0,en.useSlice)(o,e=>[e.comboboxState,e.inputElement,e.optionsElement]),x=K(g),S=v===eS.Open;(0,L.useQuickRelease)(S,{trigger:i,action:(0,a.useCallback)(e=>{if(null!=i&&i.contains(e.target)||null!=g&&g.contains(e.target))return L.Action.Ignore;let t=e.target.closest('[role="option"]:not([data-disabled])');return B.isHTMLElement(t)?L.Action.Select(t):null!=b&&b.contains(e.target)?L.Action.Ignore:L.Action.Close},[i,g,b]),close:o.actions.closeCombobox,select:o.actions.selectActiveOption});let O=(0,P.useEvent)(e=>{switch(e.key){case ed.Keys.Space:case ed.Keys.Enter:e.preventDefault(),e.stopPropagation(),o.state.comboboxState===eS.Closed&&(0,r.flushSync)(()=>o.actions.openCombobox()),x();return;case ed.Keys.ArrowDown:e.preventDefault(),e.stopPropagation(),o.state.comboboxState===eS.Closed&&((0,r.flushSync)(()=>o.actions.openCombobox()),o.state.dataRef.current.value||o.actions.goToOption({focus:es.Focus.First})),x();return;case ed.Keys.ArrowUp:e.preventDefault(),e.stopPropagation(),o.state.comboboxState===eS.Closed&&((0,r.flushSync)(()=>o.actions.openCombobox()),o.state.dataRef.current.value||o.actions.goToOption({focus:es.Focus.Last})),x();return;case ed.Keys.Escape:if(o.state.comboboxState!==eS.Open)return;e.preventDefault(),o.state.optionsElement&&!n.optionsPropsRef.current.static&&e.stopPropagation(),(0,r.flushSync)(()=>o.actions.closeCombobox()),x();return;default:return}}),E=(0,w.useHandleToggle)(()=>{o.state.comboboxState===eS.Open?o.actions.closeCombobox():o.actions.openCombobox(),x()}),I=(0,ep.useLabelledBy)([p]),{isFocusVisible:C,focusProps:T}=(0,s.useFocusRing)({autoFocus:m}),{isHovered:M,hoverProps:R}=(0,l.useHover)({isDisabled:h}),{pressed:F,pressProps:A}=(0,y.useActivePress)({disabled:h}),D=(0,$.useSlot)({open:v===eS.Open,active:F||v===eS.Open,disabled:h,invalid:n.invalid,value:n.value,hover:M,focus:C}),k=(0,eu.mergeProps)({ref:c,id:p,type:(0,N.useResolveButtonType)(e,i),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":null==b?void 0:b.id,"aria-expanded":v===eS.Open,"aria-labelledby":I,disabled:h||void 0,autoFocus:m,onKeyDown:O},E,T,R,A);return(0,eu.useRender)()({ourProps:k,theirProps:f,slot:D,defaultTag:"button",name:"Combobox.Button"})}),eW=(0,eu.forwardRefWithAs)(function(e,t){var o,n;let i=eP("Combobox.Input"),u=eA("Combobox.Input"),c=(0,a.useId)(),d=(0,ee.useProvidedId)(),{id:p=d||`headlessui-combobox-input-${c}
4`,onChange:h,displayValue:m,disabled:f=u.disabled||!1,autoFocus:v=!1,type:g="text",...b}=e,x=(0,a.useRef)(null),S=(0,U.useSyncRefs)(x,t,(0,Y.useFloatingReference)(),i.actions.setInputElement),[O,E]=(0,en.useSlice)(i,e=>[e.comboboxState,e.isTyping]),y=(0,M.useDisposables)(),I=(0,P.useEvent)(()=>{i.actions.onChange(null),i.state.optionsElement&&(i.state.optionsElement.scrollTop=0),i.actions.goToOption({focus:es.Focus.Nothing})}),C=(0,a.useMemo)(()=>{var e;return"function"==typeof m&&void 0!==u.value?null!=(e=m(u.value))?e:"":"string"==typeof u.value?u.value:""},[u.value,m]);(0,J.useWatch)((e,t)=>{let[o,n]=e,[s,l]=t;if(i.state.isTyping)return;let a=x.current;a&&((l===eS.Open&&n===eS.Closed||o!==s)&&(a.value=o),requestAnimationFrame(()=>{if(i.state.isTyping||!a||(0,W.isActiveElement)(a))return;let{selectionStart:e,selectionEnd:t}=a;0===Math.abs((null!=t?t:0)-(null!=e?e:0))&&0===e&&a.setSelectionRange(a.value.length,a.value.length)}))},[C,O,E]),(0,J.useWatch)((e,t)=>{let[o]=e,[n]=t;if(o===eS.Open&&n===eS.Closed){if(i.state.isTyping)return;let e=x.current;if(!e)return;let t=e.value,{selectionStart:o,selectionEnd:n,selectionDirection:s}=e;e.value="",e.value=t,null!==s?e.setSelectionRange(o,n,s):e.setSelectionRange(o,n)}},[O]);let T=(0,a.useRef)(!1),R=(0,P.useEvent)(()=>{T.current=!0}),w=(0,P.useEvent)(()=>{y.nextFrame(()=>{T.current=!1})}),F=(0,P.useEvent)(e=>{switch(i.actions.setIsTyping(!0),e.key){case ed.Keys.Enter:if(i.state.comboboxState!==eS.Open||T.current)return;if(e.preventDefault(),e.stopPropagation(),null===i.selectors.activeOptionIndex(i.state))return void i.actions.closeCombobox();i.actions.selectActiveOption(),u.mode===eO.Single&&i.actions.closeCombobox();break;case ed.Keys.ArrowDown:return e.preventDefault(),e.stopPropagation(),(0,ea.match)(i.state.comboboxState,{[eS.Open]:()=>i.actions.goToOption({focus:es.Focus.Next}),[eS.Closed]:()=>i.actions.openCombobox()});case ed.Keys.ArrowUp:return e.preventDefault(),e.stopPropagation(),(0,ea.match)(i.state.comboboxState,{[eS.Open]:()=>i.actions.goToOption({focus:es.Focus.Previous}),[eS.Closed]:()=>{(0,r.flushSync)(()=>i.actions.openCombobox()),u.value||i.actions.goToOption({focus:es.Focus.Last})}});case ed.Keys.Home:if(i.state.comboboxState===eS.Closed||e.shiftKey)break;return e.preventDefault(),e.stopPropagation(),i.actions.goToOption({focus:es.Focus.First});case ed.Keys.PageUp:return e.preventDefault(),e.stopPropagation(),i.actions.goToOption({focus:es.Focus.First});case ed.Keys.End:if(i.state.comboboxState===eS.Closed||e.shiftKey)break;return e.preventDefault(),e.stopPropagation(),i.actions.goToOption({focus:es.Focus.Last});case ed.Keys.PageDown:return e.preventDefault(),e.stopPropagation(),i.actions.goToOption({focus:es.Focus.Last});case ed.Keys.Escape:return i.state.comboboxState!==eS.Open?void 0:(e.preventDefault(),i.state.optionsElement&&!u.optionsPropsRef.current.static&&e.stopPropagation(),u.mode===eO.Single&&null===u.value&&I(),i.actions.closeCombobox());case ed.Keys.Tab:if(i.actions.setIsTyping(!1),i.state.comboboxState!==eS.Open)return;u.mode===eO.Single&&i.state.activationTrigger!==eE.Focus&&i.actions.selectActiveOption(),i.actions.closeCombobox()}}),A=(0,P.useEvent)(e=>{null==h||h(e),u.mode===eO.Single&&""===e.target.value&&I(),i.actions.openCombobox()}),D=(0,P.useEvent)(e=>{var t,o,n;let s=null!=(t=e.relatedTarget)?t:ei.history.find(t=>t!==e.currentTarget);if(!(null!=(o=i.state.optionsElement)&&o.contains(s))&&!(null!=(n=i.state.buttonElement)&&n.contains(s))&&i.state.comboboxState===eS.Open)return e.preventDefault(),u.mode===eO.Single&&null===u.value&&I(),i.actions.closeCombobox()}),k=(0,P.useEvent)(e=>{var t,o,n;let s=null!=(t=e.relatedTarget)?t:ei.history.find(t=>t!==e.currentTarget);null!=(o=i.state.buttonElement)&&o.contains(s)||null!=(n=i.state.optionsElement)&&n.contains(s)||u.disabled||u.immediate&&i.state.comboboxState!==eS.Open&&y.microTask(()=>{(0,r.flushSync)(()=>i.actions.openCombobox()),i.actions.setActivationTrigger(eE.Focus)})}),z=(0,ep.useLabelledBy)(),_=(0,ec.useDescribedBy)(),{isFocused:L,focusProps:B}=(0,s.useFocusRing)({autoFocus:v}),{isHovered:V,hoverProps:K}=(0,l.useHover)({isDisabled:f}),N=(0,en.useSlice)(i,e=>e.optionsElement),j=(0,$.useSlot)({open:O===eS.Open,disabled:f,invali
4d:u.invalid,hover:V,focus:L,autofocus:v}),H=(0,eu.mergeProps)({ref:S,id:p,role:"combobox",type:g,"aria-controls":null==N?void 0:N.id,"aria-expanded":O===eS.Open,"aria-activedescendant":(0,en.useSlice)(i,i.selectors.activeDescendantId),"aria-labelledby":z,"aria-describedby":_,"aria-autocomplete":"list",defaultValue:null!=(n=null!=(o=e.defaultValue)?o:void 0!==u.defaultValue?null==m?void 0:m(u.defaultValue):null)?n:u.defaultValue,disabled:f||void 0,autoFocus:v,onCompositionStart:R,onCompositionEnd:w,onKeyDown:F,onChange:A,onFocus:k,onBlur:D},B,K);return(0,eu.useRender)()({ourProps:H,theirProps:b,slot:j,defaultTag:"input",name:"Combobox.Input"})}),eV=ep.Label,eK=(0,eu.forwardRefWithAs)(function(e,t){var o,n,i;let s=(0,a.useId)(),{id:l=`headlessui-combobox-options-${s}`,hold:r=!1,anchor:u,portal:c=!1,modal:d=!0,transition:p=!1,...h}=e,m=eP("Combobox.Options"),f=eA("Combobox.Options"),v=(0,Y.useResolvedAnchor)(u);v&&(c=!0);let[g,b]=(0,Y.useFloatingPanel)(v),[x,S]=(0,a.useState)(null),O=(0,Y.useFloatingPanelProps)(),E=(0,U.useSyncRefs)(t,v?g:null,m.actions.setOptionsElement,S),[y,I,C,T,M]=(0,en.useSlice)(m,e=>[e.comboboxState,e.inputElement,e.buttonElement,e.optionsElement,e.activationTrigger]),w=(0,_.useOwnerDocument)(I||C),D=(0,_.useOwnerDocument)(T),z=(0,et.useOpenClosed)(),[L,B]=(0,q.useTransition)(p,x,null!==z?(z&et.State.Open)===et.State.Open:y===eS.Open);(0,k.useOnDisappear)(L,I,m.actions.closeCombobox);let W=!f.__demoMode&&d&&y===eS.Open;(0,j.useScrollLock)(W,D);let V=!f.__demoMode&&d&&y===eS.Open;(0,F.useInertOthers)(V,{allowed:(0,a.useCallback)(()=>[I,C,T],[I,C,T])});let K=!(0,en.useSlice)(m,m.selectors.didInputMove)&&L;(0,A.useIsoMorphicEffect)(()=>{var t;f.optionsPropsRef.current.static=null!=(t=e.static)&&t},[f.optionsPropsRef,e.static]),(0,A.useIsoMorphicEffect)(()=>{f.optionsPropsRef.current.hold=r},[f.optionsPropsRef,r]),(0,G.useTreeWalker)(y===eS.Open,{container:T,accept:e=>"option"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let N=(0,ep.useLabelledBy)([null==C?void 0:C.id]),H=(0,$.useSlot)({open:y===eS.Open,option:void 0}),J=(0,P.useEvent)(()=>{m.actions.setActivationTrigger(eE.Pointer)}),Q=(0,P.useEvent)(e=>{e.preventDefault(),m.actions.setActivationTrigger(eE.Pointer)}),X=(0,eu.mergeProps)(v?O():{},{"aria-labelledby":N,role:"listbox","aria-multiselectable":f.mode===eO.Multi||void 0,id:l,ref:E,style:{...h.style,...b,"--input-width":(0,R.useElementSize)(L,I,!0).width,"--button-width":(0,R.useElementSize)(L,C,!0).width},onWheel:M===eE.Pointer?void 0:J,onMouseDown:Q,...(0,q.transitionDataAttributes)(B)}),ee=L&&y===eS.Closed&&!e.static,eo=(0,Z.useFrozenData)(ee,null==(o=f.virtual)?void 0:o.options),ei=(0,Z.useFrozenData)(ee,f.value),es=(0,a.useCallback)(e=>f.compare(ei,e),[f.compare,ei]),el=(0,a.useMemo)(()=>{if(!f.virtual)return f;if(void 0===eo)throw Error("Missing `options` in virtual mode");return eo!==f.virtual.options?{...f,virtual:{...f.virtual,options:eo}}:f},[f,eo,null==(n=f.virtual)?void 0:n.options]);f.virtual&&Object.assign(h,{children:a.default.createElement(eF.Provider,{value:el},a.default.createElement(ek,{slot:H},h.children))});let ea=(0,eu.useRender)(),er=(0,a.useMemo)(()=>f.mode===eO.Multi?f:{...f,isSelected:es},[f,es]);return a.default.createElement(em.Portal,{enabled:!!c&&(e.static||L),ownerDocument:w},a.default.createElement(eF.Provider,{value:er},ea({ourProps:X,theirProps:{...h,children:a.default.createElement(Z.Frozen,{freeze:ee},"function"==typeof h.children?null==(i=h.children)?void 0:i.call(h,H):h.children)},slot:H,defaultTag:"div",features:e_,visible:K,name:"Combobox.Options"}
4)))}),eN=(0,eu.forwardRefWithAs)(function(e,t){var o,n,i;let s=eA("Combobox.Option"),l=eP("Combobox.Option"),r=(0,a.useId)(),{id:u=`headlessui-combobox-option-${r}`,value:c,disabled:d=null!=(i=null==(n=null==(o=s.virtual)?void 0:o.disabled)?void 0:n.call(o,c))&&i,order:p=null,...h}=e,[m]=(0,en.useSlice)(l,e=>[e.inputElement]),f=K(m),v=(0,en.useSlice)(l,(0,a.useCallback)(e=>l.selectors.isActive(e,c,u),[c,u])),g=s.isSelected(c),b=(0,a.useRef)(null),x=(0,D.useLatestValue)({disabled:d,value:c,domRef:b,order:p}),S=(0,a.useContext)(eD),O=(0,U.useSyncRefs)(t,b,S?S.measureElement:null),E=(0,P.useEvent)(()=>{l.actions.setIsTyping(!1),l.actions.onChange(c)});(0,A.useIsoMorphicEffect)(()=>l.actions.registerOption(u,x),[x,u]);let y=(0,en.useSlice)(l,(0,a.useCallback)(e=>l.selectors.shouldScrollIntoView(e,c,u),[c,u]));(0,A.useIsoMorphicEffect)(()=>{if(y)return(0,el.disposables)().requestAnimationFrame(()=>{var e,t;null==(t=null==(e=b.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})})},[y,b]);let I=(0,P.useEvent)(e=>{e.preventDefault(),e.button===eh.MouseButton.Left&&(d||(E(),(0,er.isMobile)()||requestAnimationFrame(()=>f()),s.mode===eO.Single&&l.actions.closeCombobox()))}),C=(0,P.useEvent)(()=>{if(d)return l.actions.goToOption({focus:es.Focus.Nothing});let e=s.calculateIndex(c);l.actions.goToOption({focus:es.Focus.Specific,idx:e})}),T=(0,H.useTrackedPointer)(),M=(0,P.useEvent)(e=>T.update(e)),R=(0,P.useEvent)(e=>{if(!T.wasMoved(e)||d||v&&l.state.activationTrigger===eE.Pointer)return;let t=s.calculateIndex(c);l.actions.goToOption({focus:es.Focus.Specific,idx:t},eE.Pointer)}),w=(0,P.useEvent)(e=>{T.wasMoved(e)&&(d||v&&(s.optionsPropsRef.current.hold||l.state.activationTrigger===eE.Pointer&&l.actions.goToOption({focus:es.Focus.Nothing})))}),F=(0,$.useSlot)({active:v,focus:v,selected:g,disabled:d});return(0,eu.useRender)()({ourProps:{id:u,ref:O,role:"option",tabIndex:!0===d?void 0:-1,"aria-disabled":!0===d||void 0,"aria-selected":g,disabled:void 0,onMouseDown:I,onFocus:C,onPointerEnter:M,onMouseEnter:M,onPointerMove:R,onMouseMove:R,onPointerLeave:w,onMouseLeave:w},theirProps:h,slot:F,defaultTag:"div",name:"Combobox.Option"})}),ej=Object.assign(eL,{Input:eW,Button:eB,Label:eV,Options:eK,Option:eN});e.s(["Combobox",0,ej,"ComboboxButton",0,eB,"ComboboxInput",0,eW,"ComboboxLabel",0,eV,"ComboboxOption",0,eN,"ComboboxOptions",0,eK],673407)},867104,e=>{"use strict";var t=e.i(920001),o=e.i(818737),n=e.i(929642);e.s(["useTreeWalker",0,function(e,i){let{container:s,accept:l,walk:a}=i,r=(0,t.useRef)(l),u=(0,t.useRef)(a);(0,t.useEffect)(()=>{r.current=l,u.current=a},[l,a]),(0,n.useIsoMorphicEffect)(()=>{if(!s||!e)return;let t=(0,o.getOwnerDocument)(s);if(!t)return;let n=r.current,i=u.current,l=Object.assign(e=>n(e),{acceptNode:n}),a=t.createTreeWalker(s,NodeFilter.SHOW_ELEMENT,l,!1);for(;a.nextNode();)i(a.currentNode)},[s,e,r,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.