@apollosproject/canvas-embeds 2.1.2405 → 2.1.2406

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/widget/index.js CHANGED
@@ -236,7 +236,7 @@ React keys must be passed directly to JSX without using spread:
236
236
  `),``,`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(e=>` - ${e}`).join(`
237
237
  `)].join(`
238
238
  `))}else{let e=u.props?.className,t=typeof e==`function`?(...t)=>hhe(e(...t),c.className):hhe(e,c.className),n=t?{className:t}:{},r=yhe(u.props,Gx(bhe(c,[`ref`])));for(let e in d)e in r&&delete d[e];return(0,z.cloneElement)(u,Object.assign({},r,d,l,{ref:i(xhe(u),l.ref)},n))}}return(0,z.createElement)(a,Object.assign({},bhe(c,[`ref`]),!Kx(a)&&l,!Kx(a)&&d),u)}function _he(){let e=(0,z.useRef)([]),t=(0,z.useCallback)(t=>{for(let n of e.current)n!=null&&(typeof n==`function`?n(t):n.current=t)},[]);return(...n)=>{if(!n.every(e=>e==null))return e.current=n,t}}function vhe(...e){return e.every(e=>e==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n==`function`?n(t):n.current=t)}}function yhe(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith(`on`)&&typeof r[e]==`function`?(n[e]??(n[e]=[]),n[e].push(r[e])):t[e]=r[e];if(t.disabled||t[`aria-disabled`])for(let e in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(e)&&(n[e]=[e=>(e?.preventDefault)?.call(e)]);for(let e in n)Object.assign(t,{[e](t,...r){let i=n[e];for(let e of i){if((t instanceof Event||t?.nativeEvent instanceof Event)&&t.defaultPrevented)return;e(t,...r)}}});return t}function Ux(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith(`on`)&&typeof r[e]==`function`?(n[e]??(n[e]=[]),n[e].push(r[e])):t[e]=r[e];for(let e in n)Object.assign(t,{[e](...t){let r=n[e];for(let e of r)e?.(...t)}});return t}function Wx(e){return Object.assign((0,z.forwardRef)(e),{displayName:e.displayName??e.name})}function Gx(e){let t=Object.assign({},e);for(let e in t)t[e]===void 0&&delete t[e];return t}function bhe(e,t=[]){let n=Object.assign({},e);for(let e of t)e in n&&delete n[e];return n}function xhe(e){return`18.3.1`.split(`.`)[0]>=`19`?e.props.ref:e.ref}function Kx(e){return e===z.Fragment||e===Symbol.for(`react.fragment`)}function She(e){return Kx(e.type)}var Che=`button`;function whe(e,t){let n=Lx(),{disabled:r=n||!1,autoFocus:i=!1,...a}=e,{isFocusVisible:o,focusProps:s}=Ox({autoFocus:i}),{isHovered:c,hoverProps:l}=Dx({isDisabled:r}),{pressed:u,pressProps:d}=phe({disabled:r}),f=Ux({ref:t,type:a.type??`button`,disabled:r||void 0,autoFocus:i},s,l,d),p=Ix({disabled:r,hover:c,focus:o,active:u,autofocus:i});return Vx()({ourProps:f,theirProps:a,slot:p,defaultTag:Che,name:`Button`})}var The=Wx(whe),Ehe=`span`,qx=(e=>(e[e.None=1]=`None`,e[e.Focusable=2]=`Focusable`,e[e.Hidden=4]=`Hidden`,e))(qx||{});function Dhe(e,t){let{features:n=1,...r}=e,i={ref:t,"aria-hidden":(n&2)==2?!0:r[`aria-hidden`]??void 0,hidden:(n&4)==4||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`,...(n&4)==4&&(n&2)!=2&&{display:`none`}}};return Vx()({ourProps:i,theirProps:r,slot:{},defaultTag:Ehe,name:`Hidden`})}var Ohe=Wx(Dhe),khe=(0,z.createContext)(void 0);function Ahe(){return(0,z.useContext)(khe)}function jhe(e){return typeof e!=`object`||!e?!1:`nodeType`in e}function Jx(e){return jhe(e)&&`tagName`in e}function Yx(e){return Jx(e)&&`accessKey`in e}function Xx(e){return Jx(e)&&`tabIndex`in e}function Mhe(e){return Jx(e)&&`style`in e}function Nhe(e){return Yx(e)&&e.nodeName===`IFRAME`}function Phe(e){return Yx(e)&&e.nodeName===`INPUT`}function Fhe(e){return Yx(e)&&e.nodeName===`LABEL`}function Ihe(e){return Yx(e)&&e.nodeName===`FIELDSET`}function Lhe(e){return Yx(e)&&e.nodeName===`LEGEND`}function Rhe(e){return Jx(e)?e.matches(`a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]`):!1}function zhe(e){let t=e.parentElement,n=null;for(;t&&!Ihe(t);)Lhe(t)&&(n=t),t=t.parentElement;let r=t?.getAttribute(`disabled`)===``;return r&&Bhe(n)?!1:r}function Bhe(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(Lhe(t))return!1;t=t.previousElementSibling}return!0}var Vhe=Symbol();function Hhe(e,t=!0){return Object.assign(e,{[Vhe]:t})}function Zx(...e){let t=(0,z.useRef)(e);(0,z.useEffect)(()=>{t.current=e},[e]);let n=Fx(e=>{for(let n of t.current)n!=null&&(typeof n==`function`?n(e):n.current=e)});return e.every(e=>e==null||e?.[Vhe])?void 0:n}var Qx=(0,z.createContext)(null);Qx.displayName=`DescriptionContext`;function Uhe(){let e=(0,z.useContext)(Qx);if(e===null){let e=Error(`You used a <Description /> component, but it is not inside a relevant parent.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Uhe),e}return e}function Whe(){return(0,z.useContext)(Qx)?.value??void 0}function Ghe(){let[e,t]=(0,z.useState)([]);return[e.length>0?e.join(` `):void 0,(0,z.useMemo)(()=>function(e){let n=Fx(e=>(t(t=>[...t,e]),()=>t(t=>{let n=t.slice(),r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}))),r=(0,z.useMemo)(()=>({register:n,slot:e.slot,name:e.name,props:e.props,value:e.value}),[n,e.slot,e.name,e.props,e.value]);return z.createElement(Qx.Provider,{value:r},e.children)},[t])]}var Khe=`p`;function qhe(e,t){let n=(0,z.useId)(),r=Lx(),{id:i=`headlessui-description-${n}`,...a}=e,o=Uhe(),s=Zx(t);Nx(()=>o.register(i),[i,o.register]);let c=Ix({...o.slot,disabled:r||!1}),l={ref:s,...o.props,id:i};return Vx()({ourProps:l,theirProps:a,slot:c,defaultTag:Khe,name:o.name||`Description`})}var Jhe=Wx(qhe),Yhe=Object.assign(Jhe,{}),$x=(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))($x||{}),eS=(0,z.createContext)(null);eS.displayName=`LabelContext`;function Xhe(){let e=(0,z.useContext)(eS);if(e===null){let e=Error(`You used a <Label /> component, but it is not inside a relevant parent.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Xhe),e}return e}function Zhe(e){let t=(0,z.useContext)(eS)?.value??void 0;return(e?.length??0)>0?[t,...e].filter(Boolean).join(` `):t}function Qhe({inherit:e=!1}={}){let t=Zhe(),[n,r]=(0,z.useState)([]),i=e?[t,...n].filter(Boolean):n;return[i.length>0?i.join(` `):void 0,(0,z.useMemo)(()=>function(e){let t=Fx(e=>(r(t=>[...t,e]),()=>r(t=>{let n=t.slice(),r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}))),n=(0,z.useMemo)(()=>({register:t,slot:e.slot,name:e.name,props:e.props,value:e.value}),[t,e.slot,e.name,e.props,e.value]);return z.createElement(eS.Provider,{value:n},e.children)},[r])]}var $he=`label`;function ege(e,t){let n=(0,z.useId)(),r=Xhe(),i=Ahe(),a=Lx(),{id:o=`headlessui-label-${n}`,htmlFor:s=i??r.props?.htmlFor,passive:c=!1,...l}=e,u=Zx(t);Nx(()=>r.register(o),[o,r.register]);let d=Fx(e=>{let t=e.currentTarget;if(!(e.target!==e.currentTarget&&Rhe(e.target))&&(Fhe(t)&&e.preventDefault(),r.props&&`onClick`in r.props&&typeof r.props.onClick==`function`&&r.props.onClick(e),Fhe(t))){let e=document.getElementById(t.htmlFor);if(e){let t=e.getAttribute(`disabled`);if(t===`true`||t===``)return;let n=e.getAttribute(`aria-disabled`);if(n===`true`||n===``)return;(Phe(e)&&(e.type===`file`||e.type===`radio`||e.type===`checkbox`)||e.role===`radio`||e.role===`checkbox`||e.role===`switch`)&&e.click(),e.focus({preventScroll:!0})}}}),f=Ix({...r.slot,disabled:a||!1}),p={ref:u,...r.props,id:o,htmlFor:s,onClick:d};return c&&(`onClick`in p&&(delete p.htmlFor,delete p.onClick),`onClick`in l&&delete l.onClick),Vx()({ourProps:p,theirProps:l,slot:f,defaultTag:s?$he:`div`,name:r.name||`Label`})}var tge=Wx(ege),nge=Object.assign(tge,{}),rge=(0,z.createContext)(()=>{});function ige({value:e,children:t}){return z.createElement(rge.Provider,{value:e},t)}function age(e){if(e===null)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}function oge(e,t,n=!1){let[r,i]=(0,z.useState)(()=>age(t));return Nx(()=>{if(!t||!e)return;let n=jx();return n.requestAnimationFrame(function e(){n.requestAnimationFrame(e),i(e=>{let n=age(t);return n.width===e.width&&n.height===e.height?e:n})}),()=>{n.dispose()}},[t,e]),n?{width:`${r.width}px`,height:`${r.height}px`}:r}var sge=(e=>(e[e.Left=0]=`Left`,e[e.Right=2]=`Right`,e))(sge||{});function cge(e){let t=(0,z.useRef)(null);return{onPointerDown:Fx(n=>{t.current=n.pointerType,!zhe(n.currentTarget)&&n.pointerType===`mouse`&&n.button===sge.Left&&(n.preventDefault(),e(n))}),onClick:Fx(n=>{t.current!==`mouse`&&(zhe(n.currentTarget)||e(n))})}}var lge=class extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return t===void 0&&(t=this.factory(e),this.set(e,t)),t}},uge=Object.defineProperty,dge=(e,t,n)=>t in e?uge(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fge=(e,t,n)=>(dge(e,typeof t==`symbol`?t:t+``,n),n),pge=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},tS=(e,t,n)=>(pge(e,t,`read from private field`),n?n.call(e):t.get(e)),mge=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},hge=(e,t,n,r)=>(pge(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),nS,rS,iS,gge=class{constructor(e){mge(this,nS,{}),mge(this,rS,new lge(()=>new Set)),mge(this,iS,new Set),fge(this,`disposables`,jx()),hge(this,nS,e),kx.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return tS(this,nS)}subscribe(e,t){if(kx.isServer)return()=>{};let n={selector:e,callback:t,current:e(tS(this,nS))};return tS(this,iS).add(n),this.disposables.add(()=>{tS(this,iS).delete(n)})}on(e,t){return kx.isServer?()=>{}:(tS(this,rS).get(e).add(t),this.disposables.add(()=>{tS(this,rS).get(e).delete(t)}))}send(e){let t=this.reduce(tS(this,nS),e);if(t!==tS(this,nS)){hge(this,nS,t);for(let e of tS(this,iS)){let t=e.selector(tS(this,nS));_ge(e.current,t)||(e.current=t,e.callback(t))}for(let t of tS(this,rS).get(e.type))t(tS(this,nS),e)}}};nS=new WeakMap,rS=new WeakMap,iS=new WeakMap;function _ge(e,t){return Object.is(e,t)?!0:typeof e!=`object`||!e||typeof t!=`object`||!t?!1:Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&vge(e[Symbol.iterator](),t[Symbol.iterator]()):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size===t.size&&vge(e.entries(),t.entries()):yge(e)&&yge(t)?vge(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()):!1}function vge(e,t){do{let n=e.next(),r=t.next();if(n.done&&r.done)return!0;if(n.done||r.done||!Object.is(n.value,r.value))return!1}while(1)}function yge(e){if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}function bge(e){let[t,n]=e(),r=jx();return(...e)=>{t(...e),r.dispose(),r.microTask(n)}}var xge=Object.defineProperty,Sge=(e,t,n)=>t in e?xge(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Cge=(e,t,n)=>(Sge(e,typeof t==`symbol`?t:t+``,n),n),wge=(e=>(e[e.Push=0]=`Push`,e[e.Pop=1]=`Pop`,e))(wge||{}),Tge={0(e,t){let n=t.id,r=e.stack,i=e.stack.indexOf(n);if(i!==-1){let t=e.stack.slice();return t.splice(i,1),t.push(n),r=t,{...e,stack:r}}return{...e,stack:[...e.stack,n]}},1(e,t){let n=t.id,r=e.stack.indexOf(n);if(r===-1)return e;let i=e.stack.slice();return i.splice(r,1),{...e,stack:i}}},Ege=class e extends gge{constructor(){super(...arguments),Cge(this,`actions`,{push:e=>this.send({type:0,id:e}),pop:e=>this.send({type:1,id:e})}),Cge(this,`selectors`,{isTop:(e,t)=>e.stack[e.stack.length-1]===t,inStack:(e,t)=>e.stack.includes(t)})}static new(){return new e({stack:[]})}reduce(e,t){return Rx(t.type,Tge,e,t)}},aS=new lge(()=>Ege.new()),Dge=s((e=>{var t=m();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useSyncExternalStore,a=t.useRef,o=t.useEffect,s=t.useMemo,c=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,l,u){var d=a(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=s(function(){function e(e){if(!i){if(i=!0,a=e,e=l(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return o=t}return o=e}if(t=o,r(a,e))return t;var n=l(e);return u!==void 0&&u(t,n)?(a=e,t):(a=e,o=n)}var i=!1,a,o,s=n===void 0?null:n;return[function(){return e(t())},s===null?void 0:function(){return e(s())}]},[t,n,l,u]);var p=i(e,d[0],d[1]);return o(function(){f.hasValue=!0,f.value=p},[p]),c(p),p}})),Oge=s((e=>{process.env.NODE_ENV!==`production`&&(function(){function t(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var n=m(),r=typeof Object.is==`function`?Object.is:t,i=n.useSyncExternalStore,a=n.useRef,o=n.useEffect,s=n.useMemo,c=n.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,l,u){var d=a(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=s(function(){function e(e){if(!i){if(i=!0,a=e,e=l(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return o=t}return o=e}if(t=o,r(a,e))return t;var n=l(e);return u!==void 0&&u(t,n)?(a=e,t):(a=e,o=n)}var i=!1,a,o,s=n===void 0?null:n;return[function(){return e(t())},s===null?void 0:function(){return e(s())}]},[t,n,l,u]);var p=i(e,d[0],d[1]);return o(function(){f.hasValue=!0,f.value=p},[p]),c(p),p},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})),kge=s(((e,t)=>{t.exports=process.env.NODE_ENV===`production`?Dge():Oge()}))();function oS(e,t,n=_ge){return(0,kge.useSyncExternalStoreWithSelector)(Fx(t=>e.subscribe(Age,t)),Fx(()=>e.state),Fx(()=>e.state),Fx(t),n)}function Age(e){return e}function sS(e,t){let n=(0,z.useId)(),r=aS.get(t),[i,a]=oS(r,(0,z.useCallback)(e=>[r.selectors.isTop(e,n),r.selectors.inStack(e,n)],[r,n]));return Nx(()=>{if(e)return r.actions.push(n),()=>r.actions.pop(n)},[r,e,n]),e?!a||i:!1}var jge=new Map,cS=new Map;function Mge(e){let t=cS.get(e)??0;return cS.set(e,t+1),t===0?(jge.set(e,{"aria-hidden":e.getAttribute(`aria-hidden`),inert:e.inert}),e.setAttribute(`aria-hidden`,`true`),e.inert=!0,()=>Nge(e)):()=>Nge(e)}function Nge(e){let t=cS.get(e)??1;if(t===1?cS.delete(e):cS.set(e,t-1),t!==1)return;let n=jge.get(e);n&&(n[`aria-hidden`]===null?e.removeAttribute(`aria-hidden`):e.setAttribute(`aria-hidden`,n[`aria-hidden`]),e.inert=n.inert,jge.delete(e))}function Pge(e,{allowed:t,disallowed:n}={}){let r=sS(e,`inert-others`);Nx(()=>{if(!r)return;let e=jx();for(let t of n?.()??[])t&&e.add(Mge(t));let i=t?.()??[];for(let t of i){if(!t)continue;let n=Ax(t);if(!n)continue;let r=t.parentElement;for(;r&&r!==n.body;){for(let t of r.children)i.some(e=>t.contains(e))||e.add(Mge(t));r=r.parentElement}}return e.dispose},[r,t,n])}function Fge(e,t,n){let r=Px(e=>{let t=e.getBoundingClientRect();t.x===0&&t.y===0&&t.width===0&&t.height===0&&n()});(0,z.useEffect)(()=>{if(!e)return;let n=t===null?null:Yx(t)?t:t.current;if(!n)return;let i=jx();if(typeof ResizeObserver<`u`){let e=new ResizeObserver(()=>r.current(n));e.observe(n),i.add(()=>e.disconnect())}if(typeof IntersectionObserver<`u`){let e=new IntersectionObserver(()=>r.current(n));e.observe(n),i.add(()=>e.disconnect())}return()=>i.dispose()},[t,r,e])}var lS=[`[contentEditable=true]`,`[tabindex]`,`a[href]`,`area[href]`,`button:not([disabled])`,`iframe`,`input:not([disabled])`,`select:not([disabled])`,`details>summary`,`textarea:not([disabled])`].map(e=>`${e}:not([tabindex='-1'])`).join(`,`),Ige=[`[data-autofocus]`].map(e=>`${e}:not([tabindex='-1'])`).join(`,`),uS=(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[e.AutoFocus=64]=`AutoFocus`,e))(uS||{}),Lge=(e=>(e[e.Error=0]=`Error`,e[e.Overflow=1]=`Overflow`,e[e.Success=2]=`Success`,e[e.Underflow=3]=`Underflow`,e))(Lge||{}),Rge=(e=>(e[e.Previous=-1]=`Previous`,e[e.Next=1]=`Next`,e))(Rge||{});function zge(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(lS)).sort((e,t)=>Math.sign((e.tabIndex||2**53-1)-(t.tabIndex||2**53-1)))}function Bge(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Ige)).sort((e,t)=>Math.sign((e.tabIndex||2**53-1)-(t.tabIndex||2**53-1)))}var Vge=(e=>(e[e.Strict=0]=`Strict`,e[e.Loose=1]=`Loose`,e))(Vge||{});function Hge(e,t=0){return e!==Ax(e)?.body&&Rx(t,{0(){return e.matches(lS)},1(){let t=e;for(;t!==null;){if(t.matches(lS))return!0;t=t.parentElement}return!1}})}function Uge(e){jx().nextFrame(()=>{let t=che(e);t&&Xx(t)&&!Hge(t,0)&&dS(e)})}var Wge=(e=>(e[e.Keyboard=0]=`Keyboard`,e[e.Mouse=1]=`Mouse`,e))(Wge||{});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 dS(e){e?.focus({preventScroll:!0})}var Gge=[`textarea`,`input`].join(`,`);function Kge(e){return(e?.matches)?.call(e,Gge)??!1}function qge(e,t=e=>e){return e.slice().sort((e,n)=>{let r=t(e),i=t(n);if(r===null||i===null)return 0;let a=r.compareDocumentPosition(i);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Jge(e,t,n=e===null?document.body:she(e)){return fS(zge(n),t,{relativeTo:e})}function fS(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:i=[]}={}){let a=Array.isArray(e)?e.length>0?she(e[0]):document:she(e),o=Array.isArray(e)?n?qge(e):e:t&64?Bge(e):zge(e);i.length>0&&o.length>1&&(o=o.filter(e=>!i.some(t=>t!=null&&`current`in t?t?.current===e:t===e))),r??=a?.activeElement;let s=(()=>{if(t&5)return 1;if(t&10)return-1;throw Error(`Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last`)})(),c=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,o.indexOf(r))-1;if(t&4)return Math.max(0,o.indexOf(r))+1;if(t&8)return o.length-1;throw Error(`Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last`)})(),l=t&32?{preventScroll:!0}:{},u=0,d=o.length,f;do{if(u>=d||u+d<=0)return 0;let e=c+u;if(t&16)e=(e+d)%d;else{if(e<0)return 3;if(e>=d)return 1}f=o[e],f?.focus(l),u+=s}while(f!==che(f));return t&6&&Kge(f)&&f.select(),2}function Yge(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Xge(){return/Android/gi.test(window.navigator.userAgent)}function Zge(){return Yge()||Xge()}function pS(e,t,n,r){let i=Px(n);(0,z.useEffect)(()=>{if(!e)return;function n(e){i.current(e)}return document.addEventListener(t,n,r),()=>document.removeEventListener(t,n,r)},[e,t,r])}function Qge(e,t,n,r){let i=Px(n);(0,z.useEffect)(()=>{if(!e)return;function n(e){i.current(e)}return window.addEventListener(t,n,r),()=>window.removeEventListener(t,n,r)},[e,t,r])}var $ge=30;function e_e(e,t,n){let r=Px(n),i=(0,z.useCallback)(function(e,n){if(e.defaultPrevented)return;let i=n(e);if(i===null||!i.getRootNode().contains(i)||!i.isConnected)return;let a=function e(t){return typeof t==`function`?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(t);for(let t of a)if(t!==null&&(t.contains(i)||e.composed&&e.composedPath().includes(t)))return;return!Hge(i,Vge.Loose)&&i.tabIndex!==-1&&e.preventDefault(),r.current(e,i)},[r,t]),a=(0,z.useRef)(null);pS(e,`pointerdown`,e=>{Zge()||(a.current=e.composedPath?.call(e)?.[0]||e.target)},!0),pS(e,`pointerup`,e=>{if(Zge()||!a.current)return;let t=a.current;return a.current=null,i(e,()=>t)},!0);let o=(0,z.useRef)({x:0,y:0});pS(e,`touchstart`,e=>{o.current.x=e.touches[0].clientX,o.current.y=e.touches[0].clientY},!0),pS(e,`touchend`,e=>{let t={x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY};if(!(Math.abs(t.x-o.current.x)>=$ge||Math.abs(t.y-o.current.y)>=$ge))return i(e,()=>Xx(e.target)?e.target:null)},!0),Qge(e,`blur`,e=>i(e,()=>Nhe(window.document.activeElement)?window.document.activeElement:null),!0)}function mS(...e){return(0,z.useMemo)(()=>Ax(...e),[...e])}var t_e=(e=>(e[e.Ignore=0]=`Ignore`,e[e.Select=1]=`Select`,e[e.Close=2]=`Close`,e))(t_e||{}),hS={Ignore:{kind:0},Select:e=>({kind:1,target:e}),Close:{kind:2}},n_e=200,r_e=5;function i_e(e,{trigger:t,action:n,close:r,select:i}){let a=(0,z.useRef)(null),o=(0,z.useRef)(null),s=(0,z.useRef)(null);pS(e&&t!==null,`pointerdown`,e=>{jhe(e?.target)&&t!=null&&t.contains(e.target)&&(o.current=e.x,s.current=e.y,a.current=e.timeStamp)}),pS(e&&t!==null,`pointerup`,e=>{let t=a.current;if(t===null||(a.current=null,!Xx(e.target))||Math.abs(e.x-(o.current??e.x))<r_e&&Math.abs(e.y-(s.current??e.y))<r_e)return;let c=n(e);switch(c.kind){case 0:return;case 1:e.timeStamp-t>n_e&&(i(c.target),r());break;case 2:r()}},{capture:!0})}function a_e(e,t,n,r){let i=Px(n);(0,z.useEffect)(()=>{e??=window;function n(e){i.current(e)}return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)},[e,t,r])}function o_e(e,t){return(0,z.useMemo)(()=>{if(e.type)return e.type;let n=e.as??`button`;if(typeof n==`string`&&n.toLowerCase()===`button`||t?.tagName===`BUTTON`&&!t.hasAttribute(`type`))return`button`},[e.type,e.as,t])}function s_e(e){return(0,z.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot)}function c_e(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(e){return r.add(e),()=>r.delete(e)},dispatch(e,...i){let a=t[e].call(n,...i);a&&(n=a,r.forEach(e=>e()))}}}function l_e(){let e;return{before({doc:t}){let n=t.documentElement,r=t.defaultView??window;e=Math.max(0,r.innerWidth-n.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,i=Math.max(0,r.clientWidth-r.offsetWidth),a=Math.max(0,e-i);n.style(r,`paddingRight`,`${a}px`)}}}function u_e(){return Yge()?{before({doc:e,d:t,meta:n}){function r(e){for(let t of n().containers)for(let n of t())if(n.contains(e))return!0;return!1}t.microTask(()=>{if(window.getComputedStyle(e.documentElement).scrollBehavior!==`auto`){let n=jx();n.style(e.documentElement,`scrollBehavior`,`auto`),t.add(()=>t.microTask(()=>n.dispose()))}let n=window.scrollY??window.pageYOffset,i=null;t.addEventListener(e,`click`,t=>{if(Xx(t.target))try{let n=t.target.closest(`a`);if(!n)return;let{hash:a}=new URL(n.href),o=e.querySelector(a);Xx(o)&&!r(o)&&(i=o)}catch{}},!0),t.group(n=>{t.addEventListener(e,`touchstart`,e=>{if(n.dispose(),Xx(e.target)&&Mhe(e.target)){if(r(e.target)){let t=e.target;for(;t.parentElement&&r(t.parentElement);)t=t.parentElement;n.style(t,`overscrollBehavior`,`contain`)}else n.style(e.target,`touchAction`,`none`)}})}),t.addEventListener(e,`touchmove`,e=>{if(Xx(e.target)){if(Phe(e.target))return;if(r(e.target)){let t=e.target;for(;t.parentElement&&t.dataset.headlessuiPortal!==``&&!(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)t=t.parentElement;t.dataset.headlessuiPortal===``&&e.preventDefault()}else e.preventDefault()}},{passive:!1}),t.add(()=>{let e=window.scrollY??window.pageYOffset;n!==e&&window.scrollTo(0,n),i&&i.isConnected&&(i.scrollIntoView({block:`nearest`}),i=null)})})}}:{}}function d_e(){return{before({doc:e,d:t}){t.style(e.documentElement,`overflow`,`hidden`)}}}function f_e(e){let t={};for(let n of e)Object.assign(t,n(t));return t}var gS=c_e(()=>new Map,{PUSH(e,t){let n=this.get(e)??{doc:e,count:0,d:jx(),meta:new Set,computedMeta:{}};return n.count++,n.meta.add(t),n.computedMeta=f_e(n.meta),this.set(e,n),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t),n.computedMeta=f_e(n.meta)),this},SCROLL_PREVENT(e){let t={doc:e.doc,d:e.d,meta(){return e.computedMeta}},n=[u_e(),l_e(),d_e()];n.forEach(({before:e})=>e?.(t)),n.forEach(({after:e})=>e?.(t))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});gS.subscribe(()=>{let e=gS.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let e=t.get(n.doc)===`hidden`,r=n.count!==0;(r&&!e||!r&&e)&&gS.dispatch(n.count>0?`SCROLL_PREVENT`:`SCROLL_ALLOW`,n),n.count===0&&gS.dispatch(`TEARDOWN`,n)}});function p_e(e,t,n=()=>({containers:[]})){let r=s_e(gS),i=t?r.get(t):void 0,a=i?i.count>0:!1;return Nx(()=>{if(t&&e)return gS.dispatch(`PUSH`,t,n),()=>gS.dispatch(`POP`,t,n)},[e,t]),a}function m_e(e,t,n=()=>[document.body]){p_e(sS(e,`scroll-lock`),t,e=>({containers:[...e.containers??[],n]}))}function h_e(e){return[e.screenX,e.screenY]}function g_e(){let e=(0,z.useRef)([-1,-1]);return{wasMoved(t){let n=h_e(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=h_e(t)}}}function __e(e=0){let[t,n]=(0,z.useState)(e);return{flags:t,setFlag:(0,z.useCallback)(e=>n(e),[]),addFlag:(0,z.useCallback)(e=>n(t=>t|e),[]),hasFlag:(0,z.useCallback)(e=>(t&e)===e,[t]),removeFlag:(0,z.useCallback)(e=>n(t=>t&~e),[]),toggleFlag:(0,z.useCallback)(e=>n(t=>t^e),[])}}typeof process<`u`&&typeof globalThis<`u`&&typeof Element<`u`&&(process==null?void 0:{})?.NODE_ENV===`test`&&(Element==null?void 0:Element.prototype)?.getAnimations===void 0&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.",``,`Example usage:`,"```js",`import { mockAnimationsApi } from 'jsdom-testing-mocks'`,`mockAnimationsApi()`,"```"].join(`
239
- `)),[]});var v_e=(e=>(e[e.None=0]=`None`,e[e.Closed=1]=`Closed`,e[e.Enter=2]=`Enter`,e[e.Leave=4]=`Leave`,e))(v_e||{});function y_e(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]=``);return t}function b_e(e,t,n,r){let[i,a]=(0,z.useState)(n),{hasFlag:o,addFlag:s,removeFlag:c}=__e(e&&i?3:0),l=(0,z.useRef)(!1),u=(0,z.useRef)(!1);return Nx(()=>{var i;if(e){if(n&&a(!0),!t){n&&s(3);return}return(i=r?.start)==null||i.call(r,n),x_e(t,{inFlight:l,prepare(){u.current?u.current=!1:u.current=l.current,l.current=!0,!u.current&&(n?(s(3),c(4)):(s(4),c(2)))},run(){u.current?n?(c(3),s(4)):(c(4),s(3)):n?c(1):s(1)},done(){var e;u.current&&w_e(t)||(l.current=!1,c(7),n||a(!1),(e=r?.end)==null||e.call(r,n))}})}},[e,n,t,Mx()]),e?[i,{closed:o(1),enter:o(2),leave:o(4),transition:o(2)||o(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function x_e(e,{prepare:t,run:n,done:r,inFlight:i}){let a=jx();return C_e(e,{prepare:t,inFlight:i}),a.nextFrame(()=>{n(),a.requestAnimationFrame(()=>{a.add(S_e(e,r))})}),a.dispose}function S_e(e,t){let n=jx();if(!e)return n.dispose;let r=!1;n.add(()=>{r=!0});let i=e.getAnimations?.call(e).filter(e=>e instanceof CSSTransition)??[];return i.length===0?(t(),n.dispose):(Promise.allSettled(i.map(e=>e.finished)).then(()=>{r||t()}),n.dispose)}function C_e(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition=`none`,n(),e.offsetHeight,e.style.transition=r}function w_e(e){return(e.getAnimations?.call(e)??[]).some(e=>e instanceof CSSTransition&&e.playState!==`finished`)}function T_e(e,{container:t,accept:n,walk:r}){let i=(0,z.useRef)(n),a=(0,z.useRef)(r);(0,z.useEffect)(()=>{i.current=n,a.current=r},[n,r]),Nx(()=>{if(!t||!e)return;let n=Ax(t);if(!n)return;let r=i.current,o=a.current,s=Object.assign(e=>r(e),{acceptNode:r}),c=n.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,s,!1);for(;c.nextNode();)o(c.currentNode)},[t,e,i,a])}function E_e(e,t){let n=(0,z.useRef)([]),r=Fx(e);(0,z.useEffect)(()=>{let e=[...n.current];for(let[i,a]of t.entries())if(n.current[i]!==a){let i=r(t,e);return n.current=t,i}},[r,...t])}function D_e(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function _S(e){return e instanceof Element||e instanceof D_e(e).Element}function O_e(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+`/`+n}).join(` `):navigator.userAgent}function k_e(e,t){return typeof e==`function`?e(t):e}var vS=Math.min,yS=Math.max,bS=Math.round,xS=Math.floor,SS=e=>({x:e,y:e}),A_e={left:`right`,right:`left`,bottom:`top`,top:`bottom`},j_e={start:`end`,end:`start`};function M_e(e,t,n){return yS(e,vS(t,n))}function CS(e,t){return typeof e==`function`?e(t):e}function wS(e){return e.split(`-`)[0]}function TS(e){return e.split(`-`)[1]}function N_e(e){return e===`x`?`y`:`x`}function P_e(e){return e===`y`?`height`:`width`}function ES(e){return[`top`,`bottom`].includes(wS(e))?`y`:`x`}function F_e(e){return N_e(ES(e))}function I_e(e,t,n){n===void 0&&(n=!1);let r=TS(e),i=F_e(e),a=P_e(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=DS(o)),[o,DS(o)]}function L_e(e){let t=DS(e);return[R_e(e),t,R_e(t)]}function R_e(e){return e.replace(/start|end/g,e=>j_e[e])}function z_e(e,t,n){let r=[`left`,`right`],i=[`right`,`left`],a=[`top`,`bottom`],o=[`bottom`,`top`];switch(e){case`top`:case`bottom`:return n?t?i:r:t?r:i;case`left`:case`right`:return t?a:o;default:return[]}}function B_e(e,t,n,r){let i=TS(e),a=z_e(wS(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(R_e)))),a}function DS(e){return e.replace(/left|right|bottom|top/g,e=>A_e[e])}function V_e(e){return{top:0,right:0,bottom:0,left:0,...e}}function H_e(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:V_e(e)}function OS(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function U_e(e,t,n){let{reference:r,floating:i}=e,a=ES(t),o=F_e(t),s=P_e(o),c=wS(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(TS(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1)}return p}var W_e=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=U_e(l,r,c),f=r,p={},m=0;for(let n=0;n<s.length;n++){let{name:a,fn:h}=s[n],{x:g,y:_,data:v,reset:y}=await h({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:l,platform:o,elements:{reference:e,floating:t}});u=g??u,d=_??d,p={...p,[a]:{...p[a],...v}},y&&m<=50&&(m++,typeof y==`object`&&(y.placement&&(f=y.placement),y.rects&&(l=y.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):y.rects),{x:u,y:d}=U_e(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:p}};async function kS(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=CS(t,e),p=H_e(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=OS(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=OS(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var G_e=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=CS(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=wS(r),_=ES(o),v=wS(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[DS(o)]:L_e(o)),x=p!==`none`;!d&&x&&b.push(...B_e(o,m,p,y));let S=[o,...b],C=await kS(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=I_e(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t)return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=ES(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};async function K_e(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=wS(n),s=TS(n),c=ES(n)===`y`,l=[`left`,`top`].includes(o)?-1:1,u=a&&c?-1:1,d=CS(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var q_e=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await K_e(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},J_e=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=CS(e,t),l={x:n,y:r},u=await kS(t,c),d=ES(wS(i)),f=N_e(d),p=l[f],m=l[d];if(a){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=p+u[e],r=p-u[t];p=M_e(n,p,r)}if(o){let e=d===`y`?`top`:`left`,t=d===`y`?`bottom`:`right`,n=m+u[e],r=m-u[t];m=M_e(n,m,r)}let h=s.fn({...t,[f]:p,[d]:m});return{...h,data:{x:h.x-n,y:h.y-r}}}}},Y_e=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=CS(e,t),c=await kS(t,s),l=wS(n),u=TS(n),d=ES(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=vS(p-c[m],g),y=vS(f-c[h],_),b=!t.middlewareData.shift,x=v,S=y;if(d?S=u||b?vS(y,_):_:x=u||b?vS(v,g):g,b&&!u){let e=yS(c.left,0),t=yS(c.right,0),n=yS(c.top,0),r=yS(c.bottom,0);d?S=f-2*(e!==0||t!==0?e+t:yS(c.left,c.right)):x=p-2*(n!==0||r!==0?n+r:yS(c.top,c.bottom))}await o({...t,availableWidth:S,availableHeight:x});let C=await i.getDimensions(a.floating);return f!==C.width||p!==C.height?{reset:{rects:!0}}:{}}}};function AS(e){return X_e(e)?(e.nodeName||``).toLowerCase():`#document`}function jS(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function MS(e){return((X_e(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function X_e(e){return e instanceof Node||e instanceof jS(e).Node}function NS(e){return e instanceof Element||e instanceof jS(e).Element}function PS(e){return e instanceof HTMLElement||e instanceof jS(e).HTMLElement}function Z_e(e){return typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof jS(e).ShadowRoot}function FS(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=RS(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&![`inline`,`contents`].includes(i)}function Q_e(e){return[`table`,`td`,`th`].includes(AS(e))}function IS(e){return[`:popover-open`,`:modal`].some(t=>{try{return e.matches(t)}catch{return!1}})}function $_e(e){let t=tve(),n=NS(e)?RS(e):e;return n.transform!==`none`||n.perspective!==`none`||(n.containerType?n.containerType!==`normal`:!1)||!t&&(n.backdropFilter?n.backdropFilter!==`none`:!1)||!t&&(n.filter?n.filter!==`none`:!1)||[`transform`,`perspective`,`filter`].some(e=>(n.willChange||``).includes(e))||[`paint`,`layout`,`strict`,`content`].some(e=>(n.contain||``).includes(e))}function eve(e){let t=BS(e);for(;PS(t)&&!LS(t);){if($_e(t))return t;if(IS(t))return null;t=BS(t)}return null}function tve(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}function LS(e){return[`html`,`body`,`#document`].includes(AS(e))}function RS(e){return jS(e).getComputedStyle(e)}function zS(e){return NS(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function BS(e){if(AS(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Z_e(e)&&e.host||MS(e);return Z_e(t)?t.host:t}function nve(e){let t=BS(e);return LS(t)?e.ownerDocument?e.ownerDocument.body:e.body:PS(t)&&FS(t)?t:nve(t)}function VS(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=nve(e),i=r===e.ownerDocument?.body,a=jS(r);return i?t.concat(a,a.visualViewport||[],FS(r)?r:[],a.frameElement&&n?VS(a.frameElement):[]):t.concat(r,VS(r,[],n))}function rve(e){let t=RS(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=PS(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=bS(n)!==a||bS(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function ive(e){return NS(e)?e:e.contextElement}function HS(e){let t=ive(e);if(!PS(t))return SS(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=rve(t),o=(a?bS(n.width):n.width)/r,s=(a?bS(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var ave=SS(0);function ove(e){let t=jS(e);return!tve()||!t.visualViewport?ave:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function sve(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==jS(e)?!1:t}function US(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=ive(e),o=SS(1);t&&(r?NS(r)&&(o=HS(r)):o=HS(e));let s=sve(a,n,r)?ove(a):SS(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=jS(a),t=r&&NS(r)?jS(r):r,n=e,i=n.frameElement;for(;i&&r&&t!==n;){let e=HS(i),t=i.getBoundingClientRect(),r=RS(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=jS(i),i=n.frameElement}}return OS({width:u,height:d,x:c,y:l})}function cve(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=MS(r),s=t?IS(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=SS(1),u=SS(0),d=PS(r);if((d||!d&&!a)&&((AS(r)!==`body`||FS(o))&&(c=zS(r)),PS(r))){let e=US(r);l=HS(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x,y:n.y*l.y-c.scrollTop*l.y+u.y}}function lve(e){return Array.from(e.getClientRects())}function uve(e){return US(MS(e)).left+zS(e).scrollLeft}function dve(e){let t=MS(e),n=zS(e),r=e.ownerDocument.body,i=yS(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=yS(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+uve(e),s=-n.scrollTop;return RS(r).direction===`rtl`&&(o+=yS(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}function fve(e,t){let n=jS(e),r=MS(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=tve();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s,y:c}}function pve(e,t){let n=US(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=PS(e)?HS(e):SS(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function mve(e,t,n){let r;if(t===`viewport`)r=fve(e,n);else if(t===`document`)r=dve(MS(e));else if(NS(t))r=pve(t,n);else{let n=ove(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return OS(r)}function hve(e,t){let n=BS(e);return n===t||!NS(n)||LS(n)?!1:RS(n).position===`fixed`||hve(n,t)}function gve(e,t){let n=t.get(e);if(n)return n;let r=VS(e,[],!1).filter(e=>NS(e)&&AS(e)!==`body`),i=null,a=RS(e).position===`fixed`,o=a?BS(e):e;for(;NS(o)&&!LS(o);){let t=RS(o),n=$_e(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&[`absolute`,`fixed`].includes(i.position)||FS(o)&&!n&&hve(e,o))?r=r.filter(e=>e!==o):i=t,o=BS(o)}return t.set(e,r),r}function _ve(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?IS(t)?[]:gve(t,this._c):[].concat(n),r],o=a[0],s=a.reduce((e,n)=>{let r=mve(t,n,i);return e.top=yS(r.top,e.top),e.right=vS(r.right,e.right),e.bottom=vS(r.bottom,e.bottom),e.left=yS(r.left,e.left),e},mve(t,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function vve(e){let{width:t,height:n}=rve(e);return{width:t,height:n}}function yve(e,t,n){let r=PS(t),i=MS(t),a=n===`fixed`,o=US(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=SS(0);if(r||!r&&!a){if((AS(t)!==`body`||FS(i))&&(s=zS(t)),r){let e=US(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&(c.x=uve(i))}return{x:o.left+s.scrollLeft-c.x,y:o.top+s.scrollTop-c.y,width:o.width,height:o.height}}function bve(e){return RS(e).position===`static`}function xve(e,t){return!PS(e)||RS(e).position===`fixed`?null:t?t(e):e.offsetParent}function Sve(e,t){let n=jS(e);if(IS(e))return n;if(!PS(e)){let t=BS(e);for(;t&&!LS(t);){if(NS(t)&&!bve(t))return t;t=BS(t)}return n}let r=xve(e,t);for(;r&&Q_e(r)&&bve(r);)r=xve(r,t);return r&&LS(r)&&bve(r)&&!$_e(r)?n:r||eve(e)||n}var Cve=async function(e){let t=this.getOffsetParent||Sve,n=this.getDimensions,r=await n(e.floating);return{reference:yve(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function wve(e){return RS(e).direction===`rtl`}var Tve={convertOffsetParentRelativeRectToViewportRelativeRect:cve,getDocumentElement:MS,getClippingRect:_ve,getOffsetParent:Sve,getElementRects:Cve,getClientRects:lve,getDimensions:vve,getScale:HS,isElement:NS,isRTL:wve};function Eve(e,t){let n=null,r,i=MS(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let{left:l,top:u,width:d,height:f}=e.getBoundingClientRect();if(s||t(),!d||!f)return;let p=xS(u),m=xS(i.clientWidth-(l+d)),h=xS(i.clientHeight-(u+f)),g=xS(l),_={rootMargin:-p+`px `+-m+`px `+-h+`px `+-g+`px`,threshold:yS(0,vS(1,c))||1},v=!0;function y(e){let t=e[0].intersectionRatio;if(t!==c){if(!v)return o();t?o(!1,t):r=setTimeout(()=>{o(!1,1e-7)},1e3)}v=!1}try{n=new IntersectionObserver(y,{..._,root:i.ownerDocument})}catch{n=new IntersectionObserver(y,_)}n.observe(e)}return o(!0),a}function Dve(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=ive(e),u=i||a?[...l?VS(l):[],...VS(t)]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Eve(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let m,h=c?US(e):null;c&&g();function g(){let t=US(e);h&&(t.x!==h.x||t.y!==h.y||t.width!==h.width||t.height!==h.height)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Ove=kS,kve=q_e,Ave=J_e,jve=G_e,Mve=Y_e,Nve=(e,t,n)=>{let r=new Map,i={platform:Tve,...n},a={...i.platform,_c:r};return W_e(e,t,{...i,platform:a})},WS=typeof document<`u`?z.useLayoutEffect:z.useEffect;function GS(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!GS(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!GS(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Pve(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Fve(e,t){let n=Pve(e);return Math.round(t*n)/n}function Ive(e){let t=z.useRef(e);return WS(()=>{t.current=e}),t}function Lve(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=z.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=z.useState(r);GS(f,r)||p(r);let[m,h]=z.useState(null),[g,_]=z.useState(null),v=z.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=z.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=z.useRef(null),C=z.useRef(null),w=z.useRef(u),T=c!=null,E=Ive(c),D=Ive(i),O=z.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),Nve(S.current,C.current,e).then(e=>{let t={...e,isPositioned:!0};k.current&&!GS(w.current,t)&&(w.current=t,yu.flushSync(()=>{d(t)}))})},[f,t,n,D]);WS(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let k=z.useRef(!1);WS(()=>(k.current=!0,()=>{k.current=!1}),[]),WS(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,O);O()}},[b,x,O,E,T]);let A=z.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),j=z.useMemo(()=>({reference:b,floating:x}),[b,x]),M=z.useMemo(()=>{let e={position:n,left:0,top:0};if(!j.floating)return e;let t=Fve(j.floating,u.x),r=Fve(j.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Pve(j.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,j.floating,u.x,u.y]);return z.useMemo(()=>({...u,update:O,refs:A,elements:j,floatingStyles:M}),[u,O,A,j,M])}var Rve=(e,t)=>({...kve(e),options:[e,t]}),zve=(e,t)=>({...Ave(e),options:[e,t]}),Bve=(e,t)=>({...jve(e),options:[e,t]}),Vve=(e,t)=>({...Mve(e),options:[e,t]}),Hve={...z},Uve=Hve.useInsertionEffect||(e=>e());function Wve(e){let t=z.useRef(()=>{if(process.env.NODE_ENV!==`production`)throw Error(`Cannot call an event handler while rendering.`)});return Uve(()=>{t.current=e}),z.useCallback(function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.current==null?void 0:t.current(...n)},[])}var Gve=`ArrowUp`,Kve=`ArrowDown`,qve=`ArrowLeft`,Jve=`ArrowRight`,Yve=typeof document<`u`?z.useLayoutEffect:z.useEffect,Xve=[qve,Jve],Zve=[Gve,Kve];[...Xve,...Zve];var Qve=!1,$ve=0,eye=()=>`floating-ui-`+Math.random().toString(36).slice(2,6)+$ve++;function tye(){let[e,t]=z.useState(()=>Qve?eye():void 0);return Yve(()=>{e??t(eye())},[]),z.useEffect(()=>{Qve=!0},[]),e}var nye=Hve.useId||tye,KS;process.env.NODE_ENV!==`production`&&(KS=new Set);function rye(){for(var e,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];let i=`Floating UI: `+n.join(` `);if(!((e=KS)!=null&&e.has(i))){var a;(a=KS)==null||a.add(i),console.warn(i)}}function iye(){for(var e,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];let i=`Floating UI: `+n.join(` `);if(!((e=KS)!=null&&e.has(i))){var a;(a=KS)==null||a.add(i),console.error(i)}}function aye(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(e=>e(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){e.set(t,e.get(t)?.filter(e=>e!==n)||[])}}}var oye=z.createContext(null),sye=z.createContext(null),cye=()=>z.useContext(oye)?.id||null,lye=()=>z.useContext(sye);function uye(e){let{open:t=!1,onOpenChange:n,elements:r}=e,i=nye(),a=z.useRef({}),[o]=z.useState(()=>aye()),s=cye()!=null;if(process.env.NODE_ENV!==`production`){let e=r.reference;e&&!_S(e)&&iye("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`",`instead.`)}let[c,l]=z.useState(r.reference),u=Wve((e,t,r)=>{a.current.openEvent=e?t:void 0,o.emit(`openchange`,{open:e,event:t,reason:r,nested:s}),n?.(e,t,r)}),d=z.useMemo(()=>({setPositionReference:l}),[]),f=z.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return z.useMemo(()=>({dataRef:a,open:t,onOpenChange:u,elements:f,events:o,floatingId:i,refs:d}),[t,u,f,o,i,d])}function dye(e){e===void 0&&(e={});let{nodeId:t}=e,n=uye({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[a,o]=z.useState(null),[s,c]=z.useState(null),l=i?.reference||a,u=z.useRef(null),d=lye();Yve(()=>{l&&(u.current=l)},[l]);let f=Lve({...e,elements:{...i,...s&&{reference:s}}}),p=z.useCallback(e=>{let t=_S(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;c(t),f.refs.setReference(t)},[f.refs]),m=z.useCallback(e=>{(_S(e)||e===null)&&(u.current=e,o(e)),(_S(f.refs.reference.current)||f.refs.reference.current===null||e!==null&&!_S(e))&&f.refs.setReference(e)},[f.refs]),h=z.useMemo(()=>({...f.refs,setReference:m,setPositionReference:p,domReference:u}),[f.refs,m,p]),g=z.useMemo(()=>({...f.elements,domReference:l}),[f.elements,l]),_=z.useMemo(()=>({...f,...r,refs:h,elements:g,nodeId:t}),[f,h,g,t,r]);return Yve(()=>{r.dataRef.current.floatingContext=_;let e=d?.nodesRef.current.find(e=>e.id===t);e&&(e.context=_)}),z.useMemo(()=>({...f,context:_,refs:h,elements:g}),[f,h,g,_])}var fye=`active`,pye=`selected`;function mye(e,t,n){let r=new Map,i=n===`item`,a=e;if(i&&e){let{[fye]:t,[pye]:n,...r}=e;a=r}return{...n===`floating`&&{tabIndex:-1},...a,...t.map(t=>{let r=t?t[n]:null;return typeof r==`function`?e?r(e):null:r}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,a]=t;if(!(i&&[fye,pye].includes(n))){if(n.indexOf(`on`)===0){if(r.has(n)||r.set(n,[]),typeof a==`function`){var o;(o=r.get(n))==null||o.push(a),e[n]=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return r.get(n)?.map(e=>e(...t)).find(e=>e!==void 0)}}}else e[n]=a}}),e),{})}}function hye(e){e===void 0&&(e=[]);let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=z.useCallback(t=>mye(t,e,`reference`),t),a=z.useCallback(t=>mye(t,e,`floating`),n),o=z.useCallback(t=>mye(t,e,`item`),r);return z.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}function gye(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}var _ye=e=>({name:`inner`,options:e,async fn(t){let{listRef:n,overflowRef:r,onFallbackChange:i,offset:a=0,index:o=0,minItemsVisible:s=4,referenceOverflowThreshold:c=0,scrollRef:l,...u}=k_e(e,t),{rects:d,elements:{floating:f}}=t,p=n.current[o];if(process.env.NODE_ENV!==`production`&&(t.placement.startsWith(`bottom`)||rye('`placement` side must be "bottom" when using the `inner`',`middleware.`)),!p)return{};let m={...t,...await Rve(-p.offsetTop-f.clientTop-d.reference.height/2-p.offsetHeight/2-a).fn(t)},h=l?.current||f,g=await Ove(gye(m,h.scrollHeight),u),_=await Ove(m,{...u,elementContext:`reference`}),v=Math.max(0,g.top),y=m.y+v,b=Math.max(0,h.scrollHeight-v-Math.max(0,g.bottom));return h.style.maxHeight=b+`px`,h.scrollTop=v,i&&(h.offsetHeight<p.offsetHeight*Math.min(s,n.current.length-1)-1||_.top>=-c||_.bottom>=-c?yu.flushSync(()=>i(!0)):yu.flushSync(()=>i(!1))),r&&(r.current=await Ove(gye({...m,y},h.offsetHeight),u)),{y}}});function vye(e,t){let{open:n,elements:r}=e,{enabled:i=!0,overflowRef:a,scrollRef:o,onChange:s}=t,c=Wve(s),l=z.useRef(!1),u=z.useRef(null),d=z.useRef(null);z.useEffect(()=>{if(!i)return;function e(e){if(e.ctrlKey||!t||a.current==null)return;let n=e.deltaY,r=a.current.top>=-.5,i=a.current.bottom>=-.5,o=t.scrollHeight-t.clientHeight,s=n<0?-1:1,l=n<0?`max`:`min`;t.scrollHeight<=t.clientHeight||(!r&&n>0||!i&&n<0?(e.preventDefault(),yu.flushSync(()=>{c(e=>e+Math[l](n,o*s))})):/firefox/i.test(O_e())&&(t.scrollTop+=n))}let t=o?.current||r.floating;if(n&&t)return t.addEventListener(`wheel`,e),requestAnimationFrame(()=>{u.current=t.scrollTop,a.current!=null&&(d.current={...a.current})}),()=>{u.current=null,d.current=null,t.removeEventListener(`wheel`,e)}},[i,n,r.floating,a,o,c]);let f=z.useMemo(()=>({onKeyDown(){l.current=!0},onWheel(){l.current=!1},onPointerMove(){l.current=!1},onScroll(){let e=o?.current||r.floating;if(a.current&&e&&l.current){if(u.current!==null){let t=e.scrollTop-u.current;(a.current.bottom<-.5&&t<-1||a.current.top<-.5&&t>1)&&yu.flushSync(()=>c(e=>e+t))}requestAnimationFrame(()=>{u.current=e.scrollTop})}}}),[r.floating,c,a,o]);return z.useMemo(()=>i?{floating:f}:{},[i,f])}var qS=(0,z.createContext)({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});qS.displayName=`FloatingContext`;var yye=(0,z.createContext)(null);yye.displayName=`PlacementContext`;function bye(e){return(0,z.useMemo)(()=>e?typeof e==`string`?{to:e}:e:null,[e])}function xye(){return(0,z.useContext)(qS).setReference}function Sye(){return(0,z.useContext)(qS).getReferenceProps}function Cye(){let{getFloatingProps:e,slot:t}=(0,z.useContext)(qS);return(0,z.useCallback)((...n)=>Object.assign({},e(...n),{"data-anchor":t.anchor}),[e,t])}function wye(e=null){e===!1&&(e=null),typeof e==`string`&&(e={to:e});let t=(0,z.useContext)(yye),n=(0,z.useMemo)(()=>e,[JSON.stringify(e,(e,t)=>t?.outerHTML??t)]);Nx(()=>{t?.(n??null)},[t,n]);let r=(0,z.useContext)(qS);return(0,z.useMemo)(()=>[r.setFloating,e?r.styles:{}],[r.setFloating,e,r.styles])}var Tye=4;function Eye({children:e,enabled:t=!0}){let[n,r]=(0,z.useState)(null),[i,a]=(0,z.useState)(0),o=(0,z.useRef)(null),[s,c]=(0,z.useState)(null);Dye(s);let l=t&&n!==null&&s!==null,{to:u=`bottom`,gap:d=0,offset:f=0,padding:p=0,inner:m}=Oye(n,s),[h,g=`center`]=u.split(` `);Nx(()=>{l&&a(0)},[l]);let{refs:_,floatingStyles:v,context:y}=dye({open:l,placement:h===`selection`?g===`center`?`bottom`:`bottom-${g}`:g===`center`?`${h}`:`${h}-${g}`,strategy:`absolute`,transform:!1,middleware:[Rve({mainAxis:h===`selection`?0:d,crossAxis:f}),zve({padding:p}),h!==`selection`&&Bve({padding:p}),h===`selection`&&m?_ye({...m,padding:p,overflowRef:o,offset:i,minItemsVisible:Tye,referenceOverflowThreshold:p,onFallbackChange(e){if(!e)return;let t=y.elements.floating;if(!t)return;let n=parseFloat(getComputedStyle(t).scrollPaddingBottom)||0,r=Math.min(Tye,t.childElementCount),i=0,o=0;for(let e of y.elements.floating?.childNodes??[])if(Yx(e)){let a=e.offsetTop,s=a+e.clientHeight+n,c=t.scrollTop,l=c+t.clientHeight;if(a>=c&&s<=l)r--;else{o=Math.max(0,Math.min(s,l)-Math.max(a,c)),i=e.clientHeight;break}}r>=1&&a(e=>{let t=i*r-o+n;return e>=t?e:t})}}):null,Vve({padding:p,apply({availableWidth:e,availableHeight:t,elements:n}){Object.assign(n.floating.style,{overflow:`auto`,maxWidth:`${e}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${t}px)`})}})].filter(Boolean),whileElementsMounted:Dve}),[b=h,x=g]=y.placement.split(`-`);h===`selection`&&(b=`selection`);let S=(0,z.useMemo)(()=>({anchor:[b,x].filter(Boolean).join(` `)}),[b,x]),{getReferenceProps:C,getFloatingProps:w}=hye([vye(y,{overflowRef:o,onChange:a})]),T=Fx(e=>{c(e),_.setFloating(e)});return z.createElement(yye.Provider,{value:r},z.createElement(qS.Provider,{value:{setFloating:T,setReference:_.setReference,styles:v,getReferenceProps:C,getFloatingProps:w,slot:S}},e))}function Dye(e){Nx(()=>{if(!e)return;let t=new MutationObserver(()=>{let t=window.getComputedStyle(e).maxHeight,n=parseFloat(t);if(isNaN(n))return;let r=parseInt(t);isNaN(r)||n!==r&&(e.style.maxHeight=`${Math.ceil(n)}px`)});return t.observe(e,{attributes:!0,attributeFilter:[`style`]}),()=>{t.disconnect()}},[e])}function Oye(e,t){let n=kye(e?.gap??`var(--anchor-gap, 0)`,t),r=kye(e?.offset??`var(--anchor-offset, 0)`,t),i=kye(e?.padding??`var(--anchor-padding, 0)`,t);return{...e,gap:n,offset:r,padding:i}}function kye(e,t,n=void 0){let r=Mx(),i=Fx((e,t)=>{if(e==null)return[n,null];if(typeof e==`number`)return[e,null];if(typeof e==`string`){if(!t)return[n,null];let i=jye(e,t);return[i,n=>{let a=Aye(e);{let o=a.map(e=>window.getComputedStyle(t).getPropertyValue(e));r.requestAnimationFrame(function s(){r.nextFrame(s);let c=!1;for(let[e,n]of a.entries()){let r=window.getComputedStyle(t).getPropertyValue(n);if(o[e]!==r){o[e]=r,c=!0;break}}if(!c)return;let l=jye(e,t);i!==l&&(n(l),i=l)})}return r.dispose}]}return[n,null]}),a=(0,z.useMemo)(()=>i(e,t)[0],[e,t]),[o=a,s]=(0,z.useState)();return Nx(()=>{let[n,r]=i(e,t);if(s(n),r)return r(s)},[e,t]),o}function Aye(e){let t=/var\((.*)\)/.exec(e);if(t){let e=t[1].indexOf(`,`);if(e===-1)return[t[1]];let n=t[1].slice(0,e).trim(),r=t[1].slice(e+1).trim();return r?[n,...Aye(r)]:[n]}return[]}function jye(e,t){let n=document.createElement(`div`);t.appendChild(n),n.style.setProperty(`margin-top`,`0px`,`important`),n.style.setProperty(`margin-top`,e,`important`);let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),r}var JS=(0,z.createContext)(null);JS.displayName=`OpenClosedContext`;var YS=(e=>(e[e.Open=1]=`Open`,e[e.Closed=2]=`Closed`,e[e.Closing=4]=`Closing`,e[e.Opening=8]=`Opening`,e))(YS||{});function XS(){return(0,z.useContext)(JS)}function Mye({value:e,children:t}){return z.createElement(JS.Provider,{value:e},t)}function Nye({children:e}){return z.createElement(JS.Provider,{value:null},e)}function Pye(e){function t(){document.readyState!==`loading`&&(e(),document.removeEventListener(`DOMContentLoaded`,t))}typeof window<`u`&&typeof document<`u`&&(document.addEventListener(`DOMContentLoaded`,t),t())}var ZS=[];Pye(()=>{function e(e){if(!Xx(e.target)||e.target===document.body||ZS[0]===e.target)return;let t=e.target;t=t.closest(lS),ZS.unshift(t??e.target),ZS=ZS.filter(e=>e!=null&&e.isConnected),ZS.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 Fye(e){throw Error(`Unexpected object: `+e)}var QS=(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))(QS||{});function $S(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=r??-1;switch(e.focus){case 0:for(let e=0;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 1:i===-1&&(i=n.length);for(let e=i-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 2:for(let e=i+1;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 3:for(let e=n.length-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 4:for(let r=0;r<n.length;++r)if(t.resolveId(n[r],r,n)===e.id)return r;return r;case 5:return null;default:Fye(e)}}function Iye(e){let t=Fx(e),n=(0,z.useRef)(!1);(0,z.useEffect)(()=>(n.current=!1,()=>{n.current=!0,uhe(()=>{n.current&&t()})}),[t])}var Lye=(0,z.createContext)(!1);function Rye(){return(0,z.useContext)(Lye)}function zye(e){return z.createElement(Lye.Provider,{value:e.force},e.children)}function Bye(e){let t=Rye(),n=(0,z.useContext)(Gye),[r,i]=(0,z.useState)(()=>{if(!t&&n!==null)return n.current??null;if(kx.isServer)return null;let r=e?.getElementById(`headlessui-portal-root`);if(r)return r;if(e===null)return null;let i=e.createElement(`div`);return i.setAttribute(`id`,`headlessui-portal-root`),e.body.appendChild(i)});return(0,z.useEffect)(()=>{r!==null&&(e!=null&&e.body.contains(r)||e==null||e.body.appendChild(r))},[r,e]),(0,z.useEffect)(()=>{t||n!==null&&i(n.current)},[n,i,t]),r}var Vye=z.Fragment,Hye=Wx(function(e,t){let{ownerDocument:n=null,...r}=e,i=(0,z.useRef)(null),a=Zx(Hhe(e=>{i.current=e}),t),o=mS(i.current),s=Bye(n??o),c=(0,z.useContext)(qye),l=Mx(),u=Vx();return Iye(()=>{var e;s&&s.childNodes.length<=0&&((e=s.parentElement)==null||e.removeChild(s))}),s?(0,yu.createPortal)(z.createElement(`div`,{"data-headlessui-portal":``,ref:e=>{l.dispose(),c&&e&&l.add(c.register(e))}},u({ourProps:{ref:a},theirProps:r,slot:{},defaultTag:Vye,name:`Portal`})),s):null});function Uye(e,t){let n=Zx(t),{enabled:r=!0,ownerDocument:i,...a}=e,o=Vx();return r?z.createElement(Hye,{...a,ownerDocument:i,ref:n}):o({ourProps:{ref:n},theirProps:a,slot:{},defaultTag:Vye,name:`Portal`})}var Wye=z.Fragment,Gye=(0,z.createContext)(null);function Kye(e,t){let{target:n,...r}=e,i={ref:Zx(t)},a=Vx();return z.createElement(Gye.Provider,{value:n},a({ourProps:i,theirProps:r,defaultTag:Wye,name:`Popover.Group`}))}var qye=(0,z.createContext)(null);function Jye(){let e=(0,z.useContext)(qye),t=(0,z.useRef)([]),n=Fx(n=>(t.current.push(n),e&&e.register(n),()=>r(n))),r=Fx(n=>{let r=t.current.indexOf(n);r!==-1&&t.current.splice(r,1),e&&e.unregister(n)}),i=(0,z.useMemo)(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,(0,z.useMemo)(()=>function({children:e}){return z.createElement(qye.Provider,{value:i},e)},[i])]}var Yye=Wx(Uye),Xye=Wx(Kye),Zye=Object.assign(Yye,{Group:Xye}),eC={Idle:{kind:`Idle`},Tracked:e=>({kind:`Tracked`,position:e}),Moved:{kind:`Moved`}};function Qye(e){let t=e.getBoundingClientRect();return`${t.x},${t.y}`}function $ye(e,t,n){let r=jx();if(t.kind===`Tracked`){let i=function(){a!==Qye(e)&&(r.dispose(),n())},{position:a}=t,o=new ResizeObserver(i);o.observe(e),r.add(()=>o.disconnect()),r.addEventListener(window,`scroll`,i,{passive:!0}),r.addEventListener(window,`resize`,i)}return()=>r.dispose()}var ebe=z.Fragment;function tbe(e,t){let{...n}=e,{isFocusVisible:r,focusProps:i}=Ox(),{isHovered:a,hoverProps:o}=Dx({isDisabled:!1}),{pressed:s,pressProps:c}=phe({disabled:!1}),l=Ux({ref:t},i,o,c),u=Ix({hover:a,focus:r,active:s});return Vx()({ourProps:l,theirProps:n,slot:u,defaultTag:ebe,name:`DataInteractive`})}var nbe=Wx(tbe);function rbe(e,t=typeof document<`u`?document.defaultView:null,n){let r=sS(e,`escape`);a_e(t,`keydown`,e=>{r&&(e.defaultPrevented||e.key===$x.Escape&&n(e))})}function ibe(){let[e]=(0,z.useState)(()=>typeof window<`u`&&typeof window.matchMedia==`function`?window.matchMedia(`(pointer: coarse)`):null),[t,n]=(0,z.useState)(e?.matches??!1);return Nx(()=>{if(!e)return;function t(e){n(e.matches)}return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[e]),t}function abe({defaultContainers:e=[],portals:t,mainTreeNode:n}={}){let r=Fx(()=>{let r=Ax(n),i=[];for(let t of e)t!==null&&(Jx(t)?i.push(t):`current`in t&&Jx(t.current)&&i.push(t.current));if(t!=null&&t.current)for(let e of t.current)i.push(e);for(let e of r?.querySelectorAll(`html > *, body > *`)??[])e!==document.body&&e!==document.head&&Jx(e)&&e.id!==`headlessui-portal-root`&&(n&&(e.contains(n)||e.contains(n?.getRootNode()?.host))||i.some(t=>e.contains(t))||i.push(e));return i});return{resolveContainers:r,contains:Fx(e=>r().some(t=>t.contains(e)))}}var obe=(0,z.createContext)(null);function sbe({children:e,node:t}){let[n,r]=(0,z.useState)(null),i=cbe(t??n);return z.createElement(obe.Provider,{value:i},e,i===null&&z.createElement(Ohe,{features:qx.Hidden,ref:e=>{if(e){for(let t of Ax(e)?.querySelectorAll(`html > *, body > *`)??[])if(t!==document.body&&t!==document.head&&Jx(t)&&t!=null&&t.contains(e)){r(t);break}}}}))}function cbe(e=null){return(0,z.useContext)(obe)??e}function lbe(){let e=typeof document>`u`;return`useSyncExternalStore`in z&&(e=>e.useSyncExternalStore)(z)(()=>()=>{},()=>!1,()=>!e)}function tC(){let e=lbe(),[t,n]=z.useState(kx.isHandoffComplete);return t&&kx.isHandoffComplete===!1&&n(!1),z.useEffect(()=>{t!==!0&&n(!0)},[t]),z.useEffect(()=>kx.handoff(),[]),!e&&t}function ube(){let e=(0,z.useRef)(!1);return Nx(()=>(e.current=!0,()=>{e.current=!1}),[]),e}var nC=(e=>(e[e.Forwards=0]=`Forwards`,e[e.Backwards=1]=`Backwards`,e))(nC||{});function dbe(){let e=(0,z.useRef)(0);return Qge(!0,`keydown`,t=>{t.key===`Tab`&&(e.current=+!!t.shiftKey)},!0),e}function fbe(e){if(!e)return new Set;if(typeof e==`function`)return new Set(e());let t=new Set;for(let n of e.current)Jx(n.current)&&t.add(n.current);return t}var pbe=`div`,rC=(e=>(e[e.None=0]=`None`,e[e.InitialFocus=1]=`InitialFocus`,e[e.TabLock=2]=`TabLock`,e[e.FocusLock=4]=`FocusLock`,e[e.RestoreFocus=8]=`RestoreFocus`,e[e.AutoFocus=16]=`AutoFocus`,e))(rC||{});function mbe(e,t){let n=(0,z.useRef)(null),r=Zx(n,t),{initialFocus:i,initialFocusFallback:a,containers:o,features:s=15,...c}=e;tC()||(s=0);let l=mS(n.current);vbe(s,{ownerDocument:l});let u=ybe(s,{ownerDocument:l,container:n,initialFocus:i,initialFocusFallback:a});bbe(s,{ownerDocument:l,container:n,containers:o,previousActiveElement:u});let d=dbe(),f=Fx(e=>{if(!Yx(n.current))return;let t=n.current;(e=>e())(()=>{Rx(d.current,{[nC.Forwards]:()=>{fS(t,uS.First,{skipElements:[e.relatedTarget,a]})},[nC.Backwards]:()=>{fS(t,uS.Last,{skipElements:[e.relatedTarget,a]})}})})}),p=sS(!!(s&2),`focus-trap#tab-lock`),m=Mx(),h=(0,z.useRef)(!1),g={ref:r,onKeyDown(e){e.key==`Tab`&&(h.current=!0,m.requestAnimationFrame(()=>{h.current=!1}))},onBlur(e){if(!(s&4))return;let t=fbe(o);Yx(n.current)&&t.add(n.current);let r=e.relatedTarget;Xx(r)&&r.dataset.headlessuiFocusGuard!==`true`&&(xbe(t,r)||(h.current?fS(n.current,Rx(d.current,{[nC.Forwards]:()=>uS.Next,[nC.Backwards]:()=>uS.Previous})|uS.WrapAround,{relativeTo:e.target}):Xx(e.target)&&dS(e.target)))}},_=Vx();return z.createElement(z.Fragment,null,p&&z.createElement(Ohe,{as:`button`,type:`button`,"data-headlessui-focus-guard":!0,onFocus:f,features:qx.Focusable}),_({ourProps:g,theirProps:c,defaultTag:pbe,name:`FocusTrap`}),p&&z.createElement(Ohe,{as:`button`,type:`button`,"data-headlessui-focus-guard":!0,onFocus:f,features:qx.Focusable}))}var hbe=Wx(mbe),gbe=Object.assign(hbe,{features:rC});function _be(e=!0){let t=(0,z.useRef)(ZS.slice());return E_e(([e],[n])=>{n===!0&&e===!1&&uhe(()=>{t.current.splice(0)}),n===!1&&e===!0&&(t.current=ZS.slice())},[e,ZS,t]),Fx(()=>t.current.find(e=>e!=null&&e.isConnected)??null)}function vbe(e,{ownerDocument:t}){let n=!!(e&8),r=_be(n);E_e(()=>{n||lhe(t?.body)&&dS(r())},[n]),Iye(()=>{n&&dS(r())})}function ybe(e,{ownerDocument:t,container:n,initialFocus:r,initialFocusFallback:i}){let a=(0,z.useRef)(null),o=sS(!!(e&1),`focus-trap#initial-focus`),s=ube();return E_e(()=>{if(e===0)return;if(!o){i!=null&&i.current&&dS(i.current);return}let c=n.current;c&&uhe(()=>{if(!s.current)return;let n=t?.activeElement;if(r!=null&&r.current){if(r?.current===n){a.current=n;return}}else if(c.contains(n)){a.current=n;return}if(r!=null&&r.current)dS(r.current);else{if(e&16){if(fS(c,uS.First|uS.AutoFocus)!==Lge.Error)return}else if(fS(c,uS.First)!==Lge.Error)return;if(i!=null&&i.current&&(dS(i.current),t?.activeElement===i.current))return;console.warn(`There are no focusable elements inside the <FocusTrap />`)}a.current=t?.activeElement})},[i,o,e]),a}function bbe(e,{ownerDocument:t,container:n,containers:r,previousActiveElement:i}){let a=ube(),o=!!(e&4);a_e(t?.defaultView,`focus`,e=>{if(!o||!a.current)return;let t=fbe(r);Yx(n.current)&&t.add(n.current);let s=i.current;if(!s)return;let c=e.target;Yx(c)?xbe(t,c)?(i.current=c,dS(c)):(e.preventDefault(),e.stopPropagation(),dS(s)):dS(i.current)},!0)}function xbe(e,t){for(let n of e)if(n.contains(t))return!0;return!1}function Sbe(e){return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||!Kx(e.as??Dbe)||z.Children.count(e.children)===1}var iC=(0,z.createContext)(null);iC.displayName=`TransitionContext`;var Cbe=(e=>(e.Visible=`visible`,e.Hidden=`hidden`,e))(Cbe||{});function wbe(){let e=(0,z.useContext)(iC);if(e===null)throw Error(`A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.`);return e}function Tbe(){let e=(0,z.useContext)(aC);if(e===null)throw Error(`A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.`);return e}var aC=(0,z.createContext)(null);aC.displayName=`NestingContext`;function oC(e){return`children`in e?oC(e.children):e.current.filter(({el:e})=>e.current!==null).filter(({state:e})=>e===`visible`).length>0}function Ebe(e,t){let n=Px(e),r=(0,z.useRef)([]),i=ube(),a=Mx(),o=Fx((e,t=Bx.Hidden)=>{let o=r.current.findIndex(({el:t})=>t===e);o!==-1&&(Rx(t,{[Bx.Unmount](){r.current.splice(o,1)},[Bx.Hidden](){r.current[o].state=`hidden`}}),a.microTask(()=>{var e;!oC(r)&&i.current&&((e=n.current)==null||e.call(n))}))}),s=Fx(e=>{let t=r.current.find(({el:t})=>t===e);return t?t.state!==`visible`&&(t.state=`visible`):r.current.push({el:e,state:`visible`}),()=>o(e,Bx.Unmount)}),c=(0,z.useRef)([]),l=(0,z.useRef)(Promise.resolve()),u=(0,z.useRef)({enter:[],leave:[]}),d=Fx((e,n,r)=>{c.current.splice(0),t&&(t.chains.current[n]=t.chains.current[n].filter(([t])=>t!==e)),t?.chains.current[n].push([e,new Promise(e=>{c.current.push(e)})]),t?.chains.current[n].push([e,new Promise(e=>{Promise.all(u.current[n].map(([e,t])=>t)).then(()=>e())})]),n===`enter`?l.current=l.current.then(()=>t?.wait.current).then(()=>r(n)):r(n)}),f=Fx((e,t,n)=>{Promise.all(u.current[t].splice(0).map(([e,t])=>t)).then(()=>{var e;(e=c.current.shift())==null||e()}).then(()=>n(t))});return(0,z.useMemo)(()=>({children:r,register:s,unregister:o,onStart:d,onStop:f,wait:l,chains:u}),[s,o,r,d,f,u,l])}var Dbe=z.Fragment,Obe=zx.RenderStrategy;function kbe(e,t){var n;let{transition:r=!0,beforeEnter:i,afterEnter:a,beforeLeave:o,afterLeave:s,enter:c,enterFrom:l,enterTo:u,entered:d,leave:f,leaveFrom:p,leaveTo:m,...h}=e,[g,_]=(0,z.useState)(null),v=(0,z.useRef)(null),y=Sbe(e),b=Zx(...y?[v,t,_]:t===null?[]:[t]),x=(n=h.unmount)==null||n?Bx.Unmount:Bx.Hidden,{show:S,appear:C,initial:w}=wbe(),[T,E]=(0,z.useState)(S?`visible`:`hidden`),D=Tbe(),{register:O,unregister:k}=D;Nx(()=>O(v),[O,v]),Nx(()=>{if(x===Bx.Hidden&&v.current){if(S&&T!==`visible`){E(`visible`);return}return Rx(T,{hidden:()=>k(v),visible:()=>O(v)})}},[T,v,O,k,S,x]);let A=tC();Nx(()=>{if(y&&A&&T===`visible`&&v.current===null)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[v,T,A,y]);let j=w&&!C,M=C&&S&&w,N=(0,z.useRef)(!1),ee=Ebe(()=>{N.current||(E(`hidden`),k(v))},D),P=Fx(e=>{N.current=!0;let t=e?`enter`:`leave`;ee.onStart(v,t,e=>{e===`enter`?i?.():e===`leave`&&o?.()})}),te=Fx(e=>{let t=e?`enter`:`leave`;N.current=!1,ee.onStop(v,t,e=>{e===`enter`?a?.():e===`leave`&&s?.()}),t===`leave`&&!oC(ee)&&(E(`hidden`),k(v))});(0,z.useEffect)(()=>{y&&r||(P(S),te(S))},[S,y,r]);let[,F]=b_e(!(!r||!y||!A||j),g,S,{start:P,end:te}),ne=Gx({ref:b,className:hhe(h.className,M&&c,M&&l,F.enter&&c,F.enter&&F.closed&&l,F.enter&&!F.closed&&u,F.leave&&f,F.leave&&!F.closed&&p,F.leave&&F.closed&&m,!F.transition&&S&&d)?.trim()||void 0,...y_e(F)}),I=0;T===`visible`&&(I|=YS.Open),T===`hidden`&&(I|=YS.Closed),S&&T===`hidden`&&(I|=YS.Opening),!S&&T===`visible`&&(I|=YS.Closing);let re=Vx();return z.createElement(aC.Provider,{value:ee},z.createElement(Mye,{value:I},re({ourProps:ne,theirProps:h,defaultTag:Dbe,features:Obe,visible:T===`visible`,name:`Transition.Child`})))}function Abe(e,t){let{show:n,appear:r=!1,unmount:i=!0,...a}=e,o=(0,z.useRef)(null),s=Zx(...Sbe(e)?[o,t]:t===null?[]:[t]);tC();let c=XS();if(n===void 0&&c!==null&&(n=(c&YS.Open)===YS.Open),n===void 0)throw Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[l,u]=(0,z.useState)(n?`visible`:`hidden`),d=Ebe(()=>{n||u(`hidden`)}),[f,p]=(0,z.useState)(!0),m=(0,z.useRef)([n]);Nx(()=>{f!==!1&&m.current[m.current.length-1]!==n&&(m.current.push(n),p(!1))},[m,n]);let h=(0,z.useMemo)(()=>({show:n,appear:r,initial:f}),[n,r,f]);Nx(()=>{n?u(`visible`):!oC(d)&&o.current!==null&&u(`hidden`)},[n,d]);let g={unmount:i},_=Fx(()=>{var t;f&&p(!1),(t=e.beforeEnter)==null||t.call(e)}),v=Fx(()=>{var t;f&&p(!1),(t=e.beforeLeave)==null||t.call(e)}),y=Vx();return z.createElement(aC.Provider,{value:d},z.createElement(iC.Provider,{value:h},y({ourProps:{...g,as:z.Fragment,children:z.createElement(Nbe,{ref:s,...g,...a,beforeEnter:_,beforeLeave:v})},theirProps:{},defaultTag:z.Fragment,features:Obe,visible:l===`visible`,name:`Transition`})))}function jbe(e,t){let n=(0,z.useContext)(iC)!==null,r=XS()!==null;return z.createElement(z.Fragment,null,!n&&r?z.createElement(Mbe,{ref:t,...e}):z.createElement(Nbe,{ref:t,...e}))}var Mbe=Wx(Abe),Nbe=Wx(kbe),sC=Wx(jbe),cC=Object.assign(Mbe,{Child:sC,Root:Mbe}),Pbe=(e=>(e[e.Open=0]=`Open`,e[e.Closed=1]=`Closed`,e))(Pbe||{}),Fbe=(e=>(e[e.SetTitleId=0]=`SetTitleId`,e))(Fbe||{}),Ibe={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},Lbe=(0,z.createContext)(null);Lbe.displayName=`DialogContext`;function lC(e){let t=(0,z.useContext)(Lbe);if(t===null){let t=Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,lC),t}return t}function Rbe(e,t){return Rx(t.type,Ibe,e,t)}var zbe=Wx(function(e,t){let n=(0,z.useId)(),{id:r=`headlessui-dialog-${n}`,open:i,onClose:a,initialFocus:o,role:s=`dialog`,autoFocus:c=!0,__demoMode:l=!1,unmount:u=!1,...d}=e,f=(0,z.useRef)(!1);s=function(){return s===`dialog`||s===`alertdialog`?s:(f.current||(f.current=!0,console.warn(`Invalid role [${s}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),`dialog`)}();let p=XS();i===void 0&&p!==null&&(i=(p&YS.Open)===YS.Open);let m=(0,z.useRef)(null),h=Zx(m,t),g=mS(m.current),_=+!i,[v,y]=(0,z.useReducer)(Rbe,{titleId:null,descriptionId:null,panelRef:(0,z.createRef)()}),b=Fx(()=>a(!1)),x=Fx(e=>y({type:0,id:e})),S=tC()?_===0:!1,[C,w]=Jye(),T={get current(){return v.panelRef.current??m.current}},E=cbe(),{resolveContainers:D}=abe({mainTreeNode:E,portals:C,defaultContainers:[T]}),O=p!==null&&(p&YS.Closing)===YS.Closing;Pge(l||O?!1:S,{allowed:Fx(()=>[m.current?.closest(`[data-headlessui-portal]`)??null]),disallowed:Fx(()=>[E?.closest(`body > *:not(#headlessui-portal-root)`)??null])});let k=aS.get(null);Nx(()=>{if(S)return k.actions.push(r),()=>k.actions.pop(r)},[k,r,S]);let A=oS(k,(0,z.useCallback)(e=>k.selectors.isTop(e,r),[k,r]));e_e(A,D,e=>{e.preventDefault(),b()}),rbe(A,g?.defaultView,e=>{e.preventDefault(),e.stopPropagation(),document.activeElement&&`blur`in document.activeElement&&typeof document.activeElement.blur==`function`&&document.activeElement.blur(),b()}),m_e(l||O?!1:S,g,D),Fge(S,m,b);let[j,M]=Ghe(),N=(0,z.useMemo)(()=>[{dialogState:_,close:b,setTitleId:x,unmount:u},v],[_,b,x,u,v]),ee=Ix({open:_===0}),P={ref:h,id:r,role:s,tabIndex:-1,"aria-modal":l?void 0:_===0||void 0,"aria-labelledby":v.titleId,"aria-describedby":j,unmount:u},te=!ibe(),F=rC.None;S&&!l&&(F|=rC.RestoreFocus,F|=rC.TabLock,c&&(F|=rC.AutoFocus),te&&(F|=rC.InitialFocus));let ne=Vx();return z.createElement(Nye,null,z.createElement(zye,{force:!0},z.createElement(Zye,null,z.createElement(Lbe.Provider,{value:N},z.createElement(Xye,{target:m},z.createElement(zye,{force:!1},z.createElement(M,{slot:ee},z.createElement(w,null,z.createElement(gbe,{initialFocus:o,initialFocusFallback:m,containers:D,features:F},z.createElement(ige,{value:b},ne({ourProps:P,theirProps:d,slot:ee,defaultTag:Bbe,features:Vbe,visible:_===0,name:`Dialog`})))))))))))}),Bbe=`div`,Vbe=zx.RenderStrategy|zx.Static;function Hbe(e,t){let{transition:n=!1,open:r,...i}=e,a=XS(),o=e.hasOwnProperty(`open`)||a!==null,s=e.hasOwnProperty(`onClose`);if(!o&&!s)throw Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!o)throw Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!s)throw Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!a&&typeof e.open!=`boolean`)throw Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);if(typeof e.onClose!=`function`)throw Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${e.onClose}`);return(r!==void 0||n)&&!i.static?z.createElement(sbe,null,z.createElement(cC,{show:r,transition:n,unmount:i.unmount},z.createElement(zbe,{ref:t,...i}))):z.createElement(sbe,null,z.createElement(zbe,{ref:t,open:r,...i}))}var Ube=`div`;function Wbe(e,t){let n=(0,z.useId)(),{id:r=`headlessui-dialog-panel-${n}`,transition:i=!1,...a}=e,[{dialogState:o,unmount:s},c]=lC(`Dialog.Panel`),l=Zx(t,c.panelRef),u=Ix({open:o===0}),d={ref:l,id:r,onClick:Fx(e=>{e.stopPropagation()})},f=i?sC:z.Fragment,p=i?{unmount:s}:{},m=Vx();return z.createElement(f,{...p},m({ourProps:d,theirProps:a,slot:u,defaultTag:Ube,name:`Dialog.Panel`}))}var Gbe=`div`;function Kbe(e,t){let{transition:n=!1,...r}=e,[{dialogState:i,unmount:a}]=lC(`Dialog.Backdrop`),o=Ix({open:i===0}),s={ref:t,"aria-hidden":!0},c=n?sC:z.Fragment,l=n?{unmount:a}:{},u=Vx();return z.createElement(c,{...l},u({ourProps:s,theirProps:r,slot:o,defaultTag:Gbe,name:`Dialog.Backdrop`}))}var qbe=`h2`;function Jbe(e,t){let n=(0,z.useId)(),{id:r=`headlessui-dialog-title-${n}`,...i}=e,[{dialogState:a,setTitleId:o}]=lC(`Dialog.Title`),s=Zx(t);(0,z.useEffect)(()=>(o(r),()=>o(null)),[r,o]);let c=Ix({open:a===0}),l={ref:s,id:r};return Vx()({ourProps:l,theirProps:i,slot:c,defaultTag:qbe,name:`Dialog.Title`})}var Ybe=Wx(Hbe),Xbe=Wx(Wbe);Wx(Kbe);var Zbe=Wx(Jbe),uC=Object.assign(Ybe,{Panel:Xbe,Title:Zbe,Description:Yhe}),Qbe=`input`;function $be(e,t){let n=(0,z.useId)(),r=Ahe(),i=Lx(),{id:a=r||`headlessui-input-${n}`,disabled:o=i||!1,autoFocus:s=!1,invalid:c=!1,...l}=e,u=Zhe(),d=Whe(),{isFocused:f,focusProps:p}=Ox({autoFocus:s}),{isHovered:m,hoverProps:h}=Dx({isDisabled:o}),g=Ux({ref:t,id:a,"aria-labelledby":u,"aria-describedby":d,"aria-invalid":c?`true`:void 0,disabled:o||void 0,autoFocus:s},p,h),_=Ix({disabled:o,invalid:c,hover:m,focus:f,autofocus:s});return Vx()({ourProps:g,theirProps:l,slot:_,defaultTag:Qbe,name:`Input`})}var exe=Wx($be),txe=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function nxe(e){let t=e.innerText??``,n=e.cloneNode(!0);if(!Yx(n))return t;let r=!1;for(let e of n.querySelectorAll(`[hidden],[aria-hidden],[role="img"]`))e.remove(),r=!0;let i=r?n.innerText??``:t;return txe.test(i)&&(i=i.replace(txe,``)),i}function rxe(e){let t=e.getAttribute(`aria-label`);if(typeof t==`string`)return t.trim();let n=e.getAttribute(`aria-labelledby`);if(n){let e=n.split(` `).map(e=>{let t=document.getElementById(e);if(t){let e=t.getAttribute(`aria-label`);return typeof e==`string`?e.trim():nxe(t).trim()}return null}).filter(Boolean);if(e.length>0)return e.join(`, `)}return nxe(e).trim()}function ixe(e){let t=(0,z.useRef)(``),n=(0,z.useRef)(``);return Fx(()=>{let r=e.current;if(!r)return``;let i=r.innerText;if(t.current===i)return n.current;let a=rxe(r).trim().toLowerCase();return t.current=i,n.current=a,a})}var axe=Object.defineProperty,oxe=(e,t,n)=>t in e?axe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sxe=(e,t,n)=>(oxe(e,typeof t==`symbol`?t:t+``,n),n),dC=(e=>(e[e.Open=0]=`Open`,e[e.Closed=1]=`Closed`,e))(dC||{}),fC=(e=>(e[e.Pointer=0]=`Pointer`,e[e.Other=1]=`Other`,e))(fC||{}),pC=(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.RegisterItems=5]=`RegisterItems`,e[e.UnregisterItems=6]=`UnregisterItems`,e[e.SetButtonElement=7]=`SetButtonElement`,e[e.SetItemsElement=8]=`SetItemsElement`,e[e.SortItems=9]=`SortItems`,e[e.MarkButtonAsMoved=10]=`MarkButtonAsMoved`,e))(pC||{});function cxe(e,t=e=>e){let n=e.activeItemIndex===null?null:e.items[e.activeItemIndex],r=qge(t(e.items.slice()),e=>e.dataRef.current.domRef.current),i=n?r.indexOf(n):null;return i===-1&&(i=null),{items:r,activeItemIndex:i}}var lxe={1(e){if(e.menuState===1)return e;let t=e.buttonElement?eC.Tracked(Qye(e.buttonElement)):e.buttonPositionState;return{...e,activeItemIndex:null,pendingFocus:{focus:QS.Nothing},menuState:1,buttonPositionState:t}},0(e,t){return e.menuState===0?e:{...e,__demoMode:!1,pendingFocus:t.focus,menuState:0,buttonPositionState:eC.Idle}},2:(e,t)=>{if(e.menuState===1)return e;let n={...e,searchQuery:``,activationTrigger:t.trigger??1,__demoMode:!1};if(t.focus===QS.Nothing)return{...n,activeItemIndex:null};if(t.focus===QS.Specific)return{...n,activeItemIndex:e.items.findIndex(e=>e.id===t.id)};if(t.focus===QS.Previous){let r=e.activeItemIndex;if(r!==null){let i=e.items[r].dataRef.current.domRef,a=$S(t,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(a!==null){let t=e.items[a].dataRef.current.domRef;if(i.current?.previousElementSibling===t.current||t.current?.previousElementSibling===null)return{...n,activeItemIndex:a}}}}else if(t.focus===QS.Next){let r=e.activeItemIndex;if(r!==null){let i=e.items[r].dataRef.current.domRef,a=$S(t,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(a!==null){let t=e.items[a].dataRef.current.domRef;if(i.current?.nextElementSibling===t.current||t.current?.nextElementSibling===null)return{...n,activeItemIndex:a}}}}let r=cxe(e),i=$S(t,{resolveItems:()=>r.items,resolveActiveIndex:()=>r.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...n,...r,activeItemIndex:i}},3:(e,t)=>{let n=+(e.searchQuery===``),r=e.searchQuery+t.value.toLowerCase(),i=(e.activeItemIndex===null?e.items:e.items.slice(e.activeItemIndex+n).concat(e.items.slice(0,e.activeItemIndex+n))).find(e=>e.dataRef.current.textValue?.startsWith(r)&&!e.dataRef.current.disabled),a=i?e.items.indexOf(i):-1;return a===-1||a===e.activeItemIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeItemIndex:a,activationTrigger:1}},4(e){return e.searchQuery===``?e:{...e,searchQuery:``,searchActiveItemIndex:null}},5:(e,t)=>{let n=e.items.concat(t.items.map(e=>e)),r=e.activeItemIndex;return e.pendingFocus.focus!==QS.Nothing&&(r=$S(e.pendingFocus,{resolveItems:()=>n,resolveActiveIndex:()=>e.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled})),{...e,items:n,activeItemIndex:r,pendingFocus:{focus:QS.Nothing},pendingShouldSort:!0}},6:(e,t)=>{let n=e.items,r=[],i=new Set(t.items);for(let[e,t]of n.entries())if(i.has(t.id)&&(r.push(e),i.delete(t.id),i.size===0))break;if(r.length>0){n=n.slice();for(let e of r.reverse())n.splice(e,1)}return{...e,items:n,activationTrigger:1}},7:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},8:(e,t)=>e.itemsElement===t.element?e:{...e,itemsElement:t.element},9:e=>e.pendingShouldSort?{...e,...cxe(e),pendingShouldSort:!1}:e,10(e){return e.buttonPositionState.kind===`Tracked`?{...e,buttonPositionState:eC.Moved}:e}},uxe=class e extends gge{constructor(e){super(e),sxe(this,`actions`,{registerItem:bge(()=>{let e=[],t=new Set;return[(n,r)=>{t.has(r)||(t.add(r),e.push({id:n,dataRef:r}))},()=>(t.clear(),this.send({type:5,items:e.splice(0)}))]}),unregisterItem:bge(()=>{let e=[];return[t=>e.push(t),()=>this.send({type:6,items:e.splice(0)})]})}),sxe(this,`selectors`,{activeDescendantId(e){var t;let n=e.activeItemIndex,r=e.items;return n===null||(t=r[n])==null?void 0:t.id},isActive(e,t){let n=e.activeItemIndex,r=e.items;return n!==null&&r[n]?.id===t},shouldScrollIntoView(e,t){return e.__demoMode||e.menuState!==0||e.activationTrigger===0?!1:this.isActive(e,t)},didButtonMove(e){return e.buttonPositionState.kind===`Moved`}}),this.on(5,()=>{this.disposables.requestAnimationFrame(()=>{this.send({type:9})})});{let e=this.state.id,t=aS.get(null);this.disposables.add(t.on(wge.Push,n=>{!t.selectors.isTop(n,e)&&this.state.menuState===0&&this.send({type:1})})),this.on(0,()=>t.actions.push(e)),this.on(1,()=>t.actions.pop(e))}this.disposables.group(e=>{this.on(1,t=>{t.buttonElement&&(e.dispose(),e.add($ye(t.buttonElement,t.buttonPositionState,()=>{this.send({type:10})})))})})}static new({id:t,__demoMode:n=!1}){return new e({id:t,__demoMode:n,menuState:+!n,buttonElement:null,itemsElement:null,items:[],searchQuery:``,activeItemIndex:null,activationTrigger:1,pendingShouldSort:!1,pendingFocus:{focus:QS.Nothing},buttonPositionState:eC.Idle})}reduce(e,t){return Rx(t.type,lxe,e,t)}},dxe=(0,z.createContext)(null);function fxe(e){let t=(0,z.useContext)(dxe);if(t===null){let t=Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,pxe),t}return t}function pxe({id:e,__demoMode:t=!1}){let n=(0,z.useMemo)(()=>uxe.new({id:e,__demoMode:t}),[]);return Iye(()=>n.dispose()),n}var mxe=z.Fragment;function hxe(e,t){let n=(0,z.useId)(),{__demoMode:r=!1,...i}=e,a=pxe({id:n,__demoMode:r}),[o,s,c]=oS(a,e=>[e.menuState,e.itemsElement,e.buttonElement]),l=Zx(t),u=aS.get(null);e_e(oS(u,(0,z.useCallback)(e=>u.selectors.isTop(e,n),[u,n])),[c,s],(e,t)=>{var n;a.send({type:pC.CloseMenu}),Hge(t,Vge.Loose)||(e.preventDefault(),(n=a.state.buttonElement)==null||n.focus())});let d=Fx(()=>{a.send({type:pC.CloseMenu})}),f=Ix({open:o===dC.Open,close:d}),p={ref:l},m=Vx();return z.createElement(Eye,null,z.createElement(dxe.Provider,{value:a},z.createElement(Mye,{value:Rx(o,{[dC.Open]:YS.Open,[dC.Closed]:YS.Closed})},m({ourProps:p,theirProps:i,slot:f,defaultTag:mxe,name:`Menu`}))))}var gxe=`button`;function _xe(e,t){let n=fxe(`Menu.Button`),r=(0,z.useId)(),{id:i=`headlessui-menu-button-${r}`,disabled:a=!1,autoFocus:o=!1,...s}=e,c=(0,z.useRef)(null),l=Sye(),u=Zx(t,c,xye(),Fx(e=>n.send({type:pC.SetButtonElement,element:e}))),d=Fx(e=>{switch(e.key){case $x.Space:case $x.Enter:case $x.ArrowDown:e.preventDefault(),e.stopPropagation(),n.send({type:pC.OpenMenu,focus:{focus:QS.First}});break;case $x.ArrowUp:e.preventDefault(),e.stopPropagation(),n.send({type:pC.OpenMenu,focus:{focus:QS.Last}})}}),f=Fx(e=>{switch(e.key){case $x.Space:e.preventDefault()}}),[p,m,h]=oS(n,e=>[e.menuState,e.buttonElement,e.itemsElement]);i_e(p===dC.Open,{trigger:m,action:(0,z.useCallback)(e=>{if(m!=null&&m.contains(e.target))return hS.Ignore;let t=e.target.closest(`[role="menuitem"]:not([data-disabled])`);return Yx(t)?hS.Select(t):h!=null&&h.contains(e.target)?hS.Ignore:hS.Close},[m,h]),close:(0,z.useCallback)(()=>n.send({type:pC.CloseMenu}),[]),select:(0,z.useCallback)(e=>e.click(),[])});let g=cge(e=>{var t;a||(p===dC.Open?((0,yu.flushSync)(()=>n.send({type:pC.CloseMenu})),(t=c.current)==null||t.focus({preventScroll:!0})):(e.preventDefault(),n.send({type:pC.OpenMenu,focus:{focus:QS.Nothing},trigger:fC.Pointer})))}),{isFocusVisible:_,focusProps:v}=Ox({autoFocus:o}),{isHovered:y,hoverProps:b}=Dx({isDisabled:a}),{pressed:x,pressProps:S}=phe({disabled:a}),C=Ix({open:p===dC.Open,active:x||p===dC.Open,disabled:a,hover:y,focus:_,autofocus:o}),w=Ux(l(),{ref:u,id:i,type:o_e(e,c.current),"aria-haspopup":`menu`,"aria-controls":h?.id,"aria-expanded":p===dC.Open,disabled:a||void 0,autoFocus:o,onKeyDown:d,onKeyUp:f},g,v,b,S);return Vx()({ourProps:w,theirProps:s,slot:C,defaultTag:gxe,name:`Menu.Button`})}var vxe=`div`,yxe=zx.RenderStrategy|zx.Static;function bxe(e,t){let n=(0,z.useId)(),{id:r=`headlessui-menu-items-${n}`,anchor:i,portal:a=!1,modal:o=!0,transition:s=!1,...c}=e,l=bye(i),u=fxe(`Menu.Items`),[d,f]=wye(l),p=Cye(),[m,h]=(0,z.useState)(null),g=Zx(t,l?d:null,Fx(e=>u.send({type:pC.SetItemsElement,element:e})),h),[_,v]=oS(u,e=>[e.menuState,e.buttonElement]),y=mS(v),b=mS(m);l&&(a=!0);let x=XS(),[S,C]=b_e(s,m,x===null?_===dC.Open:(x&YS.Open)===YS.Open);Fge(S,v,()=>{u.send({type:pC.CloseMenu})});let w=oS(u,e=>e.__demoMode);m_e(!w&&o&&_===dC.Open,b),Pge(!w&&o&&_===dC.Open,{allowed:(0,z.useCallback)(()=>[v,m],[v,m])});let T=!oS(u,u.selectors.didButtonMove)&&S;(0,z.useEffect)(()=>{let e=m;e&&_===dC.Open&&(lhe(e)||e.focus({preventScroll:!0}))},[_,m]),T_e(_===dC.Open,{container:m,accept(e){return e.getAttribute(`role`)===`menuitem`?NodeFilter.FILTER_REJECT:e.hasAttribute(`role`)?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(e){e.setAttribute(`role`,`none`)}});let E=Mx(),D=Fx(e=>{var t,n;switch(E.dispose(),e.key){case $x.Space:if(u.state.searchQuery!==``)return e.preventDefault(),e.stopPropagation(),u.send({type:pC.Search,value:e.key});case $x.Enter:if(e.preventDefault(),e.stopPropagation(),u.state.activeItemIndex!==null){let{dataRef:e}=u.state.items[u.state.activeItemIndex];(t=e.current?.domRef.current)==null||t.click()}u.send({type:pC.CloseMenu}),Uge(u.state.buttonElement);break;case $x.ArrowDown:return e.preventDefault(),e.stopPropagation(),u.send({type:pC.GoToItem,focus:QS.Next});case $x.ArrowUp:return e.preventDefault(),e.stopPropagation(),u.send({type:pC.GoToItem,focus:QS.Previous});case $x.Home:case $x.PageUp:return e.preventDefault(),e.stopPropagation(),u.send({type:pC.GoToItem,focus:QS.First});case $x.End:case $x.PageDown:return e.preventDefault(),e.stopPropagation(),u.send({type:pC.GoToItem,focus:QS.Last});case $x.Escape:e.preventDefault(),e.stopPropagation(),(0,yu.flushSync)(()=>u.send({type:pC.CloseMenu})),(n=u.state.buttonElement)==null||n.focus({preventScroll:!0});break;case $x.Tab:e.preventDefault(),e.stopPropagation(),(0,yu.flushSync)(()=>u.send({type:pC.CloseMenu})),Jge(u.state.buttonElement,e.shiftKey?uS.Previous:uS.Next);break;default:e.key.length===1&&(u.send({type:pC.Search,value:e.key}),E.setTimeout(()=>u.send({type:pC.ClearSearch}),350))}}),O=Fx(e=>{switch(e.key){case $x.Space:e.preventDefault()}}),k=Ix({open:_===dC.Open}),A=Ux(l?p():{},{"aria-activedescendant":oS(u,u.selectors.activeDescendantId),"aria-labelledby":oS(u,e=>e.buttonElement?.id),id:r,onKeyDown:D,onKeyUp:O,role:`menu`,tabIndex:_===dC.Open?0:void 0,ref:g,style:{...c.style,...f,"--button-width":oge(S,v,!0).width},...y_e(C)}),j=Vx();return z.createElement(Zye,{enabled:a?e.static||S:!1,ownerDocument:y},j({ourProps:A,theirProps:c,slot:k,defaultTag:vxe,features:yxe,visible:T,name:`Menu.Items`}))}var xxe=z.Fragment;function Sxe(e,t){let n=(0,z.useId)(),{id:r=`headlessui-menu-item-${n}`,disabled:i=!1,...a}=e,o=fxe(`Menu.Item`),s=oS(o,e=>o.selectors.isActive(e,r)),c=(0,z.useRef)(null),l=Zx(t,c),u=oS(o,e=>o.selectors.shouldScrollIntoView(e,r));Nx(()=>{if(u)return jx().requestAnimationFrame(()=>{var e,t;(t=(e=c.current)?.scrollIntoView)==null||t.call(e,{block:`nearest`})})},[u,c]);let d=ixe(c),f=(0,z.useRef)({disabled:i,domRef:c,get textValue(){return d()}});Nx(()=>{f.current.disabled=i},[f,i]),Nx(()=>(o.actions.registerItem(r,f),()=>o.actions.unregisterItem(r)),[f,r]);let p=Fx(()=>{o.send({type:pC.CloseMenu})}),m=Fx(e=>{if(i)return e.preventDefault();o.send({type:pC.CloseMenu}),Uge(o.state.buttonElement)}),h=Fx(()=>{if(i)return o.send({type:pC.GoToItem,focus:QS.Nothing});o.send({type:pC.GoToItem,focus:QS.Specific,id:r})}),g=g_e(),_=Fx(e=>g.update(e)),v=Fx(e=>{g.wasMoved(e)&&(i||s||o.send({type:pC.GoToItem,focus:QS.Specific,id:r,trigger:fC.Pointer}))}),y=Fx(e=>{g.wasMoved(e)&&(i||s&&o.state.activationTrigger===fC.Pointer&&o.send({type:pC.GoToItem,focus:QS.Nothing}))}),[b,x]=Qhe(),[S,C]=Ghe(),w=Ix({active:s,focus:s,disabled:i,close:p}),T={id:r,ref:l,role:`menuitem`,tabIndex:i===!0?void 0:-1,"aria-disabled":i===!0||void 0,"aria-labelledby":b,"aria-describedby":S,disabled:void 0,onClick:m,onFocus:h,onPointerEnter:_,onMouseEnter:_,onPointerMove:v,onMouseMove:v,onPointerLeave:y,onMouseLeave:y},E=Vx();return z.createElement(x,null,z.createElement(C,null,E({ourProps:T,theirProps:a,slot:w,defaultTag:xxe,name:`Menu.Item`})))}var Cxe=`div`;function wxe(e,t){let[n,r]=Qhe(),i=e,a={ref:t,"aria-labelledby":n,role:`group`},o=Vx();return z.createElement(r,null,o({ourProps:a,theirProps:i,slot:{},defaultTag:Cxe,name:`Menu.Section`}))}var Txe=`header`;function Exe(e,t){let n=(0,z.useId)(),{id:r=`headlessui-menu-heading-${n}`,...i}=e,a=Xhe();Nx(()=>a.register(r),[r,a.register]);let o={id:r,ref:t,role:`presentation`,...a.props};return Vx()({ourProps:o,theirProps:i,slot:{},defaultTag:Txe,name:`Menu.Heading`})}var Dxe=`div`;function Oxe(e,t){let n=e,r={ref:t,role:`separator`};return Vx()({ourProps:r,theirProps:n,slot:{},defaultTag:Dxe,name:`Menu.Separator`})}var kxe=Wx(hxe),Axe=Wx(_xe),jxe=Wx(bxe),Mxe=Wx(Sxe),Nxe=Wx(wxe),Pxe=Wx(Exe),Fxe=Wx(Oxe),Ixe=Object.assign(kxe,{Button:Axe,Items:jxe,Item:Mxe,Section:Nxe,Heading:Pxe,Separator:Fxe}),Lxe=`select`;function Rxe(e,t){let n=(0,z.useId)(),r=Ahe(),i=Lx(),{id:a=r||`headlessui-select-${n}`,disabled:o=i||!1,invalid:s=!1,autoFocus:c=!1,...l}=e,u=Zhe(),d=Whe(),{isFocusVisible:f,focusProps:p}=Ox({autoFocus:c}),{isHovered:m,hoverProps:h}=Dx({isDisabled:o}),{pressed:g,pressProps:_}=phe({disabled:o}),v=Ux({ref:t,id:a,"aria-labelledby":u,"aria-describedby":d,"aria-invalid":s?`true`:void 0,disabled:o||void 0,autoFocus:c},p,h,_),y=Ix({disabled:o,invalid:s,hover:m,focus:f,active:g,autofocus:c});return Vx()({ourProps:v,theirProps:l,slot:y,defaultTag:Lxe,name:`Select`})}var zxe=Wx(Rxe),Bxe,mC,hC=o((()=>{Bxe=u(m(),1),mC=(0,Bxe.createContext)({color:`currentColor`,size:`1em`,weight:`regular`,mirrored:!1})})),Vxe=u(dme(),1);hC();var Hxe=z.createContext((0,z.forwardRef)(function(e,t){return(0,q.jsx)(`a`,{...e,ref:t})})),gC=()=>z.useContext(Hxe),Uxe=({linkComponent:e,children:t})=>(0,q.jsx)(Hxe.Provider,{value:e,children:t}),_C=function({to:e,href:t,...n}){let r=!!t||typeof e==`string`&&e?.startsWith(`http://`)||typeof e==`string`&&e?.startsWith(`https://`),i=gC();return(0,q.jsx)(nbe,{children:(0,q.jsx)(i,{to:e,href:t,isExternal:r,...n})})},vC={base:[`relative isolate inline-flex items-center justify-center gap-x-2 rounded-xl border text-base font-semibold`,`px-4 py-2`,`focus:outline-none data-[focus]:outline data-[focus]:outline-2 data-[focus]:outline-offset-2 data-[focus]:outline-blue-500`,`data-[disabled]:opacity-50`,`transition-[color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,filter,backdrop-filter] duration-150 ease-in-out after:transition before:transition`,`lg:active:hover:scale-95 lg:active:hover:before:opacity-50`],modes:{solid:[`border-transparent`,`dark:bg-[--btn-bg]`,`bg-[--btn-bg]`,`before:absolute before:inset-0 before:-z-10 before:rounded-[calc(theme(borderRadius.xl)-1px)]`,`dark:before:hidden`,`dark:border-white/5`,`after:absolute after:inset-0 after:-z-10 after:rounded-[calc(theme(borderRadius.xl)-1px)]`,`after:shadow-[shadow:inset_0_1px_theme(colors.white/15%)]`,`dark:after:shadow-none`,`after:data-[active]:bg-[--btn-hover-overlay] after:data-[hover]:bg-[--btn-hover-overlay]`,`dark:after:-inset-px dark:after:rounded-xl`,`before:data-[disabled]:shadow-none after:data-[disabled]:shadow-none`],ghost:[`border-transparent`,`hover:dark:bg-[--btn-bg]`,`hover:bg-[--btn-bg]`,`before:absolute before:inset-0 before:-z-10 before:rounded-[calc(theme(borderRadius.xl)-1px)]`,`dark:before:hidden`,`hover:dark:border-white/5`,`after:absolute after:inset-0 after:-z-10 after:rounded-[calc(theme(borderRadius.xl)-1px)]`,`hover:after:shadow-[shadow:inset_0_1px_theme(colors.white/15%)]`,`after:data-[active]:bg-[--btn-hover-overlay] after:data-[hover]:bg-[--btn-hover-overlay]`,`dark:after:-inset-px dark:after:rounded-xl`,`before:data-[disabled]:shadow-none after:data-[disabled]:shadow-none`,`before:shadow-none`]},circular:[`!rounded-full !aspect-square !p-2`,`before:!rounded-full after:!rounded-full dark:after:!rounded-full`],pill:[`!rounded-full`,`before:!rounded-full after:!rounded-full dark:after:!rounded-full`],nowrap:`whitespace-nowrap`,wrap:`whitespace-normal text-center`,small:[`!rounded-md !text-sm !px-1.5 !py-1`,`before:!rounded-md after:!rounded-md dark:after:!rounded-md`],surfaces:{system:[`text-fg-primary dark:text-fg-primary-dark`,`[--btn-bg:theme(colors.system.regular)] [--btn-hover-overlay:theme(colors.white/20%)]`,`dark:[--btn-bg:theme(colors.system.regular-dark)] dark:[--btn-hover-overlay:theme(colors.white/10%)]`,`[--icon-color:theme(colors.fg.secondary)] dark:[--icon-color:theme(colors.fg.secondary-dark)]`,`backdrop-blur-lg`,`hover:before:shadow-lg`],material:[`text-fg-primary dark:text-fg-primary-dark`,`[--btn-bg:theme(colors.material.regular)] [--btn-hover-overlay:theme(colors.white/20%)]`,`dark:[--btn-bg:theme(colors.material.regular-dark)] dark:[--btn-hover-overlay:theme(colors.white/10%)]`,`[--icon-color:theme(colors.fg.secondary)] dark:[--icon-color:theme(colors.fg.secondary-dark)]`,`backdrop-blur-lg`,`hover:before:shadow-lg`],chrome:[`text-fg-primary dark:text-fg-primary-dark`,`[--btn-bg:theme(colors.system.chrome)]`,`dark:[--btn-bg:theme(colors.system.chrome-dark)] dark:[--btn-hover-overlay:theme(colors.white/5%)]`,`[--icon-color:theme(colors.fg.primary)] dark:[--icon-color:theme(colors.fg.primary-dark)]`,`before:shadow hover:before:shadow-lg`],solid:[`text-fg-primary-dark [--btn-bg:theme(colors.action)] [--btn-hover-overlay:theme(colors.white/15%)]`,`dark:text-fg-primary-dark dark:[--btn-bg:theme(colors.action)] dark:[--btn-hover-overlay:theme(colors.white/15%)]`,`[--icon-color:theme(colors.fg.primary-dark)] dark:[--icon-color:theme(colors.fg.primary-dark)]`,`before:shadow hover:before:shadow-lg`],tinted:[`text-action [--btn-bg:theme(colors.action/20%)] [--btn-hover-overlay:theme(colors.white/15%)]`,`dark:text-action dark:[--btn-bg:theme(colors.action/20%)] dark:[--btn-hover-overlay:theme(colors.white/10%)]`,`[--icon-color:theme(colors.action)] dark:[--icon-color:theme(colors.action)]`,`backdrop-blur-lg`],ghost:[`text-fg-primary dark:text-fg-primary-dark`,`[--btn-bg:transparent]`,`dark:[--btn-bg:transparent]`,`[--icon-color:theme(colors.fg.primary)] dark:[--icon-color:theme(colors.fg.primary-dark)]`,`dark:border-none`,`!px-0`]}},Wxe={color:`var(--icon-color)`,weight:`bold`,size:`1.25rem`},yC=(0,z.forwardRef)(function({surface:e=`system`,mode:t=`solid`,small:n=!1,circular:r=!1,pill:i=!1,wrap:a=!1,children:o,className:s,iconProps:c={},...l},u){let d=yx(s,vC.base,vC.modes[t],vC.surfaces[e],a?vC.wrap:vC.nowrap,n&&vC.small,i&&vC.pill,r&&vC.circular),f={...Wxe,...c},p=`href`in l&&l.href!=null||`to`in l&&l.to!=null,m=gC();return p?(0,q.jsx)(m,{...l,className:d,ref:u,children:(0,q.jsx)(mC.Provider,{value:f,children:(0,q.jsx)(bC,{children:o})})}):(0,q.jsx)(The,{...l,className:yx(d,`cursor-pointer data-[disabled]:cursor-not-allowed`),ref:u,children:(0,q.jsx)(mC.Provider,{value:f,children:(0,q.jsx)(bC,{children:o})})})});function bC({children:e}){return(0,q.jsxs)(q.Fragment,{children:[e,(0,q.jsx)(`span`,{className:`absolute left-1/2 top-1/2 size-[max(100%,2.75rem)] -translate-x-1/2 -translate-y-1/2 [@media(pointer:fine)]:hidden`,"aria-hidden":`true`})]})}var xC=({src:e=null,square:t=!1,initials:n,alt:r=``,className:i,noBorder:a=!1,children:o,...s})=>{let c=n?(e=>{if(!e)return;let t=0;return e.split(``).forEach(e=>{t=e.charCodeAt(0)+((t<<5)-t)}),`hsl(${t%360}, 40%, 60%)`})(n):void 0;return(0,q.jsxs)(`span`,{"data-slot":`avatar`,...s,className:yx(i,`inline-grid shrink-0 align-middle [--avatar-radius:20%] [--ring-opacity:20%] *:col-start-1 *:row-start-1`,!a&&`bg-gray-100/50 dark:bg-material-thin-dark backdrop-blur-md border-2 border-system-chrome dark:border-system-chrome-dark`,t?`rounded-[--avatar-radius] *:rounded-[--avatar-radius]`:`rounded-full *:rounded-full`),children:[e?(0,q.jsx)(`img`,{src:e,alt:r,className:`object-cover object-center aspect-square`}):n?(0,q.jsxs)(`svg`,{className:`select-none fill-current w-full h-full font-medium uppercase`,style:{backgroundColor:(0,Vxe.default)(c).alpha(.7).toString(),color:(0,Vxe.default)(c).darken(.6).toString(),fontSize:`400%`},viewBox:`0 0 100 100`,"aria-hidden":r?void 0:`true`,children:[r?(0,q.jsx)(`title`,{children:r}):null,(0,q.jsx)(`text`,{x:`50%`,y:`50%`,alignmentBaseline:`middle`,dominantBaseline:`middle`,textAnchor:`middle`,dy:`.125em`,children:n})]}):null,o]})},Gxe=`[&[data-focus]]:!outline-none [&[data-focus]]:!outline-0 [&[data-focus]]:!outline-offset-0 data-[focus]:ring-2 data-[focus]:ring-offset-2 data-[focus]:ring-offset-system-screen dark:data-[focus]:ring-offset-system-screen-dark data-[focus]:ring-action`;(0,z.forwardRef)(function({src:e,square:t=!1,initials:n,alt:r,className:i,avatarClassName:a,noBorder:o,children:s,surface:c=`system`,mode:l=`ghost`,small:u=!1,circular:d=!0,pill:f=!1,...p},m){return(0,q.jsx)(yC,{...p,surface:c,mode:l,small:u,circular:d,pill:f,className:yx(Gxe,i),ref:m,children:(0,q.jsx)(xC,{src:e,square:t,initials:n,alt:r,noBorder:o,className:yx(a,`border-none`),children:s})})}),hC();var Kxe={color:`var(--icon-color)`,weight:`fill`,size:`16px`},qxe=(0,z.forwardRef)(function({className:e,direction:t=`cols`,...n},r){return(0,q.jsx)(mC.Provider,{value:Kxe,children:(0,q.jsx)(`div`,{ref:r,className:yx(e,`[--anchor-gap:theme(spacing.2)] [--anchor-padding:theme(spacing.3)] data-[anchor~=end]:[--anchor-offset:4px] data-[anchor~=start]:[--anchor-offset:-4px]`,`origin-top-left isolate rounded-lg`,`outline outline-1 outline-transparent focus:outline-none`,`overflow-y-auto`,`bg-material-chrome backdrop-blur-xl dark:bg-material-regular-dark`,`shadow-lg ring-1 ring-system-thick dark:ring-inset dark:ring-system-thick-dark`,`supports-[grid-template-columns:subgrid]:grid`,t===`cols`?`supports-[grid-template-columns:subgrid]:grid-cols-[auto_auto_auto]`:`supports-[grid-template-columns:subgrid]:grid-rows-[auto_auto_auto]`,`transition-opacity data-[closed]:data-[leave]:opacity-0 data-[leave]:duration-100 data-[leave]:ease-in`),...n})})}),Jxe=(0,z.forwardRef)(function({active:e,className:t,href:n,to:r,...i},a){let o=yx(t,`group cursor-pointer inline-flex rounded-md px-3 py-2 focus:outline-none sm:px-3 sm:py-1.5`,`text-left text-base/6 text-fg-primary sm:text-sm/6 dark:text-fg-primary-dark forced-colors:text-[CanvasText]`,`data-[focus]:bg-system-thin dark:data-[focus]:bg-system-thin-dark`,`focus:bg-system-thin dark:focus:bg-system-thin-dark`,`hover:bg-system-thin dark:hover:bg-system-thin-dark`,`data-[disabled]:opacity-50`,`disabled:opacity-50`,`forced-color-adjust-none forced-colors:focus:bg-[Highlight] forced-colors:focus:text-[HighlightText] forced-colors:[&>[data-slot=icon]]:focus:text-[HighlightText]`,`forced-colors:data-[focus]:bg-[Highlight] forced-colors:data-[focus]:text-[HighlightText] forced-colors:[&>[data-slot=icon]]:data-[focus]:text-[HighlightText]`,`col-span-full grid grid-cols-[auto_auto_auto] items-center supports-[grid-template-columns:subgrid]:grid-cols-subgrid`,`[--icon-color:theme(colors.fg.secondary)] dark:[--icon-color:theme(colors.fg.secondary-dark)]`,`gap-x-1`,e?`bg-system-thin dark:bg-system-thin-dark`:null),s=gC();return n||r?(0,q.jsx)(s,{...i,href:n,to:r,className:o,ref:a}):(0,q.jsx)(`button`,{...i,type:`button`,className:o,ref:a})});hC();var Yxe={color:`var(--icon-color)`,weight:`fill`,size:`16px`};function Xxe(e){let{as:t=`div`,...n}=e;return(0,q.jsx)(Ixe,{as:t,...n})}function Zxe(e){let{className:t,...n}=e;return(0,q.jsx)(Axe,{as:yC,...n,className:yx(`lg:active:hover:!scale-100`,t)})}function Qxe(e,t){let n=e?.split(/\s+/).some(e=>/^!?w-/.test(e));return yx(e,!n&&t)}function $xe({anchor:e=`bottom`,className:t,portal:n=!0,...r}){return(0,q.jsx)(jxe,{transition:!0,...r,anchor:n?e:void 0,as:qxe,className:e=>Qxe(typeof t==`function`?t(e):t,`w-max`)})}function SC(e){return(0,q.jsx)(mC.Provider,{value:Yxe,children:(0,q.jsx)(Mxe,{as:Jxe,...e})})}function eSe({className:e,...t}){return(0,q.jsx)(Fxe,{...t,className:yx(e,`col-span-full mx-3.5 my-1 h-px border-0 bg-zinc-950/5 sm:mx-3 dark:bg-white/10 forced-colors:bg-[CanvasText]`)})}function CC({className:e,...t}){return(0,q.jsx)(nge,{...t,"data-slot":`label`,className:yx(e,`col-start-2 row-start-1`),...t})}var wC={card:[`flex flex-col group`,`relative`,`rounded-card-lg`,`shadow-lg`,`dark:border-white/5 dark:border`],childRadius:[`[&>:first-child]:rounded-t-card-lg [&>:last-child]:rounded-b-card-lg`,`[&>:first-child]:before:rounded-t-card-lg [&>:first-child]:after:rounded-t-card-lg`,`[&>:last-child]:before:rounded-b-card-lg [&>:last-child]:after:rounded-b-card-lg`],backgroundColor:[`bg-system-chrome dark:bg-system-chrome-dark`],interactive:[`transition-all`,`hover:-translate-y-0.5 active:hover:scale-[98%] hover:shadow-xl`,`group-hover:-translate-y-0.5 group-hover:shadow-xl group-active:hover:scale-[98%]`],cardNonResponsive:[`[&>*]:min-w-full`],responsive:[`md:flex-row`],responsiveChildRadius:[`md:[&>:first-child]:rounded-none md:[&>:last-child]:rounded-none`,`md:[&>:first-child]:before:rounded-none md:[&>:first-child]:after:rounded-none`,`md:[&>:last-child]:before:rounded-none md:[&>:last-child]:after:rounded-none`,`md:[&>:first-child]:rounded-l-card-lg md:[&>:last-child]:rounded-r-card-lg`,`md:[&>:first-child]:before:rounded-l-card-lg md:[&>:first-child]:after:rounded-l-card-lg`,`md:[&>:last-child]:before:rounded-r-card-lg md:[&>:last-child]:after:rounded-r-card-lg`],cardContent:[`p-4 relative z-0`,`content-center`,`before:z-[-1] before:bg-bottom before:bg-cover before:bg-no-repeat before:[background-image:var(--blurBackground)] before:absolute before`,`after:z-[-1] after:backdrop-blur-xl after:bg-material-screen dark:after:bg-material-regular-dark after:absolute after`,`after:transition-colors group-hover:after:bg-material-chrome dark:group-hover:after:bg-material-chrome-dark`],cardImage:[`overflow-hidden w-full object-cover`]},TC=({as:e,interactive:t=!1,responsive:n=!1,backgroundColor:r=``,childRadius:i=!0,className:a,...o})=>(0,q.jsx)(e||`div`,{...o,className:yx(wC.card,i&&wC.childRadius,r||wC.backgroundColor,t?wC.interactive:null,n?wC.responsive:wC.cardNonResponsive,n&&i?wC.responsiveChildRadius:null,a)}),EC=({as:e,className:t,blurBackground:n,...r})=>(0,q.jsx)(e||`div`,{...r,style:n?{"--blurBackground":`url(${n})`}:r.style,className:yx(t,wC.cardContent,!n&&`after:hidden`)}),DC=({as:e,className:t,...n})=>(0,q.jsx)(e||`img`,{...n,className:yx(t,wC.cardImage)}),tSe={inherited:[`[&_a]:text-action [&_a]:underline [&_a]:decoration-action/50 [&_a:hover]:decoration-action/100`],as:{p:[`text-base/relaxed`],h1:[`text-4xl/normal font-bold font-heading leading-tight`],h2:[`text-2xl/normal font-semibold font-heading`],h3:[`text-xl/snug font-semibold font-heading`],h4:[`text-lg/tight font-medium font-heading`],h5:[`text-base/tight font-medium font-heading`],small:[`text-xs/tight`]}},nSe={section:[`text-2xl min-[560px]:text-[2.75rem] xl:text-5xl font-bold font-heading leading-tight`],hero:[`text-xl lg:text-5xl font-bold font-heading leading-tight`],card:[`text-base min-[560px]:text-lg xl:text-xl font-semibold font-heading leading-snug`]},rSe=`p`;function OC({className:e,as:t,fg:n=`primary`,size:r,...i}){let a=t??rSe,o;switch(n){case`secondary`:o=`text-fg-secondary dark:text-fg-secondary-dark`;break;case`tertiary`:o=`text-fg-tertiary dark:text-fg-tertiary-dark`;break;case`quaternary`:o=`text-fg-quaternary dark:text-fg-quaternary-dark`;break;default:o=`text-fg-primary dark:text-fg-primary-dark`}return(0,q.jsx)(a,{...i,"data-slot":`text`,className:yx(e,r?nSe[r]:tSe.as[t]??tSe.as.p,tSe.inherited,o)})}var iSe={xs:`sm:max-w-xs`,sm:`sm:max-w-sm`,md:`sm:max-w-md`,lg:`sm:max-w-lg`,xl:`sm:max-w-xl`,"2xl":`sm:max-w-2xl`,"3xl":`sm:max-w-3xl`,"4xl":`sm:max-w-4xl`,"5xl":`sm:max-w-5xl`};function aSe({open:e,onClose:t,size:n=`lg`,className:r,children:i,style:a,...o}){let s=(0,z.useRef)(null);return(0,z.useEffect)(()=>{e&&s.current&&(s.current.scrollTop=0)},[e]),(0,q.jsx)(cC,{appear:!0,show:e,...o,children:(0,q.jsxs)(uC,{onClose:t,children:[(0,q.jsx)(sC,{enter:`ease-out duration-100`,enterFrom:`opacity-0`,enterTo:`opacity-100`,leave:`ease-in duration-100`,leaveFrom:`opacity-100`,leaveTo:`opacity-0`,children:(0,q.jsx)(`div`,{className:`z-[10000] fixed inset-0 flex w-screen justify-center overflow-y-auto bg-material-regular px-2 py-2 focus:outline-0 sm:px-6 sm:py-8 lg:px-8 lg:py-16 dark:bg-material-regular-dark`})}),(0,q.jsx)(`div`,{ref:s,className:yx(`z-[10000] fixed inset-0 w-screen overflow-y-auto pt-6 sm:pt-0`),children:(0,q.jsx)(`div`,{className:`grid min-h-full grid-rows-[1fr_auto] justify-items-center sm:grid-rows-[1fr_auto_3fr] sm:p-4`,children:(0,q.jsx)(sC,{enter:`ease-out duration-100`,enterFrom:`opacity-0 translate-y-12 sm:translate-y-0 sm:scale-95`,enterTo:`opacity-100 translate-y-0 sm:scale-100`,leave:`ease-in duration-100`,leaveFrom:`opacity-100 translate-y-0`,leaveTo:`opacity-0 translate-y-12 sm:translate-y-0`,children:(0,q.jsx)(Xbe,{style:a,className:yx(r,iSe[n],`row-start-2 w-full min-w-0 rounded-t-3xl bg-system-chrome p-[--gutter] shadow-lg [--gutter:theme(spacing.8)] sm:mb-auto sm:rounded-2xl dark:bg-system-chrome-dark dark:ring-1 dark:ring-white/10 forced-colors:outline`),children:i})})})})]})})}function oSe({className:e,...t}){return(0,q.jsx)(Zbe,{...t,className:yx(e,`text-balance text-lg/6 font-semibold text-fg-primary sm:text-base/6 dark:text-fg-primary-dark`)})}var kC,J,Y=o((()=>{kC=u(m(),1),hC(),J=kC.forwardRef((e,t)=>{let{alt:n,color:r,size:i,weight:a,mirrored:o,children:s,weights:c,...l}=e,{color:u=`currentColor`,size:d,weight:f=`regular`,mirrored:p=!1,...m}=kC.useContext(mC);return kC.createElement(`svg`,{ref:t,xmlns:`http://www.w3.org/2000/svg`,width:i??d,height:i??d,fill:r??u,viewBox:`0 0 256 256`,transform:o||p?`scale(-1, 1)`:void 0,...m,...l},!!n&&kC.createElement(`title`,null,n),s,c.get(a??f))}),J.displayName=`IconBase`})),AC,sSe,cSe=o((()=>{AC=u(m(),1),sSe=new Map([[`bold`,AC.createElement(AC.Fragment,null,AC.createElement(`path`,{d:`M216.49,56.48,177,96h19a12,12,0,0,1,0,24H148a12,12,0,0,1-12-12V60a12,12,0,0,1,24,0V79l39.51-39.52a12,12,0,0,1,17,17ZM108,136H60a12,12,0,0,0,0,24H79L39.51,199.51a12,12,0,0,0,17,17L96,177v19a12,12,0,0,0,24,0V148A12,12,0,0,0,108,136Z`}))],[`duotone`,AC.createElement(AC.Fragment,null,AC.createElement(`path`,{d:`M224,48V208a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32H208A16,16,0,0,1,224,48Z`,opacity:`0.2`}),AC.createElement(`path`,{d:`M213.66,53.66,163.31,104H192a8,8,0,0,1,0,16H144a8,8,0,0,1-8-8V64a8,8,0,0,1,16,0V92.69l50.34-50.35a8,8,0,0,1,11.32,11.32ZM112,136H64a8,8,0,0,0,0,16H92.69L42.34,202.34a8,8,0,0,0,11.32,11.32L104,163.31V192a8,8,0,0,0,16,0V144A8,8,0,0,0,112,136Z`}))],[`fill`,AC.createElement(AC.Fragment,null,AC.createElement(`path`,{d:`M120,144v48a8,8,0,0,1-13.66,5.66L88,179.31,53.66,213.66a8,8,0,0,1-11.32-11.32L76.69,168,58.34,149.66A8,8,0,0,1,64,136h48A8,8,0,0,1,120,144ZM213.66,42.34a8,8,0,0,0-11.32,0L168,76.69,149.66,58.34A8,8,0,0,0,136,64v48a8,8,0,0,0,8,8h48a8,8,0,0,0,5.66-13.66L179.31,88l34.35-34.34A8,8,0,0,0,213.66,42.34Z`}))],[`light`,AC.createElement(AC.Fragment,null,AC.createElement(`path`,{d:`M212.24,52.24,158.48,106H192a6,6,0,0,1,0,12H144a6,6,0,0,1-6-6V64a6,6,0,0,1,12,0V97.52l53.76-53.76a6,6,0,0,1,8.48,8.48ZM112,138H64a6,6,0,0,0,0,12H97.52L43.76,203.76a6,6,0,1,0,8.48,8.48L106,158.48V192a6,6,0,0,0,12,0V144A6,6,0,0,0,112,138Z`}))],[`regular`,AC.createElement(AC.Fragment,null,AC.createElement(`path`,{d:`M213.66,53.66,163.31,104H192a8,8,0,0,1,0,16H144a8,8,0,0,1-8-8V64a8,8,0,0,1,16,0V92.69l50.34-50.35a8,8,0,0,1,11.32,11.32ZM112,136H64a8,8,0,0,0,0,16H92.69L42.34,202.34a8,8,0,0,0,11.32,11.32L104,163.31V192a8,8,0,0,0,16,0V144A8,8,0,0,0,112,136Z`}))],[`thin`,AC.createElement(AC.Fragment,null,AC.createElement(`path`,{d:`M210.83,50.83,153.66,108H192a4,4,0,0,1,0,8H144a4,4,0,0,1-4-4V64a4,4,0,0,1,8,0v38.34l57.17-57.17a4,4,0,1,1,5.66,5.66ZM112,140H64a4,4,0,0,0,0,8h38.34L45.17,205.17a4,4,0,0,0,5.66,5.66L108,153.66V192a4,4,0,0,0,8,0V144A4,4,0,0,0,112,140Z`}))]])})),lSe=c({ArrowsInSimple:()=>MC,ArrowsInSimpleIcon:()=>jC}),uSe,jC,MC,dSe=o((()=>{uSe=u(m(),1),Y(),cSe(),jC=uSe.forwardRef((e,t)=>uSe.createElement(J,{ref:t,...e,weights:sSe})),jC.displayName=`ArrowsInSimpleIcon`,MC=jC})),NC,fSe,pSe=o((()=>{NC=u(m(),1),fSe=new Map([[`bold`,NC.createElement(NC.Fragment,null,NC.createElement(`path`,{d:`M220,48V96a12,12,0,0,1-24,0V77l-39.51,39.52a12,12,0,0,1-17-17L179,60H160a12,12,0,0,1,0-24h48A12,12,0,0,1,220,48ZM99.51,139.51,60,179V160a12,12,0,0,0-24,0v48a12,12,0,0,0,12,12H96a12,12,0,0,0,0-24H77l39.52-39.51a12,12,0,0,0-17-17Z`}))],[`duotone`,NC.createElement(NC.Fragment,null,NC.createElement(`path`,{d:`M224,48V208a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32H208A16,16,0,0,1,224,48Z`,opacity:`0.2`}),NC.createElement(`path`,{d:`M216,48V96a8,8,0,0,1-16,0V67.31l-50.34,50.35a8,8,0,0,1-11.32-11.32L188.69,56H160a8,8,0,0,1,0-16h48A8,8,0,0,1,216,48ZM106.34,138.34,56,188.69V160a8,8,0,0,0-16,0v48a8,8,0,0,0,8,8H96a8,8,0,0,0,0-16H67.31l50.35-50.34a8,8,0,0,0-11.32-11.32Z`}))],[`fill`,NC.createElement(NC.Fragment,null,NC.createElement(`path`,{d:`M117.66,138.34a8,8,0,0,1,0,11.32L83.31,184l18.35,18.34A8,8,0,0,1,96,216H48a8,8,0,0,1-8-8V160a8,8,0,0,1,13.66-5.66L72,172.69l34.34-34.35A8,8,0,0,1,117.66,138.34ZM208,40H160a8,8,0,0,0-5.66,13.66L172.69,72l-34.35,34.34a8,8,0,0,0,11.32,11.32L184,83.31l18.34,18.35A8,8,0,0,0,216,96V48A8,8,0,0,0,208,40Z`}))],[`light`,NC.createElement(NC.Fragment,null,NC.createElement(`path`,{d:`M214,48V96a6,6,0,0,1-12,0V62.48l-53.76,53.76a6,6,0,0,1-8.48-8.48L193.52,54H160a6,6,0,0,1,0-12h48A6,6,0,0,1,214,48ZM107.76,139.76,54,193.52V160a6,6,0,0,0-12,0v48a6,6,0,0,0,6,6H96a6,6,0,0,0,0-12H62.48l53.76-53.76a6,6,0,0,0-8.48-8.48Z`}))],[`regular`,NC.createElement(NC.Fragment,null,NC.createElement(`path`,{d:`M216,48V96a8,8,0,0,1-16,0V67.31l-50.34,50.35a8,8,0,0,1-11.32-11.32L188.69,56H160a8,8,0,0,1,0-16h48A8,8,0,0,1,216,48ZM106.34,138.34,56,188.69V160a8,8,0,0,0-16,0v48a8,8,0,0,0,8,8H96a8,8,0,0,0,0-16H67.31l50.35-50.34a8,8,0,0,0-11.32-11.32Z`}))],[`thin`,NC.createElement(NC.Fragment,null,NC.createElement(`path`,{d:`M212,48V96a4,4,0,0,1-8,0V57.66l-57.17,57.17a4,4,0,0,1-5.66-5.66L198.34,52H160a4,4,0,0,1,0-8h48A4,4,0,0,1,212,48ZM109.17,141.17,52,198.34V160a4,4,0,0,0-8,0v48a4,4,0,0,0,4,4H96a4,4,0,0,0,0-8H57.66l57.17-57.17a4,4,0,0,0-5.66-5.66Z`}))]])})),mSe=c({ArrowsOutSimple:()=>FC,ArrowsOutSimpleIcon:()=>PC}),hSe,PC,FC,gSe=o((()=>{hSe=u(m(),1),Y(),pSe(),PC=hSe.forwardRef((e,t)=>hSe.createElement(J,{ref:t,...e,weights:fSe})),PC.displayName=`ArrowsOutSimpleIcon`,FC=PC}));dSe(),gSe();var IC={card:[`group`,`z-0`,`mb-12`,`px-4 pt-14 pb-0`,`rounded-card-lg`,`relative`,`transition after:transition-all hover:transition-all`,`after:absolute after:-z-10 after:rounded-card-lg`,`dark:after:border-white/5`],contractedCard:[`cursor-pointer`,`after:inset-0`,`active:hover:scale-95 active:hover:after:shadow-md`,`after:bg-material-thick dark:after:bg-material-thick-dark`,`hover:after:shadow-lg hover:after:-inset-4 hover:mb-12`],expandedCard:[`is-expanded`,`cursor-auto`,`after:bg-material-chrome dark:after:bg-material-regular-dark`,`hover:after:shadow-xl after:shadow-xl dark:after:shadow-none dark:after:border dark:after:border-white/5`,`after:-inset-4`,`pb-8`],content:[`max-h-56 min-h-24 overflow-hidden`],contentContracted:[`pointer-events-none`,`after:absolute after:bottom-0 after:left-0 after:right-0 after:h-14 after:rounded-b-card-lg after:bg-gradient-to-b after:from-transparent after:to-material-thick after:dark:to-material-thick-dark`,`gradient-mask-b-0 group-hover:gradient-mask-b-[rgba(0,0,0,1.0)_50%,rgba(0,0,0,0)_100%]`],catchClicks:[`absolute inset-0 z-[5]`],button:[`transition absolute top-4 right-4 z-10 flex items-center gap-2`,`group-[.is-expanded]:translate-x-4 group-[.is-expanded]:-translate-y-4`,`group-hover:translate-x-4 group-hover:-translate-y-4`]},_Se=({children:e,expandedOnMount:t=!1,className:n,actions:r})=>{let[i,a]=(0,z.useState)(t),[o,s]=(0,z.useState)(224),c=(0,z.useRef)(null);return(0,z.useEffect)(()=>{if(!c.current)return;let e=new ResizeObserver(()=>{c.current&&c.current.scrollHeight!==o&&s(c.current.scrollHeight)});return e.observe(c.current),function(){e.disconnect()}},[e,o]),(0,q.jsxs)(`div`,{className:yx(IC.card,i?IC.expandedCard:IC.contractedCard,n),onClick:i?void 0:()=>a(!i),children:[(0,q.jsx)(`div`,{className:yx(IC.content,!i&&IC.contentContracted),style:i?{maxHeight:o}:void 0,ref:c,children:e}),i?null:(0,q.jsx)(`div`,{"data-testid":`expandable-card-catch`,className:yx(IC.catchClicks),onClick:()=>a(!0)}),(0,q.jsxs)(`div`,{className:yx(IC.button),children:[r,(0,q.jsx)(yC,{onClick:e=>{e.stopPropagation(),a(!i)},surface:`material`,circular:!0,children:i?(0,q.jsx)(MC,{size:16}):(0,q.jsx)(FC,{size:16})})]})]})},vSe=[`date`,`datetime-local`,`month`,`time`,`week`],LC=(0,z.forwardRef)(function({className:e,...t},n){return(0,q.jsx)(`span`,{"data-slot":`control`,className:yx([`relative block w-full`,`before:absolute before:inset-px before:rounded-[calc(theme(borderRadius.lg)-1px)] before:bg-white before:shadow`,`dark:before:hidden`,`after:pointer-events-none after:absolute after:inset-0 after:rounded-lg after:ring-inset after:ring-transparent sm:after:focus-within:ring-2 sm:after:focus-within:ring-action`,`has-[[data-disabled]]:opacity-50 before:has-[[data-disabled]]:bg-system-regular dark:before:has-[[data-disabled]]:bg-system-regular-dark before:has-[[data-disabled]]:shadow-none`,`before:has-[[data-invalid]]:shadow-red-500/10`]),children:(0,q.jsx)(exe,{ref:n,...t,className:yx([e,t.type&&vSe.includes(t.type)&&[`[&::-webkit-datetime-edit-fields-wrapper]:p-0`,`[&::-webkit-date-and-time-value]:min-h-[1.5em]`,`[&::-webkit-datetime-edit]:inline-flex`,`[&::-webkit-datetime-edit]:p-0`,`[&::-webkit-datetime-edit-year-field]:p-0`,`[&::-webkit-datetime-edit-month-field]:p-0`,`[&::-webkit-datetime-edit-day-field]:p-0`,`[&::-webkit-datetime-edit-hour-field]:p-0`,`[&::-webkit-datetime-edit-minute-field]:p-0`,`[&::-webkit-datetime-edit-second-field]:p-0`,`[&::-webkit-datetime-edit-millisecond-field]:p-0`,`[&::-webkit-datetime-edit-meridiem-field]:p-0`],`relative block w-full appearance-none rounded-lg px-[calc(theme(spacing[3.5])-1px)] py-[calc(theme(spacing[2.5])-1px)] sm:px-[calc(theme(spacing[3])-1px)] sm:py-[calc(theme(spacing[1.5])-1px)]`,`text-base/6 text-fg-primary placeholder:fg-secondary dark:placeholder:fg-secondary-dark sm:text-sm/6 dark:text-fg-primary-dark`,`border border-system-thin data-[hover]:border-system-thick dark:border-system-regular-dark dark:data-[hover]:border-system-thin-dark`,`bg-transparent dark:bg-white/5`,`focus:outline-none`,`data-[invalid]:border-red-500 data-[invalid]:data-[hover]:border-red-500 data-[invalid]:dark:border-red-500 data-[invalid]:data-[hover]:dark:border-red-500`,`data-[disabled]:border-system-thick dark:data-[hover]:data-[disabled]:border-system-thick-dark data-[disabled]:dark:border-system-regular-dark data-[disabled]:dark:bg-system-regular-dark`,`dark:[color-scheme:dark]`,t.type&&t.type===`file`&&[`file:bg-gray-50 file:border-0 file:me-4 file:py-3 file:px-4 dark:file:bg-neutral-700 dark:file:text-neutral-400`,`!p-0`]])})})}),ySe=Object.defineProperty,bSe=Object.defineProperties,xSe=Object.getOwnPropertyDescriptors,RC=Object.getOwnPropertySymbols,SSe=Object.prototype.hasOwnProperty,CSe=Object.prototype.propertyIsEnumerable,wSe=(e,t,n)=>t in e?ySe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,TSe=(e,t)=>{for(var n in t||={})SSe.call(t,n)&&wSe(e,n,t[n]);if(RC)for(var n of RC(t))CSe.call(t,n)&&wSe(e,n,t[n]);return e},ESe=(e,t)=>bSe(e,xSe(t)),DSe=(e,t)=>{var n={};for(var r in e)SSe.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&RC)for(var r of RC(e))t.indexOf(r)<0&&CSe.call(e,r)&&(n[r]=e[r]);return n};function OSe(e){return[setTimeout(e,0),setTimeout(e,10),setTimeout(e,50)]}function kSe(e){let t=z.useRef();return z.useEffect(()=>{t.current=e}),t.current}var ASe=18,jSe=40,MSe=`${jSe}px`,NSe=[`[data-lastpass-icon-root]`,`com-1password-button`,`[data-dashlanecreated]`,`[style$="2147483647 !important;"]`].join(`,`);function PSe({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:r}){let[i,a]=z.useState(!1),[o,s]=z.useState(!1),[c,l]=z.useState(!1),u=z.useMemo(()=>n!==`none`&&(n===`increase-width`||n===`experimental-no-flickering`)&&i&&o,[i,o,n]),d=z.useCallback(()=>{let r=e.current,i=t.current;if(!r||!i||c||n===`none`)return;let o=r,s=o.getBoundingClientRect().left+o.offsetWidth,u=o.getBoundingClientRect().top+o.offsetHeight/2,d=s-ASe,f=u;document.querySelectorAll(NSe).length===0&&document.elementFromPoint(d,f)===r||(a(!0),l(!0))},[e,t,c,n]);return z.useEffect(()=>{let t=e.current;if(!t||n===`none`)return;function r(){let e=window.innerWidth-t.getBoundingClientRect().right;s(e>=jSe)}r();let i=setInterval(r,1e3);return()=>{clearInterval(i)}},[e,n]),z.useEffect(()=>{let e=r||document.activeElement===t.current;if(n===`none`||!e)return;let i=setTimeout(d,0),a=setTimeout(d,2e3),o=setTimeout(d,5e3),s=setTimeout(()=>{l(!0)},6e3);return()=>{clearTimeout(i),clearTimeout(a),clearTimeout(o),clearTimeout(s)}},[t,r,n,d]),{hasPWMBadge:i,willPushPWMBadge:u,PWM_BADGE_SPACE_WIDTH:MSe}}var FSe=z.createContext({}),ISe=z.forwardRef((e,t)=>{var n=e,{value:r,onChange:i,maxLength:a,textAlign:o=`left`,pattern:s,placeholder:c,inputMode:l=`numeric`,onComplete:u,pushPasswordManagerStrategy:d=`increase-width`,pasteTransformer:f,containerClassName:p,noScriptCSSFallback:m=LSe,render:h,children:g}=n,_=DSe(n,[`value`,`onChange`,`maxLength`,`textAlign`,`pattern`,`placeholder`,`inputMode`,`onComplete`,`pushPasswordManagerStrategy`,`pasteTransformer`,`containerClassName`,`noScriptCSSFallback`,`render`,`children`]),v;let[y,b]=z.useState(typeof _.defaultValue==`string`?_.defaultValue:``),x=r??y,S=kSe(x),C=z.useCallback(e=>{i?.(e),b(e)},[i]),w=z.useMemo(()=>s?typeof s==`string`?new RegExp(s):s:null,[s]),T=z.useRef(null),E=z.useRef(null),D=z.useRef({value:x,onChange:C,isIOS:typeof window<`u`&&((v=window==null?void 0:window.CSS)?.supports)?.call(v,`-webkit-touch-callout`,`none`)}),O=z.useRef({prev:[T.current?.selectionStart,T.current?.selectionEnd,T.current?.selectionDirection]});z.useImperativeHandle(t,()=>T.current,[]),z.useEffect(()=>{let e=T.current,t=E.current;if(!e||!t)return;D.current.value!==e.value&&D.current.onChange(e.value),O.current.prev=[e.selectionStart,e.selectionEnd,e.selectionDirection];function n(){if(document.activeElement!==e){ee(null),te(null);return}let t=e.selectionStart,n=e.selectionEnd,r=e.selectionDirection,i=e.maxLength,a=e.value,o=O.current.prev,s=-1,c=-1,l;if(a.length!==0&&t!==null&&n!==null){let e=t===n,r=t===a.length&&a.length<i;if(e&&!r){let e=t;if(e===0)s=0,c=1,l=`forward`;else if(e===i)s=e-1,c=e,l=`backward`;else if(i>1&&a.length>1){let t=0;if(o[0]!==null&&o[1]!==null){l=e<o[1]?`backward`:`forward`;let n=o[0]===o[1]&&o[0]<i;l===`backward`&&!n&&(t=-1)}s=t+e,c=t+e+1}}s!==-1&&c!==-1&&s!==c&&T.current.setSelectionRange(s,c,l)}let u=s===-1?t:s,d=c===-1?n:c,f=l??r;ee(u),te(d),O.current.prev=[u,d,f]}if(document.addEventListener(`selectionchange`,n,{capture:!0}),n(),document.activeElement===e&&M(!0),!document.getElementById(`input-otp-style`)){let e=document.createElement(`style`);if(e.id=`input-otp-style`,document.head.appendChild(e),e.sheet){let t=`background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;`;zC(e.sheet,`[data-input-otp]::selection { background: transparent !important; color: transparent !important; }`),zC(e.sheet,`[data-input-otp]:autofill { ${t} }`),zC(e.sheet,`[data-input-otp]:-webkit-autofill { ${t} }`),zC(e.sheet,`@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }`),zC(e.sheet,`[data-input-otp] + * { pointer-events: all !important; }`)}}let r=()=>{t&&t.style.setProperty(`--root-height`,`${e.clientHeight}px`)};r();let i=new ResizeObserver(r);return i.observe(e),()=>{document.removeEventListener(`selectionchange`,n,{capture:!0}),i.disconnect()}},[]);let[k,A]=z.useState(!1),[j,M]=z.useState(!1),[N,ee]=z.useState(null),[P,te]=z.useState(null);z.useEffect(()=>{OSe(()=>{var e;(e=T.current)==null||e.dispatchEvent(new Event(`input`));let t=T.current?.selectionStart,n=T.current?.selectionEnd,r=T.current?.selectionDirection;t!==null&&n!==null&&(ee(t),te(n),O.current.prev=[t,n,r])})},[x,j]),z.useEffect(()=>{S!==void 0&&x!==S&&S.length<a&&x.length===a&&u?.(x)},[a,u,S,x]);let F=PSe({containerRef:E,inputRef:T,pushPasswordManagerStrategy:d,isFocused:j}),ne=z.useCallback(e=>{let t=e.currentTarget.value.slice(0,a);if(t.length>0&&w&&!w.test(t)){e.preventDefault();return}typeof S==`string`&&t.length<S.length&&document.dispatchEvent(new Event(`selectionchange`)),C(t)},[a,C,S,w]),I=z.useCallback(()=>{var e;if(T.current){let t=Math.min(T.current.value.length,a-1),n=T.current.value.length;(e=T.current)==null||e.setSelectionRange(t,n),ee(t),te(n)}M(!0)},[a]),re=z.useCallback(e=>{let t=T.current;if(!f&&(!D.current.isIOS||!e.clipboardData||!t))return;let n=e.clipboardData.getData(`text/plain`),r=f?f(n):n;e.preventDefault();let i=T.current?.selectionStart,o=T.current?.selectionEnd,s=(i===o?x.slice(0,i)+r+x.slice(i):x.slice(0,i)+r+x.slice(o)).slice(0,a);if(s.length>0&&w&&!w.test(s))return;t.value=s,C(s);let c=Math.min(s.length,a-1),l=s.length;t.setSelectionRange(c,l),ee(c),te(l)},[a,C,w,x]),L=z.useMemo(()=>({position:`relative`,cursor:_.disabled?`default`:`text`,userSelect:`none`,WebkitUserSelect:`none`,pointerEvents:`none`}),[_.disabled]),ie=z.useMemo(()=>({position:`absolute`,inset:0,width:F.willPushPWMBadge?`calc(100% + ${F.PWM_BADGE_SPACE_WIDTH})`:`100%`,clipPath:F.willPushPWMBadge?`inset(0 ${F.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:`100%`,display:`flex`,textAlign:o,opacity:`1`,color:`transparent`,pointerEvents:`all`,background:`transparent`,caretColor:`transparent`,border:`0 solid transparent`,outline:`0 solid transparent`,boxShadow:`none`,lineHeight:`1`,letterSpacing:`-.5em`,fontSize:`var(--root-height)`,fontFamily:`monospace`,fontVariantNumeric:`tabular-nums`}),[F.PWM_BADGE_SPACE_WIDTH,F.willPushPWMBadge,o]),ae=z.useMemo(()=>z.createElement(`input`,ESe(TSe({autoComplete:_.autoComplete||`one-time-code`},_),{"data-input-otp":!0,"data-input-otp-placeholder-shown":x.length===0||void 0,"data-input-otp-mss":N,"data-input-otp-mse":P,inputMode:l,pattern:w?.source,"aria-placeholder":c,style:ie,maxLength:a,value:x,ref:T,onPaste:e=>{var t;re(e),(t=_.onPaste)==null||t.call(_,e)},onChange:ne,onMouseOver:e=>{var t;A(!0),(t=_.onMouseOver)==null||t.call(_,e)},onMouseLeave:e=>{var t;A(!1),(t=_.onMouseLeave)==null||t.call(_,e)},onFocus:e=>{var t;I(),(t=_.onFocus)==null||t.call(_,e)},onBlur:e=>{var t;M(!1),(t=_.onBlur)==null||t.call(_,e)}})),[ne,I,re,l,ie,a,P,N,_,w?.source,x]),oe=z.useMemo(()=>({slots:Array.from({length:a}).map((e,t)=>{let n=j&&N!==null&&P!==null&&(N===P&&t===N||t>=N&&t<P),r=x[t]===void 0?null:x[t];return{char:r,placeholderChar:x[0]===void 0?c?.[t]??null:null,isActive:n,hasFakeCaret:n&&r===null}}),isFocused:j,isHovering:!_.disabled&&k}),[j,k,a,P,N,_.disabled,x]),se=z.useMemo(()=>h?h(oe):z.createElement(FSe.Provider,{value:oe},g),[g,oe,h]);return z.createElement(z.Fragment,null,m!==null&&z.createElement(`noscript`,null,z.createElement(`style`,null,m)),z.createElement(`div`,{ref:E,"data-input-otp-container":!0,style:L,className:p},se,z.createElement(`div`,{style:{position:`absolute`,inset:0,pointerEvents:`none`}},ae)))});ISe.displayName=`Input`;function zC(e,t){try{e.insertRule(t)}catch{console.error(`input-otp could not insert CSS rule:`,t)}}var LSe=`
239
+ `)),[]});var v_e=(e=>(e[e.None=0]=`None`,e[e.Closed=1]=`Closed`,e[e.Enter=2]=`Enter`,e[e.Leave=4]=`Leave`,e))(v_e||{});function y_e(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]=``);return t}function b_e(e,t,n,r){let[i,a]=(0,z.useState)(n),{hasFlag:o,addFlag:s,removeFlag:c}=__e(e&&i?3:0),l=(0,z.useRef)(!1),u=(0,z.useRef)(!1);return Nx(()=>{var i;if(e){if(n&&a(!0),!t){n&&s(3);return}return(i=r?.start)==null||i.call(r,n),x_e(t,{inFlight:l,prepare(){u.current?u.current=!1:u.current=l.current,l.current=!0,!u.current&&(n?(s(3),c(4)):(s(4),c(2)))},run(){u.current?n?(c(3),s(4)):(c(4),s(3)):n?c(1):s(1)},done(){var e;u.current&&w_e(t)||(l.current=!1,c(7),n||a(!1),(e=r?.end)==null||e.call(r,n))}})}},[e,n,t,Mx()]),e?[i,{closed:o(1),enter:o(2),leave:o(4),transition:o(2)||o(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function x_e(e,{prepare:t,run:n,done:r,inFlight:i}){let a=jx();return C_e(e,{prepare:t,inFlight:i}),a.nextFrame(()=>{n(),a.requestAnimationFrame(()=>{a.add(S_e(e,r))})}),a.dispose}function S_e(e,t){let n=jx();if(!e)return n.dispose;let r=!1;n.add(()=>{r=!0});let i=e.getAnimations?.call(e).filter(e=>e instanceof CSSTransition)??[];return i.length===0?(t(),n.dispose):(Promise.allSettled(i.map(e=>e.finished)).then(()=>{r||t()}),n.dispose)}function C_e(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition=`none`,n(),e.offsetHeight,e.style.transition=r}function w_e(e){return(e.getAnimations?.call(e)??[]).some(e=>e instanceof CSSTransition&&e.playState!==`finished`)}function T_e(e,{container:t,accept:n,walk:r}){let i=(0,z.useRef)(n),a=(0,z.useRef)(r);(0,z.useEffect)(()=>{i.current=n,a.current=r},[n,r]),Nx(()=>{if(!t||!e)return;let n=Ax(t);if(!n)return;let r=i.current,o=a.current,s=Object.assign(e=>r(e),{acceptNode:r}),c=n.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,s,!1);for(;c.nextNode();)o(c.currentNode)},[t,e,i,a])}function E_e(e,t){let n=(0,z.useRef)([]),r=Fx(e);(0,z.useEffect)(()=>{let e=[...n.current];for(let[i,a]of t.entries())if(n.current[i]!==a){let i=r(t,e);return n.current=t,i}},[r,...t])}function D_e(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function _S(e){return e instanceof Element||e instanceof D_e(e).Element}function O_e(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+`/`+n}).join(` `):navigator.userAgent}function k_e(e,t){return typeof e==`function`?e(t):e}var vS=Math.min,yS=Math.max,bS=Math.round,xS=Math.floor,SS=e=>({x:e,y:e}),A_e={left:`right`,right:`left`,bottom:`top`,top:`bottom`},j_e={start:`end`,end:`start`};function M_e(e,t,n){return yS(e,vS(t,n))}function CS(e,t){return typeof e==`function`?e(t):e}function wS(e){return e.split(`-`)[0]}function TS(e){return e.split(`-`)[1]}function N_e(e){return e===`x`?`y`:`x`}function P_e(e){return e===`y`?`height`:`width`}function ES(e){return[`top`,`bottom`].includes(wS(e))?`y`:`x`}function F_e(e){return N_e(ES(e))}function I_e(e,t,n){n===void 0&&(n=!1);let r=TS(e),i=F_e(e),a=P_e(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=DS(o)),[o,DS(o)]}function L_e(e){let t=DS(e);return[R_e(e),t,R_e(t)]}function R_e(e){return e.replace(/start|end/g,e=>j_e[e])}function z_e(e,t,n){let r=[`left`,`right`],i=[`right`,`left`],a=[`top`,`bottom`],o=[`bottom`,`top`];switch(e){case`top`:case`bottom`:return n?t?i:r:t?r:i;case`left`:case`right`:return t?a:o;default:return[]}}function B_e(e,t,n,r){let i=TS(e),a=z_e(wS(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(R_e)))),a}function DS(e){return e.replace(/left|right|bottom|top/g,e=>A_e[e])}function V_e(e){return{top:0,right:0,bottom:0,left:0,...e}}function H_e(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:V_e(e)}function OS(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function U_e(e,t,n){let{reference:r,floating:i}=e,a=ES(t),o=F_e(t),s=P_e(o),c=wS(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(TS(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1)}return p}var W_e=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=U_e(l,r,c),f=r,p={},m=0;for(let n=0;n<s.length;n++){let{name:a,fn:h}=s[n],{x:g,y:_,data:v,reset:y}=await h({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:l,platform:o,elements:{reference:e,floating:t}});u=g??u,d=_??d,p={...p,[a]:{...p[a],...v}},y&&m<=50&&(m++,typeof y==`object`&&(y.placement&&(f=y.placement),y.rects&&(l=y.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):y.rects),{x:u,y:d}=U_e(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:p}};async function kS(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=CS(t,e),p=H_e(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=OS(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=OS(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var G_e=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=CS(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=wS(r),_=ES(o),v=wS(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[DS(o)]:L_e(o)),x=p!==`none`;!d&&x&&b.push(...B_e(o,m,p,y));let S=[o,...b],C=await kS(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=I_e(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t)return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=ES(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};async function K_e(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=wS(n),s=TS(n),c=ES(n)===`y`,l=[`left`,`top`].includes(o)?-1:1,u=a&&c?-1:1,d=CS(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var q_e=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await K_e(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},J_e=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=CS(e,t),l={x:n,y:r},u=await kS(t,c),d=ES(wS(i)),f=N_e(d),p=l[f],m=l[d];if(a){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=p+u[e],r=p-u[t];p=M_e(n,p,r)}if(o){let e=d===`y`?`top`:`left`,t=d===`y`?`bottom`:`right`,n=m+u[e],r=m-u[t];m=M_e(n,m,r)}let h=s.fn({...t,[f]:p,[d]:m});return{...h,data:{x:h.x-n,y:h.y-r}}}}},Y_e=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=CS(e,t),c=await kS(t,s),l=wS(n),u=TS(n),d=ES(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=vS(p-c[m],g),y=vS(f-c[h],_),b=!t.middlewareData.shift,x=v,S=y;if(d?S=u||b?vS(y,_):_:x=u||b?vS(v,g):g,b&&!u){let e=yS(c.left,0),t=yS(c.right,0),n=yS(c.top,0),r=yS(c.bottom,0);d?S=f-2*(e!==0||t!==0?e+t:yS(c.left,c.right)):x=p-2*(n!==0||r!==0?n+r:yS(c.top,c.bottom))}await o({...t,availableWidth:S,availableHeight:x});let C=await i.getDimensions(a.floating);return f!==C.width||p!==C.height?{reset:{rects:!0}}:{}}}};function AS(e){return X_e(e)?(e.nodeName||``).toLowerCase():`#document`}function jS(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function MS(e){return((X_e(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function X_e(e){return e instanceof Node||e instanceof jS(e).Node}function NS(e){return e instanceof Element||e instanceof jS(e).Element}function PS(e){return e instanceof HTMLElement||e instanceof jS(e).HTMLElement}function Z_e(e){return typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof jS(e).ShadowRoot}function FS(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=RS(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&![`inline`,`contents`].includes(i)}function Q_e(e){return[`table`,`td`,`th`].includes(AS(e))}function IS(e){return[`:popover-open`,`:modal`].some(t=>{try{return e.matches(t)}catch{return!1}})}function $_e(e){let t=tve(),n=NS(e)?RS(e):e;return n.transform!==`none`||n.perspective!==`none`||(n.containerType?n.containerType!==`normal`:!1)||!t&&(n.backdropFilter?n.backdropFilter!==`none`:!1)||!t&&(n.filter?n.filter!==`none`:!1)||[`transform`,`perspective`,`filter`].some(e=>(n.willChange||``).includes(e))||[`paint`,`layout`,`strict`,`content`].some(e=>(n.contain||``).includes(e))}function eve(e){let t=BS(e);for(;PS(t)&&!LS(t);){if($_e(t))return t;if(IS(t))return null;t=BS(t)}return null}function tve(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}function LS(e){return[`html`,`body`,`#document`].includes(AS(e))}function RS(e){return jS(e).getComputedStyle(e)}function zS(e){return NS(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function BS(e){if(AS(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Z_e(e)&&e.host||MS(e);return Z_e(t)?t.host:t}function nve(e){let t=BS(e);return LS(t)?e.ownerDocument?e.ownerDocument.body:e.body:PS(t)&&FS(t)?t:nve(t)}function VS(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=nve(e),i=r===e.ownerDocument?.body,a=jS(r);return i?t.concat(a,a.visualViewport||[],FS(r)?r:[],a.frameElement&&n?VS(a.frameElement):[]):t.concat(r,VS(r,[],n))}function rve(e){let t=RS(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=PS(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=bS(n)!==a||bS(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function ive(e){return NS(e)?e:e.contextElement}function HS(e){let t=ive(e);if(!PS(t))return SS(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=rve(t),o=(a?bS(n.width):n.width)/r,s=(a?bS(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var ave=SS(0);function ove(e){let t=jS(e);return!tve()||!t.visualViewport?ave:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function sve(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==jS(e)?!1:t}function US(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=ive(e),o=SS(1);t&&(r?NS(r)&&(o=HS(r)):o=HS(e));let s=sve(a,n,r)?ove(a):SS(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=jS(a),t=r&&NS(r)?jS(r):r,n=e,i=n.frameElement;for(;i&&r&&t!==n;){let e=HS(i),t=i.getBoundingClientRect(),r=RS(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=jS(i),i=n.frameElement}}return OS({width:u,height:d,x:c,y:l})}function cve(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=MS(r),s=t?IS(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=SS(1),u=SS(0),d=PS(r);if((d||!d&&!a)&&((AS(r)!==`body`||FS(o))&&(c=zS(r)),PS(r))){let e=US(r);l=HS(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x,y:n.y*l.y-c.scrollTop*l.y+u.y}}function lve(e){return Array.from(e.getClientRects())}function uve(e){return US(MS(e)).left+zS(e).scrollLeft}function dve(e){let t=MS(e),n=zS(e),r=e.ownerDocument.body,i=yS(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=yS(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+uve(e),s=-n.scrollTop;return RS(r).direction===`rtl`&&(o+=yS(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}function fve(e,t){let n=jS(e),r=MS(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=tve();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s,y:c}}function pve(e,t){let n=US(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=PS(e)?HS(e):SS(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function mve(e,t,n){let r;if(t===`viewport`)r=fve(e,n);else if(t===`document`)r=dve(MS(e));else if(NS(t))r=pve(t,n);else{let n=ove(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return OS(r)}function hve(e,t){let n=BS(e);return n===t||!NS(n)||LS(n)?!1:RS(n).position===`fixed`||hve(n,t)}function gve(e,t){let n=t.get(e);if(n)return n;let r=VS(e,[],!1).filter(e=>NS(e)&&AS(e)!==`body`),i=null,a=RS(e).position===`fixed`,o=a?BS(e):e;for(;NS(o)&&!LS(o);){let t=RS(o),n=$_e(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&[`absolute`,`fixed`].includes(i.position)||FS(o)&&!n&&hve(e,o))?r=r.filter(e=>e!==o):i=t,o=BS(o)}return t.set(e,r),r}function _ve(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?IS(t)?[]:gve(t,this._c):[].concat(n),r],o=a[0],s=a.reduce((e,n)=>{let r=mve(t,n,i);return e.top=yS(r.top,e.top),e.right=vS(r.right,e.right),e.bottom=vS(r.bottom,e.bottom),e.left=yS(r.left,e.left),e},mve(t,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function vve(e){let{width:t,height:n}=rve(e);return{width:t,height:n}}function yve(e,t,n){let r=PS(t),i=MS(t),a=n===`fixed`,o=US(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=SS(0);if(r||!r&&!a){if((AS(t)!==`body`||FS(i))&&(s=zS(t)),r){let e=US(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&(c.x=uve(i))}return{x:o.left+s.scrollLeft-c.x,y:o.top+s.scrollTop-c.y,width:o.width,height:o.height}}function bve(e){return RS(e).position===`static`}function xve(e,t){return!PS(e)||RS(e).position===`fixed`?null:t?t(e):e.offsetParent}function Sve(e,t){let n=jS(e);if(IS(e))return n;if(!PS(e)){let t=BS(e);for(;t&&!LS(t);){if(NS(t)&&!bve(t))return t;t=BS(t)}return n}let r=xve(e,t);for(;r&&Q_e(r)&&bve(r);)r=xve(r,t);return r&&LS(r)&&bve(r)&&!$_e(r)?n:r||eve(e)||n}var Cve=async function(e){let t=this.getOffsetParent||Sve,n=this.getDimensions,r=await n(e.floating);return{reference:yve(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function wve(e){return RS(e).direction===`rtl`}var Tve={convertOffsetParentRelativeRectToViewportRelativeRect:cve,getDocumentElement:MS,getClippingRect:_ve,getOffsetParent:Sve,getElementRects:Cve,getClientRects:lve,getDimensions:vve,getScale:HS,isElement:NS,isRTL:wve};function Eve(e,t){let n=null,r,i=MS(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let{left:l,top:u,width:d,height:f}=e.getBoundingClientRect();if(s||t(),!d||!f)return;let p=xS(u),m=xS(i.clientWidth-(l+d)),h=xS(i.clientHeight-(u+f)),g=xS(l),_={rootMargin:-p+`px `+-m+`px `+-h+`px `+-g+`px`,threshold:yS(0,vS(1,c))||1},v=!0;function y(e){let t=e[0].intersectionRatio;if(t!==c){if(!v)return o();t?o(!1,t):r=setTimeout(()=>{o(!1,1e-7)},1e3)}v=!1}try{n=new IntersectionObserver(y,{..._,root:i.ownerDocument})}catch{n=new IntersectionObserver(y,_)}n.observe(e)}return o(!0),a}function Dve(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=ive(e),u=i||a?[...l?VS(l):[],...VS(t)]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Eve(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let m,h=c?US(e):null;c&&g();function g(){let t=US(e);h&&(t.x!==h.x||t.y!==h.y||t.width!==h.width||t.height!==h.height)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Ove=kS,kve=q_e,Ave=J_e,jve=G_e,Mve=Y_e,Nve=(e,t,n)=>{let r=new Map,i={platform:Tve,...n},a={...i.platform,_c:r};return W_e(e,t,{...i,platform:a})},WS=typeof document<`u`?z.useLayoutEffect:z.useEffect;function GS(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!GS(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!GS(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Pve(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Fve(e,t){let n=Pve(e);return Math.round(t*n)/n}function Ive(e){let t=z.useRef(e);return WS(()=>{t.current=e}),t}function Lve(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=z.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=z.useState(r);GS(f,r)||p(r);let[m,h]=z.useState(null),[g,_]=z.useState(null),v=z.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=z.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=z.useRef(null),C=z.useRef(null),w=z.useRef(u),T=c!=null,E=Ive(c),D=Ive(i),O=z.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),Nve(S.current,C.current,e).then(e=>{let t={...e,isPositioned:!0};k.current&&!GS(w.current,t)&&(w.current=t,yu.flushSync(()=>{d(t)}))})},[f,t,n,D]);WS(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let k=z.useRef(!1);WS(()=>(k.current=!0,()=>{k.current=!1}),[]),WS(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,O);O()}},[b,x,O,E,T]);let A=z.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),j=z.useMemo(()=>({reference:b,floating:x}),[b,x]),M=z.useMemo(()=>{let e={position:n,left:0,top:0};if(!j.floating)return e;let t=Fve(j.floating,u.x),r=Fve(j.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Pve(j.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,j.floating,u.x,u.y]);return z.useMemo(()=>({...u,update:O,refs:A,elements:j,floatingStyles:M}),[u,O,A,j,M])}var Rve=(e,t)=>({...kve(e),options:[e,t]}),zve=(e,t)=>({...Ave(e),options:[e,t]}),Bve=(e,t)=>({...jve(e),options:[e,t]}),Vve=(e,t)=>({...Mve(e),options:[e,t]}),Hve={...z},Uve=Hve.useInsertionEffect||(e=>e());function Wve(e){let t=z.useRef(()=>{if(process.env.NODE_ENV!==`production`)throw Error(`Cannot call an event handler while rendering.`)});return Uve(()=>{t.current=e}),z.useCallback(function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.current==null?void 0:t.current(...n)},[])}var Gve=`ArrowUp`,Kve=`ArrowDown`,qve=`ArrowLeft`,Jve=`ArrowRight`,Yve=typeof document<`u`?z.useLayoutEffect:z.useEffect,Xve=[qve,Jve],Zve=[Gve,Kve];[...Xve,...Zve];var Qve=!1,$ve=0,eye=()=>`floating-ui-`+Math.random().toString(36).slice(2,6)+$ve++;function tye(){let[e,t]=z.useState(()=>Qve?eye():void 0);return Yve(()=>{e??t(eye())},[]),z.useEffect(()=>{Qve=!0},[]),e}var nye=Hve.useId||tye,KS;process.env.NODE_ENV!==`production`&&(KS=new Set);function rye(){for(var e,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];let i=`Floating UI: `+n.join(` `);if(!((e=KS)!=null&&e.has(i))){var a;(a=KS)==null||a.add(i),console.warn(i)}}function iye(){for(var e,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];let i=`Floating UI: `+n.join(` `);if(!((e=KS)!=null&&e.has(i))){var a;(a=KS)==null||a.add(i),console.error(i)}}function aye(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(e=>e(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){e.set(t,e.get(t)?.filter(e=>e!==n)||[])}}}var oye=z.createContext(null),sye=z.createContext(null),cye=()=>z.useContext(oye)?.id||null,lye=()=>z.useContext(sye);function uye(e){let{open:t=!1,onOpenChange:n,elements:r}=e,i=nye(),a=z.useRef({}),[o]=z.useState(()=>aye()),s=cye()!=null;if(process.env.NODE_ENV!==`production`){let e=r.reference;e&&!_S(e)&&iye("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`",`instead.`)}let[c,l]=z.useState(r.reference),u=Wve((e,t,r)=>{a.current.openEvent=e?t:void 0,o.emit(`openchange`,{open:e,event:t,reason:r,nested:s}),n?.(e,t,r)}),d=z.useMemo(()=>({setPositionReference:l}),[]),f=z.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return z.useMemo(()=>({dataRef:a,open:t,onOpenChange:u,elements:f,events:o,floatingId:i,refs:d}),[t,u,f,o,i,d])}function dye(e){e===void 0&&(e={});let{nodeId:t}=e,n=uye({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[a,o]=z.useState(null),[s,c]=z.useState(null),l=i?.reference||a,u=z.useRef(null),d=lye();Yve(()=>{l&&(u.current=l)},[l]);let f=Lve({...e,elements:{...i,...s&&{reference:s}}}),p=z.useCallback(e=>{let t=_S(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;c(t),f.refs.setReference(t)},[f.refs]),m=z.useCallback(e=>{(_S(e)||e===null)&&(u.current=e,o(e)),(_S(f.refs.reference.current)||f.refs.reference.current===null||e!==null&&!_S(e))&&f.refs.setReference(e)},[f.refs]),h=z.useMemo(()=>({...f.refs,setReference:m,setPositionReference:p,domReference:u}),[f.refs,m,p]),g=z.useMemo(()=>({...f.elements,domReference:l}),[f.elements,l]),_=z.useMemo(()=>({...f,...r,refs:h,elements:g,nodeId:t}),[f,h,g,t,r]);return Yve(()=>{r.dataRef.current.floatingContext=_;let e=d?.nodesRef.current.find(e=>e.id===t);e&&(e.context=_)}),z.useMemo(()=>({...f,context:_,refs:h,elements:g}),[f,h,g,_])}var fye=`active`,pye=`selected`;function mye(e,t,n){let r=new Map,i=n===`item`,a=e;if(i&&e){let{[fye]:t,[pye]:n,...r}=e;a=r}return{...n===`floating`&&{tabIndex:-1},...a,...t.map(t=>{let r=t?t[n]:null;return typeof r==`function`?e?r(e):null:r}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,a]=t;if(!(i&&[fye,pye].includes(n))){if(n.indexOf(`on`)===0){if(r.has(n)||r.set(n,[]),typeof a==`function`){var o;(o=r.get(n))==null||o.push(a),e[n]=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return r.get(n)?.map(e=>e(...t)).find(e=>e!==void 0)}}}else e[n]=a}}),e),{})}}function hye(e){e===void 0&&(e=[]);let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=z.useCallback(t=>mye(t,e,`reference`),t),a=z.useCallback(t=>mye(t,e,`floating`),n),o=z.useCallback(t=>mye(t,e,`item`),r);return z.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}function gye(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}var _ye=e=>({name:`inner`,options:e,async fn(t){let{listRef:n,overflowRef:r,onFallbackChange:i,offset:a=0,index:o=0,minItemsVisible:s=4,referenceOverflowThreshold:c=0,scrollRef:l,...u}=k_e(e,t),{rects:d,elements:{floating:f}}=t,p=n.current[o];if(process.env.NODE_ENV!==`production`&&(t.placement.startsWith(`bottom`)||rye('`placement` side must be "bottom" when using the `inner`',`middleware.`)),!p)return{};let m={...t,...await Rve(-p.offsetTop-f.clientTop-d.reference.height/2-p.offsetHeight/2-a).fn(t)},h=l?.current||f,g=await Ove(gye(m,h.scrollHeight),u),_=await Ove(m,{...u,elementContext:`reference`}),v=Math.max(0,g.top),y=m.y+v,b=Math.max(0,h.scrollHeight-v-Math.max(0,g.bottom));return h.style.maxHeight=b+`px`,h.scrollTop=v,i&&(h.offsetHeight<p.offsetHeight*Math.min(s,n.current.length-1)-1||_.top>=-c||_.bottom>=-c?yu.flushSync(()=>i(!0)):yu.flushSync(()=>i(!1))),r&&(r.current=await Ove(gye({...m,y},h.offsetHeight),u)),{y}}});function vye(e,t){let{open:n,elements:r}=e,{enabled:i=!0,overflowRef:a,scrollRef:o,onChange:s}=t,c=Wve(s),l=z.useRef(!1),u=z.useRef(null),d=z.useRef(null);z.useEffect(()=>{if(!i)return;function e(e){if(e.ctrlKey||!t||a.current==null)return;let n=e.deltaY,r=a.current.top>=-.5,i=a.current.bottom>=-.5,o=t.scrollHeight-t.clientHeight,s=n<0?-1:1,l=n<0?`max`:`min`;t.scrollHeight<=t.clientHeight||(!r&&n>0||!i&&n<0?(e.preventDefault(),yu.flushSync(()=>{c(e=>e+Math[l](n,o*s))})):/firefox/i.test(O_e())&&(t.scrollTop+=n))}let t=o?.current||r.floating;if(n&&t)return t.addEventListener(`wheel`,e),requestAnimationFrame(()=>{u.current=t.scrollTop,a.current!=null&&(d.current={...a.current})}),()=>{u.current=null,d.current=null,t.removeEventListener(`wheel`,e)}},[i,n,r.floating,a,o,c]);let f=z.useMemo(()=>({onKeyDown(){l.current=!0},onWheel(){l.current=!1},onPointerMove(){l.current=!1},onScroll(){let e=o?.current||r.floating;if(a.current&&e&&l.current){if(u.current!==null){let t=e.scrollTop-u.current;(a.current.bottom<-.5&&t<-1||a.current.top<-.5&&t>1)&&yu.flushSync(()=>c(e=>e+t))}requestAnimationFrame(()=>{u.current=e.scrollTop})}}}),[r.floating,c,a,o]);return z.useMemo(()=>i?{floating:f}:{},[i,f])}var qS=(0,z.createContext)({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});qS.displayName=`FloatingContext`;var yye=(0,z.createContext)(null);yye.displayName=`PlacementContext`;function bye(e){return(0,z.useMemo)(()=>e?typeof e==`string`?{to:e}:e:null,[e])}function xye(){return(0,z.useContext)(qS).setReference}function Sye(){return(0,z.useContext)(qS).getReferenceProps}function Cye(){let{getFloatingProps:e,slot:t}=(0,z.useContext)(qS);return(0,z.useCallback)((...n)=>Object.assign({},e(...n),{"data-anchor":t.anchor}),[e,t])}function wye(e=null){e===!1&&(e=null),typeof e==`string`&&(e={to:e});let t=(0,z.useContext)(yye),n=(0,z.useMemo)(()=>e,[JSON.stringify(e,(e,t)=>t?.outerHTML??t)]);Nx(()=>{t?.(n??null)},[t,n]);let r=(0,z.useContext)(qS);return(0,z.useMemo)(()=>[r.setFloating,e?r.styles:{}],[r.setFloating,e,r.styles])}var Tye=4;function Eye({children:e,enabled:t=!0}){let[n,r]=(0,z.useState)(null),[i,a]=(0,z.useState)(0),o=(0,z.useRef)(null),[s,c]=(0,z.useState)(null);Dye(s);let l=t&&n!==null&&s!==null,{to:u=`bottom`,gap:d=0,offset:f=0,padding:p=0,inner:m}=Oye(n,s),[h,g=`center`]=u.split(` `);Nx(()=>{l&&a(0)},[l]);let{refs:_,floatingStyles:v,context:y}=dye({open:l,placement:h===`selection`?g===`center`?`bottom`:`bottom-${g}`:g===`center`?`${h}`:`${h}-${g}`,strategy:`absolute`,transform:!1,middleware:[Rve({mainAxis:h===`selection`?0:d,crossAxis:f}),zve({padding:p}),h!==`selection`&&Bve({padding:p}),h===`selection`&&m?_ye({...m,padding:p,overflowRef:o,offset:i,minItemsVisible:Tye,referenceOverflowThreshold:p,onFallbackChange(e){if(!e)return;let t=y.elements.floating;if(!t)return;let n=parseFloat(getComputedStyle(t).scrollPaddingBottom)||0,r=Math.min(Tye,t.childElementCount),i=0,o=0;for(let e of y.elements.floating?.childNodes??[])if(Yx(e)){let a=e.offsetTop,s=a+e.clientHeight+n,c=t.scrollTop,l=c+t.clientHeight;if(a>=c&&s<=l)r--;else{o=Math.max(0,Math.min(s,l)-Math.max(a,c)),i=e.clientHeight;break}}r>=1&&a(e=>{let t=i*r-o+n;return e>=t?e:t})}}):null,Vve({padding:p,apply({availableWidth:e,availableHeight:t,elements:n}){Object.assign(n.floating.style,{overflow:`auto`,maxWidth:`${e}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${t}px)`})}})].filter(Boolean),whileElementsMounted:Dve}),[b=h,x=g]=y.placement.split(`-`);h===`selection`&&(b=`selection`);let S=(0,z.useMemo)(()=>({anchor:[b,x].filter(Boolean).join(` `)}),[b,x]),{getReferenceProps:C,getFloatingProps:w}=hye([vye(y,{overflowRef:o,onChange:a})]),T=Fx(e=>{c(e),_.setFloating(e)});return z.createElement(yye.Provider,{value:r},z.createElement(qS.Provider,{value:{setFloating:T,setReference:_.setReference,styles:v,getReferenceProps:C,getFloatingProps:w,slot:S}},e))}function Dye(e){Nx(()=>{if(!e)return;let t=new MutationObserver(()=>{let t=window.getComputedStyle(e).maxHeight,n=parseFloat(t);if(isNaN(n))return;let r=parseInt(t);isNaN(r)||n!==r&&(e.style.maxHeight=`${Math.ceil(n)}px`)});return t.observe(e,{attributes:!0,attributeFilter:[`style`]}),()=>{t.disconnect()}},[e])}function Oye(e,t){let n=kye(e?.gap??`var(--anchor-gap, 0)`,t),r=kye(e?.offset??`var(--anchor-offset, 0)`,t),i=kye(e?.padding??`var(--anchor-padding, 0)`,t);return{...e,gap:n,offset:r,padding:i}}function kye(e,t,n=void 0){let r=Mx(),i=Fx((e,t)=>{if(e==null)return[n,null];if(typeof e==`number`)return[e,null];if(typeof e==`string`){if(!t)return[n,null];let i=jye(e,t);return[i,n=>{let a=Aye(e);{let o=a.map(e=>window.getComputedStyle(t).getPropertyValue(e));r.requestAnimationFrame(function s(){r.nextFrame(s);let c=!1;for(let[e,n]of a.entries()){let r=window.getComputedStyle(t).getPropertyValue(n);if(o[e]!==r){o[e]=r,c=!0;break}}if(!c)return;let l=jye(e,t);i!==l&&(n(l),i=l)})}return r.dispose}]}return[n,null]}),a=(0,z.useMemo)(()=>i(e,t)[0],[e,t]),[o=a,s]=(0,z.useState)();return Nx(()=>{let[n,r]=i(e,t);if(s(n),r)return r(s)},[e,t]),o}function Aye(e){let t=/var\((.*)\)/.exec(e);if(t){let e=t[1].indexOf(`,`);if(e===-1)return[t[1]];let n=t[1].slice(0,e).trim(),r=t[1].slice(e+1).trim();return r?[n,...Aye(r)]:[n]}return[]}function jye(e,t){let n=document.createElement(`div`);t.appendChild(n),n.style.setProperty(`margin-top`,`0px`,`important`),n.style.setProperty(`margin-top`,e,`important`);let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),r}var JS=(0,z.createContext)(null);JS.displayName=`OpenClosedContext`;var YS=(e=>(e[e.Open=1]=`Open`,e[e.Closed=2]=`Closed`,e[e.Closing=4]=`Closing`,e[e.Opening=8]=`Opening`,e))(YS||{});function XS(){return(0,z.useContext)(JS)}function Mye({value:e,children:t}){return z.createElement(JS.Provider,{value:e},t)}function Nye({children:e}){return z.createElement(JS.Provider,{value:null},e)}function Pye(e){function t(){document.readyState!==`loading`&&(e(),document.removeEventListener(`DOMContentLoaded`,t))}typeof window<`u`&&typeof document<`u`&&(document.addEventListener(`DOMContentLoaded`,t),t())}var ZS=[];Pye(()=>{function e(e){if(!Xx(e.target)||e.target===document.body||ZS[0]===e.target)return;let t=e.target;t=t.closest(lS),ZS.unshift(t??e.target),ZS=ZS.filter(e=>e!=null&&e.isConnected),ZS.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 Fye(e){throw Error(`Unexpected object: `+e)}var QS=(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))(QS||{});function $S(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=r??-1;switch(e.focus){case 0:for(let e=0;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 1:i===-1&&(i=n.length);for(let e=i-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 2:for(let e=i+1;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 3:for(let e=n.length-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 4:for(let r=0;r<n.length;++r)if(t.resolveId(n[r],r,n)===e.id)return r;return r;case 5:return null;default:Fye(e)}}function Iye(e){let t=Fx(e),n=(0,z.useRef)(!1);(0,z.useEffect)(()=>(n.current=!1,()=>{n.current=!0,uhe(()=>{n.current&&t()})}),[t])}var Lye=(0,z.createContext)(!1);function Rye(){return(0,z.useContext)(Lye)}function zye(e){return z.createElement(Lye.Provider,{value:e.force},e.children)}function Bye(e){let t=Rye(),n=(0,z.useContext)(Gye),[r,i]=(0,z.useState)(()=>{if(!t&&n!==null)return n.current??null;if(kx.isServer)return null;let r=e?.getElementById(`headlessui-portal-root`);if(r)return r;if(e===null)return null;let i=e.createElement(`div`);return i.setAttribute(`id`,`headlessui-portal-root`),e.body.appendChild(i)});return(0,z.useEffect)(()=>{r!==null&&(e!=null&&e.body.contains(r)||e==null||e.body.appendChild(r))},[r,e]),(0,z.useEffect)(()=>{t||n!==null&&i(n.current)},[n,i,t]),r}var Vye=z.Fragment,Hye=Wx(function(e,t){let{ownerDocument:n=null,...r}=e,i=(0,z.useRef)(null),a=Zx(Hhe(e=>{i.current=e}),t),o=mS(i.current),s=Bye(n??o),c=(0,z.useContext)(qye),l=Mx(),u=Vx();return Iye(()=>{var e;s&&s.childNodes.length<=0&&((e=s.parentElement)==null||e.removeChild(s))}),s?(0,yu.createPortal)(z.createElement(`div`,{"data-headlessui-portal":``,ref:e=>{l.dispose(),c&&e&&l.add(c.register(e))}},u({ourProps:{ref:a},theirProps:r,slot:{},defaultTag:Vye,name:`Portal`})),s):null});function Uye(e,t){let n=Zx(t),{enabled:r=!0,ownerDocument:i,...a}=e,o=Vx();return r?z.createElement(Hye,{...a,ownerDocument:i,ref:n}):o({ourProps:{ref:n},theirProps:a,slot:{},defaultTag:Vye,name:`Portal`})}var Wye=z.Fragment,Gye=(0,z.createContext)(null);function Kye(e,t){let{target:n,...r}=e,i={ref:Zx(t)},a=Vx();return z.createElement(Gye.Provider,{value:n},a({ourProps:i,theirProps:r,defaultTag:Wye,name:`Popover.Group`}))}var qye=(0,z.createContext)(null);function Jye(){let e=(0,z.useContext)(qye),t=(0,z.useRef)([]),n=Fx(n=>(t.current.push(n),e&&e.register(n),()=>r(n))),r=Fx(n=>{let r=t.current.indexOf(n);r!==-1&&t.current.splice(r,1),e&&e.unregister(n)}),i=(0,z.useMemo)(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,(0,z.useMemo)(()=>function({children:e}){return z.createElement(qye.Provider,{value:i},e)},[i])]}var Yye=Wx(Uye),Xye=Wx(Kye),Zye=Object.assign(Yye,{Group:Xye}),eC={Idle:{kind:`Idle`},Tracked:e=>({kind:`Tracked`,position:e}),Moved:{kind:`Moved`}};function Qye(e){let t=e.getBoundingClientRect();return`${t.x},${t.y}`}function $ye(e,t,n){let r=jx();if(t.kind===`Tracked`){let i=function(){a!==Qye(e)&&(r.dispose(),n())},{position:a}=t,o=new ResizeObserver(i);o.observe(e),r.add(()=>o.disconnect()),r.addEventListener(window,`scroll`,i,{passive:!0}),r.addEventListener(window,`resize`,i)}return()=>r.dispose()}var ebe=z.Fragment;function tbe(e,t){let{...n}=e,{isFocusVisible:r,focusProps:i}=Ox(),{isHovered:a,hoverProps:o}=Dx({isDisabled:!1}),{pressed:s,pressProps:c}=phe({disabled:!1}),l=Ux({ref:t},i,o,c),u=Ix({hover:a,focus:r,active:s});return Vx()({ourProps:l,theirProps:n,slot:u,defaultTag:ebe,name:`DataInteractive`})}var nbe=Wx(tbe);function rbe(e,t=typeof document<`u`?document.defaultView:null,n){let r=sS(e,`escape`);a_e(t,`keydown`,e=>{r&&(e.defaultPrevented||e.key===$x.Escape&&n(e))})}function ibe(){let[e]=(0,z.useState)(()=>typeof window<`u`&&typeof window.matchMedia==`function`?window.matchMedia(`(pointer: coarse)`):null),[t,n]=(0,z.useState)(e?.matches??!1);return Nx(()=>{if(!e)return;function t(e){n(e.matches)}return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[e]),t}function abe({defaultContainers:e=[],portals:t,mainTreeNode:n}={}){let r=Fx(()=>{let r=Ax(n),i=[];for(let t of e)t!==null&&(Jx(t)?i.push(t):`current`in t&&Jx(t.current)&&i.push(t.current));if(t!=null&&t.current)for(let e of t.current)i.push(e);for(let e of r?.querySelectorAll(`html > *, body > *`)??[])e!==document.body&&e!==document.head&&Jx(e)&&e.id!==`headlessui-portal-root`&&(n&&(e.contains(n)||e.contains(n?.getRootNode()?.host))||i.some(t=>e.contains(t))||i.push(e));return i});return{resolveContainers:r,contains:Fx(e=>r().some(t=>t.contains(e)))}}var obe=(0,z.createContext)(null);function sbe({children:e,node:t}){let[n,r]=(0,z.useState)(null),i=cbe(t??n);return z.createElement(obe.Provider,{value:i},e,i===null&&z.createElement(Ohe,{features:qx.Hidden,ref:e=>{if(e){for(let t of Ax(e)?.querySelectorAll(`html > *, body > *`)??[])if(t!==document.body&&t!==document.head&&Jx(t)&&t!=null&&t.contains(e)){r(t);break}}}}))}function cbe(e=null){return(0,z.useContext)(obe)??e}function lbe(){let e=typeof document>`u`;return`useSyncExternalStore`in z&&(e=>e.useSyncExternalStore)(z)(()=>()=>{},()=>!1,()=>!e)}function tC(){let e=lbe(),[t,n]=z.useState(kx.isHandoffComplete);return t&&kx.isHandoffComplete===!1&&n(!1),z.useEffect(()=>{t!==!0&&n(!0)},[t]),z.useEffect(()=>kx.handoff(),[]),!e&&t}function ube(){let e=(0,z.useRef)(!1);return Nx(()=>(e.current=!0,()=>{e.current=!1}),[]),e}var nC=(e=>(e[e.Forwards=0]=`Forwards`,e[e.Backwards=1]=`Backwards`,e))(nC||{});function dbe(){let e=(0,z.useRef)(0);return Qge(!0,`keydown`,t=>{t.key===`Tab`&&(e.current=+!!t.shiftKey)},!0),e}function fbe(e){if(!e)return new Set;if(typeof e==`function`)return new Set(e());let t=new Set;for(let n of e.current)Jx(n.current)&&t.add(n.current);return t}var pbe=`div`,rC=(e=>(e[e.None=0]=`None`,e[e.InitialFocus=1]=`InitialFocus`,e[e.TabLock=2]=`TabLock`,e[e.FocusLock=4]=`FocusLock`,e[e.RestoreFocus=8]=`RestoreFocus`,e[e.AutoFocus=16]=`AutoFocus`,e))(rC||{});function mbe(e,t){let n=(0,z.useRef)(null),r=Zx(n,t),{initialFocus:i,initialFocusFallback:a,containers:o,features:s=15,...c}=e;tC()||(s=0);let l=mS(n.current);vbe(s,{ownerDocument:l});let u=ybe(s,{ownerDocument:l,container:n,initialFocus:i,initialFocusFallback:a});bbe(s,{ownerDocument:l,container:n,containers:o,previousActiveElement:u});let d=dbe(),f=Fx(e=>{if(!Yx(n.current))return;let t=n.current;(e=>e())(()=>{Rx(d.current,{[nC.Forwards]:()=>{fS(t,uS.First,{skipElements:[e.relatedTarget,a]})},[nC.Backwards]:()=>{fS(t,uS.Last,{skipElements:[e.relatedTarget,a]})}})})}),p=sS(!!(s&2),`focus-trap#tab-lock`),m=Mx(),h=(0,z.useRef)(!1),g={ref:r,onKeyDown(e){e.key==`Tab`&&(h.current=!0,m.requestAnimationFrame(()=>{h.current=!1}))},onBlur(e){if(!(s&4))return;let t=fbe(o);Yx(n.current)&&t.add(n.current);let r=e.relatedTarget;Xx(r)&&r.dataset.headlessuiFocusGuard!==`true`&&(xbe(t,r)||(h.current?fS(n.current,Rx(d.current,{[nC.Forwards]:()=>uS.Next,[nC.Backwards]:()=>uS.Previous})|uS.WrapAround,{relativeTo:e.target}):Xx(e.target)&&dS(e.target)))}},_=Vx();return z.createElement(z.Fragment,null,p&&z.createElement(Ohe,{as:`button`,type:`button`,"data-headlessui-focus-guard":!0,onFocus:f,features:qx.Focusable}),_({ourProps:g,theirProps:c,defaultTag:pbe,name:`FocusTrap`}),p&&z.createElement(Ohe,{as:`button`,type:`button`,"data-headlessui-focus-guard":!0,onFocus:f,features:qx.Focusable}))}var hbe=Wx(mbe),gbe=Object.assign(hbe,{features:rC});function _be(e=!0){let t=(0,z.useRef)(ZS.slice());return E_e(([e],[n])=>{n===!0&&e===!1&&uhe(()=>{t.current.splice(0)}),n===!1&&e===!0&&(t.current=ZS.slice())},[e,ZS,t]),Fx(()=>t.current.find(e=>e!=null&&e.isConnected)??null)}function vbe(e,{ownerDocument:t}){let n=!!(e&8),r=_be(n);E_e(()=>{n||lhe(t?.body)&&dS(r())},[n]),Iye(()=>{n&&dS(r())})}function ybe(e,{ownerDocument:t,container:n,initialFocus:r,initialFocusFallback:i}){let a=(0,z.useRef)(null),o=sS(!!(e&1),`focus-trap#initial-focus`),s=ube();return E_e(()=>{if(e===0)return;if(!o){i!=null&&i.current&&dS(i.current);return}let c=n.current;c&&uhe(()=>{if(!s.current)return;let n=t?.activeElement;if(r!=null&&r.current){if(r?.current===n){a.current=n;return}}else if(c.contains(n)){a.current=n;return}if(r!=null&&r.current)dS(r.current);else{if(e&16){if(fS(c,uS.First|uS.AutoFocus)!==Lge.Error)return}else if(fS(c,uS.First)!==Lge.Error)return;if(i!=null&&i.current&&(dS(i.current),t?.activeElement===i.current))return;console.warn(`There are no focusable elements inside the <FocusTrap />`)}a.current=t?.activeElement})},[i,o,e]),a}function bbe(e,{ownerDocument:t,container:n,containers:r,previousActiveElement:i}){let a=ube(),o=!!(e&4);a_e(t?.defaultView,`focus`,e=>{if(!o||!a.current)return;let t=fbe(r);Yx(n.current)&&t.add(n.current);let s=i.current;if(!s)return;let c=e.target;Yx(c)?xbe(t,c)?(i.current=c,dS(c)):(e.preventDefault(),e.stopPropagation(),dS(s)):dS(i.current)},!0)}function xbe(e,t){for(let n of e)if(n.contains(t))return!0;return!1}function Sbe(e){return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||!Kx(e.as??Dbe)||z.Children.count(e.children)===1}var iC=(0,z.createContext)(null);iC.displayName=`TransitionContext`;var Cbe=(e=>(e.Visible=`visible`,e.Hidden=`hidden`,e))(Cbe||{});function wbe(){let e=(0,z.useContext)(iC);if(e===null)throw Error(`A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.`);return e}function Tbe(){let e=(0,z.useContext)(aC);if(e===null)throw Error(`A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.`);return e}var aC=(0,z.createContext)(null);aC.displayName=`NestingContext`;function oC(e){return`children`in e?oC(e.children):e.current.filter(({el:e})=>e.current!==null).filter(({state:e})=>e===`visible`).length>0}function Ebe(e,t){let n=Px(e),r=(0,z.useRef)([]),i=ube(),a=Mx(),o=Fx((e,t=Bx.Hidden)=>{let o=r.current.findIndex(({el:t})=>t===e);o!==-1&&(Rx(t,{[Bx.Unmount](){r.current.splice(o,1)},[Bx.Hidden](){r.current[o].state=`hidden`}}),a.microTask(()=>{var e;!oC(r)&&i.current&&((e=n.current)==null||e.call(n))}))}),s=Fx(e=>{let t=r.current.find(({el:t})=>t===e);return t?t.state!==`visible`&&(t.state=`visible`):r.current.push({el:e,state:`visible`}),()=>o(e,Bx.Unmount)}),c=(0,z.useRef)([]),l=(0,z.useRef)(Promise.resolve()),u=(0,z.useRef)({enter:[],leave:[]}),d=Fx((e,n,r)=>{c.current.splice(0),t&&(t.chains.current[n]=t.chains.current[n].filter(([t])=>t!==e)),t?.chains.current[n].push([e,new Promise(e=>{c.current.push(e)})]),t?.chains.current[n].push([e,new Promise(e=>{Promise.all(u.current[n].map(([e,t])=>t)).then(()=>e())})]),n===`enter`?l.current=l.current.then(()=>t?.wait.current).then(()=>r(n)):r(n)}),f=Fx((e,t,n)=>{Promise.all(u.current[t].splice(0).map(([e,t])=>t)).then(()=>{var e;(e=c.current.shift())==null||e()}).then(()=>n(t))});return(0,z.useMemo)(()=>({children:r,register:s,unregister:o,onStart:d,onStop:f,wait:l,chains:u}),[s,o,r,d,f,u,l])}var Dbe=z.Fragment,Obe=zx.RenderStrategy;function kbe(e,t){var n;let{transition:r=!0,beforeEnter:i,afterEnter:a,beforeLeave:o,afterLeave:s,enter:c,enterFrom:l,enterTo:u,entered:d,leave:f,leaveFrom:p,leaveTo:m,...h}=e,[g,_]=(0,z.useState)(null),v=(0,z.useRef)(null),y=Sbe(e),b=Zx(...y?[v,t,_]:t===null?[]:[t]),x=(n=h.unmount)==null||n?Bx.Unmount:Bx.Hidden,{show:S,appear:C,initial:w}=wbe(),[T,E]=(0,z.useState)(S?`visible`:`hidden`),D=Tbe(),{register:O,unregister:k}=D;Nx(()=>O(v),[O,v]),Nx(()=>{if(x===Bx.Hidden&&v.current){if(S&&T!==`visible`){E(`visible`);return}return Rx(T,{hidden:()=>k(v),visible:()=>O(v)})}},[T,v,O,k,S,x]);let A=tC();Nx(()=>{if(y&&A&&T===`visible`&&v.current===null)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[v,T,A,y]);let j=w&&!C,M=C&&S&&w,N=(0,z.useRef)(!1),ee=Ebe(()=>{N.current||(E(`hidden`),k(v))},D),P=Fx(e=>{N.current=!0;let t=e?`enter`:`leave`;ee.onStart(v,t,e=>{e===`enter`?i?.():e===`leave`&&o?.()})}),te=Fx(e=>{let t=e?`enter`:`leave`;N.current=!1,ee.onStop(v,t,e=>{e===`enter`?a?.():e===`leave`&&s?.()}),t===`leave`&&!oC(ee)&&(E(`hidden`),k(v))});(0,z.useEffect)(()=>{y&&r||(P(S),te(S))},[S,y,r]);let[,F]=b_e(!(!r||!y||!A||j),g,S,{start:P,end:te}),ne=Gx({ref:b,className:hhe(h.className,M&&c,M&&l,F.enter&&c,F.enter&&F.closed&&l,F.enter&&!F.closed&&u,F.leave&&f,F.leave&&!F.closed&&p,F.leave&&F.closed&&m,!F.transition&&S&&d)?.trim()||void 0,...y_e(F)}),I=0;T===`visible`&&(I|=YS.Open),T===`hidden`&&(I|=YS.Closed),S&&T===`hidden`&&(I|=YS.Opening),!S&&T===`visible`&&(I|=YS.Closing);let re=Vx();return z.createElement(aC.Provider,{value:ee},z.createElement(Mye,{value:I},re({ourProps:ne,theirProps:h,defaultTag:Dbe,features:Obe,visible:T===`visible`,name:`Transition.Child`})))}function Abe(e,t){let{show:n,appear:r=!1,unmount:i=!0,...a}=e,o=(0,z.useRef)(null),s=Zx(...Sbe(e)?[o,t]:t===null?[]:[t]);tC();let c=XS();if(n===void 0&&c!==null&&(n=(c&YS.Open)===YS.Open),n===void 0)throw Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[l,u]=(0,z.useState)(n?`visible`:`hidden`),d=Ebe(()=>{n||u(`hidden`)}),[f,p]=(0,z.useState)(!0),m=(0,z.useRef)([n]);Nx(()=>{f!==!1&&m.current[m.current.length-1]!==n&&(m.current.push(n),p(!1))},[m,n]);let h=(0,z.useMemo)(()=>({show:n,appear:r,initial:f}),[n,r,f]);Nx(()=>{n?u(`visible`):!oC(d)&&o.current!==null&&u(`hidden`)},[n,d]);let g={unmount:i},_=Fx(()=>{var t;f&&p(!1),(t=e.beforeEnter)==null||t.call(e)}),v=Fx(()=>{var t;f&&p(!1),(t=e.beforeLeave)==null||t.call(e)}),y=Vx();return z.createElement(aC.Provider,{value:d},z.createElement(iC.Provider,{value:h},y({ourProps:{...g,as:z.Fragment,children:z.createElement(Nbe,{ref:s,...g,...a,beforeEnter:_,beforeLeave:v})},theirProps:{},defaultTag:z.Fragment,features:Obe,visible:l===`visible`,name:`Transition`})))}function jbe(e,t){let n=(0,z.useContext)(iC)!==null,r=XS()!==null;return z.createElement(z.Fragment,null,!n&&r?z.createElement(Mbe,{ref:t,...e}):z.createElement(Nbe,{ref:t,...e}))}var Mbe=Wx(Abe),Nbe=Wx(kbe),sC=Wx(jbe),cC=Object.assign(Mbe,{Child:sC,Root:Mbe}),Pbe=(e=>(e[e.Open=0]=`Open`,e[e.Closed=1]=`Closed`,e))(Pbe||{}),Fbe=(e=>(e[e.SetTitleId=0]=`SetTitleId`,e))(Fbe||{}),Ibe={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},Lbe=(0,z.createContext)(null);Lbe.displayName=`DialogContext`;function lC(e){let t=(0,z.useContext)(Lbe);if(t===null){let t=Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,lC),t}return t}function Rbe(e,t){return Rx(t.type,Ibe,e,t)}var zbe=Wx(function(e,t){let n=(0,z.useId)(),{id:r=`headlessui-dialog-${n}`,open:i,onClose:a,initialFocus:o,role:s=`dialog`,autoFocus:c=!0,__demoMode:l=!1,unmount:u=!1,...d}=e,f=(0,z.useRef)(!1);s=function(){return s===`dialog`||s===`alertdialog`?s:(f.current||(f.current=!0,console.warn(`Invalid role [${s}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),`dialog`)}();let p=XS();i===void 0&&p!==null&&(i=(p&YS.Open)===YS.Open);let m=(0,z.useRef)(null),h=Zx(m,t),g=mS(m.current),_=+!i,[v,y]=(0,z.useReducer)(Rbe,{titleId:null,descriptionId:null,panelRef:(0,z.createRef)()}),b=Fx(()=>a(!1)),x=Fx(e=>y({type:0,id:e})),S=tC()?_===0:!1,[C,w]=Jye(),T={get current(){return v.panelRef.current??m.current}},E=cbe(),{resolveContainers:D}=abe({mainTreeNode:E,portals:C,defaultContainers:[T]}),O=p!==null&&(p&YS.Closing)===YS.Closing;Pge(l||O?!1:S,{allowed:Fx(()=>[m.current?.closest(`[data-headlessui-portal]`)??null]),disallowed:Fx(()=>[E?.closest(`body > *:not(#headlessui-portal-root)`)??null])});let k=aS.get(null);Nx(()=>{if(S)return k.actions.push(r),()=>k.actions.pop(r)},[k,r,S]);let A=oS(k,(0,z.useCallback)(e=>k.selectors.isTop(e,r),[k,r]));e_e(A,D,e=>{e.preventDefault(),b()}),rbe(A,g?.defaultView,e=>{e.preventDefault(),e.stopPropagation(),document.activeElement&&`blur`in document.activeElement&&typeof document.activeElement.blur==`function`&&document.activeElement.blur(),b()}),m_e(l||O?!1:S,g,D),Fge(S,m,b);let[j,M]=Ghe(),N=(0,z.useMemo)(()=>[{dialogState:_,close:b,setTitleId:x,unmount:u},v],[_,b,x,u,v]),ee=Ix({open:_===0}),P={ref:h,id:r,role:s,tabIndex:-1,"aria-modal":l?void 0:_===0||void 0,"aria-labelledby":v.titleId,"aria-describedby":j,unmount:u},te=!ibe(),F=rC.None;S&&!l&&(F|=rC.RestoreFocus,F|=rC.TabLock,c&&(F|=rC.AutoFocus),te&&(F|=rC.InitialFocus));let ne=Vx();return z.createElement(Nye,null,z.createElement(zye,{force:!0},z.createElement(Zye,null,z.createElement(Lbe.Provider,{value:N},z.createElement(Xye,{target:m},z.createElement(zye,{force:!1},z.createElement(M,{slot:ee},z.createElement(w,null,z.createElement(gbe,{initialFocus:o,initialFocusFallback:m,containers:D,features:F},z.createElement(ige,{value:b},ne({ourProps:P,theirProps:d,slot:ee,defaultTag:Bbe,features:Vbe,visible:_===0,name:`Dialog`})))))))))))}),Bbe=`div`,Vbe=zx.RenderStrategy|zx.Static;function Hbe(e,t){let{transition:n=!1,open:r,...i}=e,a=XS(),o=e.hasOwnProperty(`open`)||a!==null,s=e.hasOwnProperty(`onClose`);if(!o&&!s)throw Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!o)throw Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!s)throw Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!a&&typeof e.open!=`boolean`)throw Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);if(typeof e.onClose!=`function`)throw Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${e.onClose}`);return(r!==void 0||n)&&!i.static?z.createElement(sbe,null,z.createElement(cC,{show:r,transition:n,unmount:i.unmount},z.createElement(zbe,{ref:t,...i}))):z.createElement(sbe,null,z.createElement(zbe,{ref:t,open:r,...i}))}var Ube=`div`;function Wbe(e,t){let n=(0,z.useId)(),{id:r=`headlessui-dialog-panel-${n}`,transition:i=!1,...a}=e,[{dialogState:o,unmount:s},c]=lC(`Dialog.Panel`),l=Zx(t,c.panelRef),u=Ix({open:o===0}),d={ref:l,id:r,onClick:Fx(e=>{e.stopPropagation()})},f=i?sC:z.Fragment,p=i?{unmount:s}:{},m=Vx();return z.createElement(f,{...p},m({ourProps:d,theirProps:a,slot:u,defaultTag:Ube,name:`Dialog.Panel`}))}var Gbe=`div`;function Kbe(e,t){let{transition:n=!1,...r}=e,[{dialogState:i,unmount:a}]=lC(`Dialog.Backdrop`),o=Ix({open:i===0}),s={ref:t,"aria-hidden":!0},c=n?sC:z.Fragment,l=n?{unmount:a}:{},u=Vx();return z.createElement(c,{...l},u({ourProps:s,theirProps:r,slot:o,defaultTag:Gbe,name:`Dialog.Backdrop`}))}var qbe=`h2`;function Jbe(e,t){let n=(0,z.useId)(),{id:r=`headlessui-dialog-title-${n}`,...i}=e,[{dialogState:a,setTitleId:o}]=lC(`Dialog.Title`),s=Zx(t);(0,z.useEffect)(()=>(o(r),()=>o(null)),[r,o]);let c=Ix({open:a===0}),l={ref:s,id:r};return Vx()({ourProps:l,theirProps:i,slot:c,defaultTag:qbe,name:`Dialog.Title`})}var Ybe=Wx(Hbe),Xbe=Wx(Wbe);Wx(Kbe);var Zbe=Wx(Jbe),uC=Object.assign(Ybe,{Panel:Xbe,Title:Zbe,Description:Yhe}),Qbe=`input`;function $be(e,t){let n=(0,z.useId)(),r=Ahe(),i=Lx(),{id:a=r||`headlessui-input-${n}`,disabled:o=i||!1,autoFocus:s=!1,invalid:c=!1,...l}=e,u=Zhe(),d=Whe(),{isFocused:f,focusProps:p}=Ox({autoFocus:s}),{isHovered:m,hoverProps:h}=Dx({isDisabled:o}),g=Ux({ref:t,id:a,"aria-labelledby":u,"aria-describedby":d,"aria-invalid":c?`true`:void 0,disabled:o||void 0,autoFocus:s},p,h),_=Ix({disabled:o,invalid:c,hover:m,focus:f,autofocus:s});return Vx()({ourProps:g,theirProps:l,slot:_,defaultTag:Qbe,name:`Input`})}var exe=Wx($be),txe=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function nxe(e){let t=e.innerText??``,n=e.cloneNode(!0);if(!Yx(n))return t;let r=!1;for(let e of n.querySelectorAll(`[hidden],[aria-hidden],[role="img"]`))e.remove(),r=!0;let i=r?n.innerText??``:t;return txe.test(i)&&(i=i.replace(txe,``)),i}function rxe(e){let t=e.getAttribute(`aria-label`);if(typeof t==`string`)return t.trim();let n=e.getAttribute(`aria-labelledby`);if(n){let e=n.split(` `).map(e=>{let t=document.getElementById(e);if(t){let e=t.getAttribute(`aria-label`);return typeof e==`string`?e.trim():nxe(t).trim()}return null}).filter(Boolean);if(e.length>0)return e.join(`, `)}return nxe(e).trim()}function ixe(e){let t=(0,z.useRef)(``),n=(0,z.useRef)(``);return Fx(()=>{let r=e.current;if(!r)return``;let i=r.innerText;if(t.current===i)return n.current;let a=rxe(r).trim().toLowerCase();return t.current=i,n.current=a,a})}var axe=Object.defineProperty,oxe=(e,t,n)=>t in e?axe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sxe=(e,t,n)=>(oxe(e,typeof t==`symbol`?t:t+``,n),n),dC=(e=>(e[e.Open=0]=`Open`,e[e.Closed=1]=`Closed`,e))(dC||{}),fC=(e=>(e[e.Pointer=0]=`Pointer`,e[e.Other=1]=`Other`,e))(fC||{}),pC=(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.RegisterItems=5]=`RegisterItems`,e[e.UnregisterItems=6]=`UnregisterItems`,e[e.SetButtonElement=7]=`SetButtonElement`,e[e.SetItemsElement=8]=`SetItemsElement`,e[e.SortItems=9]=`SortItems`,e[e.MarkButtonAsMoved=10]=`MarkButtonAsMoved`,e))(pC||{});function cxe(e,t=e=>e){let n=e.activeItemIndex===null?null:e.items[e.activeItemIndex],r=qge(t(e.items.slice()),e=>e.dataRef.current.domRef.current),i=n?r.indexOf(n):null;return i===-1&&(i=null),{items:r,activeItemIndex:i}}var lxe={1(e){if(e.menuState===1)return e;let t=e.buttonElement?eC.Tracked(Qye(e.buttonElement)):e.buttonPositionState;return{...e,activeItemIndex:null,pendingFocus:{focus:QS.Nothing},menuState:1,buttonPositionState:t}},0(e,t){return e.menuState===0?e:{...e,__demoMode:!1,pendingFocus:t.focus,menuState:0,buttonPositionState:eC.Idle}},2:(e,t)=>{if(e.menuState===1)return e;let n={...e,searchQuery:``,activationTrigger:t.trigger??1,__demoMode:!1};if(t.focus===QS.Nothing)return{...n,activeItemIndex:null};if(t.focus===QS.Specific)return{...n,activeItemIndex:e.items.findIndex(e=>e.id===t.id)};if(t.focus===QS.Previous){let r=e.activeItemIndex;if(r!==null){let i=e.items[r].dataRef.current.domRef,a=$S(t,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(a!==null){let t=e.items[a].dataRef.current.domRef;if(i.current?.previousElementSibling===t.current||t.current?.previousElementSibling===null)return{...n,activeItemIndex:a}}}}else if(t.focus===QS.Next){let r=e.activeItemIndex;if(r!==null){let i=e.items[r].dataRef.current.domRef,a=$S(t,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(a!==null){let t=e.items[a].dataRef.current.domRef;if(i.current?.nextElementSibling===t.current||t.current?.nextElementSibling===null)return{...n,activeItemIndex:a}}}}let r=cxe(e),i=$S(t,{resolveItems:()=>r.items,resolveActiveIndex:()=>r.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...n,...r,activeItemIndex:i}},3:(e,t)=>{let n=+(e.searchQuery===``),r=e.searchQuery+t.value.toLowerCase(),i=(e.activeItemIndex===null?e.items:e.items.slice(e.activeItemIndex+n).concat(e.items.slice(0,e.activeItemIndex+n))).find(e=>e.dataRef.current.textValue?.startsWith(r)&&!e.dataRef.current.disabled),a=i?e.items.indexOf(i):-1;return a===-1||a===e.activeItemIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeItemIndex:a,activationTrigger:1}},4(e){return e.searchQuery===``?e:{...e,searchQuery:``,searchActiveItemIndex:null}},5:(e,t)=>{let n=e.items.concat(t.items.map(e=>e)),r=e.activeItemIndex;return e.pendingFocus.focus!==QS.Nothing&&(r=$S(e.pendingFocus,{resolveItems:()=>n,resolveActiveIndex:()=>e.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled})),{...e,items:n,activeItemIndex:r,pendingFocus:{focus:QS.Nothing},pendingShouldSort:!0}},6:(e,t)=>{let n=e.items,r=[],i=new Set(t.items);for(let[e,t]of n.entries())if(i.has(t.id)&&(r.push(e),i.delete(t.id),i.size===0))break;if(r.length>0){n=n.slice();for(let e of r.reverse())n.splice(e,1)}return{...e,items:n,activationTrigger:1}},7:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},8:(e,t)=>e.itemsElement===t.element?e:{...e,itemsElement:t.element},9:e=>e.pendingShouldSort?{...e,...cxe(e),pendingShouldSort:!1}:e,10(e){return e.buttonPositionState.kind===`Tracked`?{...e,buttonPositionState:eC.Moved}:e}},uxe=class e extends gge{constructor(e){super(e),sxe(this,`actions`,{registerItem:bge(()=>{let e=[],t=new Set;return[(n,r)=>{t.has(r)||(t.add(r),e.push({id:n,dataRef:r}))},()=>(t.clear(),this.send({type:5,items:e.splice(0)}))]}),unregisterItem:bge(()=>{let e=[];return[t=>e.push(t),()=>this.send({type:6,items:e.splice(0)})]})}),sxe(this,`selectors`,{activeDescendantId(e){var t;let n=e.activeItemIndex,r=e.items;return n===null||(t=r[n])==null?void 0:t.id},isActive(e,t){let n=e.activeItemIndex,r=e.items;return n!==null&&r[n]?.id===t},shouldScrollIntoView(e,t){return e.__demoMode||e.menuState!==0||e.activationTrigger===0?!1:this.isActive(e,t)},didButtonMove(e){return e.buttonPositionState.kind===`Moved`}}),this.on(5,()=>{this.disposables.requestAnimationFrame(()=>{this.send({type:9})})});{let e=this.state.id,t=aS.get(null);this.disposables.add(t.on(wge.Push,n=>{!t.selectors.isTop(n,e)&&this.state.menuState===0&&this.send({type:1})})),this.on(0,()=>t.actions.push(e)),this.on(1,()=>t.actions.pop(e))}this.disposables.group(e=>{this.on(1,t=>{t.buttonElement&&(e.dispose(),e.add($ye(t.buttonElement,t.buttonPositionState,()=>{this.send({type:10})})))})})}static new({id:t,__demoMode:n=!1}){return new e({id:t,__demoMode:n,menuState:+!n,buttonElement:null,itemsElement:null,items:[],searchQuery:``,activeItemIndex:null,activationTrigger:1,pendingShouldSort:!1,pendingFocus:{focus:QS.Nothing},buttonPositionState:eC.Idle})}reduce(e,t){return Rx(t.type,lxe,e,t)}},dxe=(0,z.createContext)(null);function fxe(e){let t=(0,z.useContext)(dxe);if(t===null){let t=Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,pxe),t}return t}function pxe({id:e,__demoMode:t=!1}){let n=(0,z.useMemo)(()=>uxe.new({id:e,__demoMode:t}),[]);return Iye(()=>n.dispose()),n}var mxe=z.Fragment;function hxe(e,t){let n=(0,z.useId)(),{__demoMode:r=!1,...i}=e,a=pxe({id:n,__demoMode:r}),[o,s,c]=oS(a,e=>[e.menuState,e.itemsElement,e.buttonElement]),l=Zx(t),u=aS.get(null);e_e(oS(u,(0,z.useCallback)(e=>u.selectors.isTop(e,n),[u,n])),[c,s],(e,t)=>{var n;a.send({type:pC.CloseMenu}),Hge(t,Vge.Loose)||(e.preventDefault(),(n=a.state.buttonElement)==null||n.focus())});let d=Fx(()=>{a.send({type:pC.CloseMenu})}),f=Ix({open:o===dC.Open,close:d}),p={ref:l},m=Vx();return z.createElement(Eye,null,z.createElement(dxe.Provider,{value:a},z.createElement(Mye,{value:Rx(o,{[dC.Open]:YS.Open,[dC.Closed]:YS.Closed})},m({ourProps:p,theirProps:i,slot:f,defaultTag:mxe,name:`Menu`}))))}var gxe=`button`;function _xe(e,t){let n=fxe(`Menu.Button`),r=(0,z.useId)(),{id:i=`headlessui-menu-button-${r}`,disabled:a=!1,autoFocus:o=!1,...s}=e,c=(0,z.useRef)(null),l=Sye(),u=Zx(t,c,xye(),Fx(e=>n.send({type:pC.SetButtonElement,element:e}))),d=Fx(e=>{switch(e.key){case $x.Space:case $x.Enter:case $x.ArrowDown:e.preventDefault(),e.stopPropagation(),n.send({type:pC.OpenMenu,focus:{focus:QS.First}});break;case $x.ArrowUp:e.preventDefault(),e.stopPropagation(),n.send({type:pC.OpenMenu,focus:{focus:QS.Last}})}}),f=Fx(e=>{switch(e.key){case $x.Space:e.preventDefault()}}),[p,m,h]=oS(n,e=>[e.menuState,e.buttonElement,e.itemsElement]);i_e(p===dC.Open,{trigger:m,action:(0,z.useCallback)(e=>{if(m!=null&&m.contains(e.target))return hS.Ignore;let t=e.target.closest(`[role="menuitem"]:not([data-disabled])`);return Yx(t)?hS.Select(t):h!=null&&h.contains(e.target)?hS.Ignore:hS.Close},[m,h]),close:(0,z.useCallback)(()=>n.send({type:pC.CloseMenu}),[]),select:(0,z.useCallback)(e=>e.click(),[])});let g=cge(e=>{var t;a||(p===dC.Open?((0,yu.flushSync)(()=>n.send({type:pC.CloseMenu})),(t=c.current)==null||t.focus({preventScroll:!0})):(e.preventDefault(),n.send({type:pC.OpenMenu,focus:{focus:QS.Nothing},trigger:fC.Pointer})))}),{isFocusVisible:_,focusProps:v}=Ox({autoFocus:o}),{isHovered:y,hoverProps:b}=Dx({isDisabled:a}),{pressed:x,pressProps:S}=phe({disabled:a}),C=Ix({open:p===dC.Open,active:x||p===dC.Open,disabled:a,hover:y,focus:_,autofocus:o}),w=Ux(l(),{ref:u,id:i,type:o_e(e,c.current),"aria-haspopup":`menu`,"aria-controls":h?.id,"aria-expanded":p===dC.Open,disabled:a||void 0,autoFocus:o,onKeyDown:d,onKeyUp:f},g,v,b,S);return Vx()({ourProps:w,theirProps:s,slot:C,defaultTag:gxe,name:`Menu.Button`})}var vxe=`div`,yxe=zx.RenderStrategy|zx.Static;function bxe(e,t){let n=(0,z.useId)(),{id:r=`headlessui-menu-items-${n}`,anchor:i,portal:a=!1,modal:o=!0,transition:s=!1,...c}=e,l=bye(i),u=fxe(`Menu.Items`),[d,f]=wye(l),p=Cye(),[m,h]=(0,z.useState)(null),g=Zx(t,l?d:null,Fx(e=>u.send({type:pC.SetItemsElement,element:e})),h),[_,v]=oS(u,e=>[e.menuState,e.buttonElement]),y=mS(v),b=mS(m);l&&(a=!0);let x=XS(),[S,C]=b_e(s,m,x===null?_===dC.Open:(x&YS.Open)===YS.Open);Fge(S,v,()=>{u.send({type:pC.CloseMenu})});let w=oS(u,e=>e.__demoMode);m_e(!w&&o&&_===dC.Open,b),Pge(!w&&o&&_===dC.Open,{allowed:(0,z.useCallback)(()=>[v,m],[v,m])});let T=!oS(u,u.selectors.didButtonMove)&&S;(0,z.useEffect)(()=>{let e=m;e&&_===dC.Open&&(lhe(e)||e.focus({preventScroll:!0}))},[_,m]),T_e(_===dC.Open,{container:m,accept(e){return e.getAttribute(`role`)===`menuitem`?NodeFilter.FILTER_REJECT:e.hasAttribute(`role`)?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(e){e.setAttribute(`role`,`none`)}});let E=Mx(),D=Fx(e=>{var t,n;switch(E.dispose(),e.key){case $x.Space:if(u.state.searchQuery!==``)return e.preventDefault(),e.stopPropagation(),u.send({type:pC.Search,value:e.key});case $x.Enter:if(e.preventDefault(),e.stopPropagation(),u.state.activeItemIndex!==null){let{dataRef:e}=u.state.items[u.state.activeItemIndex];(t=e.current?.domRef.current)==null||t.click()}u.send({type:pC.CloseMenu}),Uge(u.state.buttonElement);break;case $x.ArrowDown:return e.preventDefault(),e.stopPropagation(),u.send({type:pC.GoToItem,focus:QS.Next});case $x.ArrowUp:return e.preventDefault(),e.stopPropagation(),u.send({type:pC.GoToItem,focus:QS.Previous});case $x.Home:case $x.PageUp:return e.preventDefault(),e.stopPropagation(),u.send({type:pC.GoToItem,focus:QS.First});case $x.End:case $x.PageDown:return e.preventDefault(),e.stopPropagation(),u.send({type:pC.GoToItem,focus:QS.Last});case $x.Escape:e.preventDefault(),e.stopPropagation(),(0,yu.flushSync)(()=>u.send({type:pC.CloseMenu})),(n=u.state.buttonElement)==null||n.focus({preventScroll:!0});break;case $x.Tab:e.preventDefault(),e.stopPropagation(),(0,yu.flushSync)(()=>u.send({type:pC.CloseMenu})),Jge(u.state.buttonElement,e.shiftKey?uS.Previous:uS.Next);break;default:e.key.length===1&&(u.send({type:pC.Search,value:e.key}),E.setTimeout(()=>u.send({type:pC.ClearSearch}),350))}}),O=Fx(e=>{switch(e.key){case $x.Space:e.preventDefault()}}),k=Ix({open:_===dC.Open}),A=Ux(l?p():{},{"aria-activedescendant":oS(u,u.selectors.activeDescendantId),"aria-labelledby":oS(u,e=>e.buttonElement?.id),id:r,onKeyDown:D,onKeyUp:O,role:`menu`,tabIndex:_===dC.Open?0:void 0,ref:g,style:{...c.style,...f,"--button-width":oge(S,v,!0).width},...y_e(C)}),j=Vx();return z.createElement(Zye,{enabled:a?e.static||S:!1,ownerDocument:y},j({ourProps:A,theirProps:c,slot:k,defaultTag:vxe,features:yxe,visible:T,name:`Menu.Items`}))}var xxe=z.Fragment;function Sxe(e,t){let n=(0,z.useId)(),{id:r=`headlessui-menu-item-${n}`,disabled:i=!1,...a}=e,o=fxe(`Menu.Item`),s=oS(o,e=>o.selectors.isActive(e,r)),c=(0,z.useRef)(null),l=Zx(t,c),u=oS(o,e=>o.selectors.shouldScrollIntoView(e,r));Nx(()=>{if(u)return jx().requestAnimationFrame(()=>{var e,t;(t=(e=c.current)?.scrollIntoView)==null||t.call(e,{block:`nearest`})})},[u,c]);let d=ixe(c),f=(0,z.useRef)({disabled:i,domRef:c,get textValue(){return d()}});Nx(()=>{f.current.disabled=i},[f,i]),Nx(()=>(o.actions.registerItem(r,f),()=>o.actions.unregisterItem(r)),[f,r]);let p=Fx(()=>{o.send({type:pC.CloseMenu})}),m=Fx(e=>{if(i)return e.preventDefault();o.send({type:pC.CloseMenu}),Uge(o.state.buttonElement)}),h=Fx(()=>{if(i)return o.send({type:pC.GoToItem,focus:QS.Nothing});o.send({type:pC.GoToItem,focus:QS.Specific,id:r})}),g=g_e(),_=Fx(e=>g.update(e)),v=Fx(e=>{g.wasMoved(e)&&(i||s||o.send({type:pC.GoToItem,focus:QS.Specific,id:r,trigger:fC.Pointer}))}),y=Fx(e=>{g.wasMoved(e)&&(i||s&&o.state.activationTrigger===fC.Pointer&&o.send({type:pC.GoToItem,focus:QS.Nothing}))}),[b,x]=Qhe(),[S,C]=Ghe(),w=Ix({active:s,focus:s,disabled:i,close:p}),T={id:r,ref:l,role:`menuitem`,tabIndex:i===!0?void 0:-1,"aria-disabled":i===!0||void 0,"aria-labelledby":b,"aria-describedby":S,disabled:void 0,onClick:m,onFocus:h,onPointerEnter:_,onMouseEnter:_,onPointerMove:v,onMouseMove:v,onPointerLeave:y,onMouseLeave:y},E=Vx();return z.createElement(x,null,z.createElement(C,null,E({ourProps:T,theirProps:a,slot:w,defaultTag:xxe,name:`Menu.Item`})))}var Cxe=`div`;function wxe(e,t){let[n,r]=Qhe(),i=e,a={ref:t,"aria-labelledby":n,role:`group`},o=Vx();return z.createElement(r,null,o({ourProps:a,theirProps:i,slot:{},defaultTag:Cxe,name:`Menu.Section`}))}var Txe=`header`;function Exe(e,t){let n=(0,z.useId)(),{id:r=`headlessui-menu-heading-${n}`,...i}=e,a=Xhe();Nx(()=>a.register(r),[r,a.register]);let o={id:r,ref:t,role:`presentation`,...a.props};return Vx()({ourProps:o,theirProps:i,slot:{},defaultTag:Txe,name:`Menu.Heading`})}var Dxe=`div`;function Oxe(e,t){let n=e,r={ref:t,role:`separator`};return Vx()({ourProps:r,theirProps:n,slot:{},defaultTag:Dxe,name:`Menu.Separator`})}var kxe=Wx(hxe),Axe=Wx(_xe),jxe=Wx(bxe),Mxe=Wx(Sxe),Nxe=Wx(wxe),Pxe=Wx(Exe),Fxe=Wx(Oxe),Ixe=Object.assign(kxe,{Button:Axe,Items:jxe,Item:Mxe,Section:Nxe,Heading:Pxe,Separator:Fxe}),Lxe=`select`;function Rxe(e,t){let n=(0,z.useId)(),r=Ahe(),i=Lx(),{id:a=r||`headlessui-select-${n}`,disabled:o=i||!1,invalid:s=!1,autoFocus:c=!1,...l}=e,u=Zhe(),d=Whe(),{isFocusVisible:f,focusProps:p}=Ox({autoFocus:c}),{isHovered:m,hoverProps:h}=Dx({isDisabled:o}),{pressed:g,pressProps:_}=phe({disabled:o}),v=Ux({ref:t,id:a,"aria-labelledby":u,"aria-describedby":d,"aria-invalid":s?`true`:void 0,disabled:o||void 0,autoFocus:c},p,h,_),y=Ix({disabled:o,invalid:s,hover:m,focus:f,active:g,autofocus:c});return Vx()({ourProps:v,theirProps:l,slot:y,defaultTag:Lxe,name:`Select`})}var zxe=Wx(Rxe),Bxe,mC,hC=o((()=>{Bxe=u(m(),1),mC=(0,Bxe.createContext)({color:`currentColor`,size:`1em`,weight:`regular`,mirrored:!1})})),Vxe=u(dme(),1);hC();var Hxe=z.createContext((0,z.forwardRef)(function(e,t){return(0,q.jsx)(`a`,{...e,ref:t})})),gC=()=>z.useContext(Hxe),Uxe=({linkComponent:e,children:t})=>(0,q.jsx)(Hxe.Provider,{value:e,children:t}),_C=function({to:e,href:t,...n}){let r=!!t||typeof e==`string`&&e?.startsWith(`http://`)||typeof e==`string`&&e?.startsWith(`https://`),i=gC();return(0,q.jsx)(nbe,{children:(0,q.jsx)(i,{to:e,href:t,isExternal:r,...n})})},vC={base:[`relative isolate inline-flex items-center justify-center gap-x-2 rounded-xl border text-base font-semibold`,`px-4 py-2`,`focus:outline-none data-[focus]:outline data-[focus]:outline-2 data-[focus]:outline-offset-2 data-[focus]:outline-blue-500`,`data-[disabled]:opacity-50`,`transition-[color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,filter,backdrop-filter] duration-150 ease-in-out after:transition before:transition`,`lg:active:hover:scale-95 lg:active:hover:before:opacity-50`],modes:{solid:[`border-transparent`,`dark:bg-[--btn-bg]`,`bg-[--btn-bg]`,`before:absolute before:inset-0 before:-z-10 before:rounded-[calc(theme(borderRadius.xl)-1px)]`,`dark:before:hidden`,`dark:border-white/5`,`after:absolute after:inset-0 after:-z-10 after:rounded-[calc(theme(borderRadius.xl)-1px)]`,`after:shadow-[shadow:inset_0_1px_theme(colors.white/15%)]`,`dark:after:shadow-none`,`after:data-[active]:bg-[--btn-hover-overlay] after:data-[hover]:bg-[--btn-hover-overlay]`,`dark:after:-inset-px dark:after:rounded-xl`,`before:data-[disabled]:shadow-none after:data-[disabled]:shadow-none`],ghost:[`border-transparent`,`hover:dark:bg-[--btn-bg]`,`hover:bg-[--btn-bg]`,`before:absolute before:inset-0 before:-z-10 before:rounded-[calc(theme(borderRadius.xl)-1px)]`,`dark:before:hidden`,`hover:dark:border-white/5`,`after:absolute after:inset-0 after:-z-10 after:rounded-[calc(theme(borderRadius.xl)-1px)]`,`hover:after:shadow-[shadow:inset_0_1px_theme(colors.white/15%)]`,`after:data-[active]:bg-[--btn-hover-overlay] after:data-[hover]:bg-[--btn-hover-overlay]`,`dark:after:-inset-px dark:after:rounded-xl`,`before:data-[disabled]:shadow-none after:data-[disabled]:shadow-none`,`before:shadow-none`]},circular:[`!rounded-full !aspect-square !p-2`,`before:!rounded-full after:!rounded-full dark:after:!rounded-full`],pill:[`!rounded-full`,`before:!rounded-full after:!rounded-full dark:after:!rounded-full`],nowrap:`whitespace-nowrap`,wrap:`whitespace-normal text-center`,small:[`!rounded-md !text-sm !px-1.5 !py-1`,`before:!rounded-md after:!rounded-md dark:after:!rounded-md`],surfaces:{system:[`text-fg-primary dark:text-fg-primary-dark`,`[--btn-bg:theme(colors.system.regular)] [--btn-hover-overlay:theme(colors.white/20%)]`,`dark:[--btn-bg:theme(colors.system.regular-dark)] dark:[--btn-hover-overlay:theme(colors.white/10%)]`,`[--icon-color:theme(colors.fg.secondary)] dark:[--icon-color:theme(colors.fg.secondary-dark)]`,`backdrop-blur-lg`,`hover:before:shadow-lg`],material:[`text-fg-primary dark:text-fg-primary-dark`,`[--btn-bg:theme(colors.material.regular)] [--btn-hover-overlay:theme(colors.white/20%)]`,`dark:[--btn-bg:theme(colors.material.regular-dark)] dark:[--btn-hover-overlay:theme(colors.white/10%)]`,`[--icon-color:theme(colors.fg.secondary)] dark:[--icon-color:theme(colors.fg.secondary-dark)]`,`backdrop-blur-lg`,`hover:before:shadow-lg`],chrome:[`text-fg-primary dark:text-fg-primary-dark`,`[--btn-bg:theme(colors.system.chrome)]`,`dark:[--btn-bg:theme(colors.system.chrome-dark)] dark:[--btn-hover-overlay:theme(colors.white/5%)]`,`[--icon-color:theme(colors.fg.primary)] dark:[--icon-color:theme(colors.fg.primary-dark)]`,`before:shadow hover:before:shadow-lg`],solid:[`text-fg-on-action [--btn-bg:theme(colors.action)] [--btn-hover-overlay:theme(colors.white/15%)]`,`dark:text-fg-on-action-dark dark:[--btn-bg:theme(colors.action)] dark:[--btn-hover-overlay:theme(colors.white/15%)]`,`[--icon-color:theme(colors.fg.on-action)] dark:[--icon-color:theme(colors.fg.on-action-dark)]`,`before:shadow hover:before:shadow-lg`],tinted:[`text-action [--btn-bg:theme(colors.action/20%)] [--btn-hover-overlay:theme(colors.white/15%)]`,`dark:text-action dark:[--btn-bg:theme(colors.action/20%)] dark:[--btn-hover-overlay:theme(colors.white/10%)]`,`[--icon-color:theme(colors.action)] dark:[--icon-color:theme(colors.action)]`,`backdrop-blur-lg`],ghost:[`text-fg-primary dark:text-fg-primary-dark`,`[--btn-bg:transparent]`,`dark:[--btn-bg:transparent]`,`[--icon-color:theme(colors.fg.primary)] dark:[--icon-color:theme(colors.fg.primary-dark)]`,`dark:border-none`,`!px-0`]}},Wxe={color:`var(--icon-color)`,weight:`bold`,size:`1.25rem`},yC=(0,z.forwardRef)(function({surface:e=`system`,mode:t=`solid`,small:n=!1,circular:r=!1,pill:i=!1,wrap:a=!1,children:o,className:s,iconProps:c={},...l},u){let d=yx(s,vC.base,vC.modes[t],vC.surfaces[e],a?vC.wrap:vC.nowrap,n&&vC.small,i&&vC.pill,r&&vC.circular),f={...Wxe,...c},p=`href`in l&&l.href!=null||`to`in l&&l.to!=null,m=gC();return p?(0,q.jsx)(m,{...l,className:d,ref:u,children:(0,q.jsx)(mC.Provider,{value:f,children:(0,q.jsx)(bC,{children:o})})}):(0,q.jsx)(The,{...l,className:yx(d,`cursor-pointer data-[disabled]:cursor-not-allowed`),ref:u,children:(0,q.jsx)(mC.Provider,{value:f,children:(0,q.jsx)(bC,{children:o})})})});function bC({children:e}){return(0,q.jsxs)(q.Fragment,{children:[e,(0,q.jsx)(`span`,{className:`absolute left-1/2 top-1/2 size-[max(100%,2.75rem)] -translate-x-1/2 -translate-y-1/2 [@media(pointer:fine)]:hidden`,"aria-hidden":`true`})]})}var xC=({src:e=null,square:t=!1,initials:n,alt:r=``,className:i,noBorder:a=!1,children:o,...s})=>{let c=n?(e=>{if(!e)return;let t=0;return e.split(``).forEach(e=>{t=e.charCodeAt(0)+((t<<5)-t)}),`hsl(${t%360}, 40%, 60%)`})(n):void 0;return(0,q.jsxs)(`span`,{"data-slot":`avatar`,...s,className:yx(i,`inline-grid shrink-0 align-middle [--avatar-radius:20%] [--ring-opacity:20%] *:col-start-1 *:row-start-1`,!a&&`bg-gray-100/50 dark:bg-material-thin-dark backdrop-blur-md border-2 border-system-chrome dark:border-system-chrome-dark`,t?`rounded-[--avatar-radius] *:rounded-[--avatar-radius]`:`rounded-full *:rounded-full`),children:[e?(0,q.jsx)(`img`,{src:e,alt:r,className:`object-cover object-center aspect-square`}):n?(0,q.jsxs)(`svg`,{className:`select-none fill-current w-full h-full font-medium uppercase`,style:{backgroundColor:(0,Vxe.default)(c).alpha(.7).toString(),color:(0,Vxe.default)(c).darken(.6).toString(),fontSize:`400%`},viewBox:`0 0 100 100`,"aria-hidden":r?void 0:`true`,children:[r?(0,q.jsx)(`title`,{children:r}):null,(0,q.jsx)(`text`,{x:`50%`,y:`50%`,alignmentBaseline:`middle`,dominantBaseline:`middle`,textAnchor:`middle`,dy:`.125em`,children:n})]}):null,o]})},Gxe=`[&[data-focus]]:!outline-none [&[data-focus]]:!outline-0 [&[data-focus]]:!outline-offset-0 data-[focus]:ring-2 data-[focus]:ring-offset-2 data-[focus]:ring-offset-system-screen dark:data-[focus]:ring-offset-system-screen-dark data-[focus]:ring-action`;(0,z.forwardRef)(function({src:e,square:t=!1,initials:n,alt:r,className:i,avatarClassName:a,noBorder:o,children:s,surface:c=`system`,mode:l=`ghost`,small:u=!1,circular:d=!0,pill:f=!1,...p},m){return(0,q.jsx)(yC,{...p,surface:c,mode:l,small:u,circular:d,pill:f,className:yx(Gxe,i),ref:m,children:(0,q.jsx)(xC,{src:e,square:t,initials:n,alt:r,noBorder:o,className:yx(a,`border-none`),children:s})})}),hC();var Kxe={color:`var(--icon-color)`,weight:`fill`,size:`16px`},qxe=(0,z.forwardRef)(function({className:e,direction:t=`cols`,...n},r){return(0,q.jsx)(mC.Provider,{value:Kxe,children:(0,q.jsx)(`div`,{ref:r,className:yx(e,`[--anchor-gap:theme(spacing.2)] [--anchor-padding:theme(spacing.3)] data-[anchor~=end]:[--anchor-offset:4px] data-[anchor~=start]:[--anchor-offset:-4px]`,`origin-top-left isolate rounded-lg`,`outline outline-1 outline-transparent focus:outline-none`,`overflow-y-auto`,`bg-material-chrome backdrop-blur-xl dark:bg-material-regular-dark`,`shadow-lg ring-1 ring-system-thick dark:ring-inset dark:ring-system-thick-dark`,`supports-[grid-template-columns:subgrid]:grid`,t===`cols`?`supports-[grid-template-columns:subgrid]:grid-cols-[auto_auto_auto]`:`supports-[grid-template-columns:subgrid]:grid-rows-[auto_auto_auto]`,`transition-opacity data-[closed]:data-[leave]:opacity-0 data-[leave]:duration-100 data-[leave]:ease-in`),...n})})}),Jxe=(0,z.forwardRef)(function({active:e,className:t,href:n,to:r,...i},a){let o=yx(t,`group cursor-pointer inline-flex rounded-md px-3 py-2 focus:outline-none sm:px-3 sm:py-1.5`,`text-left text-base/6 text-fg-primary sm:text-sm/6 dark:text-fg-primary-dark forced-colors:text-[CanvasText]`,`data-[focus]:bg-system-thin dark:data-[focus]:bg-system-thin-dark`,`focus:bg-system-thin dark:focus:bg-system-thin-dark`,`hover:bg-system-thin dark:hover:bg-system-thin-dark`,`data-[disabled]:opacity-50`,`disabled:opacity-50`,`forced-color-adjust-none forced-colors:focus:bg-[Highlight] forced-colors:focus:text-[HighlightText] forced-colors:[&>[data-slot=icon]]:focus:text-[HighlightText]`,`forced-colors:data-[focus]:bg-[Highlight] forced-colors:data-[focus]:text-[HighlightText] forced-colors:[&>[data-slot=icon]]:data-[focus]:text-[HighlightText]`,`col-span-full grid grid-cols-[auto_auto_auto] items-center supports-[grid-template-columns:subgrid]:grid-cols-subgrid`,`[--icon-color:theme(colors.fg.secondary)] dark:[--icon-color:theme(colors.fg.secondary-dark)]`,`gap-x-1`,e?`bg-system-thin dark:bg-system-thin-dark`:null),s=gC();return n||r?(0,q.jsx)(s,{...i,href:n,to:r,className:o,ref:a}):(0,q.jsx)(`button`,{...i,type:`button`,className:o,ref:a})});hC();var Yxe={color:`var(--icon-color)`,weight:`fill`,size:`16px`};function Xxe(e){let{as:t=`div`,...n}=e;return(0,q.jsx)(Ixe,{as:t,...n})}function Zxe(e){let{className:t,...n}=e;return(0,q.jsx)(Axe,{as:yC,...n,className:yx(`lg:active:hover:!scale-100`,t)})}function Qxe(e,t){let n=e?.split(/\s+/).some(e=>/^!?w-/.test(e));return yx(e,!n&&t)}function $xe({anchor:e=`bottom`,className:t,portal:n=!0,...r}){return(0,q.jsx)(jxe,{transition:!0,...r,anchor:n?e:void 0,as:qxe,className:e=>Qxe(typeof t==`function`?t(e):t,`w-max`)})}function SC(e){return(0,q.jsx)(mC.Provider,{value:Yxe,children:(0,q.jsx)(Mxe,{as:Jxe,...e})})}function eSe({className:e,...t}){return(0,q.jsx)(Fxe,{...t,className:yx(e,`col-span-full mx-3.5 my-1 h-px border-0 bg-zinc-950/5 sm:mx-3 dark:bg-white/10 forced-colors:bg-[CanvasText]`)})}function CC({className:e,...t}){return(0,q.jsx)(nge,{...t,"data-slot":`label`,className:yx(e,`col-start-2 row-start-1`),...t})}var wC={card:[`flex flex-col group`,`relative`,`rounded-card-lg`,`shadow-lg`,`dark:border-white/5 dark:border`],childRadius:[`[&>:first-child]:rounded-t-card-lg [&>:last-child]:rounded-b-card-lg`,`[&>:first-child]:before:rounded-t-card-lg [&>:first-child]:after:rounded-t-card-lg`,`[&>:last-child]:before:rounded-b-card-lg [&>:last-child]:after:rounded-b-card-lg`],backgroundColor:[`bg-system-chrome dark:bg-system-chrome-dark`],interactive:[`transition-all`,`hover:-translate-y-0.5 active:hover:scale-[98%] hover:shadow-xl`,`group-hover:-translate-y-0.5 group-hover:shadow-xl group-active:hover:scale-[98%]`],cardNonResponsive:[`[&>*]:min-w-full`],responsive:[`md:flex-row`],responsiveChildRadius:[`md:[&>:first-child]:rounded-none md:[&>:last-child]:rounded-none`,`md:[&>:first-child]:before:rounded-none md:[&>:first-child]:after:rounded-none`,`md:[&>:last-child]:before:rounded-none md:[&>:last-child]:after:rounded-none`,`md:[&>:first-child]:rounded-l-card-lg md:[&>:last-child]:rounded-r-card-lg`,`md:[&>:first-child]:before:rounded-l-card-lg md:[&>:first-child]:after:rounded-l-card-lg`,`md:[&>:last-child]:before:rounded-r-card-lg md:[&>:last-child]:after:rounded-r-card-lg`],cardContent:[`p-4 relative z-0`,`content-center`,`before:z-[-1] before:bg-bottom before:bg-cover before:bg-no-repeat before:[background-image:var(--blurBackground)] before:absolute before`,`after:z-[-1] after:backdrop-blur-xl after:bg-material-screen dark:after:bg-material-regular-dark after:absolute after`,`after:transition-colors group-hover:after:bg-material-chrome dark:group-hover:after:bg-material-chrome-dark`],cardImage:[`overflow-hidden w-full object-cover`]},TC=({as:e,interactive:t=!1,responsive:n=!1,backgroundColor:r=``,childRadius:i=!0,className:a,...o})=>(0,q.jsx)(e||`div`,{...o,className:yx(wC.card,i&&wC.childRadius,r||wC.backgroundColor,t?wC.interactive:null,n?wC.responsive:wC.cardNonResponsive,n&&i?wC.responsiveChildRadius:null,a)}),EC=({as:e,className:t,blurBackground:n,...r})=>(0,q.jsx)(e||`div`,{...r,style:n?{"--blurBackground":`url(${n})`}:r.style,className:yx(t,wC.cardContent,!n&&`after:hidden`)}),DC=({as:e,className:t,...n})=>(0,q.jsx)(e||`img`,{...n,className:yx(t,wC.cardImage)}),tSe={inherited:[`[&_a]:text-action [&_a]:underline [&_a]:decoration-action/50 [&_a:hover]:decoration-action/100`],as:{p:[`text-base/relaxed`],h1:[`text-4xl/normal font-bold font-heading leading-tight`],h2:[`text-2xl/normal font-semibold font-heading`],h3:[`text-xl/snug font-semibold font-heading`],h4:[`text-lg/tight font-medium font-heading`],h5:[`text-base/tight font-medium font-heading`],small:[`text-xs/tight`]}},nSe={section:[`text-2xl min-[560px]:text-[2.75rem] xl:text-5xl font-bold font-heading leading-tight`],hero:[`text-xl lg:text-5xl font-bold font-heading leading-tight`],card:[`text-base min-[560px]:text-lg xl:text-xl font-semibold font-heading leading-snug`]},rSe=`p`;function OC({className:e,as:t,fg:n=`primary`,size:r,...i}){let a=t??rSe,o;switch(n){case`secondary`:o=`text-fg-secondary dark:text-fg-secondary-dark`;break;case`tertiary`:o=`text-fg-tertiary dark:text-fg-tertiary-dark`;break;case`quaternary`:o=`text-fg-quaternary dark:text-fg-quaternary-dark`;break;default:o=`text-fg-primary dark:text-fg-primary-dark`}return(0,q.jsx)(a,{...i,"data-slot":`text`,className:yx(e,r?nSe[r]:tSe.as[t]??tSe.as.p,tSe.inherited,o)})}var iSe={xs:`sm:max-w-xs`,sm:`sm:max-w-sm`,md:`sm:max-w-md`,lg:`sm:max-w-lg`,xl:`sm:max-w-xl`,"2xl":`sm:max-w-2xl`,"3xl":`sm:max-w-3xl`,"4xl":`sm:max-w-4xl`,"5xl":`sm:max-w-5xl`};function aSe({open:e,onClose:t,size:n=`lg`,className:r,children:i,style:a,...o}){let s=(0,z.useRef)(null);return(0,z.useEffect)(()=>{e&&s.current&&(s.current.scrollTop=0)},[e]),(0,q.jsx)(cC,{appear:!0,show:e,...o,children:(0,q.jsxs)(uC,{onClose:t,children:[(0,q.jsx)(sC,{enter:`ease-out duration-100`,enterFrom:`opacity-0`,enterTo:`opacity-100`,leave:`ease-in duration-100`,leaveFrom:`opacity-100`,leaveTo:`opacity-0`,children:(0,q.jsx)(`div`,{className:`z-[10000] fixed inset-0 flex w-screen justify-center overflow-y-auto bg-material-regular px-2 py-2 focus:outline-0 sm:px-6 sm:py-8 lg:px-8 lg:py-16 dark:bg-material-regular-dark`})}),(0,q.jsx)(`div`,{ref:s,className:yx(`z-[10000] fixed inset-0 w-screen overflow-y-auto pt-6 sm:pt-0`),children:(0,q.jsx)(`div`,{className:`grid min-h-full grid-rows-[1fr_auto] justify-items-center sm:grid-rows-[1fr_auto_3fr] sm:p-4`,children:(0,q.jsx)(sC,{enter:`ease-out duration-100`,enterFrom:`opacity-0 translate-y-12 sm:translate-y-0 sm:scale-95`,enterTo:`opacity-100 translate-y-0 sm:scale-100`,leave:`ease-in duration-100`,leaveFrom:`opacity-100 translate-y-0`,leaveTo:`opacity-0 translate-y-12 sm:translate-y-0`,children:(0,q.jsx)(Xbe,{style:a,className:yx(r,iSe[n],`row-start-2 w-full min-w-0 rounded-t-3xl bg-system-chrome p-[--gutter] shadow-lg [--gutter:theme(spacing.8)] sm:mb-auto sm:rounded-2xl dark:bg-system-chrome-dark dark:ring-1 dark:ring-white/10 forced-colors:outline`),children:i})})})})]})})}function oSe({className:e,...t}){return(0,q.jsx)(Zbe,{...t,className:yx(e,`text-balance text-lg/6 font-semibold text-fg-primary sm:text-base/6 dark:text-fg-primary-dark`)})}var kC,J,Y=o((()=>{kC=u(m(),1),hC(),J=kC.forwardRef((e,t)=>{let{alt:n,color:r,size:i,weight:a,mirrored:o,children:s,weights:c,...l}=e,{color:u=`currentColor`,size:d,weight:f=`regular`,mirrored:p=!1,...m}=kC.useContext(mC);return kC.createElement(`svg`,{ref:t,xmlns:`http://www.w3.org/2000/svg`,width:i??d,height:i??d,fill:r??u,viewBox:`0 0 256 256`,transform:o||p?`scale(-1, 1)`:void 0,...m,...l},!!n&&kC.createElement(`title`,null,n),s,c.get(a??f))}),J.displayName=`IconBase`})),AC,sSe,cSe=o((()=>{AC=u(m(),1),sSe=new Map([[`bold`,AC.createElement(AC.Fragment,null,AC.createElement(`path`,{d:`M216.49,56.48,177,96h19a12,12,0,0,1,0,24H148a12,12,0,0,1-12-12V60a12,12,0,0,1,24,0V79l39.51-39.52a12,12,0,0,1,17,17ZM108,136H60a12,12,0,0,0,0,24H79L39.51,199.51a12,12,0,0,0,17,17L96,177v19a12,12,0,0,0,24,0V148A12,12,0,0,0,108,136Z`}))],[`duotone`,AC.createElement(AC.Fragment,null,AC.createElement(`path`,{d:`M224,48V208a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32H208A16,16,0,0,1,224,48Z`,opacity:`0.2`}),AC.createElement(`path`,{d:`M213.66,53.66,163.31,104H192a8,8,0,0,1,0,16H144a8,8,0,0,1-8-8V64a8,8,0,0,1,16,0V92.69l50.34-50.35a8,8,0,0,1,11.32,11.32ZM112,136H64a8,8,0,0,0,0,16H92.69L42.34,202.34a8,8,0,0,0,11.32,11.32L104,163.31V192a8,8,0,0,0,16,0V144A8,8,0,0,0,112,136Z`}))],[`fill`,AC.createElement(AC.Fragment,null,AC.createElement(`path`,{d:`M120,144v48a8,8,0,0,1-13.66,5.66L88,179.31,53.66,213.66a8,8,0,0,1-11.32-11.32L76.69,168,58.34,149.66A8,8,0,0,1,64,136h48A8,8,0,0,1,120,144ZM213.66,42.34a8,8,0,0,0-11.32,0L168,76.69,149.66,58.34A8,8,0,0,0,136,64v48a8,8,0,0,0,8,8h48a8,8,0,0,0,5.66-13.66L179.31,88l34.35-34.34A8,8,0,0,0,213.66,42.34Z`}))],[`light`,AC.createElement(AC.Fragment,null,AC.createElement(`path`,{d:`M212.24,52.24,158.48,106H192a6,6,0,0,1,0,12H144a6,6,0,0,1-6-6V64a6,6,0,0,1,12,0V97.52l53.76-53.76a6,6,0,0,1,8.48,8.48ZM112,138H64a6,6,0,0,0,0,12H97.52L43.76,203.76a6,6,0,1,0,8.48,8.48L106,158.48V192a6,6,0,0,0,12,0V144A6,6,0,0,0,112,138Z`}))],[`regular`,AC.createElement(AC.Fragment,null,AC.createElement(`path`,{d:`M213.66,53.66,163.31,104H192a8,8,0,0,1,0,16H144a8,8,0,0,1-8-8V64a8,8,0,0,1,16,0V92.69l50.34-50.35a8,8,0,0,1,11.32,11.32ZM112,136H64a8,8,0,0,0,0,16H92.69L42.34,202.34a8,8,0,0,0,11.32,11.32L104,163.31V192a8,8,0,0,0,16,0V144A8,8,0,0,0,112,136Z`}))],[`thin`,AC.createElement(AC.Fragment,null,AC.createElement(`path`,{d:`M210.83,50.83,153.66,108H192a4,4,0,0,1,0,8H144a4,4,0,0,1-4-4V64a4,4,0,0,1,8,0v38.34l57.17-57.17a4,4,0,1,1,5.66,5.66ZM112,140H64a4,4,0,0,0,0,8h38.34L45.17,205.17a4,4,0,0,0,5.66,5.66L108,153.66V192a4,4,0,0,0,8,0V144A4,4,0,0,0,112,140Z`}))]])})),lSe=c({ArrowsInSimple:()=>MC,ArrowsInSimpleIcon:()=>jC}),uSe,jC,MC,dSe=o((()=>{uSe=u(m(),1),Y(),cSe(),jC=uSe.forwardRef((e,t)=>uSe.createElement(J,{ref:t,...e,weights:sSe})),jC.displayName=`ArrowsInSimpleIcon`,MC=jC})),NC,fSe,pSe=o((()=>{NC=u(m(),1),fSe=new Map([[`bold`,NC.createElement(NC.Fragment,null,NC.createElement(`path`,{d:`M220,48V96a12,12,0,0,1-24,0V77l-39.51,39.52a12,12,0,0,1-17-17L179,60H160a12,12,0,0,1,0-24h48A12,12,0,0,1,220,48ZM99.51,139.51,60,179V160a12,12,0,0,0-24,0v48a12,12,0,0,0,12,12H96a12,12,0,0,0,0-24H77l39.52-39.51a12,12,0,0,0-17-17Z`}))],[`duotone`,NC.createElement(NC.Fragment,null,NC.createElement(`path`,{d:`M224,48V208a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32H208A16,16,0,0,1,224,48Z`,opacity:`0.2`}),NC.createElement(`path`,{d:`M216,48V96a8,8,0,0,1-16,0V67.31l-50.34,50.35a8,8,0,0,1-11.32-11.32L188.69,56H160a8,8,0,0,1,0-16h48A8,8,0,0,1,216,48ZM106.34,138.34,56,188.69V160a8,8,0,0,0-16,0v48a8,8,0,0,0,8,8H96a8,8,0,0,0,0-16H67.31l50.35-50.34a8,8,0,0,0-11.32-11.32Z`}))],[`fill`,NC.createElement(NC.Fragment,null,NC.createElement(`path`,{d:`M117.66,138.34a8,8,0,0,1,0,11.32L83.31,184l18.35,18.34A8,8,0,0,1,96,216H48a8,8,0,0,1-8-8V160a8,8,0,0,1,13.66-5.66L72,172.69l34.34-34.35A8,8,0,0,1,117.66,138.34ZM208,40H160a8,8,0,0,0-5.66,13.66L172.69,72l-34.35,34.34a8,8,0,0,0,11.32,11.32L184,83.31l18.34,18.35A8,8,0,0,0,216,96V48A8,8,0,0,0,208,40Z`}))],[`light`,NC.createElement(NC.Fragment,null,NC.createElement(`path`,{d:`M214,48V96a6,6,0,0,1-12,0V62.48l-53.76,53.76a6,6,0,0,1-8.48-8.48L193.52,54H160a6,6,0,0,1,0-12h48A6,6,0,0,1,214,48ZM107.76,139.76,54,193.52V160a6,6,0,0,0-12,0v48a6,6,0,0,0,6,6H96a6,6,0,0,0,0-12H62.48l53.76-53.76a6,6,0,0,0-8.48-8.48Z`}))],[`regular`,NC.createElement(NC.Fragment,null,NC.createElement(`path`,{d:`M216,48V96a8,8,0,0,1-16,0V67.31l-50.34,50.35a8,8,0,0,1-11.32-11.32L188.69,56H160a8,8,0,0,1,0-16h48A8,8,0,0,1,216,48ZM106.34,138.34,56,188.69V160a8,8,0,0,0-16,0v48a8,8,0,0,0,8,8H96a8,8,0,0,0,0-16H67.31l50.35-50.34a8,8,0,0,0-11.32-11.32Z`}))],[`thin`,NC.createElement(NC.Fragment,null,NC.createElement(`path`,{d:`M212,48V96a4,4,0,0,1-8,0V57.66l-57.17,57.17a4,4,0,0,1-5.66-5.66L198.34,52H160a4,4,0,0,1,0-8h48A4,4,0,0,1,212,48ZM109.17,141.17,52,198.34V160a4,4,0,0,0-8,0v48a4,4,0,0,0,4,4H96a4,4,0,0,0,0-8H57.66l57.17-57.17a4,4,0,0,0-5.66-5.66Z`}))]])})),mSe=c({ArrowsOutSimple:()=>FC,ArrowsOutSimpleIcon:()=>PC}),hSe,PC,FC,gSe=o((()=>{hSe=u(m(),1),Y(),pSe(),PC=hSe.forwardRef((e,t)=>hSe.createElement(J,{ref:t,...e,weights:fSe})),PC.displayName=`ArrowsOutSimpleIcon`,FC=PC}));dSe(),gSe();var IC={card:[`group`,`z-0`,`mb-12`,`px-4 pt-14 pb-0`,`rounded-card-lg`,`relative`,`transition after:transition-all hover:transition-all`,`after:absolute after:-z-10 after:rounded-card-lg`,`dark:after:border-white/5`],contractedCard:[`cursor-pointer`,`after:inset-0`,`active:hover:scale-95 active:hover:after:shadow-md`,`after:bg-material-thick dark:after:bg-material-thick-dark`,`hover:after:shadow-lg hover:after:-inset-4 hover:mb-12`],expandedCard:[`is-expanded`,`cursor-auto`,`after:bg-material-chrome dark:after:bg-material-regular-dark`,`hover:after:shadow-xl after:shadow-xl dark:after:shadow-none dark:after:border dark:after:border-white/5`,`after:-inset-4`,`pb-8`],content:[`max-h-56 min-h-24 overflow-hidden`],contentContracted:[`pointer-events-none`,`after:absolute after:bottom-0 after:left-0 after:right-0 after:h-14 after:rounded-b-card-lg after:bg-gradient-to-b after:from-transparent after:to-material-thick after:dark:to-material-thick-dark`,`gradient-mask-b-0 group-hover:gradient-mask-b-[rgba(0,0,0,1.0)_50%,rgba(0,0,0,0)_100%]`],catchClicks:[`absolute inset-0 z-[5]`],button:[`transition absolute top-4 right-4 z-10 flex items-center gap-2`,`group-[.is-expanded]:translate-x-4 group-[.is-expanded]:-translate-y-4`,`group-hover:translate-x-4 group-hover:-translate-y-4`]},_Se=({children:e,expandedOnMount:t=!1,className:n,actions:r})=>{let[i,a]=(0,z.useState)(t),[o,s]=(0,z.useState)(224),c=(0,z.useRef)(null);return(0,z.useEffect)(()=>{if(!c.current)return;let e=new ResizeObserver(()=>{c.current&&c.current.scrollHeight!==o&&s(c.current.scrollHeight)});return e.observe(c.current),function(){e.disconnect()}},[e,o]),(0,q.jsxs)(`div`,{className:yx(IC.card,i?IC.expandedCard:IC.contractedCard,n),onClick:i?void 0:()=>a(!i),children:[(0,q.jsx)(`div`,{className:yx(IC.content,!i&&IC.contentContracted),style:i?{maxHeight:o}:void 0,ref:c,children:e}),i?null:(0,q.jsx)(`div`,{"data-testid":`expandable-card-catch`,className:yx(IC.catchClicks),onClick:()=>a(!0)}),(0,q.jsxs)(`div`,{className:yx(IC.button),children:[r,(0,q.jsx)(yC,{onClick:e=>{e.stopPropagation(),a(!i)},surface:`material`,circular:!0,children:i?(0,q.jsx)(MC,{size:16}):(0,q.jsx)(FC,{size:16})})]})]})},vSe=[`date`,`datetime-local`,`month`,`time`,`week`],LC=(0,z.forwardRef)(function({className:e,...t},n){return(0,q.jsx)(`span`,{"data-slot":`control`,className:yx([`relative block w-full`,`before:absolute before:inset-px before:rounded-[calc(theme(borderRadius.lg)-1px)] before:bg-white before:shadow`,`dark:before:hidden`,`after:pointer-events-none after:absolute after:inset-0 after:rounded-lg after:ring-inset after:ring-transparent sm:after:focus-within:ring-2 sm:after:focus-within:ring-action`,`has-[[data-disabled]]:opacity-50 before:has-[[data-disabled]]:bg-system-regular dark:before:has-[[data-disabled]]:bg-system-regular-dark before:has-[[data-disabled]]:shadow-none`,`before:has-[[data-invalid]]:shadow-red-500/10`]),children:(0,q.jsx)(exe,{ref:n,...t,className:yx([e,t.type&&vSe.includes(t.type)&&[`[&::-webkit-datetime-edit-fields-wrapper]:p-0`,`[&::-webkit-date-and-time-value]:min-h-[1.5em]`,`[&::-webkit-datetime-edit]:inline-flex`,`[&::-webkit-datetime-edit]:p-0`,`[&::-webkit-datetime-edit-year-field]:p-0`,`[&::-webkit-datetime-edit-month-field]:p-0`,`[&::-webkit-datetime-edit-day-field]:p-0`,`[&::-webkit-datetime-edit-hour-field]:p-0`,`[&::-webkit-datetime-edit-minute-field]:p-0`,`[&::-webkit-datetime-edit-second-field]:p-0`,`[&::-webkit-datetime-edit-millisecond-field]:p-0`,`[&::-webkit-datetime-edit-meridiem-field]:p-0`],`relative block w-full appearance-none rounded-lg px-[calc(theme(spacing[3.5])-1px)] py-[calc(theme(spacing[2.5])-1px)] sm:px-[calc(theme(spacing[3])-1px)] sm:py-[calc(theme(spacing[1.5])-1px)]`,`text-base/6 text-fg-primary placeholder:fg-secondary dark:placeholder:fg-secondary-dark sm:text-sm/6 dark:text-fg-primary-dark`,`border border-system-thin data-[hover]:border-system-thick dark:border-system-regular-dark dark:data-[hover]:border-system-thin-dark`,`bg-transparent dark:bg-white/5`,`focus:outline-none`,`data-[invalid]:border-red-500 data-[invalid]:data-[hover]:border-red-500 data-[invalid]:dark:border-red-500 data-[invalid]:data-[hover]:dark:border-red-500`,`data-[disabled]:border-system-thick dark:data-[hover]:data-[disabled]:border-system-thick-dark data-[disabled]:dark:border-system-regular-dark data-[disabled]:dark:bg-system-regular-dark`,`dark:[color-scheme:dark]`,t.type&&t.type===`file`&&[`file:bg-gray-50 file:border-0 file:me-4 file:py-3 file:px-4 dark:file:bg-neutral-700 dark:file:text-neutral-400`,`!p-0`]])})})}),ySe=Object.defineProperty,bSe=Object.defineProperties,xSe=Object.getOwnPropertyDescriptors,RC=Object.getOwnPropertySymbols,SSe=Object.prototype.hasOwnProperty,CSe=Object.prototype.propertyIsEnumerable,wSe=(e,t,n)=>t in e?ySe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,TSe=(e,t)=>{for(var n in t||={})SSe.call(t,n)&&wSe(e,n,t[n]);if(RC)for(var n of RC(t))CSe.call(t,n)&&wSe(e,n,t[n]);return e},ESe=(e,t)=>bSe(e,xSe(t)),DSe=(e,t)=>{var n={};for(var r in e)SSe.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&RC)for(var r of RC(e))t.indexOf(r)<0&&CSe.call(e,r)&&(n[r]=e[r]);return n};function OSe(e){return[setTimeout(e,0),setTimeout(e,10),setTimeout(e,50)]}function kSe(e){let t=z.useRef();return z.useEffect(()=>{t.current=e}),t.current}var ASe=18,jSe=40,MSe=`${jSe}px`,NSe=[`[data-lastpass-icon-root]`,`com-1password-button`,`[data-dashlanecreated]`,`[style$="2147483647 !important;"]`].join(`,`);function PSe({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:r}){let[i,a]=z.useState(!1),[o,s]=z.useState(!1),[c,l]=z.useState(!1),u=z.useMemo(()=>n!==`none`&&(n===`increase-width`||n===`experimental-no-flickering`)&&i&&o,[i,o,n]),d=z.useCallback(()=>{let r=e.current,i=t.current;if(!r||!i||c||n===`none`)return;let o=r,s=o.getBoundingClientRect().left+o.offsetWidth,u=o.getBoundingClientRect().top+o.offsetHeight/2,d=s-ASe,f=u;document.querySelectorAll(NSe).length===0&&document.elementFromPoint(d,f)===r||(a(!0),l(!0))},[e,t,c,n]);return z.useEffect(()=>{let t=e.current;if(!t||n===`none`)return;function r(){let e=window.innerWidth-t.getBoundingClientRect().right;s(e>=jSe)}r();let i=setInterval(r,1e3);return()=>{clearInterval(i)}},[e,n]),z.useEffect(()=>{let e=r||document.activeElement===t.current;if(n===`none`||!e)return;let i=setTimeout(d,0),a=setTimeout(d,2e3),o=setTimeout(d,5e3),s=setTimeout(()=>{l(!0)},6e3);return()=>{clearTimeout(i),clearTimeout(a),clearTimeout(o),clearTimeout(s)}},[t,r,n,d]),{hasPWMBadge:i,willPushPWMBadge:u,PWM_BADGE_SPACE_WIDTH:MSe}}var FSe=z.createContext({}),ISe=z.forwardRef((e,t)=>{var n=e,{value:r,onChange:i,maxLength:a,textAlign:o=`left`,pattern:s,placeholder:c,inputMode:l=`numeric`,onComplete:u,pushPasswordManagerStrategy:d=`increase-width`,pasteTransformer:f,containerClassName:p,noScriptCSSFallback:m=LSe,render:h,children:g}=n,_=DSe(n,[`value`,`onChange`,`maxLength`,`textAlign`,`pattern`,`placeholder`,`inputMode`,`onComplete`,`pushPasswordManagerStrategy`,`pasteTransformer`,`containerClassName`,`noScriptCSSFallback`,`render`,`children`]),v;let[y,b]=z.useState(typeof _.defaultValue==`string`?_.defaultValue:``),x=r??y,S=kSe(x),C=z.useCallback(e=>{i?.(e),b(e)},[i]),w=z.useMemo(()=>s?typeof s==`string`?new RegExp(s):s:null,[s]),T=z.useRef(null),E=z.useRef(null),D=z.useRef({value:x,onChange:C,isIOS:typeof window<`u`&&((v=window==null?void 0:window.CSS)?.supports)?.call(v,`-webkit-touch-callout`,`none`)}),O=z.useRef({prev:[T.current?.selectionStart,T.current?.selectionEnd,T.current?.selectionDirection]});z.useImperativeHandle(t,()=>T.current,[]),z.useEffect(()=>{let e=T.current,t=E.current;if(!e||!t)return;D.current.value!==e.value&&D.current.onChange(e.value),O.current.prev=[e.selectionStart,e.selectionEnd,e.selectionDirection];function n(){if(document.activeElement!==e){ee(null),te(null);return}let t=e.selectionStart,n=e.selectionEnd,r=e.selectionDirection,i=e.maxLength,a=e.value,o=O.current.prev,s=-1,c=-1,l;if(a.length!==0&&t!==null&&n!==null){let e=t===n,r=t===a.length&&a.length<i;if(e&&!r){let e=t;if(e===0)s=0,c=1,l=`forward`;else if(e===i)s=e-1,c=e,l=`backward`;else if(i>1&&a.length>1){let t=0;if(o[0]!==null&&o[1]!==null){l=e<o[1]?`backward`:`forward`;let n=o[0]===o[1]&&o[0]<i;l===`backward`&&!n&&(t=-1)}s=t+e,c=t+e+1}}s!==-1&&c!==-1&&s!==c&&T.current.setSelectionRange(s,c,l)}let u=s===-1?t:s,d=c===-1?n:c,f=l??r;ee(u),te(d),O.current.prev=[u,d,f]}if(document.addEventListener(`selectionchange`,n,{capture:!0}),n(),document.activeElement===e&&M(!0),!document.getElementById(`input-otp-style`)){let e=document.createElement(`style`);if(e.id=`input-otp-style`,document.head.appendChild(e),e.sheet){let t=`background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;`;zC(e.sheet,`[data-input-otp]::selection { background: transparent !important; color: transparent !important; }`),zC(e.sheet,`[data-input-otp]:autofill { ${t} }`),zC(e.sheet,`[data-input-otp]:-webkit-autofill { ${t} }`),zC(e.sheet,`@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }`),zC(e.sheet,`[data-input-otp] + * { pointer-events: all !important; }`)}}let r=()=>{t&&t.style.setProperty(`--root-height`,`${e.clientHeight}px`)};r();let i=new ResizeObserver(r);return i.observe(e),()=>{document.removeEventListener(`selectionchange`,n,{capture:!0}),i.disconnect()}},[]);let[k,A]=z.useState(!1),[j,M]=z.useState(!1),[N,ee]=z.useState(null),[P,te]=z.useState(null);z.useEffect(()=>{OSe(()=>{var e;(e=T.current)==null||e.dispatchEvent(new Event(`input`));let t=T.current?.selectionStart,n=T.current?.selectionEnd,r=T.current?.selectionDirection;t!==null&&n!==null&&(ee(t),te(n),O.current.prev=[t,n,r])})},[x,j]),z.useEffect(()=>{S!==void 0&&x!==S&&S.length<a&&x.length===a&&u?.(x)},[a,u,S,x]);let F=PSe({containerRef:E,inputRef:T,pushPasswordManagerStrategy:d,isFocused:j}),ne=z.useCallback(e=>{let t=e.currentTarget.value.slice(0,a);if(t.length>0&&w&&!w.test(t)){e.preventDefault();return}typeof S==`string`&&t.length<S.length&&document.dispatchEvent(new Event(`selectionchange`)),C(t)},[a,C,S,w]),I=z.useCallback(()=>{var e;if(T.current){let t=Math.min(T.current.value.length,a-1),n=T.current.value.length;(e=T.current)==null||e.setSelectionRange(t,n),ee(t),te(n)}M(!0)},[a]),re=z.useCallback(e=>{let t=T.current;if(!f&&(!D.current.isIOS||!e.clipboardData||!t))return;let n=e.clipboardData.getData(`text/plain`),r=f?f(n):n;e.preventDefault();let i=T.current?.selectionStart,o=T.current?.selectionEnd,s=(i===o?x.slice(0,i)+r+x.slice(i):x.slice(0,i)+r+x.slice(o)).slice(0,a);if(s.length>0&&w&&!w.test(s))return;t.value=s,C(s);let c=Math.min(s.length,a-1),l=s.length;t.setSelectionRange(c,l),ee(c),te(l)},[a,C,w,x]),L=z.useMemo(()=>({position:`relative`,cursor:_.disabled?`default`:`text`,userSelect:`none`,WebkitUserSelect:`none`,pointerEvents:`none`}),[_.disabled]),ie=z.useMemo(()=>({position:`absolute`,inset:0,width:F.willPushPWMBadge?`calc(100% + ${F.PWM_BADGE_SPACE_WIDTH})`:`100%`,clipPath:F.willPushPWMBadge?`inset(0 ${F.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:`100%`,display:`flex`,textAlign:o,opacity:`1`,color:`transparent`,pointerEvents:`all`,background:`transparent`,caretColor:`transparent`,border:`0 solid transparent`,outline:`0 solid transparent`,boxShadow:`none`,lineHeight:`1`,letterSpacing:`-.5em`,fontSize:`var(--root-height)`,fontFamily:`monospace`,fontVariantNumeric:`tabular-nums`}),[F.PWM_BADGE_SPACE_WIDTH,F.willPushPWMBadge,o]),ae=z.useMemo(()=>z.createElement(`input`,ESe(TSe({autoComplete:_.autoComplete||`one-time-code`},_),{"data-input-otp":!0,"data-input-otp-placeholder-shown":x.length===0||void 0,"data-input-otp-mss":N,"data-input-otp-mse":P,inputMode:l,pattern:w?.source,"aria-placeholder":c,style:ie,maxLength:a,value:x,ref:T,onPaste:e=>{var t;re(e),(t=_.onPaste)==null||t.call(_,e)},onChange:ne,onMouseOver:e=>{var t;A(!0),(t=_.onMouseOver)==null||t.call(_,e)},onMouseLeave:e=>{var t;A(!1),(t=_.onMouseLeave)==null||t.call(_,e)},onFocus:e=>{var t;I(),(t=_.onFocus)==null||t.call(_,e)},onBlur:e=>{var t;M(!1),(t=_.onBlur)==null||t.call(_,e)}})),[ne,I,re,l,ie,a,P,N,_,w?.source,x]),oe=z.useMemo(()=>({slots:Array.from({length:a}).map((e,t)=>{let n=j&&N!==null&&P!==null&&(N===P&&t===N||t>=N&&t<P),r=x[t]===void 0?null:x[t];return{char:r,placeholderChar:x[0]===void 0?c?.[t]??null:null,isActive:n,hasFakeCaret:n&&r===null}}),isFocused:j,isHovering:!_.disabled&&k}),[j,k,a,P,N,_.disabled,x]),se=z.useMemo(()=>h?h(oe):z.createElement(FSe.Provider,{value:oe},g),[g,oe,h]);return z.createElement(z.Fragment,null,m!==null&&z.createElement(`noscript`,null,z.createElement(`style`,null,m)),z.createElement(`div`,{ref:E,"data-input-otp-container":!0,style:L,className:p},se,z.createElement(`div`,{style:{position:`absolute`,inset:0,pointerEvents:`none`}},ae)))});ISe.displayName=`Input`;function zC(e,t){try{e.insertRule(t)}catch{console.error(`input-otp could not insert CSS rule:`,t)}}var LSe=`
240
240
  [data-input-otp] {
241
241
  --nojs-bg: white !important;
242
242
  --nojs-fg: black !important;