@yusr_systems/ui 6.0.7 → 6.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +6 -2
- package/dist/yusr-ui.js +832 -812
- package/package.json +2 -2
package/dist/yusr-ui.js
CHANGED
|
@@ -2,33 +2,33 @@ import { Link as e, Navigate as t, Outlet as n, useLocation as r } from "react-r
|
|
|
2
2
|
import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
3
3
|
import { Check as s, CheckIcon as c, ChevronDownIcon as l, ChevronLeft as u, ChevronLeftIcon as d, ChevronRight as f, ChevronRightIcon as p, ChevronUpIcon as m, ChevronsUpDown as h, CircleCheckIcon as g, Download as _, Eye as v, EyeOff as ee, FileText as te, InfoIcon as ne, Loader2 as re, Loader2Icon as ie, LoaderPinwheelIcon as ae, LogOutIcon as oe, Maximize2 as se, Moon as ce, MoreHorizontal as le, MoreHorizontalIcon as ue, OctagonAlert as de, OctagonXIcon as fe, PanelLeftIcon as pe, Plus as me, PlusIcon as he, RefreshCwOff as ge, Search as _e, SearchIcon as ve, Sun as ye, Table as be, TriangleAlertIcon as xe, UploadCloud as Se, X as Ce, XIcon as we, ZoomIn as Te } from "lucide-react";
|
|
4
4
|
import * as y from "react";
|
|
5
|
-
import Ee, {
|
|
5
|
+
import Ee, { Fragment as De, createContext as Oe, useCallback as b, useContext as ke, useEffect as Ae, useMemo as je, useRef as Me, useState as x } from "react";
|
|
6
6
|
import { cva as S } from "class-variance-authority";
|
|
7
7
|
import { Slot as C } from "@radix-ui/react-slot";
|
|
8
|
-
import { clsx as
|
|
9
|
-
import { twMerge as
|
|
8
|
+
import { clsx as Ne } from "clsx";
|
|
9
|
+
import { twMerge as Pe } from "tailwind-merge";
|
|
10
10
|
import * as w from "@radix-ui/react-dialog";
|
|
11
|
-
import * as
|
|
12
|
-
import { format as
|
|
13
|
-
import { DayPicker as
|
|
14
|
-
import * as
|
|
15
|
-
import * as
|
|
11
|
+
import * as Fe from "@radix-ui/react-separator";
|
|
12
|
+
import { format as Ie } from "date-fns";
|
|
13
|
+
import { DayPicker as Le, getDefaultClassNames as Re } from "react-day-picker";
|
|
14
|
+
import * as ze from "@radix-ui/react-popover";
|
|
15
|
+
import * as Be from "@radix-ui/react-label";
|
|
16
16
|
import * as T from "@radix-ui/react-select";
|
|
17
|
-
import
|
|
18
|
-
import { useDebouncedCallback as
|
|
19
|
-
import { useDispatch as
|
|
17
|
+
import Ve from "embla-carousel-react";
|
|
18
|
+
import { useDebouncedCallback as He } from "use-debounce";
|
|
19
|
+
import { useDispatch as Ue } from "react-redux";
|
|
20
20
|
import * as E from "@radix-ui/react-context-menu";
|
|
21
21
|
import * as D from "@radix-ui/react-dropdown-menu";
|
|
22
22
|
import * as O from "@radix-ui/react-tooltip";
|
|
23
23
|
import { Command as k } from "cmdk";
|
|
24
|
-
import * as
|
|
24
|
+
import * as We from "@radix-ui/react-avatar";
|
|
25
25
|
import "@radix-ui/react-accessible-icon";
|
|
26
26
|
import "@radix-ui/react-accordion";
|
|
27
27
|
import * as A from "@radix-ui/react-alert-dialog";
|
|
28
28
|
import "@radix-ui/react-aspect-ratio";
|
|
29
|
-
import * as
|
|
30
|
-
import * as
|
|
31
|
-
import * as
|
|
29
|
+
import * as Ge from "@radix-ui/react-checkbox";
|
|
30
|
+
import * as Ke from "@radix-ui/react-collapsible";
|
|
31
|
+
import * as qe from "@radix-ui/react-direction";
|
|
32
32
|
import "@radix-ui/react-form";
|
|
33
33
|
import "@radix-ui/react-hover-card";
|
|
34
34
|
import "@radix-ui/react-menubar";
|
|
@@ -38,24 +38,24 @@ import "@radix-ui/react-password-toggle-field";
|
|
|
38
38
|
import "@radix-ui/react-portal";
|
|
39
39
|
import "@radix-ui/react-progress";
|
|
40
40
|
import "@radix-ui/react-radio-group";
|
|
41
|
-
import * as
|
|
41
|
+
import * as Je from "@radix-ui/react-scroll-area";
|
|
42
42
|
import "@radix-ui/react-slider";
|
|
43
|
-
import * as
|
|
44
|
-
import * as
|
|
43
|
+
import * as Ye from "@radix-ui/react-switch";
|
|
44
|
+
import * as Xe from "@radix-ui/react-tabs";
|
|
45
45
|
import "@radix-ui/react-toast";
|
|
46
|
-
import * as
|
|
47
|
-
import * as
|
|
46
|
+
import * as Ze from "@radix-ui/react-toggle";
|
|
47
|
+
import * as Qe from "@radix-ui/react-toggle-group";
|
|
48
48
|
import "@radix-ui/react-toolbar";
|
|
49
49
|
import "@radix-ui/react-visually-hidden";
|
|
50
|
-
import * as
|
|
50
|
+
import * as $e from "recharts";
|
|
51
51
|
import { Combobox as j } from "@base-ui/react/combobox";
|
|
52
52
|
import { Drawer as M } from "vaul";
|
|
53
|
-
import { useTheme as
|
|
54
|
-
import { Toaster as
|
|
55
|
-
import { AuthConstants as
|
|
56
|
-
import { createAsyncThunk as
|
|
53
|
+
import { useTheme as et } from "next-themes";
|
|
54
|
+
import { Toaster as tt } from "sonner";
|
|
55
|
+
import { AuthConstants as nt, StorageFile as rt, StorageFileStatus as N } from "@yusr_systems/core";
|
|
56
|
+
import { createAsyncThunk as it, createSlice as at } from "@reduxjs/toolkit";
|
|
57
57
|
//#region src/components/custom/auth/protectedRoute.tsx
|
|
58
|
-
function
|
|
58
|
+
function ot({ isAuthenticated: e, loginPath: i = "/login" }) {
|
|
59
59
|
let o = r();
|
|
60
60
|
return e ? /* @__PURE__ */ a(n, {}) : /* @__PURE__ */ a(t, {
|
|
61
61
|
to: i,
|
|
@@ -65,7 +65,7 @@ function at({ isAuthenticated: e, loginPath: i = "/login" }) {
|
|
|
65
65
|
}
|
|
66
66
|
//#endregion
|
|
67
67
|
//#region src/components/custom/background/yusrBackground.tsx
|
|
68
|
-
function
|
|
68
|
+
function st() {
|
|
69
69
|
return /* @__PURE__ */ o("div", {
|
|
70
70
|
className: "pointer-events-none fixed inset-0 -z-10 overflow-hidden bg-slate-50 dark:bg-background transition-colors duration-500",
|
|
71
71
|
children: [
|
|
@@ -148,11 +148,11 @@ function ot() {
|
|
|
148
148
|
//#endregion
|
|
149
149
|
//#region src/utils/cn.ts
|
|
150
150
|
function P(...e) {
|
|
151
|
-
return Ne(
|
|
151
|
+
return Pe(Ne(e));
|
|
152
152
|
}
|
|
153
153
|
//#endregion
|
|
154
154
|
//#region src/components/pure/button.tsx
|
|
155
|
-
var
|
|
155
|
+
var ct = S("focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-lg border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 aria-invalid:ring-3 [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none", {
|
|
156
156
|
variants: {
|
|
157
157
|
variant: {
|
|
158
158
|
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80 hover:bg-primary/90 cursor-pointer",
|
|
@@ -183,7 +183,7 @@ function F({ className: e, variant: t = "default", size: n = "default", asChild:
|
|
|
183
183
|
"data-slot": "button",
|
|
184
184
|
"data-variant": t,
|
|
185
185
|
"data-size": n,
|
|
186
|
-
className: P(
|
|
186
|
+
className: P(ct({
|
|
187
187
|
variant: t,
|
|
188
188
|
size: n,
|
|
189
189
|
className: e
|
|
@@ -193,7 +193,7 @@ function F({ className: e, variant: t = "default", size: n = "default", asChild:
|
|
|
193
193
|
}
|
|
194
194
|
//#endregion
|
|
195
195
|
//#region src/components/custom/buttons/saveButton.tsx
|
|
196
|
-
function
|
|
196
|
+
function lt({ formData: e, dialogMode: t, service: n, disable: r, onSuccess: i, validate: s = () => !0 }) {
|
|
197
197
|
let [c, l] = x(!1);
|
|
198
198
|
async function u() {
|
|
199
199
|
if (!s()) return;
|
|
@@ -217,7 +217,7 @@ function ct({ formData: e, dialogMode: t, service: n, disable: r, onSuccess: i,
|
|
|
217
217
|
}
|
|
218
218
|
//#endregion
|
|
219
219
|
//#region src/components/custom/containers/dynamicListContainer.tsx
|
|
220
|
-
function
|
|
220
|
+
function ut({ title: e, items: t, onAdd: n, addLabel: r, emptyMessage: i, error: s, headers: c, children: l }) {
|
|
221
221
|
return /* @__PURE__ */ o("div", {
|
|
222
222
|
className: "space-y-3",
|
|
223
223
|
children: [
|
|
@@ -269,33 +269,33 @@ function I({ ...e }) {
|
|
|
269
269
|
...e
|
|
270
270
|
});
|
|
271
271
|
}
|
|
272
|
-
function
|
|
272
|
+
function dt({ ...e }) {
|
|
273
273
|
return /* @__PURE__ */ a(w.Trigger, {
|
|
274
274
|
"data-slot": "dialog-trigger",
|
|
275
275
|
...e
|
|
276
276
|
});
|
|
277
277
|
}
|
|
278
|
-
function
|
|
278
|
+
function ft({ ...e }) {
|
|
279
279
|
return /* @__PURE__ */ a(w.Portal, {
|
|
280
280
|
"data-slot": "dialog-portal",
|
|
281
281
|
...e
|
|
282
282
|
});
|
|
283
283
|
}
|
|
284
|
-
function
|
|
284
|
+
function pt({ ...e }) {
|
|
285
285
|
return /* @__PURE__ */ a(w.Close, {
|
|
286
286
|
"data-slot": "dialog-close",
|
|
287
287
|
...e
|
|
288
288
|
});
|
|
289
289
|
}
|
|
290
|
-
function
|
|
290
|
+
function mt({ className: e, ...t }) {
|
|
291
291
|
return /* @__PURE__ */ a(w.Overlay, {
|
|
292
292
|
"data-slot": "dialog-overlay",
|
|
293
293
|
className: P("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 isolate z-50", e),
|
|
294
294
|
...t
|
|
295
295
|
});
|
|
296
296
|
}
|
|
297
|
-
function
|
|
298
|
-
return /* @__PURE__ */ o(
|
|
297
|
+
function ht({ className: e, children: t, showCloseButton: n = !0, ...r }) {
|
|
298
|
+
return /* @__PURE__ */ o(ft, { children: [/* @__PURE__ */ a(mt, {}), /* @__PURE__ */ o(w.Content, {
|
|
299
299
|
"data-slot": "dialog-content",
|
|
300
300
|
className: P("bg-background data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 ring-foreground/10 grid max-w-[calc(100%-2rem)] gap-4 rounded-xl p-4 text-sm ring-1 duration-100 sm:max-w-sm fixed top-1/2 left-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2 outline-none", e),
|
|
301
301
|
...r,
|
|
@@ -314,14 +314,14 @@ function mt({ className: e, children: t, showCloseButton: n = !0, ...r }) {
|
|
|
314
314
|
})]
|
|
315
315
|
})] });
|
|
316
316
|
}
|
|
317
|
-
function
|
|
317
|
+
function gt({ className: e, ...t }) {
|
|
318
318
|
return /* @__PURE__ */ a("div", {
|
|
319
319
|
"data-slot": "dialog-header",
|
|
320
320
|
className: P("gap-2 flex flex-col", e),
|
|
321
321
|
...t
|
|
322
322
|
});
|
|
323
323
|
}
|
|
324
|
-
function
|
|
324
|
+
function _t({ className: e, showCloseButton: t = !1, children: n, ...r }) {
|
|
325
325
|
return /* @__PURE__ */ o("div", {
|
|
326
326
|
"data-slot": "dialog-footer",
|
|
327
327
|
className: P("bg-muted/50 -mx-4 -mb-4 rounded-b-xl border-t p-4 flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", e),
|
|
@@ -335,14 +335,14 @@ function gt({ className: e, showCloseButton: t = !1, children: n, ...r }) {
|
|
|
335
335
|
})]
|
|
336
336
|
});
|
|
337
337
|
}
|
|
338
|
-
function
|
|
338
|
+
function vt({ className: e, ...t }) {
|
|
339
339
|
return /* @__PURE__ */ a(w.Title, {
|
|
340
340
|
"data-slot": "dialog-title",
|
|
341
341
|
className: P("text-base leading-none font-medium", e),
|
|
342
342
|
...t
|
|
343
343
|
});
|
|
344
344
|
}
|
|
345
|
-
function
|
|
345
|
+
function yt({ className: e, ...t }) {
|
|
346
346
|
return /* @__PURE__ */ a(w.Description, {
|
|
347
347
|
"data-slot": "dialog-description",
|
|
348
348
|
className: P("text-muted-foreground *:[a]:hover:text-foreground text-sm *:[a]:underline *:[a]:underline-offset-3", e),
|
|
@@ -352,7 +352,7 @@ function vt({ className: e, ...t }) {
|
|
|
352
352
|
//#endregion
|
|
353
353
|
//#region src/components/pure/separator.tsx
|
|
354
354
|
function L({ className: e, orientation: t = "horizontal", decorative: n = !0, ...r }) {
|
|
355
|
-
return /* @__PURE__ */ a(
|
|
355
|
+
return /* @__PURE__ */ a(Fe.Root, {
|
|
356
356
|
"data-slot": "separator",
|
|
357
357
|
decorative: n,
|
|
358
358
|
orientation: t,
|
|
@@ -362,21 +362,21 @@ function L({ className: e, orientation: t = "horizontal", decorative: n = !0, ..
|
|
|
362
362
|
}
|
|
363
363
|
//#endregion
|
|
364
364
|
//#region src/components/custom/dialogs/changeDialog.tsx
|
|
365
|
-
function
|
|
366
|
-
return /* @__PURE__ */ o(
|
|
365
|
+
function bt({ title: e, description: t = "", className: n = "sm:max-w-sm", formData: r, dialogMode: i, service: s, disable: c, onSuccess: l, validate: u = () => !0, children: d }) {
|
|
366
|
+
return /* @__PURE__ */ o(ht, {
|
|
367
367
|
dir: "rtl",
|
|
368
368
|
className: P(n, "scroll-auto"),
|
|
369
369
|
children: [
|
|
370
|
-
/* @__PURE__ */ o(
|
|
370
|
+
/* @__PURE__ */ o(gt, { children: [/* @__PURE__ */ a(vt, { children: e }), /* @__PURE__ */ a(yt, { children: t })] }),
|
|
371
371
|
/* @__PURE__ */ a(L, {}),
|
|
372
372
|
d,
|
|
373
|
-
/* @__PURE__ */ o(
|
|
373
|
+
/* @__PURE__ */ o(_t, { children: [/* @__PURE__ */ a(pt, {
|
|
374
374
|
asChild: !0,
|
|
375
375
|
children: /* @__PURE__ */ a(F, {
|
|
376
376
|
variant: "outline",
|
|
377
377
|
children: "إلغاء"
|
|
378
378
|
})
|
|
379
|
-
}), /* @__PURE__ */ a(
|
|
379
|
+
}), /* @__PURE__ */ a(lt, {
|
|
380
380
|
formData: r,
|
|
381
381
|
dialogMode: i,
|
|
382
382
|
service: s,
|
|
@@ -389,13 +389,13 @@ function yt({ title: e, description: t = "", className: n = "sm:max-w-sm", formD
|
|
|
389
389
|
}
|
|
390
390
|
//#endregion
|
|
391
391
|
//#region src/components/custom/dialogs/deleteDialog.tsx
|
|
392
|
-
function
|
|
392
|
+
function xt({ entityName: e, id: t, service: n, onSuccess: r }) {
|
|
393
393
|
let [s, c] = x(!1);
|
|
394
394
|
async function l() {
|
|
395
395
|
c(!0), (await n.Delete(t)).status === 200 && r?.(), c(!1);
|
|
396
396
|
}
|
|
397
397
|
return /* @__PURE__ */ o(i, { children: [
|
|
398
|
-
/* @__PURE__ */ o(
|
|
398
|
+
/* @__PURE__ */ o(gt, { children: [/* @__PURE__ */ o(vt, { children: ["حذف ", e] }), /* @__PURE__ */ a(yt, {})] }),
|
|
399
399
|
/* @__PURE__ */ a(L, {}),
|
|
400
400
|
/* @__PURE__ */ a("div", {
|
|
401
401
|
className: "mx-auto mb-2 flex h-14 w-14 items-center justify-center rounded-full bg-destructive/10",
|
|
@@ -419,7 +419,7 @@ function bt({ entityName: e, id: t, service: n, onSuccess: r }) {
|
|
|
419
419
|
" نهائياً وإزالته من خوادمنا."
|
|
420
420
|
]
|
|
421
421
|
}),
|
|
422
|
-
/* @__PURE__ */ o(
|
|
422
|
+
/* @__PURE__ */ o(_t, { children: [/* @__PURE__ */ a(pt, {
|
|
423
423
|
asChild: !0,
|
|
424
424
|
children: /* @__PURE__ */ a(F, {
|
|
425
425
|
variant: "outline",
|
|
@@ -435,7 +435,7 @@ function bt({ entityName: e, id: t, service: n, onSuccess: r }) {
|
|
|
435
435
|
}
|
|
436
436
|
//#endregion
|
|
437
437
|
//#region ../../node_modules/date-fns/locale/_lib/buildFormatLongFn.js
|
|
438
|
-
function
|
|
438
|
+
function St(e) {
|
|
439
439
|
return (t = {}) => {
|
|
440
440
|
let n = t.width ? String(t.width) : e.defaultWidth;
|
|
441
441
|
return e.formats[n] || e.formats[e.defaultWidth];
|
|
@@ -443,7 +443,7 @@ function xt(e) {
|
|
|
443
443
|
}
|
|
444
444
|
//#endregion
|
|
445
445
|
//#region ../../node_modules/date-fns/locale/_lib/buildLocalizeFn.js
|
|
446
|
-
function
|
|
446
|
+
function Ct(e) {
|
|
447
447
|
return (t, n) => {
|
|
448
448
|
let r = n?.context ? String(n.context) : "standalone", i;
|
|
449
449
|
if (r === "formatting" && e.formattingValues) {
|
|
@@ -459,11 +459,11 @@ function St(e) {
|
|
|
459
459
|
}
|
|
460
460
|
//#endregion
|
|
461
461
|
//#region ../../node_modules/date-fns/locale/_lib/buildMatchFn.js
|
|
462
|
-
function
|
|
462
|
+
function wt(e) {
|
|
463
463
|
return (t, n = {}) => {
|
|
464
464
|
let r = n.width, i = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], a = t.match(i);
|
|
465
465
|
if (!a) return null;
|
|
466
|
-
let o = a[0], s = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(s) ?
|
|
466
|
+
let o = a[0], s = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(s) ? Et(s, (e) => e.test(o)) : Tt(s, (e) => e.test(o)), l;
|
|
467
467
|
l = e.valueCallback ? e.valueCallback(c) : c, l = n.valueCallback ? n.valueCallback(l) : l;
|
|
468
468
|
let u = t.slice(o.length);
|
|
469
469
|
return {
|
|
@@ -472,15 +472,15 @@ function Ct(e) {
|
|
|
472
472
|
};
|
|
473
473
|
};
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function Tt(e, t) {
|
|
476
476
|
for (let n in e) if (Object.prototype.hasOwnProperty.call(e, n) && t(e[n])) return n;
|
|
477
477
|
}
|
|
478
|
-
function
|
|
478
|
+
function Et(e, t) {
|
|
479
479
|
for (let n = 0; n < e.length; n++) if (t(e[n])) return n;
|
|
480
480
|
}
|
|
481
481
|
//#endregion
|
|
482
482
|
//#region ../../node_modules/date-fns/locale/_lib/buildMatchPatternFn.js
|
|
483
|
-
function
|
|
483
|
+
function Dt(e) {
|
|
484
484
|
return (t, n = {}) => {
|
|
485
485
|
let r = t.match(e.matchPattern);
|
|
486
486
|
if (!r) return null;
|
|
@@ -497,7 +497,7 @@ function Et(e) {
|
|
|
497
497
|
}
|
|
498
498
|
//#endregion
|
|
499
499
|
//#region ../../node_modules/date-fns/locale/ar-SA/_lib/formatDistance.js
|
|
500
|
-
var
|
|
500
|
+
var Ot = {
|
|
501
501
|
lessThanXSeconds: {
|
|
502
502
|
one: "أقل من ثانية واحدة",
|
|
503
503
|
two: "أقل من ثانتين",
|
|
@@ -589,11 +589,11 @@ var Dt = {
|
|
|
589
589
|
threeToTen: "{{count}} أعوام تقريباً",
|
|
590
590
|
other: "{{count}} عام تقريباً"
|
|
591
591
|
}
|
|
592
|
-
},
|
|
593
|
-
let r, i =
|
|
592
|
+
}, kt = (e, t, n) => {
|
|
593
|
+
let r, i = Ot[e];
|
|
594
594
|
return r = typeof i == "string" ? i : t === 1 ? i.one : t === 2 ? i.two : t <= 10 ? i.threeToTen.replace("{{count}}", String(t)) : i.other.replace("{{count}}", String(t)), n?.addSuffix ? n.comparison && n.comparison > 0 ? "في خلال " + r : "منذ " + r : r;
|
|
595
|
-
},
|
|
596
|
-
date:
|
|
595
|
+
}, At = {
|
|
596
|
+
date: St({
|
|
597
597
|
formats: {
|
|
598
598
|
full: "EEEE, MMMM do, y",
|
|
599
599
|
long: "MMMM do, y",
|
|
@@ -602,7 +602,7 @@ var Dt = {
|
|
|
602
602
|
},
|
|
603
603
|
defaultWidth: "full"
|
|
604
604
|
}),
|
|
605
|
-
time:
|
|
605
|
+
time: St({
|
|
606
606
|
formats: {
|
|
607
607
|
full: "h:mm:ss a zzzz",
|
|
608
608
|
long: "h:mm:ss a z",
|
|
@@ -611,7 +611,7 @@ var Dt = {
|
|
|
611
611
|
},
|
|
612
612
|
defaultWidth: "full"
|
|
613
613
|
}),
|
|
614
|
-
dateTime:
|
|
614
|
+
dateTime: St({
|
|
615
615
|
formats: {
|
|
616
616
|
full: "{{date}} 'عند' {{time}}",
|
|
617
617
|
long: "{{date}} 'عند' {{time}}",
|
|
@@ -620,21 +620,21 @@ var Dt = {
|
|
|
620
620
|
},
|
|
621
621
|
defaultWidth: "full"
|
|
622
622
|
})
|
|
623
|
-
},
|
|
623
|
+
}, jt = {
|
|
624
624
|
lastWeek: "'أخر' eeee 'عند' p",
|
|
625
625
|
yesterday: "'أمس عند' p",
|
|
626
626
|
today: "'اليوم عند' p",
|
|
627
627
|
tomorrow: "'غداً عند' p",
|
|
628
628
|
nextWeek: "eeee 'عند' p",
|
|
629
629
|
other: "P"
|
|
630
|
-
},
|
|
630
|
+
}, Mt = {
|
|
631
631
|
code: "ar-SA",
|
|
632
|
-
formatDistance:
|
|
633
|
-
formatLong:
|
|
634
|
-
formatRelative: (e, t, n, r) =>
|
|
632
|
+
formatDistance: kt,
|
|
633
|
+
formatLong: At,
|
|
634
|
+
formatRelative: (e, t, n, r) => jt[e],
|
|
635
635
|
localize: {
|
|
636
636
|
ordinalNumber: (e) => String(e),
|
|
637
|
-
era:
|
|
637
|
+
era: Ct({
|
|
638
638
|
values: {
|
|
639
639
|
narrow: ["ق", "ب"],
|
|
640
640
|
abbreviated: ["ق.م.", "ب.م."],
|
|
@@ -642,7 +642,7 @@ var Dt = {
|
|
|
642
642
|
},
|
|
643
643
|
defaultWidth: "wide"
|
|
644
644
|
}),
|
|
645
|
-
quarter:
|
|
645
|
+
quarter: Ct({
|
|
646
646
|
values: {
|
|
647
647
|
narrow: [
|
|
648
648
|
"1",
|
|
@@ -666,7 +666,7 @@ var Dt = {
|
|
|
666
666
|
defaultWidth: "wide",
|
|
667
667
|
argumentCallback: (e) => e - 1
|
|
668
668
|
}),
|
|
669
|
-
month:
|
|
669
|
+
month: Ct({
|
|
670
670
|
values: {
|
|
671
671
|
narrow: [
|
|
672
672
|
"ي",
|
|
@@ -713,7 +713,7 @@ var Dt = {
|
|
|
713
713
|
},
|
|
714
714
|
defaultWidth: "wide"
|
|
715
715
|
}),
|
|
716
|
-
day:
|
|
716
|
+
day: Ct({
|
|
717
717
|
values: {
|
|
718
718
|
narrow: [
|
|
719
719
|
"ح",
|
|
@@ -754,7 +754,7 @@ var Dt = {
|
|
|
754
754
|
},
|
|
755
755
|
defaultWidth: "wide"
|
|
756
756
|
}),
|
|
757
|
-
dayPeriod:
|
|
757
|
+
dayPeriod: Ct({
|
|
758
758
|
values: {
|
|
759
759
|
narrow: {
|
|
760
760
|
am: "ص",
|
|
@@ -824,12 +824,12 @@ var Dt = {
|
|
|
824
824
|
})
|
|
825
825
|
},
|
|
826
826
|
match: {
|
|
827
|
-
ordinalNumber:
|
|
827
|
+
ordinalNumber: Dt({
|
|
828
828
|
matchPattern: /^(\d+)(th|st|nd|rd)?/i,
|
|
829
829
|
parsePattern: /\d+/i,
|
|
830
830
|
valueCallback: (e) => parseInt(e, 10)
|
|
831
831
|
}),
|
|
832
|
-
era:
|
|
832
|
+
era: wt({
|
|
833
833
|
matchPatterns: {
|
|
834
834
|
narrow: /^(ق|ب)/i,
|
|
835
835
|
abbreviated: /^(ق\.?\s?م\.?|ق\.?\s?م\.?\s?|a\.?\s?d\.?|c\.?\s?)/i,
|
|
@@ -839,7 +839,7 @@ var Dt = {
|
|
|
839
839
|
parsePatterns: { any: [/^قبل/i, /^بعد/i] },
|
|
840
840
|
defaultParseWidth: "any"
|
|
841
841
|
}),
|
|
842
|
-
quarter:
|
|
842
|
+
quarter: wt({
|
|
843
843
|
matchPatterns: {
|
|
844
844
|
narrow: /^[1234]/i,
|
|
845
845
|
abbreviated: /^ر[1234]/i,
|
|
@@ -855,7 +855,7 @@ var Dt = {
|
|
|
855
855
|
defaultParseWidth: "any",
|
|
856
856
|
valueCallback: (e) => e + 1
|
|
857
857
|
}),
|
|
858
|
-
month:
|
|
858
|
+
month: wt({
|
|
859
859
|
matchPatterns: {
|
|
860
860
|
narrow: /^[يفمأمسند]/i,
|
|
861
861
|
abbreviated: /^(ين|ف|مار|أب|ماي|يون|يول|أغ|س|أك|ن|د)/i,
|
|
@@ -894,7 +894,7 @@ var Dt = {
|
|
|
894
894
|
},
|
|
895
895
|
defaultParseWidth: "any"
|
|
896
896
|
}),
|
|
897
|
-
day:
|
|
897
|
+
day: wt({
|
|
898
898
|
matchPatterns: {
|
|
899
899
|
narrow: /^[حنثرخجس]/i,
|
|
900
900
|
short: /^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/i,
|
|
@@ -933,7 +933,7 @@ var Dt = {
|
|
|
933
933
|
},
|
|
934
934
|
defaultParseWidth: "any"
|
|
935
935
|
}),
|
|
936
|
-
dayPeriod:
|
|
936
|
+
dayPeriod: wt({
|
|
937
937
|
matchPatterns: {
|
|
938
938
|
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
939
939
|
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
@@ -959,9 +959,9 @@ var Dt = {
|
|
|
959
959
|
};
|
|
960
960
|
//#endregion
|
|
961
961
|
//#region src/components/pure/calendar.tsx
|
|
962
|
-
function
|
|
963
|
-
let f =
|
|
964
|
-
return /* @__PURE__ */ a(
|
|
962
|
+
function Nt({ className: e, classNames: t, showOutsideDays: n = !0, captionLayout: r = "label", buttonVariant: i = "ghost", locale: o, formatters: s, components: c, ...u }) {
|
|
963
|
+
let f = Re();
|
|
964
|
+
return /* @__PURE__ */ a(Le, {
|
|
965
965
|
showOutsideDays: n,
|
|
966
966
|
className: P("p-2 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(7)] bg-background group/calendar in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent", String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`, String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`, e),
|
|
967
967
|
captionLayout: r,
|
|
@@ -975,8 +975,8 @@ function Mt({ className: e, classNames: t, showOutsideDays: n = !0, captionLayou
|
|
|
975
975
|
months: P("flex gap-4 flex-col md:flex-row relative", f.months),
|
|
976
976
|
month: P("flex flex-col w-full gap-4", f.month),
|
|
977
977
|
nav: P("flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between", f.nav),
|
|
978
|
-
button_previous: P(
|
|
979
|
-
button_next: P(
|
|
978
|
+
button_previous: P(ct({ variant: i }), "size-(--cell-size) aria-disabled:opacity-50 p-0 select-none", f.button_previous),
|
|
979
|
+
button_next: P(ct({ variant: i }), "size-(--cell-size) aria-disabled:opacity-50 p-0 select-none", f.button_next),
|
|
980
980
|
month_caption: P("flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)", f.month_caption),
|
|
981
981
|
dropdowns: P("w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5", f.dropdowns),
|
|
982
982
|
dropdown_root: P("relative rounded-(--cell-radius)", f.dropdown_root),
|
|
@@ -1015,7 +1015,7 @@ function Mt({ className: e, classNames: t, showOutsideDays: n = !0, captionLayou
|
|
|
1015
1015
|
className: P("size-4", e),
|
|
1016
1016
|
...n
|
|
1017
1017
|
}),
|
|
1018
|
-
DayButton: ({ ...e }) => /* @__PURE__ */ a(
|
|
1018
|
+
DayButton: ({ ...e }) => /* @__PURE__ */ a(Pt, {
|
|
1019
1019
|
locale: o,
|
|
1020
1020
|
...e
|
|
1021
1021
|
}),
|
|
@@ -1031,8 +1031,8 @@ function Mt({ className: e, classNames: t, showOutsideDays: n = !0, captionLayou
|
|
|
1031
1031
|
...u
|
|
1032
1032
|
});
|
|
1033
1033
|
}
|
|
1034
|
-
function
|
|
1035
|
-
let o =
|
|
1034
|
+
function Pt({ className: e, day: t, modifiers: n, locale: r, ...i }) {
|
|
1035
|
+
let o = Re(), s = y.useRef(null);
|
|
1036
1036
|
return y.useEffect(() => {
|
|
1037
1037
|
n.focused && s.current?.focus();
|
|
1038
1038
|
}, [n.focused]), /* @__PURE__ */ a(F, {
|
|
@@ -1050,20 +1050,20 @@ function Nt({ className: e, day: t, modifiers: n, locale: r, ...i }) {
|
|
|
1050
1050
|
}
|
|
1051
1051
|
//#endregion
|
|
1052
1052
|
//#region src/components/pure/popover.tsx
|
|
1053
|
-
function
|
|
1054
|
-
return /* @__PURE__ */ a(
|
|
1053
|
+
function Ft({ ...e }) {
|
|
1054
|
+
return /* @__PURE__ */ a(ze.Root, {
|
|
1055
1055
|
"data-slot": "popover",
|
|
1056
1056
|
...e
|
|
1057
1057
|
});
|
|
1058
1058
|
}
|
|
1059
|
-
function
|
|
1060
|
-
return /* @__PURE__ */ a(
|
|
1059
|
+
function It({ ...e }) {
|
|
1060
|
+
return /* @__PURE__ */ a(ze.Trigger, {
|
|
1061
1061
|
"data-slot": "popover-trigger",
|
|
1062
1062
|
...e
|
|
1063
1063
|
});
|
|
1064
1064
|
}
|
|
1065
|
-
function
|
|
1066
|
-
return /* @__PURE__ */ a(
|
|
1065
|
+
function Lt({ className: e, align: t = "center", sideOffset: n = 4, ...r }) {
|
|
1066
|
+
return /* @__PURE__ */ a(ze.Portal, { children: /* @__PURE__ */ a(ze.Content, {
|
|
1067
1067
|
"data-slot": "popover-content",
|
|
1068
1068
|
align: t,
|
|
1069
1069
|
sideOffset: n,
|
|
@@ -1071,27 +1071,27 @@ function It({ className: e, align: t = "center", sideOffset: n = 4, ...r }) {
|
|
|
1071
1071
|
...r
|
|
1072
1072
|
}) });
|
|
1073
1073
|
}
|
|
1074
|
-
function
|
|
1075
|
-
return /* @__PURE__ */ a(
|
|
1074
|
+
function Rt({ ...e }) {
|
|
1075
|
+
return /* @__PURE__ */ a(ze.Anchor, {
|
|
1076
1076
|
"data-slot": "popover-anchor",
|
|
1077
1077
|
...e
|
|
1078
1078
|
});
|
|
1079
1079
|
}
|
|
1080
|
-
function
|
|
1080
|
+
function zt({ className: e, ...t }) {
|
|
1081
1081
|
return /* @__PURE__ */ a("div", {
|
|
1082
1082
|
"data-slot": "popover-header",
|
|
1083
1083
|
className: P("flex flex-col gap-0.5 text-sm", e),
|
|
1084
1084
|
...t
|
|
1085
1085
|
});
|
|
1086
1086
|
}
|
|
1087
|
-
function
|
|
1087
|
+
function Bt({ className: e, ...t }) {
|
|
1088
1088
|
return /* @__PURE__ */ a("div", {
|
|
1089
1089
|
"data-slot": "popover-title",
|
|
1090
1090
|
className: P("font-medium", e),
|
|
1091
1091
|
...t
|
|
1092
1092
|
});
|
|
1093
1093
|
}
|
|
1094
|
-
function
|
|
1094
|
+
function Vt({ className: e, ...t }) {
|
|
1095
1095
|
return /* @__PURE__ */ a("p", {
|
|
1096
1096
|
"data-slot": "popover-description",
|
|
1097
1097
|
className: P("text-muted-foreground", e),
|
|
@@ -1100,28 +1100,39 @@ function Bt({ className: e, ...t }) {
|
|
|
1100
1100
|
}
|
|
1101
1101
|
//#endregion
|
|
1102
1102
|
//#region src/components/custom/inputs/dateInput.tsx
|
|
1103
|
-
function
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1103
|
+
function Ht({ value: e, onChange: t, isInvalid: n, placeholder: r = "اختر تاريخا", locale: i = Mt, startYear: s = (/* @__PURE__ */ new Date()).getFullYear() - 100, endYear: c = (/* @__PURE__ */ new Date()).getFullYear() + 10 }) {
|
|
1104
|
+
let [u, d] = x(!1);
|
|
1105
|
+
return /* @__PURE__ */ o(Ft, {
|
|
1106
|
+
open: u,
|
|
1107
|
+
onOpenChange: d,
|
|
1108
|
+
children: [/* @__PURE__ */ a(It, {
|
|
1109
|
+
asChild: !0,
|
|
1110
|
+
children: /* @__PURE__ */ o(F, {
|
|
1111
|
+
variant: "outline",
|
|
1112
|
+
className: P("w-full justify-between text-left font-normal", !e && "text-muted-foreground", n && "border-red-600 ring-red-600 text-red-900"),
|
|
1113
|
+
children: [e ? Ie(e, "PPP", { locale: i }) : /* @__PURE__ */ a("span", { children: r }), /* @__PURE__ */ a(l, { className: "h-4 w-4 opacity-50" })]
|
|
1114
|
+
})
|
|
1115
|
+
}), /* @__PURE__ */ a(Lt, {
|
|
1116
|
+
className: "w-auto p-0",
|
|
1117
|
+
align: "start",
|
|
1118
|
+
children: /* @__PURE__ */ a(Nt, {
|
|
1119
|
+
mode: "single",
|
|
1120
|
+
selected: e,
|
|
1121
|
+
onSelect: (e) => {
|
|
1122
|
+
t(e), d(!1);
|
|
1123
|
+
},
|
|
1124
|
+
locale: i,
|
|
1125
|
+
captionLayout: "dropdown",
|
|
1126
|
+
startMonth: new Date(s, 0),
|
|
1127
|
+
endMonth: new Date(c, 11)
|
|
1128
|
+
})
|
|
1129
|
+
})]
|
|
1130
|
+
});
|
|
1120
1131
|
}
|
|
1121
1132
|
//#endregion
|
|
1122
1133
|
//#region src/components/pure/label.tsx
|
|
1123
|
-
function
|
|
1124
|
-
return /* @__PURE__ */ a(
|
|
1134
|
+
function Ut({ className: e, ...t }) {
|
|
1135
|
+
return /* @__PURE__ */ a(Be.Root, {
|
|
1125
1136
|
"data-slot": "label",
|
|
1126
1137
|
className: P("gap-2 text-sm leading-none font-medium group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed", e),
|
|
1127
1138
|
...t
|
|
@@ -1135,7 +1146,7 @@ function R({ label: e, error: t, isInvalid: n, children: r, required: i }) {
|
|
|
1135
1146
|
children: [
|
|
1136
1147
|
/* @__PURE__ */ o("div", {
|
|
1137
1148
|
className: "flex items-center gap-1",
|
|
1138
|
-
children: [/* @__PURE__ */ a(
|
|
1149
|
+
children: [/* @__PURE__ */ a(Ut, {
|
|
1139
1150
|
className: "text-sm font-medium",
|
|
1140
1151
|
children: e
|
|
1141
1152
|
}), i && /* @__PURE__ */ a("span", {
|
|
@@ -1153,13 +1164,13 @@ function R({ label: e, error: t, isInvalid: n, children: r, required: i }) {
|
|
|
1153
1164
|
}
|
|
1154
1165
|
//#endregion
|
|
1155
1166
|
//#region src/components/custom/fields/dateField.tsx
|
|
1156
|
-
function
|
|
1167
|
+
function Wt({ label: e, error: t, isInvalid: n, required: r, ...i }) {
|
|
1157
1168
|
return /* @__PURE__ */ a(R, {
|
|
1158
1169
|
label: e,
|
|
1159
1170
|
error: t,
|
|
1160
1171
|
isInvalid: n,
|
|
1161
1172
|
required: r,
|
|
1162
|
-
children: /* @__PURE__ */ a(
|
|
1173
|
+
children: /* @__PURE__ */ a(Ht, {
|
|
1163
1174
|
...i,
|
|
1164
1175
|
isInvalid: n
|
|
1165
1176
|
})
|
|
@@ -1177,7 +1188,7 @@ function z({ className: e, type: t, ...n }) {
|
|
|
1177
1188
|
}
|
|
1178
1189
|
//#endregion
|
|
1179
1190
|
//#region src/components/custom/inputs/baseInput.tsx
|
|
1180
|
-
function
|
|
1191
|
+
function Gt({ isInvalid: e, className: t, ...n }) {
|
|
1181
1192
|
return /* @__PURE__ */ a(z, {
|
|
1182
1193
|
...n,
|
|
1183
1194
|
className: P(t, e && "border-red-500 ring-red-500 text-red-900 focus-visible:ring-red-500")
|
|
@@ -1185,13 +1196,13 @@ function Wt({ isInvalid: e, className: t, ...n }) {
|
|
|
1185
1196
|
}
|
|
1186
1197
|
//#endregion
|
|
1187
1198
|
//#region src/components/custom/inputs/dateTimeInput.tsx
|
|
1188
|
-
function
|
|
1199
|
+
function Kt({ value: e, onChange: t, isInvalid: n, locale: r = Mt }) {
|
|
1189
1200
|
let i = e instanceof Date ? e : void 0;
|
|
1190
1201
|
return /* @__PURE__ */ o("div", {
|
|
1191
1202
|
className: "flex gap-2 w-full",
|
|
1192
1203
|
children: [/* @__PURE__ */ a("div", {
|
|
1193
1204
|
className: "flex-1",
|
|
1194
|
-
children: /* @__PURE__ */ a(
|
|
1205
|
+
children: /* @__PURE__ */ a(Ht, {
|
|
1195
1206
|
value: i,
|
|
1196
1207
|
onChange: (e) => {
|
|
1197
1208
|
if (!e) return;
|
|
@@ -1204,10 +1215,10 @@ function Gt({ value: e, onChange: t, isInvalid: n, locale: r = jt }) {
|
|
|
1204
1215
|
})
|
|
1205
1216
|
}), /* @__PURE__ */ a("div", {
|
|
1206
1217
|
className: "w-24",
|
|
1207
|
-
children: /* @__PURE__ */ a(
|
|
1218
|
+
children: /* @__PURE__ */ a(Gt, {
|
|
1208
1219
|
type: "time",
|
|
1209
1220
|
className: "bg-background appearance-none",
|
|
1210
|
-
value: i ?
|
|
1221
|
+
value: i ? Ie(i, "HH:mm") : "",
|
|
1211
1222
|
onChange: (e) => {
|
|
1212
1223
|
let n = e.target.value;
|
|
1213
1224
|
if (!n) return;
|
|
@@ -1221,13 +1232,13 @@ function Gt({ value: e, onChange: t, isInvalid: n, locale: r = jt }) {
|
|
|
1221
1232
|
}
|
|
1222
1233
|
//#endregion
|
|
1223
1234
|
//#region src/components/custom/fields/dateTimeField.tsx
|
|
1224
|
-
function
|
|
1235
|
+
function qt({ label: e, error: t, isInvalid: n, required: r, ...i }) {
|
|
1225
1236
|
return /* @__PURE__ */ a(R, {
|
|
1226
1237
|
label: e,
|
|
1227
1238
|
error: t,
|
|
1228
1239
|
isInvalid: n,
|
|
1229
1240
|
required: r,
|
|
1230
|
-
children: /* @__PURE__ */ a(
|
|
1241
|
+
children: /* @__PURE__ */ a(Kt, {
|
|
1231
1242
|
...i,
|
|
1232
1243
|
isInvalid: n
|
|
1233
1244
|
})
|
|
@@ -1235,12 +1246,12 @@ function Kt({ label: e, error: t, isInvalid: n, required: r, ...i }) {
|
|
|
1235
1246
|
}
|
|
1236
1247
|
//#endregion
|
|
1237
1248
|
//#region src/components/custom/separators/titleSeparator.tsx
|
|
1238
|
-
function
|
|
1249
|
+
function Jt({ title: e }) {
|
|
1239
1250
|
return /* @__PURE__ */ o("div", {
|
|
1240
1251
|
className: "flex items-center gap-4",
|
|
1241
1252
|
children: [
|
|
1242
1253
|
/* @__PURE__ */ a(L, { className: "flex-1" }),
|
|
1243
|
-
/* @__PURE__ */ a(
|
|
1254
|
+
/* @__PURE__ */ a(Ut, {
|
|
1244
1255
|
className: "shrink-0 text-sm font-semibold",
|
|
1245
1256
|
children: e
|
|
1246
1257
|
}),
|
|
@@ -1250,10 +1261,10 @@ function qt({ title: e }) {
|
|
|
1250
1261
|
}
|
|
1251
1262
|
//#endregion
|
|
1252
1263
|
//#region src/components/custom/fields/fieldsSection.tsx
|
|
1253
|
-
function
|
|
1264
|
+
function Yt({ title: e, children: t, columns: n = 2, className: r }) {
|
|
1254
1265
|
return /* @__PURE__ */ o("div", {
|
|
1255
1266
|
className: P("space-y-3", r),
|
|
1256
|
-
children: [e && /* @__PURE__ */ a(
|
|
1267
|
+
children: [e && /* @__PURE__ */ a(Jt, { title: e }), /* @__PURE__ */ a("div", {
|
|
1257
1268
|
className: P("grid gap-4", {
|
|
1258
1269
|
"grid-cols-1": n === 1,
|
|
1259
1270
|
"grid-cols-2": n === 2,
|
|
@@ -1265,13 +1276,13 @@ function Jt({ title: e, children: t, columns: n = 2, className: r }) {
|
|
|
1265
1276
|
}
|
|
1266
1277
|
//#endregion
|
|
1267
1278
|
//#region src/components/custom/fields/inputField.tsx
|
|
1268
|
-
function
|
|
1279
|
+
function Xt({ label: e, error: t, isInvalid: n, required: r, ...i }) {
|
|
1269
1280
|
return /* @__PURE__ */ a(R, {
|
|
1270
1281
|
label: e,
|
|
1271
1282
|
error: t,
|
|
1272
1283
|
isInvalid: n,
|
|
1273
1284
|
required: r,
|
|
1274
|
-
children: /* @__PURE__ */ a(
|
|
1285
|
+
children: /* @__PURE__ */ a(Gt, {
|
|
1275
1286
|
...i,
|
|
1276
1287
|
isInvalid: n
|
|
1277
1288
|
})
|
|
@@ -1279,7 +1290,7 @@ function Yt({ label: e, error: t, isInvalid: n, required: r, ...i }) {
|
|
|
1279
1290
|
}
|
|
1280
1291
|
//#endregion
|
|
1281
1292
|
//#region src/components/custom/inputs/numberInput.tsx
|
|
1282
|
-
function
|
|
1293
|
+
function Zt({ onChange: e, min: t, max: n, isInvalid: r, className: i, ...o }) {
|
|
1283
1294
|
return /* @__PURE__ */ a(z, {
|
|
1284
1295
|
...o,
|
|
1285
1296
|
type: "number",
|
|
@@ -1299,13 +1310,13 @@ function Xt({ onChange: e, min: t, max: n, isInvalid: r, className: i, ...o }) {
|
|
|
1299
1310
|
}
|
|
1300
1311
|
//#endregion
|
|
1301
1312
|
//#region src/components/custom/fields/numberField.tsx
|
|
1302
|
-
function
|
|
1313
|
+
function Qt({ label: e, error: t, isInvalid: n, required: r, ...i }) {
|
|
1303
1314
|
return /* @__PURE__ */ a(R, {
|
|
1304
1315
|
label: e,
|
|
1305
1316
|
error: t,
|
|
1306
1317
|
isInvalid: n,
|
|
1307
1318
|
required: r,
|
|
1308
|
-
children: /* @__PURE__ */ a(
|
|
1319
|
+
children: /* @__PURE__ */ a(Zt, {
|
|
1309
1320
|
...i,
|
|
1310
1321
|
isInvalid: n
|
|
1311
1322
|
})
|
|
@@ -1313,11 +1324,11 @@ function Zt({ label: e, error: t, isInvalid: n, required: r, ...i }) {
|
|
|
1313
1324
|
}
|
|
1314
1325
|
//#endregion
|
|
1315
1326
|
//#region src/components/custom/fields/passwordField.tsx
|
|
1316
|
-
function
|
|
1327
|
+
function $t(e) {
|
|
1317
1328
|
let [t, n] = x(!1);
|
|
1318
1329
|
return /* @__PURE__ */ o("div", {
|
|
1319
1330
|
className: "relative",
|
|
1320
|
-
children: [/* @__PURE__ */ a(
|
|
1331
|
+
children: [/* @__PURE__ */ a(Xt, {
|
|
1321
1332
|
...e,
|
|
1322
1333
|
type: t ? "text" : "password",
|
|
1323
1334
|
className: "pl-10"
|
|
@@ -1331,8 +1342,8 @@ function Qt(e) {
|
|
|
1331
1342
|
}
|
|
1332
1343
|
//#endregion
|
|
1333
1344
|
//#region src/components/custom/fields/phoneField.tsx
|
|
1334
|
-
function
|
|
1335
|
-
return /* @__PURE__ */ a(
|
|
1345
|
+
function en(e) {
|
|
1346
|
+
return /* @__PURE__ */ a(Xt, {
|
|
1336
1347
|
...e,
|
|
1337
1348
|
type: "tel",
|
|
1338
1349
|
dir: "ltr",
|
|
@@ -1342,26 +1353,26 @@ function $t(e) {
|
|
|
1342
1353
|
}
|
|
1343
1354
|
//#endregion
|
|
1344
1355
|
//#region src/components/pure/select.tsx
|
|
1345
|
-
function
|
|
1356
|
+
function tn({ ...e }) {
|
|
1346
1357
|
return /* @__PURE__ */ a(T.Root, {
|
|
1347
1358
|
"data-slot": "select",
|
|
1348
1359
|
...e
|
|
1349
1360
|
});
|
|
1350
1361
|
}
|
|
1351
|
-
function
|
|
1362
|
+
function nn({ className: e, ...t }) {
|
|
1352
1363
|
return /* @__PURE__ */ a(T.Group, {
|
|
1353
1364
|
"data-slot": "select-group",
|
|
1354
1365
|
className: P("scroll-my-1 p-1", e),
|
|
1355
1366
|
...t
|
|
1356
1367
|
});
|
|
1357
1368
|
}
|
|
1358
|
-
function
|
|
1369
|
+
function rn({ ...e }) {
|
|
1359
1370
|
return /* @__PURE__ */ a(T.Value, {
|
|
1360
1371
|
"data-slot": "select-value",
|
|
1361
1372
|
...e
|
|
1362
1373
|
});
|
|
1363
1374
|
}
|
|
1364
|
-
function
|
|
1375
|
+
function an({ className: e, size: t = "default", children: n, ...r }) {
|
|
1365
1376
|
return /* @__PURE__ */ o(T.Trigger, {
|
|
1366
1377
|
"data-slot": "select-trigger",
|
|
1367
1378
|
"data-size": t,
|
|
@@ -1373,7 +1384,7 @@ function rn({ className: e, size: t = "default", children: n, ...r }) {
|
|
|
1373
1384
|
})]
|
|
1374
1385
|
});
|
|
1375
1386
|
}
|
|
1376
|
-
function
|
|
1387
|
+
function on({ className: e, children: t, position: n = "item-aligned", align: r = "center", ...i }) {
|
|
1377
1388
|
return /* @__PURE__ */ a(T.Portal, { children: /* @__PURE__ */ o(T.Content, {
|
|
1378
1389
|
"data-slot": "select-content",
|
|
1379
1390
|
"data-align-trigger": n === "item-aligned",
|
|
@@ -1382,24 +1393,24 @@ function an({ className: e, children: t, position: n = "item-aligned", align: r
|
|
|
1382
1393
|
align: r,
|
|
1383
1394
|
...i,
|
|
1384
1395
|
children: [
|
|
1385
|
-
/* @__PURE__ */ a(
|
|
1396
|
+
/* @__PURE__ */ a(un, {}),
|
|
1386
1397
|
/* @__PURE__ */ a(T.Viewport, {
|
|
1387
1398
|
"data-position": n,
|
|
1388
1399
|
className: P("data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)", n === "popper" && ""),
|
|
1389
1400
|
children: t
|
|
1390
1401
|
}),
|
|
1391
|
-
/* @__PURE__ */ a(
|
|
1402
|
+
/* @__PURE__ */ a(dn, {})
|
|
1392
1403
|
]
|
|
1393
1404
|
}) });
|
|
1394
1405
|
}
|
|
1395
|
-
function
|
|
1406
|
+
function sn({ className: e, ...t }) {
|
|
1396
1407
|
return /* @__PURE__ */ a(T.Label, {
|
|
1397
1408
|
"data-slot": "select-label",
|
|
1398
1409
|
className: P("text-muted-foreground px-1.5 py-1 text-xs", e),
|
|
1399
1410
|
...t
|
|
1400
1411
|
});
|
|
1401
1412
|
}
|
|
1402
|
-
function
|
|
1413
|
+
function cn({ className: e, children: t, ...n }) {
|
|
1403
1414
|
return /* @__PURE__ */ o(T.Item, {
|
|
1404
1415
|
"data-slot": "select-item",
|
|
1405
1416
|
className: P("focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-1.5 rounded-md py-1 pe-8 ps-1.5 text-sm [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 relative flex w-full cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", e),
|
|
@@ -1410,14 +1421,14 @@ function sn({ className: e, children: t, ...n }) {
|
|
|
1410
1421
|
}), /* @__PURE__ */ a(T.ItemText, { children: t })]
|
|
1411
1422
|
});
|
|
1412
1423
|
}
|
|
1413
|
-
function
|
|
1424
|
+
function ln({ className: e, ...t }) {
|
|
1414
1425
|
return /* @__PURE__ */ a(T.Separator, {
|
|
1415
1426
|
"data-slot": "select-separator",
|
|
1416
1427
|
className: P("bg-border -mx-1 my-1 h-px pointer-events-none", e),
|
|
1417
1428
|
...t
|
|
1418
1429
|
});
|
|
1419
1430
|
}
|
|
1420
|
-
function
|
|
1431
|
+
function un({ className: e, ...t }) {
|
|
1421
1432
|
return /* @__PURE__ */ a(T.ScrollUpButton, {
|
|
1422
1433
|
"data-slot": "select-scroll-up-button",
|
|
1423
1434
|
className: P("bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4", e),
|
|
@@ -1425,7 +1436,7 @@ function ln({ className: e, ...t }) {
|
|
|
1425
1436
|
children: /* @__PURE__ */ a(m, {})
|
|
1426
1437
|
});
|
|
1427
1438
|
}
|
|
1428
|
-
function
|
|
1439
|
+
function dn({ className: e, ...t }) {
|
|
1429
1440
|
return /* @__PURE__ */ a(T.ScrollDownButton, {
|
|
1430
1441
|
"data-slot": "select-scroll-down-button",
|
|
1431
1442
|
className: P("bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4", e),
|
|
@@ -1435,16 +1446,16 @@ function un({ className: e, ...t }) {
|
|
|
1435
1446
|
}
|
|
1436
1447
|
//#endregion
|
|
1437
1448
|
//#region src/components/custom/inputs/selectInput.tsx
|
|
1438
|
-
function
|
|
1439
|
-
return /* @__PURE__ */ o(
|
|
1449
|
+
function fn({ value: e, onValueChange: t, options: n, placeholder: r, isInvalid: i, disabled: s }) {
|
|
1450
|
+
return /* @__PURE__ */ o(tn, {
|
|
1440
1451
|
value: e,
|
|
1441
1452
|
onValueChange: t,
|
|
1442
1453
|
dir: "rtl",
|
|
1443
1454
|
disabled: s,
|
|
1444
|
-
children: [/* @__PURE__ */ a(
|
|
1455
|
+
children: [/* @__PURE__ */ a(an, {
|
|
1445
1456
|
className: P("w-full", i && "border-red-600 ring-red-600 text-red-900"),
|
|
1446
|
-
children: /* @__PURE__ */ a(
|
|
1447
|
-
}), /* @__PURE__ */ a(
|
|
1457
|
+
children: /* @__PURE__ */ a(rn, { placeholder: r })
|
|
1458
|
+
}), /* @__PURE__ */ a(on, { children: n.map((e) => /* @__PURE__ */ a(cn, {
|
|
1448
1459
|
value: e.value,
|
|
1449
1460
|
children: e.label
|
|
1450
1461
|
}, e.value)) })]
|
|
@@ -1452,13 +1463,13 @@ function dn({ value: e, onValueChange: t, options: n, placeholder: r, isInvalid:
|
|
|
1452
1463
|
}
|
|
1453
1464
|
//#endregion
|
|
1454
1465
|
//#region src/components/custom/fields/selectField.tsx
|
|
1455
|
-
function
|
|
1466
|
+
function pn({ label: e, error: t, required: n, isInvalid: r, ...i }) {
|
|
1456
1467
|
return /* @__PURE__ */ a(R, {
|
|
1457
1468
|
label: e,
|
|
1458
1469
|
error: t,
|
|
1459
1470
|
isInvalid: r,
|
|
1460
1471
|
required: n,
|
|
1461
|
-
children: /* @__PURE__ */ a(
|
|
1472
|
+
children: /* @__PURE__ */ a(fn, {
|
|
1462
1473
|
...i,
|
|
1463
1474
|
isInvalid: r
|
|
1464
1475
|
})
|
|
@@ -1466,7 +1477,7 @@ function fn({ label: e, error: t, required: n, isInvalid: r, ...i }) {
|
|
|
1466
1477
|
}
|
|
1467
1478
|
//#endregion
|
|
1468
1479
|
//#region src/components/pure/card.tsx
|
|
1469
|
-
function
|
|
1480
|
+
function mn({ className: e, size: t = "default", ...n }) {
|
|
1470
1481
|
return /* @__PURE__ */ a("div", {
|
|
1471
1482
|
"data-slot": "card",
|
|
1472
1483
|
"data-size": t,
|
|
@@ -1474,42 +1485,42 @@ function pn({ className: e, size: t = "default", ...n }) {
|
|
|
1474
1485
|
...n
|
|
1475
1486
|
});
|
|
1476
1487
|
}
|
|
1477
|
-
function
|
|
1488
|
+
function hn({ className: e, ...t }) {
|
|
1478
1489
|
return /* @__PURE__ */ a("div", {
|
|
1479
1490
|
"data-slot": "card-header",
|
|
1480
1491
|
className: P("gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3 group/card-header @container/card-header grid auto-rows-min items-start has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]", e),
|
|
1481
1492
|
...t
|
|
1482
1493
|
});
|
|
1483
1494
|
}
|
|
1484
|
-
function
|
|
1495
|
+
function gn({ className: e, ...t }) {
|
|
1485
1496
|
return /* @__PURE__ */ a("div", {
|
|
1486
1497
|
"data-slot": "card-title",
|
|
1487
1498
|
className: P("text-base leading-snug font-medium group-data-[size=sm]/card:text-sm", e),
|
|
1488
1499
|
...t
|
|
1489
1500
|
});
|
|
1490
1501
|
}
|
|
1491
|
-
function
|
|
1502
|
+
function _n({ className: e, ...t }) {
|
|
1492
1503
|
return /* @__PURE__ */ a("div", {
|
|
1493
1504
|
"data-slot": "card-description",
|
|
1494
1505
|
className: P("text-muted-foreground text-sm", e),
|
|
1495
1506
|
...t
|
|
1496
1507
|
});
|
|
1497
1508
|
}
|
|
1498
|
-
function
|
|
1509
|
+
function vn({ className: e, ...t }) {
|
|
1499
1510
|
return /* @__PURE__ */ a("div", {
|
|
1500
1511
|
"data-slot": "card-action",
|
|
1501
1512
|
className: P("col-start-2 row-span-2 row-start-1 self-start justify-self-end", e),
|
|
1502
1513
|
...t
|
|
1503
1514
|
});
|
|
1504
1515
|
}
|
|
1505
|
-
function
|
|
1516
|
+
function yn({ className: e, ...t }) {
|
|
1506
1517
|
return /* @__PURE__ */ a("div", {
|
|
1507
1518
|
"data-slot": "card-content",
|
|
1508
1519
|
className: P("px-4 group-data-[size=sm]/card:px-3", e),
|
|
1509
1520
|
...t
|
|
1510
1521
|
});
|
|
1511
1522
|
}
|
|
1512
|
-
function
|
|
1523
|
+
function bn({ className: e, ...t }) {
|
|
1513
1524
|
return /* @__PURE__ */ a("div", {
|
|
1514
1525
|
"data-slot": "card-footer",
|
|
1515
1526
|
className: P("bg-muted/50 rounded-b-xl border-t p-4 group-data-[size=sm]/card:p-3 flex items-center", e),
|
|
@@ -1518,14 +1529,14 @@ function yn({ className: e, ...t }) {
|
|
|
1518
1529
|
}
|
|
1519
1530
|
//#endregion
|
|
1520
1531
|
//#region src/components/pure/carousel.tsx
|
|
1521
|
-
var
|
|
1522
|
-
function
|
|
1523
|
-
let e = y.useContext(
|
|
1532
|
+
var xn = y.createContext(null);
|
|
1533
|
+
function Sn() {
|
|
1534
|
+
let e = y.useContext(xn);
|
|
1524
1535
|
if (!e) throw Error("useCarousel must be used within a <Carousel />");
|
|
1525
1536
|
return e;
|
|
1526
1537
|
}
|
|
1527
|
-
function
|
|
1528
|
-
let [c, l] =
|
|
1538
|
+
function Cn({ orientation: e = "horizontal", opts: t, setApi: n, plugins: r, className: i, children: o, ...s }) {
|
|
1539
|
+
let [c, l] = Ve({
|
|
1529
1540
|
...t,
|
|
1530
1541
|
axis: e === "horizontal" ? "x" : "y"
|
|
1531
1542
|
}, r), [u, d] = y.useState(!1), [f, p] = y.useState(!1), m = y.useCallback((e) => {
|
|
@@ -1543,7 +1554,7 @@ function Sn({ orientation: e = "horizontal", opts: t, setApi: n, plugins: r, cla
|
|
|
1543
1554
|
if (l) return m(l), l.on("reInit", m), l.on("select", m), () => {
|
|
1544
1555
|
l?.off("select", m);
|
|
1545
1556
|
};
|
|
1546
|
-
}, [l, m]), /* @__PURE__ */ a(
|
|
1557
|
+
}, [l, m]), /* @__PURE__ */ a(xn.Provider, {
|
|
1547
1558
|
value: {
|
|
1548
1559
|
carouselRef: c,
|
|
1549
1560
|
api: l,
|
|
@@ -1565,8 +1576,8 @@ function Sn({ orientation: e = "horizontal", opts: t, setApi: n, plugins: r, cla
|
|
|
1565
1576
|
})
|
|
1566
1577
|
});
|
|
1567
1578
|
}
|
|
1568
|
-
function
|
|
1569
|
-
let { carouselRef: n, orientation: r } =
|
|
1579
|
+
function wn({ className: e, ...t }) {
|
|
1580
|
+
let { carouselRef: n, orientation: r } = Sn();
|
|
1570
1581
|
return /* @__PURE__ */ a("div", {
|
|
1571
1582
|
ref: n,
|
|
1572
1583
|
className: "overflow-hidden",
|
|
@@ -1577,8 +1588,8 @@ function Cn({ className: e, ...t }) {
|
|
|
1577
1588
|
})
|
|
1578
1589
|
});
|
|
1579
1590
|
}
|
|
1580
|
-
function
|
|
1581
|
-
let { orientation: n } =
|
|
1591
|
+
function Tn({ className: e, ...t }) {
|
|
1592
|
+
let { orientation: n } = Sn();
|
|
1582
1593
|
return /* @__PURE__ */ a("div", {
|
|
1583
1594
|
role: "group",
|
|
1584
1595
|
"aria-roledescription": "slide",
|
|
@@ -1587,8 +1598,8 @@ function wn({ className: e, ...t }) {
|
|
|
1587
1598
|
...t
|
|
1588
1599
|
});
|
|
1589
1600
|
}
|
|
1590
|
-
function
|
|
1591
|
-
let { orientation: i, scrollPrev: s, canScrollPrev: c } =
|
|
1601
|
+
function En({ className: e, variant: t = "outline", size: n = "icon-sm", ...r }) {
|
|
1602
|
+
let { orientation: i, scrollPrev: s, canScrollPrev: c } = Sn();
|
|
1592
1603
|
return /* @__PURE__ */ o(F, {
|
|
1593
1604
|
"data-slot": "carousel-previous",
|
|
1594
1605
|
variant: t,
|
|
@@ -1603,8 +1614,8 @@ function Tn({ className: e, variant: t = "outline", size: n = "icon-sm", ...r })
|
|
|
1603
1614
|
})]
|
|
1604
1615
|
});
|
|
1605
1616
|
}
|
|
1606
|
-
function
|
|
1607
|
-
let { orientation: i, scrollNext: s, canScrollNext: c } =
|
|
1617
|
+
function Dn({ className: e, variant: t = "outline", size: n = "icon-sm", ...r }) {
|
|
1618
|
+
let { orientation: i, scrollNext: s, canScrollNext: c } = Sn();
|
|
1608
1619
|
return /* @__PURE__ */ o(F, {
|
|
1609
1620
|
"data-slot": "carousel-next",
|
|
1610
1621
|
variant: t,
|
|
@@ -1621,14 +1632,14 @@ function En({ className: e, variant: t = "outline", size: n = "icon-sm", ...r })
|
|
|
1621
1632
|
}
|
|
1622
1633
|
//#endregion
|
|
1623
1634
|
//#region src/components/custom/fields/storageFilesField.tsx
|
|
1624
|
-
function
|
|
1635
|
+
function On(e) {
|
|
1625
1636
|
return e?.contentType === "application/pdf" || e?.extension?.toLowerCase() === ".pdf";
|
|
1626
1637
|
}
|
|
1627
|
-
function
|
|
1628
|
-
let m =
|
|
1638
|
+
function kn({ label: e, file: t, onFileChange: n, onRemove: r, onDownload: s, getFileSrc: c, showPreview: l, fileInputRef: u, error: d, isInvalid: f, dir: p = "rtl" }) {
|
|
1639
|
+
let m = je(() => Array.isArray(t) ? t : t ? [t] : [], [t]), h = je(() => m.filter((e) => l(e)), [m, l]), g = b((e) => {
|
|
1629
1640
|
n(e), e.target && (e.target.value = "");
|
|
1630
1641
|
}, [n]), v = b((e) => {
|
|
1631
|
-
let t =
|
|
1642
|
+
let t = On(e), n = c(e);
|
|
1632
1643
|
return t ? /* @__PURE__ */ o("div", {
|
|
1633
1644
|
className: "flex flex-col items-center justify-center w-full h-full bg-muted/30",
|
|
1634
1645
|
children: [/* @__PURE__ */ a(te, { className: "h-12 w-12 text-red-500 mb-2" }), /* @__PURE__ */ a("span", {
|
|
@@ -1651,24 +1662,24 @@ function On({ label: e, file: t, onFileChange: n, onRemove: r, onDownload: s, ge
|
|
|
1651
1662
|
}),
|
|
1652
1663
|
h.length > 0 ? /* @__PURE__ */ o("div", {
|
|
1653
1664
|
className: "space-y-2 max-w-100 mt-3",
|
|
1654
|
-
children: [/* @__PURE__ */ o(
|
|
1665
|
+
children: [/* @__PURE__ */ o(Cn, {
|
|
1655
1666
|
opts: {
|
|
1656
1667
|
direction: p,
|
|
1657
1668
|
align: "start",
|
|
1658
1669
|
dragFree: !0
|
|
1659
1670
|
},
|
|
1660
1671
|
className: "w-full relative group",
|
|
1661
|
-
children: [/* @__PURE__ */ a(
|
|
1672
|
+
children: [/* @__PURE__ */ a(wn, { children: h.map((e, t) => {
|
|
1662
1673
|
let n = e.url || (e.base64File ? e.base64File.substring(0, 40) : `fallback-key-${t}`), i = m.indexOf(e);
|
|
1663
|
-
return /* @__PURE__ */ a(
|
|
1674
|
+
return /* @__PURE__ */ a(Tn, {
|
|
1664
1675
|
className: "basis-full",
|
|
1665
1676
|
children: /* @__PURE__ */ a("div", {
|
|
1666
1677
|
className: "p-1",
|
|
1667
|
-
children: /* @__PURE__ */ a(
|
|
1678
|
+
children: /* @__PURE__ */ a(mn, {
|
|
1668
1679
|
className: "relative group overflow-hidden border-2 aspect-video flex items-center justify-center bg-background shadow-sm",
|
|
1669
|
-
children: /* @__PURE__ */ o(
|
|
1680
|
+
children: /* @__PURE__ */ o(yn, {
|
|
1670
1681
|
className: "p-0 w-full h-full flex items-center justify-center",
|
|
1671
|
-
children: [/* @__PURE__ */ o(I, { children: [/* @__PURE__ */ a(
|
|
1682
|
+
children: [/* @__PURE__ */ o(I, { children: [/* @__PURE__ */ a(dt, {
|
|
1672
1683
|
asChild: !0,
|
|
1673
1684
|
children: /* @__PURE__ */ o("div", {
|
|
1674
1685
|
className: "cursor-zoom-in w-full h-full relative group",
|
|
@@ -1677,7 +1688,7 @@ function On({ label: e, file: t, onFileChange: n, onRemove: r, onDownload: s, ge
|
|
|
1677
1688
|
children: /* @__PURE__ */ a(se, { className: "text-white w-6 h-6" })
|
|
1678
1689
|
})]
|
|
1679
1690
|
})
|
|
1680
|
-
}), /* @__PURE__ */ a(
|
|
1691
|
+
}), /* @__PURE__ */ a(ht, {
|
|
1681
1692
|
className: "sm:max-w-[80vw] sm:w-[80vw] sm:h-[80vh] p-0 bg-background/95 border-none shadow-2xl overflow-hidden flex items-center justify-center",
|
|
1682
1693
|
children: e.contentType === "application/pdf" || e.extension?.toLowerCase() === ".pdf" ? /* @__PURE__ */ a("iframe", {
|
|
1683
1694
|
src: c(e),
|
|
@@ -1718,7 +1729,7 @@ function On({ label: e, file: t, onFileChange: n, onRemove: r, onDownload: s, ge
|
|
|
1718
1729
|
})
|
|
1719
1730
|
})
|
|
1720
1731
|
}, n);
|
|
1721
|
-
}) }), h.length > 1 && /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a(
|
|
1732
|
+
}) }), h.length > 1 && /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a(En, { className: "absolute right-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full z-40 bg-background/80 hover:bg-background" }), /* @__PURE__ */ a(Dn, { className: "absolute left-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full z-40 bg-background/80 hover:bg-background" })] })]
|
|
1722
1733
|
}), /* @__PURE__ */ o(F, {
|
|
1723
1734
|
type: "button",
|
|
1724
1735
|
variant: "outline",
|
|
@@ -1759,7 +1770,7 @@ function On({ label: e, file: t, onFileChange: n, onRemove: r, onDownload: s, ge
|
|
|
1759
1770
|
}
|
|
1760
1771
|
//#endregion
|
|
1761
1772
|
//#region src/components/pure/textarea.tsx
|
|
1762
|
-
function
|
|
1773
|
+
function An({ className: e, ...t }) {
|
|
1763
1774
|
return /* @__PURE__ */ a("textarea", {
|
|
1764
1775
|
"data-slot": "textarea",
|
|
1765
1776
|
className: P("border-input dark:bg-input/30 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 disabled:bg-input/50 dark:disabled:bg-input/80 rounded-lg border bg-transparent px-2.5 py-2 text-base transition-colors focus-visible:ring-3 aria-invalid:ring-3 md:text-sm placeholder:text-muted-foreground flex field-sizing-content min-h-16 w-full outline-none disabled:cursor-not-allowed disabled:opacity-50", e),
|
|
@@ -1768,21 +1779,21 @@ function kn({ className: e, ...t }) {
|
|
|
1768
1779
|
}
|
|
1769
1780
|
//#endregion
|
|
1770
1781
|
//#region src/components/custom/inputs/textAreaInput.tsx
|
|
1771
|
-
function
|
|
1772
|
-
return /* @__PURE__ */ a(
|
|
1782
|
+
function jn({ isInvalid: e, className: t, ...n }) {
|
|
1783
|
+
return /* @__PURE__ */ a(An, {
|
|
1773
1784
|
...n,
|
|
1774
1785
|
className: P(t, e && "border-red-600 focus-visible:ring-red-600")
|
|
1775
1786
|
});
|
|
1776
1787
|
}
|
|
1777
1788
|
//#endregion
|
|
1778
1789
|
//#region src/components/custom/fields/textAreaField.tsx
|
|
1779
|
-
function
|
|
1790
|
+
function Mn({ label: e, error: t, isInvalid: n, required: r, ...i }) {
|
|
1780
1791
|
return /* @__PURE__ */ a(R, {
|
|
1781
1792
|
label: e,
|
|
1782
1793
|
error: t,
|
|
1783
1794
|
isInvalid: n,
|
|
1784
1795
|
required: r,
|
|
1785
|
-
children: /* @__PURE__ */ a(
|
|
1796
|
+
children: /* @__PURE__ */ a(jn, {
|
|
1786
1797
|
...i,
|
|
1787
1798
|
isInvalid: n
|
|
1788
1799
|
})
|
|
@@ -1790,16 +1801,16 @@ function jn({ label: e, error: t, isInvalid: n, required: r, ...i }) {
|
|
|
1790
1801
|
}
|
|
1791
1802
|
//#endregion
|
|
1792
1803
|
//#region src/components/custom/fields/textField.tsx
|
|
1793
|
-
function
|
|
1794
|
-
return /* @__PURE__ */ a(
|
|
1804
|
+
function Nn(e) {
|
|
1805
|
+
return /* @__PURE__ */ a(Xt, {
|
|
1795
1806
|
...e,
|
|
1796
1807
|
type: "text"
|
|
1797
1808
|
});
|
|
1798
1809
|
}
|
|
1799
1810
|
//#endregion
|
|
1800
1811
|
//#region src/components/custom/images/lightbox.tsx
|
|
1801
|
-
function
|
|
1802
|
-
return
|
|
1812
|
+
function Pn({ srcLight: e, srcDark: t, alt: n, onClose: r }) {
|
|
1813
|
+
return Ae(() => {
|
|
1803
1814
|
let e = (e) => e.key === "Escape" && r();
|
|
1804
1815
|
return window.addEventListener("keydown", e), document.body.style.overflow = "hidden", () => {
|
|
1805
1816
|
window.removeEventListener("keydown", e), document.body.style.overflow = "";
|
|
@@ -1829,7 +1840,7 @@ function Nn({ srcLight: e, srcDark: t, alt: n, onClose: r }) {
|
|
|
1829
1840
|
}
|
|
1830
1841
|
//#endregion
|
|
1831
1842
|
//#region src/components/custom/images/zoomableImage.tsx
|
|
1832
|
-
function
|
|
1843
|
+
function Fn({ srcLight: e, srcDark: t, alt: n, className: r, wrapperClassName: i, onOpen: s }) {
|
|
1833
1844
|
return /* @__PURE__ */ o("div", {
|
|
1834
1845
|
className: `group/zoom relative cursor-zoom-in overflow-hidden ${i ?? ""}`,
|
|
1835
1846
|
onClick: () => s(e, t, n),
|
|
@@ -1857,8 +1868,8 @@ function Pn({ srcLight: e, srcDark: t, alt: n, className: r, wrapperClassName: i
|
|
|
1857
1868
|
}
|
|
1858
1869
|
//#endregion
|
|
1859
1870
|
//#region src/components/custom/inputs/searchInput.tsx
|
|
1860
|
-
function
|
|
1861
|
-
let [n, r] = x(""), [i, s] = x(e[0]?.value || ""), c =
|
|
1871
|
+
function In({ columnsNames: e, onSearch: t }) {
|
|
1872
|
+
let [n, r] = x(""), [i, s] = x(e[0]?.value || ""), c = He((e, n) => {
|
|
1862
1873
|
e.trim() ? t({
|
|
1863
1874
|
value: e,
|
|
1864
1875
|
columnName: n
|
|
@@ -1868,16 +1879,16 @@ function Fn({ columnsNames: e, onSearch: t }) {
|
|
|
1868
1879
|
className: "p-3 rounded-t-xl border-x border-t flex flex-col sm:flex-row gap-4",
|
|
1869
1880
|
children: /* @__PURE__ */ o("div", {
|
|
1870
1881
|
className: "relative w-full flex gap-2",
|
|
1871
|
-
children: [e.length > 1 && /* @__PURE__ */ o(
|
|
1882
|
+
children: [e.length > 1 && /* @__PURE__ */ o(tn, {
|
|
1872
1883
|
dir: "rtl",
|
|
1873
1884
|
value: i,
|
|
1874
1885
|
onValueChange: (e) => {
|
|
1875
1886
|
s(e), n.trim() && c(n, e);
|
|
1876
1887
|
},
|
|
1877
|
-
children: [/* @__PURE__ */ a(
|
|
1888
|
+
children: [/* @__PURE__ */ a(an, {
|
|
1878
1889
|
className: "bg-secondary border-none",
|
|
1879
|
-
children: /* @__PURE__ */ a(
|
|
1880
|
-
}), /* @__PURE__ */ a(
|
|
1890
|
+
children: /* @__PURE__ */ a(rn, { placeholder: "اختر العمود" })
|
|
1891
|
+
}), /* @__PURE__ */ a(on, { children: e.map((e) => /* @__PURE__ */ a(cn, {
|
|
1881
1892
|
value: e.value,
|
|
1882
1893
|
children: e.label
|
|
1883
1894
|
}, e.value)) })]
|
|
@@ -1898,7 +1909,7 @@ function Fn({ columnsNames: e, onSearch: t }) {
|
|
|
1898
1909
|
}
|
|
1899
1910
|
//#endregion
|
|
1900
1911
|
//#region src/components/pure/table.tsx
|
|
1901
|
-
function
|
|
1912
|
+
function Ln({ className: e, ...t }) {
|
|
1902
1913
|
return /* @__PURE__ */ a("div", {
|
|
1903
1914
|
"data-slot": "table-container",
|
|
1904
1915
|
className: "relative w-full overflow-x-auto",
|
|
@@ -1909,49 +1920,49 @@ function In({ className: e, ...t }) {
|
|
|
1909
1920
|
})
|
|
1910
1921
|
});
|
|
1911
1922
|
}
|
|
1912
|
-
function
|
|
1923
|
+
function Rn({ className: e, ...t }) {
|
|
1913
1924
|
return /* @__PURE__ */ a("thead", {
|
|
1914
1925
|
"data-slot": "table-header",
|
|
1915
1926
|
className: P("[&_tr]:border-b", e),
|
|
1916
1927
|
...t
|
|
1917
1928
|
});
|
|
1918
1929
|
}
|
|
1919
|
-
function
|
|
1930
|
+
function zn({ className: e, ...t }) {
|
|
1920
1931
|
return /* @__PURE__ */ a("tbody", {
|
|
1921
1932
|
"data-slot": "table-body",
|
|
1922
1933
|
className: P("[&_tr:last-child]:border-0", e),
|
|
1923
1934
|
...t
|
|
1924
1935
|
});
|
|
1925
1936
|
}
|
|
1926
|
-
function
|
|
1937
|
+
function Bn({ className: e, ...t }) {
|
|
1927
1938
|
return /* @__PURE__ */ a("tfoot", {
|
|
1928
1939
|
"data-slot": "table-footer",
|
|
1929
1940
|
className: P("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0", e),
|
|
1930
1941
|
...t
|
|
1931
1942
|
});
|
|
1932
1943
|
}
|
|
1933
|
-
function
|
|
1944
|
+
function Vn({ className: e, ...t }) {
|
|
1934
1945
|
return /* @__PURE__ */ a("tr", {
|
|
1935
1946
|
"data-slot": "table-row",
|
|
1936
1947
|
className: P("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors", e),
|
|
1937
1948
|
...t
|
|
1938
1949
|
});
|
|
1939
1950
|
}
|
|
1940
|
-
function
|
|
1951
|
+
function Hn({ className: e, ...t }) {
|
|
1941
1952
|
return /* @__PURE__ */ a("th", {
|
|
1942
1953
|
"data-slot": "table-head",
|
|
1943
1954
|
className: P("text-foreground h-10 px-2 text-start align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pe-0", e),
|
|
1944
1955
|
...t
|
|
1945
1956
|
});
|
|
1946
1957
|
}
|
|
1947
|
-
function
|
|
1958
|
+
function Un({ className: e, ...t }) {
|
|
1948
1959
|
return /* @__PURE__ */ a("td", {
|
|
1949
1960
|
"data-slot": "table-cell",
|
|
1950
1961
|
className: P("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pe-0", e),
|
|
1951
1962
|
...t
|
|
1952
1963
|
});
|
|
1953
1964
|
}
|
|
1954
|
-
function
|
|
1965
|
+
function Wn({ className: e, ...t }) {
|
|
1955
1966
|
return /* @__PURE__ */ a("caption", {
|
|
1956
1967
|
"data-slot": "table-caption",
|
|
1957
1968
|
className: P("text-muted-foreground mt-4 text-sm", e),
|
|
@@ -1960,53 +1971,53 @@ function Un({ className: e, ...t }) {
|
|
|
1960
1971
|
}
|
|
1961
1972
|
//#endregion
|
|
1962
1973
|
//#region src/components/custom/status/empty.tsx
|
|
1963
|
-
function
|
|
1974
|
+
function Gn({ className: e, ...t }) {
|
|
1964
1975
|
return /* @__PURE__ */ a("div", {
|
|
1965
1976
|
"data-slot": "empty",
|
|
1966
1977
|
className: P("gap-4 rounded-xl border-dashed p-6 flex w-full min-w-0 flex-1 flex-col items-center justify-center text-center text-balance", e),
|
|
1967
1978
|
...t
|
|
1968
1979
|
});
|
|
1969
1980
|
}
|
|
1970
|
-
function
|
|
1981
|
+
function Kn({ className: e, ...t }) {
|
|
1971
1982
|
return /* @__PURE__ */ a("div", {
|
|
1972
1983
|
"data-slot": "empty-header",
|
|
1973
1984
|
className: P("gap-2 flex max-w-sm flex-col items-center", e),
|
|
1974
1985
|
...t
|
|
1975
1986
|
});
|
|
1976
1987
|
}
|
|
1977
|
-
var
|
|
1988
|
+
var qn = S("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0", {
|
|
1978
1989
|
variants: { variant: {
|
|
1979
1990
|
default: "bg-transparent",
|
|
1980
1991
|
icon: "bg-muted text-foreground flex size-8 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-4"
|
|
1981
1992
|
} },
|
|
1982
1993
|
defaultVariants: { variant: "default" }
|
|
1983
1994
|
});
|
|
1984
|
-
function
|
|
1995
|
+
function Jn({ className: e, variant: t = "default", ...n }) {
|
|
1985
1996
|
return /* @__PURE__ */ a("div", {
|
|
1986
1997
|
"data-slot": "empty-icon",
|
|
1987
1998
|
"data-variant": t,
|
|
1988
|
-
className: P(
|
|
1999
|
+
className: P(qn({
|
|
1989
2000
|
variant: t,
|
|
1990
2001
|
className: e
|
|
1991
2002
|
})),
|
|
1992
2003
|
...n
|
|
1993
2004
|
});
|
|
1994
2005
|
}
|
|
1995
|
-
function
|
|
2006
|
+
function Yn({ className: e, ...t }) {
|
|
1996
2007
|
return /* @__PURE__ */ a("div", {
|
|
1997
2008
|
"data-slot": "empty-title",
|
|
1998
2009
|
className: P("text-sm font-medium tracking-tight", e),
|
|
1999
2010
|
...t
|
|
2000
2011
|
});
|
|
2001
2012
|
}
|
|
2002
|
-
function
|
|
2013
|
+
function Xn({ className: e, ...t }) {
|
|
2003
2014
|
return /* @__PURE__ */ a("div", {
|
|
2004
2015
|
"data-slot": "empty-description",
|
|
2005
2016
|
className: P("text-sm/relaxed text-muted-foreground [&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4", e),
|
|
2006
2017
|
...t
|
|
2007
2018
|
});
|
|
2008
2019
|
}
|
|
2009
|
-
function
|
|
2020
|
+
function Zn({ className: e, ...t }) {
|
|
2010
2021
|
return /* @__PURE__ */ a("div", {
|
|
2011
2022
|
"data-slot": "empty-content",
|
|
2012
2023
|
className: P("gap-2.5 text-sm flex w-full max-w-sm min-w-0 flex-col items-center text-balance", e),
|
|
@@ -2015,91 +2026,91 @@ function Xn({ className: e, ...t }) {
|
|
|
2015
2026
|
}
|
|
2016
2027
|
//#endregion
|
|
2017
2028
|
//#region src/components/custom/table/crudEmptyTablePreview.tsx
|
|
2018
|
-
function
|
|
2019
|
-
return a(e === "loading" ?
|
|
2029
|
+
function Qn({ mode: e }) {
|
|
2030
|
+
return a(e === "loading" ? $n : e === "error" ? tr : er, {});
|
|
2020
2031
|
}
|
|
2021
|
-
function
|
|
2022
|
-
return /* @__PURE__ */ o(
|
|
2023
|
-
/* @__PURE__ */ a(
|
|
2032
|
+
function $n() {
|
|
2033
|
+
return /* @__PURE__ */ o(Gn, { children: [/* @__PURE__ */ o(Kn, { children: [
|
|
2034
|
+
/* @__PURE__ */ a(Jn, {
|
|
2024
2035
|
variant: "icon",
|
|
2025
2036
|
children: /* @__PURE__ */ a(be, {})
|
|
2026
2037
|
}),
|
|
2027
|
-
/* @__PURE__ */ a(
|
|
2028
|
-
/* @__PURE__ */ a(
|
|
2029
|
-
] }), /* @__PURE__ */ a(
|
|
2038
|
+
/* @__PURE__ */ a(Yn, { children: "الرجاء الانتظار" }),
|
|
2039
|
+
/* @__PURE__ */ a(Xn, { children: "يتم تحميل البيانات المطلوبة" })
|
|
2040
|
+
] }), /* @__PURE__ */ a(Zn, { children: /* @__PURE__ */ a(ae, { className: "animate-spin duration-700" }) })] });
|
|
2030
2041
|
}
|
|
2031
|
-
function
|
|
2032
|
-
return /* @__PURE__ */ a(
|
|
2033
|
-
/* @__PURE__ */ a(
|
|
2042
|
+
function er() {
|
|
2043
|
+
return /* @__PURE__ */ a(Gn, { children: /* @__PURE__ */ o(Kn, { children: [
|
|
2044
|
+
/* @__PURE__ */ a(Jn, {
|
|
2034
2045
|
variant: "icon",
|
|
2035
2046
|
children: /* @__PURE__ */ a(be, {})
|
|
2036
2047
|
}),
|
|
2037
|
-
/* @__PURE__ */ a(
|
|
2038
|
-
/* @__PURE__ */ a(
|
|
2048
|
+
/* @__PURE__ */ a(Yn, { children: "لا توجد بيانات لعرضها" }),
|
|
2049
|
+
/* @__PURE__ */ a(Xn, { children: "هذا الجدول فارغ ولا يحتوي على بيانات للعرض" })
|
|
2039
2050
|
] }) });
|
|
2040
2051
|
}
|
|
2041
|
-
function
|
|
2042
|
-
return /* @__PURE__ */ o(
|
|
2043
|
-
/* @__PURE__ */ a(
|
|
2052
|
+
function tr() {
|
|
2053
|
+
return /* @__PURE__ */ o(Gn, { children: [/* @__PURE__ */ o(Kn, { children: [
|
|
2054
|
+
/* @__PURE__ */ a(Jn, {
|
|
2044
2055
|
variant: "icon",
|
|
2045
2056
|
children: /* @__PURE__ */ a(be, {})
|
|
2046
2057
|
}),
|
|
2047
|
-
/* @__PURE__ */ a(
|
|
2048
|
-
/* @__PURE__ */ a(
|
|
2049
|
-
] }), /* @__PURE__ */ a(
|
|
2058
|
+
/* @__PURE__ */ a(Yn, { children: "حدث خطأ ما" }),
|
|
2059
|
+
/* @__PURE__ */ a(Xn, { children: "حدث خطأ اثناء جلب البيانات الرجاء التحقق من اتصالك الانترنت او اتصل بخدمة العملاء لدينا في حال تكراره" })
|
|
2060
|
+
] }), /* @__PURE__ */ a(Zn, { children: /* @__PURE__ */ a(ge, {}) })] });
|
|
2050
2061
|
}
|
|
2051
2062
|
//#endregion
|
|
2052
2063
|
//#region src/components/custom/table/crudTable.tsx
|
|
2053
|
-
function
|
|
2054
|
-
return e.isLoading ? /* @__PURE__ */ a(
|
|
2064
|
+
function nr({ state: e, children: t }) {
|
|
2065
|
+
return e.isLoading ? /* @__PURE__ */ a(Qn, { mode: "loading" }) : e.entities?.count == 0 ? /* @__PURE__ */ a(Qn, { mode: "empty" }) : e.entities == null ? /* @__PURE__ */ a(Qn, { mode: "loading" }) : /* @__PURE__ */ a(Ln, { children: t });
|
|
2055
2066
|
}
|
|
2056
2067
|
//#endregion
|
|
2057
2068
|
//#region src/components/pure/context-menu.tsx
|
|
2058
|
-
function
|
|
2069
|
+
function rr({ ...e }) {
|
|
2059
2070
|
return /* @__PURE__ */ a(E.Root, {
|
|
2060
2071
|
"data-slot": "context-menu",
|
|
2061
2072
|
...e
|
|
2062
2073
|
});
|
|
2063
2074
|
}
|
|
2064
|
-
function
|
|
2075
|
+
function ir({ className: e, ...t }) {
|
|
2065
2076
|
return /* @__PURE__ */ a(E.Trigger, {
|
|
2066
2077
|
"data-slot": "context-menu-trigger",
|
|
2067
2078
|
className: P("select-none", e),
|
|
2068
2079
|
...t
|
|
2069
2080
|
});
|
|
2070
2081
|
}
|
|
2071
|
-
function
|
|
2082
|
+
function ar({ ...e }) {
|
|
2072
2083
|
return /* @__PURE__ */ a(E.Group, {
|
|
2073
2084
|
"data-slot": "context-menu-group",
|
|
2074
2085
|
...e
|
|
2075
2086
|
});
|
|
2076
2087
|
}
|
|
2077
|
-
function
|
|
2088
|
+
function or({ ...e }) {
|
|
2078
2089
|
return /* @__PURE__ */ a(E.Portal, {
|
|
2079
2090
|
"data-slot": "context-menu-portal",
|
|
2080
2091
|
...e
|
|
2081
2092
|
});
|
|
2082
2093
|
}
|
|
2083
|
-
function
|
|
2094
|
+
function sr({ ...e }) {
|
|
2084
2095
|
return /* @__PURE__ */ a(E.Sub, {
|
|
2085
2096
|
"data-slot": "context-menu-sub",
|
|
2086
2097
|
...e
|
|
2087
2098
|
});
|
|
2088
2099
|
}
|
|
2089
|
-
function
|
|
2100
|
+
function cr({ ...e }) {
|
|
2090
2101
|
return /* @__PURE__ */ a(E.RadioGroup, {
|
|
2091
2102
|
"data-slot": "context-menu-radio-group",
|
|
2092
2103
|
...e
|
|
2093
2104
|
});
|
|
2094
2105
|
}
|
|
2095
|
-
function
|
|
2106
|
+
function lr({ className: e, ...t }) {
|
|
2096
2107
|
return /* @__PURE__ */ a(E.Portal, { children: /* @__PURE__ */ a(E.Content, {
|
|
2097
2108
|
"data-slot": "context-menu-content",
|
|
2098
2109
|
className: P("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 bg-popover text-popover-foreground min-w-36 rounded-lg p-1 shadow-md ring-1 duration-100 z-50 max-h-(--radix-context-menu-content-available-height) origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto", e),
|
|
2099
2110
|
...t
|
|
2100
2111
|
}) });
|
|
2101
2112
|
}
|
|
2102
|
-
function
|
|
2113
|
+
function ur({ className: e, inset: t, variant: n = "default", ...r }) {
|
|
2103
2114
|
return /* @__PURE__ */ a(E.Item, {
|
|
2104
2115
|
"data-slot": "context-menu-item",
|
|
2105
2116
|
"data-inset": t,
|
|
@@ -2108,7 +2119,7 @@ function lr({ className: e, inset: t, variant: n = "default", ...r }) {
|
|
|
2108
2119
|
...r
|
|
2109
2120
|
});
|
|
2110
2121
|
}
|
|
2111
|
-
function
|
|
2122
|
+
function dr({ className: e, inset: t, children: n, ...r }) {
|
|
2112
2123
|
return /* @__PURE__ */ o(E.SubTrigger, {
|
|
2113
2124
|
"data-slot": "context-menu-sub-trigger",
|
|
2114
2125
|
"data-inset": t,
|
|
@@ -2117,14 +2128,14 @@ function ur({ className: e, inset: t, children: n, ...r }) {
|
|
|
2117
2128
|
children: [n, /* @__PURE__ */ a(p, { className: "rtl:rotate-180 ms-auto" })]
|
|
2118
2129
|
});
|
|
2119
2130
|
}
|
|
2120
|
-
function
|
|
2131
|
+
function fr({ className: e, ...t }) {
|
|
2121
2132
|
return /* @__PURE__ */ a(E.SubContent, {
|
|
2122
2133
|
"data-slot": "context-menu-sub-content",
|
|
2123
2134
|
className: P("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 bg-popover text-popover-foreground min-w-32 rounded-lg border p-1 shadow-lg duration-100 z-50 origin-(--radix-context-menu-content-transform-origin) overflow-hidden", e),
|
|
2124
2135
|
...t
|
|
2125
2136
|
});
|
|
2126
2137
|
}
|
|
2127
|
-
function
|
|
2138
|
+
function pr({ className: e, children: t, checked: n, inset: r, ...i }) {
|
|
2128
2139
|
return /* @__PURE__ */ o(E.CheckboxItem, {
|
|
2129
2140
|
"data-slot": "context-menu-checkbox-item",
|
|
2130
2141
|
"data-inset": r,
|
|
@@ -2137,7 +2148,7 @@ function fr({ className: e, children: t, checked: n, inset: r, ...i }) {
|
|
|
2137
2148
|
}), t]
|
|
2138
2149
|
});
|
|
2139
2150
|
}
|
|
2140
|
-
function
|
|
2151
|
+
function mr({ className: e, children: t, inset: n, ...r }) {
|
|
2141
2152
|
return /* @__PURE__ */ o(E.RadioItem, {
|
|
2142
2153
|
"data-slot": "context-menu-radio-item",
|
|
2143
2154
|
"data-inset": n,
|
|
@@ -2149,7 +2160,7 @@ function pr({ className: e, children: t, inset: n, ...r }) {
|
|
|
2149
2160
|
}), t]
|
|
2150
2161
|
});
|
|
2151
2162
|
}
|
|
2152
|
-
function
|
|
2163
|
+
function hr({ className: e, inset: t, ...n }) {
|
|
2153
2164
|
return /* @__PURE__ */ a(E.Label, {
|
|
2154
2165
|
"data-slot": "context-menu-label",
|
|
2155
2166
|
"data-inset": t,
|
|
@@ -2157,14 +2168,14 @@ function mr({ className: e, inset: t, ...n }) {
|
|
|
2157
2168
|
...n
|
|
2158
2169
|
});
|
|
2159
2170
|
}
|
|
2160
|
-
function
|
|
2171
|
+
function gr({ className: e, ...t }) {
|
|
2161
2172
|
return /* @__PURE__ */ a(E.Separator, {
|
|
2162
2173
|
"data-slot": "context-menu-separator",
|
|
2163
2174
|
className: P("bg-border -mx-1 my-1 h-px", e),
|
|
2164
2175
|
...t
|
|
2165
2176
|
});
|
|
2166
2177
|
}
|
|
2167
|
-
function
|
|
2178
|
+
function _r({ className: e, ...t }) {
|
|
2168
2179
|
return /* @__PURE__ */ a("span", {
|
|
2169
2180
|
"data-slot": "context-menu-shortcut",
|
|
2170
2181
|
className: P("text-muted-foreground group-focus/context-menu-item:text-accent-foreground ms-auto text-xs tracking-widest", e),
|
|
@@ -2173,14 +2184,14 @@ function gr({ className: e, ...t }) {
|
|
|
2173
2184
|
}
|
|
2174
2185
|
//#endregion
|
|
2175
2186
|
//#region src/components/custom/table/crudTableBodyRow.tsx
|
|
2176
|
-
function
|
|
2177
|
-
return /* @__PURE__ */ a(i, { children: /* @__PURE__ */ o(
|
|
2187
|
+
function vr({ tableRows: e, dropdownMenu: t, contextMenuContent: n }) {
|
|
2188
|
+
return /* @__PURE__ */ a(i, { children: /* @__PURE__ */ o(rr, {
|
|
2178
2189
|
dir: "rtl",
|
|
2179
|
-
children: [/* @__PURE__ */ a(
|
|
2190
|
+
children: [/* @__PURE__ */ a(ir, {
|
|
2180
2191
|
asChild: !0,
|
|
2181
|
-
children: /* @__PURE__ */ o(
|
|
2192
|
+
children: /* @__PURE__ */ o(Vn, {
|
|
2182
2193
|
className: "hover:bg-secondary/50 transition-colors",
|
|
2183
|
-
children: [/* @__PURE__ */ a(
|
|
2194
|
+
children: [/* @__PURE__ */ a(Un, { children: t }), e.map((e, t) => /* @__PURE__ */ a(Un, { children: /* @__PURE__ */ a("span", {
|
|
2184
2195
|
className: e.rowStyles,
|
|
2185
2196
|
children: e.rowName
|
|
2186
2197
|
}) }, t))]
|
|
@@ -2190,18 +2201,18 @@ function _r({ tableRows: e, dropdownMenu: t, contextMenuContent: n }) {
|
|
|
2190
2201
|
}
|
|
2191
2202
|
//#endregion
|
|
2192
2203
|
//#region src/components/custom/table/crudTableCard.tsx
|
|
2193
|
-
function
|
|
2204
|
+
function yr({ cards: e }) {
|
|
2194
2205
|
return /* @__PURE__ */ a("div", {
|
|
2195
2206
|
className: "mb-5 grid grid-cols-1 sm:grid-cols-2 gap-5",
|
|
2196
|
-
children: e.map((e, t) => /* @__PURE__ */ o(
|
|
2207
|
+
children: e.map((e, t) => /* @__PURE__ */ o(mn, {
|
|
2197
2208
|
className: "shadow-sm",
|
|
2198
|
-
children: [/* @__PURE__ */ o(
|
|
2209
|
+
children: [/* @__PURE__ */ o(hn, {
|
|
2199
2210
|
className: "flex flex-row items-center justify-between space-y-0 pb-2",
|
|
2200
|
-
children: [/* @__PURE__ */ a(
|
|
2211
|
+
children: [/* @__PURE__ */ a(gn, {
|
|
2201
2212
|
className: "text-sm font-medium text-muted-foreground",
|
|
2202
2213
|
children: e.title
|
|
2203
2214
|
}), e.icon]
|
|
2204
|
-
}), /* @__PURE__ */ a(
|
|
2215
|
+
}), /* @__PURE__ */ a(yn, { children: /* @__PURE__ */ a("div", {
|
|
2205
2216
|
className: "text-2xl font-bold",
|
|
2206
2217
|
children: e.data
|
|
2207
2218
|
}) })]
|
|
@@ -2210,7 +2221,7 @@ function vr({ cards: e }) {
|
|
|
2210
2221
|
}
|
|
2211
2222
|
//#endregion
|
|
2212
2223
|
//#region src/components/custom/table/crudTableHeader.tsx
|
|
2213
|
-
function
|
|
2224
|
+
function br({ title: e, buttonTitle: t, createComp: n, isButtonVisible: r = !0 }) {
|
|
2214
2225
|
let [s, c] = x(!1), l = Ee.isValidElement(n) ? Ee.cloneElement(n, { onSuccess: (e) => {
|
|
2215
2226
|
c(!1), n.props.onSuccess?.(e);
|
|
2216
2227
|
} }) : n;
|
|
@@ -2229,10 +2240,10 @@ function yr({ title: e, buttonTitle: t, createComp: n, isButtonVisible: r = !0 }
|
|
|
2229
2240
|
}
|
|
2230
2241
|
//#endregion
|
|
2231
2242
|
//#region src/components/custom/table/crudTableHeaderRows.tsx
|
|
2232
|
-
function
|
|
2233
|
-
return /* @__PURE__ */ a(
|
|
2243
|
+
function xr({ tableHeadRows: e }) {
|
|
2244
|
+
return /* @__PURE__ */ a(Rn, {
|
|
2234
2245
|
className: "bg-muted",
|
|
2235
|
-
children: /* @__PURE__ */ a(
|
|
2246
|
+
children: /* @__PURE__ */ a(Vn, { children: e.map((e, t) => /* @__PURE__ */ a(Hn, {
|
|
2236
2247
|
className: e.rowStyles,
|
|
2237
2248
|
children: e.rowName
|
|
2238
2249
|
}, t)) })
|
|
@@ -2240,7 +2251,7 @@ function br({ tableHeadRows: e }) {
|
|
|
2240
2251
|
}
|
|
2241
2252
|
//#endregion
|
|
2242
2253
|
//#region src/components/pure/pagination.tsx
|
|
2243
|
-
function
|
|
2254
|
+
function Sr({ className: e, ...t }) {
|
|
2244
2255
|
return /* @__PURE__ */ a("nav", {
|
|
2245
2256
|
role: "navigation",
|
|
2246
2257
|
"aria-label": "pagination",
|
|
@@ -2249,20 +2260,20 @@ function xr({ className: e, ...t }) {
|
|
|
2249
2260
|
...t
|
|
2250
2261
|
});
|
|
2251
2262
|
}
|
|
2252
|
-
function
|
|
2263
|
+
function Cr({ className: e, ...t }) {
|
|
2253
2264
|
return /* @__PURE__ */ a("ul", {
|
|
2254
2265
|
"data-slot": "pagination-content",
|
|
2255
2266
|
className: P("gap-0.5 flex items-center", e),
|
|
2256
2267
|
...t
|
|
2257
2268
|
});
|
|
2258
2269
|
}
|
|
2259
|
-
function
|
|
2270
|
+
function wr({ ...e }) {
|
|
2260
2271
|
return /* @__PURE__ */ a("li", {
|
|
2261
2272
|
"data-slot": "pagination-item",
|
|
2262
2273
|
...e
|
|
2263
2274
|
});
|
|
2264
2275
|
}
|
|
2265
|
-
function
|
|
2276
|
+
function Tr({ className: e, isActive: t, size: n = "icon", ...r }) {
|
|
2266
2277
|
return /* @__PURE__ */ a(F, {
|
|
2267
2278
|
asChild: !0,
|
|
2268
2279
|
variant: t ? "outline" : "ghost",
|
|
@@ -2276,8 +2287,8 @@ function wr({ className: e, isActive: t, size: n = "icon", ...r }) {
|
|
|
2276
2287
|
})
|
|
2277
2288
|
});
|
|
2278
2289
|
}
|
|
2279
|
-
function
|
|
2280
|
-
return /* @__PURE__ */ o(
|
|
2290
|
+
function Er({ className: e, text: t = "Previous", ...n }) {
|
|
2291
|
+
return /* @__PURE__ */ o(Tr, {
|
|
2281
2292
|
"aria-label": "Go to previous page",
|
|
2282
2293
|
size: "default",
|
|
2283
2294
|
className: P("ps-1.5!", e),
|
|
@@ -2291,8 +2302,8 @@ function Tr({ className: e, text: t = "Previous", ...n }) {
|
|
|
2291
2302
|
})]
|
|
2292
2303
|
});
|
|
2293
2304
|
}
|
|
2294
|
-
function
|
|
2295
|
-
return /* @__PURE__ */ o(
|
|
2305
|
+
function Dr({ className: e, text: t = "Next", ...n }) {
|
|
2306
|
+
return /* @__PURE__ */ o(Tr, {
|
|
2296
2307
|
"aria-label": "Go to next page",
|
|
2297
2308
|
size: "default",
|
|
2298
2309
|
className: P("pe-1.5!", e),
|
|
@@ -2306,7 +2317,7 @@ function Er({ className: e, text: t = "Next", ...n }) {
|
|
|
2306
2317
|
})]
|
|
2307
2318
|
});
|
|
2308
2319
|
}
|
|
2309
|
-
function
|
|
2320
|
+
function Or({ className: e, ...t }) {
|
|
2310
2321
|
return /* @__PURE__ */ o("span", {
|
|
2311
2322
|
"aria-hidden": !0,
|
|
2312
2323
|
"data-slot": "pagination-ellipsis",
|
|
@@ -2320,25 +2331,25 @@ function Dr({ className: e, ...t }) {
|
|
|
2320
2331
|
}
|
|
2321
2332
|
//#endregion
|
|
2322
2333
|
//#region src/components/pure/dropdown-menu.tsx
|
|
2323
|
-
function
|
|
2334
|
+
function kr({ ...e }) {
|
|
2324
2335
|
return /* @__PURE__ */ a(D.Root, {
|
|
2325
2336
|
"data-slot": "dropdown-menu",
|
|
2326
2337
|
...e
|
|
2327
2338
|
});
|
|
2328
2339
|
}
|
|
2329
|
-
function
|
|
2340
|
+
function Ar({ ...e }) {
|
|
2330
2341
|
return /* @__PURE__ */ a(D.Portal, {
|
|
2331
2342
|
"data-slot": "dropdown-menu-portal",
|
|
2332
2343
|
...e
|
|
2333
2344
|
});
|
|
2334
2345
|
}
|
|
2335
|
-
function
|
|
2346
|
+
function jr({ ...e }) {
|
|
2336
2347
|
return /* @__PURE__ */ a(D.Trigger, {
|
|
2337
2348
|
"data-slot": "dropdown-menu-trigger",
|
|
2338
2349
|
...e
|
|
2339
2350
|
});
|
|
2340
2351
|
}
|
|
2341
|
-
function
|
|
2352
|
+
function Mr({ className: e, align: t = "start", sideOffset: n = 4, ...r }) {
|
|
2342
2353
|
return /* @__PURE__ */ a(D.Portal, { children: /* @__PURE__ */ a(D.Content, {
|
|
2343
2354
|
"data-slot": "dropdown-menu-content",
|
|
2344
2355
|
sideOffset: n,
|
|
@@ -2347,7 +2358,7 @@ function jr({ className: e, align: t = "start", sideOffset: n = 4, ...r }) {
|
|
|
2347
2358
|
...r
|
|
2348
2359
|
}) });
|
|
2349
2360
|
}
|
|
2350
|
-
function
|
|
2361
|
+
function Nr({ ...e }) {
|
|
2351
2362
|
return /* @__PURE__ */ a(D.Group, {
|
|
2352
2363
|
"data-slot": "dropdown-menu-group",
|
|
2353
2364
|
...e
|
|
@@ -2362,7 +2373,7 @@ function B({ className: e, inset: t, variant: n = "default", ...r }) {
|
|
|
2362
2373
|
...r
|
|
2363
2374
|
});
|
|
2364
2375
|
}
|
|
2365
|
-
function
|
|
2376
|
+
function Pr({ className: e, children: t, checked: n, inset: r, ...i }) {
|
|
2366
2377
|
return /* @__PURE__ */ o(D.CheckboxItem, {
|
|
2367
2378
|
"data-slot": "dropdown-menu-checkbox-item",
|
|
2368
2379
|
"data-inset": r,
|
|
@@ -2376,13 +2387,13 @@ function Nr({ className: e, children: t, checked: n, inset: r, ...i }) {
|
|
|
2376
2387
|
}), t]
|
|
2377
2388
|
});
|
|
2378
2389
|
}
|
|
2379
|
-
function
|
|
2390
|
+
function Fr({ ...e }) {
|
|
2380
2391
|
return /* @__PURE__ */ a(D.RadioGroup, {
|
|
2381
2392
|
"data-slot": "dropdown-menu-radio-group",
|
|
2382
2393
|
...e
|
|
2383
2394
|
});
|
|
2384
2395
|
}
|
|
2385
|
-
function
|
|
2396
|
+
function Ir({ className: e, children: t, inset: n, ...r }) {
|
|
2386
2397
|
return /* @__PURE__ */ o(D.RadioItem, {
|
|
2387
2398
|
"data-slot": "dropdown-menu-radio-item",
|
|
2388
2399
|
"data-inset": n,
|
|
@@ -2395,7 +2406,7 @@ function Fr({ className: e, children: t, inset: n, ...r }) {
|
|
|
2395
2406
|
}), t]
|
|
2396
2407
|
});
|
|
2397
2408
|
}
|
|
2398
|
-
function
|
|
2409
|
+
function Lr({ className: e, inset: t, ...n }) {
|
|
2399
2410
|
return /* @__PURE__ */ a(D.Label, {
|
|
2400
2411
|
"data-slot": "dropdown-menu-label",
|
|
2401
2412
|
"data-inset": t,
|
|
@@ -2403,27 +2414,27 @@ function Ir({ className: e, inset: t, ...n }) {
|
|
|
2403
2414
|
...n
|
|
2404
2415
|
});
|
|
2405
2416
|
}
|
|
2406
|
-
function
|
|
2417
|
+
function Rr({ className: e, ...t }) {
|
|
2407
2418
|
return /* @__PURE__ */ a(D.Separator, {
|
|
2408
2419
|
"data-slot": "dropdown-menu-separator",
|
|
2409
2420
|
className: P("bg-border -mx-1 my-1 h-px", e),
|
|
2410
2421
|
...t
|
|
2411
2422
|
});
|
|
2412
2423
|
}
|
|
2413
|
-
function
|
|
2424
|
+
function zr({ className: e, ...t }) {
|
|
2414
2425
|
return /* @__PURE__ */ a("span", {
|
|
2415
2426
|
"data-slot": "dropdown-menu-shortcut",
|
|
2416
2427
|
className: P("text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground ms-auto text-xs tracking-widest", e),
|
|
2417
2428
|
...t
|
|
2418
2429
|
});
|
|
2419
2430
|
}
|
|
2420
|
-
function
|
|
2431
|
+
function Br({ ...e }) {
|
|
2421
2432
|
return /* @__PURE__ */ a(D.Sub, {
|
|
2422
2433
|
"data-slot": "dropdown-menu-sub",
|
|
2423
2434
|
...e
|
|
2424
2435
|
});
|
|
2425
2436
|
}
|
|
2426
|
-
function
|
|
2437
|
+
function Vr({ className: e, inset: t, children: n, ...r }) {
|
|
2427
2438
|
return /* @__PURE__ */ o(D.SubTrigger, {
|
|
2428
2439
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
2429
2440
|
"data-inset": t,
|
|
@@ -2432,7 +2443,7 @@ function Br({ className: e, inset: t, children: n, ...r }) {
|
|
|
2432
2443
|
children: [n, /* @__PURE__ */ a(p, { className: "rtl:rotate-180 ms-auto" })]
|
|
2433
2444
|
});
|
|
2434
2445
|
}
|
|
2435
|
-
function
|
|
2446
|
+
function Hr({ className: e, ...t }) {
|
|
2436
2447
|
return /* @__PURE__ */ a(D.SubContent, {
|
|
2437
2448
|
"data-slot": "dropdown-menu-sub-content",
|
|
2438
2449
|
className: P("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 bg-popover text-popover-foreground min-w-[96px] rounded-md p-1 shadow-lg ring-1 duration-100 z-50 origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden", e),
|
|
@@ -2441,51 +2452,51 @@ function Vr({ className: e, ...t }) {
|
|
|
2441
2452
|
}
|
|
2442
2453
|
//#endregion
|
|
2443
2454
|
//#region src/hooks/use-mobile.ts
|
|
2444
|
-
var
|
|
2445
|
-
function
|
|
2455
|
+
var Ur = 768;
|
|
2456
|
+
function Wr() {
|
|
2446
2457
|
let [e, t] = y.useState(void 0);
|
|
2447
2458
|
return y.useEffect(() => {
|
|
2448
|
-
let e = window.matchMedia(`(max-width: ${
|
|
2449
|
-
t(window.innerWidth <
|
|
2459
|
+
let e = window.matchMedia(`(max-width: ${Ur - 1}px)`), n = () => {
|
|
2460
|
+
t(window.innerWidth < Ur);
|
|
2450
2461
|
};
|
|
2451
|
-
return e.addEventListener("change", n), t(window.innerWidth <
|
|
2462
|
+
return e.addEventListener("change", n), t(window.innerWidth < Ur), () => e.removeEventListener("change", n);
|
|
2452
2463
|
}, []), !!e;
|
|
2453
2464
|
}
|
|
2454
2465
|
//#endregion
|
|
2455
2466
|
//#region src/components/pure/sheet.tsx
|
|
2456
|
-
function
|
|
2467
|
+
function Gr({ ...e }) {
|
|
2457
2468
|
return /* @__PURE__ */ a(w.Root, {
|
|
2458
2469
|
"data-slot": "sheet",
|
|
2459
2470
|
...e
|
|
2460
2471
|
});
|
|
2461
2472
|
}
|
|
2462
|
-
function
|
|
2473
|
+
function Kr({ ...e }) {
|
|
2463
2474
|
return /* @__PURE__ */ a(w.Trigger, {
|
|
2464
2475
|
"data-slot": "sheet-trigger",
|
|
2465
2476
|
...e
|
|
2466
2477
|
});
|
|
2467
2478
|
}
|
|
2468
|
-
function
|
|
2479
|
+
function qr({ ...e }) {
|
|
2469
2480
|
return /* @__PURE__ */ a(w.Close, {
|
|
2470
2481
|
"data-slot": "sheet-close",
|
|
2471
2482
|
...e
|
|
2472
2483
|
});
|
|
2473
2484
|
}
|
|
2474
|
-
function
|
|
2485
|
+
function Jr({ ...e }) {
|
|
2475
2486
|
return /* @__PURE__ */ a(w.Portal, {
|
|
2476
2487
|
"data-slot": "sheet-portal",
|
|
2477
2488
|
...e
|
|
2478
2489
|
});
|
|
2479
2490
|
}
|
|
2480
|
-
function
|
|
2491
|
+
function Yr({ className: e, ...t }) {
|
|
2481
2492
|
return /* @__PURE__ */ a(w.Overlay, {
|
|
2482
2493
|
"data-slot": "sheet-overlay",
|
|
2483
2494
|
className: P("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/10 duration-100 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 z-50", e),
|
|
2484
2495
|
...t
|
|
2485
2496
|
});
|
|
2486
2497
|
}
|
|
2487
|
-
function
|
|
2488
|
-
return /* @__PURE__ */ o(
|
|
2498
|
+
function Xr({ className: e, children: t, side: n = "right", showCloseButton: r = !0, ...i }) {
|
|
2499
|
+
return /* @__PURE__ */ o(Jr, { children: [/* @__PURE__ */ a(Yr, {}), /* @__PURE__ */ o(w.Content, {
|
|
2489
2500
|
"data-slot": "sheet-content",
|
|
2490
2501
|
"data-side": n,
|
|
2491
2502
|
className: P("bg-background data-open:animate-in data-closed:animate-out data-[side=right]:data-closed:slide-out-to-right-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=top]:data-closed:slide-out-to-top-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:fade-out-0 data-open:fade-in-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=bottom]:data-open:slide-in-from-bottom-10 fixed z-50 flex flex-col gap-4 bg-clip-padding text-sm shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-e data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-s data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm", e),
|
|
@@ -2505,28 +2516,28 @@ function Yr({ className: e, children: t, side: n = "right", showCloseButton: r =
|
|
|
2505
2516
|
})]
|
|
2506
2517
|
})] });
|
|
2507
2518
|
}
|
|
2508
|
-
function
|
|
2519
|
+
function Zr({ className: e, ...t }) {
|
|
2509
2520
|
return /* @__PURE__ */ a("div", {
|
|
2510
2521
|
"data-slot": "sheet-header",
|
|
2511
2522
|
className: P("gap-0.5 p-4 flex flex-col", e),
|
|
2512
2523
|
...t
|
|
2513
2524
|
});
|
|
2514
2525
|
}
|
|
2515
|
-
function
|
|
2526
|
+
function Qr({ className: e, ...t }) {
|
|
2516
2527
|
return /* @__PURE__ */ a("div", {
|
|
2517
2528
|
"data-slot": "sheet-footer",
|
|
2518
2529
|
className: P("gap-2 p-4 mt-auto flex flex-col", e),
|
|
2519
2530
|
...t
|
|
2520
2531
|
});
|
|
2521
2532
|
}
|
|
2522
|
-
function
|
|
2533
|
+
function $r({ className: e, ...t }) {
|
|
2523
2534
|
return /* @__PURE__ */ a(w.Title, {
|
|
2524
2535
|
"data-slot": "sheet-title",
|
|
2525
2536
|
className: P("text-foreground text-base font-medium", e),
|
|
2526
2537
|
...t
|
|
2527
2538
|
});
|
|
2528
2539
|
}
|
|
2529
|
-
function
|
|
2540
|
+
function ei({ className: e, ...t }) {
|
|
2530
2541
|
return /* @__PURE__ */ a(w.Description, {
|
|
2531
2542
|
"data-slot": "sheet-description",
|
|
2532
2543
|
className: P("text-muted-foreground text-sm", e),
|
|
@@ -2535,7 +2546,7 @@ function $r({ className: e, ...t }) {
|
|
|
2535
2546
|
}
|
|
2536
2547
|
//#endregion
|
|
2537
2548
|
//#region src/components/pure/skeleton.tsx
|
|
2538
|
-
function
|
|
2549
|
+
function ti({ className: e, ...t }) {
|
|
2539
2550
|
return /* @__PURE__ */ a("div", {
|
|
2540
2551
|
"data-slot": "skeleton",
|
|
2541
2552
|
className: P("bg-muted rounded-md animate-pulse", e),
|
|
@@ -2544,26 +2555,26 @@ function ei({ className: e, ...t }) {
|
|
|
2544
2555
|
}
|
|
2545
2556
|
//#endregion
|
|
2546
2557
|
//#region src/components/pure/tooltip.tsx
|
|
2547
|
-
function
|
|
2558
|
+
function ni({ delayDuration: e = 0, ...t }) {
|
|
2548
2559
|
return /* @__PURE__ */ a(O.Provider, {
|
|
2549
2560
|
"data-slot": "tooltip-provider",
|
|
2550
2561
|
delayDuration: e,
|
|
2551
2562
|
...t
|
|
2552
2563
|
});
|
|
2553
2564
|
}
|
|
2554
|
-
function
|
|
2565
|
+
function ri({ ...e }) {
|
|
2555
2566
|
return /* @__PURE__ */ a(O.Root, {
|
|
2556
2567
|
"data-slot": "tooltip",
|
|
2557
2568
|
...e
|
|
2558
2569
|
});
|
|
2559
2570
|
}
|
|
2560
|
-
function
|
|
2571
|
+
function ii({ ...e }) {
|
|
2561
2572
|
return /* @__PURE__ */ a(O.Trigger, {
|
|
2562
2573
|
"data-slot": "tooltip-trigger",
|
|
2563
2574
|
...e
|
|
2564
2575
|
});
|
|
2565
2576
|
}
|
|
2566
|
-
function
|
|
2577
|
+
function ai({ className: e, sideOffset: t = 0, children: n, ...r }) {
|
|
2567
2578
|
return /* @__PURE__ */ a(O.Portal, { children: /* @__PURE__ */ o(O.Content, {
|
|
2568
2579
|
"data-slot": "tooltip-content",
|
|
2569
2580
|
sideOffset: t,
|
|
@@ -2574,16 +2585,16 @@ function ii({ className: e, sideOffset: t = 0, children: n, ...r }) {
|
|
|
2574
2585
|
}
|
|
2575
2586
|
//#endregion
|
|
2576
2587
|
//#region src/components/pure/sidebar.tsx
|
|
2577
|
-
var
|
|
2588
|
+
var oi = "sidebar_state", si = 3600 * 24 * 7, ci = "16rem", li = "18rem", ui = "3rem", di = "b", fi = y.createContext(null);
|
|
2578
2589
|
function V() {
|
|
2579
|
-
let e = y.useContext(
|
|
2590
|
+
let e = y.useContext(fi);
|
|
2580
2591
|
if (!e) throw Error("useSidebar must be used within a SidebarProvider.");
|
|
2581
2592
|
return e;
|
|
2582
2593
|
}
|
|
2583
|
-
function
|
|
2584
|
-
let c =
|
|
2594
|
+
function pi({ defaultOpen: e = !0, open: t, onOpenChange: n, className: r, style: i, children: o, ...s }) {
|
|
2595
|
+
let c = Wr(), [l, u] = y.useState(!1), [d, f] = y.useState(e), p = t ?? d, m = y.useCallback((e) => {
|
|
2585
2596
|
let t = typeof e == "function" ? e(p) : e;
|
|
2586
|
-
n ? n(t) : f(t), document.cookie = `${
|
|
2597
|
+
n ? n(t) : f(t), document.cookie = `${oi}=${t}; path=/; max-age=${si}`;
|
|
2587
2598
|
}, [n, p]), h = y.useCallback(() => c ? u((e) => !e) : m((e) => !e), [
|
|
2588
2599
|
c,
|
|
2589
2600
|
m,
|
|
@@ -2591,7 +2602,7 @@ function fi({ defaultOpen: e = !0, open: t, onOpenChange: n, className: r, style
|
|
|
2591
2602
|
]);
|
|
2592
2603
|
y.useEffect(() => {
|
|
2593
2604
|
let e = (e) => {
|
|
2594
|
-
e.key ===
|
|
2605
|
+
e.key === di && (e.metaKey || e.ctrlKey) && (e.preventDefault(), h());
|
|
2595
2606
|
};
|
|
2596
2607
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
2597
2608
|
}, [h]);
|
|
@@ -2612,13 +2623,13 @@ function fi({ defaultOpen: e = !0, open: t, onOpenChange: n, className: r, style
|
|
|
2612
2623
|
u,
|
|
2613
2624
|
h
|
|
2614
2625
|
]);
|
|
2615
|
-
return /* @__PURE__ */ a(
|
|
2626
|
+
return /* @__PURE__ */ a(fi.Provider, {
|
|
2616
2627
|
value: _,
|
|
2617
2628
|
children: /* @__PURE__ */ a("div", {
|
|
2618
2629
|
"data-slot": "sidebar-wrapper",
|
|
2619
2630
|
style: {
|
|
2620
|
-
"--sidebar-width":
|
|
2621
|
-
"--sidebar-width-icon":
|
|
2631
|
+
"--sidebar-width": ci,
|
|
2632
|
+
"--sidebar-width-icon": ui,
|
|
2622
2633
|
...i
|
|
2623
2634
|
},
|
|
2624
2635
|
className: P("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full", r),
|
|
@@ -2627,28 +2638,28 @@ function fi({ defaultOpen: e = !0, open: t, onOpenChange: n, className: r, style
|
|
|
2627
2638
|
})
|
|
2628
2639
|
});
|
|
2629
2640
|
}
|
|
2630
|
-
function
|
|
2641
|
+
function mi({ side: e = "left", variant: t = "sidebar", collapsible: n = "offcanvas", className: r, children: i, dir: s, ...c }) {
|
|
2631
2642
|
let { isMobile: l, state: u, openMobile: d, setOpenMobile: f } = V();
|
|
2632
2643
|
return n === "none" ? /* @__PURE__ */ a("div", {
|
|
2633
2644
|
"data-slot": "sidebar",
|
|
2634
2645
|
className: P("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col", r),
|
|
2635
2646
|
...c,
|
|
2636
2647
|
children: i
|
|
2637
|
-
}) : l ? /* @__PURE__ */ a(
|
|
2648
|
+
}) : l ? /* @__PURE__ */ a(Gr, {
|
|
2638
2649
|
open: d,
|
|
2639
2650
|
onOpenChange: f,
|
|
2640
2651
|
...c,
|
|
2641
|
-
children: /* @__PURE__ */ o(
|
|
2652
|
+
children: /* @__PURE__ */ o(Xr, {
|
|
2642
2653
|
dir: s,
|
|
2643
2654
|
"data-sidebar": "sidebar",
|
|
2644
2655
|
"data-slot": "sidebar",
|
|
2645
2656
|
"data-mobile": "true",
|
|
2646
2657
|
className: "bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",
|
|
2647
|
-
style: { "--sidebar-width":
|
|
2658
|
+
style: { "--sidebar-width": li },
|
|
2648
2659
|
side: e,
|
|
2649
|
-
children: [/* @__PURE__ */ o(
|
|
2660
|
+
children: [/* @__PURE__ */ o(Zr, {
|
|
2650
2661
|
className: "sr-only",
|
|
2651
|
-
children: [/* @__PURE__ */ a(
|
|
2662
|
+
children: [/* @__PURE__ */ a($r, { children: "Sidebar" }), /* @__PURE__ */ a(ei, { children: "Displays the mobile sidebar." })]
|
|
2652
2663
|
}), /* @__PURE__ */ a("div", {
|
|
2653
2664
|
className: "flex h-full w-full flex-col",
|
|
2654
2665
|
children: i
|
|
@@ -2678,7 +2689,7 @@ function pi({ side: e = "left", variant: t = "sidebar", collapsible: n = "offcan
|
|
|
2678
2689
|
})]
|
|
2679
2690
|
});
|
|
2680
2691
|
}
|
|
2681
|
-
function
|
|
2692
|
+
function hi({ className: e, onClick: t, ...n }) {
|
|
2682
2693
|
let { toggleSidebar: r } = V();
|
|
2683
2694
|
return /* @__PURE__ */ o(F, {
|
|
2684
2695
|
"data-sidebar": "trigger",
|
|
@@ -2696,7 +2707,7 @@ function mi({ className: e, onClick: t, ...n }) {
|
|
|
2696
2707
|
})]
|
|
2697
2708
|
});
|
|
2698
2709
|
}
|
|
2699
|
-
function
|
|
2710
|
+
function gi({ className: e, ...t }) {
|
|
2700
2711
|
let { toggleSidebar: n } = V();
|
|
2701
2712
|
return /* @__PURE__ */ a("button", {
|
|
2702
2713
|
"data-sidebar": "rail",
|
|
@@ -2709,14 +2720,14 @@ function hi({ className: e, ...t }) {
|
|
|
2709
2720
|
...t
|
|
2710
2721
|
});
|
|
2711
2722
|
}
|
|
2712
|
-
function
|
|
2723
|
+
function _i({ className: e, ...t }) {
|
|
2713
2724
|
return /* @__PURE__ */ a("main", {
|
|
2714
2725
|
"data-slot": "sidebar-inset",
|
|
2715
2726
|
className: P("bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ms-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ms-2 relative flex w-full flex-1 flex-col", e),
|
|
2716
2727
|
...t
|
|
2717
2728
|
});
|
|
2718
2729
|
}
|
|
2719
|
-
function
|
|
2730
|
+
function vi({ className: e, ...t }) {
|
|
2720
2731
|
return /* @__PURE__ */ a(z, {
|
|
2721
2732
|
"data-slot": "sidebar-input",
|
|
2722
2733
|
"data-sidebar": "input",
|
|
@@ -2724,7 +2735,7 @@ function _i({ className: e, ...t }) {
|
|
|
2724
2735
|
...t
|
|
2725
2736
|
});
|
|
2726
2737
|
}
|
|
2727
|
-
function
|
|
2738
|
+
function yi({ className: e, ...t }) {
|
|
2728
2739
|
return /* @__PURE__ */ a("div", {
|
|
2729
2740
|
"data-slot": "sidebar-header",
|
|
2730
2741
|
"data-sidebar": "header",
|
|
@@ -2732,7 +2743,7 @@ function vi({ className: e, ...t }) {
|
|
|
2732
2743
|
...t
|
|
2733
2744
|
});
|
|
2734
2745
|
}
|
|
2735
|
-
function
|
|
2746
|
+
function bi({ className: e, ...t }) {
|
|
2736
2747
|
return /* @__PURE__ */ a("div", {
|
|
2737
2748
|
"data-slot": "sidebar-footer",
|
|
2738
2749
|
"data-sidebar": "footer",
|
|
@@ -2740,7 +2751,7 @@ function yi({ className: e, ...t }) {
|
|
|
2740
2751
|
...t
|
|
2741
2752
|
});
|
|
2742
2753
|
}
|
|
2743
|
-
function
|
|
2754
|
+
function xi({ className: e, ...t }) {
|
|
2744
2755
|
return /* @__PURE__ */ a(L, {
|
|
2745
2756
|
"data-slot": "sidebar-separator",
|
|
2746
2757
|
"data-sidebar": "separator",
|
|
@@ -2748,7 +2759,7 @@ function bi({ className: e, ...t }) {
|
|
|
2748
2759
|
...t
|
|
2749
2760
|
});
|
|
2750
2761
|
}
|
|
2751
|
-
function
|
|
2762
|
+
function Si({ className: e, ...t }) {
|
|
2752
2763
|
return /* @__PURE__ */ a("div", {
|
|
2753
2764
|
"data-slot": "sidebar-content",
|
|
2754
2765
|
"data-sidebar": "content",
|
|
@@ -2756,7 +2767,7 @@ function xi({ className: e, ...t }) {
|
|
|
2756
2767
|
...t
|
|
2757
2768
|
});
|
|
2758
2769
|
}
|
|
2759
|
-
function
|
|
2770
|
+
function Ci({ className: e, ...t }) {
|
|
2760
2771
|
return /* @__PURE__ */ a("div", {
|
|
2761
2772
|
"data-slot": "sidebar-group",
|
|
2762
2773
|
"data-sidebar": "group",
|
|
@@ -2764,7 +2775,7 @@ function Si({ className: e, ...t }) {
|
|
|
2764
2775
|
...t
|
|
2765
2776
|
});
|
|
2766
2777
|
}
|
|
2767
|
-
function
|
|
2778
|
+
function wi({ className: e, asChild: t = !1, ...n }) {
|
|
2768
2779
|
return /* @__PURE__ */ a(t ? C : "div", {
|
|
2769
2780
|
"data-slot": "sidebar-group-label",
|
|
2770
2781
|
"data-sidebar": "group-label",
|
|
@@ -2772,7 +2783,7 @@ function Ci({ className: e, asChild: t = !1, ...n }) {
|
|
|
2772
2783
|
...n
|
|
2773
2784
|
});
|
|
2774
2785
|
}
|
|
2775
|
-
function
|
|
2786
|
+
function Ti({ className: e, asChild: t = !1, ...n }) {
|
|
2776
2787
|
return /* @__PURE__ */ a(t ? C : "button", {
|
|
2777
2788
|
"data-slot": "sidebar-group-action",
|
|
2778
2789
|
"data-sidebar": "group-action",
|
|
@@ -2780,7 +2791,7 @@ function wi({ className: e, asChild: t = !1, ...n }) {
|
|
|
2780
2791
|
...n
|
|
2781
2792
|
});
|
|
2782
2793
|
}
|
|
2783
|
-
function
|
|
2794
|
+
function Ei({ className: e, ...t }) {
|
|
2784
2795
|
return /* @__PURE__ */ a("div", {
|
|
2785
2796
|
"data-slot": "sidebar-group-content",
|
|
2786
2797
|
"data-sidebar": "group-content",
|
|
@@ -2804,7 +2815,7 @@ function U({ className: e, ...t }) {
|
|
|
2804
2815
|
...t
|
|
2805
2816
|
});
|
|
2806
2817
|
}
|
|
2807
|
-
var
|
|
2818
|
+
var Di = S("ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground gap-2 rounded-md p-2 text-start text-sm transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pe-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 data-active:font-medium peer/menu-button flex w-full items-center overflow-hidden outline-hidden group/menu-button disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&_svg]:size-6 [&_svg]:shrink-0", {
|
|
2808
2819
|
variants: {
|
|
2809
2820
|
variant: {
|
|
2810
2821
|
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
@@ -2827,23 +2838,23 @@ function W({ asChild: e = !1, isActive: t = !1, variant: n = "default", size: r
|
|
|
2827
2838
|
"data-sidebar": "menu-button",
|
|
2828
2839
|
"data-size": r,
|
|
2829
2840
|
"data-active": t,
|
|
2830
|
-
className: P(
|
|
2841
|
+
className: P(Di({
|
|
2831
2842
|
variant: n,
|
|
2832
2843
|
size: r
|
|
2833
2844
|
}), s),
|
|
2834
2845
|
...c
|
|
2835
2846
|
});
|
|
2836
|
-
return i ? (typeof i == "string" && (i = { children: i }), /* @__PURE__ */ o(
|
|
2847
|
+
return i ? (typeof i == "string" && (i = { children: i }), /* @__PURE__ */ o(ri, { children: [/* @__PURE__ */ a(ii, {
|
|
2837
2848
|
asChild: !0,
|
|
2838
2849
|
children: f
|
|
2839
|
-
}), /* @__PURE__ */ a(
|
|
2850
|
+
}), /* @__PURE__ */ a(ai, {
|
|
2840
2851
|
side: "right",
|
|
2841
2852
|
align: "center",
|
|
2842
2853
|
hidden: d !== "collapsed" || u,
|
|
2843
2854
|
...i
|
|
2844
2855
|
})] })) : f;
|
|
2845
2856
|
}
|
|
2846
|
-
function
|
|
2857
|
+
function Oi({ className: e, asChild: t = !1, showOnHover: n = !1, ...r }) {
|
|
2847
2858
|
return /* @__PURE__ */ a(t ? C : "button", {
|
|
2848
2859
|
"data-slot": "sidebar-menu-action",
|
|
2849
2860
|
"data-sidebar": "menu-action",
|
|
@@ -2851,7 +2862,7 @@ function Di({ className: e, asChild: t = !1, showOnHover: n = !1, ...r }) {
|
|
|
2851
2862
|
...r
|
|
2852
2863
|
});
|
|
2853
2864
|
}
|
|
2854
|
-
function
|
|
2865
|
+
function ki({ className: e, ...t }) {
|
|
2855
2866
|
return /* @__PURE__ */ a("div", {
|
|
2856
2867
|
"data-slot": "sidebar-menu-badge",
|
|
2857
2868
|
"data-sidebar": "menu-badge",
|
|
@@ -2859,24 +2870,24 @@ function Oi({ className: e, ...t }) {
|
|
|
2859
2870
|
...t
|
|
2860
2871
|
});
|
|
2861
2872
|
}
|
|
2862
|
-
function
|
|
2873
|
+
function Ai({ className: e, showIcon: t = !1, ...n }) {
|
|
2863
2874
|
let [r] = y.useState(() => `${Math.floor(Math.random() * 40) + 50}%`);
|
|
2864
2875
|
return /* @__PURE__ */ o("div", {
|
|
2865
2876
|
"data-slot": "sidebar-menu-skeleton",
|
|
2866
2877
|
"data-sidebar": "menu-skeleton",
|
|
2867
2878
|
className: P("h-8 gap-2 rounded-md px-2 flex items-center", e),
|
|
2868
2879
|
...n,
|
|
2869
|
-
children: [t && /* @__PURE__ */ a(
|
|
2880
|
+
children: [t && /* @__PURE__ */ a(ti, {
|
|
2870
2881
|
className: "size-4 rounded-md",
|
|
2871
2882
|
"data-sidebar": "menu-skeleton-icon"
|
|
2872
|
-
}), /* @__PURE__ */ a(
|
|
2883
|
+
}), /* @__PURE__ */ a(ti, {
|
|
2873
2884
|
className: "h-4 max-w-(--skeleton-width) flex-1",
|
|
2874
2885
|
"data-sidebar": "menu-skeleton-text",
|
|
2875
2886
|
style: { "--skeleton-width": r }
|
|
2876
2887
|
})]
|
|
2877
2888
|
});
|
|
2878
2889
|
}
|
|
2879
|
-
function
|
|
2890
|
+
function ji({ className: e, ...t }) {
|
|
2880
2891
|
return /* @__PURE__ */ a("ul", {
|
|
2881
2892
|
"data-slot": "sidebar-menu-sub",
|
|
2882
2893
|
"data-sidebar": "menu-sub",
|
|
@@ -2884,7 +2895,7 @@ function Ai({ className: e, ...t }) {
|
|
|
2884
2895
|
...t
|
|
2885
2896
|
});
|
|
2886
2897
|
}
|
|
2887
|
-
function
|
|
2898
|
+
function Mi({ className: e, ...t }) {
|
|
2888
2899
|
return /* @__PURE__ */ a("li", {
|
|
2889
2900
|
"data-slot": "sidebar-menu-sub-item",
|
|
2890
2901
|
"data-sidebar": "menu-sub-item",
|
|
@@ -2892,7 +2903,7 @@ function ji({ className: e, ...t }) {
|
|
|
2892
2903
|
...t
|
|
2893
2904
|
});
|
|
2894
2905
|
}
|
|
2895
|
-
function
|
|
2906
|
+
function Ni({ asChild: e = !1, size: t = "md", isActive: n = !1, className: r, ...i }) {
|
|
2896
2907
|
return /* @__PURE__ */ a(e ? C : "a", {
|
|
2897
2908
|
"data-slot": "sidebar-menu-sub-button",
|
|
2898
2909
|
"data-sidebar": "menu-sub-button",
|
|
@@ -2904,7 +2915,7 @@ function Mi({ asChild: e = !1, size: t = "md", isActive: n = !1, className: r, .
|
|
|
2904
2915
|
}
|
|
2905
2916
|
//#endregion
|
|
2906
2917
|
//#region src/components/custom/table/crudTablePagination.tsx
|
|
2907
|
-
function
|
|
2918
|
+
function Pi({ pageSize: e, totalNumber: t, currentPage: n, onPageChanged: r }) {
|
|
2908
2919
|
let i = Math.ceil(t / e);
|
|
2909
2920
|
return /* @__PURE__ */ o("div", {
|
|
2910
2921
|
className: "p-4 border-t bg-muted flex items-center justify-between text-sm text-muted-foreground",
|
|
@@ -2920,25 +2931,25 @@ function Ni({ pageSize: e, totalNumber: t, currentPage: n, onPageChanged: r }) {
|
|
|
2920
2931
|
t,
|
|
2921
2932
|
" "
|
|
2922
2933
|
]
|
|
2923
|
-
}), /* @__PURE__ */ a(
|
|
2934
|
+
}), /* @__PURE__ */ a(Sr, {
|
|
2924
2935
|
dir: "rtl",
|
|
2925
2936
|
className: "justify-end w-auto mx-0",
|
|
2926
|
-
children: /* @__PURE__ */ o(
|
|
2927
|
-
/* @__PURE__ */ a(
|
|
2937
|
+
children: /* @__PURE__ */ o(Cr, { children: [
|
|
2938
|
+
/* @__PURE__ */ a(wr, { children: /* @__PURE__ */ a(Er, {
|
|
2928
2939
|
onClick: () => {
|
|
2929
2940
|
n > 1 && r?.(n - 1);
|
|
2930
2941
|
},
|
|
2931
2942
|
text: "السابق"
|
|
2932
2943
|
}) }),
|
|
2933
|
-
/* @__PURE__ */ o(
|
|
2944
|
+
/* @__PURE__ */ o(kr, {
|
|
2934
2945
|
dir: "rtl",
|
|
2935
|
-
children: [/* @__PURE__ */ a(
|
|
2946
|
+
children: [/* @__PURE__ */ a(jr, {
|
|
2936
2947
|
asChild: !0,
|
|
2937
2948
|
children: /* @__PURE__ */ a(W, {
|
|
2938
2949
|
className: "w-full h-5 justify-start gap-2 text-base",
|
|
2939
2950
|
children: /* @__PURE__ */ a("span", { children: n })
|
|
2940
2951
|
})
|
|
2941
|
-
}), /* @__PURE__ */ a(
|
|
2952
|
+
}), /* @__PURE__ */ a(Mr, {
|
|
2942
2953
|
align: "end",
|
|
2943
2954
|
children: Array.from({ length: Math.ceil(t / e) }, (e, t) => /* @__PURE__ */ a(B, {
|
|
2944
2955
|
onClick: () => r?.(t + 1),
|
|
@@ -2946,7 +2957,7 @@ function Ni({ pageSize: e, totalNumber: t, currentPage: n, onPageChanged: r }) {
|
|
|
2946
2957
|
}, t + 1))
|
|
2947
2958
|
})]
|
|
2948
2959
|
}),
|
|
2949
|
-
/* @__PURE__ */ a(
|
|
2960
|
+
/* @__PURE__ */ a(wr, { children: /* @__PURE__ */ a(Dr, {
|
|
2950
2961
|
onClick: () => {
|
|
2951
2962
|
n < i && r?.(n + 1);
|
|
2952
2963
|
},
|
|
@@ -2958,21 +2969,21 @@ function Ni({ pageSize: e, totalNumber: t, currentPage: n, onPageChanged: r }) {
|
|
|
2958
2969
|
}
|
|
2959
2970
|
//#endregion
|
|
2960
2971
|
//#region src/components/custom/table/crudTableRowActionsMenu.tsx
|
|
2961
|
-
function
|
|
2962
|
-
return /* @__PURE__ */ o(i, { children: [n === "dropdown" && /* @__PURE__ */ o(
|
|
2972
|
+
function Fi({ onEditClicked: e, onDeleteClicked: t, type: n, permissions: r }) {
|
|
2973
|
+
return /* @__PURE__ */ o(i, { children: [n === "dropdown" && /* @__PURE__ */ o(kr, {
|
|
2963
2974
|
dir: "rtl",
|
|
2964
|
-
children: [/* @__PURE__ */ a(
|
|
2975
|
+
children: [/* @__PURE__ */ a(jr, {
|
|
2965
2976
|
asChild: !0,
|
|
2966
2977
|
children: /* @__PURE__ */ a(F, {
|
|
2967
2978
|
variant: "ghost",
|
|
2968
2979
|
className: "h-8 w-8 p-0",
|
|
2969
2980
|
children: /* @__PURE__ */ a(le, { className: "h-4 w-4" })
|
|
2970
2981
|
})
|
|
2971
|
-
}), /* @__PURE__ */ o(
|
|
2982
|
+
}), /* @__PURE__ */ o(Mr, {
|
|
2972
2983
|
align: "start",
|
|
2973
2984
|
children: [
|
|
2974
|
-
/* @__PURE__ */ a(
|
|
2975
|
-
/* @__PURE__ */ a(
|
|
2985
|
+
/* @__PURE__ */ a(Lr, { children: "الإجراءات" }),
|
|
2986
|
+
/* @__PURE__ */ a(Rr, {}),
|
|
2976
2987
|
r.updatePermission && /* @__PURE__ */ a(B, {
|
|
2977
2988
|
onSelect: e,
|
|
2978
2989
|
children: "تعديل"
|
|
@@ -2984,14 +2995,14 @@ function Pi({ onEditClicked: e, onDeleteClicked: t, type: n, permissions: r }) {
|
|
|
2984
2995
|
})
|
|
2985
2996
|
]
|
|
2986
2997
|
})]
|
|
2987
|
-
}), n === "context" && /* @__PURE__ */ a(
|
|
2988
|
-
/* @__PURE__ */ a(
|
|
2989
|
-
/* @__PURE__ */ a(
|
|
2990
|
-
r.updatePermission && /* @__PURE__ */ a(
|
|
2998
|
+
}), n === "context" && /* @__PURE__ */ a(lr, { children: /* @__PURE__ */ o(ar, { children: [
|
|
2999
|
+
/* @__PURE__ */ a(hr, { children: "الإجراءات" }),
|
|
3000
|
+
/* @__PURE__ */ a(gr, {}),
|
|
3001
|
+
r.updatePermission && /* @__PURE__ */ a(ur, {
|
|
2991
3002
|
onSelect: e,
|
|
2992
3003
|
children: "تعديل"
|
|
2993
3004
|
}),
|
|
2994
|
-
r.deletePermission && /* @__PURE__ */ a(
|
|
3005
|
+
r.deletePermission && /* @__PURE__ */ a(ur, {
|
|
2995
3006
|
className: "text-destructive",
|
|
2996
3007
|
onSelect: t,
|
|
2997
3008
|
children: "حذف"
|
|
@@ -3000,38 +3011,38 @@ function Pi({ onEditClicked: e, onDeleteClicked: t, type: n, permissions: r }) {
|
|
|
3000
3011
|
}
|
|
3001
3012
|
//#endregion
|
|
3002
3013
|
//#region src/components/custom/pages/crudPage.tsx
|
|
3003
|
-
function
|
|
3004
|
-
let g =
|
|
3005
|
-
return
|
|
3014
|
+
function Ii({ permissions: e, useSlice: t, entityName: n, title: r, addNewItemTitle: i, cards: s, columnsToFilter: c, actions: l, service: u, entityState: d, tableHeadRows: f, tableRowMapper: p, ChangeDialog: m, children: h }) {
|
|
3015
|
+
let g = Ue(), { selectedRow: _, isChangeDialogOpen: v, isDeleteDialogOpen: ee } = t();
|
|
3016
|
+
return Ae(() => {
|
|
3006
3017
|
g(l.filter(void 0));
|
|
3007
3018
|
}, [g, l.filter]), /* @__PURE__ */ o("div", {
|
|
3008
3019
|
className: "px-5 py-3",
|
|
3009
3020
|
children: [
|
|
3010
|
-
/* @__PURE__ */ a(
|
|
3021
|
+
/* @__PURE__ */ a(br, {
|
|
3011
3022
|
title: r,
|
|
3012
3023
|
buttonTitle: i,
|
|
3013
3024
|
isButtonVisible: e.addPermission,
|
|
3014
3025
|
createComp: m
|
|
3015
3026
|
}),
|
|
3016
|
-
/* @__PURE__ */ a(
|
|
3017
|
-
/* @__PURE__ */ a(
|
|
3027
|
+
/* @__PURE__ */ a(yr, { cards: s }),
|
|
3028
|
+
/* @__PURE__ */ a(In, {
|
|
3018
3029
|
columnsNames: c,
|
|
3019
3030
|
onSearch: (e) => g(l.filter(e))
|
|
3020
3031
|
}),
|
|
3021
3032
|
/* @__PURE__ */ o("div", {
|
|
3022
3033
|
className: "rounded-b-xl border shadow-sm overflow-hidden",
|
|
3023
3034
|
children: [
|
|
3024
|
-
/* @__PURE__ */ o(
|
|
3035
|
+
/* @__PURE__ */ o(nr, {
|
|
3025
3036
|
state: d,
|
|
3026
|
-
children: [/* @__PURE__ */ a(
|
|
3037
|
+
children: [/* @__PURE__ */ a(xr, { tableHeadRows: f }), /* @__PURE__ */ a(zn, { children: d.entities?.data?.map((t, n) => /* @__PURE__ */ a(vr, {
|
|
3027
3038
|
tableRows: p(t),
|
|
3028
|
-
dropdownMenu: /* @__PURE__ */ a(
|
|
3039
|
+
dropdownMenu: /* @__PURE__ */ a(Fi, {
|
|
3029
3040
|
permissions: e,
|
|
3030
3041
|
type: "dropdown",
|
|
3031
3042
|
onEditClicked: () => g(l.openChangeDialog(t)),
|
|
3032
3043
|
onDeleteClicked: () => g(l.openDeleteDialog(t))
|
|
3033
3044
|
}),
|
|
3034
|
-
contextMenuContent: /* @__PURE__ */ a(
|
|
3045
|
+
contextMenuContent: /* @__PURE__ */ a(Fi, {
|
|
3035
3046
|
permissions: e,
|
|
3036
3047
|
type: "context",
|
|
3037
3048
|
onEditClicked: () => g(l.openChangeDialog(t)),
|
|
@@ -3039,7 +3050,7 @@ function Fi({ permissions: e, useSlice: t, entityName: n, title: r, addNewItemTi
|
|
|
3039
3050
|
})
|
|
3040
3051
|
}, n)) })]
|
|
3041
3052
|
}),
|
|
3042
|
-
/* @__PURE__ */ a(
|
|
3053
|
+
/* @__PURE__ */ a(Pi, {
|
|
3043
3054
|
pageSize: d.rowsPerPage,
|
|
3044
3055
|
totalNumber: d.entities?.count ?? 0,
|
|
3045
3056
|
currentPage: d.currentPage || 1,
|
|
@@ -3053,10 +3064,10 @@ function Fi({ permissions: e, useSlice: t, entityName: n, title: r, addNewItemTi
|
|
|
3053
3064
|
ee && e.deletePermission && /* @__PURE__ */ a(I, {
|
|
3054
3065
|
open: ee,
|
|
3055
3066
|
onOpenChange: (e) => g(l.setIsDeleteDialogOpen(e)),
|
|
3056
|
-
children: /* @__PURE__ */ a(
|
|
3067
|
+
children: /* @__PURE__ */ a(ht, {
|
|
3057
3068
|
dir: "rtl",
|
|
3058
3069
|
className: "sm:max-w-sm",
|
|
3059
|
-
children: /* @__PURE__ */ a(
|
|
3070
|
+
children: /* @__PURE__ */ a(xt, {
|
|
3060
3071
|
entityName: n,
|
|
3061
3072
|
id: _?.id ?? 0,
|
|
3062
3073
|
service: u,
|
|
@@ -3074,7 +3085,7 @@ function Fi({ permissions: e, useSlice: t, entityName: n, title: r, addNewItemTi
|
|
|
3074
3085
|
}
|
|
3075
3086
|
//#endregion
|
|
3076
3087
|
//#region src/components/pure/input-group.tsx
|
|
3077
|
-
function
|
|
3088
|
+
function Li({ className: e, ...t }) {
|
|
3078
3089
|
return /* @__PURE__ */ a("div", {
|
|
3079
3090
|
"data-slot": "input-group",
|
|
3080
3091
|
role: "group",
|
|
@@ -3082,7 +3093,7 @@ function Ii({ className: e, ...t }) {
|
|
|
3082
3093
|
...t
|
|
3083
3094
|
});
|
|
3084
3095
|
}
|
|
3085
|
-
var
|
|
3096
|
+
var Ri = S("text-muted-foreground h-auto gap-2 py-1.5 text-sm font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4 flex cursor-text items-center justify-center select-none", {
|
|
3086
3097
|
variants: { align: {
|
|
3087
3098
|
"inline-start": "ps-2 has-[>button]:ms-[-0.3rem] has-[>kbd]:ms-[-0.15rem] order-first",
|
|
3088
3099
|
"inline-end": "pe-2 has-[>button]:me-[-0.3rem] has-[>kbd]:me-[-0.15rem] order-last",
|
|
@@ -3091,19 +3102,19 @@ var Li = S("text-muted-foreground h-auto gap-2 py-1.5 text-sm font-medium group-
|
|
|
3091
3102
|
} },
|
|
3092
3103
|
defaultVariants: { align: "inline-start" }
|
|
3093
3104
|
});
|
|
3094
|
-
function
|
|
3105
|
+
function zi({ className: e, align: t = "inline-start", ...n }) {
|
|
3095
3106
|
return /* @__PURE__ */ a("div", {
|
|
3096
3107
|
role: "group",
|
|
3097
3108
|
"data-slot": "input-group-addon",
|
|
3098
3109
|
"data-align": t,
|
|
3099
|
-
className: P(
|
|
3110
|
+
className: P(Ri({ align: t }), e),
|
|
3100
3111
|
onClick: (e) => {
|
|
3101
3112
|
e.target.closest("button") || e.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
3102
3113
|
},
|
|
3103
3114
|
...n
|
|
3104
3115
|
});
|
|
3105
3116
|
}
|
|
3106
|
-
var
|
|
3117
|
+
var Bi = S("gap-2 text-sm shadow-none flex items-center", {
|
|
3107
3118
|
variants: { size: {
|
|
3108
3119
|
xs: "h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
|
|
3109
3120
|
sm: "",
|
|
@@ -3112,30 +3123,30 @@ var zi = S("gap-2 text-sm shadow-none flex items-center", {
|
|
|
3112
3123
|
} },
|
|
3113
3124
|
defaultVariants: { size: "xs" }
|
|
3114
3125
|
});
|
|
3115
|
-
function
|
|
3126
|
+
function Vi({ className: e, type: t = "button", variant: n = "ghost", size: r = "xs", ...i }) {
|
|
3116
3127
|
return /* @__PURE__ */ a(F, {
|
|
3117
3128
|
type: t,
|
|
3118
3129
|
"data-size": r,
|
|
3119
3130
|
variant: n,
|
|
3120
|
-
className: P(
|
|
3131
|
+
className: P(Bi({ size: r }), e),
|
|
3121
3132
|
...i
|
|
3122
3133
|
});
|
|
3123
3134
|
}
|
|
3124
|
-
function
|
|
3135
|
+
function Hi({ className: e, ...t }) {
|
|
3125
3136
|
return /* @__PURE__ */ a("span", {
|
|
3126
3137
|
className: P("text-muted-foreground gap-2 text-sm [&_svg:not([class*='size-'])]:size-4 flex items-center [&_svg]:pointer-events-none", e),
|
|
3127
3138
|
...t
|
|
3128
3139
|
});
|
|
3129
3140
|
}
|
|
3130
|
-
function
|
|
3141
|
+
function Ui({ className: e, ...t }) {
|
|
3131
3142
|
return /* @__PURE__ */ a(z, {
|
|
3132
3143
|
"data-slot": "input-group-control",
|
|
3133
3144
|
className: P("rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent flex-1", e),
|
|
3134
3145
|
...t
|
|
3135
3146
|
});
|
|
3136
3147
|
}
|
|
3137
|
-
function
|
|
3138
|
-
return /* @__PURE__ */ a(
|
|
3148
|
+
function Wi({ className: e, ...t }) {
|
|
3149
|
+
return /* @__PURE__ */ a(An, {
|
|
3139
3150
|
"data-slot": "input-group-control",
|
|
3140
3151
|
className: P("rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent flex-1 resize-none", e),
|
|
3141
3152
|
...t
|
|
@@ -3143,69 +3154,69 @@ function Ui({ className: e, ...t }) {
|
|
|
3143
3154
|
}
|
|
3144
3155
|
//#endregion
|
|
3145
3156
|
//#region src/components/pure/command.tsx
|
|
3146
|
-
function
|
|
3157
|
+
function Gi({ className: e, ...t }) {
|
|
3147
3158
|
return /* @__PURE__ */ a(k, {
|
|
3148
3159
|
"data-slot": "command",
|
|
3149
3160
|
className: P("bg-popover text-popover-foreground rounded-xl! p-1 flex size-full flex-col overflow-hidden", e),
|
|
3150
3161
|
...t
|
|
3151
3162
|
});
|
|
3152
3163
|
}
|
|
3153
|
-
function
|
|
3164
|
+
function Ki({ title: e = "Command Palette", description: t = "Search for a command to run...", children: n, className: r, showCloseButton: i = !1, ...s }) {
|
|
3154
3165
|
return /* @__PURE__ */ o(I, {
|
|
3155
3166
|
...s,
|
|
3156
|
-
children: [/* @__PURE__ */ o(
|
|
3167
|
+
children: [/* @__PURE__ */ o(gt, {
|
|
3157
3168
|
className: "sr-only",
|
|
3158
|
-
children: [/* @__PURE__ */ a(
|
|
3159
|
-
}), /* @__PURE__ */ a(
|
|
3169
|
+
children: [/* @__PURE__ */ a(vt, { children: e }), /* @__PURE__ */ a(yt, { children: t })]
|
|
3170
|
+
}), /* @__PURE__ */ a(ht, {
|
|
3160
3171
|
className: P("rounded-xl! top-1/3 translate-y-0 overflow-hidden p-0", r),
|
|
3161
3172
|
showCloseButton: i,
|
|
3162
3173
|
children: n
|
|
3163
3174
|
})]
|
|
3164
3175
|
});
|
|
3165
3176
|
}
|
|
3166
|
-
function
|
|
3177
|
+
function qi({ className: e, ...t }) {
|
|
3167
3178
|
return /* @__PURE__ */ a("div", {
|
|
3168
3179
|
"data-slot": "command-input-wrapper",
|
|
3169
3180
|
className: "p-1 pb-0",
|
|
3170
|
-
children: /* @__PURE__ */ o(
|
|
3181
|
+
children: /* @__PURE__ */ o(Li, {
|
|
3171
3182
|
className: "bg-input/30 border-input/30 h-8! rounded-lg! shadow-none! *:data-[slot=input-group-addon]:ps-2!",
|
|
3172
3183
|
children: [/* @__PURE__ */ a(k.Input, {
|
|
3173
3184
|
"data-slot": "command-input",
|
|
3174
3185
|
className: P("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", e),
|
|
3175
3186
|
...t
|
|
3176
|
-
}), /* @__PURE__ */ a(
|
|
3187
|
+
}), /* @__PURE__ */ a(zi, { children: /* @__PURE__ */ a(ve, { className: "size-4 shrink-0 opacity-50" }) })]
|
|
3177
3188
|
})
|
|
3178
3189
|
});
|
|
3179
3190
|
}
|
|
3180
|
-
function
|
|
3191
|
+
function Ji({ className: e, ...t }) {
|
|
3181
3192
|
return /* @__PURE__ */ a(k.List, {
|
|
3182
3193
|
"data-slot": "command-list",
|
|
3183
3194
|
className: P("no-scrollbar max-h-72 scroll-py-1 outline-none overflow-x-hidden overflow-y-auto", e),
|
|
3184
3195
|
...t
|
|
3185
3196
|
});
|
|
3186
3197
|
}
|
|
3187
|
-
function
|
|
3198
|
+
function Yi({ className: e, ...t }) {
|
|
3188
3199
|
return /* @__PURE__ */ a(k.Empty, {
|
|
3189
3200
|
"data-slot": "command-empty",
|
|
3190
3201
|
className: P("py-6 text-center text-sm", e),
|
|
3191
3202
|
...t
|
|
3192
3203
|
});
|
|
3193
3204
|
}
|
|
3194
|
-
function
|
|
3205
|
+
function Xi({ className: e, ...t }) {
|
|
3195
3206
|
return /* @__PURE__ */ a(k.Group, {
|
|
3196
3207
|
"data-slot": "command-group",
|
|
3197
3208
|
className: P("text-foreground **:[[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium", e),
|
|
3198
3209
|
...t
|
|
3199
3210
|
});
|
|
3200
3211
|
}
|
|
3201
|
-
function
|
|
3212
|
+
function Zi({ className: e, ...t }) {
|
|
3202
3213
|
return /* @__PURE__ */ a(k.Separator, {
|
|
3203
3214
|
"data-slot": "command-separator",
|
|
3204
3215
|
className: P("bg-border -mx-1 h-px", e),
|
|
3205
3216
|
...t
|
|
3206
3217
|
});
|
|
3207
3218
|
}
|
|
3208
|
-
function
|
|
3219
|
+
function Qi({ className: e, children: t, ...n }) {
|
|
3209
3220
|
return /* @__PURE__ */ o(k.Item, {
|
|
3210
3221
|
"data-slot": "command-item",
|
|
3211
3222
|
className: P("data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! [&_svg:not([class*='size-'])]:size-4 group/command-item data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", e),
|
|
@@ -3213,7 +3224,7 @@ function Zi({ className: e, children: t, ...n }) {
|
|
|
3213
3224
|
children: [t, /* @__PURE__ */ a(c, { className: "ms-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100" })]
|
|
3214
3225
|
});
|
|
3215
3226
|
}
|
|
3216
|
-
function
|
|
3227
|
+
function $i({ className: e, ...t }) {
|
|
3217
3228
|
return /* @__PURE__ */ a("span", {
|
|
3218
3229
|
"data-slot": "command-shortcut",
|
|
3219
3230
|
className: P("text-muted-foreground group-data-selected/command-item:text-foreground ms-auto text-xs tracking-widest", e),
|
|
@@ -3222,13 +3233,13 @@ function Qi({ className: e, ...t }) {
|
|
|
3222
3233
|
}
|
|
3223
3234
|
//#endregion
|
|
3224
3235
|
//#region src/components/custom/select/searchableSelect.tsx
|
|
3225
|
-
function
|
|
3236
|
+
function ea({ items: e, itemLabelKey: t, itemValueKey: n, value: r, onValueChange: i, disabled: c, errorInputClass: l, placeholder: u = "اختر...", columnsNames: d, onSearch: f }) {
|
|
3226
3237
|
let [p, m] = y.useState(!1), g = e.find((e) => String(e[n]) === r), _ = g ? String(g[t]) : u;
|
|
3227
|
-
return /* @__PURE__ */ o(
|
|
3238
|
+
return /* @__PURE__ */ o(Ft, {
|
|
3228
3239
|
open: p,
|
|
3229
3240
|
onOpenChange: m,
|
|
3230
3241
|
modal: !0,
|
|
3231
|
-
children: [/* @__PURE__ */ a(
|
|
3242
|
+
children: [/* @__PURE__ */ a(It, {
|
|
3232
3243
|
asChild: !0,
|
|
3233
3244
|
children: /* @__PURE__ */ o(F, {
|
|
3234
3245
|
variant: "outline",
|
|
@@ -3241,23 +3252,23 @@ function $i({ items: e, itemLabelKey: t, itemValueKey: n, value: r, onValueChang
|
|
|
3241
3252
|
children: _
|
|
3242
3253
|
}), /* @__PURE__ */ a(h, { className: "h-4 w-4 shrink-0 opacity-50 ltr:ml-2 rtl:mr-2" })]
|
|
3243
3254
|
})
|
|
3244
|
-
}), /* @__PURE__ */ o(
|
|
3255
|
+
}), /* @__PURE__ */ o(Lt, {
|
|
3245
3256
|
className: "w-[--radix-popover-trigger-width] p-0",
|
|
3246
3257
|
align: "start",
|
|
3247
3258
|
dir: "rtl",
|
|
3248
|
-
children: [/* @__PURE__ */ a(
|
|
3259
|
+
children: [/* @__PURE__ */ a(In, {
|
|
3249
3260
|
columnsNames: d,
|
|
3250
3261
|
onSearch: f
|
|
3251
|
-
}), /* @__PURE__ */ a(
|
|
3262
|
+
}), /* @__PURE__ */ a(Gi, {
|
|
3252
3263
|
shouldFilter: !1,
|
|
3253
|
-
children: /* @__PURE__ */ a(
|
|
3264
|
+
children: /* @__PURE__ */ a(Ji, {
|
|
3254
3265
|
className: "max-h-50 overflow-y-auto overflow-x-hidden",
|
|
3255
|
-
children: e.length === 0 ? /* @__PURE__ */ a(
|
|
3266
|
+
children: e.length === 0 ? /* @__PURE__ */ a(Yi, {
|
|
3256
3267
|
className: "py-6 text-center text-sm text-muted-foreground",
|
|
3257
3268
|
children: "لا توجد بيانات"
|
|
3258
|
-
}) : /* @__PURE__ */ a(
|
|
3269
|
+
}) : /* @__PURE__ */ a(Xi, { children: e.map((e) => {
|
|
3259
3270
|
let c = String(e[n]), l = String(e[t]);
|
|
3260
|
-
return /* @__PURE__ */ o(
|
|
3271
|
+
return /* @__PURE__ */ o(Qi, {
|
|
3261
3272
|
value: c,
|
|
3262
3273
|
onSelect: () => {
|
|
3263
3274
|
i(c), m(!1);
|
|
@@ -3273,43 +3284,43 @@ function $i({ items: e, itemLabelKey: t, itemValueKey: n, value: r, onValueChang
|
|
|
3273
3284
|
}
|
|
3274
3285
|
//#endregion
|
|
3275
3286
|
//#region src/components/pure/avatar.tsx
|
|
3276
|
-
function
|
|
3277
|
-
return /* @__PURE__ */ a(
|
|
3287
|
+
function ta({ className: e, size: t = "default", ...n }) {
|
|
3288
|
+
return /* @__PURE__ */ a(We.Root, {
|
|
3278
3289
|
"data-slot": "avatar",
|
|
3279
3290
|
"data-size": t,
|
|
3280
3291
|
className: P("size-8 rounded-full after:rounded-full data-[size=lg]:size-10 data-[size=sm]:size-6 after:border-border group/avatar relative flex shrink-0 select-none after:absolute after:inset-0 after:border after:mix-blend-darken dark:after:mix-blend-lighten", e),
|
|
3281
3292
|
...n
|
|
3282
3293
|
});
|
|
3283
3294
|
}
|
|
3284
|
-
function
|
|
3285
|
-
return console.log(t), /* @__PURE__ */ a(
|
|
3295
|
+
function na({ className: e, ...t }) {
|
|
3296
|
+
return console.log(t), /* @__PURE__ */ a(We.Image, {
|
|
3286
3297
|
"data-slot": "avatar-image",
|
|
3287
3298
|
className: P("rounded-full aspect-square size-full object-cover", e),
|
|
3288
3299
|
...t
|
|
3289
3300
|
});
|
|
3290
3301
|
}
|
|
3291
|
-
function
|
|
3292
|
-
return /* @__PURE__ */ a(
|
|
3302
|
+
function ra({ className: e, ...t }) {
|
|
3303
|
+
return /* @__PURE__ */ a(We.Fallback, {
|
|
3293
3304
|
"data-slot": "avatar-fallback",
|
|
3294
3305
|
className: P("bg-muted text-muted-foreground rounded-full flex size-full items-center justify-center text-sm group-data-[size=sm]/avatar:text-xs", e),
|
|
3295
3306
|
...t
|
|
3296
3307
|
});
|
|
3297
3308
|
}
|
|
3298
|
-
function
|
|
3309
|
+
function ia({ className: e, ...t }) {
|
|
3299
3310
|
return /* @__PURE__ */ a("span", {
|
|
3300
3311
|
"data-slot": "avatar-badge",
|
|
3301
3312
|
className: P("bg-primary text-primary-foreground ring-background absolute end-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-blend-color ring-2 select-none", "group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden", "group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2", "group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2", e),
|
|
3302
3313
|
...t
|
|
3303
3314
|
});
|
|
3304
3315
|
}
|
|
3305
|
-
function
|
|
3316
|
+
function aa({ className: e, ...t }) {
|
|
3306
3317
|
return /* @__PURE__ */ a("div", {
|
|
3307
3318
|
"data-slot": "avatar-group",
|
|
3308
3319
|
className: P("*:data-[slot=avatar]:ring-background group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2", e),
|
|
3309
3320
|
...t
|
|
3310
3321
|
});
|
|
3311
3322
|
}
|
|
3312
|
-
function
|
|
3323
|
+
function oa({ className: e, ...t }) {
|
|
3313
3324
|
return /* @__PURE__ */ a("div", {
|
|
3314
3325
|
"data-slot": "avatar-group-count",
|
|
3315
3326
|
className: P("bg-muted text-muted-foreground size-8 rounded-full text-sm group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3 ring-background relative flex shrink-0 items-center justify-center ring-2", e),
|
|
@@ -3318,16 +3329,16 @@ function aa({ className: e, ...t }) {
|
|
|
3318
3329
|
}
|
|
3319
3330
|
//#endregion
|
|
3320
3331
|
//#region src/components/custom/sideBar/sideBarCompanyData.tsx
|
|
3321
|
-
function
|
|
3332
|
+
function sa({ company: e }) {
|
|
3322
3333
|
return /* @__PURE__ */ a(H, { children: /* @__PURE__ */ a(U, { children: /* @__PURE__ */ o(W, {
|
|
3323
3334
|
size: "lg",
|
|
3324
3335
|
className: "data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground",
|
|
3325
|
-
children: [/* @__PURE__ */ o(
|
|
3336
|
+
children: [/* @__PURE__ */ o(ta, {
|
|
3326
3337
|
className: "h-8 w-8 rounded-lg grayscale",
|
|
3327
|
-
children: [/* @__PURE__ */ a(
|
|
3338
|
+
children: [/* @__PURE__ */ a(na, {
|
|
3328
3339
|
src: e.logo,
|
|
3329
3340
|
alt: e.name
|
|
3330
|
-
}), /* @__PURE__ */ a(
|
|
3341
|
+
}), /* @__PURE__ */ a(ra, {
|
|
3331
3342
|
className: "rounded-lg",
|
|
3332
3343
|
children: "YSR"
|
|
3333
3344
|
})]
|
|
@@ -3342,7 +3353,7 @@ function oa({ company: e }) {
|
|
|
3342
3353
|
}
|
|
3343
3354
|
//#endregion
|
|
3344
3355
|
//#region src/components/custom/sideBar/sidebarLogo.tsx
|
|
3345
|
-
function
|
|
3356
|
+
function ca({ logos: e, alt: t = "Logo" }) {
|
|
3346
3357
|
let { state: n } = V(), r = n === "collapsed";
|
|
3347
3358
|
return /* @__PURE__ */ o("div", {
|
|
3348
3359
|
className: `
|
|
@@ -3362,38 +3373,38 @@ function sa({ logos: e, alt: t = "Logo" }) {
|
|
|
3362
3373
|
}
|
|
3363
3374
|
//#endregion
|
|
3364
3375
|
//#region src/components/pure/collapsible.tsx
|
|
3365
|
-
function
|
|
3366
|
-
return /* @__PURE__ */ a(
|
|
3376
|
+
function la({ ...e }) {
|
|
3377
|
+
return /* @__PURE__ */ a(Ke.Root, {
|
|
3367
3378
|
"data-slot": "collapsible",
|
|
3368
3379
|
...e
|
|
3369
3380
|
});
|
|
3370
3381
|
}
|
|
3371
|
-
function
|
|
3372
|
-
return /* @__PURE__ */ a(
|
|
3382
|
+
function ua({ ...e }) {
|
|
3383
|
+
return /* @__PURE__ */ a(Ke.CollapsibleTrigger, {
|
|
3373
3384
|
"data-slot": "collapsible-trigger",
|
|
3374
3385
|
...e
|
|
3375
3386
|
});
|
|
3376
3387
|
}
|
|
3377
|
-
function
|
|
3378
|
-
return /* @__PURE__ */ a(
|
|
3388
|
+
function da({ ...e }) {
|
|
3389
|
+
return /* @__PURE__ */ a(Ke.CollapsibleContent, {
|
|
3379
3390
|
"data-slot": "collapsible-content",
|
|
3380
3391
|
...e
|
|
3381
3392
|
});
|
|
3382
3393
|
}
|
|
3383
3394
|
//#endregion
|
|
3384
3395
|
//#region src/components/custom/sideBar/sideBarMainMenu.tsx
|
|
3385
|
-
function
|
|
3386
|
-
return /* @__PURE__ */ a(
|
|
3396
|
+
function fa({ items: t }) {
|
|
3397
|
+
return /* @__PURE__ */ a(Ci, {
|
|
3387
3398
|
className: "mt-5",
|
|
3388
|
-
children: /* @__PURE__ */ a(
|
|
3399
|
+
children: /* @__PURE__ */ a(Ei, { children: /* @__PURE__ */ a(H, { children: t.map((t) => {
|
|
3389
3400
|
if (!t.hasAuth) return null;
|
|
3390
3401
|
if (t.subItems && t.subItems.length > 0) {
|
|
3391
3402
|
let n = t.subItems.filter((e) => e.hasAuth);
|
|
3392
|
-
return n.length === 0 ? null : /* @__PURE__ */ a(
|
|
3403
|
+
return n.length === 0 ? null : /* @__PURE__ */ o(De, { children: [/* @__PURE__ */ a(la, {
|
|
3393
3404
|
asChild: !0,
|
|
3394
3405
|
defaultOpen: !1,
|
|
3395
3406
|
className: "group/collapsible",
|
|
3396
|
-
children: /* @__PURE__ */ o(U, { children: [/* @__PURE__ */ a(
|
|
3407
|
+
children: /* @__PURE__ */ o(U, { children: [/* @__PURE__ */ a(ua, {
|
|
3397
3408
|
asChild: !0,
|
|
3398
3409
|
children: /* @__PURE__ */ o(W, {
|
|
3399
3410
|
tooltip: t.title,
|
|
@@ -3409,16 +3420,22 @@ function da({ items: t }) {
|
|
|
3409
3420
|
})]
|
|
3410
3421
|
}), /* @__PURE__ */ a(u, { className: "mr-auto transition-transform duration-200 group-data-[state=open]/collapsible:-rotate-90" })]
|
|
3411
3422
|
})
|
|
3412
|
-
}), /* @__PURE__ */ a(
|
|
3423
|
+
}), /* @__PURE__ */ a(da, { children: /* @__PURE__ */ a(ji, { children: n.map((t) => /* @__PURE__ */ o(De, { children: [/* @__PURE__ */ a(Mi, { children: /* @__PURE__ */ a(Ni, {
|
|
3413
3424
|
asChild: !0,
|
|
3414
3425
|
children: /* @__PURE__ */ a(e, {
|
|
3415
3426
|
to: t.url,
|
|
3416
3427
|
children: /* @__PURE__ */ a("span", { children: t.title })
|
|
3417
3428
|
})
|
|
3418
|
-
}) }, t.
|
|
3419
|
-
|
|
3429
|
+
}) }), t.hasSeparator && /* @__PURE__ */ a("li", {
|
|
3430
|
+
className: "h-px bg-border my-1",
|
|
3431
|
+
"aria-hidden": "true"
|
|
3432
|
+
})] }, t.title)) }) })] })
|
|
3433
|
+
}), t.hasSeparator && /* @__PURE__ */ a("li", {
|
|
3434
|
+
className: "h-px bg-border my-2",
|
|
3435
|
+
"aria-hidden": "true"
|
|
3436
|
+
})] }, t.title);
|
|
3420
3437
|
}
|
|
3421
|
-
return /* @__PURE__ */ a(U, { children: /* @__PURE__ */ a(W, {
|
|
3438
|
+
return /* @__PURE__ */ o(De, { children: [/* @__PURE__ */ a(U, { children: /* @__PURE__ */ a(W, {
|
|
3422
3439
|
asChild: !0,
|
|
3423
3440
|
tooltip: t.title,
|
|
3424
3441
|
children: /* @__PURE__ */ o(e, {
|
|
@@ -3432,23 +3449,26 @@ function da({ items: t }) {
|
|
|
3432
3449
|
children: t.title
|
|
3433
3450
|
})]
|
|
3434
3451
|
})
|
|
3435
|
-
}) }, t.
|
|
3452
|
+
}) }), t.hasSeparator && /* @__PURE__ */ a("li", {
|
|
3453
|
+
className: "h-px bg-border my-2",
|
|
3454
|
+
"aria-hidden": "true"
|
|
3455
|
+
})] }, t.title);
|
|
3436
3456
|
}) }) })
|
|
3437
3457
|
});
|
|
3438
3458
|
}
|
|
3439
3459
|
//#endregion
|
|
3440
3460
|
//#region src/components/custom/theme/themeProvider.tsx
|
|
3441
|
-
var
|
|
3461
|
+
var pa = Oe({
|
|
3442
3462
|
theme: "system",
|
|
3443
3463
|
setTheme: () => null
|
|
3444
3464
|
});
|
|
3445
|
-
function
|
|
3465
|
+
function ma({ children: e, defaultTheme: t = "system", storageKey: n = "yusr-theme", ...r }) {
|
|
3446
3466
|
let [i, o] = x(t), [s, c] = x(!1);
|
|
3447
|
-
|
|
3467
|
+
Ae(() => {
|
|
3448
3468
|
c(!0);
|
|
3449
3469
|
let e = localStorage.getItem(n);
|
|
3450
3470
|
e && o(e);
|
|
3451
|
-
}, [n]),
|
|
3471
|
+
}, [n]), Ae(() => {
|
|
3452
3472
|
if (!s) return;
|
|
3453
3473
|
let e = window.document.documentElement;
|
|
3454
3474
|
if (e.classList.remove("light", "dark"), i === "system") {
|
|
@@ -3464,24 +3484,24 @@ function pa({ children: e, defaultTheme: t = "system", storageKey: n = "yusr-the
|
|
|
3464
3484
|
localStorage.setItem(n, e), o(e);
|
|
3465
3485
|
}
|
|
3466
3486
|
};
|
|
3467
|
-
return /* @__PURE__ */ a(
|
|
3487
|
+
return /* @__PURE__ */ a(pa.Provider, {
|
|
3468
3488
|
...r,
|
|
3469
3489
|
value: l,
|
|
3470
3490
|
children: e
|
|
3471
3491
|
});
|
|
3472
3492
|
}
|
|
3473
|
-
var
|
|
3474
|
-
let e =
|
|
3493
|
+
var ha = () => {
|
|
3494
|
+
let e = ke(pa);
|
|
3475
3495
|
if (e === void 0) throw Error("useTheme must be used within a ThemeProvider");
|
|
3476
3496
|
return e;
|
|
3477
3497
|
};
|
|
3478
3498
|
//#endregion
|
|
3479
3499
|
//#region src/components/custom/theme/themeToggle.tsx
|
|
3480
|
-
function
|
|
3481
|
-
let { setTheme: t } =
|
|
3482
|
-
return /* @__PURE__ */ o(
|
|
3500
|
+
function ga({ variant: e = "icon" }) {
|
|
3501
|
+
let { setTheme: t } = ha();
|
|
3502
|
+
return /* @__PURE__ */ o(kr, {
|
|
3483
3503
|
dir: "rtl",
|
|
3484
|
-
children: [/* @__PURE__ */ a(
|
|
3504
|
+
children: [/* @__PURE__ */ a(jr, {
|
|
3485
3505
|
asChild: !0,
|
|
3486
3506
|
children: e === "sidebar" ? /* @__PURE__ */ o(W, {
|
|
3487
3507
|
className: "w-full justify-start gap-3 px-3",
|
|
@@ -3505,7 +3525,7 @@ function ha({ variant: e = "icon" }) {
|
|
|
3505
3525
|
})
|
|
3506
3526
|
]
|
|
3507
3527
|
})
|
|
3508
|
-
}), /* @__PURE__ */ o(
|
|
3528
|
+
}), /* @__PURE__ */ o(Mr, {
|
|
3509
3529
|
align: "end",
|
|
3510
3530
|
children: [
|
|
3511
3531
|
/* @__PURE__ */ a(B, {
|
|
@@ -3526,10 +3546,10 @@ function ha({ variant: e = "icon" }) {
|
|
|
3526
3546
|
}
|
|
3527
3547
|
//#endregion
|
|
3528
3548
|
//#region src/components/custom/sideBar/sideBarSecondaryMenu.tsx
|
|
3529
|
-
function
|
|
3530
|
-
return /* @__PURE__ */ a(
|
|
3549
|
+
function _a({ items: e, onLogout: t, LinkComponent: n = "a", ...r }) {
|
|
3550
|
+
return /* @__PURE__ */ a(Ci, {
|
|
3531
3551
|
...r,
|
|
3532
|
-
children: /* @__PURE__ */ a(
|
|
3552
|
+
children: /* @__PURE__ */ a(Ei, { children: /* @__PURE__ */ o(H, { children: [
|
|
3533
3553
|
e.map((e) => /* @__PURE__ */ a(U, { children: /* @__PURE__ */ a(W, {
|
|
3534
3554
|
asChild: !0,
|
|
3535
3555
|
children: /* @__PURE__ */ o(n, {
|
|
@@ -3544,7 +3564,7 @@ function ga({ items: e, onLogout: t, LinkComponent: n = "a", ...r }) {
|
|
|
3544
3564
|
})]
|
|
3545
3565
|
})
|
|
3546
3566
|
}) }, e.title)),
|
|
3547
|
-
/* @__PURE__ */ a(U, { children: /* @__PURE__ */ a(
|
|
3567
|
+
/* @__PURE__ */ a(U, { children: /* @__PURE__ */ a(ga, { variant: "sidebar" }) }),
|
|
3548
3568
|
/* @__PURE__ */ a(U, { children: /* @__PURE__ */ a(W, {
|
|
3549
3569
|
asChild: !0,
|
|
3550
3570
|
onClick: t,
|
|
@@ -3564,16 +3584,16 @@ function ga({ items: e, onLogout: t, LinkComponent: n = "a", ...r }) {
|
|
|
3564
3584
|
}
|
|
3565
3585
|
//#endregion
|
|
3566
3586
|
//#region src/components/custom/sideBar/sideBarUserData.tsx
|
|
3567
|
-
function
|
|
3587
|
+
function va({ user: e }) {
|
|
3568
3588
|
return /* @__PURE__ */ a(H, { children: /* @__PURE__ */ a(U, { children: /* @__PURE__ */ o(W, {
|
|
3569
3589
|
size: "lg",
|
|
3570
3590
|
className: "data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground",
|
|
3571
|
-
children: [/* @__PURE__ */ o(
|
|
3591
|
+
children: [/* @__PURE__ */ o(ta, {
|
|
3572
3592
|
className: "h-8 w-8 rounded-lg grayscale",
|
|
3573
|
-
children: [/* @__PURE__ */ a(
|
|
3593
|
+
children: [/* @__PURE__ */ a(na, {
|
|
3574
3594
|
src: "/avatars/shadcn.jpg",
|
|
3575
3595
|
alt: e?.username
|
|
3576
|
-
}), /* @__PURE__ */ a(
|
|
3596
|
+
}), /* @__PURE__ */ a(ra, {
|
|
3577
3597
|
className: "rounded-lg",
|
|
3578
3598
|
children: "YSR"
|
|
3579
3599
|
})]
|
|
@@ -3588,18 +3608,18 @@ function _a({ user: e }) {
|
|
|
3588
3608
|
}
|
|
3589
3609
|
//#endregion
|
|
3590
3610
|
//#region src/components/custom/sideBar/yusrSideBarMainMenu.tsx
|
|
3591
|
-
function
|
|
3592
|
-
return /* @__PURE__ */ a(
|
|
3611
|
+
function ya({ items: e, LinkComponent: t = "a" }) {
|
|
3612
|
+
return /* @__PURE__ */ a(Ci, {
|
|
3593
3613
|
className: "mt-5",
|
|
3594
|
-
children: /* @__PURE__ */ a(
|
|
3614
|
+
children: /* @__PURE__ */ a(Ei, { children: /* @__PURE__ */ a(H, { children: e.map((e) => {
|
|
3595
3615
|
if (!e.hasAuth) return null;
|
|
3596
3616
|
if (e.subItems && e.subItems.length > 0) {
|
|
3597
3617
|
let n = e.subItems.filter((e) => e.hasAuth);
|
|
3598
|
-
return n.length === 0 ? null : /* @__PURE__ */ a(
|
|
3618
|
+
return n.length === 0 ? null : /* @__PURE__ */ a(la, {
|
|
3599
3619
|
asChild: !0,
|
|
3600
3620
|
defaultOpen: !1,
|
|
3601
3621
|
className: "group/collapsible",
|
|
3602
|
-
children: /* @__PURE__ */ o(U, { children: [/* @__PURE__ */ a(
|
|
3622
|
+
children: /* @__PURE__ */ o(U, { children: [/* @__PURE__ */ a(ua, {
|
|
3603
3623
|
asChild: !0,
|
|
3604
3624
|
children: /* @__PURE__ */ o(W, {
|
|
3605
3625
|
tooltip: e.title,
|
|
@@ -3615,7 +3635,7 @@ function va({ items: e, LinkComponent: t = "a" }) {
|
|
|
3615
3635
|
})]
|
|
3616
3636
|
}), /* @__PURE__ */ a(f, { className: "ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90" })]
|
|
3617
3637
|
})
|
|
3618
|
-
}), /* @__PURE__ */ a(
|
|
3638
|
+
}), /* @__PURE__ */ a(da, { children: /* @__PURE__ */ a(ji, { children: n.map((e) => /* @__PURE__ */ a(Mi, { children: /* @__PURE__ */ a(Ni, {
|
|
3619
3639
|
asChild: !0,
|
|
3620
3640
|
children: /* @__PURE__ */ a(t, {
|
|
3621
3641
|
href: e.url,
|
|
@@ -3644,18 +3664,18 @@ function va({ items: e, LinkComponent: t = "a" }) {
|
|
|
3644
3664
|
}
|
|
3645
3665
|
//#endregion
|
|
3646
3666
|
//#region src/hooks/useSidebarContext.tsx
|
|
3647
|
-
var
|
|
3648
|
-
let e =
|
|
3667
|
+
var ba = Oe(null), xa = () => {
|
|
3668
|
+
let e = ke(ba);
|
|
3649
3669
|
if (!e) throw Error("useSidebarContext must be used within a SidebarProvider");
|
|
3650
3670
|
return e;
|
|
3651
3671
|
};
|
|
3652
3672
|
//#endregion
|
|
3653
3673
|
//#region src/components/custom/sideBar/yusrSideBar.tsx
|
|
3654
|
-
function
|
|
3674
|
+
function Sa({ LinkComponent: e = "a", logos: t, displayCompany: n = {
|
|
3655
3675
|
name: "Yusr UI",
|
|
3656
3676
|
logo: "/yusr-logo.png"
|
|
3657
3677
|
}, navMain: r, navSecondary: i, children: o, ...s }) {
|
|
3658
|
-
return /* @__PURE__ */ a(
|
|
3678
|
+
return /* @__PURE__ */ a(ba.Provider, {
|
|
3659
3679
|
value: {
|
|
3660
3680
|
LinkComponent: e,
|
|
3661
3681
|
logos: t,
|
|
@@ -3663,7 +3683,7 @@ function xa({ LinkComponent: e = "a", logos: t, displayCompany: n = {
|
|
|
3663
3683
|
navMain: r,
|
|
3664
3684
|
navSecondary: i
|
|
3665
3685
|
},
|
|
3666
|
-
children: /* @__PURE__ */ a(
|
|
3686
|
+
children: /* @__PURE__ */ a(pi, { children: /* @__PURE__ */ a(mi, {
|
|
3667
3687
|
collapsible: "icon",
|
|
3668
3688
|
side: "right",
|
|
3669
3689
|
...s,
|
|
@@ -3671,9 +3691,9 @@ function xa({ LinkComponent: e = "a", logos: t, displayCompany: n = {
|
|
|
3671
3691
|
}) })
|
|
3672
3692
|
});
|
|
3673
3693
|
}
|
|
3674
|
-
|
|
3675
|
-
let { displayCompany: e, logos: t } =
|
|
3676
|
-
return /* @__PURE__ */ a(
|
|
3694
|
+
Sa.Header = function() {
|
|
3695
|
+
let { displayCompany: e, logos: t } = xa();
|
|
3696
|
+
return /* @__PURE__ */ a(yi, { children: /* @__PURE__ */ a(H, { children: /* @__PURE__ */ o(U, { children: [/* @__PURE__ */ a(ca, { logos: {
|
|
3677
3697
|
full: {
|
|
3678
3698
|
light: t.logoFullLight,
|
|
3679
3699
|
dark: t.logoFullDark
|
|
@@ -3682,24 +3702,24 @@ xa.Header = function() {
|
|
|
3682
3702
|
light: t.logoOnlyLight,
|
|
3683
3703
|
dark: t.logoOnlyDark
|
|
3684
3704
|
}
|
|
3685
|
-
} }), e && /* @__PURE__ */ a(
|
|
3686
|
-
},
|
|
3687
|
-
let { navMain: t, navSecondary: n, LinkComponent: r } =
|
|
3688
|
-
return !t || !n ? /* @__PURE__ */ a(
|
|
3705
|
+
} }), e && /* @__PURE__ */ a(sa, { company: e })] }) }) });
|
|
3706
|
+
}, Sa.Content = function({ LogoutHandler: e }) {
|
|
3707
|
+
let { navMain: t, navSecondary: n, LinkComponent: r } = xa();
|
|
3708
|
+
return !t || !n ? /* @__PURE__ */ a(Si, {}) : /* @__PURE__ */ o(Si, { children: [/* @__PURE__ */ a(ya, {
|
|
3689
3709
|
items: t,
|
|
3690
3710
|
LinkComponent: r
|
|
3691
|
-
}), e !== void 0 && /* @__PURE__ */ a(
|
|
3711
|
+
}), e !== void 0 && /* @__PURE__ */ a(_a, {
|
|
3692
3712
|
items: n,
|
|
3693
3713
|
className: "pt-10 mt-auto text-center",
|
|
3694
3714
|
onLogout: e,
|
|
3695
3715
|
LinkComponent: r
|
|
3696
3716
|
})] });
|
|
3697
|
-
},
|
|
3698
|
-
return /* @__PURE__ */ a(
|
|
3717
|
+
}, Sa.Footer = function({ loggedInUser: e = void 0 }) {
|
|
3718
|
+
return /* @__PURE__ */ a(bi, { children: /* @__PURE__ */ a(va, { user: e }) });
|
|
3699
3719
|
};
|
|
3700
3720
|
//#endregion
|
|
3701
3721
|
//#region src/components/custom/status/loading.tsx
|
|
3702
|
-
function
|
|
3722
|
+
function Ca({ entityName: e }) {
|
|
3703
3723
|
return /* @__PURE__ */ o("div", {
|
|
3704
3724
|
className: "sm:max-w-xl flex flex-col items-center justify-center py-20",
|
|
3705
3725
|
children: [/* @__PURE__ */ a(re, { className: "h-10 w-10 animate-spin text-primary" }), /* @__PURE__ */ o("p", {
|
|
@@ -3714,75 +3734,75 @@ function Sa({ entityName: e }) {
|
|
|
3714
3734
|
}
|
|
3715
3735
|
//#endregion
|
|
3716
3736
|
//#region src/components/pure/alert-dialog.tsx
|
|
3717
|
-
function
|
|
3737
|
+
function wa({ ...e }) {
|
|
3718
3738
|
return /* @__PURE__ */ a(A.Root, {
|
|
3719
3739
|
"data-slot": "alert-dialog",
|
|
3720
3740
|
...e
|
|
3721
3741
|
});
|
|
3722
3742
|
}
|
|
3723
|
-
function
|
|
3743
|
+
function Ta({ ...e }) {
|
|
3724
3744
|
return /* @__PURE__ */ a(A.Trigger, {
|
|
3725
3745
|
"data-slot": "alert-dialog-trigger",
|
|
3726
3746
|
...e
|
|
3727
3747
|
});
|
|
3728
3748
|
}
|
|
3729
|
-
function
|
|
3749
|
+
function Ea({ ...e }) {
|
|
3730
3750
|
return /* @__PURE__ */ a(A.Portal, {
|
|
3731
3751
|
"data-slot": "alert-dialog-portal",
|
|
3732
3752
|
...e
|
|
3733
3753
|
});
|
|
3734
3754
|
}
|
|
3735
|
-
function
|
|
3755
|
+
function Da({ className: e, ...t }) {
|
|
3736
3756
|
return /* @__PURE__ */ a(A.Overlay, {
|
|
3737
3757
|
"data-slot": "alert-dialog-overlay",
|
|
3738
3758
|
className: P("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 z-50", e),
|
|
3739
3759
|
...t
|
|
3740
3760
|
});
|
|
3741
3761
|
}
|
|
3742
|
-
function
|
|
3743
|
-
return /* @__PURE__ */ o(
|
|
3762
|
+
function Oa({ className: e, size: t = "default", ...n }) {
|
|
3763
|
+
return /* @__PURE__ */ o(Ea, { children: [/* @__PURE__ */ a(Da, {}), /* @__PURE__ */ a(A.Content, {
|
|
3744
3764
|
"data-slot": "alert-dialog-content",
|
|
3745
3765
|
"data-size": t,
|
|
3746
3766
|
className: P("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 bg-background ring-foreground/10 gap-4 rounded-xl p-4 ring-1 duration-100 data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm group/alert-dialog-content fixed top-1/2 start-1/2 z-50 grid w-full -translate-x-1/2 rtl:translate-x-1/2 -translate-y-1/2 outline-none", e),
|
|
3747
3767
|
...n
|
|
3748
3768
|
})] });
|
|
3749
3769
|
}
|
|
3750
|
-
function
|
|
3770
|
+
function ka({ className: e, ...t }) {
|
|
3751
3771
|
return /* @__PURE__ */ a("div", {
|
|
3752
3772
|
"data-slot": "alert-dialog-header",
|
|
3753
3773
|
className: P("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-start sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]", e),
|
|
3754
3774
|
...t
|
|
3755
3775
|
});
|
|
3756
3776
|
}
|
|
3757
|
-
function
|
|
3777
|
+
function Aa({ className: e, ...t }) {
|
|
3758
3778
|
return /* @__PURE__ */ a("div", {
|
|
3759
3779
|
"data-slot": "alert-dialog-footer",
|
|
3760
3780
|
className: P("bg-muted/50 -mx-4 -mb-4 rounded-b-xl border-t p-4 flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end", e),
|
|
3761
3781
|
...t
|
|
3762
3782
|
});
|
|
3763
3783
|
}
|
|
3764
|
-
function
|
|
3784
|
+
function ja({ className: e, ...t }) {
|
|
3765
3785
|
return /* @__PURE__ */ a("div", {
|
|
3766
3786
|
"data-slot": "alert-dialog-media",
|
|
3767
3787
|
className: P("bg-muted mb-2 inline-flex size-10 items-center justify-center rounded-md sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6", e),
|
|
3768
3788
|
...t
|
|
3769
3789
|
});
|
|
3770
3790
|
}
|
|
3771
|
-
function
|
|
3791
|
+
function Ma({ className: e, ...t }) {
|
|
3772
3792
|
return /* @__PURE__ */ a(A.Title, {
|
|
3773
3793
|
"data-slot": "alert-dialog-title",
|
|
3774
3794
|
className: P("text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2", e),
|
|
3775
3795
|
...t
|
|
3776
3796
|
});
|
|
3777
3797
|
}
|
|
3778
|
-
function
|
|
3798
|
+
function Na({ className: e, ...t }) {
|
|
3779
3799
|
return /* @__PURE__ */ a(A.Description, {
|
|
3780
3800
|
"data-slot": "alert-dialog-description",
|
|
3781
3801
|
className: P("text-muted-foreground *:[a]:hover:text-foreground text-sm text-balance md:text-pretty *:[a]:underline *:[a]:underline-offset-3", e),
|
|
3782
3802
|
...t
|
|
3783
3803
|
});
|
|
3784
3804
|
}
|
|
3785
|
-
function
|
|
3805
|
+
function Pa({ className: e, variant: t = "default", size: n = "default", ...r }) {
|
|
3786
3806
|
return /* @__PURE__ */ a(F, {
|
|
3787
3807
|
variant: t,
|
|
3788
3808
|
size: n,
|
|
@@ -3794,7 +3814,7 @@ function Na({ className: e, variant: t = "default", size: n = "default", ...r })
|
|
|
3794
3814
|
})
|
|
3795
3815
|
});
|
|
3796
3816
|
}
|
|
3797
|
-
function
|
|
3817
|
+
function Fa({ className: e, variant: t = "outline", size: n = "default", ...r }) {
|
|
3798
3818
|
return /* @__PURE__ */ a(F, {
|
|
3799
3819
|
variant: t,
|
|
3800
3820
|
size: n,
|
|
@@ -3808,36 +3828,36 @@ function Pa({ className: e, variant: t = "outline", size: n = "default", ...r })
|
|
|
3808
3828
|
}
|
|
3809
3829
|
//#endregion
|
|
3810
3830
|
//#region src/components/pure/alert.tsx
|
|
3811
|
-
var
|
|
3831
|
+
var Ia = S("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-start text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pe-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4", {
|
|
3812
3832
|
variants: { variant: {
|
|
3813
3833
|
default: "bg-card text-card-foreground",
|
|
3814
3834
|
destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"
|
|
3815
3835
|
} },
|
|
3816
3836
|
defaultVariants: { variant: "default" }
|
|
3817
3837
|
});
|
|
3818
|
-
function
|
|
3838
|
+
function La({ className: e, variant: t, ...n }) {
|
|
3819
3839
|
return /* @__PURE__ */ a("div", {
|
|
3820
3840
|
"data-slot": "alert",
|
|
3821
3841
|
role: "alert",
|
|
3822
|
-
className: P(
|
|
3842
|
+
className: P(Ia({ variant: t }), e),
|
|
3823
3843
|
...n
|
|
3824
3844
|
});
|
|
3825
3845
|
}
|
|
3826
|
-
function
|
|
3846
|
+
function Ra({ className: e, ...t }) {
|
|
3827
3847
|
return /* @__PURE__ */ a("div", {
|
|
3828
3848
|
"data-slot": "alert-title",
|
|
3829
3849
|
className: P("font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground", e),
|
|
3830
3850
|
...t
|
|
3831
3851
|
});
|
|
3832
3852
|
}
|
|
3833
|
-
function
|
|
3853
|
+
function za({ className: e, ...t }) {
|
|
3834
3854
|
return /* @__PURE__ */ a("div", {
|
|
3835
3855
|
"data-slot": "alert-description",
|
|
3836
3856
|
className: P("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4", e),
|
|
3837
3857
|
...t
|
|
3838
3858
|
});
|
|
3839
3859
|
}
|
|
3840
|
-
function
|
|
3860
|
+
function Ba({ className: e, ...t }) {
|
|
3841
3861
|
return /* @__PURE__ */ a("div", {
|
|
3842
3862
|
"data-slot": "alert-action",
|
|
3843
3863
|
className: P("absolute top-2 end-2", e),
|
|
@@ -3846,7 +3866,7 @@ function za({ className: e, ...t }) {
|
|
|
3846
3866
|
}
|
|
3847
3867
|
//#endregion
|
|
3848
3868
|
//#region src/components/pure/badge.tsx
|
|
3849
|
-
var
|
|
3869
|
+
var Va = S("h-5 gap-1 rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium transition-all has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&>svg]:size-3! inline-flex items-center justify-center w-fit whitespace-nowrap shrink-0 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive overflow-hidden group/badge", {
|
|
3850
3870
|
variants: { variant: {
|
|
3851
3871
|
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
|
|
3852
3872
|
secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
|
|
@@ -3857,17 +3877,17 @@ var Ba = S("h-5 gap-1 rounded-4xl border border-transparent px-2 py-0.5 text-xs
|
|
|
3857
3877
|
} },
|
|
3858
3878
|
defaultVariants: { variant: "default" }
|
|
3859
3879
|
});
|
|
3860
|
-
function
|
|
3880
|
+
function Ha({ className: e, variant: t = "default", asChild: n = !1, ...r }) {
|
|
3861
3881
|
return /* @__PURE__ */ a(n ? C : "span", {
|
|
3862
3882
|
"data-slot": "badge",
|
|
3863
3883
|
"data-variant": t,
|
|
3864
|
-
className: P(
|
|
3884
|
+
className: P(Va({ variant: t }), e),
|
|
3865
3885
|
...r
|
|
3866
3886
|
});
|
|
3867
3887
|
}
|
|
3868
3888
|
//#endregion
|
|
3869
3889
|
//#region src/components/pure/breadcrumb.tsx
|
|
3870
|
-
function
|
|
3890
|
+
function Ua({ className: e, ...t }) {
|
|
3871
3891
|
return /* @__PURE__ */ a("nav", {
|
|
3872
3892
|
"aria-label": "breadcrumb",
|
|
3873
3893
|
"data-slot": "breadcrumb",
|
|
@@ -3875,28 +3895,28 @@ function Ha({ className: e, ...t }) {
|
|
|
3875
3895
|
...t
|
|
3876
3896
|
});
|
|
3877
3897
|
}
|
|
3878
|
-
function
|
|
3898
|
+
function Wa({ className: e, ...t }) {
|
|
3879
3899
|
return /* @__PURE__ */ a("ol", {
|
|
3880
3900
|
"data-slot": "breadcrumb-list",
|
|
3881
3901
|
className: P("text-muted-foreground gap-1.5 text-sm flex flex-wrap items-center wrap-break-word", e),
|
|
3882
3902
|
...t
|
|
3883
3903
|
});
|
|
3884
3904
|
}
|
|
3885
|
-
function
|
|
3905
|
+
function Ga({ className: e, ...t }) {
|
|
3886
3906
|
return /* @__PURE__ */ a("li", {
|
|
3887
3907
|
"data-slot": "breadcrumb-item",
|
|
3888
3908
|
className: P("gap-1 inline-flex items-center", e),
|
|
3889
3909
|
...t
|
|
3890
3910
|
});
|
|
3891
3911
|
}
|
|
3892
|
-
function
|
|
3912
|
+
function Ka({ asChild: e, className: t, ...n }) {
|
|
3893
3913
|
return /* @__PURE__ */ a(e ? C : "a", {
|
|
3894
3914
|
"data-slot": "breadcrumb-link",
|
|
3895
3915
|
className: P("hover:text-foreground transition-colors", t),
|
|
3896
3916
|
...n
|
|
3897
3917
|
});
|
|
3898
3918
|
}
|
|
3899
|
-
function
|
|
3919
|
+
function qa({ className: e, ...t }) {
|
|
3900
3920
|
return /* @__PURE__ */ a("span", {
|
|
3901
3921
|
"data-slot": "breadcrumb-page",
|
|
3902
3922
|
role: "link",
|
|
@@ -3906,7 +3926,7 @@ function Ka({ className: e, ...t }) {
|
|
|
3906
3926
|
...t
|
|
3907
3927
|
});
|
|
3908
3928
|
}
|
|
3909
|
-
function
|
|
3929
|
+
function Ja({ children: e, className: t, ...n }) {
|
|
3910
3930
|
return /* @__PURE__ */ a("li", {
|
|
3911
3931
|
"data-slot": "breadcrumb-separator",
|
|
3912
3932
|
role: "presentation",
|
|
@@ -3916,7 +3936,7 @@ function qa({ children: e, className: t, ...n }) {
|
|
|
3916
3936
|
children: e ?? /* @__PURE__ */ a(p, { className: "rtl:rotate-180" })
|
|
3917
3937
|
});
|
|
3918
3938
|
}
|
|
3919
|
-
function
|
|
3939
|
+
function Ya({ className: e, ...t }) {
|
|
3920
3940
|
return /* @__PURE__ */ o("span", {
|
|
3921
3941
|
"data-slot": "breadcrumb-ellipsis",
|
|
3922
3942
|
role: "presentation",
|
|
@@ -3931,34 +3951,34 @@ function Ja({ className: e, ...t }) {
|
|
|
3931
3951
|
}
|
|
3932
3952
|
//#endregion
|
|
3933
3953
|
//#region src/components/pure/chart.tsx
|
|
3934
|
-
var
|
|
3954
|
+
var Xa = {
|
|
3935
3955
|
light: "",
|
|
3936
3956
|
dark: ".dark"
|
|
3937
|
-
},
|
|
3938
|
-
function
|
|
3939
|
-
let e = y.useContext(
|
|
3957
|
+
}, Za = y.createContext(null);
|
|
3958
|
+
function Qa() {
|
|
3959
|
+
let e = y.useContext(Za);
|
|
3940
3960
|
if (!e) throw Error("useChart must be used within a <ChartContainer />");
|
|
3941
3961
|
return e;
|
|
3942
3962
|
}
|
|
3943
|
-
function
|
|
3963
|
+
function $a({ id: e, className: t, children: n, config: r, ...i }) {
|
|
3944
3964
|
let s = y.useId(), c = `chart-${e || s.replace(/:/g, "")}`;
|
|
3945
|
-
return /* @__PURE__ */ a(
|
|
3965
|
+
return /* @__PURE__ */ a(Za.Provider, {
|
|
3946
3966
|
value: { config: r },
|
|
3947
3967
|
children: /* @__PURE__ */ o("div", {
|
|
3948
3968
|
"data-slot": "chart",
|
|
3949
3969
|
"data-chart": c,
|
|
3950
3970
|
className: P("[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border[&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border[&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent[&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden", t),
|
|
3951
3971
|
...i,
|
|
3952
|
-
children: [/* @__PURE__ */ a(
|
|
3972
|
+
children: [/* @__PURE__ */ a(eo, {
|
|
3953
3973
|
id: c,
|
|
3954
3974
|
config: r
|
|
3955
|
-
}), /* @__PURE__ */ a(
|
|
3975
|
+
}), /* @__PURE__ */ a($e.ResponsiveContainer, { children: n })]
|
|
3956
3976
|
})
|
|
3957
3977
|
});
|
|
3958
3978
|
}
|
|
3959
|
-
var
|
|
3979
|
+
var eo = ({ id: e, config: t }) => {
|
|
3960
3980
|
let n = Object.entries(t).filter(([, e]) => e.theme || e.color);
|
|
3961
|
-
return n.length ? /* @__PURE__ */ a("style", { dangerouslySetInnerHTML: { __html: Object.entries(
|
|
3981
|
+
return n.length ? /* @__PURE__ */ a("style", { dangerouslySetInnerHTML: { __html: Object.entries(Xa).map(([t, r]) => `
|
|
3962
3982
|
${r} [data-chart=${e}] {
|
|
3963
3983
|
${n.map(([e, n]) => {
|
|
3964
3984
|
let r = n.theme?.[t] || n.color;
|
|
@@ -3966,11 +3986,11 @@ ${n.map(([e, n]) => {
|
|
|
3966
3986
|
}).join("\n")}
|
|
3967
3987
|
}
|
|
3968
3988
|
`).join("\n") } }) : null;
|
|
3969
|
-
},
|
|
3970
|
-
function
|
|
3971
|
-
let { config: g } =
|
|
3989
|
+
}, to = $e.Tooltip;
|
|
3990
|
+
function no({ active: e, payload: t, className: n, indicator: r = "dot", hideLabel: s = !1, hideIndicator: c = !1, label: l, labelFormatter: u, labelClassName: d, formatter: f, color: p, nameKey: m, labelKey: h }) {
|
|
3991
|
+
let { config: g } = Qa(), _ = y.useMemo(() => {
|
|
3972
3992
|
if (s || !t?.length) return null;
|
|
3973
|
-
let [e] = t, n =
|
|
3993
|
+
let [e] = t, n = ao(g, e, `${h || e?.dataKey || e?.name || "value"}`), r = !h && typeof l == "string" ? g[l]?.label || l : n?.label;
|
|
3974
3994
|
return u ? /* @__PURE__ */ a("div", {
|
|
3975
3995
|
className: P("font-medium", d),
|
|
3976
3996
|
children: u(r, t)
|
|
@@ -3994,7 +4014,7 @@ function to({ active: e, payload: t, className: n, indicator: r = "dot", hideLab
|
|
|
3994
4014
|
children: [v ? null : _, /* @__PURE__ */ a("div", {
|
|
3995
4015
|
className: "grid gap-1.5",
|
|
3996
4016
|
children: t.filter((e) => e.type !== "none").map((e, t) => {
|
|
3997
|
-
let n =
|
|
4017
|
+
let n = ao(g, e, `${m || e.name || e.dataKey || "value"}`), s = p || e.payload.fill || e.color;
|
|
3998
4018
|
return /* @__PURE__ */ a("div", {
|
|
3999
4019
|
className: P("[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5", r === "dot" && "items-center"),
|
|
4000
4020
|
children: f && e?.value !== void 0 && e.name ? f(e.value, e.name, e, t, e.payload) : /* @__PURE__ */ o(i, { children: [n?.icon ? /* @__PURE__ */ a(n.icon, {}) : !c && /* @__PURE__ */ a("div", {
|
|
@@ -4026,13 +4046,13 @@ function to({ active: e, payload: t, className: n, indicator: r = "dot", hideLab
|
|
|
4026
4046
|
})]
|
|
4027
4047
|
});
|
|
4028
4048
|
}
|
|
4029
|
-
var
|
|
4030
|
-
function
|
|
4031
|
-
let { config: s } =
|
|
4049
|
+
var ro = $e.Legend;
|
|
4050
|
+
function io({ className: e, hideIcon: t = !1, payload: n, verticalAlign: r = "bottom", nameKey: i }) {
|
|
4051
|
+
let { config: s } = Qa();
|
|
4032
4052
|
return n?.length ? /* @__PURE__ */ a("div", {
|
|
4033
4053
|
className: P("flex items-center justify-center gap-4", r === "top" ? "pb-3" : "pt-3", e),
|
|
4034
4054
|
children: n.filter((e) => e.type !== "none").map((e) => {
|
|
4035
|
-
let n =
|
|
4055
|
+
let n = ao(s, e, `${i || e.dataKey || "value"}`);
|
|
4036
4056
|
return /* @__PURE__ */ o("div", {
|
|
4037
4057
|
className: P("[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"),
|
|
4038
4058
|
children: [n?.icon && !t ? /* @__PURE__ */ a(n.icon, {}) : /* @__PURE__ */ a("div", {
|
|
@@ -4043,19 +4063,19 @@ function ro({ className: e, hideIcon: t = !1, payload: n, verticalAlign: r = "bo
|
|
|
4043
4063
|
})
|
|
4044
4064
|
}) : null;
|
|
4045
4065
|
}
|
|
4046
|
-
function
|
|
4066
|
+
function ao(e, t, n) {
|
|
4047
4067
|
if (typeof t != "object" || !t) return;
|
|
4048
4068
|
let r = "payload" in t && typeof t.payload == "object" && t.payload !== null ? t.payload : void 0, i = n;
|
|
4049
4069
|
return n in t && typeof t[n] == "string" ? i = t[n] : r && n in r && typeof r[n] == "string" && (i = r[n]), i in e ? e[i] : e[n];
|
|
4050
4070
|
}
|
|
4051
4071
|
//#endregion
|
|
4052
4072
|
//#region src/components/pure/checkbox.tsx
|
|
4053
|
-
function
|
|
4054
|
-
return /* @__PURE__ */ a(
|
|
4073
|
+
function oo({ className: e, ...t }) {
|
|
4074
|
+
return /* @__PURE__ */ a(Ge.Root, {
|
|
4055
4075
|
"data-slot": "checkbox",
|
|
4056
4076
|
className: P("border-input dark:bg-input/30 data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary data-checked:border-primary aria-invalid:aria-checked:border-primary aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 flex size-4 items-center justify-center rounded-[4px] border transition-colors group-has-disabled/field:opacity-50 focus-visible:ring-3 aria-invalid:ring-3 peer relative shrink-0 outline-none after:absolute after:-inset-x-3 after:-inset-y-2 disabled:cursor-not-allowed disabled:opacity-50", e),
|
|
4057
4077
|
...t,
|
|
4058
|
-
children: /* @__PURE__ */ a(
|
|
4078
|
+
children: /* @__PURE__ */ a(Ge.Indicator, {
|
|
4059
4079
|
"data-slot": "checkbox-indicator",
|
|
4060
4080
|
className: "[&>svg]:size-3.5 grid place-content-center text-current transition-none",
|
|
4061
4081
|
children: /* @__PURE__ */ a(c, {})
|
|
@@ -4064,14 +4084,14 @@ function ao({ className: e, ...t }) {
|
|
|
4064
4084
|
}
|
|
4065
4085
|
//#endregion
|
|
4066
4086
|
//#region src/components/pure/combobox.tsx
|
|
4067
|
-
var
|
|
4068
|
-
function
|
|
4087
|
+
var so = j.Root;
|
|
4088
|
+
function co({ ...e }) {
|
|
4069
4089
|
return /* @__PURE__ */ a(j.Value, {
|
|
4070
4090
|
"data-slot": "combobox-value",
|
|
4071
4091
|
...e
|
|
4072
4092
|
});
|
|
4073
4093
|
}
|
|
4074
|
-
function
|
|
4094
|
+
function lo({ className: e, children: t, ...n }) {
|
|
4075
4095
|
return /* @__PURE__ */ o(j.Trigger, {
|
|
4076
4096
|
"data-slot": "combobox-trigger",
|
|
4077
4097
|
className: P("[&_svg:not([class*='size-'])]:size-4", e),
|
|
@@ -4079,10 +4099,10 @@ function co({ className: e, children: t, ...n }) {
|
|
|
4079
4099
|
children: [t, /* @__PURE__ */ a(l, { className: "text-muted-foreground size-4 pointer-events-none" })]
|
|
4080
4100
|
});
|
|
4081
4101
|
}
|
|
4082
|
-
function
|
|
4102
|
+
function uo({ className: e, ...t }) {
|
|
4083
4103
|
return /* @__PURE__ */ a(j.Clear, {
|
|
4084
4104
|
"data-slot": "combobox-clear",
|
|
4085
|
-
render: /* @__PURE__ */ a(
|
|
4105
|
+
render: /* @__PURE__ */ a(Vi, {
|
|
4086
4106
|
variant: "ghost",
|
|
4087
4107
|
size: "icon-xs"
|
|
4088
4108
|
}),
|
|
@@ -4091,31 +4111,31 @@ function lo({ className: e, ...t }) {
|
|
|
4091
4111
|
children: /* @__PURE__ */ a(we, { className: "pointer-events-none" })
|
|
4092
4112
|
});
|
|
4093
4113
|
}
|
|
4094
|
-
function
|
|
4095
|
-
return /* @__PURE__ */ o(
|
|
4114
|
+
function fo({ className: e, children: t, disabled: n = !1, showTrigger: r = !0, showClear: i = !1, ...s }) {
|
|
4115
|
+
return /* @__PURE__ */ o(Li, {
|
|
4096
4116
|
className: P("w-auto", e),
|
|
4097
4117
|
children: [
|
|
4098
4118
|
/* @__PURE__ */ a(j.Input, {
|
|
4099
|
-
render: /* @__PURE__ */ a(
|
|
4119
|
+
render: /* @__PURE__ */ a(Ui, { disabled: n }),
|
|
4100
4120
|
...s
|
|
4101
4121
|
}),
|
|
4102
|
-
/* @__PURE__ */ o(
|
|
4122
|
+
/* @__PURE__ */ o(zi, {
|
|
4103
4123
|
align: "inline-end",
|
|
4104
|
-
children: [r && /* @__PURE__ */ a(
|
|
4124
|
+
children: [r && /* @__PURE__ */ a(Vi, {
|
|
4105
4125
|
size: "icon-xs",
|
|
4106
4126
|
variant: "ghost",
|
|
4107
4127
|
asChild: !0,
|
|
4108
4128
|
"data-slot": "input-group-button",
|
|
4109
4129
|
className: "group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent",
|
|
4110
4130
|
disabled: n,
|
|
4111
|
-
children: /* @__PURE__ */ a(
|
|
4112
|
-
}), i && /* @__PURE__ */ a(
|
|
4131
|
+
children: /* @__PURE__ */ a(lo, {})
|
|
4132
|
+
}), i && /* @__PURE__ */ a(uo, { disabled: n })]
|
|
4113
4133
|
}),
|
|
4114
4134
|
t
|
|
4115
4135
|
]
|
|
4116
4136
|
});
|
|
4117
4137
|
}
|
|
4118
|
-
function
|
|
4138
|
+
function po({ className: e, side: t = "bottom", sideOffset: n = 6, align: r = "start", alignOffset: i = 0, anchor: o, ...s }) {
|
|
4119
4139
|
return /* @__PURE__ */ a(j.Portal, { children: /* @__PURE__ */ a(j.Positioner, {
|
|
4120
4140
|
side: t,
|
|
4121
4141
|
sideOffset: n,
|
|
@@ -4131,14 +4151,14 @@ function fo({ className: e, side: t = "bottom", sideOffset: n = 6, align: r = "s
|
|
|
4131
4151
|
})
|
|
4132
4152
|
}) });
|
|
4133
4153
|
}
|
|
4134
|
-
function
|
|
4154
|
+
function mo({ className: e, ...t }) {
|
|
4135
4155
|
return /* @__PURE__ */ a(j.List, {
|
|
4136
4156
|
"data-slot": "combobox-list",
|
|
4137
4157
|
className: P("no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 p-1 data-empty:p-0 overflow-y-auto overscroll-contain", e),
|
|
4138
4158
|
...t
|
|
4139
4159
|
});
|
|
4140
4160
|
}
|
|
4141
|
-
function
|
|
4161
|
+
function ho({ className: e, children: t, ...n }) {
|
|
4142
4162
|
return /* @__PURE__ */ o(j.Item, {
|
|
4143
4163
|
"data-slot": "combobox-item",
|
|
4144
4164
|
className: P("data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground gap-2 rounded-md py-1 pe-8 ps-1.5 text-sm [&_svg:not([class*='size-'])]:size-4 relative flex w-full cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", e),
|
|
@@ -4149,48 +4169,48 @@ function mo({ className: e, children: t, ...n }) {
|
|
|
4149
4169
|
})]
|
|
4150
4170
|
});
|
|
4151
4171
|
}
|
|
4152
|
-
function
|
|
4172
|
+
function go({ className: e, ...t }) {
|
|
4153
4173
|
return /* @__PURE__ */ a(j.Group, {
|
|
4154
4174
|
"data-slot": "combobox-group",
|
|
4155
4175
|
className: P(e),
|
|
4156
4176
|
...t
|
|
4157
4177
|
});
|
|
4158
4178
|
}
|
|
4159
|
-
function
|
|
4179
|
+
function _o({ className: e, ...t }) {
|
|
4160
4180
|
return /* @__PURE__ */ a(j.GroupLabel, {
|
|
4161
4181
|
"data-slot": "combobox-label",
|
|
4162
4182
|
className: P("text-muted-foreground px-2 py-1.5 text-xs", e),
|
|
4163
4183
|
...t
|
|
4164
4184
|
});
|
|
4165
4185
|
}
|
|
4166
|
-
function
|
|
4186
|
+
function vo({ ...e }) {
|
|
4167
4187
|
return /* @__PURE__ */ a(j.Collection, {
|
|
4168
4188
|
"data-slot": "combobox-collection",
|
|
4169
4189
|
...e
|
|
4170
4190
|
});
|
|
4171
4191
|
}
|
|
4172
|
-
function
|
|
4192
|
+
function yo({ className: e, ...t }) {
|
|
4173
4193
|
return /* @__PURE__ */ a(j.Empty, {
|
|
4174
4194
|
"data-slot": "combobox-empty",
|
|
4175
4195
|
className: P("text-muted-foreground hidden w-full justify-center py-2 text-center text-sm group-data-empty/combobox-content:flex", e),
|
|
4176
4196
|
...t
|
|
4177
4197
|
});
|
|
4178
4198
|
}
|
|
4179
|
-
function
|
|
4199
|
+
function bo({ className: e, ...t }) {
|
|
4180
4200
|
return /* @__PURE__ */ a(j.Separator, {
|
|
4181
4201
|
"data-slot": "combobox-separator",
|
|
4182
4202
|
className: P("bg-border -mx-1 my-1 h-px", e),
|
|
4183
4203
|
...t
|
|
4184
4204
|
});
|
|
4185
4205
|
}
|
|
4186
|
-
function
|
|
4206
|
+
function xo({ className: e, ...t }) {
|
|
4187
4207
|
return /* @__PURE__ */ a(j.Chips, {
|
|
4188
4208
|
"data-slot": "combobox-chips",
|
|
4189
4209
|
className: P("dark:bg-input/30 border-input focus-within:border-ring focus-within:ring-ring/50 has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40 has-aria-invalid:border-destructive dark:has-aria-invalid:border-destructive/50 flex min-h-8 flex-wrap items-center gap-1 rounded-lg border bg-transparent bg-clip-padding px-2.5 py-1 text-sm transition-colors focus-within:ring-3 has-aria-invalid:ring-3 has-data-[slot=combobox-chip]:px-1", e),
|
|
4190
4210
|
...t
|
|
4191
4211
|
});
|
|
4192
4212
|
}
|
|
4193
|
-
function
|
|
4213
|
+
function So({ className: e, children: t, showRemove: n = !0, ...r }) {
|
|
4194
4214
|
return /* @__PURE__ */ o(j.Chip, {
|
|
4195
4215
|
"data-slot": "combobox-chip",
|
|
4196
4216
|
className: P("bg-muted text-foreground flex h-[calc(--spacing(5.25))] w-fit items-center justify-center gap-1 rounded-sm px-1.5 text-xs font-medium whitespace-nowrap has-data-[slot=combobox-chip-remove]:pe-0 has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50", e),
|
|
@@ -4206,62 +4226,62 @@ function xo({ className: e, children: t, showRemove: n = !0, ...r }) {
|
|
|
4206
4226
|
})]
|
|
4207
4227
|
});
|
|
4208
4228
|
}
|
|
4209
|
-
function
|
|
4229
|
+
function Co({ className: e, ...t }) {
|
|
4210
4230
|
return /* @__PURE__ */ a(j.Input, {
|
|
4211
4231
|
"data-slot": "combobox-chip-input",
|
|
4212
4232
|
className: P("min-w-16 flex-1 outline-none", e),
|
|
4213
4233
|
...t
|
|
4214
4234
|
});
|
|
4215
4235
|
}
|
|
4216
|
-
function
|
|
4236
|
+
function wo() {
|
|
4217
4237
|
return y.useRef(null);
|
|
4218
4238
|
}
|
|
4219
4239
|
//#endregion
|
|
4220
4240
|
//#region src/components/pure/direction.tsx
|
|
4221
|
-
function
|
|
4222
|
-
return /* @__PURE__ */ a(
|
|
4241
|
+
function To({ dir: e, direction: t, children: n }) {
|
|
4242
|
+
return /* @__PURE__ */ a(qe.DirectionProvider, {
|
|
4223
4243
|
dir: t ?? e,
|
|
4224
4244
|
children: n
|
|
4225
4245
|
});
|
|
4226
4246
|
}
|
|
4227
|
-
var
|
|
4247
|
+
var Eo = qe.useDirection;
|
|
4228
4248
|
//#endregion
|
|
4229
4249
|
//#region src/components/pure/drawer.tsx
|
|
4230
|
-
function
|
|
4250
|
+
function Do({ ...e }) {
|
|
4231
4251
|
return /* @__PURE__ */ a(M.Root, {
|
|
4232
4252
|
"data-slot": "drawer",
|
|
4233
4253
|
...e
|
|
4234
4254
|
});
|
|
4235
4255
|
}
|
|
4236
|
-
function
|
|
4256
|
+
function Oo({ ...e }) {
|
|
4237
4257
|
return /* @__PURE__ */ a(M.Trigger, {
|
|
4238
4258
|
"data-slot": "drawer-trigger",
|
|
4239
4259
|
...e
|
|
4240
4260
|
});
|
|
4241
4261
|
}
|
|
4242
|
-
function
|
|
4262
|
+
function ko({ ...e }) {
|
|
4243
4263
|
return /* @__PURE__ */ a(M.Portal, {
|
|
4244
4264
|
"data-slot": "drawer-portal",
|
|
4245
4265
|
...e
|
|
4246
4266
|
});
|
|
4247
4267
|
}
|
|
4248
|
-
function
|
|
4268
|
+
function Ao({ ...e }) {
|
|
4249
4269
|
return /* @__PURE__ */ a(M.Close, {
|
|
4250
4270
|
"data-slot": "drawer-close",
|
|
4251
4271
|
...e
|
|
4252
4272
|
});
|
|
4253
4273
|
}
|
|
4254
|
-
function
|
|
4274
|
+
function jo({ className: e, ...t }) {
|
|
4255
4275
|
return /* @__PURE__ */ a(M.Overlay, {
|
|
4256
4276
|
"data-slot": "drawer-overlay",
|
|
4257
4277
|
className: P("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/10 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 z-50", e),
|
|
4258
4278
|
...t
|
|
4259
4279
|
});
|
|
4260
4280
|
}
|
|
4261
|
-
function
|
|
4262
|
-
return /* @__PURE__ */ o(
|
|
4281
|
+
function Mo({ className: e, children: t, ...n }) {
|
|
4282
|
+
return /* @__PURE__ */ o(ko, {
|
|
4263
4283
|
"data-slot": "drawer-portal",
|
|
4264
|
-
children: [/* @__PURE__ */ a(
|
|
4284
|
+
children: [/* @__PURE__ */ a(jo, {}), /* @__PURE__ */ o(M.Content, {
|
|
4265
4285
|
"data-slot": "drawer-content",
|
|
4266
4286
|
className: P("bg-background flex h-auto flex-col text-sm data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-xl data-[vaul-drawer-direction=bottom]:border-t data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:start-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:rounded-e-xl data-[vaul-drawer-direction=left]:border-e data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:end-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:rounded-s-xl data-[vaul-drawer-direction=right]:border-s data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-xl data-[vaul-drawer-direction=top]:border-b data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:sm:max-w-sm group/drawer-content fixed z-50", e),
|
|
4267
4287
|
...n,
|
|
@@ -4269,28 +4289,28 @@ function jo({ className: e, children: t, ...n }) {
|
|
|
4269
4289
|
})]
|
|
4270
4290
|
});
|
|
4271
4291
|
}
|
|
4272
|
-
function
|
|
4292
|
+
function No({ className: e, ...t }) {
|
|
4273
4293
|
return /* @__PURE__ */ a("div", {
|
|
4274
4294
|
"data-slot": "drawer-header",
|
|
4275
4295
|
className: P("gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-0.5 md:text-start flex flex-col", e),
|
|
4276
4296
|
...t
|
|
4277
4297
|
});
|
|
4278
4298
|
}
|
|
4279
|
-
function
|
|
4299
|
+
function Po({ className: e, ...t }) {
|
|
4280
4300
|
return /* @__PURE__ */ a("div", {
|
|
4281
4301
|
"data-slot": "drawer-footer",
|
|
4282
4302
|
className: P("gap-2 p-4 mt-auto flex flex-col", e),
|
|
4283
4303
|
...t
|
|
4284
4304
|
});
|
|
4285
4305
|
}
|
|
4286
|
-
function
|
|
4306
|
+
function Fo({ className: e, ...t }) {
|
|
4287
4307
|
return /* @__PURE__ */ a(M.Title, {
|
|
4288
4308
|
"data-slot": "drawer-title",
|
|
4289
4309
|
className: P("text-foreground text-base font-medium", e),
|
|
4290
4310
|
...t
|
|
4291
4311
|
});
|
|
4292
4312
|
}
|
|
4293
|
-
function
|
|
4313
|
+
function Io({ className: e, ...t }) {
|
|
4294
4314
|
return /* @__PURE__ */ a(M.Description, {
|
|
4295
4315
|
"data-slot": "drawer-description",
|
|
4296
4316
|
className: P("text-muted-foreground text-sm", e),
|
|
@@ -4299,14 +4319,14 @@ function Fo({ className: e, ...t }) {
|
|
|
4299
4319
|
}
|
|
4300
4320
|
//#endregion
|
|
4301
4321
|
//#region src/components/pure/field.tsx
|
|
4302
|
-
function
|
|
4322
|
+
function Lo({ className: e, ...t }) {
|
|
4303
4323
|
return /* @__PURE__ */ a("fieldset", {
|
|
4304
4324
|
"data-slot": "field-set",
|
|
4305
4325
|
className: P("gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3 flex flex-col", e),
|
|
4306
4326
|
...t
|
|
4307
4327
|
});
|
|
4308
4328
|
}
|
|
4309
|
-
function
|
|
4329
|
+
function Ro({ className: e, variant: t = "legend", ...n }) {
|
|
4310
4330
|
return /* @__PURE__ */ a("legend", {
|
|
4311
4331
|
"data-slot": "field-legend",
|
|
4312
4332
|
"data-variant": t,
|
|
@@ -4314,14 +4334,14 @@ function Lo({ className: e, variant: t = "legend", ...n }) {
|
|
|
4314
4334
|
...n
|
|
4315
4335
|
});
|
|
4316
4336
|
}
|
|
4317
|
-
function
|
|
4337
|
+
function zo({ className: e, ...t }) {
|
|
4318
4338
|
return /* @__PURE__ */ a("div", {
|
|
4319
4339
|
"data-slot": "field-group",
|
|
4320
4340
|
className: P("gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4 group/field-group @container/field-group flex w-full flex-col", e),
|
|
4321
4341
|
...t
|
|
4322
4342
|
});
|
|
4323
4343
|
}
|
|
4324
|
-
var
|
|
4344
|
+
var Bo = S("data-[invalid=true]:text-destructive gap-2 group/field flex w-full", {
|
|
4325
4345
|
variants: { orientation: {
|
|
4326
4346
|
vertical: "flex-col *:w-full [&>.sr-only]:w-auto",
|
|
4327
4347
|
horizontal: "flex-row items-center *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
|
|
@@ -4329,44 +4349,44 @@ var zo = S("data-[invalid=true]:text-destructive gap-2 group/field flex w-full",
|
|
|
4329
4349
|
} },
|
|
4330
4350
|
defaultVariants: { orientation: "vertical" }
|
|
4331
4351
|
});
|
|
4332
|
-
function
|
|
4352
|
+
function Vo({ className: e, orientation: t = "vertical", ...n }) {
|
|
4333
4353
|
return /* @__PURE__ */ a("div", {
|
|
4334
4354
|
role: "group",
|
|
4335
4355
|
"data-slot": "field",
|
|
4336
4356
|
"data-orientation": t,
|
|
4337
|
-
className: P(
|
|
4357
|
+
className: P(Bo({ orientation: t }), e),
|
|
4338
4358
|
...n
|
|
4339
4359
|
});
|
|
4340
4360
|
}
|
|
4341
|
-
function
|
|
4361
|
+
function Ho({ className: e, ...t }) {
|
|
4342
4362
|
return /* @__PURE__ */ a("div", {
|
|
4343
4363
|
"data-slot": "field-content",
|
|
4344
4364
|
className: P("gap-0.5 group/field-content flex flex-1 flex-col leading-snug", e),
|
|
4345
4365
|
...t
|
|
4346
4366
|
});
|
|
4347
4367
|
}
|
|
4348
|
-
function
|
|
4349
|
-
return /* @__PURE__ */ a(
|
|
4368
|
+
function Uo({ className: e, ...t }) {
|
|
4369
|
+
return /* @__PURE__ */ a(Ut, {
|
|
4350
4370
|
"data-slot": "field-label",
|
|
4351
4371
|
className: P("has-data-checked:bg-primary/5 has-data-checked:border-primary/30 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10 gap-2 group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border *:data-[slot=field]:p-2.5 group/field-label peer/field-label flex w-fit leading-snug", "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col", e),
|
|
4352
4372
|
...t
|
|
4353
4373
|
});
|
|
4354
4374
|
}
|
|
4355
|
-
function
|
|
4375
|
+
function Wo({ className: e, ...t }) {
|
|
4356
4376
|
return /* @__PURE__ */ a("div", {
|
|
4357
4377
|
"data-slot": "field-label",
|
|
4358
4378
|
className: P("gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50 flex w-fit items-center leading-snug", e),
|
|
4359
4379
|
...t
|
|
4360
4380
|
});
|
|
4361
4381
|
}
|
|
4362
|
-
function
|
|
4382
|
+
function Go({ className: e, ...t }) {
|
|
4363
4383
|
return /* @__PURE__ */ a("p", {
|
|
4364
4384
|
"data-slot": "field-description",
|
|
4365
4385
|
className: P("text-muted-foreground text-start text-sm [[data-variant=legend]+&]:-mt-1.5 leading-normal font-normal group-has-data-horizontal/field:text-balance", "last:mt-0 nth-last-2:-mt-1", "[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4", e),
|
|
4366
4386
|
...t
|
|
4367
4387
|
});
|
|
4368
4388
|
}
|
|
4369
|
-
function
|
|
4389
|
+
function Ko({ children: e, className: t, ...n }) {
|
|
4370
4390
|
return /* @__PURE__ */ o("div", {
|
|
4371
4391
|
"data-slot": "field-separator",
|
|
4372
4392
|
"data-content": !!e,
|
|
@@ -4379,8 +4399,8 @@ function Go({ children: e, className: t, ...n }) {
|
|
|
4379
4399
|
})]
|
|
4380
4400
|
});
|
|
4381
4401
|
}
|
|
4382
|
-
function
|
|
4383
|
-
let i =
|
|
4402
|
+
function qo({ className: e, children: t, errors: n, ...r }) {
|
|
4403
|
+
let i = je(() => {
|
|
4384
4404
|
if (t) return t;
|
|
4385
4405
|
if (!n?.length) return null;
|
|
4386
4406
|
let e = [...new Map(n.map((e) => [e?.message, e])).values()];
|
|
@@ -4399,30 +4419,30 @@ function Ko({ className: e, children: t, errors: n, ...r }) {
|
|
|
4399
4419
|
}
|
|
4400
4420
|
//#endregion
|
|
4401
4421
|
//#region src/components/pure/scroll-area.tsx
|
|
4402
|
-
function
|
|
4403
|
-
return /* @__PURE__ */ o(
|
|
4422
|
+
function Jo({ className: e, children: t, ...n }) {
|
|
4423
|
+
return /* @__PURE__ */ o(Je.Root, {
|
|
4404
4424
|
"data-slot": "scroll-area",
|
|
4405
4425
|
className: P("relative", e),
|
|
4406
4426
|
...n,
|
|
4407
4427
|
children: [
|
|
4408
|
-
/* @__PURE__ */ a(
|
|
4428
|
+
/* @__PURE__ */ a(Je.Viewport, {
|
|
4409
4429
|
"data-slot": "scroll-area-viewport",
|
|
4410
4430
|
className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",
|
|
4411
4431
|
children: t
|
|
4412
4432
|
}),
|
|
4413
|
-
/* @__PURE__ */ a(
|
|
4414
|
-
/* @__PURE__ */ a(
|
|
4433
|
+
/* @__PURE__ */ a(Yo, {}),
|
|
4434
|
+
/* @__PURE__ */ a(Je.Corner, {})
|
|
4415
4435
|
]
|
|
4416
4436
|
});
|
|
4417
4437
|
}
|
|
4418
|
-
function
|
|
4419
|
-
return /* @__PURE__ */ a(
|
|
4438
|
+
function Yo({ className: e, orientation: t = "vertical", ...n }) {
|
|
4439
|
+
return /* @__PURE__ */ a(Je.ScrollAreaScrollbar, {
|
|
4420
4440
|
"data-slot": "scroll-area-scrollbar",
|
|
4421
4441
|
"data-orientation": t,
|
|
4422
4442
|
orientation: t,
|
|
4423
4443
|
className: P("data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-s data-vertical:border-s-transparent flex touch-none p-px transition-colors select-none", e),
|
|
4424
4444
|
...n,
|
|
4425
|
-
children: /* @__PURE__ */ a(
|
|
4445
|
+
children: /* @__PURE__ */ a(Je.ScrollAreaThumb, {
|
|
4426
4446
|
"data-slot": "scroll-area-thumb",
|
|
4427
4447
|
className: "rounded-full bg-border relative flex-1"
|
|
4428
4448
|
})
|
|
@@ -4430,9 +4450,9 @@ function Jo({ className: e, orientation: t = "vertical", ...n }) {
|
|
|
4430
4450
|
}
|
|
4431
4451
|
//#endregion
|
|
4432
4452
|
//#region src/components/pure/sonner.tsx
|
|
4433
|
-
var
|
|
4434
|
-
let { theme: t = "system" } =
|
|
4435
|
-
return /* @__PURE__ */ a(
|
|
4453
|
+
var Xo = ({ ...e }) => {
|
|
4454
|
+
let { theme: t = "system" } = et();
|
|
4455
|
+
return /* @__PURE__ */ a(tt, {
|
|
4436
4456
|
theme: t,
|
|
4437
4457
|
className: "toaster group",
|
|
4438
4458
|
icons: {
|
|
@@ -4454,13 +4474,13 @@ var Yo = ({ ...e }) => {
|
|
|
4454
4474
|
};
|
|
4455
4475
|
//#endregion
|
|
4456
4476
|
//#region src/components/pure/switch.tsx
|
|
4457
|
-
function
|
|
4458
|
-
return /* @__PURE__ */ a(
|
|
4477
|
+
function Zo({ className: e, size: t = "default", ...n }) {
|
|
4478
|
+
return /* @__PURE__ */ a(Ye.Root, {
|
|
4459
4479
|
"data-slot": "switch",
|
|
4460
4480
|
"data-size": t,
|
|
4461
4481
|
className: P("data-checked:bg-primary data-unchecked:bg-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 dark:data-unchecked:bg-input/80 shrink-0 rounded-full border border-transparent focus-visible:ring-3 aria-invalid:ring-3 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50", e),
|
|
4462
4482
|
...n,
|
|
4463
|
-
children: /* @__PURE__ */ a(
|
|
4483
|
+
children: /* @__PURE__ */ a(Ye.Thumb, {
|
|
4464
4484
|
"data-slot": "switch-thumb",
|
|
4465
4485
|
className: "bg-background dark:data-unchecked:bg-foreground dark:data-checked:bg-primary-foreground rounded-full group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 pointer-events-none block ring-0 transition-transform"
|
|
4466
4486
|
})
|
|
@@ -4468,38 +4488,38 @@ function Xo({ className: e, size: t = "default", ...n }) {
|
|
|
4468
4488
|
}
|
|
4469
4489
|
//#endregion
|
|
4470
4490
|
//#region src/components/pure/tabs.tsx
|
|
4471
|
-
function
|
|
4472
|
-
return /* @__PURE__ */ a(
|
|
4491
|
+
function Qo({ className: e, orientation: t = "horizontal", ...n }) {
|
|
4492
|
+
return /* @__PURE__ */ a(Xe.Root, {
|
|
4473
4493
|
"data-slot": "tabs",
|
|
4474
4494
|
"data-orientation": t,
|
|
4475
4495
|
className: P("gap-2 group/tabs flex data-horizontal:flex-col", e),
|
|
4476
4496
|
...n
|
|
4477
4497
|
});
|
|
4478
4498
|
}
|
|
4479
|
-
var
|
|
4499
|
+
var $o = S("rounded-lg p-[3px] group-data-horizontal/tabs:h-8 data-[variant=line]:rounded-none group/tabs-list text-muted-foreground inline-flex w-fit items-center justify-center group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col", {
|
|
4480
4500
|
variants: { variant: {
|
|
4481
4501
|
default: "bg-muted",
|
|
4482
4502
|
line: "gap-1 bg-transparent"
|
|
4483
4503
|
} },
|
|
4484
4504
|
defaultVariants: { variant: "default" }
|
|
4485
4505
|
});
|
|
4486
|
-
function
|
|
4487
|
-
return /* @__PURE__ */ a(
|
|
4506
|
+
function es({ className: e, variant: t = "default", ...n }) {
|
|
4507
|
+
return /* @__PURE__ */ a(Xe.List, {
|
|
4488
4508
|
"data-slot": "tabs-list",
|
|
4489
4509
|
"data-variant": t,
|
|
4490
|
-
className: P(
|
|
4510
|
+
className: P($o({ variant: t }), e),
|
|
4491
4511
|
...n
|
|
4492
4512
|
});
|
|
4493
4513
|
}
|
|
4494
|
-
function
|
|
4495
|
-
return /* @__PURE__ */ a(
|
|
4514
|
+
function ts({ className: e, ...t }) {
|
|
4515
|
+
return /* @__PURE__ */ a(Xe.Trigger, {
|
|
4496
4516
|
"data-slot": "tabs-trigger",
|
|
4497
4517
|
className: P("gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg:not([class*='size-'])]:size-4 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground/60 hover:text-foreground dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center whitespace-nowrap transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent", "data-active:bg-background dark:data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 data-active:text-foreground", "after:bg-foreground after:absolute after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-end-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100", e),
|
|
4498
4518
|
...t
|
|
4499
4519
|
});
|
|
4500
4520
|
}
|
|
4501
|
-
function
|
|
4502
|
-
return /* @__PURE__ */ a(
|
|
4521
|
+
function ns({ className: e, ...t }) {
|
|
4522
|
+
return /* @__PURE__ */ a(Xe.Content, {
|
|
4503
4523
|
"data-slot": "tabs-content",
|
|
4504
4524
|
className: P("text-sm flex-1 outline-none", e),
|
|
4505
4525
|
...t
|
|
@@ -4507,7 +4527,7 @@ function ts({ className: e, ...t }) {
|
|
|
4507
4527
|
}
|
|
4508
4528
|
//#endregion
|
|
4509
4529
|
//#region src/components/pure/toggle.tsx
|
|
4510
|
-
var
|
|
4530
|
+
var rs = S("hover:text-foreground aria-pressed:bg-muted focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[state=on]:bg-muted gap-1 rounded-lg text-sm font-medium transition-all [&_svg:not([class*='size-'])]:size-4 group/toggle hover:bg-muted inline-flex items-center justify-center whitespace-nowrap outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", {
|
|
4511
4531
|
variants: {
|
|
4512
4532
|
variant: {
|
|
4513
4533
|
default: "bg-transparent",
|
|
@@ -4524,10 +4544,10 @@ var ns = S("hover:text-foreground aria-pressed:bg-muted focus-visible:border-rin
|
|
|
4524
4544
|
size: "default"
|
|
4525
4545
|
}
|
|
4526
4546
|
});
|
|
4527
|
-
function
|
|
4528
|
-
return /* @__PURE__ */ a(
|
|
4547
|
+
function is({ className: e, variant: t = "default", size: n = "default", ...r }) {
|
|
4548
|
+
return /* @__PURE__ */ a(Ze.Root, {
|
|
4529
4549
|
"data-slot": "toggle",
|
|
4530
|
-
className: P(
|
|
4550
|
+
className: P(rs({
|
|
4531
4551
|
variant: t,
|
|
4532
4552
|
size: n,
|
|
4533
4553
|
className: e
|
|
@@ -4537,14 +4557,14 @@ function rs({ className: e, variant: t = "default", size: n = "default", ...r })
|
|
|
4537
4557
|
}
|
|
4538
4558
|
//#endregion
|
|
4539
4559
|
//#region src/components/pure/toggle-group.tsx
|
|
4540
|
-
var
|
|
4560
|
+
var as = y.createContext({
|
|
4541
4561
|
size: "default",
|
|
4542
4562
|
variant: "default",
|
|
4543
4563
|
spacing: 0,
|
|
4544
4564
|
orientation: "horizontal"
|
|
4545
4565
|
});
|
|
4546
|
-
function
|
|
4547
|
-
return /* @__PURE__ */ a(
|
|
4566
|
+
function os({ className: e, variant: t, size: n, spacing: r = 0, orientation: i = "horizontal", children: o, ...s }) {
|
|
4567
|
+
return /* @__PURE__ */ a(Qe.Root, {
|
|
4548
4568
|
"data-slot": "toggle-group",
|
|
4549
4569
|
"data-variant": t,
|
|
4550
4570
|
"data-size": n,
|
|
@@ -4553,7 +4573,7 @@ function as({ className: e, variant: t, size: n, spacing: r = 0, orientation: i
|
|
|
4553
4573
|
style: { "--gap": r },
|
|
4554
4574
|
className: P("rounded-lg data-[size=sm]:rounded-[min(var(--radius-md),10px)] group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] data-vertical:flex-col data-vertical:items-stretch", e),
|
|
4555
4575
|
...s,
|
|
4556
|
-
children: /* @__PURE__ */ a(
|
|
4576
|
+
children: /* @__PURE__ */ a(as.Provider, {
|
|
4557
4577
|
value: {
|
|
4558
4578
|
variant: t,
|
|
4559
4579
|
size: n,
|
|
@@ -4564,14 +4584,14 @@ function as({ className: e, variant: t, size: n, spacing: r = 0, orientation: i
|
|
|
4564
4584
|
})
|
|
4565
4585
|
});
|
|
4566
4586
|
}
|
|
4567
|
-
function
|
|
4568
|
-
let o = y.useContext(
|
|
4569
|
-
return /* @__PURE__ */ a(
|
|
4587
|
+
function ss({ className: e, children: t, variant: n = "default", size: r = "default", ...i }) {
|
|
4588
|
+
let o = y.useContext(as);
|
|
4589
|
+
return /* @__PURE__ */ a(Qe.Item, {
|
|
4570
4590
|
"data-slot": "toggle-group-item",
|
|
4571
4591
|
"data-variant": o.variant || n,
|
|
4572
4592
|
"data-size": o.size || r,
|
|
4573
4593
|
"data-spacing": o.spacing,
|
|
4574
|
-
className: P("group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-s-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-e-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg shrink-0 focus:z-10 focus-visible:z-10 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-s-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-s group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t",
|
|
4594
|
+
className: P("group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-s-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-e-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg shrink-0 focus:z-10 focus-visible:z-10 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-s-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-s group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t", rs({
|
|
4575
4595
|
variant: o.variant || n,
|
|
4576
4596
|
size: o.size || r
|
|
4577
4597
|
}), e),
|
|
@@ -4581,7 +4601,7 @@ function os({ className: e, children: t, variant: n = "default", size: r = "defa
|
|
|
4581
4601
|
}
|
|
4582
4602
|
//#endregion
|
|
4583
4603
|
//#region src/hooks/useDialog.ts
|
|
4584
|
-
function
|
|
4604
|
+
function cs() {
|
|
4585
4605
|
let [e, t] = x(null), [n, r] = x(!1), [i, a] = x(!1);
|
|
4586
4606
|
return {
|
|
4587
4607
|
selectedRow: e,
|
|
@@ -4599,7 +4619,7 @@ function ss() {
|
|
|
4599
4619
|
}
|
|
4600
4620
|
//#endregion
|
|
4601
4621
|
//#region src/hooks/useDynamicList.ts
|
|
4602
|
-
function
|
|
4622
|
+
function ls(e, t, n) {
|
|
4603
4623
|
return {
|
|
4604
4624
|
addRow: b((r) => {
|
|
4605
4625
|
t((t) => ({
|
|
@@ -4647,7 +4667,7 @@ function cs(e, t, n) {
|
|
|
4647
4667
|
}
|
|
4648
4668
|
//#endregion
|
|
4649
4669
|
//#region src/hooks/useFormValidation.ts
|
|
4650
|
-
function
|
|
4670
|
+
function us(e, t) {
|
|
4651
4671
|
let [n, r] = x({}), i = (e) => n[e], a = (e) => !!n[e];
|
|
4652
4672
|
return {
|
|
4653
4673
|
errors: n,
|
|
@@ -4677,10 +4697,10 @@ function ls(e, t) {
|
|
|
4677
4697
|
}
|
|
4678
4698
|
//#endregion
|
|
4679
4699
|
//#region src/hooks/useEntityForm.ts
|
|
4680
|
-
function
|
|
4700
|
+
function ds(e, t) {
|
|
4681
4701
|
let [n, r] = x({ ...e }), [i, a] = x(e);
|
|
4682
4702
|
e !== i && (r({ ...e }), a(e));
|
|
4683
|
-
let o =
|
|
4703
|
+
let o = us(n, t);
|
|
4684
4704
|
return {
|
|
4685
4705
|
formData: n,
|
|
4686
4706
|
handleChange: b((e) => {
|
|
@@ -4699,7 +4719,7 @@ function us(e, t) {
|
|
|
4699
4719
|
}
|
|
4700
4720
|
//#endregion
|
|
4701
4721
|
//#region src/hooks/useLightBox.ts
|
|
4702
|
-
function
|
|
4722
|
+
function fs() {
|
|
4703
4723
|
let [e, t] = x(null);
|
|
4704
4724
|
return {
|
|
4705
4725
|
lightbox: e,
|
|
@@ -4715,8 +4735,8 @@ function ds() {
|
|
|
4715
4735
|
}
|
|
4716
4736
|
//#endregion
|
|
4717
4737
|
//#region src/hooks/useStorageFile.ts
|
|
4718
|
-
function
|
|
4719
|
-
let n =
|
|
4738
|
+
function ps(e, t) {
|
|
4739
|
+
let n = Me(null), r = async (r) => {
|
|
4720
4740
|
let i = Array.from(r.target.files || []);
|
|
4721
4741
|
if (i.length === 0) return;
|
|
4722
4742
|
let a = [
|
|
@@ -4741,7 +4761,7 @@ function fs(e, t) {
|
|
|
4741
4761
|
let n = new FileReader();
|
|
4742
4762
|
n.onloadend = () => {
|
|
4743
4763
|
let r = n.result;
|
|
4744
|
-
t(new
|
|
4764
|
+
t(new rt({
|
|
4745
4765
|
url: r,
|
|
4746
4766
|
base64File: r.split(",")[1],
|
|
4747
4767
|
extension: `.${e.name.split(".").pop()}`,
|
|
@@ -4762,7 +4782,7 @@ function fs(e, t) {
|
|
|
4762
4782
|
let r = e[t];
|
|
4763
4783
|
if (Array.isArray(r)) {
|
|
4764
4784
|
let i = [...r], a = i[n];
|
|
4765
|
-
return a.status === N.New ? i.splice(n, 1) : i[n] = new
|
|
4785
|
+
return a.status === N.New ? i.splice(n, 1) : i[n] = new rt({
|
|
4766
4786
|
...a,
|
|
4767
4787
|
status: N.Delete
|
|
4768
4788
|
}), {
|
|
@@ -4773,7 +4793,7 @@ function fs(e, t) {
|
|
|
4773
4793
|
let n = r;
|
|
4774
4794
|
return {
|
|
4775
4795
|
...e,
|
|
4776
|
-
[t]: n?.status === N.New ? void 0 : new
|
|
4796
|
+
[t]: n?.status === N.New ? void 0 : new rt({
|
|
4777
4797
|
...n,
|
|
4778
4798
|
status: N.Delete
|
|
4779
4799
|
})
|
|
@@ -4801,17 +4821,17 @@ function fs(e, t) {
|
|
|
4801
4821
|
}
|
|
4802
4822
|
//#endregion
|
|
4803
4823
|
//#region src/state/authListener.ts
|
|
4804
|
-
var
|
|
4824
|
+
var ms = (e, t) => {
|
|
4805
4825
|
window.addEventListener("storage", (n) => {
|
|
4806
|
-
n.key ===
|
|
4807
|
-
}), window.addEventListener(
|
|
4826
|
+
n.key === nt.AuthCheckStorageItemName && e(t.syncFromStorage());
|
|
4827
|
+
}), window.addEventListener(nt.UnauthorizedEventName, () => {
|
|
4808
4828
|
e(t.logout());
|
|
4809
4829
|
});
|
|
4810
4830
|
};
|
|
4811
4831
|
//#endregion
|
|
4812
4832
|
//#region src/state/generics/genericDialogSlice.ts
|
|
4813
|
-
function
|
|
4814
|
-
return
|
|
4833
|
+
function hs(e) {
|
|
4834
|
+
return at({
|
|
4815
4835
|
name: e,
|
|
4816
4836
|
initialState: {
|
|
4817
4837
|
selectedRow: null,
|
|
@@ -4836,7 +4856,7 @@ function ms(e) {
|
|
|
4836
4856
|
}
|
|
4837
4857
|
//#endregion
|
|
4838
4858
|
//#region ../../node_modules/immer/dist/immer.mjs
|
|
4839
|
-
var
|
|
4859
|
+
var gs = Symbol.for("immer-nothing"), _s = Symbol.for("immer-draftable"), G = Symbol.for("immer-state"), vs = process.env.NODE_ENV === "production" ? [] : [
|
|
4840
4860
|
function(e) {
|
|
4841
4861
|
return `The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`;
|
|
4842
4862
|
},
|
|
@@ -4866,63 +4886,63 @@ var hs = Symbol.for("immer-nothing"), gs = Symbol.for("immer-draftable"), G = Sy
|
|
|
4866
4886
|
];
|
|
4867
4887
|
function K(e, ...t) {
|
|
4868
4888
|
if (process.env.NODE_ENV !== "production") {
|
|
4869
|
-
let n =
|
|
4889
|
+
let n = vs[e], r = Z(n) ? n.apply(null, t) : n;
|
|
4870
4890
|
throw Error(`[Immer] ${r}`);
|
|
4871
4891
|
}
|
|
4872
4892
|
throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`);
|
|
4873
4893
|
}
|
|
4874
|
-
var q = Object, J = q.getPrototypeOf,
|
|
4894
|
+
var q = Object, J = q.getPrototypeOf, ys = "constructor", bs = "prototype", xs = "configurable", Ss = "enumerable", Cs = "writable", ws = "value", Y = (e) => !!e && !!e[G];
|
|
4875
4895
|
function X(e) {
|
|
4876
|
-
return e ?
|
|
4896
|
+
return e ? Ds(e) || Ps(e) || !!e[_s] || !!e[ys]?.[_s] || Fs(e) || Is(e) : !1;
|
|
4877
4897
|
}
|
|
4878
|
-
var
|
|
4879
|
-
function
|
|
4880
|
-
if (!e || !
|
|
4898
|
+
var Ts = q[bs][ys].toString(), Es = /* @__PURE__ */ new WeakMap();
|
|
4899
|
+
function Ds(e) {
|
|
4900
|
+
if (!e || !Ls(e)) return !1;
|
|
4881
4901
|
let t = J(e);
|
|
4882
|
-
if (t === null || t === q[
|
|
4883
|
-
let n = q.hasOwnProperty.call(t,
|
|
4902
|
+
if (t === null || t === q[bs]) return !0;
|
|
4903
|
+
let n = q.hasOwnProperty.call(t, ys) && t[ys];
|
|
4884
4904
|
if (n === Object) return !0;
|
|
4885
4905
|
if (!Z(n)) return !1;
|
|
4886
|
-
let r =
|
|
4887
|
-
return r === void 0 && (r = Function.toString.call(n),
|
|
4906
|
+
let r = Es.get(n);
|
|
4907
|
+
return r === void 0 && (r = Function.toString.call(n), Es.set(n, r)), r === Ts;
|
|
4888
4908
|
}
|
|
4889
|
-
function
|
|
4890
|
-
|
|
4909
|
+
function Os(e, t, n = !0) {
|
|
4910
|
+
ks(e) === 0 ? (n ? Reflect.ownKeys(e) : q.keys(e)).forEach((n) => {
|
|
4891
4911
|
t(n, e[n], e);
|
|
4892
4912
|
}) : e.forEach((n, r) => t(r, n, e));
|
|
4893
4913
|
}
|
|
4894
|
-
function
|
|
4914
|
+
function ks(e) {
|
|
4895
4915
|
let t = e[G];
|
|
4896
|
-
return t ? t.type_ :
|
|
4916
|
+
return t ? t.type_ : Ps(e) ? 1 : Fs(e) ? 2 : Is(e) ? 3 : 0;
|
|
4897
4917
|
}
|
|
4898
|
-
var
|
|
4918
|
+
var As = (e, t, n = ks(e)) => n === 2 ? e.has(t) : q[bs].hasOwnProperty.call(e, t), js = (e, t, n = ks(e)) => n === 2 ? e.get(t) : e[t], Ms = (e, t, n, r = ks(e)) => {
|
|
4899
4919
|
r === 2 ? e.set(t, n) : r === 3 ? e.add(n) : e[t] = n;
|
|
4900
4920
|
};
|
|
4901
|
-
function
|
|
4921
|
+
function Ns(e, t) {
|
|
4902
4922
|
return e === t ? e !== 0 || 1 / e == 1 / t : e !== e && t !== t;
|
|
4903
4923
|
}
|
|
4904
|
-
var
|
|
4905
|
-
function
|
|
4924
|
+
var Ps = Array.isArray, Fs = (e) => e instanceof Map, Is = (e) => e instanceof Set, Ls = (e) => typeof e == "object", Z = (e) => typeof e == "function", Rs = (e) => typeof e == "boolean";
|
|
4925
|
+
function zs(e) {
|
|
4906
4926
|
let t = +e;
|
|
4907
4927
|
return Number.isInteger(t) && String(t) === e;
|
|
4908
4928
|
}
|
|
4909
|
-
var Q = (e) => e.copy_ || e.base_,
|
|
4910
|
-
function
|
|
4911
|
-
if (
|
|
4912
|
-
if (
|
|
4913
|
-
if (
|
|
4914
|
-
let n =
|
|
4929
|
+
var Q = (e) => e.copy_ || e.base_, Bs = (e) => e.modified_ ? e.copy_ : e.base_;
|
|
4930
|
+
function Vs(e, t) {
|
|
4931
|
+
if (Fs(e)) return new Map(e);
|
|
4932
|
+
if (Is(e)) return new Set(e);
|
|
4933
|
+
if (Ps(e)) return Array[bs].slice.call(e);
|
|
4934
|
+
let n = Ds(e);
|
|
4915
4935
|
if (t === !0 || t === "class_only" && !n) {
|
|
4916
4936
|
let t = q.getOwnPropertyDescriptors(e);
|
|
4917
4937
|
delete t[G];
|
|
4918
4938
|
let n = Reflect.ownKeys(t);
|
|
4919
4939
|
for (let r = 0; r < n.length; r++) {
|
|
4920
4940
|
let i = n[r], a = t[i];
|
|
4921
|
-
a[
|
|
4922
|
-
[
|
|
4923
|
-
[
|
|
4924
|
-
[
|
|
4925
|
-
[
|
|
4941
|
+
a[Cs] === !1 && (a[Cs] = !0, a[xs] = !0), (a.get || a.set) && (t[i] = {
|
|
4942
|
+
[xs]: !0,
|
|
4943
|
+
[Cs]: !0,
|
|
4944
|
+
[Ss]: a[Ss],
|
|
4945
|
+
[ws]: e[i]
|
|
4926
4946
|
});
|
|
4927
4947
|
}
|
|
4928
4948
|
return q.create(J(e), t);
|
|
@@ -4933,29 +4953,29 @@ function Bs(e, t) {
|
|
|
4933
4953
|
return q.assign(r, e);
|
|
4934
4954
|
}
|
|
4935
4955
|
}
|
|
4936
|
-
function
|
|
4937
|
-
return
|
|
4938
|
-
set:
|
|
4939
|
-
add:
|
|
4940
|
-
clear:
|
|
4941
|
-
delete:
|
|
4942
|
-
}), q.freeze(e), t &&
|
|
4943
|
-
|
|
4956
|
+
function Hs(e, t = !1) {
|
|
4957
|
+
return Gs(e) || Y(e) || !X(e) ? e : (ks(e) > 1 && q.defineProperties(e, {
|
|
4958
|
+
set: Ws,
|
|
4959
|
+
add: Ws,
|
|
4960
|
+
clear: Ws,
|
|
4961
|
+
delete: Ws
|
|
4962
|
+
}), q.freeze(e), t && Os(e, (e, t) => {
|
|
4963
|
+
Hs(t, !0);
|
|
4944
4964
|
}, !1), e);
|
|
4945
4965
|
}
|
|
4946
|
-
function
|
|
4966
|
+
function Us() {
|
|
4947
4967
|
K(2);
|
|
4948
4968
|
}
|
|
4949
|
-
var
|
|
4950
|
-
function
|
|
4951
|
-
return e === null || !
|
|
4969
|
+
var Ws = { [ws]: Us };
|
|
4970
|
+
function Gs(e) {
|
|
4971
|
+
return e === null || !Ls(e) ? !0 : q.isFrozen(e);
|
|
4952
4972
|
}
|
|
4953
|
-
var
|
|
4973
|
+
var Ks = "MapSet", qs = "Patches", Js = "ArrayMethods", Ys = {};
|
|
4954
4974
|
function $(e) {
|
|
4955
|
-
let t =
|
|
4975
|
+
let t = Ys[e];
|
|
4956
4976
|
return t || K(0, e), t;
|
|
4957
4977
|
}
|
|
4958
|
-
var
|
|
4978
|
+
var Xs = (e) => !!Ys[e], Zs, Qs = () => Zs, $s = (e, t) => ({
|
|
4959
4979
|
drafts_: [],
|
|
4960
4980
|
parent_: e,
|
|
4961
4981
|
immer_: t,
|
|
@@ -4963,114 +4983,114 @@ var Ys = (e) => !!Js[e], Xs, Zs = () => Xs, Qs = (e, t) => ({
|
|
|
4963
4983
|
unfinalizedDrafts_: 0,
|
|
4964
4984
|
handledSet_: /* @__PURE__ */ new Set(),
|
|
4965
4985
|
processedForPatches_: /* @__PURE__ */ new Set(),
|
|
4966
|
-
mapSetPlugin_:
|
|
4967
|
-
arrayMethodsPlugin_:
|
|
4986
|
+
mapSetPlugin_: Xs(Ks) ? $(Ks) : void 0,
|
|
4987
|
+
arrayMethodsPlugin_: Xs(Js) ? $(Js) : void 0
|
|
4968
4988
|
});
|
|
4969
|
-
function
|
|
4970
|
-
t && (e.patchPlugin_ = $(
|
|
4971
|
-
}
|
|
4972
|
-
function ec(e) {
|
|
4973
|
-
tc(e), e.drafts_.forEach(rc), e.drafts_ = null;
|
|
4989
|
+
function ec(e, t) {
|
|
4990
|
+
t && (e.patchPlugin_ = $(qs), e.patches_ = [], e.inversePatches_ = [], e.patchListener_ = t);
|
|
4974
4991
|
}
|
|
4975
4992
|
function tc(e) {
|
|
4976
|
-
e
|
|
4993
|
+
nc(e), e.drafts_.forEach(ic), e.drafts_ = null;
|
|
4977
4994
|
}
|
|
4978
|
-
|
|
4979
|
-
|
|
4995
|
+
function nc(e) {
|
|
4996
|
+
e === Zs && (Zs = e.parent_);
|
|
4997
|
+
}
|
|
4998
|
+
var rc = (e) => Zs = $s(Zs, e);
|
|
4999
|
+
function ic(e) {
|
|
4980
5000
|
let t = e[G];
|
|
4981
5001
|
t.type_ === 0 || t.type_ === 1 ? t.revoke_() : t.revoked_ = !0;
|
|
4982
5002
|
}
|
|
4983
|
-
function
|
|
5003
|
+
function ac(e, t) {
|
|
4984
5004
|
t.unfinalizedDrafts_ = t.drafts_.length;
|
|
4985
5005
|
let n = t.drafts_[0];
|
|
4986
5006
|
if (e !== void 0 && e !== n) {
|
|
4987
|
-
n[G].modified_ && (
|
|
5007
|
+
n[G].modified_ && (tc(t), K(4)), X(e) && (e = oc(t, e));
|
|
4988
5008
|
let { patchPlugin_: r } = t;
|
|
4989
5009
|
r && r.generateReplacementPatches_(n[G].base_, e, t);
|
|
4990
|
-
} else e =
|
|
4991
|
-
return
|
|
5010
|
+
} else e = oc(t, n);
|
|
5011
|
+
return sc(t, e, !0), tc(t), t.patches_ && t.patchListener_(t.patches_, t.inversePatches_), e === gs ? void 0 : e;
|
|
4992
5012
|
}
|
|
4993
|
-
function
|
|
4994
|
-
if (
|
|
5013
|
+
function oc(e, t) {
|
|
5014
|
+
if (Gs(t)) return t;
|
|
4995
5015
|
let n = t[G];
|
|
4996
|
-
if (!n) return
|
|
4997
|
-
if (!
|
|
5016
|
+
if (!n) return hc(t, e.handledSet_, e);
|
|
5017
|
+
if (!lc(n, e)) return t;
|
|
4998
5018
|
if (!n.modified_) return n.base_;
|
|
4999
5019
|
if (!n.finalized_) {
|
|
5000
5020
|
let { callbacks_: t } = n;
|
|
5001
5021
|
if (t) for (; t.length > 0;) t.pop()(e);
|
|
5002
|
-
|
|
5022
|
+
pc(n, e);
|
|
5003
5023
|
}
|
|
5004
5024
|
return n.copy_;
|
|
5005
5025
|
}
|
|
5006
|
-
function
|
|
5007
|
-
!e.parent_ && e.immer_.autoFreeze_ && e.canAutoFreeze_ &&
|
|
5026
|
+
function sc(e, t, n = !1) {
|
|
5027
|
+
!e.parent_ && e.immer_.autoFreeze_ && e.canAutoFreeze_ && Hs(t, n);
|
|
5008
5028
|
}
|
|
5009
|
-
function
|
|
5029
|
+
function cc(e) {
|
|
5010
5030
|
e.finalized_ = !0, e.scope_.unfinalizedDrafts_--;
|
|
5011
5031
|
}
|
|
5012
|
-
var
|
|
5013
|
-
function
|
|
5032
|
+
var lc = (e, t) => e.scope_ === t, uc = [];
|
|
5033
|
+
function dc(e, t, n, r) {
|
|
5014
5034
|
let i = Q(e), a = e.type_;
|
|
5015
|
-
if (r !== void 0 &&
|
|
5016
|
-
|
|
5035
|
+
if (r !== void 0 && js(i, r, a) === t) {
|
|
5036
|
+
Ms(i, r, n, a);
|
|
5017
5037
|
return;
|
|
5018
5038
|
}
|
|
5019
5039
|
if (!e.draftLocations_) {
|
|
5020
5040
|
let t = e.draftLocations_ = /* @__PURE__ */ new Map();
|
|
5021
|
-
|
|
5041
|
+
Os(i, (e, n) => {
|
|
5022
5042
|
if (Y(n)) {
|
|
5023
5043
|
let r = t.get(n) || [];
|
|
5024
5044
|
r.push(e), t.set(n, r);
|
|
5025
5045
|
}
|
|
5026
5046
|
});
|
|
5027
5047
|
}
|
|
5028
|
-
let o = e.draftLocations_.get(t) ??
|
|
5029
|
-
for (let e of o)
|
|
5048
|
+
let o = e.draftLocations_.get(t) ?? uc;
|
|
5049
|
+
for (let e of o) Ms(i, e, n, a);
|
|
5030
5050
|
}
|
|
5031
|
-
function
|
|
5051
|
+
function fc(e, t, n) {
|
|
5032
5052
|
e.callbacks_.push(function(r) {
|
|
5033
5053
|
let i = t;
|
|
5034
|
-
if (!i || !
|
|
5054
|
+
if (!i || !lc(i, r)) return;
|
|
5035
5055
|
r.mapSetPlugin_?.fixSetContents(i);
|
|
5036
|
-
let a =
|
|
5037
|
-
|
|
5056
|
+
let a = Bs(i);
|
|
5057
|
+
dc(e, i.draft_ ?? i, a, n), pc(i, r);
|
|
5038
5058
|
});
|
|
5039
5059
|
}
|
|
5040
|
-
function
|
|
5060
|
+
function pc(e, t) {
|
|
5041
5061
|
if (e.modified_ && !e.finalized_ && (e.type_ === 3 || e.type_ === 1 && e.allIndicesReassigned_ || (e.assigned_?.size ?? 0) > 0)) {
|
|
5042
5062
|
let { patchPlugin_: n } = t;
|
|
5043
5063
|
if (n) {
|
|
5044
5064
|
let r = n.getPath(e);
|
|
5045
5065
|
r && n.generatePatches_(e, r, t);
|
|
5046
5066
|
}
|
|
5047
|
-
|
|
5067
|
+
cc(e);
|
|
5048
5068
|
}
|
|
5049
5069
|
}
|
|
5050
|
-
function
|
|
5070
|
+
function mc(e, t, n) {
|
|
5051
5071
|
let { scope_: r } = e;
|
|
5052
5072
|
if (Y(n)) {
|
|
5053
5073
|
let i = n[G];
|
|
5054
|
-
|
|
5055
|
-
|
|
5074
|
+
lc(i, r) && i.callbacks_.push(function() {
|
|
5075
|
+
Cc(e), dc(e, n, Bs(i), t);
|
|
5056
5076
|
});
|
|
5057
5077
|
} else X(n) && e.callbacks_.push(function() {
|
|
5058
5078
|
let i = Q(e);
|
|
5059
|
-
e.type_ === 3 ? i.has(n) &&
|
|
5079
|
+
e.type_ === 3 ? i.has(n) && hc(n, r.handledSet_, r) : js(i, t, e.type_) === n && r.drafts_.length > 1 && (e.assigned_.get(t) ?? !1) === !0 && e.copy_ && hc(js(e.copy_, t, e.type_), r.handledSet_, r);
|
|
5060
5080
|
});
|
|
5061
5081
|
}
|
|
5062
|
-
function
|
|
5063
|
-
return !n.immer_.autoFreeze_ && n.unfinalizedDrafts_ < 1 || Y(e) || t.has(e) || !X(e) ||
|
|
5082
|
+
function hc(e, t, n) {
|
|
5083
|
+
return !n.immer_.autoFreeze_ && n.unfinalizedDrafts_ < 1 || Y(e) || t.has(e) || !X(e) || Gs(e) ? e : (t.add(e), Os(e, (r, i) => {
|
|
5064
5084
|
if (Y(i)) {
|
|
5065
5085
|
let t = i[G];
|
|
5066
|
-
|
|
5067
|
-
} else X(i) &&
|
|
5086
|
+
lc(t, n) && (Ms(e, r, Bs(t), e.type_), cc(t));
|
|
5087
|
+
} else X(i) && hc(i, t, n);
|
|
5068
5088
|
}), e);
|
|
5069
5089
|
}
|
|
5070
|
-
function
|
|
5071
|
-
let n =
|
|
5090
|
+
function gc(e, t) {
|
|
5091
|
+
let n = Ps(e), r = {
|
|
5072
5092
|
type_: n ? 1 : 0,
|
|
5073
|
-
scope_: t ? t.scope_ :
|
|
5093
|
+
scope_: t ? t.scope_ : Qs(),
|
|
5074
5094
|
modified_: !1,
|
|
5075
5095
|
finalized_: !1,
|
|
5076
5096
|
assigned_: void 0,
|
|
@@ -5081,23 +5101,23 @@ function hc(e, t) {
|
|
|
5081
5101
|
revoke_: null,
|
|
5082
5102
|
isManual_: !1,
|
|
5083
5103
|
callbacks_: void 0
|
|
5084
|
-
}, i = r, a =
|
|
5085
|
-
n && (i = [r], a =
|
|
5104
|
+
}, i = r, a = _c;
|
|
5105
|
+
n && (i = [r], a = vc);
|
|
5086
5106
|
let { revoke: o, proxy: s } = Proxy.revocable(i, a);
|
|
5087
5107
|
return r.draft_ = s, r.revoke_ = o, [s, r];
|
|
5088
5108
|
}
|
|
5089
|
-
var
|
|
5109
|
+
var _c = {
|
|
5090
5110
|
get(e, t) {
|
|
5091
5111
|
if (t === G) return e;
|
|
5092
5112
|
let n = e.scope_.arrayMethodsPlugin_, r = e.type_ === 1 && typeof t == "string";
|
|
5093
5113
|
if (r && n?.isArrayOperationMethod(t)) return n.createMethodInterceptor(e, t);
|
|
5094
5114
|
let i = Q(e);
|
|
5095
|
-
if (!
|
|
5115
|
+
if (!As(i, t, e.type_)) return bc(e, i, t);
|
|
5096
5116
|
let a = i[t];
|
|
5097
|
-
if (e.finalized_ || !X(a) || r && e.operationMethod && n?.isMutatingArrayMethod(e.operationMethod) &&
|
|
5098
|
-
if (a ===
|
|
5099
|
-
|
|
5100
|
-
let n = e.type_ === 1 ? +t : t, r =
|
|
5117
|
+
if (e.finalized_ || !X(a) || r && e.operationMethod && n?.isMutatingArrayMethod(e.operationMethod) && zs(t)) return a;
|
|
5118
|
+
if (a === yc(e.base_, t)) {
|
|
5119
|
+
Cc(e);
|
|
5120
|
+
let n = e.type_ === 1 ? +t : t, r = Tc(e.scope_, a, e, n);
|
|
5101
5121
|
return e.copy_[n] = r;
|
|
5102
5122
|
}
|
|
5103
5123
|
return a;
|
|
@@ -5109,26 +5129,26 @@ var gc = {
|
|
|
5109
5129
|
return Reflect.ownKeys(Q(e));
|
|
5110
5130
|
},
|
|
5111
5131
|
set(e, t, n) {
|
|
5112
|
-
let r =
|
|
5132
|
+
let r = xc(Q(e), t);
|
|
5113
5133
|
if (r?.set) return r.set.call(e.draft_, n), !0;
|
|
5114
5134
|
if (!e.modified_) {
|
|
5115
|
-
let r =
|
|
5135
|
+
let r = yc(Q(e), t), i = r?.[G];
|
|
5116
5136
|
if (i && i.base_ === n) return e.copy_[t] = n, e.assigned_.set(t, !1), !0;
|
|
5117
|
-
if (
|
|
5118
|
-
|
|
5137
|
+
if (Ns(n, r) && (n !== void 0 || As(e.base_, t, e.type_))) return !0;
|
|
5138
|
+
Cc(e), Sc(e);
|
|
5119
5139
|
}
|
|
5120
|
-
return e.copy_[t] === n && (n !== void 0 || t in e.copy_) || Number.isNaN(n) && Number.isNaN(e.copy_[t]) ? !0 : (e.copy_[t] = n, e.assigned_.set(t, !0),
|
|
5140
|
+
return e.copy_[t] === n && (n !== void 0 || t in e.copy_) || Number.isNaN(n) && Number.isNaN(e.copy_[t]) ? !0 : (e.copy_[t] = n, e.assigned_.set(t, !0), mc(e, t, n), !0);
|
|
5121
5141
|
},
|
|
5122
5142
|
deleteProperty(e, t) {
|
|
5123
|
-
return
|
|
5143
|
+
return Cc(e), yc(e.base_, t) !== void 0 || t in e.base_ ? (e.assigned_.set(t, !1), Sc(e)) : e.assigned_.delete(t), e.copy_ && delete e.copy_[t], !0;
|
|
5124
5144
|
},
|
|
5125
5145
|
getOwnPropertyDescriptor(e, t) {
|
|
5126
5146
|
let n = Q(e), r = Reflect.getOwnPropertyDescriptor(n, t);
|
|
5127
5147
|
return r && {
|
|
5128
|
-
[
|
|
5129
|
-
[
|
|
5130
|
-
[
|
|
5131
|
-
[
|
|
5148
|
+
[Cs]: !0,
|
|
5149
|
+
[xs]: e.type_ !== 1 || t !== "length",
|
|
5150
|
+
[Ss]: r[Ss],
|
|
5151
|
+
[ws]: n[t]
|
|
5132
5152
|
};
|
|
5133
5153
|
},
|
|
5134
5154
|
defineProperty() {
|
|
@@ -5140,28 +5160,28 @@ var gc = {
|
|
|
5140
5160
|
setPrototypeOf() {
|
|
5141
5161
|
K(12);
|
|
5142
5162
|
}
|
|
5143
|
-
},
|
|
5144
|
-
for (let e in
|
|
5145
|
-
let t =
|
|
5146
|
-
|
|
5163
|
+
}, vc = {};
|
|
5164
|
+
for (let e in _c) {
|
|
5165
|
+
let t = _c[e];
|
|
5166
|
+
vc[e] = function() {
|
|
5147
5167
|
let e = arguments;
|
|
5148
5168
|
return e[0] = e[0][0], t.apply(this, e);
|
|
5149
5169
|
};
|
|
5150
5170
|
}
|
|
5151
|
-
|
|
5152
|
-
return process.env.NODE_ENV !== "production" && isNaN(parseInt(t)) && K(13),
|
|
5153
|
-
},
|
|
5154
|
-
return process.env.NODE_ENV !== "production" && t !== "length" && isNaN(parseInt(t)) && K(14),
|
|
5171
|
+
vc.deleteProperty = function(e, t) {
|
|
5172
|
+
return process.env.NODE_ENV !== "production" && isNaN(parseInt(t)) && K(13), vc.set.call(this, e, t, void 0);
|
|
5173
|
+
}, vc.set = function(e, t, n) {
|
|
5174
|
+
return process.env.NODE_ENV !== "production" && t !== "length" && isNaN(parseInt(t)) && K(14), _c.set.call(this, e[0], t, n, e[0]);
|
|
5155
5175
|
};
|
|
5156
|
-
function
|
|
5176
|
+
function yc(e, t) {
|
|
5157
5177
|
let n = e[G];
|
|
5158
5178
|
return (n ? Q(n) : e)[t];
|
|
5159
5179
|
}
|
|
5160
|
-
function
|
|
5161
|
-
let r =
|
|
5162
|
-
return r ?
|
|
5180
|
+
function bc(e, t, n) {
|
|
5181
|
+
let r = xc(t, n);
|
|
5182
|
+
return r ? ws in r ? r[ws] : r.get?.call(e.draft_) : void 0;
|
|
5163
5183
|
}
|
|
5164
|
-
function
|
|
5184
|
+
function xc(e, t) {
|
|
5165
5185
|
if (!(t in e)) return;
|
|
5166
5186
|
let n = J(e);
|
|
5167
5187
|
for (; n;) {
|
|
@@ -5170,13 +5190,13 @@ function bc(e, t) {
|
|
|
5170
5190
|
n = J(n);
|
|
5171
5191
|
}
|
|
5172
5192
|
}
|
|
5173
|
-
function xc(e) {
|
|
5174
|
-
e.modified_ || (e.modified_ = !0, e.parent_ && xc(e.parent_));
|
|
5175
|
-
}
|
|
5176
5193
|
function Sc(e) {
|
|
5177
|
-
e.
|
|
5194
|
+
e.modified_ || (e.modified_ = !0, e.parent_ && Sc(e.parent_));
|
|
5178
5195
|
}
|
|
5179
|
-
|
|
5196
|
+
function Cc(e) {
|
|
5197
|
+
e.copy_ ||= (e.assigned_ = /* @__PURE__ */ new Map(), Vs(e.base_, e.scope_.immer_.useStrictShallowCopy_));
|
|
5198
|
+
}
|
|
5199
|
+
var wc = class {
|
|
5180
5200
|
constructor(e) {
|
|
5181
5201
|
this.autoFreeze_ = !0, this.useStrictShallowCopy_ = !1, this.useStrictIteration_ = !1, this.produce = (e, t, n) => {
|
|
5182
5202
|
if (Z(e) && !Z(t)) {
|
|
@@ -5190,17 +5210,17 @@ var Cc = class {
|
|
|
5190
5210
|
Z(t) || K(6), n !== void 0 && !Z(n) && K(7);
|
|
5191
5211
|
let r;
|
|
5192
5212
|
if (X(e)) {
|
|
5193
|
-
let i =
|
|
5213
|
+
let i = rc(this), a = Tc(i, e, void 0), o = !0;
|
|
5194
5214
|
try {
|
|
5195
5215
|
r = t(a), o = !1;
|
|
5196
5216
|
} finally {
|
|
5197
|
-
o ?
|
|
5217
|
+
o ? tc(i) : nc(i);
|
|
5198
5218
|
}
|
|
5199
|
-
return
|
|
5200
|
-
} else if (!e || !
|
|
5201
|
-
if (r = t(e), r === void 0 && (r = e), r ===
|
|
5219
|
+
return ec(i, n), ac(r, i);
|
|
5220
|
+
} else if (!e || !Ls(e)) {
|
|
5221
|
+
if (r = t(e), r === void 0 && (r = e), r === gs && (r = void 0), this.autoFreeze_ && Hs(r, !0), n) {
|
|
5202
5222
|
let t = [], i = [];
|
|
5203
|
-
$(
|
|
5223
|
+
$(qs).generateReplacementPatches_(e, r, {
|
|
5204
5224
|
patches_: t,
|
|
5205
5225
|
inversePatches_: i
|
|
5206
5226
|
}), n(t, i);
|
|
@@ -5217,18 +5237,18 @@ var Cc = class {
|
|
|
5217
5237
|
n,
|
|
5218
5238
|
r
|
|
5219
5239
|
];
|
|
5220
|
-
},
|
|
5240
|
+
}, Rs(e?.autoFreeze) && this.setAutoFreeze(e.autoFreeze), Rs(e?.useStrictShallowCopy) && this.setUseStrictShallowCopy(e.useStrictShallowCopy), Rs(e?.useStrictIteration) && this.setUseStrictIteration(e.useStrictIteration);
|
|
5221
5241
|
}
|
|
5222
5242
|
createDraft(e) {
|
|
5223
|
-
X(e) || K(8), Y(e) && (e =
|
|
5224
|
-
let t =
|
|
5225
|
-
return n[G].isManual_ = !0,
|
|
5243
|
+
X(e) || K(8), Y(e) && (e = Ec(e));
|
|
5244
|
+
let t = rc(this), n = Tc(t, e, void 0);
|
|
5245
|
+
return n[G].isManual_ = !0, nc(t), n;
|
|
5226
5246
|
}
|
|
5227
5247
|
finishDraft(e, t) {
|
|
5228
5248
|
let n = e && e[G];
|
|
5229
5249
|
(!n || !n.isManual_) && K(9);
|
|
5230
5250
|
let { scope_: r } = n;
|
|
5231
|
-
return
|
|
5251
|
+
return ec(r, t), ac(void 0, r);
|
|
5232
5252
|
}
|
|
5233
5253
|
setAutoFreeze(e) {
|
|
5234
5254
|
this.autoFreeze_ = e;
|
|
@@ -5252,37 +5272,37 @@ var Cc = class {
|
|
|
5252
5272
|
}
|
|
5253
5273
|
}
|
|
5254
5274
|
n > -1 && (t = t.slice(n + 1));
|
|
5255
|
-
let r = $(
|
|
5275
|
+
let r = $(qs).applyPatches_;
|
|
5256
5276
|
return Y(e) ? r(e, t) : this.produce(e, (e) => r(e, t));
|
|
5257
5277
|
}
|
|
5258
5278
|
};
|
|
5259
|
-
function
|
|
5260
|
-
let [i, a] =
|
|
5261
|
-
return (n?.scope_ ??
|
|
5279
|
+
function Tc(e, t, n, r) {
|
|
5280
|
+
let [i, a] = Fs(t) ? $(Ks).proxyMap_(t, n) : Is(t) ? $(Ks).proxySet_(t, n) : gc(t, n);
|
|
5281
|
+
return (n?.scope_ ?? Qs()).drafts_.push(i), a.callbacks_ = n?.callbacks_ ?? [], a.key_ = r, n && r !== void 0 ? fc(n, a, r) : a.callbacks_.push(function(e) {
|
|
5262
5282
|
e.mapSetPlugin_?.fixSetContents(a);
|
|
5263
5283
|
let { patchPlugin_: t } = e;
|
|
5264
5284
|
a.modified_ && t && t.generatePatches_(a, [], e);
|
|
5265
5285
|
}), i;
|
|
5266
5286
|
}
|
|
5267
|
-
function Tc(e) {
|
|
5268
|
-
return Y(e) || K(10, e), Ec(e);
|
|
5269
|
-
}
|
|
5270
5287
|
function Ec(e) {
|
|
5271
|
-
|
|
5288
|
+
return Y(e) || K(10, e), Dc(e);
|
|
5289
|
+
}
|
|
5290
|
+
function Dc(e) {
|
|
5291
|
+
if (!X(e) || Gs(e)) return e;
|
|
5272
5292
|
let t = e[G], n, r = !0;
|
|
5273
5293
|
if (t) {
|
|
5274
5294
|
if (!t.modified_) return t.base_;
|
|
5275
|
-
t.finalized_ = !0, n =
|
|
5276
|
-
} else n =
|
|
5277
|
-
return
|
|
5278
|
-
|
|
5295
|
+
t.finalized_ = !0, n = Vs(e, t.scope_.immer_.useStrictShallowCopy_), r = t.scope_.immer_.shouldUseStrictIteration();
|
|
5296
|
+
} else n = Vs(e, !0);
|
|
5297
|
+
return Os(n, (e, t) => {
|
|
5298
|
+
Ms(n, e, Dc(t));
|
|
5279
5299
|
}, r), t && (t.finalized_ = !1), n;
|
|
5280
5300
|
}
|
|
5281
|
-
new
|
|
5282
|
-
var
|
|
5301
|
+
new wc().produce;
|
|
5302
|
+
var Oc = (e) => e;
|
|
5283
5303
|
//#endregion
|
|
5284
5304
|
//#region src/state/generics/genericEntitySlice.ts
|
|
5285
|
-
function
|
|
5305
|
+
function kc(e, t, n, r) {
|
|
5286
5306
|
let i = {
|
|
5287
5307
|
entities: {
|
|
5288
5308
|
data: [],
|
|
@@ -5292,10 +5312,10 @@ function Oc(e, t, n, r) {
|
|
|
5292
5312
|
isLoading: !1,
|
|
5293
5313
|
currentPage: 1,
|
|
5294
5314
|
rowsPerPage: 100
|
|
5295
|
-
}, a =
|
|
5315
|
+
}, a = it(`${e}/filter`, async (r, { getState: i }) => {
|
|
5296
5316
|
let a = i()[e], o;
|
|
5297
5317
|
return o = n ? await n(a.currentPage, a.rowsPerPage, r, a.filterTypes) : await t.Filter(a.currentPage, a.rowsPerPage, r), o?.data;
|
|
5298
|
-
}), o =
|
|
5318
|
+
}), o = at({
|
|
5299
5319
|
name: e,
|
|
5300
5320
|
initialState: i,
|
|
5301
5321
|
reducers: {
|
|
@@ -5310,7 +5330,7 @@ function Oc(e, t, n, r) {
|
|
|
5310
5330
|
if (r) --e.entities.count, e.entities.data = e.entities.data?.filter((e) => e.id !== r);
|
|
5311
5331
|
else if (n) {
|
|
5312
5332
|
let t = e.entities.data?.findIndex((e) => e.id === n.id);
|
|
5313
|
-
t !== void 0 && t !== -1 ? e.entities.data && (e.entities.data[t] =
|
|
5333
|
+
t !== void 0 && t !== -1 ? e.entities.data && (e.entities.data[t] = Oc(n)) : (e.entities.count += 1, e.entities.data = [Oc(n), ...e.entities.data ?? []]);
|
|
5314
5334
|
}
|
|
5315
5335
|
},
|
|
5316
5336
|
...r || {}
|
|
@@ -5334,4 +5354,4 @@ function Oc(e, t, n, r) {
|
|
|
5334
5354
|
};
|
|
5335
5355
|
}
|
|
5336
5356
|
//#endregion
|
|
5337
|
-
export {
|
|
5357
|
+
export { La as Alert, Ba as AlertAction, za as AlertDescription, wa as AlertDialog, Pa as AlertDialogAction, Fa as AlertDialogCancel, Oa as AlertDialogContent, Na as AlertDialogDescription, Aa as AlertDialogFooter, ka as AlertDialogHeader, ja as AlertDialogMedia, Da as AlertDialogOverlay, Ea as AlertDialogPortal, Ma as AlertDialogTitle, Ta as AlertDialogTrigger, Ra as AlertTitle, ta as Avatar, ia as AvatarBadge, ra as AvatarFallback, aa as AvatarGroup, oa as AvatarGroupCount, na as AvatarImage, Ha as Badge, Gt as BaseInput, Ua as Breadcrumb, Ya as BreadcrumbEllipsis, Ga as BreadcrumbItem, Ka as BreadcrumbLink, Wa as BreadcrumbList, qa as BreadcrumbPage, Ja as BreadcrumbSeparator, F as Button, Nt as Calendar, Pt as CalendarDayButton, mn as Card, vn as CardAction, yn as CardContent, _n as CardDescription, bn as CardFooter, hn as CardHeader, gn as CardTitle, Cn as Carousel, wn as CarouselContent, Tn as CarouselItem, Dn as CarouselNext, En as CarouselPrevious, bt as ChangeDialog, $a as ChartContainer, ro as ChartLegend, io as ChartLegendContent, eo as ChartStyle, to as ChartTooltip, no as ChartTooltipContent, oo as Checkbox, so as Combobox, So as ComboboxChip, xo as ComboboxChips, Co as ComboboxChipsInput, vo as ComboboxCollection, po as ComboboxContent, yo as ComboboxEmpty, go as ComboboxGroup, fo as ComboboxInput, ho as ComboboxItem, _o as ComboboxLabel, mo as ComboboxList, bo as ComboboxSeparator, lo as ComboboxTrigger, co as ComboboxValue, Gi as Command, Ki as CommandDialog, Yi as CommandEmpty, Xi as CommandGroup, qi as CommandInput, Qi as CommandItem, Ji as CommandList, Zi as CommandSeparator, $i as CommandShortcut, rr as ContextMenu, pr as ContextMenuCheckboxItem, lr as ContextMenuContent, ar as ContextMenuGroup, ur as ContextMenuItem, hr as ContextMenuLabel, or as ContextMenuPortal, cr as ContextMenuRadioGroup, mr as ContextMenuRadioItem, gr as ContextMenuSeparator, _r as ContextMenuShortcut, sr as ContextMenuSub, fr as ContextMenuSubContent, dr as ContextMenuSubTrigger, ir as ContextMenuTrigger, Qn as CrudEmptyTablePreview, Ii as CrudPage, nr as CrudTable, vr as CrudTableBodyRow, yr as CrudTableCard, br as CrudTableHeader, xr as CrudTableHeaderRows, Pi as CrudTablePagination, Fi as CrudTableRowActionsMenu, Wt as DateField, Ht as DateInput, qt as DateTimeField, Kt as DateTimeInput, xt as DeleteDialog, I as Dialog, pt as DialogClose, ht as DialogContent, yt as DialogDescription, _t as DialogFooter, gt as DialogHeader, mt as DialogOverlay, ft as DialogPortal, vt as DialogTitle, dt as DialogTrigger, To as DirectionProvider, Do as Drawer, Ao as DrawerClose, Mo as DrawerContent, Io as DrawerDescription, Po as DrawerFooter, No as DrawerHeader, jo as DrawerOverlay, ko as DrawerPortal, Fo as DrawerTitle, Oo as DrawerTrigger, kr as DropdownMenu, Pr as DropdownMenuCheckboxItem, Mr as DropdownMenuContent, Nr as DropdownMenuGroup, B as DropdownMenuItem, Lr as DropdownMenuLabel, Ar as DropdownMenuPortal, Fr as DropdownMenuRadioGroup, Ir as DropdownMenuRadioItem, Rr as DropdownMenuSeparator, zr as DropdownMenuShortcut, Br as DropdownMenuSub, Hr as DropdownMenuSubContent, Vr as DropdownMenuSubTrigger, jr as DropdownMenuTrigger, ut as DynamicListContainer, Gn as Empty, Zn as EmptyContent, Xn as EmptyDescription, Kn as EmptyHeader, Jn as EmptyMedia, Yn as EmptyTitle, Vo as Field, Ho as FieldContent, Go as FieldDescription, qo as FieldError, zo as FieldGroup, Uo as FieldLabel, Ro as FieldLegend, Ko as FieldSeparator, Lo as FieldSet, Wo as FieldTitle, Yt as FieldsSection, R as FormField, z as Input, Xt as InputField, Li as InputGroup, zi as InputGroupAddon, Vi as InputGroupButton, Ui as InputGroupInput, Hi as InputGroupText, Wi as InputGroupTextarea, Ut as Label, Pn as Lightbox, Ca as Loading, Qt as NumberField, Zt as NumberInput, Sr as Pagination, Cr as PaginationContent, Or as PaginationEllipsis, wr as PaginationItem, Tr as PaginationLink, Dr as PaginationNext, Er as PaginationPrevious, $t as PasswordField, en as PhoneField, Ft as Popover, Rt as PopoverAnchor, Lt as PopoverContent, Vt as PopoverDescription, zt as PopoverHeader, Bt as PopoverTitle, It as PopoverTrigger, ot as ProtectedRoute, lt as SaveButton, Jo as ScrollArea, Yo as ScrollBar, In as SearchInput, ea as SearchableSelect, tn as Select, on as SelectContent, pn as SelectField, nn as SelectGroup, fn as SelectInput, cn as SelectItem, sn as SelectLabel, dn as SelectScrollDownButton, un as SelectScrollUpButton, ln as SelectSeparator, an as SelectTrigger, rn as SelectValue, L as Separator, Gr as Sheet, qr as SheetClose, Xr as SheetContent, ei as SheetDescription, Qr as SheetFooter, Zr as SheetHeader, $r as SheetTitle, Kr as SheetTrigger, sa as SideBarCompanyData, fa as SideBarMainMenu, _a as SideBarSecondaryMenu, va as SideBarUserData, mi as Sidebar, Si as SidebarContent, ba as SidebarContext, bi as SidebarFooter, Ci as SidebarGroup, Ti as SidebarGroupAction, Ei as SidebarGroupContent, wi as SidebarGroupLabel, yi as SidebarHeader, vi as SidebarInput, _i as SidebarInset, ca as SidebarLogo, H as SidebarMenu, Oi as SidebarMenuAction, ki as SidebarMenuBadge, W as SidebarMenuButton, U as SidebarMenuItem, Ai as SidebarMenuSkeleton, ji as SidebarMenuSub, Ni as SidebarMenuSubButton, Mi as SidebarMenuSubItem, pi as SidebarProvider, gi as SidebarRail, xi as SidebarSeparator, hi as SidebarTrigger, ti as Skeleton, kn as StorageFileField, Zo as Switch, Ln as Table, zn as TableBody, Wn as TableCaption, Un as TableCell, Bn as TableFooter, Hn as TableHead, Rn as TableHeader, Vn as TableRow, Qo as Tabs, ns as TabsContent, es as TabsList, ts as TabsTrigger, Mn as TextAreaField, jn as TextAreaInput, Nn as TextField, An as Textarea, ma as ThemeProvider, ga as ThemeToggle, Jt as TitleSeparator, Xo as Toaster, is as Toggle, os as ToggleGroup, ss as ToggleGroupItem, ri as Tooltip, ai as TooltipContent, ni as TooltipProvider, ii as TooltipTrigger, st as YusrBusBackground, Sa as YusrSideBar, ya as YusrSideBarMainMenu, Fn as ZoomableImage, Va as badgeVariants, ct as buttonVariants, P as cn, hs as createGenericDialogSlice, kc as createGenericEntitySlice, On as isPDF, ms as setupAuthListeners, $o as tabsListVariants, rs as toggleVariants, Sn as useCarousel, wo as useComboboxAnchor, cs as useDialog, Eo as useDirection, ls as useDynamicList, ds as useEntityForm, us as useFormValidation, Wr as useIsMobile, fs as useLightBox, V as useSidebar, xa as useSidebarContext, ps as useStorageFile, ha as useTheme };
|