autoforma 1.0.85 → 1.0.115

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,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("react"),Er=require("@mantine/form"),_r=require("@mantine/hooks"),U=require("@mantine/core"),Xe=require("dayjs"),Pe=require("@mantine/dates");function Rr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var _e={exports:{}},be={};/**
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
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Be;function xr(){if(Be)return be;Be=1;var t=L,n=Symbol.for("react.element"),s=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(f,m,E){var d,R={},C=null,I=null;E!==void 0&&(C=""+E),m.key!==void 0&&(C=""+m.key),m.ref!==void 0&&(I=m.ref);for(d in m)o.call(m,d)&&!l.hasOwnProperty(d)&&(R[d]=m[d]);if(f&&f.defaultProps)for(d in m=f.defaultProps,m)R[d]===void 0&&(R[d]=m[d]);return{$$typeof:n,type:f,key:C,ref:I,props:R,_owner:i.current}}return be.Fragment=s,be.jsx=c,be.jsxs=c,be}var Ee={};/**
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
  *
@@ -14,17 +14,17 @@
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 Je;function jr(){return Je||(Je=1,process.env.NODE_ENV!=="production"&&function(){var t=L,n=Symbol.for("react.element"),s=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),f=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),I=Symbol.for("react.offscreen"),oe=Symbol.iterator,S="@@iterator";function u(e){if(e===null||typeof e!="object")return null;var r=oe&&e[oe]||e[S];return typeof r=="function"?r:null}var p=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function h(e){{for(var r=arguments.length,a=new Array(r>1?r-1:0),v=1;v<r;v++)a[v-1]=arguments[v];j("error",e,a)}}function j(e,r,a){{var v=p.ReactDebugCurrentFrame,_=v.getStackAddendum();_!==""&&(r+="%s",a=a.concat([_]));var x=a.map(function(y){return String(y)});x.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,x)}}var V=!1,W=!1,Q=!1,J=!1,q=!1,A;A=Symbol.for("react.module.reference");function H(e){return!!(typeof e=="string"||typeof e=="function"||e===o||e===l||q||e===i||e===E||e===d||J||e===I||V||W||Q||typeof e=="object"&&e!==null&&(e.$$typeof===C||e.$$typeof===R||e.$$typeof===c||e.$$typeof===f||e.$$typeof===m||e.$$typeof===A||e.getModuleId!==void 0))}function N(e,r,a){var v=e.displayName;if(v)return v;var _=r.displayName||r.name||"";return _!==""?a+"("+_+")":a}function M(e){return e.displayName||"Context"}function O(e){if(e==null)return null;if(typeof e.tag=="number"&&h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case o:return"Fragment";case s:return"Portal";case l:return"Profiler";case i:return"StrictMode";case E:return"Suspense";case d:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case f:var r=e;return M(r)+".Consumer";case c:var a=e;return M(a._context)+".Provider";case m:return N(e,e.render,"ForwardRef");case R:var v=e.displayName||null;return v!==null?v:O(e.type)||"Memo";case C:{var _=e,x=_._payload,y=_._init;try{return O(y(x))}catch{return null}}}return null}var D=Object.assign,k=0,z,ee,Z,B,re,P,ie;function te(){}te.__reactDisabledLog=!0;function xe(){{if(k===0){z=console.log,ee=console.info,Z=console.warn,B=console.error,re=console.group,P=console.groupCollapsed,ie=console.groupEnd;var e={configurable:!0,enumerable:!0,value:te,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}k++}}function je(){{if(k--,k===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:D({},e,{value:z}),info:D({},e,{value:ee}),warn:D({},e,{value:Z}),error:D({},e,{value:B}),group:D({},e,{value:re}),groupCollapsed:D({},e,{value:P}),groupEnd:D({},e,{value:ie})})}k<0&&h("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var pe=p.ReactCurrentDispatcher,he;function se(e,r,a){{if(he===void 0)try{throw Error()}catch(_){var v=_.stack.trim().match(/\n( *(at )?)/);he=v&&v[1]||""}return`
18
- `+he+e}}var ue=!1,ne;{var ge=typeof WeakMap=="function"?WeakMap:Map;ne=new ge}function ce(e,r){if(!e||ue)return"";{var a=ne.get(e);if(a!==void 0)return a}var v;ue=!0;var _=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var x;x=pe.current,pe.current=null,xe();try{if(r){var y=function(){throw Error()};if(Object.defineProperty(y.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(y,[])}catch(Y){v=Y}Reflect.construct(e,[],y)}else{try{y.call()}catch(Y){v=Y}e.call(y.prototype)}}else{try{throw Error()}catch(Y){v=Y}e()}}catch(Y){if(Y&&v&&typeof Y.stack=="string"){for(var g=Y.stack.split(`
19
- `),F=v.stack.split(`
20
- `),T=g.length-1,w=F.length-1;T>=1&&w>=0&&g[T]!==F[w];)w--;for(;T>=1&&w>=0;T--,w--)if(g[T]!==F[w]){if(T!==1||w!==1)do if(T--,w--,w<0||g[T]!==F[w]){var $=`
21
- `+g[T].replace(" at new "," at ");return e.displayName&&$.includes("<anonymous>")&&($=$.replace("<anonymous>",e.displayName)),typeof e=="function"&&ne.set(e,$),$}while(T>=1&&w>=0);break}}}finally{ue=!1,pe.current=x,je(),Error.prepareStackTrace=_}var me=e?e.displayName||e.name:"",ae=me?se(me):"";return typeof e=="function"&&ne.set(e,ae),ae}function ye(e,r,a){return ce(e,!1)}function le(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function X(e,r,a){if(e==null)return"";if(typeof e=="function")return ce(e,le(e));if(typeof e=="string")return se(e);switch(e){case E:return se("Suspense");case d:return se("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case m:return ye(e.render);case R:return X(e.type,r,a);case C:{var v=e,_=v._payload,x=v._init;try{return X(x(_),r,a)}catch{}}}return""}var G=Object.prototype.hasOwnProperty,fe={},de=p.ReactDebugCurrentFrame;function K(e){if(e){var r=e._owner,a=X(e.type,e._source,r?r.type:null);de.setExtraStackFrame(a)}else de.setExtraStackFrame(null)}function ke(e,r,a,v,_){{var x=Function.call.bind(G);for(var y in e)if(x(e,y)){var g=void 0;try{if(typeof e[y]!="function"){var F=Error((v||"React class")+": "+a+" type `"+y+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[y]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw F.name="Invariant Violation",F}g=e[y](r,y,v,a,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(T){g=T}g&&!(g instanceof Error)&&(K(_),h("%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).",v||"React class",a,y,typeof g),K(null)),g instanceof Error&&!(g.message in fe)&&(fe[g.message]=!0,K(_),h("Failed %s type: %s",a,g.message),K(null))}}}var Qe=Array.isArray;function Te(e){return Qe(e)}function er(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,a=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return a}}function rr(e){try{return Ye(e),!1}catch{return!0}}function Ye(e){return""+e}function Me(e){if(rr(e))return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",er(e)),Ye(e)}var Ae=p.ReactCurrentOwner,tr={key:!0,ref:!0,__self:!0,__source:!0},$e,Le;function nr(e){if(G.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function ar(e){if(G.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function or(e,r){typeof e.ref=="string"&&Ae.current}function ir(e,r){{var a=function(){$e||($e=!0,h("%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)",r))};a.isReactWarning=!0,Object.defineProperty(e,"key",{get:a,configurable:!0})}}function sr(e,r){{var a=function(){Le||(Le=!0,h("%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)",r))};a.isReactWarning=!0,Object.defineProperty(e,"ref",{get:a,configurable:!0})}}var ur=function(e,r,a,v,_,x,y){var g={$$typeof:n,type:e,key:r,ref:a,props:y,_owner:x};return g._store={},Object.defineProperty(g._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(g,"_self",{configurable:!1,enumerable:!1,writable:!1,value:v}),Object.defineProperty(g,"_source",{configurable:!1,enumerable:!1,writable:!1,value:_}),Object.freeze&&(Object.freeze(g.props),Object.freeze(g)),g};function cr(e,r,a,v,_){{var x,y={},g=null,F=null;a!==void 0&&(Me(a),g=""+a),ar(r)&&(Me(r.key),g=""+r.key),nr(r)&&(F=r.ref,or(r,_));for(x in r)G.call(r,x)&&!tr.hasOwnProperty(x)&&(y[x]=r[x]);if(e&&e.defaultProps){var T=e.defaultProps;for(x in T)y[x]===void 0&&(y[x]=T[x])}if(g||F){var w=typeof e=="function"?e.displayName||e.name||"Unknown":e;g&&ir(y,w),F&&sr(y,w)}return ur(e,g,F,_,v,Ae.current,y)}}var Oe=p.ReactCurrentOwner,Ie=p.ReactDebugCurrentFrame;function ve(e){if(e){var r=e._owner,a=X(e.type,e._source,r?r.type:null);Ie.setExtraStackFrame(a)}else Ie.setExtraStackFrame(null)}var we;we=!1;function Ce(e){return typeof e=="object"&&e!==null&&e.$$typeof===n}function Ve(){{if(Oe.current){var e=O(Oe.current.type);if(e)return`
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,Et={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 Tt(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 jt=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,Tt(T,le));for(fe in T)ce.call(T,fe)&&!Et.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 jt(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
22
 
23
- Check the render method of \``+e+"`."}return""}}function lr(e){return""}var We={};function fr(e){{var r=Ve();if(!r){var a=typeof e=="string"?e:e.displayName||e.name;a&&(r=`
23
+ Check the render method of \``+c+"`."}return""}}function Ot(c){return""}var at={};function Lt(c){{var T=st();if(!T){var $=typeof c=="string"?c:c.displayName||c.name;$&&(T=`
24
24
 
25
- Check the top-level render call using <`+a+">.")}return r}}function qe(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var a=fr(r);if(We[a])return;We[a]=!0;var v="";e&&e._owner&&e._owner!==Oe.current&&(v=" It was passed a child from "+O(e._owner.type)+"."),ve(e),h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',a,v),ve(null)}}function Ue(e,r){{if(typeof e!="object")return;if(Te(e))for(var a=0;a<e.length;a++){var v=e[a];Ce(v)&&qe(v,r)}else if(Ce(e))e._store&&(e._store.validated=!0);else if(e){var _=u(e);if(typeof _=="function"&&_!==e.entries)for(var x=_.call(e),y;!(y=x.next()).done;)Ce(y.value)&&qe(y.value,r)}}}function dr(e){{var r=e.type;if(r==null||typeof r=="string")return;var a;if(typeof r=="function")a=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===m||r.$$typeof===R))a=r.propTypes;else return;if(a){var v=O(r);ke(a,e.props,"prop",v,e)}else if(r.PropTypes!==void 0&&!we){we=!0;var _=O(r);h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",_||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function vr(e){{for(var r=Object.keys(e.props),a=0;a<r.length;a++){var v=r[a];if(v!=="children"&&v!=="key"){ve(e),h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",v),ve(null);break}}e.ref!==null&&(ve(e),h("Invalid attribute `ref` supplied to `React.Fragment`."),ve(null))}}var Ne={};function ze(e,r,a,v,_,x){{var y=H(e);if(!y){var g="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(g+=" 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 F=lr();F?g+=F:g+=Ve();var T;e===null?T="null":Te(e)?T="array":e!==void 0&&e.$$typeof===n?(T="<"+(O(e.type)||"Unknown")+" />",g=" Did you accidentally export a JSX literal instead of a component?"):T=typeof e,h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",T,g)}var w=cr(e,r,a,_,x);if(w==null)return w;if(y){var $=r.children;if($!==void 0)if(v)if(Te($)){for(var me=0;me<$.length;me++)Ue($[me],e);Object.freeze&&Object.freeze($)}else h("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 Ue($,e)}if(G.call(r,"key")){var ae=O(e),Y=Object.keys(r).filter(function(br){return br!=="key"}),Se=Y.length>0?"{key: someKey, "+Y.join(": ..., ")+": ...}":"{key: someKey}";if(!Ne[ae+Se]){var yr=Y.length>0?"{"+Y.join(": ..., ")+": ...}":"{}";h(`A props object containing a "key" prop is being spread into JSX:
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 $=Lt(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=Ot();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"}),Rt=Se.length>0?"{key: someKey, "+Se.join(": ..., ")+": ...}":"{key: someKey}";if(!Kt[Ye+Rt]){var Ur=Se.length>0?"{"+Se.join(": ..., ")+": ...}":"{}";g(`A props object containing a "key" prop is being spread into JSX:
26
26
  let props = %s;
27
27
  <%s {...props} />
28
28
  React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
- <%s key={someKey} {...props} />`,Se,ae,yr,ae),Ne[ae+Se]=!0}}return e===o?vr(w):dr(w),w}}function mr(e,r,a){return ze(e,r,a,!0)}function pr(e,r,a){return ze(e,r,a,!1)}var hr=pr,gr=mr;Ee.Fragment=o,Ee.jsx=hr,Ee.jsxs=gr}()),Ee}var He;function Tr(){return He||(He=1,process.env.NODE_ENV==="production"?_e.exports=xr():_e.exports=jr()),_e.exports}var b=Tr();const Or=t=>{const{fields:n,options:s,value:o,error:i={},name:l,readOnly:c}=t,f=o.map((m,E)=>{const d=(R,C)=>{m[R]=C,s.replaceElement(E,m)};return n.map((R,C)=>b.jsxs(L.Fragment,{children:[b.jsx(Fe,{field:R,formValues:m,onChange:d,value:m[R.name],error:R.name in(i[E]??{})?i[E][R.name]:void 0,readOnly:c}),!c&&b.jsx(U.Button,{onClick:()=>s.removeElement(E),children:"Remove"})]},C))});return b.jsxs(b.Fragment,{children:[typeof i=="string"&&b.jsx(U.Text,{c:"red",fz:"sm",fw:500,children:i}),f,!c&&b.jsx(U.Button,{display:"block",onClick:()=>s.addElement({}),children:"Add"})]})},wr=t=>{const{name:n,onChange:s,value:o,readOnly:i,label:l}=t;return b.jsx(U.Checkbox,{name:n,checked:o,readOnly:i,onChange:c=>s(n,c.target.checked),label:l})};var Re={exports:{}},Cr=Re.exports,Ze;function Sr(){return Ze||(Ze=1,function(t,n){(function(s,o){t.exports=o()})(Cr,function(){var s={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"},o=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,l=/\d\d/,c=/\d\d?/,f=/\d*[^-_:/,()\s\d]+/,m={},E=function(u){return(u=+u)+(u>68?1900:2e3)},d=function(u){return function(p){this[u]=+p}},R=[/[+-]\d\d:?(\d\d)?|Z/,function(u){(this.zone||(this.zone={})).offset=function(p){if(!p||p==="Z")return 0;var h=p.match(/([+-]|\d\d)/g),j=60*h[1]+(+h[2]||0);return j===0?0:h[0]==="+"?-j:j}(u)}],C=function(u){var p=m[u];return p&&(p.indexOf?p:p.s.concat(p.f))},I=function(u,p){var h,j=m.meridiem;if(j){for(var V=1;V<=24;V+=1)if(u.indexOf(j(V,0,p))>-1){h=V>12;break}}else h=u===(p?"pm":"PM");return h},oe={A:[f,function(u){this.afternoon=I(u,!1)}],a:[f,function(u){this.afternoon=I(u,!0)}],Q:[i,function(u){this.month=3*(u-1)+1}],S:[i,function(u){this.milliseconds=100*+u}],SS:[l,function(u){this.milliseconds=10*+u}],SSS:[/\d{3}/,function(u){this.milliseconds=+u}],s:[c,d("seconds")],ss:[c,d("seconds")],m:[c,d("minutes")],mm:[c,d("minutes")],H:[c,d("hours")],h:[c,d("hours")],HH:[c,d("hours")],hh:[c,d("hours")],D:[c,d("day")],DD:[l,d("day")],Do:[f,function(u){var p=m.ordinal,h=u.match(/\d+/);if(this.day=h[0],p)for(var j=1;j<=31;j+=1)p(j).replace(/\[|\]/g,"")===u&&(this.day=j)}],w:[c,d("week")],ww:[l,d("week")],M:[c,d("month")],MM:[l,d("month")],MMM:[f,function(u){var p=C("months"),h=(C("monthsShort")||p.map(function(j){return j.slice(0,3)})).indexOf(u)+1;if(h<1)throw new Error;this.month=h%12||h}],MMMM:[f,function(u){var p=C("months").indexOf(u)+1;if(p<1)throw new Error;this.month=p%12||p}],Y:[/[+-]?\d+/,d("year")],YY:[l,function(u){this.year=E(u)}],YYYY:[/\d{4}/,d("year")],Z:R,ZZ:R};function S(u){var p,h;p=u,h=m&&m.formats;for(var j=(u=p.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(H,N,M){var O=M&&M.toUpperCase();return N||h[M]||s[M]||h[O].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(D,k,z){return k||z.slice(1)})})).match(o),V=j.length,W=0;W<V;W+=1){var Q=j[W],J=oe[Q],q=J&&J[0],A=J&&J[1];j[W]=A?{regex:q,parser:A}:Q.replace(/^\[|\]$/g,"")}return function(H){for(var N={},M=0,O=0;M<V;M+=1){var D=j[M];if(typeof D=="string")O+=D.length;else{var k=D.regex,z=D.parser,ee=H.slice(O),Z=k.exec(ee)[0];z.call(N,Z),H=H.replace(Z,"")}}return function(B){var re=B.afternoon;if(re!==void 0){var P=B.hours;re?P<12&&(B.hours+=12):P===12&&(B.hours=0),delete B.afternoon}}(N),N}}return function(u,p,h){h.p.customParseFormat=!0,u&&u.parseTwoDigitYear&&(E=u.parseTwoDigitYear);var j=p.prototype,V=j.parse;j.parse=function(W){var Q=W.date,J=W.utc,q=W.args;this.$u=J;var A=q[1];if(typeof A=="string"){var H=q[2]===!0,N=q[3]===!0,M=H||N,O=q[2];N&&(O=q[2]),m=this.$locale(),!H&&O&&(m=h.Ls[O]),this.$d=function(ee,Z,B,re){try{if(["x","X"].indexOf(Z)>-1)return new Date((Z==="X"?1e3:1)*ee);var P=S(Z)(ee),ie=P.year,te=P.month,xe=P.day,je=P.hours,pe=P.minutes,he=P.seconds,se=P.milliseconds,ue=P.zone,ne=P.week,ge=new Date,ce=xe||(ie||te?1:ge.getDate()),ye=ie||ge.getFullYear(),le=0;ie&&!te||(le=te>0?te-1:ge.getMonth());var X,G=je||0,fe=pe||0,de=he||0,K=se||0;return ue?new Date(Date.UTC(ye,le,ce,G,fe,de,K+60*ue.offset*1e3)):B?new Date(Date.UTC(ye,le,ce,G,fe,de,K)):(X=new Date(ye,le,ce,G,fe,de,K),ne&&(X=re(X).week(ne).toDate()),X)}catch{return new Date("")}}(Q,A,J,h),this.init(),O&&O!==!0&&(this.$L=this.locale(O).$L),M&&Q!=this.format(A)&&(this.$d=new Date("")),m={}}else if(A instanceof Array)for(var D=A.length,k=1;k<=D;k+=1){q[1]=A[k-1];var z=h.apply(this,q);if(z.isValid()){this.$d=z.$d,this.$L=z.$L,this.init();break}k===D&&(this.$d=new Date(""))}else V.call(this,W)}}})}(Re)),Re.exports}var Dr=Sr();const Ge=Rr(Dr);Xe.extend(Ge);const Pr=t=>{const{name:n,onChange:s,value:o,readOnly:i}=t;return b.jsx(Pe.DateInput,{name:n,onChange:l=>s(n,l),value:o,readOnly:i,valueFormat:"YYYY-MM-DD",clearable:!0})};Xe.extend(Ge);const Fr=t=>{const{name:n,onChange:s,value:o,readOnly:i}=t;return b.jsx(Pe.DateTimePicker,{name:n,onChange:l=>s(n,l),value:o,readOnly:i,valueFormat:"YYYY-MM-DD HH:mm:ss",clearable:!0})},kr=t=>{const{name:n,onChange:s,value:o,readOnly:i}=t;return b.jsx(U.NumberInput,{name:n,onChange:l=>s(n,l),value:o,readOnly:i})},Yr=t=>{const{fields:n,name:s,onChange:o,value:i,formValues:l,error:c={},readOnly:f}=t,m=(d,R)=>{o(`${s}.${d}`,R)};return n.map((d,R)=>b.jsx(Fe,{field:d,formValues:l,onChange:m,value:i[d.name],error:c[d.name],readOnly:f},R))},Mr=t=>{const{data:n,name:s,onChange:o,value:i,readOnly:l}=t;return b.jsx(U.Select,{name:s,data:n,value:i,onChange:c=>o(s,c),readOnly:l,clearable:!0})},Ar=t=>{const{name:n,onChange:s,value:o,readOnly:i}=t;return b.jsx(U.Textarea,{name:n,onChange:l=>s(n,l.target.value),value:o,readOnly:i,styles:{input:{height:200}}})},$r=t=>{const{name:n,onChange:s,value:o,readOnly:i}=t;return b.jsx(U.TextInput,{name:n,onChange:l=>s(n,l.target.value),value:o,readOnly:i})},Lr=t=>{const{name:n,onChange:s,value:o,readOnly:i}=t,l=L.useRef(null),c=b.jsx(U.ActionIcon,{variant:"subtle",color:"gray",onClick:()=>{var f;return(f=l.current)==null?void 0:f.showPicker()},children:"🕛"});return b.jsx(Pe.TimeInput,{name:n,onChange:f=>s(n,f.target.value),value:o,readOnly:i,ref:l,rightSection:c,withSeconds:!0})};function Ir(t,n,s){return{addElement:o=>{n(t,[...s,o])},replaceElement:(o,i)=>{const l=s.map((c,f)=>f===o?i:c);n(t,l)},removeElement:o=>{n(t,s.filter((i,l)=>l!==o))}}}const Fe=({field:t,value:n,error:s,onChange:o,formValues:i,fieldContainer:l=m=>b.jsx(b.Fragment,{children:m}),customRender:c,readOnly:f})=>{const m=L.useMemo(()=>typeof t.visible=="function"?t.visible(i):t.visible!==!1,[t.visible,i]),E=L.useMemo(()=>typeof t.disabled=="function"?t.disabled(i):t.disabled===!0,[t.disabled,i]),d=L.useMemo(()=>{if(t.type==="array")return Ir(t.name,o,n)},[t.type,t.name,o,n]),R=L.useMemo(()=>c==null?void 0:c(t,n,s,o,i,d,f||t.readOnly),[c,t,n,s,o,i,d,f,t.readOnly]);if(!m)return null;if(R)return R;const C=()=>{switch(t.type){case"text":return b.jsx($r,{name:t.name,value:n,onChange:o,readOnly:f});case"number":return b.jsx(kr,{name:t.name,value:n,onChange:o,readOnly:f});case"object":return b.jsx(Yr,{name:t.name,onChange:o,value:n,fields:t.fields??[],formValues:i,error:s,readOnly:f});case"array":return b.jsx(Or,{name:t.name,onChange:o,value:n,fields:t.fields,options:d,error:s,readOnly:f});case"check":return b.jsx(wr,{name:t.name,value:n,onChange:o,readOnly:f,label:t.label});case"select":return b.jsx(Mr,{name:t.name,value:n,onChange:o,readOnly:f,data:t.data});case"textarea":return b.jsx(Ar,{name:t.name,value:n,onChange:o,readOnly:f});case"date":return b.jsx(Pr,{name:t.name,value:n,onChange:o,readOnly:f});case"datetime":return b.jsx(Fr,{name:t.name,value:n,onChange:o,readOnly:f});case"time":return b.jsx(Lr,{name:t.name,value:n,onChange:o,readOnly:f});default:return null}},I=b.jsxs(U.Fieldset,{legend:t.type==="check"?void 0:t.label,variant:"unstyled",disabled:E||f,styles:{legend:{fontWeight:500}},children:[C(),!["object","array"].includes(t.type)&&typeof s=="string"&&b.jsx(U.Text,{c:"red",fz:"sm",fw:500,children:s})]});return l(I,t)},[Vr,Br,Wr]=Er.createFormContext(),qr=t=>{switch(t){case"number":return 0;case"array":return[];case"check":return!1;case"object":return{};case"select":case"date":case"datetime":return null;default:return""}},Ke=t=>{const n={};for(const s of t)s.type==="object"&&s.fields?n[s.name]=Ke(s.fields):n[s.name]=s.initialValue??qr(s.type);return n},Ur=t=>t==null||typeof t=="string"&&t.trim()===""||Array.isArray(t)&&t.length===0,De=(t,n,s="")=>{const o={};for(const i of t){const l=s?`${s}.${i.name}`:i.name,c=n==null?void 0:n[i.name];if(i.type==="object")Object.assign(o,De(i.fields,c||{},l));else if(i.type==="array"){if(i.required&&(!Array.isArray(c)||c.length===0)){o[l]=i.name+" is required";continue}Array.isArray(c)&&c.forEach((f,m)=>{Object.assign(o,De(i.fields,f,`${l}.${m}`))})}else i.required&&Ur(c)&&(o[l]=i.name+" is required")}return o};function Nr(t){const n={};return Object.entries(t).forEach(([s,o])=>{const i=s.split(".");let l=n;i.forEach((c,f)=>{const m=f===i.length-1;i[f+1],m?l[c]=o:(c in l||(l[c]={}),l=l[c])})}),n}const zr=({onSubmit:t,schema:n,container:s,fieldContainer:o,customRender:i,validate:l,readOnly:c,values:f,onFieldChange:m})=>{const E=Wr({mode:"uncontrolled",initialValues:Ke(n),validate:l}),d=L.useMemo(()=>E.getValues(),[E.getValues()]),R=_r.useDebouncedCallback((S,u)=>{if(E.setFieldValue(S,u),m){const p=m(S,u,d);E.setValues(p)}},0),C=L.useCallback((S,u)=>{const p=E.errors;return S==="object"||S==="array"?Nr(p)[u]:p[u]},[E.errors]),I=L.useCallback(()=>{const S=E.getValues(),u=De(n,S);if(Object.keys(u).length>0){E.setErrors(u);return}E.onSubmit(t)()},[E,t,n]);L.useEffect(()=>{f&&E.initialize(f)},[f]);const oe=b.jsx(Vr,{form:E,children:n.map((S,u)=>b.jsx(Fe,{field:S,formValues:d,value:d[S.name],error:C(S.type,S.name),onChange:R,fieldContainer:o,customRender:i,readOnly:S.readOnly||c},u))});return s(oe,I,c)};exports.AutoForm=zr;
30
+ <%s key={someKey} {...props} />`,Rt,Ye,Ur,Ye),Kt[Ye+Rt]=!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 $t(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($t(e)),n=x.useRef(t),s=x.useCallback(i=>{r(u=>{const f=$t(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 At(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=At(`${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 Ft,nr;function cn(){return nr||(nr=1,Ft=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}),Ft}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=At(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=At(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=$t(e);return{hasErrors:Object.keys(t).length>0,errors:t}}function Nt(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)=>Nt(a,t,`${l}.${h}`,s)),lt in a&&(s[l]=a[lt](i,t,l))),typeof a=="object"&&typeof i=="object"&&i!==null&&(u||Nt(a,t,l,s),lt in a&&(s[l]=a[lt](i,t,l))),s},n)}function Yt(e,t){return ar(typeof e=="function"?e(t):Nt(e,t))}function ct(e,t,r){if(typeof e!="string")return{hasError:!1,error:null};const n=Yt(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=Yt(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:!Yt(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 Vt(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(Gt,{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 zt({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 Pt(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 It({value:e,type:t,name:r,form:n}){return S.jsx("input",{type:"hidden",value:Hn(e,t),name:r,form:n})}It.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")}})),Ht=_.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()})});Ht.classes=Sr;Ht.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)}})),Bt=_.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]})});Bt.classes=xr;Bt.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(Ht,{__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(Bt,{__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)=>zt({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)=>zt({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)=>zt({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(It,{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 Mt(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(Mt(e,0),Mt(t,0),Mt(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,...Et}=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}),[Tt,Ee]=Xe({type:"default",value:u,defaultValue:f,onChange:h,applyTimezone:!Ne}),Be={__staticSelector:ce||"Calendar",styles:rt,classNames:tt,unstyled:ue,size:Ce},jt=xe(),Le=w||y||1,Pe=new Date,nt=N&&N>Pe?N:Pe,ge=Tt||Te("add",nt,jt.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)},Ot=()=>{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)},Lt=()=>{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,...Et,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:Ot,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:Lt,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},Ut=_.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?Pt(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 Vt(()=>{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(It,{name:v,form:C,value:B,type:"default"})]})});Ut.classes={..._.Input.classes,...Ie.classes};Ut.displayName="@mantine/dates/DateInput";var Yr={timeWrapper:"m_208d2562",timeInput:"m_62ee059"};const Ms={dropdownType:"popover"},qt=_.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(Pt(he,A||Te("add",new Date,q.getTimezone())))}},ee=N=>{var ne;N&&U(Pt(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())};Vt(()=>{te||j(E(A))},[A,te]),Vt(()=>{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()}})]})]})});qt.classes={...Yr,...wt.classes,...kt.classes};qt.displayName="@mantine/dates/DateTimePicker";R.extend(gr);const $s=e=>{const{name:t,onChange:r,value:n,readOnly:s}=e;return S.jsx(Ut,{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(qt,{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(Gt,{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 Gt=({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,Wt=(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,Wt(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,Wt(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((m,d)=>{if(u.setFieldValue(m,d),i){const p=i(m,d,f);u.setValues(p)}},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=Wt(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(Gt,{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;