cemtrik-dependencies 1.0.187 → 1.0.188
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 +29 -29
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(Ne,g){typeof exports=="object"&&typeof module<"u"?g(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],g):(Ne=typeof globalThis<"u"?globalThis:Ne||self,g(Ne.MyApp={},Ne.React,Ne.ReactDOM))})(this,function(Ne,g,Er){"use strict";function ts(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(o,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return o.default=e,Object.freeze(o)}const q=ts(g),eo=(e,o=!1)=>{function r(u){if(typeof u!="object"||u===null)return u;const f=Array.isArray(u)?[]:{};for(const a in u)u.hasOwnProperty(a)&&!o&&(f[a]=r(u[a]));return f}return e.map(u=>r(u))},di=e=>/^(?:[^<>()[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*|"[^\n"]+")@(?:[^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{2,63}$/i.test(e);function le(...e){return e.filter(Boolean).join(" ")}const ns=e=>{const o=e.split(" ");let r=e.slice(0,2);return o.length>1&&(r=`${e.at(0)}${o[o.length-1].slice(0,1)}`),r},rs=e=>typeof e!="string"&&Promise.resolve(e)instanceof Promise,os="The user aborted a request.",is="signal is aborted without reason",ls=({id:e,close:o})=>{g.useEffect(()=>{const r=n=>{const u=document.getElementById(e);u&&(u.contains(n.target)||o())};return document.addEventListener("click",r,!0),()=>{document.removeEventListener("click",r,!0)}},[e,o])},ss=()=>{const e=g.useRef({}),[o,r]=g.useState({}),[n,u]=g.useState({}),[f,a]=g.useState([]);g.useEffect(()=>{e.current={}},[]);const m=P=>C=>{C.preventDefault(),C.stopPropagation(),P(o)},v=(P,C,M)=>{const{checked:R,value:L,name:B,type:_,id:z}=P.target,X={radio:z,checkbox:R};e.current={...M,...e.current,[B]:X[_]??L},r({...e.current,[B]:X[_]??L}),C({...e.current,[B]:X[_]??L})},x=g.useCallback((P,C)=>{e.current={...e.current,[P]:C},r(M=>({...M,[P]:C}))},[]),E=g.useCallback((P,C)=>{const M=C.filter(R=>P[R]===""||P[R]===void 0);return M.forEach(R=>u(L=>({...L,[R]:"Este campo es requerido"}))),a(M),M.length>0},[]);return{handleSubmit:m,handleChange:v,setValuesDefault:x,validateFields:E,errors:f,model:o,handleError:(P,C)=>{C.forEach(M=>u(R=>({...R,[M]:P}))),a(C)},messageError:n,setModel:r}},as=e=>{const[o,r]=g.useState(!0),[n,u]=g.useState(!1),f=g.useCallback((a,m)=>{const v=e.match(/[0-9]+/g);if(v===null)return;const[x]=v;m=Math.min(window.innerWidth,window.outerWidth);const E=a?m>=Number(x):m<=Number(x);u(E)},[e]);return g.useEffect(()=>{const a=/\(min-width:\s?[0-9]+px\)/gi.test(e),m=/\(max-width:\s?[0-9]+px\)/gi.test(e);if(!a&&!m&&r(!1),!a&&!m)return;const v=Math.min(window.innerWidth,window.outerWidth);f(a,v)},[e,f]),g.useEffect(()=>{if(!o)return;const a=Math.min(window.innerWidth,window.outerWidth);function m(){const v=/min-width/gi.test(e);f(v,a)}return window.addEventListener("resize",m),()=>window.removeEventListener("resize",m)},[o,e,f]),n},fi=()=>{const[e,o]=g.useState({width:0,height:0});return g.useEffect(()=>{const r=()=>{const n=Math.min(window.innerWidth,window.outerWidth),u=Math.min(window.innerHeight,window.outerHeight);o({width:n,height:u})};return requestAnimationFrame(()=>r()),window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[]),e};var us=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function cs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var to={exports:{}},$n={};/**
|
|
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
|
|
9
|
+
*/var pi;function ds(){if(pi)return $n;pi=1;var e=g,o=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,u=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,f={key:!0,ref:!0,__self:!0,__source:!0};function a(m,v,x){var E,I={},P=null,C=null;x!==void 0&&(P=""+x),v.key!==void 0&&(P=""+v.key),v.ref!==void 0&&(C=v.ref);for(E in v)n.call(v,E)&&!f.hasOwnProperty(E)&&(I[E]=v[E]);if(m&&m.defaultProps)for(E in v=m.defaultProps,v)I[E]===void 0&&(I[E]=v[E]);return{$$typeof:o,type:m,key:P,ref:C,props:I,_owner:u.current}}return $n.Fragment=r,$n.jsx=a,$n.jsxs=a,$n}var _n={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,25 +14,25 @@
|
|
|
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
|
|
18
|
-
`+
|
|
19
|
-
`),
|
|
20
|
-
`),
|
|
21
|
-
`+
|
|
17
|
+
*/var mi;function fs(){return mi||(mi=1,process.env.NODE_ENV!=="production"&&function(){var e=g,o=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),m=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),C=Symbol.for("react.offscreen"),M=Symbol.iterator,R="@@iterator";function L(j){if(j===null||typeof j!="object")return null;var H=M&&j[M]||j[R];return typeof H=="function"?H:null}var B=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function _(j){{for(var H=arguments.length,Q=new Array(H>1?H-1:0),me=1;me<H;me++)Q[me-1]=arguments[me];z("error",j,Q)}}function z(j,H,Q){{var me=B.ReactDebugCurrentFrame,Le=me.getStackAddendum();Le!==""&&(H+="%s",Q=Q.concat([Le]));var he=Q.map(function(Ae){return String(Ae)});he.unshift("Warning: "+H),Function.prototype.apply.call(console[j],console,he)}}var X=!1,te=!1,ue=!1,we=!1,je=!1,ge;ge=Symbol.for("react.module.reference");function y(j){return!!(typeof j=="string"||typeof j=="function"||j===n||j===f||je||j===u||j===x||j===E||we||j===C||X||te||ue||typeof j=="object"&&j!==null&&(j.$$typeof===P||j.$$typeof===I||j.$$typeof===a||j.$$typeof===m||j.$$typeof===v||j.$$typeof===ge||j.getModuleId!==void 0))}function pe(j,H,Q){var me=j.displayName;if(me)return me;var Le=H.displayName||H.name||"";return Le!==""?Q+"("+Le+")":Q}function Pe(j){return j.displayName||"Context"}function $e(j){if(j==null)return null;if(typeof j.tag=="number"&&_("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof j=="function")return j.displayName||j.name||null;if(typeof j=="string")return j;switch(j){case n:return"Fragment";case r:return"Portal";case f:return"Profiler";case u:return"StrictMode";case x:return"Suspense";case E:return"SuspenseList"}if(typeof j=="object")switch(j.$$typeof){case m:var H=j;return Pe(H)+".Consumer";case a:var Q=j;return Pe(Q._context)+".Provider";case v:return pe(j,j.render,"ForwardRef");case I:var me=j.displayName||null;return me!==null?me:$e(j.type)||"Memo";case P:{var Le=j,he=Le._payload,Ae=Le._init;try{return $e(Ae(he))}catch{return null}}}return null}var nt=Object.assign,V=0,et,Re,Y,ne,ve,_e,He;function at(){}at.__reactDisabledLog=!0;function rt(){{if(V===0){et=console.log,Re=console.info,Y=console.warn,ne=console.error,ve=console.group,_e=console.groupCollapsed,He=console.groupEnd;var j={configurable:!0,enumerable:!0,value:at,writable:!0};Object.defineProperties(console,{info:j,log:j,warn:j,error:j,group:j,groupCollapsed:j,groupEnd:j})}V++}}function Ct(){{if(V--,V===0){var j={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:nt({},j,{value:et}),info:nt({},j,{value:Re}),warn:nt({},j,{value:Y}),error:nt({},j,{value:ne}),group:nt({},j,{value:ve}),groupCollapsed:nt({},j,{value:_e}),groupEnd:nt({},j,{value:He})})}V<0&&_("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Te=B.ReactCurrentDispatcher,Ze;function Ge(j,H,Q){{if(Ze===void 0)try{throw Error()}catch(Le){var me=Le.stack.trim().match(/\n( *(at )?)/);Ze=me&&me[1]||""}return`
|
|
18
|
+
`+Ze+j}}var se=!1,ke;{var K=typeof WeakMap=="function"?WeakMap:Map;ke=new K}function ye(j,H){if(!j||se)return"";{var Q=ke.get(j);if(Q!==void 0)return Q}var me;se=!0;var Le=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var he;he=Te.current,Te.current=null,rt();try{if(H){var Ae=function(){throw Error()};if(Object.defineProperty(Ae.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ae,[])}catch(qt){me=qt}Reflect.construct(j,[],Ae)}else{try{Ae.call()}catch(qt){me=qt}j.call(Ae.prototype)}}else{try{throw Error()}catch(qt){me=qt}j()}}catch(qt){if(qt&&me&&typeof qt.stack=="string"){for(var Be=qt.stack.split(`
|
|
19
|
+
`),Rt=me.stack.split(`
|
|
20
|
+
`),Ee=Be.length-1,bt=Rt.length-1;Ee>=1&&bt>=0&&Be[Ee]!==Rt[bt];)bt--;for(;Ee>=1&&bt>=0;Ee--,bt--)if(Be[Ee]!==Rt[bt]){if(Ee!==1||bt!==1)do if(Ee--,bt--,bt<0||Be[Ee]!==Rt[bt]){var $t=`
|
|
21
|
+
`+Be[Ee].replace(" at new "," at ");return j.displayName&&$t.includes("<anonymous>")&&($t=$t.replace("<anonymous>",j.displayName)),typeof j=="function"&&ke.set(j,$t),$t}while(Ee>=1&&bt>=0);break}}}finally{se=!1,Te.current=he,Ct(),Error.prepareStackTrace=Le}var gn=j?j.displayName||j.name:"",an=gn?Ge(gn):"";return typeof j=="function"&&ke.set(j,an),an}function Me(j,H,Q){return ye(j,!1)}function Fe(j){var H=j.prototype;return!!(H&&H.isReactComponent)}function Pt(j,H,Q){if(j==null)return"";if(typeof j=="function")return ye(j,Fe(j));if(typeof j=="string")return Ge(j);switch(j){case x:return Ge("Suspense");case E:return Ge("SuspenseList")}if(typeof j=="object")switch(j.$$typeof){case v:return Me(j.render);case I:return Pt(j.type,H,Q);case P:{var me=j,Le=me._payload,he=me._init;try{return Pt(he(Le),H,Q)}catch{}}}return""}var Zt=Object.prototype.hasOwnProperty,ee={},er=B.ReactDebugCurrentFrame;function ln(j){if(j){var H=j._owner,Q=Pt(j.type,j._source,H?H.type:null);er.setExtraStackFrame(Q)}else er.setExtraStackFrame(null)}function _t(j,H,Q,me,Le){{var he=Function.call.bind(Zt);for(var Ae in j)if(he(j,Ae)){var Be=void 0;try{if(typeof j[Ae]!="function"){var Rt=Error((me||"React class")+": "+Q+" type `"+Ae+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof j[Ae]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Rt.name="Invariant Violation",Rt}Be=j[Ae](H,Ae,me,Q,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ee){Be=Ee}Be&&!(Be instanceof Error)&&(ln(Le),_("%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).",me||"React class",Q,Ae,typeof Be),ln(null)),Be instanceof Error&&!(Be.message in ee)&&(ee[Be.message]=!0,ln(Le),_("Failed %s type: %s",Q,Be.message),ln(null))}}}var Gt=Array.isArray;function tr(j){return Gt(j)}function hn(j){{var H=typeof Symbol=="function"&&Symbol.toStringTag,Q=H&&j[Symbol.toStringTag]||j.constructor.name||"Object";return Q}}function $r(j){try{return Ft(j),!1}catch{return!0}}function Ft(j){return""+j}function pt(j){if($r(j))return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",hn(j)),Ft(j)}var Xt=B.ReactCurrentOwner,nr={key:!0,ref:!0,__self:!0,__source:!0},Ht,rr,or;or={};function _r(j){if(Zt.call(j,"ref")){var H=Object.getOwnPropertyDescriptor(j,"ref").get;if(H&&H.isReactWarning)return!1}return j.ref!==void 0}function ir(j){if(Zt.call(j,"key")){var H=Object.getOwnPropertyDescriptor(j,"key").get;if(H&&H.isReactWarning)return!1}return j.key!==void 0}function lr(j,H){if(typeof j.ref=="string"&&Xt.current&&H&&Xt.current.stateNode!==H){var Q=$e(Xt.current.type);or[Q]||(_('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',$e(Xt.current.type),j.ref),or[Q]=!0)}}function Br(j,H){{var Q=function(){Ht||(Ht=!0,_("%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)",H))};Q.isReactWarning=!0,Object.defineProperty(j,"key",{get:Q,configurable:!0})}}function Ao(j,H){{var Q=function(){rr||(rr=!0,_("%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)",H))};Q.isReactWarning=!0,Object.defineProperty(j,"ref",{get:Q,configurable:!0})}}var Jt=function(j,H,Q,me,Le,he,Ae){var Be={$$typeof:o,type:j,key:H,ref:Q,props:Ae,_owner:he};return Be._store={},Object.defineProperty(Be._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Be,"_self",{configurable:!1,enumerable:!1,writable:!1,value:me}),Object.defineProperty(Be,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Le}),Object.freeze&&(Object.freeze(Be.props),Object.freeze(Be)),Be};function Do(j,H,Q,me,Le){{var he,Ae={},Be=null,Rt=null;Q!==void 0&&(pt(Q),Be=""+Q),ir(H)&&(pt(H.key),Be=""+H.key),_r(H)&&(Rt=H.ref,lr(H,Le));for(he in H)Zt.call(H,he)&&!nr.hasOwnProperty(he)&&(Ae[he]=H[he]);if(j&&j.defaultProps){var Ee=j.defaultProps;for(he in Ee)Ae[he]===void 0&&(Ae[he]=Ee[he])}if(Be||Rt){var bt=typeof j=="function"?j.displayName||j.name||"Unknown":j;Be&&Br(Ae,bt),Rt&&Ao(Ae,bt)}return Jt(j,Be,Rt,Le,me,Xt.current,Ae)}}var sr=B.ReactCurrentOwner,Pn=B.ReactDebugCurrentFrame;function vn(j){if(j){var H=j._owner,Q=Pt(j.type,j._source,H?H.type:null);Pn.setExtraStackFrame(Q)}else Pn.setExtraStackFrame(null)}var sn;sn=!1;function Fn(j){return typeof j=="object"&&j!==null&&j.$$typeof===o}function zr(){{if(sr.current){var j=$e(sr.current.type);if(j)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+
|
|
23
|
+
Check the render method of \``+j+"`."}return""}}function Wr(j){return""}var jn={};function Hr(j){{var H=zr();if(!H){var Q=typeof j=="string"?j:j.displayName||j.name;Q&&(H=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+
|
|
25
|
+
Check the top-level render call using <`+Q+">.")}return H}}function Rn(j,H){{if(!j._store||j._store.validated||j.key!=null)return;j._store.validated=!0;var Q=Hr(H);if(jn[Q])return;jn[Q]=!0;var me="";j&&j._owner&&j._owner!==sr.current&&(me=" It was passed a child from "+$e(j._owner.type)+"."),vn(j),_('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Q,me),vn(null)}}function Qt(j,H){{if(typeof j!="object")return;if(tr(j))for(var Q=0;Q<j.length;Q++){var me=j[Q];Fn(me)&&Rn(me,H)}else if(Fn(j))j._store&&(j._store.validated=!0);else if(j){var Le=L(j);if(typeof Le=="function"&&Le!==j.entries)for(var he=Le.call(j),Ae;!(Ae=he.next()).done;)Fn(Ae.value)&&Rn(Ae.value,H)}}}function Ur(j){{var H=j.type;if(H==null||typeof H=="string")return;var Q;if(typeof H=="function")Q=H.propTypes;else if(typeof H=="object"&&(H.$$typeof===v||H.$$typeof===I))Q=H.propTypes;else return;if(Q){var me=$e(H);_t(Q,j.props,"prop",me,j)}else if(H.PropTypes!==void 0&&!sn){sn=!0;var Le=$e(H);_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Le||"Unknown")}typeof H.getDefaultProps=="function"&&!H.getDefaultProps.isReactClassApproved&&_("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ar(j){{for(var H=Object.keys(j.props),Q=0;Q<H.length;Q++){var me=H[Q];if(me!=="children"&&me!=="key"){vn(j),_("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",me),vn(null);break}}j.ref!==null&&(vn(j),_("Invalid attribute `ref` supplied to `React.Fragment`."),vn(null))}}function ur(j,H,Q,me,Le,he){{var Ae=y(j);if(!Ae){var Be="";(j===void 0||typeof j=="object"&&j!==null&&Object.keys(j).length===0)&&(Be+=" 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 Rt=Wr();Rt?Be+=Rt:Be+=zr();var Ee;j===null?Ee="null":tr(j)?Ee="array":j!==void 0&&j.$$typeof===o?(Ee="<"+($e(j.type)||"Unknown")+" />",Be=" Did you accidentally export a JSX literal instead of a component?"):Ee=typeof j,_("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ee,Be)}var bt=Do(j,H,Q,Le,he);if(bt==null)return bt;if(Ae){var $t=H.children;if($t!==void 0)if(me)if(tr($t)){for(var gn=0;gn<$t.length;gn++)Qt($t[gn],j);Object.freeze&&Object.freeze($t)}else _("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 Qt($t,j)}return j===n?ar(bt):Ur(bt),bt}}function $o(j,H,Q){return ur(j,H,Q,!0)}function wt(j,H,Q){return ur(j,H,Q,!1)}var Vr=wt,Yr=$o;_n.Fragment=n,_n.jsx=Vr,_n.jsxs=Yr}()),_n}process.env.NODE_ENV==="production"?to.exports=ds():to.exports=fs();var w=to.exports;function Bn(e,o,r){let n=r.initialDeps??[],u;return()=>{var f,a,m,v;let x;r.key&&((f=r.debug)!=null&&f.call(r))&&(x=Date.now());const E=e();if(!(E.length!==n.length||E.some((C,M)=>n[M]!==C)))return u;n=E;let P;if(r.key&&((a=r.debug)!=null&&a.call(r))&&(P=Date.now()),u=o(...E),r.key&&((m=r.debug)!=null&&m.call(r))){const C=Math.round((Date.now()-x)*100)/100,M=Math.round((Date.now()-P)*100)/100,R=M/16,L=(B,_)=>{for(B=String(B);B.length<_;)B=" "+B;return B};console.info(`%c⏱ ${L(M,5)} /${L(C,5)} ms`,`
|
|
26
26
|
font-size: .6rem;
|
|
27
27
|
font-weight: bold;
|
|
28
|
-
color: hsl(${Math.max(0,Math.min(120-120*D,120))}deg 100% 31%);`,r==null?void 0:r.key)}return(v=r==null?void 0:r.onChange)==null||v.call(r,u),u}}function eo(t,l){if(t===void 0)throw new Error("Unexpected undefined");return t}const ss=(t,l)=>Math.abs(t-l)<1,as=(t,l,r)=>{let n;return function(...u){t.clearTimeout(n),n=t.setTimeout(()=>l.apply(this,u),r)}},us=t=>t,cs=t=>{const l=Math.max(t.startIndex-t.overscan,0),r=Math.min(t.endIndex+t.overscan,t.count-1),n=[];for(let u=l;u<=r;u++)n.push(u);return n},ds=(t,l)=>{const r=t.scrollElement;if(!r)return;const n=t.targetWindow;if(!n)return;const u=a=>{const{width:m,height:v}=a;l({width:Math.round(m),height:Math.round(v)})};if(u(r.getBoundingClientRect()),!n.ResizeObserver)return()=>{};const f=new n.ResizeObserver(a=>{const m=a[0];if(m!=null&&m.borderBoxSize){const v=m.borderBoxSize[0];if(v){u({width:v.inlineSize,height:v.blockSize});return}}u(r.getBoundingClientRect())});return f.observe(r,{box:"border-box"}),()=>{f.unobserve(r)}},fl={passive:!0},fs=typeof window>"u"?!0:"onscrollend"in window,ps=(t,l)=>{const r=t.scrollElement;if(!r)return;const n=t.targetWindow;if(!n)return;let u=0;const f=fs?()=>{}:as(n,()=>{l(u,!1)},t.options.isScrollingResetDelay),a=x=>()=>{u=r[t.options.horizontal?"scrollLeft":"scrollTop"],f(),l(u,x)},m=a(!0),v=a(!1);return v(),r.addEventListener("scroll",m,fl),r.addEventListener("scrollend",v,fl),()=>{r.removeEventListener("scroll",m),r.removeEventListener("scrollend",v)}},ms=(t,l,r)=>{if(l!=null&&l.borderBoxSize){const n=l.borderBoxSize[0];if(n)return Math.round(n[r.options.horizontal?"inlineSize":"blockSize"])}return Math.round(t.getBoundingClientRect()[r.options.horizontal?"width":"height"])},hs=(t,{adjustments:l=0,behavior:r},n)=>{var u,f;const a=t+l;(f=(u=n.scrollElement)==null?void 0:u.scrollTo)==null||f.call(u,{[n.options.horizontal?"left":"top"]:a,behavior:r})};class vs{constructor(l){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 r=null;const n=()=>r||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:r=new this.targetWindow.ResizeObserver(u=>{u.forEach(f=>{this._measureElement(f.target,f)})}));return{disconnect:()=>{var u;return(u=n())==null?void 0:u.disconnect()},observe:u=>{var f;return(f=n())==null?void 0:f.observe(u,{box:"border-box"})},unobserve:u=>{var f;return(f=n())==null?void 0:f.unobserve(u)}}})(),this.range=null,this.setOptions=r=>{Object.entries(r).forEach(([n,u])=>{typeof u>"u"&&delete r[n]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:us,rangeExtractor:cs,onChange:()=>{},measureElement:ms,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,...r}},this.notify=(r,n)=>{var u,f;const{startIndex:a,endIndex:m}=this.range??{startIndex:void 0,endIndex:void 0},v=this.calculateRange();(r||a!==(v==null?void 0:v.startIndex)||m!==(v==null?void 0:v.endIndex))&&((f=(u=this.options).onChange)==null||f.call(u,this,n))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(r=>r()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var r;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.notify(!1,!1);return}this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((r=this.scrollElement)==null?void 0:r.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,u=>{this.scrollRect=u,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(u,f)=>{this.scrollAdjustments=0,this.scrollDirection=f?this.getScrollOffset()<u?"forward":"backward":null,this.scrollOffset=u;const a=this.isScrolling;this.isScrolling=f,this.notify(a!==f,f)}))}},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=(r,n)=>{const u=new Map,f=new Map;for(let a=n-1;a>=0;a--){const m=r[a];if(u.has(m.lane))continue;const v=f.get(m.lane);if(v==null||m.end>v.end?f.set(m.lane,m):m.end<v.end&&u.set(m.lane,!0),u.size===this.options.lanes)break}return f.size===this.options.lanes?Array.from(f.values()).sort((a,m)=>a.end===m.end?a.index-m.index:a.end-m.end)[0]:void 0},this.getMeasurementOptions=Bn(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(r,n,u,f,a)=>(this.pendingMeasuredCacheIndexes=[],{count:r,paddingStart:n,scrollMargin:u,getItemKey:f,enabled:a}),{key:!1}),this.getMeasurements=Bn(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:r,paddingStart:n,scrollMargin:u,getItemKey:f,enabled:a},m)=>{var v;if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(k=>{this.itemSizeCache.set(k.key,k.size)}));const x=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const E=this.measurementsCache.slice(0,x);for(let k=x;k<r;k++){let M=(v=this.measurementsCache[k])==null?void 0:v.measureElement;M||(M=K=>{const re=f(k),fe=this.elementsCache.get(re);if(!K){fe&&(this.observer.unobserve(fe),this.elementsCache.delete(re));return}fe!==K&&(fe&&this.observer.unobserve(fe),this.observer.observe(K),this.elementsCache.set(re,K)),K.isConnected&&this.resizeItem(k,this.options.measureElement(K,void 0,this))});const C=f(k),F=this.options.lanes===1?E[k-1]:this.getFurthestMeasurement(E,k),D=F?F.end+this.options.gap:n+u,$=m.get(C),B=typeof $=="number"?$:this.options.estimateSize(k),_=D+B,W=F?F.lane:k%this.options.lanes;E[k]={index:k,start:D,size:B,end:_,key:C,lane:W,measureElement:M}}return this.measurementsCache=E,E},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Bn(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(r,n,u)=>this.range=r.length>0&&n>0?gs({measurements:r,outerSize:n,scrollOffset:u}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getIndexes=Bn(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(r,n,u,f)=>n===null?[]:r({startIndex:n.startIndex,endIndex:n.endIndex,overscan:u,count:f}),{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.indexFromElement=r=>{const n=this.options.indexAttribute,u=r.getAttribute(n);return u?parseInt(u,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this._measureElement=(r,n)=>{const u=this.indexFromElement(r),f=this.getMeasurements()[u];if(!f||!r.isConnected){this.elementsCache.forEach((m,v)=>{m===r&&(this.observer.unobserve(r),this.elementsCache.delete(v))});return}const a=this.elementsCache.get(f.key);a!==r&&(a&&this.observer.unobserve(a),this.observer.observe(r),this.elementsCache.set(f.key,r)),this.resizeItem(u,this.options.measureElement(r,n,this))},this.resizeItem=(r,n)=>{const u=this.getMeasurements()[r];if(!u)return;const f=this.itemSizeCache.get(u.key)??u.size,a=n-f;a!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(u,a,this):u.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",a),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=a,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(u.index),this.itemSizeCache=new Map(this.itemSizeCache.set(u.key,n)),this.notify(!0,!1))},this.measureElement=r=>{r&&this._measureElement(r,void 0)},this.getVirtualItems=Bn(()=>[this.getIndexes(),this.getMeasurements()],(r,n)=>{const u=[];for(let f=0,a=r.length;f<a;f++){const m=r[f],v=n[m];u.push(v)}return u},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=r=>{const n=this.getMeasurements();if(n.length!==0)return eo(n[pl(0,n.length-1,u=>eo(n[u]).start,r)])},this.getOffsetForAlignment=(r,n)=>{const u=this.getSize(),f=this.getScrollOffset();n==="auto"&&(r<=f?n="start":r>=f+u?n="end":n="start"),n==="start"?r=r:n==="end"?r=r-u:n==="center"&&(r=r-u/2);const a=this.options.horizontal?"scrollWidth":"scrollHeight",v=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[a]:this.scrollElement[a]:0)-u;return Math.max(Math.min(v,r),0)},this.getOffsetForIndex=(r,n="auto")=>{r=Math.max(0,Math.min(r,this.options.count-1));const u=this.getMeasurements()[r];if(!u)return;const f=this.getSize(),a=this.getScrollOffset();if(n==="auto")if(u.end>=a+f-this.options.scrollPaddingEnd)n="end";else if(u.start<=a+this.options.scrollPaddingStart)n="start";else return[a,n];const m=n==="end"?u.end+this.options.scrollPaddingEnd:u.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(m,n),n]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(r,{align:n="start",behavior:u}={})=>{this.cancelScrollToIndex(),u==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(r,n),{adjustments:void 0,behavior:u})},this.scrollToIndex=(r,{align:n="auto",behavior:u}={})=>{r=Math.max(0,Math.min(r,this.options.count-1)),this.cancelScrollToIndex(),u==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const f=this.getOffsetForIndex(r,n);if(!f)return;const[a,m]=f;this._scrollToOffset(a,{adjustments:void 0,behavior:u}),u!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(r))){const[x]=eo(this.getOffsetForIndex(r,m));ss(x,this.getScrollOffset())||this.scrollToIndex(r,{align:m,behavior:u})}else this.scrollToIndex(r,{align:m,behavior:u})}))},this.scrollBy=(r,{behavior:n}={})=>{this.cancelScrollToIndex(),n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+r,{adjustments:void 0,behavior:n})},this.getTotalSize=()=>{var r;const n=this.getMeasurements();let u;return n.length===0?u=this.options.paddingStart:u=this.options.lanes===1?((r=n[n.length-1])==null?void 0:r.end)??0:Math.max(...n.slice(-this.options.lanes).map(f=>f.end)),u-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(r,{adjustments:n,behavior:u})=>{this.options.scrollToFn(r,{behavior:u,adjustments:n},this)},this.measure=()=>{var r,n;this.itemSizeCache=new Map,(n=(r=this.options).onChange)==null||n.call(r,this,!1)},this.setOptions(l)}}const pl=(t,l,r,n)=>{for(;t<=l;){const u=(t+l)/2|0,f=r(u);if(f<n)t=u+1;else if(f>n)l=u-1;else return u}return t>0?t-1:0};function gs({measurements:t,outerSize:l,scrollOffset:r}){const n=t.length-1,f=pl(0,n,m=>t[m].start,r);let a=f;for(;a<n&&t[a].end<r+l;)a++;return{startIndex:f,endIndex:a}}const bs=typeof document<"u"?G.useLayoutEffect:G.useEffect;function xs(t){const l=G.useReducer(()=>({}),{})[1],r={...t,onChange:(u,f)=>{var a;f?wr.flushSync(l):l(),(a=t.onChange)==null||a.call(t,u,f)}},[n]=G.useState(()=>new vs(r));return n.setOptions(r),G.useEffect(()=>n._didMount(),[]),bs(()=>n._willUpdate()),n}function ys(t){return xs({observeElementRect:ds,observeElementOffset:ps,scrollToFn:hs,...t})}var ws=Object.defineProperty,Es=(t,l,r)=>l in t?ws(t,l,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[l]=r,to=(t,l,r)=>(Es(t,typeof l!="symbol"?l+"":l,r),r);let Ss=class{constructor(){to(this,"current",this.detect()),to(this,"handoffState","pending"),to(this,"currentId",0)}set(l){this.current!==l&&(this.handoffState="pending",this.currentId=0,this.current=l)}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"}},en=new Ss,tt=(t,l)=>{en.isServer?b.useEffect(t,l):b.useLayoutEffect(t,l)};function Vt(t){let l=b.useRef(t);return tt(()=>{l.current=t},[t]),l}function no(t,l){let[r,n]=b.useState(t),u=Vt(t);return tt(()=>n(u.current),[u,n,...l]),r}let te=function(t){let l=Vt(t);return b.useCallback((...r)=>l.current(...r),[l])};function ml(t,l,r){let[n,u]=b.useState(r),f=t!==void 0,a=b.useRef(f),m=b.useRef(!1),v=b.useRef(!1);return f&&!a.current&&!m.current?(m.current=!0,a.current=f,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.")):!f&&a.current&&!v.current&&(v.current=!0,a.current=f,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.")),[f?t:n,te(x=>(f||u(x),l==null?void 0:l(x)))]}function Er(t){typeof queueMicrotask=="function"?queueMicrotask(t):Promise.resolve().then(t).catch(l=>setTimeout(()=>{throw l}))}function Wt(){let t=[],l={addEventListener(r,n,u,f){return r.addEventListener(n,u,f),l.add(()=>r.removeEventListener(n,u,f))},requestAnimationFrame(...r){let n=requestAnimationFrame(...r);return l.add(()=>cancelAnimationFrame(n))},nextFrame(...r){return l.requestAnimationFrame(()=>l.requestAnimationFrame(...r))},setTimeout(...r){let n=setTimeout(...r);return l.add(()=>clearTimeout(n))},microTask(...r){let n={current:!0};return Er(()=>{n.current&&r[0]()}),l.add(()=>{n.current=!1})},style(r,n,u){let f=r.style.getPropertyValue(n);return Object.assign(r.style,{[n]:u}),this.add(()=>{Object.assign(r.style,{[n]:f})})},group(r){let n=Wt();return r(n),this.add(()=>n.dispose())},add(r){return t.push(r),()=>{let n=t.indexOf(r);if(n>=0)for(let u of t.splice(n,1))u()}},dispose(){for(let r of t.splice(0))r()}};return l}function tn(){let[t]=b.useState(Wt);return b.useEffect(()=>()=>t.dispose(),[t]),t}function Cs(){let t=typeof document>"u";return"useSyncExternalStore"in G?(l=>l.useSyncExternalStore)(G)(()=>()=>{},()=>!1,()=>!t):!1}function kn(){let t=Cs(),[l,r]=G.useState(en.isHandoffComplete);return l&&en.isHandoffComplete===!1&&r(!1),G.useEffect(()=>{l!==!0&&r(!0)},[l]),G.useEffect(()=>en.handoff(),[]),t?!1:l}var hl;let Dt=(hl=b.useId)!=null?hl:function(){let t=kn(),[l,r]=b.useState(t?()=>en.nextId():null);return tt(()=>{l===null&&r(en.nextId())},[l]),l!=null?""+l:void 0};function bt(t,l,...r){if(t in l){let u=l[t];return typeof u=="function"?u(...r):u}let n=new Error(`Tried to handle "${t}" but there is no handler defined. Only defined handlers are: ${Object.keys(l).map(u=>`"${u}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,bt),n}function Sr(t){return en.isServer?null:t instanceof Node?t.ownerDocument:t!=null&&t.hasOwnProperty("current")&&t.current instanceof Node?t.current.ownerDocument:document}let ro=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(t=>`${t}:not([tabindex='-1'])`).join(",");var nn=(t=>(t[t.First=1]="First",t[t.Previous=2]="Previous",t[t.Next=4]="Next",t[t.Last=8]="Last",t[t.WrapAround=16]="WrapAround",t[t.NoScroll=32]="NoScroll",t))(nn||{}),vl=(t=>(t[t.Error=0]="Error",t[t.Overflow=1]="Overflow",t[t.Success=2]="Success",t[t.Underflow=3]="Underflow",t))(vl||{}),js=(t=>(t[t.Previous=-1]="Previous",t[t.Next=1]="Next",t))(js||{});function gl(t=document.body){return t==null?[]:Array.from(t.querySelectorAll(ro)).sort((l,r)=>Math.sign((l.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}var oo=(t=>(t[t.Strict=0]="Strict",t[t.Loose=1]="Loose",t))(oo||{});function lo(t,l=0){var r;return t===((r=Sr(t))==null?void 0:r.body)?!1:bt(l,{0(){return t.matches(ro)},1(){let n=t;for(;n!==null;){if(n.matches(ro))return!0;n=n.parentElement}return!1}})}function bl(t){let l=Sr(t);Wt().nextFrame(()=>{l&&!lo(l.activeElement,0)&&cn(t)})}var Ts=(t=>(t[t.Keyboard=0]="Keyboard",t[t.Mouse=1]="Mouse",t))(Ts||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",t=>{t.metaKey||t.altKey||t.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",t=>{t.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:t.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function cn(t){t==null||t.focus({preventScroll:!0})}let Os=["textarea","input"].join(",");function Ns(t){var l,r;return(r=(l=t==null?void 0:t.matches)==null?void 0:l.call(t,Os))!=null?r:!1}function io(t,l=r=>r){return t.slice().sort((r,n)=>{let u=l(r),f=l(n);if(u===null||f===null)return 0;let a=u.compareDocumentPosition(f);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Is(t,l){return zn(gl(),l,{relativeTo:t})}function zn(t,l,{sorted:r=!0,relativeTo:n=null,skipElements:u=[]}={}){let f=Array.isArray(t)?t.length>0?t[0].ownerDocument:document:t.ownerDocument,a=Array.isArray(t)?r?io(t):t:gl(t);u.length>0&&a.length>1&&(a=a.filter(C=>!u.includes(C))),n=n??f.activeElement;let m=(()=>{if(l&5)return 1;if(l&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),v=(()=>{if(l&1)return 0;if(l&2)return Math.max(0,a.indexOf(n))-1;if(l&4)return Math.max(0,a.indexOf(n))+1;if(l&8)return a.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),x=l&32?{preventScroll:!0}:{},E=0,k=a.length,M;do{if(E>=k||E+k<=0)return 0;let C=v+E;if(l&16)C=(C+k)%k;else{if(C<0)return 3;if(C>=k)return 1}M=a[C],M==null||M.focus(x),E+=m}while(M!==f.activeElement);return l&6&&Ns(M)&&M.select(),2}function xl(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function ks(){return/Android/gi.test(window.navigator.userAgent)}function yl(){return xl()||ks()}function Cr(t,l,r){let n=Vt(l);b.useEffect(()=>{function u(f){n.current(f)}return document.addEventListener(t,u,r),()=>document.removeEventListener(t,u,r)},[t,r])}function wl(t,l,r){let n=Vt(l);b.useEffect(()=>{function u(f){n.current(f)}return window.addEventListener(t,u,r),()=>window.removeEventListener(t,u,r)},[t,r])}function so(t,l,r=!0){let n=b.useRef(!1);b.useEffect(()=>{requestAnimationFrame(()=>{n.current=r})},[r]);function u(a,m){if(!n.current||a.defaultPrevented)return;let v=m(a);if(v===null||!v.getRootNode().contains(v)||!v.isConnected)return;let x=function E(k){return typeof k=="function"?E(k()):Array.isArray(k)||k instanceof Set?k:[k]}(t);for(let E of x){if(E===null)continue;let k=E instanceof HTMLElement?E:E.current;if(k!=null&&k.contains(v)||a.composed&&a.composedPath().includes(k))return}return!lo(v,oo.Loose)&&v.tabIndex!==-1&&a.preventDefault(),l(a,v)}let f=b.useRef(null);Cr("pointerdown",a=>{var m,v;n.current&&(f.current=((v=(m=a.composedPath)==null?void 0:m.call(a))==null?void 0:v[0])||a.target)},!0),Cr("mousedown",a=>{var m,v;n.current&&(f.current=((v=(m=a.composedPath)==null?void 0:m.call(a))==null?void 0:v[0])||a.target)},!0),Cr("click",a=>{yl()||f.current&&(u(a,()=>f.current),f.current=null)},!0),Cr("touchend",a=>u(a,()=>a.target instanceof HTMLElement?a.target:null),!0),wl("blur",a=>u(a,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function wn(...t){return b.useMemo(()=>Sr(...t),[...t])}function El(t){var l;if(t.type)return t.type;let r=(l=t.as)!=null?l:"button";if(typeof r=="string"&&r.toLowerCase()==="button")return"button"}function ao(t,l){let[r,n]=b.useState(()=>El(t));return tt(()=>{n(El(t))},[t.type,t.as]),tt(()=>{r||l.current&&l.current instanceof HTMLButtonElement&&!l.current.hasAttribute("type")&&n("button")},[r,l]),r}let Sl=Symbol();function Ps(t,l=!0){return Object.assign(t,{[Sl]:l})}function wt(...t){let l=b.useRef(t);b.useEffect(()=>{l.current=t},[t]);let r=te(n=>{for(let u of l.current)u!=null&&(typeof u=="function"?u(n):u.current=n)});return t.every(n=>n==null||(n==null?void 0:n[Sl]))?void 0:r}function Cl(t){return[t.screenX,t.screenY]}function jl(){let t=b.useRef([-1,-1]);return{wasMoved(l){let r=Cl(l);return t.current[0]===r[0]&&t.current[1]===r[1]?!1:(t.current=r,!0)},update(l){t.current=Cl(l)}}}function Tl({container:t,accept:l,walk:r,enabled:n=!0}){let u=b.useRef(l),f=b.useRef(r);b.useEffect(()=>{u.current=l,f.current=r},[l,r]),tt(()=>{if(!t||!n)return;let a=Sr(t);if(!a)return;let m=u.current,v=f.current,x=Object.assign(k=>m(k),{acceptNode:m}),E=a.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,x,!1);for(;E.nextNode();)v(E.currentNode)},[t,n,u,f])}function Wn(t,l){let r=b.useRef([]),n=te(t);b.useEffect(()=>{let u=[...r.current];for(let[f,a]of l.entries())if(r.current[f]!==a){let m=n(l,u);return r.current=l,m}},[n,...l])}function jr(...t){return Array.from(new Set(t.flatMap(l=>typeof l=="string"?l.split(" "):[]))).filter(Boolean).join(" ")}var dn=(t=>(t[t.None=0]="None",t[t.RenderStrategy=1]="RenderStrategy",t[t.Static=2]="Static",t))(dn||{}),fn=(t=>(t[t.Unmount=0]="Unmount",t[t.Hidden=1]="Hidden",t))(fn||{});function pt({ourProps:t,theirProps:l,slot:r,defaultTag:n,features:u,visible:f=!0,name:a,mergeRefs:m}){m=m??Fs;let v=Ol(l,t);if(f)return Tr(v,r,n,a,m);let x=u??0;if(x&2){let{static:E=!1,...k}=v;if(E)return Tr(k,r,n,a,m)}if(x&1){let{unmount:E=!0,...k}=v;return bt(E?0:1,{0(){return null},1(){return Tr({...k,hidden:!0,style:{display:"none"}},r,n,a,m)}})}return Tr(v,r,n,a,m)}function Tr(t,l={},r,n,u){let{as:f=r,children:a,refName:m="ref",...v}=uo(t,["unmount","static"]),x=t.ref!==void 0?{[m]:t.ref}:{},E=typeof a=="function"?a(l):a;"className"in v&&v.className&&typeof v.className=="function"&&(v.className=v.className(l));let k={};if(l){let M=!1,C=[];for(let[F,D]of Object.entries(l))typeof D=="boolean"&&(M=!0),D===!0&&C.push(F);M&&(k["data-headlessui-state"]=C.join(" "))}if(f===b.Fragment&&Object.keys(Or(v)).length>0){if(!b.isValidElement(E)||Array.isArray(E)&&E.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(v).map(D=>` - ${D}`).join(`
|
|
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(
|
|
28
|
+
color: hsl(${Math.max(0,Math.min(120-120*R,120))}deg 100% 31%);`,r==null?void 0:r.key)}return(v=r==null?void 0:r.onChange)==null||v.call(r,u),u}}function no(e,o){if(e===void 0)throw new Error("Unexpected undefined");return e}const ps=(e,o)=>Math.abs(e-o)<1,ms=(e,o,r)=>{let n;return function(...u){e.clearTimeout(n),n=e.setTimeout(()=>o.apply(this,u),r)}},hs=e=>e,vs=e=>{const o=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1),n=[];for(let u=o;u<=r;u++)n.push(u);return n},gs=(e,o)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;const u=a=>{const{width:m,height:v}=a;o({width:Math.round(m),height:Math.round(v)})};if(u(r.getBoundingClientRect()),!n.ResizeObserver)return()=>{};const f=new n.ResizeObserver(a=>{const m=a[0];if(m!=null&&m.borderBoxSize){const v=m.borderBoxSize[0];if(v){u({width:v.inlineSize,height:v.blockSize});return}}u(r.getBoundingClientRect())});return f.observe(r,{box:"border-box"}),()=>{f.unobserve(r)}},hi={passive:!0},bs=typeof window>"u"?!0:"onscrollend"in window,xs=(e,o)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;let u=0;const f=bs?()=>{}:ms(n,()=>{o(u,!1)},e.options.isScrollingResetDelay),a=x=>()=>{u=r[e.options.horizontal?"scrollLeft":"scrollTop"],f(),o(u,x)},m=a(!0),v=a(!1);return v(),r.addEventListener("scroll",m,hi),r.addEventListener("scrollend",v,hi),()=>{r.removeEventListener("scroll",m),r.removeEventListener("scrollend",v)}},ys=(e,o,r)=>{if(o!=null&&o.borderBoxSize){const n=o.borderBoxSize[0];if(n)return Math.round(n[r.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[r.options.horizontal?"width":"height"])},ws=(e,{adjustments:o=0,behavior:r},n)=>{var u,f;const a=e+o;(f=(u=n.scrollElement)==null?void 0:u.scrollTo)==null||f.call(u,{[n.options.horizontal?"left":"top"]:a,behavior:r})};class Es{constructor(o){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 r=null;const n=()=>r||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:r=new this.targetWindow.ResizeObserver(u=>{u.forEach(f=>{this._measureElement(f.target,f)})}));return{disconnect:()=>{var u;return(u=n())==null?void 0:u.disconnect()},observe:u=>{var f;return(f=n())==null?void 0:f.observe(u,{box:"border-box"})},unobserve:u=>{var f;return(f=n())==null?void 0:f.unobserve(u)}}})(),this.range=null,this.setOptions=r=>{Object.entries(r).forEach(([n,u])=>{typeof u>"u"&&delete r[n]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:hs,rangeExtractor:vs,onChange:()=>{},measureElement:ys,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,...r}},this.notify=(r,n)=>{var u,f;const{startIndex:a,endIndex:m}=this.range??{startIndex:void 0,endIndex:void 0},v=this.calculateRange();(r||a!==(v==null?void 0:v.startIndex)||m!==(v==null?void 0:v.endIndex))&&((f=(u=this.options).onChange)==null||f.call(u,this,n))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(r=>r()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var r;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.notify(!1,!1);return}this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((r=this.scrollElement)==null?void 0:r.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,u=>{this.scrollRect=u,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(u,f)=>{this.scrollAdjustments=0,this.scrollDirection=f?this.getScrollOffset()<u?"forward":"backward":null,this.scrollOffset=u;const a=this.isScrolling;this.isScrolling=f,this.notify(a!==f,f)}))}},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=(r,n)=>{const u=new Map,f=new Map;for(let a=n-1;a>=0;a--){const m=r[a];if(u.has(m.lane))continue;const v=f.get(m.lane);if(v==null||m.end>v.end?f.set(m.lane,m):m.end<v.end&&u.set(m.lane,!0),u.size===this.options.lanes)break}return f.size===this.options.lanes?Array.from(f.values()).sort((a,m)=>a.end===m.end?a.index-m.index:a.end-m.end)[0]:void 0},this.getMeasurementOptions=Bn(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(r,n,u,f,a)=>(this.pendingMeasuredCacheIndexes=[],{count:r,paddingStart:n,scrollMargin:u,getItemKey:f,enabled:a}),{key:!1}),this.getMeasurements=Bn(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:r,paddingStart:n,scrollMargin:u,getItemKey:f,enabled:a},m)=>{var v;if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(I=>{this.itemSizeCache.set(I.key,I.size)}));const x=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const E=this.measurementsCache.slice(0,x);for(let I=x;I<r;I++){let P=(v=this.measurementsCache[I])==null?void 0:v.measureElement;P||(P=X=>{const te=f(I),ue=this.elementsCache.get(te);if(!X){ue&&(this.observer.unobserve(ue),this.elementsCache.delete(te));return}ue!==X&&(ue&&this.observer.unobserve(ue),this.observer.observe(X),this.elementsCache.set(te,X)),X.isConnected&&this.resizeItem(I,this.options.measureElement(X,void 0,this))});const C=f(I),M=this.options.lanes===1?E[I-1]:this.getFurthestMeasurement(E,I),R=M?M.end+this.options.gap:n+u,L=m.get(C),B=typeof L=="number"?L:this.options.estimateSize(I),_=R+B,z=M?M.lane:I%this.options.lanes;E[I]={index:I,start:R,size:B,end:_,key:C,lane:z,measureElement:P}}return this.measurementsCache=E,E},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Bn(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(r,n,u)=>this.range=r.length>0&&n>0?Ss({measurements:r,outerSize:n,scrollOffset:u}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getIndexes=Bn(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(r,n,u,f)=>n===null?[]:r({startIndex:n.startIndex,endIndex:n.endIndex,overscan:u,count:f}),{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.indexFromElement=r=>{const n=this.options.indexAttribute,u=r.getAttribute(n);return u?parseInt(u,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this._measureElement=(r,n)=>{const u=this.indexFromElement(r),f=this.getMeasurements()[u];if(!f||!r.isConnected){this.elementsCache.forEach((m,v)=>{m===r&&(this.observer.unobserve(r),this.elementsCache.delete(v))});return}const a=this.elementsCache.get(f.key);a!==r&&(a&&this.observer.unobserve(a),this.observer.observe(r),this.elementsCache.set(f.key,r)),this.resizeItem(u,this.options.measureElement(r,n,this))},this.resizeItem=(r,n)=>{const u=this.getMeasurements()[r];if(!u)return;const f=this.itemSizeCache.get(u.key)??u.size,a=n-f;a!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(u,a,this):u.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",a),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=a,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(u.index),this.itemSizeCache=new Map(this.itemSizeCache.set(u.key,n)),this.notify(!0,!1))},this.measureElement=r=>{r&&this._measureElement(r,void 0)},this.getVirtualItems=Bn(()=>[this.getIndexes(),this.getMeasurements()],(r,n)=>{const u=[];for(let f=0,a=r.length;f<a;f++){const m=r[f],v=n[m];u.push(v)}return u},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=r=>{const n=this.getMeasurements();if(n.length!==0)return no(n[vi(0,n.length-1,u=>no(n[u]).start,r)])},this.getOffsetForAlignment=(r,n)=>{const u=this.getSize(),f=this.getScrollOffset();n==="auto"&&(r<=f?n="start":r>=f+u?n="end":n="start"),n==="start"?r=r:n==="end"?r=r-u:n==="center"&&(r=r-u/2);const a=this.options.horizontal?"scrollWidth":"scrollHeight",v=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[a]:this.scrollElement[a]:0)-u;return Math.max(Math.min(v,r),0)},this.getOffsetForIndex=(r,n="auto")=>{r=Math.max(0,Math.min(r,this.options.count-1));const u=this.getMeasurements()[r];if(!u)return;const f=this.getSize(),a=this.getScrollOffset();if(n==="auto")if(u.end>=a+f-this.options.scrollPaddingEnd)n="end";else if(u.start<=a+this.options.scrollPaddingStart)n="start";else return[a,n];const m=n==="end"?u.end+this.options.scrollPaddingEnd:u.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(m,n),n]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(r,{align:n="start",behavior:u}={})=>{this.cancelScrollToIndex(),u==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(r,n),{adjustments:void 0,behavior:u})},this.scrollToIndex=(r,{align:n="auto",behavior:u}={})=>{r=Math.max(0,Math.min(r,this.options.count-1)),this.cancelScrollToIndex(),u==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const f=this.getOffsetForIndex(r,n);if(!f)return;const[a,m]=f;this._scrollToOffset(a,{adjustments:void 0,behavior:u}),u!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(r))){const[x]=no(this.getOffsetForIndex(r,m));ps(x,this.getScrollOffset())||this.scrollToIndex(r,{align:m,behavior:u})}else this.scrollToIndex(r,{align:m,behavior:u})}))},this.scrollBy=(r,{behavior:n}={})=>{this.cancelScrollToIndex(),n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+r,{adjustments:void 0,behavior:n})},this.getTotalSize=()=>{var r;const n=this.getMeasurements();let u;return n.length===0?u=this.options.paddingStart:u=this.options.lanes===1?((r=n[n.length-1])==null?void 0:r.end)??0:Math.max(...n.slice(-this.options.lanes).map(f=>f.end)),u-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(r,{adjustments:n,behavior:u})=>{this.options.scrollToFn(r,{behavior:u,adjustments:n},this)},this.measure=()=>{var r,n;this.itemSizeCache=new Map,(n=(r=this.options).onChange)==null||n.call(r,this,!1)},this.setOptions(o)}}const vi=(e,o,r,n)=>{for(;e<=o;){const u=(e+o)/2|0,f=r(u);if(f<n)e=u+1;else if(f>n)o=u-1;else return u}return e>0?e-1:0};function Ss({measurements:e,outerSize:o,scrollOffset:r}){const n=e.length-1,f=vi(0,n,m=>e[m].start,r);let a=f;for(;a<n&&e[a].end<r+o;)a++;return{startIndex:f,endIndex:a}}const Cs=typeof document<"u"?q.useLayoutEffect:q.useEffect;function js(e){const o=q.useReducer(()=>({}),{})[1],r={...e,onChange:(u,f)=>{var a;f?Er.flushSync(o):o(),(a=e.onChange)==null||a.call(e,u,f)}},[n]=q.useState(()=>new Es(r));return n.setOptions(r),q.useEffect(()=>n._didMount(),[]),Cs(()=>n._willUpdate()),n}function Ts(e){return js({observeElementRect:gs,observeElementOffset:xs,scrollToFn:ws,...e})}var Os=Object.defineProperty,Ns=(e,o,r)=>o in e?Os(e,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[o]=r,ro=(e,o,r)=>(Ns(e,typeof o!="symbol"?o+"":o,r),r);let ks=class{constructor(){ro(this,"current",this.detect()),ro(this,"handoffState","pending"),ro(this,"currentId",0)}set(o){this.current!==o&&(this.handoffState="pending",this.currentId=0,this.current=o)}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"}},tn=new ks,lt=(e,o)=>{tn.isServer?g.useEffect(e,o):g.useLayoutEffect(e,o)};function Vt(e){let o=g.useRef(e);return lt(()=>{o.current=e},[e]),o}function oo(e,o){let[r,n]=g.useState(e),u=Vt(e);return lt(()=>n(u.current),[u,n,...o]),r}let oe=function(e){let o=Vt(e);return g.useCallback((...r)=>o.current(...r),[o])};function gi(e,o,r){let[n,u]=g.useState(r),f=e!==void 0,a=g.useRef(f),m=g.useRef(!1),v=g.useRef(!1);return f&&!a.current&&!m.current?(m.current=!0,a.current=f,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.")):!f&&a.current&&!v.current&&(v.current=!0,a.current=f,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.")),[f?e:n,oe(x=>(f||u(x),o==null?void 0:o(x)))]}function Sr(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(o=>setTimeout(()=>{throw o}))}function Wt(){let e=[],o={addEventListener(r,n,u,f){return r.addEventListener(n,u,f),o.add(()=>r.removeEventListener(n,u,f))},requestAnimationFrame(...r){let n=requestAnimationFrame(...r);return o.add(()=>cancelAnimationFrame(n))},nextFrame(...r){return o.requestAnimationFrame(()=>o.requestAnimationFrame(...r))},setTimeout(...r){let n=setTimeout(...r);return o.add(()=>clearTimeout(n))},microTask(...r){let n={current:!0};return Sr(()=>{n.current&&r[0]()}),o.add(()=>{n.current=!1})},style(r,n,u){let f=r.style.getPropertyValue(n);return Object.assign(r.style,{[n]:u}),this.add(()=>{Object.assign(r.style,{[n]:f})})},group(r){let n=Wt();return r(n),this.add(()=>n.dispose())},add(r){return e.push(r),()=>{let n=e.indexOf(r);if(n>=0)for(let u of e.splice(n,1))u()}},dispose(){for(let r of e.splice(0))r()}};return o}function nn(){let[e]=g.useState(Wt);return g.useEffect(()=>()=>e.dispose(),[e]),e}function Is(){let e=typeof document>"u";return"useSyncExternalStore"in q?(o=>o.useSyncExternalStore)(q)(()=>()=>{},()=>!1,()=>!e):!1}function In(){let e=Is(),[o,r]=q.useState(tn.isHandoffComplete);return o&&tn.isHandoffComplete===!1&&r(!1),q.useEffect(()=>{o!==!0&&r(!0)},[o]),q.useEffect(()=>tn.handoff(),[]),e?!1:o}var bi;let Dt=(bi=g.useId)!=null?bi:function(){let e=In(),[o,r]=g.useState(e?()=>tn.nextId():null);return lt(()=>{o===null&&r(tn.nextId())},[o]),o!=null?""+o:void 0};function yt(e,o,...r){if(e in o){let u=o[e];return typeof u=="function"?u(...r):u}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(o).map(u=>`"${u}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,yt),n}function Cr(e){return tn.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let io=["[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 rn=(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))(rn||{}),xi=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(xi||{}),Ms=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Ms||{});function yi(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(io)).sort((o,r)=>Math.sign((o.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}var lo=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(lo||{});function so(e,o=0){var r;return e===((r=Cr(e))==null?void 0:r.body)?!1:yt(o,{0(){return e.matches(io)},1(){let n=e;for(;n!==null;){if(n.matches(io))return!0;n=n.parentElement}return!1}})}function wi(e){let o=Cr(e);Wt().nextFrame(()=>{o&&!so(o.activeElement,0)&&dn(e)})}var Ps=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Ps||{});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 dn(e){e==null||e.focus({preventScroll:!0})}let Fs=["textarea","input"].join(",");function Rs(e){var o,r;return(r=(o=e==null?void 0:e.matches)==null?void 0:o.call(e,Fs))!=null?r:!1}function ao(e,o=r=>r){return e.slice().sort((r,n)=>{let u=o(r),f=o(n);if(u===null||f===null)return 0;let a=u.compareDocumentPosition(f);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Ls(e,o){return zn(yi(),o,{relativeTo:e})}function zn(e,o,{sorted:r=!0,relativeTo:n=null,skipElements:u=[]}={}){let f=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,a=Array.isArray(e)?r?ao(e):e:yi(e);u.length>0&&a.length>1&&(a=a.filter(C=>!u.includes(C))),n=n??f.activeElement;let m=(()=>{if(o&5)return 1;if(o&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),v=(()=>{if(o&1)return 0;if(o&2)return Math.max(0,a.indexOf(n))-1;if(o&4)return Math.max(0,a.indexOf(n))+1;if(o&8)return a.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),x=o&32?{preventScroll:!0}:{},E=0,I=a.length,P;do{if(E>=I||E+I<=0)return 0;let C=v+E;if(o&16)C=(C+I)%I;else{if(C<0)return 3;if(C>=I)return 1}P=a[C],P==null||P.focus(x),E+=m}while(P!==f.activeElement);return o&6&&Rs(P)&&P.select(),2}function Ei(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function As(){return/Android/gi.test(window.navigator.userAgent)}function Si(){return Ei()||As()}function jr(e,o,r){let n=Vt(o);g.useEffect(()=>{function u(f){n.current(f)}return document.addEventListener(e,u,r),()=>document.removeEventListener(e,u,r)},[e,r])}function Ci(e,o,r){let n=Vt(o);g.useEffect(()=>{function u(f){n.current(f)}return window.addEventListener(e,u,r),()=>window.removeEventListener(e,u,r)},[e,r])}function uo(e,o,r=!0){let n=g.useRef(!1);g.useEffect(()=>{requestAnimationFrame(()=>{n.current=r})},[r]);function u(a,m){if(!n.current||a.defaultPrevented)return;let v=m(a);if(v===null||!v.getRootNode().contains(v)||!v.isConnected)return;let x=function E(I){return typeof I=="function"?E(I()):Array.isArray(I)||I instanceof Set?I:[I]}(e);for(let E of x){if(E===null)continue;let I=E instanceof HTMLElement?E:E.current;if(I!=null&&I.contains(v)||a.composed&&a.composedPath().includes(I))return}return!so(v,lo.Loose)&&v.tabIndex!==-1&&a.preventDefault(),o(a,v)}let f=g.useRef(null);jr("pointerdown",a=>{var m,v;n.current&&(f.current=((v=(m=a.composedPath)==null?void 0:m.call(a))==null?void 0:v[0])||a.target)},!0),jr("mousedown",a=>{var m,v;n.current&&(f.current=((v=(m=a.composedPath)==null?void 0:m.call(a))==null?void 0:v[0])||a.target)},!0),jr("click",a=>{Si()||f.current&&(u(a,()=>f.current),f.current=null)},!0),jr("touchend",a=>u(a,()=>a.target instanceof HTMLElement?a.target:null),!0),Ci("blur",a=>u(a,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function wn(...e){return g.useMemo(()=>Cr(...e),[...e])}function ji(e){var o;if(e.type)return e.type;let r=(o=e.as)!=null?o:"button";if(typeof r=="string"&&r.toLowerCase()==="button")return"button"}function co(e,o){let[r,n]=g.useState(()=>ji(e));return lt(()=>{n(ji(e))},[e.type,e.as]),lt(()=>{r||o.current&&o.current instanceof HTMLButtonElement&&!o.current.hasAttribute("type")&&n("button")},[r,o]),r}let Ti=Symbol();function Ds(e,o=!0){return Object.assign(e,{[Ti]:o})}function St(...e){let o=g.useRef(e);g.useEffect(()=>{o.current=e},[e]);let r=oe(n=>{for(let u of o.current)u!=null&&(typeof u=="function"?u(n):u.current=n)});return e.every(n=>n==null||(n==null?void 0:n[Ti]))?void 0:r}function Oi(e){return[e.screenX,e.screenY]}function Ni(){let e=g.useRef([-1,-1]);return{wasMoved(o){let r=Oi(o);return e.current[0]===r[0]&&e.current[1]===r[1]?!1:(e.current=r,!0)},update(o){e.current=Oi(o)}}}function ki({container:e,accept:o,walk:r,enabled:n=!0}){let u=g.useRef(o),f=g.useRef(r);g.useEffect(()=>{u.current=o,f.current=r},[o,r]),lt(()=>{if(!e||!n)return;let a=Cr(e);if(!a)return;let m=u.current,v=f.current,x=Object.assign(I=>m(I),{acceptNode:m}),E=a.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,x,!1);for(;E.nextNode();)v(E.currentNode)},[e,n,u,f])}function Wn(e,o){let r=g.useRef([]),n=oe(e);g.useEffect(()=>{let u=[...r.current];for(let[f,a]of o.entries())if(r.current[f]!==a){let m=n(o,u);return r.current=o,m}},[n,...o])}function Tr(...e){return Array.from(new Set(e.flatMap(o=>typeof o=="string"?o.split(" "):[]))).filter(Boolean).join(" ")}var fn=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(fn||{}),pn=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(pn||{});function vt({ourProps:e,theirProps:o,slot:r,defaultTag:n,features:u,visible:f=!0,name:a,mergeRefs:m}){m=m??$s;let v=Ii(o,e);if(f)return Or(v,r,n,a,m);let x=u??0;if(x&2){let{static:E=!1,...I}=v;if(E)return Or(I,r,n,a,m)}if(x&1){let{unmount:E=!0,...I}=v;return yt(E?0:1,{0(){return null},1(){return Or({...I,hidden:!0,style:{display:"none"}},r,n,a,m)}})}return Or(v,r,n,a,m)}function Or(e,o={},r,n,u){let{as:f=r,children:a,refName:m="ref",...v}=fo(e,["unmount","static"]),x=e.ref!==void 0?{[m]:e.ref}:{},E=typeof a=="function"?a(o):a;"className"in v&&v.className&&typeof v.className=="function"&&(v.className=v.className(o));let I={};if(o){let P=!1,C=[];for(let[M,R]of Object.entries(o))typeof R=="boolean"&&(P=!0),R===!0&&C.push(M);P&&(I["data-headlessui-state"]=C.join(" "))}if(f===g.Fragment&&Object.keys(Nr(v)).length>0){if(!g.isValidElement(E)||Array.isArray(E)&&E.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(v).map(R=>` - ${R}`).join(`
|
|
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(R=>` - ${R}`).join(`
|
|
30
30
|
`)].join(`
|
|
31
|
-
`));let M=E.props,C=typeof(M==null?void 0:M.className)=="function"?(...D)=>jr(M==null?void 0:M.className(...D),v.className):jr(M==null?void 0:M.className,v.className),F=C?{className:C}:{};return b.cloneElement(E,Object.assign({},Ol(E.props,Or(uo(v,["ref"]))),k,x,{ref:u(E.ref,x.ref)},F))}return b.createElement(f,Object.assign({},uo(v,["ref"]),f!==b.Fragment&&x,f!==b.Fragment&&k),E)}function Fs(...t){return t.every(l=>l==null)?void 0:l=>{for(let r of t)r!=null&&(typeof r=="function"?r(l):r.current=l)}}function Ol(...t){if(t.length===0)return{};if(t.length===1)return t[0];let l={},r={};for(let n of t)for(let u in n)u.startsWith("on")&&typeof n[u]=="function"?(r[u]!=null||(r[u]=[]),r[u].push(n[u])):l[u]=n[u];if(l.disabled||l["aria-disabled"])return Object.assign(l,Object.fromEntries(Object.keys(r).map(n=>[n,void 0])));for(let n in r)Object.assign(l,{[n](u,...f){let a=r[n];for(let m of a){if((u instanceof Event||(u==null?void 0:u.nativeEvent)instanceof Event)&&u.defaultPrevented)return;m(u,...f)}}});return l}function mt(t){var l;return Object.assign(b.forwardRef(t),{displayName:(l=t.displayName)!=null?l:t.name})}function Or(t){let l=Object.assign({},t);for(let r in l)l[r]===void 0&&delete l[r];return l}function uo(t,l=[]){let r=Object.assign({},t);for(let n of l)n in r&&delete r[n];return r}let Ms="div";var Pn=(t=>(t[t.None=1]="None",t[t.Focusable=2]="Focusable",t[t.Hidden=4]="Hidden",t))(Pn||{});function Rs(t,l){var r;let{features:n=1,...u}=t,f={ref:l,"aria-hidden":(n&2)===2?!0:(r=u["aria-hidden"])!=null?r:void 0,hidden:(n&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",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return pt({ourProps:f,theirProps:u,slot:{},defaultTag:Ms,name:"Hidden"})}let Hn=mt(Rs),co=b.createContext(null);co.displayName="OpenClosedContext";var Ct=(t=>(t[t.Open=1]="Open",t[t.Closed=2]="Closed",t[t.Closing=4]="Closing",t[t.Opening=8]="Opening",t))(Ct||{});function Un(){return b.useContext(co)}function fo({value:t,children:l}){return b.createElement(co.Provider,{value:t},l)}function Ls(t){function l(){document.readyState!=="loading"&&(t(),document.removeEventListener("DOMContentLoaded",l))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",l),l())}let qt=[];Ls(()=>{function t(l){l.target instanceof HTMLElement&&l.target!==document.body&&qt[0]!==l.target&&(qt.unshift(l.target),qt=qt.filter(r=>r!=null&&r.isConnected),qt.splice(10))}window.addEventListener("click",t,{capture:!0}),window.addEventListener("mousedown",t,{capture:!0}),window.addEventListener("focus",t,{capture:!0}),document.body.addEventListener("click",t,{capture:!0}),document.body.addEventListener("mousedown",t,{capture:!0}),document.body.addEventListener("focus",t,{capture:!0})});function Nr(t){let l=t.parentElement,r=null;for(;l&&!(l instanceof HTMLFieldSetElement);)l instanceof HTMLLegendElement&&(r=l),l=l.parentElement;let n=(l==null?void 0:l.getAttribute("disabled"))==="";return n&&As(r)?!1:n}function As(t){if(!t)return!1;let l=t.previousElementSibling;for(;l!==null;){if(l instanceof HTMLLegendElement)return!1;l=l.previousElementSibling}return!0}function Ds(t){throw new Error("Unexpected object: "+t)}var nt=(t=>(t[t.First=0]="First",t[t.Previous=1]="Previous",t[t.Next=2]="Next",t[t.Last=3]="Last",t[t.Specific=4]="Specific",t[t.Nothing=5]="Nothing",t))(nt||{});function po(t,l){let r=l.resolveItems();if(r.length<=0)return null;let n=l.resolveActiveIndex(),u=n??-1;switch(t.focus){case 0:{for(let f=0;f<r.length;++f)if(!l.resolveDisabled(r[f],f,r))return f;return n}case 1:{for(let f=u-1;f>=0;--f)if(!l.resolveDisabled(r[f],f,r))return f;return n}case 2:{for(let f=u+1;f<r.length;++f)if(!l.resolveDisabled(r[f],f,r))return f;return n}case 3:{for(let f=r.length-1;f>=0;--f)if(!l.resolveDisabled(r[f],f,r))return f;return n}case 4:{for(let f=0;f<r.length;++f)if(l.resolveId(r[f],f,r)===t.id)return f;return n}case 5:return null;default:Ds(t)}}function Nl(t={},l=null,r=[]){for(let[n,u]of Object.entries(t))kl(r,Il(l,n),u);return r}function Il(t,l){return t?t+"["+l+"]":l}function kl(t,l,r){if(Array.isArray(r))for(let[n,u]of r.entries())kl(t,Il(l,n.toString()),u);else r instanceof Date?t.push([l,r.toISOString()]):typeof r=="boolean"?t.push([l,r?"1":"0"]):typeof r=="string"?t.push([l,r]):typeof r=="number"?t.push([l,`${r}`]):r==null?t.push([l,""]):Nl(r,l,t)}function $s(t){var l,r;let n=(l=t==null?void 0:t.form)!=null?l:t.closest("form");if(n){for(let u of n.elements)if(u!==t&&(u.tagName==="INPUT"&&u.type==="submit"||u.tagName==="BUTTON"&&u.type==="submit"||u.nodeName==="INPUT"&&u.type==="image")){u.click();return}(r=n.requestSubmit)==null||r.call(n)}}var Ge=(t=>(t.Space=" ",t.Enter="Enter",t.Escape="Escape",t.Backspace="Backspace",t.Delete="Delete",t.ArrowLeft="ArrowLeft",t.ArrowUp="ArrowUp",t.ArrowRight="ArrowRight",t.ArrowDown="ArrowDown",t.Home="Home",t.End="End",t.PageUp="PageUp",t.PageDown="PageDown",t.Tab="Tab",t))(Ge||{}),_s=(t=>(t[t.Open=0]="Open",t[t.Closed=1]="Closed",t))(_s||{}),Bs=(t=>(t[t.Single=0]="Single",t[t.Multi=1]="Multi",t))(Bs||{}),zs=(t=>(t[t.Pointer=0]="Pointer",t[t.Focus=1]="Focus",t[t.Other=2]="Other",t))(zs||{}),Ws=(t=>(t[t.OpenCombobox=0]="OpenCombobox",t[t.CloseCombobox=1]="CloseCombobox",t[t.GoToOption=2]="GoToOption",t[t.RegisterOption=3]="RegisterOption",t[t.UnregisterOption=4]="UnregisterOption",t[t.RegisterLabel=5]="RegisterLabel",t[t.SetActivationTrigger=6]="SetActivationTrigger",t[t.UpdateVirtualOptions=7]="UpdateVirtualOptions",t))(Ws||{});function mo(t,l=r=>r){let r=t.activeOptionIndex!==null?t.options[t.activeOptionIndex]:null,n=l(t.options.slice()),u=n.length>0&&n[0].dataRef.current.order!==null?n.sort((a,m)=>a.dataRef.current.order-m.dataRef.current.order):io(n,a=>a.dataRef.current.domRef.current),f=r?u.indexOf(r):null;return f===-1&&(f=null),{options:u,activeOptionIndex:f}}let Hs={1(t){var l;return(l=t.dataRef.current)!=null&&l.disabled||t.comboboxState===1?t:{...t,activeOptionIndex:null,comboboxState:1}},0(t){var l,r;if((l=t.dataRef.current)!=null&&l.disabled||t.comboboxState===0)return t;if((r=t.dataRef.current)!=null&&r.value){let n=t.dataRef.current.calculateIndex(t.dataRef.current.value);if(n!==-1)return{...t,activeOptionIndex:n,comboboxState:0}}return{...t,comboboxState:0}},2(t,l){var r,n,u,f,a;if((r=t.dataRef.current)!=null&&r.disabled||(n=t.dataRef.current)!=null&&n.optionsRef.current&&!((u=t.dataRef.current)!=null&&u.optionsPropsRef.current.static)&&t.comboboxState===1)return t;if(t.virtual){let E=l.focus===nt.Specific?l.idx:po(l,{resolveItems:()=>t.virtual.options,resolveActiveIndex:()=>{var M,C;return(C=(M=t.activeOptionIndex)!=null?M:t.virtual.options.findIndex(F=>!t.virtual.disabled(F)))!=null?C:null},resolveDisabled:t.virtual.disabled,resolveId(){throw new Error("Function not implemented.")}}),k=(f=l.trigger)!=null?f:2;return t.activeOptionIndex===E&&t.activationTrigger===k?t:{...t,activeOptionIndex:E,activationTrigger:k}}let m=mo(t);if(m.activeOptionIndex===null){let E=m.options.findIndex(k=>!k.dataRef.current.disabled);E!==-1&&(m.activeOptionIndex=E)}let v=l.focus===nt.Specific?l.idx:po(l,{resolveItems:()=>m.options,resolveActiveIndex:()=>m.activeOptionIndex,resolveId:E=>E.id,resolveDisabled:E=>E.dataRef.current.disabled}),x=(a=l.trigger)!=null?a:2;return t.activeOptionIndex===v&&t.activationTrigger===x?t:{...t,...m,activeOptionIndex:v,activationTrigger:x}},3:(t,l)=>{var r,n,u;if((r=t.dataRef.current)!=null&&r.virtual)return{...t,options:[...t.options,l.payload]};let f=l.payload,a=mo(t,v=>(v.push(f),v));t.activeOptionIndex===null&&(n=t.dataRef.current)!=null&&n.isSelected(l.payload.dataRef.current.value)&&(a.activeOptionIndex=a.options.indexOf(f));let m={...t,...a,activationTrigger:2};return(u=t.dataRef.current)!=null&&u.__demoMode&&t.dataRef.current.value===void 0&&(m.activeOptionIndex=0),m},4:(t,l)=>{var r;if((r=t.dataRef.current)!=null&&r.virtual)return{...t,options:t.options.filter(u=>u.id!==l.id)};let n=mo(t,u=>{let f=u.findIndex(a=>a.id===l.id);return f!==-1&&u.splice(f,1),u});return{...t,...n,activationTrigger:2}},5:(t,l)=>t.labelId===l.id?t:{...t,labelId:l.id},6:(t,l)=>t.activationTrigger===l.trigger?t:{...t,activationTrigger:l.trigger},7:(t,l)=>{var r;if(((r=t.virtual)==null?void 0:r.options)===l.options)return t;let n=t.activeOptionIndex;if(t.activeOptionIndex!==null){let u=l.options.indexOf(t.virtual.options[t.activeOptionIndex]);u!==-1?n=u:n=null}return{...t,activeOptionIndex:n,virtual:Object.assign({},t.virtual,{options:l.options})}}},ho=b.createContext(null);ho.displayName="ComboboxActionsContext";function Vn(t){let l=b.useContext(ho);if(l===null){let r=new Error(`<${t} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Vn),r}return l}let Pl=b.createContext(null);function Us(t){var l;let r=En("VirtualProvider"),[n,u]=b.useMemo(()=>{let v=r.optionsRef.current;if(!v)return[0,0];let x=window.getComputedStyle(v);return[parseFloat(x.paddingBlockStart||x.paddingTop),parseFloat(x.paddingBlockEnd||x.paddingBottom)]},[r.optionsRef.current]),f=ys({scrollPaddingStart:n,scrollPaddingEnd:u,count:r.virtual.options.length,estimateSize(){return 40},getScrollElement(){var v;return(v=r.optionsRef.current)!=null?v:null},overscan:12}),[a,m]=b.useState(0);return tt(()=>{m(v=>v+1)},[(l=r.virtual)==null?void 0:l.options]),b.createElement(Pl.Provider,{value:f},b.createElement("div",{style:{position:"relative",width:"100%",height:`${f.getTotalSize()}px`},ref:v=>{if(v){if(typeof process<"u"&&process.env.JEST_WORKER_ID!==void 0||r.activationTrigger===0)return;r.activeOptionIndex!==null&&r.virtual.options.length>r.activeOptionIndex&&f.scrollToIndex(r.activeOptionIndex)}}},f.getVirtualItems().map(v=>{var x;return b.createElement(b.Fragment,{key:v.key},b.cloneElement((x=t.children)==null?void 0:x.call(t,{option:r.virtual.options[v.index],open:r.comboboxState===0}),{key:`${a}-${v.key}`,"data-index":v.index,"aria-setsize":r.virtual.options.length,"aria-posinset":v.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${v.start}px)`,overflowAnchor:"none"}}))})))}let vo=b.createContext(null);vo.displayName="ComboboxDataContext";function En(t){let l=b.useContext(vo);if(l===null){let r=new Error(`<${t} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,En),r}return l}function Vs(t,l){return bt(l.type,Hs,t,l)}let Zs=b.Fragment;function Ys(t,l){let{value:r,defaultValue:n,onChange:u,form:f,name:a,by:m=null,disabled:v=!1,__demoMode:x=!1,nullable:E=!1,multiple:k=!1,immediate:M=!1,virtual:C=null,...F}=t,D=!1,$=null,[B=k?[]:void 0,_]=ml(r,u,n),[W,K]=b.useReducer(Vs,{dataRef:b.createRef(),comboboxState:x?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),re=b.useRef(!1),fe=b.useRef({static:!1,hold:!1}),Ce=b.useRef(null),Ne=b.useRef(null),Oe=b.useRef(null),y=b.useRef(null),me=te(typeof m=="string"?(le,Ee)=>{let q=m;return(le==null?void 0:le[q])===(Ee==null?void 0:Ee[q])}:m??((le,Ee)=>le===Ee)),Fe=te(le=>W.options.findIndex(Ee=>me(Ee.dataRef.current.value,le))),Be=b.useCallback(le=>bt(V.mode,{1:()=>B.some(Ee=>me(Ee,le)),0:()=>me(B,le)}),[B]),it=te(le=>W.activeOptionIndex===Fe(le)),V=b.useMemo(()=>({...W,immediate:D,optionsPropsRef:fe,labelRef:Ce,inputRef:Ne,buttonRef:Oe,optionsRef:y,value:B,defaultValue:n,disabled:v,mode:k?1:0,virtual:W.virtual,get activeOptionIndex(){if(re.current&&W.activeOptionIndex===null&&W.options.length>0){let le=W.options.findIndex(Ee=>!Ee.dataRef.current.disabled);if(le!==-1)return le}return W.activeOptionIndex},calculateIndex:Fe,compare:me,isSelected:Be,isActive:it,nullable:E,__demoMode:x}),[B,n,v,k,E,x,W,$]);tt(()=>{},[$,void 0]),tt(()=>{W.dataRef.current=V},[V]),so([V.buttonRef,V.inputRef,V.optionsRef],()=>Lt.closeCombobox(),V.comboboxState===0);let rt=b.useMemo(()=>{var le,Ee,q;return{open:V.comboboxState===0,disabled:v,activeIndex:V.activeOptionIndex,activeOption:V.activeOptionIndex===null?null:V.virtual?V.virtual.options[(le=V.activeOptionIndex)!=null?le:0]:(q=(Ee=V.options[V.activeOptionIndex])==null?void 0:Ee.dataRef.current.value)!=null?q:null,value:B}},[V,v,B]),$e=te(()=>{if(V.activeOptionIndex!==null){if(V.virtual)kt(V.virtual.options[V.activeOptionIndex]);else{let{dataRef:le}=V.options[V.activeOptionIndex];kt(le.current.value)}Lt.goToOption(nt.Specific,V.activeOptionIndex)}}),ue=te(()=>{K({type:0}),re.current=!0}),Ie=te(()=>{K({type:1}),re.current=!1}),Xe=te((le,Ee,q)=>(re.current=!1,le===nt.Specific?K({type:2,focus:nt.Specific,idx:Ee,trigger:q}):K({type:2,focus:le,trigger:q}))),Et=te((le,Ee)=>(K({type:3,payload:{id:le,dataRef:Ee}}),()=>{V.isActive(Ee.current.value)&&(re.current=!0),K({type:4,id:le})})),ut=te(le=>(K({type:5,id:le}),()=>K({type:5,id:null}))),kt=te(le=>bt(V.mode,{0(){return _==null?void 0:_(le)},1(){let Ee=V.value.slice(),q=Ee.findIndex(ge=>me(ge,le));return q===-1?Ee.push(le):Ee.splice(q,1),_==null?void 0:_(Ee)}})),ht=te(le=>{K({type:6,trigger:le})}),Lt=b.useMemo(()=>({onChange:kt,registerOption:Et,registerLabel:ut,goToOption:Xe,closeCombobox:Ie,openCombobox:ue,setActivationTrigger:ht,selectActiveOption:$e}),[]),ke=l===null?{}:{ref:l},Je=b.useRef(null),Ze=tn();return b.useEffect(()=>{Je.current&&n!==void 0&&Ze.addEventListener(Je.current,"reset",()=>{_==null||_(n)})},[Je,_]),b.createElement(ho.Provider,{value:Lt},b.createElement(vo.Provider,{value:V},b.createElement(fo,{value:bt(V.comboboxState,{0:Ct.Open,1:Ct.Closed})},a!=null&&B!=null&&Nl({[a]:B}).map(([le,Ee],q)=>b.createElement(Hn,{features:Pn.Hidden,ref:q===0?ge=>{var je;Je.current=(je=ge==null?void 0:ge.closest("form"))!=null?je:null}:void 0,...Or({key:le,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:f,disabled:v,name:le,value:Ee})})),pt({ourProps:ke,theirProps:F,slot:rt,defaultTag:Zs,name:"Combobox"}))))}let Gs="input";function qs(t,l){var r,n,u,f,a;let m=Dt(),{id:v=`headlessui-combobox-input-${m}`,onChange:x,displayValue:E,type:k="text",...M}=t,C=En("Combobox.Input"),F=Vn("Combobox.Input"),D=wt(C.inputRef,l),$=wn(C.inputRef),B=b.useRef(!1),_=tn(),W=te(()=>{F.onChange(null),C.optionsRef.current&&(C.optionsRef.current.scrollTop=0),F.goToOption(nt.Nothing)}),K=function(){var V;return typeof E=="function"&&C.value!==void 0?(V=E(C.value))!=null?V:"":typeof C.value=="string"?C.value:""}();Wn(([V,rt],[$e,ue])=>{if(B.current)return;let Ie=C.inputRef.current;Ie&&((ue===0&&rt===1||V!==$e)&&(Ie.value=V),requestAnimationFrame(()=>{if(B.current||!Ie||($==null?void 0:$.activeElement)!==Ie)return;let{selectionStart:Xe,selectionEnd:Et}=Ie;Math.abs((Et??0)-(Xe??0))===0&&Xe===0&&Ie.setSelectionRange(Ie.value.length,Ie.value.length)}))},[K,C.comboboxState,$]),Wn(([V],[rt])=>{if(V===0&&rt===1){if(B.current)return;let $e=C.inputRef.current;if(!$e)return;let ue=$e.value,{selectionStart:Ie,selectionEnd:Xe,selectionDirection:Et}=$e;$e.value="",$e.value=ue,Et!==null?$e.setSelectionRange(Ie,Xe,Et):$e.setSelectionRange(Ie,Xe)}},[C.comboboxState]);let re=b.useRef(!1),fe=te(()=>{re.current=!0}),Ce=te(()=>{_.nextFrame(()=>{re.current=!1})}),Ne=te(V=>{switch(B.current=!0,V.key){case Ge.Enter:if(B.current=!1,C.comboboxState!==0||re.current)return;if(V.preventDefault(),V.stopPropagation(),C.activeOptionIndex===null){F.closeCombobox();return}F.selectActiveOption(),C.mode===0&&F.closeCombobox();break;case Ge.ArrowDown:return B.current=!1,V.preventDefault(),V.stopPropagation(),bt(C.comboboxState,{0:()=>F.goToOption(nt.Next),1:()=>F.openCombobox()});case Ge.ArrowUp:return B.current=!1,V.preventDefault(),V.stopPropagation(),bt(C.comboboxState,{0:()=>F.goToOption(nt.Previous),1:()=>{F.openCombobox(),_.nextFrame(()=>{C.value||F.goToOption(nt.Last)})}});case Ge.Home:if(V.shiftKey)break;return B.current=!1,V.preventDefault(),V.stopPropagation(),F.goToOption(nt.First);case Ge.PageUp:return B.current=!1,V.preventDefault(),V.stopPropagation(),F.goToOption(nt.First);case Ge.End:if(V.shiftKey)break;return B.current=!1,V.preventDefault(),V.stopPropagation(),F.goToOption(nt.Last);case Ge.PageDown:return B.current=!1,V.preventDefault(),V.stopPropagation(),F.goToOption(nt.Last);case Ge.Escape:return B.current=!1,C.comboboxState!==0?void 0:(V.preventDefault(),C.optionsRef.current&&!C.optionsPropsRef.current.static&&V.stopPropagation(),C.nullable&&C.mode===0&&C.value===null&&W(),F.closeCombobox());case Ge.Tab:if(B.current=!1,C.comboboxState!==0)return;C.mode===0&&C.activationTrigger!==1&&F.selectActiveOption(),F.closeCombobox();break}}),Oe=te(V=>{x==null||x(V),C.nullable&&C.mode===0&&V.target.value===""&&W(),F.openCombobox()}),y=te(V=>{var rt,$e,ue;let Ie=(rt=V.relatedTarget)!=null?rt:qt.find(Xe=>Xe!==V.currentTarget);if(B.current=!1,!(($e=C.optionsRef.current)!=null&&$e.contains(Ie))&&!((ue=C.buttonRef.current)!=null&&ue.contains(Ie))&&C.comboboxState===0)return V.preventDefault(),C.mode===0&&(C.nullable&&C.value===null?W():C.activationTrigger!==1&&F.selectActiveOption()),F.closeCombobox()}),me=te(V=>{var rt,$e,ue;let Ie=(rt=V.relatedTarget)!=null?rt:qt.find(Xe=>Xe!==V.currentTarget);($e=C.buttonRef.current)!=null&&$e.contains(Ie)||(ue=C.optionsRef.current)!=null&&ue.contains(Ie)||C.disabled||C.immediate&&C.comboboxState!==0&&(F.openCombobox(),_.nextFrame(()=>{F.setActivationTrigger(1)}))}),Fe=no(()=>{if(C.labelId)return[C.labelId].join(" ")},[C.labelId]),Be=b.useMemo(()=>({open:C.comboboxState===0,disabled:C.disabled}),[C]),it={ref:D,id:v,role:"combobox",type:k,"aria-controls":(r=C.optionsRef.current)==null?void 0:r.id,"aria-expanded":C.comboboxState===0,"aria-activedescendant":C.activeOptionIndex===null?void 0:C.virtual?(n=C.options.find(V=>{var rt;return!((rt=C.virtual)!=null&&rt.disabled(V.dataRef.current.value))&&C.compare(V.dataRef.current.value,C.virtual.options[C.activeOptionIndex])}))==null?void 0:n.id:(u=C.options[C.activeOptionIndex])==null?void 0:u.id,"aria-labelledby":Fe,"aria-autocomplete":"list",defaultValue:(a=(f=t.defaultValue)!=null?f:C.defaultValue!==void 0?E==null?void 0:E(C.defaultValue):null)!=null?a:C.defaultValue,disabled:C.disabled,onCompositionStart:fe,onCompositionEnd:Ce,onKeyDown:Ne,onChange:Oe,onFocus:me,onBlur:y};return pt({ourProps:it,theirProps:M,slot:Be,defaultTag:Gs,name:"Combobox.Input"})}let Ks="button";function Xs(t,l){var r;let n=En("Combobox.Button"),u=Vn("Combobox.Button"),f=wt(n.buttonRef,l),a=Dt(),{id:m=`headlessui-combobox-button-${a}`,...v}=t,x=tn(),E=te(D=>{switch(D.key){case Ge.ArrowDown:return D.preventDefault(),D.stopPropagation(),n.comboboxState===1&&u.openCombobox(),x.nextFrame(()=>{var $;return($=n.inputRef.current)==null?void 0:$.focus({preventScroll:!0})});case Ge.ArrowUp:return D.preventDefault(),D.stopPropagation(),n.comboboxState===1&&(u.openCombobox(),x.nextFrame(()=>{n.value||u.goToOption(nt.Last)})),x.nextFrame(()=>{var $;return($=n.inputRef.current)==null?void 0:$.focus({preventScroll:!0})});case Ge.Escape:return n.comboboxState!==0?void 0:(D.preventDefault(),n.optionsRef.current&&!n.optionsPropsRef.current.static&&D.stopPropagation(),u.closeCombobox(),x.nextFrame(()=>{var $;return($=n.inputRef.current)==null?void 0:$.focus({preventScroll:!0})}));default:return}}),k=te(D=>{if(Nr(D.currentTarget))return D.preventDefault();n.comboboxState===0?u.closeCombobox():(D.preventDefault(),u.openCombobox()),x.nextFrame(()=>{var $;return($=n.inputRef.current)==null?void 0:$.focus({preventScroll:!0})})}),M=no(()=>{if(n.labelId)return[n.labelId,m].join(" ")},[n.labelId,m]),C=b.useMemo(()=>({open:n.comboboxState===0,disabled:n.disabled,value:n.value}),[n]),F={ref:f,id:m,type:ao(t,n.buttonRef),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(r=n.optionsRef.current)==null?void 0:r.id,"aria-expanded":n.comboboxState===0,"aria-labelledby":M,disabled:n.disabled,onClick:k,onKeyDown:E};return pt({ourProps:F,theirProps:v,slot:C,defaultTag:Ks,name:"Combobox.Button"})}let Js="label";function Qs(t,l){let r=Dt(),{id:n=`headlessui-combobox-label-${r}`,...u}=t,f=En("Combobox.Label"),a=Vn("Combobox.Label"),m=wt(f.labelRef,l);tt(()=>a.registerLabel(n),[n]);let v=te(()=>{var E;return(E=f.inputRef.current)==null?void 0:E.focus({preventScroll:!0})}),x=b.useMemo(()=>({open:f.comboboxState===0,disabled:f.disabled}),[f]);return pt({ourProps:{ref:m,id:n,onClick:v},theirProps:u,slot:x,defaultTag:Js,name:"Combobox.Label"})}let ea="ul",ta=dn.RenderStrategy|dn.Static;function na(t,l){let r=Dt(),{id:n=`headlessui-combobox-options-${r}`,hold:u=!1,...f}=t,a=En("Combobox.Options"),m=wt(a.optionsRef,l),v=Un(),x=v!==null?(v&Ct.Open)===Ct.Open:a.comboboxState===0;tt(()=>{var C;a.optionsPropsRef.current.static=(C=t.static)!=null?C:!1},[a.optionsPropsRef,t.static]),tt(()=>{a.optionsPropsRef.current.hold=u},[a.optionsPropsRef,u]),Tl({container:a.optionsRef.current,enabled:a.comboboxState===0,accept(C){return C.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:C.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(C){C.setAttribute("role","none")}});let E=no(()=>{var C,F;return(F=a.labelId)!=null?F:(C=a.buttonRef.current)==null?void 0:C.id},[a.labelId,a.buttonRef.current]),k=b.useMemo(()=>({open:a.comboboxState===0,option:void 0}),[a]),M={"aria-labelledby":E,role:"listbox","aria-multiselectable":a.mode===1?!0:void 0,id:n,ref:m};return a.virtual&&a.comboboxState===0&&Object.assign(f,{children:b.createElement(Us,null,f.children)}),pt({ourProps:M,theirProps:f,slot:k,defaultTag:ea,features:ta,visible:x,name:"Combobox.Options"})}let ra="li";function oa(t,l){var r;let n=Dt(),{id:u=`headlessui-combobox-option-${n}`,disabled:f=!1,value:a,order:m=null,...v}=t,x=En("Combobox.Option"),E=Vn("Combobox.Option"),k=x.virtual?x.activeOptionIndex===x.calculateIndex(a):x.activeOptionIndex===null?!1:((r=x.options[x.activeOptionIndex])==null?void 0:r.id)===u,M=x.isSelected(a),C=b.useRef(null),F=Vt({disabled:f,value:a,domRef:C,order:m}),D=b.useContext(Pl),$=wt(l,C,D?D.measureElement:null),B=te(()=>E.onChange(a));tt(()=>E.registerOption(u,F),[F,u]);let _=b.useRef(!(x.virtual||x.__demoMode));tt(()=>{if(!x.virtual||!x.__demoMode)return;let y=Wt();return y.requestAnimationFrame(()=>{_.current=!0}),y.dispose},[x.virtual,x.__demoMode]),tt(()=>{if(!_.current||x.comboboxState!==0||!k||x.activationTrigger===0)return;let y=Wt();return y.requestAnimationFrame(()=>{var me,Fe;(Fe=(me=C.current)==null?void 0:me.scrollIntoView)==null||Fe.call(me,{block:"nearest"})}),y.dispose},[C,k,x.comboboxState,x.activationTrigger,x.activeOptionIndex]);let W=te(y=>{var me;if(f||(me=x.virtual)!=null&&me.disabled(a))return y.preventDefault();B(),yl()||requestAnimationFrame(()=>{var Fe;return(Fe=x.inputRef.current)==null?void 0:Fe.focus({preventScroll:!0})}),x.mode===0&&requestAnimationFrame(()=>E.closeCombobox())}),K=te(()=>{var y;if(f||(y=x.virtual)!=null&&y.disabled(a))return E.goToOption(nt.Nothing);let me=x.calculateIndex(a);E.goToOption(nt.Specific,me)}),re=jl(),fe=te(y=>re.update(y)),Ce=te(y=>{var me;if(!re.wasMoved(y)||f||(me=x.virtual)!=null&&me.disabled(a)||k)return;let Fe=x.calculateIndex(a);E.goToOption(nt.Specific,Fe,0)}),Ne=te(y=>{var me;re.wasMoved(y)&&(f||(me=x.virtual)!=null&&me.disabled(a)||k&&(x.optionsPropsRef.current.hold||E.goToOption(nt.Nothing)))}),Oe=b.useMemo(()=>({active:k,selected:M,disabled:f}),[k,M,f]);return pt({ourProps:{id:u,ref:$,role:"option",tabIndex:f===!0?void 0:-1,"aria-disabled":f===!0?!0:void 0,"aria-selected":M,disabled:void 0,onClick:W,onFocus:K,onPointerEnter:fe,onMouseEnter:fe,onPointerMove:Ce,onMouseMove:Ce,onPointerLeave:Ne,onMouseLeave:Ne},theirProps:v,slot:Oe,defaultTag:ra,name:"Combobox.Option"})}let la=mt(Ys),ia=mt(Xs),sa=mt(qs),aa=mt(Qs),ua=mt(na),ca=mt(oa),rn=Object.assign(la,{Input:sa,Button:ia,Label:aa,Options:ua,Option:ca});function Fl(t,l,r,n){let u=Vt(r);b.useEffect(()=>{t=t??window;function f(a){u.current(a)}return t.addEventListener(l,f,n),()=>t.removeEventListener(l,f,n)},[t,l,n])}function Zn(){let t=b.useRef(!1);return tt(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Ml(t){let l=te(t),r=b.useRef(!1);b.useEffect(()=>(r.current=!1,()=>{r.current=!0,Er(()=>{r.current&&l()})}),[l])}var Yn=(t=>(t[t.Forwards=0]="Forwards",t[t.Backwards=1]="Backwards",t))(Yn||{});function da(){let t=b.useRef(0);return wl("keydown",l=>{l.key==="Tab"&&(t.current=l.shiftKey?1:0)},!0),t}function Rl(t){if(!t)return new Set;if(typeof t=="function")return new Set(t());let l=new Set;for(let r of t.current)r.current instanceof HTMLElement&&l.add(r.current);return l}let fa="div";var Ll=(t=>(t[t.None=1]="None",t[t.InitialFocus=2]="InitialFocus",t[t.TabLock=4]="TabLock",t[t.FocusLock=8]="FocusLock",t[t.RestoreFocus=16]="RestoreFocus",t[t.All=30]="All",t))(Ll||{});function pa(t,l){let r=b.useRef(null),n=wt(r,l),{initialFocus:u,containers:f,features:a=30,...m}=t;kn()||(a=1);let v=wn(r);va({ownerDocument:v},!!(a&16));let x=ga({ownerDocument:v,container:r,initialFocus:u},!!(a&2));ba({ownerDocument:v,container:r,containers:f,previousActiveElement:x},!!(a&8));let E=da(),k=te(D=>{let $=r.current;$&&(B=>B())(()=>{bt(E.current,{[Yn.Forwards]:()=>{zn($,nn.First,{skipElements:[D.relatedTarget]})},[Yn.Backwards]:()=>{zn($,nn.Last,{skipElements:[D.relatedTarget]})}})})}),M=tn(),C=b.useRef(!1),F={ref:n,onKeyDown(D){D.key=="Tab"&&(C.current=!0,M.requestAnimationFrame(()=>{C.current=!1}))},onBlur(D){let $=Rl(f);r.current instanceof HTMLElement&&$.add(r.current);let B=D.relatedTarget;B instanceof HTMLElement&&B.dataset.headlessuiFocusGuard!=="true"&&(Al($,B)||(C.current?zn(r.current,bt(E.current,{[Yn.Forwards]:()=>nn.Next,[Yn.Backwards]:()=>nn.Previous})|nn.WrapAround,{relativeTo:D.target}):D.target instanceof HTMLElement&&cn(D.target)))}};return b.createElement(b.Fragment,null,!!(a&4)&&b.createElement(Hn,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:k,features:Pn.Focusable}),pt({ourProps:F,theirProps:m,defaultTag:fa,name:"FocusTrap"}),!!(a&4)&&b.createElement(Hn,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:k,features:Pn.Focusable}))}let ma=mt(pa),Gn=Object.assign(ma,{features:Ll});function ha(t=!0){let l=b.useRef(qt.slice());return Wn(([r],[n])=>{n===!0&&r===!1&&Er(()=>{l.current.splice(0)}),n===!1&&r===!0&&(l.current=qt.slice())},[t,qt,l]),te(()=>{var r;return(r=l.current.find(n=>n!=null&&n.isConnected))!=null?r:null})}function va({ownerDocument:t},l){let r=ha(l);Wn(()=>{l||(t==null?void 0:t.activeElement)===(t==null?void 0:t.body)&&cn(r())},[l]),Ml(()=>{l&&cn(r())})}function ga({ownerDocument:t,container:l,initialFocus:r},n){let u=b.useRef(null),f=Zn();return Wn(()=>{if(!n)return;let a=l.current;a&&Er(()=>{if(!f.current)return;let m=t==null?void 0:t.activeElement;if(r!=null&&r.current){if((r==null?void 0:r.current)===m){u.current=m;return}}else if(a.contains(m)){u.current=m;return}r!=null&&r.current?cn(r.current):zn(a,nn.First)===vl.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),u.current=t==null?void 0:t.activeElement})},[n]),u}function ba({ownerDocument:t,container:l,containers:r,previousActiveElement:n},u){let f=Zn();Fl(t==null?void 0:t.defaultView,"focus",a=>{if(!u||!f.current)return;let m=Rl(r);l.current instanceof HTMLElement&&m.add(l.current);let v=n.current;if(!v)return;let x=a.target;x&&x instanceof HTMLElement?Al(m,x)?(n.current=x,cn(x)):(a.preventDefault(),a.stopPropagation(),cn(v)):cn(n.current)},!0)}function Al(t,l){for(let r of t)if(r.contains(l))return!0;return!1}let Dl=b.createContext(!1);function xa(){return b.useContext(Dl)}function go(t){return b.createElement(Dl.Provider,{value:t.force},t.children)}function ya(t){let l=xa(),r=b.useContext($l),n=wn(t),[u,f]=b.useState(()=>{if(!l&&r!==null||en.isServer)return null;let a=n==null?void 0:n.getElementById("headlessui-portal-root");if(a)return a;if(n===null)return null;let m=n.createElement("div");return m.setAttribute("id","headlessui-portal-root"),n.body.appendChild(m)});return b.useEffect(()=>{u!==null&&(n!=null&&n.body.contains(u)||n==null||n.body.appendChild(u))},[u,n]),b.useEffect(()=>{l||r!==null&&f(r.current)},[r,f,l]),u}let wa=b.Fragment;function Ea(t,l){let r=t,n=b.useRef(null),u=wt(Ps(E=>{n.current=E}),l),f=wn(n),a=ya(n),[m]=b.useState(()=>{var E;return en.isServer?null:(E=f==null?void 0:f.createElement("div"))!=null?E:null}),v=b.useContext(bo),x=kn();return tt(()=>{!a||!m||a.contains(m)||(m.setAttribute("data-headlessui-portal",""),a.appendChild(m))},[a,m]),tt(()=>{if(m&&v)return v.register(m)},[v,m]),Ml(()=>{var E;!a||!m||(m instanceof Node&&a.contains(m)&&a.removeChild(m),a.childNodes.length<=0&&((E=a.parentElement)==null||E.removeChild(a)))}),x?!a||!m?null:wr.createPortal(pt({ourProps:{ref:u},theirProps:r,defaultTag:wa,name:"Portal"}),m):null}let Sa=b.Fragment,$l=b.createContext(null);function Ca(t,l){let{target:r,...n}=t,u={ref:wt(l)};return b.createElement($l.Provider,{value:r},pt({ourProps:u,theirProps:n,defaultTag:Sa,name:"Popover.Group"}))}let bo=b.createContext(null);function ja(){let t=b.useContext(bo),l=b.useRef([]),r=te(f=>(l.current.push(f),t&&t.register(f),()=>n(f))),n=te(f=>{let a=l.current.indexOf(f);a!==-1&&l.current.splice(a,1),t&&t.unregister(f)}),u=b.useMemo(()=>({register:r,unregister:n,portals:l}),[r,n,l]);return[l,b.useMemo(()=>function({children:f}){return b.createElement(bo.Provider,{value:u},f)},[u])]}let Ta=mt(Ea),Oa=mt(Ca),xo=Object.assign(Ta,{Group:Oa});function Na(t,l){return t===l&&(t!==0||1/t===1/l)||t!==t&&l!==l}const Ia=typeof Object.is=="function"?Object.is:Na,{useState:ka,useEffect:Pa,useLayoutEffect:Fa,useDebugValue:Ma}=G;function Ra(t,l,r){const n=l(),[{inst:u},f]=ka({inst:{value:n,getSnapshot:l}});return Fa(()=>{u.value=n,u.getSnapshot=l,yo(u)&&f({inst:u})},[t,n,l]),Pa(()=>(yo(u)&&f({inst:u}),t(()=>{yo(u)&&f({inst:u})})),[t]),Ma(n),n}function yo(t){const l=t.getSnapshot,r=t.value;try{const n=l();return!Ia(r,n)}catch{return!0}}function La(t,l,r){return l()}const Aa=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Da=!Aa,$a=Da?La:Ra,_a="useSyncExternalStore"in G?(t=>t.useSyncExternalStore)(G):$a;function Ba(t){return _a(t.subscribe,t.getSnapshot,t.getSnapshot)}function za(t,l){let r=t(),n=new Set;return{getSnapshot(){return r},subscribe(u){return n.add(u),()=>n.delete(u)},dispatch(u,...f){let a=l[u].call(r,...f);a&&(r=a,n.forEach(m=>m()))}}}function Wa(){let t;return{before({doc:l}){var r;let n=l.documentElement;t=((r=l.defaultView)!=null?r:window).innerWidth-n.clientWidth},after({doc:l,d:r}){let n=l.documentElement,u=n.clientWidth-n.offsetWidth,f=t-u;r.style(n,"paddingRight",`${f}px`)}}}function Ha(){return xl()?{before({doc:t,d:l,meta:r}){function n(u){return r.containers.flatMap(f=>f()).some(f=>f.contains(u))}l.microTask(()=>{var u;if(window.getComputedStyle(t.documentElement).scrollBehavior!=="auto"){let m=Wt();m.style(t.documentElement,"scrollBehavior","auto"),l.add(()=>l.microTask(()=>m.dispose()))}let f=(u=window.scrollY)!=null?u:window.pageYOffset,a=null;l.addEventListener(t,"click",m=>{if(m.target instanceof HTMLElement)try{let v=m.target.closest("a");if(!v)return;let{hash:x}=new URL(v.href),E=t.querySelector(x);E&&!n(E)&&(a=E)}catch{}},!0),l.addEventListener(t,"touchstart",m=>{if(m.target instanceof HTMLElement)if(n(m.target)){let v=m.target;for(;v.parentElement&&n(v.parentElement);)v=v.parentElement;l.style(v,"overscrollBehavior","contain")}else l.style(m.target,"touchAction","none")}),l.addEventListener(t,"touchmove",m=>{if(m.target instanceof HTMLElement)if(n(m.target)){let v=m.target;for(;v.parentElement&&v.dataset.headlessuiPortal!==""&&!(v.scrollHeight>v.clientHeight||v.scrollWidth>v.clientWidth);)v=v.parentElement;v.dataset.headlessuiPortal===""&&m.preventDefault()}else m.preventDefault()},{passive:!1}),l.add(()=>{var m;let v=(m=window.scrollY)!=null?m:window.pageYOffset;f!==v&&window.scrollTo(0,f),a&&a.isConnected&&(a.scrollIntoView({block:"nearest"}),a=null)})})}}:{}}function Ua(){return{before({doc:t,d:l}){l.style(t.documentElement,"overflow","hidden")}}}function Va(t){let l={};for(let r of t)Object.assign(l,r(l));return l}let Sn=za(()=>new Map,{PUSH(t,l){var r;let n=(r=this.get(t))!=null?r:{doc:t,count:0,d:Wt(),meta:new Set};return n.count++,n.meta.add(l),this.set(t,n),this},POP(t,l){let r=this.get(t);return r&&(r.count--,r.meta.delete(l)),this},SCROLL_PREVENT({doc:t,d:l,meta:r}){let n={doc:t,d:l,meta:Va(r)},u=[Ha(),Wa(),Ua()];u.forEach(({before:f})=>f==null?void 0:f(n)),u.forEach(({after:f})=>f==null?void 0:f(n))},SCROLL_ALLOW({d:t}){t.dispose()},TEARDOWN({doc:t}){this.delete(t)}});Sn.subscribe(()=>{let t=Sn.getSnapshot(),l=new Map;for(let[r]of t)l.set(r,r.documentElement.style.overflow);for(let r of t.values()){let n=l.get(r.doc)==="hidden",u=r.count!==0;(u&&!n||!u&&n)&&Sn.dispatch(r.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",r),r.count===0&&Sn.dispatch("TEARDOWN",r)}});function Za(t,l,r){let n=Ba(Sn),u=t?n.get(t):void 0,f=u?u.count>0:!1;return tt(()=>{if(!(!t||!l))return Sn.dispatch("PUSH",t,r),()=>Sn.dispatch("POP",t,r)},[l,t]),f}let wo=new Map,qn=new Map;function _l(t,l=!0){tt(()=>{var r;if(!l)return;let n=typeof t=="function"?t():t.current;if(!n)return;function u(){var a;if(!n)return;let m=(a=qn.get(n))!=null?a:1;if(m===1?qn.delete(n):qn.set(n,m-1),m!==1)return;let v=wo.get(n);v&&(v["aria-hidden"]===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",v["aria-hidden"]),n.inert=v.inert,wo.delete(n))}let f=(r=qn.get(n))!=null?r:0;return qn.set(n,f+1),f!==0||(wo.set(n,{"aria-hidden":n.getAttribute("aria-hidden"),inert:n.inert}),n.setAttribute("aria-hidden","true"),n.inert=!0),u},[t,l])}function Ya({defaultContainers:t=[],portals:l,mainTreeNodeRef:r}={}){var n;let u=b.useRef((n=r==null?void 0:r.current)!=null?n:null),f=wn(u),a=te(()=>{var m,v,x;let E=[];for(let k of t)k!==null&&(k instanceof HTMLElement?E.push(k):"current"in k&&k.current instanceof HTMLElement&&E.push(k.current));if(l!=null&&l.current)for(let k of l.current)E.push(k);for(let k of(m=f==null?void 0:f.querySelectorAll("html > *, body > *"))!=null?m:[])k!==document.body&&k!==document.head&&k instanceof HTMLElement&&k.id!=="headlessui-portal-root"&&(k.contains(u.current)||k.contains((x=(v=u.current)==null?void 0:v.getRootNode())==null?void 0:x.host)||E.some(M=>k.contains(M))||E.push(k));return E});return{resolveContainers:a,contains:te(m=>a().some(v=>v.contains(m))),mainTreeNodeRef:u,MainTreeNode:b.useMemo(()=>function(){return r!=null?null:b.createElement(Hn,{features:Pn.Hidden,ref:u})},[u,r])}}let Eo=b.createContext(()=>{});Eo.displayName="StackContext";var So=(t=>(t[t.Add=0]="Add",t[t.Remove=1]="Remove",t))(So||{});function Ga(){return b.useContext(Eo)}function qa({children:t,onUpdate:l,type:r,element:n,enabled:u}){let f=Ga(),a=te((...m)=>{l==null||l(...m),f(...m)});return tt(()=>{let m=u===void 0||u===!0;return m&&a(0,r,n),()=>{m&&a(1,r,n)}},[a,r,n,u]),b.createElement(Eo.Provider,{value:a},t)}let Bl=b.createContext(null);function zl(){let t=b.useContext(Bl);if(t===null){let l=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(l,zl),l}return t}function Wl(){let[t,l]=b.useState([]);return[t.length>0?t.join(" "):void 0,b.useMemo(()=>function(r){let n=te(f=>(l(a=>[...a,f]),()=>l(a=>{let m=a.slice(),v=m.indexOf(f);return v!==-1&&m.splice(v,1),m}))),u=b.useMemo(()=>({register:n,slot:r.slot,name:r.name,props:r.props}),[n,r.slot,r.name,r.props]);return b.createElement(Bl.Provider,{value:u},r.children)},[l])]}let Ka="p";function Xa(t,l){let r=Dt(),{id:n=`headlessui-description-${r}`,...u}=t,f=zl(),a=wt(l);tt(()=>f.register(n),[n,f.register]);let m={ref:a,...f.props,id:n};return pt({ourProps:m,theirProps:u,slot:f.slot||{},defaultTag:Ka,name:f.name||"Description"})}let Ja=mt(Xa),Hl=Object.assign(Ja,{});var Qa=(t=>(t[t.Open=0]="Open",t[t.Closed=1]="Closed",t))(Qa||{}),eu=(t=>(t[t.SetTitleId=0]="SetTitleId",t))(eu||{});let tu={0(t,l){return t.titleId===l.id?t:{...t,titleId:l.id}}},Ir=b.createContext(null);Ir.displayName="DialogContext";function Kn(t){let l=b.useContext(Ir);if(l===null){let r=new Error(`<${t} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Kn),r}return l}function nu(t,l,r=()=>[document.body]){Za(t,l,n=>{var u;return{containers:[...(u=n.containers)!=null?u:[],r]}})}function ru(t,l){return bt(l.type,tu,t,l)}let ou="div",lu=dn.RenderStrategy|dn.Static;function iu(t,l){let r=Dt(),{id:n=`headlessui-dialog-${r}`,open:u,onClose:f,initialFocus:a,role:m="dialog",__demoMode:v=!1,...x}=t,[E,k]=b.useState(0),M=b.useRef(!1);m=function(){return m==="dialog"||m==="alertdialog"?m:(M.current||(M.current=!0,console.warn(`Invalid role [${m}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let C=Un();u===void 0&&C!==null&&(u=(C&Ct.Open)===Ct.Open);let F=b.useRef(null),D=wt(F,l),$=wn(F),B=t.hasOwnProperty("open")||C!==null,_=t.hasOwnProperty("onClose");if(!B&&!_)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!B)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!_)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof u!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${u}`);if(typeof f!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${f}`);let W=u?0:1,[K,re]=b.useReducer(ru,{titleId:null,descriptionId:null,panelRef:b.createRef()}),fe=te(()=>f(!1)),Ce=te(q=>re({type:0,id:q})),Ne=kn()?v?!1:W===0:!1,Oe=E>1,y=b.useContext(Ir)!==null,[me,Fe]=ja(),Be={get current(){var q;return(q=K.panelRef.current)!=null?q:F.current}},{resolveContainers:it,mainTreeNodeRef:V,MainTreeNode:rt}=Ya({portals:me,defaultContainers:[Be]}),$e=Oe?"parent":"leaf",ue=C!==null?(C&Ct.Closing)===Ct.Closing:!1,Ie=y||ue?!1:Ne,Xe=b.useCallback(()=>{var q,ge;return(ge=Array.from((q=$==null?void 0:$.querySelectorAll("body > *"))!=null?q:[]).find(je=>je.id==="headlessui-portal-root"?!1:je.contains(V.current)&&je instanceof HTMLElement))!=null?ge:null},[V]);_l(Xe,Ie);let Et=Oe?!0:Ne,ut=b.useCallback(()=>{var q,ge;return(ge=Array.from((q=$==null?void 0:$.querySelectorAll("[data-headlessui-portal]"))!=null?q:[]).find(je=>je.contains(V.current)&&je instanceof HTMLElement))!=null?ge:null},[V]);_l(ut,Et),so(it,q=>{q.preventDefault(),fe()},!(!Ne||Oe));let ht=!(Oe||W!==0);Fl($==null?void 0:$.defaultView,"keydown",q=>{ht&&(q.defaultPrevented||q.key===Ge.Escape&&(q.preventDefault(),q.stopPropagation(),fe()))}),nu($,!(ue||W!==0||y),it),b.useEffect(()=>{if(W!==0||!F.current)return;let q=new ResizeObserver(ge=>{for(let je of ge){let Pe=je.target.getBoundingClientRect();Pe.x===0&&Pe.y===0&&Pe.width===0&&Pe.height===0&&fe()}});return q.observe(F.current),()=>q.disconnect()},[W,F,fe]);let[ke,Je]=Wl(),Ze=b.useMemo(()=>[{dialogState:W,close:fe,setTitleId:Ce},K],[W,K,fe,Ce]),le=b.useMemo(()=>({open:W===0}),[W]),Ee={ref:D,id:n,role:m,"aria-modal":W===0?!0:void 0,"aria-labelledby":K.titleId,"aria-describedby":ke};return b.createElement(qa,{type:"Dialog",enabled:W===0,element:F,onUpdate:te((q,ge)=>{ge==="Dialog"&&bt(q,{[So.Add]:()=>k(je=>je+1),[So.Remove]:()=>k(je=>je-1)})})},b.createElement(go,{force:!0},b.createElement(xo,null,b.createElement(Ir.Provider,{value:Ze},b.createElement(xo.Group,{target:F},b.createElement(go,{force:!1},b.createElement(Je,{slot:le,name:"Dialog.Description"},b.createElement(Gn,{initialFocus:a,containers:it,features:Ne?bt($e,{parent:Gn.features.RestoreFocus,leaf:Gn.features.All&~Gn.features.FocusLock}):Gn.features.None},b.createElement(Fe,null,pt({ourProps:Ee,theirProps:x,slot:le,defaultTag:ou,features:lu,visible:W===0,name:"Dialog"}))))))))),b.createElement(rt,null))}let su="div";function au(t,l){let r=Dt(),{id:n=`headlessui-dialog-overlay-${r}`,...u}=t,[{dialogState:f,close:a}]=Kn("Dialog.Overlay"),m=wt(l),v=te(E=>{if(E.target===E.currentTarget){if(Nr(E.currentTarget))return E.preventDefault();E.preventDefault(),E.stopPropagation(),a()}}),x=b.useMemo(()=>({open:f===0}),[f]);return pt({ourProps:{ref:m,id:n,"aria-hidden":!0,onClick:v},theirProps:u,slot:x,defaultTag:su,name:"Dialog.Overlay"})}let uu="div";function cu(t,l){let r=Dt(),{id:n=`headlessui-dialog-backdrop-${r}`,...u}=t,[{dialogState:f},a]=Kn("Dialog.Backdrop"),m=wt(l);b.useEffect(()=>{if(a.panelRef.current===null)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")},[a.panelRef]);let v=b.useMemo(()=>({open:f===0}),[f]);return b.createElement(go,{force:!0},b.createElement(xo,null,pt({ourProps:{ref:m,id:n,"aria-hidden":!0},theirProps:u,slot:v,defaultTag:uu,name:"Dialog.Backdrop"})))}let du="div";function fu(t,l){let r=Dt(),{id:n=`headlessui-dialog-panel-${r}`,...u}=t,[{dialogState:f},a]=Kn("Dialog.Panel"),m=wt(l,a.panelRef),v=b.useMemo(()=>({open:f===0}),[f]),x=te(E=>{E.stopPropagation()});return pt({ourProps:{ref:m,id:n,onClick:x},theirProps:u,slot:v,defaultTag:du,name:"Dialog.Panel"})}let pu="h2";function mu(t,l){let r=Dt(),{id:n=`headlessui-dialog-title-${r}`,...u}=t,[{dialogState:f,setTitleId:a}]=Kn("Dialog.Title"),m=wt(l);b.useEffect(()=>(a(n),()=>a(null)),[n,a]);let v=b.useMemo(()=>({open:f===0}),[f]);return pt({ourProps:{ref:m,id:n},theirProps:u,slot:v,defaultTag:pu,name:"Dialog.Title"})}let hu=mt(iu),vu=mt(cu),gu=mt(fu),bu=mt(au),xu=mt(mu),Ul=Object.assign(hu,{Backdrop:vu,Panel:gu,Overlay:bu,Title:xu,Description:Hl}),Vl=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Zl(t){var l,r;let n=(l=t.innerText)!=null?l:"",u=t.cloneNode(!0);if(!(u instanceof HTMLElement))return n;let f=!1;for(let m of u.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))m.remove(),f=!0;let a=f?(r=u.innerText)!=null?r:"":n;return Vl.test(a)&&(a=a.replace(Vl,"")),a}function yu(t){let l=t.getAttribute("aria-label");if(typeof l=="string")return l.trim();let r=t.getAttribute("aria-labelledby");if(r){let n=r.split(" ").map(u=>{let f=document.getElementById(u);if(f){let a=f.getAttribute("aria-label");return typeof a=="string"?a.trim():Zl(f).trim()}return null}).filter(Boolean);if(n.length>0)return n.join(", ")}return Zl(t).trim()}function wu(t){let l=b.useRef(""),r=b.useRef("");return te(()=>{let n=t.current;if(!n)return"";let u=n.innerText;if(l.current===u)return r.current;let f=yu(n).trim().toLowerCase();return l.current=u,r.current=f,f})}var Eu=(t=>(t[t.Open=0]="Open",t[t.Closed=1]="Closed",t))(Eu||{}),Su=(t=>(t[t.Pointer=0]="Pointer",t[t.Other=1]="Other",t))(Su||{}),Cu=(t=>(t[t.OpenMenu=0]="OpenMenu",t[t.CloseMenu=1]="CloseMenu",t[t.GoToItem=2]="GoToItem",t[t.Search=3]="Search",t[t.ClearSearch=4]="ClearSearch",t[t.RegisterItem=5]="RegisterItem",t[t.UnregisterItem=6]="UnregisterItem",t))(Cu||{});function Co(t,l=r=>r){let r=t.activeItemIndex!==null?t.items[t.activeItemIndex]:null,n=io(l(t.items.slice()),f=>f.dataRef.current.domRef.current),u=r?n.indexOf(r):null;return u===-1&&(u=null),{items:n,activeItemIndex:u}}let ju={1(t){return t.menuState===1?t:{...t,activeItemIndex:null,menuState:1}},0(t){return t.menuState===0?t:{...t,__demoMode:!1,menuState:0}},2:(t,l)=>{var r;let n=Co(t),u=po(l,{resolveItems:()=>n.items,resolveActiveIndex:()=>n.activeItemIndex,resolveId:f=>f.id,resolveDisabled:f=>f.dataRef.current.disabled});return{...t,...n,searchQuery:"",activeItemIndex:u,activationTrigger:(r=l.trigger)!=null?r:1}},3:(t,l)=>{let r=t.searchQuery!==""?0:1,n=t.searchQuery+l.value.toLowerCase(),u=(t.activeItemIndex!==null?t.items.slice(t.activeItemIndex+r).concat(t.items.slice(0,t.activeItemIndex+r)):t.items).find(a=>{var m;return((m=a.dataRef.current.textValue)==null?void 0:m.startsWith(n))&&!a.dataRef.current.disabled}),f=u?t.items.indexOf(u):-1;return f===-1||f===t.activeItemIndex?{...t,searchQuery:n}:{...t,searchQuery:n,activeItemIndex:f,activationTrigger:1}},4(t){return t.searchQuery===""?t:{...t,searchQuery:"",searchActiveItemIndex:null}},5:(t,l)=>{let r=Co(t,n=>[...n,{id:l.id,dataRef:l.dataRef}]);return{...t,...r}},6:(t,l)=>{let r=Co(t,n=>{let u=n.findIndex(f=>f.id===l.id);return u!==-1&&n.splice(u,1),n});return{...t,...r,activationTrigger:1}}},jo=b.createContext(null);jo.displayName="MenuContext";function kr(t){let l=b.useContext(jo);if(l===null){let r=new Error(`<${t} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,kr),r}return l}function Tu(t,l){return bt(l.type,ju,t,l)}let Ou=b.Fragment;function Nu(t,l){let{__demoMode:r=!1,...n}=t,u=b.useReducer(Tu,{__demoMode:r,menuState:r?0:1,buttonRef:b.createRef(),itemsRef:b.createRef(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:f,itemsRef:a,buttonRef:m},v]=u,x=wt(l);so([m,a],(C,F)=>{var D;v({type:1}),lo(F,oo.Loose)||(C.preventDefault(),(D=m.current)==null||D.focus())},f===0);let E=te(()=>{v({type:1})}),k=b.useMemo(()=>({open:f===0,close:E}),[f,E]),M={ref:x};return b.createElement(jo.Provider,{value:u},b.createElement(fo,{value:bt(f,{0:Ct.Open,1:Ct.Closed})},pt({ourProps:M,theirProps:n,slot:k,defaultTag:Ou,name:"Menu"})))}let Iu="button";function ku(t,l){var r;let n=Dt(),{id:u=`headlessui-menu-button-${n}`,...f}=t,[a,m]=kr("Menu.Button"),v=wt(a.buttonRef,l),x=tn(),E=te(D=>{switch(D.key){case Ge.Space:case Ge.Enter:case Ge.ArrowDown:D.preventDefault(),D.stopPropagation(),m({type:0}),x.nextFrame(()=>m({type:2,focus:nt.First}));break;case Ge.ArrowUp:D.preventDefault(),D.stopPropagation(),m({type:0}),x.nextFrame(()=>m({type:2,focus:nt.Last}));break}}),k=te(D=>{switch(D.key){case Ge.Space:D.preventDefault();break}}),M=te(D=>{if(Nr(D.currentTarget))return D.preventDefault();t.disabled||(a.menuState===0?(m({type:1}),x.nextFrame(()=>{var $;return($=a.buttonRef.current)==null?void 0:$.focus({preventScroll:!0})})):(D.preventDefault(),m({type:0})))}),C=b.useMemo(()=>({open:a.menuState===0}),[a]),F={ref:v,id:u,type:ao(t,a.buttonRef),"aria-haspopup":"menu","aria-controls":(r=a.itemsRef.current)==null?void 0:r.id,"aria-expanded":a.menuState===0,onKeyDown:E,onKeyUp:k,onClick:M};return pt({ourProps:F,theirProps:f,slot:C,defaultTag:Iu,name:"Menu.Button"})}let Pu="div",Fu=dn.RenderStrategy|dn.Static;function Mu(t,l){var r,n;let u=Dt(),{id:f=`headlessui-menu-items-${u}`,...a}=t,[m,v]=kr("Menu.Items"),x=wt(m.itemsRef,l),E=wn(m.itemsRef),k=tn(),M=Un(),C=M!==null?(M&Ct.Open)===Ct.Open:m.menuState===0;b.useEffect(()=>{let _=m.itemsRef.current;_&&m.menuState===0&&_!==(E==null?void 0:E.activeElement)&&_.focus({preventScroll:!0})},[m.menuState,m.itemsRef,E]),Tl({container:m.itemsRef.current,enabled:m.menuState===0,accept(_){return _.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:_.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(_){_.setAttribute("role","none")}});let F=te(_=>{var W,K;switch(k.dispose(),_.key){case Ge.Space:if(m.searchQuery!=="")return _.preventDefault(),_.stopPropagation(),v({type:3,value:_.key});case Ge.Enter:if(_.preventDefault(),_.stopPropagation(),v({type:1}),m.activeItemIndex!==null){let{dataRef:re}=m.items[m.activeItemIndex];(K=(W=re.current)==null?void 0:W.domRef.current)==null||K.click()}bl(m.buttonRef.current);break;case Ge.ArrowDown:return _.preventDefault(),_.stopPropagation(),v({type:2,focus:nt.Next});case Ge.ArrowUp:return _.preventDefault(),_.stopPropagation(),v({type:2,focus:nt.Previous});case Ge.Home:case Ge.PageUp:return _.preventDefault(),_.stopPropagation(),v({type:2,focus:nt.First});case Ge.End:case Ge.PageDown:return _.preventDefault(),_.stopPropagation(),v({type:2,focus:nt.Last});case Ge.Escape:_.preventDefault(),_.stopPropagation(),v({type:1}),Wt().nextFrame(()=>{var re;return(re=m.buttonRef.current)==null?void 0:re.focus({preventScroll:!0})});break;case Ge.Tab:_.preventDefault(),_.stopPropagation(),v({type:1}),Wt().nextFrame(()=>{Is(m.buttonRef.current,_.shiftKey?nn.Previous:nn.Next)});break;default:_.key.length===1&&(v({type:3,value:_.key}),k.setTimeout(()=>v({type:4}),350));break}}),D=te(_=>{switch(_.key){case Ge.Space:_.preventDefault();break}}),$=b.useMemo(()=>({open:m.menuState===0}),[m]),B={"aria-activedescendant":m.activeItemIndex===null||(r=m.items[m.activeItemIndex])==null?void 0:r.id,"aria-labelledby":(n=m.buttonRef.current)==null?void 0:n.id,id:f,onKeyDown:F,onKeyUp:D,role:"menu",tabIndex:0,ref:x};return pt({ourProps:B,theirProps:a,slot:$,defaultTag:Pu,features:Fu,visible:C,name:"Menu.Items"})}let Ru=b.Fragment;function Lu(t,l){let r=Dt(),{id:n=`headlessui-menu-item-${r}`,disabled:u=!1,...f}=t,[a,m]=kr("Menu.Item"),v=a.activeItemIndex!==null?a.items[a.activeItemIndex].id===n:!1,x=b.useRef(null),E=wt(l,x);tt(()=>{if(a.__demoMode||a.menuState!==0||!v||a.activationTrigger===0)return;let re=Wt();return re.requestAnimationFrame(()=>{var fe,Ce;(Ce=(fe=x.current)==null?void 0:fe.scrollIntoView)==null||Ce.call(fe,{block:"nearest"})}),re.dispose},[a.__demoMode,x,v,a.menuState,a.activationTrigger,a.activeItemIndex]);let k=wu(x),M=b.useRef({disabled:u,domRef:x,get textValue(){return k()}});tt(()=>{M.current.disabled=u},[M,u]),tt(()=>(m({type:5,id:n,dataRef:M}),()=>m({type:6,id:n})),[M,n]);let C=te(()=>{m({type:1})}),F=te(re=>{if(u)return re.preventDefault();m({type:1}),bl(a.buttonRef.current)}),D=te(()=>{if(u)return m({type:2,focus:nt.Nothing});m({type:2,focus:nt.Specific,id:n})}),$=jl(),B=te(re=>$.update(re)),_=te(re=>{$.wasMoved(re)&&(u||v||m({type:2,focus:nt.Specific,id:n,trigger:0}))}),W=te(re=>{$.wasMoved(re)&&(u||v&&m({type:2,focus:nt.Nothing}))}),K=b.useMemo(()=>({active:v,disabled:u,close:C}),[v,u,C]);return pt({ourProps:{id:n,ref:E,role:"menuitem",tabIndex:u===!0?void 0:-1,"aria-disabled":u===!0?!0:void 0,disabled:void 0,onClick:F,onFocus:D,onPointerEnter:B,onMouseEnter:B,onPointerMove:_,onMouseMove:_,onPointerLeave:W,onMouseLeave:W},theirProps:f,slot:K,defaultTag:Ru,name:"Menu.Item"})}let Au=mt(Nu),Du=mt(ku),$u=mt(Mu),_u=mt(Lu),Pr=Object.assign(Au,{Button:Du,Items:$u,Item:_u}),Yl=b.createContext(null);function Gl(){let t=b.useContext(Yl);if(t===null){let l=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(l,Gl),l}return t}function Bu(){let[t,l]=b.useState([]);return[t.length>0?t.join(" "):void 0,b.useMemo(()=>function(r){let n=te(f=>(l(a=>[...a,f]),()=>l(a=>{let m=a.slice(),v=m.indexOf(f);return v!==-1&&m.splice(v,1),m}))),u=b.useMemo(()=>({register:n,slot:r.slot,name:r.name,props:r.props}),[n,r.slot,r.name,r.props]);return b.createElement(Yl.Provider,{value:u},r.children)},[l])]}let zu="label";function Wu(t,l){let r=Dt(),{id:n=`headlessui-label-${r}`,passive:u=!1,...f}=t,a=Gl(),m=wt(l);tt(()=>a.register(n),[n,a.register]);let v={ref:m,...a.props,id:n};return u&&("onClick"in v&&(delete v.htmlFor,delete v.onClick),"onClick"in f&&delete f.onClick),pt({ourProps:v,theirProps:f,slot:a.slot||{},defaultTag:zu,name:a.name||"Label"})}let Hu=mt(Wu),Uu=Object.assign(Hu,{});function Vu(t=0){let[l,r]=b.useState(t),n=Zn(),u=b.useCallback(v=>{n.current&&r(x=>x|v)},[l,n]),f=b.useCallback(v=>!!(l&v),[l]),a=b.useCallback(v=>{n.current&&r(x=>x&~v)},[r,n]),m=b.useCallback(v=>{n.current&&r(x=>x^v)},[r]);return{flags:l,addFlag:u,hasFlag:f,removeFlag:a,toggleFlag:m}}let To=b.createContext(null);To.displayName="GroupContext";let Zu=b.Fragment;function Yu(t){var l;let[r,n]=b.useState(null),[u,f]=Bu(),[a,m]=Wl(),v=b.useMemo(()=>({switch:r,setSwitch:n,labelledby:u,describedby:a}),[r,n,u,a]),x={},E=t;return b.createElement(m,{name:"Switch.Description"},b.createElement(f,{name:"Switch.Label",props:{htmlFor:(l=v.switch)==null?void 0:l.id,onClick(k){r&&(k.currentTarget.tagName==="LABEL"&&k.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},b.createElement(To.Provider,{value:v},pt({ourProps:x,theirProps:E,defaultTag:Zu,name:"Switch.Group"}))))}let Gu="button";function qu(t,l){var r;let n=Dt(),{id:u=`headlessui-switch-${n}`,checked:f,defaultChecked:a=!1,onChange:m,disabled:v=!1,name:x,value:E,form:k,...M}=t,C=b.useContext(To),F=b.useRef(null),D=wt(F,l,C===null?null:C.setSwitch),[$,B]=ml(f,m,a),_=te(()=>B==null?void 0:B(!$)),W=te(Oe=>{if(Nr(Oe.currentTarget))return Oe.preventDefault();Oe.preventDefault(),_()}),K=te(Oe=>{Oe.key===Ge.Space?(Oe.preventDefault(),_()):Oe.key===Ge.Enter&&$s(Oe.currentTarget)}),re=te(Oe=>Oe.preventDefault()),fe=b.useMemo(()=>({checked:$}),[$]),Ce={id:u,ref:D,role:"switch",type:ao(t,F),tabIndex:t.tabIndex===-1?0:(r=t.tabIndex)!=null?r:0,"aria-checked":$,"aria-labelledby":C==null?void 0:C.labelledby,"aria-describedby":C==null?void 0:C.describedby,disabled:v,onClick:W,onKeyUp:K,onKeyPress:re},Ne=tn();return b.useEffect(()=>{var Oe;let y=(Oe=F.current)==null?void 0:Oe.closest("form");y&&a!==void 0&&Ne.addEventListener(y,"reset",()=>{B(a)})},[F,B]),b.createElement(b.Fragment,null,x!=null&&$&&b.createElement(Hn,{features:Pn.Hidden,...Or({as:"input",type:"checkbox",hidden:!0,readOnly:!0,disabled:v,form:k,checked:$,name:x,value:E})}),pt({ourProps:Ce,theirProps:M,slot:fe,defaultTag:Gu,name:"Switch"}))}let Ku=mt(qu),Xu=Yu,Ju=Object.assign(Ku,{Group:Xu,Label:Uu,Description:Hl});function Qu(t){let l={called:!1};return(...r)=>{if(!l.called)return l.called=!0,t(...r)}}function Oo(t,...l){t&&l.length>0&&t.classList.add(...l)}function No(t,...l){t&&l.length>0&&t.classList.remove(...l)}function ec(t,l){let r=Wt();if(!t)return r.dispose;let{transitionDuration:n,transitionDelay:u}=getComputedStyle(t),[f,a]=[n,u].map(v=>{let[x=0]=v.split(",").filter(Boolean).map(E=>E.includes("ms")?parseFloat(E):parseFloat(E)*1e3).sort((E,k)=>k-E);return x}),m=f+a;if(m!==0){r.group(x=>{x.setTimeout(()=>{l(),x.dispose()},m),x.addEventListener(t,"transitionrun",E=>{E.target===E.currentTarget&&x.dispose()})});let v=r.addEventListener(t,"transitionend",x=>{x.target===x.currentTarget&&(l(),v())})}else l();return r.add(()=>l()),r.dispose}function tc(t,l,r,n){let u=r?"enter":"leave",f=Wt(),a=n!==void 0?Qu(n):()=>{};u==="enter"&&(t.removeAttribute("hidden"),t.style.display="");let m=bt(u,{enter:()=>l.enter,leave:()=>l.leave}),v=bt(u,{enter:()=>l.enterTo,leave:()=>l.leaveTo}),x=bt(u,{enter:()=>l.enterFrom,leave:()=>l.leaveFrom});return No(t,...l.base,...l.enter,...l.enterTo,...l.enterFrom,...l.leave,...l.leaveFrom,...l.leaveTo,...l.entered),Oo(t,...l.base,...m,...x),f.nextFrame(()=>{No(t,...l.base,...m,...x),Oo(t,...l.base,...m,...v),ec(t,()=>(No(t,...l.base,...m),Oo(t,...l.base,...l.entered),a()))}),f.dispose}function nc({immediate:t,container:l,direction:r,classes:n,onStart:u,onStop:f}){let a=Zn(),m=tn(),v=Vt(r);tt(()=>{t&&(v.current="enter")},[t]),tt(()=>{let x=Wt();m.add(x.dispose);let E=l.current;if(E&&v.current!=="idle"&&a.current)return x.dispose(),u.current(v.current),x.add(tc(E,n.current,v.current==="enter",()=>{x.dispose(),f.current(v.current)})),x.dispose},[r])}function pn(t=""){return t.split(/\s+/).filter(l=>l.length>1)}let Fr=b.createContext(null);Fr.displayName="TransitionContext";var rc=(t=>(t.Visible="visible",t.Hidden="hidden",t))(rc||{});function oc(){let t=b.useContext(Fr);if(t===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return t}function lc(){let t=b.useContext(Mr);if(t===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return t}let Mr=b.createContext(null);Mr.displayName="NestingContext";function Rr(t){return"children"in t?Rr(t.children):t.current.filter(({el:l})=>l.current!==null).filter(({state:l})=>l==="visible").length>0}function ql(t,l){let r=Vt(t),n=b.useRef([]),u=Zn(),f=tn(),a=te((C,F=fn.Hidden)=>{let D=n.current.findIndex(({el:$})=>$===C);D!==-1&&(bt(F,{[fn.Unmount](){n.current.splice(D,1)},[fn.Hidden](){n.current[D].state="hidden"}}),f.microTask(()=>{var $;!Rr(n)&&u.current&&(($=r.current)==null||$.call(r))}))}),m=te(C=>{let F=n.current.find(({el:D})=>D===C);return F?F.state!=="visible"&&(F.state="visible"):n.current.push({el:C,state:"visible"}),()=>a(C,fn.Unmount)}),v=b.useRef([]),x=b.useRef(Promise.resolve()),E=b.useRef({enter:[],leave:[],idle:[]}),k=te((C,F,D)=>{v.current.splice(0),l&&(l.chains.current[F]=l.chains.current[F].filter(([$])=>$!==C)),l==null||l.chains.current[F].push([C,new Promise($=>{v.current.push($)})]),l==null||l.chains.current[F].push([C,new Promise($=>{Promise.all(E.current[F].map(([B,_])=>_)).then(()=>$())})]),F==="enter"?x.current=x.current.then(()=>l==null?void 0:l.wait.current).then(()=>D(F)):D(F)}),M=te((C,F,D)=>{Promise.all(E.current[F].splice(0).map(([$,B])=>B)).then(()=>{var $;($=v.current.shift())==null||$()}).then(()=>D(F))});return b.useMemo(()=>({children:n,register:m,unregister:a,onStart:k,onStop:M,wait:x,chains:E}),[m,a,n,k,M,E,x])}function ic(){}let sc=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Kl(t){var l;let r={};for(let n of sc)r[n]=(l=t[n])!=null?l:ic;return r}function ac(t){let l=b.useRef(Kl(t));return b.useEffect(()=>{l.current=Kl(t)},[t]),l}let uc="div",Xl=dn.RenderStrategy;function cc(t,l){var r,n;let{beforeEnter:u,afterEnter:f,beforeLeave:a,afterLeave:m,enter:v,enterFrom:x,enterTo:E,entered:k,leave:M,leaveFrom:C,leaveTo:F,...D}=t,$=b.useRef(null),B=wt($,l),_=(r=D.unmount)==null||r?fn.Unmount:fn.Hidden,{show:W,appear:K,initial:re}=oc(),[fe,Ce]=b.useState(W?"visible":"hidden"),Ne=lc(),{register:Oe,unregister:y}=Ne;b.useEffect(()=>Oe($),[Oe,$]),b.useEffect(()=>{if(_===fn.Hidden&&$.current){if(W&&fe!=="visible"){Ce("visible");return}return bt(fe,{hidden:()=>y($),visible:()=>Oe($)})}},[fe,$,Oe,y,W,_]);let me=Vt({base:pn(D.className),enter:pn(v),enterFrom:pn(x),enterTo:pn(E),entered:pn(k),leave:pn(M),leaveFrom:pn(C),leaveTo:pn(F)}),Fe=ac({beforeEnter:u,afterEnter:f,beforeLeave:a,afterLeave:m}),Be=kn();b.useEffect(()=>{if(Be&&fe==="visible"&&$.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[$,fe,Be]);let it=re&&!K,V=K&&W&&re,rt=!Be||it?"idle":W?"enter":"leave",$e=Vu(0),ue=te(ht=>bt(ht,{enter:()=>{$e.addFlag(Ct.Opening),Fe.current.beforeEnter()},leave:()=>{$e.addFlag(Ct.Closing),Fe.current.beforeLeave()},idle:()=>{}})),Ie=te(ht=>bt(ht,{enter:()=>{$e.removeFlag(Ct.Opening),Fe.current.afterEnter()},leave:()=>{$e.removeFlag(Ct.Closing),Fe.current.afterLeave()},idle:()=>{}})),Xe=ql(()=>{Ce("hidden"),y($)},Ne),Et=b.useRef(!1);nc({immediate:V,container:$,classes:me,direction:rt,onStart:Vt(ht=>{Et.current=!0,Xe.onStart($,ht,ue)}),onStop:Vt(ht=>{Et.current=!1,Xe.onStop($,ht,Ie),ht==="leave"&&!Rr(Xe)&&(Ce("hidden"),y($))})});let ut=D,kt={ref:B};return V?ut={...ut,className:jr(D.className,...me.current.enter,...me.current.enterFrom)}:Et.current&&(ut.className=jr(D.className,(n=$.current)==null?void 0:n.className),ut.className===""&&delete ut.className),b.createElement(Mr.Provider,{value:Xe},b.createElement(fo,{value:bt(fe,{visible:Ct.Open,hidden:Ct.Closed})|$e.flags},pt({ourProps:kt,theirProps:ut,defaultTag:uc,features:Xl,visible:fe==="visible",name:"Transition.Child"})))}function dc(t,l){let{show:r,appear:n=!1,unmount:u=!0,...f}=t,a=b.useRef(null),m=wt(a,l);kn();let v=Un();if(r===void 0&&v!==null&&(r=(v&Ct.Open)===Ct.Open),![!0,!1].includes(r))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[x,E]=b.useState(r?"visible":"hidden"),k=ql(()=>{E("hidden")}),[M,C]=b.useState(!0),F=b.useRef([r]);tt(()=>{M!==!1&&F.current[F.current.length-1]!==r&&(F.current.push(r),C(!1))},[F,r]);let D=b.useMemo(()=>({show:r,appear:n,initial:M}),[r,n,M]);b.useEffect(()=>{if(r)E("visible");else if(!Rr(k))E("hidden");else{let W=a.current;if(!W)return;let K=W.getBoundingClientRect();K.x===0&&K.y===0&&K.width===0&&K.height===0&&E("hidden")}},[r,k]);let $={unmount:u},B=te(()=>{var W;M&&C(!1),(W=t.beforeEnter)==null||W.call(t)}),_=te(()=>{var W;M&&C(!1),(W=t.beforeLeave)==null||W.call(t)});return b.createElement(Mr.Provider,{value:k},b.createElement(Fr.Provider,{value:D},pt({ourProps:{...$,as:b.Fragment,children:b.createElement(Jl,{ref:m,...$,...f,beforeEnter:B,beforeLeave:_})},theirProps:{},defaultTag:b.Fragment,features:Xl,visible:x==="visible",name:"Transition"})))}function fc(t,l){let r=b.useContext(Fr)!==null,n=Un()!==null;return b.createElement(b.Fragment,null,!r&&n?b.createElement(Io,{ref:l,...t}):b.createElement(Jl,{ref:l,...t}))}let Io=mt(dc),Jl=mt(cc),pc=mt(fc),Cn=Object.assign(Io,{Child:pc,Root:Io});function mc({title:t,titleId:l,...r},n){return G.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:n,"aria-labelledby":l},r),t?G.createElement("title",{id:l},t):null,G.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 hc=G.forwardRef(mc);function vc({title:t,titleId:l,...r},n){return G.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:n,"aria-labelledby":l},r),t?G.createElement("title",{id:l},t):null,G.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 gc=G.forwardRef(vc);function bc({title:t,titleId:l,...r},n){return G.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:n,"aria-labelledby":l},r),t?G.createElement("title",{id:l},t):null,G.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 xc=G.forwardRef(bc);function yc({title:t,titleId:l,...r},n){return G.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:n,"aria-labelledby":l},r),t?G.createElement("title",{id:l},t):null,G.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 wc=G.forwardRef(yc);function Ec({title:t,titleId:l,...r},n){return G.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:n,"aria-labelledby":l},r),t?G.createElement("title",{id:l},t):null,G.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 Ql=G.forwardRef(Ec);function Sc({title:t,titleId:l,...r},n){return G.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:n,"aria-labelledby":l},r),t?G.createElement("title",{id:l},t):null,G.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 Cc=G.forwardRef(Sc);function jc({title:t,titleId:l,...r},n){return G.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:n,"aria-labelledby":l},r),t?G.createElement("title",{id:l},t):null,G.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 Tc=G.forwardRef(jc);function Oc({title:t,titleId:l,...r},n){return G.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:n,"aria-labelledby":l},r),t?G.createElement("title",{id:l},t):null,G.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 Nc=G.forwardRef(Oc),Ic={warning:{color:"bg-yellow-50",icon:T.jsx(Cc,{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:T.jsx(Nc,{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:T.jsx(xc,{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:T.jsx(Tc,{className:"h-5 w-5 text-blue-400","aria-hidden":"true"}),colorTitle:"text-blue-800",colorText:"text-blue-700"}},kc=({type:t="info",title:l,message:r,active:n=!1,time:u=1e3,onClose:f})=>{const[a,m]=b.useState(!1),v=b.useRef(null);b.useEffect(()=>(n&&(m(!0),v.current=setTimeout(()=>{m(!1),f&&f()},u)),()=>clearTimeout(v.current)),[n,u,f]);const x=Ic[t];return a?T.jsx("div",{className:"fixed top-2.5 left-1/2 transform -translate-x-1/2 w-80 3xs:w-96 z-50",children:T.jsx(Cn,{as:b.Fragment,show:a,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:T.jsxs("div",{className:se("rounded-md p-4 text-center",x.color),children:[T.jsxs("div",{className:"flex justify-center flex-shrink-0",children:[x.icon,T.jsx("h3",{className:se("text-sm font-medium ml-3",x.colorTitle),children:l})]}),T.jsx("div",{className:se("mt-2 text-sm",x.colorText),children:T.jsx("p",{children:r})})]})})}):null};function Pc({title:t,titleId:l,...r},n){return G.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:n,"aria-labelledby":l},r),t?G.createElement("title",{id:l},t):null,G.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 Fc=G.forwardRef(Pc);function Mc({title:t,titleId:l,...r},n){return G.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:n,"aria-labelledby":l},r),t?G.createElement("title",{id:l},t):null,G.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 Rc=G.forwardRef(Mc);function Lc({title:t,titleId:l,...r},n){return G.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:n,"aria-labelledby":l},r),t?G.createElement("title",{id:l},t):null,G.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"}),G.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 Ac=G.forwardRef(Lc);function Dc({title:t,titleId:l,...r},n){return G.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:n,"aria-labelledby":l},r),t?G.createElement("title",{id:l},t):null,G.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 $c=G.forwardRef(Dc);function _c({title:t,titleId:l,...r},n){return G.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:n,"aria-labelledby":l},r),t?G.createElement("title",{id:l},t):null,G.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 Bc=G.forwardRef(_c);function zc({title:t,titleId:l,...r},n){return G.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:n,"aria-labelledby":l},r),t?G.createElement("title",{id:l},t):null,G.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 Wc=G.forwardRef(zc),Hc=({src:t,alt:l,width:r,height:n,className:u="",classNameIcon:f="",isIcon:a=!0,acronym:m=""})=>{function v(){if(typeof m!="string")return m;const x=m.toLowerCase(),E=x.split(" "),k=E[E.length-1];return x.charAt(0)+k.charAt(0)}return T.jsx(T.Fragment,{children:t?T.jsx("img",{src:t,alt:l,width:r,height:n,className:se(u!==""&&u),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s"},onLoad:x=>x.currentTarget.style.filter="none","data-testid":"img"}):a?T.jsx(Bc,{className:se("bg-white text-default-5",f!==""?f:"w-7 h-7")}):T.jsx("div",{className:se("bg-gray-200 text-default-5 rounded-full font-bold uppercase flex justify-center items-center",f!==""?f:"w-7 h-7"),children:v()})})},Uc=({steps:t,onClick:l})=>{const[r,n]=b.useState(0),u=f=>{n(f),l(f)};return T.jsx("nav",{className:"flex items-center justify-center w-full","aria-label":"Progress","data-testid":"bullets",children:T.jsx("ol",{role:"list",className:"flex items-center space-x-5",children:new Array(t).fill(1).map((f,a)=>T.jsx("li",{children:r!==a?T.jsx("div",{className:"cursor-pointer block h-2.5 w-2.5 rounded-full bg-gray-500 hover:bg-gray-600",onClick:()=>u(a),"data-testid":`step-${a}`,children:T.jsx("span",{className:"sr-only",children:"step"})}):T.jsxs("div",{className:"relative flex items-center justify-center cursor-pointer","aria-current":"step",children:[T.jsx("span",{className:"absolute flex h-5 w-5 p-px","aria-hidden":"true",children:T.jsx("span",{className:"h-full w-full rounded-full bg-gray-300"})}),T.jsx("span",{className:"relative block h-2.5 w-2.5 rounded-full bg-gray-500","aria-hidden":"true"}),T.jsx("span",{className:"sr-only",children:"step"})]})},a))})})};var ei={exports:{}};/*!
|
|
31
|
+
`));let P=E.props,C=typeof(P==null?void 0:P.className)=="function"?(...R)=>Tr(P==null?void 0:P.className(...R),v.className):Tr(P==null?void 0:P.className,v.className),M=C?{className:C}:{};return g.cloneElement(E,Object.assign({},Ii(E.props,Nr(fo(v,["ref"]))),I,x,{ref:u(E.ref,x.ref)},M))}return g.createElement(f,Object.assign({},fo(v,["ref"]),f!==g.Fragment&&x,f!==g.Fragment&&I),E)}function $s(...e){return e.every(o=>o==null)?void 0:o=>{for(let r of e)r!=null&&(typeof r=="function"?r(o):r.current=o)}}function Ii(...e){if(e.length===0)return{};if(e.length===1)return e[0];let o={},r={};for(let n of e)for(let u in n)u.startsWith("on")&&typeof n[u]=="function"?(r[u]!=null||(r[u]=[]),r[u].push(n[u])):o[u]=n[u];if(o.disabled||o["aria-disabled"])return Object.assign(o,Object.fromEntries(Object.keys(r).map(n=>[n,void 0])));for(let n in r)Object.assign(o,{[n](u,...f){let a=r[n];for(let m of a){if((u instanceof Event||(u==null?void 0:u.nativeEvent)instanceof Event)&&u.defaultPrevented)return;m(u,...f)}}});return o}function gt(e){var o;return Object.assign(g.forwardRef(e),{displayName:(o=e.displayName)!=null?o:e.name})}function Nr(e){let o=Object.assign({},e);for(let r in o)o[r]===void 0&&delete o[r];return o}function fo(e,o=[]){let r=Object.assign({},e);for(let n of o)n in r&&delete r[n];return r}let _s="div";var Mn=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Mn||{});function Bs(e,o){var r;let{features:n=1,...u}=e,f={ref:o,"aria-hidden":(n&2)===2?!0:(r=u["aria-hidden"])!=null?r:void 0,hidden:(n&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",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return vt({ourProps:f,theirProps:u,slot:{},defaultTag:_s,name:"Hidden"})}let Hn=gt(Bs),po=g.createContext(null);po.displayName="OpenClosedContext";var Tt=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Tt||{});function Un(){return g.useContext(po)}function mo({value:e,children:o}){return g.createElement(po.Provider,{value:e},o)}function zs(e){function o(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",o))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",o),o())}let Kt=[];zs(()=>{function e(o){o.target instanceof HTMLElement&&o.target!==document.body&&Kt[0]!==o.target&&(Kt.unshift(o.target),Kt=Kt.filter(r=>r!=null&&r.isConnected),Kt.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 kr(e){let o=e.parentElement,r=null;for(;o&&!(o instanceof HTMLFieldSetElement);)o instanceof HTMLLegendElement&&(r=o),o=o.parentElement;let n=(o==null?void 0:o.getAttribute("disabled"))==="";return n&&Ws(r)?!1:n}function Ws(e){if(!e)return!1;let o=e.previousElementSibling;for(;o!==null;){if(o instanceof HTMLLegendElement)return!1;o=o.previousElementSibling}return!0}function Hs(e){throw new Error("Unexpected object: "+e)}var st=(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))(st||{});function ho(e,o){let r=o.resolveItems();if(r.length<=0)return null;let n=o.resolveActiveIndex(),u=n??-1;switch(e.focus){case 0:{for(let f=0;f<r.length;++f)if(!o.resolveDisabled(r[f],f,r))return f;return n}case 1:{for(let f=u-1;f>=0;--f)if(!o.resolveDisabled(r[f],f,r))return f;return n}case 2:{for(let f=u+1;f<r.length;++f)if(!o.resolveDisabled(r[f],f,r))return f;return n}case 3:{for(let f=r.length-1;f>=0;--f)if(!o.resolveDisabled(r[f],f,r))return f;return n}case 4:{for(let f=0;f<r.length;++f)if(o.resolveId(r[f],f,r)===e.id)return f;return n}case 5:return null;default:Hs(e)}}function Mi(e={},o=null,r=[]){for(let[n,u]of Object.entries(e))Fi(r,Pi(o,n),u);return r}function Pi(e,o){return e?e+"["+o+"]":o}function Fi(e,o,r){if(Array.isArray(r))for(let[n,u]of r.entries())Fi(e,Pi(o,n.toString()),u);else r instanceof Date?e.push([o,r.toISOString()]):typeof r=="boolean"?e.push([o,r?"1":"0"]):typeof r=="string"?e.push([o,r]):typeof r=="number"?e.push([o,`${r}`]):r==null?e.push([o,""]):Mi(r,o,e)}function Us(e){var o,r;let n=(o=e==null?void 0:e.form)!=null?o:e.closest("form");if(n){for(let u of n.elements)if(u!==e&&(u.tagName==="INPUT"&&u.type==="submit"||u.tagName==="BUTTON"&&u.type==="submit"||u.nodeName==="INPUT"&&u.type==="image")){u.click();return}(r=n.requestSubmit)==null||r.call(n)}}var Je=(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))(Je||{}),Vs=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Vs||{}),Ys=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Ys||{}),Zs=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(Zs||{}),Gs=(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))(Gs||{});function vo(e,o=r=>r){let r=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,n=o(e.options.slice()),u=n.length>0&&n[0].dataRef.current.order!==null?n.sort((a,m)=>a.dataRef.current.order-m.dataRef.current.order):ao(n,a=>a.dataRef.current.domRef.current),f=r?u.indexOf(r):null;return f===-1&&(f=null),{options:u,activeOptionIndex:f}}let qs={1(e){var o;return(o=e.dataRef.current)!=null&&o.disabled||e.comboboxState===1?e:{...e,activeOptionIndex:null,comboboxState:1}},0(e){var o,r;if((o=e.dataRef.current)!=null&&o.disabled||e.comboboxState===0)return e;if((r=e.dataRef.current)!=null&&r.value){let n=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(n!==-1)return{...e,activeOptionIndex:n,comboboxState:0}}return{...e,comboboxState:0}},2(e,o){var r,n,u,f,a;if((r=e.dataRef.current)!=null&&r.disabled||(n=e.dataRef.current)!=null&&n.optionsRef.current&&!((u=e.dataRef.current)!=null&&u.optionsPropsRef.current.static)&&e.comboboxState===1)return e;if(e.virtual){let E=o.focus===st.Specific?o.idx:ho(o,{resolveItems:()=>e.virtual.options,resolveActiveIndex:()=>{var P,C;return(C=(P=e.activeOptionIndex)!=null?P:e.virtual.options.findIndex(M=>!e.virtual.disabled(M)))!=null?C:null},resolveDisabled:e.virtual.disabled,resolveId(){throw new Error("Function not implemented.")}}),I=(f=o.trigger)!=null?f:2;return e.activeOptionIndex===E&&e.activationTrigger===I?e:{...e,activeOptionIndex:E,activationTrigger:I}}let m=vo(e);if(m.activeOptionIndex===null){let E=m.options.findIndex(I=>!I.dataRef.current.disabled);E!==-1&&(m.activeOptionIndex=E)}let v=o.focus===st.Specific?o.idx:ho(o,{resolveItems:()=>m.options,resolveActiveIndex:()=>m.activeOptionIndex,resolveId:E=>E.id,resolveDisabled:E=>E.dataRef.current.disabled}),x=(a=o.trigger)!=null?a:2;return e.activeOptionIndex===v&&e.activationTrigger===x?e:{...e,...m,activeOptionIndex:v,activationTrigger:x}},3:(e,o)=>{var r,n,u;if((r=e.dataRef.current)!=null&&r.virtual)return{...e,options:[...e.options,o.payload]};let f=o.payload,a=vo(e,v=>(v.push(f),v));e.activeOptionIndex===null&&(n=e.dataRef.current)!=null&&n.isSelected(o.payload.dataRef.current.value)&&(a.activeOptionIndex=a.options.indexOf(f));let m={...e,...a,activationTrigger:2};return(u=e.dataRef.current)!=null&&u.__demoMode&&e.dataRef.current.value===void 0&&(m.activeOptionIndex=0),m},4:(e,o)=>{var r;if((r=e.dataRef.current)!=null&&r.virtual)return{...e,options:e.options.filter(u=>u.id!==o.id)};let n=vo(e,u=>{let f=u.findIndex(a=>a.id===o.id);return f!==-1&&u.splice(f,1),u});return{...e,...n,activationTrigger:2}},5:(e,o)=>e.labelId===o.id?e:{...e,labelId:o.id},6:(e,o)=>e.activationTrigger===o.trigger?e:{...e,activationTrigger:o.trigger},7:(e,o)=>{var r;if(((r=e.virtual)==null?void 0:r.options)===o.options)return e;let n=e.activeOptionIndex;if(e.activeOptionIndex!==null){let u=o.options.indexOf(e.virtual.options[e.activeOptionIndex]);u!==-1?n=u:n=null}return{...e,activeOptionIndex:n,virtual:Object.assign({},e.virtual,{options:o.options})}}},go=g.createContext(null);go.displayName="ComboboxActionsContext";function Vn(e){let o=g.useContext(go);if(o===null){let r=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Vn),r}return o}let Ri=g.createContext(null);function Ks(e){var o;let r=En("VirtualProvider"),[n,u]=g.useMemo(()=>{let v=r.optionsRef.current;if(!v)return[0,0];let x=window.getComputedStyle(v);return[parseFloat(x.paddingBlockStart||x.paddingTop),parseFloat(x.paddingBlockEnd||x.paddingBottom)]},[r.optionsRef.current]),f=Ts({scrollPaddingStart:n,scrollPaddingEnd:u,count:r.virtual.options.length,estimateSize(){return 40},getScrollElement(){var v;return(v=r.optionsRef.current)!=null?v:null},overscan:12}),[a,m]=g.useState(0);return lt(()=>{m(v=>v+1)},[(o=r.virtual)==null?void 0:o.options]),g.createElement(Ri.Provider,{value:f},g.createElement("div",{style:{position:"relative",width:"100%",height:`${f.getTotalSize()}px`},ref:v=>{if(v){if(typeof process<"u"&&process.env.JEST_WORKER_ID!==void 0||r.activationTrigger===0)return;r.activeOptionIndex!==null&&r.virtual.options.length>r.activeOptionIndex&&f.scrollToIndex(r.activeOptionIndex)}}},f.getVirtualItems().map(v=>{var x;return g.createElement(g.Fragment,{key:v.key},g.cloneElement((x=e.children)==null?void 0:x.call(e,{option:r.virtual.options[v.index],open:r.comboboxState===0}),{key:`${a}-${v.key}`,"data-index":v.index,"aria-setsize":r.virtual.options.length,"aria-posinset":v.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${v.start}px)`,overflowAnchor:"none"}}))})))}let bo=g.createContext(null);bo.displayName="ComboboxDataContext";function En(e){let o=g.useContext(bo);if(o===null){let r=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,En),r}return o}function Xs(e,o){return yt(o.type,qs,e,o)}let Js=g.Fragment;function Qs(e,o){let{value:r,defaultValue:n,onChange:u,form:f,name:a,by:m=null,disabled:v=!1,__demoMode:x=!1,nullable:E=!1,multiple:I=!1,immediate:P=!1,virtual:C=null,...M}=e,R=!1,L=null,[B=I?[]:void 0,_]=gi(r,u,n),[z,X]=g.useReducer(Xs,{dataRef:g.createRef(),comboboxState:x?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),te=g.useRef(!1),ue=g.useRef({static:!1,hold:!1}),we=g.useRef(null),je=g.useRef(null),ge=g.useRef(null),y=g.useRef(null),pe=oe(typeof m=="string"?(se,ke)=>{let K=m;return(se==null?void 0:se[K])===(ke==null?void 0:ke[K])}:m??((se,ke)=>se===ke)),Pe=oe(se=>z.options.findIndex(ke=>pe(ke.dataRef.current.value,se))),$e=g.useCallback(se=>yt(V.mode,{1:()=>B.some(ke=>pe(ke,se)),0:()=>pe(B,se)}),[B]),nt=oe(se=>z.activeOptionIndex===Pe(se)),V=g.useMemo(()=>({...z,immediate:R,optionsPropsRef:ue,labelRef:we,inputRef:je,buttonRef:ge,optionsRef:y,value:B,defaultValue:n,disabled:v,mode:I?1:0,virtual:z.virtual,get activeOptionIndex(){if(te.current&&z.activeOptionIndex===null&&z.options.length>0){let se=z.options.findIndex(ke=>!ke.dataRef.current.disabled);if(se!==-1)return se}return z.activeOptionIndex},calculateIndex:Pe,compare:pe,isSelected:$e,isActive:nt,nullable:E,__demoMode:x}),[B,n,v,I,E,x,z,L]);lt(()=>{},[L,void 0]),lt(()=>{z.dataRef.current=V},[V]),uo([V.buttonRef,V.inputRef,V.optionsRef],()=>Ct.closeCombobox(),V.comboboxState===0);let et=g.useMemo(()=>{var se,ke,K;return{open:V.comboboxState===0,disabled:v,activeIndex:V.activeOptionIndex,activeOption:V.activeOptionIndex===null?null:V.virtual?V.virtual.options[(se=V.activeOptionIndex)!=null?se:0]:(K=(ke=V.options[V.activeOptionIndex])==null?void 0:ke.dataRef.current.value)!=null?K:null,value:B}},[V,v,B]),Re=oe(()=>{if(V.activeOptionIndex!==null){if(V.virtual)at(V.virtual.options[V.activeOptionIndex]);else{let{dataRef:se}=V.options[V.activeOptionIndex];at(se.current.value)}Ct.goToOption(st.Specific,V.activeOptionIndex)}}),Y=oe(()=>{X({type:0}),te.current=!0}),ne=oe(()=>{X({type:1}),te.current=!1}),ve=oe((se,ke,K)=>(te.current=!1,se===st.Specific?X({type:2,focus:st.Specific,idx:ke,trigger:K}):X({type:2,focus:se,trigger:K}))),_e=oe((se,ke)=>(X({type:3,payload:{id:se,dataRef:ke}}),()=>{V.isActive(ke.current.value)&&(te.current=!0),X({type:4,id:se})})),He=oe(se=>(X({type:5,id:se}),()=>X({type:5,id:null}))),at=oe(se=>yt(V.mode,{0(){return _==null?void 0:_(se)},1(){let ke=V.value.slice(),K=ke.findIndex(ye=>pe(ye,se));return K===-1?ke.push(se):ke.splice(K,1),_==null?void 0:_(ke)}})),rt=oe(se=>{X({type:6,trigger:se})}),Ct=g.useMemo(()=>({onChange:at,registerOption:_e,registerLabel:He,goToOption:ve,closeCombobox:ne,openCombobox:Y,setActivationTrigger:rt,selectActiveOption:Re}),[]),Te=o===null?{}:{ref:o},Ze=g.useRef(null),Ge=nn();return g.useEffect(()=>{Ze.current&&n!==void 0&&Ge.addEventListener(Ze.current,"reset",()=>{_==null||_(n)})},[Ze,_]),g.createElement(go.Provider,{value:Ct},g.createElement(bo.Provider,{value:V},g.createElement(mo,{value:yt(V.comboboxState,{0:Tt.Open,1:Tt.Closed})},a!=null&&B!=null&&Mi({[a]:B}).map(([se,ke],K)=>g.createElement(Hn,{features:Mn.Hidden,ref:K===0?ye=>{var Me;Ze.current=(Me=ye==null?void 0:ye.closest("form"))!=null?Me:null}:void 0,...Nr({key:se,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:f,disabled:v,name:se,value:ke})})),vt({ourProps:Te,theirProps:M,slot:et,defaultTag:Js,name:"Combobox"}))))}let ea="input";function ta(e,o){var r,n,u,f,a;let m=Dt(),{id:v=`headlessui-combobox-input-${m}`,onChange:x,displayValue:E,type:I="text",...P}=e,C=En("Combobox.Input"),M=Vn("Combobox.Input"),R=St(C.inputRef,o),L=wn(C.inputRef),B=g.useRef(!1),_=nn(),z=oe(()=>{M.onChange(null),C.optionsRef.current&&(C.optionsRef.current.scrollTop=0),M.goToOption(st.Nothing)}),X=function(){var V;return typeof E=="function"&&C.value!==void 0?(V=E(C.value))!=null?V:"":typeof C.value=="string"?C.value:""}();Wn(([V,et],[Re,Y])=>{if(B.current)return;let ne=C.inputRef.current;ne&&((Y===0&&et===1||V!==Re)&&(ne.value=V),requestAnimationFrame(()=>{if(B.current||!ne||(L==null?void 0:L.activeElement)!==ne)return;let{selectionStart:ve,selectionEnd:_e}=ne;Math.abs((_e??0)-(ve??0))===0&&ve===0&&ne.setSelectionRange(ne.value.length,ne.value.length)}))},[X,C.comboboxState,L]),Wn(([V],[et])=>{if(V===0&&et===1){if(B.current)return;let Re=C.inputRef.current;if(!Re)return;let Y=Re.value,{selectionStart:ne,selectionEnd:ve,selectionDirection:_e}=Re;Re.value="",Re.value=Y,_e!==null?Re.setSelectionRange(ne,ve,_e):Re.setSelectionRange(ne,ve)}},[C.comboboxState]);let te=g.useRef(!1),ue=oe(()=>{te.current=!0}),we=oe(()=>{_.nextFrame(()=>{te.current=!1})}),je=oe(V=>{switch(B.current=!0,V.key){case Je.Enter:if(B.current=!1,C.comboboxState!==0||te.current)return;if(V.preventDefault(),V.stopPropagation(),C.activeOptionIndex===null){M.closeCombobox();return}M.selectActiveOption(),C.mode===0&&M.closeCombobox();break;case Je.ArrowDown:return B.current=!1,V.preventDefault(),V.stopPropagation(),yt(C.comboboxState,{0:()=>M.goToOption(st.Next),1:()=>M.openCombobox()});case Je.ArrowUp:return B.current=!1,V.preventDefault(),V.stopPropagation(),yt(C.comboboxState,{0:()=>M.goToOption(st.Previous),1:()=>{M.openCombobox(),_.nextFrame(()=>{C.value||M.goToOption(st.Last)})}});case Je.Home:if(V.shiftKey)break;return B.current=!1,V.preventDefault(),V.stopPropagation(),M.goToOption(st.First);case Je.PageUp:return B.current=!1,V.preventDefault(),V.stopPropagation(),M.goToOption(st.First);case Je.End:if(V.shiftKey)break;return B.current=!1,V.preventDefault(),V.stopPropagation(),M.goToOption(st.Last);case Je.PageDown:return B.current=!1,V.preventDefault(),V.stopPropagation(),M.goToOption(st.Last);case Je.Escape:return B.current=!1,C.comboboxState!==0?void 0:(V.preventDefault(),C.optionsRef.current&&!C.optionsPropsRef.current.static&&V.stopPropagation(),C.nullable&&C.mode===0&&C.value===null&&z(),M.closeCombobox());case Je.Tab:if(B.current=!1,C.comboboxState!==0)return;C.mode===0&&C.activationTrigger!==1&&M.selectActiveOption(),M.closeCombobox();break}}),ge=oe(V=>{x==null||x(V),C.nullable&&C.mode===0&&V.target.value===""&&z(),M.openCombobox()}),y=oe(V=>{var et,Re,Y;let ne=(et=V.relatedTarget)!=null?et:Kt.find(ve=>ve!==V.currentTarget);if(B.current=!1,!((Re=C.optionsRef.current)!=null&&Re.contains(ne))&&!((Y=C.buttonRef.current)!=null&&Y.contains(ne))&&C.comboboxState===0)return V.preventDefault(),C.mode===0&&(C.nullable&&C.value===null?z():C.activationTrigger!==1&&M.selectActiveOption()),M.closeCombobox()}),pe=oe(V=>{var et,Re,Y;let ne=(et=V.relatedTarget)!=null?et:Kt.find(ve=>ve!==V.currentTarget);(Re=C.buttonRef.current)!=null&&Re.contains(ne)||(Y=C.optionsRef.current)!=null&&Y.contains(ne)||C.disabled||C.immediate&&C.comboboxState!==0&&(M.openCombobox(),_.nextFrame(()=>{M.setActivationTrigger(1)}))}),Pe=oo(()=>{if(C.labelId)return[C.labelId].join(" ")},[C.labelId]),$e=g.useMemo(()=>({open:C.comboboxState===0,disabled:C.disabled}),[C]),nt={ref:R,id:v,role:"combobox",type:I,"aria-controls":(r=C.optionsRef.current)==null?void 0:r.id,"aria-expanded":C.comboboxState===0,"aria-activedescendant":C.activeOptionIndex===null?void 0:C.virtual?(n=C.options.find(V=>{var et;return!((et=C.virtual)!=null&&et.disabled(V.dataRef.current.value))&&C.compare(V.dataRef.current.value,C.virtual.options[C.activeOptionIndex])}))==null?void 0:n.id:(u=C.options[C.activeOptionIndex])==null?void 0:u.id,"aria-labelledby":Pe,"aria-autocomplete":"list",defaultValue:(a=(f=e.defaultValue)!=null?f:C.defaultValue!==void 0?E==null?void 0:E(C.defaultValue):null)!=null?a:C.defaultValue,disabled:C.disabled,onCompositionStart:ue,onCompositionEnd:we,onKeyDown:je,onChange:ge,onFocus:pe,onBlur:y};return vt({ourProps:nt,theirProps:P,slot:$e,defaultTag:ea,name:"Combobox.Input"})}let na="button";function ra(e,o){var r;let n=En("Combobox.Button"),u=Vn("Combobox.Button"),f=St(n.buttonRef,o),a=Dt(),{id:m=`headlessui-combobox-button-${a}`,...v}=e,x=nn(),E=oe(R=>{switch(R.key){case Je.ArrowDown:return R.preventDefault(),R.stopPropagation(),n.comboboxState===1&&u.openCombobox(),x.nextFrame(()=>{var L;return(L=n.inputRef.current)==null?void 0:L.focus({preventScroll:!0})});case Je.ArrowUp:return R.preventDefault(),R.stopPropagation(),n.comboboxState===1&&(u.openCombobox(),x.nextFrame(()=>{n.value||u.goToOption(st.Last)})),x.nextFrame(()=>{var L;return(L=n.inputRef.current)==null?void 0:L.focus({preventScroll:!0})});case Je.Escape:return n.comboboxState!==0?void 0:(R.preventDefault(),n.optionsRef.current&&!n.optionsPropsRef.current.static&&R.stopPropagation(),u.closeCombobox(),x.nextFrame(()=>{var L;return(L=n.inputRef.current)==null?void 0:L.focus({preventScroll:!0})}));default:return}}),I=oe(R=>{if(kr(R.currentTarget))return R.preventDefault();n.comboboxState===0?u.closeCombobox():(R.preventDefault(),u.openCombobox()),x.nextFrame(()=>{var L;return(L=n.inputRef.current)==null?void 0:L.focus({preventScroll:!0})})}),P=oo(()=>{if(n.labelId)return[n.labelId,m].join(" ")},[n.labelId,m]),C=g.useMemo(()=>({open:n.comboboxState===0,disabled:n.disabled,value:n.value}),[n]),M={ref:f,id:m,type:co(e,n.buttonRef),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(r=n.optionsRef.current)==null?void 0:r.id,"aria-expanded":n.comboboxState===0,"aria-labelledby":P,disabled:n.disabled,onClick:I,onKeyDown:E};return vt({ourProps:M,theirProps:v,slot:C,defaultTag:na,name:"Combobox.Button"})}let oa="label";function ia(e,o){let r=Dt(),{id:n=`headlessui-combobox-label-${r}`,...u}=e,f=En("Combobox.Label"),a=Vn("Combobox.Label"),m=St(f.labelRef,o);lt(()=>a.registerLabel(n),[n]);let v=oe(()=>{var E;return(E=f.inputRef.current)==null?void 0:E.focus({preventScroll:!0})}),x=g.useMemo(()=>({open:f.comboboxState===0,disabled:f.disabled}),[f]);return vt({ourProps:{ref:m,id:n,onClick:v},theirProps:u,slot:x,defaultTag:oa,name:"Combobox.Label"})}let la="ul",sa=fn.RenderStrategy|fn.Static;function aa(e,o){let r=Dt(),{id:n=`headlessui-combobox-options-${r}`,hold:u=!1,...f}=e,a=En("Combobox.Options"),m=St(a.optionsRef,o),v=Un(),x=v!==null?(v&Tt.Open)===Tt.Open:a.comboboxState===0;lt(()=>{var C;a.optionsPropsRef.current.static=(C=e.static)!=null?C:!1},[a.optionsPropsRef,e.static]),lt(()=>{a.optionsPropsRef.current.hold=u},[a.optionsPropsRef,u]),ki({container:a.optionsRef.current,enabled:a.comboboxState===0,accept(C){return C.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:C.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(C){C.setAttribute("role","none")}});let E=oo(()=>{var C,M;return(M=a.labelId)!=null?M:(C=a.buttonRef.current)==null?void 0:C.id},[a.labelId,a.buttonRef.current]),I=g.useMemo(()=>({open:a.comboboxState===0,option:void 0}),[a]),P={"aria-labelledby":E,role:"listbox","aria-multiselectable":a.mode===1?!0:void 0,id:n,ref:m};return a.virtual&&a.comboboxState===0&&Object.assign(f,{children:g.createElement(Ks,null,f.children)}),vt({ourProps:P,theirProps:f,slot:I,defaultTag:la,features:sa,visible:x,name:"Combobox.Options"})}let ua="li";function ca(e,o){var r;let n=Dt(),{id:u=`headlessui-combobox-option-${n}`,disabled:f=!1,value:a,order:m=null,...v}=e,x=En("Combobox.Option"),E=Vn("Combobox.Option"),I=x.virtual?x.activeOptionIndex===x.calculateIndex(a):x.activeOptionIndex===null?!1:((r=x.options[x.activeOptionIndex])==null?void 0:r.id)===u,P=x.isSelected(a),C=g.useRef(null),M=Vt({disabled:f,value:a,domRef:C,order:m}),R=g.useContext(Ri),L=St(o,C,R?R.measureElement:null),B=oe(()=>E.onChange(a));lt(()=>E.registerOption(u,M),[M,u]);let _=g.useRef(!(x.virtual||x.__demoMode));lt(()=>{if(!x.virtual||!x.__demoMode)return;let y=Wt();return y.requestAnimationFrame(()=>{_.current=!0}),y.dispose},[x.virtual,x.__demoMode]),lt(()=>{if(!_.current||x.comboboxState!==0||!I||x.activationTrigger===0)return;let y=Wt();return y.requestAnimationFrame(()=>{var pe,Pe;(Pe=(pe=C.current)==null?void 0:pe.scrollIntoView)==null||Pe.call(pe,{block:"nearest"})}),y.dispose},[C,I,x.comboboxState,x.activationTrigger,x.activeOptionIndex]);let z=oe(y=>{var pe;if(f||(pe=x.virtual)!=null&&pe.disabled(a))return y.preventDefault();B(),Si()||requestAnimationFrame(()=>{var Pe;return(Pe=x.inputRef.current)==null?void 0:Pe.focus({preventScroll:!0})}),x.mode===0&&requestAnimationFrame(()=>E.closeCombobox())}),X=oe(()=>{var y;if(f||(y=x.virtual)!=null&&y.disabled(a))return E.goToOption(st.Nothing);let pe=x.calculateIndex(a);E.goToOption(st.Specific,pe)}),te=Ni(),ue=oe(y=>te.update(y)),we=oe(y=>{var pe;if(!te.wasMoved(y)||f||(pe=x.virtual)!=null&&pe.disabled(a)||I)return;let Pe=x.calculateIndex(a);E.goToOption(st.Specific,Pe,0)}),je=oe(y=>{var pe;te.wasMoved(y)&&(f||(pe=x.virtual)!=null&&pe.disabled(a)||I&&(x.optionsPropsRef.current.hold||E.goToOption(st.Nothing)))}),ge=g.useMemo(()=>({active:I,selected:P,disabled:f}),[I,P,f]);return vt({ourProps:{id:u,ref:L,role:"option",tabIndex:f===!0?void 0:-1,"aria-disabled":f===!0?!0:void 0,"aria-selected":P,disabled:void 0,onClick:z,onFocus:X,onPointerEnter:ue,onMouseEnter:ue,onPointerMove:we,onMouseMove:we,onPointerLeave:je,onMouseLeave:je},theirProps:v,slot:ge,defaultTag:ua,name:"Combobox.Option"})}let da=gt(Qs),fa=gt(ra),pa=gt(ta),ma=gt(ia),ha=gt(aa),va=gt(ca),on=Object.assign(da,{Input:pa,Button:fa,Label:ma,Options:ha,Option:va});function Li(e,o,r,n){let u=Vt(r);g.useEffect(()=>{e=e??window;function f(a){u.current(a)}return e.addEventListener(o,f,n),()=>e.removeEventListener(o,f,n)},[e,o,n])}function Yn(){let e=g.useRef(!1);return lt(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Ai(e){let o=oe(e),r=g.useRef(!1);g.useEffect(()=>(r.current=!1,()=>{r.current=!0,Sr(()=>{r.current&&o()})}),[o])}var Zn=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Zn||{});function ga(){let e=g.useRef(0);return Ci("keydown",o=>{o.key==="Tab"&&(e.current=o.shiftKey?1:0)},!0),e}function Di(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let o=new Set;for(let r of e.current)r.current instanceof HTMLElement&&o.add(r.current);return o}let ba="div";var $i=(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))($i||{});function xa(e,o){let r=g.useRef(null),n=St(r,o),{initialFocus:u,containers:f,features:a=30,...m}=e;In()||(a=1);let v=wn(r);Ea({ownerDocument:v},!!(a&16));let x=Sa({ownerDocument:v,container:r,initialFocus:u},!!(a&2));Ca({ownerDocument:v,container:r,containers:f,previousActiveElement:x},!!(a&8));let E=ga(),I=oe(R=>{let L=r.current;L&&(B=>B())(()=>{yt(E.current,{[Zn.Forwards]:()=>{zn(L,rn.First,{skipElements:[R.relatedTarget]})},[Zn.Backwards]:()=>{zn(L,rn.Last,{skipElements:[R.relatedTarget]})}})})}),P=nn(),C=g.useRef(!1),M={ref:n,onKeyDown(R){R.key=="Tab"&&(C.current=!0,P.requestAnimationFrame(()=>{C.current=!1}))},onBlur(R){let L=Di(f);r.current instanceof HTMLElement&&L.add(r.current);let B=R.relatedTarget;B instanceof HTMLElement&&B.dataset.headlessuiFocusGuard!=="true"&&(_i(L,B)||(C.current?zn(r.current,yt(E.current,{[Zn.Forwards]:()=>rn.Next,[Zn.Backwards]:()=>rn.Previous})|rn.WrapAround,{relativeTo:R.target}):R.target instanceof HTMLElement&&dn(R.target)))}};return g.createElement(g.Fragment,null,!!(a&4)&&g.createElement(Hn,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:I,features:Mn.Focusable}),vt({ourProps:M,theirProps:m,defaultTag:ba,name:"FocusTrap"}),!!(a&4)&&g.createElement(Hn,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:I,features:Mn.Focusable}))}let ya=gt(xa),Gn=Object.assign(ya,{features:$i});function wa(e=!0){let o=g.useRef(Kt.slice());return Wn(([r],[n])=>{n===!0&&r===!1&&Sr(()=>{o.current.splice(0)}),n===!1&&r===!0&&(o.current=Kt.slice())},[e,Kt,o]),oe(()=>{var r;return(r=o.current.find(n=>n!=null&&n.isConnected))!=null?r:null})}function Ea({ownerDocument:e},o){let r=wa(o);Wn(()=>{o||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&dn(r())},[o]),Ai(()=>{o&&dn(r())})}function Sa({ownerDocument:e,container:o,initialFocus:r},n){let u=g.useRef(null),f=Yn();return Wn(()=>{if(!n)return;let a=o.current;a&&Sr(()=>{if(!f.current)return;let m=e==null?void 0:e.activeElement;if(r!=null&&r.current){if((r==null?void 0:r.current)===m){u.current=m;return}}else if(a.contains(m)){u.current=m;return}r!=null&&r.current?dn(r.current):zn(a,rn.First)===xi.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),u.current=e==null?void 0:e.activeElement})},[n]),u}function Ca({ownerDocument:e,container:o,containers:r,previousActiveElement:n},u){let f=Yn();Li(e==null?void 0:e.defaultView,"focus",a=>{if(!u||!f.current)return;let m=Di(r);o.current instanceof HTMLElement&&m.add(o.current);let v=n.current;if(!v)return;let x=a.target;x&&x instanceof HTMLElement?_i(m,x)?(n.current=x,dn(x)):(a.preventDefault(),a.stopPropagation(),dn(v)):dn(n.current)},!0)}function _i(e,o){for(let r of e)if(r.contains(o))return!0;return!1}let Bi=g.createContext(!1);function ja(){return g.useContext(Bi)}function xo(e){return g.createElement(Bi.Provider,{value:e.force},e.children)}function Ta(e){let o=ja(),r=g.useContext(zi),n=wn(e),[u,f]=g.useState(()=>{if(!o&&r!==null||tn.isServer)return null;let a=n==null?void 0:n.getElementById("headlessui-portal-root");if(a)return a;if(n===null)return null;let m=n.createElement("div");return m.setAttribute("id","headlessui-portal-root"),n.body.appendChild(m)});return g.useEffect(()=>{u!==null&&(n!=null&&n.body.contains(u)||n==null||n.body.appendChild(u))},[u,n]),g.useEffect(()=>{o||r!==null&&f(r.current)},[r,f,o]),u}let Oa=g.Fragment;function Na(e,o){let r=e,n=g.useRef(null),u=St(Ds(E=>{n.current=E}),o),f=wn(n),a=Ta(n),[m]=g.useState(()=>{var E;return tn.isServer?null:(E=f==null?void 0:f.createElement("div"))!=null?E:null}),v=g.useContext(yo),x=In();return lt(()=>{!a||!m||a.contains(m)||(m.setAttribute("data-headlessui-portal",""),a.appendChild(m))},[a,m]),lt(()=>{if(m&&v)return v.register(m)},[v,m]),Ai(()=>{var E;!a||!m||(m instanceof Node&&a.contains(m)&&a.removeChild(m),a.childNodes.length<=0&&((E=a.parentElement)==null||E.removeChild(a)))}),x?!a||!m?null:Er.createPortal(vt({ourProps:{ref:u},theirProps:r,defaultTag:Oa,name:"Portal"}),m):null}let ka=g.Fragment,zi=g.createContext(null);function Ia(e,o){let{target:r,...n}=e,u={ref:St(o)};return g.createElement(zi.Provider,{value:r},vt({ourProps:u,theirProps:n,defaultTag:ka,name:"Popover.Group"}))}let yo=g.createContext(null);function Ma(){let e=g.useContext(yo),o=g.useRef([]),r=oe(f=>(o.current.push(f),e&&e.register(f),()=>n(f))),n=oe(f=>{let a=o.current.indexOf(f);a!==-1&&o.current.splice(a,1),e&&e.unregister(f)}),u=g.useMemo(()=>({register:r,unregister:n,portals:o}),[r,n,o]);return[o,g.useMemo(()=>function({children:f}){return g.createElement(yo.Provider,{value:u},f)},[u])]}let Pa=gt(Na),Fa=gt(Ia),wo=Object.assign(Pa,{Group:Fa});function Ra(e,o){return e===o&&(e!==0||1/e===1/o)||e!==e&&o!==o}const La=typeof Object.is=="function"?Object.is:Ra,{useState:Aa,useEffect:Da,useLayoutEffect:$a,useDebugValue:_a}=q;function Ba(e,o,r){const n=o(),[{inst:u},f]=Aa({inst:{value:n,getSnapshot:o}});return $a(()=>{u.value=n,u.getSnapshot=o,Eo(u)&&f({inst:u})},[e,n,o]),Da(()=>(Eo(u)&&f({inst:u}),e(()=>{Eo(u)&&f({inst:u})})),[e]),_a(n),n}function Eo(e){const o=e.getSnapshot,r=e.value;try{const n=o();return!La(r,n)}catch{return!0}}function za(e,o,r){return o()}const Wa=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ha=!Wa,Ua=Ha?za:Ba,Va="useSyncExternalStore"in q?(e=>e.useSyncExternalStore)(q):Ua;function Ya(e){return Va(e.subscribe,e.getSnapshot,e.getSnapshot)}function Za(e,o){let r=e(),n=new Set;return{getSnapshot(){return r},subscribe(u){return n.add(u),()=>n.delete(u)},dispatch(u,...f){let a=o[u].call(r,...f);a&&(r=a,n.forEach(m=>m()))}}}function Ga(){let e;return{before({doc:o}){var r;let n=o.documentElement;e=((r=o.defaultView)!=null?r:window).innerWidth-n.clientWidth},after({doc:o,d:r}){let n=o.documentElement,u=n.clientWidth-n.offsetWidth,f=e-u;r.style(n,"paddingRight",`${f}px`)}}}function qa(){return Ei()?{before({doc:e,d:o,meta:r}){function n(u){return r.containers.flatMap(f=>f()).some(f=>f.contains(u))}o.microTask(()=>{var u;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let m=Wt();m.style(e.documentElement,"scrollBehavior","auto"),o.add(()=>o.microTask(()=>m.dispose()))}let f=(u=window.scrollY)!=null?u:window.pageYOffset,a=null;o.addEventListener(e,"click",m=>{if(m.target instanceof HTMLElement)try{let v=m.target.closest("a");if(!v)return;let{hash:x}=new URL(v.href),E=e.querySelector(x);E&&!n(E)&&(a=E)}catch{}},!0),o.addEventListener(e,"touchstart",m=>{if(m.target instanceof HTMLElement)if(n(m.target)){let v=m.target;for(;v.parentElement&&n(v.parentElement);)v=v.parentElement;o.style(v,"overscrollBehavior","contain")}else o.style(m.target,"touchAction","none")}),o.addEventListener(e,"touchmove",m=>{if(m.target instanceof HTMLElement)if(n(m.target)){let v=m.target;for(;v.parentElement&&v.dataset.headlessuiPortal!==""&&!(v.scrollHeight>v.clientHeight||v.scrollWidth>v.clientWidth);)v=v.parentElement;v.dataset.headlessuiPortal===""&&m.preventDefault()}else m.preventDefault()},{passive:!1}),o.add(()=>{var m;let v=(m=window.scrollY)!=null?m:window.pageYOffset;f!==v&&window.scrollTo(0,f),a&&a.isConnected&&(a.scrollIntoView({block:"nearest"}),a=null)})})}}:{}}function Ka(){return{before({doc:e,d:o}){o.style(e.documentElement,"overflow","hidden")}}}function Xa(e){let o={};for(let r of e)Object.assign(o,r(o));return o}let Sn=Za(()=>new Map,{PUSH(e,o){var r;let n=(r=this.get(e))!=null?r:{doc:e,count:0,d:Wt(),meta:new Set};return n.count++,n.meta.add(o),this.set(e,n),this},POP(e,o){let r=this.get(e);return r&&(r.count--,r.meta.delete(o)),this},SCROLL_PREVENT({doc:e,d:o,meta:r}){let n={doc:e,d:o,meta:Xa(r)},u=[qa(),Ga(),Ka()];u.forEach(({before:f})=>f==null?void 0:f(n)),u.forEach(({after:f})=>f==null?void 0:f(n))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});Sn.subscribe(()=>{let e=Sn.getSnapshot(),o=new Map;for(let[r]of e)o.set(r,r.documentElement.style.overflow);for(let r of e.values()){let n=o.get(r.doc)==="hidden",u=r.count!==0;(u&&!n||!u&&n)&&Sn.dispatch(r.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",r),r.count===0&&Sn.dispatch("TEARDOWN",r)}});function Ja(e,o,r){let n=Ya(Sn),u=e?n.get(e):void 0,f=u?u.count>0:!1;return lt(()=>{if(!(!e||!o))return Sn.dispatch("PUSH",e,r),()=>Sn.dispatch("POP",e,r)},[o,e]),f}let So=new Map,qn=new Map;function Wi(e,o=!0){lt(()=>{var r;if(!o)return;let n=typeof e=="function"?e():e.current;if(!n)return;function u(){var a;if(!n)return;let m=(a=qn.get(n))!=null?a:1;if(m===1?qn.delete(n):qn.set(n,m-1),m!==1)return;let v=So.get(n);v&&(v["aria-hidden"]===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",v["aria-hidden"]),n.inert=v.inert,So.delete(n))}let f=(r=qn.get(n))!=null?r:0;return qn.set(n,f+1),f!==0||(So.set(n,{"aria-hidden":n.getAttribute("aria-hidden"),inert:n.inert}),n.setAttribute("aria-hidden","true"),n.inert=!0),u},[e,o])}function Qa({defaultContainers:e=[],portals:o,mainTreeNodeRef:r}={}){var n;let u=g.useRef((n=r==null?void 0:r.current)!=null?n:null),f=wn(u),a=oe(()=>{var m,v,x;let E=[];for(let I of e)I!==null&&(I instanceof HTMLElement?E.push(I):"current"in I&&I.current instanceof HTMLElement&&E.push(I.current));if(o!=null&&o.current)for(let I of o.current)E.push(I);for(let I of(m=f==null?void 0:f.querySelectorAll("html > *, body > *"))!=null?m:[])I!==document.body&&I!==document.head&&I instanceof HTMLElement&&I.id!=="headlessui-portal-root"&&(I.contains(u.current)||I.contains((x=(v=u.current)==null?void 0:v.getRootNode())==null?void 0:x.host)||E.some(P=>I.contains(P))||E.push(I));return E});return{resolveContainers:a,contains:oe(m=>a().some(v=>v.contains(m))),mainTreeNodeRef:u,MainTreeNode:g.useMemo(()=>function(){return r!=null?null:g.createElement(Hn,{features:Mn.Hidden,ref:u})},[u,r])}}let Co=g.createContext(()=>{});Co.displayName="StackContext";var jo=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(jo||{});function eu(){return g.useContext(Co)}function tu({children:e,onUpdate:o,type:r,element:n,enabled:u}){let f=eu(),a=oe((...m)=>{o==null||o(...m),f(...m)});return lt(()=>{let m=u===void 0||u===!0;return m&&a(0,r,n),()=>{m&&a(1,r,n)}},[a,r,n,u]),g.createElement(Co.Provider,{value:a},e)}let Hi=g.createContext(null);function Ui(){let e=g.useContext(Hi);if(e===null){let o=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(o,Ui),o}return e}function Vi(){let[e,o]=g.useState([]);return[e.length>0?e.join(" "):void 0,g.useMemo(()=>function(r){let n=oe(f=>(o(a=>[...a,f]),()=>o(a=>{let m=a.slice(),v=m.indexOf(f);return v!==-1&&m.splice(v,1),m}))),u=g.useMemo(()=>({register:n,slot:r.slot,name:r.name,props:r.props}),[n,r.slot,r.name,r.props]);return g.createElement(Hi.Provider,{value:u},r.children)},[o])]}let nu="p";function ru(e,o){let r=Dt(),{id:n=`headlessui-description-${r}`,...u}=e,f=Ui(),a=St(o);lt(()=>f.register(n),[n,f.register]);let m={ref:a,...f.props,id:n};return vt({ourProps:m,theirProps:u,slot:f.slot||{},defaultTag:nu,name:f.name||"Description"})}let ou=gt(ru),Yi=Object.assign(ou,{});var iu=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(iu||{}),lu=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(lu||{});let su={0(e,o){return e.titleId===o.id?e:{...e,titleId:o.id}}},Ir=g.createContext(null);Ir.displayName="DialogContext";function Kn(e){let o=g.useContext(Ir);if(o===null){let r=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Kn),r}return o}function au(e,o,r=()=>[document.body]){Ja(e,o,n=>{var u;return{containers:[...(u=n.containers)!=null?u:[],r]}})}function uu(e,o){return yt(o.type,su,e,o)}let cu="div",du=fn.RenderStrategy|fn.Static;function fu(e,o){let r=Dt(),{id:n=`headlessui-dialog-${r}`,open:u,onClose:f,initialFocus:a,role:m="dialog",__demoMode:v=!1,...x}=e,[E,I]=g.useState(0),P=g.useRef(!1);m=function(){return m==="dialog"||m==="alertdialog"?m:(P.current||(P.current=!0,console.warn(`Invalid role [${m}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let C=Un();u===void 0&&C!==null&&(u=(C&Tt.Open)===Tt.Open);let M=g.useRef(null),R=St(M,o),L=wn(M),B=e.hasOwnProperty("open")||C!==null,_=e.hasOwnProperty("onClose");if(!B&&!_)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!B)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!_)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof u!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${u}`);if(typeof f!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${f}`);let z=u?0:1,[X,te]=g.useReducer(uu,{titleId:null,descriptionId:null,panelRef:g.createRef()}),ue=oe(()=>f(!1)),we=oe(K=>te({type:0,id:K})),je=In()?v?!1:z===0:!1,ge=E>1,y=g.useContext(Ir)!==null,[pe,Pe]=Ma(),$e={get current(){var K;return(K=X.panelRef.current)!=null?K:M.current}},{resolveContainers:nt,mainTreeNodeRef:V,MainTreeNode:et}=Qa({portals:pe,defaultContainers:[$e]}),Re=ge?"parent":"leaf",Y=C!==null?(C&Tt.Closing)===Tt.Closing:!1,ne=y||Y?!1:je,ve=g.useCallback(()=>{var K,ye;return(ye=Array.from((K=L==null?void 0:L.querySelectorAll("body > *"))!=null?K:[]).find(Me=>Me.id==="headlessui-portal-root"?!1:Me.contains(V.current)&&Me instanceof HTMLElement))!=null?ye:null},[V]);Wi(ve,ne);let _e=ge?!0:je,He=g.useCallback(()=>{var K,ye;return(ye=Array.from((K=L==null?void 0:L.querySelectorAll("[data-headlessui-portal]"))!=null?K:[]).find(Me=>Me.contains(V.current)&&Me instanceof HTMLElement))!=null?ye:null},[V]);Wi(He,_e),uo(nt,K=>{K.preventDefault(),ue()},!(!je||ge));let rt=!(ge||z!==0);Li(L==null?void 0:L.defaultView,"keydown",K=>{rt&&(K.defaultPrevented||K.key===Je.Escape&&(K.preventDefault(),K.stopPropagation(),ue()))}),au(L,!(Y||z!==0||y),nt),g.useEffect(()=>{if(z!==0||!M.current)return;let K=new ResizeObserver(ye=>{for(let Me of ye){let Fe=Me.target.getBoundingClientRect();Fe.x===0&&Fe.y===0&&Fe.width===0&&Fe.height===0&&ue()}});return K.observe(M.current),()=>K.disconnect()},[z,M,ue]);let[Te,Ze]=Vi(),Ge=g.useMemo(()=>[{dialogState:z,close:ue,setTitleId:we},X],[z,X,ue,we]),se=g.useMemo(()=>({open:z===0}),[z]),ke={ref:R,id:n,role:m,"aria-modal":z===0?!0:void 0,"aria-labelledby":X.titleId,"aria-describedby":Te};return g.createElement(tu,{type:"Dialog",enabled:z===0,element:M,onUpdate:oe((K,ye)=>{ye==="Dialog"&&yt(K,{[jo.Add]:()=>I(Me=>Me+1),[jo.Remove]:()=>I(Me=>Me-1)})})},g.createElement(xo,{force:!0},g.createElement(wo,null,g.createElement(Ir.Provider,{value:Ge},g.createElement(wo.Group,{target:M},g.createElement(xo,{force:!1},g.createElement(Ze,{slot:se,name:"Dialog.Description"},g.createElement(Gn,{initialFocus:a,containers:nt,features:je?yt(Re,{parent:Gn.features.RestoreFocus,leaf:Gn.features.All&~Gn.features.FocusLock}):Gn.features.None},g.createElement(Pe,null,vt({ourProps:ke,theirProps:x,slot:se,defaultTag:cu,features:du,visible:z===0,name:"Dialog"}))))))))),g.createElement(et,null))}let pu="div";function mu(e,o){let r=Dt(),{id:n=`headlessui-dialog-overlay-${r}`,...u}=e,[{dialogState:f,close:a}]=Kn("Dialog.Overlay"),m=St(o),v=oe(E=>{if(E.target===E.currentTarget){if(kr(E.currentTarget))return E.preventDefault();E.preventDefault(),E.stopPropagation(),a()}}),x=g.useMemo(()=>({open:f===0}),[f]);return vt({ourProps:{ref:m,id:n,"aria-hidden":!0,onClick:v},theirProps:u,slot:x,defaultTag:pu,name:"Dialog.Overlay"})}let hu="div";function vu(e,o){let r=Dt(),{id:n=`headlessui-dialog-backdrop-${r}`,...u}=e,[{dialogState:f},a]=Kn("Dialog.Backdrop"),m=St(o);g.useEffect(()=>{if(a.panelRef.current===null)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")},[a.panelRef]);let v=g.useMemo(()=>({open:f===0}),[f]);return g.createElement(xo,{force:!0},g.createElement(wo,null,vt({ourProps:{ref:m,id:n,"aria-hidden":!0},theirProps:u,slot:v,defaultTag:hu,name:"Dialog.Backdrop"})))}let gu="div";function bu(e,o){let r=Dt(),{id:n=`headlessui-dialog-panel-${r}`,...u}=e,[{dialogState:f},a]=Kn("Dialog.Panel"),m=St(o,a.panelRef),v=g.useMemo(()=>({open:f===0}),[f]),x=oe(E=>{E.stopPropagation()});return vt({ourProps:{ref:m,id:n,onClick:x},theirProps:u,slot:v,defaultTag:gu,name:"Dialog.Panel"})}let xu="h2";function yu(e,o){let r=Dt(),{id:n=`headlessui-dialog-title-${r}`,...u}=e,[{dialogState:f,setTitleId:a}]=Kn("Dialog.Title"),m=St(o);g.useEffect(()=>(a(n),()=>a(null)),[n,a]);let v=g.useMemo(()=>({open:f===0}),[f]);return vt({ourProps:{ref:m,id:n},theirProps:u,slot:v,defaultTag:xu,name:"Dialog.Title"})}let wu=gt(fu),Eu=gt(vu),Su=gt(bu),Cu=gt(mu),ju=gt(yu),Zi=Object.assign(wu,{Backdrop:Eu,Panel:Su,Overlay:Cu,Title:ju,Description:Yi}),Gi=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function qi(e){var o,r;let n=(o=e.innerText)!=null?o:"",u=e.cloneNode(!0);if(!(u instanceof HTMLElement))return n;let f=!1;for(let m of u.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))m.remove(),f=!0;let a=f?(r=u.innerText)!=null?r:"":n;return Gi.test(a)&&(a=a.replace(Gi,"")),a}function Tu(e){let o=e.getAttribute("aria-label");if(typeof o=="string")return o.trim();let r=e.getAttribute("aria-labelledby");if(r){let n=r.split(" ").map(u=>{let f=document.getElementById(u);if(f){let a=f.getAttribute("aria-label");return typeof a=="string"?a.trim():qi(f).trim()}return null}).filter(Boolean);if(n.length>0)return n.join(", ")}return qi(e).trim()}function Ou(e){let o=g.useRef(""),r=g.useRef("");return oe(()=>{let n=e.current;if(!n)return"";let u=n.innerText;if(o.current===u)return r.current;let f=Tu(n).trim().toLowerCase();return o.current=u,r.current=f,f})}var Nu=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Nu||{}),ku=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(ku||{}),Iu=(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))(Iu||{});function To(e,o=r=>r){let r=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,n=ao(o(e.items.slice()),f=>f.dataRef.current.domRef.current),u=r?n.indexOf(r):null;return u===-1&&(u=null),{items:n,activeItemIndex:u}}let Mu={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,o)=>{var r;let n=To(e),u=ho(o,{resolveItems:()=>n.items,resolveActiveIndex:()=>n.activeItemIndex,resolveId:f=>f.id,resolveDisabled:f=>f.dataRef.current.disabled});return{...e,...n,searchQuery:"",activeItemIndex:u,activationTrigger:(r=o.trigger)!=null?r:1}},3:(e,o)=>{let r=e.searchQuery!==""?0:1,n=e.searchQuery+o.value.toLowerCase(),u=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+r).concat(e.items.slice(0,e.activeItemIndex+r)):e.items).find(a=>{var m;return((m=a.dataRef.current.textValue)==null?void 0:m.startsWith(n))&&!a.dataRef.current.disabled}),f=u?e.items.indexOf(u):-1;return f===-1||f===e.activeItemIndex?{...e,searchQuery:n}:{...e,searchQuery:n,activeItemIndex:f,activationTrigger:1}},4(e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},5:(e,o)=>{let r=To(e,n=>[...n,{id:o.id,dataRef:o.dataRef}]);return{...e,...r}},6:(e,o)=>{let r=To(e,n=>{let u=n.findIndex(f=>f.id===o.id);return u!==-1&&n.splice(u,1),n});return{...e,...r,activationTrigger:1}}},Oo=g.createContext(null);Oo.displayName="MenuContext";function Mr(e){let o=g.useContext(Oo);if(o===null){let r=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Mr),r}return o}function Pu(e,o){return yt(o.type,Mu,e,o)}let Fu=g.Fragment;function Ru(e,o){let{__demoMode:r=!1,...n}=e,u=g.useReducer(Pu,{__demoMode:r,menuState:r?0:1,buttonRef:g.createRef(),itemsRef:g.createRef(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:f,itemsRef:a,buttonRef:m},v]=u,x=St(o);uo([m,a],(C,M)=>{var R;v({type:1}),so(M,lo.Loose)||(C.preventDefault(),(R=m.current)==null||R.focus())},f===0);let E=oe(()=>{v({type:1})}),I=g.useMemo(()=>({open:f===0,close:E}),[f,E]),P={ref:x};return g.createElement(Oo.Provider,{value:u},g.createElement(mo,{value:yt(f,{0:Tt.Open,1:Tt.Closed})},vt({ourProps:P,theirProps:n,slot:I,defaultTag:Fu,name:"Menu"})))}let Lu="button";function Au(e,o){var r;let n=Dt(),{id:u=`headlessui-menu-button-${n}`,...f}=e,[a,m]=Mr("Menu.Button"),v=St(a.buttonRef,o),x=nn(),E=oe(R=>{switch(R.key){case Je.Space:case Je.Enter:case Je.ArrowDown:R.preventDefault(),R.stopPropagation(),m({type:0}),x.nextFrame(()=>m({type:2,focus:st.First}));break;case Je.ArrowUp:R.preventDefault(),R.stopPropagation(),m({type:0}),x.nextFrame(()=>m({type:2,focus:st.Last}));break}}),I=oe(R=>{switch(R.key){case Je.Space:R.preventDefault();break}}),P=oe(R=>{if(kr(R.currentTarget))return R.preventDefault();e.disabled||(a.menuState===0?(m({type:1}),x.nextFrame(()=>{var L;return(L=a.buttonRef.current)==null?void 0:L.focus({preventScroll:!0})})):(R.preventDefault(),m({type:0})))}),C=g.useMemo(()=>({open:a.menuState===0}),[a]),M={ref:v,id:u,type:co(e,a.buttonRef),"aria-haspopup":"menu","aria-controls":(r=a.itemsRef.current)==null?void 0:r.id,"aria-expanded":a.menuState===0,onKeyDown:E,onKeyUp:I,onClick:P};return vt({ourProps:M,theirProps:f,slot:C,defaultTag:Lu,name:"Menu.Button"})}let Du="div",$u=fn.RenderStrategy|fn.Static;function _u(e,o){var r,n;let u=Dt(),{id:f=`headlessui-menu-items-${u}`,...a}=e,[m,v]=Mr("Menu.Items"),x=St(m.itemsRef,o),E=wn(m.itemsRef),I=nn(),P=Un(),C=P!==null?(P&Tt.Open)===Tt.Open:m.menuState===0;g.useEffect(()=>{let _=m.itemsRef.current;_&&m.menuState===0&&_!==(E==null?void 0:E.activeElement)&&_.focus({preventScroll:!0})},[m.menuState,m.itemsRef,E]),ki({container:m.itemsRef.current,enabled:m.menuState===0,accept(_){return _.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:_.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(_){_.setAttribute("role","none")}});let M=oe(_=>{var z,X;switch(I.dispose(),_.key){case Je.Space:if(m.searchQuery!=="")return _.preventDefault(),_.stopPropagation(),v({type:3,value:_.key});case Je.Enter:if(_.preventDefault(),_.stopPropagation(),v({type:1}),m.activeItemIndex!==null){let{dataRef:te}=m.items[m.activeItemIndex];(X=(z=te.current)==null?void 0:z.domRef.current)==null||X.click()}wi(m.buttonRef.current);break;case Je.ArrowDown:return _.preventDefault(),_.stopPropagation(),v({type:2,focus:st.Next});case Je.ArrowUp:return _.preventDefault(),_.stopPropagation(),v({type:2,focus:st.Previous});case Je.Home:case Je.PageUp:return _.preventDefault(),_.stopPropagation(),v({type:2,focus:st.First});case Je.End:case Je.PageDown:return _.preventDefault(),_.stopPropagation(),v({type:2,focus:st.Last});case Je.Escape:_.preventDefault(),_.stopPropagation(),v({type:1}),Wt().nextFrame(()=>{var te;return(te=m.buttonRef.current)==null?void 0:te.focus({preventScroll:!0})});break;case Je.Tab:_.preventDefault(),_.stopPropagation(),v({type:1}),Wt().nextFrame(()=>{Ls(m.buttonRef.current,_.shiftKey?rn.Previous:rn.Next)});break;default:_.key.length===1&&(v({type:3,value:_.key}),I.setTimeout(()=>v({type:4}),350));break}}),R=oe(_=>{switch(_.key){case Je.Space:_.preventDefault();break}}),L=g.useMemo(()=>({open:m.menuState===0}),[m]),B={"aria-activedescendant":m.activeItemIndex===null||(r=m.items[m.activeItemIndex])==null?void 0:r.id,"aria-labelledby":(n=m.buttonRef.current)==null?void 0:n.id,id:f,onKeyDown:M,onKeyUp:R,role:"menu",tabIndex:0,ref:x};return vt({ourProps:B,theirProps:a,slot:L,defaultTag:Du,features:$u,visible:C,name:"Menu.Items"})}let Bu=g.Fragment;function zu(e,o){let r=Dt(),{id:n=`headlessui-menu-item-${r}`,disabled:u=!1,...f}=e,[a,m]=Mr("Menu.Item"),v=a.activeItemIndex!==null?a.items[a.activeItemIndex].id===n:!1,x=g.useRef(null),E=St(o,x);lt(()=>{if(a.__demoMode||a.menuState!==0||!v||a.activationTrigger===0)return;let te=Wt();return te.requestAnimationFrame(()=>{var ue,we;(we=(ue=x.current)==null?void 0:ue.scrollIntoView)==null||we.call(ue,{block:"nearest"})}),te.dispose},[a.__demoMode,x,v,a.menuState,a.activationTrigger,a.activeItemIndex]);let I=Ou(x),P=g.useRef({disabled:u,domRef:x,get textValue(){return I()}});lt(()=>{P.current.disabled=u},[P,u]),lt(()=>(m({type:5,id:n,dataRef:P}),()=>m({type:6,id:n})),[P,n]);let C=oe(()=>{m({type:1})}),M=oe(te=>{if(u)return te.preventDefault();m({type:1}),wi(a.buttonRef.current)}),R=oe(()=>{if(u)return m({type:2,focus:st.Nothing});m({type:2,focus:st.Specific,id:n})}),L=Ni(),B=oe(te=>L.update(te)),_=oe(te=>{L.wasMoved(te)&&(u||v||m({type:2,focus:st.Specific,id:n,trigger:0}))}),z=oe(te=>{L.wasMoved(te)&&(u||v&&m({type:2,focus:st.Nothing}))}),X=g.useMemo(()=>({active:v,disabled:u,close:C}),[v,u,C]);return vt({ourProps:{id:n,ref:E,role:"menuitem",tabIndex:u===!0?void 0:-1,"aria-disabled":u===!0?!0:void 0,disabled:void 0,onClick:M,onFocus:R,onPointerEnter:B,onMouseEnter:B,onPointerMove:_,onMouseMove:_,onPointerLeave:z,onMouseLeave:z},theirProps:f,slot:X,defaultTag:Bu,name:"Menu.Item"})}let Wu=gt(Ru),Hu=gt(Au),Uu=gt(_u),Vu=gt(zu),Pr=Object.assign(Wu,{Button:Hu,Items:Uu,Item:Vu}),Ki=g.createContext(null);function Xi(){let e=g.useContext(Ki);if(e===null){let o=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(o,Xi),o}return e}function Yu(){let[e,o]=g.useState([]);return[e.length>0?e.join(" "):void 0,g.useMemo(()=>function(r){let n=oe(f=>(o(a=>[...a,f]),()=>o(a=>{let m=a.slice(),v=m.indexOf(f);return v!==-1&&m.splice(v,1),m}))),u=g.useMemo(()=>({register:n,slot:r.slot,name:r.name,props:r.props}),[n,r.slot,r.name,r.props]);return g.createElement(Ki.Provider,{value:u},r.children)},[o])]}let Zu="label";function Gu(e,o){let r=Dt(),{id:n=`headlessui-label-${r}`,passive:u=!1,...f}=e,a=Xi(),m=St(o);lt(()=>a.register(n),[n,a.register]);let v={ref:m,...a.props,id:n};return u&&("onClick"in v&&(delete v.htmlFor,delete v.onClick),"onClick"in f&&delete f.onClick),vt({ourProps:v,theirProps:f,slot:a.slot||{},defaultTag:Zu,name:a.name||"Label"})}let qu=gt(Gu),Ku=Object.assign(qu,{});function Xu(e=0){let[o,r]=g.useState(e),n=Yn(),u=g.useCallback(v=>{n.current&&r(x=>x|v)},[o,n]),f=g.useCallback(v=>!!(o&v),[o]),a=g.useCallback(v=>{n.current&&r(x=>x&~v)},[r,n]),m=g.useCallback(v=>{n.current&&r(x=>x^v)},[r]);return{flags:o,addFlag:u,hasFlag:f,removeFlag:a,toggleFlag:m}}let No=g.createContext(null);No.displayName="GroupContext";let Ju=g.Fragment;function Qu(e){var o;let[r,n]=g.useState(null),[u,f]=Yu(),[a,m]=Vi(),v=g.useMemo(()=>({switch:r,setSwitch:n,labelledby:u,describedby:a}),[r,n,u,a]),x={},E=e;return g.createElement(m,{name:"Switch.Description"},g.createElement(f,{name:"Switch.Label",props:{htmlFor:(o=v.switch)==null?void 0:o.id,onClick(I){r&&(I.currentTarget.tagName==="LABEL"&&I.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},g.createElement(No.Provider,{value:v},vt({ourProps:x,theirProps:E,defaultTag:Ju,name:"Switch.Group"}))))}let ec="button";function tc(e,o){var r;let n=Dt(),{id:u=`headlessui-switch-${n}`,checked:f,defaultChecked:a=!1,onChange:m,disabled:v=!1,name:x,value:E,form:I,...P}=e,C=g.useContext(No),M=g.useRef(null),R=St(M,o,C===null?null:C.setSwitch),[L,B]=gi(f,m,a),_=oe(()=>B==null?void 0:B(!L)),z=oe(ge=>{if(kr(ge.currentTarget))return ge.preventDefault();ge.preventDefault(),_()}),X=oe(ge=>{ge.key===Je.Space?(ge.preventDefault(),_()):ge.key===Je.Enter&&Us(ge.currentTarget)}),te=oe(ge=>ge.preventDefault()),ue=g.useMemo(()=>({checked:L}),[L]),we={id:u,ref:R,role:"switch",type:co(e,M),tabIndex:e.tabIndex===-1?0:(r=e.tabIndex)!=null?r:0,"aria-checked":L,"aria-labelledby":C==null?void 0:C.labelledby,"aria-describedby":C==null?void 0:C.describedby,disabled:v,onClick:z,onKeyUp:X,onKeyPress:te},je=nn();return g.useEffect(()=>{var ge;let y=(ge=M.current)==null?void 0:ge.closest("form");y&&a!==void 0&&je.addEventListener(y,"reset",()=>{B(a)})},[M,B]),g.createElement(g.Fragment,null,x!=null&&L&&g.createElement(Hn,{features:Mn.Hidden,...Nr({as:"input",type:"checkbox",hidden:!0,readOnly:!0,disabled:v,form:I,checked:L,name:x,value:E})}),vt({ourProps:we,theirProps:P,slot:ue,defaultTag:ec,name:"Switch"}))}let nc=gt(tc),rc=Qu,oc=Object.assign(nc,{Group:rc,Label:Ku,Description:Yi});function ic(e){let o={called:!1};return(...r)=>{if(!o.called)return o.called=!0,e(...r)}}function ko(e,...o){e&&o.length>0&&e.classList.add(...o)}function Io(e,...o){e&&o.length>0&&e.classList.remove(...o)}function lc(e,o){let r=Wt();if(!e)return r.dispose;let{transitionDuration:n,transitionDelay:u}=getComputedStyle(e),[f,a]=[n,u].map(v=>{let[x=0]=v.split(",").filter(Boolean).map(E=>E.includes("ms")?parseFloat(E):parseFloat(E)*1e3).sort((E,I)=>I-E);return x}),m=f+a;if(m!==0){r.group(x=>{x.setTimeout(()=>{o(),x.dispose()},m),x.addEventListener(e,"transitionrun",E=>{E.target===E.currentTarget&&x.dispose()})});let v=r.addEventListener(e,"transitionend",x=>{x.target===x.currentTarget&&(o(),v())})}else o();return r.add(()=>o()),r.dispose}function sc(e,o,r,n){let u=r?"enter":"leave",f=Wt(),a=n!==void 0?ic(n):()=>{};u==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let m=yt(u,{enter:()=>o.enter,leave:()=>o.leave}),v=yt(u,{enter:()=>o.enterTo,leave:()=>o.leaveTo}),x=yt(u,{enter:()=>o.enterFrom,leave:()=>o.leaveFrom});return Io(e,...o.base,...o.enter,...o.enterTo,...o.enterFrom,...o.leave,...o.leaveFrom,...o.leaveTo,...o.entered),ko(e,...o.base,...m,...x),f.nextFrame(()=>{Io(e,...o.base,...m,...x),ko(e,...o.base,...m,...v),lc(e,()=>(Io(e,...o.base,...m),ko(e,...o.base,...o.entered),a()))}),f.dispose}function ac({immediate:e,container:o,direction:r,classes:n,onStart:u,onStop:f}){let a=Yn(),m=nn(),v=Vt(r);lt(()=>{e&&(v.current="enter")},[e]),lt(()=>{let x=Wt();m.add(x.dispose);let E=o.current;if(E&&v.current!=="idle"&&a.current)return x.dispose(),u.current(v.current),x.add(sc(E,n.current,v.current==="enter",()=>{x.dispose(),f.current(v.current)})),x.dispose},[r])}function mn(e=""){return e.split(/\s+/).filter(o=>o.length>1)}let Fr=g.createContext(null);Fr.displayName="TransitionContext";var uc=(e=>(e.Visible="visible",e.Hidden="hidden",e))(uc||{});function cc(){let e=g.useContext(Fr);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function dc(){let e=g.useContext(Rr);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let Rr=g.createContext(null);Rr.displayName="NestingContext";function Lr(e){return"children"in e?Lr(e.children):e.current.filter(({el:o})=>o.current!==null).filter(({state:o})=>o==="visible").length>0}function Ji(e,o){let r=Vt(e),n=g.useRef([]),u=Yn(),f=nn(),a=oe((C,M=pn.Hidden)=>{let R=n.current.findIndex(({el:L})=>L===C);R!==-1&&(yt(M,{[pn.Unmount](){n.current.splice(R,1)},[pn.Hidden](){n.current[R].state="hidden"}}),f.microTask(()=>{var L;!Lr(n)&&u.current&&((L=r.current)==null||L.call(r))}))}),m=oe(C=>{let M=n.current.find(({el:R})=>R===C);return M?M.state!=="visible"&&(M.state="visible"):n.current.push({el:C,state:"visible"}),()=>a(C,pn.Unmount)}),v=g.useRef([]),x=g.useRef(Promise.resolve()),E=g.useRef({enter:[],leave:[],idle:[]}),I=oe((C,M,R)=>{v.current.splice(0),o&&(o.chains.current[M]=o.chains.current[M].filter(([L])=>L!==C)),o==null||o.chains.current[M].push([C,new Promise(L=>{v.current.push(L)})]),o==null||o.chains.current[M].push([C,new Promise(L=>{Promise.all(E.current[M].map(([B,_])=>_)).then(()=>L())})]),M==="enter"?x.current=x.current.then(()=>o==null?void 0:o.wait.current).then(()=>R(M)):R(M)}),P=oe((C,M,R)=>{Promise.all(E.current[M].splice(0).map(([L,B])=>B)).then(()=>{var L;(L=v.current.shift())==null||L()}).then(()=>R(M))});return g.useMemo(()=>({children:n,register:m,unregister:a,onStart:I,onStop:P,wait:x,chains:E}),[m,a,n,I,P,E,x])}function fc(){}let pc=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Qi(e){var o;let r={};for(let n of pc)r[n]=(o=e[n])!=null?o:fc;return r}function mc(e){let o=g.useRef(Qi(e));return g.useEffect(()=>{o.current=Qi(e)},[e]),o}let hc="div",el=fn.RenderStrategy;function vc(e,o){var r,n;let{beforeEnter:u,afterEnter:f,beforeLeave:a,afterLeave:m,enter:v,enterFrom:x,enterTo:E,entered:I,leave:P,leaveFrom:C,leaveTo:M,...R}=e,L=g.useRef(null),B=St(L,o),_=(r=R.unmount)==null||r?pn.Unmount:pn.Hidden,{show:z,appear:X,initial:te}=cc(),[ue,we]=g.useState(z?"visible":"hidden"),je=dc(),{register:ge,unregister:y}=je;g.useEffect(()=>ge(L),[ge,L]),g.useEffect(()=>{if(_===pn.Hidden&&L.current){if(z&&ue!=="visible"){we("visible");return}return yt(ue,{hidden:()=>y(L),visible:()=>ge(L)})}},[ue,L,ge,y,z,_]);let pe=Vt({base:mn(R.className),enter:mn(v),enterFrom:mn(x),enterTo:mn(E),entered:mn(I),leave:mn(P),leaveFrom:mn(C),leaveTo:mn(M)}),Pe=mc({beforeEnter:u,afterEnter:f,beforeLeave:a,afterLeave:m}),$e=In();g.useEffect(()=>{if($e&&ue==="visible"&&L.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[L,ue,$e]);let nt=te&&!X,V=X&&z&&te,et=!$e||nt?"idle":z?"enter":"leave",Re=Xu(0),Y=oe(rt=>yt(rt,{enter:()=>{Re.addFlag(Tt.Opening),Pe.current.beforeEnter()},leave:()=>{Re.addFlag(Tt.Closing),Pe.current.beforeLeave()},idle:()=>{}})),ne=oe(rt=>yt(rt,{enter:()=>{Re.removeFlag(Tt.Opening),Pe.current.afterEnter()},leave:()=>{Re.removeFlag(Tt.Closing),Pe.current.afterLeave()},idle:()=>{}})),ve=Ji(()=>{we("hidden"),y(L)},je),_e=g.useRef(!1);ac({immediate:V,container:L,classes:pe,direction:et,onStart:Vt(rt=>{_e.current=!0,ve.onStart(L,rt,Y)}),onStop:Vt(rt=>{_e.current=!1,ve.onStop(L,rt,ne),rt==="leave"&&!Lr(ve)&&(we("hidden"),y(L))})});let He=R,at={ref:B};return V?He={...He,className:Tr(R.className,...pe.current.enter,...pe.current.enterFrom)}:_e.current&&(He.className=Tr(R.className,(n=L.current)==null?void 0:n.className),He.className===""&&delete He.className),g.createElement(Rr.Provider,{value:ve},g.createElement(mo,{value:yt(ue,{visible:Tt.Open,hidden:Tt.Closed})|Re.flags},vt({ourProps:at,theirProps:He,defaultTag:hc,features:el,visible:ue==="visible",name:"Transition.Child"})))}function gc(e,o){let{show:r,appear:n=!1,unmount:u=!0,...f}=e,a=g.useRef(null),m=St(a,o);In();let v=Un();if(r===void 0&&v!==null&&(r=(v&Tt.Open)===Tt.Open),![!0,!1].includes(r))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[x,E]=g.useState(r?"visible":"hidden"),I=Ji(()=>{E("hidden")}),[P,C]=g.useState(!0),M=g.useRef([r]);lt(()=>{P!==!1&&M.current[M.current.length-1]!==r&&(M.current.push(r),C(!1))},[M,r]);let R=g.useMemo(()=>({show:r,appear:n,initial:P}),[r,n,P]);g.useEffect(()=>{if(r)E("visible");else if(!Lr(I))E("hidden");else{let z=a.current;if(!z)return;let X=z.getBoundingClientRect();X.x===0&&X.y===0&&X.width===0&&X.height===0&&E("hidden")}},[r,I]);let L={unmount:u},B=oe(()=>{var z;P&&C(!1),(z=e.beforeEnter)==null||z.call(e)}),_=oe(()=>{var z;P&&C(!1),(z=e.beforeLeave)==null||z.call(e)});return g.createElement(Rr.Provider,{value:I},g.createElement(Fr.Provider,{value:R},vt({ourProps:{...L,as:g.Fragment,children:g.createElement(tl,{ref:m,...L,...f,beforeEnter:B,beforeLeave:_})},theirProps:{},defaultTag:g.Fragment,features:el,visible:x==="visible",name:"Transition"})))}function bc(e,o){let r=g.useContext(Fr)!==null,n=Un()!==null;return g.createElement(g.Fragment,null,!r&&n?g.createElement(Mo,{ref:o,...e}):g.createElement(tl,{ref:o,...e}))}let Mo=gt(gc),tl=gt(vc),xc=gt(bc),Cn=Object.assign(Mo,{Child:xc,Root:Mo});function yc({title:e,titleId:o,...r},n){return q.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:n,"aria-labelledby":o},r),e?q.createElement("title",{id:o},e):null,q.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 wc=q.forwardRef(yc);function Ec({title:e,titleId:o,...r},n){return q.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:n,"aria-labelledby":o},r),e?q.createElement("title",{id:o},e):null,q.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 Sc=q.forwardRef(Ec);function Cc({title:e,titleId:o,...r},n){return q.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:n,"aria-labelledby":o},r),e?q.createElement("title",{id:o},e):null,q.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 jc=q.forwardRef(Cc);function Tc({title:e,titleId:o,...r},n){return q.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:n,"aria-labelledby":o},r),e?q.createElement("title",{id:o},e):null,q.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 nl=q.forwardRef(Tc);function Oc({title:e,titleId:o,...r},n){return q.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:n,"aria-labelledby":o},r),e?q.createElement("title",{id:o},e):null,q.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 rl=q.forwardRef(Oc);function Nc({title:e,titleId:o,...r},n){return q.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:n,"aria-labelledby":o},r),e?q.createElement("title",{id:o},e):null,q.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 kc=q.forwardRef(Nc);function Ic({title:e,titleId:o,...r},n){return q.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:n,"aria-labelledby":o},r),e?q.createElement("title",{id:o},e):null,q.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 Mc=q.forwardRef(Ic);function Pc({title:e,titleId:o,...r},n){return q.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:n,"aria-labelledby":o},r),e?q.createElement("title",{id:o},e):null,q.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 Fc=q.forwardRef(Pc),Rc={warning:{color:"bg-yellow-50",icon:w.jsx(kc,{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:w.jsx(Fc,{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:w.jsx(jc,{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:w.jsx(Mc,{className:"h-5 w-5 text-blue-400","aria-hidden":"true"}),colorTitle:"text-blue-800",colorText:"text-blue-700"}},Lc=({type:e="info",title:o,message:r,active:n=!1,time:u=1e3,onClose:f})=>{const[a,m]=g.useState(!1),v=g.useRef(null);g.useEffect(()=>(n&&(m(!0),v.current=setTimeout(()=>{m(!1),f&&f()},u)),()=>clearTimeout(v.current)),[n,u,f]);const x=Rc[e];return a?w.jsx("div",{className:"fixed top-2.5 left-1/2 transform -translate-x-1/2 w-80 3xs:w-96 z-50",children:w.jsx(Cn,{as:g.Fragment,show:a,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:w.jsxs("div",{className:le("rounded-md p-4 text-center",x.color),children:[w.jsxs("div",{className:"flex justify-center flex-shrink-0",children:[x.icon,w.jsx("h3",{className:le("text-sm font-medium ml-3",x.colorTitle),children:o})]}),w.jsx("div",{className:le("mt-2 text-sm",x.colorText),children:w.jsx("p",{children:r})})]})})}):null};function Ac({title:e,titleId:o,...r},n){return q.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:n,"aria-labelledby":o},r),e?q.createElement("title",{id:o},e):null,q.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 Dc=q.forwardRef(Ac);function $c({title:e,titleId:o,...r},n){return q.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:n,"aria-labelledby":o},r),e?q.createElement("title",{id:o},e):null,q.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 _c=q.forwardRef($c);function Bc({title:e,titleId:o,...r},n){return q.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:n,"aria-labelledby":o},r),e?q.createElement("title",{id:o},e):null,q.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"}),q.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 zc=q.forwardRef(Bc);function Wc({title:e,titleId:o,...r},n){return q.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:n,"aria-labelledby":o},r),e?q.createElement("title",{id:o},e):null,q.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 Hc=q.forwardRef(Wc);function Uc({title:e,titleId:o,...r},n){return q.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:n,"aria-labelledby":o},r),e?q.createElement("title",{id:o},e):null,q.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 Vc=q.forwardRef(Uc);function Yc({title:e,titleId:o,...r},n){return q.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:n,"aria-labelledby":o},r),e?q.createElement("title",{id:o},e):null,q.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 Zc=q.forwardRef(Yc),Gc=({src:e,alt:o,width:r,height:n,className:u="",classNameIcon:f="",isIcon:a=!0,acronym:m=""})=>{function v(){if(typeof m!="string")return m;const x=m.toLowerCase(),E=x.split(" "),I=E[E.length-1];return x.charAt(0)+I.charAt(0)}return w.jsx(w.Fragment,{children:e?w.jsx("img",{src:e,alt:o,width:r,height:n,className:le(u!==""&&u),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s"},onLoad:x=>x.currentTarget.style.filter="none","data-testid":"img"}):a?w.jsx(Vc,{className:le("bg-white text-default-5",f!==""?f:"w-7 h-7")}):w.jsx("div",{className:le("bg-gray-200 text-default-5 rounded-full font-bold uppercase flex justify-center items-center",f!==""?f:"w-7 h-7"),children:v()})})},qc=({steps:e,onClick:o})=>{const[r,n]=g.useState(0),u=f=>{n(f),o(f)};return w.jsx("nav",{className:"flex items-center justify-center w-full","aria-label":"Progress","data-testid":"bullets",children:w.jsx("ol",{role:"list",className:"flex items-center space-x-5",children:new Array(e).fill(1).map((f,a)=>w.jsx("li",{children:r!==a?w.jsx("div",{className:"cursor-pointer block h-2.5 w-2.5 rounded-full bg-gray-500 hover:bg-gray-600",onClick:()=>u(a),"data-testid":`step-${a}`,children:w.jsx("span",{className:"sr-only",children:"step"})}):w.jsxs("div",{className:"relative flex items-center justify-center cursor-pointer","aria-current":"step",children:[w.jsx("span",{className:"absolute flex h-5 w-5 p-px","aria-hidden":"true",children:w.jsx("span",{className:"h-full w-full rounded-full bg-gray-300"})}),w.jsx("span",{className:"relative block h-2.5 w-2.5 rounded-full bg-gray-500","aria-hidden":"true"}),w.jsx("span",{className:"sr-only",children:"step"})]})},a))})})};var ol={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(t){(function(){var l={}.hasOwnProperty;function r(){for(var f="",a=0;a<arguments.length;a++){var m=arguments[a];m&&(f=u(f,n(m)))}return f}function n(f){if(typeof f=="string"||typeof f=="number")return f;if(typeof f!="object")return"";if(Array.isArray(f))return r.apply(null,f);if(f.toString!==Object.prototype.toString&&!f.toString.toString().includes("[native code]"))return f.toString();var a="";for(var m in f)l.call(f,m)&&f[m]&&(a=u(a,m));return a}function u(f,a){return a?f?f+" "+a:f+a:f}t.exports?(r.default=r,t.exports=r):window.classNames=r})()})(ei);var Vc=ei.exports;const mn=os(Vc),ti=({className:t="text-sm w-full rounded-md",children:l,icon:r=null,edge:n=null,disabled:u=!1,type:f="button",onClick:a,id:m})=>{const v=mn({"ml-2":n==="start"&&r!==null,"mr-2":n==="end"&&r!==null});return T.jsxs("button",{className:se("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",t),type:f,onClick:a,disabled:u,"data-testid":`button-outline-${m}`,id:`button-outline-${m}`,children:[n==="start"&&r!==null&&T.jsx("span",{children:r}),T.jsx("span",{className:se("flex",v),id:m,children:l}),n==="end"&&r!==null&&T.jsx("span",{children:r})]})},ni=({children:t,className:l="",icon:r=null,edge:n=null,disabled:u=!1,type:f="button",onClick:a,id:m})=>{const v=mn({"ml-2":n==="start"&&r!==null,"mr-2":n==="end"&&r!==null});return T.jsxs("button",{className:`${l} flex justify-center items-center`,edge:n,type:f,onClick:a,disabled:u,"data-testid":`button-${m}`,children:[n==="start"&&r!==null&&T.jsx("span",{children:r}),T.jsx("span",{className:v,children:t}),n==="end"&&r!==null&&T.jsx("span",{children:r})]})},Xn=({children:t,classNameButton:l="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:r="",icon:n=null,edge:u=null,disabled:f=!1,type:a="button",onClick:m,id:v,outline:x="0px 0px 0px 2px #6366F1, 0px 0px 0px 2px #FFF, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameContainer:E=""})=>{const[k,M]=b.useState(!1),C=mn({"ml-2":u==="start"&&n!==null,"mr-2":u==="end"&&n!==null}),F=()=>{m&&m()};return T.jsx("div",{className:se("rounded-md p-0.5",E!==""&&E),style:{boxShadow:k?x:"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:T.jsxs("button",{className:se("flex justify-center items-center text-sm leading-6 shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",f&&"text-white bg-gray-300 rounded focus:outline-none cursor-default",f?l.replace(/\bbg-\w+\b/g,""):l),type:a,onClick:F,onFocus:()=>M(!0),onBlur:()=>M(!1),disabled:f,"data-testid":`button-solid-${v}`,children:[u==="start"&&n!==null&&T.jsx("span",{className:"flex",children:n}),T.jsx("span",{className:se(r.length===0&&C,r.length!==0&&r),children:t}),u==="end"&&n!==null&&T.jsx("span",{children:n})]})})},Zc=({label:t=null,checked:l=!1,onChange:r,id:n,className:u="",classNameCheckbox:f="h-4 w-4",style:a={},disabled:m=!1})=>{const[v,x]=b.useState(!1);return b.useEffect(()=>{x(l)},[l]),T.jsxs("div",{className:"flex items-center",style:a,"data-testid":`container-check-${n}`,children:[T.jsx("input",{checked:v,id:`${t}-${n}`,value:n,"aria-describedby":"comments-description",type:"checkbox",onChange:r,className:se("cursor-pointer rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",f!==""&&f),"data-testid":`checkbox-${n}`,disabled:m}),t!==null?T.jsx("label",{htmlFor:`${t}-${n}`,className:`ml-2.5 font-normal cursor-pointer ${u}`,id:`label-${n}`,"data-testid":"label",children:t}):null]})};function Yc({title:t,titleId:l,...r},n){return G.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:n,"aria-labelledby":l},r),t?G.createElement("title",{id:l},t):null,G.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const Gc=G.forwardRef(Yc);function qc({title:t,titleId:l,...r},n){return G.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:n,"aria-labelledby":l},r),t?G.createElement("title",{id:l},t):null,G.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const Kc=G.forwardRef(qc);function Xc({title:t,titleId:l,...r},n){return G.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:n,"aria-labelledby":l},r),t?G.createElement("title",{id:l},t):null,G.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const Jc=G.forwardRef(Xc);function Qc({title:t,titleId:l,...r},n){return G.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:n,"aria-labelledby":l},r),t?G.createElement("title",{id:l},t):null,G.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 ed=G.forwardRef(Qc);function td({title:t,titleId:l,...r},n){return G.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:n,"aria-labelledby":l},r),t?G.createElement("title",{id:l},t):null,G.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 nd=G.forwardRef(td);function ri({children:t,className:l="sm:max-w-sm w-11/12 sm:my-8",classNameContainer:r="",isOpen:n=!1,setIsOpen:u,showIconSuccess:f=!0,showButton:a=!0,style:m={}}){return T.jsx(Cn,{show:n,as:b.Fragment,children:T.jsxs(Ul,{as:"div",className:"z-50 relative",onClose:u,"data-testid":"modal",children:[T.jsx(Cn.Child,{as:b.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-5",leave:"ease-in duration-200",leaveFrom:"opacity-5",leaveTo:"opacity-0",children:T.jsx("div",{className:"fixed inset-0 bg-opacity-40 bg-gray-900 transition-opacity","data-testid":"window-close",onClick:()=>u(!1)})}),T.jsx("div",{className:"fixed inset-0 z-10 overflow-y-auto",children:T.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:T.jsx(Cn.Child,{as:b.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:T.jsxs(Ul.Panel,{className:se("relative transform rounded-lg bg-white px-4 pb-3 pt-5 text-left transition-all sm:w-full sm:pt-3 sm:px-3",l!==""&&l),style:m,children:[f&&T.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-green-100",children:T.jsx(Gc,{className:"h-6 w-6 text-green-600","aria-hidden":"true"})}),T.jsx("div",{className:se(r!==""&&r),"data-testid":"content",children:t}),a&&T.jsx("div",{className:"mt-5 sm:mt-6",children:T.jsx(Xn,{id:"close-modal",onClick:()=>u(!1),children:"Cerrar"})}),T.jsx("button",{className:"opacity-0 absolute"})]})})})})]})})}const rd=({isOpenModalConfirmation:t,setIsOpenModalConfirmation:l,close:r,title:n="¿Estás seguro de abandonar la creación de la acción?",description:u="La información se perderá si no creas la acción",classNameTitle:f="",classNameDescription:a=""})=>{const m=()=>{l(!1),r()};return T.jsxs(ri,{isOpen:t,setIsOpen:()=>l(),showButton:!1,showIconSuccess:!1,children:[T.jsx("p",{className:se("text-center text-sm",f!==""&&f),children:n}),T.jsx("p",{className:se("text-center text-sm",a!==""&&a),children:u}),T.jsxs("div",{className:"flex w-full justify-center mt-5",children:[T.jsx(ti,{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:()=>l(),id:"cancel",children:"Cancelar"}),T.jsx(Xn,{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:m,id:"confirmation",children:"Aceptar"})]})]})},od=({className:t="",style:l={}})=>T.jsx("div",{className:se("w-px",t!==""&&t),style:l}),ld=({onClick:t,id:l="",className:r=""})=>T.jsxs("div",{className:se("flex items-center text-default-5",r!==""&&r),"data-testid":l,children:[T.jsx(Fc,{className:"w-3 h-3 3xs:w-4 3xs:h-4 stroke-current cursor-pointer","data-testid":"chevron-left-icon",onClick:t}),T.jsx("span",{onClick:t,className:"text-sm cursor-pointer","data-testid":"go-back",children:"Volver"})]});var ko={exports:{}};(function(t,l){(function(r,n){n(l,b,wr)})(rs,function(r,n,u){function f(e){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const s=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(i,o,s.get?s:{enumerable:!0,get:()=>e[o]})}}return i.default=e,Object.freeze(i)}const a=f(n),m=(e,i=!1)=>{function o(s){if(typeof s!="object"||s===null)return s;const c=Array.isArray(s)?[]:{};for(const d in s)s.hasOwnProperty(d)&&!i&&(c[d]=o(s[d]));return c}return e.map(s=>o(s))},v=e=>/^(?:[^<>()[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*|"[^\n"]+")@(?:[^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{2,63}$/i.test(e);function x(...e){return e.filter(Boolean).join(" ")}const E=e=>{const i=e.split(" ");let o=e.slice(0,2);return i.length>1&&(o=`${e.at(0)}${i[i.length-1].slice(0,1)}`),o},k=e=>typeof e!="string"&&Promise.resolve(e)instanceof Promise,M="The user aborted a request.",C="signal is aborted without reason",F=({id:e,close:i,isPathsTest:o=!1,isTest:s=!1})=>{const c=n.useCallback(d=>{d.some(p=>p.getAttribute===void 0?!1:p.getAttribute("id")===e)||i()},[i,e]);n.useEffect(()=>{const d=p=>{const h=p.composedPath();h===void 0||o||(s&&(h[0].getAttribute=()=>e),c(h))};return window.addEventListener("click",d),()=>{window.removeEventListener("click",d)}},[c,o,s,e])},D=()=>{const e=n.useRef({}),[i,o]=n.useState({}),[s,c]=n.useState({}),[d,p]=n.useState([]);n.useEffect(()=>{e.current={}},[]);const h=I=>R=>{R.preventDefault(),R.stopPropagation(),I(i)},g=(I,R,N)=>{const{checked:L,value:P,name:A,type:U,id:z}=I.target,X={radio:z,checkbox:L};e.current={...N,...e.current,[A]:X[U]??P},o({...e.current,[A]:X[U]??P}),R({...e.current,[A]:X[U]??P})},w=n.useCallback((I,R)=>{e.current={...e.current,[I]:R},o(N=>({...N,[I]:R}))},[]),O=n.useCallback((I,R)=>{const N=R.filter(L=>I[L]===""||I[L]===void 0);return N.forEach(L=>c(P=>({...P,[L]:"Este campo es requerido"}))),p(N),N.length>0},[]);return{handleSubmit:h,handleChange:g,setValuesDefault:w,validateFields:O,errors:d,model:i,handleError:(I,R)=>{R.forEach(N=>c(L=>({...L,[N]:I}))),p(R)},messageError:s,setModel:o}},$=e=>{const[i,o]=n.useState(!0),[s,c]=n.useState(!1),d=n.useCallback((p,h)=>{const g=e.match(/[0-9]+/g);if(g===null)return;const[w]=g;h=Math.min(window.innerWidth,window.outerWidth);const O=p?h>=Number(w):h<=Number(w);c(O)},[e]);return n.useEffect(()=>{const p=/\(min-width:\s?[0-9]+px\)/gi.test(e),h=/\(max-width:\s?[0-9]+px\)/gi.test(e);if(!p&&!h&&o(!1),!p&&!h)return;const g=Math.min(window.innerWidth,window.outerWidth);d(p,g)},[e,d]),n.useEffect(()=>{if(!i)return;const p=Math.min(window.innerWidth,window.outerWidth);function h(){const g=/min-width/gi.test(e);d(g,p)}return window.addEventListener("resize",h),()=>window.removeEventListener("resize",h)},[i,e,d]),s},B=()=>{const[e,i]=n.useState({width:0,height:0});return n.useEffect(()=>{const o=()=>{const s=Math.min(window.innerWidth,window.outerWidth),c=Math.min(window.innerHeight,window.outerHeight);i({width:s,height:c})};return requestAnimationFrame(()=>o()),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[]),e};function _(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var W={exports:{}},K={};/**
|
|
35
|
+
*/(function(e){(function(){var o={}.hasOwnProperty;function r(){for(var f="",a=0;a<arguments.length;a++){var m=arguments[a];m&&(f=u(f,n(m)))}return f}function n(f){if(typeof f=="string"||typeof f=="number")return f;if(typeof f!="object")return"";if(Array.isArray(f))return r.apply(null,f);if(f.toString!==Object.prototype.toString&&!f.toString.toString().includes("[native code]"))return f.toString();var a="";for(var m in f)o.call(f,m)&&f[m]&&(a=u(a,m));return a}function u(f,a){return a?f?f+" "+a:f+a:f}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(ol);var Kc=ol.exports;const Yt=cs(Kc),il=({className:e="text-sm w-full rounded-md",children:o,icon:r=null,edge:n=null,disabled:u=!1,type:f="button",onClick:a,id:m})=>{const v=Yt({"ml-2":n==="start"&&r!==null,"mr-2":n==="end"&&r!==null});return w.jsxs("button",{className:le("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:f,onClick:a,disabled:u,"data-testid":`button-outline-${m}`,id:`button-outline-${m}`,children:[n==="start"&&r!==null&&w.jsx("span",{children:r}),w.jsx("span",{className:le("flex",v),id:m,children:o}),n==="end"&&r!==null&&w.jsx("span",{children:r})]})},ll=({children:e,className:o="",icon:r=null,edge:n=null,disabled:u=!1,type:f="button",onClick:a,id:m})=>{const v=Yt({"ml-2":n==="start"&&r!==null,"mr-2":n==="end"&&r!==null});return w.jsxs("button",{className:`${o} flex justify-center items-center`,edge:n,type:f,onClick:a,disabled:u,"data-testid":`button-${m}`,children:[n==="start"&&r!==null&&w.jsx("span",{children:r}),w.jsx("span",{className:v,children:e}),n==="end"&&r!==null&&w.jsx("span",{children:r})]})},Xn=({children:e,classNameButton:o="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:r="",icon:n=null,edge:u=null,disabled:f=!1,type:a="button",onClick:m,id:v,outline:x="0px 0px 0px 2px #6366F1, 0px 0px 0px 2px #FFF, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameContainer:E=""})=>{const[I,P]=g.useState(!1),C=Yt({"ml-2":u==="start"&&n!==null,"mr-2":u==="end"&&n!==null}),M=()=>{m&&m()};return w.jsx("div",{className:le("rounded-md p-0.5",E!==""&&E),style:{boxShadow:I?x:"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:w.jsxs("button",{className:le("flex justify-center items-center text-sm leading-6 shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",f&&"text-white bg-gray-300 rounded focus:outline-none cursor-default",f?o.replace(/\bbg-\w+\b/g,""):o),type:a,onClick:M,onFocus:()=>P(!0),onBlur:()=>P(!1),disabled:f,"data-testid":`button-solid-${v}`,children:[u==="start"&&n!==null&&w.jsx("span",{className:"flex",children:n}),w.jsx("span",{className:le(r.length===0&&C,r.length!==0&&r),children:e}),u==="end"&&n!==null&&w.jsx("span",{children:n})]})})},Xc=({label:e=null,checked:o=!1,onChange:r,id:n,className:u="",classNameCheckbox:f="h-4 w-4",style:a={},disabled:m=!1})=>{const[v,x]=g.useState(!1);return g.useEffect(()=>{x(o)},[o]),w.jsxs("div",{className:"flex items-center",style:a,"data-testid":`container-check-${n}`,children:[w.jsx("input",{checked:v,id:`${e}-${n}`,value:n,"aria-describedby":"comments-description",type:"checkbox",onChange:r,className:le("cursor-pointer rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",f!==""&&f),"data-testid":`checkbox-${n}`,disabled:m}),e!==null?w.jsx("label",{htmlFor:`${e}-${n}`,className:`ml-2.5 font-normal cursor-pointer ${u}`,id:`label-${n}`,"data-testid":"label",children:e}):null]})};function Jc({title:e,titleId:o,...r},n){return q.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:n,"aria-labelledby":o},r),e?q.createElement("title",{id:o},e):null,q.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const Qc=q.forwardRef(Jc);function ed({title:e,titleId:o,...r},n){return q.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:n,"aria-labelledby":o},r),e?q.createElement("title",{id:o},e):null,q.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const sl=q.forwardRef(ed);function td({title:e,titleId:o,...r},n){return q.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:n,"aria-labelledby":o},r),e?q.createElement("title",{id:o},e):null,q.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const nd=q.forwardRef(td);function rd({title:e,titleId:o,...r},n){return q.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:n,"aria-labelledby":o},r),e?q.createElement("title",{id:o},e):null,q.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 od=q.forwardRef(rd);function id({title:e,titleId:o,...r},n){return q.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:n,"aria-labelledby":o},r),e?q.createElement("title",{id:o},e):null,q.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 ld=q.forwardRef(id);function al({children:e,className:o="sm:max-w-sm w-11/12 sm:my-8",classNameContainer:r="",isOpen:n=!1,setIsOpen:u,showIconSuccess:f=!0,showButton:a=!0,style:m={}}){return w.jsx(Cn,{show:n,as:g.Fragment,children:w.jsxs(Zi,{as:"div",className:"z-50 relative",onClose:u,"data-testid":"modal",children:[w.jsx(Cn.Child,{as:g.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-5",leave:"ease-in duration-200",leaveFrom:"opacity-5",leaveTo:"opacity-0",children:w.jsx("div",{className:"fixed inset-0 bg-opacity-40 bg-gray-900 transition-opacity","data-testid":"window-close",onClick:()=>u(!1)})}),w.jsx("div",{className:"fixed inset-0 z-10 overflow-y-auto",children:w.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:w.jsx(Cn.Child,{as:g.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:w.jsxs(Zi.Panel,{className:le("relative transform rounded-lg bg-white px-4 pb-3 pt-5 text-left transition-all sm:w-full sm:pt-3 sm:px-3",o!==""&&o),style:m,children:[f&&w.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-green-100",children:w.jsx(Qc,{className:"h-6 w-6 text-green-600","aria-hidden":"true"})}),w.jsx("div",{className:le(r!==""&&r),"data-testid":"content",children:e}),a&&w.jsx("div",{className:"mt-5 sm:mt-6",children:w.jsx(Xn,{id:"close-modal",onClick:()=>u(!1),children:"Cerrar"})}),w.jsx("button",{className:"opacity-0 absolute"})]})})})})]})})}const sd=({isOpenModalConfirmation:e,setIsOpenModalConfirmation:o,close:r,title:n="¿Estás seguro de abandonar la creación de la acción?",description:u="La información se perderá si no creas la acción",classNameTitle:f="",classNameDescription:a=""})=>{const m=()=>{o(!1),r()};return w.jsxs(al,{isOpen:e,setIsOpen:()=>o(),showButton:!1,showIconSuccess:!1,children:[w.jsx("p",{className:le("text-center text-sm",f!==""&&f),children:n}),w.jsx("p",{className:le("text-center text-sm",a!==""&&a),children:u}),w.jsxs("div",{className:"flex w-full justify-center mt-5",children:[w.jsx(il,{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:()=>o(),id:"cancel",children:"Cancelar"}),w.jsx(Xn,{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:m,id:"confirmation",children:"Aceptar"})]})]})},ad=({className:e="",style:o={}})=>w.jsx("div",{className:le("w-px",e!==""&&e),style:o}),ud=({onClick:e,id:o="",className:r=""})=>w.jsxs("div",{className:le("flex items-center text-default-5",r!==""&&r),"data-testid":o,children:[w.jsx(Dc,{className:"w-3 h-3 3xs:w-4 3xs:h-4 stroke-current cursor-pointer","data-testid":"chevron-left-icon",onClick:e}),w.jsx("span",{onClick:e,className:"text-sm cursor-pointer","data-testid":"go-back",children:"Volver"})]});var Po={exports:{}};(function(e,o){(function(r,n){n(o,g,Er)})(us,function(r,n,u){function f(t){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const s=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(l,i,s.get?s:{enumerable:!0,get:()=>t[i]})}}return l.default=t,Object.freeze(l)}const a=f(n),m=(t,l=!1)=>{function i(s){if(typeof s!="object"||s===null)return s;const c=Array.isArray(s)?[]:{};for(const d in s)s.hasOwnProperty(d)&&!l&&(c[d]=i(s[d]));return c}return t.map(s=>i(s))},v=t=>/^(?:[^<>()[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*|"[^\n"]+")@(?:[^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{2,63}$/i.test(t);function x(...t){return t.filter(Boolean).join(" ")}const E=t=>{const l=t.split(" ");let i=t.slice(0,2);return l.length>1&&(i=`${t.at(0)}${l[l.length-1].slice(0,1)}`),i},I=t=>typeof t!="string"&&Promise.resolve(t)instanceof Promise,P="The user aborted a request.",C="signal is aborted without reason",M=({id:t,close:l,isPathsTest:i=!1,isTest:s=!1})=>{const c=n.useCallback(d=>{d.some(p=>p.getAttribute===void 0?!1:p.getAttribute("id")===t)||l()},[l,t]);n.useEffect(()=>{const d=p=>{const h=p.composedPath();h===void 0||i||(s&&(h[0].getAttribute=()=>t),c(h))};return window.addEventListener("click",d),()=>{window.removeEventListener("click",d)}},[c,i,s,t])},R=()=>{const t=n.useRef({}),[l,i]=n.useState({}),[s,c]=n.useState({}),[d,p]=n.useState([]);n.useEffect(()=>{t.current={}},[]);const h=k=>A=>{A.preventDefault(),A.stopPropagation(),k(l)},b=(k,A,N)=>{const{checked:D,value:F,name:$,type:U,id:W}=k.target,J={radio:W,checkbox:D};t.current={...N,...t.current,[$]:J[U]??F},i({...t.current,[$]:J[U]??F}),A({...t.current,[$]:J[U]??F})},S=n.useCallback((k,A)=>{t.current={...t.current,[k]:A},i(N=>({...N,[k]:A}))},[]),O=n.useCallback((k,A)=>{const N=A.filter(D=>k[D]===""||k[D]===void 0);return N.forEach(D=>c(F=>({...F,[D]:"Este campo es requerido"}))),p(N),N.length>0},[]);return{handleSubmit:h,handleChange:b,setValuesDefault:S,validateFields:O,errors:d,model:l,handleError:(k,A)=>{A.forEach(N=>c(D=>({...D,[N]:k}))),p(A)},messageError:s,setModel:i}},L=t=>{const[l,i]=n.useState(!0),[s,c]=n.useState(!1),d=n.useCallback((p,h)=>{const b=t.match(/[0-9]+/g);if(b===null)return;const[S]=b;h=Math.min(window.innerWidth,window.outerWidth);const O=p?h>=Number(S):h<=Number(S);c(O)},[t]);return n.useEffect(()=>{const p=/\(min-width:\s?[0-9]+px\)/gi.test(t),h=/\(max-width:\s?[0-9]+px\)/gi.test(t);if(!p&&!h&&i(!1),!p&&!h)return;const b=Math.min(window.innerWidth,window.outerWidth);d(p,b)},[t,d]),n.useEffect(()=>{if(!l)return;const p=Math.min(window.innerWidth,window.outerWidth);function h(){const b=/min-width/gi.test(t);d(b,p)}return window.addEventListener("resize",h),()=>window.removeEventListener("resize",h)},[l,t,d]),s},B=()=>{const[t,l]=n.useState({width:0,height:0});return n.useEffect(()=>{const i=()=>{const s=Math.min(window.innerWidth,window.outerWidth),c=Math.min(window.innerHeight,window.outerHeight);l({width:s,height:c})};return requestAnimationFrame(()=>i()),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[]),t};function _(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var z={exports:{}},X={};/**
|
|
36
36
|
* @license React
|
|
37
37
|
* react-jsx-runtime.production.min.js
|
|
38
38
|
*
|
|
@@ -40,7 +40,7 @@ Check the top-level render call using <`+J+">.")}return H}}function Rn(S,H){{if(
|
|
|
40
40
|
*
|
|
41
41
|
* This source code is licensed under the MIT license found in the
|
|
42
42
|
* LICENSE file in the root directory of this source tree.
|
|
43
|
-
*/var
|
|
43
|
+
*/var te;function ue(){if(te)return X;te=1;var t=n,l=Symbol.for("react.element"),i=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,c=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function p(h,b,S){var O,k={},A=null,N=null;S!==void 0&&(A=""+S),b.key!==void 0&&(A=""+b.key),b.ref!==void 0&&(N=b.ref);for(O in b)s.call(b,O)&&!d.hasOwnProperty(O)&&(k[O]=b[O]);if(h&&h.defaultProps)for(O in b=h.defaultProps,b)k[O]===void 0&&(k[O]=b[O]);return{$$typeof:l,type:h,key:A,ref:N,props:k,_owner:c.current}}return X.Fragment=i,X.jsx=p,X.jsxs=p,X}var we={};/**
|
|
44
44
|
* @license React
|
|
45
45
|
* react-jsx-runtime.development.js
|
|
46
46
|
*
|
|
@@ -48,25 +48,25 @@ Check the top-level render call using <`+J+">.")}return H}}function Rn(S,H){{if(
|
|
|
48
48
|
*
|
|
49
49
|
* This source code is licensed under the MIT license found in the
|
|
50
50
|
* LICENSE file in the root directory of this source tree.
|
|
51
|
-
*/var
|
|
52
|
-
`+
|
|
53
|
-
`),Bt=
|
|
54
|
-
`),
|
|
55
|
-
`+
|
|
51
|
+
*/var je;function ge(){return je||(je=1,process.env.NODE_ENV!=="production"&&function(){var t=n,l=Symbol.for("react.element"),i=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),h=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),N=Symbol.for("react.offscreen"),D=Symbol.iterator,F="@@iterator";function $(T){if(T===null||typeof T!="object")return null;var Z=D&&T[D]||T[F];return typeof Z=="function"?Z:null}var U=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function W(T){{for(var Z=arguments.length,re=new Array(Z>1?Z-1:0),Oe=1;Oe<Z;Oe++)re[Oe-1]=arguments[Oe];J("error",T,re)}}function J(T,Z,re){{var Oe=U.ReactDebugCurrentFrame,it=Oe.getStackAddendum();it!==""&&(Z+="%s",re=re.concat([it]));var mt=re.map(function(Xe){return String(Xe)});mt.unshift("Warning: "+Z),Function.prototype.apply.call(console[T],console,mt)}}var de=!1,ae=!1,be=!1,Ke=!1,Ue=!1,xe;xe=Symbol.for("react.module.reference");function Se(T){return!!(typeof T=="string"||typeof T=="function"||T===s||T===d||Ue||T===c||T===S||T===O||Ke||T===N||de||ae||be||typeof T=="object"&&T!==null&&(T.$$typeof===A||T.$$typeof===k||T.$$typeof===p||T.$$typeof===h||T.$$typeof===b||T.$$typeof===xe||T.getModuleId!==void 0))}function Ie(T,Z,re){var Oe=T.displayName;if(Oe)return Oe;var it=Z.displayName||Z.name||"";return it!==""?re+"("+it+")":re}function ze(T){return T.displayName||"Context"}function dt(T){if(T==null)return null;if(typeof T.tag=="number"&&W("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof T=="function")return T.displayName||T.name||null;if(typeof T=="string")return T;switch(T){case s:return"Fragment";case i:return"Portal";case d:return"Profiler";case c:return"StrictMode";case S:return"Suspense";case O:return"SuspenseList"}if(typeof T=="object")switch(T.$$typeof){case h:var Z=T;return ze(Z)+".Consumer";case p:var re=T;return ze(re._context)+".Provider";case b:return Ie(T,T.render,"ForwardRef");case k:var Oe=T.displayName||null;return Oe!==null?Oe:dt(T.type)||"Memo";case A:{var it=T,mt=it._payload,Xe=it._init;try{return dt(Xe(mt))}catch{return null}}}return null}var ht=Object.assign,G=0,ft,We,xt,ce,Ve,ct,Nt;function Lt(){}Lt.__reactDisabledLog=!0;function Et(){{if(G===0){ft=console.log,We=console.info,xt=console.warn,ce=console.error,Ve=console.group,ct=console.groupCollapsed,Nt=console.groupEnd;var T={configurable:!0,enumerable:!0,value:Lt,writable:!0};Object.defineProperties(console,{info:T,log:T,warn:T,error:T,group:T,groupCollapsed:T,groupEnd:T})}G++}}function De(){{if(G--,G===0){var T={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:ht({},T,{value:ft}),info:ht({},T,{value:We}),warn:ht({},T,{value:xt}),error:ht({},T,{value:ce}),group:ht({},T,{value:Ve}),groupCollapsed:ht({},T,{value:ct}),groupEnd:ht({},T,{value:Nt})})}G<0&&W("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var jt=U.ReactCurrentDispatcher,tt;function At(T,Z,re){{if(tt===void 0)try{throw Error()}catch(it){var Oe=it.stack.trim().match(/\n( *(at )?)/);tt=Oe&&Oe[1]||""}return`
|
|
52
|
+
`+tt+T}}var ie=!1,Ce;{var ot=typeof WeakMap=="function"?WeakMap:Map;Ce=new ot}function zt(T,Z){if(!T||ie)return"";{var re=Ce.get(T);if(re!==void 0)return re}var Oe;ie=!0;var it=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var mt;mt=jt.current,jt.current=null,Et();try{if(Z){var Xe=function(){throw Error()};if(Object.defineProperty(Xe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Xe,[])}catch(cn){Oe=cn}Reflect.construct(T,[],Xe)}else{try{Xe.call()}catch(cn){Oe=cn}T.call(Xe.prototype)}}else{try{throw Error()}catch(cn){Oe=cn}T()}}catch(cn){if(cn&&Oe&&typeof cn.stack=="string"){for(var qe=cn.stack.split(`
|
|
53
|
+
`),Bt=Oe.stack.split(`
|
|
54
|
+
`),It=qe.length-1,Mt=Bt.length-1;It>=1&&Mt>=0&&qe[It]!==Bt[Mt];)Mt--;for(;It>=1&&Mt>=0;It--,Mt--)if(qe[It]!==Bt[Mt]){if(It!==1||Mt!==1)do if(It--,Mt--,Mt<0||qe[It]!==Bt[Mt]){var Ut=`
|
|
55
|
+
`+qe[It].replace(" at new "," at ");return T.displayName&&Ut.includes("<anonymous>")&&(Ut=Ut.replace("<anonymous>",T.displayName)),typeof T=="function"&&Ce.set(T,Ut),Ut}while(It>=1&&Mt>=0);break}}}finally{ie=!1,jt.current=mt,De(),Error.prepareStackTrace=it}var Dn=T?T.displayName||T.name:"",es=Dn?At(Dn):"";return typeof T=="function"&&Ce.set(T,es),es}function Ln(T,Z,re){return zt(T,!1)}function fe(T){var Z=T.prototype;return!!(Z&&Z.isReactComponent)}function Ye(T,Z,re){if(T==null)return"";if(typeof T=="function")return zt(T,fe(T));if(typeof T=="string")return At(T);switch(T){case S:return At("Suspense");case O:return At("SuspenseList")}if(typeof T=="object")switch(T.$$typeof){case b:return Ln(T.render);case k:return Ye(T.type,Z,re);case A:{var Oe=T,it=Oe._payload,mt=Oe._init;try{return Ye(mt(it),Z,re)}catch{}}}return""}var kt=Object.prototype.hasOwnProperty,yn={},yr=U.ReactDebugCurrentFrame;function kn(T){if(T){var Z=T._owner,re=Ye(T.type,T._source,Z?Z.type:null);yr.setExtraStackFrame(re)}else yr.setExtraStackFrame(null)}function i0(T,Z,re,Oe,it){{var mt=Function.call.bind(kt);for(var Xe in T)if(mt(T,Xe)){var qe=void 0;try{if(typeof T[Xe]!="function"){var Bt=Error((Oe||"React class")+": "+re+" type `"+Xe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof T[Xe]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Bt.name="Invariant Violation",Bt}qe=T[Xe](Z,Xe,Oe,re,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(It){qe=It}qe&&!(qe instanceof Error)&&(kn(it),W("%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).",Oe||"React class",re,Xe,typeof qe),kn(null)),qe instanceof Error&&!(qe.message in yn)&&(yn[qe.message]=!0,kn(it),W("Failed %s type: %s",re,qe.message),kn(null))}}}var l0=Array.isArray;function li(T){return l0(T)}function s0(T){{var Z=typeof Symbol=="function"&&Symbol.toStringTag,re=Z&&T[Symbol.toStringTag]||T.constructor.name||"Object";return re}}function a0(T){try{return Ul(T),!1}catch{return!0}}function Ul(T){return""+T}function Vl(T){if(a0(T))return W("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",s0(T)),Ul(T)}var wr=U.ReactCurrentOwner,u0={key:!0,ref:!0,__self:!0,__source:!0},Yl,Zl,si;si={};function c0(T){if(kt.call(T,"ref")){var Z=Object.getOwnPropertyDescriptor(T,"ref").get;if(Z&&Z.isReactWarning)return!1}return T.ref!==void 0}function d0(T){if(kt.call(T,"key")){var Z=Object.getOwnPropertyDescriptor(T,"key").get;if(Z&&Z.isReactWarning)return!1}return T.key!==void 0}function f0(T,Z){if(typeof T.ref=="string"&&wr.current&&Z&&wr.current.stateNode!==Z){var re=dt(wr.current.type);si[re]||(W('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',dt(wr.current.type),T.ref),si[re]=!0)}}function p0(T,Z){{var re=function(){Yl||(Yl=!0,W("%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)",Z))};re.isReactWarning=!0,Object.defineProperty(T,"key",{get:re,configurable:!0})}}function m0(T,Z){{var re=function(){Zl||(Zl=!0,W("%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)",Z))};re.isReactWarning=!0,Object.defineProperty(T,"ref",{get:re,configurable:!0})}}var h0=function(T,Z,re,Oe,it,mt,Xe){var qe={$$typeof:l,type:T,key:Z,ref:re,props:Xe,_owner:mt};return qe._store={},Object.defineProperty(qe._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(qe,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Oe}),Object.defineProperty(qe,"_source",{configurable:!1,enumerable:!1,writable:!1,value:it}),Object.freeze&&(Object.freeze(qe.props),Object.freeze(qe)),qe};function v0(T,Z,re,Oe,it){{var mt,Xe={},qe=null,Bt=null;re!==void 0&&(Vl(re),qe=""+re),d0(Z)&&(Vl(Z.key),qe=""+Z.key),c0(Z)&&(Bt=Z.ref,f0(Z,it));for(mt in Z)kt.call(Z,mt)&&!u0.hasOwnProperty(mt)&&(Xe[mt]=Z[mt]);if(T&&T.defaultProps){var It=T.defaultProps;for(mt in It)Xe[mt]===void 0&&(Xe[mt]=It[mt])}if(qe||Bt){var Mt=typeof T=="function"?T.displayName||T.name||"Unknown":T;qe&&p0(Xe,Mt),Bt&&m0(Xe,Mt)}return h0(T,qe,Bt,it,Oe,wr.current,Xe)}}var ai=U.ReactCurrentOwner,Gl=U.ReactDebugCurrentFrame;function An(T){if(T){var Z=T._owner,re=Ye(T.type,T._source,Z?Z.type:null);Gl.setExtraStackFrame(re)}else Gl.setExtraStackFrame(null)}var ui;ui=!1;function ci(T){return typeof T=="object"&&T!==null&&T.$$typeof===l}function ql(){{if(ai.current){var T=dt(ai.current.type);if(T)return`
|
|
56
56
|
|
|
57
|
-
Check the render method of \``+
|
|
57
|
+
Check the render method of \``+T+"`."}return""}}function g0(T){return""}var Kl={};function b0(T){{var Z=ql();if(!Z){var re=typeof T=="string"?T:T.displayName||T.name;re&&(Z=`
|
|
58
58
|
|
|
59
|
-
Check the top-level render call using <`+
|
|
59
|
+
Check the top-level render call using <`+re+">.")}return Z}}function Xl(T,Z){{if(!T._store||T._store.validated||T.key!=null)return;T._store.validated=!0;var re=b0(Z);if(Kl[re])return;Kl[re]=!0;var Oe="";T&&T._owner&&T._owner!==ai.current&&(Oe=" It was passed a child from "+dt(T._owner.type)+"."),An(T),W('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',re,Oe),An(null)}}function Jl(T,Z){{if(typeof T!="object")return;if(li(T))for(var re=0;re<T.length;re++){var Oe=T[re];ci(Oe)&&Xl(Oe,Z)}else if(ci(T))T._store&&(T._store.validated=!0);else if(T){var it=$(T);if(typeof it=="function"&&it!==T.entries)for(var mt=it.call(T),Xe;!(Xe=mt.next()).done;)ci(Xe.value)&&Xl(Xe.value,Z)}}}function x0(T){{var Z=T.type;if(Z==null||typeof Z=="string")return;var re;if(typeof Z=="function")re=Z.propTypes;else if(typeof Z=="object"&&(Z.$$typeof===b||Z.$$typeof===k))re=Z.propTypes;else return;if(re){var Oe=dt(Z);i0(re,T.props,"prop",Oe,T)}else if(Z.PropTypes!==void 0&&!ui){ui=!0;var it=dt(Z);W("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",it||"Unknown")}typeof Z.getDefaultProps=="function"&&!Z.getDefaultProps.isReactClassApproved&&W("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function y0(T){{for(var Z=Object.keys(T.props),re=0;re<Z.length;re++){var Oe=Z[re];if(Oe!=="children"&&Oe!=="key"){An(T),W("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Oe),An(null);break}}T.ref!==null&&(An(T),W("Invalid attribute `ref` supplied to `React.Fragment`."),An(null))}}function Ql(T,Z,re,Oe,it,mt){{var Xe=Se(T);if(!Xe){var qe="";(T===void 0||typeof T=="object"&&T!==null&&Object.keys(T).length===0)&&(qe+=" 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 Bt=g0();Bt?qe+=Bt:qe+=ql();var It;T===null?It="null":li(T)?It="array":T!==void 0&&T.$$typeof===l?(It="<"+(dt(T.type)||"Unknown")+" />",qe=" Did you accidentally export a JSX literal instead of a component?"):It=typeof T,W("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",It,qe)}var Mt=v0(T,Z,re,it,mt);if(Mt==null)return Mt;if(Xe){var Ut=Z.children;if(Ut!==void 0)if(Oe)if(li(Ut)){for(var Dn=0;Dn<Ut.length;Dn++)Jl(Ut[Dn],T);Object.freeze&&Object.freeze(Ut)}else W("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 Jl(Ut,T)}return T===s?y0(Mt):x0(Mt),Mt}}function w0(T,Z,re){return Ql(T,Z,re,!0)}function E0(T,Z,re){return Ql(T,Z,re,!1)}var S0=E0,C0=w0;we.Fragment=s,we.jsx=S0,we.jsxs=C0}()),we}process.env.NODE_ENV==="production"?z.exports=ue():z.exports=ge();var y=z.exports;function pe(t,l,i){let s=i.initialDeps??[],c;return()=>{var d,p,h,b;let S;i.key&&(d=i.debug)!=null&&d.call(i)&&(S=Date.now());const O=t();if(!(O.length!==s.length||O.some((A,N)=>s[N]!==A)))return c;s=O;let k;if(i.key&&(p=i.debug)!=null&&p.call(i)&&(k=Date.now()),c=l(...O),i.key&&(h=i.debug)!=null&&h.call(i)){const A=Math.round((Date.now()-S)*100)/100,N=Math.round((Date.now()-k)*100)/100,D=N/16,F=($,U)=>{for($=String($);$.length<U;)$=" "+$;return $};console.info(`%c⏱ ${F(N,5)} /${F(A,5)} ms`,`
|
|
60
60
|
font-size: .6rem;
|
|
61
61
|
font-weight: bold;
|
|
62
|
-
color: hsl(${Math.max(0,Math.min(120-120*L,120))}deg 100% 31%);`,o==null?void 0:o.key)}return(g=o==null?void 0:o.onChange)==null||g.call(o,c),c}}function Fe(e,i){if(e===void 0)throw new Error("Unexpected undefined");return e}const Be=(e,i)=>Math.abs(e-i)<1,it=(e,i,o)=>{let s;return function(...c){e.clearTimeout(s),s=e.setTimeout(()=>i.apply(this,c),o)}},V=e=>e,rt=e=>{const i=Math.max(e.startIndex-e.overscan,0),o=Math.min(e.endIndex+e.overscan,e.count-1),s=[];for(let c=i;c<=o;c++)s.push(c);return s},$e=(e,i)=>{const o=e.scrollElement;if(!o)return;const s=e.targetWindow;if(!s)return;const c=p=>{const{width:h,height:g}=p;i({width:Math.round(h),height:Math.round(g)})};if(c(o.getBoundingClientRect()),!s.ResizeObserver)return()=>{};const d=new s.ResizeObserver(p=>{const h=p[0];if(h!=null&&h.borderBoxSize){const g=h.borderBoxSize[0];if(g){c({width:g.inlineSize,height:g.blockSize});return}}c(o.getBoundingClientRect())});return d.observe(o,{box:"border-box"}),()=>{d.unobserve(o)}},ue={passive:!0},Ie=typeof window>"u"?!0:"onscrollend"in window,Xe=(e,i)=>{const o=e.scrollElement;if(!o)return;const s=e.targetWindow;if(!s)return;let c=0;const d=Ie?()=>{}:it(s,()=>{i(c,!1)},e.options.isScrollingResetDelay),p=w=>()=>{c=o[e.options.horizontal?"scrollLeft":"scrollTop"],d(),i(c,w)},h=p(!0),g=p(!1);return g(),o.addEventListener("scroll",h,ue),o.addEventListener("scrollend",g,ue),()=>{o.removeEventListener("scroll",h),o.removeEventListener("scrollend",g)}},Et=(e,i,o)=>{if(i!=null&&i.borderBoxSize){const s=i.borderBoxSize[0];if(s)return Math.round(s[o.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[o.options.horizontal?"width":"height"])},ut=(e,{adjustments:i=0,behavior:o},s)=>{var c,d;const p=e+i;(d=(c=s.scrollElement)==null?void 0:c.scrollTo)==null||d.call(c,{[s.options.horizontal?"left":"top"]:p,behavior:o})};class kt{constructor(i){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 o=null;const s=()=>o||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:o=new this.targetWindow.ResizeObserver(c=>{c.forEach(d=>{this._measureElement(d.target,d)})}));return{disconnect:()=>{var c;return(c=s())==null?void 0:c.disconnect()},observe:c=>{var d;return(d=s())==null?void 0:d.observe(c,{box:"border-box"})},unobserve:c=>{var d;return(d=s())==null?void 0:d.unobserve(c)}}})(),this.range=null,this.setOptions=o=>{Object.entries(o).forEach(([s,c])=>{typeof c>"u"&&delete o[s]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:V,rangeExtractor:rt,onChange:()=>{},measureElement:Et,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,...o}},this.notify=(o,s)=>{var c,d;const{startIndex:p,endIndex:h}=this.range??{startIndex:void 0,endIndex:void 0},g=this.calculateRange();(o||p!==(g==null?void 0:g.startIndex)||h!==(g==null?void 0:g.endIndex))&&((d=(c=this.options).onChange)==null||d.call(c,this,s))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(o=>o()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var o;const s=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==s){if(this.cleanup(),!s){this.notify(!1,!1);return}this.scrollElement=s,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((o=this.scrollElement)==null?void 0:o.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,c=>{this.scrollRect=c,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(c,d)=>{this.scrollAdjustments=0,this.scrollDirection=d?this.getScrollOffset()<c?"forward":"backward":null,this.scrollOffset=c;const p=this.isScrolling;this.isScrolling=d,this.notify(p!==d,d)}))}},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=(o,s)=>{const c=new Map,d=new Map;for(let p=s-1;p>=0;p--){const h=o[p];if(c.has(h.lane))continue;const g=d.get(h.lane);if(g==null||h.end>g.end?d.set(h.lane,h):h.end<g.end&&c.set(h.lane,!0),c.size===this.options.lanes)break}return d.size===this.options.lanes?Array.from(d.values()).sort((p,h)=>p.end===h.end?p.index-h.index:p.end-h.end)[0]:void 0},this.getMeasurementOptions=me(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(o,s,c,d,p)=>(this.pendingMeasuredCacheIndexes=[],{count:o,paddingStart:s,scrollMargin:c,getItemKey:d,enabled:p}),{key:!1}),this.getMeasurements=me(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:o,paddingStart:s,scrollMargin:c,getItemKey:d,enabled:p},h)=>{var g;if(!p)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(I=>{this.itemSizeCache.set(I.key,I.size)}));const w=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const O=this.measurementsCache.slice(0,w);for(let I=w;I<o;I++){let R=(g=this.measurementsCache[I])==null?void 0:g.measureElement;R||(R=ae=>{const oe=d(I),he=this.elementsCache.get(oe);if(!ae){he&&(this.observer.unobserve(he),this.elementsCache.delete(oe));return}he!==ae&&(he&&this.observer.unobserve(he),this.observer.observe(ae),this.elementsCache.set(oe,ae)),ae.isConnected&&this.resizeItem(I,this.options.measureElement(ae,void 0,this))});const N=d(I),L=this.options.lanes===1?O[I-1]:this.getFurthestMeasurement(O,I),P=L?L.end+this.options.gap:s+c,A=h.get(N),U=typeof A=="number"?A:this.options.estimateSize(I),z=P+U,X=L?L.lane:I%this.options.lanes;O[I]={index:I,start:P,size:U,end:z,key:N,lane:X,measureElement:R}}return this.measurementsCache=O,O},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=me(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(o,s,c)=>this.range=o.length>0&&s>0?Lt({measurements:o,outerSize:s,scrollOffset:c}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getIndexes=me(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(o,s,c,d)=>s===null?[]:o({startIndex:s.startIndex,endIndex:s.endIndex,overscan:c,count:d}),{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.indexFromElement=o=>{const s=this.options.indexAttribute,c=o.getAttribute(s);return c?parseInt(c,10):(console.warn(`Missing attribute name '${s}={index}' on measured element.`),-1)},this._measureElement=(o,s)=>{const c=this.indexFromElement(o),d=this.getMeasurements()[c];if(!d||!o.isConnected){this.elementsCache.forEach((h,g)=>{h===o&&(this.observer.unobserve(o),this.elementsCache.delete(g))});return}const p=this.elementsCache.get(d.key);p!==o&&(p&&this.observer.unobserve(p),this.observer.observe(o),this.elementsCache.set(d.key,o)),this.resizeItem(c,this.options.measureElement(o,s,this))},this.resizeItem=(o,s)=>{const c=this.getMeasurements()[o];if(!c)return;const d=this.itemSizeCache.get(c.key)??c.size,p=s-d;p!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(c,p,this):c.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",p),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=p,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(c.index),this.itemSizeCache=new Map(this.itemSizeCache.set(c.key,s)),this.notify(!0,!1))},this.measureElement=o=>{o&&this._measureElement(o,void 0)},this.getVirtualItems=me(()=>[this.getIndexes(),this.getMeasurements()],(o,s)=>{const c=[];for(let d=0,p=o.length;d<p;d++){const h=o[d],g=s[h];c.push(g)}return c},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=o=>{const s=this.getMeasurements();if(s.length!==0)return Fe(s[ht(0,s.length-1,c=>Fe(s[c]).start,o)])},this.getOffsetForAlignment=(o,s)=>{const c=this.getSize(),d=this.getScrollOffset();s==="auto"&&(o<=d?s="start":o>=d+c?s="end":s="start"),s==="start"?o=o:s==="end"?o=o-c:s==="center"&&(o=o-c/2);const p=this.options.horizontal?"scrollWidth":"scrollHeight",h=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[p]:this.scrollElement[p]:0)-c;return Math.max(Math.min(h,o),0)},this.getOffsetForIndex=(o,s="auto")=>{o=Math.max(0,Math.min(o,this.options.count-1));const c=this.getMeasurements()[o];if(!c)return;const d=this.getSize(),p=this.getScrollOffset();if(s==="auto")if(c.end>=p+d-this.options.scrollPaddingEnd)s="end";else if(c.start<=p+this.options.scrollPaddingStart)s="start";else return[p,s];const h=s==="end"?c.end+this.options.scrollPaddingEnd:c.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(h,s),s]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(o,{align:s="start",behavior:c}={})=>{this.cancelScrollToIndex(),c==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(o,s),{adjustments:void 0,behavior:c})},this.scrollToIndex=(o,{align:s="auto",behavior:c}={})=>{o=Math.max(0,Math.min(o,this.options.count-1)),this.cancelScrollToIndex(),c==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const d=this.getOffsetForIndex(o,s);if(!d)return;const[p,h]=d;this._scrollToOffset(p,{adjustments:void 0,behavior:c}),c!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(o))){const[g]=Fe(this.getOffsetForIndex(o,h));Be(g,this.getScrollOffset())||this.scrollToIndex(o,{align:h,behavior:c})}else this.scrollToIndex(o,{align:h,behavior:c})}))},this.scrollBy=(o,{behavior:s}={})=>{this.cancelScrollToIndex(),s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+o,{adjustments:void 0,behavior:s})},this.getTotalSize=()=>{var o;const s=this.getMeasurements();let c;return s.length===0?c=this.options.paddingStart:c=this.options.lanes===1?((o=s[s.length-1])==null?void 0:o.end)??0:Math.max(...s.slice(-this.options.lanes).map(d=>d.end)),c-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(o,{adjustments:s,behavior:c})=>{this.options.scrollToFn(o,{behavior:c,adjustments:s},this)},this.measure=()=>{var o,s;this.itemSizeCache=new Map,(s=(o=this.options).onChange)==null||s.call(o,this,!1)},this.setOptions(i)}}const ht=(e,i,o,s)=>{for(;e<=i;){const c=(e+i)/2|0,d=o(c);if(d<s)e=c+1;else if(d>s)i=c-1;else return c}return e>0?e-1:0};function Lt({measurements:e,outerSize:i,scrollOffset:o}){const s=e.length-1,c=ht(0,s,p=>e[p].start,o);let d=c;for(;d<s&&e[d].end<o+i;)d++;return{startIndex:c,endIndex:d}}const ke=typeof document<"u"?a.useLayoutEffect:a.useEffect;function Je(e){const i=a.useReducer(()=>({}),{})[1],o={...e,onChange:(c,d)=>{var p;d?u.flushSync(i):i(),(p=e.onChange)==null||p.call(e,c,d)}},[s]=a.useState(()=>new kt(o));return s.setOptions(o),a.useEffect(()=>s._didMount(),[]),ke(()=>s._willUpdate()),s}function Ze(e){return Je({observeElementRect:$e,observeElementOffset:Xe,scrollToFn:ut,...e})}var le=Object.defineProperty,Ee=(e,i,o)=>i in e?le(e,i,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[i]=o,q=(e,i,o)=>(Ee(e,typeof i!="symbol"?i+"":i,o),o);let ge=class{constructor(){q(this,"current",this.detect()),q(this,"handoffState","pending"),q(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}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"}},je=new ge,Pe=(e,i)=>{je.isServer?n.useEffect(e,i):n.useLayoutEffect(e,i)};function Pt(e){let i=n.useRef(e);return Pe(()=>{i.current=e},[e]),i}function Zt(e,i){let[o,s]=n.useState(e),c=Pt(e);return Pe(()=>s(c.current),[c,s,...i]),o}let Q=function(e){let i=Pt(e);return n.useCallback((...o)=>i.current(...o),[i])};function Qn(e,i,o){let[s,c]=n.useState(o),d=e!==void 0,p=n.useRef(d),h=n.useRef(!1),g=n.useRef(!1);return d&&!p.current&&!h.current?(h.current=!0,p.current=d,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.")):!d&&p.current&&!g.current&&(g.current=!0,p.current=d,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.")),[d?e:s,Q(w=>(d||c(w),i==null?void 0:i(w)))]}function on(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(i=>setTimeout(()=>{throw i}))}function _t(){let e=[],i={addEventListener(o,s,c,d){return o.addEventListener(s,c,d),i.add(()=>o.removeEventListener(s,c,d))},requestAnimationFrame(...o){let s=requestAnimationFrame(...o);return i.add(()=>cancelAnimationFrame(s))},nextFrame(...o){return i.requestAnimationFrame(()=>i.requestAnimationFrame(...o))},setTimeout(...o){let s=setTimeout(...o);return i.add(()=>clearTimeout(s))},microTask(...o){let s={current:!0};return on(()=>{s.current&&o[0]()}),i.add(()=>{s.current=!1})},style(o,s,c){let d=o.style.getPropertyValue(s);return Object.assign(o.style,{[s]:c}),this.add(()=>{Object.assign(o.style,{[s]:d})})},group(o){let s=_t();return o(s),this.add(()=>s.dispose())},add(o){return e.push(o),()=>{let s=e.indexOf(o);if(s>=0)for(let c of e.splice(s,1))c()}},dispose(){for(let o of e.splice(0))o()}};return i}function Yt(){let[e]=n.useState(_t);return n.useEffect(()=>()=>e.dispose(),[e]),e}function er(){let e=typeof document>"u";return"useSyncExternalStore"in a?(i=>i.useSyncExternalStore)(a)(()=>()=>{},()=>!1,()=>!e):!1}function hn(){let e=er(),[i,o]=a.useState(je.isHandoffComplete);return i&&je.isHandoffComplete===!1&&o(!1),a.useEffect(()=>{i!==!0&&o(!0)},[i]),a.useEffect(()=>je.handoff(),[]),e?!1:i}var Ar;let Ft=(Ar=n.useId)!=null?Ar:function(){let e=hn(),[i,o]=n.useState(e?()=>je.nextId():null);return Pe(()=>{i===null&&o(je.nextId())},[i]),i!=null?""+i:void 0};function ct(e,i,...o){if(e in i){let c=i[e];return typeof c=="function"?c(...o):c}let s=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(i).map(c=>`"${c}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(s,ct),s}function Kt(e){return je.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let tr=["[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 Ht=(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))(Ht||{}),nr=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(nr||{}),rr=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(rr||{});function Dr(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(tr)).sort((i,o)=>Math.sign((i.tabIndex||Number.MAX_SAFE_INTEGER)-(o.tabIndex||Number.MAX_SAFE_INTEGER)))}var or=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(or||{});function lr(e,i=0){var o;return e===((o=Kt(e))==null?void 0:o.body)?!1:ct(i,{0(){return e.matches(tr)},1(){let s=e;for(;s!==null;){if(s.matches(tr))return!0;s=s.parentElement}return!1}})}function $r(e){let i=Kt(e);_t().nextFrame(()=>{i&&!lr(i.activeElement,0)&&Xt(e)})}var Mo=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Mo||{});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 Xt(e){e==null||e.focus({preventScroll:!0})}let Ro=["textarea","input"].join(",");function ir(e){var i,o;return(o=(i=e==null?void 0:e.matches)==null?void 0:i.call(e,Ro))!=null?o:!1}function Fn(e,i=o=>o){return e.slice().sort((o,s)=>{let c=i(o),d=i(s);if(c===null||d===null)return 0;let p=c.compareDocumentPosition(d);return p&Node.DOCUMENT_POSITION_FOLLOWING?-1:p&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function vn(e,i){return ln(Dr(),i,{relativeTo:e})}function ln(e,i,{sorted:o=!0,relativeTo:s=null,skipElements:c=[]}={}){let d=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,p=Array.isArray(e)?o?Fn(e):e:Dr(e);c.length>0&&p.length>1&&(p=p.filter(N=>!c.includes(N))),s=s??d.activeElement;let h=(()=>{if(i&5)return 1;if(i&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),g=(()=>{if(i&1)return 0;if(i&2)return Math.max(0,p.indexOf(s))-1;if(i&4)return Math.max(0,p.indexOf(s))+1;if(i&8)return p.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),w=i&32?{preventScroll:!0}:{},O=0,I=p.length,R;do{if(O>=I||O+I<=0)return 0;let N=g+O;if(i&16)N=(N+I)%I;else{if(N<0)return 3;if(N>=I)return 1}R=p[N],R==null||R.focus(w),O+=h}while(R!==d.activeElement);return i&6&&ir(R)&&R.select(),2}function Mn(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function _r(){return/Android/gi.test(window.navigator.userAgent)}function Br(){return Mn()||_r()}function jn(e,i,o){let s=Pt(i);n.useEffect(()=>{function c(d){s.current(d)}return document.addEventListener(e,c,o),()=>document.removeEventListener(e,c,o)},[e,o])}function zr(e,i,o){let s=Pt(i);n.useEffect(()=>{function c(d){s.current(d)}return window.addEventListener(e,c,o),()=>window.removeEventListener(e,c,o)},[e,o])}function Rn(e,i,o=!0){let s=n.useRef(!1);n.useEffect(()=>{requestAnimationFrame(()=>{s.current=o})},[o]);function c(p,h){if(!s.current||p.defaultPrevented)return;let g=h(p);if(g===null||!g.getRootNode().contains(g)||!g.isConnected)return;let w=function O(I){return typeof I=="function"?O(I()):Array.isArray(I)||I instanceof Set?I:[I]}(e);for(let O of w){if(O===null)continue;let I=O instanceof HTMLElement?O:O.current;if(I!=null&&I.contains(g)||p.composed&&p.composedPath().includes(I))return}return!lr(g,or.Loose)&&g.tabIndex!==-1&&p.preventDefault(),i(p,g)}let d=n.useRef(null);jn("pointerdown",p=>{var h,g;s.current&&(d.current=((g=(h=p.composedPath)==null?void 0:h.call(p))==null?void 0:g[0])||p.target)},!0),jn("mousedown",p=>{var h,g;s.current&&(d.current=((g=(h=p.composedPath)==null?void 0:h.call(p))==null?void 0:g[0])||p.target)},!0),jn("click",p=>{Br()||d.current&&(c(p,()=>d.current),d.current=null)},!0),jn("touchend",p=>c(p,()=>p.target instanceof HTMLElement?p.target:null),!0),zr("blur",p=>c(p,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Jt(...e){return n.useMemo(()=>Kt(...e),[...e])}function Wr(e){var i;if(e.type)return e.type;let o=(i=e.as)!=null?i:"button";if(typeof o=="string"&&o.toLowerCase()==="button")return"button"}function sr(e,i){let[o,s]=n.useState(()=>Wr(e));return Pe(()=>{s(Wr(e))},[e.type,e.as]),Pe(()=>{o||i.current&&i.current instanceof HTMLButtonElement&&!i.current.hasAttribute("type")&&s("button")},[o,i]),o}let ar=Symbol();function Lo(e,i=!0){return Object.assign(e,{[ar]:i})}function xt(...e){let i=n.useRef(e);n.useEffect(()=>{i.current=e},[e]);let o=Q(s=>{for(let c of i.current)c!=null&&(typeof c=="function"?c(s):c.current=s)});return e.every(s=>s==null||(s==null?void 0:s[ar]))?void 0:o}function Hr(e){return[e.screenX,e.screenY]}function Ur(){let e=n.useRef([-1,-1]);return{wasMoved(i){let o=Hr(i);return e.current[0]===o[0]&&e.current[1]===o[1]?!1:(e.current=o,!0)},update(i){e.current=Hr(i)}}}function S({container:e,accept:i,walk:o,enabled:s=!0}){let c=n.useRef(i),d=n.useRef(o);n.useEffect(()=>{c.current=i,d.current=o},[i,o]),Pe(()=>{if(!e||!s)return;let p=Kt(e);if(!p)return;let h=c.current,g=d.current,w=Object.assign(I=>h(I),{acceptNode:h}),O=p.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,w,!1);for(;O.nextNode();)g(O.currentNode)},[e,s,c,d])}function H(e,i){let o=n.useRef([]),s=Q(e);n.useEffect(()=>{let c=[...o.current];for(let[d,p]of i.entries())if(o.current[d]!==p){let h=s(i,c);return o.current=i,h}},[s,...i])}function J(...e){return Array.from(new Set(e.flatMap(i=>typeof i=="string"?i.split(" "):[]))).filter(Boolean).join(" ")}var de=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(de||{}),Me=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Me||{});function pe({ourProps:e,theirProps:i,slot:o,defaultTag:s,features:c,visible:d=!0,name:p,mergeRefs:h}){h=h??Ae;let g=Mt(i,e);if(d)return Re(g,o,s,p,h);let w=c??0;if(w&2){let{static:O=!1,...I}=g;if(O)return Re(I,o,s,p,h)}if(w&1){let{unmount:O=!0,...I}=g;return ct(O?0:1,{0(){return null},1(){return Re({...I,hidden:!0,style:{display:"none"}},o,s,p,h)}})}return Re(g,o,s,p,h)}function Re(e,i={},o,s,c){let{as:d=o,children:p,refName:h="ref",...g}=$t(e,["unmount","static"]),w=e.ref!==void 0?{[h]:e.ref}:{},O=typeof p=="function"?p(i):p;"className"in g&&g.className&&typeof g.className=="function"&&(g.className=g.className(i));let I={};if(i){let R=!1,N=[];for(let[L,P]of Object.entries(i))typeof P=="boolean"&&(R=!0),P===!0&&N.push(L);R&&(I["data-headlessui-state"]=N.join(" "))}if(d===n.Fragment&&Object.keys(vt(g)).length>0){if(!n.isValidElement(O)||Array.isArray(O)&&O.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${s} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(g).map(P=>` - ${P}`).join(`
|
|
63
|
-
`),"","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(
|
|
62
|
+
color: hsl(${Math.max(0,Math.min(120-120*D,120))}deg 100% 31%);`,i==null?void 0:i.key)}return(b=i==null?void 0:i.onChange)==null||b.call(i,c),c}}function Pe(t,l){if(t===void 0)throw new Error("Unexpected undefined");return t}const $e=(t,l)=>Math.abs(t-l)<1,nt=(t,l,i)=>{let s;return function(...c){t.clearTimeout(s),s=t.setTimeout(()=>l.apply(this,c),i)}},V=t=>t,et=t=>{const l=Math.max(t.startIndex-t.overscan,0),i=Math.min(t.endIndex+t.overscan,t.count-1),s=[];for(let c=l;c<=i;c++)s.push(c);return s},Re=(t,l)=>{const i=t.scrollElement;if(!i)return;const s=t.targetWindow;if(!s)return;const c=p=>{const{width:h,height:b}=p;l({width:Math.round(h),height:Math.round(b)})};if(c(i.getBoundingClientRect()),!s.ResizeObserver)return()=>{};const d=new s.ResizeObserver(p=>{const h=p[0];if(h!=null&&h.borderBoxSize){const b=h.borderBoxSize[0];if(b){c({width:b.inlineSize,height:b.blockSize});return}}c(i.getBoundingClientRect())});return d.observe(i,{box:"border-box"}),()=>{d.unobserve(i)}},Y={passive:!0},ne=typeof window>"u"?!0:"onscrollend"in window,ve=(t,l)=>{const i=t.scrollElement;if(!i)return;const s=t.targetWindow;if(!s)return;let c=0;const d=ne?()=>{}:nt(s,()=>{l(c,!1)},t.options.isScrollingResetDelay),p=S=>()=>{c=i[t.options.horizontal?"scrollLeft":"scrollTop"],d(),l(c,S)},h=p(!0),b=p(!1);return b(),i.addEventListener("scroll",h,Y),i.addEventListener("scrollend",b,Y),()=>{i.removeEventListener("scroll",h),i.removeEventListener("scrollend",b)}},_e=(t,l,i)=>{if(l!=null&&l.borderBoxSize){const s=l.borderBoxSize[0];if(s)return Math.round(s[i.options.horizontal?"inlineSize":"blockSize"])}return Math.round(t.getBoundingClientRect()[i.options.horizontal?"width":"height"])},He=(t,{adjustments:l=0,behavior:i},s)=>{var c,d;const p=t+l;(d=(c=s.scrollElement)==null?void 0:c.scrollTo)==null||d.call(c,{[s.options.horizontal?"left":"top"]:p,behavior:i})};class at{constructor(l){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 i=null;const s=()=>i||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:i=new this.targetWindow.ResizeObserver(c=>{c.forEach(d=>{this._measureElement(d.target,d)})}));return{disconnect:()=>{var c;return(c=s())==null?void 0:c.disconnect()},observe:c=>{var d;return(d=s())==null?void 0:d.observe(c,{box:"border-box"})},unobserve:c=>{var d;return(d=s())==null?void 0:d.unobserve(c)}}})(),this.range=null,this.setOptions=i=>{Object.entries(i).forEach(([s,c])=>{typeof c>"u"&&delete i[s]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:V,rangeExtractor:et,onChange:()=>{},measureElement:_e,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,...i}},this.notify=(i,s)=>{var c,d;const{startIndex:p,endIndex:h}=this.range??{startIndex:void 0,endIndex:void 0},b=this.calculateRange();(i||p!==(b==null?void 0:b.startIndex)||h!==(b==null?void 0:b.endIndex))&&((d=(c=this.options).onChange)==null||d.call(c,this,s))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(i=>i()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var i;const s=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==s){if(this.cleanup(),!s){this.notify(!1,!1);return}this.scrollElement=s,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((i=this.scrollElement)==null?void 0:i.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,c=>{this.scrollRect=c,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(c,d)=>{this.scrollAdjustments=0,this.scrollDirection=d?this.getScrollOffset()<c?"forward":"backward":null,this.scrollOffset=c;const p=this.isScrolling;this.isScrolling=d,this.notify(p!==d,d)}))}},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=(i,s)=>{const c=new Map,d=new Map;for(let p=s-1;p>=0;p--){const h=i[p];if(c.has(h.lane))continue;const b=d.get(h.lane);if(b==null||h.end>b.end?d.set(h.lane,h):h.end<b.end&&c.set(h.lane,!0),c.size===this.options.lanes)break}return d.size===this.options.lanes?Array.from(d.values()).sort((p,h)=>p.end===h.end?p.index-h.index:p.end-h.end)[0]:void 0},this.getMeasurementOptions=pe(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(i,s,c,d,p)=>(this.pendingMeasuredCacheIndexes=[],{count:i,paddingStart:s,scrollMargin:c,getItemKey:d,enabled:p}),{key:!1}),this.getMeasurements=pe(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:i,paddingStart:s,scrollMargin:c,getItemKey:d,enabled:p},h)=>{var b;if(!p)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(k=>{this.itemSizeCache.set(k.key,k.size)}));const S=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const O=this.measurementsCache.slice(0,S);for(let k=S;k<i;k++){let A=(b=this.measurementsCache[k])==null?void 0:b.measureElement;A||(A=de=>{const ae=d(k),be=this.elementsCache.get(ae);if(!de){be&&(this.observer.unobserve(be),this.elementsCache.delete(ae));return}be!==de&&(be&&this.observer.unobserve(be),this.observer.observe(de),this.elementsCache.set(ae,de)),de.isConnected&&this.resizeItem(k,this.options.measureElement(de,void 0,this))});const N=d(k),D=this.options.lanes===1?O[k-1]:this.getFurthestMeasurement(O,k),F=D?D.end+this.options.gap:s+c,$=h.get(N),U=typeof $=="number"?$:this.options.estimateSize(k),W=F+U,J=D?D.lane:k%this.options.lanes;O[k]={index:k,start:F,size:U,end:W,key:N,lane:J,measureElement:A}}return this.measurementsCache=O,O},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=pe(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(i,s,c)=>this.range=i.length>0&&s>0?Ct({measurements:i,outerSize:s,scrollOffset:c}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getIndexes=pe(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(i,s,c,d)=>s===null?[]:i({startIndex:s.startIndex,endIndex:s.endIndex,overscan:c,count:d}),{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.indexFromElement=i=>{const s=this.options.indexAttribute,c=i.getAttribute(s);return c?parseInt(c,10):(console.warn(`Missing attribute name '${s}={index}' on measured element.`),-1)},this._measureElement=(i,s)=>{const c=this.indexFromElement(i),d=this.getMeasurements()[c];if(!d||!i.isConnected){this.elementsCache.forEach((h,b)=>{h===i&&(this.observer.unobserve(i),this.elementsCache.delete(b))});return}const p=this.elementsCache.get(d.key);p!==i&&(p&&this.observer.unobserve(p),this.observer.observe(i),this.elementsCache.set(d.key,i)),this.resizeItem(c,this.options.measureElement(i,s,this))},this.resizeItem=(i,s)=>{const c=this.getMeasurements()[i];if(!c)return;const d=this.itemSizeCache.get(c.key)??c.size,p=s-d;p!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(c,p,this):c.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",p),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=p,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(c.index),this.itemSizeCache=new Map(this.itemSizeCache.set(c.key,s)),this.notify(!0,!1))},this.measureElement=i=>{i&&this._measureElement(i,void 0)},this.getVirtualItems=pe(()=>[this.getIndexes(),this.getMeasurements()],(i,s)=>{const c=[];for(let d=0,p=i.length;d<p;d++){const h=i[d],b=s[h];c.push(b)}return c},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=i=>{const s=this.getMeasurements();if(s.length!==0)return Pe(s[rt(0,s.length-1,c=>Pe(s[c]).start,i)])},this.getOffsetForAlignment=(i,s)=>{const c=this.getSize(),d=this.getScrollOffset();s==="auto"&&(i<=d?s="start":i>=d+c?s="end":s="start"),s==="start"?i=i:s==="end"?i=i-c:s==="center"&&(i=i-c/2);const p=this.options.horizontal?"scrollWidth":"scrollHeight",h=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[p]:this.scrollElement[p]:0)-c;return Math.max(Math.min(h,i),0)},this.getOffsetForIndex=(i,s="auto")=>{i=Math.max(0,Math.min(i,this.options.count-1));const c=this.getMeasurements()[i];if(!c)return;const d=this.getSize(),p=this.getScrollOffset();if(s==="auto")if(c.end>=p+d-this.options.scrollPaddingEnd)s="end";else if(c.start<=p+this.options.scrollPaddingStart)s="start";else return[p,s];const h=s==="end"?c.end+this.options.scrollPaddingEnd:c.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(h,s),s]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(i,{align:s="start",behavior:c}={})=>{this.cancelScrollToIndex(),c==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(i,s),{adjustments:void 0,behavior:c})},this.scrollToIndex=(i,{align:s="auto",behavior:c}={})=>{i=Math.max(0,Math.min(i,this.options.count-1)),this.cancelScrollToIndex(),c==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const d=this.getOffsetForIndex(i,s);if(!d)return;const[p,h]=d;this._scrollToOffset(p,{adjustments:void 0,behavior:c}),c!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(i))){const[b]=Pe(this.getOffsetForIndex(i,h));$e(b,this.getScrollOffset())||this.scrollToIndex(i,{align:h,behavior:c})}else this.scrollToIndex(i,{align:h,behavior:c})}))},this.scrollBy=(i,{behavior:s}={})=>{this.cancelScrollToIndex(),s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+i,{adjustments:void 0,behavior:s})},this.getTotalSize=()=>{var i;const s=this.getMeasurements();let c;return s.length===0?c=this.options.paddingStart:c=this.options.lanes===1?((i=s[s.length-1])==null?void 0:i.end)??0:Math.max(...s.slice(-this.options.lanes).map(d=>d.end)),c-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(i,{adjustments:s,behavior:c})=>{this.options.scrollToFn(i,{behavior:c,adjustments:s},this)},this.measure=()=>{var i,s;this.itemSizeCache=new Map,(s=(i=this.options).onChange)==null||s.call(i,this,!1)},this.setOptions(l)}}const rt=(t,l,i,s)=>{for(;t<=l;){const c=(t+l)/2|0,d=i(c);if(d<s)t=c+1;else if(d>s)l=c-1;else return c}return t>0?t-1:0};function Ct({measurements:t,outerSize:l,scrollOffset:i}){const s=t.length-1,c=rt(0,s,p=>t[p].start,i);let d=c;for(;d<s&&t[d].end<i+l;)d++;return{startIndex:c,endIndex:d}}const Te=typeof document<"u"?a.useLayoutEffect:a.useEffect;function Ze(t){const l=a.useReducer(()=>({}),{})[1],i={...t,onChange:(c,d)=>{var p;d?u.flushSync(l):l(),(p=t.onChange)==null||p.call(t,c,d)}},[s]=a.useState(()=>new at(i));return s.setOptions(i),a.useEffect(()=>s._didMount(),[]),Te(()=>s._willUpdate()),s}function Ge(t){return Ze({observeElementRect:Re,observeElementOffset:ve,scrollToFn:He,...t})}var se=Object.defineProperty,ke=(t,l,i)=>l in t?se(t,l,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[l]=i,K=(t,l,i)=>(ke(t,typeof l!="symbol"?l+"":l,i),i);let ye=class{constructor(){K(this,"current",this.detect()),K(this,"handoffState","pending"),K(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}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"}},Me=new ye,Fe=(t,l)=>{Me.isServer?n.useEffect(t,l):n.useLayoutEffect(t,l)};function Pt(t){let l=n.useRef(t);return Fe(()=>{l.current=t},[t]),l}function Zt(t,l){let[i,s]=n.useState(t),c=Pt(t);return Fe(()=>s(c.current),[c,s,...l]),i}let ee=function(t){let l=Pt(t);return n.useCallback((...i)=>l.current(...i),[l])};function er(t,l,i){let[s,c]=n.useState(i),d=t!==void 0,p=n.useRef(d),h=n.useRef(!1),b=n.useRef(!1);return d&&!p.current&&!h.current?(h.current=!0,p.current=d,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.")):!d&&p.current&&!b.current&&(b.current=!0,p.current=d,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.")),[d?t:s,ee(S=>(d||c(S),l==null?void 0:l(S)))]}function ln(t){typeof queueMicrotask=="function"?queueMicrotask(t):Promise.resolve().then(t).catch(l=>setTimeout(()=>{throw l}))}function _t(){let t=[],l={addEventListener(i,s,c,d){return i.addEventListener(s,c,d),l.add(()=>i.removeEventListener(s,c,d))},requestAnimationFrame(...i){let s=requestAnimationFrame(...i);return l.add(()=>cancelAnimationFrame(s))},nextFrame(...i){return l.requestAnimationFrame(()=>l.requestAnimationFrame(...i))},setTimeout(...i){let s=setTimeout(...i);return l.add(()=>clearTimeout(s))},microTask(...i){let s={current:!0};return ln(()=>{s.current&&i[0]()}),l.add(()=>{s.current=!1})},style(i,s,c){let d=i.style.getPropertyValue(s);return Object.assign(i.style,{[s]:c}),this.add(()=>{Object.assign(i.style,{[s]:d})})},group(i){let s=_t();return i(s),this.add(()=>s.dispose())},add(i){return t.push(i),()=>{let s=t.indexOf(i);if(s>=0)for(let c of t.splice(s,1))c()}},dispose(){for(let i of t.splice(0))i()}};return l}function Gt(){let[t]=n.useState(_t);return n.useEffect(()=>()=>t.dispose(),[t]),t}function tr(){let t=typeof document>"u";return"useSyncExternalStore"in a?(l=>l.useSyncExternalStore)(a)(()=>()=>{},()=>!1,()=>!t):!1}function hn(){let t=tr(),[l,i]=a.useState(Me.isHandoffComplete);return l&&Me.isHandoffComplete===!1&&i(!1),a.useEffect(()=>{l!==!0&&i(!0)},[l]),a.useEffect(()=>Me.handoff(),[]),t?!1:l}var $r;let Ft=($r=n.useId)!=null?$r:function(){let t=hn(),[l,i]=n.useState(t?()=>Me.nextId():null);return Fe(()=>{l===null&&i(Me.nextId())},[l]),l!=null?""+l:void 0};function pt(t,l,...i){if(t in l){let c=l[t];return typeof c=="function"?c(...i):c}let s=new Error(`Tried to handle "${t}" but there is no handler defined. Only defined handlers are: ${Object.keys(l).map(c=>`"${c}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(s,pt),s}function Xt(t){return Me.isServer?null:t instanceof Node?t.ownerDocument:t!=null&&t.hasOwnProperty("current")&&t.current instanceof Node?t.current.ownerDocument:document}let nr=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(t=>`${t}:not([tabindex='-1'])`).join(",");var Ht=(t=>(t[t.First=1]="First",t[t.Previous=2]="Previous",t[t.Next=4]="Next",t[t.Last=8]="Last",t[t.WrapAround=16]="WrapAround",t[t.NoScroll=32]="NoScroll",t))(Ht||{}),rr=(t=>(t[t.Error=0]="Error",t[t.Overflow=1]="Overflow",t[t.Success=2]="Success",t[t.Underflow=3]="Underflow",t))(rr||{}),or=(t=>(t[t.Previous=-1]="Previous",t[t.Next=1]="Next",t))(or||{});function _r(t=document.body){return t==null?[]:Array.from(t.querySelectorAll(nr)).sort((l,i)=>Math.sign((l.tabIndex||Number.MAX_SAFE_INTEGER)-(i.tabIndex||Number.MAX_SAFE_INTEGER)))}var ir=(t=>(t[t.Strict=0]="Strict",t[t.Loose=1]="Loose",t))(ir||{});function lr(t,l=0){var i;return t===((i=Xt(t))==null?void 0:i.body)?!1:pt(l,{0(){return t.matches(nr)},1(){let s=t;for(;s!==null;){if(s.matches(nr))return!0;s=s.parentElement}return!1}})}function Br(t){let l=Xt(t);_t().nextFrame(()=>{l&&!lr(l.activeElement,0)&&Jt(t)})}var Ao=(t=>(t[t.Keyboard=0]="Keyboard",t[t.Mouse=1]="Mouse",t))(Ao||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",t=>{t.metaKey||t.altKey||t.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",t=>{t.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:t.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Jt(t){t==null||t.focus({preventScroll:!0})}let Do=["textarea","input"].join(",");function sr(t){var l,i;return(i=(l=t==null?void 0:t.matches)==null?void 0:l.call(t,Do))!=null?i:!1}function Pn(t,l=i=>i){return t.slice().sort((i,s)=>{let c=l(i),d=l(s);if(c===null||d===null)return 0;let p=c.compareDocumentPosition(d);return p&Node.DOCUMENT_POSITION_FOLLOWING?-1:p&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function vn(t,l){return sn(_r(),l,{relativeTo:t})}function sn(t,l,{sorted:i=!0,relativeTo:s=null,skipElements:c=[]}={}){let d=Array.isArray(t)?t.length>0?t[0].ownerDocument:document:t.ownerDocument,p=Array.isArray(t)?i?Pn(t):t:_r(t);c.length>0&&p.length>1&&(p=p.filter(N=>!c.includes(N))),s=s??d.activeElement;let h=(()=>{if(l&5)return 1;if(l&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),b=(()=>{if(l&1)return 0;if(l&2)return Math.max(0,p.indexOf(s))-1;if(l&4)return Math.max(0,p.indexOf(s))+1;if(l&8)return p.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),S=l&32?{preventScroll:!0}:{},O=0,k=p.length,A;do{if(O>=k||O+k<=0)return 0;let N=b+O;if(l&16)N=(N+k)%k;else{if(N<0)return 3;if(N>=k)return 1}A=p[N],A==null||A.focus(S),O+=h}while(A!==d.activeElement);return l&6&&sr(A)&&A.select(),2}function Fn(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function zr(){return/Android/gi.test(window.navigator.userAgent)}function Wr(){return Fn()||zr()}function jn(t,l,i){let s=Pt(l);n.useEffect(()=>{function c(d){s.current(d)}return document.addEventListener(t,c,i),()=>document.removeEventListener(t,c,i)},[t,i])}function Hr(t,l,i){let s=Pt(l);n.useEffect(()=>{function c(d){s.current(d)}return window.addEventListener(t,c,i),()=>window.removeEventListener(t,c,i)},[t,i])}function Rn(t,l,i=!0){let s=n.useRef(!1);n.useEffect(()=>{requestAnimationFrame(()=>{s.current=i})},[i]);function c(p,h){if(!s.current||p.defaultPrevented)return;let b=h(p);if(b===null||!b.getRootNode().contains(b)||!b.isConnected)return;let S=function O(k){return typeof k=="function"?O(k()):Array.isArray(k)||k instanceof Set?k:[k]}(t);for(let O of S){if(O===null)continue;let k=O instanceof HTMLElement?O:O.current;if(k!=null&&k.contains(b)||p.composed&&p.composedPath().includes(k))return}return!lr(b,ir.Loose)&&b.tabIndex!==-1&&p.preventDefault(),l(p,b)}let d=n.useRef(null);jn("pointerdown",p=>{var h,b;s.current&&(d.current=((b=(h=p.composedPath)==null?void 0:h.call(p))==null?void 0:b[0])||p.target)},!0),jn("mousedown",p=>{var h,b;s.current&&(d.current=((b=(h=p.composedPath)==null?void 0:h.call(p))==null?void 0:b[0])||p.target)},!0),jn("click",p=>{Wr()||d.current&&(c(p,()=>d.current),d.current=null)},!0),jn("touchend",p=>c(p,()=>p.target instanceof HTMLElement?p.target:null),!0),Hr("blur",p=>c(p,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Qt(...t){return n.useMemo(()=>Xt(...t),[...t])}function Ur(t){var l;if(t.type)return t.type;let i=(l=t.as)!=null?l:"button";if(typeof i=="string"&&i.toLowerCase()==="button")return"button"}function ar(t,l){let[i,s]=n.useState(()=>Ur(t));return Fe(()=>{s(Ur(t))},[t.type,t.as]),Fe(()=>{i||l.current&&l.current instanceof HTMLButtonElement&&!l.current.hasAttribute("type")&&s("button")},[i,l]),i}let ur=Symbol();function $o(t,l=!0){return Object.assign(t,{[ur]:l})}function wt(...t){let l=n.useRef(t);n.useEffect(()=>{l.current=t},[t]);let i=ee(s=>{for(let c of l.current)c!=null&&(typeof c=="function"?c(s):c.current=s)});return t.every(s=>s==null||(s==null?void 0:s[ur]))?void 0:i}function Vr(t){return[t.screenX,t.screenY]}function Yr(){let t=n.useRef([-1,-1]);return{wasMoved(l){let i=Vr(l);return t.current[0]===i[0]&&t.current[1]===i[1]?!1:(t.current=i,!0)},update(l){t.current=Vr(l)}}}function j({container:t,accept:l,walk:i,enabled:s=!0}){let c=n.useRef(l),d=n.useRef(i);n.useEffect(()=>{c.current=l,d.current=i},[l,i]),Fe(()=>{if(!t||!s)return;let p=Xt(t);if(!p)return;let h=c.current,b=d.current,S=Object.assign(k=>h(k),{acceptNode:h}),O=p.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,S,!1);for(;O.nextNode();)b(O.currentNode)},[t,s,c,d])}function H(t,l){let i=n.useRef([]),s=ee(t);n.useEffect(()=>{let c=[...i.current];for(let[d,p]of l.entries())if(i.current[d]!==p){let h=s(l,c);return i.current=l,h}},[s,...l])}function Q(...t){return Array.from(new Set(t.flatMap(l=>typeof l=="string"?l.split(" "):[]))).filter(Boolean).join(" ")}var me=(t=>(t[t.None=0]="None",t[t.RenderStrategy=1]="RenderStrategy",t[t.Static=2]="Static",t))(me||{}),Le=(t=>(t[t.Unmount=0]="Unmount",t[t.Hidden=1]="Hidden",t))(Le||{});function he({ourProps:t,theirProps:l,slot:i,defaultTag:s,features:c,visible:d=!0,name:p,mergeRefs:h}){h=h??Be;let b=Rt(l,t);if(d)return Ae(b,i,s,p,h);let S=c??0;if(S&2){let{static:O=!1,...k}=b;if(O)return Ae(k,i,s,p,h)}if(S&1){let{unmount:O=!0,...k}=b;return pt(O?0:1,{0(){return null},1(){return Ae({...k,hidden:!0,style:{display:"none"}},i,s,p,h)}})}return Ae(b,i,s,p,h)}function Ae(t,l={},i,s,c){let{as:d=i,children:p,refName:h="ref",...b}=$t(t,["unmount","static"]),S=t.ref!==void 0?{[h]:t.ref}:{},O=typeof p=="function"?p(l):p;"className"in b&&b.className&&typeof b.className=="function"&&(b.className=b.className(l));let k={};if(l){let A=!1,N=[];for(let[D,F]of Object.entries(l))typeof F=="boolean"&&(A=!0),F===!0&&N.push(D);A&&(k["data-headlessui-state"]=N.join(" "))}if(d===n.Fragment&&Object.keys(bt(b)).length>0){if(!n.isValidElement(O)||Array.isArray(O)&&O.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${s} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(b).map(F=>` - ${F}`).join(`
|
|
63
|
+
`),"","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(F=>` - ${F}`).join(`
|
|
64
64
|
`)].join(`
|
|
65
|
-
`));let R=O.props,N=typeof(R==null?void 0:R.className)=="function"?(...P)=>J(R==null?void 0:R.className(...P),g.className):J(R==null?void 0:R.className,g.className),L=N?{className:N}:{};return n.cloneElement(O,Object.assign({},Mt(O.props,vt($t(g,["ref"]))),I,w,{ref:c(O.ref,w.ref)},L))}return n.createElement(d,Object.assign({},$t(g,["ref"]),d!==n.Fragment&&w,d!==n.Fragment&&I),O)}function Ae(...e){return e.every(i=>i==null)?void 0:i=>{for(let o of e)o!=null&&(typeof o=="function"?o(i):o.current=i)}}function Mt(...e){if(e.length===0)return{};if(e.length===1)return e[0];let i={},o={};for(let s of e)for(let c in s)c.startsWith("on")&&typeof s[c]=="function"?(o[c]!=null||(o[c]=[]),o[c].push(s[c])):i[c]=s[c];if(i.disabled||i["aria-disabled"])return Object.assign(i,Object.fromEntries(Object.keys(o).map(s=>[s,void 0])));for(let s in o)Object.assign(i,{[s](c,...d){let p=o[s];for(let h of p){if((c instanceof Event||(c==null?void 0:c.nativeEvent)instanceof Event)&&c.defaultPrevented)return;h(c,...d)}}});return i}function be(e){var i;return Object.assign(n.forwardRef(e),{displayName:(i=e.displayName)!=null?i:e.name})}function vt(e){let i=Object.assign({},e);for(let o in i)i[o]===void 0&&delete i[o];return i}function $t(e,i=[]){let o=Object.assign({},e);for(let s of i)s in o&&delete o[s];return o}let gn="div";var sn=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(sn||{});function Gt(e,i){var o;let{features:s=1,...c}=e,d={ref:i,"aria-hidden":(s&2)===2?!0:(o=c["aria-hidden"])!=null?o:void 0,hidden:(s&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",...(s&4)===4&&(s&2)!==2&&{display:"none"}}};return pe({ourProps:d,theirProps:c,slot:{},defaultTag:gn,name:"Hidden"})}let ur=be(Gt),Ao=n.createContext(null);Ao.displayName="OpenClosedContext";var jt=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(jt||{});function cr(){return n.useContext(Ao)}function Do({value:e,children:i}){return n.createElement(Ao.Provider,{value:e},i)}function hd(e){function i(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",i))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",i),i())}let Qt=[];hd(()=>{function e(i){i.target instanceof HTMLElement&&i.target!==document.body&&Qt[0]!==i.target&&(Qt.unshift(i.target),Qt=Qt.filter(o=>o!=null&&o.isConnected),Qt.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 Vr(e){let i=e.parentElement,o=null;for(;i&&!(i instanceof HTMLFieldSetElement);)i instanceof HTMLLegendElement&&(o=i),i=i.parentElement;let s=(i==null?void 0:i.getAttribute("disabled"))==="";return s&&vd(o)?!1:s}function vd(e){if(!e)return!1;let i=e.previousElementSibling;for(;i!==null;){if(i instanceof HTMLLegendElement)return!1;i=i.previousElementSibling}return!0}function gd(e){throw new Error("Unexpected object: "+e)}var ot=(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))(ot||{});function $o(e,i){let o=i.resolveItems();if(o.length<=0)return null;let s=i.resolveActiveIndex(),c=s??-1;switch(e.focus){case 0:{for(let d=0;d<o.length;++d)if(!i.resolveDisabled(o[d],d,o))return d;return s}case 1:{for(let d=c-1;d>=0;--d)if(!i.resolveDisabled(o[d],d,o))return d;return s}case 2:{for(let d=c+1;d<o.length;++d)if(!i.resolveDisabled(o[d],d,o))return d;return s}case 3:{for(let d=o.length-1;d>=0;--d)if(!i.resolveDisabled(o[d],d,o))return d;return s}case 4:{for(let d=0;d<o.length;++d)if(i.resolveId(o[d],d,o)===e.id)return d;return s}case 5:return null;default:gd(e)}}function ii(e={},i=null,o=[]){for(let[s,c]of Object.entries(e))ai(o,si(i,s),c);return o}function si(e,i){return e?e+"["+i+"]":i}function ai(e,i,o){if(Array.isArray(o))for(let[s,c]of o.entries())ai(e,si(i,s.toString()),c);else o instanceof Date?e.push([i,o.toISOString()]):typeof o=="boolean"?e.push([i,o?"1":"0"]):typeof o=="string"?e.push([i,o]):typeof o=="number"?e.push([i,`${o}`]):o==null?e.push([i,""]):ii(o,i,e)}function bd(e){var i,o;let s=(i=e==null?void 0:e.form)!=null?i:e.closest("form");if(s){for(let c of s.elements)if(c!==e&&(c.tagName==="INPUT"&&c.type==="submit"||c.tagName==="BUTTON"&&c.type==="submit"||c.nodeName==="INPUT"&&c.type==="image")){c.click();return}(o=s.requestSubmit)==null||o.call(s)}}var qe=(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))(qe||{}),xd=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(xd||{}),yd=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(yd||{}),wd=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(wd||{}),Ed=(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))(Ed||{});function _o(e,i=o=>o){let o=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,s=i(e.options.slice()),c=s.length>0&&s[0].dataRef.current.order!==null?s.sort((p,h)=>p.dataRef.current.order-h.dataRef.current.order):Fn(s,p=>p.dataRef.current.domRef.current),d=o?c.indexOf(o):null;return d===-1&&(d=null),{options:c,activeOptionIndex:d}}let Sd={1(e){var i;return(i=e.dataRef.current)!=null&&i.disabled||e.comboboxState===1?e:{...e,activeOptionIndex:null,comboboxState:1}},0(e){var i,o;if((i=e.dataRef.current)!=null&&i.disabled||e.comboboxState===0)return e;if((o=e.dataRef.current)!=null&&o.value){let s=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(s!==-1)return{...e,activeOptionIndex:s,comboboxState:0}}return{...e,comboboxState:0}},2(e,i){var o,s,c,d,p;if((o=e.dataRef.current)!=null&&o.disabled||(s=e.dataRef.current)!=null&&s.optionsRef.current&&!((c=e.dataRef.current)!=null&&c.optionsPropsRef.current.static)&&e.comboboxState===1)return e;if(e.virtual){let O=i.focus===ot.Specific?i.idx:$o(i,{resolveItems:()=>e.virtual.options,resolveActiveIndex:()=>{var R,N;return(N=(R=e.activeOptionIndex)!=null?R:e.virtual.options.findIndex(L=>!e.virtual.disabled(L)))!=null?N:null},resolveDisabled:e.virtual.disabled,resolveId(){throw new Error("Function not implemented.")}}),I=(d=i.trigger)!=null?d:2;return e.activeOptionIndex===O&&e.activationTrigger===I?e:{...e,activeOptionIndex:O,activationTrigger:I}}let h=_o(e);if(h.activeOptionIndex===null){let O=h.options.findIndex(I=>!I.dataRef.current.disabled);O!==-1&&(h.activeOptionIndex=O)}let g=i.focus===ot.Specific?i.idx:$o(i,{resolveItems:()=>h.options,resolveActiveIndex:()=>h.activeOptionIndex,resolveId:O=>O.id,resolveDisabled:O=>O.dataRef.current.disabled}),w=(p=i.trigger)!=null?p:2;return e.activeOptionIndex===g&&e.activationTrigger===w?e:{...e,...h,activeOptionIndex:g,activationTrigger:w}},3:(e,i)=>{var o,s,c;if((o=e.dataRef.current)!=null&&o.virtual)return{...e,options:[...e.options,i.payload]};let d=i.payload,p=_o(e,g=>(g.push(d),g));e.activeOptionIndex===null&&(s=e.dataRef.current)!=null&&s.isSelected(i.payload.dataRef.current.value)&&(p.activeOptionIndex=p.options.indexOf(d));let h={...e,...p,activationTrigger:2};return(c=e.dataRef.current)!=null&&c.__demoMode&&e.dataRef.current.value===void 0&&(h.activeOptionIndex=0),h},4:(e,i)=>{var o;if((o=e.dataRef.current)!=null&&o.virtual)return{...e,options:e.options.filter(c=>c.id!==i.id)};let s=_o(e,c=>{let d=c.findIndex(p=>p.id===i.id);return d!==-1&&c.splice(d,1),c});return{...e,...s,activationTrigger:2}},5:(e,i)=>e.labelId===i.id?e:{...e,labelId:i.id},6:(e,i)=>e.activationTrigger===i.trigger?e:{...e,activationTrigger:i.trigger},7:(e,i)=>{var o;if(((o=e.virtual)==null?void 0:o.options)===i.options)return e;let s=e.activeOptionIndex;if(e.activeOptionIndex!==null){let c=i.options.indexOf(e.virtual.options[e.activeOptionIndex]);c!==-1?s=c:s=null}return{...e,activeOptionIndex:s,virtual:Object.assign({},e.virtual,{options:i.options})}}},Bo=n.createContext(null);Bo.displayName="ComboboxActionsContext";function dr(e){let i=n.useContext(Bo);if(i===null){let o=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,dr),o}return i}let ui=n.createContext(null);function Cd(e){var i;let o=Tn("VirtualProvider"),[s,c]=n.useMemo(()=>{let g=o.optionsRef.current;if(!g)return[0,0];let w=window.getComputedStyle(g);return[parseFloat(w.paddingBlockStart||w.paddingTop),parseFloat(w.paddingBlockEnd||w.paddingBottom)]},[o.optionsRef.current]),d=Ze({scrollPaddingStart:s,scrollPaddingEnd:c,count:o.virtual.options.length,estimateSize(){return 40},getScrollElement(){var g;return(g=o.optionsRef.current)!=null?g:null},overscan:12}),[p,h]=n.useState(0);return Pe(()=>{h(g=>g+1)},[(i=o.virtual)==null?void 0:i.options]),n.createElement(ui.Provider,{value:d},n.createElement("div",{style:{position:"relative",width:"100%",height:`${d.getTotalSize()}px`},ref:g=>{if(g){if(typeof process<"u"&&process.env.JEST_WORKER_ID!==void 0||o.activationTrigger===0)return;o.activeOptionIndex!==null&&o.virtual.options.length>o.activeOptionIndex&&d.scrollToIndex(o.activeOptionIndex)}}},d.getVirtualItems().map(g=>{var w;return n.createElement(n.Fragment,{key:g.key},n.cloneElement((w=e.children)==null?void 0:w.call(e,{option:o.virtual.options[g.index],open:o.comboboxState===0}),{key:`${p}-${g.key}`,"data-index":g.index,"aria-setsize":o.virtual.options.length,"aria-posinset":g.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${g.start}px)`,overflowAnchor:"none"}}))})))}let zo=n.createContext(null);zo.displayName="ComboboxDataContext";function Tn(e){let i=n.useContext(zo);if(i===null){let o=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,Tn),o}return i}function jd(e,i){return ct(i.type,Sd,e,i)}let Td=n.Fragment;function Od(e,i){let{value:o,defaultValue:s,onChange:c,form:d,name:p,by:h=null,disabled:g=!1,__demoMode:w=!1,nullable:O=!1,multiple:I=!1,immediate:R=!1,virtual:N=null,...L}=e,P=!1,A=null,[U=I?[]:void 0,z]=Qn(o,c,s),[X,ae]=n.useReducer(jd,{dataRef:n.createRef(),comboboxState:w?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),oe=n.useRef(!1),he=n.useRef({static:!1,hold:!1}),Ve=n.useRef(null),ze=n.useRef(null),ve=n.useRef(null),xe=n.useRef(null),Se=Q(typeof h=="string"?(ne,ye)=>{let Qe=h;return(ne==null?void 0:ne[Qe])===(ye==null?void 0:ye[Qe])}:h??((ne,ye)=>ne===ye)),De=Q(ne=>X.options.findIndex(ye=>Se(ye.dataRef.current.value,ne))),st=n.useCallback(ne=>ct(Y.mode,{1:()=>U.some(ye=>Se(ye,ne)),0:()=>Se(U,ne)}),[U]),ft=Q(ne=>X.activeOptionIndex===De(ne)),Y=n.useMemo(()=>({...X,immediate:P,optionsPropsRef:he,labelRef:Ve,inputRef:ze,buttonRef:ve,optionsRef:xe,value:U,defaultValue:s,disabled:g,mode:I?1:0,virtual:X.virtual,get activeOptionIndex(){if(oe.current&&X.activeOptionIndex===null&&X.options.length>0){let ne=X.options.findIndex(ye=>!ye.dataRef.current.disabled);if(ne!==-1)return ne}return X.activeOptionIndex},calculateIndex:De,compare:Se,isSelected:st,isActive:ft,nullable:O,__demoMode:w}),[U,s,g,I,O,w,X,A]);Pe(()=>{},[A,void 0]),Pe(()=>{X.dataRef.current=Y},[Y]),Rn([Y.buttonRef,Y.inputRef,Y.optionsRef],()=>Le.closeCombobox(),Y.comboboxState===0);let at=n.useMemo(()=>{var ne,ye,Qe;return{open:Y.comboboxState===0,disabled:g,activeIndex:Y.activeOptionIndex,activeOption:Y.activeOptionIndex===null?null:Y.virtual?Y.virtual.options[(ne=Y.activeOptionIndex)!=null?ne:0]:(Qe=(ye=Y.options[Y.activeOptionIndex])==null?void 0:ye.dataRef.current.value)!=null?Qe:null,value:U}},[Y,g,U]),_e=Q(()=>{if(Y.activeOptionIndex!==null){if(Y.virtual)Rt(Y.virtual.options[Y.activeOptionIndex]);else{let{dataRef:ne}=Y.options[Y.activeOptionIndex];Rt(ne.current.value)}Le.goToOption(ot.Specific,Y.activeOptionIndex)}}),gt=Q(()=>{ae({type:0}),oe.current=!0}),ie=Q(()=>{ae({type:1}),oe.current=!1}),We=Q((ne,ye,Qe)=>(oe.current=!1,ne===ot.Specific?ae({type:2,focus:ot.Specific,idx:ye,trigger:Qe}):ae({type:2,focus:ne,trigger:Qe}))),lt=Q((ne,ye)=>(ae({type:3,payload:{id:ne,dataRef:ye}}),()=>{Y.isActive(ye.current.value)&&(oe.current=!0),ae({type:4,id:ne})})),Tt=Q(ne=>(ae({type:5,id:ne}),()=>ae({type:5,id:null}))),Rt=Q(ne=>ct(Y.mode,{0(){return z==null?void 0:z(ne)},1(){let ye=Y.value.slice(),Qe=ye.findIndex(zt=>Se(zt,ne));return Qe===-1?ye.push(ne):ye.splice(Qe,1),z==null?void 0:z(ye)}})),yt=Q(ne=>{ae({type:6,trigger:ne})}),Le=n.useMemo(()=>({onChange:Rt,registerOption:lt,registerLabel:Tt,goToOption:We,closeCombobox:ie,openCombobox:gt,setActivationTrigger:yt,selectActiveOption:_e}),[]),St=i===null?{}:{ref:i},Ke=n.useRef(null),At=Yt();return n.useEffect(()=>{Ke.current&&s!==void 0&&At.addEventListener(Ke.current,"reset",()=>{z==null||z(s)})},[Ke,z]),n.createElement(Bo.Provider,{value:Le},n.createElement(zo.Provider,{value:Y},n.createElement(Do,{value:ct(Y.comboboxState,{0:jt.Open,1:jt.Closed})},p!=null&&U!=null&&ii({[p]:U}).map(([ne,ye],Qe)=>n.createElement(ur,{features:sn.Hidden,ref:Qe===0?zt=>{var Ln;Ke.current=(Ln=zt==null?void 0:zt.closest("form"))!=null?Ln:null}:void 0,...vt({key:ne,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:d,disabled:g,name:ne,value:ye})})),pe({ourProps:St,theirProps:L,slot:at,defaultTag:Td,name:"Combobox"}))))}let Nd="input";function Id(e,i){var o,s,c,d,p;let h=Ft(),{id:g=`headlessui-combobox-input-${h}`,onChange:w,displayValue:O,type:I="text",...R}=e,N=Tn("Combobox.Input"),L=dr("Combobox.Input"),P=xt(N.inputRef,i),A=Jt(N.inputRef),U=n.useRef(!1),z=Yt(),X=Q(()=>{L.onChange(null),N.optionsRef.current&&(N.optionsRef.current.scrollTop=0),L.goToOption(ot.Nothing)}),ae=function(){var Y;return typeof O=="function"&&N.value!==void 0?(Y=O(N.value))!=null?Y:"":typeof N.value=="string"?N.value:""}();H(([Y,at],[_e,gt])=>{if(U.current)return;let ie=N.inputRef.current;ie&&((gt===0&&at===1||Y!==_e)&&(ie.value=Y),requestAnimationFrame(()=>{if(U.current||!ie||(A==null?void 0:A.activeElement)!==ie)return;let{selectionStart:We,selectionEnd:lt}=ie;Math.abs((lt??0)-(We??0))===0&&We===0&&ie.setSelectionRange(ie.value.length,ie.value.length)}))},[ae,N.comboboxState,A]),H(([Y],[at])=>{if(Y===0&&at===1){if(U.current)return;let _e=N.inputRef.current;if(!_e)return;let gt=_e.value,{selectionStart:ie,selectionEnd:We,selectionDirection:lt}=_e;_e.value="",_e.value=gt,lt!==null?_e.setSelectionRange(ie,We,lt):_e.setSelectionRange(ie,We)}},[N.comboboxState]);let oe=n.useRef(!1),he=Q(()=>{oe.current=!0}),Ve=Q(()=>{z.nextFrame(()=>{oe.current=!1})}),ze=Q(Y=>{switch(U.current=!0,Y.key){case qe.Enter:if(U.current=!1,N.comboboxState!==0||oe.current)return;if(Y.preventDefault(),Y.stopPropagation(),N.activeOptionIndex===null){L.closeCombobox();return}L.selectActiveOption(),N.mode===0&&L.closeCombobox();break;case qe.ArrowDown:return U.current=!1,Y.preventDefault(),Y.stopPropagation(),ct(N.comboboxState,{0:()=>L.goToOption(ot.Next),1:()=>L.openCombobox()});case qe.ArrowUp:return U.current=!1,Y.preventDefault(),Y.stopPropagation(),ct(N.comboboxState,{0:()=>L.goToOption(ot.Previous),1:()=>{L.openCombobox(),z.nextFrame(()=>{N.value||L.goToOption(ot.Last)})}});case qe.Home:if(Y.shiftKey)break;return U.current=!1,Y.preventDefault(),Y.stopPropagation(),L.goToOption(ot.First);case qe.PageUp:return U.current=!1,Y.preventDefault(),Y.stopPropagation(),L.goToOption(ot.First);case qe.End:if(Y.shiftKey)break;return U.current=!1,Y.preventDefault(),Y.stopPropagation(),L.goToOption(ot.Last);case qe.PageDown:return U.current=!1,Y.preventDefault(),Y.stopPropagation(),L.goToOption(ot.Last);case qe.Escape:return U.current=!1,N.comboboxState!==0?void 0:(Y.preventDefault(),N.optionsRef.current&&!N.optionsPropsRef.current.static&&Y.stopPropagation(),N.nullable&&N.mode===0&&N.value===null&&X(),L.closeCombobox());case qe.Tab:if(U.current=!1,N.comboboxState!==0)return;N.mode===0&&N.activationTrigger!==1&&L.selectActiveOption(),L.closeCombobox();break}}),ve=Q(Y=>{w==null||w(Y),N.nullable&&N.mode===0&&Y.target.value===""&&X(),L.openCombobox()}),xe=Q(Y=>{var at,_e,gt;let ie=(at=Y.relatedTarget)!=null?at:Qt.find(We=>We!==Y.currentTarget);if(U.current=!1,!((_e=N.optionsRef.current)!=null&&_e.contains(ie))&&!((gt=N.buttonRef.current)!=null&>.contains(ie))&&N.comboboxState===0)return Y.preventDefault(),N.mode===0&&(N.nullable&&N.value===null?X():N.activationTrigger!==1&&L.selectActiveOption()),L.closeCombobox()}),Se=Q(Y=>{var at,_e,gt;let ie=(at=Y.relatedTarget)!=null?at:Qt.find(We=>We!==Y.currentTarget);(_e=N.buttonRef.current)!=null&&_e.contains(ie)||(gt=N.optionsRef.current)!=null&>.contains(ie)||N.disabled||N.immediate&&N.comboboxState!==0&&(L.openCombobox(),z.nextFrame(()=>{L.setActivationTrigger(1)}))}),De=Zt(()=>{if(N.labelId)return[N.labelId].join(" ")},[N.labelId]),st=n.useMemo(()=>({open:N.comboboxState===0,disabled:N.disabled}),[N]),ft={ref:P,id:g,role:"combobox",type:I,"aria-controls":(o=N.optionsRef.current)==null?void 0:o.id,"aria-expanded":N.comboboxState===0,"aria-activedescendant":N.activeOptionIndex===null?void 0:N.virtual?(s=N.options.find(Y=>{var at;return!((at=N.virtual)!=null&&at.disabled(Y.dataRef.current.value))&&N.compare(Y.dataRef.current.value,N.virtual.options[N.activeOptionIndex])}))==null?void 0:s.id:(c=N.options[N.activeOptionIndex])==null?void 0:c.id,"aria-labelledby":De,"aria-autocomplete":"list",defaultValue:(p=(d=e.defaultValue)!=null?d:N.defaultValue!==void 0?O==null?void 0:O(N.defaultValue):null)!=null?p:N.defaultValue,disabled:N.disabled,onCompositionStart:he,onCompositionEnd:Ve,onKeyDown:ze,onChange:ve,onFocus:Se,onBlur:xe};return pe({ourProps:ft,theirProps:R,slot:st,defaultTag:Nd,name:"Combobox.Input"})}let kd="button";function Pd(e,i){var o;let s=Tn("Combobox.Button"),c=dr("Combobox.Button"),d=xt(s.buttonRef,i),p=Ft(),{id:h=`headlessui-combobox-button-${p}`,...g}=e,w=Yt(),O=Q(P=>{switch(P.key){case qe.ArrowDown:return P.preventDefault(),P.stopPropagation(),s.comboboxState===1&&c.openCombobox(),w.nextFrame(()=>{var A;return(A=s.inputRef.current)==null?void 0:A.focus({preventScroll:!0})});case qe.ArrowUp:return P.preventDefault(),P.stopPropagation(),s.comboboxState===1&&(c.openCombobox(),w.nextFrame(()=>{s.value||c.goToOption(ot.Last)})),w.nextFrame(()=>{var A;return(A=s.inputRef.current)==null?void 0:A.focus({preventScroll:!0})});case qe.Escape:return s.comboboxState!==0?void 0:(P.preventDefault(),s.optionsRef.current&&!s.optionsPropsRef.current.static&&P.stopPropagation(),c.closeCombobox(),w.nextFrame(()=>{var A;return(A=s.inputRef.current)==null?void 0:A.focus({preventScroll:!0})}));default:return}}),I=Q(P=>{if(Vr(P.currentTarget))return P.preventDefault();s.comboboxState===0?c.closeCombobox():(P.preventDefault(),c.openCombobox()),w.nextFrame(()=>{var A;return(A=s.inputRef.current)==null?void 0:A.focus({preventScroll:!0})})}),R=Zt(()=>{if(s.labelId)return[s.labelId,h].join(" ")},[s.labelId,h]),N=n.useMemo(()=>({open:s.comboboxState===0,disabled:s.disabled,value:s.value}),[s]),L={ref:d,id:h,type:sr(e,s.buttonRef),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(o=s.optionsRef.current)==null?void 0:o.id,"aria-expanded":s.comboboxState===0,"aria-labelledby":R,disabled:s.disabled,onClick:I,onKeyDown:O};return pe({ourProps:L,theirProps:g,slot:N,defaultTag:kd,name:"Combobox.Button"})}let Fd="label";function Md(e,i){let o=Ft(),{id:s=`headlessui-combobox-label-${o}`,...c}=e,d=Tn("Combobox.Label"),p=dr("Combobox.Label"),h=xt(d.labelRef,i);Pe(()=>p.registerLabel(s),[s]);let g=Q(()=>{var O;return(O=d.inputRef.current)==null?void 0:O.focus({preventScroll:!0})}),w=n.useMemo(()=>({open:d.comboboxState===0,disabled:d.disabled}),[d]);return pe({ourProps:{ref:h,id:s,onClick:g},theirProps:c,slot:w,defaultTag:Fd,name:"Combobox.Label"})}let Rd="ul",Ld=de.RenderStrategy|de.Static;function Ad(e,i){let o=Ft(),{id:s=`headlessui-combobox-options-${o}`,hold:c=!1,...d}=e,p=Tn("Combobox.Options"),h=xt(p.optionsRef,i),g=cr(),w=g!==null?(g&jt.Open)===jt.Open:p.comboboxState===0;Pe(()=>{var N;p.optionsPropsRef.current.static=(N=e.static)!=null?N:!1},[p.optionsPropsRef,e.static]),Pe(()=>{p.optionsPropsRef.current.hold=c},[p.optionsPropsRef,c]),S({container:p.optionsRef.current,enabled:p.comboboxState===0,accept(N){return N.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:N.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(N){N.setAttribute("role","none")}});let O=Zt(()=>{var N,L;return(L=p.labelId)!=null?L:(N=p.buttonRef.current)==null?void 0:N.id},[p.labelId,p.buttonRef.current]),I=n.useMemo(()=>({open:p.comboboxState===0,option:void 0}),[p]),R={"aria-labelledby":O,role:"listbox","aria-multiselectable":p.mode===1?!0:void 0,id:s,ref:h};return p.virtual&&p.comboboxState===0&&Object.assign(d,{children:n.createElement(Cd,null,d.children)}),pe({ourProps:R,theirProps:d,slot:I,defaultTag:Rd,features:Ld,visible:w,name:"Combobox.Options"})}let Dd="li";function $d(e,i){var o;let s=Ft(),{id:c=`headlessui-combobox-option-${s}`,disabled:d=!1,value:p,order:h=null,...g}=e,w=Tn("Combobox.Option"),O=dr("Combobox.Option"),I=w.virtual?w.activeOptionIndex===w.calculateIndex(p):w.activeOptionIndex===null?!1:((o=w.options[w.activeOptionIndex])==null?void 0:o.id)===c,R=w.isSelected(p),N=n.useRef(null),L=Pt({disabled:d,value:p,domRef:N,order:h}),P=n.useContext(ui),A=xt(i,N,P?P.measureElement:null),U=Q(()=>O.onChange(p));Pe(()=>O.registerOption(c,L),[L,c]);let z=n.useRef(!(w.virtual||w.__demoMode));Pe(()=>{if(!w.virtual||!w.__demoMode)return;let xe=_t();return xe.requestAnimationFrame(()=>{z.current=!0}),xe.dispose},[w.virtual,w.__demoMode]),Pe(()=>{if(!z.current||w.comboboxState!==0||!I||w.activationTrigger===0)return;let xe=_t();return xe.requestAnimationFrame(()=>{var Se,De;(De=(Se=N.current)==null?void 0:Se.scrollIntoView)==null||De.call(Se,{block:"nearest"})}),xe.dispose},[N,I,w.comboboxState,w.activationTrigger,w.activeOptionIndex]);let X=Q(xe=>{var Se;if(d||(Se=w.virtual)!=null&&Se.disabled(p))return xe.preventDefault();U(),Br()||requestAnimationFrame(()=>{var De;return(De=w.inputRef.current)==null?void 0:De.focus({preventScroll:!0})}),w.mode===0&&requestAnimationFrame(()=>O.closeCombobox())}),ae=Q(()=>{var xe;if(d||(xe=w.virtual)!=null&&xe.disabled(p))return O.goToOption(ot.Nothing);let Se=w.calculateIndex(p);O.goToOption(ot.Specific,Se)}),oe=Ur(),he=Q(xe=>oe.update(xe)),Ve=Q(xe=>{var Se;if(!oe.wasMoved(xe)||d||(Se=w.virtual)!=null&&Se.disabled(p)||I)return;let De=w.calculateIndex(p);O.goToOption(ot.Specific,De,0)}),ze=Q(xe=>{var Se;oe.wasMoved(xe)&&(d||(Se=w.virtual)!=null&&Se.disabled(p)||I&&(w.optionsPropsRef.current.hold||O.goToOption(ot.Nothing)))}),ve=n.useMemo(()=>({active:I,selected:R,disabled:d}),[I,R,d]);return pe({ourProps:{id:c,ref:A,role:"option",tabIndex:d===!0?void 0:-1,"aria-disabled":d===!0?!0:void 0,"aria-selected":R,disabled:void 0,onClick:X,onFocus:ae,onPointerEnter:he,onMouseEnter:he,onPointerMove:Ve,onMouseMove:Ve,onPointerLeave:ze,onMouseLeave:ze},theirProps:g,slot:ve,defaultTag:Dd,name:"Combobox.Option"})}let _d=be(Od),Bd=be(Pd),zd=be(Id),Wd=be(Md),Hd=be(Ad),Ud=be($d),an=Object.assign(_d,{Input:zd,Button:Bd,Label:Wd,Options:Hd,Option:Ud});function ci(e,i,o,s){let c=Pt(o);n.useEffect(()=>{e=e??window;function d(p){c.current(p)}return e.addEventListener(i,d,s),()=>e.removeEventListener(i,d,s)},[e,i,s])}function fr(){let e=n.useRef(!1);return Pe(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function di(e){let i=Q(e),o=n.useRef(!1);n.useEffect(()=>(o.current=!1,()=>{o.current=!0,on(()=>{o.current&&i()})}),[i])}var pr=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(pr||{});function Vd(){let e=n.useRef(0);return zr("keydown",i=>{i.key==="Tab"&&(e.current=i.shiftKey?1:0)},!0),e}function fi(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let i=new Set;for(let o of e.current)o.current instanceof HTMLElement&&i.add(o.current);return i}let Zd="div";var pi=(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))(pi||{});function Yd(e,i){let o=n.useRef(null),s=xt(o,i),{initialFocus:c,containers:d,features:p=30,...h}=e;hn()||(p=1);let g=Jt(o);Kd({ownerDocument:g},!!(p&16));let w=Xd({ownerDocument:g,container:o,initialFocus:c},!!(p&2));Jd({ownerDocument:g,container:o,containers:d,previousActiveElement:w},!!(p&8));let O=Vd(),I=Q(P=>{let A=o.current;A&&(U=>U())(()=>{ct(O.current,{[pr.Forwards]:()=>{ln(A,Ht.First,{skipElements:[P.relatedTarget]})},[pr.Backwards]:()=>{ln(A,Ht.Last,{skipElements:[P.relatedTarget]})}})})}),R=Yt(),N=n.useRef(!1),L={ref:s,onKeyDown(P){P.key=="Tab"&&(N.current=!0,R.requestAnimationFrame(()=>{N.current=!1}))},onBlur(P){let A=fi(d);o.current instanceof HTMLElement&&A.add(o.current);let U=P.relatedTarget;U instanceof HTMLElement&&U.dataset.headlessuiFocusGuard!=="true"&&(mi(A,U)||(N.current?ln(o.current,ct(O.current,{[pr.Forwards]:()=>Ht.Next,[pr.Backwards]:()=>Ht.Previous})|Ht.WrapAround,{relativeTo:P.target}):P.target instanceof HTMLElement&&Xt(P.target)))}};return n.createElement(n.Fragment,null,!!(p&4)&&n.createElement(ur,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:I,features:sn.Focusable}),pe({ourProps:L,theirProps:h,defaultTag:Zd,name:"FocusTrap"}),!!(p&4)&&n.createElement(ur,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:I,features:sn.Focusable}))}let Gd=be(Yd),mr=Object.assign(Gd,{features:pi});function qd(e=!0){let i=n.useRef(Qt.slice());return H(([o],[s])=>{s===!0&&o===!1&&on(()=>{i.current.splice(0)}),s===!1&&o===!0&&(i.current=Qt.slice())},[e,Qt,i]),Q(()=>{var o;return(o=i.current.find(s=>s!=null&&s.isConnected))!=null?o:null})}function Kd({ownerDocument:e},i){let o=qd(i);H(()=>{i||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&Xt(o())},[i]),di(()=>{i&&Xt(o())})}function Xd({ownerDocument:e,container:i,initialFocus:o},s){let c=n.useRef(null),d=fr();return H(()=>{if(!s)return;let p=i.current;p&&on(()=>{if(!d.current)return;let h=e==null?void 0:e.activeElement;if(o!=null&&o.current){if((o==null?void 0:o.current)===h){c.current=h;return}}else if(p.contains(h)){c.current=h;return}o!=null&&o.current?Xt(o.current):ln(p,Ht.First)===nr.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),c.current=e==null?void 0:e.activeElement})},[s]),c}function Jd({ownerDocument:e,container:i,containers:o,previousActiveElement:s},c){let d=fr();ci(e==null?void 0:e.defaultView,"focus",p=>{if(!c||!d.current)return;let h=fi(o);i.current instanceof HTMLElement&&h.add(i.current);let g=s.current;if(!g)return;let w=p.target;w&&w instanceof HTMLElement?mi(h,w)?(s.current=w,Xt(w)):(p.preventDefault(),p.stopPropagation(),Xt(g)):Xt(s.current)},!0)}function mi(e,i){for(let o of e)if(o.contains(i))return!0;return!1}let hi=n.createContext(!1);function Qd(){return n.useContext(hi)}function Wo(e){return n.createElement(hi.Provider,{value:e.force},e.children)}function ef(e){let i=Qd(),o=n.useContext(vi),s=Jt(e),[c,d]=n.useState(()=>{if(!i&&o!==null||je.isServer)return null;let p=s==null?void 0:s.getElementById("headlessui-portal-root");if(p)return p;if(s===null)return null;let h=s.createElement("div");return h.setAttribute("id","headlessui-portal-root"),s.body.appendChild(h)});return n.useEffect(()=>{c!==null&&(s!=null&&s.body.contains(c)||s==null||s.body.appendChild(c))},[c,s]),n.useEffect(()=>{i||o!==null&&d(o.current)},[o,d,i]),c}let tf=n.Fragment;function nf(e,i){let o=e,s=n.useRef(null),c=xt(Lo(O=>{s.current=O}),i),d=Jt(s),p=ef(s),[h]=n.useState(()=>{var O;return je.isServer?null:(O=d==null?void 0:d.createElement("div"))!=null?O:null}),g=n.useContext(Ho),w=hn();return Pe(()=>{!p||!h||p.contains(h)||(h.setAttribute("data-headlessui-portal",""),p.appendChild(h))},[p,h]),Pe(()=>{if(h&&g)return g.register(h)},[g,h]),di(()=>{var O;!p||!h||(h instanceof Node&&p.contains(h)&&p.removeChild(h),p.childNodes.length<=0&&((O=p.parentElement)==null||O.removeChild(p)))}),w?!p||!h?null:u.createPortal(pe({ourProps:{ref:c},theirProps:o,defaultTag:tf,name:"Portal"}),h):null}let rf=n.Fragment,vi=n.createContext(null);function of(e,i){let{target:o,...s}=e,c={ref:xt(i)};return n.createElement(vi.Provider,{value:o},pe({ourProps:c,theirProps:s,defaultTag:rf,name:"Popover.Group"}))}let Ho=n.createContext(null);function lf(){let e=n.useContext(Ho),i=n.useRef([]),o=Q(d=>(i.current.push(d),e&&e.register(d),()=>s(d))),s=Q(d=>{let p=i.current.indexOf(d);p!==-1&&i.current.splice(p,1),e&&e.unregister(d)}),c=n.useMemo(()=>({register:o,unregister:s,portals:i}),[o,s,i]);return[i,n.useMemo(()=>function({children:d}){return n.createElement(Ho.Provider,{value:c},d)},[c])]}let sf=be(nf),af=be(of),Uo=Object.assign(sf,{Group:af});function uf(e,i){return e===i&&(e!==0||1/e===1/i)||e!==e&&i!==i}const cf=typeof Object.is=="function"?Object.is:uf,{useState:df,useEffect:ff,useLayoutEffect:pf,useDebugValue:mf}=a;function hf(e,i,o){const s=i(),[{inst:c},d]=df({inst:{value:s,getSnapshot:i}});return pf(()=>{c.value=s,c.getSnapshot=i,Vo(c)&&d({inst:c})},[e,s,i]),ff(()=>(Vo(c)&&d({inst:c}),e(()=>{Vo(c)&&d({inst:c})})),[e]),mf(s),s}function Vo(e){const i=e.getSnapshot,o=e.value;try{const s=i();return!cf(o,s)}catch{return!0}}function vf(e,i,o){return i()}const gf=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",bf=!gf,xf=bf?vf:hf,yf="useSyncExternalStore"in a?(e=>e.useSyncExternalStore)(a):xf;function wf(e){return yf(e.subscribe,e.getSnapshot,e.getSnapshot)}function Ef(e,i){let o=e(),s=new Set;return{getSnapshot(){return o},subscribe(c){return s.add(c),()=>s.delete(c)},dispatch(c,...d){let p=i[c].call(o,...d);p&&(o=p,s.forEach(h=>h()))}}}function Sf(){let e;return{before({doc:i}){var o;let s=i.documentElement;e=((o=i.defaultView)!=null?o:window).innerWidth-s.clientWidth},after({doc:i,d:o}){let s=i.documentElement,c=s.clientWidth-s.offsetWidth,d=e-c;o.style(s,"paddingRight",`${d}px`)}}}function Cf(){return Mn()?{before({doc:e,d:i,meta:o}){function s(c){return o.containers.flatMap(d=>d()).some(d=>d.contains(c))}i.microTask(()=>{var c;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let h=_t();h.style(e.documentElement,"scrollBehavior","auto"),i.add(()=>i.microTask(()=>h.dispose()))}let d=(c=window.scrollY)!=null?c:window.pageYOffset,p=null;i.addEventListener(e,"click",h=>{if(h.target instanceof HTMLElement)try{let g=h.target.closest("a");if(!g)return;let{hash:w}=new URL(g.href),O=e.querySelector(w);O&&!s(O)&&(p=O)}catch{}},!0),i.addEventListener(e,"touchstart",h=>{if(h.target instanceof HTMLElement)if(s(h.target)){let g=h.target;for(;g.parentElement&&s(g.parentElement);)g=g.parentElement;i.style(g,"overscrollBehavior","contain")}else i.style(h.target,"touchAction","none")}),i.addEventListener(e,"touchmove",h=>{if(h.target instanceof HTMLElement)if(s(h.target)){let g=h.target;for(;g.parentElement&&g.dataset.headlessuiPortal!==""&&!(g.scrollHeight>g.clientHeight||g.scrollWidth>g.clientWidth);)g=g.parentElement;g.dataset.headlessuiPortal===""&&h.preventDefault()}else h.preventDefault()},{passive:!1}),i.add(()=>{var h;let g=(h=window.scrollY)!=null?h:window.pageYOffset;d!==g&&window.scrollTo(0,d),p&&p.isConnected&&(p.scrollIntoView({block:"nearest"}),p=null)})})}}:{}}function jf(){return{before({doc:e,d:i}){i.style(e.documentElement,"overflow","hidden")}}}function Tf(e){let i={};for(let o of e)Object.assign(i,o(i));return i}let On=Ef(()=>new Map,{PUSH(e,i){var o;let s=(o=this.get(e))!=null?o:{doc:e,count:0,d:_t(),meta:new Set};return s.count++,s.meta.add(i),this.set(e,s),this},POP(e,i){let o=this.get(e);return o&&(o.count--,o.meta.delete(i)),this},SCROLL_PREVENT({doc:e,d:i,meta:o}){let s={doc:e,d:i,meta:Tf(o)},c=[Cf(),Sf(),jf()];c.forEach(({before:d})=>d==null?void 0:d(s)),c.forEach(({after:d})=>d==null?void 0:d(s))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});On.subscribe(()=>{let e=On.getSnapshot(),i=new Map;for(let[o]of e)i.set(o,o.documentElement.style.overflow);for(let o of e.values()){let s=i.get(o.doc)==="hidden",c=o.count!==0;(c&&!s||!c&&s)&&On.dispatch(o.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",o),o.count===0&&On.dispatch("TEARDOWN",o)}});function Of(e,i,o){let s=wf(On),c=e?s.get(e):void 0,d=c?c.count>0:!1;return Pe(()=>{if(!(!e||!i))return On.dispatch("PUSH",e,o),()=>On.dispatch("POP",e,o)},[i,e]),d}let Zo=new Map,hr=new Map;function gi(e,i=!0){Pe(()=>{var o;if(!i)return;let s=typeof e=="function"?e():e.current;if(!s)return;function c(){var p;if(!s)return;let h=(p=hr.get(s))!=null?p:1;if(h===1?hr.delete(s):hr.set(s,h-1),h!==1)return;let g=Zo.get(s);g&&(g["aria-hidden"]===null?s.removeAttribute("aria-hidden"):s.setAttribute("aria-hidden",g["aria-hidden"]),s.inert=g.inert,Zo.delete(s))}let d=(o=hr.get(s))!=null?o:0;return hr.set(s,d+1),d!==0||(Zo.set(s,{"aria-hidden":s.getAttribute("aria-hidden"),inert:s.inert}),s.setAttribute("aria-hidden","true"),s.inert=!0),c},[e,i])}function Nf({defaultContainers:e=[],portals:i,mainTreeNodeRef:o}={}){var s;let c=n.useRef((s=o==null?void 0:o.current)!=null?s:null),d=Jt(c),p=Q(()=>{var h,g,w;let O=[];for(let I of e)I!==null&&(I instanceof HTMLElement?O.push(I):"current"in I&&I.current instanceof HTMLElement&&O.push(I.current));if(i!=null&&i.current)for(let I of i.current)O.push(I);for(let I of(h=d==null?void 0:d.querySelectorAll("html > *, body > *"))!=null?h:[])I!==document.body&&I!==document.head&&I instanceof HTMLElement&&I.id!=="headlessui-portal-root"&&(I.contains(c.current)||I.contains((w=(g=c.current)==null?void 0:g.getRootNode())==null?void 0:w.host)||O.some(R=>I.contains(R))||O.push(I));return O});return{resolveContainers:p,contains:Q(h=>p().some(g=>g.contains(h))),mainTreeNodeRef:c,MainTreeNode:n.useMemo(()=>function(){return o!=null?null:n.createElement(ur,{features:sn.Hidden,ref:c})},[c,o])}}let Yo=n.createContext(()=>{});Yo.displayName="StackContext";var Go=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Go||{});function If(){return n.useContext(Yo)}function kf({children:e,onUpdate:i,type:o,element:s,enabled:c}){let d=If(),p=Q((...h)=>{i==null||i(...h),d(...h)});return Pe(()=>{let h=c===void 0||c===!0;return h&&p(0,o,s),()=>{h&&p(1,o,s)}},[p,o,s,c]),n.createElement(Yo.Provider,{value:p},e)}let bi=n.createContext(null);function xi(){let e=n.useContext(bi);if(e===null){let i=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(i,xi),i}return e}function yi(){let[e,i]=n.useState([]);return[e.length>0?e.join(" "):void 0,n.useMemo(()=>function(o){let s=Q(d=>(i(p=>[...p,d]),()=>i(p=>{let h=p.slice(),g=h.indexOf(d);return g!==-1&&h.splice(g,1),h}))),c=n.useMemo(()=>({register:s,slot:o.slot,name:o.name,props:o.props}),[s,o.slot,o.name,o.props]);return n.createElement(bi.Provider,{value:c},o.children)},[i])]}let Pf="p";function Ff(e,i){let o=Ft(),{id:s=`headlessui-description-${o}`,...c}=e,d=xi(),p=xt(i);Pe(()=>d.register(s),[s,d.register]);let h={ref:p,...d.props,id:s};return pe({ourProps:h,theirProps:c,slot:d.slot||{},defaultTag:Pf,name:d.name||"Description"})}let Mf=be(Ff),wi=Object.assign(Mf,{});var Rf=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Rf||{}),Lf=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(Lf||{});let Af={0(e,i){return e.titleId===i.id?e:{...e,titleId:i.id}}},Zr=n.createContext(null);Zr.displayName="DialogContext";function vr(e){let i=n.useContext(Zr);if(i===null){let o=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,vr),o}return i}function Df(e,i,o=()=>[document.body]){Of(e,i,s=>{var c;return{containers:[...(c=s.containers)!=null?c:[],o]}})}function $f(e,i){return ct(i.type,Af,e,i)}let _f="div",Bf=de.RenderStrategy|de.Static;function zf(e,i){let o=Ft(),{id:s=`headlessui-dialog-${o}`,open:c,onClose:d,initialFocus:p,role:h="dialog",__demoMode:g=!1,...w}=e,[O,I]=n.useState(0),R=n.useRef(!1);h=function(){return h==="dialog"||h==="alertdialog"?h:(R.current||(R.current=!0,console.warn(`Invalid role [${h}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let N=cr();c===void 0&&N!==null&&(c=(N&jt.Open)===jt.Open);let L=n.useRef(null),P=xt(L,i),A=Jt(L),U=e.hasOwnProperty("open")||N!==null,z=e.hasOwnProperty("onClose");if(!U&&!z)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!U)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!z)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof c!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${c}`);if(typeof d!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${d}`);let X=c?0:1,[ae,oe]=n.useReducer($f,{titleId:null,descriptionId:null,panelRef:n.createRef()}),he=Q(()=>d(!1)),Ve=Q(ne=>oe({type:0,id:ne})),ze=hn()?g?!1:X===0:!1,ve=O>1,xe=n.useContext(Zr)!==null,[Se,De]=lf(),st={get current(){var ne;return(ne=ae.panelRef.current)!=null?ne:L.current}},{resolveContainers:ft,mainTreeNodeRef:Y,MainTreeNode:at}=Nf({portals:Se,defaultContainers:[st]}),_e=ve?"parent":"leaf",gt=N!==null?(N&jt.Closing)===jt.Closing:!1,ie=xe||gt?!1:ze,We=n.useCallback(()=>{var ne,ye;return(ye=Array.from((ne=A==null?void 0:A.querySelectorAll("body > *"))!=null?ne:[]).find(Qe=>Qe.id==="headlessui-portal-root"?!1:Qe.contains(Y.current)&&Qe instanceof HTMLElement))!=null?ye:null},[Y]);gi(We,ie);let lt=ve?!0:ze,Tt=n.useCallback(()=>{var ne,ye;return(ye=Array.from((ne=A==null?void 0:A.querySelectorAll("[data-headlessui-portal]"))!=null?ne:[]).find(Qe=>Qe.contains(Y.current)&&Qe instanceof HTMLElement))!=null?ye:null},[Y]);gi(Tt,lt),Rn(ft,ne=>{ne.preventDefault(),he()},!(!ze||ve));let Rt=!(ve||X!==0);ci(A==null?void 0:A.defaultView,"keydown",ne=>{Rt&&(ne.defaultPrevented||ne.key===qe.Escape&&(ne.preventDefault(),ne.stopPropagation(),he()))}),Df(A,!(gt||X!==0||xe),ft),n.useEffect(()=>{if(X!==0||!L.current)return;let ne=new ResizeObserver(ye=>{for(let Qe of ye){let zt=Qe.target.getBoundingClientRect();zt.x===0&&zt.y===0&&zt.width===0&&zt.height===0&&he()}});return ne.observe(L.current),()=>ne.disconnect()},[X,L,he]);let[yt,Le]=yi(),St=n.useMemo(()=>[{dialogState:X,close:he,setTitleId:Ve},ae],[X,ae,he,Ve]),Ke=n.useMemo(()=>({open:X===0}),[X]),At={ref:P,id:s,role:h,"aria-modal":X===0?!0:void 0,"aria-labelledby":ae.titleId,"aria-describedby":yt};return n.createElement(kf,{type:"Dialog",enabled:X===0,element:L,onUpdate:Q((ne,ye)=>{ye==="Dialog"&&ct(ne,{[Go.Add]:()=>I(Qe=>Qe+1),[Go.Remove]:()=>I(Qe=>Qe-1)})})},n.createElement(Wo,{force:!0},n.createElement(Uo,null,n.createElement(Zr.Provider,{value:St},n.createElement(Uo.Group,{target:L},n.createElement(Wo,{force:!1},n.createElement(Le,{slot:Ke,name:"Dialog.Description"},n.createElement(mr,{initialFocus:p,containers:ft,features:ze?ct(_e,{parent:mr.features.RestoreFocus,leaf:mr.features.All&~mr.features.FocusLock}):mr.features.None},n.createElement(De,null,pe({ourProps:At,theirProps:w,slot:Ke,defaultTag:_f,features:Bf,visible:X===0,name:"Dialog"}))))))))),n.createElement(at,null))}let Wf="div";function Hf(e,i){let o=Ft(),{id:s=`headlessui-dialog-overlay-${o}`,...c}=e,[{dialogState:d,close:p}]=vr("Dialog.Overlay"),h=xt(i),g=Q(O=>{if(O.target===O.currentTarget){if(Vr(O.currentTarget))return O.preventDefault();O.preventDefault(),O.stopPropagation(),p()}}),w=n.useMemo(()=>({open:d===0}),[d]);return pe({ourProps:{ref:h,id:s,"aria-hidden":!0,onClick:g},theirProps:c,slot:w,defaultTag:Wf,name:"Dialog.Overlay"})}let Uf="div";function Vf(e,i){let o=Ft(),{id:s=`headlessui-dialog-backdrop-${o}`,...c}=e,[{dialogState:d},p]=vr("Dialog.Backdrop"),h=xt(i);n.useEffect(()=>{if(p.panelRef.current===null)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")},[p.panelRef]);let g=n.useMemo(()=>({open:d===0}),[d]);return n.createElement(Wo,{force:!0},n.createElement(Uo,null,pe({ourProps:{ref:h,id:s,"aria-hidden":!0},theirProps:c,slot:g,defaultTag:Uf,name:"Dialog.Backdrop"})))}let Zf="div";function Yf(e,i){let o=Ft(),{id:s=`headlessui-dialog-panel-${o}`,...c}=e,[{dialogState:d},p]=vr("Dialog.Panel"),h=xt(i,p.panelRef),g=n.useMemo(()=>({open:d===0}),[d]),w=Q(O=>{O.stopPropagation()});return pe({ourProps:{ref:h,id:s,onClick:w},theirProps:c,slot:g,defaultTag:Zf,name:"Dialog.Panel"})}let Gf="h2";function qf(e,i){let o=Ft(),{id:s=`headlessui-dialog-title-${o}`,...c}=e,[{dialogState:d,setTitleId:p}]=vr("Dialog.Title"),h=xt(i);n.useEffect(()=>(p(s),()=>p(null)),[s,p]);let g=n.useMemo(()=>({open:d===0}),[d]);return pe({ourProps:{ref:h,id:s},theirProps:c,slot:g,defaultTag:Gf,name:"Dialog.Title"})}let Kf=be(zf),Xf=be(Vf),Jf=be(Yf),Qf=be(Hf),ep=be(qf),Ei=Object.assign(Kf,{Backdrop:Xf,Panel:Jf,Overlay:Qf,Title:ep,Description:wi}),Si=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Ci(e){var i,o;let s=(i=e.innerText)!=null?i:"",c=e.cloneNode(!0);if(!(c instanceof HTMLElement))return s;let d=!1;for(let h of c.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))h.remove(),d=!0;let p=d?(o=c.innerText)!=null?o:"":s;return Si.test(p)&&(p=p.replace(Si,"")),p}function tp(e){let i=e.getAttribute("aria-label");if(typeof i=="string")return i.trim();let o=e.getAttribute("aria-labelledby");if(o){let s=o.split(" ").map(c=>{let d=document.getElementById(c);if(d){let p=d.getAttribute("aria-label");return typeof p=="string"?p.trim():Ci(d).trim()}return null}).filter(Boolean);if(s.length>0)return s.join(", ")}return Ci(e).trim()}function np(e){let i=n.useRef(""),o=n.useRef("");return Q(()=>{let s=e.current;if(!s)return"";let c=s.innerText;if(i.current===c)return o.current;let d=tp(s).trim().toLowerCase();return i.current=c,o.current=d,d})}var rp=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(rp||{}),op=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(op||{}),lp=(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))(lp||{});function qo(e,i=o=>o){let o=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,s=Fn(i(e.items.slice()),d=>d.dataRef.current.domRef.current),c=o?s.indexOf(o):null;return c===-1&&(c=null),{items:s,activeItemIndex:c}}let ip={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,i)=>{var o;let s=qo(e),c=$o(i,{resolveItems:()=>s.items,resolveActiveIndex:()=>s.activeItemIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled});return{...e,...s,searchQuery:"",activeItemIndex:c,activationTrigger:(o=i.trigger)!=null?o:1}},3:(e,i)=>{let o=e.searchQuery!==""?0:1,s=e.searchQuery+i.value.toLowerCase(),c=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+o).concat(e.items.slice(0,e.activeItemIndex+o)):e.items).find(p=>{var h;return((h=p.dataRef.current.textValue)==null?void 0:h.startsWith(s))&&!p.dataRef.current.disabled}),d=c?e.items.indexOf(c):-1;return d===-1||d===e.activeItemIndex?{...e,searchQuery:s}:{...e,searchQuery:s,activeItemIndex:d,activationTrigger:1}},4(e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},5:(e,i)=>{let o=qo(e,s=>[...s,{id:i.id,dataRef:i.dataRef}]);return{...e,...o}},6:(e,i)=>{let o=qo(e,s=>{let c=s.findIndex(d=>d.id===i.id);return c!==-1&&s.splice(c,1),s});return{...e,...o,activationTrigger:1}}},Ko=n.createContext(null);Ko.displayName="MenuContext";function Yr(e){let i=n.useContext(Ko);if(i===null){let o=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,Yr),o}return i}function sp(e,i){return ct(i.type,ip,e,i)}let ap=n.Fragment;function up(e,i){let{__demoMode:o=!1,...s}=e,c=n.useReducer(sp,{__demoMode:o,menuState:o?0:1,buttonRef:n.createRef(),itemsRef:n.createRef(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:d,itemsRef:p,buttonRef:h},g]=c,w=xt(i);Rn([h,p],(N,L)=>{var P;g({type:1}),lr(L,or.Loose)||(N.preventDefault(),(P=h.current)==null||P.focus())},d===0);let O=Q(()=>{g({type:1})}),I=n.useMemo(()=>({open:d===0,close:O}),[d,O]),R={ref:w};return n.createElement(Ko.Provider,{value:c},n.createElement(Do,{value:ct(d,{0:jt.Open,1:jt.Closed})},pe({ourProps:R,theirProps:s,slot:I,defaultTag:ap,name:"Menu"})))}let cp="button";function dp(e,i){var o;let s=Ft(),{id:c=`headlessui-menu-button-${s}`,...d}=e,[p,h]=Yr("Menu.Button"),g=xt(p.buttonRef,i),w=Yt(),O=Q(P=>{switch(P.key){case qe.Space:case qe.Enter:case qe.ArrowDown:P.preventDefault(),P.stopPropagation(),h({type:0}),w.nextFrame(()=>h({type:2,focus:ot.First}));break;case qe.ArrowUp:P.preventDefault(),P.stopPropagation(),h({type:0}),w.nextFrame(()=>h({type:2,focus:ot.Last}));break}}),I=Q(P=>{switch(P.key){case qe.Space:P.preventDefault();break}}),R=Q(P=>{if(Vr(P.currentTarget))return P.preventDefault();e.disabled||(p.menuState===0?(h({type:1}),w.nextFrame(()=>{var A;return(A=p.buttonRef.current)==null?void 0:A.focus({preventScroll:!0})})):(P.preventDefault(),h({type:0})))}),N=n.useMemo(()=>({open:p.menuState===0}),[p]),L={ref:g,id:c,type:sr(e,p.buttonRef),"aria-haspopup":"menu","aria-controls":(o=p.itemsRef.current)==null?void 0:o.id,"aria-expanded":p.menuState===0,onKeyDown:O,onKeyUp:I,onClick:R};return pe({ourProps:L,theirProps:d,slot:N,defaultTag:cp,name:"Menu.Button"})}let fp="div",pp=de.RenderStrategy|de.Static;function mp(e,i){var o,s;let c=Ft(),{id:d=`headlessui-menu-items-${c}`,...p}=e,[h,g]=Yr("Menu.Items"),w=xt(h.itemsRef,i),O=Jt(h.itemsRef),I=Yt(),R=cr(),N=R!==null?(R&jt.Open)===jt.Open:h.menuState===0;n.useEffect(()=>{let z=h.itemsRef.current;z&&h.menuState===0&&z!==(O==null?void 0:O.activeElement)&&z.focus({preventScroll:!0})},[h.menuState,h.itemsRef,O]),S({container:h.itemsRef.current,enabled:h.menuState===0,accept(z){return z.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:z.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(z){z.setAttribute("role","none")}});let L=Q(z=>{var X,ae;switch(I.dispose(),z.key){case qe.Space:if(h.searchQuery!=="")return z.preventDefault(),z.stopPropagation(),g({type:3,value:z.key});case qe.Enter:if(z.preventDefault(),z.stopPropagation(),g({type:1}),h.activeItemIndex!==null){let{dataRef:oe}=h.items[h.activeItemIndex];(ae=(X=oe.current)==null?void 0:X.domRef.current)==null||ae.click()}$r(h.buttonRef.current);break;case qe.ArrowDown:return z.preventDefault(),z.stopPropagation(),g({type:2,focus:ot.Next});case qe.ArrowUp:return z.preventDefault(),z.stopPropagation(),g({type:2,focus:ot.Previous});case qe.Home:case qe.PageUp:return z.preventDefault(),z.stopPropagation(),g({type:2,focus:ot.First});case qe.End:case qe.PageDown:return z.preventDefault(),z.stopPropagation(),g({type:2,focus:ot.Last});case qe.Escape:z.preventDefault(),z.stopPropagation(),g({type:1}),_t().nextFrame(()=>{var oe;return(oe=h.buttonRef.current)==null?void 0:oe.focus({preventScroll:!0})});break;case qe.Tab:z.preventDefault(),z.stopPropagation(),g({type:1}),_t().nextFrame(()=>{vn(h.buttonRef.current,z.shiftKey?Ht.Previous:Ht.Next)});break;default:z.key.length===1&&(g({type:3,value:z.key}),I.setTimeout(()=>g({type:4}),350));break}}),P=Q(z=>{switch(z.key){case qe.Space:z.preventDefault();break}}),A=n.useMemo(()=>({open:h.menuState===0}),[h]),U={"aria-activedescendant":h.activeItemIndex===null||(o=h.items[h.activeItemIndex])==null?void 0:o.id,"aria-labelledby":(s=h.buttonRef.current)==null?void 0:s.id,id:d,onKeyDown:L,onKeyUp:P,role:"menu",tabIndex:0,ref:w};return pe({ourProps:U,theirProps:p,slot:A,defaultTag:fp,features:pp,visible:N,name:"Menu.Items"})}let hp=n.Fragment;function vp(e,i){let o=Ft(),{id:s=`headlessui-menu-item-${o}`,disabled:c=!1,...d}=e,[p,h]=Yr("Menu.Item"),g=p.activeItemIndex!==null?p.items[p.activeItemIndex].id===s:!1,w=n.useRef(null),O=xt(i,w);Pe(()=>{if(p.__demoMode||p.menuState!==0||!g||p.activationTrigger===0)return;let oe=_t();return oe.requestAnimationFrame(()=>{var he,Ve;(Ve=(he=w.current)==null?void 0:he.scrollIntoView)==null||Ve.call(he,{block:"nearest"})}),oe.dispose},[p.__demoMode,w,g,p.menuState,p.activationTrigger,p.activeItemIndex]);let I=np(w),R=n.useRef({disabled:c,domRef:w,get textValue(){return I()}});Pe(()=>{R.current.disabled=c},[R,c]),Pe(()=>(h({type:5,id:s,dataRef:R}),()=>h({type:6,id:s})),[R,s]);let N=Q(()=>{h({type:1})}),L=Q(oe=>{if(c)return oe.preventDefault();h({type:1}),$r(p.buttonRef.current)}),P=Q(()=>{if(c)return h({type:2,focus:ot.Nothing});h({type:2,focus:ot.Specific,id:s})}),A=Ur(),U=Q(oe=>A.update(oe)),z=Q(oe=>{A.wasMoved(oe)&&(c||g||h({type:2,focus:ot.Specific,id:s,trigger:0}))}),X=Q(oe=>{A.wasMoved(oe)&&(c||g&&h({type:2,focus:ot.Nothing}))}),ae=n.useMemo(()=>({active:g,disabled:c,close:N}),[g,c,N]);return pe({ourProps:{id:s,ref:O,role:"menuitem",tabIndex:c===!0?void 0:-1,"aria-disabled":c===!0?!0:void 0,disabled:void 0,onClick:L,onFocus:P,onPointerEnter:U,onMouseEnter:U,onPointerMove:z,onMouseMove:z,onPointerLeave:X,onMouseLeave:X},theirProps:d,slot:ae,defaultTag:hp,name:"Menu.Item"})}let gp=be(up),bp=be(dp),xp=be(mp),yp=be(vp),Gr=Object.assign(gp,{Button:bp,Items:xp,Item:yp}),ji=n.createContext(null);function Ti(){let e=n.useContext(ji);if(e===null){let i=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(i,Ti),i}return e}function wp(){let[e,i]=n.useState([]);return[e.length>0?e.join(" "):void 0,n.useMemo(()=>function(o){let s=Q(d=>(i(p=>[...p,d]),()=>i(p=>{let h=p.slice(),g=h.indexOf(d);return g!==-1&&h.splice(g,1),h}))),c=n.useMemo(()=>({register:s,slot:o.slot,name:o.name,props:o.props}),[s,o.slot,o.name,o.props]);return n.createElement(ji.Provider,{value:c},o.children)},[i])]}let Ep="label";function Sp(e,i){let o=Ft(),{id:s=`headlessui-label-${o}`,passive:c=!1,...d}=e,p=Ti(),h=xt(i);Pe(()=>p.register(s),[s,p.register]);let g={ref:h,...p.props,id:s};return c&&("onClick"in g&&(delete g.htmlFor,delete g.onClick),"onClick"in d&&delete d.onClick),pe({ourProps:g,theirProps:d,slot:p.slot||{},defaultTag:Ep,name:p.name||"Label"})}let Cp=be(Sp),jp=Object.assign(Cp,{});function Tp(e=0){let[i,o]=n.useState(e),s=fr(),c=n.useCallback(g=>{s.current&&o(w=>w|g)},[i,s]),d=n.useCallback(g=>!!(i&g),[i]),p=n.useCallback(g=>{s.current&&o(w=>w&~g)},[o,s]),h=n.useCallback(g=>{s.current&&o(w=>w^g)},[o]);return{flags:i,addFlag:c,hasFlag:d,removeFlag:p,toggleFlag:h}}let Xo=n.createContext(null);Xo.displayName="GroupContext";let Op=n.Fragment;function Np(e){var i;let[o,s]=n.useState(null),[c,d]=wp(),[p,h]=yi(),g=n.useMemo(()=>({switch:o,setSwitch:s,labelledby:c,describedby:p}),[o,s,c,p]),w={},O=e;return n.createElement(h,{name:"Switch.Description"},n.createElement(d,{name:"Switch.Label",props:{htmlFor:(i=g.switch)==null?void 0:i.id,onClick(I){o&&(I.currentTarget.tagName==="LABEL"&&I.preventDefault(),o.click(),o.focus({preventScroll:!0}))}}},n.createElement(Xo.Provider,{value:g},pe({ourProps:w,theirProps:O,defaultTag:Op,name:"Switch.Group"}))))}let Ip="button";function kp(e,i){var o;let s=Ft(),{id:c=`headlessui-switch-${s}`,checked:d,defaultChecked:p=!1,onChange:h,disabled:g=!1,name:w,value:O,form:I,...R}=e,N=n.useContext(Xo),L=n.useRef(null),P=xt(L,i,N===null?null:N.setSwitch),[A,U]=Qn(d,h,p),z=Q(()=>U==null?void 0:U(!A)),X=Q(ve=>{if(Vr(ve.currentTarget))return ve.preventDefault();ve.preventDefault(),z()}),ae=Q(ve=>{ve.key===qe.Space?(ve.preventDefault(),z()):ve.key===qe.Enter&&bd(ve.currentTarget)}),oe=Q(ve=>ve.preventDefault()),he=n.useMemo(()=>({checked:A}),[A]),Ve={id:c,ref:P,role:"switch",type:sr(e,L),tabIndex:e.tabIndex===-1?0:(o=e.tabIndex)!=null?o:0,"aria-checked":A,"aria-labelledby":N==null?void 0:N.labelledby,"aria-describedby":N==null?void 0:N.describedby,disabled:g,onClick:X,onKeyUp:ae,onKeyPress:oe},ze=Yt();return n.useEffect(()=>{var ve;let xe=(ve=L.current)==null?void 0:ve.closest("form");xe&&p!==void 0&&ze.addEventListener(xe,"reset",()=>{U(p)})},[L,U]),n.createElement(n.Fragment,null,w!=null&&A&&n.createElement(ur,{features:sn.Hidden,...vt({as:"input",type:"checkbox",hidden:!0,readOnly:!0,disabled:g,form:I,checked:A,name:w,value:O})}),pe({ourProps:Ve,theirProps:R,slot:he,defaultTag:Ip,name:"Switch"}))}let Pp=be(kp),Fp=Np,Mp=Object.assign(Pp,{Group:Fp,Label:jp,Description:wi});function Rp(e){let i={called:!1};return(...o)=>{if(!i.called)return i.called=!0,e(...o)}}function Jo(e,...i){e&&i.length>0&&e.classList.add(...i)}function Qo(e,...i){e&&i.length>0&&e.classList.remove(...i)}function Lp(e,i){let o=_t();if(!e)return o.dispose;let{transitionDuration:s,transitionDelay:c}=getComputedStyle(e),[d,p]=[s,c].map(g=>{let[w=0]=g.split(",").filter(Boolean).map(O=>O.includes("ms")?parseFloat(O):parseFloat(O)*1e3).sort((O,I)=>I-O);return w}),h=d+p;if(h!==0){o.group(w=>{w.setTimeout(()=>{i(),w.dispose()},h),w.addEventListener(e,"transitionrun",O=>{O.target===O.currentTarget&&w.dispose()})});let g=o.addEventListener(e,"transitionend",w=>{w.target===w.currentTarget&&(i(),g())})}else i();return o.add(()=>i()),o.dispose}function Ap(e,i,o,s){let c=o?"enter":"leave",d=_t(),p=s!==void 0?Rp(s):()=>{};c==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let h=ct(c,{enter:()=>i.enter,leave:()=>i.leave}),g=ct(c,{enter:()=>i.enterTo,leave:()=>i.leaveTo}),w=ct(c,{enter:()=>i.enterFrom,leave:()=>i.leaveFrom});return Qo(e,...i.base,...i.enter,...i.enterTo,...i.enterFrom,...i.leave,...i.leaveFrom,...i.leaveTo,...i.entered),Jo(e,...i.base,...h,...w),d.nextFrame(()=>{Qo(e,...i.base,...h,...w),Jo(e,...i.base,...h,...g),Lp(e,()=>(Qo(e,...i.base,...h),Jo(e,...i.base,...i.entered),p()))}),d.dispose}function Dp({immediate:e,container:i,direction:o,classes:s,onStart:c,onStop:d}){let p=fr(),h=Yt(),g=Pt(o);Pe(()=>{e&&(g.current="enter")},[e]),Pe(()=>{let w=_t();h.add(w.dispose);let O=i.current;if(O&&g.current!=="idle"&&p.current)return w.dispose(),c.current(g.current),w.add(Ap(O,s.current,g.current==="enter",()=>{w.dispose(),d.current(g.current)})),w.dispose},[o])}function bn(e=""){return e.split(/\s+/).filter(i=>i.length>1)}let qr=n.createContext(null);qr.displayName="TransitionContext";var $p=(e=>(e.Visible="visible",e.Hidden="hidden",e))($p||{});function _p(){let e=n.useContext(qr);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function Bp(){let e=n.useContext(Kr);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let Kr=n.createContext(null);Kr.displayName="NestingContext";function Xr(e){return"children"in e?Xr(e.children):e.current.filter(({el:i})=>i.current!==null).filter(({state:i})=>i==="visible").length>0}function Oi(e,i){let o=Pt(e),s=n.useRef([]),c=fr(),d=Yt(),p=Q((N,L=Me.Hidden)=>{let P=s.current.findIndex(({el:A})=>A===N);P!==-1&&(ct(L,{[Me.Unmount](){s.current.splice(P,1)},[Me.Hidden](){s.current[P].state="hidden"}}),d.microTask(()=>{var A;!Xr(s)&&c.current&&((A=o.current)==null||A.call(o))}))}),h=Q(N=>{let L=s.current.find(({el:P})=>P===N);return L?L.state!=="visible"&&(L.state="visible"):s.current.push({el:N,state:"visible"}),()=>p(N,Me.Unmount)}),g=n.useRef([]),w=n.useRef(Promise.resolve()),O=n.useRef({enter:[],leave:[],idle:[]}),I=Q((N,L,P)=>{g.current.splice(0),i&&(i.chains.current[L]=i.chains.current[L].filter(([A])=>A!==N)),i==null||i.chains.current[L].push([N,new Promise(A=>{g.current.push(A)})]),i==null||i.chains.current[L].push([N,new Promise(A=>{Promise.all(O.current[L].map(([U,z])=>z)).then(()=>A())})]),L==="enter"?w.current=w.current.then(()=>i==null?void 0:i.wait.current).then(()=>P(L)):P(L)}),R=Q((N,L,P)=>{Promise.all(O.current[L].splice(0).map(([A,U])=>U)).then(()=>{var A;(A=g.current.shift())==null||A()}).then(()=>P(L))});return n.useMemo(()=>({children:s,register:h,unregister:p,onStart:I,onStop:R,wait:w,chains:O}),[h,p,s,I,R,O,w])}function zp(){}let Wp=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Ni(e){var i;let o={};for(let s of Wp)o[s]=(i=e[s])!=null?i:zp;return o}function Hp(e){let i=n.useRef(Ni(e));return n.useEffect(()=>{i.current=Ni(e)},[e]),i}let Up="div",Ii=de.RenderStrategy;function Vp(e,i){var o,s;let{beforeEnter:c,afterEnter:d,beforeLeave:p,afterLeave:h,enter:g,enterFrom:w,enterTo:O,entered:I,leave:R,leaveFrom:N,leaveTo:L,...P}=e,A=n.useRef(null),U=xt(A,i),z=(o=P.unmount)==null||o?Me.Unmount:Me.Hidden,{show:X,appear:ae,initial:oe}=_p(),[he,Ve]=n.useState(X?"visible":"hidden"),ze=Bp(),{register:ve,unregister:xe}=ze;n.useEffect(()=>ve(A),[ve,A]),n.useEffect(()=>{if(z===Me.Hidden&&A.current){if(X&&he!=="visible"){Ve("visible");return}return ct(he,{hidden:()=>xe(A),visible:()=>ve(A)})}},[he,A,ve,xe,X,z]);let Se=Pt({base:bn(P.className),enter:bn(g),enterFrom:bn(w),enterTo:bn(O),entered:bn(I),leave:bn(R),leaveFrom:bn(N),leaveTo:bn(L)}),De=Hp({beforeEnter:c,afterEnter:d,beforeLeave:p,afterLeave:h}),st=hn();n.useEffect(()=>{if(st&&he==="visible"&&A.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[A,he,st]);let ft=oe&&!ae,Y=ae&&X&&oe,at=!st||ft?"idle":X?"enter":"leave",_e=Tp(0),gt=Q(yt=>ct(yt,{enter:()=>{_e.addFlag(jt.Opening),De.current.beforeEnter()},leave:()=>{_e.addFlag(jt.Closing),De.current.beforeLeave()},idle:()=>{}})),ie=Q(yt=>ct(yt,{enter:()=>{_e.removeFlag(jt.Opening),De.current.afterEnter()},leave:()=>{_e.removeFlag(jt.Closing),De.current.afterLeave()},idle:()=>{}})),We=Oi(()=>{Ve("hidden"),xe(A)},ze),lt=n.useRef(!1);Dp({immediate:Y,container:A,classes:Se,direction:at,onStart:Pt(yt=>{lt.current=!0,We.onStart(A,yt,gt)}),onStop:Pt(yt=>{lt.current=!1,We.onStop(A,yt,ie),yt==="leave"&&!Xr(We)&&(Ve("hidden"),xe(A))})});let Tt=P,Rt={ref:U};return Y?Tt={...Tt,className:J(P.className,...Se.current.enter,...Se.current.enterFrom)}:lt.current&&(Tt.className=J(P.className,(s=A.current)==null?void 0:s.className),Tt.className===""&&delete Tt.className),n.createElement(Kr.Provider,{value:We},n.createElement(Do,{value:ct(he,{visible:jt.Open,hidden:jt.Closed})|_e.flags},pe({ourProps:Rt,theirProps:Tt,defaultTag:Up,features:Ii,visible:he==="visible",name:"Transition.Child"})))}function Zp(e,i){let{show:o,appear:s=!1,unmount:c=!0,...d}=e,p=n.useRef(null),h=xt(p,i);hn();let g=cr();if(o===void 0&&g!==null&&(o=(g&jt.Open)===jt.Open),![!0,!1].includes(o))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[w,O]=n.useState(o?"visible":"hidden"),I=Oi(()=>{O("hidden")}),[R,N]=n.useState(!0),L=n.useRef([o]);Pe(()=>{R!==!1&&L.current[L.current.length-1]!==o&&(L.current.push(o),N(!1))},[L,o]);let P=n.useMemo(()=>({show:o,appear:s,initial:R}),[o,s,R]);n.useEffect(()=>{if(o)O("visible");else if(!Xr(I))O("hidden");else{let X=p.current;if(!X)return;let ae=X.getBoundingClientRect();ae.x===0&&ae.y===0&&ae.width===0&&ae.height===0&&O("hidden")}},[o,I]);let A={unmount:c},U=Q(()=>{var X;R&&N(!1),(X=e.beforeEnter)==null||X.call(e)}),z=Q(()=>{var X;R&&N(!1),(X=e.beforeLeave)==null||X.call(e)});return n.createElement(Kr.Provider,{value:I},n.createElement(qr.Provider,{value:P},pe({ourProps:{...A,as:n.Fragment,children:n.createElement(ki,{ref:h,...A,...d,beforeEnter:U,beforeLeave:z})},theirProps:{},defaultTag:n.Fragment,features:Ii,visible:w==="visible",name:"Transition"})))}function Yp(e,i){let o=n.useContext(qr)!==null,s=cr()!==null;return n.createElement(n.Fragment,null,!o&&s?n.createElement(el,{ref:i,...e}):n.createElement(ki,{ref:i,...e}))}let el=be(Zp),ki=be(Vp),Gp=be(Yp),Nn=Object.assign(el,{Child:Gp,Root:el});function qp({title:e,titleId:i,...o},s){return a.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:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.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 Kp=a.forwardRef(qp);function Xp({title:e,titleId:i,...o},s){return a.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:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.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 Jp=a.forwardRef(Xp);function Qp({title:e,titleId:i,...o},s){return a.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:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.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 em=a.forwardRef(Qp);function tm({title:e,titleId:i,...o},s){return a.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:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.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 nm=a.forwardRef(tm);function rm({title:e,titleId:i,...o},s){return a.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:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.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 om=a.forwardRef(rm);function lm({title:e,titleId:i,...o},s){return a.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:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.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 Pi=a.forwardRef(lm);function im({title:e,titleId:i,...o},s){return a.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:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.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 sm=a.forwardRef(im);function am({title:e,titleId:i,...o},s){return a.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:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.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 um=a.forwardRef(am);function cm({title:e,titleId:i,...o},s){return a.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:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.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 dm=a.forwardRef(cm),fm={warning:{color:"bg-yellow-50",icon:y.jsx(sm,{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:y.jsx(dm,{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:y.jsx(em,{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:y.jsx(um,{className:"h-5 w-5 text-blue-400","aria-hidden":"true"}),colorTitle:"text-blue-800",colorText:"text-blue-700"}},pm=({type:e="info",title:i,message:o,active:s=!1,time:c=1e3,onClose:d})=>{const[p,h]=n.useState(!1),g=n.useRef(null);n.useEffect(()=>(s&&(h(!0),g.current=setTimeout(()=>{h(!1),d&&d()},c)),()=>clearTimeout(g.current)),[s,c,d]);const w=fm[e];return p?y.jsx("div",{className:"fixed top-2.5 left-1/2 transform -translate-x-1/2 w-80 3xs:w-96 z-50",children:y.jsx(Nn,{as:n.Fragment,show:p,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:y.jsxs("div",{className:x("rounded-md p-4 text-center",w.color),children:[y.jsxs("div",{className:"flex justify-center flex-shrink-0",children:[w.icon,y.jsx("h3",{className:x("text-sm font-medium ml-3",w.colorTitle),children:i})]}),y.jsx("div",{className:x("mt-2 text-sm",w.colorText),children:y.jsx("p",{children:o})})]})})}):null};function mm({title:e,titleId:i,...o},s){return a.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:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.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 hm=a.forwardRef(mm);function vm({title:e,titleId:i,...o},s){return a.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:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.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 gm=a.forwardRef(vm);function bm({title:e,titleId:i,...o},s){return a.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:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.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"}),a.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 xm=a.forwardRef(bm);function ym({title:e,titleId:i,...o},s){return a.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:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.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 wm=a.forwardRef(ym);function Em({title:e,titleId:i,...o},s){return a.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:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.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 Sm=a.forwardRef(Em);function Cm({title:e,titleId:i,...o},s){return a.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:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.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 jm=a.forwardRef(Cm),Tm=({src:e,alt:i,width:o,height:s,className:c="",classNameIcon:d="",isIcon:p=!0,acronym:h=""})=>{function g(){if(typeof h!="string")return h;const w=h.toLowerCase(),O=w.split(" "),I=O[O.length-1];return w.charAt(0)+I.charAt(0)}return y.jsx(y.Fragment,{children:e?y.jsx("img",{src:e,alt:i,width:o,height:s,className:x(c!==""&&c),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s"},onLoad:w=>w.currentTarget.style.filter="none","data-testid":"img"}):p?y.jsx(Sm,{className:x("bg-white text-default-5",d!==""?d:"w-7 h-7")}):y.jsx("div",{className:x("bg-gray-200 text-default-5 rounded-full font-bold uppercase flex justify-center items-center",d!==""?d:"w-7 h-7"),children:g()})})},Om=({steps:e,onClick:i})=>{const[o,s]=n.useState(0),c=d=>{s(d),i(d)};return y.jsx("nav",{className:"flex items-center justify-center w-full","aria-label":"Progress","data-testid":"bullets",children:y.jsx("ol",{role:"list",className:"flex items-center space-x-5",children:new Array(e).fill(1).map((d,p)=>y.jsx("li",{children:o!==p?y.jsx("div",{className:"cursor-pointer block h-2.5 w-2.5 rounded-full bg-gray-500 hover:bg-gray-600",onClick:()=>c(p),"data-testid":`step-${p}`,children:y.jsx("span",{className:"sr-only",children:"step"})}):y.jsxs("div",{className:"relative flex items-center justify-center cursor-pointer","aria-current":"step",children:[y.jsx("span",{className:"absolute flex h-5 w-5 p-px","aria-hidden":"true",children:y.jsx("span",{className:"h-full w-full rounded-full bg-gray-300"})}),y.jsx("span",{className:"relative block h-2.5 w-2.5 rounded-full bg-gray-500","aria-hidden":"true"}),y.jsx("span",{className:"sr-only",children:"step"})]})},p))})})};var Fi={exports:{}};/*!
|
|
65
|
+
`));let A=O.props,N=typeof(A==null?void 0:A.className)=="function"?(...F)=>Q(A==null?void 0:A.className(...F),b.className):Q(A==null?void 0:A.className,b.className),D=N?{className:N}:{};return n.cloneElement(O,Object.assign({},Rt(O.props,bt($t(b,["ref"]))),k,S,{ref:c(O.ref,S.ref)},D))}return n.createElement(d,Object.assign({},$t(b,["ref"]),d!==n.Fragment&&S,d!==n.Fragment&&k),O)}function Be(...t){return t.every(l=>l==null)?void 0:l=>{for(let i of t)i!=null&&(typeof i=="function"?i(l):i.current=l)}}function Rt(...t){if(t.length===0)return{};if(t.length===1)return t[0];let l={},i={};for(let s of t)for(let c in s)c.startsWith("on")&&typeof s[c]=="function"?(i[c]!=null||(i[c]=[]),i[c].push(s[c])):l[c]=s[c];if(l.disabled||l["aria-disabled"])return Object.assign(l,Object.fromEntries(Object.keys(i).map(s=>[s,void 0])));for(let s in i)Object.assign(l,{[s](c,...d){let p=i[s];for(let h of p){if((c instanceof Event||(c==null?void 0:c.nativeEvent)instanceof Event)&&c.defaultPrevented)return;h(c,...d)}}});return l}function Ee(t){var l;return Object.assign(n.forwardRef(t),{displayName:(l=t.displayName)!=null?l:t.name})}function bt(t){let l=Object.assign({},t);for(let i in l)l[i]===void 0&&delete l[i];return l}function $t(t,l=[]){let i=Object.assign({},t);for(let s of l)s in i&&delete i[s];return i}let gn="div";var an=(t=>(t[t.None=1]="None",t[t.Focusable=2]="Focusable",t[t.Hidden=4]="Hidden",t))(an||{});function qt(t,l){var i;let{features:s=1,...c}=t,d={ref:l,"aria-hidden":(s&2)===2?!0:(i=c["aria-hidden"])!=null?i:void 0,hidden:(s&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",...(s&4)===4&&(s&2)!==2&&{display:"none"}}};return he({ourProps:d,theirProps:c,slot:{},defaultTag:gn,name:"Hidden"})}let cr=Ee(qt),_o=n.createContext(null);_o.displayName="OpenClosedContext";var Ot=(t=>(t[t.Open=1]="Open",t[t.Closed=2]="Closed",t[t.Closing=4]="Closing",t[t.Opening=8]="Opening",t))(Ot||{});function dr(){return n.useContext(_o)}function Bo({value:t,children:l}){return n.createElement(_o.Provider,{value:t},l)}function Ed(t){function l(){document.readyState!=="loading"&&(t(),document.removeEventListener("DOMContentLoaded",l))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",l),l())}let en=[];Ed(()=>{function t(l){l.target instanceof HTMLElement&&l.target!==document.body&&en[0]!==l.target&&(en.unshift(l.target),en=en.filter(i=>i!=null&&i.isConnected),en.splice(10))}window.addEventListener("click",t,{capture:!0}),window.addEventListener("mousedown",t,{capture:!0}),window.addEventListener("focus",t,{capture:!0}),document.body.addEventListener("click",t,{capture:!0}),document.body.addEventListener("mousedown",t,{capture:!0}),document.body.addEventListener("focus",t,{capture:!0})});function Zr(t){let l=t.parentElement,i=null;for(;l&&!(l instanceof HTMLFieldSetElement);)l instanceof HTMLLegendElement&&(i=l),l=l.parentElement;let s=(l==null?void 0:l.getAttribute("disabled"))==="";return s&&Sd(i)?!1:s}function Sd(t){if(!t)return!1;let l=t.previousElementSibling;for(;l!==null;){if(l instanceof HTMLLegendElement)return!1;l=l.previousElementSibling}return!0}function Cd(t){throw new Error("Unexpected object: "+t)}var ut=(t=>(t[t.First=0]="First",t[t.Previous=1]="Previous",t[t.Next=2]="Next",t[t.Last=3]="Last",t[t.Specific=4]="Specific",t[t.Nothing=5]="Nothing",t))(ut||{});function zo(t,l){let i=l.resolveItems();if(i.length<=0)return null;let s=l.resolveActiveIndex(),c=s??-1;switch(t.focus){case 0:{for(let d=0;d<i.length;++d)if(!l.resolveDisabled(i[d],d,i))return d;return s}case 1:{for(let d=c-1;d>=0;--d)if(!l.resolveDisabled(i[d],d,i))return d;return s}case 2:{for(let d=c+1;d<i.length;++d)if(!l.resolveDisabled(i[d],d,i))return d;return s}case 3:{for(let d=i.length-1;d>=0;--d)if(!l.resolveDisabled(i[d],d,i))return d;return s}case 4:{for(let d=0;d<i.length;++d)if(l.resolveId(i[d],d,i)===t.id)return d;return s}case 5:return null;default:Cd(t)}}function fl(t={},l=null,i=[]){for(let[s,c]of Object.entries(t))ml(i,pl(l,s),c);return i}function pl(t,l){return t?t+"["+l+"]":l}function ml(t,l,i){if(Array.isArray(i))for(let[s,c]of i.entries())ml(t,pl(l,s.toString()),c);else i instanceof Date?t.push([l,i.toISOString()]):typeof i=="boolean"?t.push([l,i?"1":"0"]):typeof i=="string"?t.push([l,i]):typeof i=="number"?t.push([l,`${i}`]):i==null?t.push([l,""]):fl(i,l,t)}function jd(t){var l,i;let s=(l=t==null?void 0:t.form)!=null?l:t.closest("form");if(s){for(let c of s.elements)if(c!==t&&(c.tagName==="INPUT"&&c.type==="submit"||c.tagName==="BUTTON"&&c.type==="submit"||c.nodeName==="INPUT"&&c.type==="image")){c.click();return}(i=s.requestSubmit)==null||i.call(s)}}var Qe=(t=>(t.Space=" ",t.Enter="Enter",t.Escape="Escape",t.Backspace="Backspace",t.Delete="Delete",t.ArrowLeft="ArrowLeft",t.ArrowUp="ArrowUp",t.ArrowRight="ArrowRight",t.ArrowDown="ArrowDown",t.Home="Home",t.End="End",t.PageUp="PageUp",t.PageDown="PageDown",t.Tab="Tab",t))(Qe||{}),Td=(t=>(t[t.Open=0]="Open",t[t.Closed=1]="Closed",t))(Td||{}),Od=(t=>(t[t.Single=0]="Single",t[t.Multi=1]="Multi",t))(Od||{}),Nd=(t=>(t[t.Pointer=0]="Pointer",t[t.Focus=1]="Focus",t[t.Other=2]="Other",t))(Nd||{}),kd=(t=>(t[t.OpenCombobox=0]="OpenCombobox",t[t.CloseCombobox=1]="CloseCombobox",t[t.GoToOption=2]="GoToOption",t[t.RegisterOption=3]="RegisterOption",t[t.UnregisterOption=4]="UnregisterOption",t[t.RegisterLabel=5]="RegisterLabel",t[t.SetActivationTrigger=6]="SetActivationTrigger",t[t.UpdateVirtualOptions=7]="UpdateVirtualOptions",t))(kd||{});function Wo(t,l=i=>i){let i=t.activeOptionIndex!==null?t.options[t.activeOptionIndex]:null,s=l(t.options.slice()),c=s.length>0&&s[0].dataRef.current.order!==null?s.sort((p,h)=>p.dataRef.current.order-h.dataRef.current.order):Pn(s,p=>p.dataRef.current.domRef.current),d=i?c.indexOf(i):null;return d===-1&&(d=null),{options:c,activeOptionIndex:d}}let Id={1(t){var l;return(l=t.dataRef.current)!=null&&l.disabled||t.comboboxState===1?t:{...t,activeOptionIndex:null,comboboxState:1}},0(t){var l,i;if((l=t.dataRef.current)!=null&&l.disabled||t.comboboxState===0)return t;if((i=t.dataRef.current)!=null&&i.value){let s=t.dataRef.current.calculateIndex(t.dataRef.current.value);if(s!==-1)return{...t,activeOptionIndex:s,comboboxState:0}}return{...t,comboboxState:0}},2(t,l){var i,s,c,d,p;if((i=t.dataRef.current)!=null&&i.disabled||(s=t.dataRef.current)!=null&&s.optionsRef.current&&!((c=t.dataRef.current)!=null&&c.optionsPropsRef.current.static)&&t.comboboxState===1)return t;if(t.virtual){let O=l.focus===ut.Specific?l.idx:zo(l,{resolveItems:()=>t.virtual.options,resolveActiveIndex:()=>{var A,N;return(N=(A=t.activeOptionIndex)!=null?A:t.virtual.options.findIndex(D=>!t.virtual.disabled(D)))!=null?N:null},resolveDisabled:t.virtual.disabled,resolveId(){throw new Error("Function not implemented.")}}),k=(d=l.trigger)!=null?d:2;return t.activeOptionIndex===O&&t.activationTrigger===k?t:{...t,activeOptionIndex:O,activationTrigger:k}}let h=Wo(t);if(h.activeOptionIndex===null){let O=h.options.findIndex(k=>!k.dataRef.current.disabled);O!==-1&&(h.activeOptionIndex=O)}let b=l.focus===ut.Specific?l.idx:zo(l,{resolveItems:()=>h.options,resolveActiveIndex:()=>h.activeOptionIndex,resolveId:O=>O.id,resolveDisabled:O=>O.dataRef.current.disabled}),S=(p=l.trigger)!=null?p:2;return t.activeOptionIndex===b&&t.activationTrigger===S?t:{...t,...h,activeOptionIndex:b,activationTrigger:S}},3:(t,l)=>{var i,s,c;if((i=t.dataRef.current)!=null&&i.virtual)return{...t,options:[...t.options,l.payload]};let d=l.payload,p=Wo(t,b=>(b.push(d),b));t.activeOptionIndex===null&&(s=t.dataRef.current)!=null&&s.isSelected(l.payload.dataRef.current.value)&&(p.activeOptionIndex=p.options.indexOf(d));let h={...t,...p,activationTrigger:2};return(c=t.dataRef.current)!=null&&c.__demoMode&&t.dataRef.current.value===void 0&&(h.activeOptionIndex=0),h},4:(t,l)=>{var i;if((i=t.dataRef.current)!=null&&i.virtual)return{...t,options:t.options.filter(c=>c.id!==l.id)};let s=Wo(t,c=>{let d=c.findIndex(p=>p.id===l.id);return d!==-1&&c.splice(d,1),c});return{...t,...s,activationTrigger:2}},5:(t,l)=>t.labelId===l.id?t:{...t,labelId:l.id},6:(t,l)=>t.activationTrigger===l.trigger?t:{...t,activationTrigger:l.trigger},7:(t,l)=>{var i;if(((i=t.virtual)==null?void 0:i.options)===l.options)return t;let s=t.activeOptionIndex;if(t.activeOptionIndex!==null){let c=l.options.indexOf(t.virtual.options[t.activeOptionIndex]);c!==-1?s=c:s=null}return{...t,activeOptionIndex:s,virtual:Object.assign({},t.virtual,{options:l.options})}}},Ho=n.createContext(null);Ho.displayName="ComboboxActionsContext";function fr(t){let l=n.useContext(Ho);if(l===null){let i=new Error(`<${t} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(i,fr),i}return l}let hl=n.createContext(null);function Md(t){var l;let i=Tn("VirtualProvider"),[s,c]=n.useMemo(()=>{let b=i.optionsRef.current;if(!b)return[0,0];let S=window.getComputedStyle(b);return[parseFloat(S.paddingBlockStart||S.paddingTop),parseFloat(S.paddingBlockEnd||S.paddingBottom)]},[i.optionsRef.current]),d=Ge({scrollPaddingStart:s,scrollPaddingEnd:c,count:i.virtual.options.length,estimateSize(){return 40},getScrollElement(){var b;return(b=i.optionsRef.current)!=null?b:null},overscan:12}),[p,h]=n.useState(0);return Fe(()=>{h(b=>b+1)},[(l=i.virtual)==null?void 0:l.options]),n.createElement(hl.Provider,{value:d},n.createElement("div",{style:{position:"relative",width:"100%",height:`${d.getTotalSize()}px`},ref:b=>{if(b){if(typeof process<"u"&&process.env.JEST_WORKER_ID!==void 0||i.activationTrigger===0)return;i.activeOptionIndex!==null&&i.virtual.options.length>i.activeOptionIndex&&d.scrollToIndex(i.activeOptionIndex)}}},d.getVirtualItems().map(b=>{var S;return n.createElement(n.Fragment,{key:b.key},n.cloneElement((S=t.children)==null?void 0:S.call(t,{option:i.virtual.options[b.index],open:i.comboboxState===0}),{key:`${p}-${b.key}`,"data-index":b.index,"aria-setsize":i.virtual.options.length,"aria-posinset":b.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${b.start}px)`,overflowAnchor:"none"}}))})))}let Uo=n.createContext(null);Uo.displayName="ComboboxDataContext";function Tn(t){let l=n.useContext(Uo);if(l===null){let i=new Error(`<${t} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(i,Tn),i}return l}function Pd(t,l){return pt(l.type,Id,t,l)}let Fd=n.Fragment;function Rd(t,l){let{value:i,defaultValue:s,onChange:c,form:d,name:p,by:h=null,disabled:b=!1,__demoMode:S=!1,nullable:O=!1,multiple:k=!1,immediate:A=!1,virtual:N=null,...D}=t,F=!1,$=null,[U=k?[]:void 0,W]=er(i,c,s),[J,de]=n.useReducer(Pd,{dataRef:n.createRef(),comboboxState:S?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),ae=n.useRef(!1),be=n.useRef({static:!1,hold:!1}),Ke=n.useRef(null),Ue=n.useRef(null),xe=n.useRef(null),Se=n.useRef(null),Ie=ee(typeof h=="string"?(ie,Ce)=>{let ot=h;return(ie==null?void 0:ie[ot])===(Ce==null?void 0:Ce[ot])}:h??((ie,Ce)=>ie===Ce)),ze=ee(ie=>J.options.findIndex(Ce=>Ie(Ce.dataRef.current.value,ie))),dt=n.useCallback(ie=>pt(G.mode,{1:()=>U.some(Ce=>Ie(Ce,ie)),0:()=>Ie(U,ie)}),[U]),ht=ee(ie=>J.activeOptionIndex===ze(ie)),G=n.useMemo(()=>({...J,immediate:F,optionsPropsRef:be,labelRef:Ke,inputRef:Ue,buttonRef:xe,optionsRef:Se,value:U,defaultValue:s,disabled:b,mode:k?1:0,virtual:J.virtual,get activeOptionIndex(){if(ae.current&&J.activeOptionIndex===null&&J.options.length>0){let ie=J.options.findIndex(Ce=>!Ce.dataRef.current.disabled);if(ie!==-1)return ie}return J.activeOptionIndex},calculateIndex:ze,compare:Ie,isSelected:dt,isActive:ht,nullable:O,__demoMode:S}),[U,s,b,k,O,S,J,$]);Fe(()=>{},[$,void 0]),Fe(()=>{J.dataRef.current=G},[G]),Rn([G.buttonRef,G.inputRef,G.optionsRef],()=>De.closeCombobox(),G.comboboxState===0);let ft=n.useMemo(()=>{var ie,Ce,ot;return{open:G.comboboxState===0,disabled:b,activeIndex:G.activeOptionIndex,activeOption:G.activeOptionIndex===null?null:G.virtual?G.virtual.options[(ie=G.activeOptionIndex)!=null?ie:0]:(ot=(Ce=G.options[G.activeOptionIndex])==null?void 0:Ce.dataRef.current.value)!=null?ot:null,value:U}},[G,b,U]),We=ee(()=>{if(G.activeOptionIndex!==null){if(G.virtual)Lt(G.virtual.options[G.activeOptionIndex]);else{let{dataRef:ie}=G.options[G.activeOptionIndex];Lt(ie.current.value)}De.goToOption(ut.Specific,G.activeOptionIndex)}}),xt=ee(()=>{de({type:0}),ae.current=!0}),ce=ee(()=>{de({type:1}),ae.current=!1}),Ve=ee((ie,Ce,ot)=>(ae.current=!1,ie===ut.Specific?de({type:2,focus:ut.Specific,idx:Ce,trigger:ot}):de({type:2,focus:ie,trigger:ot}))),ct=ee((ie,Ce)=>(de({type:3,payload:{id:ie,dataRef:Ce}}),()=>{G.isActive(Ce.current.value)&&(ae.current=!0),de({type:4,id:ie})})),Nt=ee(ie=>(de({type:5,id:ie}),()=>de({type:5,id:null}))),Lt=ee(ie=>pt(G.mode,{0(){return W==null?void 0:W(ie)},1(){let Ce=G.value.slice(),ot=Ce.findIndex(zt=>Ie(zt,ie));return ot===-1?Ce.push(ie):Ce.splice(ot,1),W==null?void 0:W(Ce)}})),Et=ee(ie=>{de({type:6,trigger:ie})}),De=n.useMemo(()=>({onChange:Lt,registerOption:ct,registerLabel:Nt,goToOption:Ve,closeCombobox:ce,openCombobox:xt,setActivationTrigger:Et,selectActiveOption:We}),[]),jt=l===null?{}:{ref:l},tt=n.useRef(null),At=Gt();return n.useEffect(()=>{tt.current&&s!==void 0&&At.addEventListener(tt.current,"reset",()=>{W==null||W(s)})},[tt,W]),n.createElement(Ho.Provider,{value:De},n.createElement(Uo.Provider,{value:G},n.createElement(Bo,{value:pt(G.comboboxState,{0:Ot.Open,1:Ot.Closed})},p!=null&&U!=null&&fl({[p]:U}).map(([ie,Ce],ot)=>n.createElement(cr,{features:an.Hidden,ref:ot===0?zt=>{var Ln;tt.current=(Ln=zt==null?void 0:zt.closest("form"))!=null?Ln:null}:void 0,...bt({key:ie,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:d,disabled:b,name:ie,value:Ce})})),he({ourProps:jt,theirProps:D,slot:ft,defaultTag:Fd,name:"Combobox"}))))}let Ld="input";function Ad(t,l){var i,s,c,d,p;let h=Ft(),{id:b=`headlessui-combobox-input-${h}`,onChange:S,displayValue:O,type:k="text",...A}=t,N=Tn("Combobox.Input"),D=fr("Combobox.Input"),F=wt(N.inputRef,l),$=Qt(N.inputRef),U=n.useRef(!1),W=Gt(),J=ee(()=>{D.onChange(null),N.optionsRef.current&&(N.optionsRef.current.scrollTop=0),D.goToOption(ut.Nothing)}),de=function(){var G;return typeof O=="function"&&N.value!==void 0?(G=O(N.value))!=null?G:"":typeof N.value=="string"?N.value:""}();H(([G,ft],[We,xt])=>{if(U.current)return;let ce=N.inputRef.current;ce&&((xt===0&&ft===1||G!==We)&&(ce.value=G),requestAnimationFrame(()=>{if(U.current||!ce||($==null?void 0:$.activeElement)!==ce)return;let{selectionStart:Ve,selectionEnd:ct}=ce;Math.abs((ct??0)-(Ve??0))===0&&Ve===0&&ce.setSelectionRange(ce.value.length,ce.value.length)}))},[de,N.comboboxState,$]),H(([G],[ft])=>{if(G===0&&ft===1){if(U.current)return;let We=N.inputRef.current;if(!We)return;let xt=We.value,{selectionStart:ce,selectionEnd:Ve,selectionDirection:ct}=We;We.value="",We.value=xt,ct!==null?We.setSelectionRange(ce,Ve,ct):We.setSelectionRange(ce,Ve)}},[N.comboboxState]);let ae=n.useRef(!1),be=ee(()=>{ae.current=!0}),Ke=ee(()=>{W.nextFrame(()=>{ae.current=!1})}),Ue=ee(G=>{switch(U.current=!0,G.key){case Qe.Enter:if(U.current=!1,N.comboboxState!==0||ae.current)return;if(G.preventDefault(),G.stopPropagation(),N.activeOptionIndex===null){D.closeCombobox();return}D.selectActiveOption(),N.mode===0&&D.closeCombobox();break;case Qe.ArrowDown:return U.current=!1,G.preventDefault(),G.stopPropagation(),pt(N.comboboxState,{0:()=>D.goToOption(ut.Next),1:()=>D.openCombobox()});case Qe.ArrowUp:return U.current=!1,G.preventDefault(),G.stopPropagation(),pt(N.comboboxState,{0:()=>D.goToOption(ut.Previous),1:()=>{D.openCombobox(),W.nextFrame(()=>{N.value||D.goToOption(ut.Last)})}});case Qe.Home:if(G.shiftKey)break;return U.current=!1,G.preventDefault(),G.stopPropagation(),D.goToOption(ut.First);case Qe.PageUp:return U.current=!1,G.preventDefault(),G.stopPropagation(),D.goToOption(ut.First);case Qe.End:if(G.shiftKey)break;return U.current=!1,G.preventDefault(),G.stopPropagation(),D.goToOption(ut.Last);case Qe.PageDown:return U.current=!1,G.preventDefault(),G.stopPropagation(),D.goToOption(ut.Last);case Qe.Escape:return U.current=!1,N.comboboxState!==0?void 0:(G.preventDefault(),N.optionsRef.current&&!N.optionsPropsRef.current.static&&G.stopPropagation(),N.nullable&&N.mode===0&&N.value===null&&J(),D.closeCombobox());case Qe.Tab:if(U.current=!1,N.comboboxState!==0)return;N.mode===0&&N.activationTrigger!==1&&D.selectActiveOption(),D.closeCombobox();break}}),xe=ee(G=>{S==null||S(G),N.nullable&&N.mode===0&&G.target.value===""&&J(),D.openCombobox()}),Se=ee(G=>{var ft,We,xt;let ce=(ft=G.relatedTarget)!=null?ft:en.find(Ve=>Ve!==G.currentTarget);if(U.current=!1,!((We=N.optionsRef.current)!=null&&We.contains(ce))&&!((xt=N.buttonRef.current)!=null&&xt.contains(ce))&&N.comboboxState===0)return G.preventDefault(),N.mode===0&&(N.nullable&&N.value===null?J():N.activationTrigger!==1&&D.selectActiveOption()),D.closeCombobox()}),Ie=ee(G=>{var ft,We,xt;let ce=(ft=G.relatedTarget)!=null?ft:en.find(Ve=>Ve!==G.currentTarget);(We=N.buttonRef.current)!=null&&We.contains(ce)||(xt=N.optionsRef.current)!=null&&xt.contains(ce)||N.disabled||N.immediate&&N.comboboxState!==0&&(D.openCombobox(),W.nextFrame(()=>{D.setActivationTrigger(1)}))}),ze=Zt(()=>{if(N.labelId)return[N.labelId].join(" ")},[N.labelId]),dt=n.useMemo(()=>({open:N.comboboxState===0,disabled:N.disabled}),[N]),ht={ref:F,id:b,role:"combobox",type:k,"aria-controls":(i=N.optionsRef.current)==null?void 0:i.id,"aria-expanded":N.comboboxState===0,"aria-activedescendant":N.activeOptionIndex===null?void 0:N.virtual?(s=N.options.find(G=>{var ft;return!((ft=N.virtual)!=null&&ft.disabled(G.dataRef.current.value))&&N.compare(G.dataRef.current.value,N.virtual.options[N.activeOptionIndex])}))==null?void 0:s.id:(c=N.options[N.activeOptionIndex])==null?void 0:c.id,"aria-labelledby":ze,"aria-autocomplete":"list",defaultValue:(p=(d=t.defaultValue)!=null?d:N.defaultValue!==void 0?O==null?void 0:O(N.defaultValue):null)!=null?p:N.defaultValue,disabled:N.disabled,onCompositionStart:be,onCompositionEnd:Ke,onKeyDown:Ue,onChange:xe,onFocus:Ie,onBlur:Se};return he({ourProps:ht,theirProps:A,slot:dt,defaultTag:Ld,name:"Combobox.Input"})}let Dd="button";function $d(t,l){var i;let s=Tn("Combobox.Button"),c=fr("Combobox.Button"),d=wt(s.buttonRef,l),p=Ft(),{id:h=`headlessui-combobox-button-${p}`,...b}=t,S=Gt(),O=ee(F=>{switch(F.key){case Qe.ArrowDown:return F.preventDefault(),F.stopPropagation(),s.comboboxState===1&&c.openCombobox(),S.nextFrame(()=>{var $;return($=s.inputRef.current)==null?void 0:$.focus({preventScroll:!0})});case Qe.ArrowUp:return F.preventDefault(),F.stopPropagation(),s.comboboxState===1&&(c.openCombobox(),S.nextFrame(()=>{s.value||c.goToOption(ut.Last)})),S.nextFrame(()=>{var $;return($=s.inputRef.current)==null?void 0:$.focus({preventScroll:!0})});case Qe.Escape:return s.comboboxState!==0?void 0:(F.preventDefault(),s.optionsRef.current&&!s.optionsPropsRef.current.static&&F.stopPropagation(),c.closeCombobox(),S.nextFrame(()=>{var $;return($=s.inputRef.current)==null?void 0:$.focus({preventScroll:!0})}));default:return}}),k=ee(F=>{if(Zr(F.currentTarget))return F.preventDefault();s.comboboxState===0?c.closeCombobox():(F.preventDefault(),c.openCombobox()),S.nextFrame(()=>{var $;return($=s.inputRef.current)==null?void 0:$.focus({preventScroll:!0})})}),A=Zt(()=>{if(s.labelId)return[s.labelId,h].join(" ")},[s.labelId,h]),N=n.useMemo(()=>({open:s.comboboxState===0,disabled:s.disabled,value:s.value}),[s]),D={ref:d,id:h,type:ar(t,s.buttonRef),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(i=s.optionsRef.current)==null?void 0:i.id,"aria-expanded":s.comboboxState===0,"aria-labelledby":A,disabled:s.disabled,onClick:k,onKeyDown:O};return he({ourProps:D,theirProps:b,slot:N,defaultTag:Dd,name:"Combobox.Button"})}let _d="label";function Bd(t,l){let i=Ft(),{id:s=`headlessui-combobox-label-${i}`,...c}=t,d=Tn("Combobox.Label"),p=fr("Combobox.Label"),h=wt(d.labelRef,l);Fe(()=>p.registerLabel(s),[s]);let b=ee(()=>{var O;return(O=d.inputRef.current)==null?void 0:O.focus({preventScroll:!0})}),S=n.useMemo(()=>({open:d.comboboxState===0,disabled:d.disabled}),[d]);return he({ourProps:{ref:h,id:s,onClick:b},theirProps:c,slot:S,defaultTag:_d,name:"Combobox.Label"})}let zd="ul",Wd=me.RenderStrategy|me.Static;function Hd(t,l){let i=Ft(),{id:s=`headlessui-combobox-options-${i}`,hold:c=!1,...d}=t,p=Tn("Combobox.Options"),h=wt(p.optionsRef,l),b=dr(),S=b!==null?(b&Ot.Open)===Ot.Open:p.comboboxState===0;Fe(()=>{var N;p.optionsPropsRef.current.static=(N=t.static)!=null?N:!1},[p.optionsPropsRef,t.static]),Fe(()=>{p.optionsPropsRef.current.hold=c},[p.optionsPropsRef,c]),j({container:p.optionsRef.current,enabled:p.comboboxState===0,accept(N){return N.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:N.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(N){N.setAttribute("role","none")}});let O=Zt(()=>{var N,D;return(D=p.labelId)!=null?D:(N=p.buttonRef.current)==null?void 0:N.id},[p.labelId,p.buttonRef.current]),k=n.useMemo(()=>({open:p.comboboxState===0,option:void 0}),[p]),A={"aria-labelledby":O,role:"listbox","aria-multiselectable":p.mode===1?!0:void 0,id:s,ref:h};return p.virtual&&p.comboboxState===0&&Object.assign(d,{children:n.createElement(Md,null,d.children)}),he({ourProps:A,theirProps:d,slot:k,defaultTag:zd,features:Wd,visible:S,name:"Combobox.Options"})}let Ud="li";function Vd(t,l){var i;let s=Ft(),{id:c=`headlessui-combobox-option-${s}`,disabled:d=!1,value:p,order:h=null,...b}=t,S=Tn("Combobox.Option"),O=fr("Combobox.Option"),k=S.virtual?S.activeOptionIndex===S.calculateIndex(p):S.activeOptionIndex===null?!1:((i=S.options[S.activeOptionIndex])==null?void 0:i.id)===c,A=S.isSelected(p),N=n.useRef(null),D=Pt({disabled:d,value:p,domRef:N,order:h}),F=n.useContext(hl),$=wt(l,N,F?F.measureElement:null),U=ee(()=>O.onChange(p));Fe(()=>O.registerOption(c,D),[D,c]);let W=n.useRef(!(S.virtual||S.__demoMode));Fe(()=>{if(!S.virtual||!S.__demoMode)return;let Se=_t();return Se.requestAnimationFrame(()=>{W.current=!0}),Se.dispose},[S.virtual,S.__demoMode]),Fe(()=>{if(!W.current||S.comboboxState!==0||!k||S.activationTrigger===0)return;let Se=_t();return Se.requestAnimationFrame(()=>{var Ie,ze;(ze=(Ie=N.current)==null?void 0:Ie.scrollIntoView)==null||ze.call(Ie,{block:"nearest"})}),Se.dispose},[N,k,S.comboboxState,S.activationTrigger,S.activeOptionIndex]);let J=ee(Se=>{var Ie;if(d||(Ie=S.virtual)!=null&&Ie.disabled(p))return Se.preventDefault();U(),Wr()||requestAnimationFrame(()=>{var ze;return(ze=S.inputRef.current)==null?void 0:ze.focus({preventScroll:!0})}),S.mode===0&&requestAnimationFrame(()=>O.closeCombobox())}),de=ee(()=>{var Se;if(d||(Se=S.virtual)!=null&&Se.disabled(p))return O.goToOption(ut.Nothing);let Ie=S.calculateIndex(p);O.goToOption(ut.Specific,Ie)}),ae=Yr(),be=ee(Se=>ae.update(Se)),Ke=ee(Se=>{var Ie;if(!ae.wasMoved(Se)||d||(Ie=S.virtual)!=null&&Ie.disabled(p)||k)return;let ze=S.calculateIndex(p);O.goToOption(ut.Specific,ze,0)}),Ue=ee(Se=>{var Ie;ae.wasMoved(Se)&&(d||(Ie=S.virtual)!=null&&Ie.disabled(p)||k&&(S.optionsPropsRef.current.hold||O.goToOption(ut.Nothing)))}),xe=n.useMemo(()=>({active:k,selected:A,disabled:d}),[k,A,d]);return he({ourProps:{id:c,ref:$,role:"option",tabIndex:d===!0?void 0:-1,"aria-disabled":d===!0?!0:void 0,"aria-selected":A,disabled:void 0,onClick:J,onFocus:de,onPointerEnter:be,onMouseEnter:be,onPointerMove:Ke,onMouseMove:Ke,onPointerLeave:Ue,onMouseLeave:Ue},theirProps:b,slot:xe,defaultTag:Ud,name:"Combobox.Option"})}let Yd=Ee(Rd),Zd=Ee($d),Gd=Ee(Ad),qd=Ee(Bd),Kd=Ee(Hd),Xd=Ee(Vd),un=Object.assign(Yd,{Input:Gd,Button:Zd,Label:qd,Options:Kd,Option:Xd});function vl(t,l,i,s){let c=Pt(i);n.useEffect(()=>{t=t??window;function d(p){c.current(p)}return t.addEventListener(l,d,s),()=>t.removeEventListener(l,d,s)},[t,l,s])}function pr(){let t=n.useRef(!1);return Fe(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function gl(t){let l=ee(t),i=n.useRef(!1);n.useEffect(()=>(i.current=!1,()=>{i.current=!0,ln(()=>{i.current&&l()})}),[l])}var mr=(t=>(t[t.Forwards=0]="Forwards",t[t.Backwards=1]="Backwards",t))(mr||{});function Jd(){let t=n.useRef(0);return Hr("keydown",l=>{l.key==="Tab"&&(t.current=l.shiftKey?1:0)},!0),t}function bl(t){if(!t)return new Set;if(typeof t=="function")return new Set(t());let l=new Set;for(let i of t.current)i.current instanceof HTMLElement&&l.add(i.current);return l}let Qd="div";var xl=(t=>(t[t.None=1]="None",t[t.InitialFocus=2]="InitialFocus",t[t.TabLock=4]="TabLock",t[t.FocusLock=8]="FocusLock",t[t.RestoreFocus=16]="RestoreFocus",t[t.All=30]="All",t))(xl||{});function ef(t,l){let i=n.useRef(null),s=wt(i,l),{initialFocus:c,containers:d,features:p=30,...h}=t;hn()||(p=1);let b=Qt(i);rf({ownerDocument:b},!!(p&16));let S=of({ownerDocument:b,container:i,initialFocus:c},!!(p&2));lf({ownerDocument:b,container:i,containers:d,previousActiveElement:S},!!(p&8));let O=Jd(),k=ee(F=>{let $=i.current;$&&(U=>U())(()=>{pt(O.current,{[mr.Forwards]:()=>{sn($,Ht.First,{skipElements:[F.relatedTarget]})},[mr.Backwards]:()=>{sn($,Ht.Last,{skipElements:[F.relatedTarget]})}})})}),A=Gt(),N=n.useRef(!1),D={ref:s,onKeyDown(F){F.key=="Tab"&&(N.current=!0,A.requestAnimationFrame(()=>{N.current=!1}))},onBlur(F){let $=bl(d);i.current instanceof HTMLElement&&$.add(i.current);let U=F.relatedTarget;U instanceof HTMLElement&&U.dataset.headlessuiFocusGuard!=="true"&&(yl($,U)||(N.current?sn(i.current,pt(O.current,{[mr.Forwards]:()=>Ht.Next,[mr.Backwards]:()=>Ht.Previous})|Ht.WrapAround,{relativeTo:F.target}):F.target instanceof HTMLElement&&Jt(F.target)))}};return n.createElement(n.Fragment,null,!!(p&4)&&n.createElement(cr,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:k,features:an.Focusable}),he({ourProps:D,theirProps:h,defaultTag:Qd,name:"FocusTrap"}),!!(p&4)&&n.createElement(cr,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:k,features:an.Focusable}))}let tf=Ee(ef),hr=Object.assign(tf,{features:xl});function nf(t=!0){let l=n.useRef(en.slice());return H(([i],[s])=>{s===!0&&i===!1&&ln(()=>{l.current.splice(0)}),s===!1&&i===!0&&(l.current=en.slice())},[t,en,l]),ee(()=>{var i;return(i=l.current.find(s=>s!=null&&s.isConnected))!=null?i:null})}function rf({ownerDocument:t},l){let i=nf(l);H(()=>{l||(t==null?void 0:t.activeElement)===(t==null?void 0:t.body)&&Jt(i())},[l]),gl(()=>{l&&Jt(i())})}function of({ownerDocument:t,container:l,initialFocus:i},s){let c=n.useRef(null),d=pr();return H(()=>{if(!s)return;let p=l.current;p&&ln(()=>{if(!d.current)return;let h=t==null?void 0:t.activeElement;if(i!=null&&i.current){if((i==null?void 0:i.current)===h){c.current=h;return}}else if(p.contains(h)){c.current=h;return}i!=null&&i.current?Jt(i.current):sn(p,Ht.First)===rr.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),c.current=t==null?void 0:t.activeElement})},[s]),c}function lf({ownerDocument:t,container:l,containers:i,previousActiveElement:s},c){let d=pr();vl(t==null?void 0:t.defaultView,"focus",p=>{if(!c||!d.current)return;let h=bl(i);l.current instanceof HTMLElement&&h.add(l.current);let b=s.current;if(!b)return;let S=p.target;S&&S instanceof HTMLElement?yl(h,S)?(s.current=S,Jt(S)):(p.preventDefault(),p.stopPropagation(),Jt(b)):Jt(s.current)},!0)}function yl(t,l){for(let i of t)if(i.contains(l))return!0;return!1}let wl=n.createContext(!1);function sf(){return n.useContext(wl)}function Vo(t){return n.createElement(wl.Provider,{value:t.force},t.children)}function af(t){let l=sf(),i=n.useContext(El),s=Qt(t),[c,d]=n.useState(()=>{if(!l&&i!==null||Me.isServer)return null;let p=s==null?void 0:s.getElementById("headlessui-portal-root");if(p)return p;if(s===null)return null;let h=s.createElement("div");return h.setAttribute("id","headlessui-portal-root"),s.body.appendChild(h)});return n.useEffect(()=>{c!==null&&(s!=null&&s.body.contains(c)||s==null||s.body.appendChild(c))},[c,s]),n.useEffect(()=>{l||i!==null&&d(i.current)},[i,d,l]),c}let uf=n.Fragment;function cf(t,l){let i=t,s=n.useRef(null),c=wt($o(O=>{s.current=O}),l),d=Qt(s),p=af(s),[h]=n.useState(()=>{var O;return Me.isServer?null:(O=d==null?void 0:d.createElement("div"))!=null?O:null}),b=n.useContext(Yo),S=hn();return Fe(()=>{!p||!h||p.contains(h)||(h.setAttribute("data-headlessui-portal",""),p.appendChild(h))},[p,h]),Fe(()=>{if(h&&b)return b.register(h)},[b,h]),gl(()=>{var O;!p||!h||(h instanceof Node&&p.contains(h)&&p.removeChild(h),p.childNodes.length<=0&&((O=p.parentElement)==null||O.removeChild(p)))}),S?!p||!h?null:u.createPortal(he({ourProps:{ref:c},theirProps:i,defaultTag:uf,name:"Portal"}),h):null}let df=n.Fragment,El=n.createContext(null);function ff(t,l){let{target:i,...s}=t,c={ref:wt(l)};return n.createElement(El.Provider,{value:i},he({ourProps:c,theirProps:s,defaultTag:df,name:"Popover.Group"}))}let Yo=n.createContext(null);function pf(){let t=n.useContext(Yo),l=n.useRef([]),i=ee(d=>(l.current.push(d),t&&t.register(d),()=>s(d))),s=ee(d=>{let p=l.current.indexOf(d);p!==-1&&l.current.splice(p,1),t&&t.unregister(d)}),c=n.useMemo(()=>({register:i,unregister:s,portals:l}),[i,s,l]);return[l,n.useMemo(()=>function({children:d}){return n.createElement(Yo.Provider,{value:c},d)},[c])]}let mf=Ee(cf),hf=Ee(ff),Zo=Object.assign(mf,{Group:hf});function vf(t,l){return t===l&&(t!==0||1/t===1/l)||t!==t&&l!==l}const gf=typeof Object.is=="function"?Object.is:vf,{useState:bf,useEffect:xf,useLayoutEffect:yf,useDebugValue:wf}=a;function Ef(t,l,i){const s=l(),[{inst:c},d]=bf({inst:{value:s,getSnapshot:l}});return yf(()=>{c.value=s,c.getSnapshot=l,Go(c)&&d({inst:c})},[t,s,l]),xf(()=>(Go(c)&&d({inst:c}),t(()=>{Go(c)&&d({inst:c})})),[t]),wf(s),s}function Go(t){const l=t.getSnapshot,i=t.value;try{const s=l();return!gf(i,s)}catch{return!0}}function Sf(t,l,i){return l()}const Cf=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",jf=!Cf,Tf=jf?Sf:Ef,Of="useSyncExternalStore"in a?(t=>t.useSyncExternalStore)(a):Tf;function Nf(t){return Of(t.subscribe,t.getSnapshot,t.getSnapshot)}function kf(t,l){let i=t(),s=new Set;return{getSnapshot(){return i},subscribe(c){return s.add(c),()=>s.delete(c)},dispatch(c,...d){let p=l[c].call(i,...d);p&&(i=p,s.forEach(h=>h()))}}}function If(){let t;return{before({doc:l}){var i;let s=l.documentElement;t=((i=l.defaultView)!=null?i:window).innerWidth-s.clientWidth},after({doc:l,d:i}){let s=l.documentElement,c=s.clientWidth-s.offsetWidth,d=t-c;i.style(s,"paddingRight",`${d}px`)}}}function Mf(){return Fn()?{before({doc:t,d:l,meta:i}){function s(c){return i.containers.flatMap(d=>d()).some(d=>d.contains(c))}l.microTask(()=>{var c;if(window.getComputedStyle(t.documentElement).scrollBehavior!=="auto"){let h=_t();h.style(t.documentElement,"scrollBehavior","auto"),l.add(()=>l.microTask(()=>h.dispose()))}let d=(c=window.scrollY)!=null?c:window.pageYOffset,p=null;l.addEventListener(t,"click",h=>{if(h.target instanceof HTMLElement)try{let b=h.target.closest("a");if(!b)return;let{hash:S}=new URL(b.href),O=t.querySelector(S);O&&!s(O)&&(p=O)}catch{}},!0),l.addEventListener(t,"touchstart",h=>{if(h.target instanceof HTMLElement)if(s(h.target)){let b=h.target;for(;b.parentElement&&s(b.parentElement);)b=b.parentElement;l.style(b,"overscrollBehavior","contain")}else l.style(h.target,"touchAction","none")}),l.addEventListener(t,"touchmove",h=>{if(h.target instanceof HTMLElement)if(s(h.target)){let b=h.target;for(;b.parentElement&&b.dataset.headlessuiPortal!==""&&!(b.scrollHeight>b.clientHeight||b.scrollWidth>b.clientWidth);)b=b.parentElement;b.dataset.headlessuiPortal===""&&h.preventDefault()}else h.preventDefault()},{passive:!1}),l.add(()=>{var h;let b=(h=window.scrollY)!=null?h:window.pageYOffset;d!==b&&window.scrollTo(0,d),p&&p.isConnected&&(p.scrollIntoView({block:"nearest"}),p=null)})})}}:{}}function Pf(){return{before({doc:t,d:l}){l.style(t.documentElement,"overflow","hidden")}}}function Ff(t){let l={};for(let i of t)Object.assign(l,i(l));return l}let On=kf(()=>new Map,{PUSH(t,l){var i;let s=(i=this.get(t))!=null?i:{doc:t,count:0,d:_t(),meta:new Set};return s.count++,s.meta.add(l),this.set(t,s),this},POP(t,l){let i=this.get(t);return i&&(i.count--,i.meta.delete(l)),this},SCROLL_PREVENT({doc:t,d:l,meta:i}){let s={doc:t,d:l,meta:Ff(i)},c=[Mf(),If(),Pf()];c.forEach(({before:d})=>d==null?void 0:d(s)),c.forEach(({after:d})=>d==null?void 0:d(s))},SCROLL_ALLOW({d:t}){t.dispose()},TEARDOWN({doc:t}){this.delete(t)}});On.subscribe(()=>{let t=On.getSnapshot(),l=new Map;for(let[i]of t)l.set(i,i.documentElement.style.overflow);for(let i of t.values()){let s=l.get(i.doc)==="hidden",c=i.count!==0;(c&&!s||!c&&s)&&On.dispatch(i.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",i),i.count===0&&On.dispatch("TEARDOWN",i)}});function Rf(t,l,i){let s=Nf(On),c=t?s.get(t):void 0,d=c?c.count>0:!1;return Fe(()=>{if(!(!t||!l))return On.dispatch("PUSH",t,i),()=>On.dispatch("POP",t,i)},[l,t]),d}let qo=new Map,vr=new Map;function Sl(t,l=!0){Fe(()=>{var i;if(!l)return;let s=typeof t=="function"?t():t.current;if(!s)return;function c(){var p;if(!s)return;let h=(p=vr.get(s))!=null?p:1;if(h===1?vr.delete(s):vr.set(s,h-1),h!==1)return;let b=qo.get(s);b&&(b["aria-hidden"]===null?s.removeAttribute("aria-hidden"):s.setAttribute("aria-hidden",b["aria-hidden"]),s.inert=b.inert,qo.delete(s))}let d=(i=vr.get(s))!=null?i:0;return vr.set(s,d+1),d!==0||(qo.set(s,{"aria-hidden":s.getAttribute("aria-hidden"),inert:s.inert}),s.setAttribute("aria-hidden","true"),s.inert=!0),c},[t,l])}function Lf({defaultContainers:t=[],portals:l,mainTreeNodeRef:i}={}){var s;let c=n.useRef((s=i==null?void 0:i.current)!=null?s:null),d=Qt(c),p=ee(()=>{var h,b,S;let O=[];for(let k of t)k!==null&&(k instanceof HTMLElement?O.push(k):"current"in k&&k.current instanceof HTMLElement&&O.push(k.current));if(l!=null&&l.current)for(let k of l.current)O.push(k);for(let k of(h=d==null?void 0:d.querySelectorAll("html > *, body > *"))!=null?h:[])k!==document.body&&k!==document.head&&k instanceof HTMLElement&&k.id!=="headlessui-portal-root"&&(k.contains(c.current)||k.contains((S=(b=c.current)==null?void 0:b.getRootNode())==null?void 0:S.host)||O.some(A=>k.contains(A))||O.push(k));return O});return{resolveContainers:p,contains:ee(h=>p().some(b=>b.contains(h))),mainTreeNodeRef:c,MainTreeNode:n.useMemo(()=>function(){return i!=null?null:n.createElement(cr,{features:an.Hidden,ref:c})},[c,i])}}let Ko=n.createContext(()=>{});Ko.displayName="StackContext";var Xo=(t=>(t[t.Add=0]="Add",t[t.Remove=1]="Remove",t))(Xo||{});function Af(){return n.useContext(Ko)}function Df({children:t,onUpdate:l,type:i,element:s,enabled:c}){let d=Af(),p=ee((...h)=>{l==null||l(...h),d(...h)});return Fe(()=>{let h=c===void 0||c===!0;return h&&p(0,i,s),()=>{h&&p(1,i,s)}},[p,i,s,c]),n.createElement(Ko.Provider,{value:p},t)}let Cl=n.createContext(null);function jl(){let t=n.useContext(Cl);if(t===null){let l=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(l,jl),l}return t}function Tl(){let[t,l]=n.useState([]);return[t.length>0?t.join(" "):void 0,n.useMemo(()=>function(i){let s=ee(d=>(l(p=>[...p,d]),()=>l(p=>{let h=p.slice(),b=h.indexOf(d);return b!==-1&&h.splice(b,1),h}))),c=n.useMemo(()=>({register:s,slot:i.slot,name:i.name,props:i.props}),[s,i.slot,i.name,i.props]);return n.createElement(Cl.Provider,{value:c},i.children)},[l])]}let $f="p";function _f(t,l){let i=Ft(),{id:s=`headlessui-description-${i}`,...c}=t,d=jl(),p=wt(l);Fe(()=>d.register(s),[s,d.register]);let h={ref:p,...d.props,id:s};return he({ourProps:h,theirProps:c,slot:d.slot||{},defaultTag:$f,name:d.name||"Description"})}let Bf=Ee(_f),Ol=Object.assign(Bf,{});var zf=(t=>(t[t.Open=0]="Open",t[t.Closed=1]="Closed",t))(zf||{}),Wf=(t=>(t[t.SetTitleId=0]="SetTitleId",t))(Wf||{});let Hf={0(t,l){return t.titleId===l.id?t:{...t,titleId:l.id}}},Gr=n.createContext(null);Gr.displayName="DialogContext";function gr(t){let l=n.useContext(Gr);if(l===null){let i=new Error(`<${t} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(i,gr),i}return l}function Uf(t,l,i=()=>[document.body]){Rf(t,l,s=>{var c;return{containers:[...(c=s.containers)!=null?c:[],i]}})}function Vf(t,l){return pt(l.type,Hf,t,l)}let Yf="div",Zf=me.RenderStrategy|me.Static;function Gf(t,l){let i=Ft(),{id:s=`headlessui-dialog-${i}`,open:c,onClose:d,initialFocus:p,role:h="dialog",__demoMode:b=!1,...S}=t,[O,k]=n.useState(0),A=n.useRef(!1);h=function(){return h==="dialog"||h==="alertdialog"?h:(A.current||(A.current=!0,console.warn(`Invalid role [${h}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let N=dr();c===void 0&&N!==null&&(c=(N&Ot.Open)===Ot.Open);let D=n.useRef(null),F=wt(D,l),$=Qt(D),U=t.hasOwnProperty("open")||N!==null,W=t.hasOwnProperty("onClose");if(!U&&!W)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!U)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!W)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof c!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${c}`);if(typeof d!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${d}`);let J=c?0:1,[de,ae]=n.useReducer(Vf,{titleId:null,descriptionId:null,panelRef:n.createRef()}),be=ee(()=>d(!1)),Ke=ee(ie=>ae({type:0,id:ie})),Ue=hn()?b?!1:J===0:!1,xe=O>1,Se=n.useContext(Gr)!==null,[Ie,ze]=pf(),dt={get current(){var ie;return(ie=de.panelRef.current)!=null?ie:D.current}},{resolveContainers:ht,mainTreeNodeRef:G,MainTreeNode:ft}=Lf({portals:Ie,defaultContainers:[dt]}),We=xe?"parent":"leaf",xt=N!==null?(N&Ot.Closing)===Ot.Closing:!1,ce=Se||xt?!1:Ue,Ve=n.useCallback(()=>{var ie,Ce;return(Ce=Array.from((ie=$==null?void 0:$.querySelectorAll("body > *"))!=null?ie:[]).find(ot=>ot.id==="headlessui-portal-root"?!1:ot.contains(G.current)&&ot instanceof HTMLElement))!=null?Ce:null},[G]);Sl(Ve,ce);let ct=xe?!0:Ue,Nt=n.useCallback(()=>{var ie,Ce;return(Ce=Array.from((ie=$==null?void 0:$.querySelectorAll("[data-headlessui-portal]"))!=null?ie:[]).find(ot=>ot.contains(G.current)&&ot instanceof HTMLElement))!=null?Ce:null},[G]);Sl(Nt,ct),Rn(ht,ie=>{ie.preventDefault(),be()},!(!Ue||xe));let Lt=!(xe||J!==0);vl($==null?void 0:$.defaultView,"keydown",ie=>{Lt&&(ie.defaultPrevented||ie.key===Qe.Escape&&(ie.preventDefault(),ie.stopPropagation(),be()))}),Uf($,!(xt||J!==0||Se),ht),n.useEffect(()=>{if(J!==0||!D.current)return;let ie=new ResizeObserver(Ce=>{for(let ot of Ce){let zt=ot.target.getBoundingClientRect();zt.x===0&&zt.y===0&&zt.width===0&&zt.height===0&&be()}});return ie.observe(D.current),()=>ie.disconnect()},[J,D,be]);let[Et,De]=Tl(),jt=n.useMemo(()=>[{dialogState:J,close:be,setTitleId:Ke},de],[J,de,be,Ke]),tt=n.useMemo(()=>({open:J===0}),[J]),At={ref:F,id:s,role:h,"aria-modal":J===0?!0:void 0,"aria-labelledby":de.titleId,"aria-describedby":Et};return n.createElement(Df,{type:"Dialog",enabled:J===0,element:D,onUpdate:ee((ie,Ce)=>{Ce==="Dialog"&&pt(ie,{[Xo.Add]:()=>k(ot=>ot+1),[Xo.Remove]:()=>k(ot=>ot-1)})})},n.createElement(Vo,{force:!0},n.createElement(Zo,null,n.createElement(Gr.Provider,{value:jt},n.createElement(Zo.Group,{target:D},n.createElement(Vo,{force:!1},n.createElement(De,{slot:tt,name:"Dialog.Description"},n.createElement(hr,{initialFocus:p,containers:ht,features:Ue?pt(We,{parent:hr.features.RestoreFocus,leaf:hr.features.All&~hr.features.FocusLock}):hr.features.None},n.createElement(ze,null,he({ourProps:At,theirProps:S,slot:tt,defaultTag:Yf,features:Zf,visible:J===0,name:"Dialog"}))))))))),n.createElement(ft,null))}let qf="div";function Kf(t,l){let i=Ft(),{id:s=`headlessui-dialog-overlay-${i}`,...c}=t,[{dialogState:d,close:p}]=gr("Dialog.Overlay"),h=wt(l),b=ee(O=>{if(O.target===O.currentTarget){if(Zr(O.currentTarget))return O.preventDefault();O.preventDefault(),O.stopPropagation(),p()}}),S=n.useMemo(()=>({open:d===0}),[d]);return he({ourProps:{ref:h,id:s,"aria-hidden":!0,onClick:b},theirProps:c,slot:S,defaultTag:qf,name:"Dialog.Overlay"})}let Xf="div";function Jf(t,l){let i=Ft(),{id:s=`headlessui-dialog-backdrop-${i}`,...c}=t,[{dialogState:d},p]=gr("Dialog.Backdrop"),h=wt(l);n.useEffect(()=>{if(p.panelRef.current===null)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")},[p.panelRef]);let b=n.useMemo(()=>({open:d===0}),[d]);return n.createElement(Vo,{force:!0},n.createElement(Zo,null,he({ourProps:{ref:h,id:s,"aria-hidden":!0},theirProps:c,slot:b,defaultTag:Xf,name:"Dialog.Backdrop"})))}let Qf="div";function ep(t,l){let i=Ft(),{id:s=`headlessui-dialog-panel-${i}`,...c}=t,[{dialogState:d},p]=gr("Dialog.Panel"),h=wt(l,p.panelRef),b=n.useMemo(()=>({open:d===0}),[d]),S=ee(O=>{O.stopPropagation()});return he({ourProps:{ref:h,id:s,onClick:S},theirProps:c,slot:b,defaultTag:Qf,name:"Dialog.Panel"})}let tp="h2";function np(t,l){let i=Ft(),{id:s=`headlessui-dialog-title-${i}`,...c}=t,[{dialogState:d,setTitleId:p}]=gr("Dialog.Title"),h=wt(l);n.useEffect(()=>(p(s),()=>p(null)),[s,p]);let b=n.useMemo(()=>({open:d===0}),[d]);return he({ourProps:{ref:h,id:s},theirProps:c,slot:b,defaultTag:tp,name:"Dialog.Title"})}let rp=Ee(Gf),op=Ee(Jf),ip=Ee(ep),lp=Ee(Kf),sp=Ee(np),Nl=Object.assign(rp,{Backdrop:op,Panel:ip,Overlay:lp,Title:sp,Description:Ol}),kl=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Il(t){var l,i;let s=(l=t.innerText)!=null?l:"",c=t.cloneNode(!0);if(!(c instanceof HTMLElement))return s;let d=!1;for(let h of c.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))h.remove(),d=!0;let p=d?(i=c.innerText)!=null?i:"":s;return kl.test(p)&&(p=p.replace(kl,"")),p}function ap(t){let l=t.getAttribute("aria-label");if(typeof l=="string")return l.trim();let i=t.getAttribute("aria-labelledby");if(i){let s=i.split(" ").map(c=>{let d=document.getElementById(c);if(d){let p=d.getAttribute("aria-label");return typeof p=="string"?p.trim():Il(d).trim()}return null}).filter(Boolean);if(s.length>0)return s.join(", ")}return Il(t).trim()}function up(t){let l=n.useRef(""),i=n.useRef("");return ee(()=>{let s=t.current;if(!s)return"";let c=s.innerText;if(l.current===c)return i.current;let d=ap(s).trim().toLowerCase();return l.current=c,i.current=d,d})}var cp=(t=>(t[t.Open=0]="Open",t[t.Closed=1]="Closed",t))(cp||{}),dp=(t=>(t[t.Pointer=0]="Pointer",t[t.Other=1]="Other",t))(dp||{}),fp=(t=>(t[t.OpenMenu=0]="OpenMenu",t[t.CloseMenu=1]="CloseMenu",t[t.GoToItem=2]="GoToItem",t[t.Search=3]="Search",t[t.ClearSearch=4]="ClearSearch",t[t.RegisterItem=5]="RegisterItem",t[t.UnregisterItem=6]="UnregisterItem",t))(fp||{});function Jo(t,l=i=>i){let i=t.activeItemIndex!==null?t.items[t.activeItemIndex]:null,s=Pn(l(t.items.slice()),d=>d.dataRef.current.domRef.current),c=i?s.indexOf(i):null;return c===-1&&(c=null),{items:s,activeItemIndex:c}}let pp={1(t){return t.menuState===1?t:{...t,activeItemIndex:null,menuState:1}},0(t){return t.menuState===0?t:{...t,__demoMode:!1,menuState:0}},2:(t,l)=>{var i;let s=Jo(t),c=zo(l,{resolveItems:()=>s.items,resolveActiveIndex:()=>s.activeItemIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled});return{...t,...s,searchQuery:"",activeItemIndex:c,activationTrigger:(i=l.trigger)!=null?i:1}},3:(t,l)=>{let i=t.searchQuery!==""?0:1,s=t.searchQuery+l.value.toLowerCase(),c=(t.activeItemIndex!==null?t.items.slice(t.activeItemIndex+i).concat(t.items.slice(0,t.activeItemIndex+i)):t.items).find(p=>{var h;return((h=p.dataRef.current.textValue)==null?void 0:h.startsWith(s))&&!p.dataRef.current.disabled}),d=c?t.items.indexOf(c):-1;return d===-1||d===t.activeItemIndex?{...t,searchQuery:s}:{...t,searchQuery:s,activeItemIndex:d,activationTrigger:1}},4(t){return t.searchQuery===""?t:{...t,searchQuery:"",searchActiveItemIndex:null}},5:(t,l)=>{let i=Jo(t,s=>[...s,{id:l.id,dataRef:l.dataRef}]);return{...t,...i}},6:(t,l)=>{let i=Jo(t,s=>{let c=s.findIndex(d=>d.id===l.id);return c!==-1&&s.splice(c,1),s});return{...t,...i,activationTrigger:1}}},Qo=n.createContext(null);Qo.displayName="MenuContext";function qr(t){let l=n.useContext(Qo);if(l===null){let i=new Error(`<${t} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(i,qr),i}return l}function mp(t,l){return pt(l.type,pp,t,l)}let hp=n.Fragment;function vp(t,l){let{__demoMode:i=!1,...s}=t,c=n.useReducer(mp,{__demoMode:i,menuState:i?0:1,buttonRef:n.createRef(),itemsRef:n.createRef(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:d,itemsRef:p,buttonRef:h},b]=c,S=wt(l);Rn([h,p],(N,D)=>{var F;b({type:1}),lr(D,ir.Loose)||(N.preventDefault(),(F=h.current)==null||F.focus())},d===0);let O=ee(()=>{b({type:1})}),k=n.useMemo(()=>({open:d===0,close:O}),[d,O]),A={ref:S};return n.createElement(Qo.Provider,{value:c},n.createElement(Bo,{value:pt(d,{0:Ot.Open,1:Ot.Closed})},he({ourProps:A,theirProps:s,slot:k,defaultTag:hp,name:"Menu"})))}let gp="button";function bp(t,l){var i;let s=Ft(),{id:c=`headlessui-menu-button-${s}`,...d}=t,[p,h]=qr("Menu.Button"),b=wt(p.buttonRef,l),S=Gt(),O=ee(F=>{switch(F.key){case Qe.Space:case Qe.Enter:case Qe.ArrowDown:F.preventDefault(),F.stopPropagation(),h({type:0}),S.nextFrame(()=>h({type:2,focus:ut.First}));break;case Qe.ArrowUp:F.preventDefault(),F.stopPropagation(),h({type:0}),S.nextFrame(()=>h({type:2,focus:ut.Last}));break}}),k=ee(F=>{switch(F.key){case Qe.Space:F.preventDefault();break}}),A=ee(F=>{if(Zr(F.currentTarget))return F.preventDefault();t.disabled||(p.menuState===0?(h({type:1}),S.nextFrame(()=>{var $;return($=p.buttonRef.current)==null?void 0:$.focus({preventScroll:!0})})):(F.preventDefault(),h({type:0})))}),N=n.useMemo(()=>({open:p.menuState===0}),[p]),D={ref:b,id:c,type:ar(t,p.buttonRef),"aria-haspopup":"menu","aria-controls":(i=p.itemsRef.current)==null?void 0:i.id,"aria-expanded":p.menuState===0,onKeyDown:O,onKeyUp:k,onClick:A};return he({ourProps:D,theirProps:d,slot:N,defaultTag:gp,name:"Menu.Button"})}let xp="div",yp=me.RenderStrategy|me.Static;function wp(t,l){var i,s;let c=Ft(),{id:d=`headlessui-menu-items-${c}`,...p}=t,[h,b]=qr("Menu.Items"),S=wt(h.itemsRef,l),O=Qt(h.itemsRef),k=Gt(),A=dr(),N=A!==null?(A&Ot.Open)===Ot.Open:h.menuState===0;n.useEffect(()=>{let W=h.itemsRef.current;W&&h.menuState===0&&W!==(O==null?void 0:O.activeElement)&&W.focus({preventScroll:!0})},[h.menuState,h.itemsRef,O]),j({container:h.itemsRef.current,enabled:h.menuState===0,accept(W){return W.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:W.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(W){W.setAttribute("role","none")}});let D=ee(W=>{var J,de;switch(k.dispose(),W.key){case Qe.Space:if(h.searchQuery!=="")return W.preventDefault(),W.stopPropagation(),b({type:3,value:W.key});case Qe.Enter:if(W.preventDefault(),W.stopPropagation(),b({type:1}),h.activeItemIndex!==null){let{dataRef:ae}=h.items[h.activeItemIndex];(de=(J=ae.current)==null?void 0:J.domRef.current)==null||de.click()}Br(h.buttonRef.current);break;case Qe.ArrowDown:return W.preventDefault(),W.stopPropagation(),b({type:2,focus:ut.Next});case Qe.ArrowUp:return W.preventDefault(),W.stopPropagation(),b({type:2,focus:ut.Previous});case Qe.Home:case Qe.PageUp:return W.preventDefault(),W.stopPropagation(),b({type:2,focus:ut.First});case Qe.End:case Qe.PageDown:return W.preventDefault(),W.stopPropagation(),b({type:2,focus:ut.Last});case Qe.Escape:W.preventDefault(),W.stopPropagation(),b({type:1}),_t().nextFrame(()=>{var ae;return(ae=h.buttonRef.current)==null?void 0:ae.focus({preventScroll:!0})});break;case Qe.Tab:W.preventDefault(),W.stopPropagation(),b({type:1}),_t().nextFrame(()=>{vn(h.buttonRef.current,W.shiftKey?Ht.Previous:Ht.Next)});break;default:W.key.length===1&&(b({type:3,value:W.key}),k.setTimeout(()=>b({type:4}),350));break}}),F=ee(W=>{switch(W.key){case Qe.Space:W.preventDefault();break}}),$=n.useMemo(()=>({open:h.menuState===0}),[h]),U={"aria-activedescendant":h.activeItemIndex===null||(i=h.items[h.activeItemIndex])==null?void 0:i.id,"aria-labelledby":(s=h.buttonRef.current)==null?void 0:s.id,id:d,onKeyDown:D,onKeyUp:F,role:"menu",tabIndex:0,ref:S};return he({ourProps:U,theirProps:p,slot:$,defaultTag:xp,features:yp,visible:N,name:"Menu.Items"})}let Ep=n.Fragment;function Sp(t,l){let i=Ft(),{id:s=`headlessui-menu-item-${i}`,disabled:c=!1,...d}=t,[p,h]=qr("Menu.Item"),b=p.activeItemIndex!==null?p.items[p.activeItemIndex].id===s:!1,S=n.useRef(null),O=wt(l,S);Fe(()=>{if(p.__demoMode||p.menuState!==0||!b||p.activationTrigger===0)return;let ae=_t();return ae.requestAnimationFrame(()=>{var be,Ke;(Ke=(be=S.current)==null?void 0:be.scrollIntoView)==null||Ke.call(be,{block:"nearest"})}),ae.dispose},[p.__demoMode,S,b,p.menuState,p.activationTrigger,p.activeItemIndex]);let k=up(S),A=n.useRef({disabled:c,domRef:S,get textValue(){return k()}});Fe(()=>{A.current.disabled=c},[A,c]),Fe(()=>(h({type:5,id:s,dataRef:A}),()=>h({type:6,id:s})),[A,s]);let N=ee(()=>{h({type:1})}),D=ee(ae=>{if(c)return ae.preventDefault();h({type:1}),Br(p.buttonRef.current)}),F=ee(()=>{if(c)return h({type:2,focus:ut.Nothing});h({type:2,focus:ut.Specific,id:s})}),$=Yr(),U=ee(ae=>$.update(ae)),W=ee(ae=>{$.wasMoved(ae)&&(c||b||h({type:2,focus:ut.Specific,id:s,trigger:0}))}),J=ee(ae=>{$.wasMoved(ae)&&(c||b&&h({type:2,focus:ut.Nothing}))}),de=n.useMemo(()=>({active:b,disabled:c,close:N}),[b,c,N]);return he({ourProps:{id:s,ref:O,role:"menuitem",tabIndex:c===!0?void 0:-1,"aria-disabled":c===!0?!0:void 0,disabled:void 0,onClick:D,onFocus:F,onPointerEnter:U,onMouseEnter:U,onPointerMove:W,onMouseMove:W,onPointerLeave:J,onMouseLeave:J},theirProps:d,slot:de,defaultTag:Ep,name:"Menu.Item"})}let Cp=Ee(vp),jp=Ee(bp),Tp=Ee(wp),Op=Ee(Sp),Kr=Object.assign(Cp,{Button:jp,Items:Tp,Item:Op}),Ml=n.createContext(null);function Pl(){let t=n.useContext(Ml);if(t===null){let l=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(l,Pl),l}return t}function Np(){let[t,l]=n.useState([]);return[t.length>0?t.join(" "):void 0,n.useMemo(()=>function(i){let s=ee(d=>(l(p=>[...p,d]),()=>l(p=>{let h=p.slice(),b=h.indexOf(d);return b!==-1&&h.splice(b,1),h}))),c=n.useMemo(()=>({register:s,slot:i.slot,name:i.name,props:i.props}),[s,i.slot,i.name,i.props]);return n.createElement(Ml.Provider,{value:c},i.children)},[l])]}let kp="label";function Ip(t,l){let i=Ft(),{id:s=`headlessui-label-${i}`,passive:c=!1,...d}=t,p=Pl(),h=wt(l);Fe(()=>p.register(s),[s,p.register]);let b={ref:h,...p.props,id:s};return c&&("onClick"in b&&(delete b.htmlFor,delete b.onClick),"onClick"in d&&delete d.onClick),he({ourProps:b,theirProps:d,slot:p.slot||{},defaultTag:kp,name:p.name||"Label"})}let Mp=Ee(Ip),Pp=Object.assign(Mp,{});function Fp(t=0){let[l,i]=n.useState(t),s=pr(),c=n.useCallback(b=>{s.current&&i(S=>S|b)},[l,s]),d=n.useCallback(b=>!!(l&b),[l]),p=n.useCallback(b=>{s.current&&i(S=>S&~b)},[i,s]),h=n.useCallback(b=>{s.current&&i(S=>S^b)},[i]);return{flags:l,addFlag:c,hasFlag:d,removeFlag:p,toggleFlag:h}}let ei=n.createContext(null);ei.displayName="GroupContext";let Rp=n.Fragment;function Lp(t){var l;let[i,s]=n.useState(null),[c,d]=Np(),[p,h]=Tl(),b=n.useMemo(()=>({switch:i,setSwitch:s,labelledby:c,describedby:p}),[i,s,c,p]),S={},O=t;return n.createElement(h,{name:"Switch.Description"},n.createElement(d,{name:"Switch.Label",props:{htmlFor:(l=b.switch)==null?void 0:l.id,onClick(k){i&&(k.currentTarget.tagName==="LABEL"&&k.preventDefault(),i.click(),i.focus({preventScroll:!0}))}}},n.createElement(ei.Provider,{value:b},he({ourProps:S,theirProps:O,defaultTag:Rp,name:"Switch.Group"}))))}let Ap="button";function Dp(t,l){var i;let s=Ft(),{id:c=`headlessui-switch-${s}`,checked:d,defaultChecked:p=!1,onChange:h,disabled:b=!1,name:S,value:O,form:k,...A}=t,N=n.useContext(ei),D=n.useRef(null),F=wt(D,l,N===null?null:N.setSwitch),[$,U]=er(d,h,p),W=ee(()=>U==null?void 0:U(!$)),J=ee(xe=>{if(Zr(xe.currentTarget))return xe.preventDefault();xe.preventDefault(),W()}),de=ee(xe=>{xe.key===Qe.Space?(xe.preventDefault(),W()):xe.key===Qe.Enter&&jd(xe.currentTarget)}),ae=ee(xe=>xe.preventDefault()),be=n.useMemo(()=>({checked:$}),[$]),Ke={id:c,ref:F,role:"switch",type:ar(t,D),tabIndex:t.tabIndex===-1?0:(i=t.tabIndex)!=null?i:0,"aria-checked":$,"aria-labelledby":N==null?void 0:N.labelledby,"aria-describedby":N==null?void 0:N.describedby,disabled:b,onClick:J,onKeyUp:de,onKeyPress:ae},Ue=Gt();return n.useEffect(()=>{var xe;let Se=(xe=D.current)==null?void 0:xe.closest("form");Se&&p!==void 0&&Ue.addEventListener(Se,"reset",()=>{U(p)})},[D,U]),n.createElement(n.Fragment,null,S!=null&&$&&n.createElement(cr,{features:an.Hidden,...bt({as:"input",type:"checkbox",hidden:!0,readOnly:!0,disabled:b,form:k,checked:$,name:S,value:O})}),he({ourProps:Ke,theirProps:A,slot:be,defaultTag:Ap,name:"Switch"}))}let $p=Ee(Dp),_p=Lp,Bp=Object.assign($p,{Group:_p,Label:Pp,Description:Ol});function zp(t){let l={called:!1};return(...i)=>{if(!l.called)return l.called=!0,t(...i)}}function ti(t,...l){t&&l.length>0&&t.classList.add(...l)}function ni(t,...l){t&&l.length>0&&t.classList.remove(...l)}function Wp(t,l){let i=_t();if(!t)return i.dispose;let{transitionDuration:s,transitionDelay:c}=getComputedStyle(t),[d,p]=[s,c].map(b=>{let[S=0]=b.split(",").filter(Boolean).map(O=>O.includes("ms")?parseFloat(O):parseFloat(O)*1e3).sort((O,k)=>k-O);return S}),h=d+p;if(h!==0){i.group(S=>{S.setTimeout(()=>{l(),S.dispose()},h),S.addEventListener(t,"transitionrun",O=>{O.target===O.currentTarget&&S.dispose()})});let b=i.addEventListener(t,"transitionend",S=>{S.target===S.currentTarget&&(l(),b())})}else l();return i.add(()=>l()),i.dispose}function Hp(t,l,i,s){let c=i?"enter":"leave",d=_t(),p=s!==void 0?zp(s):()=>{};c==="enter"&&(t.removeAttribute("hidden"),t.style.display="");let h=pt(c,{enter:()=>l.enter,leave:()=>l.leave}),b=pt(c,{enter:()=>l.enterTo,leave:()=>l.leaveTo}),S=pt(c,{enter:()=>l.enterFrom,leave:()=>l.leaveFrom});return ni(t,...l.base,...l.enter,...l.enterTo,...l.enterFrom,...l.leave,...l.leaveFrom,...l.leaveTo,...l.entered),ti(t,...l.base,...h,...S),d.nextFrame(()=>{ni(t,...l.base,...h,...S),ti(t,...l.base,...h,...b),Wp(t,()=>(ni(t,...l.base,...h),ti(t,...l.base,...l.entered),p()))}),d.dispose}function Up({immediate:t,container:l,direction:i,classes:s,onStart:c,onStop:d}){let p=pr(),h=Gt(),b=Pt(i);Fe(()=>{t&&(b.current="enter")},[t]),Fe(()=>{let S=_t();h.add(S.dispose);let O=l.current;if(O&&b.current!=="idle"&&p.current)return S.dispose(),c.current(b.current),S.add(Hp(O,s.current,b.current==="enter",()=>{S.dispose(),d.current(b.current)})),S.dispose},[i])}function bn(t=""){return t.split(/\s+/).filter(l=>l.length>1)}let Xr=n.createContext(null);Xr.displayName="TransitionContext";var Vp=(t=>(t.Visible="visible",t.Hidden="hidden",t))(Vp||{});function Yp(){let t=n.useContext(Xr);if(t===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return t}function Zp(){let t=n.useContext(Jr);if(t===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return t}let Jr=n.createContext(null);Jr.displayName="NestingContext";function Qr(t){return"children"in t?Qr(t.children):t.current.filter(({el:l})=>l.current!==null).filter(({state:l})=>l==="visible").length>0}function Fl(t,l){let i=Pt(t),s=n.useRef([]),c=pr(),d=Gt(),p=ee((N,D=Le.Hidden)=>{let F=s.current.findIndex(({el:$})=>$===N);F!==-1&&(pt(D,{[Le.Unmount](){s.current.splice(F,1)},[Le.Hidden](){s.current[F].state="hidden"}}),d.microTask(()=>{var $;!Qr(s)&&c.current&&(($=i.current)==null||$.call(i))}))}),h=ee(N=>{let D=s.current.find(({el:F})=>F===N);return D?D.state!=="visible"&&(D.state="visible"):s.current.push({el:N,state:"visible"}),()=>p(N,Le.Unmount)}),b=n.useRef([]),S=n.useRef(Promise.resolve()),O=n.useRef({enter:[],leave:[],idle:[]}),k=ee((N,D,F)=>{b.current.splice(0),l&&(l.chains.current[D]=l.chains.current[D].filter(([$])=>$!==N)),l==null||l.chains.current[D].push([N,new Promise($=>{b.current.push($)})]),l==null||l.chains.current[D].push([N,new Promise($=>{Promise.all(O.current[D].map(([U,W])=>W)).then(()=>$())})]),D==="enter"?S.current=S.current.then(()=>l==null?void 0:l.wait.current).then(()=>F(D)):F(D)}),A=ee((N,D,F)=>{Promise.all(O.current[D].splice(0).map(([$,U])=>U)).then(()=>{var $;($=b.current.shift())==null||$()}).then(()=>F(D))});return n.useMemo(()=>({children:s,register:h,unregister:p,onStart:k,onStop:A,wait:S,chains:O}),[h,p,s,k,A,O,S])}function Gp(){}let qp=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Rl(t){var l;let i={};for(let s of qp)i[s]=(l=t[s])!=null?l:Gp;return i}function Kp(t){let l=n.useRef(Rl(t));return n.useEffect(()=>{l.current=Rl(t)},[t]),l}let Xp="div",Ll=me.RenderStrategy;function Jp(t,l){var i,s;let{beforeEnter:c,afterEnter:d,beforeLeave:p,afterLeave:h,enter:b,enterFrom:S,enterTo:O,entered:k,leave:A,leaveFrom:N,leaveTo:D,...F}=t,$=n.useRef(null),U=wt($,l),W=(i=F.unmount)==null||i?Le.Unmount:Le.Hidden,{show:J,appear:de,initial:ae}=Yp(),[be,Ke]=n.useState(J?"visible":"hidden"),Ue=Zp(),{register:xe,unregister:Se}=Ue;n.useEffect(()=>xe($),[xe,$]),n.useEffect(()=>{if(W===Le.Hidden&&$.current){if(J&&be!=="visible"){Ke("visible");return}return pt(be,{hidden:()=>Se($),visible:()=>xe($)})}},[be,$,xe,Se,J,W]);let Ie=Pt({base:bn(F.className),enter:bn(b),enterFrom:bn(S),enterTo:bn(O),entered:bn(k),leave:bn(A),leaveFrom:bn(N),leaveTo:bn(D)}),ze=Kp({beforeEnter:c,afterEnter:d,beforeLeave:p,afterLeave:h}),dt=hn();n.useEffect(()=>{if(dt&&be==="visible"&&$.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[$,be,dt]);let ht=ae&&!de,G=de&&J&&ae,ft=!dt||ht?"idle":J?"enter":"leave",We=Fp(0),xt=ee(Et=>pt(Et,{enter:()=>{We.addFlag(Ot.Opening),ze.current.beforeEnter()},leave:()=>{We.addFlag(Ot.Closing),ze.current.beforeLeave()},idle:()=>{}})),ce=ee(Et=>pt(Et,{enter:()=>{We.removeFlag(Ot.Opening),ze.current.afterEnter()},leave:()=>{We.removeFlag(Ot.Closing),ze.current.afterLeave()},idle:()=>{}})),Ve=Fl(()=>{Ke("hidden"),Se($)},Ue),ct=n.useRef(!1);Up({immediate:G,container:$,classes:Ie,direction:ft,onStart:Pt(Et=>{ct.current=!0,Ve.onStart($,Et,xt)}),onStop:Pt(Et=>{ct.current=!1,Ve.onStop($,Et,ce),Et==="leave"&&!Qr(Ve)&&(Ke("hidden"),Se($))})});let Nt=F,Lt={ref:U};return G?Nt={...Nt,className:Q(F.className,...Ie.current.enter,...Ie.current.enterFrom)}:ct.current&&(Nt.className=Q(F.className,(s=$.current)==null?void 0:s.className),Nt.className===""&&delete Nt.className),n.createElement(Jr.Provider,{value:Ve},n.createElement(Bo,{value:pt(be,{visible:Ot.Open,hidden:Ot.Closed})|We.flags},he({ourProps:Lt,theirProps:Nt,defaultTag:Xp,features:Ll,visible:be==="visible",name:"Transition.Child"})))}function Qp(t,l){let{show:i,appear:s=!1,unmount:c=!0,...d}=t,p=n.useRef(null),h=wt(p,l);hn();let b=dr();if(i===void 0&&b!==null&&(i=(b&Ot.Open)===Ot.Open),![!0,!1].includes(i))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[S,O]=n.useState(i?"visible":"hidden"),k=Fl(()=>{O("hidden")}),[A,N]=n.useState(!0),D=n.useRef([i]);Fe(()=>{A!==!1&&D.current[D.current.length-1]!==i&&(D.current.push(i),N(!1))},[D,i]);let F=n.useMemo(()=>({show:i,appear:s,initial:A}),[i,s,A]);n.useEffect(()=>{if(i)O("visible");else if(!Qr(k))O("hidden");else{let J=p.current;if(!J)return;let de=J.getBoundingClientRect();de.x===0&&de.y===0&&de.width===0&&de.height===0&&O("hidden")}},[i,k]);let $={unmount:c},U=ee(()=>{var J;A&&N(!1),(J=t.beforeEnter)==null||J.call(t)}),W=ee(()=>{var J;A&&N(!1),(J=t.beforeLeave)==null||J.call(t)});return n.createElement(Jr.Provider,{value:k},n.createElement(Xr.Provider,{value:F},he({ourProps:{...$,as:n.Fragment,children:n.createElement(Al,{ref:h,...$,...d,beforeEnter:U,beforeLeave:W})},theirProps:{},defaultTag:n.Fragment,features:Ll,visible:S==="visible",name:"Transition"})))}function em(t,l){let i=n.useContext(Xr)!==null,s=dr()!==null;return n.createElement(n.Fragment,null,!i&&s?n.createElement(ri,{ref:l,...t}):n.createElement(Al,{ref:l,...t}))}let ri=Ee(Qp),Al=Ee(Jp),tm=Ee(em),Nn=Object.assign(ri,{Child:tm,Root:ri});function nm({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 rm=a.forwardRef(nm);function om({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 im=a.forwardRef(om);function lm({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 sm=a.forwardRef(lm);function am({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 um=a.forwardRef(am);function cm({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 dm=a.forwardRef(cm);function fm({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 Dl=a.forwardRef(fm);function pm({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 mm=a.forwardRef(pm);function hm({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 vm=a.forwardRef(hm);function gm({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 bm=a.forwardRef(gm),xm={warning:{color:"bg-yellow-50",icon:y.jsx(mm,{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:y.jsx(bm,{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:y.jsx(sm,{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:y.jsx(vm,{className:"h-5 w-5 text-blue-400","aria-hidden":"true"}),colorTitle:"text-blue-800",colorText:"text-blue-700"}},ym=({type:t="info",title:l,message:i,active:s=!1,time:c=1e3,onClose:d})=>{const[p,h]=n.useState(!1),b=n.useRef(null);n.useEffect(()=>(s&&(h(!0),b.current=setTimeout(()=>{h(!1),d&&d()},c)),()=>clearTimeout(b.current)),[s,c,d]);const S=xm[t];return p?y.jsx("div",{className:"fixed top-2.5 left-1/2 transform -translate-x-1/2 w-80 3xs:w-96 z-50",children:y.jsx(Nn,{as:n.Fragment,show:p,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:y.jsxs("div",{className:x("rounded-md p-4 text-center",S.color),children:[y.jsxs("div",{className:"flex justify-center flex-shrink-0",children:[S.icon,y.jsx("h3",{className:x("text-sm font-medium ml-3",S.colorTitle),children:l})]}),y.jsx("div",{className:x("mt-2 text-sm",S.colorText),children:y.jsx("p",{children:i})})]})})}):null};function wm({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 Em=a.forwardRef(wm);function Sm({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 Cm=a.forwardRef(Sm);function jm({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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"}),a.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 Tm=a.forwardRef(jm);function Om({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 Nm=a.forwardRef(Om);function km({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 Im=a.forwardRef(km);function Mm({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 Pm=a.forwardRef(Mm),Fm=({src:t,alt:l,width:i,height:s,className:c="",classNameIcon:d="",isIcon:p=!0,acronym:h=""})=>{function b(){if(typeof h!="string")return h;const S=h.toLowerCase(),O=S.split(" "),k=O[O.length-1];return S.charAt(0)+k.charAt(0)}return y.jsx(y.Fragment,{children:t?y.jsx("img",{src:t,alt:l,width:i,height:s,className:x(c!==""&&c),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s"},onLoad:S=>S.currentTarget.style.filter="none","data-testid":"img"}):p?y.jsx(Im,{className:x("bg-white text-default-5",d!==""?d:"w-7 h-7")}):y.jsx("div",{className:x("bg-gray-200 text-default-5 rounded-full font-bold uppercase flex justify-center items-center",d!==""?d:"w-7 h-7"),children:b()})})},Rm=({steps:t,onClick:l})=>{const[i,s]=n.useState(0),c=d=>{s(d),l(d)};return y.jsx("nav",{className:"flex items-center justify-center w-full","aria-label":"Progress","data-testid":"bullets",children:y.jsx("ol",{role:"list",className:"flex items-center space-x-5",children:new Array(t).fill(1).map((d,p)=>y.jsx("li",{children:i!==p?y.jsx("div",{className:"cursor-pointer block h-2.5 w-2.5 rounded-full bg-gray-500 hover:bg-gray-600",onClick:()=>c(p),"data-testid":`step-${p}`,children:y.jsx("span",{className:"sr-only",children:"step"})}):y.jsxs("div",{className:"relative flex items-center justify-center cursor-pointer","aria-current":"step",children:[y.jsx("span",{className:"absolute flex h-5 w-5 p-px","aria-hidden":"true",children:y.jsx("span",{className:"h-full w-full rounded-full bg-gray-300"})}),y.jsx("span",{className:"relative block h-2.5 w-2.5 rounded-full bg-gray-500","aria-hidden":"true"}),y.jsx("span",{className:"sr-only",children:"step"})]})},p))})})};var $l={exports:{}};/*!
|
|
66
66
|
Copyright (c) 2018 Jed Watson.
|
|
67
67
|
Licensed under the MIT License (MIT), see
|
|
68
68
|
http://jedwatson.github.io/classnames
|
|
69
|
-
*/(function(e){(function(){var i={}.hasOwnProperty;function o(){for(var d="",p=0;p<arguments.length;p++){var h=arguments[p];h&&(d=c(d,s(h)))}return d}function s(d){if(typeof d=="string"||typeof d=="number")return d;if(typeof d!="object")return"";if(Array.isArray(d))return o.apply(null,d);if(d.toString!==Object.prototype.toString&&!d.toString.toString().includes("[native code]"))return d.toString();var p="";for(var h in d)i.call(d,h)&&d[h]&&(p=c(p,h));return p}function c(d,p){return p?d?d+" "+p:d+p:d}e.exports?(o.default=o,e.exports=o):window.classNames=o})()})(Fi);var Nm=Fi.exports;const xn=_(Nm),Mi=({className:e="text-sm w-full rounded-md",children:i,icon:o=null,edge:s=null,disabled:c=!1,type:d="button",onClick:p,id:h})=>{const g=xn({"ml-2":s==="start"&&o!==null,"mr-2":s==="end"&&o!==null});return y.jsxs("button",{className:x("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:d,onClick:p,disabled:c,"data-testid":`button-outline-${h}`,id:`button-outline-${h}`,children:[s==="start"&&o!==null&&y.jsx("span",{children:o}),y.jsx("span",{className:x("flex",g),id:h,children:i}),s==="end"&&o!==null&&y.jsx("span",{children:o})]})},Ri=({children:e,className:i="",icon:o=null,edge:s=null,disabled:c=!1,type:d="button",onClick:p,id:h})=>{const g=xn({"ml-2":s==="start"&&o!==null,"mr-2":s==="end"&&o!==null});return y.jsxs("button",{className:`${i} flex justify-center items-center`,edge:s,type:d,onClick:p,disabled:c,"data-testid":`button-${h}`,children:[s==="start"&&o!==null&&y.jsx("span",{children:o}),y.jsx("span",{className:g,children:e}),s==="end"&&o!==null&&y.jsx("span",{children:o})]})},gr=({children:e,classNameButton:i="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:o="",icon:s=null,edge:c=null,disabled:d=!1,type:p="button",onClick:h,id:g,outline:w="0px 0px 0px 2px #6366F1, 0px 0px 0px 2px #FFF, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameContainer:O=""})=>{const[I,R]=n.useState(!1),N=xn({"ml-2":c==="start"&&s!==null,"mr-2":c==="end"&&s!==null}),L=()=>{h&&h()};return y.jsx("div",{className:x("rounded-md p-0.5",O!==""&&O),style:{boxShadow:I?w:"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:y.jsxs("button",{className:x("flex justify-center items-center text-sm leading-6 shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",d&&"text-white bg-gray-300 rounded focus:outline-none cursor-default",d?i.replace(/\bbg-\w+\b/g,""):i),type:p,onClick:L,onFocus:()=>R(!0),onBlur:()=>R(!1),disabled:d,"data-testid":`button-solid-${g}`,children:[c==="start"&&s!==null&&y.jsx("span",{className:"flex",children:s}),y.jsx("span",{className:x(o.length===0&&N,o.length!==0&&o),children:e}),c==="end"&&s!==null&&y.jsx("span",{children:s})]})})},Im=({label:e=null,checked:i=!1,onChange:o,id:s,className:c="",classNameCheckbox:d="h-4 w-4",style:p={},disabled:h=!1})=>{const[g,w]=n.useState(!1);return n.useEffect(()=>{w(i)},[i]),y.jsxs("div",{className:"flex items-center",style:p,"data-testid":`container-check-${s}`,children:[y.jsx("input",{checked:g,id:`${e}-${s}`,value:s,"aria-describedby":"comments-description",type:"checkbox",onChange:o,className:x("cursor-pointer rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",d!==""&&d),"data-testid":`checkbox-${s}`,disabled:h}),e!==null?y.jsx("label",{htmlFor:`${e}-${s}`,className:`ml-2.5 font-normal cursor-pointer ${c}`,id:`label-${s}`,"data-testid":"label",children:e}):null]})};function km({title:e,titleId:i,...o},s){return a.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:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const Pm=a.forwardRef(km);function Fm({title:e,titleId:i,...o},s){return a.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:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const Mm=a.forwardRef(Fm);function Rm({title:e,titleId:i,...o},s){return a.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:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const Lm=a.forwardRef(Rm);function Am({title:e,titleId:i,...o},s){return a.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:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.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 Dm=a.forwardRef(Am);function $m({title:e,titleId:i,...o},s){return a.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:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.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 _m=a.forwardRef($m);function Li({children:e,className:i="sm:max-w-sm w-11/12 sm:my-8",classNameContainer:o="",isOpen:s=!1,setIsOpen:c,showIconSuccess:d=!0,showButton:p=!0,style:h={}}){return y.jsx(Nn,{show:s,as:n.Fragment,children:y.jsxs(Ei,{as:"div",className:"relative z-50 relative",onClose:c,"data-testid":"modal",children:[y.jsx(Nn.Child,{as:n.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-5",leave:"ease-in duration-200",leaveFrom:"opacity-5",leaveTo:"opacity-0",children:y.jsx("div",{className:"fixed inset-0 bg-opacity-40 bg-gray-900 transition-opacity","data-testid":"window-close",onClick:()=>c(!1)})}),y.jsx("div",{className:"fixed inset-0 z-10 overflow-y-auto",children:y.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:y.jsx(Nn.Child,{as:n.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:y.jsxs(Ei.Panel,{className:x("relative transform rounded-lg bg-white px-4 pb-3 pt-5 text-left transition-all sm:w-full sm:pt-3 sm:px-3",i!==""&&i),style:h,children:[d&&y.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-green-100",children:y.jsx(Pm,{className:"h-6 w-6 text-green-600","aria-hidden":"true"})}),y.jsx("div",{className:x(o!==""&&o),"data-testid":"content",children:e}),p&&y.jsx("div",{className:"mt-5 sm:mt-6",children:y.jsx(gr,{id:"close-modal",onClick:()=>c(!1),children:"Cerrar"})}),y.jsx("button",{className:"opacity-0 absolute"})]})})})})]})})}const Bm=({isOpenModalConfirmation:e,setIsOpenModalConfirmation:i,close:o,title:s="¿Estás seguro de abandonar la creación de la acción?",description:c="La información se perderá si no creas la acción",classNameTitle:d="",classNameDescription:p=""})=>{const h=()=>{i(!1),o()};return y.jsxs(Li,{isOpen:e,setIsOpen:()=>i(),showButton:!1,showIconSuccess:!1,children:[y.jsx("p",{className:x("text-center text-sm",d!==""&&d),children:s}),y.jsx("p",{className:x("text-center text-sm",p!==""&&p),children:c}),y.jsxs("div",{className:"flex w-full justify-center mt-5",children:[y.jsx(Mi,{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:()=>i(),id:"cancel",children:"Cancelar"}),y.jsx(gr,{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:h,id:"confirmation",children:"Aceptar"})]})]})},zm=({className:e="",style:i={}})=>y.jsx("div",{className:x("w-px",e!==""&&e),style:i}),Wm=({onClick:e,id:i="",className:o=""})=>y.jsxs("div",{className:x("flex items-center text-default-5",o!==""&&o),"data-testid":i,children:[y.jsx(hm,{className:"w-3 h-3 3xs:w-4 3xs:h-4 stroke-current cursor-pointer","data-testid":"chevron-left-icon",onClick:e}),y.jsx("span",{onClick:e,className:"text-sm cursor-pointer","data-testid":"go-back",children:"Volver"})]}),tl=({className:e="",classNameContainer:i="",children:o,message:s="",style:c={}})=>{const[d,p]=n.useState(!1),[h,g]=n.useState({top:0,left:0}),w=n.useRef(null),O=()=>{if(s==="")return;const N=w.current.getBoundingClientRect();g({top:N.bottom+window.scrollY,left:N.left+window.scrollX}),p(!0)},I=()=>{p(!1)},R=y.jsx(Nn,{as:n.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:d,children:y.jsx("div",{className:x("absolute z-40 px-4 mt-0 sm:px-0",e!==""&&e),style:{top:h.top,left:h.left,position:"absolute"},children:y.jsx("div",{className:"bg-white p-2 text-center rounded-lg shadow-lg ring-1 ring-black ring-opacity-5",onMouseEnter:O,onMouseLeave:I,"data-testid":"message",children:s})})});return y.jsxs(y.Fragment,{children:[y.jsx("div",{ref:w,className:x("inline-block",i!==""&&i),onMouseEnter:O,onMouseLeave:I,"data-testid":"container-tooltip",style:c,children:o}),typeof window<"u"&&u.createPortal(R,document.body)]})},nl=({placeholder:e="",label:i="",htmlFor:o,type:s="text",name:c,handleChange:d,onClick:p=()=>{},value:h,isReadOnly:g=!1,isError:w=!1,helperText:O="",autocomplete:I="off",id:R,classNameLabel:N="",classNameContainerInput:L="",classNameContainer:P="",className:A="",icon:U=null,onKeyDown:z,onFocus:X,min:ae,max:oe,maxWidth:he=5e3})=>{const[Ve,ze]=n.useState(!1),ve=xn({"ring-red-300 focus:ring-red-300 text-red-900":w||Ve,"focus:ring-indigo-600 text-gray-500":!w&&!Ve}),xe=Se=>{if(d&&d(Se),s!=="email")return;const{value:De}=Se.target,st=v(De);ze(!st)};return y.jsxs("div",{"data-testid":`container-input-${R}`,className:P,children:[i!==""&&y.jsx("label",{htmlFor:o,className:x("block text-sm font-medium leading-6",N!==""?N:"text-gray-700"),"data-testid":`label-${R}`,children:i}),y.jsxs("div",{className:x("relative mt-1 rounded-md",L!==""&&L),children:[y.jsx(tl,{className:"text-sm",classNameContainer:"w-full",message:h,children:y.jsx("input",{id:R,name:c,type:s,autoComplete:I,placeholder:e,onChange:xe,onClick:p,onKeyDown:z,onFocus:X,value:h,readOnly:g,"data-testid":`input-${R}`,min:ae,className:x("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 truncate",ve,A!==""&&A),style:{maxWidth:`${he}px`}})}),U!==null&&y.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3",children:U}),w&&U===null&&y.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:y.jsx(Pi,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),O.length===0||!w?null:y.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${R}`,children:O})]})};function br({className:e="w-6 h-6",color:i="#3730a3"}){return y.jsxs("svg",{className:x("fill-current animate-spin",e),viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[y.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:i,strokeWidth:"4",fill:"none"}),y.jsx("path",{fill:i,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 Hm(){return y.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:[y.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"}),y.jsx(br,{className:"w-8 h-8 animate-spin"})]})}const Ai=({height:e="36px",style:i={},styleMenu:o={},label:s="",onChange:c,isReadOnly:d=!1,isError:p=!1,helperText:h="",name:g,id:w,className:O="",classNameLabel:I="",classNameInput:R="",options:N,value:L=-1,defaultValue:P={value:-1,label:"",iconStart:null,iconEnd:null},defaultLabel:A="label",defaultId:U="value",bgOptionSelect:z="bg-indigo-600",isSearch:X=!1,loading:ae=!1,isSingleOptionAndFirstLoad:oe=!0,isTest:he=!1})=>{const[Ve,ze]=n.useState(""),[ve,xe]=n.useState(P),[Se,De]=n.useState(!1),[st,ft]=n.useState(!0);n.useEffect(()=>{if((N==null?void 0:N.length)!==1||!st)return;ft(!1);const[ie]=N,We=ie[U],lt=ie[A];xe({value:We,label:lt}),oe&&c({target:{value:ie,checked:!1,name:g,type:void 0,id:ie[U]}})},[N,U,A,c,g,st,oe]),n.useEffect(()=>{if(L===-1||(N==null?void 0:N.length)===0)return;const ie=N==null?void 0:N.find(We=>We[U]===L);ie&&xe(ie)},[L,N,U]),n.useEffect(()=>{L==="clear"&&(ve[U]!==P[U]||ve[A]!==P[A]||he)&&xe(P)},[P,he,ve,L,U,A]);const Y=Ve===""?N:N.filter(ie=>ie[A].normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().includes(Ve.toLowerCase())),at=xn({"ring-red-300 focus:ring-red-300 text-red-900":p&&!d,"text-gray-500":!p,"focus:ring-indigo-600":!p&&!d}),_e=xn({"text-red-400":p&&!d,"text-gray-400":!p}),gt=ie=>{xe(ie),c({target:{value:ie,checked:!1,name:g,type:void 0,id:ie[U]}})};return y.jsxs(an,{as:"div",value:ve,children:[y.jsx(an.Label,{className:x("block text-sm font-medium leading-6 text-gray-500 mb-0.5",I!==""&&I),children:s}),y.jsxs("div",{className:x("relative",O!==""&&O),children:[y.jsx(tl,{className:"text-sm",classNameContainer:"w-full",message:ve[A],children:y.jsxs(an.Button,{className:"w-full","data-testid":`listbox-button-${w}`,children:[ve.iconStart&&y.jsx("span",{className:"absolute inset-y-0 left-0 flex items-center pl-2",children:ve.iconStart}),y.jsx(an.Input,{className:x("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",!p&&!d&&"ring-inset focus:ring-inset focus:ring-2 focus:ring-indigo-600",d&&"focus:ring-gray-300",at,R!==""&&R),onChange:ie=>ze(ie.target.value.normalize("NFD").replace(/[\u0300-\u036f]/g,"")),displayValue:ie=>{var We;return(We=ie[A])==null?void 0:We.trim()},autoComplete:"off",readOnly:!X||d,style:{height:e,...i},"data-testid":"input-search",onClick:()=>De(d?!1:!Se),onBlur:()=>De(!1)})]})}),ve.iconEnd&&y.jsx("span",{className:"absolute inset-y-0 right-4 flex items-center pr-4",children:ve.iconEnd}),!d&&y.jsx(an.Button,{className:"absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none",onClick:()=>De(d?!1:!Se),"data-testid":"arrow-button",children:Se?y.jsx(om,{className:x("h-5 w-5",_e),"aria-hidden":"true"}):y.jsx(nm,{className:x("h-5 w-5",_e),"aria-hidden":"true"})}),!d&&y.jsx(y.Fragment,{children:ae?y.jsx(an.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:y.jsx(br,{})}):(Y??[]).length>0?y.jsx(an.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",style:o,children:Y.map((ie,We)=>y.jsx(an.Option,{value:ie,className:x(ie[U]===ve[U]?`${z} text-white`:"text-gray-900",`relative cursor-default select-none p-2 hover:text-white hover:${z}`),"data-testid":`select-${w}-${ie[U]}`,onClick:()=>gt(ie),children:y.jsxs("div",{className:"flex justify-between items-center",children:[y.jsxs("div",{className:"flex items-center",children:[ie.iconStart&&y.jsx("span",{className:"mr-2","aria-hidden":"true",children:ie.iconStart}),y.jsx("span",{className:"font-normal hyphens-auto break-words overflow-hidden",children:ie[A]})]}),ie.iconEnd&&y.jsx("span",{className:"ml-2","aria-hidden":"true",children:ie.iconEnd})]})},We))}):y.jsx(an.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:y.jsx("p",{"data-testid":"empty-options",children:"Sin opciones"})})})]}),h.length>0&&p&&y.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${w}`,children:h})]})},Um=({placeholder:e="",label:i="",htmlFor:o,name:s,handleChange:c,onClick:d=()=>{},value:p,valueSelect:h,isReadOnly:g=!1,isError:w=!1,helperText:O="",autocomplete:I="on",id:R,classNameLabel:N="",classNameContainer:L="",className:P="",onKeyDown:A,options:U,idSelect:z,isMarginLeft:X=!0,classNameSelect:ae="w-20",type:oe="text"})=>{const{width:he}=B(),Ve=xn({"ring-red-300 focus:ring-red-300 text-red-900":w,"focus:ring-indigo-600 text-gray-500":!w});return y.jsxs(y.Fragment,{children:[y.jsx("style",{children:`
|
|
69
|
+
*/(function(t){(function(){var l={}.hasOwnProperty;function i(){for(var d="",p=0;p<arguments.length;p++){var h=arguments[p];h&&(d=c(d,s(h)))}return d}function s(d){if(typeof d=="string"||typeof d=="number")return d;if(typeof d!="object")return"";if(Array.isArray(d))return i.apply(null,d);if(d.toString!==Object.prototype.toString&&!d.toString.toString().includes("[native code]"))return d.toString();var p="";for(var h in d)l.call(d,h)&&d[h]&&(p=c(p,h));return p}function c(d,p){return p?d?d+" "+p:d+p:d}t.exports?(i.default=i,t.exports=i):window.classNames=i})()})($l);var Lm=$l.exports;const xn=_(Lm),_l=({className:t="text-sm w-full rounded-md",children:l,icon:i=null,edge:s=null,disabled:c=!1,type:d="button",onClick:p,id:h})=>{const b=xn({"ml-2":s==="start"&&i!==null,"mr-2":s==="end"&&i!==null});return y.jsxs("button",{className:x("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",t),type:d,onClick:p,disabled:c,"data-testid":`button-outline-${h}`,id:`button-outline-${h}`,children:[s==="start"&&i!==null&&y.jsx("span",{children:i}),y.jsx("span",{className:x("flex",b),id:h,children:l}),s==="end"&&i!==null&&y.jsx("span",{children:i})]})},Bl=({children:t,className:l="",icon:i=null,edge:s=null,disabled:c=!1,type:d="button",onClick:p,id:h})=>{const b=xn({"ml-2":s==="start"&&i!==null,"mr-2":s==="end"&&i!==null});return y.jsxs("button",{className:`${l} flex justify-center items-center`,edge:s,type:d,onClick:p,disabled:c,"data-testid":`button-${h}`,children:[s==="start"&&i!==null&&y.jsx("span",{children:i}),y.jsx("span",{className:b,children:t}),s==="end"&&i!==null&&y.jsx("span",{children:i})]})},br=({children:t,classNameButton:l="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:i="",icon:s=null,edge:c=null,disabled:d=!1,type:p="button",onClick:h,id:b,outline:S="0px 0px 0px 2px #6366F1, 0px 0px 0px 2px #FFF, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameContainer:O=""})=>{const[k,A]=n.useState(!1),N=xn({"ml-2":c==="start"&&s!==null,"mr-2":c==="end"&&s!==null}),D=()=>{h&&h()};return y.jsx("div",{className:x("rounded-md p-0.5",O!==""&&O),style:{boxShadow:k?S:"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:y.jsxs("button",{className:x("flex justify-center items-center text-sm leading-6 shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",d&&"text-white bg-gray-300 rounded focus:outline-none cursor-default",d?l.replace(/\bbg-\w+\b/g,""):l),type:p,onClick:D,onFocus:()=>A(!0),onBlur:()=>A(!1),disabled:d,"data-testid":`button-solid-${b}`,children:[c==="start"&&s!==null&&y.jsx("span",{className:"flex",children:s}),y.jsx("span",{className:x(i.length===0&&N,i.length!==0&&i),children:t}),c==="end"&&s!==null&&y.jsx("span",{children:s})]})})},Am=({label:t=null,checked:l=!1,onChange:i,id:s,className:c="",classNameCheckbox:d="h-4 w-4",style:p={},disabled:h=!1})=>{const[b,S]=n.useState(!1);return n.useEffect(()=>{S(l)},[l]),y.jsxs("div",{className:"flex items-center",style:p,"data-testid":`container-check-${s}`,children:[y.jsx("input",{checked:b,id:`${t}-${s}`,value:s,"aria-describedby":"comments-description",type:"checkbox",onChange:i,className:x("cursor-pointer rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",d!==""&&d),"data-testid":`checkbox-${s}`,disabled:h}),t!==null?y.jsx("label",{htmlFor:`${t}-${s}`,className:`ml-2.5 font-normal cursor-pointer ${c}`,id:`label-${s}`,"data-testid":"label",children:t}):null]})};function Dm({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const $m=a.forwardRef(Dm);function _m({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const Bm=a.forwardRef(_m);function zm({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const Wm=a.forwardRef(zm);function Hm({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 Um=a.forwardRef(Hm);function Vm({title:t,titleId:l,...i},s){return a.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:s,"aria-labelledby":l},i),t?a.createElement("title",{id:l},t):null,a.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 Ym=a.forwardRef(Vm);function zl({children:t,className:l="sm:max-w-sm w-11/12 sm:my-8",classNameContainer:i="",isOpen:s=!1,setIsOpen:c,showIconSuccess:d=!0,showButton:p=!0,style:h={}}){return y.jsx(Nn,{show:s,as:n.Fragment,children:y.jsxs(Nl,{as:"div",className:"relative z-50 relative",onClose:c,"data-testid":"modal",children:[y.jsx(Nn.Child,{as:n.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-5",leave:"ease-in duration-200",leaveFrom:"opacity-5",leaveTo:"opacity-0",children:y.jsx("div",{className:"fixed inset-0 bg-opacity-40 bg-gray-900 transition-opacity","data-testid":"window-close",onClick:()=>c(!1)})}),y.jsx("div",{className:"fixed inset-0 z-10 overflow-y-auto",children:y.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:y.jsx(Nn.Child,{as:n.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:y.jsxs(Nl.Panel,{className:x("relative transform rounded-lg bg-white px-4 pb-3 pt-5 text-left transition-all sm:w-full sm:pt-3 sm:px-3",l!==""&&l),style:h,children:[d&&y.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-green-100",children:y.jsx($m,{className:"h-6 w-6 text-green-600","aria-hidden":"true"})}),y.jsx("div",{className:x(i!==""&&i),"data-testid":"content",children:t}),p&&y.jsx("div",{className:"mt-5 sm:mt-6",children:y.jsx(br,{id:"close-modal",onClick:()=>c(!1),children:"Cerrar"})}),y.jsx("button",{className:"opacity-0 absolute"})]})})})})]})})}const Zm=({isOpenModalConfirmation:t,setIsOpenModalConfirmation:l,close:i,title:s="¿Estás seguro de abandonar la creación de la acción?",description:c="La información se perderá si no creas la acción",classNameTitle:d="",classNameDescription:p=""})=>{const h=()=>{l(!1),i()};return y.jsxs(zl,{isOpen:t,setIsOpen:()=>l(),showButton:!1,showIconSuccess:!1,children:[y.jsx("p",{className:x("text-center text-sm",d!==""&&d),children:s}),y.jsx("p",{className:x("text-center text-sm",p!==""&&p),children:c}),y.jsxs("div",{className:"flex w-full justify-center mt-5",children:[y.jsx(_l,{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:()=>l(),id:"cancel",children:"Cancelar"}),y.jsx(br,{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:h,id:"confirmation",children:"Aceptar"})]})]})},Gm=({className:t="",style:l={}})=>y.jsx("div",{className:x("w-px",t!==""&&t),style:l}),qm=({onClick:t,id:l="",className:i=""})=>y.jsxs("div",{className:x("flex items-center text-default-5",i!==""&&i),"data-testid":l,children:[y.jsx(Em,{className:"w-3 h-3 3xs:w-4 3xs:h-4 stroke-current cursor-pointer","data-testid":"chevron-left-icon",onClick:t}),y.jsx("span",{onClick:t,className:"text-sm cursor-pointer","data-testid":"go-back",children:"Volver"})]}),oi=({className:t="",classNameContainer:l="",children:i,message:s="",style:c={}})=>{const[d,p]=n.useState(!1),[h,b]=n.useState({top:0,left:0}),S=n.useRef(null),O=()=>{if(s==="")return;const N=S.current.getBoundingClientRect();b({top:N.bottom+window.scrollY,left:N.left+window.scrollX}),p(!0)},k=()=>{p(!1)},A=y.jsx(Nn,{as:n.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:d,children:y.jsx("div",{className:x("absolute z-40 px-4 mt-0 sm:px-0",t!==""&&t),style:{top:h.top,left:h.left,position:"absolute"},children:y.jsx("div",{className:"bg-white p-2 text-center rounded-lg shadow-lg ring-1 ring-black ring-opacity-5",onMouseEnter:O,onMouseLeave:k,"data-testid":"message",children:s})})});return y.jsxs(y.Fragment,{children:[y.jsx("div",{ref:S,className:x("inline-block",l!==""&&l),onMouseEnter:O,onMouseLeave:k,"data-testid":"container-tooltip",style:c,children:i}),typeof window<"u"&&u.createPortal(A,document.body)]})},ii=({placeholder:t="",label:l="",htmlFor:i,type:s="text",name:c,handleChange:d,onClick:p=()=>{},value:h,isReadOnly:b=!1,isError:S=!1,helperText:O="",autocomplete:k="off",id:A,classNameLabel:N="",classNameContainerInput:D="",classNameContainer:F="",className:$="",icon:U=null,onKeyDown:W,onFocus:J,min:de,max:ae,maxWidth:be=5e3})=>{const[Ke,Ue]=n.useState(!1),xe=xn({"ring-red-300 focus:ring-red-300 text-red-900":S||Ke,"focus:ring-indigo-600 text-gray-500":!S&&!Ke}),Se=Ie=>{if(d&&d(Ie),s!=="email")return;const{value:ze}=Ie.target,dt=v(ze);Ue(!dt)};return y.jsxs("div",{"data-testid":`container-input-${A}`,className:F,children:[l!==""&&y.jsx("label",{htmlFor:i,className:x("block text-sm font-medium leading-6",N!==""?N:"text-gray-700"),"data-testid":`label-${A}`,children:l}),y.jsxs("div",{className:x("relative mt-1 rounded-md",D!==""&&D),children:[y.jsx(oi,{className:"text-sm",classNameContainer:"w-full",message:h,children:y.jsx("input",{id:A,name:c,type:s,autoComplete:k,placeholder:t,onChange:Se,onClick:p,onKeyDown:W,onFocus:J,value:h,readOnly:b,"data-testid":`input-${A}`,min:de,className:x("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 truncate",xe,$!==""&&$),style:{maxWidth:`${be}px`}})}),U!==null&&y.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3",children:U}),S&&U===null&&y.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:y.jsx(Dl,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),O.length===0||!S?null:y.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${A}`,children:O})]})};function xr({className:t="w-6 h-6",color:l="#3730a3"}){return y.jsxs("svg",{className:x("fill-current animate-spin",t),viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[y.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:l,strokeWidth:"4",fill:"none"}),y.jsx("path",{fill:l,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 Km(){return y.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:[y.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"}),y.jsx(xr,{className:"w-8 h-8 animate-spin"})]})}const Wl=({height:t="36px",style:l={},styleMenu:i={},label:s="",onChange:c,isReadOnly:d=!1,isError:p=!1,helperText:h="",name:b,id:S,className:O="",classNameLabel:k="",classNameInput:A="",options:N,value:D=-1,defaultValue:F={value:-1,label:"",iconStart:null,iconEnd:null},defaultLabel:$="label",defaultId:U="value",bgOptionSelect:W="bg-indigo-600",isSearch:J=!1,loading:de=!1,isSingleOptionAndFirstLoad:ae=!0,isTest:be=!1})=>{const[Ke,Ue]=n.useState(""),[xe,Se]=n.useState(F),[Ie,ze]=n.useState(!1),[dt,ht]=n.useState(!0);n.useEffect(()=>{if((N==null?void 0:N.length)!==1||!dt)return;ht(!1);const[ce]=N,Ve=ce[U],ct=ce[$];Se({value:Ve,label:ct}),ae&&c({target:{value:ce,checked:!1,name:b,type:void 0,id:ce[U]}})},[N,U,$,c,b,dt,ae]),n.useEffect(()=>{if(D===-1||(N==null?void 0:N.length)===0)return;const ce=N==null?void 0:N.find(Ve=>Ve[U]===D);ce&&Se(ce)},[D,N,U]),n.useEffect(()=>{D==="clear"&&(xe[U]!==F[U]||xe[$]!==F[$]||be)&&Se(F)},[F,be,xe,D,U,$]);const G=Ke===""?N:N.filter(ce=>ce[$].normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().includes(Ke.toLowerCase())),ft=xn({"ring-red-300 focus:ring-red-300 text-red-900":p&&!d,"text-gray-500":!p,"focus:ring-indigo-600":!p&&!d}),We=xn({"text-red-400":p&&!d,"text-gray-400":!p}),xt=ce=>{Se(ce),c({target:{value:ce,checked:!1,name:b,type:void 0,id:ce[U]}})};return y.jsxs(un,{as:"div",value:xe,children:[y.jsx(un.Label,{className:x("block text-sm font-medium leading-6 text-gray-500 mb-0.5",k!==""&&k),children:s}),y.jsxs("div",{className:x("relative",O!==""&&O),children:[y.jsx(oi,{className:"text-sm",classNameContainer:"w-full",message:xe[$],children:y.jsxs(un.Button,{className:"w-full","data-testid":`listbox-button-${S}`,children:[xe.iconStart&&y.jsx("span",{className:"absolute inset-y-0 left-0 flex items-center pl-2",children:xe.iconStart}),y.jsx(un.Input,{className:x("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",!p&&!d&&"ring-inset focus:ring-inset focus:ring-2 focus:ring-indigo-600",d&&"focus:ring-gray-300",ft,A!==""&&A),onChange:ce=>Ue(ce.target.value.normalize("NFD").replace(/[\u0300-\u036f]/g,"")),displayValue:ce=>{var Ve;return(Ve=ce[$])==null?void 0:Ve.trim()},autoComplete:"off",readOnly:!J||d,style:{height:t,...l},"data-testid":"input-search",onClick:()=>ze(d?!1:!Ie),onBlur:()=>ze(!1)})]})}),xe.iconEnd&&y.jsx("span",{className:"absolute inset-y-0 right-4 flex items-center pr-4",children:xe.iconEnd}),!d&&y.jsx(un.Button,{className:"absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none",onClick:()=>ze(d?!1:!Ie),"data-testid":"arrow-button",children:Ie?y.jsx(dm,{className:x("h-5 w-5",We),"aria-hidden":"true"}):y.jsx(um,{className:x("h-5 w-5",We),"aria-hidden":"true"})}),!d&&y.jsx(y.Fragment,{children:de?y.jsx(un.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:y.jsx(xr,{})}):(G??[]).length>0?y.jsx(un.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",style:i,children:G.map((ce,Ve)=>y.jsx(un.Option,{value:ce,className:x(ce[U]===xe[U]?`${W} text-white`:"text-gray-900",`relative cursor-default select-none p-2 hover:text-white hover:${W}`),"data-testid":`select-${S}-${ce[U]}`,onClick:()=>xt(ce),children:y.jsxs("div",{className:"flex justify-between items-center",children:[y.jsxs("div",{className:"flex items-center",children:[ce.iconStart&&y.jsx("span",{className:"mr-2","aria-hidden":"true",children:ce.iconStart}),y.jsx("span",{className:"font-normal hyphens-auto break-words overflow-hidden",children:ce[$]})]}),ce.iconEnd&&y.jsx("span",{className:"ml-2","aria-hidden":"true",children:ce.iconEnd})]})},Ve))}):y.jsx(un.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:y.jsx("p",{"data-testid":"empty-options",children:"Sin opciones"})})})]}),h.length>0&&p&&y.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${S}`,children:h})]})},Xm=({placeholder:t="",label:l="",htmlFor:i,name:s,handleChange:c,onClick:d=()=>{},value:p,valueSelect:h,isReadOnly:b=!1,isError:S=!1,helperText:O="",autocomplete:k="on",id:A,classNameLabel:N="",classNameContainer:D="",className:F="",onKeyDown:$,options:U,idSelect:W,isMarginLeft:J=!0,classNameSelect:de="w-20",type:ae="text"})=>{const{width:be}=B(),Ke=xn({"ring-red-300 focus:ring-red-300 text-red-900":S,"focus:ring-indigo-600 text-gray-500":!S});return y.jsxs(y.Fragment,{children:[y.jsx("style",{children:`
|
|
70
70
|
input[type="number"]::-webkit-inner-spin-button,
|
|
71
71
|
input[type="number"]::-webkit-outer-spin-button {
|
|
72
72
|
-webkit-appearance: none;
|
|
@@ -75,7 +75,7 @@ Check the top-level render call using <`+ee+">.")}return Z}}function Vi(j,Z){{if
|
|
|
75
75
|
input[type="number"] {
|
|
76
76
|
-moz-appearance: textfield;
|
|
77
77
|
}
|
|
78
|
-
`}),y.jsxs("div",{"data-testid":`container-input-${
|
|
78
|
+
`}),y.jsxs("div",{"data-testid":`container-input-${A}`,className:D,children:[l!==""&&y.jsx("label",{htmlFor:i,className:x("block text-sm font-medium leading-6",N!==""?N:"text-gray-700"),"data-testid":`label-${A}`,children:l}),y.jsxs("div",{className:"relative mt-1 rounded-md shadow-sm",children:[y.jsx("div",{className:"absolute inset-y-0 -top-0.5 flex items-center",style:{left:"2px"},children:y.jsx(Wl,{name:W,onChange:Ue=>c(Ue),id:W,options:U,value:h,isReadOnly:b,className:de,height:be<=640?"28px":"32px",classNameInput:x(J&&"ml-3.5"),style:{paddingRight:0,boxShadow:"none"},isDisabledFocus:!0})}),y.jsx("input",{id:A,name:s,type:ae,autoComplete:k,placeholder:t,readOnly:b,"data-testid":`input-${A}`,onClick:d,onKeyDown:$,onChange:Ue=>c(Ue),value:p,className:x("block w-full rounded-md border-0 py-1.5 pl-24 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",Ke,F!==""&&F)}),S&&y.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:y.jsx(Dl,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),O.length===0||!S?null:y.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${A}`,children:O})]})]})},Jm=({setValuesDefault:t,status:l=!1,isReadOnly:i=!1,handleClick:s,text:c="",updateStatus:d=!1,id:p="",isHiddenText:h=!1,setForm:b,handleChange:S,textActive:O="Activo",textInactive:k="Inactivo"})=>{const[A,N]=n.useState(!1);n.useEffect(()=>{N(l),t("status",l),b(F=>({...F,status:l}))},[l,t,d,b]);const D=()=>{N(!A),t("status",!A),b(F=>({...F,status:!A})),S({target:{checked:!A,value:!A,name:"status",type:"",id:""}}),s&&s()};return y.jsxs("div",{className:"flex",children:[y.jsxs(Bp,{checked:A,onChange:D,className:x("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",A?"bg-success-1":"bg-gray-200"),"data-testid":`switch-${p}`,disabled:i,children:[y.jsx("span",{className:"sr-only",children:"Use setting"}),y.jsx("span",{"aria-hidden":"true",className:x("pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",A?"translate-x-full":"translate-x-0")})]}),c!==""?y.jsx("p",{className:x("text-sm font-medium text-gray-500 ml-2 self-end",h&&"hidden"),children:c}):y.jsx("p",{className:x("text-sm font-medium text-gray-500 ml-2 self-end",h&&"hidden"),"data-testid":"text-switch",children:A?O:k})]})};function Qm({label:t="",id:l,htmlFor:i="",classNameLabel:s="",className:c="",rows:d=4,name:p,placeholder:h="",helperText:b="",isReadOnly:S=!1,isError:O=!1,onChange:k,value:A,idInput:N,nameInput:D,placeholderInput:F="",isReadOnlyInput:$=!1,valueInput:U,infoTop:W=null,infoBottom:J=null,classNameInfoTop:de="h-4",classNameInfoBottom:ae="h-2",isInputTitle:be=!1,hiddenBorder:Ke=!1}){const Ue=xn({"ring-red-300 focus:ring-red-300 text-red-900":O,"focus:ring-indigo-600 text-gray-700":!O});return y.jsxs(y.Fragment,{children:[t!==""&&y.jsx("label",{htmlFor:i,className:x("leading-6 block text-sm",s!==""&&s),children:t}),y.jsxs("div",{className:"relative overflow-x-hidden",children:[W!==null&&y.jsx("div",{className:"absolute top-2 left-3 w-full",children:W}),y.jsxs("div",{className:x("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",Ue),children:[W!==null&&y.jsx("div",{className:"py-2","aria-hidden":"true",children:y.jsx("div",{className:"py-px",children:y.jsx("div",{className:de})})}),be&&y.jsx("textarea",{name:D,id:N,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:F,value:U,onChange:k,rows:2,readOnly:$}),y.jsx("textarea",{placeholder:h,rows:d,name:p,id:l,className:x(be||Ke?"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",Ue,c!==""&&c),readOnly:S,onChange:k,value:A,"data-testid":`textarea-${l}`}),J!==null&&y.jsx("div",{className:"py-2","aria-hidden":"true",children:y.jsx("div",{className:"py-px",children:y.jsx("div",{className:ae})})})]}),J!==null&&y.jsx("div",{className:"absolute bottom-2 left-3 w-full",children:J})]}),b.length>0&&O&&y.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${l}`,children:b})]})}const e0=({children:t,data:l,className:i="",classNameTooltip:s="w-full",classNameMenu:c="",classNameMenuItems:d="",classNameContainerSearch:p="px-5",isSelectMultiple:h=!1,optionsSelect:b,propObject:S="name",propId:O="id",textNewItem:k="",defaultId:A=null,loading:N=!1,search:D=null,searchPlaceHolder:F="Buscar...",valueSearch:$=void 0,idsOptionSelect:U=null,isComponent:W,isSticky:J=!1,hiddenMenu:de=!1,id:ae,onClick:be=()=>{},isRelative:Ke=!0,isMaxWidth:Ue=!1,isTag:xe=!1,isClear:Se=!1,clear:Ie=null,applyButton:ze=null,applyButtonText:dt="Aplicar",tagsParent:ht=[],isClearTagsParent:G=!1,isReadOnly:ft,isDisabledApplyButton:We=!0,isOpenMenu:xt=void 0})=>{const ce=n.useRef(null),Ve=n.useRef(null),[ct,Nt]=n.useState(new Set),[Lt,Et]=n.useState(new Map),[De,jt]=n.useState({}),[tt,At]=n.useState(!1);n.useEffect(()=>{U!==null&&Nt(new Set(new Set(U)))},[U]),n.useEffect(()=>{G&&Et(new Map)},[G]),n.useEffect(()=>{if(ht.length===0)return;const fe=new Map;ht.forEach(Ye=>fe.set(Ye.id,Ye)),Et(fe)},[ht]),n.useEffect(()=>{Se&&(Nt(new Set),Et(new Map),Ie&&Ie())},[Ie,Se]),n.useEffect(()=>{const fe=()=>{if(!Ve.current)return;const Ye=Ve.current.getBoundingClientRect();jt({position:"absolute",top:Ye.bottom+window.scrollY,left:Ye.left+window.scrollX,zIndex:10,width:Ye.width})};return fe(),window.addEventListener("scroll",fe,!0),window.addEventListener("resize",fe),()=>{window.removeEventListener("scroll",fe,!0),window.removeEventListener("resize",fe)}},[tt]),n.useEffect(()=>{const fe=()=>{document.body.dispatchEvent(new MouseEvent("click",{bubbles:!0}))};return window.addEventListener("scroll",fe,!0),()=>window.removeEventListener("scroll",fe,!0)},[]);const ie=fe=>{let Ye=new Map(Lt),kt=new Set(ct),yn=null;if(A!==null&&(fe[O]===A&&(yn=crypto.randomUUID()),yn!==null&&(fe[O]=yn),yn!==null&&(fe[S]=fe[S].replace(k,"").trim())),kt.has(fe[O])?kt.delete(fe[O]):kt.add(fe[O]),Ye.has(fe[O])?Ye.delete(fe[O]):Ye.set(fe[O],fe),!h){const yr=Array.from(kt),kn=Array.from(Ye);yr.shift(),kn.shift(),kt=kt.size===2?new Set(yr):kt,Ye=Ye.size===2?new Map(kn):Ye}b(fe,Array.from(kt),yn!==null),Nt(kt),Et(Ye)},Ce=fe=>{be(fe===!0?-1:ae),At(!tt)},ot=fe=>{const Ye=new Set(ct),kt=new Map(Lt);Ye.delete(fe[O]),kt.delete(fe[O]),b(fe,Array.from(Ye)),Nt(Ye),Et(kt)},zt=()=>{if(ct.size===0)return;const fe=new Set(ct),Ye=new Map(Lt);fe.clear(),Ye.clear(),b(null,Array.from(fe)),Nt(fe),Et(Ye)};function Ln(fe){if(typeof fe!="string")return fe;const Ye=fe.toLowerCase();return Ye.charAt(0).toUpperCase()+Ye.slice(1)}return y.jsxs(Kr,{as:"div",className:x("inline-block text-left",Ke&&"relative",c!==""&&c),onClick:()=>Ce(!0),"data-testid":`menu-${ae}`,id:ae,ref:ce,children:[y.jsx("style",{children:`
|
|
79
79
|
.blue {
|
|
80
80
|
background-color: #3758F9;
|
|
81
81
|
}
|
|
@@ -92,7 +92,7 @@ Check the top-level render call using <`+ee+">.")}return Z}}function Vi(j,Z){{if
|
|
|
92
92
|
width: 414px;
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
`}),y.jsx(Gr.Button,{as:"div",onClick:()=>ye(ae),"data-testid":`menu-button-${oe}`,ref:We,children:e}),u.createPortal(y.jsx("div",{style:Le,className:x(s,ae&&"hidden",N&&"w-full"),children:y.jsx(Nn,{as:n.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:gt,children:y.jsx(Gr.Items,{className:x("mt-1 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",N?"w-full":d===""&&"w-max",d!==""&&d),children:N?y.jsx("div",{className:"flex justify-center py-4",children:y.jsx(br,{})}):y.jsxs("div",{className:x(!z&&"pb-1",o!==""&&o,ze&&"w-custom"),"data-testid":"dropdown-menu",children:[y.jsxs("div",{className:"sticky top-0 bg-white w-full",children:[L!==null&&y.jsx("div",{className:x("py-2 w-full",p),children:y.jsx(nl,{htmlFor:"search",id:`dropdown-search-${oe}`,name:"search",type:"text",placeholder:P,handleChange:ce=>L(ce,oe),icon:P!==""&&y.jsx(gm,{className:"w-4 h-4 text-indigo-300"}),className:"pl-5 pr-4 h-8",classNameContainerInput:"w-full",value:A,onKeyDown:ce=>ce.key===" "&&ce.stopPropagation(),autocomplete:"off"})}),De!==null&&y.jsxs("div",{className:x("pt-1.5 justify-end flex items-center",p),children:[y.jsx(gr,{classNameButton:x("bg-gray-400 hover:bg-gray-400 font-medium px-2 py-1.5 rounded-md",lt.size>0?"opacity-1 cursor-pointer":"opacity-0 cursor-default"),outline:"",classNameText:"text-xs text-white text-center",id:"delete",onClick:zt,children:"Descartar"}),y.jsx(gr,{classNameButton:"bg-secondary-2 hover:bg-secondary-3 font-medium px-2 py-1.5 rounded-md",outline:lt.size===0&&_e?"":"0px 0px 0px 2px #3758F9, 0px 0px 0px 2px #243BBD, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameText:"text-xs text-white text-center",id:"apply",disabled:lt.size===0&&_e,onClick:()=>De({id:oe,items:Array.from(Rt.values())}),children:st})]})]}),ve&&!at&&y.jsx("div",{className:"flex flex-wrap ml-7 pt-1",children:Array.from(Rt).map((ce,He)=>y.jsx("div",{className:"mr-1",children:y.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:[ce[1][w],y.jsx("button",{type:"button",className:"p-0.5 rounded-sm bg-gray-100 hover:bg-gray-300",onClick:()=>Qe(ce[1]),"data-testid":`tag-${ce[0]}`,children:y.jsx(jm,{className:"h-2.5 w-2.5 stroke-gray-700/50 group-hover:stroke-gray-700/75"})})]})},ce))}),y.jsx("div",{className:"divide-y divide-gray-100",children:(at?[]:i).map((ce,He)=>y.jsx("div",{className:x(!z&&"py-1",X&&He===0&&"sticky top-0"),children:z?y.jsx("div",{onClick:Ot=>{Ot.preventDefault(),g()},"data-testid":`item-component-${He}`,children:ce}):y.jsx(Gr.Item,{children:y.jsx("span",{className:x(lt.has(ce[O])&&"blue text-white",!lt.has(ce[O])&&"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-${He}`,onClick:Ot=>{Ot.preventDefault(),ne(ce)},children:Ln(ce[w])})})},He))})]})})})}),document.body)]})},Di=50,Gm=({total:e,handleNext:i,handlePrev:o,handleSelectPage:s,page:c=null})=>{const[d,p]=n.useState(1),[h,g]=n.useState([]),[w,O]=n.useState([]),I=Math.ceil(e/Di);n.useEffect(()=>{const P=[];for(let A=1;A<=I;A++)P.push(A);O(P)},[I]),n.useEffect(()=>{let P=[];const A="...",U="... ",z=" ...";if(w.length<6)P=w;else if(d>=1&&d<=3)P=[1,2,3,4,A,w.length];else if(d===4)P=[...w.slice(0,5),A,w.length];else if(d>4&&d<w.length-2){const X=w.slice(d-2,d),ae=w.slice(d,d+1);P=[1,U,...X,...ae,z,w.length]}else if(d>w.length-3){const X=w.slice(w.length-4);P=[1,U,...X]}g(P)},[d,w]),n.useEffect(()=>{c!==null&&c!==d&&p(c)},[c,d]);const R=P=>{p(P),s(P)},N=()=>{p(d===1?d:d-1),d>1&&o(d-1)},L=()=>{d===w.length?p(d):p(d+1),d<w.length&&i(d+1)};return y.jsxs("nav",{className:"flex items-center justify-between border-t border-gray-200 px-4 sm:px-0",children:[y.jsx("div",{className:"-mt-px flex w-0 flex-1",children:y.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:N,"data-testid":"prev",children:[y.jsx(Kp,{className:"mr-3 h-5 w-5 text-gray-400","aria-hidden":"true"}),"Anterior"]})}),y.jsx("div",{className:"hidden md:-mt-px md:flex",children:h.map((P,A)=>y.jsx(Ri,{className:x("inline-flex items-center border-t-2 px-4 pt-4 text-sm font-medium",d===P?"border-indigo-500 text-indigo-600":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700"),"aria-current":"page",onClick:()=>P!=="..."&&P!==" ..."&&P!=="... "&&R(P),id:`page-${A+1}`,children:P},A))}),y.jsx("div",{className:"-mt-px flex w-0 flex-1 justify-end",children:y.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:L,"data-testid":"next",children:["Siguiente",y.jsx(Jp,{className:"ml-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]})})]})},qm=({setForm:e,setValuesDefault:i,className:o="",classNameContainer:s="",classNameContainerImg:c="",src:d=null,alt:p=null,width:h,height:g})=>{const w=O=>{const{files:I}=O.target,[R]=I,N=new FileReader;N.readAsDataURL(R),N.onload=function(){e(L=>({...L,photo:N.result})),i("photo",N.result)}};return y.jsxs("div",{className:x("col-span-full",s!==""&&s),children:[y.jsx("label",{htmlFor:"cover-photo",className:"block text-sm font-medium leading-6 text-gray-500",children:"Logo (Opcional)"}),y.jsxs("div",{className:x("mt-2 flex justify-center rounded-lg border-2 border-dotted border-gray-300 cursor-pointer relative",d===null&&"px-9 pt-6 pb-2.5",c!==""&&c),children:[d?y.jsx("img",{src:d,alt:p,width:h,height:g,className:x(o!==""&&o),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s",objectFit:"contain",height:g},onLoad:O=>O.currentTarget.style.filter="none","data-testid":"img"}):y.jsxs("div",{className:"text-center",children:[y.jsx(wm,{"aria-hidden":"true",className:"mx-auto h-12 w-12 text-gray-300"}),y.jsxs("div",{className:"mt-4 flex text-sm leading-6 text-gray-600",children:[y.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:y.jsx("span",{children:"Upload a file"})}),y.jsx("p",{className:"pl-1",children:"or drag and drop"})]}),y.jsx("p",{className:"text-xs leading-5 text-gray-600",children:"PNG, JPG, GIF up to 10MB"})]}),y.jsx("input",{id:"file-upload",name:"file-upload",type:"file",className:"absolute w-full h-full opacity-0 cursor-pointer",onChange:w})]})]})},Km=({children:e,openDefault:i=!1,setForm:o,setValuesDefault:s,title:c,type:d,data:p,setData:h,id:g,defaultData:w,dispatch:O,isAdd:I=!0,search:R=null,isPadding:N=!0,isReadOnly:L=!1,isEdit:P=!1,deleteItem:A=null,validateAdd:U=null,loading:z=!1,internalEdit:X=!0,isDataEmpty:ae=!0,typeProp:oe="value",setAdd:he=null,hasNoRecords:Ve=!0,tabs:ze=null,selectTab:ve=null})=>{const[xe,Se]=n.useState(!1),[De,st]=n.useState(!1),[,ft]=n.useState(!1),[Y,at]=n.useState(""),[_e,gt]=n.useState(1);n.useEffect(()=>{Se(i),ft(L)},[i,L]);const ie=({e:Le,index:St})=>{const Ke=m(p),{name:At,value:ne}=Le.target;!(U!==null&&U({value:ne,copyData:Ke,index:St}))&&(Ke[St][At]=ne),h(Ke),s(g,Ke),o(ye=>({...ye,[g]:Ke}))},We=()=>{if(p.some(Le=>Object.values(Le).some(St=>St[oe]===-1))||p.length===0)return O({type:"ALERT",payload:{title:"",message:"Todos los campos son requeridos",typeAlert:"warning",active:!0}});o(Le=>({...Le,data:p})),s(g,p),h([...p,w]),he&&he([...p,w])},lt=({index:Le,item:St})=>{if(p.length===1&&!P)return;const Ke=m(p);Ke.splice(Le,1),o(At=>({...At,data:Ke})),s(g,Ke),h(Ke),A&&A({index:Le,item:St,data:Ke}),Le===p.length-1&&P&&Ke.length===0&&(o(At=>({...At,data:Ke})),s(g,Ke),h([...Ke,w]))},Tt=()=>{st(!De),ft(!1)},Rt=()=>{if(p.length>1)return;if(p.length===0)return!0;const[Le]=p,{rol:St,privileges:Ke,limitedPrivileges:At,...ne}=Le;return Object.values(ne).every(ye=>Object.values(ye)[0]===-1)},yt=({tab:Le})=>{gt(Le.id),ve&&ve({tab:Le})};return y.jsxs("div",{className:"divide-y divide-gray-200 rounded-lg bg-white shadow mt-7",children:[y.jsxs("div",{className:"px-4 py-3.5 sm:px-6 flex justify-between items-center cursor-pointer",onClick:()=>Se(!xe),"data-testid":`open-accordion-${g}`,children:[y.jsx("p",{className:"text-gray-500 uppercase text-xs font-bold",children:c}),y.jsxs("div",{className:"flex items-center",children:[R&&y.jsx(nl,{htmlFor:"search",id:"search",name:"search",type:"text",autoComplete:"search",placeholder:"Buscar...",handleChange:Le=>{R(Le),at(Le.target.value)},icon:y.jsx(Dm,{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:Y,onClick:Le=>Le.stopPropagation(),onFocus:()=>Se(!0)}),xe?y.jsx(Lm,{className:"w-5 h-5 text-default-5"}):y.jsx(Mm,{className:"w-5 h-5 text-default-5"})]})]}),y.jsx(Nn,{as:n.Fragment,show:xe,enter:"transition duration-[400ms]",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"duration-200 transition ease-in-out",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:y.jsxs("div",{children:[ze&&y.jsx("nav",{className:"flex justify-center border-b border-gray-200","aria-label":"Tabs",children:ze.map(Le=>y.jsx("span",{className:x(_e===Le.id?"border-indigo-500 text-gray-900":"border-gray-300 text-gray-500 hover:border-indigo-500","whitespace-nowrap border-b-2 py-2.5 px-2 text-sm font-medium cursor-pointer"),"aria-current":_e===Le.id?"page":void 0,onClick:()=>yt({tab:Le}),"data-testid":`tab-${Le.id}`,children:Le.name},Le.name))}),y.jsxs("div",{className:x("sm:mt-2.5 py-3.5 relative",N&&ze===null&&"px-4 sm:p-6",N&&ze!==null&&"px-4 sm:px-6 sm:pb-6 sm:pt-2.5"),children:[X&&!De&&y.jsx(xm,{className:"w-5 h-5 text-gray-400 cursor-pointer absolute right-4",onClick:Tt,"data-testid":`edit-role-${g}`}),z&&y.jsx("div",{className:"flex justify-center mt-5",children:y.jsx(br,{})}),ae&&Rt()&&Ve&&!z&&(X?!De:!P)&&y.jsx("p",{className:"text-gray-800 text-center","data-testid":"records-empty",children:"No hay registros para mostrar"}),!z&&p.map((Le,St)=>y.jsxs("div",{className:x("flex flex-col 3xs:flex-row mb-4",N&&"ml-0 3xs:ml-3"),children:[typeof e=="function"?e({item:Le,index:St,handleChange:ie,isEdit:X?De:P}):e,I&&(X?De:P)&&y.jsx("div",{style:{backgroundColor:"#B0B8BF",width:"25px",height:"25px"},className:x("rounded-full flex justify-center items-center mt-4 3xs:mt-7 ml-2 3xs:ml-5 self-start 3xs:self-center",p.length===1&&!P&&"opacity-0"),children:y.jsx(_m,{className:x("w-6 h-4",(p.length>1||P)&&"cursor-pointer"),style:{color:"#637381"},strokeWidth:2.5,onClick:()=>lt({index:St,item:Le}),"data-testid":`delete-item-${St}-${g}`})})]},St)),I&&(X?De:P)&&!z&&y.jsx("p",{className:"text-secondary-2 text-sm font-medium ml-3 cursor-pointer",onClick:We,"data-testid":`add-item-${g}`,style:{width:"fit-content"},children:`+ Añadir ${d}`})]})]})})]})},Xm=({src:e,alt:i,width:o,height:s,className:c="",priority:d=!1,style:p={},id:h=""})=>{const[g,w]=n.useState(!1),O={filter:g?"none":"blur(10px)",transition:"filter 0.3s ease-out",objectFit:"cover",...o?{width:o}:{},...s?{height:s}:{},...p};return y.jsx("img",{src:e,alt:i,...o?{width:o}:{},...s?{height:s}:{},className:x(c!==""&&c),loading:d?"eager":"lazy",decoding:"async",style:O,onLoad:()=>w(!0),"data-testid":`image-${h}`})};r.Accordion=Km,r.Alert=pm,r.Avatar=Tm,r.Bullets=Om,r.ButtonOutline=Mi,r.ButtonPagination=Ri,r.ButtonSolid=gr,r.Checkbox=Im,r.ConfirmationAbandoningCreation=Bm,r.CoverPhoto=qm,r.Divider=zm,r.Dropdown=Ym,r.GoBack=Wm,r.Image=Xm,r.Input=nl,r.InputDropdown=Um,r.MESSAGE_ABORT_CONTROLLER=M,r.MESSAGE_SIGNAL_ABORTED_WITHOUT_REASON=C,r.Modal=Li,r.Pagination=Gm,r.Select=Ai,r.Spinner=Hm,r.SpinnerIcon=br,r.Switch=Vm,r.Textarea=Zm,r.Tooltip=tl,r.classNames=x,r.copyOptions=m,r.generateAvatarInitials=E,r.isPromise=k,r.rowsPerPage=Di,r.useCloseModal=F,r.useForm=D,r.useMediaQuery=$,r.useWindowDimensions=B,r.validateEmail=v,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})})})(ko,ko.exports);var oi=ko.exports;const Po=({className:t="",classNameContainer:l="",children:r,message:n="",style:u={}})=>{const[f,a]=b.useState(!1),[m,v]=b.useState({top:0,left:0}),x=b.useRef(null),E=()=>{if(n==="")return;const C=x.current.getBoundingClientRect();v({top:C.bottom+window.scrollY,left:C.left+window.scrollX}),a(!0)},k=()=>{a(!1)},M=T.jsx(Cn,{as:b.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:f,children:T.jsx("div",{className:oi.classNames("absolute z-40 px-4 mt-0 sm:px-0",t!==""&&t),style:{top:m.top,left:m.left,position:"absolute"},children:T.jsx("div",{className:"bg-white p-2 text-center rounded-lg shadow-lg ring-1 ring-black ring-opacity-5",onMouseEnter:E,onMouseLeave:k,"data-testid":"message",children:typeof n=="object"?"":n})})});return T.jsxs(T.Fragment,{children:[T.jsx("div",{ref:x,className:oi.classNames("inline-block",l!==""&&l),onMouseEnter:E,onMouseLeave:k,"data-testid":"container-tooltip",style:u,children:r}),typeof window<"u"&&wr.createPortal(M,document.body)]})},Lr=({placeholder:t="",label:l="",htmlFor:r,type:n="text",name:u,handleChange:f,onClick:a=()=>{},value:m,isReadOnly:v=!1,isError:x=!1,helperText:E="",autocomplete:k="off",id:M,classNameLabel:C="",classNameContainerInput:F="",classNameContainer:D="",className:$="",icon:B=null,onKeyDown:_,onFocus:W,min:K,max:re,maxWidth:fe=5e3})=>{const[Ce,Ne]=b.useState(!1),Oe=mn({"ring-red-300 focus:ring-red-300 text-red-900":x||Ce,"focus:ring-indigo-600 text-gray-500":!x&&!Ce}),y=me=>{if(f&&f(me),n!=="email")return;const{value:Fe}=me.target,Be=al(Fe);Ne(!Be)};return T.jsxs("div",{"data-testid":`container-input-${M}`,className:D,children:[l!==""&&T.jsx("label",{htmlFor:r,className:se("block text-sm font-medium leading-6",!C.includes("mb-")&&"mb-0.5",C!==""?C:"text-gray-700"),"data-testid":`label-${M}`,children:l}),T.jsxs("div",{className:se("relative rounded-md",F!==""&&F),children:[T.jsx(Po,{className:"text-sm",classNameContainer:"w-full",message:n==="password"?"":m,children:T.jsx("input",{id:M,name:u,type:n,autoComplete:k,placeholder:t,onChange:y,onClick:a,onKeyDown:_,onFocus:W,value:m,readOnly:v,"data-testid":`input-${M}`,min:K,className:se("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 truncate",Oe,$!==""&&$),style:{maxWidth:`${fe}px`}})}),B!==null&&T.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3",children:B}),x&&B===null&&T.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:T.jsx(Ql,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),E.length===0||!x?null:T.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${M}`,children:E})]})};function Jn({className:t="w-6 h-6",color:l="#3730a3"}){return T.jsxs("svg",{className:se("fill-current animate-spin",t),viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:l,strokeWidth:"4",fill:"none"}),T.jsx("path",{fill:l,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 id(){return T.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:[T.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"}),T.jsx(Jn,{className:"w-8 h-8 animate-spin"})]})}const li=({height:t="36px",style:l={},styleMenu:r={},label:n="",onChange:u,isReadOnly:f=!1,isError:a=!1,helperText:m="",name:v,id:x,className:E="",classNameLabel:k="",classNameInput:M="",options:C,value:F=-1,defaultValue:D={value:-1,label:"",iconStart:null,iconEnd:null},defaultLabel:$="label",defaultId:B="value",bgOptionSelect:_="bg-indigo-600",isSearch:W=!1,loading:K=!1,isSingleOptionAndFirstLoad:re=!0,isTest:fe=!1})=>{const Ce=b.useRef(!0),[Ne,Oe]=b.useState(""),[y,me]=b.useState(D),[Fe,Be]=b.useState(!1);b.useEffect(()=>{if((C==null?void 0:C.length)!==1||!Ce.current)return;Ce.current=!1;const[ue]=C,Ie=ue[B],Xe=ue[$];me({value:Ie,label:Xe}),re&&u({target:{value:ue,checked:!1,name:v,type:void 0,id:ue[B]}})},[C,B,$,u,v,re]),b.useEffect(()=>{if(F===-1||(C==null?void 0:C.length)===0)return;const ue=C==null?void 0:C.find(Ie=>Ie[B]===F);ue&&me(ue)},[F,C,B]),b.useEffect(()=>{F==="clear"&&(y[B]!==D[B]||y[$]!==D[$]||fe)&&me(D)},[D,fe,y,F,B,$]);const it=Ne===""?C:C.filter(ue=>ue[$].normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().includes(Ne.toLowerCase())),V=mn({"ring-red-300 focus:ring-red-300 text-red-900":a&&!f,"text-gray-500":!a,"focus:ring-indigo-600":!a&&!f}),rt=mn({"text-red-400":a&&!f,"text-gray-400":!a}),$e=ue=>{me(ue),u({target:{value:ue,checked:!1,name:v,type:void 0,id:ue[B]}})};return T.jsxs(rn,{as:"div",value:y,children:[T.jsx(rn.Label,{className:se("block text-sm font-medium leading-6 text-gray-500 mb-0.5",k!==""&&k),children:n}),T.jsxs("div",{className:se("relative",E!==""&&E),children:[T.jsx(Po,{className:"text-sm",classNameContainer:"w-full",message:y[$],children:T.jsxs(rn.Button,{className:"w-full","data-testid":`listbox-button-${x}`,children:[y.iconStart&&T.jsx("span",{className:"absolute inset-y-0 left-0 flex items-center pl-2",children:y.iconStart}),T.jsx(rn.Input,{className:se("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",!a&&!f&&"ring-inset focus:ring-inset focus:ring-2 focus:ring-indigo-600",f&&"focus:ring-gray-300",V,M!==""&&M),onChange:ue=>Oe(ue.target.value.normalize("NFD").replace(/[\u0300-\u036f]/g,"")),displayValue:ue=>{var Ie;return(Ie=ue[$])==null?void 0:Ie.trim()},autoComplete:"off",readOnly:!W||f,style:{height:t,...l},"data-testid":"input-search",onClick:()=>Be(f?!1:!Fe),onBlur:()=>Be(!1)})]})}),y.iconEnd&&T.jsx("span",{className:"absolute inset-y-0 right-4 flex items-center pr-4",children:y.iconEnd}),!f&&T.jsx(rn.Button,{className:"absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none",onClick:()=>Be(f?!1:!Fe),"data-testid":"arrow-button",children:T.jsx(wc,{className:se("h-5 w-5 ml-auto transition-transform","transform",Fe&&"rotate-180",rt)})}),!f&&T.jsx(T.Fragment,{children:K?T.jsx(rn.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:T.jsx(Jn,{})}):(it??[]).length>0?T.jsx(rn.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",style:r,children:it.map((ue,Ie)=>T.jsx(rn.Option,{value:ue,className:se(ue[B]===y[B]?`${_} text-white`:"text-gray-900",`relative cursor-default select-none p-2 hover:text-white hover:${_}`),"data-testid":`select-${x}-${ue[B]}`,onClick:()=>$e(ue),children:T.jsxs("div",{className:"flex justify-between items-center",children:[T.jsxs("div",{className:"flex items-center",children:[ue.iconStart&&T.jsx("span",{className:"mr-2","aria-hidden":"true",children:ue.iconStart}),T.jsx("span",{className:"font-normal hyphens-auto break-words overflow-hidden",children:ue[$]})]}),ue.iconEnd&&T.jsx("span",{className:"ml-2","aria-hidden":"true",children:ue.iconEnd})]})},Ie))}):T.jsx(rn.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:T.jsx("p",{"data-testid":"empty-options",children:"Sin opciones"})})})]}),m.length>0&&a&&T.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${x}`,children:m})]})},sd=({placeholder:t="",label:l="",htmlFor:r,name:n,handleChange:u,onClick:f=()=>{},value:a,valueSelect:m,isReadOnly:v=!1,isError:x=!1,helperText:E="",autocomplete:k="on",id:M,classNameLabel:C="",classNameContainer:F="",className:D="",onKeyDown:$,options:B,idSelect:_,isMarginLeft:W=!0,classNameSelect:K="w-20",type:re="text"})=>{const{width:fe}=ul(),Ce=mn({"ring-red-300 focus:ring-red-300 text-red-900":x,"focus:ring-indigo-600 text-gray-500":!x});return T.jsxs(T.Fragment,{children:[T.jsx("style",{children:`
|
|
95
|
+
`}),y.jsx(Kr.Button,{as:"div",onClick:()=>Ce(de),"data-testid":`menu-button-${ae}`,ref:Ve,children:t}),u.createPortal(y.jsx("div",{style:De,className:x(s,de&&"hidden",N&&"w-full"),children:y.jsx(Nn,{as:n.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:xt,children:y.jsx(Kr.Items,{className:x("mt-1 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",N?"w-full":d===""&&"w-max",d!==""&&d),children:N?y.jsx("div",{className:"flex justify-center py-4",children:y.jsx(xr,{})}):y.jsxs("div",{className:x(!W&&"pb-1",i!==""&&i,Ue&&"w-custom"),"data-testid":"dropdown-menu",children:[y.jsxs("div",{className:"sticky top-0 bg-white w-full",children:[D!==null&&y.jsx("div",{className:x("py-2 w-full",p),children:y.jsx(ii,{htmlFor:"search",id:`dropdown-search-${ae}`,name:"search",type:"text",placeholder:F,handleChange:fe=>D(fe,ae),icon:F!==""&&y.jsx(Cm,{className:"w-4 h-4 text-indigo-300"}),className:"pl-5 pr-4 h-8",classNameContainerInput:"w-full",value:$,onKeyDown:fe=>fe.key===" "&&fe.stopPropagation(),autocomplete:"off"})}),ze!==null&&y.jsxs("div",{className:x("pt-1.5 justify-end flex items-center",p),children:[y.jsx(br,{classNameButton:x("bg-gray-400 hover:bg-gray-400 font-medium px-2 py-1.5 rounded-md",ct.size>0?"opacity-1 cursor-pointer":"opacity-0 cursor-default"),outline:"",classNameText:"text-xs text-white text-center",id:"delete",onClick:zt,children:"Descartar"}),y.jsx(br,{classNameButton:"bg-secondary-2 hover:bg-secondary-3 font-medium px-2 py-1.5 rounded-md",outline:ct.size===0&&We?"":"0px 0px 0px 2px #3758F9, 0px 0px 0px 2px #243BBD, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameText:"text-xs text-white text-center",id:"apply",disabled:ct.size===0&&We,onClick:()=>ze({id:ae,items:Array.from(Lt.values())}),children:dt})]})]}),xe&&!ft&&y.jsx("div",{className:"flex flex-wrap ml-7 pt-1",children:Array.from(Lt).map((fe,Ye)=>y.jsx("div",{className:"mr-1",children:y.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:[fe[1][S],y.jsx("button",{type:"button",className:"p-0.5 rounded-sm bg-gray-100 hover:bg-gray-300",onClick:()=>ot(fe[1]),"data-testid":`tag-${fe[0]}`,children:y.jsx(Pm,{className:"h-2.5 w-2.5 stroke-gray-700/50 group-hover:stroke-gray-700/75"})})]})},fe))}),y.jsx("div",{className:"divide-y divide-gray-100",children:(ft?[]:l).map((fe,Ye)=>y.jsx("div",{className:x(!W&&"py-1",J&&Ye===0&&"sticky top-0"),children:W?y.jsx("div",{onClick:kt=>{kt.preventDefault(),b()},"data-testid":`item-component-${Ye}`,children:fe}):y.jsx(Kr.Item,{children:y.jsx("span",{className:x(ct.has(fe[O])&&"blue text-white",!ct.has(fe[O])&&"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-${Ye}`,onClick:kt=>{kt.preventDefault(),ie(fe)},children:Ln(fe[S])})})},Ye))})]})})})}),document.body)]})},Hl=50,t0=({total:t,handleNext:l,handlePrev:i,handleSelectPage:s,page:c=null})=>{const[d,p]=n.useState(1),[h,b]=n.useState([]),[S,O]=n.useState([]),k=Math.ceil(t/Hl);n.useEffect(()=>{const F=[];for(let $=1;$<=k;$++)F.push($);O(F)},[k]),n.useEffect(()=>{let F=[];const $="...",U="... ",W=" ...";if(S.length<6)F=S;else if(d>=1&&d<=3)F=[1,2,3,4,$,S.length];else if(d===4)F=[...S.slice(0,5),$,S.length];else if(d>4&&d<S.length-2){const J=S.slice(d-2,d),de=S.slice(d,d+1);F=[1,U,...J,...de,W,S.length]}else if(d>S.length-3){const J=S.slice(S.length-4);F=[1,U,...J]}b(F)},[d,S]),n.useEffect(()=>{c!==null&&c!==d&&p(c)},[c,d]);const A=F=>{p(F),s(F)},N=()=>{p(d===1?d:d-1),d>1&&i(d-1)},D=()=>{d===S.length?p(d):p(d+1),d<S.length&&l(d+1)};return y.jsxs("nav",{className:"flex items-center justify-between border-t border-gray-200 px-4 sm:px-0",children:[y.jsx("div",{className:"-mt-px flex w-0 flex-1",children:y.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:N,"data-testid":"prev",children:[y.jsx(rm,{className:"mr-3 h-5 w-5 text-gray-400","aria-hidden":"true"}),"Anterior"]})}),y.jsx("div",{className:"hidden md:-mt-px md:flex",children:h.map((F,$)=>y.jsx(Bl,{className:x("inline-flex items-center border-t-2 px-4 pt-4 text-sm font-medium",d===F?"border-indigo-500 text-indigo-600":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700"),"aria-current":"page",onClick:()=>F!=="..."&&F!==" ..."&&F!=="... "&&A(F),id:`page-${$+1}`,children:F},$))}),y.jsx("div",{className:"-mt-px flex w-0 flex-1 justify-end",children:y.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:D,"data-testid":"next",children:["Siguiente",y.jsx(im,{className:"ml-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]})})]})},n0=({setForm:t,setValuesDefault:l,className:i="",classNameContainer:s="",classNameContainerImg:c="",src:d=null,alt:p=null,width:h,height:b})=>{const S=O=>{const{files:k}=O.target,[A]=k,N=new FileReader;N.readAsDataURL(A),N.onload=function(){t(D=>({...D,photo:N.result})),l("photo",N.result)}};return y.jsxs("div",{className:x("col-span-full",s!==""&&s),children:[y.jsx("label",{htmlFor:"cover-photo",className:"block text-sm font-medium leading-6 text-gray-500",children:"Logo (Opcional)"}),y.jsxs("div",{className:x("mt-2 flex justify-center rounded-lg border-2 border-dotted border-gray-300 cursor-pointer relative",d===null&&"px-9 pt-6 pb-2.5",c!==""&&c),children:[d?y.jsx("img",{src:d,alt:p,width:h,height:b,className:x(i!==""&&i),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s",objectFit:"contain",height:b},onLoad:O=>O.currentTarget.style.filter="none","data-testid":"img"}):y.jsxs("div",{className:"text-center",children:[y.jsx(Nm,{"aria-hidden":"true",className:"mx-auto h-12 w-12 text-gray-300"}),y.jsxs("div",{className:"mt-4 flex text-sm leading-6 text-gray-600",children:[y.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:y.jsx("span",{children:"Upload a file"})}),y.jsx("p",{className:"pl-1",children:"or drag and drop"})]}),y.jsx("p",{className:"text-xs leading-5 text-gray-600",children:"PNG, JPG, GIF up to 10MB"})]}),y.jsx("input",{id:"file-upload",name:"file-upload",type:"file",className:"absolute w-full h-full opacity-0 cursor-pointer",onChange:S})]})]})},r0=({children:t,openDefault:l=!1,setForm:i,setValuesDefault:s,title:c,type:d,data:p,setData:h,id:b,defaultData:S,dispatch:O,isAdd:k=!0,search:A=null,isPadding:N=!0,isReadOnly:D=!1,isEdit:F=!1,deleteItem:$=null,validateAdd:U=null,loading:W=!1,internalEdit:J=!0,isDataEmpty:de=!0,typeProp:ae="value",setAdd:be=null,hasNoRecords:Ke=!0,tabs:Ue=null,selectTab:xe=null})=>{const[Se,Ie]=n.useState(!1),[ze,dt]=n.useState(!1),[,ht]=n.useState(!1),[G,ft]=n.useState(""),[We,xt]=n.useState(1);n.useEffect(()=>{Ie(l),ht(D)},[l,D]);const ce=({e:De,index:jt})=>{const tt=m(p),{name:At,value:ie}=De.target;!(U!==null&&U({value:ie,copyData:tt,index:jt}))&&(tt[jt][At]=ie),h(tt),s(b,tt),i(Ce=>({...Ce,[b]:tt}))},Ve=()=>{if(p.some(De=>Object.values(De).some(jt=>jt[ae]===-1))||p.length===0)return O({type:"ALERT",payload:{title:"",message:"Todos los campos son requeridos",typeAlert:"warning",active:!0}});i(De=>({...De,data:p})),s(b,p),h([...p,S]),be&&be([...p,S])},ct=({index:De,item:jt})=>{if(p.length===1&&!F)return;const tt=m(p);tt.splice(De,1),i(At=>({...At,data:tt})),s(b,tt),h(tt),$&&$({index:De,item:jt,data:tt}),De===p.length-1&&F&&tt.length===0&&(i(At=>({...At,data:tt})),s(b,tt),h([...tt,S]))},Nt=()=>{dt(!ze),ht(!1)},Lt=()=>{if(p.length>1)return;if(p.length===0)return!0;const[De]=p,{rol:jt,privileges:tt,limitedPrivileges:At,...ie}=De;return Object.values(ie).every(Ce=>Object.values(Ce)[0]===-1)},Et=({tab:De})=>{xt(De.id),xe&&xe({tab:De})};return y.jsxs("div",{className:"divide-y divide-gray-200 rounded-lg bg-white shadow mt-7",children:[y.jsxs("div",{className:"px-4 py-3.5 sm:px-6 flex justify-between items-center cursor-pointer",onClick:()=>Ie(!Se),"data-testid":`open-accordion-${b}`,children:[y.jsx("p",{className:"text-gray-500 uppercase text-xs font-bold",children:c}),y.jsxs("div",{className:"flex items-center",children:[A&&y.jsx(ii,{htmlFor:"search",id:"search",name:"search",type:"text",autoComplete:"search",placeholder:"Buscar...",handleChange:De=>{A(De),ft(De.target.value)},icon:y.jsx(Um,{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:G,onClick:De=>De.stopPropagation(),onFocus:()=>Ie(!0)}),Se?y.jsx(Wm,{className:"w-5 h-5 text-default-5"}):y.jsx(Bm,{className:"w-5 h-5 text-default-5"})]})]}),y.jsx(Nn,{as:n.Fragment,show:Se,enter:"transition duration-[400ms]",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"duration-200 transition ease-in-out",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:y.jsxs("div",{children:[Ue&&y.jsx("nav",{className:"flex justify-center border-b border-gray-200","aria-label":"Tabs",children:Ue.map(De=>y.jsx("span",{className:x(We===De.id?"border-indigo-500 text-gray-900":"border-gray-300 text-gray-500 hover:border-indigo-500","whitespace-nowrap border-b-2 py-2.5 px-2 text-sm font-medium cursor-pointer"),"aria-current":We===De.id?"page":void 0,onClick:()=>Et({tab:De}),"data-testid":`tab-${De.id}`,children:De.name},De.name))}),y.jsxs("div",{className:x("sm:mt-2.5 py-3.5 relative",N&&Ue===null&&"px-4 sm:p-6",N&&Ue!==null&&"px-4 sm:px-6 sm:pb-6 sm:pt-2.5"),children:[J&&!ze&&y.jsx(Tm,{className:"w-5 h-5 text-gray-400 cursor-pointer absolute right-4",onClick:Nt,"data-testid":`edit-role-${b}`}),W&&y.jsx("div",{className:"flex justify-center mt-5",children:y.jsx(xr,{})}),de&&Lt()&&Ke&&!W&&(J?!ze:!F)&&y.jsx("p",{className:"text-gray-800 text-center","data-testid":"records-empty",children:"No hay registros para mostrar"}),!W&&p.map((De,jt)=>y.jsxs("div",{className:x("flex flex-col 3xs:flex-row mb-4",N&&"ml-0 3xs:ml-3"),children:[typeof t=="function"?t({item:De,index:jt,handleChange:ce,isEdit:J?ze:F}):t,k&&(J?ze:F)&&y.jsx("div",{style:{backgroundColor:"#B0B8BF",width:"25px",height:"25px"},className:x("rounded-full flex justify-center items-center mt-4 3xs:mt-7 ml-2 3xs:ml-5 self-start 3xs:self-center",p.length===1&&!F&&"opacity-0"),children:y.jsx(Ym,{className:x("w-6 h-4",(p.length>1||F)&&"cursor-pointer"),style:{color:"#637381"},strokeWidth:2.5,onClick:()=>ct({index:jt,item:De}),"data-testid":`delete-item-${jt}-${b}`})})]},jt)),k&&(J?ze:F)&&!W&&y.jsx("p",{className:"text-secondary-2 text-sm font-medium ml-3 cursor-pointer",onClick:Ve,"data-testid":`add-item-${b}`,style:{width:"fit-content"},children:`+ Añadir ${d}`})]})]})})]})},o0=({src:t,alt:l,width:i,height:s,className:c="",priority:d=!1,style:p={},id:h=""})=>{const[b,S]=n.useState(!1),O={filter:b?"none":"blur(10px)",transition:"filter 0.3s ease-out",objectFit:"cover",...i?{width:i}:{},...s?{height:s}:{},...p};return y.jsx("img",{src:t,alt:l,...i?{width:i}:{},...s?{height:s}:{},className:x(c!==""&&c),loading:d?"eager":"lazy",decoding:"async",style:O,onLoad:()=>S(!0),"data-testid":`image-${h}`})};r.Accordion=r0,r.Alert=ym,r.Avatar=Fm,r.Bullets=Rm,r.ButtonOutline=_l,r.ButtonPagination=Bl,r.ButtonSolid=br,r.Checkbox=Am,r.ConfirmationAbandoningCreation=Zm,r.CoverPhoto=n0,r.Divider=Gm,r.Dropdown=e0,r.GoBack=qm,r.Image=o0,r.Input=ii,r.InputDropdown=Xm,r.MESSAGE_ABORT_CONTROLLER=P,r.MESSAGE_SIGNAL_ABORTED_WITHOUT_REASON=C,r.Modal=zl,r.Pagination=t0,r.Select=Wl,r.Spinner=Km,r.SpinnerIcon=xr,r.Switch=Jm,r.Textarea=Qm,r.Tooltip=oi,r.classNames=x,r.copyOptions=m,r.generateAvatarInitials=E,r.isPromise=I,r.rowsPerPage=Hl,r.useCloseModal=M,r.useForm=R,r.useMediaQuery=L,r.useWindowDimensions=B,r.validateEmail=v,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})})})(Po,Po.exports);var ul=Po.exports;const Fo=({className:e="",classNameContainer:o="",children:r,message:n="",style:u={}})=>{const[f,a]=g.useState(!1),[m,v]=g.useState({top:0,left:0}),x=g.useRef(null),E=()=>{if(n==="")return;const C=x.current.getBoundingClientRect();v({top:C.bottom+window.scrollY,left:C.left+window.scrollX}),a(!0)},I=()=>{a(!1)},P=w.jsx(Cn,{as:g.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:f,children:w.jsx("div",{className:ul.classNames("absolute z-40 px-4 mt-0 sm:px-0",e!==""&&e),style:{top:m.top,left:m.left,position:"absolute"},children:w.jsx("div",{className:"bg-white p-2 text-center rounded-lg shadow-lg ring-1 ring-black ring-opacity-5",onMouseEnter:E,onMouseLeave:I,"data-testid":"message",children:typeof n=="object"?"":n})})});return w.jsxs(w.Fragment,{children:[w.jsx("div",{ref:x,className:ul.classNames("inline-block",o!==""&&o),onMouseEnter:E,onMouseLeave:I,"data-testid":"container-tooltip",style:u,children:r}),typeof window<"u"&&Er.createPortal(P,document.body)]})},Ar=({placeholder:e="",label:o="",htmlFor:r,type:n="text",name:u,handleChange:f,onClick:a=()=>{},value:m,isReadOnly:v=!1,isError:x=!1,helperText:E="",autocomplete:I="off",id:P,classNameLabel:C="",classNameContainerInput:M="",classNameContainer:R="",className:L="",icon:B=null,onKeyDown:_,onFocus:z,min:X,max:te,maxWidth:ue=5e3})=>{const[we,je]=g.useState(!1),ge=Yt({"ring-red-300 focus:ring-red-300 text-red-900":x||we,"focus:ring-indigo-600 text-gray-500":!x&&!we}),y=pe=>{if(f&&f(pe),n!=="email")return;const{value:Pe}=pe.target,$e=di(Pe);je(!$e)};return w.jsxs("div",{"data-testid":`container-input-${P}`,className:R,children:[o!==""&&w.jsx("label",{htmlFor:r,className:le("block text-sm font-medium leading-6",!C.includes("mb-")&&"mb-0.5",C!==""?C:"text-gray-700"),"data-testid":`label-${P}`,children:o}),w.jsxs("div",{className:le("relative rounded-md",M!==""&&M),children:[w.jsx(Fo,{className:"text-sm",classNameContainer:"w-full",message:n==="password"?"":m,children:w.jsx("input",{id:P,name:u,type:n,autoComplete:I,placeholder:e,onChange:y,onClick:a,onKeyDown:_,onFocus:z,value:m,readOnly:v,"data-testid":`input-${P}`,min:X,className:le("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 truncate",ge,L!==""&&L),style:{maxWidth:`${ue}px`}})}),B!==null&&w.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3",children:B}),x&&B===null&&w.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:w.jsx(rl,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),E.length===0||!x?null:w.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${P}`,children:E})]})};function Jn({className:e="w-6 h-6",color:o="#3730a3"}){return w.jsxs("svg",{className:le("fill-current animate-spin",e),viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[w.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:o,strokeWidth:"4",fill:"none"}),w.jsx("path",{fill:o,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 cd(){return w.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:[w.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"}),w.jsx(Jn,{className:"w-8 h-8 animate-spin"})]})}const cl=({height:e="36px",style:o={},styleMenu:r={},label:n="",onChange:u,isReadOnly:f=!1,isError:a=!1,helperText:m="",name:v,id:x,className:E="",classNameLabel:I="",classNameInput:P="",options:C,value:M=-1,defaultValue:R={value:-1,label:"",iconStart:null,iconEnd:null},defaultLabel:L="label",defaultId:B="value",bgOptionSelect:_="bg-indigo-600",isSearch:z=!1,loading:X=!1,isSingleOptionAndFirstLoad:te=!0,isTest:ue=!1})=>{const we=g.useRef(!0),[je,ge]=g.useState(""),[y,pe]=g.useState(R),[Pe,$e]=g.useState(!1);g.useEffect(()=>{if((C==null?void 0:C.length)!==1||!we.current)return;we.current=!1;const[Y]=C,ne=Y[B],ve=Y[L];pe({value:ne,label:ve}),te&&u({target:{value:Y,checked:!1,name:v,type:void 0,id:Y[B]}})},[C,B,L,u,v,te]),g.useEffect(()=>{if(M===-1||(C==null?void 0:C.length)===0)return;const Y=C==null?void 0:C.find(ne=>ne[B]===M);Y&&pe(Y)},[M,C,B]),g.useEffect(()=>{M==="clear"&&(y[B]!==R[B]||y[L]!==R[L]||ue)&&pe(R)},[R,ue,y,M,B,L]);const nt=je===""?C:C.filter(Y=>Y[L].normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().includes(je.toLowerCase())),V=Yt({"ring-red-300 focus:ring-red-300 text-red-900":a&&!f,"text-gray-500":!a,"focus:ring-indigo-600":!a&&!f}),et=Yt({"text-red-400":a&&!f,"text-gray-400":!a}),Re=Y=>{pe(Y),u({target:{value:Y,checked:!1,name:v,type:void 0,id:Y[B]}})};return w.jsxs(on,{as:"div",value:y,children:[w.jsx(on.Label,{className:le("block text-sm font-medium leading-6 text-gray-500 mb-0.5",I!==""&&I),children:n}),w.jsxs("div",{className:le("relative",E!==""&&E),children:[w.jsx(Fo,{className:"text-sm",classNameContainer:"w-full",message:y[L],children:w.jsxs(on.Button,{className:"w-full","data-testid":`listbox-button-${x}`,children:[y.iconStart&&w.jsx("span",{className:"absolute inset-y-0 left-0 flex items-center pl-2",children:y.iconStart}),w.jsx(on.Input,{className:le("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",!a&&!f&&"ring-inset focus:ring-inset focus:ring-2 focus:ring-indigo-600",f&&"focus:ring-gray-300",V,P!==""&&P),onChange:Y=>ge(Y.target.value.normalize("NFD").replace(/[\u0300-\u036f]/g,"")),displayValue:Y=>{var ne;return(ne=Y[L])==null?void 0:ne.trim()},autoComplete:"off",readOnly:!z||f,style:{height:e,...o},"data-testid":"input-search",onClick:()=>$e(f?!1:!Pe),onBlur:()=>$e(!1)})]})}),y.iconEnd&&w.jsx("span",{className:"absolute inset-y-0 right-4 flex items-center pr-4",children:y.iconEnd}),!f&&w.jsx(on.Button,{className:"absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none",onClick:()=>$e(f?!1:!Pe),"data-testid":"arrow-button",children:w.jsx(nl,{className:le("h-5 w-5 ml-auto transition-transform","transform",Pe&&"rotate-180",et)})}),!f&&w.jsx(w.Fragment,{children:X?w.jsx(on.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:w.jsx(Jn,{})}):(nt??[]).length>0?w.jsx(on.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",style:r,children:nt.map((Y,ne)=>w.jsx(on.Option,{value:Y,className:le(Y[B]===y[B]?`${_} text-white`:"text-gray-900",`relative cursor-default select-none p-2 hover:text-white hover:${_}`),"data-testid":`select-${x}-${Y[B]}`,onClick:()=>Re(Y),children:w.jsxs("div",{className:"flex justify-between items-center",children:[w.jsxs("div",{className:"flex items-center",children:[Y.iconStart&&w.jsx("span",{className:"mr-2","aria-hidden":"true",children:Y.iconStart}),w.jsx("span",{className:"font-normal hyphens-auto break-words overflow-hidden",children:Y[L]})]}),Y.iconEnd&&w.jsx("span",{className:"ml-2","aria-hidden":"true",children:Y.iconEnd})]})},ne))}):w.jsx(on.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:w.jsx("p",{"data-testid":"empty-options",children:"Sin opciones"})})})]}),m.length>0&&a&&w.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${x}`,children:m})]})},dd=({placeholder:e="",label:o="",htmlFor:r,name:n,handleChange:u,onClick:f=()=>{},value:a,valueSelect:m,isReadOnly:v=!1,isError:x=!1,helperText:E="",autocomplete:I="on",id:P,classNameLabel:C="",classNameContainer:M="",className:R="",onKeyDown:L,options:B,idSelect:_,isMarginLeft:z=!0,classNameSelect:X="w-20",type:te="text"})=>{const{width:ue}=fi(),we=Yt({"ring-red-300 focus:ring-red-300 text-red-900":x,"focus:ring-indigo-600 text-gray-500":!x});return w.jsxs(w.Fragment,{children:[w.jsx("style",{children:`
|
|
96
96
|
input[type="number"]::-webkit-inner-spin-button,
|
|
97
97
|
input[type="number"]::-webkit-outer-spin-button {
|
|
98
98
|
-webkit-appearance: none;
|
|
@@ -101,7 +101,7 @@ Check the top-level render call using <`+ee+">.")}return Z}}function Vi(j,Z){{if
|
|
|
101
101
|
input[type="number"] {
|
|
102
102
|
-moz-appearance: textfield;
|
|
103
103
|
}
|
|
104
|
-
`}),
|
|
104
|
+
`}),w.jsxs("div",{"data-testid":`container-input-${P}`,className:M,children:[o!==""&&w.jsx("label",{htmlFor:r,className:le("block text-sm font-medium leading-6",C!==""?C:"text-gray-700"),"data-testid":`label-${P}`,children:o}),w.jsxs("div",{className:"relative mt-1 rounded-md shadow-sm",children:[w.jsx("div",{className:"absolute inset-y-0 -top-0.5 flex items-center",style:{left:"2px"},children:w.jsx(cl,{name:_,onChange:je=>u(je),id:_,options:B,value:m,isReadOnly:v,className:X,height:ue<=640?"28px":"32px",classNameInput:le(z&&"ml-3.5"),style:{paddingRight:0,boxShadow:"none"},isDisabledFocus:!0})}),w.jsx("input",{id:P,name:n,type:te,autoComplete:I,placeholder:e,readOnly:v,"data-testid":`input-${P}`,onClick:f,onKeyDown:L,onChange:je=>u(je),value:a,className:le("block w-full rounded-md border-0 py-1.5 pl-24 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",we,R!==""&&R)}),x&&w.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:w.jsx(rl,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),E.length===0||!x?null:w.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${P}`,children:E})]})]})},fd=({setValuesDefault:e,status:o=!1,isReadOnly:r=!1,handleClick:n,text:u="",updateStatus:f=!1,id:a="",isHiddenText:m=!1,setForm:v,handleChange:x,textActive:E="Activo",textInactive:I="Inactivo"})=>{const[P,C]=g.useState(!1);g.useEffect(()=>{C(o),e("status",o),v(R=>({...R,status:o}))},[o,e,f,v]);const M=()=>{C(!P),e("status",!P),v(R=>({...R,status:!P})),x({target:{checked:!P,value:!P,name:"status",type:"",id:""}}),n&&n()};return w.jsxs("div",{className:"flex",children:[w.jsxs(oc,{checked:P,onChange:M,className:le("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",P?"bg-success-1":"bg-gray-200"),"data-testid":`switch-${a}`,disabled:r,children:[w.jsx("span",{className:"sr-only",children:"Use setting"}),w.jsx("span",{"aria-hidden":"true",className:le("pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",P?"translate-x-full":"translate-x-0")})]}),u!==""?w.jsx("p",{className:le("text-sm font-medium text-gray-500 ml-2 self-end",m&&"hidden"),children:u}):w.jsx("p",{className:le("text-sm font-medium text-gray-500 ml-2 self-end",m&&"hidden"),"data-testid":"text-switch",children:P?E:I})]})};function pd({label:e="",id:o,htmlFor:r="",classNameLabel:n="",className:u="",rows:f=4,name:a,placeholder:m="",helperText:v="",isReadOnly:x=!1,isError:E=!1,onChange:I,value:P,idInput:C,nameInput:M,placeholderInput:R="",isReadOnlyInput:L=!1,valueInput:B,infoTop:_=null,infoBottom:z=null,classNameInfoTop:X="h-4",classNameInfoBottom:te="h-2",isInputTitle:ue=!1,hiddenBorder:we=!1}){const je=Yt({"ring-red-300 focus:ring-red-300 text-red-900":E,"focus:ring-indigo-600 text-gray-700":!E});return w.jsxs(w.Fragment,{children:[e!==""&&w.jsx("label",{htmlFor:r,className:le("leading-6 block text-sm",n!==""&&n),children:e}),w.jsxs("div",{className:"relative overflow-x-hidden",children:[_!==null&&w.jsx("div",{className:"absolute top-2 left-3 w-full",children:_}),w.jsxs("div",{className:le("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",je),children:[_!==null&&w.jsx("div",{className:"py-2","aria-hidden":"true",children:w.jsx("div",{className:"py-px",children:w.jsx("div",{className:X})})}),ue&&w.jsx("textarea",{name:M,id:C,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:R,value:B,onChange:I,rows:2,readOnly:L}),w.jsx("textarea",{placeholder:m,rows:f,name:a,id:o,className:le(ue||we?"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",je,u!==""&&u),readOnly:x,onChange:I,value:P,"data-testid":`textarea-${o}`}),z!==null&&w.jsx("div",{className:"py-2","aria-hidden":"true",children:w.jsx("div",{className:"py-px",children:w.jsx("div",{className:te})})})]}),z!==null&&w.jsx("div",{className:"absolute bottom-2 left-3 w-full",children:z})]}),v.length>0&&E&&w.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${o}`,children:v})]})}const md=({children:e,data:o,className:r="",classNameTooltip:n="w-full",classNameMenu:u="",classNameMenuItems:f="",classNameContainerSearch:a="px-5",isSelectMultiple:m=!1,optionsSelect:v,propObject:x="name",propId:E="id",textNewItem:I="",defaultId:P=null,loading:C=!1,search:M=null,searchPlaceHolder:R="Buscar...",valueSearch:L=void 0,idsOptionSelect:B=null,isComponent:_,isSticky:z=!1,hiddenMenu:X=!1,id:te,onClick:ue=()=>{},isRelative:we=!0,isMaxWidth:je=!1,isTag:ge=!1,isClear:y=!1,clear:pe=null,applyButton:Pe=null,applyButtonText:$e="Aplicar",tagsParent:nt=[],isClearTagsParent:V=!1,isReadOnly:et,isDisabledApplyButton:Re=!0,isOpenMenu:Y=void 0,onScroll:ne=null})=>{const ve=g.useRef(null),_e=g.useRef(null),[He,at]=g.useState(new Set),[rt,Ct]=g.useState(new Map);g.useEffect(()=>{B!==null&&at(new Set(new Set(B)))},[B]),g.useEffect(()=>{V&&Ct(new Map)},[V]),g.useEffect(()=>{if(nt.length===0)return;const K=new Map;nt.forEach(ye=>K.set(ye.id,ye)),Ct(K)},[nt]),g.useEffect(()=>{y&&(at(new Set),Ct(new Map),pe&&pe())},[pe,y]);const Te=K=>{let ye=new Map(rt),Me=new Set(He),Fe=null;if(P!==null&&(K[E]===P&&(Fe=crypto.randomUUID()),Fe!==null&&(K[E]=Fe),Fe!==null&&(K[x]=K[x].replace(I,"").trim())),Me.has(K[E])?Me.delete(K[E]):Me.add(K[E]),ye.has(K[E])?ye.delete(K[E]):ye.set(K[E],K),!m){const Pt=Array.from(Me),Zt=Array.from(ye);Pt.shift(),Zt.shift(),Me=Me.size===2?new Set(Pt):Me,ye=ye.size===2?new Map(Zt):ye}v(K,Array.from(Me),Fe!==null),at(Me),Ct(ye)},Ze=K=>{ue(K===!0?-1:te)},Ge=K=>{const ye=new Set(He),Me=new Map(rt);ye.delete(K[E]),Me.delete(K[E]),v(K,Array.from(ye)),at(ye),Ct(Me)},se=()=>{if(He.size===0)return;const K=new Set(He),ye=new Map(rt);K.clear(),ye.clear(),v(null,Array.from(K)),at(K),Ct(ye)};function ke(K){if(typeof K!="string")return K;const ye=K.toLowerCase();return ye.charAt(0).toUpperCase()+ye.slice(1)}return w.jsxs(Pr,{as:"div",className:le("inline-block text-left",we&&"relative",u!==""&&u),onClick:()=>Ze(!0),"data-testid":`menu-${te}`,id:te,ref:ve,children:[w.jsx("style",{children:`
|
|
105
105
|
.blue {
|
|
106
106
|
background-color: #3758F9;
|
|
107
107
|
}
|
|
@@ -118,4 +118,4 @@ Check the top-level render call using <`+ee+">.")}return Z}}function Vi(j,Z){{if
|
|
|
118
118
|
width: 414px;
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
|
-
`}),T.jsx(Pr.Button,{as:"div",onClick:()=>Je(K),"data-testid":`menu-button-${re}`,ref:Et,children:t}),!rt&&T.jsx("div",{className:se("absolute right-0 z-20",n,K&&"hidden",C&&"w-full"),children:T.jsx(Cn,{as:b.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:ue,children:T.jsx(Pr.Items,{className:se("mt-1 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",C?"w-full":f===""&&"w-max",f!==""&&f),children:C?T.jsx("div",{className:"flex justify-center py-4",children:T.jsx(Jn,{})}):T.jsxs("div",{className:se(!_&&"pb-1",r!==""&&r,Ne&&"w-custom"),"data-testid":"dropdown-menu",onScroll:Ie,children:[T.jsxs("div",{className:"sticky top-0 bg-white w-full",children:[F!==null&&T.jsx("div",{className:se("py-2 w-full",a),children:T.jsx(Lr,{htmlFor:"search",id:`dropdown-search-${re}`,name:"search",type:"text",placeholder:D,handleChange:q=>F(q,re),icon:D!==""&&T.jsx(Rc,{className:"w-4 h-4 text-indigo-300"}),className:"pl-5 pr-4 h-8",classNameContainerInput:"w-full",value:$,onKeyDown:q=>q.key===" "&&q.stopPropagation(),autocomplete:"off"})}),Fe!==null&&T.jsxs("div",{className:se("pt-1.5 justify-end flex items-center",a),children:[T.jsx(Xn,{classNameButton:se("bg-gray-400 hover:bg-gray-400 font-medium px-2 py-1.5 rounded-md",ut.size>0?"opacity-1 cursor-pointer":"opacity-0 cursor-default"),outline:"",classNameText:"text-xs text-white text-center",id:"delete",onClick:le,children:"Descartar"}),T.jsx(Xn,{classNameButton:"bg-secondary-2 hover:bg-secondary-3 font-medium px-2 py-1.5 rounded-md",outline:ut.size===0&&$e?"":"0px 0px 0px 2px #3758F9, 0px 0px 0px 2px #243BBD, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameText:"text-xs text-white text-center",id:"apply",disabled:ut.size===0&&$e,onClick:()=>Fe({id:re,items:Array.from(ht.values())}),children:Be})]})]}),Oe&&T.jsx("div",{className:"flex flex-wrap ml-7 pt-1",children:Array.from(ht).map((q,ge)=>T.jsx("div",{className:"mr-1",children:T.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:[q[1][x],T.jsx("button",{type:"button",className:"p-0.5 rounded-sm bg-gray-100 hover:bg-gray-300",onClick:()=>Ze(q[1]),"data-testid":`tag-${q[0]}`,children:T.jsx(Wc,{className:"h-2.5 w-2.5 stroke-gray-700/50 group-hover:stroke-gray-700/75"})})]})},q))}),T.jsx("div",{className:"divide-y divide-gray-100",children:l.map((q,ge)=>T.jsx("div",{className:se(!_&&"py-1",W&&ge===0&&"sticky top-0"),children:_?T.jsx("div",{onClick:je=>{je.preventDefault(),v()},"data-testid":`item-component-${ge}`,children:q}):T.jsx(Pr.Item,{children:T.jsx("span",{className:se(ut.has(q[E])&&"blue text-white",!ut.has(q[E])&&"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-${ge}`,onClick:je=>{je.preventDefault(),ke(q)},children:Ee(q[x])})})},ge))})]})})})})]})},Fo=50,dd=({total:t,handleNext:l,handlePrev:r,handleSelectPage:n,page:u=null,pageSize:f=Fo})=>{const[a,m]=b.useState(1),[v,x]=b.useState([]),[E,k]=b.useState([]),[M,C]=b.useState(""),F=Math.ceil(t/f);b.useEffect(()=>{const W=[];for(let K=1;K<=F;K++)W.push(K);k(W)},[F]),b.useEffect(()=>{let W=[];const K="...",re="... ",fe=" ...";if(E.length<6)W=E;else if(a>=1&&a<=3)W=[1,2,3,4,K,E.length];else if(a===4)W=[...E.slice(0,5),K,E.length];else if(a>4&&a<E.length-2){const Ce=E.slice(a-2,a),Ne=E.slice(a,a+1);W=[1,re,...Ce,...Ne,fe,E.length]}else if(a>E.length-3){const Ce=E.slice(E.length-4);W=[1,re,...Ce]}x(W)},[a,E]),b.useEffect(()=>{u!==null&&u!==a&&m(u)},[u,a]);const D=W=>{C(""),m(W),n(W)},$=()=>{C(""),m(a===1?a:a-1),a>1&&r(a-1)},B=()=>{C(""),a===E.length?m(a):m(a+1),a<E.length&&l(a+1)},_=W=>{const K=Number(W.target.value);isNaN(K)||Math.ceil(t/Fo)<K||K<0||(C(K===0?"":K),n(K===0?1:K))};return T.jsxs("nav",{className:"flex items-center justify-between border-t border-gray-200 px-4 sm:px-0",children:[T.jsx("div",{className:"-mt-px flex w-0 flex-1",children:T.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:$,"data-testid":"prev",children:[T.jsx(hc,{className:"mr-3 h-5 w-5 text-gray-400","aria-hidden":"true"}),"Anterior"]})}),T.jsxs("div",{className:"hidden md:-mt-px md:flex",children:[T.jsx("div",{className:"inline-flex items-center border-t-2 px-2 pt-4 text-sm font-medium border-transparent text-gray-500",style:{width:"80px"},children:T.jsx(Lr,{htmlFor:"",id:"pager",name:"pager",handleChange:_,value:M,className:"pl-1.5 pr-1"})}),v.map((W,K)=>T.jsx(ni,{className:se("inline-flex items-center border-t-2 px-4 pt-4 text-sm font-medium",a===W?"border-indigo-500 text-indigo-600":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700"),"aria-current":"page",onClick:()=>W!=="..."&&W!==" ..."&&W!=="... "&&D(W),id:`page-${K+1}`,children:W},K))]}),T.jsx("div",{className:"-mt-px flex w-0 flex-1 justify-end",children:T.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:B,"data-testid":"next",children:["Siguiente",T.jsx(gc,{className:"ml-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]})})]})},fd=({setForm:t,setValuesDefault:l,className:r="",classNameContainer:n="",classNameContainerImg:u="",src:f=null,alt:a=null,width:m,height:v,title:x="Logo (Opcional)",fileFormatsDescription:E="PNG, JPG, GIF up to 10MB"})=>{const k=f===null?"":f.split("."),M=C=>{const{files:F}=C.target,[D]=F,$=new FileReader;$.readAsDataURL(D),$.onload=function(){D.type.startsWith("image/")?(t(_=>({..._,photo:$.result})),l("photo",$.result)):(t(_=>({..._,photo:"https://cdn.pixabay.com/photo/2017/03/08/21/21/file-2127833_1280.png"})),l("photo",$.result))}};return T.jsxs("div",{className:se("col-span-full",n!==""&&n),children:[T.jsx("label",{htmlFor:"cover-photo",className:"block text-sm font-medium leading-6 text-gray-500",children:x}),T.jsxs("div",{className:se("mt-2 flex justify-center rounded-lg border-2 border-dotted border-gray-300 cursor-pointer relative",u!==""&&u),children:[f?T.jsx("img",{src:/(jpg|png|jpe?g|gif|webp|svg)$/i.test(k[k.length-1])||f.startsWith("data:image/")?f:"https://cdn.pixabay.com/photo/2017/03/08/21/21/file-2127833_1280.png",alt:a,width:m,height:v,className:se(r!==""&&r),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s",objectFit:"contain",height:v},onLoad:C=>C.currentTarget.style.filter="none","data-testid":"img"}):T.jsxs("div",{className:"text-center",children:[T.jsx($c,{"aria-hidden":"true",className:"mx-auto h-12 w-12 text-gray-300"}),T.jsxs("div",{className:"mt-4 flex text-sm leading-6 text-gray-600",children:[T.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:T.jsx("span",{children:"Subir un archivo"})}),T.jsx("p",{className:"pl-1",children:"o arrástralo y suéltalo aquí"})]}),T.jsx("p",{className:"text-xs leading-5 text-gray-600",children:E})]}),T.jsx("input",{id:"file-upload",name:"file-upload",type:"file",className:"absolute w-full h-full opacity-0 cursor-pointer",onChange:M})]})]})},pd=({children:t,openDefault:l=!1,setForm:r,setValuesDefault:n,title:u,type:f,data:a,setData:m,id:v,defaultData:x,showAlert:E,isAdd:k=!0,search:M=null,isPadding:C=!0,isReadOnly:F=!1,isEdit:D=!1,deleteItem:$=null,validateAdd:B=null,loading:_=!1,internalEdit:W=!0,isDataEmpty:K=!0,typeProp:re="value",setAdd:fe=null,hasNoRecords:Ce=!0,tabs:Ne=null,selectTab:Oe=null})=>{const[me,Fe]=b.useState(!1),[Be,it]=b.useState(!1),[,V]=b.useState(!1),[rt,$e]=b.useState(""),[ue,Ie]=b.useState(1);b.useEffect(()=>{Fe(l),V(F)},[l,F]);const Xe=({e:ke,index:Je})=>{const Ze=Jr(a),{name:le,value:Ee}=ke.target;!(B===null?!1:B({value:Ee,copyData:Ze,index:Je}))&&(Ze[Je][le]=Ee),m(Ze),n(v,Ze),r(ge=>({...ge,[v]:Ze}))},Et=()=>{if(a.some(Je=>Object.values(Je).some(Ee=>Ee[re]===-1))||a.length===0)return E({title:"",message:"Todos los campos son requeridos",type:"warning"});r(Je=>({...Je,data:a})),n(v,a),m([...a,x]),fe&&fe([...a,x])},ut=({index:ke,item:Je})=>{if(a.length===1&&!D)return;let Ze=Jr(a);Ze.length===1&&(Ze=[x]),Ze.length>1&&Ze.splice(ke,1),r(le=>({...le,data:Ze})),n(v,Ze),m(Ze),$&&$({index:ke,item:Je,data:Ze}),ke===a.length-1&&D&&Ze.length===0&&(r(le=>({...le,data:Ze})),n(v,Ze),m([...Ze,x]))},kt=()=>{it(!Be),V(!1)},ht=()=>{if(a.length>1)return;if(a.length===0)return!0;const[ke]=a;return!ke||typeof ke!="object"?!0:Object.keys(ke).filter(le=>{const Ee=ke[le];return Ee&&typeof Ee=="object"&&"value"in Ee}).every(le=>ke[le].value===-1)},Lt=({tab:ke})=>{Ie(ke.id),Oe&&Oe({tab:ke})};return T.jsxs("div",{className:"divide-y divide-gray-200 rounded-lg bg-white shadow mt-7",children:[T.jsxs("div",{className:"px-4 py-3.5 sm:px-6 flex justify-between items-center cursor-pointer",onClick:()=>Fe(!me),"data-testid":`open-accordion-${v}`,children:[T.jsx("p",{className:"text-gray-500 uppercase text-xs font-bold",children:u}),T.jsxs("div",{className:"flex items-center",children:[M&&T.jsx(Lr,{htmlFor:"search",id:"search",name:"search",type:"text",autoComplete:"search",placeholder:"Buscar...",handleChange:ke=>{M(ke),$e(ke.target.value)},icon:T.jsx(ed,{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:rt,onClick:ke=>ke.stopPropagation(),onFocus:()=>Fe(!0)}),me?T.jsx(Jc,{className:"w-5 h-5 text-default-5"}):T.jsx(Kc,{className:"w-5 h-5 text-default-5"})]})]}),T.jsx(Cn,{as:b.Fragment,show:me,enter:"transition duration-[400ms]",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"duration-200 transition ease-in-out",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:T.jsxs("div",{children:[Ne&&T.jsx("nav",{className:"flex justify-center border-b border-gray-200","aria-label":"Tabs",children:Ne.map(ke=>T.jsx("span",{className:se(ue===ke.id?"border-indigo-500 text-gray-900":"border-gray-300 text-gray-500 hover:border-indigo-500","whitespace-nowrap border-b-2 py-2.5 px-2 text-sm font-medium cursor-pointer"),"aria-current":ue===ke.id?"page":void 0,onClick:()=>Lt({tab:ke}),"data-testid":`tab-${ke.id}`,children:ke.name},ke.name))}),T.jsxs("div",{className:se("sm:mt-2.5 py-3.5 relative",C&&Ne===null&&"px-4 sm:p-6",C&&Ne!==null&&"px-4 sm:px-6 sm:pb-6 sm:pt-2.5"),children:[W&&!Be&&T.jsx(Ac,{className:"w-5 h-5 text-gray-400 cursor-pointer absolute right-4",onClick:kt,"data-testid":`edit-role-${v}`}),_&&T.jsx("div",{className:"flex justify-center mt-5",children:T.jsx(Jn,{})}),K&&ht()&&Ce&&!_&&(W?!Be:!D)&&T.jsx("p",{className:"text-gray-800 text-center","data-testid":"records-empty",children:"No hay registros para mostrar"}),!_&&a.map((ke,Je)=>T.jsxs("div",{className:se("flex flex-col 3xs:flex-row mb-4",C&&"ml-0 3xs:ml-3"),children:[typeof t=="function"?t({item:ke,index:Je,handleChange:Xe,isEdit:W?Be:D}):t,k&&(W?Be:D)&&T.jsx("div",{style:{backgroundColor:"#B0B8BF",width:"25px",height:"25px"},className:se("rounded-full flex justify-center items-center mt-4 3xs:mt-7 ml-2 3xs:ml-5 self-start 3xs:self-center",a.length===1&&!D&&"opacity-0"),children:T.jsx(nd,{className:se("w-6 h-4",(a.length>1||D)&&"cursor-pointer"),style:{color:"#637381"},strokeWidth:2.5,onClick:()=>ut({index:Je,item:ke}),"data-testid":`delete-item-${Je}-${v}`})})]},Je)),k&&(W?Be:D)&&!_&&T.jsx("p",{className:"text-secondary-2 text-sm font-medium ml-3 cursor-pointer",onClick:Et,"data-testid":`add-item-${v}`,style:{width:"fit-content"},children:`+ Añadir ${f}`})]})]})})]})},md=({src:t,alt:l,width:r,height:n,className:u="",priority:f=!1,style:a={},id:m=""})=>{const[v,x]=b.useState(!1),E={filter:v?"none":"blur(10px)",transition:"filter 0.3s ease-out",objectFit:"cover",...r?{width:r}:{},...n?{height:n}:{},...a};return T.jsx("img",{src:t,alt:l,...r?{width:r}:{},...n?{height:n}:{},className:se(u!==""&&u),loading:f?"eager":"lazy",decoding:"async",style:E,onLoad:()=>x(!0),"data-testid":`image-${m}`})};Te.Accordion=pd,Te.Alert=kc,Te.Avatar=Hc,Te.Bullets=Uc,Te.ButtonOutline=ti,Te.ButtonPagination=ni,Te.ButtonSolid=Xn,Te.Checkbox=Zc,Te.ConfirmationAbandoningCreation=rd,Te.CoverPhoto=fd,Te.Divider=od,Te.Dropdown=cd,Te.GoBack=ld,Te.Image=md,Te.Input=Lr,Te.InputDropdown=sd,Te.MESSAGE_ABORT_CONTROLLER=Ji,Te.MESSAGE_SIGNAL_ABORTED_WITHOUT_REASON=Qi,Te.Modal=ri,Te.Pagination=dd,Te.Select=li,Te.Spinner=id,Te.SpinnerIcon=Jn,Te.Switch=ad,Te.Textarea=ud,Te.Tooltip=Po,Te.classNames=se,Te.copyOptions=Jr,Te.generateAvatarInitials=Ki,Te.isPromise=Xi,Te.rowsPerPage=Fo,Te.useCloseModal=es,Te.useForm=ts,Te.useMediaQuery=ns,Te.useWindowDimensions=ul,Te.validateEmail=al,Object.defineProperty(Te,Symbol.toStringTag,{value:"Module"})});
|
|
121
|
+
`}),w.jsx(Pr.Button,{as:"div",onClick:()=>Ze(X),"data-testid":`menu-button-${te}`,ref:_e,children:e}),!et&&w.jsx("div",{className:le("absolute right-0 z-20",n,X&&"hidden",C&&"w-full"),children:w.jsx(Cn,{as:g.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:Y,children:w.jsx(Pr.Items,{className:le("mt-1 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",C?"w-full":f===""&&"w-max",f!==""&&f),children:C?w.jsx("div",{className:"flex justify-center py-4",children:w.jsx(Jn,{})}):w.jsxs("div",{className:le(!_&&"pb-1",r!==""&&r,je&&"w-custom"),"data-testid":"dropdown-menu",onScroll:ne,children:[w.jsxs("div",{className:"sticky top-0 bg-white w-full",children:[M!==null&&w.jsx("div",{className:le("py-2 w-full",a),children:w.jsx(Ar,{htmlFor:"search",id:`dropdown-search-${te}`,name:"search",type:"text",placeholder:R,handleChange:K=>M(K,te),icon:R!==""&&w.jsx(_c,{className:"w-4 h-4 text-indigo-300"}),className:"pl-5 pr-4 h-8",classNameContainerInput:"w-full",value:L,onKeyDown:K=>K.key===" "&&K.stopPropagation(),autocomplete:"off"})}),Pe!==null&&w.jsxs("div",{className:le("pt-1.5 justify-end flex items-center",a),children:[w.jsx(Xn,{classNameButton:le("bg-gray-400 hover:bg-gray-400 font-medium px-2 py-1.5 rounded-md",He.size>0?"opacity-1 cursor-pointer":"opacity-0 cursor-default"),outline:"",classNameText:"text-xs text-white text-center",id:"delete",onClick:se,children:"Descartar"}),w.jsx(Xn,{classNameButton:"bg-secondary-2 hover:bg-secondary-3 font-medium px-2 py-1.5 rounded-md",outline:He.size===0&&Re?"":"0px 0px 0px 2px #3758F9, 0px 0px 0px 2px #243BBD, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameText:"text-xs text-white text-center",id:"apply",disabled:He.size===0&&Re,onClick:()=>Pe({id:te,items:Array.from(rt.values())}),children:$e})]})]}),ge&&w.jsx("div",{className:"flex flex-wrap ml-7 pt-1",children:Array.from(rt).map((K,ye)=>w.jsx("div",{className:"mr-1",children:w.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:[K[1][x],w.jsx("button",{type:"button",className:"p-0.5 rounded-sm bg-gray-100 hover:bg-gray-300",onClick:()=>Ge(K[1]),"data-testid":`tag-${K[0]}`,children:w.jsx(Zc,{className:"h-2.5 w-2.5 stroke-gray-700/50 group-hover:stroke-gray-700/75"})})]})},K))}),w.jsx("div",{className:"divide-y divide-gray-100",children:o.map((K,ye)=>w.jsx("div",{className:le(!_&&"py-1",z&&ye===0&&"sticky top-0"),children:_?w.jsx("div",{onClick:Me=>{Me.preventDefault(),v()},"data-testid":`item-component-${ye}`,children:K}):w.jsx(Pr.Item,{children:w.jsx("span",{className:le(He.has(K[E])&&"blue text-white",!He.has(K[E])&&"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-${ye}`,onClick:Me=>{Me.preventDefault(),Te(K)},children:ke(K[x])})})},ye))})]})})})})]})},Ro=50,hd=({total:e,handleNext:o,handlePrev:r,handleSelectPage:n,page:u=null,pageSize:f=Ro})=>{const[a,m]=g.useState(1),[v,x]=g.useState([]),[E,I]=g.useState([]),[P,C]=g.useState(""),M=Math.ceil(e/f);g.useEffect(()=>{const z=[];for(let X=1;X<=M;X++)z.push(X);I(z)},[M]),g.useEffect(()=>{let z=[];const X="...",te="... ",ue=" ...";if(E.length<6)z=E;else if(a>=1&&a<=3)z=[1,2,3,4,X,E.length];else if(a===4)z=[...E.slice(0,5),X,E.length];else if(a>4&&a<E.length-2){const we=E.slice(a-2,a),je=E.slice(a,a+1);z=[1,te,...we,...je,ue,E.length]}else if(a>E.length-3){const we=E.slice(E.length-4);z=[1,te,...we]}x(z)},[a,E]),g.useEffect(()=>{u!==null&&u!==a&&m(u)},[u,a]);const R=z=>{C(""),m(z),n(z)},L=()=>{C(""),m(a===1?a:a-1),a>1&&r(a-1)},B=()=>{C(""),a===E.length?m(a):m(a+1),a<E.length&&o(a+1)},_=z=>{const X=Number(z.target.value);isNaN(X)||Math.ceil(e/Ro)<X||X<0||(C(X===0?"":X),n(X===0?1:X))};return w.jsxs("nav",{className:"flex items-center justify-between border-t border-gray-200 px-4 sm:px-0",children:[w.jsx("div",{className:"-mt-px flex w-0 flex-1",children:w.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:L,"data-testid":"prev",children:[w.jsx(wc,{className:"mr-3 h-5 w-5 text-gray-400","aria-hidden":"true"}),"Anterior"]})}),w.jsxs("div",{className:"hidden md:-mt-px md:flex",children:[w.jsx("div",{className:"inline-flex items-center border-t-2 px-2 pt-4 text-sm font-medium border-transparent text-gray-500",style:{width:"80px"},children:w.jsx(Ar,{htmlFor:"",id:"pager",name:"pager",handleChange:_,value:P,className:"pl-1.5 pr-1"})}),v.map((z,X)=>w.jsx(ll,{className:le("inline-flex items-center border-t-2 px-4 pt-4 text-sm font-medium",a===z?"border-indigo-500 text-indigo-600":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700"),"aria-current":"page",onClick:()=>z!=="..."&&z!==" ..."&&z!=="... "&&R(z),id:`page-${X+1}`,children:z},X))]}),w.jsx("div",{className:"-mt-px flex w-0 flex-1 justify-end",children:w.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:B,"data-testid":"next",children:["Siguiente",w.jsx(Sc,{className:"ml-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]})})]})},vd=({setForm:e,setValuesDefault:o,className:r="",classNameContainer:n="",classNameContainerImg:u="",src:f=null,alt:a=null,width:m,height:v,title:x="Logo (Opcional)",fileFormatsDescription:E="PNG, JPG, GIF up to 10MB"})=>{const I=f===null?"":f.split("."),P=C=>{const{files:M}=C.target,[R]=M,L=new FileReader;L.readAsDataURL(R),L.onload=function(){R.type.startsWith("image/")?(e(_=>({..._,photo:L.result})),o("photo",L.result)):(e(_=>({..._,photo:"https://cdn.pixabay.com/photo/2017/03/08/21/21/file-2127833_1280.png"})),o("photo",L.result))}};return w.jsxs("div",{className:le("col-span-full",n!==""&&n),children:[w.jsx("label",{htmlFor:"cover-photo",className:"block text-sm font-medium leading-6 text-gray-500",children:x}),w.jsxs("div",{className:le("mt-2 flex justify-center rounded-lg border-2 border-dotted border-gray-300 cursor-pointer relative",u!==""&&u),children:[f?w.jsx("img",{src:/(jpg|png|jpe?g|gif|webp|svg)$/i.test(I[I.length-1])||f.startsWith("data:image/")?f:"https://cdn.pixabay.com/photo/2017/03/08/21/21/file-2127833_1280.png",alt:a,width:m,height:v,className:le(r!==""&&r),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s",objectFit:"contain",height:v},onLoad:C=>C.currentTarget.style.filter="none","data-testid":"img"}):w.jsxs("div",{className:"text-center",children:[w.jsx(Hc,{"aria-hidden":"true",className:"mx-auto h-12 w-12 text-gray-300"}),w.jsxs("div",{className:"mt-4 flex text-sm leading-6 text-gray-600",children:[w.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:w.jsx("span",{children:"Subir un archivo"})}),w.jsx("p",{className:"pl-1",children:"o arrástralo y suéltalo aquí"})]}),w.jsx("p",{className:"text-xs leading-5 text-gray-600",children:E})]}),w.jsx("input",{id:"file-upload",name:"file-upload",type:"file",className:"absolute w-full h-full opacity-0 cursor-pointer",onChange:P})]})]})},gd=({children:e,openDefault:o=!1,setForm:r,setValuesDefault:n,title:u,type:f,data:a,setData:m,id:v,defaultData:x,showAlert:E,isAdd:I=!0,search:P=null,isPadding:C=!0,isReadOnly:M=!1,isEdit:R=!1,deleteItem:L=null,validateAdd:B=null,loading:_=!1,internalEdit:z=!0,isDataEmpty:X=!0,typeProp:te="value",setAdd:ue=null,hasNoRecords:we=!0,tabs:je=null,selectTab:ge=null})=>{const[pe,Pe]=g.useState(!1),[$e,nt]=g.useState(!1),[,V]=g.useState(!1),[et,Re]=g.useState(""),[Y,ne]=g.useState(1);g.useEffect(()=>{Pe(o),V(M)},[o,M]);const ve=({e:Te,index:Ze})=>{const Ge=eo(a),{name:se,value:ke}=Te.target;!(B===null?!1:B({value:ke,copyData:Ge,index:Ze}))&&(Ge[Ze][se]=ke),m(Ge),n(v,Ge),r(ye=>({...ye,[v]:Ge}))},_e=()=>{if(a.some(Ze=>Object.values(Ze).some(ke=>ke[te]===-1))||a.length===0)return E({title:"",message:"Todos los campos son requeridos",type:"warning"});r(Ze=>({...Ze,data:a})),n(v,a),m([...a,x]),ue&&ue([...a,x])},He=({index:Te,item:Ze})=>{if(a.length===1&&!R)return;let Ge=eo(a);Ge.length===1&&(Ge=[x]),Ge.length>1&&Ge.splice(Te,1),r(se=>({...se,data:Ge})),n(v,Ge),m(Ge),L&&L({index:Te,item:Ze,data:Ge}),Te===a.length-1&&R&&Ge.length===0&&(r(se=>({...se,data:Ge})),n(v,Ge),m([...Ge,x]))},at=()=>{nt(!$e),V(!1)},rt=()=>{if(a.length>1)return;if(a.length===0)return!0;const[Te]=a;return!Te||typeof Te!="object"?!0:Object.keys(Te).filter(se=>{const ke=Te[se];return ke&&typeof ke=="object"&&"value"in ke}).every(se=>Te[se].value===-1)},Ct=({tab:Te})=>{ne(Te.id),ge&&ge({tab:Te})};return w.jsxs("div",{className:"divide-y divide-gray-200 rounded-lg bg-white shadow mt-7",children:[w.jsxs("div",{className:"px-4 py-3.5 sm:px-6 flex justify-between items-center cursor-pointer",onClick:()=>Pe(!pe),"data-testid":`open-accordion-${v}`,children:[w.jsx("p",{className:"text-gray-500 uppercase text-xs font-bold",children:u}),w.jsxs("div",{className:"flex items-center",children:[P&&w.jsx(Ar,{htmlFor:"search",id:"search",name:"search",type:"text",autoComplete:"search",placeholder:"Buscar...",handleChange:Te=>{P(Te),Re(Te.target.value)},icon:w.jsx(od,{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:et,onClick:Te=>Te.stopPropagation(),onFocus:()=>Pe(!0)}),pe?w.jsx(nd,{className:"w-5 h-5 text-default-5"}):w.jsx(sl,{className:"w-5 h-5 text-default-5"})]})]}),w.jsx(Cn,{as:g.Fragment,show:pe,enter:"transition duration-[400ms]",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"duration-200 transition ease-in-out",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:w.jsxs("div",{children:[je&&w.jsx("nav",{className:"flex justify-center border-b border-gray-200","aria-label":"Tabs",children:je.map(Te=>w.jsx("span",{className:le(Y===Te.id?"border-indigo-500 text-gray-900":"border-gray-300 text-gray-500 hover:border-indigo-500","whitespace-nowrap border-b-2 py-2.5 px-2 text-sm font-medium cursor-pointer"),"aria-current":Y===Te.id?"page":void 0,onClick:()=>Ct({tab:Te}),"data-testid":`tab-${Te.id}`,children:Te.name},Te.name))}),w.jsxs("div",{className:le("sm:mt-2.5 py-3.5 relative",C&&je===null&&"px-4 sm:p-6",C&&je!==null&&"px-4 sm:px-6 sm:pb-6 sm:pt-2.5"),children:[z&&!$e&&w.jsx(zc,{className:"w-5 h-5 text-gray-400 cursor-pointer absolute right-4",onClick:at,"data-testid":`edit-role-${v}`}),_&&w.jsx("div",{className:"flex justify-center mt-5",children:w.jsx(Jn,{})}),X&&rt()&&we&&!_&&(z?!$e:!R)&&w.jsx("p",{className:"text-gray-800 text-center","data-testid":"records-empty",children:"No hay registros para mostrar"}),!_&&a.map((Te,Ze)=>w.jsxs("div",{className:le("flex flex-col 3xs:flex-row mb-4",C&&"ml-0 3xs:ml-3"),children:[typeof e=="function"?e({item:Te,index:Ze,handleChange:ve,isEdit:z?$e:R}):e,I&&(z?$e:R)&&w.jsx("div",{style:{backgroundColor:"#B0B8BF",width:"25px",height:"25px"},className:le("rounded-full flex justify-center items-center mt-4 3xs:mt-7 ml-2 3xs:ml-5 self-start 3xs:self-center",a.length===1&&!R&&"opacity-0"),children:w.jsx(ld,{className:le("w-6 h-4",(a.length>1||R)&&"cursor-pointer"),style:{color:"#637381"},strokeWidth:2.5,onClick:()=>He({index:Ze,item:Te}),"data-testid":`delete-item-${Ze}-${v}`})})]},Ze)),I&&(z?$e:R)&&!_&&w.jsx("p",{className:"text-secondary-2 text-sm font-medium ml-3 cursor-pointer",onClick:_e,"data-testid":`add-item-${v}`,style:{width:"fit-content"},children:`+ Añadir ${f}`})]})]})})]})},bd=({src:e,alt:o,width:r,height:n,className:u="",priority:f=!1,style:a={},id:m=""})=>{const[v,x]=g.useState(!1),E={filter:v?"none":"blur(10px)",transition:"filter 0.3s ease-out",objectFit:"cover",...r?{width:r}:{},...n?{height:n}:{},...a};return w.jsx("img",{src:e,alt:o,...r?{width:r}:{},...n?{height:n}:{},className:le(u!==""&&u),loading:f?"eager":"lazy",decoding:"async",style:E,onLoad:()=>x(!0),"data-testid":`image-${m}`})},xd=["icon-analytics-alt-1","icon-bell-remove","icon-calculator-alt","icon-cart-full","icon-cloud-sun","icon-coding","icon-cottage-alt","icon-flag-alt","icon-gallery","icon-grow","icon-head-idea","icon-idea-share","icon-highlight-alt","icon-invention","icon-Jurisdiction","icon-layout-2","icon-lock","icon-map-alt","icon-megaphone","icon-personal-data","icon-personal-file","icon-phone-ring","icon-pie-chart-dollar","icon-pointer-right","icon-portfolio","icon-presentation-chart-line","icon-pyramid","icon-puzzle","icon-revenue","icon-rocket-growth-2","icon-ruler-pencil","icon-save","icon-search-home","icon-shoe-print","icon-strategy","icon-target","icon-time-settings","icon-vector-1","icon-user-alt-3","icon-world-2","icon-write","icon-website-money","icon-website"];function yd({value:e,onChange:o,disabled:r,id:n,label:u="",classNameLabel:f="",helperText:a="",isError:m=!1,isReadOnly:v=!1,name:x}){const[E,I]=g.useState(!1),P=g.useRef(null);g.useEffect(()=>{function M(R){E&&P.current&&!P.current.contains(R.target)&&I(!1)}return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[E]);const C=Yt({"border-red-300 focus:border-red-300 text-red-900":m&&!v,"text-gray-500":!m,"focus:border-indigo-600":!m&&!v});return w.jsxs(w.Fragment,{children:[u!==""&&w.jsx("p",{className:le("block text-sm font-medium leading-6",f!==""?f:"text-gray-700"),"data-testid":`label-${n}`,children:u}),w.jsxs("div",{style:{position:"relative",width:"100%"},className:le("border rounded-md",C),ref:P,children:[w.jsxs("div",{className:"flex items-center gap-2 dropdown-trigger border border-default-6 rounded-md p-1.5",onClick:()=>!r&&I(!E),style:{cursor:r?"not-allowed":"pointer"},title:e||"Selecciona un icono","data-testid":"open",children:[w.jsx("div",{className:"rounded border border-default-6 p-1 h-6 w-6 bg-default-6 flex items-center justify-center",children:e&&w.jsx("i",{className:le(e,"text-normal block")})}),w.jsx("div",{className:"truncate",style:{width:"136px"},children:e}),w.jsx(sl,{className:le("h-5 w-5 ml-auto transition-transform",{"transform rotate-180":E})})]}),E&&w.jsx("div",{className:"openIconSelect absolute z-10 bg-white p-3 rounded-lg",style:{top:48,left:"0",width:"100%",maxWidth:500,border:"1px solid #ccc",boxShadow:"0 2px 8px rgba(0,0,0,0.15)",maxHeight:300,overflowY:"auto"},children:w.jsx("div",{className:"grid w-full",style:{gridTemplateColumns:"repeat(auto-fill, minmax(30px, 1fr))",gap:12},children:xd.map(M=>w.jsx("button",{type:"button",className:"icon-picker-btn",style:{width:"100%",aspectRatio:"1",borderRadius:4,border:e===M?"2px solid #007bff":"1px solid #eee",background:"#f9f9f9",display:"flex",alignItems:"center",justifyContent:"center",fontSize:20,color:e===M?"#007bff":"#333",outline:"none",cursor:"pointer"},onClick:()=>{o({target:{value:M,checked:!1,name:x,id:n}}),I(!1)},title:M,children:w.jsx("i",{className:M})},M))})})]}),a.length>0&&m&&w.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${n}`,children:a})]})}const Dr=(e,o,r)=>{const n=r*o,u=n*(1-Math.abs(e/60%2-1)),f=r-n;let a,m,v;return e<60?[a,m,v]=[n,u,0]:e<120?[a,m,v]=[u,n,0]:e<180?[a,m,v]=[0,n,u]:e<240?[a,m,v]=[0,u,n]:e<300?[a,m,v]=[u,0,n]:[a,m,v]=[n,0,u],[Math.round((a+f)*255),Math.round((m+f)*255),Math.round((v+f)*255)]},Lo=(e,o,r)=>{e/=255,o/=255,r/=255;const n=Math.max(e,o,r),u=Math.min(e,o,r),f=n-u;let a;const m=n,v=n===0?0:f/n;if(n===u)a=0;else{switch(n){case e:a=(o-r)/f+(o<r?6:0);break;case o:a=(r-e)/f+2;break;case r:a=(e-o)/f+4;break}a*=60}return[a,v,m]},Qn=(e,o,r)=>"#"+[e,o,r].map(n=>n.toString(16).padStart(2,"0")).join("").toUpperCase(),dl=e=>/^#[0-9A-Fa-f]{6}$/.test(e)?[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16)]:[255,0,0];function wd({value:e,onChange:o,disabled:r,label:n="",classNameLabel:u="",helperText:f="",isError:a=!1,isReadOnly:m=!1,name:v}){const x=g.useRef(!0),E=g.useRef(null),I=g.useRef(null),[P,C]=g.useState(!1),[M,R]=g.useState([182.2,.849,.494]),[L,B]=g.useState(e),_=g.useCallback(Y=>{o({target:{value:Y,name:v}})},[v,o]);g.useEffect(()=>{if(e&&/^#[0-9A-Fa-f]{6}$/.test(e)){const Y=dl(e);R(Lo(...Y)),B(e.toUpperCase())}},[e]);const[z,X,te]=M,[ue,we,je]=Dr(z,X,te),ge=Qn(ue,we,je);g.useEffect(()=>{B(ge)},[ge]),g.useEffect(()=>{!x.current||m||(x.current=!1,_(ge))},[ge,_,m]),g.useEffect(()=>{function Y(ve){if(!E.current||!E.current._dragging)return;const _e=E.current.getBoundingClientRect();let He=(ve.touches?ve.touches[0].clientX:ve.clientX)-_e.left,at=(ve.touches?ve.touches[0].clientY:ve.clientY)-_e.top;He=Math.max(0,Math.min(_e.width,He)),at=Math.max(0,Math.min(_e.height,at));const rt=He/_e.width,Ct=1-at/_e.height;R([z,rt,Ct]);const[Te,Ze,Ge]=Dr(z,rt,Ct),se=Qn(Te,Ze,Ge);B(se),_(se)}function ne(){E.current&&(E.current._dragging=!1),window.removeEventListener("mousemove",Y),window.removeEventListener("mouseup",ne),window.removeEventListener("touchmove",Y),window.removeEventListener("touchend",ne)}return E.current&&E.current._dragging&&(window.addEventListener("mousemove",Y),window.addEventListener("mouseup",ne),window.addEventListener("touchmove",Y),window.addEventListener("touchend",ne)),()=>{window.removeEventListener("mousemove",Y),window.removeEventListener("mouseup",ne),window.removeEventListener("touchmove",Y),window.removeEventListener("touchend",ne)}},[_,z]),g.useEffect(()=>{function Y(ne){P&&I.current&&!I.current.contains(ne.target)&&C(!1)}return document.addEventListener("mousedown",Y),()=>document.removeEventListener("mousedown",Y)},[P]);const y=Y=>{if(!E.current)return;const ne=E.current.getBoundingClientRect();let ve=(Y.touches?Y.touches[0].clientX:Y.clientX)-ne.left,_e=(Y.touches?Y.touches[0].clientY:Y.clientY)-ne.top;ve=Math.max(0,Math.min(ne.width,ve)),_e=Math.max(0,Math.min(ne.height,_e));const He=ve/ne.width,at=1-_e/ne.height;R([z,He,at]);const[rt,Ct,Te]=Dr(z,He,at),Ze=Qn(rt,Ct,Te);B(Ze),_(Ze)},pe=Y=>{r||(E.current&&(E.current._dragging=!0),y(Y))},Pe=()=>{E.current&&(E.current._dragging=!1)},$e=Y=>{const ne=Number(Y.target.value);R([ne,X,te]);const[ve,_e,He]=Dr(ne,X,te),at=Qn(ve,_e,He);B(at),_(at)},nt=Y=>{const ne=Y.target.value;if(B(ne),/^#[0-9A-Fa-f]{6}$/.test(ne)){const ve=dl(ne);R(Lo(...ve)),_(ne.toUpperCase())}},V=(Y,ne)=>{const ve=[ue,we,je];ve[Y]=Math.max(0,Math.min(255,Number(ne)||0)),R(Lo(...ve));const _e=Qn(...ve);B(_e),_(_e)},et=X*180,Re=(1-te)*180;return w.jsxs(w.Fragment,{children:[n&&w.jsx("p",{className:Yt("block text-sm font-medium leading-6",u||"text-gray-700"),children:n}),w.jsxs("div",{style:{position:"relative",display:"inline-block"},ref:I,className:"w-full",children:[w.jsxs("div",{className:"flex items-center gap-2 mb-2 dropdown-trigger rounded-md border p-2 border-default-6 w-full",onClick:()=>!r&&C(!P),children:[w.jsx("div",{className:"rounded border border-default-6 flex-shrink-0 w-6 h-6",style:{backgroundColor:m?"":ge}}),w.jsx("input",{type:"text",className:"px-2 py-1 border-b border-t-0 border-l-0 border-r-0 border-default-4 text-xs focus:border-default-2 focus:ring-0 w-full",value:m?"":L,disabled:r,onChange:nt,readOnly:m}),w.jsx(nl,{className:Yt("h-5 w-5 ml-2 transition-transform",{"transform rotate-180":P&&!m})})]}),P&&!m&&w.jsxs("div",{className:"openSketch absolute z-20 top-14 left-0 bg-white border border-default-6 rounded-md p-4 shadow-md w-full",children:[w.jsxs("div",{className:"relative rounded mb-2 cursor-crosshair",ref:E,style:{backgroundColor:`hsl(${z}, 100%, 50%)`,height:"200px"},onMouseDown:pe,onMouseMove:Y=>E.current&&E.current._dragging&&y(Y),onMouseUp:Pe,onMouseLeave:Pe,onTouchStart:pe,onTouchMove:Y=>E.current&&E.current._dragging&&y(Y),onTouchEnd:Pe,children:[w.jsx("div",{style:{position:"absolute",inset:0,background:"linear-gradient(to right, #fff, transparent)",borderRadius:"inherit",pointerEvents:"none"}}),w.jsx("div",{style:{position:"absolute",inset:0,background:"linear-gradient(to top, #000, transparent)",borderRadius:"inherit",pointerEvents:"none"}}),w.jsx("div",{className:"absolute w-4 h-4 rounded-full border-2 border-white shadow",style:{left:`calc(${et}px - 8px)`,top:`calc(${Re}px - 8px)`,background:ge,pointerEvents:"none"}})]}),w.jsx("input",{type:"range",min:0,max:359,value:z,onChange:$e,className:"w-full mb-2",style:{background:"linear-gradient(to right, red, yellow, lime, cyan, blue, magenta, red)"},disabled:r}),w.jsx("div",{className:"flex gap-2 mb-2",children:["R","G","B"].map((Y,ne)=>w.jsxs("div",{children:[w.jsx("label",{className:"text-center block",children:Y}),w.jsx("input",{type:"number",min:0,max:255,className:"w-14 px-2 py-1 border border-gray-300 rounded text-sm",value:[ue,we,je][ne],onChange:ve=>V(ne,ve.target.value),disabled:r,placeholder:Y})]},ne))})]})]}),f&&a&&w.jsx("p",{className:"text-red-600 text-sm text-left mt-1",children:f})]})}Ne.Accordion=gd,Ne.Alert=Lc,Ne.Avatar=Gc,Ne.Bullets=qc,Ne.ButtonOutline=il,Ne.ButtonPagination=ll,Ne.ButtonSolid=Xn,Ne.Checkbox=Xc,Ne.ConfirmationAbandoningCreation=sd,Ne.CoverPhoto=vd,Ne.Divider=ad,Ne.Dropdown=md,Ne.GoBack=ud,Ne.IconSelectPicker=yd,Ne.Image=bd,Ne.Input=Ar,Ne.InputDropdown=dd,Ne.MESSAGE_ABORT_CONTROLLER=os,Ne.MESSAGE_SIGNAL_ABORTED_WITHOUT_REASON=is,Ne.Modal=al,Ne.Pagination=hd,Ne.Select=cl,Ne.SketchColorPicker=wd,Ne.Spinner=cd,Ne.SpinnerIcon=Jn,Ne.Switch=fd,Ne.Textarea=pd,Ne.Tooltip=Fo,Ne.classNames=le,Ne.copyOptions=eo,Ne.generateAvatarInitials=ns,Ne.isPromise=rs,Ne.rowsPerPage=Ro,Ne.useCloseModal=ls,Ne.useForm=ss,Ne.useMediaQuery=as,Ne.useWindowDimensions=fi,Ne.validateEmail=di,Object.defineProperty(Ne,Symbol.toStringTag,{value:"Module"})});
|