cemtrik-dependencies 1.0.173 → 1.0.174
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 +19 -19
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(Se,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],b):(Se=typeof globalThis<"u"?globalThis:Se||self,b(Se.MyApp={},Se.React,Se.ReactDOM))})(this,function(Se,b,wr){"use strict";function qi(t){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(l,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return l.default=t,Object.freeze(l)}const Y=qi(b),Xr=(t,l=!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)&&!l&&(f[a]=r(u[a]));return f}return t.map(u=>r(u))},sl=t=>/^(?:[^<>()[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*|"[^\n"]+")@(?:[^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{2,63}$/i.test(t);function ae(...t){return t.filter(Boolean).join(" ")}const Ki=t=>{const l=t.split(" ");let r=t.slice(0,2);return l.length>1&&(r=`${t.at(0)}${l[l.length-1].slice(0,1)}`),r},Xi=t=>typeof t!="string"&&Promise.resolve(t)instanceof Promise,Ji="The user aborted a request.",Qi="signal is aborted without reason",es=({id:t,close:l})=>{b.useEffect(()=>{const r=n=>{const u=document.getElementById(t);u&&(u.contains(n.target)||l())};return document.addEventListener("click",r,!0),()=>{document.removeEventListener("click",r,!0)}},[t,l])},ts=()=>{const t=b.useRef({}),[l,r]=b.useState({}),[n,u]=b.useState({}),[f,a]=b.useState([]);b.useEffect(()=>{t.current={}},[]);const m=R=>T=>{T.preventDefault(),T.stopPropagation(),R(l)},v=(R,T,M)=>{const{checked
|
|
1
|
+
(function(Se,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],b):(Se=typeof globalThis<"u"?globalThis:Se||self,b(Se.MyApp={},Se.React,Se.ReactDOM))})(this,function(Se,b,wr){"use strict";function qi(t){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(l,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return l.default=t,Object.freeze(l)}const Y=qi(b),Xr=(t,l=!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)&&!l&&(f[a]=r(u[a]));return f}return t.map(u=>r(u))},sl=t=>/^(?:[^<>()[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*|"[^\n"]+")@(?:[^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{2,63}$/i.test(t);function ae(...t){return t.filter(Boolean).join(" ")}const Ki=t=>{const l=t.split(" ");let r=t.slice(0,2);return l.length>1&&(r=`${t.at(0)}${l[l.length-1].slice(0,1)}`),r},Xi=t=>typeof t!="string"&&Promise.resolve(t)instanceof Promise,Ji="The user aborted a request.",Qi="signal is aborted without reason",es=({id:t,close:l})=>{b.useEffect(()=>{const r=n=>{const u=document.getElementById(t);u&&(u.contains(n.target)||l())};return document.addEventListener("click",r,!0),()=>{document.removeEventListener("click",r,!0)}},[t,l])},ts=()=>{const t=b.useRef({}),[l,r]=b.useState({}),[n,u]=b.useState({}),[f,a]=b.useState([]);b.useEffect(()=>{t.current={}},[]);const m=R=>T=>{T.preventDefault(),T.stopPropagation(),R(l)},v=(R,T,M)=>{const{checked:$,value:P,name:B,type:_,id:q}=R.target,ne={radio:q,checkbox:$};t.current={...M,...t.current,[B]:ne[_]??P},r({...t.current,[B]:ne[_]??P}),T({...t.current,[B]:ne[_]??P})},x=b.useCallback((R,T)=>{t.current={...t.current,[R]:T},r(M=>({...M,[R]:T}))},[]),E=b.useCallback((R,T)=>{const M=T.filter($=>R[$]===""||R[$]===void 0);return M.forEach($=>u(P=>({...P,[$]:"Este campo es requerido"}))),a(M),M.length>0},[]);return{handleSubmit:m,handleChange:v,setValuesDefault:x,validateFields:E,errors:f,model:l,handleError:(R,T)=>{T.forEach(M=>u($=>({...$,[M]:R}))),a(T)},messageError:n,setModel:r}},ns=t=>{const[l,r]=b.useState(!0),[n,u]=b.useState(!1),f=b.useCallback((a,m)=>{const v=t.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)},[t]);return b.useEffect(()=>{const a=/\(min-width:\s?[0-9]+px\)/gi.test(t),m=/\(max-width:\s?[0-9]+px\)/gi.test(t);if(!a&&!m&&r(!1),!a&&!m)return;const v=Math.min(window.innerWidth,window.outerWidth);f(a,v)},[t,f]),b.useEffect(()=>{if(!l)return;const a=Math.min(window.innerWidth,window.outerWidth);function m(){const v=/min-width/gi.test(t);f(v,a)}return window.addEventListener("resize",m),()=>window.removeEventListener("resize",m)},[l,t,f]),n},al=()=>{const[t,l]=b.useState({width:0,height:0});return b.useEffect(()=>{const r=()=>{const n=Math.min(window.innerWidth,window.outerWidth),u=Math.min(window.innerHeight,window.outerHeight);l({width:n,height:u})};return requestAnimationFrame(()=>r()),window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[]),t};var rs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function os(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Jr={exports:{}},$n={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -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 cl;function is(){return cl||(cl=1,process.env.NODE_ENV!=="production"&&function(){var t=b,l=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"),k=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),T=Symbol.for("react.offscreen"),M=Symbol.iterator
|
|
17
|
+
*/var cl;function is(){return cl||(cl=1,process.env.NODE_ENV!=="production"&&function(){var t=b,l=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"),k=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),T=Symbol.for("react.offscreen"),M=Symbol.iterator,$="@@iterator";function P(S){if(S===null||typeof S!="object")return null;var W=M&&S[M]||S[$];return typeof W=="function"?W:null}var B=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function _(S){{for(var W=arguments.length,X=new Array(W>1?W-1:0),fe=1;fe<W;fe++)X[fe-1]=arguments[fe];q("error",S,X)}}function q(S,W,X){{var fe=B.ReactDebugCurrentFrame,Pe=fe.getStackAddendum();Pe!==""&&(W+="%s",X=X.concat([Pe]));var pe=X.map(function(Fe){return String(Fe)});pe.unshift("Warning: "+W),Function.prototype.apply.call(console[S],console,pe)}}var ne=!1,oe=!1,me=!1,Ne=!1,Oe=!1,Ce;Ce=Symbol.for("react.module.reference");function y(S){return!!(typeof S=="string"||typeof S=="function"||S===n||S===f||Oe||S===u||S===x||S===E||Ne||S===T||ne||oe||me||typeof S=="object"&&S!==null&&(S.$$typeof===R||S.$$typeof===k||S.$$typeof===a||S.$$typeof===m||S.$$typeof===v||S.$$typeof===Ce||S.getModuleId!==void 0))}function he(S,W,X){var fe=S.displayName;if(fe)return fe;var Pe=W.displayName||W.name||"";return Pe!==""?X+"("+Pe+")":X}function Ie(S){return S.displayName||"Context"}function _e(S){if(S==null)return null;if(typeof S.tag=="number"&&_("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof S=="function")return S.displayName||S.name||null;if(typeof S=="string")return S;switch(S){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 S=="object")switch(S.$$typeof){case m:var W=S;return Ie(W)+".Consumer";case a:var X=S;return Ie(X._context)+".Provider";case v:return he(S,S.render,"ForwardRef");case k:var fe=S.displayName||null;return fe!==null?fe:_e(S.type)||"Memo";case R:{var Pe=S,pe=Pe._payload,Fe=Pe._init;try{return _e(Fe(pe))}catch{return null}}}return null}var st=Object.assign,U=0,Xe,De,ce,Te,Je,Qe,yt;function kt(){}kt.__reactDisabledLog=!0;function ft(){{if(U===0){Xe=console.log,De=console.info,ce=console.warn,Te=console.error,Je=console.group,Qe=console.groupCollapsed,yt=console.groupEnd;var S={configurable:!0,enumerable:!0,value:kt,writable:!0};Object.defineProperties(console,{info:S,log:S,warn:S,error:S,group:S,groupCollapsed:S,groupEnd:S})}U++}}function Wt(){{if(U--,U===0){var S={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:st({},S,{value:Xe}),info:st({},S,{value:De}),warn:st({},S,{value:ce}),error:st({},S,{value:Te}),group:st({},S,{value:Je}),groupCollapsed:st({},S,{value:Qe}),groupEnd:st({},S,{value:yt})})}U<0&&_("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var je=B.ReactCurrentDispatcher,ot;function Ve(S,W,X){{if(ot===void 0)try{throw Error()}catch(Pe){var fe=Pe.stack.trim().match(/\n( *(at )?)/);ot=fe&&fe[1]||""}return`
|
|
18
18
|
`+ot+S}}var ie=!1,G;{var Q=typeof WeakMap=="function"?WeakMap:Map;G=new Q}function Re(S,W){if(!S||ie)return"";{var X=G.get(S);if(X!==void 0)return X}var fe;ie=!0;var Pe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var pe;pe=je.current,je.current=null,ft();try{if(W){var Fe=function(){throw Error()};if(Object.defineProperty(Fe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Fe,[])}catch(Yt){fe=Yt}Reflect.construct(S,[],Fe)}else{try{Fe.call()}catch(Yt){fe=Yt}S.call(Fe.prototype)}}else{try{throw Error()}catch(Yt){fe=Yt}S()}}catch(Yt){if(Yt&&fe&&typeof Yt.stack=="string"){for(var Le=Yt.stack.split(`
|
|
19
19
|
`),Mt=fe.stack.split(`
|
|
20
20
|
`),be=Le.length-1,vt=Mt.length-1;be>=1&&vt>=0&&Le[be]!==Mt[vt];)vt--;for(;be>=1&&vt>=0;be--,vt--)if(Le[be]!==Mt[vt]){if(be!==1||vt!==1)do if(be--,vt--,vt<0||Le[be]!==Mt[vt]){var Dt=`
|
|
21
|
-
`+Le[be].replace(" at new "," at ");return S.displayName&&Dt.includes("<anonymous>")&&(Dt=Dt.replace("<anonymous>",S.displayName)),typeof S=="function"&&G.set(S,Dt),Dt}while(be>=1&&vt>=0);break}}}finally{ie=!1,je.current=pe,Wt(),Error.prepareStackTrace=Pe}var gn=S?S.displayName||S.name:"",ln=gn?Ve(gn):"";return typeof S=="function"&&G.set(S,ln),ln}function Ze(S,W,X){return Re(S,!1)}function ke(S){var W=S.prototype;return!!(W&&W.isReactComponent)}function Pt(S,W,X){if(S==null)return"";if(typeof S=="function")return Re(S,ke(S));if(typeof S=="string")return Ve(S);switch(S){case x:return Ve("Suspense");case E:return Ve("SuspenseList")}if(typeof S=="object")switch(S.$$typeof){case v:return Ze(S.render);case k:return Pt(S.type,W,X);case R:{var fe=S,Pe=fe._payload,pe=fe._init;try{return Pt(pe(Pe),W,X)}catch{}}}return""}var mn=Object.prototype.hasOwnProperty,J={},Qn=
|
|
21
|
+
`+Le[be].replace(" at new "," at ");return S.displayName&&Dt.includes("<anonymous>")&&(Dt=Dt.replace("<anonymous>",S.displayName)),typeof S=="function"&&G.set(S,Dt),Dt}while(be>=1&&vt>=0);break}}}finally{ie=!1,je.current=pe,Wt(),Error.prepareStackTrace=Pe}var gn=S?S.displayName||S.name:"",ln=gn?Ve(gn):"";return typeof S=="function"&&G.set(S,ln),ln}function Ze(S,W,X){return Re(S,!1)}function ke(S){var W=S.prototype;return!!(W&&W.isReactComponent)}function Pt(S,W,X){if(S==null)return"";if(typeof S=="function")return Re(S,ke(S));if(typeof S=="string")return Ve(S);switch(S){case x:return Ve("Suspense");case E:return Ve("SuspenseList")}if(typeof S=="object")switch(S.$$typeof){case v:return Ze(S.render);case k:return Pt(S.type,W,X);case R:{var fe=S,Pe=fe._payload,pe=fe._init;try{return Pt(pe(Pe),W,X)}catch{}}}return""}var mn=Object.prototype.hasOwnProperty,J={},Qn=B.ReactDebugCurrentFrame;function rn(S){if(S){var W=S._owner,X=Pt(S.type,S._source,W?W.type:null);Qn.setExtraStackFrame(X)}else Qn.setExtraStackFrame(null)}function $t(S,W,X,fe,Pe){{var pe=Function.call.bind(mn);for(var Fe in S)if(pe(S,Fe)){var Le=void 0;try{if(typeof S[Fe]!="function"){var Mt=Error((fe||"React class")+": "+X+" type `"+Fe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof S[Fe]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Mt.name="Invariant Violation",Mt}Le=S[Fe](W,Fe,fe,X,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(be){Le=be}Le&&!(Le instanceof Error)&&(rn(Pe),_("%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).",fe||"React class",X,Fe,typeof Le),rn(null)),Le instanceof Error&&!(Le.message in J)&&(J[Le.message]=!0,rn(Pe),_("Failed %s type: %s",X,Le.message),rn(null))}}}var Zt=Array.isArray;function er(S){return Zt(S)}function hn(S){{var W=typeof Symbol=="function"&&Symbol.toStringTag,X=W&&S[Symbol.toStringTag]||S.constructor.name||"Object";return X}}function Lr(S){try{return Ft(S),!1}catch{return!0}}function Ft(S){return""+S}function ct(S){if(Lr(S))return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",hn(S)),Ft(S)}var qt=B.ReactCurrentOwner,tr={key:!0,ref:!0,__self:!0,__source:!0},Ht,nr,rr;rr={};function Ar(S){if(mn.call(S,"ref")){var W=Object.getOwnPropertyDescriptor(S,"ref").get;if(W&&W.isReactWarning)return!1}return S.ref!==void 0}function or(S){if(mn.call(S,"key")){var W=Object.getOwnPropertyDescriptor(S,"key").get;if(W&&W.isReactWarning)return!1}return S.key!==void 0}function lr(S,W){if(typeof S.ref=="string"&&qt.current&&W&&qt.current.stateNode!==W){var X=_e(qt.current.type);rr[X]||(_('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(qt.current.type),S.ref),rr[X]=!0)}}function Dr(S,W){{var X=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)",W))};X.isReactWarning=!0,Object.defineProperty(S,"key",{get:X,configurable:!0})}}function Fo(S,W){{var X=function(){nr||(nr=!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)",W))};X.isReactWarning=!0,Object.defineProperty(S,"ref",{get:X,configurable:!0})}}var Kt=function(S,W,X,fe,Pe,pe,Fe){var Le={$$typeof:l,type:S,key:W,ref:X,props:Fe,_owner:pe};return Le._store={},Object.defineProperty(Le._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Le,"_self",{configurable:!1,enumerable:!1,writable:!1,value:fe}),Object.defineProperty(Le,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Pe}),Object.freeze&&(Object.freeze(Le.props),Object.freeze(Le)),Le};function Mo(S,W,X,fe,Pe){{var pe,Fe={},Le=null,Mt=null;X!==void 0&&(ct(X),Le=""+X),or(W)&&(ct(W.key),Le=""+W.key),Ar(W)&&(Mt=W.ref,lr(W,Pe));for(pe in W)mn.call(W,pe)&&!tr.hasOwnProperty(pe)&&(Fe[pe]=W[pe]);if(S&&S.defaultProps){var be=S.defaultProps;for(pe in be)Fe[pe]===void 0&&(Fe[pe]=be[pe])}if(Le||Mt){var vt=typeof S=="function"?S.displayName||S.name||"Unknown":S;Le&&Dr(Fe,vt),Mt&&Fo(Fe,vt)}return Kt(S,Le,Mt,Pe,fe,qt.current,Fe)}}var ir=B.ReactCurrentOwner,Fn=B.ReactDebugCurrentFrame;function vn(S){if(S){var W=S._owner,X=Pt(S.type,S._source,W?W.type:null);Fn.setExtraStackFrame(X)}else Fn.setExtraStackFrame(null)}var on;on=!1;function Mn(S){return typeof S=="object"&&S!==null&&S.$$typeof===l}function $r(){{if(ir.current){var S=_e(ir.current.type);if(S)return`
|
|
22
22
|
|
|
23
23
|
Check the render method of \``+S+"`."}return""}}function _r(S){return""}var jn={};function Br(S){{var W=$r();if(!W){var X=typeof S=="string"?S:S.displayName||S.name;X&&(W=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+X+">.")}return W}}function Rn(S,W){{if(!S._store||S._store.validated||S.key!=null)return;S._store.validated=!0;var X=Br(W);if(jn[X])return;jn[X]=!0;var fe="";S&&S._owner&&S._owner!==ir.current&&(fe=" It was passed a child from "+_e(S._owner.type)+"."),vn(S),
|
|
25
|
+
Check the top-level render call using <`+X+">.")}return W}}function Rn(S,W){{if(!S._store||S._store.validated||S.key!=null)return;S._store.validated=!0;var X=Br(W);if(jn[X])return;jn[X]=!0;var fe="";S&&S._owner&&S._owner!==ir.current&&(fe=" It was passed a child from "+_e(S._owner.type)+"."),vn(S),_('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',X,fe),vn(null)}}function Xt(S,W){{if(typeof S!="object")return;if(er(S))for(var X=0;X<S.length;X++){var fe=S[X];Mn(fe)&&Rn(fe,W)}else if(Mn(S))S._store&&(S._store.validated=!0);else if(S){var Pe=P(S);if(typeof Pe=="function"&&Pe!==S.entries)for(var pe=Pe.call(S),Fe;!(Fe=pe.next()).done;)Mn(Fe.value)&&Rn(Fe.value,W)}}}function zr(S){{var W=S.type;if(W==null||typeof W=="string")return;var X;if(typeof W=="function")X=W.propTypes;else if(typeof W=="object"&&(W.$$typeof===v||W.$$typeof===k))X=W.propTypes;else return;if(X){var fe=_e(W);$t(X,S.props,"prop",fe,S)}else if(W.PropTypes!==void 0&&!on){on=!0;var Pe=_e(W);_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Pe||"Unknown")}typeof W.getDefaultProps=="function"&&!W.getDefaultProps.isReactClassApproved&&_("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function sr(S){{for(var W=Object.keys(S.props),X=0;X<W.length;X++){var fe=W[X];if(fe!=="children"&&fe!=="key"){vn(S),_("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",fe),vn(null);break}}S.ref!==null&&(vn(S),_("Invalid attribute `ref` supplied to `React.Fragment`."),vn(null))}}function ar(S,W,X,fe,Pe,pe){{var Fe=y(S);if(!Fe){var Le="";(S===void 0||typeof S=="object"&&S!==null&&Object.keys(S).length===0)&&(Le+=" 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 Mt=_r();Mt?Le+=Mt:Le+=$r();var be;S===null?be="null":er(S)?be="array":S!==void 0&&S.$$typeof===l?(be="<"+(_e(S.type)||"Unknown")+" />",Le=" Did you accidentally export a JSX literal instead of a component?"):be=typeof S,_("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",be,Le)}var vt=Mo(S,W,X,Pe,pe);if(vt==null)return vt;if(Fe){var Dt=W.children;if(Dt!==void 0)if(fe)if(er(Dt)){for(var gn=0;gn<Dt.length;gn++)Xt(Dt[gn],S);Object.freeze&&Object.freeze(Dt)}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 Xt(Dt,S)}return S===n?sr(vt):zr(vt),vt}}function Ro(S,W,X){return ar(S,W,X,!0)}function xt(S,W,X){return ar(S,W,X,!1)}var Wr=xt,Hr=Ro;_n.Fragment=n,_n.jsx=Wr,_n.jsxs=Hr}()),_n}process.env.NODE_ENV==="production"?Jr.exports=ls():Jr.exports=is();var j=Jr.exports;function Bn(t,l,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=t();if(!(E.length!==n.length||E.some((T,M)=>n[M]!==T)))return u;n=E;let R;if(r.key&&((a=r.debug)!=null&&a.call(r))&&(R=Date.now()),u=l(...E),r.key&&((m=r.debug)!=null&&m.call(r))){const T=Math.round((Date.now()-x)*100)/100,M=Math.round((Date.now()-R)*100)/100,$=M/16,P=(B,_)=>{for(B=String(B);B.length<_;)B=" "+B;return B};console.info(`%c⏱ ${P(M,5)} /${P(T,5)} ms`,`
|
|
26
26
|
font-size: .6rem;
|
|
27
27
|
font-weight: bold;
|
|
28
|
-
color: hsl(${Math.max(0,Math.min(120-120*L,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 Qr(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)}},dl={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,dl),r.addEventListener("scrollend",v,dl),()=>{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 R=(v=this.measurementsCache[k])==null?void 0:v.measureElement;R||(R=ne=>{const oe=f(k),me=this.elementsCache.get(oe);if(!ne){me&&(this.observer.unobserve(me),this.elementsCache.delete(oe));return}me!==ne&&(me&&this.observer.unobserve(me),this.observer.observe(ne),this.elementsCache.set(oe,ne)),ne.isConnected&&this.resizeItem(k,this.options.measureElement(ne,void 0,this))});const T=f(k),M=this.options.lanes===1?E[k-1]:this.getFurthestMeasurement(E,k),L=M?M.end+this.options.gap:n+u,P=m.get(T),_=typeof P=="number"?P:this.options.estimateSize(k),B=L+_,q=M?M.lane:k%this.options.lanes;E[k]={index:k,start:L,size:_,end:B,key:T,lane:q,measureElement:R}}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 Qr(n[fl(0,n.length-1,u=>Qr(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]=Qr(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 fl=(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=fl(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"?Y.useLayoutEffect:Y.useEffect;function xs(t){const l=Y.useReducer(()=>({}),{})[1],r={...t,onChange:(u,f)=>{var a;f?wr.flushSync(l):l(),(a=t.onChange)==null||a.call(t,u,f)}},[n]=Y.useState(()=>new vs(r));return n.setOptions(r),Y.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,eo=(t,l,r)=>(Es(t,typeof l!="symbol"?l+"":l,r),r);let Ss=class{constructor(){eo(this,"current",this.detect()),eo(this,"handoffState","pending"),eo(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"}},Qt=new Ss,nt=(t,l)=>{Qt.isServer?b.useEffect(t,l):b.useLayoutEffect(t,l)};function Vt(t){let l=b.useRef(t);return nt(()=>{l.current=t},[t]),l}function to(t,l){let[r,n]=b.useState(t),u=Vt(t);return nt(()=>n(u.current),[u,n,...l]),r}let te=function(t){let l=Vt(t);return b.useCallback((...r)=>l.current(...r),[l])};function pl(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 zt(){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=zt();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 en(){let[t]=b.useState(zt);return b.useEffect(()=>()=>t.dispose(),[t]),t}function Cs(){let t=typeof document>"u";return"useSyncExternalStore"in Y?(l=>l.useSyncExternalStore)(Y)(()=>()=>{},()=>!1,()=>!t):!1}function kn(){let t=Cs(),[l,r]=Y.useState(Qt.isHandoffComplete);return l&&Qt.isHandoffComplete===!1&&r(!1),Y.useEffect(()=>{l!==!0&&r(!0)},[l]),Y.useEffect(()=>Qt.handoff(),[]),t?!1:l}var ml;let At=(ml=b.useId)!=null?ml:function(){let t=kn(),[l,r]=b.useState(t?()=>Qt.nextId():null);return nt(()=>{l===null&&r(Qt.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 Qt.isServer?null:t instanceof Node?t.ownerDocument:t!=null&&t.hasOwnProperty("current")&&t.current instanceof Node?t.current.ownerDocument:document}let no=["[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 tn=(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))(tn||{}),hl=(t=>(t[t.Error=0]="Error",t[t.Overflow=1]="Overflow",t[t.Success=2]="Success",t[t.Underflow=3]="Underflow",t))(hl||{}),js=(t=>(t[t.Previous=-1]="Previous",t[t.Next=1]="Next",t))(js||{});function vl(t=document.body){return t==null?[]:Array.from(t.querySelectorAll(no)).sort((l,r)=>Math.sign((l.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}var ro=(t=>(t[t.Strict=0]="Strict",t[t.Loose=1]="Loose",t))(ro||{});function oo(t,l=0){var r;return t===((r=Sr(t))==null?void 0:r.body)?!1:bt(l,{0(){return t.matches(no)},1(){let n=t;for(;n!==null;){if(n.matches(no))return!0;n=n.parentElement}return!1}})}function gl(t){let l=Sr(t);zt().nextFrame(()=>{l&&!oo(l.activeElement,0)&&un(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 un(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 lo(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(vl(),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?lo(t):t:vl(t);u.length>0&&a.length>1&&(a=a.filter(T=>!u.includes(T))),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,R;do{if(E>=k||E+k<=0)return 0;let T=v+E;if(l&16)T=(T+k)%k;else{if(T<0)return 3;if(T>=k)return 1}R=a[T],R==null||R.focus(x),E+=m}while(R!==f.activeElement);return l&6&&Ns(R)&&R.select(),2}function bl(){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 xl(){return bl()||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 yl(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 io(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!oo(v,ro.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=>{xl()||f.current&&(u(a,()=>f.current),f.current=null)},!0),Cr("touchend",a=>u(a,()=>a.target instanceof HTMLElement?a.target:null),!0),yl("blur",a=>u(a,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function wn(...t){return b.useMemo(()=>Sr(...t),[...t])}function wl(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 so(t,l){let[r,n]=b.useState(()=>wl(t));return nt(()=>{n(wl(t))},[t.type,t.as]),nt(()=>{r||l.current&&l.current instanceof HTMLButtonElement&&!l.current.hasAttribute("type")&&n("button")},[r,l]),r}let El=Symbol();function Ps(t,l=!0){return Object.assign(t,{[El]:l})}function Et(...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[El]))?void 0:r}function Sl(t){return[t.screenX,t.screenY]}function Cl(){let t=b.useRef([-1,-1]);return{wasMoved(l){let r=Sl(l);return t.current[0]===r[0]&&t.current[1]===r[1]?!1:(t.current=r,!0)},update(l){t.current=Sl(l)}}}function jl({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]),nt(()=>{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 cn=(t=>(t[t.None=0]="None",t[t.RenderStrategy=1]="RenderStrategy",t[t.Static=2]="Static",t))(cn||{}),dn=(t=>(t[t.Unmount=0]="Unmount",t[t.Hidden=1]="Hidden",t))(dn||{});function mt({ourProps:t,theirProps:l,slot:r,defaultTag:n,features:u,visible:f=!0,name:a,mergeRefs:m}){m=m??Fs;let v=Tl(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}=ao(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 R=!1,T=[];for(let[M,L]of Object.entries(l))typeof L=="boolean"&&(R=!0),L===!0&&T.push(M);R&&(k["data-headlessui-state"]=T.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(L=>` - ${L}`).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*$,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 Qr(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)}},dl={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,dl),r.addEventListener("scrollend",v,dl),()=>{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 R=(v=this.measurementsCache[k])==null?void 0:v.measureElement;R||(R=ne=>{const oe=f(k),me=this.elementsCache.get(oe);if(!ne){me&&(this.observer.unobserve(me),this.elementsCache.delete(oe));return}me!==ne&&(me&&this.observer.unobserve(me),this.observer.observe(ne),this.elementsCache.set(oe,ne)),ne.isConnected&&this.resizeItem(k,this.options.measureElement(ne,void 0,this))});const T=f(k),M=this.options.lanes===1?E[k-1]:this.getFurthestMeasurement(E,k),$=M?M.end+this.options.gap:n+u,P=m.get(T),B=typeof P=="number"?P:this.options.estimateSize(k),_=$+B,q=M?M.lane:k%this.options.lanes;E[k]={index:k,start:$,size:B,end:_,key:T,lane:q,measureElement:R}}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 Qr(n[fl(0,n.length-1,u=>Qr(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]=Qr(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 fl=(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=fl(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"?Y.useLayoutEffect:Y.useEffect;function xs(t){const l=Y.useReducer(()=>({}),{})[1],r={...t,onChange:(u,f)=>{var a;f?wr.flushSync(l):l(),(a=t.onChange)==null||a.call(t,u,f)}},[n]=Y.useState(()=>new vs(r));return n.setOptions(r),Y.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,eo=(t,l,r)=>(Es(t,typeof l!="symbol"?l+"":l,r),r);let Ss=class{constructor(){eo(this,"current",this.detect()),eo(this,"handoffState","pending"),eo(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"}},Qt=new Ss,nt=(t,l)=>{Qt.isServer?b.useEffect(t,l):b.useLayoutEffect(t,l)};function Vt(t){let l=b.useRef(t);return nt(()=>{l.current=t},[t]),l}function to(t,l){let[r,n]=b.useState(t),u=Vt(t);return nt(()=>n(u.current),[u,n,...l]),r}let te=function(t){let l=Vt(t);return b.useCallback((...r)=>l.current(...r),[l])};function pl(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 zt(){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=zt();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 en(){let[t]=b.useState(zt);return b.useEffect(()=>()=>t.dispose(),[t]),t}function Cs(){let t=typeof document>"u";return"useSyncExternalStore"in Y?(l=>l.useSyncExternalStore)(Y)(()=>()=>{},()=>!1,()=>!t):!1}function kn(){let t=Cs(),[l,r]=Y.useState(Qt.isHandoffComplete);return l&&Qt.isHandoffComplete===!1&&r(!1),Y.useEffect(()=>{l!==!0&&r(!0)},[l]),Y.useEffect(()=>Qt.handoff(),[]),t?!1:l}var ml;let At=(ml=b.useId)!=null?ml:function(){let t=kn(),[l,r]=b.useState(t?()=>Qt.nextId():null);return nt(()=>{l===null&&r(Qt.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 Qt.isServer?null:t instanceof Node?t.ownerDocument:t!=null&&t.hasOwnProperty("current")&&t.current instanceof Node?t.current.ownerDocument:document}let no=["[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 tn=(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))(tn||{}),hl=(t=>(t[t.Error=0]="Error",t[t.Overflow=1]="Overflow",t[t.Success=2]="Success",t[t.Underflow=3]="Underflow",t))(hl||{}),js=(t=>(t[t.Previous=-1]="Previous",t[t.Next=1]="Next",t))(js||{});function vl(t=document.body){return t==null?[]:Array.from(t.querySelectorAll(no)).sort((l,r)=>Math.sign((l.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}var ro=(t=>(t[t.Strict=0]="Strict",t[t.Loose=1]="Loose",t))(ro||{});function oo(t,l=0){var r;return t===((r=Sr(t))==null?void 0:r.body)?!1:bt(l,{0(){return t.matches(no)},1(){let n=t;for(;n!==null;){if(n.matches(no))return!0;n=n.parentElement}return!1}})}function gl(t){let l=Sr(t);zt().nextFrame(()=>{l&&!oo(l.activeElement,0)&&un(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 un(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 lo(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(vl(),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?lo(t):t:vl(t);u.length>0&&a.length>1&&(a=a.filter(T=>!u.includes(T))),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,R;do{if(E>=k||E+k<=0)return 0;let T=v+E;if(l&16)T=(T+k)%k;else{if(T<0)return 3;if(T>=k)return 1}R=a[T],R==null||R.focus(x),E+=m}while(R!==f.activeElement);return l&6&&Ns(R)&&R.select(),2}function bl(){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 xl(){return bl()||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 yl(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 io(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!oo(v,ro.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=>{xl()||f.current&&(u(a,()=>f.current),f.current=null)},!0),Cr("touchend",a=>u(a,()=>a.target instanceof HTMLElement?a.target:null),!0),yl("blur",a=>u(a,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function wn(...t){return b.useMemo(()=>Sr(...t),[...t])}function wl(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 so(t,l){let[r,n]=b.useState(()=>wl(t));return nt(()=>{n(wl(t))},[t.type,t.as]),nt(()=>{r||l.current&&l.current instanceof HTMLButtonElement&&!l.current.hasAttribute("type")&&n("button")},[r,l]),r}let El=Symbol();function Ps(t,l=!0){return Object.assign(t,{[El]:l})}function Et(...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[El]))?void 0:r}function Sl(t){return[t.screenX,t.screenY]}function Cl(){let t=b.useRef([-1,-1]);return{wasMoved(l){let r=Sl(l);return t.current[0]===r[0]&&t.current[1]===r[1]?!1:(t.current=r,!0)},update(l){t.current=Sl(l)}}}function jl({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]),nt(()=>{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 cn=(t=>(t[t.None=0]="None",t[t.RenderStrategy=1]="RenderStrategy",t[t.Static=2]="Static",t))(cn||{}),dn=(t=>(t[t.Unmount=0]="Unmount",t[t.Hidden=1]="Hidden",t))(dn||{});function mt({ourProps:t,theirProps:l,slot:r,defaultTag:n,features:u,visible:f=!0,name:a,mergeRefs:m}){m=m??Fs;let v=Tl(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}=ao(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 R=!1,T=[];for(let[M,$]of Object.entries(l))typeof $=="boolean"&&(R=!0),$===!0&&T.push(M);R&&(k["data-headlessui-state"]=T.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($=>` - ${$}`).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($=>` - ${$}`).join(`
|
|
30
30
|
`)].join(`
|
|
31
|
-
`));let R=E.props,T=typeof(R==null?void 0:R.className)=="function"?(...L)=>jr(R==null?void 0:R.className(...L),v.className):jr(R==null?void 0:R.className,v.className),M=T?{className:T}:{};return b.cloneElement(E,Object.assign({},Tl(E.props,Or(ao(v,["ref"]))),k,x,{ref:u(E.ref,x.ref)},M))}return b.createElement(f,Object.assign({},ao(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 Tl(...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 ht(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 ao(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 mt({ourProps:f,theirProps:u,slot:{},defaultTag:Ms,name:"Hidden"})}let Hn=ht(Rs),uo=b.createContext(null);uo.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(uo)}function co({value:t,children:l}){return b.createElement(uo.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 Gt=[];Ls(()=>{function t(l){l.target instanceof HTMLElement&&l.target!==document.body&&Gt[0]!==l.target&&(Gt.unshift(l.target),Gt=Gt.filter(r=>r!=null&&r.isConnected),Gt.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 rt=(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))(rt||{});function fo(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 Ol(t={},l=null,r=[]){for(let[n,u]of Object.entries(t))Il(r,Nl(l,n),u);return r}function Nl(t,l){return t?t+"["+l+"]":l}function Il(t,l,r){if(Array.isArray(r))for(let[n,u]of r.entries())Il(t,Nl(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,""]):Ol(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 po(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):lo(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===rt.Specific?l.idx:fo(l,{resolveItems:()=>t.virtual.options,resolveActiveIndex:()=>{var R,T;return(T=(R=t.activeOptionIndex)!=null?R:t.virtual.options.findIndex(M=>!t.virtual.disabled(M)))!=null?T: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=po(t);if(m.activeOptionIndex===null){let E=m.options.findIndex(k=>!k.dataRef.current.disabled);E!==-1&&(m.activeOptionIndex=E)}let v=l.focus===rt.Specific?l.idx:fo(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=po(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=po(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})}}},mo=b.createContext(null);mo.displayName="ComboboxActionsContext";function Vn(t){let l=b.useContext(mo);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 kl=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 nt(()=>{m(v=>v+1)},[(l=r.virtual)==null?void 0:l.options]),b.createElement(kl.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 ho=b.createContext(null);ho.displayName="ComboboxDataContext";function En(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,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:R=!1,virtual:T=null,...M}=t,L=!1,P=null,[_=k?[]:void 0,B]=pl(r,u,n),[q,ne]=b.useReducer(Vs,{dataRef:b.createRef(),comboboxState:x?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),oe=b.useRef(!1),me=b.useRef({static:!1,hold:!1}),Ne=b.useRef(null),Oe=b.useRef(null),Ce=b.useRef(null),y=b.useRef(null),he=te(typeof m=="string"?(ie,G)=>{let Q=m;return(ie==null?void 0:ie[Q])===(G==null?void 0:G[Q])}:m??((ie,G)=>ie===G)),Ie=te(ie=>q.options.findIndex(G=>he(G.dataRef.current.value,ie))),_e=b.useCallback(ie=>bt(U.mode,{1:()=>_.some(G=>he(G,ie)),0:()=>he(_,ie)}),[_]),st=te(ie=>q.activeOptionIndex===Ie(ie)),U=b.useMemo(()=>({...q,immediate:L,optionsPropsRef:me,labelRef:Ne,inputRef:Oe,buttonRef:Ce,optionsRef:y,value:_,defaultValue:n,disabled:v,mode:k?1:0,virtual:q.virtual,get activeOptionIndex(){if(oe.current&&q.activeOptionIndex===null&&q.options.length>0){let ie=q.options.findIndex(G=>!G.dataRef.current.disabled);if(ie!==-1)return ie}return q.activeOptionIndex},calculateIndex:Ie,compare:he,isSelected:_e,isActive:st,nullable:E,__demoMode:x}),[_,n,v,k,E,x,q,P]);nt(()=>{},[P,void 0]),nt(()=>{q.dataRef.current=U},[U]),io([U.buttonRef,U.inputRef,U.optionsRef],()=>Wt.closeCombobox(),U.comboboxState===0);let Xe=b.useMemo(()=>{var ie,G,Q;return{open:U.comboboxState===0,disabled:v,activeIndex:U.activeOptionIndex,activeOption:U.activeOptionIndex===null?null:U.virtual?U.virtual.options[(ie=U.activeOptionIndex)!=null?ie:0]:(Q=(G=U.options[U.activeOptionIndex])==null?void 0:G.dataRef.current.value)!=null?Q:null,value:_}},[U,v,_]),De=te(()=>{if(U.activeOptionIndex!==null){if(U.virtual)kt(U.virtual.options[U.activeOptionIndex]);else{let{dataRef:ie}=U.options[U.activeOptionIndex];kt(ie.current.value)}Wt.goToOption(rt.Specific,U.activeOptionIndex)}}),ce=te(()=>{ne({type:0}),oe.current=!0}),Te=te(()=>{ne({type:1}),oe.current=!1}),Je=te((ie,G,Q)=>(oe.current=!1,ie===rt.Specific?ne({type:2,focus:rt.Specific,idx:G,trigger:Q}):ne({type:2,focus:ie,trigger:Q}))),Qe=te((ie,G)=>(ne({type:3,payload:{id:ie,dataRef:G}}),()=>{U.isActive(G.current.value)&&(oe.current=!0),ne({type:4,id:ie})})),yt=te(ie=>(ne({type:5,id:ie}),()=>ne({type:5,id:null}))),kt=te(ie=>bt(U.mode,{0(){return B==null?void 0:B(ie)},1(){let G=U.value.slice(),Q=G.findIndex(Re=>he(Re,ie));return Q===-1?G.push(ie):G.splice(Q,1),B==null?void 0:B(G)}})),ft=te(ie=>{ne({type:6,trigger:ie})}),Wt=b.useMemo(()=>({onChange:kt,registerOption:Qe,registerLabel:yt,goToOption:Je,closeCombobox:Te,openCombobox:ce,setActivationTrigger:ft,selectActiveOption:De}),[]),je=l===null?{}:{ref:l},ot=b.useRef(null),Ve=en();return b.useEffect(()=>{ot.current&&n!==void 0&&Ve.addEventListener(ot.current,"reset",()=>{B==null||B(n)})},[ot,B]),b.createElement(mo.Provider,{value:Wt},b.createElement(ho.Provider,{value:U},b.createElement(co,{value:bt(U.comboboxState,{0:Ct.Open,1:Ct.Closed})},a!=null&&_!=null&&Ol({[a]:_}).map(([ie,G],Q)=>b.createElement(Hn,{features:Pn.Hidden,ref:Q===0?Re=>{var Ze;ot.current=(Ze=Re==null?void 0:Re.closest("form"))!=null?Ze:null}:void 0,...Or({key:ie,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:f,disabled:v,name:ie,value:G})})),mt({ourProps:je,theirProps:M,slot:Xe,defaultTag:Zs,name:"Combobox"}))))}let Gs="input";function qs(t,l){var r,n,u,f,a;let m=At(),{id:v=`headlessui-combobox-input-${m}`,onChange:x,displayValue:E,type:k="text",...R}=t,T=En("Combobox.Input"),M=Vn("Combobox.Input"),L=Et(T.inputRef,l),P=wn(T.inputRef),_=b.useRef(!1),B=en(),q=te(()=>{M.onChange(null),T.optionsRef.current&&(T.optionsRef.current.scrollTop=0),M.goToOption(rt.Nothing)}),ne=function(){var U;return typeof E=="function"&&T.value!==void 0?(U=E(T.value))!=null?U:"":typeof T.value=="string"?T.value:""}();Wn(([U,Xe],[De,ce])=>{if(_.current)return;let Te=T.inputRef.current;Te&&((ce===0&&Xe===1||U!==De)&&(Te.value=U),requestAnimationFrame(()=>{if(_.current||!Te||(P==null?void 0:P.activeElement)!==Te)return;let{selectionStart:Je,selectionEnd:Qe}=Te;Math.abs((Qe??0)-(Je??0))===0&&Je===0&&Te.setSelectionRange(Te.value.length,Te.value.length)}))},[ne,T.comboboxState,P]),Wn(([U],[Xe])=>{if(U===0&&Xe===1){if(_.current)return;let De=T.inputRef.current;if(!De)return;let ce=De.value,{selectionStart:Te,selectionEnd:Je,selectionDirection:Qe}=De;De.value="",De.value=ce,Qe!==null?De.setSelectionRange(Te,Je,Qe):De.setSelectionRange(Te,Je)}},[T.comboboxState]);let oe=b.useRef(!1),me=te(()=>{oe.current=!0}),Ne=te(()=>{B.nextFrame(()=>{oe.current=!1})}),Oe=te(U=>{switch(_.current=!0,U.key){case Ge.Enter:if(_.current=!1,T.comboboxState!==0||oe.current)return;if(U.preventDefault(),U.stopPropagation(),T.activeOptionIndex===null){M.closeCombobox();return}M.selectActiveOption(),T.mode===0&&M.closeCombobox();break;case Ge.ArrowDown:return _.current=!1,U.preventDefault(),U.stopPropagation(),bt(T.comboboxState,{0:()=>M.goToOption(rt.Next),1:()=>M.openCombobox()});case Ge.ArrowUp:return _.current=!1,U.preventDefault(),U.stopPropagation(),bt(T.comboboxState,{0:()=>M.goToOption(rt.Previous),1:()=>{M.openCombobox(),B.nextFrame(()=>{T.value||M.goToOption(rt.Last)})}});case Ge.Home:if(U.shiftKey)break;return _.current=!1,U.preventDefault(),U.stopPropagation(),M.goToOption(rt.First);case Ge.PageUp:return _.current=!1,U.preventDefault(),U.stopPropagation(),M.goToOption(rt.First);case Ge.End:if(U.shiftKey)break;return _.current=!1,U.preventDefault(),U.stopPropagation(),M.goToOption(rt.Last);case Ge.PageDown:return _.current=!1,U.preventDefault(),U.stopPropagation(),M.goToOption(rt.Last);case Ge.Escape:return _.current=!1,T.comboboxState!==0?void 0:(U.preventDefault(),T.optionsRef.current&&!T.optionsPropsRef.current.static&&U.stopPropagation(),T.nullable&&T.mode===0&&T.value===null&&q(),M.closeCombobox());case Ge.Tab:if(_.current=!1,T.comboboxState!==0)return;T.mode===0&&T.activationTrigger!==1&&M.selectActiveOption(),M.closeCombobox();break}}),Ce=te(U=>{x==null||x(U),T.nullable&&T.mode===0&&U.target.value===""&&q(),M.openCombobox()}),y=te(U=>{var Xe,De,ce;let Te=(Xe=U.relatedTarget)!=null?Xe:Gt.find(Je=>Je!==U.currentTarget);if(_.current=!1,!((De=T.optionsRef.current)!=null&&De.contains(Te))&&!((ce=T.buttonRef.current)!=null&&ce.contains(Te))&&T.comboboxState===0)return U.preventDefault(),T.mode===0&&(T.nullable&&T.value===null?q():T.activationTrigger!==1&&M.selectActiveOption()),M.closeCombobox()}),he=te(U=>{var Xe,De,ce;let Te=(Xe=U.relatedTarget)!=null?Xe:Gt.find(Je=>Je!==U.currentTarget);(De=T.buttonRef.current)!=null&&De.contains(Te)||(ce=T.optionsRef.current)!=null&&ce.contains(Te)||T.disabled||T.immediate&&T.comboboxState!==0&&(M.openCombobox(),B.nextFrame(()=>{M.setActivationTrigger(1)}))}),Ie=to(()=>{if(T.labelId)return[T.labelId].join(" ")},[T.labelId]),_e=b.useMemo(()=>({open:T.comboboxState===0,disabled:T.disabled}),[T]),st={ref:L,id:v,role:"combobox",type:k,"aria-controls":(r=T.optionsRef.current)==null?void 0:r.id,"aria-expanded":T.comboboxState===0,"aria-activedescendant":T.activeOptionIndex===null?void 0:T.virtual?(n=T.options.find(U=>{var Xe;return!((Xe=T.virtual)!=null&&Xe.disabled(U.dataRef.current.value))&&T.compare(U.dataRef.current.value,T.virtual.options[T.activeOptionIndex])}))==null?void 0:n.id:(u=T.options[T.activeOptionIndex])==null?void 0:u.id,"aria-labelledby":Ie,"aria-autocomplete":"list",defaultValue:(a=(f=t.defaultValue)!=null?f:T.defaultValue!==void 0?E==null?void 0:E(T.defaultValue):null)!=null?a:T.defaultValue,disabled:T.disabled,onCompositionStart:me,onCompositionEnd:Ne,onKeyDown:Oe,onChange:Ce,onFocus:he,onBlur:y};return mt({ourProps:st,theirProps:R,slot:_e,defaultTag:Gs,name:"Combobox.Input"})}let Ks="button";function Xs(t,l){var r;let n=En("Combobox.Button"),u=Vn("Combobox.Button"),f=Et(n.buttonRef,l),a=At(),{id:m=`headlessui-combobox-button-${a}`,...v}=t,x=en(),E=te(L=>{switch(L.key){case Ge.ArrowDown:return L.preventDefault(),L.stopPropagation(),n.comboboxState===1&&u.openCombobox(),x.nextFrame(()=>{var P;return(P=n.inputRef.current)==null?void 0:P.focus({preventScroll:!0})});case Ge.ArrowUp:return L.preventDefault(),L.stopPropagation(),n.comboboxState===1&&(u.openCombobox(),x.nextFrame(()=>{n.value||u.goToOption(rt.Last)})),x.nextFrame(()=>{var P;return(P=n.inputRef.current)==null?void 0:P.focus({preventScroll:!0})});case Ge.Escape:return n.comboboxState!==0?void 0:(L.preventDefault(),n.optionsRef.current&&!n.optionsPropsRef.current.static&&L.stopPropagation(),u.closeCombobox(),x.nextFrame(()=>{var P;return(P=n.inputRef.current)==null?void 0:P.focus({preventScroll:!0})}));default:return}}),k=te(L=>{if(Nr(L.currentTarget))return L.preventDefault();n.comboboxState===0?u.closeCombobox():(L.preventDefault(),u.openCombobox()),x.nextFrame(()=>{var P;return(P=n.inputRef.current)==null?void 0:P.focus({preventScroll:!0})})}),R=to(()=>{if(n.labelId)return[n.labelId,m].join(" ")},[n.labelId,m]),T=b.useMemo(()=>({open:n.comboboxState===0,disabled:n.disabled,value:n.value}),[n]),M={ref:f,id:m,type:so(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":R,disabled:n.disabled,onClick:k,onKeyDown:E};return mt({ourProps:M,theirProps:v,slot:T,defaultTag:Ks,name:"Combobox.Button"})}let Js="label";function Qs(t,l){let r=At(),{id:n=`headlessui-combobox-label-${r}`,...u}=t,f=En("Combobox.Label"),a=Vn("Combobox.Label"),m=Et(f.labelRef,l);nt(()=>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 mt({ourProps:{ref:m,id:n,onClick:v},theirProps:u,slot:x,defaultTag:Js,name:"Combobox.Label"})}let ea="ul",ta=cn.RenderStrategy|cn.Static;function na(t,l){let r=At(),{id:n=`headlessui-combobox-options-${r}`,hold:u=!1,...f}=t,a=En("Combobox.Options"),m=Et(a.optionsRef,l),v=Un(),x=v!==null?(v&Ct.Open)===Ct.Open:a.comboboxState===0;nt(()=>{var T;a.optionsPropsRef.current.static=(T=t.static)!=null?T:!1},[a.optionsPropsRef,t.static]),nt(()=>{a.optionsPropsRef.current.hold=u},[a.optionsPropsRef,u]),jl({container:a.optionsRef.current,enabled:a.comboboxState===0,accept(T){return T.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:T.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(T){T.setAttribute("role","none")}});let E=to(()=>{var T,M;return(M=a.labelId)!=null?M:(T=a.buttonRef.current)==null?void 0:T.id},[a.labelId,a.buttonRef.current]),k=b.useMemo(()=>({open:a.comboboxState===0,option:void 0}),[a]),R={"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)}),mt({ourProps:R,theirProps:f,slot:k,defaultTag:ea,features:ta,visible:x,name:"Combobox.Options"})}let ra="li";function oa(t,l){var r;let n=At(),{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,R=x.isSelected(a),T=b.useRef(null),M=Vt({disabled:f,value:a,domRef:T,order:m}),L=b.useContext(kl),P=Et(l,T,L?L.measureElement:null),_=te(()=>E.onChange(a));nt(()=>E.registerOption(u,M),[M,u]);let B=b.useRef(!(x.virtual||x.__demoMode));nt(()=>{if(!x.virtual||!x.__demoMode)return;let y=zt();return y.requestAnimationFrame(()=>{B.current=!0}),y.dispose},[x.virtual,x.__demoMode]),nt(()=>{if(!B.current||x.comboboxState!==0||!k||x.activationTrigger===0)return;let y=zt();return y.requestAnimationFrame(()=>{var he,Ie;(Ie=(he=T.current)==null?void 0:he.scrollIntoView)==null||Ie.call(he,{block:"nearest"})}),y.dispose},[T,k,x.comboboxState,x.activationTrigger,x.activeOptionIndex]);let q=te(y=>{var he;if(f||(he=x.virtual)!=null&&he.disabled(a))return y.preventDefault();_(),xl()||requestAnimationFrame(()=>{var Ie;return(Ie=x.inputRef.current)==null?void 0:Ie.focus({preventScroll:!0})}),x.mode===0&&requestAnimationFrame(()=>E.closeCombobox())}),ne=te(()=>{var y;if(f||(y=x.virtual)!=null&&y.disabled(a))return E.goToOption(rt.Nothing);let he=x.calculateIndex(a);E.goToOption(rt.Specific,he)}),oe=Cl(),me=te(y=>oe.update(y)),Ne=te(y=>{var he;if(!oe.wasMoved(y)||f||(he=x.virtual)!=null&&he.disabled(a)||k)return;let Ie=x.calculateIndex(a);E.goToOption(rt.Specific,Ie,0)}),Oe=te(y=>{var he;oe.wasMoved(y)&&(f||(he=x.virtual)!=null&&he.disabled(a)||k&&(x.optionsPropsRef.current.hold||E.goToOption(rt.Nothing)))}),Ce=b.useMemo(()=>({active:k,selected:R,disabled:f}),[k,R,f]);return mt({ourProps:{id:u,ref:P,role:"option",tabIndex:f===!0?void 0:-1,"aria-disabled":f===!0?!0:void 0,"aria-selected":R,disabled:void 0,onClick:q,onFocus:ne,onPointerEnter:me,onMouseEnter:me,onPointerMove:Ne,onMouseMove:Ne,onPointerLeave:Oe,onMouseLeave:Oe},theirProps:v,slot:Ce,defaultTag:ra,name:"Combobox.Option"})}let la=ht(Ys),ia=ht(Xs),sa=ht(qs),aa=ht(Qs),ua=ht(na),ca=ht(oa),nn=Object.assign(la,{Input:sa,Button:ia,Label:aa,Options:ua,Option:ca});function Pl(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 nt(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Fl(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 yl("keydown",l=>{l.key==="Tab"&&(t.current=l.shiftKey?1:0)},!0),t}function Ml(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 Rl=(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))(Rl||{});function pa(t,l){let r=b.useRef(null),n=Et(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(L=>{let P=r.current;P&&(_=>_())(()=>{bt(E.current,{[Yn.Forwards]:()=>{zn(P,tn.First,{skipElements:[L.relatedTarget]})},[Yn.Backwards]:()=>{zn(P,tn.Last,{skipElements:[L.relatedTarget]})}})})}),R=en(),T=b.useRef(!1),M={ref:n,onKeyDown(L){L.key=="Tab"&&(T.current=!0,R.requestAnimationFrame(()=>{T.current=!1}))},onBlur(L){let P=Ml(f);r.current instanceof HTMLElement&&P.add(r.current);let _=L.relatedTarget;_ instanceof HTMLElement&&_.dataset.headlessuiFocusGuard!=="true"&&(Ll(P,_)||(T.current?zn(r.current,bt(E.current,{[Yn.Forwards]:()=>tn.Next,[Yn.Backwards]:()=>tn.Previous})|tn.WrapAround,{relativeTo:L.target}):L.target instanceof HTMLElement&&un(L.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}),mt({ourProps:M,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=ht(pa),Gn=Object.assign(ma,{features:Rl});function ha(t=!0){let l=b.useRef(Gt.slice());return Wn(([r],[n])=>{n===!0&&r===!1&&Er(()=>{l.current.splice(0)}),n===!1&&r===!0&&(l.current=Gt.slice())},[t,Gt,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)&&un(r())},[l]),Fl(()=>{l&&un(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?un(r.current):zn(a,tn.First)===hl.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();Pl(t==null?void 0:t.defaultView,"focus",a=>{if(!u||!f.current)return;let m=Ml(r);l.current instanceof HTMLElement&&m.add(l.current);let v=n.current;if(!v)return;let x=a.target;x&&x instanceof HTMLElement?Ll(m,x)?(n.current=x,un(x)):(a.preventDefault(),a.stopPropagation(),un(v)):un(n.current)},!0)}function Ll(t,l){for(let r of t)if(r.contains(l))return!0;return!1}let Al=b.createContext(!1);function xa(){return b.useContext(Al)}function vo(t){return b.createElement(Al.Provider,{value:t.force},t.children)}function ya(t){let l=xa(),r=b.useContext(Dl),n=wn(t),[u,f]=b.useState(()=>{if(!l&&r!==null||Qt.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=Et(Ps(E=>{n.current=E}),l),f=wn(n),a=ya(n),[m]=b.useState(()=>{var E;return Qt.isServer?null:(E=f==null?void 0:f.createElement("div"))!=null?E:null}),v=b.useContext(go),x=kn();return nt(()=>{!a||!m||a.contains(m)||(m.setAttribute("data-headlessui-portal",""),a.appendChild(m))},[a,m]),nt(()=>{if(m&&v)return v.register(m)},[v,m]),Fl(()=>{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(mt({ourProps:{ref:u},theirProps:r,defaultTag:wa,name:"Portal"}),m):null}let Sa=b.Fragment,Dl=b.createContext(null);function Ca(t,l){let{target:r,...n}=t,u={ref:Et(l)};return b.createElement(Dl.Provider,{value:r},mt({ourProps:u,theirProps:n,defaultTag:Sa,name:"Popover.Group"}))}let go=b.createContext(null);function ja(){let t=b.useContext(go),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(go.Provider,{value:u},f)},[u])]}let Ta=ht(Ea),Oa=ht(Ca),bo=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}=Y;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,xo(u)&&f({inst:u})},[t,n,l]),Pa(()=>(xo(u)&&f({inst:u}),t(()=>{xo(u)&&f({inst:u})})),[t]),Ma(n),n}function xo(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 Y?(t=>t.useSyncExternalStore)(Y):$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 bl()?{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=zt();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:zt(),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 nt(()=>{if(!(!t||!l))return Sn.dispatch("PUSH",t,r),()=>Sn.dispatch("POP",t,r)},[l,t]),f}let yo=new Map,qn=new Map;function $l(t,l=!0){nt(()=>{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=yo.get(n);v&&(v["aria-hidden"]===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",v["aria-hidden"]),n.inert=v.inert,yo.delete(n))}let f=(r=qn.get(n))!=null?r:0;return qn.set(n,f+1),f!==0||(yo.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(R=>k.contains(R))||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 wo=b.createContext(()=>{});wo.displayName="StackContext";var Eo=(t=>(t[t.Add=0]="Add",t[t.Remove=1]="Remove",t))(Eo||{});function Ga(){return b.useContext(wo)}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 nt(()=>{let m=u===void 0||u===!0;return m&&a(0,r,n),()=>{m&&a(1,r,n)}},[a,r,n,u]),b.createElement(wo.Provider,{value:a},t)}let _l=b.createContext(null);function Bl(){let t=b.useContext(_l);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,Bl),l}return t}function zl(){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(_l.Provider,{value:u},r.children)},[l])]}let Ka="p";function Xa(t,l){let r=At(),{id:n=`headlessui-description-${r}`,...u}=t,f=Bl(),a=Et(l);nt(()=>f.register(n),[n,f.register]);let m={ref:a,...f.props,id:n};return mt({ourProps:m,theirProps:u,slot:f.slot||{},defaultTag:Ka,name:f.name||"Description"})}let Ja=ht(Xa),Wl=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=cn.RenderStrategy|cn.Static;function iu(t,l){let r=At(),{id:n=`headlessui-dialog-${r}`,open:u,onClose:f,initialFocus:a,role:m="dialog",__demoMode:v=!1,...x}=t,[E,k]=b.useState(0),R=b.useRef(!1);m=function(){return m==="dialog"||m==="alertdialog"?m:(R.current||(R.current=!0,console.warn(`Invalid role [${m}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let T=Un();u===void 0&&T!==null&&(u=(T&Ct.Open)===Ct.Open);let M=b.useRef(null),L=Et(M,l),P=wn(M),_=t.hasOwnProperty("open")||T!==null,B=t.hasOwnProperty("onClose");if(!_&&!B)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!_)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!B)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 q=u?0:1,[ne,oe]=b.useReducer(ru,{titleId:null,descriptionId:null,panelRef:b.createRef()}),me=te(()=>f(!1)),Ne=te(Q=>oe({type:0,id:Q})),Oe=kn()?v?!1:q===0:!1,Ce=E>1,y=b.useContext(Ir)!==null,[he,Ie]=ja(),_e={get current(){var Q;return(Q=ne.panelRef.current)!=null?Q:M.current}},{resolveContainers:st,mainTreeNodeRef:U,MainTreeNode:Xe}=Ya({portals:he,defaultContainers:[_e]}),De=Ce?"parent":"leaf",ce=T!==null?(T&Ct.Closing)===Ct.Closing:!1,Te=y||ce?!1:Oe,Je=b.useCallback(()=>{var Q,Re;return(Re=Array.from((Q=P==null?void 0:P.querySelectorAll("body > *"))!=null?Q:[]).find(Ze=>Ze.id==="headlessui-portal-root"?!1:Ze.contains(U.current)&&Ze instanceof HTMLElement))!=null?Re:null},[U]);$l(Je,Te);let Qe=Ce?!0:Oe,yt=b.useCallback(()=>{var Q,Re;return(Re=Array.from((Q=P==null?void 0:P.querySelectorAll("[data-headlessui-portal]"))!=null?Q:[]).find(Ze=>Ze.contains(U.current)&&Ze instanceof HTMLElement))!=null?Re:null},[U]);$l(yt,Qe),io(st,Q=>{Q.preventDefault(),me()},!(!Oe||Ce));let ft=!(Ce||q!==0);Pl(P==null?void 0:P.defaultView,"keydown",Q=>{ft&&(Q.defaultPrevented||Q.key===Ge.Escape&&(Q.preventDefault(),Q.stopPropagation(),me()))}),nu(P,!(ce||q!==0||y),st),b.useEffect(()=>{if(q!==0||!M.current)return;let Q=new ResizeObserver(Re=>{for(let Ze of Re){let ke=Ze.target.getBoundingClientRect();ke.x===0&&ke.y===0&&ke.width===0&&ke.height===0&&me()}});return Q.observe(M.current),()=>Q.disconnect()},[q,M,me]);let[je,ot]=zl(),Ve=b.useMemo(()=>[{dialogState:q,close:me,setTitleId:Ne},ne],[q,ne,me,Ne]),ie=b.useMemo(()=>({open:q===0}),[q]),G={ref:L,id:n,role:m,"aria-modal":q===0?!0:void 0,"aria-labelledby":ne.titleId,"aria-describedby":je};return b.createElement(qa,{type:"Dialog",enabled:q===0,element:M,onUpdate:te((Q,Re)=>{Re==="Dialog"&&bt(Q,{[Eo.Add]:()=>k(Ze=>Ze+1),[Eo.Remove]:()=>k(Ze=>Ze-1)})})},b.createElement(vo,{force:!0},b.createElement(bo,null,b.createElement(Ir.Provider,{value:Ve},b.createElement(bo.Group,{target:M},b.createElement(vo,{force:!1},b.createElement(ot,{slot:ie,name:"Dialog.Description"},b.createElement(Gn,{initialFocus:a,containers:st,features:Oe?bt(De,{parent:Gn.features.RestoreFocus,leaf:Gn.features.All&~Gn.features.FocusLock}):Gn.features.None},b.createElement(Ie,null,mt({ourProps:G,theirProps:x,slot:ie,defaultTag:ou,features:lu,visible:q===0,name:"Dialog"}))))))))),b.createElement(Xe,null))}let su="div";function au(t,l){let r=At(),{id:n=`headlessui-dialog-overlay-${r}`,...u}=t,[{dialogState:f,close:a}]=Kn("Dialog.Overlay"),m=Et(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 mt({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=At(),{id:n=`headlessui-dialog-backdrop-${r}`,...u}=t,[{dialogState:f},a]=Kn("Dialog.Backdrop"),m=Et(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(vo,{force:!0},b.createElement(bo,null,mt({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=At(),{id:n=`headlessui-dialog-panel-${r}`,...u}=t,[{dialogState:f},a]=Kn("Dialog.Panel"),m=Et(l,a.panelRef),v=b.useMemo(()=>({open:f===0}),[f]),x=te(E=>{E.stopPropagation()});return mt({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=At(),{id:n=`headlessui-dialog-title-${r}`,...u}=t,[{dialogState:f,setTitleId:a}]=Kn("Dialog.Title"),m=Et(l);b.useEffect(()=>(a(n),()=>a(null)),[n,a]);let v=b.useMemo(()=>({open:f===0}),[f]);return mt({ourProps:{ref:m,id:n},theirProps:u,slot:v,defaultTag:pu,name:"Dialog.Title"})}let hu=ht(iu),vu=ht(cu),gu=ht(fu),bu=ht(au),xu=ht(mu),Hl=Object.assign(hu,{Backdrop:vu,Panel:gu,Overlay:bu,Title:xu,Description:Wl}),Ul=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Vl(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 Ul.test(a)&&(a=a.replace(Ul,"")),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():Vl(f).trim()}return null}).filter(Boolean);if(n.length>0)return n.join(", ")}return Vl(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 So(t,l=r=>r){let r=t.activeItemIndex!==null?t.items[t.activeItemIndex]:null,n=lo(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=So(t),u=fo(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=So(t,n=>[...n,{id:l.id,dataRef:l.dataRef}]);return{...t,...r}},6:(t,l)=>{let r=So(t,n=>{let u=n.findIndex(f=>f.id===l.id);return u!==-1&&n.splice(u,1),n});return{...t,...r,activationTrigger:1}}},Co=b.createContext(null);Co.displayName="MenuContext";function kr(t){let l=b.useContext(Co);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=Et(l);io([m,a],(T,M)=>{var L;v({type:1}),oo(M,ro.Loose)||(T.preventDefault(),(L=m.current)==null||L.focus())},f===0);let E=te(()=>{v({type:1})}),k=b.useMemo(()=>({open:f===0,close:E}),[f,E]),R={ref:x};return b.createElement(Co.Provider,{value:u},b.createElement(co,{value:bt(f,{0:Ct.Open,1:Ct.Closed})},mt({ourProps:R,theirProps:n,slot:k,defaultTag:Ou,name:"Menu"})))}let Iu="button";function ku(t,l){var r;let n=At(),{id:u=`headlessui-menu-button-${n}`,...f}=t,[a,m]=kr("Menu.Button"),v=Et(a.buttonRef,l),x=en(),E=te(L=>{switch(L.key){case Ge.Space:case Ge.Enter:case Ge.ArrowDown:L.preventDefault(),L.stopPropagation(),m({type:0}),x.nextFrame(()=>m({type:2,focus:rt.First}));break;case Ge.ArrowUp:L.preventDefault(),L.stopPropagation(),m({type:0}),x.nextFrame(()=>m({type:2,focus:rt.Last}));break}}),k=te(L=>{switch(L.key){case Ge.Space:L.preventDefault();break}}),R=te(L=>{if(Nr(L.currentTarget))return L.preventDefault();t.disabled||(a.menuState===0?(m({type:1}),x.nextFrame(()=>{var P;return(P=a.buttonRef.current)==null?void 0:P.focus({preventScroll:!0})})):(L.preventDefault(),m({type:0})))}),T=b.useMemo(()=>({open:a.menuState===0}),[a]),M={ref:v,id:u,type:so(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:R};return mt({ourProps:M,theirProps:f,slot:T,defaultTag:Iu,name:"Menu.Button"})}let Pu="div",Fu=cn.RenderStrategy|cn.Static;function Mu(t,l){var r,n;let u=At(),{id:f=`headlessui-menu-items-${u}`,...a}=t,[m,v]=kr("Menu.Items"),x=Et(m.itemsRef,l),E=wn(m.itemsRef),k=en(),R=Un(),T=R!==null?(R&Ct.Open)===Ct.Open:m.menuState===0;b.useEffect(()=>{let B=m.itemsRef.current;B&&m.menuState===0&&B!==(E==null?void 0:E.activeElement)&&B.focus({preventScroll:!0})},[m.menuState,m.itemsRef,E]),jl({container:m.itemsRef.current,enabled:m.menuState===0,accept(B){return B.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:B.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(B){B.setAttribute("role","none")}});let M=te(B=>{var q,ne;switch(k.dispose(),B.key){case Ge.Space:if(m.searchQuery!=="")return B.preventDefault(),B.stopPropagation(),v({type:3,value:B.key});case Ge.Enter:if(B.preventDefault(),B.stopPropagation(),v({type:1}),m.activeItemIndex!==null){let{dataRef:oe}=m.items[m.activeItemIndex];(ne=(q=oe.current)==null?void 0:q.domRef.current)==null||ne.click()}gl(m.buttonRef.current);break;case Ge.ArrowDown:return B.preventDefault(),B.stopPropagation(),v({type:2,focus:rt.Next});case Ge.ArrowUp:return B.preventDefault(),B.stopPropagation(),v({type:2,focus:rt.Previous});case Ge.Home:case Ge.PageUp:return B.preventDefault(),B.stopPropagation(),v({type:2,focus:rt.First});case Ge.End:case Ge.PageDown:return B.preventDefault(),B.stopPropagation(),v({type:2,focus:rt.Last});case Ge.Escape:B.preventDefault(),B.stopPropagation(),v({type:1}),zt().nextFrame(()=>{var oe;return(oe=m.buttonRef.current)==null?void 0:oe.focus({preventScroll:!0})});break;case Ge.Tab:B.preventDefault(),B.stopPropagation(),v({type:1}),zt().nextFrame(()=>{Is(m.buttonRef.current,B.shiftKey?tn.Previous:tn.Next)});break;default:B.key.length===1&&(v({type:3,value:B.key}),k.setTimeout(()=>v({type:4}),350));break}}),L=te(B=>{switch(B.key){case Ge.Space:B.preventDefault();break}}),P=b.useMemo(()=>({open:m.menuState===0}),[m]),_={"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:L,role:"menu",tabIndex:0,ref:x};return mt({ourProps:_,theirProps:a,slot:P,defaultTag:Pu,features:Fu,visible:T,name:"Menu.Items"})}let Ru=b.Fragment;function Lu(t,l){let r=At(),{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=Et(l,x);nt(()=>{if(a.__demoMode||a.menuState!==0||!v||a.activationTrigger===0)return;let oe=zt();return oe.requestAnimationFrame(()=>{var me,Ne;(Ne=(me=x.current)==null?void 0:me.scrollIntoView)==null||Ne.call(me,{block:"nearest"})}),oe.dispose},[a.__demoMode,x,v,a.menuState,a.activationTrigger,a.activeItemIndex]);let k=wu(x),R=b.useRef({disabled:u,domRef:x,get textValue(){return k()}});nt(()=>{R.current.disabled=u},[R,u]),nt(()=>(m({type:5,id:n,dataRef:R}),()=>m({type:6,id:n})),[R,n]);let T=te(()=>{m({type:1})}),M=te(oe=>{if(u)return oe.preventDefault();m({type:1}),gl(a.buttonRef.current)}),L=te(()=>{if(u)return m({type:2,focus:rt.Nothing});m({type:2,focus:rt.Specific,id:n})}),P=Cl(),_=te(oe=>P.update(oe)),B=te(oe=>{P.wasMoved(oe)&&(u||v||m({type:2,focus:rt.Specific,id:n,trigger:0}))}),q=te(oe=>{P.wasMoved(oe)&&(u||v&&m({type:2,focus:rt.Nothing}))}),ne=b.useMemo(()=>({active:v,disabled:u,close:T}),[v,u,T]);return mt({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:L,onPointerEnter:_,onMouseEnter:_,onPointerMove:B,onMouseMove:B,onPointerLeave:q,onMouseLeave:q},theirProps:f,slot:ne,defaultTag:Ru,name:"Menu.Item"})}let Au=ht(Nu),Du=ht(ku),$u=ht(Mu),_u=ht(Lu),Pr=Object.assign(Au,{Button:Du,Items:$u,Item:_u}),Zl=b.createContext(null);function Yl(){let t=b.useContext(Zl);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,Yl),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(Zl.Provider,{value:u},r.children)},[l])]}let zu="label";function Wu(t,l){let r=At(),{id:n=`headlessui-label-${r}`,passive:u=!1,...f}=t,a=Yl(),m=Et(l);nt(()=>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),mt({ourProps:v,theirProps:f,slot:a.slot||{},defaultTag:zu,name:a.name||"Label"})}let Hu=ht(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 jo=b.createContext(null);jo.displayName="GroupContext";let Zu=b.Fragment;function Yu(t){var l;let[r,n]=b.useState(null),[u,f]=Bu(),[a,m]=zl(),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(jo.Provider,{value:v},mt({ourProps:x,theirProps:E,defaultTag:Zu,name:"Switch.Group"}))))}let Gu="button";function qu(t,l){var r;let n=At(),{id:u=`headlessui-switch-${n}`,checked:f,defaultChecked:a=!1,onChange:m,disabled:v=!1,name:x,value:E,form:k,...R}=t,T=b.useContext(jo),M=b.useRef(null),L=Et(M,l,T===null?null:T.setSwitch),[P,_]=pl(f,m,a),B=te(()=>_==null?void 0:_(!P)),q=te(Ce=>{if(Nr(Ce.currentTarget))return Ce.preventDefault();Ce.preventDefault(),B()}),ne=te(Ce=>{Ce.key===Ge.Space?(Ce.preventDefault(),B()):Ce.key===Ge.Enter&&$s(Ce.currentTarget)}),oe=te(Ce=>Ce.preventDefault()),me=b.useMemo(()=>({checked:P}),[P]),Ne={id:u,ref:L,role:"switch",type:so(t,M),tabIndex:t.tabIndex===-1?0:(r=t.tabIndex)!=null?r:0,"aria-checked":P,"aria-labelledby":T==null?void 0:T.labelledby,"aria-describedby":T==null?void 0:T.describedby,disabled:v,onClick:q,onKeyUp:ne,onKeyPress:oe},Oe=en();return b.useEffect(()=>{var Ce;let y=(Ce=M.current)==null?void 0:Ce.closest("form");y&&a!==void 0&&Oe.addEventListener(y,"reset",()=>{_(a)})},[M,_]),b.createElement(b.Fragment,null,x!=null&&P&&b.createElement(Hn,{features:Pn.Hidden,...Or({as:"input",type:"checkbox",hidden:!0,readOnly:!0,disabled:v,form:k,checked:P,name:x,value:E})}),mt({ourProps:Ne,theirProps:R,slot:me,defaultTag:Gu,name:"Switch"}))}let Ku=ht(qu),Xu=Yu,Ju=Object.assign(Ku,{Group:Xu,Label:Uu,Description:Wl});function Qu(t){let l={called:!1};return(...r)=>{if(!l.called)return l.called=!0,t(...r)}}function To(t,...l){t&&l.length>0&&t.classList.add(...l)}function Oo(t,...l){t&&l.length>0&&t.classList.remove(...l)}function ec(t,l){let r=zt();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=zt(),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 Oo(t,...l.base,...l.enter,...l.enterTo,...l.enterFrom,...l.leave,...l.leaveFrom,...l.leaveTo,...l.entered),To(t,...l.base,...m,...x),f.nextFrame(()=>{Oo(t,...l.base,...m,...x),To(t,...l.base,...m,...v),ec(t,()=>(Oo(t,...l.base,...m),To(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=en(),v=Vt(r);nt(()=>{t&&(v.current="enter")},[t]),nt(()=>{let x=zt();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 fn(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 Gl(t,l){let r=Vt(t),n=b.useRef([]),u=Zn(),f=en(),a=te((T,M=dn.Hidden)=>{let L=n.current.findIndex(({el:P})=>P===T);L!==-1&&(bt(M,{[dn.Unmount](){n.current.splice(L,1)},[dn.Hidden](){n.current[L].state="hidden"}}),f.microTask(()=>{var P;!Rr(n)&&u.current&&((P=r.current)==null||P.call(r))}))}),m=te(T=>{let M=n.current.find(({el:L})=>L===T);return M?M.state!=="visible"&&(M.state="visible"):n.current.push({el:T,state:"visible"}),()=>a(T,dn.Unmount)}),v=b.useRef([]),x=b.useRef(Promise.resolve()),E=b.useRef({enter:[],leave:[],idle:[]}),k=te((T,M,L)=>{v.current.splice(0),l&&(l.chains.current[M]=l.chains.current[M].filter(([P])=>P!==T)),l==null||l.chains.current[M].push([T,new Promise(P=>{v.current.push(P)})]),l==null||l.chains.current[M].push([T,new Promise(P=>{Promise.all(E.current[M].map(([_,B])=>B)).then(()=>P())})]),M==="enter"?x.current=x.current.then(()=>l==null?void 0:l.wait.current).then(()=>L(M)):L(M)}),R=te((T,M,L)=>{Promise.all(E.current[M].splice(0).map(([P,_])=>_)).then(()=>{var P;(P=v.current.shift())==null||P()}).then(()=>L(M))});return b.useMemo(()=>({children:n,register:m,unregister:a,onStart:k,onStop:R,wait:x,chains:E}),[m,a,n,k,R,E,x])}function ic(){}let sc=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function ql(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(ql(t));return b.useEffect(()=>{l.current=ql(t)},[t]),l}let uc="div",Kl=cn.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:R,leaveFrom:T,leaveTo:M,...L}=t,P=b.useRef(null),_=Et(P,l),B=(r=L.unmount)==null||r?dn.Unmount:dn.Hidden,{show:q,appear:ne,initial:oe}=oc(),[me,Ne]=b.useState(q?"visible":"hidden"),Oe=lc(),{register:Ce,unregister:y}=Oe;b.useEffect(()=>Ce(P),[Ce,P]),b.useEffect(()=>{if(B===dn.Hidden&&P.current){if(q&&me!=="visible"){Ne("visible");return}return bt(me,{hidden:()=>y(P),visible:()=>Ce(P)})}},[me,P,Ce,y,q,B]);let he=Vt({base:fn(L.className),enter:fn(v),enterFrom:fn(x),enterTo:fn(E),entered:fn(k),leave:fn(R),leaveFrom:fn(T),leaveTo:fn(M)}),Ie=ac({beforeEnter:u,afterEnter:f,beforeLeave:a,afterLeave:m}),_e=kn();b.useEffect(()=>{if(_e&&me==="visible"&&P.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[P,me,_e]);let st=oe&&!ne,U=ne&&q&&oe,Xe=!_e||st?"idle":q?"enter":"leave",De=Vu(0),ce=te(ft=>bt(ft,{enter:()=>{De.addFlag(Ct.Opening),Ie.current.beforeEnter()},leave:()=>{De.addFlag(Ct.Closing),Ie.current.beforeLeave()},idle:()=>{}})),Te=te(ft=>bt(ft,{enter:()=>{De.removeFlag(Ct.Opening),Ie.current.afterEnter()},leave:()=>{De.removeFlag(Ct.Closing),Ie.current.afterLeave()},idle:()=>{}})),Je=Gl(()=>{Ne("hidden"),y(P)},Oe),Qe=b.useRef(!1);nc({immediate:U,container:P,classes:he,direction:Xe,onStart:Vt(ft=>{Qe.current=!0,Je.onStart(P,ft,ce)}),onStop:Vt(ft=>{Qe.current=!1,Je.onStop(P,ft,Te),ft==="leave"&&!Rr(Je)&&(Ne("hidden"),y(P))})});let yt=L,kt={ref:_};return U?yt={...yt,className:jr(L.className,...he.current.enter,...he.current.enterFrom)}:Qe.current&&(yt.className=jr(L.className,(n=P.current)==null?void 0:n.className),yt.className===""&&delete yt.className),b.createElement(Mr.Provider,{value:Je},b.createElement(co,{value:bt(me,{visible:Ct.Open,hidden:Ct.Closed})|De.flags},mt({ourProps:kt,theirProps:yt,defaultTag:uc,features:Kl,visible:me==="visible",name:"Transition.Child"})))}function dc(t,l){let{show:r,appear:n=!1,unmount:u=!0,...f}=t,a=b.useRef(null),m=Et(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=Gl(()=>{E("hidden")}),[R,T]=b.useState(!0),M=b.useRef([r]);nt(()=>{R!==!1&&M.current[M.current.length-1]!==r&&(M.current.push(r),T(!1))},[M,r]);let L=b.useMemo(()=>({show:r,appear:n,initial:R}),[r,n,R]);b.useEffect(()=>{if(r)E("visible");else if(!Rr(k))E("hidden");else{let q=a.current;if(!q)return;let ne=q.getBoundingClientRect();ne.x===0&&ne.y===0&&ne.width===0&&ne.height===0&&E("hidden")}},[r,k]);let P={unmount:u},_=te(()=>{var q;R&&T(!1),(q=t.beforeEnter)==null||q.call(t)}),B=te(()=>{var q;R&&T(!1),(q=t.beforeLeave)==null||q.call(t)});return b.createElement(Mr.Provider,{value:k},b.createElement(Fr.Provider,{value:L},mt({ourProps:{...P,as:b.Fragment,children:b.createElement(Xl,{ref:m,...P,...f,beforeEnter:_,beforeLeave:B})},theirProps:{},defaultTag:b.Fragment,features:Kl,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(No,{ref:l,...t}):b.createElement(Xl,{ref:l,...t}))}let No=ht(dc),Xl=ht(cc),pc=ht(fc),Cn=Object.assign(No,{Child:pc,Root:No});function mc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{fillRule:"evenodd",d:"M18 10a.75.75 0 0 1-.75.75H4.66l2.1 1.95a.75.75 0 1 1-1.02 1.1l-3.5-3.25a.75.75 0 0 1 0-1.1l3.5-3.25a.75.75 0 1 1 1.02 1.1l-2.1 1.95h12.59A.75.75 0 0 1 18 10Z",clipRule:"evenodd"}))}const hc=Y.forwardRef(mc);function vc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{fillRule:"evenodd",d:"M2 10a.75.75 0 0 1 .75-.75h12.59l-2.1-1.95a.75.75 0 1 1 1.02-1.1l3.5 3.25a.75.75 0 0 1 0 1.1l-3.5 3.25a.75.75 0 1 1-1.02-1.1l2.1-1.95H2.75A.75.75 0 0 1 2 10Z",clipRule:"evenodd"}))}const gc=Y.forwardRef(vc);function bc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",clipRule:"evenodd"}))}const xc=Y.forwardRef(bc);function yc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const wc=Y.forwardRef(yc);function Ec({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-8-5a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-1.5 0v-4.5A.75.75 0 0 1 10 5Zm0 10a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const Jl=Y.forwardRef(Ec);function Sc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const Cc=Y.forwardRef(Sc);function jc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM9 9a.75.75 0 0 0 0 1.5h.253a.25.25 0 0 1 .244.304l-.459 2.066A1.75 1.75 0 0 0 10.747 15H11a.75.75 0 0 0 0-1.5h-.253a.25.25 0 0 1-.244-.304l.459-2.066A1.75 1.75 0 0 0 9.253 9H9Z",clipRule:"evenodd"}))}const Tc=Y.forwardRef(jc);function Oc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM8.28 7.22a.75.75 0 0 0-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 1 0 1.06 1.06L10 11.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L11.06 10l1.72-1.72a.75.75 0 0 0-1.06-1.06L10 8.94 8.28 7.22Z",clipRule:"evenodd"}))}const Nc=Y.forwardRef(Oc),Ic={warning:{color:"bg-yellow-50",icon:j.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:j.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:j.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:j.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?j.jsx("div",{className:"fixed top-2.5 left-1/2 transform -translate-x-1/2 w-80 3xs:w-96 z-50",children:j.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:j.jsxs("div",{className:ae("rounded-md p-4 text-center",x.color),children:[j.jsxs("div",{className:"flex justify-center flex-shrink-0",children:[x.icon,j.jsx("h3",{className:ae("text-sm font-medium ml-3",x.colorTitle),children:l})]}),j.jsx("div",{className:ae("mt-2 text-sm",x.colorText),children:j.jsx("p",{children:r})})]})})}):null};function Pc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{fillRule:"evenodd",d:"M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",clipRule:"evenodd"}))}const Fc=Y.forwardRef(Pc);function Mc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{fillRule:"evenodd",d:"M10.5 3.75a6.75 6.75 0 1 0 0 13.5 6.75 6.75 0 0 0 0-13.5ZM2.25 10.5a8.25 8.25 0 1 1 14.59 5.28l4.69 4.69a.75.75 0 1 1-1.06 1.06l-4.69-4.69A8.25 8.25 0 0 1 2.25 10.5Z",clipRule:"evenodd"}))}const Rc=Y.forwardRef(Mc);function Lc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{d:"M21.731 2.269a2.625 2.625 0 0 0-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 0 0 0-3.712ZM19.513 8.199l-3.712-3.712-8.4 8.4a5.25 5.25 0 0 0-1.32 2.214l-.8 2.685a.75.75 0 0 0 .933.933l2.685-.8a5.25 5.25 0 0 0 2.214-1.32l8.4-8.4Z"}),Y.createElement("path",{d:"M5.25 5.25a3 3 0 0 0-3 3v10.5a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3V13.5a.75.75 0 0 0-1.5 0v5.25a1.5 1.5 0 0 1-1.5 1.5H5.25a1.5 1.5 0 0 1-1.5-1.5V8.25a1.5 1.5 0 0 1 1.5-1.5h5.25a.75.75 0 0 0 0-1.5H5.25Z"}))}const Ac=Y.forwardRef(Lc);function Dc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{fillRule:"evenodd",d:"M1.5 6a2.25 2.25 0 0 1 2.25-2.25h16.5A2.25 2.25 0 0 1 22.5 6v12a2.25 2.25 0 0 1-2.25 2.25H3.75A2.25 2.25 0 0 1 1.5 18V6ZM3 16.06V18c0 .414.336.75.75.75h16.5A.75.75 0 0 0 21 18v-1.94l-2.69-2.689a1.5 1.5 0 0 0-2.12 0l-.88.879.97.97a.75.75 0 1 1-1.06 1.06l-5.16-5.159a1.5 1.5 0 0 0-2.12 0L3 16.061Zm10.125-7.81a1.125 1.125 0 1 1 2.25 0 1.125 1.125 0 0 1-2.25 0Z",clipRule:"evenodd"}))}const $c=Y.forwardRef(Dc);function _c({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{fillRule:"evenodd",d:"M18.685 19.097A9.723 9.723 0 0 0 21.75 12c0-5.385-4.365-9.75-9.75-9.75S2.25 6.615 2.25 12a9.723 9.723 0 0 0 3.065 7.097A9.716 9.716 0 0 0 12 21.75a9.716 9.716 0 0 0 6.685-2.653Zm-12.54-1.285A7.486 7.486 0 0 1 12 15a7.486 7.486 0 0 1 5.855 2.812A8.224 8.224 0 0 1 12 20.25a8.224 8.224 0 0 1-5.855-2.438ZM15.75 9a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z",clipRule:"evenodd"}))}const Bc=Y.forwardRef(_c);function zc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{fillRule:"evenodd",d:"M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const Wc=Y.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 j.jsx(j.Fragment,{children:t?j.jsx("img",{src:t,alt:l,width:r,height:n,className:ae(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?j.jsx(Bc,{className:ae("bg-white text-default-5",f!==""?f:"w-7 h-7")}):j.jsx("div",{className:ae("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 j.jsx("nav",{className:"flex items-center justify-center w-full","aria-label":"Progress","data-testid":"bullets",children:j.jsx("ol",{role:"list",className:"flex items-center space-x-5",children:new Array(t).fill(1).map((f,a)=>j.jsx("li",{children:r!==a?j.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:j.jsx("span",{className:"sr-only",children:"step"})}):j.jsxs("div",{className:"relative flex items-center justify-center cursor-pointer","aria-current":"step",children:[j.jsx("span",{className:"absolute flex h-5 w-5 p-px","aria-hidden":"true",children:j.jsx("span",{className:"h-full w-full rounded-full bg-gray-300"})}),j.jsx("span",{className:"relative block h-2.5 w-2.5 rounded-full bg-gray-500","aria-hidden":"true"}),j.jsx("span",{className:"sr-only",children:"step"})]})},a))})})};var Ql={exports:{}};/*!
|
|
31
|
+
`));let R=E.props,T=typeof(R==null?void 0:R.className)=="function"?(...$)=>jr(R==null?void 0:R.className(...$),v.className):jr(R==null?void 0:R.className,v.className),M=T?{className:T}:{};return b.cloneElement(E,Object.assign({},Tl(E.props,Or(ao(v,["ref"]))),k,x,{ref:u(E.ref,x.ref)},M))}return b.createElement(f,Object.assign({},ao(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 Tl(...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 ht(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 ao(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 mt({ourProps:f,theirProps:u,slot:{},defaultTag:Ms,name:"Hidden"})}let Hn=ht(Rs),uo=b.createContext(null);uo.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(uo)}function co({value:t,children:l}){return b.createElement(uo.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 Gt=[];Ls(()=>{function t(l){l.target instanceof HTMLElement&&l.target!==document.body&&Gt[0]!==l.target&&(Gt.unshift(l.target),Gt=Gt.filter(r=>r!=null&&r.isConnected),Gt.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 rt=(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))(rt||{});function fo(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 Ol(t={},l=null,r=[]){for(let[n,u]of Object.entries(t))Il(r,Nl(l,n),u);return r}function Nl(t,l){return t?t+"["+l+"]":l}function Il(t,l,r){if(Array.isArray(r))for(let[n,u]of r.entries())Il(t,Nl(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,""]):Ol(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 po(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):lo(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===rt.Specific?l.idx:fo(l,{resolveItems:()=>t.virtual.options,resolveActiveIndex:()=>{var R,T;return(T=(R=t.activeOptionIndex)!=null?R:t.virtual.options.findIndex(M=>!t.virtual.disabled(M)))!=null?T: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=po(t);if(m.activeOptionIndex===null){let E=m.options.findIndex(k=>!k.dataRef.current.disabled);E!==-1&&(m.activeOptionIndex=E)}let v=l.focus===rt.Specific?l.idx:fo(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=po(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=po(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})}}},mo=b.createContext(null);mo.displayName="ComboboxActionsContext";function Vn(t){let l=b.useContext(mo);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 kl=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 nt(()=>{m(v=>v+1)},[(l=r.virtual)==null?void 0:l.options]),b.createElement(kl.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 ho=b.createContext(null);ho.displayName="ComboboxDataContext";function En(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,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:R=!1,virtual:T=null,...M}=t,$=!1,P=null,[B=k?[]:void 0,_]=pl(r,u,n),[q,ne]=b.useReducer(Vs,{dataRef:b.createRef(),comboboxState:x?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),oe=b.useRef(!1),me=b.useRef({static:!1,hold:!1}),Ne=b.useRef(null),Oe=b.useRef(null),Ce=b.useRef(null),y=b.useRef(null),he=te(typeof m=="string"?(ie,G)=>{let Q=m;return(ie==null?void 0:ie[Q])===(G==null?void 0:G[Q])}:m??((ie,G)=>ie===G)),Ie=te(ie=>q.options.findIndex(G=>he(G.dataRef.current.value,ie))),_e=b.useCallback(ie=>bt(U.mode,{1:()=>B.some(G=>he(G,ie)),0:()=>he(B,ie)}),[B]),st=te(ie=>q.activeOptionIndex===Ie(ie)),U=b.useMemo(()=>({...q,immediate:$,optionsPropsRef:me,labelRef:Ne,inputRef:Oe,buttonRef:Ce,optionsRef:y,value:B,defaultValue:n,disabled:v,mode:k?1:0,virtual:q.virtual,get activeOptionIndex(){if(oe.current&&q.activeOptionIndex===null&&q.options.length>0){let ie=q.options.findIndex(G=>!G.dataRef.current.disabled);if(ie!==-1)return ie}return q.activeOptionIndex},calculateIndex:Ie,compare:he,isSelected:_e,isActive:st,nullable:E,__demoMode:x}),[B,n,v,k,E,x,q,P]);nt(()=>{},[P,void 0]),nt(()=>{q.dataRef.current=U},[U]),io([U.buttonRef,U.inputRef,U.optionsRef],()=>Wt.closeCombobox(),U.comboboxState===0);let Xe=b.useMemo(()=>{var ie,G,Q;return{open:U.comboboxState===0,disabled:v,activeIndex:U.activeOptionIndex,activeOption:U.activeOptionIndex===null?null:U.virtual?U.virtual.options[(ie=U.activeOptionIndex)!=null?ie:0]:(Q=(G=U.options[U.activeOptionIndex])==null?void 0:G.dataRef.current.value)!=null?Q:null,value:B}},[U,v,B]),De=te(()=>{if(U.activeOptionIndex!==null){if(U.virtual)kt(U.virtual.options[U.activeOptionIndex]);else{let{dataRef:ie}=U.options[U.activeOptionIndex];kt(ie.current.value)}Wt.goToOption(rt.Specific,U.activeOptionIndex)}}),ce=te(()=>{ne({type:0}),oe.current=!0}),Te=te(()=>{ne({type:1}),oe.current=!1}),Je=te((ie,G,Q)=>(oe.current=!1,ie===rt.Specific?ne({type:2,focus:rt.Specific,idx:G,trigger:Q}):ne({type:2,focus:ie,trigger:Q}))),Qe=te((ie,G)=>(ne({type:3,payload:{id:ie,dataRef:G}}),()=>{U.isActive(G.current.value)&&(oe.current=!0),ne({type:4,id:ie})})),yt=te(ie=>(ne({type:5,id:ie}),()=>ne({type:5,id:null}))),kt=te(ie=>bt(U.mode,{0(){return _==null?void 0:_(ie)},1(){let G=U.value.slice(),Q=G.findIndex(Re=>he(Re,ie));return Q===-1?G.push(ie):G.splice(Q,1),_==null?void 0:_(G)}})),ft=te(ie=>{ne({type:6,trigger:ie})}),Wt=b.useMemo(()=>({onChange:kt,registerOption:Qe,registerLabel:yt,goToOption:Je,closeCombobox:Te,openCombobox:ce,setActivationTrigger:ft,selectActiveOption:De}),[]),je=l===null?{}:{ref:l},ot=b.useRef(null),Ve=en();return b.useEffect(()=>{ot.current&&n!==void 0&&Ve.addEventListener(ot.current,"reset",()=>{_==null||_(n)})},[ot,_]),b.createElement(mo.Provider,{value:Wt},b.createElement(ho.Provider,{value:U},b.createElement(co,{value:bt(U.comboboxState,{0:Ct.Open,1:Ct.Closed})},a!=null&&B!=null&&Ol({[a]:B}).map(([ie,G],Q)=>b.createElement(Hn,{features:Pn.Hidden,ref:Q===0?Re=>{var Ze;ot.current=(Ze=Re==null?void 0:Re.closest("form"))!=null?Ze:null}:void 0,...Or({key:ie,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:f,disabled:v,name:ie,value:G})})),mt({ourProps:je,theirProps:M,slot:Xe,defaultTag:Zs,name:"Combobox"}))))}let Gs="input";function qs(t,l){var r,n,u,f,a;let m=At(),{id:v=`headlessui-combobox-input-${m}`,onChange:x,displayValue:E,type:k="text",...R}=t,T=En("Combobox.Input"),M=Vn("Combobox.Input"),$=Et(T.inputRef,l),P=wn(T.inputRef),B=b.useRef(!1),_=en(),q=te(()=>{M.onChange(null),T.optionsRef.current&&(T.optionsRef.current.scrollTop=0),M.goToOption(rt.Nothing)}),ne=function(){var U;return typeof E=="function"&&T.value!==void 0?(U=E(T.value))!=null?U:"":typeof T.value=="string"?T.value:""}();Wn(([U,Xe],[De,ce])=>{if(B.current)return;let Te=T.inputRef.current;Te&&((ce===0&&Xe===1||U!==De)&&(Te.value=U),requestAnimationFrame(()=>{if(B.current||!Te||(P==null?void 0:P.activeElement)!==Te)return;let{selectionStart:Je,selectionEnd:Qe}=Te;Math.abs((Qe??0)-(Je??0))===0&&Je===0&&Te.setSelectionRange(Te.value.length,Te.value.length)}))},[ne,T.comboboxState,P]),Wn(([U],[Xe])=>{if(U===0&&Xe===1){if(B.current)return;let De=T.inputRef.current;if(!De)return;let ce=De.value,{selectionStart:Te,selectionEnd:Je,selectionDirection:Qe}=De;De.value="",De.value=ce,Qe!==null?De.setSelectionRange(Te,Je,Qe):De.setSelectionRange(Te,Je)}},[T.comboboxState]);let oe=b.useRef(!1),me=te(()=>{oe.current=!0}),Ne=te(()=>{_.nextFrame(()=>{oe.current=!1})}),Oe=te(U=>{switch(B.current=!0,U.key){case Ge.Enter:if(B.current=!1,T.comboboxState!==0||oe.current)return;if(U.preventDefault(),U.stopPropagation(),T.activeOptionIndex===null){M.closeCombobox();return}M.selectActiveOption(),T.mode===0&&M.closeCombobox();break;case Ge.ArrowDown:return B.current=!1,U.preventDefault(),U.stopPropagation(),bt(T.comboboxState,{0:()=>M.goToOption(rt.Next),1:()=>M.openCombobox()});case Ge.ArrowUp:return B.current=!1,U.preventDefault(),U.stopPropagation(),bt(T.comboboxState,{0:()=>M.goToOption(rt.Previous),1:()=>{M.openCombobox(),_.nextFrame(()=>{T.value||M.goToOption(rt.Last)})}});case Ge.Home:if(U.shiftKey)break;return B.current=!1,U.preventDefault(),U.stopPropagation(),M.goToOption(rt.First);case Ge.PageUp:return B.current=!1,U.preventDefault(),U.stopPropagation(),M.goToOption(rt.First);case Ge.End:if(U.shiftKey)break;return B.current=!1,U.preventDefault(),U.stopPropagation(),M.goToOption(rt.Last);case Ge.PageDown:return B.current=!1,U.preventDefault(),U.stopPropagation(),M.goToOption(rt.Last);case Ge.Escape:return B.current=!1,T.comboboxState!==0?void 0:(U.preventDefault(),T.optionsRef.current&&!T.optionsPropsRef.current.static&&U.stopPropagation(),T.nullable&&T.mode===0&&T.value===null&&q(),M.closeCombobox());case Ge.Tab:if(B.current=!1,T.comboboxState!==0)return;T.mode===0&&T.activationTrigger!==1&&M.selectActiveOption(),M.closeCombobox();break}}),Ce=te(U=>{x==null||x(U),T.nullable&&T.mode===0&&U.target.value===""&&q(),M.openCombobox()}),y=te(U=>{var Xe,De,ce;let Te=(Xe=U.relatedTarget)!=null?Xe:Gt.find(Je=>Je!==U.currentTarget);if(B.current=!1,!((De=T.optionsRef.current)!=null&&De.contains(Te))&&!((ce=T.buttonRef.current)!=null&&ce.contains(Te))&&T.comboboxState===0)return U.preventDefault(),T.mode===0&&(T.nullable&&T.value===null?q():T.activationTrigger!==1&&M.selectActiveOption()),M.closeCombobox()}),he=te(U=>{var Xe,De,ce;let Te=(Xe=U.relatedTarget)!=null?Xe:Gt.find(Je=>Je!==U.currentTarget);(De=T.buttonRef.current)!=null&&De.contains(Te)||(ce=T.optionsRef.current)!=null&&ce.contains(Te)||T.disabled||T.immediate&&T.comboboxState!==0&&(M.openCombobox(),_.nextFrame(()=>{M.setActivationTrigger(1)}))}),Ie=to(()=>{if(T.labelId)return[T.labelId].join(" ")},[T.labelId]),_e=b.useMemo(()=>({open:T.comboboxState===0,disabled:T.disabled}),[T]),st={ref:$,id:v,role:"combobox",type:k,"aria-controls":(r=T.optionsRef.current)==null?void 0:r.id,"aria-expanded":T.comboboxState===0,"aria-activedescendant":T.activeOptionIndex===null?void 0:T.virtual?(n=T.options.find(U=>{var Xe;return!((Xe=T.virtual)!=null&&Xe.disabled(U.dataRef.current.value))&&T.compare(U.dataRef.current.value,T.virtual.options[T.activeOptionIndex])}))==null?void 0:n.id:(u=T.options[T.activeOptionIndex])==null?void 0:u.id,"aria-labelledby":Ie,"aria-autocomplete":"list",defaultValue:(a=(f=t.defaultValue)!=null?f:T.defaultValue!==void 0?E==null?void 0:E(T.defaultValue):null)!=null?a:T.defaultValue,disabled:T.disabled,onCompositionStart:me,onCompositionEnd:Ne,onKeyDown:Oe,onChange:Ce,onFocus:he,onBlur:y};return mt({ourProps:st,theirProps:R,slot:_e,defaultTag:Gs,name:"Combobox.Input"})}let Ks="button";function Xs(t,l){var r;let n=En("Combobox.Button"),u=Vn("Combobox.Button"),f=Et(n.buttonRef,l),a=At(),{id:m=`headlessui-combobox-button-${a}`,...v}=t,x=en(),E=te($=>{switch($.key){case Ge.ArrowDown:return $.preventDefault(),$.stopPropagation(),n.comboboxState===1&&u.openCombobox(),x.nextFrame(()=>{var P;return(P=n.inputRef.current)==null?void 0:P.focus({preventScroll:!0})});case Ge.ArrowUp:return $.preventDefault(),$.stopPropagation(),n.comboboxState===1&&(u.openCombobox(),x.nextFrame(()=>{n.value||u.goToOption(rt.Last)})),x.nextFrame(()=>{var P;return(P=n.inputRef.current)==null?void 0:P.focus({preventScroll:!0})});case Ge.Escape:return n.comboboxState!==0?void 0:($.preventDefault(),n.optionsRef.current&&!n.optionsPropsRef.current.static&&$.stopPropagation(),u.closeCombobox(),x.nextFrame(()=>{var P;return(P=n.inputRef.current)==null?void 0:P.focus({preventScroll:!0})}));default:return}}),k=te($=>{if(Nr($.currentTarget))return $.preventDefault();n.comboboxState===0?u.closeCombobox():($.preventDefault(),u.openCombobox()),x.nextFrame(()=>{var P;return(P=n.inputRef.current)==null?void 0:P.focus({preventScroll:!0})})}),R=to(()=>{if(n.labelId)return[n.labelId,m].join(" ")},[n.labelId,m]),T=b.useMemo(()=>({open:n.comboboxState===0,disabled:n.disabled,value:n.value}),[n]),M={ref:f,id:m,type:so(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":R,disabled:n.disabled,onClick:k,onKeyDown:E};return mt({ourProps:M,theirProps:v,slot:T,defaultTag:Ks,name:"Combobox.Button"})}let Js="label";function Qs(t,l){let r=At(),{id:n=`headlessui-combobox-label-${r}`,...u}=t,f=En("Combobox.Label"),a=Vn("Combobox.Label"),m=Et(f.labelRef,l);nt(()=>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 mt({ourProps:{ref:m,id:n,onClick:v},theirProps:u,slot:x,defaultTag:Js,name:"Combobox.Label"})}let ea="ul",ta=cn.RenderStrategy|cn.Static;function na(t,l){let r=At(),{id:n=`headlessui-combobox-options-${r}`,hold:u=!1,...f}=t,a=En("Combobox.Options"),m=Et(a.optionsRef,l),v=Un(),x=v!==null?(v&Ct.Open)===Ct.Open:a.comboboxState===0;nt(()=>{var T;a.optionsPropsRef.current.static=(T=t.static)!=null?T:!1},[a.optionsPropsRef,t.static]),nt(()=>{a.optionsPropsRef.current.hold=u},[a.optionsPropsRef,u]),jl({container:a.optionsRef.current,enabled:a.comboboxState===0,accept(T){return T.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:T.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(T){T.setAttribute("role","none")}});let E=to(()=>{var T,M;return(M=a.labelId)!=null?M:(T=a.buttonRef.current)==null?void 0:T.id},[a.labelId,a.buttonRef.current]),k=b.useMemo(()=>({open:a.comboboxState===0,option:void 0}),[a]),R={"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)}),mt({ourProps:R,theirProps:f,slot:k,defaultTag:ea,features:ta,visible:x,name:"Combobox.Options"})}let ra="li";function oa(t,l){var r;let n=At(),{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,R=x.isSelected(a),T=b.useRef(null),M=Vt({disabled:f,value:a,domRef:T,order:m}),$=b.useContext(kl),P=Et(l,T,$?$.measureElement:null),B=te(()=>E.onChange(a));nt(()=>E.registerOption(u,M),[M,u]);let _=b.useRef(!(x.virtual||x.__demoMode));nt(()=>{if(!x.virtual||!x.__demoMode)return;let y=zt();return y.requestAnimationFrame(()=>{_.current=!0}),y.dispose},[x.virtual,x.__demoMode]),nt(()=>{if(!_.current||x.comboboxState!==0||!k||x.activationTrigger===0)return;let y=zt();return y.requestAnimationFrame(()=>{var he,Ie;(Ie=(he=T.current)==null?void 0:he.scrollIntoView)==null||Ie.call(he,{block:"nearest"})}),y.dispose},[T,k,x.comboboxState,x.activationTrigger,x.activeOptionIndex]);let q=te(y=>{var he;if(f||(he=x.virtual)!=null&&he.disabled(a))return y.preventDefault();B(),xl()||requestAnimationFrame(()=>{var Ie;return(Ie=x.inputRef.current)==null?void 0:Ie.focus({preventScroll:!0})}),x.mode===0&&requestAnimationFrame(()=>E.closeCombobox())}),ne=te(()=>{var y;if(f||(y=x.virtual)!=null&&y.disabled(a))return E.goToOption(rt.Nothing);let he=x.calculateIndex(a);E.goToOption(rt.Specific,he)}),oe=Cl(),me=te(y=>oe.update(y)),Ne=te(y=>{var he;if(!oe.wasMoved(y)||f||(he=x.virtual)!=null&&he.disabled(a)||k)return;let Ie=x.calculateIndex(a);E.goToOption(rt.Specific,Ie,0)}),Oe=te(y=>{var he;oe.wasMoved(y)&&(f||(he=x.virtual)!=null&&he.disabled(a)||k&&(x.optionsPropsRef.current.hold||E.goToOption(rt.Nothing)))}),Ce=b.useMemo(()=>({active:k,selected:R,disabled:f}),[k,R,f]);return mt({ourProps:{id:u,ref:P,role:"option",tabIndex:f===!0?void 0:-1,"aria-disabled":f===!0?!0:void 0,"aria-selected":R,disabled:void 0,onClick:q,onFocus:ne,onPointerEnter:me,onMouseEnter:me,onPointerMove:Ne,onMouseMove:Ne,onPointerLeave:Oe,onMouseLeave:Oe},theirProps:v,slot:Ce,defaultTag:ra,name:"Combobox.Option"})}let la=ht(Ys),ia=ht(Xs),sa=ht(qs),aa=ht(Qs),ua=ht(na),ca=ht(oa),nn=Object.assign(la,{Input:sa,Button:ia,Label:aa,Options:ua,Option:ca});function Pl(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 nt(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Fl(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 yl("keydown",l=>{l.key==="Tab"&&(t.current=l.shiftKey?1:0)},!0),t}function Ml(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 Rl=(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))(Rl||{});function pa(t,l){let r=b.useRef(null),n=Et(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($=>{let P=r.current;P&&(B=>B())(()=>{bt(E.current,{[Yn.Forwards]:()=>{zn(P,tn.First,{skipElements:[$.relatedTarget]})},[Yn.Backwards]:()=>{zn(P,tn.Last,{skipElements:[$.relatedTarget]})}})})}),R=en(),T=b.useRef(!1),M={ref:n,onKeyDown($){$.key=="Tab"&&(T.current=!0,R.requestAnimationFrame(()=>{T.current=!1}))},onBlur($){let P=Ml(f);r.current instanceof HTMLElement&&P.add(r.current);let B=$.relatedTarget;B instanceof HTMLElement&&B.dataset.headlessuiFocusGuard!=="true"&&(Ll(P,B)||(T.current?zn(r.current,bt(E.current,{[Yn.Forwards]:()=>tn.Next,[Yn.Backwards]:()=>tn.Previous})|tn.WrapAround,{relativeTo:$.target}):$.target instanceof HTMLElement&&un($.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}),mt({ourProps:M,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=ht(pa),Gn=Object.assign(ma,{features:Rl});function ha(t=!0){let l=b.useRef(Gt.slice());return Wn(([r],[n])=>{n===!0&&r===!1&&Er(()=>{l.current.splice(0)}),n===!1&&r===!0&&(l.current=Gt.slice())},[t,Gt,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)&&un(r())},[l]),Fl(()=>{l&&un(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?un(r.current):zn(a,tn.First)===hl.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();Pl(t==null?void 0:t.defaultView,"focus",a=>{if(!u||!f.current)return;let m=Ml(r);l.current instanceof HTMLElement&&m.add(l.current);let v=n.current;if(!v)return;let x=a.target;x&&x instanceof HTMLElement?Ll(m,x)?(n.current=x,un(x)):(a.preventDefault(),a.stopPropagation(),un(v)):un(n.current)},!0)}function Ll(t,l){for(let r of t)if(r.contains(l))return!0;return!1}let Al=b.createContext(!1);function xa(){return b.useContext(Al)}function vo(t){return b.createElement(Al.Provider,{value:t.force},t.children)}function ya(t){let l=xa(),r=b.useContext(Dl),n=wn(t),[u,f]=b.useState(()=>{if(!l&&r!==null||Qt.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=Et(Ps(E=>{n.current=E}),l),f=wn(n),a=ya(n),[m]=b.useState(()=>{var E;return Qt.isServer?null:(E=f==null?void 0:f.createElement("div"))!=null?E:null}),v=b.useContext(go),x=kn();return nt(()=>{!a||!m||a.contains(m)||(m.setAttribute("data-headlessui-portal",""),a.appendChild(m))},[a,m]),nt(()=>{if(m&&v)return v.register(m)},[v,m]),Fl(()=>{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(mt({ourProps:{ref:u},theirProps:r,defaultTag:wa,name:"Portal"}),m):null}let Sa=b.Fragment,Dl=b.createContext(null);function Ca(t,l){let{target:r,...n}=t,u={ref:Et(l)};return b.createElement(Dl.Provider,{value:r},mt({ourProps:u,theirProps:n,defaultTag:Sa,name:"Popover.Group"}))}let go=b.createContext(null);function ja(){let t=b.useContext(go),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(go.Provider,{value:u},f)},[u])]}let Ta=ht(Ea),Oa=ht(Ca),bo=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}=Y;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,xo(u)&&f({inst:u})},[t,n,l]),Pa(()=>(xo(u)&&f({inst:u}),t(()=>{xo(u)&&f({inst:u})})),[t]),Ma(n),n}function xo(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 Y?(t=>t.useSyncExternalStore)(Y):$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 bl()?{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=zt();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:zt(),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 nt(()=>{if(!(!t||!l))return Sn.dispatch("PUSH",t,r),()=>Sn.dispatch("POP",t,r)},[l,t]),f}let yo=new Map,qn=new Map;function $l(t,l=!0){nt(()=>{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=yo.get(n);v&&(v["aria-hidden"]===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",v["aria-hidden"]),n.inert=v.inert,yo.delete(n))}let f=(r=qn.get(n))!=null?r:0;return qn.set(n,f+1),f!==0||(yo.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(R=>k.contains(R))||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 wo=b.createContext(()=>{});wo.displayName="StackContext";var Eo=(t=>(t[t.Add=0]="Add",t[t.Remove=1]="Remove",t))(Eo||{});function Ga(){return b.useContext(wo)}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 nt(()=>{let m=u===void 0||u===!0;return m&&a(0,r,n),()=>{m&&a(1,r,n)}},[a,r,n,u]),b.createElement(wo.Provider,{value:a},t)}let _l=b.createContext(null);function Bl(){let t=b.useContext(_l);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,Bl),l}return t}function zl(){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(_l.Provider,{value:u},r.children)},[l])]}let Ka="p";function Xa(t,l){let r=At(),{id:n=`headlessui-description-${r}`,...u}=t,f=Bl(),a=Et(l);nt(()=>f.register(n),[n,f.register]);let m={ref:a,...f.props,id:n};return mt({ourProps:m,theirProps:u,slot:f.slot||{},defaultTag:Ka,name:f.name||"Description"})}let Ja=ht(Xa),Wl=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=cn.RenderStrategy|cn.Static;function iu(t,l){let r=At(),{id:n=`headlessui-dialog-${r}`,open:u,onClose:f,initialFocus:a,role:m="dialog",__demoMode:v=!1,...x}=t,[E,k]=b.useState(0),R=b.useRef(!1);m=function(){return m==="dialog"||m==="alertdialog"?m:(R.current||(R.current=!0,console.warn(`Invalid role [${m}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let T=Un();u===void 0&&T!==null&&(u=(T&Ct.Open)===Ct.Open);let M=b.useRef(null),$=Et(M,l),P=wn(M),B=t.hasOwnProperty("open")||T!==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 q=u?0:1,[ne,oe]=b.useReducer(ru,{titleId:null,descriptionId:null,panelRef:b.createRef()}),me=te(()=>f(!1)),Ne=te(Q=>oe({type:0,id:Q})),Oe=kn()?v?!1:q===0:!1,Ce=E>1,y=b.useContext(Ir)!==null,[he,Ie]=ja(),_e={get current(){var Q;return(Q=ne.panelRef.current)!=null?Q:M.current}},{resolveContainers:st,mainTreeNodeRef:U,MainTreeNode:Xe}=Ya({portals:he,defaultContainers:[_e]}),De=Ce?"parent":"leaf",ce=T!==null?(T&Ct.Closing)===Ct.Closing:!1,Te=y||ce?!1:Oe,Je=b.useCallback(()=>{var Q,Re;return(Re=Array.from((Q=P==null?void 0:P.querySelectorAll("body > *"))!=null?Q:[]).find(Ze=>Ze.id==="headlessui-portal-root"?!1:Ze.contains(U.current)&&Ze instanceof HTMLElement))!=null?Re:null},[U]);$l(Je,Te);let Qe=Ce?!0:Oe,yt=b.useCallback(()=>{var Q,Re;return(Re=Array.from((Q=P==null?void 0:P.querySelectorAll("[data-headlessui-portal]"))!=null?Q:[]).find(Ze=>Ze.contains(U.current)&&Ze instanceof HTMLElement))!=null?Re:null},[U]);$l(yt,Qe),io(st,Q=>{Q.preventDefault(),me()},!(!Oe||Ce));let ft=!(Ce||q!==0);Pl(P==null?void 0:P.defaultView,"keydown",Q=>{ft&&(Q.defaultPrevented||Q.key===Ge.Escape&&(Q.preventDefault(),Q.stopPropagation(),me()))}),nu(P,!(ce||q!==0||y),st),b.useEffect(()=>{if(q!==0||!M.current)return;let Q=new ResizeObserver(Re=>{for(let Ze of Re){let ke=Ze.target.getBoundingClientRect();ke.x===0&&ke.y===0&&ke.width===0&&ke.height===0&&me()}});return Q.observe(M.current),()=>Q.disconnect()},[q,M,me]);let[je,ot]=zl(),Ve=b.useMemo(()=>[{dialogState:q,close:me,setTitleId:Ne},ne],[q,ne,me,Ne]),ie=b.useMemo(()=>({open:q===0}),[q]),G={ref:$,id:n,role:m,"aria-modal":q===0?!0:void 0,"aria-labelledby":ne.titleId,"aria-describedby":je};return b.createElement(qa,{type:"Dialog",enabled:q===0,element:M,onUpdate:te((Q,Re)=>{Re==="Dialog"&&bt(Q,{[Eo.Add]:()=>k(Ze=>Ze+1),[Eo.Remove]:()=>k(Ze=>Ze-1)})})},b.createElement(vo,{force:!0},b.createElement(bo,null,b.createElement(Ir.Provider,{value:Ve},b.createElement(bo.Group,{target:M},b.createElement(vo,{force:!1},b.createElement(ot,{slot:ie,name:"Dialog.Description"},b.createElement(Gn,{initialFocus:a,containers:st,features:Oe?bt(De,{parent:Gn.features.RestoreFocus,leaf:Gn.features.All&~Gn.features.FocusLock}):Gn.features.None},b.createElement(Ie,null,mt({ourProps:G,theirProps:x,slot:ie,defaultTag:ou,features:lu,visible:q===0,name:"Dialog"}))))))))),b.createElement(Xe,null))}let su="div";function au(t,l){let r=At(),{id:n=`headlessui-dialog-overlay-${r}`,...u}=t,[{dialogState:f,close:a}]=Kn("Dialog.Overlay"),m=Et(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 mt({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=At(),{id:n=`headlessui-dialog-backdrop-${r}`,...u}=t,[{dialogState:f},a]=Kn("Dialog.Backdrop"),m=Et(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(vo,{force:!0},b.createElement(bo,null,mt({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=At(),{id:n=`headlessui-dialog-panel-${r}`,...u}=t,[{dialogState:f},a]=Kn("Dialog.Panel"),m=Et(l,a.panelRef),v=b.useMemo(()=>({open:f===0}),[f]),x=te(E=>{E.stopPropagation()});return mt({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=At(),{id:n=`headlessui-dialog-title-${r}`,...u}=t,[{dialogState:f,setTitleId:a}]=Kn("Dialog.Title"),m=Et(l);b.useEffect(()=>(a(n),()=>a(null)),[n,a]);let v=b.useMemo(()=>({open:f===0}),[f]);return mt({ourProps:{ref:m,id:n},theirProps:u,slot:v,defaultTag:pu,name:"Dialog.Title"})}let hu=ht(iu),vu=ht(cu),gu=ht(fu),bu=ht(au),xu=ht(mu),Hl=Object.assign(hu,{Backdrop:vu,Panel:gu,Overlay:bu,Title:xu,Description:Wl}),Ul=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Vl(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 Ul.test(a)&&(a=a.replace(Ul,"")),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():Vl(f).trim()}return null}).filter(Boolean);if(n.length>0)return n.join(", ")}return Vl(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 So(t,l=r=>r){let r=t.activeItemIndex!==null?t.items[t.activeItemIndex]:null,n=lo(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=So(t),u=fo(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=So(t,n=>[...n,{id:l.id,dataRef:l.dataRef}]);return{...t,...r}},6:(t,l)=>{let r=So(t,n=>{let u=n.findIndex(f=>f.id===l.id);return u!==-1&&n.splice(u,1),n});return{...t,...r,activationTrigger:1}}},Co=b.createContext(null);Co.displayName="MenuContext";function kr(t){let l=b.useContext(Co);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=Et(l);io([m,a],(T,M)=>{var $;v({type:1}),oo(M,ro.Loose)||(T.preventDefault(),($=m.current)==null||$.focus())},f===0);let E=te(()=>{v({type:1})}),k=b.useMemo(()=>({open:f===0,close:E}),[f,E]),R={ref:x};return b.createElement(Co.Provider,{value:u},b.createElement(co,{value:bt(f,{0:Ct.Open,1:Ct.Closed})},mt({ourProps:R,theirProps:n,slot:k,defaultTag:Ou,name:"Menu"})))}let Iu="button";function ku(t,l){var r;let n=At(),{id:u=`headlessui-menu-button-${n}`,...f}=t,[a,m]=kr("Menu.Button"),v=Et(a.buttonRef,l),x=en(),E=te($=>{switch($.key){case Ge.Space:case Ge.Enter:case Ge.ArrowDown:$.preventDefault(),$.stopPropagation(),m({type:0}),x.nextFrame(()=>m({type:2,focus:rt.First}));break;case Ge.ArrowUp:$.preventDefault(),$.stopPropagation(),m({type:0}),x.nextFrame(()=>m({type:2,focus:rt.Last}));break}}),k=te($=>{switch($.key){case Ge.Space:$.preventDefault();break}}),R=te($=>{if(Nr($.currentTarget))return $.preventDefault();t.disabled||(a.menuState===0?(m({type:1}),x.nextFrame(()=>{var P;return(P=a.buttonRef.current)==null?void 0:P.focus({preventScroll:!0})})):($.preventDefault(),m({type:0})))}),T=b.useMemo(()=>({open:a.menuState===0}),[a]),M={ref:v,id:u,type:so(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:R};return mt({ourProps:M,theirProps:f,slot:T,defaultTag:Iu,name:"Menu.Button"})}let Pu="div",Fu=cn.RenderStrategy|cn.Static;function Mu(t,l){var r,n;let u=At(),{id:f=`headlessui-menu-items-${u}`,...a}=t,[m,v]=kr("Menu.Items"),x=Et(m.itemsRef,l),E=wn(m.itemsRef),k=en(),R=Un(),T=R!==null?(R&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]),jl({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=te(_=>{var q,ne;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:oe}=m.items[m.activeItemIndex];(ne=(q=oe.current)==null?void 0:q.domRef.current)==null||ne.click()}gl(m.buttonRef.current);break;case Ge.ArrowDown:return _.preventDefault(),_.stopPropagation(),v({type:2,focus:rt.Next});case Ge.ArrowUp:return _.preventDefault(),_.stopPropagation(),v({type:2,focus:rt.Previous});case Ge.Home:case Ge.PageUp:return _.preventDefault(),_.stopPropagation(),v({type:2,focus:rt.First});case Ge.End:case Ge.PageDown:return _.preventDefault(),_.stopPropagation(),v({type:2,focus:rt.Last});case Ge.Escape:_.preventDefault(),_.stopPropagation(),v({type:1}),zt().nextFrame(()=>{var oe;return(oe=m.buttonRef.current)==null?void 0:oe.focus({preventScroll:!0})});break;case Ge.Tab:_.preventDefault(),_.stopPropagation(),v({type:1}),zt().nextFrame(()=>{Is(m.buttonRef.current,_.shiftKey?tn.Previous:tn.Next)});break;default:_.key.length===1&&(v({type:3,value:_.key}),k.setTimeout(()=>v({type:4}),350));break}}),$=te(_=>{switch(_.key){case Ge.Space:_.preventDefault();break}}),P=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:M,onKeyUp:$,role:"menu",tabIndex:0,ref:x};return mt({ourProps:B,theirProps:a,slot:P,defaultTag:Pu,features:Fu,visible:T,name:"Menu.Items"})}let Ru=b.Fragment;function Lu(t,l){let r=At(),{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=Et(l,x);nt(()=>{if(a.__demoMode||a.menuState!==0||!v||a.activationTrigger===0)return;let oe=zt();return oe.requestAnimationFrame(()=>{var me,Ne;(Ne=(me=x.current)==null?void 0:me.scrollIntoView)==null||Ne.call(me,{block:"nearest"})}),oe.dispose},[a.__demoMode,x,v,a.menuState,a.activationTrigger,a.activeItemIndex]);let k=wu(x),R=b.useRef({disabled:u,domRef:x,get textValue(){return k()}});nt(()=>{R.current.disabled=u},[R,u]),nt(()=>(m({type:5,id:n,dataRef:R}),()=>m({type:6,id:n})),[R,n]);let T=te(()=>{m({type:1})}),M=te(oe=>{if(u)return oe.preventDefault();m({type:1}),gl(a.buttonRef.current)}),$=te(()=>{if(u)return m({type:2,focus:rt.Nothing});m({type:2,focus:rt.Specific,id:n})}),P=Cl(),B=te(oe=>P.update(oe)),_=te(oe=>{P.wasMoved(oe)&&(u||v||m({type:2,focus:rt.Specific,id:n,trigger:0}))}),q=te(oe=>{P.wasMoved(oe)&&(u||v&&m({type:2,focus:rt.Nothing}))}),ne=b.useMemo(()=>({active:v,disabled:u,close:T}),[v,u,T]);return mt({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:$,onPointerEnter:B,onMouseEnter:B,onPointerMove:_,onMouseMove:_,onPointerLeave:q,onMouseLeave:q},theirProps:f,slot:ne,defaultTag:Ru,name:"Menu.Item"})}let Au=ht(Nu),Du=ht(ku),$u=ht(Mu),_u=ht(Lu),Pr=Object.assign(Au,{Button:Du,Items:$u,Item:_u}),Zl=b.createContext(null);function Yl(){let t=b.useContext(Zl);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,Yl),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(Zl.Provider,{value:u},r.children)},[l])]}let zu="label";function Wu(t,l){let r=At(),{id:n=`headlessui-label-${r}`,passive:u=!1,...f}=t,a=Yl(),m=Et(l);nt(()=>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),mt({ourProps:v,theirProps:f,slot:a.slot||{},defaultTag:zu,name:a.name||"Label"})}let Hu=ht(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 jo=b.createContext(null);jo.displayName="GroupContext";let Zu=b.Fragment;function Yu(t){var l;let[r,n]=b.useState(null),[u,f]=Bu(),[a,m]=zl(),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(jo.Provider,{value:v},mt({ourProps:x,theirProps:E,defaultTag:Zu,name:"Switch.Group"}))))}let Gu="button";function qu(t,l){var r;let n=At(),{id:u=`headlessui-switch-${n}`,checked:f,defaultChecked:a=!1,onChange:m,disabled:v=!1,name:x,value:E,form:k,...R}=t,T=b.useContext(jo),M=b.useRef(null),$=Et(M,l,T===null?null:T.setSwitch),[P,B]=pl(f,m,a),_=te(()=>B==null?void 0:B(!P)),q=te(Ce=>{if(Nr(Ce.currentTarget))return Ce.preventDefault();Ce.preventDefault(),_()}),ne=te(Ce=>{Ce.key===Ge.Space?(Ce.preventDefault(),_()):Ce.key===Ge.Enter&&$s(Ce.currentTarget)}),oe=te(Ce=>Ce.preventDefault()),me=b.useMemo(()=>({checked:P}),[P]),Ne={id:u,ref:$,role:"switch",type:so(t,M),tabIndex:t.tabIndex===-1?0:(r=t.tabIndex)!=null?r:0,"aria-checked":P,"aria-labelledby":T==null?void 0:T.labelledby,"aria-describedby":T==null?void 0:T.describedby,disabled:v,onClick:q,onKeyUp:ne,onKeyPress:oe},Oe=en();return b.useEffect(()=>{var Ce;let y=(Ce=M.current)==null?void 0:Ce.closest("form");y&&a!==void 0&&Oe.addEventListener(y,"reset",()=>{B(a)})},[M,B]),b.createElement(b.Fragment,null,x!=null&&P&&b.createElement(Hn,{features:Pn.Hidden,...Or({as:"input",type:"checkbox",hidden:!0,readOnly:!0,disabled:v,form:k,checked:P,name:x,value:E})}),mt({ourProps:Ne,theirProps:R,slot:me,defaultTag:Gu,name:"Switch"}))}let Ku=ht(qu),Xu=Yu,Ju=Object.assign(Ku,{Group:Xu,Label:Uu,Description:Wl});function Qu(t){let l={called:!1};return(...r)=>{if(!l.called)return l.called=!0,t(...r)}}function To(t,...l){t&&l.length>0&&t.classList.add(...l)}function Oo(t,...l){t&&l.length>0&&t.classList.remove(...l)}function ec(t,l){let r=zt();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=zt(),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 Oo(t,...l.base,...l.enter,...l.enterTo,...l.enterFrom,...l.leave,...l.leaveFrom,...l.leaveTo,...l.entered),To(t,...l.base,...m,...x),f.nextFrame(()=>{Oo(t,...l.base,...m,...x),To(t,...l.base,...m,...v),ec(t,()=>(Oo(t,...l.base,...m),To(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=en(),v=Vt(r);nt(()=>{t&&(v.current="enter")},[t]),nt(()=>{let x=zt();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 fn(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 Gl(t,l){let r=Vt(t),n=b.useRef([]),u=Zn(),f=en(),a=te((T,M=dn.Hidden)=>{let $=n.current.findIndex(({el:P})=>P===T);$!==-1&&(bt(M,{[dn.Unmount](){n.current.splice($,1)},[dn.Hidden](){n.current[$].state="hidden"}}),f.microTask(()=>{var P;!Rr(n)&&u.current&&((P=r.current)==null||P.call(r))}))}),m=te(T=>{let M=n.current.find(({el:$})=>$===T);return M?M.state!=="visible"&&(M.state="visible"):n.current.push({el:T,state:"visible"}),()=>a(T,dn.Unmount)}),v=b.useRef([]),x=b.useRef(Promise.resolve()),E=b.useRef({enter:[],leave:[],idle:[]}),k=te((T,M,$)=>{v.current.splice(0),l&&(l.chains.current[M]=l.chains.current[M].filter(([P])=>P!==T)),l==null||l.chains.current[M].push([T,new Promise(P=>{v.current.push(P)})]),l==null||l.chains.current[M].push([T,new Promise(P=>{Promise.all(E.current[M].map(([B,_])=>_)).then(()=>P())})]),M==="enter"?x.current=x.current.then(()=>l==null?void 0:l.wait.current).then(()=>$(M)):$(M)}),R=te((T,M,$)=>{Promise.all(E.current[M].splice(0).map(([P,B])=>B)).then(()=>{var P;(P=v.current.shift())==null||P()}).then(()=>$(M))});return b.useMemo(()=>({children:n,register:m,unregister:a,onStart:k,onStop:R,wait:x,chains:E}),[m,a,n,k,R,E,x])}function ic(){}let sc=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function ql(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(ql(t));return b.useEffect(()=>{l.current=ql(t)},[t]),l}let uc="div",Kl=cn.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:R,leaveFrom:T,leaveTo:M,...$}=t,P=b.useRef(null),B=Et(P,l),_=(r=$.unmount)==null||r?dn.Unmount:dn.Hidden,{show:q,appear:ne,initial:oe}=oc(),[me,Ne]=b.useState(q?"visible":"hidden"),Oe=lc(),{register:Ce,unregister:y}=Oe;b.useEffect(()=>Ce(P),[Ce,P]),b.useEffect(()=>{if(_===dn.Hidden&&P.current){if(q&&me!=="visible"){Ne("visible");return}return bt(me,{hidden:()=>y(P),visible:()=>Ce(P)})}},[me,P,Ce,y,q,_]);let he=Vt({base:fn($.className),enter:fn(v),enterFrom:fn(x),enterTo:fn(E),entered:fn(k),leave:fn(R),leaveFrom:fn(T),leaveTo:fn(M)}),Ie=ac({beforeEnter:u,afterEnter:f,beforeLeave:a,afterLeave:m}),_e=kn();b.useEffect(()=>{if(_e&&me==="visible"&&P.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[P,me,_e]);let st=oe&&!ne,U=ne&&q&&oe,Xe=!_e||st?"idle":q?"enter":"leave",De=Vu(0),ce=te(ft=>bt(ft,{enter:()=>{De.addFlag(Ct.Opening),Ie.current.beforeEnter()},leave:()=>{De.addFlag(Ct.Closing),Ie.current.beforeLeave()},idle:()=>{}})),Te=te(ft=>bt(ft,{enter:()=>{De.removeFlag(Ct.Opening),Ie.current.afterEnter()},leave:()=>{De.removeFlag(Ct.Closing),Ie.current.afterLeave()},idle:()=>{}})),Je=Gl(()=>{Ne("hidden"),y(P)},Oe),Qe=b.useRef(!1);nc({immediate:U,container:P,classes:he,direction:Xe,onStart:Vt(ft=>{Qe.current=!0,Je.onStart(P,ft,ce)}),onStop:Vt(ft=>{Qe.current=!1,Je.onStop(P,ft,Te),ft==="leave"&&!Rr(Je)&&(Ne("hidden"),y(P))})});let yt=$,kt={ref:B};return U?yt={...yt,className:jr($.className,...he.current.enter,...he.current.enterFrom)}:Qe.current&&(yt.className=jr($.className,(n=P.current)==null?void 0:n.className),yt.className===""&&delete yt.className),b.createElement(Mr.Provider,{value:Je},b.createElement(co,{value:bt(me,{visible:Ct.Open,hidden:Ct.Closed})|De.flags},mt({ourProps:kt,theirProps:yt,defaultTag:uc,features:Kl,visible:me==="visible",name:"Transition.Child"})))}function dc(t,l){let{show:r,appear:n=!1,unmount:u=!0,...f}=t,a=b.useRef(null),m=Et(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=Gl(()=>{E("hidden")}),[R,T]=b.useState(!0),M=b.useRef([r]);nt(()=>{R!==!1&&M.current[M.current.length-1]!==r&&(M.current.push(r),T(!1))},[M,r]);let $=b.useMemo(()=>({show:r,appear:n,initial:R}),[r,n,R]);b.useEffect(()=>{if(r)E("visible");else if(!Rr(k))E("hidden");else{let q=a.current;if(!q)return;let ne=q.getBoundingClientRect();ne.x===0&&ne.y===0&&ne.width===0&&ne.height===0&&E("hidden")}},[r,k]);let P={unmount:u},B=te(()=>{var q;R&&T(!1),(q=t.beforeEnter)==null||q.call(t)}),_=te(()=>{var q;R&&T(!1),(q=t.beforeLeave)==null||q.call(t)});return b.createElement(Mr.Provider,{value:k},b.createElement(Fr.Provider,{value:$},mt({ourProps:{...P,as:b.Fragment,children:b.createElement(Xl,{ref:m,...P,...f,beforeEnter:B,beforeLeave:_})},theirProps:{},defaultTag:b.Fragment,features:Kl,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(No,{ref:l,...t}):b.createElement(Xl,{ref:l,...t}))}let No=ht(dc),Xl=ht(cc),pc=ht(fc),Cn=Object.assign(No,{Child:pc,Root:No});function mc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{fillRule:"evenodd",d:"M18 10a.75.75 0 0 1-.75.75H4.66l2.1 1.95a.75.75 0 1 1-1.02 1.1l-3.5-3.25a.75.75 0 0 1 0-1.1l3.5-3.25a.75.75 0 1 1 1.02 1.1l-2.1 1.95h12.59A.75.75 0 0 1 18 10Z",clipRule:"evenodd"}))}const hc=Y.forwardRef(mc);function vc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{fillRule:"evenodd",d:"M2 10a.75.75 0 0 1 .75-.75h12.59l-2.1-1.95a.75.75 0 1 1 1.02-1.1l3.5 3.25a.75.75 0 0 1 0 1.1l-3.5 3.25a.75.75 0 1 1-1.02-1.1l2.1-1.95H2.75A.75.75 0 0 1 2 10Z",clipRule:"evenodd"}))}const gc=Y.forwardRef(vc);function bc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",clipRule:"evenodd"}))}const xc=Y.forwardRef(bc);function yc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const wc=Y.forwardRef(yc);function Ec({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-8-5a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-1.5 0v-4.5A.75.75 0 0 1 10 5Zm0 10a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const Jl=Y.forwardRef(Ec);function Sc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const Cc=Y.forwardRef(Sc);function jc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM9 9a.75.75 0 0 0 0 1.5h.253a.25.25 0 0 1 .244.304l-.459 2.066A1.75 1.75 0 0 0 10.747 15H11a.75.75 0 0 0 0-1.5h-.253a.25.25 0 0 1-.244-.304l.459-2.066A1.75 1.75 0 0 0 9.253 9H9Z",clipRule:"evenodd"}))}const Tc=Y.forwardRef(jc);function Oc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM8.28 7.22a.75.75 0 0 0-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 1 0 1.06 1.06L10 11.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L11.06 10l1.72-1.72a.75.75 0 0 0-1.06-1.06L10 8.94 8.28 7.22Z",clipRule:"evenodd"}))}const Nc=Y.forwardRef(Oc),Ic={warning:{color:"bg-yellow-50",icon:j.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:j.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:j.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:j.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?j.jsx("div",{className:"fixed top-2.5 left-1/2 transform -translate-x-1/2 w-80 3xs:w-96 z-50",children:j.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:j.jsxs("div",{className:ae("rounded-md p-4 text-center",x.color),children:[j.jsxs("div",{className:"flex justify-center flex-shrink-0",children:[x.icon,j.jsx("h3",{className:ae("text-sm font-medium ml-3",x.colorTitle),children:l})]}),j.jsx("div",{className:ae("mt-2 text-sm",x.colorText),children:j.jsx("p",{children:r})})]})})}):null};function Pc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{fillRule:"evenodd",d:"M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",clipRule:"evenodd"}))}const Fc=Y.forwardRef(Pc);function Mc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{fillRule:"evenodd",d:"M10.5 3.75a6.75 6.75 0 1 0 0 13.5 6.75 6.75 0 0 0 0-13.5ZM2.25 10.5a8.25 8.25 0 1 1 14.59 5.28l4.69 4.69a.75.75 0 1 1-1.06 1.06l-4.69-4.69A8.25 8.25 0 0 1 2.25 10.5Z",clipRule:"evenodd"}))}const Rc=Y.forwardRef(Mc);function Lc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{d:"M21.731 2.269a2.625 2.625 0 0 0-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 0 0 0-3.712ZM19.513 8.199l-3.712-3.712-8.4 8.4a5.25 5.25 0 0 0-1.32 2.214l-.8 2.685a.75.75 0 0 0 .933.933l2.685-.8a5.25 5.25 0 0 0 2.214-1.32l8.4-8.4Z"}),Y.createElement("path",{d:"M5.25 5.25a3 3 0 0 0-3 3v10.5a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3V13.5a.75.75 0 0 0-1.5 0v5.25a1.5 1.5 0 0 1-1.5 1.5H5.25a1.5 1.5 0 0 1-1.5-1.5V8.25a1.5 1.5 0 0 1 1.5-1.5h5.25a.75.75 0 0 0 0-1.5H5.25Z"}))}const Ac=Y.forwardRef(Lc);function Dc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{fillRule:"evenodd",d:"M1.5 6a2.25 2.25 0 0 1 2.25-2.25h16.5A2.25 2.25 0 0 1 22.5 6v12a2.25 2.25 0 0 1-2.25 2.25H3.75A2.25 2.25 0 0 1 1.5 18V6ZM3 16.06V18c0 .414.336.75.75.75h16.5A.75.75 0 0 0 21 18v-1.94l-2.69-2.689a1.5 1.5 0 0 0-2.12 0l-.88.879.97.97a.75.75 0 1 1-1.06 1.06l-5.16-5.159a1.5 1.5 0 0 0-2.12 0L3 16.061Zm10.125-7.81a1.125 1.125 0 1 1 2.25 0 1.125 1.125 0 0 1-2.25 0Z",clipRule:"evenodd"}))}const $c=Y.forwardRef(Dc);function _c({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{fillRule:"evenodd",d:"M18.685 19.097A9.723 9.723 0 0 0 21.75 12c0-5.385-4.365-9.75-9.75-9.75S2.25 6.615 2.25 12a9.723 9.723 0 0 0 3.065 7.097A9.716 9.716 0 0 0 12 21.75a9.716 9.716 0 0 0 6.685-2.653Zm-12.54-1.285A7.486 7.486 0 0 1 12 15a7.486 7.486 0 0 1 5.855 2.812A8.224 8.224 0 0 1 12 20.25a8.224 8.224 0 0 1-5.855-2.438ZM15.75 9a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z",clipRule:"evenodd"}))}const Bc=Y.forwardRef(_c);function zc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{fillRule:"evenodd",d:"M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const Wc=Y.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 j.jsx(j.Fragment,{children:t?j.jsx("img",{src:t,alt:l,width:r,height:n,className:ae(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?j.jsx(Bc,{className:ae("bg-white text-default-5",f!==""?f:"w-7 h-7")}):j.jsx("div",{className:ae("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 j.jsx("nav",{className:"flex items-center justify-center w-full","aria-label":"Progress","data-testid":"bullets",children:j.jsx("ol",{role:"list",className:"flex items-center space-x-5",children:new Array(t).fill(1).map((f,a)=>j.jsx("li",{children:r!==a?j.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:j.jsx("span",{className:"sr-only",children:"step"})}):j.jsxs("div",{className:"relative flex items-center justify-center cursor-pointer","aria-current":"step",children:[j.jsx("span",{className:"absolute flex h-5 w-5 p-px","aria-hidden":"true",children:j.jsx("span",{className:"h-full w-full rounded-full bg-gray-300"})}),j.jsx("span",{className:"relative block h-2.5 w-2.5 rounded-full bg-gray-500","aria-hidden":"true"}),j.jsx("span",{className:"sr-only",children:"step"})]})},a))})})};var Ql={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})()})(Ql);var Vc=Ql.exports;const pn=os(Vc),ei=({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=pn({"ml-2":n==="start"&&r!==null,"mr-2":n==="end"&&r!==null});return j.jsxs("button",{className:ae("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&&j.jsx("span",{children:r}),j.jsx("span",{className:ae("flex",v),id:m,children:l}),n==="end"&&r!==null&&j.jsx("span",{children:r})]})},ti=({children:t,className:l="",icon:r=null,edge:n=null,disabled:u=!1,type:f="button",onClick:a,id:m})=>{const v=pn({"ml-2":n==="start"&&r!==null,"mr-2":n==="end"&&r!==null});return j.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&&j.jsx("span",{children:r}),j.jsx("span",{className:v,children:t}),n==="end"&&r!==null&&j.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,R]=b.useState(!1),T=pn({"ml-2":u==="start"&&n!==null,"mr-2":u==="end"&&n!==null}),M=()=>{m&&m()};return j.jsx("div",{className:ae("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:j.jsxs("button",{className:ae("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:M,onFocus:()=>R(!0),onBlur:()=>R(!1),disabled:f,"data-testid":`button-solid-${v}`,children:[u==="start"&&n!==null&&j.jsx("span",{className:"flex",children:n}),j.jsx("span",{className:ae(r.length===0&&T,r.length!==0&&r),children:t}),u==="end"&&n!==null&&j.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]),j.jsxs("div",{className:"flex items-center",style:a,"data-testid":`container-check-${n}`,children:[j.jsx("input",{checked:v,id:`${t}-${n}`,value:n,"aria-describedby":"comments-description",type:"checkbox",onChange:r,className:ae("cursor-pointer rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",f!==""&&f),"data-testid":`checkbox-${n}`,disabled:m}),t!==null?j.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 Y.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?Y.createElement("title",{id:l},t):null,Y.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const Gc=Y.forwardRef(Yc);function qc({title:t,titleId:l,...r},n){return Y.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?Y.createElement("title",{id:l},t):null,Y.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const Kc=Y.forwardRef(qc);function Xc({title:t,titleId:l,...r},n){return Y.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?Y.createElement("title",{id:l},t):null,Y.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const Jc=Y.forwardRef(Xc);function Qc({title:t,titleId:l,...r},n){return Y.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?Y.createElement("title",{id:l},t):null,Y.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=Y.forwardRef(Qc);function td({title:t,titleId:l,...r},n){return Y.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?Y.createElement("title",{id:l},t):null,Y.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=Y.forwardRef(td);function ni({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 j.jsx(Cn,{show:n,as:b.Fragment,children:j.jsxs(Hl,{as:"div",className:"z-50 relative",onClose:u,"data-testid":"modal",children:[j.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:j.jsx("div",{className:"fixed inset-0 bg-opacity-40 bg-gray-900 transition-opacity","data-testid":"window-close",onClick:()=>u(!1)})}),j.jsx("div",{className:"fixed inset-0 z-10 overflow-y-auto",children:j.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:j.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:j.jsxs(Hl.Panel,{className:ae("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&&j.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-green-100",children:j.jsx(Gc,{className:"h-6 w-6 text-green-600","aria-hidden":"true"})}),j.jsx("div",{className:ae(r!==""&&r),"data-testid":"content",children:t}),a&&j.jsx("div",{className:"mt-5 sm:mt-6",children:j.jsx(Xn,{id:"close-modal",onClick:()=>u(!1),children:"Cerrar"})}),j.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 j.jsxs(ni,{isOpen:t,setIsOpen:()=>l(),showButton:!1,showIconSuccess:!1,children:[j.jsx("p",{className:ae("text-center text-sm",f!==""&&f),children:n}),j.jsx("p",{className:ae("text-center text-sm",a!==""&&a),children:u}),j.jsxs("div",{className:"flex w-full justify-center mt-5",children:[j.jsx(ei,{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"}),j.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={}})=>j.jsx("div",{className:ae("w-px",t!==""&&t),style:l}),ld=({onClick:t,id:l="",className:r=""})=>j.jsxs("div",{className:ae("flex items-center text-default-5",r!==""&&r),"data-testid":l,children:[j.jsx(Fc,{className:"w-3 h-3 3xs:w-4 3xs:h-4 stroke-current cursor-pointer","data-testid":"chevron-left-icon",onClick:t}),j.jsx("span",{onClick:t,className:"text-sm cursor-pointer","data-testid":"go-back",children:"Volver"})]});var Io={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,R="The user aborted a request.",T="signal is aborted without reason",M=({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])},L=()=>{const e=n.useRef({}),[i,o]=n.useState({}),[s,c]=n.useState({}),[d,p]=n.useState([]);n.useEffect(()=>{e.current={}},[]);const h=I=>A=>{A.preventDefault(),A.stopPropagation(),I(i)},g=(I,A,N)=>{const{checked:D,value:F,name:$,type:H,id:z}=I.target,K={radio:z,checkbox:D};e.current={...N,...e.current,[$]:K[H]??F},o({...e.current,[$]:K[H]??F}),A({...e.current,[$]:K[H]??F})},w=n.useCallback((I,A)=>{e.current={...e.current,[I]:A},o(N=>({...N,[I]:A}))},[]),O=n.useCallback((I,A)=>{const N=A.filter(D=>I[D]===""||I[D]===void 0);return N.forEach(D=>c(F=>({...F,[D]:"Este campo es requerido"}))),p(N),N.length>0},[]);return{handleSubmit:h,handleChange:g,setValuesDefault:w,validateFields:O,errors:d,model:i,handleError:(I,A)=>{A.forEach(N=>c(D=>({...D,[N]:I}))),p(A)},messageError:s,setModel:o}},P=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},_=()=>{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 B(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var q={exports:{}},ne={};/**
|
|
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})()})(Ql);var Vc=Ql.exports;const pn=os(Vc),ei=({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=pn({"ml-2":n==="start"&&r!==null,"mr-2":n==="end"&&r!==null});return j.jsxs("button",{className:ae("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&&j.jsx("span",{children:r}),j.jsx("span",{className:ae("flex",v),id:m,children:l}),n==="end"&&r!==null&&j.jsx("span",{children:r})]})},ti=({children:t,className:l="",icon:r=null,edge:n=null,disabled:u=!1,type:f="button",onClick:a,id:m})=>{const v=pn({"ml-2":n==="start"&&r!==null,"mr-2":n==="end"&&r!==null});return j.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&&j.jsx("span",{children:r}),j.jsx("span",{className:v,children:t}),n==="end"&&r!==null&&j.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,R]=b.useState(!1),T=pn({"ml-2":u==="start"&&n!==null,"mr-2":u==="end"&&n!==null}),M=()=>{m&&m()};return j.jsx("div",{className:ae("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:j.jsxs("button",{className:ae("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:M,onFocus:()=>R(!0),onBlur:()=>R(!1),disabled:f,"data-testid":`button-solid-${v}`,children:[u==="start"&&n!==null&&j.jsx("span",{className:"flex",children:n}),j.jsx("span",{className:ae(r.length===0&&T,r.length!==0&&r),children:t}),u==="end"&&n!==null&&j.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]),j.jsxs("div",{className:"flex items-center",style:a,"data-testid":`container-check-${n}`,children:[j.jsx("input",{checked:v,id:`${t}-${n}`,value:n,"aria-describedby":"comments-description",type:"checkbox",onChange:r,className:ae("cursor-pointer rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",f!==""&&f),"data-testid":`checkbox-${n}`,disabled:m}),t!==null?j.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 Y.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?Y.createElement("title",{id:l},t):null,Y.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const Gc=Y.forwardRef(Yc);function qc({title:t,titleId:l,...r},n){return Y.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?Y.createElement("title",{id:l},t):null,Y.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const Kc=Y.forwardRef(qc);function Xc({title:t,titleId:l,...r},n){return Y.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?Y.createElement("title",{id:l},t):null,Y.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const Jc=Y.forwardRef(Xc);function Qc({title:t,titleId:l,...r},n){return Y.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?Y.createElement("title",{id:l},t):null,Y.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=Y.forwardRef(Qc);function td({title:t,titleId:l,...r},n){return Y.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?Y.createElement("title",{id:l},t):null,Y.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=Y.forwardRef(td);function ni({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 j.jsx(Cn,{show:n,as:b.Fragment,children:j.jsxs(Hl,{as:"div",className:"z-50 relative",onClose:u,"data-testid":"modal",children:[j.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:j.jsx("div",{className:"fixed inset-0 bg-opacity-40 bg-gray-900 transition-opacity","data-testid":"window-close",onClick:()=>u(!1)})}),j.jsx("div",{className:"fixed inset-0 z-10 overflow-y-auto",children:j.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:j.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:j.jsxs(Hl.Panel,{className:ae("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&&j.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-green-100",children:j.jsx(Gc,{className:"h-6 w-6 text-green-600","aria-hidden":"true"})}),j.jsx("div",{className:ae(r!==""&&r),"data-testid":"content",children:t}),a&&j.jsx("div",{className:"mt-5 sm:mt-6",children:j.jsx(Xn,{id:"close-modal",onClick:()=>u(!1),children:"Cerrar"})}),j.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 j.jsxs(ni,{isOpen:t,setIsOpen:()=>l(),showButton:!1,showIconSuccess:!1,children:[j.jsx("p",{className:ae("text-center text-sm",f!==""&&f),children:n}),j.jsx("p",{className:ae("text-center text-sm",a!==""&&a),children:u}),j.jsxs("div",{className:"flex w-full justify-center mt-5",children:[j.jsx(ei,{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"}),j.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={}})=>j.jsx("div",{className:ae("w-px",t!==""&&t),style:l}),ld=({onClick:t,id:l="",className:r=""})=>j.jsxs("div",{className:ae("flex items-center text-default-5",r!==""&&r),"data-testid":l,children:[j.jsx(Fc,{className:"w-3 h-3 3xs:w-4 3xs:h-4 stroke-current cursor-pointer","data-testid":"chevron-left-icon",onClick:t}),j.jsx("span",{onClick:t,className:"text-sm cursor-pointer","data-testid":"go-back",children:"Volver"})]});var Io={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,R="The user aborted a request.",T="signal is aborted without reason",M=({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])},$=()=>{const e=n.useRef({}),[i,o]=n.useState({}),[s,c]=n.useState({}),[d,p]=n.useState([]);n.useEffect(()=>{e.current={}},[]);const h=I=>L=>{L.preventDefault(),L.stopPropagation(),I(i)},g=(I,L,N)=>{const{checked:A,value:F,name:D,type:H,id:z}=I.target,K={radio:z,checkbox:A};e.current={...N,...e.current,[D]:K[H]??F},o({...e.current,[D]:K[H]??F}),L({...e.current,[D]:K[H]??F})},w=n.useCallback((I,L)=>{e.current={...e.current,[I]:L},o(N=>({...N,[I]:L}))},[]),O=n.useCallback((I,L)=>{const N=L.filter(A=>I[A]===""||I[A]===void 0);return N.forEach(A=>c(F=>({...F,[A]:"Este campo es requerido"}))),p(N),N.length>0},[]);return{handleSubmit:h,handleChange:g,setValuesDefault:w,validateFields:O,errors:d,model:i,handleError:(I,L)=>{L.forEach(N=>c(A=>({...A,[N]:I}))),p(L)},messageError:s,setModel:o}},P=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 q={exports:{}},ne={};/**
|
|
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 <`+X+">.")}return W}}function Rn(S,W){{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 oe;function me(){if(oe)return ne;oe=1;var e=n,i=Symbol.for("react.element"),o=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,c=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function p(h,g,w){var O,I={},
|
|
43
|
+
*/var oe;function me(){if(oe)return ne;oe=1;var e=n,i=Symbol.for("react.element"),o=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,c=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function p(h,g,w){var O,I={},L=null,N=null;w!==void 0&&(L=""+w),g.key!==void 0&&(L=""+g.key),g.ref!==void 0&&(N=g.ref);for(O in g)s.call(g,O)&&!d.hasOwnProperty(O)&&(I[O]=g[O]);if(h&&h.defaultProps)for(O in g=h.defaultProps,g)I[O]===void 0&&(I[O]=g[O]);return{$$typeof:i,type:h,key:L,ref:N,props:I,_owner:c.current}}return ne.Fragment=o,ne.jsx=p,ne.jsxs=p,ne}var Ne={};/**
|
|
44
44
|
* @license React
|
|
45
45
|
* react-jsx-runtime.development.js
|
|
46
46
|
*
|
|
@@ -48,25 +48,25 @@ Check the top-level render call using <`+X+">.")}return W}}function Rn(S,W){{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 Oe;function Ce(){return Oe||(Oe=1,process.env.NODE_ENV!=="production"&&function(){var e=n,i=Symbol.for("react.element"),o=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"),g=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),
|
|
51
|
+
*/var Oe;function Ce(){return Oe||(Oe=1,process.env.NODE_ENV!=="production"&&function(){var e=n,i=Symbol.for("react.element"),o=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"),g=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),N=Symbol.for("react.offscreen"),A=Symbol.iterator,F="@@iterator";function D(C){if(C===null||typeof C!="object")return null;var V=A&&C[A]||C[F];return typeof V=="function"?V:null}var H=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function z(C){{for(var V=arguments.length,ee=new Array(V>1?V-1:0),we=1;we<V;we++)ee[we-1]=arguments[we];K("error",C,ee)}}function K(C,V,ee){{var we=H.ReactDebugCurrentFrame,tt=we.getStackAddendum();tt!==""&&(V+="%s",ee=ee.concat([tt]));var dt=ee.map(function(Ye){return String(Ye)});dt.unshift("Warning: "+V),Function.prototype.apply.call(console[C],console,dt)}}var ue=!1,le=!1,ve=!1,Ue=!1,Be=!1,ge;ge=Symbol.for("react.module.reference");function xe(C){return!!(typeof C=="string"||typeof C=="function"||C===s||C===d||Be||C===c||C===w||C===O||Ue||C===N||ue||le||ve||typeof C=="object"&&C!==null&&(C.$$typeof===L||C.$$typeof===I||C.$$typeof===p||C.$$typeof===h||C.$$typeof===g||C.$$typeof===ge||C.getModuleId!==void 0))}function Ee(C,V,ee){var we=C.displayName;if(we)return we;var tt=V.displayName||V.name||"";return tt!==""?ee+"("+tt+")":ee}function Ae(C){return C.displayName||"Context"}function at(C){if(C==null)return null;if(typeof C.tag=="number"&&z("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof C=="function")return C.displayName||C.name||null;if(typeof C=="string")return C;switch(C){case s:return"Fragment";case o:return"Portal";case d:return"Profiler";case c:return"StrictMode";case w:return"Suspense";case O:return"SuspenseList"}if(typeof C=="object")switch(C.$$typeof){case h:var V=C;return Ae(V)+".Consumer";case p:var ee=C;return Ae(ee._context)+".Provider";case g:return Ee(C,C.render,"ForwardRef");case I:var we=C.displayName||null;return we!==null?we:at(C.type)||"Memo";case L:{var tt=C,dt=tt._payload,Ye=tt._init;try{return at(Ye(dt))}catch{return null}}}return null}var pt=Object.assign,Z=0,ut,$e,gt,se,ze,it,Tt;function Rt(){}Rt.__reactDisabledLog=!0;function wt(){{if(Z===0){ut=console.log,$e=console.info,gt=console.warn,se=console.error,ze=console.group,it=console.groupCollapsed,Tt=console.groupEnd;var C={configurable:!0,enumerable:!0,value:Rt,writable:!0};Object.defineProperties(console,{info:C,log:C,warn:C,error:C,group:C,groupCollapsed:C,groupEnd:C})}Z++}}function Me(){{if(Z--,Z===0){var C={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:pt({},C,{value:ut}),info:pt({},C,{value:$e}),warn:pt({},C,{value:gt}),error:pt({},C,{value:se}),group:pt({},C,{value:ze}),groupCollapsed:pt({},C,{value:it}),groupEnd:pt({},C,{value:Tt})})}Z<0&&z("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var St=H.ReactCurrentDispatcher,Ke;function Lt(C,V,ee){{if(Ke===void 0)try{throw Error()}catch(tt){var we=tt.stack.trim().match(/\n( *(at )?)/);Ke=we&&we[1]||""}return`
|
|
52
52
|
`+Ke+C}}var re=!1,ye;{var et=typeof WeakMap=="function"?WeakMap:Map;ye=new et}function Bt(C,V){if(!C||re)return"";{var ee=ye.get(C);if(ee!==void 0)return ee}var we;re=!0;var tt=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var dt;dt=St.current,St.current=null,wt();try{if(V){var Ye=function(){throw Error()};if(Object.defineProperty(Ye.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ye,[])}catch(an){we=an}Reflect.construct(C,[],Ye)}else{try{Ye.call()}catch(an){we=an}C.call(Ye.prototype)}}else{try{throw Error()}catch(an){we=an}C()}}catch(an){if(an&&we&&typeof an.stack=="string"){for(var He=an.stack.split(`
|
|
53
53
|
`),_t=we.stack.split(`
|
|
54
54
|
`),Nt=He.length-1,It=_t.length-1;Nt>=1&&It>=0&&He[Nt]!==_t[It];)It--;for(;Nt>=1&&It>=0;Nt--,It--)if(He[Nt]!==_t[It]){if(Nt!==1||It!==1)do if(Nt--,It--,It<0||He[Nt]!==_t[It]){var Ut=`
|
|
55
|
-
`+He[Nt].replace(" at new "," at ");return C.displayName&&Ut.includes("<anonymous>")&&(Ut=Ut.replace("<anonymous>",C.displayName)),typeof C=="function"&&ye.set(C,Ut),Ut}while(Nt>=1&&It>=0);break}}}finally{re=!1,St.current=dt,Me(),Error.prepareStackTrace=tt}var Dn=C?C.displayName||C.name:"",Gi=Dn?Lt(Dn):"";return typeof C=="function"&&ye.set(C,Gi),Gi}function Ln(C,V,ee){return Bt(C,!1)}function de(C){var V=C.prototype;return!!(V&&V.isReactComponent)}function We(C,V,ee){if(C==null)return"";if(typeof C=="function")return Bt(C,de(C));if(typeof C=="string")return Lt(C);switch(C){case w:return Lt("Suspense");case O:return Lt("SuspenseList")}if(typeof C=="object")switch(C.$$typeof){case g:return Ln(C.render);case I:return We(C.type,V,ee);case
|
|
55
|
+
`+He[Nt].replace(" at new "," at ");return C.displayName&&Ut.includes("<anonymous>")&&(Ut=Ut.replace("<anonymous>",C.displayName)),typeof C=="function"&&ye.set(C,Ut),Ut}while(Nt>=1&&It>=0);break}}}finally{re=!1,St.current=dt,Me(),Error.prepareStackTrace=tt}var Dn=C?C.displayName||C.name:"",Gi=Dn?Lt(Dn):"";return typeof C=="function"&&ye.set(C,Gi),Gi}function Ln(C,V,ee){return Bt(C,!1)}function de(C){var V=C.prototype;return!!(V&&V.isReactComponent)}function We(C,V,ee){if(C==null)return"";if(typeof C=="function")return Bt(C,de(C));if(typeof C=="string")return Lt(C);switch(C){case w:return Lt("Suspense");case O:return Lt("SuspenseList")}if(typeof C=="object")switch(C.$$typeof){case g:return Ln(C.render);case I:return We(C.type,V,ee);case L:{var we=C,tt=we._payload,dt=we._init;try{return We(dt(tt),V,ee)}catch{}}}return""}var Ot=Object.prototype.hasOwnProperty,yn={},xr=H.ReactDebugCurrentFrame;function In(C){if(C){var V=C._owner,ee=We(C.type,C._source,V?V.type:null);xr.setExtraStackFrame(ee)}else xr.setExtraStackFrame(null)}function Jm(C,V,ee,we,tt){{var dt=Function.call.bind(Ot);for(var Ye in C)if(dt(C,Ye)){var He=void 0;try{if(typeof C[Ye]!="function"){var _t=Error((we||"React class")+": "+ee+" type `"+Ye+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof C[Ye]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw _t.name="Invariant Violation",_t}He=C[Ye](V,Ye,we,ee,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Nt){He=Nt}He&&!(He instanceof Error)&&(In(tt),z("%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).",we||"React class",ee,Ye,typeof He),In(null)),He instanceof Error&&!(He.message in yn)&&(yn[He.message]=!0,In(tt),z("Failed %s type: %s",ee,He.message),In(null))}}}var Qm=Array.isArray;function nl(C){return Qm(C)}function e0(C){{var V=typeof Symbol=="function"&&Symbol.toStringTag,ee=V&&C[Symbol.toStringTag]||C.constructor.name||"Object";return ee}}function t0(C){try{return $i(C),!1}catch{return!0}}function $i(C){return""+C}function _i(C){if(t0(C))return z("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",e0(C)),$i(C)}var yr=H.ReactCurrentOwner,n0={key:!0,ref:!0,__self:!0,__source:!0},Bi,zi,rl;rl={};function r0(C){if(Ot.call(C,"ref")){var V=Object.getOwnPropertyDescriptor(C,"ref").get;if(V&&V.isReactWarning)return!1}return C.ref!==void 0}function o0(C){if(Ot.call(C,"key")){var V=Object.getOwnPropertyDescriptor(C,"key").get;if(V&&V.isReactWarning)return!1}return C.key!==void 0}function l0(C,V){if(typeof C.ref=="string"&&yr.current&&V&&yr.current.stateNode!==V){var ee=at(yr.current.type);rl[ee]||(z('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',at(yr.current.type),C.ref),rl[ee]=!0)}}function i0(C,V){{var ee=function(){Bi||(Bi=!0,z("%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)",V))};ee.isReactWarning=!0,Object.defineProperty(C,"key",{get:ee,configurable:!0})}}function s0(C,V){{var ee=function(){zi||(zi=!0,z("%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)",V))};ee.isReactWarning=!0,Object.defineProperty(C,"ref",{get:ee,configurable:!0})}}var a0=function(C,V,ee,we,tt,dt,Ye){var He={$$typeof:i,type:C,key:V,ref:ee,props:Ye,_owner:dt};return He._store={},Object.defineProperty(He._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(He,"_self",{configurable:!1,enumerable:!1,writable:!1,value:we}),Object.defineProperty(He,"_source",{configurable:!1,enumerable:!1,writable:!1,value:tt}),Object.freeze&&(Object.freeze(He.props),Object.freeze(He)),He};function u0(C,V,ee,we,tt){{var dt,Ye={},He=null,_t=null;ee!==void 0&&(_i(ee),He=""+ee),o0(V)&&(_i(V.key),He=""+V.key),r0(V)&&(_t=V.ref,l0(V,tt));for(dt in V)Ot.call(V,dt)&&!n0.hasOwnProperty(dt)&&(Ye[dt]=V[dt]);if(C&&C.defaultProps){var Nt=C.defaultProps;for(dt in Nt)Ye[dt]===void 0&&(Ye[dt]=Nt[dt])}if(He||_t){var It=typeof C=="function"?C.displayName||C.name||"Unknown":C;He&&i0(Ye,It),_t&&s0(Ye,It)}return a0(C,He,_t,tt,we,yr.current,Ye)}}var ol=H.ReactCurrentOwner,Wi=H.ReactDebugCurrentFrame;function An(C){if(C){var V=C._owner,ee=We(C.type,C._source,V?V.type:null);Wi.setExtraStackFrame(ee)}else Wi.setExtraStackFrame(null)}var ll;ll=!1;function il(C){return typeof C=="object"&&C!==null&&C.$$typeof===i}function Hi(){{if(ol.current){var C=at(ol.current.type);if(C)return`
|
|
56
56
|
|
|
57
57
|
Check the render method of \``+C+"`."}return""}}function c0(C){return""}var Ui={};function d0(C){{var V=Hi();if(!V){var ee=typeof C=="string"?C:C.displayName||C.name;ee&&(V=`
|
|
58
58
|
|
|
59
|
-
Check the top-level render call using <`+ee+">.")}return V}}function Vi(C,V){{if(!C._store||C._store.validated||C.key!=null)return;C._store.validated=!0;var ee=d0(V);if(Ui[ee])return;Ui[ee]=!0;var we="";C&&C._owner&&C._owner!==ol.current&&(we=" It was passed a child from "+at(C._owner.type)+"."),An(C),z('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ee,we),An(null)}}function Zi(C,V){{if(typeof C!="object")return;if(nl(C))for(var ee=0;ee<C.length;ee++){var we=C[ee];il(we)&&Vi(we,V)}else if(il(C))C._store&&(C._store.validated=!0);else if(C){var tt
|
|
59
|
+
Check the top-level render call using <`+ee+">.")}return V}}function Vi(C,V){{if(!C._store||C._store.validated||C.key!=null)return;C._store.validated=!0;var ee=d0(V);if(Ui[ee])return;Ui[ee]=!0;var we="";C&&C._owner&&C._owner!==ol.current&&(we=" It was passed a child from "+at(C._owner.type)+"."),An(C),z('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ee,we),An(null)}}function Zi(C,V){{if(typeof C!="object")return;if(nl(C))for(var ee=0;ee<C.length;ee++){var we=C[ee];il(we)&&Vi(we,V)}else if(il(C))C._store&&(C._store.validated=!0);else if(C){var tt=D(C);if(typeof tt=="function"&&tt!==C.entries)for(var dt=tt.call(C),Ye;!(Ye=dt.next()).done;)il(Ye.value)&&Vi(Ye.value,V)}}}function f0(C){{var V=C.type;if(V==null||typeof V=="string")return;var ee;if(typeof V=="function")ee=V.propTypes;else if(typeof V=="object"&&(V.$$typeof===g||V.$$typeof===I))ee=V.propTypes;else return;if(ee){var we=at(V);Jm(ee,C.props,"prop",we,C)}else if(V.PropTypes!==void 0&&!ll){ll=!0;var tt=at(V);z("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",tt||"Unknown")}typeof V.getDefaultProps=="function"&&!V.getDefaultProps.isReactClassApproved&&z("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function p0(C){{for(var V=Object.keys(C.props),ee=0;ee<V.length;ee++){var we=V[ee];if(we!=="children"&&we!=="key"){An(C),z("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",we),An(null);break}}C.ref!==null&&(An(C),z("Invalid attribute `ref` supplied to `React.Fragment`."),An(null))}}function Yi(C,V,ee,we,tt,dt){{var Ye=xe(C);if(!Ye){var He="";(C===void 0||typeof C=="object"&&C!==null&&Object.keys(C).length===0)&&(He+=" 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 _t=c0();_t?He+=_t:He+=Hi();var Nt;C===null?Nt="null":nl(C)?Nt="array":C!==void 0&&C.$$typeof===i?(Nt="<"+(at(C.type)||"Unknown")+" />",He=" Did you accidentally export a JSX literal instead of a component?"):Nt=typeof C,z("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Nt,He)}var It=u0(C,V,ee,tt,dt);if(It==null)return It;if(Ye){var Ut=V.children;if(Ut!==void 0)if(we)if(nl(Ut)){for(var Dn=0;Dn<Ut.length;Dn++)Zi(Ut[Dn],C);Object.freeze&&Object.freeze(Ut)}else z("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 Zi(Ut,C)}return C===s?p0(It):f0(It),It}}function m0(C,V,ee){return Yi(C,V,ee,!0)}function h0(C,V,ee){return Yi(C,V,ee,!1)}var v0=h0,g0=m0;Ne.Fragment=s,Ne.jsx=v0,Ne.jsxs=g0}()),Ne}process.env.NODE_ENV==="production"?q.exports=me():q.exports=Ce();var y=q.exports;function he(e,i,o){let s=o.initialDeps??[],c;return()=>{var d,p,h,g;let w;o.key&&(d=o.debug)!=null&&d.call(o)&&(w=Date.now());const O=e();if(!(O.length!==s.length||O.some((L,N)=>s[N]!==L)))return c;s=O;let I;if(o.key&&(p=o.debug)!=null&&p.call(o)&&(I=Date.now()),c=i(...O),o.key&&(h=o.debug)!=null&&h.call(o)){const L=Math.round((Date.now()-w)*100)/100,N=Math.round((Date.now()-I)*100)/100,A=N/16,F=(D,H)=>{for(D=String(D);D.length<H;)D=" "+D;return D};console.info(`%c⏱ ${F(N,5)} /${F(L,5)} ms`,`
|
|
60
60
|
font-size: .6rem;
|
|
61
61
|
font-weight: bold;
|
|
62
|
-
color: hsl(${Math.max(0,Math.min(120-120*D,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 Ie(e,i){if(e===void 0)throw new Error("Unexpected undefined");return e}const _e=(e,i)=>Math.abs(e-i)<1,st=(e,i,o)=>{let s;return function(...c){e.clearTimeout(s),s=e.setTimeout(()=>i.apply(this,c),o)}},U=e=>e,Xe=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},De=(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)}},ce={passive:!0},Te=typeof window>"u"?!0:"onscrollend"in window,Je=(e,i)=>{const o=e.scrollElement;if(!o)return;const s=e.targetWindow;if(!s)return;let c=0;const d=Te?()=>{}:st(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,ce),o.addEventListener("scrollend",g,ce),()=>{o.removeEventListener("scroll",h),o.removeEventListener("scrollend",g)}},Qe=(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"])},yt=(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:U,rangeExtractor:Xe,onChange:()=>{},measureElement:Qe,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=he(()=>[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=he(()=>[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 A=(g=this.measurementsCache[I])==null?void 0:g.measureElement;A||(A=ue=>{const le=d(I),ve=this.elementsCache.get(le);if(!ue){ve&&(this.observer.unobserve(ve),this.elementsCache.delete(le));return}ve!==ue&&(ve&&this.observer.unobserve(ve),this.observer.observe(ue),this.elementsCache.set(le,ue)),ue.isConnected&&this.resizeItem(I,this.options.measureElement(ue,void 0,this))});const N=d(I),D=this.options.lanes===1?O[I-1]:this.getFurthestMeasurement(O,I),F=D?D.end+this.options.gap:s+c,$=h.get(N),H=typeof $=="number"?$:this.options.estimateSize(I),z=F+H,K=D?D.lane:I%this.options.lanes;O[I]={index:I,start:F,size:H,end:z,key:N,lane:K,measureElement:A}}return this.measurementsCache=O,O},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=he(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(o,s,c)=>this.range=o.length>0&&s>0?Wt({measurements:o,outerSize:s,scrollOffset:c}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getIndexes=he(()=>[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=he(()=>[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 Ie(s[ft(0,s.length-1,c=>Ie(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]=Ie(this.getOffsetForIndex(o,h));_e(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 ft=(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 Wt({measurements:e,outerSize:i,scrollOffset:o}){const s=e.length-1,c=ft(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 je=typeof document<"u"?a.useLayoutEffect:a.useEffect;function ot(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(),[]),je(()=>s._willUpdate()),s}function Ve(e){return ot({observeElementRect:De,observeElementOffset:Je,scrollToFn:yt,...e})}var ie=Object.defineProperty,G=(e,i,o)=>i in e?ie(e,i,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[i]=o,Q=(e,i,o)=>(G(e,typeof i!="symbol"?i+"":i,o),o);let Re=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"}},Ze=new Re,ke=(e,i)=>{Ze.isServer?n.useEffect(e,i):n.useLayoutEffect(e,i)};function Pt(e){let i=n.useRef(e);return ke(()=>{i.current=e},[e]),i}function mn(e,i){let[o,s]=n.useState(e),c=Pt(e);return ke(()=>s(c.current),[c,s,...i]),o}let J=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,J(w=>(d||c(w),i==null?void 0:i(w)))]}function rn(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 rn(()=>{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 Zt(){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(Ze.isHandoffComplete);return i&&Ze.isHandoffComplete===!1&&o(!1),a.useEffect(()=>{i!==!0&&o(!0)},[i]),a.useEffect(()=>Ze.handoff(),[]),e?!1:i}var Lr;let Ft=(Lr=n.useId)!=null?Lr:function(){let e=hn(),[i,o]=n.useState(e?()=>Ze.nextId():null);return ke(()=>{i===null&&o(Ze.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 qt(e){return Ze.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 Ar(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=qt(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 Dr(e){let i=qt(e);$t().nextFrame(()=>{i&&!lr(i.activeElement,0)&&Kt(e)})}var Fo=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Fo||{});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 Kt(e){e==null||e.focus({preventScroll:!0})}let Mo=["textarea","input"].join(",");function ir(e){var i,o;return(o=(i=e==null?void 0:e.matches)==null?void 0:i.call(e,Mo))!=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 on(Ar(),i,{relativeTo:e})}function on(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:Ar(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,A;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}A=p[N],A==null||A.focus(w),O+=h}while(A!==d.activeElement);return i&6&&ir(A)&&A.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 _r(){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 Br(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=>{_r()||d.current&&(c(p,()=>d.current),d.current=null)},!0),jn("touchend",p=>c(p,()=>p.target instanceof HTMLElement?p.target:null),!0),Br("blur",p=>c(p,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Xt(...e){return n.useMemo(()=>qt(...e),[...e])}function zr(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(()=>zr(e));return ke(()=>{s(zr(e))},[e.type,e.as]),ke(()=>{o||i.current&&i.current instanceof HTMLButtonElement&&!i.current.hasAttribute("type")&&s("button")},[o,i]),o}let ar=Symbol();function Ro(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=J(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 Wr(e){return[e.screenX,e.screenY]}function Hr(){let e=n.useRef([-1,-1]);return{wasMoved(i){let o=Wr(i);return e.current[0]===o[0]&&e.current[1]===o[1]?!1:(e.current=o,!0)},update(i){e.current=Wr(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]),ke(()=>{if(!e||!s)return;let p=qt(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 W(e,i){let o=n.useRef([]),s=J(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 X(...e){return Array.from(new Set(e.flatMap(i=>typeof i=="string"?i.split(" "):[]))).filter(Boolean).join(" ")}var fe=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(fe||{}),Pe=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Pe||{});function pe({ourProps:e,theirProps:i,slot:o,defaultTag:s,features:c,visible:d=!0,name:p,mergeRefs:h}){h=h??Le;let g=Mt(i,e);if(d)return Fe(g,o,s,p,h);let w=c??0;if(w&2){let{static:O=!1,...I}=g;if(O)return Fe(I,o,s,p,h)}if(w&1){let{unmount:O=!0,...I}=g;return ct(O?0:1,{0(){return null},1(){return Fe({...I,hidden:!0,style:{display:"none"}},o,s,p,h)}})}return Fe(g,o,s,p,h)}function Fe(e,i={},o,s,c){let{as:d=o,children:p,refName:h="ref",...g}=Dt(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 A=!1,N=[];for(let[D,F]of Object.entries(i))typeof F=="boolean"&&(A=!0),F===!0&&N.push(D);A&&(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(F=>` - ${F}`).join(`
|
|
62
|
+
color: hsl(${Math.max(0,Math.min(120-120*A,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 Ie(e,i){if(e===void 0)throw new Error("Unexpected undefined");return e}const _e=(e,i)=>Math.abs(e-i)<1,st=(e,i,o)=>{let s;return function(...c){e.clearTimeout(s),s=e.setTimeout(()=>i.apply(this,c),o)}},U=e=>e,Xe=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},De=(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)}},ce={passive:!0},Te=typeof window>"u"?!0:"onscrollend"in window,Je=(e,i)=>{const o=e.scrollElement;if(!o)return;const s=e.targetWindow;if(!s)return;let c=0;const d=Te?()=>{}:st(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,ce),o.addEventListener("scrollend",g,ce),()=>{o.removeEventListener("scroll",h),o.removeEventListener("scrollend",g)}},Qe=(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"])},yt=(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:U,rangeExtractor:Xe,onChange:()=>{},measureElement:Qe,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=he(()=>[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=he(()=>[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 L=(g=this.measurementsCache[I])==null?void 0:g.measureElement;L||(L=ue=>{const le=d(I),ve=this.elementsCache.get(le);if(!ue){ve&&(this.observer.unobserve(ve),this.elementsCache.delete(le));return}ve!==ue&&(ve&&this.observer.unobserve(ve),this.observer.observe(ue),this.elementsCache.set(le,ue)),ue.isConnected&&this.resizeItem(I,this.options.measureElement(ue,void 0,this))});const N=d(I),A=this.options.lanes===1?O[I-1]:this.getFurthestMeasurement(O,I),F=A?A.end+this.options.gap:s+c,D=h.get(N),H=typeof D=="number"?D:this.options.estimateSize(I),z=F+H,K=A?A.lane:I%this.options.lanes;O[I]={index:I,start:F,size:H,end:z,key:N,lane:K,measureElement:L}}return this.measurementsCache=O,O},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=he(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(o,s,c)=>this.range=o.length>0&&s>0?Wt({measurements:o,outerSize:s,scrollOffset:c}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getIndexes=he(()=>[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=he(()=>[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 Ie(s[ft(0,s.length-1,c=>Ie(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]=Ie(this.getOffsetForIndex(o,h));_e(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 ft=(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 Wt({measurements:e,outerSize:i,scrollOffset:o}){const s=e.length-1,c=ft(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 je=typeof document<"u"?a.useLayoutEffect:a.useEffect;function ot(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(),[]),je(()=>s._willUpdate()),s}function Ve(e){return ot({observeElementRect:De,observeElementOffset:Je,scrollToFn:yt,...e})}var ie=Object.defineProperty,G=(e,i,o)=>i in e?ie(e,i,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[i]=o,Q=(e,i,o)=>(G(e,typeof i!="symbol"?i+"":i,o),o);let Re=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"}},Ze=new Re,ke=(e,i)=>{Ze.isServer?n.useEffect(e,i):n.useLayoutEffect(e,i)};function Pt(e){let i=n.useRef(e);return ke(()=>{i.current=e},[e]),i}function mn(e,i){let[o,s]=n.useState(e),c=Pt(e);return ke(()=>s(c.current),[c,s,...i]),o}let J=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,J(w=>(d||c(w),i==null?void 0:i(w)))]}function rn(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 rn(()=>{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 Zt(){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(Ze.isHandoffComplete);return i&&Ze.isHandoffComplete===!1&&o(!1),a.useEffect(()=>{i!==!0&&o(!0)},[i]),a.useEffect(()=>Ze.handoff(),[]),e?!1:i}var Lr;let Ft=(Lr=n.useId)!=null?Lr:function(){let e=hn(),[i,o]=n.useState(e?()=>Ze.nextId():null);return ke(()=>{i===null&&o(Ze.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 qt(e){return Ze.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 Ar(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=qt(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 Dr(e){let i=qt(e);$t().nextFrame(()=>{i&&!lr(i.activeElement,0)&&Kt(e)})}var Fo=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Fo||{});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 Kt(e){e==null||e.focus({preventScroll:!0})}let Mo=["textarea","input"].join(",");function ir(e){var i,o;return(o=(i=e==null?void 0:e.matches)==null?void 0:i.call(e,Mo))!=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 on(Ar(),i,{relativeTo:e})}function on(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:Ar(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,L;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}L=p[N],L==null||L.focus(w),O+=h}while(L!==d.activeElement);return i&6&&ir(L)&&L.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 _r(){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 Br(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=>{_r()||d.current&&(c(p,()=>d.current),d.current=null)},!0),jn("touchend",p=>c(p,()=>p.target instanceof HTMLElement?p.target:null),!0),Br("blur",p=>c(p,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Xt(...e){return n.useMemo(()=>qt(...e),[...e])}function zr(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(()=>zr(e));return ke(()=>{s(zr(e))},[e.type,e.as]),ke(()=>{o||i.current&&i.current instanceof HTMLButtonElement&&!i.current.hasAttribute("type")&&s("button")},[o,i]),o}let ar=Symbol();function Ro(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=J(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 Wr(e){return[e.screenX,e.screenY]}function Hr(){let e=n.useRef([-1,-1]);return{wasMoved(i){let o=Wr(i);return e.current[0]===o[0]&&e.current[1]===o[1]?!1:(e.current=o,!0)},update(i){e.current=Wr(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]),ke(()=>{if(!e||!s)return;let p=qt(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 W(e,i){let o=n.useRef([]),s=J(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 X(...e){return Array.from(new Set(e.flatMap(i=>typeof i=="string"?i.split(" "):[]))).filter(Boolean).join(" ")}var fe=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(fe||{}),Pe=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Pe||{});function pe({ourProps:e,theirProps:i,slot:o,defaultTag:s,features:c,visible:d=!0,name:p,mergeRefs:h}){h=h??Le;let g=Mt(i,e);if(d)return Fe(g,o,s,p,h);let w=c??0;if(w&2){let{static:O=!1,...I}=g;if(O)return Fe(I,o,s,p,h)}if(w&1){let{unmount:O=!0,...I}=g;return ct(O?0:1,{0(){return null},1(){return Fe({...I,hidden:!0,style:{display:"none"}},o,s,p,h)}})}return Fe(g,o,s,p,h)}function Fe(e,i={},o,s,c){let{as:d=o,children:p,refName:h="ref",...g}=Dt(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 L=!1,N=[];for(let[A,F]of Object.entries(i))typeof F=="boolean"&&(L=!0),F===!0&&N.push(A);L&&(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(F=>` - ${F}`).join(`
|
|
63
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 A=O.props,N=typeof(A==null?void 0:A.className)=="function"?(...F)=>X(A==null?void 0:A.className(...F),g.className):X(A==null?void 0:A.className,g.className),D=N?{className:N}:{};return n.cloneElement(O,Object.assign({},Mt(O.props,vt(Dt(g,["ref"]))),I,w,{ref:c(O.ref,w.ref)},D))}return n.createElement(d,Object.assign({},Dt(g,["ref"]),d!==n.Fragment&&w,d!==n.Fragment&&I),O)}function Le(...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 Dt(e,i=[]){let o=Object.assign({},e);for(let s of i)s in o&&delete o[s];return o}let gn="div";var ln=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(ln||{});function Yt(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(Yt),Lo=n.createContext(null);Lo.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(Lo)}function Ao({value:e,children:i}){return n.createElement(Lo.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 Jt=[];hd(()=>{function e(i){i.target instanceof HTMLElement&&i.target!==document.body&&Jt[0]!==i.target&&(Jt.unshift(i.target),Jt=Jt.filter(o=>o!=null&&o.isConnected),Jt.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 Ur(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 lt=(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))(lt||{});function Do(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===lt.Specific?i.idx:Do(i,{resolveItems:()=>e.virtual.options,resolveActiveIndex:()=>{var A,N;return(N=(A=e.activeOptionIndex)!=null?A:e.virtual.options.findIndex(D=>!e.virtual.disabled(D)))!=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===lt.Specific?i.idx:Do(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})}}},_o=n.createContext(null);_o.displayName="ComboboxActionsContext";function dr(e){let i=n.useContext(_o);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=Ve({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 ke(()=>{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 Bo=n.createContext(null);Bo.displayName="ComboboxDataContext";function Tn(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,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:A=!1,virtual:N=null,...D}=e,F=!1,$=null,[H=I?[]:void 0,z]=Qn(o,c,s),[K,ue]=n.useReducer(jd,{dataRef:n.createRef(),comboboxState:w?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),le=n.useRef(!1),ve=n.useRef({static:!1,hold:!1}),Ue=n.useRef(null),Be=n.useRef(null),ge=n.useRef(null),xe=n.useRef(null),Ee=J(typeof h=="string"?(re,ye)=>{let et=h;return(re==null?void 0:re[et])===(ye==null?void 0:ye[et])}:h??((re,ye)=>re===ye)),Ae=J(re=>K.options.findIndex(ye=>Ee(ye.dataRef.current.value,re))),at=n.useCallback(re=>ct(Z.mode,{1:()=>H.some(ye=>Ee(ye,re)),0:()=>Ee(H,re)}),[H]),pt=J(re=>K.activeOptionIndex===Ae(re)),Z=n.useMemo(()=>({...K,immediate:F,optionsPropsRef:ve,labelRef:Ue,inputRef:Be,buttonRef:ge,optionsRef:xe,value:H,defaultValue:s,disabled:g,mode:I?1:0,virtual:K.virtual,get activeOptionIndex(){if(le.current&&K.activeOptionIndex===null&&K.options.length>0){let re=K.options.findIndex(ye=>!ye.dataRef.current.disabled);if(re!==-1)return re}return K.activeOptionIndex},calculateIndex:Ae,compare:Ee,isSelected:at,isActive:pt,nullable:O,__demoMode:w}),[H,s,g,I,O,w,K,$]);ke(()=>{},[$,void 0]),ke(()=>{K.dataRef.current=Z},[Z]),Rn([Z.buttonRef,Z.inputRef,Z.optionsRef],()=>Me.closeCombobox(),Z.comboboxState===0);let ut=n.useMemo(()=>{var re,ye,et;return{open:Z.comboboxState===0,disabled:g,activeIndex:Z.activeOptionIndex,activeOption:Z.activeOptionIndex===null?null:Z.virtual?Z.virtual.options[(re=Z.activeOptionIndex)!=null?re:0]:(et=(ye=Z.options[Z.activeOptionIndex])==null?void 0:ye.dataRef.current.value)!=null?et:null,value:H}},[Z,g,H]),$e=J(()=>{if(Z.activeOptionIndex!==null){if(Z.virtual)Rt(Z.virtual.options[Z.activeOptionIndex]);else{let{dataRef:re}=Z.options[Z.activeOptionIndex];Rt(re.current.value)}Me.goToOption(lt.Specific,Z.activeOptionIndex)}}),gt=J(()=>{ue({type:0}),le.current=!0}),se=J(()=>{ue({type:1}),le.current=!1}),ze=J((re,ye,et)=>(le.current=!1,re===lt.Specific?ue({type:2,focus:lt.Specific,idx:ye,trigger:et}):ue({type:2,focus:re,trigger:et}))),it=J((re,ye)=>(ue({type:3,payload:{id:re,dataRef:ye}}),()=>{Z.isActive(ye.current.value)&&(le.current=!0),ue({type:4,id:re})})),Tt=J(re=>(ue({type:5,id:re}),()=>ue({type:5,id:null}))),Rt=J(re=>ct(Z.mode,{0(){return z==null?void 0:z(re)},1(){let ye=Z.value.slice(),et=ye.findIndex(Bt=>Ee(Bt,re));return et===-1?ye.push(re):ye.splice(et,1),z==null?void 0:z(ye)}})),wt=J(re=>{ue({type:6,trigger:re})}),Me=n.useMemo(()=>({onChange:Rt,registerOption:it,registerLabel:Tt,goToOption:ze,closeCombobox:se,openCombobox:gt,setActivationTrigger:wt,selectActiveOption:$e}),[]),St=i===null?{}:{ref:i},Ke=n.useRef(null),Lt=Zt();return n.useEffect(()=>{Ke.current&&s!==void 0&&Lt.addEventListener(Ke.current,"reset",()=>{z==null||z(s)})},[Ke,z]),n.createElement(_o.Provider,{value:Me},n.createElement(Bo.Provider,{value:Z},n.createElement(Ao,{value:ct(Z.comboboxState,{0:jt.Open,1:jt.Closed})},p!=null&&H!=null&&ii({[p]:H}).map(([re,ye],et)=>n.createElement(ur,{features:ln.Hidden,ref:et===0?Bt=>{var Ln;Ke.current=(Ln=Bt==null?void 0:Bt.closest("form"))!=null?Ln:null}:void 0,...vt({key:re,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:d,disabled:g,name:re,value:ye})})),pe({ourProps:St,theirProps:D,slot:ut,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",...A}=e,N=Tn("Combobox.Input"),D=dr("Combobox.Input"),F=xt(N.inputRef,i),$=Xt(N.inputRef),H=n.useRef(!1),z=Zt(),K=J(()=>{D.onChange(null),N.optionsRef.current&&(N.optionsRef.current.scrollTop=0),D.goToOption(lt.Nothing)}),ue=function(){var Z;return typeof O=="function"&&N.value!==void 0?(Z=O(N.value))!=null?Z:"":typeof N.value=="string"?N.value:""}();W(([Z,ut],[$e,gt])=>{if(H.current)return;let se=N.inputRef.current;se&&((gt===0&&ut===1||Z!==$e)&&(se.value=Z),requestAnimationFrame(()=>{if(H.current||!se||($==null?void 0:$.activeElement)!==se)return;let{selectionStart:ze,selectionEnd:it}=se;Math.abs((it??0)-(ze??0))===0&&ze===0&&se.setSelectionRange(se.value.length,se.value.length)}))},[ue,N.comboboxState,$]),W(([Z],[ut])=>{if(Z===0&&ut===1){if(H.current)return;let $e=N.inputRef.current;if(!$e)return;let gt=$e.value,{selectionStart:se,selectionEnd:ze,selectionDirection:it}=$e;$e.value="",$e.value=gt,it!==null?$e.setSelectionRange(se,ze,it):$e.setSelectionRange(se,ze)}},[N.comboboxState]);let le=n.useRef(!1),ve=J(()=>{le.current=!0}),Ue=J(()=>{z.nextFrame(()=>{le.current=!1})}),Be=J(Z=>{switch(H.current=!0,Z.key){case qe.Enter:if(H.current=!1,N.comboboxState!==0||le.current)return;if(Z.preventDefault(),Z.stopPropagation(),N.activeOptionIndex===null){D.closeCombobox();return}D.selectActiveOption(),N.mode===0&&D.closeCombobox();break;case qe.ArrowDown:return H.current=!1,Z.preventDefault(),Z.stopPropagation(),ct(N.comboboxState,{0:()=>D.goToOption(lt.Next),1:()=>D.openCombobox()});case qe.ArrowUp:return H.current=!1,Z.preventDefault(),Z.stopPropagation(),ct(N.comboboxState,{0:()=>D.goToOption(lt.Previous),1:()=>{D.openCombobox(),z.nextFrame(()=>{N.value||D.goToOption(lt.Last)})}});case qe.Home:if(Z.shiftKey)break;return H.current=!1,Z.preventDefault(),Z.stopPropagation(),D.goToOption(lt.First);case qe.PageUp:return H.current=!1,Z.preventDefault(),Z.stopPropagation(),D.goToOption(lt.First);case qe.End:if(Z.shiftKey)break;return H.current=!1,Z.preventDefault(),Z.stopPropagation(),D.goToOption(lt.Last);case qe.PageDown:return H.current=!1,Z.preventDefault(),Z.stopPropagation(),D.goToOption(lt.Last);case qe.Escape:return H.current=!1,N.comboboxState!==0?void 0:(Z.preventDefault(),N.optionsRef.current&&!N.optionsPropsRef.current.static&&Z.stopPropagation(),N.nullable&&N.mode===0&&N.value===null&&K(),D.closeCombobox());case qe.Tab:if(H.current=!1,N.comboboxState!==0)return;N.mode===0&&N.activationTrigger!==1&&D.selectActiveOption(),D.closeCombobox();break}}),ge=J(Z=>{w==null||w(Z),N.nullable&&N.mode===0&&Z.target.value===""&&K(),D.openCombobox()}),xe=J(Z=>{var ut,$e,gt;let se=(ut=Z.relatedTarget)!=null?ut:Jt.find(ze=>ze!==Z.currentTarget);if(H.current=!1,!(($e=N.optionsRef.current)!=null&&$e.contains(se))&&!((gt=N.buttonRef.current)!=null&>.contains(se))&&N.comboboxState===0)return Z.preventDefault(),N.mode===0&&(N.nullable&&N.value===null?K():N.activationTrigger!==1&&D.selectActiveOption()),D.closeCombobox()}),Ee=J(Z=>{var ut,$e,gt;let se=(ut=Z.relatedTarget)!=null?ut:Jt.find(ze=>ze!==Z.currentTarget);($e=N.buttonRef.current)!=null&&$e.contains(se)||(gt=N.optionsRef.current)!=null&>.contains(se)||N.disabled||N.immediate&&N.comboboxState!==0&&(D.openCombobox(),z.nextFrame(()=>{D.setActivationTrigger(1)}))}),Ae=mn(()=>{if(N.labelId)return[N.labelId].join(" ")},[N.labelId]),at=n.useMemo(()=>({open:N.comboboxState===0,disabled:N.disabled}),[N]),pt={ref:F,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(Z=>{var ut;return!((ut=N.virtual)!=null&&ut.disabled(Z.dataRef.current.value))&&N.compare(Z.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":Ae,"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:ve,onCompositionEnd:Ue,onKeyDown:Be,onChange:ge,onFocus:Ee,onBlur:xe};return pe({ourProps:pt,theirProps:A,slot:at,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=Zt(),O=J(F=>{switch(F.key){case qe.ArrowDown:return F.preventDefault(),F.stopPropagation(),s.comboboxState===1&&c.openCombobox(),w.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(),w.nextFrame(()=>{s.value||c.goToOption(lt.Last)})),w.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(),w.nextFrame(()=>{var $;return($=s.inputRef.current)==null?void 0:$.focus({preventScroll:!0})}));default:return}}),I=J(F=>{if(Ur(F.currentTarget))return F.preventDefault();s.comboboxState===0?c.closeCombobox():(F.preventDefault(),c.openCombobox()),w.nextFrame(()=>{var $;return($=s.inputRef.current)==null?void 0:$.focus({preventScroll:!0})})}),A=mn(()=>{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: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":A,disabled:s.disabled,onClick:I,onKeyDown:O};return pe({ourProps:D,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);ke(()=>p.registerLabel(s),[s]);let g=J(()=>{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=fe.RenderStrategy|fe.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;ke(()=>{var N;p.optionsPropsRef.current.static=(N=e.static)!=null?N:!1},[p.optionsPropsRef,e.static]),ke(()=>{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=mn(()=>{var N,D;return(D=p.labelId)!=null?D:(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]),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(Cd,null,d.children)}),pe({ourProps:A,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,A=w.isSelected(p),N=n.useRef(null),D=Pt({disabled:d,value:p,domRef:N,order:h}),F=n.useContext(ui),$=xt(i,N,F?F.measureElement:null),H=J(()=>O.onChange(p));ke(()=>O.registerOption(c,D),[D,c]);let z=n.useRef(!(w.virtual||w.__demoMode));ke(()=>{if(!w.virtual||!w.__demoMode)return;let xe=$t();return xe.requestAnimationFrame(()=>{z.current=!0}),xe.dispose},[w.virtual,w.__demoMode]),ke(()=>{if(!z.current||w.comboboxState!==0||!I||w.activationTrigger===0)return;let xe=$t();return xe.requestAnimationFrame(()=>{var Ee,Ae;(Ae=(Ee=N.current)==null?void 0:Ee.scrollIntoView)==null||Ae.call(Ee,{block:"nearest"})}),xe.dispose},[N,I,w.comboboxState,w.activationTrigger,w.activeOptionIndex]);let K=J(xe=>{var Ee;if(d||(Ee=w.virtual)!=null&&Ee.disabled(p))return xe.preventDefault();H(),_r()||requestAnimationFrame(()=>{var Ae;return(Ae=w.inputRef.current)==null?void 0:Ae.focus({preventScroll:!0})}),w.mode===0&&requestAnimationFrame(()=>O.closeCombobox())}),ue=J(()=>{var xe;if(d||(xe=w.virtual)!=null&&xe.disabled(p))return O.goToOption(lt.Nothing);let Ee=w.calculateIndex(p);O.goToOption(lt.Specific,Ee)}),le=Hr(),ve=J(xe=>le.update(xe)),Ue=J(xe=>{var Ee;if(!le.wasMoved(xe)||d||(Ee=w.virtual)!=null&&Ee.disabled(p)||I)return;let Ae=w.calculateIndex(p);O.goToOption(lt.Specific,Ae,0)}),Be=J(xe=>{var Ee;le.wasMoved(xe)&&(d||(Ee=w.virtual)!=null&&Ee.disabled(p)||I&&(w.optionsPropsRef.current.hold||O.goToOption(lt.Nothing)))}),ge=n.useMemo(()=>({active:I,selected:A,disabled:d}),[I,A,d]);return pe({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:K,onFocus:ue,onPointerEnter:ve,onMouseEnter:ve,onPointerMove:Ue,onMouseMove:Ue,onPointerLeave:Be,onMouseLeave:Be},theirProps:g,slot:ge,defaultTag:Dd,name:"Combobox.Option"})}let _d=be(Od),Bd=be(Pd),zd=be(Id),Wd=be(Md),Hd=be(Ad),Ud=be($d),sn=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 ke(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function di(e){let i=J(e),o=n.useRef(!1);n.useEffect(()=>(o.current=!1,()=>{o.current=!0,rn(()=>{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 Br("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=Xt(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=J(F=>{let $=o.current;$&&(H=>H())(()=>{ct(O.current,{[pr.Forwards]:()=>{on($,Ht.First,{skipElements:[F.relatedTarget]})},[pr.Backwards]:()=>{on($,Ht.Last,{skipElements:[F.relatedTarget]})}})})}),A=Zt(),N=n.useRef(!1),D={ref:s,onKeyDown(F){F.key=="Tab"&&(N.current=!0,A.requestAnimationFrame(()=>{N.current=!1}))},onBlur(F){let $=fi(d);o.current instanceof HTMLElement&&$.add(o.current);let H=F.relatedTarget;H instanceof HTMLElement&&H.dataset.headlessuiFocusGuard!=="true"&&(mi($,H)||(N.current?on(o.current,ct(O.current,{[pr.Forwards]:()=>Ht.Next,[pr.Backwards]:()=>Ht.Previous})|Ht.WrapAround,{relativeTo:F.target}):F.target instanceof HTMLElement&&Kt(F.target)))}};return n.createElement(n.Fragment,null,!!(p&4)&&n.createElement(ur,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:I,features:ln.Focusable}),pe({ourProps:D,theirProps:h,defaultTag:Zd,name:"FocusTrap"}),!!(p&4)&&n.createElement(ur,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:I,features:ln.Focusable}))}let Gd=be(Yd),mr=Object.assign(Gd,{features:pi});function qd(e=!0){let i=n.useRef(Jt.slice());return W(([o],[s])=>{s===!0&&o===!1&&rn(()=>{i.current.splice(0)}),s===!1&&o===!0&&(i.current=Jt.slice())},[e,Jt,i]),J(()=>{var o;return(o=i.current.find(s=>s!=null&&s.isConnected))!=null?o:null})}function Kd({ownerDocument:e},i){let o=qd(i);W(()=>{i||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&Kt(o())},[i]),di(()=>{i&&Kt(o())})}function Xd({ownerDocument:e,container:i,initialFocus:o},s){let c=n.useRef(null),d=fr();return W(()=>{if(!s)return;let p=i.current;p&&rn(()=>{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?Kt(o.current):on(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,Kt(w)):(p.preventDefault(),p.stopPropagation(),Kt(g)):Kt(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 zo(e){return n.createElement(hi.Provider,{value:e.force},e.children)}function ef(e){let i=Qd(),o=n.useContext(vi),s=Xt(e),[c,d]=n.useState(()=>{if(!i&&o!==null||Ze.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(Ro(O=>{s.current=O}),i),d=Xt(s),p=ef(s),[h]=n.useState(()=>{var O;return Ze.isServer?null:(O=d==null?void 0:d.createElement("div"))!=null?O:null}),g=n.useContext(Wo),w=hn();return ke(()=>{!p||!h||p.contains(h)||(h.setAttribute("data-headlessui-portal",""),p.appendChild(h))},[p,h]),ke(()=>{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 Wo=n.createContext(null);function lf(){let e=n.useContext(Wo),i=n.useRef([]),o=J(d=>(i.current.push(d),e&&e.register(d),()=>s(d))),s=J(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(Wo.Provider,{value:c},d)},[c])]}let sf=be(nf),af=be(of),Ho=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,Uo(c)&&d({inst:c})},[e,s,i]),ff(()=>(Uo(c)&&d({inst:c}),e(()=>{Uo(c)&&d({inst:c})})),[e]),mf(s),s}function Uo(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 ke(()=>{if(!(!e||!i))return On.dispatch("PUSH",e,o),()=>On.dispatch("POP",e,o)},[i,e]),d}let Vo=new Map,hr=new Map;function gi(e,i=!0){ke(()=>{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=Vo.get(s);g&&(g["aria-hidden"]===null?s.removeAttribute("aria-hidden"):s.setAttribute("aria-hidden",g["aria-hidden"]),s.inert=g.inert,Vo.delete(s))}let d=(o=hr.get(s))!=null?o:0;return hr.set(s,d+1),d!==0||(Vo.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=Xt(c),p=J(()=>{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(A=>I.contains(A))||O.push(I));return O});return{resolveContainers:p,contains:J(h=>p().some(g=>g.contains(h))),mainTreeNodeRef:c,MainTreeNode:n.useMemo(()=>function(){return o!=null?null:n.createElement(ur,{features:ln.Hidden,ref:c})},[c,o])}}let Zo=n.createContext(()=>{});Zo.displayName="StackContext";var Yo=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Yo||{});function If(){return n.useContext(Zo)}function kf({children:e,onUpdate:i,type:o,element:s,enabled:c}){let d=If(),p=J((...h)=>{i==null||i(...h),d(...h)});return ke(()=>{let h=c===void 0||c===!0;return h&&p(0,o,s),()=>{h&&p(1,o,s)}},[p,o,s,c]),n.createElement(Zo.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=J(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);ke(()=>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}}},Vr=n.createContext(null);Vr.displayName="DialogContext";function vr(e){let i=n.useContext(Vr);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=fe.RenderStrategy|fe.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),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=cr();c===void 0&&N!==null&&(c=(N&jt.Open)===jt.Open);let D=n.useRef(null),F=xt(D,i),$=Xt(D),H=e.hasOwnProperty("open")||N!==null,z=e.hasOwnProperty("onClose");if(!H&&!z)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!H)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 K=c?0:1,[ue,le]=n.useReducer($f,{titleId:null,descriptionId:null,panelRef:n.createRef()}),ve=J(()=>d(!1)),Ue=J(re=>le({type:0,id:re})),Be=hn()?g?!1:K===0:!1,ge=O>1,xe=n.useContext(Vr)!==null,[Ee,Ae]=lf(),at={get current(){var re;return(re=ue.panelRef.current)!=null?re:D.current}},{resolveContainers:pt,mainTreeNodeRef:Z,MainTreeNode:ut}=Nf({portals:Ee,defaultContainers:[at]}),$e=ge?"parent":"leaf",gt=N!==null?(N&jt.Closing)===jt.Closing:!1,se=xe||gt?!1:Be,ze=n.useCallback(()=>{var re,ye;return(ye=Array.from((re=$==null?void 0:$.querySelectorAll("body > *"))!=null?re:[]).find(et=>et.id==="headlessui-portal-root"?!1:et.contains(Z.current)&&et instanceof HTMLElement))!=null?ye:null},[Z]);gi(ze,se);let it=ge?!0:Be,Tt=n.useCallback(()=>{var re,ye;return(ye=Array.from((re=$==null?void 0:$.querySelectorAll("[data-headlessui-portal]"))!=null?re:[]).find(et=>et.contains(Z.current)&&et instanceof HTMLElement))!=null?ye:null},[Z]);gi(Tt,it),Rn(pt,re=>{re.preventDefault(),ve()},!(!Be||ge));let Rt=!(ge||K!==0);ci($==null?void 0:$.defaultView,"keydown",re=>{Rt&&(re.defaultPrevented||re.key===qe.Escape&&(re.preventDefault(),re.stopPropagation(),ve()))}),Df($,!(gt||K!==0||xe),pt),n.useEffect(()=>{if(K!==0||!D.current)return;let re=new ResizeObserver(ye=>{for(let et of ye){let Bt=et.target.getBoundingClientRect();Bt.x===0&&Bt.y===0&&Bt.width===0&&Bt.height===0&&ve()}});return re.observe(D.current),()=>re.disconnect()},[K,D,ve]);let[wt,Me]=yi(),St=n.useMemo(()=>[{dialogState:K,close:ve,setTitleId:Ue},ue],[K,ue,ve,Ue]),Ke=n.useMemo(()=>({open:K===0}),[K]),Lt={ref:F,id:s,role:h,"aria-modal":K===0?!0:void 0,"aria-labelledby":ue.titleId,"aria-describedby":wt};return n.createElement(kf,{type:"Dialog",enabled:K===0,element:D,onUpdate:J((re,ye)=>{ye==="Dialog"&&ct(re,{[Yo.Add]:()=>I(et=>et+1),[Yo.Remove]:()=>I(et=>et-1)})})},n.createElement(zo,{force:!0},n.createElement(Ho,null,n.createElement(Vr.Provider,{value:St},n.createElement(Ho.Group,{target:D},n.createElement(zo,{force:!1},n.createElement(Me,{slot:Ke,name:"Dialog.Description"},n.createElement(mr,{initialFocus:p,containers:pt,features:Be?ct($e,{parent:mr.features.RestoreFocus,leaf:mr.features.All&~mr.features.FocusLock}):mr.features.None},n.createElement(Ae,null,pe({ourProps:Lt,theirProps:w,slot:Ke,defaultTag:_f,features:Bf,visible:K===0,name:"Dialog"}))))))))),n.createElement(ut,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=J(O=>{if(O.target===O.currentTarget){if(Ur(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(zo,{force:!0},n.createElement(Ho,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=J(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 J(()=>{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 Go(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=Go(e),c=Do(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=Go(e,s=>[...s,{id:i.id,dataRef:i.dataRef}]);return{...e,...o}},6:(e,i)=>{let o=Go(e,s=>{let c=s.findIndex(d=>d.id===i.id);return c!==-1&&s.splice(c,1),s});return{...e,...o,activationTrigger:1}}},qo=n.createContext(null);qo.displayName="MenuContext";function Zr(e){let i=n.useContext(qo);if(i===null){let o=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,Zr),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,D)=>{var F;g({type:1}),lr(D,or.Loose)||(N.preventDefault(),(F=h.current)==null||F.focus())},d===0);let O=J(()=>{g({type:1})}),I=n.useMemo(()=>({open:d===0,close:O}),[d,O]),A={ref:w};return n.createElement(qo.Provider,{value:c},n.createElement(Ao,{value:ct(d,{0:jt.Open,1:jt.Closed})},pe({ourProps:A,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]=Zr("Menu.Button"),g=xt(p.buttonRef,i),w=Zt(),O=J(F=>{switch(F.key){case qe.Space:case qe.Enter:case qe.ArrowDown:F.preventDefault(),F.stopPropagation(),h({type:0}),w.nextFrame(()=>h({type:2,focus:lt.First}));break;case qe.ArrowUp:F.preventDefault(),F.stopPropagation(),h({type:0}),w.nextFrame(()=>h({type:2,focus:lt.Last}));break}}),I=J(F=>{switch(F.key){case qe.Space:F.preventDefault();break}}),A=J(F=>{if(Ur(F.currentTarget))return F.preventDefault();e.disabled||(p.menuState===0?(h({type:1}),w.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: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:A};return pe({ourProps:D,theirProps:d,slot:N,defaultTag:cp,name:"Menu.Button"})}let fp="div",pp=fe.RenderStrategy|fe.Static;function mp(e,i){var o,s;let c=Ft(),{id:d=`headlessui-menu-items-${c}`,...p}=e,[h,g]=Zr("Menu.Items"),w=xt(h.itemsRef,i),O=Xt(h.itemsRef),I=Zt(),A=cr(),N=A!==null?(A&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 D=J(z=>{var K,ue;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:le}=h.items[h.activeItemIndex];(ue=(K=le.current)==null?void 0:K.domRef.current)==null||ue.click()}Dr(h.buttonRef.current);break;case qe.ArrowDown:return z.preventDefault(),z.stopPropagation(),g({type:2,focus:lt.Next});case qe.ArrowUp:return z.preventDefault(),z.stopPropagation(),g({type:2,focus:lt.Previous});case qe.Home:case qe.PageUp:return z.preventDefault(),z.stopPropagation(),g({type:2,focus:lt.First});case qe.End:case qe.PageDown:return z.preventDefault(),z.stopPropagation(),g({type:2,focus:lt.Last});case qe.Escape:z.preventDefault(),z.stopPropagation(),g({type:1}),$t().nextFrame(()=>{var le;return(le=h.buttonRef.current)==null?void 0:le.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}}),F=J(z=>{switch(z.key){case qe.Space:z.preventDefault();break}}),$=n.useMemo(()=>({open:h.menuState===0}),[h]),H={"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:D,onKeyUp:F,role:"menu",tabIndex:0,ref:w};return pe({ourProps:H,theirProps:p,slot:$,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]=Zr("Menu.Item"),g=p.activeItemIndex!==null?p.items[p.activeItemIndex].id===s:!1,w=n.useRef(null),O=xt(i,w);ke(()=>{if(p.__demoMode||p.menuState!==0||!g||p.activationTrigger===0)return;let le=$t();return le.requestAnimationFrame(()=>{var ve,Ue;(Ue=(ve=w.current)==null?void 0:ve.scrollIntoView)==null||Ue.call(ve,{block:"nearest"})}),le.dispose},[p.__demoMode,w,g,p.menuState,p.activationTrigger,p.activeItemIndex]);let I=np(w),A=n.useRef({disabled:c,domRef:w,get textValue(){return I()}});ke(()=>{A.current.disabled=c},[A,c]),ke(()=>(h({type:5,id:s,dataRef:A}),()=>h({type:6,id:s})),[A,s]);let N=J(()=>{h({type:1})}),D=J(le=>{if(c)return le.preventDefault();h({type:1}),Dr(p.buttonRef.current)}),F=J(()=>{if(c)return h({type:2,focus:lt.Nothing});h({type:2,focus:lt.Specific,id:s})}),$=Hr(),H=J(le=>$.update(le)),z=J(le=>{$.wasMoved(le)&&(c||g||h({type:2,focus:lt.Specific,id:s,trigger:0}))}),K=J(le=>{$.wasMoved(le)&&(c||g&&h({type:2,focus:lt.Nothing}))}),ue=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:D,onFocus:F,onPointerEnter:H,onMouseEnter:H,onPointerMove:z,onMouseMove:z,onPointerLeave:K,onMouseLeave:K},theirProps:d,slot:ue,defaultTag:hp,name:"Menu.Item"})}let gp=be(up),bp=be(dp),xp=be(mp),yp=be(vp),Yr=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=J(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);ke(()=>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 Ko=n.createContext(null);Ko.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(Ko.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,...A}=e,N=n.useContext(Ko),D=n.useRef(null),F=xt(D,i,N===null?null:N.setSwitch),[$,H]=Qn(d,h,p),z=J(()=>H==null?void 0:H(!$)),K=J(ge=>{if(Ur(ge.currentTarget))return ge.preventDefault();ge.preventDefault(),z()}),ue=J(ge=>{ge.key===qe.Space?(ge.preventDefault(),z()):ge.key===qe.Enter&&bd(ge.currentTarget)}),le=J(ge=>ge.preventDefault()),ve=n.useMemo(()=>({checked:$}),[$]),Ue={id:c,ref:F,role:"switch",type:sr(e,D),tabIndex:e.tabIndex===-1?0:(o=e.tabIndex)!=null?o:0,"aria-checked":$,"aria-labelledby":N==null?void 0:N.labelledby,"aria-describedby":N==null?void 0:N.describedby,disabled:g,onClick:K,onKeyUp:ue,onKeyPress:le},Be=Zt();return n.useEffect(()=>{var ge;let xe=(ge=D.current)==null?void 0:ge.closest("form");xe&&p!==void 0&&Be.addEventListener(xe,"reset",()=>{H(p)})},[D,H]),n.createElement(n.Fragment,null,w!=null&&$&&n.createElement(ur,{features:ln.Hidden,...vt({as:"input",type:"checkbox",hidden:!0,readOnly:!0,disabled:g,form:I,checked:$,name:w,value:O})}),pe({ourProps:Ue,theirProps:A,slot:ve,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 Xo(e,...i){e&&i.length>0&&e.classList.add(...i)}function Jo(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 Jo(e,...i.base,...i.enter,...i.enterTo,...i.enterFrom,...i.leave,...i.leaveFrom,...i.leaveTo,...i.entered),Xo(e,...i.base,...h,...w),d.nextFrame(()=>{Jo(e,...i.base,...h,...w),Xo(e,...i.base,...h,...g),Lp(e,()=>(Jo(e,...i.base,...h),Xo(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=Zt(),g=Pt(o);ke(()=>{e&&(g.current="enter")},[e]),ke(()=>{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 Gr=n.createContext(null);Gr.displayName="TransitionContext";var $p=(e=>(e.Visible="visible",e.Hidden="hidden",e))($p||{});function _p(){let e=n.useContext(Gr);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(qr);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let qr=n.createContext(null);qr.displayName="NestingContext";function Kr(e){return"children"in e?Kr(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=Zt(),p=J((N,D=Pe.Hidden)=>{let F=s.current.findIndex(({el:$})=>$===N);F!==-1&&(ct(D,{[Pe.Unmount](){s.current.splice(F,1)},[Pe.Hidden](){s.current[F].state="hidden"}}),d.microTask(()=>{var $;!Kr(s)&&c.current&&(($=o.current)==null||$.call(o))}))}),h=J(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,Pe.Unmount)}),g=n.useRef([]),w=n.useRef(Promise.resolve()),O=n.useRef({enter:[],leave:[],idle:[]}),I=J((N,D,F)=>{g.current.splice(0),i&&(i.chains.current[D]=i.chains.current[D].filter(([$])=>$!==N)),i==null||i.chains.current[D].push([N,new Promise($=>{g.current.push($)})]),i==null||i.chains.current[D].push([N,new Promise($=>{Promise.all(O.current[D].map(([H,z])=>z)).then(()=>$())})]),D==="enter"?w.current=w.current.then(()=>i==null?void 0:i.wait.current).then(()=>F(D)):F(D)}),A=J((N,D,F)=>{Promise.all(O.current[D].splice(0).map(([$,H])=>H)).then(()=>{var $;($=g.current.shift())==null||$()}).then(()=>F(D))});return n.useMemo(()=>({children:s,register:h,unregister:p,onStart:I,onStop:A,wait:w,chains:O}),[h,p,s,I,A,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=fe.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:A,leaveFrom:N,leaveTo:D,...F}=e,$=n.useRef(null),H=xt($,i),z=(o=F.unmount)==null||o?Pe.Unmount:Pe.Hidden,{show:K,appear:ue,initial:le}=_p(),[ve,Ue]=n.useState(K?"visible":"hidden"),Be=Bp(),{register:ge,unregister:xe}=Be;n.useEffect(()=>ge($),[ge,$]),n.useEffect(()=>{if(z===Pe.Hidden&&$.current){if(K&&ve!=="visible"){Ue("visible");return}return ct(ve,{hidden:()=>xe($),visible:()=>ge($)})}},[ve,$,ge,xe,K,z]);let Ee=Pt({base:bn(F.className),enter:bn(g),enterFrom:bn(w),enterTo:bn(O),entered:bn(I),leave:bn(A),leaveFrom:bn(N),leaveTo:bn(D)}),Ae=Hp({beforeEnter:c,afterEnter:d,beforeLeave:p,afterLeave:h}),at=hn();n.useEffect(()=>{if(at&&ve==="visible"&&$.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[$,ve,at]);let pt=le&&!ue,Z=ue&&K&&le,ut=!at||pt?"idle":K?"enter":"leave",$e=Tp(0),gt=J(wt=>ct(wt,{enter:()=>{$e.addFlag(jt.Opening),Ae.current.beforeEnter()},leave:()=>{$e.addFlag(jt.Closing),Ae.current.beforeLeave()},idle:()=>{}})),se=J(wt=>ct(wt,{enter:()=>{$e.removeFlag(jt.Opening),Ae.current.afterEnter()},leave:()=>{$e.removeFlag(jt.Closing),Ae.current.afterLeave()},idle:()=>{}})),ze=Oi(()=>{Ue("hidden"),xe($)},Be),it=n.useRef(!1);Dp({immediate:Z,container:$,classes:Ee,direction:ut,onStart:Pt(wt=>{it.current=!0,ze.onStart($,wt,gt)}),onStop:Pt(wt=>{it.current=!1,ze.onStop($,wt,se),wt==="leave"&&!Kr(ze)&&(Ue("hidden"),xe($))})});let Tt=F,Rt={ref:H};return Z?Tt={...Tt,className:X(F.className,...Ee.current.enter,...Ee.current.enterFrom)}:it.current&&(Tt.className=X(F.className,(s=$.current)==null?void 0:s.className),Tt.className===""&&delete Tt.className),n.createElement(qr.Provider,{value:ze},n.createElement(Ao,{value:ct(ve,{visible:jt.Open,hidden:jt.Closed})|$e.flags},pe({ourProps:Rt,theirProps:Tt,defaultTag:Up,features:Ii,visible:ve==="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")}),[A,N]=n.useState(!0),D=n.useRef([o]);ke(()=>{A!==!1&&D.current[D.current.length-1]!==o&&(D.current.push(o),N(!1))},[D,o]);let F=n.useMemo(()=>({show:o,appear:s,initial:A}),[o,s,A]);n.useEffect(()=>{if(o)O("visible");else if(!Kr(I))O("hidden");else{let K=p.current;if(!K)return;let ue=K.getBoundingClientRect();ue.x===0&&ue.y===0&&ue.width===0&&ue.height===0&&O("hidden")}},[o,I]);let $={unmount:c},H=J(()=>{var K;A&&N(!1),(K=e.beforeEnter)==null||K.call(e)}),z=J(()=>{var K;A&&N(!1),(K=e.beforeLeave)==null||K.call(e)});return n.createElement(qr.Provider,{value:I},n.createElement(Gr.Provider,{value:F},pe({ourProps:{...$,as:n.Fragment,children:n.createElement(ki,{ref:h,...$,...d,beforeEnter:H,beforeLeave:z})},theirProps:{},defaultTag:n.Fragment,features:Ii,visible:w==="visible",name:"Transition"})))}function Yp(e,i){let o=n.useContext(Gr)!==null,s=cr()!==null;return n.createElement(n.Fragment,null,!o&&s?n.createElement(Qo,{ref:i,...e}):n.createElement(ki,{ref:i,...e}))}let Qo=be(Zp),ki=be(Vp),Gp=be(Yp),Nn=Object.assign(Qo,{Child:Gp,Root:Qo});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 L=O.props,N=typeof(L==null?void 0:L.className)=="function"?(...F)=>X(L==null?void 0:L.className(...F),g.className):X(L==null?void 0:L.className,g.className),A=N?{className:N}:{};return n.cloneElement(O,Object.assign({},Mt(O.props,vt(Dt(g,["ref"]))),I,w,{ref:c(O.ref,w.ref)},A))}return n.createElement(d,Object.assign({},Dt(g,["ref"]),d!==n.Fragment&&w,d!==n.Fragment&&I),O)}function Le(...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 Dt(e,i=[]){let o=Object.assign({},e);for(let s of i)s in o&&delete o[s];return o}let gn="div";var ln=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(ln||{});function Yt(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(Yt),Lo=n.createContext(null);Lo.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(Lo)}function Ao({value:e,children:i}){return n.createElement(Lo.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 Jt=[];hd(()=>{function e(i){i.target instanceof HTMLElement&&i.target!==document.body&&Jt[0]!==i.target&&(Jt.unshift(i.target),Jt=Jt.filter(o=>o!=null&&o.isConnected),Jt.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 Ur(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 lt=(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))(lt||{});function Do(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===lt.Specific?i.idx:Do(i,{resolveItems:()=>e.virtual.options,resolveActiveIndex:()=>{var L,N;return(N=(L=e.activeOptionIndex)!=null?L:e.virtual.options.findIndex(A=>!e.virtual.disabled(A)))!=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===lt.Specific?i.idx:Do(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})}}},_o=n.createContext(null);_o.displayName="ComboboxActionsContext";function dr(e){let i=n.useContext(_o);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=Ve({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 ke(()=>{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 Bo=n.createContext(null);Bo.displayName="ComboboxDataContext";function Tn(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,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:L=!1,virtual:N=null,...A}=e,F=!1,D=null,[H=I?[]:void 0,z]=Qn(o,c,s),[K,ue]=n.useReducer(jd,{dataRef:n.createRef(),comboboxState:w?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),le=n.useRef(!1),ve=n.useRef({static:!1,hold:!1}),Ue=n.useRef(null),Be=n.useRef(null),ge=n.useRef(null),xe=n.useRef(null),Ee=J(typeof h=="string"?(re,ye)=>{let et=h;return(re==null?void 0:re[et])===(ye==null?void 0:ye[et])}:h??((re,ye)=>re===ye)),Ae=J(re=>K.options.findIndex(ye=>Ee(ye.dataRef.current.value,re))),at=n.useCallback(re=>ct(Z.mode,{1:()=>H.some(ye=>Ee(ye,re)),0:()=>Ee(H,re)}),[H]),pt=J(re=>K.activeOptionIndex===Ae(re)),Z=n.useMemo(()=>({...K,immediate:F,optionsPropsRef:ve,labelRef:Ue,inputRef:Be,buttonRef:ge,optionsRef:xe,value:H,defaultValue:s,disabled:g,mode:I?1:0,virtual:K.virtual,get activeOptionIndex(){if(le.current&&K.activeOptionIndex===null&&K.options.length>0){let re=K.options.findIndex(ye=>!ye.dataRef.current.disabled);if(re!==-1)return re}return K.activeOptionIndex},calculateIndex:Ae,compare:Ee,isSelected:at,isActive:pt,nullable:O,__demoMode:w}),[H,s,g,I,O,w,K,D]);ke(()=>{},[D,void 0]),ke(()=>{K.dataRef.current=Z},[Z]),Rn([Z.buttonRef,Z.inputRef,Z.optionsRef],()=>Me.closeCombobox(),Z.comboboxState===0);let ut=n.useMemo(()=>{var re,ye,et;return{open:Z.comboboxState===0,disabled:g,activeIndex:Z.activeOptionIndex,activeOption:Z.activeOptionIndex===null?null:Z.virtual?Z.virtual.options[(re=Z.activeOptionIndex)!=null?re:0]:(et=(ye=Z.options[Z.activeOptionIndex])==null?void 0:ye.dataRef.current.value)!=null?et:null,value:H}},[Z,g,H]),$e=J(()=>{if(Z.activeOptionIndex!==null){if(Z.virtual)Rt(Z.virtual.options[Z.activeOptionIndex]);else{let{dataRef:re}=Z.options[Z.activeOptionIndex];Rt(re.current.value)}Me.goToOption(lt.Specific,Z.activeOptionIndex)}}),gt=J(()=>{ue({type:0}),le.current=!0}),se=J(()=>{ue({type:1}),le.current=!1}),ze=J((re,ye,et)=>(le.current=!1,re===lt.Specific?ue({type:2,focus:lt.Specific,idx:ye,trigger:et}):ue({type:2,focus:re,trigger:et}))),it=J((re,ye)=>(ue({type:3,payload:{id:re,dataRef:ye}}),()=>{Z.isActive(ye.current.value)&&(le.current=!0),ue({type:4,id:re})})),Tt=J(re=>(ue({type:5,id:re}),()=>ue({type:5,id:null}))),Rt=J(re=>ct(Z.mode,{0(){return z==null?void 0:z(re)},1(){let ye=Z.value.slice(),et=ye.findIndex(Bt=>Ee(Bt,re));return et===-1?ye.push(re):ye.splice(et,1),z==null?void 0:z(ye)}})),wt=J(re=>{ue({type:6,trigger:re})}),Me=n.useMemo(()=>({onChange:Rt,registerOption:it,registerLabel:Tt,goToOption:ze,closeCombobox:se,openCombobox:gt,setActivationTrigger:wt,selectActiveOption:$e}),[]),St=i===null?{}:{ref:i},Ke=n.useRef(null),Lt=Zt();return n.useEffect(()=>{Ke.current&&s!==void 0&&Lt.addEventListener(Ke.current,"reset",()=>{z==null||z(s)})},[Ke,z]),n.createElement(_o.Provider,{value:Me},n.createElement(Bo.Provider,{value:Z},n.createElement(Ao,{value:ct(Z.comboboxState,{0:jt.Open,1:jt.Closed})},p!=null&&H!=null&&ii({[p]:H}).map(([re,ye],et)=>n.createElement(ur,{features:ln.Hidden,ref:et===0?Bt=>{var Ln;Ke.current=(Ln=Bt==null?void 0:Bt.closest("form"))!=null?Ln:null}:void 0,...vt({key:re,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:d,disabled:g,name:re,value:ye})})),pe({ourProps:St,theirProps:A,slot:ut,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",...L}=e,N=Tn("Combobox.Input"),A=dr("Combobox.Input"),F=xt(N.inputRef,i),D=Xt(N.inputRef),H=n.useRef(!1),z=Zt(),K=J(()=>{A.onChange(null),N.optionsRef.current&&(N.optionsRef.current.scrollTop=0),A.goToOption(lt.Nothing)}),ue=function(){var Z;return typeof O=="function"&&N.value!==void 0?(Z=O(N.value))!=null?Z:"":typeof N.value=="string"?N.value:""}();W(([Z,ut],[$e,gt])=>{if(H.current)return;let se=N.inputRef.current;se&&((gt===0&&ut===1||Z!==$e)&&(se.value=Z),requestAnimationFrame(()=>{if(H.current||!se||(D==null?void 0:D.activeElement)!==se)return;let{selectionStart:ze,selectionEnd:it}=se;Math.abs((it??0)-(ze??0))===0&&ze===0&&se.setSelectionRange(se.value.length,se.value.length)}))},[ue,N.comboboxState,D]),W(([Z],[ut])=>{if(Z===0&&ut===1){if(H.current)return;let $e=N.inputRef.current;if(!$e)return;let gt=$e.value,{selectionStart:se,selectionEnd:ze,selectionDirection:it}=$e;$e.value="",$e.value=gt,it!==null?$e.setSelectionRange(se,ze,it):$e.setSelectionRange(se,ze)}},[N.comboboxState]);let le=n.useRef(!1),ve=J(()=>{le.current=!0}),Ue=J(()=>{z.nextFrame(()=>{le.current=!1})}),Be=J(Z=>{switch(H.current=!0,Z.key){case qe.Enter:if(H.current=!1,N.comboboxState!==0||le.current)return;if(Z.preventDefault(),Z.stopPropagation(),N.activeOptionIndex===null){A.closeCombobox();return}A.selectActiveOption(),N.mode===0&&A.closeCombobox();break;case qe.ArrowDown:return H.current=!1,Z.preventDefault(),Z.stopPropagation(),ct(N.comboboxState,{0:()=>A.goToOption(lt.Next),1:()=>A.openCombobox()});case qe.ArrowUp:return H.current=!1,Z.preventDefault(),Z.stopPropagation(),ct(N.comboboxState,{0:()=>A.goToOption(lt.Previous),1:()=>{A.openCombobox(),z.nextFrame(()=>{N.value||A.goToOption(lt.Last)})}});case qe.Home:if(Z.shiftKey)break;return H.current=!1,Z.preventDefault(),Z.stopPropagation(),A.goToOption(lt.First);case qe.PageUp:return H.current=!1,Z.preventDefault(),Z.stopPropagation(),A.goToOption(lt.First);case qe.End:if(Z.shiftKey)break;return H.current=!1,Z.preventDefault(),Z.stopPropagation(),A.goToOption(lt.Last);case qe.PageDown:return H.current=!1,Z.preventDefault(),Z.stopPropagation(),A.goToOption(lt.Last);case qe.Escape:return H.current=!1,N.comboboxState!==0?void 0:(Z.preventDefault(),N.optionsRef.current&&!N.optionsPropsRef.current.static&&Z.stopPropagation(),N.nullable&&N.mode===0&&N.value===null&&K(),A.closeCombobox());case qe.Tab:if(H.current=!1,N.comboboxState!==0)return;N.mode===0&&N.activationTrigger!==1&&A.selectActiveOption(),A.closeCombobox();break}}),ge=J(Z=>{w==null||w(Z),N.nullable&&N.mode===0&&Z.target.value===""&&K(),A.openCombobox()}),xe=J(Z=>{var ut,$e,gt;let se=(ut=Z.relatedTarget)!=null?ut:Jt.find(ze=>ze!==Z.currentTarget);if(H.current=!1,!(($e=N.optionsRef.current)!=null&&$e.contains(se))&&!((gt=N.buttonRef.current)!=null&>.contains(se))&&N.comboboxState===0)return Z.preventDefault(),N.mode===0&&(N.nullable&&N.value===null?K():N.activationTrigger!==1&&A.selectActiveOption()),A.closeCombobox()}),Ee=J(Z=>{var ut,$e,gt;let se=(ut=Z.relatedTarget)!=null?ut:Jt.find(ze=>ze!==Z.currentTarget);($e=N.buttonRef.current)!=null&&$e.contains(se)||(gt=N.optionsRef.current)!=null&>.contains(se)||N.disabled||N.immediate&&N.comboboxState!==0&&(A.openCombobox(),z.nextFrame(()=>{A.setActivationTrigger(1)}))}),Ae=mn(()=>{if(N.labelId)return[N.labelId].join(" ")},[N.labelId]),at=n.useMemo(()=>({open:N.comboboxState===0,disabled:N.disabled}),[N]),pt={ref:F,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(Z=>{var ut;return!((ut=N.virtual)!=null&&ut.disabled(Z.dataRef.current.value))&&N.compare(Z.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":Ae,"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:ve,onCompositionEnd:Ue,onKeyDown:Be,onChange:ge,onFocus:Ee,onBlur:xe};return pe({ourProps:pt,theirProps:L,slot:at,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=Zt(),O=J(F=>{switch(F.key){case qe.ArrowDown:return F.preventDefault(),F.stopPropagation(),s.comboboxState===1&&c.openCombobox(),w.nextFrame(()=>{var D;return(D=s.inputRef.current)==null?void 0:D.focus({preventScroll:!0})});case qe.ArrowUp:return F.preventDefault(),F.stopPropagation(),s.comboboxState===1&&(c.openCombobox(),w.nextFrame(()=>{s.value||c.goToOption(lt.Last)})),w.nextFrame(()=>{var D;return(D=s.inputRef.current)==null?void 0:D.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(),w.nextFrame(()=>{var D;return(D=s.inputRef.current)==null?void 0:D.focus({preventScroll:!0})}));default:return}}),I=J(F=>{if(Ur(F.currentTarget))return F.preventDefault();s.comboboxState===0?c.closeCombobox():(F.preventDefault(),c.openCombobox()),w.nextFrame(()=>{var D;return(D=s.inputRef.current)==null?void 0:D.focus({preventScroll:!0})})}),L=mn(()=>{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]),A={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":L,disabled:s.disabled,onClick:I,onKeyDown:O};return pe({ourProps:A,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);ke(()=>p.registerLabel(s),[s]);let g=J(()=>{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=fe.RenderStrategy|fe.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;ke(()=>{var N;p.optionsPropsRef.current.static=(N=e.static)!=null?N:!1},[p.optionsPropsRef,e.static]),ke(()=>{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=mn(()=>{var N,A;return(A=p.labelId)!=null?A:(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]),L={"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:L,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,L=w.isSelected(p),N=n.useRef(null),A=Pt({disabled:d,value:p,domRef:N,order:h}),F=n.useContext(ui),D=xt(i,N,F?F.measureElement:null),H=J(()=>O.onChange(p));ke(()=>O.registerOption(c,A),[A,c]);let z=n.useRef(!(w.virtual||w.__demoMode));ke(()=>{if(!w.virtual||!w.__demoMode)return;let xe=$t();return xe.requestAnimationFrame(()=>{z.current=!0}),xe.dispose},[w.virtual,w.__demoMode]),ke(()=>{if(!z.current||w.comboboxState!==0||!I||w.activationTrigger===0)return;let xe=$t();return xe.requestAnimationFrame(()=>{var Ee,Ae;(Ae=(Ee=N.current)==null?void 0:Ee.scrollIntoView)==null||Ae.call(Ee,{block:"nearest"})}),xe.dispose},[N,I,w.comboboxState,w.activationTrigger,w.activeOptionIndex]);let K=J(xe=>{var Ee;if(d||(Ee=w.virtual)!=null&&Ee.disabled(p))return xe.preventDefault();H(),_r()||requestAnimationFrame(()=>{var Ae;return(Ae=w.inputRef.current)==null?void 0:Ae.focus({preventScroll:!0})}),w.mode===0&&requestAnimationFrame(()=>O.closeCombobox())}),ue=J(()=>{var xe;if(d||(xe=w.virtual)!=null&&xe.disabled(p))return O.goToOption(lt.Nothing);let Ee=w.calculateIndex(p);O.goToOption(lt.Specific,Ee)}),le=Hr(),ve=J(xe=>le.update(xe)),Ue=J(xe=>{var Ee;if(!le.wasMoved(xe)||d||(Ee=w.virtual)!=null&&Ee.disabled(p)||I)return;let Ae=w.calculateIndex(p);O.goToOption(lt.Specific,Ae,0)}),Be=J(xe=>{var Ee;le.wasMoved(xe)&&(d||(Ee=w.virtual)!=null&&Ee.disabled(p)||I&&(w.optionsPropsRef.current.hold||O.goToOption(lt.Nothing)))}),ge=n.useMemo(()=>({active:I,selected:L,disabled:d}),[I,L,d]);return pe({ourProps:{id:c,ref:D,role:"option",tabIndex:d===!0?void 0:-1,"aria-disabled":d===!0?!0:void 0,"aria-selected":L,disabled:void 0,onClick:K,onFocus:ue,onPointerEnter:ve,onMouseEnter:ve,onPointerMove:Ue,onMouseMove:Ue,onPointerLeave:Be,onMouseLeave:Be},theirProps:g,slot:ge,defaultTag:Dd,name:"Combobox.Option"})}let _d=be(Od),Bd=be(Pd),zd=be(Id),Wd=be(Md),Hd=be(Ad),Ud=be($d),sn=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 ke(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function di(e){let i=J(e),o=n.useRef(!1);n.useEffect(()=>(o.current=!1,()=>{o.current=!0,rn(()=>{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 Br("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=Xt(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=J(F=>{let D=o.current;D&&(H=>H())(()=>{ct(O.current,{[pr.Forwards]:()=>{on(D,Ht.First,{skipElements:[F.relatedTarget]})},[pr.Backwards]:()=>{on(D,Ht.Last,{skipElements:[F.relatedTarget]})}})})}),L=Zt(),N=n.useRef(!1),A={ref:s,onKeyDown(F){F.key=="Tab"&&(N.current=!0,L.requestAnimationFrame(()=>{N.current=!1}))},onBlur(F){let D=fi(d);o.current instanceof HTMLElement&&D.add(o.current);let H=F.relatedTarget;H instanceof HTMLElement&&H.dataset.headlessuiFocusGuard!=="true"&&(mi(D,H)||(N.current?on(o.current,ct(O.current,{[pr.Forwards]:()=>Ht.Next,[pr.Backwards]:()=>Ht.Previous})|Ht.WrapAround,{relativeTo:F.target}):F.target instanceof HTMLElement&&Kt(F.target)))}};return n.createElement(n.Fragment,null,!!(p&4)&&n.createElement(ur,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:I,features:ln.Focusable}),pe({ourProps:A,theirProps:h,defaultTag:Zd,name:"FocusTrap"}),!!(p&4)&&n.createElement(ur,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:I,features:ln.Focusable}))}let Gd=be(Yd),mr=Object.assign(Gd,{features:pi});function qd(e=!0){let i=n.useRef(Jt.slice());return W(([o],[s])=>{s===!0&&o===!1&&rn(()=>{i.current.splice(0)}),s===!1&&o===!0&&(i.current=Jt.slice())},[e,Jt,i]),J(()=>{var o;return(o=i.current.find(s=>s!=null&&s.isConnected))!=null?o:null})}function Kd({ownerDocument:e},i){let o=qd(i);W(()=>{i||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&Kt(o())},[i]),di(()=>{i&&Kt(o())})}function Xd({ownerDocument:e,container:i,initialFocus:o},s){let c=n.useRef(null),d=fr();return W(()=>{if(!s)return;let p=i.current;p&&rn(()=>{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?Kt(o.current):on(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,Kt(w)):(p.preventDefault(),p.stopPropagation(),Kt(g)):Kt(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 zo(e){return n.createElement(hi.Provider,{value:e.force},e.children)}function ef(e){let i=Qd(),o=n.useContext(vi),s=Xt(e),[c,d]=n.useState(()=>{if(!i&&o!==null||Ze.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(Ro(O=>{s.current=O}),i),d=Xt(s),p=ef(s),[h]=n.useState(()=>{var O;return Ze.isServer?null:(O=d==null?void 0:d.createElement("div"))!=null?O:null}),g=n.useContext(Wo),w=hn();return ke(()=>{!p||!h||p.contains(h)||(h.setAttribute("data-headlessui-portal",""),p.appendChild(h))},[p,h]),ke(()=>{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 Wo=n.createContext(null);function lf(){let e=n.useContext(Wo),i=n.useRef([]),o=J(d=>(i.current.push(d),e&&e.register(d),()=>s(d))),s=J(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(Wo.Provider,{value:c},d)},[c])]}let sf=be(nf),af=be(of),Ho=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,Uo(c)&&d({inst:c})},[e,s,i]),ff(()=>(Uo(c)&&d({inst:c}),e(()=>{Uo(c)&&d({inst:c})})),[e]),mf(s),s}function Uo(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 ke(()=>{if(!(!e||!i))return On.dispatch("PUSH",e,o),()=>On.dispatch("POP",e,o)},[i,e]),d}let Vo=new Map,hr=new Map;function gi(e,i=!0){ke(()=>{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=Vo.get(s);g&&(g["aria-hidden"]===null?s.removeAttribute("aria-hidden"):s.setAttribute("aria-hidden",g["aria-hidden"]),s.inert=g.inert,Vo.delete(s))}let d=(o=hr.get(s))!=null?o:0;return hr.set(s,d+1),d!==0||(Vo.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=Xt(c),p=J(()=>{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(L=>I.contains(L))||O.push(I));return O});return{resolveContainers:p,contains:J(h=>p().some(g=>g.contains(h))),mainTreeNodeRef:c,MainTreeNode:n.useMemo(()=>function(){return o!=null?null:n.createElement(ur,{features:ln.Hidden,ref:c})},[c,o])}}let Zo=n.createContext(()=>{});Zo.displayName="StackContext";var Yo=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Yo||{});function If(){return n.useContext(Zo)}function kf({children:e,onUpdate:i,type:o,element:s,enabled:c}){let d=If(),p=J((...h)=>{i==null||i(...h),d(...h)});return ke(()=>{let h=c===void 0||c===!0;return h&&p(0,o,s),()=>{h&&p(1,o,s)}},[p,o,s,c]),n.createElement(Zo.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=J(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);ke(()=>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}}},Vr=n.createContext(null);Vr.displayName="DialogContext";function vr(e){let i=n.useContext(Vr);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=fe.RenderStrategy|fe.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),L=n.useRef(!1);h=function(){return h==="dialog"||h==="alertdialog"?h:(L.current||(L.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 A=n.useRef(null),F=xt(A,i),D=Xt(A),H=e.hasOwnProperty("open")||N!==null,z=e.hasOwnProperty("onClose");if(!H&&!z)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!H)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 K=c?0:1,[ue,le]=n.useReducer($f,{titleId:null,descriptionId:null,panelRef:n.createRef()}),ve=J(()=>d(!1)),Ue=J(re=>le({type:0,id:re})),Be=hn()?g?!1:K===0:!1,ge=O>1,xe=n.useContext(Vr)!==null,[Ee,Ae]=lf(),at={get current(){var re;return(re=ue.panelRef.current)!=null?re:A.current}},{resolveContainers:pt,mainTreeNodeRef:Z,MainTreeNode:ut}=Nf({portals:Ee,defaultContainers:[at]}),$e=ge?"parent":"leaf",gt=N!==null?(N&jt.Closing)===jt.Closing:!1,se=xe||gt?!1:Be,ze=n.useCallback(()=>{var re,ye;return(ye=Array.from((re=D==null?void 0:D.querySelectorAll("body > *"))!=null?re:[]).find(et=>et.id==="headlessui-portal-root"?!1:et.contains(Z.current)&&et instanceof HTMLElement))!=null?ye:null},[Z]);gi(ze,se);let it=ge?!0:Be,Tt=n.useCallback(()=>{var re,ye;return(ye=Array.from((re=D==null?void 0:D.querySelectorAll("[data-headlessui-portal]"))!=null?re:[]).find(et=>et.contains(Z.current)&&et instanceof HTMLElement))!=null?ye:null},[Z]);gi(Tt,it),Rn(pt,re=>{re.preventDefault(),ve()},!(!Be||ge));let Rt=!(ge||K!==0);ci(D==null?void 0:D.defaultView,"keydown",re=>{Rt&&(re.defaultPrevented||re.key===qe.Escape&&(re.preventDefault(),re.stopPropagation(),ve()))}),Df(D,!(gt||K!==0||xe),pt),n.useEffect(()=>{if(K!==0||!A.current)return;let re=new ResizeObserver(ye=>{for(let et of ye){let Bt=et.target.getBoundingClientRect();Bt.x===0&&Bt.y===0&&Bt.width===0&&Bt.height===0&&ve()}});return re.observe(A.current),()=>re.disconnect()},[K,A,ve]);let[wt,Me]=yi(),St=n.useMemo(()=>[{dialogState:K,close:ve,setTitleId:Ue},ue],[K,ue,ve,Ue]),Ke=n.useMemo(()=>({open:K===0}),[K]),Lt={ref:F,id:s,role:h,"aria-modal":K===0?!0:void 0,"aria-labelledby":ue.titleId,"aria-describedby":wt};return n.createElement(kf,{type:"Dialog",enabled:K===0,element:A,onUpdate:J((re,ye)=>{ye==="Dialog"&&ct(re,{[Yo.Add]:()=>I(et=>et+1),[Yo.Remove]:()=>I(et=>et-1)})})},n.createElement(zo,{force:!0},n.createElement(Ho,null,n.createElement(Vr.Provider,{value:St},n.createElement(Ho.Group,{target:A},n.createElement(zo,{force:!1},n.createElement(Me,{slot:Ke,name:"Dialog.Description"},n.createElement(mr,{initialFocus:p,containers:pt,features:Be?ct($e,{parent:mr.features.RestoreFocus,leaf:mr.features.All&~mr.features.FocusLock}):mr.features.None},n.createElement(Ae,null,pe({ourProps:Lt,theirProps:w,slot:Ke,defaultTag:_f,features:Bf,visible:K===0,name:"Dialog"}))))))))),n.createElement(ut,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=J(O=>{if(O.target===O.currentTarget){if(Ur(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(zo,{force:!0},n.createElement(Ho,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=J(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 J(()=>{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 Go(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=Go(e),c=Do(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=Go(e,s=>[...s,{id:i.id,dataRef:i.dataRef}]);return{...e,...o}},6:(e,i)=>{let o=Go(e,s=>{let c=s.findIndex(d=>d.id===i.id);return c!==-1&&s.splice(c,1),s});return{...e,...o,activationTrigger:1}}},qo=n.createContext(null);qo.displayName="MenuContext";function Zr(e){let i=n.useContext(qo);if(i===null){let o=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,Zr),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,A)=>{var F;g({type:1}),lr(A,or.Loose)||(N.preventDefault(),(F=h.current)==null||F.focus())},d===0);let O=J(()=>{g({type:1})}),I=n.useMemo(()=>({open:d===0,close:O}),[d,O]),L={ref:w};return n.createElement(qo.Provider,{value:c},n.createElement(Ao,{value:ct(d,{0:jt.Open,1:jt.Closed})},pe({ourProps:L,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]=Zr("Menu.Button"),g=xt(p.buttonRef,i),w=Zt(),O=J(F=>{switch(F.key){case qe.Space:case qe.Enter:case qe.ArrowDown:F.preventDefault(),F.stopPropagation(),h({type:0}),w.nextFrame(()=>h({type:2,focus:lt.First}));break;case qe.ArrowUp:F.preventDefault(),F.stopPropagation(),h({type:0}),w.nextFrame(()=>h({type:2,focus:lt.Last}));break}}),I=J(F=>{switch(F.key){case qe.Space:F.preventDefault();break}}),L=J(F=>{if(Ur(F.currentTarget))return F.preventDefault();e.disabled||(p.menuState===0?(h({type:1}),w.nextFrame(()=>{var D;return(D=p.buttonRef.current)==null?void 0:D.focus({preventScroll:!0})})):(F.preventDefault(),h({type:0})))}),N=n.useMemo(()=>({open:p.menuState===0}),[p]),A={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:L};return pe({ourProps:A,theirProps:d,slot:N,defaultTag:cp,name:"Menu.Button"})}let fp="div",pp=fe.RenderStrategy|fe.Static;function mp(e,i){var o,s;let c=Ft(),{id:d=`headlessui-menu-items-${c}`,...p}=e,[h,g]=Zr("Menu.Items"),w=xt(h.itemsRef,i),O=Xt(h.itemsRef),I=Zt(),L=cr(),N=L!==null?(L&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 A=J(z=>{var K,ue;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:le}=h.items[h.activeItemIndex];(ue=(K=le.current)==null?void 0:K.domRef.current)==null||ue.click()}Dr(h.buttonRef.current);break;case qe.ArrowDown:return z.preventDefault(),z.stopPropagation(),g({type:2,focus:lt.Next});case qe.ArrowUp:return z.preventDefault(),z.stopPropagation(),g({type:2,focus:lt.Previous});case qe.Home:case qe.PageUp:return z.preventDefault(),z.stopPropagation(),g({type:2,focus:lt.First});case qe.End:case qe.PageDown:return z.preventDefault(),z.stopPropagation(),g({type:2,focus:lt.Last});case qe.Escape:z.preventDefault(),z.stopPropagation(),g({type:1}),$t().nextFrame(()=>{var le;return(le=h.buttonRef.current)==null?void 0:le.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}}),F=J(z=>{switch(z.key){case qe.Space:z.preventDefault();break}}),D=n.useMemo(()=>({open:h.menuState===0}),[h]),H={"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:A,onKeyUp:F,role:"menu",tabIndex:0,ref:w};return pe({ourProps:H,theirProps:p,slot:D,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]=Zr("Menu.Item"),g=p.activeItemIndex!==null?p.items[p.activeItemIndex].id===s:!1,w=n.useRef(null),O=xt(i,w);ke(()=>{if(p.__demoMode||p.menuState!==0||!g||p.activationTrigger===0)return;let le=$t();return le.requestAnimationFrame(()=>{var ve,Ue;(Ue=(ve=w.current)==null?void 0:ve.scrollIntoView)==null||Ue.call(ve,{block:"nearest"})}),le.dispose},[p.__demoMode,w,g,p.menuState,p.activationTrigger,p.activeItemIndex]);let I=np(w),L=n.useRef({disabled:c,domRef:w,get textValue(){return I()}});ke(()=>{L.current.disabled=c},[L,c]),ke(()=>(h({type:5,id:s,dataRef:L}),()=>h({type:6,id:s})),[L,s]);let N=J(()=>{h({type:1})}),A=J(le=>{if(c)return le.preventDefault();h({type:1}),Dr(p.buttonRef.current)}),F=J(()=>{if(c)return h({type:2,focus:lt.Nothing});h({type:2,focus:lt.Specific,id:s})}),D=Hr(),H=J(le=>D.update(le)),z=J(le=>{D.wasMoved(le)&&(c||g||h({type:2,focus:lt.Specific,id:s,trigger:0}))}),K=J(le=>{D.wasMoved(le)&&(c||g&&h({type:2,focus:lt.Nothing}))}),ue=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:A,onFocus:F,onPointerEnter:H,onMouseEnter:H,onPointerMove:z,onMouseMove:z,onPointerLeave:K,onMouseLeave:K},theirProps:d,slot:ue,defaultTag:hp,name:"Menu.Item"})}let gp=be(up),bp=be(dp),xp=be(mp),yp=be(vp),Yr=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=J(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);ke(()=>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 Ko=n.createContext(null);Ko.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(Ko.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,...L}=e,N=n.useContext(Ko),A=n.useRef(null),F=xt(A,i,N===null?null:N.setSwitch),[D,H]=Qn(d,h,p),z=J(()=>H==null?void 0:H(!D)),K=J(ge=>{if(Ur(ge.currentTarget))return ge.preventDefault();ge.preventDefault(),z()}),ue=J(ge=>{ge.key===qe.Space?(ge.preventDefault(),z()):ge.key===qe.Enter&&bd(ge.currentTarget)}),le=J(ge=>ge.preventDefault()),ve=n.useMemo(()=>({checked:D}),[D]),Ue={id:c,ref:F,role:"switch",type:sr(e,A),tabIndex:e.tabIndex===-1?0:(o=e.tabIndex)!=null?o:0,"aria-checked":D,"aria-labelledby":N==null?void 0:N.labelledby,"aria-describedby":N==null?void 0:N.describedby,disabled:g,onClick:K,onKeyUp:ue,onKeyPress:le},Be=Zt();return n.useEffect(()=>{var ge;let xe=(ge=A.current)==null?void 0:ge.closest("form");xe&&p!==void 0&&Be.addEventListener(xe,"reset",()=>{H(p)})},[A,H]),n.createElement(n.Fragment,null,w!=null&&D&&n.createElement(ur,{features:ln.Hidden,...vt({as:"input",type:"checkbox",hidden:!0,readOnly:!0,disabled:g,form:I,checked:D,name:w,value:O})}),pe({ourProps:Ue,theirProps:L,slot:ve,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 Xo(e,...i){e&&i.length>0&&e.classList.add(...i)}function Jo(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 Jo(e,...i.base,...i.enter,...i.enterTo,...i.enterFrom,...i.leave,...i.leaveFrom,...i.leaveTo,...i.entered),Xo(e,...i.base,...h,...w),d.nextFrame(()=>{Jo(e,...i.base,...h,...w),Xo(e,...i.base,...h,...g),Lp(e,()=>(Jo(e,...i.base,...h),Xo(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=Zt(),g=Pt(o);ke(()=>{e&&(g.current="enter")},[e]),ke(()=>{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 Gr=n.createContext(null);Gr.displayName="TransitionContext";var $p=(e=>(e.Visible="visible",e.Hidden="hidden",e))($p||{});function _p(){let e=n.useContext(Gr);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(qr);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let qr=n.createContext(null);qr.displayName="NestingContext";function Kr(e){return"children"in e?Kr(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=Zt(),p=J((N,A=Pe.Hidden)=>{let F=s.current.findIndex(({el:D})=>D===N);F!==-1&&(ct(A,{[Pe.Unmount](){s.current.splice(F,1)},[Pe.Hidden](){s.current[F].state="hidden"}}),d.microTask(()=>{var D;!Kr(s)&&c.current&&((D=o.current)==null||D.call(o))}))}),h=J(N=>{let A=s.current.find(({el:F})=>F===N);return A?A.state!=="visible"&&(A.state="visible"):s.current.push({el:N,state:"visible"}),()=>p(N,Pe.Unmount)}),g=n.useRef([]),w=n.useRef(Promise.resolve()),O=n.useRef({enter:[],leave:[],idle:[]}),I=J((N,A,F)=>{g.current.splice(0),i&&(i.chains.current[A]=i.chains.current[A].filter(([D])=>D!==N)),i==null||i.chains.current[A].push([N,new Promise(D=>{g.current.push(D)})]),i==null||i.chains.current[A].push([N,new Promise(D=>{Promise.all(O.current[A].map(([H,z])=>z)).then(()=>D())})]),A==="enter"?w.current=w.current.then(()=>i==null?void 0:i.wait.current).then(()=>F(A)):F(A)}),L=J((N,A,F)=>{Promise.all(O.current[A].splice(0).map(([D,H])=>H)).then(()=>{var D;(D=g.current.shift())==null||D()}).then(()=>F(A))});return n.useMemo(()=>({children:s,register:h,unregister:p,onStart:I,onStop:L,wait:w,chains:O}),[h,p,s,I,L,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=fe.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:L,leaveFrom:N,leaveTo:A,...F}=e,D=n.useRef(null),H=xt(D,i),z=(o=F.unmount)==null||o?Pe.Unmount:Pe.Hidden,{show:K,appear:ue,initial:le}=_p(),[ve,Ue]=n.useState(K?"visible":"hidden"),Be=Bp(),{register:ge,unregister:xe}=Be;n.useEffect(()=>ge(D),[ge,D]),n.useEffect(()=>{if(z===Pe.Hidden&&D.current){if(K&&ve!=="visible"){Ue("visible");return}return ct(ve,{hidden:()=>xe(D),visible:()=>ge(D)})}},[ve,D,ge,xe,K,z]);let Ee=Pt({base:bn(F.className),enter:bn(g),enterFrom:bn(w),enterTo:bn(O),entered:bn(I),leave:bn(L),leaveFrom:bn(N),leaveTo:bn(A)}),Ae=Hp({beforeEnter:c,afterEnter:d,beforeLeave:p,afterLeave:h}),at=hn();n.useEffect(()=>{if(at&&ve==="visible"&&D.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[D,ve,at]);let pt=le&&!ue,Z=ue&&K&&le,ut=!at||pt?"idle":K?"enter":"leave",$e=Tp(0),gt=J(wt=>ct(wt,{enter:()=>{$e.addFlag(jt.Opening),Ae.current.beforeEnter()},leave:()=>{$e.addFlag(jt.Closing),Ae.current.beforeLeave()},idle:()=>{}})),se=J(wt=>ct(wt,{enter:()=>{$e.removeFlag(jt.Opening),Ae.current.afterEnter()},leave:()=>{$e.removeFlag(jt.Closing),Ae.current.afterLeave()},idle:()=>{}})),ze=Oi(()=>{Ue("hidden"),xe(D)},Be),it=n.useRef(!1);Dp({immediate:Z,container:D,classes:Ee,direction:ut,onStart:Pt(wt=>{it.current=!0,ze.onStart(D,wt,gt)}),onStop:Pt(wt=>{it.current=!1,ze.onStop(D,wt,se),wt==="leave"&&!Kr(ze)&&(Ue("hidden"),xe(D))})});let Tt=F,Rt={ref:H};return Z?Tt={...Tt,className:X(F.className,...Ee.current.enter,...Ee.current.enterFrom)}:it.current&&(Tt.className=X(F.className,(s=D.current)==null?void 0:s.className),Tt.className===""&&delete Tt.className),n.createElement(qr.Provider,{value:ze},n.createElement(Ao,{value:ct(ve,{visible:jt.Open,hidden:jt.Closed})|$e.flags},pe({ourProps:Rt,theirProps:Tt,defaultTag:Up,features:Ii,visible:ve==="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")}),[L,N]=n.useState(!0),A=n.useRef([o]);ke(()=>{L!==!1&&A.current[A.current.length-1]!==o&&(A.current.push(o),N(!1))},[A,o]);let F=n.useMemo(()=>({show:o,appear:s,initial:L}),[o,s,L]);n.useEffect(()=>{if(o)O("visible");else if(!Kr(I))O("hidden");else{let K=p.current;if(!K)return;let ue=K.getBoundingClientRect();ue.x===0&&ue.y===0&&ue.width===0&&ue.height===0&&O("hidden")}},[o,I]);let D={unmount:c},H=J(()=>{var K;L&&N(!1),(K=e.beforeEnter)==null||K.call(e)}),z=J(()=>{var K;L&&N(!1),(K=e.beforeLeave)==null||K.call(e)});return n.createElement(qr.Provider,{value:I},n.createElement(Gr.Provider,{value:F},pe({ourProps:{...D,as:n.Fragment,children:n.createElement(ki,{ref:h,...D,...d,beforeEnter:H,beforeLeave:z})},theirProps:{},defaultTag:n.Fragment,features:Ii,visible:w==="visible",name:"Transition"})))}function Yp(e,i){let o=n.useContext(Gr)!==null,s=cr()!==null;return n.createElement(n.Fragment,null,!o&&s?n.createElement(Qo,{ref:i,...e}):n.createElement(ki,{ref:i,...e}))}let Qo=be(Zp),ki=be(Vp),Gp=be(Yp),Nn=Object.assign(Qo,{Child:Gp,Root:Qo});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:{}};/*!
|
|
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=B(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,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: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:D,onFocus:()=>A(!0),onBlur:()=>A(!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"})]}),el=({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)},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",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(A,document.body)]})},tl=({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:A,classNameLabel:N="",classNameContainerInput:D="",classNameContainer:F="",className:$="",icon:H=null,onKeyDown:z,onFocus:K,min:ue,max:le,maxWidth:ve=5e3})=>{const[Ue,Be]=n.useState(!1),ge=xn({"ring-red-300 focus:ring-red-300 text-red-900":w||Ue,"focus:ring-indigo-600 text-gray-500":!w&&!Ue}),xe=Ee=>{if(d&&d(Ee),s!=="email")return;const{value:Ae}=Ee.target,at=v(Ae);Be(!at)};return y.jsxs("div",{"data-testid":`container-input-${A}`,className:F,children:[i!==""&&y.jsx("label",{htmlFor:o,className:x("block text-sm font-medium leading-6",N!==""?N:"text-gray-700"),"data-testid":`label-${A}`,children:i}),y.jsxs("div",{className:x("relative mt-1 rounded-md",D!==""&&D),children:[y.jsx(el,{className:"text-sm",classNameContainer:"w-full",message:h,children:y.jsx("input",{id:A,name:c,type:s,autoComplete:I,placeholder:e,onChange:xe,onClick:p,onKeyDown:z,onFocus:K,value:h,readOnly:g,"data-testid":`input-${A}`,min:ue,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",ge,$!==""&&$),style:{maxWidth:`${ve}px`}})}),H!==null&&y.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3",children:H}),w&&H===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-${A}`,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:A="",options:N,value:D=-1,defaultValue:F={value:-1,label:"",iconStart:null,iconEnd:null},defaultLabel:$="label",defaultId:H="value",bgOptionSelect:z="bg-indigo-600",isSearch:K=!1,loading:ue=!1,isSingleOptionAndFirstLoad:le=!0,isTest:ve=!1})=>{const[Ue,Be]=n.useState(""),[ge,xe]=n.useState(F),[Ee,Ae]=n.useState(!1),[at,pt]=n.useState(!0);n.useEffect(()=>{if((N==null?void 0:N.length)!==1||!at)return;pt(!1);const[se]=N,ze=se[H],it=se[$];xe({value:ze,label:it}),le&&c({target:{value:se,checked:!1,name:g,type:void 0,id:se[H]}})},[N,H,$,c,g,at,le]),n.useEffect(()=>{if(D===-1||(N==null?void 0:N.length)===0)return;const se=N==null?void 0:N.find(ze=>ze[H]===D);se&&xe(se)},[D,N,H]),n.useEffect(()=>{D==="clear"&&(ge[H]!==F[H]||ge[$]!==F[$]||ve)&&xe(F)},[F,ve,ge,D,H,$]);const Z=Ue===""?N:N.filter(se=>se[$].normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().includes(Ue.toLowerCase())),ut=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=se=>{xe(se),c({target:{value:se,checked:!1,name:g,type:void 0,id:se[H]}})};return y.jsxs(sn,{as:"div",value:ge,children:[y.jsx(sn.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(el,{className:"text-sm",classNameContainer:"w-full",message:ge[$],children:y.jsxs(sn.Button,{className:"w-full","data-testid":`listbox-button-${w}`,children:[ge.iconStart&&y.jsx("span",{className:"absolute inset-y-0 left-0 flex items-center pl-2",children:ge.iconStart}),y.jsx(sn.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",ut,A!==""&&A),onChange:se=>Be(se.target.value.normalize("NFD").replace(/[\u0300-\u036f]/g,"")),displayValue:se=>{var ze;return(ze=se[$])==null?void 0:ze.trim()},autoComplete:"off",readOnly:!K||d,style:{height:e,...i},"data-testid":"input-search",onClick:()=>Ae(d?!1:!Ee),onBlur:()=>Ae(!1)})]})}),ge.iconEnd&&y.jsx("span",{className:"absolute inset-y-0 right-4 flex items-center pr-4",children:ge.iconEnd}),!d&&y.jsx(sn.Button,{className:"absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none",onClick:()=>Ae(d?!1:!Ee),"data-testid":"arrow-button",children:Ee?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:ue?y.jsx(sn.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,{})}):(Z??[]).length>0?y.jsx(sn.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:Z.map((se,ze)=>y.jsx(sn.Option,{value:se,className:x(se[H]===ge[H]?`${z} text-white`:"text-gray-900",`relative cursor-default select-none p-2 hover:text-white hover:${z}`),"data-testid":`select-${w}-${se[H]}`,onClick:()=>gt(se),children:y.jsxs("div",{className:"flex justify-between items-center",children:[y.jsxs("div",{className:"flex items-center",children:[se.iconStart&&y.jsx("span",{className:"mr-2","aria-hidden":"true",children:se.iconStart}),y.jsx("span",{className:"font-normal hyphens-auto break-words overflow-hidden",children:se[$]})]}),se.iconEnd&&y.jsx("span",{className:"ml-2","aria-hidden":"true",children:se.iconEnd})]})},ze))}):y.jsx(sn.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:A,classNameLabel:N="",classNameContainer:D="",className:F="",onKeyDown:$,options:H,idSelect:z,isMarginLeft:K=!0,classNameSelect:ue="w-20",type:le="text"})=>{const{width:ve}=_(),Ue=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(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,L]=n.useState(!1),N=xn({"ml-2":c==="start"&&s!==null,"mr-2":c==="end"&&s!==null}),A=()=>{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:A,onFocus:()=>L(!0),onBlur:()=>L(!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"})]}),el=({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)},L=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(L,document.body)]})},tl=({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:L,classNameLabel:N="",classNameContainerInput:A="",classNameContainer:F="",className:D="",icon:H=null,onKeyDown:z,onFocus:K,min:ue,max:le,maxWidth:ve=5e3})=>{const[Ue,Be]=n.useState(!1),ge=xn({"ring-red-300 focus:ring-red-300 text-red-900":w||Ue,"focus:ring-indigo-600 text-gray-500":!w&&!Ue}),xe=Ee=>{if(d&&d(Ee),s!=="email")return;const{value:Ae}=Ee.target,at=v(Ae);Be(!at)};return y.jsxs("div",{"data-testid":`container-input-${L}`,className:F,children:[i!==""&&y.jsx("label",{htmlFor:o,className:x("block text-sm font-medium leading-6",N!==""?N:"text-gray-700"),"data-testid":`label-${L}`,children:i}),y.jsxs("div",{className:x("relative mt-1 rounded-md",A!==""&&A),children:[y.jsx(el,{className:"text-sm",classNameContainer:"w-full",message:h,children:y.jsx("input",{id:L,name:c,type:s,autoComplete:I,placeholder:e,onChange:xe,onClick:p,onKeyDown:z,onFocus:K,value:h,readOnly:g,"data-testid":`input-${L}`,min:ue,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",ge,D!==""&&D),style:{maxWidth:`${ve}px`}})}),H!==null&&y.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3",children:H}),w&&H===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-${L}`,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:L="",options:N,value:A=-1,defaultValue:F={value:-1,label:"",iconStart:null,iconEnd:null},defaultLabel:D="label",defaultId:H="value",bgOptionSelect:z="bg-indigo-600",isSearch:K=!1,loading:ue=!1,isSingleOptionAndFirstLoad:le=!0,isTest:ve=!1})=>{const[Ue,Be]=n.useState(""),[ge,xe]=n.useState(F),[Ee,Ae]=n.useState(!1),[at,pt]=n.useState(!0);n.useEffect(()=>{if((N==null?void 0:N.length)!==1||!at)return;pt(!1);const[se]=N,ze=se[H],it=se[D];xe({value:ze,label:it}),le&&c({target:{value:se,checked:!1,name:g,type:void 0,id:se[H]}})},[N,H,D,c,g,at,le]),n.useEffect(()=>{if(A===-1||(N==null?void 0:N.length)===0)return;const se=N==null?void 0:N.find(ze=>ze[H]===A);se&&xe(se)},[A,N,H]),n.useEffect(()=>{A==="clear"&&(ge[H]!==F[H]||ge[D]!==F[D]||ve)&&xe(F)},[F,ve,ge,A,H,D]);const Z=Ue===""?N:N.filter(se=>se[D].normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().includes(Ue.toLowerCase())),ut=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=se=>{xe(se),c({target:{value:se,checked:!1,name:g,type:void 0,id:se[H]}})};return y.jsxs(sn,{as:"div",value:ge,children:[y.jsx(sn.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(el,{className:"text-sm",classNameContainer:"w-full",message:ge[D],children:y.jsxs(sn.Button,{className:"w-full","data-testid":`listbox-button-${w}`,children:[ge.iconStart&&y.jsx("span",{className:"absolute inset-y-0 left-0 flex items-center pl-2",children:ge.iconStart}),y.jsx(sn.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",ut,L!==""&&L),onChange:se=>Be(se.target.value.normalize("NFD").replace(/[\u0300-\u036f]/g,"")),displayValue:se=>{var ze;return(ze=se[D])==null?void 0:ze.trim()},autoComplete:"off",readOnly:!K||d,style:{height:e,...i},"data-testid":"input-search",onClick:()=>Ae(d?!1:!Ee),onBlur:()=>Ae(!1)})]})}),ge.iconEnd&&y.jsx("span",{className:"absolute inset-y-0 right-4 flex items-center pr-4",children:ge.iconEnd}),!d&&y.jsx(sn.Button,{className:"absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none",onClick:()=>Ae(d?!1:!Ee),"data-testid":"arrow-button",children:Ee?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:ue?y.jsx(sn.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,{})}):(Z??[]).length>0?y.jsx(sn.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:Z.map((se,ze)=>y.jsx(sn.Option,{value:se,className:x(se[H]===ge[H]?`${z} text-white`:"text-gray-900",`relative cursor-default select-none p-2 hover:text-white hover:${z}`),"data-testid":`select-${w}-${se[H]}`,onClick:()=>gt(se),children:y.jsxs("div",{className:"flex justify-between items-center",children:[y.jsxs("div",{className:"flex items-center",children:[se.iconStart&&y.jsx("span",{className:"mr-2","aria-hidden":"true",children:se.iconStart}),y.jsx("span",{className:"font-normal hyphens-auto break-words overflow-hidden",children:se[D]})]}),se.iconEnd&&y.jsx("span",{className:"ml-2","aria-hidden":"true",children:se.iconEnd})]})},ze))}):y.jsx(sn.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:L,classNameLabel:N="",classNameContainer:A="",className:F="",onKeyDown:D,options:H,idSelect:z,isMarginLeft:K=!0,classNameSelect:ue="w-20",type:le="text"})=>{const{width:ve}=B(),Ue=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:`
|
|
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 V}}function Vi(C,V){{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-${L}`,className:A,children:[i!==""&&y.jsx("label",{htmlFor:o,className:x("block text-sm font-medium leading-6",N!==""?N:"text-gray-700"),"data-testid":`label-${L}`,children:i}),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(Ai,{name:z,onChange:Be=>c(Be),id:z,options:H,value:h,isReadOnly:g,className:ue,height:ve<=640?"28px":"32px",classNameInput:x(K&&"ml-3.5"),style:{paddingRight:0,boxShadow:"none"},isDisabledFocus:!0})}),y.jsx("input",{id:L,name:s,type:le,autoComplete:I,placeholder:e,readOnly:g,"data-testid":`input-${L}`,onClick:d,onKeyDown:D,onChange:Be=>c(Be),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",Ue,F!==""&&F)}),w&&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-${L}`,children:O})]})]})},Vm=({setValuesDefault:e,status:i=!1,isReadOnly:o=!1,handleClick:s,text:c="",updateStatus:d=!1,id:p="",isHiddenText:h=!1,setForm:g,handleChange:w,textActive:O="Activo",textInactive:I="Inactivo"})=>{const[L,N]=n.useState(!1);n.useEffect(()=>{N(i),e("status",i),g(F=>({...F,status:i}))},[i,e,d,g]);const A=()=>{N(!L),e("status",!L),g(F=>({...F,status:!L})),w({target:{checked:!L,value:!L,name:"status",type:"",id:""}}),s&&s()};return y.jsxs("div",{className:"flex",children:[y.jsxs(Mp,{checked:L,onChange:A,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",L?"bg-success-1":"bg-gray-200"),"data-testid":`switch-${p}`,disabled:o,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",L?"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:L?O:I})]})};function Zm({label:e="",id:i,htmlFor:o="",classNameLabel:s="",className:c="",rows:d=4,name:p,placeholder:h="",helperText:g="",isReadOnly:w=!1,isError:O=!1,onChange:I,value:L,idInput:N,nameInput:A,placeholderInput:F="",isReadOnlyInput:D=!1,valueInput:H,infoTop:z=null,infoBottom:K=null,classNameInfoTop:ue="h-4",classNameInfoBottom:le="h-2",isInputTitle:ve=!1,hiddenBorder:Ue=!1}){const Be=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:[e!==""&&y.jsx("label",{htmlFor:o,className:x("leading-6 block text-sm",s!==""&&s),children:e}),y.jsxs("div",{className:"relative overflow-x-hidden",children:[z!==null&&y.jsx("div",{className:"absolute top-2 left-3 w-full",children:z}),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",Be),children:[z!==null&&y.jsx("div",{className:"py-2","aria-hidden":"true",children:y.jsx("div",{className:"py-px",children:y.jsx("div",{className:ue})})}),ve&&y.jsx("textarea",{name:A,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:H,onChange:I,rows:2,readOnly:D}),y.jsx("textarea",{placeholder:h,rows:d,name:p,id:i,className:x(ve||Ue?"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",Be,c!==""&&c),readOnly:w,onChange:I,value:L,"data-testid":`textarea-${i}`}),K!==null&&y.jsx("div",{className:"py-2","aria-hidden":"true",children:y.jsx("div",{className:"py-px",children:y.jsx("div",{className:le})})})]}),K!==null&&y.jsx("div",{className:"absolute bottom-2 left-3 w-full",children:K})]}),g.length>0&&O&&y.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${i}`,children:g})]})}const Ym=({children:e,data:i,className:o="",classNameTooltip:s="w-full",classNameMenu:c="",classNameMenuItems:d="",classNameContainerSearch:p="px-5",isSelectMultiple:h=!1,optionsSelect:g,propObject:w="name",propId:O="id",textNewItem:I="",defaultId:L=null,loading:N=!1,search:A=null,searchPlaceHolder:F="Buscar...",valueSearch:D=void 0,idsOptionSelect:H=null,isComponent:z,isSticky:K=!1,hiddenMenu:ue=!1,id:le,onClick:ve=()=>{},isRelative:Ue=!0,isMaxWidth:Be=!1,isTag:ge=!1,isClear:xe=!1,clear:Ee=null,applyButton:Ae=null,applyButtonText:at="Aplicar",tagsParent:pt=[],isClearTagsParent:Z=!1,isReadOnly:ut,isDisabledApplyButton:$e=!0,isOpenMenu:gt=void 0})=>{const se=n.useRef(null),ze=n.useRef(null),[it,Tt]=n.useState(new Set),[Rt,wt]=n.useState(new Map),[Me,St]=n.useState({}),[Ke,Lt]=n.useState(!1);n.useEffect(()=>{H!==null&&Tt(new Set(new Set(H)))},[H]),n.useEffect(()=>{Z&&wt(new Map)},[Z]),n.useEffect(()=>{if(pt.length===0)return;const de=new Map;pt.forEach(We=>de.set(We.id,We)),wt(de)},[pt]),n.useEffect(()=>{xe&&(Tt(new Set),wt(new Map),Ee&&Ee())},[Ee,xe]),n.useEffect(()=>{const de=()=>{if(!ze.current)return;const We=ze.current.getBoundingClientRect();St({position:"absolute",top:We.bottom+window.scrollY,left:We.left+window.scrollX,zIndex:10,width:We.width})};return de(),window.addEventListener("scroll",de,!0),window.addEventListener("resize",de),()=>{window.removeEventListener("scroll",de,!0),window.removeEventListener("resize",de)}},[Ke]),n.useEffect(()=>{const de=()=>{document.body.dispatchEvent(new MouseEvent("click",{bubbles:!0}))};return window.addEventListener("scroll",de,!0),()=>window.removeEventListener("scroll",de,!0)},[]);const re=de=>{let We=new Map(Rt),Ot=new Set(it),yn=null;if(L!==null&&(de[O]===L&&(yn=crypto.randomUUID()),yn!==null&&(de[O]=yn),yn!==null&&(de[w]=de[w].replace(I,"").trim())),Ot.has(de[O])?Ot.delete(de[O]):Ot.add(de[O]),We.has(de[O])?We.delete(de[O]):We.set(de[O],de),!h){const xr=Array.from(Ot),In=Array.from(We);xr.shift(),In.shift(),Ot=Ot.size===2?new Set(xr):Ot,We=We.size===2?new Map(In):We}g(de,Array.from(Ot),yn!==null),Tt(Ot),wt(We)},ye=de=>{ve(de===!0?-1:le),Lt(!Ke)},et=de=>{const We=new Set(it),Ot=new Map(Rt);We.delete(de[O]),Ot.delete(de[O]),g(de,Array.from(We)),Tt(We),wt(Ot)},Bt=()=>{if(it.size===0)return;const de=new Set(it),We=new Map(Rt);de.clear(),We.clear(),g(null,Array.from(de)),Tt(de),wt(We)};function Ln(de){if(typeof de!="string")return de;const We=de.toLowerCase();return We.charAt(0).toUpperCase()+We.slice(1)}return y.jsxs(Yr,{as:"div",className:x("inline-block text-left",Ue&&"relative",c!==""&&c),onClick:()=>ye(!0),"data-testid":`menu-${le}`,id:le,ref:se,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 V}}function Vi(C,V){{if
|
|
|
92
92
|
width: 414px;
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
`}),y.jsx(Yr.Button,{as:"div",onClick:()=>ye(ue),"data-testid":`menu-button-${le}`,ref:ze,children:e}),u.createPortal(y.jsx("div",{style:Me,className:x(s,ue&&"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(Yr.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,Be&&"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(tl,{htmlFor:"search",id:`dropdown-search-${le}`,name:"search",type:"text",placeholder:F,handleChange:de=>D(de,le),icon:F!==""&&y.jsx(gm,{className:"w-4 h-4 text-indigo-300"}),className:"pl-5 pr-4 h-8",classNameContainerInput:"w-full",value:$,onKeyDown:de=>de.key===" "&&de.stopPropagation(),autocomplete:"off"})}),Ae!==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",it.size>0?"opacity-1 cursor-pointer":"opacity-0 cursor-default"),outline:"",classNameText:"text-xs text-white text-center",id:"delete",onClick:Bt,children:"Descartar"}),y.jsx(gr,{classNameButton:"bg-secondary-2 hover:bg-secondary-3 font-medium px-2 py-1.5 rounded-md",outline:it.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:it.size===0&&$e,onClick:()=>Ae({id:le,items:Array.from(Rt.values())}),children:at})]})]}),ge&&!ut&&y.jsx("div",{className:"flex flex-wrap ml-7 pt-1",children:Array.from(Rt).map((de,We)=>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:[de[1][w],y.jsx("button",{type:"button",className:"p-0.5 rounded-sm bg-gray-100 hover:bg-gray-300",onClick:()=>et(de[1]),"data-testid":`tag-${de[0]}`,children:y.jsx(jm,{className:"h-2.5 w-2.5 stroke-gray-700/50 group-hover:stroke-gray-700/75"})})]})},de))}),y.jsx("div",{className:"divide-y divide-gray-100",children:(ut?[]:i).map((de,We)=>y.jsx("div",{className:x(!z&&"py-1",K&&We===0&&"sticky top-0"),children:z?y.jsx("div",{onClick:Ot=>{Ot.preventDefault(),g()},"data-testid":`item-component-${We}`,children:de}):y.jsx(Yr.Item,{children:y.jsx("span",{className:x(it.has(de[O])&&"blue text-white",!it.has(de[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-${We}`,onClick:Ot=>{Ot.preventDefault(),re(de)},children:Ln(de[w])})})},We))})]})})})}),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 F=[];for(let $=1;$<=I;$++)F.push($);O(F)},[I]),n.useEffect(()=>{let F=[];const $="...",H="... ",z=" ...";if(w.length<6)F=w;else if(d>=1&&d<=3)F=[1,2,3,4,$,w.length];else if(d===4)F=[...w.slice(0,5),$,w.length];else if(d>4&&d<w.length-2){const K=w.slice(d-2,d),ue=w.slice(d,d+1);F=[1,H,...K,...ue,z,w.length]}else if(d>w.length-3){const K=w.slice(w.length-4);F=[1,H,...K]}g(F)},[d,w]),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&&o(d-1)},D=()=>{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((F,$)=>y.jsx(Ri,{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(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,[A]=I,N=new FileReader;N.readAsDataURL(A),N.onload=function(){e(D=>({...D,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:A=null,isPadding:N=!0,isReadOnly:D=!1,isEdit:F=!1,deleteItem:$=null,validateAdd:H=null,loading:z=!1,internalEdit:K=!0,isDataEmpty:ue=!0,typeProp:le="value",setAdd:ve=null,hasNoRecords:Ue=!0,tabs:Be=null,selectTab:ge=null})=>{const[xe,Ee]=n.useState(!1),[Ae,at]=n.useState(!1),[,pt]=n.useState(!1),[Z,ut]=n.useState(""),[$e,gt]=n.useState(1);n.useEffect(()=>{Ee(i),pt(D)},[i,D]);const se=({e:Me,index:St})=>{const Ke=m(p),{name:Lt,value:re}=Me.target;!(H!==null&&H({value:re,copyData:Ke,index:St}))&&(Ke[St][Lt]=re),h(Ke),s(g,Ke),o(ye=>({...ye,[g]:Ke}))},ze=()=>{if(p.some(Me=>Object.values(Me).some(St=>St[le]===-1))||p.length===0)return O({type:"ALERT",payload:{title:"",message:"Todos los campos son requeridos",typeAlert:"warning",active:!0}});o(Me=>({...Me,data:p})),s(g,p),h([...p,w]),ve&&ve([...p,w])},it=({index:Me,item:St})=>{if(p.length===1&&!F)return;const Ke=m(p);Ke.splice(Me,1),o(Lt=>({...Lt,data:Ke})),s(g,Ke),h(Ke),$&&$({index:Me,item:St,data:Ke}),Me===p.length-1&&F&&Ke.length===0&&(o(Lt=>({...Lt,data:Ke})),s(g,Ke),h([...Ke,w]))},Tt=()=>{at(!Ae),pt(!1)},Rt=()=>{if(p.length>1)return;if(p.length===0)return!0;const[Me]=p,{rol:St,privileges:Ke,limitedPrivileges:Lt,...re}=Me;return Object.values(re).every(ye=>Object.values(ye)[0]===-1)},wt=({tab:Me})=>{gt(Me.id),ge&&ge({tab:Me})};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:()=>Ee(!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:[A&&y.jsx(tl,{htmlFor:"search",id:"search",name:"search",type:"text",autoComplete:"search",placeholder:"Buscar...",handleChange:Me=>{A(Me),ut(Me.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:Z,onClick:Me=>Me.stopPropagation(),onFocus:()=>Ee(!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:[Be&&y.jsx("nav",{className:"flex justify-center border-b border-gray-200","aria-label":"Tabs",children:Be.map(Me=>y.jsx("span",{className:x($e===Me.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===Me.id?"page":void 0,onClick:()=>wt({tab:Me}),"data-testid":`tab-${Me.id}`,children:Me.name},Me.name))}),y.jsxs("div",{className:x("sm:mt-2.5 py-3.5 relative",N&&Be===null&&"px-4 sm:p-6",N&&Be!==null&&"px-4 sm:px-6 sm:pb-6 sm:pt-2.5"),children:[K&&!Ae&&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,{})}),ue&&Rt()&&Ue&&!z&&(K?!Ae:!F)&&y.jsx("p",{className:"text-gray-800 text-center","data-testid":"records-empty",children:"No hay registros para mostrar"}),!z&&p.map((Me,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:Me,index:St,handleChange:se,isEdit:K?Ae:F}):e,I&&(K?Ae: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(_m,{className:x("w-6 h-4",(p.length>1||F)&&"cursor-pointer"),style:{color:"#637381"},strokeWidth:2.5,onClick:()=>it({index:St,item:Me}),"data-testid":`delete-item-${St}-${g}`})})]},St)),I&&(K?Ae:F)&&!z&&y.jsx("p",{className:"text-secondary-2 text-sm font-medium ml-3 cursor-pointer",onClick:ze,"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=tl,r.InputDropdown=Um,r.MESSAGE_ABORT_CONTROLLER=R,r.MESSAGE_SIGNAL_ABORTED_WITHOUT_REASON=T,r.Modal=Li,r.Pagination=Gm,r.Select=Ai,r.Spinner=Hm,r.SpinnerIcon=br,r.Switch=Vm,r.Textarea=Zm,r.Tooltip=el,r.classNames=x,r.copyOptions=m,r.generateAvatarInitials=E,r.isPromise=k,r.rowsPerPage=Di,r.useCloseModal=M,r.useForm=L,r.useMediaQuery=P,r.useWindowDimensions=_,r.validateEmail=v,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})})})(Io,Io.exports);var ri=Io.exports;const ko=({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 T=x.current.getBoundingClientRect();v({top:T.bottom+window.scrollY,left:T.left+window.scrollX}),a(!0)},k=()=>{a(!1)},R=j.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:j.jsx("div",{className:ri.classNames("absolute z-40 px-4 mt-0 sm:px-0",t!==""&&t),style:{top:m.top,left:m.left,position:"absolute"},children:j.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 j.jsxs(j.Fragment,{children:[j.jsx("div",{ref:x,className:ri.classNames("inline-block",l!==""&&l),onMouseEnter:E,onMouseLeave:k,"data-testid":"container-tooltip",style:u,children:r}),typeof window<"u"&&wr.createPortal(R,document.body)]})},Po=({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:R,classNameLabel:T="",classNameContainerInput:M="",classNameContainer:L="",className:P="",icon:_=null,onKeyDown:B,onFocus:q,min:ne,max:oe,maxWidth:me=5e3})=>{const[Ne,Oe]=b.useState(!1),Ce=pn({"ring-red-300 focus:ring-red-300 text-red-900":x||Ne,"focus:ring-indigo-600 text-gray-500":!x&&!Ne}),y=he=>{if(f&&f(he),n!=="email")return;const{value:Ie}=he.target,_e=sl(Ie);Oe(!_e)};return j.jsxs("div",{"data-testid":`container-input-${R}`,className:L,children:[l!==""&&j.jsx("label",{htmlFor:r,className:ae("block text-sm font-medium leading-6",!T.includes("mb-")&&"mb-0.5",T!==""?T:"text-gray-700"),"data-testid":`label-${R}`,children:l}),j.jsxs("div",{className:ae("relative rounded-md",M!==""&&M),children:[j.jsx(ko,{className:"text-sm",classNameContainer:"w-full",message:n==="password"?"":m,children:j.jsx("input",{id:R,name:u,type:n,autoComplete:k,placeholder:t,onChange:y,onClick:a,onKeyDown:B,onFocus:q,value:m,readOnly:v,"data-testid":`input-${R}`,min:ne,className:ae("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",Ce,P!==""&&P),style:{maxWidth:`${me}px`}})}),_!==null&&j.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3",children:_}),x&&_===null&&j.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:j.jsx(Jl,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),E.length===0||!x?null:j.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${R}`,children:E})]})};function Jn({className:t="w-6 h-6",color:l="#3730a3"}){return j.jsxs("svg",{className:ae("fill-current animate-spin",t),viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[j.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:l,strokeWidth:"4",fill:"none"}),j.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 j.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:[j.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"}),j.jsx(Jn,{className:"w-8 h-8 animate-spin"})]})}const oi=({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:R="",options:T,value:M=-1,defaultValue:L={value:-1,label:"",iconStart:null,iconEnd:null},defaultLabel:P="label",defaultId:_="value",bgOptionSelect:B="bg-indigo-600",isSearch:q=!1,loading:ne=!1,isSingleOptionAndFirstLoad:oe=!0,isTest:me=!1})=>{const Ne=b.useRef(!0),[Oe,Ce]=b.useState(""),[y,he]=b.useState(L),[Ie,_e]=b.useState(!1);b.useEffect(()=>{if((T==null?void 0:T.length)!==1||!Ne.current)return;Ne.current=!1;const[ce]=T,Te=ce[_],Je=ce[P];he({value:Te,label:Je}),oe&&u({target:{value:ce,checked:!1,name:v,type:void 0,id:ce[_]}})},[T,_,P,u,v,oe]),b.useEffect(()=>{if(M===-1||(T==null?void 0:T.length)===0)return;const ce=T==null?void 0:T.find(Te=>Te[_]===M);ce&&he(ce)},[M,T,_]),b.useEffect(()=>{M==="clear"&&(y[_]!==L[_]||y[P]!==L[P]||me)&&he(L)},[L,me,y,M,_,P]);const st=Oe===""?T:T.filter(ce=>ce[P].normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().includes(Oe.toLowerCase())),U=pn({"ring-red-300 focus:ring-red-300 text-red-900":a&&!f,"text-gray-500":!a,"focus:ring-indigo-600":!a&&!f}),Xe=pn({"text-red-400":a&&!f,"text-gray-400":!a}),De=ce=>{he(ce),u({target:{value:ce,checked:!1,name:v,type:void 0,id:ce[_]}})};return j.jsxs(nn,{as:"div",value:y,children:[j.jsx(nn.Label,{className:ae("block text-sm font-medium leading-6 text-gray-500 mb-0.5",k!==""&&k),children:n}),j.jsxs("div",{className:ae("relative",E!==""&&E),children:[j.jsx(ko,{className:"text-sm",classNameContainer:"w-full",message:y[P],children:j.jsxs(nn.Button,{className:"w-full","data-testid":`listbox-button-${x}`,children:[y.iconStart&&j.jsx("span",{className:"absolute inset-y-0 left-0 flex items-center pl-2",children:y.iconStart}),j.jsx(nn.Input,{className:ae("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",U,R!==""&&R),onChange:ce=>Ce(ce.target.value.normalize("NFD").replace(/[\u0300-\u036f]/g,"")),displayValue:ce=>{var Te;return(Te=ce[P])==null?void 0:Te.trim()},autoComplete:"off",readOnly:!q||f,style:{height:t,...l},"data-testid":"input-search",onClick:()=>_e(f?!1:!Ie),onBlur:()=>_e(!1)})]})}),y.iconEnd&&j.jsx("span",{className:"absolute inset-y-0 right-4 flex items-center pr-4",children:y.iconEnd}),!f&&j.jsx(nn.Button,{className:"absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none",onClick:()=>_e(f?!1:!Ie),"data-testid":"arrow-button",children:j.jsx(wc,{className:ae("h-5 w-5 ml-auto transition-transform","transform",Ie&&"rotate-180",Xe)})}),!f&&j.jsx(j.Fragment,{children:ne?j.jsx(nn.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:j.jsx(Jn,{})}):(st??[]).length>0?j.jsx(nn.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:st.map((ce,Te)=>j.jsx(nn.Option,{value:ce,className:ae(ce[_]===y[_]?`${B} text-white`:"text-gray-900",`relative cursor-default select-none p-2 hover:text-white hover:${B}`),"data-testid":`select-${x}-${ce[_]}`,onClick:()=>De(ce),children:j.jsxs("div",{className:"flex justify-between items-center",children:[j.jsxs("div",{className:"flex items-center",children:[ce.iconStart&&j.jsx("span",{className:"mr-2","aria-hidden":"true",children:ce.iconStart}),j.jsx("span",{className:"font-normal hyphens-auto break-words overflow-hidden",children:ce[P]})]}),ce.iconEnd&&j.jsx("span",{className:"ml-2","aria-hidden":"true",children:ce.iconEnd})]})},Te))}):j.jsx(nn.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:j.jsx("p",{"data-testid":"empty-options",children:"Sin opciones"})})})]}),m.length>0&&a&&j.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:R,classNameLabel:T="",classNameContainer:M="",className:L="",onKeyDown:P,options:_,idSelect:B,isMarginLeft:q=!0,classNameSelect:ne="w-20",type:oe="text"})=>{const{width:me}=al(),Ne=pn({"ring-red-300 focus:ring-red-300 text-red-900":x,"focus:ring-indigo-600 text-gray-500":!x});return j.jsxs(j.Fragment,{children:[j.jsx("style",{children:`
|
|
95
|
+
`}),y.jsx(Yr.Button,{as:"div",onClick:()=>ye(ue),"data-testid":`menu-button-${le}`,ref:ze,children:e}),u.createPortal(y.jsx("div",{style:Me,className:x(s,ue&&"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(Yr.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,Be&&"w-custom"),"data-testid":"dropdown-menu",children:[y.jsxs("div",{className:"sticky top-0 bg-white w-full",children:[A!==null&&y.jsx("div",{className:x("py-2 w-full",p),children:y.jsx(tl,{htmlFor:"search",id:`dropdown-search-${le}`,name:"search",type:"text",placeholder:F,handleChange:de=>A(de,le),icon:F!==""&&y.jsx(gm,{className:"w-4 h-4 text-indigo-300"}),className:"pl-5 pr-4 h-8",classNameContainerInput:"w-full",value:D,onKeyDown:de=>de.key===" "&&de.stopPropagation(),autocomplete:"off"})}),Ae!==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",it.size>0?"opacity-1 cursor-pointer":"opacity-0 cursor-default"),outline:"",classNameText:"text-xs text-white text-center",id:"delete",onClick:Bt,children:"Descartar"}),y.jsx(gr,{classNameButton:"bg-secondary-2 hover:bg-secondary-3 font-medium px-2 py-1.5 rounded-md",outline:it.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:it.size===0&&$e,onClick:()=>Ae({id:le,items:Array.from(Rt.values())}),children:at})]})]}),ge&&!ut&&y.jsx("div",{className:"flex flex-wrap ml-7 pt-1",children:Array.from(Rt).map((de,We)=>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:[de[1][w],y.jsx("button",{type:"button",className:"p-0.5 rounded-sm bg-gray-100 hover:bg-gray-300",onClick:()=>et(de[1]),"data-testid":`tag-${de[0]}`,children:y.jsx(jm,{className:"h-2.5 w-2.5 stroke-gray-700/50 group-hover:stroke-gray-700/75"})})]})},de))}),y.jsx("div",{className:"divide-y divide-gray-100",children:(ut?[]:i).map((de,We)=>y.jsx("div",{className:x(!z&&"py-1",K&&We===0&&"sticky top-0"),children:z?y.jsx("div",{onClick:Ot=>{Ot.preventDefault(),g()},"data-testid":`item-component-${We}`,children:de}):y.jsx(Yr.Item,{children:y.jsx("span",{className:x(it.has(de[O])&&"blue text-white",!it.has(de[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-${We}`,onClick:Ot=>{Ot.preventDefault(),re(de)},children:Ln(de[w])})})},We))})]})})})}),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 F=[];for(let D=1;D<=I;D++)F.push(D);O(F)},[I]),n.useEffect(()=>{let F=[];const D="...",H="... ",z=" ...";if(w.length<6)F=w;else if(d>=1&&d<=3)F=[1,2,3,4,D,w.length];else if(d===4)F=[...w.slice(0,5),D,w.length];else if(d>4&&d<w.length-2){const K=w.slice(d-2,d),ue=w.slice(d,d+1);F=[1,H,...K,...ue,z,w.length]}else if(d>w.length-3){const K=w.slice(w.length-4);F=[1,H,...K]}g(F)},[d,w]),n.useEffect(()=>{c!==null&&c!==d&&p(c)},[c,d]);const L=F=>{p(F),s(F)},N=()=>{p(d===1?d:d-1),d>1&&o(d-1)},A=()=>{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((F,D)=>y.jsx(Ri,{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!=="... "&&L(F),id:`page-${D+1}`,children:F},D))}),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:A,"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,[L]=I,N=new FileReader;N.readAsDataURL(L),N.onload=function(){e(A=>({...A,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:L=null,isPadding:N=!0,isReadOnly:A=!1,isEdit:F=!1,deleteItem:D=null,validateAdd:H=null,loading:z=!1,internalEdit:K=!0,isDataEmpty:ue=!0,typeProp:le="value",setAdd:ve=null,hasNoRecords:Ue=!0,tabs:Be=null,selectTab:ge=null})=>{const[xe,Ee]=n.useState(!1),[Ae,at]=n.useState(!1),[,pt]=n.useState(!1),[Z,ut]=n.useState(""),[$e,gt]=n.useState(1);n.useEffect(()=>{Ee(i),pt(A)},[i,A]);const se=({e:Me,index:St})=>{const Ke=m(p),{name:Lt,value:re}=Me.target;!(H!==null&&H({value:re,copyData:Ke,index:St}))&&(Ke[St][Lt]=re),h(Ke),s(g,Ke),o(ye=>({...ye,[g]:Ke}))},ze=()=>{if(p.some(Me=>Object.values(Me).some(St=>St[le]===-1))||p.length===0)return O({type:"ALERT",payload:{title:"",message:"Todos los campos son requeridos",typeAlert:"warning",active:!0}});o(Me=>({...Me,data:p})),s(g,p),h([...p,w]),ve&&ve([...p,w])},it=({index:Me,item:St})=>{if(p.length===1&&!F)return;const Ke=m(p);Ke.splice(Me,1),o(Lt=>({...Lt,data:Ke})),s(g,Ke),h(Ke),D&&D({index:Me,item:St,data:Ke}),Me===p.length-1&&F&&Ke.length===0&&(o(Lt=>({...Lt,data:Ke})),s(g,Ke),h([...Ke,w]))},Tt=()=>{at(!Ae),pt(!1)},Rt=()=>{if(p.length>1)return;if(p.length===0)return!0;const[Me]=p,{rol:St,privileges:Ke,limitedPrivileges:Lt,...re}=Me;return Object.values(re).every(ye=>Object.values(ye)[0]===-1)},wt=({tab:Me})=>{gt(Me.id),ge&&ge({tab:Me})};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:()=>Ee(!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:[L&&y.jsx(tl,{htmlFor:"search",id:"search",name:"search",type:"text",autoComplete:"search",placeholder:"Buscar...",handleChange:Me=>{L(Me),ut(Me.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:Z,onClick:Me=>Me.stopPropagation(),onFocus:()=>Ee(!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:[Be&&y.jsx("nav",{className:"flex justify-center border-b border-gray-200","aria-label":"Tabs",children:Be.map(Me=>y.jsx("span",{className:x($e===Me.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===Me.id?"page":void 0,onClick:()=>wt({tab:Me}),"data-testid":`tab-${Me.id}`,children:Me.name},Me.name))}),y.jsxs("div",{className:x("sm:mt-2.5 py-3.5 relative",N&&Be===null&&"px-4 sm:p-6",N&&Be!==null&&"px-4 sm:px-6 sm:pb-6 sm:pt-2.5"),children:[K&&!Ae&&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,{})}),ue&&Rt()&&Ue&&!z&&(K?!Ae:!F)&&y.jsx("p",{className:"text-gray-800 text-center","data-testid":"records-empty",children:"No hay registros para mostrar"}),!z&&p.map((Me,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:Me,index:St,handleChange:se,isEdit:K?Ae:F}):e,I&&(K?Ae: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(_m,{className:x("w-6 h-4",(p.length>1||F)&&"cursor-pointer"),style:{color:"#637381"},strokeWidth:2.5,onClick:()=>it({index:St,item:Me}),"data-testid":`delete-item-${St}-${g}`})})]},St)),I&&(K?Ae:F)&&!z&&y.jsx("p",{className:"text-secondary-2 text-sm font-medium ml-3 cursor-pointer",onClick:ze,"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=tl,r.InputDropdown=Um,r.MESSAGE_ABORT_CONTROLLER=R,r.MESSAGE_SIGNAL_ABORTED_WITHOUT_REASON=T,r.Modal=Li,r.Pagination=Gm,r.Select=Ai,r.Spinner=Hm,r.SpinnerIcon=br,r.Switch=Vm,r.Textarea=Zm,r.Tooltip=el,r.classNames=x,r.copyOptions=m,r.generateAvatarInitials=E,r.isPromise=k,r.rowsPerPage=Di,r.useCloseModal=M,r.useForm=$,r.useMediaQuery=P,r.useWindowDimensions=B,r.validateEmail=v,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})})})(Io,Io.exports);var ri=Io.exports;const ko=({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 T=x.current.getBoundingClientRect();v({top:T.bottom+window.scrollY,left:T.left+window.scrollX}),a(!0)},k=()=>{a(!1)},R=j.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:j.jsx("div",{className:ri.classNames("absolute z-40 px-4 mt-0 sm:px-0",t!==""&&t),style:{top:m.top,left:m.left,position:"absolute"},children:j.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 j.jsxs(j.Fragment,{children:[j.jsx("div",{ref:x,className:ri.classNames("inline-block",l!==""&&l),onMouseEnter:E,onMouseLeave:k,"data-testid":"container-tooltip",style:u,children:r}),typeof window<"u"&&wr.createPortal(R,document.body)]})},Po=({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:R,classNameLabel:T="",classNameContainerInput:M="",classNameContainer:$="",className:P="",icon:B=null,onKeyDown:_,onFocus:q,min:ne,max:oe,maxWidth:me=5e3})=>{const[Ne,Oe]=b.useState(!1),Ce=pn({"ring-red-300 focus:ring-red-300 text-red-900":x||Ne,"focus:ring-indigo-600 text-gray-500":!x&&!Ne}),y=he=>{if(f&&f(he),n!=="email")return;const{value:Ie}=he.target,_e=sl(Ie);Oe(!_e)};return j.jsxs("div",{"data-testid":`container-input-${R}`,className:$,children:[l!==""&&j.jsx("label",{htmlFor:r,className:ae("block text-sm font-medium leading-6",!T.includes("mb-")&&"mb-0.5",T!==""?T:"text-gray-700"),"data-testid":`label-${R}`,children:l}),j.jsxs("div",{className:ae("relative rounded-md",M!==""&&M),children:[j.jsx(ko,{className:"text-sm",classNameContainer:"w-full",message:n==="password"?"":m,children:j.jsx("input",{id:R,name:u,type:n,autoComplete:k,placeholder:t,onChange:y,onClick:a,onKeyDown:_,onFocus:q,value:m,readOnly:v,"data-testid":`input-${R}`,min:ne,className:ae("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",Ce,P!==""&&P),style:{maxWidth:`${me}px`}})}),B!==null&&j.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3",children:B}),x&&B===null&&j.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:j.jsx(Jl,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),E.length===0||!x?null:j.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${R}`,children:E})]})};function Jn({className:t="w-6 h-6",color:l="#3730a3"}){return j.jsxs("svg",{className:ae("fill-current animate-spin",t),viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[j.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:l,strokeWidth:"4",fill:"none"}),j.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 j.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:[j.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"}),j.jsx(Jn,{className:"w-8 h-8 animate-spin"})]})}const oi=({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:R="",options:T,value:M=-1,defaultValue:$={value:-1,label:"",iconStart:null,iconEnd:null},defaultLabel:P="label",defaultId:B="value",bgOptionSelect:_="bg-indigo-600",isSearch:q=!1,loading:ne=!1,isSingleOptionAndFirstLoad:oe=!0,isTest:me=!1})=>{const Ne=b.useRef(!0),[Oe,Ce]=b.useState(""),[y,he]=b.useState($),[Ie,_e]=b.useState(!1);b.useEffect(()=>{if((T==null?void 0:T.length)!==1||!Ne.current)return;Ne.current=!1;const[ce]=T,Te=ce[B],Je=ce[P];he({value:Te,label:Je}),oe&&u({target:{value:ce,checked:!1,name:v,type:void 0,id:ce[B]}})},[T,B,P,u,v,oe]),b.useEffect(()=>{if(M===-1||(T==null?void 0:T.length)===0)return;const ce=T==null?void 0:T.find(Te=>Te[B]===M);ce&&he(ce)},[M,T,B]),b.useEffect(()=>{M==="clear"&&(y[B]!==$[B]||y[P]!==$[P]||me)&&he($)},[$,me,y,M,B,P]);const st=Oe===""?T:T.filter(ce=>ce[P].normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().includes(Oe.toLowerCase())),U=pn({"ring-red-300 focus:ring-red-300 text-red-900":a&&!f,"text-gray-500":!a,"focus:ring-indigo-600":!a&&!f}),Xe=pn({"text-red-400":a&&!f,"text-gray-400":!a}),De=ce=>{he(ce),u({target:{value:ce,checked:!1,name:v,type:void 0,id:ce[B]}})};return j.jsxs(nn,{as:"div",value:y,children:[j.jsx(nn.Label,{className:ae("block text-sm font-medium leading-6 text-gray-500 mb-0.5",k!==""&&k),children:n}),j.jsxs("div",{className:ae("relative",E!==""&&E),children:[j.jsx(ko,{className:"text-sm",classNameContainer:"w-full",message:y[P],children:j.jsxs(nn.Button,{className:"w-full","data-testid":`listbox-button-${x}`,children:[y.iconStart&&j.jsx("span",{className:"absolute inset-y-0 left-0 flex items-center pl-2",children:y.iconStart}),j.jsx(nn.Input,{className:ae("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",U,R!==""&&R),onChange:ce=>Ce(ce.target.value.normalize("NFD").replace(/[\u0300-\u036f]/g,"")),displayValue:ce=>{var Te;return(Te=ce[P])==null?void 0:Te.trim()},autoComplete:"off",readOnly:!q||f,style:{height:t,...l},"data-testid":"input-search",onClick:()=>_e(f?!1:!Ie),onBlur:()=>_e(!1)})]})}),y.iconEnd&&j.jsx("span",{className:"absolute inset-y-0 right-4 flex items-center pr-4",children:y.iconEnd}),!f&&j.jsx(nn.Button,{className:"absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none",onClick:()=>_e(f?!1:!Ie),"data-testid":"arrow-button",children:j.jsx(wc,{className:ae("h-5 w-5 ml-auto transition-transform","transform",Ie&&"rotate-180",Xe)})}),!f&&j.jsx(j.Fragment,{children:ne?j.jsx(nn.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:j.jsx(Jn,{})}):(st??[]).length>0?j.jsx(nn.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:st.map((ce,Te)=>j.jsx(nn.Option,{value:ce,className:ae(ce[B]===y[B]?`${_} text-white`:"text-gray-900",`relative cursor-default select-none p-2 hover:text-white hover:${_}`),"data-testid":`select-${x}-${ce[B]}`,onClick:()=>De(ce),children:j.jsxs("div",{className:"flex justify-between items-center",children:[j.jsxs("div",{className:"flex items-center",children:[ce.iconStart&&j.jsx("span",{className:"mr-2","aria-hidden":"true",children:ce.iconStart}),j.jsx("span",{className:"font-normal hyphens-auto break-words overflow-hidden",children:ce[P]})]}),ce.iconEnd&&j.jsx("span",{className:"ml-2","aria-hidden":"true",children:ce.iconEnd})]})},Te))}):j.jsx(nn.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:j.jsx("p",{"data-testid":"empty-options",children:"Sin opciones"})})})]}),m.length>0&&a&&j.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:R,classNameLabel:T="",classNameContainer:M="",className:$="",onKeyDown:P,options:B,idSelect:_,isMarginLeft:q=!0,classNameSelect:ne="w-20",type:oe="text"})=>{const{width:me}=al(),Ne=pn({"ring-red-300 focus:ring-red-300 text-red-900":x,"focus:ring-indigo-600 text-gray-500":!x});return j.jsxs(j.Fragment,{children:[j.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 V}}function Vi(C,V){{if
|
|
|
101
101
|
input[type="number"] {
|
|
102
102
|
-moz-appearance: textfield;
|
|
103
103
|
}
|
|
104
|
-
`}),j.jsxs("div",{"data-testid":`container-input-${R}`,className:M,children:[l!==""&&j.jsx("label",{htmlFor:r,className:ae("block text-sm font-medium leading-6",T!==""?T:"text-gray-700"),"data-testid":`label-${R}`,children:l}),j.jsxs("div",{className:"relative mt-1 rounded-md shadow-sm",children:[j.jsx("div",{className:"absolute inset-y-0 -top-0.5 flex items-center",style:{left:"2px"},children:j.jsx(oi,{name:
|
|
104
|
+
`}),j.jsxs("div",{"data-testid":`container-input-${R}`,className:M,children:[l!==""&&j.jsx("label",{htmlFor:r,className:ae("block text-sm font-medium leading-6",T!==""?T:"text-gray-700"),"data-testid":`label-${R}`,children:l}),j.jsxs("div",{className:"relative mt-1 rounded-md shadow-sm",children:[j.jsx("div",{className:"absolute inset-y-0 -top-0.5 flex items-center",style:{left:"2px"},children:j.jsx(oi,{name:_,onChange:Oe=>u(Oe),id:_,options:B,value:m,isReadOnly:v,className:ne,height:me<=640?"28px":"32px",classNameInput:ae(q&&"ml-3.5"),style:{paddingRight:0,boxShadow:"none"},isDisabledFocus:!0})}),j.jsx("input",{id:R,name:n,type:oe,autoComplete:k,placeholder:t,readOnly:v,"data-testid":`input-${R}`,onClick:f,onKeyDown:P,onChange:Oe=>u(Oe),value:a,className:ae("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",Ne,$!==""&&$)}),x&&j.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:j.jsx(Jl,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),E.length===0||!x?null:j.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${R}`,children:E})]})]})},ad=({setValuesDefault:t,status:l=!1,isReadOnly:r=!1,handleClick:n,text:u="",updateStatus:f=!1,id:a="",isHiddenText:m=!1,setForm:v,handleChange:x,textActive:E="Activo",textInactive:k="Inactivo"})=>{const[R,T]=b.useState(!1);b.useEffect(()=>{T(l),t("status",l),v($=>({...$,status:l}))},[l,t,f,v]);const M=()=>{T(!R),t("status",!R),v($=>({...$,status:!R})),x({target:{checked:!R,value:!R,name:"status",type:"",id:""}}),n&&n()};return j.jsxs("div",{className:"flex",children:[j.jsxs(Ju,{checked:R,onChange:M,className:ae("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",R?"bg-success-1":"bg-gray-200"),"data-testid":`switch-${a}`,disabled:r,children:[j.jsx("span",{className:"sr-only",children:"Use setting"}),j.jsx("span",{"aria-hidden":"true",className:ae("pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",R?"translate-x-full":"translate-x-0")})]}),u!==""?j.jsx("p",{className:ae("text-sm font-medium text-gray-500 ml-2 self-end",m&&"hidden"),children:u}):j.jsx("p",{className:ae("text-sm font-medium text-gray-500 ml-2 self-end",m&&"hidden"),"data-testid":"text-switch",children:R?E:k})]})};function ud({label:t="",id:l,htmlFor:r="",classNameLabel:n="",className:u="",rows:f=4,name:a,placeholder:m="",helperText:v="",isReadOnly:x=!1,isError:E=!1,onChange:k,value:R,idInput:T,nameInput:M,placeholderInput:$="",isReadOnlyInput:P=!1,valueInput:B,infoTop:_=null,infoBottom:q=null,classNameInfoTop:ne="h-4",classNameInfoBottom:oe="h-2",isInputTitle:me=!1,hiddenBorder:Ne=!1}){const Oe=pn({"ring-red-300 focus:ring-red-300 text-red-900":E,"focus:ring-indigo-600 text-gray-700":!E});return j.jsxs(j.Fragment,{children:[t!==""&&j.jsx("label",{htmlFor:r,className:ae("leading-6 block text-sm",n!==""&&n),children:t}),j.jsxs("div",{className:"relative overflow-x-hidden",children:[_!==null&&j.jsx("div",{className:"absolute top-2 left-3 w-full",children:_}),j.jsxs("div",{className:ae("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",Oe),children:[_!==null&&j.jsx("div",{className:"py-2","aria-hidden":"true",children:j.jsx("div",{className:"py-px",children:j.jsx("div",{className:ne})})}),me&&j.jsx("textarea",{name:M,id:T,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:$,value:B,onChange:k,rows:2,readOnly:P}),j.jsx("textarea",{placeholder:m,rows:f,name:a,id:l,className:ae(me||Ne?"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",Oe,u!==""&&u),readOnly:x,onChange:k,value:R,"data-testid":`textarea-${l}`}),q!==null&&j.jsx("div",{className:"py-2","aria-hidden":"true",children:j.jsx("div",{className:"py-px",children:j.jsx("div",{className:oe})})})]}),q!==null&&j.jsx("div",{className:"absolute bottom-2 left-3 w-full",children:q})]}),v.length>0&&E&&j.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${l}`,children:v})]})}const cd=({children:t,data:l,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:k="",defaultId:R=null,loading:T=!1,search:M=null,searchPlaceHolder:$="Buscar...",valueSearch:P=void 0,idsOptionSelect:B=null,isComponent:_,isSticky:q=!1,hiddenMenu:ne=!1,id:oe,onClick:me=()=>{},isRelative:Ne=!0,isMaxWidth:Oe=!1,isTag:Ce=!1,isClear:y=!1,clear:he=null,applyButton:Ie=null,applyButtonText:_e="Aplicar",tagsParent:st=[],isClearTagsParent:U=!1,isReadOnly:Xe,isDisabledApplyButton:De=!0,isOpenMenu:ce=void 0})=>{const Te=b.useRef(null),Je=b.useRef(null),[Qe,yt]=b.useState(new Set),[kt,ft]=b.useState(new Map);b.useEffect(()=>{B!==null&&yt(new Set(new Set(B)))},[B]),b.useEffect(()=>{U&&ft(new Map)},[U]),b.useEffect(()=>{if(st.length===0)return;const G=new Map;st.forEach(Q=>G.set(Q.id,Q)),ft(G)},[st]),b.useEffect(()=>{y&&(yt(new Set),ft(new Map),he&&he())},[he,y]);const Wt=G=>{let Q=new Map(kt),Re=new Set(Qe),Ze=null;if(R!==null&&(G[E]===R&&(Ze=crypto.randomUUID()),Ze!==null&&(G[E]=Ze),Ze!==null&&(G[x]=G[x].replace(k,"").trim())),Re.has(G[E])?Re.delete(G[E]):Re.add(G[E]),Q.has(G[E])?Q.delete(G[E]):Q.set(G[E],G),!m){const ke=Array.from(Re),Pt=Array.from(Q);ke.shift(),Pt.shift(),Re=Re.size===2?new Set(ke):Re,Q=Q.size===2?new Map(Pt):Q}v(G,Array.from(Re),Ze!==null),yt(Re),ft(Q)},je=G=>{me(G===!0?-1:oe)},ot=G=>{const Q=new Set(Qe),Re=new Map(kt);Q.delete(G[E]),Re.delete(G[E]),v(G,Array.from(Q)),yt(Q),ft(Re)},Ve=()=>{if(Qe.size===0)return;const G=new Set(Qe),Q=new Map(kt);G.clear(),Q.clear(),v(null,Array.from(G)),yt(G),ft(Q)};function ie(G){if(typeof G!="string")return G;const Q=G.toLowerCase();return Q.charAt(0).toUpperCase()+Q.slice(1)}return j.jsxs(Pr,{as:"div",className:ae("inline-block text-left",Ne&&"relative",u!==""&&u),onClick:()=>je(!0),"data-testid":`menu-${oe}`,id:oe,ref:Te,children:[j.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 V}}function Vi(C,V){{if
|
|
|
118
118
|
width: 414px;
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
|
-
`}),j.jsx(Pr.Button,{as:"div",onClick:()=>je(ne),"data-testid":`menu-button-${oe}`,ref:Je,children:t}),j.jsx("div",{className:ae("absolute right-0 z-20",n,ne&&"hidden",T&&"w-full"),children:j.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:ce,children:j.jsx(Pr.Items,{className:ae("mt-1 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",T?"w-full":f===""&&"w-max",f!==""&&f),children:T?j.jsx("div",{className:"flex justify-center py-4",children:j.jsx(Jn,{})}):j.jsxs("div",{className:ae(!B&&"pb-1",r!==""&&r,Oe&&"w-custom"),"data-testid":"dropdown-menu",children:[j.jsxs("div",{className:"sticky top-0 bg-white w-full",children:[M!==null&&j.jsx("div",{className:ae("py-2 w-full",a),children:j.jsx(Po,{htmlFor:"search",id:`dropdown-search-${oe}`,name:"search",type:"text",placeholder:L,handleChange:G=>M(G,oe),icon:L!==""&&j.jsx(Rc,{className:"w-4 h-4 text-indigo-300"}),className:"pl-5 pr-4 h-8",classNameContainerInput:"w-full",value:P,onKeyDown:G=>G.key===" "&&G.stopPropagation(),autocomplete:"off"})}),Ie!==null&&j.jsxs("div",{className:ae("pt-1.5 justify-end flex items-center",a),children:[j.jsx(Xn,{classNameButton:ae("bg-gray-400 hover:bg-gray-400 font-medium px-2 py-1.5 rounded-md",Qe.size>0?"opacity-1 cursor-pointer":"opacity-0 cursor-default"),outline:"",classNameText:"text-xs text-white text-center",id:"delete",onClick:Ve,children:"Descartar"}),j.jsx(Xn,{classNameButton:"bg-secondary-2 hover:bg-secondary-3 font-medium px-2 py-1.5 rounded-md",outline:Qe.size===0&&De?"":"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:Qe.size===0&&De,onClick:()=>Ie({id:oe,items:Array.from(kt.values())}),children:_e})]})]}),Ce&&!Xe&&j.jsx("div",{className:"flex flex-wrap ml-7 pt-1",children:Array.from(kt).map((G,Q)=>j.jsx("div",{className:"mr-1",children:j.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:[G[1][x],j.jsx("button",{type:"button",className:"p-0.5 rounded-sm bg-gray-100 hover:bg-gray-300",onClick:()=>ot(G[1]),"data-testid":`tag-${G[0]}`,children:j.jsx(Wc,{className:"h-2.5 w-2.5 stroke-gray-700/50 group-hover:stroke-gray-700/75"})})]})},G))}),j.jsx("div",{className:"divide-y divide-gray-100",children:(Xe?[]:l).map((G,Q)=>j.jsx("div",{className:ae(!B&&"py-1",q&&Q===0&&"sticky top-0"),children:B?j.jsx("div",{onClick:Re=>{Re.preventDefault(),v()},"data-testid":`item-component-${Q}`,children:G}):j.jsx(Pr.Item,{children:j.jsx("span",{className:ae(Qe.has(G[E])&&"blue text-white",!Qe.has(G[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-${Q}`,onClick:Re=>{Re.preventDefault(),Wt(G)},children:ie(G[x])})})},Q))})]})})})})]})},li=50,dd=({total:t,handleNext:l,handlePrev:r,handleSelectPage:n,page:u=null,pageSize:f=li})=>{const[a,m]=b.useState(1),[v,x]=b.useState([]),[E,k]=b.useState([]),R=Math.ceil(t/f);b.useEffect(()=>{const P=[];for(let _=1;_<=R;_++)P.push(_);k(P)},[R]),b.useEffect(()=>{let P=[];const _="...",B="... ",q=" ...";if(E.length<6)P=E;else if(a>=1&&a<=3)P=[1,2,3,4,_,E.length];else if(a===4)P=[...E.slice(0,5),_,E.length];else if(a>4&&a<E.length-2){const ne=E.slice(a-2,a),oe=E.slice(a,a+1);P=[1,B,...ne,...oe,q,E.length]}else if(a>E.length-3){const ne=E.slice(E.length-4);P=[1,B,...ne]}x(P)},[a,E]),b.useEffect(()=>{u!==null&&u!==a&&m(u)},[u,a]);const T=P=>{m(P),n(P)},M=()=>{m(a===1?a:a-1),a>1&&r(a-1)},L=()=>{a===E.length?m(a):m(a+1),a<E.length&&l(a+1)};return j.jsxs("nav",{className:"flex items-center justify-between border-t border-gray-200 px-4 sm:px-0",children:[j.jsx("div",{className:"-mt-px flex w-0 flex-1",children:j.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:M,"data-testid":"prev",children:[j.jsx(hc,{className:"mr-3 h-5 w-5 text-gray-400","aria-hidden":"true"}),"Anterior"]})}),j.jsx("div",{className:"hidden md:-mt-px md:flex",children:v.map((P,_)=>j.jsx(ti,{className:ae("inline-flex items-center border-t-2 px-4 pt-4 text-sm font-medium",a===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!=="... "&&T(P),id:`page-${_+1}`,children:P},_))}),j.jsx("div",{className:"-mt-px flex w-0 flex-1 justify-end",children:j.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",j.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)"})=>{const E=f.split("."),k=R=>{const{files:T}=R.target,[M]=T,L=new FileReader;L.readAsDataURL(M),L.onload=function(){M.type.startsWith("image/")?(t(_=>({..._,photo:L.result})),l("photo",L.result)):(t(_=>({..._,photo:"https://cdn.pixabay.com/photo/2017/03/08/21/21/file-2127833_1280.png"})),l("photo",L.result))}};return j.jsxs("div",{className:ae("col-span-full",n!==""&&n),children:[j.jsx("label",{htmlFor:"cover-photo",className:"block text-sm font-medium leading-6 text-gray-500",children:x}),j.jsxs("div",{className:ae("mt-2 flex justify-center rounded-lg border-2 border-dotted border-gray-300 cursor-pointer relative",f===null&&"px-9 pt-6 pb-2.5",u!==""&&u),children:[f?j.jsx("img",{src:/(jpg|png|jpe?g|gif|webp|svg)$/i.test(E[E.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:ae(r!==""&&r),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s",objectFit:"contain",height:v},onLoad:R=>R.currentTarget.style.filter="none","data-testid":"img"}):j.jsxs("div",{className:"text-center",children:[j.jsx($c,{"aria-hidden":"true",className:"mx-auto h-12 w-12 text-gray-300"}),j.jsxs("div",{className:"mt-4 flex text-sm leading-6 text-gray-600",children:[j.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:j.jsx("span",{children:"Upload a file"})}),j.jsx("p",{className:"pl-1",children:"or drag and drop"})]}),j.jsx("p",{className:"text-xs leading-5 text-gray-600",children:"PNG, JPG, GIF up to 10MB"})]}),j.jsx("input",{id:"file-upload",name:"file-upload",type:"file",className:"absolute w-full h-full opacity-0 cursor-pointer",onChange:k})]})]})},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:R=null,isPadding:T=!0,isReadOnly:M=!1,isEdit:L=!1,deleteItem:P=null,validateAdd:_=null,loading:B=!1,internalEdit:q=!0,isDataEmpty:ne=!0,typeProp:oe="value",setAdd:me=null,hasNoRecords:Ne=!0,tabs:Oe=null,selectTab:Ce=null})=>{const[he,Ie]=b.useState(!1),[_e,st]=b.useState(!1),[,U]=b.useState(!1),[Xe,De]=b.useState(""),[ce,Te]=b.useState(1);b.useEffect(()=>{Ie(l),U(M)},[l,M]);const Je=({e:je,index:ot})=>{const Ve=Xr(a),{name:ie,value:G}=je.target;!(_===null?!1:_({value:G,copyData:Ve,index:ot}))&&(Ve[ot][ie]=G),m(Ve),n(v,Ve),r(Re=>({...Re,[v]:Ve}))},Qe=()=>{if(a.some(ot=>Object.values(ot).some(G=>G[oe]===-1))||a.length===0)return E({title:"",message:"Todos los campos son requeridos",type:"warning"});r(ot=>({...ot,data:a})),n(v,a),m([...a,x]),me&&me([...a,x])},yt=({index:je,item:ot})=>{if(a.length===1&&!L)return;let Ve=Xr(a);Ve.length===1&&(Ve=[x]),Ve.length>1&&Ve.splice(je,1),r(ie=>({...ie,data:Ve})),n(v,Ve),m(Ve),P&&P({index:je,item:ot,data:Ve}),je===a.length-1&&L&&Ve.length===0&&(r(ie=>({...ie,data:Ve})),n(v,Ve),m([...Ve,x]))},kt=()=>{st(!_e),U(!1)},ft=()=>{if(a.length>1)return;if(a.length===0)return!0;const[je]=a;return!je||typeof je!="object"?!0:Object.keys(je).filter(ie=>{const G=je[ie];return G&&typeof G=="object"&&"value"in G}).every(ie=>je[ie].value===-1)},Wt=({tab:je})=>{Te(je.id),Ce&&Ce({tab:je})};return j.jsxs("div",{className:"divide-y divide-gray-200 rounded-lg bg-white shadow mt-7",children:[j.jsxs("div",{className:"px-4 py-3.5 sm:px-6 flex justify-between items-center cursor-pointer",onClick:()=>Ie(!he),"data-testid":`open-accordion-${v}`,children:[j.jsx("p",{className:"text-gray-500 uppercase text-xs font-bold",children:u}),j.jsxs("div",{className:"flex items-center",children:[R&&j.jsx(Po,{htmlFor:"search",id:"search",name:"search",type:"text",autoComplete:"search",placeholder:"Buscar...",handleChange:je=>{R(je),De(je.target.value)},icon:j.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:Xe,onClick:je=>je.stopPropagation(),onFocus:()=>Ie(!0)}),he?j.jsx(Jc,{className:"w-5 h-5 text-default-5"}):j.jsx(Kc,{className:"w-5 h-5 text-default-5"})]})]}),j.jsx(Cn,{as:b.Fragment,show:he,enter:"transition duration-[400ms]",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"duration-200 transition ease-in-out",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:j.jsxs("div",{children:[Oe&&j.jsx("nav",{className:"flex justify-center border-b border-gray-200","aria-label":"Tabs",children:Oe.map(je=>j.jsx("span",{className:ae(ce===je.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":ce===je.id?"page":void 0,onClick:()=>Wt({tab:je}),"data-testid":`tab-${je.id}`,children:je.name},je.name))}),j.jsxs("div",{className:ae("sm:mt-2.5 py-3.5 relative",T&&Oe===null&&"px-4 sm:p-6",T&&Oe!==null&&"px-4 sm:px-6 sm:pb-6 sm:pt-2.5"),children:[q&&!_e&&j.jsx(Ac,{className:"w-5 h-5 text-gray-400 cursor-pointer absolute right-4",onClick:kt,"data-testid":`edit-role-${v}`}),B&&j.jsx("div",{className:"flex justify-center mt-5",children:j.jsx(Jn,{})}),ne&&ft()&&Ne&&!B&&(q?!_e:!L)&&j.jsx("p",{className:"text-gray-800 text-center","data-testid":"records-empty",children:"No hay registros para mostrar"}),!B&&a.map((je,ot)=>j.jsxs("div",{className:ae("flex flex-col 3xs:flex-row mb-4",T&&"ml-0 3xs:ml-3"),children:[typeof t=="function"?t({item:je,index:ot,handleChange:Je,isEdit:q?_e:L}):t,k&&(q?_e:L)&&j.jsx("div",{style:{backgroundColor:"#B0B8BF",width:"25px",height:"25px"},className:ae("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&&!L&&"opacity-0"),children:j.jsx(nd,{className:ae("w-6 h-4",(a.length>1||L)&&"cursor-pointer"),style:{color:"#637381"},strokeWidth:2.5,onClick:()=>yt({index:ot,item:je}),"data-testid":`delete-item-${ot}-${v}`})})]},ot)),k&&(q?_e:L)&&!B&&j.jsx("p",{className:"text-secondary-2 text-sm font-medium ml-3 cursor-pointer",onClick:Qe,"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 j.jsx("img",{src:t,alt:l,...r?{width:r}:{},...n?{height:n}:{},className:ae(u!==""&&u),loading:f?"eager":"lazy",decoding:"async",style:E,onLoad:()=>x(!0),"data-testid":`image-${m}`})};Se.Accordion=pd,Se.Alert=kc,Se.Avatar=Hc,Se.Bullets=Uc,Se.ButtonOutline=ei,Se.ButtonPagination=ti,Se.ButtonSolid=Xn,Se.Checkbox=Zc,Se.ConfirmationAbandoningCreation=rd,Se.CoverPhoto=fd,Se.Divider=od,Se.Dropdown=cd,Se.GoBack=ld,Se.Image=md,Se.Input=Po,Se.InputDropdown=sd,Se.MESSAGE_ABORT_CONTROLLER=Ji,Se.MESSAGE_SIGNAL_ABORTED_WITHOUT_REASON=Qi,Se.Modal=ni,Se.Pagination=dd,Se.Select=oi,Se.Spinner=id,Se.SpinnerIcon=Jn,Se.Switch=ad,Se.Textarea=ud,Se.Tooltip=ko,Se.classNames=ae,Se.copyOptions=Xr,Se.generateAvatarInitials=Ki,Se.isPromise=Xi,Se.rowsPerPage=li,Se.useCloseModal=es,Se.useForm=ts,Se.useMediaQuery=ns,Se.useWindowDimensions=al,Se.validateEmail=sl,Object.defineProperty(Se,Symbol.toStringTag,{value:"Module"})});
|
|
121
|
+
`}),j.jsx(Pr.Button,{as:"div",onClick:()=>je(ne),"data-testid":`menu-button-${oe}`,ref:Je,children:t}),j.jsx("div",{className:ae("absolute right-0 z-20",n,ne&&"hidden",T&&"w-full"),children:j.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:ce,children:j.jsx(Pr.Items,{className:ae("mt-1 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",T?"w-full":f===""&&"w-max",f!==""&&f),children:T?j.jsx("div",{className:"flex justify-center py-4",children:j.jsx(Jn,{})}):j.jsxs("div",{className:ae(!_&&"pb-1",r!==""&&r,Oe&&"w-custom"),"data-testid":"dropdown-menu",children:[j.jsxs("div",{className:"sticky top-0 bg-white w-full",children:[M!==null&&j.jsx("div",{className:ae("py-2 w-full",a),children:j.jsx(Po,{htmlFor:"search",id:`dropdown-search-${oe}`,name:"search",type:"text",placeholder:$,handleChange:G=>M(G,oe),icon:$!==""&&j.jsx(Rc,{className:"w-4 h-4 text-indigo-300"}),className:"pl-5 pr-4 h-8",classNameContainerInput:"w-full",value:P,onKeyDown:G=>G.key===" "&&G.stopPropagation(),autocomplete:"off"})}),Ie!==null&&j.jsxs("div",{className:ae("pt-1.5 justify-end flex items-center",a),children:[j.jsx(Xn,{classNameButton:ae("bg-gray-400 hover:bg-gray-400 font-medium px-2 py-1.5 rounded-md",Qe.size>0?"opacity-1 cursor-pointer":"opacity-0 cursor-default"),outline:"",classNameText:"text-xs text-white text-center",id:"delete",onClick:Ve,children:"Descartar"}),j.jsx(Xn,{classNameButton:"bg-secondary-2 hover:bg-secondary-3 font-medium px-2 py-1.5 rounded-md",outline:Qe.size===0&&De?"":"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:Qe.size===0&&De,onClick:()=>Ie({id:oe,items:Array.from(kt.values())}),children:_e})]})]}),Ce&&!Xe&&j.jsx("div",{className:"flex flex-wrap ml-7 pt-1",children:Array.from(kt).map((G,Q)=>j.jsx("div",{className:"mr-1",children:j.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:[G[1][x],j.jsx("button",{type:"button",className:"p-0.5 rounded-sm bg-gray-100 hover:bg-gray-300",onClick:()=>ot(G[1]),"data-testid":`tag-${G[0]}`,children:j.jsx(Wc,{className:"h-2.5 w-2.5 stroke-gray-700/50 group-hover:stroke-gray-700/75"})})]})},G))}),j.jsx("div",{className:"divide-y divide-gray-100",children:(Xe?[]:l).map((G,Q)=>j.jsx("div",{className:ae(!_&&"py-1",q&&Q===0&&"sticky top-0"),children:_?j.jsx("div",{onClick:Re=>{Re.preventDefault(),v()},"data-testid":`item-component-${Q}`,children:G}):j.jsx(Pr.Item,{children:j.jsx("span",{className:ae(Qe.has(G[E])&&"blue text-white",!Qe.has(G[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-${Q}`,onClick:Re=>{Re.preventDefault(),Wt(G)},children:ie(G[x])})})},Q))})]})})})})]})},li=50,dd=({total:t,handleNext:l,handlePrev:r,handleSelectPage:n,page:u=null,pageSize:f=li})=>{const[a,m]=b.useState(1),[v,x]=b.useState([]),[E,k]=b.useState([]),R=Math.ceil(t/f);b.useEffect(()=>{const P=[];for(let B=1;B<=R;B++)P.push(B);k(P)},[R]),b.useEffect(()=>{let P=[];const B="...",_="... ",q=" ...";if(E.length<6)P=E;else if(a>=1&&a<=3)P=[1,2,3,4,B,E.length];else if(a===4)P=[...E.slice(0,5),B,E.length];else if(a>4&&a<E.length-2){const ne=E.slice(a-2,a),oe=E.slice(a,a+1);P=[1,_,...ne,...oe,q,E.length]}else if(a>E.length-3){const ne=E.slice(E.length-4);P=[1,_,...ne]}x(P)},[a,E]),b.useEffect(()=>{u!==null&&u!==a&&m(u)},[u,a]);const T=P=>{m(P),n(P)},M=()=>{m(a===1?a:a-1),a>1&&r(a-1)},$=()=>{a===E.length?m(a):m(a+1),a<E.length&&l(a+1)};return j.jsxs("nav",{className:"flex items-center justify-between border-t border-gray-200 px-4 sm:px-0",children:[j.jsx("div",{className:"-mt-px flex w-0 flex-1",children:j.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:M,"data-testid":"prev",children:[j.jsx(hc,{className:"mr-3 h-5 w-5 text-gray-400","aria-hidden":"true"}),"Anterior"]})}),j.jsx("div",{className:"hidden md:-mt-px md:flex",children:v.map((P,B)=>j.jsx(ti,{className:ae("inline-flex items-center border-t-2 px-4 pt-4 text-sm font-medium",a===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!=="... "&&T(P),id:`page-${B+1}`,children:P},B))}),j.jsx("div",{className:"-mt-px flex w-0 flex-1 justify-end",children:j.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:$,"data-testid":"next",children:["Siguiente",j.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.split("."),R=T=>{const{files:M}=T.target,[$]=M,P=new FileReader;P.readAsDataURL($),P.onload=function(){$.type.startsWith("image/")?(t(_=>({..._,photo:P.result})),l("photo",P.result)):(t(_=>({..._,photo:"https://cdn.pixabay.com/photo/2017/03/08/21/21/file-2127833_1280.png"})),l("photo",P.result))}};return j.jsxs("div",{className:ae("col-span-full",n!==""&&n),children:[j.jsx("label",{htmlFor:"cover-photo",className:"block text-sm font-medium leading-6 text-gray-500",children:x}),j.jsxs("div",{className:ae("mt-2 flex justify-center rounded-lg border-2 border-dotted border-gray-300 cursor-pointer relative",f===null&&"px-9 pt-6 pb-2.5",u!==""&&u),children:[f?j.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:ae(r!==""&&r),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s",objectFit:"contain",height:v},onLoad:T=>T.currentTarget.style.filter="none","data-testid":"img"}):j.jsxs("div",{className:"text-center",children:[j.jsx($c,{"aria-hidden":"true",className:"mx-auto h-12 w-12 text-gray-300"}),j.jsxs("div",{className:"mt-4 flex text-sm leading-6 text-gray-600",children:[j.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:j.jsx("span",{children:"Upload a file"})}),j.jsx("p",{className:"pl-1",children:"or drag and drop"})]}),j.jsx("p",{className:"text-xs leading-5 text-gray-600",children:E})]}),j.jsx("input",{id:"file-upload",name:"file-upload",type:"file",className:"absolute w-full h-full opacity-0 cursor-pointer",onChange:R})]})]})},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:R=null,isPadding:T=!0,isReadOnly:M=!1,isEdit:$=!1,deleteItem:P=null,validateAdd:B=null,loading:_=!1,internalEdit:q=!0,isDataEmpty:ne=!0,typeProp:oe="value",setAdd:me=null,hasNoRecords:Ne=!0,tabs:Oe=null,selectTab:Ce=null})=>{const[he,Ie]=b.useState(!1),[_e,st]=b.useState(!1),[,U]=b.useState(!1),[Xe,De]=b.useState(""),[ce,Te]=b.useState(1);b.useEffect(()=>{Ie(l),U(M)},[l,M]);const Je=({e:je,index:ot})=>{const Ve=Xr(a),{name:ie,value:G}=je.target;!(B===null?!1:B({value:G,copyData:Ve,index:ot}))&&(Ve[ot][ie]=G),m(Ve),n(v,Ve),r(Re=>({...Re,[v]:Ve}))},Qe=()=>{if(a.some(ot=>Object.values(ot).some(G=>G[oe]===-1))||a.length===0)return E({title:"",message:"Todos los campos son requeridos",type:"warning"});r(ot=>({...ot,data:a})),n(v,a),m([...a,x]),me&&me([...a,x])},yt=({index:je,item:ot})=>{if(a.length===1&&!$)return;let Ve=Xr(a);Ve.length===1&&(Ve=[x]),Ve.length>1&&Ve.splice(je,1),r(ie=>({...ie,data:Ve})),n(v,Ve),m(Ve),P&&P({index:je,item:ot,data:Ve}),je===a.length-1&&$&&Ve.length===0&&(r(ie=>({...ie,data:Ve})),n(v,Ve),m([...Ve,x]))},kt=()=>{st(!_e),U(!1)},ft=()=>{if(a.length>1)return;if(a.length===0)return!0;const[je]=a;return!je||typeof je!="object"?!0:Object.keys(je).filter(ie=>{const G=je[ie];return G&&typeof G=="object"&&"value"in G}).every(ie=>je[ie].value===-1)},Wt=({tab:je})=>{Te(je.id),Ce&&Ce({tab:je})};return j.jsxs("div",{className:"divide-y divide-gray-200 rounded-lg bg-white shadow mt-7",children:[j.jsxs("div",{className:"px-4 py-3.5 sm:px-6 flex justify-between items-center cursor-pointer",onClick:()=>Ie(!he),"data-testid":`open-accordion-${v}`,children:[j.jsx("p",{className:"text-gray-500 uppercase text-xs font-bold",children:u}),j.jsxs("div",{className:"flex items-center",children:[R&&j.jsx(Po,{htmlFor:"search",id:"search",name:"search",type:"text",autoComplete:"search",placeholder:"Buscar...",handleChange:je=>{R(je),De(je.target.value)},icon:j.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:Xe,onClick:je=>je.stopPropagation(),onFocus:()=>Ie(!0)}),he?j.jsx(Jc,{className:"w-5 h-5 text-default-5"}):j.jsx(Kc,{className:"w-5 h-5 text-default-5"})]})]}),j.jsx(Cn,{as:b.Fragment,show:he,enter:"transition duration-[400ms]",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"duration-200 transition ease-in-out",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:j.jsxs("div",{children:[Oe&&j.jsx("nav",{className:"flex justify-center border-b border-gray-200","aria-label":"Tabs",children:Oe.map(je=>j.jsx("span",{className:ae(ce===je.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":ce===je.id?"page":void 0,onClick:()=>Wt({tab:je}),"data-testid":`tab-${je.id}`,children:je.name},je.name))}),j.jsxs("div",{className:ae("sm:mt-2.5 py-3.5 relative",T&&Oe===null&&"px-4 sm:p-6",T&&Oe!==null&&"px-4 sm:px-6 sm:pb-6 sm:pt-2.5"),children:[q&&!_e&&j.jsx(Ac,{className:"w-5 h-5 text-gray-400 cursor-pointer absolute right-4",onClick:kt,"data-testid":`edit-role-${v}`}),_&&j.jsx("div",{className:"flex justify-center mt-5",children:j.jsx(Jn,{})}),ne&&ft()&&Ne&&!_&&(q?!_e:!$)&&j.jsx("p",{className:"text-gray-800 text-center","data-testid":"records-empty",children:"No hay registros para mostrar"}),!_&&a.map((je,ot)=>j.jsxs("div",{className:ae("flex flex-col 3xs:flex-row mb-4",T&&"ml-0 3xs:ml-3"),children:[typeof t=="function"?t({item:je,index:ot,handleChange:Je,isEdit:q?_e:$}):t,k&&(q?_e:$)&&j.jsx("div",{style:{backgroundColor:"#B0B8BF",width:"25px",height:"25px"},className:ae("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&&!$&&"opacity-0"),children:j.jsx(nd,{className:ae("w-6 h-4",(a.length>1||$)&&"cursor-pointer"),style:{color:"#637381"},strokeWidth:2.5,onClick:()=>yt({index:ot,item:je}),"data-testid":`delete-item-${ot}-${v}`})})]},ot)),k&&(q?_e:$)&&!_&&j.jsx("p",{className:"text-secondary-2 text-sm font-medium ml-3 cursor-pointer",onClick:Qe,"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 j.jsx("img",{src:t,alt:l,...r?{width:r}:{},...n?{height:n}:{},className:ae(u!==""&&u),loading:f?"eager":"lazy",decoding:"async",style:E,onLoad:()=>x(!0),"data-testid":`image-${m}`})};Se.Accordion=pd,Se.Alert=kc,Se.Avatar=Hc,Se.Bullets=Uc,Se.ButtonOutline=ei,Se.ButtonPagination=ti,Se.ButtonSolid=Xn,Se.Checkbox=Zc,Se.ConfirmationAbandoningCreation=rd,Se.CoverPhoto=fd,Se.Divider=od,Se.Dropdown=cd,Se.GoBack=ld,Se.Image=md,Se.Input=Po,Se.InputDropdown=sd,Se.MESSAGE_ABORT_CONTROLLER=Ji,Se.MESSAGE_SIGNAL_ABORTED_WITHOUT_REASON=Qi,Se.Modal=ni,Se.Pagination=dd,Se.Select=oi,Se.Spinner=id,Se.SpinnerIcon=Jn,Se.Switch=ad,Se.Textarea=ud,Se.Tooltip=ko,Se.classNames=ae,Se.copyOptions=Xr,Se.generateAvatarInitials=Ki,Se.isPromise=Xi,Se.rowsPerPage=li,Se.useCloseModal=es,Se.useForm=ts,Se.useMediaQuery=ns,Se.useWindowDimensions=al,Se.validateEmail=sl,Object.defineProperty(Se,Symbol.toStringTag,{value:"Module"})});
|