react-timezone-range-picker 0.1.3 → 0.1.5

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/AroundTimePanel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAM3B,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAKxC,UAAU,gBAAgB;IACxB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,QAAA,MAAM,eAAe,EAAE,EAAE,CAAC,gBAAgB,CAmFzC,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/AroundTimePanel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAM3B,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAOxC,UAAU,gBAAgB;IACxB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,QAAA,MAAM,eAAe,EAAE,EAAE,CAAC,gBAAgB,CAoGzC,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Footer/index.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM,+CAgBlB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Footer/index.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,MAAM,+CA4BlB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/RelativeTimePanel/index.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,UAAU,kBAAkB;IAC1B,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,iBAAiB,GAAI,aAAa,kBAAkB,4CA2EhE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/RelativeTimePanel/index.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAGxC,UAAU,kBAAkB;IAC1B,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,iBAAiB,GAAI,aAAa,kBAAkB,4CAmFhE,CAAC"}
@@ -1,9 +1,12 @@
1
+ import { TimezoneRangePickerOptions } from "../interfaces";
2
+ export type QuickRangeUnit = "seconds" | "minutes" | "hours" | "days";
1
3
  export interface ITimeOptions {
2
4
  label: string;
3
5
  searchKey: string;
4
6
  startTime: string;
5
7
  endTime: string;
8
+ unit: QuickRangeUnit;
6
9
  lineBreak?: boolean;
7
10
  }
8
- export declare const getTimeOptions: (timezoneName: string) => ITimeOptions[];
11
+ export declare const getTimeOptions: (timezoneName: string, options?: TimezoneRangePickerOptions) => ITimeOptions[];
9
12
  //# sourceMappingURL=timeOptions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"timeOptions.d.ts","sourceRoot":"","sources":["../../src/RelativeTimePanel/timeOptions.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,cAAc,GAAI,cAAc,MAAM,KAAG,YAAY,EAuNjE,CAAC"}
