@mantine/dates
Advanced tools
Comparing version 2.3.0 to 2.3.1
@@ -56,3 +56,4 @@ 'use strict'; | ||
themeOverride, | ||
size: iconButtonSize | ||
size: iconButtonSize, | ||
"data-mantine-stop-propagation": true | ||
}, /* @__PURE__ */ React__default.createElement(ArrowIcon.ArrowIcon, { | ||
@@ -81,3 +82,4 @@ direction: "left", | ||
themeOverride, | ||
size: iconButtonSize | ||
size: iconButtonSize, | ||
"data-mantine-stop-propagation": true | ||
}, /* @__PURE__ */ React__default.createElement(ArrowIcon.ArrowIcon, { | ||
@@ -84,0 +86,0 @@ direction: "right", |
@@ -82,3 +82,4 @@ 'use strict'; | ||
onClear, | ||
positionDependencies = [] | ||
positionDependencies = [], | ||
zIndex = 3 | ||
} = _b, others = __objRest(_b, [ | ||
@@ -113,3 +114,4 @@ "themeOverride", | ||
"onClear", | ||
"positionDependencies" | ||
"positionDependencies", | ||
"zIndex" | ||
]); | ||
@@ -123,2 +125,3 @@ const theme = core.useMantineTheme(themeOverride); | ||
const uuid = hooks.useId(id); | ||
const clickOutsideRegister = core.useClickOutsideRegister(); | ||
const focusTrapRef = hooks.useFocusTrap(); | ||
@@ -141,2 +144,5 @@ const inputRef = React.useRef(); | ||
hooks.useWindowEvent("scroll", () => closeDropdownOnScroll && setDropdownOpened(false)); | ||
React.useEffect(() => { | ||
clickOutsideRegister(`${uuid}-dropdown`, dropdownElement); | ||
}, [dropdownElement]); | ||
const rightSection = clearable ? /* @__PURE__ */ React__default.createElement(core.CloseButton, { | ||
@@ -199,3 +205,3 @@ themeOverride, | ||
arrowSize: 3, | ||
zIndex: 3 | ||
zIndex | ||
}, /* @__PURE__ */ React__default.createElement("div", { | ||
@@ -205,2 +211,3 @@ className: classes.dropdownWrapper, | ||
ref: hooks.useMergedRef(focusTrapRef, setDropdownElement), | ||
"data-mantine-stop-propagation": dropdownType === "popover" && dropdownOpened, | ||
onKeyDownCapture: closeOnEscape | ||
@@ -207,0 +214,0 @@ }, /* @__PURE__ */ React__default.createElement(core.Paper, { |
@@ -105,2 +105,3 @@ 'use strict'; | ||
"data-autofocus": hasValue ? selected ? true : void 0 : firstInMonth ? true : void 0, | ||
"data-mantine-stop-propagation": true, | ||
style: __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, _styles.day), outside ? _styles.outside : null), weekend ? _styles.weekend : null), selected ? _styles.selected : null), inRange ? _styles.inRange : null), firstInRange ? _styles.firstInRange : null), lastInRange ? _styles.lastInRange : null), style), | ||
@@ -107,0 +108,0 @@ disabled, |
@@ -9,8 +9,8 @@ 'use strict'; | ||
function createTimeHandler({ onChange, nextRef, min, max, maxValue }) { | ||
return (value) => { | ||
return (value, triggerShift) => { | ||
var _a, _b, _c, _d; | ||
if (value === "00") { | ||
onChange("00"); | ||
(_a = nextRef == null ? void 0 : nextRef.current) == null ? void 0 : _a.focus(); | ||
(_b = nextRef == null ? void 0 : nextRef.current) == null ? void 0 : _b.select(); | ||
triggerShift && ((_a = nextRef == null ? void 0 : nextRef.current) == null ? void 0 : _a.focus()); | ||
triggerShift && ((_b = nextRef == null ? void 0 : nextRef.current) == null ? void 0 : _b.select()); | ||
return; | ||
@@ -24,4 +24,4 @@ } | ||
onChange(padTime.padTime(hooks.clamp({ value: parsed, min, max }))); | ||
(_c = nextRef == null ? void 0 : nextRef.current) == null ? void 0 : _c.focus(); | ||
(_d = nextRef == null ? void 0 : nextRef.current) == null ? void 0 : _d.select(); | ||
triggerShift && ((_c = nextRef == null ? void 0 : nextRef.current) == null ? void 0 : _c.focus()); | ||
triggerShift && ((_d = nextRef == null ? void 0 : nextRef.current) == null ? void 0 : _d.select()); | ||
return; | ||
@@ -28,0 +28,0 @@ } |
@@ -51,3 +51,4 @@ 'use strict'; | ||
size = "sm", | ||
max | ||
max, | ||
value | ||
} = _b, others = __objRest(_b, [ | ||
@@ -61,3 +62,4 @@ "elementRef", | ||
"size", | ||
"max" | ||
"max", | ||
"value" | ||
]); | ||
@@ -80,7 +82,15 @@ const inputRef = React.useRef(); | ||
event.preventDefault(); | ||
setValue(padTime.padTime(hooks.clamp({ value: parseInt(event.currentTarget.value, 10) + 1, max, min: 0 }))); | ||
const padded = padTime.padTime(hooks.clamp({ value: parseInt(event.currentTarget.value, 10) + 1, max, min: 0 })); | ||
if (value !== padded) { | ||
setValue(padded); | ||
onChange(padded, false); | ||
} | ||
} | ||
if (event.nativeEvent.code === "ArrowDown") { | ||
event.preventDefault(); | ||
setValue(padTime.padTime(hooks.clamp({ value: parseInt(event.currentTarget.value, 10) - 1, max, min: 0 }))); | ||
const padded = padTime.padTime(hooks.clamp({ value: parseInt(event.currentTarget.value, 10) - 1, max, min: 0 })); | ||
if (value !== padded) { | ||
setValue(padded); | ||
onChange(padded, false); | ||
} | ||
} | ||
@@ -91,7 +101,8 @@ }; | ||
ref: hooks.useMergedRef(inputRef, elementRef), | ||
onChange: (event) => onChange(event.currentTarget.value), | ||
onChange: (event) => onChange(event.currentTarget.value, true), | ||
onClick: handleClick, | ||
onFocus: handleFocus, | ||
onBlur: handleBlur, | ||
onKeyDown: handleKeyDown | ||
onKeyDown: handleKeyDown, | ||
value | ||
}, others)), withSeparator && /* @__PURE__ */ React__default.createElement(core.Text, { | ||
@@ -98,0 +109,0 @@ size, |
@@ -48,3 +48,4 @@ import React from 'react'; | ||
themeOverride, | ||
size: iconButtonSize | ||
size: iconButtonSize, | ||
"data-mantine-stop-propagation": true | ||
}, /* @__PURE__ */ React.createElement(ArrowIcon, { | ||
@@ -73,3 +74,4 @@ direction: "left", | ||
themeOverride, | ||
size: iconButtonSize | ||
size: iconButtonSize, | ||
"data-mantine-stop-propagation": true | ||
}, /* @__PURE__ */ React.createElement(ArrowIcon, { | ||
@@ -76,0 +78,0 @@ direction: "right", |
@@ -1,3 +0,3 @@ | ||
import React, { useState, useRef } from 'react'; | ||
import { useMantineTheme, mergeStyles, InputWrapper, Input, getSizeValue, Text, Popper, Paper, Modal, CloseButton } from '@mantine/core'; | ||
import React, { useState, useRef, useEffect } from 'react'; | ||
import { useMantineTheme, mergeStyles, useClickOutsideRegister, InputWrapper, Input, getSizeValue, Text, Popper, Paper, Modal, CloseButton } from '@mantine/core'; | ||
import { useId, useFocusTrap, useClickOutside, useWindowEvent, useMergedRef, useReducedMotion } from '@mantine/hooks'; | ||
@@ -74,3 +74,4 @@ import useStyles from './DatePickerBase.styles.js'; | ||
onClear, | ||
positionDependencies = [] | ||
positionDependencies = [], | ||
zIndex = 3 | ||
} = _b, others = __objRest(_b, [ | ||
@@ -105,3 +106,4 @@ "themeOverride", | ||
"onClear", | ||
"positionDependencies" | ||
"positionDependencies", | ||
"zIndex" | ||
]); | ||
@@ -115,2 +117,3 @@ const theme = useMantineTheme(themeOverride); | ||
const uuid = useId(id); | ||
const clickOutsideRegister = useClickOutsideRegister(); | ||
const focusTrapRef = useFocusTrap(); | ||
@@ -133,2 +136,5 @@ const inputRef = useRef(); | ||
useWindowEvent("scroll", () => closeDropdownOnScroll && setDropdownOpened(false)); | ||
useEffect(() => { | ||
clickOutsideRegister(`${uuid}-dropdown`, dropdownElement); | ||
}, [dropdownElement]); | ||
const rightSection = clearable ? /* @__PURE__ */ React.createElement(CloseButton, { | ||
@@ -191,3 +197,3 @@ themeOverride, | ||
arrowSize: 3, | ||
zIndex: 3 | ||
zIndex | ||
}, /* @__PURE__ */ React.createElement("div", { | ||
@@ -197,2 +203,3 @@ className: classes.dropdownWrapper, | ||
ref: useMergedRef(focusTrapRef, setDropdownElement), | ||
"data-mantine-stop-propagation": dropdownType === "popover" && dropdownOpened, | ||
onKeyDownCapture: closeOnEscape | ||
@@ -199,0 +206,0 @@ }, /* @__PURE__ */ React.createElement(Paper, { |
@@ -96,2 +96,3 @@ import React from 'react'; | ||
"data-autofocus": hasValue ? selected ? true : void 0 : firstInMonth ? true : void 0, | ||
"data-mantine-stop-propagation": true, | ||
style: __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, _styles.day), outside ? _styles.outside : null), weekend ? _styles.weekend : null), selected ? _styles.selected : null), inRange ? _styles.inRange : null), firstInRange ? _styles.firstInRange : null), lastInRange ? _styles.lastInRange : null), style), | ||
@@ -98,0 +99,0 @@ disabled, |
@@ -5,8 +5,8 @@ import { clamp } from '@mantine/hooks'; | ||
function createTimeHandler({ onChange, nextRef, min, max, maxValue }) { | ||
return (value) => { | ||
return (value, triggerShift) => { | ||
var _a, _b, _c, _d; | ||
if (value === "00") { | ||
onChange("00"); | ||
(_a = nextRef == null ? void 0 : nextRef.current) == null ? void 0 : _a.focus(); | ||
(_b = nextRef == null ? void 0 : nextRef.current) == null ? void 0 : _b.select(); | ||
triggerShift && ((_a = nextRef == null ? void 0 : nextRef.current) == null ? void 0 : _a.focus()); | ||
triggerShift && ((_b = nextRef == null ? void 0 : nextRef.current) == null ? void 0 : _b.select()); | ||
return; | ||
@@ -20,4 +20,4 @@ } | ||
onChange(padTime(clamp({ value: parsed, min, max }))); | ||
(_c = nextRef == null ? void 0 : nextRef.current) == null ? void 0 : _c.focus(); | ||
(_d = nextRef == null ? void 0 : nextRef.current) == null ? void 0 : _d.select(); | ||
triggerShift && ((_c = nextRef == null ? void 0 : nextRef.current) == null ? void 0 : _c.focus()); | ||
triggerShift && ((_d = nextRef == null ? void 0 : nextRef.current) == null ? void 0 : _d.select()); | ||
return; | ||
@@ -24,0 +24,0 @@ } |
@@ -43,3 +43,4 @@ import React, { useRef } from 'react'; | ||
size = "sm", | ||
max | ||
max, | ||
value | ||
} = _b, others = __objRest(_b, [ | ||
@@ -53,3 +54,4 @@ "elementRef", | ||
"size", | ||
"max" | ||
"max", | ||
"value" | ||
]); | ||
@@ -72,7 +74,15 @@ const inputRef = useRef(); | ||
event.preventDefault(); | ||
setValue(padTime(clamp({ value: parseInt(event.currentTarget.value, 10) + 1, max, min: 0 }))); | ||
const padded = padTime(clamp({ value: parseInt(event.currentTarget.value, 10) + 1, max, min: 0 })); | ||
if (value !== padded) { | ||
setValue(padded); | ||
onChange(padded, false); | ||
} | ||
} | ||
if (event.nativeEvent.code === "ArrowDown") { | ||
event.preventDefault(); | ||
setValue(padTime(clamp({ value: parseInt(event.currentTarget.value, 10) - 1, max, min: 0 }))); | ||
const padded = padTime(clamp({ value: parseInt(event.currentTarget.value, 10) - 1, max, min: 0 })); | ||
if (value !== padded) { | ||
setValue(padded); | ||
onChange(padded, false); | ||
} | ||
} | ||
@@ -83,7 +93,8 @@ }; | ||
ref: useMergedRef(inputRef, elementRef), | ||
onChange: (event) => onChange(event.currentTarget.value), | ||
onChange: (event) => onChange(event.currentTarget.value, true), | ||
onClick: handleClick, | ||
onFocus: handleFocus, | ||
onBlur: handleBlur, | ||
onKeyDown: handleKeyDown | ||
onKeyDown: handleKeyDown, | ||
value | ||
}, others)), withSeparator && /* @__PURE__ */ React.createElement(Text, { | ||
@@ -90,0 +101,0 @@ size, |
@@ -35,2 +35,4 @@ import React from 'react'; | ||
positionDependencies?: any[]; | ||
/** Popper zIndex */ | ||
zIndex?: number; | ||
} | ||
@@ -49,3 +51,3 @@ export interface DatePickerBaseProps extends DatePickerBaseSharedProps { | ||
} | ||
export declare function DatePickerBase({ themeOverride, classNames, className, style, styles, wrapperProps, required, label, error, id, description, placeholder, shadow, transition, transitionDuration, transitionTimingFunction, elementRef, closeDropdownOnScroll, size, children, inputLabel, __staticSelector, dropdownOpened, setDropdownOpened, dropdownType, clearable, clearButtonLabel, onClear, positionDependencies, ...others }: DatePickerBaseProps): JSX.Element; | ||
export declare function DatePickerBase({ themeOverride, classNames, className, style, styles, wrapperProps, required, label, error, id, description, placeholder, shadow, transition, transitionDuration, transitionTimingFunction, elementRef, closeDropdownOnScroll, size, children, inputLabel, __staticSelector, dropdownOpened, setDropdownOpened, dropdownType, clearable, clearButtonLabel, onClear, positionDependencies, zIndex, ...others }: DatePickerBaseProps): JSX.Element; | ||
export declare namespace DatePickerBase { | ||
@@ -52,0 +54,0 @@ var displayName: string; |
@@ -9,4 +9,4 @@ /// <reference types="react" /> | ||
} | ||
export declare function createTimeHandler({ onChange, nextRef, min, max, maxValue }: CreateTimeHandler): (value: string) => void; | ||
export declare function createTimeHandler({ onChange, nextRef, min, max, maxValue }: CreateTimeHandler): (value: string, triggerShift: boolean) => void; | ||
export {}; | ||
//# sourceMappingURL=create-time-handler.d.ts.map |
@@ -7,3 +7,3 @@ import React from 'react'; | ||
/** Called with onChange event */ | ||
onChange(value: string): void; | ||
onChange(value: string, triggerShift: boolean): void; | ||
/** Called when input loses focus, used to format value */ | ||
@@ -18,3 +18,3 @@ setValue(value: string): void; | ||
} | ||
export declare function TimeField({ elementRef, onFocus, onBlur, onChange, setValue, withSeparator, size, max, ...others }: TimeFieldProps): JSX.Element; | ||
export declare function TimeField({ elementRef, onFocus, onBlur, onChange, setValue, withSeparator, size, max, value, ...others }: TimeFieldProps): JSX.Element; | ||
export declare namespace TimeField { | ||
@@ -21,0 +21,0 @@ var displayName: string; |
@@ -1,2 +0,2 @@ | ||
(function(j,ae){typeof exports=="object"&&typeof module!="undefined"?ae(exports,require("dayjs"),require("react"),require("@mantine/hooks"),require("@mantine/core")):typeof define=="function"&&define.amd?define(["exports","dayjs","react","@mantine/hooks","@mantine/core"],ae):(j=typeof globalThis!="undefined"?globalThis:j||self,ae(j["@mantine/dates"]={},j.dayjs,j.React,j["@mantine/hooks"],j["@mantine/core"]))})(this,function(j,ae,Y,$,l){"use strict";function Ne(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var v=Ne(ae),r=Ne(Y);function xe(e){const t=new Date(e),a=t.getDay();return a!==0&&t.setDate(t.getDate()+(7-a)),t}function be(e){const t=new Date(e),a=t.getDay()||7;return a!==1&&t.setHours(-24*(a-1)),t}function je(e){const t=e.getMonth(),a=new Date(e.getFullYear(),t,1),n=new Date(e.getFullYear(),e.getMonth()+1,0),i=xe(n),s=be(a),c=[];for(;s<=i;){const m=[];for(let u=0;u<7;u+=1)m.push(new Date(s)),s.setDate(s.getDate()+1);c.push(m)}return c}function Te(e){const t=[],a=new Date(2021,0,1);for(let n=0;n<12;n+=1)t.push(v(a).locale(e).format("MMMM")),a.setMonth(a.getMonth()+1);return t}function Ve(e){const t=[],a=be(new Date);for(let n=0;n<7;n+=1)t.push(v(a).locale(e).format("dd")),a.setDate(a.getDate()+1);return t}function ze(e){const t=[];for(let a=e.from;a<=e.to;a+=1)t.push(a);return t}function Oe(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function ne(e,t){return Oe(e,t)&&e.getDate()===t.getDate()}function Le(e){var t,a,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(a=Le(e[t]))&&(n&&(n+=" "),n+=a);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function we(){for(var e=0,t,a,n="";e<arguments.length;)(t=arguments[e++])&&(a=Le(t))&&(n&&(n+=" "),n+=a);return n}var Tt=Object.defineProperty,Vt=Object.defineProperties,zt=Object.getOwnPropertyDescriptors,Fe=Object.getOwnPropertySymbols,Lt=Object.prototype.hasOwnProperty,Ft=Object.prototype.propertyIsEnumerable,ke=(e,t,a)=>t in e?Tt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,We=(e,t)=>{for(var a in t||(t={}))Lt.call(t,a)&&ke(e,a,t[a]);if(Fe)for(var a of Fe(t))Ft.call(t,a)&&ke(e,a,t[a]);return e},kt=(e,t)=>Vt(e,zt(t));const re={xs:34,sm:38,md:46,lg:58,xl:66};var Wt=l.createMemoStyles({weekend:{},outside:{},selected:{},inRange:{},firstInRange:{},lastInRange:{},day:({theme:e,size:t,fullWidth:a})=>kt(We(We({},l.getFontStyles(e)),l.getFocusStyles(e)),{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",width:a?"100%":l.getSizeValue({size:t,sizes:re}),height:l.getSizeValue({size:t,sizes:re}),lineHeight:`${l.getSizeValue({size:t,sizes:re})}px`,fontSize:l.getSizeValue({size:t,sizes:e.fontSizes}),padding:0,borderRadius:e.radius.sm,border:"1px dotted transparent",cursor:"pointer",userSelect:"none",color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],"&:disabled":{pointerEvents:"none",color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]},"&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]},"&$weekend:not(:disabled)":{color:e.colorScheme==="dark"?e.colors.red[5]:e.colors.red[7]},"&$outside":{color:`${e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]} !important`},"&$inRange:not(:disabled)":{backgroundColor:e.colorScheme==="dark"?l.hexToRgba(e.colors[e.primaryColor][9],.3):e.colors[e.primaryColor][0],borderRadius:0},"&$selected:not(:disabled)":{backgroundColor:e.colors[e.primaryColor][6],color:e.white},"&$firstInRange:not(:disabled)":{borderTopLeftRadius:e.radius.sm,borderBottomLeftRadius:e.radius.sm},"&$lastInRange:not(:disabled)":{borderTopRightRadius:e.radius.sm,borderBottomRightRadius:e.radius.sm}})}),Yt=Object.defineProperty,Bt=Object.defineProperties,At=Object.getOwnPropertyDescriptors,le=Object.getOwnPropertySymbols,Ye=Object.prototype.hasOwnProperty,Be=Object.prototype.propertyIsEnumerable,Ae=(e,t,a)=>t in e?Yt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,J=(e,t)=>{for(var a in t||(t={}))Ye.call(t,a)&&Ae(e,a,t[a]);if(le)for(var a of le(t))Be.call(t,a)&&Ae(e,a,t[a]);return e},Ht=(e,t)=>Bt(e,At(t)),Ut=(e,t)=>{var a={};for(var n in e)Ye.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&le)for(var n of le(e))t.indexOf(n)<0&&Be.call(e,n)&&(a[n]=e[n]);return a};function He(e){var t=e,{className:a,style:n,value:i,selected:s,weekend:c,outside:m,onClick:u,elementRef:f,onKeyDown:y,onMouseEnter:_,themeOverride:R,classNames:x,disabled:I,styles:E,hasValue:d,firstInRange:S,lastInRange:C,__staticSelector:T="month",inRange:h,size:V,fullWidth:k,firstInMonth:D}=t,z=Ut(t,["className","style","value","selected","weekend","outside","onClick","elementRef","onKeyDown","onMouseEnter","themeOverride","classNames","disabled","styles","hasValue","firstInRange","lastInRange","__staticSelector","inRange","size","fullWidth","firstInMonth"]);const B=l.useMantineTheme(R),g=Wt({theme:B,size:V,fullWidth:k},x,T),b=l.mergeStyles(g,E);return r.createElement("button",Ht(J({},z),{type:"button",onClick:u,ref:f,onKeyDown:P=>y(i,P),onMouseEnter:P=>_(i,P),tabIndex:d?s?0:-1:D?0:-1,"data-autofocus":d?s?!0:void 0:D?!0:void 0,style:J(J(J(J(J(J(J(J({},b.day),m?b.outside:null),c?b.weekend:null),s?b.selected:null),h?b.inRange:null),S?b.firstInRange:null),C?b.lastInRange:null),n),disabled:I,className:we(g.day,{[g.outside]:m,[g.weekend]:c,[g.selected]:s,[g.inRange]:h,[g.firstInRange]:S,[g.lastInRange]:C},a)}),i.getDate())}He.displayName="@mantine/core/Day";function qt({date:e,month:t,hasValue:a,minDate:n,maxDate:i,value:s,excludeDate:c,disableOutsideEvents:m,range:u}){const f=e.getDay(),y=f===6||f===0,_=e.getMonth()!==t.getMonth(),R=a&&ne(e,s),x=i instanceof Date&&v(i).isBefore(e,"day"),I=n instanceof Date&&v(n).isAfter(e,"day"),E=typeof c=="function"&&c(e),S=x||I||E||m&&_,C=Array.isArray(u)&&u.every(z=>z instanceof Date),T=C&&[v(u[0]).subtract(1,"day"),v(u[1]).add(1,"day")],h=C&&ne(e,u[0]),V=C&&ne(e,u[1]),k=C&&v(e).isAfter(T[0],"day")&&v(e).isBefore(T[1],"day");return{selectedInRange:h||V,selected:R,disabled:S,inRange:k,firstInRange:h,lastInRange:V,weekend:y,outside:_}}var Kt=Object.defineProperty,Gt=Object.defineProperties,Zt=Object.getOwnPropertyDescriptors,Ue=Object.getOwnPropertySymbols,Jt=Object.prototype.hasOwnProperty,Qt=Object.prototype.propertyIsEnumerable,qe=(e,t,a)=>t in e?Kt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Xt=(e,t)=>{for(var a in t||(t={}))Jt.call(t,a)&&qe(e,a,t[a]);if(Ue)for(var a of Ue(t))Qt.call(t,a)&&qe(e,a,t[a]);return e},ea=(e,t)=>Gt(e,Zt(t)),ta=l.createMemoStyles({weekday:({theme:e})=>({color:e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[5]}),root:({theme:e,fullWidth:t})=>ea(Xt({},l.getFontStyles(e)),{borderCollapse:"collapse",width:t?"100%":"auto",tableLayout:"fixed"}),cell:{boxSizing:"border-box",padding:0,borderTop:"1px solid transparent"},weekdayCell:({theme:e})=>({boxSizing:"border-box",padding:0,fontWeight:"normal",paddingBottom:e.spacing.xs/2,textAlign:"center",cursor:"default",userSelect:"none"})}),aa=Object.defineProperty,oe=Object.getOwnPropertySymbols,Ke=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable,Ze=(e,t,a)=>t in e?aa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Se=(e,t)=>{for(var a in t||(t={}))Ke.call(t,a)&&Ze(e,a,t[a]);if(oe)for(var a of oe(t))Ge.call(t,a)&&Ze(e,a,t[a]);return e},na=(e,t)=>{var a={};for(var n in e)Ke.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&oe)for(var n of oe(e))t.indexOf(n)<0&&Ge.call(e,n)&&(a[n]=e[n]);return a};const ra=()=>{};function se(e){var t=e,{className:a,style:n,month:i,value:s,onChange:c,autoFocus:m=!1,disableOutsideEvents:u=!1,locale:f="en",dayClassName:y,dayStyle:_,themeOverride:R,classNames:x,styles:I,minDate:E,maxDate:d,excludeDate:S,onDayMouseEnter:C,range:T,hideWeekdays:h=!1,__staticSelector:V="month",size:k="sm",fullWidth:D=!1}=t,z=na(t,["className","style","month","value","onChange","autoFocus","disableOutsideEvents","locale","dayClassName","dayStyle","themeOverride","classNames","styles","minDate","maxDate","excludeDate","onDayMouseEnter","range","hideWeekdays","__staticSelector","size","fullWidth"]);const B=l.useMantineTheme(R),g=ta({theme:B,fullWidth:D},x,V),b=l.mergeStyles(g,I),P=Y.useRef({}),N=je(i),M=(O,L)=>{const p=new Date(O);p.setDate(O.getDate()+L),p.toISOString()in P.current&&(!Oe(i,p)&&u||P.current[p.toISOString()].focus())},H=(O,L)=>{const{code:p}=L.nativeEvent;p==="ArrowUp"&&(L.preventDefault(),M(O,-7)),p==="ArrowDown"&&(L.preventDefault(),M(O,7)),p==="ArrowRight"&&(L.preventDefault(),O.getDay()!==0&&M(O,1)),p==="ArrowLeft"&&(L.preventDefault(),O.getDay()!==1&&M(O,-1))};Y.useEffect(()=>{if(m){const O=new Date(i.getFullYear(),i.getMonth(),s?s.getDate():1).toISOString();O in P.current&&P.current[O].focus()}},[]);const K=Ve(f).map(O=>r.createElement("th",{className:g.weekdayCell,style:b.weekdayCell,key:O},r.createElement(l.Text,{size:k,className:g.weekday,style:b.weekday},$.upperFirst(O)))),A=s instanceof Date,U=A&&v(s).isAfter(v(i).startOf("month"))&&v(s).isBefore(v(i).endOf("month")),W=N.map((O,L)=>{const p=O.map((o,w)=>{const F=qt({date:o,month:i,hasValue:A,minDate:E,maxDate:d,value:s,excludeDate:S,disableOutsideEvents:u,range:T});return r.createElement("td",{className:g.cell,style:b.cell,key:w},r.createElement(He,{elementRef:Q=>{P.current[o.toISOString()]=Q},onClick:()=>typeof c=="function"&&c(o),value:o,outside:F.outside,weekend:F.weekend,inRange:F.inRange,firstInRange:F.firstInRange,lastInRange:F.lastInRange,firstInMonth:w===0&&L===0,selected:F.selected||F.selectedInRange,hasValue:U,onKeyDown:H,themeOverride:R,className:typeof y=="function"?y(o,F):null,style:typeof _=="function"?_(o,F):null,styles:I,classNames:x,disabled:F.disabled,__staticSelector:V,onMouseEnter:typeof C=="function"?C:ra,size:k,fullWidth:D}))});return r.createElement("tr",{key:L},p)});return r.createElement("table",Se({className:we(g.root,a),style:Se(Se({},n),b.root)},z),!h&&r.createElement("thead",null,r.createElement("tr",null,K)),r.createElement("tbody",null,W))}se.displayName="@mantine/core/Month";var la=Object.defineProperty,oa=Object.defineProperties,sa=Object.getOwnPropertyDescriptors,ie=Object.getOwnPropertySymbols,Je=Object.prototype.hasOwnProperty,Qe=Object.prototype.propertyIsEnumerable,Xe=(e,t,a)=>t in e?la(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,et=(e,t)=>{for(var a in t||(t={}))Je.call(t,a)&&Xe(e,a,t[a]);if(ie)for(var a of ie(t))Qe.call(t,a)&&Xe(e,a,t[a]);return e},ia=(e,t)=>oa(e,sa(t)),ca=(e,t)=>{var a={};for(var n in e)Je.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&ie)for(var n of ie(e))t.indexOf(n)<0&&Qe.call(e,n)&&(a[n]=e[n]);return a};function De(e){var t=e,{direction:a,style:n}=t,i=ca(t,["direction","style"]);return r.createElement("svg",et({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:ia(et({},n),{transform:a==="right"?"rotate(180deg)":"none"})},i),r.createElement("path",{d:"M8.84182 3.13514C9.04327 3.32401 9.05348 3.64042 8.86462 3.84188L5.43521 7.49991L8.86462 11.1579C9.05348 11.3594 9.04327 11.6758 8.84182 11.8647C8.64036 12.0535 8.32394 12.0433 8.13508 11.8419L4.38508 7.84188C4.20477 7.64955 4.20477 7.35027 4.38508 7.15794L8.13508 3.15794C8.32394 2.95648 8.64036 2.94628 8.84182 3.13514Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}De.displayName="@mantine/dates/ArrowIcon";var da=l.createMemoStyles({selectGroup:{},select:{},label:{}});function tt({locale:e,classNames:t,styles:a,withSelect:n,yearsRange:i,value:s,themeOverride:c,labelFormat:m,onChange:u,size:f,__staticSelector:y,monthLabel:_,yearLabel:R}){const x=l.useMantineTheme(c),I=f==="lg"||f==="xl"?"md":"xs",E=da({theme:x},t,y),d=l.mergeStyles(E,a);return n?r.createElement(l.Group,{spacing:5,noWrap:!0,themeOverride:c,className:E.selectGroup,style:d.selectGroup},r.createElement(l.NativeSelect,{"aria-label":_,className:E.select,style:d.select,size:I,themeOverride:c,value:s.getMonth(),onChange:S=>u(v(s).set("month",parseInt(S.currentTarget.value,10)).toDate()),data:Te(e).map((S,C)=>({label:$.upperFirst(S),value:C.toString()}))}),r.createElement(l.NativeSelect,{"aria-label":R,className:E.select,style:d.select,size:I,themeOverride:c,value:s.getFullYear(),onChange:S=>u(v(s).set("year",parseInt(S.currentTarget.value,10)).toDate()),data:ze(i).map(S=>({label:S.toString(),value:S.toString()}))})):r.createElement(l.Text,{className:E.label,style:d.label,size:f},$.upperFirst(v(s).locale(e).format(m)))}tt.displayName="@mantine/dates/CalendarLabel";const ua={xs:10,sm:12,md:14,lg:18,xl:20};function Pe({size:e,themeOverride:t,nextMonthLabel:a,previousMonthLabel:n,previousMonthDisabled:i,nextMonthDisabled:s,onPreviousMonth:c,onNextMonth:m,classNames:u,styles:f,locale:y,withSelect:_,yearsRange:R,month:x,setMonth:I,labelFormat:E,__staticSelector:d,monthLabel:S,yearLabel:C}){const T=l.useMantineTheme(t),h=l.getSizeValue({size:e,sizes:ua}),V=l.getSizeValue({size:e,sizes:re});return r.createElement(l.Group,{position:"apart",noWrap:!0,themeOverride:t,style:{marginBottom:T.spacing.xs/2}},r.createElement(l.ActionIcon,{"aria-label":n,onClick:c,disabled:i,themeOverride:t,size:V},r.createElement(De,{direction:"left",width:h,height:h})),r.createElement(tt,{locale:y,classNames:u,styles:f,withSelect:_,yearsRange:R,value:x,onChange:I,labelFormat:E,themeOverride:t,size:e,__staticSelector:d,monthLabel:S,yearLabel:C}),r.createElement(l.ActionIcon,{"aria-label":a,onClick:m,disabled:s,themeOverride:t,size:V},r.createElement(De,{direction:"right",width:h,height:h})))}Pe.displayName="@mantine/dates/CalendarHeader";var fa=Object.defineProperty,ce=Object.getOwnPropertySymbols,at=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable,rt=(e,t,a)=>t in e?fa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,lt=(e,t)=>{for(var a in t||(t={}))at.call(t,a)&&rt(e,a,t[a]);if(ce)for(var a of ce(t))nt.call(t,a)&&rt(e,a,t[a]);return e},pa=(e,t)=>{var a={};for(var n in e)at.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&ce)for(var n of ce(e))t.indexOf(n)<0&&nt.call(e,n)&&(a[n]=e[n]);return a};function Me(e){var t=e,{size:a,fullWidth:n,style:i}=t,s=pa(t,["size","fullWidth","style"]);return r.createElement("div",lt({style:lt({maxWidth:n?"100%":l.getSizeValue({size:a,sizes:re})*7},i)},s))}Me.displayName="@mantine/dates/CalendarWrapper";function ot({maxDate:e,minDate:t,month:a}){const n=e instanceof Date&&v(a).endOf("month").isAfter(v(e).endOf("day").subtract(1,"minute")),i=t instanceof Date&&v(a).startOf("month").isBefore(v(t).startOf("day").add(1,"minute"));return{nextDisabled:n,previousDisabled:i}}var ma=Object.defineProperty,de=Object.getOwnPropertySymbols,st=Object.prototype.hasOwnProperty,it=Object.prototype.propertyIsEnumerable,ct=(e,t,a)=>t in e?ma(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,ya=(e,t)=>{for(var a in t||(t={}))st.call(t,a)&&ct(e,a,t[a]);if(de)for(var a of de(t))it.call(t,a)&&ct(e,a,t[a]);return e},ga=(e,t)=>{var a={};for(var n in e)st.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&de)for(var n of de(e))t.indexOf(n)<0&&it.call(e,n)&&(a[n]=e[n]);return a};function $e(e){var t=e,{classNames:a,styles:n,locale:i="en",themeOverride:s,nextMonthLabel:c,previousMonthLabel:m,initialMonth:u,month:f,onMonthChange:y,value:_,onChange:R,labelFormat:x="MMMM YYYY",withSelect:I=!1,yearsRange:E={from:2020,to:2030},dayClassName:d,dayStyle:S,disableOutsideEvents:C,minDate:T,maxDate:h,excludeDate:V,fullWidth:k=!1,size:D="sm",__staticSelector:z="calendar",monthLabel:B,yearLabel:g}=t,b=ga(t,["classNames","styles","locale","themeOverride","nextMonthLabel","previousMonthLabel","initialMonth","month","onMonthChange","value","onChange","labelFormat","withSelect","yearsRange","dayClassName","dayStyle","disableOutsideEvents","minDate","maxDate","excludeDate","fullWidth","size","__staticSelector","monthLabel","yearLabel"]);const[P,N]=$.useUncontrolled({value:f,defaultValue:u,finalValue:new Date,onChange:y,rule:H=>H instanceof Date}),M=ot({month:P,minDate:T,maxDate:h});return r.createElement(Me,ya({size:D,fullWidth:k},b),r.createElement(Pe,{size:D,themeOverride:s,nextMonthLabel:c,previousMonthLabel:m,previousMonthDisabled:M.previousDisabled,nextMonthDisabled:M.nextDisabled,onPreviousMonth:()=>N(v(P).subtract(1,"month").toDate()),onNextMonth:()=>N(v(P).add(1,"month").toDate()),classNames:a,styles:n,locale:i,withSelect:I,yearsRange:E,month:P,setMonth:N,labelFormat:x,__staticSelector:z,monthLabel:B,yearLabel:g}),r.createElement(se,{themeOverride:s,month:P,value:_,onChange:R,dayClassName:d,dayStyle:S,disableOutsideEvents:C,minDate:T,maxDate:h,excludeDate:V,classNames:a,styles:n,fullWidth:k,size:D,locale:i,__staticSelector:z}))}$e.displayName="@mantine/dates/Calendar";var va=Object.defineProperty,_a=Object.defineProperties,ha=Object.getOwnPropertyDescriptors,dt=Object.getOwnPropertySymbols,ba=Object.prototype.hasOwnProperty,Oa=Object.prototype.propertyIsEnumerable,ut=(e,t,a)=>t in e?va(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,wa=(e,t)=>{for(var a in t||(t={}))ba.call(t,a)&&ut(e,a,t[a]);if(dt)for(var a of dt(t))Oa.call(t,a)&&ut(e,a,t[a]);return e},Sa=(e,t)=>_a(e,ha(t)),Da=l.createMemoStyles({wrapper:({theme:e})=>Sa(wa({},l.getFontStyles(e)),{position:"relative",cursor:"pointer"}),placeholder:({theme:e,size:t,invalid:a})=>({lineHeight:`${l.getSizeValue({size:t,sizes:l.INPUT_SIZES})-2}px`,color:a?e.colors.red[e.colorScheme==="dark"?6:7]:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}),dropdownWrapper:{position:"relative",pointerEvents:"all"},input:{cursor:"pointer"},dropdown:({theme:e})=>({position:"absolute",left:0,top:e.spacing.xs,backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,border:`1px solid ${e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[2]}`,zIndex:4,padding:[e.spacing.md,e.spacing.xs],"&::before":{content:'""',position:"absolute",top:-5,height:8,width:8,transform:"rotate(45deg)",backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,borderTop:`1px solid ${e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[2]}`,borderLeft:`1px solid ${e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[2]}`}})}),Pa=Object.defineProperty,Ma=Object.defineProperties,$a=Object.getOwnPropertyDescriptors,ue=Object.getOwnPropertySymbols,ft=Object.prototype.hasOwnProperty,pt=Object.prototype.propertyIsEnumerable,mt=(e,t,a)=>t in e?Pa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,fe=(e,t)=>{for(var a in t||(t={}))ft.call(t,a)&&mt(e,a,t[a]);if(ue)for(var a of ue(t))pt.call(t,a)&&mt(e,a,t[a]);return e},yt=(e,t)=>Ma(e,$a(t)),Ea=(e,t)=>{var a={};for(var n in e)ft.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&ue)for(var n of ue(e))t.indexOf(n)<0&&pt.call(e,n)&&(a[n]=e[n]);return a};const Ca={xs:24,sm:30,md:34,lg:40,xl:44};function Ee(e){var t=e,{themeOverride:a,classNames:n,className:i,style:s,styles:c,wrapperProps:m,required:u,label:f,error:y,id:_,description:R,placeholder:x,shadow:I="sm",transition:E="pop-top-left",transitionDuration:d=200,transitionTimingFunction:S,elementRef:C,closeDropdownOnScroll:T=!0,size:h="sm",children:V,inputLabel:k,__staticSelector:D="date-picker",dropdownOpened:z,setDropdownOpened:B,dropdownType:g="popover",clearable:b=!0,clearButtonLabel:P,onClear:N,positionDependencies:M=[]}=t,H=Ea(t,["themeOverride","classNames","className","style","styles","wrapperProps","required","label","error","id","description","placeholder","shadow","transition","transitionDuration","transitionTimingFunction","elementRef","closeDropdownOnScroll","size","children","inputLabel","__staticSelector","dropdownOpened","setDropdownOpened","dropdownType","clearable","clearButtonLabel","onClear","positionDependencies"]);const K=l.useMantineTheme(a),A=Da({theme:K,size:h,invalid:!!y},n,D),U=l.mergeStyles(A,c),[W,O]=Y.useState(null),[L,p]=Y.useState(null),[o,w]=Y.useState(null),F=$.useId(_),Q=$.useFocusTrap(),G=Y.useRef(),q=()=>{z&&(B(!1),setTimeout(()=>{var he;return(he=G.current)==null?void 0:he.focus()},d+20))},Z=he=>he.nativeEvent.code==="Escape"&&q();$.useClickOutside(()=>g==="popover"&&q(),null,[W,L]),$.useWindowEvent("scroll",()=>T&&B(!1));const Ja=b?r.createElement(l.CloseButton,{themeOverride:a,variant:"transparent","aria-label":P,onClick:N,size:h}):null;return r.createElement(l.InputWrapper,fe({required:u,id:F,label:f,error:y,description:R,className:i,style:s,themeOverride:a,classNames:n,styles:c,size:h,__staticSelector:D},m),r.createElement("div",{ref:p},r.createElement("div",{className:A.wrapper,style:U.wrapper,ref:w},r.createElement(l.Input,fe({themeOverride:a,component:"button",type:"button",classNames:n,styles:yt(fe({},c),{input:yt(fe({},c==null?void 0:c.input),{cursor:"pointer"})}),onClick:()=>B(!z),id:F,elementRef:$.useMergedRef(C,G),__staticSelector:D,size:h,required:u,invalid:!!y,rightSection:Ja,rightSectionWidth:l.getSizeValue({size:h,sizes:Ca})},H),k||r.createElement(l.Text,{style:U.placeholder,className:A.placeholder,size:h},x))),g==="popover"?r.createElement(l.Popper,{referenceElement:o,transitionDuration:$.useReducedMotion()?0:d,transitionTimingFunction:S,forceUpdateDependencies:M,transition:E,mounted:z,position:"bottom",placement:"start",gutter:0,withArrow:!0,arrowSize:3,zIndex:3},r.createElement("div",{className:A.dropdownWrapper,style:U.dropdownWrapper,ref:$.useMergedRef(Q,O),onKeyDownCapture:Z},r.createElement(l.Paper,{className:A.dropdown,style:U.dropdown,shadow:I},V))):r.createElement(l.Modal,{opened:z,onClose:q,hideCloseButton:!0},V)))}Ee.displayName="@mantine/dates/DatePickerBase";var Ra=Object.defineProperty,pe=Object.getOwnPropertySymbols,gt=Object.prototype.hasOwnProperty,vt=Object.prototype.propertyIsEnumerable,_t=(e,t,a)=>t in e?Ra(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Ia=(e,t)=>{for(var a in t||(t={}))gt.call(t,a)&&_t(e,a,t[a]);if(pe)for(var a of pe(t))vt.call(t,a)&&_t(e,a,t[a]);return e},Na=(e,t)=>{var a={};for(var n in e)gt.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&pe)for(var n of pe(e))t.indexOf(n)<0&&vt.call(e,n)&&(a[n]=e[n]);return a};function ht(e){var t=e,{value:a,onChange:n,defaultValue:i,themeOverride:s,classNames:c,styles:m,shadow:u="sm",locale:f="en",inputFormat:y="MMMM D, YYYY",transitionDuration:_=200,transitionTimingFunction:R,nextMonthLabel:x,previousMonthLabel:I,closeCalendarOnChange:E=!0,labelFormat:d="MMMM YYYY",withSelect:S=!1,yearsRange:C,dayClassName:T,dayStyle:h,disableOutsideEvents:V,minDate:k,maxDate:D,excludeDate:z,elementRef:B,initialMonth:g,initiallyOpened:b=!1,name:P="date",size:N="sm",dropdownType:M="popover",clearable:H=!0,disabled:K=!1,clearButtonLabel:A}=t,U=Na(t,["value","onChange","defaultValue","themeOverride","classNames","styles","shadow","locale","inputFormat","transitionDuration","transitionTimingFunction","nextMonthLabel","previousMonthLabel","closeCalendarOnChange","labelFormat","withSelect","yearsRange","dayClassName","dayStyle","disableOutsideEvents","minDate","maxDate","excludeDate","elementRef","initialMonth","initiallyOpened","name","size","dropdownType","clearable","disabled","clearButtonLabel"]);const[W,O]=Y.useState(b),L=N==="lg"||N==="xl"?"md":"sm",p=Y.useRef(),[o,w]=$.useUncontrolled({value:a,defaultValue:i,finalValue:null,onChange:n,rule:q=>q===null||q instanceof Date}),F=()=>{O(!1),setTimeout(()=>{var q;return(q=p.current)==null?void 0:q.focus()},_+20)},Q=q=>{w(q),E&&F()},G=()=>{var q;w(null),(q=p.current)==null||q.focus()};return r.createElement(r.Fragment,null,r.createElement(Ee,Ia({dropdownOpened:W,setDropdownOpened:O,shadow:u,transitionDuration:_,elementRef:$.useMergedRef(B,p),size:N,styles:m,classNames:c,inputLabel:o instanceof Date?$.upperFirst(v(o).locale(f).format(y)):null,__staticSelector:"date-picker",dropdownType:M,clearable:H&&!!o&&!K,clearButtonLabel:A,onClear:G,disabled:K},U),r.createElement($e,{classNames:c,styles:m,locale:f,themeOverride:s,nextMonthLabel:x,previousMonthLabel:I,initialMonth:o instanceof Date?o:g,value:o,onChange:Q,labelFormat:d,withSelect:S,yearsRange:C,dayClassName:T,dayStyle:h,disableOutsideEvents:V,minDate:k,maxDate:D,excludeDate:z,__staticSelector:"date-picker",fullWidth:M==="modal",size:M==="modal"?"lg":L})),r.createElement("input",{type:"hidden",name:P,value:o instanceof Date?o.toISOString():""}))}ht.displayName="@mantine/dates/DatePicker";var xa=Object.defineProperty,ja=Object.defineProperties,Ta=Object.getOwnPropertyDescriptors,me=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,Ot=Object.prototype.propertyIsEnumerable,wt=(e,t,a)=>t in e?xa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,St=(e,t)=>{for(var a in t||(t={}))bt.call(t,a)&&wt(e,a,t[a]);if(me)for(var a of me(t))Ot.call(t,a)&&wt(e,a,t[a]);return e},Va=(e,t)=>ja(e,Ta(t)),za=(e,t)=>{var a={};for(var n in e)bt.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&me)for(var n of me(e))t.indexOf(n)<0&&Ot.call(e,n)&&(a[n]=e[n]);return a};function Ce(e){var t=e,{classNames:a,styles:n,locale:i="en",themeOverride:s,nextMonthLabel:c,previousMonthLabel:m,initialMonth:u,month:f,onMonthChange:y,value:_,onChange:R,labelFormat:x="MMMM YYYY",withSelect:I=!1,yearsRange:E={from:2020,to:2030},dayClassName:d,dayStyle:S,disableOutsideEvents:C,minDate:T,maxDate:h,excludeDate:V,fullWidth:k=!1,size:D="sm",onMouseLeave:z,__staticSelector:B="range-calendar"}=t,g=za(t,["classNames","styles","locale","themeOverride","nextMonthLabel","previousMonthLabel","initialMonth","month","onMonthChange","value","onChange","labelFormat","withSelect","yearsRange","dayClassName","dayStyle","disableOutsideEvents","minDate","maxDate","excludeDate","fullWidth","size","onMouseLeave","__staticSelector"]);const b=l.useMantineTheme(s),[P,N]=Y.useState(null),[M,H]=Y.useState(null),K=p=>{if(M instanceof Date){if(ne(p,M))return H(null),N(null),null;const o=[p,M];return o.sort((w,F)=>w.getTime()-F.getTime()),R(o),H(null),null}return R([null,null]),H(p),null},A=p=>{typeof z=="function"&&z(p),N(null)},U=(p,o)=>{if(M instanceof Date&&P instanceof Date){const w=[P,M];return w.sort((F,Q)=>F.getTime()-Q.getTime()),!o.selected&&v(p).subtract(1,"day").isBefore(w[1])&&v(p).add(1,"day").isAfter(w[0])}return!1},[W,O]=$.useUncontrolled({value:f,defaultValue:u,finalValue:new Date,onChange:y,rule:p=>p instanceof Date}),L=ot({month:W,minDate:T,maxDate:h});return r.createElement(Me,St({size:D,fullWidth:k,onMouseLeave:A},g),r.createElement(Pe,{size:D,themeOverride:s,nextMonthLabel:c,previousMonthLabel:m,previousMonthDisabled:L.previousDisabled,nextMonthDisabled:L.nextDisabled,onPreviousMonth:()=>O(v(W).subtract(1,"month").toDate()),onNextMonth:()=>O(v(W).add(1,"month").toDate()),classNames:a,styles:n,locale:i,withSelect:I,yearsRange:E,month:W,setMonth:O,labelFormat:x,__staticSelector:B}),r.createElement(se,{themeOverride:s,month:W,range:_,value:M,onChange:K,dayClassName:d,dayStyle:(p,o)=>{const w=typeof S=="function"?S(p,o):{};return U(p,o)?Va(St({},w),{backgroundColor:b.colorScheme==="dark"?l.hexToRgba(b.colors[b.primaryColor][9],.3):b.colors[b.primaryColor][0],borderRadius:0}):w},disableOutsideEvents:C,minDate:T,maxDate:h,excludeDate:V,classNames:a,styles:n,fullWidth:k,size:D,onDayMouseEnter:p=>N(p),__staticSelector:B}))}Ce.displayName="@mantine/dates/RangeCalendar";var La=Object.defineProperty,ye=Object.getOwnPropertySymbols,Dt=Object.prototype.hasOwnProperty,Pt=Object.prototype.propertyIsEnumerable,Mt=(e,t,a)=>t in e?La(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Fa=(e,t)=>{for(var a in t||(t={}))Dt.call(t,a)&&Mt(e,a,t[a]);if(ye)for(var a of ye(t))Pt.call(t,a)&&Mt(e,a,t[a]);return e},ka=(e,t)=>{var a={};for(var n in e)Dt.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&ye)for(var n of ye(e))t.indexOf(n)<0&&Pt.call(e,n)&&(a[n]=e[n]);return a};const Re=e=>Array.isArray(e)&&e.length===2&&e.every(t=>t instanceof Date);function $t(e){var t=e,{value:a,onChange:n,defaultValue:i,themeOverride:s,classNames:c,styles:m,shadow:u="sm",locale:f="en",inputFormat:y="MMMM D, YYYY",transitionDuration:_=200,transitionTimingFunction:R,nextMonthLabel:x,previousMonthLabel:I,closeCalendarOnChange:E=!0,labelFormat:d="MMMM YYYY",withSelect:S=!1,yearsRange:C,dayClassName:T,dayStyle:h,disableOutsideEvents:V,minDate:k,maxDate:D,excludeDate:z,elementRef:B,initialMonth:g,initiallyOpened:b=!1,name:P="date",size:N="sm",dropdownType:M="popover",labelSeparator:H="\u2013",clearable:K=!0,clearButtonLabel:A}=t,U=ka(t,["value","onChange","defaultValue","themeOverride","classNames","styles","shadow","locale","inputFormat","transitionDuration","transitionTimingFunction","nextMonthLabel","previousMonthLabel","closeCalendarOnChange","labelFormat","withSelect","yearsRange","dayClassName","dayStyle","disableOutsideEvents","minDate","maxDate","excludeDate","elementRef","initialMonth","initiallyOpened","name","size","dropdownType","labelSeparator","clearable","clearButtonLabel"]);const[W,O]=Y.useState(b),L=N==="lg"||N==="xl"?"md":"sm",p=Y.useRef(),[o,w]=$.useUncontrolled({value:a,defaultValue:i,finalValue:[null,null],onChange:n,rule:Re}),F=()=>{O(!1),setTimeout(()=>{var Z;return(Z=p.current)==null?void 0:Z.focus()},_+20)},Q=Z=>{w(Z),E&&Re(Z)&&F()},G=Re(o),q=()=>{var Z;w([null,null]),(Z=p.current)==null||Z.focus()};return r.createElement(r.Fragment,null,r.createElement(Ee,Fa({dropdownOpened:W,setDropdownOpened:O,shadow:u,transitionDuration:_,elementRef:$.useMergedRef(B,p),size:N,styles:m,classNames:c,inputLabel:G?`${$.upperFirst(v(o[0]).locale(f).format(y))} ${H} ${$.upperFirst(v(o[1]).locale(f).format(y))}`:null,__staticSelector:"date-range-picker",dropdownType:M,clearable:K&&G,clearButtonLabel:A,onClear:q},U),r.createElement(Ce,{classNames:c,styles:m,locale:f,themeOverride:s,nextMonthLabel:x,previousMonthLabel:I,initialMonth:G?o[0]:g,value:o,onChange:Q,labelFormat:d,withSelect:S,yearsRange:C,dayClassName:T,dayStyle:h,disableOutsideEvents:V,minDate:k,maxDate:D,excludeDate:z,__staticSelector:"date-range-picker",fullWidth:M==="modal",size:M==="modal"?"lg":L})),r.createElement("input",{type:"hidden",name:`${P}-from`,value:G?o[0].toISOString():""}),r.createElement("input",{type:"hidden",name:`${P}-to`,value:G?o[1].toISOString():""}))}$t.displayName="@mantine/dates/DateRangePicker";function ee(e){return e>=10?e.toString():`0${e}`}var Wa=Object.defineProperty,ge=Object.getOwnPropertySymbols,Et=Object.prototype.hasOwnProperty,Ct=Object.prototype.propertyIsEnumerable,Rt=(e,t,a)=>t in e?Wa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Ya=(e,t)=>{for(var a in t||(t={}))Et.call(t,a)&&Rt(e,a,t[a]);if(ge)for(var a of ge(t))Ct.call(t,a)&&Rt(e,a,t[a]);return e},Ba=(e,t)=>{var a={};for(var n in e)Et.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&ge)for(var n of ge(e))t.indexOf(n)<0&&Ct.call(e,n)&&(a[n]=e[n]);return a};function ve(e){var t=e,{elementRef:a,onFocus:n,onBlur:i,onChange:s,setValue:c,withSeparator:m=!1,size:u="sm",max:f}=t,y=Ba(t,["elementRef","onFocus","onBlur","onChange","setValue","withSeparator","size","max"]);const _=Y.useRef(),R=d=>{typeof n=="function"&&n(d),_.current.select()},x=d=>{typeof i=="function"&&i(d),c(ee($.clamp({value:parseInt(d.currentTarget.value,10),min:0,max:f})))},I=d=>{d.stopPropagation(),_.current.select()},E=d=>{d.nativeEvent.code==="ArrowUp"&&(d.preventDefault(),c(ee($.clamp({value:parseInt(d.currentTarget.value,10)+1,max:f,min:0})))),d.nativeEvent.code==="ArrowDown"&&(d.preventDefault(),c(ee($.clamp({value:parseInt(d.currentTarget.value,10)-1,max:f,min:0}))))};return r.createElement(r.Fragment,null,r.createElement("input",Ya({type:"text",ref:$.useMergedRef(_,a),onChange:d=>s(d.currentTarget.value),onClick:I,onFocus:R,onBlur:x,onKeyDown:E},y)),m&&r.createElement(l.Text,{size:u,style:{lineHeight:1,color:"inherit"}},":"))}ve.displayName="@mantine/dates/TimeField";function Ie({onChange:e,nextRef:t,min:a,max:n,maxValue:i}){return s=>{var c,m,u,f;if(s==="00"){e("00"),(c=t==null?void 0:t.current)==null||c.focus(),(m=t==null?void 0:t.current)==null||m.select();return}const y=parseInt(s,10);if(!Number.isNaN(y)){if(y>i){e(ee($.clamp({value:y,min:a,max:n}))),(u=t==null?void 0:t.current)==null||u.focus(),(f=t==null?void 0:t.current)==null||f.select();return}e(y.toString())}}}function Aa(e){return e instanceof Date?{hours:ee(e.getHours()),minutes:ee(e.getMinutes()),seconds:ee(e.getSeconds())}:{hours:"",minutes:"",seconds:""}}const Ha={xs:20,sm:23,md:25,lg:27,xl:29};var Ua=l.createMemoStyles({disabled:{opacity:.6,cursor:"not-allowed"},controls:({size:e})=>({display:"flex",alignItems:"center",height:l.getSizeValue({size:e,sizes:l.INPUT_SIZES})-2}),timeInput:({theme:e,size:t})=>({width:l.getSizeValue({size:t,sizes:Ha}),appearance:"none",backgroundColor:"transparent",color:"inherit",padding:0,textAlign:"center",border:"1px solid transparent",fontSize:l.getSizeValue({size:t,sizes:e.fontSizes}),lineHeight:1,outline:0,"&[disabled]":{color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[7],cursor:"not-allowed"}})}),qa=Object.defineProperty,Ka=Object.defineProperties,Ga=Object.getOwnPropertyDescriptors,_e=Object.getOwnPropertySymbols,It=Object.prototype.hasOwnProperty,Nt=Object.prototype.propertyIsEnumerable,xt=(e,t,a)=>t in e?qa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,X=(e,t)=>{for(var a in t||(t={}))It.call(t,a)&&xt(e,a,t[a]);if(_e)for(var a of _e(t))Nt.call(t,a)&&xt(e,a,t[a]);return e},te=(e,t)=>Ka(e,Ga(t)),Za=(e,t)=>{var a={};for(var n in e)It.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&_e)for(var n of _e(e))t.indexOf(n)<0&&Nt.call(e,n)&&(a[n]=e[n]);return a};function jt(e){var t=e,{required:a,label:n,error:i,description:s,className:c,style:m,themeOverride:u,size:f="sm",wrapperProps:y,classNames:_,styles:R,id:x,elementRef:I,value:E,defaultValue:d,onChange:S,withSeconds:C=!1,name:T,hoursLabel:h,minutesLabel:V,secondsLabel:k,disabled:D=!1}=t,z=Za(t,["required","label","error","description","className","style","themeOverride","size","wrapperProps","classNames","styles","id","elementRef","value","defaultValue","onChange","withSeconds","name","hoursLabel","minutesLabel","secondsLabel","disabled"]);const B=l.useMantineTheme(u),g=Ua({theme:B,size:f},_,"time-input"),b=l.mergeStyles(g,R),P=$.useId(x),[N,M]=$.useUncontrolled({value:E,defaultValue:d,finalValue:new Date,rule:o=>o instanceof Date,onChange:S}),H=Y.useRef(),K=Y.useRef(),A=Y.useRef(),[U,W]=Y.useState(Aa(N)),O=Ie({onChange:o=>{W(w=>te(X({},w),{hours:o})),M(v(N).set("hours",parseInt(o,10)).toDate())},min:0,max:23,maxValue:2,nextRef:K}),L=Ie({onChange:o=>{W(w=>te(X({},w),{minutes:o})),M(v(N).set("minutes",parseInt(o,10)).toDate())},min:0,max:59,maxValue:5,nextRef:A}),p=Ie({onChange:o=>{W(w=>te(X({},w),{seconds:o})),M(v(N).set("seconds",parseInt(o,10)).toDate())},min:0,max:59,maxValue:5});return r.createElement(l.InputWrapper,X({required:a,label:n,error:i,description:s,className:c,style:m,themeOverride:u,classNames:_,styles:R,size:f,__staticSelector:"time-input",id:P},y),r.createElement(l.Input,X({component:"div",__staticSelector:"time-input",themeOverride:u,required:a,invalid:!!i,onClick:()=>H.current.focus(),size:f,className:we({[g.disabled]:D}),classNames:_,styles:R,disabled:D},z),r.createElement("div",{className:g.controls,style:b.controls},r.createElement(ve,{elementRef:$.useMergedRef(H,I),value:U.hours,onChange:O,setValue:o=>W(w=>te(X({},w),{hours:o})),id:P,className:g.timeInput,style:b.timeInput,withSeparator:!0,size:f,max:23,"aria-label":h,disabled:D}),r.createElement(ve,{elementRef:K,value:U.minutes,onChange:L,setValue:o=>W(w=>te(X({},w),{minutes:o})),className:g.timeInput,style:b.timeInput,withSeparator:C,size:f,max:59,"aria-label":V,disabled:D}),C&&r.createElement(ve,{elementRef:A,value:U.seconds,onChange:p,setValue:o=>W(w=>te(X({},w),{seconds:o})),className:g.timeInput,style:b.timeInput,size:f,max:59,"aria-label":k,disabled:D}),T&&r.createElement("input",{type:"hidden",name:T,value:N.toISOString()}))))}jt.displayName="@mantine/dates/TimeInput",j.Calendar=$e,j.DatePicker=ht,j.DateRangePicker=$t,j.Month=se,j.RangeCalendar=Ce,j.TimeInput=jt,j.getEndOfWeek=xe,j.getMonthDays=je,j.getMonthsNames=Te,j.getStartOfWeek=be,j.getWeekdaysNames=Ve,j.getYearsRange=ze,j.isSameDate=ne,j.isSameMonth=Oe,Object.defineProperty(j,"__esModule",{value:!0})}); | ||
(function(j,ae){typeof exports=="object"&&typeof module!="undefined"?ae(exports,require("dayjs"),require("react"),require("@mantine/hooks"),require("@mantine/core")):typeof define=="function"&&define.amd?define(["exports","dayjs","react","@mantine/hooks","@mantine/core"],ae):(j=typeof globalThis!="undefined"?globalThis:j||self,ae(j["@mantine/dates"]={},j.dayjs,j.React,j["@mantine/hooks"],j["@mantine/core"]))})(this,function(j,ae,Y,M,l){"use strict";function xe(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var b=xe(ae),r=xe(Y);function je(e){const t=new Date(e),a=t.getDay();return a!==0&&t.setDate(t.getDate()+(7-a)),t}function be(e){const t=new Date(e),a=t.getDay()||7;return a!==1&&t.setHours(-24*(a-1)),t}function Te(e){const t=e.getMonth(),a=new Date(e.getFullYear(),t,1),n=new Date(e.getFullYear(),e.getMonth()+1,0),d=je(n),o=be(a),c=[];for(;o<=d;){const _=[];for(let u=0;u<7;u+=1)_.push(new Date(o)),o.setDate(o.getDate()+1);c.push(_)}return c}function Ve(e){const t=[],a=new Date(2021,0,1);for(let n=0;n<12;n+=1)t.push(b(a).locale(e).format("MMMM")),a.setMonth(a.getMonth()+1);return t}function ze(e){const t=[],a=be(new Date);for(let n=0;n<7;n+=1)t.push(b(a).locale(e).format("dd")),a.setDate(a.getDate()+1);return t}function Le(e){const t=[];for(let a=e.from;a<=e.to;a+=1)t.push(a);return t}function Oe(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function ne(e,t){return Oe(e,t)&&e.getDate()===t.getDate()}function Fe(e){var t,a,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(a=Fe(e[t]))&&(n&&(n+=" "),n+=a);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function we(){for(var e=0,t,a,n="";e<arguments.length;)(t=arguments[e++])&&(a=Fe(t))&&(n&&(n+=" "),n+=a);return n}var Vt=Object.defineProperty,zt=Object.defineProperties,Lt=Object.getOwnPropertyDescriptors,ke=Object.getOwnPropertySymbols,Ft=Object.prototype.hasOwnProperty,kt=Object.prototype.propertyIsEnumerable,We=(e,t,a)=>t in e?Vt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Ye=(e,t)=>{for(var a in t||(t={}))Ft.call(t,a)&&We(e,a,t[a]);if(ke)for(var a of ke(t))kt.call(t,a)&&We(e,a,t[a]);return e},Wt=(e,t)=>zt(e,Lt(t));const re={xs:34,sm:38,md:46,lg:58,xl:66};var Yt=l.createMemoStyles({weekend:{},outside:{},selected:{},inRange:{},firstInRange:{},lastInRange:{},day:({theme:e,size:t,fullWidth:a})=>Wt(Ye(Ye({},l.getFontStyles(e)),l.getFocusStyles(e)),{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",width:a?"100%":l.getSizeValue({size:t,sizes:re}),height:l.getSizeValue({size:t,sizes:re}),lineHeight:`${l.getSizeValue({size:t,sizes:re})}px`,fontSize:l.getSizeValue({size:t,sizes:e.fontSizes}),padding:0,borderRadius:e.radius.sm,border:"1px dotted transparent",cursor:"pointer",userSelect:"none",color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],"&:disabled":{pointerEvents:"none",color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]},"&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]},"&$weekend:not(:disabled)":{color:e.colorScheme==="dark"?e.colors.red[5]:e.colors.red[7]},"&$outside":{color:`${e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]} !important`},"&$inRange:not(:disabled)":{backgroundColor:e.colorScheme==="dark"?l.hexToRgba(e.colors[e.primaryColor][9],.3):e.colors[e.primaryColor][0],borderRadius:0},"&$selected:not(:disabled)":{backgroundColor:e.colors[e.primaryColor][6],color:e.white},"&$firstInRange:not(:disabled)":{borderTopLeftRadius:e.radius.sm,borderBottomLeftRadius:e.radius.sm},"&$lastInRange:not(:disabled)":{borderTopRightRadius:e.radius.sm,borderBottomRightRadius:e.radius.sm}})}),Bt=Object.defineProperty,At=Object.defineProperties,Ht=Object.getOwnPropertyDescriptors,le=Object.getOwnPropertySymbols,Be=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,He=(e,t,a)=>t in e?Bt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,J=(e,t)=>{for(var a in t||(t={}))Be.call(t,a)&&He(e,a,t[a]);if(le)for(var a of le(t))Ae.call(t,a)&&He(e,a,t[a]);return e},Ut=(e,t)=>At(e,Ht(t)),qt=(e,t)=>{var a={};for(var n in e)Be.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&le)for(var n of le(e))t.indexOf(n)<0&&Ae.call(e,n)&&(a[n]=e[n]);return a};function Ue(e){var t=e,{className:a,style:n,value:d,selected:o,weekend:c,outside:_,onClick:u,elementRef:p,onKeyDown:h,onMouseEnter:y,themeOverride:E,classNames:x,disabled:I,styles:C,hasValue:R,firstInRange:i,lastInRange:m,__staticSelector:T="month",inRange:O,size:V,fullWidth:k,firstInMonth:D}=t,z=qt(t,["className","style","value","selected","weekend","outside","onClick","elementRef","onKeyDown","onMouseEnter","themeOverride","classNames","disabled","styles","hasValue","firstInRange","lastInRange","__staticSelector","inRange","size","fullWidth","firstInMonth"]);const B=l.useMantineTheme(E),g=Yt({theme:B,size:V,fullWidth:k},x,T),w=l.mergeStyles(g,C);return r.createElement("button",Ut(J({},z),{type:"button",onClick:u,ref:p,onKeyDown:P=>h(d,P),onMouseEnter:P=>y(d,P),tabIndex:R?o?0:-1:D?0:-1,"data-autofocus":R?o?!0:void 0:D?!0:void 0,"data-mantine-stop-propagation":!0,style:J(J(J(J(J(J(J(J({},w.day),_?w.outside:null),c?w.weekend:null),o?w.selected:null),O?w.inRange:null),i?w.firstInRange:null),m?w.lastInRange:null),n),disabled:I,className:we(g.day,{[g.outside]:_,[g.weekend]:c,[g.selected]:o,[g.inRange]:O,[g.firstInRange]:i,[g.lastInRange]:m},a)}),d.getDate())}Ue.displayName="@mantine/core/Day";function Kt({date:e,month:t,hasValue:a,minDate:n,maxDate:d,value:o,excludeDate:c,disableOutsideEvents:_,range:u}){const p=e.getDay(),h=p===6||p===0,y=e.getMonth()!==t.getMonth(),E=a&&ne(e,o),x=d instanceof Date&&b(d).isBefore(e,"day"),I=n instanceof Date&&b(n).isAfter(e,"day"),C=typeof c=="function"&&c(e),i=x||I||C||_&&y,m=Array.isArray(u)&&u.every(z=>z instanceof Date),T=m&&[b(u[0]).subtract(1,"day"),b(u[1]).add(1,"day")],O=m&&ne(e,u[0]),V=m&&ne(e,u[1]),k=m&&b(e).isAfter(T[0],"day")&&b(e).isBefore(T[1],"day");return{selectedInRange:O||V,selected:E,disabled:i,inRange:k,firstInRange:O,lastInRange:V,weekend:h,outside:y}}var Gt=Object.defineProperty,Zt=Object.defineProperties,Jt=Object.getOwnPropertyDescriptors,qe=Object.getOwnPropertySymbols,Qt=Object.prototype.hasOwnProperty,Xt=Object.prototype.propertyIsEnumerable,Ke=(e,t,a)=>t in e?Gt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,ea=(e,t)=>{for(var a in t||(t={}))Qt.call(t,a)&&Ke(e,a,t[a]);if(qe)for(var a of qe(t))Xt.call(t,a)&&Ke(e,a,t[a]);return e},ta=(e,t)=>Zt(e,Jt(t)),aa=l.createMemoStyles({weekday:({theme:e})=>({color:e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[5]}),root:({theme:e,fullWidth:t})=>ta(ea({},l.getFontStyles(e)),{borderCollapse:"collapse",width:t?"100%":"auto",tableLayout:"fixed"}),cell:{boxSizing:"border-box",padding:0,borderTop:"1px solid transparent"},weekdayCell:({theme:e})=>({boxSizing:"border-box",padding:0,fontWeight:"normal",paddingBottom:e.spacing.xs/2,textAlign:"center",cursor:"default",userSelect:"none"})}),na=Object.defineProperty,oe=Object.getOwnPropertySymbols,Ge=Object.prototype.hasOwnProperty,Ze=Object.prototype.propertyIsEnumerable,Je=(e,t,a)=>t in e?na(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Se=(e,t)=>{for(var a in t||(t={}))Ge.call(t,a)&&Je(e,a,t[a]);if(oe)for(var a of oe(t))Ze.call(t,a)&&Je(e,a,t[a]);return e},ra=(e,t)=>{var a={};for(var n in e)Ge.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&oe)for(var n of oe(e))t.indexOf(n)<0&&Ze.call(e,n)&&(a[n]=e[n]);return a};const la=()=>{};function se(e){var t=e,{className:a,style:n,month:d,value:o,onChange:c,autoFocus:_=!1,disableOutsideEvents:u=!1,locale:p="en",dayClassName:h,dayStyle:y,themeOverride:E,classNames:x,styles:I,minDate:C,maxDate:R,excludeDate:i,onDayMouseEnter:m,range:T,hideWeekdays:O=!1,__staticSelector:V="month",size:k="sm",fullWidth:D=!1}=t,z=ra(t,["className","style","month","value","onChange","autoFocus","disableOutsideEvents","locale","dayClassName","dayStyle","themeOverride","classNames","styles","minDate","maxDate","excludeDate","onDayMouseEnter","range","hideWeekdays","__staticSelector","size","fullWidth"]);const B=l.useMantineTheme(E),g=aa({theme:B,fullWidth:D},x,V),w=l.mergeStyles(g,I),P=Y.useRef({}),N=Te(d),$=(v,F)=>{const f=new Date(v);f.setDate(v.getDate()+F),f.toISOString()in P.current&&(!Oe(d,f)&&u||P.current[f.toISOString()].focus())},H=(v,F)=>{const{code:f}=F.nativeEvent;f==="ArrowUp"&&(F.preventDefault(),$(v,-7)),f==="ArrowDown"&&(F.preventDefault(),$(v,7)),f==="ArrowRight"&&(F.preventDefault(),v.getDay()!==0&&$(v,1)),f==="ArrowLeft"&&(F.preventDefault(),v.getDay()!==1&&$(v,-1))};Y.useEffect(()=>{if(_){const v=new Date(d.getFullYear(),d.getMonth(),o?o.getDate():1).toISOString();v in P.current&&P.current[v].focus()}},[]);const q=ze(p).map(v=>r.createElement("th",{className:g.weekdayCell,style:w.weekdayCell,key:v},r.createElement(l.Text,{size:k,className:g.weekday,style:w.weekday},M.upperFirst(v)))),K=o instanceof Date,A=K&&b(o).isAfter(b(d).startOf("month"))&&b(o).isBefore(b(d).endOf("month")),L=N.map((v,F)=>{const f=v.map((s,S)=>{const W=Kt({date:s,month:d,hasValue:K,minDate:C,maxDate:R,value:o,excludeDate:i,disableOutsideEvents:u,range:T});return r.createElement("td",{className:g.cell,style:w.cell,key:S},r.createElement(Ue,{elementRef:G=>{P.current[s.toISOString()]=G},onClick:()=>typeof c=="function"&&c(s),value:s,outside:W.outside,weekend:W.weekend,inRange:W.inRange,firstInRange:W.firstInRange,lastInRange:W.lastInRange,firstInMonth:S===0&&F===0,selected:W.selected||W.selectedInRange,hasValue:A,onKeyDown:H,themeOverride:E,className:typeof h=="function"?h(s,W):null,style:typeof y=="function"?y(s,W):null,styles:I,classNames:x,disabled:W.disabled,__staticSelector:V,onMouseEnter:typeof m=="function"?m:la,size:k,fullWidth:D}))});return r.createElement("tr",{key:F},f)});return r.createElement("table",Se({className:we(g.root,a),style:Se(Se({},n),w.root)},z),!O&&r.createElement("thead",null,r.createElement("tr",null,q)),r.createElement("tbody",null,L))}se.displayName="@mantine/core/Month";var oa=Object.defineProperty,sa=Object.defineProperties,ia=Object.getOwnPropertyDescriptors,ie=Object.getOwnPropertySymbols,Qe=Object.prototype.hasOwnProperty,Xe=Object.prototype.propertyIsEnumerable,et=(e,t,a)=>t in e?oa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,tt=(e,t)=>{for(var a in t||(t={}))Qe.call(t,a)&&et(e,a,t[a]);if(ie)for(var a of ie(t))Xe.call(t,a)&&et(e,a,t[a]);return e},da=(e,t)=>sa(e,ia(t)),ca=(e,t)=>{var a={};for(var n in e)Qe.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&ie)for(var n of ie(e))t.indexOf(n)<0&&Xe.call(e,n)&&(a[n]=e[n]);return a};function De(e){var t=e,{direction:a,style:n}=t,d=ca(t,["direction","style"]);return r.createElement("svg",tt({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:da(tt({},n),{transform:a==="right"?"rotate(180deg)":"none"})},d),r.createElement("path",{d:"M8.84182 3.13514C9.04327 3.32401 9.05348 3.64042 8.86462 3.84188L5.43521 7.49991L8.86462 11.1579C9.05348 11.3594 9.04327 11.6758 8.84182 11.8647C8.64036 12.0535 8.32394 12.0433 8.13508 11.8419L4.38508 7.84188C4.20477 7.64955 4.20477 7.35027 4.38508 7.15794L8.13508 3.15794C8.32394 2.95648 8.64036 2.94628 8.84182 3.13514Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}De.displayName="@mantine/dates/ArrowIcon";var ua=l.createMemoStyles({selectGroup:{},select:{},label:{}});function at({locale:e,classNames:t,styles:a,withSelect:n,yearsRange:d,value:o,themeOverride:c,labelFormat:_,onChange:u,size:p,__staticSelector:h,monthLabel:y,yearLabel:E}){const x=l.useMantineTheme(c),I=p==="lg"||p==="xl"?"md":"xs",C=ua({theme:x},t,h),R=l.mergeStyles(C,a);return n?r.createElement(l.Group,{spacing:5,noWrap:!0,themeOverride:c,className:C.selectGroup,style:R.selectGroup},r.createElement(l.NativeSelect,{"aria-label":y,className:C.select,style:R.select,size:I,themeOverride:c,value:o.getMonth(),onChange:i=>u(b(o).set("month",parseInt(i.currentTarget.value,10)).toDate()),data:Ve(e).map((i,m)=>({label:M.upperFirst(i),value:m.toString()}))}),r.createElement(l.NativeSelect,{"aria-label":E,className:C.select,style:R.select,size:I,themeOverride:c,value:o.getFullYear(),onChange:i=>u(b(o).set("year",parseInt(i.currentTarget.value,10)).toDate()),data:Le(d).map(i=>({label:i.toString(),value:i.toString()}))})):r.createElement(l.Text,{className:C.label,style:R.label,size:p},M.upperFirst(b(o).locale(e).format(_)))}at.displayName="@mantine/dates/CalendarLabel";const pa={xs:10,sm:12,md:14,lg:18,xl:20};function Pe({size:e,themeOverride:t,nextMonthLabel:a,previousMonthLabel:n,previousMonthDisabled:d,nextMonthDisabled:o,onPreviousMonth:c,onNextMonth:_,classNames:u,styles:p,locale:h,withSelect:y,yearsRange:E,month:x,setMonth:I,labelFormat:C,__staticSelector:R,monthLabel:i,yearLabel:m}){const T=l.useMantineTheme(t),O=l.getSizeValue({size:e,sizes:pa}),V=l.getSizeValue({size:e,sizes:re});return r.createElement(l.Group,{position:"apart",noWrap:!0,themeOverride:t,style:{marginBottom:T.spacing.xs/2}},r.createElement(l.ActionIcon,{"aria-label":n,onClick:c,disabled:d,themeOverride:t,size:V,"data-mantine-stop-propagation":!0},r.createElement(De,{direction:"left",width:O,height:O})),r.createElement(at,{locale:h,classNames:u,styles:p,withSelect:y,yearsRange:E,value:x,onChange:I,labelFormat:C,themeOverride:t,size:e,__staticSelector:R,monthLabel:i,yearLabel:m}),r.createElement(l.ActionIcon,{"aria-label":a,onClick:_,disabled:o,themeOverride:t,size:V,"data-mantine-stop-propagation":!0},r.createElement(De,{direction:"right",width:O,height:O})))}Pe.displayName="@mantine/dates/CalendarHeader";var fa=Object.defineProperty,de=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable,lt=(e,t,a)=>t in e?fa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,ot=(e,t)=>{for(var a in t||(t={}))nt.call(t,a)&<(e,a,t[a]);if(de)for(var a of de(t))rt.call(t,a)&<(e,a,t[a]);return e},ma=(e,t)=>{var a={};for(var n in e)nt.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&de)for(var n of de(e))t.indexOf(n)<0&&rt.call(e,n)&&(a[n]=e[n]);return a};function $e(e){var t=e,{size:a,fullWidth:n,style:d}=t,o=ma(t,["size","fullWidth","style"]);return r.createElement("div",ot({style:ot({maxWidth:n?"100%":l.getSizeValue({size:a,sizes:re})*7},d)},o))}$e.displayName="@mantine/dates/CalendarWrapper";function st({maxDate:e,minDate:t,month:a}){const n=e instanceof Date&&b(a).endOf("month").isAfter(b(e).endOf("day").subtract(1,"minute")),d=t instanceof Date&&b(a).startOf("month").isBefore(b(t).startOf("day").add(1,"minute"));return{nextDisabled:n,previousDisabled:d}}var ya=Object.defineProperty,ce=Object.getOwnPropertySymbols,it=Object.prototype.hasOwnProperty,dt=Object.prototype.propertyIsEnumerable,ct=(e,t,a)=>t in e?ya(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,ga=(e,t)=>{for(var a in t||(t={}))it.call(t,a)&&ct(e,a,t[a]);if(ce)for(var a of ce(t))dt.call(t,a)&&ct(e,a,t[a]);return e},va=(e,t)=>{var a={};for(var n in e)it.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&ce)for(var n of ce(e))t.indexOf(n)<0&&dt.call(e,n)&&(a[n]=e[n]);return a};function Me(e){var t=e,{classNames:a,styles:n,locale:d="en",themeOverride:o,nextMonthLabel:c,previousMonthLabel:_,initialMonth:u,month:p,onMonthChange:h,value:y,onChange:E,labelFormat:x="MMMM YYYY",withSelect:I=!1,yearsRange:C={from:2020,to:2030},dayClassName:R,dayStyle:i,disableOutsideEvents:m,minDate:T,maxDate:O,excludeDate:V,fullWidth:k=!1,size:D="sm",__staticSelector:z="calendar",monthLabel:B,yearLabel:g}=t,w=va(t,["classNames","styles","locale","themeOverride","nextMonthLabel","previousMonthLabel","initialMonth","month","onMonthChange","value","onChange","labelFormat","withSelect","yearsRange","dayClassName","dayStyle","disableOutsideEvents","minDate","maxDate","excludeDate","fullWidth","size","__staticSelector","monthLabel","yearLabel"]);const[P,N]=M.useUncontrolled({value:p,defaultValue:u,finalValue:new Date,onChange:h,rule:H=>H instanceof Date}),$=st({month:P,minDate:T,maxDate:O});return r.createElement($e,ga({size:D,fullWidth:k},w),r.createElement(Pe,{size:D,themeOverride:o,nextMonthLabel:c,previousMonthLabel:_,previousMonthDisabled:$.previousDisabled,nextMonthDisabled:$.nextDisabled,onPreviousMonth:()=>N(b(P).subtract(1,"month").toDate()),onNextMonth:()=>N(b(P).add(1,"month").toDate()),classNames:a,styles:n,locale:d,withSelect:I,yearsRange:C,month:P,setMonth:N,labelFormat:x,__staticSelector:z,monthLabel:B,yearLabel:g}),r.createElement(se,{themeOverride:o,month:P,value:y,onChange:E,dayClassName:R,dayStyle:i,disableOutsideEvents:m,minDate:T,maxDate:O,excludeDate:V,classNames:a,styles:n,fullWidth:k,size:D,locale:d,__staticSelector:z}))}Me.displayName="@mantine/dates/Calendar";var _a=Object.defineProperty,ha=Object.defineProperties,ba=Object.getOwnPropertyDescriptors,ut=Object.getOwnPropertySymbols,Oa=Object.prototype.hasOwnProperty,wa=Object.prototype.propertyIsEnumerable,pt=(e,t,a)=>t in e?_a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Sa=(e,t)=>{for(var a in t||(t={}))Oa.call(t,a)&&pt(e,a,t[a]);if(ut)for(var a of ut(t))wa.call(t,a)&&pt(e,a,t[a]);return e},Da=(e,t)=>ha(e,ba(t)),Pa=l.createMemoStyles({wrapper:({theme:e})=>Da(Sa({},l.getFontStyles(e)),{position:"relative",cursor:"pointer"}),placeholder:({theme:e,size:t,invalid:a})=>({lineHeight:`${l.getSizeValue({size:t,sizes:l.INPUT_SIZES})-2}px`,color:a?e.colors.red[e.colorScheme==="dark"?6:7]:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}),dropdownWrapper:{position:"relative",pointerEvents:"all"},input:{cursor:"pointer"},dropdown:({theme:e})=>({position:"absolute",left:0,top:e.spacing.xs,backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,border:`1px solid ${e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[2]}`,zIndex:4,padding:[e.spacing.md,e.spacing.xs],"&::before":{content:'""',position:"absolute",top:-5,height:8,width:8,transform:"rotate(45deg)",backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,borderTop:`1px solid ${e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[2]}`,borderLeft:`1px solid ${e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[2]}`}})}),$a=Object.defineProperty,Ma=Object.defineProperties,Ea=Object.getOwnPropertyDescriptors,ue=Object.getOwnPropertySymbols,ft=Object.prototype.hasOwnProperty,mt=Object.prototype.propertyIsEnumerable,yt=(e,t,a)=>t in e?$a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,pe=(e,t)=>{for(var a in t||(t={}))ft.call(t,a)&&yt(e,a,t[a]);if(ue)for(var a of ue(t))mt.call(t,a)&&yt(e,a,t[a]);return e},gt=(e,t)=>Ma(e,Ea(t)),Ca=(e,t)=>{var a={};for(var n in e)ft.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&ue)for(var n of ue(e))t.indexOf(n)<0&&mt.call(e,n)&&(a[n]=e[n]);return a};const Ra={xs:24,sm:30,md:34,lg:40,xl:44};function Ee(e){var t=e,{themeOverride:a,classNames:n,className:d,style:o,styles:c,wrapperProps:_,required:u,label:p,error:h,id:y,description:E,placeholder:x,shadow:I="sm",transition:C="pop-top-left",transitionDuration:R=200,transitionTimingFunction:i,elementRef:m,closeDropdownOnScroll:T=!0,size:O="sm",children:V,inputLabel:k,__staticSelector:D="date-picker",dropdownOpened:z,setDropdownOpened:B,dropdownType:g="popover",clearable:w=!0,clearButtonLabel:P,onClear:N,positionDependencies:$=[],zIndex:H=3}=t,q=Ca(t,["themeOverride","classNames","className","style","styles","wrapperProps","required","label","error","id","description","placeholder","shadow","transition","transitionDuration","transitionTimingFunction","elementRef","closeDropdownOnScroll","size","children","inputLabel","__staticSelector","dropdownOpened","setDropdownOpened","dropdownType","clearable","clearButtonLabel","onClear","positionDependencies","zIndex"]);const K=l.useMantineTheme(a),A=Pa({theme:K,size:O,invalid:!!h},n,D),L=l.mergeStyles(A,c),[v,F]=Y.useState(null),[f,s]=Y.useState(null),[S,W]=Y.useState(null),G=M.useId(y),Q=l.useClickOutsideRegister(),U=M.useFocusTrap(),Z=Y.useRef(),Ne=()=>{z&&(B(!1),setTimeout(()=>{var he;return(he=Z.current)==null?void 0:he.focus()},R+20))},Qa=he=>he.nativeEvent.code==="Escape"&&Ne();M.useClickOutside(()=>g==="popover"&&Ne(),null,[v,f]),M.useWindowEvent("scroll",()=>T&&B(!1)),Y.useEffect(()=>{Q(`${G}-dropdown`,v)},[v]);const Xa=w?r.createElement(l.CloseButton,{themeOverride:a,variant:"transparent","aria-label":P,onClick:N,size:O}):null;return r.createElement(l.InputWrapper,pe({required:u,id:G,label:p,error:h,description:E,className:d,style:o,themeOverride:a,classNames:n,styles:c,size:O,__staticSelector:D},_),r.createElement("div",{ref:s},r.createElement("div",{className:A.wrapper,style:L.wrapper,ref:W},r.createElement(l.Input,pe({themeOverride:a,component:"button",type:"button",classNames:n,styles:gt(pe({},c),{input:gt(pe({},c==null?void 0:c.input),{cursor:"pointer"})}),onClick:()=>B(!z),id:G,elementRef:M.useMergedRef(m,Z),__staticSelector:D,size:O,required:u,invalid:!!h,rightSection:Xa,rightSectionWidth:l.getSizeValue({size:O,sizes:Ra})},q),k||r.createElement(l.Text,{style:L.placeholder,className:A.placeholder,size:O},x))),g==="popover"?r.createElement(l.Popper,{referenceElement:S,transitionDuration:M.useReducedMotion()?0:R,transitionTimingFunction:i,forceUpdateDependencies:$,transition:C,mounted:z,position:"bottom",placement:"start",gutter:0,withArrow:!0,arrowSize:3,zIndex:H},r.createElement("div",{className:A.dropdownWrapper,style:L.dropdownWrapper,ref:M.useMergedRef(U,F),"data-mantine-stop-propagation":g==="popover"&&z,onKeyDownCapture:Qa},r.createElement(l.Paper,{className:A.dropdown,style:L.dropdown,shadow:I},V))):r.createElement(l.Modal,{opened:z,onClose:Ne,hideCloseButton:!0},V)))}Ee.displayName="@mantine/dates/DatePickerBase";var Ia=Object.defineProperty,fe=Object.getOwnPropertySymbols,vt=Object.prototype.hasOwnProperty,_t=Object.prototype.propertyIsEnumerable,ht=(e,t,a)=>t in e?Ia(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Na=(e,t)=>{for(var a in t||(t={}))vt.call(t,a)&&ht(e,a,t[a]);if(fe)for(var a of fe(t))_t.call(t,a)&&ht(e,a,t[a]);return e},xa=(e,t)=>{var a={};for(var n in e)vt.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&fe)for(var n of fe(e))t.indexOf(n)<0&&_t.call(e,n)&&(a[n]=e[n]);return a};function bt(e){var t=e,{value:a,onChange:n,defaultValue:d,themeOverride:o,classNames:c,styles:_,shadow:u="sm",locale:p="en",inputFormat:h="MMMM D, YYYY",transitionDuration:y=200,transitionTimingFunction:E,nextMonthLabel:x,previousMonthLabel:I,closeCalendarOnChange:C=!0,labelFormat:R="MMMM YYYY",withSelect:i=!1,yearsRange:m,dayClassName:T,dayStyle:O,disableOutsideEvents:V,minDate:k,maxDate:D,excludeDate:z,elementRef:B,initialMonth:g,initiallyOpened:w=!1,name:P="date",size:N="sm",dropdownType:$="popover",clearable:H=!0,disabled:q=!1,clearButtonLabel:K}=t,A=xa(t,["value","onChange","defaultValue","themeOverride","classNames","styles","shadow","locale","inputFormat","transitionDuration","transitionTimingFunction","nextMonthLabel","previousMonthLabel","closeCalendarOnChange","labelFormat","withSelect","yearsRange","dayClassName","dayStyle","disableOutsideEvents","minDate","maxDate","excludeDate","elementRef","initialMonth","initiallyOpened","name","size","dropdownType","clearable","disabled","clearButtonLabel"]);const[L,v]=Y.useState(w),F=N==="lg"||N==="xl"?"md":"sm",f=Y.useRef(),[s,S]=M.useUncontrolled({value:a,defaultValue:d,finalValue:null,onChange:n,rule:U=>U===null||U instanceof Date}),W=()=>{v(!1),setTimeout(()=>{var U;return(U=f.current)==null?void 0:U.focus()},y+20)},G=U=>{S(U),C&&W()},Q=()=>{var U;S(null),(U=f.current)==null||U.focus()};return r.createElement(r.Fragment,null,r.createElement(Ee,Na({dropdownOpened:L,setDropdownOpened:v,shadow:u,transitionDuration:y,elementRef:M.useMergedRef(B,f),size:N,styles:_,classNames:c,inputLabel:s instanceof Date?M.upperFirst(b(s).locale(p).format(h)):null,__staticSelector:"date-picker",dropdownType:$,clearable:H&&!!s&&!q,clearButtonLabel:K,onClear:Q,disabled:q},A),r.createElement(Me,{classNames:c,styles:_,locale:p,themeOverride:o,nextMonthLabel:x,previousMonthLabel:I,initialMonth:s instanceof Date?s:g,value:s,onChange:G,labelFormat:R,withSelect:i,yearsRange:m,dayClassName:T,dayStyle:O,disableOutsideEvents:V,minDate:k,maxDate:D,excludeDate:z,__staticSelector:"date-picker",fullWidth:$==="modal",size:$==="modal"?"lg":F})),r.createElement("input",{type:"hidden",name:P,value:s instanceof Date?s.toISOString():""}))}bt.displayName="@mantine/dates/DatePicker";var ja=Object.defineProperty,Ta=Object.defineProperties,Va=Object.getOwnPropertyDescriptors,me=Object.getOwnPropertySymbols,Ot=Object.prototype.hasOwnProperty,wt=Object.prototype.propertyIsEnumerable,St=(e,t,a)=>t in e?ja(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Dt=(e,t)=>{for(var a in t||(t={}))Ot.call(t,a)&&St(e,a,t[a]);if(me)for(var a of me(t))wt.call(t,a)&&St(e,a,t[a]);return e},za=(e,t)=>Ta(e,Va(t)),La=(e,t)=>{var a={};for(var n in e)Ot.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&me)for(var n of me(e))t.indexOf(n)<0&&wt.call(e,n)&&(a[n]=e[n]);return a};function Ce(e){var t=e,{classNames:a,styles:n,locale:d="en",themeOverride:o,nextMonthLabel:c,previousMonthLabel:_,initialMonth:u,month:p,onMonthChange:h,value:y,onChange:E,labelFormat:x="MMMM YYYY",withSelect:I=!1,yearsRange:C={from:2020,to:2030},dayClassName:R,dayStyle:i,disableOutsideEvents:m,minDate:T,maxDate:O,excludeDate:V,fullWidth:k=!1,size:D="sm",onMouseLeave:z,__staticSelector:B="range-calendar"}=t,g=La(t,["classNames","styles","locale","themeOverride","nextMonthLabel","previousMonthLabel","initialMonth","month","onMonthChange","value","onChange","labelFormat","withSelect","yearsRange","dayClassName","dayStyle","disableOutsideEvents","minDate","maxDate","excludeDate","fullWidth","size","onMouseLeave","__staticSelector"]);const w=l.useMantineTheme(o),[P,N]=Y.useState(null),[$,H]=Y.useState(null),q=f=>{if($ instanceof Date){if(ne(f,$))return H(null),N(null),null;const s=[f,$];return s.sort((S,W)=>S.getTime()-W.getTime()),E(s),H(null),null}return E([null,null]),H(f),null},K=f=>{typeof z=="function"&&z(f),N(null)},A=(f,s)=>{if($ instanceof Date&&P instanceof Date){const S=[P,$];return S.sort((W,G)=>W.getTime()-G.getTime()),!s.selected&&b(f).subtract(1,"day").isBefore(S[1])&&b(f).add(1,"day").isAfter(S[0])}return!1},[L,v]=M.useUncontrolled({value:p,defaultValue:u,finalValue:new Date,onChange:h,rule:f=>f instanceof Date}),F=st({month:L,minDate:T,maxDate:O});return r.createElement($e,Dt({size:D,fullWidth:k,onMouseLeave:K},g),r.createElement(Pe,{size:D,themeOverride:o,nextMonthLabel:c,previousMonthLabel:_,previousMonthDisabled:F.previousDisabled,nextMonthDisabled:F.nextDisabled,onPreviousMonth:()=>v(b(L).subtract(1,"month").toDate()),onNextMonth:()=>v(b(L).add(1,"month").toDate()),classNames:a,styles:n,locale:d,withSelect:I,yearsRange:C,month:L,setMonth:v,labelFormat:x,__staticSelector:B}),r.createElement(se,{themeOverride:o,month:L,range:y,value:$,onChange:q,dayClassName:R,dayStyle:(f,s)=>{const S=typeof i=="function"?i(f,s):{};return A(f,s)?za(Dt({},S),{backgroundColor:w.colorScheme==="dark"?l.hexToRgba(w.colors[w.primaryColor][9],.3):w.colors[w.primaryColor][0],borderRadius:0}):S},disableOutsideEvents:m,minDate:T,maxDate:O,excludeDate:V,classNames:a,styles:n,fullWidth:k,size:D,onDayMouseEnter:f=>N(f),__staticSelector:B}))}Ce.displayName="@mantine/dates/RangeCalendar";var Fa=Object.defineProperty,ye=Object.getOwnPropertySymbols,Pt=Object.prototype.hasOwnProperty,$t=Object.prototype.propertyIsEnumerable,Mt=(e,t,a)=>t in e?Fa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,ka=(e,t)=>{for(var a in t||(t={}))Pt.call(t,a)&&Mt(e,a,t[a]);if(ye)for(var a of ye(t))$t.call(t,a)&&Mt(e,a,t[a]);return e},Wa=(e,t)=>{var a={};for(var n in e)Pt.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&ye)for(var n of ye(e))t.indexOf(n)<0&&$t.call(e,n)&&(a[n]=e[n]);return a};const Re=e=>Array.isArray(e)&&e.length===2&&e.every(t=>t instanceof Date);function Et(e){var t=e,{value:a,onChange:n,defaultValue:d,themeOverride:o,classNames:c,styles:_,shadow:u="sm",locale:p="en",inputFormat:h="MMMM D, YYYY",transitionDuration:y=200,transitionTimingFunction:E,nextMonthLabel:x,previousMonthLabel:I,closeCalendarOnChange:C=!0,labelFormat:R="MMMM YYYY",withSelect:i=!1,yearsRange:m,dayClassName:T,dayStyle:O,disableOutsideEvents:V,minDate:k,maxDate:D,excludeDate:z,elementRef:B,initialMonth:g,initiallyOpened:w=!1,name:P="date",size:N="sm",dropdownType:$="popover",labelSeparator:H="\u2013",clearable:q=!0,clearButtonLabel:K}=t,A=Wa(t,["value","onChange","defaultValue","themeOverride","classNames","styles","shadow","locale","inputFormat","transitionDuration","transitionTimingFunction","nextMonthLabel","previousMonthLabel","closeCalendarOnChange","labelFormat","withSelect","yearsRange","dayClassName","dayStyle","disableOutsideEvents","minDate","maxDate","excludeDate","elementRef","initialMonth","initiallyOpened","name","size","dropdownType","labelSeparator","clearable","clearButtonLabel"]);const[L,v]=Y.useState(w),F=N==="lg"||N==="xl"?"md":"sm",f=Y.useRef(),[s,S]=M.useUncontrolled({value:a,defaultValue:d,finalValue:[null,null],onChange:n,rule:Re}),W=()=>{v(!1),setTimeout(()=>{var Z;return(Z=f.current)==null?void 0:Z.focus()},y+20)},G=Z=>{S(Z),C&&Re(Z)&&W()},Q=Re(s),U=()=>{var Z;S([null,null]),(Z=f.current)==null||Z.focus()};return r.createElement(r.Fragment,null,r.createElement(Ee,ka({dropdownOpened:L,setDropdownOpened:v,shadow:u,transitionDuration:y,elementRef:M.useMergedRef(B,f),size:N,styles:_,classNames:c,inputLabel:Q?`${M.upperFirst(b(s[0]).locale(p).format(h))} ${H} ${M.upperFirst(b(s[1]).locale(p).format(h))}`:null,__staticSelector:"date-range-picker",dropdownType:$,clearable:q&&Q,clearButtonLabel:K,onClear:U},A),r.createElement(Ce,{classNames:c,styles:_,locale:p,themeOverride:o,nextMonthLabel:x,previousMonthLabel:I,initialMonth:Q?s[0]:g,value:s,onChange:G,labelFormat:R,withSelect:i,yearsRange:m,dayClassName:T,dayStyle:O,disableOutsideEvents:V,minDate:k,maxDate:D,excludeDate:z,__staticSelector:"date-range-picker",fullWidth:$==="modal",size:$==="modal"?"lg":F})),r.createElement("input",{type:"hidden",name:`${P}-from`,value:Q?s[0].toISOString():""}),r.createElement("input",{type:"hidden",name:`${P}-to`,value:Q?s[1].toISOString():""}))}Et.displayName="@mantine/dates/DateRangePicker";function ee(e){return e>=10?e.toString():`0${e}`}var Ya=Object.defineProperty,ge=Object.getOwnPropertySymbols,Ct=Object.prototype.hasOwnProperty,Rt=Object.prototype.propertyIsEnumerable,It=(e,t,a)=>t in e?Ya(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Ba=(e,t)=>{for(var a in t||(t={}))Ct.call(t,a)&&It(e,a,t[a]);if(ge)for(var a of ge(t))Rt.call(t,a)&&It(e,a,t[a]);return e},Aa=(e,t)=>{var a={};for(var n in e)Ct.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&ge)for(var n of ge(e))t.indexOf(n)<0&&Rt.call(e,n)&&(a[n]=e[n]);return a};function ve(e){var t=e,{elementRef:a,onFocus:n,onBlur:d,onChange:o,setValue:c,withSeparator:_=!1,size:u="sm",max:p,value:h}=t,y=Aa(t,["elementRef","onFocus","onBlur","onChange","setValue","withSeparator","size","max","value"]);const E=Y.useRef(),x=i=>{typeof n=="function"&&n(i),E.current.select()},I=i=>{typeof d=="function"&&d(i),c(ee(M.clamp({value:parseInt(i.currentTarget.value,10),min:0,max:p})))},C=i=>{i.stopPropagation(),E.current.select()},R=i=>{if(i.nativeEvent.code==="ArrowUp"){i.preventDefault();const m=ee(M.clamp({value:parseInt(i.currentTarget.value,10)+1,max:p,min:0}));h!==m&&(c(m),o(m,!1))}if(i.nativeEvent.code==="ArrowDown"){i.preventDefault();const m=ee(M.clamp({value:parseInt(i.currentTarget.value,10)-1,max:p,min:0}));h!==m&&(c(m),o(m,!1))}};return r.createElement(r.Fragment,null,r.createElement("input",Ba({type:"text",ref:M.useMergedRef(E,a),onChange:i=>o(i.currentTarget.value,!0),onClick:C,onFocus:x,onBlur:I,onKeyDown:R,value:h},y)),_&&r.createElement(l.Text,{size:u,style:{lineHeight:1,color:"inherit"}},":"))}ve.displayName="@mantine/dates/TimeField";function Ie({onChange:e,nextRef:t,min:a,max:n,maxValue:d}){return(o,c)=>{var _,u,p,h;if(o==="00"){e("00"),c&&((_=t==null?void 0:t.current)==null||_.focus()),c&&((u=t==null?void 0:t.current)==null||u.select());return}const y=parseInt(o,10);if(!Number.isNaN(y)){if(y>d){e(ee(M.clamp({value:y,min:a,max:n}))),c&&((p=t==null?void 0:t.current)==null||p.focus()),c&&((h=t==null?void 0:t.current)==null||h.select());return}e(y.toString())}}}function Ha(e){return e instanceof Date?{hours:ee(e.getHours()),minutes:ee(e.getMinutes()),seconds:ee(e.getSeconds())}:{hours:"",minutes:"",seconds:""}}const Ua={xs:20,sm:23,md:25,lg:27,xl:29};var qa=l.createMemoStyles({disabled:{opacity:.6,cursor:"not-allowed"},controls:({size:e})=>({display:"flex",alignItems:"center",height:l.getSizeValue({size:e,sizes:l.INPUT_SIZES})-2}),timeInput:({theme:e,size:t})=>({width:l.getSizeValue({size:t,sizes:Ua}),appearance:"none",backgroundColor:"transparent",color:"inherit",padding:0,textAlign:"center",border:"1px solid transparent",fontSize:l.getSizeValue({size:t,sizes:e.fontSizes}),lineHeight:1,outline:0,"&[disabled]":{color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[7],cursor:"not-allowed"}})}),Ka=Object.defineProperty,Ga=Object.defineProperties,Za=Object.getOwnPropertyDescriptors,_e=Object.getOwnPropertySymbols,Nt=Object.prototype.hasOwnProperty,xt=Object.prototype.propertyIsEnumerable,jt=(e,t,a)=>t in e?Ka(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,X=(e,t)=>{for(var a in t||(t={}))Nt.call(t,a)&&jt(e,a,t[a]);if(_e)for(var a of _e(t))xt.call(t,a)&&jt(e,a,t[a]);return e},te=(e,t)=>Ga(e,Za(t)),Ja=(e,t)=>{var a={};for(var n in e)Nt.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&_e)for(var n of _e(e))t.indexOf(n)<0&&xt.call(e,n)&&(a[n]=e[n]);return a};function Tt(e){var t=e,{required:a,label:n,error:d,description:o,className:c,style:_,themeOverride:u,size:p="sm",wrapperProps:h,classNames:y,styles:E,id:x,elementRef:I,value:C,defaultValue:R,onChange:i,withSeconds:m=!1,name:T,hoursLabel:O,minutesLabel:V,secondsLabel:k,disabled:D=!1}=t,z=Ja(t,["required","label","error","description","className","style","themeOverride","size","wrapperProps","classNames","styles","id","elementRef","value","defaultValue","onChange","withSeconds","name","hoursLabel","minutesLabel","secondsLabel","disabled"]);const B=l.useMantineTheme(u),g=qa({theme:B,size:p},y,"time-input"),w=l.mergeStyles(g,E),P=M.useId(x),[N,$]=M.useUncontrolled({value:C,defaultValue:R,finalValue:new Date,rule:s=>s instanceof Date,onChange:i}),H=Y.useRef(),q=Y.useRef(),K=Y.useRef(),[A,L]=Y.useState(Ha(N)),v=Ie({onChange:s=>{L(S=>te(X({},S),{hours:s})),$(b(N).set("hours",parseInt(s,10)).toDate())},min:0,max:23,maxValue:2,nextRef:q}),F=Ie({onChange:s=>{L(S=>te(X({},S),{minutes:s})),$(b(N).set("minutes",parseInt(s,10)).toDate())},min:0,max:59,maxValue:5,nextRef:K}),f=Ie({onChange:s=>{L(S=>te(X({},S),{seconds:s})),$(b(N).set("seconds",parseInt(s,10)).toDate())},min:0,max:59,maxValue:5});return r.createElement(l.InputWrapper,X({required:a,label:n,error:d,description:o,className:c,style:_,themeOverride:u,classNames:y,styles:E,size:p,__staticSelector:"time-input",id:P},h),r.createElement(l.Input,X({component:"div",__staticSelector:"time-input",themeOverride:u,required:a,invalid:!!d,onClick:()=>H.current.focus(),size:p,className:we({[g.disabled]:D}),classNames:y,styles:E,disabled:D},z),r.createElement("div",{className:g.controls,style:w.controls},r.createElement(ve,{elementRef:M.useMergedRef(H,I),value:A.hours,onChange:v,setValue:s=>L(S=>te(X({},S),{hours:s})),id:P,className:g.timeInput,style:w.timeInput,withSeparator:!0,size:p,max:23,"aria-label":O,disabled:D}),r.createElement(ve,{elementRef:q,value:A.minutes,onChange:F,setValue:s=>L(S=>te(X({},S),{minutes:s})),className:g.timeInput,style:w.timeInput,withSeparator:m,size:p,max:59,"aria-label":V,disabled:D}),m&&r.createElement(ve,{elementRef:K,value:A.seconds,onChange:f,setValue:s=>L(S=>te(X({},S),{seconds:s})),className:g.timeInput,style:w.timeInput,size:p,max:59,"aria-label":k,disabled:D}),T&&r.createElement("input",{type:"hidden",name:T,value:N.toISOString()}))))}Tt.displayName="@mantine/dates/TimeInput",j.Calendar=Me,j.DatePicker=bt,j.DateRangePicker=Et,j.Month=se,j.RangeCalendar=Ce,j.TimeInput=Tt,j.getEndOfWeek=je,j.getMonthDays=Te,j.getMonthsNames=Ve,j.getStartOfWeek=be,j.getWeekdaysNames=ze,j.getYearsRange=Le,j.isSameDate=ne,j.isSameMonth=Oe,Object.defineProperty(j,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=index.umd.js.map |
{ | ||
"name": "@mantine/dates", | ||
"description": "Calendars, date and time pickers based on Mantine components", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"main": "cjs/index.js", | ||
@@ -13,4 +13,4 @@ "module": "esm/index.js", | ||
"peerDependencies": { | ||
"@mantine/core": "2.3.0", | ||
"@mantine/hooks": "2.3.0", | ||
"@mantine/core": "2.3.1", | ||
"@mantine/hooks": "2.3.1", | ||
"dayjs": "^1.10.5", | ||
@@ -17,0 +17,0 @@ "react": ">=16.8.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
677050
5137