autoforma 1.0.36 → 1.0.38

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.cjs.js CHANGED
@@ -1,70 +1,30 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react"),io=require("react-dom");function ya(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const H=ya(x),Bc=ya(io);function Lt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var br={exports:{}},Jt={};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react"),_=require("@mantine/core"),R=require("dayjs");function Qe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ot={exports:{}},Ge={};/**
2
2
  * @license React
3
- * react-jsx-runtime.production.js
3
+ * react-jsx-runtime.production.min.js
4
4
  *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var fs;function Wc(){if(fs)return Jt;fs=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,o,s){var a=null;if(s!==void 0&&(a=""+s),o.key!==void 0&&(a=""+o.key),"key"in o){s={};for(var i in o)i!=="key"&&(s[i]=o[i])}else s=o;return o=s.ref,{$$typeof:e,type:n,key:a,ref:o!==void 0?o:null,props:s}}return Jt.Fragment=t,Jt.jsx=r,Jt.jsxs=r,Jt}var Qt={};/**
9
+ */var Jt;function Gr(){if(Jt)return Ge;Jt=1;var e=x,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function a(l,i,u){var f,h={},y=null,w=null;u!==void 0&&(y=""+u),i.key!==void 0&&(y=""+i.key),i.ref!==void 0&&(w=i.ref);for(f in i)n.call(i,f)&&!o.hasOwnProperty(f)&&(h[f]=i[f]);if(l&&l.defaultProps)for(f in i=l.defaultProps,i)h[f]===void 0&&(h[f]=i[f]);return{$$typeof:t,type:l,key:y,ref:w,props:h,_owner:s.current}}return Ge.Fragment=r,Ge.jsx=a,Ge.jsxs=a,Ge}var Ke={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
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 ms;function Yc(){return ms||(ms=1,process.env.NODE_ENV!=="production"&&function(){function e(R){if(R==null)return null;if(typeof R=="function")return R.$$typeof===M?null:R.displayName||R.name||null;if(typeof R=="string")return R;switch(R){case p:return"Fragment";case y:return"Profiler";case h:return"StrictMode";case D:return"Suspense";case S:return"SuspenseList";case j:return"Activity"}if(typeof R=="object")switch(typeof R.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),R.$$typeof){case v:return"Portal";case b:return(R.displayName||"Context")+".Provider";case w:return(R._context.displayName||"Context")+".Consumer";case C:var O=R.render;return R=R.displayName,R||(R=O.displayName||O.name||"",R=R!==""?"ForwardRef("+R+")":"ForwardRef"),R;case $:return O=R.displayName||null,O!==null?O:e(R.type)||"Memo";case k:O=R._payload,R=R._init;try{return e(R(O))}catch{}}return null}function t(R){return""+R}function r(R){try{t(R);var O=!1}catch{O=!0}if(O){O=console;var I=O.error,B=typeof Symbol=="function"&&Symbol.toStringTag&&R[Symbol.toStringTag]||R.constructor.name||"Object";return I.call(O,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",B),t(R)}}function n(R){if(R===p)return"<>";if(typeof R=="object"&&R!==null&&R.$$typeof===k)return"<...>";try{var O=e(R);return O?"<"+O+">":"<...>"}catch{return"<...>"}}function o(){var R=L.A;return R===null?null:R.getOwner()}function s(){return Error("react-stack-top-frame")}function a(R){if(V.call(R,"key")){var O=Object.getOwnPropertyDescriptor(R,"key").get;if(O&&O.isReactWarning)return!1}return R.key!==void 0}function i(R,O){function I(){A||(A=!0,console.error("%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://react.dev/link/special-props)",O))}I.isReactWarning=!0,Object.defineProperty(R,"key",{get:I,configurable:!0})}function c(){var R=e(this.type);return _[R]||(_[R]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),R=this.props.ref,R!==void 0?R:null}function l(R,O,I,B,K,F,Q,ee){return I=F.ref,R={$$typeof:m,type:R,key:O,props:F,_owner:K},(I!==void 0?I:null)!==null?Object.defineProperty(R,"ref",{enumerable:!1,get:c}):Object.defineProperty(R,"ref",{enumerable:!1,value:null}),R._store={},Object.defineProperty(R._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(R,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(R,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Q}),Object.defineProperty(R,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ee}),Object.freeze&&(Object.freeze(R.props),Object.freeze(R)),R}function u(R,O,I,B,K,F,Q,ee){var Z=O.children;if(Z!==void 0)if(B)if(z(Z)){for(B=0;B<Z.length;B++)d(Z[B]);Object.freeze&&Object.freeze(Z)}else console.error("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 d(Z);if(V.call(O,"key")){Z=e(R);var Y=Object.keys(O).filter(function(ne){return ne!=="key"});B=0<Y.length?"{key: someKey, "+Y.join(": ..., ")+": ...}":"{key: someKey}",E[Z+B]||(Y=0<Y.length?"{"+Y.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var Xt;function Kr(){return Xt||(Xt=1,process.env.NODE_ENV!=="production"&&function(){var e=x,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),i=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),w=Symbol.for("react.offscreen"),b=Symbol.iterator,m="@@iterator";function d(c){if(c===null||typeof c!="object")return null;var T=b&&c[b]||c[m];return typeof T=="function"?T:null}var p=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function g(c){{for(var T=arguments.length,$=new Array(T>1?T-1:0),K=1;K<T;K++)$[K-1]=arguments[K];D("error",c,$)}}function D(c,T,$){{var K=p.ReactDebugCurrentFrame,le=K.getStackAddendum();le!==""&&(T+="%s",$=$.concat([le]));var fe=$.map(function(ae){return String(ae)});fe.unshift("Warning: "+T),Function.prototype.apply.call(console[c],console,fe)}}var L=!1,k=!1,v=!1,C=!1,O=!1,F;F=Symbol.for("react.module.reference");function Y(c){return!!(typeof c=="string"||typeof c=="function"||c===n||c===o||O||c===s||c===u||c===f||C||c===w||L||k||v||typeof c=="object"&&c!==null&&(c.$$typeof===y||c.$$typeof===h||c.$$typeof===a||c.$$typeof===l||c.$$typeof===i||c.$$typeof===F||c.getModuleId!==void 0))}function V(c,T,$){var K=c.displayName;if(K)return K;var le=T.displayName||T.name||"";return le!==""?$+"("+le+")":$}function z(c){return c.displayName||"Context"}function P(c){if(c==null)return null;if(typeof c.tag=="number"&&g("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 n:return"Fragment";case r:return"Portal";case o:return"Profiler";case s:return"StrictMode";case u:return"Suspense";case f:return"SuspenseList"}if(typeof c=="object")switch(c.$$typeof){case l:var T=c;return z(T)+".Consumer";case a:var $=c;return z($._context)+".Provider";case i:return V(c,c.render,"ForwardRef");case h:var K=c.displayName||null;return K!==null?K:P(c.type)||"Memo";case y:{var le=c,fe=le._payload,ae=le._init;try{return P(ae(fe))}catch{return null}}}return null}var H=Object.assign,I=0,q,A,U,E,J,j,W;function re(){}re.__reactDisabledLog=!0;function te(){{if(I===0){q=console.log,A=console.info,U=console.warn,E=console.error,J=console.group,j=console.groupCollapsed,W=console.groupEnd;var c={configurable:!0,enumerable:!0,value:re,writable:!0};Object.defineProperties(console,{info:c,log:c,warn:c,error:c,group:c,groupCollapsed:c,groupEnd:c})}I++}}function M(){{if(I--,I===0){var c={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:H({},c,{value:q}),info:H({},c,{value:A}),warn:H({},c,{value:U}),error:H({},c,{value:E}),group:H({},c,{value:J}),groupCollapsed:H({},c,{value:j}),groupEnd:H({},c,{value:W})})}I<0&&g("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var G=p.ReactCurrentDispatcher,X;function ee(c,T,$){{if(X===void 0)try{throw Error()}catch(le){var K=le.stack.trim().match(/\n( *(at )?)/);X=K&&K[1]||""}return`
18
+ `+X+c}}var B=!1,ie;{var Z=typeof WeakMap=="function"?WeakMap:Map;ie=new Z}function ue(c,T){if(!c||B)return"";{var $=ie.get(c);if($!==void 0)return $}var K;B=!0;var le=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var fe;fe=G.current,G.current=null,te();try{if(T){var ae=function(){throw Error()};if(Object.defineProperty(ae.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ae,[])}catch(Se){K=Se}Reflect.construct(c,[],ae)}else{try{ae.call()}catch(Se){K=Se}c.call(ae.prototype)}}else{try{throw Error()}catch(Se){K=Se}c()}}catch(Se){if(Se&&K&&typeof Se.stack=="string"){for(var se=Se.stack.split(`
19
+ `),be=K.stack.split(`
20
+ `),me=se.length-1,pe=be.length-1;me>=1&&pe>=0&&se[me]!==be[pe];)pe--;for(;me>=1&&pe>=0;me--,pe--)if(se[me]!==be[pe]){if(me!==1||pe!==1)do if(me--,pe--,pe<0||se[me]!==be[pe]){var ke=`
21
+ `+se[me].replace(" at new "," at ");return c.displayName&&ke.includes("<anonymous>")&&(ke=ke.replace("<anonymous>",c.displayName)),typeof c=="function"&&ie.set(c,ke),ke}while(me>=1&&pe>=0);break}}}finally{B=!1,G.current=fe,M(),Error.prepareStackTrace=le}var We=c?c.displayName||c.name:"",Ye=We?ee(We):"";return typeof c=="function"&&ie.set(c,Ye),Ye}function N(c,T,$){return ue(c,!1)}function ne(c){var T=c.prototype;return!!(T&&T.isReactComponent)}function Q(c,T,$){if(c==null)return"";if(typeof c=="function")return ue(c,ne(c));if(typeof c=="string")return ee(c);switch(c){case u:return ee("Suspense");case f:return ee("SuspenseList")}if(typeof c=="object")switch(c.$$typeof){case i:return N(c.render);case h:return Q(c.type,T,$);case y:{var K=c,le=K._payload,fe=K._init;try{return Q(fe(le),T,$)}catch{}}}return""}var ce=Object.prototype.hasOwnProperty,Ce={},De=p.ReactDebugCurrentFrame;function he(c){if(c){var T=c._owner,$=Q(c.type,c._source,T?T.type:null);De.setExtraStackFrame($)}else De.setExtraStackFrame(null)}function Oe(c,T,$,K,le){{var fe=Function.call.bind(ce);for(var ae in c)if(fe(c,ae)){var se=void 0;try{if(typeof c[ae]!="function"){var be=Error((K||"React class")+": "+$+" type `"+ae+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof c[ae]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw be.name="Invariant Violation",be}se=c[ae](T,ae,K,$,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(me){se=me}se&&!(se instanceof Error)&&(he(le),g("%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).",K||"React class",$,ae,typeof se),he(null)),se instanceof Error&&!(se.message in Ce)&&(Ce[se.message]=!0,he(le),g("Failed %s type: %s",$,se.message),he(null))}}}var $e=Array.isArray;function oe(c){return $e(c)}function _e(c){{var T=typeof Symbol=="function"&&Symbol.toStringTag,$=T&&c[Symbol.toStringTag]||c.constructor.name||"Object";return $}}function we(c){try{return je(c),!1}catch{return!0}}function je(c){return""+c}function Ae(c){if(we(c))return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",_e(c)),je(c)}var Ne=p.ReactCurrentOwner,Tt={key:!0,ref:!0,__self:!0,__source:!0},tt,rt;function He(c){if(ce.call(c,"ref")){var T=Object.getOwnPropertyDescriptor(c,"ref").get;if(T&&T.isReactWarning)return!1}return c.ref!==void 0}function Ve(c){if(ce.call(c,"key")){var T=Object.getOwnPropertyDescriptor(c,"key").get;if(T&&T.isReactWarning)return!1}return c.key!==void 0}function jt(c,T){typeof c.ref=="string"&&Ne.current}function Ee(c,T){{var $=function(){tt||(tt=!0,g("%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)",T))};$.isReactWarning=!0,Object.defineProperty(c,"key",{get:$,configurable:!0})}}function Be(c,T){{var $=function(){rt||(rt=!0,g("%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)",T))};$.isReactWarning=!0,Object.defineProperty(c,"ref",{get:$,configurable:!0})}}var Ot=function(c,T,$,K,le,fe,ae){var se={$$typeof:t,type:c,key:T,ref:$,props:ae,_owner:fe};return se._store={},Object.defineProperty(se._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(se,"_self",{configurable:!1,enumerable:!1,writable:!1,value:K}),Object.defineProperty(se,"_source",{configurable:!1,enumerable:!1,writable:!1,value:le}),Object.freeze&&(Object.freeze(se.props),Object.freeze(se)),se};function Le(c,T,$,K,le){{var fe,ae={},se=null,be=null;$!==void 0&&(Ae($),se=""+$),Ve(T)&&(Ae(T.key),se=""+T.key),He(T)&&(be=T.ref,jt(T,le));for(fe in T)ce.call(T,fe)&&!Tt.hasOwnProperty(fe)&&(ae[fe]=T[fe]);if(c&&c.defaultProps){var me=c.defaultProps;for(fe in me)ae[fe]===void 0&&(ae[fe]=me[fe])}if(se||be){var pe=typeof c=="function"?c.displayName||c.name||"Unknown":c;se&&Ee(ae,pe),be&&Be(ae,pe)}return Ot(c,se,be,le,K,Ne.current,ae)}}var Pe=p.ReactCurrentOwner,nt=p.ReactDebugCurrentFrame;function ge(c){if(c){var T=c._owner,$=Q(c.type,c._source,T?T.type:null);nt.setExtraStackFrame($)}else nt.setExtraStackFrame(null)}var Ue;Ue=!1;function qe(c){return typeof c=="object"&&c!==null&&c.$$typeof===t}function st(){{if(Pe.current){var c=P(Pe.current.type);if(c)return`
22
+
23
+ Check the render method of \``+c+"`."}return""}}function Lt(c){return""}var at={};function Rt(c){{var T=st();if(!T){var $=typeof c=="string"?c:c.displayName||c.name;$&&(T=`
24
+
25
+ Check the top-level render call using <`+$+">.")}return T}}function de(c,T){{if(!c._store||c._store.validated||c.key!=null)return;c._store.validated=!0;var $=Rt(T);if(at[$])return;at[$]=!0;var K="";c&&c._owner&&c._owner!==Pe.current&&(K=" It was passed a child from "+P(c._owner.type)+"."),ge(c),g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',$,K),ge(null)}}function Re(c,T){{if(typeof c!="object")return;if(oe(c))for(var $=0;$<c.length;$++){var K=c[$];qe(K)&&de(K,T)}else if(qe(c))c._store&&(c._store.validated=!0);else if(c){var le=d(c);if(typeof le=="function"&&le!==c.entries)for(var fe=le.call(c),ae;!(ae=fe.next()).done;)qe(ae.value)&&de(ae.value,T)}}}function Pr(c){{var T=c.type;if(T==null||typeof T=="string")return;var $;if(typeof T=="function")$=T.propTypes;else if(typeof T=="object"&&(T.$$typeof===i||T.$$typeof===h))$=T.propTypes;else return;if($){var K=P(T);Oe($,c.props,"prop",K,c)}else if(T.PropTypes!==void 0&&!Ue){Ue=!0;var le=P(T);g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",le||"Unknown")}typeof T.getDefaultProps=="function"&&!T.getDefaultProps.isReactClassApproved&&g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Wr(c){{for(var T=Object.keys(c.props),$=0;$<T.length;$++){var K=T[$];if(K!=="children"&&K!=="key"){ge(c),g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",K),ge(null);break}}c.ref!==null&&(ge(c),g("Invalid attribute `ref` supplied to `React.Fragment`."),ge(null))}}var Kt={};function Zt(c,T,$,K,le,fe){{var ae=Y(c);if(!ae){var se="";(c===void 0||typeof c=="object"&&c!==null&&Object.keys(c).length===0)&&(se+=" 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 be=Lt();be?se+=be:se+=st();var me;c===null?me="null":oe(c)?me="array":c!==void 0&&c.$$typeof===t?(me="<"+(P(c.type)||"Unknown")+" />",se=" Did you accidentally export a JSX literal instead of a component?"):me=typeof c,g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",me,se)}var pe=Le(c,T,$,le,fe);if(pe==null)return pe;if(ae){var ke=T.children;if(ke!==void 0)if(K)if(oe(ke)){for(var We=0;We<ke.length;We++)Re(ke[We],c);Object.freeze&&Object.freeze(ke)}else g("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 Re(ke,c)}if(ce.call(T,"key")){var Ye=P(c),Se=Object.keys(T).filter(function(qr){return qr!=="key"}),Ft=Se.length>0?"{key: someKey, "+Se.join(": ..., ")+": ...}":"{key: someKey}";if(!Kt[Ye+Ft]){var Ur=Se.length>0?"{"+Se.join(": ..., ")+": ...}":"{}";g(`A props object containing a "key" prop is being spread into JSX:
18
26
  let props = %s;
19
27
  <%s {...props} />
20
28
  React keys must be passed directly to JSX without using spread:
21
29
  let props = %s;
22
- <%s key={someKey} {...props} />`,B,Z,Y,Z),E[Z+B]=!0)}if(Z=null,I!==void 0&&(r(I),Z=""+I),a(O)&&(r(O.key),Z=""+O.key),"key"in O){I={};for(var ie in O)ie!=="key"&&(I[ie]=O[ie])}else I=O;return Z&&i(I,typeof R=="function"?R.displayName||R.name||"Unknown":R),l(R,Z,F,K,o(),I,Q,ee)}function d(R){typeof R=="object"&&R!==null&&R.$$typeof===m&&R._store&&(R._store.validated=1)}var f=x,m=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),b=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),S=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),M=Symbol.for("react.client.reference"),L=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V=Object.prototype.hasOwnProperty,z=Array.isArray,P=console.createTask?console.createTask:function(){return null};f={"react-stack-bottom-frame":function(R){return R()}};var A,_={},N=f["react-stack-bottom-frame"].bind(f,s)(),T=P(n(s)),E={};Qt.Fragment=p,Qt.jsx=function(R,O,I,B,K){var F=1e4>L.recentlyCreatedOwnerStacks++;return u(R,O,I,!1,B,K,F?Error("react-stack-top-frame"):N,F?P(n(R)):T)},Qt.jsxs=function(R,O,I,B,K){var F=1e4>L.recentlyCreatedOwnerStacks++;return u(R,O,I,!0,B,K,F?Error("react-stack-top-frame"):N,F?P(n(R)):T)}}()),Qt}var ps;function Hc(){return ps||(ps=1,process.env.NODE_ENV==="production"?br.exports=Wc():br.exports=Yc()),br.exports}var g=Hc();function Uc(e){if(!/^[0-9a-zA-Z-]+$/.test(e))throw new Error(`[@mantine/use-form] Form name "${e}" is invalid, it should contain only letters, numbers and dashes`)}const Gc=typeof window<"u"?x.useLayoutEffect:x.useEffect;function ke(e,t){Gc(()=>{if(e)return window.addEventListener(e,t),()=>window.removeEventListener(e,t)},[e])}function qc(e,t){e&&Uc(e),ke(`mantine-form:${e}:set-field-value`,r=>t.setFieldValue(r.detail.path,r.detail.value)),ke(`mantine-form:${e}:set-values`,r=>t.setValues(r.detail)),ke(`mantine-form:${e}:set-initial-values`,r=>t.setInitialValues(r.detail)),ke(`mantine-form:${e}:set-errors`,r=>t.setErrors(r.detail)),ke(`mantine-form:${e}:set-field-error`,r=>t.setFieldError(r.detail.path,r.detail.error)),ke(`mantine-form:${e}:clear-field-error`,r=>t.clearFieldError(r.detail)),ke(`mantine-form:${e}:clear-errors`,t.clearErrors),ke(`mantine-form:${e}:reset`,t.reset),ke(`mantine-form:${e}:validate`,t.validate),ke(`mantine-form:${e}:validate-field`,r=>t.validateField(r.detail)),ke(`mantine-form:${e}:reorder-list-item`,r=>t.reorderListItem(r.detail.path,r.detail.payload)),ke(`mantine-form:${e}:remove-list-item`,r=>t.removeListItem(r.detail.path,r.detail.index)),ke(`mantine-form:${e}:insert-list-item`,r=>t.insertListItem(r.detail.path,r.detail.item,r.detail.index)),ke(`mantine-form:${e}:set-dirty`,r=>t.setDirty(r.detail)),ke(`mantine-form:${e}:set-touched`,r=>t.setTouched(r.detail)),ke(`mantine-form:${e}:reset-dirty`,r=>t.resetDirty(r.detail)),ke(`mantine-form:${e}:reset-touched`,t.resetTouched)}function Xc(e){return t=>{if(!t)e(t);else if(typeof t=="function")e(t);else if(typeof t=="object"&&"nativeEvent"in t){const{currentTarget:r}=t;r instanceof HTMLInputElement?r.type==="checkbox"?e(r.checked):e(r.value):(r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement)&&e(r.value)}else e(t)}}function Fn(e){return e===null||typeof e!="object"?{}:Object.keys(e).reduce((t,r)=>{const n=e[r];return n!=null&&n!==!1&&(t[r]=n),t},{})}function Kc(e){const[t,r]=x.useState(Fn(e)),n=x.useRef(t),o=x.useCallback(c=>{r(l=>{const u=Fn(typeof c=="function"?c(l):c);return n.current=u,u})},[]),s=x.useCallback(()=>o({}),[]),a=x.useCallback(c=>{n.current[c]!==void 0&&o(l=>{const u={...l};return delete u[c],u})},[t]),i=x.useCallback((c,l)=>{l==null||l===!1?a(c):n.current[c]!==l&&o(u=>({...u,[c]:l}))},[t]);return{errorsState:t,setErrors:o,clearErrors:s,setFieldError:i,clearFieldError:a}}function Vn(e,t){if(t===null||typeof t!="object")return{};const r={...t};return Object.keys(t).forEach(n=>{n.includes(`${String(e)}.`)&&delete r[n]}),r}function hs(e,t){const r=e.substring(t.length+1).split(".")[0];return parseInt(r,10)}function vs(e,t,r,n){if(t===void 0)return r;const o=`${String(e)}`;let s=r;n===-1&&(s=Vn(`${o}.${t}`,s));const a={...s},i=new Set;return Object.entries(s).filter(([c])=>{if(!c.startsWith(`${o}.`))return!1;const l=hs(c,o);return Number.isNaN(l)?!1:l>=t}).forEach(([c,l])=>{const u=hs(c,o),d=c.replace(`${o}.${u}`,`${o}.${u+n}`);a[d]=l,i.add(d),i.has(c)||delete a[c]}),a}function Zc(e,{from:t,to:r},n){const o=`${e}.${t}`,s=`${e}.${r}`,a={...n};return Object.keys(n).every(i=>{let c,l;if(i.startsWith(o)&&(c=i,l=i.replace(o,s)),i.startsWith(s)&&(c=i.replace(s,o),l=i),c&&l){const u=a[c],d=a[l];return d===void 0?delete a[c]:a[c]=d,u===void 0?delete a[l]:a[l]=u,!1}return!0}),a}function gs(e,t,r){typeof r.value=="object"&&(r.value=Et(r.value)),!r.enumerable||r.get||r.set||!r.configurable||!r.writable||t==="__proto__"?Object.defineProperty(e,t,r):e[t]=r.value}function Et(e){if(typeof e!="object")return e;var t=0,r,n,o,s=Object.prototype.toString.call(e);if(s==="[object Object]"?o=Object.create(e.__proto__||null):s==="[object Array]"?o=Array(e.length):s==="[object Set]"?(o=new Set,e.forEach(function(a){o.add(Et(a))})):s==="[object Map]"?(o=new Map,e.forEach(function(a,i){o.set(Et(i),Et(a))})):s==="[object Date]"?o=new Date(+e):s==="[object RegExp]"?o=new RegExp(e.source,e.flags):s==="[object DataView]"?o=new e.constructor(Et(e.buffer)):s==="[object ArrayBuffer]"?o=e.slice(0):s.slice(-6)==="Array]"&&(o=new e.constructor(e)),o){for(n=Object.getOwnPropertySymbols(e);t<n.length;t++)gs(o,n[t],Object.getOwnPropertyDescriptor(e,n[t]));for(t=0,n=Object.getOwnPropertyNames(e);t<n.length;t++)Object.hasOwnProperty.call(o,r=n[t])&&o[r]===e[r]||gs(o,r,Object.getOwnPropertyDescriptor(e,r))}return o||e}function ba(e){return typeof e!="string"?[]:e.split(".")}function $e(e,t){const r=ba(e);if(r.length===0||typeof t!="object"||t===null)return;let n=t[r[0]];for(let o=1;o<r.length&&n!=null;o+=1)n=n[r[o]];return n}function ur(e,t,r){const n=ba(e);if(n.length===0)return r;const o=Et(r);if(n.length===1)return o[n[0]]=t,o;let s=o[n[0]];for(let a=1;a<n.length-1;a+=1){if(s===void 0)return o;s=s[n[a]]}return s[n[n.length-1]]=t,o}function Jc(e,{from:t,to:r},n){const o=$e(e,n);if(!Array.isArray(o))return n;const s=[...o],a=o[t];return s.splice(t,1),s.splice(r,0,a),ur(e,s,n)}function Qc(e,t,r,n){const o=$e(e,n);if(!Array.isArray(o))return n;const s=[...o];return s.splice(typeof r=="number"?r:s.length,0,t),ur(e,s,n)}function el(e,t,r){const n=$e(e,r);return Array.isArray(n)?ur(e,n.filter((o,s)=>s!==t),r):r}function tl(e,t,r,n){const o=$e(e,n);if(!Array.isArray(o)||o.length<=r)return n;const s=[...o];return s[r]=t,ur(e,s,n)}function rl({$values:e,$errors:t,$status:r}){const n=x.useCallback((i,c)=>{r.clearFieldDirty(i),t.setErrors(l=>Zc(i,c,l)),e.setValues({values:Jc(i,c,e.refValues.current),updateState:!0})},[]),o=x.useCallback((i,c)=>{r.clearFieldDirty(i),t.setErrors(l=>vs(i,c,l,-1)),e.setValues({values:el(i,c,e.refValues.current),updateState:!0})},[]),s=x.useCallback((i,c,l)=>{r.clearFieldDirty(i),t.setErrors(u=>vs(i,l,u,1)),e.setValues({values:Qc(i,c,l,e.refValues.current),updateState:!0})},[]),a=x.useCallback((i,c,l)=>{r.clearFieldDirty(i),e.setValues({values:tl(i,l,c,e.refValues.current),updateState:!0})},[]);return{reorderListItem:n,removeListItem:o,insertListItem:s,replaceListItem:a}}var _n,ys;function nl(){return ys||(ys=1,_n=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,o,s;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(s=Object.keys(t),n=s.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[o]))return!1;for(o=n;o--!==0;){var a=s[o];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}),_n}var ol=nl();const xr=Lt(ol);function er(e,t){const r=Object.keys(e);if(typeof t=="string"){const n=r.filter(o=>o.startsWith(`${t}.`));return e[t]||n.some(o=>e[o])||!1}return r.some(n=>e[n])}function sl({initialDirty:e,initialTouched:t,mode:r,$values:n}){const[o,s]=x.useState(t),[a,i]=x.useState(e),c=x.useRef(t),l=x.useRef(e),u=x.useCallback(S=>{const $=typeof S=="function"?S(c.current):S;c.current=$,r==="controlled"&&s($)},[]),d=x.useCallback((S,$=!1)=>{const k=typeof S=="function"?S(l.current):S;l.current=k,(r==="controlled"||$)&&i(k)},[]),f=x.useCallback(()=>u({}),[]),m=x.useCallback(S=>{const $=S?{...n.refValues.current,...S}:n.refValues.current;n.setValuesSnapshot($),d({})},[]),v=x.useCallback((S,$)=>{u(k=>er(k,S)===$?k:{...k,[S]:$})},[]),p=x.useCallback((S,$,k)=>{d(j=>er(j,S)===$?j:{...j,[S]:$},k)},[]),h=x.useCallback((S,$)=>{const k=er(l.current,S),j=!xr($e(S,n.getValuesSnapshot()),$),M=Vn(S,l.current);M[S]=j,d(M,k!==j)},[]),y=x.useCallback(S=>er(c.current,S),[]),w=x.useCallback(S=>d($=>{if(typeof S!="string")return $;const k=Vn(S,$);return delete k[S],xr(k,$)?$:k}),[]),b=x.useCallback(S=>{if(S){const k=$e(S,l.current);if(typeof k=="boolean")return k;const j=$e(S,n.refValues.current),M=$e(S,n.valuesSnapshot.current);return!xr(j,M)}return Object.keys(l.current).length>0?er(l.current):!xr(n.refValues.current,n.valuesSnapshot.current)},[]),C=x.useCallback(()=>l.current,[]),D=x.useCallback(()=>c.current,[]);return{touchedState:o,dirtyState:a,touchedRef:c,dirtyRef:l,setTouched:u,setDirty:d,resetDirty:m,resetTouched:f,isTouched:y,setFieldTouched:v,setFieldDirty:p,setTouchedState:s,setDirtyState:i,clearFieldDirty:w,isDirty:b,getDirty:C,getTouched:D,setCalculatedFieldDirty:h}}function al({initialValues:e,onValuesChange:t,mode:r}){const n=x.useRef(!1),[o,s]=x.useState(e||{}),a=x.useRef(o),i=x.useRef(o),c=x.useCallback(({values:p,subscribers:h,updateState:y=!0,mergeWithPreviousValues:w=!0})=>{const b=a.current,C=p instanceof Function?p(a.current):p,D=w?{...b,...C}:C;a.current=D,y&&s(D),t==null||t(D,b),h==null||h.filter(Boolean).forEach(S=>S({updatedValues:D,previousValues:b}))},[t]),l=x.useCallback(p=>{var w;const h=$e(p.path,a.current),y=p.value instanceof Function?p.value(h):p.value;if(h!==y){const b=a.current,C=ur(p.path,y,a.current);c({values:C,updateState:p.updateState}),(w=p.subscribers)==null||w.filter(Boolean).forEach(D=>D({path:p.path,updatedValues:C,previousValues:b}))}},[c]),u=x.useCallback(p=>{i.current=p},[]),d=x.useCallback((p,h)=>{n.current||(n.current=!0,c({values:p,updateState:r==="controlled"}),u(p),h())},[c]),f=x.useCallback(()=>{c({values:i.current,updateState:!0,mergeWithPreviousValues:!1})},[c]),m=x.useCallback(()=>a.current,[]),v=x.useCallback(()=>i.current,[]);return{initialized:n,stateValues:o,refValues:a,valuesSnapshot:i,setValues:c,setFieldValue:l,resetValues:f,setValuesSnapshot:u,initialize:d,getValues:m,getValuesSnapshot:v}}function il({$status:e}){const t=x.useRef({}),r=x.useCallback((o,s)=>{x.useEffect(()=>(t.current[o]=t.current[o]||[],t.current[o].push(s),()=>{t.current[o]=t.current[o].filter(a=>a!==s)}),[s])},[]),n=x.useCallback(o=>t.current[o]?t.current[o].map(s=>a=>s({previousValue:$e(o,a.previousValues),value:$e(o,a.updatedValues),touched:e.isTouched(o),dirty:e.isDirty(o)})):[],[]);return{subscribers:t,watch:r,getFieldSubscribers:n}}function bs(e,t){return e?`${e}-${t.toString()}`:t.toString()}const wr=Symbol("root-rule");function xs(e){const t=Fn(e);return{hasErrors:Object.keys(t).length>0,errors:t}}function zn(e,t,r="",n={}){return typeof e!="object"||e===null?n:Object.keys(e).reduce((o,s)=>{const a=e[s],i=`${r===""?"":`${r}.`}${s}`,c=$e(i,t);let l=!1;return typeof a=="function"&&(o[i]=a(c,t,i)),typeof a=="object"&&Array.isArray(c)&&(l=!0,c.forEach((u,d)=>zn(a,t,`${i}.${d}`,o)),wr in a&&(o[i]=a[wr](c,t,i))),typeof a=="object"&&typeof c=="object"&&c!==null&&(l||zn(a,t,i,o),wr in a&&(o[i]=a[wr](c,t,i))),o},n)}function Bn(e,t){return xs(typeof e=="function"?e(t):zn(e,t))}function Sr(e,t,r){if(typeof e!="string")return{hasError:!1,error:null};const n=Bn(t,r),o=Object.keys(n.errors).find(s=>e.split(".").every((a,i)=>a===s.split(".")[i]));return{hasError:!!o,error:o?n.errors[o]:null}}const cl="__MANTINE_FORM_INDEX__";function ws(e,t){return t?typeof t=="boolean"?t:Array.isArray(t)?t.includes(e.replace(/[.][0-9]+/g,`.${cl}`)):!1:!1}function ll({name:e,mode:t="controlled",initialValues:r,initialErrors:n={},initialDirty:o={},initialTouched:s={},clearInputErrorOnChange:a=!0,validateInputOnChange:i=!1,validateInputOnBlur:c=!1,onValuesChange:l,transformValues:u=p=>p,enhanceGetInputProps:d,validate:f,onSubmitPreventDefault:m="always",touchTrigger:v="change"}={}){const p=Kc(n),h=al({initialValues:r,onValuesChange:l,mode:t}),y=sl({initialDirty:o,initialTouched:s,$values:h,mode:t}),w=rl({$values:h,$errors:p,$status:y}),b=il({$status:y}),[C,D]=x.useState(0),[S,$]=x.useState({}),[k,j]=x.useState(!1),M=x.useCallback(()=>{h.resetValues(),p.clearErrors(),y.resetDirty(),y.resetTouched(),t==="uncontrolled"&&D(F=>F+1)},[]),L=x.useCallback(F=>{a&&p.clearErrors(),t==="uncontrolled"&&D(Q=>Q+1),Object.keys(b.subscribers.current).forEach(Q=>{const ee=$e(Q,h.refValues.current),Z=$e(Q,F);ee!==Z&&b.getFieldSubscribers(Q).forEach(Y=>Y({previousValues:F,updatedValues:h.refValues.current}))})},[a]),V=x.useCallback(F=>{const Q=h.refValues.current;h.initialize(F,()=>t==="uncontrolled"&&D(ee=>ee+1)),L(Q)},[L]),z=x.useCallback((F,Q,ee)=>{const Z=ws(F,i),Y=Q instanceof Function?Q($e(F,h.refValues.current)):Q;y.setCalculatedFieldDirty(F,Y),v==="change"&&y.setFieldTouched(F,!0),!Z&&a&&p.clearFieldError(F),h.setFieldValue({path:F,value:Q,updateState:t==="controlled",subscribers:[...b.getFieldSubscribers(F),Z?ie=>{const ne=Sr(F,f,ie.updatedValues);ne.hasError?p.setFieldError(F,ne.error):p.clearFieldError(F)}:null,(ee==null?void 0:ee.forceUpdate)!==!1&&t!=="controlled"?()=>$(ie=>({...ie,[F]:(ie[F]||0)+1})):null]})},[l,f]),P=x.useCallback(F=>{const Q=h.refValues.current;h.setValues({values:F,updateState:t==="controlled"}),L(Q)},[l,L]),A=x.useCallback(()=>{const F=Bn(f,h.refValues.current);return p.setErrors(F.errors),F},[f]),_=x.useCallback(F=>{const Q=Sr(F,f,h.refValues.current);return Q.hasError?p.setFieldError(F,Q.error):p.clearFieldError(F),Q},[f]),N=(F,{type:Q="input",withError:ee=!0,withFocus:Z=!0,...Y}={})=>{const ne={onChange:Xc(fe=>z(F,fe,{forceUpdate:!1})),"data-path":bs(e,F)};return ee&&(ne.error=p.errorsState[F]),Q==="checkbox"?ne[t==="controlled"?"checked":"defaultChecked"]=$e(F,h.refValues.current):ne[t==="controlled"?"value":"defaultValue"]=$e(F,h.refValues.current),Z&&(ne.onFocus=()=>y.setFieldTouched(F,!0),ne.onBlur=()=>{if(ws(F,c)){const fe=Sr(F,f,h.refValues.current);fe.hasError?p.setFieldError(F,fe.error):p.clearFieldError(F)}}),Object.assign(ne,d==null?void 0:d({inputProps:ne,field:F,options:{type:Q,withError:ee,withFocus:Z,...Y},form:K}))},T=(F,Q)=>ee=>{m==="always"&&(ee==null||ee.preventDefault());const Z=A();if(Z.hasErrors)m==="validation-failed"&&(ee==null||ee.preventDefault()),Q==null||Q(Z.errors,h.refValues.current,ee);else{const Y=F==null?void 0:F(u(h.refValues.current),ee);Y instanceof Promise&&(j(!0),Y.finally(()=>j(!1)))}},E=F=>u(F||h.refValues.current),R=x.useCallback(F=>{F.preventDefault(),M()},[]),O=x.useCallback(F=>F?!Sr(F,f,h.refValues.current).hasError:!Bn(f,h.refValues.current).hasErrors,[f]),I=F=>`${C}-${F}-${S[F]||0}`,B=x.useCallback(F=>document.querySelector(`[data-path="${bs(e,F)}"]`),[]),K={watch:b.watch,initialized:h.initialized.current,values:h.stateValues,getValues:h.getValues,getInitialValues:h.getValuesSnapshot,setInitialValues:h.setValuesSnapshot,initialize:V,setValues:P,setFieldValue:z,submitting:k,setSubmitting:j,errors:p.errorsState,setErrors:p.setErrors,setFieldError:p.setFieldError,clearFieldError:p.clearFieldError,clearErrors:p.clearErrors,resetDirty:y.resetDirty,setTouched:y.setTouched,setDirty:y.setDirty,isTouched:y.isTouched,resetTouched:y.resetTouched,isDirty:y.isDirty,getTouched:y.getTouched,getDirty:y.getDirty,reorderListItem:w.reorderListItem,insertListItem:w.insertListItem,removeListItem:w.removeListItem,replaceListItem:w.replaceListItem,reset:M,validate:A,validateField:_,getInputProps:N,onSubmit:T,onReset:R,isValid:O,getTransformedValues:E,key:I,getInputNode:B};return qc(e,K),K}function ul(){const e=x.createContext(null);function t({form:n,children:o}){return g.jsx(e.Provider,{value:n,children:o})}function r(){const n=x.useContext(e);if(!n)throw new Error("useFormContext was called outside of FormProvider context");return n}return[t,r,ll]}function or(e,t,r){return t===void 0&&r===void 0?e:t!==void 0&&r===void 0?Math.max(e,t):Math.min(t===void 0&&r!==void 0?e:Math.max(e,t),r)}function dl(e="mantine-"){return`${e}${Math.random().toString(36).slice(2,11)}`}function gt(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}const fl=()=>{};function dr(e,t){const r=typeof t=="number"?t:t.delay,n=typeof t=="number"?!1:t.flushOnUnmount,o=gt(e),s=x.useRef(0),a=Object.assign(x.useCallback((...i)=>{window.clearTimeout(s.current);const c=()=>{s.current!==0&&(s.current=0,o(...i))};a.flush=c,s.current=window.setTimeout(c,r)},[o,r]),{flush:fl});return x.useEffect(()=>()=>{window.clearTimeout(s.current),n&&a.flush()},[a,n]),a}const Ss=["mousedown","touchstart"];function xa(e,t,r){const n=x.useRef(null);return x.useEffect(()=>{const o=s=>{const{target:a}=s??{};if(Array.isArray(r)){const i=(a==null?void 0:a.hasAttribute("data-ignore-outside-clicks"))||!document.body.contains(a)&&a.tagName!=="HTML";r.every(l=>!!l&&!s.composedPath().includes(l))&&!i&&e()}else n.current&&!n.current.contains(a)&&e()};return(t||Ss).forEach(s=>document.addEventListener(s,o)),()=>{(t||Ss).forEach(s=>document.removeEventListener(s,o))}},[n,e,r]),n}function ml(e,t){try{return e.addEventListener("change",t),()=>e.removeEventListener("change",t)}catch{return e.addListener(t),()=>e.removeListener(t)}}function pl(e,t){return typeof window<"u"&&"matchMedia"in window?window.matchMedia(e).matches:!1}function hl(e,t,{getInitialValueInEffect:r}={getInitialValueInEffect:!0}){const[n,o]=x.useState(r?t:pl(e)),s=x.useRef(null);return x.useEffect(()=>{if("matchMedia"in window)return s.current=window.matchMedia(e),o(s.current.matches),ml(s.current,a=>o(a.matches))},[e]),n}const co=typeof document<"u"?x.useLayoutEffect:x.useEffect;function ot(e,t){const r=x.useRef(!1);x.useEffect(()=>()=>{r.current=!1},[]),x.useEffect(()=>{if(r.current)return e();r.current=!0},t)}function wa({opened:e,shouldReturnFocus:t=!0}){const r=x.useRef(null),n=()=>{var o;r.current&&"focus"in r.current&&typeof r.current.focus=="function"&&((o=r.current)==null||o.focus({preventScroll:!0}))};return ot(()=>{let o=-1;const s=a=>{a.key==="Tab"&&window.clearTimeout(o)};return document.addEventListener("keydown",s),e?r.current=document.activeElement:t&&(o=window.setTimeout(n,10)),()=>{window.clearTimeout(o),document.removeEventListener("keydown",s)}},[e,t]),n}const vl=/input|select|textarea|button|object/,Sa="a, input, select, textarea, button, object, [tabindex]";function gl(e){return process.env.NODE_ENV==="test"?!1:e.style.display==="none"}function yl(e){if(e.getAttribute("aria-hidden")||e.getAttribute("hidden")||e.getAttribute("type")==="hidden")return!1;let r=e;for(;r&&!(r===document.body||r.nodeType===11);){if(gl(r))return!1;r=r.parentNode}return!0}function Ca(e){let t=e.getAttribute("tabindex");return t===null&&(t=void 0),parseInt(t,10)}function Wn(e){const t=e.nodeName.toLowerCase(),r=!Number.isNaN(Ca(e));return(vl.test(t)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||r)&&yl(e)}function Da(e){const t=Ca(e);return(Number.isNaN(t)||t>=0)&&Wn(e)}function bl(e){return Array.from(e.querySelectorAll(Sa)).filter(Da)}function xl(e,t){const r=bl(e);if(!r.length){t.preventDefault();return}const n=r[t.shiftKey?0:r.length-1],o=e.getRootNode();let s=n===o.activeElement||e===o.activeElement;const a=o.activeElement;if(a.tagName==="INPUT"&&a.getAttribute("type")==="radio"&&(s=r.filter(u=>u.getAttribute("type")==="radio"&&u.getAttribute("name")===a.getAttribute("name")).includes(n)),!s)return;t.preventDefault();const c=r[t.shiftKey?r.length-1:0];c&&c.focus()}function wl(e=!0){const t=x.useRef(null),r=o=>{let s=o.querySelector("[data-autofocus]");if(!s){const a=Array.from(o.querySelectorAll(Sa));s=a.find(Da)||a.find(Wn)||null,!s&&Wn(o)&&(s=o)}s?s.focus({preventScroll:!0}):process.env.NODE_ENV==="development"&&console.warn("[@mantine/hooks/use-focus-trap] Failed to find focusable element within provided node",o)},n=x.useCallback(o=>{e&&o!==null&&t.current!==o&&(o?(setTimeout(()=>{o.getRootNode()?r(o):process.env.NODE_ENV==="development"&&console.warn("[@mantine/hooks/use-focus-trap] Ref node is not part of the dom",o)}),t.current=o):t.current=null)},[e]);return x.useEffect(()=>{if(!e)return;t.current&&setTimeout(()=>r(t.current));const o=s=>{s.key==="Tab"&&t.current&&xl(t.current,s)};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[e]),n}const Sl=x.useId||(()=>{});function Cl(){const e=Sl();return e?`mantine-${e.replace(/:/g,"")}`:""}function It(e){const t=Cl(),[r,n]=x.useState(t);return co(()=>{n(dl())},[]),typeof e=="string"?e:typeof window>"u"?t:r}function Dl(e,t,r){x.useEffect(()=>(window.addEventListener(e,t,r),()=>window.removeEventListener(e,t,r)),[e,t])}function Mr(e,t){if(typeof e=="function")return e(t);typeof e=="object"&&e!==null&&"current"in e&&(e.current=t)}function _l(...e){const t=new Map;return r=>{if(e.forEach(n=>{const o=Mr(n,r);o&&t.set(n,o)}),t.size>0)return()=>{e.forEach(n=>{const o=t.get(n);o?o():Mr(n,null)}),t.clear()}}}function Le(...e){return x.useCallback(_l(...e),e)}function st({value:e,defaultValue:t,finalValue:r,onChange:n=()=>{}}){const[o,s]=x.useState(t!==void 0?t:r),a=(i,...c)=>{s(i),n==null||n(i,...c)};return e!==void 0?[e,n,!0]:[o,a,!1]}function _a(e,t){return hl("(prefers-reduced-motion: reduce)",e,t)}function Rl(e=!1,t){const{onOpen:r,onClose:n}={},[o,s]=x.useState(e),a=x.useCallback(()=>{s(l=>l||(r==null||r(),!0))},[r]),i=x.useCallback(()=>{s(l=>l&&(n==null||n(),!1))},[n]),c=x.useCallback(()=>{o?i():a()},[i,a,o]);return[o,{open:a,close:i,toggle:c}]}function Nl(e){const t=x.useRef(void 0);return x.useEffect(()=>{t.current=e},[e]),t.current}var Je=function(){return Je=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},Je.apply(this,arguments)};function Ra(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function El(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,s;n<o;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}var Nr="right-scroll-bar-position",Er="width-before-scroll-bar",Tl="with-scroll-bars-hidden",kl="--removed-body-scroll-bar-size";function Rn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function $l(e,t){var r=x.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var Ol=typeof window<"u"?H.useLayoutEffect:H.useEffect,Cs=new WeakMap;function Al(e,t){var r=$l(null,function(n){return e.forEach(function(o){return Rn(o,n)})});return Ol(function(){var n=Cs.get(r);if(n){var o=new Set(n),s=new Set(e),a=r.current;o.forEach(function(i){s.has(i)||Rn(i,null)}),s.forEach(function(i){o.has(i)||Rn(i,a)})}Cs.set(r,e)},[e]),r}function jl(e){return e}function Ml(e,t){t===void 0&&(t=jl);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(s){var a=t(s,n);return r.push(a),function(){r=r.filter(function(i){return i!==a})}},assignSyncMedium:function(s){for(n=!0;r.length;){var a=r;r=[],a.forEach(s)}r={push:function(i){return s(i)},filter:function(){return r}}},assignMedium:function(s){n=!0;var a=[];if(r.length){var i=r;r=[],i.forEach(s),a=r}var c=function(){var u=a;a=[],u.forEach(s)},l=function(){return Promise.resolve().then(c)};l(),r={push:function(u){a.push(u),l()},filter:function(u){return a=a.filter(u),r}}}};return o}function Pl(e){e===void 0&&(e={});var t=Ml(null);return t.options=Je({async:!0,ssr:!1},e),t}var Na=function(e){var t=e.sideCar,r=Ra(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return H.createElement(n,Je({},r))};Na.isSideCarExport=!0;function Ll(e,t){return e.useMedium(t),Na}var Ea=Pl(),Nn=function(){},zr=H.forwardRef(function(e,t){var r=H.useRef(null),n=H.useState({onScrollCapture:Nn,onWheelCapture:Nn,onTouchMoveCapture:Nn}),o=n[0],s=n[1],a=e.forwardProps,i=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,m=e.noIsolation,v=e.inert,p=e.allowPinchZoom,h=e.as,y=h===void 0?"div":h,w=e.gapMode,b=Ra(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=f,D=Al([r,t]),S=Je(Je({},b),o);return H.createElement(H.Fragment,null,u&&H.createElement(C,{sideCar:Ea,removeScrollBar:l,shards:d,noIsolation:m,inert:v,setCallbacks:s,allowPinchZoom:!!p,lockRef:r,gapMode:w}),a?H.cloneElement(H.Children.only(i),Je(Je({},S),{ref:D})):H.createElement(y,Je({},S,{className:c,ref:D}),i))});zr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};zr.classNames={fullWidth:Er,zeroRight:Nr};var Il=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Fl(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Il();return t&&e.setAttribute("nonce",t),e}function Vl(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function zl(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Bl=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Fl())&&(Vl(t,r),zl(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Wl=function(){var e=Bl();return function(t,r){H.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Ta=function(){var e=Wl(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},Yl={left:0,top:0,right:0,gap:0},En=function(e){return parseInt(e||"",10)||0},Hl=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[En(r),En(n),En(o)]},Ul=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Yl;var t=Hl(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Gl=Ta(),Tt="data-scroll-locked",ql=function(e,t,r,n){var o=e.left,s=e.top,a=e.right,i=e.gap;return r===void 0&&(r="margin"),`
23
- .`.concat(Tl,` {
24
- overflow: hidden `).concat(n,`;
25
- padding-right: `).concat(i,"px ").concat(n,`;
26
- }
27
- body[`).concat(Tt,`] {
28
- overflow: hidden `).concat(n,`;
29
- overscroll-behavior: contain;
30
- `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
31
- padding-left: `.concat(o,`px;
32
- padding-top: `).concat(s,`px;
33
- padding-right: `).concat(a,`px;
34
- margin-left:0;
35
- margin-top:0;
36
- margin-right: `).concat(i,"px ").concat(n,`;
37
- `),r==="padding"&&"padding-right: ".concat(i,"px ").concat(n,";")].filter(Boolean).join(""),`
38
- }
39
-
40
- .`).concat(Nr,` {
41
- right: `).concat(i,"px ").concat(n,`;
42
- }
43
-
44
- .`).concat(Er,` {
45
- margin-right: `).concat(i,"px ").concat(n,`;
46
- }
47
-
48
- .`).concat(Nr," .").concat(Nr,` {
49
- right: 0 `).concat(n,`;
50
- }
51
-
52
- .`).concat(Er," .").concat(Er,` {
53
- margin-right: 0 `).concat(n,`;
54
- }
55
-
56
- body[`).concat(Tt,`] {
57
- `).concat(kl,": ").concat(i,`px;
58
- }
59
- `)},Ds=function(){var e=parseInt(document.body.getAttribute(Tt)||"0",10);return isFinite(e)?e:0},Xl=function(){H.useEffect(function(){return document.body.setAttribute(Tt,(Ds()+1).toString()),function(){var e=Ds()-1;e<=0?document.body.removeAttribute(Tt):document.body.setAttribute(Tt,e.toString())}},[])},Kl=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;Xl();var s=H.useMemo(function(){return Ul(o)},[o]);return H.createElement(Gl,{styles:ql(s,!t,o,r?"":"!important")})},Yn=!1;if(typeof window<"u")try{var Cr=Object.defineProperty({},"passive",{get:function(){return Yn=!0,!0}});window.addEventListener("test",Cr,Cr),window.removeEventListener("test",Cr,Cr)}catch{Yn=!1}var Rt=Yn?{passive:!1}:!1,Zl=function(e){return e.tagName==="TEXTAREA"},ka=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Zl(e)&&r[t]==="visible")},Jl=function(e){return ka(e,"overflowY")},Ql=function(e){return ka(e,"overflowX")},_s=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=$a(e,n);if(o){var s=Oa(e,n),a=s[1],i=s[2];if(a>i)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},eu=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},tu=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},$a=function(e,t){return e==="v"?Jl(t):Ql(t)},Oa=function(e,t){return e==="v"?eu(t):tu(t)},ru=function(e,t){return e==="h"&&t==="rtl"?-1:1},nu=function(e,t,r,n,o){var s=ru(e,window.getComputedStyle(t).direction),a=s*n,i=r.target,c=t.contains(i),l=!1,u=a>0,d=0,f=0;do{var m=Oa(e,i),v=m[0],p=m[1],h=m[2],y=p-h-s*v;(v||y)&&$a(e,i)&&(d+=y,f+=v),i instanceof ShadowRoot?i=i.host:i=i.parentNode}while(!c&&i!==document.body||c&&(t.contains(i)||t===i));return(u&&Math.abs(d)<1||!u&&Math.abs(f)<1)&&(l=!0),l},Dr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Rs=function(e){return[e.deltaX,e.deltaY]},Ns=function(e){return e&&"current"in e?e.current:e},ou=function(e,t){return e[0]===t[0]&&e[1]===t[1]},su=function(e){return`
60
- .block-interactivity-`.concat(e,` {pointer-events: none;}
61
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
62
- `)},au=0,Nt=[];function iu(e){var t=H.useRef([]),r=H.useRef([0,0]),n=H.useRef(),o=H.useState(au++)[0],s=H.useState(Ta)[0],a=H.useRef(e);H.useEffect(function(){a.current=e},[e]),H.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var p=El([e.lockRef.current],(e.shards||[]).map(Ns),!0).filter(Boolean);return p.forEach(function(h){return h.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),p.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=H.useCallback(function(p,h){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!a.current.allowPinchZoom;var y=Dr(p),w=r.current,b="deltaX"in p?p.deltaX:w[0]-y[0],C="deltaY"in p?p.deltaY:w[1]-y[1],D,S=p.target,$=Math.abs(b)>Math.abs(C)?"h":"v";if("touches"in p&&$==="h"&&S.type==="range")return!1;var k=_s($,S);if(!k)return!0;if(k?D=$:(D=$==="v"?"h":"v",k=_s($,S)),!k)return!1;if(!n.current&&"changedTouches"in p&&(b||C)&&(n.current=D),!D)return!0;var j=n.current||D;return nu(j,h,p,j==="h"?b:C)},[]),c=H.useCallback(function(p){var h=p;if(!(!Nt.length||Nt[Nt.length-1]!==s)){var y="deltaY"in h?Rs(h):Dr(h),w=t.current.filter(function(D){return D.name===h.type&&(D.target===h.target||h.target===D.shadowParent)&&ou(D.delta,y)})[0];if(w&&w.should){h.cancelable&&h.preventDefault();return}if(!w){var b=(a.current.shards||[]).map(Ns).filter(Boolean).filter(function(D){return D.contains(h.target)}),C=b.length>0?i(h,b[0]):!a.current.noIsolation;C&&h.cancelable&&h.preventDefault()}}},[]),l=H.useCallback(function(p,h,y,w){var b={name:p,delta:h,target:y,should:w,shadowParent:cu(y)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(C){return C!==b})},1)},[]),u=H.useCallback(function(p){r.current=Dr(p),n.current=void 0},[]),d=H.useCallback(function(p){l(p.type,Rs(p),p.target,i(p,e.lockRef.current))},[]),f=H.useCallback(function(p){l(p.type,Dr(p),p.target,i(p,e.lockRef.current))},[]);H.useEffect(function(){return Nt.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",c,Rt),document.addEventListener("touchmove",c,Rt),document.addEventListener("touchstart",u,Rt),function(){Nt=Nt.filter(function(p){return p!==s}),document.removeEventListener("wheel",c,Rt),document.removeEventListener("touchmove",c,Rt),document.removeEventListener("touchstart",u,Rt)}},[]);var m=e.removeScrollBar,v=e.inert;return H.createElement(H.Fragment,null,v?H.createElement(s,{styles:su(o)}):null,m?H.createElement(Kl,{gapMode:e.gapMode}):null)}function cu(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const lu=Ll(Ea,iu);var Aa=H.forwardRef(function(e,t){return H.createElement(zr,Je({},e,{ref:t,sideCar:lu}))});Aa.classNames=zr.classNames;function lo(e){return Object.keys(e)}function uu(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function Tn(e){return e==="0rem"?"0rem":`calc(${e} * var(--mantine-scale))`}function ja(e,{shouldScale:t=!1}={}){function r(n){if(n===0||n==="0")return`0${e}`;if(typeof n=="number"){const o=`${n/16}${e}`;return t?Tn(o):o}if(typeof n=="string"){if(n===""||n.startsWith("calc(")||n.startsWith("clamp(")||n.includes("rgba("))return n;if(n.includes(","))return n.split(",").map(s=>r(s)).join(",");if(n.includes(" "))return n.split(" ").map(s=>r(s)).join(" ");if(n.includes(e))return t?Tn(n):n;const o=n.replace("px","");if(!Number.isNaN(Number(o))){const s=`${Number(o)/16}${e}`;return t?Tn(s):s}}return n}return r}const ge=ja("rem",{shouldScale:!0});ja("em");function uo(e){return Object.keys(e).reduce((t,r)=>(e[r]!==void 0&&(t[r]=e[r]),t),{})}function Ma(e){if(typeof e=="number")return!0;if(typeof e=="string"){if(e.startsWith("calc(")||e.startsWith("var(")||e.includes(" ")&&e.trim()!=="")return!0;const t=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return e.trim().split(/\s+/).every(n=>t.test(n))}return!1}function fr(e){return Array.isArray(e)||e===null?!1:typeof e=="object"?e.type!==x.Fragment:!1}function Ft(e){const t=x.createContext(null);return[({children:o,value:s})=>g.jsx(t.Provider,{value:s,children:o}),()=>{const o=x.useContext(t);if(o===null)throw new Error(e);return o}]}function Br(e=null){const t=x.createContext(e);return[({children:o,value:s})=>g.jsx(t.Provider,{value:s,children:o}),()=>x.useContext(t)]}const du={app:100,modal:200,popover:300,overlay:400,max:9999};function wt(e){return du[e]}const Hn=()=>{};function fu(e,t={active:!0}){return typeof e!="function"||!t.active?t.onKeyDown||Hn:r=>{var n;r.key==="Escape"&&(e(r),(n=t.onTrigger)==null||n.call(t))}}function be(e,t="size",r=!0){if(e!==void 0)return Ma(e)?r?ge(e):e:`var(--${t}-${e})`}function Pa(e){return be(e,"mantine-spacing")}function Ie(e){return e===void 0?"var(--mantine-radius-default)":be(e,"mantine-radius")}function Re(e){return be(e,"mantine-font-size")}function mu(e){return be(e,"mantine-line-height",!1)}function fo(e){if(e)return be(e,"mantine-shadow",!1)}function pu(){return typeof process<"u"&&process.env&&process.env.NODE_ENV?process.env.NODE_ENV:"development"}function La(e){var r;const t=x.version;return typeof x.version!="string"||t.startsWith("18.")?e==null?void 0:e.ref:(r=e==null?void 0:e.props)==null?void 0:r.ref}function Ia(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Ia(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Te(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Ia(e))&&(n&&(n+=" "),n+=t);return n}const hu={};function vu(e){const t={};return e.forEach(r=>{Object.entries(r).forEach(([n,o])=>{t[n]?t[n]=Te(t[n],o):t[n]=o})}),t}function Wr({theme:e,classNames:t,props:r,stylesCtx:n}){const s=(Array.isArray(t)?t:[t]).map(a=>typeof a=="function"?a(e,r,n):a||hu);return vu(s)}function Pr({theme:e,styles:t,props:r,stylesCtx:n}){return(Array.isArray(t)?t:[t]).reduce((s,a)=>typeof a=="function"?{...s,...a(e,r,n)}:{...s,...a},{})}const gu=x.createContext(null);function St(){const e=x.useContext(gu);if(!e)throw new Error("[@mantine/core] MantineProvider was not found in tree");return e}function yu(){return St().classNamesPrefix}function bu(){return St().getStyleNonce}function xu(){return St().withStaticClasses}function wu(){return St().headless}function Su(){var e;return(e=St().stylesTransform)==null?void 0:e.sx}function Cu(){var e;return(e=St().stylesTransform)==null?void 0:e.styles}function Fa(){return St().env||"default"}function Du(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)}function _u(e){let t=e.replace("#","");if(t.length===3){const a=t.split("");t=[a[0],a[0],a[1],a[1],a[2],a[2]].join("")}if(t.length===8){const a=parseInt(t.slice(6,8),16)/255;return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a}}const r=parseInt(t,16),n=r>>16&255,o=r>>8&255,s=r&255;return{r:n,g:o,b:s,a:1}}function Ru(e){const[t,r,n,o]=e.replace(/[^0-9,./]/g,"").split(/[/,]/).map(Number);return{r:t,g:r,b:n,a:o||1}}function Nu(e){const t=/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i,r=e.match(t);if(!r)return{r:0,g:0,b:0,a:1};const n=parseInt(r[1],10),o=parseInt(r[2],10)/100,s=parseInt(r[3],10)/100,a=r[5]?parseFloat(r[5]):void 0,i=(1-Math.abs(2*s-1))*o,c=n/60,l=i*(1-Math.abs(c%2-1)),u=s-i/2;let d,f,m;return c>=0&&c<1?(d=i,f=l,m=0):c>=1&&c<2?(d=l,f=i,m=0):c>=2&&c<3?(d=0,f=i,m=l):c>=3&&c<4?(d=0,f=l,m=i):c>=4&&c<5?(d=l,f=0,m=i):(d=i,f=0,m=l),{r:Math.round((d+u)*255),g:Math.round((f+u)*255),b:Math.round((m+u)*255),a:a||1}}function Va(e){return Du(e)?_u(e):e.startsWith("rgb")?Ru(e):e.startsWith("hsl")?Nu(e):{r:0,g:0,b:0,a:1}}function Eu(e,t){return typeof e.primaryShade=="number"?e.primaryShade:t==="dark"?e.primaryShade.dark:e.primaryShade.light}function kn(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function Tu(e){const t=e.match(/oklch\((.*?)%\s/);return t?parseFloat(t[1]):null}function ku(e){if(e.startsWith("oklch("))return(Tu(e)||0)/100;const{r:t,g:r,b:n}=Va(e),o=t/255,s=r/255,a=n/255,i=kn(o),c=kn(s),l=kn(a);return .2126*i+.7152*c+.0722*l}function tr(e,t=.179){return e.startsWith("var(")?!1:ku(e)>t}function Vt({color:e,theme:t,colorScheme:r}){if(typeof e!="string")throw new Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof e}`);if(e==="bright")return{color:e,value:r==="dark"?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:tr(r==="dark"?t.white:t.black,t.luminanceThreshold),variable:"--mantine-color-bright"};if(e==="dimmed")return{color:e,value:r==="dark"?t.colors.dark[2]:t.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:tr(r==="dark"?t.colors.dark[2]:t.colors.gray[6],t.luminanceThreshold),variable:"--mantine-color-dimmed"};if(e==="white"||e==="black")return{color:e,value:e==="white"?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:tr(e==="white"?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-${e}`};const[n,o]=e.split("."),s=o?Number(o):void 0,a=n in t.colors;if(a){const i=s!==void 0?t.colors[n][s]:t.colors[n][Eu(t,r||"light")];return{color:n,value:i,shade:s,isThemeColor:a,isLight:tr(i,t.luminanceThreshold),variable:o?`--mantine-color-${n}-${s}`:`--mantine-color-${n}-filled`}}return{color:e,value:e,isThemeColor:a,isLight:tr(e,t.luminanceThreshold),shade:s,variable:void 0}}function at(e,t){const r=Vt({color:e||t.primaryColor,theme:t});return r.variable?`var(${r.variable})`:e}function $u(e,t){const r={from:(e==null?void 0:e.from)||t.defaultGradient.from,to:(e==null?void 0:e.to)||t.defaultGradient.to,deg:(e==null?void 0:e.deg)??t.defaultGradient.deg??0},n=at(r.from,t),o=at(r.to,t);return`linear-gradient(${r.deg}deg, ${n} 0%, ${o} 100%)`}function Ou(e,t){if(typeof e!="string"||t>1||t<0)return"rgba(0, 0, 0, 1)";if(e.startsWith("var(")){const s=(1-t)*100;return`color-mix(in srgb, ${e}, transparent ${s}%)`}if(e.startsWith("oklch"))return e.includes("/")?e.replace(/\/\s*[\d.]+\s*\)/,`/ ${t})`):e.replace(")",` / ${t})`);const{r,g:n,b:o}=Va(e);return`rgba(${r}, ${n}, ${o}, ${t})`}const Au=x.createContext(null);function zt(){const e=x.useContext(Au);if(!e)throw new Error("@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app");return e}function za({color:e,theme:t,autoContrast:r}){return(typeof r=="boolean"?r:t.autoContrast)&&Vt({color:e||t.primaryColor,theme:t}).isLight?"var(--mantine-color-black)":"var(--mantine-color-white)"}function lt({classNames:e,styles:t,props:r,stylesCtx:n}){const o=zt();return{resolvedClassNames:Wr({theme:o,classNames:e,props:r,stylesCtx:n||void 0}),resolvedStyles:Pr({theme:o,styles:t,props:r,stylesCtx:n||void 0})}}const ju={always:"mantine-focus-always",auto:"mantine-focus-auto",never:"mantine-focus-never"};function Mu({theme:e,options:t,unstyled:r}){return Te((t==null?void 0:t.focusable)&&!r&&(e.focusClassName||ju[e.focusRing]),(t==null?void 0:t.active)&&!r&&e.activeClassName)}function Pu({selector:e,stylesCtx:t,options:r,props:n,theme:o}){return Wr({theme:o,classNames:r==null?void 0:r.classNames,props:(r==null?void 0:r.props)||n,stylesCtx:t})[e]}function Es({selector:e,stylesCtx:t,theme:r,classNames:n,props:o}){return Wr({theme:r,classNames:n,props:o,stylesCtx:t})[e]}function Lu({rootSelector:e,selector:t,className:r}){return e===t?r:void 0}function Iu({selector:e,classes:t,unstyled:r}){return r?void 0:t[e]}function Fu({themeName:e,classNamesPrefix:t,selector:r,withStaticClass:n}){return n===!1?[]:e.map(o=>`${t}-${o}-${r}`)}function Vu({themeName:e,theme:t,selector:r,props:n,stylesCtx:o}){return e.map(s=>{var a,i;return(i=Wr({theme:t,classNames:(a=t.components[s])==null?void 0:a.classNames,props:n,stylesCtx:o}))==null?void 0:i[r]})}function zu({options:e,classes:t,selector:r,unstyled:n}){return e!=null&&e.variant&&!n?t[`${r}--${e.variant}`]:void 0}function Bu({theme:e,options:t,themeName:r,selector:n,classNamesPrefix:o,classNames:s,classes:a,unstyled:i,className:c,rootSelector:l,props:u,stylesCtx:d,withStaticClasses:f,headless:m,transformedStyles:v}){return Te(Mu({theme:e,options:t,unstyled:i||m}),Vu({theme:e,themeName:r,selector:n,props:u,stylesCtx:d}),zu({options:t,classes:a,selector:n,unstyled:i}),Es({selector:n,stylesCtx:d,theme:e,classNames:s,props:u}),Es({selector:n,stylesCtx:d,theme:e,classNames:v,props:u}),Pu({selector:n,stylesCtx:d,options:t,props:u,theme:e}),Lu({rootSelector:l,selector:n,className:c}),Iu({selector:n,classes:a,unstyled:i||m}),f&&!m&&Fu({themeName:r,classNamesPrefix:o,selector:n,withStaticClass:t==null?void 0:t.withStaticClass}),t==null?void 0:t.className)}function Wu({theme:e,themeName:t,props:r,stylesCtx:n,selector:o}){return t.map(s=>{var a;return Pr({theme:e,styles:(a=e.components[s])==null?void 0:a.styles,props:r,stylesCtx:n})[o]}).reduce((s,a)=>({...s,...a}),{})}function Un({style:e,theme:t}){return Array.isArray(e)?[...e].reduce((r,n)=>({...r,...Un({style:n,theme:t})}),{}):typeof e=="function"?e(t):e??{}}function Yu(e){return e.reduce((t,r)=>(r&&Object.keys(r).forEach(n=>{t[n]={...t[n],...uo(r[n])}}),t),{})}function Hu({vars:e,varsResolver:t,theme:r,props:n,stylesCtx:o,selector:s,themeName:a,headless:i}){var c;return(c=Yu([i?{}:t==null?void 0:t(r,n,o),...a.map(l=>{var u,d,f;return(f=(d=(u=r.components)==null?void 0:u[l])==null?void 0:d.vars)==null?void 0:f.call(d,r,n,o)}),e==null?void 0:e(r,n,o)]))==null?void 0:c[s]}function Uu({theme:e,themeName:t,selector:r,options:n,props:o,stylesCtx:s,rootSelector:a,styles:i,style:c,vars:l,varsResolver:u,headless:d,withStylesTransform:f}){return{...!f&&Wu({theme:e,themeName:t,props:o,stylesCtx:s,selector:r}),...!f&&Pr({theme:e,styles:i,props:o,stylesCtx:s})[r],...!f&&Pr({theme:e,styles:n==null?void 0:n.styles,props:(n==null?void 0:n.props)||o,stylesCtx:s})[r],...Hu({theme:e,props:o,stylesCtx:s,vars:l,varsResolver:u,selector:r,themeName:t,headless:d}),...a===r?Un({style:c,theme:e}):null,...Un({style:n==null?void 0:n.style,theme:e})}}function Gu({props:e,stylesCtx:t,themeName:r}){var a;const n=zt(),o=(a=Cu())==null?void 0:a();return{getTransformedStyles:i=>o?[...i.map(l=>o(l,{props:e,theme:n,ctx:t})),...r.map(l=>{var u;return o((u=n.components[l])==null?void 0:u.styles,{props:e,theme:n,ctx:t})})].filter(Boolean):[],withStylesTransform:!!o}}function me({name:e,classes:t,props:r,stylesCtx:n,className:o,style:s,rootSelector:a="root",unstyled:i,classNames:c,styles:l,vars:u,varsResolver:d}){const f=zt(),m=yu(),v=xu(),p=wu(),h=(Array.isArray(e)?e:[e]).filter(b=>b),{withStylesTransform:y,getTransformedStyles:w}=Gu({props:r,stylesCtx:n,themeName:h});return(b,C)=>({className:Bu({theme:f,options:C,themeName:h,selector:b,classNamesPrefix:m,classNames:c,classes:t,unstyled:i,className:o,rootSelector:a,props:r,stylesCtx:n,withStaticClasses:v,headless:p,transformedStyles:w([C==null?void 0:C.styles,l])}),style:Uu({theme:f,themeName:h,selector:b,options:C,props:r,stylesCtx:n,rootSelector:a,styles:l,style:s,vars:u,varsResolver:d,headless:p,withStylesTransform:y})})}function Ba(e,t){return typeof e=="boolean"?e:t.autoContrast}function q(e,t,r){var a;const n=zt(),o=(a=n.components[e])==null?void 0:a.defaultProps,s=typeof o=="function"?o(n):o;return{...t,...s,...uo(r)}}function $n(e){return lo(e).reduce((t,r)=>e[r]!==void 0?`${t}${uu(r)}:${e[r]};`:t,"").trim()}function qu({selector:e,styles:t,media:r,container:n}){const o=t?$n(t):"",s=Array.isArray(r)?r.map(i=>`@media${i.query}{${e}{${$n(i.styles)}}}`):[],a=Array.isArray(n)?n.map(i=>`@container ${i.query}{${e}{${$n(i.styles)}}}`):[];return`${o?`${e}{${o}}`:""}${s.join("")}${a.join("")}`.trim()}function Xu(e){const t=bu();return g.jsx("style",{"data-mantine-styles":"inline",nonce:t==null?void 0:t(),dangerouslySetInnerHTML:{__html:qu(e)}})}function Yr(e){const{m:t,mx:r,my:n,mt:o,mb:s,ml:a,mr:i,me:c,ms:l,p:u,px:d,py:f,pt:m,pb:v,pl:p,pr:h,pe:y,ps:w,bd:b,bg:C,c:D,opacity:S,ff:$,fz:k,fw:j,lts:M,ta:L,lh:V,fs:z,tt:P,td:A,w:_,miw:N,maw:T,h:E,mih:R,mah:O,bgsz:I,bgp:B,bgr:K,bga:F,pos:Q,top:ee,left:Z,bottom:Y,right:ie,inset:ne,display:fe,flex:X,hiddenFrom:ue,visibleFrom:le,lightHidden:he,darkHidden:G,sx:J,...te}=e;return{styleProps:uo({m:t,mx:r,my:n,mt:o,mb:s,ml:a,mr:i,me:c,ms:l,p:u,px:d,py:f,pt:m,pb:v,pl:p,pr:h,pe:y,ps:w,bd:b,bg:C,c:D,opacity:S,ff:$,fz:k,fw:j,lts:M,ta:L,lh:V,fs:z,tt:P,td:A,w:_,miw:N,maw:T,h:E,mih:R,mah:O,bgsz:I,bgp:B,bgr:K,bga:F,pos:Q,top:ee,left:Z,bottom:Y,right:ie,inset:ne,display:fe,flex:X,hiddenFrom:ue,visibleFrom:le,lightHidden:he,darkHidden:G,sx:J}),rest:te}}const Ku={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},ms:{type:"spacing",property:"marginInlineStart"},me:{type:"spacing",property:"marginInlineEnd"},mx:{type:"spacing",property:"marginInline"},my:{type:"spacing",property:"marginBlock"},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},ps:{type:"spacing",property:"paddingInlineStart"},pe:{type:"spacing",property:"paddingInlineEnd"},px:{type:"spacing",property:"paddingInline"},py:{type:"spacing",property:"paddingBlock"},bd:{type:"border",property:"border"},bg:{type:"color",property:"background"},c:{type:"textColor",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"fontFamily",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"lineHeight",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"size",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"},flex:{type:"identity",property:"flex"}};function mo(e,t){const r=Vt({color:e,theme:t});return r.color==="dimmed"?"var(--mantine-color-dimmed)":r.color==="bright"?"var(--mantine-color-bright)":r.variable?`var(${r.variable})`:r.color}function Zu(e,t){const r=Vt({color:e,theme:t});return r.isThemeColor&&r.shade===void 0?`var(--mantine-color-${r.color}-text)`:mo(e,t)}function Ju(e,t){if(typeof e=="number")return ge(e);if(typeof e=="string"){const[r,n,...o]=e.split(" ").filter(a=>a.trim()!=="");let s=`${ge(r)}`;return n&&(s+=` ${n}`),o.length>0&&(s+=` ${mo(o.join(" "),t)}`),s.trim()}return e}const Ts={text:"var(--mantine-font-family)",mono:"var(--mantine-font-family-monospace)",monospace:"var(--mantine-font-family-monospace)",heading:"var(--mantine-font-family-headings)",headings:"var(--mantine-font-family-headings)"};function Qu(e){return typeof e=="string"&&e in Ts?Ts[e]:e}const ed=["h1","h2","h3","h4","h5","h6"];function td(e,t){return typeof e=="string"&&e in t.fontSizes?`var(--mantine-font-size-${e})`:typeof e=="string"&&ed.includes(e)?`var(--mantine-${e}-font-size)`:typeof e=="number"||typeof e=="string"?ge(e):e}function rd(e){return e}const nd=["h1","h2","h3","h4","h5","h6"];function od(e,t){return typeof e=="string"&&e in t.lineHeights?`var(--mantine-line-height-${e})`:typeof e=="string"&&nd.includes(e)?`var(--mantine-${e}-line-height)`:e}function sd(e){return typeof e=="number"?ge(e):e}function ad(e,t){if(typeof e=="number")return ge(e);if(typeof e=="string"){const r=e.replace("-","");if(!(r in t.spacing))return ge(e);const n=`--mantine-spacing-${r}`;return e.startsWith("-")?`calc(var(${n}) * -1)`:`var(${n})`}return e}const On={color:mo,textColor:Zu,fontSize:td,spacing:ad,identity:rd,size:sd,lineHeight:od,fontFamily:Qu,border:Ju};function ks(e){return e.replace("(min-width: ","").replace("em)","")}function id({media:e,...t}){const n=Object.keys(e).sort((o,s)=>Number(ks(o))-Number(ks(s))).map(o=>({query:o,styles:e[o]}));return{...t,media:n}}function cd(e){if(typeof e!="object"||e===null)return!1;const t=Object.keys(e);return!(t.length===1&&t[0]==="base")}function ld(e){return typeof e=="object"&&e!==null?"base"in e?e.base:void 0:e}function ud(e){return typeof e=="object"&&e!==null?lo(e).filter(t=>t!=="base"):[]}function dd(e,t){return typeof e=="object"&&e!==null&&t in e?e[t]:e}function fd({styleProps:e,data:t,theme:r}){return id(lo(e).reduce((n,o)=>{if(o==="hiddenFrom"||o==="visibleFrom"||o==="sx")return n;const s=t[o],a=Array.isArray(s.property)?s.property:[s.property],i=ld(e[o]);if(!cd(e[o]))return a.forEach(l=>{n.inlineStyles[l]=On[s.type](i,r)}),n;n.hasResponsiveStyles=!0;const c=ud(e[o]);return a.forEach(l=>{i&&(n.styles[l]=On[s.type](i,r)),c.forEach(u=>{const d=`(min-width: ${r.breakpoints[u]})`;n.media[d]={...n.media[d],[l]:On[s.type](dd(e[o],u),r)}})}),n},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function md(){return`__m__-${x.useId().replace(/:/g,"")}`}function Wa(e){return e.startsWith("data-")?e:`data-${e}`}function pd(e){return Object.keys(e).reduce((t,r)=>{const n=e[r];return n===void 0||n===""||n===!1||n===null||(t[Wa(r)]=e[r]),t},{})}function Ya(e){return e?typeof e=="string"?{[Wa(e)]:!0}:Array.isArray(e)?[...e].reduce((t,r)=>({...t,...Ya(r)}),{}):pd(e):null}function Gn(e,t){return Array.isArray(e)?[...e].reduce((r,n)=>({...r,...Gn(n,t)}),{}):typeof e=="function"?e(t):e??{}}function hd({theme:e,style:t,vars:r,styleProps:n}){const o=Gn(t,e),s=Gn(r,e);return{...o,...s,...n}}const Ha=x.forwardRef(({component:e,style:t,__vars:r,className:n,variant:o,mod:s,size:a,hiddenFrom:i,visibleFrom:c,lightHidden:l,darkHidden:u,renderRoot:d,__size:f,...m},v)=>{var k;const p=zt(),h=e||"div",{styleProps:y,rest:w}=Yr(m),b=Su(),C=(k=b==null?void 0:b())==null?void 0:k(y.sx),D=md(),S=fd({styleProps:y,theme:p,data:Ku}),$={ref:v,style:hd({theme:p,style:t,vars:r,styleProps:S.inlineStyles}),className:Te(n,C,{[D]:S.hasResponsiveStyles,"mantine-light-hidden":l,"mantine-dark-hidden":u,[`mantine-hidden-from-${i}`]:i,[`mantine-visible-from-${c}`]:c}),"data-variant":o,"data-size":Ma(a)?void 0:a||void 0,size:f,...Ya(s),...w};return g.jsxs(g.Fragment,{children:[S.hasResponsiveStyles&&g.jsx(Xu,{selector:`.${D}`,styles:S.styles,media:S.media}),typeof d=="function"?d($):g.jsx(h,{...$})]})});Ha.displayName="@mantine/core/Box";const ae=Ha;function Ua(e){return e}function re(e){const t=x.forwardRef(e);return t.extend=Ua,t.withProps=r=>{const n=x.forwardRef((o,s)=>g.jsx(t,{...r,...o,ref:s}));return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t}function ut(e){const t=x.forwardRef(e);return t.withProps=r=>{const n=x.forwardRef((o,s)=>g.jsx(t,{...r,...o,ref:s}));return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t.extend=Ua,t}const vd=x.createContext({dir:"ltr",toggleDirection:()=>{},setDirection:()=>{}});function po(){return x.useContext(vd)}function Hr(){return typeof window<"u"}function Bt(e){return Ga(e)?(e.nodeName||"").toLowerCase():"#document"}function ze(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function rt(e){var t;return(t=(Ga(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ga(e){return Hr()?e instanceof Node||e instanceof ze(e).Node:!1}function Ae(e){return Hr()?e instanceof Element||e instanceof ze(e).Element:!1}function tt(e){return Hr()?e instanceof HTMLElement||e instanceof ze(e).HTMLElement:!1}function $s(e){return!Hr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ze(e).ShadowRoot}function mr(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=qe(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function gd(e){return["table","td","th"].includes(Bt(e))}function Ur(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function ho(e){const t=vo(),r=Ae(e)?qe(e):e;return["transform","translate","scale","rotate","perspective"].some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function yd(e){let t=pt(e);for(;tt(t)&&!Ot(t);){if(ho(t))return t;if(Ur(t))return null;t=pt(t)}return null}function vo(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ot(e){return["html","body","#document"].includes(Bt(e))}function qe(e){return ze(e).getComputedStyle(e)}function Gr(e){return Ae(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function pt(e){if(Bt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||$s(e)&&e.host||rt(e);return $s(t)?t.host:t}function qa(e){const t=pt(e);return Ot(t)?e.ownerDocument?e.ownerDocument.body:e.body:tt(t)&&mr(t)?t:qa(t)}function sr(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=qa(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),a=ze(o);if(s){const i=qn(a);return t.concat(a,a.visualViewport||[],mr(o)?o:[],i&&r?sr(i):[])}return t.concat(o,sr(o,[],r))}function qn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Xe=Math.min,Oe=Math.max,Lr=Math.round,_r=Math.floor,Qe=e=>({x:e,y:e}),bd={left:"right",right:"left",bottom:"top",top:"bottom"},xd={start:"end",end:"start"};function Xn(e,t,r){return Oe(e,Xe(t,r))}function it(e,t){return typeof e=="function"?e(t):e}function Ke(e){return e.split("-")[0]}function Wt(e){return e.split("-")[1]}function go(e){return e==="x"?"y":"x"}function yo(e){return e==="y"?"height":"width"}function ct(e){return["top","bottom"].includes(Ke(e))?"y":"x"}function bo(e){return go(ct(e))}function wd(e,t,r){r===void 0&&(r=!1);const n=Wt(e),o=bo(e),s=yo(o);let a=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=Ir(a)),[a,Ir(a)]}function Sd(e){const t=Ir(e);return[Kn(e),t,Kn(t)]}function Kn(e){return e.replace(/start|end/g,t=>xd[t])}function Cd(e,t,r){const n=["left","right"],o=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?s:a;default:return[]}}function Dd(e,t,r,n){const o=Wt(e);let s=Cd(Ke(e),r==="start",n);return o&&(s=s.map(a=>a+"-"+o),t&&(s=s.concat(s.map(Kn)))),s}function Ir(e){return e.replace(/left|right|bottom|top/g,t=>bd[t])}function _d(e){return{top:0,right:0,bottom:0,left:0,...e}}function xo(e){return typeof e!="number"?_d(e):{top:e,right:e,bottom:e,left:e}}function At(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function Os(e,t,r){let{reference:n,floating:o}=e;const s=ct(t),a=bo(t),i=yo(a),c=Ke(t),l=s==="y",u=n.x+n.width/2-o.width/2,d=n.y+n.height/2-o.height/2,f=n[i]/2-o[i]/2;let m;switch(c){case"top":m={x:u,y:n.y-o.height};break;case"bottom":m={x:u,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:d};break;case"left":m={x:n.x-o.width,y:d};break;default:m={x:n.x,y:n.y}}switch(Wt(t)){case"start":m[a]-=f*(r&&l?-1:1);break;case"end":m[a]+=f*(r&&l?-1:1);break}return m}const Rd=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:a}=r,i=s.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Os(l,n,c),f=n,m={},v=0;for(let p=0;p<i.length;p++){const{name:h,fn:y}=i[p],{x:w,y:b,data:C,reset:D}=await y({x:u,y:d,initialPlacement:n,placement:f,strategy:o,middlewareData:m,rects:l,platform:a,elements:{reference:e,floating:t}});u=w??u,d=b??d,m={...m,[h]:{...m[h],...C}},D&&v<=50&&(v++,typeof D=="object"&&(D.placement&&(f=D.placement),D.rects&&(l=D.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):D.rects),{x:u,y:d}=Os(l,f,c)),p=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:m}};async function wo(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:s,rects:a,elements:i,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:m=0}=it(t,e),v=xo(m),h=i[f?d==="floating"?"reference":"floating":d],y=At(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(h)))==null||r?h:h.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(i.floating)),boundary:l,rootBoundary:u,strategy:c})),w=d==="floating"?{x:n,y:o,width:a.floating.width,height:a.floating.height}:a.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(i.floating)),C=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},D=At(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:w,offsetParent:b,strategy:c}):w);return{top:(y.top-D.top+v.top)/C.y,bottom:(D.bottom-y.bottom+v.bottom)/C.y,left:(y.left-D.left+v.left)/C.x,right:(D.right-y.right+v.right)/C.x}}const Nd=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:s,platform:a,elements:i,middlewareData:c}=t,{element:l,padding:u=0}=it(e,t)||{};if(l==null)return{};const d=xo(u),f={x:r,y:n},m=bo(o),v=yo(m),p=await a.getDimensions(l),h=m==="y",y=h?"top":"left",w=h?"bottom":"right",b=h?"clientHeight":"clientWidth",C=s.reference[v]+s.reference[m]-f[m]-s.floating[v],D=f[m]-s.reference[m],S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let $=S?S[b]:0;(!$||!await(a.isElement==null?void 0:a.isElement(S)))&&($=i.floating[b]||s.floating[v]);const k=C/2-D/2,j=$/2-p[v]/2-1,M=Xe(d[y],j),L=Xe(d[w],j),V=M,z=$-p[v]-L,P=$/2-p[v]/2+k,A=Xn(V,P,z),_=!c.arrow&&Wt(o)!=null&&P!==A&&s.reference[v]/2-(P<V?M:L)-p[v]/2<0,N=_?P<V?P-V:P-z:0;return{[m]:f[m]+N,data:{[m]:A,centerOffset:P-A-N,..._&&{alignmentOffset:N}},reset:_}}}),Ed=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:s,rects:a,initialPlacement:i,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:p=!0,...h}=it(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const y=Ke(o),w=ct(i),b=Ke(i)===i,C=await(c.isRTL==null?void 0:c.isRTL(l.floating)),D=f||(b||!p?[Ir(i)]:Sd(i)),S=v!=="none";!f&&S&&D.push(...Dd(i,p,v,C));const $=[i,...D],k=await wo(t,h),j=[];let M=((n=s.flip)==null?void 0:n.overflows)||[];if(u&&j.push(k[y]),d){const P=wd(o,a,C);j.push(k[P[0]],k[P[1]])}if(M=[...M,{placement:o,overflows:j}],!j.every(P=>P<=0)){var L,V;const P=(((L=s.flip)==null?void 0:L.index)||0)+1,A=$[P];if(A)return{data:{index:P,overflows:M},reset:{placement:A}};let _=(V=M.filter(N=>N.overflows[0]<=0).sort((N,T)=>N.overflows[1]-T.overflows[1])[0])==null?void 0:V.placement;if(!_)switch(m){case"bestFit":{var z;const N=(z=M.filter(T=>{if(S){const E=ct(T.placement);return E===w||E==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(E=>E>0).reduce((E,R)=>E+R,0)]).sort((T,E)=>T[1]-E[1])[0])==null?void 0:z[0];N&&(_=N);break}case"initialPlacement":_=i;break}if(o!==_)return{reset:{placement:_}}}return{}}}};function Xa(e){const t=Xe(...e.map(s=>s.left)),r=Xe(...e.map(s=>s.top)),n=Oe(...e.map(s=>s.right)),o=Oe(...e.map(s=>s.bottom));return{x:t,y:r,width:n-t,height:o-r}}function Td(e){const t=e.slice().sort((o,s)=>o.y-s.y),r=[];let n=null;for(let o=0;o<t.length;o++){const s=t[o];!n||s.y-n.y>n.height/2?r.push([s]):r[r.length-1].push(s),n=s}return r.map(o=>At(Xa(o)))}const kd=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:r,elements:n,rects:o,platform:s,strategy:a}=t,{padding:i=2,x:c,y:l}=it(e,t),u=Array.from(await(s.getClientRects==null?void 0:s.getClientRects(n.reference))||[]),d=Td(u),f=At(Xa(u)),m=xo(i);function v(){if(d.length===2&&d[0].left>d[1].right&&c!=null&&l!=null)return d.find(h=>c>h.left-m.left&&c<h.right+m.right&&l>h.top-m.top&&l<h.bottom+m.bottom)||f;if(d.length>=2){if(ct(r)==="y"){const M=d[0],L=d[d.length-1],V=Ke(r)==="top",z=M.top,P=L.bottom,A=V?M.left:L.left,_=V?M.right:L.right,N=_-A,T=P-z;return{top:z,bottom:P,left:A,right:_,width:N,height:T,x:A,y:z}}const h=Ke(r)==="left",y=Oe(...d.map(M=>M.right)),w=Xe(...d.map(M=>M.left)),b=d.filter(M=>h?M.left===w:M.right===y),C=b[0].top,D=b[b.length-1].bottom,S=w,$=y,k=$-S,j=D-C;return{top:C,bottom:D,left:S,right:$,width:k,height:j,x:S,y:C}}return f}const p=await s.getElementRects({reference:{getBoundingClientRect:v},floating:n.floating,strategy:a});return o.reference.x!==p.reference.x||o.reference.y!==p.reference.y||o.reference.width!==p.reference.width||o.reference.height!==p.reference.height?{reset:{rects:p}}:{}}}};async function $d(e,t){const{placement:r,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),a=Ke(r),i=Wt(r),c=ct(r)==="y",l=["left","top"].includes(a)?-1:1,u=s&&c?-1:1,d=it(t,e);let{mainAxis:f,crossAxis:m,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return i&&typeof v=="number"&&(m=i==="end"?v*-1:v),c?{x:m*u,y:f*l}:{x:f*l,y:m*u}}const Od=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:s,placement:a,middlewareData:i}=t,c=await $d(t,e);return a===((r=i.offset)==null?void 0:r.placement)&&(n=i.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:a}}}}},Ad=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:i={fn:h=>{let{x:y,y:w}=h;return{x:y,y:w}}},...c}=it(e,t),l={x:r,y:n},u=await wo(t,c),d=ct(Ke(o)),f=go(d);let m=l[f],v=l[d];if(s){const h=f==="y"?"top":"left",y=f==="y"?"bottom":"right",w=m+u[h],b=m-u[y];m=Xn(w,m,b)}if(a){const h=d==="y"?"top":"left",y=d==="y"?"bottom":"right",w=v+u[h],b=v-u[y];v=Xn(w,v,b)}const p=i.fn({...t,[f]:m,[d]:v});return{...p,data:{x:p.x-r,y:p.y-n,enabled:{[f]:s,[d]:a}}}}}},jd=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:s,middlewareData:a}=t,{offset:i=0,mainAxis:c=!0,crossAxis:l=!0}=it(e,t),u={x:r,y:n},d=ct(o),f=go(d);let m=u[f],v=u[d];const p=it(i,t),h=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){const b=f==="y"?"height":"width",C=s.reference[f]-s.floating[b]+h.mainAxis,D=s.reference[f]+s.reference[b]-h.mainAxis;m<C?m=C:m>D&&(m=D)}if(l){var y,w;const b=f==="y"?"width":"height",C=["top","left"].includes(Ke(o)),D=s.reference[d]-s.floating[b]+(C&&((y=a.offset)==null?void 0:y[d])||0)+(C?0:h.crossAxis),S=s.reference[d]+s.reference[b]+(C?0:((w=a.offset)==null?void 0:w[d])||0)-(C?h.crossAxis:0);v<D?v=D:v>S&&(v=S)}return{[f]:m,[d]:v}}}},Md=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:s,platform:a,elements:i}=t,{apply:c=()=>{},...l}=it(e,t),u=await wo(t,l),d=Ke(o),f=Wt(o),m=ct(o)==="y",{width:v,height:p}=s.floating;let h,y;d==="top"||d==="bottom"?(h=d,y=f===(await(a.isRTL==null?void 0:a.isRTL(i.floating))?"start":"end")?"left":"right"):(y=d,h=f==="end"?"top":"bottom");const w=p-u.top-u.bottom,b=v-u.left-u.right,C=Xe(p-u[h],w),D=Xe(v-u[y],b),S=!t.middlewareData.shift;let $=C,k=D;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(k=b),(n=t.middlewareData.shift)!=null&&n.enabled.y&&($=w),S&&!f){const M=Oe(u.left,0),L=Oe(u.right,0),V=Oe(u.top,0),z=Oe(u.bottom,0);m?k=v-2*(M!==0||L!==0?M+L:Oe(u.left,u.right)):$=p-2*(V!==0||z!==0?V+z:Oe(u.top,u.bottom))}await c({...t,availableWidth:k,availableHeight:$});const j=await a.getDimensions(i.floating);return v!==j.width||p!==j.height?{reset:{rects:!0}}:{}}}};function Ka(e){const t=qe(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=tt(e),s=o?e.offsetWidth:r,a=o?e.offsetHeight:n,i=Lr(r)!==s||Lr(n)!==a;return i&&(r=s,n=a),{width:r,height:n,$:i}}function So(e){return Ae(e)?e:e.contextElement}function kt(e){const t=So(e);if(!tt(t))return Qe(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:s}=Ka(t);let a=(s?Lr(r.width):r.width)/n,i=(s?Lr(r.height):r.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const Pd=Qe(0);function Za(e){const t=ze(e);return!vo()||!t.visualViewport?Pd:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ld(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ze(e)?!1:t}function xt(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),s=So(e);let a=Qe(1);t&&(n?Ae(n)&&(a=kt(n)):a=kt(e));const i=Ld(s,r,n)?Za(s):Qe(0);let c=(o.left+i.x)/a.x,l=(o.top+i.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(s){const f=ze(s),m=n&&Ae(n)?ze(n):n;let v=f,p=qn(v);for(;p&&n&&m!==v;){const h=kt(p),y=p.getBoundingClientRect(),w=qe(p),b=y.left+(p.clientLeft+parseFloat(w.paddingLeft))*h.x,C=y.top+(p.clientTop+parseFloat(w.paddingTop))*h.y;c*=h.x,l*=h.y,u*=h.x,d*=h.y,c+=b,l+=C,v=ze(p),p=qn(v)}}return At({width:u,height:d,x:c,y:l})}function Co(e,t){const r=Gr(e).scrollLeft;return t?t.left+r:xt(rt(e)).left+r}function Ja(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-(r?0:Co(e,n)),s=n.top+t.scrollTop;return{x:o,y:s}}function Id(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const s=o==="fixed",a=rt(n),i=t?Ur(t.floating):!1;if(n===a||i&&s)return r;let c={scrollLeft:0,scrollTop:0},l=Qe(1);const u=Qe(0),d=tt(n);if((d||!d&&!s)&&((Bt(n)!=="body"||mr(a))&&(c=Gr(n)),tt(n))){const m=xt(n);l=kt(n),u.x=m.x+n.clientLeft,u.y=m.y+n.clientTop}const f=a&&!d&&!s?Ja(a,c,!0):Qe(0);return{width:r.width*l.x,height:r.height*l.y,x:r.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:r.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Fd(e){return Array.from(e.getClientRects())}function Vd(e){const t=rt(e),r=Gr(e),n=e.ownerDocument.body,o=Oe(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=Oe(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+Co(e);const i=-r.scrollTop;return qe(n).direction==="rtl"&&(a+=Oe(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:a,y:i}}function zd(e,t){const r=ze(e),n=rt(e),o=r.visualViewport;let s=n.clientWidth,a=n.clientHeight,i=0,c=0;if(o){s=o.width,a=o.height;const l=vo();(!l||l&&t==="fixed")&&(i=o.offsetLeft,c=o.offsetTop)}return{width:s,height:a,x:i,y:c}}function Bd(e,t){const r=xt(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,s=tt(e)?kt(e):Qe(1),a=e.clientWidth*s.x,i=e.clientHeight*s.y,c=o*s.x,l=n*s.y;return{width:a,height:i,x:c,y:l}}function As(e,t,r){let n;if(t==="viewport")n=zd(e,r);else if(t==="document")n=Vd(rt(e));else if(Ae(t))n=Bd(t,r);else{const o=Za(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return At(n)}function Qa(e,t){const r=pt(e);return r===t||!Ae(r)||Ot(r)?!1:qe(r).position==="fixed"||Qa(r,t)}function Wd(e,t){const r=t.get(e);if(r)return r;let n=sr(e,[],!1).filter(i=>Ae(i)&&Bt(i)!=="body"),o=null;const s=qe(e).position==="fixed";let a=s?pt(e):e;for(;Ae(a)&&!Ot(a);){const i=qe(a),c=ho(a);!c&&i.position==="fixed"&&(o=null),(s?!c&&!o:!c&&i.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||mr(a)&&!c&&Qa(e,a))?n=n.filter(u=>u!==a):o=i,a=pt(a)}return t.set(e,n),n}function Yd(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const a=[...r==="clippingAncestors"?Ur(t)?[]:Wd(t,this._c):[].concat(r),n],i=a[0],c=a.reduce((l,u)=>{const d=As(t,u,o);return l.top=Oe(d.top,l.top),l.right=Xe(d.right,l.right),l.bottom=Xe(d.bottom,l.bottom),l.left=Oe(d.left,l.left),l},As(t,i,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Hd(e){const{width:t,height:r}=Ka(e);return{width:t,height:r}}function Ud(e,t,r){const n=tt(t),o=rt(t),s=r==="fixed",a=xt(e,!0,s,t);let i={scrollLeft:0,scrollTop:0};const c=Qe(0);if(n||!n&&!s)if((Bt(t)!=="body"||mr(o))&&(i=Gr(t)),n){const f=xt(t,!0,s,t);c.x=f.x+t.clientLeft,c.y=f.y+t.clientTop}else o&&(c.x=Co(o));const l=o&&!n&&!s?Ja(o,i):Qe(0),u=a.left+i.scrollLeft-c.x-l.x,d=a.top+i.scrollTop-c.y-l.y;return{x:u,y:d,width:a.width,height:a.height}}function An(e){return qe(e).position==="static"}function js(e,t){if(!tt(e)||qe(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return rt(e)===r&&(r=r.ownerDocument.body),r}function ei(e,t){const r=ze(e);if(Ur(e))return r;if(!tt(e)){let o=pt(e);for(;o&&!Ot(o);){if(Ae(o)&&!An(o))return o;o=pt(o)}return r}let n=js(e,t);for(;n&&gd(n)&&An(n);)n=js(n,t);return n&&Ot(n)&&An(n)&&!ho(n)?r:n||yd(e)||r}const Gd=async function(e){const t=this.getOffsetParent||ei,r=this.getDimensions,n=await r(e.floating);return{reference:Ud(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function qd(e){return qe(e).direction==="rtl"}const Xd={convertOffsetParentRelativeRectToViewportRelativeRect:Id,getDocumentElement:rt,getClippingRect:Yd,getOffsetParent:ei,getElementRects:Gd,getClientRects:Fd,getDimensions:Hd,getScale:kt,isElement:Ae,isRTL:qd};function ti(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Kd(e,t){let r=null,n;const o=rt(e);function s(){var i;clearTimeout(n),(i=r)==null||i.disconnect(),r=null}function a(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),s();const l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:m}=l;if(i||t(),!f||!m)return;const v=_r(d),p=_r(o.clientWidth-(u+f)),h=_r(o.clientHeight-(d+m)),y=_r(u),b={rootMargin:-v+"px "+-p+"px "+-h+"px "+-y+"px",threshold:Oe(0,Xe(1,c))||1};let C=!0;function D(S){const $=S[0].intersectionRatio;if($!==c){if(!C)return a();$?a(!1,$):n=setTimeout(()=>{a(!1,1e-7)},1e3)}$===1&&!ti(l,e.getBoundingClientRect())&&a(),C=!1}try{r=new IntersectionObserver(D,{...b,root:o.ownerDocument})}catch{r=new IntersectionObserver(D,b)}r.observe(e)}return a(!0),s}function Zd(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,l=So(e),u=o||s?[...l?sr(l):[],...sr(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",r,{passive:!0}),s&&y.addEventListener("resize",r)});const d=l&&i?Kd(l,r):null;let f=-1,m=null;a&&(m=new ResizeObserver(y=>{let[w]=y;w&&w.target===l&&m&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var b;(b=m)==null||b.observe(t)})),r()}),l&&!c&&m.observe(l),m.observe(t));let v,p=c?xt(e):null;c&&h();function h(){const y=xt(e);p&&!ti(p,y)&&r(),p=y,v=requestAnimationFrame(h)}return r(),()=>{var y;u.forEach(w=>{o&&w.removeEventListener("scroll",r),s&&w.removeEventListener("resize",r)}),d==null||d(),(y=m)==null||y.disconnect(),m=null,c&&cancelAnimationFrame(v)}}const Jd=Od,Qd=Ad,ef=Ed,tf=Md,Ms=Nd,rf=kd,nf=jd,of=(e,t,r)=>{const n=new Map,o={platform:Xd,...r},s={...o.platform,_c:n};return Rd(e,t,{...o,platform:s})};var Tr=typeof document<"u"?x.useLayoutEffect:x.useEffect;function Fr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Fr(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const s=o[n];if(!(s==="_owner"&&e.$$typeof)&&!Fr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function ri(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ps(e,t){const r=ri(e);return Math.round(t*r)/r}function jn(e){const t=H.useRef(e);return Tr(()=>{t.current=e}),t}function sf(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:s,floating:a}={},transform:i=!0,whileElementsMounted:c,open:l}=e,[u,d]=H.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,m]=H.useState(n);Fr(f,n)||m(n);const[v,p]=H.useState(null),[h,y]=H.useState(null),w=H.useCallback(T=>{T!==S.current&&(S.current=T,p(T))},[]),b=H.useCallback(T=>{T!==$.current&&($.current=T,y(T))},[]),C=s||v,D=a||h,S=H.useRef(null),$=H.useRef(null),k=H.useRef(u),j=c!=null,M=jn(c),L=jn(o),V=jn(l),z=H.useCallback(()=>{if(!S.current||!$.current)return;const T={placement:t,strategy:r,middleware:f};L.current&&(T.platform=L.current),of(S.current,$.current,T).then(E=>{const R={...E,isPositioned:V.current!==!1};P.current&&!Fr(k.current,R)&&(k.current=R,Bc.flushSync(()=>{d(R)}))})},[f,t,r,L,V]);Tr(()=>{l===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(T=>({...T,isPositioned:!1})))},[l]);const P=H.useRef(!1);Tr(()=>(P.current=!0,()=>{P.current=!1}),[]),Tr(()=>{if(C&&(S.current=C),D&&($.current=D),C&&D){if(M.current)return M.current(C,D,z);z()}},[C,D,z,M,j]);const A=H.useMemo(()=>({reference:S,floating:$,setReference:w,setFloating:b}),[w,b]),_=H.useMemo(()=>({reference:C,floating:D}),[C,D]),N=H.useMemo(()=>{const T={position:r,left:0,top:0};if(!_.floating)return T;const E=Ps(_.floating,u.x),R=Ps(_.floating,u.y);return i?{...T,transform:"translate("+E+"px, "+R+"px)",...ri(_.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:E,top:R}},[r,i,_.floating,u.x,u.y]);return H.useMemo(()=>({...u,update:z,refs:A,elements:_,floatingStyles:N}),[u,z,A,_,N])}const af=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Ms({element:n.current,padding:o}).fn(r):{}:n?Ms({element:n,padding:o}).fn(r):{}}}},cf=(e,t)=>({...Jd(e),options:[e,t]}),lf=(e,t)=>({...Qd(e),options:[e,t]}),Ls=(e,t)=>({...nf(e),options:[e,t]}),Is=(e,t)=>({...ef(e),options:[e,t]}),uf=(e,t)=>({...tf(e),options:[e,t]}),Fs=(e,t)=>({...rf(e),options:[e,t]}),df=(e,t)=>({...af(e),options:[e,t]});function ff(e){return H.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})},e)}const ni={...H},mf=ni.useInsertionEffect,pf=mf||(e=>e());function hf(e){const t=H.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return pf(()=>{t.current=e}),H.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.current==null?void 0:t.current(...n)},[])}var Zn=typeof document<"u"?x.useLayoutEffect:x.useEffect;let Vs=!1,vf=0;const zs=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+vf++;function gf(){const[e,t]=H.useState(()=>Vs?zs():void 0);return Zn(()=>{e==null&&t(zs())},[]),H.useEffect(()=>{Vs=!0},[]),e}const yf=ni.useId,bf=yf||gf;let Jn;process.env.NODE_ENV!=="production"&&(Jn=new Set);function xf(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const o="Floating UI: "+r.join(" ");if(!((e=Jn)!=null&&e.has(o))){var s;(s=Jn)==null||s.add(o),console.error(o)}}function wf(){const e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(o=>o(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var n;e.set(t,((n=e.get(t))==null?void 0:n.filter(o=>o!==r))||[])}}}const Sf=H.createContext(null),Cf=H.createContext(null),Df=()=>{var e;return((e=H.useContext(Sf))==null?void 0:e.id)||null},_f=()=>H.useContext(Cf);function Rf(e){const{open:t=!1,onOpenChange:r,elements:n}=e,o=bf(),s=H.useRef({}),[a]=H.useState(()=>wf()),i=Df()!=null;if(process.env.NODE_ENV!=="production"){const m=n.reference;m&&!Ae(m)&&xf("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[c,l]=H.useState(n.reference),u=hf((m,v,p)=>{s.current.openEvent=m?v:void 0,a.emit("openchange",{open:m,event:v,reason:p,nested:i}),r==null||r(m,v,p)}),d=H.useMemo(()=>({setPositionReference:l}),[]),f=H.useMemo(()=>({reference:c||n.reference||null,floating:n.floating||null,domReference:n.reference}),[c,n.reference,n.floating]);return H.useMemo(()=>({dataRef:s,open:t,onOpenChange:u,elements:f,events:a,floatingId:o,refs:d}),[t,u,f,a,o,d])}function Nf(e){e===void 0&&(e={});const{nodeId:t}=e,r=Rf({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,o=n.elements,[s,a]=H.useState(null),[i,c]=H.useState(null),u=(o==null?void 0:o.domReference)||s,d=H.useRef(null),f=_f();Zn(()=>{u&&(d.current=u)},[u]);const m=sf({...e,elements:{...o,...i&&{reference:i}}}),v=H.useCallback(b=>{const C=Ae(b)?{getBoundingClientRect:()=>b.getBoundingClientRect(),contextElement:b}:b;c(C),m.refs.setReference(C)},[m.refs]),p=H.useCallback(b=>{(Ae(b)||b===null)&&(d.current=b,a(b)),(Ae(m.refs.reference.current)||m.refs.reference.current===null||b!==null&&!Ae(b))&&m.refs.setReference(b)},[m.refs]),h=H.useMemo(()=>({...m.refs,setReference:p,setPositionReference:v,domReference:d}),[m.refs,p,v]),y=H.useMemo(()=>({...m.elements,domReference:u}),[m.elements,u]),w=H.useMemo(()=>({...m,...n,refs:h,elements:y,nodeId:t}),[m,h,y,t,n]);return Zn(()=>{n.dataRef.current.floatingContext=w;const b=f==null?void 0:f.nodesRef.current.find(C=>C.id===t);b&&(b.context=w)}),H.useMemo(()=>({...m,context:w,refs:h,elements:y}),[m,h,y,w])}const[Ef,We]=Ft("ScrollArea.Root component was not found in tree");function jt(e,t){const r=gt(t);co(()=>{let n=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return o.observe(e),()=>{window.cancelAnimationFrame(n),o.unobserve(e)}}},[e,r])}const Tf=x.forwardRef((e,t)=>{const{style:r,...n}=e,o=We(),[s,a]=x.useState(0),[i,c]=x.useState(0),l=!!(s&&i);return jt(o.scrollbarX,()=>{var d;const u=((d=o.scrollbarX)==null?void 0:d.offsetHeight)||0;o.onCornerHeightChange(u),c(u)}),jt(o.scrollbarY,()=>{var d;const u=((d=o.scrollbarY)==null?void 0:d.offsetWidth)||0;o.onCornerWidthChange(u),a(u)}),l?g.jsx("div",{...n,ref:t,style:{...r,width:s,height:i}}):null}),kf=x.forwardRef((e,t)=>{const r=We(),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?g.jsx(Tf,{...e,ref:t}):null}),$f={scrollHideDelay:1e3,type:"hover"},oi=x.forwardRef((e,t)=>{const r=q("ScrollAreaRoot",$f,e),{type:n,scrollHideDelay:o,scrollbars:s,...a}=r,[i,c]=x.useState(null),[l,u]=x.useState(null),[d,f]=x.useState(null),[m,v]=x.useState(null),[p,h]=x.useState(null),[y,w]=x.useState(0),[b,C]=x.useState(0),[D,S]=x.useState(!1),[$,k]=x.useState(!1),j=Le(t,M=>c(M));return g.jsx(Ef,{value:{type:n,scrollHideDelay:o,scrollArea:i,viewport:l,onViewportChange:u,content:d,onContentChange:f,scrollbarX:m,onScrollbarXChange:v,scrollbarXEnabled:D,onScrollbarXEnabledChange:S,scrollbarY:p,onScrollbarYChange:h,scrollbarYEnabled:$,onScrollbarYEnabledChange:k,onCornerWidthChange:w,onCornerHeightChange:C},children:g.jsx(ae,{...a,ref:j,__vars:{"--sa-corner-width":s!=="xy"?"0px":`${y}px`,"--sa-corner-height":s!=="xy"?"0px":`${b}px`}})})});oi.displayName="@mantine/core/ScrollAreaRoot";function si(e,t){const r=e/t;return Number.isNaN(r)?0:r}function qr(e){const t=si(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function ai(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function Of(e,[t,r]){return Math.min(r,Math.max(t,e))}function Bs(e,t,r="ltr"){const n=qr(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-o,a=t.content-t.viewport,i=s-n,c=r==="ltr"?[0,a]:[a*-1,0],l=Of(e,c);return ai([0,a],[0,i])(l)}function Af(e,t,r,n="ltr"){const o=qr(r),s=o/2,a=t||s,i=o-a,c=r.scrollbar.paddingStart+a,l=r.scrollbar.size-r.scrollbar.paddingEnd-i,u=r.content-r.viewport,d=n==="ltr"?[0,u]:[u*-1,0];return ai([c,l],d)(e)}function ii(e,t){return e>0&&e<t}function Vr(e){return e?parseInt(e,10):0}function bt(e,t,{checkForDefaultPrevented:r=!0}={}){return n=>{e==null||e(n),(r===!1||!n.defaultPrevented)&&(t==null||t(n))}}const[jf,ci]=Ft("ScrollAreaScrollbar was not found in tree"),li=x.forwardRef((e,t)=>{const{sizes:r,hasThumb:n,onThumbChange:o,onThumbPointerUp:s,onThumbPointerDown:a,onThumbPositionChange:i,onDragScroll:c,onWheelScroll:l,onResize:u,...d}=e,f=We(),[m,v]=x.useState(null),p=Le(t,k=>v(k)),h=x.useRef(null),y=x.useRef(""),{viewport:w}=f,b=r.content-r.viewport,C=gt(l),D=gt(i),S=dr(u,10),$=k=>{if(h.current){const j=k.clientX-h.current.left,M=k.clientY-h.current.top;c({x:j,y:M})}};return x.useEffect(()=>{const k=j=>{const M=j.target;(m==null?void 0:m.contains(M))&&C(j,b)};return document.addEventListener("wheel",k,{passive:!1}),()=>document.removeEventListener("wheel",k,{passive:!1})},[w,m,b,C]),x.useEffect(D,[r,D]),jt(m,S),jt(f.content,S),g.jsx(jf,{value:{scrollbar:m,hasThumb:n,onThumbChange:gt(o),onThumbPointerUp:gt(s),onThumbPositionChange:D,onThumbPointerDown:gt(a)},children:g.jsx("div",{...d,ref:p,"data-mantine-scrollbar":!0,style:{position:"absolute",...d.style},onPointerDown:bt(e.onPointerDown,k=>{k.preventDefault(),k.button===0&&(k.target.setPointerCapture(k.pointerId),h.current=m.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",$(k))}),onPointerMove:bt(e.onPointerMove,$),onPointerUp:bt(e.onPointerUp,k=>{const j=k.target;j.hasPointerCapture(k.pointerId)&&(k.preventDefault(),j.releasePointerCapture(k.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=y.current,h.current=null}})})}),ui=x.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,style:o,...s}=e,a=We(),[i,c]=x.useState(),l=x.useRef(null),u=Le(t,l,a.onScrollbarXChange);return x.useEffect(()=>{l.current&&c(getComputedStyle(l.current))},[l]),g.jsx(li,{"data-orientation":"horizontal",...s,ref:u,sizes:r,style:{...o,"--sa-thumb-width":`${qr(r)}px`},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(a.viewport){const m=a.viewport.scrollLeft+d.deltaX;e.onWheelScroll(m),ii(m,f)&&d.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&n({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Vr(i.paddingLeft),paddingEnd:Vr(i.paddingRight)}})}})});ui.displayName="@mantine/core/ScrollAreaScrollbarX";const di=x.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,style:o,...s}=e,a=We(),[i,c]=x.useState(),l=x.useRef(null),u=Le(t,l,a.onScrollbarYChange);return x.useEffect(()=>{l.current&&c(window.getComputedStyle(l.current))},[]),g.jsx(li,{...s,"data-orientation":"vertical",ref:u,sizes:r,style:{"--sa-thumb-height":`${qr(r)}px`,...o},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(a.viewport){const m=a.viewport.scrollTop+d.deltaY;e.onWheelScroll(m),ii(m,f)&&d.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&n({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Vr(i.paddingTop),paddingEnd:Vr(i.paddingBottom)}})}})});di.displayName="@mantine/core/ScrollAreaScrollbarY";const Xr=x.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,{dir:o}=po(),s=We(),a=x.useRef(null),i=x.useRef(0),[c,l]=x.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=si(c.viewport,c.content),d={...n,sizes:c,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:m=>{a.current=m},onThumbPointerUp:()=>{i.current=0},onThumbPointerDown:m=>{i.current=m}},f=(m,v)=>Af(m,i.current,c,v);return r==="horizontal"?g.jsx(ui,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&a.current){const m=s.viewport.scrollLeft,v=Bs(m,c,o);a.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:m=>{s.viewport&&(s.viewport.scrollLeft=m)},onDragScroll:m=>{s.viewport&&(s.viewport.scrollLeft=f(m,o))}}):r==="vertical"?g.jsx(di,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&a.current){const m=s.viewport.scrollTop,v=Bs(m,c);c.scrollbar.size===0?a.current.style.setProperty("--thumb-opacity","0"):a.current.style.setProperty("--thumb-opacity","1"),a.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:m=>{s.viewport&&(s.viewport.scrollTop=m)},onDragScroll:m=>{s.viewport&&(s.viewport.scrollTop=f(m))}}):null});Xr.displayName="@mantine/core/ScrollAreaScrollbarVisible";const Do=x.forwardRef((e,t)=>{const r=We(),{forceMount:n,...o}=e,[s,a]=x.useState(!1),i=e.orientation==="horizontal",c=dr(()=>{if(r.viewport){const l=r.viewport.offsetWidth<r.viewport.scrollWidth,u=r.viewport.offsetHeight<r.viewport.scrollHeight;a(i?l:u)}},10);return jt(r.viewport,c),jt(r.content,c),n||s?g.jsx(Xr,{"data-state":s?"visible":"hidden",...o,ref:t}):null});Do.displayName="@mantine/core/ScrollAreaScrollbarAuto";const fi=x.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=We(),[s,a]=x.useState(!1);return x.useEffect(()=>{const{scrollArea:i}=o;let c=0;if(i){const l=()=>{window.clearTimeout(c),a(!0)},u=()=>{c=window.setTimeout(()=>a(!1),o.scrollHideDelay)};return i.addEventListener("pointerenter",l),i.addEventListener("pointerleave",u),()=>{window.clearTimeout(c),i.removeEventListener("pointerenter",l),i.removeEventListener("pointerleave",u)}}},[o.scrollArea,o.scrollHideDelay]),r||s?g.jsx(Do,{"data-state":s?"visible":"hidden",...n,ref:t}):null});fi.displayName="@mantine/core/ScrollAreaScrollbarHover";const Mf=x.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=We(),s=e.orientation==="horizontal",[a,i]=x.useState("hidden"),c=dr(()=>i("idle"),100);return x.useEffect(()=>{if(a==="idle"){const l=window.setTimeout(()=>i("hidden"),o.scrollHideDelay);return()=>window.clearTimeout(l)}},[a,o.scrollHideDelay]),x.useEffect(()=>{const{viewport:l}=o,u=s?"scrollLeft":"scrollTop";if(l){let d=l[u];const f=()=>{const m=l[u];d!==m&&(i("scrolling"),c()),d=m};return l.addEventListener("scroll",f),()=>l.removeEventListener("scroll",f)}},[o.viewport,s,c]),r||a!=="hidden"?g.jsx(Xr,{"data-state":a==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:bt(e.onPointerEnter,()=>i("interacting")),onPointerLeave:bt(e.onPointerLeave,()=>i("idle"))}):null}),Qn=x.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=We(),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:a}=o,i=e.orientation==="horizontal";return x.useEffect(()=>(i?s(!0):a(!0),()=>{i?s(!1):a(!1)}),[i,s,a]),o.type==="hover"?g.jsx(fi,{...n,ref:t,forceMount:r}):o.type==="scroll"?g.jsx(Mf,{...n,ref:t,forceMount:r}):o.type==="auto"?g.jsx(Do,{...n,ref:t,forceMount:r}):o.type==="always"?g.jsx(Xr,{...n,ref:t}):null});Qn.displayName="@mantine/core/ScrollAreaScrollbar";function Pf(e,t=()=>{}){let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function o(){const s={left:e.scrollLeft,top:e.scrollTop},a=r.left!==s.left,i=r.top!==s.top;(a||i)&&t(),r=s,n=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(n)}const mi=x.forwardRef((e,t)=>{const{style:r,...n}=e,o=We(),s=ci(),{onThumbPositionChange:a}=s,i=Le(t,u=>s.onThumbChange(u)),c=x.useRef(void 0),l=dr(()=>{c.current&&(c.current(),c.current=void 0)},100);return x.useEffect(()=>{const{viewport:u}=o;if(u){const d=()=>{if(l(),!c.current){const f=Pf(u,a);c.current=f,a()}};return a(),u.addEventListener("scroll",d),()=>u.removeEventListener("scroll",d)}},[o.viewport,l,a]),g.jsx("div",{"data-state":s.hasThumb?"visible":"hidden",...n,ref:i,style:{width:"var(--sa-thumb-width)",height:"var(--sa-thumb-height)",...r},onPointerDownCapture:bt(e.onPointerDownCapture,u=>{const f=u.target.getBoundingClientRect(),m=u.clientX-f.left,v=u.clientY-f.top;s.onThumbPointerDown({x:m,y:v})}),onPointerUp:bt(e.onPointerUp,s.onThumbPointerUp)})});mi.displayName="@mantine/core/ScrollAreaThumb";const eo=x.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=ci();return r||o.hasThumb?g.jsx(mi,{ref:t,...n}):null});eo.displayName="@mantine/core/ScrollAreaThumb";const pi=x.forwardRef(({children:e,style:t,...r},n)=>{const o=We(),s=Le(n,o.onViewportChange);return g.jsx(ae,{...r,ref:s,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...t},children:g.jsx("div",{style:{minWidth:"100%",display:"table"},ref:o.onContentChange,children:e})})});pi.displayName="@mantine/core/ScrollAreaViewport";var _o={root:"m_d57069b5",viewport:"m_c0783ff9",viewportInner:"m_f8f631dd",scrollbar:"m_c44ba933",thumb:"m_d8b5e363",corner:"m_21657268"};const hi={scrollHideDelay:1e3,type:"hover",scrollbars:"xy"},Lf=(e,{scrollbarSize:t,overscrollBehavior:r})=>({root:{"--scrollarea-scrollbar-size":ge(t),"--scrollarea-over-scroll-behavior":r}}),pr=re((e,t)=>{const r=q("ScrollArea",hi,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,scrollbarSize:c,vars:l,type:u,scrollHideDelay:d,viewportProps:f,viewportRef:m,onScrollPositionChange:v,children:p,offsetScrollbars:h,scrollbars:y,onBottomReached:w,onTopReached:b,overscrollBehavior:C,...D}=r,[S,$]=x.useState(!1),[k,j]=x.useState(!1),[M,L]=x.useState(!1),V=me({name:"ScrollArea",props:r,classes:_o,className:o,style:s,classNames:n,styles:a,unstyled:i,vars:l,varsResolver:Lf}),z=x.useRef(null),P=ff([m,z]);return x.useEffect(()=>{if(!z.current||h!=="present")return;const A=z.current,_=new ResizeObserver(()=>{const{scrollHeight:N,clientHeight:T,scrollWidth:E,clientWidth:R}=A;j(N>T),L(E>R)});return _.observe(A),()=>_.disconnect()},[z,h]),g.jsxs(oi,{type:u==="never"?"always":u,scrollHideDelay:d,ref:t,scrollbars:y,...V("root"),...D,children:[g.jsx(pi,{...f,...V("viewport",{style:f==null?void 0:f.style}),ref:P,"data-offset-scrollbars":h===!0?"xy":h||void 0,"data-scrollbars":y||void 0,"data-horizontal-hidden":h==="present"&&!M?"true":void 0,"data-vertical-hidden":h==="present"&&!k?"true":void 0,onScroll:A=>{var E;(E=f==null?void 0:f.onScroll)==null||E.call(f,A),v==null||v({x:A.currentTarget.scrollLeft,y:A.currentTarget.scrollTop});const{scrollTop:_,scrollHeight:N,clientHeight:T}=A.currentTarget;_-(N-T)>=0&&(w==null||w()),_===0&&(b==null||b())},children:p}),(y==="xy"||y==="x")&&g.jsx(Qn,{...V("scrollbar"),orientation:"horizontal","data-hidden":u==="never"||h==="present"&&!M?!0:void 0,forceMount:!0,onMouseEnter:()=>$(!0),onMouseLeave:()=>$(!1),children:g.jsx(eo,{...V("thumb")})}),(y==="xy"||y==="y")&&g.jsx(Qn,{...V("scrollbar"),orientation:"vertical","data-hidden":u==="never"||h==="present"&&!k?!0:void 0,forceMount:!0,onMouseEnter:()=>$(!0),onMouseLeave:()=>$(!1),children:g.jsx(eo,{...V("thumb")})}),g.jsx(kf,{...V("corner"),"data-hovered":S||void 0,"data-hidden":u==="never"||void 0})]})});pr.displayName="@mantine/core/ScrollArea";const Ro=re((e,t)=>{const{children:r,classNames:n,styles:o,scrollbarSize:s,scrollHideDelay:a,type:i,dir:c,offsetScrollbars:l,viewportRef:u,onScrollPositionChange:d,unstyled:f,variant:m,viewportProps:v,scrollbars:p,style:h,vars:y,onBottomReached:w,onTopReached:b,...C}=q("ScrollAreaAutosize",hi,e);return g.jsx(ae,{...C,ref:t,style:[{display:"flex",overflow:"auto"},h],children:g.jsx(ae,{style:{display:"flex",flexDirection:"column",flex:1},children:g.jsx(pr,{classNames:n,styles:o,scrollHideDelay:a,scrollbarSize:s,type:i,dir:c,offsetScrollbars:l,viewportRef:u,onScrollPositionChange:d,unstyled:f,variant:m,viewportProps:v,vars:y,scrollbars:p,onBottomReached:w,onTopReached:b,children:r})})})});pr.classes=_o;Ro.displayName="@mantine/core/ScrollAreaAutosize";Ro.classes=_o;pr.Autosize=Ro;var vi={root:"m_87cf2631"};const If={__staticSelector:"UnstyledButton"},Be=ut((e,t)=>{const r=q("UnstyledButton",If,e),{className:n,component:o="button",__staticSelector:s,unstyled:a,classNames:i,styles:c,style:l,...u}=r,d=me({name:s,props:r,classes:vi,className:n,style:l,classNames:i,styles:c,unstyled:a});return g.jsx(ae,{...d("root",{focusable:!0}),component:o,ref:t,type:o==="button"?"button":void 0,...u})});Be.classes=vi;Be.displayName="@mantine/core/UnstyledButton";var gi={root:"m_515a97f8"};const Ff={},No=re((e,t)=>{const r=q("VisuallyHidden",Ff,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,...l}=r,u=me({name:"VisuallyHidden",classes:gi,props:r,className:o,style:s,classNames:n,styles:a,unstyled:i});return g.jsx(ae,{component:"span",ref:t,...u("root"),...l})});No.classes=gi;No.displayName="@mantine/core/VisuallyHidden";var yi={root:"m_1b7284a3"};const Vf={},zf=(e,{radius:t,shadow:r})=>({root:{"--paper-radius":t===void 0?void 0:Ie(t),"--paper-shadow":fo(r)}}),Eo=ut((e,t)=>{const r=q("Paper",Vf,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,withBorder:c,vars:l,radius:u,shadow:d,variant:f,mod:m,...v}=r,p=me({name:"Paper",props:r,classes:yi,className:o,style:s,classNames:n,styles:a,unstyled:i,vars:l,varsResolver:zf});return g.jsx(ae,{ref:t,mod:[{"data-with-border":c},m],...p("root"),variant:f,...v})});Eo.classes=yi;Eo.displayName="@mantine/core/Paper";function Bf(e,t){if(e==="rtl"&&(t.includes("right")||t.includes("left"))){const[r,n]=t.split("-"),o=r==="right"?"left":"right";return n===void 0?o:`${o}-${n}`}return t}function Ws(e,t,r,n){return e==="center"||n==="center"?{top:t}:e==="end"?{bottom:r}:e==="start"?{top:r}:{}}function Ys(e,t,r,n,o){return e==="center"||n==="center"?{left:t}:e==="end"?{[o==="ltr"?"right":"left"]:r}:e==="start"?{[o==="ltr"?"left":"right"]:r}:{}}const Wf={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function Yf({position:e,arrowSize:t,arrowOffset:r,arrowRadius:n,arrowPosition:o,arrowX:s,arrowY:a,dir:i}){const[c,l="center"]=e.split("-"),u={width:t,height:t,transform:"rotate(45deg)",position:"absolute",[Wf[c]]:n},d=-t/2;return c==="left"?{...u,...Ws(l,a,r,o),right:d,borderLeftColor:"transparent",borderBottomColor:"transparent",clipPath:"polygon(100% 0, 0 0, 100% 100%)"}:c==="right"?{...u,...Ws(l,a,r,o),left:d,borderRightColor:"transparent",borderTopColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 100%)"}:c==="top"?{...u,...Ys(l,s,r,o,i),bottom:d,borderTopColor:"transparent",borderLeftColor:"transparent",clipPath:"polygon(0 100%, 100% 100%, 100% 0)"}:c==="bottom"?{...u,...Ys(l,s,r,o,i),top:d,borderBottomColor:"transparent",borderRightColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 0)"}:{}}const bi=x.forwardRef(({position:e,arrowSize:t,arrowOffset:r,arrowRadius:n,arrowPosition:o,visible:s,arrowX:a,arrowY:i,style:c,...l},u)=>{const{dir:d}=po();return s?g.jsx("div",{...l,ref:u,style:{...c,...Yf({position:e,arrowSize:t,arrowOffset:r,arrowRadius:n,arrowPosition:o,dir:d,arrowX:a,arrowY:i})}}):null});bi.displayName="@mantine/core/FloatingArrow";var xi={root:"m_9814e45f"};const Hf={zIndex:wt("modal")},Uf=(e,{gradient:t,color:r,backgroundOpacity:n,blur:o,radius:s,zIndex:a})=>({root:{"--overlay-bg":t||(r!==void 0||n!==void 0)&&Ou(r||"#000",n??.6)||void 0,"--overlay-filter":o?`blur(${ge(o)})`:void 0,"--overlay-radius":s===void 0?void 0:Ie(s),"--overlay-z-index":a==null?void 0:a.toString()}}),Kr=ut((e,t)=>{const r=q("Overlay",Hf,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,fixed:l,center:u,children:d,radius:f,zIndex:m,gradient:v,blur:p,color:h,backgroundOpacity:y,mod:w,...b}=r,C=me({name:"Overlay",props:r,classes:xi,className:o,style:s,classNames:n,styles:a,unstyled:i,vars:c,varsResolver:Uf});return g.jsx(ae,{ref:t,...C("root"),mod:[{center:u,fixed:l},w],...b,children:d})});Kr.classes=xi;Kr.displayName="@mantine/core/Overlay";function Mn(e){const t=document.createElement("div");return t.setAttribute("data-portal","true"),typeof e.className=="string"&&t.classList.add(...e.className.split(" ").filter(Boolean)),typeof e.style=="object"&&Object.assign(t.style,e.style),typeof e.id=="string"&&t.setAttribute("id",e.id),t}function Gf({target:e,reuseTargetNode:t,...r}){if(e)return typeof e=="string"?document.querySelector(e)||Mn(r):e;if(t){const n=document.querySelector("[data-mantine-shared-portal-node]");if(n)return n;const o=Mn(r);return o.setAttribute("data-mantine-shared-portal-node","true"),document.body.appendChild(o),o}return Mn(r)}const qf={},wi=re((e,t)=>{const{children:r,target:n,reuseTargetNode:o,...s}=q("Portal",qf,e),[a,i]=x.useState(!1),c=x.useRef(null);return co(()=>(i(!0),c.current=Gf({target:n,reuseTargetNode:o,...s}),Mr(t,c.current),!n&&!o&&c.current&&document.body.appendChild(c.current),()=>{!n&&!o&&c.current&&document.body.removeChild(c.current)}),[n]),!a||!c.current?null:io.createPortal(g.jsx(g.Fragment,{children:r}),c.current)});wi.displayName="@mantine/core/Portal";const Zr=re(({withinPortal:e=!0,children:t,...r},n)=>Fa()==="test"||!e?g.jsx(g.Fragment,{children:t}):g.jsx(wi,{ref:n,...r,children:t}));Zr.displayName="@mantine/core/OptionalPortal";const rr=e=>({in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${e==="bottom"?10:-10}px)`},transitionProperty:"transform, opacity"}),Rr={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},"fade-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(30px)"},transitionProperty:"opacity, transform"},"fade-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-30px)"},transitionProperty:"opacity, transform"},"fade-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(30px)"},transitionProperty:"opacity, transform"},"fade-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-30px)"},transitionProperty:"opacity, transform"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(-20px) skew(-10deg, -5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(20px) skew(-10deg, -5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(-5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:{...rr("bottom"),common:{transformOrigin:"center center"}},"pop-bottom-left":{...rr("bottom"),common:{transformOrigin:"bottom left"}},"pop-bottom-right":{...rr("bottom"),common:{transformOrigin:"bottom right"}},"pop-top-left":{...rr("top"),common:{transformOrigin:"top left"}},"pop-top-right":{...rr("top"),common:{transformOrigin:"top right"}}},Hs={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function Xf({transition:e,state:t,duration:r,timingFunction:n}){const o={WebkitBackfaceVisibility:"hidden",willChange:"transform, opacity",transitionDuration:`${r}ms`,transitionTimingFunction:n};return typeof e=="string"?e in Rr?{transitionProperty:Rr[e].transitionProperty,...o,...Rr[e].common,...Rr[e][Hs[t]]}:{}:{transitionProperty:e.transitionProperty,...o,...e.common,...e[Hs[t]]}}function Kf({duration:e,exitDuration:t,timingFunction:r,mounted:n,onEnter:o,onExit:s,onEntered:a,onExited:i,enterDelay:c,exitDelay:l}){const u=zt(),d=_a(),f=u.respectReducedMotion?d:!1,[m,v]=x.useState(f?0:e),[p,h]=x.useState(n?"entered":"exited"),y=x.useRef(-1),w=x.useRef(-1),b=x.useRef(-1),C=S=>{const $=S?o:s,k=S?a:i;window.clearTimeout(y.current);const j=f?0:S?e:t;v(j),j===0?(typeof $=="function"&&$(),typeof k=="function"&&k(),h(S?"entered":"exited")):b.current=requestAnimationFrame(()=>{io.flushSync(()=>{h(S?"pre-entering":"pre-exiting")}),b.current=requestAnimationFrame(()=>{typeof $=="function"&&$(),h(S?"entering":"exiting"),y.current=window.setTimeout(()=>{typeof k=="function"&&k(),h(S?"entered":"exited")},j)})})},D=S=>{if(window.clearTimeout(w.current),typeof(S?c:l)!="number"){C(S);return}w.current=window.setTimeout(()=>{C(S)},S?c:l)};return ot(()=>{D(n)},[n]),x.useEffect(()=>()=>{window.clearTimeout(y.current),cancelAnimationFrame(b.current)},[]),{transitionDuration:m,transitionStatus:p,transitionTimingFunction:r||"ease"}}function Ct({keepMounted:e,transition:t="fade",duration:r=250,exitDuration:n=r,mounted:o,children:s,timingFunction:a="ease",onExit:i,onEntered:c,onEnter:l,onExited:u,enterDelay:d,exitDelay:f}){const m=Fa(),{transitionDuration:v,transitionStatus:p,transitionTimingFunction:h}=Kf({mounted:o,exitDuration:n,duration:r,timingFunction:a,onExit:i,onEntered:c,onEnter:l,onExited:u,enterDelay:d,exitDelay:f});return v===0||m==="test"?o?g.jsx(g.Fragment,{children:s({})}):e?s({display:"none"}):null:p==="exited"?e?s({display:"none"}):null:g.jsx(g.Fragment,{children:s(Xf({transition:t,duration:v,state:p,timingFunction:h}))})}Ct.displayName="@mantine/core/Transition";const[Zf,Si]=Ft("Popover component was not found in the tree");function Jr({children:e,active:t=!0,refProp:r="ref",innerRef:n}){const o=wl(t),s=Le(o,n);return fr(e)?x.cloneElement(e,{[r]:s}):e}function Ci(e){return g.jsx(No,{tabIndex:-1,"data-autofocus":!0,...e})}Jr.displayName="@mantine/core/FocusTrap";Ci.displayName="@mantine/core/FocusTrapInitialFocus";Jr.InitialFocus=Ci;var Di={dropdown:"m_38a85659",arrow:"m_a31dc6c1",overlay:"m_3d7bc908"};const Jf={},To=re((e,t)=>{var h,y,w,b;const r=q("PopoverDropdown",Jf,e),{className:n,style:o,vars:s,children:a,onKeyDownCapture:i,variant:c,classNames:l,styles:u,...d}=r,f=Si(),m=wa({opened:f.opened,shouldReturnFocus:f.returnFocus}),v=f.withRoles?{"aria-labelledby":f.getTargetId(),id:f.getDropdownId(),role:"dialog",tabIndex:-1}:{},p=Le(t,f.floating);return f.disabled?null:g.jsx(Zr,{...f.portalProps,withinPortal:f.withinPortal,children:g.jsx(Ct,{mounted:f.opened,...f.transitionProps,transition:((h=f.transitionProps)==null?void 0:h.transition)||"fade",duration:((y=f.transitionProps)==null?void 0:y.duration)??150,keepMounted:f.keepMounted,exitDuration:typeof((w=f.transitionProps)==null?void 0:w.exitDuration)=="number"?f.transitionProps.exitDuration:(b=f.transitionProps)==null?void 0:b.duration,children:C=>g.jsx(Jr,{active:f.trapFocus&&f.opened,innerRef:p,children:g.jsxs(ae,{...v,...d,variant:c,onKeyDownCapture:fu(()=>{var D,S;(D=f.onClose)==null||D.call(f),(S=f.onDismiss)==null||S.call(f)},{active:f.closeOnEscape,onTrigger:m,onKeyDown:i}),"data-position":f.placement,"data-fixed":f.floatingStrategy==="fixed"||void 0,...f.getStyles("dropdown",{className:n,props:r,classNames:l,styles:u,style:[{...C,zIndex:f.zIndex,top:f.y??0,left:f.x??0,width:f.width==="target"?void 0:ge(f.width)},f.resolvedStyles.dropdown,u==null?void 0:u.dropdown,o]}),children:[a,g.jsx(bi,{ref:f.arrowRef,arrowX:f.arrowX,arrowY:f.arrowY,visible:f.withArrow,position:f.placement,arrowSize:f.arrowSize,arrowRadius:f.arrowRadius,arrowOffset:f.arrowOffset,arrowPosition:f.arrowPosition,...f.getStyles("arrow",{props:r,classNames:l,styles:u})})]})})})})});To.classes=Di;To.displayName="@mantine/core/PopoverDropdown";const Qf={refProp:"ref",popupType:"dialog"},_i=re((e,t)=>{const{children:r,refProp:n,popupType:o,...s}=q("PopoverTarget",Qf,e);if(!fr(r))throw new Error("Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const a=s,i=Si(),c=Le(i.reference,La(r),t),l=i.withRoles?{"aria-haspopup":o,"aria-expanded":i.opened,"aria-controls":i.getDropdownId(),id:i.getTargetId()}:{};return x.cloneElement(r,{...a,...l,...i.targetProps,className:Te(i.targetProps.className,a.className,r.props.className),[n]:c,...i.controlled?null:{onClick:i.onToggle}})});_i.displayName="@mantine/core/PopoverTarget";function em({opened:e,floating:t,position:r,positionDependencies:n}){const[o,s]=x.useState(0);x.useEffect(()=>{if(t.refs.reference.current&&t.refs.floating.current&&e)return Zd(t.refs.reference.current,t.refs.floating.current,t.update)},[t.refs.reference.current,t.refs.floating.current,e,o,r]),ot(()=>{t.update()},n),ot(()=>{s(a=>a+1)},[e])}function tm(e){if(e===void 0)return{shift:!0,flip:!0};const t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function rm(e,t){const r=tm(e.middlewares),n=[cf(e.offset)];return r.shift&&n.push(lf(typeof r.shift=="boolean"?{limiter:Ls(),padding:5}:{limiter:Ls(),padding:5,...r.shift})),r.flip&&n.push(typeof r.flip=="boolean"?Is():Is(r.flip)),r.inline&&n.push(typeof r.inline=="boolean"?Fs():Fs(r.inline)),n.push(df({element:e.arrowRef,padding:e.arrowOffset})),(r.size||e.width==="target")&&n.push(uf({...typeof r.size=="boolean"?{}:r.size,apply({rects:o,availableWidth:s,availableHeight:a,...i}){var u;const l=((u=t().refs.floating.current)==null?void 0:u.style)??{};r.size&&(typeof r.size=="object"&&r.size.apply?r.size.apply({rects:o,availableWidth:s,availableHeight:a,...i}):Object.assign(l,{maxWidth:`${s}px`,maxHeight:`${a}px`})),e.width==="target"&&Object.assign(l,{width:`${o.reference.width}px`})}})),n}function nm(e){const[t,r]=st({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),n=x.useRef(t),o=()=>{t&&r(!1)},s=()=>r(!t),a=Nf({strategy:e.strategy,placement:e.position,middleware:rm(e,()=>a)});return em({opened:t,position:e.position,positionDependencies:e.positionDependencies||[],floating:a}),ot(()=>{var i;(i=e.onPositionChange)==null||i.call(e,a.placement)},[a.placement]),ot(()=>{var i,c;t!==n.current&&(t?(c=e.onOpen)==null||c.call(e):(i=e.onClose)==null||i.call(e)),n.current=t},[t,e.onClose,e.onOpen]),{floating:a,controlled:typeof e.opened=="boolean",opened:t,onClose:o,onToggle:s}}const om={position:"bottom",offset:8,positionDependencies:[],transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,withOverlay:!1,clickOutsideEvents:["mousedown","touchstart"],zIndex:wt("popover"),__staticSelector:"Popover",width:"max-content"},sm=(e,{radius:t,shadow:r})=>({dropdown:{"--popover-radius":t===void 0?void 0:Ie(t),"--popover-shadow":fo(r)}});function Me(e){var se,ve,De,xe,_e,Ee;const t=q("Popover",om,e),{children:r,position:n,offset:o,onPositionChange:s,positionDependencies:a,opened:i,transitionProps:c,onExitTransitionEnd:l,onEnterTransitionEnd:u,width:d,middlewares:f,withArrow:m,arrowSize:v,arrowOffset:p,arrowRadius:h,arrowPosition:y,unstyled:w,classNames:b,styles:C,closeOnClickOutside:D,withinPortal:S,portalProps:$,closeOnEscape:k,clickOutsideEvents:j,trapFocus:M,onClose:L,onDismiss:V,onOpen:z,onChange:P,zIndex:A,radius:_,shadow:N,id:T,defaultOpened:E,__staticSelector:R,withRoles:O,disabled:I,returnFocus:B,variant:K,keepMounted:F,vars:Q,floatingStrategy:ee,withOverlay:Z,overlayProps:Y,...ie}=t,ne=me({name:R,props:t,classes:Di,classNames:b,styles:C,unstyled:w,rootSelector:"dropdown",vars:Q,varsResolver:sm}),{resolvedStyles:fe}=lt({classNames:b,styles:C,props:t}),X=x.useRef(null),[ue,le]=x.useState(null),[he,G]=x.useState(null),{dir:J}=po(),te=It(T),ce=nm({middlewares:f,width:d,position:Bf(J,n),offset:typeof o=="number"?o+(m?v/2:0):o,arrowRef:X,arrowOffset:p,onPositionChange:s,positionDependencies:a,opened:i,defaultOpened:E,onChange:P,onOpen:z,onClose:L,onDismiss:V,strategy:ee});xa(()=>{D&&(ce.onClose(),V==null||V())},j,[ue,he]);const pe=x.useCallback(we=>{le(we),ce.floating.refs.setReference(we)},[ce.floating.refs.setReference]),oe=x.useCallback(we=>{G(we),ce.floating.refs.setFloating(we)},[ce.floating.refs.setFloating]),de=x.useCallback(()=>{var we;(we=c==null?void 0:c.onExited)==null||we.call(c),l==null||l()},[c==null?void 0:c.onExited,l]),W=x.useCallback(()=>{var we;(we=c==null?void 0:c.onEntered)==null||we.call(c),u==null||u()},[c==null?void 0:c.onEntered,u]);return g.jsxs(Zf,{value:{returnFocus:B,disabled:I,controlled:ce.controlled,reference:pe,floating:oe,x:ce.floating.x,y:ce.floating.y,arrowX:(De=(ve=(se=ce.floating)==null?void 0:se.middlewareData)==null?void 0:ve.arrow)==null?void 0:De.x,arrowY:(Ee=(_e=(xe=ce.floating)==null?void 0:xe.middlewareData)==null?void 0:_e.arrow)==null?void 0:Ee.y,opened:ce.opened,arrowRef:X,transitionProps:{...c,onExited:de,onEntered:W},width:d,withArrow:m,arrowSize:v,arrowOffset:p,arrowRadius:h,arrowPosition:y,placement:ce.floating.placement,trapFocus:M,withinPortal:S,portalProps:$,zIndex:A,radius:_,shadow:N,closeOnEscape:k,onDismiss:V,onClose:ce.onClose,onToggle:ce.onToggle,getTargetId:()=>`${te}-target`,getDropdownId:()=>`${te}-dropdown`,withRoles:O,targetProps:ie,__staticSelector:R,classNames:b,styles:C,unstyled:w,variant:K,keepMounted:F,getStyles:ne,resolvedStyles:fe,floatingStrategy:ee},children:[r,Z&&g.jsx(Ct,{transition:"fade",mounted:ce.opened,duration:(c==null?void 0:c.duration)||250,exitDuration:(c==null?void 0:c.exitDuration)||250,children:we=>g.jsx(Zr,{withinPortal:S,children:g.jsx(Kr,{...Y,...ne("overlay",{className:Y==null?void 0:Y.className,style:[we,Y==null?void 0:Y.style]})})})})]})}Me.Target=_i;Me.Dropdown=To;Me.displayName="@mantine/core/Popover";Me.extend=e=>e;var Ge={root:"m_5ae2e3c",barsLoader:"m_7a2bd4cd",bar:"m_870bb79","bars-loader-animation":"m_5d2b3b9d",dotsLoader:"m_4e3f22d7",dot:"m_870c4af","loader-dots-animation":"m_aac34a1",ovalLoader:"m_b34414df","oval-loader-animation":"m_f8e89c4b"};const Ri=x.forwardRef(({className:e,...t},r)=>g.jsxs(ae,{component:"span",className:Te(Ge.barsLoader,e),...t,ref:r,children:[g.jsx("span",{className:Ge.bar}),g.jsx("span",{className:Ge.bar}),g.jsx("span",{className:Ge.bar})]}));Ri.displayName="@mantine/core/Bars";const Ni=x.forwardRef(({className:e,...t},r)=>g.jsxs(ae,{component:"span",className:Te(Ge.dotsLoader,e),...t,ref:r,children:[g.jsx("span",{className:Ge.dot}),g.jsx("span",{className:Ge.dot}),g.jsx("span",{className:Ge.dot})]}));Ni.displayName="@mantine/core/Dots";const Ei=x.forwardRef(({className:e,...t},r)=>g.jsx(ae,{component:"span",className:Te(Ge.ovalLoader,e),...t,ref:r}));Ei.displayName="@mantine/core/Oval";const Ti={bars:Ri,oval:Ei,dots:Ni},am={loaders:Ti,type:"oval"},im=(e,{size:t,color:r})=>({root:{"--loader-size":be(t,"loader-size"),"--loader-color":r?at(r,e):void 0}}),hr=re((e,t)=>{const r=q("Loader",am,e),{size:n,color:o,type:s,vars:a,className:i,style:c,classNames:l,styles:u,unstyled:d,loaders:f,variant:m,children:v,...p}=r,h=me({name:"Loader",props:r,classes:Ge,className:i,style:c,classNames:l,styles:u,unstyled:d,vars:a,varsResolver:im});return v?g.jsx(ae,{...h("root"),ref:t,...p,children:v}):g.jsx(ae,{...h("root"),ref:t,component:f[s],variant:m,size:n,...p})});hr.defaultLoaders=Ti;hr.classes=Ge;hr.displayName="@mantine/core/Loader";var Yt={root:"m_8d3f4000",icon:"m_8d3afb97",loader:"m_302b9fb1",group:"m_1a0f1b21",groupSection:"m_437b6484"};const Us={orientation:"horizontal"},cm=(e,{borderWidth:t})=>({group:{"--ai-border-width":ge(t)}}),ko=re((e,t)=>{const r=q("ActionIconGroup",Us,e),{className:n,style:o,classNames:s,styles:a,unstyled:i,orientation:c,vars:l,borderWidth:u,variant:d,mod:f,...m}=q("ActionIconGroup",Us,e),v=me({name:"ActionIconGroup",props:r,classes:Yt,className:n,style:o,classNames:s,styles:a,unstyled:i,vars:l,varsResolver:cm,rootSelector:"group"});return g.jsx(ae,{...v("group"),ref:t,variant:d,mod:[{"data-orientation":c},f],role:"group",...m})});ko.classes=Yt;ko.displayName="@mantine/core/ActionIconGroup";const Gs={},lm=(e,{radius:t,color:r,gradient:n,variant:o,autoContrast:s,size:a})=>{const i=e.variantColorResolver({color:r||e.primaryColor,theme:e,gradient:n,variant:o||"filled",autoContrast:s});return{groupSection:{"--section-height":be(a,"section-height"),"--section-padding-x":be(a,"section-padding-x"),"--section-fz":Re(a),"--section-radius":t===void 0?void 0:Ie(t),"--section-bg":r||o?i.background:void 0,"--section-color":i.color,"--section-bd":r||o?i.border:void 0}}},$o=re((e,t)=>{const r=q("ActionIconGroupSection",Gs,e),{className:n,style:o,classNames:s,styles:a,unstyled:i,vars:c,variant:l,gradient:u,radius:d,autoContrast:f,...m}=q("ActionIconGroupSection",Gs,e),v=me({name:"ActionIconGroupSection",props:r,classes:Yt,className:n,style:o,classNames:s,styles:a,unstyled:i,vars:c,varsResolver:lm,rootSelector:"groupSection"});return g.jsx(ae,{...v("groupSection"),ref:t,variant:l,...m})});$o.classes=Yt;$o.displayName="@mantine/core/ActionIconGroupSection";const um={},dm=(e,{size:t,radius:r,variant:n,gradient:o,color:s,autoContrast:a})=>{const i=e.variantColorResolver({color:s||e.primaryColor,theme:e,gradient:o,variant:n||"filled",autoContrast:a});return{root:{"--ai-size":be(t,"ai-size"),"--ai-radius":r===void 0?void 0:Ie(r),"--ai-bg":s||n?i.background:void 0,"--ai-hover":s||n?i.hover:void 0,"--ai-hover-color":s||n?i.hoverColor:void 0,"--ai-color":i.color,"--ai-bd":s||n?i.border:void 0}}},Ht=ut((e,t)=>{const r=q("ActionIcon",um,e),{className:n,unstyled:o,variant:s,classNames:a,styles:i,style:c,loading:l,loaderProps:u,size:d,color:f,radius:m,__staticSelector:v,gradient:p,vars:h,children:y,disabled:w,"data-disabled":b,autoContrast:C,mod:D,...S}=r,$=me({name:["ActionIcon",v],props:r,className:n,style:c,classes:Yt,classNames:a,styles:i,unstyled:o,vars:h,varsResolver:dm});return g.jsxs(Be,{...$("root",{active:!w&&!l&&!b}),...S,unstyled:o,variant:s,size:d,disabled:w||l,ref:t,mod:[{loading:l,disabled:w||b},D],children:[g.jsx(Ct,{mounted:!!l,transition:"slide-down",duration:150,children:k=>g.jsx(ae,{component:"span",...$("loader",{style:k}),"aria-hidden":!0,children:g.jsx(hr,{color:"var(--ai-color)",size:"calc(var(--ai-size) * 0.55)",...u})})}),g.jsx(ae,{component:"span",mod:{loading:l},...$("icon"),children:y})]})});Ht.classes=Yt;Ht.displayName="@mantine/core/ActionIcon";Ht.Group=ko;Ht.GroupSection=$o;const ki=x.forwardRef(({size:e="var(--cb-icon-size, 70%)",style:t,...r},n)=>g.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...t,width:e,height:e},ref:n,...r,children:g.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}));ki.displayName="@mantine/core/CloseIcon";var $i={root:"m_86a44da5","root--subtle":"m_220c80f2"};const fm={variant:"subtle"},mm=(e,{size:t,radius:r,iconSize:n})=>({root:{"--cb-size":be(t,"cb-size"),"--cb-radius":r===void 0?void 0:Ie(r),"--cb-icon-size":ge(n)}}),vr=ut((e,t)=>{const r=q("CloseButton",fm,e),{iconSize:n,children:o,vars:s,radius:a,className:i,classNames:c,style:l,styles:u,unstyled:d,"data-disabled":f,disabled:m,variant:v,icon:p,mod:h,__staticSelector:y,...w}=r,b=me({name:y||"CloseButton",props:r,className:i,style:l,classes:$i,classNames:c,styles:u,unstyled:d,vars:s,varsResolver:mm});return g.jsxs(Be,{ref:t,...w,unstyled:d,variant:v,disabled:m,mod:[{disabled:m||f},h],...b("root",{variant:v,active:!m&&!f}),children:[p||g.jsx(ki,{}),o]})});vr.classes=$i;vr.displayName="@mantine/core/CloseButton";const[pm,dt]=Ft("ModalBase component was not found in tree");function hm({opened:e,transitionDuration:t}){const[r,n]=x.useState(e),o=x.useRef(-1),a=_a()?0:t;return x.useEffect(()=>(e?(n(!0),window.clearTimeout(o.current)):a===0?n(!1):o.current=window.setTimeout(()=>n(!1),a),()=>window.clearTimeout(o.current)),[e,a]),r}function vm({id:e,transitionProps:t,opened:r,trapFocus:n,closeOnEscape:o,onClose:s,returnFocus:a}){const i=It(e),[c,l]=x.useState(!1),[u,d]=x.useState(!1),f=typeof(t==null?void 0:t.duration)=="number"?t==null?void 0:t.duration:200,m=hm({opened:r,transitionDuration:f});return Dl("keydown",v=>{var p;v.key==="Escape"&&o&&!v.isComposing&&r&&((p=v.target)==null?void 0:p.getAttribute("data-mantine-stop-propagation"))!=="true"&&s()},{capture:!0}),wa({opened:r,shouldReturnFocus:n&&a}),{_id:i,titleMounted:c,bodyMounted:u,shouldLockScroll:m,setTitleMounted:l,setBodyMounted:d}}const Oi=x.forwardRef(({keepMounted:e,opened:t,onClose:r,id:n,transitionProps:o,onExitTransitionEnd:s,onEnterTransitionEnd:a,trapFocus:i,closeOnEscape:c,returnFocus:l,closeOnClickOutside:u,withinPortal:d,portalProps:f,lockScroll:m,children:v,zIndex:p,shadow:h,padding:y,__vars:w,unstyled:b,removeScrollProps:C,...D},S)=>{const{_id:$,titleMounted:k,bodyMounted:j,shouldLockScroll:M,setTitleMounted:L,setBodyMounted:V}=vm({id:n,transitionProps:o,opened:t,trapFocus:i,closeOnEscape:c,onClose:r,returnFocus:l}),{key:z,...P}=C||{};return g.jsx(Zr,{...f,withinPortal:d,children:g.jsx(pm,{value:{opened:t,onClose:r,closeOnClickOutside:u,onExitTransitionEnd:s,onEnterTransitionEnd:a,transitionProps:{...o,keepMounted:e},getTitleId:()=>`${$}-title`,getBodyId:()=>`${$}-body`,titleMounted:k,bodyMounted:j,setTitleMounted:L,setBodyMounted:V,trapFocus:i,closeOnEscape:c,zIndex:p,unstyled:b},children:g.jsx(Aa,{enabled:M&&m,...P,children:g.jsx(ae,{ref:S,...D,__vars:{...w,"--mb-z-index":(p||wt("modal")).toString(),"--mb-shadow":fo(h),"--mb-padding":Pa(y)},children:v})},z)})})});Oi.displayName="@mantine/core/ModalBase";function gm(){const e=dt();return x.useEffect(()=>(e.setBodyMounted(!0),()=>e.setBodyMounted(!1)),[]),e.getBodyId()}var Mt={title:"m_615af6c9",header:"m_b5489c3c",inner:"m_60c222c7",content:"m_fd1ab0aa",close:"m_606cb269",body:"m_5df29311"};const Ai=x.forwardRef(({className:e,...t},r)=>{const n=gm(),o=dt();return g.jsx(ae,{ref:r,...t,id:n,className:Te({[Mt.body]:!o.unstyled},e)})});Ai.displayName="@mantine/core/ModalBaseBody";const ji=x.forwardRef(({className:e,onClick:t,...r},n)=>{const o=dt();return g.jsx(vr,{ref:n,...r,onClick:s=>{o.onClose(),t==null||t(s)},className:Te({[Mt.close]:!o.unstyled},e),unstyled:o.unstyled})});ji.displayName="@mantine/core/ModalBaseCloseButton";const Mi=x.forwardRef(({transitionProps:e,className:t,innerProps:r,onKeyDown:n,style:o,...s},a)=>{const i=dt();return g.jsx(Ct,{mounted:i.opened,transition:"pop",...i.transitionProps,onExited:()=>{var c,l,u;(c=i.onExitTransitionEnd)==null||c.call(i),(u=(l=i.transitionProps)==null?void 0:l.onExited)==null||u.call(l)},onEntered:()=>{var c,l,u;(c=i.onEnterTransitionEnd)==null||c.call(i),(u=(l=i.transitionProps)==null?void 0:l.onEntered)==null||u.call(l)},...e,children:c=>g.jsx("div",{...r,className:Te({[Mt.inner]:!i.unstyled},r.className),children:g.jsx(Jr,{active:i.opened&&i.trapFocus,innerRef:a,children:g.jsx(Eo,{...s,component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":i.bodyMounted?i.getBodyId():void 0,"aria-labelledby":i.titleMounted?i.getTitleId():void 0,style:[o,c],className:Te({[Mt.content]:!i.unstyled},t),unstyled:i.unstyled,children:s.children})})})})});Mi.displayName="@mantine/core/ModalBaseContent";const Pi=x.forwardRef(({className:e,...t},r)=>{const n=dt();return g.jsx(ae,{component:"header",ref:r,className:Te({[Mt.header]:!n.unstyled},e),...t})});Pi.displayName="@mantine/core/ModalBaseHeader";const ym={duration:200,timingFunction:"ease",transition:"fade"};function bm(e){const t=dt();return{...ym,...t.transitionProps,...e}}const Li=x.forwardRef(({onClick:e,transitionProps:t,style:r,visible:n,...o},s)=>{const a=dt(),i=bm(t);return g.jsx(Ct,{mounted:n!==void 0?n:a.opened,...i,transition:"fade",children:c=>g.jsx(Kr,{ref:s,fixed:!0,style:[r,c],zIndex:a.zIndex,unstyled:a.unstyled,onClick:l=>{e==null||e(l),a.closeOnClickOutside&&a.onClose()},...o})})});Li.displayName="@mantine/core/ModalBaseOverlay";function xm(){const e=dt();return x.useEffect(()=>(e.setTitleMounted(!0),()=>e.setTitleMounted(!1)),[]),e.getTitleId()}const Ii=x.forwardRef(({className:e,...t},r)=>{const n=xm(),o=dt();return g.jsx(ae,{component:"h2",ref:r,className:Te({[Mt.title]:!o.unstyled},e),...t,id:n})});Ii.displayName="@mantine/core/ModalBaseTitle";function wm({children:e}){return g.jsx(g.Fragment,{children:e})}const[Sm,Cm]=Br({size:"sm"}),Dm={},Fi=re((e,t)=>{const r=q("InputClearButton",Dm,e),{size:n,variant:o,vars:s,classNames:a,styles:i,...c}=r,l=Cm(),{resolvedClassNames:u,resolvedStyles:d}=lt({classNames:a,styles:i,props:r});return g.jsx(vr,{variant:o||"transparent",ref:t,size:n||(l==null?void 0:l.size)||"sm",classNames:u,styles:d,__staticSelector:"InputClearButton",...c})});Fi.displayName="@mantine/core/InputClearButton";const[_m,gr]=Br({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0});var Ye={wrapper:"m_6c018570",input:"m_8fb7ebe7",section:"m_82577fc2",placeholder:"m_88bacfd0",root:"m_46b77525",label:"m_8fdc1311",required:"m_78a94662",error:"m_8f816625",description:"m_fe47ce59"};const qs={},Rm=(e,{size:t})=>({description:{"--input-description-size":t===void 0?void 0:`calc(${Re(t)} - ${ge(2)})`}}),Qr=re((e,t)=>{const r=q("InputDescription",qs,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,size:l,__staticSelector:u,__inheritStyles:d=!0,variant:f,...m}=q("InputDescription",qs,r),v=gr(),p=me({name:["InputWrapper",u],props:r,classes:Ye,className:o,style:s,classNames:n,styles:a,unstyled:i,rootSelector:"description",vars:c,varsResolver:Rm}),h=d&&(v==null?void 0:v.getStyles)||p;return g.jsx(ae,{component:"p",ref:t,variant:f,size:l,...h("description",v!=null&&v.getStyles?{className:o,style:s}:void 0),...m})});Qr.classes=Ye;Qr.displayName="@mantine/core/InputDescription";const Nm={},Em=(e,{size:t})=>({error:{"--input-error-size":t===void 0?void 0:`calc(${Re(t)} - ${ge(2)})`}}),en=re((e,t)=>{const r=q("InputError",Nm,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,size:l,__staticSelector:u,__inheritStyles:d=!0,variant:f,...m}=r,v=me({name:["InputWrapper",u],props:r,classes:Ye,className:o,style:s,classNames:n,styles:a,unstyled:i,rootSelector:"error",vars:c,varsResolver:Em}),p=gr(),h=d&&(p==null?void 0:p.getStyles)||v;return g.jsx(ae,{component:"p",ref:t,variant:f,size:l,...h("error",p!=null&&p.getStyles?{className:o,style:s}:void 0),...m})});en.classes=Ye;en.displayName="@mantine/core/InputError";const Xs={labelElement:"label"},Tm=(e,{size:t})=>({label:{"--input-label-size":Re(t),"--input-asterisk-color":void 0}}),tn=re((e,t)=>{const r=q("InputLabel",Xs,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,labelElement:l,size:u,required:d,htmlFor:f,onMouseDown:m,children:v,__staticSelector:p,variant:h,mod:y,...w}=q("InputLabel",Xs,r),b=me({name:["InputWrapper",p],props:r,classes:Ye,className:o,style:s,classNames:n,styles:a,unstyled:i,rootSelector:"label",vars:c,varsResolver:Tm}),C=gr(),D=(C==null?void 0:C.getStyles)||b;return g.jsxs(ae,{...D("label",C!=null&&C.getStyles?{className:o,style:s}:void 0),component:l,variant:h,size:u,ref:t,htmlFor:l==="label"?f:void 0,mod:[{required:d},y],onMouseDown:S=>{m==null||m(S),!S.defaultPrevented&&S.detail>1&&S.preventDefault()},...w,children:[v,d&&g.jsx("span",{...D("required"),"aria-hidden":!0,children:" *"})]})});tn.classes=Ye;tn.displayName="@mantine/core/InputLabel";const Ks={},Oo=re((e,t)=>{const r=q("InputPlaceholder",Ks,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,__staticSelector:l,variant:u,error:d,mod:f,...m}=q("InputPlaceholder",Ks,r),v=me({name:["InputPlaceholder",l],props:r,classes:Ye,className:o,style:s,classNames:n,styles:a,unstyled:i,rootSelector:"placeholder"});return g.jsx(ae,{...v("placeholder"),mod:[{error:!!d},f],component:"span",variant:u,ref:t,...m})});Oo.classes=Ye;Oo.displayName="@mantine/core/InputPlaceholder";function km(e,{hasDescription:t,hasError:r}){const n=e.findIndex(c=>c==="input"),o=e.slice(0,n),s=e.slice(n+1),a=t&&o.includes("description")||r&&o.includes("error");return{offsetBottom:t&&s.includes("description")||r&&s.includes("error"),offsetTop:a}}const $m={labelElement:"label",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},Om=(e,{size:t})=>({label:{"--input-label-size":Re(t),"--input-asterisk-color":void 0},error:{"--input-error-size":t===void 0?void 0:`calc(${Re(t)} - ${ge(2)})`},description:{"--input-description-size":t===void 0?void 0:`calc(${Re(t)} - ${ge(2)})`}}),Ao=re((e,t)=>{const r=q("InputWrapper",$m,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,size:l,variant:u,__staticSelector:d,inputContainer:f,inputWrapperOrder:m,label:v,error:p,description:h,labelProps:y,descriptionProps:w,errorProps:b,labelElement:C,children:D,withAsterisk:S,id:$,required:k,__stylesApiProps:j,mod:M,...L}=r,V=me({name:["InputWrapper",d],props:j||r,classes:Ye,className:o,style:s,classNames:n,styles:a,unstyled:i,vars:c,varsResolver:Om}),z={size:l,variant:u,__staticSelector:d},P=It($),A=typeof S=="boolean"?S:k,_=(b==null?void 0:b.id)||`${P}-error`,N=(w==null?void 0:w.id)||`${P}-description`,T=P,E=!!p&&typeof p!="boolean",R=!!h,O=`${E?_:""} ${R?N:""}`,I=O.trim().length>0?O.trim():void 0,B=(y==null?void 0:y.id)||`${P}-label`,K=v&&g.jsx(tn,{labelElement:C,id:B,htmlFor:T,required:A,...z,...y,children:v},"label"),F=R&&g.jsx(Qr,{...w,...z,size:(w==null?void 0:w.size)||z.size,id:(w==null?void 0:w.id)||N,children:h},"description"),Q=g.jsx(x.Fragment,{children:f(D)},"input"),ee=E&&x.createElement(en,{...b,...z,size:(b==null?void 0:b.size)||z.size,key:"error",id:(b==null?void 0:b.id)||_},p),Z=m.map(Y=>{switch(Y){case"label":return K;case"input":return Q;case"description":return F;case"error":return ee;default:return null}});return g.jsx(_m,{value:{getStyles:V,describedBy:I,inputId:T,labelId:B,...km(m,{hasDescription:R,hasError:E})},children:g.jsx(ae,{ref:t,variant:u,size:l,mod:[{error:!!p},M],...V("root"),...L,children:Z})})});Ao.classes=Ye;Ao.displayName="@mantine/core/InputWrapper";const Am={variant:"default",leftSectionPointerEvents:"none",rightSectionPointerEvents:"none",withAria:!0,withErrorStyles:!0},jm=(e,t,r)=>({wrapper:{"--input-margin-top":r.offsetTop?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-margin-bottom":r.offsetBottom?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-height":be(t.size,"input-height"),"--input-fz":Re(t.size),"--input-radius":t.radius===void 0?void 0:Ie(t.radius),"--input-left-section-width":t.leftSectionWidth!==void 0?ge(t.leftSectionWidth):void 0,"--input-right-section-width":t.rightSectionWidth!==void 0?ge(t.rightSectionWidth):void 0,"--input-padding-y":t.multiline?be(t.size,"input-padding-y"):void 0,"--input-left-section-pointer-events":t.leftSectionPointerEvents,"--input-right-section-pointer-events":t.rightSectionPointerEvents}}),Se=ut((e,t)=>{const r=q("Input",Am,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,required:c,__staticSelector:l,__stylesApiProps:u,size:d,wrapperProps:f,error:m,disabled:v,leftSection:p,leftSectionProps:h,leftSectionWidth:y,rightSection:w,rightSectionProps:b,rightSectionWidth:C,rightSectionPointerEvents:D,leftSectionPointerEvents:S,variant:$,vars:k,pointer:j,multiline:M,radius:L,id:V,withAria:z,withErrorStyles:P,mod:A,inputSize:_,__clearSection:N,__clearable:T,__defaultRightSection:E,...R}=r,{styleProps:O,rest:I}=Yr(R),B=gr(),K={offsetBottom:B==null?void 0:B.offsetBottom,offsetTop:B==null?void 0:B.offsetTop},F=me({name:["Input",l],props:u||r,classes:Ye,className:o,style:s,classNames:n,styles:a,unstyled:i,stylesCtx:K,rootSelector:"wrapper",vars:k,varsResolver:jm}),Q=z?{required:c,disabled:v,"aria-invalid":!!m,"aria-describedby":B==null?void 0:B.describedBy,id:(B==null?void 0:B.inputId)||V}:{},ee=w||T&&N||E;return g.jsx(Sm,{value:{size:d||"sm"},children:g.jsxs(ae,{...F("wrapper"),...O,...f,mod:[{error:!!m&&P,pointer:j,disabled:v,multiline:M,"data-with-right-section":!!ee,"data-with-left-section":!!p},A],variant:$,size:d,children:[p&&g.jsx("div",{...h,"data-position":"left",...F("section",{className:h==null?void 0:h.className,style:h==null?void 0:h.style}),children:p}),g.jsx(ae,{component:"input",...I,...Q,ref:t,required:c,mod:{disabled:v,error:!!m&&P},variant:$,__size:_,...F("input")}),ee&&g.jsx("div",{...b,"data-position":"right",...F("section",{className:b==null?void 0:b.className,style:b==null?void 0:b.style}),children:ee})]})})});Se.classes=Ye;Se.Wrapper=Ao;Se.Label=tn;Se.Error=en;Se.Description=Qr;Se.Placeholder=Oo;Se.ClearButton=Fi;Se.displayName="@mantine/core/Input";function jo(e,t,r){const n=q(e,t,r),{label:o,description:s,error:a,required:i,classNames:c,styles:l,className:u,unstyled:d,__staticSelector:f,__stylesApiProps:m,errorProps:v,labelProps:p,descriptionProps:h,wrapperProps:y,id:w,size:b,style:C,inputContainer:D,inputWrapperOrder:S,withAsterisk:$,variant:k,vars:j,mod:M,...L}=n,{styleProps:V,rest:z}=Yr(L),P={label:o,description:s,error:a,required:i,classNames:c,className:u,__staticSelector:f,__stylesApiProps:m||n,errorProps:v,labelProps:p,descriptionProps:h,unstyled:d,styles:l,size:b,style:C,inputContainer:D,inputWrapperOrder:S,withAsterisk:$,variant:k,id:w,mod:M,...y};return{...z,classNames:c,styles:l,unstyled:d,wrapperProps:{...P,...V},inputProps:{required:i,classNames:c,styles:l,unstyled:d,size:b,__staticSelector:f,__stylesApiProps:m||n,error:a,variant:k,id:w}}}const Mm={__staticSelector:"InputBase",withAria:!0},He=ut((e,t)=>{const{inputProps:r,wrapperProps:n,...o}=jo("InputBase",Mm,e);return g.jsx(Se.Wrapper,{...n,children:g.jsx(Se,{...r,...o,ref:t})})});He.classes={...Se.classes,...Se.Wrapper.classes};He.displayName="@mantine/core/InputBase";function to({style:e,size:t=16,...r}){return g.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...e,width:ge(t),height:ge(t),display:"block"},...r,children:g.jsx("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}to.displayName="@mantine/core/AccordionChevron";var Vi={root:"m_b6d8b162"};function Pm(e){if(e==="start")return"start";if(e==="end"||e)return"end"}const Lm={inherit:!1},Im=(e,{variant:t,lineClamp:r,gradient:n,size:o,color:s})=>({root:{"--text-fz":Re(o),"--text-lh":mu(o),"--text-gradient":t==="gradient"?$u(n,e):void 0,"--text-line-clamp":typeof r=="number"?r.toString():void 0,"--text-color":s?at(s,e):void 0}}),rn=ut((e,t)=>{const r=q("Text",Lm,e),{lineClamp:n,truncate:o,inline:s,inherit:a,gradient:i,span:c,__staticSelector:l,vars:u,className:d,style:f,classNames:m,styles:v,unstyled:p,variant:h,mod:y,size:w,...b}=r,C=me({name:["Text",l],props:r,classes:Vi,className:d,style:f,classNames:m,styles:v,unstyled:p,vars:u,varsResolver:Im});return g.jsx(ae,{...C("root",{focusable:!0}),ref:t,component:c?"span":"p",variant:h,mod:[{"data-truncate":Pm(o),"data-line-clamp":typeof n=="number","data-inline":s,"data-inherit":a},y],size:w,...b})});rn.classes=Vi;rn.displayName="@mantine/core/Text";function zi(e){return typeof e=="string"?{value:e,label:e}:"value"in e&&!("label"in e)?{value:e.value,label:e.value,disabled:e.disabled}:typeof e=="number"?{value:e.toString(),label:e.toString()}:"group"in e?{group:e.group,items:e.items.map(t=>zi(t))}:e}function Fm(e){return e?e.map(t=>zi(t)):[]}function Bi(e){return e.reduce((t,r)=>"group"in r?{...t,...Bi(r.items)}:(t[r.value]=r,t),{})}var Pe={dropdown:"m_88b62a41",search:"m_985517d8",options:"m_b2821a6e",option:"m_92253aa5",empty:"m_2530cd1d",header:"m_858f94bd",footer:"m_82b967cb",group:"m_254f3e4f",groupLabel:"m_2bb2e9e5",chevron:"m_2943220b",optionsDropdownOption:"m_390b5f4",optionsDropdownCheckIcon:"m_8ee53fc2"};const Vm={error:null},zm=(e,{size:t,color:r})=>({chevron:{"--combobox-chevron-size":be(t,"combobox-chevron-size"),"--combobox-chevron-color":r?at(r,e):void 0}}),Mo=re((e,t)=>{const r=q("ComboboxChevron",Vm,e),{size:n,error:o,style:s,className:a,classNames:i,styles:c,unstyled:l,vars:u,mod:d,...f}=r,m=me({name:"ComboboxChevron",classes:Pe,props:r,style:s,className:a,classNames:i,styles:c,unstyled:l,vars:u,varsResolver:zm,rootSelector:"chevron"});return g.jsx(ae,{component:"svg",...f,...m("chevron"),size:n,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",mod:["combobox-chevron",{error:o},d],ref:t,children:g.jsx("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})});Mo.classes=Pe;Mo.displayName="@mantine/core/ComboboxChevron";const[Bm,Ue]=Ft("Combobox component was not found in tree"),Wi=x.forwardRef(({size:e,onMouseDown:t,onClick:r,onClear:n,...o},s)=>g.jsx(Se.ClearButton,{ref:s,tabIndex:-1,"aria-hidden":!0,...o,onMouseDown:a=>{a.preventDefault(),t==null||t(a)},onClick:a=>{n(),r==null||r(a)}}));Wi.displayName="@mantine/core/ComboboxClearButton";const Wm={},Po=re((e,t)=>{const{classNames:r,styles:n,className:o,style:s,hidden:a,...i}=q("ComboboxDropdown",Wm,e),c=Ue();return g.jsx(Me.Dropdown,{...i,ref:t,role:"presentation","data-hidden":a||void 0,...c.getStyles("dropdown",{className:o,style:s,classNames:r,styles:n})})});Po.classes=Pe;Po.displayName="@mantine/core/ComboboxDropdown";const Ym={refProp:"ref"},Yi=re((e,t)=>{const{children:r,refProp:n}=q("ComboboxDropdownTarget",Ym,e);if(Ue(),!fr(r))throw new Error("Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return g.jsx(Me.Target,{ref:t,refProp:n,children:r})});Yi.displayName="@mantine/core/ComboboxDropdownTarget";const Hm={},Lo=re((e,t)=>{const{classNames:r,className:n,style:o,styles:s,vars:a,...i}=q("ComboboxEmpty",Hm,e),c=Ue();return g.jsx(ae,{ref:t,...c.getStyles("empty",{className:n,classNames:r,styles:s,style:o}),...i})});Lo.classes=Pe;Lo.displayName="@mantine/core/ComboboxEmpty";function Io({onKeyDown:e,withKeyboardNavigation:t,withAriaAttributes:r,withExpandedAttribute:n,targetType:o,autoComplete:s}){const a=Ue(),[i,c]=x.useState(null),l=d=>{if(e==null||e(d),!a.readOnly&&t){if(d.nativeEvent.isComposing)return;if(d.nativeEvent.code==="ArrowDown"&&(d.preventDefault(),a.store.dropdownOpened?c(a.store.selectNextOption()):(a.store.openDropdown("keyboard"),c(a.store.selectActiveOption()),a.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),d.nativeEvent.code==="ArrowUp"&&(d.preventDefault(),a.store.dropdownOpened?c(a.store.selectPreviousOption()):(a.store.openDropdown("keyboard"),c(a.store.selectActiveOption()),a.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),d.nativeEvent.code==="Enter"||d.nativeEvent.code==="NumpadEnter"){if(d.nativeEvent.keyCode===229)return;const f=a.store.getSelectedOptionIndex();a.store.dropdownOpened&&f!==-1?(d.preventDefault(),a.store.clickSelectedOption()):o==="button"&&(d.preventDefault(),a.store.openDropdown("keyboard"))}d.key==="Escape"&&a.store.closeDropdown("keyboard"),d.nativeEvent.code==="Space"&&o==="button"&&(d.preventDefault(),a.store.toggleDropdown("keyboard"))}};return{...r?{"aria-haspopup":"listbox","aria-expanded":n&&!!(a.store.listId&&a.store.dropdownOpened)||void 0,"aria-controls":a.store.dropdownOpened?a.store.listId:void 0,"aria-activedescendant":a.store.dropdownOpened&&i||void 0,autoComplete:s,"data-expanded":a.store.dropdownOpened||void 0,"data-mantine-stop-propagation":a.store.dropdownOpened||void 0}:{},onKeyDown:l}}const Um={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},Hi=re((e,t)=>{const{children:r,refProp:n,withKeyboardNavigation:o,withAriaAttributes:s,withExpandedAttribute:a,targetType:i,autoComplete:c,...l}=q("ComboboxEventsTarget",Um,e);if(!fr(r))throw new Error("Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const u=Ue(),d=Io({targetType:i,withAriaAttributes:s,withKeyboardNavigation:o,withExpandedAttribute:a,onKeyDown:r.props.onKeyDown,autoComplete:c});return x.cloneElement(r,{...d,...l,[n]:Le(t,u.store.targetRef,La(r))})});Hi.displayName="@mantine/core/ComboboxEventsTarget";const Gm={},Fo=re((e,t)=>{const{classNames:r,className:n,style:o,styles:s,vars:a,...i}=q("ComboboxFooter",Gm,e),c=Ue();return g.jsx(ae,{ref:t,...c.getStyles("footer",{className:n,classNames:r,style:o,styles:s}),...i,onMouseDown:l=>{l.preventDefault()}})});Fo.classes=Pe;Fo.displayName="@mantine/core/ComboboxFooter";const qm={},Vo=re((e,t)=>{const{classNames:r,className:n,style:o,styles:s,vars:a,children:i,label:c,...l}=q("ComboboxGroup",qm,e),u=Ue();return g.jsxs(ae,{ref:t,...u.getStyles("group",{className:n,classNames:r,style:o,styles:s}),...l,children:[c&&g.jsx("div",{...u.getStyles("groupLabel",{classNames:r,styles:s}),children:c}),i]})});Vo.classes=Pe;Vo.displayName="@mantine/core/ComboboxGroup";const Xm={},zo=re((e,t)=>{const{classNames:r,className:n,style:o,styles:s,vars:a,...i}=q("ComboboxHeader",Xm,e),c=Ue();return g.jsx(ae,{ref:t,...c.getStyles("header",{className:n,classNames:r,style:o,styles:s}),...i,onMouseDown:l=>{l.preventDefault()}})});zo.classes=Pe;zo.displayName="@mantine/core/ComboboxHeader";function Ui({value:e,valuesDivider:t=",",...r}){return g.jsx("input",{type:"hidden",value:Array.isArray(e)?e.join(t):e||"",...r})}Ui.displayName="@mantine/core/ComboboxHiddenInput";const Km={},Bo=re((e,t)=>{const r=q("ComboboxOption",Km,e),{classNames:n,className:o,style:s,styles:a,vars:i,onClick:c,id:l,active:u,onMouseDown:d,onMouseOver:f,disabled:m,selected:v,mod:p,...h}=r,y=Ue(),w=x.useId(),b=l||w;return g.jsx(ae,{...y.getStyles("option",{className:o,classNames:n,styles:a,style:s}),...h,ref:t,id:b,mod:["combobox-option",{"combobox-active":u,"combobox-disabled":m,"combobox-selected":v},p],role:"option",onClick:C=>{var D;m?C.preventDefault():((D=y.onOptionSubmit)==null||D.call(y,r.value,r),c==null||c(C))},onMouseDown:C=>{C.preventDefault(),d==null||d(C)},onMouseOver:C=>{y.resetSelectionOnOptionHover&&y.store.resetSelectedOption(),f==null||f(C)}})});Bo.classes=Pe;Bo.displayName="@mantine/core/ComboboxOption";const Zm={},Wo=re((e,t)=>{const r=q("ComboboxOptions",Zm,e),{classNames:n,className:o,style:s,styles:a,id:i,onMouseDown:c,labelledBy:l,...u}=r,d=Ue(),f=It(i);return x.useEffect(()=>{d.store.setListId(f)},[f]),g.jsx(ae,{ref:t,...d.getStyles("options",{className:o,style:s,classNames:n,styles:a}),...u,id:f,role:"listbox","aria-labelledby":l,onMouseDown:m=>{m.preventDefault(),c==null||c(m)}})});Wo.classes=Pe;Wo.displayName="@mantine/core/ComboboxOptions";const Jm={withAriaAttributes:!0,withKeyboardNavigation:!0},Yo=re((e,t)=>{const r=q("ComboboxSearch",Jm,e),{classNames:n,styles:o,unstyled:s,vars:a,withAriaAttributes:i,onKeyDown:c,withKeyboardNavigation:l,size:u,...d}=r,f=Ue(),m=f.getStyles("search"),v=Io({targetType:"input",withAriaAttributes:i,withKeyboardNavigation:l,withExpandedAttribute:!1,onKeyDown:c,autoComplete:"off"});return g.jsx(Se,{ref:Le(t,f.store.searchRef),classNames:[{input:m.className},n],styles:[{input:m.style},o],size:u||f.size,...v,...d,__staticSelector:"Combobox"})});Yo.classes=Pe;Yo.displayName="@mantine/core/ComboboxSearch";const Qm={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},Gi=re((e,t)=>{const{children:r,refProp:n,withKeyboardNavigation:o,withAriaAttributes:s,withExpandedAttribute:a,targetType:i,autoComplete:c,...l}=q("ComboboxTarget",Qm,e);if(!fr(r))throw new Error("Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const u=Ue(),d=Io({targetType:i,withAriaAttributes:s,withKeyboardNavigation:o,withExpandedAttribute:a,onKeyDown:r.props.onKeyDown,autoComplete:c}),f=x.cloneElement(r,{...d,...l});return g.jsx(Me.Target,{ref:Le(t,u.store.targetRef),children:f})});Gi.displayName="@mantine/core/ComboboxTarget";function ep(e,t,r){for(let n=e-1;n>=0;n-=1)if(!t[n].hasAttribute("data-combobox-disabled"))return n;if(r){for(let n=t.length-1;n>-1;n-=1)if(!t[n].hasAttribute("data-combobox-disabled"))return n}return e}function tp(e,t,r){for(let n=e+1;n<t.length;n+=1)if(!t[n].hasAttribute("data-combobox-disabled"))return n;if(r){for(let n=0;n<t.length;n+=1)if(!t[n].hasAttribute("data-combobox-disabled"))return n}return e}function rp(e){for(let t=0;t<e.length;t+=1)if(!e[t].hasAttribute("data-combobox-disabled"))return t;return-1}function qi({defaultOpened:e,opened:t,onOpenedChange:r,onDropdownClose:n,onDropdownOpen:o,loop:s=!0,scrollBehavior:a="instant"}={}){const[i,c]=st({value:t,defaultValue:e,finalValue:!1,onChange:r}),l=x.useRef(null),u=x.useRef(-1),d=x.useRef(null),f=x.useRef(null),m=x.useRef(-1),v=x.useRef(-1),p=x.useRef(-1),h=x.useCallback((_="unknown")=>{i||(c(!0),o==null||o(_))},[c,o,i]),y=x.useCallback((_="unknown")=>{i&&(c(!1),n==null||n(_))},[c,n,i]),w=x.useCallback((_="unknown")=>{i?y(_):h(_)},[y,h,i]),b=x.useCallback(()=>{const _=document.querySelector(`#${l.current} [data-combobox-selected]`);_==null||_.removeAttribute("data-combobox-selected"),_==null||_.removeAttribute("aria-selected")},[]),C=x.useCallback(_=>{const N=document.getElementById(l.current),T=N==null?void 0:N.querySelectorAll("[data-combobox-option]");if(!T)return null;const E=_>=T.length?0:_<0?T.length-1:_;return u.current=E,T!=null&&T[E]&&!T[E].hasAttribute("data-combobox-disabled")?(b(),T[E].setAttribute("data-combobox-selected","true"),T[E].setAttribute("aria-selected","true"),T[E].scrollIntoView({block:"nearest",behavior:a}),T[E].id):null},[a,b]),D=x.useCallback(()=>{const _=document.querySelector(`#${l.current} [data-combobox-active]`);if(_){const N=document.querySelectorAll(`#${l.current} [data-combobox-option]`),T=Array.from(N).findIndex(E=>E===_);return C(T)}return C(0)},[C]),S=x.useCallback(()=>C(tp(u.current,document.querySelectorAll(`#${l.current} [data-combobox-option]`),s)),[C,s]),$=x.useCallback(()=>C(ep(u.current,document.querySelectorAll(`#${l.current} [data-combobox-option]`),s)),[C,s]),k=x.useCallback(()=>C(rp(document.querySelectorAll(`#${l.current} [data-combobox-option]`))),[C]),j=x.useCallback((_="selected",N)=>{p.current=window.setTimeout(()=>{var R;const T=document.querySelectorAll(`#${l.current} [data-combobox-option]`),E=Array.from(T).findIndex(O=>O.hasAttribute(`data-combobox-${_}`));u.current=E,N!=null&&N.scrollIntoView&&((R=T[E])==null||R.scrollIntoView({block:"nearest",behavior:a}))},0)},[]),M=x.useCallback(()=>{u.current=-1,b()},[b]),L=x.useCallback(()=>{const _=document.querySelectorAll(`#${l.current} [data-combobox-option]`),N=_==null?void 0:_[u.current];N==null||N.click()},[]),V=x.useCallback(_=>{l.current=_},[]),z=x.useCallback(()=>{m.current=window.setTimeout(()=>d.current.focus(),0)},[]),P=x.useCallback(()=>{v.current=window.setTimeout(()=>f.current.focus(),0)},[]),A=x.useCallback(()=>u.current,[]);return x.useEffect(()=>()=>{window.clearTimeout(m.current),window.clearTimeout(v.current),window.clearTimeout(p.current)},[]),{dropdownOpened:i,openDropdown:h,closeDropdown:y,toggleDropdown:w,selectedOptionIndex:u.current,getSelectedOptionIndex:A,selectOption:C,selectFirstOption:k,selectActiveOption:D,selectNextOption:S,selectPreviousOption:$,resetSelectedOption:M,updateSelectedOptionIndex:j,listId:l.current,setListId:V,clickSelectedOption:L,searchRef:d,focusSearchInput:z,targetRef:f,focusTarget:P}}const np={keepMounted:!0,withinPortal:!0,resetSelectionOnOptionHover:!1,width:"target",transitionProps:{transition:"fade",duration:0}},op=(e,{size:t,dropdownPadding:r})=>({options:{"--combobox-option-fz":Re(t),"--combobox-option-padding":be(t,"combobox-option-padding")},dropdown:{"--combobox-padding":r===void 0?void 0:ge(r),"--combobox-option-fz":Re(t),"--combobox-option-padding":be(t,"combobox-option-padding")}});function ye(e){const t=q("Combobox",np,e),{classNames:r,styles:n,unstyled:o,children:s,store:a,vars:i,onOptionSubmit:c,onClose:l,size:u,dropdownPadding:d,resetSelectionOnOptionHover:f,__staticSelector:m,readOnly:v,...p}=t,h=qi(),y=a||h,w=me({name:m||"Combobox",classes:Pe,props:t,classNames:r,styles:n,unstyled:o,vars:i,varsResolver:op}),b=()=>{l==null||l(),y.closeDropdown()};return g.jsx(Bm,{value:{getStyles:w,store:y,onOptionSubmit:c,size:u,resetSelectionOnOptionHover:f,readOnly:v},children:g.jsx(Me,{opened:y.dropdownOpened,...p,onChange:C=>!C&&b(),withRoles:!1,unstyled:o,children:s})})}const sp=e=>e;ye.extend=sp;ye.classes=Pe;ye.displayName="@mantine/core/Combobox";ye.Target=Gi;ye.Dropdown=Po;ye.Options=Wo;ye.Option=Bo;ye.Search=Yo;ye.Empty=Lo;ye.Chevron=Mo;ye.Footer=Fo;ye.Header=zo;ye.EventsTarget=Hi;ye.DropdownTarget=Yi;ye.Group=Vo;ye.ClearButton=Wi;ye.HiddenInput=Ui;var Xi={root:"m_5f75b09e",body:"m_5f6e695e",labelWrapper:"m_d3ea56bb",label:"m_8ee546b8",description:"m_328f68c0",error:"m_8e8a99cc"};const ap=Xi,Ki=x.forwardRef(({__staticSelector:e,__stylesApiProps:t,className:r,classNames:n,styles:o,unstyled:s,children:a,label:i,description:c,id:l,disabled:u,error:d,size:f,labelPosition:m="left",bodyElement:v="div",labelElement:p="label",variant:h,style:y,vars:w,mod:b,...C},D)=>{const S=me({name:e,props:t,className:r,style:y,classes:Xi,classNames:n,styles:o,unstyled:s});return g.jsx(ae,{...S("root"),ref:D,__vars:{"--label-fz":Re(f),"--label-lh":be(f,"label-lh")},mod:[{"label-position":m},b],variant:h,size:f,...C,children:g.jsxs(ae,{component:v,htmlFor:v==="label"?l:void 0,...S("body"),children:[a,g.jsxs("div",{...S("labelWrapper"),"data-disabled":u||void 0,children:[i&&g.jsx(ae,{component:p,htmlFor:p==="label"?l:void 0,...S("label"),"data-disabled":u||void 0,children:i}),c&&g.jsx(Se.Description,{size:f,__inheritStyles:!1,...S("description"),children:c}),d&&typeof d!="boolean"&&g.jsx(Se.Error,{size:f,__inheritStyles:!1,...S("error"),children:d})]})]})})});Ki.displayName="@mantine/core/InlineInput";const Zi=x.createContext(null),ip=Zi.Provider,Ji=()=>x.useContext(Zi),[cp,lp]=Br();var Qi={card:"m_26775b0a"};const up={withBorder:!0},dp=(e,{radius:t})=>({card:{"--card-radius":Ie(t)}}),Ho=re((e,t)=>{const r=q("CheckboxCard",up,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,checked:l,mod:u,withBorder:d,value:f,onClick:m,defaultChecked:v,onChange:p,...h}=r,y=me({name:"CheckboxCard",classes:Qi,props:r,className:o,style:s,classNames:n,styles:a,unstyled:i,vars:c,varsResolver:dp,rootSelector:"card"}),w=Ji(),b=typeof l=="boolean"?l:w?w.value.includes(f||""):void 0,[C,D]=st({value:b,defaultValue:v,finalValue:!1,onChange:p});return g.jsx(cp,{value:{checked:C},children:g.jsx(Be,{ref:t,mod:[{"with-border":d,checked:C},u],...y("card"),...h,role:"checkbox","aria-checked":C,onClick:S=>{m==null||m(S),w==null||w.onChange(f||""),D(!C)}})})});Ho.displayName="@mantine/core/CheckboxCard";Ho.classes=Qi;function fp({children:e,role:t}){const r=gr();return r?g.jsx("div",{role:t,"aria-labelledby":r.labelId,"aria-describedby":r.describedBy,children:e}):g.jsx(g.Fragment,{children:e})}const mp={},Uo=re((e,t)=>{const{value:r,defaultValue:n,onChange:o,size:s,wrapperProps:a,children:i,readOnly:c,...l}=q("CheckboxGroup",mp,e),[u,d]=st({value:r,defaultValue:n,finalValue:[],onChange:o}),f=m=>{const v=typeof m=="string"?m:m.currentTarget.value;!c&&d(u.includes(v)?u.filter(p=>p!==v):[...u,v])};return g.jsx(ip,{value:{value:u,onChange:f,size:s},children:g.jsx(Se.Wrapper,{size:s,ref:t,...a,...l,labelElement:"div",__staticSelector:"CheckboxGroup",children:g.jsx(fp,{role:"group",children:i})})})});Uo.classes=Se.Wrapper.classes;Uo.displayName="@mantine/core/CheckboxGroup";function Go({size:e,style:t,...r}){const n=e!==void 0?{width:ge(e),height:ge(e),...t}:t;return g.jsx("svg",{viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:n,"aria-hidden":!0,...r,children:g.jsx("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function ec({indeterminate:e,...t}){return e?g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6","aria-hidden":!0,...t,children:g.jsx("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})}):g.jsx(Go,{...t})}var tc={indicator:"m_5e5256ee",icon:"m_1b1c543a","indicator--outline":"m_76e20374"};const pp={icon:ec},hp=(e,{radius:t,color:r,size:n,iconColor:o,variant:s,autoContrast:a})=>{const i=Vt({color:r||e.primaryColor,theme:e}),c=i.isThemeColor&&i.shade===void 0?`var(--mantine-color-${i.color}-outline)`:i.color;return{indicator:{"--checkbox-size":be(n,"checkbox-size"),"--checkbox-radius":t===void 0?void 0:Ie(t),"--checkbox-color":s==="outline"?c:at(r,e),"--checkbox-icon-color":o?at(o,e):Ba(a,e)?za({color:r,theme:e,autoContrast:a}):void 0}}},qo=re((e,t)=>{const r=q("CheckboxIndicator",pp,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,icon:l,indeterminate:u,radius:d,color:f,iconColor:m,autoContrast:v,checked:p,mod:h,variant:y,disabled:w,...b}=r,C=l,D=me({name:"CheckboxIndicator",classes:tc,props:r,className:o,style:s,classNames:n,styles:a,unstyled:i,vars:c,varsResolver:hp,rootSelector:"indicator"}),S=lp(),$=typeof p=="boolean"||typeof u=="boolean"?p||u:(S==null?void 0:S.checked)||!1;return g.jsx(ae,{ref:t,...D("indicator",{variant:y}),variant:y,mod:[{checked:$,disabled:w},h],...b,children:g.jsx(C,{indeterminate:u,...D("icon")})})});qo.displayName="@mantine/core/CheckboxIndicator";qo.classes=tc;var rc={root:"m_bf2d988c",inner:"m_26062bec",input:"m_26063560",icon:"m_bf295423","input--outline":"m_215c4542"};const vp={labelPosition:"right",icon:ec},gp=(e,{radius:t,color:r,size:n,iconColor:o,variant:s,autoContrast:a})=>{const i=Vt({color:r||e.primaryColor,theme:e}),c=i.isThemeColor&&i.shade===void 0?`var(--mantine-color-${i.color}-outline)`:i.color;return{root:{"--checkbox-size":be(n,"checkbox-size"),"--checkbox-radius":t===void 0?void 0:Ie(t),"--checkbox-color":s==="outline"?c:at(r,e),"--checkbox-icon-color":o?at(o,e):Ba(a,e)?za({color:r,theme:e,autoContrast:a}):void 0}}},Ut=re((e,t)=>{const r=q("Checkbox",vp,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,color:l,label:u,id:d,size:f,radius:m,wrapperProps:v,checked:p,labelPosition:h,description:y,error:w,disabled:b,variant:C,indeterminate:D,icon:S,rootRef:$,iconColor:k,onChange:j,autoContrast:M,mod:L,...V}=r,z=Ji(),P=f||(z==null?void 0:z.size),A=S,_=me({name:"Checkbox",props:r,classes:rc,className:o,style:s,classNames:n,styles:a,unstyled:i,vars:c,varsResolver:gp}),{styleProps:N,rest:T}=Yr(V),E=It(d),R=z?{checked:z.value.includes(T.value),onChange:B=>{z.onChange(B),j==null||j(B)}}:{},O=x.useRef(null),I=t||O;return x.useEffect(()=>{I&&"current"in I&&I.current&&(I.current.indeterminate=D||!1)},[D,I]),g.jsx(Ki,{..._("root"),__staticSelector:"Checkbox",__stylesApiProps:r,id:E,size:P,labelPosition:h,label:u,description:y,error:w,disabled:b,classNames:n,styles:a,unstyled:i,"data-checked":R.checked||p||void 0,variant:C,ref:$,mod:L,...N,...v,children:g.jsxs(ae,{..._("inner"),mod:{"data-label-position":h},children:[g.jsx(ae,{component:"input",id:E,ref:I,checked:p,disabled:b,mod:{error:!!w,indeterminate:D},..._("input",{focusable:!0,variant:C}),onChange:j,...T,...R,type:"checkbox"}),g.jsx(A,{indeterminate:D,..._("icon")})]})})});Ut.classes={...rc,...ap};Ut.displayName="@mantine/core/Checkbox";Ut.Group=Uo;Ut.Indicator=qo;Ut.Card=Ho;function ar(e){return"group"in e}function nc({options:e,search:t,limit:r}){const n=t.trim().toLowerCase(),o=[];for(let s=0;s<e.length;s+=1){const a=e[s];if(o.length===r)return o;ar(a)&&o.push({group:a.group,items:nc({options:a.items,search:t,limit:r-o.length})}),ar(a)||a.label.toLowerCase().includes(n)&&o.push(a)}return o}function yp(e){if(e.length===0)return!0;for(const t of e)if(!("group"in t)||t.items.length>0)return!1;return!0}function oc(e,t=new Set){if(Array.isArray(e))for(const r of e)if(ar(r))oc(r.items,t);else{if(typeof r.value>"u")throw new Error("[@mantine/core] Each option must have value property");if(typeof r.value!="string")throw new Error(`[@mantine/core] Option value must be a string, other data formats are not supported, got ${typeof r.value}`);if(t.has(r.value))throw new Error(`[@mantine/core] Duplicate options are not supported. Option with value "${r.value}" was provided more than once`);t.add(r.value)}}function bp(e,t){return Array.isArray(e)?e.includes(t):e===t}function sc({data:e,withCheckIcon:t,value:r,checkIconPosition:n,unstyled:o,renderOption:s}){if(!ar(e)){const i=bp(r,e.value),c=t&&i&&g.jsx(Go,{className:Pe.optionsDropdownCheckIcon}),l=g.jsxs(g.Fragment,{children:[n==="left"&&c,g.jsx("span",{children:e.label}),n==="right"&&c]});return g.jsx(ye.Option,{value:e.value,disabled:e.disabled,className:Te({[Pe.optionsDropdownOption]:!o}),"data-reverse":n==="right"||void 0,"data-checked":i||void 0,"aria-selected":i,active:i,children:typeof s=="function"?s({option:e,checked:i}):l})}const a=e.items.map(i=>g.jsx(sc,{data:i,value:r,unstyled:o,withCheckIcon:t,checkIconPosition:n,renderOption:s},i.value));return g.jsx(ye.Group,{label:e.group,children:a})}function xp({data:e,hidden:t,hiddenWhenEmpty:r,filter:n,search:o,limit:s,maxDropdownHeight:a,withScrollArea:i=!0,filterOptions:c=!0,withCheckIcon:l=!1,value:u,checkIconPosition:d,nothingFoundMessage:f,unstyled:m,labelId:v,renderOption:p,scrollAreaProps:h,"aria-label":y}){oc(e);const b=typeof o=="string"?(n||nc)({options:e,search:c?o:"",limit:s??1/0}):e,C=yp(b),D=b.map(S=>g.jsx(sc,{data:S,withCheckIcon:l,value:u,checkIconPosition:d,unstyled:m,renderOption:p},ar(S)?S.group:S.value));return g.jsx(ye.Dropdown,{hidden:t||r&&C,"data-composed":!0,children:g.jsxs(ye.Options,{labelledBy:v,"aria-label":y,children:[i?g.jsx(pr.Autosize,{mah:a??220,type:"scroll",scrollbarSize:"var(--combobox-padding)",offsetScrollbars:"y",...h,children:D}):D,C&&f&&g.jsx(ye.Empty,{children:f})]})})}var Gt={root:"m_77c9d27d",inner:"m_80f1301b",label:"m_811560b9",section:"m_a74036a",loader:"m_a25b86ee",group:"m_80d6d844",groupSection:"m_70be2a01"};const Zs={orientation:"horizontal"},wp=(e,{borderWidth:t})=>({group:{"--button-border-width":ge(t)}}),Xo=re((e,t)=>{const r=q("ButtonGroup",Zs,e),{className:n,style:o,classNames:s,styles:a,unstyled:i,orientation:c,vars:l,borderWidth:u,variant:d,mod:f,...m}=q("ButtonGroup",Zs,e),v=me({name:"ButtonGroup",props:r,classes:Gt,className:n,style:o,classNames:s,styles:a,unstyled:i,vars:l,varsResolver:wp,rootSelector:"group"});return g.jsx(ae,{...v("group"),ref:t,variant:d,mod:[{"data-orientation":c},f],role:"group",...m})});Xo.classes=Gt;Xo.displayName="@mantine/core/ButtonGroup";const Js={},Sp=(e,{radius:t,color:r,gradient:n,variant:o,autoContrast:s,size:a})=>{const i=e.variantColorResolver({color:r||e.primaryColor,theme:e,gradient:n,variant:o||"filled",autoContrast:s});return{groupSection:{"--section-height":be(a,"section-height"),"--section-padding-x":be(a,"section-padding-x"),"--section-fz":a!=null&&a.includes("compact")?Re(a.replace("compact-","")):Re(a),"--section-radius":t===void 0?void 0:Ie(t),"--section-bg":r||o?i.background:void 0,"--section-color":i.color,"--section-bd":r||o?i.border:void 0}}},Ko=re((e,t)=>{const r=q("ButtonGroupSection",Js,e),{className:n,style:o,classNames:s,styles:a,unstyled:i,vars:c,variant:l,gradient:u,radius:d,autoContrast:f,...m}=q("ButtonGroupSection",Js,e),v=me({name:"ButtonGroupSection",props:r,classes:Gt,className:n,style:o,classNames:s,styles:a,unstyled:i,vars:c,varsResolver:Sp,rootSelector:"groupSection"});return g.jsx(ae,{...v("groupSection"),ref:t,variant:l,...m})});Ko.classes=Gt;Ko.displayName="@mantine/core/ButtonGroupSection";const Cp={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${ge(1)}))`},out:{opacity:0,transform:"translate(-50%, -200%)"},common:{transformOrigin:"center"},transitionProperty:"transform, opacity"},Dp={},_p=(e,{radius:t,color:r,gradient:n,variant:o,size:s,justify:a,autoContrast:i})=>{const c=e.variantColorResolver({color:r||e.primaryColor,theme:e,gradient:n,variant:o||"filled",autoContrast:i});return{root:{"--button-justify":a,"--button-height":be(s,"button-height"),"--button-padding-x":be(s,"button-padding-x"),"--button-fz":s!=null&&s.includes("compact")?Re(s.replace("compact-","")):Re(s),"--button-radius":t===void 0?void 0:Ie(t),"--button-bg":r||o?c.background:void 0,"--button-hover":r||o?c.hover:void 0,"--button-color":c.color,"--button-bd":r||o?c.border:void 0,"--button-hover-color":r||o?c.hoverColor:void 0}}},Pt=ut((e,t)=>{const r=q("Button",Dp,e),{style:n,vars:o,className:s,color:a,disabled:i,children:c,leftSection:l,rightSection:u,fullWidth:d,variant:f,radius:m,loading:v,loaderProps:p,gradient:h,classNames:y,styles:w,unstyled:b,"data-disabled":C,autoContrast:D,mod:S,...$}=r,k=me({name:"Button",props:r,classes:Gt,className:s,style:n,classNames:y,styles:w,unstyled:b,vars:o,varsResolver:_p}),j=!!l,M=!!u;return g.jsxs(Be,{ref:t,...k("root",{active:!i&&!v&&!C}),unstyled:b,variant:f,disabled:i||v,mod:[{disabled:i||C,loading:v,block:d,"with-left-section":j,"with-right-section":M},S],...$,children:[g.jsx(Ct,{mounted:!!v,transition:Cp,duration:150,children:L=>g.jsx(ae,{component:"span",...k("loader",{style:L}),"aria-hidden":!0,children:g.jsx(hr,{color:"var(--button-color)",size:"calc(var(--button-height) / 1.8)",...p})})}),g.jsxs("span",{...k("inner"),children:[l&&g.jsx(ae,{component:"span",...k("section"),mod:{position:"left"},children:l}),g.jsx(ae,{component:"span",mod:{loading:v},...k("label"),children:c}),u&&g.jsx(ae,{component:"span",...k("section"),mod:{position:"right"},children:u})]})]})});Pt.classes=Gt;Pt.displayName="@mantine/core/Button";Pt.Group=Xo;Pt.GroupSection=Ko;var ac={root:"m_e9408a47","root--default":"m_84c9523a","root--filled":"m_ef274e49","root--unstyled":"m_eda993d3",legend:"m_90794832","legend--unstyled":"m_74ca27fe"};const Rp={variant:"default"},Np=(e,{radius:t})=>({root:{"--fieldset-radius":t===void 0?void 0:Ie(t)}}),Zo=re((e,t)=>{const r=q("Fieldset",Rp,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,legend:l,variant:u,children:d,...f}=r,m=me({name:"Fieldset",classes:ac,props:r,className:o,style:s,classNames:n,styles:a,unstyled:i,vars:c,varsResolver:Np});return g.jsxs(ae,{component:"fieldset",ref:t,variant:u,...m("root",{variant:u}),...f,children:[l&&g.jsx("legend",{...m("legend",{variant:u}),children:l}),d]})});Zo.classes=ac;Zo.displayName="@mantine/core/Fieldset";function ro(){return ro=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ro.apply(null,arguments)}function Ep(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Tp=x.useLayoutEffect,kp=function(t){var r=x.useRef(t);return Tp(function(){r.current=t}),r},Qs=function(t,r){if(typeof t=="function"){t(r);return}t.current=r},$p=function(t,r){var n=x.useRef();return x.useCallback(function(o){t.current=o,n.current&&Qs(n.current,null),n.current=r,r&&Qs(r,o)},[r])},ea={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},Op=function(t){Object.keys(ea).forEach(function(r){t.style.setProperty(r,ea[r],"important")})},ta=Op,je=null,ra=function(t,r){var n=t.scrollHeight;return r.sizingStyle.boxSizing==="border-box"?n+r.borderSize:n-r.paddingSize};function Ap(e,t,r,n){r===void 0&&(r=1),n===void 0&&(n=1/0),je||(je=document.createElement("textarea"),je.setAttribute("tabindex","-1"),je.setAttribute("aria-hidden","true"),ta(je)),je.parentNode===null&&document.body.appendChild(je);var o=e.paddingSize,s=e.borderSize,a=e.sizingStyle,i=a.boxSizing;Object.keys(a).forEach(function(f){var m=f;je.style[m]=a[m]}),ta(je),je.value=t;var c=ra(je,e);je.value=t,c=ra(je,e),je.value="x";var l=je.scrollHeight-o,u=l*r;i==="border-box"&&(u=u+o+s),c=Math.max(u,c);var d=l*n;return i==="border-box"&&(d=d+o+s),c=Math.min(d,c),[c,l]}var na=function(){},jp=function(t,r){return t.reduce(function(n,o){return n[o]=r[o],n},{})},Mp=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],Pp=!!document.documentElement.currentStyle,Lp=function(t){var r=window.getComputedStyle(t);if(r===null)return null;var n=jp(Mp,r),o=n.boxSizing;if(o==="")return null;Pp&&o==="border-box"&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+"px");var s=parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),a=parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth);return{sizingStyle:n,paddingSize:s,borderSize:a}},Ip=Lp;function Jo(e,t,r){var n=kp(r);H.useLayoutEffect(function(){var o=function(a){return n.current(a)};if(e)return e.addEventListener(t,o),function(){return e.removeEventListener(t,o)}},[])}var Fp=function(t,r){Jo(document.body,"reset",function(n){t.current.form===n.target&&r(n)})},Vp=function(t){Jo(window,"resize",t)},zp=function(t){Jo(document.fonts,"loadingdone",t)},Bp=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],Wp=function(t,r){var n=t.cacheMeasurements,o=t.maxRows,s=t.minRows,a=t.onChange,i=a===void 0?na:a,c=t.onHeightChange,l=c===void 0?na:c,u=Ep(t,Bp),d=u.value!==void 0,f=H.useRef(null),m=$p(f,r),v=H.useRef(0),p=H.useRef(),h=function(){var b=f.current,C=n&&p.current?p.current:Ip(b);if(C){p.current=C;var D=Ap(C,b.value||b.placeholder||"x",s,o),S=D[0],$=D[1];v.current!==S&&(v.current=S,b.style.setProperty("height",S+"px","important"),l(S,{rowHeight:$}))}},y=function(b){d||h(),i(b)};return H.useLayoutEffect(h),Fp(f,function(){if(!d){var w=f.current.value;requestAnimationFrame(function(){var b=f.current;b&&w!==b.value&&h()})}}),Vp(h),zp(h),H.createElement("textarea",ro({},u,{onChange:y,ref:m}))},Yp=H.forwardRef(Wp);const Hp={},Qo=re((e,t)=>{const{autosize:r,maxRows:n,minRows:o,__staticSelector:s,resize:a,...i}=q("Textarea",Hp,e),c=r&&pu()!=="test",l=c?{maxRows:n,minRows:o}:{};return g.jsx(He,{component:c?Yp:"textarea",ref:t,...i,__staticSelector:s||"Textarea",multiline:!0,"data-no-overflow":r&&n===void 0||void 0,__vars:{"--input-resize":a},...l})});Qo.classes=He.classes;Qo.displayName="@mantine/core/Textarea";const[Up,qt]=Ft("Modal component was not found in tree");var ft={root:"m_9df02822",content:"m_54c44539",inner:"m_1f958f16",header:"m_d0e2b9cd"};const Gp={},nn=re((e,t)=>{const r=q("ModalBody",Gp,e),{classNames:n,className:o,style:s,styles:a,vars:i,...c}=r,l=qt();return g.jsx(Ai,{ref:t,...l.getStyles("body",{classNames:n,style:s,styles:a,className:o}),...c})});nn.classes=ft;nn.displayName="@mantine/core/ModalBody";const qp={},on=re((e,t)=>{const r=q("ModalCloseButton",qp,e),{classNames:n,className:o,style:s,styles:a,vars:i,...c}=r,l=qt();return g.jsx(ji,{ref:t,...l.getStyles("close",{classNames:n,style:s,styles:a,className:o}),...c})});on.classes=ft;on.displayName="@mantine/core/ModalCloseButton";const Xp={},sn=re((e,t)=>{const r=q("ModalContent",Xp,e),{classNames:n,className:o,style:s,styles:a,vars:i,children:c,__hidden:l,...u}=r,d=qt(),f=d.scrollAreaComponent||wm;return g.jsx(Mi,{...d.getStyles("content",{className:o,style:s,styles:a,classNames:n}),innerProps:d.getStyles("inner",{className:o,style:s,styles:a,classNames:n}),"data-full-screen":d.fullScreen||void 0,"data-modal-content":!0,"data-hidden":l||void 0,ref:t,...u,children:g.jsx(f,{style:{maxHeight:d.fullScreen?"100dvh":`calc(100dvh - (${ge(d.yOffset)} * 2))`},children:c})})});sn.classes=ft;sn.displayName="@mantine/core/ModalContent";const Kp={},an=re((e,t)=>{const r=q("ModalHeader",Kp,e),{classNames:n,className:o,style:s,styles:a,vars:i,...c}=r,l=qt();return g.jsx(Pi,{ref:t,...l.getStyles("header",{classNames:n,style:s,styles:a,className:o}),...c})});an.classes=ft;an.displayName="@mantine/core/ModalHeader";const Zp={},cn=re((e,t)=>{const r=q("ModalOverlay",Zp,e),{classNames:n,className:o,style:s,styles:a,vars:i,...c}=r,l=qt();return g.jsx(Li,{ref:t,...l.getStyles("overlay",{classNames:n,style:s,styles:a,className:o}),...c})});cn.classes=ft;cn.displayName="@mantine/core/ModalOverlay";const Jp={__staticSelector:"Modal",closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:wt("modal"),transitionProps:{duration:200,transition:"fade-down"},yOffset:"5dvh"},Qp=(e,{radius:t,size:r,yOffset:n,xOffset:o})=>({root:{"--modal-radius":t===void 0?void 0:Ie(t),"--modal-size":be(r,"modal-size"),"--modal-y-offset":ge(n),"--modal-x-offset":ge(o)}}),ln=re((e,t)=>{const r=q("ModalRoot",Jp,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,yOffset:l,scrollAreaComponent:u,radius:d,fullScreen:f,centered:m,xOffset:v,__staticSelector:p,...h}=r,y=me({name:p,classes:ft,props:r,className:o,style:s,classNames:n,styles:a,unstyled:i,vars:c,varsResolver:Qp});return g.jsx(Up,{value:{yOffset:l,scrollAreaComponent:u,getStyles:y,fullScreen:f},children:g.jsx(Oi,{ref:t,...y("root"),"data-full-screen":f||void 0,"data-centered":m||void 0,unstyled:i,...h})})});ln.classes=ft;ln.displayName="@mantine/core/ModalRoot";const[eh,th]=Br();function ic({children:e}){const[t,r]=x.useState([]),[n,o]=x.useState(wt("modal"));return g.jsx(eh,{value:{stack:t,addModal:(s,a)=>{r(i=>[...new Set([...i,s])]),o(i=>typeof a=="number"&&typeof i=="number"?Math.max(i,a):i)},removeModal:s=>r(a=>a.filter(i=>i!==s)),getZIndex:s=>`calc(${n} + ${t.indexOf(s)} + 1)`,currentId:t[t.length-1],maxZIndex:n},children:e})}ic.displayName="@mantine/core/ModalStack";const rh={},un=re((e,t)=>{const r=q("ModalTitle",rh,e),{classNames:n,className:o,style:s,styles:a,vars:i,...c}=r,l=qt();return g.jsx(Ii,{ref:t,...l.getStyles("title",{classNames:n,style:s,styles:a,className:o}),...c})});un.classes=ft;un.displayName="@mantine/core/ModalTitle";const nh={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:wt("modal"),transitionProps:{duration:200,transition:"fade-down"},withOverlay:!0,withCloseButton:!0},Ze=re((e,t)=>{const{title:r,withOverlay:n,overlayProps:o,withCloseButton:s,closeButtonProps:a,children:i,radius:c,opened:l,stackId:u,zIndex:d,...f}=q("Modal",nh,e),m=th(),v=!!r||s,p=m&&u?{closeOnEscape:m.currentId===u,trapFocus:m.currentId===u,zIndex:m.getZIndex(u)}:{},h=n===!1?!1:u&&m?m.currentId===u:l;return x.useEffect(()=>{m&&u&&(l?m.addModal(u,d||wt("modal")):m.removeModal(u))},[l,u,d]),g.jsxs(ln,{ref:t,radius:c,opened:l,zIndex:m&&u?m.getZIndex(u):d,...f,...p,children:[n&&g.jsx(cn,{visible:h,transitionProps:m&&u?{duration:0}:void 0,...o}),g.jsxs(sn,{radius:c,__hidden:m&&u&&l?u!==m.currentId:!1,children:[v&&g.jsxs(an,{children:[r&&g.jsx(un,{children:r}),s&&g.jsx(on,{...a})]}),g.jsx(nn,{children:i})]})]})});Ze.classes=ft;Ze.displayName="@mantine/core/Modal";Ze.Root=ln;Ze.Overlay=cn;Ze.Content=sn;Ze.Body=nn;Ze.Header=an;Ze.Title=un;Ze.CloseButton=on;Ze.Stack=ic;function cc(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}var ir;(function(e){e.event="event",e.props="prop"})(ir||(ir={}));function mt(){}function oh(e){var t,r=void 0;return function(){for(var n=[],o=arguments.length;o--;)n[o]=arguments[o];return t&&n.length===t.length&&n.every(function(s,a){return s===t[a]})||(t=n,r=e.apply(void 0,n)),r}}function cr(e){return!!(e||"").match(/\d/)}function $t(e){return e==null}function sh(e){return typeof e=="number"&&isNaN(e)}function lc(e){return $t(e)||sh(e)||typeof e=="number"&&!isFinite(e)}function uc(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function ah(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function ih(e,t,r){var n=ah(r),o=e.search(/[1-9]/);return o=o===-1?e.length:o,e.substring(0,o)+e.substring(o,e.length).replace(n,"$1"+t)}function ch(e){var t=x.useRef(e);t.current=e;var r=x.useRef(function(){for(var n=[],o=arguments.length;o--;)n[o]=arguments[o];return t.current.apply(t,n)});return r.current}function es(e,t){t===void 0&&(t=!0);var r=e[0]==="-",n=r&&t;e=e.replace("-","");var o=e.split("."),s=o[0],a=o[1]||"";return{beforeDecimal:s,afterDecimal:a,hasNegation:r,addNegation:n}}function lh(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var r=e.split("."),n=r[0].replace(/^0+/,"")||"0",o=r[1]||"";return(t?"-":"")+n+(o?"."+o:"")}function dc(e,t,r){for(var n="",o=r?"0":"",s=0;s<=t-1;s++)n+=e[s]||o;return n}function oa(e,t){return Array(t+1).join(e)}function fc(e){var t=e+"",r=t[0]==="-"?"-":"";r&&(t=t.substring(1));var n=t.split(/[eE]/g),o=n[0],s=n[1];if(s=Number(s),!s)return r+o;o=o.replace(".","");var a=1+s,i=o.length;return a<0?o="0."+oa("0",Math.abs(a))+o:a>=i?o=o+oa("0",a-i):o=(o.substring(0,a)||"0")+"."+o.substring(a),r+o}function sa(e,t,r){if(["","-"].indexOf(e)!==-1)return e;var n=(e.indexOf(".")!==-1||r)&&t,o=es(e),s=o.beforeDecimal,a=o.afterDecimal,i=o.hasNegation,c=parseFloat("0."+(a||"0")),l=a.length<=t?"0."+a:c.toFixed(t),u=l.split("."),d=s;s&&Number(u[0])&&(d=s.split("").reverse().reduce(function(p,h,y){return p.length>y?(Number(p[0])+Number(h)).toString()+p.substring(1,p.length):h+p},u[0]));var f=dc(u[1]||"",t,r),m=i?"-":"",v=n?".":"";return""+m+d+v+f}function yt(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var mc=oh(function(e,t){for(var r=0,n=0,o=e.length,s=t.length;e[r]===t[r]&&r<o;)r++;for(;e[o-1-n]===t[s-1-n]&&s-n>r&&o-n>r;)n++;return{from:{start:r,end:o-n},to:{start:r,end:s-n}}}),uh=function(e,t){var r=Math.min(e.selectionStart,t);return{from:{start:r,end:e.selectionEnd},to:{start:r,end:t}}};function dh(e,t,r){return Math.min(Math.max(e,t),r)}function Pn(e){return Math.max(e.selectionStart,e.selectionEnd)}function fh(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function mh(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function ph(e){var t=e.currentValue,r=e.formattedValue,n=e.currentValueIndex,o=e.formattedValueIndex;return t[n]===r[o]}function hh(e,t,r,n,o,s,a){a===void 0&&(a=ph);var i=o.findIndex(function(C){return C}),c=e.slice(0,i);!t&&!r.startsWith(c)&&(t=c,r=c+r,n=n+c.length);for(var l=r.length,u=e.length,d={},f=new Array(l),m=0;m<l;m++){f[m]=-1;for(var v=0,p=u;v<p;v++){var h=a({currentValue:r,lastValue:t,formattedValue:e,currentValueIndex:m,formattedValueIndex:v});if(h&&d[v]!==!0){f[m]=v,d[v]=!0;break}}}for(var y=n;y<l&&(f[y]===-1||!s(r[y]));)y++;var w=y===l||f[y]===-1?u:f[y];for(y=n-1;y>0&&f[y]===-1;)y--;var b=y===-1||f[y]===-1?0:f[y]+1;return b>w?w:n-b<w-n?b:w}function aa(e,t,r,n){var o=e.length;if(t=dh(t,0,o),n==="left"){for(;t>=0&&!r[t];)t--;t===-1&&(t=r.indexOf(!0))}else{for(;t<=o&&!r[t];)t++;t>o&&(t=r.lastIndexOf(!0))}return t===-1&&(t=o),t}function vh(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),r=0,n=t.length;r<n;r++)t[r]=!!(cr(e[r])||cr(e[r-1]));return t}function pc(e,t,r,n,o,s){s===void 0&&(s=mt);var a=ch(function(v,p){var h,y;return lc(v)?(y="",h=""):typeof v=="number"||p?(y=typeof v=="number"?fc(v):v,h=n(y)):(y=o(v,void 0),h=n(y)),{formattedValue:h,numAsString:y}}),i=x.useState(function(){return a($t(e)?t:e,r)}),c=i[0],l=i[1],u=function(v,p){v.formattedValue!==c.formattedValue&&l({formattedValue:v.formattedValue,numAsString:v.value}),s(v,p)},d=e,f=r;$t(e)&&(d=c.numAsString,f=!0);var m=a(d,f);return x.useMemo(function(){l(m)},[m.formattedValue]),[c,u]}function gh(e){return e.replace(/[^0-9]/g,"")}function yh(e){return e}function bh(e){var t=e.type;t===void 0&&(t="text");var r=e.displayType;r===void 0&&(r="input");var n=e.customInput,o=e.renderText,s=e.getInputRef,a=e.format;a===void 0&&(a=yh);var i=e.removeFormatting;i===void 0&&(i=gh);var c=e.defaultValue,l=e.valueIsNumericString,u=e.onValueChange,d=e.isAllowed,f=e.onChange;f===void 0&&(f=mt);var m=e.onKeyDown;m===void 0&&(m=mt);var v=e.onMouseUp;v===void 0&&(v=mt);var p=e.onFocus;p===void 0&&(p=mt);var h=e.onBlur;h===void 0&&(h=mt);var y=e.value,w=e.getCaretBoundary;w===void 0&&(w=vh);var b=e.isValidInputCharacter;b===void 0&&(b=cr);var C=e.isCharacterSame,D=cc(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),S=pc(y,c,!!l,a,i,u),$=S[0],k=$.formattedValue,j=$.numAsString,M=S[1],L=x.useRef(),V=x.useRef({formattedValue:k,numAsString:j}),z=function(G,J){V.current={formattedValue:G.formattedValue,numAsString:G.value},M(G,J)},P=x.useState(!1),A=P[0],_=P[1],N=x.useRef(null),T=x.useRef({setCaretTimeout:null,focusTimeout:null});x.useEffect(function(){return _(!0),function(){clearTimeout(T.current.setCaretTimeout),clearTimeout(T.current.focusTimeout)}},[]);var E=a,R=function(G,J){var te=parseFloat(J);return{formattedValue:G,value:J,floatValue:isNaN(te)?void 0:te}},O=function(G,J,te){G.selectionStart===0&&G.selectionEnd===G.value.length||(yt(G,J),T.current.setCaretTimeout=setTimeout(function(){G.value===te&&G.selectionStart!==J&&yt(G,J)},0))},I=function(G,J,te){return aa(G,J,w(G),te)},B=function(G,J,te){var ce=w(J),pe=hh(J,k,G,te,ce,b,C);return pe=aa(J,pe,ce),pe},K=function(G){var J=G.formattedValue;J===void 0&&(J="");var te=G.input,ce=G.source,pe=G.event,oe=G.numAsString,de;if(te){var W=G.inputValue||te.value,se=Pn(te);te.value=J,de=B(W,J,se),de!==void 0&&O(te,de,J)}J!==k&&z(R(J,oe),{event:pe,source:ce})};x.useEffect(function(){var G=V.current,J=G.formattedValue,te=G.numAsString;(k!==J||j!==te)&&z(R(k,j),{event:void 0,source:ir.props})},[k,j]);var F=N.current?Pn(N.current):void 0,Q=typeof window<"u"?x.useLayoutEffect:x.useEffect;Q(function(){var G=N.current;if(k!==V.current.formattedValue&&G){var J=B(V.current.formattedValue,k,F);G.value=k,O(G,J,k)}},[k]);var ee=function(G,J,te){var ce=J.target,pe=L.current?uh(L.current,ce.selectionEnd):mc(k,G),oe=Object.assign(Object.assign({},pe),{lastValue:k}),de=i(G,oe),W=E(de);if(de=i(W,void 0),d&&!d(R(W,de))){var se=J.target,ve=Pn(se),De=B(G,k,ve);return se.value=k,O(se,De,k),!1}return K({formattedValue:W,numAsString:de,inputValue:G,event:J,source:te,input:J.target}),!0},Z=function(G,J){J===void 0&&(J=0);var te=G.selectionStart,ce=G.selectionEnd;L.current={selectionStart:te,selectionEnd:ce+J}},Y=function(G){var J=G.target,te=J.value,ce=ee(te,G,ir.event);ce&&f(G),L.current=void 0},ie=function(G){var J=G.target,te=G.key,ce=J.selectionStart,pe=J.selectionEnd,oe=J.value;oe===void 0&&(oe="");var de;te==="ArrowLeft"||te==="Backspace"?de=Math.max(ce-1,0):te==="ArrowRight"?de=Math.min(ce+1,oe.length):te==="Delete"&&(de=ce);var W=0;te==="Delete"&&ce===pe&&(W=1);var se=te==="ArrowLeft"||te==="ArrowRight";if(de===void 0||ce!==pe&&!se){m(G),Z(J,W);return}var ve=de;if(se){var De=te==="ArrowLeft"?"left":"right";ve=I(oe,de,De),ve!==de&&G.preventDefault()}else te==="Delete"&&!b(oe[de])?ve=I(oe,de,"right"):te==="Backspace"&&!b(oe[de])&&(ve=I(oe,de,"left"));ve!==de&&O(J,ve,oe),m(G),Z(J,W)},ne=function(G){var J=G.target,te=function(){var ce=J.selectionStart,pe=J.selectionEnd,oe=J.value;if(oe===void 0&&(oe=""),ce===pe){var de=I(oe,ce);de!==ce&&O(J,de,oe)}};te(),requestAnimationFrame(function(){te()}),v(G),Z(J)},fe=function(G){G.persist&&G.persist();var J=G.target,te=G.currentTarget;N.current=J,T.current.focusTimeout=setTimeout(function(){var ce=J.selectionStart,pe=J.selectionEnd,oe=J.value;oe===void 0&&(oe="");var de=I(oe,ce);de!==ce&&!(ce===0&&pe===oe.length)&&O(J,de,oe),p(Object.assign(Object.assign({},G),{currentTarget:te}))},0)},X=function(G){N.current=null,clearTimeout(T.current.focusTimeout),clearTimeout(T.current.setCaretTimeout),h(G)},ue=A&&fh()?"numeric":void 0,le=Object.assign({inputMode:ue},D,{type:t,value:k,onChange:Y,onKeyDown:ie,onMouseUp:ne,onFocus:fe,onBlur:X});if(r==="text")return o?x.createElement(x.Fragment,null,o(k,D)||null):x.createElement("span",Object.assign({},D,{ref:s}),k);if(n){var he=n;return x.createElement(he,Object.assign({},le,{ref:s}))}return x.createElement("input",Object.assign({},le,{ref:s}))}function ia(e,t){var r=t.decimalScale,n=t.fixedDecimalScale,o=t.prefix;o===void 0&&(o="");var s=t.suffix;s===void 0&&(s="");var a=t.allowNegative,i=t.thousandsGroupStyle;if(i===void 0&&(i="thousand"),e===""||e==="-")return e;var c=dn(t),l=c.thousandSeparator,u=c.decimalSeparator,d=r!==0&&e.indexOf(".")!==-1||r&&n,f=es(e,a),m=f.beforeDecimal,v=f.afterDecimal,p=f.addNegation;return r!==void 0&&(v=dc(v,r,!!n)),l&&(m=ih(m,l,i)),o&&(m=o+m),s&&(v=v+s),p&&(m="-"+m),e=m+(d&&u||"")+v,e}function dn(e){var t=e.decimalSeparator;t===void 0&&(t=".");var r=e.thousandSeparator,n=e.allowedDecimalSeparators;return r===!0&&(r=","),n||(n=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:n}}function xh(e,t){e===void 0&&(e="");var r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),o=r.test(e),s=n.test(e);return e=e.replace(/-/g,""),o&&!s&&t&&(e="-"+e),e}function wh(e,t){return new RegExp("(^-)|[0-9]|"+uc(e),"g")}function Sh(e,t,r){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(r!=null&&r.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function Ch(e,t,r){var n;t===void 0&&(t=mh(e));var o=r.allowNegative,s=r.prefix;s===void 0&&(s="");var a=r.suffix;a===void 0&&(a="");var i=r.decimalScale,c=t.from,l=t.to,u=l.start,d=l.end,f=dn(r),m=f.allowedDecimalSeparators,v=f.decimalSeparator,p=e[d]===v;if(cr(e)&&(e===s||e===a)&&t.lastValue==="")return e;if(d-u===1&&m.indexOf(e[u])!==-1){var h=i===0?"":v;e=e.substring(0,u)+h+e.substring(u+1,e.length)}var y=function(N,T,E){var R=!1,O=!1;s.startsWith("-")?R=!1:N.startsWith("--")?(R=!1,O=!0):a.startsWith("-")&&N.length===a.length?R=!1:N[0]==="-"&&(R=!0);var I=R?1:0;return O&&(I=2),I&&(N=N.substring(I),T-=I,E-=I),{value:N,start:T,end:E,hasNegation:R}},w=y(e,u,d),b=w.hasNegation;n=w,e=n.value,u=n.start,d=n.end;var C=y(t.lastValue,c.start,c.end),D=C.start,S=C.end,$=C.value,k=e.substring(u,d);e.length&&$.length&&(D>$.length-a.length||S<s.length)&&!(k&&a.startsWith(k))&&(e=$);var j=0;e.startsWith(s)?j+=s.length:u<s.length&&(j=u),e=e.substring(j),d-=j;var M=e.length,L=e.length-a.length;e.endsWith(a)?M=L:(d>L||d>e.length-a.length)&&(M=d),e=e.substring(0,M),e=xh(b?"-"+e:e,o),e=(e.match(wh(v))||[]).join("");var V=e.indexOf(v);e=e.replace(new RegExp(uc(v),"g"),function(N,T){return T===V?".":""});var z=es(e,o),P=z.beforeDecimal,A=z.afterDecimal,_=z.addNegation;return l.end-l.start<c.end-c.start&&P===""&&p&&!parseFloat(A)&&(e=_?"-":""),e}function Dh(e,t){var r=t.prefix;r===void 0&&(r="");var n=t.suffix;n===void 0&&(n="");var o=Array.from({length:e.length+1}).map(function(){return!0}),s=e[0]==="-";o.fill(!1,0,r.length+(s?1:0));var a=e.length;return o.fill(!1,a-n.length+1,a+1),o}function _h(e){var t=dn(e),r=t.thousandSeparator,n=t.decimalSeparator,o=e.prefix;o===void 0&&(o="");var s=e.allowNegative;if(s===void 0&&(s=!0),r===n)throw new Error(`
63
- Decimal separator can't be same as thousand separator.
64
- thousandSeparator: `+r+` (thousandSeparator = {true} is same as thousandSeparator = ",")
65
- decimalSeparator: `+n+` (default value for decimalSeparator is .)
66
- `);return o.startsWith("-")&&s&&(console.error(`
67
- Prefix can't start with '-' when allowNegative is true.
68
- prefix: `+o+`
69
- allowNegative: `+s+`
70
- `),s=!1),Object.assign(Object.assign({},e),{allowNegative:s})}function Rh(e){e=_h(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,r=e.allowNegative,n=e.allowLeadingZeros,o=e.onKeyDown;o===void 0&&(o=mt);var s=e.onBlur;s===void 0&&(s=mt);var a=e.thousandSeparator,i=e.decimalScale,c=e.fixedDecimalScale,l=e.prefix;l===void 0&&(l="");var u=e.defaultValue,d=e.value,f=e.valueIsNumericString,m=e.onValueChange,v=cc(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),p=dn(e),h=p.decimalSeparator,y=p.allowedDecimalSeparators,w=function(_){return ia(_,e)},b=function(_,N){return Ch(_,N,e)},C=$t(d)?u:d,D=f??Sh(C,l,t);$t(d)?$t(u)||(D=D||typeof u=="number"):D=D||typeof d=="number";var S=function(_){return lc(_)?_:(typeof _=="number"&&(_=fc(_)),D&&typeof i=="number"?sa(_,i,!!c):_)},$=pc(S(d),S(u),!!D,w,b,m),k=$[0],j=k.numAsString,M=k.formattedValue,L=$[1],V=function(_){var N=_.target,T=_.key,E=N.selectionStart,R=N.selectionEnd,O=N.value;if(O===void 0&&(O=""),(T==="Backspace"||T==="Delete")&&R<l.length){_.preventDefault();return}if(E!==R){o(_);return}T==="Backspace"&&O[0]==="-"&&E===l.length+1&&r&&yt(N,1),i&&c&&(T==="Backspace"&&O[E-1]===h?(yt(N,E-1),_.preventDefault()):T==="Delete"&&O[E]===h&&_.preventDefault()),y!=null&&y.includes(T)&&O[E]===h&&yt(N,E+1);var I=a===!0?",":a;T==="Backspace"&&O[E-1]===I&&yt(N,E-1),T==="Delete"&&O[E]===I&&yt(N,E+1),o(_)},z=function(_){var N=j;if(N.match(/\d/g)||(N=""),n||(N=lh(N)),c&&i&&(N=sa(N,i,c)),N!==j){var T=ia(N,e);L({formattedValue:T,value:N,floatValue:parseFloat(N)},{event:_,source:ir.event})}s(_)},P=function(_){return _===h?!0:cr(_)},A=function(_){var N=_.currentValue,T=_.lastValue,E=_.formattedValue,R=_.currentValueIndex,O=_.formattedValueIndex,I=N[R],B=E[O],K=mc(T,N),F=K.to,Q=function(ee){return b(ee).indexOf(".")+l.length};return d===0&&c&&i&&N[F.start]===h&&Q(N)<R&&Q(E)>O?!1:R>=F.start&&R<F.end&&y&&y.includes(I)&&B===h?!0:I===B};return Object.assign(Object.assign({},v),{value:M,valueIsNumericString:!1,isValidInputCharacter:P,isCharacterSame:A,onValueChange:L,format:w,removeFormatting:b,getCaretBoundary:function(_){return Dh(_,e)},onKeyDown:V,onBlur:z})}function Nh(e){var t=Rh(e);return x.createElement(bh,Object.assign({},t))}function ca({direction:e,style:t,...r}){return g.jsx("svg",{style:{width:"var(--ni-chevron-size)",height:"var(--ni-chevron-size)",transform:e==="up"?"rotate(180deg)":void 0,...t},viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r,children:g.jsx("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}var no={root:"m_e2f5cd4e",controls:"m_95e17d22",control:"m_80b4b171"};const Eh=/^(0\.0*|-0(\.0*)?)$/,Th=/^-?0\d+(\.\d+)?\.?$/;function oo(e){return typeof e=="string"&&e!==""&&!Number.isNaN(Number(e))}function Ln(e){return typeof e=="number"?e<Number.MAX_SAFE_INTEGER:e===""||oo(e)&&Number(e)<Number.MAX_SAFE_INTEGER}function kh(e){return e.toString().replace(".","").length}function $h(e,t){return(typeof e=="number"?e<Number.MAX_SAFE_INTEGER:!Number.isNaN(Number(e)))&&!Number.isNaN(e)&&kh(t)<14&&t!==""}function la(e,t,r){if(e===void 0)return!0;const n=t===void 0||e>=t,o=r===void 0||e<=r;return n&&o}const Oh={step:1,clampBehavior:"blur",allowDecimal:!0,allowNegative:!0,withKeyboardEvents:!0,allowLeadingZeros:!0,trimLeadingZeroesOnBlur:!0,startValue:0},Ah=(e,{size:t})=>({controls:{"--ni-chevron-size":be(t,"ni-chevron-size")}}),ts=re((e,t)=>{const r=q("NumberInput",Oh,e),{className:n,classNames:o,styles:s,unstyled:a,vars:i,onChange:c,onValueChange:l,value:u,defaultValue:d,max:f,min:m,step:v,hideControls:p,rightSection:h,isAllowed:y,clampBehavior:w,onBlur:b,allowDecimal:C,decimalScale:D,onKeyDown:S,onKeyDownCapture:$,handlersRef:k,startValue:j,disabled:M,rightSectionPointerEvents:L,allowNegative:V,readOnly:z,size:P,rightSectionWidth:A,stepHoldInterval:_,stepHoldDelay:N,allowLeadingZeros:T,withKeyboardEvents:E,trimLeadingZeroesOnBlur:R,...O}=r,I=me({name:"NumberInput",classes:no,props:r,classNames:o,styles:s,unstyled:a,vars:i,varsResolver:Ah}),{resolvedClassNames:B,resolvedStyles:K}=lt({classNames:o,styles:s,props:r}),[F,Q]=st({value:u,defaultValue:d,finalValue:"",onChange:c}),ee=N!==void 0&&_!==void 0,Z=x.useRef(null),Y=x.useRef(null),ie=x.useRef(0),ne=(W,se)=>{se.source==="event"&&Q($h(W.floatValue,W.value)&&!Eh.test(W.value)&&!(T&&Th.test(W.value))?W.floatValue:W.value),l==null||l(W,se)},fe=W=>{const se=String(W).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return se?Math.max(0,(se[1]?se[1].length:0)-(se[2]?+se[2]:0)):0},X=W=>{Z.current&&typeof W<"u"&&Z.current.setSelectionRange(W,W)},ue=x.useRef(Hn);ue.current=()=>{if(!Ln(F))return;let W;const se=fe(F),ve=fe(v),De=Math.max(se,ve),xe=10**De;if(!oo(F)&&(typeof F!="number"||Number.isNaN(F)))W=or(j,m,f);else if(f!==void 0){const Ee=(Math.round(Number(F)*xe)+Math.round(v*xe))/xe;W=Ee<=f?Ee:f}else W=(Math.round(Number(F)*xe)+Math.round(v*xe))/xe;const _e=W.toFixed(De);Q(parseFloat(_e)),l==null||l({floatValue:parseFloat(_e),formattedValue:_e,value:_e},{source:"increment"}),setTimeout(()=>{var Ee;return X((Ee=Z.current)==null?void 0:Ee.value.length)},0)};const le=x.useRef(Hn);le.current=()=>{if(!Ln(F))return;let W;const se=m!==void 0?m:V?Number.MIN_SAFE_INTEGER:0,ve=fe(F),De=fe(v),xe=Math.max(ve,De),_e=10**xe;if(!oo(F)&&typeof F!="number"||Number.isNaN(F))W=or(j,se,f);else{const we=(Math.round(Number(F)*_e)-Math.round(v*_e))/_e;W=se!==void 0&&we<se?se:we}const Ee=W.toFixed(xe);Q(parseFloat(Ee)),l==null||l({floatValue:parseFloat(Ee),formattedValue:Ee,value:Ee},{source:"decrement"}),setTimeout(()=>{var we;return X((we=Z.current)==null?void 0:we.value.length)},0)};const he=W=>{S==null||S(W),!(z||!E)&&(W.key==="ArrowUp"&&(W.preventDefault(),ue.current()),W.key==="ArrowDown"&&(W.preventDefault(),le.current()))},G=W=>{if($==null||$(W),W.key==="Backspace"){const se=Z.current;se.selectionStart===0&&se.selectionStart===se.selectionEnd&&(W.preventDefault(),window.setTimeout(()=>X(0),0))}},J=W=>{let se=F;if(w==="blur"&&typeof se=="number"&&(se=or(se,m,f)),R&&typeof se=="string"&&fe(se)<15){const ve=se.toString().replace(/^0+/,""),De=parseFloat(ve);se=Number.isNaN(De)||De>Number.MAX_SAFE_INTEGER?ve:or(De,m,f)}F!==se&&Q(se),b==null||b(W)};Mr(k,{increment:ue.current,decrement:le.current});const te=W=>{W?ue.current():le.current(),ie.current+=1},ce=W=>{if(te(W),ee){const se=typeof _=="number"?_:_(ie.current);Y.current=window.setTimeout(()=>ce(W),se)}},pe=(W,se)=>{var ve;W.preventDefault(),(ve=Z.current)==null||ve.focus(),te(se),ee&&(Y.current=window.setTimeout(()=>ce(se),N))},oe=()=>{Y.current&&window.clearTimeout(Y.current),Y.current=null,ie.current=0},de=g.jsxs("div",{...I("controls"),children:[g.jsx(Be,{...I("control"),tabIndex:-1,"aria-hidden":!0,disabled:M||typeof F=="number"&&f!==void 0&&F>=f,mod:{direction:"up"},onMouseDown:W=>W.preventDefault(),onPointerDown:W=>{pe(W,!0)},onPointerUp:oe,onPointerLeave:oe,children:g.jsx(ca,{direction:"up"})}),g.jsx(Be,{...I("control"),tabIndex:-1,"aria-hidden":!0,disabled:M||typeof F=="number"&&m!==void 0&&F<=m,mod:{direction:"down"},onMouseDown:W=>W.preventDefault(),onPointerDown:W=>{pe(W,!1)},onPointerUp:oe,onPointerLeave:oe,children:g.jsx(ca,{direction:"down"})})]});return g.jsx(He,{component:Nh,allowNegative:V,className:Te(no.root,n),size:P,...O,readOnly:z,disabled:M,value:F,getInputRef:Le(t,Z),onValueChange:ne,rightSection:p||z||!Ln(F)?h:h||de,classNames:B,styles:K,unstyled:a,__staticSelector:"NumberInput",decimalScale:C?D:0,onKeyDown:he,onKeyDownCapture:G,rightSectionPointerEvents:L??(M?"none":void 0),rightSectionWidth:A??`var(--ni-right-section-width-${P||"sm"})`,allowLeadingZeros:T,onBlur:J,isAllowed:W=>w==="strict"?y?y(W)&&la(W.floatValue,m,f):la(W.floatValue,m,f):y?y(W):!0})});ts.classes={...He.classes,...no};ts.displayName="@mantine/core/NumberInput";const jh={searchable:!1,withCheckIcon:!0,allowDeselect:!0,checkIconPosition:"left"},rs=re((e,t)=>{const r=q("Select",jh,e),{classNames:n,styles:o,unstyled:s,vars:a,dropdownOpened:i,defaultDropdownOpened:c,onDropdownClose:l,onDropdownOpen:u,onFocus:d,onBlur:f,onClick:m,onChange:v,data:p,value:h,defaultValue:y,selectFirstOptionOnChange:w,onOptionSubmit:b,comboboxProps:C,readOnly:D,disabled:S,filter:$,limit:k,withScrollArea:j,maxDropdownHeight:M,size:L,searchable:V,rightSection:z,checkIconPosition:P,withCheckIcon:A,nothingFoundMessage:_,name:N,form:T,searchValue:E,defaultSearchValue:R,onSearchChange:O,allowDeselect:I,error:B,rightSectionPointerEvents:K,id:F,clearable:Q,clearButtonProps:ee,hiddenInputProps:Z,renderOption:Y,onClear:ie,autoComplete:ne,scrollAreaProps:fe,__defaultRightSection:X,__clearSection:ue,__clearable:le,chevronColor:he,...G}=r,J=x.useMemo(()=>Fm(p),[p]),te=x.useMemo(()=>Bi(J),[J]),ce=It(F),[pe,oe,de]=st({value:h,defaultValue:y,finalValue:null,onChange:v}),W=typeof pe=="string"?te[pe]:void 0,se=Nl(W),[ve,De]=st({value:E,defaultValue:R,finalValue:W?W.label:"",onChange:O}),xe=qi({opened:i,defaultOpened:c,onDropdownOpen:()=>{u==null||u(),xe.updateSelectedOptionIndex("active",{scrollIntoView:!0})},onDropdownClose:()=>{l==null||l(),xe.resetSelectedOption()}}),_e=Ce=>{De(Ce),xe.resetSelectedOption()},{resolvedClassNames:Ee,resolvedStyles:we}=lt({props:r,styles:o,classNames:n});x.useEffect(()=>{w&&xe.selectFirstOption()},[w,ve]),x.useEffect(()=>{h===null&&_e(""),typeof h=="string"&&W&&((se==null?void 0:se.value)!==W.value||(se==null?void 0:se.label)!==W.label)&&_e(W.label)},[h,W]);const Dt=g.jsx(ye.ClearButton,{...ee,onClear:()=>{oe(null,null),_e(""),ie==null||ie()}}),yr=Q&&!!pe&&!S&&!D;return g.jsxs(g.Fragment,{children:[g.jsxs(ye,{store:xe,__staticSelector:"Select",classNames:Ee,styles:we,unstyled:s,readOnly:D,onOptionSubmit:Ce=>{b==null||b(Ce);const Ve=I&&te[Ce].value===pe?null:te[Ce],Kt=Ve?Ve.value:null;Kt!==pe&&oe(Kt,Ve),!de&&_e(typeof Kt=="string"&&(Ve==null?void 0:Ve.label)||""),xe.closeDropdown()},size:L,...C,children:[g.jsx(ye.Target,{targetType:V?"input":"button",autoComplete:ne,children:g.jsx(He,{id:ce,ref:t,__defaultRightSection:g.jsx(ye.Chevron,{size:L,error:B,unstyled:s,color:he}),__clearSection:Dt,__clearable:yr,rightSection:z,rightSectionPointerEvents:K||(yr?"all":"none"),...G,size:L,__staticSelector:"Select",disabled:S,readOnly:D||!V,value:ve,onChange:Ce=>{_e(Ce.currentTarget.value),xe.openDropdown(),w&&xe.selectFirstOption()},onFocus:Ce=>{V&&xe.openDropdown(),d==null||d(Ce)},onBlur:Ce=>{var Ve;V&&xe.closeDropdown(),_e(pe!=null&&((Ve=te[pe])==null?void 0:Ve.label)||""),f==null||f(Ce)},onClick:Ce=>{V?xe.openDropdown():xe.toggleDropdown(),m==null||m(Ce)},classNames:Ee,styles:we,unstyled:s,pointer:!V,error:B})}),g.jsx(xp,{data:J,hidden:D||S,filter:$,search:ve,limit:k,hiddenWhenEmpty:!_,withScrollArea:j,maxDropdownHeight:M,filterOptions:V&&(W==null?void 0:W.label)!==ve,value:pe,checkIconPosition:P,withCheckIcon:A,nothingFoundMessage:_,unstyled:s,labelId:G.label?`${ce}-label`:void 0,"aria-label":G.label?void 0:G["aria-label"],renderOption:Y,scrollAreaProps:fe})]}),g.jsx(ye.HiddenInput,{value:pe,name:N,form:T,disabled:S,...Z})]})});rs.classes={...He.classes,...ye.classes};rs.displayName="@mantine/core/Select";const Mh={},ns=re((e,t)=>{const r=q("TextInput",Mh,e);return g.jsx(He,{component:"input",ref:t,...r,__staticSelector:"TextInput"})});ns.classes=He.classes;ns.displayName="@mantine/core/TextInput";const Ph=e=>{const{fields:t,options:r,value:n,error:o={},name:s,readOnly:a}=e,i=n.map((c,l)=>{const u=(d,f)=>{c[d]=f,r.replaceElement(l,c)};return t.map((d,f)=>g.jsxs(x.Fragment,{children:[g.jsx(us,{field:d,formValues:c,onChange:u,value:c[d.name],error:d.name in(o[l]??{})?o[l][d.name]:void 0,readOnly:a}),!a&&g.jsx(Pt,{onClick:()=>r.removeElement(l),children:"Remove"})]},f))});return g.jsxs(g.Fragment,{children:[typeof o=="string"&&g.jsx(rn,{c:"red",fz:"sm",fw:500,children:o}),i,!a&&g.jsx(Pt,{display:"block",onClick:()=>r.addElement({}),children:"Add"})]})},Lh=e=>{const{name:t,onChange:r,value:n,readOnly:o,label:s}=e;return g.jsx(Ut,{name:t,checked:n,readOnly:o,onChange:a=>r(t,a.target.checked),label:s})};var kr={exports:{}},Ih=kr.exports,ua;function Fh(){return ua||(ua=1,function(e,t){(function(r,n){e.exports=n()})(Ih,function(){var r=1e3,n=6e4,o=36e5,s="millisecond",a="second",i="minute",c="hour",l="day",u="week",d="month",f="quarter",m="year",v="date",p="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,w={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(P){var A=["th","st","nd","rd"],_=P%100;return"["+P+(A[(_-20)%10]||A[_]||A[0])+"]"}},b=function(P,A,_){var N=String(P);return!N||N.length>=A?P:""+Array(A+1-N.length).join(_)+P},C={s:b,z:function(P){var A=-P.utcOffset(),_=Math.abs(A),N=Math.floor(_/60),T=_%60;return(A<=0?"+":"-")+b(N,2,"0")+":"+b(T,2,"0")},m:function P(A,_){if(A.date()<_.date())return-P(_,A);var N=12*(_.year()-A.year())+(_.month()-A.month()),T=A.clone().add(N,d),E=_-T<0,R=A.clone().add(N+(E?-1:1),d);return+(-(N+(_-T)/(E?T-R:R-T))||0)},a:function(P){return P<0?Math.ceil(P)||0:Math.floor(P)},p:function(P){return{M:d,y:m,w:u,d:l,D:v,h:c,m:i,s:a,ms:s,Q:f}[P]||String(P||"").toLowerCase().replace(/s$/,"")},u:function(P){return P===void 0}},D="en",S={};S[D]=w;var $="$isDayjsObject",k=function(P){return P instanceof V||!(!P||!P[$])},j=function P(A,_,N){var T;if(!A)return D;if(typeof A=="string"){var E=A.toLowerCase();S[E]&&(T=E),_&&(S[E]=_,T=E);var R=A.split("-");if(!T&&R.length>1)return P(R[0])}else{var O=A.name;S[O]=A,T=O}return!N&&T&&(D=T),T||!N&&D},M=function(P,A){if(k(P))return P.clone();var _=typeof A=="object"?A:{};return _.date=P,_.args=arguments,new V(_)},L=C;L.l=j,L.i=k,L.w=function(P,A){return M(P,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var V=function(){function P(_){this.$L=j(_.locale,null,!0),this.parse(_),this.$x=this.$x||_.x||{},this[$]=!0}var A=P.prototype;return A.parse=function(_){this.$d=function(N){var T=N.date,E=N.utc;if(T===null)return new Date(NaN);if(L.u(T))return new Date;if(T instanceof Date)return new Date(T);if(typeof T=="string"&&!/Z$/i.test(T)){var R=T.match(h);if(R){var O=R[2]-1||0,I=(R[7]||"0").substring(0,3);return E?new Date(Date.UTC(R[1],O,R[3]||1,R[4]||0,R[5]||0,R[6]||0,I)):new Date(R[1],O,R[3]||1,R[4]||0,R[5]||0,R[6]||0,I)}}return new Date(T)}(_),this.init()},A.init=function(){var _=this.$d;this.$y=_.getFullYear(),this.$M=_.getMonth(),this.$D=_.getDate(),this.$W=_.getDay(),this.$H=_.getHours(),this.$m=_.getMinutes(),this.$s=_.getSeconds(),this.$ms=_.getMilliseconds()},A.$utils=function(){return L},A.isValid=function(){return this.$d.toString()!==p},A.isSame=function(_,N){var T=M(_);return this.startOf(N)<=T&&T<=this.endOf(N)},A.isAfter=function(_,N){return M(_)<this.startOf(N)},A.isBefore=function(_,N){return this.endOf(N)<M(_)},A.$g=function(_,N,T){return L.u(_)?this[N]:this.set(T,_)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(_,N){var T=this,E=!!L.u(N)||N,R=L.p(_),O=function(Y,ie){var ne=L.w(T.$u?Date.UTC(T.$y,ie,Y):new Date(T.$y,ie,Y),T);return E?ne:ne.endOf(l)},I=function(Y,ie){return L.w(T.toDate()[Y].apply(T.toDate("s"),(E?[0,0,0,0]:[23,59,59,999]).slice(ie)),T)},B=this.$W,K=this.$M,F=this.$D,Q="set"+(this.$u?"UTC":"");switch(R){case m:return E?O(1,0):O(31,11);case d:return E?O(1,K):O(0,K+1);case u:var ee=this.$locale().weekStart||0,Z=(B<ee?B+7:B)-ee;return O(E?F-Z:F+(6-Z),K);case l:case v:return I(Q+"Hours",0);case c:return I(Q+"Minutes",1);case i:return I(Q+"Seconds",2);case a:return I(Q+"Milliseconds",3);default:return this.clone()}},A.endOf=function(_){return this.startOf(_,!1)},A.$set=function(_,N){var T,E=L.p(_),R="set"+(this.$u?"UTC":""),O=(T={},T[l]=R+"Date",T[v]=R+"Date",T[d]=R+"Month",T[m]=R+"FullYear",T[c]=R+"Hours",T[i]=R+"Minutes",T[a]=R+"Seconds",T[s]=R+"Milliseconds",T)[E],I=E===l?this.$D+(N-this.$W):N;if(E===d||E===m){var B=this.clone().set(v,1);B.$d[O](I),B.init(),this.$d=B.set(v,Math.min(this.$D,B.daysInMonth())).$d}else O&&this.$d[O](I);return this.init(),this},A.set=function(_,N){return this.clone().$set(_,N)},A.get=function(_){return this[L.p(_)]()},A.add=function(_,N){var T,E=this;_=Number(_);var R=L.p(N),O=function(K){var F=M(E);return L.w(F.date(F.date()+Math.round(K*_)),E)};if(R===d)return this.set(d,this.$M+_);if(R===m)return this.set(m,this.$y+_);if(R===l)return O(1);if(R===u)return O(7);var I=(T={},T[i]=n,T[c]=o,T[a]=r,T)[R]||1,B=this.$d.getTime()+_*I;return L.w(B,this)},A.subtract=function(_,N){return this.add(-1*_,N)},A.format=function(_){var N=this,T=this.$locale();if(!this.isValid())return T.invalidDate||p;var E=_||"YYYY-MM-DDTHH:mm:ssZ",R=L.z(this),O=this.$H,I=this.$m,B=this.$M,K=T.weekdays,F=T.months,Q=T.meridiem,ee=function(ie,ne,fe,X){return ie&&(ie[ne]||ie(N,E))||fe[ne].slice(0,X)},Z=function(ie){return L.s(O%12||12,ie,"0")},Y=Q||function(ie,ne,fe){var X=ie<12?"AM":"PM";return fe?X.toLowerCase():X};return E.replace(y,function(ie,ne){return ne||function(fe){switch(fe){case"YY":return String(N.$y).slice(-2);case"YYYY":return L.s(N.$y,4,"0");case"M":return B+1;case"MM":return L.s(B+1,2,"0");case"MMM":return ee(T.monthsShort,B,F,3);case"MMMM":return ee(F,B);case"D":return N.$D;case"DD":return L.s(N.$D,2,"0");case"d":return String(N.$W);case"dd":return ee(T.weekdaysMin,N.$W,K,2);case"ddd":return ee(T.weekdaysShort,N.$W,K,3);case"dddd":return K[N.$W];case"H":return String(O);case"HH":return L.s(O,2,"0");case"h":return Z(1);case"hh":return Z(2);case"a":return Y(O,I,!0);case"A":return Y(O,I,!1);case"m":return String(I);case"mm":return L.s(I,2,"0");case"s":return String(N.$s);case"ss":return L.s(N.$s,2,"0");case"SSS":return L.s(N.$ms,3,"0");case"Z":return R}return null}(ie)||R.replace(":","")})},A.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},A.diff=function(_,N,T){var E,R=this,O=L.p(N),I=M(_),B=(I.utcOffset()-this.utcOffset())*n,K=this-I,F=function(){return L.m(R,I)};switch(O){case m:E=F()/12;break;case d:E=F();break;case f:E=F()/3;break;case u:E=(K-B)/6048e5;break;case l:E=(K-B)/864e5;break;case c:E=K/o;break;case i:E=K/n;break;case a:E=K/r;break;default:E=K}return T?E:L.a(E)},A.daysInMonth=function(){return this.endOf(d).$D},A.$locale=function(){return S[this.$L]},A.locale=function(_,N){if(!_)return this.$L;var T=this.clone(),E=j(_,N,!0);return E&&(T.$L=E),T},A.clone=function(){return L.w(this.$d,this)},A.toDate=function(){return new Date(this.valueOf())},A.toJSON=function(){return this.isValid()?this.toISOString():null},A.toISOString=function(){return this.$d.toISOString()},A.toString=function(){return this.$d.toUTCString()},P}(),z=V.prototype;return M.prototype=z,[["$ms",s],["$s",a],["$m",i],["$H",c],["$W",l],["$M",d],["$y",m],["$D",v]].forEach(function(P){z[P[1]]=function(A){return this.$g(A,P[0],P[1])}}),M.extend=function(P,A){return P.$i||(P(A,V,M),P.$i=!0),M},M.locale=j,M.isDayjs=k,M.unix=function(P){return M(1e3*P)},M.en=S[D],M.Ls=S,M.p={},M})}(kr)),kr.exports}var Vh=Fh();const U=Lt(Vh);var $r={exports:{}},zh=$r.exports,da;function Bh(){return da||(da=1,function(e,t){(function(r,n){e.exports=n()})(zh,function(){var r={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},n=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,o=/\d/,s=/\d\d/,a=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,c={},l=function(h){return(h=+h)+(h>68?1900:2e3)},u=function(h){return function(y){this[h]=+y}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(h){(this.zone||(this.zone={})).offset=function(y){if(!y||y==="Z")return 0;var w=y.match(/([+-]|\d\d)/g),b=60*w[1]+(+w[2]||0);return b===0?0:w[0]==="+"?-b:b}(h)}],f=function(h){var y=c[h];return y&&(y.indexOf?y:y.s.concat(y.f))},m=function(h,y){var w,b=c.meridiem;if(b){for(var C=1;C<=24;C+=1)if(h.indexOf(b(C,0,y))>-1){w=C>12;break}}else w=h===(y?"pm":"PM");return w},v={A:[i,function(h){this.afternoon=m(h,!1)}],a:[i,function(h){this.afternoon=m(h,!0)}],Q:[o,function(h){this.month=3*(h-1)+1}],S:[o,function(h){this.milliseconds=100*+h}],SS:[s,function(h){this.milliseconds=10*+h}],SSS:[/\d{3}/,function(h){this.milliseconds=+h}],s:[a,u("seconds")],ss:[a,u("seconds")],m:[a,u("minutes")],mm:[a,u("minutes")],H:[a,u("hours")],h:[a,u("hours")],HH:[a,u("hours")],hh:[a,u("hours")],D:[a,u("day")],DD:[s,u("day")],Do:[i,function(h){var y=c.ordinal,w=h.match(/\d+/);if(this.day=w[0],y)for(var b=1;b<=31;b+=1)y(b).replace(/\[|\]/g,"")===h&&(this.day=b)}],w:[a,u("week")],ww:[s,u("week")],M:[a,u("month")],MM:[s,u("month")],MMM:[i,function(h){var y=f("months"),w=(f("monthsShort")||y.map(function(b){return b.slice(0,3)})).indexOf(h)+1;if(w<1)throw new Error;this.month=w%12||w}],MMMM:[i,function(h){var y=f("months").indexOf(h)+1;if(y<1)throw new Error;this.month=y%12||y}],Y:[/[+-]?\d+/,u("year")],YY:[s,function(h){this.year=l(h)}],YYYY:[/\d{4}/,u("year")],Z:d,ZZ:d};function p(h){var y,w;y=h,w=c&&c.formats;for(var b=(h=y.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(M,L,V){var z=V&&V.toUpperCase();return L||w[V]||r[V]||w[z].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(P,A,_){return A||_.slice(1)})})).match(n),C=b.length,D=0;D<C;D+=1){var S=b[D],$=v[S],k=$&&$[0],j=$&&$[1];b[D]=j?{regex:k,parser:j}:S.replace(/^\[|\]$/g,"")}return function(M){for(var L={},V=0,z=0;V<C;V+=1){var P=b[V];if(typeof P=="string")z+=P.length;else{var A=P.regex,_=P.parser,N=M.slice(z),T=A.exec(N)[0];_.call(L,T),M=M.replace(T,"")}}return function(E){var R=E.afternoon;if(R!==void 0){var O=E.hours;R?O<12&&(E.hours+=12):O===12&&(E.hours=0),delete E.afternoon}}(L),L}}return function(h,y,w){w.p.customParseFormat=!0,h&&h.parseTwoDigitYear&&(l=h.parseTwoDigitYear);var b=y.prototype,C=b.parse;b.parse=function(D){var S=D.date,$=D.utc,k=D.args;this.$u=$;var j=k[1];if(typeof j=="string"){var M=k[2]===!0,L=k[3]===!0,V=M||L,z=k[2];L&&(z=k[2]),c=this.$locale(),!M&&z&&(c=w.Ls[z]),this.$d=function(N,T,E,R){try{if(["x","X"].indexOf(T)>-1)return new Date((T==="X"?1e3:1)*N);var O=p(T)(N),I=O.year,B=O.month,K=O.day,F=O.hours,Q=O.minutes,ee=O.seconds,Z=O.milliseconds,Y=O.zone,ie=O.week,ne=new Date,fe=K||(I||B?1:ne.getDate()),X=I||ne.getFullYear(),ue=0;I&&!B||(ue=B>0?B-1:ne.getMonth());var le,he=F||0,G=Q||0,J=ee||0,te=Z||0;return Y?new Date(Date.UTC(X,ue,fe,he,G,J,te+60*Y.offset*1e3)):E?new Date(Date.UTC(X,ue,fe,he,G,J,te)):(le=new Date(X,ue,fe,he,G,J,te),ie&&(le=R(le).week(ie).toDate()),le)}catch{return new Date("")}}(S,j,$,w),this.init(),z&&z!==!0&&(this.$L=this.locale(z).$L),V&&S!=this.format(j)&&(this.$d=new Date("")),c={}}else if(j instanceof Array)for(var P=j.length,A=1;A<=P;A+=1){k[1]=j[A-1];var _=w.apply(this,k);if(_.isValid()){this.$d=_.$d,this.$L=_.$L,this.init();break}A===P&&(this.$d=new Date(""))}else C.call(this,D)}}})}($r)),$r.exports}var Wh=Bh();const hc=Lt(Wh);function Yh({direction:e,levelIndex:t,rowIndex:r,cellIndex:n,size:o}){switch(e){case"up":return t===0&&r===0?null:r===0?{levelIndex:t-1,rowIndex:n<=o[t-1][o[t-1].length-1]-1?o[t-1].length-1:o[t-1].length-2,cellIndex:n}:{levelIndex:t,rowIndex:r-1,cellIndex:n};case"down":return r===o[t].length-1?{levelIndex:t+1,rowIndex:0,cellIndex:n}:r===o[t].length-2&&n>=o[t][o[t].length-1]?{levelIndex:t+1,rowIndex:0,cellIndex:n}:{levelIndex:t,rowIndex:r+1,cellIndex:n};case"left":return t===0&&r===0&&n===0?null:r===0&&n===0?{levelIndex:t-1,rowIndex:o[t-1].length-1,cellIndex:o[t-1][o[t-1].length-1]-1}:n===0?{levelIndex:t,rowIndex:r-1,cellIndex:o[t][r-1]-1}:{levelIndex:t,rowIndex:r,cellIndex:n-1};case"right":return r===o[t].length-1&&n===o[t][r]-1?{levelIndex:t+1,rowIndex:0,cellIndex:0}:n===o[t][r]-1?{levelIndex:t,rowIndex:r+1,cellIndex:0}:{levelIndex:t,rowIndex:r,cellIndex:n+1};default:return{levelIndex:t,rowIndex:r,cellIndex:n}}}function vc({controlsRef:e,direction:t,levelIndex:r,rowIndex:n,cellIndex:o,size:s}){var c,l,u;const a=Yh({direction:t,size:s,rowIndex:n,cellIndex:o,levelIndex:r});if(!a)return;const i=(u=(l=(c=e.current)==null?void 0:c[a.levelIndex])==null?void 0:l[a.rowIndex])==null?void 0:u[a.cellIndex];i&&(i.disabled||i.getAttribute("data-hidden")||i.getAttribute("data-outside")?vc({controlsRef:e,direction:t,levelIndex:a.levelIndex,cellIndex:a.cellIndex,rowIndex:a.rowIndex,size:s}):i.focus())}function Hh(e){switch(e){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function Uh(e){var t;return(t=e.current)==null?void 0:t.map(r=>r.map(n=>n.length))}function os({controlsRef:e,levelIndex:t,rowIndex:r,cellIndex:n,event:o}){const s=Hh(o.key);if(s){o.preventDefault();const a=Uh(e);vc({controlsRef:e,direction:s,levelIndex:t,rowIndex:r,cellIndex:n,size:a})}}function so(e,t){if(!e||!t)return t;const r=e.getHours(),n=e.getMinutes(),o=e.getSeconds(),s=e.getMilliseconds(),a=new Date(t);return a.setHours(r),a.setMinutes(n),a.setSeconds(o),a.setMilliseconds(s),a}var Or={exports:{}},Gh=Or.exports,fa;function qh(){return fa||(fa=1,function(e,t){(function(r,n){e.exports=n()})(Gh,function(){var r={year:0,month:1,day:2,hour:3,minute:4,second:5},n={};return function(o,s,a){var i,c=function(f,m,v){v===void 0&&(v={});var p=new Date(f),h=function(y,w){w===void 0&&(w={});var b=w.timeZoneName||"short",C=y+"|"+b,D=n[C];return D||(D=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:y,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:b}),n[C]=D),D}(m,v);return h.formatToParts(p)},l=function(f,m){for(var v=c(f,m),p=[],h=0;h<v.length;h+=1){var y=v[h],w=y.type,b=y.value,C=r[w];C>=0&&(p[C]=parseInt(b,10))}var D=p[3],S=D===24?0:D,$=p[0]+"-"+p[1]+"-"+p[2]+" "+S+":"+p[4]+":"+p[5]+":000",k=+f;return(a.utc($).valueOf()-(k-=k%1e3))/6e4},u=s.prototype;u.tz=function(f,m){f===void 0&&(f=i);var v,p=this.utcOffset(),h=this.toDate(),y=h.toLocaleString("en-US",{timeZone:f}),w=Math.round((h-new Date(y))/1e3/60),b=15*-Math.round(h.getTimezoneOffset()/15)-w;if(!Number(b))v=this.utcOffset(0,m);else if(v=a(y,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(b,!0),m){var C=v.utcOffset();v=v.add(p-C,"minute")}return v.$x.$timezone=f,v},u.offsetName=function(f){var m=this.$x.$timezone||a.tz.guess(),v=c(this.valueOf(),m,{timeZoneName:f}).find(function(p){return p.type.toLowerCase()==="timezonename"});return v&&v.value};var d=u.startOf;u.startOf=function(f,m){if(!this.$x||!this.$x.$timezone)return d.call(this,f,m);var v=a(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return d.call(v,f,m).tz(this.$x.$timezone,!0)},a.tz=function(f,m,v){var p=v&&m,h=v||m||i,y=l(+a(),h);if(typeof f!="string")return a(f).tz(h);var w=function(S,$,k){var j=S-60*$*1e3,M=l(j,k);if($===M)return[j,$];var L=l(j-=60*(M-$)*1e3,k);return M===L?[j,M]:[S-60*Math.min(M,L)*1e3,Math.max(M,L)]}(a.utc(f,p).valueOf(),y,h),b=w[0],C=w[1],D=a(b).utcOffset(C);return D.$x.$timezone=h,D},a.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},a.tz.setDefault=function(f){i=f}}})}(Or)),Or.exports}var Xh=qh();const Kh=Lt(Xh);var Ar={exports:{}},Zh=Ar.exports,ma;function Jh(){return ma||(ma=1,function(e,t){(function(r,n){e.exports=n()})(Zh,function(){var r="minute",n=/[+-]\d\d(?::?\d\d)?/g,o=/([+-]|\d\d)/g;return function(s,a,i){var c=a.prototype;i.utc=function(p){var h={date:p,utc:!0,args:arguments};return new a(h)},c.utc=function(p){var h=i(this.toDate(),{locale:this.$L,utc:!0});return p?h.add(this.utcOffset(),r):h},c.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var l=c.parse;c.parse=function(p){p.utc&&(this.$u=!0),this.$utils().u(p.$offset)||(this.$offset=p.$offset),l.call(this,p)};var u=c.init;c.init=function(){if(this.$u){var p=this.$d;this.$y=p.getUTCFullYear(),this.$M=p.getUTCMonth(),this.$D=p.getUTCDate(),this.$W=p.getUTCDay(),this.$H=p.getUTCHours(),this.$m=p.getUTCMinutes(),this.$s=p.getUTCSeconds(),this.$ms=p.getUTCMilliseconds()}else u.call(this)};var d=c.utcOffset;c.utcOffset=function(p,h){var y=this.$utils().u;if(y(p))return this.$u?0:y(this.$offset)?d.call(this):this.$offset;if(typeof p=="string"&&(p=function(D){D===void 0&&(D="");var S=D.match(n);if(!S)return null;var $=(""+S[0]).match(o)||["-",0,0],k=$[0],j=60*+$[1]+ +$[2];return j===0?0:k==="+"?j:-j}(p),p===null))return this;var w=Math.abs(p)<=16?60*p:p,b=this;if(h)return b.$offset=w,b.$u=p===0,b;if(p!==0){var C=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(b=this.local().add(w+C,r)).$offset=w,b.$x.$localOffset=C}else b=this.utc();return b};var f=c.format;c.format=function(p){var h=p||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return f.call(this,h)},c.valueOf=function(){var p=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*p},c.isUTC=function(){return!!this.$u},c.toISOString=function(){return this.toDate().toISOString()},c.toString=function(){return this.toDate().toUTCString()};var m=c.toDate;c.toDate=function(p){return p==="s"&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():m.call(this)};var v=c.diff;c.diff=function(p,h,y){if(p&&this.$u===p.$u)return v.call(this,p,h,y);var w=this.local(),b=i(p).local();return v.call(w,b,h,y)}}})}(Ar)),Ar.exports}var Qh=Jh();const ev=Lt(Qh);U.extend(ev);U.extend(Kh);function tv(e,t){return t?U(e).tz(t).utcOffset()+e.getTimezoneOffset():0}const pa=(e,t,r)=>{if(!e)return null;if(!t)return e;let n=tv(e,t);return r==="remove"&&(n*=-1),U(e).add(n,"minutes").toDate()};function et(e,t,r,n){return n||!t?t:Array.isArray(t)?t.map(o=>pa(o,r,e)):pa(t,r,e)}const rv={locale:"en",timezone:null,firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–",consistentWeeks:!1},nv=x.createContext(rv);function Fe(){const e=x.useContext(nv),t=x.useCallback(a=>a||e.locale,[e.locale]),r=x.useCallback(a=>a||e.timezone||void 0,[e.timezone]),n=x.useCallback(a=>typeof a=="number"?a:e.firstDayOfWeek,[e.firstDayOfWeek]),o=x.useCallback(a=>Array.isArray(a)?a:e.weekendDays,[e.weekendDays]),s=x.useCallback(a=>typeof a=="string"?a:e.labelSeparator,[e.labelSeparator]);return{...e,getLocale:t,getTimezone:r,getFirstDayOfWeek:n,getWeekendDays:o,getLabelSeparator:s}}function ov(e,t){const r=Fe(),n=o=>et("remove",o,r.getTimezone()).toISOString();if(t==="range"&&Array.isArray(e)){const[o,s]=e;return o?s?`${n(o)} – ${n(s)}`:`${n(o)} –`:""}return t==="multiple"&&Array.isArray(e)?e.map(o=>o&&n(o)).filter(Boolean).join(", "):!Array.isArray(e)&&e?n(e):""}function ss({value:e,type:t,name:r,form:n}){return g.jsx("input",{type:"hidden",value:ov(e,t),name:r,form:n})}ss.displayName="@mantine/dates/HiddenDatesInput";var sv={input:"m_468e7eda"};const av={},fn=re((e,t)=>{const r=q("TimeInput",av,e),{classNames:n,styles:o,unstyled:s,vars:a,withSeconds:i,minTime:c,maxTime:l,value:u,onChange:d,...f}=r,{resolvedClassNames:m,resolvedStyles:v}=lt({classNames:n,styles:o,props:r}),p=y=>{if(c!==void 0||l!==void 0){const[w,b,C]=y.split(":").map(Number);if(c){const[D,S,$]=c.split(":").map(Number);if(w<D||w===D&&b<S||i&&w===D&&b===S&&C<$)return-1}if(l){const[D,S,$]=l.split(":").map(Number);if(w>D||w===D&&b>S||i&&w===D&&b===S&&C>$)return 1}}return 0},h=y=>{var w,b,C;if((w=r.onBlur)==null||w.call(r,y),c!==void 0||l!==void 0){const D=y.currentTarget.value;if(D){const S=p(D);S===1?(y.currentTarget.value=l,(b=r.onChange)==null||b.call(r,y)):S===-1&&(y.currentTarget.value=c,(C=r.onChange)==null||C.call(r,y))}}};return g.jsx(He,{classNames:{...m,input:Te(sv.input,m==null?void 0:m.input)},styles:v,unstyled:s,ref:t,value:u,...f,step:i?1:60,onChange:d,onBlur:h,type:"time",__staticSelector:"TimeInput"})});fn.classes=He.classes;fn.displayName="@mantine/dates/TimeInput";var gc={day:"m_396ce5cb"};const iv={},cv=(e,{size:t})=>({day:{"--day-size":be(t,"day-size")}}),as=re((e,t)=>{const r=q("Day",iv,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,date:l,disabled:u,__staticSelector:d,weekend:f,outside:m,selected:v,renderDay:p,inRange:h,firstInRange:y,lastInRange:w,hidden:b,static:C,highlightToday:D,...S}=r,$=me({name:d||"Day",classes:gc,props:r,className:o,style:s,classNames:n,styles:a,unstyled:i,vars:c,varsResolver:cv,rootSelector:"day"}),k=Fe();return g.jsx(Be,{...$("day",{style:b?{display:"none"}:void 0}),component:C?"div":"button",ref:t,disabled:u,"data-today":U(l).isSame(et("add",new Date,k.getTimezone()),"day")||void 0,"data-hidden":b||void 0,"data-highlight-today":D||void 0,"data-disabled":u||void 0,"data-weekend":!u&&!m&&f||void 0,"data-outside":!u&&m||void 0,"data-selected":!u&&v||void 0,"data-in-range":h&&!u||void 0,"data-first-in-range":y&&!u||void 0,"data-last-in-range":w&&!u||void 0,"data-static":C||void 0,unstyled:i,...S,children:(p==null?void 0:p(l))||U(l).date()})});as.classes=gc;as.displayName="@mantine/dates/Day";function lv({locale:e,format:t="dd",firstDayOfWeek:r=1}){const n=U().day(r),o=[];for(let s=0;s<7;s+=1)typeof t=="string"?o.push(U(n).add(s,"days").locale(e).format(t)):o.push(t(U(n).add(s,"days").toDate()));return o}var yc={weekday:"m_18a3eca"};const uv={},dv=(e,{size:t})=>({weekdaysRow:{"--wr-fz":Re(t),"--wr-spacing":Pa(t)}}),is=re((e,t)=>{const r=q("WeekdaysRow",uv,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,locale:l,firstDayOfWeek:u,weekdayFormat:d,cellComponent:f="th",__staticSelector:m,withWeekNumbers:v,...p}=r,h=me({name:m||"WeekdaysRow",classes:yc,props:r,className:o,style:s,classNames:n,styles:a,unstyled:i,vars:c,varsResolver:dv,rootSelector:"weekdaysRow"}),y=Fe(),w=lv({locale:y.getLocale(l),format:d,firstDayOfWeek:y.getFirstDayOfWeek(u)}).map((b,C)=>g.jsx(f,{...h("weekday"),children:b},C));return g.jsxs(ae,{component:"tr",ref:t,...h("weekdaysRow"),...p,children:[v&&g.jsx(f,{...h("weekday"),children:"#"}),w]})});is.classes=yc;is.displayName="@mantine/dates/WeekdaysRow";function fv(e,t=1){let r=U(e);const n=t===0?6:t-1;for(;r.day()!==n;)r=r.add(1,"day");return r.toDate()}function mv(e,t=1){let r=U(e);for(;r.day()!==t;)r=r.subtract(1,"day");return r.toDate()}function pv({month:e,firstDayOfWeek:t=1,consistentWeeks:r}){const n=U(e).subtract(U(e).date()-1,"day"),o=U(n).startOf("day"),s=o.toDate(),a=o.add(+o.daysInMonth()-1,"day").toDate(),i=fv(a,t),c=mv(s,t),l=[];for(;c<=i;){const u=[];for(let d=0;d<7;d+=1)u.push(new Date(c)),c.setDate(c.getDate()+1);l.push(u)}if(r&&l.length<6){const u=l[l.length-1],d=u[u.length-1],f=new Date(d);for(f.setDate(f.getDate()+1);l.length<6;){const m=[];for(let v=0;v<7;v+=1)m.push(new Date(f)),f.setDate(f.getDate()+1);l.push(m)}}return l}function bc(e,t){return U(e).format("YYYY-MM")===U(t).format("YYYY-MM")}function xc(e,t){return t instanceof Date?U(e).isAfter(U(t).subtract(1,"day"),"day"):!0}function wc(e,t){return t instanceof Date?U(e).isBefore(U(t).add(1,"day"),"day"):!0}function hv(e,t,r,n,o,s,a){const i=e.flat().filter(u=>{var d;return wc(u,r)&&xc(u,t)&&!(o!=null&&o(u))&&!((d=n==null?void 0:n(u))!=null&&d.disabled)&&(!s||bc(u,a))}),c=i.find(u=>{var d;return(d=n==null?void 0:n(u))==null?void 0:d.selected});if(c)return c;const l=i.find(u=>U().isSame(u,"date"));return l||i[0]}var jr={exports:{}},vv=jr.exports,ha;function gv(){return ha||(ha=1,function(e,t){(function(r,n){e.exports=n()})(vv,function(){var r="day";return function(n,o,s){var a=function(l){return l.add(4-l.isoWeekday(),r)},i=o.prototype;i.isoWeekYear=function(){return a(this).year()},i.isoWeek=function(l){if(!this.$utils().u(l))return this.add(7*(l-this.isoWeek()),r);var u,d,f,m,v=a(this),p=(u=this.isoWeekYear(),d=this.$u,f=(d?s.utc:s)().year(u).startOf("year"),m=4-f.isoWeekday(),f.isoWeekday()>4&&(m+=7),f.add(m,r));return v.diff(p,"week")+1},i.isoWeekday=function(l){return this.$utils().u(l)?this.day()||7:this.day(this.day()%7?l:l-7)};var c=i.startOf;i.startOf=function(l,u){var d=this.$utils(),f=!!d.u(u)||u;return d.p(l)==="isoweek"?f?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):c.bind(this)(l,u)}}})}(jr)),jr.exports}var yv=gv();const bv=Lt(yv);U.extend(bv);function xv(e){const t=e.find(r=>U(r).day()===1);return U(t).isoWeek()}var Sc={month:"m_cc9820d3",monthCell:"m_8f457cd5",weekNumber:"m_6cff9dea"};const wv={withCellSpacing:!0},Sv=(e,{size:t})=>({weekNumber:{"--wn-fz":Re(t),"--wn-size":be(t,"wn-size")}}),mn=re((e,t)=>{const r=q("Month",wv,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,__staticSelector:l,locale:u,firstDayOfWeek:d,weekdayFormat:f,month:m,weekendDays:v,getDayProps:p,excludeDate:h,minDate:y,maxDate:w,renderDay:b,hideOutsideDates:C,hideWeekdays:D,getDayAriaLabel:S,static:$,__getDayRef:k,__onDayKeyDown:j,__onDayClick:M,__onDayMouseEnter:L,__preventFocus:V,__stopPropagation:z,withCellSpacing:P,size:A,highlightToday:_,withWeekNumbers:N,...T}=r,E=me({name:l||"Month",classes:Sc,props:r,className:o,style:s,classNames:n,styles:a,unstyled:i,vars:c,varsResolver:Sv,rootSelector:"month"}),R=Fe(),O=pv({month:m,firstDayOfWeek:R.getFirstDayOfWeek(d),consistentWeeks:R.consistentWeeks}),I=hv(O,y,w,p,h,C,m),{resolvedClassNames:B,resolvedStyles:K}=lt({classNames:n,styles:a,props:r}),F=O.map((Q,ee)=>{const Z=Q.map((Y,ie)=>{const ne=!bc(Y,m),fe=(S==null?void 0:S(Y))||U(Y).locale(u||R.locale).format("D MMMM YYYY"),X=p==null?void 0:p(Y),ue=U(Y).isSame(I,"date");return g.jsx("td",{...E("monthCell"),"data-with-spacing":P||void 0,children:g.jsx(as,{__staticSelector:l||"Month",classNames:B,styles:K,unstyled:i,"data-mantine-stop-propagation":z||void 0,highlightToday:_,renderDay:b,date:Y,size:A,weekend:R.getWeekendDays(v).includes(Y.getDay()),outside:ne,hidden:C?ne:!1,"aria-label":fe,static:$,disabled:(h==null?void 0:h(Y))||!wc(Y,w)||!xc(Y,y),ref:le=>k==null?void 0:k(ee,ie,le),...X,onKeyDown:le=>{var he;(he=X==null?void 0:X.onKeyDown)==null||he.call(X,le),j==null||j(le,{rowIndex:ee,cellIndex:ie,date:Y})},onMouseEnter:le=>{var he;(he=X==null?void 0:X.onMouseEnter)==null||he.call(X,le),L==null||L(le,Y)},onClick:le=>{var he;(he=X==null?void 0:X.onClick)==null||he.call(X,le),M==null||M(le,Y)},onMouseDown:le=>{var he;(he=X==null?void 0:X.onMouseDown)==null||he.call(X,le),V&&le.preventDefault()},tabIndex:V||!ue?-1:0})},Y.toString())});return g.jsxs("tr",{...E("monthRow"),children:[N&&g.jsx("td",{...E("weekNumber"),children:xv(Q)}),Z]},ee)});return g.jsxs(ae,{component:"table",...E("month"),size:A,ref:t,...T,children:[!D&&g.jsx("thead",{...E("monthThead"),children:g.jsx(is,{__staticSelector:l||"Month",locale:u,firstDayOfWeek:d,weekdayFormat:f,size:A,classNames:B,styles:K,unstyled:i,withWeekNumbers:N})}),g.jsx("tbody",{...E("monthTbody"),children:F})]})});mn.classes=Sc;mn.displayName="@mantine/dates/Month";var Cc={pickerControl:"m_dc6a3c71"};const Cv={},Dv=(e,{size:t})=>({pickerControl:{"--dpc-fz":Re(t),"--dpc-size":be(t,"dpc-size")}}),pn=re((e,t)=>{const r=q("PickerControl",Cv,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,firstInRange:l,lastInRange:u,inRange:d,__staticSelector:f,selected:m,disabled:v,...p}=r,h=me({name:f||"PickerControl",classes:Cc,props:r,className:o,style:s,classNames:n,styles:a,unstyled:i,vars:c,varsResolver:Dv,rootSelector:"pickerControl"});return g.jsx(Be,{...h("pickerControl"),ref:t,unstyled:i,"data-picker-control":!0,"data-selected":m&&!v||void 0,"data-disabled":v||void 0,"data-in-range":d&&!v&&!m||void 0,"data-first-in-range":l&&!v||void 0,"data-last-in-range":u&&!v||void 0,disabled:v,...p})});pn.classes=Cc;pn.displayName="@mantine/dates/PickerControl";function Dc(e,t,r){return!t&&!r?!1:!!(t&&U(e).isBefore(t,"year")||r&&U(e).isAfter(r,"year"))}function _v(e,t,r,n){const o=e.flat().filter(i=>{var c;return!Dc(i,t,r)&&!((c=n==null?void 0:n(i))!=null&&c.disabled)}),s=o.find(i=>{var c;return(c=n==null?void 0:n(i))==null?void 0:c.selected});if(s)return s;const a=o.find(i=>U().isSame(i,"year"));return a||o[0]}function _c(e){const t=e.getFullYear(),r=t-t%10;let n=0;const o=[[],[],[],[]];for(let s=0;s<4;s+=1){const a=s===3?1:3;for(let i=0;i<a;i+=1)o[s].push(new Date(r+n,0)),n+=1}return o}var Rc={yearsList:"m_9206547b",yearsListCell:"m_c5a19c7d"};const Rv={yearsListFormat:"YYYY",withCellSpacing:!0},hn=re((e,t)=>{const r=q("YearsList",Rv,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,decade:l,yearsListFormat:u,locale:d,minDate:f,maxDate:m,getYearControlProps:v,__staticSelector:p,__getControlRef:h,__onControlKeyDown:y,__onControlClick:w,__onControlMouseEnter:b,__preventFocus:C,__stopPropagation:D,withCellSpacing:S,size:$,...k}=r,j=me({name:p||"YearsList",classes:Rc,props:r,className:o,style:s,classNames:n,styles:a,unstyled:i,vars:c,rootSelector:"yearsList"}),M=Fe(),L=_c(l),V=_v(L,f,m,v),z=L.map((P,A)=>{const _=P.map((N,T)=>{const E=v==null?void 0:v(N),R=U(N).isSame(V,"year");return g.jsx("td",{...j("yearsListCell"),"data-with-spacing":S||void 0,children:g.jsx(pn,{...j("yearsListControl"),size:$,unstyled:i,"data-mantine-stop-propagation":D||void 0,disabled:Dc(N,f,m),ref:O=>h==null?void 0:h(A,T,O),...E,onKeyDown:O=>{var I;(I=E==null?void 0:E.onKeyDown)==null||I.call(E,O),y==null||y(O,{rowIndex:A,cellIndex:T,date:N})},onClick:O=>{var I;(I=E==null?void 0:E.onClick)==null||I.call(E,O),w==null||w(O,N)},onMouseEnter:O=>{var I;(I=E==null?void 0:E.onMouseEnter)==null||I.call(E,O),b==null||b(O,N)},onMouseDown:O=>{var I;(I=E==null?void 0:E.onMouseDown)==null||I.call(E,O),C&&O.preventDefault()},tabIndex:C||!R?-1:0,children:U(N).locale(M.getLocale(d)).format(u)})},T)});return g.jsx("tr",{...j("yearsListRow"),children:_},A)});return g.jsx(ae,{component:"table",ref:t,size:$,...j("yearsList"),...k,children:g.jsx("tbody",{children:z})})});hn.classes=Rc;hn.displayName="@mantine/dates/YearsList";function Nc(e,t,r){return!t&&!r?!1:!!(t&&U(e).isBefore(t,"month")||r&&U(e).isAfter(r,"month"))}function Nv(e,t,r,n){const o=e.flat().filter(i=>{var c;return!Nc(i,t,r)&&!((c=n==null?void 0:n(i))!=null&&c.disabled)}),s=o.find(i=>{var c;return(c=n==null?void 0:n(i))==null?void 0:c.selected});if(s)return s;const a=o.find(i=>U().isSame(i,"month"));return a||o[0]}function Ev(e){const t=U(e).startOf("year").toDate(),r=[[],[],[],[]];let n=0;for(let o=0;o<4;o+=1)for(let s=0;s<3;s+=1)r[o].push(U(t).add(n,"months").toDate()),n+=1;return r}var Ec={monthsList:"m_2a6c32d",monthsListCell:"m_fe27622f"};const Tv={monthsListFormat:"MMM",withCellSpacing:!0},vn=re((e,t)=>{const r=q("MonthsList",Tv,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,__staticSelector:l,year:u,monthsListFormat:d,locale:f,minDate:m,maxDate:v,getMonthControlProps:p,__getControlRef:h,__onControlKeyDown:y,__onControlClick:w,__onControlMouseEnter:b,__preventFocus:C,__stopPropagation:D,withCellSpacing:S,size:$,...k}=r,j=me({name:l||"MonthsList",classes:Ec,props:r,className:o,style:s,classNames:n,styles:a,unstyled:i,vars:c,rootSelector:"monthsList"}),M=Fe(),L=Ev(u),V=Nv(L,m,v,p),z=L.map((P,A)=>{const _=P.map((N,T)=>{const E=p==null?void 0:p(N),R=U(N).isSame(V,"month");return g.jsx("td",{...j("monthsListCell"),"data-with-spacing":S||void 0,children:g.jsx(pn,{...j("monthsListControl"),size:$,unstyled:i,__staticSelector:l||"MonthsList","data-mantine-stop-propagation":D||void 0,disabled:Nc(N,m,v),ref:O=>h==null?void 0:h(A,T,O),...E,onKeyDown:O=>{var I;(I=E==null?void 0:E.onKeyDown)==null||I.call(E,O),y==null||y(O,{rowIndex:A,cellIndex:T,date:N})},onClick:O=>{var I;(I=E==null?void 0:E.onClick)==null||I.call(E,O),w==null||w(O,N)},onMouseEnter:O=>{var I;(I=E==null?void 0:E.onMouseEnter)==null||I.call(E,O),b==null||b(O,N)},onMouseDown:O=>{var I;(I=E==null?void 0:E.onMouseDown)==null||I.call(E,O),C&&O.preventDefault()},tabIndex:C||!R?-1:0,children:U(N).locale(M.getLocale(f)).format(d)})},T)});return g.jsx("tr",{...j("monthsListRow"),children:_},A)});return g.jsx(ae,{component:"table",ref:t,size:$,...j("monthsList"),...k,children:g.jsx("tbody",{children:z})})});vn.classes=Ec;vn.displayName="@mantine/dates/MonthsList";var Tc={calendarHeader:"m_730a79ed",calendarHeaderLevel:"m_f6645d97",calendarHeaderControl:"m_2351eeb0",calendarHeaderControlIcon:"m_367dc749"};const kv={nextDisabled:!1,previousDisabled:!1,hasNextLevel:!0,withNext:!0,withPrevious:!0},$v=(e,{size:t})=>({calendarHeader:{"--dch-control-size":be(t,"dch-control-size"),"--dch-fz":Re(t)}}),ht=re((e,t)=>{const r=q("CalendarHeader",kv,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,nextIcon:l,previousIcon:u,nextLabel:d,previousLabel:f,onNext:m,onPrevious:v,onLevelClick:p,label:h,nextDisabled:y,previousDisabled:w,hasNextLevel:b,levelControlAriaLabel:C,withNext:D,withPrevious:S,__staticSelector:$,__preventFocus:k,__stopPropagation:j,...M}=r,L=me({name:$||"CalendarHeader",classes:Tc,props:r,className:o,style:s,classNames:n,styles:a,unstyled:i,vars:c,varsResolver:$v,rootSelector:"calendarHeader"}),V=k?z=>z.preventDefault():void 0;return g.jsxs(ae,{...L("calendarHeader"),ref:t,...M,children:[S&&g.jsx(Be,{...L("calendarHeaderControl"),"data-direction":"previous","aria-label":f,onClick:v,unstyled:i,onMouseDown:V,disabled:w,"data-disabled":w||void 0,tabIndex:k||w?-1:0,"data-mantine-stop-propagation":j||void 0,children:u||g.jsx(to,{...L("calendarHeaderControlIcon"),"data-direction":"previous",size:"45%"})}),g.jsx(Be,{component:b?"button":"div",...L("calendarHeaderLevel"),onClick:b?p:void 0,unstyled:i,onMouseDown:b?V:void 0,disabled:!b,"data-static":!b||void 0,"aria-label":C,tabIndex:k||!b?-1:0,"data-mantine-stop-propagation":j||void 0,children:h}),D&&g.jsx(Be,{...L("calendarHeaderControl"),"data-direction":"next","aria-label":d,onClick:m,unstyled:i,onMouseDown:V,disabled:y,"data-disabled":y||void 0,tabIndex:k||y?-1:0,"data-mantine-stop-propagation":j||void 0,children:l||g.jsx(to,{...L("calendarHeaderControlIcon"),"data-direction":"next",size:"45%"})})]})});ht.classes=Tc;ht.displayName="@mantine/dates/CalendarHeader";function Ov(e){const t=_c(e);return[t[0][0],t[3][0]]}const Av={decadeLabelFormat:"YYYY"},gn=re((e,t)=>{const r=q("DecadeLevel",Av,e),{decade:n,locale:o,minDate:s,maxDate:a,yearsListFormat:i,getYearControlProps:c,__getControlRef:l,__onControlKeyDown:u,__onControlClick:d,__onControlMouseEnter:f,withCellSpacing:m,__preventFocus:v,nextIcon:p,previousIcon:h,nextLabel:y,previousLabel:w,onNext:b,onPrevious:C,nextDisabled:D,previousDisabled:S,levelControlAriaLabel:$,withNext:k,withPrevious:j,decadeLabelFormat:M,classNames:L,styles:V,unstyled:z,__staticSelector:P,__stopPropagation:A,size:_,...N}=r,T=Fe(),[E,R]=Ov(n),O={__staticSelector:P||"DecadeLevel",classNames:L,styles:V,unstyled:z,size:_},I=typeof D=="boolean"?D:a?!U(R).endOf("year").isBefore(a):!1,B=typeof S=="boolean"?S:s?!U(E).startOf("year").isAfter(s):!1,K=(F,Q)=>U(F).locale(o||T.locale).format(Q);return g.jsxs(ae,{"data-decade-level":!0,size:_,ref:t,...N,children:[g.jsx(ht,{label:typeof M=="function"?M(E,R):`${K(E,M)} – ${K(R,M)}`,__preventFocus:v,__stopPropagation:A,nextIcon:p,previousIcon:h,nextLabel:y,previousLabel:w,onNext:b,onPrevious:C,nextDisabled:I,previousDisabled:B,hasNextLevel:!1,levelControlAriaLabel:$,withNext:k,withPrevious:j,...O}),g.jsx(hn,{decade:n,locale:o,minDate:s,maxDate:a,yearsListFormat:i,getYearControlProps:c,__getControlRef:l,__onControlKeyDown:u,__onControlClick:d,__onControlMouseEnter:f,__preventFocus:v,__stopPropagation:A,withCellSpacing:m,...O})]})});gn.classes={...hn.classes,...ht.classes};gn.displayName="@mantine/dates/DecadeLevel";const jv={yearLabelFormat:"YYYY"},yn=re((e,t)=>{const r=q("YearLevel",jv,e),{year:n,locale:o,minDate:s,maxDate:a,monthsListFormat:i,getMonthControlProps:c,__getControlRef:l,__onControlKeyDown:u,__onControlClick:d,__onControlMouseEnter:f,withCellSpacing:m,__preventFocus:v,nextIcon:p,previousIcon:h,nextLabel:y,previousLabel:w,onNext:b,onPrevious:C,onLevelClick:D,nextDisabled:S,previousDisabled:$,hasNextLevel:k,levelControlAriaLabel:j,withNext:M,withPrevious:L,yearLabelFormat:V,__staticSelector:z,__stopPropagation:P,size:A,classNames:_,styles:N,unstyled:T,...E}=r,R=Fe(),O={__staticSelector:z||"YearLevel",classNames:_,styles:N,unstyled:T,size:A},I=typeof S=="boolean"?S:a?!U(n).endOf("year").isBefore(a):!1,B=typeof $=="boolean"?$:s?!U(n).startOf("year").isAfter(s):!1;return g.jsxs(ae,{"data-year-level":!0,size:A,ref:t,...E,children:[g.jsx(ht,{label:typeof V=="function"?V(n):U(n).locale(o||R.locale).format(V),__preventFocus:v,__stopPropagation:P,nextIcon:p,previousIcon:h,nextLabel:y,previousLabel:w,onNext:b,onPrevious:C,onLevelClick:D,nextDisabled:I,previousDisabled:B,hasNextLevel:k,levelControlAriaLabel:j,withNext:M,withPrevious:L,...O}),g.jsx(vn,{year:n,locale:o,minDate:s,maxDate:a,monthsListFormat:i,getMonthControlProps:c,__getControlRef:l,__onControlKeyDown:u,__onControlClick:d,__onControlMouseEnter:f,__preventFocus:v,__stopPropagation:P,withCellSpacing:m,...O})]})});yn.classes={...ht.classes,...vn.classes};yn.displayName="@mantine/dates/YearLevel";const Mv={monthLabelFormat:"MMMM YYYY"},bn=re((e,t)=>{const r=q("MonthLevel",Mv,e),{month:n,locale:o,firstDayOfWeek:s,weekdayFormat:a,weekendDays:i,getDayProps:c,excludeDate:l,minDate:u,maxDate:d,renderDay:f,hideOutsideDates:m,hideWeekdays:v,getDayAriaLabel:p,__getDayRef:h,__onDayKeyDown:y,__onDayClick:w,__onDayMouseEnter:b,withCellSpacing:C,highlightToday:D,withWeekNumbers:S,__preventFocus:$,__stopPropagation:k,nextIcon:j,previousIcon:M,nextLabel:L,previousLabel:V,onNext:z,onPrevious:P,onLevelClick:A,nextDisabled:_,previousDisabled:N,hasNextLevel:T,levelControlAriaLabel:E,withNext:R,withPrevious:O,monthLabelFormat:I,classNames:B,styles:K,unstyled:F,__staticSelector:Q,size:ee,static:Z,...Y}=r,ie=Fe(),ne={__staticSelector:Q||"MonthLevel",classNames:B,styles:K,unstyled:F,size:ee},fe=typeof _=="boolean"?_:d?!U(n).endOf("month").isBefore(d):!1,X=typeof N=="boolean"?N:u?!U(n).startOf("month").isAfter(u):!1;return g.jsxs(ae,{"data-month-level":!0,size:ee,ref:t,...Y,children:[g.jsx(ht,{label:typeof I=="function"?I(n):U(n).locale(o||ie.locale).format(I),__preventFocus:$,__stopPropagation:k,nextIcon:j,previousIcon:M,nextLabel:L,previousLabel:V,onNext:z,onPrevious:P,onLevelClick:A,nextDisabled:fe,previousDisabled:X,hasNextLevel:T,levelControlAriaLabel:E,withNext:R,withPrevious:O,...ne}),g.jsx(mn,{month:n,locale:o,firstDayOfWeek:s,weekdayFormat:a,weekendDays:i,getDayProps:c,excludeDate:l,minDate:u,maxDate:d,renderDay:f,hideOutsideDates:m,hideWeekdays:v,getDayAriaLabel:p,__getDayRef:h,__onDayKeyDown:y,__onDayClick:w,__onDayMouseEnter:b,__preventFocus:$,__stopPropagation:k,static:Z,withCellSpacing:C,highlightToday:D,withWeekNumbers:S,...ne})]})});bn.classes={...mn.classes,...ht.classes};bn.displayName="@mantine/dates/MonthLevel";var kc={levelsGroup:"m_30b26e33"};const Pv={},vt=re((e,t)=>{const r=q("LevelsGroup",Pv,e),{classNames:n,className:o,style:s,styles:a,unstyled:i,vars:c,__staticSelector:l,...u}=r,d=me({name:l||"LevelsGroup",classes:kc,props:r,className:o,style:s,classNames:n,styles:a,unstyled:i,vars:c,rootSelector:"levelsGroup"});return g.jsx(ae,{ref:t,...d("levelsGroup"),...u})});vt.classes=kc;vt.displayName="@mantine/dates/LevelsGroup";const Lv={numberOfColumns:1},xn=re((e,t)=>{const r=q("DecadeLevelGroup",Lv,e),{decade:n,locale:o,minDate:s,maxDate:a,yearsListFormat:i,getYearControlProps:c,__onControlClick:l,__onControlMouseEnter:u,withCellSpacing:d,__preventFocus:f,nextIcon:m,previousIcon:v,nextLabel:p,previousLabel:h,onNext:y,onPrevious:w,nextDisabled:b,previousDisabled:C,classNames:D,styles:S,unstyled:$,__staticSelector:k,__stopPropagation:j,numberOfColumns:M,levelControlAriaLabel:L,decadeLabelFormat:V,size:z,vars:P,...A}=r,_=x.useRef([]),N=Array(M).fill(0).map((T,E)=>{const R=U(n).add(E*10,"years").toDate();return g.jsx(gn,{size:z,yearsListFormat:i,decade:R,withNext:E===M-1,withPrevious:E===0,decadeLabelFormat:V,__onControlClick:l,__onControlMouseEnter:u,__onControlKeyDown:(O,I)=>os({levelIndex:E,rowIndex:I.rowIndex,cellIndex:I.cellIndex,event:O,controlsRef:_}),__getControlRef:(O,I,B)=>{Array.isArray(_.current[E])||(_.current[E]=[]),Array.isArray(_.current[E][O])||(_.current[E][O]=[]),_.current[E][O][I]=B},levelControlAriaLabel:typeof L=="function"?L(R):L,locale:o,minDate:s,maxDate:a,__preventFocus:f,__stopPropagation:j,nextIcon:m,previousIcon:v,nextLabel:p,previousLabel:h,onNext:y,onPrevious:w,nextDisabled:b,previousDisabled:C,getYearControlProps:c,__staticSelector:k||"DecadeLevelGroup",classNames:D,styles:S,unstyled:$,withCellSpacing:d},E)});return g.jsx(vt,{classNames:D,styles:S,__staticSelector:k||"DecadeLevelGroup",ref:t,size:z,unstyled:$,...A,children:N})});xn.classes={...vt.classes,...gn.classes};xn.displayName="@mantine/dates/DecadeLevelGroup";const Iv={numberOfColumns:1},wn=re((e,t)=>{const r=q("YearLevelGroup",Iv,e),{year:n,locale:o,minDate:s,maxDate:a,monthsListFormat:i,getMonthControlProps:c,__onControlClick:l,__onControlMouseEnter:u,withCellSpacing:d,__preventFocus:f,nextIcon:m,previousIcon:v,nextLabel:p,previousLabel:h,onNext:y,onPrevious:w,onLevelClick:b,nextDisabled:C,previousDisabled:D,hasNextLevel:S,classNames:$,styles:k,unstyled:j,__staticSelector:M,__stopPropagation:L,numberOfColumns:V,levelControlAriaLabel:z,yearLabelFormat:P,size:A,vars:_,...N}=r,T=x.useRef([]),E=Array(V).fill(0).map((R,O)=>{const I=U(n).add(O,"years").toDate();return g.jsx(yn,{size:A,monthsListFormat:i,year:I,withNext:O===V-1,withPrevious:O===0,yearLabelFormat:P,__stopPropagation:L,__onControlClick:l,__onControlMouseEnter:u,__onControlKeyDown:(B,K)=>os({levelIndex:O,rowIndex:K.rowIndex,cellIndex:K.cellIndex,event:B,controlsRef:T}),__getControlRef:(B,K,F)=>{Array.isArray(T.current[O])||(T.current[O]=[]),Array.isArray(T.current[O][B])||(T.current[O][B]=[]),T.current[O][B][K]=F},levelControlAriaLabel:typeof z=="function"?z(I):z,locale:o,minDate:s,maxDate:a,__preventFocus:f,nextIcon:m,previousIcon:v,nextLabel:p,previousLabel:h,onNext:y,onPrevious:w,onLevelClick:b,nextDisabled:C,previousDisabled:D,hasNextLevel:S,getMonthControlProps:c,classNames:$,styles:k,unstyled:j,__staticSelector:M||"YearLevelGroup",withCellSpacing:d},O)});return g.jsx(vt,{classNames:$,styles:k,__staticSelector:M||"YearLevelGroup",ref:t,size:A,unstyled:j,...N,children:E})});wn.classes={...yn.classes,...vt.classes};wn.displayName="@mantine/dates/YearLevelGroup";const Fv={numberOfColumns:1},Sn=re((e,t)=>{const r=q("MonthLevelGroup",Fv,e),{month:n,locale:o,firstDayOfWeek:s,weekdayFormat:a,weekendDays:i,getDayProps:c,excludeDate:l,minDate:u,maxDate:d,renderDay:f,hideOutsideDates:m,hideWeekdays:v,getDayAriaLabel:p,__onDayClick:h,__onDayMouseEnter:y,withCellSpacing:w,highlightToday:b,withWeekNumbers:C,__preventFocus:D,nextIcon:S,previousIcon:$,nextLabel:k,previousLabel:j,onNext:M,onPrevious:L,onLevelClick:V,nextDisabled:z,previousDisabled:P,hasNextLevel:A,classNames:_,styles:N,unstyled:T,numberOfColumns:E,levelControlAriaLabel:R,monthLabelFormat:O,__staticSelector:I,__stopPropagation:B,size:K,static:F,vars:Q,...ee}=r,Z=x.useRef([]),Y=Array(E).fill(0).map((ie,ne)=>{const fe=U(n).add(ne,"months").toDate();return g.jsx(bn,{month:fe,withNext:ne===E-1,withPrevious:ne===0,monthLabelFormat:O,__stopPropagation:B,__onDayClick:h,__onDayMouseEnter:y,__onDayKeyDown:(X,ue)=>os({levelIndex:ne,rowIndex:ue.rowIndex,cellIndex:ue.cellIndex,event:X,controlsRef:Z}),__getDayRef:(X,ue,le)=>{Array.isArray(Z.current[ne])||(Z.current[ne]=[]),Array.isArray(Z.current[ne][X])||(Z.current[ne][X]=[]),Z.current[ne][X][ue]=le},levelControlAriaLabel:typeof R=="function"?R(fe):R,locale:o,firstDayOfWeek:s,weekdayFormat:a,weekendDays:i,getDayProps:c,excludeDate:l,minDate:u,maxDate:d,renderDay:f,hideOutsideDates:m,hideWeekdays:v,getDayAriaLabel:p,__preventFocus:D,nextIcon:S,previousIcon:$,nextLabel:k,previousLabel:j,onNext:M,onPrevious:L,onLevelClick:V,nextDisabled:z,previousDisabled:P,hasNextLevel:A,classNames:_,styles:N,unstyled:T,__staticSelector:I||"MonthLevelGroup",size:K,static:F,withCellSpacing:w,highlightToday:b,withWeekNumbers:C},ne)});return g.jsx(vt,{classNames:_,styles:N,__staticSelector:I||"MonthLevelGroup",ref:t,size:K,...ee,children:Y})});Sn.classes={...vt.classes,...bn.classes};Sn.displayName="@mantine/dates/MonthLevelGroup";var $c={input:"m_6fa5e2aa"};const Vv={},Cn=re((e,t)=>{const{inputProps:r,wrapperProps:n,placeholder:o,classNames:s,styles:a,unstyled:i,popoverProps:c,modalProps:l,dropdownType:u,children:d,formattedValue:f,dropdownHandlers:m,dropdownOpened:v,onClick:p,clearable:h,onClear:y,clearButtonProps:w,rightSection:b,shouldClear:C,readOnly:D,disabled:S,value:$,name:k,form:j,type:M,...L}=jo("PickerInputBase",Vv,e),V=g.jsx(Se.ClearButton,{onClick:y,unstyled:i,...w}),z=()=>{M==="range"&&Array.isArray($)&&$[0]&&!$[1]&&y(),m.close()};return g.jsxs(g.Fragment,{children:[u==="modal"&&!D&&g.jsx(Ze,{opened:v,onClose:z,withCloseButton:!1,size:"auto","data-dates-modal":!0,unstyled:i,...l,children:d}),g.jsx(Se.Wrapper,{...n,children:g.jsxs(Me,{position:"bottom-start",opened:v,trapFocus:!0,returnFocus:!1,unstyled:i,...c,disabled:(c==null?void 0:c.disabled)||u==="modal"||D,onChange:P=>{var A;P||((A=c==null?void 0:c.onClose)==null||A.call(c),z())},children:[g.jsx(Me.Target,{children:g.jsx(Se,{"data-dates-input":!0,"data-read-only":D||void 0,disabled:S,component:"button",type:"button",multiline:!0,onClick:P=>{p==null||p(P),m.toggle()},__clearSection:V,__clearable:h&&C&&!D&&!S,rightSection:b,...r,ref:t,classNames:{...s,input:Te($c.input,s==null?void 0:s.input)},...L,children:f||g.jsx(Se.Placeholder,{error:r.error,unstyled:i,className:s==null?void 0:s.placeholder,style:a==null?void 0:a.placeholder,children:o})})}),g.jsx(Me.Dropdown,{"data-dates-dropdown":!0,children:d})]})}),g.jsx(ss,{value:$,name:k,form:j,type:M})]})});Cn.classes=$c;Cn.displayName="@mantine/dates/PickerInputBase";const va=e=>e==="range"?[null,null]:e==="multiple"?[]:null;function lr({type:e,value:t,defaultValue:r,onChange:n,applyTimezone:o=!0}){const s=x.useRef(e),a=Fe(),[i,c,l]=st({value:et("add",t,a.getTimezone(),!o),defaultValue:et("add",r,a.getTimezone(),!o),finalValue:va(e),onChange:d=>{n==null||n(et("remove",d,a.getTimezone(),!o))}});let u=i;if(s.current!==e){if(s.current=e,t===void 0)u=r!==void 0?r:va(e),c(u);else if(process.env.NODE_ENV==="development")switch(e){case"default":t!==null&&typeof t!="string"&&console.error("[@mantine/dates/use-uncontrolled-dates] Value must be type of `null` or `string`");break;case"multiple":t instanceof Array||console.error("[@mantine/dates/use-uncontrolled-dates] Value must be type of `string[]`");break;case"range":(!(t instanceof Array)||t.length!==2)&&console.error("[@mantine/dates/use-uncontrolled-dates] Value must be type of `[string, string]`");break}}return[u,c,l]}function In(e,t){return e?e==="month"?0:e==="year"?1:2:t||0}function zv(e){return e===0?"month":e===1?"year":"decade"}function nr(e,t,r){return zv(or(In(e,0),In(t,0),In(r,2)))}const Bv={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0},Xt=re((e,t)=>{const r=q("Calendar",Bv,e),{vars:n,maxLevel:o,minLevel:s,defaultLevel:a,level:i,onLevelChange:c,date:l,defaultDate:u,onDateChange:d,numberOfColumns:f,columnsToScroll:m,ariaLabels:v,nextLabel:p,previousLabel:h,onYearSelect:y,onMonthSelect:w,onYearMouseEnter:b,onMonthMouseEnter:C,__updateDateOnYearSelect:D,__updateDateOnMonthSelect:S,firstDayOfWeek:$,weekdayFormat:k,weekendDays:j,getDayProps:M,excludeDate:L,renderDay:V,hideOutsideDates:z,hideWeekdays:P,getDayAriaLabel:A,monthLabelFormat:_,nextIcon:N,previousIcon:T,__onDayClick:E,__onDayMouseEnter:R,withCellSpacing:O,highlightToday:I,withWeekNumbers:B,monthsListFormat:K,getMonthControlProps:F,yearLabelFormat:Q,yearsListFormat:ee,getYearControlProps:Z,decadeLabelFormat:Y,classNames:ie,styles:ne,unstyled:fe,minDate:X,maxDate:ue,locale:le,__staticSelector:he,size:G,__preventFocus:J,__stopPropagation:te,onNextDecade:ce,onPreviousDecade:pe,onNextYear:oe,onPreviousYear:de,onNextMonth:W,onPreviousMonth:se,static:ve,__timezoneApplied:De,...xe}=r,{resolvedClassNames:_e,resolvedStyles:Ee}=lt({classNames:ie,styles:ne,props:r}),[we,Dt]=st({value:i?nr(i,s,o):void 0,defaultValue:a?nr(a,s,o):void 0,finalValue:nr(void 0,s,o),onChange:c}),[yr,Ce]=lr({type:"default",value:l,defaultValue:u,onChange:d,applyTimezone:!De}),Ve={__staticSelector:he||"Calendar",styles:Ee,classNames:_e,unstyled:fe,size:G},Kt=Fe(),_t=m||f||1,ds=new Date,Mc=X&&X>ds?X:ds,nt=yr||et("add",Mc,Kt.getTimezone()),Pc=()=>{const Ne=U(nt).add(_t,"month").toDate();W==null||W(Ne),Ce(Ne)},Lc=()=>{const Ne=U(nt).subtract(_t,"month").toDate();se==null||se(Ne),Ce(Ne)},Ic=()=>{const Ne=U(nt).add(_t,"year").toDate();oe==null||oe(Ne),Ce(Ne)},Fc=()=>{const Ne=U(nt).subtract(_t,"year").toDate();de==null||de(Ne),Ce(Ne)},Vc=()=>{const Ne=U(nt).add(10*_t,"year").toDate();ce==null||ce(Ne),Ce(Ne)},zc=()=>{const Ne=U(nt).subtract(10*_t,"year").toDate();pe==null||pe(Ne),Ce(Ne)};return g.jsxs(ae,{ref:t,size:G,"data-calendar":!0,...xe,children:[we==="month"&&g.jsx(Sn,{month:nt,minDate:X,maxDate:ue,firstDayOfWeek:$,weekdayFormat:k,weekendDays:j,getDayProps:M,excludeDate:L,renderDay:V,hideOutsideDates:z,hideWeekdays:P,getDayAriaLabel:A,onNext:Pc,onPrevious:Lc,hasNextLevel:o!=="month",onLevelClick:()=>Dt("year"),numberOfColumns:f,locale:le,levelControlAriaLabel:v==null?void 0:v.monthLevelControl,nextLabel:(v==null?void 0:v.nextMonth)??p,nextIcon:N,previousLabel:(v==null?void 0:v.previousMonth)??h,previousIcon:T,monthLabelFormat:_,__onDayClick:E,__onDayMouseEnter:R,__preventFocus:J,__stopPropagation:te,static:ve,withCellSpacing:O,highlightToday:I,withWeekNumbers:B,...Ve}),we==="year"&&g.jsx(wn,{year:nt,numberOfColumns:f,minDate:X,maxDate:ue,monthsListFormat:K,getMonthControlProps:F,locale:le,onNext:Ic,onPrevious:Fc,hasNextLevel:o!=="month"&&o!=="year",onLevelClick:()=>Dt("decade"),levelControlAriaLabel:v==null?void 0:v.yearLevelControl,nextLabel:(v==null?void 0:v.nextYear)??p,nextIcon:N,previousLabel:(v==null?void 0:v.previousYear)??h,previousIcon:T,yearLabelFormat:Q,__onControlMouseEnter:C,__onControlClick:(Ne,Zt)=>{S&&Ce(Zt),Dt(nr("month",s,o)),w==null||w(Zt)},__preventFocus:J,__stopPropagation:te,withCellSpacing:O,...Ve}),we==="decade"&&g.jsx(xn,{decade:nt,minDate:X,maxDate:ue,yearsListFormat:ee,getYearControlProps:Z,locale:le,onNext:Vc,onPrevious:zc,numberOfColumns:f,nextLabel:(v==null?void 0:v.nextDecade)??p,nextIcon:N,previousLabel:(v==null?void 0:v.previousDecade)??h,previousIcon:T,decadeLabelFormat:Y,__onControlMouseEnter:b,__onControlClick:(Ne,Zt)=>{D&&Ce(Zt),Dt(nr("year",s,o)),y==null||y(Zt)},__preventFocus:J,__stopPropagation:te,withCellSpacing:O,...Ve})]})});Xt.classes={...xn.classes,...wn.classes,...Sn.classes};Xt.displayName="@mantine/dates/Calendar";function Oc(e){const{maxLevel:t,minLevel:r,defaultLevel:n,level:o,onLevelChange:s,nextIcon:a,previousIcon:i,date:c,defaultDate:l,onDateChange:u,numberOfColumns:d,columnsToScroll:f,ariaLabels:m,nextLabel:v,previousLabel:p,onYearSelect:h,onMonthSelect:y,onYearMouseEnter:w,onMonthMouseEnter:b,onNextMonth:C,onPreviousMonth:D,onNextYear:S,onPreviousYear:$,onNextDecade:k,onPreviousDecade:j,withCellSpacing:M,highlightToday:L,__updateDateOnYearSelect:V,__updateDateOnMonthSelect:z,withWeekNumbers:P,firstDayOfWeek:A,weekdayFormat:_,weekendDays:N,getDayProps:T,excludeDate:E,renderDay:R,hideOutsideDates:O,hideWeekdays:I,getDayAriaLabel:B,monthLabelFormat:K,monthsListFormat:F,getMonthControlProps:Q,yearLabelFormat:ee,yearsListFormat:Z,getYearControlProps:Y,decadeLabelFormat:ie,allowSingleDateInRange:ne,allowDeselect:fe,minDate:X,maxDate:ue,locale:le,...he}=e;return{calendarProps:{maxLevel:t,minLevel:r,defaultLevel:n,level:o,onLevelChange:s,nextIcon:a,previousIcon:i,date:c,defaultDate:l,onDateChange:u,numberOfColumns:d,columnsToScroll:f,ariaLabels:m,nextLabel:v,previousLabel:p,onYearSelect:h,onMonthSelect:y,onYearMouseEnter:w,onMonthMouseEnter:b,onNextMonth:C,onPreviousMonth:D,onNextYear:S,onPreviousYear:$,onNextDecade:k,onPreviousDecade:j,withCellSpacing:M,highlightToday:L,__updateDateOnYearSelect:V,__updateDateOnMonthSelect:z,withWeekNumbers:P,firstDayOfWeek:A,weekdayFormat:_,weekendDays:N,getDayProps:T,excludeDate:E,renderDay:R,hideOutsideDates:O,hideWeekdays:I,getDayAriaLabel:B,monthLabelFormat:K,monthsListFormat:F,getMonthControlProps:Q,yearLabelFormat:ee,yearsListFormat:Z,getYearControlProps:Y,decadeLabelFormat:ie,allowSingleDateInRange:ne,allowDeselect:fe,minDate:X,maxDate:ue,locale:le},others:he}}function ga(e,t){const r=[...t].sort((n,o)=>n.getTime()-o.getTime());return U(r[0]).startOf("day").subtract(1,"ms").isBefore(e)&&U(r[1]).endOf("day").add(1,"ms").isAfter(e)}function Wv({type:e,level:t,value:r,defaultValue:n,onChange:o,allowSingleDateInRange:s,allowDeselect:a,onMouseLeave:i,applyTimezone:c=!0}){const[l,u]=lr({type:e,value:r,defaultValue:n,onChange:o,applyTimezone:c}),[d,f]=x.useState(e==="range"&&l[0]&&!l[1]?l[0]:null),[m,v]=x.useState(null),p=S=>{if(e==="range"){if(d instanceof Date&&!l[1]){if(U(S).isSame(d,t)&&!s){f(null),v(null),u([null,null]);return}const $=[S,d];$.sort((k,j)=>k.getTime()-j.getTime()),u($),v(null),f(null);return}if(l[0]&&!l[1]&&U(S).isSame(l[0],t)&&!s){f(null),v(null),u([null,null]);return}u([S,null]),v(null),f(S);return}if(e==="multiple"){l.some($=>U($).isSame(S,t))?u(l.filter($=>!U($).isSame(S,t))):u([...l,S]);return}l&&a&&U(S).isSame(l,t)?u(null):u(S)},h=S=>d instanceof Date&&m instanceof Date?ga(S,[m,d]):l[0]instanceof Date&&l[1]instanceof Date?ga(S,l):!1,y=e==="range"?S=>{i==null||i(S),v(null)}:i,w=S=>l[0]instanceof Date&&U(S).isSame(l[0],t)?!(m&&U(m).isBefore(l[0])):!1,b=S=>l[1]instanceof Date?U(S).isSame(l[1],t):!(l[0]instanceof Date)||!m?!1:U(m).isBefore(l[0])&&U(S).isSame(l[0],t),C=S=>{if(e==="range")return{selected:l.some(k=>k&&U(k).isSame(S,t)),inRange:h(S),firstInRange:w(S),lastInRange:b(S),"data-autofocus":!!l[0]&&U(l[0]).isSame(S,t)||void 0};if(e==="multiple")return{selected:l.some(k=>k&&U(k).isSame(S,t)),"data-autofocus":!!l[0]&&U(l[0]).isSame(S,t)||void 0};const $=U(l).isSame(S,t);return{selected:$,"data-autofocus":$||void 0}},D=e==="range"&&d?v:()=>{};return x.useEffect(()=>{if(e==="range")if(l[0]&&!l[1]&&(d==null?void 0:d.getTime())!==l[0].getTime())f(l[0]);else{const S=l[0]==null&&l[1]==null,$=l[0]!=null&&l[1]!=null;(S||$)&&(f(null),v(null))}},[l]),{onDateChange:p,onRootMouseLeave:y,onHoveredDateChange:D,getControlProps:C,_value:l,setValue:u}}const Yv={type:"default",defaultLevel:"month",numberOfColumns:1},Dn=re((e,t)=>{const r=q("DatePicker",Yv,e),{classNames:n,styles:o,vars:s,type:a,defaultValue:i,value:c,onChange:l,__staticSelector:u,getDayProps:d,allowSingleDateInRange:f,allowDeselect:m,onMouseLeave:v,numberOfColumns:p,hideOutsideDates:h,__onDayMouseEnter:y,__onDayClick:w,__timezoneApplied:b,...C}=r,{onDateChange:D,onRootMouseLeave:S,onHoveredDateChange:$,getControlProps:k}=Wv({type:a,level:"day",allowDeselect:m,allowSingleDateInRange:f,value:c,defaultValue:i,onChange:l,onMouseLeave:v,applyTimezone:!b}),{resolvedClassNames:j,resolvedStyles:M}=lt({classNames:n,styles:o,props:r}),L=Fe();return g.jsx(Xt,{ref:t,minLevel:"month",classNames:j,styles:M,__staticSelector:u||"DatePicker",onMouseLeave:S,numberOfColumns:p,hideOutsideDates:h??p!==1,__onDayMouseEnter:(V,z)=>{$(z),y==null||y(V,z)},__onDayClick:(V,z)=>{D(z),w==null||w(V,z)},getDayProps:V=>({...k(V),...d==null?void 0:d(V)}),...C,date:et("add",C.date,L.getTimezone(),b),__timezoneApplied:!0})});Dn.classes=Xt.classes;Dn.displayName="@mantine/dates/DatePicker";function Hv(e,t){if(e===null)return null;const r=et("add",new Date(e),t);return Number.isNaN(r.getTime())||!e?null:r}function Uv({date:e,maxDate:t,minDate:r}){return!(e==null||Number.isNaN(e.getTime())||t&&U(e).isAfter(t,"date")||r&&U(e).isBefore(r,"date"))}const Gv={valueFormat:"MMMM D, YYYY",fixOnBlur:!0,preserveTime:!0},cs=re((e,t)=>{const r=jo("DateInput",Gv,e),{inputProps:n,wrapperProps:o,value:s,defaultValue:a,onChange:i,clearable:c,clearButtonProps:l,popoverProps:u,getDayProps:d,locale:f,valueFormat:m,dateParser:v,minDate:p,maxDate:h,fixOnBlur:y,onFocus:w,onBlur:b,onClick:C,readOnly:D,name:S,form:$,rightSection:k,unstyled:j,classNames:M,styles:L,allowDeselect:V,preserveTime:z,date:P,defaultDate:A,onDateChange:_,...N}=r,T=x.useRef(null),E=x.useRef(null),[R,O]=x.useState(!1),{calendarProps:I,others:B}=Oc(N),K=Fe(),Q=v||(oe=>{const de=U(oe,m,K.getLocale(f)).toDate();return Number.isNaN(de.getTime())?Hv(oe,K.getTimezone()):de}),ee=V!==void 0?V:c,Z=oe=>oe?U(oe).locale(K.getLocale(f)).format(m):"",[Y,ie,ne]=lr({type:"default",value:s,defaultValue:a,onChange:i}),[fe,X]=lr({type:"default",value:P,defaultValue:a||A,onChange:_});x.useEffect(()=>{ne&&s!==null&&X(s)},[ne,s]);const[ue,le]=x.useState(Z(Y));x.useEffect(()=>{le(Z(Y))},[K.getLocale(f)]);const he=oe=>{const de=oe.currentTarget.value;if(le(de),O(!0),de.trim()===""&&c)ie(null);else{const W=Q(de);Uv({date:W,minDate:p,maxDate:h})&&(ie(W),X(W))}},G=oe=>{b==null||b(oe),O(!1),y&&le(Z(Y))},J=oe=>{w==null||w(oe),O(!0)},te=oe=>{C==null||C(oe),O(!0)},ce=oe=>({...d==null?void 0:d(oe),selected:U(Y).isSame(oe,"day"),onClick:de=>{var ve,De;(De=d==null?void 0:(ve=d(oe)).onClick)==null||De.call(ve,de);const W=z?so(Y,oe):oe,se=c&&ee&&U(Y).isSame(oe,"day")?null:W;ie(se),!ne&&le(Z(se)),O(!1)}}),pe=k||(c&&Y&&!D?g.jsx(vr,{variant:"transparent",onMouseDown:oe=>oe.preventDefault(),tabIndex:-1,onClick:()=>{ie(null),!ne&&le(""),O(!1)},unstyled:j,size:n.size||"sm",...l}):null);return ot(()=>{Y!==void 0&&!R&&le(Z(Y))},[Y]),xa(()=>O(!1),void 0,[T.current,E.current]),g.jsxs(g.Fragment,{children:[g.jsx(Se.Wrapper,{...o,__staticSelector:"DateInput",ref:T,children:g.jsxs(Me,{opened:R,trapFocus:!1,position:"bottom-start",disabled:D,withRoles:!1,unstyled:j,...u,children:[g.jsx(Me.Target,{children:g.jsx(Se,{"data-dates-input":!0,"data-read-only":D||void 0,autoComplete:"off",ref:t,value:ue,onChange:he,onBlur:G,onFocus:J,onClick:te,readOnly:D,rightSection:pe,...n,...B,__staticSelector:"DateInput"})}),g.jsx(Me.Dropdown,{onMouseDown:oe=>oe.preventDefault(),"data-dates-dropdown":!0,ref:E,children:g.jsx(Xt,{__staticSelector:"DateInput",__timezoneApplied:!0,...I,classNames:M,styles:L,unstyled:j,__preventFocus:!0,minDate:p,maxDate:h,locale:f,getDayProps:ce,size:n.size,date:fe,onDateChange:X})})]})}),g.jsx(ss,{name:S,form:$,value:Y,type:"default"})]})});cs.classes={...Se.classes,...Xt.classes};cs.displayName="@mantine/dates/DateInput";var Ac={timeWrapper:"m_208d2562",timeInput:"m_62ee059"};const qv={dropdownType:"popover"},ls=re((e,t)=>{const r=q("DateTimePicker",qv,e),{value:n,defaultValue:o,onChange:s,valueFormat:a,locale:i,classNames:c,styles:l,unstyled:u,timeInputProps:d,submitButtonProps:f,withSeconds:m,level:v,defaultLevel:p,size:h,variant:y,dropdownType:w,vars:b,minDate:C,maxDate:D,...S}=r,$=me({name:"DateTimePicker",classes:Ac,props:r,classNames:c,styles:l,unstyled:u,vars:b}),{resolvedClassNames:k,resolvedStyles:j}=lt({classNames:c,styles:l,props:r}),M=a||(m?"DD/MM/YYYY HH:mm:ss":"DD/MM/YYYY HH:mm"),L=x.useRef(null),V=Le(L,d==null?void 0:d.ref),{calendarProps:{allowSingleDateInRange:z,...P},others:A}=Oc(S),_=Fe(),[N,T]=lr({type:"default",value:n,defaultValue:o,onChange:s}),E=X=>X?U(X).format(m?"HH:mm:ss":"HH:mm"):"",[R,O]=x.useState(E(N)),[I,B]=x.useState(v||p||"month"),[K,F]=Rl(!1),Q=N?U(N).locale(_.getLocale(i)).tz(_.getTimezone(),!0).format(M):"",ee=X=>{var le;(le=d==null?void 0:d.onChange)==null||le.call(d,X);const ue=X.currentTarget.value;if(O(ue),ue){const[he,G,J]=ue.split(":").map(Number),te=et("add",new Date,_.getTimezone());te.setHours(he),te.setMinutes(G),te.setSeconds(J||0),te.setMilliseconds(0),T(so(te,N||et("add",new Date,_.getTimezone())))}},Z=X=>{var ue;X&&T(so(N,X)),(ue=L.current)==null||ue.focus()},Y=X=>{var ue;(ue=d==null?void 0:d.onKeyDown)==null||ue.call(d,X),X.key==="Enter"&&(X.preventDefault(),F.close())};ot(()=>{K||O(E(N))},[N,K]),ot(()=>{K&&B("month")},[K]);const ie=C?U(C).format("HH:mm:ss"):null,ne=D?U(D).format("HH:mm:ss"):null,fe=w==="popover";return g.jsxs(Cn,{formattedValue:Q,dropdownOpened:S.disabled?!1:K,dropdownHandlers:F,classNames:k,styles:j,unstyled:u,ref:t,onClear:()=>T(null),shouldClear:!!N,value:N,size:h,variant:y,dropdownType:w,...A,type:"default",__staticSelector:"DateTimePicker",children:[g.jsx(Dn,{...P,maxDate:D,minDate:C,size:h,variant:y,type:"default",value:N,defaultDate:N,onChange:Z,locale:i,classNames:k,styles:j,unstyled:u,__staticSelector:"DateTimePicker",__stopPropagation:fe,level:v,defaultLevel:p,onLevelChange:X=>{var ue;B(X),(ue=P.onLevelChange)==null||ue.call(P,X)},__timezoneApplied:!0}),I==="month"&&g.jsxs("div",{...$("timeWrapper"),children:[g.jsx(fn,{value:R,withSeconds:m,ref:V,unstyled:u,minTime:N&&C&&N.toDateString()===C.toDateString()?ie??void 0:void 0,maxTime:N&&D&&N.toDateString()===D.toDateString()?ne??void 0:void 0,...d,...$("timeInput",{className:d==null?void 0:d.className,style:d==null?void 0:d.style}),onChange:ee,onKeyDown:Y,size:h,"data-mantine-stop-propagation":fe||void 0}),g.jsx(Ht,{variant:"default",size:`input-${h||"sm"}`,...$("submitButton",{className:f==null?void 0:f.className,style:f==null?void 0:f.style}),unstyled:u,"data-mantine-stop-propagation":fe||void 0,children:g.jsx(Go,{size:"30%"}),...f,onClick:X=>{var ue;(ue=f==null?void 0:f.onClick)==null||ue.call(f,X),F.close()}})]})]})});ls.classes={...Ac,...Cn.classes,...Dn.classes};ls.displayName="@mantine/dates/DateTimePicker";U.extend(hc);const Xv=e=>{const{name:t,onChange:r,value:n,readOnly:o}=e;return g.jsx(cs,{name:t,onChange:s=>r(t,s),value:n,readOnly:o,valueFormat:"YYYY-MM-DD",clearable:!0})};U.extend(hc);const Kv=e=>{const{name:t,onChange:r,value:n,readOnly:o}=e;return g.jsx(ls,{name:t,onChange:s=>r(t,s),value:n,readOnly:o,valueFormat:"YYYY-MM-DD HH:mm:ss",clearable:!0})},Zv=e=>{const{name:t,onChange:r,value:n,readOnly:o}=e;return g.jsx(ts,{name:t,onChange:s=>r(t,s),value:n,readOnly:o})},Jv=e=>{const{fields:t,name:r,onChange:n,value:o,formValues:s,error:a={},readOnly:i}=e,c=(u,d)=>{n(`${r}.${u}`,d)};return t.map((u,d)=>g.jsx(us,{field:u,formValues:s,onChange:c,value:o[u.name],error:a[u.name],readOnly:i},d))},Qv=e=>{const{data:t,name:r,onChange:n,value:o,readOnly:s}=e;return g.jsx(rs,{name:r,data:t,value:o,onChange:a=>n(r,a),readOnly:s,clearable:!0})},eg=e=>{const{name:t,onChange:r,value:n,readOnly:o}=e;return g.jsx(Qo,{name:t,onChange:s=>r(t,s.target.value),value:n,readOnly:o,styles:{input:{height:200}}})},tg=e=>{const{name:t,onChange:r,value:n,readOnly:o}=e;return g.jsx(ns,{name:t,onChange:s=>r(t,s.target.value),value:n,readOnly:o})},rg=e=>{const{name:t,onChange:r,value:n,readOnly:o}=e,s=x.useRef(null),a=g.jsx(Ht,{variant:"subtle",color:"gray",onClick:()=>{var i;return(i=s.current)==null?void 0:i.showPicker()},children:"🕛"});return g.jsx(fn,{name:t,onChange:i=>r(t,i.target.value),value:n,readOnly:o,ref:s,rightSection:a,withSeconds:!0})};function ng(e,t,r){return{addElement:n=>{t(e,[...r,n])},replaceElement:(n,o)=>{const s=r.map((a,i)=>i===n?o:a);t(e,s)},removeElement:n=>{t(e,r.filter((o,s)=>s!==n))}}}const us=({field:e,value:t,error:r,onChange:n,formValues:o,fieldContainer:s=c=>g.jsx(g.Fragment,{children:c}),customRender:a,readOnly:i})=>{const c=x.useMemo(()=>typeof e.visible=="function"?e.visible(o):e.visible!==!1,[e.visible,o]),l=x.useMemo(()=>typeof e.disabled=="function"?e.disabled(o):e.disabled===!0,[e.disabled,o]),u=x.useMemo(()=>{if(e.type==="array")return ng(e.name,n,t)},[e.type,e.name,n,t]),d=x.useMemo(()=>a==null?void 0:a(e,t,r,n,o,u,i||e.readOnly),[a,e,t,r,n,o,u,i,e.readOnly]);if(!c)return null;if(d)return d;const f=()=>{switch(e.type){case"text":return g.jsx(tg,{name:e.name,value:t,onChange:n,readOnly:i});case"number":return g.jsx(Zv,{name:e.name,value:t,onChange:n,readOnly:i});case"object":return g.jsx(Jv,{name:e.name,onChange:n,value:t,fields:e.fields??[],formValues:o,error:r,readOnly:i});case"array":return g.jsx(Ph,{name:e.name,onChange:n,value:t,fields:e.fields,options:u,error:r,readOnly:i});case"check":return g.jsx(Lh,{name:e.name,value:t,onChange:n,readOnly:i,label:e.label});case"select":return g.jsx(Qv,{name:e.name,value:t,onChange:n,readOnly:i,data:e.data});case"textarea":return g.jsx(eg,{name:e.name,value:t,onChange:n,readOnly:i});case"date":return g.jsx(Xv,{name:e.name,value:t,onChange:n,readOnly:i});case"datetime":return g.jsx(Kv,{name:e.name,value:t,onChange:n,readOnly:i});case"time":return g.jsx(rg,{name:e.name,value:t,onChange:n,readOnly:i});default:return null}},m=g.jsxs(Zo,{legend:e.type==="check"?void 0:e.label,variant:"unstyled",disabled:l||i,styles:{legend:{fontWeight:500}},children:[f(),!["object","array"].includes(e.type)&&typeof r=="string"&&g.jsx(rn,{c:"red",fz:"sm",fw:500,children:r})]});return s(m,e)},[og,ug,sg]=ul(),ag=e=>{switch(e){case"number":return 0;case"array":return[];case"check":return!1;case"object":return{};case"select":case"date":case"datetime":return null;default:return""}},jc=e=>{const t={};for(const r of e)r.type==="object"&&r.fields?t[r.name]=jc(r.fields):t[r.name]=r.initialValue??ag(r.type);return t},ig=e=>e==null||typeof e=="string"&&e.trim()===""||Array.isArray(e)&&e.length===0,ao=(e,t,r="")=>{const n={};for(const o of e){const s=r?`${r}.${o.name}`:o.name,a=t==null?void 0:t[o.name];if(o.type==="object")Object.assign(n,ao(o.fields,a||{},s));else if(o.type==="array"){if(o.required&&(!Array.isArray(a)||a.length===0)){n[s]=o.name+" is required";continue}Array.isArray(a)&&a.forEach((i,c)=>{Object.assign(n,ao(o.fields,i,`${s}.${c}`))})}else o.required&&ig(a)&&(n[s]=o.name+" is required")}return n};function cg(e){const t={};return Object.entries(e).forEach(([r,n])=>{const o=r.split(".");let s=t;o.forEach((a,i)=>{const c=i===o.length-1;o[i+1],c?s[a]=n:(a in s||(s[a]={}),s=s[a])})}),t}const lg=({onSubmit:e,schema:t,container:r,fieldContainer:n,customRender:o,validate:s,readOnly:a,values:i,onFieldChange:c})=>{const l=sg({mode:"uncontrolled",initialValues:jc(t),validate:s}),u=x.useMemo(()=>l.getValues(),[l.getValues()]),d=dr((p,h)=>{if(l.setFieldValue(p,h),c){const y=c(p,h,u);l.setValues(y)}},0),f=x.useCallback((p,h)=>{const y=l.errors;return p==="object"||p==="array"?cg(y)[h]:y[h]},[l.errors]),m=x.useCallback(()=>{const p=l.getValues(),h=ao(t,p);if(Object.keys(h).length>0){l.setErrors(h);return}l.onSubmit(e)()},[l,e,t]);x.useEffect(()=>{i&&l.initialize(i)},[i]);const v=g.jsx(og,{form:l,children:t.map((p,h)=>g.jsx(us,{field:p,formValues:u,value:u[p.name],error:f(p.type,p.name),onChange:d,fieldContainer:n,customRender:o,readOnly:p.readOnly||a},h))});return r(v,m,a)};exports.AutoForm=lg;
30
+ <%s key={someKey} {...props} />`,Ft,Ye,Ur,Ye),Kt[Ye+Ft]=!0}}return c===n?Wr(pe):Pr(pe),pe}}function zr(c,T,$){return Zt(c,T,$,!0)}function Ir(c,T,$){return Zt(c,T,$,!1)}var Hr=Ir,Br=zr;Ke.Fragment=n,Ke.jsx=Hr,Ke.jsxs=Br}()),Ke}var Qt;function Zr(){return Qt||(Qt=1,process.env.NODE_ENV==="production"?ot.exports=Gr():ot.exports=Kr()),ot.exports}var S=Zr();function Jr(e){if(!/^[0-9a-zA-Z-]+$/.test(e))throw new Error(`[@mantine/use-form] Form name "${e}" is invalid, it should contain only letters, numbers and dashes`)}const Xr=typeof window<"u"?x.useLayoutEffect:x.useEffect;function ye(e,t){Xr(()=>{if(e)return window.addEventListener(e,t),()=>window.removeEventListener(e,t)},[e])}function Qr(e,t){e&&Jr(e),ye(`mantine-form:${e}:set-field-value`,r=>t.setFieldValue(r.detail.path,r.detail.value)),ye(`mantine-form:${e}:set-values`,r=>t.setValues(r.detail)),ye(`mantine-form:${e}:set-initial-values`,r=>t.setInitialValues(r.detail)),ye(`mantine-form:${e}:set-errors`,r=>t.setErrors(r.detail)),ye(`mantine-form:${e}:set-field-error`,r=>t.setFieldError(r.detail.path,r.detail.error)),ye(`mantine-form:${e}:clear-field-error`,r=>t.clearFieldError(r.detail)),ye(`mantine-form:${e}:clear-errors`,t.clearErrors),ye(`mantine-form:${e}:reset`,t.reset),ye(`mantine-form:${e}:validate`,t.validate),ye(`mantine-form:${e}:validate-field`,r=>t.validateField(r.detail)),ye(`mantine-form:${e}:reorder-list-item`,r=>t.reorderListItem(r.detail.path,r.detail.payload)),ye(`mantine-form:${e}:remove-list-item`,r=>t.removeListItem(r.detail.path,r.detail.index)),ye(`mantine-form:${e}:insert-list-item`,r=>t.insertListItem(r.detail.path,r.detail.item,r.detail.index)),ye(`mantine-form:${e}:set-dirty`,r=>t.setDirty(r.detail)),ye(`mantine-form:${e}:set-touched`,r=>t.setTouched(r.detail)),ye(`mantine-form:${e}:reset-dirty`,r=>t.resetDirty(r.detail)),ye(`mantine-form:${e}:reset-touched`,t.resetTouched)}function en(e){return t=>{if(!t)e(t);else if(typeof t=="function")e(t);else if(typeof t=="object"&&"nativeEvent"in t){const{currentTarget:r}=t;r instanceof HTMLInputElement?r.type==="checkbox"?e(r.checked):e(r.value):(r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement)&&e(r.value)}else e(t)}}function At(e){return e===null||typeof e!="object"?{}:Object.keys(e).reduce((t,r)=>{const n=e[r];return n!=null&&n!==!1&&(t[r]=n),t},{})}function tn(e){const[t,r]=x.useState(At(e)),n=x.useRef(t),s=x.useCallback(i=>{r(u=>{const f=At(typeof i=="function"?i(u):i);return n.current=f,f})},[]),o=x.useCallback(()=>s({}),[]),a=x.useCallback(i=>{n.current[i]!==void 0&&s(u=>{const f={...u};return delete f[i],f})},[t]),l=x.useCallback((i,u)=>{u==null||u===!1?a(i):n.current[i]!==u&&s(f=>({...f,[i]:u}))},[t]);return{errorsState:t,setErrors:s,clearErrors:o,setFieldError:l,clearFieldError:a}}function Nt(e,t){if(t===null||typeof t!="object")return{};const r={...t};return Object.keys(t).forEach(n=>{n.includes(`${String(e)}.`)&&delete r[n]}),r}function er(e,t){const r=e.substring(t.length+1).split(".")[0];return parseInt(r,10)}function tr(e,t,r,n){if(t===void 0)return r;const s=`${String(e)}`;let o=r;n===-1&&(o=Nt(`${s}.${t}`,o));const a={...o},l=new Set;return Object.entries(o).filter(([i])=>{if(!i.startsWith(`${s}.`))return!1;const u=er(i,s);return Number.isNaN(u)?!1:u>=t}).forEach(([i,u])=>{const f=er(i,s),h=i.replace(`${s}.${f}`,`${s}.${f+n}`);a[h]=u,l.add(h),l.has(i)||delete a[i]}),a}function rn(e,{from:t,to:r},n){const s=`${e}.${t}`,o=`${e}.${r}`,a={...n};return Object.keys(n).every(l=>{let i,u;if(l.startsWith(s)&&(i=l,u=l.replace(s,o)),l.startsWith(o)&&(i=l.replace(o,s),u=l),i&&u){const f=a[i],h=a[u];return h===void 0?delete a[i]:a[i]=h,f===void 0?delete a[u]:a[u]=f,!1}return!0}),a}function rr(e,t,r){typeof r.value=="object"&&(r.value=ze(r.value)),!r.enumerable||r.get||r.set||!r.configurable||!r.writable||t==="__proto__"?Object.defineProperty(e,t,r):e[t]=r.value}function ze(e){if(typeof e!="object")return e;var t=0,r,n,s,o=Object.prototype.toString.call(e);if(o==="[object Object]"?s=Object.create(e.__proto__||null):o==="[object Array]"?s=Array(e.length):o==="[object Set]"?(s=new Set,e.forEach(function(a){s.add(ze(a))})):o==="[object Map]"?(s=new Map,e.forEach(function(a,l){s.set(ze(l),ze(a))})):o==="[object Date]"?s=new Date(+e):o==="[object RegExp]"?s=new RegExp(e.source,e.flags):o==="[object DataView]"?s=new e.constructor(ze(e.buffer)):o==="[object ArrayBuffer]"?s=e.slice(0):o.slice(-6)==="Array]"&&(s=new e.constructor(e)),s){for(n=Object.getOwnPropertySymbols(e);t<n.length;t++)rr(s,n[t],Object.getOwnPropertyDescriptor(e,n[t]));for(t=0,n=Object.getOwnPropertyNames(e);t<n.length;t++)Object.hasOwnProperty.call(s,r=n[t])&&s[r]===e[r]||rr(s,r,Object.getOwnPropertyDescriptor(e,r))}return s||e}function yr(e){return typeof e!="string"?[]:e.split(".")}function ve(e,t){const r=yr(e);if(r.length===0||typeof t!="object"||t===null)return;let n=t[r[0]];for(let s=1;s<r.length&&n!=null;s+=1)n=n[r[s]];return n}function et(e,t,r){const n=yr(e);if(n.length===0)return r;const s=ze(r);if(n.length===1)return s[n[0]]=t,s;let o=s[n[0]];for(let a=1;a<n.length-1;a+=1){if(o===void 0)return s;o=o[n[a]]}return o[n[n.length-1]]=t,s}function nn(e,{from:t,to:r},n){const s=ve(e,n);if(!Array.isArray(s))return n;const o=[...s],a=s[t];return o.splice(t,1),o.splice(r,0,a),et(e,o,n)}function sn(e,t,r,n){const s=ve(e,n);if(!Array.isArray(s))return n;const o=[...s];return o.splice(typeof r=="number"?r:o.length,0,t),et(e,o,n)}function an(e,t,r){const n=ve(e,r);return Array.isArray(n)?et(e,n.filter((s,o)=>o!==t),r):r}function on(e,t,r,n){const s=ve(e,n);if(!Array.isArray(s)||s.length<=r)return n;const o=[...s];return o[r]=t,et(e,o,n)}function ln({$values:e,$errors:t,$status:r}){const n=x.useCallback((l,i)=>{r.clearFieldDirty(l),t.setErrors(u=>rn(l,i,u)),e.setValues({values:nn(l,i,e.refValues.current),updateState:!0})},[]),s=x.useCallback((l,i)=>{r.clearFieldDirty(l),t.setErrors(u=>tr(l,i,u,-1)),e.setValues({values:an(l,i,e.refValues.current),updateState:!0})},[]),o=x.useCallback((l,i,u)=>{r.clearFieldDirty(l),t.setErrors(f=>tr(l,u,f,1)),e.setValues({values:sn(l,i,u,e.refValues.current),updateState:!0})},[]),a=x.useCallback((l,i,u)=>{r.clearFieldDirty(l),e.setValues({values:on(l,u,i,e.refValues.current),updateState:!0})},[]);return{reorderListItem:n,removeListItem:s,insertListItem:o,replaceListItem:a}}var Mt,nr;function cn(){return nr||(nr=1,Mt=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,s,o;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),n=o.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[s]))return!1;for(s=n;s--!==0;){var a=o[s];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}),Mt}var un=cn();const it=Qe(un);function Ze(e,t){const r=Object.keys(e);if(typeof t=="string"){const n=r.filter(s=>s.startsWith(`${t}.`));return e[t]||n.some(s=>e[s])||!1}return r.some(n=>e[n])}function fn({initialDirty:e,initialTouched:t,mode:r,$values:n}){const[s,o]=x.useState(t),[a,l]=x.useState(e),i=x.useRef(t),u=x.useRef(e),f=x.useCallback(v=>{const C=typeof v=="function"?v(i.current):v;i.current=C,r==="controlled"&&o(C)},[]),h=x.useCallback((v,C=!1)=>{const O=typeof v=="function"?v(u.current):v;u.current=O,(r==="controlled"||C)&&l(O)},[]),y=x.useCallback(()=>f({}),[]),w=x.useCallback(v=>{const C=v?{...n.refValues.current,...v}:n.refValues.current;n.setValuesSnapshot(C),h({})},[]),b=x.useCallback((v,C)=>{f(O=>Ze(O,v)===C?O:{...O,[v]:C})},[]),m=x.useCallback((v,C,O)=>{h(F=>Ze(F,v)===C?F:{...F,[v]:C},O)},[]),d=x.useCallback((v,C)=>{const O=Ze(u.current,v),F=!it(ve(v,n.getValuesSnapshot()),C),Y=Nt(v,u.current);Y[v]=F,h(Y,O!==F)},[]),p=x.useCallback(v=>Ze(i.current,v),[]),g=x.useCallback(v=>h(C=>{if(typeof v!="string")return C;const O=Nt(v,C);return delete O[v],it(O,C)?C:O}),[]),D=x.useCallback(v=>{if(v){const O=ve(v,u.current);if(typeof O=="boolean")return O;const F=ve(v,n.refValues.current),Y=ve(v,n.valuesSnapshot.current);return!it(F,Y)}return Object.keys(u.current).length>0?Ze(u.current):!it(n.refValues.current,n.valuesSnapshot.current)},[]),L=x.useCallback(()=>u.current,[]),k=x.useCallback(()=>i.current,[]);return{touchedState:s,dirtyState:a,touchedRef:i,dirtyRef:u,setTouched:f,setDirty:h,resetDirty:w,resetTouched:y,isTouched:p,setFieldTouched:b,setFieldDirty:m,setTouchedState:o,setDirtyState:l,clearFieldDirty:g,isDirty:D,getDirty:L,getTouched:k,setCalculatedFieldDirty:d}}function dn({initialValues:e,onValuesChange:t,mode:r}){const n=x.useRef(!1),[s,o]=x.useState(e||{}),a=x.useRef(s),l=x.useRef(s),i=x.useCallback(({values:m,subscribers:d,updateState:p=!0,mergeWithPreviousValues:g=!0})=>{const D=a.current,L=m instanceof Function?m(a.current):m,k=g?{...D,...L}:L;a.current=k,p&&o(k),t==null||t(k,D),d==null||d.filter(Boolean).forEach(v=>v({updatedValues:k,previousValues:D}))},[t]),u=x.useCallback(m=>{var g;const d=ve(m.path,a.current),p=m.value instanceof Function?m.value(d):m.value;if(d!==p){const D=a.current,L=et(m.path,p,a.current);i({values:L,updateState:m.updateState}),(g=m.subscribers)==null||g.filter(Boolean).forEach(k=>k({path:m.path,updatedValues:L,previousValues:D}))}},[i]),f=x.useCallback(m=>{l.current=m},[]),h=x.useCallback((m,d)=>{n.current||(n.current=!0,i({values:m,updateState:r==="controlled"}),f(m),d())},[i]),y=x.useCallback(()=>{i({values:l.current,updateState:!0,mergeWithPreviousValues:!1})},[i]),w=x.useCallback(()=>a.current,[]),b=x.useCallback(()=>l.current,[]);return{initialized:n,stateValues:s,refValues:a,valuesSnapshot:l,setValues:i,setFieldValue:u,resetValues:y,setValuesSnapshot:f,initialize:h,getValues:w,getValuesSnapshot:b}}function mn({$status:e}){const t=x.useRef({}),r=x.useCallback((s,o)=>{x.useEffect(()=>(t.current[s]=t.current[s]||[],t.current[s].push(o),()=>{t.current[s]=t.current[s].filter(a=>a!==o)}),[o])},[]),n=x.useCallback(s=>t.current[s]?t.current[s].map(o=>a=>o({previousValue:ve(s,a.previousValues),value:ve(s,a.updatedValues),touched:e.isTouched(s),dirty:e.isDirty(s)})):[],[]);return{subscribers:t,watch:r,getFieldSubscribers:n}}function sr(e,t){return e?`${e}-${t.toString()}`:t.toString()}const lt=Symbol("root-rule");function ar(e){const t=At(e);return{hasErrors:Object.keys(t).length>0,errors:t}}function Yt(e,t,r="",n={}){return typeof e!="object"||e===null?n:Object.keys(e).reduce((s,o)=>{const a=e[o],l=`${r===""?"":`${r}.`}${o}`,i=ve(l,t);let u=!1;return typeof a=="function"&&(s[l]=a(i,t,l)),typeof a=="object"&&Array.isArray(i)&&(u=!0,i.forEach((f,h)=>Yt(a,t,`${l}.${h}`,s)),lt in a&&(s[l]=a[lt](i,t,l))),typeof a=="object"&&typeof i=="object"&&i!==null&&(u||Yt(a,t,l,s),lt in a&&(s[l]=a[lt](i,t,l))),s},n)}function Vt(e,t){return ar(typeof e=="function"?e(t):Yt(e,t))}function ct(e,t,r){if(typeof e!="string")return{hasError:!1,error:null};const n=Vt(t,r),s=Object.keys(n.errors).find(o=>e.split(".").every((a,l)=>a===o.split(".")[l]));return{hasError:!!s,error:s?n.errors[s]:null}}const hn="__MANTINE_FORM_INDEX__";function or(e,t){return t?typeof t=="boolean"?t:Array.isArray(t)?t.includes(e.replace(/[.][0-9]+/g,`.${hn}`)):!1:!1}function pn({name:e,mode:t="controlled",initialValues:r,initialErrors:n={},initialDirty:s={},initialTouched:o={},clearInputErrorOnChange:a=!0,validateInputOnChange:l=!1,validateInputOnBlur:i=!1,onValuesChange:u,transformValues:f=m=>m,enhanceGetInputProps:h,validate:y,onSubmitPreventDefault:w="always",touchTrigger:b="change"}={}){const m=tn(n),d=dn({initialValues:r,onValuesChange:u,mode:t}),p=fn({initialDirty:s,initialTouched:o,$values:d,mode:t}),g=ln({$values:d,$errors:m,$status:p}),D=mn({$status:p}),[L,k]=x.useState(0),[v,C]=x.useState({}),[O,F]=x.useState(!1),Y=x.useCallback(()=>{d.resetValues(),m.clearErrors(),p.resetDirty(),p.resetTouched(),t==="uncontrolled"&&k(M=>M+1)},[]),V=x.useCallback(M=>{a&&m.clearErrors(),t==="uncontrolled"&&k(G=>G+1),Object.keys(D.subscribers.current).forEach(G=>{const X=ve(G,d.refValues.current),ee=ve(G,M);X!==ee&&D.getFieldSubscribers(G).forEach(B=>B({previousValues:M,updatedValues:d.refValues.current}))})},[a]),z=x.useCallback(M=>{const G=d.refValues.current;d.initialize(M,()=>t==="uncontrolled"&&k(X=>X+1)),V(G)},[V]),P=x.useCallback((M,G,X)=>{const ee=or(M,l),B=G instanceof Function?G(ve(M,d.refValues.current)):G;p.setCalculatedFieldDirty(M,B),b==="change"&&p.setFieldTouched(M,!0),!ee&&a&&m.clearFieldError(M),d.setFieldValue({path:M,value:G,updateState:t==="controlled",subscribers:[...D.getFieldSubscribers(M),ee?ie=>{const Z=ct(M,y,ie.updatedValues);Z.hasError?m.setFieldError(M,Z.error):m.clearFieldError(M)}:null,(X==null?void 0:X.forceUpdate)!==!1&&t!=="controlled"?()=>C(ie=>({...ie,[M]:(ie[M]||0)+1})):null]})},[u,y]),H=x.useCallback(M=>{const G=d.refValues.current;d.setValues({values:M,updateState:t==="controlled"}),V(G)},[u,V]),I=x.useCallback(()=>{const M=Vt(y,d.refValues.current);return m.setErrors(M.errors),M},[y]),q=x.useCallback(M=>{const G=ct(M,y,d.refValues.current);return G.hasError?m.setFieldError(M,G.error):m.clearFieldError(M),G},[y]),A=(M,{type:G="input",withError:X=!0,withFocus:ee=!0,...B}={})=>{const Z={onChange:en(ue=>P(M,ue,{forceUpdate:!1})),"data-path":sr(e,M)};return X&&(Z.error=m.errorsState[M]),G==="checkbox"?Z[t==="controlled"?"checked":"defaultChecked"]=ve(M,d.refValues.current):Z[t==="controlled"?"value":"defaultValue"]=ve(M,d.refValues.current),ee&&(Z.onFocus=()=>p.setFieldTouched(M,!0),Z.onBlur=()=>{if(or(M,i)){const ue=ct(M,y,d.refValues.current);ue.hasError?m.setFieldError(M,ue.error):m.clearFieldError(M)}}),Object.assign(Z,h==null?void 0:h({inputProps:Z,field:M,options:{type:G,withError:X,withFocus:ee,...B},form:te}))},U=(M,G)=>X=>{w==="always"&&(X==null||X.preventDefault());const ee=I();if(ee.hasErrors)w==="validation-failed"&&(X==null||X.preventDefault()),G==null||G(ee.errors,d.refValues.current,X);else{const B=M==null?void 0:M(f(d.refValues.current),X);B instanceof Promise&&(F(!0),B.finally(()=>F(!1)))}},E=M=>f(M||d.refValues.current),J=x.useCallback(M=>{M.preventDefault(),Y()},[]),j=x.useCallback(M=>M?!ct(M,y,d.refValues.current).hasError:!Vt(y,d.refValues.current).hasErrors,[y]),W=M=>`${L}-${M}-${v[M]||0}`,re=x.useCallback(M=>document.querySelector(`[data-path="${sr(e,M)}"]`),[]),te={watch:D.watch,initialized:d.initialized.current,values:d.stateValues,getValues:d.getValues,getInitialValues:d.getValuesSnapshot,setInitialValues:d.setValuesSnapshot,initialize:z,setValues:H,setFieldValue:P,submitting:O,setSubmitting:F,errors:m.errorsState,setErrors:m.setErrors,setFieldError:m.setFieldError,clearFieldError:m.clearFieldError,clearErrors:m.clearErrors,resetDirty:p.resetDirty,setTouched:p.setTouched,setDirty:p.setDirty,isTouched:p.isTouched,resetTouched:p.resetTouched,isDirty:p.isDirty,getTouched:p.getTouched,getDirty:p.getDirty,reorderListItem:g.reorderListItem,insertListItem:g.insertListItem,removeListItem:g.removeListItem,replaceListItem:g.replaceListItem,reset:Y,validate:I,validateField:q,getInputProps:A,onSubmit:U,onReset:J,isValid:j,getTransformedValues:E,key:W,getInputNode:re};return Qr(e,te),te}function yn(){const e=x.createContext(null);function t({form:n,children:s}){return S.jsx(e.Provider,{value:n,children:s})}function r(){const n=x.useContext(e);if(!n)throw new Error("useFormContext was called outside of FormProvider context");return n}return[t,r,pn]}function vn(e,t,r){return t===void 0&&r===void 0?e:t!==void 0&&r===void 0?Math.max(e,t):Math.min(t===void 0&&r!==void 0?e:Math.max(e,t),r)}function gn(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}const bn=()=>{};function Dn(e,t){const r=t,n=!1,s=gn(e),o=x.useRef(0),a=Object.assign(x.useCallback((...l)=>{window.clearTimeout(o.current);const i=()=>{o.current!==0&&(o.current=0,s(...l))};a.flush=i,o.current=window.setTimeout(i,r)},[s,r]),{flush:bn});return x.useEffect(()=>()=>{window.clearTimeout(o.current)},[a,n]),a}const ir=["mousedown","touchstart"];function _n(e,t,r){const n=x.useRef(null);return x.useEffect(()=>{const s=o=>{const{target:a}=o??{};if(Array.isArray(r)){const l=(a==null?void 0:a.hasAttribute("data-ignore-outside-clicks"))||!document.body.contains(a)&&a.tagName!=="HTML";r.every(u=>!!u&&!o.composedPath().includes(u))&&!l&&e()}else n.current&&!n.current.contains(a)&&e()};return ir.forEach(o=>document.addEventListener(o,s)),()=>{ir.forEach(o=>document.removeEventListener(o,s))}},[n,e,r]),n}function Pt(e,t){const r=x.useRef(!1);x.useEffect(()=>()=>{r.current=!1},[]),x.useEffect(()=>{if(r.current)return e();r.current=!0},t)}function lr(e,t){if(typeof e=="function")return e(t);typeof e=="object"&&e!==null&&"current"in e&&(e.current=t)}function Sn(...e){const t=new Map;return r=>{if(e.forEach(n=>{const s=lr(n,r);s&&t.set(n,s)}),t.size>0)return()=>{e.forEach(n=>{const s=t.get(n);s?s():lr(n,null)}),t.clear()}}}function xn(...e){return x.useCallback(Sn(...e),e)}function vr({value:e,defaultValue:t,finalValue:r,onChange:n=()=>{}}){const[s,o]=x.useState(t!==void 0?t:r),a=(l,...i)=>{o(l),n==null||n(l,...i)};return e!==void 0?[e,n,!0]:[s,a,!1]}function Cn(e=!1,t){const{onOpen:r,onClose:n}={},[s,o]=x.useState(e),a=x.useCallback(()=>{o(u=>u||(r==null||r(),!0))},[r]),l=x.useCallback(()=>{o(u=>u&&(n==null||n(),!1))},[n]),i=x.useCallback(()=>{s?l():a()},[l,a,s]);return[s,{open:a,close:l,toggle:i}]}const wn=e=>{const{fields:t,options:r,value:n,error:s={},name:o,readOnly:a}=e,l=n.map((i,u)=>{const f=(h,y)=>{i[h]=y,r.replaceElement(u,i)};return t.map((h,y)=>S.jsxs(x.Fragment,{children:[S.jsx(Et,{field:h,formValues:i,onChange:f,value:i[h.name],error:h.name in(s[u]??{})?s[u][h.name]:void 0,readOnly:a}),!a&&S.jsx(_.Button,{onClick:()=>r.removeElement(u),children:"Remove"})]},y))});return S.jsxs(S.Fragment,{children:[typeof s=="string"&&S.jsx(_.Text,{c:"red",fz:"sm",fw:500,children:s}),l,!a&&S.jsx(_.Button,{display:"block",onClick:()=>r.addElement({}),children:"Add"})]})},kn=e=>{const{name:t,onChange:r,value:n,readOnly:s,label:o}=e;return S.jsx(_.Checkbox,{name:t,checked:n,readOnly:s,onChange:a=>r(t,a.target.checked),label:o})};var ut={exports:{}},En=ut.exports,cr;function Tn(){return cr||(cr=1,function(e,t){(function(r,n){e.exports=n()})(En,function(){var r={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},n=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,s=/\d/,o=/\d\d/,a=/\d\d?/,l=/\d*[^-_:/,()\s\d]+/,i={},u=function(d){return(d=+d)+(d>68?1900:2e3)},f=function(d){return function(p){this[d]=+p}},h=[/[+-]\d\d:?(\d\d)?|Z/,function(d){(this.zone||(this.zone={})).offset=function(p){if(!p||p==="Z")return 0;var g=p.match(/([+-]|\d\d)/g),D=60*g[1]+(+g[2]||0);return D===0?0:g[0]==="+"?-D:D}(d)}],y=function(d){var p=i[d];return p&&(p.indexOf?p:p.s.concat(p.f))},w=function(d,p){var g,D=i.meridiem;if(D){for(var L=1;L<=24;L+=1)if(d.indexOf(D(L,0,p))>-1){g=L>12;break}}else g=d===(p?"pm":"PM");return g},b={A:[l,function(d){this.afternoon=w(d,!1)}],a:[l,function(d){this.afternoon=w(d,!0)}],Q:[s,function(d){this.month=3*(d-1)+1}],S:[s,function(d){this.milliseconds=100*+d}],SS:[o,function(d){this.milliseconds=10*+d}],SSS:[/\d{3}/,function(d){this.milliseconds=+d}],s:[a,f("seconds")],ss:[a,f("seconds")],m:[a,f("minutes")],mm:[a,f("minutes")],H:[a,f("hours")],h:[a,f("hours")],HH:[a,f("hours")],hh:[a,f("hours")],D:[a,f("day")],DD:[o,f("day")],Do:[l,function(d){var p=i.ordinal,g=d.match(/\d+/);if(this.day=g[0],p)for(var D=1;D<=31;D+=1)p(D).replace(/\[|\]/g,"")===d&&(this.day=D)}],w:[a,f("week")],ww:[o,f("week")],M:[a,f("month")],MM:[o,f("month")],MMM:[l,function(d){var p=y("months"),g=(y("monthsShort")||p.map(function(D){return D.slice(0,3)})).indexOf(d)+1;if(g<1)throw new Error;this.month=g%12||g}],MMMM:[l,function(d){var p=y("months").indexOf(d)+1;if(p<1)throw new Error;this.month=p%12||p}],Y:[/[+-]?\d+/,f("year")],YY:[o,function(d){this.year=u(d)}],YYYY:[/\d{4}/,f("year")],Z:h,ZZ:h};function m(d){var p,g;p=d,g=i&&i.formats;for(var D=(d=p.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(Y,V,z){var P=z&&z.toUpperCase();return V||g[z]||r[z]||g[P].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(H,I,q){return I||q.slice(1)})})).match(n),L=D.length,k=0;k<L;k+=1){var v=D[k],C=b[v],O=C&&C[0],F=C&&C[1];D[k]=F?{regex:O,parser:F}:v.replace(/^\[|\]$/g,"")}return function(Y){for(var V={},z=0,P=0;z<L;z+=1){var H=D[z];if(typeof H=="string")P+=H.length;else{var I=H.regex,q=H.parser,A=Y.slice(P),U=I.exec(A)[0];q.call(V,U),Y=Y.replace(U,"")}}return function(E){var J=E.afternoon;if(J!==void 0){var j=E.hours;J?j<12&&(E.hours+=12):j===12&&(E.hours=0),delete E.afternoon}}(V),V}}return function(d,p,g){g.p.customParseFormat=!0,d&&d.parseTwoDigitYear&&(u=d.parseTwoDigitYear);var D=p.prototype,L=D.parse;D.parse=function(k){var v=k.date,C=k.utc,O=k.args;this.$u=C;var F=O[1];if(typeof F=="string"){var Y=O[2]===!0,V=O[3]===!0,z=Y||V,P=O[2];V&&(P=O[2]),i=this.$locale(),!Y&&P&&(i=g.Ls[P]),this.$d=function(A,U,E,J){try{if(["x","X"].indexOf(U)>-1)return new Date((U==="X"?1e3:1)*A);var j=m(U)(A),W=j.year,re=j.month,te=j.day,M=j.hours,G=j.minutes,X=j.seconds,ee=j.milliseconds,B=j.zone,ie=j.week,Z=new Date,ue=te||(W||re?1:Z.getDate()),N=W||Z.getFullYear(),ne=0;W&&!re||(ne=re>0?re-1:Z.getMonth());var Q,ce=M||0,Ce=G||0,De=X||0,he=ee||0;return B?new Date(Date.UTC(N,ne,ue,ce,Ce,De,he+60*B.offset*1e3)):E?new Date(Date.UTC(N,ne,ue,ce,Ce,De,he)):(Q=new Date(N,ne,ue,ce,Ce,De,he),ie&&(Q=J(Q).week(ie).toDate()),Q)}catch{return new Date("")}}(v,F,C,g),this.init(),P&&P!==!0&&(this.$L=this.locale(P).$L),z&&v!=this.format(F)&&(this.$d=new Date("")),i={}}else if(F instanceof Array)for(var H=F.length,I=1;I<=H;I+=1){O[1]=F[I-1];var q=g.apply(this,O);if(q.isValid()){this.$d=q.$d,this.$L=q.$L,this.init();break}I===H&&(this.$d=new Date(""))}else L.call(this,k)}}})}(ut)),ut.exports}var jn=Tn();const gr=Qe(jn);function On({direction:e,levelIndex:t,rowIndex:r,cellIndex:n,size:s}){switch(e){case"up":return t===0&&r===0?null:r===0?{levelIndex:t-1,rowIndex:n<=s[t-1][s[t-1].length-1]-1?s[t-1].length-1:s[t-1].length-2,cellIndex:n}:{levelIndex:t,rowIndex:r-1,cellIndex:n};case"down":return r===s[t].length-1?{levelIndex:t+1,rowIndex:0,cellIndex:n}:r===s[t].length-2&&n>=s[t][s[t].length-1]?{levelIndex:t+1,rowIndex:0,cellIndex:n}:{levelIndex:t,rowIndex:r+1,cellIndex:n};case"left":return t===0&&r===0&&n===0?null:r===0&&n===0?{levelIndex:t-1,rowIndex:s[t-1].length-1,cellIndex:s[t-1][s[t-1].length-1]-1}:n===0?{levelIndex:t,rowIndex:r-1,cellIndex:s[t][r-1]-1}:{levelIndex:t,rowIndex:r,cellIndex:n-1};case"right":return r===s[t].length-1&&n===s[t][r]-1?{levelIndex:t+1,rowIndex:0,cellIndex:0}:n===s[t][r]-1?{levelIndex:t,rowIndex:r+1,cellIndex:0}:{levelIndex:t,rowIndex:r,cellIndex:n+1};default:return{levelIndex:t,rowIndex:r,cellIndex:n}}}function br({controlsRef:e,direction:t,levelIndex:r,rowIndex:n,cellIndex:s,size:o}){var i,u,f;const a=On({direction:t,size:o,rowIndex:n,cellIndex:s,levelIndex:r});if(!a)return;const l=(f=(u=(i=e.current)==null?void 0:i[a.levelIndex])==null?void 0:u[a.rowIndex])==null?void 0:f[a.cellIndex];l&&(l.disabled||l.getAttribute("data-hidden")||l.getAttribute("data-outside")?br({controlsRef:e,direction:t,levelIndex:a.levelIndex,cellIndex:a.cellIndex,rowIndex:a.rowIndex,size:o}):l.focus())}function Ln(e){switch(e){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function Rn(e){var t;return(t=e.current)==null?void 0:t.map(r=>r.map(n=>n.length))}function It({controlsRef:e,levelIndex:t,rowIndex:r,cellIndex:n,event:s}){const o=Ln(s.key);if(o){s.preventDefault();const a=Rn(e);br({controlsRef:e,direction:o,levelIndex:t,rowIndex:r,cellIndex:n,size:a})}}function Wt(e,t){if(!e||!t)return t;const r=e.getHours(),n=e.getMinutes(),s=e.getSeconds(),o=e.getMilliseconds(),a=new Date(t);return a.setHours(r),a.setMinutes(n),a.setSeconds(s),a.setMilliseconds(o),a}var ft={exports:{}},Fn=ft.exports,ur;function Mn(){return ur||(ur=1,function(e,t){(function(r,n){e.exports=n()})(Fn,function(){var r={year:0,month:1,day:2,hour:3,minute:4,second:5},n={};return function(s,o,a){var l,i=function(y,w,b){b===void 0&&(b={});var m=new Date(y),d=function(p,g){g===void 0&&(g={});var D=g.timeZoneName||"short",L=p+"|"+D,k=n[L];return k||(k=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:p,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:D}),n[L]=k),k}(w,b);return d.formatToParts(m)},u=function(y,w){for(var b=i(y,w),m=[],d=0;d<b.length;d+=1){var p=b[d],g=p.type,D=p.value,L=r[g];L>=0&&(m[L]=parseInt(D,10))}var k=m[3],v=k===24?0:k,C=m[0]+"-"+m[1]+"-"+m[2]+" "+v+":"+m[4]+":"+m[5]+":000",O=+y;return(a.utc(C).valueOf()-(O-=O%1e3))/6e4},f=o.prototype;f.tz=function(y,w){y===void 0&&(y=l);var b,m=this.utcOffset(),d=this.toDate(),p=d.toLocaleString("en-US",{timeZone:y}),g=Math.round((d-new Date(p))/1e3/60),D=15*-Math.round(d.getTimezoneOffset()/15)-g;if(!Number(D))b=this.utcOffset(0,w);else if(b=a(p,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(D,!0),w){var L=b.utcOffset();b=b.add(m-L,"minute")}return b.$x.$timezone=y,b},f.offsetName=function(y){var w=this.$x.$timezone||a.tz.guess(),b=i(this.valueOf(),w,{timeZoneName:y}).find(function(m){return m.type.toLowerCase()==="timezonename"});return b&&b.value};var h=f.startOf;f.startOf=function(y,w){if(!this.$x||!this.$x.$timezone)return h.call(this,y,w);var b=a(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return h.call(b,y,w).tz(this.$x.$timezone,!0)},a.tz=function(y,w,b){var m=b&&w,d=b||w||l,p=u(+a(),d);if(typeof y!="string")return a(y).tz(d);var g=function(v,C,O){var F=v-60*C*1e3,Y=u(F,O);if(C===Y)return[F,C];var V=u(F-=60*(Y-C)*1e3,O);return Y===V?[F,Y]:[v-60*Math.min(Y,V)*1e3,Math.max(Y,V)]}(a.utc(y,m).valueOf(),p,d),D=g[0],L=g[1],k=a(D).utcOffset(L);return k.$x.$timezone=d,k},a.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},a.tz.setDefault=function(y){l=y}}})}(ft)),ft.exports}var $n=Mn();const An=Qe($n);var dt={exports:{}},Nn=dt.exports,fr;function Yn(){return fr||(fr=1,function(e,t){(function(r,n){e.exports=n()})(Nn,function(){var r="minute",n=/[+-]\d\d(?::?\d\d)?/g,s=/([+-]|\d\d)/g;return function(o,a,l){var i=a.prototype;l.utc=function(m){var d={date:m,utc:!0,args:arguments};return new a(d)},i.utc=function(m){var d=l(this.toDate(),{locale:this.$L,utc:!0});return m?d.add(this.utcOffset(),r):d},i.local=function(){return l(this.toDate(),{locale:this.$L,utc:!1})};var u=i.parse;i.parse=function(m){m.utc&&(this.$u=!0),this.$utils().u(m.$offset)||(this.$offset=m.$offset),u.call(this,m)};var f=i.init;i.init=function(){if(this.$u){var m=this.$d;this.$y=m.getUTCFullYear(),this.$M=m.getUTCMonth(),this.$D=m.getUTCDate(),this.$W=m.getUTCDay(),this.$H=m.getUTCHours(),this.$m=m.getUTCMinutes(),this.$s=m.getUTCSeconds(),this.$ms=m.getUTCMilliseconds()}else f.call(this)};var h=i.utcOffset;i.utcOffset=function(m,d){var p=this.$utils().u;if(p(m))return this.$u?0:p(this.$offset)?h.call(this):this.$offset;if(typeof m=="string"&&(m=function(k){k===void 0&&(k="");var v=k.match(n);if(!v)return null;var C=(""+v[0]).match(s)||["-",0,0],O=C[0],F=60*+C[1]+ +C[2];return F===0?0:O==="+"?F:-F}(m),m===null))return this;var g=Math.abs(m)<=16?60*m:m,D=this;if(d)return D.$offset=g,D.$u=m===0,D;if(m!==0){var L=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(D=this.local().add(g+L,r)).$offset=g,D.$x.$localOffset=L}else D=this.utc();return D};var y=i.format;i.format=function(m){var d=m||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return y.call(this,d)},i.valueOf=function(){var m=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*m},i.isUTC=function(){return!!this.$u},i.toISOString=function(){return this.toDate().toISOString()},i.toString=function(){return this.toDate().toUTCString()};var w=i.toDate;i.toDate=function(m){return m==="s"&&this.$offset?l(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():w.call(this)};var b=i.diff;i.diff=function(m,d,p){if(m&&this.$u===m.$u)return b.call(this,m,d,p);var g=this.local(),D=l(m).local();return b.call(g,D,d,p)}}})}(dt)),dt.exports}var Vn=Yn();const Pn=Qe(Vn);R.extend(Pn);R.extend(An);function Wn(e,t){return t?R(e).tz(t).utcOffset()+e.getTimezoneOffset():0}const dr=(e,t,r)=>{if(!e)return null;if(!t)return e;let n=Wn(e,t);return r==="remove"&&(n*=-1),R(e).add(n,"minutes").toDate()};function Te(e,t,r,n){return n||!t?t:Array.isArray(t)?t.map(s=>dr(s,r,e)):dr(t,r,e)}const zn={locale:"en",timezone:null,firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–",consistentWeeks:!1},In=x.createContext(zn);function xe(){const e=x.useContext(In),t=x.useCallback(a=>a||e.locale,[e.locale]),r=x.useCallback(a=>a||e.timezone||void 0,[e.timezone]),n=x.useCallback(a=>typeof a=="number"?a:e.firstDayOfWeek,[e.firstDayOfWeek]),s=x.useCallback(a=>Array.isArray(a)?a:e.weekendDays,[e.weekendDays]),o=x.useCallback(a=>typeof a=="string"?a:e.labelSeparator,[e.labelSeparator]);return{...e,getLocale:t,getTimezone:r,getFirstDayOfWeek:n,getWeekendDays:s,getLabelSeparator:o}}function Hn(e,t){const r=xe(),n=s=>Te("remove",s,r.getTimezone()).toISOString();if(t==="range"&&Array.isArray(e)){const[s,o]=e;return s?o?`${n(s)} – ${n(o)}`:`${n(s)} –`:""}return t==="multiple"&&Array.isArray(e)?e.map(s=>s&&n(s)).filter(Boolean).join(", "):!Array.isArray(e)&&e?n(e):""}function Ht({value:e,type:t,name:r,form:n}){return S.jsx("input",{type:"hidden",value:Hn(e,t),name:r,form:n})}Ht.displayName="@mantine/dates/HiddenDatesInput";function Dr(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=Dr(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function _r(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=Dr(e))&&(n&&(n+=" "),n+=t);return n}var Bn={input:"m_468e7eda"};const Un={},ht=_.factory((e,t)=>{const r=_.useProps("TimeInput",Un,e),{classNames:n,styles:s,unstyled:o,vars:a,withSeconds:l,minTime:i,maxTime:u,value:f,onChange:h,...y}=r,{resolvedClassNames:w,resolvedStyles:b}=_.useResolvedStylesApi({classNames:n,styles:s,props:r}),m=p=>{if(i!==void 0||u!==void 0){const[g,D,L]=p.split(":").map(Number);if(i){const[k,v,C]=i.split(":").map(Number);if(g<k||g===k&&D<v||l&&g===k&&D===v&&L<C)return-1}if(u){const[k,v,C]=u.split(":").map(Number);if(g>k||g===k&&D>v||l&&g===k&&D===v&&L>C)return 1}}return 0},d=p=>{var g,D,L;if((g=r.onBlur)==null||g.call(r,p),i!==void 0||u!==void 0){const k=p.currentTarget.value;if(k){const v=m(k);v===1?(p.currentTarget.value=u,(D=r.onChange)==null||D.call(r,p)):v===-1&&(p.currentTarget.value=i,(L=r.onChange)==null||L.call(r,p))}}};return S.jsx(_.InputBase,{classNames:{...w,input:_r(Bn.input,w==null?void 0:w.input)},styles:b,unstyled:o,ref:t,value:f,...y,step:l?1:60,onChange:h,onBlur:d,type:"time",__staticSelector:"TimeInput"})});ht.classes=_.InputBase.classes;ht.displayName="@mantine/dates/TimeInput";var Sr={day:"m_396ce5cb"};const qn={},Gn=_.createVarsResolver((e,{size:t})=>({day:{"--day-size":_.getSize(t,"day-size")}})),Bt=_.factory((e,t)=>{const r=_.useProps("Day",qn,e),{classNames:n,className:s,style:o,styles:a,unstyled:l,vars:i,date:u,disabled:f,__staticSelector:h,weekend:y,outside:w,selected:b,renderDay:m,inRange:d,firstInRange:p,lastInRange:g,hidden:D,static:L,highlightToday:k,...v}=r,C=_.useStyles({name:h||"Day",classes:Sr,props:r,className:s,style:o,classNames:n,styles:a,unstyled:l,vars:i,varsResolver:Gn,rootSelector:"day"}),O=xe();return S.jsx(_.UnstyledButton,{...C("day",{style:D?{display:"none"}:void 0}),component:L?"div":"button",ref:t,disabled:f,"data-today":R(u).isSame(Te("add",new Date,O.getTimezone()),"day")||void 0,"data-hidden":D||void 0,"data-highlight-today":k||void 0,"data-disabled":f||void 0,"data-weekend":!f&&!w&&y||void 0,"data-outside":!f&&w||void 0,"data-selected":!f&&b||void 0,"data-in-range":d&&!f||void 0,"data-first-in-range":p&&!f||void 0,"data-last-in-range":g&&!f||void 0,"data-static":L||void 0,unstyled:l,...v,children:(m==null?void 0:m(u))||R(u).date()})});Bt.classes=Sr;Bt.displayName="@mantine/dates/Day";function Kn({locale:e,format:t="dd",firstDayOfWeek:r=1}){const n=R().day(r),s=[];for(let o=0;o<7;o+=1)typeof t=="string"?s.push(R(n).add(o,"days").locale(e).format(t)):s.push(t(R(n).add(o,"days").toDate()));return s}var xr={weekday:"m_18a3eca"};const Zn={},Jn=_.createVarsResolver((e,{size:t})=>({weekdaysRow:{"--wr-fz":_.getFontSize(t),"--wr-spacing":_.getSpacing(t)}})),Ut=_.factory((e,t)=>{const r=_.useProps("WeekdaysRow",Zn,e),{classNames:n,className:s,style:o,styles:a,unstyled:l,vars:i,locale:u,firstDayOfWeek:f,weekdayFormat:h,cellComponent:y="th",__staticSelector:w,withWeekNumbers:b,...m}=r,d=_.useStyles({name:w||"WeekdaysRow",classes:xr,props:r,className:s,style:o,classNames:n,styles:a,unstyled:l,vars:i,varsResolver:Jn,rootSelector:"weekdaysRow"}),p=xe(),g=Kn({locale:p.getLocale(u),format:h,firstDayOfWeek:p.getFirstDayOfWeek(f)}).map((D,L)=>S.jsx(y,{...d("weekday"),children:D},L));return S.jsxs(_.Box,{component:"tr",ref:t,...d("weekdaysRow"),...m,children:[b&&S.jsx(y,{...d("weekday"),children:"#"}),g]})});Ut.classes=xr;Ut.displayName="@mantine/dates/WeekdaysRow";function Xn(e,t=1){let r=R(e);const n=t===0?6:t-1;for(;r.day()!==n;)r=r.add(1,"day");return r.toDate()}function Qn(e,t=1){let r=R(e);for(;r.day()!==t;)r=r.subtract(1,"day");return r.toDate()}function es({month:e,firstDayOfWeek:t=1,consistentWeeks:r}){const n=R(e).subtract(R(e).date()-1,"day"),s=R(n).startOf("day"),o=s.toDate(),a=s.add(+s.daysInMonth()-1,"day").toDate(),l=Xn(a,t),i=Qn(o,t),u=[];for(;i<=l;){const f=[];for(let h=0;h<7;h+=1)f.push(new Date(i)),i.setDate(i.getDate()+1);u.push(f)}if(r&&u.length<6){const f=u[u.length-1],h=f[f.length-1],y=new Date(h);for(y.setDate(y.getDate()+1);u.length<6;){const w=[];for(let b=0;b<7;b+=1)w.push(new Date(y)),y.setDate(y.getDate()+1);u.push(w)}}return u}function Cr(e,t){return R(e).format("YYYY-MM")===R(t).format("YYYY-MM")}function wr(e,t){return t instanceof Date?R(e).isAfter(R(t).subtract(1,"day"),"day"):!0}function kr(e,t){return t instanceof Date?R(e).isBefore(R(t).add(1,"day"),"day"):!0}function ts(e,t,r,n,s,o,a){const l=e.flat().filter(f=>{var h;return kr(f,r)&&wr(f,t)&&!(s!=null&&s(f))&&!((h=n==null?void 0:n(f))!=null&&h.disabled)&&(!o||Cr(f,a))}),i=l.find(f=>{var h;return(h=n==null?void 0:n(f))==null?void 0:h.selected});if(i)return i;const u=l.find(f=>R().isSame(f,"date"));return u||l[0]}var mt={exports:{}},rs=mt.exports,mr;function ns(){return mr||(mr=1,function(e,t){(function(r,n){e.exports=n()})(rs,function(){var r="day";return function(n,s,o){var a=function(u){return u.add(4-u.isoWeekday(),r)},l=s.prototype;l.isoWeekYear=function(){return a(this).year()},l.isoWeek=function(u){if(!this.$utils().u(u))return this.add(7*(u-this.isoWeek()),r);var f,h,y,w,b=a(this),m=(f=this.isoWeekYear(),h=this.$u,y=(h?o.utc:o)().year(f).startOf("year"),w=4-y.isoWeekday(),y.isoWeekday()>4&&(w+=7),y.add(w,r));return b.diff(m,"week")+1},l.isoWeekday=function(u){return this.$utils().u(u)?this.day()||7:this.day(this.day()%7?u:u-7)};var i=l.startOf;l.startOf=function(u,f){var h=this.$utils(),y=!!h.u(f)||f;return h.p(u)==="isoweek"?y?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):i.bind(this)(u,f)}}})}(mt)),mt.exports}var ss=ns();const as=Qe(ss);R.extend(as);function os(e){const t=e.find(r=>R(r).day()===1);return R(t).isoWeek()}var Er={month:"m_cc9820d3",monthCell:"m_8f457cd5",weekNumber:"m_6cff9dea"};const is={withCellSpacing:!0},ls=_.createVarsResolver((e,{size:t})=>({weekNumber:{"--wn-fz":_.getFontSize(t),"--wn-size":_.getSize(t,"wn-size")}})),pt=_.factory((e,t)=>{const r=_.useProps("Month",is,e),{classNames:n,className:s,style:o,styles:a,unstyled:l,vars:i,__staticSelector:u,locale:f,firstDayOfWeek:h,weekdayFormat:y,month:w,weekendDays:b,getDayProps:m,excludeDate:d,minDate:p,maxDate:g,renderDay:D,hideOutsideDates:L,hideWeekdays:k,getDayAriaLabel:v,static:C,__getDayRef:O,__onDayKeyDown:F,__onDayClick:Y,__onDayMouseEnter:V,__preventFocus:z,__stopPropagation:P,withCellSpacing:H,size:I,highlightToday:q,withWeekNumbers:A,...U}=r,E=_.useStyles({name:u||"Month",classes:Er,props:r,className:s,style:o,classNames:n,styles:a,unstyled:l,vars:i,varsResolver:ls,rootSelector:"month"}),J=xe(),j=es({month:w,firstDayOfWeek:J.getFirstDayOfWeek(h),consistentWeeks:J.consistentWeeks}),W=ts(j,p,g,m,d,L,w),{resolvedClassNames:re,resolvedStyles:te}=_.useResolvedStylesApi({classNames:n,styles:a,props:r}),M=j.map((G,X)=>{const ee=G.map((B,ie)=>{const Z=!Cr(B,w),ue=(v==null?void 0:v(B))||R(B).locale(f||J.locale).format("D MMMM YYYY"),N=m==null?void 0:m(B),ne=R(B).isSame(W,"date");return S.jsx("td",{...E("monthCell"),"data-with-spacing":H||void 0,children:S.jsx(Bt,{__staticSelector:u||"Month",classNames:re,styles:te,unstyled:l,"data-mantine-stop-propagation":P||void 0,highlightToday:q,renderDay:D,date:B,size:I,weekend:J.getWeekendDays(b).includes(B.getDay()),outside:Z,hidden:L?Z:!1,"aria-label":ue,static:C,disabled:(d==null?void 0:d(B))||!kr(B,g)||!wr(B,p),ref:Q=>O==null?void 0:O(X,ie,Q),...N,onKeyDown:Q=>{var ce;(ce=N==null?void 0:N.onKeyDown)==null||ce.call(N,Q),F==null||F(Q,{rowIndex:X,cellIndex:ie,date:B})},onMouseEnter:Q=>{var ce;(ce=N==null?void 0:N.onMouseEnter)==null||ce.call(N,Q),V==null||V(Q,B)},onClick:Q=>{var ce;(ce=N==null?void 0:N.onClick)==null||ce.call(N,Q),Y==null||Y(Q,B)},onMouseDown:Q=>{var ce;(ce=N==null?void 0:N.onMouseDown)==null||ce.call(N,Q),z&&Q.preventDefault()},tabIndex:z||!ne?-1:0})},B.toString())});return S.jsxs("tr",{...E("monthRow"),children:[A&&S.jsx("td",{...E("weekNumber"),children:os(G)}),ee]},X)});return S.jsxs(_.Box,{component:"table",...E("month"),size:I,ref:t,...U,children:[!k&&S.jsx("thead",{...E("monthThead"),children:S.jsx(Ut,{__staticSelector:u||"Month",locale:f,firstDayOfWeek:h,weekdayFormat:y,size:I,classNames:re,styles:te,unstyled:l,withWeekNumbers:A})}),S.jsx("tbody",{...E("monthTbody"),children:M})]})});pt.classes=Er;pt.displayName="@mantine/dates/Month";var Tr={pickerControl:"m_dc6a3c71"};const cs={},us=_.createVarsResolver((e,{size:t})=>({pickerControl:{"--dpc-fz":_.getFontSize(t),"--dpc-size":_.getSize(t,"dpc-size")}})),yt=_.factory((e,t)=>{const r=_.useProps("PickerControl",cs,e),{classNames:n,className:s,style:o,styles:a,unstyled:l,vars:i,firstInRange:u,lastInRange:f,inRange:h,__staticSelector:y,selected:w,disabled:b,...m}=r,d=_.useStyles({name:y||"PickerControl",classes:Tr,props:r,className:s,style:o,classNames:n,styles:a,unstyled:l,vars:i,varsResolver:us,rootSelector:"pickerControl"});return S.jsx(_.UnstyledButton,{...d("pickerControl"),ref:t,unstyled:l,"data-picker-control":!0,"data-selected":w&&!b||void 0,"data-disabled":b||void 0,"data-in-range":h&&!b&&!w||void 0,"data-first-in-range":u&&!b||void 0,"data-last-in-range":f&&!b||void 0,disabled:b,...m})});yt.classes=Tr;yt.displayName="@mantine/dates/PickerControl";function jr(e,t,r){return!t&&!r?!1:!!(t&&R(e).isBefore(t,"year")||r&&R(e).isAfter(r,"year"))}function fs(e,t,r,n){const s=e.flat().filter(l=>{var i;return!jr(l,t,r)&&!((i=n==null?void 0:n(l))!=null&&i.disabled)}),o=s.find(l=>{var i;return(i=n==null?void 0:n(l))==null?void 0:i.selected});if(o)return o;const a=s.find(l=>R().isSame(l,"year"));return a||s[0]}function Or(e){const t=e.getFullYear(),r=t-t%10;let n=0;const s=[[],[],[],[]];for(let o=0;o<4;o+=1){const a=o===3?1:3;for(let l=0;l<a;l+=1)s[o].push(new Date(r+n,0)),n+=1}return s}var Lr={yearsList:"m_9206547b",yearsListCell:"m_c5a19c7d"};const ds={yearsListFormat:"YYYY",withCellSpacing:!0},vt=_.factory((e,t)=>{const r=_.useProps("YearsList",ds,e),{classNames:n,className:s,style:o,styles:a,unstyled:l,vars:i,decade:u,yearsListFormat:f,locale:h,minDate:y,maxDate:w,getYearControlProps:b,__staticSelector:m,__getControlRef:d,__onControlKeyDown:p,__onControlClick:g,__onControlMouseEnter:D,__preventFocus:L,__stopPropagation:k,withCellSpacing:v,size:C,...O}=r,F=_.useStyles({name:m||"YearsList",classes:Lr,props:r,className:s,style:o,classNames:n,styles:a,unstyled:l,vars:i,rootSelector:"yearsList"}),Y=xe(),V=Or(u),z=fs(V,y,w,b),P=V.map((H,I)=>{const q=H.map((A,U)=>{const E=b==null?void 0:b(A),J=R(A).isSame(z,"year");return S.jsx("td",{...F("yearsListCell"),"data-with-spacing":v||void 0,children:S.jsx(yt,{...F("yearsListControl"),size:C,unstyled:l,"data-mantine-stop-propagation":k||void 0,disabled:jr(A,y,w),ref:j=>d==null?void 0:d(I,U,j),...E,onKeyDown:j=>{var W;(W=E==null?void 0:E.onKeyDown)==null||W.call(E,j),p==null||p(j,{rowIndex:I,cellIndex:U,date:A})},onClick:j=>{var W;(W=E==null?void 0:E.onClick)==null||W.call(E,j),g==null||g(j,A)},onMouseEnter:j=>{var W;(W=E==null?void 0:E.onMouseEnter)==null||W.call(E,j),D==null||D(j,A)},onMouseDown:j=>{var W;(W=E==null?void 0:E.onMouseDown)==null||W.call(E,j),L&&j.preventDefault()},tabIndex:L||!J?-1:0,children:R(A).locale(Y.getLocale(h)).format(f)})},U)});return S.jsx("tr",{...F("yearsListRow"),children:q},I)});return S.jsx(_.Box,{component:"table",ref:t,size:C,...F("yearsList"),...O,children:S.jsx("tbody",{children:P})})});vt.classes=Lr;vt.displayName="@mantine/dates/YearsList";function Rr(e,t,r){return!t&&!r?!1:!!(t&&R(e).isBefore(t,"month")||r&&R(e).isAfter(r,"month"))}function ms(e,t,r,n){const s=e.flat().filter(l=>{var i;return!Rr(l,t,r)&&!((i=n==null?void 0:n(l))!=null&&i.disabled)}),o=s.find(l=>{var i;return(i=n==null?void 0:n(l))==null?void 0:i.selected});if(o)return o;const a=s.find(l=>R().isSame(l,"month"));return a||s[0]}function hs(e){const t=R(e).startOf("year").toDate(),r=[[],[],[],[]];let n=0;for(let s=0;s<4;s+=1)for(let o=0;o<3;o+=1)r[s].push(R(t).add(n,"months").toDate()),n+=1;return r}var Fr={monthsList:"m_2a6c32d",monthsListCell:"m_fe27622f"};const ps={monthsListFormat:"MMM",withCellSpacing:!0},gt=_.factory((e,t)=>{const r=_.useProps("MonthsList",ps,e),{classNames:n,className:s,style:o,styles:a,unstyled:l,vars:i,__staticSelector:u,year:f,monthsListFormat:h,locale:y,minDate:w,maxDate:b,getMonthControlProps:m,__getControlRef:d,__onControlKeyDown:p,__onControlClick:g,__onControlMouseEnter:D,__preventFocus:L,__stopPropagation:k,withCellSpacing:v,size:C,...O}=r,F=_.useStyles({name:u||"MonthsList",classes:Fr,props:r,className:s,style:o,classNames:n,styles:a,unstyled:l,vars:i,rootSelector:"monthsList"}),Y=xe(),V=hs(f),z=ms(V,w,b,m),P=V.map((H,I)=>{const q=H.map((A,U)=>{const E=m==null?void 0:m(A),J=R(A).isSame(z,"month");return S.jsx("td",{...F("monthsListCell"),"data-with-spacing":v||void 0,children:S.jsx(yt,{...F("monthsListControl"),size:C,unstyled:l,__staticSelector:u||"MonthsList","data-mantine-stop-propagation":k||void 0,disabled:Rr(A,w,b),ref:j=>d==null?void 0:d(I,U,j),...E,onKeyDown:j=>{var W;(W=E==null?void 0:E.onKeyDown)==null||W.call(E,j),p==null||p(j,{rowIndex:I,cellIndex:U,date:A})},onClick:j=>{var W;(W=E==null?void 0:E.onClick)==null||W.call(E,j),g==null||g(j,A)},onMouseEnter:j=>{var W;(W=E==null?void 0:E.onMouseEnter)==null||W.call(E,j),D==null||D(j,A)},onMouseDown:j=>{var W;(W=E==null?void 0:E.onMouseDown)==null||W.call(E,j),L&&j.preventDefault()},tabIndex:L||!J?-1:0,children:R(A).locale(Y.getLocale(y)).format(h)})},U)});return S.jsx("tr",{...F("monthsListRow"),children:q},I)});return S.jsx(_.Box,{component:"table",ref:t,size:C,...F("monthsList"),...O,children:S.jsx("tbody",{children:P})})});gt.classes=Fr;gt.displayName="@mantine/dates/MonthsList";var Mr={calendarHeader:"m_730a79ed",calendarHeaderLevel:"m_f6645d97",calendarHeaderControl:"m_2351eeb0",calendarHeaderControlIcon:"m_367dc749"};const ys={nextDisabled:!1,previousDisabled:!1,hasNextLevel:!0,withNext:!0,withPrevious:!0},vs=_.createVarsResolver((e,{size:t})=>({calendarHeader:{"--dch-control-size":_.getSize(t,"dch-control-size"),"--dch-fz":_.getFontSize(t)}})),Fe=_.factory((e,t)=>{const r=_.useProps("CalendarHeader",ys,e),{classNames:n,className:s,style:o,styles:a,unstyled:l,vars:i,nextIcon:u,previousIcon:f,nextLabel:h,previousLabel:y,onNext:w,onPrevious:b,onLevelClick:m,label:d,nextDisabled:p,previousDisabled:g,hasNextLevel:D,levelControlAriaLabel:L,withNext:k,withPrevious:v,__staticSelector:C,__preventFocus:O,__stopPropagation:F,...Y}=r,V=_.useStyles({name:C||"CalendarHeader",classes:Mr,props:r,className:s,style:o,classNames:n,styles:a,unstyled:l,vars:i,varsResolver:vs,rootSelector:"calendarHeader"}),z=O?P=>P.preventDefault():void 0;return S.jsxs(_.Box,{...V("calendarHeader"),ref:t,...Y,children:[v&&S.jsx(_.UnstyledButton,{...V("calendarHeaderControl"),"data-direction":"previous","aria-label":y,onClick:b,unstyled:l,onMouseDown:z,disabled:g,"data-disabled":g||void 0,tabIndex:O||g?-1:0,"data-mantine-stop-propagation":F||void 0,children:f||S.jsx(_.AccordionChevron,{...V("calendarHeaderControlIcon"),"data-direction":"previous",size:"45%"})}),S.jsx(_.UnstyledButton,{component:D?"button":"div",...V("calendarHeaderLevel"),onClick:D?m:void 0,unstyled:l,onMouseDown:D?z:void 0,disabled:!D,"data-static":!D||void 0,"aria-label":L,tabIndex:O||!D?-1:0,"data-mantine-stop-propagation":F||void 0,children:d}),k&&S.jsx(_.UnstyledButton,{...V("calendarHeaderControl"),"data-direction":"next","aria-label":h,onClick:w,unstyled:l,onMouseDown:z,disabled:p,"data-disabled":p||void 0,tabIndex:O||p?-1:0,"data-mantine-stop-propagation":F||void 0,children:u||S.jsx(_.AccordionChevron,{...V("calendarHeaderControlIcon"),"data-direction":"next",size:"45%"})})]})});Fe.classes=Mr;Fe.displayName="@mantine/dates/CalendarHeader";function gs(e){const t=Or(e);return[t[0][0],t[3][0]]}const bs={decadeLabelFormat:"YYYY"},bt=_.factory((e,t)=>{const r=_.useProps("DecadeLevel",bs,e),{decade:n,locale:s,minDate:o,maxDate:a,yearsListFormat:l,getYearControlProps:i,__getControlRef:u,__onControlKeyDown:f,__onControlClick:h,__onControlMouseEnter:y,withCellSpacing:w,__preventFocus:b,nextIcon:m,previousIcon:d,nextLabel:p,previousLabel:g,onNext:D,onPrevious:L,nextDisabled:k,previousDisabled:v,levelControlAriaLabel:C,withNext:O,withPrevious:F,decadeLabelFormat:Y,classNames:V,styles:z,unstyled:P,__staticSelector:H,__stopPropagation:I,size:q,...A}=r,U=xe(),[E,J]=gs(n),j={__staticSelector:H||"DecadeLevel",classNames:V,styles:z,unstyled:P,size:q},W=typeof k=="boolean"?k:a?!R(J).endOf("year").isBefore(a):!1,re=typeof v=="boolean"?v:o?!R(E).startOf("year").isAfter(o):!1,te=(M,G)=>R(M).locale(s||U.locale).format(G);return S.jsxs(_.Box,{"data-decade-level":!0,size:q,ref:t,...A,children:[S.jsx(Fe,{label:typeof Y=="function"?Y(E,J):`${te(E,Y)} – ${te(J,Y)}`,__preventFocus:b,__stopPropagation:I,nextIcon:m,previousIcon:d,nextLabel:p,previousLabel:g,onNext:D,onPrevious:L,nextDisabled:W,previousDisabled:re,hasNextLevel:!1,levelControlAriaLabel:C,withNext:O,withPrevious:F,...j}),S.jsx(vt,{decade:n,locale:s,minDate:o,maxDate:a,yearsListFormat:l,getYearControlProps:i,__getControlRef:u,__onControlKeyDown:f,__onControlClick:h,__onControlMouseEnter:y,__preventFocus:b,__stopPropagation:I,withCellSpacing:w,...j})]})});bt.classes={...vt.classes,...Fe.classes};bt.displayName="@mantine/dates/DecadeLevel";const Ds={yearLabelFormat:"YYYY"},Dt=_.factory((e,t)=>{const r=_.useProps("YearLevel",Ds,e),{year:n,locale:s,minDate:o,maxDate:a,monthsListFormat:l,getMonthControlProps:i,__getControlRef:u,__onControlKeyDown:f,__onControlClick:h,__onControlMouseEnter:y,withCellSpacing:w,__preventFocus:b,nextIcon:m,previousIcon:d,nextLabel:p,previousLabel:g,onNext:D,onPrevious:L,onLevelClick:k,nextDisabled:v,previousDisabled:C,hasNextLevel:O,levelControlAriaLabel:F,withNext:Y,withPrevious:V,yearLabelFormat:z,__staticSelector:P,__stopPropagation:H,size:I,classNames:q,styles:A,unstyled:U,...E}=r,J=xe(),j={__staticSelector:P||"YearLevel",classNames:q,styles:A,unstyled:U,size:I},W=typeof v=="boolean"?v:a?!R(n).endOf("year").isBefore(a):!1,re=typeof C=="boolean"?C:o?!R(n).startOf("year").isAfter(o):!1;return S.jsxs(_.Box,{"data-year-level":!0,size:I,ref:t,...E,children:[S.jsx(Fe,{label:typeof z=="function"?z(n):R(n).locale(s||J.locale).format(z),__preventFocus:b,__stopPropagation:H,nextIcon:m,previousIcon:d,nextLabel:p,previousLabel:g,onNext:D,onPrevious:L,onLevelClick:k,nextDisabled:W,previousDisabled:re,hasNextLevel:O,levelControlAriaLabel:F,withNext:Y,withPrevious:V,...j}),S.jsx(gt,{year:n,locale:s,minDate:o,maxDate:a,monthsListFormat:l,getMonthControlProps:i,__getControlRef:u,__onControlKeyDown:f,__onControlClick:h,__onControlMouseEnter:y,__preventFocus:b,__stopPropagation:H,withCellSpacing:w,...j})]})});Dt.classes={...Fe.classes,...gt.classes};Dt.displayName="@mantine/dates/YearLevel";const _s={monthLabelFormat:"MMMM YYYY"},_t=_.factory((e,t)=>{const r=_.useProps("MonthLevel",_s,e),{month:n,locale:s,firstDayOfWeek:o,weekdayFormat:a,weekendDays:l,getDayProps:i,excludeDate:u,minDate:f,maxDate:h,renderDay:y,hideOutsideDates:w,hideWeekdays:b,getDayAriaLabel:m,__getDayRef:d,__onDayKeyDown:p,__onDayClick:g,__onDayMouseEnter:D,withCellSpacing:L,highlightToday:k,withWeekNumbers:v,__preventFocus:C,__stopPropagation:O,nextIcon:F,previousIcon:Y,nextLabel:V,previousLabel:z,onNext:P,onPrevious:H,onLevelClick:I,nextDisabled:q,previousDisabled:A,hasNextLevel:U,levelControlAriaLabel:E,withNext:J,withPrevious:j,monthLabelFormat:W,classNames:re,styles:te,unstyled:M,__staticSelector:G,size:X,static:ee,...B}=r,ie=xe(),Z={__staticSelector:G||"MonthLevel",classNames:re,styles:te,unstyled:M,size:X},ue=typeof q=="boolean"?q:h?!R(n).endOf("month").isBefore(h):!1,N=typeof A=="boolean"?A:f?!R(n).startOf("month").isAfter(f):!1;return S.jsxs(_.Box,{"data-month-level":!0,size:X,ref:t,...B,children:[S.jsx(Fe,{label:typeof W=="function"?W(n):R(n).locale(s||ie.locale).format(W),__preventFocus:C,__stopPropagation:O,nextIcon:F,previousIcon:Y,nextLabel:V,previousLabel:z,onNext:P,onPrevious:H,onLevelClick:I,nextDisabled:ue,previousDisabled:N,hasNextLevel:U,levelControlAriaLabel:E,withNext:J,withPrevious:j,...Z}),S.jsx(pt,{month:n,locale:s,firstDayOfWeek:o,weekdayFormat:a,weekendDays:l,getDayProps:i,excludeDate:u,minDate:f,maxDate:h,renderDay:y,hideOutsideDates:w,hideWeekdays:b,getDayAriaLabel:m,__getDayRef:d,__onDayKeyDown:p,__onDayClick:g,__onDayMouseEnter:D,__preventFocus:C,__stopPropagation:O,static:ee,withCellSpacing:L,highlightToday:k,withWeekNumbers:v,...Z})]})});_t.classes={...pt.classes,...Fe.classes};_t.displayName="@mantine/dates/MonthLevel";var $r={levelsGroup:"m_30b26e33"};const Ss={},Me=_.factory((e,t)=>{const r=_.useProps("LevelsGroup",Ss,e),{classNames:n,className:s,style:o,styles:a,unstyled:l,vars:i,__staticSelector:u,...f}=r,h=_.useStyles({name:u||"LevelsGroup",classes:$r,props:r,className:s,style:o,classNames:n,styles:a,unstyled:l,vars:i,rootSelector:"levelsGroup"});return S.jsx(_.Box,{ref:t,...h("levelsGroup"),...f})});Me.classes=$r;Me.displayName="@mantine/dates/LevelsGroup";const xs={numberOfColumns:1},St=_.factory((e,t)=>{const r=_.useProps("DecadeLevelGroup",xs,e),{decade:n,locale:s,minDate:o,maxDate:a,yearsListFormat:l,getYearControlProps:i,__onControlClick:u,__onControlMouseEnter:f,withCellSpacing:h,__preventFocus:y,nextIcon:w,previousIcon:b,nextLabel:m,previousLabel:d,onNext:p,onPrevious:g,nextDisabled:D,previousDisabled:L,classNames:k,styles:v,unstyled:C,__staticSelector:O,__stopPropagation:F,numberOfColumns:Y,levelControlAriaLabel:V,decadeLabelFormat:z,size:P,vars:H,...I}=r,q=x.useRef([]),A=Array(Y).fill(0).map((U,E)=>{const J=R(n).add(E*10,"years").toDate();return S.jsx(bt,{size:P,yearsListFormat:l,decade:J,withNext:E===Y-1,withPrevious:E===0,decadeLabelFormat:z,__onControlClick:u,__onControlMouseEnter:f,__onControlKeyDown:(j,W)=>It({levelIndex:E,rowIndex:W.rowIndex,cellIndex:W.cellIndex,event:j,controlsRef:q}),__getControlRef:(j,W,re)=>{Array.isArray(q.current[E])||(q.current[E]=[]),Array.isArray(q.current[E][j])||(q.current[E][j]=[]),q.current[E][j][W]=re},levelControlAriaLabel:typeof V=="function"?V(J):V,locale:s,minDate:o,maxDate:a,__preventFocus:y,__stopPropagation:F,nextIcon:w,previousIcon:b,nextLabel:m,previousLabel:d,onNext:p,onPrevious:g,nextDisabled:D,previousDisabled:L,getYearControlProps:i,__staticSelector:O||"DecadeLevelGroup",classNames:k,styles:v,unstyled:C,withCellSpacing:h},E)});return S.jsx(Me,{classNames:k,styles:v,__staticSelector:O||"DecadeLevelGroup",ref:t,size:P,unstyled:C,...I,children:A})});St.classes={...Me.classes,...bt.classes};St.displayName="@mantine/dates/DecadeLevelGroup";const Cs={numberOfColumns:1},xt=_.factory((e,t)=>{const r=_.useProps("YearLevelGroup",Cs,e),{year:n,locale:s,minDate:o,maxDate:a,monthsListFormat:l,getMonthControlProps:i,__onControlClick:u,__onControlMouseEnter:f,withCellSpacing:h,__preventFocus:y,nextIcon:w,previousIcon:b,nextLabel:m,previousLabel:d,onNext:p,onPrevious:g,onLevelClick:D,nextDisabled:L,previousDisabled:k,hasNextLevel:v,classNames:C,styles:O,unstyled:F,__staticSelector:Y,__stopPropagation:V,numberOfColumns:z,levelControlAriaLabel:P,yearLabelFormat:H,size:I,vars:q,...A}=r,U=x.useRef([]),E=Array(z).fill(0).map((J,j)=>{const W=R(n).add(j,"years").toDate();return S.jsx(Dt,{size:I,monthsListFormat:l,year:W,withNext:j===z-1,withPrevious:j===0,yearLabelFormat:H,__stopPropagation:V,__onControlClick:u,__onControlMouseEnter:f,__onControlKeyDown:(re,te)=>It({levelIndex:j,rowIndex:te.rowIndex,cellIndex:te.cellIndex,event:re,controlsRef:U}),__getControlRef:(re,te,M)=>{Array.isArray(U.current[j])||(U.current[j]=[]),Array.isArray(U.current[j][re])||(U.current[j][re]=[]),U.current[j][re][te]=M},levelControlAriaLabel:typeof P=="function"?P(W):P,locale:s,minDate:o,maxDate:a,__preventFocus:y,nextIcon:w,previousIcon:b,nextLabel:m,previousLabel:d,onNext:p,onPrevious:g,onLevelClick:D,nextDisabled:L,previousDisabled:k,hasNextLevel:v,getMonthControlProps:i,classNames:C,styles:O,unstyled:F,__staticSelector:Y||"YearLevelGroup",withCellSpacing:h},j)});return S.jsx(Me,{classNames:C,styles:O,__staticSelector:Y||"YearLevelGroup",ref:t,size:I,unstyled:F,...A,children:E})});xt.classes={...Dt.classes,...Me.classes};xt.displayName="@mantine/dates/YearLevelGroup";const ws={numberOfColumns:1},Ct=_.factory((e,t)=>{const r=_.useProps("MonthLevelGroup",ws,e),{month:n,locale:s,firstDayOfWeek:o,weekdayFormat:a,weekendDays:l,getDayProps:i,excludeDate:u,minDate:f,maxDate:h,renderDay:y,hideOutsideDates:w,hideWeekdays:b,getDayAriaLabel:m,__onDayClick:d,__onDayMouseEnter:p,withCellSpacing:g,highlightToday:D,withWeekNumbers:L,__preventFocus:k,nextIcon:v,previousIcon:C,nextLabel:O,previousLabel:F,onNext:Y,onPrevious:V,onLevelClick:z,nextDisabled:P,previousDisabled:H,hasNextLevel:I,classNames:q,styles:A,unstyled:U,numberOfColumns:E,levelControlAriaLabel:J,monthLabelFormat:j,__staticSelector:W,__stopPropagation:re,size:te,static:M,vars:G,...X}=r,ee=x.useRef([]),B=Array(E).fill(0).map((ie,Z)=>{const ue=R(n).add(Z,"months").toDate();return S.jsx(_t,{month:ue,withNext:Z===E-1,withPrevious:Z===0,monthLabelFormat:j,__stopPropagation:re,__onDayClick:d,__onDayMouseEnter:p,__onDayKeyDown:(N,ne)=>It({levelIndex:Z,rowIndex:ne.rowIndex,cellIndex:ne.cellIndex,event:N,controlsRef:ee}),__getDayRef:(N,ne,Q)=>{Array.isArray(ee.current[Z])||(ee.current[Z]=[]),Array.isArray(ee.current[Z][N])||(ee.current[Z][N]=[]),ee.current[Z][N][ne]=Q},levelControlAriaLabel:typeof J=="function"?J(ue):J,locale:s,firstDayOfWeek:o,weekdayFormat:a,weekendDays:l,getDayProps:i,excludeDate:u,minDate:f,maxDate:h,renderDay:y,hideOutsideDates:w,hideWeekdays:b,getDayAriaLabel:m,__preventFocus:k,nextIcon:v,previousIcon:C,nextLabel:O,previousLabel:F,onNext:Y,onPrevious:V,onLevelClick:z,nextDisabled:P,previousDisabled:H,hasNextLevel:I,classNames:q,styles:A,unstyled:U,__staticSelector:W||"MonthLevelGroup",size:te,static:M,withCellSpacing:g,highlightToday:D,withWeekNumbers:L},Z)});return S.jsx(Me,{classNames:q,styles:A,__staticSelector:W||"MonthLevelGroup",ref:t,size:te,...X,children:B})});Ct.classes={...Me.classes,..._t.classes};Ct.displayName="@mantine/dates/MonthLevelGroup";var Ar={input:"m_6fa5e2aa"};const ks={},wt=_.factory((e,t)=>{const{inputProps:r,wrapperProps:n,placeholder:s,classNames:o,styles:a,unstyled:l,popoverProps:i,modalProps:u,dropdownType:f,children:h,formattedValue:y,dropdownHandlers:w,dropdownOpened:b,onClick:m,clearable:d,onClear:p,clearButtonProps:g,rightSection:D,shouldClear:L,readOnly:k,disabled:v,value:C,name:O,form:F,type:Y,...V}=_.useInputProps("PickerInputBase",ks,e),z=S.jsx(_.Input.ClearButton,{onClick:p,unstyled:l,...g}),P=()=>{Y==="range"&&Array.isArray(C)&&C[0]&&!C[1]&&p(),w.close()};return S.jsxs(S.Fragment,{children:[f==="modal"&&!k&&S.jsx(_.Modal,{opened:b,onClose:P,withCloseButton:!1,size:"auto","data-dates-modal":!0,unstyled:l,...u,children:h}),S.jsx(_.Input.Wrapper,{...n,children:S.jsxs(_.Popover,{position:"bottom-start",opened:b,trapFocus:!0,returnFocus:!1,unstyled:l,...i,disabled:(i==null?void 0:i.disabled)||f==="modal"||k,onChange:H=>{var I;H||((I=i==null?void 0:i.onClose)==null||I.call(i),P())},children:[S.jsx(_.Popover.Target,{children:S.jsx(_.Input,{"data-dates-input":!0,"data-read-only":k||void 0,disabled:v,component:"button",type:"button",multiline:!0,onClick:H=>{m==null||m(H),w.toggle()},__clearSection:z,__clearable:d&&L&&!k&&!v,rightSection:D,...r,ref:t,classNames:{...o,input:_r(Ar.input,o==null?void 0:o.input)},...V,children:y||S.jsx(_.Input.Placeholder,{error:r.error,unstyled:l,className:o==null?void 0:o.placeholder,style:a==null?void 0:a.placeholder,children:s})})}),S.jsx(_.Popover.Dropdown,{"data-dates-dropdown":!0,children:h})]})}),S.jsx(Ht,{value:C,name:O,form:F,type:Y})]})});wt.classes=Ar;wt.displayName="@mantine/dates/PickerInputBase";const hr=e=>e==="range"?[null,null]:e==="multiple"?[]:null;function Xe({type:e,value:t,defaultValue:r,onChange:n,applyTimezone:s=!0}){const o=x.useRef(e),a=xe(),[l,i,u]=vr({value:Te("add",t,a.getTimezone(),!s),defaultValue:Te("add",r,a.getTimezone(),!s),finalValue:hr(e),onChange:h=>{n==null||n(Te("remove",h,a.getTimezone(),!s))}});let f=l;if(o.current!==e){if(o.current=e,t===void 0)f=r!==void 0?r:hr(e),i(f);else if(process.env.NODE_ENV==="development")switch(e){case"default":t!==null&&typeof t!="string"&&console.error("[@mantine/dates/use-uncontrolled-dates] Value must be type of `null` or `string`");break;case"multiple":t instanceof Array||console.error("[@mantine/dates/use-uncontrolled-dates] Value must be type of `string[]`");break;case"range":(!(t instanceof Array)||t.length!==2)&&console.error("[@mantine/dates/use-uncontrolled-dates] Value must be type of `[string, string]`");break}}return[f,i,u]}function $t(e,t){return e?e==="month"?0:e==="year"?1:2:t||0}function Es(e){return e===0?"month":e===1?"year":"decade"}function Je(e,t,r){return Es(vn($t(e,0),$t(t,0),$t(r,2)))}const Ts={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0},Ie=_.factory((e,t)=>{const r=_.useProps("Calendar",Ts,e),{vars:n,maxLevel:s,minLevel:o,defaultLevel:a,level:l,onLevelChange:i,date:u,defaultDate:f,onDateChange:h,numberOfColumns:y,columnsToScroll:w,ariaLabels:b,nextLabel:m,previousLabel:d,onYearSelect:p,onMonthSelect:g,onYearMouseEnter:D,onMonthMouseEnter:L,__updateDateOnYearSelect:k,__updateDateOnMonthSelect:v,firstDayOfWeek:C,weekdayFormat:O,weekendDays:F,getDayProps:Y,excludeDate:V,renderDay:z,hideOutsideDates:P,hideWeekdays:H,getDayAriaLabel:I,monthLabelFormat:q,nextIcon:A,previousIcon:U,__onDayClick:E,__onDayMouseEnter:J,withCellSpacing:j,highlightToday:W,withWeekNumbers:re,monthsListFormat:te,getMonthControlProps:M,yearLabelFormat:G,yearsListFormat:X,getYearControlProps:ee,decadeLabelFormat:B,classNames:ie,styles:Z,unstyled:ue,minDate:N,maxDate:ne,locale:Q,__staticSelector:ce,size:Ce,__preventFocus:De,__stopPropagation:he,onNextDecade:Oe,onPreviousDecade:$e,onNextYear:oe,onPreviousYear:_e,onNextMonth:we,onPreviousMonth:je,static:Ae,__timezoneApplied:Ne,...Tt}=r,{resolvedClassNames:tt,resolvedStyles:rt}=_.useResolvedStylesApi({classNames:ie,styles:Z,props:r}),[He,Ve]=vr({value:l?Je(l,o,s):void 0,defaultValue:a?Je(a,o,s):void 0,finalValue:Je(void 0,o,s),onChange:i}),[jt,Ee]=Xe({type:"default",value:u,defaultValue:f,onChange:h,applyTimezone:!Ne}),Be={__staticSelector:ce||"Calendar",styles:rt,classNames:tt,unstyled:ue,size:Ce},Ot=xe(),Le=w||y||1,Pe=new Date,nt=N&&N>Pe?N:Pe,ge=jt||Te("add",nt,Ot.getTimezone()),Ue=()=>{const de=R(ge).add(Le,"month").toDate();we==null||we(de),Ee(de)},qe=()=>{const de=R(ge).subtract(Le,"month").toDate();je==null||je(de),Ee(de)},st=()=>{const de=R(ge).add(Le,"year").toDate();oe==null||oe(de),Ee(de)},Lt=()=>{const de=R(ge).subtract(Le,"year").toDate();_e==null||_e(de),Ee(de)},at=()=>{const de=R(ge).add(10*Le,"year").toDate();Oe==null||Oe(de),Ee(de)},Rt=()=>{const de=R(ge).subtract(10*Le,"year").toDate();$e==null||$e(de),Ee(de)};return S.jsxs(_.Box,{ref:t,size:Ce,"data-calendar":!0,...Tt,children:[He==="month"&&S.jsx(Ct,{month:ge,minDate:N,maxDate:ne,firstDayOfWeek:C,weekdayFormat:O,weekendDays:F,getDayProps:Y,excludeDate:V,renderDay:z,hideOutsideDates:P,hideWeekdays:H,getDayAriaLabel:I,onNext:Ue,onPrevious:qe,hasNextLevel:s!=="month",onLevelClick:()=>Ve("year"),numberOfColumns:y,locale:Q,levelControlAriaLabel:b==null?void 0:b.monthLevelControl,nextLabel:(b==null?void 0:b.nextMonth)??m,nextIcon:A,previousLabel:(b==null?void 0:b.previousMonth)??d,previousIcon:U,monthLabelFormat:q,__onDayClick:E,__onDayMouseEnter:J,__preventFocus:De,__stopPropagation:he,static:Ae,withCellSpacing:j,highlightToday:W,withWeekNumbers:re,...Be}),He==="year"&&S.jsx(xt,{year:ge,numberOfColumns:y,minDate:N,maxDate:ne,monthsListFormat:te,getMonthControlProps:M,locale:Q,onNext:st,onPrevious:Lt,hasNextLevel:s!=="month"&&s!=="year",onLevelClick:()=>Ve("decade"),levelControlAriaLabel:b==null?void 0:b.yearLevelControl,nextLabel:(b==null?void 0:b.nextYear)??m,nextIcon:A,previousLabel:(b==null?void 0:b.previousYear)??d,previousIcon:U,yearLabelFormat:G,__onControlMouseEnter:L,__onControlClick:(de,Re)=>{v&&Ee(Re),Ve(Je("month",o,s)),g==null||g(Re)},__preventFocus:De,__stopPropagation:he,withCellSpacing:j,...Be}),He==="decade"&&S.jsx(St,{decade:ge,minDate:N,maxDate:ne,yearsListFormat:X,getYearControlProps:ee,locale:Q,onNext:at,onPrevious:Rt,numberOfColumns:y,nextLabel:(b==null?void 0:b.nextDecade)??m,nextIcon:A,previousLabel:(b==null?void 0:b.previousDecade)??d,previousIcon:U,decadeLabelFormat:B,__onControlMouseEnter:D,__onControlClick:(de,Re)=>{k&&Ee(Re),Ve(Je("year",o,s)),p==null||p(Re)},__preventFocus:De,__stopPropagation:he,withCellSpacing:j,...Be})]})});Ie.classes={...St.classes,...xt.classes,...Ct.classes};Ie.displayName="@mantine/dates/Calendar";function Nr(e){const{maxLevel:t,minLevel:r,defaultLevel:n,level:s,onLevelChange:o,nextIcon:a,previousIcon:l,date:i,defaultDate:u,onDateChange:f,numberOfColumns:h,columnsToScroll:y,ariaLabels:w,nextLabel:b,previousLabel:m,onYearSelect:d,onMonthSelect:p,onYearMouseEnter:g,onMonthMouseEnter:D,onNextMonth:L,onPreviousMonth:k,onNextYear:v,onPreviousYear:C,onNextDecade:O,onPreviousDecade:F,withCellSpacing:Y,highlightToday:V,__updateDateOnYearSelect:z,__updateDateOnMonthSelect:P,withWeekNumbers:H,firstDayOfWeek:I,weekdayFormat:q,weekendDays:A,getDayProps:U,excludeDate:E,renderDay:J,hideOutsideDates:j,hideWeekdays:W,getDayAriaLabel:re,monthLabelFormat:te,monthsListFormat:M,getMonthControlProps:G,yearLabelFormat:X,yearsListFormat:ee,getYearControlProps:B,decadeLabelFormat:ie,allowSingleDateInRange:Z,allowDeselect:ue,minDate:N,maxDate:ne,locale:Q,...ce}=e;return{calendarProps:{maxLevel:t,minLevel:r,defaultLevel:n,level:s,onLevelChange:o,nextIcon:a,previousIcon:l,date:i,defaultDate:u,onDateChange:f,numberOfColumns:h,columnsToScroll:y,ariaLabels:w,nextLabel:b,previousLabel:m,onYearSelect:d,onMonthSelect:p,onYearMouseEnter:g,onMonthMouseEnter:D,onNextMonth:L,onPreviousMonth:k,onNextYear:v,onPreviousYear:C,onNextDecade:O,onPreviousDecade:F,withCellSpacing:Y,highlightToday:V,__updateDateOnYearSelect:z,__updateDateOnMonthSelect:P,withWeekNumbers:H,firstDayOfWeek:I,weekdayFormat:q,weekendDays:A,getDayProps:U,excludeDate:E,renderDay:J,hideOutsideDates:j,hideWeekdays:W,getDayAriaLabel:re,monthLabelFormat:te,monthsListFormat:M,getMonthControlProps:G,yearLabelFormat:X,yearsListFormat:ee,getYearControlProps:B,decadeLabelFormat:ie,allowSingleDateInRange:Z,allowDeselect:ue,minDate:N,maxDate:ne,locale:Q},others:ce}}function pr(e,t){const r=[...t].sort((n,s)=>n.getTime()-s.getTime());return R(r[0]).startOf("day").subtract(1,"ms").isBefore(e)&&R(r[1]).endOf("day").add(1,"ms").isAfter(e)}function js({type:e,level:t,value:r,defaultValue:n,onChange:s,allowSingleDateInRange:o,allowDeselect:a,onMouseLeave:l,applyTimezone:i=!0}){const[u,f]=Xe({type:e,value:r,defaultValue:n,onChange:s,applyTimezone:i}),[h,y]=x.useState(e==="range"&&u[0]&&!u[1]?u[0]:null),[w,b]=x.useState(null),m=v=>{if(e==="range"){if(h instanceof Date&&!u[1]){if(R(v).isSame(h,t)&&!o){y(null),b(null),f([null,null]);return}const C=[v,h];C.sort((O,F)=>O.getTime()-F.getTime()),f(C),b(null),y(null);return}if(u[0]&&!u[1]&&R(v).isSame(u[0],t)&&!o){y(null),b(null),f([null,null]);return}f([v,null]),b(null),y(v);return}if(e==="multiple"){u.some(C=>R(C).isSame(v,t))?f(u.filter(C=>!R(C).isSame(v,t))):f([...u,v]);return}u&&a&&R(v).isSame(u,t)?f(null):f(v)},d=v=>h instanceof Date&&w instanceof Date?pr(v,[w,h]):u[0]instanceof Date&&u[1]instanceof Date?pr(v,u):!1,p=e==="range"?v=>{l==null||l(v),b(null)}:l,g=v=>u[0]instanceof Date&&R(v).isSame(u[0],t)?!(w&&R(w).isBefore(u[0])):!1,D=v=>u[1]instanceof Date?R(v).isSame(u[1],t):!(u[0]instanceof Date)||!w?!1:R(w).isBefore(u[0])&&R(v).isSame(u[0],t),L=v=>{if(e==="range")return{selected:u.some(O=>O&&R(O).isSame(v,t)),inRange:d(v),firstInRange:g(v),lastInRange:D(v),"data-autofocus":!!u[0]&&R(u[0]).isSame(v,t)||void 0};if(e==="multiple")return{selected:u.some(O=>O&&R(O).isSame(v,t)),"data-autofocus":!!u[0]&&R(u[0]).isSame(v,t)||void 0};const C=R(u).isSame(v,t);return{selected:C,"data-autofocus":C||void 0}},k=e==="range"&&h?b:()=>{};return x.useEffect(()=>{if(e==="range")if(u[0]&&!u[1]&&(h==null?void 0:h.getTime())!==u[0].getTime())y(u[0]);else{const v=u[0]==null&&u[1]==null,C=u[0]!=null&&u[1]!=null;(v||C)&&(y(null),b(null))}},[u]),{onDateChange:m,onRootMouseLeave:p,onHoveredDateChange:k,getControlProps:L,_value:u,setValue:f}}const Os={type:"default",defaultLevel:"month",numberOfColumns:1},kt=_.factory((e,t)=>{const r=_.useProps("DatePicker",Os,e),{classNames:n,styles:s,vars:o,type:a,defaultValue:l,value:i,onChange:u,__staticSelector:f,getDayProps:h,allowSingleDateInRange:y,allowDeselect:w,onMouseLeave:b,numberOfColumns:m,hideOutsideDates:d,__onDayMouseEnter:p,__onDayClick:g,__timezoneApplied:D,...L}=r,{onDateChange:k,onRootMouseLeave:v,onHoveredDateChange:C,getControlProps:O}=js({type:a,level:"day",allowDeselect:w,allowSingleDateInRange:y,value:i,defaultValue:l,onChange:u,onMouseLeave:b,applyTimezone:!D}),{resolvedClassNames:F,resolvedStyles:Y}=_.useResolvedStylesApi({classNames:n,styles:s,props:r}),V=xe();return S.jsx(Ie,{ref:t,minLevel:"month",classNames:F,styles:Y,__staticSelector:f||"DatePicker",onMouseLeave:v,numberOfColumns:m,hideOutsideDates:d??m!==1,__onDayMouseEnter:(z,P)=>{C(P),p==null||p(z,P)},__onDayClick:(z,P)=>{k(P),g==null||g(z,P)},getDayProps:z=>({...O(z),...h==null?void 0:h(z)}),...L,date:Te("add",L.date,V.getTimezone(),D),__timezoneApplied:!0})});kt.classes=Ie.classes;kt.displayName="@mantine/dates/DatePicker";function Ls(e,t){if(e===null)return null;const r=Te("add",new Date(e),t);return Number.isNaN(r.getTime())||!e?null:r}function Rs({date:e,maxDate:t,minDate:r}){return!(e==null||Number.isNaN(e.getTime())||t&&R(e).isAfter(t,"date")||r&&R(e).isBefore(r,"date"))}const Fs={valueFormat:"MMMM D, YYYY",fixOnBlur:!0,preserveTime:!0},qt=_.factory((e,t)=>{const r=_.useInputProps("DateInput",Fs,e),{inputProps:n,wrapperProps:s,value:o,defaultValue:a,onChange:l,clearable:i,clearButtonProps:u,popoverProps:f,getDayProps:h,locale:y,valueFormat:w,dateParser:b,minDate:m,maxDate:d,fixOnBlur:p,onFocus:g,onBlur:D,onClick:L,readOnly:k,name:v,form:C,rightSection:O,unstyled:F,classNames:Y,styles:V,allowDeselect:z,preserveTime:P,date:H,defaultDate:I,onDateChange:q,...A}=r,U=x.useRef(null),E=x.useRef(null),[J,j]=x.useState(!1),{calendarProps:W,others:re}=Nr(A),te=xe(),G=b||(oe=>{const _e=R(oe,w,te.getLocale(y)).toDate();return Number.isNaN(_e.getTime())?Ls(oe,te.getTimezone()):_e}),X=z!==void 0?z:i,ee=oe=>oe?R(oe).locale(te.getLocale(y)).format(w):"",[B,ie,Z]=Xe({type:"default",value:o,defaultValue:a,onChange:l}),[ue,N]=Xe({type:"default",value:H,defaultValue:a||I,onChange:q});x.useEffect(()=>{Z&&o!==null&&N(o)},[Z,o]);const[ne,Q]=x.useState(ee(B));x.useEffect(()=>{Q(ee(B))},[te.getLocale(y)]);const ce=oe=>{const _e=oe.currentTarget.value;if(Q(_e),j(!0),_e.trim()===""&&i)ie(null);else{const we=G(_e);Rs({date:we,minDate:m,maxDate:d})&&(ie(we),N(we))}},Ce=oe=>{D==null||D(oe),j(!1),p&&Q(ee(B))},De=oe=>{g==null||g(oe),j(!0)},he=oe=>{L==null||L(oe),j(!0)},Oe=oe=>({...h==null?void 0:h(oe),selected:R(B).isSame(oe,"day"),onClick:_e=>{var Ae,Ne;(Ne=h==null?void 0:(Ae=h(oe)).onClick)==null||Ne.call(Ae,_e);const we=P?Wt(B,oe):oe,je=i&&X&&R(B).isSame(oe,"day")?null:we;ie(je),!Z&&Q(ee(je)),j(!1)}}),$e=O||(i&&B&&!k?S.jsx(_.CloseButton,{variant:"transparent",onMouseDown:oe=>oe.preventDefault(),tabIndex:-1,onClick:()=>{ie(null),!Z&&Q(""),j(!1)},unstyled:F,size:n.size||"sm",...u}):null);return Pt(()=>{B!==void 0&&!J&&Q(ee(B))},[B]),_n(()=>j(!1),void 0,[U.current,E.current]),S.jsxs(S.Fragment,{children:[S.jsx(_.Input.Wrapper,{...s,__staticSelector:"DateInput",ref:U,children:S.jsxs(_.Popover,{opened:J,trapFocus:!1,position:"bottom-start",disabled:k,withRoles:!1,unstyled:F,...f,children:[S.jsx(_.Popover.Target,{children:S.jsx(_.Input,{"data-dates-input":!0,"data-read-only":k||void 0,autoComplete:"off",ref:t,value:ne,onChange:ce,onBlur:Ce,onFocus:De,onClick:he,readOnly:k,rightSection:$e,...n,...re,__staticSelector:"DateInput"})}),S.jsx(_.Popover.Dropdown,{onMouseDown:oe=>oe.preventDefault(),"data-dates-dropdown":!0,ref:E,children:S.jsx(Ie,{__staticSelector:"DateInput",__timezoneApplied:!0,...W,classNames:Y,styles:V,unstyled:F,__preventFocus:!0,minDate:m,maxDate:d,locale:y,getDayProps:Oe,size:n.size,date:ue,onDateChange:N})})]})}),S.jsx(Ht,{name:v,form:C,value:B,type:"default"})]})});qt.classes={..._.Input.classes,...Ie.classes};qt.displayName="@mantine/dates/DateInput";var Yr={timeWrapper:"m_208d2562",timeInput:"m_62ee059"};const Ms={dropdownType:"popover"},Gt=_.factory((e,t)=>{const r=_.useProps("DateTimePicker",Ms,e),{value:n,defaultValue:s,onChange:o,valueFormat:a,locale:l,classNames:i,styles:u,unstyled:f,timeInputProps:h,submitButtonProps:y,withSeconds:w,level:b,defaultLevel:m,size:d,variant:p,dropdownType:g,vars:D,minDate:L,maxDate:k,...v}=r,C=_.useStyles({name:"DateTimePicker",classes:Yr,props:r,classNames:i,styles:u,unstyled:f,vars:D}),{resolvedClassNames:O,resolvedStyles:F}=_.useResolvedStylesApi({classNames:i,styles:u,props:r}),Y=a||(w?"DD/MM/YYYY HH:mm:ss":"DD/MM/YYYY HH:mm"),V=x.useRef(null),z=xn(V,h==null?void 0:h.ref),{calendarProps:{allowSingleDateInRange:P,...H},others:I}=Nr(v),q=xe(),[A,U]=Xe({type:"default",value:n,defaultValue:s,onChange:o}),E=N=>N?R(N).format(w?"HH:mm:ss":"HH:mm"):"",[J,j]=x.useState(E(A)),[W,re]=x.useState(b||m||"month"),[te,M]=Cn(!1),G=A?R(A).locale(q.getLocale(l)).tz(q.getTimezone(),!0).format(Y):"",X=N=>{var Q;(Q=h==null?void 0:h.onChange)==null||Q.call(h,N);const ne=N.currentTarget.value;if(j(ne),ne){const[ce,Ce,De]=ne.split(":").map(Number),he=Te("add",new Date,q.getTimezone());he.setHours(ce),he.setMinutes(Ce),he.setSeconds(De||0),he.setMilliseconds(0),U(Wt(he,A||Te("add",new Date,q.getTimezone())))}},ee=N=>{var ne;N&&U(Wt(A,N)),(ne=V.current)==null||ne.focus()},B=N=>{var ne;(ne=h==null?void 0:h.onKeyDown)==null||ne.call(h,N),N.key==="Enter"&&(N.preventDefault(),M.close())};Pt(()=>{te||j(E(A))},[A,te]),Pt(()=>{te&&re("month")},[te]);const ie=L?R(L).format("HH:mm:ss"):null,Z=k?R(k).format("HH:mm:ss"):null,ue=g==="popover";return S.jsxs(wt,{formattedValue:G,dropdownOpened:v.disabled?!1:te,dropdownHandlers:M,classNames:O,styles:F,unstyled:f,ref:t,onClear:()=>U(null),shouldClear:!!A,value:A,size:d,variant:p,dropdownType:g,...I,type:"default",__staticSelector:"DateTimePicker",children:[S.jsx(kt,{...H,maxDate:k,minDate:L,size:d,variant:p,type:"default",value:A,defaultDate:A,onChange:ee,locale:l,classNames:O,styles:F,unstyled:f,__staticSelector:"DateTimePicker",__stopPropagation:ue,level:b,defaultLevel:m,onLevelChange:N=>{var ne;re(N),(ne=H.onLevelChange)==null||ne.call(H,N)},__timezoneApplied:!0}),W==="month"&&S.jsxs("div",{...C("timeWrapper"),children:[S.jsx(ht,{value:J,withSeconds:w,ref:z,unstyled:f,minTime:A&&L&&A.toDateString()===L.toDateString()?ie??void 0:void 0,maxTime:A&&k&&A.toDateString()===k.toDateString()?Z??void 0:void 0,...h,...C("timeInput",{className:h==null?void 0:h.className,style:h==null?void 0:h.style}),onChange:X,onKeyDown:B,size:d,"data-mantine-stop-propagation":ue||void 0}),S.jsx(_.ActionIcon,{variant:"default",size:`input-${d||"sm"}`,...C("submitButton",{className:y==null?void 0:y.className,style:y==null?void 0:y.style}),unstyled:f,"data-mantine-stop-propagation":ue||void 0,children:S.jsx(_.CheckIcon,{size:"30%"}),...y,onClick:N=>{var ne;(ne=y==null?void 0:y.onClick)==null||ne.call(y,N),M.close()}})]})]})});Gt.classes={...Yr,...wt.classes,...kt.classes};Gt.displayName="@mantine/dates/DateTimePicker";R.extend(gr);const $s=e=>{const{name:t,onChange:r,value:n,readOnly:s}=e;return S.jsx(qt,{name:t,onChange:o=>r(t,o),value:n,readOnly:s,valueFormat:"YYYY-MM-DD",clearable:!0})};R.extend(gr);const As=e=>{const{name:t,onChange:r,value:n,readOnly:s}=e;return S.jsx(Gt,{name:t,onChange:o=>r(t,o),value:n,readOnly:s,valueFormat:"YYYY-MM-DD HH:mm:ss",clearable:!0})},Ns=e=>{const{name:t,onChange:r,value:n,readOnly:s}=e;return S.jsx(_.NumberInput,{name:t,onChange:o=>r(t,o),value:n,readOnly:s})},Ys=e=>{const{fields:t,name:r,onChange:n,value:s,formValues:o,error:a={},readOnly:l}=e,i=(f,h)=>{n(`${r}.${f}`,h)};return t.map((f,h)=>S.jsx(Et,{field:f,formValues:o,onChange:i,value:s[f.name],error:a[f.name],readOnly:l},h))},Vs=e=>{const{data:t,name:r,onChange:n,value:s,readOnly:o}=e;return S.jsx(_.Select,{name:r,data:t,value:s,onChange:a=>n(r,a),readOnly:o,clearable:!0})},Ps=e=>{const{name:t,onChange:r,value:n,readOnly:s}=e;return S.jsx(_.Textarea,{name:t,onChange:o=>r(t,o.target.value),value:n,readOnly:s,styles:{input:{height:200}}})},Ws=e=>{const{name:t,onChange:r,value:n,readOnly:s}=e;return S.jsx(_.TextInput,{name:t,onChange:o=>r(t,o.target.value),value:n,readOnly:s})},zs=e=>{const{name:t,onChange:r,value:n,readOnly:s}=e,o=x.useRef(null),a=S.jsx(_.ActionIcon,{variant:"subtle",color:"gray",onClick:()=>{var l;return(l=o.current)==null?void 0:l.showPicker()},children:"🕛"});return S.jsx(ht,{name:t,onChange:l=>r(t,l.target.value),value:n,readOnly:s,ref:o,rightSection:a,withSeconds:!0})};function Is(e,t,r){return{addElement:n=>{t(e,[...r,n])},replaceElement:(n,s)=>{const o=r.map((a,l)=>l===n?s:a);t(e,o)},removeElement:n=>{t(e,r.filter((s,o)=>o!==n))}}}const Et=({field:e,value:t,error:r,onChange:n,formValues:s,fieldContainer:o=i=>S.jsx(S.Fragment,{children:i}),customRender:a,readOnly:l})=>{const i=x.useMemo(()=>typeof e.visible=="function"?e.visible(s):e.visible!==!1,[e.visible,s]),u=x.useMemo(()=>typeof e.disabled=="function"?e.disabled(s):e.disabled===!0,[e.disabled,s]),f=x.useMemo(()=>{if(e.type==="array")return Is(e.name,n,t)},[e.type,e.name,n,t]),h=x.useMemo(()=>a==null?void 0:a(e,t,r,n,s,f,l||e.readOnly),[a,e,t,r,n,s,f,l,e.readOnly]);if(!i)return null;if(h)return h;const y=()=>{switch(e.type){case"text":return S.jsx(Ws,{name:e.name,value:t,onChange:n,readOnly:l});case"number":return S.jsx(Ns,{name:e.name,value:t,onChange:n,readOnly:l});case"object":return S.jsx(Ys,{name:e.name,onChange:n,value:t,fields:e.fields??[],formValues:s,error:r,readOnly:l});case"array":return S.jsx(wn,{name:e.name,onChange:n,value:t,fields:e.fields,options:f,error:r,readOnly:l});case"check":return S.jsx(kn,{name:e.name,value:t,onChange:n,readOnly:l,label:e.label});case"select":return S.jsx(Vs,{name:e.name,value:t,onChange:n,readOnly:l,data:e.data});case"textarea":return S.jsx(Ps,{name:e.name,value:t,onChange:n,readOnly:l});case"date":return S.jsx($s,{name:e.name,value:t,onChange:n,readOnly:l});case"datetime":return S.jsx(As,{name:e.name,value:t,onChange:n,readOnly:l});case"time":return S.jsx(zs,{name:e.name,value:t,onChange:n,readOnly:l});default:return null}},w=S.jsxs(_.Fieldset,{legend:e.type==="check"?void 0:e.label,variant:"unstyled",disabled:u||l,styles:{legend:{fontWeight:500}},children:[y(),!["object","array"].includes(e.type)&&typeof r=="string"&&S.jsx(_.Text,{c:"red",fz:"sm",fw:500,children:r})]});return o(w,e)},[Hs,Zs,Bs]=yn(),Us=e=>{switch(e){case"number":return 0;case"array":return[];case"check":return!1;case"object":return{};case"select":case"date":case"datetime":return null;default:return""}},Vr=e=>{const t={};for(const r of e)r.type==="object"&&r.fields?t[r.name]=Vr(r.fields):t[r.name]=r.initialValue??Us(r.type);return t},qs=e=>e==null||typeof e=="string"&&e.trim()===""||Array.isArray(e)&&e.length===0,zt=(e,t,r="")=>{const n={};for(const s of e){const o=r?`${r}.${s.name}`:s.name,a=t==null?void 0:t[s.name];if(s.type==="object")Object.assign(n,zt(s.fields,a||{},o));else if(s.type==="array"){if(s.required&&(!Array.isArray(a)||a.length===0)){n[o]=s.name+" is required";continue}Array.isArray(a)&&a.forEach((l,i)=>{Object.assign(n,zt(s.fields,l,`${o}.${i}`))})}else s.required&&qs(a)&&(n[o]=s.name+" is required")}return n};function Gs(e){const t={};return Object.entries(e).forEach(([r,n])=>{const s=r.split(".");let o=t;s.forEach((a,l)=>{const i=l===s.length-1;s[l+1],i?o[a]=n:(a in o||(o[a]={}),o=o[a])})}),t}const Ks=({onSubmit:e,schema:t,container:r,fieldContainer:n,customRender:s,validate:o,readOnly:a,values:l,onFieldChange:i})=>{const u=Bs({mode:"uncontrolled",initialValues:Vr(t),validate:o}),f=x.useMemo(()=>u.getValues(),[u.getValues()]),h=Dn(async(m,d)=>{if(u.setFieldValue(m,d),i){const p=f[m];f[m]=d;const g=i(m,p,d,f),D=g instanceof Promise?await g:g;u.setValues(D)}},0),y=x.useCallback((m,d)=>{const p=u.errors;return m==="object"||m==="array"?Gs(p)[d]:p[d]},[u.errors]),w=x.useCallback(()=>{const m=u.getValues(),d=zt(t,m);if(Object.keys(d).length>0){u.setErrors(d);return}u.onSubmit(e)()},[u,e,t]);x.useEffect(()=>{l&&u.initialize(l)},[l]);const b=S.jsx(Hs,{form:u,children:t.map((m,d)=>S.jsx(Et,{field:m,formValues:f,value:f[m.name],error:y(m.type,m.name),onChange:h,fieldContainer:n,customRender:s,readOnly:m.readOnly||a},d))});return r(b,w,a)};exports.AutoForm=Ks;exports.FieldRender=Et;