@jasperoosthoek/react-toolbox 0.9.4 → 0.10.0
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/README.md +455 -155
- package/change-log.md +18 -1
- package/dist/components/forms/FormField.d.ts +13 -0
- package/dist/components/forms/FormModal.d.ts +3 -2
- package/dist/components/forms/FormProvider.d.ts +3 -0
- package/dist/components/forms/fields/FormInput.d.ts +1 -1
- package/dist/components/indicators/FixedLoadingIndicator.d.ts +16 -0
- package/dist/components/tables/DataTable.d.ts +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +2235 -0
- package/dist/index.es.js.map +1 -0
- package/dist/index.umd.js +28 -0
- package/dist/index.umd.js.map +1 -0
- package/package.json +26 -12
- package/src/components/forms/FormField.tsx +6 -2
- package/src/components/forms/FormModal.tsx +38 -20
- package/src/components/forms/FormProvider.tsx +7 -1
- package/src/components/forms/fields/FormBadgesSelection.tsx +20 -9
- package/src/components/forms/fields/FormCheckbox.tsx +8 -10
- package/src/components/forms/fields/FormDropdown.tsx +4 -5
- package/src/components/forms/fields/FormInput.tsx +6 -6
- package/src/components/forms/fields/FormSelect.tsx +4 -3
- package/src/components/indicators/FixedLoadingIndicator.tsx +49 -0
- package/src/components/tables/DataTable.tsx +27 -30
- package/src/index.ts +1 -0
- package/dist/index.js +0 -3
- package/dist/index.js.LICENSE.txt +0 -15
- package/src/__tests__/buttons.test.tsx +0 -545
- package/src/__tests__/errors.test.tsx +0 -339
- package/src/__tests__/forms.test.tsx +0 -3021
- package/src/__tests__/hooks.test.tsx +0 -413
- package/src/__tests__/indicators.test.tsx +0 -284
- package/src/__tests__/localization.test.tsx +0 -462
- package/src/__tests__/login.test.tsx +0 -417
- package/src/__tests__/setupTests.ts +0 -328
- package/src/__tests__/tables.test.tsx +0 -609
- package/src/__tests__/timeAndDate.test.tsx +0 -308
- package/src/__tests__/utils.test.tsx +0 -422
package/dist/index.es.js
ADDED
|
@@ -0,0 +1,2235 @@
|
|
|
1
|
+
import D, { useRef as Se, useContext as W, useState as H, useMemo as fe, useEffect as G, useCallback as ce, createContext as tt, useId as rt, createElement as re, forwardRef as nt } from "react";
|
|
2
|
+
import { Button as Y, Form as w, Container as _e, Row as ve, Col as q, Spinner as me, Modal as U, Badge as ze, InputGroup as Re, ButtonGroup as ot, Table as at, Dropdown as ue } from "react-bootstrap";
|
|
3
|
+
import Ae from "react-localization";
|
|
4
|
+
import { useDrop as it, useDrag as st } from "react-dnd";
|
|
5
|
+
import { startOfDay as lt, parseISO as xe, format as He, isValid as Ne } from "date-fns";
|
|
6
|
+
import { toZonedTime as $e, fromZonedTime as ct } from "date-fns-tz";
|
|
7
|
+
var we = { exports: {} }, ie = {};
|
|
8
|
+
/**
|
|
9
|
+
* @license React
|
|
10
|
+
* react-jsx-runtime.production.js
|
|
11
|
+
*
|
|
12
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the MIT license found in the
|
|
15
|
+
* LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/
|
|
17
|
+
var Le;
|
|
18
|
+
function dt() {
|
|
19
|
+
if (Le) return ie;
|
|
20
|
+
Le = 1;
|
|
21
|
+
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
22
|
+
function o(n, a, i) {
|
|
23
|
+
var d = null;
|
|
24
|
+
if (i !== void 0 && (d = "" + i), a.key !== void 0 && (d = "" + a.key), "key" in a) {
|
|
25
|
+
i = {};
|
|
26
|
+
for (var c in a)
|
|
27
|
+
c !== "key" && (i[c] = a[c]);
|
|
28
|
+
} else i = a;
|
|
29
|
+
return a = i.ref, {
|
|
30
|
+
$$typeof: e,
|
|
31
|
+
type: n,
|
|
32
|
+
key: d,
|
|
33
|
+
ref: a !== void 0 ? a : null,
|
|
34
|
+
props: i
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
return ie.Fragment = t, ie.jsx = o, ie.jsxs = o, ie;
|
|
38
|
+
}
|
|
39
|
+
var se = {};
|
|
40
|
+
/**
|
|
41
|
+
* @license React
|
|
42
|
+
* react-jsx-runtime.development.js
|
|
43
|
+
*
|
|
44
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
45
|
+
*
|
|
46
|
+
* This source code is licensed under the MIT license found in the
|
|
47
|
+
* LICENSE file in the root directory of this source tree.
|
|
48
|
+
*/
|
|
49
|
+
var Ee;
|
|
50
|
+
function ut() {
|
|
51
|
+
return Ee || (Ee = 1, process.env.NODE_ENV !== "production" && function() {
|
|
52
|
+
function e(s) {
|
|
53
|
+
if (s == null) return null;
|
|
54
|
+
if (typeof s == "function")
|
|
55
|
+
return s.$$typeof === N ? null : s.displayName || s.name || null;
|
|
56
|
+
if (typeof s == "string") return s;
|
|
57
|
+
switch (s) {
|
|
58
|
+
case f:
|
|
59
|
+
return "Fragment";
|
|
60
|
+
case x:
|
|
61
|
+
return "Profiler";
|
|
62
|
+
case P:
|
|
63
|
+
return "StrictMode";
|
|
64
|
+
case M:
|
|
65
|
+
return "Suspense";
|
|
66
|
+
case y:
|
|
67
|
+
return "SuspenseList";
|
|
68
|
+
case de:
|
|
69
|
+
return "Activity";
|
|
70
|
+
}
|
|
71
|
+
if (typeof s == "object")
|
|
72
|
+
switch (typeof s.tag == "number" && console.error(
|
|
73
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
74
|
+
), s.$$typeof) {
|
|
75
|
+
case C:
|
|
76
|
+
return "Portal";
|
|
77
|
+
case O:
|
|
78
|
+
return (s.displayName || "Context") + ".Provider";
|
|
79
|
+
case F:
|
|
80
|
+
return (s._context.displayName || "Context") + ".Consumer";
|
|
81
|
+
case z:
|
|
82
|
+
var l = s.render;
|
|
83
|
+
return s = s.displayName, s || (s = l.displayName || l.name || "", s = s !== "" ? "ForwardRef(" + s + ")" : "ForwardRef"), s;
|
|
84
|
+
case V:
|
|
85
|
+
return l = s.displayName || null, l !== null ? l : e(s.type) || "Memo";
|
|
86
|
+
case R:
|
|
87
|
+
l = s._payload, s = s._init;
|
|
88
|
+
try {
|
|
89
|
+
return e(s(l));
|
|
90
|
+
} catch {
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
95
|
+
function t(s) {
|
|
96
|
+
return "" + s;
|
|
97
|
+
}
|
|
98
|
+
function o(s) {
|
|
99
|
+
try {
|
|
100
|
+
t(s);
|
|
101
|
+
var l = !1;
|
|
102
|
+
} catch {
|
|
103
|
+
l = !0;
|
|
104
|
+
}
|
|
105
|
+
if (l) {
|
|
106
|
+
l = console;
|
|
107
|
+
var g = l.error, p = typeof Symbol == "function" && Symbol.toStringTag && s[Symbol.toStringTag] || s.constructor.name || "Object";
|
|
108
|
+
return g.call(
|
|
109
|
+
l,
|
|
110
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
111
|
+
p
|
|
112
|
+
), t(s);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
function n(s) {
|
|
116
|
+
if (s === f) return "<>";
|
|
117
|
+
if (typeof s == "object" && s !== null && s.$$typeof === R)
|
|
118
|
+
return "<...>";
|
|
119
|
+
try {
|
|
120
|
+
var l = e(s);
|
|
121
|
+
return l ? "<" + l + ">" : "<...>";
|
|
122
|
+
} catch {
|
|
123
|
+
return "<...>";
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
function a() {
|
|
127
|
+
var s = E.A;
|
|
128
|
+
return s === null ? null : s.getOwner();
|
|
129
|
+
}
|
|
130
|
+
function i() {
|
|
131
|
+
return Error("react-stack-top-frame");
|
|
132
|
+
}
|
|
133
|
+
function d(s) {
|
|
134
|
+
if (_.call(s, "key")) {
|
|
135
|
+
var l = Object.getOwnPropertyDescriptor(s, "key").get;
|
|
136
|
+
if (l && l.isReactWarning) return !1;
|
|
137
|
+
}
|
|
138
|
+
return s.key !== void 0;
|
|
139
|
+
}
|
|
140
|
+
function c(s, l) {
|
|
141
|
+
function g() {
|
|
142
|
+
Z || (Z = !0, console.error(
|
|
143
|
+
"%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)",
|
|
144
|
+
l
|
|
145
|
+
));
|
|
146
|
+
}
|
|
147
|
+
g.isReactWarning = !0, Object.defineProperty(s, "key", {
|
|
148
|
+
get: g,
|
|
149
|
+
configurable: !0
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
function u() {
|
|
153
|
+
var s = e(this.type);
|
|
154
|
+
return X[s] || (X[s] = !0, console.error(
|
|
155
|
+
"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."
|
|
156
|
+
)), s = this.props.ref, s !== void 0 ? s : null;
|
|
157
|
+
}
|
|
158
|
+
function h(s, l, g, p, B, T, I, ee) {
|
|
159
|
+
return g = T.ref, s = {
|
|
160
|
+
$$typeof: j,
|
|
161
|
+
type: s,
|
|
162
|
+
key: l,
|
|
163
|
+
props: T,
|
|
164
|
+
_owner: B
|
|
165
|
+
}, (g !== void 0 ? g : null) !== null ? Object.defineProperty(s, "ref", {
|
|
166
|
+
enumerable: !1,
|
|
167
|
+
get: u
|
|
168
|
+
}) : Object.defineProperty(s, "ref", { enumerable: !1, value: null }), s._store = {}, Object.defineProperty(s._store, "validated", {
|
|
169
|
+
configurable: !1,
|
|
170
|
+
enumerable: !1,
|
|
171
|
+
writable: !0,
|
|
172
|
+
value: 0
|
|
173
|
+
}), Object.defineProperty(s, "_debugInfo", {
|
|
174
|
+
configurable: !1,
|
|
175
|
+
enumerable: !1,
|
|
176
|
+
writable: !0,
|
|
177
|
+
value: null
|
|
178
|
+
}), Object.defineProperty(s, "_debugStack", {
|
|
179
|
+
configurable: !1,
|
|
180
|
+
enumerable: !1,
|
|
181
|
+
writable: !0,
|
|
182
|
+
value: I
|
|
183
|
+
}), Object.defineProperty(s, "_debugTask", {
|
|
184
|
+
configurable: !1,
|
|
185
|
+
enumerable: !1,
|
|
186
|
+
writable: !0,
|
|
187
|
+
value: ee
|
|
188
|
+
}), Object.freeze && (Object.freeze(s.props), Object.freeze(s)), s;
|
|
189
|
+
}
|
|
190
|
+
function m(s, l, g, p, B, T, I, ee) {
|
|
191
|
+
var A = l.children;
|
|
192
|
+
if (A !== void 0)
|
|
193
|
+
if (p)
|
|
194
|
+
if (k(A)) {
|
|
195
|
+
for (p = 0; p < A.length; p++)
|
|
196
|
+
v(A[p]);
|
|
197
|
+
Object.freeze && Object.freeze(A);
|
|
198
|
+
} else
|
|
199
|
+
console.error(
|
|
200
|
+
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
201
|
+
);
|
|
202
|
+
else v(A);
|
|
203
|
+
if (_.call(l, "key")) {
|
|
204
|
+
A = e(s);
|
|
205
|
+
var te = Object.keys(l).filter(function(et) {
|
|
206
|
+
return et !== "key";
|
|
207
|
+
});
|
|
208
|
+
p = 0 < te.length ? "{key: someKey, " + te.join(": ..., ") + ": ...}" : "{key: someKey}", Q[A + p] || (te = 0 < te.length ? "{" + te.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
209
|
+
`A props object containing a "key" prop is being spread into JSX:
|
|
210
|
+
let props = %s;
|
|
211
|
+
<%s {...props} />
|
|
212
|
+
React keys must be passed directly to JSX without using spread:
|
|
213
|
+
let props = %s;
|
|
214
|
+
<%s key={someKey} {...props} />`,
|
|
215
|
+
p,
|
|
216
|
+
A,
|
|
217
|
+
te,
|
|
218
|
+
A
|
|
219
|
+
), Q[A + p] = !0);
|
|
220
|
+
}
|
|
221
|
+
if (A = null, g !== void 0 && (o(g), A = "" + g), d(l) && (o(l.key), A = "" + l.key), "key" in l) {
|
|
222
|
+
g = {};
|
|
223
|
+
for (var ye in l)
|
|
224
|
+
ye !== "key" && (g[ye] = l[ye]);
|
|
225
|
+
} else g = l;
|
|
226
|
+
return A && c(
|
|
227
|
+
g,
|
|
228
|
+
typeof s == "function" ? s.displayName || s.name || "Unknown" : s
|
|
229
|
+
), h(
|
|
230
|
+
s,
|
|
231
|
+
A,
|
|
232
|
+
T,
|
|
233
|
+
B,
|
|
234
|
+
a(),
|
|
235
|
+
g,
|
|
236
|
+
I,
|
|
237
|
+
ee
|
|
238
|
+
);
|
|
239
|
+
}
|
|
240
|
+
function v(s) {
|
|
241
|
+
typeof s == "object" && s !== null && s.$$typeof === j && s._store && (s._store.validated = 1);
|
|
242
|
+
}
|
|
243
|
+
var b = D, j = Symbol.for("react.transitional.element"), C = Symbol.for("react.portal"), f = Symbol.for("react.fragment"), P = Symbol.for("react.strict_mode"), x = Symbol.for("react.profiler"), F = Symbol.for("react.consumer"), O = Symbol.for("react.context"), z = Symbol.for("react.forward_ref"), M = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), V = Symbol.for("react.memo"), R = Symbol.for("react.lazy"), de = Symbol.for("react.activity"), N = Symbol.for("react.client.reference"), E = b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, _ = Object.prototype.hasOwnProperty, k = Array.isArray, $ = console.createTask ? console.createTask : function() {
|
|
244
|
+
return null;
|
|
245
|
+
};
|
|
246
|
+
b = {
|
|
247
|
+
"react-stack-bottom-frame": function(s) {
|
|
248
|
+
return s();
|
|
249
|
+
}
|
|
250
|
+
};
|
|
251
|
+
var Z, X = {}, ae = b["react-stack-bottom-frame"].bind(
|
|
252
|
+
b,
|
|
253
|
+
i
|
|
254
|
+
)(), J = $(n(i)), Q = {};
|
|
255
|
+
se.Fragment = f, se.jsx = function(s, l, g, p, B) {
|
|
256
|
+
var T = 1e4 > E.recentlyCreatedOwnerStacks++;
|
|
257
|
+
return m(
|
|
258
|
+
s,
|
|
259
|
+
l,
|
|
260
|
+
g,
|
|
261
|
+
!1,
|
|
262
|
+
p,
|
|
263
|
+
B,
|
|
264
|
+
T ? Error("react-stack-top-frame") : ae,
|
|
265
|
+
T ? $(n(s)) : J
|
|
266
|
+
);
|
|
267
|
+
}, se.jsxs = function(s, l, g, p, B) {
|
|
268
|
+
var T = 1e4 > E.recentlyCreatedOwnerStacks++;
|
|
269
|
+
return m(
|
|
270
|
+
s,
|
|
271
|
+
l,
|
|
272
|
+
g,
|
|
273
|
+
!0,
|
|
274
|
+
p,
|
|
275
|
+
B,
|
|
276
|
+
T ? Error("react-stack-top-frame") : ae,
|
|
277
|
+
T ? $(n(s)) : J
|
|
278
|
+
);
|
|
279
|
+
};
|
|
280
|
+
}()), se;
|
|
281
|
+
}
|
|
282
|
+
process.env.NODE_ENV === "production" ? we.exports = dt() : we.exports = ut();
|
|
283
|
+
var r = we.exports, Ie = {
|
|
284
|
+
color: void 0,
|
|
285
|
+
size: void 0,
|
|
286
|
+
className: void 0,
|
|
287
|
+
style: void 0,
|
|
288
|
+
attr: void 0
|
|
289
|
+
}, Me = D.createContext && /* @__PURE__ */ D.createContext(Ie), ht = ["attr", "size", "title"];
|
|
290
|
+
function ft(e, t) {
|
|
291
|
+
if (e == null) return {};
|
|
292
|
+
var o = mt(e, t), n, a;
|
|
293
|
+
if (Object.getOwnPropertySymbols) {
|
|
294
|
+
var i = Object.getOwnPropertySymbols(e);
|
|
295
|
+
for (a = 0; a < i.length; a++)
|
|
296
|
+
n = i[a], !(t.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(e, n) && (o[n] = e[n]);
|
|
297
|
+
}
|
|
298
|
+
return o;
|
|
299
|
+
}
|
|
300
|
+
function mt(e, t) {
|
|
301
|
+
if (e == null) return {};
|
|
302
|
+
var o = {};
|
|
303
|
+
for (var n in e)
|
|
304
|
+
if (Object.prototype.hasOwnProperty.call(e, n)) {
|
|
305
|
+
if (t.indexOf(n) >= 0) continue;
|
|
306
|
+
o[n] = e[n];
|
|
307
|
+
}
|
|
308
|
+
return o;
|
|
309
|
+
}
|
|
310
|
+
function ge() {
|
|
311
|
+
return ge = Object.assign ? Object.assign.bind() : function(e) {
|
|
312
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
313
|
+
var o = arguments[t];
|
|
314
|
+
for (var n in o)
|
|
315
|
+
Object.prototype.hasOwnProperty.call(o, n) && (e[n] = o[n]);
|
|
316
|
+
}
|
|
317
|
+
return e;
|
|
318
|
+
}, ge.apply(this, arguments);
|
|
319
|
+
}
|
|
320
|
+
function Oe(e, t) {
|
|
321
|
+
var o = Object.keys(e);
|
|
322
|
+
if (Object.getOwnPropertySymbols) {
|
|
323
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
324
|
+
t && (n = n.filter(function(a) {
|
|
325
|
+
return Object.getOwnPropertyDescriptor(e, a).enumerable;
|
|
326
|
+
})), o.push.apply(o, n);
|
|
327
|
+
}
|
|
328
|
+
return o;
|
|
329
|
+
}
|
|
330
|
+
function pe(e) {
|
|
331
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
332
|
+
var o = arguments[t] != null ? arguments[t] : {};
|
|
333
|
+
t % 2 ? Oe(Object(o), !0).forEach(function(n) {
|
|
334
|
+
gt(e, n, o[n]);
|
|
335
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(o)) : Oe(Object(o)).forEach(function(n) {
|
|
336
|
+
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(o, n));
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
return e;
|
|
340
|
+
}
|
|
341
|
+
function gt(e, t, o) {
|
|
342
|
+
return t = pt(t), t in e ? Object.defineProperty(e, t, { value: o, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = o, e;
|
|
343
|
+
}
|
|
344
|
+
function pt(e) {
|
|
345
|
+
var t = vt(e, "string");
|
|
346
|
+
return typeof t == "symbol" ? t : t + "";
|
|
347
|
+
}
|
|
348
|
+
function vt(e, t) {
|
|
349
|
+
if (typeof e != "object" || !e) return e;
|
|
350
|
+
var o = e[Symbol.toPrimitive];
|
|
351
|
+
if (o !== void 0) {
|
|
352
|
+
var n = o.call(e, t);
|
|
353
|
+
if (typeof n != "object") return n;
|
|
354
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
355
|
+
}
|
|
356
|
+
return (t === "string" ? String : Number)(e);
|
|
357
|
+
}
|
|
358
|
+
function De(e) {
|
|
359
|
+
return e && e.map((t, o) => /* @__PURE__ */ D.createElement(t.tag, pe({
|
|
360
|
+
key: o
|
|
361
|
+
}, t.attr), De(t.child)));
|
|
362
|
+
}
|
|
363
|
+
function S(e) {
|
|
364
|
+
return (t) => /* @__PURE__ */ D.createElement(xt, ge({
|
|
365
|
+
attr: pe({}, e.attr)
|
|
366
|
+
}, t), De(e.child));
|
|
367
|
+
}
|
|
368
|
+
function xt(e) {
|
|
369
|
+
var t = (o) => {
|
|
370
|
+
var {
|
|
371
|
+
attr: n,
|
|
372
|
+
size: a,
|
|
373
|
+
title: i
|
|
374
|
+
} = e, d = ft(e, ht), c = a || o.size || "1em", u;
|
|
375
|
+
return o.className && (u = o.className), e.className && (u = (u ? u + " " : "") + e.className), /* @__PURE__ */ D.createElement("svg", ge({
|
|
376
|
+
stroke: "currentColor",
|
|
377
|
+
fill: "currentColor",
|
|
378
|
+
strokeWidth: "0"
|
|
379
|
+
}, o.attr, n, d, {
|
|
380
|
+
className: u,
|
|
381
|
+
style: pe(pe({
|
|
382
|
+
color: e.color || o.color
|
|
383
|
+
}, o.style), e.style),
|
|
384
|
+
height: c,
|
|
385
|
+
width: c,
|
|
386
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
387
|
+
}), i && /* @__PURE__ */ D.createElement("title", null, i), e.children);
|
|
388
|
+
};
|
|
389
|
+
return Me !== void 0 ? /* @__PURE__ */ D.createElement(Me.Consumer, null, (o) => t(o)) : t(Ie);
|
|
390
|
+
}
|
|
391
|
+
function bt(e) {
|
|
392
|
+
return S({ attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z" }, child: [] }] })(e);
|
|
393
|
+
}
|
|
394
|
+
function jt(e) {
|
|
395
|
+
return S({ attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z" }, child: [] }] })(e);
|
|
396
|
+
}
|
|
397
|
+
function Ct(e) {
|
|
398
|
+
return S({ attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32zm-622.3-84c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 0 0 0-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 0 0 9.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9z" }, child: [] }] })(e);
|
|
399
|
+
}
|
|
400
|
+
function yt(e) {
|
|
401
|
+
return S({ attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M869 487.8L491.2 159.9c-2.9-2.5-6.6-3.9-10.5-3.9h-88.5c-7.4 0-10.8 9.2-5.2 14l350.2 304H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h585.1L386.9 854c-5.6 4.9-2.2 14 5.2 14h91.5c1.9 0 3.8-.7 5.2-2L869 536.2a32.07 32.07 0 0 0 0-48.4z" }, child: [] }] })(e);
|
|
402
|
+
}
|
|
403
|
+
function Ue(e) {
|
|
404
|
+
return S({ attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 0 0-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z" }, child: [] }] })(e);
|
|
405
|
+
}
|
|
406
|
+
function qe(e) {
|
|
407
|
+
return S({ attr: { viewBox: "0 0 1024 1024", fill: "currentColor", fillRule: "evenodd" }, child: [{ tag: "path", attr: { d: "M799.855 166.312c.023.007.043.018.084.059l57.69 57.69c.041.041.052.06.059.084a.118.118 0 0 1 0 .069c-.007.023-.018.042-.059.083L569.926 512l287.703 287.703c.041.04.052.06.059.083a.118.118 0 0 1 0 .07c-.007.022-.018.042-.059.083l-57.69 57.69c-.041.041-.06.052-.084.059a.118.118 0 0 1-.069 0c-.023-.007-.042-.018-.083-.059L512 569.926 224.297 857.629c-.04.041-.06.052-.083.059a.118.118 0 0 1-.07 0c-.022-.007-.042-.018-.083-.059l-57.69-57.69c-.041-.041-.052-.06-.059-.084a.118.118 0 0 1 0-.069c.007-.023.018-.042.059-.083L454.073 512 166.371 224.297c-.041-.04-.052-.06-.059-.083a.118.118 0 0 1 0-.07c.007-.022.018-.042.059-.083l57.69-57.69c.041-.041.06-.052.084-.059a.118.118 0 0 1 .069 0c.023.007.042.018.083.059L512 454.073l287.703-287.702c.04-.041.06-.052.083-.059a.118.118 0 0 1 .07 0Z" }, child: [] }] })(e);
|
|
408
|
+
}
|
|
409
|
+
function wt(e) {
|
|
410
|
+
return S({ attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M505.7 661a8 8 0 0 0 12.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z" }, child: [] }] })(e);
|
|
411
|
+
}
|
|
412
|
+
function St(e) {
|
|
413
|
+
return S({ attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0 0 42 42h216v494zM544 472c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v108H372c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h108v108c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V644h108c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V472z" }, child: [] }] })(e);
|
|
414
|
+
}
|
|
415
|
+
function _t(e) {
|
|
416
|
+
return S({ attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M484 443.1V528h-84.5c-4.1 0-7.5 3.1-7.5 7v42c0 3.8 3.4 7 7.5 7H484v84.9c0 3.9 3.2 7.1 7 7.1h42c3.9 0 7-3.2 7-7.1V584h84.5c4.1 0 7.5-3.2 7.5-7v-42c0-3.9-3.4-7-7.5-7H540v-84.9c0-3.9-3.1-7.1-7-7.1h-42c-3.8 0-7 3.2-7 7.1zm396-144.7H521L403.7 186.2a8.15 8.15 0 0 0-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z" }, child: [] }] })(e);
|
|
417
|
+
}
|
|
418
|
+
function Lt(e) {
|
|
419
|
+
return S({ attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8Z" }, child: [] }, { tag: "path", attr: { d: "M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8Z" }, child: [] }] })(e);
|
|
420
|
+
}
|
|
421
|
+
function Et(e) {
|
|
422
|
+
return S({ attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z" }, child: [] }] })(e);
|
|
423
|
+
}
|
|
424
|
+
function Mt(e) {
|
|
425
|
+
return S({ attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0 0 11.6 0l43.6-43.5a8.2 8.2 0 0 0 0-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z" }, child: [] }] })(e);
|
|
426
|
+
}
|
|
427
|
+
function Ot(e) {
|
|
428
|
+
return S({ attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M832 464H332V240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v68c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-68c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zm-40 376H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 1 0-56 0z" }, child: [] }] })(e);
|
|
429
|
+
}
|
|
430
|
+
function Pt(e) {
|
|
431
|
+
return S({ attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 0 0-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z" }, child: [] }] })(e);
|
|
432
|
+
}
|
|
433
|
+
function Ft(e) {
|
|
434
|
+
return S({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "rect", attr: { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }, child: [] }, { tag: "path", attr: { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }, child: [] }] })(e);
|
|
435
|
+
}
|
|
436
|
+
function Ze(e) {
|
|
437
|
+
return S({ attr: { viewBox: "0 0 320 512" }, child: [{ tag: "path", attr: { d: "M41 288h238c21.4 0 32.1 25.9 17 41L177 448c-9.4 9.4-24.6 9.4-33.9 0L24 329c-15.1-15.1-4.4-41 17-41z" }, child: [] }] })(e);
|
|
438
|
+
}
|
|
439
|
+
function Ye(e) {
|
|
440
|
+
return S({ attr: { viewBox: "0 0 320 512" }, child: [{ tag: "path", attr: { d: "M279 224H41c-21.4 0-32.1-25.9-17-41L143 64c9.4-9.4 24.6-9.4 33.9 0l119 119c15.2 15.1 4.5 41-16.9 41z" }, child: [] }] })(e);
|
|
441
|
+
}
|
|
442
|
+
function We(e) {
|
|
443
|
+
return S({ attr: { viewBox: "0 0 320 512" }, child: [{ tag: "path", attr: { d: "M41 288h238c21.4 0 32.1 25.9 17 41L177 448c-9.4 9.4-24.6 9.4-33.9 0L24 329c-15.1-15.1-4.4-41 17-41zm255-105L177 64c-9.4-9.4-24.6-9.4-33.9 0L24 183c-15.1 15.1-4.4 41 17 41h238c21.4 0 32.1-25.9 17-41z" }, child: [] }] })(e);
|
|
444
|
+
}
|
|
445
|
+
function kt(e) {
|
|
446
|
+
return S({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M370.72 133.28C339.458 104.008 298.888 87.962 255.848 88c-77.458.068-144.328 53.178-162.791 126.85-1.344 5.363-6.122 9.15-11.651 9.15H24.103c-7.498 0-13.194-6.807-11.807-14.176C33.933 94.924 134.813 8 256 8c66.448 0 126.791 26.136 171.315 68.685L463.03 40.97C478.149 25.851 504 36.559 504 57.941V192c0 13.255-10.745 24-24 24H345.941c-21.382 0-32.09-25.851-16.971-40.971l41.75-41.749zM32 296h134.059c21.382 0 32.09 25.851 16.971 40.971l-41.75 41.75c31.262 29.273 71.835 45.319 114.876 45.28 77.418-.07 144.315-53.144 162.787-126.849 1.344-5.363 6.122-9.15 11.651-9.15h57.304c7.498 0 13.194 6.807 11.807 14.176C478.067 417.076 377.187 504 256 504c-66.448 0-126.791-26.136-171.315-68.685L48.97 471.03C33.851 486.149 8 475.441 8 454.059V320c0-13.255 10.745-24 24-24z" }, child: [] }] })(e);
|
|
447
|
+
}
|
|
448
|
+
function Bt(e) {
|
|
449
|
+
return S({ attr: { viewBox: "0 0 352 512" }, child: [{ tag: "path", attr: { d: "M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z" }, child: [] }] })(e);
|
|
450
|
+
}
|
|
451
|
+
function Tt(e) {
|
|
452
|
+
return S({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M336.174 80c-49.132 0-93.305-32-161.913-32-31.301 0-58.303 6.482-80.721 15.168a48.04 48.04 0 0 0 2.142-20.727C93.067 19.575 74.167 1.594 51.201.104 23.242-1.71 0 20.431 0 48c0 17.764 9.657 33.262 24 41.562V496c0 8.837 7.163 16 16 16h16c8.837 0 16-7.163 16-16v-83.443C109.869 395.28 143.259 384 199.826 384c49.132 0 93.305 32 161.913 32 58.479 0 101.972-22.617 128.548-39.981C503.846 367.161 512 352.051 512 335.855V95.937c0-34.459-35.264-57.768-66.904-44.117C409.193 67.309 371.641 80 336.174 80zM464 336c-21.783 15.412-60.824 32-102.261 32-59.945 0-102.002-32-161.913-32-43.361 0-96.379 9.403-127.826 24V128c21.784-15.412 60.824-32 102.261-32 59.945 0 102.002 32 161.913 32 43.271 0 96.32-17.366 127.826-32v240z" }, child: [] }] })(e);
|
|
453
|
+
}
|
|
454
|
+
function Vt(e) {
|
|
455
|
+
return S({ attr: { viewBox: "0 0 24 24", fill: "none" }, child: [{ tag: "path", attr: { d: "M6 6C6 5.44772 6.44772 5 7 5H17C17.5523 5 18 5.44772 18 6C18 6.55228 17.5523 7 17 7H7C6.44771 7 6 6.55228 6 6Z", fill: "currentColor" }, child: [] }, { tag: "path", attr: { d: "M6 10C6 9.44771 6.44772 9 7 9H17C17.5523 9 18 9.44771 18 10C18 10.5523 17.5523 11 17 11H7C6.44771 11 6 10.5523 6 10Z", fill: "currentColor" }, child: [] }, { tag: "path", attr: { d: "M7 13C6.44772 13 6 13.4477 6 14C6 14.5523 6.44771 15 7 15H17C17.5523 15 18 14.5523 18 14C18 13.4477 17.5523 13 17 13H7Z", fill: "currentColor" }, child: [] }, { tag: "path", attr: { d: "M6 18C6 17.4477 6.44772 17 7 17H11C11.5523 17 12 17.4477 12 18C12 18.5523 11.5523 19 11 19H7C6.44772 19 6 18.5523 6 18Z", fill: "currentColor" }, child: [] }, { tag: "path", attr: { fillRule: "evenodd", clipRule: "evenodd", d: "M2 4C2 2.34315 3.34315 1 5 1H19C20.6569 1 22 2.34315 22 4V20C22 21.6569 20.6569 23 19 23H5C3.34315 23 2 21.6569 2 20V4ZM5 3H19C19.5523 3 20 3.44771 20 4V20C20 20.5523 19.5523 21 19 21H5C4.44772 21 4 20.5523 4 20V4C4 3.44772 4.44771 3 5 3Z", fill: "currentColor" }, child: [] }] })(e);
|
|
456
|
+
}
|
|
457
|
+
function zt(e) {
|
|
458
|
+
return S({ attr: { viewBox: "0 0 24 24", fill: "none" }, child: [{ tag: "path", attr: { opacity: "0.2", fillRule: "evenodd", clipRule: "evenodd", d: "M12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19ZM12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z", fill: "currentColor" }, child: [] }, { tag: "path", attr: { d: "M2 12C2 6.47715 6.47715 2 12 2V5C8.13401 5 5 8.13401 5 12H2Z", fill: "currentColor" }, child: [] }] })(e);
|
|
459
|
+
}
|
|
460
|
+
function Rt(e) {
|
|
461
|
+
return S({ attr: { viewBox: "0 0 24 24", fill: "none" }, child: [{ tag: "path", attr: { fillRule: "evenodd", clipRule: "evenodd", d: "M17 5V4C17 2.89543 16.1046 2 15 2H9C7.89543 2 7 2.89543 7 4V5H4C3.44772 5 3 5.44772 3 6C3 6.55228 3.44772 7 4 7H5V18C5 19.6569 6.34315 21 8 21H16C17.6569 21 19 19.6569 19 18V7H20C20.5523 7 21 6.55228 21 6C21 5.44772 20.5523 5 20 5H17ZM15 4H9V5H15V4ZM17 7H7V18C7 18.5523 7.44772 19 8 19H16C16.5523 19 17 18.5523 17 18V7Z", fill: "currentColor" }, child: [] }, { tag: "path", attr: { d: "M9 9H11V17H9V9Z", fill: "currentColor" }, child: [] }, { tag: "path", attr: { d: "M13 9H15V17H13V9Z", fill: "currentColor" }, child: [] }] })(e);
|
|
462
|
+
}
|
|
463
|
+
function At(e) {
|
|
464
|
+
return S({ attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { fillRule: "evenodd", d: "M7.646.146a.5.5 0 0 1 .708 0l2 2a.5.5 0 0 1-.708.708L8.5 1.707V5.5a.5.5 0 0 1-1 0V1.707L6.354 2.854a.5.5 0 1 1-.708-.708zM8 10a.5.5 0 0 1 .5.5v3.793l1.146-1.147a.5.5 0 0 1 .708.708l-2 2a.5.5 0 0 1-.708 0l-2-2a.5.5 0 0 1 .708-.708L7.5 14.293V10.5A.5.5 0 0 1 8 10M.146 8.354a.5.5 0 0 1 0-.708l2-2a.5.5 0 1 1 .708.708L1.707 7.5H5.5a.5.5 0 0 1 0 1H1.707l1.147 1.146a.5.5 0 0 1-.708.708zM10 8a.5.5 0 0 1 .5-.5h3.793l-1.147-1.146a.5.5 0 0 1 .708-.708l2 2a.5.5 0 0 1 0 .708l-2 2a.5.5 0 0 1-.708-.708L14.293 8.5H10.5A.5.5 0 0 1 10 8" }, child: [] }] })(e);
|
|
465
|
+
}
|
|
466
|
+
function Ht(e) {
|
|
467
|
+
return S({ attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M14.5 3a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5h-13a.5.5 0 0 1-.5-.5v-9a.5.5 0 0 1 .5-.5zm-13-1A1.5 1.5 0 0 0 0 3.5v9A1.5 1.5 0 0 0 1.5 14h13a1.5 1.5 0 0 0 1.5-1.5v-9A1.5 1.5 0 0 0 14.5 2z" }, child: [] }, { tag: "path", attr: { d: "M5 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 5 8m0-2.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5m0 5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5m-1-5a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0M4 8a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0m0 2.5a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0" }, child: [] }] })(e);
|
|
468
|
+
}
|
|
469
|
+
function Nt(e) {
|
|
470
|
+
return S({ attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M12.146.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-10 10a.5.5 0 0 1-.168.11l-5 2a.5.5 0 0 1-.65-.65l2-5a.5.5 0 0 1 .11-.168zM11.207 2.5 13.5 4.793 14.793 3.5 12.5 1.207zm1.586 3L10.5 3.207 4 9.707V10h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.293zm-9.761 5.175-.106.106-1.528 3.821 3.821-1.528.106-.106A.5.5 0 0 1 5 12.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.468-.325" }, child: [] }] })(e);
|
|
471
|
+
}
|
|
472
|
+
function $t(e) {
|
|
473
|
+
return S({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M12 19c.946 0 1.81-.103 2.598-.281l-1.757-1.757c-.273.021-.55.038-.841.038-5.351 0-7.424-3.846-7.926-5a8.642 8.642 0 0 1 1.508-2.297L4.184 8.305c-1.538 1.667-2.121 3.346-2.132 3.379a.994.994 0 0 0 0 .633C2.073 12.383 4.367 19 12 19zm0-14c-1.837 0-3.346.396-4.604.981L3.707 2.293 2.293 3.707l18 18 1.414-1.414-3.319-3.319c2.614-1.951 3.547-4.615 3.561-4.657a.994.994 0 0 0 0-.633C21.927 11.617 19.633 5 12 5zm4.972 10.558-2.28-2.28c.19-.39.308-.819.308-1.278 0-1.641-1.359-3-3-3-.459 0-.888.118-1.277.309L8.915 7.501A9.26 9.26 0 0 1 12 7c5.351 0 7.424 3.846 7.926 5-.302.692-1.166 2.342-2.954 3.558z" }, child: [] }] })(e);
|
|
474
|
+
}
|
|
475
|
+
function It(e) {
|
|
476
|
+
return S({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M5.536 21.886a1.004 1.004 0 0 0 1.033-.064l13-9a1 1 0 0 0 0-1.644l-13-9A.998.998 0 0 0 5 3v18a1 1 0 0 0 .536.886zM7 4.909 17.243 12 7 19.091V4.909z" }, child: [] }] })(e);
|
|
477
|
+
}
|
|
478
|
+
function Dt(e) {
|
|
479
|
+
return S({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M12 9a3.02 3.02 0 0 0-3 3c0 1.642 1.358 3 3 3 1.641 0 3-1.358 3-3 0-1.641-1.359-3-3-3z" }, child: [] }, { tag: "path", attr: { d: "M12 5c-7.633 0-9.927 6.617-9.948 6.684L1.946 12l.105.316C2.073 12.383 4.367 19 12 19s9.927-6.617 9.948-6.684l.106-.316-.105-.316C21.927 11.617 19.633 5 12 5zm0 12c-5.351 0-7.424-3.846-7.926-5C4.578 10.842 6.652 7 12 7c5.351 0 7.424 3.846 7.926 5-.504 1.158-2.578 5-7.926 5z" }, child: [] }] })(e);
|
|
480
|
+
}
|
|
481
|
+
function Ut(e) {
|
|
482
|
+
return S({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M20 3H4a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1zm-1 16H5V5h14v14z" }, child: [] }] })(e);
|
|
483
|
+
}
|
|
484
|
+
function qt(e) {
|
|
485
|
+
return S({ attr: { fill: "none", viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", "aria-hidden": "true" }, child: [{ tag: "path", attr: { strokeLinecap: "round", strokeLinejoin: "round", d: "M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" }, child: [] }, { tag: "path", attr: { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z" }, child: [] }] })(e);
|
|
486
|
+
}
|
|
487
|
+
function Zt(e) {
|
|
488
|
+
return S({ attr: { fill: "none", viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", "aria-hidden": "true" }, child: [{ tag: "path", attr: { strokeLinecap: "round", strokeLinejoin: "round", d: "M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1" }, child: [] }] })(e);
|
|
489
|
+
}
|
|
490
|
+
function Yt(e) {
|
|
491
|
+
return S({ attr: { viewBox: "0 0 16 16", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M16 5H0V4h16v1zm0 8H0v-1h16v1zm0-4.008H0V8h16v.992z" }, child: [] }] })(e);
|
|
492
|
+
}
|
|
493
|
+
function Wt(e) {
|
|
494
|
+
return S({ attr: { viewBox: "0 0 24 24", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M5.76282 17H20V5H4V18.3851L5.76282 17ZM6.45455 19L2 22.5V4C2 3.44772 2.44772 3 3 3H21C21.5523 3 22 3.44772 22 4V18C22 18.5523 21.5523 19 21 19H6.45455ZM11 14H13V16H11V14ZM8.56731 8.81346C8.88637 7.20919 10.302 6 12 6C13.933 6 15.5 7.567 15.5 9.5C15.5 11.433 13.933 13 12 13H11V11H12C12.8284 11 13.5 10.3284 13.5 9.5C13.5 8.67157 12.8284 8 12 8C11.2723 8 10.6656 8.51823 10.5288 9.20577L8.56731 8.81346Z" }, child: [] }] })(e);
|
|
495
|
+
}
|
|
496
|
+
function Gt(e) {
|
|
497
|
+
return S({ attr: { viewBox: "0 0 24 24", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M4 5V19H13V21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H21C21.5523 3 22 3.44772 22 4V9H20V5H4ZM19.7071 11.2929L19 10.5858L18.2929 11.2929L15.2929 14.2929L16.7071 15.7071L19 13.4142L21.2929 15.7071L22.7071 14.2929L19.7071 11.2929ZM16.7071 17.2929L19 19.5858L21.2929 17.2929L22.7071 18.7071L19.7071 21.7071L19 22.4142L18.2929 21.7071L15.2929 18.7071L16.7071 17.2929Z" }, child: [] }] })(e);
|
|
498
|
+
}
|
|
499
|
+
function Jt(e) {
|
|
500
|
+
return S({ attr: { viewBox: "0 0 24 24", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M22 12C22 17.5228 17.5229 22 12 22C6.4772 22 2 17.5228 2 12C2 6.47715 6.4772 2 12 2V4C7.5817 4 4 7.58172 4 12C4 16.4183 7.5817 20 12 20C16.4183 20 20 16.4183 20 12C20 9.25022 18.6127 6.82447 16.4998 5.38451L16.5 8H14.5V2L20.5 2V4L18.0008 3.99989C20.4293 5.82434 22 8.72873 22 12Z" }, child: [] }] })(e);
|
|
501
|
+
}
|
|
502
|
+
function Kt(e) {
|
|
503
|
+
return S({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { d: "M15 2H9a1 1 0 0 0-1 1v2c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1Z" }, child: [] }, { tag: "path", attr: { d: "M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2M16 4h2a2 2 0 0 1 2 2v2M11 14h10" }, child: [] }, { tag: "path", attr: { d: "m17 10 4 4-4 4" }, child: [] }] })(e);
|
|
504
|
+
}
|
|
505
|
+
const Xt = ({
|
|
506
|
+
onClick: e,
|
|
507
|
+
loading: t,
|
|
508
|
+
icon: o,
|
|
509
|
+
iconSize: n,
|
|
510
|
+
children: a,
|
|
511
|
+
size: i = "sm",
|
|
512
|
+
className: d,
|
|
513
|
+
...c
|
|
514
|
+
}) => /* @__PURE__ */ r.jsxs(
|
|
515
|
+
Y,
|
|
516
|
+
{
|
|
517
|
+
variant: "light",
|
|
518
|
+
size: i,
|
|
519
|
+
className: `icon-button ${d || ""}`,
|
|
520
|
+
onClick: (u) => {
|
|
521
|
+
u.stopPropagation(), u.preventDefault(), e && e(u);
|
|
522
|
+
},
|
|
523
|
+
...c,
|
|
524
|
+
children: [
|
|
525
|
+
t && /* @__PURE__ */ r.jsx(zt, { style: { animation: "spinner-border .75s linear infinite" } }),
|
|
526
|
+
!t && o && typeof o == "function" && /* @__PURE__ */ r.jsx(o, { size: n }),
|
|
527
|
+
a && /* @__PURE__ */ r.jsx(r.Fragment, { children: " " }),
|
|
528
|
+
a
|
|
529
|
+
]
|
|
530
|
+
}
|
|
531
|
+
), L = (e) => (t) => /* @__PURE__ */ r.jsx(Xt, { ...t, icon: e }), Er = L(Ue), Mr = L(Ft), Or = L(Kt), Qt = L(Bt), Pr = L(qt), er = L(Lt), Fr = L(_t), kr = L(yt), Br = L(St), tr = L(Rt), Tr = L(bt), Vr = L(wt), rr = L(Ct), zr = L(Tt), Rr = L($t), Ar = L(Zt), Hr = L(Ht), Nr = L(Yt), $r = L(At), Ir = L(Vt), Dr = L(Nt), Ur = L(It), qr = L(Et), nr = L(Mt), Zr = L(Dt), Yr = L(We), Wr = L(Ye), Gr = L(Ze), Jr = L(Ut), Kr = L(kt), or = L(qe), Xr = L(Ot), Qr = L(jt), ar = L(Pt), en = L(Wt), tn = L(Gt), rn = L(Jt), nn = ({ accept: e, onLoadFile: t, ...o }) => {
|
|
532
|
+
const n = Se(null);
|
|
533
|
+
return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
534
|
+
/* @__PURE__ */ r.jsx(
|
|
535
|
+
ar,
|
|
536
|
+
{
|
|
537
|
+
...o,
|
|
538
|
+
onClick: () => {
|
|
539
|
+
var a;
|
|
540
|
+
return (a = n == null ? void 0 : n.current) == null ? void 0 : a.click();
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
),
|
|
544
|
+
/* @__PURE__ */ r.jsx(
|
|
545
|
+
w.Control,
|
|
546
|
+
{
|
|
547
|
+
type: "file",
|
|
548
|
+
accept: e,
|
|
549
|
+
ref: n,
|
|
550
|
+
style: { display: "none" },
|
|
551
|
+
onChange: (a) => {
|
|
552
|
+
var c;
|
|
553
|
+
a.preventDefault();
|
|
554
|
+
const i = new FileReader();
|
|
555
|
+
i.onload = (u) => {
|
|
556
|
+
var h;
|
|
557
|
+
(h = u == null ? void 0 : u.target) != null && h.result && t(u.target.result), n.current && (n.current.value = "");
|
|
558
|
+
};
|
|
559
|
+
const d = (c = a == null ? void 0 : a.target) == null ? void 0 : c.files;
|
|
560
|
+
d && i.readAsText(d[0]);
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
)
|
|
564
|
+
] });
|
|
565
|
+
}, ir = {
|
|
566
|
+
en: "English",
|
|
567
|
+
fr: "Français",
|
|
568
|
+
nl: "Nederlands"
|
|
569
|
+
}, Pe = {
|
|
570
|
+
en: {
|
|
571
|
+
select: "Select",
|
|
572
|
+
search: "Search",
|
|
573
|
+
no_information_to_display: "No information to display",
|
|
574
|
+
information_is_being_loaded: "The information is being loaded...",
|
|
575
|
+
delete: "Delete",
|
|
576
|
+
are_you_sure: "Are you sure?",
|
|
577
|
+
close: "Close",
|
|
578
|
+
save: "Save",
|
|
579
|
+
cancel: "Cancel",
|
|
580
|
+
ok: "OK",
|
|
581
|
+
your_email: "Your email",
|
|
582
|
+
enter_email: "Enter email address",
|
|
583
|
+
your_password: "Your password",
|
|
584
|
+
enter_password: "Enter password",
|
|
585
|
+
login: "Login",
|
|
586
|
+
logout: "Logout",
|
|
587
|
+
forgot_password: "Forgot password?",
|
|
588
|
+
reset_password: "Reset password",
|
|
589
|
+
required_field: "required",
|
|
590
|
+
choose_one: "Choose one",
|
|
591
|
+
everything: "Everything",
|
|
592
|
+
number_of_rows: "Number of rows",
|
|
593
|
+
modal_create: "New",
|
|
594
|
+
modal_edit: "Edit"
|
|
595
|
+
},
|
|
596
|
+
fr: {
|
|
597
|
+
select: "Sélectionner",
|
|
598
|
+
search: "Recherche",
|
|
599
|
+
no_information_to_display: "Aucune information à afficher",
|
|
600
|
+
information_is_being_loaded: "L'information est en cours de téléchargement...",
|
|
601
|
+
delete: "Supprimer",
|
|
602
|
+
are_you_sure: "Êtes-vous sûr?",
|
|
603
|
+
close: "Fermer",
|
|
604
|
+
save: "Sauvegarder",
|
|
605
|
+
cancel: "Annuler",
|
|
606
|
+
ok: "D'accord'",
|
|
607
|
+
your_email: "Votre adresse e-mail",
|
|
608
|
+
enter_email: "Entrez l'adresse e-mail",
|
|
609
|
+
your_password: "Votre mot de passe",
|
|
610
|
+
enter_password: "Entrez votre mot de passe",
|
|
611
|
+
login: "Connexion",
|
|
612
|
+
logout: "Se déconnecter",
|
|
613
|
+
forgot_password: "Mot de passe oublié?",
|
|
614
|
+
reset_password: "Réinitialiser le mot de passe",
|
|
615
|
+
required_field: "requis",
|
|
616
|
+
choose_one: "Choisissez-en un",
|
|
617
|
+
everything: "Tout",
|
|
618
|
+
number_of_rows: "Nombre de rangées",
|
|
619
|
+
modal_create: "Nouveau",
|
|
620
|
+
modal_edit: "Éditer"
|
|
621
|
+
},
|
|
622
|
+
nl: {
|
|
623
|
+
select: "Selecteer",
|
|
624
|
+
search: "Zoeken",
|
|
625
|
+
no_information_to_display: "Geen informatie om weer te geven.",
|
|
626
|
+
information_is_being_loaded: "De gegevens worden geladen...",
|
|
627
|
+
delete: "Verwijderen",
|
|
628
|
+
are_you_sure: "Weet u het zeker?",
|
|
629
|
+
close: "Sluiten",
|
|
630
|
+
save: "Opslaan",
|
|
631
|
+
cancel: "Annuleren",
|
|
632
|
+
ok: "OK",
|
|
633
|
+
your_email: "Uw e-mail",
|
|
634
|
+
enter_email: "Voer e-mailadres in",
|
|
635
|
+
your_password: "Uw wachtwoord",
|
|
636
|
+
enter_password: "Voer wachtwoord in",
|
|
637
|
+
login: "Inloggen",
|
|
638
|
+
logout: "Uitloggen",
|
|
639
|
+
forgot_password: "Wachtwoord vergeten?",
|
|
640
|
+
reset_password: "Wachtwoord resetten",
|
|
641
|
+
required_field: "verplicht",
|
|
642
|
+
choose_one: "Maak een keuze",
|
|
643
|
+
everything: "Alles",
|
|
644
|
+
number_of_rows: "Aantal rijen",
|
|
645
|
+
modal_create: "Nieuw",
|
|
646
|
+
modal_edit: "Bewerken"
|
|
647
|
+
}
|
|
648
|
+
}, he = "This function should only be used in a child of LocalizationProvider.", sr = (...e) => {
|
|
649
|
+
if (e.length === 0)
|
|
650
|
+
return {};
|
|
651
|
+
const t = e.filter((n) => n && Object.keys(n).length > 0);
|
|
652
|
+
return t.length === 0 ? {} : [...new Set(t.flatMap(Object.keys))].reduce(
|
|
653
|
+
(n, a) => ({
|
|
654
|
+
...n,
|
|
655
|
+
[a]: t.reduce(
|
|
656
|
+
(i, d) => ({ ...i, ...d[a] || {} }),
|
|
657
|
+
{}
|
|
658
|
+
)
|
|
659
|
+
}),
|
|
660
|
+
{}
|
|
661
|
+
);
|
|
662
|
+
}, be = D.createContext({
|
|
663
|
+
lang: "en",
|
|
664
|
+
languages: Object.keys(ir),
|
|
665
|
+
setLanguage: (e) => console.error(he),
|
|
666
|
+
text: (e, ...t) => (console.error(he), e[0]),
|
|
667
|
+
textByLang: (e) => (t, ...o) => (console.error(he), t[0]),
|
|
668
|
+
strings: new Ae({ en: {} }),
|
|
669
|
+
localizationStrings: {},
|
|
670
|
+
setLocalization: (e) => console.error(he)
|
|
671
|
+
}), on = ({
|
|
672
|
+
lang: e = "en",
|
|
673
|
+
localization: t = {},
|
|
674
|
+
languages: o,
|
|
675
|
+
children: n,
|
|
676
|
+
...a
|
|
677
|
+
}) => {
|
|
678
|
+
const [i, d] = H(t), [c, u] = H(e), h = Array.from(/* @__PURE__ */ new Set([
|
|
679
|
+
...o || Object.keys(Pe),
|
|
680
|
+
...Object.keys(i)
|
|
681
|
+
])), m = fe(() => h.reduce(
|
|
682
|
+
(C, f) => ({
|
|
683
|
+
...C,
|
|
684
|
+
[f]: {
|
|
685
|
+
...Pe[f] || {},
|
|
686
|
+
...i[f] || {}
|
|
687
|
+
}
|
|
688
|
+
}),
|
|
689
|
+
{}
|
|
690
|
+
), [h, i]), v = fe(() => {
|
|
691
|
+
const C = new Ae(m);
|
|
692
|
+
return C.setLanguage(c), C;
|
|
693
|
+
}, [m, c]), b = (C) => {
|
|
694
|
+
d((f) => sr(f, C));
|
|
695
|
+
}, j = (C) => (f, ...P) => {
|
|
696
|
+
const x = v.getString(f[0], C);
|
|
697
|
+
if (x) {
|
|
698
|
+
if (typeof x == "function")
|
|
699
|
+
return x.length !== P.length ? (console.error(
|
|
700
|
+
`Language function "${f[0]}" expects exactly ${x.length} argument${x.length === 1 ? "" : "s"}. ` + (x.length > 0 ? ` Use text\`${f[0]}\${arg1}\${arg2}\`` : ` Use text\`${f[0]}\``)
|
|
701
|
+
), x.length > 0 ? `${f[0]}\${arg1}\${arg2}` : f[0]) : x(...P);
|
|
702
|
+
} else return console.error(`Language string not found: "${f[0]}"`), f[0];
|
|
703
|
+
return x;
|
|
704
|
+
};
|
|
705
|
+
return /* @__PURE__ */ r.jsx(
|
|
706
|
+
be.Provider,
|
|
707
|
+
{
|
|
708
|
+
value: {
|
|
709
|
+
lang: c,
|
|
710
|
+
languages: h,
|
|
711
|
+
setLanguage: (C) => {
|
|
712
|
+
if (!h.includes(C)) {
|
|
713
|
+
console.error(`Language ${C} not available`);
|
|
714
|
+
return;
|
|
715
|
+
}
|
|
716
|
+
u(C);
|
|
717
|
+
},
|
|
718
|
+
strings: v,
|
|
719
|
+
text: j(c),
|
|
720
|
+
textByLang: j,
|
|
721
|
+
localizationStrings: m,
|
|
722
|
+
setLocalization: b,
|
|
723
|
+
...a
|
|
724
|
+
},
|
|
725
|
+
children: n
|
|
726
|
+
}
|
|
727
|
+
);
|
|
728
|
+
}, K = () => W(be), an = ({ style: e = {} }) => {
|
|
729
|
+
const { strings: t } = K();
|
|
730
|
+
return /* @__PURE__ */ r.jsx(_e, { children: /* @__PURE__ */ r.jsx(ve, { className: "error-page", children: /* @__PURE__ */ r.jsx(q, { children: /* @__PURE__ */ r.jsxs(
|
|
731
|
+
"div",
|
|
732
|
+
{
|
|
733
|
+
style: {
|
|
734
|
+
padding: "2rem 1rem",
|
|
735
|
+
marginBottom: "2rem",
|
|
736
|
+
backgroundColor: "#e9ecef",
|
|
737
|
+
borderRadius: ".3rem"
|
|
738
|
+
},
|
|
739
|
+
children: [
|
|
740
|
+
/* @__PURE__ */ r.jsx(me, { animation: "border", role: "status", style: { marginRight: "20px", ...e } }),
|
|
741
|
+
t.getString("information_is_being_loaded")
|
|
742
|
+
]
|
|
743
|
+
}
|
|
744
|
+
) }) }) });
|
|
745
|
+
}, Ge = ({ style: e = {}, component: t = Y, className: o }) => t ? /* @__PURE__ */ r.jsx(
|
|
746
|
+
t,
|
|
747
|
+
{
|
|
748
|
+
...o ? { className: o } : {},
|
|
749
|
+
variant: "link",
|
|
750
|
+
disabled: !0,
|
|
751
|
+
size: "sm",
|
|
752
|
+
style: e,
|
|
753
|
+
children: /* @__PURE__ */ r.jsx(me, { animation: "border", role: "status", size: "sm" })
|
|
754
|
+
}
|
|
755
|
+
) : /* @__PURE__ */ r.jsx(
|
|
756
|
+
me,
|
|
757
|
+
{
|
|
758
|
+
...o ? { className: o } : {},
|
|
759
|
+
animation: "border",
|
|
760
|
+
role: "status",
|
|
761
|
+
size: "sm"
|
|
762
|
+
}
|
|
763
|
+
), sn = () => /* @__PURE__ */ r.jsx(me, { animation: "border", role: "status" }), lr = ({
|
|
764
|
+
modalTitle: e,
|
|
765
|
+
modalBody: t,
|
|
766
|
+
confirmText: o,
|
|
767
|
+
cancelText: n,
|
|
768
|
+
onConfirm: a,
|
|
769
|
+
buttonComponent: i,
|
|
770
|
+
loading: d,
|
|
771
|
+
closeUsingCallback: c,
|
|
772
|
+
...u
|
|
773
|
+
}) => {
|
|
774
|
+
const [h, m] = H(!1), { strings: v } = W(be);
|
|
775
|
+
return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
776
|
+
/* @__PURE__ */ r.jsx(
|
|
777
|
+
i,
|
|
778
|
+
{
|
|
779
|
+
...u,
|
|
780
|
+
onClick: () => m(!0)
|
|
781
|
+
}
|
|
782
|
+
),
|
|
783
|
+
h && /* @__PURE__ */ r.jsxs(
|
|
784
|
+
U,
|
|
785
|
+
{
|
|
786
|
+
show: !0,
|
|
787
|
+
onHide: () => m(!1),
|
|
788
|
+
onClick: (b) => b.stopPropagation(),
|
|
789
|
+
centered: !0,
|
|
790
|
+
children: [
|
|
791
|
+
/* @__PURE__ */ r.jsx(U.Header, { closeButton: !0, children: /* @__PURE__ */ r.jsx(U.Title, { children: e }) }),
|
|
792
|
+
/* @__PURE__ */ r.jsx(U.Body, { children: t || v.getString("are_you_sure") }),
|
|
793
|
+
/* @__PURE__ */ r.jsxs(U.Footer, { children: [
|
|
794
|
+
d && /* @__PURE__ */ r.jsx(Ge, {}),
|
|
795
|
+
/* @__PURE__ */ r.jsx(
|
|
796
|
+
Y,
|
|
797
|
+
{
|
|
798
|
+
variant: "secondary",
|
|
799
|
+
onClick: () => m(!1),
|
|
800
|
+
children: n || v.getString("cancel")
|
|
801
|
+
}
|
|
802
|
+
),
|
|
803
|
+
/* @__PURE__ */ r.jsx(
|
|
804
|
+
Y,
|
|
805
|
+
{
|
|
806
|
+
variant: "primary",
|
|
807
|
+
onClick: async () => {
|
|
808
|
+
await a(() => m(!1)), c || m(!1);
|
|
809
|
+
},
|
|
810
|
+
children: o || v.getString("ok")
|
|
811
|
+
}
|
|
812
|
+
)
|
|
813
|
+
] })
|
|
814
|
+
]
|
|
815
|
+
}
|
|
816
|
+
)
|
|
817
|
+
] });
|
|
818
|
+
}, ln = ({
|
|
819
|
+
modalTitle: e,
|
|
820
|
+
modalBody: t,
|
|
821
|
+
confirmText: o,
|
|
822
|
+
onDelete: n,
|
|
823
|
+
...a
|
|
824
|
+
}) => {
|
|
825
|
+
const { strings: i } = W(be);
|
|
826
|
+
return /* @__PURE__ */ r.jsx(
|
|
827
|
+
lr,
|
|
828
|
+
{
|
|
829
|
+
...a,
|
|
830
|
+
modalTitle: e || i.getString("delete"),
|
|
831
|
+
modalBody: t || i.getString("are_you_sure"),
|
|
832
|
+
confirmText: o || i.getString("delete"),
|
|
833
|
+
onConfirm: n,
|
|
834
|
+
buttonComponent: tr
|
|
835
|
+
}
|
|
836
|
+
);
|
|
837
|
+
}, Je = (e) => {
|
|
838
|
+
const t = Se(void 0);
|
|
839
|
+
return G(() => {
|
|
840
|
+
t.current = e;
|
|
841
|
+
}), t.current;
|
|
842
|
+
}, cn = (e, t, o) => {
|
|
843
|
+
G(() => {
|
|
844
|
+
const n = setTimeout(() => e(), o);
|
|
845
|
+
return () => clearTimeout(n);
|
|
846
|
+
}, [...t || [], o]);
|
|
847
|
+
}, cr = () => {
|
|
848
|
+
const [, e] = H(null);
|
|
849
|
+
return ce(() => e({}), []);
|
|
850
|
+
}, Ke = (e) => {
|
|
851
|
+
const [t, o] = H(e), n = ce((a, i) => {
|
|
852
|
+
o((d) => ({ ...d, ...a })), i && Promise.resolve().then(i);
|
|
853
|
+
}, []);
|
|
854
|
+
return [t, n];
|
|
855
|
+
}, dn = (e, t) => G(() => {
|
|
856
|
+
if (typeof e != "function")
|
|
857
|
+
throw "First argument of useInterval should be a function";
|
|
858
|
+
if (typeof t != "number" || !isFinite(t) || t <= 0)
|
|
859
|
+
throw "Second argument of useInterval should be a positive number";
|
|
860
|
+
const o = setInterval(e, t);
|
|
861
|
+
return () => clearInterval(o);
|
|
862
|
+
}, []), un = (e, t) => {
|
|
863
|
+
const [o, n] = H(() => {
|
|
864
|
+
try {
|
|
865
|
+
const i = localStorage.getItem(e);
|
|
866
|
+
return i === null ? (localStorage.setItem(e, JSON.stringify(t)), t) : JSON.parse(i);
|
|
867
|
+
} catch (i) {
|
|
868
|
+
return console.error("Error reading from localStorage:", i), t;
|
|
869
|
+
}
|
|
870
|
+
});
|
|
871
|
+
G(() => {
|
|
872
|
+
const i = (d) => {
|
|
873
|
+
if (d.key === e && d.newValue)
|
|
874
|
+
try {
|
|
875
|
+
n(JSON.parse(d.newValue));
|
|
876
|
+
} catch (c) {
|
|
877
|
+
console.error("Error parsing localStorage value:", c);
|
|
878
|
+
}
|
|
879
|
+
};
|
|
880
|
+
return window.addEventListener("storage", i), () => window.removeEventListener("storage", i);
|
|
881
|
+
}, [e]);
|
|
882
|
+
const a = ce((i) => {
|
|
883
|
+
try {
|
|
884
|
+
n(i), localStorage.setItem(e, JSON.stringify(i)), window.dispatchEvent(new StorageEvent("storage", {
|
|
885
|
+
key: e,
|
|
886
|
+
newValue: JSON.stringify(i),
|
|
887
|
+
oldValue: localStorage.getItem(e)
|
|
888
|
+
}));
|
|
889
|
+
} catch (d) {
|
|
890
|
+
console.error("Error writing to localStorage:", d);
|
|
891
|
+
}
|
|
892
|
+
}, [e]);
|
|
893
|
+
return [o, a];
|
|
894
|
+
}, Fe = (e) => e == null || e === !1 || typeof e == "object" && Object.keys(e).length === 0 || typeof e == "string" && e.trim().length === 0, hn = (e) => e.replace(
|
|
895
|
+
/([-_])(.)/g,
|
|
896
|
+
(t, o, n) => n.toUpperCase()
|
|
897
|
+
), fn = (e) => e.replace(/([a-z])([A-Z])/g, "$1_$2").replace(/([a-zA-Z])([0-9])/g, "$1_$2").replace(/([0-9])([a-zA-Z])/g, "$1_$2").toUpperCase(), mn = (e) => {
|
|
898
|
+
if (e.slice(-1) !== "s" && e.slice(-1) !== "S")
|
|
899
|
+
return e;
|
|
900
|
+
if (e.slice(-3).toLowerCase() === "ies") {
|
|
901
|
+
const t = e.slice(0, -3), o = e.slice(-3, -2);
|
|
902
|
+
return `${t}${o === o.toUpperCase() ? "Y" : "y"}`;
|
|
903
|
+
} else
|
|
904
|
+
return e.slice(0, -1);
|
|
905
|
+
}, gn = (e, t) => Object.fromEntries(e.map((o) => [o[t], o])), pn = (e, t) => parseFloat(`${e}`).toFixed(t || 0), vn = (e, t) => parseFloat(parseFloat(`${e}`).toFixed(t || 0)), xn = async (e, t, o = {}) => {
|
|
906
|
+
try {
|
|
907
|
+
const a = await (o.fetchFn || fetch)(e, {
|
|
908
|
+
method: "GET",
|
|
909
|
+
headers: o.headers || {}
|
|
910
|
+
});
|
|
911
|
+
if (!a.ok)
|
|
912
|
+
throw new Error(`HTTP error! status: ${a.status}`);
|
|
913
|
+
const i = await a.blob(), d = window.URL.createObjectURL(i), c = document.createElement("a");
|
|
914
|
+
c.href = d, c.setAttribute("download", t), document.body.appendChild(c), c.click(), document.body.removeChild(c), window.URL.revokeObjectURL(d);
|
|
915
|
+
} catch (n) {
|
|
916
|
+
throw console.error("Download failed:", n), n;
|
|
917
|
+
}
|
|
918
|
+
}, dr = {
|
|
919
|
+
formFields: {},
|
|
920
|
+
formId: "",
|
|
921
|
+
formData: null,
|
|
922
|
+
initialFormData: null,
|
|
923
|
+
pristine: !0,
|
|
924
|
+
validated: !1,
|
|
925
|
+
validationErrors: {},
|
|
926
|
+
loading: !1,
|
|
927
|
+
getValue: () => "",
|
|
928
|
+
setValue: () => console.error("setValue should only be used within a FormProvider"),
|
|
929
|
+
setFormData: () => console.error("setFormData should only be used within a FormProvider"),
|
|
930
|
+
resetForm: () => console.error("resetForm should only be used within a FormProvider"),
|
|
931
|
+
submit: () => console.error("submit should only be used within a FormProvider"),
|
|
932
|
+
setPristine: () => console.error("setPristine should only be used within a FormProvider"),
|
|
933
|
+
setLoading: () => console.error("setLoading should only be used within a FormProvider"),
|
|
934
|
+
hasProvider: !1
|
|
935
|
+
}, Xe = tt(dr), je = () => W(Xe), ke = ({
|
|
936
|
+
formFields: e,
|
|
937
|
+
initialState: t = {},
|
|
938
|
+
onSubmit: o,
|
|
939
|
+
validate: n,
|
|
940
|
+
loading: a = !1,
|
|
941
|
+
children: i,
|
|
942
|
+
resetTrigger: d
|
|
943
|
+
}) => {
|
|
944
|
+
const { strings: c } = K(), u = rt();
|
|
945
|
+
if (!e)
|
|
946
|
+
return console.error("Property formFields cannot be empty."), null;
|
|
947
|
+
const h = () => ({
|
|
948
|
+
...Object.entries(e).reduce((E, [_, { initialValue: k }]) => ({ ...E, [_]: k || "" }), {}),
|
|
949
|
+
...t || {}
|
|
950
|
+
}), [m, v] = H(h()), [{ pristine: b, formData: j, internalLoading: C }, f] = Ke({
|
|
951
|
+
pristine: !0,
|
|
952
|
+
formData: m,
|
|
953
|
+
internalLoading: !1
|
|
954
|
+
}), P = Je(d);
|
|
955
|
+
G(() => {
|
|
956
|
+
if (d !== void 0 && P !== d) {
|
|
957
|
+
const E = h();
|
|
958
|
+
v(E), f({
|
|
959
|
+
pristine: !0,
|
|
960
|
+
formData: E
|
|
961
|
+
});
|
|
962
|
+
}
|
|
963
|
+
}, [d, P]);
|
|
964
|
+
const x = (E) => {
|
|
965
|
+
const _ = j[E];
|
|
966
|
+
return _ ?? ((e[E] || {}).type === "number" ? "0" : "");
|
|
967
|
+
}, F = (E, _) => {
|
|
968
|
+
var Z;
|
|
969
|
+
const k = (Z = e[E]) == null ? void 0 : Z.onChange, $ = typeof k == "function" ? { ...j, ...k(_, j) } : { ...j, [E]: _ };
|
|
970
|
+
f({ formData: $ });
|
|
971
|
+
}, O = (E) => {
|
|
972
|
+
f({ formData: { ...j, ...E } });
|
|
973
|
+
}, z = () => {
|
|
974
|
+
const E = h();
|
|
975
|
+
v(E), f({
|
|
976
|
+
pristine: !0,
|
|
977
|
+
formData: E
|
|
978
|
+
});
|
|
979
|
+
}, M = {
|
|
980
|
+
...n ? Object.entries(n(j) || {}).reduce(
|
|
981
|
+
(E, [_, k]) => Fe(k) ? E : { ...E, [_]: k },
|
|
982
|
+
{}
|
|
983
|
+
) : {},
|
|
984
|
+
...Object.keys(j).reduce(
|
|
985
|
+
(E, _) => !e[_] || !e[_].required || !Fe(x(_)) ? E : { ...E, [_]: c.getString("required_field") },
|
|
986
|
+
{}
|
|
987
|
+
)
|
|
988
|
+
}, y = Object.values(M).length === 0, N = {
|
|
989
|
+
formFields: e,
|
|
990
|
+
formId: u,
|
|
991
|
+
formData: j,
|
|
992
|
+
initialFormData: m,
|
|
993
|
+
pristine: b,
|
|
994
|
+
validated: y,
|
|
995
|
+
validationErrors: M,
|
|
996
|
+
loading: a || C,
|
|
997
|
+
getValue: x,
|
|
998
|
+
setValue: F,
|
|
999
|
+
setFormData: O,
|
|
1000
|
+
resetForm: z,
|
|
1001
|
+
submit: () => {
|
|
1002
|
+
f({ pristine: !1 }), y && (f({ internalLoading: !0 }), o(
|
|
1003
|
+
j,
|
|
1004
|
+
() => f({ internalLoading: !1 })
|
|
1005
|
+
));
|
|
1006
|
+
},
|
|
1007
|
+
setPristine: (E) => {
|
|
1008
|
+
f({ pristine: E });
|
|
1009
|
+
},
|
|
1010
|
+
setLoading: (E) => {
|
|
1011
|
+
f({ internalLoading: E });
|
|
1012
|
+
},
|
|
1013
|
+
hasProvider: !0
|
|
1014
|
+
};
|
|
1015
|
+
return /* @__PURE__ */ r.jsx(Xe.Provider, { value: N, children: i });
|
|
1016
|
+
}, bn = ({ children: e, ...t }) => {
|
|
1017
|
+
const { formFields: o, hasProvider: n } = je();
|
|
1018
|
+
return !n || !o ? (console.error("FormField must be used within a FormProvider"), null) : o[t.name] ? e ? /* @__PURE__ */ r.jsx("div", { className: "form-group", children: e }) : /* @__PURE__ */ r.jsx(ne, { ...t }) : (console.error(`FormField: No field configuration found for "${t.name}"`), null);
|
|
1019
|
+
}, oe = (e) => {
|
|
1020
|
+
const { name: t, label: o, required: n, className: a, ...i } = e, {
|
|
1021
|
+
getValue: d,
|
|
1022
|
+
setValue: c,
|
|
1023
|
+
formFields: u,
|
|
1024
|
+
formId: h,
|
|
1025
|
+
validationErrors: m,
|
|
1026
|
+
pristine: v,
|
|
1027
|
+
validated: b,
|
|
1028
|
+
submit: j,
|
|
1029
|
+
hasProvider: C
|
|
1030
|
+
} = je();
|
|
1031
|
+
if (!C)
|
|
1032
|
+
return console.error("useFormField must be used within a FormProvider"), {
|
|
1033
|
+
value: "",
|
|
1034
|
+
onChange: () => {
|
|
1035
|
+
},
|
|
1036
|
+
isInvalid: !1,
|
|
1037
|
+
error: null,
|
|
1038
|
+
label: void 0,
|
|
1039
|
+
required: !1,
|
|
1040
|
+
mergedProps: {},
|
|
1041
|
+
submit: () => {
|
|
1042
|
+
},
|
|
1043
|
+
formId: ""
|
|
1044
|
+
};
|
|
1045
|
+
const f = u[t];
|
|
1046
|
+
f || console.error(`useFormField: No field configuration found for "${t}"`);
|
|
1047
|
+
const P = !v && !b && !!m[t], x = P ? m[t] : null, F = o !== void 0 ? o : f == null ? void 0 : f.label, O = n !== void 0 ? n : f == null ? void 0 : f.required, z = { ...f == null ? void 0 : f.formProps, ...i };
|
|
1048
|
+
return {
|
|
1049
|
+
value: d(t),
|
|
1050
|
+
onChange: (M) => c(t, M),
|
|
1051
|
+
isInvalid: P,
|
|
1052
|
+
error: x,
|
|
1053
|
+
label: F,
|
|
1054
|
+
required: O,
|
|
1055
|
+
mergedProps: z,
|
|
1056
|
+
submit: j,
|
|
1057
|
+
formId: h,
|
|
1058
|
+
className: a
|
|
1059
|
+
};
|
|
1060
|
+
}, ne = (e) => {
|
|
1061
|
+
const { value: t, onChange: o, isInvalid: n, error: a, label: i, required: d, mergedProps: c, submit: u, formId: h, className: m } = oe(e), v = n && a ? `${h}-${e.name}-error` : void 0, b = `${h}-${e.name}`;
|
|
1062
|
+
return /* @__PURE__ */ r.jsxs(w.Group, { controlId: b, className: m, children: [
|
|
1063
|
+
i && /* @__PURE__ */ r.jsxs(w.Label, { children: [
|
|
1064
|
+
i,
|
|
1065
|
+
d && " *"
|
|
1066
|
+
] }),
|
|
1067
|
+
n && a && /* @__PURE__ */ r.jsx(w.Text, { id: v, className: "text-danger", children: a }),
|
|
1068
|
+
/* @__PURE__ */ r.jsx(
|
|
1069
|
+
w.Control,
|
|
1070
|
+
{
|
|
1071
|
+
autoComplete: "off",
|
|
1072
|
+
...c,
|
|
1073
|
+
value: t || "",
|
|
1074
|
+
isInvalid: n,
|
|
1075
|
+
"aria-describedby": v,
|
|
1076
|
+
onChange: (j) => {
|
|
1077
|
+
o(j.target.value);
|
|
1078
|
+
},
|
|
1079
|
+
onKeyDown: (j) => {
|
|
1080
|
+
j.key === "Enter" && c.as !== "textarea" && (j.preventDefault(), u());
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
)
|
|
1084
|
+
] });
|
|
1085
|
+
}, jn = ({ rows: e = 3, ...t }) => /* @__PURE__ */ r.jsx(ne, { as: "textarea", rows: e, ...t }), Cn = (e) => /* @__PURE__ */ r.jsx(ne, { type: "date", ...e }), yn = ({ value: e, onChange: t, timezone: o, ...n }) => {
|
|
1086
|
+
const a = (d) => {
|
|
1087
|
+
if (!d) return "";
|
|
1088
|
+
try {
|
|
1089
|
+
const c = typeof d == "string" ? new Date(d) : d;
|
|
1090
|
+
if (isNaN(c.getTime())) return "";
|
|
1091
|
+
const u = c.getFullYear(), h = String(c.getMonth() + 1).padStart(2, "0"), m = String(c.getDate()).padStart(2, "0"), v = String(c.getHours()).padStart(2, "0"), b = String(c.getMinutes()).padStart(2, "0");
|
|
1092
|
+
return `${u}-${h}-${m}T${v}:${b}`;
|
|
1093
|
+
} catch {
|
|
1094
|
+
return "";
|
|
1095
|
+
}
|
|
1096
|
+
}, i = (d) => {
|
|
1097
|
+
if (t) {
|
|
1098
|
+
if (!d) {
|
|
1099
|
+
t("");
|
|
1100
|
+
return;
|
|
1101
|
+
}
|
|
1102
|
+
try {
|
|
1103
|
+
const c = new Date(d);
|
|
1104
|
+
if (isNaN(c.getTime())) {
|
|
1105
|
+
t("");
|
|
1106
|
+
return;
|
|
1107
|
+
}
|
|
1108
|
+
t(c.toISOString());
|
|
1109
|
+
} catch {
|
|
1110
|
+
t("");
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
};
|
|
1114
|
+
return /* @__PURE__ */ r.jsx(
|
|
1115
|
+
ne,
|
|
1116
|
+
{
|
|
1117
|
+
type: "datetime-local",
|
|
1118
|
+
value: a(e),
|
|
1119
|
+
onChange: i,
|
|
1120
|
+
...n
|
|
1121
|
+
}
|
|
1122
|
+
);
|
|
1123
|
+
}, ur = (e) => {
|
|
1124
|
+
const { value: t, onChange: o, isInvalid: n, error: a, label: i, required: d, mergedProps: c, formId: u, className: h } = oe(e), { options: m = [], placeholder: v = "Choose..." } = e, b = `${u}-${e.name}`;
|
|
1125
|
+
return /* @__PURE__ */ r.jsxs(w.Group, { controlId: b, className: h, children: [
|
|
1126
|
+
i && /* @__PURE__ */ r.jsxs(w.Label, { children: [
|
|
1127
|
+
i,
|
|
1128
|
+
d && " *"
|
|
1129
|
+
] }),
|
|
1130
|
+
n && a && /* @__PURE__ */ r.jsx(w.Text, { className: "text-danger", children: a }),
|
|
1131
|
+
/* @__PURE__ */ r.jsxs(
|
|
1132
|
+
w.Select,
|
|
1133
|
+
{
|
|
1134
|
+
...c,
|
|
1135
|
+
value: t || "",
|
|
1136
|
+
isInvalid: n,
|
|
1137
|
+
onChange: (j) => {
|
|
1138
|
+
o(j.target.value);
|
|
1139
|
+
},
|
|
1140
|
+
children: [
|
|
1141
|
+
/* @__PURE__ */ r.jsx("option", { value: "", disabled: !0, children: v }),
|
|
1142
|
+
m.map((j, C) => /* @__PURE__ */ r.jsx(
|
|
1143
|
+
"option",
|
|
1144
|
+
{
|
|
1145
|
+
value: j.value,
|
|
1146
|
+
disabled: j.disabled,
|
|
1147
|
+
children: j.label
|
|
1148
|
+
},
|
|
1149
|
+
C
|
|
1150
|
+
))
|
|
1151
|
+
]
|
|
1152
|
+
}
|
|
1153
|
+
)
|
|
1154
|
+
] });
|
|
1155
|
+
}, hr = (e) => {
|
|
1156
|
+
const { value: t, onChange: o, isInvalid: n, error: a, label: i, required: d, mergedProps: c, formId: u, className: h } = oe(e), m = n && a ? `${u}-${e.name}-error` : void 0, v = `${u}-${e.name}`;
|
|
1157
|
+
return /* @__PURE__ */ r.jsxs(w.Group, { controlId: v, className: `mt-2 mb-2${h ? ` ${h}` : ""}`, children: [
|
|
1158
|
+
n && a && /* @__PURE__ */ r.jsx(w.Text, { id: m, className: "text-danger", children: a }),
|
|
1159
|
+
/* @__PURE__ */ r.jsx(
|
|
1160
|
+
w.Check,
|
|
1161
|
+
{
|
|
1162
|
+
type: "checkbox",
|
|
1163
|
+
...c,
|
|
1164
|
+
checked: !!t,
|
|
1165
|
+
isInvalid: n,
|
|
1166
|
+
"aria-describedby": m,
|
|
1167
|
+
onChange: (b) => {
|
|
1168
|
+
o(b.target.checked);
|
|
1169
|
+
},
|
|
1170
|
+
label: i ? /* @__PURE__ */ r.jsxs("span", { children: [
|
|
1171
|
+
i,
|
|
1172
|
+
d && " *"
|
|
1173
|
+
] }) : void 0
|
|
1174
|
+
}
|
|
1175
|
+
)
|
|
1176
|
+
] });
|
|
1177
|
+
}, wn = (e) => {
|
|
1178
|
+
const { value: t, onChange: o, isInvalid: n, error: a, label: i, required: d, mergedProps: c, formId: u, className: h } = oe(e), m = n && a ? `${u}-${e.name}-error` : void 0, v = `${u}-${e.name}`;
|
|
1179
|
+
return /* @__PURE__ */ r.jsxs(w.Group, { controlId: v, className: h, children: [
|
|
1180
|
+
n && a && /* @__PURE__ */ r.jsx(w.Text, { id: m, className: "text-danger", children: a }),
|
|
1181
|
+
/* @__PURE__ */ r.jsx(
|
|
1182
|
+
w.Check,
|
|
1183
|
+
{
|
|
1184
|
+
type: "switch",
|
|
1185
|
+
...c,
|
|
1186
|
+
checked: !!t,
|
|
1187
|
+
isInvalid: n,
|
|
1188
|
+
"aria-describedby": m,
|
|
1189
|
+
onChange: (b) => {
|
|
1190
|
+
o(b.target.checked);
|
|
1191
|
+
},
|
|
1192
|
+
label: i ? /* @__PURE__ */ r.jsxs("span", { children: [
|
|
1193
|
+
i,
|
|
1194
|
+
d && " *"
|
|
1195
|
+
] }) : void 0
|
|
1196
|
+
}
|
|
1197
|
+
)
|
|
1198
|
+
] });
|
|
1199
|
+
}, fr = (e) => {
|
|
1200
|
+
const {
|
|
1201
|
+
list: t,
|
|
1202
|
+
options: o,
|
|
1203
|
+
idKey: n = "value",
|
|
1204
|
+
// Change default to match test
|
|
1205
|
+
nameKey: a = "label",
|
|
1206
|
+
// Change default to match test
|
|
1207
|
+
disabled: i,
|
|
1208
|
+
...d
|
|
1209
|
+
} = e, { value: c, onChange: u, isInvalid: h, error: m, label: v, required: b, mergedProps: j, submit: C, formId: f, className: P } = oe(d), x = o || t, [F, O] = fe(() => {
|
|
1210
|
+
if (!x || !Array.isArray(x))
|
|
1211
|
+
return [null, null];
|
|
1212
|
+
if (x.length > 0 && typeof x[0] == "string")
|
|
1213
|
+
return [x.map((y) => ({
|
|
1214
|
+
value: y,
|
|
1215
|
+
label: y
|
|
1216
|
+
})), null];
|
|
1217
|
+
if (x.length > 0 && typeof x[0] == "object") {
|
|
1218
|
+
const M = x == null ? void 0 : x.find((y) => !["number", "string"].includes(typeof y[n]) || !["number", "string"].includes(typeof y[a]));
|
|
1219
|
+
if (M) return [null, M];
|
|
1220
|
+
}
|
|
1221
|
+
return [x, null];
|
|
1222
|
+
}, [x, n, a]);
|
|
1223
|
+
if (!F)
|
|
1224
|
+
return console.error(
|
|
1225
|
+
`FormDropdown Error:
|
|
1226
|
+
- Each item in 'list' must include a valid 'idKey' (${String(n)}) and 'nameKey' (${String(a)}).
|
|
1227
|
+
- Both keys must exist on every item and be of type 'string' or 'number'.
|
|
1228
|
+
- One or more items failed this check.
|
|
1229
|
+
|
|
1230
|
+
Received list:`,
|
|
1231
|
+
x,
|
|
1232
|
+
...O ? ["First mismatch:", O] : []
|
|
1233
|
+
), null;
|
|
1234
|
+
F.find((M) => M[n] === c);
|
|
1235
|
+
const z = `${f}-${e.name}`;
|
|
1236
|
+
return /* @__PURE__ */ r.jsxs(w.Group, { controlId: z, className: P, children: [
|
|
1237
|
+
v && /* @__PURE__ */ r.jsxs(w.Label, { children: [
|
|
1238
|
+
v,
|
|
1239
|
+
b && " *"
|
|
1240
|
+
] }),
|
|
1241
|
+
h && m && /* @__PURE__ */ r.jsx(w.Text, { className: "text-danger", children: m }),
|
|
1242
|
+
/* @__PURE__ */ r.jsx(
|
|
1243
|
+
w.Select,
|
|
1244
|
+
{
|
|
1245
|
+
value: c || "",
|
|
1246
|
+
isInvalid: h,
|
|
1247
|
+
onChange: (M) => u(M.target.value),
|
|
1248
|
+
onKeyDown: (M) => {
|
|
1249
|
+
M.key === "Enter" && (M.preventDefault(), C());
|
|
1250
|
+
},
|
|
1251
|
+
...j,
|
|
1252
|
+
children: F.map(
|
|
1253
|
+
(M, y) => /* @__PURE__ */ r.jsx(
|
|
1254
|
+
"option",
|
|
1255
|
+
{
|
|
1256
|
+
value: M[n],
|
|
1257
|
+
disabled: typeof i == "function" ? i({ list: F, value: M[n], state: {}, initialState: {}, initialValue: "" }) : i,
|
|
1258
|
+
children: M[a]
|
|
1259
|
+
},
|
|
1260
|
+
y
|
|
1261
|
+
)
|
|
1262
|
+
)
|
|
1263
|
+
}
|
|
1264
|
+
)
|
|
1265
|
+
] });
|
|
1266
|
+
}, mr = ({ selected: e = !0, disabled: t, cursor: o, onClick: n, style: a, bg: i, ...d }) => /* @__PURE__ */ r.jsx(
|
|
1267
|
+
ze,
|
|
1268
|
+
{
|
|
1269
|
+
bg: i || (e ? "primary" : "secondary"),
|
|
1270
|
+
style: {
|
|
1271
|
+
userSelect: "none",
|
|
1272
|
+
...o ? { cursor: o } : {},
|
|
1273
|
+
...a || {}
|
|
1274
|
+
},
|
|
1275
|
+
className: "mx-1",
|
|
1276
|
+
...t ? {} : { onClick: n },
|
|
1277
|
+
...d
|
|
1278
|
+
}
|
|
1279
|
+
), Sn = (e) => {
|
|
1280
|
+
const {
|
|
1281
|
+
list: t,
|
|
1282
|
+
idKey: o = "value",
|
|
1283
|
+
multiple: n,
|
|
1284
|
+
integer: a,
|
|
1285
|
+
disabled: i,
|
|
1286
|
+
className: d,
|
|
1287
|
+
...c
|
|
1288
|
+
} = e, { value: u, onChange: h, isInvalid: m, error: v, label: b, required: j, mergedProps: C, formId: f } = oe(c), P = n || n === !1 ? n : u instanceof Array, x = (O) => a ? parseInt(`${O}`) : `${O}`, F = `${f}-${e.name}`;
|
|
1289
|
+
return t || console.error("Missing required list property in FormBadgesSelection"), /* @__PURE__ */ r.jsxs(w.Group, { controlId: F, className: d, children: [
|
|
1290
|
+
b && /* @__PURE__ */ r.jsxs(w.Label, { children: [
|
|
1291
|
+
b,
|
|
1292
|
+
j && " *"
|
|
1293
|
+
] }),
|
|
1294
|
+
m && v && /* @__PURE__ */ r.jsx(w.Text, { className: "text-danger", children: v }),
|
|
1295
|
+
/* @__PURE__ */ r.jsx("div", { className: `form-control ${m ? "is-invalid" : ""}`, children: t.map((O, z) => {
|
|
1296
|
+
const M = P ? !!u && Array.isArray(u) && u.includes(O[o]) : u === O[o];
|
|
1297
|
+
return /* @__PURE__ */ r.jsx(
|
|
1298
|
+
mr,
|
|
1299
|
+
{
|
|
1300
|
+
disabled: typeof i == "function" ? i({ list: t, value: O[o], state: {}, initialState: {}, initialValue: "" }) : i,
|
|
1301
|
+
selected: M,
|
|
1302
|
+
cursor: "pointer",
|
|
1303
|
+
onClick: () => {
|
|
1304
|
+
Array.isArray(u) ? h(M ? u.filter((y) => x(y) !== x(O[o])) : [
|
|
1305
|
+
...u,
|
|
1306
|
+
a ? parseInt(O[o]) : `${O[o]}`
|
|
1307
|
+
]) : h(O[o]);
|
|
1308
|
+
},
|
|
1309
|
+
...C,
|
|
1310
|
+
children: O.label
|
|
1311
|
+
},
|
|
1312
|
+
z
|
|
1313
|
+
);
|
|
1314
|
+
}) })
|
|
1315
|
+
] });
|
|
1316
|
+
}, Be = ({
|
|
1317
|
+
show: e = !0,
|
|
1318
|
+
onHide: t,
|
|
1319
|
+
modalTitle: o = "",
|
|
1320
|
+
dialogClassName: n = "",
|
|
1321
|
+
width: a,
|
|
1322
|
+
submitText: i,
|
|
1323
|
+
cancelText: d,
|
|
1324
|
+
children: c
|
|
1325
|
+
}) => {
|
|
1326
|
+
const {
|
|
1327
|
+
formData: u,
|
|
1328
|
+
loading: h,
|
|
1329
|
+
submit: m,
|
|
1330
|
+
hasProvider: v
|
|
1331
|
+
} = je(), { strings: b } = K();
|
|
1332
|
+
return v ? u ? /* @__PURE__ */ r.jsxs(
|
|
1333
|
+
U,
|
|
1334
|
+
{
|
|
1335
|
+
show: e,
|
|
1336
|
+
onHide: t,
|
|
1337
|
+
onClick: (j) => j.stopPropagation(),
|
|
1338
|
+
centered: !0,
|
|
1339
|
+
dialogClassName: `${n} ${a ? `mw-100 w-${a}` : ""}`,
|
|
1340
|
+
children: [
|
|
1341
|
+
o && /* @__PURE__ */ r.jsx(U.Header, { closeButton: !0, children: /* @__PURE__ */ r.jsx(U.Title, { children: o }) }),
|
|
1342
|
+
/* @__PURE__ */ r.jsx(U.Body, { children: c || /* @__PURE__ */ r.jsx(gr, {}) }),
|
|
1343
|
+
/* @__PURE__ */ r.jsxs(U.Footer, { children: [
|
|
1344
|
+
h && /* @__PURE__ */ r.jsx(Ge, {}),
|
|
1345
|
+
/* @__PURE__ */ r.jsx(
|
|
1346
|
+
Y,
|
|
1347
|
+
{
|
|
1348
|
+
variant: "secondary",
|
|
1349
|
+
onClick: t,
|
|
1350
|
+
disabled: h,
|
|
1351
|
+
children: d || b.getString("close")
|
|
1352
|
+
}
|
|
1353
|
+
),
|
|
1354
|
+
/* @__PURE__ */ r.jsx(
|
|
1355
|
+
Y,
|
|
1356
|
+
{
|
|
1357
|
+
variant: "primary",
|
|
1358
|
+
onClick: m,
|
|
1359
|
+
disabled: h,
|
|
1360
|
+
children: i || b.getString("save")
|
|
1361
|
+
}
|
|
1362
|
+
)
|
|
1363
|
+
] })
|
|
1364
|
+
]
|
|
1365
|
+
}
|
|
1366
|
+
) : null : (console.error("FormModal must be used within a FormProvider"), null);
|
|
1367
|
+
}, gr = () => {
|
|
1368
|
+
const { formFields: e, hasProvider: t } = je();
|
|
1369
|
+
return !t || !e ? null : /* @__PURE__ */ r.jsx(w, { children: Object.entries(e).map(([o, n]) => {
|
|
1370
|
+
const a = {
|
|
1371
|
+
name: o,
|
|
1372
|
+
label: n.label,
|
|
1373
|
+
placeholder: n.placeholder,
|
|
1374
|
+
required: n.required,
|
|
1375
|
+
...n.formProps
|
|
1376
|
+
};
|
|
1377
|
+
if (n.component) {
|
|
1378
|
+
const i = n.component;
|
|
1379
|
+
return /* @__PURE__ */ re(
|
|
1380
|
+
i,
|
|
1381
|
+
{
|
|
1382
|
+
...a,
|
|
1383
|
+
key: o
|
|
1384
|
+
}
|
|
1385
|
+
);
|
|
1386
|
+
}
|
|
1387
|
+
return n.type === "select" && n.options ? /* @__PURE__ */ re(
|
|
1388
|
+
ur,
|
|
1389
|
+
{
|
|
1390
|
+
...a,
|
|
1391
|
+
options: n.options || [],
|
|
1392
|
+
key: o
|
|
1393
|
+
}
|
|
1394
|
+
) : n.type === "dropdown" && n.list ? /* @__PURE__ */ re(
|
|
1395
|
+
fr,
|
|
1396
|
+
{
|
|
1397
|
+
...a,
|
|
1398
|
+
list: n.list || [],
|
|
1399
|
+
idKey: n.idKey,
|
|
1400
|
+
nameKey: n.nameKey,
|
|
1401
|
+
key: o
|
|
1402
|
+
}
|
|
1403
|
+
) : n.type === "checkbox" || n.type === "boolean" ? /* @__PURE__ */ re(
|
|
1404
|
+
hr,
|
|
1405
|
+
{
|
|
1406
|
+
...a,
|
|
1407
|
+
key: o
|
|
1408
|
+
}
|
|
1409
|
+
) : n.type === "textarea" ? /* @__PURE__ */ re(
|
|
1410
|
+
ne,
|
|
1411
|
+
{
|
|
1412
|
+
...a,
|
|
1413
|
+
as: "textarea",
|
|
1414
|
+
rows: n.rows || 3,
|
|
1415
|
+
key: o
|
|
1416
|
+
}
|
|
1417
|
+
) : /* @__PURE__ */ re(
|
|
1418
|
+
ne,
|
|
1419
|
+
{
|
|
1420
|
+
...a,
|
|
1421
|
+
type: n.type === "number" ? "number" : "text",
|
|
1422
|
+
key: o
|
|
1423
|
+
}
|
|
1424
|
+
);
|
|
1425
|
+
}) });
|
|
1426
|
+
}, _n = ({ value: e }) => /* @__PURE__ */ r.jsx(
|
|
1427
|
+
w.Control,
|
|
1428
|
+
{
|
|
1429
|
+
as: "input",
|
|
1430
|
+
disabled: !0,
|
|
1431
|
+
value: e || ""
|
|
1432
|
+
}
|
|
1433
|
+
), pr = {
|
|
1434
|
+
showCreateModal: () => {
|
|
1435
|
+
console.error("The showCreateModal function should only be used in a child of the FormModalProvider component.");
|
|
1436
|
+
},
|
|
1437
|
+
showEditModal: (e) => {
|
|
1438
|
+
console.error("The showEditModal function should only be used in a child of the FormModalProvider component.");
|
|
1439
|
+
},
|
|
1440
|
+
hasProvider: !1
|
|
1441
|
+
}, Ce = D.createContext(pr), vr = () => W(Ce), Ln = ({ onClick: e, ...t }) => {
|
|
1442
|
+
const o = W(Ce);
|
|
1443
|
+
return /* @__PURE__ */ r.jsx(
|
|
1444
|
+
er,
|
|
1445
|
+
{
|
|
1446
|
+
...t,
|
|
1447
|
+
onClick: (n) => {
|
|
1448
|
+
if (e && e(n), !o || !o.hasProvider) {
|
|
1449
|
+
console.error("The showCreateModal function should only be used in a child of the FormModalProvider component.");
|
|
1450
|
+
return;
|
|
1451
|
+
}
|
|
1452
|
+
o.showCreateModal();
|
|
1453
|
+
}
|
|
1454
|
+
}
|
|
1455
|
+
);
|
|
1456
|
+
}, En = ({ state: e, onClick: t, ...o }) => {
|
|
1457
|
+
const n = W(Ce);
|
|
1458
|
+
return /* @__PURE__ */ r.jsx(
|
|
1459
|
+
rr,
|
|
1460
|
+
{
|
|
1461
|
+
...o,
|
|
1462
|
+
onClick: (a) => {
|
|
1463
|
+
if (t && t(a), !n || !n.hasProvider) {
|
|
1464
|
+
console.error("The showEditModal function should only be used in a child of the FormModalProvider component.");
|
|
1465
|
+
return;
|
|
1466
|
+
}
|
|
1467
|
+
n.showEditModal(e);
|
|
1468
|
+
}
|
|
1469
|
+
}
|
|
1470
|
+
);
|
|
1471
|
+
}, Mn = ({
|
|
1472
|
+
createModalTitle: e,
|
|
1473
|
+
editModalTitle: t,
|
|
1474
|
+
formFields: o,
|
|
1475
|
+
initialState: n,
|
|
1476
|
+
includeData: a,
|
|
1477
|
+
validate: i,
|
|
1478
|
+
loading: d = !1,
|
|
1479
|
+
onCreate: c,
|
|
1480
|
+
onUpdate: u,
|
|
1481
|
+
onSave: h,
|
|
1482
|
+
dialogClassName: m,
|
|
1483
|
+
width: v,
|
|
1484
|
+
children: b
|
|
1485
|
+
}) => {
|
|
1486
|
+
const [j, C] = H(!1), [f, P] = H(null), { strings: x } = K(), F = a || {}, O = (y, V) => {
|
|
1487
|
+
const R = c || h;
|
|
1488
|
+
R ? R(
|
|
1489
|
+
{
|
|
1490
|
+
...y,
|
|
1491
|
+
...F
|
|
1492
|
+
},
|
|
1493
|
+
() => {
|
|
1494
|
+
C(!1), V && V();
|
|
1495
|
+
}
|
|
1496
|
+
) : (C(!1), V && V());
|
|
1497
|
+
}, z = (y, V) => {
|
|
1498
|
+
const R = u || h;
|
|
1499
|
+
R ? R(
|
|
1500
|
+
{
|
|
1501
|
+
...y,
|
|
1502
|
+
...F
|
|
1503
|
+
},
|
|
1504
|
+
() => {
|
|
1505
|
+
P(null), V && V();
|
|
1506
|
+
}
|
|
1507
|
+
) : (P(null), V && V());
|
|
1508
|
+
}, M = (y) => y || n;
|
|
1509
|
+
return /* @__PURE__ */ r.jsxs(
|
|
1510
|
+
Ce.Provider,
|
|
1511
|
+
{
|
|
1512
|
+
value: {
|
|
1513
|
+
showCreateModal: (y) => C(typeof y > "u" ? !0 : y),
|
|
1514
|
+
showEditModal: (y) => P(y),
|
|
1515
|
+
hasProvider: !0
|
|
1516
|
+
},
|
|
1517
|
+
children: [
|
|
1518
|
+
b,
|
|
1519
|
+
j && (c || h) && /* @__PURE__ */ r.jsx(
|
|
1520
|
+
ke,
|
|
1521
|
+
{
|
|
1522
|
+
formFields: o,
|
|
1523
|
+
initialState: n || {},
|
|
1524
|
+
onSubmit: O,
|
|
1525
|
+
validate: i,
|
|
1526
|
+
loading: d,
|
|
1527
|
+
resetTrigger: j,
|
|
1528
|
+
children: /* @__PURE__ */ r.jsx(
|
|
1529
|
+
Be,
|
|
1530
|
+
{
|
|
1531
|
+
show: j,
|
|
1532
|
+
modalTitle: e || x.getString("modal_create"),
|
|
1533
|
+
onHide: () => C(!1),
|
|
1534
|
+
dialogClassName: m,
|
|
1535
|
+
width: v
|
|
1536
|
+
}
|
|
1537
|
+
)
|
|
1538
|
+
}
|
|
1539
|
+
),
|
|
1540
|
+
f && (u || h) && /* @__PURE__ */ r.jsx(
|
|
1541
|
+
ke,
|
|
1542
|
+
{
|
|
1543
|
+
formFields: o,
|
|
1544
|
+
initialState: M(f),
|
|
1545
|
+
onSubmit: z,
|
|
1546
|
+
validate: i,
|
|
1547
|
+
loading: d,
|
|
1548
|
+
resetTrigger: f,
|
|
1549
|
+
children: /* @__PURE__ */ r.jsx(
|
|
1550
|
+
Be,
|
|
1551
|
+
{
|
|
1552
|
+
show: !!f,
|
|
1553
|
+
modalTitle: t || x.getString("modal_edit"),
|
|
1554
|
+
onHide: () => P(null),
|
|
1555
|
+
dialogClassName: m,
|
|
1556
|
+
width: v
|
|
1557
|
+
}
|
|
1558
|
+
)
|
|
1559
|
+
}
|
|
1560
|
+
)
|
|
1561
|
+
]
|
|
1562
|
+
}
|
|
1563
|
+
);
|
|
1564
|
+
}, On = ({ checked: e, className: t }) => /* @__PURE__ */ r.jsx("h5", { ...t ? { className: t } : {}, children: /* @__PURE__ */ r.jsx(ze, { bg: e ? "success" : "danger", children: e ? /* @__PURE__ */ r.jsx(Ue, {}) : /* @__PURE__ */ r.jsx(qe, {}) }) }), Pn = ({
|
|
1565
|
+
show: e,
|
|
1566
|
+
message: t,
|
|
1567
|
+
variant: o = "info",
|
|
1568
|
+
position: n = { top: "20px", right: "20px" },
|
|
1569
|
+
className: a = "",
|
|
1570
|
+
style: i = {}
|
|
1571
|
+
}) => {
|
|
1572
|
+
if (!e) return null;
|
|
1573
|
+
const d = {
|
|
1574
|
+
position: "fixed",
|
|
1575
|
+
zIndex: 1050,
|
|
1576
|
+
minWidth: "250px",
|
|
1577
|
+
boxShadow: "0 4px 12px rgba(0,0,0,0.15)",
|
|
1578
|
+
...n,
|
|
1579
|
+
...i
|
|
1580
|
+
};
|
|
1581
|
+
return /* @__PURE__ */ r.jsx(
|
|
1582
|
+
"div",
|
|
1583
|
+
{
|
|
1584
|
+
className: `alert alert-${o} ${a}`,
|
|
1585
|
+
style: d,
|
|
1586
|
+
children: /* @__PURE__ */ r.jsxs("div", { className: "d-flex align-items-center", children: [
|
|
1587
|
+
/* @__PURE__ */ r.jsx("div", { className: "spinner-border spinner-border-sm me-2", role: "status", "aria-hidden": "true" }),
|
|
1588
|
+
t
|
|
1589
|
+
] })
|
|
1590
|
+
}
|
|
1591
|
+
);
|
|
1592
|
+
}, Te = {
|
|
1593
|
+
OBJECT: "object"
|
|
1594
|
+
}, xr = ({
|
|
1595
|
+
droppedIndex: e,
|
|
1596
|
+
setDroppedIndex: t,
|
|
1597
|
+
onDrop: o,
|
|
1598
|
+
reset: n,
|
|
1599
|
+
index: a,
|
|
1600
|
+
movedIndex: i,
|
|
1601
|
+
moveNext: d,
|
|
1602
|
+
component: c,
|
|
1603
|
+
componentProps: u
|
|
1604
|
+
}) => {
|
|
1605
|
+
const h = Se(null), [{ handlerId: m }, v] = it({
|
|
1606
|
+
accept: Te.OBJECT,
|
|
1607
|
+
collect(f) {
|
|
1608
|
+
return {
|
|
1609
|
+
handlerId: f.getHandlerId()
|
|
1610
|
+
};
|
|
1611
|
+
},
|
|
1612
|
+
hover(f, P) {
|
|
1613
|
+
var V;
|
|
1614
|
+
if (!h.current)
|
|
1615
|
+
return;
|
|
1616
|
+
const x = f.index, F = a;
|
|
1617
|
+
if (x === F)
|
|
1618
|
+
return;
|
|
1619
|
+
const O = (V = h.current) == null ? void 0 : V.getBoundingClientRect();
|
|
1620
|
+
if (!O) return;
|
|
1621
|
+
const z = (O.bottom - O.top) / 2, M = P.getClientOffset();
|
|
1622
|
+
if (!M) return;
|
|
1623
|
+
const y = M.y - O.top;
|
|
1624
|
+
x < F && y < z || x > F && y > z || (d(x, F), f.index = F);
|
|
1625
|
+
},
|
|
1626
|
+
drop: (f, P) => {
|
|
1627
|
+
t(i), o(i, a, n);
|
|
1628
|
+
}
|
|
1629
|
+
}), [{ isDragging: b }, j] = st({
|
|
1630
|
+
type: Te.OBJECT,
|
|
1631
|
+
item: () => ({ componentProps: u, index: a }),
|
|
1632
|
+
collect: (f) => ({
|
|
1633
|
+
isDragging: f.isDragging()
|
|
1634
|
+
}),
|
|
1635
|
+
end: (f, P) => {
|
|
1636
|
+
P.didDrop() || n();
|
|
1637
|
+
}
|
|
1638
|
+
}), C = b ? 0 : 1;
|
|
1639
|
+
return c ? (j(v(h)), /* @__PURE__ */ r.jsx(r.Fragment, { children: /* @__PURE__ */ r.jsx(
|
|
1640
|
+
c,
|
|
1641
|
+
{
|
|
1642
|
+
onClick: () => {
|
|
1643
|
+
},
|
|
1644
|
+
...u,
|
|
1645
|
+
ref: h,
|
|
1646
|
+
dropped: e === i,
|
|
1647
|
+
style: {
|
|
1648
|
+
...u.style || {},
|
|
1649
|
+
cursor: "move",
|
|
1650
|
+
opacity: C
|
|
1651
|
+
},
|
|
1652
|
+
"data-handler-id": m
|
|
1653
|
+
}
|
|
1654
|
+
) })) : null;
|
|
1655
|
+
}, br = ({ onDrop: e, propsArray: t, component: o }) => {
|
|
1656
|
+
const [n, a] = H(null), [i, d] = H(null), c = Je(t), u = ce(() => a(t.map((v, b) => b)), [t]), h = cr();
|
|
1657
|
+
G(() => {
|
|
1658
|
+
JSON.stringify(c) !== JSON.stringify(t) ? u() : h();
|
|
1659
|
+
}, [c, t]);
|
|
1660
|
+
const m = ce(
|
|
1661
|
+
(v, b) => {
|
|
1662
|
+
n && a(n.map((j, C) => n[
|
|
1663
|
+
// Swap two adjacent objects when dragged a single step
|
|
1664
|
+
C === v ? b : C === b ? v : C
|
|
1665
|
+
]));
|
|
1666
|
+
},
|
|
1667
|
+
[n]
|
|
1668
|
+
);
|
|
1669
|
+
return o ? /* @__PURE__ */ r.jsx(r.Fragment, { children: n && n.map(
|
|
1670
|
+
(v, b) => t[v] && /* @__PURE__ */ r.jsx(
|
|
1671
|
+
xr,
|
|
1672
|
+
{
|
|
1673
|
+
movedIndex: v,
|
|
1674
|
+
index: b,
|
|
1675
|
+
moveNext: m,
|
|
1676
|
+
onDrop: e,
|
|
1677
|
+
reset: () => u(),
|
|
1678
|
+
component: o,
|
|
1679
|
+
componentProps: t[v],
|
|
1680
|
+
droppedIndex: i,
|
|
1681
|
+
setDroppedIndex: d
|
|
1682
|
+
},
|
|
1683
|
+
v
|
|
1684
|
+
)
|
|
1685
|
+
) }) : null;
|
|
1686
|
+
}, le = (e) => /* @__PURE__ */ r.jsx(Y, { variant: "outline-secondary", size: "sm", ...e }), Fn = ({
|
|
1687
|
+
data: e,
|
|
1688
|
+
columns: t,
|
|
1689
|
+
rowsPerPage: o = 10,
|
|
1690
|
+
rowsPerPageOptions: n = [10, 25, 50, 100, null],
|
|
1691
|
+
orderByDefault: a,
|
|
1692
|
+
orderByDefaultDirection: i = "asc",
|
|
1693
|
+
onMove: d,
|
|
1694
|
+
moveId: c = "id",
|
|
1695
|
+
moveIsLoading: u,
|
|
1696
|
+
showHeader: h = !0,
|
|
1697
|
+
onClickRow: m,
|
|
1698
|
+
showEditModalOnClickRow: v,
|
|
1699
|
+
textOnEmpty: b,
|
|
1700
|
+
className: j,
|
|
1701
|
+
rowClassName: C,
|
|
1702
|
+
style: f,
|
|
1703
|
+
showSum: P,
|
|
1704
|
+
...x
|
|
1705
|
+
}) => {
|
|
1706
|
+
const { showEditModal: F, hasProvider: O } = vr();
|
|
1707
|
+
Object.keys(x).length !== 0 && console.error("Unrecognised props:", x);
|
|
1708
|
+
const [z, M] = H(""), [y, V] = H(null), [R, de] = H(o), [N, E] = H(0);
|
|
1709
|
+
let _ = e && Object.values(e).filter((l) => {
|
|
1710
|
+
if (!z) return !0;
|
|
1711
|
+
const g = new RegExp(z, "i");
|
|
1712
|
+
for (const { search: p } of t) {
|
|
1713
|
+
if (!p) continue;
|
|
1714
|
+
let B = "";
|
|
1715
|
+
if (typeof p == "function" ? B = p(l) : l[p] !== void 0 && (B = l[p]), B && g.test(String(B)))
|
|
1716
|
+
return !0;
|
|
1717
|
+
}
|
|
1718
|
+
return !1;
|
|
1719
|
+
});
|
|
1720
|
+
const k = _ && R && Math.ceil(_.length / R);
|
|
1721
|
+
G(
|
|
1722
|
+
() => {
|
|
1723
|
+
k && N >= k && E(k - 1);
|
|
1724
|
+
},
|
|
1725
|
+
[E, k, N]
|
|
1726
|
+
);
|
|
1727
|
+
const { strings: $ } = K(), Z = !y && !!d;
|
|
1728
|
+
if (!_ || !t) return null;
|
|
1729
|
+
if (y) {
|
|
1730
|
+
const { column: l } = y;
|
|
1731
|
+
typeof l == "function" ? _.sort((g, p) => l(g) > l(p) != (y.order === "asc") ? -1 : 1) : _.sort((g, p) => g[l] > p[l] != (y.order === "asc") ? -1 : 1);
|
|
1732
|
+
} else if (a) {
|
|
1733
|
+
const l = i === "asc" ? 1 : -1;
|
|
1734
|
+
typeof a == "function" ? _.sort((g, p) => a(g) > a(p) ? l : -l) : _.sort((g, p) => g[a] > p[a] ? l : -l);
|
|
1735
|
+
}
|
|
1736
|
+
k && (_ = _.slice(N * R, (N + 1) * R));
|
|
1737
|
+
const X = nt(
|
|
1738
|
+
({ row: l }, g) => /* @__PURE__ */ r.jsx(
|
|
1739
|
+
"tr",
|
|
1740
|
+
{
|
|
1741
|
+
ref: g,
|
|
1742
|
+
...typeof C == "string" ? { className: C } : typeof C == "function" ? { className: C(l) } : {},
|
|
1743
|
+
...typeof m == "function" || F ? { onClick: () => {
|
|
1744
|
+
m && m(l), O && v && F(l);
|
|
1745
|
+
} } : {},
|
|
1746
|
+
children: t.map(
|
|
1747
|
+
({ selector: p, className: B, onClick: T }, I) => /* @__PURE__ */ r.jsx(
|
|
1748
|
+
"td",
|
|
1749
|
+
{
|
|
1750
|
+
className: B,
|
|
1751
|
+
...typeof T == "function" ? { onClick: () => {
|
|
1752
|
+
T && T(l);
|
|
1753
|
+
} } : {},
|
|
1754
|
+
children: typeof p == "function" ? p(l) : l[p]
|
|
1755
|
+
},
|
|
1756
|
+
I
|
|
1757
|
+
)
|
|
1758
|
+
)
|
|
1759
|
+
}
|
|
1760
|
+
)
|
|
1761
|
+
), ae = fe(() => t.map(({ value: l }) => l && _.reduce((g, p) => g + (typeof l == "function" ? l(p) : p[l]), 0)), [t, _]);
|
|
1762
|
+
if (!X) return null;
|
|
1763
|
+
const J = h && h.customHeader, Q = J ? 4 : 6, s = J ? 3 : 4;
|
|
1764
|
+
return /* @__PURE__ */ r.jsxs("div", { style: f, className: j, children: [
|
|
1765
|
+
h && /* @__PURE__ */ r.jsxs(ve, { className: "mb-4", children: [
|
|
1766
|
+
(h === !0 || h.search) && /* @__PURE__ */ r.jsx(
|
|
1767
|
+
q,
|
|
1768
|
+
{
|
|
1769
|
+
xs: 12,
|
|
1770
|
+
lg: s,
|
|
1771
|
+
className: "d-flex flex-col justify-content-end align-items-end",
|
|
1772
|
+
children: /* @__PURE__ */ r.jsxs(Re, { children: [
|
|
1773
|
+
/* @__PURE__ */ r.jsx(
|
|
1774
|
+
w.Control,
|
|
1775
|
+
{
|
|
1776
|
+
type: "text",
|
|
1777
|
+
name: "table-filter",
|
|
1778
|
+
value: z,
|
|
1779
|
+
placeholder: $.getString("search"),
|
|
1780
|
+
onChange: (l) => M(l.target.value)
|
|
1781
|
+
}
|
|
1782
|
+
),
|
|
1783
|
+
/* @__PURE__ */ r.jsx(
|
|
1784
|
+
Qt,
|
|
1785
|
+
{
|
|
1786
|
+
variant: "outline-secondary",
|
|
1787
|
+
size: "sm",
|
|
1788
|
+
onClick: () => M("")
|
|
1789
|
+
}
|
|
1790
|
+
)
|
|
1791
|
+
] })
|
|
1792
|
+
}
|
|
1793
|
+
),
|
|
1794
|
+
(h === !0 || h.numberOfRows) && /* @__PURE__ */ r.jsx(
|
|
1795
|
+
q,
|
|
1796
|
+
{
|
|
1797
|
+
xs: 12,
|
|
1798
|
+
sm: Q,
|
|
1799
|
+
lg: s,
|
|
1800
|
+
className: "d-flex flex-col justify-content-lg-center align-items-center justify-content-sm-start mb-2 mb-sm-0",
|
|
1801
|
+
children: /* @__PURE__ */ r.jsxs(w.Group, { children: [
|
|
1802
|
+
/* @__PURE__ */ r.jsx(w.Label, { children: $.getString("number_of_rows") }),
|
|
1803
|
+
/* @__PURE__ */ r.jsx(
|
|
1804
|
+
w.Select,
|
|
1805
|
+
{
|
|
1806
|
+
name: "table-pagination-options",
|
|
1807
|
+
value: R === null ? "everything" : `${R}`,
|
|
1808
|
+
as: "select",
|
|
1809
|
+
onChange: (l) => de(l.target.value === "everything" ? null : parseInt(l.target.value)),
|
|
1810
|
+
children: n.map((l, g) => /* @__PURE__ */ r.jsx("option", { value: l === null ? "everything" : l, children: l === null ? $.getString("everything") : l }, g))
|
|
1811
|
+
}
|
|
1812
|
+
)
|
|
1813
|
+
] })
|
|
1814
|
+
}
|
|
1815
|
+
),
|
|
1816
|
+
(h === !0 || h.pagination) && /* @__PURE__ */ r.jsx(
|
|
1817
|
+
q,
|
|
1818
|
+
{
|
|
1819
|
+
xs: 12,
|
|
1820
|
+
sm: Q,
|
|
1821
|
+
lg: s,
|
|
1822
|
+
className: "d-flex flex-col justify-content-end align-items-end",
|
|
1823
|
+
children: /* @__PURE__ */ r.jsxs(ot, { children: [
|
|
1824
|
+
/* @__PURE__ */ r.jsx(
|
|
1825
|
+
le,
|
|
1826
|
+
{
|
|
1827
|
+
disabled: !k || N === 0,
|
|
1828
|
+
onClick: () => E(0),
|
|
1829
|
+
children: "<<"
|
|
1830
|
+
}
|
|
1831
|
+
),
|
|
1832
|
+
/* @__PURE__ */ r.jsx(
|
|
1833
|
+
le,
|
|
1834
|
+
{
|
|
1835
|
+
disabled: !k || N === 0,
|
|
1836
|
+
onClick: () => E(N - 1),
|
|
1837
|
+
children: "<"
|
|
1838
|
+
}
|
|
1839
|
+
),
|
|
1840
|
+
/* @__PURE__ */ r.jsx(le, { children: k ? N + 1 : 1 }),
|
|
1841
|
+
/* @__PURE__ */ r.jsx(
|
|
1842
|
+
le,
|
|
1843
|
+
{
|
|
1844
|
+
disabled: !k || N >= k - 1,
|
|
1845
|
+
onClick: () => E(N + 1),
|
|
1846
|
+
children: ">"
|
|
1847
|
+
}
|
|
1848
|
+
),
|
|
1849
|
+
/* @__PURE__ */ r.jsx(
|
|
1850
|
+
le,
|
|
1851
|
+
{
|
|
1852
|
+
disabled: !k || N >= k - 1,
|
|
1853
|
+
onClick: () => E(typeof k == "number" ? k - 1 : 0),
|
|
1854
|
+
children: ">>"
|
|
1855
|
+
}
|
|
1856
|
+
)
|
|
1857
|
+
] })
|
|
1858
|
+
}
|
|
1859
|
+
),
|
|
1860
|
+
J && /* @__PURE__ */ r.jsx(
|
|
1861
|
+
q,
|
|
1862
|
+
{
|
|
1863
|
+
xs: 12,
|
|
1864
|
+
sm: Q,
|
|
1865
|
+
lg: s,
|
|
1866
|
+
className: "d-flex flex-col justify-content-end align-items-end",
|
|
1867
|
+
children: J
|
|
1868
|
+
}
|
|
1869
|
+
)
|
|
1870
|
+
] }),
|
|
1871
|
+
/* @__PURE__ */ r.jsxs(
|
|
1872
|
+
at,
|
|
1873
|
+
{
|
|
1874
|
+
striped: _.length !== 0,
|
|
1875
|
+
bordered: !0,
|
|
1876
|
+
hover: !0,
|
|
1877
|
+
responsive: !0,
|
|
1878
|
+
children: [
|
|
1879
|
+
/* @__PURE__ */ r.jsx("thead", { children: /* @__PURE__ */ r.jsx("tr", { children: t.map(
|
|
1880
|
+
({ name: l, orderBy: g, optionsDropdown: p, className: B }, T) => p ? /* @__PURE__ */ r.jsx(
|
|
1881
|
+
"th",
|
|
1882
|
+
{
|
|
1883
|
+
className: B,
|
|
1884
|
+
style: { cursor: "pointer" },
|
|
1885
|
+
children: /* @__PURE__ */ r.jsxs(ue, { children: [
|
|
1886
|
+
/* @__PURE__ */ r.jsx(ue.Toggle, { as: "span", children: p.selected ? p.options[p.selected] : l }),
|
|
1887
|
+
/* @__PURE__ */ r.jsx(ue.Menu, { children: Object.entries(p.options).map(
|
|
1888
|
+
([I, ee]) => /* @__PURE__ */ r.jsx(
|
|
1889
|
+
ue.Item,
|
|
1890
|
+
{
|
|
1891
|
+
eventKey: I,
|
|
1892
|
+
onClick: () => p.onSelect(
|
|
1893
|
+
p.selected !== I ? I : null
|
|
1894
|
+
),
|
|
1895
|
+
active: I === p.selected,
|
|
1896
|
+
children: ee === null ? $.getString("everything") : ee
|
|
1897
|
+
},
|
|
1898
|
+
I
|
|
1899
|
+
)
|
|
1900
|
+
) })
|
|
1901
|
+
] })
|
|
1902
|
+
},
|
|
1903
|
+
T
|
|
1904
|
+
) : g ? !y || y.column !== g ? /* @__PURE__ */ r.jsxs(
|
|
1905
|
+
"th",
|
|
1906
|
+
{
|
|
1907
|
+
className: B,
|
|
1908
|
+
style: { cursor: "pointer" },
|
|
1909
|
+
onClick: () => V({ order: "asc", column: g }),
|
|
1910
|
+
children: [
|
|
1911
|
+
l,
|
|
1912
|
+
/* @__PURE__ */ r.jsx(We, {})
|
|
1913
|
+
]
|
|
1914
|
+
},
|
|
1915
|
+
T
|
|
1916
|
+
) : y.order === "asc" ? /* @__PURE__ */ r.jsxs(
|
|
1917
|
+
"th",
|
|
1918
|
+
{
|
|
1919
|
+
className: B,
|
|
1920
|
+
style: { cursor: "pointer" },
|
|
1921
|
+
onClick: () => V({ order: "desc", column: g }),
|
|
1922
|
+
children: [
|
|
1923
|
+
l,
|
|
1924
|
+
/* @__PURE__ */ r.jsx(Ye, {})
|
|
1925
|
+
]
|
|
1926
|
+
},
|
|
1927
|
+
T
|
|
1928
|
+
) : /* @__PURE__ */ r.jsxs(
|
|
1929
|
+
"th",
|
|
1930
|
+
{
|
|
1931
|
+
className: B,
|
|
1932
|
+
style: { cursor: "pointer" },
|
|
1933
|
+
onClick: () => V(null),
|
|
1934
|
+
children: [
|
|
1935
|
+
l,
|
|
1936
|
+
/* @__PURE__ */ r.jsx(Ze, {})
|
|
1937
|
+
]
|
|
1938
|
+
},
|
|
1939
|
+
T
|
|
1940
|
+
) : /* @__PURE__ */ r.jsx("th", { className: B, children: l }, T)
|
|
1941
|
+
) }) }),
|
|
1942
|
+
/* @__PURE__ */ r.jsxs("tbody", { ...Z ? { style: { cursor: "move" } } : {}, children: [
|
|
1943
|
+
_.length === 0 && /* @__PURE__ */ r.jsx("tr", { children: /* @__PURE__ */ r.jsx(
|
|
1944
|
+
"td",
|
|
1945
|
+
{
|
|
1946
|
+
colSpan: t.length,
|
|
1947
|
+
style: { textAlign: "center", margin: "15px" },
|
|
1948
|
+
children: /* @__PURE__ */ r.jsx("i", { children: b || $.getString("no_information_to_display") })
|
|
1949
|
+
}
|
|
1950
|
+
) }),
|
|
1951
|
+
Z ? /* @__PURE__ */ r.jsx(
|
|
1952
|
+
br,
|
|
1953
|
+
{
|
|
1954
|
+
component: X,
|
|
1955
|
+
propsArray: _ && _.map((l) => ({
|
|
1956
|
+
row: l,
|
|
1957
|
+
// The line below fixes a nasty bug: Drag and drop won't work the first time and
|
|
1958
|
+
// the mouse cursor only selects text
|
|
1959
|
+
onClick: () => {
|
|
1960
|
+
}
|
|
1961
|
+
})) || [],
|
|
1962
|
+
onDrop: (l, g, p) => {
|
|
1963
|
+
const B = _[l], T = _[g];
|
|
1964
|
+
B[c] === T[c] || u || d({ item: B, target: T, reset: p });
|
|
1965
|
+
}
|
|
1966
|
+
}
|
|
1967
|
+
) : _.map((l, g) => /* @__PURE__ */ r.jsx(X, { row: l }, g))
|
|
1968
|
+
] }),
|
|
1969
|
+
P && /* @__PURE__ */ r.jsx("tfoot", { children: /* @__PURE__ */ r.jsx("tr", { children: t.map(
|
|
1970
|
+
({ value: l, formatSum: g }, p) => /* @__PURE__ */ r.jsx(
|
|
1971
|
+
"td",
|
|
1972
|
+
{
|
|
1973
|
+
children: l ? typeof g == "function" ? g(ae[p]) : ae[p] : g
|
|
1974
|
+
},
|
|
1975
|
+
p
|
|
1976
|
+
)
|
|
1977
|
+
) }) })
|
|
1978
|
+
]
|
|
1979
|
+
}
|
|
1980
|
+
)
|
|
1981
|
+
] });
|
|
1982
|
+
}, kn = ({
|
|
1983
|
+
className: e = "",
|
|
1984
|
+
value: t,
|
|
1985
|
+
onChange: o,
|
|
1986
|
+
onClear: n,
|
|
1987
|
+
onSearch: a,
|
|
1988
|
+
label: i,
|
|
1989
|
+
placeholder: d
|
|
1990
|
+
}) => {
|
|
1991
|
+
const { strings: c } = K();
|
|
1992
|
+
return /* @__PURE__ */ r.jsxs(w.Group, { children: [
|
|
1993
|
+
i && /* @__PURE__ */ r.jsx(w.Label, { children: i }),
|
|
1994
|
+
/* @__PURE__ */ r.jsxs(Re, { ...e ? { className: e } : {}, children: [
|
|
1995
|
+
/* @__PURE__ */ r.jsx(
|
|
1996
|
+
w.Control,
|
|
1997
|
+
{
|
|
1998
|
+
value: t,
|
|
1999
|
+
placeholder: d !== !1 ? d || c.getString("search") : void 0,
|
|
2000
|
+
onChange: (u) => o(u.target.value)
|
|
2001
|
+
}
|
|
2002
|
+
),
|
|
2003
|
+
n && /* @__PURE__ */ r.jsx(
|
|
2004
|
+
or,
|
|
2005
|
+
{
|
|
2006
|
+
variant: "outline-secondary",
|
|
2007
|
+
onClick: () => n()
|
|
2008
|
+
}
|
|
2009
|
+
),
|
|
2010
|
+
a && /* @__PURE__ */ r.jsx(
|
|
2011
|
+
nr,
|
|
2012
|
+
{
|
|
2013
|
+
variant: "outline-secondary",
|
|
2014
|
+
onClick: () => a()
|
|
2015
|
+
}
|
|
2016
|
+
)
|
|
2017
|
+
] })
|
|
2018
|
+
] });
|
|
2019
|
+
}, Bn = ({ children: e }) => /* @__PURE__ */ r.jsx(_e, { children: /* @__PURE__ */ r.jsx(ve, { className: "error-page", children: /* @__PURE__ */ r.jsx(q, { children: /* @__PURE__ */ r.jsx(
|
|
2020
|
+
"div",
|
|
2021
|
+
{
|
|
2022
|
+
style: {
|
|
2023
|
+
padding: "2rem 1rem",
|
|
2024
|
+
marginBottom: "2rem",
|
|
2025
|
+
backgroundColor: "#e9ecef",
|
|
2026
|
+
borderRadius: ".3rem"
|
|
2027
|
+
},
|
|
2028
|
+
children: e
|
|
2029
|
+
}
|
|
2030
|
+
) }) }) }), Tn = (e) => {
|
|
2031
|
+
const t = new CustomEvent("customError", { detail: e });
|
|
2032
|
+
window.dispatchEvent(t);
|
|
2033
|
+
}, Ve = "The useError hook should only be used in a child of the ErrorBoundary component.", jr = {
|
|
2034
|
+
error: Ve,
|
|
2035
|
+
clearError: () => console.error(Ve)
|
|
2036
|
+
}, Qe = D.createContext(jr), Vn = () => W(Qe), zn = ({ children: e }) => {
|
|
2037
|
+
const [t, o] = H(null);
|
|
2038
|
+
return G(() => {
|
|
2039
|
+
const n = (a) => {
|
|
2040
|
+
const d = a.detail;
|
|
2041
|
+
o(d);
|
|
2042
|
+
};
|
|
2043
|
+
return window.addEventListener("customError", n), () => window.removeEventListener("customError", n);
|
|
2044
|
+
}, []), /* @__PURE__ */ r.jsx(
|
|
2045
|
+
Qe.Provider,
|
|
2046
|
+
{
|
|
2047
|
+
value: {
|
|
2048
|
+
error: t,
|
|
2049
|
+
clearError: () => o(null)
|
|
2050
|
+
},
|
|
2051
|
+
children: e
|
|
2052
|
+
}
|
|
2053
|
+
);
|
|
2054
|
+
}, Rn = ({
|
|
2055
|
+
onSubmit: e,
|
|
2056
|
+
isAuthenticated: t,
|
|
2057
|
+
label: o,
|
|
2058
|
+
onResetPassword: n,
|
|
2059
|
+
callback: a
|
|
2060
|
+
}) => {
|
|
2061
|
+
const [i, d] = Ke({ email: "", password: "" }), { strings: c } = K(), u = !i.email || !i.password, h = () => {
|
|
2062
|
+
u || e(i, a);
|
|
2063
|
+
};
|
|
2064
|
+
return t ? null : /* @__PURE__ */ r.jsx(_e, { children: /* @__PURE__ */ r.jsxs(ve, { className: "login", children: [
|
|
2065
|
+
/* @__PURE__ */ r.jsx(q, { md: 2 }),
|
|
2066
|
+
/* @__PURE__ */ r.jsxs(q, { md: 8, children: [
|
|
2067
|
+
o || /* @__PURE__ */ r.jsx("h1", { children: c.getString("login") }),
|
|
2068
|
+
/* @__PURE__ */ r.jsxs(w, { children: [
|
|
2069
|
+
/* @__PURE__ */ r.jsxs(w.Group, { className: "mb-3", children: [
|
|
2070
|
+
/* @__PURE__ */ r.jsx(w.Label, { children: c.getString("your_email") }),
|
|
2071
|
+
/* @__PURE__ */ r.jsx(
|
|
2072
|
+
w.Control,
|
|
2073
|
+
{
|
|
2074
|
+
name: "email",
|
|
2075
|
+
value: i.email,
|
|
2076
|
+
onChange: (m) => d({ email: m.target.value }),
|
|
2077
|
+
placeholder: c.getString("enter_email"),
|
|
2078
|
+
onKeyDown: (m) => m.key === "Enter" && h()
|
|
2079
|
+
}
|
|
2080
|
+
)
|
|
2081
|
+
] }),
|
|
2082
|
+
/* @__PURE__ */ r.jsxs(w.Group, { className: "mb-3", children: [
|
|
2083
|
+
/* @__PURE__ */ r.jsx(w.Label, { children: c.getString("your_password") }),
|
|
2084
|
+
/* @__PURE__ */ r.jsx(
|
|
2085
|
+
w.Control,
|
|
2086
|
+
{
|
|
2087
|
+
type: "password",
|
|
2088
|
+
name: "password",
|
|
2089
|
+
value: i.password,
|
|
2090
|
+
onChange: (m) => d({ password: m.target.value }),
|
|
2091
|
+
placeholder: c.getString("enter_password"),
|
|
2092
|
+
onKeyDown: (m) => m.key === "Enter" && h()
|
|
2093
|
+
}
|
|
2094
|
+
)
|
|
2095
|
+
] })
|
|
2096
|
+
] }),
|
|
2097
|
+
/* @__PURE__ */ r.jsx(Y, { onClick: h, disabled: u, children: c.getString("login") }),
|
|
2098
|
+
/* @__PURE__ */ r.jsxs("p", { className: "mt-2", children: [
|
|
2099
|
+
c.getString("forgot_password"),
|
|
2100
|
+
" ",
|
|
2101
|
+
typeof n == "string" ? /* @__PURE__ */ r.jsx("a", { href: n, children: c.getString("reset_password") }) : /* @__PURE__ */ r.jsx(
|
|
2102
|
+
"span",
|
|
2103
|
+
{
|
|
2104
|
+
onClick: n,
|
|
2105
|
+
className: "reset-password",
|
|
2106
|
+
children: c.getString("reset_password")
|
|
2107
|
+
}
|
|
2108
|
+
)
|
|
2109
|
+
] })
|
|
2110
|
+
] }),
|
|
2111
|
+
/* @__PURE__ */ r.jsx(q, { md: 2 })
|
|
2112
|
+
] }) });
|
|
2113
|
+
}, An = () => Math.round((/* @__PURE__ */ new Date()).getTime() / 1e3), Hn = () => {
|
|
2114
|
+
const t = $e(/* @__PURE__ */ new Date(), "UTC");
|
|
2115
|
+
return lt(t);
|
|
2116
|
+
}, Nn = (e, t = "yyyy-MM-dd") => {
|
|
2117
|
+
const o = typeof e == "string" ? xe(e) : e;
|
|
2118
|
+
return Ne(o) ? He(o, t) : "";
|
|
2119
|
+
}, $n = (e, t = "yyyy-MM-dd HH:mm") => {
|
|
2120
|
+
const o = typeof e == "string" ? xe(e) : e;
|
|
2121
|
+
return Ne(o) ? He(o, t) : "";
|
|
2122
|
+
}, In = (e, t) => {
|
|
2123
|
+
const o = typeof e == "string" ? xe(e) : e;
|
|
2124
|
+
return t ? ct(o, t) : o;
|
|
2125
|
+
}, Dn = (e, t) => {
|
|
2126
|
+
const o = typeof e == "string" ? xe(e) : e;
|
|
2127
|
+
return $e(o, t);
|
|
2128
|
+
};
|
|
2129
|
+
export {
|
|
2130
|
+
mr as BadgeSelection,
|
|
2131
|
+
sn as BigSpinner,
|
|
2132
|
+
Er as CheckButton,
|
|
2133
|
+
On as CheckIndicator,
|
|
2134
|
+
Qt as CloseButton,
|
|
2135
|
+
Pr as CogButton,
|
|
2136
|
+
lr as ConfirmButton,
|
|
2137
|
+
Mr as CopyButton,
|
|
2138
|
+
er as CreateButton,
|
|
2139
|
+
Br as CreateFileButton,
|
|
2140
|
+
Fr as CreateFolderButton,
|
|
2141
|
+
kr as CreateSubFolderButton,
|
|
2142
|
+
Fn as DataTable,
|
|
2143
|
+
tr as DeleteButton,
|
|
2144
|
+
ln as DeleteConfirmButton,
|
|
2145
|
+
_n as DisabledFormField,
|
|
2146
|
+
Tr as DownButton,
|
|
2147
|
+
Vr as DownloadButton,
|
|
2148
|
+
br as DragAndDropList,
|
|
2149
|
+
tn as DropdownButton,
|
|
2150
|
+
rr as EditButton,
|
|
2151
|
+
zn as ErrorBoundary,
|
|
2152
|
+
Qe as ErrorContext,
|
|
2153
|
+
Bn as ErrorPage,
|
|
2154
|
+
Pn as FixedLoadingIndicator,
|
|
2155
|
+
zr as FlagButton,
|
|
2156
|
+
Sn as FormBadgesSelection,
|
|
2157
|
+
hr as FormCheckbox,
|
|
2158
|
+
Ln as FormCreateModalButton,
|
|
2159
|
+
Cn as FormDate,
|
|
2160
|
+
yn as FormDateTime,
|
|
2161
|
+
fr as FormDropdown,
|
|
2162
|
+
En as FormEditModalButton,
|
|
2163
|
+
bn as FormField,
|
|
2164
|
+
gr as FormFieldsRenderer,
|
|
2165
|
+
ne as FormInput,
|
|
2166
|
+
Be as FormModal,
|
|
2167
|
+
Ce as FormModalContext,
|
|
2168
|
+
Mn as FormModalProvider,
|
|
2169
|
+
ke as FormProvider,
|
|
2170
|
+
ur as FormSelect,
|
|
2171
|
+
wn as FormSwitch,
|
|
2172
|
+
jn as FormTextarea,
|
|
2173
|
+
Rr as HideButton,
|
|
2174
|
+
Xt as IconButton,
|
|
2175
|
+
Ar as LinkButton,
|
|
2176
|
+
Hr as ListButton,
|
|
2177
|
+
an as LoadingIndicator,
|
|
2178
|
+
be as LocalizationContext,
|
|
2179
|
+
on as LocalizationProvider,
|
|
2180
|
+
Rn as LoginPage,
|
|
2181
|
+
Nr as MenuButton,
|
|
2182
|
+
$r as MoveButton,
|
|
2183
|
+
Ir as NotesButton,
|
|
2184
|
+
Or as PasteButton,
|
|
2185
|
+
Dr as PencilButton,
|
|
2186
|
+
Ur as PlayButton,
|
|
2187
|
+
en as QuestionnaireButton,
|
|
2188
|
+
rn as ResetButton,
|
|
2189
|
+
qr as SaveButton,
|
|
2190
|
+
kn as SearchBox,
|
|
2191
|
+
nr as SearchButton,
|
|
2192
|
+
Zr as ShowButton,
|
|
2193
|
+
Ge as SmallSpinner,
|
|
2194
|
+
Yr as SortButton,
|
|
2195
|
+
Gr as SortDownButton,
|
|
2196
|
+
Wr as SortUpButton,
|
|
2197
|
+
Jr as StopButton,
|
|
2198
|
+
Kr as SyncButton,
|
|
2199
|
+
or as UnCheckButton,
|
|
2200
|
+
Xr as UnlockButton,
|
|
2201
|
+
Qr as UpButton,
|
|
2202
|
+
ar as UploadButton,
|
|
2203
|
+
nn as UploadTextButton,
|
|
2204
|
+
gn as arrayToObject,
|
|
2205
|
+
fn as camelToSnakeCase,
|
|
2206
|
+
sr as combineLocalization,
|
|
2207
|
+
ir as defaultLanguages,
|
|
2208
|
+
Pe as defaultLocalization,
|
|
2209
|
+
Tn as dispatchError,
|
|
2210
|
+
xn as downloadFile,
|
|
2211
|
+
Nn as formatDate,
|
|
2212
|
+
$n as formatDateTime,
|
|
2213
|
+
Dn as fromUtc,
|
|
2214
|
+
An as getTimestamp,
|
|
2215
|
+
Hn as getToday,
|
|
2216
|
+
Fe as isEmpty,
|
|
2217
|
+
L as makeIconButton,
|
|
2218
|
+
mn as pluralToSingle,
|
|
2219
|
+
vn as round,
|
|
2220
|
+
pn as roundFixed,
|
|
2221
|
+
hn as snakeToCamelCase,
|
|
2222
|
+
In as toUtc,
|
|
2223
|
+
cn as useDebouncedEffect,
|
|
2224
|
+
Vn as useError,
|
|
2225
|
+
cr as useForceUpdate,
|
|
2226
|
+
je as useForm,
|
|
2227
|
+
oe as useFormField,
|
|
2228
|
+
vr as useFormModal,
|
|
2229
|
+
dn as useInterval,
|
|
2230
|
+
un as useLocalStorage,
|
|
2231
|
+
K as useLocalization,
|
|
2232
|
+
Je as usePrevious,
|
|
2233
|
+
Ke as useSetState
|
|
2234
|
+
};
|
|
2235
|
+
//# sourceMappingURL=index.es.js.map
|