cemtrik-dependencies 1.0.100 → 1.0.101
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -28,7 +28,7 @@ Check the top-level render call using <`+j+">.")}return S}}function br(d,S){{if(
|
|
|
28
28
|
color: hsl(${Math.max(0,Math.min(120-120*g,120))}deg 100% 31%);`,t==null?void 0:t.key)}return(a=t==null?void 0:t.onChange)==null||a.call(t,o),o}}function Nt(e,n){if(e===void 0)throw new Error("Unexpected undefined");return e}const Pr=(e,n)=>Math.abs(e-n)<1,Mr=(e,n,t)=>{let r;return function(...o){e.clearTimeout(r),r=e.setTimeout(()=>n.apply(this,o),t)}},Ar=e=>e,Dr=e=>{const n=Math.max(e.startIndex-e.overscan,0),t=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let o=n;o<=t;o++)r.push(o);return r},Lr=(e,n)=>{const t=e.scrollElement;if(!t)return;const r=e.targetWindow;if(!r)return;const o=i=>{const{width:s,height:a}=i;n({width:Math.round(s),height:Math.round(a)})};if(o(t.getBoundingClientRect()),!r.ResizeObserver)return()=>{};const l=new r.ResizeObserver(i=>{const s=i[0];if(s!=null&&s.borderBoxSize){const a=s.borderBoxSize[0];if(a){o({width:a.inlineSize,height:a.blockSize});return}}o(t.getBoundingClientRect())});return l.observe(t,{box:"border-box"}),()=>{l.unobserve(t)}},pn={passive:!0},_r=typeof window>"u"?!0:"onscrollend"in window,Rr=(e,n)=>{const t=e.scrollElement;if(!t)return;const r=e.targetWindow;if(!r)return;let o=0;const l=_r?()=>{}:Mr(r,()=>{n(o,!1)},e.options.isScrollingResetDelay),i=c=>()=>{o=t[e.options.horizontal?"scrollLeft":"scrollTop"],l(),n(o,c)},s=i(!0),a=i(!1);return a(),t.addEventListener("scroll",s,pn),t.addEventListener("scrollend",a,pn),()=>{t.removeEventListener("scroll",s),t.removeEventListener("scrollend",a)}},Br=(e,n,t)=>{if(n!=null&&n.borderBoxSize){const r=n.borderBoxSize[0];if(r)return Math.round(r[t.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[t.options.horizontal?"width":"height"])},zr=(e,{adjustments:n=0,behavior:t},r)=>{var o,l;const i=e+n;(l=(o=r.scrollElement)==null?void 0:o.scrollTo)==null||l.call(o,{[r.options.horizontal?"left":"top"]:i,behavior:t})};class Wr{constructor(n){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 t=null;const r=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(o=>{o.forEach(l=>{this._measureElement(l.target,l)})}));return{disconnect:()=>{var o;return(o=r())==null?void 0:o.disconnect()},observe:o=>{var l;return(l=r())==null?void 0:l.observe(o,{box:"border-box"})},unobserve:o=>{var l;return(l=r())==null?void 0:l.unobserve(o)}}})(),this.range=null,this.setOptions=t=>{Object.entries(t).forEach(([r,o])=>{typeof o>"u"&&delete t[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Ar,rangeExtractor:Dr,onChange:()=>{},measureElement:Br,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,...t}},this.notify=(t,r)=>{var o,l;const{startIndex:i,endIndex:s}=this.range??{startIndex:void 0,endIndex:void 0},a=this.calculateRange();(t||i!==(a==null?void 0:a.startIndex)||s!==(a==null?void 0:a.endIndex))&&((l=(o=this.options).onChange)==null||l.call(o,this,r))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.notify(!1,!1);return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(o,l)=>{this.scrollAdjustments=0,this.scrollDirection=l?this.getScrollOffset()<o?"forward":"backward":null,this.scrollOffset=o;const i=this.isScrolling;this.isScrolling=l,this.notify(i!==l,l)}))}},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=(t,r)=>{const o=new Map,l=new Map;for(let i=r-1;i>=0;i--){const s=t[i];if(o.has(s.lane))continue;const a=l.get(s.lane);if(a==null||s.end>a.end?l.set(s.lane,s):s.end<a.end&&o.set(s.lane,!0),o.size===this.options.lanes)break}return l.size===this.options.lanes?Array.from(l.values()).sort((i,s)=>i.end===s.end?i.index-s.index:i.end-s.end)[0]:void 0},this.getMeasurementOptions=Ge(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(t,r,o,l,i)=>(this.pendingMeasuredCacheIndexes=[],{count:t,paddingStart:r,scrollMargin:o,getItemKey:l,enabled:i}),{key:!1}),this.getMeasurements=Ge(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:t,paddingStart:r,scrollMargin:o,getItemKey:l,enabled:i},s)=>{var a;if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(h=>{this.itemSizeCache.set(h.key,h.size)}));const c=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const m=this.measurementsCache.slice(0,c);for(let h=c;h<t;h++){let b=(a=this.measurementsCache[h])==null?void 0:a.measureElement;b||(b=F=>{const I=l(h),P=this.elementsCache.get(I);if(!F){P&&(this.observer.unobserve(P),this.elementsCache.delete(I));return}P!==F&&(P&&this.observer.unobserve(P),this.observer.observe(F),this.elementsCache.set(I,F)),F.isConnected&&this.resizeItem(h,this.options.measureElement(F,void 0,this))});const p=l(h),v=this.options.lanes===1?m[h-1]:this.getFurthestMeasurement(m,h),g=v?v.end+this.options.gap:r+o,x=s.get(p),E=typeof x=="number"?x:this.options.estimateSize(h),w=g+E,C=v?v.lane:h%this.options.lanes;m[h]={index:h,start:g,size:E,end:w,key:p,lane:C,measureElement:b}}return this.measurementsCache=m,m},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Ge(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(t,r,o)=>this.range=t.length>0&&r>0?Ur({measurements:t,outerSize:r,scrollOffset:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getIndexes=Ge(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(t,r,o,l)=>r===null?[]:t({startIndex:r.startIndex,endIndex:r.endIndex,overscan:o,count:l}),{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.indexFromElement=t=>{const r=this.options.indexAttribute,o=t.getAttribute(r);return o?parseInt(o,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(t,r)=>{const o=this.indexFromElement(t),l=this.getMeasurements()[o];if(!l||!t.isConnected){this.elementsCache.forEach((s,a)=>{s===t&&(this.observer.unobserve(t),this.elementsCache.delete(a))});return}const i=this.elementsCache.get(l.key);i!==t&&(i&&this.observer.unobserve(i),this.observer.observe(t),this.elementsCache.set(l.key,t)),this.resizeItem(o,this.options.measureElement(t,r,this))},this.resizeItem=(t,r)=>{const o=this.getMeasurements()[t];if(!o)return;const l=this.itemSizeCache.get(o.key)??o.size,i=r-l;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,i,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",i),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,r)),this.notify(!0,!1))},this.measureElement=t=>{t&&this._measureElement(t,void 0)},this.getVirtualItems=Ge(()=>[this.getIndexes(),this.getMeasurements()],(t,r)=>{const o=[];for(let l=0,i=t.length;l<i;l++){const s=t[l],a=r[s];o.push(a)}return o},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=t=>{const r=this.getMeasurements();if(r.length!==0)return Nt(r[hn(0,r.length-1,o=>Nt(r[o]).start,t)])},this.getOffsetForAlignment=(t,r)=>{const o=this.getSize(),l=this.getScrollOffset();r==="auto"&&(t<=l?r="start":t>=l+o?r="end":r="start"),r==="start"?t=t:r==="end"?t=t-o:r==="center"&&(t=t-o/2);const i=this.options.horizontal?"scrollWidth":"scrollHeight",a=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[i]:this.scrollElement[i]:0)-o;return Math.max(Math.min(a,t),0)},this.getOffsetForIndex=(t,r="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const o=this.getMeasurements()[t];if(!o)return;const l=this.getSize(),i=this.getScrollOffset();if(r==="auto")if(o.end>=i+l-this.options.scrollPaddingEnd)r="end";else if(o.start<=i+this.options.scrollPaddingStart)r="start";else return[i,r];const s=r==="end"?o.end+this.options.scrollPaddingEnd:o.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,r),r]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(t,{align:r="start",behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(t,r),{adjustments:void 0,behavior:o})},this.scrollToIndex=(t,{align:r="auto",behavior:o}={})=>{t=Math.max(0,Math.min(t,this.options.count-1)),this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const l=this.getOffsetForIndex(t,r);if(!l)return;const[i,s]=l;this._scrollToOffset(i,{adjustments:void 0,behavior:o}),o!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(t))){const[c]=Nt(this.getOffsetForIndex(t,s));Pr(c,this.getScrollOffset())||this.scrollToIndex(t,{align:s,behavior:o})}else this.scrollToIndex(t,{align:s,behavior:o})}))},this.scrollBy=(t,{behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+t,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var t;const r=this.getMeasurements();let o;return r.length===0?o=this.options.paddingStart:o=this.options.lanes===1?((t=r[r.length-1])==null?void 0:t.end)??0:Math.max(...r.slice(-this.options.lanes).map(l=>l.end)),o-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(t,{adjustments:r,behavior:o})=>{this.options.scrollToFn(t,{behavior:o,adjustments:r},this)},this.measure=()=>{var t,r;this.itemSizeCache=new Map,(r=(t=this.options).onChange)==null||r.call(t,this,!1)},this.setOptions(n)}}const hn=(e,n,t,r)=>{for(;e<=n;){const o=(e+n)/2|0,l=t(o);if(l<r)e=o+1;else if(l>r)n=o-1;else return o}return e>0?e-1:0};function Ur({measurements:e,outerSize:n,scrollOffset:t}){const r=e.length-1,l=hn(0,r,s=>e[s].start,t);let i=l;for(;i<r&&e[i].end<t+n;)i++;return{startIndex:l,endIndex:i}}const Hr=typeof document<"u"?y.useLayoutEffect:y.useEffect;function Vr(e){const n=y.useReducer(()=>({}),{})[1],t={...e,onChange:(o,l)=>{var i;l?cn.flushSync(n):n(),(i=e.onChange)==null||i.call(e,o,l)}},[r]=y.useState(()=>new Wr(t));return r.setOptions(t),y.useEffect(()=>r._didMount(),[]),Hr(()=>r._willUpdate()),r}function Yr(e){return Vr({observeElementRect:Lr,observeElementOffset:Rr,scrollToFn:zr,...e})}var qr=Object.defineProperty,Gr=(e,n,t)=>n in e?qr(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Ft=(e,n,t)=>(Gr(e,typeof n!="symbol"?n+"":n,t),t);let Zr=class{constructor(){Ft(this,"current",this.detect()),Ft(this,"handoffState","pending"),Ft(this,"currentId",0)}set(n){this.current!==n&&(this.handoffState="pending",this.currentId=0,this.current=n)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Ce=new Zr,X=(e,n)=>{Ce.isServer?u.useEffect(e,n):u.useLayoutEffect(e,n)};function Se(e){let n=u.useRef(e);return X(()=>{n.current=e},[e]),n}function It(e,n){let[t,r]=u.useState(e),o=Se(e);return X(()=>r(o.current),[o,r,...n]),t}let N=function(e){let n=Se(e);return u.useCallback((...t)=>n.current(...t),[n])};function vn(e,n,t){let[r,o]=u.useState(t),l=e!==void 0,i=u.useRef(l),s=u.useRef(!1),a=u.useRef(!1);return l&&!i.current&&!s.current?(s.current=!0,i.current=l,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!l&&i.current&&!a.current&&(a.current=!0,i.current=l,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[l?e:r,N(c=>(l||o(c),n==null?void 0:n(c)))]}function at(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(n=>setTimeout(()=>{throw n}))}function we(){let e=[],n={addEventListener(t,r,o,l){return t.addEventListener(r,o,l),n.add(()=>t.removeEventListener(r,o,l))},requestAnimationFrame(...t){let r=requestAnimationFrame(...t);return n.add(()=>cancelAnimationFrame(r))},nextFrame(...t){return n.requestAnimationFrame(()=>n.requestAnimationFrame(...t))},setTimeout(...t){let r=setTimeout(...t);return n.add(()=>clearTimeout(r))},microTask(...t){let r={current:!0};return at(()=>{r.current&&t[0]()}),n.add(()=>{r.current=!1})},style(t,r,o){let l=t.style.getPropertyValue(r);return Object.assign(t.style,{[r]:o}),this.add(()=>{Object.assign(t.style,{[r]:l})})},group(t){let r=we();return t(r),this.add(()=>r.dispose())},add(t){return e.push(t),()=>{let r=e.indexOf(t);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let t of e.splice(0))t()}};return n}function Oe(){let[e]=u.useState(we);return u.useEffect(()=>()=>e.dispose(),[e]),e}function Kr(){let e=typeof document>"u";return"useSyncExternalStore"in y?(n=>n.useSyncExternalStore)(y)(()=>()=>{},()=>!1,()=>!e):!1}function Be(){let e=Kr(),[n,t]=y.useState(Ce.isHandoffComplete);return n&&Ce.isHandoffComplete===!1&&t(!1),y.useEffect(()=>{n!==!0&&t(!0)},[n]),y.useEffect(()=>Ce.handoff(),[]),e?!1:n}var gn;let ge=(gn=u.useId)!=null?gn:function(){let e=Be(),[n,t]=u.useState(e?()=>Ce.nextId():null);return X(()=>{n===null&&t(Ce.nextId())},[n]),n!=null?""+n:void 0};function se(e,n,...t){if(e in n){let o=n[e];return typeof o=="function"?o(...t):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(n).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,se),r}function ut(e){return Ce.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let kt=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var je=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(je||{}),bn=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(bn||{}),Jr=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Jr||{});function xn(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(kt)).sort((n,t)=>Math.sign((n.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}var $t=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))($t||{});function Pt(e,n=0){var t;return e===((t=ut(e))==null?void 0:t.body)?!1:se(n,{0(){return e.matches(kt)},1(){let r=e;for(;r!==null;){if(r.matches(kt))return!0;r=r.parentElement}return!1}})}function wn(e){let n=ut(e);we().nextFrame(()=>{n&&!Pt(n.activeElement,0)&&Ie(e)})}var Qr=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Qr||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Ie(e){e==null||e.focus({preventScroll:!0})}let Xr=["textarea","input"].join(",");function eo(e){var n,t;return(t=(n=e==null?void 0:e.matches)==null?void 0:n.call(e,Xr))!=null?t:!1}function Mt(e,n=t=>t){return e.slice().sort((t,r)=>{let o=n(t),l=n(r);if(o===null||l===null)return 0;let i=o.compareDocumentPosition(l);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function to(e,n){return Ze(xn(),n,{relativeTo:e})}function Ze(e,n,{sorted:t=!0,relativeTo:r=null,skipElements:o=[]}={}){let l=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,i=Array.isArray(e)?t?Mt(e):e:xn(e);o.length>0&&i.length>1&&(i=i.filter(p=>!o.includes(p))),r=r??l.activeElement;let s=(()=>{if(n&5)return 1;if(n&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),a=(()=>{if(n&1)return 0;if(n&2)return Math.max(0,i.indexOf(r))-1;if(n&4)return Math.max(0,i.indexOf(r))+1;if(n&8)return i.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=n&32?{preventScroll:!0}:{},m=0,h=i.length,b;do{if(m>=h||m+h<=0)return 0;let p=a+m;if(n&16)p=(p+h)%h;else{if(p<0)return 3;if(p>=h)return 1}b=i[p],b==null||b.focus(c),m+=s}while(b!==l.activeElement);return n&6&&eo(b)&&b.select(),2}function yn(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function no(){return/Android/gi.test(window.navigator.userAgent)}function En(){return yn()||no()}function ct(e,n,t){let r=Se(n);u.useEffect(()=>{function o(l){r.current(l)}return document.addEventListener(e,o,t),()=>document.removeEventListener(e,o,t)},[e,t])}function Sn(e,n,t){let r=Se(n);u.useEffect(()=>{function o(l){r.current(l)}return window.addEventListener(e,o,t),()=>window.removeEventListener(e,o,t)},[e,t])}function At(e,n,t=!0){let r=u.useRef(!1);u.useEffect(()=>{requestAnimationFrame(()=>{r.current=t})},[t]);function o(i,s){if(!r.current||i.defaultPrevented)return;let a=s(i);if(a===null||!a.getRootNode().contains(a)||!a.isConnected)return;let c=function m(h){return typeof h=="function"?m(h()):Array.isArray(h)||h instanceof Set?h:[h]}(e);for(let m of c){if(m===null)continue;let h=m instanceof HTMLElement?m:m.current;if(h!=null&&h.contains(a)||i.composed&&i.composedPath().includes(h))return}return!Pt(a,$t.Loose)&&a.tabIndex!==-1&&i.preventDefault(),n(i,a)}let l=u.useRef(null);ct("pointerdown",i=>{var s,a;r.current&&(l.current=((a=(s=i.composedPath)==null?void 0:s.call(i))==null?void 0:a[0])||i.target)},!0),ct("mousedown",i=>{var s,a;r.current&&(l.current=((a=(s=i.composedPath)==null?void 0:s.call(i))==null?void 0:a[0])||i.target)},!0),ct("click",i=>{En()||l.current&&(o(i,()=>l.current),l.current=null)},!0),ct("touchend",i=>o(i,()=>i.target instanceof HTMLElement?i.target:null),!0),Sn("blur",i=>o(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function De(...e){return u.useMemo(()=>ut(...e),[...e])}function Tn(e){var n;if(e.type)return e.type;let t=(n=e.as)!=null?n:"button";if(typeof t=="string"&&t.toLowerCase()==="button")return"button"}function Dt(e,n){let[t,r]=u.useState(()=>Tn(e));return X(()=>{r(Tn(e))},[e.type,e.as]),X(()=>{t||n.current&&n.current instanceof HTMLButtonElement&&!n.current.hasAttribute("type")&&r("button")},[t,n]),t}let Cn=Symbol();function ro(e,n=!0){return Object.assign(e,{[Cn]:n})}function ce(...e){let n=u.useRef(e);u.useEffect(()=>{n.current=e},[e]);let t=N(r=>{for(let o of n.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||(r==null?void 0:r[Cn]))?void 0:t}function On(e){return[e.screenX,e.screenY]}function jn(){let e=u.useRef([-1,-1]);return{wasMoved(n){let t=On(n);return e.current[0]===t[0]&&e.current[1]===t[1]?!1:(e.current=t,!0)},update(n){e.current=On(n)}}}function Nn({container:e,accept:n,walk:t,enabled:r=!0}){let o=u.useRef(n),l=u.useRef(t);u.useEffect(()=>{o.current=n,l.current=t},[n,t]),X(()=>{if(!e||!r)return;let i=ut(e);if(!i)return;let s=o.current,a=l.current,c=Object.assign(h=>s(h),{acceptNode:s}),m=i.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,c,!1);for(;m.nextNode();)a(m.currentNode)},[e,r,o,l])}function Ke(e,n){let t=u.useRef([]),r=N(e);u.useEffect(()=>{let o=[...t.current];for(let[l,i]of n.entries())if(t.current[l]!==i){let s=r(n,o);return t.current=n,s}},[r,...n])}function dt(...e){return Array.from(new Set(e.flatMap(n=>typeof n=="string"?n.split(" "):[]))).filter(Boolean).join(" ")}var ke=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(ke||{}),$e=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))($e||{});function oe({ourProps:e,theirProps:n,slot:t,defaultTag:r,features:o,visible:l=!0,name:i,mergeRefs:s}){s=s??oo;let a=Fn(n,e);if(l)return ft(a,t,r,i,s);let c=o??0;if(c&2){let{static:m=!1,...h}=a;if(m)return ft(h,t,r,i,s)}if(c&1){let{unmount:m=!0,...h}=a;return se(m?0:1,{0(){return null},1(){return ft({...h,hidden:!0,style:{display:"none"}},t,r,i,s)}})}return ft(a,t,r,i,s)}function ft(e,n={},t,r,o){let{as:l=t,children:i,refName:s="ref",...a}=Lt(e,["unmount","static"]),c=e.ref!==void 0?{[s]:e.ref}:{},m=typeof i=="function"?i(n):i;"className"in a&&a.className&&typeof a.className=="function"&&(a.className=a.className(n));let h={};if(n){let b=!1,p=[];for(let[v,g]of Object.entries(n))typeof g=="boolean"&&(b=!0),g===!0&&p.push(v);b&&(h["data-headlessui-state"]=p.join(" "))}if(l===u.Fragment&&Object.keys(mt(a)).length>0){if(!u.isValidElement(m)||Array.isArray(m)&&m.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(a).map(g=>` - ${g}`).join(`
|
|
29
29
|
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(g=>` - ${g}`).join(`
|
|
30
30
|
`)].join(`
|
|
31
|
-
`));let b=m.props,p=typeof(b==null?void 0:b.className)=="function"?(...g)=>dt(b==null?void 0:b.className(...g),a.className):dt(b==null?void 0:b.className,a.className),v=p?{className:p}:{};return u.cloneElement(m,Object.assign({},Fn(m.props,mt(Lt(a,["ref"]))),h,c,{ref:o(m.ref,c.ref)},v))}return u.createElement(l,Object.assign({},Lt(a,["ref"]),l!==u.Fragment&&c,l!==u.Fragment&&h),m)}function oo(...e){return e.every(n=>n==null)?void 0:n=>{for(let t of e)t!=null&&(typeof t=="function"?t(n):t.current=n)}}function Fn(...e){if(e.length===0)return{};if(e.length===1)return e[0];let n={},t={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(t[o]!=null||(t[o]=[]),t[o].push(r[o])):n[o]=r[o];if(n.disabled||n["aria-disabled"])return Object.assign(n,Object.fromEntries(Object.keys(t).map(r=>[r,void 0])));for(let r in t)Object.assign(n,{[r](o,...l){let i=t[r];for(let s of i){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;s(o,...l)}}});return n}function le(e){var n;return Object.assign(u.forwardRef(e),{displayName:(n=e.displayName)!=null?n:e.name})}function mt(e){let n=Object.assign({},e);for(let t in n)n[t]===void 0&&delete n[t];return n}function Lt(e,n=[]){let t=Object.assign({},e);for(let r of n)r in t&&delete t[r];return t}let lo="div";var ze=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(ze||{});function io(e,n){var t;let{features:r=1,...o}=e,l={ref:n,"aria-hidden":(r&2)===2?!0:(t=o["aria-hidden"])!=null?t:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return oe({ourProps:l,theirProps:o,slot:{},defaultTag:lo,name:"Hidden"})}let Je=le(io),_t=u.createContext(null);_t.displayName="OpenClosedContext";var de=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(de||{});function Qe(){return u.useContext(_t)}function Rt({value:e,children:n}){return u.createElement(_t.Provider,{value:e},n)}function so(e){function n(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",n))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",n),n())}let Te=[];so(()=>{function e(n){n.target instanceof HTMLElement&&n.target!==document.body&&Te[0]!==n.target&&(Te.unshift(n.target),Te=Te.filter(t=>t!=null&&t.isConnected),Te.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function pt(e){let n=e.parentElement,t=null;for(;n&&!(n instanceof HTMLFieldSetElement);)n instanceof HTMLLegendElement&&(t=n),n=n.parentElement;let r=(n==null?void 0:n.getAttribute("disabled"))==="";return r&&ao(t)?!1:r}function ao(e){if(!e)return!1;let n=e.previousElementSibling;for(;n!==null;){if(n instanceof HTMLLegendElement)return!1;n=n.previousElementSibling}return!0}function uo(e){throw new Error("Unexpected object: "+e)}var ee=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(ee||{});function Bt(e,n){let t=n.resolveItems();if(t.length<=0)return null;let r=n.resolveActiveIndex(),o=r??-1;switch(e.focus){case 0:{for(let l=0;l<t.length;++l)if(!n.resolveDisabled(t[l],l,t))return l;return r}case 1:{for(let l=o-1;l>=0;--l)if(!n.resolveDisabled(t[l],l,t))return l;return r}case 2:{for(let l=o+1;l<t.length;++l)if(!n.resolveDisabled(t[l],l,t))return l;return r}case 3:{for(let l=t.length-1;l>=0;--l)if(!n.resolveDisabled(t[l],l,t))return l;return r}case 4:{for(let l=0;l<t.length;++l)if(n.resolveId(t[l],l,t)===e.id)return l;return r}case 5:return null;default:uo(e)}}function In(e={},n=null,t=[]){for(let[r,o]of Object.entries(e))$n(t,kn(n,r),o);return t}function kn(e,n){return e?e+"["+n+"]":n}function $n(e,n,t){if(Array.isArray(t))for(let[r,o]of t.entries())$n(e,kn(n,r.toString()),o);else t instanceof Date?e.push([n,t.toISOString()]):typeof t=="boolean"?e.push([n,t?"1":"0"]):typeof t=="string"?e.push([n,t]):typeof t=="number"?e.push([n,`${t}`]):t==null?e.push([n,""]):In(t,n,e)}function co(e){var n,t;let r=(n=e==null?void 0:e.form)!=null?n:e.closest("form");if(r){for(let o of r.elements)if(o!==e&&(o.tagName==="INPUT"&&o.type==="submit"||o.tagName==="BUTTON"&&o.type==="submit"||o.nodeName==="INPUT"&&o.type==="image")){o.click();return}(t=r.requestSubmit)==null||t.call(r)}}var K=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(K||{}),fo=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(fo||{}),mo=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(mo||{}),po=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(po||{}),ho=(e=>(e[e.OpenCombobox=0]="OpenCombobox",e[e.CloseCombobox=1]="CloseCombobox",e[e.GoToOption=2]="GoToOption",e[e.RegisterOption=3]="RegisterOption",e[e.UnregisterOption=4]="UnregisterOption",e[e.RegisterLabel=5]="RegisterLabel",e[e.SetActivationTrigger=6]="SetActivationTrigger",e[e.UpdateVirtualOptions=7]="UpdateVirtualOptions",e))(ho||{});function zt(e,n=t=>t){let t=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=n(e.options.slice()),o=r.length>0&&r[0].dataRef.current.order!==null?r.sort((i,s)=>i.dataRef.current.order-s.dataRef.current.order):Mt(r,i=>i.dataRef.current.domRef.current),l=t?o.indexOf(t):null;return l===-1&&(l=null),{options:o,activeOptionIndex:l}}let vo={1(e){var n;return(n=e.dataRef.current)!=null&&n.disabled||e.comboboxState===1?e:{...e,activeOptionIndex:null,comboboxState:1}},0(e){var n,t;if((n=e.dataRef.current)!=null&&n.disabled||e.comboboxState===0)return e;if((t=e.dataRef.current)!=null&&t.value){let r=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(r!==-1)return{...e,activeOptionIndex:r,comboboxState:0}}return{...e,comboboxState:0}},2(e,n){var t,r,o,l,i;if((t=e.dataRef.current)!=null&&t.disabled||(r=e.dataRef.current)!=null&&r.optionsRef.current&&!((o=e.dataRef.current)!=null&&o.optionsPropsRef.current.static)&&e.comboboxState===1)return e;if(e.virtual){let m=n.focus===ee.Specific?n.idx:Bt(n,{resolveItems:()=>e.virtual.options,resolveActiveIndex:()=>{var b,p;return(p=(b=e.activeOptionIndex)!=null?b:e.virtual.options.findIndex(v=>!e.virtual.disabled(v)))!=null?p:null},resolveDisabled:e.virtual.disabled,resolveId(){throw new Error("Function not implemented.")}}),h=(l=n.trigger)!=null?l:2;return e.activeOptionIndex===m&&e.activationTrigger===h?e:{...e,activeOptionIndex:m,activationTrigger:h}}let s=zt(e);if(s.activeOptionIndex===null){let m=s.options.findIndex(h=>!h.dataRef.current.disabled);m!==-1&&(s.activeOptionIndex=m)}let a=n.focus===ee.Specific?n.idx:Bt(n,{resolveItems:()=>s.options,resolveActiveIndex:()=>s.activeOptionIndex,resolveId:m=>m.id,resolveDisabled:m=>m.dataRef.current.disabled}),c=(i=n.trigger)!=null?i:2;return e.activeOptionIndex===a&&e.activationTrigger===c?e:{...e,...s,activeOptionIndex:a,activationTrigger:c}},3:(e,n)=>{var t,r,o;if((t=e.dataRef.current)!=null&&t.virtual)return{...e,options:[...e.options,n.payload]};let l=n.payload,i=zt(e,a=>(a.push(l),a));e.activeOptionIndex===null&&(r=e.dataRef.current)!=null&&r.isSelected(n.payload.dataRef.current.value)&&(i.activeOptionIndex=i.options.indexOf(l));let s={...e,...i,activationTrigger:2};return(o=e.dataRef.current)!=null&&o.__demoMode&&e.dataRef.current.value===void 0&&(s.activeOptionIndex=0),s},4:(e,n)=>{var t;if((t=e.dataRef.current)!=null&&t.virtual)return{...e,options:e.options.filter(o=>o.id!==n.id)};let r=zt(e,o=>{let l=o.findIndex(i=>i.id===n.id);return l!==-1&&o.splice(l,1),o});return{...e,...r,activationTrigger:2}},5:(e,n)=>e.labelId===n.id?e:{...e,labelId:n.id},6:(e,n)=>e.activationTrigger===n.trigger?e:{...e,activationTrigger:n.trigger},7:(e,n)=>{var t;if(((t=e.virtual)==null?void 0:t.options)===n.options)return e;let r=e.activeOptionIndex;if(e.activeOptionIndex!==null){let o=n.options.indexOf(e.virtual.options[e.activeOptionIndex]);o!==-1?r=o:r=null}return{...e,activeOptionIndex:r,virtual:Object.assign({},e.virtual,{options:n.options})}}},Wt=u.createContext(null);Wt.displayName="ComboboxActionsContext";function Xe(e){let n=u.useContext(Wt);if(n===null){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Xe),t}return n}let Pn=u.createContext(null);function go(e){var n;let t=Le("VirtualProvider"),[r,o]=u.useMemo(()=>{let a=t.optionsRef.current;if(!a)return[0,0];let c=window.getComputedStyle(a);return[parseFloat(c.paddingBlockStart||c.paddingTop),parseFloat(c.paddingBlockEnd||c.paddingBottom)]},[t.optionsRef.current]),l=Yr({scrollPaddingStart:r,scrollPaddingEnd:o,count:t.virtual.options.length,estimateSize(){return 40},getScrollElement(){var a;return(a=t.optionsRef.current)!=null?a:null},overscan:12}),[i,s]=u.useState(0);return X(()=>{s(a=>a+1)},[(n=t.virtual)==null?void 0:n.options]),u.createElement(Pn.Provider,{value:l},u.createElement("div",{style:{position:"relative",width:"100%",height:`${l.getTotalSize()}px`},ref:a=>{if(a){if(typeof process<"u"&&process.env.JEST_WORKER_ID!==void 0||t.activationTrigger===0)return;t.activeOptionIndex!==null&&t.virtual.options.length>t.activeOptionIndex&&l.scrollToIndex(t.activeOptionIndex)}}},l.getVirtualItems().map(a=>{var c;return u.createElement(u.Fragment,{key:a.key},u.cloneElement((c=e.children)==null?void 0:c.call(e,{option:t.virtual.options[a.index],open:t.comboboxState===0}),{key:`${i}-${a.key}`,"data-index":a.index,"aria-setsize":t.virtual.options.length,"aria-posinset":a.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${a.start}px)`,overflowAnchor:"none"}}))})))}let Ut=u.createContext(null);Ut.displayName="ComboboxDataContext";function Le(e){let n=u.useContext(Ut);if(n===null){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Le),t}return n}function bo(e,n){return se(n.type,vo,e,n)}let xo=u.Fragment;function wo(e,n){let{value:t,defaultValue:r,onChange:o,form:l,name:i,by:s=null,disabled:a=!1,__demoMode:c=!1,nullable:m=!1,multiple:h=!1,immediate:b=!1,virtual:p=null,...v}=e,g=!1,x=null,[E=h?[]:void 0,w]=vn(t,o,r),[C,F]=u.useReducer(bo,{dataRef:u.createRef(),comboboxState:c?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),I=u.useRef(!1),P=u.useRef({static:!1,hold:!1}),z=u.useRef(null),W=u.useRef(null),R=u.useRef(null),L=u.useRef(null),H=N(typeof s=="string"?(A,G)=>{let U=s;return(A==null?void 0:A[U])===(G==null?void 0:G[U])}:s??((A,G)=>A===G)),J=N(A=>C.options.findIndex(G=>H(G.dataRef.current.value,A))),te=u.useCallback(A=>se(T.mode,{1:()=>E.some(G=>H(G,A)),0:()=>H(E,A)}),[E]),ae=N(A=>C.activeOptionIndex===J(A)),T=u.useMemo(()=>({...C,immediate:g,optionsPropsRef:P,labelRef:z,inputRef:W,buttonRef:R,optionsRef:L,value:E,defaultValue:r,disabled:a,mode:h?1:0,virtual:C.virtual,get activeOptionIndex(){if(I.current&&C.activeOptionIndex===null&&C.options.length>0){let A=C.options.findIndex(G=>!G.dataRef.current.disabled);if(A!==-1)return A}return C.activeOptionIndex},calculateIndex:J,compare:H,isSelected:te,isActive:ae,nullable:m,__demoMode:c}),[E,r,a,h,m,c,C,x]);X(()=>{},[x,void 0]),X(()=>{C.dataRef.current=T},[T]),At([T.buttonRef,T.inputRef,T.optionsRef],()=>Ae.closeCombobox(),T.comboboxState===0);let ne=u.useMemo(()=>{var A,G,U;return{open:T.comboboxState===0,disabled:a,activeIndex:T.activeOptionIndex,activeOption:T.activeOptionIndex===null?null:T.virtual?T.virtual.options[(A=T.activeOptionIndex)!=null?A:0]:(U=(G=T.options[T.activeOptionIndex])==null?void 0:G.dataRef.current.value)!=null?U:null,value:E}},[T,a,E]),O=N(()=>{if(T.activeOptionIndex!==null){if(T.virtual)ye(T.virtual.options[T.activeOptionIndex]);else{let{dataRef:A}=T.options[T.activeOptionIndex];ye(A.current.value)}Ae.goToOption(ee.Specific,T.activeOptionIndex)}}),D=N(()=>{F({type:0}),I.current=!0}),M=N(()=>{F({type:1}),I.current=!1}),q=N((A,G,U)=>(I.current=!1,A===ee.Specific?F({type:2,focus:ee.Specific,idx:G,trigger:U}):F({type:2,focus:A,trigger:U}))),ue=N((A,G)=>(F({type:3,payload:{id:A,dataRef:G}}),()=>{T.isActive(G.current.value)&&(I.current=!0),F({type:4,id:A})})),pe=N(A=>(F({type:5,id:A}),()=>F({type:5,id:null}))),ye=N(A=>se(T.mode,{0(){return w==null?void 0:w(A)},1(){let G=T.value.slice(),U=G.findIndex(he=>H(he,A));return U===-1?G.push(A):G.splice(U,1),w==null?void 0:w(G)}})),be=N(A=>{F({type:6,trigger:A})}),Ae=u.useMemo(()=>({onChange:ye,registerOption:ue,registerLabel:pe,goToOption:q,closeCombobox:M,openCombobox:D,setActivationTrigger:be,selectActiveOption:O}),[]),$=n===null?{}:{ref:n},V=u.useRef(null),ie=Oe();return u.useEffect(()=>{V.current&&r!==void 0&&ie.addEventListener(V.current,"reset",()=>{w==null||w(r)})},[V,w]),u.createElement(Wt.Provider,{value:Ae},u.createElement(Ut.Provider,{value:T},u.createElement(Rt,{value:se(T.comboboxState,{0:de.Open,1:de.Closed})},i!=null&&E!=null&&In({[i]:E}).map(([A,G],U)=>u.createElement(Je,{features:ze.Hidden,ref:U===0?he=>{var ve;V.current=(ve=he==null?void 0:he.closest("form"))!=null?ve:null}:void 0,...mt({key:A,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:l,disabled:a,name:A,value:G})})),oe({ourProps:$,theirProps:v,slot:ne,defaultTag:xo,name:"Combobox"}))))}let yo="input";function Eo(e,n){var t,r,o,l,i;let s=ge(),{id:a=`headlessui-combobox-input-${s}`,onChange:c,displayValue:m,type:h="text",...b}=e,p=Le("Combobox.Input"),v=Xe("Combobox.Input"),g=ce(p.inputRef,n),x=De(p.inputRef),E=u.useRef(!1),w=Oe(),C=N(()=>{v.onChange(null),p.optionsRef.current&&(p.optionsRef.current.scrollTop=0),v.goToOption(ee.Nothing)}),F=function(){var T;return typeof m=="function"&&p.value!==void 0?(T=m(p.value))!=null?T:"":typeof p.value=="string"?p.value:""}();Ke(([T,ne],[O,D])=>{if(E.current)return;let M=p.inputRef.current;M&&((D===0&&ne===1||T!==O)&&(M.value=T),requestAnimationFrame(()=>{if(E.current||!M||(x==null?void 0:x.activeElement)!==M)return;let{selectionStart:q,selectionEnd:ue}=M;Math.abs((ue??0)-(q??0))===0&&q===0&&M.setSelectionRange(M.value.length,M.value.length)}))},[F,p.comboboxState,x]),Ke(([T],[ne])=>{if(T===0&&ne===1){if(E.current)return;let O=p.inputRef.current;if(!O)return;let D=O.value,{selectionStart:M,selectionEnd:q,selectionDirection:ue}=O;O.value="",O.value=D,ue!==null?O.setSelectionRange(M,q,ue):O.setSelectionRange(M,q)}},[p.comboboxState]);let I=u.useRef(!1),P=N(()=>{I.current=!0}),z=N(()=>{w.nextFrame(()=>{I.current=!1})}),W=N(T=>{switch(E.current=!0,T.key){case K.Enter:if(E.current=!1,p.comboboxState!==0||I.current)return;if(T.preventDefault(),T.stopPropagation(),p.activeOptionIndex===null){v.closeCombobox();return}v.selectActiveOption(),p.mode===0&&v.closeCombobox();break;case K.ArrowDown:return E.current=!1,T.preventDefault(),T.stopPropagation(),se(p.comboboxState,{0:()=>v.goToOption(ee.Next),1:()=>v.openCombobox()});case K.ArrowUp:return E.current=!1,T.preventDefault(),T.stopPropagation(),se(p.comboboxState,{0:()=>v.goToOption(ee.Previous),1:()=>{v.openCombobox(),w.nextFrame(()=>{p.value||v.goToOption(ee.Last)})}});case K.Home:if(T.shiftKey)break;return E.current=!1,T.preventDefault(),T.stopPropagation(),v.goToOption(ee.First);case K.PageUp:return E.current=!1,T.preventDefault(),T.stopPropagation(),v.goToOption(ee.First);case K.End:if(T.shiftKey)break;return E.current=!1,T.preventDefault(),T.stopPropagation(),v.goToOption(ee.Last);case K.PageDown:return E.current=!1,T.preventDefault(),T.stopPropagation(),v.goToOption(ee.Last);case K.Escape:return E.current=!1,p.comboboxState!==0?void 0:(T.preventDefault(),p.optionsRef.current&&!p.optionsPropsRef.current.static&&T.stopPropagation(),p.nullable&&p.mode===0&&p.value===null&&C(),v.closeCombobox());case K.Tab:if(E.current=!1,p.comboboxState!==0)return;p.mode===0&&p.activationTrigger!==1&&v.selectActiveOption(),v.closeCombobox();break}}),R=N(T=>{c==null||c(T),p.nullable&&p.mode===0&&T.target.value===""&&C(),v.openCombobox()}),L=N(T=>{var ne,O,D;let M=(ne=T.relatedTarget)!=null?ne:Te.find(q=>q!==T.currentTarget);if(E.current=!1,!((O=p.optionsRef.current)!=null&&O.contains(M))&&!((D=p.buttonRef.current)!=null&&D.contains(M))&&p.comboboxState===0)return T.preventDefault(),p.mode===0&&(p.nullable&&p.value===null?C():p.activationTrigger!==1&&v.selectActiveOption()),v.closeCombobox()}),H=N(T=>{var ne,O,D;let M=(ne=T.relatedTarget)!=null?ne:Te.find(q=>q!==T.currentTarget);(O=p.buttonRef.current)!=null&&O.contains(M)||(D=p.optionsRef.current)!=null&&D.contains(M)||p.disabled||p.immediate&&p.comboboxState!==0&&(v.openCombobox(),w.nextFrame(()=>{v.setActivationTrigger(1)}))}),J=It(()=>{if(p.labelId)return[p.labelId].join(" ")},[p.labelId]),te=u.useMemo(()=>({open:p.comboboxState===0,disabled:p.disabled}),[p]),ae={ref:g,id:a,role:"combobox",type:h,"aria-controls":(t=p.optionsRef.current)==null?void 0:t.id,"aria-expanded":p.comboboxState===0,"aria-activedescendant":p.activeOptionIndex===null?void 0:p.virtual?(r=p.options.find(T=>{var ne;return!((ne=p.virtual)!=null&&ne.disabled(T.dataRef.current.value))&&p.compare(T.dataRef.current.value,p.virtual.options[p.activeOptionIndex])}))==null?void 0:r.id:(o=p.options[p.activeOptionIndex])==null?void 0:o.id,"aria-labelledby":J,"aria-autocomplete":"list",defaultValue:(i=(l=e.defaultValue)!=null?l:p.defaultValue!==void 0?m==null?void 0:m(p.defaultValue):null)!=null?i:p.defaultValue,disabled:p.disabled,onCompositionStart:P,onCompositionEnd:z,onKeyDown:W,onChange:R,onFocus:H,onBlur:L};return oe({ourProps:ae,theirProps:b,slot:te,defaultTag:yo,name:"Combobox.Input"})}let So="button";function To(e,n){var t;let r=Le("Combobox.Button"),o=Xe("Combobox.Button"),l=ce(r.buttonRef,n),i=ge(),{id:s=`headlessui-combobox-button-${i}`,...a}=e,c=Oe(),m=N(g=>{switch(g.key){case K.ArrowDown:return g.preventDefault(),g.stopPropagation(),r.comboboxState===1&&o.openCombobox(),c.nextFrame(()=>{var x;return(x=r.inputRef.current)==null?void 0:x.focus({preventScroll:!0})});case K.ArrowUp:return g.preventDefault(),g.stopPropagation(),r.comboboxState===1&&(o.openCombobox(),c.nextFrame(()=>{r.value||o.goToOption(ee.Last)})),c.nextFrame(()=>{var x;return(x=r.inputRef.current)==null?void 0:x.focus({preventScroll:!0})});case K.Escape:return r.comboboxState!==0?void 0:(g.preventDefault(),r.optionsRef.current&&!r.optionsPropsRef.current.static&&g.stopPropagation(),o.closeCombobox(),c.nextFrame(()=>{var x;return(x=r.inputRef.current)==null?void 0:x.focus({preventScroll:!0})}));default:return}}),h=N(g=>{if(pt(g.currentTarget))return g.preventDefault();r.comboboxState===0?o.closeCombobox():(g.preventDefault(),o.openCombobox()),c.nextFrame(()=>{var x;return(x=r.inputRef.current)==null?void 0:x.focus({preventScroll:!0})})}),b=It(()=>{if(r.labelId)return[r.labelId,s].join(" ")},[r.labelId,s]),p=u.useMemo(()=>({open:r.comboboxState===0,disabled:r.disabled,value:r.value}),[r]),v={ref:l,id:s,type:Dt(e,r.buttonRef),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(t=r.optionsRef.current)==null?void 0:t.id,"aria-expanded":r.comboboxState===0,"aria-labelledby":b,disabled:r.disabled,onClick:h,onKeyDown:m};return oe({ourProps:v,theirProps:a,slot:p,defaultTag:So,name:"Combobox.Button"})}let Co="label";function Oo(e,n){let t=ge(),{id:r=`headlessui-combobox-label-${t}`,...o}=e,l=Le("Combobox.Label"),i=Xe("Combobox.Label"),s=ce(l.labelRef,n);X(()=>i.registerLabel(r),[r]);let a=N(()=>{var m;return(m=l.inputRef.current)==null?void 0:m.focus({preventScroll:!0})}),c=u.useMemo(()=>({open:l.comboboxState===0,disabled:l.disabled}),[l]);return oe({ourProps:{ref:s,id:r,onClick:a},theirProps:o,slot:c,defaultTag:Co,name:"Combobox.Label"})}let jo="ul",No=ke.RenderStrategy|ke.Static;function Fo(e,n){let t=ge(),{id:r=`headlessui-combobox-options-${t}`,hold:o=!1,...l}=e,i=Le("Combobox.Options"),s=ce(i.optionsRef,n),a=Qe(),c=a!==null?(a&de.Open)===de.Open:i.comboboxState===0;X(()=>{var p;i.optionsPropsRef.current.static=(p=e.static)!=null?p:!1},[i.optionsPropsRef,e.static]),X(()=>{i.optionsPropsRef.current.hold=o},[i.optionsPropsRef,o]),Nn({container:i.optionsRef.current,enabled:i.comboboxState===0,accept(p){return p.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:p.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(p){p.setAttribute("role","none")}});let m=It(()=>{var p,v;return(v=i.labelId)!=null?v:(p=i.buttonRef.current)==null?void 0:p.id},[i.labelId,i.buttonRef.current]),h=u.useMemo(()=>({open:i.comboboxState===0,option:void 0}),[i]),b={"aria-labelledby":m,role:"listbox","aria-multiselectable":i.mode===1?!0:void 0,id:r,ref:s};return i.virtual&&i.comboboxState===0&&Object.assign(l,{children:u.createElement(go,null,l.children)}),oe({ourProps:b,theirProps:l,slot:h,defaultTag:jo,features:No,visible:c,name:"Combobox.Options"})}let Io="li";function ko(e,n){var t;let r=ge(),{id:o=`headlessui-combobox-option-${r}`,disabled:l=!1,value:i,order:s=null,...a}=e,c=Le("Combobox.Option"),m=Xe("Combobox.Option"),h=c.virtual?c.activeOptionIndex===c.calculateIndex(i):c.activeOptionIndex===null?!1:((t=c.options[c.activeOptionIndex])==null?void 0:t.id)===o,b=c.isSelected(i),p=u.useRef(null),v=Se({disabled:l,value:i,domRef:p,order:s}),g=u.useContext(Pn),x=ce(n,p,g?g.measureElement:null),E=N(()=>m.onChange(i));X(()=>m.registerOption(o,v),[v,o]);let w=u.useRef(!(c.virtual||c.__demoMode));X(()=>{if(!c.virtual||!c.__demoMode)return;let L=we();return L.requestAnimationFrame(()=>{w.current=!0}),L.dispose},[c.virtual,c.__demoMode]),X(()=>{if(!w.current||c.comboboxState!==0||!h||c.activationTrigger===0)return;let L=we();return L.requestAnimationFrame(()=>{var H,J;(J=(H=p.current)==null?void 0:H.scrollIntoView)==null||J.call(H,{block:"nearest"})}),L.dispose},[p,h,c.comboboxState,c.activationTrigger,c.activeOptionIndex]);let C=N(L=>{var H;if(l||(H=c.virtual)!=null&&H.disabled(i))return L.preventDefault();E(),En()||requestAnimationFrame(()=>{var J;return(J=c.inputRef.current)==null?void 0:J.focus({preventScroll:!0})}),c.mode===0&&requestAnimationFrame(()=>m.closeCombobox())}),F=N(()=>{var L;if(l||(L=c.virtual)!=null&&L.disabled(i))return m.goToOption(ee.Nothing);let H=c.calculateIndex(i);m.goToOption(ee.Specific,H)}),I=jn(),P=N(L=>I.update(L)),z=N(L=>{var H;if(!I.wasMoved(L)||l||(H=c.virtual)!=null&&H.disabled(i)||h)return;let J=c.calculateIndex(i);m.goToOption(ee.Specific,J,0)}),W=N(L=>{var H;I.wasMoved(L)&&(l||(H=c.virtual)!=null&&H.disabled(i)||h&&(c.optionsPropsRef.current.hold||m.goToOption(ee.Nothing)))}),R=u.useMemo(()=>({active:h,selected:b,disabled:l}),[h,b,l]);return oe({ourProps:{id:o,ref:x,role:"option",tabIndex:l===!0?void 0:-1,"aria-disabled":l===!0?!0:void 0,"aria-selected":b,disabled:void 0,onClick:C,onFocus:F,onPointerEnter:P,onMouseEnter:P,onPointerMove:z,onMouseMove:z,onPointerLeave:W,onMouseLeave:W},theirProps:a,slot:R,defaultTag:Io,name:"Combobox.Option"})}let $o=le(wo),Po=le(To),Mo=le(Eo),Ao=le(Oo),Do=le(Fo),Lo=le(ko),Ne=Object.assign($o,{Input:Mo,Button:Po,Label:Ao,Options:Do,Option:Lo});function Mn(e,n,t,r){let o=Se(t);u.useEffect(()=>{e=e??window;function l(i){o.current(i)}return e.addEventListener(n,l,r),()=>e.removeEventListener(n,l,r)},[e,n,r])}function et(){let e=u.useRef(!1);return X(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function An(e){let n=N(e),t=u.useRef(!1);u.useEffect(()=>(t.current=!1,()=>{t.current=!0,at(()=>{t.current&&n()})}),[n])}var tt=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(tt||{});function _o(){let e=u.useRef(0);return Sn("keydown",n=>{n.key==="Tab"&&(e.current=n.shiftKey?1:0)},!0),e}function Dn(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let n=new Set;for(let t of e.current)t.current instanceof HTMLElement&&n.add(t.current);return n}let Ro="div";var Ln=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(Ln||{});function Bo(e,n){let t=u.useRef(null),r=ce(t,n),{initialFocus:o,containers:l,features:i=30,...s}=e;Be()||(i=1);let a=De(t);Uo({ownerDocument:a},!!(i&16));let c=Ho({ownerDocument:a,container:t,initialFocus:o},!!(i&2));Vo({ownerDocument:a,container:t,containers:l,previousActiveElement:c},!!(i&8));let m=_o(),h=N(g=>{let x=t.current;x&&(E=>E())(()=>{se(m.current,{[tt.Forwards]:()=>{Ze(x,je.First,{skipElements:[g.relatedTarget]})},[tt.Backwards]:()=>{Ze(x,je.Last,{skipElements:[g.relatedTarget]})}})})}),b=Oe(),p=u.useRef(!1),v={ref:r,onKeyDown(g){g.key=="Tab"&&(p.current=!0,b.requestAnimationFrame(()=>{p.current=!1}))},onBlur(g){let x=Dn(l);t.current instanceof HTMLElement&&x.add(t.current);let E=g.relatedTarget;E instanceof HTMLElement&&E.dataset.headlessuiFocusGuard!=="true"&&(_n(x,E)||(p.current?Ze(t.current,se(m.current,{[tt.Forwards]:()=>je.Next,[tt.Backwards]:()=>je.Previous})|je.WrapAround,{relativeTo:g.target}):g.target instanceof HTMLElement&&Ie(g.target)))}};return u.createElement(u.Fragment,null,!!(i&4)&&u.createElement(Je,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:ze.Focusable}),oe({ourProps:v,theirProps:s,defaultTag:Ro,name:"FocusTrap"}),!!(i&4)&&u.createElement(Je,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:ze.Focusable}))}let zo=le(Bo),nt=Object.assign(zo,{features:Ln});function Wo(e=!0){let n=u.useRef(Te.slice());return Ke(([t],[r])=>{r===!0&&t===!1&&at(()=>{n.current.splice(0)}),r===!1&&t===!0&&(n.current=Te.slice())},[e,Te,n]),N(()=>{var t;return(t=n.current.find(r=>r!=null&&r.isConnected))!=null?t:null})}function Uo({ownerDocument:e},n){let t=Wo(n);Ke(()=>{n||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&Ie(t())},[n]),An(()=>{n&&Ie(t())})}function Ho({ownerDocument:e,container:n,initialFocus:t},r){let o=u.useRef(null),l=et();return Ke(()=>{if(!r)return;let i=n.current;i&&at(()=>{if(!l.current)return;let s=e==null?void 0:e.activeElement;if(t!=null&&t.current){if((t==null?void 0:t.current)===s){o.current=s;return}}else if(i.contains(s)){o.current=s;return}t!=null&&t.current?Ie(t.current):Ze(i,je.First)===bn.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),o.current=e==null?void 0:e.activeElement})},[r]),o}function Vo({ownerDocument:e,container:n,containers:t,previousActiveElement:r},o){let l=et();Mn(e==null?void 0:e.defaultView,"focus",i=>{if(!o||!l.current)return;let s=Dn(t);n.current instanceof HTMLElement&&s.add(n.current);let a=r.current;if(!a)return;let c=i.target;c&&c instanceof HTMLElement?_n(s,c)?(r.current=c,Ie(c)):(i.preventDefault(),i.stopPropagation(),Ie(a)):Ie(r.current)},!0)}function _n(e,n){for(let t of e)if(t.contains(n))return!0;return!1}let Rn=u.createContext(!1);function Yo(){return u.useContext(Rn)}function Ht(e){return u.createElement(Rn.Provider,{value:e.force},e.children)}function qo(e){let n=Yo(),t=u.useContext(Bn),r=De(e),[o,l]=u.useState(()=>{if(!n&&t!==null||Ce.isServer)return null;let i=r==null?void 0:r.getElementById("headlessui-portal-root");if(i)return i;if(r===null)return null;let s=r.createElement("div");return s.setAttribute("id","headlessui-portal-root"),r.body.appendChild(s)});return u.useEffect(()=>{o!==null&&(r!=null&&r.body.contains(o)||r==null||r.body.appendChild(o))},[o,r]),u.useEffect(()=>{n||t!==null&&l(t.current)},[t,l,n]),o}let Go=u.Fragment;function Zo(e,n){let t=e,r=u.useRef(null),o=ce(ro(m=>{r.current=m}),n),l=De(r),i=qo(r),[s]=u.useState(()=>{var m;return Ce.isServer?null:(m=l==null?void 0:l.createElement("div"))!=null?m:null}),a=u.useContext(Vt),c=Be();return X(()=>{!i||!s||i.contains(s)||(s.setAttribute("data-headlessui-portal",""),i.appendChild(s))},[i,s]),X(()=>{if(s&&a)return a.register(s)},[a,s]),An(()=>{var m;!i||!s||(s instanceof Node&&i.contains(s)&&i.removeChild(s),i.childNodes.length<=0&&((m=i.parentElement)==null||m.removeChild(i)))}),c?!i||!s?null:cn.createPortal(oe({ourProps:{ref:o},theirProps:t,defaultTag:Go,name:"Portal"}),s):null}let Ko=u.Fragment,Bn=u.createContext(null);function Jo(e,n){let{target:t,...r}=e,o={ref:ce(n)};return u.createElement(Bn.Provider,{value:t},oe({ourProps:o,theirProps:r,defaultTag:Ko,name:"Popover.Group"}))}let Vt=u.createContext(null);function Qo(){let e=u.useContext(Vt),n=u.useRef([]),t=N(l=>(n.current.push(l),e&&e.register(l),()=>r(l))),r=N(l=>{let i=n.current.indexOf(l);i!==-1&&n.current.splice(i,1),e&&e.unregister(l)}),o=u.useMemo(()=>({register:t,unregister:r,portals:n}),[t,r,n]);return[n,u.useMemo(()=>function({children:l}){return u.createElement(Vt.Provider,{value:o},l)},[o])]}let Xo=le(Zo),el=le(Jo),Yt=Object.assign(Xo,{Group:el});function tl(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}const nl=typeof Object.is=="function"?Object.is:tl,{useState:rl,useEffect:ol,useLayoutEffect:ll,useDebugValue:il}=y;function sl(e,n,t){const r=n(),[{inst:o},l]=rl({inst:{value:r,getSnapshot:n}});return ll(()=>{o.value=r,o.getSnapshot=n,qt(o)&&l({inst:o})},[e,r,n]),ol(()=>(qt(o)&&l({inst:o}),e(()=>{qt(o)&&l({inst:o})})),[e]),il(r),r}function qt(e){const n=e.getSnapshot,t=e.value;try{const r=n();return!nl(t,r)}catch{return!0}}function al(e,n,t){return n()}const ul=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",cl=!ul,dl=cl?al:sl,fl="useSyncExternalStore"in y?(e=>e.useSyncExternalStore)(y):dl;function ml(e){return fl(e.subscribe,e.getSnapshot,e.getSnapshot)}function pl(e,n){let t=e(),r=new Set;return{getSnapshot(){return t},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...l){let i=n[o].call(t,...l);i&&(t=i,r.forEach(s=>s()))}}}function hl(){let e;return{before({doc:n}){var t;let r=n.documentElement;e=((t=n.defaultView)!=null?t:window).innerWidth-r.clientWidth},after({doc:n,d:t}){let r=n.documentElement,o=r.clientWidth-r.offsetWidth,l=e-o;t.style(r,"paddingRight",`${l}px`)}}}function vl(){return yn()?{before({doc:e,d:n,meta:t}){function r(o){return t.containers.flatMap(l=>l()).some(l=>l.contains(o))}n.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let s=we();s.style(e.documentElement,"scrollBehavior","auto"),n.add(()=>n.microTask(()=>s.dispose()))}let l=(o=window.scrollY)!=null?o:window.pageYOffset,i=null;n.addEventListener(e,"click",s=>{if(s.target instanceof HTMLElement)try{let a=s.target.closest("a");if(!a)return;let{hash:c}=new URL(a.href),m=e.querySelector(c);m&&!r(m)&&(i=m)}catch{}},!0),n.addEventListener(e,"touchstart",s=>{if(s.target instanceof HTMLElement)if(r(s.target)){let a=s.target;for(;a.parentElement&&r(a.parentElement);)a=a.parentElement;n.style(a,"overscrollBehavior","contain")}else n.style(s.target,"touchAction","none")}),n.addEventListener(e,"touchmove",s=>{if(s.target instanceof HTMLElement)if(r(s.target)){let a=s.target;for(;a.parentElement&&a.dataset.headlessuiPortal!==""&&!(a.scrollHeight>a.clientHeight||a.scrollWidth>a.clientWidth);)a=a.parentElement;a.dataset.headlessuiPortal===""&&s.preventDefault()}else s.preventDefault()},{passive:!1}),n.add(()=>{var s;let a=(s=window.scrollY)!=null?s:window.pageYOffset;l!==a&&window.scrollTo(0,l),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)})})}}:{}}function gl(){return{before({doc:e,d:n}){n.style(e.documentElement,"overflow","hidden")}}}function bl(e){let n={};for(let t of e)Object.assign(n,t(n));return n}let _e=pl(()=>new Map,{PUSH(e,n){var t;let r=(t=this.get(e))!=null?t:{doc:e,count:0,d:we(),meta:new Set};return r.count++,r.meta.add(n),this.set(e,r),this},POP(e,n){let t=this.get(e);return t&&(t.count--,t.meta.delete(n)),this},SCROLL_PREVENT({doc:e,d:n,meta:t}){let r={doc:e,d:n,meta:bl(t)},o=[vl(),hl(),gl()];o.forEach(({before:l})=>l==null?void 0:l(r)),o.forEach(({after:l})=>l==null?void 0:l(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});_e.subscribe(()=>{let e=_e.getSnapshot(),n=new Map;for(let[t]of e)n.set(t,t.documentElement.style.overflow);for(let t of e.values()){let r=n.get(t.doc)==="hidden",o=t.count!==0;(o&&!r||!o&&r)&&_e.dispatch(t.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",t),t.count===0&&_e.dispatch("TEARDOWN",t)}});function xl(e,n,t){let r=ml(_e),o=e?r.get(e):void 0,l=o?o.count>0:!1;return X(()=>{if(!(!e||!n))return _e.dispatch("PUSH",e,t),()=>_e.dispatch("POP",e,t)},[n,e]),l}let Gt=new Map,rt=new Map;function zn(e,n=!0){X(()=>{var t;if(!n)return;let r=typeof e=="function"?e():e.current;if(!r)return;function o(){var i;if(!r)return;let s=(i=rt.get(r))!=null?i:1;if(s===1?rt.delete(r):rt.set(r,s-1),s!==1)return;let a=Gt.get(r);a&&(a["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",a["aria-hidden"]),r.inert=a.inert,Gt.delete(r))}let l=(t=rt.get(r))!=null?t:0;return rt.set(r,l+1),l!==0||(Gt.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0),o},[e,n])}function wl({defaultContainers:e=[],portals:n,mainTreeNodeRef:t}={}){var r;let o=u.useRef((r=t==null?void 0:t.current)!=null?r:null),l=De(o),i=N(()=>{var s,a,c;let m=[];for(let h of e)h!==null&&(h instanceof HTMLElement?m.push(h):"current"in h&&h.current instanceof HTMLElement&&m.push(h.current));if(n!=null&&n.current)for(let h of n.current)m.push(h);for(let h of(s=l==null?void 0:l.querySelectorAll("html > *, body > *"))!=null?s:[])h!==document.body&&h!==document.head&&h instanceof HTMLElement&&h.id!=="headlessui-portal-root"&&(h.contains(o.current)||h.contains((c=(a=o.current)==null?void 0:a.getRootNode())==null?void 0:c.host)||m.some(b=>h.contains(b))||m.push(h));return m});return{resolveContainers:i,contains:N(s=>i().some(a=>a.contains(s))),mainTreeNodeRef:o,MainTreeNode:u.useMemo(()=>function(){return t!=null?null:u.createElement(Je,{features:ze.Hidden,ref:o})},[o,t])}}let Zt=u.createContext(()=>{});Zt.displayName="StackContext";var Kt=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Kt||{});function yl(){return u.useContext(Zt)}function El({children:e,onUpdate:n,type:t,element:r,enabled:o}){let l=yl(),i=N((...s)=>{n==null||n(...s),l(...s)});return X(()=>{let s=o===void 0||o===!0;return s&&i(0,t,r),()=>{s&&i(1,t,r)}},[i,t,r,o]),u.createElement(Zt.Provider,{value:i},e)}let Wn=u.createContext(null);function Un(){let e=u.useContext(Wn);if(e===null){let n=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(n,Un),n}return e}function Hn(){let[e,n]=u.useState([]);return[e.length>0?e.join(" "):void 0,u.useMemo(()=>function(t){let r=N(l=>(n(i=>[...i,l]),()=>n(i=>{let s=i.slice(),a=s.indexOf(l);return a!==-1&&s.splice(a,1),s}))),o=u.useMemo(()=>({register:r,slot:t.slot,name:t.name,props:t.props}),[r,t.slot,t.name,t.props]);return u.createElement(Wn.Provider,{value:o},t.children)},[n])]}let Sl="p";function Tl(e,n){let t=ge(),{id:r=`headlessui-description-${t}`,...o}=e,l=Un(),i=ce(n);X(()=>l.register(r),[r,l.register]);let s={ref:i,...l.props,id:r};return oe({ourProps:s,theirProps:o,slot:l.slot||{},defaultTag:Sl,name:l.name||"Description"})}let Cl=le(Tl),Vn=Object.assign(Cl,{});var Ol=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Ol||{}),jl=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(jl||{});let Nl={0(e,n){return e.titleId===n.id?e:{...e,titleId:n.id}}},ht=u.createContext(null);ht.displayName="DialogContext";function ot(e){let n=u.useContext(ht);if(n===null){let t=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,ot),t}return n}function Fl(e,n,t=()=>[document.body]){xl(e,n,r=>{var o;return{containers:[...(o=r.containers)!=null?o:[],t]}})}function Il(e,n){return se(n.type,Nl,e,n)}let kl="div",$l=ke.RenderStrategy|ke.Static;function Pl(e,n){let t=ge(),{id:r=`headlessui-dialog-${t}`,open:o,onClose:l,initialFocus:i,role:s="dialog",__demoMode:a=!1,...c}=e,[m,h]=u.useState(0),b=u.useRef(!1);s=function(){return s==="dialog"||s==="alertdialog"?s:(b.current||(b.current=!0,console.warn(`Invalid role [${s}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let p=Qe();o===void 0&&p!==null&&(o=(p&de.Open)===de.Open);let v=u.useRef(null),g=ce(v,n),x=De(v),E=e.hasOwnProperty("open")||p!==null,w=e.hasOwnProperty("onClose");if(!E&&!w)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!E)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!w)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof o!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${o}`);if(typeof l!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${l}`);let C=o?0:1,[F,I]=u.useReducer(Il,{titleId:null,descriptionId:null,panelRef:u.createRef()}),P=N(()=>l(!1)),z=N(U=>I({type:0,id:U})),W=Be()?a?!1:C===0:!1,R=m>1,L=u.useContext(ht)!==null,[H,J]=Qo(),te={get current(){var U;return(U=F.panelRef.current)!=null?U:v.current}},{resolveContainers:ae,mainTreeNodeRef:T,MainTreeNode:ne}=wl({portals:H,defaultContainers:[te]}),O=R?"parent":"leaf",D=p!==null?(p&de.Closing)===de.Closing:!1,M=L||D?!1:W,q=u.useCallback(()=>{var U,he;return(he=Array.from((U=x==null?void 0:x.querySelectorAll("body > *"))!=null?U:[]).find(ve=>ve.id==="headlessui-portal-root"?!1:ve.contains(T.current)&&ve instanceof HTMLElement))!=null?he:null},[T]);zn(q,M);let ue=R?!0:W,pe=u.useCallback(()=>{var U,he;return(he=Array.from((U=x==null?void 0:x.querySelectorAll("[data-headlessui-portal]"))!=null?U:[]).find(ve=>ve.contains(T.current)&&ve instanceof HTMLElement))!=null?he:null},[T]);zn(pe,ue),At(ae,U=>{U.preventDefault(),P()},!(!W||R));let be=!(R||C!==0);Mn(x==null?void 0:x.defaultView,"keydown",U=>{be&&(U.defaultPrevented||U.key===K.Escape&&(U.preventDefault(),U.stopPropagation(),P()))}),Fl(x,!(D||C!==0||L),ae),u.useEffect(()=>{if(C!==0||!v.current)return;let U=new ResizeObserver(he=>{for(let ve of he){let We=ve.target.getBoundingClientRect();We.x===0&&We.y===0&&We.width===0&&We.height===0&&P()}});return U.observe(v.current),()=>U.disconnect()},[C,v,P]);let[$,V]=Hn(),ie=u.useMemo(()=>[{dialogState:C,close:P,setTitleId:z},F],[C,F,P,z]),A=u.useMemo(()=>({open:C===0}),[C]),G={ref:g,id:r,role:s,"aria-modal":C===0?!0:void 0,"aria-labelledby":F.titleId,"aria-describedby":$};return u.createElement(El,{type:"Dialog",enabled:C===0,element:v,onUpdate:N((U,he)=>{he==="Dialog"&&se(U,{[Kt.Add]:()=>h(ve=>ve+1),[Kt.Remove]:()=>h(ve=>ve-1)})})},u.createElement(Ht,{force:!0},u.createElement(Yt,null,u.createElement(ht.Provider,{value:ie},u.createElement(Yt.Group,{target:v},u.createElement(Ht,{force:!1},u.createElement(V,{slot:A,name:"Dialog.Description"},u.createElement(nt,{initialFocus:i,containers:ae,features:W?se(O,{parent:nt.features.RestoreFocus,leaf:nt.features.All&~nt.features.FocusLock}):nt.features.None},u.createElement(J,null,oe({ourProps:G,theirProps:c,slot:A,defaultTag:kl,features:$l,visible:C===0,name:"Dialog"}))))))))),u.createElement(ne,null))}let Ml="div";function Al(e,n){let t=ge(),{id:r=`headlessui-dialog-overlay-${t}`,...o}=e,[{dialogState:l,close:i}]=ot("Dialog.Overlay"),s=ce(n),a=N(m=>{if(m.target===m.currentTarget){if(pt(m.currentTarget))return m.preventDefault();m.preventDefault(),m.stopPropagation(),i()}}),c=u.useMemo(()=>({open:l===0}),[l]);return oe({ourProps:{ref:s,id:r,"aria-hidden":!0,onClick:a},theirProps:o,slot:c,defaultTag:Ml,name:"Dialog.Overlay"})}let Dl="div";function Ll(e,n){let t=ge(),{id:r=`headlessui-dialog-backdrop-${t}`,...o}=e,[{dialogState:l},i]=ot("Dialog.Backdrop"),s=ce(n);u.useEffect(()=>{if(i.panelRef.current===null)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")},[i.panelRef]);let a=u.useMemo(()=>({open:l===0}),[l]);return u.createElement(Ht,{force:!0},u.createElement(Yt,null,oe({ourProps:{ref:s,id:r,"aria-hidden":!0},theirProps:o,slot:a,defaultTag:Dl,name:"Dialog.Backdrop"})))}let _l="div";function Rl(e,n){let t=ge(),{id:r=`headlessui-dialog-panel-${t}`,...o}=e,[{dialogState:l},i]=ot("Dialog.Panel"),s=ce(n,i.panelRef),a=u.useMemo(()=>({open:l===0}),[l]),c=N(m=>{m.stopPropagation()});return oe({ourProps:{ref:s,id:r,onClick:c},theirProps:o,slot:a,defaultTag:_l,name:"Dialog.Panel"})}let Bl="h2";function zl(e,n){let t=ge(),{id:r=`headlessui-dialog-title-${t}`,...o}=e,[{dialogState:l,setTitleId:i}]=ot("Dialog.Title"),s=ce(n);u.useEffect(()=>(i(r),()=>i(null)),[r,i]);let a=u.useMemo(()=>({open:l===0}),[l]);return oe({ourProps:{ref:s,id:r},theirProps:o,slot:a,defaultTag:Bl,name:"Dialog.Title"})}let Wl=le(Pl),Ul=le(Ll),Hl=le(Rl),Vl=le(Al),Yl=le(zl),Yn=Object.assign(Wl,{Backdrop:Ul,Panel:Hl,Overlay:Vl,Title:Yl,Description:Vn}),qn=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Gn(e){var n,t;let r=(n=e.innerText)!=null?n:"",o=e.cloneNode(!0);if(!(o instanceof HTMLElement))return r;let l=!1;for(let s of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))s.remove(),l=!0;let i=l?(t=o.innerText)!=null?t:"":r;return qn.test(i)&&(i=i.replace(qn,"")),i}function ql(e){let n=e.getAttribute("aria-label");if(typeof n=="string")return n.trim();let t=e.getAttribute("aria-labelledby");if(t){let r=t.split(" ").map(o=>{let l=document.getElementById(o);if(l){let i=l.getAttribute("aria-label");return typeof i=="string"?i.trim():Gn(l).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return Gn(e).trim()}function Gl(e){let n=u.useRef(""),t=u.useRef("");return N(()=>{let r=e.current;if(!r)return"";let o=r.innerText;if(n.current===o)return t.current;let l=ql(r).trim().toLowerCase();return n.current=o,t.current=l,l})}var Zl=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Zl||{}),Kl=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Kl||{}),Jl=(e=>(e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItem=5]="RegisterItem",e[e.UnregisterItem=6]="UnregisterItem",e))(Jl||{});function Jt(e,n=t=>t){let t=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,r=Mt(n(e.items.slice()),l=>l.dataRef.current.domRef.current),o=t?r.indexOf(t):null;return o===-1&&(o=null),{items:r,activeItemIndex:o}}let Ql={1(e){return e.menuState===1?e:{...e,activeItemIndex:null,menuState:1}},0(e){return e.menuState===0?e:{...e,__demoMode:!1,menuState:0}},2:(e,n)=>{var t;let r=Jt(e),o=Bt(n,{resolveItems:()=>r.items,resolveActiveIndex:()=>r.activeItemIndex,resolveId:l=>l.id,resolveDisabled:l=>l.dataRef.current.disabled});return{...e,...r,searchQuery:"",activeItemIndex:o,activationTrigger:(t=n.trigger)!=null?t:1}},3:(e,n)=>{let t=e.searchQuery!==""?0:1,r=e.searchQuery+n.value.toLowerCase(),o=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+t).concat(e.items.slice(0,e.activeItemIndex+t)):e.items).find(i=>{var s;return((s=i.dataRef.current.textValue)==null?void 0:s.startsWith(r))&&!i.dataRef.current.disabled}),l=o?e.items.indexOf(o):-1;return l===-1||l===e.activeItemIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeItemIndex:l,activationTrigger:1}},4(e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},5:(e,n)=>{let t=Jt(e,r=>[...r,{id:n.id,dataRef:n.dataRef}]);return{...e,...t}},6:(e,n)=>{let t=Jt(e,r=>{let o=r.findIndex(l=>l.id===n.id);return o!==-1&&r.splice(o,1),r});return{...e,...t,activationTrigger:1}}},Qt=u.createContext(null);Qt.displayName="MenuContext";function vt(e){let n=u.useContext(Qt);if(n===null){let t=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,vt),t}return n}function Xl(e,n){return se(n.type,Ql,e,n)}let ei=u.Fragment;function ti(e,n){let{__demoMode:t=!1,...r}=e,o=u.useReducer(Xl,{__demoMode:t,menuState:t?0:1,buttonRef:u.createRef(),itemsRef:u.createRef(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:l,itemsRef:i,buttonRef:s},a]=o,c=ce(n);At([s,i],(p,v)=>{var g;a({type:1}),Pt(v,$t.Loose)||(p.preventDefault(),(g=s.current)==null||g.focus())},l===0);let m=N(()=>{a({type:1})}),h=u.useMemo(()=>({open:l===0,close:m}),[l,m]),b={ref:c};return u.createElement(Qt.Provider,{value:o},u.createElement(Rt,{value:se(l,{0:de.Open,1:de.Closed})},oe({ourProps:b,theirProps:r,slot:h,defaultTag:ei,name:"Menu"})))}let ni="button";function ri(e,n){var t;let r=ge(),{id:o=`headlessui-menu-button-${r}`,...l}=e,[i,s]=vt("Menu.Button"),a=ce(i.buttonRef,n),c=Oe(),m=N(g=>{switch(g.key){case K.Space:case K.Enter:case K.ArrowDown:g.preventDefault(),g.stopPropagation(),s({type:0}),c.nextFrame(()=>s({type:2,focus:ee.First}));break;case K.ArrowUp:g.preventDefault(),g.stopPropagation(),s({type:0}),c.nextFrame(()=>s({type:2,focus:ee.Last}));break}}),h=N(g=>{switch(g.key){case K.Space:g.preventDefault();break}}),b=N(g=>{if(pt(g.currentTarget))return g.preventDefault();e.disabled||(i.menuState===0?(s({type:1}),c.nextFrame(()=>{var x;return(x=i.buttonRef.current)==null?void 0:x.focus({preventScroll:!0})})):(g.preventDefault(),s({type:0})))}),p=u.useMemo(()=>({open:i.menuState===0}),[i]),v={ref:a,id:o,type:Dt(e,i.buttonRef),"aria-haspopup":"menu","aria-controls":(t=i.itemsRef.current)==null?void 0:t.id,"aria-expanded":i.menuState===0,onKeyDown:m,onKeyUp:h,onClick:b};return oe({ourProps:v,theirProps:l,slot:p,defaultTag:ni,name:"Menu.Button"})}let oi="div",li=ke.RenderStrategy|ke.Static;function ii(e,n){var t,r;let o=ge(),{id:l=`headlessui-menu-items-${o}`,...i}=e,[s,a]=vt("Menu.Items"),c=ce(s.itemsRef,n),m=De(s.itemsRef),h=Oe(),b=Qe(),p=b!==null?(b&de.Open)===de.Open:s.menuState===0;u.useEffect(()=>{let w=s.itemsRef.current;w&&s.menuState===0&&w!==(m==null?void 0:m.activeElement)&&w.focus({preventScroll:!0})},[s.menuState,s.itemsRef,m]),Nn({container:s.itemsRef.current,enabled:s.menuState===0,accept(w){return w.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:w.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(w){w.setAttribute("role","none")}});let v=N(w=>{var C,F;switch(h.dispose(),w.key){case K.Space:if(s.searchQuery!=="")return w.preventDefault(),w.stopPropagation(),a({type:3,value:w.key});case K.Enter:if(w.preventDefault(),w.stopPropagation(),a({type:1}),s.activeItemIndex!==null){let{dataRef:I}=s.items[s.activeItemIndex];(F=(C=I.current)==null?void 0:C.domRef.current)==null||F.click()}wn(s.buttonRef.current);break;case K.ArrowDown:return w.preventDefault(),w.stopPropagation(),a({type:2,focus:ee.Next});case K.ArrowUp:return w.preventDefault(),w.stopPropagation(),a({type:2,focus:ee.Previous});case K.Home:case K.PageUp:return w.preventDefault(),w.stopPropagation(),a({type:2,focus:ee.First});case K.End:case K.PageDown:return w.preventDefault(),w.stopPropagation(),a({type:2,focus:ee.Last});case K.Escape:w.preventDefault(),w.stopPropagation(),a({type:1}),we().nextFrame(()=>{var I;return(I=s.buttonRef.current)==null?void 0:I.focus({preventScroll:!0})});break;case K.Tab:w.preventDefault(),w.stopPropagation(),a({type:1}),we().nextFrame(()=>{to(s.buttonRef.current,w.shiftKey?je.Previous:je.Next)});break;default:w.key.length===1&&(a({type:3,value:w.key}),h.setTimeout(()=>a({type:4}),350));break}}),g=N(w=>{switch(w.key){case K.Space:w.preventDefault();break}}),x=u.useMemo(()=>({open:s.menuState===0}),[s]),E={"aria-activedescendant":s.activeItemIndex===null||(t=s.items[s.activeItemIndex])==null?void 0:t.id,"aria-labelledby":(r=s.buttonRef.current)==null?void 0:r.id,id:l,onKeyDown:v,onKeyUp:g,role:"menu",tabIndex:0,ref:c};return oe({ourProps:E,theirProps:i,slot:x,defaultTag:oi,features:li,visible:p,name:"Menu.Items"})}let si=u.Fragment;function ai(e,n){let t=ge(),{id:r=`headlessui-menu-item-${t}`,disabled:o=!1,...l}=e,[i,s]=vt("Menu.Item"),a=i.activeItemIndex!==null?i.items[i.activeItemIndex].id===r:!1,c=u.useRef(null),m=ce(n,c);X(()=>{if(i.__demoMode||i.menuState!==0||!a||i.activationTrigger===0)return;let I=we();return I.requestAnimationFrame(()=>{var P,z;(z=(P=c.current)==null?void 0:P.scrollIntoView)==null||z.call(P,{block:"nearest"})}),I.dispose},[i.__demoMode,c,a,i.menuState,i.activationTrigger,i.activeItemIndex]);let h=Gl(c),b=u.useRef({disabled:o,domRef:c,get textValue(){return h()}});X(()=>{b.current.disabled=o},[b,o]),X(()=>(s({type:5,id:r,dataRef:b}),()=>s({type:6,id:r})),[b,r]);let p=N(()=>{s({type:1})}),v=N(I=>{if(o)return I.preventDefault();s({type:1}),wn(i.buttonRef.current)}),g=N(()=>{if(o)return s({type:2,focus:ee.Nothing});s({type:2,focus:ee.Specific,id:r})}),x=jn(),E=N(I=>x.update(I)),w=N(I=>{x.wasMoved(I)&&(o||a||s({type:2,focus:ee.Specific,id:r,trigger:0}))}),C=N(I=>{x.wasMoved(I)&&(o||a&&s({type:2,focus:ee.Nothing}))}),F=u.useMemo(()=>({active:a,disabled:o,close:p}),[a,o,p]);return oe({ourProps:{id:r,ref:m,role:"menuitem",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,disabled:void 0,onClick:v,onFocus:g,onPointerEnter:E,onMouseEnter:E,onPointerMove:w,onMouseMove:w,onPointerLeave:C,onMouseLeave:C},theirProps:l,slot:F,defaultTag:si,name:"Menu.Item"})}let ui=le(ti),ci=le(ri),di=le(ii),fi=le(ai),gt=Object.assign(ui,{Button:ci,Items:di,Item:fi}),Zn=u.createContext(null);function Kn(){let e=u.useContext(Zn);if(e===null){let n=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(n,Kn),n}return e}function mi(){let[e,n]=u.useState([]);return[e.length>0?e.join(" "):void 0,u.useMemo(()=>function(t){let r=N(l=>(n(i=>[...i,l]),()=>n(i=>{let s=i.slice(),a=s.indexOf(l);return a!==-1&&s.splice(a,1),s}))),o=u.useMemo(()=>({register:r,slot:t.slot,name:t.name,props:t.props}),[r,t.slot,t.name,t.props]);return u.createElement(Zn.Provider,{value:o},t.children)},[n])]}let pi="label";function hi(e,n){let t=ge(),{id:r=`headlessui-label-${t}`,passive:o=!1,...l}=e,i=Kn(),s=ce(n);X(()=>i.register(r),[r,i.register]);let a={ref:s,...i.props,id:r};return o&&("onClick"in a&&(delete a.htmlFor,delete a.onClick),"onClick"in l&&delete l.onClick),oe({ourProps:a,theirProps:l,slot:i.slot||{},defaultTag:pi,name:i.name||"Label"})}let vi=le(hi),gi=Object.assign(vi,{});function bi(e=0){let[n,t]=u.useState(e),r=et(),o=u.useCallback(a=>{r.current&&t(c=>c|a)},[n,r]),l=u.useCallback(a=>!!(n&a),[n]),i=u.useCallback(a=>{r.current&&t(c=>c&~a)},[t,r]),s=u.useCallback(a=>{r.current&&t(c=>c^a)},[t]);return{flags:n,addFlag:o,hasFlag:l,removeFlag:i,toggleFlag:s}}let Xt=u.createContext(null);Xt.displayName="GroupContext";let xi=u.Fragment;function wi(e){var n;let[t,r]=u.useState(null),[o,l]=mi(),[i,s]=Hn(),a=u.useMemo(()=>({switch:t,setSwitch:r,labelledby:o,describedby:i}),[t,r,o,i]),c={},m=e;return u.createElement(s,{name:"Switch.Description"},u.createElement(l,{name:"Switch.Label",props:{htmlFor:(n=a.switch)==null?void 0:n.id,onClick(h){t&&(h.currentTarget.tagName==="LABEL"&&h.preventDefault(),t.click(),t.focus({preventScroll:!0}))}}},u.createElement(Xt.Provider,{value:a},oe({ourProps:c,theirProps:m,defaultTag:xi,name:"Switch.Group"}))))}let yi="button";function Ei(e,n){var t;let r=ge(),{id:o=`headlessui-switch-${r}`,checked:l,defaultChecked:i=!1,onChange:s,disabled:a=!1,name:c,value:m,form:h,...b}=e,p=u.useContext(Xt),v=u.useRef(null),g=ce(v,n,p===null?null:p.setSwitch),[x,E]=vn(l,s,i),w=N(()=>E==null?void 0:E(!x)),C=N(R=>{if(pt(R.currentTarget))return R.preventDefault();R.preventDefault(),w()}),F=N(R=>{R.key===K.Space?(R.preventDefault(),w()):R.key===K.Enter&&co(R.currentTarget)}),I=N(R=>R.preventDefault()),P=u.useMemo(()=>({checked:x}),[x]),z={id:o,ref:g,role:"switch",type:Dt(e,v),tabIndex:e.tabIndex===-1?0:(t=e.tabIndex)!=null?t:0,"aria-checked":x,"aria-labelledby":p==null?void 0:p.labelledby,"aria-describedby":p==null?void 0:p.describedby,disabled:a,onClick:C,onKeyUp:F,onKeyPress:I},W=Oe();return u.useEffect(()=>{var R;let L=(R=v.current)==null?void 0:R.closest("form");L&&i!==void 0&&W.addEventListener(L,"reset",()=>{E(i)})},[v,E]),u.createElement(u.Fragment,null,c!=null&&x&&u.createElement(Je,{features:ze.Hidden,...mt({as:"input",type:"checkbox",hidden:!0,readOnly:!0,disabled:a,form:h,checked:x,name:c,value:m})}),oe({ourProps:z,theirProps:b,slot:P,defaultTag:yi,name:"Switch"}))}let Si=le(Ei),Ti=wi,Ci=Object.assign(Si,{Group:Ti,Label:gi,Description:Vn});function Oi(e){let n={called:!1};return(...t)=>{if(!n.called)return n.called=!0,e(...t)}}function en(e,...n){e&&n.length>0&&e.classList.add(...n)}function tn(e,...n){e&&n.length>0&&e.classList.remove(...n)}function ji(e,n){let t=we();if(!e)return t.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[l,i]=[r,o].map(a=>{let[c=0]=a.split(",").filter(Boolean).map(m=>m.includes("ms")?parseFloat(m):parseFloat(m)*1e3).sort((m,h)=>h-m);return c}),s=l+i;if(s!==0){t.group(c=>{c.setTimeout(()=>{n(),c.dispose()},s),c.addEventListener(e,"transitionrun",m=>{m.target===m.currentTarget&&c.dispose()})});let a=t.addEventListener(e,"transitionend",c=>{c.target===c.currentTarget&&(n(),a())})}else n();return t.add(()=>n()),t.dispose}function Ni(e,n,t,r){let o=t?"enter":"leave",l=we(),i=r!==void 0?Oi(r):()=>{};o==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let s=se(o,{enter:()=>n.enter,leave:()=>n.leave}),a=se(o,{enter:()=>n.enterTo,leave:()=>n.leaveTo}),c=se(o,{enter:()=>n.enterFrom,leave:()=>n.leaveFrom});return tn(e,...n.base,...n.enter,...n.enterTo,...n.enterFrom,...n.leave,...n.leaveFrom,...n.leaveTo,...n.entered),en(e,...n.base,...s,...c),l.nextFrame(()=>{tn(e,...n.base,...s,...c),en(e,...n.base,...s,...a),ji(e,()=>(tn(e,...n.base,...s),en(e,...n.base,...n.entered),i()))}),l.dispose}function Fi({immediate:e,container:n,direction:t,classes:r,onStart:o,onStop:l}){let i=et(),s=Oe(),a=Se(t);X(()=>{e&&(a.current="enter")},[e]),X(()=>{let c=we();s.add(c.dispose);let m=n.current;if(m&&a.current!=="idle"&&i.current)return c.dispose(),o.current(a.current),c.add(Ni(m,r.current,a.current==="enter",()=>{c.dispose(),l.current(a.current)})),c.dispose},[t])}function Pe(e=""){return e.split(/\s+/).filter(n=>n.length>1)}let bt=u.createContext(null);bt.displayName="TransitionContext";var Ii=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Ii||{});function ki(){let e=u.useContext(bt);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function $i(){let e=u.useContext(xt);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let xt=u.createContext(null);xt.displayName="NestingContext";function wt(e){return"children"in e?wt(e.children):e.current.filter(({el:n})=>n.current!==null).filter(({state:n})=>n==="visible").length>0}function Jn(e,n){let t=Se(e),r=u.useRef([]),o=et(),l=Oe(),i=N((p,v=$e.Hidden)=>{let g=r.current.findIndex(({el:x})=>x===p);g!==-1&&(se(v,{[$e.Unmount](){r.current.splice(g,1)},[$e.Hidden](){r.current[g].state="hidden"}}),l.microTask(()=>{var x;!wt(r)&&o.current&&((x=t.current)==null||x.call(t))}))}),s=N(p=>{let v=r.current.find(({el:g})=>g===p);return v?v.state!=="visible"&&(v.state="visible"):r.current.push({el:p,state:"visible"}),()=>i(p,$e.Unmount)}),a=u.useRef([]),c=u.useRef(Promise.resolve()),m=u.useRef({enter:[],leave:[],idle:[]}),h=N((p,v,g)=>{a.current.splice(0),n&&(n.chains.current[v]=n.chains.current[v].filter(([x])=>x!==p)),n==null||n.chains.current[v].push([p,new Promise(x=>{a.current.push(x)})]),n==null||n.chains.current[v].push([p,new Promise(x=>{Promise.all(m.current[v].map(([E,w])=>w)).then(()=>x())})]),v==="enter"?c.current=c.current.then(()=>n==null?void 0:n.wait.current).then(()=>g(v)):g(v)}),b=N((p,v,g)=>{Promise.all(m.current[v].splice(0).map(([x,E])=>E)).then(()=>{var x;(x=a.current.shift())==null||x()}).then(()=>g(v))});return u.useMemo(()=>({children:r,register:s,unregister:i,onStart:h,onStop:b,wait:c,chains:m}),[s,i,r,h,b,m,c])}function Pi(){}let Mi=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Qn(e){var n;let t={};for(let r of Mi)t[r]=(n=e[r])!=null?n:Pi;return t}function Ai(e){let n=u.useRef(Qn(e));return u.useEffect(()=>{n.current=Qn(e)},[e]),n}let Di="div",Xn=ke.RenderStrategy;function Li(e,n){var t,r;let{beforeEnter:o,afterEnter:l,beforeLeave:i,afterLeave:s,enter:a,enterFrom:c,enterTo:m,entered:h,leave:b,leaveFrom:p,leaveTo:v,...g}=e,x=u.useRef(null),E=ce(x,n),w=(t=g.unmount)==null||t?$e.Unmount:$e.Hidden,{show:C,appear:F,initial:I}=ki(),[P,z]=u.useState(C?"visible":"hidden"),W=$i(),{register:R,unregister:L}=W;u.useEffect(()=>R(x),[R,x]),u.useEffect(()=>{if(w===$e.Hidden&&x.current){if(C&&P!=="visible"){z("visible");return}return se(P,{hidden:()=>L(x),visible:()=>R(x)})}},[P,x,R,L,C,w]);let H=Se({base:Pe(g.className),enter:Pe(a),enterFrom:Pe(c),enterTo:Pe(m),entered:Pe(h),leave:Pe(b),leaveFrom:Pe(p),leaveTo:Pe(v)}),J=Ai({beforeEnter:o,afterEnter:l,beforeLeave:i,afterLeave:s}),te=Be();u.useEffect(()=>{if(te&&P==="visible"&&x.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[x,P,te]);let ae=I&&!F,T=F&&C&&I,ne=!te||ae?"idle":C?"enter":"leave",O=bi(0),D=N(be=>se(be,{enter:()=>{O.addFlag(de.Opening),J.current.beforeEnter()},leave:()=>{O.addFlag(de.Closing),J.current.beforeLeave()},idle:()=>{}})),M=N(be=>se(be,{enter:()=>{O.removeFlag(de.Opening),J.current.afterEnter()},leave:()=>{O.removeFlag(de.Closing),J.current.afterLeave()},idle:()=>{}})),q=Jn(()=>{z("hidden"),L(x)},W),ue=u.useRef(!1);Fi({immediate:T,container:x,classes:H,direction:ne,onStart:Se(be=>{ue.current=!0,q.onStart(x,be,D)}),onStop:Se(be=>{ue.current=!1,q.onStop(x,be,M),be==="leave"&&!wt(q)&&(z("hidden"),L(x))})});let pe=g,ye={ref:E};return T?pe={...pe,className:dt(g.className,...H.current.enter,...H.current.enterFrom)}:ue.current&&(pe.className=dt(g.className,(r=x.current)==null?void 0:r.className),pe.className===""&&delete pe.className),u.createElement(xt.Provider,{value:q},u.createElement(Rt,{value:se(P,{visible:de.Open,hidden:de.Closed})|O.flags},oe({ourProps:ye,theirProps:pe,defaultTag:Di,features:Xn,visible:P==="visible",name:"Transition.Child"})))}function _i(e,n){let{show:t,appear:r=!1,unmount:o=!0,...l}=e,i=u.useRef(null),s=ce(i,n);Be();let a=Qe();if(t===void 0&&a!==null&&(t=(a&de.Open)===de.Open),![!0,!1].includes(t))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,m]=u.useState(t?"visible":"hidden"),h=Jn(()=>{m("hidden")}),[b,p]=u.useState(!0),v=u.useRef([t]);X(()=>{b!==!1&&v.current[v.current.length-1]!==t&&(v.current.push(t),p(!1))},[v,t]);let g=u.useMemo(()=>({show:t,appear:r,initial:b}),[t,r,b]);u.useEffect(()=>{if(t)m("visible");else if(!wt(h))m("hidden");else{let C=i.current;if(!C)return;let F=C.getBoundingClientRect();F.x===0&&F.y===0&&F.width===0&&F.height===0&&m("hidden")}},[t,h]);let x={unmount:o},E=N(()=>{var C;b&&p(!1),(C=e.beforeEnter)==null||C.call(e)}),w=N(()=>{var C;b&&p(!1),(C=e.beforeLeave)==null||C.call(e)});return u.createElement(xt.Provider,{value:h},u.createElement(bt.Provider,{value:g},oe({ourProps:{...x,as:u.Fragment,children:u.createElement(er,{ref:s,...x,...l,beforeEnter:E,beforeLeave:w})},theirProps:{},defaultTag:u.Fragment,features:Xn,visible:c==="visible",name:"Transition"})))}function Ri(e,n){let t=u.useContext(bt)!==null,r=Qe()!==null;return u.createElement(u.Fragment,null,!t&&r?u.createElement(nn,{ref:n,...e}):u.createElement(er,{ref:n,...e}))}let nn=le(_i),er=le(Li),Bi=le(Ri),Re=Object.assign(nn,{Child:Bi,Root:nn});function zi({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{fillRule:"evenodd",d:"M18 10a.75.75 0 0 1-.75.75H4.66l2.1 1.95a.75.75 0 1 1-1.02 1.1l-3.5-3.25a.75.75 0 0 1 0-1.1l3.5-3.25a.75.75 0 1 1 1.02 1.1l-2.1 1.95h12.59A.75.75 0 0 1 18 10Z",clipRule:"evenodd"}))}const Wi=y.forwardRef(zi);function Ui({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{fillRule:"evenodd",d:"M2 10a.75.75 0 0 1 .75-.75h12.59l-2.1-1.95a.75.75 0 1 1 1.02-1.1l3.5 3.25a.75.75 0 0 1 0 1.1l-3.5 3.25a.75.75 0 1 1-1.02-1.1l2.1-1.95H2.75A.75.75 0 0 1 2 10Z",clipRule:"evenodd"}))}const Hi=y.forwardRef(Ui);function Vi({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",clipRule:"evenodd"}))}const Yi=y.forwardRef(Vi);function qi({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const Gi=y.forwardRef(qi);function Zi({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{fillRule:"evenodd",d:"M9.47 6.47a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 1 1-1.06 1.06L10 8.06l-3.72 3.72a.75.75 0 0 1-1.06-1.06l4.25-4.25Z",clipRule:"evenodd"}))}const Ki=y.forwardRef(Zi);function Ji({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-8-5a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-1.5 0v-4.5A.75.75 0 0 1 10 5Zm0 10a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const tr=y.forwardRef(Ji);function Qi({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const Xi=y.forwardRef(Qi);function es({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM9 9a.75.75 0 0 0 0 1.5h.253a.25.25 0 0 1 .244.304l-.459 2.066A1.75 1.75 0 0 0 10.747 15H11a.75.75 0 0 0 0-1.5h-.253a.25.25 0 0 1-.244-.304l.459-2.066A1.75 1.75 0 0 0 9.253 9H9Z",clipRule:"evenodd"}))}const ts=y.forwardRef(es);function ns({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM8.28 7.22a.75.75 0 0 0-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 1 0 1.06 1.06L10 11.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L11.06 10l1.72-1.72a.75.75 0 0 0-1.06-1.06L10 8.94 8.28 7.22Z",clipRule:"evenodd"}))}const rs=y.forwardRef(ns),yt={warning:{color:"bg-yellow-50",icon:f.jsx(Xi,{className:"h-5 w-5 text-yellow-400","aria-hidden":"true"}),colorTitle:"text-yellow-800",colorText:"text-yellow-700"},error:{color:"bg-red-50",icon:f.jsx(rs,{className:"h-5 w-5 text-red-400","aria-hidden":"true"}),colorTitle:"text-red-800",colorText:"text-red-700"},success:{color:"bg-green-50",icon:f.jsx(Yi,{className:"h-5 w-5 text-green-400","aria-hidden":"true"}),colorTitle:"text-green-800",colorText:"text-green-700"},info:{color:"bg-blue-50",icon:f.jsx(ts,{className:"h-5 w-5 text-blue-400","aria-hidden":"true"}),colorTitle:"text-blue-800",colorText:"text-blue-700"}};let nr;const os=({type:e="info",title:n,message:t,active:r=!1,time:o=1e3,dispatch:l})=>{const{width:i}=Ot(),[s,a]=u.useState(!1);return u.useEffect(()=>r?(nr=window.setTimeout(()=>{a(!1),l({type:"ALERT",payload:{title:"",message:"",typeAlert:"",active:!1}})},o),a(!0)):(a(!1),()=>window.clearTimeout(nr)),[r,l,o]),f.jsx("div",{className:"fixed top-2.5 w-80 3xs:w-96 z-50",style:{left:`calc(50% - ${i<=470?"160px":"192px"})`},children:f.jsx(Re,{as:u.Fragment,show:s,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f.jsxs("div",{className:k("rounded-md p-4 text-center",yt[e].color),children:[f.jsxs("div",{className:"flex justify-center flex-shrink-0",children:[yt[e].icon,f.jsx("h3",{className:k("text-sm font-medium ml-3",yt[e].colorTitle),children:n})]}),f.jsx("div",{className:k("mt-2 text-sm",yt[e].colorText),children:f.jsx("p",{children:t})})]})})})};function ls({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{fillRule:"evenodd",d:"M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",clipRule:"evenodd"}))}const is=y.forwardRef(ls);function ss({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{fillRule:"evenodd",d:"M10.5 3.75a6.75 6.75 0 1 0 0 13.5 6.75 6.75 0 0 0 0-13.5ZM2.25 10.5a8.25 8.25 0 1 1 14.59 5.28l4.69 4.69a.75.75 0 1 1-1.06 1.06l-4.69-4.69A8.25 8.25 0 0 1 2.25 10.5Z",clipRule:"evenodd"}))}const as=y.forwardRef(ss);function us({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{d:"M21.731 2.269a2.625 2.625 0 0 0-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 0 0 0-3.712ZM19.513 8.199l-3.712-3.712-8.4 8.4a5.25 5.25 0 0 0-1.32 2.214l-.8 2.685a.75.75 0 0 0 .933.933l2.685-.8a5.25 5.25 0 0 0 2.214-1.32l8.4-8.4Z"}),y.createElement("path",{d:"M5.25 5.25a3 3 0 0 0-3 3v10.5a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3V13.5a.75.75 0 0 0-1.5 0v5.25a1.5 1.5 0 0 1-1.5 1.5H5.25a1.5 1.5 0 0 1-1.5-1.5V8.25a1.5 1.5 0 0 1 1.5-1.5h5.25a.75.75 0 0 0 0-1.5H5.25Z"}))}const cs=y.forwardRef(us);function ds({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{fillRule:"evenodd",d:"M1.5 6a2.25 2.25 0 0 1 2.25-2.25h16.5A2.25 2.25 0 0 1 22.5 6v12a2.25 2.25 0 0 1-2.25 2.25H3.75A2.25 2.25 0 0 1 1.5 18V6ZM3 16.06V18c0 .414.336.75.75.75h16.5A.75.75 0 0 0 21 18v-1.94l-2.69-2.689a1.5 1.5 0 0 0-2.12 0l-.88.879.97.97a.75.75 0 1 1-1.06 1.06l-5.16-5.159a1.5 1.5 0 0 0-2.12 0L3 16.061Zm10.125-7.81a1.125 1.125 0 1 1 2.25 0 1.125 1.125 0 0 1-2.25 0Z",clipRule:"evenodd"}))}const fs=y.forwardRef(ds);function ms({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{fillRule:"evenodd",d:"M18.685 19.097A9.723 9.723 0 0 0 21.75 12c0-5.385-4.365-9.75-9.75-9.75S2.25 6.615 2.25 12a9.723 9.723 0 0 0 3.065 7.097A9.716 9.716 0 0 0 12 21.75a9.716 9.716 0 0 0 6.685-2.653Zm-12.54-1.285A7.486 7.486 0 0 1 12 15a7.486 7.486 0 0 1 5.855 2.812A8.224 8.224 0 0 1 12 20.25a8.224 8.224 0 0 1-5.855-2.438ZM15.75 9a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z",clipRule:"evenodd"}))}const ps=y.forwardRef(ms);function hs({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{fillRule:"evenodd",d:"M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const vs=y.forwardRef(hs),gs=({src:e,alt:n,width:t,height:r,className:o="",classNameIcon:l="",isIcon:i=!0,acronym:s=""})=>{function a(){if(typeof s!="string")return s;const c=s.toLowerCase(),m=c.split(" "),h=m[m.length-1];return c.charAt(0)+h.charAt(0)}return f.jsx(f.Fragment,{children:e?f.jsx("img",{src:e,alt:n,width:t,height:r,className:k(o!==""&&o),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s",width:t,height:r},onLoad:c=>c.currentTarget.style.filter="none","data-testid":"img"}):i?f.jsx(ps,{className:k("bg-white text-default-5",l!==""?l:"w-7 h-7")}):f.jsx("div",{className:k("bg-gray-200 text-default-5 rounded-full font-bold uppercase flex justify-center items-center",l!==""?l:"w-7 h-7"),children:a()})})},bs=({steps:e,onClick:n})=>{const[t,r]=u.useState(0),o=l=>{r(l),n(l)};return f.jsx("nav",{className:"flex items-center justify-center w-full","aria-label":"Progress","data-testid":"bullets",children:f.jsx("ol",{role:"list",className:"flex items-center space-x-5",children:new Array(e).fill(1).map((l,i)=>f.jsx("li",{children:t!==i?f.jsx("div",{className:"cursor-pointer block h-2.5 w-2.5 rounded-full bg-gray-500 hover:bg-gray-600",onClick:()=>o(i),"data-testid":`step-${i}`,children:f.jsx("span",{className:"sr-only",children:"step"})}):f.jsxs("div",{className:"relative flex items-center justify-center cursor-pointer","aria-current":"step",children:[f.jsx("span",{className:"absolute flex h-5 w-5 p-px","aria-hidden":"true",children:f.jsx("span",{className:"h-full w-full rounded-full bg-gray-300"})}),f.jsx("span",{className:"relative block h-2.5 w-2.5 rounded-full bg-gray-500","aria-hidden":"true"}),f.jsx("span",{className:"sr-only",children:"step"})]})},i))})})};var rr={exports:{}};/*!
|
|
31
|
+
`));let b=m.props,p=typeof(b==null?void 0:b.className)=="function"?(...g)=>dt(b==null?void 0:b.className(...g),a.className):dt(b==null?void 0:b.className,a.className),v=p?{className:p}:{};return u.cloneElement(m,Object.assign({},Fn(m.props,mt(Lt(a,["ref"]))),h,c,{ref:o(m.ref,c.ref)},v))}return u.createElement(l,Object.assign({},Lt(a,["ref"]),l!==u.Fragment&&c,l!==u.Fragment&&h),m)}function oo(...e){return e.every(n=>n==null)?void 0:n=>{for(let t of e)t!=null&&(typeof t=="function"?t(n):t.current=n)}}function Fn(...e){if(e.length===0)return{};if(e.length===1)return e[0];let n={},t={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(t[o]!=null||(t[o]=[]),t[o].push(r[o])):n[o]=r[o];if(n.disabled||n["aria-disabled"])return Object.assign(n,Object.fromEntries(Object.keys(t).map(r=>[r,void 0])));for(let r in t)Object.assign(n,{[r](o,...l){let i=t[r];for(let s of i){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;s(o,...l)}}});return n}function le(e){var n;return Object.assign(u.forwardRef(e),{displayName:(n=e.displayName)!=null?n:e.name})}function mt(e){let n=Object.assign({},e);for(let t in n)n[t]===void 0&&delete n[t];return n}function Lt(e,n=[]){let t=Object.assign({},e);for(let r of n)r in t&&delete t[r];return t}let lo="div";var ze=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(ze||{});function io(e,n){var t;let{features:r=1,...o}=e,l={ref:n,"aria-hidden":(r&2)===2?!0:(t=o["aria-hidden"])!=null?t:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return oe({ourProps:l,theirProps:o,slot:{},defaultTag:lo,name:"Hidden"})}let Je=le(io),_t=u.createContext(null);_t.displayName="OpenClosedContext";var de=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(de||{});function Qe(){return u.useContext(_t)}function Rt({value:e,children:n}){return u.createElement(_t.Provider,{value:e},n)}function so(e){function n(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",n))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",n),n())}let Te=[];so(()=>{function e(n){n.target instanceof HTMLElement&&n.target!==document.body&&Te[0]!==n.target&&(Te.unshift(n.target),Te=Te.filter(t=>t!=null&&t.isConnected),Te.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function pt(e){let n=e.parentElement,t=null;for(;n&&!(n instanceof HTMLFieldSetElement);)n instanceof HTMLLegendElement&&(t=n),n=n.parentElement;let r=(n==null?void 0:n.getAttribute("disabled"))==="";return r&&ao(t)?!1:r}function ao(e){if(!e)return!1;let n=e.previousElementSibling;for(;n!==null;){if(n instanceof HTMLLegendElement)return!1;n=n.previousElementSibling}return!0}function uo(e){throw new Error("Unexpected object: "+e)}var ee=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(ee||{});function Bt(e,n){let t=n.resolveItems();if(t.length<=0)return null;let r=n.resolveActiveIndex(),o=r??-1;switch(e.focus){case 0:{for(let l=0;l<t.length;++l)if(!n.resolveDisabled(t[l],l,t))return l;return r}case 1:{for(let l=o-1;l>=0;--l)if(!n.resolveDisabled(t[l],l,t))return l;return r}case 2:{for(let l=o+1;l<t.length;++l)if(!n.resolveDisabled(t[l],l,t))return l;return r}case 3:{for(let l=t.length-1;l>=0;--l)if(!n.resolveDisabled(t[l],l,t))return l;return r}case 4:{for(let l=0;l<t.length;++l)if(n.resolveId(t[l],l,t)===e.id)return l;return r}case 5:return null;default:uo(e)}}function In(e={},n=null,t=[]){for(let[r,o]of Object.entries(e))$n(t,kn(n,r),o);return t}function kn(e,n){return e?e+"["+n+"]":n}function $n(e,n,t){if(Array.isArray(t))for(let[r,o]of t.entries())$n(e,kn(n,r.toString()),o);else t instanceof Date?e.push([n,t.toISOString()]):typeof t=="boolean"?e.push([n,t?"1":"0"]):typeof t=="string"?e.push([n,t]):typeof t=="number"?e.push([n,`${t}`]):t==null?e.push([n,""]):In(t,n,e)}function co(e){var n,t;let r=(n=e==null?void 0:e.form)!=null?n:e.closest("form");if(r){for(let o of r.elements)if(o!==e&&(o.tagName==="INPUT"&&o.type==="submit"||o.tagName==="BUTTON"&&o.type==="submit"||o.nodeName==="INPUT"&&o.type==="image")){o.click();return}(t=r.requestSubmit)==null||t.call(r)}}var K=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(K||{}),fo=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(fo||{}),mo=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(mo||{}),po=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(po||{}),ho=(e=>(e[e.OpenCombobox=0]="OpenCombobox",e[e.CloseCombobox=1]="CloseCombobox",e[e.GoToOption=2]="GoToOption",e[e.RegisterOption=3]="RegisterOption",e[e.UnregisterOption=4]="UnregisterOption",e[e.RegisterLabel=5]="RegisterLabel",e[e.SetActivationTrigger=6]="SetActivationTrigger",e[e.UpdateVirtualOptions=7]="UpdateVirtualOptions",e))(ho||{});function zt(e,n=t=>t){let t=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=n(e.options.slice()),o=r.length>0&&r[0].dataRef.current.order!==null?r.sort((i,s)=>i.dataRef.current.order-s.dataRef.current.order):Mt(r,i=>i.dataRef.current.domRef.current),l=t?o.indexOf(t):null;return l===-1&&(l=null),{options:o,activeOptionIndex:l}}let vo={1(e){var n;return(n=e.dataRef.current)!=null&&n.disabled||e.comboboxState===1?e:{...e,activeOptionIndex:null,comboboxState:1}},0(e){var n,t;if((n=e.dataRef.current)!=null&&n.disabled||e.comboboxState===0)return e;if((t=e.dataRef.current)!=null&&t.value){let r=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(r!==-1)return{...e,activeOptionIndex:r,comboboxState:0}}return{...e,comboboxState:0}},2(e,n){var t,r,o,l,i;if((t=e.dataRef.current)!=null&&t.disabled||(r=e.dataRef.current)!=null&&r.optionsRef.current&&!((o=e.dataRef.current)!=null&&o.optionsPropsRef.current.static)&&e.comboboxState===1)return e;if(e.virtual){let m=n.focus===ee.Specific?n.idx:Bt(n,{resolveItems:()=>e.virtual.options,resolveActiveIndex:()=>{var b,p;return(p=(b=e.activeOptionIndex)!=null?b:e.virtual.options.findIndex(v=>!e.virtual.disabled(v)))!=null?p:null},resolveDisabled:e.virtual.disabled,resolveId(){throw new Error("Function not implemented.")}}),h=(l=n.trigger)!=null?l:2;return e.activeOptionIndex===m&&e.activationTrigger===h?e:{...e,activeOptionIndex:m,activationTrigger:h}}let s=zt(e);if(s.activeOptionIndex===null){let m=s.options.findIndex(h=>!h.dataRef.current.disabled);m!==-1&&(s.activeOptionIndex=m)}let a=n.focus===ee.Specific?n.idx:Bt(n,{resolveItems:()=>s.options,resolveActiveIndex:()=>s.activeOptionIndex,resolveId:m=>m.id,resolveDisabled:m=>m.dataRef.current.disabled}),c=(i=n.trigger)!=null?i:2;return e.activeOptionIndex===a&&e.activationTrigger===c?e:{...e,...s,activeOptionIndex:a,activationTrigger:c}},3:(e,n)=>{var t,r,o;if((t=e.dataRef.current)!=null&&t.virtual)return{...e,options:[...e.options,n.payload]};let l=n.payload,i=zt(e,a=>(a.push(l),a));e.activeOptionIndex===null&&(r=e.dataRef.current)!=null&&r.isSelected(n.payload.dataRef.current.value)&&(i.activeOptionIndex=i.options.indexOf(l));let s={...e,...i,activationTrigger:2};return(o=e.dataRef.current)!=null&&o.__demoMode&&e.dataRef.current.value===void 0&&(s.activeOptionIndex=0),s},4:(e,n)=>{var t;if((t=e.dataRef.current)!=null&&t.virtual)return{...e,options:e.options.filter(o=>o.id!==n.id)};let r=zt(e,o=>{let l=o.findIndex(i=>i.id===n.id);return l!==-1&&o.splice(l,1),o});return{...e,...r,activationTrigger:2}},5:(e,n)=>e.labelId===n.id?e:{...e,labelId:n.id},6:(e,n)=>e.activationTrigger===n.trigger?e:{...e,activationTrigger:n.trigger},7:(e,n)=>{var t;if(((t=e.virtual)==null?void 0:t.options)===n.options)return e;let r=e.activeOptionIndex;if(e.activeOptionIndex!==null){let o=n.options.indexOf(e.virtual.options[e.activeOptionIndex]);o!==-1?r=o:r=null}return{...e,activeOptionIndex:r,virtual:Object.assign({},e.virtual,{options:n.options})}}},Wt=u.createContext(null);Wt.displayName="ComboboxActionsContext";function Xe(e){let n=u.useContext(Wt);if(n===null){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Xe),t}return n}let Pn=u.createContext(null);function go(e){var n;let t=Le("VirtualProvider"),[r,o]=u.useMemo(()=>{let a=t.optionsRef.current;if(!a)return[0,0];let c=window.getComputedStyle(a);return[parseFloat(c.paddingBlockStart||c.paddingTop),parseFloat(c.paddingBlockEnd||c.paddingBottom)]},[t.optionsRef.current]),l=Yr({scrollPaddingStart:r,scrollPaddingEnd:o,count:t.virtual.options.length,estimateSize(){return 40},getScrollElement(){var a;return(a=t.optionsRef.current)!=null?a:null},overscan:12}),[i,s]=u.useState(0);return X(()=>{s(a=>a+1)},[(n=t.virtual)==null?void 0:n.options]),u.createElement(Pn.Provider,{value:l},u.createElement("div",{style:{position:"relative",width:"100%",height:`${l.getTotalSize()}px`},ref:a=>{if(a){if(typeof process<"u"&&process.env.JEST_WORKER_ID!==void 0||t.activationTrigger===0)return;t.activeOptionIndex!==null&&t.virtual.options.length>t.activeOptionIndex&&l.scrollToIndex(t.activeOptionIndex)}}},l.getVirtualItems().map(a=>{var c;return u.createElement(u.Fragment,{key:a.key},u.cloneElement((c=e.children)==null?void 0:c.call(e,{option:t.virtual.options[a.index],open:t.comboboxState===0}),{key:`${i}-${a.key}`,"data-index":a.index,"aria-setsize":t.virtual.options.length,"aria-posinset":a.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${a.start}px)`,overflowAnchor:"none"}}))})))}let Ut=u.createContext(null);Ut.displayName="ComboboxDataContext";function Le(e){let n=u.useContext(Ut);if(n===null){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Le),t}return n}function bo(e,n){return se(n.type,vo,e,n)}let xo=u.Fragment;function wo(e,n){let{value:t,defaultValue:r,onChange:o,form:l,name:i,by:s=null,disabled:a=!1,__demoMode:c=!1,nullable:m=!1,multiple:h=!1,immediate:b=!1,virtual:p=null,...v}=e,g=!1,x=null,[E=h?[]:void 0,w]=vn(t,o,r),[C,F]=u.useReducer(bo,{dataRef:u.createRef(),comboboxState:c?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),I=u.useRef(!1),P=u.useRef({static:!1,hold:!1}),z=u.useRef(null),W=u.useRef(null),R=u.useRef(null),L=u.useRef(null),H=N(typeof s=="string"?(A,G)=>{let U=s;return(A==null?void 0:A[U])===(G==null?void 0:G[U])}:s??((A,G)=>A===G)),J=N(A=>C.options.findIndex(G=>H(G.dataRef.current.value,A))),te=u.useCallback(A=>se(T.mode,{1:()=>E.some(G=>H(G,A)),0:()=>H(E,A)}),[E]),ae=N(A=>C.activeOptionIndex===J(A)),T=u.useMemo(()=>({...C,immediate:g,optionsPropsRef:P,labelRef:z,inputRef:W,buttonRef:R,optionsRef:L,value:E,defaultValue:r,disabled:a,mode:h?1:0,virtual:C.virtual,get activeOptionIndex(){if(I.current&&C.activeOptionIndex===null&&C.options.length>0){let A=C.options.findIndex(G=>!G.dataRef.current.disabled);if(A!==-1)return A}return C.activeOptionIndex},calculateIndex:J,compare:H,isSelected:te,isActive:ae,nullable:m,__demoMode:c}),[E,r,a,h,m,c,C,x]);X(()=>{},[x,void 0]),X(()=>{C.dataRef.current=T},[T]),At([T.buttonRef,T.inputRef,T.optionsRef],()=>Ae.closeCombobox(),T.comboboxState===0);let ne=u.useMemo(()=>{var A,G,U;return{open:T.comboboxState===0,disabled:a,activeIndex:T.activeOptionIndex,activeOption:T.activeOptionIndex===null?null:T.virtual?T.virtual.options[(A=T.activeOptionIndex)!=null?A:0]:(U=(G=T.options[T.activeOptionIndex])==null?void 0:G.dataRef.current.value)!=null?U:null,value:E}},[T,a,E]),O=N(()=>{if(T.activeOptionIndex!==null){if(T.virtual)ye(T.virtual.options[T.activeOptionIndex]);else{let{dataRef:A}=T.options[T.activeOptionIndex];ye(A.current.value)}Ae.goToOption(ee.Specific,T.activeOptionIndex)}}),D=N(()=>{F({type:0}),I.current=!0}),M=N(()=>{F({type:1}),I.current=!1}),q=N((A,G,U)=>(I.current=!1,A===ee.Specific?F({type:2,focus:ee.Specific,idx:G,trigger:U}):F({type:2,focus:A,trigger:U}))),ue=N((A,G)=>(F({type:3,payload:{id:A,dataRef:G}}),()=>{T.isActive(G.current.value)&&(I.current=!0),F({type:4,id:A})})),pe=N(A=>(F({type:5,id:A}),()=>F({type:5,id:null}))),ye=N(A=>se(T.mode,{0(){return w==null?void 0:w(A)},1(){let G=T.value.slice(),U=G.findIndex(he=>H(he,A));return U===-1?G.push(A):G.splice(U,1),w==null?void 0:w(G)}})),be=N(A=>{F({type:6,trigger:A})}),Ae=u.useMemo(()=>({onChange:ye,registerOption:ue,registerLabel:pe,goToOption:q,closeCombobox:M,openCombobox:D,setActivationTrigger:be,selectActiveOption:O}),[]),$=n===null?{}:{ref:n},V=u.useRef(null),ie=Oe();return u.useEffect(()=>{V.current&&r!==void 0&&ie.addEventListener(V.current,"reset",()=>{w==null||w(r)})},[V,w]),u.createElement(Wt.Provider,{value:Ae},u.createElement(Ut.Provider,{value:T},u.createElement(Rt,{value:se(T.comboboxState,{0:de.Open,1:de.Closed})},i!=null&&E!=null&&In({[i]:E}).map(([A,G],U)=>u.createElement(Je,{features:ze.Hidden,ref:U===0?he=>{var ve;V.current=(ve=he==null?void 0:he.closest("form"))!=null?ve:null}:void 0,...mt({key:A,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:l,disabled:a,name:A,value:G})})),oe({ourProps:$,theirProps:v,slot:ne,defaultTag:xo,name:"Combobox"}))))}let yo="input";function Eo(e,n){var t,r,o,l,i;let s=ge(),{id:a=`headlessui-combobox-input-${s}`,onChange:c,displayValue:m,type:h="text",...b}=e,p=Le("Combobox.Input"),v=Xe("Combobox.Input"),g=ce(p.inputRef,n),x=De(p.inputRef),E=u.useRef(!1),w=Oe(),C=N(()=>{v.onChange(null),p.optionsRef.current&&(p.optionsRef.current.scrollTop=0),v.goToOption(ee.Nothing)}),F=function(){var T;return typeof m=="function"&&p.value!==void 0?(T=m(p.value))!=null?T:"":typeof p.value=="string"?p.value:""}();Ke(([T,ne],[O,D])=>{if(E.current)return;let M=p.inputRef.current;M&&((D===0&&ne===1||T!==O)&&(M.value=T),requestAnimationFrame(()=>{if(E.current||!M||(x==null?void 0:x.activeElement)!==M)return;let{selectionStart:q,selectionEnd:ue}=M;Math.abs((ue??0)-(q??0))===0&&q===0&&M.setSelectionRange(M.value.length,M.value.length)}))},[F,p.comboboxState,x]),Ke(([T],[ne])=>{if(T===0&&ne===1){if(E.current)return;let O=p.inputRef.current;if(!O)return;let D=O.value,{selectionStart:M,selectionEnd:q,selectionDirection:ue}=O;O.value="",O.value=D,ue!==null?O.setSelectionRange(M,q,ue):O.setSelectionRange(M,q)}},[p.comboboxState]);let I=u.useRef(!1),P=N(()=>{I.current=!0}),z=N(()=>{w.nextFrame(()=>{I.current=!1})}),W=N(T=>{switch(E.current=!0,T.key){case K.Enter:if(E.current=!1,p.comboboxState!==0||I.current)return;if(T.preventDefault(),T.stopPropagation(),p.activeOptionIndex===null){v.closeCombobox();return}v.selectActiveOption(),p.mode===0&&v.closeCombobox();break;case K.ArrowDown:return E.current=!1,T.preventDefault(),T.stopPropagation(),se(p.comboboxState,{0:()=>v.goToOption(ee.Next),1:()=>v.openCombobox()});case K.ArrowUp:return E.current=!1,T.preventDefault(),T.stopPropagation(),se(p.comboboxState,{0:()=>v.goToOption(ee.Previous),1:()=>{v.openCombobox(),w.nextFrame(()=>{p.value||v.goToOption(ee.Last)})}});case K.Home:if(T.shiftKey)break;return E.current=!1,T.preventDefault(),T.stopPropagation(),v.goToOption(ee.First);case K.PageUp:return E.current=!1,T.preventDefault(),T.stopPropagation(),v.goToOption(ee.First);case K.End:if(T.shiftKey)break;return E.current=!1,T.preventDefault(),T.stopPropagation(),v.goToOption(ee.Last);case K.PageDown:return E.current=!1,T.preventDefault(),T.stopPropagation(),v.goToOption(ee.Last);case K.Escape:return E.current=!1,p.comboboxState!==0?void 0:(T.preventDefault(),p.optionsRef.current&&!p.optionsPropsRef.current.static&&T.stopPropagation(),p.nullable&&p.mode===0&&p.value===null&&C(),v.closeCombobox());case K.Tab:if(E.current=!1,p.comboboxState!==0)return;p.mode===0&&p.activationTrigger!==1&&v.selectActiveOption(),v.closeCombobox();break}}),R=N(T=>{c==null||c(T),p.nullable&&p.mode===0&&T.target.value===""&&C(),v.openCombobox()}),L=N(T=>{var ne,O,D;let M=(ne=T.relatedTarget)!=null?ne:Te.find(q=>q!==T.currentTarget);if(E.current=!1,!((O=p.optionsRef.current)!=null&&O.contains(M))&&!((D=p.buttonRef.current)!=null&&D.contains(M))&&p.comboboxState===0)return T.preventDefault(),p.mode===0&&(p.nullable&&p.value===null?C():p.activationTrigger!==1&&v.selectActiveOption()),v.closeCombobox()}),H=N(T=>{var ne,O,D;let M=(ne=T.relatedTarget)!=null?ne:Te.find(q=>q!==T.currentTarget);(O=p.buttonRef.current)!=null&&O.contains(M)||(D=p.optionsRef.current)!=null&&D.contains(M)||p.disabled||p.immediate&&p.comboboxState!==0&&(v.openCombobox(),w.nextFrame(()=>{v.setActivationTrigger(1)}))}),J=It(()=>{if(p.labelId)return[p.labelId].join(" ")},[p.labelId]),te=u.useMemo(()=>({open:p.comboboxState===0,disabled:p.disabled}),[p]),ae={ref:g,id:a,role:"combobox",type:h,"aria-controls":(t=p.optionsRef.current)==null?void 0:t.id,"aria-expanded":p.comboboxState===0,"aria-activedescendant":p.activeOptionIndex===null?void 0:p.virtual?(r=p.options.find(T=>{var ne;return!((ne=p.virtual)!=null&&ne.disabled(T.dataRef.current.value))&&p.compare(T.dataRef.current.value,p.virtual.options[p.activeOptionIndex])}))==null?void 0:r.id:(o=p.options[p.activeOptionIndex])==null?void 0:o.id,"aria-labelledby":J,"aria-autocomplete":"list",defaultValue:(i=(l=e.defaultValue)!=null?l:p.defaultValue!==void 0?m==null?void 0:m(p.defaultValue):null)!=null?i:p.defaultValue,disabled:p.disabled,onCompositionStart:P,onCompositionEnd:z,onKeyDown:W,onChange:R,onFocus:H,onBlur:L};return oe({ourProps:ae,theirProps:b,slot:te,defaultTag:yo,name:"Combobox.Input"})}let So="button";function To(e,n){var t;let r=Le("Combobox.Button"),o=Xe("Combobox.Button"),l=ce(r.buttonRef,n),i=ge(),{id:s=`headlessui-combobox-button-${i}`,...a}=e,c=Oe(),m=N(g=>{switch(g.key){case K.ArrowDown:return g.preventDefault(),g.stopPropagation(),r.comboboxState===1&&o.openCombobox(),c.nextFrame(()=>{var x;return(x=r.inputRef.current)==null?void 0:x.focus({preventScroll:!0})});case K.ArrowUp:return g.preventDefault(),g.stopPropagation(),r.comboboxState===1&&(o.openCombobox(),c.nextFrame(()=>{r.value||o.goToOption(ee.Last)})),c.nextFrame(()=>{var x;return(x=r.inputRef.current)==null?void 0:x.focus({preventScroll:!0})});case K.Escape:return r.comboboxState!==0?void 0:(g.preventDefault(),r.optionsRef.current&&!r.optionsPropsRef.current.static&&g.stopPropagation(),o.closeCombobox(),c.nextFrame(()=>{var x;return(x=r.inputRef.current)==null?void 0:x.focus({preventScroll:!0})}));default:return}}),h=N(g=>{if(pt(g.currentTarget))return g.preventDefault();r.comboboxState===0?o.closeCombobox():(g.preventDefault(),o.openCombobox()),c.nextFrame(()=>{var x;return(x=r.inputRef.current)==null?void 0:x.focus({preventScroll:!0})})}),b=It(()=>{if(r.labelId)return[r.labelId,s].join(" ")},[r.labelId,s]),p=u.useMemo(()=>({open:r.comboboxState===0,disabled:r.disabled,value:r.value}),[r]),v={ref:l,id:s,type:Dt(e,r.buttonRef),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(t=r.optionsRef.current)==null?void 0:t.id,"aria-expanded":r.comboboxState===0,"aria-labelledby":b,disabled:r.disabled,onClick:h,onKeyDown:m};return oe({ourProps:v,theirProps:a,slot:p,defaultTag:So,name:"Combobox.Button"})}let Co="label";function Oo(e,n){let t=ge(),{id:r=`headlessui-combobox-label-${t}`,...o}=e,l=Le("Combobox.Label"),i=Xe("Combobox.Label"),s=ce(l.labelRef,n);X(()=>i.registerLabel(r),[r]);let a=N(()=>{var m;return(m=l.inputRef.current)==null?void 0:m.focus({preventScroll:!0})}),c=u.useMemo(()=>({open:l.comboboxState===0,disabled:l.disabled}),[l]);return oe({ourProps:{ref:s,id:r,onClick:a},theirProps:o,slot:c,defaultTag:Co,name:"Combobox.Label"})}let jo="ul",No=ke.RenderStrategy|ke.Static;function Fo(e,n){let t=ge(),{id:r=`headlessui-combobox-options-${t}`,hold:o=!1,...l}=e,i=Le("Combobox.Options"),s=ce(i.optionsRef,n),a=Qe(),c=a!==null?(a&de.Open)===de.Open:i.comboboxState===0;X(()=>{var p;i.optionsPropsRef.current.static=(p=e.static)!=null?p:!1},[i.optionsPropsRef,e.static]),X(()=>{i.optionsPropsRef.current.hold=o},[i.optionsPropsRef,o]),Nn({container:i.optionsRef.current,enabled:i.comboboxState===0,accept(p){return p.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:p.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(p){p.setAttribute("role","none")}});let m=It(()=>{var p,v;return(v=i.labelId)!=null?v:(p=i.buttonRef.current)==null?void 0:p.id},[i.labelId,i.buttonRef.current]),h=u.useMemo(()=>({open:i.comboboxState===0,option:void 0}),[i]),b={"aria-labelledby":m,role:"listbox","aria-multiselectable":i.mode===1?!0:void 0,id:r,ref:s};return i.virtual&&i.comboboxState===0&&Object.assign(l,{children:u.createElement(go,null,l.children)}),oe({ourProps:b,theirProps:l,slot:h,defaultTag:jo,features:No,visible:c,name:"Combobox.Options"})}let Io="li";function ko(e,n){var t;let r=ge(),{id:o=`headlessui-combobox-option-${r}`,disabled:l=!1,value:i,order:s=null,...a}=e,c=Le("Combobox.Option"),m=Xe("Combobox.Option"),h=c.virtual?c.activeOptionIndex===c.calculateIndex(i):c.activeOptionIndex===null?!1:((t=c.options[c.activeOptionIndex])==null?void 0:t.id)===o,b=c.isSelected(i),p=u.useRef(null),v=Se({disabled:l,value:i,domRef:p,order:s}),g=u.useContext(Pn),x=ce(n,p,g?g.measureElement:null),E=N(()=>m.onChange(i));X(()=>m.registerOption(o,v),[v,o]);let w=u.useRef(!(c.virtual||c.__demoMode));X(()=>{if(!c.virtual||!c.__demoMode)return;let L=we();return L.requestAnimationFrame(()=>{w.current=!0}),L.dispose},[c.virtual,c.__demoMode]),X(()=>{if(!w.current||c.comboboxState!==0||!h||c.activationTrigger===0)return;let L=we();return L.requestAnimationFrame(()=>{var H,J;(J=(H=p.current)==null?void 0:H.scrollIntoView)==null||J.call(H,{block:"nearest"})}),L.dispose},[p,h,c.comboboxState,c.activationTrigger,c.activeOptionIndex]);let C=N(L=>{var H;if(l||(H=c.virtual)!=null&&H.disabled(i))return L.preventDefault();E(),En()||requestAnimationFrame(()=>{var J;return(J=c.inputRef.current)==null?void 0:J.focus({preventScroll:!0})}),c.mode===0&&requestAnimationFrame(()=>m.closeCombobox())}),F=N(()=>{var L;if(l||(L=c.virtual)!=null&&L.disabled(i))return m.goToOption(ee.Nothing);let H=c.calculateIndex(i);m.goToOption(ee.Specific,H)}),I=jn(),P=N(L=>I.update(L)),z=N(L=>{var H;if(!I.wasMoved(L)||l||(H=c.virtual)!=null&&H.disabled(i)||h)return;let J=c.calculateIndex(i);m.goToOption(ee.Specific,J,0)}),W=N(L=>{var H;I.wasMoved(L)&&(l||(H=c.virtual)!=null&&H.disabled(i)||h&&(c.optionsPropsRef.current.hold||m.goToOption(ee.Nothing)))}),R=u.useMemo(()=>({active:h,selected:b,disabled:l}),[h,b,l]);return oe({ourProps:{id:o,ref:x,role:"option",tabIndex:l===!0?void 0:-1,"aria-disabled":l===!0?!0:void 0,"aria-selected":b,disabled:void 0,onClick:C,onFocus:F,onPointerEnter:P,onMouseEnter:P,onPointerMove:z,onMouseMove:z,onPointerLeave:W,onMouseLeave:W},theirProps:a,slot:R,defaultTag:Io,name:"Combobox.Option"})}let $o=le(wo),Po=le(To),Mo=le(Eo),Ao=le(Oo),Do=le(Fo),Lo=le(ko),Ne=Object.assign($o,{Input:Mo,Button:Po,Label:Ao,Options:Do,Option:Lo});function Mn(e,n,t,r){let o=Se(t);u.useEffect(()=>{e=e??window;function l(i){o.current(i)}return e.addEventListener(n,l,r),()=>e.removeEventListener(n,l,r)},[e,n,r])}function et(){let e=u.useRef(!1);return X(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function An(e){let n=N(e),t=u.useRef(!1);u.useEffect(()=>(t.current=!1,()=>{t.current=!0,at(()=>{t.current&&n()})}),[n])}var tt=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(tt||{});function _o(){let e=u.useRef(0);return Sn("keydown",n=>{n.key==="Tab"&&(e.current=n.shiftKey?1:0)},!0),e}function Dn(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let n=new Set;for(let t of e.current)t.current instanceof HTMLElement&&n.add(t.current);return n}let Ro="div";var Ln=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(Ln||{});function Bo(e,n){let t=u.useRef(null),r=ce(t,n),{initialFocus:o,containers:l,features:i=30,...s}=e;Be()||(i=1);let a=De(t);Uo({ownerDocument:a},!!(i&16));let c=Ho({ownerDocument:a,container:t,initialFocus:o},!!(i&2));Vo({ownerDocument:a,container:t,containers:l,previousActiveElement:c},!!(i&8));let m=_o(),h=N(g=>{let x=t.current;x&&(E=>E())(()=>{se(m.current,{[tt.Forwards]:()=>{Ze(x,je.First,{skipElements:[g.relatedTarget]})},[tt.Backwards]:()=>{Ze(x,je.Last,{skipElements:[g.relatedTarget]})}})})}),b=Oe(),p=u.useRef(!1),v={ref:r,onKeyDown(g){g.key=="Tab"&&(p.current=!0,b.requestAnimationFrame(()=>{p.current=!1}))},onBlur(g){let x=Dn(l);t.current instanceof HTMLElement&&x.add(t.current);let E=g.relatedTarget;E instanceof HTMLElement&&E.dataset.headlessuiFocusGuard!=="true"&&(_n(x,E)||(p.current?Ze(t.current,se(m.current,{[tt.Forwards]:()=>je.Next,[tt.Backwards]:()=>je.Previous})|je.WrapAround,{relativeTo:g.target}):g.target instanceof HTMLElement&&Ie(g.target)))}};return u.createElement(u.Fragment,null,!!(i&4)&&u.createElement(Je,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:ze.Focusable}),oe({ourProps:v,theirProps:s,defaultTag:Ro,name:"FocusTrap"}),!!(i&4)&&u.createElement(Je,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:ze.Focusable}))}let zo=le(Bo),nt=Object.assign(zo,{features:Ln});function Wo(e=!0){let n=u.useRef(Te.slice());return Ke(([t],[r])=>{r===!0&&t===!1&&at(()=>{n.current.splice(0)}),r===!1&&t===!0&&(n.current=Te.slice())},[e,Te,n]),N(()=>{var t;return(t=n.current.find(r=>r!=null&&r.isConnected))!=null?t:null})}function Uo({ownerDocument:e},n){let t=Wo(n);Ke(()=>{n||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&Ie(t())},[n]),An(()=>{n&&Ie(t())})}function Ho({ownerDocument:e,container:n,initialFocus:t},r){let o=u.useRef(null),l=et();return Ke(()=>{if(!r)return;let i=n.current;i&&at(()=>{if(!l.current)return;let s=e==null?void 0:e.activeElement;if(t!=null&&t.current){if((t==null?void 0:t.current)===s){o.current=s;return}}else if(i.contains(s)){o.current=s;return}t!=null&&t.current?Ie(t.current):Ze(i,je.First)===bn.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),o.current=e==null?void 0:e.activeElement})},[r]),o}function Vo({ownerDocument:e,container:n,containers:t,previousActiveElement:r},o){let l=et();Mn(e==null?void 0:e.defaultView,"focus",i=>{if(!o||!l.current)return;let s=Dn(t);n.current instanceof HTMLElement&&s.add(n.current);let a=r.current;if(!a)return;let c=i.target;c&&c instanceof HTMLElement?_n(s,c)?(r.current=c,Ie(c)):(i.preventDefault(),i.stopPropagation(),Ie(a)):Ie(r.current)},!0)}function _n(e,n){for(let t of e)if(t.contains(n))return!0;return!1}let Rn=u.createContext(!1);function Yo(){return u.useContext(Rn)}function Ht(e){return u.createElement(Rn.Provider,{value:e.force},e.children)}function qo(e){let n=Yo(),t=u.useContext(Bn),r=De(e),[o,l]=u.useState(()=>{if(!n&&t!==null||Ce.isServer)return null;let i=r==null?void 0:r.getElementById("headlessui-portal-root");if(i)return i;if(r===null)return null;let s=r.createElement("div");return s.setAttribute("id","headlessui-portal-root"),r.body.appendChild(s)});return u.useEffect(()=>{o!==null&&(r!=null&&r.body.contains(o)||r==null||r.body.appendChild(o))},[o,r]),u.useEffect(()=>{n||t!==null&&l(t.current)},[t,l,n]),o}let Go=u.Fragment;function Zo(e,n){let t=e,r=u.useRef(null),o=ce(ro(m=>{r.current=m}),n),l=De(r),i=qo(r),[s]=u.useState(()=>{var m;return Ce.isServer?null:(m=l==null?void 0:l.createElement("div"))!=null?m:null}),a=u.useContext(Vt),c=Be();return X(()=>{!i||!s||i.contains(s)||(s.setAttribute("data-headlessui-portal",""),i.appendChild(s))},[i,s]),X(()=>{if(s&&a)return a.register(s)},[a,s]),An(()=>{var m;!i||!s||(s instanceof Node&&i.contains(s)&&i.removeChild(s),i.childNodes.length<=0&&((m=i.parentElement)==null||m.removeChild(i)))}),c?!i||!s?null:cn.createPortal(oe({ourProps:{ref:o},theirProps:t,defaultTag:Go,name:"Portal"}),s):null}let Ko=u.Fragment,Bn=u.createContext(null);function Jo(e,n){let{target:t,...r}=e,o={ref:ce(n)};return u.createElement(Bn.Provider,{value:t},oe({ourProps:o,theirProps:r,defaultTag:Ko,name:"Popover.Group"}))}let Vt=u.createContext(null);function Qo(){let e=u.useContext(Vt),n=u.useRef([]),t=N(l=>(n.current.push(l),e&&e.register(l),()=>r(l))),r=N(l=>{let i=n.current.indexOf(l);i!==-1&&n.current.splice(i,1),e&&e.unregister(l)}),o=u.useMemo(()=>({register:t,unregister:r,portals:n}),[t,r,n]);return[n,u.useMemo(()=>function({children:l}){return u.createElement(Vt.Provider,{value:o},l)},[o])]}let Xo=le(Zo),el=le(Jo),Yt=Object.assign(Xo,{Group:el});function tl(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}const nl=typeof Object.is=="function"?Object.is:tl,{useState:rl,useEffect:ol,useLayoutEffect:ll,useDebugValue:il}=y;function sl(e,n,t){const r=n(),[{inst:o},l]=rl({inst:{value:r,getSnapshot:n}});return ll(()=>{o.value=r,o.getSnapshot=n,qt(o)&&l({inst:o})},[e,r,n]),ol(()=>(qt(o)&&l({inst:o}),e(()=>{qt(o)&&l({inst:o})})),[e]),il(r),r}function qt(e){const n=e.getSnapshot,t=e.value;try{const r=n();return!nl(t,r)}catch{return!0}}function al(e,n,t){return n()}const ul=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",cl=!ul,dl=cl?al:sl,fl="useSyncExternalStore"in y?(e=>e.useSyncExternalStore)(y):dl;function ml(e){return fl(e.subscribe,e.getSnapshot,e.getSnapshot)}function pl(e,n){let t=e(),r=new Set;return{getSnapshot(){return t},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...l){let i=n[o].call(t,...l);i&&(t=i,r.forEach(s=>s()))}}}function hl(){let e;return{before({doc:n}){var t;let r=n.documentElement;e=((t=n.defaultView)!=null?t:window).innerWidth-r.clientWidth},after({doc:n,d:t}){let r=n.documentElement,o=r.clientWidth-r.offsetWidth,l=e-o;t.style(r,"paddingRight",`${l}px`)}}}function vl(){return yn()?{before({doc:e,d:n,meta:t}){function r(o){return t.containers.flatMap(l=>l()).some(l=>l.contains(o))}n.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let s=we();s.style(e.documentElement,"scrollBehavior","auto"),n.add(()=>n.microTask(()=>s.dispose()))}let l=(o=window.scrollY)!=null?o:window.pageYOffset,i=null;n.addEventListener(e,"click",s=>{if(s.target instanceof HTMLElement)try{let a=s.target.closest("a");if(!a)return;let{hash:c}=new URL(a.href),m=e.querySelector(c);m&&!r(m)&&(i=m)}catch{}},!0),n.addEventListener(e,"touchstart",s=>{if(s.target instanceof HTMLElement)if(r(s.target)){let a=s.target;for(;a.parentElement&&r(a.parentElement);)a=a.parentElement;n.style(a,"overscrollBehavior","contain")}else n.style(s.target,"touchAction","none")}),n.addEventListener(e,"touchmove",s=>{if(s.target instanceof HTMLElement)if(r(s.target)){let a=s.target;for(;a.parentElement&&a.dataset.headlessuiPortal!==""&&!(a.scrollHeight>a.clientHeight||a.scrollWidth>a.clientWidth);)a=a.parentElement;a.dataset.headlessuiPortal===""&&s.preventDefault()}else s.preventDefault()},{passive:!1}),n.add(()=>{var s;let a=(s=window.scrollY)!=null?s:window.pageYOffset;l!==a&&window.scrollTo(0,l),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)})})}}:{}}function gl(){return{before({doc:e,d:n}){n.style(e.documentElement,"overflow","hidden")}}}function bl(e){let n={};for(let t of e)Object.assign(n,t(n));return n}let _e=pl(()=>new Map,{PUSH(e,n){var t;let r=(t=this.get(e))!=null?t:{doc:e,count:0,d:we(),meta:new Set};return r.count++,r.meta.add(n),this.set(e,r),this},POP(e,n){let t=this.get(e);return t&&(t.count--,t.meta.delete(n)),this},SCROLL_PREVENT({doc:e,d:n,meta:t}){let r={doc:e,d:n,meta:bl(t)},o=[vl(),hl(),gl()];o.forEach(({before:l})=>l==null?void 0:l(r)),o.forEach(({after:l})=>l==null?void 0:l(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});_e.subscribe(()=>{let e=_e.getSnapshot(),n=new Map;for(let[t]of e)n.set(t,t.documentElement.style.overflow);for(let t of e.values()){let r=n.get(t.doc)==="hidden",o=t.count!==0;(o&&!r||!o&&r)&&_e.dispatch(t.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",t),t.count===0&&_e.dispatch("TEARDOWN",t)}});function xl(e,n,t){let r=ml(_e),o=e?r.get(e):void 0,l=o?o.count>0:!1;return X(()=>{if(!(!e||!n))return _e.dispatch("PUSH",e,t),()=>_e.dispatch("POP",e,t)},[n,e]),l}let Gt=new Map,rt=new Map;function zn(e,n=!0){X(()=>{var t;if(!n)return;let r=typeof e=="function"?e():e.current;if(!r)return;function o(){var i;if(!r)return;let s=(i=rt.get(r))!=null?i:1;if(s===1?rt.delete(r):rt.set(r,s-1),s!==1)return;let a=Gt.get(r);a&&(a["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",a["aria-hidden"]),r.inert=a.inert,Gt.delete(r))}let l=(t=rt.get(r))!=null?t:0;return rt.set(r,l+1),l!==0||(Gt.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0),o},[e,n])}function wl({defaultContainers:e=[],portals:n,mainTreeNodeRef:t}={}){var r;let o=u.useRef((r=t==null?void 0:t.current)!=null?r:null),l=De(o),i=N(()=>{var s,a,c;let m=[];for(let h of e)h!==null&&(h instanceof HTMLElement?m.push(h):"current"in h&&h.current instanceof HTMLElement&&m.push(h.current));if(n!=null&&n.current)for(let h of n.current)m.push(h);for(let h of(s=l==null?void 0:l.querySelectorAll("html > *, body > *"))!=null?s:[])h!==document.body&&h!==document.head&&h instanceof HTMLElement&&h.id!=="headlessui-portal-root"&&(h.contains(o.current)||h.contains((c=(a=o.current)==null?void 0:a.getRootNode())==null?void 0:c.host)||m.some(b=>h.contains(b))||m.push(h));return m});return{resolveContainers:i,contains:N(s=>i().some(a=>a.contains(s))),mainTreeNodeRef:o,MainTreeNode:u.useMemo(()=>function(){return t!=null?null:u.createElement(Je,{features:ze.Hidden,ref:o})},[o,t])}}let Zt=u.createContext(()=>{});Zt.displayName="StackContext";var Kt=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Kt||{});function yl(){return u.useContext(Zt)}function El({children:e,onUpdate:n,type:t,element:r,enabled:o}){let l=yl(),i=N((...s)=>{n==null||n(...s),l(...s)});return X(()=>{let s=o===void 0||o===!0;return s&&i(0,t,r),()=>{s&&i(1,t,r)}},[i,t,r,o]),u.createElement(Zt.Provider,{value:i},e)}let Wn=u.createContext(null);function Un(){let e=u.useContext(Wn);if(e===null){let n=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(n,Un),n}return e}function Hn(){let[e,n]=u.useState([]);return[e.length>0?e.join(" "):void 0,u.useMemo(()=>function(t){let r=N(l=>(n(i=>[...i,l]),()=>n(i=>{let s=i.slice(),a=s.indexOf(l);return a!==-1&&s.splice(a,1),s}))),o=u.useMemo(()=>({register:r,slot:t.slot,name:t.name,props:t.props}),[r,t.slot,t.name,t.props]);return u.createElement(Wn.Provider,{value:o},t.children)},[n])]}let Sl="p";function Tl(e,n){let t=ge(),{id:r=`headlessui-description-${t}`,...o}=e,l=Un(),i=ce(n);X(()=>l.register(r),[r,l.register]);let s={ref:i,...l.props,id:r};return oe({ourProps:s,theirProps:o,slot:l.slot||{},defaultTag:Sl,name:l.name||"Description"})}let Cl=le(Tl),Vn=Object.assign(Cl,{});var Ol=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Ol||{}),jl=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(jl||{});let Nl={0(e,n){return e.titleId===n.id?e:{...e,titleId:n.id}}},ht=u.createContext(null);ht.displayName="DialogContext";function ot(e){let n=u.useContext(ht);if(n===null){let t=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,ot),t}return n}function Fl(e,n,t=()=>[document.body]){xl(e,n,r=>{var o;return{containers:[...(o=r.containers)!=null?o:[],t]}})}function Il(e,n){return se(n.type,Nl,e,n)}let kl="div",$l=ke.RenderStrategy|ke.Static;function Pl(e,n){let t=ge(),{id:r=`headlessui-dialog-${t}`,open:o,onClose:l,initialFocus:i,role:s="dialog",__demoMode:a=!1,...c}=e,[m,h]=u.useState(0),b=u.useRef(!1);s=function(){return s==="dialog"||s==="alertdialog"?s:(b.current||(b.current=!0,console.warn(`Invalid role [${s}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let p=Qe();o===void 0&&p!==null&&(o=(p&de.Open)===de.Open);let v=u.useRef(null),g=ce(v,n),x=De(v),E=e.hasOwnProperty("open")||p!==null,w=e.hasOwnProperty("onClose");if(!E&&!w)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!E)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!w)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof o!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${o}`);if(typeof l!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${l}`);let C=o?0:1,[F,I]=u.useReducer(Il,{titleId:null,descriptionId:null,panelRef:u.createRef()}),P=N(()=>l(!1)),z=N(U=>I({type:0,id:U})),W=Be()?a?!1:C===0:!1,R=m>1,L=u.useContext(ht)!==null,[H,J]=Qo(),te={get current(){var U;return(U=F.panelRef.current)!=null?U:v.current}},{resolveContainers:ae,mainTreeNodeRef:T,MainTreeNode:ne}=wl({portals:H,defaultContainers:[te]}),O=R?"parent":"leaf",D=p!==null?(p&de.Closing)===de.Closing:!1,M=L||D?!1:W,q=u.useCallback(()=>{var U,he;return(he=Array.from((U=x==null?void 0:x.querySelectorAll("body > *"))!=null?U:[]).find(ve=>ve.id==="headlessui-portal-root"?!1:ve.contains(T.current)&&ve instanceof HTMLElement))!=null?he:null},[T]);zn(q,M);let ue=R?!0:W,pe=u.useCallback(()=>{var U,he;return(he=Array.from((U=x==null?void 0:x.querySelectorAll("[data-headlessui-portal]"))!=null?U:[]).find(ve=>ve.contains(T.current)&&ve instanceof HTMLElement))!=null?he:null},[T]);zn(pe,ue),At(ae,U=>{U.preventDefault(),P()},!(!W||R));let be=!(R||C!==0);Mn(x==null?void 0:x.defaultView,"keydown",U=>{be&&(U.defaultPrevented||U.key===K.Escape&&(U.preventDefault(),U.stopPropagation(),P()))}),Fl(x,!(D||C!==0||L),ae),u.useEffect(()=>{if(C!==0||!v.current)return;let U=new ResizeObserver(he=>{for(let ve of he){let We=ve.target.getBoundingClientRect();We.x===0&&We.y===0&&We.width===0&&We.height===0&&P()}});return U.observe(v.current),()=>U.disconnect()},[C,v,P]);let[$,V]=Hn(),ie=u.useMemo(()=>[{dialogState:C,close:P,setTitleId:z},F],[C,F,P,z]),A=u.useMemo(()=>({open:C===0}),[C]),G={ref:g,id:r,role:s,"aria-modal":C===0?!0:void 0,"aria-labelledby":F.titleId,"aria-describedby":$};return u.createElement(El,{type:"Dialog",enabled:C===0,element:v,onUpdate:N((U,he)=>{he==="Dialog"&&se(U,{[Kt.Add]:()=>h(ve=>ve+1),[Kt.Remove]:()=>h(ve=>ve-1)})})},u.createElement(Ht,{force:!0},u.createElement(Yt,null,u.createElement(ht.Provider,{value:ie},u.createElement(Yt.Group,{target:v},u.createElement(Ht,{force:!1},u.createElement(V,{slot:A,name:"Dialog.Description"},u.createElement(nt,{initialFocus:i,containers:ae,features:W?se(O,{parent:nt.features.RestoreFocus,leaf:nt.features.All&~nt.features.FocusLock}):nt.features.None},u.createElement(J,null,oe({ourProps:G,theirProps:c,slot:A,defaultTag:kl,features:$l,visible:C===0,name:"Dialog"}))))))))),u.createElement(ne,null))}let Ml="div";function Al(e,n){let t=ge(),{id:r=`headlessui-dialog-overlay-${t}`,...o}=e,[{dialogState:l,close:i}]=ot("Dialog.Overlay"),s=ce(n),a=N(m=>{if(m.target===m.currentTarget){if(pt(m.currentTarget))return m.preventDefault();m.preventDefault(),m.stopPropagation(),i()}}),c=u.useMemo(()=>({open:l===0}),[l]);return oe({ourProps:{ref:s,id:r,"aria-hidden":!0,onClick:a},theirProps:o,slot:c,defaultTag:Ml,name:"Dialog.Overlay"})}let Dl="div";function Ll(e,n){let t=ge(),{id:r=`headlessui-dialog-backdrop-${t}`,...o}=e,[{dialogState:l},i]=ot("Dialog.Backdrop"),s=ce(n);u.useEffect(()=>{if(i.panelRef.current===null)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")},[i.panelRef]);let a=u.useMemo(()=>({open:l===0}),[l]);return u.createElement(Ht,{force:!0},u.createElement(Yt,null,oe({ourProps:{ref:s,id:r,"aria-hidden":!0},theirProps:o,slot:a,defaultTag:Dl,name:"Dialog.Backdrop"})))}let _l="div";function Rl(e,n){let t=ge(),{id:r=`headlessui-dialog-panel-${t}`,...o}=e,[{dialogState:l},i]=ot("Dialog.Panel"),s=ce(n,i.panelRef),a=u.useMemo(()=>({open:l===0}),[l]),c=N(m=>{m.stopPropagation()});return oe({ourProps:{ref:s,id:r,onClick:c},theirProps:o,slot:a,defaultTag:_l,name:"Dialog.Panel"})}let Bl="h2";function zl(e,n){let t=ge(),{id:r=`headlessui-dialog-title-${t}`,...o}=e,[{dialogState:l,setTitleId:i}]=ot("Dialog.Title"),s=ce(n);u.useEffect(()=>(i(r),()=>i(null)),[r,i]);let a=u.useMemo(()=>({open:l===0}),[l]);return oe({ourProps:{ref:s,id:r},theirProps:o,slot:a,defaultTag:Bl,name:"Dialog.Title"})}let Wl=le(Pl),Ul=le(Ll),Hl=le(Rl),Vl=le(Al),Yl=le(zl),Yn=Object.assign(Wl,{Backdrop:Ul,Panel:Hl,Overlay:Vl,Title:Yl,Description:Vn}),qn=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Gn(e){var n,t;let r=(n=e.innerText)!=null?n:"",o=e.cloneNode(!0);if(!(o instanceof HTMLElement))return r;let l=!1;for(let s of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))s.remove(),l=!0;let i=l?(t=o.innerText)!=null?t:"":r;return qn.test(i)&&(i=i.replace(qn,"")),i}function ql(e){let n=e.getAttribute("aria-label");if(typeof n=="string")return n.trim();let t=e.getAttribute("aria-labelledby");if(t){let r=t.split(" ").map(o=>{let l=document.getElementById(o);if(l){let i=l.getAttribute("aria-label");return typeof i=="string"?i.trim():Gn(l).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return Gn(e).trim()}function Gl(e){let n=u.useRef(""),t=u.useRef("");return N(()=>{let r=e.current;if(!r)return"";let o=r.innerText;if(n.current===o)return t.current;let l=ql(r).trim().toLowerCase();return n.current=o,t.current=l,l})}var Zl=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Zl||{}),Kl=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Kl||{}),Jl=(e=>(e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItem=5]="RegisterItem",e[e.UnregisterItem=6]="UnregisterItem",e))(Jl||{});function Jt(e,n=t=>t){let t=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,r=Mt(n(e.items.slice()),l=>l.dataRef.current.domRef.current),o=t?r.indexOf(t):null;return o===-1&&(o=null),{items:r,activeItemIndex:o}}let Ql={1(e){return e.menuState===1?e:{...e,activeItemIndex:null,menuState:1}},0(e){return e.menuState===0?e:{...e,__demoMode:!1,menuState:0}},2:(e,n)=>{var t;let r=Jt(e),o=Bt(n,{resolveItems:()=>r.items,resolveActiveIndex:()=>r.activeItemIndex,resolveId:l=>l.id,resolveDisabled:l=>l.dataRef.current.disabled});return{...e,...r,searchQuery:"",activeItemIndex:o,activationTrigger:(t=n.trigger)!=null?t:1}},3:(e,n)=>{let t=e.searchQuery!==""?0:1,r=e.searchQuery+n.value.toLowerCase(),o=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+t).concat(e.items.slice(0,e.activeItemIndex+t)):e.items).find(i=>{var s;return((s=i.dataRef.current.textValue)==null?void 0:s.startsWith(r))&&!i.dataRef.current.disabled}),l=o?e.items.indexOf(o):-1;return l===-1||l===e.activeItemIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeItemIndex:l,activationTrigger:1}},4(e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},5:(e,n)=>{let t=Jt(e,r=>[...r,{id:n.id,dataRef:n.dataRef}]);return{...e,...t}},6:(e,n)=>{let t=Jt(e,r=>{let o=r.findIndex(l=>l.id===n.id);return o!==-1&&r.splice(o,1),r});return{...e,...t,activationTrigger:1}}},Qt=u.createContext(null);Qt.displayName="MenuContext";function vt(e){let n=u.useContext(Qt);if(n===null){let t=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,vt),t}return n}function Xl(e,n){return se(n.type,Ql,e,n)}let ei=u.Fragment;function ti(e,n){let{__demoMode:t=!1,...r}=e,o=u.useReducer(Xl,{__demoMode:t,menuState:t?0:1,buttonRef:u.createRef(),itemsRef:u.createRef(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:l,itemsRef:i,buttonRef:s},a]=o,c=ce(n);At([s,i],(p,v)=>{var g;a({type:1}),Pt(v,$t.Loose)||(p.preventDefault(),(g=s.current)==null||g.focus())},l===0);let m=N(()=>{a({type:1})}),h=u.useMemo(()=>({open:l===0,close:m}),[l,m]),b={ref:c};return u.createElement(Qt.Provider,{value:o},u.createElement(Rt,{value:se(l,{0:de.Open,1:de.Closed})},oe({ourProps:b,theirProps:r,slot:h,defaultTag:ei,name:"Menu"})))}let ni="button";function ri(e,n){var t;let r=ge(),{id:o=`headlessui-menu-button-${r}`,...l}=e,[i,s]=vt("Menu.Button"),a=ce(i.buttonRef,n),c=Oe(),m=N(g=>{switch(g.key){case K.Space:case K.Enter:case K.ArrowDown:g.preventDefault(),g.stopPropagation(),s({type:0}),c.nextFrame(()=>s({type:2,focus:ee.First}));break;case K.ArrowUp:g.preventDefault(),g.stopPropagation(),s({type:0}),c.nextFrame(()=>s({type:2,focus:ee.Last}));break}}),h=N(g=>{switch(g.key){case K.Space:g.preventDefault();break}}),b=N(g=>{if(pt(g.currentTarget))return g.preventDefault();e.disabled||(i.menuState===0?(s({type:1}),c.nextFrame(()=>{var x;return(x=i.buttonRef.current)==null?void 0:x.focus({preventScroll:!0})})):(g.preventDefault(),s({type:0})))}),p=u.useMemo(()=>({open:i.menuState===0}),[i]),v={ref:a,id:o,type:Dt(e,i.buttonRef),"aria-haspopup":"menu","aria-controls":(t=i.itemsRef.current)==null?void 0:t.id,"aria-expanded":i.menuState===0,onKeyDown:m,onKeyUp:h,onClick:b};return oe({ourProps:v,theirProps:l,slot:p,defaultTag:ni,name:"Menu.Button"})}let oi="div",li=ke.RenderStrategy|ke.Static;function ii(e,n){var t,r;let o=ge(),{id:l=`headlessui-menu-items-${o}`,...i}=e,[s,a]=vt("Menu.Items"),c=ce(s.itemsRef,n),m=De(s.itemsRef),h=Oe(),b=Qe(),p=b!==null?(b&de.Open)===de.Open:s.menuState===0;u.useEffect(()=>{let w=s.itemsRef.current;w&&s.menuState===0&&w!==(m==null?void 0:m.activeElement)&&w.focus({preventScroll:!0})},[s.menuState,s.itemsRef,m]),Nn({container:s.itemsRef.current,enabled:s.menuState===0,accept(w){return w.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:w.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(w){w.setAttribute("role","none")}});let v=N(w=>{var C,F;switch(h.dispose(),w.key){case K.Space:if(s.searchQuery!=="")return w.preventDefault(),w.stopPropagation(),a({type:3,value:w.key});case K.Enter:if(w.preventDefault(),w.stopPropagation(),a({type:1}),s.activeItemIndex!==null){let{dataRef:I}=s.items[s.activeItemIndex];(F=(C=I.current)==null?void 0:C.domRef.current)==null||F.click()}wn(s.buttonRef.current);break;case K.ArrowDown:return w.preventDefault(),w.stopPropagation(),a({type:2,focus:ee.Next});case K.ArrowUp:return w.preventDefault(),w.stopPropagation(),a({type:2,focus:ee.Previous});case K.Home:case K.PageUp:return w.preventDefault(),w.stopPropagation(),a({type:2,focus:ee.First});case K.End:case K.PageDown:return w.preventDefault(),w.stopPropagation(),a({type:2,focus:ee.Last});case K.Escape:w.preventDefault(),w.stopPropagation(),a({type:1}),we().nextFrame(()=>{var I;return(I=s.buttonRef.current)==null?void 0:I.focus({preventScroll:!0})});break;case K.Tab:w.preventDefault(),w.stopPropagation(),a({type:1}),we().nextFrame(()=>{to(s.buttonRef.current,w.shiftKey?je.Previous:je.Next)});break;default:w.key.length===1&&(a({type:3,value:w.key}),h.setTimeout(()=>a({type:4}),350));break}}),g=N(w=>{switch(w.key){case K.Space:w.preventDefault();break}}),x=u.useMemo(()=>({open:s.menuState===0}),[s]),E={"aria-activedescendant":s.activeItemIndex===null||(t=s.items[s.activeItemIndex])==null?void 0:t.id,"aria-labelledby":(r=s.buttonRef.current)==null?void 0:r.id,id:l,onKeyDown:v,onKeyUp:g,role:"menu",tabIndex:0,ref:c};return oe({ourProps:E,theirProps:i,slot:x,defaultTag:oi,features:li,visible:p,name:"Menu.Items"})}let si=u.Fragment;function ai(e,n){let t=ge(),{id:r=`headlessui-menu-item-${t}`,disabled:o=!1,...l}=e,[i,s]=vt("Menu.Item"),a=i.activeItemIndex!==null?i.items[i.activeItemIndex].id===r:!1,c=u.useRef(null),m=ce(n,c);X(()=>{if(i.__demoMode||i.menuState!==0||!a||i.activationTrigger===0)return;let I=we();return I.requestAnimationFrame(()=>{var P,z;(z=(P=c.current)==null?void 0:P.scrollIntoView)==null||z.call(P,{block:"nearest"})}),I.dispose},[i.__demoMode,c,a,i.menuState,i.activationTrigger,i.activeItemIndex]);let h=Gl(c),b=u.useRef({disabled:o,domRef:c,get textValue(){return h()}});X(()=>{b.current.disabled=o},[b,o]),X(()=>(s({type:5,id:r,dataRef:b}),()=>s({type:6,id:r})),[b,r]);let p=N(()=>{s({type:1})}),v=N(I=>{if(o)return I.preventDefault();s({type:1}),wn(i.buttonRef.current)}),g=N(()=>{if(o)return s({type:2,focus:ee.Nothing});s({type:2,focus:ee.Specific,id:r})}),x=jn(),E=N(I=>x.update(I)),w=N(I=>{x.wasMoved(I)&&(o||a||s({type:2,focus:ee.Specific,id:r,trigger:0}))}),C=N(I=>{x.wasMoved(I)&&(o||a&&s({type:2,focus:ee.Nothing}))}),F=u.useMemo(()=>({active:a,disabled:o,close:p}),[a,o,p]);return oe({ourProps:{id:r,ref:m,role:"menuitem",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,disabled:void 0,onClick:v,onFocus:g,onPointerEnter:E,onMouseEnter:E,onPointerMove:w,onMouseMove:w,onPointerLeave:C,onMouseLeave:C},theirProps:l,slot:F,defaultTag:si,name:"Menu.Item"})}let ui=le(ti),ci=le(ri),di=le(ii),fi=le(ai),gt=Object.assign(ui,{Button:ci,Items:di,Item:fi}),Zn=u.createContext(null);function Kn(){let e=u.useContext(Zn);if(e===null){let n=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(n,Kn),n}return e}function mi(){let[e,n]=u.useState([]);return[e.length>0?e.join(" "):void 0,u.useMemo(()=>function(t){let r=N(l=>(n(i=>[...i,l]),()=>n(i=>{let s=i.slice(),a=s.indexOf(l);return a!==-1&&s.splice(a,1),s}))),o=u.useMemo(()=>({register:r,slot:t.slot,name:t.name,props:t.props}),[r,t.slot,t.name,t.props]);return u.createElement(Zn.Provider,{value:o},t.children)},[n])]}let pi="label";function hi(e,n){let t=ge(),{id:r=`headlessui-label-${t}`,passive:o=!1,...l}=e,i=Kn(),s=ce(n);X(()=>i.register(r),[r,i.register]);let a={ref:s,...i.props,id:r};return o&&("onClick"in a&&(delete a.htmlFor,delete a.onClick),"onClick"in l&&delete l.onClick),oe({ourProps:a,theirProps:l,slot:i.slot||{},defaultTag:pi,name:i.name||"Label"})}let vi=le(hi),gi=Object.assign(vi,{});function bi(e=0){let[n,t]=u.useState(e),r=et(),o=u.useCallback(a=>{r.current&&t(c=>c|a)},[n,r]),l=u.useCallback(a=>!!(n&a),[n]),i=u.useCallback(a=>{r.current&&t(c=>c&~a)},[t,r]),s=u.useCallback(a=>{r.current&&t(c=>c^a)},[t]);return{flags:n,addFlag:o,hasFlag:l,removeFlag:i,toggleFlag:s}}let Xt=u.createContext(null);Xt.displayName="GroupContext";let xi=u.Fragment;function wi(e){var n;let[t,r]=u.useState(null),[o,l]=mi(),[i,s]=Hn(),a=u.useMemo(()=>({switch:t,setSwitch:r,labelledby:o,describedby:i}),[t,r,o,i]),c={},m=e;return u.createElement(s,{name:"Switch.Description"},u.createElement(l,{name:"Switch.Label",props:{htmlFor:(n=a.switch)==null?void 0:n.id,onClick(h){t&&(h.currentTarget.tagName==="LABEL"&&h.preventDefault(),t.click(),t.focus({preventScroll:!0}))}}},u.createElement(Xt.Provider,{value:a},oe({ourProps:c,theirProps:m,defaultTag:xi,name:"Switch.Group"}))))}let yi="button";function Ei(e,n){var t;let r=ge(),{id:o=`headlessui-switch-${r}`,checked:l,defaultChecked:i=!1,onChange:s,disabled:a=!1,name:c,value:m,form:h,...b}=e,p=u.useContext(Xt),v=u.useRef(null),g=ce(v,n,p===null?null:p.setSwitch),[x,E]=vn(l,s,i),w=N(()=>E==null?void 0:E(!x)),C=N(R=>{if(pt(R.currentTarget))return R.preventDefault();R.preventDefault(),w()}),F=N(R=>{R.key===K.Space?(R.preventDefault(),w()):R.key===K.Enter&&co(R.currentTarget)}),I=N(R=>R.preventDefault()),P=u.useMemo(()=>({checked:x}),[x]),z={id:o,ref:g,role:"switch",type:Dt(e,v),tabIndex:e.tabIndex===-1?0:(t=e.tabIndex)!=null?t:0,"aria-checked":x,"aria-labelledby":p==null?void 0:p.labelledby,"aria-describedby":p==null?void 0:p.describedby,disabled:a,onClick:C,onKeyUp:F,onKeyPress:I},W=Oe();return u.useEffect(()=>{var R;let L=(R=v.current)==null?void 0:R.closest("form");L&&i!==void 0&&W.addEventListener(L,"reset",()=>{E(i)})},[v,E]),u.createElement(u.Fragment,null,c!=null&&x&&u.createElement(Je,{features:ze.Hidden,...mt({as:"input",type:"checkbox",hidden:!0,readOnly:!0,disabled:a,form:h,checked:x,name:c,value:m})}),oe({ourProps:z,theirProps:b,slot:P,defaultTag:yi,name:"Switch"}))}let Si=le(Ei),Ti=wi,Ci=Object.assign(Si,{Group:Ti,Label:gi,Description:Vn});function Oi(e){let n={called:!1};return(...t)=>{if(!n.called)return n.called=!0,e(...t)}}function en(e,...n){e&&n.length>0&&e.classList.add(...n)}function tn(e,...n){e&&n.length>0&&e.classList.remove(...n)}function ji(e,n){let t=we();if(!e)return t.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[l,i]=[r,o].map(a=>{let[c=0]=a.split(",").filter(Boolean).map(m=>m.includes("ms")?parseFloat(m):parseFloat(m)*1e3).sort((m,h)=>h-m);return c}),s=l+i;if(s!==0){t.group(c=>{c.setTimeout(()=>{n(),c.dispose()},s),c.addEventListener(e,"transitionrun",m=>{m.target===m.currentTarget&&c.dispose()})});let a=t.addEventListener(e,"transitionend",c=>{c.target===c.currentTarget&&(n(),a())})}else n();return t.add(()=>n()),t.dispose}function Ni(e,n,t,r){let o=t?"enter":"leave",l=we(),i=r!==void 0?Oi(r):()=>{};o==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let s=se(o,{enter:()=>n.enter,leave:()=>n.leave}),a=se(o,{enter:()=>n.enterTo,leave:()=>n.leaveTo}),c=se(o,{enter:()=>n.enterFrom,leave:()=>n.leaveFrom});return tn(e,...n.base,...n.enter,...n.enterTo,...n.enterFrom,...n.leave,...n.leaveFrom,...n.leaveTo,...n.entered),en(e,...n.base,...s,...c),l.nextFrame(()=>{tn(e,...n.base,...s,...c),en(e,...n.base,...s,...a),ji(e,()=>(tn(e,...n.base,...s),en(e,...n.base,...n.entered),i()))}),l.dispose}function Fi({immediate:e,container:n,direction:t,classes:r,onStart:o,onStop:l}){let i=et(),s=Oe(),a=Se(t);X(()=>{e&&(a.current="enter")},[e]),X(()=>{let c=we();s.add(c.dispose);let m=n.current;if(m&&a.current!=="idle"&&i.current)return c.dispose(),o.current(a.current),c.add(Ni(m,r.current,a.current==="enter",()=>{c.dispose(),l.current(a.current)})),c.dispose},[t])}function Pe(e=""){return e.split(/\s+/).filter(n=>n.length>1)}let bt=u.createContext(null);bt.displayName="TransitionContext";var Ii=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Ii||{});function ki(){let e=u.useContext(bt);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function $i(){let e=u.useContext(xt);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let xt=u.createContext(null);xt.displayName="NestingContext";function wt(e){return"children"in e?wt(e.children):e.current.filter(({el:n})=>n.current!==null).filter(({state:n})=>n==="visible").length>0}function Jn(e,n){let t=Se(e),r=u.useRef([]),o=et(),l=Oe(),i=N((p,v=$e.Hidden)=>{let g=r.current.findIndex(({el:x})=>x===p);g!==-1&&(se(v,{[$e.Unmount](){r.current.splice(g,1)},[$e.Hidden](){r.current[g].state="hidden"}}),l.microTask(()=>{var x;!wt(r)&&o.current&&((x=t.current)==null||x.call(t))}))}),s=N(p=>{let v=r.current.find(({el:g})=>g===p);return v?v.state!=="visible"&&(v.state="visible"):r.current.push({el:p,state:"visible"}),()=>i(p,$e.Unmount)}),a=u.useRef([]),c=u.useRef(Promise.resolve()),m=u.useRef({enter:[],leave:[],idle:[]}),h=N((p,v,g)=>{a.current.splice(0),n&&(n.chains.current[v]=n.chains.current[v].filter(([x])=>x!==p)),n==null||n.chains.current[v].push([p,new Promise(x=>{a.current.push(x)})]),n==null||n.chains.current[v].push([p,new Promise(x=>{Promise.all(m.current[v].map(([E,w])=>w)).then(()=>x())})]),v==="enter"?c.current=c.current.then(()=>n==null?void 0:n.wait.current).then(()=>g(v)):g(v)}),b=N((p,v,g)=>{Promise.all(m.current[v].splice(0).map(([x,E])=>E)).then(()=>{var x;(x=a.current.shift())==null||x()}).then(()=>g(v))});return u.useMemo(()=>({children:r,register:s,unregister:i,onStart:h,onStop:b,wait:c,chains:m}),[s,i,r,h,b,m,c])}function Pi(){}let Mi=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Qn(e){var n;let t={};for(let r of Mi)t[r]=(n=e[r])!=null?n:Pi;return t}function Ai(e){let n=u.useRef(Qn(e));return u.useEffect(()=>{n.current=Qn(e)},[e]),n}let Di="div",Xn=ke.RenderStrategy;function Li(e,n){var t,r;let{beforeEnter:o,afterEnter:l,beforeLeave:i,afterLeave:s,enter:a,enterFrom:c,enterTo:m,entered:h,leave:b,leaveFrom:p,leaveTo:v,...g}=e,x=u.useRef(null),E=ce(x,n),w=(t=g.unmount)==null||t?$e.Unmount:$e.Hidden,{show:C,appear:F,initial:I}=ki(),[P,z]=u.useState(C?"visible":"hidden"),W=$i(),{register:R,unregister:L}=W;u.useEffect(()=>R(x),[R,x]),u.useEffect(()=>{if(w===$e.Hidden&&x.current){if(C&&P!=="visible"){z("visible");return}return se(P,{hidden:()=>L(x),visible:()=>R(x)})}},[P,x,R,L,C,w]);let H=Se({base:Pe(g.className),enter:Pe(a),enterFrom:Pe(c),enterTo:Pe(m),entered:Pe(h),leave:Pe(b),leaveFrom:Pe(p),leaveTo:Pe(v)}),J=Ai({beforeEnter:o,afterEnter:l,beforeLeave:i,afterLeave:s}),te=Be();u.useEffect(()=>{if(te&&P==="visible"&&x.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[x,P,te]);let ae=I&&!F,T=F&&C&&I,ne=!te||ae?"idle":C?"enter":"leave",O=bi(0),D=N(be=>se(be,{enter:()=>{O.addFlag(de.Opening),J.current.beforeEnter()},leave:()=>{O.addFlag(de.Closing),J.current.beforeLeave()},idle:()=>{}})),M=N(be=>se(be,{enter:()=>{O.removeFlag(de.Opening),J.current.afterEnter()},leave:()=>{O.removeFlag(de.Closing),J.current.afterLeave()},idle:()=>{}})),q=Jn(()=>{z("hidden"),L(x)},W),ue=u.useRef(!1);Fi({immediate:T,container:x,classes:H,direction:ne,onStart:Se(be=>{ue.current=!0,q.onStart(x,be,D)}),onStop:Se(be=>{ue.current=!1,q.onStop(x,be,M),be==="leave"&&!wt(q)&&(z("hidden"),L(x))})});let pe=g,ye={ref:E};return T?pe={...pe,className:dt(g.className,...H.current.enter,...H.current.enterFrom)}:ue.current&&(pe.className=dt(g.className,(r=x.current)==null?void 0:r.className),pe.className===""&&delete pe.className),u.createElement(xt.Provider,{value:q},u.createElement(Rt,{value:se(P,{visible:de.Open,hidden:de.Closed})|O.flags},oe({ourProps:ye,theirProps:pe,defaultTag:Di,features:Xn,visible:P==="visible",name:"Transition.Child"})))}function _i(e,n){let{show:t,appear:r=!1,unmount:o=!0,...l}=e,i=u.useRef(null),s=ce(i,n);Be();let a=Qe();if(t===void 0&&a!==null&&(t=(a&de.Open)===de.Open),![!0,!1].includes(t))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,m]=u.useState(t?"visible":"hidden"),h=Jn(()=>{m("hidden")}),[b,p]=u.useState(!0),v=u.useRef([t]);X(()=>{b!==!1&&v.current[v.current.length-1]!==t&&(v.current.push(t),p(!1))},[v,t]);let g=u.useMemo(()=>({show:t,appear:r,initial:b}),[t,r,b]);u.useEffect(()=>{if(t)m("visible");else if(!wt(h))m("hidden");else{let C=i.current;if(!C)return;let F=C.getBoundingClientRect();F.x===0&&F.y===0&&F.width===0&&F.height===0&&m("hidden")}},[t,h]);let x={unmount:o},E=N(()=>{var C;b&&p(!1),(C=e.beforeEnter)==null||C.call(e)}),w=N(()=>{var C;b&&p(!1),(C=e.beforeLeave)==null||C.call(e)});return u.createElement(xt.Provider,{value:h},u.createElement(bt.Provider,{value:g},oe({ourProps:{...x,as:u.Fragment,children:u.createElement(er,{ref:s,...x,...l,beforeEnter:E,beforeLeave:w})},theirProps:{},defaultTag:u.Fragment,features:Xn,visible:c==="visible",name:"Transition"})))}function Ri(e,n){let t=u.useContext(bt)!==null,r=Qe()!==null;return u.createElement(u.Fragment,null,!t&&r?u.createElement(nn,{ref:n,...e}):u.createElement(er,{ref:n,...e}))}let nn=le(_i),er=le(Li),Bi=le(Ri),Re=Object.assign(nn,{Child:Bi,Root:nn});function zi({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{fillRule:"evenodd",d:"M18 10a.75.75 0 0 1-.75.75H4.66l2.1 1.95a.75.75 0 1 1-1.02 1.1l-3.5-3.25a.75.75 0 0 1 0-1.1l3.5-3.25a.75.75 0 1 1 1.02 1.1l-2.1 1.95h12.59A.75.75 0 0 1 18 10Z",clipRule:"evenodd"}))}const Wi=y.forwardRef(zi);function Ui({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{fillRule:"evenodd",d:"M2 10a.75.75 0 0 1 .75-.75h12.59l-2.1-1.95a.75.75 0 1 1 1.02-1.1l3.5 3.25a.75.75 0 0 1 0 1.1l-3.5 3.25a.75.75 0 1 1-1.02-1.1l2.1-1.95H2.75A.75.75 0 0 1 2 10Z",clipRule:"evenodd"}))}const Hi=y.forwardRef(Ui);function Vi({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",clipRule:"evenodd"}))}const Yi=y.forwardRef(Vi);function qi({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const Gi=y.forwardRef(qi);function Zi({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{fillRule:"evenodd",d:"M9.47 6.47a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 1 1-1.06 1.06L10 8.06l-3.72 3.72a.75.75 0 0 1-1.06-1.06l4.25-4.25Z",clipRule:"evenodd"}))}const Ki=y.forwardRef(Zi);function Ji({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-8-5a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-1.5 0v-4.5A.75.75 0 0 1 10 5Zm0 10a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const tr=y.forwardRef(Ji);function Qi({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const Xi=y.forwardRef(Qi);function es({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM9 9a.75.75 0 0 0 0 1.5h.253a.25.25 0 0 1 .244.304l-.459 2.066A1.75 1.75 0 0 0 10.747 15H11a.75.75 0 0 0 0-1.5h-.253a.25.25 0 0 1-.244-.304l.459-2.066A1.75 1.75 0 0 0 9.253 9H9Z",clipRule:"evenodd"}))}const ts=y.forwardRef(es);function ns({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM8.28 7.22a.75.75 0 0 0-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 1 0 1.06 1.06L10 11.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L11.06 10l1.72-1.72a.75.75 0 0 0-1.06-1.06L10 8.94 8.28 7.22Z",clipRule:"evenodd"}))}const rs=y.forwardRef(ns),yt={warning:{color:"bg-yellow-50",icon:f.jsx(Xi,{className:"h-5 w-5 text-yellow-400","aria-hidden":"true"}),colorTitle:"text-yellow-800",colorText:"text-yellow-700"},error:{color:"bg-red-50",icon:f.jsx(rs,{className:"h-5 w-5 text-red-400","aria-hidden":"true"}),colorTitle:"text-red-800",colorText:"text-red-700"},success:{color:"bg-green-50",icon:f.jsx(Yi,{className:"h-5 w-5 text-green-400","aria-hidden":"true"}),colorTitle:"text-green-800",colorText:"text-green-700"},info:{color:"bg-blue-50",icon:f.jsx(ts,{className:"h-5 w-5 text-blue-400","aria-hidden":"true"}),colorTitle:"text-blue-800",colorText:"text-blue-700"}};let nr;const os=({type:e="info",title:n,message:t,active:r=!1,time:o=1e3,dispatch:l})=>{const{width:i}=Ot(),[s,a]=u.useState(!1);return u.useEffect(()=>r?(nr=window.setTimeout(()=>{a(!1),l({type:"ALERT",payload:{title:"",message:"",typeAlert:"",active:!1}})},o),a(!0)):(a(!1),()=>window.clearTimeout(nr)),[r,l,o]),f.jsx("div",{className:"fixed top-2.5 w-80 3xs:w-96 z-50",style:{left:`calc(50% - ${i<=470?"160px":"192px"})`},children:f.jsx(Re,{as:u.Fragment,show:s,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f.jsxs("div",{className:k("rounded-md p-4 text-center",yt[e].color),children:[f.jsxs("div",{className:"flex justify-center flex-shrink-0",children:[yt[e].icon,f.jsx("h3",{className:k("text-sm font-medium ml-3",yt[e].colorTitle),children:n})]}),f.jsx("div",{className:k("mt-2 text-sm",yt[e].colorText),children:f.jsx("p",{children:t})})]})})})};function ls({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{fillRule:"evenodd",d:"M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",clipRule:"evenodd"}))}const is=y.forwardRef(ls);function ss({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{fillRule:"evenodd",d:"M10.5 3.75a6.75 6.75 0 1 0 0 13.5 6.75 6.75 0 0 0 0-13.5ZM2.25 10.5a8.25 8.25 0 1 1 14.59 5.28l4.69 4.69a.75.75 0 1 1-1.06 1.06l-4.69-4.69A8.25 8.25 0 0 1 2.25 10.5Z",clipRule:"evenodd"}))}const as=y.forwardRef(ss);function us({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{d:"M21.731 2.269a2.625 2.625 0 0 0-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 0 0 0-3.712ZM19.513 8.199l-3.712-3.712-8.4 8.4a5.25 5.25 0 0 0-1.32 2.214l-.8 2.685a.75.75 0 0 0 .933.933l2.685-.8a5.25 5.25 0 0 0 2.214-1.32l8.4-8.4Z"}),y.createElement("path",{d:"M5.25 5.25a3 3 0 0 0-3 3v10.5a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3V13.5a.75.75 0 0 0-1.5 0v5.25a1.5 1.5 0 0 1-1.5 1.5H5.25a1.5 1.5 0 0 1-1.5-1.5V8.25a1.5 1.5 0 0 1 1.5-1.5h5.25a.75.75 0 0 0 0-1.5H5.25Z"}))}const cs=y.forwardRef(us);function ds({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{fillRule:"evenodd",d:"M1.5 6a2.25 2.25 0 0 1 2.25-2.25h16.5A2.25 2.25 0 0 1 22.5 6v12a2.25 2.25 0 0 1-2.25 2.25H3.75A2.25 2.25 0 0 1 1.5 18V6ZM3 16.06V18c0 .414.336.75.75.75h16.5A.75.75 0 0 0 21 18v-1.94l-2.69-2.689a1.5 1.5 0 0 0-2.12 0l-.88.879.97.97a.75.75 0 1 1-1.06 1.06l-5.16-5.159a1.5 1.5 0 0 0-2.12 0L3 16.061Zm10.125-7.81a1.125 1.125 0 1 1 2.25 0 1.125 1.125 0 0 1-2.25 0Z",clipRule:"evenodd"}))}const fs=y.forwardRef(ds);function ms({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{fillRule:"evenodd",d:"M18.685 19.097A9.723 9.723 0 0 0 21.75 12c0-5.385-4.365-9.75-9.75-9.75S2.25 6.615 2.25 12a9.723 9.723 0 0 0 3.065 7.097A9.716 9.716 0 0 0 12 21.75a9.716 9.716 0 0 0 6.685-2.653Zm-12.54-1.285A7.486 7.486 0 0 1 12 15a7.486 7.486 0 0 1 5.855 2.812A8.224 8.224 0 0 1 12 20.25a8.224 8.224 0 0 1-5.855-2.438ZM15.75 9a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z",clipRule:"evenodd"}))}const ps=y.forwardRef(ms);function hs({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{fillRule:"evenodd",d:"M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const vs=y.forwardRef(hs),gs=({src:e,alt:n,width:t,height:r,className:o="",classNameIcon:l="",isIcon:i=!0,acronym:s=""})=>{function a(){if(typeof s!="string")return s;const c=s.toLowerCase(),m=c.split(" "),h=m[m.length-1];return c.charAt(0)+h.charAt(0)}return f.jsx(f.Fragment,{children:e?f.jsx("img",{src:e,alt:n,width:t,height:r,className:k(o!==""&&o),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s"},onLoad:c=>c.currentTarget.style.filter="none","data-testid":"img"}):i?f.jsx(ps,{className:k("bg-white text-default-5",l!==""?l:"w-7 h-7")}):f.jsx("div",{className:k("bg-gray-200 text-default-5 rounded-full font-bold uppercase flex justify-center items-center",l!==""?l:"w-7 h-7"),children:a()})})},bs=({steps:e,onClick:n})=>{const[t,r]=u.useState(0),o=l=>{r(l),n(l)};return f.jsx("nav",{className:"flex items-center justify-center w-full","aria-label":"Progress","data-testid":"bullets",children:f.jsx("ol",{role:"list",className:"flex items-center space-x-5",children:new Array(e).fill(1).map((l,i)=>f.jsx("li",{children:t!==i?f.jsx("div",{className:"cursor-pointer block h-2.5 w-2.5 rounded-full bg-gray-500 hover:bg-gray-600",onClick:()=>o(i),"data-testid":`step-${i}`,children:f.jsx("span",{className:"sr-only",children:"step"})}):f.jsxs("div",{className:"relative flex items-center justify-center cursor-pointer","aria-current":"step",children:[f.jsx("span",{className:"absolute flex h-5 w-5 p-px","aria-hidden":"true",children:f.jsx("span",{className:"h-full w-full rounded-full bg-gray-300"})}),f.jsx("span",{className:"relative block h-2.5 w-2.5 rounded-full bg-gray-500","aria-hidden":"true"}),f.jsx("span",{className:"sr-only",children:"step"})]})},i))})})};var rr={exports:{}};/*!
|
|
32
32
|
Copyright (c) 2018 Jed Watson.
|
|
33
33
|
Licensed under the MIT License (MIT), see
|
|
34
34
|
http://jedwatson.github.io/classnames
|