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