1
+ {"version":3,"file":"timeOptions.d.ts","sourceRoot":"","sources":["../../src/RelativeTimePanel/timeOptions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAE3D,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAEtE,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,cAAc,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAkQD,eAAO,MAAM,cAAc,GACzB,cAAc,MAAM,EACpB,UAAU,0BAA0B,KACnC,YAAY,EASd,CAAC"}
@@ -4,6 +4,7 @@ import { TzRange } from "../interfaces";
4
4
  interface ISidebar {
5
5
  tzRange: TzRange;
6
6
  setSelectedPanel: Dispatch<SetStateAction<Panel>>;
7
+ mobileOnlyRelative?: boolean;
7
8
  }
8
9
  export declare const Sidebar: FC<ISidebar>;
9
10
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Sidebar/index.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,UAAU,QAAQ;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,gBAAgB,EAAE,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;CACnD;AAED,eAAO,MAAM,OAAO,EAAE,EAAE,CAAC,QAAQ,CA+ChC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Sidebar/index.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,UAAU,QAAQ;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,gBAAgB,EAAE,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;IAClD,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,eAAO,MAAM,OAAO,EAAE,EAAE,CAAC,QAAQ,CAuDhC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/StartEndTimePanel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAa3B,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAKxC,UAAU,kBAAkB;IAC1B,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,QAAA,MAAM,iBAAiB,EAAE,EAAE,CAAC,kBAAkB,CA2G7C,CAAC;AAEF,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/StartEndTimePanel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAa3B,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAOxC,UAAU,kBAAkB;IAC1B,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,QAAA,MAAM,iBAAiB,EAAE,EAAE,CAAC,kBAAkB,CAmI7C,CAAC;AAEF,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/TimezonePanel/components/TimezoneList/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAI3B,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,UAAU,aAAa;IACrB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,gBAAgB,EAAE,YAAY,GAAG,IAAI,CAAC;IACtC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,wBAAwB,CAAC,EAAE,CAAC,gBAAgB,EAAE,YAAY,KAAK,IAAI,CAAC;CACrE;AAED,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,aAAa,CAgD1C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/TimezonePanel/components/TimezoneList/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAI3B,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,UAAU,aAAa;IACrB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,gBAAgB,EAAE,YAAY,GAAG,IAAI,CAAC;IACtC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,wBAAwB,CAAC,EAAE,CAAC,gBAAgB,EAAE,YAAY,KAAK,IAAI,CAAC;CACrE;AAED,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,aAAa,CAiD1C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/TimezonePanel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAA2C,MAAM,OAAO,CAAC;AASpE,OAAO,EAAgB,OAAO,EAAE,MAAM,eAAe,CAAC;AAYtD,UAAU,cAAc;IACtB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,QAAA,MAAM,aAAa,EAAE,EAAE,CAAC,cAAc,CAoHrC,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/TimezonePanel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAA2C,MAAM,OAAO,CAAC;AASpE,OAAO,EAAgB,OAAO,EAAE,MAAM,eAAe,CAAC;AActD,UAAU,cAAc;IACtB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,QAAA,MAAM,aAAa,EAAE,EAAE,CAAC,cAAc,CA0HrC,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"getBrowserTimezone.d.ts","sourceRoot":"","sources":["../../../src/TimezonePanel/util/getBrowserTimezone.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,kBAAkB;;;;;;CAW9B,CAAC"}
1
+ {"version":3,"file":"getBrowserTimezone.d.ts","sourceRoot":"","sources":["../../../src/TimezonePanel/util/getBrowserTimezone.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,kBAAkB;;;;;;CAW9B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"getTimezones.d.ts","sourceRoot":"","sources":["../../../src/TimezonePanel/util/getTimezones.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,YAAY;;;;;;GAgBxB,CAAC"}
1
+ {"version":3,"file":"getTimezones.d.ts","sourceRoot":"","sources":["../../../src/TimezonePanel/util/getTimezones.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,YAAY;;;;;;GAWxB,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { TzRange } from "../interfaces";
2
2
  export declare enum Panel {
3
+ RELATIVE_TIME = "Relative time",
3
4
  START_END_TIME = "Start and end times",
4
5
  AROUND_TIME = "Around a time",
5
6
  TIMEZONE = "Time zone"
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/TimezoneRangePicker/index.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAIxC,oBAAY,KAAK;IACf,cAAc,wBAAwB;IACtC,WAAW,kBAAkB;IAC7B,QAAQ,cAAc;CACvB;AA6CD,QAAA,MAAM,0BAA0B,GAAI,OAAO,OAAO,4CAMjD,CAAC;AAEF,OAAO,EAAE,0BAA0B,IAAI,mBAAmB,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/TimezoneRangePicker/index.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAKxC,oBAAY,KAAK;IACf,aAAa,kBAAkB;IAC/B,cAAc,wBAAwB;IACtC,WAAW,kBAAkB;IAC7B,QAAQ,cAAc;CACvB;AAmHD,QAAA,MAAM,0BAA0B,GAAI,OAAO,OAAO,4CAMjD,CAAC;AAEF,OAAO,EAAE,0BAA0B,IAAI,mBAAmB,EAAE,CAAC"}
package/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),w=require("@mantine/core"),oe=require("@mantine/dates");function Ee(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var be={exports:{}},ue={};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react"),D=require("@mantine/core"),re=require("@mantine/hooks"),ae=require("@mantine/dates");function Ce(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ge={exports:{}},fe={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.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 Re;function dt(){if(Re)return ue;Re=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,s,i){var a=null;if(i!==void 0&&(a=""+i),s.key!==void 0&&(a=""+s.key),"key"in s){i={};for(var c in s)c!=="key"&&(i[c]=s[c])}else i=s;return s=i.ref,{$$typeof:e,type:n,key:a,ref:s!==void 0?s:null,props:i}}return ue.Fragment=t,ue.jsx=r,ue.jsxs=r,ue}var le={};/**
9
+ */var We;function Tt(){if(We)return fe;We=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,s,c){var i=null;if(c!==void 0&&(i=""+c),s.key!==void 0&&(i=""+s.key),"key"in s){c={};for(var u in s)u!=="key"&&(c[u]=s[u])}else c=s;return s=c.ref,{$$typeof:e,type:n,key:i,ref:s!==void 0?s:null,props:c}}return fe.Fragment=t,fe.jsx=r,fe.jsxs=r,fe}var me={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,50 +14,50 @@
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 Ye;function ft(){return Ye||(Ye=1,process.env.NODE_ENV!=="production"&&(function(){function e(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===z?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case b:return"Fragment";case S:return"Profiler";case y:return"StrictMode";case Y:return"Suspense";case $:return"SuspenseList";case N:return"Activity"}if(typeof o=="object")switch(typeof o.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),o.$$typeof){case O:return"Portal";case R:return(o.displayName||"Context")+".Provider";case C:return(o._context.displayName||"Context")+".Consumer";case K:var x=o.render;return o=o.displayName,o||(o=x.displayName||x.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case V:return x=o.displayName||null,x!==null?x:e(o.type)||"Memo";case L:x=o._payload,o=o._init;try{return e(o(x))}catch{}}return null}function t(o){return""+o}function r(o){try{t(o);var x=!1}catch{x=!0}if(x){x=console;var M=x.error,I=typeof Symbol=="function"&&Symbol.toStringTag&&o[Symbol.toStringTag]||o.constructor.name||"Object";return M.call(x,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",I),t(o)}}function n(o){if(o===b)return"<>";if(typeof o=="object"&&o!==null&&o.$$typeof===L)return"<...>";try{var x=e(o);return x?"<"+x+">":"<...>"}catch{return"<...>"}}function s(){var o=A.A;return o===null?null:o.getOwner()}function i(){return Error("react-stack-top-frame")}function a(o){if(Q.call(o,"key")){var x=Object.getOwnPropertyDescriptor(o,"key").get;if(x&&x.isReactWarning)return!1}return o.key!==void 0}function c(o,x){function M(){v||(v=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",x))}M.isReactWarning=!0,Object.defineProperty(o,"key",{get:M,configurable:!0})}function u(){var o=e(this.type);return h[o]||(h[o]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),o=this.props.ref,o!==void 0?o:null}function m(o,x,M,I,q,H,X,p){return M=H.ref,o={$$typeof:P,type:o,key:x,props:H,_owner:q},(M!==void 0?M:null)!==null?Object.defineProperty(o,"ref",{enumerable:!1,get:u}):Object.defineProperty(o,"ref",{enumerable:!1,value:null}),o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(o,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(o,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:X}),Object.defineProperty(o,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:p}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o}function D(o,x,M,I,q,H,X,p){var _=x.children;if(_!==void 0)if(I)if(re(_)){for(I=0;I<_.length;I++)g(_[I]);Object.freeze&&Object.freeze(_)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else g(_);if(Q.call(x,"key")){_=e(o);var W=Object.keys(x).filter(function(Z){return Z!=="key"});I=0<W.length?"{key: someKey, "+W.join(": ..., ")+": ...}":"{key: someKey}",F[_+I]||(W=0<W.length?"{"+W.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var qe;function bt(){return qe||(qe=1,process.env.NODE_ENV!=="production"&&(function(){function e(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===z?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case x:return"Fragment";case $:return"Profiler";case h:return"StrictMode";case N:return"Suspense";case w:return"SuspenseList";case q:return"Activity"}if(typeof a=="object")switch(typeof a.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),a.$$typeof){case O:return"Portal";case Y:return(a.displayName||"Context")+".Provider";case C:return(a._context.displayName||"Context")+".Consumer";case U:var S=a.render;return a=a.displayName,a||(a=S.displayName||S.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case A:return S=a.displayName||null,S!==null?S:e(a.type)||"Memo";case L:S=a._payload,a=a._init;try{return e(a(S))}catch{}}return null}function t(a){return""+a}function r(a){try{t(a);var S=!1}catch{S=!0}if(S){S=console;var F=S.error,I=typeof Symbol=="function"&&Symbol.toStringTag&&a[Symbol.toStringTag]||a.constructor.name||"Object";return F.call(S,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",I),t(a)}}function n(a){if(a===x)return"<>";if(typeof a=="object"&&a!==null&&a.$$typeof===L)return"<...>";try{var S=e(a);return S?"<"+S+">":"<...>"}catch{return"<...>"}}function s(){var a=V.A;return a===null?null:a.getOwner()}function c(){return Error("react-stack-top-frame")}function i(a){if(X.call(a,"key")){var S=Object.getOwnPropertyDescriptor(a,"key").get;if(S&&S.isReactWarning)return!1}return a.key!==void 0}function u(a,S){function F(){b||(b=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",S))}F.isReactWarning=!0,Object.defineProperty(a,"key",{get:F,configurable:!0})}function o(){var a=e(this.type);return y[a]||(y[a]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),a=this.props.ref,a!==void 0?a:null}function d(a,S,F,I,W,H,G,T){return F=H.ref,a={$$typeof:j,type:a,key:S,props:H,_owner:W},(F!==void 0?F:null)!==null?Object.defineProperty(a,"ref",{enumerable:!1,get:o}):Object.defineProperty(a,"ref",{enumerable:!1,value:null}),a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(a,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(a,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:G}),Object.defineProperty(a,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:T}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a}function v(a,S,F,I,W,H,G,T){var M=S.children;if(M!==void 0)if(I)if(se(M)){for(I=0;I<M.length;I++)_(M[I]);Object.freeze&&Object.freeze(M)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else _(M);if(X.call(S,"key")){M=e(a);var R=Object.keys(S).filter(function(Z){return Z!=="key"});I=0<R.length?"{key: someKey, "+R.join(": ..., ")+": ...}":"{key: someKey}",P[M+I]||(R=0<R.length?"{"+R.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
18
  let props = %s;
19
19
  <%s {...props} />
20
20
  React keys must be passed directly to JSX without using spread:
21
21
  let props = %s;
22
- <%s key={someKey} {...props} />`,I,_,W,_),F[_+I]=!0)}if(_=null,M!==void 0&&(r(M),_=""+M),a(x)&&(r(x.key),_=""+x.key),"key"in x){M={};for(var U in x)U!=="key"&&(M[U]=x[U])}else M=x;return _&&c(M,typeof o=="function"?o.displayName||o.name||"Unknown":o),m(o,_,H,q,s(),M,X,p)}function g(o){typeof o=="object"&&o!==null&&o.$$typeof===P&&o._store&&(o._store.validated=1)}var j=f,P=Symbol.for("react.transitional.element"),O=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),R=Symbol.for("react.context"),K=Symbol.for("react.forward_ref"),Y=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),z=Symbol.for("react.client.reference"),A=j.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=Object.prototype.hasOwnProperty,re=Array.isArray,E=console.createTask?console.createTask:function(){return null};j={react_stack_bottom_frame:function(o){return o()}};var v,h={},k=j.react_stack_bottom_frame.bind(j,i)(),T=E(n(i)),F={};le.Fragment=b,le.jsx=function(o,x,M,I,q){var H=1e4>A.recentlyCreatedOwnerStacks++;return D(o,x,M,!1,I,q,H?Error("react-stack-top-frame"):k,H?E(n(o)):T)},le.jsxs=function(o,x,M,I,q){var H=1e4>A.recentlyCreatedOwnerStacks++;return D(o,x,M,!0,I,q,H?Error("react-stack-top-frame"):k,H?E(n(o)):T)}})()),le}var Ke;function mt(){return Ke||(Ke=1,process.env.NODE_ENV==="production"?be.exports=dt():be.exports=ft()),be.exports}var d=mt();function ht(e,t){var r=f.useRef(!1),n=f.useRef(),s=f.useRef(e),i=f.useCallback(function(){return r.current},[]),a=f.useCallback(function(){r.current=!1,n.current&&clearTimeout(n.current),n.current=setTimeout(function(){r.current=!0,s.current()},t)},[t]),c=f.useCallback(function(){r.current=null,n.current&&clearTimeout(n.current)},[]);return f.useEffect(function(){s.current=e},[e]),f.useEffect(function(){return a(),c},[t]),[i,c,a]}function tt(e,t,r){r===void 0&&(r=[]);var n=ht(e,t),s=n[0],i=n[1],a=n[2];return f.useEffect(a,r),[s,i]}function rt(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=rt(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function nt(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=rt(e))&&(n&&(n+=" "),n+=t);return n}const yt="_row_550mo_1",de={row:yt,"row-dark":"_row-dark_550mo_5","row-light":"_row-light_550mo_12","row-selected-dark":"_row-selected-dark_550mo_19","row-selected-light":"_row-selected-light_550mo_27"},Ie=()=>{const{colorScheme:e}=w.useMantineColorScheme(),t=w.useMantineTheme();return{colorScheme:e,theme:t}},Ue=({name:e,longName:t,currentTime:r,utcOffset:n,selectedTimezone:s,isBrowserTimezone:i=!1,handleTimezoneMouseClick:a=void 0})=>{const{colorScheme:c}=Ie(),u=()=>{i||a({name:e,longName:t,utcOffset:n})};return d.jsxs(w.Flex,{direction:"column",className:nt(de.row,i?void 0:c==="dark"?de["row-dark"]:de["row-light"],s?.name===e?c==="dark"?de["row-selected-dark"]:de["row-selected-light"]:void 0),onClick:u,children:[d.jsxs(w.Flex,{justify:"space-between",children:[d.jsx(w.Text,{size:"sm",children:e}),d.jsxs(w.Text,{size:"sm",children:[r," • UTC",n]})]}),d.jsx(w.Text,{size:"sm",children:t})]})};/**
22
+ <%s key={someKey} {...props} />`,I,M,R,M),P[M+I]=!0)}if(M=null,F!==void 0&&(r(F),M=""+F),i(S)&&(r(S.key),M=""+S.key),"key"in S){F={};for(var K in S)K!=="key"&&(F[K]=S[K])}else F=S;return M&&u(F,typeof a=="function"?a.displayName||a.name||"Unknown":a),d(a,M,H,W,s(),F,G,T)}function _(a){typeof a=="object"&&a!==null&&a.$$typeof===j&&a._store&&(a._store.validated=1)}var g=m,j=Symbol.for("react.transitional.element"),O=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),$=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),Y=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),w=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),q=Symbol.for("react.activity"),z=Symbol.for("react.client.reference"),V=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=Object.prototype.hasOwnProperty,se=Array.isArray,E=console.createTask?console.createTask:function(){return null};g={react_stack_bottom_frame:function(a){return a()}};var b,y={},k=g.react_stack_bottom_frame.bind(g,c)(),p=E(n(c)),P={};me.Fragment=x,me.jsx=function(a,S,F,I,W){var H=1e4>V.recentlyCreatedOwnerStacks++;return v(a,S,F,!1,I,W,H?Error("react-stack-top-frame"):k,H?E(n(a)):p)},me.jsxs=function(a,S,F,I,W){var H=1e4>V.recentlyCreatedOwnerStacks++;return v(a,S,F,!0,I,W,H?Error("react-stack-top-frame"):k,H?E(n(a)):p)}})()),me}var He;function vt(){return He||(He=1,process.env.NODE_ENV==="production"?ge.exports=Tt():ge.exports=bt()),ge.exports}var l=vt();function xt(e,t){var r=m.useRef(!1),n=m.useRef(),s=m.useRef(e),c=m.useCallback(function(){return r.current},[]),i=m.useCallback(function(){r.current=!1,n.current&&clearTimeout(n.current),n.current=setTimeout(function(){r.current=!0,s.current()},t)},[t]),u=m.useCallback(function(){r.current=null,n.current&&clearTimeout(n.current)},[]);return m.useEffect(function(){s.current=e},[e]),m.useEffect(function(){return i(),u},[t]),[c,u,i]}function ct(e,t,r){r===void 0&&(r=[]);var n=xt(e,t),s=n[0],c=n[1],i=n[2];return m.useEffect(i,r),[s,c]}function ut(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=ut(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function lt(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=ut(e))&&(n&&(n+=" "),n+=t);return n}const St="_row_550mo_1",he={row:St,"row-dark":"_row-dark_550mo_5","row-light":"_row-light_550mo_12","row-selected-dark":"_row-selected-dark_550mo_19","row-selected-light":"_row-selected-light_550mo_27"},Ue=()=>{const{colorScheme:e}=D.useMantineColorScheme(),t=D.useMantineTheme();return{colorScheme:e,theme:t}},Be=({name:e,longName:t,currentTime:r,utcOffset:n,selectedTimezone:s,isBrowserTimezone:c=!1,handleTimezoneMouseClick:i=void 0})=>{const{colorScheme:u}=Ue(),o=re.useMediaQuery("(max-width: 48em)"),d=()=>{c||i({name:e,longName:t,utcOffset:n})};return l.jsxs(D.Flex,{direction:"column",className:lt(he.row,c?void 0:u==="dark"?he["row-dark"]:he["row-light"],s?.name===e?u==="dark"?he["row-selected-dark"]:he["row-selected-light"]:void 0),onClick:d,children:[l.jsxs(D.Flex,{justify:"space-between",gap:8,wrap:o?"wrap":"nowrap",children:[l.jsx(D.Text,{size:"sm",children:e}),l.jsxs(D.Text,{size:"sm",children:[r," • UTC",n]})]}),l.jsx(D.Text,{size:"sm",c:o?"dimmed":void 0,children:t})]})};/**
23
23
  * @license @tabler/icons-react v3.35.0 - MIT
24
24
  *
25
25
  * This source code is licensed under the MIT license.
26
26
  * See the LICENSE file in the root directory of this source tree.
27
- */var Tt={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/**
27
+ */var $t={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/**
28
28
  * @license @tabler/icons-react v3.35.0 - MIT
29
29
  *
30
30
  * This source code is licensed under the MIT license.
31
31
  * See the LICENSE file in the root directory of this source tree.
32
- */const ce=(e,t,r,n)=>{const s=f.forwardRef(({color:i="currentColor",size:a=24,stroke:c=2,title:u,className:m,children:D,...g},j)=>f.createElement("svg",{ref:j,...Tt[e],width:a,height:a,className:["tabler-icon",`tabler-icon-${t}`,m].join(" "),...e==="filled"?{fill:i}:{strokeWidth:c,stroke:i},...g},[u&&f.createElement("title",{key:"svg-title"},u),...n.map(([P,O])=>f.createElement(P,O)),...Array.isArray(D)?D:[D]]));return s.displayName=`${r}`,s};/**
32
+ */const le=(e,t,r,n)=>{const s=m.forwardRef(({color:c="currentColor",size:i=24,stroke:u=2,title:o,className:d,children:v,..._},g)=>m.createElement("svg",{ref:g,...$t[e],width:i,height:i,className:["tabler-icon",`tabler-icon-${t}`,d].join(" "),...e==="filled"?{fill:c}:{strokeWidth:u,stroke:c},..._},[o&&m.createElement("title",{key:"svg-title"},o),...n.map(([j,O])=>m.createElement(j,O)),...Array.isArray(v)?v:[v]]));return s.displayName=`${r}`,s};/**
33
33
  * @license @tabler/icons-react v3.35.0 - MIT
34
34
  *
35
35
  * This source code is licensed under the MIT license.
36
36
  * See the LICENSE file in the root directory of this source tree.
37
- */const pt=[["path",{d:"M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12z",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v4",key:"svg-2"}],["path",{d:"M4 11h16",key:"svg-3"}],["path",{d:"M11 15h1",key:"svg-4"}],["path",{d:"M12 15v3",key:"svg-5"}]],Ce=ce("outline","calendar","Calendar",pt);/**
37
+ */const gt=[["path",{d:"M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12z",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v4",key:"svg-2"}],["path",{d:"M4 11h16",key:"svg-3"}],["path",{d:"M11 15h1",key:"svg-4"}],["path",{d:"M12 15v3",key:"svg-5"}]],Ve=le("outline","calendar","Calendar",gt);/**
38
38
  * @license @tabler/icons-react v3.35.0 - MIT
39
39
  *
40
40
  * This source code is licensed under the MIT license.
41
41
  * See the LICENSE file in the root directory of this source tree.
42
- */const bt=[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]],_e=ce("outline","chevron-right","ChevronRight",bt);/**
42
+ */const Dt=[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]],Fe=le("outline","chevron-right","ChevronRight",Dt);/**
43
43
  * @license @tabler/icons-react v3.35.0 - MIT
44
44
  *
45
45
  * This source code is licensed under the MIT license.
46
46
  * See the LICENSE file in the root directory of this source tree.
47
- */const vt=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 7v5l3 3",key:"svg-1"}]],we=ce("outline","clock","Clock",vt);/**
47
+ */const wt=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 7v5l3 3",key:"svg-1"}]],Me=le("outline","clock","Clock",wt);/**
48
48
  * @license @tabler/icons-react v3.35.0 - MIT
49
49
  *
50
50
  * This source code is licensed under the MIT license.
51
51
  * See the LICENSE file in the root directory of this source tree.
52
- */const xt=[["path",{d:"M4 6h16",key:"svg-0"}],["path",{d:"M6 12h12",key:"svg-1"}],["path",{d:"M9 18h6",key:"svg-2"}]],gt=ce("outline","filter-2","Filter2",xt);/**
52
+ */const kt=[["path",{d:"M4 6h16",key:"svg-0"}],["path",{d:"M6 12h12",key:"svg-1"}],["path",{d:"M9 18h6",key:"svg-2"}]],jt=le("outline","filter-2","Filter2",kt);/**
53
53
  * @license @tabler/icons-react v3.35.0 - MIT
54
54
  *
55
55
  * This source code is licensed under the MIT license.
56
56
  * See the LICENSE file in the root directory of this source tree.
57
- */const St=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M3.6 9h16.8",key:"svg-1"}],["path",{d:"M3.6 15h16.8",key:"svg-2"}],["path",{d:"M11.5 3a17 17 0 0 0 0 18",key:"svg-3"}],["path",{d:"M12.5 3a17 17 0 0 1 0 18",key:"svg-4"}]],$t=ce("outline","world","World",St);/**
57
+ */const _t=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M3.6 9h16.8",key:"svg-1"}],["path",{d:"M3.6 15h16.8",key:"svg-2"}],["path",{d:"M11.5 3a17 17 0 0 0 0 18",key:"svg-3"}],["path",{d:"M12.5 3a17 17 0 0 1 0 18",key:"svg-4"}]],Et=le("outline","world","World",_t);/**
58
58
  * @license @tabler/icons-react v3.35.0 - MIT
59
59
  *
60
60
  * This source code is licensed under the MIT license.
61
61
  * See the LICENSE file in the root directory of this source tree.
62
- */const kt=[["path",{d:"M16 2c.183 0 .355 .05 .502 .135l.033 .02c.28 .177 .465 .49 .465 .845v1h1a3 3 0 0 1 2.995 2.824l.005 .176v12a3 3 0 0 1 -2.824 2.995l-.176 .005h-12a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-12a3 3 0 0 1 2.824 -2.995l.176 -.005h1v-1a1 1 0 0 1 .514 -.874l.093 -.046l.066 -.025l.1 -.029l.107 -.019l.12 -.007q .083 0 .161 .013l.122 .029l.04 .012l.06 .023c.328 .135 .568 .44 .61 .806l.007 .117v1h6v-1a1 1 0 0 1 1 -1m3 7h-14v9.625c0 .705 .386 1.286 .883 1.366l.117 .009h12c.513 0 .936 -.53 .993 -1.215l.007 -.16z",key:"svg-0"}],["path",{d:"M9.015 13a1 1 0 0 1 -1 1a1.001 1.001 0 1 1 -.005 -2c.557 0 1.005 .448 1.005 1",key:"svg-1"}],["path",{d:"M13.015 13a1 1 0 0 1 -1 1a1.001 1.001 0 1 1 -.005 -2c.557 0 1.005 .448 1.005 1",key:"svg-2"}],["path",{d:"M17.02 13a1 1 0 0 1 -1 1a1.001 1.001 0 1 1 -.005 -2c.557 0 1.005 .448 1.005 1",key:"svg-3"}],["path",{d:"M12.02 15a1 1 0 0 1 0 2a1.001 1.001 0 1 1 -.005 -2z",key:"svg-4"}],["path",{d:"M9.015 16a1 1 0 0 1 -1 1a1.001 1.001 0 1 1 -.005 -2c.557 0 1.005 .448 1.005 1",key:"svg-5"}]],Dt=ce("filled","calendar-week-filled","CalendarWeekFilled",kt),jt=({searchText:e,setSearchText:t})=>d.jsx(w.Input,{placeholder:"Timezone search (Asia, Tokyo, +09:00, etc)",leftSection:d.jsx(gt,{stroke:2}),value:e,onChange:r=>t(r.currentTarget.value)});var ke={exports:{}},wt=ke.exports,We;function Et(){return We||(We=1,(function(e,t){(function(r,n){e.exports=n()})(wt,(function(){var r=1e3,n=6e4,s=36e5,i="millisecond",a="second",c="minute",u="hour",m="day",D="week",g="month",j="quarter",P="year",O="date",b="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,S=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,C={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(E){var v=["th","st","nd","rd"],h=E%100;return"["+E+(v[(h-20)%10]||v[h]||v[0])+"]"}},R=function(E,v,h){var k=String(E);return!k||k.length>=v?E:""+Array(v+1-k.length).join(h)+E},K={s:R,z:function(E){var v=-E.utcOffset(),h=Math.abs(v),k=Math.floor(h/60),T=h%60;return(v<=0?"+":"-")+R(k,2,"0")+":"+R(T,2,"0")},m:function E(v,h){if(v.date()<h.date())return-E(h,v);var k=12*(h.year()-v.year())+(h.month()-v.month()),T=v.clone().add(k,g),F=h-T<0,o=v.clone().add(k+(F?-1:1),g);return+(-(k+(h-T)/(F?T-o:o-T))||0)},a:function(E){return E<0?Math.ceil(E)||0:Math.floor(E)},p:function(E){return{M:g,y:P,w:D,d:m,D:O,h:u,m:c,s:a,ms:i,Q:j}[E]||String(E||"").toLowerCase().replace(/s$/,"")},u:function(E){return E===void 0}},Y="en",$={};$[Y]=C;var V="$isDayjsObject",L=function(E){return E instanceof Q||!(!E||!E[V])},N=function E(v,h,k){var T;if(!v)return Y;if(typeof v=="string"){var F=v.toLowerCase();$[F]&&(T=F),h&&($[F]=h,T=F);var o=v.split("-");if(!T&&o.length>1)return E(o[0])}else{var x=v.name;$[x]=v,T=x}return!k&&T&&(Y=T),T||!k&&Y},z=function(E,v){if(L(E))return E.clone();var h=typeof v=="object"?v:{};return h.date=E,h.args=arguments,new Q(h)},A=K;A.l=N,A.i=L,A.w=function(E,v){return z(E,{locale:v.$L,utc:v.$u,x:v.$x,$offset:v.$offset})};var Q=(function(){function E(h){this.$L=N(h.locale,null,!0),this.parse(h),this.$x=this.$x||h.x||{},this[V]=!0}var v=E.prototype;return v.parse=function(h){this.$d=(function(k){var T=k.date,F=k.utc;if(T===null)return new Date(NaN);if(A.u(T))return new Date;if(T instanceof Date)return new Date(T);if(typeof T=="string"&&!/Z$/i.test(T)){var o=T.match(y);if(o){var x=o[2]-1||0,M=(o[7]||"0").substring(0,3);return F?new Date(Date.UTC(o[1],x,o[3]||1,o[4]||0,o[5]||0,o[6]||0,M)):new Date(o[1],x,o[3]||1,o[4]||0,o[5]||0,o[6]||0,M)}}return new Date(T)})(h),this.init()},v.init=function(){var h=this.$d;this.$y=h.getFullYear(),this.$M=h.getMonth(),this.$D=h.getDate(),this.$W=h.getDay(),this.$H=h.getHours(),this.$m=h.getMinutes(),this.$s=h.getSeconds(),this.$ms=h.getMilliseconds()},v.$utils=function(){return A},v.isValid=function(){return this.$d.toString()!==b},v.isSame=function(h,k){var T=z(h);return this.startOf(k)<=T&&T<=this.endOf(k)},v.isAfter=function(h,k){return z(h)<this.startOf(k)},v.isBefore=function(h,k){return this.endOf(k)<z(h)},v.$g=function(h,k,T){return A.u(h)?this[k]:this.set(T,h)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(h,k){var T=this,F=!!A.u(k)||k,o=A.p(h),x=function(W,U){var Z=A.w(T.$u?Date.UTC(T.$y,U,W):new Date(T.$y,U,W),T);return F?Z:Z.endOf(m)},M=function(W,U){return A.w(T.toDate()[W].apply(T.toDate("s"),(F?[0,0,0,0]:[23,59,59,999]).slice(U)),T)},I=this.$W,q=this.$M,H=this.$D,X="set"+(this.$u?"UTC":"");switch(o){case P:return F?x(1,0):x(31,11);case g:return F?x(1,q):x(0,q+1);case D:var p=this.$locale().weekStart||0,_=(I<p?I+7:I)-p;return x(F?H-_:H+(6-_),q);case m:case O:return M(X+"Hours",0);case u:return M(X+"Minutes",1);case c:return M(X+"Seconds",2);case a:return M(X+"Milliseconds",3);default:return this.clone()}},v.endOf=function(h){return this.startOf(h,!1)},v.$set=function(h,k){var T,F=A.p(h),o="set"+(this.$u?"UTC":""),x=(T={},T[m]=o+"Date",T[O]=o+"Date",T[g]=o+"Month",T[P]=o+"FullYear",T[u]=o+"Hours",T[c]=o+"Minutes",T[a]=o+"Seconds",T[i]=o+"Milliseconds",T)[F],M=F===m?this.$D+(k-this.$W):k;if(F===g||F===P){var I=this.clone().set(O,1);I.$d[x](M),I.init(),this.$d=I.set(O,Math.min(this.$D,I.daysInMonth())).$d}else x&&this.$d[x](M);return this.init(),this},v.set=function(h,k){return this.clone().$set(h,k)},v.get=function(h){return this[A.p(h)]()},v.add=function(h,k){var T,F=this;h=Number(h);var o=A.p(k),x=function(q){var H=z(F);return A.w(H.date(H.date()+Math.round(q*h)),F)};if(o===g)return this.set(g,this.$M+h);if(o===P)return this.set(P,this.$y+h);if(o===m)return x(1);if(o===D)return x(7);var M=(T={},T[c]=n,T[u]=s,T[a]=r,T)[o]||1,I=this.$d.getTime()+h*M;return A.w(I,this)},v.subtract=function(h,k){return this.add(-1*h,k)},v.format=function(h){var k=this,T=this.$locale();if(!this.isValid())return T.invalidDate||b;var F=h||"YYYY-MM-DDTHH:mm:ssZ",o=A.z(this),x=this.$H,M=this.$m,I=this.$M,q=T.weekdays,H=T.months,X=T.meridiem,p=function(U,Z,te,G){return U&&(U[Z]||U(k,F))||te[Z].slice(0,G)},_=function(U){return A.s(x%12||12,U,"0")},W=X||function(U,Z,te){var G=U<12?"AM":"PM";return te?G.toLowerCase():G};return F.replace(S,(function(U,Z){return Z||(function(te){switch(te){case"YY":return String(k.$y).slice(-2);case"YYYY":return A.s(k.$y,4,"0");case"M":return I+1;case"MM":return A.s(I+1,2,"0");case"MMM":return p(T.monthsShort,I,H,3);case"MMMM":return p(H,I);case"D":return k.$D;case"DD":return A.s(k.$D,2,"0");case"d":return String(k.$W);case"dd":return p(T.weekdaysMin,k.$W,q,2);case"ddd":return p(T.weekdaysShort,k.$W,q,3);case"dddd":return q[k.$W];case"H":return String(x);case"HH":return A.s(x,2,"0");case"h":return _(1);case"hh":return _(2);case"a":return W(x,M,!0);case"A":return W(x,M,!1);case"m":return String(M);case"mm":return A.s(M,2,"0");case"s":return String(k.$s);case"ss":return A.s(k.$s,2,"0");case"SSS":return A.s(k.$ms,3,"0");case"Z":return o}return null})(U)||o.replace(":","")}))},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(h,k,T){var F,o=this,x=A.p(k),M=z(h),I=(M.utcOffset()-this.utcOffset())*n,q=this-M,H=function(){return A.m(o,M)};switch(x){case P:F=H()/12;break;case g:F=H();break;case j:F=H()/3;break;case D:F=(q-I)/6048e5;break;case m:F=(q-I)/864e5;break;case u:F=q/s;break;case c:F=q/n;break;case a:F=q/r;break;default:F=q}return T?F:A.a(F)},v.daysInMonth=function(){return this.endOf(g).$D},v.$locale=function(){return $[this.$L]},v.locale=function(h,k){if(!h)return this.$L;var T=this.clone(),F=N(h,k,!0);return F&&(T.$L=F),T},v.clone=function(){return A.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},E})(),re=Q.prototype;return z.prototype=re,[["$ms",i],["$s",a],["$m",c],["$H",u],["$W",m],["$M",g],["$y",P],["$D",O]].forEach((function(E){re[E[1]]=function(v){return this.$g(v,E[0],E[1])}})),z.extend=function(E,v){return E.$i||(E(v,Q,z),E.$i=!0),z},z.locale=N,z.isDayjs=L,z.unix=function(E){return z(1e3*E)},z.en=$[Y],z.Ls=$,z.p={},z}))})(ke)),ke.exports}var _t=Et();const l=Ee(_t);var De={exports:{}},Ot=De.exports,qe;function Ct(){return qe||(qe=1,(function(e,t){(function(r,n){e.exports=n()})(Ot,(function(){var r="minute",n=/[+-]\d\d(?::?\d\d)?/g,s=/([+-]|\d\d)/g;return function(i,a,c){var u=a.prototype;c.utc=function(b){var y={date:b,utc:!0,args:arguments};return new a(y)},u.utc=function(b){var y=c(this.toDate(),{locale:this.$L,utc:!0});return b?y.add(this.utcOffset(),r):y},u.local=function(){return c(this.toDate(),{locale:this.$L,utc:!1})};var m=u.parse;u.parse=function(b){b.utc&&(this.$u=!0),this.$utils().u(b.$offset)||(this.$offset=b.$offset),m.call(this,b)};var D=u.init;u.init=function(){if(this.$u){var b=this.$d;this.$y=b.getUTCFullYear(),this.$M=b.getUTCMonth(),this.$D=b.getUTCDate(),this.$W=b.getUTCDay(),this.$H=b.getUTCHours(),this.$m=b.getUTCMinutes(),this.$s=b.getUTCSeconds(),this.$ms=b.getUTCMilliseconds()}else D.call(this)};var g=u.utcOffset;u.utcOffset=function(b,y){var S=this.$utils().u;if(S(b))return this.$u?0:S(this.$offset)?g.call(this):this.$offset;if(typeof b=="string"&&(b=(function(Y){Y===void 0&&(Y="");var $=Y.match(n);if(!$)return null;var V=(""+$[0]).match(s)||["-",0,0],L=V[0],N=60*+V[1]+ +V[2];return N===0?0:L==="+"?N:-N})(b),b===null))return this;var C=Math.abs(b)<=16?60*b:b;if(C===0)return this.utc(y);var R=this.clone();if(y)return R.$offset=C,R.$u=!1,R;var K=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(R=this.local().add(C+K,r)).$offset=C,R.$x.$localOffset=K,R};var j=u.format;u.format=function(b){var y=b||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return j.call(this,y)},u.valueOf=function(){var b=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*b},u.isUTC=function(){return!!this.$u},u.toISOString=function(){return this.toDate().toISOString()},u.toString=function(){return this.toDate().toUTCString()};var P=u.toDate;u.toDate=function(b){return b==="s"&&this.$offset?c(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():P.call(this)};var O=u.diff;u.diff=function(b,y,S){if(b&&this.$u===b.$u)return O.call(this,b,y,S);var C=this.local(),R=c(b).local();return O.call(C,R,y,S)}}}))})(De)),De.exports}var Mt=Ct();const Ft=Ee(Mt);var je={exports:{}},Pt=je.exports,Ne;function Vt(){return Ne||(Ne=1,(function(e,t){(function(r,n){e.exports=n()})(Pt,(function(){var r={year:0,month:1,day:2,hour:3,minute:4,second:5},n={};return function(s,i,a){var c,u=function(j,P,O){O===void 0&&(O={});var b=new Date(j),y=(function(S,C){C===void 0&&(C={});var R=C.timeZoneName||"short",K=S+"|"+R,Y=n[K];return Y||(Y=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:S,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:R}),n[K]=Y),Y})(P,O);return y.formatToParts(b)},m=function(j,P){for(var O=u(j,P),b=[],y=0;y<O.length;y+=1){var S=O[y],C=S.type,R=S.value,K=r[C];K>=0&&(b[K]=parseInt(R,10))}var Y=b[3],$=Y===24?0:Y,V=b[0]+"-"+b[1]+"-"+b[2]+" "+$+":"+b[4]+":"+b[5]+":000",L=+j;return(a.utc(V).valueOf()-(L-=L%1e3))/6e4},D=i.prototype;D.tz=function(j,P){j===void 0&&(j=c);var O,b=this.utcOffset(),y=this.toDate(),S=y.toLocaleString("en-US",{timeZone:j}),C=Math.round((y-new Date(S))/1e3/60),R=15*-Math.round(y.getTimezoneOffset()/15)-C;if(!Number(R))O=this.utcOffset(0,P);else if(O=a(S,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(R,!0),P){var K=O.utcOffset();O=O.add(b-K,"minute")}return O.$x.$timezone=j,O},D.offsetName=function(j){var P=this.$x.$timezone||a.tz.guess(),O=u(this.valueOf(),P,{timeZoneName:j}).find((function(b){return b.type.toLowerCase()==="timezonename"}));return O&&O.value};var g=D.startOf;D.startOf=function(j,P){if(!this.$x||!this.$x.$timezone)return g.call(this,j,P);var O=a(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return g.call(O,j,P).tz(this.$x.$timezone,!0)},a.tz=function(j,P,O){var b=O&&P,y=O||P||c,S=m(+a(),y);if(typeof j!="string")return a(j).tz(y);var C=(function($,V,L){var N=$-60*V*1e3,z=m(N,L);if(V===z)return[N,V];var A=m(N-=60*(z-V)*1e3,L);return z===A?[N,z]:[$-60*Math.min(z,A)*1e3,Math.max(z,A)]})(a.utc(j,b).valueOf(),S,y),R=C[0],K=C[1],Y=a(R).utcOffset(K);return Y.$x.$timezone=y,Y},a.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},a.tz.setDefault=function(j){c=j}}}))})(je)),je.exports}var At=Vt();const It=Ee(At),Lt=(e,t="en-US")=>new Intl.DateTimeFormat(t,{timeZone:e,timeZoneName:"long"}).formatToParts(new Date).find(r=>r.type==="timeZoneName")?.value||"",zt=e=>{const t=e[0]==="-"?-1:1,[r,n]=e.slice(1).split(":").map(Number);return t*(r*60+n)};l.extend(Ft);l.extend(It);const Rt=()=>Intl.supportedValuesOf("timeZone").map(t=>{const r=l().tz(t).format("Z");return{name:t,longName:Lt(t),currentTime:l().tz(t).format("h:mm A"),utcOffset:r,offsetMinutes:zt(r)}}).sort((t,r)=>t.offsetMinutes-r.offsetMinutes),Yt={"list-container":"_list-container_jrnm0_5"},Le={"form-container":"_form-container_1xxf4_1"},st=f.createContext(void 0),ot=()=>{const e=f.useContext(st);if(!e)throw new Error("usePopoverContext must be used within a PopoverProvider");return e},Kt=({children:e})=>{const[t,r]=f.useState(!1),n=()=>{r(!1)};return d.jsx(st.Provider,{value:{popoverOpened:t,setPopoverOpened:r,closePopover:n},children:e})},ze=()=>{const{theme:e}=Ie(),{closePopover:t}=ot();return d.jsx(w.Flex,{justify:"flex-end",children:d.jsxs(w.Flex,{columnGap:16,children:[d.jsx(w.Button,{size:"xs",variant:"subtle",color:e.primaryColor,onClick:t,children:"Cancel"}),d.jsx(w.Button,{type:"submit",size:"xs",color:e.primaryColor,children:"Apply"})]})})},ee="YYYY/MM/DD",ae="HH:mm:ss",Me=e=>e.timezone.name?l().tz(e.timezone.name).format(ae):l().format(ae),it=e=>e.timezone.name?l().tz(e.timezone.name).format(ee):l().format(ee),Ut=e=>l().add(e,"day").format(ee),Wt=e=>e&&l().tz(e).format("Z"),qt=e=>`${l(e.startDate).format(ee)} ${e.startTime} - ${l(e.endDate).format(ee)} ${e.endTime} (${Wt(e.timezone.name)})`,ne=(e,t,r,n)=>{const s=l(`${e} ${t}`).subtract(r,n);return{date:s.format(ee),time:s.format(ae)}},se=(e,t,r,n)=>{const s=l(`${e} ${t}`).add(r,n);return{date:s.format(ee),time:s.format(ae)}},he=(e,t,r)=>l.tz(`${e} ${t}`,`${ee} ${ae}`,r).utc().toISOString(),ye=(e,t)=>{const r=l.utc(e).tz(t);return{date:r.format(ee),time:r.format(ae)}},at=({tzRange:e})=>{const[t,r]=f.useState(e.timezone),[n,s]=f.useState([]),[i,a]=f.useState(""),c=f.useMemo(()=>Rt(),[]);f.useEffect(()=>{s(c)},[]),tt(()=>{if(i===""){s(c);return}s(c.filter(g=>g.name.toLowerCase().includes(i.toLocaleLowerCase())||g.longName.toLowerCase().includes(i.toLocaleLowerCase())||g.currentTime.toLowerCase().includes(i.toLocaleLowerCase())||g.utcOffset.toLowerCase().includes(i.toLocaleLowerCase())))},250,[i]);const u=g=>{r(g)},m=g=>{if(g.preventDefault(),!t?.name||!e.timezone.name||!e.startDate||!e.startTime||!e.endDate||!e.endTime)return;const j=he(e.startDate,e.startTime,e.timezone.name),P=he(e.endDate,e.endTime,e.timezone.name),O=ye(j,t.name),b=ye(P,t.name);e.onApply({startDate:O.date,startTime:O.time,endDate:b.date,endTime:b.time,timezone:t||{name:null,longName:null,utcOffset:null}})},D=g=>g?l().tz(g).format("h:mm A"):"";return d.jsxs("form",{className:Le["form-container"],onSubmit:m,children:[d.jsxs(w.Flex,{direction:"column",style:{height:"calc(100% - 40px)"},children:[d.jsx(w.Box,{style:{width:"95%"},mx:"auto",children:d.jsx(jt,{searchText:i,setSearchText:a})}),d.jsxs(w.Box,{style:{overflowY:"scroll"},children:[d.jsx(w.Text,{fw:600,px:12,children:"My Location"}),d.jsx(w.Flex,{direction:"column",children:d.jsx(Ue,{isBrowserTimezone:!0,name:e.timezone?.name,longName:e.timezone?.longName,currentTime:D(e.timezone?.name),utcOffset:e.timezone?.utcOffset,selectedTimezone:t})}),d.jsx(w.Text,{fw:600,px:12,children:"Locations"}),d.jsx(w.Flex,{direction:"column",className:Yt["list-container"],children:n.map((g,j)=>d.jsx(Ue,{name:g.name,longName:g.longName,currentTime:g.currentTime,utcOffset:g.utcOffset,selectedTimezone:t,handleTimezoneMouseClick:u},j))})]})]}),d.jsx(w.Box,{px:12,children:d.jsx(ze,{})})]})},ve={"sidebar-container":"_sidebar-container_e18ka_1","sidebar-row":"_sidebar-row_e18ka_5"},He=e=>[{label:"Today",searchKey:"today",startTime:l().tz(e).startOf("day").format(),endTime:l().tz(e).endOf("day").format()},{label:"Tomorrow",searchKey:"tomorrow",startTime:l().tz(e).add(1,"day").startOf("day").format(),endTime:l().tz(e).add(1,"day").endOf("day").format()},{label:"Yesterday",searchKey:"yesterday",startTime:l().tz(e).subtract(1,"day").startOf("day").format(),endTime:l().tz(e).subtract(1,"day").endOf("day").format(),lineBreak:!0},{label:"Last 15 seconds",searchKey:"-15s",startTime:l().tz(e).subtract(15,"second").format(),endTime:l().tz(e).format()},{label:"Last 30 seconds",searchKey:"-30s",startTime:l().tz(e).subtract(30,"second").format(),endTime:l().tz(e).format()},{label:"Next 15 seconds",searchKey:"+15s",startTime:l().tz(e).format(),endTime:l().tz(e).add(15,"second").format()},{label:"Next 30 seconds",searchKey:"+30s",startTime:l().tz(e).format(),endTime:l().tz(e).add(30,"second").format(),lineBreak:!0},{label:"Last 5 minutes",searchKey:"-5m",startTime:l().tz(e).subtract(5,"minute").format(),endTime:l().tz(e).format()},{label:"Last 10 minutes",searchKey:"-10m",startTime:l().tz(e).subtract(10,"minute").format(),endTime:l().tz(e).format()},{label:"Last 15 minutes",searchKey:"-15m",startTime:l().tz(e).subtract(15,"minute").format(),endTime:l().tz(e).format()},{label:"Last 30 minutes",searchKey:"-30m",startTime:l().tz(e).subtract(30,"minute").format(),endTime:l().tz(e).format()},{label:"Last 45 minutes",searchKey:"-45m",startTime:l().tz(e).subtract(45,"minute").format(),endTime:l().tz(e).format()},{label:"Next 5 minutes",searchKey:"+5m",startTime:l().tz(e).format(),endTime:l().tz(e).add(5,"minute").format()},{label:"Next 10 minutes",searchKey:"+10m",startTime:l().tz(e).format(),endTime:l().tz(e).add(10,"minute").format()},{label:"Next 15 minutes",searchKey:"+15m",startTime:l().tz(e).format(),endTime:l().tz(e).add(15,"minute").format()},{label:"Next 30 minutes",searchKey:"+30m",startTime:l().tz(e).format(),endTime:l().tz(e).add(30,"minute").format()},{label:"Next 45 minutes",searchKey:"+45m",startTime:l().tz(e).format(),endTime:l().tz(e).add(45,"minute").format(),lineBreak:!0},{label:"Last 1 hour",searchKey:"-1h",startTime:l().tz(e).subtract(1,"hour").format(),endTime:l().tz(e).format()},{label:"Last 3 hours",searchKey:"-3h",startTime:l().tz(e).subtract(3,"hour").format(),endTime:l().tz(e).format()},{label:"Last 6 hours",searchKey:"-6h",startTime:l().tz(e).subtract(6,"hour").format(),endTime:l().tz(e).format()},{label:"Last 12 hours",searchKey:"-12h",startTime:l().tz(e).subtract(12,"hour").format(),endTime:l().tz(e).format()},{label:"Next 1 hour",searchKey:"+1h",startTime:l().tz(e).format(),endTime:l().tz(e).add(1,"hour").format()},{label:"Next 3 hours",searchKey:"+3h",startTime:l().tz(e).format(),endTime:l().tz(e).add(3,"hour").format()},{label:"Next 6 hours",searchKey:"+6h",startTime:l().tz(e).format(),endTime:l().tz(e).add(6,"hour").format()},{label:"Next 12 hours",searchKey:"+12h",startTime:l().tz(e).format(),endTime:l().tz(e).add(12,"hour").format(),lineBreak:!0},{label:"Last 1 day",searchKey:"-1d",startTime:l().tz(e).subtract(1,"day").format(),endTime:l().tz(e).format()},{label:"Last 2 days",searchKey:"-2d",startTime:l().tz(e).subtract(2,"day").format(),endTime:l().tz(e).format()},{label:"Last 7 days",searchKey:"-7d",startTime:l().tz(e).subtract(7,"day").format(),endTime:l().tz(e).format()},{label:"Last 14 days",searchKey:"-14d",startTime:l().tz(e).subtract(14,"day").format(),endTime:l().tz(e).format()},{label:"Last 30 days",searchKey:"-30d",startTime:l().tz(e).subtract(30,"day").format(),endTime:l().tz(e).format()},{label:"Next 1 day",searchKey:"+1d",startTime:l().tz(e).format(),endTime:l().tz(e).add(1,"day").format()},{label:"Next 2 days",searchKey:"+2d",startTime:l().tz(e).format(),endTime:l().tz(e).add(2,"day").format()},{label:"Next 7 days",searchKey:"+7d",startTime:l().tz(e).format(),endTime:l().tz(e).add(7,"day").format()},{label:"Next 14 days",searchKey:"+14d",startTime:l().tz(e).format(),endTime:l().tz(e).add(14,"day").format()},{label:"Next 30 days",searchKey:"+30d",startTime:l().tz(e).format(),endTime:l().tz(e).add(30,"day").format()}],xe={"relative-time-panel-container":"_relative-time-panel-container_jsk5z_1","time-row":"_time-row_jsk5z_6","time-row-dark":"_time-row-dark_jsk5z_10","time-row-light":"_time-row-light_jsk5z_16"},Nt=({tzRange:e})=>{const[t,r]=f.useState([]),[n,s]=f.useState(""),{colorScheme:i}=Ie();f.useEffect(()=>{if(e.timezone.name!==null){const c=He(e.timezone.name);r(c)}},[e.timezone]),tt(()=>{if(n===""){r(He(e.timezone.name));return}const c=t.filter(u=>u.searchKey.includes(n));r(c)},250,[n]);const a=c=>{const[u,m]=c.startTime.split("T"),[D,g]=c.endTime.split("T");e.onApply({startDate:u,startTime:m.slice(0,8),endDate:D,endTime:g.slice(0,8),timezone:e.timezone})};return d.jsxs(d.Fragment,{children:[d.jsx(w.Box,{style:{width:"90%"},mx:"auto",children:d.jsx(w.Input,{placeholder:"Relative time (15m, 1h, 1d, 1w)",value:n,onChange:c=>s(c.currentTarget.value)})}),d.jsx(w.Flex,{direction:"column",className:xe["relative-time-panel-container"],children:t.map(c=>d.jsxs(w.Flex,{align:"center",justify:"space-between",className:nt(i==="dark"?xe["time-row-dark"]:xe["time-row-light"],xe["time-row"]),py:4,px:12,mb:c.lineBreak?8:0,onClick:()=>a(c),children:[d.jsx(w.Text,{size:"sm",children:c.label}),d.jsx(w.Text,{size:"xs",c:"#5f6368",children:c.searchKey})]},c.label))})]})},Ht=({setSelectedPanel:e,tzRange:t})=>d.jsxs(w.Box,{className:ve["sidebar-container"],flex:1,children:[d.jsx(Nt,{tzRange:t}),d.jsxs(w.Flex,{direction:"column",rowGap:16,py:8,style:{borderTop:"1px solid #ddd"},children:[d.jsxs(w.Flex,{className:ve["sidebar-row"],justify:"space-between",align:"center",px:12,onClick:()=>e(me.START_END_TIME),children:[d.jsxs(w.Flex,{align:"center",children:[d.jsx(Dt,{stroke:1.5}),d.jsx(w.Text,{size:"sm",children:"Start and end times"})]}),d.jsx(_e,{stroke:1.5})]}),d.jsxs(w.Flex,{className:ve["sidebar-row"],justify:"space-between",align:"center",px:12,onClick:()=>e(me.AROUND_TIME),children:[d.jsxs(w.Flex,{align:"center",children:[d.jsx(we,{stroke:1.5}),d.jsx(w.Text,{size:"sm",children:"Around a time"})]}),d.jsx(_e,{stroke:1.5})]}),d.jsxs(w.Flex,{className:ve["sidebar-row"],justify:"space-between",align:"center",px:12,onClick:()=>e(me.TIMEZONE),children:[d.jsxs(w.Flex,{align:"center",children:[d.jsx($t,{stroke:1.5}),d.jsx(w.Text,{size:"sm",children:"Time zone"})]}),d.jsx(_e,{stroke:1.5})]})]})]});var ct=(e=>(e.ThirtySeconds="± 30 seconds",e.OneMinute="± 1 minute",e.FifteenMinutes="± 15 minutes",e.ThirtyMinutes="± 30 minutes",e.OneHour="± 1 hour",e.OneDay="± 1 day",e))(ct||{});const Bt=["± 30 seconds","± 1 minute","± 15 minutes","± 30 minutes","± 1 hour","± 1 day"],Zt=(e,t,r)=>{switch(r){case"± 30 seconds":const n=ne(e,t,30,"second"),s=se(e,t,30,"second");return{startDate:n.date,startTime:n.time,endDate:s.date,endTime:s.time};case"± 1 minute":const i=ne(e,t,1,"minute"),a=se(e,t,1,"minute");return{startDate:i.date,startTime:i.time,endDate:a.date,endTime:a.time};case"± 15 minutes":const c=ne(e,t,15,"minute"),u=se(e,t,15,"minute");return{startDate:c.date,startTime:c.time,endDate:u.date,endTime:u.time};case"± 30 minutes":const m=ne(e,t,30,"minute"),D=se(e,t,30,"minute");return{startDate:m.date,startTime:m.time,endDate:D.date,endTime:D.time};case"± 1 hour":const g=ne(e,t,1,"hour"),j=se(e,t,1,"hour");return{startDate:g.date,startTime:g.time,endDate:j.date,endTime:j.time};case"± 1 day":const P=ne(e,t,1,"day"),O=se(e,t,1,"day");return{startDate:P.date,startTime:P.time,endDate:O.date,endTime:O.time};default:return{startDate:e,startTime:t,endDate:e,endTime:t}}};function Jt(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 Gt=typeof window<"u"?f.useLayoutEffect:f.useEffect;function J(e,t){Gt(()=>{if(e)return window.addEventListener(e,t),()=>window.removeEventListener(e,t)},[e])}function Xt(e,t){e&&Jt(e),J(`mantine-form:${e}:set-field-value`,r=>t.setFieldValue(r.detail.path,r.detail.value)),J(`mantine-form:${e}:set-values`,r=>t.setValues(r.detail)),J(`mantine-form:${e}:set-initial-values`,r=>t.setInitialValues(r.detail)),J(`mantine-form:${e}:set-errors`,r=>t.setErrors(r.detail)),J(`mantine-form:${e}:set-field-error`,r=>t.setFieldError(r.detail.path,r.detail.error)),J(`mantine-form:${e}:clear-field-error`,r=>t.clearFieldError(r.detail)),J(`mantine-form:${e}:clear-errors`,t.clearErrors),J(`mantine-form:${e}:reset`,t.reset),J(`mantine-form:${e}:validate`,t.validate),J(`mantine-form:${e}:validate-field`,r=>t.validateField(r.detail)),J(`mantine-form:${e}:reorder-list-item`,r=>t.reorderListItem(r.detail.path,r.detail.payload)),J(`mantine-form:${e}:remove-list-item`,r=>t.removeListItem(r.detail.path,r.detail.index)),J(`mantine-form:${e}:insert-list-item`,r=>t.insertListItem(r.detail.path,r.detail.item,r.detail.index)),J(`mantine-form:${e}:set-dirty`,r=>t.setDirty(r.detail)),J(`mantine-form:${e}:set-touched`,r=>t.setTouched(r.detail)),J(`mantine-form:${e}:reset-dirty`,r=>t.resetDirty(r.detail)),J(`mantine-form:${e}:reset-touched`,t.resetTouched)}function Qt(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 Fe(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 er(e){const[t,r]=f.useState(Fe(e)),n=f.useRef(t),s=f.useCallback(u=>{r(m=>{const D=Fe(typeof u=="function"?u(m):u);return n.current=D,D})},[]),i=f.useCallback(()=>s({}),[]),a=f.useCallback(u=>{n.current[u]!==void 0&&s(m=>{const D={...m};return delete D[u],D})},[t]),c=f.useCallback((u,m)=>{m==null||m===!1?a(u):n.current[u]!==m&&s(D=>({...D,[u]:m}))},[t]);return{errorsState:t,setErrors:s,clearErrors:i,setFieldError:c,clearFieldError:a}}function Pe(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 Be(e,t){const r=e.substring(t.length+1).split(".")[0];return parseInt(r,10)}function Ze(e,t,r,n){if(t===void 0)return r;const s=`${String(e)}`;let i=r;n===-1&&(i=Pe(`${s}.${t}`,i));const a={...i},c=new Set;return Object.entries(i).filter(([u])=>{if(!u.startsWith(`${s}.`))return!1;const m=Be(u,s);return Number.isNaN(m)?!1:m>=t}).forEach(([u,m])=>{const D=Be(u,s),g=u.replace(`${s}.${D}`,`${s}.${D+n}`);a[g]=m,c.add(g),c.has(u)||delete a[u]}),a}function tr(e,{from:t,to:r},n){const s=`${e}.${t}`,i=`${e}.${r}`,a={...n},c=new Set;return Object.keys(n).forEach(u=>{if(c.has(u))return;let m,D;if(u.startsWith(s)?(m=u,D=u.replace(s,i)):u.startsWith(i)&&(m=u.replace(i,s),D=u),m&&D){const g=a[m],j=a[D];j===void 0?delete a[m]:a[m]=j,g===void 0?delete a[D]:a[D]=g,c.add(m),c.add(D)}}),a}function Je(e,t,r){typeof r.value=="object"&&(r.value=ie(r.value)),!r.enumerable||r.get||r.set||!r.configurable||!r.writable||t==="__proto__"?Object.defineProperty(e,t,r):e[t]=r.value}function ie(e){if(typeof e!="object")return e;var t=0,r,n,s,i=Object.prototype.toString.call(e);if(i==="[object Object]"?s=Object.create(e.__proto__||null):i==="[object Array]"?s=Array(e.length):i==="[object Set]"?(s=new Set,e.forEach(function(a){s.add(ie(a))})):i==="[object Map]"?(s=new Map,e.forEach(function(a,c){s.set(ie(c),ie(a))})):i==="[object Date]"?s=new Date(+e):i==="[object RegExp]"?s=new RegExp(e.source,e.flags):i==="[object DataView]"?s=new e.constructor(ie(e.buffer)):i==="[object ArrayBuffer]"?s=e.slice(0):i.slice(-6)==="Array]"&&(s=new e.constructor(e)),s){for(n=Object.getOwnPropertySymbols(e);t<n.length;t++)Je(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]||Je(s,r,Object.getOwnPropertyDescriptor(e,r))}return s||e}function ut(e){return typeof e!="string"?[]:e.split(".")}function B(e,t){const r=ut(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 Te(e,t,r){const n=ut(e);if(n.length===0)return r;const s=ie(r);if(n.length===1)return s[n[0]]=t,s;let i=s[n[0]];for(let a=1;a<n.length-1;a+=1){if(i===void 0)return s;i=i[n[a]]}return i[n[n.length-1]]=t,s}function rr(e,{from:t,to:r},n){const s=B(e,n);if(!Array.isArray(s))return n;const i=[...s],a=s[t];return i.splice(t,1),i.splice(r,0,a),Te(e,i,n)}function nr(e,t,r,n){const s=B(e,n);if(!Array.isArray(s))return n;const i=[...s];return i.splice(typeof r=="number"?r:i.length,0,t),Te(e,i,n)}function sr(e,t,r){const n=B(e,r);return Array.isArray(n)?Te(e,n.filter((s,i)=>i!==t),r):r}function or(e,t,r,n){const s=B(e,n);if(!Array.isArray(s)||s.length<=r)return n;const i=[...s];return i[r]=t,Te(e,i,n)}function ir({$values:e,$errors:t,$status:r}){const n=f.useCallback((c,u)=>{r.clearFieldDirty(c),t.setErrors(m=>tr(c,u,m)),e.setValues({values:rr(c,u,e.refValues.current),updateState:!0})},[]),s=f.useCallback((c,u)=>{r.clearFieldDirty(c),t.setErrors(m=>Ze(c,u,m,-1)),e.setValues({values:sr(c,u,e.refValues.current),updateState:!0})},[]),i=f.useCallback((c,u,m)=>{r.clearFieldDirty(c),t.setErrors(D=>Ze(c,m,D,1)),e.setValues({values:nr(c,u,m,e.refValues.current),updateState:!0})},[]),a=f.useCallback((c,u,m)=>{r.clearFieldDirty(c),e.setValues({values:or(c,m,u,e.refValues.current),updateState:!0})},[]);return{reorderListItem:n,removeListItem:s,insertListItem:i,replaceListItem:a}}var Oe,Ge;function ar(){return Ge||(Ge=1,Oe=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,i;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(i=Object.keys(t),n=i.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[s]))return!1;for(s=n;s--!==0;){var a=i[s];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}),Oe}var cr=ar();const ge=Ee(cr);function fe(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 ur({initialDirty:e,initialTouched:t,mode:r,$values:n}){const[s,i]=f.useState(t),[a,c]=f.useState(e),u=f.useRef(t),m=f.useRef(e),D=f.useCallback($=>{const V=typeof $=="function"?$(u.current):$;u.current=V,r==="controlled"&&i(V)},[]),g=f.useCallback(($,V=!1)=>{const L=typeof $=="function"?$(m.current):$;m.current=L,(r==="controlled"||V)&&c(L)},[]),j=f.useCallback(()=>D({}),[]),P=f.useCallback($=>{const V=$?{...n.refValues.current,...$}:n.refValues.current;n.setValuesSnapshot(V),g({})},[]),O=f.useCallback(($,V)=>{D(L=>fe(L,$)===V?L:{...L,[$]:V})},[]),b=f.useCallback(($,V,L)=>{g(N=>fe(N,$)===V?N:{...N,[$]:V},L)},[]),y=f.useCallback(($,V)=>{const L=fe(m.current,$),N=!ge(B($,n.getValuesSnapshot()),V),z=Pe($,m.current);z[$]=N,g(z,L!==N)},[]),S=f.useCallback($=>fe(u.current,$),[]),C=f.useCallback($=>g(V=>{if(typeof $!="string")return V;const L=Pe($,V);return delete L[$],ge(L,V)?V:L}),[]),R=f.useCallback($=>{if($){const L=B($,m.current);if(typeof L=="boolean")return L;const N=B($,n.refValues.current),z=B($,n.valuesSnapshot.current);return!ge(N,z)}return Object.keys(m.current).length>0?fe(m.current):!ge(n.refValues.current,n.valuesSnapshot.current)},[]),K=f.useCallback(()=>m.current,[]),Y=f.useCallback(()=>u.current,[]);return{touchedState:s,dirtyState:a,touchedRef:u,dirtyRef:m,setTouched:D,setDirty:g,resetDirty:P,resetTouched:j,isTouched:S,setFieldTouched:O,setFieldDirty:b,setTouchedState:i,setDirtyState:c,clearFieldDirty:C,isDirty:R,getDirty:K,getTouched:Y,setCalculatedFieldDirty:y}}function lr({initialValues:e,onValuesChange:t,mode:r}){const n=f.useRef(!1),[s,i]=f.useState(e||{}),a=f.useRef(s),c=f.useRef(s),u=f.useCallback(({values:y,subscribers:S,updateState:C=!0,mergeWithPreviousValues:R=!0})=>{const K=a.current,Y=y instanceof Function?y(a.current):y,$=R?{...K,...Y}:Y;a.current=$,C&&(i($),r==="uncontrolled"&&(a.current=$)),t?.($,K),S?.filter(Boolean).forEach(V=>V({updatedValues:$,previousValues:K}))},[t]),m=f.useCallback(y=>{const S=B(y.path,a.current),C=y.value instanceof Function?y.value(S):y.value;if(S!==C){const R=a.current,K=Te(y.path,C,a.current);u({values:K,updateState:y.updateState}),y.subscribers?.filter(Boolean).forEach(Y=>Y({path:y.path,updatedValues:K,previousValues:R}))}},[u]),D=f.useCallback(y=>{c.current=y},[]),g=f.useCallback((y,S)=>{n.current||(n.current=!0,u({values:y,updateState:r==="controlled"}),D(y),S())},[u]),j=f.useCallback(()=>{u({values:c.current,updateState:!0,mergeWithPreviousValues:!1})},[u]),P=f.useCallback(()=>a.current,[]),O=f.useCallback(()=>c.current,[]),b=f.useCallback((y,S)=>{const C=B(y,c.current);typeof C>"u"||m({path:y,value:C,updateState:r==="controlled",subscribers:S})},[m,r]);return{initialized:n,stateValues:s,refValues:a,valuesSnapshot:c,setValues:u,setFieldValue:m,resetValues:j,setValuesSnapshot:D,initialize:g,getValues:P,getValuesSnapshot:O,resetField:b}}function dr({$status:e,cascadeUpdates:t}){const r=f.useRef({}),n=f.useCallback((i,a)=>{f.useEffect(()=>(r.current[i]=r.current[i]||[],r.current[i].push(a),()=>{r.current[i]=r.current[i].filter(c=>c!==a)}),[a])},[]),s=f.useCallback(i=>{const a=r.current[i]?.map(c=>u=>c({previousValue:B(i,u.previousValues),value:B(i,u.updatedValues),touched:e.isTouched(i),dirty:e.isDirty(i)}))??[];if(t)for(const c in r.current)(c.startsWith(`${i}.`)||i.startsWith(`${c}.`))&&a.push(...r.current[c].map(u=>m=>u({previousValue:B(c,m.previousValues),value:B(c,m.updatedValues),touched:e.isTouched(c),dirty:e.isDirty(c)})));return a},[]);return{subscribers:r,watch:n,getFieldSubscribers:s}}function Xe(e,t){return e?`${e}-${t.toString()}`:t.toString()}const Se=Symbol("root-rule");function Qe(e){const t=Fe(e);return{hasErrors:Object.keys(t).length>0,errors:t}}function Ve(e,t,r="",n={}){return typeof e!="object"||e===null?n:Object.keys(e).reduce((s,i)=>{const a=e[i],c=`${r===""?"":`${r}.`}${i}`,u=B(c,t);let m=!1;return typeof a=="function"&&(s[c]=a(u,t,c)),typeof a=="object"&&Array.isArray(u)&&(m=!0,u.forEach((D,g)=>Ve(a,t,`${c}.${g}`,s)),Se in a&&(s[c]=a[Se](u,t,c))),typeof a=="object"&&typeof u=="object"&&u!==null&&(m||Ve(a,t,c,s),Se in a&&(s[c]=a[Se](u,t,c))),s},n)}function Ae(e,t){return Qe(typeof e=="function"?e(t):Ve(e,t))}function $e(e,t,r){if(typeof e!="string")return{hasError:!1,error:null};const n=Ae(t,r),s=Object.keys(n.errors).find(i=>e.split(".").every((a,c)=>a===i.split(".")[c]));return{hasError:!!s,error:s?n.errors[s]:null}}const fr="__MANTINE_FORM_INDEX__";function et(e,t){return t?typeof t=="boolean"?t:Array.isArray(t)?t.includes(e.replace(/[.][0-9]+/g,`.${fr}`)):!1:!1}function lt({name:e,mode:t="controlled",initialValues:r,initialErrors:n={},initialDirty:s={},initialTouched:i={},clearInputErrorOnChange:a=!0,validateInputOnChange:c=!1,validateInputOnBlur:u=!1,onValuesChange:m,transformValues:D=(y=>y),enhanceGetInputProps:g,validate:j,onSubmitPreventDefault:P="always",touchTrigger:O="change",cascadeUpdates:b=!1}={}){const y=er(n),S=lr({initialValues:r,onValuesChange:m,mode:t}),C=ur({initialDirty:s,initialTouched:i,$values:S,mode:t}),R=ir({$values:S,$errors:y,$status:C}),K=dr({$status:C,cascadeUpdates:b}),[Y,$]=f.useState(0),[V,L]=f.useState({}),[N,z]=f.useState(!1),A=f.useCallback(()=>{S.resetValues(),y.clearErrors(),C.resetDirty(),C.resetTouched(),t==="uncontrolled"&&$(p=>p+1)},[]),Q=f.useCallback(p=>{a&&y.clearErrors(),t==="uncontrolled"&&$(_=>_+1),Object.keys(K.subscribers.current).forEach(_=>{const W=B(_,S.refValues.current),U=B(_,p);W!==U&&K.getFieldSubscribers(_).forEach(Z=>Z({previousValues:p,updatedValues:S.refValues.current}))})},[a]),re=f.useCallback(p=>{const _=S.refValues.current;S.initialize(p,()=>t==="uncontrolled"&&$(W=>W+1)),Q(_)},[Q]),E=f.useCallback((p,_,W)=>{const U=et(p,c),Z=_ instanceof Function?_(B(p,S.refValues.current)):_;C.setCalculatedFieldDirty(p,Z),O==="change"&&C.setFieldTouched(p,!0),!U&&a&&y.clearFieldError(p),S.setFieldValue({path:p,value:_,updateState:t==="controlled",subscribers:[...K.getFieldSubscribers(p),U?te=>{const G=$e(p,j,te.updatedValues);G.hasError?y.setFieldError(p,G.error):y.clearFieldError(p)}:null,W?.forceUpdate!==!1&&t!=="controlled"?()=>L(te=>({...te,[p]:(te[p]||0)+1})):null]})},[m,j]),v=f.useCallback(p=>{const _=S.refValues.current;S.setValues({values:p,updateState:t==="controlled"}),Q(_)},[m,Q]),h=f.useCallback(()=>{const p=Ae(j,S.refValues.current);return y.setErrors(p.errors),p},[j]),k=f.useCallback(p=>{const _=$e(p,j,S.refValues.current);return _.hasError?y.setFieldError(p,_.error):y.clearFieldError(p),_},[j]),T=(p,{type:_="input",withError:W=!0,withFocus:U=!0,...Z}={})=>{const G={onChange:Qt(pe=>E(p,pe,{forceUpdate:!1})),"data-path":Xe(e,p)};return W&&(G.error=y.errorsState[p]),_==="checkbox"?G[t==="controlled"?"checked":"defaultChecked"]=B(p,S.refValues.current):G[t==="controlled"?"value":"defaultValue"]=B(p,S.refValues.current),U&&(G.onFocus=()=>C.setFieldTouched(p,!0),G.onBlur=()=>{if(et(p,u)){const pe=$e(p,j,S.refValues.current);pe.hasError?y.setFieldError(p,pe.error):y.clearFieldError(p)}}),Object.assign(G,g?.({inputProps:G,field:p,options:{type:_,withError:W,withFocus:U,...Z},form:X}))},F=(p,_)=>W=>{P==="always"&&W?.preventDefault();const U=h();if(U.hasErrors)P==="validation-failed"&&W?.preventDefault(),_?.(U.errors,S.refValues.current,W);else{const Z=p?.(D(S.refValues.current),W);Z instanceof Promise&&(z(!0),Z.finally(()=>z(!1)))}},o=p=>D(p||S.refValues.current),x=f.useCallback(p=>{p.preventDefault(),A()},[]),M=f.useCallback(p=>p?!$e(p,j,S.refValues.current).hasError:!Ae(j,S.refValues.current).hasErrors,[j]),I=p=>`${Y}-${String(p)}-${V[String(p)]||0}`,q=f.useCallback(p=>document.querySelector(`[data-path="${Xe(e,p)}"]`),[]),H=f.useCallback(p=>{S.resetField(p,[t!=="controlled"?()=>L(_=>({..._,[p]:(_[p]||0)+1})):null])},[S.resetField,t,L]),X={watch:K.watch,initialized:S.initialized.current,values:t==="uncontrolled"?S.refValues.current:S.stateValues,getValues:S.getValues,getInitialValues:S.getValuesSnapshot,setInitialValues:S.setValuesSnapshot,resetField:H,initialize:re,setValues:v,setFieldValue:E,submitting:N,setSubmitting:z,errors:y.errorsState,setErrors:y.setErrors,setFieldError:y.setFieldError,clearFieldError:y.clearFieldError,clearErrors:y.clearErrors,resetDirty:C.resetDirty,setTouched:C.setTouched,setDirty:C.setDirty,isTouched:C.isTouched,resetTouched:C.resetTouched,isDirty:C.isDirty,getTouched:C.getTouched,getDirty:C.getDirty,reorderListItem:R.reorderListItem,insertListItem:R.insertListItem,removeListItem:R.removeListItem,replaceListItem:R.replaceListItem,reset:A,validate:h,validateField:k,getInputProps:T,onSubmit:F,onReset:x,isValid:M,getTransformedValues:o,key:I,getInputNode:q};return Xt(e,X),X}const mr=({tzRange:e})=>{const t=lt({initialValues:{date:e.startDate??it(e),time:e.startTime??Me(e),duration:ct.OneDay},validate:{date:n=>n?null:"Date is required",time:n=>n?null:"Time is required",duration:n=>n?null:"Duration is required"}}),r=n=>{if(!e.timezone.name)return;const s=he(n.date,n.time,e.timezone.name),i=ye(s,e.timezone.name),{startDate:a,startTime:c,endDate:u,endTime:m}=Zt(i.date,i.time,n.duration);e.onApply({startDate:a,startTime:c,endDate:u,endTime:m,timezone:e.timezone})};return d.jsx(w.Flex,{direction:"column",flex:2,justify:"space-between",style:{height:"100%"},px:12,children:d.jsxs("form",{className:Le["form-container"],onSubmit:t.onSubmit(r),children:[d.jsxs(w.Box,{children:[d.jsx(w.Text,{fw:600,children:"Around a time"}),d.jsxs(w.Flex,{direction:"column",gap:8,mt:12,children:[d.jsx(oe.DatePickerInput,{label:"Pick date",placeholder:"Pick date",...t.getInputProps("date"),popoverProps:{withinPortal:!1},valueFormat:ee,leftSection:d.jsx(Ce,{stroke:1.5})},t.key("date")),d.jsx(oe.TimeInput,{label:"Pick time",placeholder:"Pick time",withSeconds:!0,...t.getInputProps("time"),leftSection:d.jsx(we,{stroke:1.5}),rightSection:d.jsx(w.Text,{style:{fontSize:12,fontStyle:"italic",textAlign:"right"},children:e.timezone?.longName}),rightSectionWidth:180,rightSectionProps:{style:{paddingRight:1}}},t.key("time")),d.jsx(w.Select,{label:"Duration",placeholder:"Pick value",data:Bt,...t.getInputProps("duration"),comboboxProps:{withinPortal:!1}},t.key("duration"))]})]}),d.jsx(ze,{})]})})},hr=({tzRange:e})=>{const t=lt({mode:"uncontrolled",initialValues:{startDate:e.startDate??it(e),startTime:e.startTime??Me(e),endDate:e.endDate??Ut(30),endTime:e.endTime??Me(e)},validate:{startDate:n=>n?null:"Start date is required",startTime:n=>n?null:"Start time is required",endDate:(n,s)=>{if(!n)return"End date is required";const i=l(`${s.startDate} ${s.startTime}`),a=l(`${n} ${s.endTime}`);return a.isAfter(i)||a.isSame(i)?null:"End time must be after start time"},endTime:(n,s)=>{if(!n)return"End time is required";const i=l(`${s.startDate} ${s.startTime}`),a=l(`${s.endDate} ${n}`);return a.isAfter(i)||a.isSame(i)?null:"End time must be after start time"}}}),r=n=>{if(!e.timezone.name)return;const s=he(n.startDate,n.startTime,e.timezone.name),i=he(n.endDate,n.endTime,e.timezone.name),a=ye(s,e.timezone.name),c=ye(i,e.timezone.name);e.onApply({startDate:a.date,startTime:a.time,endDate:c.date,endTime:c.time,timezone:e.timezone})};return d.jsx(w.Flex,{direction:"column",flex:2,style:{height:"100%"},px:12,children:d.jsxs("form",{className:Le["form-container"],onSubmit:t.onSubmit(r),children:[d.jsxs(w.Box,{children:[d.jsx(w.Text,{fw:600,children:"Start and end times"}),d.jsxs(w.Flex,{direction:"column",gap:8,mt:12,children:[d.jsx(oe.DatePickerInput,{label:"Start time",...t.getInputProps("startDate"),popoverProps:{withinPortal:!1},valueFormat:ee,leftSection:d.jsx(Ce,{stroke:1.5})},t.key("startDate")),d.jsx(oe.TimeInput,{withSeconds:!0,...t.getInputProps("startTime"),leftSection:d.jsx(we,{stroke:1.5}),rightSection:d.jsx(w.Text,{style:{fontSize:12,fontStyle:"italic"},children:e.timezone?.longName}),rightSectionWidth:180,rightSectionProps:{style:{paddingRight:1}}},t.key("startTime")),d.jsx(oe.DatePickerInput,{label:"End time",...t.getInputProps("endDate"),popoverProps:{withinPortal:!1},valueFormat:ee,leftSection:d.jsx(Ce,{stroke:1.5})},t.key("endDate")),d.jsx(oe.TimeInput,{withSeconds:!0,...t.getInputProps("endTime"),leftSection:d.jsx(we,{stroke:1.5}),rightSection:d.jsx(w.Text,{style:{fontSize:12,fontStyle:"italic"},children:e.timezone?.longName}),rightSectionWidth:180,rightSectionProps:{style:{paddingRight:1}}},t.key("endTime"))]})]}),d.jsx(ze,{})]})})};var me=(e=>(e.START_END_TIME="Start and end times",e.AROUND_TIME="Around a time",e.TIMEZONE="Time zone",e))(me||{});const yr=e=>{const[t,r]=f.useState("Start and end times"),{popoverOpened:n,setPopoverOpened:s}=ot(),i=()=>{switch(t){case"Start and end times":return d.jsx(hr,{tzRange:e});case"Around a time":return d.jsx(mr,{tzRange:e});case"Time zone":return d.jsx(at,{tzRange:e});default:return null}},a=()=>{s(u=>!u)},c=f.useMemo(()=>qt(e),[e.startDate,e.startTime,e.endDate,e.endTime,e.timezone]);return d.jsxs(w.Popover,{position:"bottom",shadow:"md",opened:n,onChange:s,children:[d.jsx(w.Popover.Target,{children:d.jsx(w.Button,{onClick:a,style:e.buttonStyle||{},children:c})}),d.jsx(w.Popover.Dropdown,{style:{width:700,height:400,padding:0},py:8,children:d.jsxs(w.Flex,{style:{height:"100%"},children:[d.jsx(Ht,{tzRange:e,setSelectedPanel:r}),i()]})})]})},Tr=e=>d.jsx(Kt,{children:d.jsx(yr,{...e})});exports.Panel=me;exports.TimezonePanel=at;exports.TimezoneRangePicker=Tr;
62
+ */const Ot=[["path",{d:"M16 2c.183 0 .355 .05 .502 .135l.033 .02c.28 .177 .465 .49 .465 .845v1h1a3 3 0 0 1 2.995 2.824l.005 .176v12a3 3 0 0 1 -2.824 2.995l-.176 .005h-12a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-12a3 3 0 0 1 2.824 -2.995l.176 -.005h1v-1a1 1 0 0 1 .514 -.874l.093 -.046l.066 -.025l.1 -.029l.107 -.019l.12 -.007q .083 0 .161 .013l.122 .029l.04 .012l.06 .023c.328 .135 .568 .44 .61 .806l.007 .117v1h6v-1a1 1 0 0 1 1 -1m3 7h-14v9.625c0 .705 .386 1.286 .883 1.366l.117 .009h12c.513 0 .936 -.53 .993 -1.215l.007 -.16z",key:"svg-0"}],["path",{d:"M9.015 13a1 1 0 0 1 -1 1a1.001 1.001 0 1 1 -.005 -2c.557 0 1.005 .448 1.005 1",key:"svg-1"}],["path",{d:"M13.015 13a1 1 0 0 1 -1 1a1.001 1.001 0 1 1 -.005 -2c.557 0 1.005 .448 1.005 1",key:"svg-2"}],["path",{d:"M17.02 13a1 1 0 0 1 -1 1a1.001 1.001 0 1 1 -.005 -2c.557 0 1.005 .448 1.005 1",key:"svg-3"}],["path",{d:"M12.02 15a1 1 0 0 1 0 2a1.001 1.001 0 1 1 -.005 -2z",key:"svg-4"}],["path",{d:"M9.015 16a1 1 0 0 1 -1 1a1.001 1.001 0 1 1 -.005 -2c.557 0 1.005 .448 1.005 1",key:"svg-5"}]],Mt=le("filled","calendar-week-filled","CalendarWeekFilled",Ot),Ct=({searchText:e,setSearchText:t})=>l.jsx(D.Input,{placeholder:"Timezone search (Asia, Tokyo, +09:00, etc)",leftSection:l.jsx(jt,{stroke:2}),value:e,onChange:r=>t(r.currentTarget.value)});var _e={exports:{}},Ft=_e.exports,Ze;function Pt(){return Ze||(Ze=1,(function(e,t){(function(r,n){e.exports=n()})(Ft,(function(){var r=1e3,n=6e4,s=36e5,c="millisecond",i="second",u="minute",o="hour",d="day",v="week",_="month",g="quarter",j="year",O="date",x="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,$=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,C={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(E){var b=["th","st","nd","rd"],y=E%100;return"["+E+(b[(y-20)%10]||b[y]||b[0])+"]"}},Y=function(E,b,y){var k=String(E);return!k||k.length>=b?E:""+Array(b+1-k.length).join(y)+E},U={s:Y,z:function(E){var b=-E.utcOffset(),y=Math.abs(b),k=Math.floor(y/60),p=y%60;return(b<=0?"+":"-")+Y(k,2,"0")+":"+Y(p,2,"0")},m:function E(b,y){if(b.date()<y.date())return-E(y,b);var k=12*(y.year()-b.year())+(y.month()-b.month()),p=b.clone().add(k,_),P=y-p<0,a=b.clone().add(k+(P?-1:1),_);return+(-(k+(y-p)/(P?p-a:a-p))||0)},a:function(E){return E<0?Math.ceil(E)||0:Math.floor(E)},p:function(E){return{M:_,y:j,w:v,d,D:O,h:o,m:u,s:i,ms:c,Q:g}[E]||String(E||"").toLowerCase().replace(/s$/,"")},u:function(E){return E===void 0}},N="en",w={};w[N]=C;var A="$isDayjsObject",L=function(E){return E instanceof X||!(!E||!E[A])},q=function E(b,y,k){var p;if(!b)return N;if(typeof b=="string"){var P=b.toLowerCase();w[P]&&(p=P),y&&(w[P]=y,p=P);var a=b.split("-");if(!p&&a.length>1)return E(a[0])}else{var S=b.name;w[S]=b,p=S}return!k&&p&&(N=p),p||!k&&N},z=function(E,b){if(L(E))return E.clone();var y=typeof b=="object"?b:{};return y.date=E,y.args=arguments,new X(y)},V=U;V.l=q,V.i=L,V.w=function(E,b){return z(E,{locale:b.$L,utc:b.$u,x:b.$x,$offset:b.$offset})};var X=(function(){function E(y){this.$L=q(y.locale,null,!0),this.parse(y),this.$x=this.$x||y.x||{},this[A]=!0}var b=E.prototype;return b.parse=function(y){this.$d=(function(k){var p=k.date,P=k.utc;if(p===null)return new Date(NaN);if(V.u(p))return new Date;if(p instanceof Date)return new Date(p);if(typeof p=="string"&&!/Z$/i.test(p)){var a=p.match(h);if(a){var S=a[2]-1||0,F=(a[7]||"0").substring(0,3);return P?new Date(Date.UTC(a[1],S,a[3]||1,a[4]||0,a[5]||0,a[6]||0,F)):new Date(a[1],S,a[3]||1,a[4]||0,a[5]||0,a[6]||0,F)}}return new Date(p)})(y),this.init()},b.init=function(){var y=this.$d;this.$y=y.getFullYear(),this.$M=y.getMonth(),this.$D=y.getDate(),this.$W=y.getDay(),this.$H=y.getHours(),this.$m=y.getMinutes(),this.$s=y.getSeconds(),this.$ms=y.getMilliseconds()},b.$utils=function(){return V},b.isValid=function(){return this.$d.toString()!==x},b.isSame=function(y,k){var p=z(y);return this.startOf(k)<=p&&p<=this.endOf(k)},b.isAfter=function(y,k){return z(y)<this.startOf(k)},b.isBefore=function(y,k){return this.endOf(k)<z(y)},b.$g=function(y,k,p){return V.u(y)?this[k]:this.set(p,y)},b.unix=function(){return Math.floor(this.valueOf()/1e3)},b.valueOf=function(){return this.$d.getTime()},b.startOf=function(y,k){var p=this,P=!!V.u(k)||k,a=V.p(y),S=function(R,K){var Z=V.w(p.$u?Date.UTC(p.$y,K,R):new Date(p.$y,K,R),p);return P?Z:Z.endOf(d)},F=function(R,K){return V.w(p.toDate()[R].apply(p.toDate("s"),(P?[0,0,0,0]:[23,59,59,999]).slice(K)),p)},I=this.$W,W=this.$M,H=this.$D,G="set"+(this.$u?"UTC":"");switch(a){case j:return P?S(1,0):S(31,11);case _:return P?S(1,W):S(0,W+1);case v:var T=this.$locale().weekStart||0,M=(I<T?I+7:I)-T;return S(P?H-M:H+(6-M),W);case d:case O:return F(G+"Hours",0);case o:return F(G+"Minutes",1);case u:return F(G+"Seconds",2);case i:return F(G+"Milliseconds",3);default:return this.clone()}},b.endOf=function(y){return this.startOf(y,!1)},b.$set=function(y,k){var p,P=V.p(y),a="set"+(this.$u?"UTC":""),S=(p={},p[d]=a+"Date",p[O]=a+"Date",p[_]=a+"Month",p[j]=a+"FullYear",p[o]=a+"Hours",p[u]=a+"Minutes",p[i]=a+"Seconds",p[c]=a+"Milliseconds",p)[P],F=P===d?this.$D+(k-this.$W):k;if(P===_||P===j){var I=this.clone().set(O,1);I.$d[S](F),I.init(),this.$d=I.set(O,Math.min(this.$D,I.daysInMonth())).$d}else S&&this.$d[S](F);return this.init(),this},b.set=function(y,k){return this.clone().$set(y,k)},b.get=function(y){return this[V.p(y)]()},b.add=function(y,k){var p,P=this;y=Number(y);var a=V.p(k),S=function(W){var H=z(P);return V.w(H.date(H.date()+Math.round(W*y)),P)};if(a===_)return this.set(_,this.$M+y);if(a===j)return this.set(j,this.$y+y);if(a===d)return S(1);if(a===v)return S(7);var F=(p={},p[u]=n,p[o]=s,p[i]=r,p)[a]||1,I=this.$d.getTime()+y*F;return V.w(I,this)},b.subtract=function(y,k){return this.add(-1*y,k)},b.format=function(y){var k=this,p=this.$locale();if(!this.isValid())return p.invalidDate||x;var P=y||"YYYY-MM-DDTHH:mm:ssZ",a=V.z(this),S=this.$H,F=this.$m,I=this.$M,W=p.weekdays,H=p.months,G=p.meridiem,T=function(K,Z,te,Q){return K&&(K[Z]||K(k,P))||te[Z].slice(0,Q)},M=function(K){return V.s(S%12||12,K,"0")},R=G||function(K,Z,te){var Q=K<12?"AM":"PM";return te?Q.toLowerCase():Q};return P.replace($,(function(K,Z){return Z||(function(te){switch(te){case"YY":return String(k.$y).slice(-2);case"YYYY":return V.s(k.$y,4,"0");case"M":return I+1;case"MM":return V.s(I+1,2,"0");case"MMM":return T(p.monthsShort,I,H,3);case"MMMM":return T(H,I);case"D":return k.$D;case"DD":return V.s(k.$D,2,"0");case"d":return String(k.$W);case"dd":return T(p.weekdaysMin,k.$W,W,2);case"ddd":return T(p.weekdaysShort,k.$W,W,3);case"dddd":return W[k.$W];case"H":return String(S);case"HH":return V.s(S,2,"0");case"h":return M(1);case"hh":return M(2);case"a":return R(S,F,!0);case"A":return R(S,F,!1);case"m":return String(F);case"mm":return V.s(F,2,"0");case"s":return String(k.$s);case"ss":return V.s(k.$s,2,"0");case"SSS":return V.s(k.$ms,3,"0");case"Z":return a}return null})(K)||a.replace(":","")}))},b.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},b.diff=function(y,k,p){var P,a=this,S=V.p(k),F=z(y),I=(F.utcOffset()-this.utcOffset())*n,W=this-F,H=function(){return V.m(a,F)};switch(S){case j:P=H()/12;break;case _:P=H();break;case g:P=H()/3;break;case v:P=(W-I)/6048e5;break;case d:P=(W-I)/864e5;break;case o:P=W/s;break;case u:P=W/n;break;case i:P=W/r;break;default:P=W}return p?P:V.a(P)},b.daysInMonth=function(){return this.endOf(_).$D},b.$locale=function(){return w[this.$L]},b.locale=function(y,k){if(!y)return this.$L;var p=this.clone(),P=q(y,k,!0);return P&&(p.$L=P),p},b.clone=function(){return V.w(this.$d,this)},b.toDate=function(){return new Date(this.valueOf())},b.toJSON=function(){return this.isValid()?this.toISOString():null},b.toISOString=function(){return this.$d.toISOString()},b.toString=function(){return this.$d.toUTCString()},E})(),se=X.prototype;return z.prototype=se,[["$ms",c],["$s",i],["$m",u],["$H",o],["$W",d],["$M",_],["$y",j],["$D",O]].forEach((function(E){se[E[1]]=function(b){return this.$g(b,E[0],E[1])}})),z.extend=function(E,b){return E.$i||(E(b,X,z),E.$i=!0),z},z.locale=q,z.isDayjs=L,z.unix=function(E){return z(1e3*E)},z.en=w[N],z.Ls=w,z.p={},z}))})(_e)),_e.exports}var At=Pt();const f=Ce(At);var Ee={exports:{}},Vt=Ee.exports,Je;function It(){return Je||(Je=1,(function(e,t){(function(r,n){e.exports=n()})(Vt,(function(){var r="minute",n=/[+-]\d\d(?::?\d\d)?/g,s=/([+-]|\d\d)/g;return function(c,i,u){var o=i.prototype;u.utc=function(x){var h={date:x,utc:!0,args:arguments};return new i(h)},o.utc=function(x){var h=u(this.toDate(),{locale:this.$L,utc:!0});return x?h.add(this.utcOffset(),r):h},o.local=function(){return u(this.toDate(),{locale:this.$L,utc:!1})};var d=o.parse;o.parse=function(x){x.utc&&(this.$u=!0),this.$utils().u(x.$offset)||(this.$offset=x.$offset),d.call(this,x)};var v=o.init;o.init=function(){if(this.$u){var x=this.$d;this.$y=x.getUTCFullYear(),this.$M=x.getUTCMonth(),this.$D=x.getUTCDate(),this.$W=x.getUTCDay(),this.$H=x.getUTCHours(),this.$m=x.getUTCMinutes(),this.$s=x.getUTCSeconds(),this.$ms=x.getUTCMilliseconds()}else v.call(this)};var _=o.utcOffset;o.utcOffset=function(x,h){var $=this.$utils().u;if($(x))return this.$u?0:$(this.$offset)?_.call(this):this.$offset;if(typeof x=="string"&&(x=(function(N){N===void 0&&(N="");var w=N.match(n);if(!w)return null;var A=(""+w[0]).match(s)||["-",0,0],L=A[0],q=60*+A[1]+ +A[2];return q===0?0:L==="+"?q:-q})(x),x===null))return this;var C=Math.abs(x)<=16?60*x:x;if(C===0)return this.utc(h);var Y=this.clone();if(h)return Y.$offset=C,Y.$u=!1,Y;var U=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(Y=this.local().add(C+U,r)).$offset=C,Y.$x.$localOffset=U,Y};var g=o.format;o.format=function(x){var h=x||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return g.call(this,h)},o.valueOf=function(){var x=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*x},o.isUTC=function(){return!!this.$u},o.toISOString=function(){return this.toDate().toISOString()},o.toString=function(){return this.toDate().toUTCString()};var j=o.toDate;o.toDate=function(x){return x==="s"&&this.$offset?u(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():j.call(this)};var O=o.diff;o.diff=function(x,h,$){if(x&&this.$u===x.$u)return O.call(this,x,h,$);var C=this.local(),Y=u(x).local();return O.call(C,Y,h,$)}}}))})(Ee)),Ee.exports}var Lt=It();const zt=Ce(Lt);var Oe={exports:{}},Yt=Oe.exports,Qe;function Nt(){return Qe||(Qe=1,(function(e,t){(function(r,n){e.exports=n()})(Yt,(function(){var r={year:0,month:1,day:2,hour:3,minute:4,second:5},n={};return function(s,c,i){var u,o=function(g,j,O){O===void 0&&(O={});var x=new Date(g),h=(function($,C){C===void 0&&(C={});var Y=C.timeZoneName||"short",U=$+"|"+Y,N=n[U];return N||(N=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:$,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:Y}),n[U]=N),N})(j,O);return h.formatToParts(x)},d=function(g,j){for(var O=o(g,j),x=[],h=0;h<O.length;h+=1){var $=O[h],C=$.type,Y=$.value,U=r[C];U>=0&&(x[U]=parseInt(Y,10))}var N=x[3],w=N===24?0:N,A=x[0]+"-"+x[1]+"-"+x[2]+" "+w+":"+x[4]+":"+x[5]+":000",L=+g;return(i.utc(A).valueOf()-(L-=L%1e3))/6e4},v=c.prototype;v.tz=function(g,j){g===void 0&&(g=u);var O,x=this.utcOffset(),h=this.toDate(),$=h.toLocaleString("en-US",{timeZone:g}),C=Math.round((h-new Date($))/1e3/60),Y=15*-Math.round(h.getTimezoneOffset()/15)-C;if(!Number(Y))O=this.utcOffset(0,j);else if(O=i($,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(Y,!0),j){var U=O.utcOffset();O=O.add(x-U,"minute")}return O.$x.$timezone=g,O},v.offsetName=function(g){var j=this.$x.$timezone||i.tz.guess(),O=o(this.valueOf(),j,{timeZoneName:g}).find((function(x){return x.type.toLowerCase()==="timezonename"}));return O&&O.value};var _=v.startOf;v.startOf=function(g,j){if(!this.$x||!this.$x.$timezone)return _.call(this,g,j);var O=i(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return _.call(O,g,j).tz(this.$x.$timezone,!0)},i.tz=function(g,j,O){var x=O&&j,h=O||j||u,$=d(+i(),h);if(typeof g!="string")return i(g).tz(h);var C=(function(w,A,L){var q=w-60*A*1e3,z=d(q,L);if(A===z)return[q,A];var V=d(q-=60*(z-A)*1e3,L);return z===V?[q,z]:[w-60*Math.min(z,V)*1e3,Math.max(z,V)]})(i.utc(g,x).valueOf(),$,h),Y=C[0],U=C[1],N=i(Y).utcOffset(U);return N.$x.$timezone=h,N},i.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},i.tz.setDefault=function(g){u=g}}}))})(Oe)),Oe.exports}var Ut=Nt();const Kt=Ce(Ut),Rt=(e,t="en-US")=>new Intl.DateTimeFormat(t,{timeZone:e,timeZoneName:"long"}).formatToParts(new Date).find(r=>r.type==="timeZoneName")?.value||"",Wt=e=>{const t=e[0]==="-"?-1:1,[r,n]=e.slice(1).split(":").map(Number);return t*(r*60+n)};f.extend(zt);f.extend(Kt);const qt=e=>{const t=f().tz(e).format("Z");return{name:e,longName:Rt(e),currentTime:f().tz(e).format("h:mm A"),utcOffset:t,offsetMinutes:Wt(t)}},Ht=()=>["UTC",...Intl.supportedValuesOf("timeZone")].filter((t,r,n)=>n.indexOf(t)===r).map(t=>qt(t)).sort((t,r)=>t.name==="UTC"?-1:r.name==="UTC"?1:t.offsetMinutes-r.offsetMinutes),De={"timezone-panel-container":"_timezone-panel-container_tykz4_1","search-container":"_search-container_tykz4_6","timezone-scroll-area":"_timezone-scroll-area_tykz4_15","list-container":"_list-container_tykz4_21"},Ke={"form-container":"_form-container_1xxf4_1"},dt=m.createContext(void 0),de=()=>{const e=m.useContext(dt);if(!e)throw new Error("usePopoverContext must be used within a PopoverProvider");return e},Bt=({children:e})=>{const[t,r]=m.useState(!1),n=()=>{r(!1)};return l.jsx(dt.Provider,{value:{popoverOpened:t,setPopoverOpened:r,closePopover:n},children:e})},Re=()=>{const{theme:e}=Ue(),{closePopover:t}=de(),r=re.useMediaQuery("(max-width: 48em)"),n=re.useMediaQuery("(max-width: 64em)");return l.jsx(D.Flex,{justify:"flex-end",mt:12,pb:12,children:l.jsxs(D.Flex,{direction:r?"column":"row",gap:12,w:n?"100%":void 0,children:[l.jsx(D.Button,{size:"xs",variant:"subtle",color:e.primaryColor,onClick:t,fullWidth:n,children:"Cancel"}),l.jsx(D.Button,{type:"submit",size:"xs",color:e.primaryColor,fullWidth:n,children:"Apply"})]})})},ee="YYYY/MM/DD",ue="HH:mm:ss",Ie=e=>e.timezone.name?f().tz(e.timezone.name).format(ue):f().format(ue),ft=e=>e.timezone.name?f().tz(e.timezone.name).format(ee):f().format(ee),Zt=e=>f().add(e,"day").format(ee),Jt=e=>e&&f().tz(e).format("Z"),Pe=(e,t="desktop")=>{const r=e.startDate?f(e.startDate):null,n=e.endDate?f(e.endDate):null,s=Jt(e.timezone.name);return!r||!n||!e.startTime||!e.endTime?"Select range":t==="mobile"?r.isSame(n,"day")?`${r.format("MMM D")} · ${e.startTime}`:`${r.format("MMM D")}–${n.format("MMM D")}`:t==="tablet"?`${r.format("MMM D, HH:mm")} → ${n.format("MMM D, HH:mm")}${s?` (${s})`:""}`:`${r.format(ee)} ${e.startTime} - ${n.format(ee)} ${e.endTime}${s?` (${s})`:""}`},ie=(e,t,r,n)=>{const s=f(`${e} ${t}`).subtract(r,n);return{date:s.format(ee),time:s.format(ue)}},oe=(e,t,r,n)=>{const s=f(`${e} ${t}`).add(r,n);return{date:s.format(ee),time:s.format(ue)}},ve=(e,t,r)=>f.tz(`${e} ${t}`,`${ee} ${ue}`,r).utc().toISOString(),xe=(e,t)=>{const r=f.utc(e).tz(t);return{date:r.format(ee),time:r.format(ue)}},mt=({tzRange:e})=>{const[t,r]=m.useState(e.timezone),[n,s]=m.useState([]),[c,i]=m.useState(""),u=re.useMediaQuery("(max-width: 64em)"),{closePopover:o}=de(),d=m.useMemo(()=>Ht(),[]);m.useEffect(()=>{s(d)},[]),ct(()=>{if(c===""){s(d);return}s(d.filter(j=>j.name.toLowerCase().includes(c.toLocaleLowerCase())||j.longName.toLowerCase().includes(c.toLocaleLowerCase())||j.currentTime.toLowerCase().includes(c.toLocaleLowerCase())||j.utcOffset.toLowerCase().includes(c.toLocaleLowerCase())))},250,[c]);const v=j=>{r(j)},_=j=>{if(j.preventDefault(),!t?.name||!e.timezone.name||!e.startDate||!e.startTime||!e.endDate||!e.endTime)return;const O=ve(e.startDate,e.startTime,e.timezone.name),x=ve(e.endDate,e.endTime,e.timezone.name),h=xe(O,t.name),$=xe(x,t.name);e.onApply({startDate:h.date,startTime:h.time,endDate:$.date,endTime:$.time,timezone:t||{name:null,longName:null,utcOffset:null}}),u&&o()},g=j=>j?f().tz(j).format("h:mm A"):"";return l.jsxs("form",{className:Ke["form-container"],onSubmit:_,children:[l.jsxs(D.Flex,{direction:"column",className:De["timezone-panel-container"],children:[l.jsx(D.Box,{className:De["search-container"],children:l.jsx(Ct,{searchText:c,setSearchText:i})}),l.jsxs(D.Box,{className:De["timezone-scroll-area"],children:[l.jsx(D.Text,{fw:600,px:12,children:"My Location"}),l.jsx(D.Flex,{direction:"column",children:l.jsx(Be,{isBrowserTimezone:!0,name:e.timezone?.name,longName:e.timezone?.longName,currentTime:g(e.timezone?.name),utcOffset:e.timezone?.utcOffset,selectedTimezone:t})}),l.jsx(D.Text,{fw:600,px:12,children:"Locations"}),l.jsx(D.Flex,{direction:"column",className:De["list-container"],children:n.map((j,O)=>l.jsx(Be,{name:j.name,longName:j.longName,currentTime:j.currentTime,utcOffset:j.utcOffset,selectedTimezone:t,handleTimezoneMouseClick:v},O))})]})]}),l.jsx(D.Box,{px:12,children:l.jsx(Re,{})})]})},ye={"sidebar-container":"_sidebar-container_1cvpv_1","sidebar-mobile-relative":"_sidebar-mobile-relative_1cvpv_11","sidebar-row":"_sidebar-row_1cvpv_17"},Qt=e=>[{label:"Today",searchKey:"today",startTime:f().tz(e).startOf("day").format(),endTime:f().tz(e).endOf("day").format(),unit:"days"},{label:"Tomorrow",searchKey:"tomorrow",startTime:f().tz(e).add(1,"day").startOf("day").format(),endTime:f().tz(e).add(1,"day").endOf("day").format(),unit:"days"},{label:"Yesterday",searchKey:"yesterday",startTime:f().tz(e).subtract(1,"day").startOf("day").format(),endTime:f().tz(e).subtract(1,"day").endOf("day").format(),unit:"days"},{label:"Last 15 seconds",searchKey:"-15s",startTime:f().tz(e).subtract(15,"second").format(),endTime:f().tz(e).format(),unit:"seconds"},{label:"Last 30 seconds",searchKey:"-30s",startTime:f().tz(e).subtract(30,"second").format(),endTime:f().tz(e).format(),unit:"seconds"},{label:"Next 15 seconds",searchKey:"+15s",startTime:f().tz(e).format(),endTime:f().tz(e).add(15,"second").format(),unit:"seconds"},{label:"Next 30 seconds",searchKey:"+30s",startTime:f().tz(e).format(),endTime:f().tz(e).add(30,"second").format(),unit:"seconds"},{label:"Last 5 minutes",searchKey:"-5m",startTime:f().tz(e).subtract(5,"minute").format(),endTime:f().tz(e).format(),unit:"minutes"},{label:"Last 10 minutes",searchKey:"-10m",startTime:f().tz(e).subtract(10,"minute").format(),endTime:f().tz(e).format(),unit:"minutes"},{label:"Last 15 minutes",searchKey:"-15m",startTime:f().tz(e).subtract(15,"minute").format(),endTime:f().tz(e).format(),unit:"minutes"},{label:"Last 30 minutes",searchKey:"-30m",startTime:f().tz(e).subtract(30,"minute").format(),endTime:f().tz(e).format(),unit:"minutes"},{label:"Last 45 minutes",searchKey:"-45m",startTime:f().tz(e).subtract(45,"minute").format(),endTime:f().tz(e).format(),unit:"minutes"},{label:"Next 5 minutes",searchKey:"+5m",startTime:f().tz(e).format(),endTime:f().tz(e).add(5,"minute").format(),unit:"minutes"},{label:"Next 10 minutes",searchKey:"+10m",startTime:f().tz(e).format(),endTime:f().tz(e).add(10,"minute").format(),unit:"minutes"},{label:"Next 15 minutes",searchKey:"+15m",startTime:f().tz(e).format(),endTime:f().tz(e).add(15,"minute").format(),unit:"minutes"},{label:"Next 30 minutes",searchKey:"+30m",startTime:f().tz(e).format(),endTime:f().tz(e).add(30,"minute").format(),unit:"minutes"},{label:"Next 45 minutes",searchKey:"+45m",startTime:f().tz(e).format(),endTime:f().tz(e).add(45,"minute").format(),unit:"minutes"},{label:"Last 1 hour",searchKey:"-1h",startTime:f().tz(e).subtract(1,"hour").format(),endTime:f().tz(e).format(),unit:"hours"},{label:"Last 3 hours",searchKey:"-3h",startTime:f().tz(e).subtract(3,"hour").format(),endTime:f().tz(e).format(),unit:"hours"},{label:"Last 6 hours",searchKey:"-6h",startTime:f().tz(e).subtract(6,"hour").format(),endTime:f().tz(e).format(),unit:"hours"},{label:"Last 12 hours",searchKey:"-12h",startTime:f().tz(e).subtract(12,"hour").format(),endTime:f().tz(e).format(),unit:"hours"},{label:"Next 1 hour",searchKey:"+1h",startTime:f().tz(e).format(),endTime:f().tz(e).add(1,"hour").format(),unit:"hours"},{label:"Next 3 hours",searchKey:"+3h",startTime:f().tz(e).format(),endTime:f().tz(e).add(3,"hour").format(),unit:"hours"},{label:"Next 6 hours",searchKey:"+6h",startTime:f().tz(e).format(),endTime:f().tz(e).add(6,"hour").format(),unit:"hours"},{label:"Next 12 hours",searchKey:"+12h",startTime:f().tz(e).format(),endTime:f().tz(e).add(12,"hour").format(),unit:"hours"},{label:"Last 1 day",searchKey:"-1d",startTime:f().tz(e).subtract(1,"day").format(),endTime:f().tz(e).format(),unit:"days"},{label:"Last 2 days",searchKey:"-2d",startTime:f().tz(e).subtract(2,"day").format(),endTime:f().tz(e).format(),unit:"days"},{label:"Last 7 days",searchKey:"-7d",startTime:f().tz(e).subtract(7,"day").format(),endTime:f().tz(e).format(),unit:"days"},{label:"Last 14 days",searchKey:"-14d",startTime:f().tz(e).subtract(14,"day").format(),endTime:f().tz(e).format(),unit:"days"},{label:"Last 30 days",searchKey:"-30d",startTime:f().tz(e).subtract(30,"day").format(),endTime:f().tz(e).format(),unit:"days"},{label:"Next 1 day",searchKey:"+1d",startTime:f().tz(e).format(),endTime:f().tz(e).add(1,"day").format(),unit:"days"},{label:"Next 2 days",searchKey:"+2d",startTime:f().tz(e).format(),endTime:f().tz(e).add(2,"day").format(),unit:"days"},{label:"Next 7 days",searchKey:"+7d",startTime:f().tz(e).format(),endTime:f().tz(e).add(7,"day").format(),unit:"days"},{label:"Next 14 days",searchKey:"+14d",startTime:f().tz(e).format(),endTime:f().tz(e).add(14,"day").format(),unit:"days"},{label:"Next 30 days",searchKey:"+30d",startTime:f().tz(e).format(),endTime:f().tz(e).add(30,"day").format(),unit:"days"}],Gt=(e,t)=>e==="seconds"?!t?.disableSeconds:e==="minutes"?!t?.disableMinutes:e==="hours"?!t?.disableHours:e==="days"?!t?.disableDays:!0,Ge=(e,t)=>{const r=Qt(e).filter(n=>Gt(n.unit,t));return r.map((n,s)=>({...n,lineBreak:s<r.length-1&&r[s+1].unit!==n.unit}))},pe={"relative-time-root":"_relative-time-root_emohw_1","relative-time-panel-container":"_relative-time-panel-container_emohw_9","time-row":"_time-row_emohw_16","time-row-dark":"_time-row-dark_emohw_20","time-row-light":"_time-row-light_emohw_26"},Xe=({tzRange:e})=>{const[t,r]=m.useState([]),[n,s]=m.useState(""),{colorScheme:c}=Ue(),{closePopover:i}=de();m.useEffect(()=>{if(e.timezone.name!==null){const o=Ge(e.timezone.name,e.options);r(o)}},[e.timezone,e.options]),ct(()=>{if(!e.timezone.name)return;const o=Ge(e.timezone.name,e.options);if(n===""){r(o);return}const d=n.toLowerCase();r(o.filter(v=>v.searchKey.includes(d)||v.label.toLowerCase().includes(d)))},250,[n,e.timezone,e.options]);const u=o=>{const[d,v]=o.startTime.split("T"),[_,g]=o.endTime.split("T");e.onApply({startDate:d,startTime:v.slice(0,8),endDate:_,endTime:g.slice(0,8),timezone:e.timezone}),i()};return l.jsxs(D.Flex,{direction:"column",className:pe["relative-time-root"],children:[l.jsx(D.Box,{style:{width:"90%"},mx:"auto",children:l.jsx(D.Input,{placeholder:"Relative time (15m, 1h, 1d, 1w)",value:n,onChange:o=>s(o.currentTarget.value)})}),l.jsx(D.Flex,{direction:"column",className:pe["relative-time-panel-container"],children:t.map(o=>l.jsxs(D.Flex,{align:"center",justify:"space-between",className:lt(c==="dark"?pe["time-row-dark"]:pe["time-row-light"],pe["time-row"]),py:4,px:12,mb:o.lineBreak?8:0,onClick:()=>u(o),children:[l.jsx(D.Text,{size:"sm",children:o.label}),l.jsx(D.Text,{size:"xs",c:"#5f6368",children:o.searchKey})]},o.label))})]})},et=({setSelectedPanel:e,tzRange:t,mobileOnlyRelative:r=!1})=>r?l.jsx(D.Box,{className:ye["sidebar-mobile-relative"],children:l.jsx(Xe,{tzRange:t})}):l.jsxs(D.Box,{className:ye["sidebar-container"],flex:1,children:[l.jsx(Xe,{tzRange:t}),l.jsxs(D.Flex,{direction:"column",rowGap:16,py:8,style:{borderTop:"1px solid #ddd"},children:[l.jsxs(D.Flex,{className:ye["sidebar-row"],justify:"space-between",align:"center",px:12,onClick:()=>e(be.START_END_TIME),children:[l.jsxs(D.Flex,{align:"center",children:[l.jsx(Mt,{stroke:1.5}),l.jsx(D.Text,{size:"sm",children:"Start and end times"})]}),l.jsx(Fe,{stroke:1.5})]}),l.jsxs(D.Flex,{className:ye["sidebar-row"],justify:"space-between",align:"center",px:12,onClick:()=>e(be.AROUND_TIME),children:[l.jsxs(D.Flex,{align:"center",children:[l.jsx(Me,{stroke:1.5}),l.jsx(D.Text,{size:"sm",children:"Around a time"})]}),l.jsx(Fe,{stroke:1.5})]}),l.jsxs(D.Flex,{className:ye["sidebar-row"],justify:"space-between",align:"center",px:12,onClick:()=>e(be.TIMEZONE),children:[l.jsxs(D.Flex,{align:"center",children:[l.jsx(Et,{stroke:1.5}),l.jsx(D.Text,{size:"sm",children:"Time zone"})]}),l.jsx(Fe,{stroke:1.5})]})]})]});var ht=(e=>(e.ThirtySeconds="± 30 seconds",e.OneMinute="± 1 minute",e.FifteenMinutes="± 15 minutes",e.ThirtyMinutes="± 30 minutes",e.OneHour="± 1 hour",e.OneDay="± 1 day",e))(ht||{});const Xt=["± 30 seconds","± 1 minute","± 15 minutes","± 30 minutes","± 1 hour","± 1 day"],er=(e,t,r)=>{switch(r){case"± 30 seconds":const n=ie(e,t,30,"second"),s=oe(e,t,30,"second");return{startDate:n.date,startTime:n.time,endDate:s.date,endTime:s.time};case"± 1 minute":const c=ie(e,t,1,"minute"),i=oe(e,t,1,"minute");return{startDate:c.date,startTime:c.time,endDate:i.date,endTime:i.time};case"± 15 minutes":const u=ie(e,t,15,"minute"),o=oe(e,t,15,"minute");return{startDate:u.date,startTime:u.time,endDate:o.date,endTime:o.time};case"± 30 minutes":const d=ie(e,t,30,"minute"),v=oe(e,t,30,"minute");return{startDate:d.date,startTime:d.time,endDate:v.date,endTime:v.time};case"± 1 hour":const _=ie(e,t,1,"hour"),g=oe(e,t,1,"hour");return{startDate:_.date,startTime:_.time,endDate:g.date,endTime:g.time};case"± 1 day":const j=ie(e,t,1,"day"),O=oe(e,t,1,"day");return{startDate:j.date,startTime:j.time,endDate:O.date,endTime:O.time};default:return{startDate:e,startTime:t,endDate:e,endTime:t}}};function tr(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 rr=typeof window<"u"?m.useLayoutEffect:m.useEffect;function J(e,t){rr(()=>{if(e)return window.addEventListener(e,t),()=>window.removeEventListener(e,t)},[e])}function nr(e,t){e&&tr(e),J(`mantine-form:${e}:set-field-value`,r=>t.setFieldValue(r.detail.path,r.detail.value)),J(`mantine-form:${e}:set-values`,r=>t.setValues(r.detail)),J(`mantine-form:${e}:set-initial-values`,r=>t.setInitialValues(r.detail)),J(`mantine-form:${e}:set-errors`,r=>t.setErrors(r.detail)),J(`mantine-form:${e}:set-field-error`,r=>t.setFieldError(r.detail.path,r.detail.error)),J(`mantine-form:${e}:clear-field-error`,r=>t.clearFieldError(r.detail)),J(`mantine-form:${e}:clear-errors`,t.clearErrors),J(`mantine-form:${e}:reset`,t.reset),J(`mantine-form:${e}:validate`,t.validate),J(`mantine-form:${e}:validate-field`,r=>t.validateField(r.detail)),J(`mantine-form:${e}:reorder-list-item`,r=>t.reorderListItem(r.detail.path,r.detail.payload)),J(`mantine-form:${e}:remove-list-item`,r=>t.removeListItem(r.detail.path,r.detail.index)),J(`mantine-form:${e}:insert-list-item`,r=>t.insertListItem(r.detail.path,r.detail.item,r.detail.index)),J(`mantine-form:${e}:set-dirty`,r=>t.setDirty(r.detail)),J(`mantine-form:${e}:set-touched`,r=>t.setTouched(r.detail)),J(`mantine-form:${e}:reset-dirty`,r=>t.resetDirty(r.detail)),J(`mantine-form:${e}:reset-touched`,t.resetTouched)}function sr(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 Le(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 ir(e){const[t,r]=m.useState(Le(e)),n=m.useRef(t),s=m.useCallback(o=>{r(d=>{const v=Le(typeof o=="function"?o(d):o);return n.current=v,v})},[]),c=m.useCallback(()=>s({}),[]),i=m.useCallback(o=>{n.current[o]!==void 0&&s(d=>{const v={...d};return delete v[o],v})},[t]),u=m.useCallback((o,d)=>{d==null||d===!1?i(o):n.current[o]!==d&&s(v=>({...v,[o]:d}))},[t]);return{errorsState:t,setErrors:s,clearErrors:c,setFieldError:u,clearFieldError:i}}function ze(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 tt(e,t){const r=e.substring(t.length+1).split(".")[0];return parseInt(r,10)}function rt(e,t,r,n){if(t===void 0)return r;const s=`${String(e)}`;let c=r;n===-1&&(c=ze(`${s}.${t}`,c));const i={...c},u=new Set;return Object.entries(c).filter(([o])=>{if(!o.startsWith(`${s}.`))return!1;const d=tt(o,s);return Number.isNaN(d)?!1:d>=t}).forEach(([o,d])=>{const v=tt(o,s),_=o.replace(`${s}.${v}`,`${s}.${v+n}`);i[_]=d,u.add(_),u.has(o)||delete i[o]}),i}function or(e,{from:t,to:r},n){const s=`${e}.${t}`,c=`${e}.${r}`,i={...n},u=new Set;return Object.keys(n).forEach(o=>{if(u.has(o))return;let d,v;if(o.startsWith(s)?(d=o,v=o.replace(s,c)):o.startsWith(c)&&(d=o.replace(c,s),v=o),d&&v){const _=i[d],g=i[v];g===void 0?delete i[d]:i[d]=g,_===void 0?delete i[v]:i[v]=_,u.add(d),u.add(v)}}),i}function nt(e,t,r){typeof r.value=="object"&&(r.value=ce(r.value)),!r.enumerable||r.get||r.set||!r.configurable||!r.writable||t==="__proto__"?Object.defineProperty(e,t,r):e[t]=r.value}function ce(e){if(typeof e!="object")return e;var t=0,r,n,s,c=Object.prototype.toString.call(e);if(c==="[object Object]"?s=Object.create(e.__proto__||null):c==="[object Array]"?s=Array(e.length):c==="[object Set]"?(s=new Set,e.forEach(function(i){s.add(ce(i))})):c==="[object Map]"?(s=new Map,e.forEach(function(i,u){s.set(ce(u),ce(i))})):c==="[object Date]"?s=new Date(+e):c==="[object RegExp]"?s=new RegExp(e.source,e.flags):c==="[object DataView]"?s=new e.constructor(ce(e.buffer)):c==="[object ArrayBuffer]"?s=e.slice(0):c.slice(-6)==="Array]"&&(s=new e.constructor(e)),s){for(n=Object.getOwnPropertySymbols(e);t<n.length;t++)nt(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]||nt(s,r,Object.getOwnPropertyDescriptor(e,r))}return s||e}function yt(e){return typeof e!="string"?[]:e.split(".")}function B(e,t){const r=yt(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 Se(e,t,r){const n=yt(e);if(n.length===0)return r;const s=ce(r);if(n.length===1)return s[n[0]]=t,s;let c=s[n[0]];for(let i=1;i<n.length-1;i+=1){if(c===void 0)return s;c=c[n[i]]}return c[n[n.length-1]]=t,s}function ar(e,{from:t,to:r},n){const s=B(e,n);if(!Array.isArray(s))return n;const c=[...s],i=s[t];return c.splice(t,1),c.splice(r,0,i),Se(e,c,n)}function cr(e,t,r,n){const s=B(e,n);if(!Array.isArray(s))return n;const c=[...s];return c.splice(typeof r=="number"?r:c.length,0,t),Se(e,c,n)}function ur(e,t,r){const n=B(e,r);return Array.isArray(n)?Se(e,n.filter((s,c)=>c!==t),r):r}function lr(e,t,r,n){const s=B(e,n);if(!Array.isArray(s)||s.length<=r)return n;const c=[...s];return c[r]=t,Se(e,c,n)}function dr({$values:e,$errors:t,$status:r}){const n=m.useCallback((u,o)=>{r.clearFieldDirty(u),t.setErrors(d=>or(u,o,d)),e.setValues({values:ar(u,o,e.refValues.current),updateState:!0})},[]),s=m.useCallback((u,o)=>{r.clearFieldDirty(u),t.setErrors(d=>rt(u,o,d,-1)),e.setValues({values:ur(u,o,e.refValues.current),updateState:!0})},[]),c=m.useCallback((u,o,d)=>{r.clearFieldDirty(u),t.setErrors(v=>rt(u,d,v,1)),e.setValues({values:cr(u,o,d,e.refValues.current),updateState:!0})},[]),i=m.useCallback((u,o,d)=>{r.clearFieldDirty(u),e.setValues({values:lr(u,d,o,e.refValues.current),updateState:!0})},[]);return{reorderListItem:n,removeListItem:s,insertListItem:c,replaceListItem:i}}var Ae,st;function fr(){return st||(st=1,Ae=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,c;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(c=Object.keys(t),n=c.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,c[s]))return!1;for(s=n;s--!==0;){var i=c[s];if(!e(t[i],r[i]))return!1}return!0}return t!==t&&r!==r}),Ae}var mr=fr();const we=Ce(mr);function Te(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 hr({initialDirty:e,initialTouched:t,mode:r,$values:n}){const[s,c]=m.useState(t),[i,u]=m.useState(e),o=m.useRef(t),d=m.useRef(e),v=m.useCallback(w=>{const A=typeof w=="function"?w(o.current):w;o.current=A,r==="controlled"&&c(A)},[]),_=m.useCallback((w,A=!1)=>{const L=typeof w=="function"?w(d.current):w;d.current=L,(r==="controlled"||A)&&u(L)},[]),g=m.useCallback(()=>v({}),[]),j=m.useCallback(w=>{const A=w?{...n.refValues.current,...w}:n.refValues.current;n.setValuesSnapshot(A),_({})},[]),O=m.useCallback((w,A)=>{v(L=>Te(L,w)===A?L:{...L,[w]:A})},[]),x=m.useCallback((w,A,L)=>{_(q=>Te(q,w)===A?q:{...q,[w]:A},L)},[]),h=m.useCallback((w,A)=>{const L=Te(d.current,w),q=!we(B(w,n.getValuesSnapshot()),A),z=ze(w,d.current);z[w]=q,_(z,L!==q)},[]),$=m.useCallback(w=>Te(o.current,w),[]),C=m.useCallback(w=>_(A=>{if(typeof w!="string")return A;const L=ze(w,A);return delete L[w],we(L,A)?A:L}),[]),Y=m.useCallback(w=>{if(w){const L=B(w,d.current);if(typeof L=="boolean")return L;const q=B(w,n.refValues.current),z=B(w,n.valuesSnapshot.current);return!we(q,z)}return Object.keys(d.current).length>0?Te(d.current):!we(n.refValues.current,n.valuesSnapshot.current)},[]),U=m.useCallback(()=>d.current,[]),N=m.useCallback(()=>o.current,[]);return{touchedState:s,dirtyState:i,touchedRef:o,dirtyRef:d,setTouched:v,setDirty:_,resetDirty:j,resetTouched:g,isTouched:$,setFieldTouched:O,setFieldDirty:x,setTouchedState:c,setDirtyState:u,clearFieldDirty:C,isDirty:Y,getDirty:U,getTouched:N,setCalculatedFieldDirty:h}}function yr({initialValues:e,onValuesChange:t,mode:r}){const n=m.useRef(!1),[s,c]=m.useState(e||{}),i=m.useRef(s),u=m.useRef(s),o=m.useCallback(({values:h,subscribers:$,updateState:C=!0,mergeWithPreviousValues:Y=!0})=>{const U=i.current,N=h instanceof Function?h(i.current):h,w=Y?{...U,...N}:N;i.current=w,C&&(c(w),r==="uncontrolled"&&(i.current=w)),t?.(w,U),$?.filter(Boolean).forEach(A=>A({updatedValues:w,previousValues:U}))},[t]),d=m.useCallback(h=>{const $=B(h.path,i.current),C=h.value instanceof Function?h.value($):h.value;if($!==C){const Y=i.current,U=Se(h.path,C,i.current);o({values:U,updateState:h.updateState}),h.subscribers?.filter(Boolean).forEach(N=>N({path:h.path,updatedValues:U,previousValues:Y}))}},[o]),v=m.useCallback(h=>{u.current=h},[]),_=m.useCallback((h,$)=>{n.current||(n.current=!0,o({values:h,updateState:r==="controlled"}),v(h),$())},[o]),g=m.useCallback(()=>{o({values:u.current,updateState:!0,mergeWithPreviousValues:!1})},[o]),j=m.useCallback(()=>i.current,[]),O=m.useCallback(()=>u.current,[]),x=m.useCallback((h,$)=>{const C=B(h,u.current);typeof C>"u"||d({path:h,value:C,updateState:r==="controlled",subscribers:$})},[d,r]);return{initialized:n,stateValues:s,refValues:i,valuesSnapshot:u,setValues:o,setFieldValue:d,resetValues:g,setValuesSnapshot:v,initialize:_,getValues:j,getValuesSnapshot:O,resetField:x}}function pr({$status:e,cascadeUpdates:t}){const r=m.useRef({}),n=m.useCallback((c,i)=>{m.useEffect(()=>(r.current[c]=r.current[c]||[],r.current[c].push(i),()=>{r.current[c]=r.current[c].filter(u=>u!==i)}),[i])},[]),s=m.useCallback(c=>{const i=r.current[c]?.map(u=>o=>u({previousValue:B(c,o.previousValues),value:B(c,o.updatedValues),touched:e.isTouched(c),dirty:e.isDirty(c)}))??[];if(t)for(const u in r.current)(u.startsWith(`${c}.`)||c.startsWith(`${u}.`))&&i.push(...r.current[u].map(o=>d=>o({previousValue:B(u,d.previousValues),value:B(u,d.updatedValues),touched:e.isTouched(u),dirty:e.isDirty(u)})));return i},[]);return{subscribers:r,watch:n,getFieldSubscribers:s}}function it(e,t){return e?`${e}-${t.toString()}`:t.toString()}const ke=Symbol("root-rule");function ot(e){const t=Le(e);return{hasErrors:Object.keys(t).length>0,errors:t}}function Ye(e,t,r="",n={}){return typeof e!="object"||e===null?n:Object.keys(e).reduce((s,c)=>{const i=e[c],u=`${r===""?"":`${r}.`}${c}`,o=B(u,t);let d=!1;return typeof i=="function"&&(s[u]=i(o,t,u)),typeof i=="object"&&Array.isArray(o)&&(d=!0,o.forEach((v,_)=>Ye(i,t,`${u}.${_}`,s)),ke in i&&(s[u]=i[ke](o,t,u))),typeof i=="object"&&typeof o=="object"&&o!==null&&(d||Ye(i,t,u,s),ke in i&&(s[u]=i[ke](o,t,u))),s},n)}function Ne(e,t){return ot(typeof e=="function"?e(t):Ye(e,t))}function je(e,t,r){if(typeof e!="string")return{hasError:!1,error:null};const n=Ne(t,r),s=Object.keys(n.errors).find(c=>e.split(".").every((i,u)=>i===c.split(".")[u]));return{hasError:!!s,error:s?n.errors[s]:null}}const Tr="__MANTINE_FORM_INDEX__";function at(e,t){return t?typeof t=="boolean"?t:Array.isArray(t)?t.includes(e.replace(/[.][0-9]+/g,`.${Tr}`)):!1:!1}function pt({name:e,mode:t="controlled",initialValues:r,initialErrors:n={},initialDirty:s={},initialTouched:c={},clearInputErrorOnChange:i=!0,validateInputOnChange:u=!1,validateInputOnBlur:o=!1,onValuesChange:d,transformValues:v=(h=>h),enhanceGetInputProps:_,validate:g,onSubmitPreventDefault:j="always",touchTrigger:O="change",cascadeUpdates:x=!1}={}){const h=ir(n),$=yr({initialValues:r,onValuesChange:d,mode:t}),C=hr({initialDirty:s,initialTouched:c,$values:$,mode:t}),Y=dr({$values:$,$errors:h,$status:C}),U=pr({$status:C,cascadeUpdates:x}),[N,w]=m.useState(0),[A,L]=m.useState({}),[q,z]=m.useState(!1),V=m.useCallback(()=>{$.resetValues(),h.clearErrors(),C.resetDirty(),C.resetTouched(),t==="uncontrolled"&&w(T=>T+1)},[]),X=m.useCallback(T=>{i&&h.clearErrors(),t==="uncontrolled"&&w(M=>M+1),Object.keys(U.subscribers.current).forEach(M=>{const R=B(M,$.refValues.current),K=B(M,T);R!==K&&U.getFieldSubscribers(M).forEach(Z=>Z({previousValues:T,updatedValues:$.refValues.current}))})},[i]),se=m.useCallback(T=>{const M=$.refValues.current;$.initialize(T,()=>t==="uncontrolled"&&w(R=>R+1)),X(M)},[X]),E=m.useCallback((T,M,R)=>{const K=at(T,u),Z=M instanceof Function?M(B(T,$.refValues.current)):M;C.setCalculatedFieldDirty(T,Z),O==="change"&&C.setFieldTouched(T,!0),!K&&i&&h.clearFieldError(T),$.setFieldValue({path:T,value:M,updateState:t==="controlled",subscribers:[...U.getFieldSubscribers(T),K?te=>{const Q=je(T,g,te.updatedValues);Q.hasError?h.setFieldError(T,Q.error):h.clearFieldError(T)}:null,R?.forceUpdate!==!1&&t!=="controlled"?()=>L(te=>({...te,[T]:(te[T]||0)+1})):null]})},[d,g]),b=m.useCallback(T=>{const M=$.refValues.current;$.setValues({values:T,updateState:t==="controlled"}),X(M)},[d,X]),y=m.useCallback(()=>{const T=Ne(g,$.refValues.current);return h.setErrors(T.errors),T},[g]),k=m.useCallback(T=>{const M=je(T,g,$.refValues.current);return M.hasError?h.setFieldError(T,M.error):h.clearFieldError(T),M},[g]),p=(T,{type:M="input",withError:R=!0,withFocus:K=!0,...Z}={})=>{const Q={onChange:sr($e=>E(T,$e,{forceUpdate:!1})),"data-path":it(e,T)};return R&&(Q.error=h.errorsState[T]),M==="checkbox"?Q[t==="controlled"?"checked":"defaultChecked"]=B(T,$.refValues.current):Q[t==="controlled"?"value":"defaultValue"]=B(T,$.refValues.current),K&&(Q.onFocus=()=>C.setFieldTouched(T,!0),Q.onBlur=()=>{if(at(T,o)){const $e=je(T,g,$.refValues.current);$e.hasError?h.setFieldError(T,$e.error):h.clearFieldError(T)}}),Object.assign(Q,_?.({inputProps:Q,field:T,options:{type:M,withError:R,withFocus:K,...Z},form:G}))},P=(T,M)=>R=>{j==="always"&&R?.preventDefault();const K=y();if(K.hasErrors)j==="validation-failed"&&R?.preventDefault(),M?.(K.errors,$.refValues.current,R);else{const Z=T?.(v($.refValues.current),R);Z instanceof Promise&&(z(!0),Z.finally(()=>z(!1)))}},a=T=>v(T||$.refValues.current),S=m.useCallback(T=>{T.preventDefault(),V()},[]),F=m.useCallback(T=>T?!je(T,g,$.refValues.current).hasError:!Ne(g,$.refValues.current).hasErrors,[g]),I=T=>`${N}-${String(T)}-${A[String(T)]||0}`,W=m.useCallback(T=>document.querySelector(`[data-path="${it(e,T)}"]`),[]),H=m.useCallback(T=>{$.resetField(T,[t!=="controlled"?()=>L(M=>({...M,[T]:(M[T]||0)+1})):null])},[$.resetField,t,L]),G={watch:U.watch,initialized:$.initialized.current,values:t==="uncontrolled"?$.refValues.current:$.stateValues,getValues:$.getValues,getInitialValues:$.getValuesSnapshot,setInitialValues:$.setValuesSnapshot,resetField:H,initialize:se,setValues:b,setFieldValue:E,submitting:q,setSubmitting:z,errors:h.errorsState,setErrors:h.setErrors,setFieldError:h.setFieldError,clearFieldError:h.clearFieldError,clearErrors:h.clearErrors,resetDirty:C.resetDirty,setTouched:C.setTouched,setDirty:C.setDirty,isTouched:C.isTouched,resetTouched:C.resetTouched,isDirty:C.isDirty,getTouched:C.getTouched,getDirty:C.getDirty,reorderListItem:Y.reorderListItem,insertListItem:Y.insertListItem,removeListItem:Y.removeListItem,replaceListItem:Y.replaceListItem,reset:V,validate:y,validateField:k,getInputProps:p,onSubmit:P,onReset:S,isValid:F,getTransformedValues:a,key:I,getInputNode:W};return nr(e,G),G}const br=({tzRange:e})=>{const t=re.useMediaQuery("(max-width: 64em)"),{closePopover:r}=de(),n=e.timezone.utcOffset?`GMT${e.timezone.utcOffset}`:e.timezone?.longName,s=pt({initialValues:{date:e.startDate??ft(e),time:e.startTime??Ie(e),duration:ht.OneDay},validate:{date:i=>i?null:"Date is required",time:i=>i?null:"Time is required",duration:i=>i?null:"Duration is required"}}),c=i=>{if(!e.timezone.name)return;const u=ve(i.date,i.time,e.timezone.name),o=xe(u,e.timezone.name),{startDate:d,startTime:v,endDate:_,endTime:g}=er(o.date,o.time,i.duration);e.onApply({startDate:d,startTime:v,endDate:_,endTime:g,timezone:e.timezone}),t&&r()};return l.jsx(D.Flex,{direction:"column",flex:2,justify:"space-between",style:{height:"100%"},px:12,children:l.jsxs("form",{className:Ke["form-container"],onSubmit:s.onSubmit(c),children:[l.jsxs(D.Box,{children:[l.jsx(D.Text,{fw:600,children:"Around a time"}),l.jsxs(D.Flex,{direction:"column",gap:8,mt:12,children:[l.jsx(ae.DatePickerInput,{label:"Pick date",placeholder:"Pick date",...s.getInputProps("date"),popoverProps:{withinPortal:!1},valueFormat:ee,leftSection:l.jsx(Ve,{stroke:1.5})},s.key("date")),l.jsx(ae.TimeInput,{label:"Pick time",placeholder:"Pick time",withSeconds:!0,...s.getInputProps("time"),leftSection:l.jsx(Me,{stroke:1.5}),rightSection:t?void 0:l.jsx(D.Text,{style:{fontSize:12,fontStyle:"italic",textAlign:"right"},children:e.timezone?.longName}),rightSectionWidth:t?void 0:180,rightSectionProps:{style:{paddingRight:1}}},s.key("time")),t&&n?l.jsx(D.Text,{size:"xs",c:"dimmed",mt:-4,children:n}):null,l.jsx(D.Select,{label:"Duration",placeholder:"Pick value",data:Xt,...s.getInputProps("duration"),comboboxProps:{withinPortal:!1}},s.key("duration"))]})]}),l.jsx(Re,{})]})})},vr=({tzRange:e})=>{const t=re.useMediaQuery("(max-width: 64em)"),{closePopover:r}=de(),n=e.timezone.utcOffset?`GMT${e.timezone.utcOffset}`:e.timezone?.longName,s=pt({mode:"uncontrolled",initialValues:{startDate:e.startDate??ft(e),startTime:e.startTime??Ie(e),endDate:e.endDate??Zt(30),endTime:e.endTime??Ie(e)},validate:{startDate:i=>i?null:"Start date is required",startTime:i=>i?null:"Start time is required",endDate:(i,u)=>{if(!i)return"End date is required";const o=f(`${u.startDate} ${u.startTime}`),d=f(`${i} ${u.endTime}`);return d.isAfter(o)||d.isSame(o)?null:"End time must be after start time"},endTime:(i,u)=>{if(!i)return"End time is required";const o=f(`${u.startDate} ${u.startTime}`),d=f(`${u.endDate} ${i}`);return d.isAfter(o)||d.isSame(o)?null:"End time must be after start time"}}}),c=i=>{if(!e.timezone.name)return;const u=ve(i.startDate,i.startTime,e.timezone.name),o=ve(i.endDate,i.endTime,e.timezone.name),d=xe(u,e.timezone.name),v=xe(o,e.timezone.name);e.onApply({startDate:d.date,startTime:d.time,endDate:v.date,endTime:v.time,timezone:e.timezone}),t&&r()};return l.jsx(D.Flex,{direction:"column",flex:2,style:{height:"100%"},px:12,children:l.jsxs("form",{className:Ke["form-container"],onSubmit:s.onSubmit(c),children:[l.jsxs(D.Box,{children:[l.jsx(D.Text,{fw:600,children:"Start and end times"}),l.jsxs(D.Flex,{direction:"column",gap:8,mt:12,children:[l.jsx(ae.DatePickerInput,{label:"Start time",...s.getInputProps("startDate"),popoverProps:{withinPortal:!1},valueFormat:ee,leftSection:l.jsx(Ve,{stroke:1.5})},s.key("startDate")),l.jsx(ae.TimeInput,{withSeconds:!0,...s.getInputProps("startTime"),leftSection:l.jsx(Me,{stroke:1.5}),rightSection:t?void 0:l.jsx(D.Text,{style:{fontSize:12,fontStyle:"italic"},children:e.timezone?.longName}),rightSectionWidth:t?void 0:180,rightSectionProps:{style:{paddingRight:1}}},s.key("startTime")),t&&n?l.jsx(D.Text,{size:"xs",c:"dimmed",mt:-4,children:n}):null,l.jsx(ae.DatePickerInput,{label:"End time",...s.getInputProps("endDate"),popoverProps:{withinPortal:!1},valueFormat:ee,leftSection:l.jsx(Ve,{stroke:1.5})},s.key("endDate")),l.jsx(ae.TimeInput,{withSeconds:!0,...s.getInputProps("endTime"),leftSection:l.jsx(Me,{stroke:1.5}),rightSection:t?void 0:l.jsx(D.Text,{style:{fontSize:12,fontStyle:"italic"},children:e.timezone?.longName}),rightSectionWidth:t?void 0:180,rightSectionProps:{style:{paddingRight:1}}},s.key("endTime")),t&&n?l.jsx(D.Text,{size:"xs",c:"dimmed",mt:-4,children:n}):null]})]}),l.jsx(Re,{})]})})},ne={"trigger-button":"_trigger-button_1ds5p_1","picker-shell":"_picker-shell_1ds5p_18","mobile-layout":"_mobile-layout_1ds5p_22","mobile-nav":"_mobile-nav_1ds5p_29","mobile-content":"_mobile-content_1ds5p_33"};var be=(e=>(e.RELATIVE_TIME="Relative time",e.START_END_TIME="Start and end times",e.AROUND_TIME="Around a time",e.TIMEZONE="Time zone",e))(be||{});const xr=e=>{const[t,r]=m.useState("Start and end times"),{popoverOpened:n,setPopoverOpened:s}=de(),c=re.useMediaQuery("(max-width: 48em)"),i=re.useMediaQuery("(max-width: 64em)");m.useEffect(()=>{!i&&t==="Relative time"&&r("Start and end times")},[i,t]);const u=()=>{switch(t){case"Relative time":return l.jsx(et,{tzRange:e,setSelectedPanel:r,mobileOnlyRelative:!0});case"Start and end times":return l.jsx(vr,{tzRange:e});case"Around a time":return l.jsx(br,{tzRange:e});case"Time zone":return l.jsx(mt,{tzRange:e});default:return null}},o=()=>{s(g=>!g)},d=m.useMemo(()=>Pe(e,"desktop"),[e.startDate,e.startTime,e.endDate,e.endTime,e.timezone]),v=m.useMemo(()=>c?Pe(e,"mobile"):i?Pe(e,"tablet"):d,[d,c,i,e]),_=i?l.jsxs("div",{className:ne["mobile-layout"],children:[l.jsx("div",{className:ne["mobile-nav"],children:l.jsx(D.SegmentedControl,{fullWidth:!0,value:t,onChange:g=>r(g),data:[{label:"Quick",value:"Relative time"},{label:"Range",value:"Start and end times"},{label:"Around",value:"Around a time"},{label:"TZ",value:"Time zone"}]})}),l.jsx("div",{className:ne["mobile-content"],children:u()})]}):l.jsxs(D.Flex,{className:ne["picker-shell"],children:[l.jsx(et,{tzRange:e,setSelectedPanel:r}),u()]});return i?l.jsxs(l.Fragment,{children:[l.jsx(D.Button,{onClick:o,style:e.buttonStyle||{},className:ne["trigger-button"],title:d,children:v}),l.jsx(D.Drawer,{opened:n,onClose:()=>s(!1),size:"100%",padding:0,title:"Select time range",styles:{content:{display:"flex",flexDirection:"column"},body:{flex:1,overflow:"hidden",padding:0}},children:l.jsx("div",{className:ne["picker-shell"],children:_})})]}):l.jsxs(D.Popover,{position:"bottom",shadow:"md",opened:n,onChange:s,children:[l.jsx(D.Popover.Target,{children:l.jsx(D.Button,{onClick:o,style:e.buttonStyle||{},className:ne["trigger-button"],title:d,children:v})}),l.jsx(D.Popover.Dropdown,{style:{width:700,height:400,padding:0},py:8,children:_})]})},Sr=e=>l.jsx(Bt,{children:l.jsx(xr,{...e})});exports.Panel=be;exports.TimezonePanel=mt;exports.TimezoneRangePicker=Sr;
63
63
  //# sourceMappingURL=index.cjs.js.map