cemtrik-dependencies 1.0.46 → 1.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +13 -13
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(L,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],a):(L=typeof globalThis<"u"?globalThis:L||self,a(L.MyApp={},L.React,L.ReactDOM))})(this,function(L,a,un){"use strict";function yr(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const
|
|
1
|
+
(function(L,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],a):(L=typeof globalThis<"u"?globalThis:L||self,a(L.MyApp={},L.React,L.ReactDOM))})(this,function(L,a,un){"use strict";function yr(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const E=yr(a),Ct=(e,n=!1)=>{function t(o){if(typeof o!="object"||o===null)return o;const i=Array.isArray(o)?[]:{};for(const l in o)o.hasOwnProperty(l)&&!n&&(i[l]=t(o[l]));return i}return e.map(o=>t(o))},cn=e=>/^(?:[^<>()[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*|"[^\n"]+")@(?:[^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{2,63}$/i.test(e);function F(...e){return e.filter(Boolean).join(" ")}const Er=e=>{const n=e.split(" ");let t=e.slice(0,2);return n.length>1&&(t=`${e.at(0)}${n[n.length-1].slice(0,1)}`),t},Sr=e=>typeof e!="string"&&Promise.resolve(e)instanceof Promise,Cr="The user aborted a request.",Tr="signal is aborted without reason",Or=({id:e,close:n,isPathsTest:t=!1,isTest:r=!1})=>{const o=a.useCallback(i=>{i.some(s=>s.getAttribute===void 0?!1:s.getAttribute("id")===e)||n()},[n,e]);a.useEffect(()=>{const i=l=>{const s=l.composedPath();s===void 0||t||(r&&(s[0].getAttribute=()=>e),o(s))};return window.addEventListener("click",i),()=>{window.removeEventListener("click",i)}},[o,t,r,e])},jr=()=>{const[e,n]=a.useState({}),[t,r]=a.useState({}),[o,i]=a.useState([]),l=h=>b=>{b.preventDefault(),b.stopPropagation(),h(e)},s=(h,b,p)=>{const{checked:v,value:g,name:x,type:S,id:y}=h.target,T={radio:y,checkbox:v};n({...e,[x]:T[S]??g}),b({...p,[x]:T[S]??g})},u=a.useCallback((h,b)=>{n(p=>({...p,[h]:b}))},[]),c=a.useCallback((h,b)=>{const p=b.filter(v=>h[v]===""||h[v]===void 0);return p.forEach(v=>r(g=>({...g,[v]:"Este campo es requerido"}))),i(p),p.length>0},[]);return{handleSubmit:l,handleChange:s,setValuesDefault:u,validateFields:c,errors:o,model:e,handleError:(h,b)=>{b.forEach(p=>r(v=>({...v,[p]:h}))),i(b)},messageError:t,setModel:n}},Ir=e=>{const[n,t]=a.useState(!0),[r,o]=a.useState(!1),i=a.useCallback((l,s)=>{const u=e.match(/[0-9]+/g);if(u===null)return;const[c]=u;s=Math.min(window.innerWidth,window.outerWidth);const m=l?s>=Number(c):s<=Number(c);o(m)},[e]);return a.useEffect(()=>{const l=/\(min-width:\s?[0-9]+px\)/gi.test(e),s=/\(max-width:\s?[0-9]+px\)/gi.test(e);if(!l&&!s&&t(!1),!l&&!s)return;const u=Math.min(window.innerWidth,window.outerWidth);i(l,u)},[e,i]),a.useEffect(()=>{if(!n)return;const l=Math.min(window.innerWidth,window.outerWidth);function s(){const u=/min-width/gi.test(e);i(u,l)}return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[n,e,i]),r},Tt=()=>{const[e,n]=a.useState({width:0,height:0});return a.useEffect(()=>{const t=Math.min(window.innerWidth,window.outerWidth),r=Math.min(window.innerHeight,window.outerHeight);n({width:t,height:r})},[]),a.useEffect(()=>{let t=Math.min(window.innerWidth,window.outerWidth),r=Math.min(window.innerHeight,window.outerHeight);const o=()=>{t=Math.min(window.innerWidth,window.outerWidth),r=Math.min(window.innerHeight,window.outerHeight),n({width:t,height:r})};return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[]),e};function Nr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ot={exports:{}},Ve={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var dn;function
|
|
9
|
+
*/var dn;function Fr(){if(dn)return Ve;dn=1;var e=a,n=Symbol.for("react.element"),t=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function l(s,u,c){var m,h={},b=null,p=null;c!==void 0&&(b=""+c),u.key!==void 0&&(b=""+u.key),u.ref!==void 0&&(p=u.ref);for(m in u)r.call(u,m)&&!i.hasOwnProperty(m)&&(h[m]=u[m]);if(s&&s.defaultProps)for(m in u=s.defaultProps,u)h[m]===void 0&&(h[m]=u[m]);return{$$typeof:n,type:s,key:b,ref:p,props:h,_owner:o.current}}return Ve.Fragment=t,Ve.jsx=l,Ve.jsxs=l,Ve}var Ye={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,31 +14,31 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var fn;function
|
|
18
|
-
`+re+
|
|
17
|
+
*/var fn;function $r(){return fn||(fn=1,process.env.NODE_ENV!=="production"&&function(){var e=a,n=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),v=Symbol.iterator,g="@@iterator";function x(d){if(d===null||typeof d!="object")return null;var C=v&&d[v]||d[g];return typeof C=="function"?C:null}var S=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function y(d){{for(var C=arguments.length,O=new Array(C>1?C-1:0),D=1;D<C;D++)O[D-1]=arguments[D];T("error",d,O)}}function T(d,C,O){{var D=S.ReactDebugCurrentFrame,X=D.getStackAddendum();X!==""&&(C+="%s",O=O.concat([X]));var oe=O.map(function(Y){return String(Y)});oe.unshift("Warning: "+C),Function.prototype.apply.call(console[d],console,oe)}}var I=!1,N=!1,k=!1,_=!1,q=!1,M;M=Symbol.for("react.module.reference");function $(d){return!!(typeof d=="string"||typeof d=="function"||d===r||d===i||q||d===o||d===c||d===m||_||d===p||I||N||k||typeof d=="object"&&d!==null&&(d.$$typeof===b||d.$$typeof===h||d.$$typeof===l||d.$$typeof===s||d.$$typeof===u||d.$$typeof===M||d.getModuleId!==void 0))}function R(d,C,O){var D=d.displayName;if(D)return D;var X=C.displayName||C.name||"";return X!==""?O+"("+X+")":O}function J(d){return d.displayName||"Context"}function z(d){if(d==null)return null;if(typeof d.tag=="number"&&y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof d=="function")return d.displayName||d.name||null;if(typeof d=="string")return d;switch(d){case r:return"Fragment";case t:return"Portal";case i:return"Profiler";case o:return"StrictMode";case c:return"Suspense";case m:return"SuspenseList"}if(typeof d=="object")switch(d.$$typeof){case s:var C=d;return J(C)+".Consumer";case l:var O=d;return J(O._context)+".Provider";case u:return R(d,d.render,"ForwardRef");case h:var D=d.displayName||null;return D!==null?D:z(d.type)||"Memo";case b:{var X=d,oe=X._payload,Y=X._init;try{return z(Y(oe))}catch{return null}}}return null}var B=Object.assign,w=0,G,W,ie,Q,ne,me,ge;function Ce(){}Ce.__reactDisabledLog=!0;function be(){{if(w===0){G=console.log,W=console.info,ie=console.warn,Q=console.error,ne=console.group,me=console.groupCollapsed,ge=console.groupEnd;var d={configurable:!0,enumerable:!0,value:Ce,writable:!0};Object.defineProperties(console,{info:d,log:d,warn:d,error:d,group:d,groupCollapsed:d,groupEnd:d})}w++}}function P(){{if(w--,w===0){var d={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:B({},d,{value:G}),info:B({},d,{value:W}),warn:B({},d,{value:ie}),error:B({},d,{value:Q}),group:B({},d,{value:ne}),groupCollapsed:B({},d,{value:me}),groupEnd:B({},d,{value:ge})})}w<0&&y("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var K=S.ReactCurrentDispatcher,re;function we(d,C,O){{if(re===void 0)try{throw Error()}catch(X){var D=X.stack.trim().match(/\n( *(at )?)/);re=D&&D[1]||""}return`
|
|
18
|
+
`+re+d}}var A=!1,V;{var H=typeof WeakMap=="function"?WeakMap:Map;V=new H}function pe(d,C){if(!d||A)return"";{var O=V.get(d);if(O!==void 0)return O}var D;A=!0;var X=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var oe;oe=K.current,K.current=null,be();try{if(C){var Y=function(){throw Error()};if(Object.defineProperty(Y.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Y,[])}catch(Fe){D=Fe}Reflect.construct(d,[],Y)}else{try{Y.call()}catch(Fe){D=Fe}d.call(Y.prototype)}}else{try{throw Error()}catch(Fe){D=Fe}d()}}catch(Fe){if(Fe&&D&&typeof Fe.stack=="string"){for(var U=Fe.stack.split(`
|
|
19
19
|
`),xe=D.stack.split(`
|
|
20
20
|
`),de=U.length-1,fe=xe.length-1;de>=1&&fe>=0&&U[de]!==xe[fe];)fe--;for(;de>=1&&fe>=0;de--,fe--)if(U[de]!==xe[fe]){if(de!==1||fe!==1)do if(de--,fe--,fe<0||U[de]!==xe[fe]){var Ee=`
|
|
21
|
-
`+U[de].replace(" at new "," at ");return
|
|
21
|
+
`+U[de].replace(" at new "," at ");return d.displayName&&Ee.includes("<anonymous>")&&(Ee=Ee.replace("<anonymous>",d.displayName)),typeof d=="function"&&V.set(d,Ee),Ee}while(de>=1&&fe>=0);break}}}finally{A=!1,K.current=oe,P(),Error.prepareStackTrace=X}var Ue=d?d.displayName||d.name:"",wr=Ue?we(Ue):"";return typeof d=="function"&&V.set(d,wr),wr}function he(d,C,O){return pe(d,!1)}function We(d){var C=d.prototype;return!!(C&&C.isReactComponent)}function yt(d,C,O){if(d==null)return"";if(typeof d=="function")return pe(d,We(d));if(typeof d=="string")return we(d);switch(d){case c:return we("Suspense");case m:return we("SuspenseList")}if(typeof d=="object")switch(d.$$typeof){case u:return he(d.render);case h:return yt(d.type,C,O);case b:{var D=d,X=D._payload,oe=D._init;try{return yt(oe(X),C,O)}catch{}}}return""}var Et=Object.prototype.hasOwnProperty,ar={},ur=S.ReactDebugCurrentFrame;function St(d){if(d){var C=d._owner,O=yt(d.type,d._source,C?C.type:null);ur.setExtraStackFrame(O)}else ur.setExtraStackFrame(null)}function Ws(d,C,O,D,X){{var oe=Function.call.bind(Et);for(var Y in d)if(oe(d,Y)){var U=void 0;try{if(typeof d[Y]!="function"){var xe=Error((D||"React class")+": "+O+" type `"+Y+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof d[Y]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw xe.name="Invariant Violation",xe}U=d[Y](C,Y,D,O,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(de){U=de}U&&!(U instanceof Error)&&(St(X),y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",D||"React class",O,Y,typeof U),St(null)),U instanceof Error&&!(U.message in ar)&&(ar[U.message]=!0,St(X),y("Failed %s type: %s",O,U.message),St(null))}}}var Hs=Array.isArray;function rn(d){return Hs(d)}function Us(d){{var C=typeof Symbol=="function"&&Symbol.toStringTag,O=C&&d[Symbol.toStringTag]||d.constructor.name||"Object";return O}}function Vs(d){try{return cr(d),!1}catch{return!0}}function cr(d){return""+d}function dr(d){if(Vs(d))return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Us(d)),cr(d)}var ot=S.ReactCurrentOwner,Ys={key:!0,ref:!0,__self:!0,__source:!0},fr,mr,on;on={};function qs(d){if(Et.call(d,"ref")){var C=Object.getOwnPropertyDescriptor(d,"ref").get;if(C&&C.isReactWarning)return!1}return d.ref!==void 0}function Gs(d){if(Et.call(d,"key")){var C=Object.getOwnPropertyDescriptor(d,"key").get;if(C&&C.isReactWarning)return!1}return d.key!==void 0}function Zs(d,C){if(typeof d.ref=="string"&&ot.current&&C&&ot.current.stateNode!==C){var O=z(ot.current.type);on[O]||(y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',z(ot.current.type),d.ref),on[O]=!0)}}function Ks(d,C){{var O=function(){fr||(fr=!0,y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",C))};O.isReactWarning=!0,Object.defineProperty(d,"key",{get:O,configurable:!0})}}function Js(d,C){{var O=function(){mr||(mr=!0,y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",C))};O.isReactWarning=!0,Object.defineProperty(d,"ref",{get:O,configurable:!0})}}var Qs=function(d,C,O,D,X,oe,Y){var U={$$typeof:n,type:d,key:C,ref:O,props:Y,_owner:oe};return U._store={},Object.defineProperty(U._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(U,"_self",{configurable:!1,enumerable:!1,writable:!1,value:D}),Object.defineProperty(U,"_source",{configurable:!1,enumerable:!1,writable:!1,value:X}),Object.freeze&&(Object.freeze(U.props),Object.freeze(U)),U};function Xs(d,C,O,D,X){{var oe,Y={},U=null,xe=null;O!==void 0&&(dr(O),U=""+O),Gs(C)&&(dr(C.key),U=""+C.key),qs(C)&&(xe=C.ref,Zs(C,X));for(oe in C)Et.call(C,oe)&&!Ys.hasOwnProperty(oe)&&(Y[oe]=C[oe]);if(d&&d.defaultProps){var de=d.defaultProps;for(oe in de)Y[oe]===void 0&&(Y[oe]=de[oe])}if(U||xe){var fe=typeof d=="function"?d.displayName||d.name||"Unknown":d;U&&Ks(Y,fe),xe&&Js(Y,fe)}return Qs(d,U,xe,X,D,ot.current,Y)}}var ln=S.ReactCurrentOwner,pr=S.ReactDebugCurrentFrame;function He(d){if(d){var C=d._owner,O=yt(d.type,d._source,C?C.type:null);pr.setExtraStackFrame(O)}else pr.setExtraStackFrame(null)}var sn;sn=!1;function an(d){return typeof d=="object"&&d!==null&&d.$$typeof===n}function hr(){{if(ln.current){var d=z(ln.current.type);if(d)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+
|
|
23
|
+
Check the render method of \``+d+"`."}return""}}function ea(d){return""}var vr={};function ta(d){{var C=hr();if(!C){var O=typeof d=="string"?d:d.displayName||d.name;O&&(C=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+O+">.")}return
|
|
25
|
+
Check the top-level render call using <`+O+">.")}return C}}function gr(d,C){{if(!d._store||d._store.validated||d.key!=null)return;d._store.validated=!0;var O=ta(C);if(vr[O])return;vr[O]=!0;var D="";d&&d._owner&&d._owner!==ln.current&&(D=" It was passed a child from "+z(d._owner.type)+"."),He(d),y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',O,D),He(null)}}function br(d,C){{if(typeof d!="object")return;if(rn(d))for(var O=0;O<d.length;O++){var D=d[O];an(D)&&gr(D,C)}else if(an(d))d._store&&(d._store.validated=!0);else if(d){var X=x(d);if(typeof X=="function"&&X!==d.entries)for(var oe=X.call(d),Y;!(Y=oe.next()).done;)an(Y.value)&&gr(Y.value,C)}}}function na(d){{var C=d.type;if(C==null||typeof C=="string")return;var O;if(typeof C=="function")O=C.propTypes;else if(typeof C=="object"&&(C.$$typeof===u||C.$$typeof===h))O=C.propTypes;else return;if(O){var D=z(C);Ws(O,d.props,"prop",D,d)}else if(C.PropTypes!==void 0&&!sn){sn=!0;var X=z(C);y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",X||"Unknown")}typeof C.getDefaultProps=="function"&&!C.getDefaultProps.isReactClassApproved&&y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ra(d){{for(var C=Object.keys(d.props),O=0;O<C.length;O++){var D=C[O];if(D!=="children"&&D!=="key"){He(d),y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",D),He(null);break}}d.ref!==null&&(He(d),y("Invalid attribute `ref` supplied to `React.Fragment`."),He(null))}}function xr(d,C,O,D,X,oe){{var Y=$(d);if(!Y){var U="";(d===void 0||typeof d=="object"&&d!==null&&Object.keys(d).length===0)&&(U+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var xe=ea();xe?U+=xe:U+=hr();var de;d===null?de="null":rn(d)?de="array":d!==void 0&&d.$$typeof===n?(de="<"+(z(d.type)||"Unknown")+" />",U=" Did you accidentally export a JSX literal instead of a component?"):de=typeof d,y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",de,U)}var fe=Xs(d,C,O,X,oe);if(fe==null)return fe;if(Y){var Ee=C.children;if(Ee!==void 0)if(D)if(rn(Ee)){for(var Ue=0;Ue<Ee.length;Ue++)br(Ee[Ue],d);Object.freeze&&Object.freeze(Ee)}else y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else br(Ee,d)}return d===r?ra(fe):na(fe),fe}}function oa(d,C,O){return xr(d,C,O,!0)}function ia(d,C,O){return xr(d,C,O,!1)}var la=ia,sa=oa;Ye.Fragment=r,Ye.jsx=la,Ye.jsxs=sa}()),Ye}process.env.NODE_ENV==="production"?Ot.exports=Fr():Ot.exports=$r();var f=Ot.exports;function qe(e,n,t){let r=t.initialDeps??[],o;return()=>{var i,l,s,u;let c;t.key&&((i=t.debug)!=null&&i.call(t))&&(c=Date.now());const m=e();if(!(m.length!==r.length||m.some((p,v)=>r[v]!==p)))return o;r=m;let b;if(t.key&&((l=t.debug)!=null&&l.call(t))&&(b=Date.now()),o=n(...m),t.key&&((s=t.debug)!=null&&s.call(t))){const p=Math.round((Date.now()-c)*100)/100,v=Math.round((Date.now()-b)*100)/100,g=v/16,x=(S,y)=>{for(S=String(S);S.length<y;)S=" "+S;return S};console.info(`%c⏱ ${x(v,5)} /${x(p,5)} ms`,`
|
|
26
26
|
font-size: .6rem;
|
|
27
27
|
font-weight: bold;
|
|
28
|
-
color: hsl(${Math.max(0,Math.min(120-120*g,120))}deg 100% 31%);`,t==null?void 0:t.key)}return(u=t==null?void 0:t.onChange)==null||u.call(t,o),o}}function jt(e,n){if(e===void 0)throw new Error("Unexpected undefined");return e}const Nr=(e,n)=>Math.abs(e-n)<1,Pr=(e,n,t)=>{let r;return function(...o){e.clearTimeout(r),r=e.setTimeout(()=>n.apply(this,o),t)}},Mr=e=>e,Ar=e=>{const n=Math.max(e.startIndex-e.overscan,0),t=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let o=n;o<=t;o++)r.push(o);return r},Dr=(e,n)=>{const t=e.scrollElement;if(!t)return;const r=e.targetWindow;if(!r)return;const o=l=>{const{width:s,height:u}=l;n({width:Math.round(s),height:Math.round(u)})};if(o(t.getBoundingClientRect()),!r.ResizeObserver)return()=>{};const i=new r.ResizeObserver(l=>{const s=l[0];if(s!=null&&s.borderBoxSize){const u=s.borderBoxSize[0];if(u){o({width:u.inlineSize,height:u.blockSize});return}}o(t.getBoundingClientRect())});return i.observe(t,{box:"border-box"}),()=>{i.unobserve(t)}},mn={passive:!0},Lr=typeof window>"u"?!0:"onscrollend"in window,_r=(e,n)=>{const t=e.scrollElement;if(!t)return;const r=e.targetWindow;if(!r)return;let o=0;const i=Lr?()=>{}:Pr(r,()=>{n(o,!1)},e.options.isScrollingResetDelay),l=d=>()=>{o=t[e.options.horizontal?"scrollLeft":"scrollTop"],i(),n(o,d)},s=l(!0),u=l(!1);return u(),t.addEventListener("scroll",s,mn),t.addEventListener("scrollend",u,mn),()=>{t.removeEventListener("scroll",s),t.removeEventListener("scrollend",u)}},Rr=(e,n,t)=>{if(n!=null&&n.borderBoxSize){const r=n.borderBoxSize[0];if(r)return Math.round(r[t.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[t.options.horizontal?"width":"height"])},Br=(e,{adjustments:n=0,behavior:t},r)=>{var o,i;const l=e+n;(i=(o=r.scrollElement)==null?void 0:o.scrollTo)==null||i.call(o,{[r.options.horizontal?"left":"top"]:l,behavior:t})};class zr{constructor(n){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let t=null;const r=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(o=>{o.forEach(i=>{this._measureElement(i.target,i)})}));return{disconnect:()=>{var o;return(o=r())==null?void 0:o.disconnect()},observe:o=>{var i;return(i=r())==null?void 0:i.observe(o,{box:"border-box"})},unobserve:o=>{var i;return(i=r())==null?void 0:i.unobserve(o)}}})(),this.range=null,this.setOptions=t=>{Object.entries(t).forEach(([r,o])=>{typeof o>"u"&&delete t[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Mr,rangeExtractor:Ar,onChange:()=>{},measureElement:Rr,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,...t}},this.notify=(t,r)=>{var o,i;const{startIndex:l,endIndex:s}=this.range??{startIndex:void 0,endIndex:void 0},u=this.calculateRange();(t||l!==(u==null?void 0:u.startIndex)||s!==(u==null?void 0:u.endIndex))&&((i=(o=this.options).onChange)==null||i.call(o,this,r))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.notify(!1,!1);return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(o,i)=>{this.scrollAdjustments=0,this.scrollDirection=i?this.getScrollOffset()<o?"forward":"backward":null,this.scrollOffset=o;const l=this.isScrolling;this.isScrolling=i,this.notify(l!==i,i)}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(t,r)=>{const o=new Map,i=new Map;for(let l=r-1;l>=0;l--){const s=t[l];if(o.has(s.lane))continue;const u=i.get(s.lane);if(u==null||s.end>u.end?i.set(s.lane,s):s.end<u.end&&o.set(s.lane,!0),o.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((l,s)=>l.end===s.end?l.index-s.index:l.end-s.end)[0]:void 0},this.getMeasurementOptions=qe(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(t,r,o,i,l)=>(this.pendingMeasuredCacheIndexes=[],{count:t,paddingStart:r,scrollMargin:o,getItemKey:i,enabled:l}),{key:!1}),this.getMeasurements=qe(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:t,paddingStart:r,scrollMargin:o,getItemKey:i,enabled:l},s)=>{var u;if(!l)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(h=>{this.itemSizeCache.set(h.key,h.size)}));const d=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const f=this.measurementsCache.slice(0,d);for(let h=d;h<t;h++){let b=(u=this.measurementsCache[h])==null?void 0:u.measureElement;b||(b=I=>{const $=i(h),P=this.elementsCache.get($);if(!I){P&&(this.observer.unobserve(P),this.elementsCache.delete($));return}P!==I&&(P&&this.observer.unobserve(P),this.observer.observe(I),this.elementsCache.set($,I)),I.isConnected&&this.resizeItem(h,this.options.measureElement(I,void 0,this))});const p=i(h),v=this.options.lanes===1?f[h-1]:this.getFurthestMeasurement(f,h),g=v?v.end+this.options.gap:r+o,x=s.get(p),E=typeof x=="number"?x:this.options.estimateSize(h),y=g+E,T=v?v.lane:h%this.options.lanes;f[h]={index:h,start:g,size:E,end:y,key:p,lane:T,measureElement:b}}return this.measurementsCache=f,f},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=qe(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(t,r,o)=>this.range=t.length>0&&r>0?Wr({measurements:t,outerSize:r,scrollOffset:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getIndexes=qe(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(t,r,o,i)=>r===null?[]:t({startIndex:r.startIndex,endIndex:r.endIndex,overscan:o,count:i}),{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.indexFromElement=t=>{const r=this.options.indexAttribute,o=t.getAttribute(r);return o?parseInt(o,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(t,r)=>{const o=this.indexFromElement(t),i=this.getMeasurements()[o];if(!i||!t.isConnected){this.elementsCache.forEach((s,u)=>{s===t&&(this.observer.unobserve(t),this.elementsCache.delete(u))});return}const l=this.elementsCache.get(i.key);l!==t&&(l&&this.observer.unobserve(l),this.observer.observe(t),this.elementsCache.set(i.key,t)),this.resizeItem(o,this.options.measureElement(t,r,this))},this.resizeItem=(t,r)=>{const o=this.getMeasurements()[t];if(!o)return;const i=this.itemSizeCache.get(o.key)??o.size,l=r-i;l!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,l,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",l),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=l,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,r)),this.notify(!0,!1))},this.measureElement=t=>{t&&this._measureElement(t,void 0)},this.getVirtualItems=qe(()=>[this.getIndexes(),this.getMeasurements()],(t,r)=>{const o=[];for(let i=0,l=t.length;i<l;i++){const s=t[i],u=r[s];o.push(u)}return o},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=t=>{const r=this.getMeasurements();if(r.length!==0)return jt(r[pn(0,r.length-1,o=>jt(r[o]).start,t)])},this.getOffsetForAlignment=(t,r)=>{const o=this.getSize(),i=this.getScrollOffset();r==="auto"&&(t<=i?r="start":t>=i+o?r="end":r="start"),r==="start"?t=t:r==="end"?t=t-o:r==="center"&&(t=t-o/2);const l=this.options.horizontal?"scrollWidth":"scrollHeight",u=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[l]:this.scrollElement[l]:0)-o;return Math.max(Math.min(u,t),0)},this.getOffsetForIndex=(t,r="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const o=this.getMeasurements()[t];if(!o)return;const i=this.getSize(),l=this.getScrollOffset();if(r==="auto")if(o.end>=l+i-this.options.scrollPaddingEnd)r="end";else if(o.start<=l+this.options.scrollPaddingStart)r="start";else return[l,r];const s=r==="end"?o.end+this.options.scrollPaddingEnd:o.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,r),r]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(t,{align:r="start",behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(t,r),{adjustments:void 0,behavior:o})},this.scrollToIndex=(t,{align:r="auto",behavior:o}={})=>{t=Math.max(0,Math.min(t,this.options.count-1)),this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const i=this.getOffsetForIndex(t,r);if(!i)return;const[l,s]=i;this._scrollToOffset(l,{adjustments:void 0,behavior:o}),o!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(t))){const[d]=jt(this.getOffsetForIndex(t,s));Nr(d,this.getScrollOffset())||this.scrollToIndex(t,{align:s,behavior:o})}else this.scrollToIndex(t,{align:s,behavior:o})}))},this.scrollBy=(t,{behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+t,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var t;const r=this.getMeasurements();let o;return r.length===0?o=this.options.paddingStart:o=this.options.lanes===1?((t=r[r.length-1])==null?void 0:t.end)??0:Math.max(...r.slice(-this.options.lanes).map(i=>i.end)),o-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(t,{adjustments:r,behavior:o})=>{this.options.scrollToFn(t,{behavior:o,adjustments:r},this)},this.measure=()=>{var t,r;this.itemSizeCache=new Map,(r=(t=this.options).onChange)==null||r.call(t,this,!1)},this.setOptions(n)}}const pn=(e,n,t,r)=>{for(;e<=n;){const o=(e+n)/2|0,i=t(o);if(i<r)e=o+1;else if(i>r)n=o-1;else return o}return e>0?e-1:0};function Wr({measurements:e,outerSize:n,scrollOffset:t}){const r=e.length-1,i=pn(0,r,s=>e[s].start,t);let l=i;for(;l<r&&e[l].end<t+n;)l++;return{startIndex:i,endIndex:l}}const Hr=typeof document<"u"?C.useLayoutEffect:C.useEffect;function Ur(e){const n=C.useReducer(()=>({}),{})[1],t={...e,onChange:(o,i)=>{var l;i?un.flushSync(n):n(),(l=e.onChange)==null||l.call(e,o,i)}},[r]=C.useState(()=>new zr(t));return r.setOptions(t),C.useEffect(()=>r._didMount(),[]),Hr(()=>r._willUpdate()),r}function Vr(e){return Ur({observeElementRect:Dr,observeElementOffset:_r,scrollToFn:Br,...e})}var Yr=Object.defineProperty,qr=(e,n,t)=>n in e?Yr(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,It=(e,n,t)=>(qr(e,typeof n!="symbol"?n+"":n,t),t);let Gr=class{constructor(){It(this,"current",this.detect()),It(this,"handoffState","pending"),It(this,"currentId",0)}set(n){this.current!==n&&(this.handoffState="pending",this.currentId=0,this.current=n)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Oe=new Gr,ee=(e,n)=>{Oe.isServer?a.useEffect(e,n):a.useLayoutEffect(e,n)};function Se(e){let n=a.useRef(e);return ee(()=>{n.current=e},[e]),n}function $t(e,n){let[t,r]=a.useState(e),o=Se(e);return ee(()=>r(o.current),[o,r,...n]),t}let j=function(e){let n=Se(e);return a.useCallback((...t)=>n.current(...t),[n])};function hn(e,n,t){let[r,o]=a.useState(t),i=e!==void 0,l=a.useRef(i),s=a.useRef(!1),u=a.useRef(!1);return i&&!l.current&&!s.current?(s.current=!0,l.current=i,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!i&&l.current&&!u.current&&(u.current=!0,l.current=i,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[i?e:r,j(d=>(i||o(d),n==null?void 0:n(d)))]}function it(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(n=>setTimeout(()=>{throw n}))}function ye(){let e=[],n={addEventListener(t,r,o,i){return t.addEventListener(r,o,i),n.add(()=>t.removeEventListener(r,o,i))},requestAnimationFrame(...t){let r=requestAnimationFrame(...t);return n.add(()=>cancelAnimationFrame(r))},nextFrame(...t){return n.requestAnimationFrame(()=>n.requestAnimationFrame(...t))},setTimeout(...t){let r=setTimeout(...t);return n.add(()=>clearTimeout(r))},microTask(...t){let r={current:!0};return it(()=>{r.current&&t[0]()}),n.add(()=>{r.current=!1})},style(t,r,o){let i=t.style.getPropertyValue(r);return Object.assign(t.style,{[r]:o}),this.add(()=>{Object.assign(t.style,{[r]:i})})},group(t){let r=ye();return t(r),this.add(()=>r.dispose())},add(t){return e.push(t),()=>{let r=e.indexOf(t);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let t of e.splice(0))t()}};return n}function je(){let[e]=a.useState(ye);return a.useEffect(()=>()=>e.dispose(),[e]),e}function Kr(){let e=typeof document>"u";return"useSyncExternalStore"in C?(n=>n.useSyncExternalStore)(C)(()=>()=>{},()=>!1,()=>!e):!1}function Be(){let e=Kr(),[n,t]=C.useState(Oe.isHandoffComplete);return n&&Oe.isHandoffComplete===!1&&t(!1),C.useEffect(()=>{n!==!0&&t(!0)},[n]),C.useEffect(()=>Oe.handoff(),[]),e?!1:n}var vn;let ve=(vn=a.useId)!=null?vn:function(){let e=Be(),[n,t]=a.useState(e?()=>Oe.nextId():null);return ee(()=>{n===null&&t(Oe.nextId())},[n]),n!=null?""+n:void 0};function ae(e,n,...t){if(e in n){let o=n[e];return typeof o=="function"?o(...t):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(n).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,ae),r}function lt(e){return Oe.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let kt=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Ie=(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))(Ie||{}),gn=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(gn||{}),Zr=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Zr||{});function bn(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(kt)).sort((n,t)=>Math.sign((n.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}var Ft=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Ft||{});function Nt(e,n=0){var t;return e===((t=lt(e))==null?void 0:t.body)?!1:ae(n,{0(){return e.matches(kt)},1(){let r=e;for(;r!==null;){if(r.matches(kt))return!0;r=r.parentElement}return!1}})}function xn(e){let n=lt(e);ye().nextFrame(()=>{n&&!Nt(n.activeElement,0)&&Fe(e)})}var Qr=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Qr||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Fe(e){e==null||e.focus({preventScroll:!0})}let Jr=["textarea","input"].join(",");function Xr(e){var n,t;return(t=(n=e==null?void 0:e.matches)==null?void 0:n.call(e,Jr))!=null?t:!1}function Pt(e,n=t=>t){return e.slice().sort((t,r)=>{let o=n(t),i=n(r);if(o===null||i===null)return 0;let l=o.compareDocumentPosition(i);return l&Node.DOCUMENT_POSITION_FOLLOWING?-1:l&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function eo(e,n){return Ge(bn(),n,{relativeTo:e})}function Ge(e,n,{sorted:t=!0,relativeTo:r=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,l=Array.isArray(e)?t?Pt(e):e:bn(e);o.length>0&&l.length>1&&(l=l.filter(p=>!o.includes(p))),r=r??i.activeElement;let s=(()=>{if(n&5)return 1;if(n&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=(()=>{if(n&1)return 0;if(n&2)return Math.max(0,l.indexOf(r))-1;if(n&4)return Math.max(0,l.indexOf(r))+1;if(n&8)return l.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),d=n&32?{preventScroll:!0}:{},f=0,h=l.length,b;do{if(f>=h||f+h<=0)return 0;let p=u+f;if(n&16)p=(p+h)%h;else{if(p<0)return 3;if(p>=h)return 1}b=l[p],b==null||b.focus(d),f+=s}while(b!==i.activeElement);return n&6&&Xr(b)&&b.select(),2}function wn(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function to(){return/Android/gi.test(window.navigator.userAgent)}function yn(){return wn()||to()}function st(e,n,t){let r=Se(n);a.useEffect(()=>{function o(i){r.current(i)}return document.addEventListener(e,o,t),()=>document.removeEventListener(e,o,t)},[e,t])}function En(e,n,t){let r=Se(n);a.useEffect(()=>{function o(i){r.current(i)}return window.addEventListener(e,o,t),()=>window.removeEventListener(e,o,t)},[e,t])}function Mt(e,n,t=!0){let r=a.useRef(!1);a.useEffect(()=>{requestAnimationFrame(()=>{r.current=t})},[t]);function o(l,s){if(!r.current||l.defaultPrevented)return;let u=s(l);if(u===null||!u.getRootNode().contains(u)||!u.isConnected)return;let d=function f(h){return typeof h=="function"?f(h()):Array.isArray(h)||h instanceof Set?h:[h]}(e);for(let f of d){if(f===null)continue;let h=f instanceof HTMLElement?f:f.current;if(h!=null&&h.contains(u)||l.composed&&l.composedPath().includes(h))return}return!Nt(u,Ft.Loose)&&u.tabIndex!==-1&&l.preventDefault(),n(l,u)}let i=a.useRef(null);st("pointerdown",l=>{var s,u;r.current&&(i.current=((u=(s=l.composedPath)==null?void 0:s.call(l))==null?void 0:u[0])||l.target)},!0),st("mousedown",l=>{var s,u;r.current&&(i.current=((u=(s=l.composedPath)==null?void 0:s.call(l))==null?void 0:u[0])||l.target)},!0),st("click",l=>{yn()||i.current&&(o(l,()=>i.current),i.current=null)},!0),st("touchend",l=>o(l,()=>l.target instanceof HTMLElement?l.target:null),!0),En("blur",l=>o(l,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function De(...e){return a.useMemo(()=>lt(...e),[...e])}function Sn(e){var n;if(e.type)return e.type;let t=(n=e.as)!=null?n:"button";if(typeof t=="string"&&t.toLowerCase()==="button")return"button"}function At(e,n){let[t,r]=a.useState(()=>Sn(e));return ee(()=>{r(Sn(e))},[e.type,e.as]),ee(()=>{t||n.current&&n.current instanceof HTMLButtonElement&&!n.current.hasAttribute("type")&&r("button")},[t,n]),t}let Cn=Symbol();function no(e,n=!0){return Object.assign(e,{[Cn]:n})}function ue(...e){let n=a.useRef(e);a.useEffect(()=>{n.current=e},[e]);let t=j(r=>{for(let o of n.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||(r==null?void 0:r[Cn]))?void 0:t}function Tn(e){return[e.screenX,e.screenY]}function On(){let e=a.useRef([-1,-1]);return{wasMoved(n){let t=Tn(n);return e.current[0]===t[0]&&e.current[1]===t[1]?!1:(e.current=t,!0)},update(n){e.current=Tn(n)}}}function jn({container:e,accept:n,walk:t,enabled:r=!0}){let o=a.useRef(n),i=a.useRef(t);a.useEffect(()=>{o.current=n,i.current=t},[n,t]),ee(()=>{if(!e||!r)return;let l=lt(e);if(!l)return;let s=o.current,u=i.current,d=Object.assign(h=>s(h),{acceptNode:s}),f=l.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,d,!1);for(;f.nextNode();)u(f.currentNode)},[e,r,o,i])}function Ke(e,n){let t=a.useRef([]),r=j(e);a.useEffect(()=>{let o=[...t.current];for(let[i,l]of n.entries())if(t.current[i]!==l){let s=r(n,o);return t.current=n,s}},[r,...n])}function at(...e){return Array.from(new Set(e.flatMap(n=>typeof n=="string"?n.split(" "):[]))).filter(Boolean).join(" ")}var Ne=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Ne||{}),Pe=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Pe||{});function le({ourProps:e,theirProps:n,slot:t,defaultTag:r,features:o,visible:i=!0,name:l,mergeRefs:s}){s=s??ro;let u=In(n,e);if(i)return ut(u,t,r,l,s);let d=o??0;if(d&2){let{static:f=!1,...h}=u;if(f)return ut(h,t,r,l,s)}if(d&1){let{unmount:f=!0,...h}=u;return ae(f?0:1,{0(){return null},1(){return ut({...h,hidden:!0,style:{display:"none"}},t,r,l,s)}})}return ut(u,t,r,l,s)}function ut(e,n={},t,r,o){let{as:i=t,children:l,refName:s="ref",...u}=Dt(e,["unmount","static"]),d=e.ref!==void 0?{[s]:e.ref}:{},f=typeof l=="function"?l(n):l;"className"in u&&u.className&&typeof u.className=="function"&&(u.className=u.className(n));let h={};if(n){let b=!1,p=[];for(let[v,g]of Object.entries(n))typeof g=="boolean"&&(b=!0),g===!0&&p.push(v);b&&(h["data-headlessui-state"]=p.join(" "))}if(i===a.Fragment&&Object.keys(ct(u)).length>0){if(!a.isValidElement(f)||Array.isArray(f)&&f.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(u).map(g=>` - ${g}`).join(`
|
|
28
|
+
color: hsl(${Math.max(0,Math.min(120-120*g,120))}deg 100% 31%);`,t==null?void 0:t.key)}return(u=t==null?void 0:t.onChange)==null||u.call(t,o),o}}function jt(e,n){if(e===void 0)throw new Error("Unexpected undefined");return e}const Pr=(e,n)=>Math.abs(e-n)<1,kr=(e,n,t)=>{let r;return function(...o){e.clearTimeout(r),r=e.setTimeout(()=>n.apply(this,o),t)}},Mr=e=>e,Ar=e=>{const n=Math.max(e.startIndex-e.overscan,0),t=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let o=n;o<=t;o++)r.push(o);return r},Dr=(e,n)=>{const t=e.scrollElement;if(!t)return;const r=e.targetWindow;if(!r)return;const o=l=>{const{width:s,height:u}=l;n({width:Math.round(s),height:Math.round(u)})};if(o(t.getBoundingClientRect()),!r.ResizeObserver)return()=>{};const i=new r.ResizeObserver(l=>{const s=l[0];if(s!=null&&s.borderBoxSize){const u=s.borderBoxSize[0];if(u){o({width:u.inlineSize,height:u.blockSize});return}}o(t.getBoundingClientRect())});return i.observe(t,{box:"border-box"}),()=>{i.unobserve(t)}},mn={passive:!0},Lr=typeof window>"u"?!0:"onscrollend"in window,_r=(e,n)=>{const t=e.scrollElement;if(!t)return;const r=e.targetWindow;if(!r)return;let o=0;const i=Lr?()=>{}:kr(r,()=>{n(o,!1)},e.options.isScrollingResetDelay),l=c=>()=>{o=t[e.options.horizontal?"scrollLeft":"scrollTop"],i(),n(o,c)},s=l(!0),u=l(!1);return u(),t.addEventListener("scroll",s,mn),t.addEventListener("scrollend",u,mn),()=>{t.removeEventListener("scroll",s),t.removeEventListener("scrollend",u)}},Rr=(e,n,t)=>{if(n!=null&&n.borderBoxSize){const r=n.borderBoxSize[0];if(r)return Math.round(r[t.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[t.options.horizontal?"width":"height"])},Br=(e,{adjustments:n=0,behavior:t},r)=>{var o,i;const l=e+n;(i=(o=r.scrollElement)==null?void 0:o.scrollTo)==null||i.call(o,{[r.options.horizontal?"left":"top"]:l,behavior:t})};class zr{constructor(n){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let t=null;const r=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(o=>{o.forEach(i=>{this._measureElement(i.target,i)})}));return{disconnect:()=>{var o;return(o=r())==null?void 0:o.disconnect()},observe:o=>{var i;return(i=r())==null?void 0:i.observe(o,{box:"border-box"})},unobserve:o=>{var i;return(i=r())==null?void 0:i.unobserve(o)}}})(),this.range=null,this.setOptions=t=>{Object.entries(t).forEach(([r,o])=>{typeof o>"u"&&delete t[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Mr,rangeExtractor:Ar,onChange:()=>{},measureElement:Rr,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,...t}},this.notify=(t,r)=>{var o,i;const{startIndex:l,endIndex:s}=this.range??{startIndex:void 0,endIndex:void 0},u=this.calculateRange();(t||l!==(u==null?void 0:u.startIndex)||s!==(u==null?void 0:u.endIndex))&&((i=(o=this.options).onChange)==null||i.call(o,this,r))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.notify(!1,!1);return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(o,i)=>{this.scrollAdjustments=0,this.scrollDirection=i?this.getScrollOffset()<o?"forward":"backward":null,this.scrollOffset=o;const l=this.isScrolling;this.isScrolling=i,this.notify(l!==i,i)}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(t,r)=>{const o=new Map,i=new Map;for(let l=r-1;l>=0;l--){const s=t[l];if(o.has(s.lane))continue;const u=i.get(s.lane);if(u==null||s.end>u.end?i.set(s.lane,s):s.end<u.end&&o.set(s.lane,!0),o.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((l,s)=>l.end===s.end?l.index-s.index:l.end-s.end)[0]:void 0},this.getMeasurementOptions=qe(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(t,r,o,i,l)=>(this.pendingMeasuredCacheIndexes=[],{count:t,paddingStart:r,scrollMargin:o,getItemKey:i,enabled:l}),{key:!1}),this.getMeasurements=qe(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:t,paddingStart:r,scrollMargin:o,getItemKey:i,enabled:l},s)=>{var u;if(!l)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(h=>{this.itemSizeCache.set(h.key,h.size)}));const c=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const m=this.measurementsCache.slice(0,c);for(let h=c;h<t;h++){let b=(u=this.measurementsCache[h])==null?void 0:u.measureElement;b||(b=I=>{const N=i(h),k=this.elementsCache.get(N);if(!I){k&&(this.observer.unobserve(k),this.elementsCache.delete(N));return}k!==I&&(k&&this.observer.unobserve(k),this.observer.observe(I),this.elementsCache.set(N,I)),I.isConnected&&this.resizeItem(h,this.options.measureElement(I,void 0,this))});const p=i(h),v=this.options.lanes===1?m[h-1]:this.getFurthestMeasurement(m,h),g=v?v.end+this.options.gap:r+o,x=s.get(p),S=typeof x=="number"?x:this.options.estimateSize(h),y=g+S,T=v?v.lane:h%this.options.lanes;m[h]={index:h,start:g,size:S,end:y,key:p,lane:T,measureElement:b}}return this.measurementsCache=m,m},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=qe(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(t,r,o)=>this.range=t.length>0&&r>0?Wr({measurements:t,outerSize:r,scrollOffset:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getIndexes=qe(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(t,r,o,i)=>r===null?[]:t({startIndex:r.startIndex,endIndex:r.endIndex,overscan:o,count:i}),{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.indexFromElement=t=>{const r=this.options.indexAttribute,o=t.getAttribute(r);return o?parseInt(o,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(t,r)=>{const o=this.indexFromElement(t),i=this.getMeasurements()[o];if(!i||!t.isConnected){this.elementsCache.forEach((s,u)=>{s===t&&(this.observer.unobserve(t),this.elementsCache.delete(u))});return}const l=this.elementsCache.get(i.key);l!==t&&(l&&this.observer.unobserve(l),this.observer.observe(t),this.elementsCache.set(i.key,t)),this.resizeItem(o,this.options.measureElement(t,r,this))},this.resizeItem=(t,r)=>{const o=this.getMeasurements()[t];if(!o)return;const i=this.itemSizeCache.get(o.key)??o.size,l=r-i;l!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,l,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",l),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=l,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,r)),this.notify(!0,!1))},this.measureElement=t=>{t&&this._measureElement(t,void 0)},this.getVirtualItems=qe(()=>[this.getIndexes(),this.getMeasurements()],(t,r)=>{const o=[];for(let i=0,l=t.length;i<l;i++){const s=t[i],u=r[s];o.push(u)}return o},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=t=>{const r=this.getMeasurements();if(r.length!==0)return jt(r[pn(0,r.length-1,o=>jt(r[o]).start,t)])},this.getOffsetForAlignment=(t,r)=>{const o=this.getSize(),i=this.getScrollOffset();r==="auto"&&(t<=i?r="start":t>=i+o?r="end":r="start"),r==="start"?t=t:r==="end"?t=t-o:r==="center"&&(t=t-o/2);const l=this.options.horizontal?"scrollWidth":"scrollHeight",u=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[l]:this.scrollElement[l]:0)-o;return Math.max(Math.min(u,t),0)},this.getOffsetForIndex=(t,r="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const o=this.getMeasurements()[t];if(!o)return;const i=this.getSize(),l=this.getScrollOffset();if(r==="auto")if(o.end>=l+i-this.options.scrollPaddingEnd)r="end";else if(o.start<=l+this.options.scrollPaddingStart)r="start";else return[l,r];const s=r==="end"?o.end+this.options.scrollPaddingEnd:o.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,r),r]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(t,{align:r="start",behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(t,r),{adjustments:void 0,behavior:o})},this.scrollToIndex=(t,{align:r="auto",behavior:o}={})=>{t=Math.max(0,Math.min(t,this.options.count-1)),this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const i=this.getOffsetForIndex(t,r);if(!i)return;const[l,s]=i;this._scrollToOffset(l,{adjustments:void 0,behavior:o}),o!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(t))){const[c]=jt(this.getOffsetForIndex(t,s));Pr(c,this.getScrollOffset())||this.scrollToIndex(t,{align:s,behavior:o})}else this.scrollToIndex(t,{align:s,behavior:o})}))},this.scrollBy=(t,{behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+t,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var t;const r=this.getMeasurements();let o;return r.length===0?o=this.options.paddingStart:o=this.options.lanes===1?((t=r[r.length-1])==null?void 0:t.end)??0:Math.max(...r.slice(-this.options.lanes).map(i=>i.end)),o-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(t,{adjustments:r,behavior:o})=>{this.options.scrollToFn(t,{behavior:o,adjustments:r},this)},this.measure=()=>{var t,r;this.itemSizeCache=new Map,(r=(t=this.options).onChange)==null||r.call(t,this,!1)},this.setOptions(n)}}const pn=(e,n,t,r)=>{for(;e<=n;){const o=(e+n)/2|0,i=t(o);if(i<r)e=o+1;else if(i>r)n=o-1;else return o}return e>0?e-1:0};function Wr({measurements:e,outerSize:n,scrollOffset:t}){const r=e.length-1,i=pn(0,r,s=>e[s].start,t);let l=i;for(;l<r&&e[l].end<t+n;)l++;return{startIndex:i,endIndex:l}}const Hr=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Ur(e){const n=E.useReducer(()=>({}),{})[1],t={...e,onChange:(o,i)=>{var l;i?un.flushSync(n):n(),(l=e.onChange)==null||l.call(e,o,i)}},[r]=E.useState(()=>new zr(t));return r.setOptions(t),E.useEffect(()=>r._didMount(),[]),Hr(()=>r._willUpdate()),r}function Vr(e){return Ur({observeElementRect:Dr,observeElementOffset:_r,scrollToFn:Br,...e})}var Yr=Object.defineProperty,qr=(e,n,t)=>n in e?Yr(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,It=(e,n,t)=>(qr(e,typeof n!="symbol"?n+"":n,t),t);let Gr=class{constructor(){It(this,"current",this.detect()),It(this,"handoffState","pending"),It(this,"currentId",0)}set(n){this.current!==n&&(this.handoffState="pending",this.currentId=0,this.current=n)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Oe=new Gr,ee=(e,n)=>{Oe.isServer?a.useEffect(e,n):a.useLayoutEffect(e,n)};function Se(e){let n=a.useRef(e);return ee(()=>{n.current=e},[e]),n}function Nt(e,n){let[t,r]=a.useState(e),o=Se(e);return ee(()=>r(o.current),[o,r,...n]),t}let j=function(e){let n=Se(e);return a.useCallback((...t)=>n.current(...t),[n])};function hn(e,n,t){let[r,o]=a.useState(t),i=e!==void 0,l=a.useRef(i),s=a.useRef(!1),u=a.useRef(!1);return i&&!l.current&&!s.current?(s.current=!0,l.current=i,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!i&&l.current&&!u.current&&(u.current=!0,l.current=i,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[i?e:r,j(c=>(i||o(c),n==null?void 0:n(c)))]}function it(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(n=>setTimeout(()=>{throw n}))}function ye(){let e=[],n={addEventListener(t,r,o,i){return t.addEventListener(r,o,i),n.add(()=>t.removeEventListener(r,o,i))},requestAnimationFrame(...t){let r=requestAnimationFrame(...t);return n.add(()=>cancelAnimationFrame(r))},nextFrame(...t){return n.requestAnimationFrame(()=>n.requestAnimationFrame(...t))},setTimeout(...t){let r=setTimeout(...t);return n.add(()=>clearTimeout(r))},microTask(...t){let r={current:!0};return it(()=>{r.current&&t[0]()}),n.add(()=>{r.current=!1})},style(t,r,o){let i=t.style.getPropertyValue(r);return Object.assign(t.style,{[r]:o}),this.add(()=>{Object.assign(t.style,{[r]:i})})},group(t){let r=ye();return t(r),this.add(()=>r.dispose())},add(t){return e.push(t),()=>{let r=e.indexOf(t);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let t of e.splice(0))t()}};return n}function je(){let[e]=a.useState(ye);return a.useEffect(()=>()=>e.dispose(),[e]),e}function Zr(){let e=typeof document>"u";return"useSyncExternalStore"in E?(n=>n.useSyncExternalStore)(E)(()=>()=>{},()=>!1,()=>!e):!1}function Be(){let e=Zr(),[n,t]=E.useState(Oe.isHandoffComplete);return n&&Oe.isHandoffComplete===!1&&t(!1),E.useEffect(()=>{n!==!0&&t(!0)},[n]),E.useEffect(()=>Oe.handoff(),[]),e?!1:n}var vn;let ve=(vn=a.useId)!=null?vn:function(){let e=Be(),[n,t]=a.useState(e?()=>Oe.nextId():null);return ee(()=>{n===null&&t(Oe.nextId())},[n]),n!=null?""+n:void 0};function ae(e,n,...t){if(e in n){let o=n[e];return typeof o=="function"?o(...t):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(n).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,ae),r}function lt(e){return Oe.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let Ft=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Ie=(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))(Ie||{}),gn=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(gn||{}),Kr=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Kr||{});function bn(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Ft)).sort((n,t)=>Math.sign((n.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}var $t=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))($t||{});function Pt(e,n=0){var t;return e===((t=lt(e))==null?void 0:t.body)?!1:ae(n,{0(){return e.matches(Ft)},1(){let r=e;for(;r!==null;){if(r.matches(Ft))return!0;r=r.parentElement}return!1}})}function xn(e){let n=lt(e);ye().nextFrame(()=>{n&&!Pt(n.activeElement,0)&&$e(e)})}var Jr=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Jr||{});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 $e(e){e==null||e.focus({preventScroll:!0})}let Qr=["textarea","input"].join(",");function Xr(e){var n,t;return(t=(n=e==null?void 0:e.matches)==null?void 0:n.call(e,Qr))!=null?t:!1}function kt(e,n=t=>t){return e.slice().sort((t,r)=>{let o=n(t),i=n(r);if(o===null||i===null)return 0;let l=o.compareDocumentPosition(i);return l&Node.DOCUMENT_POSITION_FOLLOWING?-1:l&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function eo(e,n){return Ge(bn(),n,{relativeTo:e})}function Ge(e,n,{sorted:t=!0,relativeTo:r=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,l=Array.isArray(e)?t?kt(e):e:bn(e);o.length>0&&l.length>1&&(l=l.filter(p=>!o.includes(p))),r=r??i.activeElement;let s=(()=>{if(n&5)return 1;if(n&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=(()=>{if(n&1)return 0;if(n&2)return Math.max(0,l.indexOf(r))-1;if(n&4)return Math.max(0,l.indexOf(r))+1;if(n&8)return l.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=n&32?{preventScroll:!0}:{},m=0,h=l.length,b;do{if(m>=h||m+h<=0)return 0;let p=u+m;if(n&16)p=(p+h)%h;else{if(p<0)return 3;if(p>=h)return 1}b=l[p],b==null||b.focus(c),m+=s}while(b!==i.activeElement);return n&6&&Xr(b)&&b.select(),2}function wn(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function to(){return/Android/gi.test(window.navigator.userAgent)}function yn(){return wn()||to()}function st(e,n,t){let r=Se(n);a.useEffect(()=>{function o(i){r.current(i)}return document.addEventListener(e,o,t),()=>document.removeEventListener(e,o,t)},[e,t])}function En(e,n,t){let r=Se(n);a.useEffect(()=>{function o(i){r.current(i)}return window.addEventListener(e,o,t),()=>window.removeEventListener(e,o,t)},[e,t])}function Mt(e,n,t=!0){let r=a.useRef(!1);a.useEffect(()=>{requestAnimationFrame(()=>{r.current=t})},[t]);function o(l,s){if(!r.current||l.defaultPrevented)return;let u=s(l);if(u===null||!u.getRootNode().contains(u)||!u.isConnected)return;let c=function m(h){return typeof h=="function"?m(h()):Array.isArray(h)||h instanceof Set?h:[h]}(e);for(let m of c){if(m===null)continue;let h=m instanceof HTMLElement?m:m.current;if(h!=null&&h.contains(u)||l.composed&&l.composedPath().includes(h))return}return!Pt(u,$t.Loose)&&u.tabIndex!==-1&&l.preventDefault(),n(l,u)}let i=a.useRef(null);st("pointerdown",l=>{var s,u;r.current&&(i.current=((u=(s=l.composedPath)==null?void 0:s.call(l))==null?void 0:u[0])||l.target)},!0),st("mousedown",l=>{var s,u;r.current&&(i.current=((u=(s=l.composedPath)==null?void 0:s.call(l))==null?void 0:u[0])||l.target)},!0),st("click",l=>{yn()||i.current&&(o(l,()=>i.current),i.current=null)},!0),st("touchend",l=>o(l,()=>l.target instanceof HTMLElement?l.target:null),!0),En("blur",l=>o(l,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function De(...e){return a.useMemo(()=>lt(...e),[...e])}function Sn(e){var n;if(e.type)return e.type;let t=(n=e.as)!=null?n:"button";if(typeof t=="string"&&t.toLowerCase()==="button")return"button"}function At(e,n){let[t,r]=a.useState(()=>Sn(e));return ee(()=>{r(Sn(e))},[e.type,e.as]),ee(()=>{t||n.current&&n.current instanceof HTMLButtonElement&&!n.current.hasAttribute("type")&&r("button")},[t,n]),t}let Cn=Symbol();function no(e,n=!0){return Object.assign(e,{[Cn]:n})}function ue(...e){let n=a.useRef(e);a.useEffect(()=>{n.current=e},[e]);let t=j(r=>{for(let o of n.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||(r==null?void 0:r[Cn]))?void 0:t}function Tn(e){return[e.screenX,e.screenY]}function On(){let e=a.useRef([-1,-1]);return{wasMoved(n){let t=Tn(n);return e.current[0]===t[0]&&e.current[1]===t[1]?!1:(e.current=t,!0)},update(n){e.current=Tn(n)}}}function jn({container:e,accept:n,walk:t,enabled:r=!0}){let o=a.useRef(n),i=a.useRef(t);a.useEffect(()=>{o.current=n,i.current=t},[n,t]),ee(()=>{if(!e||!r)return;let l=lt(e);if(!l)return;let s=o.current,u=i.current,c=Object.assign(h=>s(h),{acceptNode:s}),m=l.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,c,!1);for(;m.nextNode();)u(m.currentNode)},[e,r,o,i])}function Ze(e,n){let t=a.useRef([]),r=j(e);a.useEffect(()=>{let o=[...t.current];for(let[i,l]of n.entries())if(t.current[i]!==l){let s=r(n,o);return t.current=n,s}},[r,...n])}function at(...e){return Array.from(new Set(e.flatMap(n=>typeof n=="string"?n.split(" "):[]))).filter(Boolean).join(" ")}var Pe=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Pe||{}),ke=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(ke||{});function le({ourProps:e,theirProps:n,slot:t,defaultTag:r,features:o,visible:i=!0,name:l,mergeRefs:s}){s=s??ro;let u=In(n,e);if(i)return ut(u,t,r,l,s);let c=o??0;if(c&2){let{static:m=!1,...h}=u;if(m)return ut(h,t,r,l,s)}if(c&1){let{unmount:m=!0,...h}=u;return ae(m?0:1,{0(){return null},1(){return ut({...h,hidden:!0,style:{display:"none"}},t,r,l,s)}})}return ut(u,t,r,l,s)}function ut(e,n={},t,r,o){let{as:i=t,children:l,refName:s="ref",...u}=Dt(e,["unmount","static"]),c=e.ref!==void 0?{[s]:e.ref}:{},m=typeof l=="function"?l(n):l;"className"in u&&u.className&&typeof u.className=="function"&&(u.className=u.className(n));let h={};if(n){let b=!1,p=[];for(let[v,g]of Object.entries(n))typeof g=="boolean"&&(b=!0),g===!0&&p.push(v);b&&(h["data-headlessui-state"]=p.join(" "))}if(i===a.Fragment&&Object.keys(ct(u)).length>0){if(!a.isValidElement(m)||Array.isArray(m)&&m.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(u).map(g=>` - ${g}`).join(`
|
|
29
29
|
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(g=>` - ${g}`).join(`
|
|
30
30
|
`)].join(`
|
|
31
|
-
`));let b=f.props,p=typeof(b==null?void 0:b.className)=="function"?(...g)=>at(b==null?void 0:b.className(...g),u.className):at(b==null?void 0:b.className,u.className),v=p?{className:p}:{};return a.cloneElement(f,Object.assign({},In(f.props,ct(Dt(u,["ref"]))),h,d,{ref:o(f.ref,d.ref)},v))}return a.createElement(i,Object.assign({},Dt(u,["ref"]),i!==a.Fragment&&d,i!==a.Fragment&&h),f)}function ro(...e){return e.every(n=>n==null)?void 0:n=>{for(let t of e)t!=null&&(typeof t=="function"?t(n):t.current=n)}}function In(...e){if(e.length===0)return{};if(e.length===1)return e[0];let n={},t={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(t[o]!=null||(t[o]=[]),t[o].push(r[o])):n[o]=r[o];if(n.disabled||n["aria-disabled"])return Object.assign(n,Object.fromEntries(Object.keys(t).map(r=>[r,void 0])));for(let r in t)Object.assign(n,{[r](o,...i){let l=t[r];for(let s of l){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;s(o,...i)}}});return n}function se(e){var n;return Object.assign(a.forwardRef(e),{displayName:(n=e.displayName)!=null?n:e.name})}function ct(e){let n=Object.assign({},e);for(let t in n)n[t]===void 0&&delete n[t];return n}function Dt(e,n=[]){let t=Object.assign({},e);for(let r of n)r in t&&delete t[r];return t}let oo="div";var ze=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(ze||{});function io(e,n){var t;let{features:r=1,...o}=e,i={ref:n,"aria-hidden":(r&2)===2?!0:(t=o["aria-hidden"])!=null?t:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return le({ourProps:i,theirProps:o,slot:{},defaultTag:oo,name:"Hidden"})}let Ze=se(io),Lt=a.createContext(null);Lt.displayName="OpenClosedContext";var ce=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ce||{});function Qe(){return a.useContext(Lt)}function _t({value:e,children:n}){return a.createElement(Lt.Provider,{value:e},n)}function lo(e){function n(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",n))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",n),n())}let Te=[];lo(()=>{function e(n){n.target instanceof HTMLElement&&n.target!==document.body&&Te[0]!==n.target&&(Te.unshift(n.target),Te=Te.filter(t=>t!=null&&t.isConnected),Te.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function dt(e){let n=e.parentElement,t=null;for(;n&&!(n instanceof HTMLFieldSetElement);)n instanceof HTMLLegendElement&&(t=n),n=n.parentElement;let r=(n==null?void 0:n.getAttribute("disabled"))==="";return r&&so(t)?!1:r}function so(e){if(!e)return!1;let n=e.previousElementSibling;for(;n!==null;){if(n instanceof HTMLLegendElement)return!1;n=n.previousElementSibling}return!0}function ao(e){throw new Error("Unexpected object: "+e)}var te=(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))(te||{});function Rt(e,n){let t=n.resolveItems();if(t.length<=0)return null;let r=n.resolveActiveIndex(),o=r??-1;switch(e.focus){case 0:{for(let i=0;i<t.length;++i)if(!n.resolveDisabled(t[i],i,t))return i;return r}case 1:{for(let i=o-1;i>=0;--i)if(!n.resolveDisabled(t[i],i,t))return i;return r}case 2:{for(let i=o+1;i<t.length;++i)if(!n.resolveDisabled(t[i],i,t))return i;return r}case 3:{for(let i=t.length-1;i>=0;--i)if(!n.resolveDisabled(t[i],i,t))return i;return r}case 4:{for(let i=0;i<t.length;++i)if(n.resolveId(t[i],i,t)===e.id)return i;return r}case 5:return null;default:ao(e)}}function $n(e={},n=null,t=[]){for(let[r,o]of Object.entries(e))Fn(t,kn(n,r),o);return t}function kn(e,n){return e?e+"["+n+"]":n}function Fn(e,n,t){if(Array.isArray(t))for(let[r,o]of t.entries())Fn(e,kn(n,r.toString()),o);else t instanceof Date?e.push([n,t.toISOString()]):typeof t=="boolean"?e.push([n,t?"1":"0"]):typeof t=="string"?e.push([n,t]):typeof t=="number"?e.push([n,`${t}`]):t==null?e.push([n,""]):$n(t,n,e)}function uo(e){var n,t;let r=(n=e==null?void 0:e.form)!=null?n:e.closest("form");if(r){for(let o of r.elements)if(o!==e&&(o.tagName==="INPUT"&&o.type==="submit"||o.tagName==="BUTTON"&&o.type==="submit"||o.nodeName==="INPUT"&&o.type==="image")){o.click();return}(t=r.requestSubmit)==null||t.call(r)}}var K=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(K||{}),co=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(co||{}),fo=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(fo||{}),mo=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(mo||{}),po=(e=>(e[e.OpenCombobox=0]="OpenCombobox",e[e.CloseCombobox=1]="CloseCombobox",e[e.GoToOption=2]="GoToOption",e[e.RegisterOption=3]="RegisterOption",e[e.UnregisterOption=4]="UnregisterOption",e[e.RegisterLabel=5]="RegisterLabel",e[e.SetActivationTrigger=6]="SetActivationTrigger",e[e.UpdateVirtualOptions=7]="UpdateVirtualOptions",e))(po||{});function Bt(e,n=t=>t){let t=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=n(e.options.slice()),o=r.length>0&&r[0].dataRef.current.order!==null?r.sort((l,s)=>l.dataRef.current.order-s.dataRef.current.order):Pt(r,l=>l.dataRef.current.domRef.current),i=t?o.indexOf(t):null;return i===-1&&(i=null),{options:o,activeOptionIndex:i}}let ho={1(e){var n;return(n=e.dataRef.current)!=null&&n.disabled||e.comboboxState===1?e:{...e,activeOptionIndex:null,comboboxState:1}},0(e){var n,t;if((n=e.dataRef.current)!=null&&n.disabled||e.comboboxState===0)return e;if((t=e.dataRef.current)!=null&&t.value){let r=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(r!==-1)return{...e,activeOptionIndex:r,comboboxState:0}}return{...e,comboboxState:0}},2(e,n){var t,r,o,i,l;if((t=e.dataRef.current)!=null&&t.disabled||(r=e.dataRef.current)!=null&&r.optionsRef.current&&!((o=e.dataRef.current)!=null&&o.optionsPropsRef.current.static)&&e.comboboxState===1)return e;if(e.virtual){let f=n.focus===te.Specific?n.idx:Rt(n,{resolveItems:()=>e.virtual.options,resolveActiveIndex:()=>{var b,p;return(p=(b=e.activeOptionIndex)!=null?b:e.virtual.options.findIndex(v=>!e.virtual.disabled(v)))!=null?p:null},resolveDisabled:e.virtual.disabled,resolveId(){throw new Error("Function not implemented.")}}),h=(i=n.trigger)!=null?i:2;return e.activeOptionIndex===f&&e.activationTrigger===h?e:{...e,activeOptionIndex:f,activationTrigger:h}}let s=Bt(e);if(s.activeOptionIndex===null){let f=s.options.findIndex(h=>!h.dataRef.current.disabled);f!==-1&&(s.activeOptionIndex=f)}let u=n.focus===te.Specific?n.idx:Rt(n,{resolveItems:()=>s.options,resolveActiveIndex:()=>s.activeOptionIndex,resolveId:f=>f.id,resolveDisabled:f=>f.dataRef.current.disabled}),d=(l=n.trigger)!=null?l:2;return e.activeOptionIndex===u&&e.activationTrigger===d?e:{...e,...s,activeOptionIndex:u,activationTrigger:d}},3:(e,n)=>{var t,r,o;if((t=e.dataRef.current)!=null&&t.virtual)return{...e,options:[...e.options,n.payload]};let i=n.payload,l=Bt(e,u=>(u.push(i),u));e.activeOptionIndex===null&&(r=e.dataRef.current)!=null&&r.isSelected(n.payload.dataRef.current.value)&&(l.activeOptionIndex=l.options.indexOf(i));let s={...e,...l,activationTrigger:2};return(o=e.dataRef.current)!=null&&o.__demoMode&&e.dataRef.current.value===void 0&&(s.activeOptionIndex=0),s},4:(e,n)=>{var t;if((t=e.dataRef.current)!=null&&t.virtual)return{...e,options:e.options.filter(o=>o.id!==n.id)};let r=Bt(e,o=>{let i=o.findIndex(l=>l.id===n.id);return i!==-1&&o.splice(i,1),o});return{...e,...r,activationTrigger:2}},5:(e,n)=>e.labelId===n.id?e:{...e,labelId:n.id},6:(e,n)=>e.activationTrigger===n.trigger?e:{...e,activationTrigger:n.trigger},7:(e,n)=>{var t;if(((t=e.virtual)==null?void 0:t.options)===n.options)return e;let r=e.activeOptionIndex;if(e.activeOptionIndex!==null){let o=n.options.indexOf(e.virtual.options[e.activeOptionIndex]);o!==-1?r=o:r=null}return{...e,activeOptionIndex:r,virtual:Object.assign({},e.virtual,{options:n.options})}}},zt=a.createContext(null);zt.displayName="ComboboxActionsContext";function Je(e){let n=a.useContext(zt);if(n===null){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Je),t}return n}let Nn=a.createContext(null);function vo(e){var n;let t=Le("VirtualProvider"),[r,o]=a.useMemo(()=>{let u=t.optionsRef.current;if(!u)return[0,0];let d=window.getComputedStyle(u);return[parseFloat(d.paddingBlockStart||d.paddingTop),parseFloat(d.paddingBlockEnd||d.paddingBottom)]},[t.optionsRef.current]),i=Vr({scrollPaddingStart:r,scrollPaddingEnd:o,count:t.virtual.options.length,estimateSize(){return 40},getScrollElement(){var u;return(u=t.optionsRef.current)!=null?u:null},overscan:12}),[l,s]=a.useState(0);return ee(()=>{s(u=>u+1)},[(n=t.virtual)==null?void 0:n.options]),a.createElement(Nn.Provider,{value:i},a.createElement("div",{style:{position:"relative",width:"100%",height:`${i.getTotalSize()}px`},ref:u=>{if(u){if(typeof process<"u"&&process.env.JEST_WORKER_ID!==void 0||t.activationTrigger===0)return;t.activeOptionIndex!==null&&t.virtual.options.length>t.activeOptionIndex&&i.scrollToIndex(t.activeOptionIndex)}}},i.getVirtualItems().map(u=>{var d;return a.createElement(a.Fragment,{key:u.key},a.cloneElement((d=e.children)==null?void 0:d.call(e,{option:t.virtual.options[u.index],open:t.comboboxState===0}),{key:`${l}-${u.key}`,"data-index":u.index,"aria-setsize":t.virtual.options.length,"aria-posinset":u.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${u.start}px)`,overflowAnchor:"none"}}))})))}let Wt=a.createContext(null);Wt.displayName="ComboboxDataContext";function Le(e){let n=a.useContext(Wt);if(n===null){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Le),t}return n}function go(e,n){return ae(n.type,ho,e,n)}let bo=a.Fragment;function xo(e,n){let{value:t,defaultValue:r,onChange:o,form:i,name:l,by:s=null,disabled:u=!1,__demoMode:d=!1,nullable:f=!1,multiple:h=!1,immediate:b=!1,virtual:p=null,...v}=e,g=!1,x=null,[E=h?[]:void 0,y]=hn(t,o,r),[T,I]=a.useReducer(go,{dataRef:a.createRef(),comboboxState:d?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),$=a.useRef(!1),P=a.useRef({static:!1,hold:!1}),_=a.useRef(null),q=a.useRef(null),M=a.useRef(null),F=a.useRef(null),R=j(typeof s=="string"?(A,V)=>{let H=s;return(A==null?void 0:A[H])===(V==null?void 0:V[H])}:s??((A,V)=>A===V)),Q=j(A=>T.options.findIndex(V=>R(V.dataRef.current.value,A))),z=a.useCallback(A=>ae(w.mode,{1:()=>E.some(V=>R(V,A)),0:()=>R(E,A)}),[E]),B=j(A=>T.activeOptionIndex===Q(A)),w=a.useMemo(()=>({...T,immediate:g,optionsPropsRef:P,labelRef:_,inputRef:q,buttonRef:M,optionsRef:F,value:E,defaultValue:r,disabled:u,mode:h?1:0,virtual:T.virtual,get activeOptionIndex(){if($.current&&T.activeOptionIndex===null&&T.options.length>0){let A=T.options.findIndex(V=>!V.dataRef.current.disabled);if(A!==-1)return A}return T.activeOptionIndex},calculateIndex:Q,compare:R,isSelected:z,isActive:B,nullable:f,__demoMode:d}),[E,r,u,h,f,d,T,x]);ee(()=>{},[x,void 0]),ee(()=>{T.dataRef.current=w},[w]),Mt([w.buttonRef,w.inputRef,w.optionsRef],()=>N.closeCombobox(),w.comboboxState===0);let G=a.useMemo(()=>{var A,V,H;return{open:w.comboboxState===0,disabled:u,activeIndex:w.activeOptionIndex,activeOption:w.activeOptionIndex===null?null:w.virtual?w.virtual.options[(A=w.activeOptionIndex)!=null?A:0]:(H=(V=w.options[w.activeOptionIndex])==null?void 0:V.dataRef.current.value)!=null?H:null,value:E}},[w,u,E]),W=j(()=>{if(w.activeOptionIndex!==null){if(w.virtual)Ce(w.virtual.options[w.activeOptionIndex]);else{let{dataRef:A}=w.options[w.activeOptionIndex];Ce(A.current.value)}N.goToOption(te.Specific,w.activeOptionIndex)}}),ie=j(()=>{I({type:0}),$.current=!0}),J=j(()=>{I({type:1}),$.current=!1}),ne=j((A,V,H)=>($.current=!1,A===te.Specific?I({type:2,focus:te.Specific,idx:V,trigger:H}):I({type:2,focus:A,trigger:H}))),me=j((A,V)=>(I({type:3,payload:{id:A,dataRef:V}}),()=>{w.isActive(V.current.value)&&($.current=!0),I({type:4,id:A})})),ge=j(A=>(I({type:5,id:A}),()=>I({type:5,id:null}))),Ce=j(A=>ae(w.mode,{0(){return y==null?void 0:y(A)},1(){let V=w.value.slice(),H=V.findIndex(pe=>R(pe,A));return H===-1?V.push(A):V.splice(H,1),y==null?void 0:y(V)}})),be=j(A=>{I({type:6,trigger:A})}),N=a.useMemo(()=>({onChange:Ce,registerOption:me,registerLabel:ge,goToOption:ne,closeCombobox:J,openCombobox:ie,setActivationTrigger:be,selectActiveOption:W}),[]),Z=n===null?{}:{ref:n},re=a.useRef(null),we=je();return a.useEffect(()=>{re.current&&r!==void 0&&we.addEventListener(re.current,"reset",()=>{y==null||y(r)})},[re,y]),a.createElement(zt.Provider,{value:N},a.createElement(Wt.Provider,{value:w},a.createElement(_t,{value:ae(w.comboboxState,{0:ce.Open,1:ce.Closed})},l!=null&&E!=null&&$n({[l]:E}).map(([A,V],H)=>a.createElement(Ze,{features:ze.Hidden,ref:H===0?pe=>{var he;re.current=(he=pe==null?void 0:pe.closest("form"))!=null?he:null}:void 0,...ct({key:A,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:i,disabled:u,name:A,value:V})})),le({ourProps:Z,theirProps:v,slot:G,defaultTag:bo,name:"Combobox"}))))}let wo="input";function yo(e,n){var t,r,o,i,l;let s=ve(),{id:u=`headlessui-combobox-input-${s}`,onChange:d,displayValue:f,type:h="text",...b}=e,p=Le("Combobox.Input"),v=Je("Combobox.Input"),g=ue(p.inputRef,n),x=De(p.inputRef),E=a.useRef(!1),y=je(),T=j(()=>{v.onChange(null),p.optionsRef.current&&(p.optionsRef.current.scrollTop=0),v.goToOption(te.Nothing)}),I=function(){var w;return typeof f=="function"&&p.value!==void 0?(w=f(p.value))!=null?w:"":typeof p.value=="string"?p.value:""}();Ke(([w,G],[W,ie])=>{if(E.current)return;let J=p.inputRef.current;J&&((ie===0&&G===1||w!==W)&&(J.value=w),requestAnimationFrame(()=>{if(E.current||!J||(x==null?void 0:x.activeElement)!==J)return;let{selectionStart:ne,selectionEnd:me}=J;Math.abs((me??0)-(ne??0))===0&&ne===0&&J.setSelectionRange(J.value.length,J.value.length)}))},[I,p.comboboxState,x]),Ke(([w],[G])=>{if(w===0&&G===1){if(E.current)return;let W=p.inputRef.current;if(!W)return;let ie=W.value,{selectionStart:J,selectionEnd:ne,selectionDirection:me}=W;W.value="",W.value=ie,me!==null?W.setSelectionRange(J,ne,me):W.setSelectionRange(J,ne)}},[p.comboboxState]);let $=a.useRef(!1),P=j(()=>{$.current=!0}),_=j(()=>{y.nextFrame(()=>{$.current=!1})}),q=j(w=>{switch(E.current=!0,w.key){case K.Enter:if(E.current=!1,p.comboboxState!==0||$.current)return;if(w.preventDefault(),w.stopPropagation(),p.activeOptionIndex===null){v.closeCombobox();return}v.selectActiveOption(),p.mode===0&&v.closeCombobox();break;case K.ArrowDown:return E.current=!1,w.preventDefault(),w.stopPropagation(),ae(p.comboboxState,{0:()=>v.goToOption(te.Next),1:()=>v.openCombobox()});case K.ArrowUp:return E.current=!1,w.preventDefault(),w.stopPropagation(),ae(p.comboboxState,{0:()=>v.goToOption(te.Previous),1:()=>{v.openCombobox(),y.nextFrame(()=>{p.value||v.goToOption(te.Last)})}});case K.Home:if(w.shiftKey)break;return E.current=!1,w.preventDefault(),w.stopPropagation(),v.goToOption(te.First);case K.PageUp:return E.current=!1,w.preventDefault(),w.stopPropagation(),v.goToOption(te.First);case K.End:if(w.shiftKey)break;return E.current=!1,w.preventDefault(),w.stopPropagation(),v.goToOption(te.Last);case K.PageDown:return E.current=!1,w.preventDefault(),w.stopPropagation(),v.goToOption(te.Last);case K.Escape:return E.current=!1,p.comboboxState!==0?void 0:(w.preventDefault(),p.optionsRef.current&&!p.optionsPropsRef.current.static&&w.stopPropagation(),p.nullable&&p.mode===0&&p.value===null&&T(),v.closeCombobox());case K.Tab:if(E.current=!1,p.comboboxState!==0)return;p.mode===0&&p.activationTrigger!==1&&v.selectActiveOption(),v.closeCombobox();break}}),M=j(w=>{d==null||d(w),p.nullable&&p.mode===0&&w.target.value===""&&T(),v.openCombobox()}),F=j(w=>{var G,W,ie;let J=(G=w.relatedTarget)!=null?G:Te.find(ne=>ne!==w.currentTarget);if(E.current=!1,!((W=p.optionsRef.current)!=null&&W.contains(J))&&!((ie=p.buttonRef.current)!=null&&ie.contains(J))&&p.comboboxState===0)return w.preventDefault(),p.mode===0&&(p.nullable&&p.value===null?T():p.activationTrigger!==1&&v.selectActiveOption()),v.closeCombobox()}),R=j(w=>{var G,W,ie;let J=(G=w.relatedTarget)!=null?G:Te.find(ne=>ne!==w.currentTarget);(W=p.buttonRef.current)!=null&&W.contains(J)||(ie=p.optionsRef.current)!=null&&ie.contains(J)||p.disabled||p.immediate&&p.comboboxState!==0&&(v.openCombobox(),y.nextFrame(()=>{v.setActivationTrigger(1)}))}),Q=$t(()=>{if(p.labelId)return[p.labelId].join(" ")},[p.labelId]),z=a.useMemo(()=>({open:p.comboboxState===0,disabled:p.disabled}),[p]),B={ref:g,id:u,role:"combobox",type:h,"aria-controls":(t=p.optionsRef.current)==null?void 0:t.id,"aria-expanded":p.comboboxState===0,"aria-activedescendant":p.activeOptionIndex===null?void 0:p.virtual?(r=p.options.find(w=>{var G;return!((G=p.virtual)!=null&&G.disabled(w.dataRef.current.value))&&p.compare(w.dataRef.current.value,p.virtual.options[p.activeOptionIndex])}))==null?void 0:r.id:(o=p.options[p.activeOptionIndex])==null?void 0:o.id,"aria-labelledby":Q,"aria-autocomplete":"list",defaultValue:(l=(i=e.defaultValue)!=null?i:p.defaultValue!==void 0?f==null?void 0:f(p.defaultValue):null)!=null?l:p.defaultValue,disabled:p.disabled,onCompositionStart:P,onCompositionEnd:_,onKeyDown:q,onChange:M,onFocus:R,onBlur:F};return le({ourProps:B,theirProps:b,slot:z,defaultTag:wo,name:"Combobox.Input"})}let Eo="button";function So(e,n){var t;let r=Le("Combobox.Button"),o=Je("Combobox.Button"),i=ue(r.buttonRef,n),l=ve(),{id:s=`headlessui-combobox-button-${l}`,...u}=e,d=je(),f=j(g=>{switch(g.key){case K.ArrowDown:return g.preventDefault(),g.stopPropagation(),r.comboboxState===1&&o.openCombobox(),d.nextFrame(()=>{var x;return(x=r.inputRef.current)==null?void 0:x.focus({preventScroll:!0})});case K.ArrowUp:return g.preventDefault(),g.stopPropagation(),r.comboboxState===1&&(o.openCombobox(),d.nextFrame(()=>{r.value||o.goToOption(te.Last)})),d.nextFrame(()=>{var x;return(x=r.inputRef.current)==null?void 0:x.focus({preventScroll:!0})});case K.Escape:return r.comboboxState!==0?void 0:(g.preventDefault(),r.optionsRef.current&&!r.optionsPropsRef.current.static&&g.stopPropagation(),o.closeCombobox(),d.nextFrame(()=>{var x;return(x=r.inputRef.current)==null?void 0:x.focus({preventScroll:!0})}));default:return}}),h=j(g=>{if(dt(g.currentTarget))return g.preventDefault();r.comboboxState===0?o.closeCombobox():(g.preventDefault(),o.openCombobox()),d.nextFrame(()=>{var x;return(x=r.inputRef.current)==null?void 0:x.focus({preventScroll:!0})})}),b=$t(()=>{if(r.labelId)return[r.labelId,s].join(" ")},[r.labelId,s]),p=a.useMemo(()=>({open:r.comboboxState===0,disabled:r.disabled,value:r.value}),[r]),v={ref:i,id:s,type:At(e,r.buttonRef),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(t=r.optionsRef.current)==null?void 0:t.id,"aria-expanded":r.comboboxState===0,"aria-labelledby":b,disabled:r.disabled,onClick:h,onKeyDown:f};return le({ourProps:v,theirProps:u,slot:p,defaultTag:Eo,name:"Combobox.Button"})}let Co="label";function To(e,n){let t=ve(),{id:r=`headlessui-combobox-label-${t}`,...o}=e,i=Le("Combobox.Label"),l=Je("Combobox.Label"),s=ue(i.labelRef,n);ee(()=>l.registerLabel(r),[r]);let u=j(()=>{var f;return(f=i.inputRef.current)==null?void 0:f.focus({preventScroll:!0})}),d=a.useMemo(()=>({open:i.comboboxState===0,disabled:i.disabled}),[i]);return le({ourProps:{ref:s,id:r,onClick:u},theirProps:o,slot:d,defaultTag:Co,name:"Combobox.Label"})}let Oo="ul",jo=Ne.RenderStrategy|Ne.Static;function Io(e,n){let t=ve(),{id:r=`headlessui-combobox-options-${t}`,hold:o=!1,...i}=e,l=Le("Combobox.Options"),s=ue(l.optionsRef,n),u=Qe(),d=u!==null?(u&ce.Open)===ce.Open:l.comboboxState===0;ee(()=>{var p;l.optionsPropsRef.current.static=(p=e.static)!=null?p:!1},[l.optionsPropsRef,e.static]),ee(()=>{l.optionsPropsRef.current.hold=o},[l.optionsPropsRef,o]),jn({container:l.optionsRef.current,enabled:l.comboboxState===0,accept(p){return p.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:p.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(p){p.setAttribute("role","none")}});let f=$t(()=>{var p,v;return(v=l.labelId)!=null?v:(p=l.buttonRef.current)==null?void 0:p.id},[l.labelId,l.buttonRef.current]),h=a.useMemo(()=>({open:l.comboboxState===0,option:void 0}),[l]),b={"aria-labelledby":f,role:"listbox","aria-multiselectable":l.mode===1?!0:void 0,id:r,ref:s};return l.virtual&&l.comboboxState===0&&Object.assign(i,{children:a.createElement(vo,null,i.children)}),le({ourProps:b,theirProps:i,slot:h,defaultTag:Oo,features:jo,visible:d,name:"Combobox.Options"})}let $o="li";function ko(e,n){var t;let r=ve(),{id:o=`headlessui-combobox-option-${r}`,disabled:i=!1,value:l,order:s=null,...u}=e,d=Le("Combobox.Option"),f=Je("Combobox.Option"),h=d.virtual?d.activeOptionIndex===d.calculateIndex(l):d.activeOptionIndex===null?!1:((t=d.options[d.activeOptionIndex])==null?void 0:t.id)===o,b=d.isSelected(l),p=a.useRef(null),v=Se({disabled:i,value:l,domRef:p,order:s}),g=a.useContext(Nn),x=ue(n,p,g?g.measureElement:null),E=j(()=>f.onChange(l));ee(()=>f.registerOption(o,v),[v,o]);let y=a.useRef(!(d.virtual||d.__demoMode));ee(()=>{if(!d.virtual||!d.__demoMode)return;let F=ye();return F.requestAnimationFrame(()=>{y.current=!0}),F.dispose},[d.virtual,d.__demoMode]),ee(()=>{if(!y.current||d.comboboxState!==0||!h||d.activationTrigger===0)return;let F=ye();return F.requestAnimationFrame(()=>{var R,Q;(Q=(R=p.current)==null?void 0:R.scrollIntoView)==null||Q.call(R,{block:"nearest"})}),F.dispose},[p,h,d.comboboxState,d.activationTrigger,d.activeOptionIndex]);let T=j(F=>{var R;if(i||(R=d.virtual)!=null&&R.disabled(l))return F.preventDefault();E(),yn()||requestAnimationFrame(()=>{var Q;return(Q=d.inputRef.current)==null?void 0:Q.focus({preventScroll:!0})}),d.mode===0&&requestAnimationFrame(()=>f.closeCombobox())}),I=j(()=>{var F;if(i||(F=d.virtual)!=null&&F.disabled(l))return f.goToOption(te.Nothing);let R=d.calculateIndex(l);f.goToOption(te.Specific,R)}),$=On(),P=j(F=>$.update(F)),_=j(F=>{var R;if(!$.wasMoved(F)||i||(R=d.virtual)!=null&&R.disabled(l)||h)return;let Q=d.calculateIndex(l);f.goToOption(te.Specific,Q,0)}),q=j(F=>{var R;$.wasMoved(F)&&(i||(R=d.virtual)!=null&&R.disabled(l)||h&&(d.optionsPropsRef.current.hold||f.goToOption(te.Nothing)))}),M=a.useMemo(()=>({active:h,selected:b,disabled:i}),[h,b,i]);return le({ourProps:{id:o,ref:x,role:"option",tabIndex:i===!0?void 0:-1,"aria-disabled":i===!0?!0:void 0,"aria-selected":b,disabled:void 0,onClick:T,onFocus:I,onPointerEnter:P,onMouseEnter:P,onPointerMove:_,onMouseMove:_,onPointerLeave:q,onMouseLeave:q},theirProps:u,slot:M,defaultTag:$o,name:"Combobox.Option"})}let Fo=se(xo),No=se(So),Po=se(yo),Mo=se(To),Ao=se(Io),Do=se(ko),$e=Object.assign(Fo,{Input:Po,Button:No,Label:Mo,Options:Ao,Option:Do});function Pn(e,n,t,r){let o=Se(t);a.useEffect(()=>{e=e??window;function i(l){o.current(l)}return e.addEventListener(n,i,r),()=>e.removeEventListener(n,i,r)},[e,n,r])}function Xe(){let e=a.useRef(!1);return ee(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Mn(e){let n=j(e),t=a.useRef(!1);a.useEffect(()=>(t.current=!1,()=>{t.current=!0,it(()=>{t.current&&n()})}),[n])}var et=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(et||{});function Lo(){let e=a.useRef(0);return En("keydown",n=>{n.key==="Tab"&&(e.current=n.shiftKey?1:0)},!0),e}function An(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let n=new Set;for(let t of e.current)t.current instanceof HTMLElement&&n.add(t.current);return n}let _o="div";var Dn=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(Dn||{});function Ro(e,n){let t=a.useRef(null),r=ue(t,n),{initialFocus:o,containers:i,features:l=30,...s}=e;Be()||(l=1);let u=De(t);Wo({ownerDocument:u},!!(l&16));let d=Ho({ownerDocument:u,container:t,initialFocus:o},!!(l&2));Uo({ownerDocument:u,container:t,containers:i,previousActiveElement:d},!!(l&8));let f=Lo(),h=j(g=>{let x=t.current;x&&(E=>E())(()=>{ae(f.current,{[et.Forwards]:()=>{Ge(x,Ie.First,{skipElements:[g.relatedTarget]})},[et.Backwards]:()=>{Ge(x,Ie.Last,{skipElements:[g.relatedTarget]})}})})}),b=je(),p=a.useRef(!1),v={ref:r,onKeyDown(g){g.key=="Tab"&&(p.current=!0,b.requestAnimationFrame(()=>{p.current=!1}))},onBlur(g){let x=An(i);t.current instanceof HTMLElement&&x.add(t.current);let E=g.relatedTarget;E instanceof HTMLElement&&E.dataset.headlessuiFocusGuard!=="true"&&(Ln(x,E)||(p.current?Ge(t.current,ae(f.current,{[et.Forwards]:()=>Ie.Next,[et.Backwards]:()=>Ie.Previous})|Ie.WrapAround,{relativeTo:g.target}):g.target instanceof HTMLElement&&Fe(g.target)))}};return a.createElement(a.Fragment,null,!!(l&4)&&a.createElement(Ze,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:ze.Focusable}),le({ourProps:v,theirProps:s,defaultTag:_o,name:"FocusTrap"}),!!(l&4)&&a.createElement(Ze,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:ze.Focusable}))}let Bo=se(Ro),tt=Object.assign(Bo,{features:Dn});function zo(e=!0){let n=a.useRef(Te.slice());return Ke(([t],[r])=>{r===!0&&t===!1&&it(()=>{n.current.splice(0)}),r===!1&&t===!0&&(n.current=Te.slice())},[e,Te,n]),j(()=>{var t;return(t=n.current.find(r=>r!=null&&r.isConnected))!=null?t:null})}function Wo({ownerDocument:e},n){let t=zo(n);Ke(()=>{n||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&Fe(t())},[n]),Mn(()=>{n&&Fe(t())})}function Ho({ownerDocument:e,container:n,initialFocus:t},r){let o=a.useRef(null),i=Xe();return Ke(()=>{if(!r)return;let l=n.current;l&&it(()=>{if(!i.current)return;let s=e==null?void 0:e.activeElement;if(t!=null&&t.current){if((t==null?void 0:t.current)===s){o.current=s;return}}else if(l.contains(s)){o.current=s;return}t!=null&&t.current?Fe(t.current):Ge(l,Ie.First)===gn.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),o.current=e==null?void 0:e.activeElement})},[r]),o}function Uo({ownerDocument:e,container:n,containers:t,previousActiveElement:r},o){let i=Xe();Pn(e==null?void 0:e.defaultView,"focus",l=>{if(!o||!i.current)return;let s=An(t);n.current instanceof HTMLElement&&s.add(n.current);let u=r.current;if(!u)return;let d=l.target;d&&d instanceof HTMLElement?Ln(s,d)?(r.current=d,Fe(d)):(l.preventDefault(),l.stopPropagation(),Fe(u)):Fe(r.current)},!0)}function Ln(e,n){for(let t of e)if(t.contains(n))return!0;return!1}let _n=a.createContext(!1);function Vo(){return a.useContext(_n)}function Ht(e){return a.createElement(_n.Provider,{value:e.force},e.children)}function Yo(e){let n=Vo(),t=a.useContext(Rn),r=De(e),[o,i]=a.useState(()=>{if(!n&&t!==null||Oe.isServer)return null;let l=r==null?void 0:r.getElementById("headlessui-portal-root");if(l)return l;if(r===null)return null;let s=r.createElement("div");return s.setAttribute("id","headlessui-portal-root"),r.body.appendChild(s)});return a.useEffect(()=>{o!==null&&(r!=null&&r.body.contains(o)||r==null||r.body.appendChild(o))},[o,r]),a.useEffect(()=>{n||t!==null&&i(t.current)},[t,i,n]),o}let qo=a.Fragment;function Go(e,n){let t=e,r=a.useRef(null),o=ue(no(f=>{r.current=f}),n),i=De(r),l=Yo(r),[s]=a.useState(()=>{var f;return Oe.isServer?null:(f=i==null?void 0:i.createElement("div"))!=null?f:null}),u=a.useContext(Ut),d=Be();return ee(()=>{!l||!s||l.contains(s)||(s.setAttribute("data-headlessui-portal",""),l.appendChild(s))},[l,s]),ee(()=>{if(s&&u)return u.register(s)},[u,s]),Mn(()=>{var f;!l||!s||(s instanceof Node&&l.contains(s)&&l.removeChild(s),l.childNodes.length<=0&&((f=l.parentElement)==null||f.removeChild(l)))}),d?!l||!s?null:un.createPortal(le({ourProps:{ref:o},theirProps:t,defaultTag:qo,name:"Portal"}),s):null}let Ko=a.Fragment,Rn=a.createContext(null);function Zo(e,n){let{target:t,...r}=e,o={ref:ue(n)};return a.createElement(Rn.Provider,{value:t},le({ourProps:o,theirProps:r,defaultTag:Ko,name:"Popover.Group"}))}let Ut=a.createContext(null);function Qo(){let e=a.useContext(Ut),n=a.useRef([]),t=j(i=>(n.current.push(i),e&&e.register(i),()=>r(i))),r=j(i=>{let l=n.current.indexOf(i);l!==-1&&n.current.splice(l,1),e&&e.unregister(i)}),o=a.useMemo(()=>({register:t,unregister:r,portals:n}),[t,r,n]);return[n,a.useMemo(()=>function({children:i}){return a.createElement(Ut.Provider,{value:o},i)},[o])]}let Jo=se(Go),Xo=se(Zo),Vt=Object.assign(Jo,{Group:Xo});function ei(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}const ti=typeof Object.is=="function"?Object.is:ei,{useState:ni,useEffect:ri,useLayoutEffect:oi,useDebugValue:ii}=C;function li(e,n,t){const r=n(),[{inst:o},i]=ni({inst:{value:r,getSnapshot:n}});return oi(()=>{o.value=r,o.getSnapshot=n,Yt(o)&&i({inst:o})},[e,r,n]),ri(()=>(Yt(o)&&i({inst:o}),e(()=>{Yt(o)&&i({inst:o})})),[e]),ii(r),r}function Yt(e){const n=e.getSnapshot,t=e.value;try{const r=n();return!ti(t,r)}catch{return!0}}function si(e,n,t){return n()}const ai=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ui=!ai,ci=ui?si:li,di="useSyncExternalStore"in C?(e=>e.useSyncExternalStore)(C):ci;function fi(e){return di(e.subscribe,e.getSnapshot,e.getSnapshot)}function mi(e,n){let t=e(),r=new Set;return{getSnapshot(){return t},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...i){let l=n[o].call(t,...i);l&&(t=l,r.forEach(s=>s()))}}}function pi(){let e;return{before({doc:n}){var t;let r=n.documentElement;e=((t=n.defaultView)!=null?t:window).innerWidth-r.clientWidth},after({doc:n,d:t}){let r=n.documentElement,o=r.clientWidth-r.offsetWidth,i=e-o;t.style(r,"paddingRight",`${i}px`)}}}function hi(){return wn()?{before({doc:e,d:n,meta:t}){function r(o){return t.containers.flatMap(i=>i()).some(i=>i.contains(o))}n.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let s=ye();s.style(e.documentElement,"scrollBehavior","auto"),n.add(()=>n.microTask(()=>s.dispose()))}let i=(o=window.scrollY)!=null?o:window.pageYOffset,l=null;n.addEventListener(e,"click",s=>{if(s.target instanceof HTMLElement)try{let u=s.target.closest("a");if(!u)return;let{hash:d}=new URL(u.href),f=e.querySelector(d);f&&!r(f)&&(l=f)}catch{}},!0),n.addEventListener(e,"touchstart",s=>{if(s.target instanceof HTMLElement)if(r(s.target)){let u=s.target;for(;u.parentElement&&r(u.parentElement);)u=u.parentElement;n.style(u,"overscrollBehavior","contain")}else n.style(s.target,"touchAction","none")}),n.addEventListener(e,"touchmove",s=>{if(s.target instanceof HTMLElement)if(r(s.target)){let u=s.target;for(;u.parentElement&&u.dataset.headlessuiPortal!==""&&!(u.scrollHeight>u.clientHeight||u.scrollWidth>u.clientWidth);)u=u.parentElement;u.dataset.headlessuiPortal===""&&s.preventDefault()}else s.preventDefault()},{passive:!1}),n.add(()=>{var s;let u=(s=window.scrollY)!=null?s:window.pageYOffset;i!==u&&window.scrollTo(0,i),l&&l.isConnected&&(l.scrollIntoView({block:"nearest"}),l=null)})})}}:{}}function vi(){return{before({doc:e,d:n}){n.style(e.documentElement,"overflow","hidden")}}}function gi(e){let n={};for(let t of e)Object.assign(n,t(n));return n}let _e=mi(()=>new Map,{PUSH(e,n){var t;let r=(t=this.get(e))!=null?t:{doc:e,count:0,d:ye(),meta:new Set};return r.count++,r.meta.add(n),this.set(e,r),this},POP(e,n){let t=this.get(e);return t&&(t.count--,t.meta.delete(n)),this},SCROLL_PREVENT({doc:e,d:n,meta:t}){let r={doc:e,d:n,meta:gi(t)},o=[hi(),pi(),vi()];o.forEach(({before:i})=>i==null?void 0:i(r)),o.forEach(({after:i})=>i==null?void 0:i(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});_e.subscribe(()=>{let e=_e.getSnapshot(),n=new Map;for(let[t]of e)n.set(t,t.documentElement.style.overflow);for(let t of e.values()){let r=n.get(t.doc)==="hidden",o=t.count!==0;(o&&!r||!o&&r)&&_e.dispatch(t.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",t),t.count===0&&_e.dispatch("TEARDOWN",t)}});function bi(e,n,t){let r=fi(_e),o=e?r.get(e):void 0,i=o?o.count>0:!1;return ee(()=>{if(!(!e||!n))return _e.dispatch("PUSH",e,t),()=>_e.dispatch("POP",e,t)},[n,e]),i}let qt=new Map,nt=new Map;function Bn(e,n=!0){ee(()=>{var t;if(!n)return;let r=typeof e=="function"?e():e.current;if(!r)return;function o(){var l;if(!r)return;let s=(l=nt.get(r))!=null?l:1;if(s===1?nt.delete(r):nt.set(r,s-1),s!==1)return;let u=qt.get(r);u&&(u["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",u["aria-hidden"]),r.inert=u.inert,qt.delete(r))}let i=(t=nt.get(r))!=null?t:0;return nt.set(r,i+1),i!==0||(qt.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0),o},[e,n])}function xi({defaultContainers:e=[],portals:n,mainTreeNodeRef:t}={}){var r;let o=a.useRef((r=t==null?void 0:t.current)!=null?r:null),i=De(o),l=j(()=>{var s,u,d;let f=[];for(let h of e)h!==null&&(h instanceof HTMLElement?f.push(h):"current"in h&&h.current instanceof HTMLElement&&f.push(h.current));if(n!=null&&n.current)for(let h of n.current)f.push(h);for(let h of(s=i==null?void 0:i.querySelectorAll("html > *, body > *"))!=null?s:[])h!==document.body&&h!==document.head&&h instanceof HTMLElement&&h.id!=="headlessui-portal-root"&&(h.contains(o.current)||h.contains((d=(u=o.current)==null?void 0:u.getRootNode())==null?void 0:d.host)||f.some(b=>h.contains(b))||f.push(h));return f});return{resolveContainers:l,contains:j(s=>l().some(u=>u.contains(s))),mainTreeNodeRef:o,MainTreeNode:a.useMemo(()=>function(){return t!=null?null:a.createElement(Ze,{features:ze.Hidden,ref:o})},[o,t])}}let Gt=a.createContext(()=>{});Gt.displayName="StackContext";var Kt=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Kt||{});function wi(){return a.useContext(Gt)}function yi({children:e,onUpdate:n,type:t,element:r,enabled:o}){let i=wi(),l=j((...s)=>{n==null||n(...s),i(...s)});return ee(()=>{let s=o===void 0||o===!0;return s&&l(0,t,r),()=>{s&&l(1,t,r)}},[l,t,r,o]),a.createElement(Gt.Provider,{value:l},e)}let zn=a.createContext(null);function Wn(){let e=a.useContext(zn);if(e===null){let n=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(n,Wn),n}return e}function Hn(){let[e,n]=a.useState([]);return[e.length>0?e.join(" "):void 0,a.useMemo(()=>function(t){let r=j(i=>(n(l=>[...l,i]),()=>n(l=>{let s=l.slice(),u=s.indexOf(i);return u!==-1&&s.splice(u,1),s}))),o=a.useMemo(()=>({register:r,slot:t.slot,name:t.name,props:t.props}),[r,t.slot,t.name,t.props]);return a.createElement(zn.Provider,{value:o},t.children)},[n])]}let Ei="p";function Si(e,n){let t=ve(),{id:r=`headlessui-description-${t}`,...o}=e,i=Wn(),l=ue(n);ee(()=>i.register(r),[r,i.register]);let s={ref:l,...i.props,id:r};return le({ourProps:s,theirProps:o,slot:i.slot||{},defaultTag:Ei,name:i.name||"Description"})}let Ci=se(Si),Un=Object.assign(Ci,{});var Ti=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Ti||{}),Oi=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(Oi||{});let ji={0(e,n){return e.titleId===n.id?e:{...e,titleId:n.id}}},ft=a.createContext(null);ft.displayName="DialogContext";function rt(e){let n=a.useContext(ft);if(n===null){let t=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,rt),t}return n}function Ii(e,n,t=()=>[document.body]){bi(e,n,r=>{var o;return{containers:[...(o=r.containers)!=null?o:[],t]}})}function $i(e,n){return ae(n.type,ji,e,n)}let ki="div",Fi=Ne.RenderStrategy|Ne.Static;function Ni(e,n){let t=ve(),{id:r=`headlessui-dialog-${t}`,open:o,onClose:i,initialFocus:l,role:s="dialog",__demoMode:u=!1,...d}=e,[f,h]=a.useState(0),b=a.useRef(!1);s=function(){return s==="dialog"||s==="alertdialog"?s:(b.current||(b.current=!0,console.warn(`Invalid role [${s}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let p=Qe();o===void 0&&p!==null&&(o=(p&ce.Open)===ce.Open);let v=a.useRef(null),g=ue(v,n),x=De(v),E=e.hasOwnProperty("open")||p!==null,y=e.hasOwnProperty("onClose");if(!E&&!y)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!E)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!y)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof o!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${o}`);if(typeof i!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${i}`);let T=o?0:1,[I,$]=a.useReducer($i,{titleId:null,descriptionId:null,panelRef:a.createRef()}),P=j(()=>i(!1)),_=j(H=>$({type:0,id:H})),q=Be()?u?!1:T===0:!1,M=f>1,F=a.useContext(ft)!==null,[R,Q]=Qo(),z={get current(){var H;return(H=I.panelRef.current)!=null?H:v.current}},{resolveContainers:B,mainTreeNodeRef:w,MainTreeNode:G}=xi({portals:R,defaultContainers:[z]}),W=M?"parent":"leaf",ie=p!==null?(p&ce.Closing)===ce.Closing:!1,J=F||ie?!1:q,ne=a.useCallback(()=>{var H,pe;return(pe=Array.from((H=x==null?void 0:x.querySelectorAll("body > *"))!=null?H:[]).find(he=>he.id==="headlessui-portal-root"?!1:he.contains(w.current)&&he instanceof HTMLElement))!=null?pe:null},[w]);Bn(ne,J);let me=M?!0:q,ge=a.useCallback(()=>{var H,pe;return(pe=Array.from((H=x==null?void 0:x.querySelectorAll("[data-headlessui-portal]"))!=null?H:[]).find(he=>he.contains(w.current)&&he instanceof HTMLElement))!=null?pe:null},[w]);Bn(ge,me),Mt(B,H=>{H.preventDefault(),P()},!(!q||M));let be=!(M||T!==0);Pn(x==null?void 0:x.defaultView,"keydown",H=>{be&&(H.defaultPrevented||H.key===K.Escape&&(H.preventDefault(),H.stopPropagation(),P()))}),Ii(x,!(ie||T!==0||F),B),a.useEffect(()=>{if(T!==0||!v.current)return;let H=new ResizeObserver(pe=>{for(let he of pe){let We=he.target.getBoundingClientRect();We.x===0&&We.y===0&&We.width===0&&We.height===0&&P()}});return H.observe(v.current),()=>H.disconnect()},[T,v,P]);let[Z,re]=Hn(),we=a.useMemo(()=>[{dialogState:T,close:P,setTitleId:_},I],[T,I,P,_]),A=a.useMemo(()=>({open:T===0}),[T]),V={ref:g,id:r,role:s,"aria-modal":T===0?!0:void 0,"aria-labelledby":I.titleId,"aria-describedby":Z};return a.createElement(yi,{type:"Dialog",enabled:T===0,element:v,onUpdate:j((H,pe)=>{pe==="Dialog"&&ae(H,{[Kt.Add]:()=>h(he=>he+1),[Kt.Remove]:()=>h(he=>he-1)})})},a.createElement(Ht,{force:!0},a.createElement(Vt,null,a.createElement(ft.Provider,{value:we},a.createElement(Vt.Group,{target:v},a.createElement(Ht,{force:!1},a.createElement(re,{slot:A,name:"Dialog.Description"},a.createElement(tt,{initialFocus:l,containers:B,features:q?ae(W,{parent:tt.features.RestoreFocus,leaf:tt.features.All&~tt.features.FocusLock}):tt.features.None},a.createElement(Q,null,le({ourProps:V,theirProps:d,slot:A,defaultTag:ki,features:Fi,visible:T===0,name:"Dialog"}))))))))),a.createElement(G,null))}let Pi="div";function Mi(e,n){let t=ve(),{id:r=`headlessui-dialog-overlay-${t}`,...o}=e,[{dialogState:i,close:l}]=rt("Dialog.Overlay"),s=ue(n),u=j(f=>{if(f.target===f.currentTarget){if(dt(f.currentTarget))return f.preventDefault();f.preventDefault(),f.stopPropagation(),l()}}),d=a.useMemo(()=>({open:i===0}),[i]);return le({ourProps:{ref:s,id:r,"aria-hidden":!0,onClick:u},theirProps:o,slot:d,defaultTag:Pi,name:"Dialog.Overlay"})}let Ai="div";function Di(e,n){let t=ve(),{id:r=`headlessui-dialog-backdrop-${t}`,...o}=e,[{dialogState:i},l]=rt("Dialog.Backdrop"),s=ue(n);a.useEffect(()=>{if(l.panelRef.current===null)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")},[l.panelRef]);let u=a.useMemo(()=>({open:i===0}),[i]);return a.createElement(Ht,{force:!0},a.createElement(Vt,null,le({ourProps:{ref:s,id:r,"aria-hidden":!0},theirProps:o,slot:u,defaultTag:Ai,name:"Dialog.Backdrop"})))}let Li="div";function _i(e,n){let t=ve(),{id:r=`headlessui-dialog-panel-${t}`,...o}=e,[{dialogState:i},l]=rt("Dialog.Panel"),s=ue(n,l.panelRef),u=a.useMemo(()=>({open:i===0}),[i]),d=j(f=>{f.stopPropagation()});return le({ourProps:{ref:s,id:r,onClick:d},theirProps:o,slot:u,defaultTag:Li,name:"Dialog.Panel"})}let Ri="h2";function Bi(e,n){let t=ve(),{id:r=`headlessui-dialog-title-${t}`,...o}=e,[{dialogState:i,setTitleId:l}]=rt("Dialog.Title"),s=ue(n);a.useEffect(()=>(l(r),()=>l(null)),[r,l]);let u=a.useMemo(()=>({open:i===0}),[i]);return le({ourProps:{ref:s,id:r},theirProps:o,slot:u,defaultTag:Ri,name:"Dialog.Title"})}let zi=se(Ni),Wi=se(Di),Hi=se(_i),Ui=se(Mi),Vi=se(Bi),Vn=Object.assign(zi,{Backdrop:Wi,Panel:Hi,Overlay:Ui,Title:Vi,Description:Un}),Yn=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function qn(e){var n,t;let r=(n=e.innerText)!=null?n:"",o=e.cloneNode(!0);if(!(o instanceof HTMLElement))return r;let i=!1;for(let s of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))s.remove(),i=!0;let l=i?(t=o.innerText)!=null?t:"":r;return Yn.test(l)&&(l=l.replace(Yn,"")),l}function Yi(e){let n=e.getAttribute("aria-label");if(typeof n=="string")return n.trim();let t=e.getAttribute("aria-labelledby");if(t){let r=t.split(" ").map(o=>{let i=document.getElementById(o);if(i){let l=i.getAttribute("aria-label");return typeof l=="string"?l.trim():qn(i).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return qn(e).trim()}function qi(e){let n=a.useRef(""),t=a.useRef("");return j(()=>{let r=e.current;if(!r)return"";let o=r.innerText;if(n.current===o)return t.current;let i=Yi(r).trim().toLowerCase();return n.current=o,t.current=i,i})}var Gi=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Gi||{}),Ki=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Ki||{}),Zi=(e=>(e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItem=5]="RegisterItem",e[e.UnregisterItem=6]="UnregisterItem",e))(Zi||{});function Zt(e,n=t=>t){let t=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,r=Pt(n(e.items.slice()),i=>i.dataRef.current.domRef.current),o=t?r.indexOf(t):null;return o===-1&&(o=null),{items:r,activeItemIndex:o}}let Qi={1(e){return e.menuState===1?e:{...e,activeItemIndex:null,menuState:1}},0(e){return e.menuState===0?e:{...e,__demoMode:!1,menuState:0}},2:(e,n)=>{var t;let r=Zt(e),o=Rt(n,{resolveItems:()=>r.items,resolveActiveIndex:()=>r.activeItemIndex,resolveId:i=>i.id,resolveDisabled:i=>i.dataRef.current.disabled});return{...e,...r,searchQuery:"",activeItemIndex:o,activationTrigger:(t=n.trigger)!=null?t:1}},3:(e,n)=>{let t=e.searchQuery!==""?0:1,r=e.searchQuery+n.value.toLowerCase(),o=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+t).concat(e.items.slice(0,e.activeItemIndex+t)):e.items).find(l=>{var s;return((s=l.dataRef.current.textValue)==null?void 0:s.startsWith(r))&&!l.dataRef.current.disabled}),i=o?e.items.indexOf(o):-1;return i===-1||i===e.activeItemIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeItemIndex:i,activationTrigger:1}},4(e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},5:(e,n)=>{let t=Zt(e,r=>[...r,{id:n.id,dataRef:n.dataRef}]);return{...e,...t}},6:(e,n)=>{let t=Zt(e,r=>{let o=r.findIndex(i=>i.id===n.id);return o!==-1&&r.splice(o,1),r});return{...e,...t,activationTrigger:1}}},Qt=a.createContext(null);Qt.displayName="MenuContext";function mt(e){let n=a.useContext(Qt);if(n===null){let t=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,mt),t}return n}function Ji(e,n){return ae(n.type,Qi,e,n)}let Xi=a.Fragment;function el(e,n){let{__demoMode:t=!1,...r}=e,o=a.useReducer(Ji,{__demoMode:t,menuState:t?0:1,buttonRef:a.createRef(),itemsRef:a.createRef(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:i,itemsRef:l,buttonRef:s},u]=o,d=ue(n);Mt([s,l],(p,v)=>{var g;u({type:1}),Nt(v,Ft.Loose)||(p.preventDefault(),(g=s.current)==null||g.focus())},i===0);let f=j(()=>{u({type:1})}),h=a.useMemo(()=>({open:i===0,close:f}),[i,f]),b={ref:d};return a.createElement(Qt.Provider,{value:o},a.createElement(_t,{value:ae(i,{0:ce.Open,1:ce.Closed})},le({ourProps:b,theirProps:r,slot:h,defaultTag:Xi,name:"Menu"})))}let tl="button";function nl(e,n){var t;let r=ve(),{id:o=`headlessui-menu-button-${r}`,...i}=e,[l,s]=mt("Menu.Button"),u=ue(l.buttonRef,n),d=je(),f=j(g=>{switch(g.key){case K.Space:case K.Enter:case K.ArrowDown:g.preventDefault(),g.stopPropagation(),s({type:0}),d.nextFrame(()=>s({type:2,focus:te.First}));break;case K.ArrowUp:g.preventDefault(),g.stopPropagation(),s({type:0}),d.nextFrame(()=>s({type:2,focus:te.Last}));break}}),h=j(g=>{switch(g.key){case K.Space:g.preventDefault();break}}),b=j(g=>{if(dt(g.currentTarget))return g.preventDefault();e.disabled||(l.menuState===0?(s({type:1}),d.nextFrame(()=>{var x;return(x=l.buttonRef.current)==null?void 0:x.focus({preventScroll:!0})})):(g.preventDefault(),s({type:0})))}),p=a.useMemo(()=>({open:l.menuState===0}),[l]),v={ref:u,id:o,type:At(e,l.buttonRef),"aria-haspopup":"menu","aria-controls":(t=l.itemsRef.current)==null?void 0:t.id,"aria-expanded":l.menuState===0,onKeyDown:f,onKeyUp:h,onClick:b};return le({ourProps:v,theirProps:i,slot:p,defaultTag:tl,name:"Menu.Button"})}let rl="div",ol=Ne.RenderStrategy|Ne.Static;function il(e,n){var t,r;let o=ve(),{id:i=`headlessui-menu-items-${o}`,...l}=e,[s,u]=mt("Menu.Items"),d=ue(s.itemsRef,n),f=De(s.itemsRef),h=je(),b=Qe(),p=b!==null?(b&ce.Open)===ce.Open:s.menuState===0;a.useEffect(()=>{let y=s.itemsRef.current;y&&s.menuState===0&&y!==(f==null?void 0:f.activeElement)&&y.focus({preventScroll:!0})},[s.menuState,s.itemsRef,f]),jn({container:s.itemsRef.current,enabled:s.menuState===0,accept(y){return y.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:y.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(y){y.setAttribute("role","none")}});let v=j(y=>{var T,I;switch(h.dispose(),y.key){case K.Space:if(s.searchQuery!=="")return y.preventDefault(),y.stopPropagation(),u({type:3,value:y.key});case K.Enter:if(y.preventDefault(),y.stopPropagation(),u({type:1}),s.activeItemIndex!==null){let{dataRef:$}=s.items[s.activeItemIndex];(I=(T=$.current)==null?void 0:T.domRef.current)==null||I.click()}xn(s.buttonRef.current);break;case K.ArrowDown:return y.preventDefault(),y.stopPropagation(),u({type:2,focus:te.Next});case K.ArrowUp:return y.preventDefault(),y.stopPropagation(),u({type:2,focus:te.Previous});case K.Home:case K.PageUp:return y.preventDefault(),y.stopPropagation(),u({type:2,focus:te.First});case K.End:case K.PageDown:return y.preventDefault(),y.stopPropagation(),u({type:2,focus:te.Last});case K.Escape:y.preventDefault(),y.stopPropagation(),u({type:1}),ye().nextFrame(()=>{var $;return($=s.buttonRef.current)==null?void 0:$.focus({preventScroll:!0})});break;case K.Tab:y.preventDefault(),y.stopPropagation(),u({type:1}),ye().nextFrame(()=>{eo(s.buttonRef.current,y.shiftKey?Ie.Previous:Ie.Next)});break;default:y.key.length===1&&(u({type:3,value:y.key}),h.setTimeout(()=>u({type:4}),350));break}}),g=j(y=>{switch(y.key){case K.Space:y.preventDefault();break}}),x=a.useMemo(()=>({open:s.menuState===0}),[s]),E={"aria-activedescendant":s.activeItemIndex===null||(t=s.items[s.activeItemIndex])==null?void 0:t.id,"aria-labelledby":(r=s.buttonRef.current)==null?void 0:r.id,id:i,onKeyDown:v,onKeyUp:g,role:"menu",tabIndex:0,ref:d};return le({ourProps:E,theirProps:l,slot:x,defaultTag:rl,features:ol,visible:p,name:"Menu.Items"})}let ll=a.Fragment;function sl(e,n){let t=ve(),{id:r=`headlessui-menu-item-${t}`,disabled:o=!1,...i}=e,[l,s]=mt("Menu.Item"),u=l.activeItemIndex!==null?l.items[l.activeItemIndex].id===r:!1,d=a.useRef(null),f=ue(n,d);ee(()=>{if(l.__demoMode||l.menuState!==0||!u||l.activationTrigger===0)return;let $=ye();return $.requestAnimationFrame(()=>{var P,_;(_=(P=d.current)==null?void 0:P.scrollIntoView)==null||_.call(P,{block:"nearest"})}),$.dispose},[l.__demoMode,d,u,l.menuState,l.activationTrigger,l.activeItemIndex]);let h=qi(d),b=a.useRef({disabled:o,domRef:d,get textValue(){return h()}});ee(()=>{b.current.disabled=o},[b,o]),ee(()=>(s({type:5,id:r,dataRef:b}),()=>s({type:6,id:r})),[b,r]);let p=j(()=>{s({type:1})}),v=j($=>{if(o)return $.preventDefault();s({type:1}),xn(l.buttonRef.current)}),g=j(()=>{if(o)return s({type:2,focus:te.Nothing});s({type:2,focus:te.Specific,id:r})}),x=On(),E=j($=>x.update($)),y=j($=>{x.wasMoved($)&&(o||u||s({type:2,focus:te.Specific,id:r,trigger:0}))}),T=j($=>{x.wasMoved($)&&(o||u&&s({type:2,focus:te.Nothing}))}),I=a.useMemo(()=>({active:u,disabled:o,close:p}),[u,o,p]);return le({ourProps:{id:r,ref:f,role:"menuitem",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,disabled:void 0,onClick:v,onFocus:g,onPointerEnter:E,onMouseEnter:E,onPointerMove:y,onMouseMove:y,onPointerLeave:T,onMouseLeave:T},theirProps:i,slot:I,defaultTag:ll,name:"Menu.Item"})}let al=se(el),ul=se(nl),cl=se(il),dl=se(sl),pt=Object.assign(al,{Button:ul,Items:cl,Item:dl}),Gn=a.createContext(null);function Kn(){let e=a.useContext(Gn);if(e===null){let n=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(n,Kn),n}return e}function fl(){let[e,n]=a.useState([]);return[e.length>0?e.join(" "):void 0,a.useMemo(()=>function(t){let r=j(i=>(n(l=>[...l,i]),()=>n(l=>{let s=l.slice(),u=s.indexOf(i);return u!==-1&&s.splice(u,1),s}))),o=a.useMemo(()=>({register:r,slot:t.slot,name:t.name,props:t.props}),[r,t.slot,t.name,t.props]);return a.createElement(Gn.Provider,{value:o},t.children)},[n])]}let ml="label";function pl(e,n){let t=ve(),{id:r=`headlessui-label-${t}`,passive:o=!1,...i}=e,l=Kn(),s=ue(n);ee(()=>l.register(r),[r,l.register]);let u={ref:s,...l.props,id:r};return o&&("onClick"in u&&(delete u.htmlFor,delete u.onClick),"onClick"in i&&delete i.onClick),le({ourProps:u,theirProps:i,slot:l.slot||{},defaultTag:ml,name:l.name||"Label"})}let hl=se(pl),vl=Object.assign(hl,{});function gl(e=0){let[n,t]=a.useState(e),r=Xe(),o=a.useCallback(u=>{r.current&&t(d=>d|u)},[n,r]),i=a.useCallback(u=>!!(n&u),[n]),l=a.useCallback(u=>{r.current&&t(d=>d&~u)},[t,r]),s=a.useCallback(u=>{r.current&&t(d=>d^u)},[t]);return{flags:n,addFlag:o,hasFlag:i,removeFlag:l,toggleFlag:s}}let Jt=a.createContext(null);Jt.displayName="GroupContext";let bl=a.Fragment;function xl(e){var n;let[t,r]=a.useState(null),[o,i]=fl(),[l,s]=Hn(),u=a.useMemo(()=>({switch:t,setSwitch:r,labelledby:o,describedby:l}),[t,r,o,l]),d={},f=e;return a.createElement(s,{name:"Switch.Description"},a.createElement(i,{name:"Switch.Label",props:{htmlFor:(n=u.switch)==null?void 0:n.id,onClick(h){t&&(h.currentTarget.tagName==="LABEL"&&h.preventDefault(),t.click(),t.focus({preventScroll:!0}))}}},a.createElement(Jt.Provider,{value:u},le({ourProps:d,theirProps:f,defaultTag:bl,name:"Switch.Group"}))))}let wl="button";function yl(e,n){var t;let r=ve(),{id:o=`headlessui-switch-${r}`,checked:i,defaultChecked:l=!1,onChange:s,disabled:u=!1,name:d,value:f,form:h,...b}=e,p=a.useContext(Jt),v=a.useRef(null),g=ue(v,n,p===null?null:p.setSwitch),[x,E]=hn(i,s,l),y=j(()=>E==null?void 0:E(!x)),T=j(M=>{if(dt(M.currentTarget))return M.preventDefault();M.preventDefault(),y()}),I=j(M=>{M.key===K.Space?(M.preventDefault(),y()):M.key===K.Enter&&uo(M.currentTarget)}),$=j(M=>M.preventDefault()),P=a.useMemo(()=>({checked:x}),[x]),_={id:o,ref:g,role:"switch",type:At(e,v),tabIndex:e.tabIndex===-1?0:(t=e.tabIndex)!=null?t:0,"aria-checked":x,"aria-labelledby":p==null?void 0:p.labelledby,"aria-describedby":p==null?void 0:p.describedby,disabled:u,onClick:T,onKeyUp:I,onKeyPress:$},q=je();return a.useEffect(()=>{var M;let F=(M=v.current)==null?void 0:M.closest("form");F&&l!==void 0&&q.addEventListener(F,"reset",()=>{E(l)})},[v,E]),a.createElement(a.Fragment,null,d!=null&&x&&a.createElement(Ze,{features:ze.Hidden,...ct({as:"input",type:"checkbox",hidden:!0,readOnly:!0,disabled:u,form:h,checked:x,name:d,value:f})}),le({ourProps:_,theirProps:b,slot:P,defaultTag:wl,name:"Switch"}))}let El=se(yl),Sl=xl,Cl=Object.assign(El,{Group:Sl,Label:vl,Description:Un});function Tl(e){let n={called:!1};return(...t)=>{if(!n.called)return n.called=!0,e(...t)}}function Xt(e,...n){e&&n.length>0&&e.classList.add(...n)}function en(e,...n){e&&n.length>0&&e.classList.remove(...n)}function Ol(e,n){let t=ye();if(!e)return t.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[i,l]=[r,o].map(u=>{let[d=0]=u.split(",").filter(Boolean).map(f=>f.includes("ms")?parseFloat(f):parseFloat(f)*1e3).sort((f,h)=>h-f);return d}),s=i+l;if(s!==0){t.group(d=>{d.setTimeout(()=>{n(),d.dispose()},s),d.addEventListener(e,"transitionrun",f=>{f.target===f.currentTarget&&d.dispose()})});let u=t.addEventListener(e,"transitionend",d=>{d.target===d.currentTarget&&(n(),u())})}else n();return t.add(()=>n()),t.dispose}function jl(e,n,t,r){let o=t?"enter":"leave",i=ye(),l=r!==void 0?Tl(r):()=>{};o==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let s=ae(o,{enter:()=>n.enter,leave:()=>n.leave}),u=ae(o,{enter:()=>n.enterTo,leave:()=>n.leaveTo}),d=ae(o,{enter:()=>n.enterFrom,leave:()=>n.leaveFrom});return en(e,...n.base,...n.enter,...n.enterTo,...n.enterFrom,...n.leave,...n.leaveFrom,...n.leaveTo,...n.entered),Xt(e,...n.base,...s,...d),i.nextFrame(()=>{en(e,...n.base,...s,...d),Xt(e,...n.base,...s,...u),Ol(e,()=>(en(e,...n.base,...s),Xt(e,...n.base,...n.entered),l()))}),i.dispose}function Il({immediate:e,container:n,direction:t,classes:r,onStart:o,onStop:i}){let l=Xe(),s=je(),u=Se(t);ee(()=>{e&&(u.current="enter")},[e]),ee(()=>{let d=ye();s.add(d.dispose);let f=n.current;if(f&&u.current!=="idle"&&l.current)return d.dispose(),o.current(u.current),d.add(jl(f,r.current,u.current==="enter",()=>{d.dispose(),i.current(u.current)})),d.dispose},[t])}function Me(e=""){return e.split(/\s+/).filter(n=>n.length>1)}let ht=a.createContext(null);ht.displayName="TransitionContext";var $l=(e=>(e.Visible="visible",e.Hidden="hidden",e))($l||{});function kl(){let e=a.useContext(ht);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function Fl(){let e=a.useContext(vt);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let vt=a.createContext(null);vt.displayName="NestingContext";function gt(e){return"children"in e?gt(e.children):e.current.filter(({el:n})=>n.current!==null).filter(({state:n})=>n==="visible").length>0}function Zn(e,n){let t=Se(e),r=a.useRef([]),o=Xe(),i=je(),l=j((p,v=Pe.Hidden)=>{let g=r.current.findIndex(({el:x})=>x===p);g!==-1&&(ae(v,{[Pe.Unmount](){r.current.splice(g,1)},[Pe.Hidden](){r.current[g].state="hidden"}}),i.microTask(()=>{var x;!gt(r)&&o.current&&((x=t.current)==null||x.call(t))}))}),s=j(p=>{let v=r.current.find(({el:g})=>g===p);return v?v.state!=="visible"&&(v.state="visible"):r.current.push({el:p,state:"visible"}),()=>l(p,Pe.Unmount)}),u=a.useRef([]),d=a.useRef(Promise.resolve()),f=a.useRef({enter:[],leave:[],idle:[]}),h=j((p,v,g)=>{u.current.splice(0),n&&(n.chains.current[v]=n.chains.current[v].filter(([x])=>x!==p)),n==null||n.chains.current[v].push([p,new Promise(x=>{u.current.push(x)})]),n==null||n.chains.current[v].push([p,new Promise(x=>{Promise.all(f.current[v].map(([E,y])=>y)).then(()=>x())})]),v==="enter"?d.current=d.current.then(()=>n==null?void 0:n.wait.current).then(()=>g(v)):g(v)}),b=j((p,v,g)=>{Promise.all(f.current[v].splice(0).map(([x,E])=>E)).then(()=>{var x;(x=u.current.shift())==null||x()}).then(()=>g(v))});return a.useMemo(()=>({children:r,register:s,unregister:l,onStart:h,onStop:b,wait:d,chains:f}),[s,l,r,h,b,f,d])}function Nl(){}let Pl=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Qn(e){var n;let t={};for(let r of Pl)t[r]=(n=e[r])!=null?n:Nl;return t}function Ml(e){let n=a.useRef(Qn(e));return a.useEffect(()=>{n.current=Qn(e)},[e]),n}let Al="div",Jn=Ne.RenderStrategy;function Dl(e,n){var t,r;let{beforeEnter:o,afterEnter:i,beforeLeave:l,afterLeave:s,enter:u,enterFrom:d,enterTo:f,entered:h,leave:b,leaveFrom:p,leaveTo:v,...g}=e,x=a.useRef(null),E=ue(x,n),y=(t=g.unmount)==null||t?Pe.Unmount:Pe.Hidden,{show:T,appear:I,initial:$}=kl(),[P,_]=a.useState(T?"visible":"hidden"),q=Fl(),{register:M,unregister:F}=q;a.useEffect(()=>M(x),[M,x]),a.useEffect(()=>{if(y===Pe.Hidden&&x.current){if(T&&P!=="visible"){_("visible");return}return ae(P,{hidden:()=>F(x),visible:()=>M(x)})}},[P,x,M,F,T,y]);let R=Se({base:Me(g.className),enter:Me(u),enterFrom:Me(d),enterTo:Me(f),entered:Me(h),leave:Me(b),leaveFrom:Me(p),leaveTo:Me(v)}),Q=Ml({beforeEnter:o,afterEnter:i,beforeLeave:l,afterLeave:s}),z=Be();a.useEffect(()=>{if(z&&P==="visible"&&x.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[x,P,z]);let B=$&&!I,w=I&&T&&$,G=!z||B?"idle":T?"enter":"leave",W=gl(0),ie=j(be=>ae(be,{enter:()=>{W.addFlag(ce.Opening),Q.current.beforeEnter()},leave:()=>{W.addFlag(ce.Closing),Q.current.beforeLeave()},idle:()=>{}})),J=j(be=>ae(be,{enter:()=>{W.removeFlag(ce.Opening),Q.current.afterEnter()},leave:()=>{W.removeFlag(ce.Closing),Q.current.afterLeave()},idle:()=>{}})),ne=Zn(()=>{_("hidden"),F(x)},q),me=a.useRef(!1);Il({immediate:w,container:x,classes:R,direction:G,onStart:Se(be=>{me.current=!0,ne.onStart(x,be,ie)}),onStop:Se(be=>{me.current=!1,ne.onStop(x,be,J),be==="leave"&&!gt(ne)&&(_("hidden"),F(x))})});let ge=g,Ce={ref:E};return w?ge={...ge,className:at(g.className,...R.current.enter,...R.current.enterFrom)}:me.current&&(ge.className=at(g.className,(r=x.current)==null?void 0:r.className),ge.className===""&&delete ge.className),a.createElement(vt.Provider,{value:ne},a.createElement(_t,{value:ae(P,{visible:ce.Open,hidden:ce.Closed})|W.flags},le({ourProps:Ce,theirProps:ge,defaultTag:Al,features:Jn,visible:P==="visible",name:"Transition.Child"})))}function Ll(e,n){let{show:t,appear:r=!1,unmount:o=!0,...i}=e,l=a.useRef(null),s=ue(l,n);Be();let u=Qe();if(t===void 0&&u!==null&&(t=(u&ce.Open)===ce.Open),![!0,!1].includes(t))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[d,f]=a.useState(t?"visible":"hidden"),h=Zn(()=>{f("hidden")}),[b,p]=a.useState(!0),v=a.useRef([t]);ee(()=>{b!==!1&&v.current[v.current.length-1]!==t&&(v.current.push(t),p(!1))},[v,t]);let g=a.useMemo(()=>({show:t,appear:r,initial:b}),[t,r,b]);a.useEffect(()=>{if(t)f("visible");else if(!gt(h))f("hidden");else{let T=l.current;if(!T)return;let I=T.getBoundingClientRect();I.x===0&&I.y===0&&I.width===0&&I.height===0&&f("hidden")}},[t,h]);let x={unmount:o},E=j(()=>{var T;b&&p(!1),(T=e.beforeEnter)==null||T.call(e)}),y=j(()=>{var T;b&&p(!1),(T=e.beforeLeave)==null||T.call(e)});return a.createElement(vt.Provider,{value:h},a.createElement(ht.Provider,{value:g},le({ourProps:{...x,as:a.Fragment,children:a.createElement(Xn,{ref:s,...x,...i,beforeEnter:E,beforeLeave:y})},theirProps:{},defaultTag:a.Fragment,features:Jn,visible:d==="visible",name:"Transition"})))}function _l(e,n){let t=a.useContext(ht)!==null,r=Qe()!==null;return a.createElement(a.Fragment,null,!t&&r?a.createElement(tn,{ref:n,...e}):a.createElement(Xn,{ref:n,...e}))}let tn=se(Ll),Xn=se(Dl),Rl=se(_l),Re=Object.assign(tn,{Child:Rl,Root:tn});function Bl({title:e,titleId:n,...t},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?C.createElement("title",{id:n},e):null,C.createElement("path",{fillRule:"evenodd",d:"M18 10a.75.75 0 0 1-.75.75H4.66l2.1 1.95a.75.75 0 1 1-1.02 1.1l-3.5-3.25a.75.75 0 0 1 0-1.1l3.5-3.25a.75.75 0 1 1 1.02 1.1l-2.1 1.95h12.59A.75.75 0 0 1 18 10Z",clipRule:"evenodd"}))}const zl=C.forwardRef(Bl);function Wl({title:e,titleId:n,...t},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?C.createElement("title",{id:n},e):null,C.createElement("path",{fillRule:"evenodd",d:"M2 10a.75.75 0 0 1 .75-.75h12.59l-2.1-1.95a.75.75 0 1 1 1.02-1.1l3.5 3.25a.75.75 0 0 1 0 1.1l-3.5 3.25a.75.75 0 1 1-1.02-1.1l2.1-1.95H2.75A.75.75 0 0 1 2 10Z",clipRule:"evenodd"}))}const Hl=C.forwardRef(Wl);function Ul({title:e,titleId:n,...t},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?C.createElement("title",{id:n},e):null,C.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",clipRule:"evenodd"}))}const Vl=C.forwardRef(Ul);function Yl({title:e,titleId:n,...t},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?C.createElement("title",{id:n},e):null,C.createElement("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const ql=C.forwardRef(Yl);function Gl({title:e,titleId:n,...t},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?C.createElement("title",{id:n},e):null,C.createElement("path",{fillRule:"evenodd",d:"M9.47 6.47a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 1 1-1.06 1.06L10 8.06l-3.72 3.72a.75.75 0 0 1-1.06-1.06l4.25-4.25Z",clipRule:"evenodd"}))}const Kl=C.forwardRef(Gl);function Zl({title:e,titleId:n,...t},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?C.createElement("title",{id:n},e):null,C.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-8-5a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-1.5 0v-4.5A.75.75 0 0 1 10 5Zm0 10a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const er=C.forwardRef(Zl);function Ql({title:e,titleId:n,...t},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?C.createElement("title",{id:n},e):null,C.createElement("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const Jl=C.forwardRef(Ql);function Xl({title:e,titleId:n,...t},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?C.createElement("title",{id:n},e):null,C.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM9 9a.75.75 0 0 0 0 1.5h.253a.25.25 0 0 1 .244.304l-.459 2.066A1.75 1.75 0 0 0 10.747 15H11a.75.75 0 0 0 0-1.5h-.253a.25.25 0 0 1-.244-.304l.459-2.066A1.75 1.75 0 0 0 9.253 9H9Z",clipRule:"evenodd"}))}const es=C.forwardRef(Xl);function ts({title:e,titleId:n,...t},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?C.createElement("title",{id:n},e):null,C.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM8.28 7.22a.75.75 0 0 0-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 1 0 1.06 1.06L10 11.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L11.06 10l1.72-1.72a.75.75 0 0 0-1.06-1.06L10 8.94 8.28 7.22Z",clipRule:"evenodd"}))}const ns=C.forwardRef(ts),bt={warning:{color:"bg-yellow-50",icon:m.jsx(Jl,{className:"h-5 w-5 text-yellow-400","aria-hidden":"true"}),colorTitle:"text-yellow-800",colorText:"text-yellow-700"},error:{color:"bg-red-50",icon:m.jsx(ns,{className:"h-5 w-5 text-red-400","aria-hidden":"true"}),colorTitle:"text-red-800",colorText:"text-red-700"},success:{color:"bg-green-50",icon:m.jsx(Vl,{className:"h-5 w-5 text-green-400","aria-hidden":"true"}),colorTitle:"text-green-800",colorText:"text-green-700"},info:{color:"bg-blue-50",icon:m.jsx(es,{className:"h-5 w-5 text-blue-400","aria-hidden":"true"}),colorTitle:"text-blue-800",colorText:"text-blue-700"}};let tr;const rs=({type:e="info",title:n,message:t,active:r=!1,time:o=1e3,dispatch:i})=>{const{width:l}=Tt(),[s,u]=a.useState(!1);return a.useEffect(()=>r?(tr=window.setTimeout(()=>{u(!1),i({type:"ALERT",payload:{title:"",message:"",typeAlert:"",active:!1}})},o),u(!0)):(u(!1),()=>window.clearTimeout(tr)),[r,i,o]),m.jsx("div",{className:"fixed top-2.5 w-80 3xs:w-96 z-50",style:{left:`calc(50% - ${l<=470?"160px":"192px"})`},children:m.jsx(Re,{as:a.Fragment,show:s,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:m.jsxs("div",{className:k("rounded-md p-4 text-center",bt[e].color),children:[m.jsxs("div",{className:"flex justify-center flex-shrink-0",children:[bt[e].icon,m.jsx("h3",{className:k("text-sm font-medium ml-3",bt[e].colorTitle),children:n})]}),m.jsx("div",{className:k("mt-2 text-sm",bt[e].colorText),children:m.jsx("p",{children:t})})]})})})};function os({title:e,titleId:n,...t},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?C.createElement("title",{id:n},e):null,C.createElement("path",{fillRule:"evenodd",d:"M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",clipRule:"evenodd"}))}const is=C.forwardRef(os);function ls({title:e,titleId:n,...t},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?C.createElement("title",{id:n},e):null,C.createElement("path",{fillRule:"evenodd",d:"M10.5 3.75a6.75 6.75 0 1 0 0 13.5 6.75 6.75 0 0 0 0-13.5ZM2.25 10.5a8.25 8.25 0 1 1 14.59 5.28l4.69 4.69a.75.75 0 1 1-1.06 1.06l-4.69-4.69A8.25 8.25 0 0 1 2.25 10.5Z",clipRule:"evenodd"}))}const ss=C.forwardRef(ls);function as({title:e,titleId:n,...t},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?C.createElement("title",{id:n},e):null,C.createElement("path",{d:"M21.731 2.269a2.625 2.625 0 0 0-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 0 0 0-3.712ZM19.513 8.199l-3.712-3.712-8.4 8.4a5.25 5.25 0 0 0-1.32 2.214l-.8 2.685a.75.75 0 0 0 .933.933l2.685-.8a5.25 5.25 0 0 0 2.214-1.32l8.4-8.4Z"}),C.createElement("path",{d:"M5.25 5.25a3 3 0 0 0-3 3v10.5a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3V13.5a.75.75 0 0 0-1.5 0v5.25a1.5 1.5 0 0 1-1.5 1.5H5.25a1.5 1.5 0 0 1-1.5-1.5V8.25a1.5 1.5 0 0 1 1.5-1.5h5.25a.75.75 0 0 0 0-1.5H5.25Z"}))}const us=C.forwardRef(as);function cs({title:e,titleId:n,...t},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?C.createElement("title",{id:n},e):null,C.createElement("path",{fillRule:"evenodd",d:"M18.685 19.097A9.723 9.723 0 0 0 21.75 12c0-5.385-4.365-9.75-9.75-9.75S2.25 6.615 2.25 12a9.723 9.723 0 0 0 3.065 7.097A9.716 9.716 0 0 0 12 21.75a9.716 9.716 0 0 0 6.685-2.653Zm-12.54-1.285A7.486 7.486 0 0 1 12 15a7.486 7.486 0 0 1 5.855 2.812A8.224 8.224 0 0 1 12 20.25a8.224 8.224 0 0 1-5.855-2.438ZM15.75 9a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z",clipRule:"evenodd"}))}const ds=C.forwardRef(cs);function fs({title:e,titleId:n,...t},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?C.createElement("title",{id:n},e):null,C.createElement("path",{fillRule:"evenodd",d:"M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const ms=C.forwardRef(fs),ps=({src:e,alt:n,width:t,height:r,className:o="",classNameIcon:i="",isIcon:l=!0,acronym:s=""})=>m.jsx(m.Fragment,{children:e?m.jsx("img",{src:e,alt:n,width:t,height:r,className:k(o!==""&&o),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s"},onLoad:u=>u.currentTarget.style.filter="none","data-testid":"img"}):l?m.jsx(ds,{className:k("bg-white text-default-5",i!==""?i:"w-7 h-7")}):m.jsx("div",{className:k("bg-gray-200 text-default-5 rounded-full font-bold uppercase flex justify-center items-center",i!==""?i:"w-7 h-7")})}),hs=({steps:e,onClick:n})=>{const[t,r]=a.useState(0),o=i=>{r(i),n(i)};return m.jsx("nav",{className:"flex items-center justify-center w-full","aria-label":"Progress","data-testid":"bullets",children:m.jsx("ol",{role:"list",className:"flex items-center space-x-5",children:new Array(e).fill(1).map((i,l)=>m.jsx("li",{children:t!==l?m.jsx("div",{className:"cursor-pointer block h-2.5 w-2.5 rounded-full bg-gray-500 hover:bg-gray-600",onClick:()=>o(l),"data-testid":`step-${l}`,children:m.jsx("span",{className:"sr-only",children:"step"})}):m.jsxs("div",{className:"relative flex items-center justify-center cursor-pointer","aria-current":"step",children:[m.jsx("span",{className:"absolute flex h-5 w-5 p-px","aria-hidden":"true",children:m.jsx("span",{className:"h-full w-full rounded-full bg-gray-300"})}),m.jsx("span",{className:"relative block h-2.5 w-2.5 rounded-full bg-gray-500","aria-hidden":"true"}),m.jsx("span",{className:"sr-only",children:"step"})]})},l))})})};var nr={exports:{}};/*!
|
|
31
|
+
`));let b=m.props,p=typeof(b==null?void 0:b.className)=="function"?(...g)=>at(b==null?void 0:b.className(...g),u.className):at(b==null?void 0:b.className,u.className),v=p?{className:p}:{};return a.cloneElement(m,Object.assign({},In(m.props,ct(Dt(u,["ref"]))),h,c,{ref:o(m.ref,c.ref)},v))}return a.createElement(i,Object.assign({},Dt(u,["ref"]),i!==a.Fragment&&c,i!==a.Fragment&&h),m)}function ro(...e){return e.every(n=>n==null)?void 0:n=>{for(let t of e)t!=null&&(typeof t=="function"?t(n):t.current=n)}}function In(...e){if(e.length===0)return{};if(e.length===1)return e[0];let n={},t={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(t[o]!=null||(t[o]=[]),t[o].push(r[o])):n[o]=r[o];if(n.disabled||n["aria-disabled"])return Object.assign(n,Object.fromEntries(Object.keys(t).map(r=>[r,void 0])));for(let r in t)Object.assign(n,{[r](o,...i){let l=t[r];for(let s of l){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;s(o,...i)}}});return n}function se(e){var n;return Object.assign(a.forwardRef(e),{displayName:(n=e.displayName)!=null?n:e.name})}function ct(e){let n=Object.assign({},e);for(let t in n)n[t]===void 0&&delete n[t];return n}function Dt(e,n=[]){let t=Object.assign({},e);for(let r of n)r in t&&delete t[r];return t}let oo="div";var ze=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(ze||{});function io(e,n){var t;let{features:r=1,...o}=e,i={ref:n,"aria-hidden":(r&2)===2?!0:(t=o["aria-hidden"])!=null?t:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return le({ourProps:i,theirProps:o,slot:{},defaultTag:oo,name:"Hidden"})}let Ke=se(io),Lt=a.createContext(null);Lt.displayName="OpenClosedContext";var ce=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ce||{});function Je(){return a.useContext(Lt)}function _t({value:e,children:n}){return a.createElement(Lt.Provider,{value:e},n)}function lo(e){function n(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",n))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",n),n())}let Te=[];lo(()=>{function e(n){n.target instanceof HTMLElement&&n.target!==document.body&&Te[0]!==n.target&&(Te.unshift(n.target),Te=Te.filter(t=>t!=null&&t.isConnected),Te.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function dt(e){let n=e.parentElement,t=null;for(;n&&!(n instanceof HTMLFieldSetElement);)n instanceof HTMLLegendElement&&(t=n),n=n.parentElement;let r=(n==null?void 0:n.getAttribute("disabled"))==="";return r&&so(t)?!1:r}function so(e){if(!e)return!1;let n=e.previousElementSibling;for(;n!==null;){if(n instanceof HTMLLegendElement)return!1;n=n.previousElementSibling}return!0}function ao(e){throw new Error("Unexpected object: "+e)}var te=(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))(te||{});function Rt(e,n){let t=n.resolveItems();if(t.length<=0)return null;let r=n.resolveActiveIndex(),o=r??-1;switch(e.focus){case 0:{for(let i=0;i<t.length;++i)if(!n.resolveDisabled(t[i],i,t))return i;return r}case 1:{for(let i=o-1;i>=0;--i)if(!n.resolveDisabled(t[i],i,t))return i;return r}case 2:{for(let i=o+1;i<t.length;++i)if(!n.resolveDisabled(t[i],i,t))return i;return r}case 3:{for(let i=t.length-1;i>=0;--i)if(!n.resolveDisabled(t[i],i,t))return i;return r}case 4:{for(let i=0;i<t.length;++i)if(n.resolveId(t[i],i,t)===e.id)return i;return r}case 5:return null;default:ao(e)}}function Nn(e={},n=null,t=[]){for(let[r,o]of Object.entries(e))$n(t,Fn(n,r),o);return t}function Fn(e,n){return e?e+"["+n+"]":n}function $n(e,n,t){if(Array.isArray(t))for(let[r,o]of t.entries())$n(e,Fn(n,r.toString()),o);else t instanceof Date?e.push([n,t.toISOString()]):typeof t=="boolean"?e.push([n,t?"1":"0"]):typeof t=="string"?e.push([n,t]):typeof t=="number"?e.push([n,`${t}`]):t==null?e.push([n,""]):Nn(t,n,e)}function uo(e){var n,t;let r=(n=e==null?void 0:e.form)!=null?n:e.closest("form");if(r){for(let o of r.elements)if(o!==e&&(o.tagName==="INPUT"&&o.type==="submit"||o.tagName==="BUTTON"&&o.type==="submit"||o.nodeName==="INPUT"&&o.type==="image")){o.click();return}(t=r.requestSubmit)==null||t.call(r)}}var Z=(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))(Z||{}),co=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(co||{}),fo=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(fo||{}),mo=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(mo||{}),po=(e=>(e[e.OpenCombobox=0]="OpenCombobox",e[e.CloseCombobox=1]="CloseCombobox",e[e.GoToOption=2]="GoToOption",e[e.RegisterOption=3]="RegisterOption",e[e.UnregisterOption=4]="UnregisterOption",e[e.RegisterLabel=5]="RegisterLabel",e[e.SetActivationTrigger=6]="SetActivationTrigger",e[e.UpdateVirtualOptions=7]="UpdateVirtualOptions",e))(po||{});function Bt(e,n=t=>t){let t=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=n(e.options.slice()),o=r.length>0&&r[0].dataRef.current.order!==null?r.sort((l,s)=>l.dataRef.current.order-s.dataRef.current.order):kt(r,l=>l.dataRef.current.domRef.current),i=t?o.indexOf(t):null;return i===-1&&(i=null),{options:o,activeOptionIndex:i}}let ho={1(e){var n;return(n=e.dataRef.current)!=null&&n.disabled||e.comboboxState===1?e:{...e,activeOptionIndex:null,comboboxState:1}},0(e){var n,t;if((n=e.dataRef.current)!=null&&n.disabled||e.comboboxState===0)return e;if((t=e.dataRef.current)!=null&&t.value){let r=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(r!==-1)return{...e,activeOptionIndex:r,comboboxState:0}}return{...e,comboboxState:0}},2(e,n){var t,r,o,i,l;if((t=e.dataRef.current)!=null&&t.disabled||(r=e.dataRef.current)!=null&&r.optionsRef.current&&!((o=e.dataRef.current)!=null&&o.optionsPropsRef.current.static)&&e.comboboxState===1)return e;if(e.virtual){let m=n.focus===te.Specific?n.idx:Rt(n,{resolveItems:()=>e.virtual.options,resolveActiveIndex:()=>{var b,p;return(p=(b=e.activeOptionIndex)!=null?b:e.virtual.options.findIndex(v=>!e.virtual.disabled(v)))!=null?p:null},resolveDisabled:e.virtual.disabled,resolveId(){throw new Error("Function not implemented.")}}),h=(i=n.trigger)!=null?i:2;return e.activeOptionIndex===m&&e.activationTrigger===h?e:{...e,activeOptionIndex:m,activationTrigger:h}}let s=Bt(e);if(s.activeOptionIndex===null){let m=s.options.findIndex(h=>!h.dataRef.current.disabled);m!==-1&&(s.activeOptionIndex=m)}let u=n.focus===te.Specific?n.idx:Rt(n,{resolveItems:()=>s.options,resolveActiveIndex:()=>s.activeOptionIndex,resolveId:m=>m.id,resolveDisabled:m=>m.dataRef.current.disabled}),c=(l=n.trigger)!=null?l:2;return e.activeOptionIndex===u&&e.activationTrigger===c?e:{...e,...s,activeOptionIndex:u,activationTrigger:c}},3:(e,n)=>{var t,r,o;if((t=e.dataRef.current)!=null&&t.virtual)return{...e,options:[...e.options,n.payload]};let i=n.payload,l=Bt(e,u=>(u.push(i),u));e.activeOptionIndex===null&&(r=e.dataRef.current)!=null&&r.isSelected(n.payload.dataRef.current.value)&&(l.activeOptionIndex=l.options.indexOf(i));let s={...e,...l,activationTrigger:2};return(o=e.dataRef.current)!=null&&o.__demoMode&&e.dataRef.current.value===void 0&&(s.activeOptionIndex=0),s},4:(e,n)=>{var t;if((t=e.dataRef.current)!=null&&t.virtual)return{...e,options:e.options.filter(o=>o.id!==n.id)};let r=Bt(e,o=>{let i=o.findIndex(l=>l.id===n.id);return i!==-1&&o.splice(i,1),o});return{...e,...r,activationTrigger:2}},5:(e,n)=>e.labelId===n.id?e:{...e,labelId:n.id},6:(e,n)=>e.activationTrigger===n.trigger?e:{...e,activationTrigger:n.trigger},7:(e,n)=>{var t;if(((t=e.virtual)==null?void 0:t.options)===n.options)return e;let r=e.activeOptionIndex;if(e.activeOptionIndex!==null){let o=n.options.indexOf(e.virtual.options[e.activeOptionIndex]);o!==-1?r=o:r=null}return{...e,activeOptionIndex:r,virtual:Object.assign({},e.virtual,{options:n.options})}}},zt=a.createContext(null);zt.displayName="ComboboxActionsContext";function Qe(e){let n=a.useContext(zt);if(n===null){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Qe),t}return n}let Pn=a.createContext(null);function vo(e){var n;let t=Le("VirtualProvider"),[r,o]=a.useMemo(()=>{let u=t.optionsRef.current;if(!u)return[0,0];let c=window.getComputedStyle(u);return[parseFloat(c.paddingBlockStart||c.paddingTop),parseFloat(c.paddingBlockEnd||c.paddingBottom)]},[t.optionsRef.current]),i=Vr({scrollPaddingStart:r,scrollPaddingEnd:o,count:t.virtual.options.length,estimateSize(){return 40},getScrollElement(){var u;return(u=t.optionsRef.current)!=null?u:null},overscan:12}),[l,s]=a.useState(0);return ee(()=>{s(u=>u+1)},[(n=t.virtual)==null?void 0:n.options]),a.createElement(Pn.Provider,{value:i},a.createElement("div",{style:{position:"relative",width:"100%",height:`${i.getTotalSize()}px`},ref:u=>{if(u){if(typeof process<"u"&&process.env.JEST_WORKER_ID!==void 0||t.activationTrigger===0)return;t.activeOptionIndex!==null&&t.virtual.options.length>t.activeOptionIndex&&i.scrollToIndex(t.activeOptionIndex)}}},i.getVirtualItems().map(u=>{var c;return a.createElement(a.Fragment,{key:u.key},a.cloneElement((c=e.children)==null?void 0:c.call(e,{option:t.virtual.options[u.index],open:t.comboboxState===0}),{key:`${l}-${u.key}`,"data-index":u.index,"aria-setsize":t.virtual.options.length,"aria-posinset":u.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${u.start}px)`,overflowAnchor:"none"}}))})))}let Wt=a.createContext(null);Wt.displayName="ComboboxDataContext";function Le(e){let n=a.useContext(Wt);if(n===null){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Le),t}return n}function go(e,n){return ae(n.type,ho,e,n)}let bo=a.Fragment;function xo(e,n){let{value:t,defaultValue:r,onChange:o,form:i,name:l,by:s=null,disabled:u=!1,__demoMode:c=!1,nullable:m=!1,multiple:h=!1,immediate:b=!1,virtual:p=null,...v}=e,g=!1,x=null,[S=h?[]:void 0,y]=hn(t,o,r),[T,I]=a.useReducer(go,{dataRef:a.createRef(),comboboxState:c?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),N=a.useRef(!1),k=a.useRef({static:!1,hold:!1}),_=a.useRef(null),q=a.useRef(null),M=a.useRef(null),$=a.useRef(null),R=j(typeof s=="string"?(A,V)=>{let H=s;return(A==null?void 0:A[H])===(V==null?void 0:V[H])}:s??((A,V)=>A===V)),J=j(A=>T.options.findIndex(V=>R(V.dataRef.current.value,A))),z=a.useCallback(A=>ae(w.mode,{1:()=>S.some(V=>R(V,A)),0:()=>R(S,A)}),[S]),B=j(A=>T.activeOptionIndex===J(A)),w=a.useMemo(()=>({...T,immediate:g,optionsPropsRef:k,labelRef:_,inputRef:q,buttonRef:M,optionsRef:$,value:S,defaultValue:r,disabled:u,mode:h?1:0,virtual:T.virtual,get activeOptionIndex(){if(N.current&&T.activeOptionIndex===null&&T.options.length>0){let A=T.options.findIndex(V=>!V.dataRef.current.disabled);if(A!==-1)return A}return T.activeOptionIndex},calculateIndex:J,compare:R,isSelected:z,isActive:B,nullable:m,__demoMode:c}),[S,r,u,h,m,c,T,x]);ee(()=>{},[x,void 0]),ee(()=>{T.dataRef.current=w},[w]),Mt([w.buttonRef,w.inputRef,w.optionsRef],()=>P.closeCombobox(),w.comboboxState===0);let G=a.useMemo(()=>{var A,V,H;return{open:w.comboboxState===0,disabled:u,activeIndex:w.activeOptionIndex,activeOption:w.activeOptionIndex===null?null:w.virtual?w.virtual.options[(A=w.activeOptionIndex)!=null?A:0]:(H=(V=w.options[w.activeOptionIndex])==null?void 0:V.dataRef.current.value)!=null?H:null,value:S}},[w,u,S]),W=j(()=>{if(w.activeOptionIndex!==null){if(w.virtual)Ce(w.virtual.options[w.activeOptionIndex]);else{let{dataRef:A}=w.options[w.activeOptionIndex];Ce(A.current.value)}P.goToOption(te.Specific,w.activeOptionIndex)}}),ie=j(()=>{I({type:0}),N.current=!0}),Q=j(()=>{I({type:1}),N.current=!1}),ne=j((A,V,H)=>(N.current=!1,A===te.Specific?I({type:2,focus:te.Specific,idx:V,trigger:H}):I({type:2,focus:A,trigger:H}))),me=j((A,V)=>(I({type:3,payload:{id:A,dataRef:V}}),()=>{w.isActive(V.current.value)&&(N.current=!0),I({type:4,id:A})})),ge=j(A=>(I({type:5,id:A}),()=>I({type:5,id:null}))),Ce=j(A=>ae(w.mode,{0(){return y==null?void 0:y(A)},1(){let V=w.value.slice(),H=V.findIndex(pe=>R(pe,A));return H===-1?V.push(A):V.splice(H,1),y==null?void 0:y(V)}})),be=j(A=>{I({type:6,trigger:A})}),P=a.useMemo(()=>({onChange:Ce,registerOption:me,registerLabel:ge,goToOption:ne,closeCombobox:Q,openCombobox:ie,setActivationTrigger:be,selectActiveOption:W}),[]),K=n===null?{}:{ref:n},re=a.useRef(null),we=je();return a.useEffect(()=>{re.current&&r!==void 0&&we.addEventListener(re.current,"reset",()=>{y==null||y(r)})},[re,y]),a.createElement(zt.Provider,{value:P},a.createElement(Wt.Provider,{value:w},a.createElement(_t,{value:ae(w.comboboxState,{0:ce.Open,1:ce.Closed})},l!=null&&S!=null&&Nn({[l]:S}).map(([A,V],H)=>a.createElement(Ke,{features:ze.Hidden,ref:H===0?pe=>{var he;re.current=(he=pe==null?void 0:pe.closest("form"))!=null?he:null}:void 0,...ct({key:A,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:i,disabled:u,name:A,value:V})})),le({ourProps:K,theirProps:v,slot:G,defaultTag:bo,name:"Combobox"}))))}let wo="input";function yo(e,n){var t,r,o,i,l;let s=ve(),{id:u=`headlessui-combobox-input-${s}`,onChange:c,displayValue:m,type:h="text",...b}=e,p=Le("Combobox.Input"),v=Qe("Combobox.Input"),g=ue(p.inputRef,n),x=De(p.inputRef),S=a.useRef(!1),y=je(),T=j(()=>{v.onChange(null),p.optionsRef.current&&(p.optionsRef.current.scrollTop=0),v.goToOption(te.Nothing)}),I=function(){var w;return typeof m=="function"&&p.value!==void 0?(w=m(p.value))!=null?w:"":typeof p.value=="string"?p.value:""}();Ze(([w,G],[W,ie])=>{if(S.current)return;let Q=p.inputRef.current;Q&&((ie===0&&G===1||w!==W)&&(Q.value=w),requestAnimationFrame(()=>{if(S.current||!Q||(x==null?void 0:x.activeElement)!==Q)return;let{selectionStart:ne,selectionEnd:me}=Q;Math.abs((me??0)-(ne??0))===0&&ne===0&&Q.setSelectionRange(Q.value.length,Q.value.length)}))},[I,p.comboboxState,x]),Ze(([w],[G])=>{if(w===0&&G===1){if(S.current)return;let W=p.inputRef.current;if(!W)return;let ie=W.value,{selectionStart:Q,selectionEnd:ne,selectionDirection:me}=W;W.value="",W.value=ie,me!==null?W.setSelectionRange(Q,ne,me):W.setSelectionRange(Q,ne)}},[p.comboboxState]);let N=a.useRef(!1),k=j(()=>{N.current=!0}),_=j(()=>{y.nextFrame(()=>{N.current=!1})}),q=j(w=>{switch(S.current=!0,w.key){case Z.Enter:if(S.current=!1,p.comboboxState!==0||N.current)return;if(w.preventDefault(),w.stopPropagation(),p.activeOptionIndex===null){v.closeCombobox();return}v.selectActiveOption(),p.mode===0&&v.closeCombobox();break;case Z.ArrowDown:return S.current=!1,w.preventDefault(),w.stopPropagation(),ae(p.comboboxState,{0:()=>v.goToOption(te.Next),1:()=>v.openCombobox()});case Z.ArrowUp:return S.current=!1,w.preventDefault(),w.stopPropagation(),ae(p.comboboxState,{0:()=>v.goToOption(te.Previous),1:()=>{v.openCombobox(),y.nextFrame(()=>{p.value||v.goToOption(te.Last)})}});case Z.Home:if(w.shiftKey)break;return S.current=!1,w.preventDefault(),w.stopPropagation(),v.goToOption(te.First);case Z.PageUp:return S.current=!1,w.preventDefault(),w.stopPropagation(),v.goToOption(te.First);case Z.End:if(w.shiftKey)break;return S.current=!1,w.preventDefault(),w.stopPropagation(),v.goToOption(te.Last);case Z.PageDown:return S.current=!1,w.preventDefault(),w.stopPropagation(),v.goToOption(te.Last);case Z.Escape:return S.current=!1,p.comboboxState!==0?void 0:(w.preventDefault(),p.optionsRef.current&&!p.optionsPropsRef.current.static&&w.stopPropagation(),p.nullable&&p.mode===0&&p.value===null&&T(),v.closeCombobox());case Z.Tab:if(S.current=!1,p.comboboxState!==0)return;p.mode===0&&p.activationTrigger!==1&&v.selectActiveOption(),v.closeCombobox();break}}),M=j(w=>{c==null||c(w),p.nullable&&p.mode===0&&w.target.value===""&&T(),v.openCombobox()}),$=j(w=>{var G,W,ie;let Q=(G=w.relatedTarget)!=null?G:Te.find(ne=>ne!==w.currentTarget);if(S.current=!1,!((W=p.optionsRef.current)!=null&&W.contains(Q))&&!((ie=p.buttonRef.current)!=null&&ie.contains(Q))&&p.comboboxState===0)return w.preventDefault(),p.mode===0&&(p.nullable&&p.value===null?T():p.activationTrigger!==1&&v.selectActiveOption()),v.closeCombobox()}),R=j(w=>{var G,W,ie;let Q=(G=w.relatedTarget)!=null?G:Te.find(ne=>ne!==w.currentTarget);(W=p.buttonRef.current)!=null&&W.contains(Q)||(ie=p.optionsRef.current)!=null&&ie.contains(Q)||p.disabled||p.immediate&&p.comboboxState!==0&&(v.openCombobox(),y.nextFrame(()=>{v.setActivationTrigger(1)}))}),J=Nt(()=>{if(p.labelId)return[p.labelId].join(" ")},[p.labelId]),z=a.useMemo(()=>({open:p.comboboxState===0,disabled:p.disabled}),[p]),B={ref:g,id:u,role:"combobox",type:h,"aria-controls":(t=p.optionsRef.current)==null?void 0:t.id,"aria-expanded":p.comboboxState===0,"aria-activedescendant":p.activeOptionIndex===null?void 0:p.virtual?(r=p.options.find(w=>{var G;return!((G=p.virtual)!=null&&G.disabled(w.dataRef.current.value))&&p.compare(w.dataRef.current.value,p.virtual.options[p.activeOptionIndex])}))==null?void 0:r.id:(o=p.options[p.activeOptionIndex])==null?void 0:o.id,"aria-labelledby":J,"aria-autocomplete":"list",defaultValue:(l=(i=e.defaultValue)!=null?i:p.defaultValue!==void 0?m==null?void 0:m(p.defaultValue):null)!=null?l:p.defaultValue,disabled:p.disabled,onCompositionStart:k,onCompositionEnd:_,onKeyDown:q,onChange:M,onFocus:R,onBlur:$};return le({ourProps:B,theirProps:b,slot:z,defaultTag:wo,name:"Combobox.Input"})}let Eo="button";function So(e,n){var t;let r=Le("Combobox.Button"),o=Qe("Combobox.Button"),i=ue(r.buttonRef,n),l=ve(),{id:s=`headlessui-combobox-button-${l}`,...u}=e,c=je(),m=j(g=>{switch(g.key){case Z.ArrowDown:return g.preventDefault(),g.stopPropagation(),r.comboboxState===1&&o.openCombobox(),c.nextFrame(()=>{var x;return(x=r.inputRef.current)==null?void 0:x.focus({preventScroll:!0})});case Z.ArrowUp:return g.preventDefault(),g.stopPropagation(),r.comboboxState===1&&(o.openCombobox(),c.nextFrame(()=>{r.value||o.goToOption(te.Last)})),c.nextFrame(()=>{var x;return(x=r.inputRef.current)==null?void 0:x.focus({preventScroll:!0})});case Z.Escape:return r.comboboxState!==0?void 0:(g.preventDefault(),r.optionsRef.current&&!r.optionsPropsRef.current.static&&g.stopPropagation(),o.closeCombobox(),c.nextFrame(()=>{var x;return(x=r.inputRef.current)==null?void 0:x.focus({preventScroll:!0})}));default:return}}),h=j(g=>{if(dt(g.currentTarget))return g.preventDefault();r.comboboxState===0?o.closeCombobox():(g.preventDefault(),o.openCombobox()),c.nextFrame(()=>{var x;return(x=r.inputRef.current)==null?void 0:x.focus({preventScroll:!0})})}),b=Nt(()=>{if(r.labelId)return[r.labelId,s].join(" ")},[r.labelId,s]),p=a.useMemo(()=>({open:r.comboboxState===0,disabled:r.disabled,value:r.value}),[r]),v={ref:i,id:s,type:At(e,r.buttonRef),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(t=r.optionsRef.current)==null?void 0:t.id,"aria-expanded":r.comboboxState===0,"aria-labelledby":b,disabled:r.disabled,onClick:h,onKeyDown:m};return le({ourProps:v,theirProps:u,slot:p,defaultTag:Eo,name:"Combobox.Button"})}let Co="label";function To(e,n){let t=ve(),{id:r=`headlessui-combobox-label-${t}`,...o}=e,i=Le("Combobox.Label"),l=Qe("Combobox.Label"),s=ue(i.labelRef,n);ee(()=>l.registerLabel(r),[r]);let u=j(()=>{var m;return(m=i.inputRef.current)==null?void 0:m.focus({preventScroll:!0})}),c=a.useMemo(()=>({open:i.comboboxState===0,disabled:i.disabled}),[i]);return le({ourProps:{ref:s,id:r,onClick:u},theirProps:o,slot:c,defaultTag:Co,name:"Combobox.Label"})}let Oo="ul",jo=Pe.RenderStrategy|Pe.Static;function Io(e,n){let t=ve(),{id:r=`headlessui-combobox-options-${t}`,hold:o=!1,...i}=e,l=Le("Combobox.Options"),s=ue(l.optionsRef,n),u=Je(),c=u!==null?(u&ce.Open)===ce.Open:l.comboboxState===0;ee(()=>{var p;l.optionsPropsRef.current.static=(p=e.static)!=null?p:!1},[l.optionsPropsRef,e.static]),ee(()=>{l.optionsPropsRef.current.hold=o},[l.optionsPropsRef,o]),jn({container:l.optionsRef.current,enabled:l.comboboxState===0,accept(p){return p.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:p.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(p){p.setAttribute("role","none")}});let m=Nt(()=>{var p,v;return(v=l.labelId)!=null?v:(p=l.buttonRef.current)==null?void 0:p.id},[l.labelId,l.buttonRef.current]),h=a.useMemo(()=>({open:l.comboboxState===0,option:void 0}),[l]),b={"aria-labelledby":m,role:"listbox","aria-multiselectable":l.mode===1?!0:void 0,id:r,ref:s};return l.virtual&&l.comboboxState===0&&Object.assign(i,{children:a.createElement(vo,null,i.children)}),le({ourProps:b,theirProps:i,slot:h,defaultTag:Oo,features:jo,visible:c,name:"Combobox.Options"})}let No="li";function Fo(e,n){var t;let r=ve(),{id:o=`headlessui-combobox-option-${r}`,disabled:i=!1,value:l,order:s=null,...u}=e,c=Le("Combobox.Option"),m=Qe("Combobox.Option"),h=c.virtual?c.activeOptionIndex===c.calculateIndex(l):c.activeOptionIndex===null?!1:((t=c.options[c.activeOptionIndex])==null?void 0:t.id)===o,b=c.isSelected(l),p=a.useRef(null),v=Se({disabled:i,value:l,domRef:p,order:s}),g=a.useContext(Pn),x=ue(n,p,g?g.measureElement:null),S=j(()=>m.onChange(l));ee(()=>m.registerOption(o,v),[v,o]);let y=a.useRef(!(c.virtual||c.__demoMode));ee(()=>{if(!c.virtual||!c.__demoMode)return;let $=ye();return $.requestAnimationFrame(()=>{y.current=!0}),$.dispose},[c.virtual,c.__demoMode]),ee(()=>{if(!y.current||c.comboboxState!==0||!h||c.activationTrigger===0)return;let $=ye();return $.requestAnimationFrame(()=>{var R,J;(J=(R=p.current)==null?void 0:R.scrollIntoView)==null||J.call(R,{block:"nearest"})}),$.dispose},[p,h,c.comboboxState,c.activationTrigger,c.activeOptionIndex]);let T=j($=>{var R;if(i||(R=c.virtual)!=null&&R.disabled(l))return $.preventDefault();S(),yn()||requestAnimationFrame(()=>{var J;return(J=c.inputRef.current)==null?void 0:J.focus({preventScroll:!0})}),c.mode===0&&requestAnimationFrame(()=>m.closeCombobox())}),I=j(()=>{var $;if(i||($=c.virtual)!=null&&$.disabled(l))return m.goToOption(te.Nothing);let R=c.calculateIndex(l);m.goToOption(te.Specific,R)}),N=On(),k=j($=>N.update($)),_=j($=>{var R;if(!N.wasMoved($)||i||(R=c.virtual)!=null&&R.disabled(l)||h)return;let J=c.calculateIndex(l);m.goToOption(te.Specific,J,0)}),q=j($=>{var R;N.wasMoved($)&&(i||(R=c.virtual)!=null&&R.disabled(l)||h&&(c.optionsPropsRef.current.hold||m.goToOption(te.Nothing)))}),M=a.useMemo(()=>({active:h,selected:b,disabled:i}),[h,b,i]);return le({ourProps:{id:o,ref:x,role:"option",tabIndex:i===!0?void 0:-1,"aria-disabled":i===!0?!0:void 0,"aria-selected":b,disabled:void 0,onClick:T,onFocus:I,onPointerEnter:k,onMouseEnter:k,onPointerMove:_,onMouseMove:_,onPointerLeave:q,onMouseLeave:q},theirProps:u,slot:M,defaultTag:No,name:"Combobox.Option"})}let $o=se(xo),Po=se(So),ko=se(yo),Mo=se(To),Ao=se(Io),Do=se(Fo),Ne=Object.assign($o,{Input:ko,Button:Po,Label:Mo,Options:Ao,Option:Do});function kn(e,n,t,r){let o=Se(t);a.useEffect(()=>{e=e??window;function i(l){o.current(l)}return e.addEventListener(n,i,r),()=>e.removeEventListener(n,i,r)},[e,n,r])}function Xe(){let e=a.useRef(!1);return ee(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Mn(e){let n=j(e),t=a.useRef(!1);a.useEffect(()=>(t.current=!1,()=>{t.current=!0,it(()=>{t.current&&n()})}),[n])}var et=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(et||{});function Lo(){let e=a.useRef(0);return En("keydown",n=>{n.key==="Tab"&&(e.current=n.shiftKey?1:0)},!0),e}function An(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let n=new Set;for(let t of e.current)t.current instanceof HTMLElement&&n.add(t.current);return n}let _o="div";var Dn=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(Dn||{});function Ro(e,n){let t=a.useRef(null),r=ue(t,n),{initialFocus:o,containers:i,features:l=30,...s}=e;Be()||(l=1);let u=De(t);Wo({ownerDocument:u},!!(l&16));let c=Ho({ownerDocument:u,container:t,initialFocus:o},!!(l&2));Uo({ownerDocument:u,container:t,containers:i,previousActiveElement:c},!!(l&8));let m=Lo(),h=j(g=>{let x=t.current;x&&(S=>S())(()=>{ae(m.current,{[et.Forwards]:()=>{Ge(x,Ie.First,{skipElements:[g.relatedTarget]})},[et.Backwards]:()=>{Ge(x,Ie.Last,{skipElements:[g.relatedTarget]})}})})}),b=je(),p=a.useRef(!1),v={ref:r,onKeyDown(g){g.key=="Tab"&&(p.current=!0,b.requestAnimationFrame(()=>{p.current=!1}))},onBlur(g){let x=An(i);t.current instanceof HTMLElement&&x.add(t.current);let S=g.relatedTarget;S instanceof HTMLElement&&S.dataset.headlessuiFocusGuard!=="true"&&(Ln(x,S)||(p.current?Ge(t.current,ae(m.current,{[et.Forwards]:()=>Ie.Next,[et.Backwards]:()=>Ie.Previous})|Ie.WrapAround,{relativeTo:g.target}):g.target instanceof HTMLElement&&$e(g.target)))}};return a.createElement(a.Fragment,null,!!(l&4)&&a.createElement(Ke,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:ze.Focusable}),le({ourProps:v,theirProps:s,defaultTag:_o,name:"FocusTrap"}),!!(l&4)&&a.createElement(Ke,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:ze.Focusable}))}let Bo=se(Ro),tt=Object.assign(Bo,{features:Dn});function zo(e=!0){let n=a.useRef(Te.slice());return Ze(([t],[r])=>{r===!0&&t===!1&&it(()=>{n.current.splice(0)}),r===!1&&t===!0&&(n.current=Te.slice())},[e,Te,n]),j(()=>{var t;return(t=n.current.find(r=>r!=null&&r.isConnected))!=null?t:null})}function Wo({ownerDocument:e},n){let t=zo(n);Ze(()=>{n||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&$e(t())},[n]),Mn(()=>{n&&$e(t())})}function Ho({ownerDocument:e,container:n,initialFocus:t},r){let o=a.useRef(null),i=Xe();return Ze(()=>{if(!r)return;let l=n.current;l&&it(()=>{if(!i.current)return;let s=e==null?void 0:e.activeElement;if(t!=null&&t.current){if((t==null?void 0:t.current)===s){o.current=s;return}}else if(l.contains(s)){o.current=s;return}t!=null&&t.current?$e(t.current):Ge(l,Ie.First)===gn.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),o.current=e==null?void 0:e.activeElement})},[r]),o}function Uo({ownerDocument:e,container:n,containers:t,previousActiveElement:r},o){let i=Xe();kn(e==null?void 0:e.defaultView,"focus",l=>{if(!o||!i.current)return;let s=An(t);n.current instanceof HTMLElement&&s.add(n.current);let u=r.current;if(!u)return;let c=l.target;c&&c instanceof HTMLElement?Ln(s,c)?(r.current=c,$e(c)):(l.preventDefault(),l.stopPropagation(),$e(u)):$e(r.current)},!0)}function Ln(e,n){for(let t of e)if(t.contains(n))return!0;return!1}let _n=a.createContext(!1);function Vo(){return a.useContext(_n)}function Ht(e){return a.createElement(_n.Provider,{value:e.force},e.children)}function Yo(e){let n=Vo(),t=a.useContext(Rn),r=De(e),[o,i]=a.useState(()=>{if(!n&&t!==null||Oe.isServer)return null;let l=r==null?void 0:r.getElementById("headlessui-portal-root");if(l)return l;if(r===null)return null;let s=r.createElement("div");return s.setAttribute("id","headlessui-portal-root"),r.body.appendChild(s)});return a.useEffect(()=>{o!==null&&(r!=null&&r.body.contains(o)||r==null||r.body.appendChild(o))},[o,r]),a.useEffect(()=>{n||t!==null&&i(t.current)},[t,i,n]),o}let qo=a.Fragment;function Go(e,n){let t=e,r=a.useRef(null),o=ue(no(m=>{r.current=m}),n),i=De(r),l=Yo(r),[s]=a.useState(()=>{var m;return Oe.isServer?null:(m=i==null?void 0:i.createElement("div"))!=null?m:null}),u=a.useContext(Ut),c=Be();return ee(()=>{!l||!s||l.contains(s)||(s.setAttribute("data-headlessui-portal",""),l.appendChild(s))},[l,s]),ee(()=>{if(s&&u)return u.register(s)},[u,s]),Mn(()=>{var m;!l||!s||(s instanceof Node&&l.contains(s)&&l.removeChild(s),l.childNodes.length<=0&&((m=l.parentElement)==null||m.removeChild(l)))}),c?!l||!s?null:un.createPortal(le({ourProps:{ref:o},theirProps:t,defaultTag:qo,name:"Portal"}),s):null}let Zo=a.Fragment,Rn=a.createContext(null);function Ko(e,n){let{target:t,...r}=e,o={ref:ue(n)};return a.createElement(Rn.Provider,{value:t},le({ourProps:o,theirProps:r,defaultTag:Zo,name:"Popover.Group"}))}let Ut=a.createContext(null);function Jo(){let e=a.useContext(Ut),n=a.useRef([]),t=j(i=>(n.current.push(i),e&&e.register(i),()=>r(i))),r=j(i=>{let l=n.current.indexOf(i);l!==-1&&n.current.splice(l,1),e&&e.unregister(i)}),o=a.useMemo(()=>({register:t,unregister:r,portals:n}),[t,r,n]);return[n,a.useMemo(()=>function({children:i}){return a.createElement(Ut.Provider,{value:o},i)},[o])]}let Qo=se(Go),Xo=se(Ko),Vt=Object.assign(Qo,{Group:Xo});function ei(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}const ti=typeof Object.is=="function"?Object.is:ei,{useState:ni,useEffect:ri,useLayoutEffect:oi,useDebugValue:ii}=E;function li(e,n,t){const r=n(),[{inst:o},i]=ni({inst:{value:r,getSnapshot:n}});return oi(()=>{o.value=r,o.getSnapshot=n,Yt(o)&&i({inst:o})},[e,r,n]),ri(()=>(Yt(o)&&i({inst:o}),e(()=>{Yt(o)&&i({inst:o})})),[e]),ii(r),r}function Yt(e){const n=e.getSnapshot,t=e.value;try{const r=n();return!ti(t,r)}catch{return!0}}function si(e,n,t){return n()}const ai=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ui=!ai,ci=ui?si:li,di="useSyncExternalStore"in E?(e=>e.useSyncExternalStore)(E):ci;function fi(e){return di(e.subscribe,e.getSnapshot,e.getSnapshot)}function mi(e,n){let t=e(),r=new Set;return{getSnapshot(){return t},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...i){let l=n[o].call(t,...i);l&&(t=l,r.forEach(s=>s()))}}}function pi(){let e;return{before({doc:n}){var t;let r=n.documentElement;e=((t=n.defaultView)!=null?t:window).innerWidth-r.clientWidth},after({doc:n,d:t}){let r=n.documentElement,o=r.clientWidth-r.offsetWidth,i=e-o;t.style(r,"paddingRight",`${i}px`)}}}function hi(){return wn()?{before({doc:e,d:n,meta:t}){function r(o){return t.containers.flatMap(i=>i()).some(i=>i.contains(o))}n.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let s=ye();s.style(e.documentElement,"scrollBehavior","auto"),n.add(()=>n.microTask(()=>s.dispose()))}let i=(o=window.scrollY)!=null?o:window.pageYOffset,l=null;n.addEventListener(e,"click",s=>{if(s.target instanceof HTMLElement)try{let u=s.target.closest("a");if(!u)return;let{hash:c}=new URL(u.href),m=e.querySelector(c);m&&!r(m)&&(l=m)}catch{}},!0),n.addEventListener(e,"touchstart",s=>{if(s.target instanceof HTMLElement)if(r(s.target)){let u=s.target;for(;u.parentElement&&r(u.parentElement);)u=u.parentElement;n.style(u,"overscrollBehavior","contain")}else n.style(s.target,"touchAction","none")}),n.addEventListener(e,"touchmove",s=>{if(s.target instanceof HTMLElement)if(r(s.target)){let u=s.target;for(;u.parentElement&&u.dataset.headlessuiPortal!==""&&!(u.scrollHeight>u.clientHeight||u.scrollWidth>u.clientWidth);)u=u.parentElement;u.dataset.headlessuiPortal===""&&s.preventDefault()}else s.preventDefault()},{passive:!1}),n.add(()=>{var s;let u=(s=window.scrollY)!=null?s:window.pageYOffset;i!==u&&window.scrollTo(0,i),l&&l.isConnected&&(l.scrollIntoView({block:"nearest"}),l=null)})})}}:{}}function vi(){return{before({doc:e,d:n}){n.style(e.documentElement,"overflow","hidden")}}}function gi(e){let n={};for(let t of e)Object.assign(n,t(n));return n}let _e=mi(()=>new Map,{PUSH(e,n){var t;let r=(t=this.get(e))!=null?t:{doc:e,count:0,d:ye(),meta:new Set};return r.count++,r.meta.add(n),this.set(e,r),this},POP(e,n){let t=this.get(e);return t&&(t.count--,t.meta.delete(n)),this},SCROLL_PREVENT({doc:e,d:n,meta:t}){let r={doc:e,d:n,meta:gi(t)},o=[hi(),pi(),vi()];o.forEach(({before:i})=>i==null?void 0:i(r)),o.forEach(({after:i})=>i==null?void 0:i(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});_e.subscribe(()=>{let e=_e.getSnapshot(),n=new Map;for(let[t]of e)n.set(t,t.documentElement.style.overflow);for(let t of e.values()){let r=n.get(t.doc)==="hidden",o=t.count!==0;(o&&!r||!o&&r)&&_e.dispatch(t.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",t),t.count===0&&_e.dispatch("TEARDOWN",t)}});function bi(e,n,t){let r=fi(_e),o=e?r.get(e):void 0,i=o?o.count>0:!1;return ee(()=>{if(!(!e||!n))return _e.dispatch("PUSH",e,t),()=>_e.dispatch("POP",e,t)},[n,e]),i}let qt=new Map,nt=new Map;function Bn(e,n=!0){ee(()=>{var t;if(!n)return;let r=typeof e=="function"?e():e.current;if(!r)return;function o(){var l;if(!r)return;let s=(l=nt.get(r))!=null?l:1;if(s===1?nt.delete(r):nt.set(r,s-1),s!==1)return;let u=qt.get(r);u&&(u["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",u["aria-hidden"]),r.inert=u.inert,qt.delete(r))}let i=(t=nt.get(r))!=null?t:0;return nt.set(r,i+1),i!==0||(qt.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0),o},[e,n])}function xi({defaultContainers:e=[],portals:n,mainTreeNodeRef:t}={}){var r;let o=a.useRef((r=t==null?void 0:t.current)!=null?r:null),i=De(o),l=j(()=>{var s,u,c;let m=[];for(let h of e)h!==null&&(h instanceof HTMLElement?m.push(h):"current"in h&&h.current instanceof HTMLElement&&m.push(h.current));if(n!=null&&n.current)for(let h of n.current)m.push(h);for(let h of(s=i==null?void 0:i.querySelectorAll("html > *, body > *"))!=null?s:[])h!==document.body&&h!==document.head&&h instanceof HTMLElement&&h.id!=="headlessui-portal-root"&&(h.contains(o.current)||h.contains((c=(u=o.current)==null?void 0:u.getRootNode())==null?void 0:c.host)||m.some(b=>h.contains(b))||m.push(h));return m});return{resolveContainers:l,contains:j(s=>l().some(u=>u.contains(s))),mainTreeNodeRef:o,MainTreeNode:a.useMemo(()=>function(){return t!=null?null:a.createElement(Ke,{features:ze.Hidden,ref:o})},[o,t])}}let Gt=a.createContext(()=>{});Gt.displayName="StackContext";var Zt=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Zt||{});function wi(){return a.useContext(Gt)}function yi({children:e,onUpdate:n,type:t,element:r,enabled:o}){let i=wi(),l=j((...s)=>{n==null||n(...s),i(...s)});return ee(()=>{let s=o===void 0||o===!0;return s&&l(0,t,r),()=>{s&&l(1,t,r)}},[l,t,r,o]),a.createElement(Gt.Provider,{value:l},e)}let zn=a.createContext(null);function Wn(){let e=a.useContext(zn);if(e===null){let n=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(n,Wn),n}return e}function Hn(){let[e,n]=a.useState([]);return[e.length>0?e.join(" "):void 0,a.useMemo(()=>function(t){let r=j(i=>(n(l=>[...l,i]),()=>n(l=>{let s=l.slice(),u=s.indexOf(i);return u!==-1&&s.splice(u,1),s}))),o=a.useMemo(()=>({register:r,slot:t.slot,name:t.name,props:t.props}),[r,t.slot,t.name,t.props]);return a.createElement(zn.Provider,{value:o},t.children)},[n])]}let Ei="p";function Si(e,n){let t=ve(),{id:r=`headlessui-description-${t}`,...o}=e,i=Wn(),l=ue(n);ee(()=>i.register(r),[r,i.register]);let s={ref:l,...i.props,id:r};return le({ourProps:s,theirProps:o,slot:i.slot||{},defaultTag:Ei,name:i.name||"Description"})}let Ci=se(Si),Un=Object.assign(Ci,{});var Ti=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Ti||{}),Oi=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(Oi||{});let ji={0(e,n){return e.titleId===n.id?e:{...e,titleId:n.id}}},ft=a.createContext(null);ft.displayName="DialogContext";function rt(e){let n=a.useContext(ft);if(n===null){let t=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,rt),t}return n}function Ii(e,n,t=()=>[document.body]){bi(e,n,r=>{var o;return{containers:[...(o=r.containers)!=null?o:[],t]}})}function Ni(e,n){return ae(n.type,ji,e,n)}let Fi="div",$i=Pe.RenderStrategy|Pe.Static;function Pi(e,n){let t=ve(),{id:r=`headlessui-dialog-${t}`,open:o,onClose:i,initialFocus:l,role:s="dialog",__demoMode:u=!1,...c}=e,[m,h]=a.useState(0),b=a.useRef(!1);s=function(){return s==="dialog"||s==="alertdialog"?s:(b.current||(b.current=!0,console.warn(`Invalid role [${s}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let p=Je();o===void 0&&p!==null&&(o=(p&ce.Open)===ce.Open);let v=a.useRef(null),g=ue(v,n),x=De(v),S=e.hasOwnProperty("open")||p!==null,y=e.hasOwnProperty("onClose");if(!S&&!y)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!S)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!y)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof o!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${o}`);if(typeof i!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${i}`);let T=o?0:1,[I,N]=a.useReducer(Ni,{titleId:null,descriptionId:null,panelRef:a.createRef()}),k=j(()=>i(!1)),_=j(H=>N({type:0,id:H})),q=Be()?u?!1:T===0:!1,M=m>1,$=a.useContext(ft)!==null,[R,J]=Jo(),z={get current(){var H;return(H=I.panelRef.current)!=null?H:v.current}},{resolveContainers:B,mainTreeNodeRef:w,MainTreeNode:G}=xi({portals:R,defaultContainers:[z]}),W=M?"parent":"leaf",ie=p!==null?(p&ce.Closing)===ce.Closing:!1,Q=$||ie?!1:q,ne=a.useCallback(()=>{var H,pe;return(pe=Array.from((H=x==null?void 0:x.querySelectorAll("body > *"))!=null?H:[]).find(he=>he.id==="headlessui-portal-root"?!1:he.contains(w.current)&&he instanceof HTMLElement))!=null?pe:null},[w]);Bn(ne,Q);let me=M?!0:q,ge=a.useCallback(()=>{var H,pe;return(pe=Array.from((H=x==null?void 0:x.querySelectorAll("[data-headlessui-portal]"))!=null?H:[]).find(he=>he.contains(w.current)&&he instanceof HTMLElement))!=null?pe:null},[w]);Bn(ge,me),Mt(B,H=>{H.preventDefault(),k()},!(!q||M));let be=!(M||T!==0);kn(x==null?void 0:x.defaultView,"keydown",H=>{be&&(H.defaultPrevented||H.key===Z.Escape&&(H.preventDefault(),H.stopPropagation(),k()))}),Ii(x,!(ie||T!==0||$),B),a.useEffect(()=>{if(T!==0||!v.current)return;let H=new ResizeObserver(pe=>{for(let he of pe){let We=he.target.getBoundingClientRect();We.x===0&&We.y===0&&We.width===0&&We.height===0&&k()}});return H.observe(v.current),()=>H.disconnect()},[T,v,k]);let[K,re]=Hn(),we=a.useMemo(()=>[{dialogState:T,close:k,setTitleId:_},I],[T,I,k,_]),A=a.useMemo(()=>({open:T===0}),[T]),V={ref:g,id:r,role:s,"aria-modal":T===0?!0:void 0,"aria-labelledby":I.titleId,"aria-describedby":K};return a.createElement(yi,{type:"Dialog",enabled:T===0,element:v,onUpdate:j((H,pe)=>{pe==="Dialog"&&ae(H,{[Zt.Add]:()=>h(he=>he+1),[Zt.Remove]:()=>h(he=>he-1)})})},a.createElement(Ht,{force:!0},a.createElement(Vt,null,a.createElement(ft.Provider,{value:we},a.createElement(Vt.Group,{target:v},a.createElement(Ht,{force:!1},a.createElement(re,{slot:A,name:"Dialog.Description"},a.createElement(tt,{initialFocus:l,containers:B,features:q?ae(W,{parent:tt.features.RestoreFocus,leaf:tt.features.All&~tt.features.FocusLock}):tt.features.None},a.createElement(J,null,le({ourProps:V,theirProps:c,slot:A,defaultTag:Fi,features:$i,visible:T===0,name:"Dialog"}))))))))),a.createElement(G,null))}let ki="div";function Mi(e,n){let t=ve(),{id:r=`headlessui-dialog-overlay-${t}`,...o}=e,[{dialogState:i,close:l}]=rt("Dialog.Overlay"),s=ue(n),u=j(m=>{if(m.target===m.currentTarget){if(dt(m.currentTarget))return m.preventDefault();m.preventDefault(),m.stopPropagation(),l()}}),c=a.useMemo(()=>({open:i===0}),[i]);return le({ourProps:{ref:s,id:r,"aria-hidden":!0,onClick:u},theirProps:o,slot:c,defaultTag:ki,name:"Dialog.Overlay"})}let Ai="div";function Di(e,n){let t=ve(),{id:r=`headlessui-dialog-backdrop-${t}`,...o}=e,[{dialogState:i},l]=rt("Dialog.Backdrop"),s=ue(n);a.useEffect(()=>{if(l.panelRef.current===null)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")},[l.panelRef]);let u=a.useMemo(()=>({open:i===0}),[i]);return a.createElement(Ht,{force:!0},a.createElement(Vt,null,le({ourProps:{ref:s,id:r,"aria-hidden":!0},theirProps:o,slot:u,defaultTag:Ai,name:"Dialog.Backdrop"})))}let Li="div";function _i(e,n){let t=ve(),{id:r=`headlessui-dialog-panel-${t}`,...o}=e,[{dialogState:i},l]=rt("Dialog.Panel"),s=ue(n,l.panelRef),u=a.useMemo(()=>({open:i===0}),[i]),c=j(m=>{m.stopPropagation()});return le({ourProps:{ref:s,id:r,onClick:c},theirProps:o,slot:u,defaultTag:Li,name:"Dialog.Panel"})}let Ri="h2";function Bi(e,n){let t=ve(),{id:r=`headlessui-dialog-title-${t}`,...o}=e,[{dialogState:i,setTitleId:l}]=rt("Dialog.Title"),s=ue(n);a.useEffect(()=>(l(r),()=>l(null)),[r,l]);let u=a.useMemo(()=>({open:i===0}),[i]);return le({ourProps:{ref:s,id:r},theirProps:o,slot:u,defaultTag:Ri,name:"Dialog.Title"})}let zi=se(Pi),Wi=se(Di),Hi=se(_i),Ui=se(Mi),Vi=se(Bi),Vn=Object.assign(zi,{Backdrop:Wi,Panel:Hi,Overlay:Ui,Title:Vi,Description:Un}),Yn=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function qn(e){var n,t;let r=(n=e.innerText)!=null?n:"",o=e.cloneNode(!0);if(!(o instanceof HTMLElement))return r;let i=!1;for(let s of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))s.remove(),i=!0;let l=i?(t=o.innerText)!=null?t:"":r;return Yn.test(l)&&(l=l.replace(Yn,"")),l}function Yi(e){let n=e.getAttribute("aria-label");if(typeof n=="string")return n.trim();let t=e.getAttribute("aria-labelledby");if(t){let r=t.split(" ").map(o=>{let i=document.getElementById(o);if(i){let l=i.getAttribute("aria-label");return typeof l=="string"?l.trim():qn(i).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return qn(e).trim()}function qi(e){let n=a.useRef(""),t=a.useRef("");return j(()=>{let r=e.current;if(!r)return"";let o=r.innerText;if(n.current===o)return t.current;let i=Yi(r).trim().toLowerCase();return n.current=o,t.current=i,i})}var Gi=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Gi||{}),Zi=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Zi||{}),Ki=(e=>(e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItem=5]="RegisterItem",e[e.UnregisterItem=6]="UnregisterItem",e))(Ki||{});function Kt(e,n=t=>t){let t=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,r=kt(n(e.items.slice()),i=>i.dataRef.current.domRef.current),o=t?r.indexOf(t):null;return o===-1&&(o=null),{items:r,activeItemIndex:o}}let Ji={1(e){return e.menuState===1?e:{...e,activeItemIndex:null,menuState:1}},0(e){return e.menuState===0?e:{...e,__demoMode:!1,menuState:0}},2:(e,n)=>{var t;let r=Kt(e),o=Rt(n,{resolveItems:()=>r.items,resolveActiveIndex:()=>r.activeItemIndex,resolveId:i=>i.id,resolveDisabled:i=>i.dataRef.current.disabled});return{...e,...r,searchQuery:"",activeItemIndex:o,activationTrigger:(t=n.trigger)!=null?t:1}},3:(e,n)=>{let t=e.searchQuery!==""?0:1,r=e.searchQuery+n.value.toLowerCase(),o=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+t).concat(e.items.slice(0,e.activeItemIndex+t)):e.items).find(l=>{var s;return((s=l.dataRef.current.textValue)==null?void 0:s.startsWith(r))&&!l.dataRef.current.disabled}),i=o?e.items.indexOf(o):-1;return i===-1||i===e.activeItemIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeItemIndex:i,activationTrigger:1}},4(e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},5:(e,n)=>{let t=Kt(e,r=>[...r,{id:n.id,dataRef:n.dataRef}]);return{...e,...t}},6:(e,n)=>{let t=Kt(e,r=>{let o=r.findIndex(i=>i.id===n.id);return o!==-1&&r.splice(o,1),r});return{...e,...t,activationTrigger:1}}},Jt=a.createContext(null);Jt.displayName="MenuContext";function mt(e){let n=a.useContext(Jt);if(n===null){let t=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,mt),t}return n}function Qi(e,n){return ae(n.type,Ji,e,n)}let Xi=a.Fragment;function el(e,n){let{__demoMode:t=!1,...r}=e,o=a.useReducer(Qi,{__demoMode:t,menuState:t?0:1,buttonRef:a.createRef(),itemsRef:a.createRef(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:i,itemsRef:l,buttonRef:s},u]=o,c=ue(n);Mt([s,l],(p,v)=>{var g;u({type:1}),Pt(v,$t.Loose)||(p.preventDefault(),(g=s.current)==null||g.focus())},i===0);let m=j(()=>{u({type:1})}),h=a.useMemo(()=>({open:i===0,close:m}),[i,m]),b={ref:c};return a.createElement(Jt.Provider,{value:o},a.createElement(_t,{value:ae(i,{0:ce.Open,1:ce.Closed})},le({ourProps:b,theirProps:r,slot:h,defaultTag:Xi,name:"Menu"})))}let tl="button";function nl(e,n){var t;let r=ve(),{id:o=`headlessui-menu-button-${r}`,...i}=e,[l,s]=mt("Menu.Button"),u=ue(l.buttonRef,n),c=je(),m=j(g=>{switch(g.key){case Z.Space:case Z.Enter:case Z.ArrowDown:g.preventDefault(),g.stopPropagation(),s({type:0}),c.nextFrame(()=>s({type:2,focus:te.First}));break;case Z.ArrowUp:g.preventDefault(),g.stopPropagation(),s({type:0}),c.nextFrame(()=>s({type:2,focus:te.Last}));break}}),h=j(g=>{switch(g.key){case Z.Space:g.preventDefault();break}}),b=j(g=>{if(dt(g.currentTarget))return g.preventDefault();e.disabled||(l.menuState===0?(s({type:1}),c.nextFrame(()=>{var x;return(x=l.buttonRef.current)==null?void 0:x.focus({preventScroll:!0})})):(g.preventDefault(),s({type:0})))}),p=a.useMemo(()=>({open:l.menuState===0}),[l]),v={ref:u,id:o,type:At(e,l.buttonRef),"aria-haspopup":"menu","aria-controls":(t=l.itemsRef.current)==null?void 0:t.id,"aria-expanded":l.menuState===0,onKeyDown:m,onKeyUp:h,onClick:b};return le({ourProps:v,theirProps:i,slot:p,defaultTag:tl,name:"Menu.Button"})}let rl="div",ol=Pe.RenderStrategy|Pe.Static;function il(e,n){var t,r;let o=ve(),{id:i=`headlessui-menu-items-${o}`,...l}=e,[s,u]=mt("Menu.Items"),c=ue(s.itemsRef,n),m=De(s.itemsRef),h=je(),b=Je(),p=b!==null?(b&ce.Open)===ce.Open:s.menuState===0;a.useEffect(()=>{let y=s.itemsRef.current;y&&s.menuState===0&&y!==(m==null?void 0:m.activeElement)&&y.focus({preventScroll:!0})},[s.menuState,s.itemsRef,m]),jn({container:s.itemsRef.current,enabled:s.menuState===0,accept(y){return y.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:y.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(y){y.setAttribute("role","none")}});let v=j(y=>{var T,I;switch(h.dispose(),y.key){case Z.Space:if(s.searchQuery!=="")return y.preventDefault(),y.stopPropagation(),u({type:3,value:y.key});case Z.Enter:if(y.preventDefault(),y.stopPropagation(),u({type:1}),s.activeItemIndex!==null){let{dataRef:N}=s.items[s.activeItemIndex];(I=(T=N.current)==null?void 0:T.domRef.current)==null||I.click()}xn(s.buttonRef.current);break;case Z.ArrowDown:return y.preventDefault(),y.stopPropagation(),u({type:2,focus:te.Next});case Z.ArrowUp:return y.preventDefault(),y.stopPropagation(),u({type:2,focus:te.Previous});case Z.Home:case Z.PageUp:return y.preventDefault(),y.stopPropagation(),u({type:2,focus:te.First});case Z.End:case Z.PageDown:return y.preventDefault(),y.stopPropagation(),u({type:2,focus:te.Last});case Z.Escape:y.preventDefault(),y.stopPropagation(),u({type:1}),ye().nextFrame(()=>{var N;return(N=s.buttonRef.current)==null?void 0:N.focus({preventScroll:!0})});break;case Z.Tab:y.preventDefault(),y.stopPropagation(),u({type:1}),ye().nextFrame(()=>{eo(s.buttonRef.current,y.shiftKey?Ie.Previous:Ie.Next)});break;default:y.key.length===1&&(u({type:3,value:y.key}),h.setTimeout(()=>u({type:4}),350));break}}),g=j(y=>{switch(y.key){case Z.Space:y.preventDefault();break}}),x=a.useMemo(()=>({open:s.menuState===0}),[s]),S={"aria-activedescendant":s.activeItemIndex===null||(t=s.items[s.activeItemIndex])==null?void 0:t.id,"aria-labelledby":(r=s.buttonRef.current)==null?void 0:r.id,id:i,onKeyDown:v,onKeyUp:g,role:"menu",tabIndex:0,ref:c};return le({ourProps:S,theirProps:l,slot:x,defaultTag:rl,features:ol,visible:p,name:"Menu.Items"})}let ll=a.Fragment;function sl(e,n){let t=ve(),{id:r=`headlessui-menu-item-${t}`,disabled:o=!1,...i}=e,[l,s]=mt("Menu.Item"),u=l.activeItemIndex!==null?l.items[l.activeItemIndex].id===r:!1,c=a.useRef(null),m=ue(n,c);ee(()=>{if(l.__demoMode||l.menuState!==0||!u||l.activationTrigger===0)return;let N=ye();return N.requestAnimationFrame(()=>{var k,_;(_=(k=c.current)==null?void 0:k.scrollIntoView)==null||_.call(k,{block:"nearest"})}),N.dispose},[l.__demoMode,c,u,l.menuState,l.activationTrigger,l.activeItemIndex]);let h=qi(c),b=a.useRef({disabled:o,domRef:c,get textValue(){return h()}});ee(()=>{b.current.disabled=o},[b,o]),ee(()=>(s({type:5,id:r,dataRef:b}),()=>s({type:6,id:r})),[b,r]);let p=j(()=>{s({type:1})}),v=j(N=>{if(o)return N.preventDefault();s({type:1}),xn(l.buttonRef.current)}),g=j(()=>{if(o)return s({type:2,focus:te.Nothing});s({type:2,focus:te.Specific,id:r})}),x=On(),S=j(N=>x.update(N)),y=j(N=>{x.wasMoved(N)&&(o||u||s({type:2,focus:te.Specific,id:r,trigger:0}))}),T=j(N=>{x.wasMoved(N)&&(o||u&&s({type:2,focus:te.Nothing}))}),I=a.useMemo(()=>({active:u,disabled:o,close:p}),[u,o,p]);return le({ourProps:{id:r,ref:m,role:"menuitem",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,disabled:void 0,onClick:v,onFocus:g,onPointerEnter:S,onMouseEnter:S,onPointerMove:y,onMouseMove:y,onPointerLeave:T,onMouseLeave:T},theirProps:i,slot:I,defaultTag:ll,name:"Menu.Item"})}let al=se(el),ul=se(nl),cl=se(il),dl=se(sl),pt=Object.assign(al,{Button:ul,Items:cl,Item:dl}),Gn=a.createContext(null);function Zn(){let e=a.useContext(Gn);if(e===null){let n=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(n,Zn),n}return e}function fl(){let[e,n]=a.useState([]);return[e.length>0?e.join(" "):void 0,a.useMemo(()=>function(t){let r=j(i=>(n(l=>[...l,i]),()=>n(l=>{let s=l.slice(),u=s.indexOf(i);return u!==-1&&s.splice(u,1),s}))),o=a.useMemo(()=>({register:r,slot:t.slot,name:t.name,props:t.props}),[r,t.slot,t.name,t.props]);return a.createElement(Gn.Provider,{value:o},t.children)},[n])]}let ml="label";function pl(e,n){let t=ve(),{id:r=`headlessui-label-${t}`,passive:o=!1,...i}=e,l=Zn(),s=ue(n);ee(()=>l.register(r),[r,l.register]);let u={ref:s,...l.props,id:r};return o&&("onClick"in u&&(delete u.htmlFor,delete u.onClick),"onClick"in i&&delete i.onClick),le({ourProps:u,theirProps:i,slot:l.slot||{},defaultTag:ml,name:l.name||"Label"})}let hl=se(pl),vl=Object.assign(hl,{});function gl(e=0){let[n,t]=a.useState(e),r=Xe(),o=a.useCallback(u=>{r.current&&t(c=>c|u)},[n,r]),i=a.useCallback(u=>!!(n&u),[n]),l=a.useCallback(u=>{r.current&&t(c=>c&~u)},[t,r]),s=a.useCallback(u=>{r.current&&t(c=>c^u)},[t]);return{flags:n,addFlag:o,hasFlag:i,removeFlag:l,toggleFlag:s}}let Qt=a.createContext(null);Qt.displayName="GroupContext";let bl=a.Fragment;function xl(e){var n;let[t,r]=a.useState(null),[o,i]=fl(),[l,s]=Hn(),u=a.useMemo(()=>({switch:t,setSwitch:r,labelledby:o,describedby:l}),[t,r,o,l]),c={},m=e;return a.createElement(s,{name:"Switch.Description"},a.createElement(i,{name:"Switch.Label",props:{htmlFor:(n=u.switch)==null?void 0:n.id,onClick(h){t&&(h.currentTarget.tagName==="LABEL"&&h.preventDefault(),t.click(),t.focus({preventScroll:!0}))}}},a.createElement(Qt.Provider,{value:u},le({ourProps:c,theirProps:m,defaultTag:bl,name:"Switch.Group"}))))}let wl="button";function yl(e,n){var t;let r=ve(),{id:o=`headlessui-switch-${r}`,checked:i,defaultChecked:l=!1,onChange:s,disabled:u=!1,name:c,value:m,form:h,...b}=e,p=a.useContext(Qt),v=a.useRef(null),g=ue(v,n,p===null?null:p.setSwitch),[x,S]=hn(i,s,l),y=j(()=>S==null?void 0:S(!x)),T=j(M=>{if(dt(M.currentTarget))return M.preventDefault();M.preventDefault(),y()}),I=j(M=>{M.key===Z.Space?(M.preventDefault(),y()):M.key===Z.Enter&&uo(M.currentTarget)}),N=j(M=>M.preventDefault()),k=a.useMemo(()=>({checked:x}),[x]),_={id:o,ref:g,role:"switch",type:At(e,v),tabIndex:e.tabIndex===-1?0:(t=e.tabIndex)!=null?t:0,"aria-checked":x,"aria-labelledby":p==null?void 0:p.labelledby,"aria-describedby":p==null?void 0:p.describedby,disabled:u,onClick:T,onKeyUp:I,onKeyPress:N},q=je();return a.useEffect(()=>{var M;let $=(M=v.current)==null?void 0:M.closest("form");$&&l!==void 0&&q.addEventListener($,"reset",()=>{S(l)})},[v,S]),a.createElement(a.Fragment,null,c!=null&&x&&a.createElement(Ke,{features:ze.Hidden,...ct({as:"input",type:"checkbox",hidden:!0,readOnly:!0,disabled:u,form:h,checked:x,name:c,value:m})}),le({ourProps:_,theirProps:b,slot:k,defaultTag:wl,name:"Switch"}))}let El=se(yl),Sl=xl,Cl=Object.assign(El,{Group:Sl,Label:vl,Description:Un});function Tl(e){let n={called:!1};return(...t)=>{if(!n.called)return n.called=!0,e(...t)}}function Xt(e,...n){e&&n.length>0&&e.classList.add(...n)}function en(e,...n){e&&n.length>0&&e.classList.remove(...n)}function Ol(e,n){let t=ye();if(!e)return t.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[i,l]=[r,o].map(u=>{let[c=0]=u.split(",").filter(Boolean).map(m=>m.includes("ms")?parseFloat(m):parseFloat(m)*1e3).sort((m,h)=>h-m);return c}),s=i+l;if(s!==0){t.group(c=>{c.setTimeout(()=>{n(),c.dispose()},s),c.addEventListener(e,"transitionrun",m=>{m.target===m.currentTarget&&c.dispose()})});let u=t.addEventListener(e,"transitionend",c=>{c.target===c.currentTarget&&(n(),u())})}else n();return t.add(()=>n()),t.dispose}function jl(e,n,t,r){let o=t?"enter":"leave",i=ye(),l=r!==void 0?Tl(r):()=>{};o==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let s=ae(o,{enter:()=>n.enter,leave:()=>n.leave}),u=ae(o,{enter:()=>n.enterTo,leave:()=>n.leaveTo}),c=ae(o,{enter:()=>n.enterFrom,leave:()=>n.leaveFrom});return en(e,...n.base,...n.enter,...n.enterTo,...n.enterFrom,...n.leave,...n.leaveFrom,...n.leaveTo,...n.entered),Xt(e,...n.base,...s,...c),i.nextFrame(()=>{en(e,...n.base,...s,...c),Xt(e,...n.base,...s,...u),Ol(e,()=>(en(e,...n.base,...s),Xt(e,...n.base,...n.entered),l()))}),i.dispose}function Il({immediate:e,container:n,direction:t,classes:r,onStart:o,onStop:i}){let l=Xe(),s=je(),u=Se(t);ee(()=>{e&&(u.current="enter")},[e]),ee(()=>{let c=ye();s.add(c.dispose);let m=n.current;if(m&&u.current!=="idle"&&l.current)return c.dispose(),o.current(u.current),c.add(jl(m,r.current,u.current==="enter",()=>{c.dispose(),i.current(u.current)})),c.dispose},[t])}function Me(e=""){return e.split(/\s+/).filter(n=>n.length>1)}let ht=a.createContext(null);ht.displayName="TransitionContext";var Nl=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Nl||{});function Fl(){let e=a.useContext(ht);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function $l(){let e=a.useContext(vt);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let vt=a.createContext(null);vt.displayName="NestingContext";function gt(e){return"children"in e?gt(e.children):e.current.filter(({el:n})=>n.current!==null).filter(({state:n})=>n==="visible").length>0}function Kn(e,n){let t=Se(e),r=a.useRef([]),o=Xe(),i=je(),l=j((p,v=ke.Hidden)=>{let g=r.current.findIndex(({el:x})=>x===p);g!==-1&&(ae(v,{[ke.Unmount](){r.current.splice(g,1)},[ke.Hidden](){r.current[g].state="hidden"}}),i.microTask(()=>{var x;!gt(r)&&o.current&&((x=t.current)==null||x.call(t))}))}),s=j(p=>{let v=r.current.find(({el:g})=>g===p);return v?v.state!=="visible"&&(v.state="visible"):r.current.push({el:p,state:"visible"}),()=>l(p,ke.Unmount)}),u=a.useRef([]),c=a.useRef(Promise.resolve()),m=a.useRef({enter:[],leave:[],idle:[]}),h=j((p,v,g)=>{u.current.splice(0),n&&(n.chains.current[v]=n.chains.current[v].filter(([x])=>x!==p)),n==null||n.chains.current[v].push([p,new Promise(x=>{u.current.push(x)})]),n==null||n.chains.current[v].push([p,new Promise(x=>{Promise.all(m.current[v].map(([S,y])=>y)).then(()=>x())})]),v==="enter"?c.current=c.current.then(()=>n==null?void 0:n.wait.current).then(()=>g(v)):g(v)}),b=j((p,v,g)=>{Promise.all(m.current[v].splice(0).map(([x,S])=>S)).then(()=>{var x;(x=u.current.shift())==null||x()}).then(()=>g(v))});return a.useMemo(()=>({children:r,register:s,unregister:l,onStart:h,onStop:b,wait:c,chains:m}),[s,l,r,h,b,m,c])}function Pl(){}let kl=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Jn(e){var n;let t={};for(let r of kl)t[r]=(n=e[r])!=null?n:Pl;return t}function Ml(e){let n=a.useRef(Jn(e));return a.useEffect(()=>{n.current=Jn(e)},[e]),n}let Al="div",Qn=Pe.RenderStrategy;function Dl(e,n){var t,r;let{beforeEnter:o,afterEnter:i,beforeLeave:l,afterLeave:s,enter:u,enterFrom:c,enterTo:m,entered:h,leave:b,leaveFrom:p,leaveTo:v,...g}=e,x=a.useRef(null),S=ue(x,n),y=(t=g.unmount)==null||t?ke.Unmount:ke.Hidden,{show:T,appear:I,initial:N}=Fl(),[k,_]=a.useState(T?"visible":"hidden"),q=$l(),{register:M,unregister:$}=q;a.useEffect(()=>M(x),[M,x]),a.useEffect(()=>{if(y===ke.Hidden&&x.current){if(T&&k!=="visible"){_("visible");return}return ae(k,{hidden:()=>$(x),visible:()=>M(x)})}},[k,x,M,$,T,y]);let R=Se({base:Me(g.className),enter:Me(u),enterFrom:Me(c),enterTo:Me(m),entered:Me(h),leave:Me(b),leaveFrom:Me(p),leaveTo:Me(v)}),J=Ml({beforeEnter:o,afterEnter:i,beforeLeave:l,afterLeave:s}),z=Be();a.useEffect(()=>{if(z&&k==="visible"&&x.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[x,k,z]);let B=N&&!I,w=I&&T&&N,G=!z||B?"idle":T?"enter":"leave",W=gl(0),ie=j(be=>ae(be,{enter:()=>{W.addFlag(ce.Opening),J.current.beforeEnter()},leave:()=>{W.addFlag(ce.Closing),J.current.beforeLeave()},idle:()=>{}})),Q=j(be=>ae(be,{enter:()=>{W.removeFlag(ce.Opening),J.current.afterEnter()},leave:()=>{W.removeFlag(ce.Closing),J.current.afterLeave()},idle:()=>{}})),ne=Kn(()=>{_("hidden"),$(x)},q),me=a.useRef(!1);Il({immediate:w,container:x,classes:R,direction:G,onStart:Se(be=>{me.current=!0,ne.onStart(x,be,ie)}),onStop:Se(be=>{me.current=!1,ne.onStop(x,be,Q),be==="leave"&&!gt(ne)&&(_("hidden"),$(x))})});let ge=g,Ce={ref:S};return w?ge={...ge,className:at(g.className,...R.current.enter,...R.current.enterFrom)}:me.current&&(ge.className=at(g.className,(r=x.current)==null?void 0:r.className),ge.className===""&&delete ge.className),a.createElement(vt.Provider,{value:ne},a.createElement(_t,{value:ae(k,{visible:ce.Open,hidden:ce.Closed})|W.flags},le({ourProps:Ce,theirProps:ge,defaultTag:Al,features:Qn,visible:k==="visible",name:"Transition.Child"})))}function Ll(e,n){let{show:t,appear:r=!1,unmount:o=!0,...i}=e,l=a.useRef(null),s=ue(l,n);Be();let u=Je();if(t===void 0&&u!==null&&(t=(u&ce.Open)===ce.Open),![!0,!1].includes(t))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,m]=a.useState(t?"visible":"hidden"),h=Kn(()=>{m("hidden")}),[b,p]=a.useState(!0),v=a.useRef([t]);ee(()=>{b!==!1&&v.current[v.current.length-1]!==t&&(v.current.push(t),p(!1))},[v,t]);let g=a.useMemo(()=>({show:t,appear:r,initial:b}),[t,r,b]);a.useEffect(()=>{if(t)m("visible");else if(!gt(h))m("hidden");else{let T=l.current;if(!T)return;let I=T.getBoundingClientRect();I.x===0&&I.y===0&&I.width===0&&I.height===0&&m("hidden")}},[t,h]);let x={unmount:o},S=j(()=>{var T;b&&p(!1),(T=e.beforeEnter)==null||T.call(e)}),y=j(()=>{var T;b&&p(!1),(T=e.beforeLeave)==null||T.call(e)});return a.createElement(vt.Provider,{value:h},a.createElement(ht.Provider,{value:g},le({ourProps:{...x,as:a.Fragment,children:a.createElement(Xn,{ref:s,...x,...i,beforeEnter:S,beforeLeave:y})},theirProps:{},defaultTag:a.Fragment,features:Qn,visible:c==="visible",name:"Transition"})))}function _l(e,n){let t=a.useContext(ht)!==null,r=Je()!==null;return a.createElement(a.Fragment,null,!t&&r?a.createElement(tn,{ref:n,...e}):a.createElement(Xn,{ref:n,...e}))}let tn=se(Ll),Xn=se(Dl),Rl=se(_l),Re=Object.assign(tn,{Child:Rl,Root:tn});function Bl({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M18 10a.75.75 0 0 1-.75.75H4.66l2.1 1.95a.75.75 0 1 1-1.02 1.1l-3.5-3.25a.75.75 0 0 1 0-1.1l3.5-3.25a.75.75 0 1 1 1.02 1.1l-2.1 1.95h12.59A.75.75 0 0 1 18 10Z",clipRule:"evenodd"}))}const zl=E.forwardRef(Bl);function Wl({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M2 10a.75.75 0 0 1 .75-.75h12.59l-2.1-1.95a.75.75 0 1 1 1.02-1.1l3.5 3.25a.75.75 0 0 1 0 1.1l-3.5 3.25a.75.75 0 1 1-1.02-1.1l2.1-1.95H2.75A.75.75 0 0 1 2 10Z",clipRule:"evenodd"}))}const Hl=E.forwardRef(Wl);function Ul({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",clipRule:"evenodd"}))}const Vl=E.forwardRef(Ul);function Yl({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const ql=E.forwardRef(Yl);function Gl({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M9.47 6.47a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 1 1-1.06 1.06L10 8.06l-3.72 3.72a.75.75 0 0 1-1.06-1.06l4.25-4.25Z",clipRule:"evenodd"}))}const Zl=E.forwardRef(Gl);function Kl({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-8-5a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-1.5 0v-4.5A.75.75 0 0 1 10 5Zm0 10a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const er=E.forwardRef(Kl);function Jl({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const Ql=E.forwardRef(Jl);function Xl({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM9 9a.75.75 0 0 0 0 1.5h.253a.25.25 0 0 1 .244.304l-.459 2.066A1.75 1.75 0 0 0 10.747 15H11a.75.75 0 0 0 0-1.5h-.253a.25.25 0 0 1-.244-.304l.459-2.066A1.75 1.75 0 0 0 9.253 9H9Z",clipRule:"evenodd"}))}const es=E.forwardRef(Xl);function ts({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM8.28 7.22a.75.75 0 0 0-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 1 0 1.06 1.06L10 11.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L11.06 10l1.72-1.72a.75.75 0 0 0-1.06-1.06L10 8.94 8.28 7.22Z",clipRule:"evenodd"}))}const ns=E.forwardRef(ts),bt={warning:{color:"bg-yellow-50",icon:f.jsx(Ql,{className:"h-5 w-5 text-yellow-400","aria-hidden":"true"}),colorTitle:"text-yellow-800",colorText:"text-yellow-700"},error:{color:"bg-red-50",icon:f.jsx(ns,{className:"h-5 w-5 text-red-400","aria-hidden":"true"}),colorTitle:"text-red-800",colorText:"text-red-700"},success:{color:"bg-green-50",icon:f.jsx(Vl,{className:"h-5 w-5 text-green-400","aria-hidden":"true"}),colorTitle:"text-green-800",colorText:"text-green-700"},info:{color:"bg-blue-50",icon:f.jsx(es,{className:"h-5 w-5 text-blue-400","aria-hidden":"true"}),colorTitle:"text-blue-800",colorText:"text-blue-700"}};let tr;const rs=({type:e="info",title:n,message:t,active:r=!1,time:o=1e3,dispatch:i})=>{const{width:l}=Tt(),[s,u]=a.useState(!1);return a.useEffect(()=>r?(tr=window.setTimeout(()=>{u(!1),i({type:"ALERT",payload:{title:"",message:"",typeAlert:"",active:!1}})},o),u(!0)):(u(!1),()=>window.clearTimeout(tr)),[r,i,o]),f.jsx("div",{className:"fixed top-2.5 w-80 3xs:w-96 z-50",style:{left:`calc(50% - ${l<=470?"160px":"192px"})`},children:f.jsx(Re,{as:a.Fragment,show:s,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f.jsxs("div",{className:F("rounded-md p-4 text-center",bt[e].color),children:[f.jsxs("div",{className:"flex justify-center flex-shrink-0",children:[bt[e].icon,f.jsx("h3",{className:F("text-sm font-medium ml-3",bt[e].colorTitle),children:n})]}),f.jsx("div",{className:F("mt-2 text-sm",bt[e].colorText),children:f.jsx("p",{children:t})})]})})})};function os({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",clipRule:"evenodd"}))}const is=E.forwardRef(os);function ls({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M10.5 3.75a6.75 6.75 0 1 0 0 13.5 6.75 6.75 0 0 0 0-13.5ZM2.25 10.5a8.25 8.25 0 1 1 14.59 5.28l4.69 4.69a.75.75 0 1 1-1.06 1.06l-4.69-4.69A8.25 8.25 0 0 1 2.25 10.5Z",clipRule:"evenodd"}))}const ss=E.forwardRef(ls);function as({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{d:"M21.731 2.269a2.625 2.625 0 0 0-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 0 0 0-3.712ZM19.513 8.199l-3.712-3.712-8.4 8.4a5.25 5.25 0 0 0-1.32 2.214l-.8 2.685a.75.75 0 0 0 .933.933l2.685-.8a5.25 5.25 0 0 0 2.214-1.32l8.4-8.4Z"}),E.createElement("path",{d:"M5.25 5.25a3 3 0 0 0-3 3v10.5a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3V13.5a.75.75 0 0 0-1.5 0v5.25a1.5 1.5 0 0 1-1.5 1.5H5.25a1.5 1.5 0 0 1-1.5-1.5V8.25a1.5 1.5 0 0 1 1.5-1.5h5.25a.75.75 0 0 0 0-1.5H5.25Z"}))}const us=E.forwardRef(as);function cs({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M1.5 6a2.25 2.25 0 0 1 2.25-2.25h16.5A2.25 2.25 0 0 1 22.5 6v12a2.25 2.25 0 0 1-2.25 2.25H3.75A2.25 2.25 0 0 1 1.5 18V6ZM3 16.06V18c0 .414.336.75.75.75h16.5A.75.75 0 0 0 21 18v-1.94l-2.69-2.689a1.5 1.5 0 0 0-2.12 0l-.88.879.97.97a.75.75 0 1 1-1.06 1.06l-5.16-5.159a1.5 1.5 0 0 0-2.12 0L3 16.061Zm10.125-7.81a1.125 1.125 0 1 1 2.25 0 1.125 1.125 0 0 1-2.25 0Z",clipRule:"evenodd"}))}const ds=E.forwardRef(cs);function fs({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M18.685 19.097A9.723 9.723 0 0 0 21.75 12c0-5.385-4.365-9.75-9.75-9.75S2.25 6.615 2.25 12a9.723 9.723 0 0 0 3.065 7.097A9.716 9.716 0 0 0 12 21.75a9.716 9.716 0 0 0 6.685-2.653Zm-12.54-1.285A7.486 7.486 0 0 1 12 15a7.486 7.486 0 0 1 5.855 2.812A8.224 8.224 0 0 1 12 20.25a8.224 8.224 0 0 1-5.855-2.438ZM15.75 9a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z",clipRule:"evenodd"}))}const ms=E.forwardRef(fs);function ps({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{fillRule:"evenodd",d:"M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const hs=E.forwardRef(ps),vs=({src:e,alt:n,width:t,height:r,className:o="",classNameIcon:i="",isIcon:l=!0,acronym:s=""})=>{function u(){if(typeof s!="string")return s;const c=s.toLowerCase(),m=c.split(" "),h=m[m.length-1];return c.charAt(0)+h.charAt(0)}return f.jsx(f.Fragment,{children:e?f.jsx("img",{src:e,alt:n,width:t,height:r,className:F(o!==""&&o),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s"},onLoad:c=>c.currentTarget.style.filter="none","data-testid":"img"}):l?f.jsx(ms,{className:F("bg-white text-default-5",i!==""?i:"w-7 h-7")}):f.jsx("div",{className:F("bg-gray-200 text-default-5 rounded-full font-bold uppercase flex justify-center items-center",i!==""?i:"w-7 h-7"),children:u()})})},gs=({steps:e,onClick:n})=>{const[t,r]=a.useState(0),o=i=>{r(i),n(i)};return f.jsx("nav",{className:"flex items-center justify-center w-full","aria-label":"Progress","data-testid":"bullets",children:f.jsx("ol",{role:"list",className:"flex items-center space-x-5",children:new Array(e).fill(1).map((i,l)=>f.jsx("li",{children:t!==l?f.jsx("div",{className:"cursor-pointer block h-2.5 w-2.5 rounded-full bg-gray-500 hover:bg-gray-600",onClick:()=>o(l),"data-testid":`step-${l}`,children:f.jsx("span",{className:"sr-only",children:"step"})}):f.jsxs("div",{className:"relative flex items-center justify-center cursor-pointer","aria-current":"step",children:[f.jsx("span",{className:"absolute flex h-5 w-5 p-px","aria-hidden":"true",children:f.jsx("span",{className:"h-full w-full rounded-full bg-gray-300"})}),f.jsx("span",{className:"relative block h-2.5 w-2.5 rounded-full bg-gray-500","aria-hidden":"true"}),f.jsx("span",{className:"sr-only",children:"step"})]})},l))})})};var nr={exports:{}};/*!
|
|
32
32
|
Copyright (c) 2018 Jed Watson.
|
|
33
33
|
Licensed under the MIT License (MIT), see
|
|
34
34
|
http://jedwatson.github.io/classnames
|
|
35
|
-
*/(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var i="",l=0;l<arguments.length;l++){var s=arguments[l];s&&(i=o(i,r(s)))}return i}function r(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return t.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var l="";for(var s in i)n.call(i,s)&&i[s]&&(l=o(l,s));return l}function o(i,l){return l?i?i+" "+l:i+l:i}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(nr);var
|
|
35
|
+
*/(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var i="",l=0;l<arguments.length;l++){var s=arguments[l];s&&(i=o(i,r(s)))}return i}function r(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return t.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var l="";for(var s in i)n.call(i,s)&&i[s]&&(l=o(l,s));return l}function o(i,l){return l?i?i+" "+l:i+l:i}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(nr);var bs=nr.exports;const Ae=Nr(bs),rr=({className:e="text-sm w-full rounded-md",children:n,icon:t=null,edge:r=null,disabled:o=!1,type:i="button",onClick:l,id:s})=>{const u=Ae({"ml-2":r==="start"&&t!==null,"mr-2":r==="end"&&t!==null});return f.jsxs("button",{className:F("flex justify-center items-center bg-white px-3 py-7px font-medium leading-6 text-white shadow-sm ring-1 ring-inset ring-gray-300 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 bg-gray-50",e),type:i,onClick:l,disabled:o,"data-testid":`button-outline-${s}`,id:`button-outline-${s}`,children:[r==="start"&&t!==null&&f.jsx("span",{children:t}),f.jsx("span",{className:F("flex",u),id:s,children:n}),r==="end"&&t!==null&&f.jsx("span",{children:t})]})},or=({children:e,className:n="",icon:t=null,edge:r=null,disabled:o=!1,type:i="button",onClick:l,id:s})=>{const u=Ae({"ml-2":r==="start"&&t!==null,"mr-2":r==="end"&&t!==null});return f.jsxs("button",{className:`${n} flex justify-center items-center`,edge:r,type:i,onClick:l,disabled:o,"data-testid":`button-${s}`,children:[r==="start"&&t!==null&&f.jsx("span",{children:t}),f.jsx("span",{className:u,children:e}),r==="end"&&t!==null&&f.jsx("span",{children:t})]})},xt=({children:e,classNameButton:n="bg-indigo-600 hover:bg-indigo-700 focus-visible:outline-indigo-600 shadow-indigo-500 rounded font-semibold px-3 py-1.5 text-white w-full",classNameText:t="",icon:r=null,edge:o=null,disabled:i=!1,type:l="button",onClick:s,id:u,outline:c="0px 0px 0px 2px #6366F1, 0px 0px 0px 2px #FFF, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameContainer:m=""})=>{const[h,b]=a.useState(!1),p=Ae({"ml-2":o==="start"&&r!==null,"mr-2":o==="end"&&r!==null}),v=()=>{s&&s()};return f.jsx("div",{className:F("rounded-md p-0.5",m!==""&&m),style:{boxShadow:h?c:"0px 0px 0px 0px #6366F1, 0px 0px 0px 0px #FFF, 0px 0px 0px 0px rgba(0, 0, 0, 0.05)",transition:"box-shadow .1s ease-in-out"},"data-testid":"container-button",children:f.jsxs("button",{className:F("flex justify-center items-center text-sm leading-6 shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",i&&"text-white bg-gray-300 rounded focus:outline-none cursor-default",i?n.replace(/\bbg-\w+\b/g,""):n),type:l,onClick:v,onFocus:()=>b(!0),onBlur:()=>b(!1),disabled:i,"data-testid":`button-solid-${u}`,children:[o==="start"&&r!==null&&f.jsx("span",{className:"flex",children:r}),f.jsx("span",{className:F(t.length===0&&p,t.length!==0&&t),children:e}),o==="end"&&r!==null&&f.jsx("span",{children:r})]})})},xs=({label:e=null,checked:n=!1,onChange:t,id:r,className:o="",classNameCheckbox:i="h-4 w-4",style:l={},disabled:s=!1})=>{const[u,c]=a.useState(!1);return a.useEffect(()=>{c(n)},[n]),f.jsxs("div",{className:"flex items-center",style:l,"data-testid":`container-check-${r}`,children:[f.jsx("input",{checked:u,id:`${e}-${r}`,value:r,"aria-describedby":"comments-description",type:"checkbox",onChange:t,className:F("cursor-pointer rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",i!==""&&i),"data-testid":`checkbox-${r}`,disabled:s}),e!==null?f.jsx("label",{htmlFor:`${e}-${r}`,className:`ml-2.5 font-normal cursor-pointer ${o}`,id:`label-${r}`,"data-testid":"label",children:e}):null]})};function ws({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const ys=E.forwardRef(ws);function Es({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const Ss=E.forwardRef(Es);function Cs({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const Ts=E.forwardRef(Cs);function Os({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}const js=E.forwardRef(Os);function Is({title:e,titleId:n,...t},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?E.createElement("title",{id:n},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"}))}const Ns=E.forwardRef(Is);function ir({children:e,className:n="sm:max-w-sm w-11/12 sm:my-8",classNameContainer:t="",isOpen:r=!1,setIsOpen:o,showIconSuccess:i=!0,showButton:l=!0}){return f.jsxs(f.Fragment,{children:[f.jsx("style",{children:`
|
|
36
36
|
.bg-opacity-35 {
|
|
37
37
|
opacity: .35;
|
|
38
38
|
}
|
|
39
|
-
`}),m.jsx(Re.Root,{show:r,as:a.Fragment,children:m.jsxs(Vn,{as:"div",className:"relative z-50 relative",onClose:o,"data-testid":"modal",children:[m.jsx(Re.Child,{as:a.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:m.jsx("div",{className:"fixed inset-0 bg-opacity-35 bg-gray-900 transition-opacity","data-testid":"window-close",onClick:()=>o(!1)})}),m.jsx("div",{className:"fixed inset-0 z-10 overflow-y-auto",children:m.jsx("div",{className:"flex min-h-full items-center justify-center xs:p-2 p-4 text-center sm:items-center sm:p-0",children:m.jsx(Re.Child,{as:a.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",children:m.jsxs(Vn.Panel,{className:k("relative transform rounded-lg bg-white px-4 pb-3 pt-5 text-left shadow-xl transition-all sm:w-full sm:pt-3 sm:px-3",n!==""&&n),children:[i&&m.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-green-100",children:m.jsx(xs,{className:"h-6 w-6 text-green-600","aria-hidden":"true"})}),m.jsx("div",{className:k(t!==""&&t),"data-testid":"content",children:e}),l&&m.jsx("div",{className:"mt-5 sm:mt-6",children:m.jsx(xt,{id:"close-modal",onClick:()=>o(!1),children:"Cerrar"})}),m.jsx("button",{className:"opacity-0 absolute"})]})})})})]})})]})}const Is=({isOpenModalConfirmation:e,setIsOpenModalConfirmation:n,close:t,title:r="¿Estás seguro de abandonar la creación de la acción?",description:o="La información se perderá si no creas la acción",classNameTitle:i="",classNameDescription:l=""})=>{const s=()=>{n(!1),t()};return m.jsxs(ir,{isOpen:e,setIsOpen:()=>n(),showButton:!1,showIconSuccess:!1,children:[m.jsx("p",{className:k("text-center text-sm",i!==""&&i),children:r}),m.jsx("p",{className:k("text-center text-sm",l!==""&&l),children:o}),m.jsxs("div",{className:"flex w-full justify-center mt-5",children:[m.jsx(rr,{className:"rounded-md bg-white text-gray-500 text-sm shadow-sm ring-1 ring-inset ring-gray-300 bg-gray-50 w-24 h-9 mr-6",onClick:()=>n(),id:"cancel",children:"Cancelar"}),m.jsx(xt,{classNameButton:"bg-secondary-2 hover:bg-secondary-3 focus-visible:outline-secondary-2 shadow-secondary-2 rounded py-1.5 text-white w-full px-5",outline:"0px 0px 0px 2px #3758F9, 0px 0px 0px 2px #243BBD, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",onClick:s,id:"confirmation",children:"Aceptar"})]})]})},$s=({className:e="",style:n={}})=>m.jsx("div",{className:k("w-px",e!==""&&e),style:n}),ks=({onClick:e,id:n="",className:t=""})=>m.jsxs("div",{className:k("flex items-center text-default-5",t!==""&&t),"data-testid":n,children:[m.jsx(is,{className:"w-3 h-3 3xs:w-4 3xs:h-4 stroke-current cursor-pointer","data-testid":"chevron-left-icon",onClick:e}),m.jsx("span",{onClick:e,className:"text-sm cursor-pointer","data-testid":"go-back",children:"Volver"})]}),nn=({placeholder:e="",label:n="",htmlFor:t,type:r="text",name:o,handleChange:i,onClick:l=()=>{},value:s,isReadOnly:u=!1,isError:d=!1,helperText:f="",autocomplete:h="on",id:b,classNameLabel:p="",classNameContainerInput:v="",classNameContainer:g="",className:x="",icon:E=null,onKeyDown:y,onFocus:T})=>{const[I,$]=a.useState(!1),P=Ae({"ring-red-300 focus:ring-red-300 text-red-900":d||I,"focus:ring-indigo-600 text-gray-500":!d&&!I}),_=q=>{if(i&&i(q),r!=="email")return;const{value:M}=q.target,F=cn(M);$(!F)};return m.jsxs("div",{"data-testid":`container-input-${b}`,className:g,children:[n!==""&&m.jsx("label",{htmlFor:t,className:k("block text-sm font-medium leading-6",p!==""?p:"text-gray-700"),"data-testid":`label-${b}`,children:n}),m.jsxs("div",{className:k("relative mt-1 rounded-md",v!==""&&v),children:[m.jsx("input",{id:b,name:o,type:r,autoComplete:h,placeholder:e,onChange:_,onClick:l,onKeyDown:y,onFocus:T,value:s,readOnly:u,"data-testid":`input-${b}`,className:k("block w-full rounded-md border-0 py-1.5 shadow-sm placeholder-gray-300 ring-1 ring-gray-300 ring-inset focus:ring-1 focus:ring-inset text-sm sm:leading-6",P,x!==""&&x)}),E!==null&&m.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3",children:E}),d&&E===null&&m.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:m.jsx(er,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),f.length===0||!d?null:m.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${b}`,children:f})]})};function wt({className:e="w-6 h-6",color:n="#3730a3"}){return m.jsxs("svg",{className:k("fill-current animate-spin",e),viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:n,strokeWidth:"4",fill:"none"}),m.jsx("path",{fill:n,d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}function Fs(){return m.jsxs("div",{className:"fixed top-0 left-0 right-0 bottom-0 w-full h-screen overflow-hidden bg-stone-600 opacity-75 flex flex-col items-center justify-center","data-testid":"spinner",style:{zIndex:60},children:[m.jsx("div",{className:"inline-block h-12 w-12 animate-[spinner-grow_0.75s_linear_infinite] rounded-full bg-current align-[-0.125em] opacity-0 motion-reduce:animate-[spinner-grow_1.5s_linear_infinite]",role:"status"}),m.jsx(wt,{className:"w-8 h-8 animate-spin"})]})}const lr=({height:e="36px",style:n={},label:t="",onChange:r,isReadOnly:o=!1,isError:i=!1,helperText:l="",name:s,id:u,className:d="",classNameLabel:f="",classNameInput:h="",options:b,value:p=-1,defaultValue:v={value:-1,label:"",iconStart:null,iconEnd:null},defaultLabel:g="label",defaultId:x="value",bgOptionSelect:E="bg-indigo-600",isSearch:y=!1,loading:T=!1,isTest:I=!1})=>{const[$,P]=a.useState(""),[_,q]=a.useState(v),[M,F]=a.useState(!1);a.useEffect(()=>{if(p===-1||(b==null?void 0:b.length)===0)return;const w=b==null?void 0:b.find(G=>G[x]===p);w&&q(w)},[p,b,x]),a.useEffect(()=>{p==="clear"&&(_.value!==v.value||_.label!==v.label||I)&&q(v)},[v,I,_,p]);const R=$===""?b:b.filter(w=>w[g].toLowerCase().includes($.toLowerCase())),Q=Ae({"ring-red-300 focus:ring-red-300 text-red-900":i&&!o,"text-gray-500":!i,"focus:ring-indigo-600":!i&&!o}),z=Ae({"text-red-400":i&&!o,"text-gray-400":!i}),B=w=>{q(w),r({target:{value:w,checked:!1,name:s,type:void 0,id:w[x]}})};return m.jsxs($e,{as:"div",value:_,onChange:B,children:[m.jsx($e.Label,{className:k("block text-sm font-medium leading-6 text-gray-500 mb-0.5",f!==""&&f),children:t}),m.jsxs("div",{className:k("relative",d!==""&&d),children:[m.jsxs($e.Button,{className:"w-full","data-testid":`listbox-button-${u}`,children:[_.iconStart&&m.jsx("span",{className:"absolute inset-y-0 left-0 flex items-center pl-2",children:_.iconStart}),m.jsx($e.Input,{className:k("w-full rounded-md border-0 bg-white py-1.5 pr-10 text-gray-900 shadow-sm ring-1 ring-gray-300 sm:text-sm sm:leading-6 truncate block",!i&&!o&&"ring-inset focus:ring-inset focus:ring-2 focus:ring-indigo-600",o&&"focus:ring-gray-300",Q,h!==""&&h),onChange:w=>P(w.target.value),displayValue:w=>{var G;return(G=w[g])==null?void 0:G.trim()},autoComplete:"false",readOnly:!y||o,style:{height:e,...n},"data-testid":"input-search",onClick:()=>F(o?!1:!M),onBlur:()=>F(!1)})]}),_.iconEnd&&m.jsx("span",{className:"absolute inset-y-0 right-4 flex items-center pr-4",children:_.iconEnd}),m.jsx($e.Button,{className:"absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none",onClick:()=>F(o?!1:!M),"data-testid":"arrow-button",children:M?m.jsx(Kl,{className:k("h-5 w-5",z),"aria-hidden":"true"}):m.jsx(ql,{className:k("h-5 w-5",z),"aria-hidden":"true"})}),!o&&m.jsx(m.Fragment,{children:T?m.jsx($e.Options,{className:"absolute z-10 mt-1 max-h-60 w-full rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none flex justify-center items-center py-2",children:m.jsx(wt,{})}):(R??[]).length>0?m.jsx($e.Options,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm py-0.5 overflow-x-hidden",children:R.map((w,G)=>m.jsx($e.Option,{value:w,className:k(w[x]===_[x]?`${E} text-white`:"text-gray-900",`relative cursor-default select-none p-2 hover:text-white hover:${E}`),"data-testid":`select-${u}-${w[x]}`,children:m.jsxs("div",{className:"flex justify-between items-center",children:[m.jsxs("div",{className:"flex items-center",children:[w.iconStart&&m.jsx("span",{className:"mr-2","aria-hidden":"true",children:w.iconStart}),m.jsx("span",{className:"block font-normal break-all",children:w[g]})]}),w.iconEnd&&m.jsx("span",{className:"ml-2","aria-hidden":"true",children:w.iconEnd})]})},G))}):m.jsx($e.Options,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm py-0.5 overflow-x-hidden flex justify-center items-center py-2",children:m.jsx("p",{"data-testid":"empty-options",children:"Sin opciones"})})})]}),l.length>0&&i&&m.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${u}`,children:l})]})},Ns=({placeholder:e="",label:n="",htmlFor:t,name:r,handleChange:o,onClick:i=()=>{},value:l,valueSelect:s,isReadOnly:u=!1,isError:d=!1,helperText:f="",autocomplete:h="on",id:b,classNameLabel:p="",classNameContainer:v="",className:g="",onKeyDown:x,options:E,idSelect:y})=>{const{width:T}=Tt(),I=Ae({"ring-red-300 focus:ring-red-300 text-red-900":d,"focus:ring-indigo-600 text-gray-500":!d});return m.jsxs("div",{"data-testid":`container-input-${b}`,className:v,children:[n!==""&&m.jsx("label",{htmlFor:t,className:k("block text-sm font-medium leading-6",p!==""?p:"text-gray-700"),"data-testid":`label-${b}`,children:n}),m.jsxs("div",{className:"relative mt-1 rounded-md shadow-sm",children:[m.jsx("div",{className:"absolute inset-y-0 -top-0.5 flex items-center",style:{left:"2px"},children:m.jsx(lr,{name:y,onChange:$=>o($),id:y,options:E,value:s,isReadOnly:u,className:"w-20",height:T<=640?"28px":"32px",classNameInput:"ml-3.5",style:{paddingRight:0,width:"45px",boxShadow:"none"},isDisabledFocus:!0})}),m.jsx("input",{id:b,name:r,type:"text",autoComplete:h,placeholder:e,readOnly:u,"data-testid":`input-${b}`,onClick:i,onKeyDown:x,onChange:$=>o($),value:l,className:k("block w-full rounded-md border-0 py-1.5 pl-20 shadow-sm placeholder-gray-300 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-1 focus:ring-inset text-sm sm:leading-6",I,g!==""&&g)}),d&&m.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:m.jsx(er,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),f.length===0||!d?null:m.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${b}`,children:f})]})},Ps=({setValuesDefault:e,status:n=!1})=>{const[t,r]=a.useState(!1);a.useEffect(()=>{r(n),e("status",!1)},[n,e]);const o=()=>{r(!t),e("status",!t)};return m.jsxs("div",{className:"flex",children:[m.jsxs(Cl,{checked:t,onChange:o,className:k("group relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-success-1 focus:ring-offset-2 mt-1",t?"bg-success-1":"bg-gray-200"),"data-testid":"switch",children:[m.jsx("span",{className:"sr-only",children:"Use setting"}),m.jsx("span",{"aria-hidden":"true",className:k("pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",t?"translate-x-full":"translate-x-0")})]}),m.jsx("p",{className:"text-sm font-medium text-gray-500 ml-2 self-end","data-testid":"text-switch",children:t?"Activo":"Inactivo"})]})};function Ms({label:e="",id:n,htmlFor:t="",classNameLabel:r="",className:o="",rows:i=4,name:l,placeholder:s="",helperText:u="",isReadOnly:d=!1,isError:f=!1,onChange:h,value:b,idInput:p,nameInput:v,placeholderInput:g="",isReadOnlyInput:x=!1,valueInput:E,infoTop:y=null,infoBottom:T=null,classNameInfoTop:I="h-4",classNameInfoBottom:$="h-2",isInputTitle:P=!1,scrollHeightTest:_=!1}){const q=a.useRef(null),[M,F]=a.useState(0);a.useEffect(()=>{const{current:Q}=q;Q===null||_||F(Q.scrollHeight)},[q,b,_]),a.useEffect(()=>{_&&F(800)},[_]);const R=Ae({"ring-red-300 focus:ring-red-300 text-red-900":f,"focus:ring-indigo-600 text-gray-700":!f});return m.jsxs(m.Fragment,{children:[e!==""&&m.jsx("label",{htmlFor:t,className:k("leading-6 block text-sm",r!==""&&r),children:e}),m.jsxs("div",{className:"relative overflow-x-hidden",children:[y!==null&&m.jsx("div",{className:"absolute top-2 left-3 w-full",children:y}),m.jsxs("div",{className:k("overflow-hidden rounded-md shadow-sm ring-1 ring-inset ring-gray-300 focus-within:ring-2 focus-within:ring-indigo-600 placeholder:text-gray-400 bg-white",R),children:[y!==null&&m.jsx("div",{className:"py-2","aria-hidden":"true",children:m.jsx("div",{className:"py-px",children:m.jsx("div",{className:I})})}),P&&m.jsx("textarea",{name:v,id:p,className:"block w-full resize-none border-0 bg-transparent py-1.5 text-gray-400 placeholder:text-gray-400 focus:ring-0 text-sm",placeholder:g,value:E,onChange:h,rows:2,readOnly:x}),m.jsx("textarea",{style:{height:M>0?M:"auto"},placeholder:s,rows:i,name:l,id:n,className:k(P?"block w-full resize-none border-0 bg-transparent py-1.5 placeholder:text-gray-400 focus:ring-0":"block w-full rounded-md border-0 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset sm:leading-6",R,o!==""&&o),readOnly:d,onChange:h,value:b,"data-testid":`textarea-${n}`,ref:q}),T!==null&&m.jsx("div",{className:"py-2","aria-hidden":"true",children:m.jsx("div",{className:"py-px",children:m.jsx("div",{className:$})})})]}),T!==null&&m.jsx("div",{className:"absolute bottom-2 left-3 w-full",children:T})]}),u.length>0&&f&&m.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${n}`,children:u})]})}const As=({className:e="",children:n,message:t=""})=>{const[r,o]=a.useState(!1),i=()=>{t!==""&&o(!0)},l=()=>{o(!1)};return m.jsx("div",{className:"relative",children:m.jsxs("div",{onMouseLeave:l.bind(null,r),"data-testid":"container-tooltip",children:[m.jsx("div",{className:`
|
|
39
|
+
`}),f.jsx(Re.Root,{show:r,as:a.Fragment,children:f.jsxs(Vn,{as:"div",className:"relative z-50 relative",onClose:o,"data-testid":"modal",children:[f.jsx(Re.Child,{as:a.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:f.jsx("div",{className:"fixed inset-0 bg-opacity-35 bg-gray-900 transition-opacity","data-testid":"window-close",onClick:()=>o(!1)})}),f.jsx("div",{className:"fixed inset-0 z-10 overflow-y-auto",children:f.jsx("div",{className:"flex min-h-full items-center justify-center xs:p-2 p-4 text-center sm:items-center sm:p-0",children:f.jsx(Re.Child,{as:a.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",children:f.jsxs(Vn.Panel,{className:F("relative transform rounded-lg bg-white px-4 pb-3 pt-5 text-left shadow-xl transition-all sm:w-full sm:pt-3 sm:px-3",n!==""&&n),children:[i&&f.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-green-100",children:f.jsx(ys,{className:"h-6 w-6 text-green-600","aria-hidden":"true"})}),f.jsx("div",{className:F(t!==""&&t),"data-testid":"content",children:e}),l&&f.jsx("div",{className:"mt-5 sm:mt-6",children:f.jsx(xt,{id:"close-modal",onClick:()=>o(!1),children:"Cerrar"})}),f.jsx("button",{className:"opacity-0 absolute"})]})})})})]})})]})}const Fs=({isOpenModalConfirmation:e,setIsOpenModalConfirmation:n,close:t,title:r="¿Estás seguro de abandonar la creación de la acción?",description:o="La información se perderá si no creas la acción",classNameTitle:i="",classNameDescription:l=""})=>{const s=()=>{n(!1),t()};return f.jsxs(ir,{isOpen:e,setIsOpen:()=>n(),showButton:!1,showIconSuccess:!1,children:[f.jsx("p",{className:F("text-center text-sm",i!==""&&i),children:r}),f.jsx("p",{className:F("text-center text-sm",l!==""&&l),children:o}),f.jsxs("div",{className:"flex w-full justify-center mt-5",children:[f.jsx(rr,{className:"rounded-md bg-white text-gray-500 text-sm shadow-sm ring-1 ring-inset ring-gray-300 bg-gray-50 w-24 h-9 mr-6",onClick:()=>n(),id:"cancel",children:"Cancelar"}),f.jsx(xt,{classNameButton:"bg-secondary-2 hover:bg-secondary-3 focus-visible:outline-secondary-2 shadow-secondary-2 rounded py-1.5 text-white w-full px-5",outline:"0px 0px 0px 2px #3758F9, 0px 0px 0px 2px #243BBD, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",onClick:s,id:"confirmation",children:"Aceptar"})]})]})},$s=({className:e="",style:n={}})=>f.jsx("div",{className:F("w-px",e!==""&&e),style:n}),Ps=({onClick:e,id:n="",className:t=""})=>f.jsxs("div",{className:F("flex items-center text-default-5",t!==""&&t),"data-testid":n,children:[f.jsx(is,{className:"w-3 h-3 3xs:w-4 3xs:h-4 stroke-current cursor-pointer","data-testid":"chevron-left-icon",onClick:e}),f.jsx("span",{onClick:e,className:"text-sm cursor-pointer","data-testid":"go-back",children:"Volver"})]}),nn=({placeholder:e="",label:n="",htmlFor:t,type:r="text",name:o,handleChange:i,onClick:l=()=>{},value:s,isReadOnly:u=!1,isError:c=!1,helperText:m="",autocomplete:h="on",id:b,classNameLabel:p="",classNameContainerInput:v="",classNameContainer:g="",className:x="",icon:S=null,onKeyDown:y,onFocus:T})=>{const[I,N]=a.useState(!1),k=Ae({"ring-red-300 focus:ring-red-300 text-red-900":c||I,"focus:ring-indigo-600 text-gray-500":!c&&!I}),_=q=>{if(i&&i(q),r!=="email")return;const{value:M}=q.target,$=cn(M);N(!$)};return f.jsxs("div",{"data-testid":`container-input-${b}`,className:g,children:[n!==""&&f.jsx("label",{htmlFor:t,className:F("block text-sm font-medium leading-6",p!==""?p:"text-gray-700"),"data-testid":`label-${b}`,children:n}),f.jsxs("div",{className:F("relative mt-1 rounded-md",v!==""&&v),children:[f.jsx("input",{id:b,name:o,type:r,autoComplete:h,placeholder:e,onChange:_,onClick:l,onKeyDown:y,onFocus:T,value:s,readOnly:u,"data-testid":`input-${b}`,className:F("block w-full rounded-md border-0 py-1.5 shadow-sm placeholder-gray-300 ring-1 ring-gray-300 ring-inset focus:ring-1 focus:ring-inset text-sm sm:leading-6",k,x!==""&&x)}),S!==null&&f.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3",children:S}),c&&S===null&&f.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:f.jsx(er,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),m.length===0||!c?null:f.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${b}`,children:m})]})};function wt({className:e="w-6 h-6",color:n="#3730a3"}){return f.jsxs("svg",{className:F("fill-current animate-spin",e),viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:n,strokeWidth:"4",fill:"none"}),f.jsx("path",{fill:n,d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}function ks(){return f.jsxs("div",{className:"fixed top-0 left-0 right-0 bottom-0 w-full h-screen overflow-hidden bg-stone-600 opacity-75 flex flex-col items-center justify-center","data-testid":"spinner",style:{zIndex:60},children:[f.jsx("div",{className:"inline-block h-12 w-12 animate-[spinner-grow_0.75s_linear_infinite] rounded-full bg-current align-[-0.125em] opacity-0 motion-reduce:animate-[spinner-grow_1.5s_linear_infinite]",role:"status"}),f.jsx(wt,{className:"w-8 h-8 animate-spin"})]})}const lr=({height:e="36px",style:n={},label:t="",onChange:r,isReadOnly:o=!1,isError:i=!1,helperText:l="",name:s,id:u,className:c="",classNameLabel:m="",classNameInput:h="",options:b,value:p=-1,defaultValue:v={value:-1,label:"",iconStart:null,iconEnd:null},defaultLabel:g="label",defaultId:x="value",bgOptionSelect:S="bg-indigo-600",isSearch:y=!1,loading:T=!1,isTest:I=!1})=>{const[N,k]=a.useState(""),[_,q]=a.useState(v),[M,$]=a.useState(!1);a.useEffect(()=>{if(p===-1||(b==null?void 0:b.length)===0)return;const w=b==null?void 0:b.find(G=>G[x]===p);w&&q(w)},[p,b,x]),a.useEffect(()=>{p==="clear"&&(_.value!==v.value||_.label!==v.label||I)&&q(v)},[v,I,_,p]);const R=N===""?b:b.filter(w=>w[g].toLowerCase().includes(N.toLowerCase())),J=Ae({"ring-red-300 focus:ring-red-300 text-red-900":i&&!o,"text-gray-500":!i,"focus:ring-indigo-600":!i&&!o}),z=Ae({"text-red-400":i&&!o,"text-gray-400":!i}),B=w=>{q(w),r({target:{value:w,checked:!1,name:s,type:void 0,id:w[x]}})};return f.jsxs(Ne,{as:"div",value:_,onChange:B,children:[f.jsx(Ne.Label,{className:F("block text-sm font-medium leading-6 text-gray-500 mb-0.5",m!==""&&m),children:t}),f.jsxs("div",{className:F("relative",c!==""&&c),children:[f.jsxs(Ne.Button,{className:"w-full","data-testid":`listbox-button-${u}`,children:[_.iconStart&&f.jsx("span",{className:"absolute inset-y-0 left-0 flex items-center pl-2",children:_.iconStart}),f.jsx(Ne.Input,{className:F("w-full rounded-md border-0 bg-white py-1.5 pr-10 text-gray-900 shadow-sm ring-1 ring-gray-300 sm:text-sm sm:leading-6 truncate block",!i&&!o&&"ring-inset focus:ring-inset focus:ring-2 focus:ring-indigo-600",o&&"focus:ring-gray-300",J,h!==""&&h),onChange:w=>k(w.target.value),displayValue:w=>{var G;return(G=w[g])==null?void 0:G.trim()},autoComplete:"false",readOnly:!y||o,style:{height:e,...n},"data-testid":"input-search",onClick:()=>$(o?!1:!M),onBlur:()=>$(!1)})]}),_.iconEnd&&f.jsx("span",{className:"absolute inset-y-0 right-4 flex items-center pr-4",children:_.iconEnd}),f.jsx(Ne.Button,{className:"absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none",onClick:()=>$(o?!1:!M),"data-testid":"arrow-button",children:M?f.jsx(Zl,{className:F("h-5 w-5",z),"aria-hidden":"true"}):f.jsx(ql,{className:F("h-5 w-5",z),"aria-hidden":"true"})}),!o&&f.jsx(f.Fragment,{children:T?f.jsx(Ne.Options,{className:"absolute z-10 mt-1 max-h-60 w-full rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none flex justify-center items-center py-2",children:f.jsx(wt,{})}):(R??[]).length>0?f.jsx(Ne.Options,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm py-0.5 overflow-x-hidden",children:R.map((w,G)=>f.jsx(Ne.Option,{value:w,className:F(w[x]===_[x]?`${S} text-white`:"text-gray-900",`relative cursor-default select-none p-2 hover:text-white hover:${S}`),"data-testid":`select-${u}-${w[x]}`,children:f.jsxs("div",{className:"flex justify-between items-center",children:[f.jsxs("div",{className:"flex items-center",children:[w.iconStart&&f.jsx("span",{className:"mr-2","aria-hidden":"true",children:w.iconStart}),f.jsx("span",{className:"block font-normal break-all",children:w[g]})]}),w.iconEnd&&f.jsx("span",{className:"ml-2","aria-hidden":"true",children:w.iconEnd})]})},G))}):f.jsx(Ne.Options,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm py-0.5 overflow-x-hidden flex justify-center items-center py-2",children:f.jsx("p",{"data-testid":"empty-options",children:"Sin opciones"})})})]}),l.length>0&&i&&f.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${u}`,children:l})]})},Ms=({placeholder:e="",label:n="",htmlFor:t,name:r,handleChange:o,onClick:i=()=>{},value:l,valueSelect:s,isReadOnly:u=!1,isError:c=!1,helperText:m="",autocomplete:h="on",id:b,classNameLabel:p="",classNameContainer:v="",className:g="",onKeyDown:x,options:S,idSelect:y})=>{const{width:T}=Tt(),I=Ae({"ring-red-300 focus:ring-red-300 text-red-900":c,"focus:ring-indigo-600 text-gray-500":!c});return f.jsxs("div",{"data-testid":`container-input-${b}`,className:v,children:[n!==""&&f.jsx("label",{htmlFor:t,className:F("block text-sm font-medium leading-6",p!==""?p:"text-gray-700"),"data-testid":`label-${b}`,children:n}),f.jsxs("div",{className:"relative mt-1 rounded-md shadow-sm",children:[f.jsx("div",{className:"absolute inset-y-0 -top-0.5 flex items-center",style:{left:"2px"},children:f.jsx(lr,{name:y,onChange:N=>o(N),id:y,options:S,value:s,isReadOnly:u,className:"w-20",height:T<=640?"28px":"32px",classNameInput:"ml-3.5",style:{paddingRight:0,width:"45px",boxShadow:"none"},isDisabledFocus:!0})}),f.jsx("input",{id:b,name:r,type:"text",autoComplete:h,placeholder:e,readOnly:u,"data-testid":`input-${b}`,onClick:i,onKeyDown:x,onChange:N=>o(N),value:l,className:F("block w-full rounded-md border-0 py-1.5 pl-20 shadow-sm placeholder-gray-300 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-1 focus:ring-inset text-sm sm:leading-6",I,g!==""&&g)}),c&&f.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:f.jsx(er,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),m.length===0||!c?null:f.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${b}`,children:m})]})},As=({setValuesDefault:e,status:n=!1})=>{const[t,r]=a.useState(!1);a.useEffect(()=>{r(n),e("status",!1)},[n,e]);const o=()=>{r(!t),e("status",!t)};return f.jsxs("div",{className:"flex",children:[f.jsxs(Cl,{checked:t,onChange:o,className:F("group relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-success-1 focus:ring-offset-2 mt-1",t?"bg-success-1":"bg-gray-200"),"data-testid":"switch",children:[f.jsx("span",{className:"sr-only",children:"Use setting"}),f.jsx("span",{"aria-hidden":"true",className:F("pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",t?"translate-x-full":"translate-x-0")})]}),f.jsx("p",{className:"text-sm font-medium text-gray-500 ml-2 self-end","data-testid":"text-switch",children:t?"Activo":"Inactivo"})]})};function Ds({label:e="",id:n,htmlFor:t="",classNameLabel:r="",className:o="",rows:i=4,name:l,placeholder:s="",helperText:u="",isReadOnly:c=!1,isError:m=!1,onChange:h,value:b,idInput:p,nameInput:v,placeholderInput:g="",isReadOnlyInput:x=!1,valueInput:S,infoTop:y=null,infoBottom:T=null,classNameInfoTop:I="h-4",classNameInfoBottom:N="h-2",isInputTitle:k=!1,scrollHeightTest:_=!1}){const q=a.useRef(null),[M,$]=a.useState(0);a.useEffect(()=>{const{current:J}=q;J===null||_||$(J.scrollHeight)},[q,b,_]),a.useEffect(()=>{_&&$(800)},[_]);const R=Ae({"ring-red-300 focus:ring-red-300 text-red-900":m,"focus:ring-indigo-600 text-gray-700":!m});return f.jsxs(f.Fragment,{children:[e!==""&&f.jsx("label",{htmlFor:t,className:F("leading-6 block text-sm",r!==""&&r),children:e}),f.jsxs("div",{className:"relative overflow-x-hidden",children:[y!==null&&f.jsx("div",{className:"absolute top-2 left-3 w-full",children:y}),f.jsxs("div",{className:F("overflow-hidden rounded-md shadow-sm ring-1 ring-inset ring-gray-300 focus-within:ring-2 focus-within:ring-indigo-600 placeholder:text-gray-400 bg-white",R),children:[y!==null&&f.jsx("div",{className:"py-2","aria-hidden":"true",children:f.jsx("div",{className:"py-px",children:f.jsx("div",{className:I})})}),k&&f.jsx("textarea",{name:v,id:p,className:"block w-full resize-none border-0 bg-transparent py-1.5 text-gray-400 placeholder:text-gray-400 focus:ring-0 text-sm",placeholder:g,value:S,onChange:h,rows:2,readOnly:x}),f.jsx("textarea",{style:{height:M>0?M:"auto"},placeholder:s,rows:i,name:l,id:n,className:F(k?"block w-full resize-none border-0 bg-transparent py-1.5 placeholder:text-gray-400 focus:ring-0":"block w-full rounded-md border-0 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset sm:leading-6",R,o!==""&&o),readOnly:c,onChange:h,value:b,"data-testid":`textarea-${n}`,ref:q}),T!==null&&f.jsx("div",{className:"py-2","aria-hidden":"true",children:f.jsx("div",{className:"py-px",children:f.jsx("div",{className:N})})})]}),T!==null&&f.jsx("div",{className:"absolute bottom-2 left-3 w-full",children:T})]}),u.length>0&&m&&f.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${n}`,children:u})]})}const Ls=({className:e="",children:n,message:t=""})=>{const[r,o]=a.useState(!1),i=()=>{t!==""&&o(!0)},l=()=>{o(!1)};return f.jsx("div",{className:"relative",children:f.jsxs("div",{onMouseLeave:l.bind(null,r),"data-testid":"container-tooltip",children:[f.jsx("div",{className:`
|
|
40
40
|
${r?"":"text-opacity-90"}
|
|
41
|
-
text-white group bg-orange-700 rounded-md inline-flex items-center text-base font-medium hover:text-opacity-100 focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,onMouseEnter:i.bind(null,r),onMouseLeave:l.bind(null,r),"data-testid":"open-tooltip",children:n}),
|
|
41
|
+
text-white group bg-orange-700 rounded-md inline-flex items-center text-base font-medium hover:text-opacity-100 focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,onMouseEnter:i.bind(null,r),onMouseLeave:l.bind(null,r),"data-testid":"open-tooltip",children:n}),f.jsx(Re,{as:a.Fragment,enter:"transition ease-out duration-200",enterFrom:"opacity-0 translate-y-1",enterTo:"opacity-100 translate-y-0",leave:"transition ease-in duration-150",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 translate-y-1",show:r,children:f.jsx("div",{className:F("absolute z-20 px-4 mt-0 sm:px-0",e!==""&&e),children:f.jsx("div",{className:"bg-white p-2 text-center rounded-lg shadow-lg ring-1 ring-black ring-opacity-5",onMouseEnter:i.bind(null,r),onMouseLeave:l.bind(null,r),"data-testid":"message",children:t})})})]})})},_s=({children:e,data:n,className:t="",classNameTooltip:r="w-full",classNameMenu:o="",classNameMenuItems:i="",classNameContainerSearch:l="px-5",isSelectMultiple:s=!1,optionsSelect:u,propObject:c="name",propId:m="id",textNewItem:h="",defaultId:b=null,loading:p=!1,search:v=null,searchPlaceHolder:g="Buscar...",valueSearch:x=void 0,idsOptionSelect:S=null,isComponent:y,hiddenMenu:T=!1,id:I,onClick:N=()=>{},isRelative:k=!0,isMaxWidth:_=!1,isTag:q=!1,isClear:M=!1,clear:$=null,applyButton:R=null,applyButtonText:J="Aplicar",tagsParent:z=[],isReadOnly:B,isDisabledApplyButton:w=!0,isOpenMenu:G=void 0})=>{const[W,ie]=a.useState(new Set),[Q,ne]=a.useState(new Map);a.useEffect(()=>{S!==null&&ie(new Set(new Set(S)))},[S]),a.useEffect(()=>{if(z.length===0)return;const P=new Map;z.forEach(K=>P.set(K.id,K)),ne(P)},[z]),a.useEffect(()=>{M&&(ie(new Set),ne(new Map),$&&$())},[$,M]);const me=P=>{let K=new Map(Q),re=new Set(W),we=null;if(b!==null&&(P[m]===b&&(we=crypto.randomUUID()),we!==null&&(P[m]=we),we!==null&&(P[c]=P[c].replace(h,"").trim())),re.has(P[m])?re.delete(P[m]):re.add(P[m]),K.has(P[m])?K.delete(P[m]):K.set(P[m],P),!s){const A=Array.from(re),V=Array.from(K);A.shift(),V.shift(),re=re.size===2?new Set(A):re,K=K.size===2?new Map(V):K}u(P,Array.from(re),we!==null),ie(re),ne(K)},ge=P=>{N(P===!0?-1:I)},Ce=P=>{const K=new Set(W),re=new Map(Q);K.delete(P[m]),re.delete(P[m]),u(P,Array.from(K)),ie(K),ne(re)};function be(P){if(typeof P!="string")return P;const K=P.toLowerCase();return K.charAt(0).toUpperCase()+K.slice(1)}return f.jsxs(pt,{as:"div",className:F("inline-block text-left",k&&"relative",o!==""&&o),onClick:()=>ge(!0),"data-testid":`menu-${I}`,id:I,children:[f.jsx("style",{children:`
|
|
42
42
|
.blue {
|
|
43
43
|
background-color: #3758F9;
|
|
44
44
|
}
|
|
@@ -55,4 +55,4 @@ Check the top-level render call using <`+O+">.")}return S}}function gr(c,S){{if(
|
|
|
55
55
|
width: 414px;
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
`}),
|
|
58
|
+
`}),f.jsx(pt.Button,{as:"div",onClick:()=>ge(T),"data-testid":`menu-button-${I}`,children:e}),f.jsx("div",{className:F("absolute right-0 z-10",r,T&&"hidden",p&&"w-full"),children:f.jsx(Re,{as:a.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",show:G,children:f.jsx(pt.Items,{className:F("mt-1 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",p?"w-full":i===""&&"w-max",i!==""&&i),children:p?f.jsx("div",{className:"flex justify-center py-4",children:f.jsx(wt,{})}):f.jsxs("div",{className:F(!y&&"pb-1","divide-y divide-gray-100",t!==""&&t,_&&"w-custom"),"data-testid":"dropdown-menu",children:[f.jsxs("div",{className:"flex justify-between items-center sticky top-0 bg-white w-full",children:[v!==null&&f.jsx("div",{className:F("py-2 w-full",l),children:f.jsx(nn,{htmlFor:"search",id:`dropdown-search-${I}`,name:"search",type:"text",placeholder:g,handleChange:P=>v(P,I),icon:g!==""&&f.jsx(ss,{className:"w-4 h-4 text-indigo-300"}),className:"pl-5 pr-4 h-8",classNameContainerInput:"w-full",value:x,onKeyDown:P=>P.key===" "&&P.stopPropagation()})}),R!==null&&f.jsx("div",{className:"pl-1 pr-2 pt-1.5",children:f.jsx(xt,{classNameButton:"bg-secondary-2 hover:bg-secondary-3 font-medium px-5 py-1.5 rounded-md",outline:W.size===0&&w?"":"0px 0px 0px 2px #3758F9, 0px 0px 0px 2px #243BBD, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameText:"text-sm text-white text-center",id:"apply",disabled:W.size===0&&w,onClick:()=>R({id:I,items:Array.from(Q.values())}),children:J})})]}),q&&!B&&f.jsx("div",{className:"flex flex-wrap ml-7 pt-1",children:Array.from(Q).map((P,K)=>f.jsx("div",{className:F(K>0&&"ml-1"),children:f.jsxs("span",{className:"inline-flex items-center gap-x-0.5 rounded-md bg-gray-100 px-2 py-1 text-xs font-medium text-gray-600 mb-1",children:[P[1][c],f.jsx("button",{type:"button",className:"p-0.5 rounded-sm bg-gray-100 hover:bg-gray-300",onClick:()=>Ce(P[1]),"data-testid":`tag-${P[0]}`,children:f.jsx(hs,{className:"h-2.5 w-2.5 stroke-gray-700/50 group-hover:stroke-gray-700/75"})})]})},P))}),(B?[]:n).map((P,K)=>f.jsx("div",{className:F(!y&&"py-1"),children:y?f.jsx("div",{onClick:re=>{re.preventDefault(),u()},"data-testid":`item-component-${K}`,children:P}):f.jsx(pt.Item,{children:f.jsx("span",{className:F(W.has(P[m])&&"blue text-white",!W.has(P[m])&&"text-gray-700 hover:bg-gray-100 hover:text-gray-900","block px-4 py-2 text-13 lg:text-sm cursor-pointer font-normal"),"data-testid":`item-${K}`,onClick:re=>{re.preventDefault(),me(P)},children:be(P[c])})})},K))]})})})})]})},sr=50,Rs=({total:e,handleNext:n,handlePrev:t,handleSelectPage:r,page:o=null})=>{const[i,l]=a.useState(1),[s,u]=a.useState([]),[c,m]=a.useState([]),h=Math.ceil(e/sr);a.useEffect(()=>{const g=[];for(let x=1;x<=h;x++)g.push(x);m(g)},[h]),a.useEffect(()=>{let g=[];const x="...",S="... ",y=" ...";if(c.length<6)g=c;else if(i>=1&&i<=3)g=[1,2,3,4,x,c.length];else if(i===4)g=[...c.slice(0,5),x,c.length];else if(i>4&&i<c.length-2){const T=c.slice(i-2,i),I=c.slice(i,i+1);g=[1,S,...T,...I,y,c.length]}else if(i>c.length-3){const T=c.slice(c.length-4);g=[1,S,...T]}u(g)},[i,c]),a.useEffect(()=>{o!==null&&o!==i&&l(o)},[o,i]);const b=g=>{l(g),r(g)},p=()=>{l(i===1?i:i-1),i>1&&t(i-1)},v=()=>{i===c.length?l(i):l(i+1),i<c.length&&n(i+1)};return f.jsxs("nav",{className:"flex items-center justify-between border-t border-gray-200 px-4 sm:px-0",children:[f.jsx("div",{className:"-mt-px flex w-0 flex-1",children:f.jsxs("span",{className:"inline-flex items-center border-t-2 border-transparent pr-1 pt-4 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700 cursor-pointer",onClick:p,"data-testid":"prev",children:[f.jsx(zl,{className:"mr-3 h-5 w-5 text-gray-400","aria-hidden":"true"}),"Anterior"]})}),f.jsx("div",{className:"hidden md:-mt-px md:flex",children:s.map((g,x)=>f.jsx(or,{className:F("inline-flex items-center border-t-2 px-4 pt-4 text-sm font-medium",i===g?"border-indigo-500 text-indigo-600":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700"),"aria-current":"page",onClick:()=>g!=="..."&&g!==" ..."&&g!=="... "&&b(g),id:`page-${x+1}`,children:g},x))}),f.jsx("div",{className:"-mt-px flex w-0 flex-1 justify-end",children:f.jsxs("span",{className:"inline-flex items-center border-t-2 border-transparent pl-1 pt-4 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700 cursor-pointer",onClick:v,"data-testid":"next",children:["Siguiente",f.jsx(Hl,{className:"ml-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]})})]})},Bs=({setForm:e,setValuesDefault:n,className:t="",classNameContainer:r="",classNameContainerImg:o="",src:i=null,alt:l=null,width:s,height:u})=>{const c=m=>{const{files:h}=m.target,[b]=h,p=new FileReader;p.readAsDataURL(b),p.onload=function(){e(v=>({...v,photo:p.result})),n("photo",p.result)}};return f.jsxs("div",{className:F("col-span-full",r!==""&&r),children:[f.jsx("label",{htmlFor:"cover-photo",className:"block text-sm font-medium leading-6 text-gray-500",children:"Logo (Opcional)"}),f.jsxs("div",{className:F("mt-2 flex justify-center rounded-lg border-2 border-dotted border-gray-300 cursor-pointer relative",i===null&&"px-9 pt-6 pb-2.5",o!==""&&o),children:[i?f.jsx("img",{src:i,alt:l,width:s,height:u,className:F(t!==""&&t),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s",objectFit:"cover",height:u},onLoad:m=>m.currentTarget.style.filter="none","data-testid":"img"}):f.jsxs("div",{className:"text-center",children:[f.jsx(ds,{"aria-hidden":"true",className:"mx-auto h-12 w-12 text-gray-300"}),f.jsxs("div",{className:"mt-4 flex text-sm leading-6 text-gray-600",children:[f.jsx("label",{htmlFor:"file-upload",className:"relative cursor-pointer rounded-md bg-white font-semibold text-indigo-600 focus-within:outline-none focus-within:ring-2 focus-within:ring-indigo-600 focus-within:ring-offset-2 hover:text-indigo-500",children:f.jsx("span",{children:"Upload a file"})}),f.jsx("p",{className:"pl-1",children:"or drag and drop"})]}),f.jsx("p",{className:"text-xs leading-5 text-gray-600",children:"PNG, JPG, GIF up to 10MB"})]}),f.jsx("input",{id:"file-upload",name:"file-upload",type:"file",className:"absolute w-full h-full opacity-0 cursor-pointer",onChange:c})]})]})},zs=({openDefault:e=!1,setForm:n,setValuesDefault:t,title:r,type:o,data:i,dataSelect:l,setData:s,Component:u,id:c,defaultData:m,dispatch:h,isAdd:b=!0,search:p=null,isPadding:v=!0,isReadOnly:g=!1,isEdit:x=!1})=>{const[S,y]=a.useState(!1),[T,I]=a.useState(!1),[N,k]=a.useState(!1),[_,q]=a.useState("");a.useEffect(()=>{y(e),I(x),k(g)},[e,x,g]);const M=({e:z,index:B})=>{const w=Ct(i),{name:G,value:W}=z.target;w[B][G]=W,s(w),t(c,w),n(ie=>({...ie,[c]:w}))},$=()=>{if(i.some(B=>Object.values(B).some(W=>W.value===-1))||i.length===0)return h({type:"ALERT",payload:{title:"",message:"Todos los campos son requeridos",typeAlert:"warning",active:!0}});n(B=>({...B,data:i})),t(c,i),s([...i,m])},R=z=>{if(z===i.length-1)return;const B=Ct(i);B.splice(z,1),n(w=>({...w,copyData:B})),t(c,B),s(B)},J=()=>{I(!T),k(!1)};return f.jsxs("div",{className:"divide-y divide-gray-200 rounded-lg bg-white shadow mt-7",children:[f.jsxs("div",{className:"px-4 py-3.5 sm:px-6 flex justify-between items-center cursor-pointer",onClick:()=>y(!S),"data-testid":`open-accordion-${c}`,children:[f.jsx("p",{className:"text-gray-500 uppercase text-xs font-bold",children:r}),f.jsxs("div",{className:"flex items-center",children:[p&&f.jsx(nn,{htmlFor:"search",id:"search",name:"search",type:"text",autoComplete:"search",placeholder:"Buscar...",handleChange:z=>{p(z),q(z.target.value)},icon:f.jsx(js,{className:"w-6 h-6 text-indigo-300"}),className:"h-9",classNameContainerInput:"w-52 2xs:w-64 max-w-64 mr-8 hidden sm:block",value:_,onClick:z=>z.stopPropagation(),onFocus:()=>y(!0)}),S?f.jsx(Ts,{className:"w-5 h-5 text-default-5"}):f.jsx(Ss,{className:"w-5 h-5 text-default-5"})]})]}),f.jsx(Re,{as:a.Fragment,show:S,enter:"transition duration-[400ms]",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"duration-200 transition ease-in-out",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:f.jsxs("div",{className:F("sm:mt-2.5 py-3.5 relative",v&&"px-4 sm:p-6"),children:[T&&f.jsx(us,{className:"w-5 h-5 text-gray-400 cursor-pointer absolute right-4",onClick:J,"data-testid":`edit-role-${c}`}),i.map((z,B)=>f.jsxs("div",{className:F("flex flex-col 3xs:flex-row mb-4",v&&"ml-0 3xs:ml-3"),children:[f.jsx(u,{item:z,index:B,handleChange:M,readOnly:N,dataSelect:l}),b&&!N&&f.jsx("div",{style:{backgroundColor:"#B0B8BF",width:"25px",height:"25px"},className:F("rounded-full flex justify-center items-center mt-4 3xs:mt-7 ml-2 3xs:ml-5 self-start 3xs:self-center",B===i.length-1&&"3xs:opacity-0"),children:f.jsx(Ns,{className:F("w-6 h-4",B!==i.length-1&&"cursor-pointer"),style:{color:"#637381"},strokeWidth:2.5,onClick:()=>R(B),"data-testid":`delete-item-${B}-${c}`})})]},B)),b&&!N&&f.jsx("p",{className:"text-secondary-2 text-sm font-medium ml-3 cursor-pointer",onClick:$,"data-testid":`add-item-${c}`,children:`+ Añadir ${o}`})]})})]})};L.Accordion=zs,L.Alert=rs,L.Avatar=vs,L.Bullets=gs,L.ButtonOutline=rr,L.ButtonPagination=or,L.ButtonSolid=xt,L.Checkbox=xs,L.ConfirmationAbandoningCreation=Fs,L.CoverPhoto=Bs,L.Divider=$s,L.Dropdown=_s,L.GoBack=Ps,L.Input=nn,L.InputDropdown=Ms,L.MESSAGE_ABORT_CONTROLLER=Cr,L.MESSAGE_SIGNAL_ABORTED_WITHOUT_REASON=Tr,L.Modal=ir,L.Pagination=Rs,L.Select=lr,L.Spinner=ks,L.SpinnerIcon=wt,L.Switch=As,L.Textarea=Ds,L.Tooltip=Ls,L.classNames=F,L.copyOptions=Ct,L.generateAvatarInitials=Er,L.isPromise=Sr,L.rowsPerPage=sr,L.useCloseModal=Or,L.useForm=jr,L.useMediaQuery=Ir,L.useWindowDimensions=Tt,L.validateEmail=cn,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})});
|