react-timezone-range-picker 0.1.4 → 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.
- package/dist/RelativeTimePanel/index.d.ts.map +1 -1
- package/dist/RelativeTimePanel/timeOptions.d.ts +4 -1
- package/dist/RelativeTimePanel/timeOptions.d.ts.map +1 -1
- package/dist/TimezonePanel/util/getBrowserTimezone.d.ts.map +1 -1
- package/dist/TimezonePanel/util/getTimezones.d.ts.map +1 -1
- package/dist/index.cjs.js +10 -10
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +692 -649
- package/dist/index.es.js.map +1 -1
- package/dist/interfaces/index.d.ts +7 -0
- package/dist/interfaces/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import _t, { useRef as se, useCallback as A, useEffect as
|
|
2
|
-
import { useMantineColorScheme as Pt, useMantineTheme as At, Flex as q, Text as J, Input as vt, Button as
|
|
1
|
+
import _t, { useRef as se, useCallback as A, useEffect as oe, forwardRef as Et, createElement as Le, useContext as Ot, createContext as kt, useState as ee, useMemo as Ke, useLayoutEffect as Mt } from "react";
|
|
2
|
+
import { useMantineColorScheme as Pt, useMantineTheme as At, Flex as q, Text as J, Input as vt, Button as Ce, Box as ie, Select as Vt, Drawer as Ct, Popover as ze, SegmentedControl as Ft } from "@mantine/core";
|
|
3
3
|
import { useMediaQuery as ae } from "@mantine/hooks";
|
|
4
|
-
import { DatePickerInput as
|
|
4
|
+
import { DatePickerInput as We, TimeInput as Re } from "@mantine/dates";
|
|
5
5
|
function Ie(e) {
|
|
6
6
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
7
7
|
}
|
|
@@ -21,8 +21,8 @@ function It() {
|
|
|
21
21
|
tt = 1;
|
|
22
22
|
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
23
23
|
function r(n, s, c) {
|
|
24
|
-
var
|
|
25
|
-
if (c !== void 0 && (
|
|
24
|
+
var i = null;
|
|
25
|
+
if (c !== void 0 && (i = "" + c), s.key !== void 0 && (i = "" + s.key), "key" in s) {
|
|
26
26
|
c = {};
|
|
27
27
|
for (var u in s)
|
|
28
28
|
u !== "key" && (c[u] = s[u]);
|
|
@@ -30,7 +30,7 @@ function It() {
|
|
|
30
30
|
return s = c.ref, {
|
|
31
31
|
$$typeof: e,
|
|
32
32
|
type: n,
|
|
33
|
-
key:
|
|
33
|
+
key: i,
|
|
34
34
|
ref: s !== void 0 ? s : null,
|
|
35
35
|
props: c
|
|
36
36
|
};
|
|
@@ -56,7 +56,7 @@ function Lt() {
|
|
|
56
56
|
return a.$$typeof === L ? null : a.displayName || a.name || null;
|
|
57
57
|
if (typeof a == "string") return a;
|
|
58
58
|
switch (a) {
|
|
59
|
-
case
|
|
59
|
+
case b:
|
|
60
60
|
return "Fragment";
|
|
61
61
|
case $:
|
|
62
62
|
return "Profiler";
|
|
@@ -66,7 +66,7 @@ function Lt() {
|
|
|
66
66
|
return "Suspense";
|
|
67
67
|
case S:
|
|
68
68
|
return "SuspenseList";
|
|
69
|
-
case
|
|
69
|
+
case R:
|
|
70
70
|
return "Activity";
|
|
71
71
|
}
|
|
72
72
|
if (typeof a == "object")
|
|
@@ -77,17 +77,17 @@ function Lt() {
|
|
|
77
77
|
return "Portal";
|
|
78
78
|
case z:
|
|
79
79
|
return (a.displayName || "Context") + ".Provider";
|
|
80
|
-
case
|
|
80
|
+
case k:
|
|
81
81
|
return (a._context.displayName || "Context") + ".Consumer";
|
|
82
82
|
case N:
|
|
83
|
-
var
|
|
84
|
-
return a = a.displayName, a || (a =
|
|
83
|
+
var x = a.render;
|
|
84
|
+
return a = a.displayName, a || (a = x.displayName || x.name || "", a = a !== "" ? "ForwardRef(" + a + ")" : "ForwardRef"), a;
|
|
85
85
|
case V:
|
|
86
|
-
return
|
|
86
|
+
return x = a.displayName || null, x !== null ? x : e(a.type) || "Memo";
|
|
87
87
|
case I:
|
|
88
|
-
|
|
88
|
+
x = a._payload, a = a._init;
|
|
89
89
|
try {
|
|
90
|
-
return e(a(
|
|
90
|
+
return e(a(x));
|
|
91
91
|
} catch {
|
|
92
92
|
}
|
|
93
93
|
}
|
|
@@ -99,50 +99,50 @@ function Lt() {
|
|
|
99
99
|
function r(a) {
|
|
100
100
|
try {
|
|
101
101
|
t(a);
|
|
102
|
-
var
|
|
102
|
+
var x = !1;
|
|
103
103
|
} catch {
|
|
104
|
-
|
|
104
|
+
x = !0;
|
|
105
105
|
}
|
|
106
|
-
if (
|
|
107
|
-
|
|
108
|
-
var M =
|
|
106
|
+
if (x) {
|
|
107
|
+
x = console;
|
|
108
|
+
var M = x.error, F = typeof Symbol == "function" && Symbol.toStringTag && a[Symbol.toStringTag] || a.constructor.name || "Object";
|
|
109
109
|
return M.call(
|
|
110
|
-
|
|
110
|
+
x,
|
|
111
111
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
112
|
-
|
|
112
|
+
F
|
|
113
113
|
), t(a);
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
function n(a) {
|
|
117
|
-
if (a ===
|
|
117
|
+
if (a === b) return "<>";
|
|
118
118
|
if (typeof a == "object" && a !== null && a.$$typeof === I)
|
|
119
119
|
return "<...>";
|
|
120
120
|
try {
|
|
121
|
-
var
|
|
122
|
-
return
|
|
121
|
+
var x = e(a);
|
|
122
|
+
return x ? "<" + x + ">" : "<...>";
|
|
123
123
|
} catch {
|
|
124
124
|
return "<...>";
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
function s() {
|
|
128
|
-
var a =
|
|
128
|
+
var a = C.A;
|
|
129
129
|
return a === null ? null : a.getOwner();
|
|
130
130
|
}
|
|
131
131
|
function c() {
|
|
132
132
|
return Error("react-stack-top-frame");
|
|
133
133
|
}
|
|
134
|
-
function
|
|
134
|
+
function i(a) {
|
|
135
135
|
if (te.call(a, "key")) {
|
|
136
|
-
var
|
|
137
|
-
if (
|
|
136
|
+
var x = Object.getOwnPropertyDescriptor(a, "key").get;
|
|
137
|
+
if (x && x.isReactWarning) return !1;
|
|
138
138
|
}
|
|
139
139
|
return a.key !== void 0;
|
|
140
140
|
}
|
|
141
|
-
function u(a,
|
|
141
|
+
function u(a, x) {
|
|
142
142
|
function M() {
|
|
143
143
|
T || (T = !0, console.error(
|
|
144
144
|
"%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)",
|
|
145
|
-
|
|
145
|
+
x
|
|
146
146
|
));
|
|
147
147
|
}
|
|
148
148
|
M.isReactWarning = !0, Object.defineProperty(a, "key", {
|
|
@@ -150,22 +150,22 @@ function Lt() {
|
|
|
150
150
|
configurable: !0
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function o() {
|
|
154
154
|
var a = e(this.type);
|
|
155
155
|
return h[a] || (h[a] = !0, console.error(
|
|
156
156
|
"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."
|
|
157
157
|
)), a = this.props.ref, a !== void 0 ? a : null;
|
|
158
158
|
}
|
|
159
|
-
function d(a,
|
|
159
|
+
function d(a, x, M, F, W, H, Q, p) {
|
|
160
160
|
return M = H.ref, a = {
|
|
161
161
|
$$typeof: w,
|
|
162
162
|
type: a,
|
|
163
|
-
key:
|
|
163
|
+
key: x,
|
|
164
164
|
props: H,
|
|
165
|
-
_owner:
|
|
165
|
+
_owner: W
|
|
166
166
|
}, (M !== void 0 ? M : null) !== null ? Object.defineProperty(a, "ref", {
|
|
167
167
|
enumerable: !1,
|
|
168
|
-
get:
|
|
168
|
+
get: o
|
|
169
169
|
}) : Object.defineProperty(a, "ref", { enumerable: !1, value: null }), a._store = {}, Object.defineProperty(a._store, "validated", {
|
|
170
170
|
configurable: !1,
|
|
171
171
|
enumerable: !1,
|
|
@@ -188,50 +188,50 @@ function Lt() {
|
|
|
188
188
|
value: p
|
|
189
189
|
}), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
|
|
190
190
|
}
|
|
191
|
-
function
|
|
192
|
-
var
|
|
193
|
-
if (
|
|
194
|
-
if (
|
|
195
|
-
if (ue(
|
|
196
|
-
for (
|
|
197
|
-
j(
|
|
198
|
-
Object.freeze && Object.freeze(
|
|
191
|
+
function v(a, x, M, F, W, H, Q, p) {
|
|
192
|
+
var O = x.children;
|
|
193
|
+
if (O !== void 0)
|
|
194
|
+
if (F)
|
|
195
|
+
if (ue(O)) {
|
|
196
|
+
for (F = 0; F < O.length; F++)
|
|
197
|
+
j(O[F]);
|
|
198
|
+
Object.freeze && Object.freeze(O);
|
|
199
199
|
} else
|
|
200
200
|
console.error(
|
|
201
201
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
202
202
|
);
|
|
203
|
-
else j(
|
|
204
|
-
if (te.call(
|
|
205
|
-
|
|
206
|
-
var
|
|
203
|
+
else j(O);
|
|
204
|
+
if (te.call(x, "key")) {
|
|
205
|
+
O = e(a);
|
|
206
|
+
var K = Object.keys(x).filter(function(B) {
|
|
207
207
|
return B !== "key";
|
|
208
208
|
});
|
|
209
|
-
|
|
209
|
+
F = 0 < K.length ? "{key: someKey, " + K.join(": ..., ") + ": ...}" : "{key: someKey}", P[O + F] || (K = 0 < K.length ? "{" + K.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
210
210
|
`A props object containing a "key" prop is being spread into JSX:
|
|
211
211
|
let props = %s;
|
|
212
212
|
<%s {...props} />
|
|
213
213
|
React keys must be passed directly to JSX without using spread:
|
|
214
214
|
let props = %s;
|
|
215
215
|
<%s key={someKey} {...props} />`,
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
), P[
|
|
216
|
+
F,
|
|
217
|
+
O,
|
|
218
|
+
K,
|
|
219
|
+
O
|
|
220
|
+
), P[O + F] = !0);
|
|
221
221
|
}
|
|
222
|
-
if (
|
|
222
|
+
if (O = null, M !== void 0 && (r(M), O = "" + M), i(x) && (r(x.key), O = "" + x.key), "key" in x) {
|
|
223
223
|
M = {};
|
|
224
|
-
for (var
|
|
225
|
-
|
|
226
|
-
} else M =
|
|
227
|
-
return
|
|
224
|
+
for (var U in x)
|
|
225
|
+
U !== "key" && (M[U] = x[U]);
|
|
226
|
+
} else M = x;
|
|
227
|
+
return O && u(
|
|
228
228
|
M,
|
|
229
229
|
typeof a == "function" ? a.displayName || a.name || "Unknown" : a
|
|
230
230
|
), d(
|
|
231
231
|
a,
|
|
232
|
-
|
|
232
|
+
O,
|
|
233
233
|
H,
|
|
234
|
-
|
|
234
|
+
W,
|
|
235
235
|
s(),
|
|
236
236
|
M,
|
|
237
237
|
Q,
|
|
@@ -241,39 +241,39 @@ React keys must be passed directly to JSX without using spread:
|
|
|
241
241
|
function j(a) {
|
|
242
242
|
typeof a == "object" && a !== null && a.$$typeof === w && a._store && (a._store.validated = 1);
|
|
243
243
|
}
|
|
244
|
-
var
|
|
244
|
+
var g = _t, w = Symbol.for("react.transitional.element"), E = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), $ = Symbol.for("react.profiler"), k = Symbol.for("react.consumer"), z = Symbol.for("react.context"), N = Symbol.for("react.forward_ref"), Y = Symbol.for("react.suspense"), S = Symbol.for("react.suspense_list"), V = Symbol.for("react.memo"), I = Symbol.for("react.lazy"), R = Symbol.for("react.activity"), L = Symbol.for("react.client.reference"), C = g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, te = Object.prototype.hasOwnProperty, ue = Array.isArray, _ = console.createTask ? console.createTask : function() {
|
|
245
245
|
return null;
|
|
246
246
|
};
|
|
247
|
-
|
|
247
|
+
g = {
|
|
248
248
|
react_stack_bottom_frame: function(a) {
|
|
249
249
|
return a();
|
|
250
250
|
}
|
|
251
251
|
};
|
|
252
|
-
var T, h = {}, D =
|
|
253
|
-
|
|
252
|
+
var T, h = {}, D = g.react_stack_bottom_frame.bind(
|
|
253
|
+
g,
|
|
254
254
|
c
|
|
255
255
|
)(), y = _(n(c)), P = {};
|
|
256
|
-
Te.Fragment =
|
|
257
|
-
var H = 1e4 >
|
|
258
|
-
return
|
|
256
|
+
Te.Fragment = b, Te.jsx = function(a, x, M, F, W) {
|
|
257
|
+
var H = 1e4 > C.recentlyCreatedOwnerStacks++;
|
|
258
|
+
return v(
|
|
259
259
|
a,
|
|
260
|
-
|
|
260
|
+
x,
|
|
261
261
|
M,
|
|
262
262
|
!1,
|
|
263
|
-
|
|
264
|
-
|
|
263
|
+
F,
|
|
264
|
+
W,
|
|
265
265
|
H ? Error("react-stack-top-frame") : D,
|
|
266
266
|
H ? _(n(a)) : y
|
|
267
267
|
);
|
|
268
|
-
}, Te.jsxs = function(a,
|
|
269
|
-
var H = 1e4 >
|
|
270
|
-
return
|
|
268
|
+
}, Te.jsxs = function(a, x, M, F, W) {
|
|
269
|
+
var H = 1e4 > C.recentlyCreatedOwnerStacks++;
|
|
270
|
+
return v(
|
|
271
271
|
a,
|
|
272
|
-
|
|
272
|
+
x,
|
|
273
273
|
M,
|
|
274
274
|
!0,
|
|
275
|
-
|
|
276
|
-
|
|
275
|
+
F,
|
|
276
|
+
W,
|
|
277
277
|
H ? Error("react-stack-top-frame") : D,
|
|
278
278
|
H ? _(n(a)) : y
|
|
279
279
|
);
|
|
@@ -288,35 +288,35 @@ var l = zt();
|
|
|
288
288
|
function Yt(e, t) {
|
|
289
289
|
var r = se(!1), n = se(), s = se(e), c = A(function() {
|
|
290
290
|
return r.current;
|
|
291
|
-
}, []),
|
|
291
|
+
}, []), i = A(function() {
|
|
292
292
|
r.current = !1, n.current && clearTimeout(n.current), n.current = setTimeout(function() {
|
|
293
293
|
r.current = !0, s.current();
|
|
294
294
|
}, t);
|
|
295
295
|
}, [t]), u = A(function() {
|
|
296
296
|
r.current = null, n.current && clearTimeout(n.current);
|
|
297
297
|
}, []);
|
|
298
|
-
return
|
|
298
|
+
return oe(function() {
|
|
299
299
|
s.current = e;
|
|
300
|
-
}, [e]),
|
|
301
|
-
return
|
|
302
|
-
}, [t]), [c, u,
|
|
300
|
+
}, [e]), oe(function() {
|
|
301
|
+
return i(), u;
|
|
302
|
+
}, [t]), [c, u, i];
|
|
303
303
|
}
|
|
304
304
|
function bt(e, t, r) {
|
|
305
305
|
r === void 0 && (r = []);
|
|
306
|
-
var n = Yt(e, t), s = n[0], c = n[1],
|
|
307
|
-
return
|
|
306
|
+
var n = Yt(e, t), s = n[0], c = n[1], i = n[2];
|
|
307
|
+
return oe(i, r), [s, c];
|
|
308
308
|
}
|
|
309
|
-
function
|
|
309
|
+
function xt(e) {
|
|
310
310
|
var t, r, n = "";
|
|
311
311
|
if (typeof e == "string" || typeof e == "number") n += e;
|
|
312
312
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
313
313
|
var s = e.length;
|
|
314
|
-
for (t = 0; t < s; t++) e[t] && (r =
|
|
314
|
+
for (t = 0; t < s; t++) e[t] && (r = xt(e[t])) && (n && (n += " "), n += r);
|
|
315
315
|
} else for (r in e) e[r] && (n && (n += " "), n += r);
|
|
316
316
|
return n;
|
|
317
317
|
}
|
|
318
318
|
function $t() {
|
|
319
|
-
for (var e, t, r = 0, n = "", s = arguments.length; r < s; r++) (e = arguments[r]) && (t =
|
|
319
|
+
for (var e, t, r = 0, n = "", s = arguments.length; r < s; r++) (e = arguments[r]) && (t = xt(e)) && (n && (n += " "), n += t);
|
|
320
320
|
return n;
|
|
321
321
|
}
|
|
322
322
|
const Nt = "_row_550mo_1", ve = {
|
|
@@ -335,10 +335,10 @@ const Nt = "_row_550mo_1", ve = {
|
|
|
335
335
|
utcOffset: n,
|
|
336
336
|
selectedTimezone: s,
|
|
337
337
|
isBrowserTimezone: c = !1,
|
|
338
|
-
handleTimezoneMouseClick:
|
|
338
|
+
handleTimezoneMouseClick: i = void 0
|
|
339
339
|
}) => {
|
|
340
|
-
const { colorScheme: u } = Xe(),
|
|
341
|
-
c ||
|
|
340
|
+
const { colorScheme: u } = Xe(), o = ae("(max-width: 48em)"), d = () => {
|
|
341
|
+
c || i({
|
|
342
342
|
name: e,
|
|
343
343
|
longName: t,
|
|
344
344
|
utcOffset: n
|
|
@@ -355,7 +355,7 @@ const Nt = "_row_550mo_1", ve = {
|
|
|
355
355
|
),
|
|
356
356
|
onClick: d,
|
|
357
357
|
children: [
|
|
358
|
-
/* @__PURE__ */ l.jsxs(q, { justify: "space-between", gap: 8, wrap:
|
|
358
|
+
/* @__PURE__ */ l.jsxs(q, { justify: "space-between", gap: 8, wrap: o ? "wrap" : "nowrap", children: [
|
|
359
359
|
/* @__PURE__ */ l.jsx(J, { size: "sm", children: e }),
|
|
360
360
|
/* @__PURE__ */ l.jsxs(J, { size: "sm", children: [
|
|
361
361
|
r,
|
|
@@ -363,7 +363,7 @@ const Nt = "_row_550mo_1", ve = {
|
|
|
363
363
|
n
|
|
364
364
|
] })
|
|
365
365
|
] }),
|
|
366
|
-
/* @__PURE__ */ l.jsx(J, { size: "sm", c:
|
|
366
|
+
/* @__PURE__ */ l.jsx(J, { size: "sm", c: o ? "dimmed" : void 0, children: t })
|
|
367
367
|
]
|
|
368
368
|
}
|
|
369
369
|
);
|
|
@@ -374,7 +374,7 @@ const Nt = "_row_550mo_1", ve = {
|
|
|
374
374
|
* This source code is licensed under the MIT license.
|
|
375
375
|
* See the LICENSE file in the root directory of this source tree.
|
|
376
376
|
*/
|
|
377
|
-
var
|
|
377
|
+
var Ut = {
|
|
378
378
|
outline: {
|
|
379
379
|
xmlns: "http://www.w3.org/2000/svg",
|
|
380
380
|
width: 24,
|
|
@@ -403,13 +403,13 @@ var Kt = {
|
|
|
403
403
|
*/
|
|
404
404
|
const he = (e, t, r, n) => {
|
|
405
405
|
const s = Et(
|
|
406
|
-
({ color: c = "currentColor", size:
|
|
406
|
+
({ color: c = "currentColor", size: i = 24, stroke: u = 2, title: o, className: d, children: v, ...j }, g) => Le(
|
|
407
407
|
"svg",
|
|
408
408
|
{
|
|
409
|
-
ref:
|
|
410
|
-
...
|
|
411
|
-
width:
|
|
412
|
-
height:
|
|
409
|
+
ref: g,
|
|
410
|
+
...Ut[e],
|
|
411
|
+
width: i,
|
|
412
|
+
height: i,
|
|
413
413
|
className: ["tabler-icon", `tabler-icon-${t}`, d].join(" "),
|
|
414
414
|
...e === "filled" ? {
|
|
415
415
|
fill: c
|
|
@@ -420,9 +420,9 @@ const he = (e, t, r, n) => {
|
|
|
420
420
|
...j
|
|
421
421
|
},
|
|
422
422
|
[
|
|
423
|
-
|
|
423
|
+
o && Le("title", { key: "svg-title" }, o),
|
|
424
424
|
...n.map(([w, E]) => Le(w, E)),
|
|
425
|
-
...Array.isArray(
|
|
425
|
+
...Array.isArray(v) ? v : [v]
|
|
426
426
|
]
|
|
427
427
|
)
|
|
428
428
|
);
|
|
@@ -434,21 +434,21 @@ const he = (e, t, r, n) => {
|
|
|
434
434
|
* This source code is licensed under the MIT license.
|
|
435
435
|
* See the LICENSE file in the root directory of this source tree.
|
|
436
436
|
*/
|
|
437
|
-
const
|
|
437
|
+
const Kt = [["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" }]], He = he("outline", "calendar", "Calendar", Kt);
|
|
438
438
|
/**
|
|
439
439
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
440
440
|
*
|
|
441
441
|
* This source code is licensed under the MIT license.
|
|
442
442
|
* See the LICENSE file in the root directory of this source tree.
|
|
443
443
|
*/
|
|
444
|
-
const
|
|
444
|
+
const Wt = [["path", { d: "M9 6l6 6l-6 6", key: "svg-0" }]], Ye = he("outline", "chevron-right", "ChevronRight", Wt);
|
|
445
445
|
/**
|
|
446
446
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
447
447
|
*
|
|
448
448
|
* This source code is licensed under the MIT license.
|
|
449
449
|
* See the LICENSE file in the root directory of this source tree.
|
|
450
450
|
*/
|
|
451
|
-
const
|
|
451
|
+
const Rt = [["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" }]], Fe = he("outline", "clock", "Clock", Rt);
|
|
452
452
|
/**
|
|
453
453
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
454
454
|
*
|
|
@@ -478,13 +478,13 @@ const Jt = [["path", { d: "M16 2c.183 0 .355 .05 .502 .135l.033 .02c.28 .177 .46
|
|
|
478
478
|
onChange: (r) => t(r.currentTarget.value)
|
|
479
479
|
}
|
|
480
480
|
);
|
|
481
|
-
var Me = { exports: {} }, Qt = Me.exports,
|
|
481
|
+
var Me = { exports: {} }, Qt = Me.exports, it;
|
|
482
482
|
function er() {
|
|
483
|
-
return
|
|
483
|
+
return it || (it = 1, (function(e, t) {
|
|
484
484
|
(function(r, n) {
|
|
485
485
|
e.exports = n();
|
|
486
486
|
})(Qt, (function() {
|
|
487
|
-
var r = 1e3, n = 6e4, s = 36e5, c = "millisecond",
|
|
487
|
+
var r = 1e3, n = 6e4, s = 36e5, c = "millisecond", i = "second", u = "minute", o = "hour", d = "day", v = "week", j = "month", g = "quarter", w = "year", E = "date", b = "Invalid Date", m = /^(\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, k = { 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(_) {
|
|
488
488
|
var T = ["th", "st", "nd", "rd"], h = _ % 100;
|
|
489
489
|
return "[" + _ + (T[(h - 20) % 10] || T[h] || T[0]) + "]";
|
|
490
490
|
} }, z = function(_, T, h) {
|
|
@@ -500,14 +500,14 @@ function er() {
|
|
|
500
500
|
}, a: function(_) {
|
|
501
501
|
return _ < 0 ? Math.ceil(_) || 0 : Math.floor(_);
|
|
502
502
|
}, p: function(_) {
|
|
503
|
-
return { M: j, y: w, w:
|
|
503
|
+
return { M: j, y: w, w: v, d, D: E, h: o, m: u, s: i, ms: c, Q: g }[_] || String(_ || "").toLowerCase().replace(/s$/, "");
|
|
504
504
|
}, u: function(_) {
|
|
505
505
|
return _ === void 0;
|
|
506
506
|
} }, Y = "en", S = {};
|
|
507
|
-
S[Y] =
|
|
507
|
+
S[Y] = k;
|
|
508
508
|
var V = "$isDayjsObject", I = function(_) {
|
|
509
509
|
return _ instanceof te || !(!_ || !_[V]);
|
|
510
|
-
},
|
|
510
|
+
}, R = function _(T, h, D) {
|
|
511
511
|
var y;
|
|
512
512
|
if (!T) return Y;
|
|
513
513
|
if (typeof T == "string") {
|
|
@@ -516,34 +516,34 @@ function er() {
|
|
|
516
516
|
var a = T.split("-");
|
|
517
517
|
if (!y && a.length > 1) return _(a[0]);
|
|
518
518
|
} else {
|
|
519
|
-
var
|
|
520
|
-
S[
|
|
519
|
+
var x = T.name;
|
|
520
|
+
S[x] = T, y = x;
|
|
521
521
|
}
|
|
522
522
|
return !D && y && (Y = y), y || !D && Y;
|
|
523
523
|
}, L = function(_, T) {
|
|
524
524
|
if (I(_)) return _.clone();
|
|
525
525
|
var h = typeof T == "object" ? T : {};
|
|
526
526
|
return h.date = _, h.args = arguments, new te(h);
|
|
527
|
-
},
|
|
528
|
-
|
|
527
|
+
}, C = N;
|
|
528
|
+
C.l = R, C.i = I, C.w = function(_, T) {
|
|
529
529
|
return L(_, { locale: T.$L, utc: T.$u, x: T.$x, $offset: T.$offset });
|
|
530
530
|
};
|
|
531
531
|
var te = (function() {
|
|
532
532
|
function _(h) {
|
|
533
|
-
this.$L =
|
|
533
|
+
this.$L = R(h.locale, null, !0), this.parse(h), this.$x = this.$x || h.x || {}, this[V] = !0;
|
|
534
534
|
}
|
|
535
535
|
var T = _.prototype;
|
|
536
536
|
return T.parse = function(h) {
|
|
537
537
|
this.$d = (function(D) {
|
|
538
538
|
var y = D.date, P = D.utc;
|
|
539
539
|
if (y === null) return /* @__PURE__ */ new Date(NaN);
|
|
540
|
-
if (
|
|
540
|
+
if (C.u(y)) return /* @__PURE__ */ new Date();
|
|
541
541
|
if (y instanceof Date) return new Date(y);
|
|
542
542
|
if (typeof y == "string" && !/Z$/i.test(y)) {
|
|
543
543
|
var a = y.match(m);
|
|
544
544
|
if (a) {
|
|
545
|
-
var
|
|
546
|
-
return P ? new Date(Date.UTC(a[1],
|
|
545
|
+
var x = a[2] - 1 || 0, M = (a[7] || "0").substring(0, 3);
|
|
546
|
+
return P ? new Date(Date.UTC(a[1], x, a[3] || 1, a[4] || 0, a[5] || 0, a[6] || 0, M)) : new Date(a[1], x, a[3] || 1, a[4] || 0, a[5] || 0, a[6] || 0, M);
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
549
|
return new Date(y);
|
|
@@ -552,9 +552,9 @@ function er() {
|
|
|
552
552
|
var h = this.$d;
|
|
553
553
|
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();
|
|
554
554
|
}, T.$utils = function() {
|
|
555
|
-
return
|
|
555
|
+
return C;
|
|
556
556
|
}, T.isValid = function() {
|
|
557
|
-
return this.$d.toString() !==
|
|
557
|
+
return this.$d.toString() !== b;
|
|
558
558
|
}, T.isSame = function(h, D) {
|
|
559
559
|
var y = L(h);
|
|
560
560
|
return this.startOf(D) <= y && y <= this.endOf(D);
|
|
@@ -563,34 +563,34 @@ function er() {
|
|
|
563
563
|
}, T.isBefore = function(h, D) {
|
|
564
564
|
return this.endOf(D) < L(h);
|
|
565
565
|
}, T.$g = function(h, D, y) {
|
|
566
|
-
return
|
|
566
|
+
return C.u(h) ? this[D] : this.set(y, h);
|
|
567
567
|
}, T.unix = function() {
|
|
568
568
|
return Math.floor(this.valueOf() / 1e3);
|
|
569
569
|
}, T.valueOf = function() {
|
|
570
570
|
return this.$d.getTime();
|
|
571
571
|
}, T.startOf = function(h, D) {
|
|
572
|
-
var y = this, P = !!
|
|
573
|
-
var B =
|
|
572
|
+
var y = this, P = !!C.u(D) || D, a = C.p(h), x = function(K, U) {
|
|
573
|
+
var B = C.w(y.$u ? Date.UTC(y.$y, U, K) : new Date(y.$y, U, K), y);
|
|
574
574
|
return P ? B : B.endOf(d);
|
|
575
|
-
}, M = function(
|
|
576
|
-
return
|
|
577
|
-
},
|
|
575
|
+
}, M = function(K, U) {
|
|
576
|
+
return C.w(y.toDate()[K].apply(y.toDate("s"), (P ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(U)), y);
|
|
577
|
+
}, F = this.$W, W = this.$M, H = this.$D, Q = "set" + (this.$u ? "UTC" : "");
|
|
578
578
|
switch (a) {
|
|
579
579
|
case w:
|
|
580
|
-
return P ?
|
|
580
|
+
return P ? x(1, 0) : x(31, 11);
|
|
581
581
|
case j:
|
|
582
|
-
return P ?
|
|
583
|
-
case
|
|
584
|
-
var p = this.$locale().weekStart || 0,
|
|
585
|
-
return
|
|
582
|
+
return P ? x(1, W) : x(0, W + 1);
|
|
583
|
+
case v:
|
|
584
|
+
var p = this.$locale().weekStart || 0, O = (F < p ? F + 7 : F) - p;
|
|
585
|
+
return x(P ? H - O : H + (6 - O), W);
|
|
586
586
|
case d:
|
|
587
587
|
case E:
|
|
588
588
|
return M(Q + "Hours", 0);
|
|
589
|
-
case
|
|
589
|
+
case o:
|
|
590
590
|
return M(Q + "Minutes", 1);
|
|
591
591
|
case u:
|
|
592
592
|
return M(Q + "Seconds", 2);
|
|
593
|
-
case
|
|
593
|
+
case i:
|
|
594
594
|
return M(Q + "Milliseconds", 3);
|
|
595
595
|
default:
|
|
596
596
|
return this.clone();
|
|
@@ -598,142 +598,142 @@ function er() {
|
|
|
598
598
|
}, T.endOf = function(h) {
|
|
599
599
|
return this.startOf(h, !1);
|
|
600
600
|
}, T.$set = function(h, D) {
|
|
601
|
-
var y, P =
|
|
601
|
+
var y, P = C.p(h), a = "set" + (this.$u ? "UTC" : ""), x = (y = {}, y[d] = a + "Date", y[E] = a + "Date", y[j] = a + "Month", y[w] = a + "FullYear", y[o] = a + "Hours", y[u] = a + "Minutes", y[i] = a + "Seconds", y[c] = a + "Milliseconds", y)[P], M = P === d ? this.$D + (D - this.$W) : D;
|
|
602
602
|
if (P === j || P === w) {
|
|
603
|
-
var
|
|
604
|
-
|
|
605
|
-
} else
|
|
603
|
+
var F = this.clone().set(E, 1);
|
|
604
|
+
F.$d[x](M), F.init(), this.$d = F.set(E, Math.min(this.$D, F.daysInMonth())).$d;
|
|
605
|
+
} else x && this.$d[x](M);
|
|
606
606
|
return this.init(), this;
|
|
607
607
|
}, T.set = function(h, D) {
|
|
608
608
|
return this.clone().$set(h, D);
|
|
609
609
|
}, T.get = function(h) {
|
|
610
|
-
return this[
|
|
610
|
+
return this[C.p(h)]();
|
|
611
611
|
}, T.add = function(h, D) {
|
|
612
612
|
var y, P = this;
|
|
613
613
|
h = Number(h);
|
|
614
|
-
var a =
|
|
614
|
+
var a = C.p(D), x = function(W) {
|
|
615
615
|
var H = L(P);
|
|
616
|
-
return
|
|
616
|
+
return C.w(H.date(H.date() + Math.round(W * h)), P);
|
|
617
617
|
};
|
|
618
618
|
if (a === j) return this.set(j, this.$M + h);
|
|
619
619
|
if (a === w) return this.set(w, this.$y + h);
|
|
620
|
-
if (a === d) return
|
|
621
|
-
if (a ===
|
|
622
|
-
var M = (y = {}, y[u] = n, y[
|
|
623
|
-
return
|
|
620
|
+
if (a === d) return x(1);
|
|
621
|
+
if (a === v) return x(7);
|
|
622
|
+
var M = (y = {}, y[u] = n, y[o] = s, y[i] = r, y)[a] || 1, F = this.$d.getTime() + h * M;
|
|
623
|
+
return C.w(F, this);
|
|
624
624
|
}, T.subtract = function(h, D) {
|
|
625
625
|
return this.add(-1 * h, D);
|
|
626
626
|
}, T.format = function(h) {
|
|
627
627
|
var D = this, y = this.$locale();
|
|
628
|
-
if (!this.isValid()) return y.invalidDate ||
|
|
629
|
-
var P = h || "YYYY-MM-DDTHH:mm:ssZ", a =
|
|
630
|
-
return
|
|
631
|
-
},
|
|
632
|
-
return
|
|
633
|
-
},
|
|
634
|
-
var X =
|
|
628
|
+
if (!this.isValid()) return y.invalidDate || b;
|
|
629
|
+
var P = h || "YYYY-MM-DDTHH:mm:ssZ", a = C.z(this), x = this.$H, M = this.$m, F = this.$M, W = y.weekdays, H = y.months, Q = y.meridiem, p = function(U, B, ne, X) {
|
|
630
|
+
return U && (U[B] || U(D, P)) || ne[B].slice(0, X);
|
|
631
|
+
}, O = function(U) {
|
|
632
|
+
return C.s(x % 12 || 12, U, "0");
|
|
633
|
+
}, K = Q || function(U, B, ne) {
|
|
634
|
+
var X = U < 12 ? "AM" : "PM";
|
|
635
635
|
return ne ? X.toLowerCase() : X;
|
|
636
636
|
};
|
|
637
|
-
return P.replace($, (function(
|
|
637
|
+
return P.replace($, (function(U, B) {
|
|
638
638
|
return B || (function(ne) {
|
|
639
639
|
switch (ne) {
|
|
640
640
|
case "YY":
|
|
641
641
|
return String(D.$y).slice(-2);
|
|
642
642
|
case "YYYY":
|
|
643
|
-
return
|
|
643
|
+
return C.s(D.$y, 4, "0");
|
|
644
644
|
case "M":
|
|
645
|
-
return
|
|
645
|
+
return F + 1;
|
|
646
646
|
case "MM":
|
|
647
|
-
return
|
|
647
|
+
return C.s(F + 1, 2, "0");
|
|
648
648
|
case "MMM":
|
|
649
|
-
return p(y.monthsShort,
|
|
649
|
+
return p(y.monthsShort, F, H, 3);
|
|
650
650
|
case "MMMM":
|
|
651
|
-
return p(H,
|
|
651
|
+
return p(H, F);
|
|
652
652
|
case "D":
|
|
653
653
|
return D.$D;
|
|
654
654
|
case "DD":
|
|
655
|
-
return
|
|
655
|
+
return C.s(D.$D, 2, "0");
|
|
656
656
|
case "d":
|
|
657
657
|
return String(D.$W);
|
|
658
658
|
case "dd":
|
|
659
|
-
return p(y.weekdaysMin, D.$W,
|
|
659
|
+
return p(y.weekdaysMin, D.$W, W, 2);
|
|
660
660
|
case "ddd":
|
|
661
|
-
return p(y.weekdaysShort, D.$W,
|
|
661
|
+
return p(y.weekdaysShort, D.$W, W, 3);
|
|
662
662
|
case "dddd":
|
|
663
|
-
return
|
|
663
|
+
return W[D.$W];
|
|
664
664
|
case "H":
|
|
665
|
-
return String(
|
|
665
|
+
return String(x);
|
|
666
666
|
case "HH":
|
|
667
|
-
return
|
|
667
|
+
return C.s(x, 2, "0");
|
|
668
668
|
case "h":
|
|
669
|
-
return
|
|
669
|
+
return O(1);
|
|
670
670
|
case "hh":
|
|
671
|
-
return
|
|
671
|
+
return O(2);
|
|
672
672
|
case "a":
|
|
673
|
-
return
|
|
673
|
+
return K(x, M, !0);
|
|
674
674
|
case "A":
|
|
675
|
-
return
|
|
675
|
+
return K(x, M, !1);
|
|
676
676
|
case "m":
|
|
677
677
|
return String(M);
|
|
678
678
|
case "mm":
|
|
679
|
-
return
|
|
679
|
+
return C.s(M, 2, "0");
|
|
680
680
|
case "s":
|
|
681
681
|
return String(D.$s);
|
|
682
682
|
case "ss":
|
|
683
|
-
return
|
|
683
|
+
return C.s(D.$s, 2, "0");
|
|
684
684
|
case "SSS":
|
|
685
|
-
return
|
|
685
|
+
return C.s(D.$ms, 3, "0");
|
|
686
686
|
case "Z":
|
|
687
687
|
return a;
|
|
688
688
|
}
|
|
689
689
|
return null;
|
|
690
|
-
})(
|
|
690
|
+
})(U) || a.replace(":", "");
|
|
691
691
|
}));
|
|
692
692
|
}, T.utcOffset = function() {
|
|
693
693
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
694
694
|
}, T.diff = function(h, D, y) {
|
|
695
|
-
var P, a = this,
|
|
696
|
-
return
|
|
695
|
+
var P, a = this, x = C.p(D), M = L(h), F = (M.utcOffset() - this.utcOffset()) * n, W = this - M, H = function() {
|
|
696
|
+
return C.m(a, M);
|
|
697
697
|
};
|
|
698
|
-
switch (
|
|
698
|
+
switch (x) {
|
|
699
699
|
case w:
|
|
700
700
|
P = H() / 12;
|
|
701
701
|
break;
|
|
702
702
|
case j:
|
|
703
703
|
P = H();
|
|
704
704
|
break;
|
|
705
|
-
case
|
|
705
|
+
case g:
|
|
706
706
|
P = H() / 3;
|
|
707
707
|
break;
|
|
708
|
-
case
|
|
709
|
-
P = (
|
|
708
|
+
case v:
|
|
709
|
+
P = (W - F) / 6048e5;
|
|
710
710
|
break;
|
|
711
711
|
case d:
|
|
712
|
-
P = (
|
|
712
|
+
P = (W - F) / 864e5;
|
|
713
713
|
break;
|
|
714
|
-
case
|
|
715
|
-
P =
|
|
714
|
+
case o:
|
|
715
|
+
P = W / s;
|
|
716
716
|
break;
|
|
717
717
|
case u:
|
|
718
|
-
P =
|
|
718
|
+
P = W / n;
|
|
719
719
|
break;
|
|
720
|
-
case
|
|
721
|
-
P =
|
|
720
|
+
case i:
|
|
721
|
+
P = W / r;
|
|
722
722
|
break;
|
|
723
723
|
default:
|
|
724
|
-
P =
|
|
724
|
+
P = W;
|
|
725
725
|
}
|
|
726
|
-
return y ? P :
|
|
726
|
+
return y ? P : C.a(P);
|
|
727
727
|
}, T.daysInMonth = function() {
|
|
728
728
|
return this.endOf(j).$D;
|
|
729
729
|
}, T.$locale = function() {
|
|
730
730
|
return S[this.$L];
|
|
731
731
|
}, T.locale = function(h, D) {
|
|
732
732
|
if (!h) return this.$L;
|
|
733
|
-
var y = this.clone(), P =
|
|
733
|
+
var y = this.clone(), P = R(h, D, !0);
|
|
734
734
|
return P && (y.$L = P), y;
|
|
735
735
|
}, T.clone = function() {
|
|
736
|
-
return
|
|
736
|
+
return C.w(this.$d, this);
|
|
737
737
|
}, T.toDate = function() {
|
|
738
738
|
return new Date(this.valueOf());
|
|
739
739
|
}, T.toJSON = function() {
|
|
@@ -744,13 +744,13 @@ function er() {
|
|
|
744
744
|
return this.$d.toUTCString();
|
|
745
745
|
}, _;
|
|
746
746
|
})(), ue = te.prototype;
|
|
747
|
-
return L.prototype = ue, [["$ms", c], ["$s",
|
|
747
|
+
return L.prototype = ue, [["$ms", c], ["$s", i], ["$m", u], ["$H", o], ["$W", d], ["$M", j], ["$y", w], ["$D", E]].forEach((function(_) {
|
|
748
748
|
ue[_[1]] = function(T) {
|
|
749
749
|
return this.$g(T, _[0], _[1]);
|
|
750
750
|
};
|
|
751
751
|
})), L.extend = function(_, T) {
|
|
752
752
|
return _.$i || (_(T, te, L), _.$i = !0), L;
|
|
753
|
-
}, L.locale =
|
|
753
|
+
}, L.locale = R, L.isDayjs = I, L.unix = function(_) {
|
|
754
754
|
return L(1e3 * _);
|
|
755
755
|
}, L.en = S[Y], L.Ls = S, L.p = {}, L;
|
|
756
756
|
}));
|
|
@@ -758,141 +758,141 @@ function er() {
|
|
|
758
758
|
}
|
|
759
759
|
var tr = er();
|
|
760
760
|
const f = /* @__PURE__ */ Ie(tr);
|
|
761
|
-
var Pe = { exports: {} }, rr = Pe.exports,
|
|
761
|
+
var Pe = { exports: {} }, rr = Pe.exports, ot;
|
|
762
762
|
function nr() {
|
|
763
|
-
return
|
|
763
|
+
return ot || (ot = 1, (function(e, t) {
|
|
764
764
|
(function(r, n) {
|
|
765
765
|
e.exports = n();
|
|
766
766
|
})(rr, (function() {
|
|
767
767
|
var r = "minute", n = /[+-]\d\d(?::?\d\d)?/g, s = /([+-]|\d\d)/g;
|
|
768
|
-
return function(c,
|
|
769
|
-
var
|
|
770
|
-
u.utc = function(
|
|
771
|
-
var m = { date:
|
|
772
|
-
return new
|
|
773
|
-
},
|
|
768
|
+
return function(c, i, u) {
|
|
769
|
+
var o = i.prototype;
|
|
770
|
+
u.utc = function(b) {
|
|
771
|
+
var m = { date: b, utc: !0, args: arguments };
|
|
772
|
+
return new i(m);
|
|
773
|
+
}, o.utc = function(b) {
|
|
774
774
|
var m = u(this.toDate(), { locale: this.$L, utc: !0 });
|
|
775
|
-
return
|
|
776
|
-
},
|
|
775
|
+
return b ? m.add(this.utcOffset(), r) : m;
|
|
776
|
+
}, o.local = function() {
|
|
777
777
|
return u(this.toDate(), { locale: this.$L, utc: !1 });
|
|
778
778
|
};
|
|
779
|
-
var d =
|
|
780
|
-
|
|
781
|
-
|
|
779
|
+
var d = o.parse;
|
|
780
|
+
o.parse = function(b) {
|
|
781
|
+
b.utc && (this.$u = !0), this.$utils().u(b.$offset) || (this.$offset = b.$offset), d.call(this, b);
|
|
782
782
|
};
|
|
783
|
-
var
|
|
784
|
-
|
|
783
|
+
var v = o.init;
|
|
784
|
+
o.init = function() {
|
|
785
785
|
if (this.$u) {
|
|
786
|
-
var
|
|
787
|
-
this.$y =
|
|
788
|
-
} else
|
|
786
|
+
var b = this.$d;
|
|
787
|
+
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();
|
|
788
|
+
} else v.call(this);
|
|
789
789
|
};
|
|
790
|
-
var j =
|
|
791
|
-
|
|
790
|
+
var j = o.utcOffset;
|
|
791
|
+
o.utcOffset = function(b, m) {
|
|
792
792
|
var $ = this.$utils().u;
|
|
793
|
-
if ($(
|
|
794
|
-
if (typeof
|
|
793
|
+
if ($(b)) return this.$u ? 0 : $(this.$offset) ? j.call(this) : this.$offset;
|
|
794
|
+
if (typeof b == "string" && (b = (function(Y) {
|
|
795
795
|
Y === void 0 && (Y = "");
|
|
796
796
|
var S = Y.match(n);
|
|
797
797
|
if (!S) return null;
|
|
798
|
-
var V = ("" + S[0]).match(s) || ["-", 0, 0], I = V[0],
|
|
799
|
-
return
|
|
800
|
-
})(
|
|
801
|
-
var
|
|
802
|
-
if (
|
|
798
|
+
var V = ("" + S[0]).match(s) || ["-", 0, 0], I = V[0], R = 60 * +V[1] + +V[2];
|
|
799
|
+
return R === 0 ? 0 : I === "+" ? R : -R;
|
|
800
|
+
})(b), b === null)) return this;
|
|
801
|
+
var k = Math.abs(b) <= 16 ? 60 * b : b;
|
|
802
|
+
if (k === 0) return this.utc(m);
|
|
803
803
|
var z = this.clone();
|
|
804
|
-
if (m) return z.$offset =
|
|
804
|
+
if (m) return z.$offset = k, z.$u = !1, z;
|
|
805
805
|
var N = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
|
|
806
|
-
return (z = this.local().add(
|
|
806
|
+
return (z = this.local().add(k + N, r)).$offset = k, z.$x.$localOffset = N, z;
|
|
807
807
|
};
|
|
808
|
-
var
|
|
809
|
-
|
|
810
|
-
var m =
|
|
811
|
-
return
|
|
812
|
-
},
|
|
813
|
-
var
|
|
814
|
-
return this.$d.valueOf() - 6e4 *
|
|
815
|
-
},
|
|
808
|
+
var g = o.format;
|
|
809
|
+
o.format = function(b) {
|
|
810
|
+
var m = b || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
|
|
811
|
+
return g.call(this, m);
|
|
812
|
+
}, o.valueOf = function() {
|
|
813
|
+
var b = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
|
|
814
|
+
return this.$d.valueOf() - 6e4 * b;
|
|
815
|
+
}, o.isUTC = function() {
|
|
816
816
|
return !!this.$u;
|
|
817
|
-
},
|
|
817
|
+
}, o.toISOString = function() {
|
|
818
818
|
return this.toDate().toISOString();
|
|
819
|
-
},
|
|
819
|
+
}, o.toString = function() {
|
|
820
820
|
return this.toDate().toUTCString();
|
|
821
821
|
};
|
|
822
|
-
var w =
|
|
823
|
-
|
|
824
|
-
return
|
|
822
|
+
var w = o.toDate;
|
|
823
|
+
o.toDate = function(b) {
|
|
824
|
+
return b === "s" && this.$offset ? u(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : w.call(this);
|
|
825
825
|
};
|
|
826
|
-
var E =
|
|
827
|
-
|
|
828
|
-
if (
|
|
829
|
-
var
|
|
830
|
-
return E.call(
|
|
826
|
+
var E = o.diff;
|
|
827
|
+
o.diff = function(b, m, $) {
|
|
828
|
+
if (b && this.$u === b.$u) return E.call(this, b, m, $);
|
|
829
|
+
var k = this.local(), z = u(b).local();
|
|
830
|
+
return E.call(k, z, m, $);
|
|
831
831
|
};
|
|
832
832
|
};
|
|
833
833
|
}));
|
|
834
834
|
})(Pe)), Pe.exports;
|
|
835
835
|
}
|
|
836
836
|
var sr = nr();
|
|
837
|
-
const
|
|
838
|
-
var Ae = { exports: {} },
|
|
837
|
+
const ir = /* @__PURE__ */ Ie(sr);
|
|
838
|
+
var Ae = { exports: {} }, or = Ae.exports, at;
|
|
839
839
|
function ar() {
|
|
840
840
|
return at || (at = 1, (function(e, t) {
|
|
841
841
|
(function(r, n) {
|
|
842
842
|
e.exports = n();
|
|
843
|
-
})(
|
|
843
|
+
})(or, (function() {
|
|
844
844
|
var r = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, n = {};
|
|
845
|
-
return function(s, c,
|
|
846
|
-
var u,
|
|
845
|
+
return function(s, c, i) {
|
|
846
|
+
var u, o = function(g, w, E) {
|
|
847
847
|
E === void 0 && (E = {});
|
|
848
|
-
var
|
|
849
|
-
|
|
850
|
-
var z =
|
|
848
|
+
var b = new Date(g), m = (function($, k) {
|
|
849
|
+
k === void 0 && (k = {});
|
|
850
|
+
var z = k.timeZoneName || "short", N = $ + "|" + z, Y = n[N];
|
|
851
851
|
return Y || (Y = 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: z }), n[N] = Y), Y;
|
|
852
852
|
})(w, E);
|
|
853
|
-
return m.formatToParts(
|
|
854
|
-
}, d = function(
|
|
855
|
-
for (var E =
|
|
856
|
-
var $ = E[m],
|
|
857
|
-
N >= 0 && (
|
|
853
|
+
return m.formatToParts(b);
|
|
854
|
+
}, d = function(g, w) {
|
|
855
|
+
for (var E = o(g, w), b = [], m = 0; m < E.length; m += 1) {
|
|
856
|
+
var $ = E[m], k = $.type, z = $.value, N = r[k];
|
|
857
|
+
N >= 0 && (b[N] = parseInt(z, 10));
|
|
858
858
|
}
|
|
859
|
-
var Y =
|
|
860
|
-
return (
|
|
861
|
-
},
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
var E,
|
|
859
|
+
var Y = b[3], S = Y === 24 ? 0 : Y, V = b[0] + "-" + b[1] + "-" + b[2] + " " + S + ":" + b[4] + ":" + b[5] + ":000", I = +g;
|
|
860
|
+
return (i.utc(V).valueOf() - (I -= I % 1e3)) / 6e4;
|
|
861
|
+
}, v = c.prototype;
|
|
862
|
+
v.tz = function(g, w) {
|
|
863
|
+
g === void 0 && (g = u);
|
|
864
|
+
var E, b = this.utcOffset(), m = this.toDate(), $ = m.toLocaleString("en-US", { timeZone: g }), k = Math.round((m - new Date($)) / 1e3 / 60), z = 15 * -Math.round(m.getTimezoneOffset() / 15) - k;
|
|
865
865
|
if (!Number(z)) E = this.utcOffset(0, w);
|
|
866
|
-
else if (E =
|
|
866
|
+
else if (E = i($, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(z, !0), w) {
|
|
867
867
|
var N = E.utcOffset();
|
|
868
|
-
E = E.add(
|
|
868
|
+
E = E.add(b - N, "minute");
|
|
869
869
|
}
|
|
870
|
-
return E.$x.$timezone =
|
|
871
|
-
},
|
|
872
|
-
var w = this.$x.$timezone ||
|
|
873
|
-
return
|
|
870
|
+
return E.$x.$timezone = g, E;
|
|
871
|
+
}, v.offsetName = function(g) {
|
|
872
|
+
var w = this.$x.$timezone || i.tz.guess(), E = o(this.valueOf(), w, { timeZoneName: g }).find((function(b) {
|
|
873
|
+
return b.type.toLowerCase() === "timezonename";
|
|
874
874
|
}));
|
|
875
875
|
return E && E.value;
|
|
876
876
|
};
|
|
877
|
-
var j =
|
|
878
|
-
|
|
879
|
-
if (!this.$x || !this.$x.$timezone) return j.call(this,
|
|
880
|
-
var E =
|
|
881
|
-
return j.call(E,
|
|
882
|
-
},
|
|
883
|
-
var
|
|
884
|
-
if (typeof
|
|
885
|
-
var
|
|
886
|
-
var
|
|
887
|
-
if (V === L) return [
|
|
888
|
-
var
|
|
889
|
-
return L ===
|
|
890
|
-
})(
|
|
877
|
+
var j = v.startOf;
|
|
878
|
+
v.startOf = function(g, w) {
|
|
879
|
+
if (!this.$x || !this.$x.$timezone) return j.call(this, g, w);
|
|
880
|
+
var E = i(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
|
|
881
|
+
return j.call(E, g, w).tz(this.$x.$timezone, !0);
|
|
882
|
+
}, i.tz = function(g, w, E) {
|
|
883
|
+
var b = E && w, m = E || w || u, $ = d(+i(), m);
|
|
884
|
+
if (typeof g != "string") return i(g).tz(m);
|
|
885
|
+
var k = (function(S, V, I) {
|
|
886
|
+
var R = S - 60 * V * 1e3, L = d(R, I);
|
|
887
|
+
if (V === L) return [R, V];
|
|
888
|
+
var C = d(R -= 60 * (L - V) * 1e3, I);
|
|
889
|
+
return L === C ? [R, L] : [S - 60 * Math.min(L, C) * 1e3, Math.max(L, C)];
|
|
890
|
+
})(i.utc(g, b).valueOf(), $, m), z = k[0], N = k[1], Y = i(z).utcOffset(N);
|
|
891
891
|
return Y.$x.$timezone = m, Y;
|
|
892
|
-
},
|
|
892
|
+
}, i.tz.guess = function() {
|
|
893
893
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
894
|
-
},
|
|
895
|
-
u =
|
|
894
|
+
}, i.tz.setDefault = function(g) {
|
|
895
|
+
u = g;
|
|
896
896
|
};
|
|
897
897
|
};
|
|
898
898
|
}));
|
|
@@ -906,33 +906,33 @@ const ur = /* @__PURE__ */ Ie(cr), lr = (e, t = "en-US") => new Intl.DateTimeFor
|
|
|
906
906
|
const t = e[0] === "-" ? -1 : 1, [r, n] = e.slice(1).split(":").map(Number);
|
|
907
907
|
return t * (r * 60 + n);
|
|
908
908
|
};
|
|
909
|
-
f.extend(
|
|
909
|
+
f.extend(ir);
|
|
910
910
|
f.extend(ur);
|
|
911
|
-
const fr = () =>
|
|
912
|
-
const
|
|
911
|
+
const fr = (e) => {
|
|
912
|
+
const t = f().tz(e).format("Z");
|
|
913
913
|
return {
|
|
914
|
-
name:
|
|
915
|
-
longName: lr(
|
|
916
|
-
currentTime: f().tz(
|
|
917
|
-
utcOffset:
|
|
918
|
-
offsetMinutes: dr(
|
|
914
|
+
name: e,
|
|
915
|
+
longName: lr(e),
|
|
916
|
+
currentTime: f().tz(e).format("h:mm A"),
|
|
917
|
+
utcOffset: t,
|
|
918
|
+
offsetMinutes: dr(t)
|
|
919
919
|
};
|
|
920
|
-
}).sort((t, r) => t.offsetMinutes - r.offsetMinutes), _e = {
|
|
920
|
+
}, mr = () => ["UTC", ...Intl.supportedValuesOf("timeZone")].filter((t, r, n) => n.indexOf(t) === r).map((t) => fr(t)).sort((t, r) => t.name === "UTC" ? -1 : r.name === "UTC" ? 1 : t.offsetMinutes - r.offsetMinutes), _e = {
|
|
921
921
|
"timezone-panel-container": "_timezone-panel-container_tykz4_1",
|
|
922
922
|
"search-container": "_search-container_tykz4_6",
|
|
923
923
|
"timezone-scroll-area": "_timezone-scroll-area_tykz4_15",
|
|
924
924
|
"list-container": "_list-container_tykz4_21"
|
|
925
925
|
}, Qe = {
|
|
926
926
|
"form-container": "_form-container_1xxf4_1"
|
|
927
|
-
},
|
|
928
|
-
const e =
|
|
927
|
+
}, gt = kt(void 0), ye = () => {
|
|
928
|
+
const e = Ot(gt);
|
|
929
929
|
if (!e) throw new Error("usePopoverContext must be used within a PopoverProvider");
|
|
930
930
|
return e;
|
|
931
|
-
},
|
|
931
|
+
}, hr = ({ children: e }) => {
|
|
932
932
|
const [t, r] = ee(!1), n = () => {
|
|
933
933
|
r(!1);
|
|
934
934
|
};
|
|
935
|
-
return /* @__PURE__ */ l.jsx(
|
|
935
|
+
return /* @__PURE__ */ l.jsx(gt.Provider, { value: { popoverOpened: t, setPopoverOpened: r, closePopover: n }, children: e });
|
|
936
936
|
}, et = () => {
|
|
937
937
|
const { theme: e } = Xe(), { closePopover: t } = ye(), r = ae("(max-width: 48em)"), n = ae("(max-width: 64em)");
|
|
938
938
|
return /* @__PURE__ */ l.jsx(q, { justify: "flex-end", mt: 12, pb: 12, children: /* @__PURE__ */ l.jsxs(
|
|
@@ -943,7 +943,7 @@ const fr = () => Intl.supportedValuesOf("timeZone").map((t) => {
|
|
|
943
943
|
w: n ? "100%" : void 0,
|
|
944
944
|
children: [
|
|
945
945
|
/* @__PURE__ */ l.jsx(
|
|
946
|
-
|
|
946
|
+
Ce,
|
|
947
947
|
{
|
|
948
948
|
size: "xs",
|
|
949
949
|
variant: "subtle",
|
|
@@ -953,12 +953,12 @@ const fr = () => Intl.supportedValuesOf("timeZone").map((t) => {
|
|
|
953
953
|
children: "Cancel"
|
|
954
954
|
}
|
|
955
955
|
),
|
|
956
|
-
/* @__PURE__ */ l.jsx(
|
|
956
|
+
/* @__PURE__ */ l.jsx(Ce, { type: "submit", size: "xs", color: e.primaryColor, fullWidth: n, children: "Apply" })
|
|
957
957
|
]
|
|
958
958
|
}
|
|
959
959
|
) });
|
|
960
|
-
}, re = "YYYY/MM/DD", me = "HH:mm:ss", qe = (e) => e.timezone.name ? f().tz(e.timezone.name).format(me) : f().format(me), St = (e) => e.timezone.name ? f().tz(e.timezone.name).format(re) : f().format(re),
|
|
961
|
-
const r = e.startDate ? f(e.startDate) : null, n = e.endDate ? f(e.endDate) : null, s =
|
|
960
|
+
}, re = "YYYY/MM/DD", me = "HH:mm:ss", qe = (e) => e.timezone.name ? f().tz(e.timezone.name).format(me) : f().format(me), St = (e) => e.timezone.name ? f().tz(e.timezone.name).format(re) : f().format(re), yr = (e) => f().add(e, "day").format(re), pr = (e) => e && f().tz(e).format("Z"), Ne = (e, t = "desktop") => {
|
|
961
|
+
const r = e.startDate ? f(e.startDate) : null, n = e.endDate ? f(e.endDate) : null, s = pr(e.timezone.name);
|
|
962
962
|
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(re)} ${e.startTime} - ${n.format(re)} ${e.endTime}${s ? ` (${s})` : ""}`;
|
|
963
963
|
}, le = (e, t, r, n) => {
|
|
964
964
|
const s = f(`${e} ${t}`).subtract(r, n);
|
|
@@ -972,12 +972,12 @@ const fr = () => Intl.supportedValuesOf("timeZone").map((t) => {
|
|
|
972
972
|
date: s.format(re),
|
|
973
973
|
time: s.format(me)
|
|
974
974
|
};
|
|
975
|
-
},
|
|
975
|
+
}, ge = (e, t, r) => f.tz(`${e} ${t}`, `${re} ${me}`, r).utc().toISOString(), Se = (e, t) => {
|
|
976
976
|
const r = f.utc(e).tz(t);
|
|
977
977
|
return { date: r.format(re), time: r.format(me) };
|
|
978
|
-
},
|
|
979
|
-
const [t, r] = ee(e.timezone), [n, s] = ee([]), [c,
|
|
980
|
-
|
|
978
|
+
}, Tr = ({ tzRange: e }) => {
|
|
979
|
+
const [t, r] = ee(e.timezone), [n, s] = ee([]), [c, i] = ee(""), u = ae("(max-width: 64em)"), { closePopover: o } = ye(), d = Ke(() => mr(), []);
|
|
980
|
+
oe(() => {
|
|
981
981
|
s(d);
|
|
982
982
|
}, []), bt(
|
|
983
983
|
() => {
|
|
@@ -994,12 +994,12 @@ const fr = () => Intl.supportedValuesOf("timeZone").map((t) => {
|
|
|
994
994
|
250,
|
|
995
995
|
[c]
|
|
996
996
|
);
|
|
997
|
-
const
|
|
997
|
+
const v = (w) => {
|
|
998
998
|
r(w);
|
|
999
999
|
}, j = (w) => {
|
|
1000
1000
|
if (w.preventDefault(), !t?.name || !e.timezone.name || !e.startDate || !e.startTime || !e.endDate || !e.endTime)
|
|
1001
1001
|
return;
|
|
1002
|
-
const E =
|
|
1002
|
+
const E = ge(e.startDate, e.startTime, e.timezone.name), b = ge(e.endDate, e.endTime, e.timezone.name), m = Se(E, t.name), $ = Se(b, t.name);
|
|
1003
1003
|
e.onApply({
|
|
1004
1004
|
startDate: m.date,
|
|
1005
1005
|
startTime: m.time,
|
|
@@ -1010,12 +1010,12 @@ const fr = () => Intl.supportedValuesOf("timeZone").map((t) => {
|
|
|
1010
1010
|
longName: null,
|
|
1011
1011
|
utcOffset: null
|
|
1012
1012
|
}
|
|
1013
|
-
}), u &&
|
|
1014
|
-
},
|
|
1013
|
+
}), u && o();
|
|
1014
|
+
}, g = (w) => w ? f().tz(w).format("h:mm A") : "";
|
|
1015
1015
|
return /* @__PURE__ */ l.jsxs("form", { className: Qe["form-container"], onSubmit: j, children: [
|
|
1016
1016
|
/* @__PURE__ */ l.jsxs(q, { direction: "column", className: _e["timezone-panel-container"], children: [
|
|
1017
|
-
/* @__PURE__ */ l.jsx(
|
|
1018
|
-
/* @__PURE__ */ l.jsxs(
|
|
1017
|
+
/* @__PURE__ */ l.jsx(ie, { className: _e["search-container"], children: /* @__PURE__ */ l.jsx(Xt, { searchText: c, setSearchText: i }) }),
|
|
1018
|
+
/* @__PURE__ */ l.jsxs(ie, { className: _e["timezone-scroll-area"], children: [
|
|
1019
1019
|
/* @__PURE__ */ l.jsx(J, { fw: 600, px: 12, children: "My Location" }),
|
|
1020
1020
|
/* @__PURE__ */ l.jsx(q, { direction: "column", children: /* @__PURE__ */ l.jsx(
|
|
1021
1021
|
st,
|
|
@@ -1023,7 +1023,7 @@ const fr = () => Intl.supportedValuesOf("timeZone").map((t) => {
|
|
|
1023
1023
|
isBrowserTimezone: !0,
|
|
1024
1024
|
name: e.timezone?.name,
|
|
1025
1025
|
longName: e.timezone?.longName,
|
|
1026
|
-
currentTime:
|
|
1026
|
+
currentTime: g(e.timezone?.name),
|
|
1027
1027
|
utcOffset: e.timezone?.utcOffset,
|
|
1028
1028
|
selectedTimezone: t
|
|
1029
1029
|
}
|
|
@@ -1037,301 +1037,344 @@ const fr = () => Intl.supportedValuesOf("timeZone").map((t) => {
|
|
|
1037
1037
|
currentTime: w.currentTime,
|
|
1038
1038
|
utcOffset: w.utcOffset,
|
|
1039
1039
|
selectedTimezone: t,
|
|
1040
|
-
handleTimezoneMouseClick:
|
|
1040
|
+
handleTimezoneMouseClick: v
|
|
1041
1041
|
},
|
|
1042
1042
|
E
|
|
1043
1043
|
)) })
|
|
1044
1044
|
] })
|
|
1045
1045
|
] }),
|
|
1046
|
-
/* @__PURE__ */ l.jsx(
|
|
1046
|
+
/* @__PURE__ */ l.jsx(ie, { px: 12, children: /* @__PURE__ */ l.jsx(et, {}) })
|
|
1047
1047
|
] });
|
|
1048
1048
|
}, be = {
|
|
1049
1049
|
"sidebar-container": "_sidebar-container_1cvpv_1",
|
|
1050
1050
|
"sidebar-mobile-relative": "_sidebar-mobile-relative_1cvpv_11",
|
|
1051
1051
|
"sidebar-row": "_sidebar-row_1cvpv_17"
|
|
1052
|
-
},
|
|
1052
|
+
}, vr = (e) => [
|
|
1053
1053
|
{
|
|
1054
1054
|
label: "Today",
|
|
1055
1055
|
searchKey: "today",
|
|
1056
1056
|
startTime: f().tz(e).startOf("day").format(),
|
|
1057
|
-
endTime: f().tz(e).endOf("day").format()
|
|
1057
|
+
endTime: f().tz(e).endOf("day").format(),
|
|
1058
|
+
unit: "days"
|
|
1058
1059
|
},
|
|
1059
1060
|
{
|
|
1060
1061
|
label: "Tomorrow",
|
|
1061
1062
|
searchKey: "tomorrow",
|
|
1062
1063
|
startTime: f().tz(e).add(1, "day").startOf("day").format(),
|
|
1063
|
-
endTime: f().tz(e).add(1, "day").endOf("day").format()
|
|
1064
|
+
endTime: f().tz(e).add(1, "day").endOf("day").format(),
|
|
1065
|
+
unit: "days"
|
|
1064
1066
|
},
|
|
1065
1067
|
{
|
|
1066
1068
|
label: "Yesterday",
|
|
1067
1069
|
searchKey: "yesterday",
|
|
1068
1070
|
startTime: f().tz(e).subtract(1, "day").startOf("day").format(),
|
|
1069
1071
|
endTime: f().tz(e).subtract(1, "day").endOf("day").format(),
|
|
1070
|
-
|
|
1072
|
+
unit: "days"
|
|
1071
1073
|
},
|
|
1072
1074
|
{
|
|
1073
1075
|
label: "Last 15 seconds",
|
|
1074
1076
|
searchKey: "-15s",
|
|
1075
1077
|
startTime: f().tz(e).subtract(15, "second").format(),
|
|
1076
|
-
endTime: f().tz(e).format()
|
|
1078
|
+
endTime: f().tz(e).format(),
|
|
1079
|
+
unit: "seconds"
|
|
1077
1080
|
},
|
|
1078
1081
|
{
|
|
1079
1082
|
label: "Last 30 seconds",
|
|
1080
1083
|
searchKey: "-30s",
|
|
1081
1084
|
startTime: f().tz(e).subtract(30, "second").format(),
|
|
1082
|
-
endTime: f().tz(e).format()
|
|
1085
|
+
endTime: f().tz(e).format(),
|
|
1086
|
+
unit: "seconds"
|
|
1083
1087
|
},
|
|
1084
1088
|
{
|
|
1085
1089
|
label: "Next 15 seconds",
|
|
1086
1090
|
searchKey: "+15s",
|
|
1087
1091
|
startTime: f().tz(e).format(),
|
|
1088
|
-
endTime: f().tz(e).add(15, "second").format()
|
|
1092
|
+
endTime: f().tz(e).add(15, "second").format(),
|
|
1093
|
+
unit: "seconds"
|
|
1089
1094
|
},
|
|
1090
1095
|
{
|
|
1091
1096
|
label: "Next 30 seconds",
|
|
1092
1097
|
searchKey: "+30s",
|
|
1093
1098
|
startTime: f().tz(e).format(),
|
|
1094
1099
|
endTime: f().tz(e).add(30, "second").format(),
|
|
1095
|
-
|
|
1100
|
+
unit: "seconds"
|
|
1096
1101
|
},
|
|
1097
1102
|
{
|
|
1098
1103
|
label: "Last 5 minutes",
|
|
1099
1104
|
searchKey: "-5m",
|
|
1100
1105
|
startTime: f().tz(e).subtract(5, "minute").format(),
|
|
1101
|
-
endTime: f().tz(e).format()
|
|
1106
|
+
endTime: f().tz(e).format(),
|
|
1107
|
+
unit: "minutes"
|
|
1102
1108
|
},
|
|
1103
1109
|
{
|
|
1104
1110
|
label: "Last 10 minutes",
|
|
1105
1111
|
searchKey: "-10m",
|
|
1106
1112
|
startTime: f().tz(e).subtract(10, "minute").format(),
|
|
1107
|
-
endTime: f().tz(e).format()
|
|
1113
|
+
endTime: f().tz(e).format(),
|
|
1114
|
+
unit: "minutes"
|
|
1108
1115
|
},
|
|
1109
1116
|
{
|
|
1110
1117
|
label: "Last 15 minutes",
|
|
1111
1118
|
searchKey: "-15m",
|
|
1112
1119
|
startTime: f().tz(e).subtract(15, "minute").format(),
|
|
1113
|
-
endTime: f().tz(e).format()
|
|
1120
|
+
endTime: f().tz(e).format(),
|
|
1121
|
+
unit: "minutes"
|
|
1114
1122
|
},
|
|
1115
1123
|
{
|
|
1116
1124
|
label: "Last 30 minutes",
|
|
1117
1125
|
searchKey: "-30m",
|
|
1118
1126
|
startTime: f().tz(e).subtract(30, "minute").format(),
|
|
1119
|
-
endTime: f().tz(e).format()
|
|
1127
|
+
endTime: f().tz(e).format(),
|
|
1128
|
+
unit: "minutes"
|
|
1120
1129
|
},
|
|
1121
1130
|
{
|
|
1122
1131
|
label: "Last 45 minutes",
|
|
1123
1132
|
searchKey: "-45m",
|
|
1124
1133
|
startTime: f().tz(e).subtract(45, "minute").format(),
|
|
1125
|
-
endTime: f().tz(e).format()
|
|
1134
|
+
endTime: f().tz(e).format(),
|
|
1135
|
+
unit: "minutes"
|
|
1126
1136
|
},
|
|
1127
1137
|
{
|
|
1128
1138
|
label: "Next 5 minutes",
|
|
1129
1139
|
searchKey: "+5m",
|
|
1130
1140
|
startTime: f().tz(e).format(),
|
|
1131
|
-
endTime: f().tz(e).add(5, "minute").format()
|
|
1141
|
+
endTime: f().tz(e).add(5, "minute").format(),
|
|
1142
|
+
unit: "minutes"
|
|
1132
1143
|
},
|
|
1133
1144
|
{
|
|
1134
1145
|
label: "Next 10 minutes",
|
|
1135
1146
|
searchKey: "+10m",
|
|
1136
1147
|
startTime: f().tz(e).format(),
|
|
1137
|
-
endTime: f().tz(e).add(10, "minute").format()
|
|
1148
|
+
endTime: f().tz(e).add(10, "minute").format(),
|
|
1149
|
+
unit: "minutes"
|
|
1138
1150
|
},
|
|
1139
1151
|
{
|
|
1140
1152
|
label: "Next 15 minutes",
|
|
1141
1153
|
searchKey: "+15m",
|
|
1142
1154
|
startTime: f().tz(e).format(),
|
|
1143
|
-
endTime: f().tz(e).add(15, "minute").format()
|
|
1155
|
+
endTime: f().tz(e).add(15, "minute").format(),
|
|
1156
|
+
unit: "minutes"
|
|
1144
1157
|
},
|
|
1145
1158
|
{
|
|
1146
1159
|
label: "Next 30 minutes",
|
|
1147
1160
|
searchKey: "+30m",
|
|
1148
1161
|
startTime: f().tz(e).format(),
|
|
1149
|
-
endTime: f().tz(e).add(30, "minute").format()
|
|
1162
|
+
endTime: f().tz(e).add(30, "minute").format(),
|
|
1163
|
+
unit: "minutes"
|
|
1150
1164
|
},
|
|
1151
1165
|
{
|
|
1152
1166
|
label: "Next 45 minutes",
|
|
1153
1167
|
searchKey: "+45m",
|
|
1154
1168
|
startTime: f().tz(e).format(),
|
|
1155
1169
|
endTime: f().tz(e).add(45, "minute").format(),
|
|
1156
|
-
|
|
1170
|
+
unit: "minutes"
|
|
1157
1171
|
},
|
|
1158
1172
|
{
|
|
1159
1173
|
label: "Last 1 hour",
|
|
1160
1174
|
searchKey: "-1h",
|
|
1161
1175
|
startTime: f().tz(e).subtract(1, "hour").format(),
|
|
1162
|
-
endTime: f().tz(e).format()
|
|
1176
|
+
endTime: f().tz(e).format(),
|
|
1177
|
+
unit: "hours"
|
|
1163
1178
|
},
|
|
1164
1179
|
{
|
|
1165
1180
|
label: "Last 3 hours",
|
|
1166
1181
|
searchKey: "-3h",
|
|
1167
1182
|
startTime: f().tz(e).subtract(3, "hour").format(),
|
|
1168
|
-
endTime: f().tz(e).format()
|
|
1183
|
+
endTime: f().tz(e).format(),
|
|
1184
|
+
unit: "hours"
|
|
1169
1185
|
},
|
|
1170
1186
|
{
|
|
1171
1187
|
label: "Last 6 hours",
|
|
1172
1188
|
searchKey: "-6h",
|
|
1173
1189
|
startTime: f().tz(e).subtract(6, "hour").format(),
|
|
1174
|
-
endTime: f().tz(e).format()
|
|
1190
|
+
endTime: f().tz(e).format(),
|
|
1191
|
+
unit: "hours"
|
|
1175
1192
|
},
|
|
1176
1193
|
{
|
|
1177
1194
|
label: "Last 12 hours",
|
|
1178
1195
|
searchKey: "-12h",
|
|
1179
1196
|
startTime: f().tz(e).subtract(12, "hour").format(),
|
|
1180
|
-
endTime: f().tz(e).format()
|
|
1197
|
+
endTime: f().tz(e).format(),
|
|
1198
|
+
unit: "hours"
|
|
1181
1199
|
},
|
|
1182
1200
|
{
|
|
1183
1201
|
label: "Next 1 hour",
|
|
1184
1202
|
searchKey: "+1h",
|
|
1185
1203
|
startTime: f().tz(e).format(),
|
|
1186
|
-
endTime: f().tz(e).add(1, "hour").format()
|
|
1204
|
+
endTime: f().tz(e).add(1, "hour").format(),
|
|
1205
|
+
unit: "hours"
|
|
1187
1206
|
},
|
|
1188
1207
|
{
|
|
1189
1208
|
label: "Next 3 hours",
|
|
1190
1209
|
searchKey: "+3h",
|
|
1191
1210
|
startTime: f().tz(e).format(),
|
|
1192
|
-
endTime: f().tz(e).add(3, "hour").format()
|
|
1211
|
+
endTime: f().tz(e).add(3, "hour").format(),
|
|
1212
|
+
unit: "hours"
|
|
1193
1213
|
},
|
|
1194
1214
|
{
|
|
1195
1215
|
label: "Next 6 hours",
|
|
1196
1216
|
searchKey: "+6h",
|
|
1197
1217
|
startTime: f().tz(e).format(),
|
|
1198
|
-
endTime: f().tz(e).add(6, "hour").format()
|
|
1218
|
+
endTime: f().tz(e).add(6, "hour").format(),
|
|
1219
|
+
unit: "hours"
|
|
1199
1220
|
},
|
|
1200
1221
|
{
|
|
1201
1222
|
label: "Next 12 hours",
|
|
1202
1223
|
searchKey: "+12h",
|
|
1203
1224
|
startTime: f().tz(e).format(),
|
|
1204
1225
|
endTime: f().tz(e).add(12, "hour").format(),
|
|
1205
|
-
|
|
1226
|
+
unit: "hours"
|
|
1206
1227
|
},
|
|
1207
1228
|
{
|
|
1208
1229
|
label: "Last 1 day",
|
|
1209
1230
|
searchKey: "-1d",
|
|
1210
1231
|
startTime: f().tz(e).subtract(1, "day").format(),
|
|
1211
|
-
endTime: f().tz(e).format()
|
|
1232
|
+
endTime: f().tz(e).format(),
|
|
1233
|
+
unit: "days"
|
|
1212
1234
|
},
|
|
1213
1235
|
{
|
|
1214
1236
|
label: "Last 2 days",
|
|
1215
1237
|
searchKey: "-2d",
|
|
1216
1238
|
startTime: f().tz(e).subtract(2, "day").format(),
|
|
1217
|
-
endTime: f().tz(e).format()
|
|
1239
|
+
endTime: f().tz(e).format(),
|
|
1240
|
+
unit: "days"
|
|
1218
1241
|
},
|
|
1219
1242
|
{
|
|
1220
1243
|
label: "Last 7 days",
|
|
1221
1244
|
searchKey: "-7d",
|
|
1222
1245
|
startTime: f().tz(e).subtract(7, "day").format(),
|
|
1223
|
-
endTime: f().tz(e).format()
|
|
1246
|
+
endTime: f().tz(e).format(),
|
|
1247
|
+
unit: "days"
|
|
1224
1248
|
},
|
|
1225
1249
|
{
|
|
1226
1250
|
label: "Last 14 days",
|
|
1227
1251
|
searchKey: "-14d",
|
|
1228
1252
|
startTime: f().tz(e).subtract(14, "day").format(),
|
|
1229
|
-
endTime: f().tz(e).format()
|
|
1253
|
+
endTime: f().tz(e).format(),
|
|
1254
|
+
unit: "days"
|
|
1230
1255
|
},
|
|
1231
1256
|
{
|
|
1232
1257
|
label: "Last 30 days",
|
|
1233
1258
|
searchKey: "-30d",
|
|
1234
1259
|
startTime: f().tz(e).subtract(30, "day").format(),
|
|
1235
|
-
endTime: f().tz(e).format()
|
|
1260
|
+
endTime: f().tz(e).format(),
|
|
1261
|
+
unit: "days"
|
|
1236
1262
|
},
|
|
1237
1263
|
{
|
|
1238
1264
|
label: "Next 1 day",
|
|
1239
1265
|
searchKey: "+1d",
|
|
1240
1266
|
startTime: f().tz(e).format(),
|
|
1241
|
-
endTime: f().tz(e).add(1, "day").format()
|
|
1267
|
+
endTime: f().tz(e).add(1, "day").format(),
|
|
1268
|
+
unit: "days"
|
|
1242
1269
|
},
|
|
1243
1270
|
{
|
|
1244
1271
|
label: "Next 2 days",
|
|
1245
1272
|
searchKey: "+2d",
|
|
1246
1273
|
startTime: f().tz(e).format(),
|
|
1247
|
-
endTime: f().tz(e).add(2, "day").format()
|
|
1274
|
+
endTime: f().tz(e).add(2, "day").format(),
|
|
1275
|
+
unit: "days"
|
|
1248
1276
|
},
|
|
1249
1277
|
{
|
|
1250
1278
|
label: "Next 7 days",
|
|
1251
1279
|
searchKey: "+7d",
|
|
1252
1280
|
startTime: f().tz(e).format(),
|
|
1253
|
-
endTime: f().tz(e).add(7, "day").format()
|
|
1281
|
+
endTime: f().tz(e).add(7, "day").format(),
|
|
1282
|
+
unit: "days"
|
|
1254
1283
|
},
|
|
1255
1284
|
{
|
|
1256
1285
|
label: "Next 14 days",
|
|
1257
1286
|
searchKey: "+14d",
|
|
1258
1287
|
startTime: f().tz(e).format(),
|
|
1259
|
-
endTime: f().tz(e).add(14, "day").format()
|
|
1288
|
+
endTime: f().tz(e).add(14, "day").format(),
|
|
1289
|
+
unit: "days"
|
|
1260
1290
|
},
|
|
1261
1291
|
{
|
|
1262
1292
|
label: "Next 30 days",
|
|
1263
1293
|
searchKey: "+30d",
|
|
1264
1294
|
startTime: f().tz(e).format(),
|
|
1265
|
-
endTime: f().tz(e).add(30, "day").format()
|
|
1295
|
+
endTime: f().tz(e).add(30, "day").format(),
|
|
1296
|
+
unit: "days"
|
|
1266
1297
|
}
|
|
1267
|
-
],
|
|
1298
|
+
], br = (e, t) => e === "seconds" ? !t?.disableSeconds : e === "minutes" ? !t?.disableMinutes : e === "hours" ? !t?.disableHours : e === "days" ? !t?.disableDays : !0, ct = (e, t) => {
|
|
1299
|
+
const r = vr(e).filter(
|
|
1300
|
+
(n) => br(n.unit, t)
|
|
1301
|
+
);
|
|
1302
|
+
return r.map((n, s) => ({
|
|
1303
|
+
...n,
|
|
1304
|
+
lineBreak: s < r.length - 1 && r[s + 1].unit !== n.unit
|
|
1305
|
+
}));
|
|
1306
|
+
}, xe = {
|
|
1268
1307
|
"relative-time-root": "_relative-time-root_emohw_1",
|
|
1269
1308
|
"relative-time-panel-container": "_relative-time-panel-container_emohw_9",
|
|
1270
1309
|
"time-row": "_time-row_emohw_16",
|
|
1271
1310
|
"time-row-dark": "_time-row-dark_emohw_20",
|
|
1272
1311
|
"time-row-light": "_time-row-light_emohw_26"
|
|
1273
1312
|
}, ut = ({ tzRange: e }) => {
|
|
1274
|
-
const [t, r] = ee([]), [n, s] = ee(""), { colorScheme: c } = Xe(), { closePopover:
|
|
1275
|
-
|
|
1313
|
+
const [t, r] = ee([]), [n, s] = ee(""), { colorScheme: c } = Xe(), { closePopover: i } = ye();
|
|
1314
|
+
oe(() => {
|
|
1276
1315
|
if (e.timezone.name !== null) {
|
|
1277
|
-
const
|
|
1278
|
-
r(
|
|
1316
|
+
const o = ct(e.timezone.name, e.options);
|
|
1317
|
+
r(o);
|
|
1279
1318
|
}
|
|
1280
|
-
}, [e.timezone]), bt(
|
|
1319
|
+
}, [e.timezone, e.options]), bt(
|
|
1281
1320
|
() => {
|
|
1321
|
+
if (!e.timezone.name) return;
|
|
1322
|
+
const o = ct(e.timezone.name, e.options);
|
|
1282
1323
|
if (n === "") {
|
|
1283
|
-
r(
|
|
1324
|
+
r(o);
|
|
1284
1325
|
return;
|
|
1285
1326
|
}
|
|
1286
|
-
const
|
|
1287
|
-
|
|
1327
|
+
const d = n.toLowerCase();
|
|
1328
|
+
r(
|
|
1329
|
+
o.filter(
|
|
1330
|
+
(v) => v.searchKey.includes(d) || v.label.toLowerCase().includes(d)
|
|
1331
|
+
)
|
|
1288
1332
|
);
|
|
1289
|
-
r(i);
|
|
1290
1333
|
},
|
|
1291
1334
|
250,
|
|
1292
|
-
[n]
|
|
1335
|
+
[n, e.timezone, e.options]
|
|
1293
1336
|
);
|
|
1294
|
-
const u = (
|
|
1295
|
-
const [d,
|
|
1337
|
+
const u = (o) => {
|
|
1338
|
+
const [d, v] = o.startTime.split("T"), [j, g] = o.endTime.split("T");
|
|
1296
1339
|
e.onApply({
|
|
1297
1340
|
startDate: d,
|
|
1298
|
-
startTime:
|
|
1341
|
+
startTime: v.slice(0, 8),
|
|
1299
1342
|
endDate: j,
|
|
1300
|
-
endTime:
|
|
1343
|
+
endTime: g.slice(0, 8),
|
|
1301
1344
|
timezone: e.timezone
|
|
1302
|
-
}),
|
|
1345
|
+
}), i();
|
|
1303
1346
|
};
|
|
1304
|
-
return /* @__PURE__ */ l.jsxs(q, { direction: "column", className:
|
|
1305
|
-
/* @__PURE__ */ l.jsx(
|
|
1347
|
+
return /* @__PURE__ */ l.jsxs(q, { direction: "column", className: xe["relative-time-root"], children: [
|
|
1348
|
+
/* @__PURE__ */ l.jsx(ie, { style: { width: "90%" }, mx: "auto", children: /* @__PURE__ */ l.jsx(
|
|
1306
1349
|
vt,
|
|
1307
1350
|
{
|
|
1308
1351
|
placeholder: "Relative time (15m, 1h, 1d, 1w)",
|
|
1309
1352
|
value: n,
|
|
1310
|
-
onChange: (
|
|
1353
|
+
onChange: (o) => s(o.currentTarget.value)
|
|
1311
1354
|
}
|
|
1312
1355
|
) }),
|
|
1313
|
-
/* @__PURE__ */ l.jsx(q, { direction: "column", className:
|
|
1356
|
+
/* @__PURE__ */ l.jsx(q, { direction: "column", className: xe["relative-time-panel-container"], children: t.map((o) => /* @__PURE__ */ l.jsxs(
|
|
1314
1357
|
q,
|
|
1315
1358
|
{
|
|
1316
1359
|
align: "center",
|
|
1317
1360
|
justify: "space-between",
|
|
1318
1361
|
className: $t(
|
|
1319
|
-
c === "dark" ?
|
|
1320
|
-
|
|
1362
|
+
c === "dark" ? xe["time-row-dark"] : xe["time-row-light"],
|
|
1363
|
+
xe["time-row"]
|
|
1321
1364
|
),
|
|
1322
1365
|
py: 4,
|
|
1323
1366
|
px: 12,
|
|
1324
|
-
mb:
|
|
1325
|
-
onClick: () => u(
|
|
1367
|
+
mb: o.lineBreak ? 8 : 0,
|
|
1368
|
+
onClick: () => u(o),
|
|
1326
1369
|
children: [
|
|
1327
|
-
/* @__PURE__ */ l.jsx(J, { size: "sm", children:
|
|
1328
|
-
/* @__PURE__ */ l.jsx(J, { size: "xs", c: "#5f6368", children:
|
|
1370
|
+
/* @__PURE__ */ l.jsx(J, { size: "sm", children: o.label }),
|
|
1371
|
+
/* @__PURE__ */ l.jsx(J, { size: "xs", c: "#5f6368", children: o.searchKey })
|
|
1329
1372
|
]
|
|
1330
1373
|
},
|
|
1331
|
-
|
|
1374
|
+
o.label
|
|
1332
1375
|
)) })
|
|
1333
1376
|
] });
|
|
1334
|
-
}, lt = ({ setSelectedPanel: e, tzRange: t, mobileOnlyRelative: r = !1 }) => r ? /* @__PURE__ */ l.jsx(
|
|
1377
|
+
}, lt = ({ setSelectedPanel: e, tzRange: t, mobileOnlyRelative: r = !1 }) => r ? /* @__PURE__ */ l.jsx(ie, { className: be["sidebar-mobile-relative"], children: /* @__PURE__ */ l.jsx(ut, { tzRange: t }) }) : /* @__PURE__ */ l.jsxs(ie, { className: be["sidebar-container"], flex: 1, children: [
|
|
1335
1378
|
/* @__PURE__ */ l.jsx(ut, { tzRange: t }),
|
|
1336
1379
|
/* @__PURE__ */ l.jsxs(q, { direction: "column", rowGap: 16, py: 8, style: { borderTop: "1px solid #ddd" }, children: [
|
|
1337
1380
|
/* @__PURE__ */ l.jsxs(
|
|
@@ -1361,7 +1404,7 @@ const fr = () => Intl.supportedValuesOf("timeZone").map((t) => {
|
|
|
1361
1404
|
onClick: () => e(Ve.AROUND_TIME),
|
|
1362
1405
|
children: [
|
|
1363
1406
|
/* @__PURE__ */ l.jsxs(q, { align: "center", children: [
|
|
1364
|
-
/* @__PURE__ */ l.jsx(
|
|
1407
|
+
/* @__PURE__ */ l.jsx(Fe, { stroke: 1.5 }),
|
|
1365
1408
|
/* @__PURE__ */ l.jsx(J, { size: "sm", children: "Around a time" })
|
|
1366
1409
|
] }),
|
|
1367
1410
|
/* @__PURE__ */ l.jsx(Ye, { stroke: 1.5 })
|
|
@@ -1388,7 +1431,7 @@ const fr = () => Intl.supportedValuesOf("timeZone").map((t) => {
|
|
|
1388
1431
|
] })
|
|
1389
1432
|
] });
|
|
1390
1433
|
var Dt = /* @__PURE__ */ ((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))(Dt || {});
|
|
1391
|
-
const
|
|
1434
|
+
const xr = [
|
|
1392
1435
|
"± 30 seconds",
|
|
1393
1436
|
"± 1 minute",
|
|
1394
1437
|
"± 15 minutes",
|
|
@@ -1396,7 +1439,7 @@ const Tr = [
|
|
|
1396
1439
|
"± 1 hour",
|
|
1397
1440
|
"± 1 day"
|
|
1398
1441
|
/* OneDay */
|
|
1399
|
-
],
|
|
1442
|
+
], $r = (e, t, r) => {
|
|
1400
1443
|
switch (r) {
|
|
1401
1444
|
case "± 30 seconds":
|
|
1402
1445
|
const n = le(e, t, 30, "second"), s = de(e, t, 30, "second");
|
|
@@ -1407,36 +1450,36 @@ const Tr = [
|
|
|
1407
1450
|
endTime: s.time
|
|
1408
1451
|
};
|
|
1409
1452
|
case "± 1 minute":
|
|
1410
|
-
const c = le(e, t, 1, "minute"),
|
|
1453
|
+
const c = le(e, t, 1, "minute"), i = de(e, t, 1, "minute");
|
|
1411
1454
|
return {
|
|
1412
1455
|
startDate: c.date,
|
|
1413
1456
|
startTime: c.time,
|
|
1414
|
-
endDate:
|
|
1415
|
-
endTime:
|
|
1457
|
+
endDate: i.date,
|
|
1458
|
+
endTime: i.time
|
|
1416
1459
|
};
|
|
1417
1460
|
case "± 15 minutes":
|
|
1418
|
-
const u = le(e, t, 15, "minute"),
|
|
1461
|
+
const u = le(e, t, 15, "minute"), o = de(e, t, 15, "minute");
|
|
1419
1462
|
return {
|
|
1420
1463
|
startDate: u.date,
|
|
1421
1464
|
startTime: u.time,
|
|
1422
|
-
endDate:
|
|
1423
|
-
endTime:
|
|
1465
|
+
endDate: o.date,
|
|
1466
|
+
endTime: o.time
|
|
1424
1467
|
};
|
|
1425
1468
|
case "± 30 minutes":
|
|
1426
|
-
const d = le(e, t, 30, "minute"),
|
|
1469
|
+
const d = le(e, t, 30, "minute"), v = de(e, t, 30, "minute");
|
|
1427
1470
|
return {
|
|
1428
1471
|
startDate: d.date,
|
|
1429
1472
|
startTime: d.time,
|
|
1430
|
-
endDate:
|
|
1431
|
-
endTime:
|
|
1473
|
+
endDate: v.date,
|
|
1474
|
+
endTime: v.time
|
|
1432
1475
|
};
|
|
1433
1476
|
case "± 1 hour":
|
|
1434
|
-
const j = le(e, t, 1, "hour"),
|
|
1477
|
+
const j = le(e, t, 1, "hour"), g = de(e, t, 1, "hour");
|
|
1435
1478
|
return {
|
|
1436
1479
|
startDate: j.date,
|
|
1437
1480
|
startTime: j.time,
|
|
1438
|
-
endDate:
|
|
1439
|
-
endTime:
|
|
1481
|
+
endDate: g.date,
|
|
1482
|
+
endTime: g.time
|
|
1440
1483
|
};
|
|
1441
1484
|
case "± 1 day":
|
|
1442
1485
|
const w = le(e, t, 1, "day"), E = de(e, t, 1, "day");
|
|
@@ -1455,21 +1498,21 @@ const Tr = [
|
|
|
1455
1498
|
};
|
|
1456
1499
|
}
|
|
1457
1500
|
};
|
|
1458
|
-
function
|
|
1501
|
+
function gr(e) {
|
|
1459
1502
|
if (!/^[0-9a-zA-Z-]+$/.test(e))
|
|
1460
1503
|
throw new Error(
|
|
1461
1504
|
`[@mantine/use-form] Form name "${e}" is invalid, it should contain only letters, numbers and dashes`
|
|
1462
1505
|
);
|
|
1463
1506
|
}
|
|
1464
|
-
const
|
|
1507
|
+
const Sr = typeof window < "u" ? Mt : oe;
|
|
1465
1508
|
function G(e, t) {
|
|
1466
|
-
|
|
1509
|
+
Sr(() => {
|
|
1467
1510
|
if (e)
|
|
1468
1511
|
return window.addEventListener(e, t), () => window.removeEventListener(e, t);
|
|
1469
1512
|
}, [e]);
|
|
1470
1513
|
}
|
|
1471
|
-
function
|
|
1472
|
-
e &&
|
|
1514
|
+
function Dr(e, t) {
|
|
1515
|
+
e && gr(e), G(
|
|
1473
1516
|
`mantine-form:${e}:set-field-value`,
|
|
1474
1517
|
(r) => t.setFieldValue(r.detail.path, r.detail.value)
|
|
1475
1518
|
), G(
|
|
@@ -1510,7 +1553,7 @@ function $r(e, t) {
|
|
|
1510
1553
|
(r) => t.resetDirty(r.detail)
|
|
1511
1554
|
), G(`mantine-form:${e}:reset-touched`, t.resetTouched);
|
|
1512
1555
|
}
|
|
1513
|
-
function
|
|
1556
|
+
function wr(e) {
|
|
1514
1557
|
return (t) => {
|
|
1515
1558
|
if (!t)
|
|
1516
1559
|
e(t);
|
|
@@ -1529,23 +1572,23 @@ function Ze(e) {
|
|
|
1529
1572
|
return n != null && n !== !1 && (t[r] = n), t;
|
|
1530
1573
|
}, {});
|
|
1531
1574
|
}
|
|
1532
|
-
function
|
|
1533
|
-
const [t, r] = ee(Ze(e)), n = se(t), s = A((
|
|
1575
|
+
function jr(e) {
|
|
1576
|
+
const [t, r] = ee(Ze(e)), n = se(t), s = A((o) => {
|
|
1534
1577
|
r((d) => {
|
|
1535
|
-
const
|
|
1536
|
-
return n.current =
|
|
1578
|
+
const v = Ze(typeof o == "function" ? o(d) : o);
|
|
1579
|
+
return n.current = v, v;
|
|
1537
1580
|
});
|
|
1538
|
-
}, []), c = A(() => s({}), []),
|
|
1539
|
-
(
|
|
1540
|
-
n.current[
|
|
1541
|
-
const
|
|
1542
|
-
return delete
|
|
1581
|
+
}, []), c = A(() => s({}), []), i = A(
|
|
1582
|
+
(o) => {
|
|
1583
|
+
n.current[o] !== void 0 && s((d) => {
|
|
1584
|
+
const v = { ...d };
|
|
1585
|
+
return delete v[o], v;
|
|
1543
1586
|
});
|
|
1544
1587
|
},
|
|
1545
1588
|
[t]
|
|
1546
1589
|
), u = A(
|
|
1547
|
-
(
|
|
1548
|
-
d == null || d === !1 ? o
|
|
1590
|
+
(o, d) => {
|
|
1591
|
+
d == null || d === !1 ? i(o) : n.current[o] !== d && s((v) => ({ ...v, [o]: d }));
|
|
1549
1592
|
},
|
|
1550
1593
|
[t]
|
|
1551
1594
|
);
|
|
@@ -1554,7 +1597,7 @@ function Sr(e) {
|
|
|
1554
1597
|
setErrors: s,
|
|
1555
1598
|
clearErrors: c,
|
|
1556
1599
|
setFieldError: u,
|
|
1557
|
-
clearFieldError:
|
|
1600
|
+
clearFieldError: i
|
|
1558
1601
|
};
|
|
1559
1602
|
}
|
|
1560
1603
|
function Be(e, t) {
|
|
@@ -1575,31 +1618,31 @@ function ft(e, t, r, n) {
|
|
|
1575
1618
|
const s = `${String(e)}`;
|
|
1576
1619
|
let c = r;
|
|
1577
1620
|
n === -1 && (c = Be(`${s}.${t}`, c));
|
|
1578
|
-
const
|
|
1579
|
-
return Object.entries(c).filter(([
|
|
1580
|
-
if (!
|
|
1621
|
+
const i = { ...c }, u = /* @__PURE__ */ new Set();
|
|
1622
|
+
return Object.entries(c).filter(([o]) => {
|
|
1623
|
+
if (!o.startsWith(`${s}.`))
|
|
1581
1624
|
return !1;
|
|
1582
|
-
const d = dt(
|
|
1625
|
+
const d = dt(o, s);
|
|
1583
1626
|
return Number.isNaN(d) ? !1 : d >= t;
|
|
1584
|
-
}).forEach(([
|
|
1585
|
-
const
|
|
1586
|
-
`${s}.${
|
|
1587
|
-
`${s}.${
|
|
1627
|
+
}).forEach(([o, d]) => {
|
|
1628
|
+
const v = dt(o, s), j = o.replace(
|
|
1629
|
+
`${s}.${v}`,
|
|
1630
|
+
`${s}.${v + n}`
|
|
1588
1631
|
);
|
|
1589
|
-
|
|
1590
|
-
}),
|
|
1632
|
+
i[j] = d, u.add(j), u.has(o) || delete i[o];
|
|
1633
|
+
}), i;
|
|
1591
1634
|
}
|
|
1592
|
-
function
|
|
1593
|
-
const s = `${e}.${t}`, c = `${e}.${r}`,
|
|
1594
|
-
return Object.keys(n).forEach((
|
|
1595
|
-
if (u.has(
|
|
1635
|
+
function _r(e, { from: t, to: r }, n) {
|
|
1636
|
+
const s = `${e}.${t}`, c = `${e}.${r}`, i = { ...n }, u = /* @__PURE__ */ new Set();
|
|
1637
|
+
return Object.keys(n).forEach((o) => {
|
|
1638
|
+
if (u.has(o))
|
|
1596
1639
|
return;
|
|
1597
|
-
let d,
|
|
1598
|
-
if (
|
|
1599
|
-
const j =
|
|
1600
|
-
|
|
1640
|
+
let d, v;
|
|
1641
|
+
if (o.startsWith(s) ? (d = o, v = o.replace(s, c)) : o.startsWith(c) && (d = o.replace(c, s), v = o), d && v) {
|
|
1642
|
+
const j = i[d], g = i[v];
|
|
1643
|
+
g === void 0 ? delete i[d] : i[d] = g, j === void 0 ? delete i[v] : i[v] = j, u.add(d), u.add(v);
|
|
1601
1644
|
}
|
|
1602
|
-
}),
|
|
1645
|
+
}), i;
|
|
1603
1646
|
}
|
|
1604
1647
|
function mt(e, t, r) {
|
|
1605
1648
|
typeof r.value == "object" && (r.value = fe(r.value)), !r.enumerable || r.get || r.set || !r.configurable || !r.writable || t === "__proto__" ? Object.defineProperty(e, t, r) : e[t] = r.value;
|
|
@@ -1607,10 +1650,10 @@ function mt(e, t, r) {
|
|
|
1607
1650
|
function fe(e) {
|
|
1608
1651
|
if (typeof e != "object") return e;
|
|
1609
1652
|
var t = 0, r, n, s, c = Object.prototype.toString.call(e);
|
|
1610
|
-
if (c === "[object Object]" ? s = Object.create(e.__proto__ || null) : c === "[object Array]" ? s = Array(e.length) : c === "[object Set]" ? (s = /* @__PURE__ */ new Set(), e.forEach(function(
|
|
1611
|
-
s.add(fe(
|
|
1612
|
-
})) : c === "[object Map]" ? (s = /* @__PURE__ */ new Map(), e.forEach(function(
|
|
1613
|
-
s.set(fe(u), fe(
|
|
1653
|
+
if (c === "[object Object]" ? s = Object.create(e.__proto__ || null) : c === "[object Array]" ? s = Array(e.length) : c === "[object Set]" ? (s = /* @__PURE__ */ new Set(), e.forEach(function(i) {
|
|
1654
|
+
s.add(fe(i));
|
|
1655
|
+
})) : c === "[object Map]" ? (s = /* @__PURE__ */ new Map(), e.forEach(function(i, u) {
|
|
1656
|
+
s.set(fe(u), fe(i));
|
|
1614
1657
|
})) : c === "[object Date]" ? s = /* @__PURE__ */ new Date(+e) : c === "[object RegExp]" ? s = new RegExp(e.source, e.flags) : c === "[object DataView]" ? s = new e.constructor(fe(e.buffer)) : c === "[object ArrayBuffer]" ? s = e.slice(0) : c.slice(-6) === "Array]" && (s = new e.constructor(e)), s) {
|
|
1615
1658
|
for (n = Object.getOwnPropertySymbols(e); t < n.length; t++)
|
|
1616
1659
|
mt(s, n[t], Object.getOwnPropertyDescriptor(e, n[t]));
|
|
@@ -1639,28 +1682,28 @@ function De(e, t, r) {
|
|
|
1639
1682
|
if (n.length === 1)
|
|
1640
1683
|
return s[n[0]] = t, s;
|
|
1641
1684
|
let c = s[n[0]];
|
|
1642
|
-
for (let
|
|
1685
|
+
for (let i = 1; i < n.length - 1; i += 1) {
|
|
1643
1686
|
if (c === void 0)
|
|
1644
1687
|
return s;
|
|
1645
|
-
c = c[n[
|
|
1688
|
+
c = c[n[i]];
|
|
1646
1689
|
}
|
|
1647
1690
|
return c[n[n.length - 1]] = t, s;
|
|
1648
1691
|
}
|
|
1649
|
-
function
|
|
1692
|
+
function Er(e, { from: t, to: r }, n) {
|
|
1650
1693
|
const s = Z(e, n);
|
|
1651
1694
|
if (!Array.isArray(s))
|
|
1652
1695
|
return n;
|
|
1653
|
-
const c = [...s],
|
|
1654
|
-
return c.splice(t, 1), c.splice(r, 0,
|
|
1696
|
+
const c = [...s], i = s[t];
|
|
1697
|
+
return c.splice(t, 1), c.splice(r, 0, i), De(e, c, n);
|
|
1655
1698
|
}
|
|
1656
|
-
function
|
|
1699
|
+
function Or(e, t, r, n) {
|
|
1657
1700
|
const s = Z(e, n);
|
|
1658
1701
|
if (!Array.isArray(s))
|
|
1659
1702
|
return n;
|
|
1660
1703
|
const c = [...s];
|
|
1661
1704
|
return c.splice(typeof r == "number" ? r : c.length, 0, t), De(e, c, n);
|
|
1662
1705
|
}
|
|
1663
|
-
function
|
|
1706
|
+
function kr(e, t, r) {
|
|
1664
1707
|
const n = Z(e, r);
|
|
1665
1708
|
return Array.isArray(n) ? De(
|
|
1666
1709
|
e,
|
|
@@ -1668,44 +1711,44 @@ function _r(e, t, r) {
|
|
|
1668
1711
|
r
|
|
1669
1712
|
) : r;
|
|
1670
1713
|
}
|
|
1671
|
-
function
|
|
1714
|
+
function Mr(e, t, r, n) {
|
|
1672
1715
|
const s = Z(e, n);
|
|
1673
1716
|
if (!Array.isArray(s) || s.length <= r)
|
|
1674
1717
|
return n;
|
|
1675
1718
|
const c = [...s];
|
|
1676
1719
|
return c[r] = t, De(e, c, n);
|
|
1677
1720
|
}
|
|
1678
|
-
function
|
|
1721
|
+
function Pr({
|
|
1679
1722
|
$values: e,
|
|
1680
1723
|
$errors: t,
|
|
1681
1724
|
$status: r
|
|
1682
1725
|
}) {
|
|
1683
|
-
const n = A((u,
|
|
1684
|
-
r.clearFieldDirty(u), t.setErrors((d) =>
|
|
1685
|
-
values:
|
|
1726
|
+
const n = A((u, o) => {
|
|
1727
|
+
r.clearFieldDirty(u), t.setErrors((d) => _r(u, o, d)), e.setValues({
|
|
1728
|
+
values: Er(u, o, e.refValues.current),
|
|
1686
1729
|
updateState: !0
|
|
1687
1730
|
});
|
|
1688
|
-
}, []), s = A((u,
|
|
1689
|
-
r.clearFieldDirty(u), t.setErrors((d) => ft(u,
|
|
1690
|
-
values:
|
|
1731
|
+
}, []), s = A((u, o) => {
|
|
1732
|
+
r.clearFieldDirty(u), t.setErrors((d) => ft(u, o, d, -1)), e.setValues({
|
|
1733
|
+
values: kr(u, o, e.refValues.current),
|
|
1691
1734
|
updateState: !0
|
|
1692
1735
|
});
|
|
1693
|
-
}, []), c = A((u,
|
|
1694
|
-
r.clearFieldDirty(u), t.setErrors((
|
|
1695
|
-
values:
|
|
1736
|
+
}, []), c = A((u, o, d) => {
|
|
1737
|
+
r.clearFieldDirty(u), t.setErrors((v) => ft(u, d, v, 1)), e.setValues({
|
|
1738
|
+
values: Or(u, o, d, e.refValues.current),
|
|
1696
1739
|
updateState: !0
|
|
1697
1740
|
});
|
|
1698
|
-
}, []),
|
|
1741
|
+
}, []), i = A((u, o, d) => {
|
|
1699
1742
|
r.clearFieldDirty(u), e.setValues({
|
|
1700
|
-
values:
|
|
1743
|
+
values: Mr(u, d, o, e.refValues.current),
|
|
1701
1744
|
updateState: !0
|
|
1702
1745
|
});
|
|
1703
1746
|
}, []);
|
|
1704
|
-
return { reorderListItem: n, removeListItem: s, insertListItem: c, replaceListItem:
|
|
1747
|
+
return { reorderListItem: n, removeListItem: s, insertListItem: c, replaceListItem: i };
|
|
1705
1748
|
}
|
|
1706
|
-
var
|
|
1707
|
-
function
|
|
1708
|
-
return ht || (ht = 1,
|
|
1749
|
+
var Ue, ht;
|
|
1750
|
+
function Ar() {
|
|
1751
|
+
return ht || (ht = 1, Ue = function e(t, r) {
|
|
1709
1752
|
if (t === r) return !0;
|
|
1710
1753
|
if (t && r && typeof t == "object" && typeof r == "object") {
|
|
1711
1754
|
if (t.constructor !== r.constructor) return !1;
|
|
@@ -1723,16 +1766,16 @@ function Or() {
|
|
|
1723
1766
|
for (s = n; s-- !== 0; )
|
|
1724
1767
|
if (!Object.prototype.hasOwnProperty.call(r, c[s])) return !1;
|
|
1725
1768
|
for (s = n; s-- !== 0; ) {
|
|
1726
|
-
var
|
|
1727
|
-
if (!e(t[
|
|
1769
|
+
var i = c[s];
|
|
1770
|
+
if (!e(t[i], r[i])) return !1;
|
|
1728
1771
|
}
|
|
1729
1772
|
return !0;
|
|
1730
1773
|
}
|
|
1731
1774
|
return t !== t && r !== r;
|
|
1732
|
-
}),
|
|
1775
|
+
}), Ue;
|
|
1733
1776
|
}
|
|
1734
|
-
var
|
|
1735
|
-
const Ee = /* @__PURE__ */ Ie(
|
|
1777
|
+
var Vr = Ar();
|
|
1778
|
+
const Ee = /* @__PURE__ */ Ie(Vr);
|
|
1736
1779
|
function $e(e, t) {
|
|
1737
1780
|
const r = Object.keys(e);
|
|
1738
1781
|
if (typeof t == "string") {
|
|
@@ -1741,35 +1784,35 @@ function $e(e, t) {
|
|
|
1741
1784
|
}
|
|
1742
1785
|
return r.some((n) => e[n]);
|
|
1743
1786
|
}
|
|
1744
|
-
function
|
|
1787
|
+
function Cr({
|
|
1745
1788
|
initialDirty: e,
|
|
1746
1789
|
initialTouched: t,
|
|
1747
1790
|
mode: r,
|
|
1748
1791
|
$values: n
|
|
1749
1792
|
}) {
|
|
1750
|
-
const [s, c] = ee(t), [
|
|
1751
|
-
const V = typeof S == "function" ? S(
|
|
1752
|
-
|
|
1793
|
+
const [s, c] = ee(t), [i, u] = ee(e), o = se(t), d = se(e), v = A((S) => {
|
|
1794
|
+
const V = typeof S == "function" ? S(o.current) : S;
|
|
1795
|
+
o.current = V, r === "controlled" && c(V);
|
|
1753
1796
|
}, []), j = A(
|
|
1754
1797
|
(S, V = !1) => {
|
|
1755
1798
|
const I = typeof S == "function" ? S(d.current) : S;
|
|
1756
1799
|
d.current = I, (r === "controlled" || V) && u(I);
|
|
1757
1800
|
},
|
|
1758
1801
|
[]
|
|
1759
|
-
),
|
|
1802
|
+
), g = A(() => v({}), []), w = A((S) => {
|
|
1760
1803
|
const V = S ? { ...n.refValues.current, ...S } : n.refValues.current;
|
|
1761
1804
|
n.setValuesSnapshot(V), j({});
|
|
1762
1805
|
}, []), E = A((S, V) => {
|
|
1763
|
-
|
|
1764
|
-
}, []),
|
|
1765
|
-
j((
|
|
1806
|
+
v((I) => $e(I, S) === V ? I : { ...I, [S]: V });
|
|
1807
|
+
}, []), b = A((S, V, I) => {
|
|
1808
|
+
j((R) => $e(R, S) === V ? R : { ...R, [S]: V }, I);
|
|
1766
1809
|
}, []), m = A((S, V) => {
|
|
1767
|
-
const I = $e(d.current, S),
|
|
1768
|
-
L[S] =
|
|
1810
|
+
const I = $e(d.current, S), R = !Ee(Z(S, n.getValuesSnapshot()), V), L = Be(S, d.current);
|
|
1811
|
+
L[S] = R, j(L, I !== R);
|
|
1769
1812
|
}, []), $ = A(
|
|
1770
|
-
(S) => $e(
|
|
1813
|
+
(S) => $e(o.current, S),
|
|
1771
1814
|
[]
|
|
1772
|
-
),
|
|
1815
|
+
), k = A(
|
|
1773
1816
|
(S) => j((V) => {
|
|
1774
1817
|
if (typeof S != "string")
|
|
1775
1818
|
return V;
|
|
@@ -1782,78 +1825,78 @@ function Pr({
|
|
|
1782
1825
|
const I = Z(S, d.current);
|
|
1783
1826
|
if (typeof I == "boolean")
|
|
1784
1827
|
return I;
|
|
1785
|
-
const
|
|
1786
|
-
return !Ee(
|
|
1828
|
+
const R = Z(S, n.refValues.current), L = Z(S, n.valuesSnapshot.current);
|
|
1829
|
+
return !Ee(R, L);
|
|
1787
1830
|
}
|
|
1788
1831
|
return Object.keys(d.current).length > 0 ? $e(d.current) : !Ee(n.refValues.current, n.valuesSnapshot.current);
|
|
1789
|
-
}, []), N = A(() => d.current, []), Y = A(() =>
|
|
1832
|
+
}, []), N = A(() => d.current, []), Y = A(() => o.current, []);
|
|
1790
1833
|
return {
|
|
1791
1834
|
touchedState: s,
|
|
1792
|
-
dirtyState:
|
|
1793
|
-
touchedRef:
|
|
1835
|
+
dirtyState: i,
|
|
1836
|
+
touchedRef: o,
|
|
1794
1837
|
dirtyRef: d,
|
|
1795
|
-
setTouched:
|
|
1838
|
+
setTouched: v,
|
|
1796
1839
|
setDirty: j,
|
|
1797
1840
|
resetDirty: w,
|
|
1798
|
-
resetTouched:
|
|
1841
|
+
resetTouched: g,
|
|
1799
1842
|
isTouched: $,
|
|
1800
1843
|
setFieldTouched: E,
|
|
1801
|
-
setFieldDirty:
|
|
1844
|
+
setFieldDirty: b,
|
|
1802
1845
|
setTouchedState: c,
|
|
1803
1846
|
setDirtyState: u,
|
|
1804
|
-
clearFieldDirty:
|
|
1847
|
+
clearFieldDirty: k,
|
|
1805
1848
|
isDirty: z,
|
|
1806
1849
|
getDirty: N,
|
|
1807
1850
|
getTouched: Y,
|
|
1808
1851
|
setCalculatedFieldDirty: m
|
|
1809
1852
|
};
|
|
1810
1853
|
}
|
|
1811
|
-
function
|
|
1854
|
+
function Fr({
|
|
1812
1855
|
initialValues: e,
|
|
1813
1856
|
onValuesChange: t,
|
|
1814
1857
|
mode: r
|
|
1815
1858
|
}) {
|
|
1816
|
-
const n = se(!1), [s, c] = ee(e || {}),
|
|
1859
|
+
const n = se(!1), [s, c] = ee(e || {}), i = se(s), u = se(s), o = A(
|
|
1817
1860
|
({
|
|
1818
1861
|
values: m,
|
|
1819
1862
|
subscribers: $,
|
|
1820
|
-
updateState:
|
|
1863
|
+
updateState: k = !0,
|
|
1821
1864
|
mergeWithPreviousValues: z = !0
|
|
1822
1865
|
}) => {
|
|
1823
|
-
const N =
|
|
1824
|
-
|
|
1866
|
+
const N = i.current, Y = m instanceof Function ? m(i.current) : m, S = z ? { ...N, ...Y } : Y;
|
|
1867
|
+
i.current = S, k && (c(S), r === "uncontrolled" && (i.current = S)), t?.(S, N), $?.filter(Boolean).forEach((V) => V({ updatedValues: S, previousValues: N }));
|
|
1825
1868
|
},
|
|
1826
1869
|
[t]
|
|
1827
1870
|
), d = A(
|
|
1828
1871
|
(m) => {
|
|
1829
|
-
const $ = Z(m.path,
|
|
1830
|
-
if ($ !==
|
|
1831
|
-
const z =
|
|
1832
|
-
|
|
1872
|
+
const $ = Z(m.path, i.current), k = m.value instanceof Function ? m.value($) : m.value;
|
|
1873
|
+
if ($ !== k) {
|
|
1874
|
+
const z = i.current, N = De(m.path, k, i.current);
|
|
1875
|
+
o({ values: N, updateState: m.updateState }), m.subscribers?.filter(Boolean).forEach(
|
|
1833
1876
|
(Y) => Y({ path: m.path, updatedValues: N, previousValues: z })
|
|
1834
1877
|
);
|
|
1835
1878
|
}
|
|
1836
1879
|
},
|
|
1837
|
-
[
|
|
1838
|
-
),
|
|
1880
|
+
[o]
|
|
1881
|
+
), v = A((m) => {
|
|
1839
1882
|
u.current = m;
|
|
1840
1883
|
}, []), j = A(
|
|
1841
1884
|
(m, $) => {
|
|
1842
|
-
n.current || (n.current = !0,
|
|
1885
|
+
n.current || (n.current = !0, o({ values: m, updateState: r === "controlled" }), v(m), $());
|
|
1843
1886
|
},
|
|
1844
|
-
[
|
|
1845
|
-
),
|
|
1846
|
-
|
|
1887
|
+
[o]
|
|
1888
|
+
), g = A(() => {
|
|
1889
|
+
o({
|
|
1847
1890
|
values: u.current,
|
|
1848
1891
|
updateState: !0,
|
|
1849
1892
|
mergeWithPreviousValues: !1
|
|
1850
1893
|
});
|
|
1851
|
-
}, [
|
|
1894
|
+
}, [o]), w = A(() => i.current, []), E = A(() => u.current, []), b = A(
|
|
1852
1895
|
(m, $) => {
|
|
1853
|
-
const
|
|
1854
|
-
typeof
|
|
1896
|
+
const k = Z(m, u.current);
|
|
1897
|
+
typeof k > "u" || d({
|
|
1855
1898
|
path: m,
|
|
1856
|
-
value:
|
|
1899
|
+
value: k,
|
|
1857
1900
|
updateState: r === "controlled",
|
|
1858
1901
|
subscribers: $
|
|
1859
1902
|
});
|
|
@@ -1863,42 +1906,42 @@ function Ar({
|
|
|
1863
1906
|
return {
|
|
1864
1907
|
initialized: n,
|
|
1865
1908
|
stateValues: s,
|
|
1866
|
-
refValues:
|
|
1909
|
+
refValues: i,
|
|
1867
1910
|
valuesSnapshot: u,
|
|
1868
|
-
setValues:
|
|
1911
|
+
setValues: o,
|
|
1869
1912
|
setFieldValue: d,
|
|
1870
|
-
resetValues:
|
|
1871
|
-
setValuesSnapshot:
|
|
1913
|
+
resetValues: g,
|
|
1914
|
+
setValuesSnapshot: v,
|
|
1872
1915
|
initialize: j,
|
|
1873
1916
|
getValues: w,
|
|
1874
1917
|
getValuesSnapshot: E,
|
|
1875
|
-
resetField:
|
|
1918
|
+
resetField: b
|
|
1876
1919
|
};
|
|
1877
1920
|
}
|
|
1878
|
-
function
|
|
1921
|
+
function Ir({
|
|
1879
1922
|
$status: e,
|
|
1880
1923
|
cascadeUpdates: t
|
|
1881
1924
|
}) {
|
|
1882
1925
|
const r = se(
|
|
1883
1926
|
{}
|
|
1884
|
-
), n = A((c,
|
|
1885
|
-
|
|
1886
|
-
r.current[c] = r.current[c].filter((u) => u !==
|
|
1887
|
-
}), [
|
|
1927
|
+
), n = A((c, i) => {
|
|
1928
|
+
oe(() => (r.current[c] = r.current[c] || [], r.current[c].push(i), () => {
|
|
1929
|
+
r.current[c] = r.current[c].filter((u) => u !== i);
|
|
1930
|
+
}), [i]);
|
|
1888
1931
|
}, []), s = A((c) => {
|
|
1889
|
-
const
|
|
1890
|
-
(u) => (
|
|
1891
|
-
previousValue: Z(c,
|
|
1892
|
-
value: Z(c,
|
|
1932
|
+
const i = r.current[c]?.map(
|
|
1933
|
+
(u) => (o) => u({
|
|
1934
|
+
previousValue: Z(c, o.previousValues),
|
|
1935
|
+
value: Z(c, o.updatedValues),
|
|
1893
1936
|
touched: e.isTouched(c),
|
|
1894
1937
|
dirty: e.isDirty(c)
|
|
1895
1938
|
})
|
|
1896
1939
|
) ?? [];
|
|
1897
1940
|
if (t)
|
|
1898
1941
|
for (const u in r.current)
|
|
1899
|
-
(u.startsWith(`${c}.`) || c.startsWith(`${u}.`)) &&
|
|
1942
|
+
(u.startsWith(`${c}.`) || c.startsWith(`${u}.`)) && i.push(
|
|
1900
1943
|
...r.current[u].map(
|
|
1901
|
-
(
|
|
1944
|
+
(o) => (d) => o({
|
|
1902
1945
|
previousValue: Z(u, d.previousValues),
|
|
1903
1946
|
value: Z(u, d.updatedValues),
|
|
1904
1947
|
touched: e.isTouched(u),
|
|
@@ -1906,7 +1949,7 @@ function Vr({
|
|
|
1906
1949
|
})
|
|
1907
1950
|
)
|
|
1908
1951
|
);
|
|
1909
|
-
return
|
|
1952
|
+
return i;
|
|
1910
1953
|
}, []);
|
|
1911
1954
|
return {
|
|
1912
1955
|
subscribers: r,
|
|
@@ -1917,34 +1960,34 @@ function Vr({
|
|
|
1917
1960
|
function yt(e, t) {
|
|
1918
1961
|
return e ? `${e}-${t.toString()}` : t.toString();
|
|
1919
1962
|
}
|
|
1920
|
-
const
|
|
1963
|
+
const Oe = Symbol("root-rule");
|
|
1921
1964
|
function pt(e) {
|
|
1922
1965
|
const t = Ze(e);
|
|
1923
1966
|
return { hasErrors: Object.keys(t).length > 0, errors: t };
|
|
1924
1967
|
}
|
|
1925
1968
|
function Je(e, t, r = "", n = {}) {
|
|
1926
1969
|
return typeof e != "object" || e === null ? n : Object.keys(e).reduce((s, c) => {
|
|
1927
|
-
const
|
|
1970
|
+
const i = e[c], u = `${r === "" ? "" : `${r}.`}${c}`, o = Z(u, t);
|
|
1928
1971
|
let d = !1;
|
|
1929
|
-
return typeof
|
|
1930
|
-
(
|
|
1931
|
-
),
|
|
1972
|
+
return typeof i == "function" && (s[u] = i(o, t, u)), typeof i == "object" && Array.isArray(o) && (d = !0, o.forEach(
|
|
1973
|
+
(v, j) => Je(i, t, `${u}.${j}`, s)
|
|
1974
|
+
), Oe in i && (s[u] = i[Oe](o, t, u))), typeof i == "object" && typeof o == "object" && o !== null && (d || Je(i, t, u, s), Oe in i && (s[u] = i[Oe](o, t, u))), s;
|
|
1932
1975
|
}, n);
|
|
1933
1976
|
}
|
|
1934
1977
|
function Ge(e, t) {
|
|
1935
1978
|
return pt(typeof e == "function" ? e(t) : Je(e, t));
|
|
1936
1979
|
}
|
|
1937
|
-
function
|
|
1980
|
+
function ke(e, t, r) {
|
|
1938
1981
|
if (typeof e != "string")
|
|
1939
1982
|
return { hasError: !1, error: null };
|
|
1940
1983
|
const n = Ge(t, r), s = Object.keys(n.errors).find(
|
|
1941
|
-
(c) => e.split(".").every((
|
|
1984
|
+
(c) => e.split(".").every((i, u) => i === c.split(".")[u])
|
|
1942
1985
|
);
|
|
1943
1986
|
return { hasError: !!s, error: s ? n.errors[s] : null };
|
|
1944
1987
|
}
|
|
1945
|
-
const
|
|
1988
|
+
const Lr = "__MANTINE_FORM_INDEX__";
|
|
1946
1989
|
function Tt(e, t) {
|
|
1947
|
-
return t ? typeof t == "boolean" ? t : Array.isArray(t) ? t.includes(e.replace(/[.][0-9]+/g, `.${
|
|
1990
|
+
return t ? typeof t == "boolean" ? t : Array.isArray(t) ? t.includes(e.replace(/[.][0-9]+/g, `.${Lr}`)) : !1 : !1;
|
|
1948
1991
|
}
|
|
1949
1992
|
function jt({
|
|
1950
1993
|
name: e,
|
|
@@ -1953,82 +1996,82 @@ function jt({
|
|
|
1953
1996
|
initialErrors: n = {},
|
|
1954
1997
|
initialDirty: s = {},
|
|
1955
1998
|
initialTouched: c = {},
|
|
1956
|
-
clearInputErrorOnChange:
|
|
1999
|
+
clearInputErrorOnChange: i = !0,
|
|
1957
2000
|
validateInputOnChange: u = !1,
|
|
1958
|
-
validateInputOnBlur:
|
|
2001
|
+
validateInputOnBlur: o = !1,
|
|
1959
2002
|
onValuesChange: d,
|
|
1960
|
-
transformValues:
|
|
2003
|
+
transformValues: v = ((m) => m),
|
|
1961
2004
|
enhanceGetInputProps: j,
|
|
1962
|
-
validate:
|
|
2005
|
+
validate: g,
|
|
1963
2006
|
onSubmitPreventDefault: w = "always",
|
|
1964
2007
|
touchTrigger: E = "change",
|
|
1965
|
-
cascadeUpdates:
|
|
2008
|
+
cascadeUpdates: b = !1
|
|
1966
2009
|
} = {}) {
|
|
1967
|
-
const m =
|
|
1968
|
-
$.resetValues(), m.clearErrors(),
|
|
2010
|
+
const m = jr(n), $ = Fr({ initialValues: r, onValuesChange: d, mode: t }), k = Cr({ initialDirty: s, initialTouched: c, $values: $, mode: t }), z = Pr({ $values: $, $errors: m, $status: k }), N = Ir({ $status: k, cascadeUpdates: b }), [Y, S] = ee(0), [V, I] = ee({}), [R, L] = ee(!1), C = A(() => {
|
|
2011
|
+
$.resetValues(), m.clearErrors(), k.resetDirty(), k.resetTouched(), t === "uncontrolled" && S((p) => p + 1);
|
|
1969
2012
|
}, []), te = A(
|
|
1970
2013
|
(p) => {
|
|
1971
|
-
|
|
1972
|
-
const
|
|
1973
|
-
|
|
2014
|
+
i && m.clearErrors(), t === "uncontrolled" && S((O) => O + 1), Object.keys(N.subscribers.current).forEach((O) => {
|
|
2015
|
+
const K = Z(O, $.refValues.current), U = Z(O, p);
|
|
2016
|
+
K !== U && N.getFieldSubscribers(O).forEach((B) => B({ previousValues: p, updatedValues: $.refValues.current }));
|
|
1974
2017
|
});
|
|
1975
2018
|
},
|
|
1976
|
-
[
|
|
2019
|
+
[i]
|
|
1977
2020
|
), ue = A(
|
|
1978
2021
|
(p) => {
|
|
1979
|
-
const
|
|
1980
|
-
$.initialize(p, () => t === "uncontrolled" && S((
|
|
2022
|
+
const O = $.refValues.current;
|
|
2023
|
+
$.initialize(p, () => t === "uncontrolled" && S((K) => K + 1)), te(O);
|
|
1981
2024
|
},
|
|
1982
2025
|
[te]
|
|
1983
2026
|
), _ = A(
|
|
1984
|
-
(p,
|
|
1985
|
-
const
|
|
1986
|
-
|
|
2027
|
+
(p, O, K) => {
|
|
2028
|
+
const U = Tt(p, u), B = O instanceof Function ? O(Z(p, $.refValues.current)) : O;
|
|
2029
|
+
k.setCalculatedFieldDirty(p, B), E === "change" && k.setFieldTouched(p, !0), !U && i && m.clearFieldError(p), $.setFieldValue({
|
|
1987
2030
|
path: p,
|
|
1988
|
-
value:
|
|
2031
|
+
value: O,
|
|
1989
2032
|
updateState: t === "controlled",
|
|
1990
2033
|
subscribers: [
|
|
1991
2034
|
...N.getFieldSubscribers(p),
|
|
1992
|
-
|
|
1993
|
-
const X =
|
|
2035
|
+
U ? (ne) => {
|
|
2036
|
+
const X = ke(p, g, ne.updatedValues);
|
|
1994
2037
|
X.hasError ? m.setFieldError(p, X.error) : m.clearFieldError(p);
|
|
1995
2038
|
} : null,
|
|
1996
|
-
|
|
2039
|
+
K?.forceUpdate !== !1 && t !== "controlled" ? () => I((ne) => ({
|
|
1997
2040
|
...ne,
|
|
1998
2041
|
[p]: (ne[p] || 0) + 1
|
|
1999
2042
|
})) : null
|
|
2000
2043
|
]
|
|
2001
2044
|
});
|
|
2002
2045
|
},
|
|
2003
|
-
[d,
|
|
2046
|
+
[d, g]
|
|
2004
2047
|
), T = A(
|
|
2005
2048
|
(p) => {
|
|
2006
|
-
const
|
|
2007
|
-
$.setValues({ values: p, updateState: t === "controlled" }), te(
|
|
2049
|
+
const O = $.refValues.current;
|
|
2050
|
+
$.setValues({ values: p, updateState: t === "controlled" }), te(O);
|
|
2008
2051
|
},
|
|
2009
2052
|
[d, te]
|
|
2010
2053
|
), h = A(() => {
|
|
2011
|
-
const p = Ge(
|
|
2054
|
+
const p = Ge(g, $.refValues.current);
|
|
2012
2055
|
return m.setErrors(p.errors), p;
|
|
2013
|
-
}, [
|
|
2056
|
+
}, [g]), D = A(
|
|
2014
2057
|
(p) => {
|
|
2015
|
-
const
|
|
2016
|
-
return
|
|
2058
|
+
const O = ke(p, g, $.refValues.current);
|
|
2059
|
+
return O.hasError ? m.setFieldError(p, O.error) : m.clearFieldError(p), O;
|
|
2017
2060
|
},
|
|
2018
|
-
[
|
|
2019
|
-
), y = (p, { type:
|
|
2020
|
-
const X = { onChange:
|
|
2061
|
+
[g]
|
|
2062
|
+
), y = (p, { type: O = "input", withError: K = !0, withFocus: U = !0, ...B } = {}) => {
|
|
2063
|
+
const X = { onChange: wr(
|
|
2021
2064
|
(we) => _(p, we, { forceUpdate: !1 })
|
|
2022
2065
|
), "data-path": yt(e, p) };
|
|
2023
|
-
return
|
|
2066
|
+
return K && (X.error = m.errorsState[p]), O === "checkbox" ? X[t === "controlled" ? "checked" : "defaultChecked"] = Z(
|
|
2024
2067
|
p,
|
|
2025
2068
|
$.refValues.current
|
|
2026
2069
|
) : X[t === "controlled" ? "value" : "defaultValue"] = Z(
|
|
2027
2070
|
p,
|
|
2028
2071
|
$.refValues.current
|
|
2029
|
-
),
|
|
2030
|
-
if (Tt(p,
|
|
2031
|
-
const we =
|
|
2072
|
+
), U && (X.onFocus = () => k.setFieldTouched(p, !0), X.onBlur = () => {
|
|
2073
|
+
if (Tt(p, o)) {
|
|
2074
|
+
const we = ke(p, g, $.refValues.current);
|
|
2032
2075
|
we.hasError ? m.setFieldError(p, we.error) : m.clearFieldError(p);
|
|
2033
2076
|
}
|
|
2034
2077
|
}), Object.assign(
|
|
@@ -2036,36 +2079,36 @@ function jt({
|
|
|
2036
2079
|
j?.({
|
|
2037
2080
|
inputProps: X,
|
|
2038
2081
|
field: p,
|
|
2039
|
-
options: { type:
|
|
2082
|
+
options: { type: O, withError: K, withFocus: U, ...B },
|
|
2040
2083
|
form: Q
|
|
2041
2084
|
})
|
|
2042
2085
|
);
|
|
2043
|
-
}, P = (p,
|
|
2044
|
-
w === "always" &&
|
|
2045
|
-
const
|
|
2046
|
-
if (
|
|
2047
|
-
w === "validation-failed" &&
|
|
2086
|
+
}, P = (p, O) => (K) => {
|
|
2087
|
+
w === "always" && K?.preventDefault();
|
|
2088
|
+
const U = h();
|
|
2089
|
+
if (U.hasErrors)
|
|
2090
|
+
w === "validation-failed" && K?.preventDefault(), O?.(U.errors, $.refValues.current, K);
|
|
2048
2091
|
else {
|
|
2049
2092
|
const B = p?.(
|
|
2050
|
-
|
|
2051
|
-
|
|
2093
|
+
v($.refValues.current),
|
|
2094
|
+
K
|
|
2052
2095
|
);
|
|
2053
2096
|
B instanceof Promise && (L(!0), B.finally(() => L(!1)));
|
|
2054
2097
|
}
|
|
2055
|
-
}, a = (p) =>
|
|
2056
|
-
p.preventDefault(),
|
|
2098
|
+
}, a = (p) => v(p || $.refValues.current), x = A((p) => {
|
|
2099
|
+
p.preventDefault(), C();
|
|
2057
2100
|
}, []), M = A(
|
|
2058
|
-
(p) => p ? !
|
|
2059
|
-
[
|
|
2060
|
-
),
|
|
2101
|
+
(p) => p ? !ke(p, g, $.refValues.current).hasError : !Ge(g, $.refValues.current).hasErrors,
|
|
2102
|
+
[g]
|
|
2103
|
+
), F = (p) => `${Y}-${String(p)}-${V[String(p)] || 0}`, W = A(
|
|
2061
2104
|
(p) => document.querySelector(`[data-path="${yt(e, p)}"]`),
|
|
2062
2105
|
[]
|
|
2063
2106
|
), H = A(
|
|
2064
2107
|
(p) => {
|
|
2065
2108
|
$.resetField(p, [
|
|
2066
|
-
t !== "controlled" ? () => I((
|
|
2067
|
-
...
|
|
2068
|
-
[p]: (
|
|
2109
|
+
t !== "controlled" ? () => I((O) => ({
|
|
2110
|
+
...O,
|
|
2111
|
+
[p]: (O[p] || 0) + 1
|
|
2069
2112
|
})) : null
|
|
2070
2113
|
]);
|
|
2071
2114
|
},
|
|
@@ -2081,39 +2124,39 @@ function jt({
|
|
|
2081
2124
|
initialize: ue,
|
|
2082
2125
|
setValues: T,
|
|
2083
2126
|
setFieldValue: _,
|
|
2084
|
-
submitting:
|
|
2127
|
+
submitting: R,
|
|
2085
2128
|
setSubmitting: L,
|
|
2086
2129
|
errors: m.errorsState,
|
|
2087
2130
|
setErrors: m.setErrors,
|
|
2088
2131
|
setFieldError: m.setFieldError,
|
|
2089
2132
|
clearFieldError: m.clearFieldError,
|
|
2090
2133
|
clearErrors: m.clearErrors,
|
|
2091
|
-
resetDirty:
|
|
2092
|
-
setTouched:
|
|
2093
|
-
setDirty:
|
|
2094
|
-
isTouched:
|
|
2095
|
-
resetTouched:
|
|
2096
|
-
isDirty:
|
|
2097
|
-
getTouched:
|
|
2098
|
-
getDirty:
|
|
2134
|
+
resetDirty: k.resetDirty,
|
|
2135
|
+
setTouched: k.setTouched,
|
|
2136
|
+
setDirty: k.setDirty,
|
|
2137
|
+
isTouched: k.isTouched,
|
|
2138
|
+
resetTouched: k.resetTouched,
|
|
2139
|
+
isDirty: k.isDirty,
|
|
2140
|
+
getTouched: k.getTouched,
|
|
2141
|
+
getDirty: k.getDirty,
|
|
2099
2142
|
reorderListItem: z.reorderListItem,
|
|
2100
2143
|
insertListItem: z.insertListItem,
|
|
2101
2144
|
removeListItem: z.removeListItem,
|
|
2102
2145
|
replaceListItem: z.replaceListItem,
|
|
2103
|
-
reset:
|
|
2146
|
+
reset: C,
|
|
2104
2147
|
validate: h,
|
|
2105
2148
|
validateField: D,
|
|
2106
2149
|
getInputProps: y,
|
|
2107
2150
|
onSubmit: P,
|
|
2108
|
-
onReset:
|
|
2151
|
+
onReset: x,
|
|
2109
2152
|
isValid: M,
|
|
2110
2153
|
getTransformedValues: a,
|
|
2111
|
-
key:
|
|
2112
|
-
getInputNode:
|
|
2154
|
+
key: F,
|
|
2155
|
+
getInputNode: W
|
|
2113
2156
|
};
|
|
2114
|
-
return
|
|
2157
|
+
return Dr(e, Q), Q;
|
|
2115
2158
|
}
|
|
2116
|
-
const
|
|
2159
|
+
const zr = ({ tzRange: e }) => {
|
|
2117
2160
|
const t = ae("(max-width: 64em)"), { closePopover: r } = ye(), n = e.timezone.utcOffset ? `GMT${e.timezone.utcOffset}` : e.timezone?.longName, s = jt({
|
|
2118
2161
|
initialValues: {
|
|
2119
2162
|
date: e.startDate ?? St(e),
|
|
@@ -2121,31 +2164,31 @@ const Cr = ({ tzRange: e }) => {
|
|
|
2121
2164
|
duration: Dt.OneDay
|
|
2122
2165
|
},
|
|
2123
2166
|
validate: {
|
|
2124
|
-
date: (
|
|
2125
|
-
time: (
|
|
2126
|
-
duration: (
|
|
2167
|
+
date: (i) => i ? null : "Date is required",
|
|
2168
|
+
time: (i) => i ? null : "Time is required",
|
|
2169
|
+
duration: (i) => i ? null : "Duration is required"
|
|
2127
2170
|
}
|
|
2128
|
-
}), c = (
|
|
2171
|
+
}), c = (i) => {
|
|
2129
2172
|
if (!e.timezone.name) return;
|
|
2130
|
-
const u =
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2173
|
+
const u = ge(i.date, i.time, e.timezone.name), o = Se(u, e.timezone.name), { startDate: d, startTime: v, endDate: j, endTime: g } = $r(
|
|
2174
|
+
o.date,
|
|
2175
|
+
o.time,
|
|
2176
|
+
i.duration
|
|
2134
2177
|
);
|
|
2135
2178
|
e.onApply({
|
|
2136
2179
|
startDate: d,
|
|
2137
|
-
startTime:
|
|
2180
|
+
startTime: v,
|
|
2138
2181
|
endDate: j,
|
|
2139
|
-
endTime:
|
|
2182
|
+
endTime: g,
|
|
2140
2183
|
timezone: e.timezone
|
|
2141
2184
|
}), t && r();
|
|
2142
2185
|
};
|
|
2143
2186
|
return /* @__PURE__ */ l.jsx(q, { direction: "column", flex: 2, justify: "space-between", style: { height: "100%" }, px: 12, children: /* @__PURE__ */ l.jsxs("form", { className: Qe["form-container"], onSubmit: s.onSubmit(c), children: [
|
|
2144
|
-
/* @__PURE__ */ l.jsxs(
|
|
2187
|
+
/* @__PURE__ */ l.jsxs(ie, { children: [
|
|
2145
2188
|
/* @__PURE__ */ l.jsx(J, { fw: 600, children: "Around a time" }),
|
|
2146
2189
|
/* @__PURE__ */ l.jsxs(q, { direction: "column", gap: 8, mt: 12, children: [
|
|
2147
2190
|
/* @__PURE__ */ l.jsx(
|
|
2148
|
-
|
|
2191
|
+
We,
|
|
2149
2192
|
{
|
|
2150
2193
|
label: "Pick date",
|
|
2151
2194
|
placeholder: "Pick date",
|
|
@@ -2157,13 +2200,13 @@ const Cr = ({ tzRange: e }) => {
|
|
|
2157
2200
|
s.key("date")
|
|
2158
2201
|
),
|
|
2159
2202
|
/* @__PURE__ */ l.jsx(
|
|
2160
|
-
|
|
2203
|
+
Re,
|
|
2161
2204
|
{
|
|
2162
2205
|
label: "Pick time",
|
|
2163
2206
|
placeholder: "Pick time",
|
|
2164
2207
|
withSeconds: !0,
|
|
2165
2208
|
...s.getInputProps("time"),
|
|
2166
|
-
leftSection: /* @__PURE__ */ l.jsx(
|
|
2209
|
+
leftSection: /* @__PURE__ */ l.jsx(Fe, { stroke: 1.5 }),
|
|
2167
2210
|
rightSection: t ? void 0 : /* @__PURE__ */ l.jsx(J, { style: { fontSize: 12, fontStyle: "italic", textAlign: "right" }, children: e.timezone?.longName }),
|
|
2168
2211
|
rightSectionWidth: t ? void 0 : 180,
|
|
2169
2212
|
rightSectionProps: {
|
|
@@ -2180,7 +2223,7 @@ const Cr = ({ tzRange: e }) => {
|
|
|
2180
2223
|
{
|
|
2181
2224
|
label: "Duration",
|
|
2182
2225
|
placeholder: "Pick value",
|
|
2183
|
-
data:
|
|
2226
|
+
data: xr,
|
|
2184
2227
|
...s.getInputProps("duration"),
|
|
2185
2228
|
comboboxProps: { withinPortal: !1 }
|
|
2186
2229
|
},
|
|
@@ -2190,46 +2233,46 @@ const Cr = ({ tzRange: e }) => {
|
|
|
2190
2233
|
] }),
|
|
2191
2234
|
/* @__PURE__ */ l.jsx(et, {})
|
|
2192
2235
|
] }) });
|
|
2193
|
-
},
|
|
2236
|
+
}, Yr = ({ tzRange: e }) => {
|
|
2194
2237
|
const t = ae("(max-width: 64em)"), { closePopover: r } = ye(), n = e.timezone.utcOffset ? `GMT${e.timezone.utcOffset}` : e.timezone?.longName, s = jt({
|
|
2195
2238
|
mode: "uncontrolled",
|
|
2196
2239
|
initialValues: {
|
|
2197
2240
|
startDate: e.startDate ?? St(e),
|
|
2198
2241
|
startTime: e.startTime ?? qe(e),
|
|
2199
|
-
endDate: e.endDate ??
|
|
2242
|
+
endDate: e.endDate ?? yr(30),
|
|
2200
2243
|
endTime: e.endTime ?? qe(e)
|
|
2201
2244
|
},
|
|
2202
2245
|
validate: {
|
|
2203
|
-
startDate: (
|
|
2204
|
-
startTime: (
|
|
2205
|
-
endDate: (
|
|
2206
|
-
if (!
|
|
2207
|
-
const
|
|
2208
|
-
return d.isAfter(
|
|
2246
|
+
startDate: (i) => i ? null : "Start date is required",
|
|
2247
|
+
startTime: (i) => i ? null : "Start time is required",
|
|
2248
|
+
endDate: (i, u) => {
|
|
2249
|
+
if (!i) return "End date is required";
|
|
2250
|
+
const o = f(`${u.startDate} ${u.startTime}`), d = f(`${i} ${u.endTime}`);
|
|
2251
|
+
return d.isAfter(o) || d.isSame(o) ? null : "End time must be after start time";
|
|
2209
2252
|
},
|
|
2210
|
-
endTime: (
|
|
2211
|
-
if (!
|
|
2212
|
-
const
|
|
2213
|
-
return d.isAfter(
|
|
2253
|
+
endTime: (i, u) => {
|
|
2254
|
+
if (!i) return "End time is required";
|
|
2255
|
+
const o = f(`${u.startDate} ${u.startTime}`), d = f(`${u.endDate} ${i}`);
|
|
2256
|
+
return d.isAfter(o) || d.isSame(o) ? null : "End time must be after start time";
|
|
2214
2257
|
}
|
|
2215
2258
|
}
|
|
2216
|
-
}), c = (
|
|
2259
|
+
}), c = (i) => {
|
|
2217
2260
|
if (!e.timezone.name) return;
|
|
2218
|
-
const u =
|
|
2261
|
+
const u = ge(i.startDate, i.startTime, e.timezone.name), o = ge(i.endDate, i.endTime, e.timezone.name), d = Se(u, e.timezone.name), v = Se(o, e.timezone.name);
|
|
2219
2262
|
e.onApply({
|
|
2220
2263
|
startDate: d.date,
|
|
2221
2264
|
startTime: d.time,
|
|
2222
|
-
endDate:
|
|
2223
|
-
endTime:
|
|
2265
|
+
endDate: v.date,
|
|
2266
|
+
endTime: v.time,
|
|
2224
2267
|
timezone: e.timezone
|
|
2225
2268
|
}), t && r();
|
|
2226
2269
|
};
|
|
2227
2270
|
return /* @__PURE__ */ l.jsx(q, { direction: "column", flex: 2, style: { height: "100%" }, px: 12, children: /* @__PURE__ */ l.jsxs("form", { className: Qe["form-container"], onSubmit: s.onSubmit(c), children: [
|
|
2228
|
-
/* @__PURE__ */ l.jsxs(
|
|
2271
|
+
/* @__PURE__ */ l.jsxs(ie, { children: [
|
|
2229
2272
|
/* @__PURE__ */ l.jsx(J, { fw: 600, children: "Start and end times" }),
|
|
2230
2273
|
/* @__PURE__ */ l.jsxs(q, { direction: "column", gap: 8, mt: 12, children: [
|
|
2231
2274
|
/* @__PURE__ */ l.jsx(
|
|
2232
|
-
|
|
2275
|
+
We,
|
|
2233
2276
|
{
|
|
2234
2277
|
label: "Start time",
|
|
2235
2278
|
...s.getInputProps("startDate"),
|
|
@@ -2240,11 +2283,11 @@ const Cr = ({ tzRange: e }) => {
|
|
|
2240
2283
|
s.key("startDate")
|
|
2241
2284
|
),
|
|
2242
2285
|
/* @__PURE__ */ l.jsx(
|
|
2243
|
-
|
|
2286
|
+
Re,
|
|
2244
2287
|
{
|
|
2245
2288
|
withSeconds: !0,
|
|
2246
2289
|
...s.getInputProps("startTime"),
|
|
2247
|
-
leftSection: /* @__PURE__ */ l.jsx(
|
|
2290
|
+
leftSection: /* @__PURE__ */ l.jsx(Fe, { stroke: 1.5 }),
|
|
2248
2291
|
rightSection: t ? void 0 : /* @__PURE__ */ l.jsx(J, { style: { fontSize: 12, fontStyle: "italic" }, children: e.timezone?.longName }),
|
|
2249
2292
|
rightSectionWidth: t ? void 0 : 180,
|
|
2250
2293
|
rightSectionProps: {
|
|
@@ -2257,7 +2300,7 @@ const Cr = ({ tzRange: e }) => {
|
|
|
2257
2300
|
),
|
|
2258
2301
|
t && n ? /* @__PURE__ */ l.jsx(J, { size: "xs", c: "dimmed", mt: -4, children: n }) : null,
|
|
2259
2302
|
/* @__PURE__ */ l.jsx(
|
|
2260
|
-
|
|
2303
|
+
We,
|
|
2261
2304
|
{
|
|
2262
2305
|
label: "End time",
|
|
2263
2306
|
...s.getInputProps("endDate"),
|
|
@@ -2268,11 +2311,11 @@ const Cr = ({ tzRange: e }) => {
|
|
|
2268
2311
|
s.key("endDate")
|
|
2269
2312
|
),
|
|
2270
2313
|
/* @__PURE__ */ l.jsx(
|
|
2271
|
-
|
|
2314
|
+
Re,
|
|
2272
2315
|
{
|
|
2273
2316
|
withSeconds: !0,
|
|
2274
2317
|
...s.getInputProps("endTime"),
|
|
2275
|
-
leftSection: /* @__PURE__ */ l.jsx(
|
|
2318
|
+
leftSection: /* @__PURE__ */ l.jsx(Fe, { stroke: 1.5 }),
|
|
2276
2319
|
rightSection: t ? void 0 : /* @__PURE__ */ l.jsx(J, { style: { fontSize: 12, fontStyle: "italic" }, children: e.timezone?.longName }),
|
|
2277
2320
|
rightSectionWidth: t ? void 0 : 180,
|
|
2278
2321
|
rightSectionProps: {
|
|
@@ -2296,42 +2339,42 @@ const Cr = ({ tzRange: e }) => {
|
|
|
2296
2339
|
"mobile-content": "_mobile-content_1ds5p_33"
|
|
2297
2340
|
};
|
|
2298
2341
|
var Ve = /* @__PURE__ */ ((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))(Ve || {});
|
|
2299
|
-
const
|
|
2342
|
+
const Nr = (e) => {
|
|
2300
2343
|
const [t, r] = ee(
|
|
2301
2344
|
"Start and end times"
|
|
2302
2345
|
/* START_END_TIME */
|
|
2303
|
-
), { popoverOpened: n, setPopoverOpened: s } = ye(), c = ae("(max-width: 48em)"),
|
|
2304
|
-
|
|
2305
|
-
!
|
|
2346
|
+
), { popoverOpened: n, setPopoverOpened: s } = ye(), c = ae("(max-width: 48em)"), i = ae("(max-width: 64em)");
|
|
2347
|
+
oe(() => {
|
|
2348
|
+
!i && t === "Relative time" && r(
|
|
2306
2349
|
"Start and end times"
|
|
2307
2350
|
/* START_END_TIME */
|
|
2308
2351
|
);
|
|
2309
|
-
}, [
|
|
2352
|
+
}, [i, t]);
|
|
2310
2353
|
const u = () => {
|
|
2311
2354
|
switch (t) {
|
|
2312
2355
|
case "Relative time":
|
|
2313
2356
|
return /* @__PURE__ */ l.jsx(lt, { tzRange: e, setSelectedPanel: r, mobileOnlyRelative: !0 });
|
|
2314
2357
|
case "Start and end times":
|
|
2315
|
-
return /* @__PURE__ */ l.jsx(
|
|
2358
|
+
return /* @__PURE__ */ l.jsx(Yr, { tzRange: e });
|
|
2316
2359
|
case "Around a time":
|
|
2317
|
-
return /* @__PURE__ */ l.jsx(
|
|
2360
|
+
return /* @__PURE__ */ l.jsx(zr, { tzRange: e });
|
|
2318
2361
|
case "Time zone":
|
|
2319
|
-
return /* @__PURE__ */ l.jsx(
|
|
2362
|
+
return /* @__PURE__ */ l.jsx(Tr, { tzRange: e });
|
|
2320
2363
|
default:
|
|
2321
2364
|
return null;
|
|
2322
2365
|
}
|
|
2323
|
-
},
|
|
2324
|
-
s((
|
|
2325
|
-
}, d =
|
|
2366
|
+
}, o = () => {
|
|
2367
|
+
s((g) => !g);
|
|
2368
|
+
}, d = Ke(
|
|
2326
2369
|
() => Ne(e, "desktop"),
|
|
2327
2370
|
[e.startDate, e.startTime, e.endDate, e.endTime, e.timezone]
|
|
2328
|
-
),
|
|
2371
|
+
), v = Ke(() => c ? Ne(e, "mobile") : i ? Ne(e, "tablet") : d, [d, c, i, e]), j = i ? /* @__PURE__ */ l.jsxs("div", { className: ce["mobile-layout"], children: [
|
|
2329
2372
|
/* @__PURE__ */ l.jsx("div", { className: ce["mobile-nav"], children: /* @__PURE__ */ l.jsx(
|
|
2330
|
-
|
|
2373
|
+
Ft,
|
|
2331
2374
|
{
|
|
2332
2375
|
fullWidth: !0,
|
|
2333
2376
|
value: t,
|
|
2334
|
-
onChange: (
|
|
2377
|
+
onChange: (g) => r(g),
|
|
2335
2378
|
data: [
|
|
2336
2379
|
{
|
|
2337
2380
|
label: "Quick",
|
|
@@ -2361,19 +2404,19 @@ const Lr = (e) => {
|
|
|
2361
2404
|
/* @__PURE__ */ l.jsx(lt, { tzRange: e, setSelectedPanel: r }),
|
|
2362
2405
|
u()
|
|
2363
2406
|
] });
|
|
2364
|
-
return
|
|
2407
|
+
return i ? /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
2365
2408
|
/* @__PURE__ */ l.jsx(
|
|
2366
|
-
|
|
2409
|
+
Ce,
|
|
2367
2410
|
{
|
|
2368
|
-
onClick:
|
|
2411
|
+
onClick: o,
|
|
2369
2412
|
style: e.buttonStyle || {},
|
|
2370
2413
|
className: ce["trigger-button"],
|
|
2371
2414
|
title: d,
|
|
2372
|
-
children:
|
|
2415
|
+
children: v
|
|
2373
2416
|
}
|
|
2374
2417
|
),
|
|
2375
2418
|
/* @__PURE__ */ l.jsx(
|
|
2376
|
-
|
|
2419
|
+
Ct,
|
|
2377
2420
|
{
|
|
2378
2421
|
opened: n,
|
|
2379
2422
|
onClose: () => s(!1),
|
|
@@ -2389,21 +2432,21 @@ const Lr = (e) => {
|
|
|
2389
2432
|
)
|
|
2390
2433
|
] }) : /* @__PURE__ */ l.jsxs(ze, { position: "bottom", shadow: "md", opened: n, onChange: s, children: [
|
|
2391
2434
|
/* @__PURE__ */ l.jsx(ze.Target, { children: /* @__PURE__ */ l.jsx(
|
|
2392
|
-
|
|
2435
|
+
Ce,
|
|
2393
2436
|
{
|
|
2394
|
-
onClick:
|
|
2437
|
+
onClick: o,
|
|
2395
2438
|
style: e.buttonStyle || {},
|
|
2396
2439
|
className: ce["trigger-button"],
|
|
2397
2440
|
title: d,
|
|
2398
|
-
children:
|
|
2441
|
+
children: v
|
|
2399
2442
|
}
|
|
2400
2443
|
) }),
|
|
2401
2444
|
/* @__PURE__ */ l.jsx(ze.Dropdown, { style: { width: 700, height: 400, padding: 0 }, py: 8, children: j })
|
|
2402
2445
|
] });
|
|
2403
|
-
},
|
|
2446
|
+
}, Hr = (e) => /* @__PURE__ */ l.jsx(hr, { children: /* @__PURE__ */ l.jsx(Nr, { ...e }) });
|
|
2404
2447
|
export {
|
|
2405
2448
|
Ve as Panel,
|
|
2406
|
-
|
|
2407
|
-
|
|
2449
|
+
Tr as TimezonePanel,
|
|
2450
|
+
Hr as TimezoneRangePicker
|
|
2408
2451
|
};
|
|
2409
2452
|
//# sourceMappingURL=index.es.js.map
|