@sonamu-kit/react-components 0.4.3 → 0.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (220) hide show
  1. package/dist/.storybook/main.d.ts +3 -0
  2. package/dist/.storybook/preview.d.ts +3 -0
  3. package/dist/_virtual/~icons/lucide/arrow-left.js +21 -0
  4. package/dist/_virtual/~icons/lucide/arrow-left.js.map +1 -0
  5. package/dist/_virtual/~icons/lucide/arrow-right.js +21 -0
  6. package/dist/_virtual/~icons/lucide/arrow-right.js.map +1 -0
  7. package/dist/_virtual/~icons/lucide/calendar.js +31 -0
  8. package/dist/_virtual/~icons/lucide/calendar.js.map +1 -0
  9. package/dist/_virtual/~icons/lucide/check.js +21 -0
  10. package/dist/_virtual/~icons/lucide/check.js.map +1 -0
  11. package/dist/_virtual/~icons/lucide/chevron-down.js +21 -0
  12. package/dist/_virtual/~icons/lucide/chevron-down.js.map +1 -0
  13. package/dist/_virtual/~icons/lucide/chevron-left.js +21 -0
  14. package/dist/_virtual/~icons/lucide/chevron-left.js.map +1 -0
  15. package/dist/_virtual/~icons/lucide/chevron-right.js +21 -0
  16. package/dist/_virtual/~icons/lucide/chevron-right.js.map +1 -0
  17. package/dist/_virtual/~icons/lucide/chevrons-up-down.js +21 -0
  18. package/dist/_virtual/~icons/lucide/chevrons-up-down.js.map +1 -0
  19. package/dist/_virtual/~icons/lucide/circle.js +23 -0
  20. package/dist/_virtual/~icons/lucide/circle.js.map +1 -0
  21. package/dist/_virtual/~icons/lucide/dot.js +23 -0
  22. package/dist/_virtual/~icons/lucide/dot.js.map +1 -0
  23. package/dist/_virtual/~icons/lucide/grip-vertical.js +52 -0
  24. package/dist/_virtual/~icons/lucide/grip-vertical.js.map +1 -0
  25. package/dist/_virtual/~icons/lucide/image.js +36 -0
  26. package/dist/_virtual/~icons/lucide/image.js.map +1 -0
  27. package/dist/_virtual/~icons/lucide/loader-2.js +21 -0
  28. package/dist/_virtual/~icons/lucide/loader-2.js.map +1 -0
  29. package/dist/_virtual/~icons/lucide/loader2.js +21 -0
  30. package/dist/_virtual/~icons/lucide/loader2.js.map +1 -0
  31. package/dist/_virtual/~icons/lucide/more-horizontal.js +37 -0
  32. package/dist/_virtual/~icons/lucide/more-horizontal.js.map +1 -0
  33. package/dist/_virtual/~icons/lucide/panel-left.js +27 -0
  34. package/dist/_virtual/~icons/lucide/panel-left.js.map +1 -0
  35. package/dist/_virtual/~icons/lucide/plus.js +21 -0
  36. package/dist/_virtual/~icons/lucide/plus.js.map +1 -0
  37. package/dist/_virtual/~icons/lucide/search.js +25 -0
  38. package/dist/_virtual/~icons/lucide/search.js.map +1 -0
  39. package/dist/_virtual/~icons/lucide/trash-2.js +21 -0
  40. package/dist/_virtual/~icons/lucide/trash-2.js.map +1 -0
  41. package/dist/_virtual/~icons/lucide/upload.js +21 -0
  42. package/dist/_virtual/~icons/lucide/upload.js.map +1 -0
  43. package/dist/_virtual/~icons/lucide/x-circle.js +25 -0
  44. package/dist/_virtual/~icons/lucide/x-circle.js.map +1 -0
  45. package/dist/_virtual/~icons/lucide/x.js +21 -0
  46. package/dist/_virtual/~icons/lucide/x.js.map +1 -0
  47. package/dist/components/index.js +61 -0
  48. package/dist/components/ui/accordion.js +37 -0
  49. package/dist/components/ui/accordion.js.map +1 -0
  50. package/dist/components/ui/alert-dialog.js +56 -0
  51. package/dist/components/ui/alert-dialog.js.map +1 -0
  52. package/dist/components/ui/alert.js +33 -0
  53. package/dist/components/ui/alert.js.map +1 -0
  54. package/dist/components/ui/aspect-ratio.js +7 -0
  55. package/dist/components/ui/aspect-ratio.js.map +1 -0
  56. package/dist/components/ui/avatar.js +27 -0
  57. package/dist/components/ui/avatar.js.map +1 -0
  58. package/dist/components/ui/badge.js +24 -0
  59. package/dist/components/ui/badge.js.map +1 -0
  60. package/dist/components/ui/breadcrumb.js +63 -0
  61. package/dist/components/ui/breadcrumb.js.map +1 -0
  62. package/dist/components/ui/button.js +59 -0
  63. package/dist/components/ui/button.js.map +1 -0
  64. package/dist/components/ui/calendar.js +49 -0
  65. package/dist/components/ui/calendar.js.map +1 -0
  66. package/dist/components/ui/card.js +56 -0
  67. package/dist/components/ui/card.js.map +1 -0
  68. package/dist/components/ui/carousel.js +119 -0
  69. package/dist/components/ui/carousel.js.map +1 -0
  70. package/dist/components/ui/checkbox.js +56 -0
  71. package/dist/components/ui/checkbox.js.map +1 -0
  72. package/dist/components/ui/collapsible.js +7 -0
  73. package/dist/components/ui/collapsible.js.map +1 -0
  74. package/dist/components/ui/combobox.js +68 -0
  75. package/dist/components/ui/combobox.js.map +1 -0
  76. package/dist/components/ui/command.js +76 -0
  77. package/dist/components/ui/command.js.map +1 -0
  78. package/dist/components/ui/common-modal.js +64 -0
  79. package/dist/components/ui/common-modal.js.map +1 -0
  80. package/dist/components/ui/context-menu.js +75 -0
  81. package/dist/components/ui/context-menu.js.map +1 -0
  82. package/dist/components/ui/date-input.js +15 -0
  83. package/dist/components/ui/date-input.js.map +1 -0
  84. package/dist/components/ui/date-picker.js +105 -0
  85. package/dist/components/ui/date-picker.js.map +1 -0
  86. package/dist/components/ui/dialog.js +52 -0
  87. package/dist/components/ui/dialog.js.map +1 -0
  88. package/dist/components/ui/drawer.js +50 -0
  89. package/dist/components/ui/drawer.js.map +1 -0
  90. package/dist/components/ui/dropdown-menu.js +77 -0
  91. package/dist/components/ui/dropdown-menu.js.map +1 -0
  92. package/dist/components/ui/file-input.js +268 -0
  93. package/dist/components/ui/file-input.js.map +1 -0
  94. package/dist/components/ui/form.js +81 -0
  95. package/dist/components/ui/form.js.map +1 -0
  96. package/dist/components/ui/hover-card.js +17 -0
  97. package/dist/components/ui/hover-card.js.map +1 -0
  98. package/dist/components/ui/input-otp.js +43 -0
  99. package/dist/components/ui/input-otp.js.map +1 -0
  100. package/dist/components/ui/input.js +22 -0
  101. package/dist/components/ui/input.js.map +1 -0
  102. package/dist/components/ui/label.js +16 -0
  103. package/dist/components/ui/label.js.map +1 -0
  104. package/dist/components/ui/menubar.js +108 -0
  105. package/dist/components/ui/menubar.js.map +1 -0
  106. package/dist/components/ui/month-picker-multiple.js +236 -0
  107. package/dist/components/ui/month-picker-multiple.js.map +1 -0
  108. package/dist/components/ui/navigation-menu.js +60 -0
  109. package/dist/components/ui/navigation-menu.js.map +1 -0
  110. package/dist/components/ui/pagination.js +55 -0
  111. package/dist/components/ui/pagination.js.map +1 -0
  112. package/dist/components/ui/popover.js +36 -0
  113. package/dist/components/ui/popover.js.map +1 -0
  114. package/dist/components/ui/progress.js +20 -0
  115. package/dist/components/ui/progress.js.map +1 -0
  116. package/dist/components/ui/radio-group.js +26 -0
  117. package/dist/components/ui/radio-group.js.map +1 -0
  118. package/dist/components/ui/range-number-input.js +41 -0
  119. package/dist/components/ui/range-number-input.js.map +1 -0
  120. package/dist/components/ui/resizable.js +21 -0
  121. package/dist/components/ui/resizable.js.map +1 -0
  122. package/dist/components/ui/scroll-area.js +32 -0
  123. package/dist/components/ui/scroll-area.js.map +1 -0
  124. package/dist/components/ui/select/enum-select.js +43 -0
  125. package/dist/components/ui/select/enum-select.js.map +1 -0
  126. package/dist/components/ui/select/id-async-select.js +160 -0
  127. package/dist/components/ui/select/id-async-select.js.map +1 -0
  128. package/dist/components/ui/select/select.js +337 -0
  129. package/dist/components/ui/select/select.js.map +1 -0
  130. package/dist/components/ui/separator.js +17 -0
  131. package/dist/components/ui/separator.js.map +1 -0
  132. package/dist/components/ui/sheet.js +60 -0
  133. package/dist/components/ui/sheet.js.map +1 -0
  134. package/dist/components/ui/sidebar.js +347 -0
  135. package/dist/components/ui/sidebar.js.map +1 -0
  136. package/dist/components/ui/skeleton.js +13 -0
  137. package/dist/components/ui/skeleton.js.map +1 -0
  138. package/dist/components/ui/slider.js +37 -0
  139. package/dist/components/ui/slider.js.map +1 -0
  140. package/dist/components/ui/sonamu-filter/constants.js +31 -0
  141. package/dist/components/ui/sonamu-filter/constants.js.map +1 -0
  142. package/dist/components/ui/sonamu-filter/rule-row-input.js +76 -0
  143. package/dist/components/ui/sonamu-filter/rule-row-input.js.map +1 -0
  144. package/dist/components/ui/sonamu-filter/sonamu-filter-modal.js +112 -0
  145. package/dist/components/ui/sonamu-filter/sonamu-filter-modal.js.map +1 -0
  146. package/dist/components/ui/sonamu-filter/sonamu-filter-popover.js +60 -0
  147. package/dist/components/ui/sonamu-filter/sonamu-filter-popover.js.map +1 -0
  148. package/dist/components/ui/sonamu-filter/utils.js +40 -0
  149. package/dist/components/ui/sonamu-filter/utils.js.map +1 -0
  150. package/dist/components/ui/sonamu-filter/value-input.js +101 -0
  151. package/dist/components/ui/sonamu-filter/value-input.js.map +1 -0
  152. package/dist/components/ui/switch.js +33 -0
  153. package/dist/components/ui/switch.js.map +1 -0
  154. package/dist/components/ui/table.js +70 -0
  155. package/dist/components/ui/table.js.map +1 -0
  156. package/dist/components/ui/tabs.js +27 -0
  157. package/dist/components/ui/tabs.js.map +1 -0
  158. package/dist/components/ui/tag-input.js +57 -0
  159. package/dist/components/ui/tag-input.js.map +1 -0
  160. package/dist/components/ui/textarea.js +20 -0
  161. package/dist/components/ui/textarea.js.map +1 -0
  162. package/dist/components/ui/toast.js +55 -0
  163. package/dist/components/ui/toast.js.map +1 -0
  164. package/dist/components/ui/toaster.js +22 -0
  165. package/dist/components/ui/toaster.js.map +1 -0
  166. package/dist/components/ui/toggle-group.js +39 -0
  167. package/dist/components/ui/toggle-group.js.map +1 -0
  168. package/dist/components/ui/toggle.js +42 -0
  169. package/dist/components/ui/toggle.js.map +1 -0
  170. package/dist/components/ui/tooltip.js +16 -0
  171. package/dist/components/ui/tooltip.js.map +1 -0
  172. package/dist/contexts/index.d.ts +1 -1
  173. package/dist/contexts/index.js +2 -0
  174. package/dist/contexts/sonamu-context.js +28 -0
  175. package/dist/contexts/sonamu-context.js.map +1 -0
  176. package/dist/contexts/types.d.ts +2 -1
  177. package/dist/demo/App.d.ts +2 -0
  178. package/dist/demo/Layout.d.ts +2 -0
  179. package/dist/demo/components/FormDebugPanel.d.ts +11 -0
  180. package/dist/demo/main.d.ts +0 -0
  181. package/dist/demo/routeTree.gen.d.ts +102 -0
  182. package/dist/demo/routes/__root.d.ts +1 -0
  183. package/dist/demo/routes/data-display.d.ts +1 -0
  184. package/dist/demo/routes/dialogs-alerts.d.ts +1 -0
  185. package/dist/demo/routes/form.d.ts +1 -0
  186. package/dist/demo/routes/index.d.ts +1 -0
  187. package/dist/demo/routes/layout.d.ts +1 -0
  188. package/dist/demo/routes/navigation.d.ts +1 -0
  189. package/dist/demo/schemas/data-display-demo.schema.d.ts +20 -0
  190. package/dist/demo/schemas/dialogs-alerts-demo.schema.d.ts +32 -0
  191. package/dist/demo/schemas/form-demo.schema.d.ts +33 -0
  192. package/dist/hooks/index.js +2 -0
  193. package/dist/hooks/use-toast.js +112 -0
  194. package/dist/hooks/use-toast.js.map +1 -0
  195. package/dist/i18n/rc-keys.js +75 -0
  196. package/dist/i18n/rc-keys.js.map +1 -0
  197. package/dist/index.js +70 -0
  198. package/dist/lib/base-helpers.js +43 -0
  199. package/dist/lib/base-helpers.js.map +1 -0
  200. package/dist/lib/caster.js +27 -0
  201. package/dist/lib/caster.js.map +1 -0
  202. package/dist/lib/form-helpers.js +74 -0
  203. package/dist/lib/form-helpers.js.map +1 -0
  204. package/dist/lib/index.js +9 -0
  205. package/dist/lib/list-helpers.js +70 -0
  206. package/dist/lib/list-helpers.js.map +1 -0
  207. package/dist/lib/modal-helpers.js +30 -0
  208. package/dist/lib/modal-helpers.js.map +1 -0
  209. package/dist/lib/types.js +86 -0
  210. package/dist/lib/types.js.map +1 -0
  211. package/dist/lib/use-mobile.js +16 -0
  212. package/dist/lib/use-mobile.js.map +1 -0
  213. package/dist/lib/utils.js +23 -0
  214. package/dist/lib/utils.js.map +1 -0
  215. package/dist/router/index.d.ts +1 -0
  216. package/dist/router/index.js +1 -0
  217. package/dist/styles/globals.css +1 -1
  218. package/package.json +16 -12
  219. package/dist/react-components.es.js +0 -4488
  220. package/dist/react-components.es.js.map +0 -1
@@ -1,4488 +0,0 @@
1
- import * as e from "react";
2
- import t, { createContext as n, useCallback as r, useContext as i, useEffect as a, useImperativeHandle as o, useMemo as s, useRef as c, useState as l } from "react";
3
- import * as u from "@radix-ui/react-accordion";
4
- import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
5
- import { clsx as m } from "clsx";
6
- import { twMerge as h } from "tailwind-merge";
7
- import { cva as g } from "class-variance-authority";
8
- import * as _ from "@radix-ui/react-alert-dialog";
9
- import { Slot as v } from "@radix-ui/react-slot";
10
- import * as y from "@radix-ui/react-aspect-ratio";
11
- import * as b from "@radix-ui/react-avatar";
12
- import { DayPicker as x } from "react-day-picker";
13
- import S from "embla-carousel-react";
14
- import * as C from "@radix-ui/react-checkbox";
15
- import * as w from "@radix-ui/react-collapsible";
16
- import { createAuthClient as T } from "better-auth/react";
17
- import { Command as E } from "cmdk";
18
- import * as D from "@radix-ui/react-dialog";
19
- import * as O from "@radix-ui/react-popover";
20
- import { atom as k, useAtom as A } from "jotai";
21
- import * as j from "@radix-ui/react-context-menu";
22
- import { format as M } from "date-fns";
23
- import { Drawer as N } from "vaul";
24
- import * as P from "@radix-ui/react-dropdown-menu";
25
- import { FileIcon as F, defaultStyles as ee } from "react-file-icon";
26
- import { Controller as te, FormProvider as I, useFormContext as ne } from "react-hook-form";
27
- import * as re from "@radix-ui/react-label";
28
- import * as ie from "@radix-ui/react-hover-card";
29
- import { OTPInput as ae, OTPInputContext as oe } from "input-otp";
30
- import * as L from "@radix-ui/react-menubar";
31
- import * as se from "@radix-ui/react-separator";
32
- import * as R from "@radix-ui/react-navigation-menu";
33
- import * as ce from "@radix-ui/react-progress";
34
- import * as z from "@radix-ui/react-radio-group";
35
- import * as le from "react-resizable-panels";
36
- import * as B from "@radix-ui/react-scroll-area";
37
- import { useQueryClient as ue } from "@tanstack/react-query";
38
- import * as V from "@radix-ui/react-tooltip";
39
- import * as de from "@radix-ui/react-slider";
40
- import fe from "qs";
41
- import { get as pe, isObject as me, set as he, unique as ge } from "radashi";
42
- import { z as H } from "zod";
43
- import { useNavigate as _e, useSearch as ve } from "@tanstack/react-router";
44
- import ye from "fast-deep-equal";
45
- import * as be from "@radix-ui/react-switch";
46
- import * as U from "@radix-ui/react-tabs";
47
- import * as W from "@radix-ui/react-toast";
48
- import * as xe from "@radix-ui/react-toggle";
49
- import * as Se from "@radix-ui/react-toggle-group";
50
- //#region src/hooks/use-toast.ts
51
- var Ce = 1, we = 1e6, Te = 0;
52
- function Ee() {
53
- return Te = (Te + 1) % (2 ** 53 - 1), Te.toString();
54
- }
55
- var De = /* @__PURE__ */ new Map(), Oe = (e) => {
56
- if (De.has(e)) return;
57
- let t = setTimeout(() => {
58
- De.delete(e), Me({
59
- type: "REMOVE_TOAST",
60
- toastId: e
61
- });
62
- }, we);
63
- De.set(e, t);
64
- }, ke = (e, t) => {
65
- switch (t.type) {
66
- case "ADD_TOAST": return {
67
- ...e,
68
- toasts: [t.toast, ...e.toasts].slice(0, Ce)
69
- };
70
- case "UPDATE_TOAST": return {
71
- ...e,
72
- toasts: e.toasts.map((e) => e.id === t.toast.id ? {
73
- ...e,
74
- ...t.toast
75
- } : e)
76
- };
77
- case "DISMISS_TOAST": {
78
- let { toastId: n } = t;
79
- return n ? Oe(n) : e.toasts.forEach((e) => {
80
- Oe(e.id);
81
- }), {
82
- ...e,
83
- toasts: e.toasts.map((e) => e.id === n || n === void 0 ? {
84
- ...e,
85
- open: !1
86
- } : e)
87
- };
88
- }
89
- case "REMOVE_TOAST": return t.toastId === void 0 ? {
90
- ...e,
91
- toasts: []
92
- } : {
93
- ...e,
94
- toasts: e.toasts.filter((e) => e.id !== t.toastId)
95
- };
96
- }
97
- }, Ae = [], je = { toasts: [] };
98
- function Me(e) {
99
- je = ke(je, e), Ae.forEach((e) => {
100
- e(je);
101
- });
102
- }
103
- function Ne({ ...e }) {
104
- let t = Ee(), n = (e) => Me({
105
- type: "UPDATE_TOAST",
106
- toast: {
107
- ...e,
108
- id: t
109
- }
110
- }), r = () => Me({
111
- type: "DISMISS_TOAST",
112
- toastId: t
113
- });
114
- return Me({
115
- type: "ADD_TOAST",
116
- toast: {
117
- ...e,
118
- id: t,
119
- open: !0,
120
- onOpenChange: (e) => {
121
- e || r();
122
- }
123
- }
124
- }), {
125
- id: t,
126
- dismiss: r,
127
- update: n
128
- };
129
- }
130
- function Pe() {
131
- let [t, n] = e.useState(je);
132
- return e.useEffect(() => (Ae.push(n), () => {
133
- let e = Ae.indexOf(n);
134
- e > -1 && Ae.splice(e, 1);
135
- }), []), {
136
- ...t,
137
- toast: Ne,
138
- dismiss: (e) => Me({
139
- type: "DISMISS_TOAST",
140
- toastId: e
141
- })
142
- };
143
- }
144
- //#endregion
145
- //#region ~icons/lucide/chevron-down.jsx
146
- var Fe = (e) => /* @__PURE__ */ f("svg", {
147
- viewBox: "0 0 24 24",
148
- width: "1.2em",
149
- height: "1.2em",
150
- ...e,
151
- children: /* @__PURE__ */ f("path", {
152
- fill: "none",
153
- stroke: "currentColor",
154
- strokeLinecap: "round",
155
- strokeLinejoin: "round",
156
- strokeWidth: 2,
157
- d: "m6 9l6 6l6-6"
158
- })
159
- });
160
- //#endregion
161
- //#region src/lib/utils.ts
162
- function G(...e) {
163
- return h(m(e));
164
- }
165
- function Ie(e) {
166
- return e === void 0 ? void 0 : Array.isArray(e) ? e : [e];
167
- }
168
- function Le(e) {
169
- let [t, n] = l([]);
170
- return a(() => {
171
- let t = e.map((e) => URL.createObjectURL(e));
172
- return n(t), () => {
173
- for (let e of t) URL.revokeObjectURL(e);
174
- };
175
- }, [s(() => e.map((e) => `${e.name}:${e.size}:${e.lastModified}`).join("|"), [e])]), t;
176
- }
177
- //#endregion
178
- //#region src/components/ui/accordion.tsx
179
- var Re = u.Root, ze = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(u.Item, {
180
- ref: n,
181
- className: G("border-b", e),
182
- ...t
183
- }));
184
- ze.displayName = "AccordionItem";
185
- var Be = e.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ f(u.Header, {
186
- className: "flex",
187
- children: /* @__PURE__ */ p(u.Trigger, {
188
- ref: r,
189
- className: G("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180", e),
190
- ...n,
191
- children: [t, /* @__PURE__ */ f(Fe, { className: "h-4 w-4 shrink-0 transition-transform duration-200" })]
192
- })
193
- }));
194
- Be.displayName = u.Trigger.displayName;
195
- var Ve = e.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ f(u.Content, {
196
- ref: r,
197
- className: "overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
198
- ...n,
199
- children: /* @__PURE__ */ f("div", {
200
- className: G("pb-4 pt-0", e),
201
- children: t
202
- })
203
- }));
204
- Ve.displayName = u.Content.displayName;
205
- var He = g("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground", {
206
- variants: { variant: {
207
- default: "bg-background text-foreground",
208
- destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"
209
- } },
210
- defaultVariants: { variant: "default" }
211
- }), Ue = e.forwardRef(({ className: e, variant: t, ...n }, r) => /* @__PURE__ */ f("div", {
212
- ref: r,
213
- role: "alert",
214
- className: G(He({ variant: t }), e),
215
- ...n
216
- }));
217
- Ue.displayName = "Alert";
218
- var We = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f("h5", {
219
- ref: n,
220
- className: G("mb-1 font-medium leading-none tracking-tight", e),
221
- ...t
222
- }));
223
- We.displayName = "AlertTitle";
224
- var Ge = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f("div", {
225
- ref: n,
226
- className: G("text-sm [&_p]:leading-relaxed", e),
227
- ...t
228
- }));
229
- Ge.displayName = "AlertDescription";
230
- //#endregion
231
- //#region ~icons/lucide/loader-2.jsx
232
- var Ke = (e) => /* @__PURE__ */ f("svg", {
233
- viewBox: "0 0 24 24",
234
- width: "1.2em",
235
- height: "1.2em",
236
- ...e,
237
- children: /* @__PURE__ */ f("path", {
238
- fill: "none",
239
- stroke: "currentColor",
240
- strokeLinecap: "round",
241
- strokeLinejoin: "round",
242
- strokeWidth: 2,
243
- d: "M21 12a9 9 0 1 1-6.219-8.56"
244
- })
245
- }), qe = g("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-button text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-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 cursor-pointer", {
246
- variants: {
247
- variant: {
248
- default: "bg-primary text-primary-foreground hover:bg-primary/90",
249
- destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
250
- outline: "border bg-background text-foreground hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
251
- secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
252
- ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
253
- link: "text-primary underline-offset-4 hover:underline",
254
- red: "bg-red-500 text-white hover:bg-red-600",
255
- yellow: "bg-yellow-500 text-white hover:bg-yellow-600",
256
- green: "bg-green-500 text-white hover:bg-green-600",
257
- blue: "bg-blue-500 text-white hover:bg-blue-600",
258
- cyan: "bg-cyan-500 text-white hover:bg-cyan-600",
259
- purple: "bg-purple-500 text-white hover:bg-purple-600",
260
- pink: "bg-pink-500 text-white hover:bg-pink-600",
261
- orange: "bg-orange-500 text-white hover:bg-orange-600"
262
- },
263
- size: {
264
- xs: "h-6 px-2 py-1 text-xs [&_svg]:size-3 has-[>svg]:px-1.5 has-[>svg:only-child]:px-0 has-[>svg:only-child]:aspect-square",
265
- sm: "h-7 px-3 py-1.5 text-xs [&_svg]:size-3.5 has-[>svg]:px-2 has-[>svg:only-child]:px-0 has-[>svg:only-child]:aspect-square",
266
- default: "h-9 px-4 py-2 [&_svg]:size-4 has-[>svg]:px-3 has-[>svg:only-child]:px-0 has-[>svg:only-child]:aspect-square",
267
- lg: "h-11 px-6 py-3 text-base [&_svg]:size-5 has-[>svg]:px-4 has-[>svg:only-child]:px-0 has-[>svg:only-child]:aspect-square",
268
- xl: "h-13 px-8 py-4 text-lg [&_svg]:size-6 has-[>svg]:px-6 has-[>svg:only-child]:px-0 has-[>svg:only-child]:aspect-square"
269
- }
270
- },
271
- defaultVariants: {
272
- variant: "default",
273
- size: "default"
274
- }
275
- }), K = e.forwardRef(({ className: t, variant: n, size: r, icon: i, children: a, loading: o, disabled: s, asChild: c = !1, ...l }, u) => {
276
- let d = c ? v : "button", m = e.Children.count(a) === 0, h = o ? /* @__PURE__ */ f(Ke, { className: "animate-spin" }) : i;
277
- return /* @__PURE__ */ f(d, {
278
- "data-slot": "button",
279
- className: G(qe({
280
- variant: n,
281
- size: r,
282
- className: t
283
- })),
284
- ref: u,
285
- disabled: s || o,
286
- ...l,
287
- children: m ? h : h ? /* @__PURE__ */ p("span", {
288
- className: "contents",
289
- children: [h, a]
290
- }) : a
291
- });
292
- });
293
- K.displayName = "Button";
294
- //#endregion
295
- //#region src/components/ui/alert-dialog.tsx
296
- var Je = _.Root, Ye = _.Trigger, Xe = _.Portal, Ze = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(_.Overlay, {
297
- className: G("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", e),
298
- ...t,
299
- ref: n
300
- }));
301
- Ze.displayName = _.Overlay.displayName;
302
- var Qe = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p(Xe, { children: [/* @__PURE__ */ f(Ze, {}), /* @__PURE__ */ f(_.Content, {
303
- ref: n,
304
- className: G("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg", e),
305
- ...t
306
- })] }));
307
- Qe.displayName = _.Content.displayName;
308
- var $e = ({ className: e, ...t }) => /* @__PURE__ */ f("div", {
309
- className: G("flex flex-col space-y-2 text-center sm:text-left", e),
310
- ...t
311
- });
312
- $e.displayName = "AlertDialogHeader";
313
- var et = ({ className: e, ...t }) => /* @__PURE__ */ f("div", {
314
- className: G("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e),
315
- ...t
316
- });
317
- et.displayName = "AlertDialogFooter";
318
- var tt = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(_.Title, {
319
- ref: n,
320
- className: G("text-lg font-semibold", e),
321
- ...t
322
- }));
323
- tt.displayName = _.Title.displayName;
324
- var nt = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(_.Description, {
325
- ref: n,
326
- className: G("text-sm text-muted-foreground", e),
327
- ...t
328
- }));
329
- nt.displayName = _.Description.displayName;
330
- var rt = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(_.Action, {
331
- ref: n,
332
- className: G(qe(), e),
333
- ...t
334
- }));
335
- rt.displayName = _.Action.displayName;
336
- var it = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(_.Cancel, {
337
- ref: n,
338
- className: G(qe({ variant: "outline" }), "mt-2 sm:mt-0", e),
339
- ...t
340
- }));
341
- it.displayName = _.Cancel.displayName;
342
- //#endregion
343
- //#region src/components/ui/aspect-ratio.tsx
344
- var at = y.Root, ot = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(b.Root, {
345
- ref: n,
346
- className: G("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", e),
347
- ...t
348
- }));
349
- ot.displayName = b.Root.displayName;
350
- var st = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(b.Image, {
351
- ref: n,
352
- className: G("aspect-square h-full w-full", e),
353
- ...t
354
- }));
355
- st.displayName = b.Image.displayName;
356
- var ct = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(b.Fallback, {
357
- ref: n,
358
- className: G("flex h-full w-full items-center justify-center rounded-full bg-muted", e),
359
- ...t
360
- }));
361
- ct.displayName = b.Fallback.displayName;
362
- var lt = g("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>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 transition-[color,box-shadow] overflow-hidden", {
363
- variants: { variant: {
364
- default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
365
- secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
366
- destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
367
- outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
368
- } },
369
- defaultVariants: { variant: "default" }
370
- });
371
- function ut({ className: e, variant: t, asChild: n = !1, ...r }) {
372
- return /* @__PURE__ */ f(n ? v : "span", {
373
- "data-slot": "badge",
374
- className: G(lt({ variant: t }), e),
375
- ...r
376
- });
377
- }
378
- //#endregion
379
- //#region ~icons/lucide/chevron-right.jsx
380
- var dt = (e) => /* @__PURE__ */ f("svg", {
381
- viewBox: "0 0 24 24",
382
- width: "1.2em",
383
- height: "1.2em",
384
- ...e,
385
- children: /* @__PURE__ */ f("path", {
386
- fill: "none",
387
- stroke: "currentColor",
388
- strokeLinecap: "round",
389
- strokeLinejoin: "round",
390
- strokeWidth: 2,
391
- d: "m9 18l6-6l-6-6"
392
- })
393
- }), ft = (e) => /* @__PURE__ */ f("svg", {
394
- viewBox: "0 0 24 24",
395
- width: "1.2em",
396
- height: "1.2em",
397
- ...e,
398
- children: /* @__PURE__ */ p("g", {
399
- fill: "none",
400
- stroke: "currentColor",
401
- strokeLinecap: "round",
402
- strokeLinejoin: "round",
403
- strokeWidth: 2,
404
- children: [
405
- /* @__PURE__ */ f("circle", {
406
- cx: 12,
407
- cy: 12,
408
- r: 1
409
- }),
410
- /* @__PURE__ */ f("circle", {
411
- cx: 19,
412
- cy: 12,
413
- r: 1
414
- }),
415
- /* @__PURE__ */ f("circle", {
416
- cx: 5,
417
- cy: 12,
418
- r: 1
419
- })
420
- ]
421
- })
422
- }), pt = e.forwardRef(({ ...e }, t) => /* @__PURE__ */ f("nav", {
423
- ref: t,
424
- "aria-label": "breadcrumb",
425
- ...e
426
- }));
427
- pt.displayName = "Breadcrumb";
428
- var mt = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f("ol", {
429
- ref: n,
430
- className: G("flex flex-wrap items-center gap-1.5 overflow-wrap-anywhere text-sm text-muted-foreground sm:gap-2.5", e),
431
- ...t
432
- }));
433
- mt.displayName = "BreadcrumbList";
434
- var ht = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f("li", {
435
- ref: n,
436
- className: G("inline-flex items-center gap-1.5", e),
437
- ...t
438
- }));
439
- ht.displayName = "BreadcrumbItem";
440
- var gt = e.forwardRef(({ asChild: e, className: t, ...n }, r) => /* @__PURE__ */ f(e ? v : "a", {
441
- ref: r,
442
- className: G("transition-colors hover:text-foreground", t),
443
- ...n
444
- }));
445
- gt.displayName = "BreadcrumbLink";
446
- var _t = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f("span", {
447
- ref: n,
448
- role: "link",
449
- "aria-disabled": "true",
450
- "aria-current": "page",
451
- className: G("font-normal text-foreground", e),
452
- ...t
453
- }));
454
- _t.displayName = "BreadcrumbPage";
455
- var vt = ({ children: e, className: t, ...n }) => /* @__PURE__ */ f("li", {
456
- role: "presentation",
457
- "aria-hidden": "true",
458
- className: G("[&>svg]:w-3.5 [&>svg]:h-3.5", t),
459
- ...n,
460
- children: e ?? /* @__PURE__ */ f(dt, {})
461
- });
462
- vt.displayName = "BreadcrumbSeparator";
463
- var yt = ({ className: e, ...t }) => /* @__PURE__ */ p("span", {
464
- role: "presentation",
465
- "aria-hidden": "true",
466
- className: G("flex h-9 w-9 items-center justify-center", e),
467
- ...t,
468
- children: [/* @__PURE__ */ f(ft, { className: "h-4 w-4" }), /* @__PURE__ */ f("span", {
469
- className: "sr-only",
470
- children: "More"
471
- })]
472
- });
473
- yt.displayName = "BreadcrumbElipssis";
474
- //#endregion
475
- //#region ~icons/lucide/chevron-left.jsx
476
- var bt = (e) => /* @__PURE__ */ f("svg", {
477
- viewBox: "0 0 24 24",
478
- width: "1.2em",
479
- height: "1.2em",
480
- ...e,
481
- children: /* @__PURE__ */ f("path", {
482
- fill: "none",
483
- stroke: "currentColor",
484
- strokeLinecap: "round",
485
- strokeLinejoin: "round",
486
- strokeWidth: 2,
487
- d: "m15 18l-6-6l6-6"
488
- })
489
- });
490
- //#endregion
491
- //#region src/components/ui/calendar.tsx
492
- function xt({ className: e, classNames: t, showOutsideDays: n = !0, ...r }) {
493
- return /* @__PURE__ */ f(x, {
494
- showOutsideDays: n,
495
- className: G("p-3", e),
496
- classNames: {
497
- months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
498
- month: "space-y-4",
499
- caption: "flex justify-center pt-1 relative items-center w-full",
500
- caption_label: "text-sm font-medium",
501
- nav: "space-x-1 flex items-center",
502
- nav_button: G(qe({ variant: "outline" }), "h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),
503
- nav_button_previous: "absolute left-1",
504
- nav_button_next: "absolute right-1",
505
- table: "w-full border-collapse space-y-1",
506
- head_row: "flex",
507
- head_cell: "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
508
- row: "flex w-full mt-2",
509
- cell: G("h-9 w-9 text-center text-sm p-0 relative focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent/10", r.mode === "range" ? "[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md" : "[&:has([aria-selected])]:rounded-md"),
510
- day: G(qe({ variant: "ghost" }), "h-9 w-9 p-0 font-normal aria-selected:opacity-100"),
511
- day_range_start: "day-range-start",
512
- day_range_end: "day-range-end",
513
- day_selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
514
- day_today: "bg-accent/10 text-foreground",
515
- day_outside: "day-outside text-muted-foreground opacity-50 aria-selected:bg-transparent aria-selected:opacity-100 aria-selected:text-foreground",
516
- day_disabled: "text-muted-foreground opacity-50",
517
- day_range_middle: "aria-selected:bg-transparent aria-selected:text-foreground",
518
- day_hidden: "invisible",
519
- ...t
520
- },
521
- components: {
522
- IconLeft: () => /* @__PURE__ */ f(bt, { className: "h-4 w-4" }),
523
- IconRight: () => /* @__PURE__ */ f(dt, { className: "h-4 w-4" })
524
- },
525
- ...r
526
- });
527
- }
528
- //#endregion
529
- //#region src/components/ui/card.tsx
530
- function St({ className: e, ...t }) {
531
- return /* @__PURE__ */ f("div", {
532
- "data-slot": "card",
533
- className: G("bg-card text-card-foreground flex flex-col gap-6 rounded-card border", e),
534
- ...t
535
- });
536
- }
537
- function Ct({ className: e, ...t }) {
538
- return /* @__PURE__ */ f("div", {
539
- "data-slot": "card-header",
540
- className: G("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 pt-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6", e),
541
- ...t
542
- });
543
- }
544
- function wt({ className: e, ...t }) {
545
- return /* @__PURE__ */ f("h4", {
546
- "data-slot": "card-title",
547
- className: G("leading-none", e),
548
- ...t
549
- });
550
- }
551
- function Tt({ className: e, ...t }) {
552
- return /* @__PURE__ */ f("p", {
553
- "data-slot": "card-description",
554
- className: G("text-muted-foreground", e),
555
- ...t
556
- });
557
- }
558
- function Et({ className: e, ...t }) {
559
- return /* @__PURE__ */ f("div", {
560
- "data-slot": "card-action",
561
- className: G("col-start-2 row-span-2 row-start-1 self-start justify-self-end", e),
562
- ...t
563
- });
564
- }
565
- function Dt({ className: e, ...t }) {
566
- return /* @__PURE__ */ f("div", {
567
- "data-slot": "card-content",
568
- className: G("px-6 last:pb-6", e),
569
- ...t
570
- });
571
- }
572
- function Ot({ className: e, ...t }) {
573
- return /* @__PURE__ */ f("div", {
574
- "data-slot": "card-footer",
575
- className: G("flex items-center px-6 pb-6 [.border-t]:pt-6", e),
576
- ...t
577
- });
578
- }
579
- //#endregion
580
- //#region ~icons/lucide/arrow-left.jsx
581
- var kt = (e) => /* @__PURE__ */ f("svg", {
582
- viewBox: "0 0 24 24",
583
- width: "1.2em",
584
- height: "1.2em",
585
- ...e,
586
- children: /* @__PURE__ */ f("path", {
587
- fill: "none",
588
- stroke: "currentColor",
589
- strokeLinecap: "round",
590
- strokeLinejoin: "round",
591
- strokeWidth: 2,
592
- d: "m12 19l-7-7l7-7m7 7H5"
593
- })
594
- }), At = (e) => /* @__PURE__ */ f("svg", {
595
- viewBox: "0 0 24 24",
596
- width: "1.2em",
597
- height: "1.2em",
598
- ...e,
599
- children: /* @__PURE__ */ f("path", {
600
- fill: "none",
601
- stroke: "currentColor",
602
- strokeLinecap: "round",
603
- strokeLinejoin: "round",
604
- strokeWidth: 2,
605
- d: "M5 12h14m-7-7l7 7l-7 7"
606
- })
607
- }), jt = e.createContext(null);
608
- function Mt() {
609
- let t = e.useContext(jt);
610
- if (!t) throw Error("useCarousel must be used within a <Carousel />");
611
- return t;
612
- }
613
- var Nt = e.forwardRef(({ orientation: t = "horizontal", opts: n, setApi: r, plugins: i, className: a, children: o, ...s }, c) => {
614
- let [l, u] = S({
615
- ...n,
616
- axis: t === "horizontal" ? "x" : "y"
617
- }, i), [d, p] = e.useState(!1), [m, h] = e.useState(!1), g = e.useCallback((e) => {
618
- e && (p(e.canScrollPrev()), h(e.canScrollNext()));
619
- }, []), _ = e.useCallback(() => {
620
- u?.scrollPrev();
621
- }, [u]), v = e.useCallback(() => {
622
- u?.scrollNext();
623
- }, [u]), y = e.useCallback((e) => {
624
- e.key === "ArrowLeft" ? (e.preventDefault(), _()) : e.key === "ArrowRight" && (e.preventDefault(), v());
625
- }, [_, v]);
626
- return e.useEffect(() => {
627
- !u || !r || r(u);
628
- }, [u, r]), e.useEffect(() => {
629
- if (u) return g(u), u.on("reInit", g), u.on("select", g), () => {
630
- u?.off("reInit", g), u?.off("select", g);
631
- };
632
- }, [u, g]), /* @__PURE__ */ f(jt.Provider, {
633
- value: {
634
- carouselRef: l,
635
- api: u,
636
- opts: n,
637
- orientation: t || (n?.axis === "y" ? "vertical" : "horizontal"),
638
- scrollPrev: _,
639
- scrollNext: v,
640
- canScrollPrev: d,
641
- canScrollNext: m
642
- },
643
- children: /* @__PURE__ */ f("div", {
644
- ref: c,
645
- onKeyDownCapture: y,
646
- className: G("relative", a),
647
- role: "region",
648
- "aria-roledescription": "carousel",
649
- ...s,
650
- children: o
651
- })
652
- });
653
- });
654
- Nt.displayName = "Carousel";
655
- var Pt = e.forwardRef(({ className: e, ...t }, n) => {
656
- let { carouselRef: r, orientation: i } = Mt();
657
- return /* @__PURE__ */ f("div", {
658
- ref: r,
659
- className: "overflow-hidden",
660
- children: /* @__PURE__ */ f("div", {
661
- ref: n,
662
- className: G("flex", i === "horizontal" ? "-ml-4" : "-mt-4 flex-col", e),
663
- ...t
664
- })
665
- });
666
- });
667
- Pt.displayName = "CarouselContent";
668
- var Ft = e.forwardRef(({ className: e, ...t }, n) => {
669
- let { orientation: r } = Mt();
670
- return /* @__PURE__ */ f("div", {
671
- ref: n,
672
- role: "group",
673
- "aria-roledescription": "slide",
674
- className: G("min-w-0 shrink-0 grow-0 basis-full", r === "horizontal" ? "pl-4" : "pt-4", e),
675
- ...t
676
- });
677
- });
678
- Ft.displayName = "CarouselItem";
679
- var It = e.forwardRef(({ className: e, variant: t = "outline", size: n = "default", ...r }, i) => {
680
- let { orientation: a, scrollPrev: o, canScrollPrev: s } = Mt();
681
- return /* @__PURE__ */ p(K, {
682
- ref: i,
683
- variant: t,
684
- size: n,
685
- className: G("absolute h-8 w-8 rounded-full", a === "horizontal" ? "-left-12 top-1/2 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90", e),
686
- disabled: !s,
687
- onClick: o,
688
- ...r,
689
- children: [/* @__PURE__ */ f(kt, { className: "h-4 w-4" }), /* @__PURE__ */ f("span", {
690
- className: "sr-only",
691
- children: "Previous slide"
692
- })]
693
- });
694
- });
695
- It.displayName = "CarouselPrevious";
696
- var Lt = e.forwardRef(({ className: e, variant: t = "outline", size: n = "default", ...r }, i) => {
697
- let { orientation: a, scrollNext: o, canScrollNext: s } = Mt();
698
- return /* @__PURE__ */ p(K, {
699
- ref: i,
700
- variant: t,
701
- size: n,
702
- className: G("absolute h-8 w-8 rounded-full", a === "horizontal" ? "-right-12 top-1/2 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", e),
703
- disabled: !s,
704
- onClick: o,
705
- ...r,
706
- children: [/* @__PURE__ */ f(At, { className: "h-4 w-4" }), /* @__PURE__ */ f("span", {
707
- className: "sr-only",
708
- children: "Next slide"
709
- })]
710
- });
711
- });
712
- Lt.displayName = "CarouselNext";
713
- //#endregion
714
- //#region ~icons/lucide/check.jsx
715
- var q = (e) => /* @__PURE__ */ f("svg", {
716
- viewBox: "0 0 24 24",
717
- width: "1.2em",
718
- height: "1.2em",
719
- ...e,
720
- children: /* @__PURE__ */ f("path", {
721
- fill: "none",
722
- stroke: "currentColor",
723
- strokeLinecap: "round",
724
- strokeLinejoin: "round",
725
- strokeWidth: 2,
726
- d: "M20 6L9 17l-5-5"
727
- })
728
- }), Rt = e.forwardRef(({ className: t, name: n, checked: r, value: i, defaultChecked: a, onValueChange: o, onBlur: s, label: c, labelClassName: l, disabled: u, ...m }, h) => {
729
- let g = i === void 0 ? r : i, _ = e.useRef(null), v = e.useRef(null), y = e.useId();
730
- e.useImperativeHandle(h, () => _.current);
731
- let b = (e) => {
732
- o?.(e === "indeterminate" ? !1 : e);
733
- }, x = (e) => {
734
- e.preventDefault(), !u && v.current?.click();
735
- }, S = /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("input", {
736
- type: "checkbox",
737
- ref: _,
738
- name: n,
739
- defaultChecked: a === !0,
740
- onBlur: s,
741
- className: "sr-only",
742
- tabIndex: -1,
743
- "aria-hidden": "true"
744
- }), /* @__PURE__ */ f(C.Root, {
745
- ref: v,
746
- "data-slot": "checkbox",
747
- checked: g,
748
- defaultChecked: a,
749
- onCheckedChange: b,
750
- disabled: u,
751
- "aria-labelledby": c ? y : void 0,
752
- className: G("peer border border-muted-foreground/30 bg-input-background dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", t),
753
- ...m,
754
- children: /* @__PURE__ */ f(C.Indicator, {
755
- "data-slot": "checkbox-indicator",
756
- className: "flex items-center justify-center text-current transition-none",
757
- children: /* @__PURE__ */ f(q, { className: "size-3.5" })
758
- })
759
- })] });
760
- return c ? /* @__PURE__ */ p("div", {
761
- className: "flex items-center gap-2",
762
- children: [S, /* @__PURE__ */ f("label", {
763
- id: y,
764
- className: G("text-sm cursor-pointer select-none", u && "cursor-not-allowed opacity-50", l),
765
- onClick: x,
766
- children: c
767
- })]
768
- }) : S;
769
- });
770
- Rt.displayName = "Checkbox";
771
- //#endregion
772
- //#region src/components/ui/collapsible.tsx
773
- var zt = w.Root, Bt = w.CollapsibleTrigger, Vt = w.CollapsibleContent, Ht = (e) => /* @__PURE__ */ f("svg", {
774
- viewBox: "0 0 24 24",
775
- width: "1.2em",
776
- height: "1.2em",
777
- ...e,
778
- children: /* @__PURE__ */ f("path", {
779
- fill: "none",
780
- stroke: "currentColor",
781
- strokeLinecap: "round",
782
- strokeLinejoin: "round",
783
- strokeWidth: 2,
784
- d: "m7 15l5 5l5-5M7 9l5-5l5 5"
785
- })
786
- }), Ut = (e) => /* @__PURE__ */ f("svg", {
787
- viewBox: "0 0 24 24",
788
- width: "1.2em",
789
- height: "1.2em",
790
- ...e,
791
- children: /* @__PURE__ */ p("g", {
792
- fill: "none",
793
- stroke: "currentColor",
794
- strokeLinecap: "round",
795
- strokeLinejoin: "round",
796
- strokeWidth: 2,
797
- children: [/* @__PURE__ */ f("circle", {
798
- cx: 12,
799
- cy: 12,
800
- r: 10
801
- }), /* @__PURE__ */ f("path", { d: "m15 9l-6 6m0-6l6 6" })]
802
- })
803
- }), Wt = {
804
- "rc.asyncSelect.loading": "Loading...",
805
- "rc.asyncSelect.noOptions": "No options",
806
- "rc.asyncSelect.noResults": "No results",
807
- "rc.asyncSelect.selectPlaceholder": "Select...",
808
- "rc.combobox.noResults": "No results",
809
- "rc.combobox.selectPlaceholder": "Select...",
810
- "rc.datePicker.pickDate": "Pick date",
811
- "rc.datePicker.placeholder": "Pick date",
812
- "rc.datePicker.selectDate": "Select date",
813
- "rc.dateSelectorMultiple.addDate": "Add date",
814
- "rc.dateSelectorMultiple.dateRange": "Range",
815
- "rc.dateSelectorMultiple.placeholder": "Pick date",
816
- "rc.dateSelectorMultiple.singleDate": "Single",
817
- "rc.fileInput.browseFiles": "Browse files",
818
- "rc.fileInput.dropZone": "Drag files here or click to upload",
819
- "rc.fileInput.filePlaceholder": "File",
820
- "rc.fileInput.imagePlaceholder": "Image",
821
- "rc.fileInput.maxFilesExceeded": (e) => `Maximum ${e} files allowed`,
822
- "rc.fileInput.pending": "Pending",
823
- "rc.fileInput.remove": "Remove",
824
- "rc.fileInput.uploadFailed": "Upload failed",
825
- "rc.fileInput.uploading": "Uploading...",
826
- "rc.monthPickerMultiple.addMonth": "Add month",
827
- "rc.monthPickerMultiple.dateRange": "Range",
828
- "rc.monthPickerMultiple.endDate": "End date",
829
- "rc.monthPickerMultiple.placeholder": "Pick month",
830
- "rc.monthPickerMultiple.singleDate": "Single",
831
- "rc.monthPickerMultiple.startDate": "Start date",
832
- "rc.multiSelect.clear": "Clear all",
833
- "rc.multiSelect.close": "Close",
834
- "rc.multiSelect.moreItems": (e) => `+${e} more`,
835
- "rc.multiSelect.noOptions": "No options",
836
- "rc.multiSelect.noOptionsSelected": "No options selected",
837
- "rc.multiSelect.noResults": "No results",
838
- "rc.multiSelect.optionsCount": (e) => `${e} options`,
839
- "rc.multiSelect.selectAll": "Select all",
840
- "rc.multiSelect.selectPlaceholder": "Select...",
841
- "rc.pagination.next": "Next",
842
- "rc.pagination.previous": "Previous",
843
- "rc.pagination.showing": (e, t, n) => `Showing ${e}-${t} of ${n}`,
844
- "rc.calendar.month.0": "January",
845
- "rc.calendar.month.1": "February",
846
- "rc.calendar.month.2": "March",
847
- "rc.calendar.month.3": "April",
848
- "rc.calendar.month.4": "May",
849
- "rc.calendar.month.5": "June",
850
- "rc.calendar.month.6": "July",
851
- "rc.calendar.month.7": "August",
852
- "rc.calendar.month.8": "September",
853
- "rc.calendar.month.9": "October",
854
- "rc.calendar.month.10": "November",
855
- "rc.calendar.month.11": "December",
856
- "rc.sonamuFilter.title": "Sonamu Filter",
857
- "rc.sonamuFilter.apply": "Apply",
858
- "rc.sonamuFilter.reset": "Reset",
859
- "rc.sonamuFilter.addRule": "Add Rule",
860
- "rc.sonamuFilter.noRulesYet": "No rules yet. Click \"+ Add Rule\" to start.",
861
- "rc.sonamuFilter.selectField": "Select field",
862
- "rc.sonamuFilter.selectOperator": "Operator",
863
- "rc.sonamuFilter.selectOperatorFirst": "Select operator first",
864
- "rc.sonamuFilter.enterValue": "Enter value",
865
- "rc.sonamuFilter.enterNumber": "Enter number",
866
- "rc.sonamuFilter.notSupported": "Not supported",
867
- "rc.sonamuFilter.startDate": "Start date",
868
- "rc.sonamuFilter.endDate": "End date",
869
- "rc.sonamuFilter.appliedFilters": "🌲 Applied SonamuFilters",
870
- "rc.common.cancel": "Cancel",
871
- "rc.common.save": "Save"
872
- }, Gt = (e) => `[SonamuProvider] ${e} is not configured. Please provide ${e} configuration to SonamuProvider.`, Kt = () => () => {
873
- throw Error(Gt("uploader"));
874
- }, qt = () => (e) => Wt[e], Jt = n({});
875
- function Yt({ children: e, authOptions: t, ...n }) {
876
- let r = c(void 0);
877
- t && !r.current && (r.current = T(t));
878
- let i = {
879
- uploader: n.uploader ?? Kt(),
880
- auth: n.auth ?? r.current,
881
- SD: n.SD ?? qt()
882
- };
883
- return /* @__PURE__ */ f(Jt.Provider, {
884
- value: i,
885
- children: e
886
- });
887
- }
888
- function J() {
889
- return i(Jt);
890
- }
891
- //#endregion
892
- //#region ~icons/lucide/search.jsx
893
- var Xt = (e) => /* @__PURE__ */ f("svg", {
894
- viewBox: "0 0 24 24",
895
- width: "1.2em",
896
- height: "1.2em",
897
- ...e,
898
- children: /* @__PURE__ */ p("g", {
899
- fill: "none",
900
- stroke: "currentColor",
901
- strokeLinecap: "round",
902
- strokeLinejoin: "round",
903
- strokeWidth: 2,
904
- children: [/* @__PURE__ */ f("path", { d: "m21 21l-4.34-4.34" }), /* @__PURE__ */ f("circle", {
905
- cx: 11,
906
- cy: 11,
907
- r: 8
908
- })]
909
- })
910
- }), Zt = (e) => /* @__PURE__ */ f("svg", {
911
- viewBox: "0 0 24 24",
912
- width: "1.2em",
913
- height: "1.2em",
914
- ...e,
915
- children: /* @__PURE__ */ f("path", {
916
- fill: "none",
917
- stroke: "currentColor",
918
- strokeLinecap: "round",
919
- strokeLinejoin: "round",
920
- strokeWidth: 2,
921
- d: "M18 6L6 18M6 6l12 12"
922
- })
923
- }), Qt = D.Root, $t = D.Trigger, en = D.Portal, tn = D.Close, nn = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(D.Overlay, {
924
- ref: n,
925
- className: G("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", e),
926
- ...t
927
- }));
928
- nn.displayName = D.Overlay.displayName;
929
- var rn = e.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ p(en, { children: [/* @__PURE__ */ f(nn, {}), /* @__PURE__ */ p(D.Content, {
930
- ref: r,
931
- className: G("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg", e),
932
- ...n,
933
- children: [t, /* @__PURE__ */ p(D.Close, {
934
- className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
935
- children: [/* @__PURE__ */ f(Zt, { className: "h-4 w-4" }), /* @__PURE__ */ f("span", {
936
- className: "sr-only",
937
- children: "Close"
938
- })]
939
- })]
940
- })] }));
941
- rn.displayName = D.Content.displayName;
942
- var an = ({ className: e, ...t }) => /* @__PURE__ */ f("div", {
943
- className: G("flex flex-col space-y-1.5 text-center sm:text-left", e),
944
- ...t
945
- });
946
- an.displayName = "DialogHeader";
947
- var on = ({ className: e, ...t }) => /* @__PURE__ */ f("div", {
948
- className: G("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e),
949
- ...t
950
- });
951
- on.displayName = "DialogFooter";
952
- var sn = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(D.Title, {
953
- ref: n,
954
- className: G("text-lg font-semibold leading-none tracking-tight", e),
955
- ...t
956
- }));
957
- sn.displayName = D.Title.displayName;
958
- var cn = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(D.Description, {
959
- ref: n,
960
- className: G("text-sm text-muted-foreground", e),
961
- ...t
962
- }));
963
- cn.displayName = D.Description.displayName;
964
- //#endregion
965
- //#region src/components/ui/command.tsx
966
- var ln = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(E, {
967
- ref: n,
968
- className: G("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground", e),
969
- ...t
970
- }));
971
- ln.displayName = E.displayName;
972
- var un = ({ children: e, commandProps: t, ...n }) => {
973
- let { className: r, ...i } = t ?? {};
974
- return /* @__PURE__ */ f(Qt, {
975
- ...n,
976
- children: /* @__PURE__ */ f(rn, {
977
- className: "overflow-hidden p-0 shadow-lg",
978
- children: /* @__PURE__ */ f(ln, {
979
- className: G("**:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 **:[[cmdk-group]]:px-2 **:[[cmdk-input-wrapper]_svg]:size-5 **:[[cmdk-input]]:h-12 **:[[cmdk-item]]:px-2 **:[[cmdk-item]]:py-3 **:[[cmdk-item]_svg]:size-5", r),
980
- ...i,
981
- children: e
982
- })
983
- })
984
- });
985
- }, dn = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p("div", {
986
- className: "flex items-center border-b px-3",
987
- "cmdk-input-wrapper": "",
988
- children: [/* @__PURE__ */ f(Xt, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }), /* @__PURE__ */ f(E.Input, {
989
- ref: n,
990
- className: G("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50", e),
991
- ...t
992
- })]
993
- }));
994
- dn.displayName = E.Input.displayName;
995
- var fn = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(E.List, {
996
- ref: n,
997
- className: G("max-h-[300px] overflow-y-auto overflow-x-hidden", e),
998
- ...t
999
- }));
1000
- fn.displayName = E.List.displayName;
1001
- var pn = e.forwardRef((e, t) => /* @__PURE__ */ f(E.Empty, {
1002
- ref: t,
1003
- className: "py-6 text-center text-sm",
1004
- ...e
1005
- }));
1006
- pn.displayName = E.Empty.displayName;
1007
- var mn = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(E.Group, {
1008
- ref: n,
1009
- className: G("overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground", e),
1010
- ...t
1011
- }));
1012
- mn.displayName = E.Group.displayName;
1013
- var hn = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(E.Separator, {
1014
- ref: n,
1015
- className: G("-mx-1 h-px bg-border", e),
1016
- ...t
1017
- }));
1018
- hn.displayName = E.Separator.displayName;
1019
- var gn = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(E.Item, {
1020
- ref: n,
1021
- className: G("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 **:[svg]:pointer-events-none **:[svg]:size-4 **:[svg]:shrink-0", e),
1022
- ...t
1023
- }));
1024
- gn.displayName = E.Item.displayName;
1025
- var _n = ({ className: e, ...t }) => /* @__PURE__ */ f("span", {
1026
- className: G("ml-auto text-xs tracking-widest text-muted-foreground", e),
1027
- ...t
1028
- });
1029
- _n.displayName = "CommandShortcut";
1030
- //#endregion
1031
- //#region src/components/ui/popover.tsx
1032
- function Y({ ...e }) {
1033
- return /* @__PURE__ */ f(O.Root, {
1034
- "data-slot": "popover",
1035
- ...e
1036
- });
1037
- }
1038
- function X({ ...e }) {
1039
- return /* @__PURE__ */ f(O.Trigger, {
1040
- "data-slot": "popover-trigger",
1041
- ...e
1042
- });
1043
- }
1044
- function Z({ className: e, align: t = "center", sideOffset: n = 4, ...r }) {
1045
- return /* @__PURE__ */ f(O.Portal, { children: /* @__PURE__ */ f(O.Content, {
1046
- "data-slot": "popover-content",
1047
- align: t,
1048
- sideOffset: n,
1049
- className: G("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden", e),
1050
- ...r
1051
- }) });
1052
- }
1053
- function vn({ ...e }) {
1054
- return /* @__PURE__ */ f(O.Anchor, {
1055
- "data-slot": "popover-anchor",
1056
- ...e
1057
- });
1058
- }
1059
- //#endregion
1060
- //#region src/components/ui/combobox.tsx
1061
- var yn = e.forwardRef(({ options: t, name: n, value: r, onValueChange: i, onBlur: a, placeholder: o, searchPlaceholder: s, emptyText: c, disabled: l = !1, className: u, clearable: m = !1 }, h) => {
1062
- let { SD: g } = J(), [_, v] = e.useState(!1), y = e.useRef(null), b = o ?? g("rc.combobox.selectPlaceholder"), x = s ?? g("common.searchPlaceholder"), S = c ?? g("rc.combobox.noResults");
1063
- e.useImperativeHandle(h, () => y.current);
1064
- let C = (e) => {
1065
- i?.((e === r ? "" : e) || void 0), v(!1);
1066
- }, w = (e) => {
1067
- e.preventDefault(), e.stopPropagation(), i?.(void 0), v(!1);
1068
- }, T = !!r;
1069
- return /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("input", {
1070
- type: "hidden",
1071
- ref: y,
1072
- name: n,
1073
- value: r || "",
1074
- onBlur: a
1075
- }), /* @__PURE__ */ p(Y, {
1076
- open: _,
1077
- onOpenChange: v,
1078
- children: [/* @__PURE__ */ f(X, {
1079
- asChild: !0,
1080
- children: /* @__PURE__ */ p(K, {
1081
- variant: "outline",
1082
- role: "combobox",
1083
- "aria-expanded": _,
1084
- disabled: l,
1085
- className: G("w-full justify-between", u),
1086
- children: [/* @__PURE__ */ f("span", {
1087
- className: "flex-1 truncate text-left",
1088
- children: r ? t.find((e) => e.value === r)?.label : b
1089
- }), /* @__PURE__ */ p("div", {
1090
- className: "flex items-center gap-1 shrink-0 pl-2",
1091
- children: [m && T && /* @__PURE__ */ f("span", {
1092
- className: "flex items-center justify-center",
1093
- onMouseDown: (e) => e.stopPropagation(),
1094
- onClick: w,
1095
- children: /* @__PURE__ */ f(Ut, { className: "h-4 w-4 cursor-pointer opacity-50 hover:opacity-100 transition-opacity" })
1096
- }), /* @__PURE__ */ f(Ht, { className: "h-4 w-4 opacity-50" })]
1097
- })]
1098
- })
1099
- }), /* @__PURE__ */ f(Z, {
1100
- className: "w-full p-0",
1101
- children: /* @__PURE__ */ p(ln, { children: [/* @__PURE__ */ f(dn, {
1102
- placeholder: x,
1103
- className: "h-9"
1104
- }), /* @__PURE__ */ p(fn, { children: [/* @__PURE__ */ f(pn, { children: S }), /* @__PURE__ */ f(mn, { children: t.map((e) => /* @__PURE__ */ p(gn, {
1105
- value: e.value,
1106
- onSelect: C,
1107
- children: [e.label, /* @__PURE__ */ f(q, { className: G("ml-auto", r === e.value ? "opacity-100" : "opacity-0") })]
1108
- }, e.value)) })] })] })
1109
- })]
1110
- })] });
1111
- });
1112
- yn.displayName = "Combobox";
1113
- //#endregion
1114
- //#region src/components/ui/common-modal.tsx
1115
- var bn = k({
1116
- open: !1,
1117
- reactNode: null
1118
- });
1119
- function xn({ className: e }) {
1120
- let [t, n] = A(bn), { open: r, reactNode: i, title: o, description: s, className: c, onControlledOpen: l, onControlledClose: u } = t, d = () => {
1121
- u && u(), n({
1122
- open: !1,
1123
- reactNode: null
1124
- });
1125
- };
1126
- return a(() => {
1127
- r && l && l();
1128
- }, [r]), /* @__PURE__ */ f(Qt, {
1129
- open: r,
1130
- onOpenChange: (e) => {
1131
- e || d();
1132
- },
1133
- children: /* @__PURE__ */ p(rn, {
1134
- className: G("max-w-4xl", c, e),
1135
- children: [/* @__PURE__ */ p(an, { children: [/* @__PURE__ */ f(sn, {
1136
- className: o ? void 0 : "sr-only",
1137
- children: o || "Modal"
1138
- }), /* @__PURE__ */ f(cn, {
1139
- className: s ? void 0 : "sr-only",
1140
- children: s || "Modal content"
1141
- })] }), i]
1142
- })
1143
- });
1144
- }
1145
- function Sn() {
1146
- let [e, t] = A(bn), { open: n, reactNode: r, onCompleted: i } = e, a = (e, n) => {
1147
- t({
1148
- open: !0,
1149
- reactNode: e,
1150
- ...n
1151
- });
1152
- }, o = () => {
1153
- t({
1154
- open: !1,
1155
- reactNode: null
1156
- });
1157
- };
1158
- return {
1159
- open: n,
1160
- reactNode: r,
1161
- openModal: a,
1162
- closeModal: o,
1163
- doneModal: (e) => {
1164
- o(), i && i(e);
1165
- }
1166
- };
1167
- }
1168
- //#endregion
1169
- //#region ~icons/lucide/circle.jsx
1170
- var Cn = (e) => /* @__PURE__ */ f("svg", {
1171
- viewBox: "0 0 24 24",
1172
- width: "1.2em",
1173
- height: "1.2em",
1174
- ...e,
1175
- children: /* @__PURE__ */ f("circle", {
1176
- cx: 12,
1177
- cy: 12,
1178
- r: 10,
1179
- fill: "none",
1180
- stroke: "currentColor",
1181
- strokeLinecap: "round",
1182
- strokeLinejoin: "round",
1183
- strokeWidth: 2
1184
- })
1185
- }), wn = j.Root, Tn = j.Trigger, En = j.Group, Dn = j.Portal, On = j.Sub, kn = j.RadioGroup, An = e.forwardRef(({ className: e, inset: t, children: n, ...r }, i) => /* @__PURE__ */ p(j.SubTrigger, {
1186
- ref: i,
1187
- className: G("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", t && "pl-8", e),
1188
- ...r,
1189
- children: [n, /* @__PURE__ */ f(dt, { className: "ml-auto h-4 w-4" })]
1190
- }));
1191
- An.displayName = j.SubTrigger.displayName;
1192
- var jn = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(j.SubContent, {
1193
- ref: n,
1194
- className: G("z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=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 origin-[--radix-context-menu-content-transform-origin]", e),
1195
- ...t
1196
- }));
1197
- jn.displayName = j.SubContent.displayName;
1198
- var Mn = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(j.Portal, { children: /* @__PURE__ */ f(j.Content, {
1199
- ref: n,
1200
- className: G("z-50 max-h-[--radix-context-menu-content-available-height] min-w-32 overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=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 origin-[--radix-context-menu-content-transform-origin]", e),
1201
- ...t
1202
- }) }));
1203
- Mn.displayName = j.Content.displayName;
1204
- var Nn = e.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ f(j.Item, {
1205
- ref: r,
1206
- className: G("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", t && "pl-8", e),
1207
- ...n
1208
- }));
1209
- Nn.displayName = j.Item.displayName;
1210
- var Pn = e.forwardRef(({ className: e, children: t, checked: n, ...r }, i) => /* @__PURE__ */ p(j.CheckboxItem, {
1211
- ref: i,
1212
- className: G("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", e),
1213
- checked: n,
1214
- ...r,
1215
- children: [/* @__PURE__ */ f("span", {
1216
- className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
1217
- children: /* @__PURE__ */ f(j.ItemIndicator, { children: /* @__PURE__ */ f(q, { className: "h-4 w-4" }) })
1218
- }), t]
1219
- }));
1220
- Pn.displayName = j.CheckboxItem.displayName;
1221
- var Fn = e.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ p(j.RadioItem, {
1222
- ref: r,
1223
- className: G("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", e),
1224
- ...n,
1225
- children: [/* @__PURE__ */ f("span", {
1226
- className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
1227
- children: /* @__PURE__ */ f(j.ItemIndicator, { children: /* @__PURE__ */ f(Cn, { className: "h-2 w-2 fill-current" }) })
1228
- }), t]
1229
- }));
1230
- Fn.displayName = j.RadioItem.displayName;
1231
- var In = e.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ f(j.Label, {
1232
- ref: r,
1233
- className: G("px-2 py-1.5 text-sm font-semibold text-foreground", t && "pl-8", e),
1234
- ...n
1235
- }));
1236
- In.displayName = j.Label.displayName;
1237
- var Ln = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(j.Separator, {
1238
- ref: n,
1239
- className: G("-mx-1 my-1 h-px bg-border", e),
1240
- ...t
1241
- }));
1242
- Ln.displayName = j.Separator.displayName;
1243
- var Rn = ({ className: e, ...t }) => /* @__PURE__ */ f("span", {
1244
- className: G("ml-auto text-xs tracking-widest text-muted-foreground", e),
1245
- ...t
1246
- });
1247
- Rn.displayName = "ContextMenuShortcut";
1248
- //#endregion
1249
- //#region src/components/ui/input.tsx
1250
- var Q = e.forwardRef(({ className: e, type: t, onValueChange: n, onChange: r, ...i }, a) => {
1251
- let o = (e) => {
1252
- n?.(e.target.value), r?.(e);
1253
- };
1254
- return /* @__PURE__ */ f("input", {
1255
- type: t,
1256
- "data-slot": "input",
1257
- className: G("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base bg-input-background transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "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", e),
1258
- ref: a,
1259
- ...i,
1260
- onChange: o
1261
- });
1262
- });
1263
- Q.displayName = "Input";
1264
- //#endregion
1265
- //#region src/components/ui/date-input.tsx
1266
- function zn({ value: e, onValueChange: t, ...n }) {
1267
- return /* @__PURE__ */ f(Q, {
1268
- type: "datetime-local",
1269
- value: e ? e instanceof Date ? e.toISOString().slice(0, 16) : new Date(e).toISOString().slice(0, 16) : "",
1270
- onChange: (e) => t(e.target.value ? new Date(e.target.value) : null),
1271
- ...n
1272
- });
1273
- }
1274
- //#endregion
1275
- //#region ~icons/lucide/calendar.jsx
1276
- var Bn = (e) => /* @__PURE__ */ f("svg", {
1277
- viewBox: "0 0 24 24",
1278
- width: "1.2em",
1279
- height: "1.2em",
1280
- ...e,
1281
- children: /* @__PURE__ */ p("g", {
1282
- fill: "none",
1283
- stroke: "currentColor",
1284
- strokeLinecap: "round",
1285
- strokeLinejoin: "round",
1286
- strokeWidth: 2,
1287
- children: [
1288
- /* @__PURE__ */ f("path", { d: "M8 2v4m8-4v4" }),
1289
- /* @__PURE__ */ f("rect", {
1290
- width: 18,
1291
- height: 18,
1292
- x: 3,
1293
- y: 4,
1294
- rx: 2
1295
- }),
1296
- /* @__PURE__ */ f("path", { d: "M3 10h18" })
1297
- ]
1298
- })
1299
- });
1300
- //#endregion
1301
- //#region src/components/ui/date-picker.tsx
1302
- function Vn({ value: e, onValueChange: t, placeholder: n, disabled: r = !1, className: i }) {
1303
- let { SD: a } = J(), o = n ?? a("rc.datePicker.pickDate");
1304
- return /* @__PURE__ */ p(Y, { children: [/* @__PURE__ */ f(X, {
1305
- asChild: !0,
1306
- children: /* @__PURE__ */ p(K, {
1307
- variant: "outline",
1308
- disabled: r,
1309
- "data-empty": !e,
1310
- className: G("w-full justify-start text-left font-normal", "data-[empty=true]:text-muted-foreground", i),
1311
- children: [/* @__PURE__ */ f(Bn, {}), e ? M(e, "PPP") : /* @__PURE__ */ f("span", { children: o })]
1312
- })
1313
- }), /* @__PURE__ */ f(Z, {
1314
- className: "w-auto p-0",
1315
- align: "start",
1316
- children: /* @__PURE__ */ f(xt, {
1317
- mode: "single",
1318
- selected: e,
1319
- onSelect: (e) => {
1320
- t?.(e);
1321
- },
1322
- initialFocus: !0
1323
- })
1324
- })] });
1325
- }
1326
- function Hn({ value: t, onValueChange: n, placeholder: r, disabled: i = !1, className: a }) {
1327
- let { SD: o } = J(), s = r ?? o("rc.datePicker.selectDate"), [c, l] = e.useState(!1);
1328
- return /* @__PURE__ */ p(Y, {
1329
- open: c,
1330
- onOpenChange: l,
1331
- children: [/* @__PURE__ */ f(X, {
1332
- asChild: !0,
1333
- children: /* @__PURE__ */ p(K, {
1334
- variant: "outline",
1335
- disabled: i,
1336
- className: G("w-full justify-between font-normal", !t && "text-muted-foreground", a),
1337
- children: [t ? t.toLocaleDateString() : s, /* @__PURE__ */ f(Bn, {})]
1338
- })
1339
- }), /* @__PURE__ */ f(Z, {
1340
- className: "w-auto overflow-hidden p-0",
1341
- align: "start",
1342
- children: /* @__PURE__ */ f(xt, {
1343
- mode: "single",
1344
- selected: t,
1345
- captionLayout: "dropdown",
1346
- onSelect: (e) => {
1347
- n?.(e), l(!1);
1348
- }
1349
- })
1350
- })]
1351
- });
1352
- }
1353
- function Un({ CalendarIcon: t, value: n, onValueChange: r, placeholder: i = "Pick a date", dateFormat: a = "yyyy/MM/dd", className: o = "", numberOfMonths: s = 2, maxDate: c, minDate: l }) {
1354
- let [u, d] = e.useState(!1), m = e.useMemo(() => {
1355
- if (!n?.from && !n?.to) return i;
1356
- let e = n?.from ? M(n.from, a) : "", t = n?.to ? M(n.to, a) : "";
1357
- return e && t ? `${e} - ${t}` : t ? `- ${t}` : `${e} -`;
1358
- }, [
1359
- n,
1360
- a,
1361
- i
1362
- ]), h = e.useMemo(() => {
1363
- if (!(!c && !l)) return (e) => !!(c && e > c || l && e < l);
1364
- }, [c, l]);
1365
- return /* @__PURE__ */ p(Y, {
1366
- open: u,
1367
- onOpenChange: d,
1368
- children: [/* @__PURE__ */ f(X, {
1369
- asChild: !0,
1370
- children: /* @__PURE__ */ p(K, {
1371
- variant: "outline",
1372
- className: `justify-start gap-2 h-8 px-3 text-xs font-normal ${o}`,
1373
- children: [/* @__PURE__ */ f(t, { className: "h-4 w-4 shrink-0" }), /* @__PURE__ */ f("span", {
1374
- className: "truncate",
1375
- children: m
1376
- })]
1377
- })
1378
- }), /* @__PURE__ */ f(Z, {
1379
- className: "w-auto p-0",
1380
- align: "start",
1381
- children: /* @__PURE__ */ f(xt, {
1382
- mode: "range",
1383
- defaultMonth: n?.from ?? (n?.to ? new Date(n.to.getFullYear(), n.to.getMonth() - 1, 1) : void 0),
1384
- selected: n,
1385
- onSelect: r,
1386
- numberOfMonths: s,
1387
- disabled: h
1388
- })
1389
- })]
1390
- });
1391
- }
1392
- //#endregion
1393
- //#region src/components/ui/drawer.tsx
1394
- var Wn = ({ shouldScaleBackground: e = !0, ...t }) => /* @__PURE__ */ f(N.Root, {
1395
- shouldScaleBackground: e,
1396
- ...t
1397
- });
1398
- Wn.displayName = "Drawer";
1399
- var Gn = N.Trigger, Kn = N.Portal, qn = N.Close, Jn = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(N.Overlay, {
1400
- ref: n,
1401
- className: G("fixed inset-0 z-50 bg-black/80", e),
1402
- ...t
1403
- }));
1404
- Jn.displayName = N.Overlay.displayName;
1405
- var Yn = e.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ p(Kn, { children: [/* @__PURE__ */ f(Jn, {}), /* @__PURE__ */ p(N.Content, {
1406
- ref: r,
1407
- className: G("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background", e),
1408
- ...n,
1409
- children: [/* @__PURE__ */ f("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }), t]
1410
- })] }));
1411
- Yn.displayName = "DrawerContent";
1412
- var Xn = ({ className: e, ...t }) => /* @__PURE__ */ f("div", {
1413
- className: G("grid gap-1.5 p-4 text-center sm:text-left", e),
1414
- ...t
1415
- });
1416
- Xn.displayName = "DrawerHeader";
1417
- var Zn = ({ className: e, ...t }) => /* @__PURE__ */ f("div", {
1418
- className: G("mt-auto flex flex-col gap-2 p-4", e),
1419
- ...t
1420
- });
1421
- Zn.displayName = "DrawerFooter";
1422
- var Qn = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(N.Title, {
1423
- ref: n,
1424
- className: G("text-lg font-semibold leading-none tracking-tight", e),
1425
- ...t
1426
- }));
1427
- Qn.displayName = N.Title.displayName;
1428
- var $n = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(N.Description, {
1429
- ref: n,
1430
- className: G("text-sm text-muted-foreground", e),
1431
- ...t
1432
- }));
1433
- $n.displayName = N.Description.displayName;
1434
- //#endregion
1435
- //#region src/components/ui/dropdown-menu.tsx
1436
- var er = P.Root, tr = P.Trigger, nr = P.Group, rr = P.Portal, ir = P.Sub, ar = P.RadioGroup, or = e.forwardRef(({ className: e, inset: t, children: n, ...r }, i) => /* @__PURE__ */ p(P.SubTrigger, {
1437
- ref: i,
1438
- className: G("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", t && "pl-8", e),
1439
- ...r,
1440
- children: [n, /* @__PURE__ */ f(dt, { className: "ml-auto" })]
1441
- }));
1442
- or.displayName = P.SubTrigger.displayName;
1443
- var sr = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(P.SubContent, {
1444
- ref: n,
1445
- className: G("z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=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 origin-[--radix-dropdown-menu-content-transform-origin]", e),
1446
- ...t
1447
- }));
1448
- sr.displayName = P.SubContent.displayName;
1449
- var cr = e.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ f(P.Portal, { children: /* @__PURE__ */ f(P.Content, {
1450
- ref: r,
1451
- sideOffset: t,
1452
- className: G("z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-32 overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=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 origin-[--radix-dropdown-menu-content-transform-origin]", e),
1453
- ...n
1454
- }) }));
1455
- cr.displayName = P.Content.displayName;
1456
- var lr = e.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ f(P.Item, {
1457
- ref: r,
1458
- className: G("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", t && "pl-8", e),
1459
- ...n
1460
- }));
1461
- lr.displayName = P.Item.displayName;
1462
- var ur = e.forwardRef(({ className: e, children: t, checked: n, ...r }, i) => /* @__PURE__ */ p(P.CheckboxItem, {
1463
- ref: i,
1464
- className: G("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", e),
1465
- checked: n,
1466
- ...r,
1467
- children: [/* @__PURE__ */ f("span", {
1468
- className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
1469
- children: /* @__PURE__ */ f(P.ItemIndicator, { children: /* @__PURE__ */ f(q, { className: "h-4 w-4" }) })
1470
- }), t]
1471
- }));
1472
- ur.displayName = P.CheckboxItem.displayName;
1473
- var dr = e.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ p(P.RadioItem, {
1474
- ref: r,
1475
- className: G("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", e),
1476
- ...n,
1477
- children: [/* @__PURE__ */ f("span", {
1478
- className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
1479
- children: /* @__PURE__ */ f(P.ItemIndicator, { children: /* @__PURE__ */ f(Cn, { className: "h-2 w-2 fill-current" }) })
1480
- }), t]
1481
- }));
1482
- dr.displayName = P.RadioItem.displayName;
1483
- var fr = e.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ f(P.Label, {
1484
- ref: r,
1485
- className: G("px-2 py-1.5 text-sm font-semibold", t && "pl-8", e),
1486
- ...n
1487
- }));
1488
- fr.displayName = P.Label.displayName;
1489
- var pr = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(P.Separator, {
1490
- ref: n,
1491
- className: G("-mx-1 my-1 h-px bg-muted", e),
1492
- ...t
1493
- }));
1494
- pr.displayName = P.Separator.displayName;
1495
- var mr = ({ className: e, ...t }) => /* @__PURE__ */ f("span", {
1496
- className: G("ml-auto text-xs tracking-widest opacity-60", e),
1497
- ...t
1498
- });
1499
- mr.displayName = "DropdownMenuShortcut";
1500
- //#endregion
1501
- //#region ~icons/lucide/image.jsx
1502
- var hr = (e) => /* @__PURE__ */ f("svg", {
1503
- viewBox: "0 0 24 24",
1504
- width: "1.2em",
1505
- height: "1.2em",
1506
- ...e,
1507
- children: /* @__PURE__ */ p("g", {
1508
- fill: "none",
1509
- stroke: "currentColor",
1510
- strokeLinecap: "round",
1511
- strokeLinejoin: "round",
1512
- strokeWidth: 2,
1513
- children: [
1514
- /* @__PURE__ */ f("rect", {
1515
- width: 18,
1516
- height: 18,
1517
- x: 3,
1518
- y: 3,
1519
- rx: 2,
1520
- ry: 2
1521
- }),
1522
- /* @__PURE__ */ f("circle", {
1523
- cx: 9,
1524
- cy: 9,
1525
- r: 2
1526
- }),
1527
- /* @__PURE__ */ f("path", { d: "m21 15l-3.086-3.086a2 2 0 0 0-2.828 0L6 21" })
1528
- ]
1529
- })
1530
- }), gr = (e) => /* @__PURE__ */ f("svg", {
1531
- viewBox: "0 0 24 24",
1532
- width: "1.2em",
1533
- height: "1.2em",
1534
- ...e,
1535
- children: /* @__PURE__ */ f("path", {
1536
- fill: "none",
1537
- stroke: "currentColor",
1538
- strokeLinecap: "round",
1539
- strokeLinejoin: "round",
1540
- strokeWidth: 2,
1541
- d: "M21 12a9 9 0 1 1-6.219-8.56"
1542
- })
1543
- }), _r = (e) => /* @__PURE__ */ f("svg", {
1544
- viewBox: "0 0 24 24",
1545
- width: "1.2em",
1546
- height: "1.2em",
1547
- ...e,
1548
- children: /* @__PURE__ */ f("path", {
1549
- fill: "none",
1550
- stroke: "currentColor",
1551
- strokeLinecap: "round",
1552
- strokeLinejoin: "round",
1553
- strokeWidth: 2,
1554
- d: "M12 3v12m5-7l-5-5l-5 5m14 7v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"
1555
- })
1556
- });
1557
- //#endregion
1558
- //#region src/components/ui/file-input.tsx
1559
- function vr(e) {
1560
- let t = e.split(".");
1561
- return t.length < 2 ? "" : t[t.length - 1].toLowerCase();
1562
- }
1563
- var yr = {
1564
- sm: 14,
1565
- md: 18,
1566
- lg: 22,
1567
- xl: 26
1568
- };
1569
- function br({ filename: e, size: t = "md" }) {
1570
- let n = vr(e), r = n && n in ee ? ee[n] : {};
1571
- return /* @__PURE__ */ f("div", {
1572
- className: "shrink-0 self-center",
1573
- style: {
1574
- width: yr[t],
1575
- marginTop: -2
1576
- },
1577
- children: /* @__PURE__ */ f(F, {
1578
- extension: n || void 0,
1579
- ...r
1580
- })
1581
- });
1582
- }
1583
- var xr = {
1584
- sm: "w-20 h-20",
1585
- md: "w-32 h-32",
1586
- lg: "w-40 h-40",
1587
- xl: "w-48 h-48"
1588
- }, Sr = {
1589
- sm: "w-48 h-12",
1590
- md: "w-80 h-16",
1591
- lg: "w-96 h-20",
1592
- xl: "w-[28rem] h-24"
1593
- };
1594
- function Cr(e) {
1595
- let { placeholder: t, disabled: n = !1, className: i, previewSize: a = "md", uploadMode: o, viewMode: s, uploadParams: u, onBlur: m } = e, { uploader: h, SD: g } = J(), _ = e.multiple ?? !1, v = s === "image", y = e.accept ?? (v ? "image/*" : "*/*"), b = c(null), [x, S] = l(!1), [C, w] = l(!1), T = t ?? `${g(v ? "rc.fileInput.imagePlaceholder" : "rc.fileInput.filePlaceholder")} URL${_ ? "S" : ""}`, E = (() => {
1596
- if (!_) {
1597
- let t = e.value;
1598
- return t ? [t] : [];
1599
- }
1600
- return e.value || [];
1601
- })(), D = E.filter((e) => e instanceof File), O = Le(D), k = E.map((e) => e instanceof File ? {
1602
- url: O[D.indexOf(e)],
1603
- name: e.name,
1604
- isPending: !0
1605
- } : {
1606
- url: e.url,
1607
- name: e.name,
1608
- isPending: !1
1609
- }), A = _ ? e.maxFiles ?? 10 : 1, j = E.length, M = j < A, N = r(async (t) => {
1610
- if (t.length === 0 || n) return;
1611
- let r = A - j;
1612
- if (r <= 0) {
1613
- alert(g("rc.fileInput.maxFilesExceeded")(A));
1614
- return;
1615
- }
1616
- let i = t.slice(0, r);
1617
- if (o === "eager") {
1618
- S(!0);
1619
- try {
1620
- let t = await h(i, u);
1621
- if (_) {
1622
- let n = [...E, ...t];
1623
- e.onValueChange?.(n);
1624
- } else e.onValueChange?.(t[0]);
1625
- } catch (e) {
1626
- console.error("Upload failed:", e), alert(g("rc.fileInput.uploadFailed"));
1627
- } finally {
1628
- S(!1);
1629
- }
1630
- } else if (_) {
1631
- let t = [...E, ...i];
1632
- e.onValueChange?.(t);
1633
- } else e.onValueChange?.(i[0]);
1634
- }, [
1635
- n,
1636
- j,
1637
- A,
1638
- _,
1639
- o,
1640
- u,
1641
- E,
1642
- e,
1643
- h
1644
- ]), P = r((e) => {
1645
- N(Array.from(e.target.files || [])), b.current && (b.current.value = "");
1646
- }, [N]), F = r((e) => {
1647
- e.preventDefault(), w(!1), !(n || x) && N(Array.from(e.dataTransfer.files));
1648
- }, [
1649
- N,
1650
- n,
1651
- x
1652
- ]), ee = r((t) => (n) => {
1653
- if (n.stopPropagation(), !_) e.onValueChange?.(null);
1654
- else {
1655
- let n = E.filter((e, n) => n !== t);
1656
- e.onValueChange?.(n);
1657
- }
1658
- }, [
1659
- E,
1660
- _,
1661
- e.onValueChange
1662
- ]), te = () => {
1663
- !n && !x && b.current?.click();
1664
- }, I = v ? xr : Sr;
1665
- if (!_ && k.length > 0) {
1666
- let e = k[0];
1667
- return /* @__PURE__ */ p("div", {
1668
- className: G("relative inline-block", i),
1669
- children: [/* @__PURE__ */ f("input", {
1670
- ref: b,
1671
- type: "file",
1672
- accept: y,
1673
- onChange: P,
1674
- onBlur: m,
1675
- disabled: n || x,
1676
- className: "sr-only"
1677
- }), /* @__PURE__ */ f("div", {
1678
- onClick: te,
1679
- onDrop: F,
1680
- onDragOver: (e) => {
1681
- e.preventDefault(), !n && !x && w(!0);
1682
- },
1683
- onDragLeave: (e) => {
1684
- e.preventDefault(), w(!1);
1685
- },
1686
- className: G("relative flex items-center justify-center rounded-lg border-2 cursor-pointer transition-all", I[a], v ? "border-transparent" : "border-dashed border-muted-foreground/25 hover:border-muted-foreground/50", C && "border-primary bg-primary/5", n && "opacity-50 cursor-not-allowed", x && "cursor-wait"),
1687
- children: x ? /* @__PURE__ */ p("div", {
1688
- className: "flex flex-col items-center gap-2 text-muted-foreground",
1689
- children: [/* @__PURE__ */ f(gr, { className: "h-6 w-6 animate-spin" }), /* @__PURE__ */ f("span", {
1690
- className: "text-xs",
1691
- children: g("rc.fileInput.uploading")
1692
- })]
1693
- }) : /* @__PURE__ */ p(d, { children: [
1694
- v ? /* @__PURE__ */ f("img", {
1695
- src: e.url,
1696
- alt: "Preview",
1697
- className: "h-full w-full object-cover rounded-lg overflow-hidden"
1698
- }) : /* @__PURE__ */ p("div", {
1699
- className: "flex items-center gap-2 px-3 h-full w-full min-w-0 overflow-hidden",
1700
- children: [
1701
- /* @__PURE__ */ f(br, {
1702
- filename: e.name,
1703
- size: a
1704
- }),
1705
- /* @__PURE__ */ f("span", {
1706
- className: G("text-xs truncate min-w-0", e.isPending ? "w-[140px] shrink-0" : "flex-1"),
1707
- children: e.name
1708
- }),
1709
- e.isPending && /* @__PURE__ */ f("span", {
1710
- className: "px-2 py-0.5 bg-yellow-500/90 text-white text-xs rounded whitespace-nowrap shrink-0",
1711
- children: g("rc.fileInput.pending")
1712
- })
1713
- ]
1714
- }),
1715
- !n && /* @__PURE__ */ f(K, {
1716
- type: "button",
1717
- variant: "destructive",
1718
- size: "xs",
1719
- className: "absolute -top-2 -right-2 h-6 w-6 rounded-full p-0",
1720
- onClick: ee(0),
1721
- icon: /* @__PURE__ */ f(Zt, {})
1722
- }),
1723
- v && e.isPending && /* @__PURE__ */ f("div", {
1724
- className: "absolute bottom-2 left-2 right-2 mx-auto max-w-[calc(100%-1rem)] px-2 py-1 bg-yellow-500/90 text-white text-xs rounded text-center truncate",
1725
- children: g("rc.fileInput.pending")
1726
- })
1727
- ] })
1728
- })]
1729
- });
1730
- }
1731
- return /* @__PURE__ */ p("div", {
1732
- className: G("flex flex-wrap gap-3", i),
1733
- children: [
1734
- /* @__PURE__ */ f("input", {
1735
- ref: b,
1736
- type: "file",
1737
- accept: y,
1738
- multiple: _,
1739
- onChange: P,
1740
- onBlur: m,
1741
- disabled: n || x,
1742
- className: "sr-only"
1743
- }),
1744
- k.map((e, t) => /* @__PURE__ */ p("div", {
1745
- className: G("relative", I[a]),
1746
- children: [
1747
- v ? /* @__PURE__ */ f("div", {
1748
- className: "h-full w-full rounded-lg border overflow-hidden",
1749
- children: /* @__PURE__ */ f("img", {
1750
- src: e.url,
1751
- alt: `Uploaded ${t + 1}`,
1752
- className: "h-full w-full object-cover"
1753
- })
1754
- }) : /* @__PURE__ */ p("div", {
1755
- className: G("relative flex items-center gap-2 px-3 rounded-lg border-2 min-w-0 overflow-hidden", "border-dashed border-muted-foreground/25", "h-full w-full"),
1756
- children: [
1757
- /* @__PURE__ */ f(br, {
1758
- filename: e.name,
1759
- size: a
1760
- }),
1761
- /* @__PURE__ */ f("span", {
1762
- className: G("text-xs truncate min-w-0", e.isPending ? "w-[140px] shrink-0" : "flex-1"),
1763
- children: e.name
1764
- }),
1765
- e.isPending && /* @__PURE__ */ f("span", {
1766
- className: "px-2 py-0.5 bg-yellow-500/90 text-white text-xs rounded whitespace-nowrap shrink-0",
1767
- children: g("rc.fileInput.pending")
1768
- })
1769
- ]
1770
- }),
1771
- !n && /* @__PURE__ */ f(K, {
1772
- type: "button",
1773
- variant: "destructive",
1774
- size: "xs",
1775
- className: "absolute -top-2 -right-2 h-6 w-6 rounded-full p-0",
1776
- onClick: ee(t),
1777
- icon: /* @__PURE__ */ f(Zt, {})
1778
- }),
1779
- v && e.isPending && /* @__PURE__ */ f("div", {
1780
- className: "absolute bottom-2 left-2 right-2 mx-auto max-w-[calc(100%-1rem)] px-2 py-1 bg-yellow-500/90 text-white text-xs rounded text-center truncate",
1781
- children: g("rc.fileInput.pending")
1782
- })
1783
- ]
1784
- }, `${e.url}-${t}`)),
1785
- M && /* @__PURE__ */ f("div", {
1786
- onClick: te,
1787
- onDrop: F,
1788
- onDragOver: (e) => {
1789
- e.preventDefault(), !n && !x && w(!0);
1790
- },
1791
- onDragLeave: (e) => {
1792
- e.preventDefault(), w(!1);
1793
- },
1794
- className: G("flex items-center justify-center rounded-lg border-2 border-dashed cursor-pointer transition-all", I[a], C ? "border-primary bg-primary/5" : "border-muted-foreground/25 hover:border-muted-foreground/50", n && "opacity-50 cursor-not-allowed", x && "cursor-wait"),
1795
- children: x ? /* @__PURE__ */ p("div", {
1796
- className: "flex flex-col items-center gap-2 text-muted-foreground",
1797
- children: [/* @__PURE__ */ f(gr, { className: "h-6 w-6 animate-spin" }), /* @__PURE__ */ f("span", {
1798
- className: "text-xs",
1799
- children: g("rc.fileInput.uploading")
1800
- })]
1801
- }) : /* @__PURE__ */ p("div", {
1802
- className: "flex flex-col items-center gap-2 text-muted-foreground p-2",
1803
- children: [f(v ? hr : _r, { className: "h-6 w-6" }), /* @__PURE__ */ f("span", {
1804
- className: "text-xs text-center",
1805
- children: T
1806
- })]
1807
- })
1808
- })
1809
- ]
1810
- });
1811
- }
1812
- //#endregion
1813
- //#region src/components/ui/label.tsx
1814
- var wr = g("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"), Tr = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(re.Root, {
1815
- ref: n,
1816
- className: G(wr(), e),
1817
- ...t
1818
- }));
1819
- Tr.displayName = re.Root.displayName;
1820
- //#endregion
1821
- //#region src/components/ui/form.tsx
1822
- var Er = I, Dr = e.createContext(null), Or = ({ ...e }) => /* @__PURE__ */ f(Dr.Provider, {
1823
- value: { name: e.name },
1824
- children: /* @__PURE__ */ f(te, { ...e })
1825
- }), kr = () => {
1826
- let t = e.useContext(Dr), n = e.useContext(Ar), { getFieldState: r, formState: i } = ne();
1827
- if (!t) throw Error("useFormField should be used within <FormField>");
1828
- if (!n) throw Error("useFormField should be used within <FormItem>");
1829
- let a = r(t.name, i), { id: o } = n;
1830
- return {
1831
- id: o,
1832
- name: t.name,
1833
- formItemId: `${o}-form-item`,
1834
- formDescriptionId: `${o}-form-item-description`,
1835
- formMessageId: `${o}-form-item-message`,
1836
- ...a
1837
- };
1838
- }, Ar = e.createContext(null), jr = e.forwardRef(({ className: t, ...n }, r) => {
1839
- let i = e.useId();
1840
- return /* @__PURE__ */ f(Ar.Provider, {
1841
- value: { id: i },
1842
- children: /* @__PURE__ */ f("div", {
1843
- ref: r,
1844
- className: G("space-y-2", t),
1845
- ...n
1846
- })
1847
- });
1848
- });
1849
- jr.displayName = "FormItem";
1850
- var Mr = e.forwardRef(({ className: e, ...t }, n) => {
1851
- let { error: r, formItemId: i } = kr();
1852
- return /* @__PURE__ */ f(Tr, {
1853
- ref: n,
1854
- className: G(r && "text-destructive", e),
1855
- htmlFor: i,
1856
- ...t
1857
- });
1858
- });
1859
- Mr.displayName = "FormLabel";
1860
- var Nr = e.forwardRef(({ ...e }, t) => {
1861
- let { error: n, formItemId: r, formDescriptionId: i, formMessageId: a } = kr();
1862
- return /* @__PURE__ */ f(v, {
1863
- ref: t,
1864
- id: r,
1865
- "aria-describedby": n ? `${i} ${a}` : `${i}`,
1866
- "aria-invalid": !!n,
1867
- ...e
1868
- });
1869
- });
1870
- Nr.displayName = "FormControl";
1871
- var Pr = e.forwardRef(({ className: e, ...t }, n) => {
1872
- let { formDescriptionId: r } = kr();
1873
- return /* @__PURE__ */ f("p", {
1874
- ref: n,
1875
- id: r,
1876
- className: G("text-sm text-muted-foreground", e),
1877
- ...t
1878
- });
1879
- });
1880
- Pr.displayName = "FormDescription";
1881
- var Fr = e.forwardRef(({ className: e, children: t, ...n }, r) => {
1882
- let { error: i, formMessageId: a } = kr(), o = i ? String(i?.message ?? "") : t;
1883
- return o ? /* @__PURE__ */ f("p", {
1884
- ref: r,
1885
- id: a,
1886
- className: G("text-sm font-medium text-destructive", e),
1887
- ...n,
1888
- children: o
1889
- }) : null;
1890
- });
1891
- Fr.displayName = "FormMessage";
1892
- //#endregion
1893
- //#region src/components/ui/hover-card.tsx
1894
- var Ir = ie.Root, Lr = ie.Trigger, Rr = e.forwardRef(({ className: e, align: t = "center", sideOffset: n = 4, ...r }, i) => /* @__PURE__ */ f(ie.Content, {
1895
- ref: i,
1896
- align: t,
1897
- sideOffset: n,
1898
- className: G("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=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 origin-[--radix-hover-card-content-transform-origin]", e),
1899
- ...r
1900
- }));
1901
- Rr.displayName = ie.Content.displayName;
1902
- //#endregion
1903
- //#region ~icons/lucide/dot.jsx
1904
- var zr = (e) => /* @__PURE__ */ f("svg", {
1905
- viewBox: "0 0 24 24",
1906
- width: "1.2em",
1907
- height: "1.2em",
1908
- ...e,
1909
- children: /* @__PURE__ */ f("circle", {
1910
- cx: 12.1,
1911
- cy: 12.1,
1912
- r: 1,
1913
- fill: "none",
1914
- stroke: "currentColor",
1915
- strokeLinecap: "round",
1916
- strokeLinejoin: "round",
1917
- strokeWidth: 2
1918
- })
1919
- }), Br = e.forwardRef(({ className: e, containerClassName: t, ...n }, r) => /* @__PURE__ */ f(ae, {
1920
- ref: r,
1921
- containerClassName: G("flex items-center gap-2 has-[:disabled]:opacity-50", t),
1922
- className: G("disabled:cursor-not-allowed", e),
1923
- ...n
1924
- }));
1925
- Br.displayName = "InputOTP";
1926
- var Vr = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f("div", {
1927
- ref: n,
1928
- className: G("flex items-center", e),
1929
- ...t
1930
- }));
1931
- Vr.displayName = "InputOTPGroup";
1932
- var Hr = e.forwardRef(({ index: t, className: n, ...r }, i) => {
1933
- let { char: a, hasFakeCaret: o, isActive: s } = e.useContext(oe).slots[t];
1934
- return /* @__PURE__ */ p("div", {
1935
- ref: i,
1936
- className: G("relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md", s && "z-10 ring-2 ring-ring ring-offset-background", n),
1937
- ...r,
1938
- children: [a, o && /* @__PURE__ */ f("div", {
1939
- className: "pointer-events-none absolute inset-0 flex items-center justify-center",
1940
- children: /* @__PURE__ */ f("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" })
1941
- })]
1942
- });
1943
- });
1944
- Hr.displayName = "InputOTPSlot";
1945
- var Ur = e.forwardRef(({ ...e }, t) => /* @__PURE__ */ f("div", {
1946
- ref: t,
1947
- role: "separator",
1948
- ...e,
1949
- children: /* @__PURE__ */ f(zr, {})
1950
- }));
1951
- Ur.displayName = "InputOTPSeparator";
1952
- //#endregion
1953
- //#region src/components/ui/menubar.tsx
1954
- function Wr({ ...e }) {
1955
- return /* @__PURE__ */ f(L.Menu, { ...e });
1956
- }
1957
- function Gr({ ...e }) {
1958
- return /* @__PURE__ */ f(L.Group, { ...e });
1959
- }
1960
- function Kr({ ...e }) {
1961
- return /* @__PURE__ */ f(L.Portal, { ...e });
1962
- }
1963
- function qr({ ...e }) {
1964
- return /* @__PURE__ */ f(L.RadioGroup, { ...e });
1965
- }
1966
- function Jr({ ...e }) {
1967
- return /* @__PURE__ */ f(L.Sub, {
1968
- "data-slot": "menubar-sub",
1969
- ...e
1970
- });
1971
- }
1972
- var Yr = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(L.Root, {
1973
- ref: n,
1974
- className: G("flex h-10 items-center space-x-1 rounded-md border bg-background p-1", e),
1975
- ...t
1976
- }));
1977
- Yr.displayName = L.Root.displayName;
1978
- var Xr = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(L.Trigger, {
1979
- ref: n,
1980
- className: G("flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", e),
1981
- ...t
1982
- }));
1983
- Xr.displayName = L.Trigger.displayName;
1984
- var Zr = e.forwardRef(({ className: e, inset: t, children: n, ...r }, i) => /* @__PURE__ */ p(L.SubTrigger, {
1985
- ref: i,
1986
- className: G("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", t && "pl-8", e),
1987
- ...r,
1988
- children: [n, /* @__PURE__ */ f(dt, { className: "ml-auto h-4 w-4" })]
1989
- }));
1990
- Zr.displayName = L.SubTrigger.displayName;
1991
- var Qr = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(L.SubContent, {
1992
- ref: n,
1993
- className: G("z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=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 origin-[--radix-menubar-content-transform-origin]", e),
1994
- ...t
1995
- }));
1996
- Qr.displayName = L.SubContent.displayName;
1997
- var $r = e.forwardRef(({ className: e, align: t = "start", alignOffset: n = -4, sideOffset: r = 8, ...i }, a) => /* @__PURE__ */ f(L.Portal, { children: /* @__PURE__ */ f(L.Content, {
1998
- ref: a,
1999
- align: t,
2000
- alignOffset: n,
2001
- sideOffset: r,
2002
- className: G("z-50 min-w-48 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=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 origin-[--radix-menubar-content-transform-origin]", e),
2003
- ...i
2004
- }) }));
2005
- $r.displayName = L.Content.displayName;
2006
- var ei = e.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ f(L.Item, {
2007
- ref: r,
2008
- className: G("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", t && "pl-8", e),
2009
- ...n
2010
- }));
2011
- ei.displayName = L.Item.displayName;
2012
- var ti = e.forwardRef(({ className: e, children: t, checked: n, ...r }, i) => /* @__PURE__ */ p(L.CheckboxItem, {
2013
- ref: i,
2014
- className: G("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", e),
2015
- checked: n,
2016
- ...r,
2017
- children: [/* @__PURE__ */ f("span", {
2018
- className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
2019
- children: /* @__PURE__ */ f(L.ItemIndicator, { children: /* @__PURE__ */ f(q, { className: "h-4 w-4" }) })
2020
- }), t]
2021
- }));
2022
- ti.displayName = L.CheckboxItem.displayName;
2023
- var ni = e.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ p(L.RadioItem, {
2024
- ref: r,
2025
- className: G("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", e),
2026
- ...n,
2027
- children: [/* @__PURE__ */ f("span", {
2028
- className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
2029
- children: /* @__PURE__ */ f(L.ItemIndicator, { children: /* @__PURE__ */ f(Cn, { className: "h-2 w-2 fill-current" }) })
2030
- }), t]
2031
- }));
2032
- ni.displayName = L.RadioItem.displayName;
2033
- var ri = e.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ f(L.Label, {
2034
- ref: r,
2035
- className: G("px-2 py-1.5 text-sm font-semibold", t && "pl-8", e),
2036
- ...n
2037
- }));
2038
- ri.displayName = L.Label.displayName;
2039
- var ii = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(L.Separator, {
2040
- ref: n,
2041
- className: G("-mx-1 my-1 h-px bg-muted", e),
2042
- ...t
2043
- }));
2044
- ii.displayName = L.Separator.displayName;
2045
- var ai = ({ className: e, ...t }) => /* @__PURE__ */ f("span", {
2046
- className: G("ml-auto text-xs tracking-widest text-muted-foreground", e),
2047
- ...t
2048
- });
2049
- ai.displayname = "MenubarShortcut";
2050
- //#endregion
2051
- //#region src/components/ui/separator.tsx
2052
- var oi = e.forwardRef(({ className: e, orientation: t = "horizontal", decorative: n = !0, ...r }, i) => /* @__PURE__ */ f(se.Root, {
2053
- ref: i,
2054
- decorative: n,
2055
- orientation: t,
2056
- className: G("shrink-0 bg-border", t === "horizontal" ? "h-px w-full" : "h-full w-px", e),
2057
- ...r
2058
- }));
2059
- oi.displayName = se.Root.displayName;
2060
- //#endregion
2061
- //#region src/components/ui/select/select.tsx
2062
- function si(e) {
2063
- return typeof e == "object" && !!e && "value" in e;
2064
- }
2065
- function ci(e, t) {
2066
- let n = e.multiple === !0, i = e.async === !0, u = c(null);
2067
- o(t, () => u.current);
2068
- let [d, f] = l(!1), [p, m] = l(""), [h, g] = l(/* @__PURE__ */ new Map()), _ = i && "onOpenChange" in e ? e.onOpenChange : void 0, v = c(d);
2069
- a(() => {
2070
- v.current !== d && (_ && _(d), v.current = d);
2071
- }, [d, _]);
2072
- let y = r((t) => t == null ? "" : e.valueKey ? e.valueKey(t) : String(t), [e.valueKey]), b = s(() => e.items.map((e) => si(e) ? e : { value: e }), [e.items]), x = s(() => {
2073
- let e = /* @__PURE__ */ new Map();
2074
- for (let t of b) e.set(y(t.value), t.value);
2075
- return e;
2076
- }, [b, y]), S = r((t) => {
2077
- if (e.renderItem) return e.renderItem(t);
2078
- let n = b.find((e) => e.value === t);
2079
- if (n?.label !== void 0) return n.label;
2080
- if (i) {
2081
- let e = h.get(y(t));
2082
- if (e?.label !== void 0) return e.label;
2083
- }
2084
- return String(t);
2085
- }, [
2086
- e.renderItem,
2087
- b,
2088
- i,
2089
- h,
2090
- y
2091
- ]);
2092
- a(() => {
2093
- if (!i) return;
2094
- let t = n ? e.value : [e.value].filter(Boolean), r = /* @__PURE__ */ new Map();
2095
- for (let e of t) {
2096
- let t = y(e), n = b.find((t) => t.value === e);
2097
- n && r.set(t, n);
2098
- }
2099
- g(r);
2100
- }, [
2101
- i,
2102
- n,
2103
- e,
2104
- b,
2105
- y
2106
- ]);
2107
- let C = r((e) => {
2108
- m(e);
2109
- }, []), w = i && "onSearch" in e ? e.onSearch : void 0, T = i && "searchDebounce" in e && e.searchDebounce !== void 0 ? e.searchDebounce : 300;
2110
- a(() => {
2111
- if (!w) return;
2112
- let e = setTimeout(() => {
2113
- w(p);
2114
- }, p === "" ? 0 : T);
2115
- return () => clearTimeout(e);
2116
- }, [
2117
- p,
2118
- w,
2119
- T
2120
- ]);
2121
- let E = s(() => {
2122
- if (i) {
2123
- let e = /* @__PURE__ */ new Map();
2124
- for (let [t, n] of h) e.set(t, n);
2125
- for (let t of b) e.set(y(t.value), t);
2126
- return Array.from(e.values());
2127
- } else return p ? b.filter((e) => {
2128
- let t = S(e.value);
2129
- return String(t).toLowerCase().includes(p.toLowerCase());
2130
- }) : b;
2131
- }, [
2132
- i,
2133
- b,
2134
- h,
2135
- p,
2136
- y,
2137
- S
2138
- ]);
2139
- return a(() => {
2140
- d || m("");
2141
- }, [d]), {
2142
- isMultiple: n,
2143
- isAsync: i,
2144
- selectRef: u,
2145
- isPopoverOpen: d,
2146
- setIsPopoverOpen: f,
2147
- searchValue: p,
2148
- handleSearchChange: C,
2149
- filteredOptions: E,
2150
- normalizedItems: b,
2151
- getKeyForValue: y,
2152
- valueByKey: x,
2153
- getItemLabel: S
2154
- };
2155
- }
2156
- function li(e, t) {
2157
- if (!t || typeof e != "string") return e;
2158
- let n = e.toLowerCase(), r = t.toLowerCase(), i = n.indexOf(r);
2159
- if (i === -1) return e;
2160
- let a = e.slice(0, i), o = e.slice(i, i + t.length), s = e.slice(i + t.length);
2161
- return /* @__PURE__ */ p(d, { children: [
2162
- a,
2163
- /* @__PURE__ */ f("strong", {
2164
- className: "font-bold",
2165
- children: o
2166
- }),
2167
- s
2168
- ] });
2169
- }
2170
- function ui({ props: e, isMultiple: t, isAsync: n, isPopoverOpen: i, setIsPopoverOpen: o, searchValue: s, handleSearchChange: c, filteredOptions: u, getKeyForValue: m, getItemLabel: h }) {
2171
- let { SD: g } = J(), [_, v] = l(null), y = r((e) => {
2172
- v(e);
2173
- }, []), [b, x] = l(null), S = r((e) => {
2174
- x(e);
2175
- }, []), C = n && "onLoadMore" in e ? e.onLoadMore : void 0, w = n && "hasMore" in e ? e.hasMore ?? !1 : !1, T = n && "isLoadingMore" in e ? e.isLoadingMore ?? !1 : !1, E = n && C !== void 0;
2176
- a(() => {
2177
- if (!C || !w || T || !b || !_) return;
2178
- let e = new IntersectionObserver((e) => {
2179
- for (let t of e) t.isIntersecting && C();
2180
- }, {
2181
- root: _,
2182
- threshold: 0
2183
- });
2184
- return e.observe(b), () => e.disconnect();
2185
- }, [
2186
- b,
2187
- _,
2188
- C,
2189
- w,
2190
- T
2191
- ]);
2192
- let D = e.searchable ?? n, O = r((e) => {
2193
- let t = _;
2194
- if (!t) return;
2195
- let n = t.scrollTop < t.scrollHeight - t.clientHeight, r = t.scrollTop > 0;
2196
- (e.deltaY > 0 && n || e.deltaY < 0 && r) && e.stopPropagation();
2197
- }, [_]), k = r((n) => {
2198
- if (!e.disabled) if (t) {
2199
- let t = e.value, r = t.includes(n) ? t.filter((e) => e !== n) : [...t, n];
2200
- e.onValueChange(r);
2201
- } else e.onValueChange?.(n), o(!1);
2202
- }, [
2203
- t,
2204
- e,
2205
- o
2206
- ]), A = r(() => {
2207
- if (!t || e.disabled) return;
2208
- let n = u.filter((e) => !e.disabled);
2209
- if (e.value.length === n.length) e.onValueChange([]);
2210
- else {
2211
- let t = n.map((e) => e.value);
2212
- e.onValueChange(t);
2213
- }
2214
- }, [
2215
- t,
2216
- e,
2217
- u
2218
- ]), j = r(() => {
2219
- e.disabled || (t ? e.onValueChange([]) : e.onValueChange?.(void 0));
2220
- }, [t, e]), M = r((n) => t ? e.value.includes(n) : e.value === n, [t, e]), N = n && "loading" in e ? e.loading : !1, P = n && "error" in e ? e.error : void 0, F = t ? e.value.length > 0 : e.value !== void 0 && e.value !== null && e.value !== "", ee = () => {
2221
- if (!t) return null;
2222
- let n = e.value;
2223
- return /* @__PURE__ */ f(d, { children: n.map((e) => {
2224
- let t = m(e);
2225
- return /* @__PURE__ */ p(ut, {
2226
- variant: "outline",
2227
- className: "m-1 transition-all duration-300 ease-in-out",
2228
- children: [h(e), /* @__PURE__ */ f(Ut, {
2229
- className: "ml-2 h-3 w-3 cursor-pointer !pointer-events-auto",
2230
- onPointerDownCapture: (e) => {
2231
- e.stopPropagation();
2232
- },
2233
- onMouseDownCapture: (e) => {
2234
- e.stopPropagation();
2235
- },
2236
- onClick: (t) => {
2237
- t.stopPropagation(), k(e);
2238
- }
2239
- })]
2240
- }, t);
2241
- }) });
2242
- };
2243
- return /* @__PURE__ */ p(Y, {
2244
- open: i,
2245
- onOpenChange: o,
2246
- children: [/* @__PURE__ */ f(X, {
2247
- asChild: !0,
2248
- children: /* @__PURE__ */ f(K, {
2249
- variant: "outline",
2250
- role: "combobox",
2251
- "aria-expanded": i,
2252
- disabled: e.disabled || N,
2253
- className: G("flex p-1 rounded-md border border-input min-h-10 h-auto items-center justify-between bg-white hover:bg-white hover:text-inherit [&_svg]:pointer-events-auto w-full", e.className),
2254
- children: t && F ? /* @__PURE__ */ p("div", {
2255
- className: "flex justify-between items-center w-full",
2256
- children: [/* @__PURE__ */ f("div", {
2257
- className: "flex items-center gap-1 flex-wrap",
2258
- children: ee()
2259
- }), /* @__PURE__ */ p("div", {
2260
- className: "flex items-center justify-between",
2261
- children: [
2262
- e.clearable && /* @__PURE__ */ f("div", {
2263
- role: "button",
2264
- tabIndex: 0,
2265
- onPointerDownCapture: (e) => {
2266
- e.stopPropagation();
2267
- },
2268
- onMouseDownCapture: (e) => {
2269
- e.stopPropagation();
2270
- },
2271
- onClick: (e) => {
2272
- e.stopPropagation(), j();
2273
- },
2274
- className: "flex items-center justify-center h-4 w-4 mx-2 cursor-pointer text-muted-foreground hover:text-foreground",
2275
- children: /* @__PURE__ */ f(Zt, { className: "h-4 w-4" })
2276
- }),
2277
- /* @__PURE__ */ f(oi, {
2278
- orientation: "vertical",
2279
- className: "flex min-h-6 h-full"
2280
- }),
2281
- /* @__PURE__ */ f(Fe, { className: "h-4 mx-2 cursor-pointer text-muted-foreground" })
2282
- ]
2283
- })]
2284
- }) : !t && F ? /* @__PURE__ */ p("div", {
2285
- className: "flex justify-between items-center w-full px-2 py-1",
2286
- children: [(() => {
2287
- let t = e.value;
2288
- return t == null ? null : /* @__PURE__ */ f("span", {
2289
- className: "flex-1 truncate text-left text-sm",
2290
- children: h(t)
2291
- });
2292
- })(), /* @__PURE__ */ p("div", {
2293
- className: "flex items-center gap-1 shrink-0",
2294
- children: [e.clearable && F && /* @__PURE__ */ f(Ut, {
2295
- className: "h-4 w-4 cursor-pointer opacity-50 hover:opacity-100 transition-opacity",
2296
- onPointerDownCapture: j,
2297
- onMouseDownCapture: j
2298
- }), /* @__PURE__ */ f(Fe, { className: "h-4 w-4 opacity-50" })]
2299
- })]
2300
- }) : /* @__PURE__ */ p("div", {
2301
- className: "flex items-center justify-between w-full px-2 py-1",
2302
- children: [/* @__PURE__ */ f("span", {
2303
- className: "text-sm text-muted-foreground flex-1 truncate text-left",
2304
- children: e.placeholder
2305
- }), /* @__PURE__ */ f(Fe, { className: "h-4 cursor-pointer text-muted-foreground" })]
2306
- })
2307
- })
2308
- }), /* @__PURE__ */ f(Z, {
2309
- className: "min-w-40 p-0",
2310
- align: "start",
2311
- style: { width: "var(--radix-popover-trigger-width)" },
2312
- children: /* @__PURE__ */ p(ln, {
2313
- shouldFilter: !1,
2314
- children: [D && /* @__PURE__ */ f(dn, {
2315
- placeholder: g("common.searchPlaceholder"),
2316
- value: s,
2317
- onValueChange: c
2318
- }), /* @__PURE__ */ f(fn, {
2319
- ref: y,
2320
- onWheel: O,
2321
- children: N ? /* @__PURE__ */ f(pn, { children: /* @__PURE__ */ f("div", {
2322
- className: "flex items-center justify-center",
2323
- children: /* @__PURE__ */ f(gr, { className: "h-4 w-4 animate-spin mr-2" })
2324
- }) }) : P ? /* @__PURE__ */ p(pn, { children: ["Error: ", P.message] }) : u.length === 0 ? /* @__PURE__ */ f(pn, { children: g("rc.multiSelect.noResults") }) : /* @__PURE__ */ p(d, { children: [
2325
- t && !("hideSelectAll" in e && e.hideSelectAll) && /* @__PURE__ */ f(mn, { children: /* @__PURE__ */ p(gn, {
2326
- onSelect: A,
2327
- className: "cursor-pointer",
2328
- children: [/* @__PURE__ */ f("div", {
2329
- className: G("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary", e.value.length === u.filter((e) => !e.disabled).length ? "bg-primary text-primary-foreground" : "opacity-50 [&_svg]:invisible"),
2330
- children: /* @__PURE__ */ f(q, { className: "h-4 w-4" })
2331
- }), /* @__PURE__ */ p("span", { children: [
2332
- "(",
2333
- g("rc.multiSelect.selectAll"),
2334
- ")"
2335
- ] })]
2336
- }) }),
2337
- /* @__PURE__ */ f(mn, { children: u.map((e) => {
2338
- let n = m(e.value), r = M(e.value);
2339
- return /* @__PURE__ */ p(gn, {
2340
- onSelect: () => k(e.value),
2341
- disabled: e.disabled,
2342
- className: G("cursor-pointer", e.disabled && "opacity-50 cursor-not-allowed"),
2343
- children: [
2344
- t && /* @__PURE__ */ f("div", {
2345
- className: G("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary", r ? "bg-primary text-primary-foreground" : "opacity-50 [&_svg]:invisible"),
2346
- children: /* @__PURE__ */ f(q, { className: "h-4 w-4" })
2347
- }),
2348
- !t && /* @__PURE__ */ f(q, { className: G("mr-2 h-4 w-4", r ? "opacity-100" : "opacity-0") }),
2349
- /* @__PURE__ */ f("span", { children: li(h(e.value), s) })
2350
- ]
2351
- }, n);
2352
- }) }),
2353
- E && /* @__PURE__ */ f("div", {
2354
- ref: S,
2355
- className: "flex items-center justify-center py-2 text-xs text-muted-foreground",
2356
- children: T ? /* @__PURE__ */ f(gr, { className: "h-3 w-3 animate-spin" }) : null
2357
- })
2358
- ] })
2359
- })]
2360
- })
2361
- })]
2362
- });
2363
- }
2364
- var $ = e.forwardRef(function(e, t) {
2365
- let n = ci(e, t);
2366
- return /* @__PURE__ */ f(ui, {
2367
- props: e,
2368
- isMultiple: n.isMultiple,
2369
- isAsync: n.isAsync,
2370
- isPopoverOpen: n.isPopoverOpen,
2371
- setIsPopoverOpen: n.setIsPopoverOpen,
2372
- searchValue: n.searchValue,
2373
- handleSearchChange: n.handleSearchChange,
2374
- filteredOptions: n.filteredOptions,
2375
- getKeyForValue: n.getKeyForValue,
2376
- getItemLabel: n.getItemLabel
2377
- });
2378
- }), di = [
2379
- "Jan",
2380
- "Feb",
2381
- "Mar",
2382
- "Apr",
2383
- "May",
2384
- "Jun",
2385
- "Jul",
2386
- "Aug",
2387
- "Sep",
2388
- "Oct",
2389
- "Nov",
2390
- "Dec"
2391
- ];
2392
- function fi({ CalendarIcon: t, ChevronDownIcon: n, value: r, onValueChange: i, placeholder: a, dateFormat: o = "MMM/yyyy", className: s = "", yearRange: c = {
2393
- start: 2020,
2394
- end: 2030
2395
- }, defaultRangeMode: l = !1 }) {
2396
- let { SD: u } = J(), [d, m] = e.useState(!1), [h, g] = e.useState(l), [_, v] = e.useState(), [y, b] = e.useState(), [x, S] = e.useState((/* @__PURE__ */ new Date()).getFullYear()), [C, w] = e.useState((/* @__PURE__ */ new Date()).getFullYear()), [T, E] = e.useState((/* @__PURE__ */ new Date()).getFullYear()), D = e.useMemo(() => Array.from({ length: c.end - c.start + 1 }, (e, t) => c.start + t), [c.start, c.end]);
2397
- e.useEffect(() => {
2398
- d && (r?.type === "range" ? (g(!0), b({
2399
- from: r.from,
2400
- to: r.to
2401
- }), v(void 0), w(r.from.getFullYear()), E(r.to.getFullYear())) : r?.type === "single" ? (g(!1), v(r.date), b(void 0), S(r.date.getFullYear())) : (g(l), v(void 0), b(void 0), S((/* @__PURE__ */ new Date()).getFullYear()), w((/* @__PURE__ */ new Date()).getFullYear()), E((/* @__PURE__ */ new Date()).getFullYear())));
2402
- }, [
2403
- d,
2404
- r,
2405
- l
2406
- ]);
2407
- let O = () => r ? r.type === "single" ? M(r.date, o) : `${M(r.from, o)} - ${M(r.to, o)}` : a ?? `- ${M(/* @__PURE__ */ new Date(), o)}`, k = (e) => {
2408
- g(e), e ? v(void 0) : b(void 0);
2409
- };
2410
- return /* @__PURE__ */ f("div", {
2411
- className: "flex items-center gap-4",
2412
- children: /* @__PURE__ */ p(Y, {
2413
- open: d,
2414
- onOpenChange: m,
2415
- children: [/* @__PURE__ */ f(X, {
2416
- asChild: !0,
2417
- children: /* @__PURE__ */ p(K, {
2418
- variant: "outline",
2419
- className: `gap-2 h-8 text-xs ${s}`,
2420
- children: [
2421
- /* @__PURE__ */ f(t, { className: "h-4 w-4" }),
2422
- O(),
2423
- /* @__PURE__ */ f(n, { className: "h-4 w-4" })
2424
- ]
2425
- })
2426
- }), /* @__PURE__ */ p(Z, {
2427
- className: "w-auto p-0",
2428
- align: "start",
2429
- children: [
2430
- /* @__PURE__ */ f("div", {
2431
- className: "p-3 border-b space-y-2",
2432
- children: /* @__PURE__ */ p("div", {
2433
- className: "flex gap-2",
2434
- children: [/* @__PURE__ */ f(K, {
2435
- variant: h ? "outline" : "default",
2436
- size: "sm",
2437
- onClick: () => k(!1),
2438
- className: "flex-1 h-7 text-xs",
2439
- children: u("rc.monthPickerMultiple.singleDate")
2440
- }), /* @__PURE__ */ f(K, {
2441
- variant: h ? "default" : "outline",
2442
- size: "sm",
2443
- onClick: () => k(!0),
2444
- className: "flex-1 h-7 text-xs",
2445
- children: u("rc.monthPickerMultiple.dateRange")
2446
- })]
2447
- })
2448
- }),
2449
- h ? /* @__PURE__ */ p("div", {
2450
- className: "flex",
2451
- children: [
2452
- /* @__PURE__ */ p("div", {
2453
- className: "p-4 space-y-2",
2454
- children: [
2455
- /* @__PURE__ */ f("div", {
2456
- className: "text-xs text-muted-foreground",
2457
- children: u("rc.monthPickerMultiple.startDate")
2458
- }),
2459
- /* @__PURE__ */ f($, {
2460
- value: C,
2461
- onValueChange: (e) => {
2462
- e !== void 0 && w(e);
2463
- },
2464
- items: D.map((e) => ({
2465
- value: e,
2466
- label: String(e),
2467
- disabled: y?.to ? e > y.to.getFullYear() : !1
2468
- })),
2469
- className: "h-8 text-xs"
2470
- }),
2471
- /* @__PURE__ */ f("div", {
2472
- className: "grid grid-cols-3 gap-2",
2473
- children: di.map((e, t) => {
2474
- let n = y?.to ? C > y.to.getFullYear() || C === y.to.getFullYear() && t > y.to.getMonth() : !1;
2475
- return /* @__PURE__ */ f(K, {
2476
- variant: y?.from?.getMonth() === t && y?.from?.getFullYear() === C ? "default" : "outline",
2477
- size: "sm",
2478
- onClick: () => {
2479
- let e = new Date(C, t, 1);
2480
- y?.from?.getMonth() === t && y?.from?.getFullYear() === C ? b({
2481
- from: void 0,
2482
- to: y?.to
2483
- }) : b({
2484
- from: e,
2485
- to: y?.to
2486
- });
2487
- },
2488
- disabled: n,
2489
- className: "h-8 text-xs",
2490
- children: e
2491
- }, e);
2492
- })
2493
- })
2494
- ]
2495
- }),
2496
- /* @__PURE__ */ f("div", { className: "border-r" }),
2497
- /* @__PURE__ */ p("div", {
2498
- className: "p-4 space-y-2",
2499
- children: [
2500
- /* @__PURE__ */ f("div", {
2501
- className: "text-xs text-muted-foreground",
2502
- children: u("rc.monthPickerMultiple.endDate")
2503
- }),
2504
- /* @__PURE__ */ f($, {
2505
- value: T,
2506
- onValueChange: (e) => {
2507
- e !== void 0 && E(e);
2508
- },
2509
- items: D.map((e) => ({
2510
- value: e,
2511
- label: String(e),
2512
- disabled: y?.from ? e < y.from.getFullYear() : !1
2513
- })),
2514
- className: "h-8 text-xs"
2515
- }),
2516
- /* @__PURE__ */ f("div", {
2517
- className: "grid grid-cols-3 gap-2",
2518
- children: di.map((e, t) => {
2519
- let n = y?.from ? T < y.from.getFullYear() || T === y.from.getFullYear() && t < y.from.getMonth() : !1;
2520
- return /* @__PURE__ */ f(K, {
2521
- variant: y?.to?.getMonth() === t && y?.to?.getFullYear() === T ? "default" : "outline",
2522
- size: "sm",
2523
- onClick: () => {
2524
- let e = new Date(T, t, 1);
2525
- y?.to?.getMonth() === t && y?.to?.getFullYear() === T ? b({
2526
- from: y?.from,
2527
- to: void 0
2528
- }) : b({
2529
- from: y?.from,
2530
- to: e
2531
- });
2532
- },
2533
- disabled: n,
2534
- className: "h-8 text-xs",
2535
- children: e
2536
- }, e);
2537
- })
2538
- })
2539
- ]
2540
- })
2541
- ]
2542
- }) : /* @__PURE__ */ p("div", {
2543
- className: "p-4 space-y-2",
2544
- children: [/* @__PURE__ */ f($, {
2545
- value: x,
2546
- onValueChange: (e) => {
2547
- e !== void 0 && S(e);
2548
- },
2549
- items: D.map((e) => ({
2550
- value: e,
2551
- label: String(e)
2552
- })),
2553
- className: "h-8 text-xs"
2554
- }), /* @__PURE__ */ f("div", {
2555
- className: "grid grid-cols-3 gap-2",
2556
- children: di.map((e, t) => /* @__PURE__ */ f(K, {
2557
- variant: _?.getMonth() === t && _?.getFullYear() === x ? "default" : "outline",
2558
- size: "sm",
2559
- onClick: () => {
2560
- let e = new Date(x, t, 1);
2561
- _?.getMonth() === t && _?.getFullYear() === x ? v(void 0) : v(e);
2562
- },
2563
- className: "h-8 text-xs",
2564
- children: e
2565
- }, e))
2566
- })]
2567
- }),
2568
- /* @__PURE__ */ p("div", {
2569
- className: "p-3 border-t flex justify-end gap-2",
2570
- children: [/* @__PURE__ */ f(K, {
2571
- variant: "outline",
2572
- size: "sm",
2573
- onClick: () => {
2574
- m(!1);
2575
- },
2576
- className: "h-8 text-xs",
2577
- children: u("rc.common.cancel")
2578
- }), /* @__PURE__ */ f(K, {
2579
- variant: "default",
2580
- size: "sm",
2581
- onClick: () => {
2582
- let e;
2583
- h && y?.from && y?.to ? e = {
2584
- type: "range",
2585
- from: y.from,
2586
- to: y.to
2587
- } : !h && _ && (e = {
2588
- type: "single",
2589
- date: _
2590
- }), i?.(e), m(!1);
2591
- },
2592
- className: "h-8 text-xs",
2593
- children: u("rc.common.save")
2594
- })]
2595
- })
2596
- ]
2597
- })]
2598
- })
2599
- });
2600
- }
2601
- //#endregion
2602
- //#region src/components/ui/navigation-menu.tsx
2603
- var pi = e.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ p(R.Root, {
2604
- ref: r,
2605
- className: G("relative z-10 flex max-w-max flex-1 items-center justify-center", e),
2606
- ...n,
2607
- children: [t, /* @__PURE__ */ f(bi, {})]
2608
- }));
2609
- pi.displayName = R.Root.displayName;
2610
- var mi = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(R.List, {
2611
- ref: n,
2612
- className: G("group flex flex-1 list-none items-center justify-center space-x-1", e),
2613
- ...t
2614
- }));
2615
- mi.displayName = R.List.displayName;
2616
- var hi = R.Item, gi = g("group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:text-accent-foreground data-[state=open]:bg-accent/50 data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent"), _i = e.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ p(R.Trigger, {
2617
- ref: r,
2618
- className: G(gi(), "group", e),
2619
- ...n,
2620
- children: [
2621
- t,
2622
- " ",
2623
- /* @__PURE__ */ f(Fe, {
2624
- className: "relative top-px ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180",
2625
- "aria-hidden": "true"
2626
- })
2627
- ]
2628
- }));
2629
- _i.displayName = R.Trigger.displayName;
2630
- var vi = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(R.Content, {
2631
- ref: n,
2632
- className: G("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ", e),
2633
- ...t
2634
- }));
2635
- vi.displayName = R.Content.displayName;
2636
- var yi = R.Link, bi = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f("div", {
2637
- className: G("absolute left-0 top-full flex justify-center"),
2638
- children: /* @__PURE__ */ f(R.Viewport, {
2639
- className: G("origin-top-center relative mt-1.5 h-(--radix-navigation-menu-viewport-height) w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-(--radix-navigation-menu-viewport-width)", e),
2640
- ref: n,
2641
- ...t
2642
- })
2643
- }));
2644
- bi.displayName = R.Viewport.displayName;
2645
- var xi = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(R.Indicator, {
2646
- ref: n,
2647
- className: G("top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in", e),
2648
- ...t,
2649
- children: /* @__PURE__ */ f("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" })
2650
- }));
2651
- xi.displayName = R.Indicator.displayName;
2652
- //#endregion
2653
- //#region src/components/ui/pagination.tsx
2654
- var Si = e.forwardRef(({ value: e, onValueChange: t, total: n, itemsPerPage: r, className: i, maxVisible: a = 6 }, o) => {
2655
- let { SD: s } = J(), c = Math.ceil(n / r), l = e, u = (l - 1) * r + 1, d = Math.min(l * r, n);
2656
- return /* @__PURE__ */ p("div", {
2657
- ref: o,
2658
- className: G("flex items-center justify-between pt-6", i),
2659
- children: [/* @__PURE__ */ f("div", {
2660
- className: "text-xs text-muted-foreground",
2661
- children: s("rc.pagination.showing")(u, d, n)
2662
- }), /* @__PURE__ */ p("div", {
2663
- className: "flex items-center gap-2",
2664
- children: [
2665
- /* @__PURE__ */ f(K, {
2666
- variant: "outline",
2667
- size: "sm",
2668
- className: "h-8 px-3 text-xs",
2669
- disabled: l === 1,
2670
- onClick: () => t(l - 1),
2671
- children: s("rc.pagination.previous")
2672
- }),
2673
- /* @__PURE__ */ f("div", {
2674
- className: "flex items-center gap-1",
2675
- children: (() => {
2676
- let e = Math.max(1, l - Math.floor(a / 2)), n = Math.min(c, e + a - 1);
2677
- return n - e + 1 < a && (e = Math.max(1, n - a + 1)), Array.from({ length: n - e + 1 }, (t, n) => e + n).map((e) => /* @__PURE__ */ f(K, {
2678
- variant: "outline",
2679
- size: "sm",
2680
- className: `h-8 w-8 text-xs ${e === l ? "bg-primary text-primary-foreground" : ""}`,
2681
- onClick: () => t(e),
2682
- children: e
2683
- }, e));
2684
- })()
2685
- }),
2686
- /* @__PURE__ */ f(K, {
2687
- variant: "outline",
2688
- size: "sm",
2689
- className: "h-8 px-3 text-xs",
2690
- disabled: l === c,
2691
- onClick: () => t(l + 1),
2692
- children: s("rc.pagination.next")
2693
- })
2694
- ]
2695
- })]
2696
- });
2697
- });
2698
- Si.displayName = "Pagination";
2699
- //#endregion
2700
- //#region src/components/ui/progress.tsx
2701
- var Ci = e.forwardRef(({ className: e, value: t, ...n }, r) => /* @__PURE__ */ f(ce.Root, {
2702
- ref: r,
2703
- className: G("relative h-4 w-full overflow-hidden rounded-full bg-secondary", e),
2704
- ...n,
2705
- children: /* @__PURE__ */ f(ce.Indicator, {
2706
- className: "h-full w-full flex-1 bg-primary transition-all",
2707
- style: { transform: `translateX(-${100 - (t || 0)}%)` }
2708
- })
2709
- }));
2710
- Ci.displayName = ce.Root.displayName;
2711
- //#endregion
2712
- //#region src/components/ui/radio-group.tsx
2713
- var wi = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(z.Root, {
2714
- className: G("grid gap-2", e),
2715
- ...t,
2716
- ref: n
2717
- }));
2718
- wi.displayName = z.Root.displayName;
2719
- var Ti = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(z.Item, {
2720
- ref: n,
2721
- className: G("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", e),
2722
- ...t,
2723
- children: /* @__PURE__ */ f(z.Indicator, {
2724
- className: "flex items-center justify-center",
2725
- children: /* @__PURE__ */ f("div", { className: "h-2 w-2 rounded-full bg-current" })
2726
- })
2727
- }));
2728
- Ti.displayName = z.Item.displayName;
2729
- //#endregion
2730
- //#region src/components/ui/range-number-input.tsx
2731
- function Ei({ value: e = [void 0, void 0], onChange: t, placeholder: n = ["최소값", "최대값"], disabled: r, className: i }) {
2732
- let [a, o] = e;
2733
- return /* @__PURE__ */ p("div", {
2734
- className: `flex items-center gap-2 ${i}`,
2735
- children: [
2736
- /* @__PURE__ */ f(Q, {
2737
- type: "number",
2738
- value: a === void 0 ? "" : String(a),
2739
- onValueChange: (e) => {
2740
- let n = e === "" ? void 0 : Number(e);
2741
- t?.([n, o]);
2742
- },
2743
- placeholder: n[0],
2744
- disabled: r,
2745
- className: "flex-1"
2746
- }),
2747
- /* @__PURE__ */ f("span", {
2748
- className: "text-muted-foreground",
2749
- children: "~"
2750
- }),
2751
- /* @__PURE__ */ f(Q, {
2752
- type: "number",
2753
- value: o === void 0 ? "" : String(o),
2754
- onValueChange: (e) => {
2755
- let n = e === "" ? void 0 : Number(e);
2756
- t?.([a, n]);
2757
- },
2758
- placeholder: n[1],
2759
- disabled: r,
2760
- className: "flex-1"
2761
- })
2762
- ]
2763
- });
2764
- }
2765
- //#endregion
2766
- //#region ~icons/lucide/grip-vertical.jsx
2767
- var Di = (e) => /* @__PURE__ */ f("svg", {
2768
- viewBox: "0 0 24 24",
2769
- width: "1.2em",
2770
- height: "1.2em",
2771
- ...e,
2772
- children: /* @__PURE__ */ p("g", {
2773
- fill: "none",
2774
- stroke: "currentColor",
2775
- strokeLinecap: "round",
2776
- strokeLinejoin: "round",
2777
- strokeWidth: 2,
2778
- children: [
2779
- /* @__PURE__ */ f("circle", {
2780
- cx: 9,
2781
- cy: 12,
2782
- r: 1
2783
- }),
2784
- /* @__PURE__ */ f("circle", {
2785
- cx: 9,
2786
- cy: 5,
2787
- r: 1
2788
- }),
2789
- /* @__PURE__ */ f("circle", {
2790
- cx: 9,
2791
- cy: 19,
2792
- r: 1
2793
- }),
2794
- /* @__PURE__ */ f("circle", {
2795
- cx: 15,
2796
- cy: 12,
2797
- r: 1
2798
- }),
2799
- /* @__PURE__ */ f("circle", {
2800
- cx: 15,
2801
- cy: 5,
2802
- r: 1
2803
- }),
2804
- /* @__PURE__ */ f("circle", {
2805
- cx: 15,
2806
- cy: 19,
2807
- r: 1
2808
- })
2809
- ]
2810
- })
2811
- }), Oi = ({ className: e, ...t }) => /* @__PURE__ */ f(le.PanelGroup, {
2812
- className: G("flex h-full w-full data-[panel-group-direction=vertical]:flex-col", e),
2813
- ...t
2814
- }), ki = le.Panel, Ai = ({ withHandle: e, className: t, ...n }) => /* @__PURE__ */ f(le.PanelResizeHandle, {
2815
- className: G("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90", t),
2816
- ...n,
2817
- children: e && /* @__PURE__ */ f("div", {
2818
- className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border",
2819
- children: /* @__PURE__ */ f(Di, { className: "h-2.5 w-2.5" })
2820
- })
2821
- }), ji = e.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ p(B.Root, {
2822
- ref: r,
2823
- className: G("relative overflow-hidden", e),
2824
- ...n,
2825
- children: [
2826
- /* @__PURE__ */ f(B.Viewport, {
2827
- className: "h-full w-full rounded-[inherit]",
2828
- children: t
2829
- }),
2830
- /* @__PURE__ */ f(Mi, {}),
2831
- /* @__PURE__ */ f(B.Corner, {})
2832
- ]
2833
- }));
2834
- ji.displayName = B.Root.displayName;
2835
- var Mi = e.forwardRef(({ className: e, orientation: t = "vertical", ...n }, r) => /* @__PURE__ */ f(B.ScrollAreaScrollbar, {
2836
- ref: r,
2837
- orientation: t,
2838
- className: G("flex touch-none select-none transition-colors", t === "vertical" && "h-full w-2.5 border-l border-l-transparent p-px", t === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-px", e),
2839
- ...n,
2840
- children: /* @__PURE__ */ f(B.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
2841
- }));
2842
- Mi.displayName = B.ScrollAreaScrollbar.displayName;
2843
- //#endregion
2844
- //#region src/components/ui/select/enum-select.tsx
2845
- function Ni({ enum: t, labels: n, value: r, onValueChange: i, placeholder: a, textPrefix: o = "", clearable: s = !1, disabled: c = !1, className: l, multiple: u = !1 }) {
2846
- let d = e.useMemo(() => t.options.filter((e) => e !== ""), [t]), p = e.useMemo(() => d.map((e) => ({
2847
- value: e,
2848
- label: o + n[e]
2849
- })), [
2850
- d,
2851
- n,
2852
- o
2853
- ]);
2854
- return u ? /* @__PURE__ */ f($, {
2855
- items: p,
2856
- value: r ?? [],
2857
- onValueChange: (e) => {
2858
- i?.(e);
2859
- },
2860
- placeholder: a,
2861
- clearable: s,
2862
- disabled: c,
2863
- className: l,
2864
- multiple: !0,
2865
- async: !1
2866
- }) : /* @__PURE__ */ f($, {
2867
- items: p,
2868
- value: r ?? "",
2869
- onValueChange: (e) => {
2870
- i?.(e);
2871
- },
2872
- placeholder: a,
2873
- clearable: s,
2874
- disabled: c,
2875
- className: l,
2876
- multiple: !1,
2877
- async: !1
2878
- });
2879
- }
2880
- //#endregion
2881
- //#region src/components/ui/select/id-async-select.tsx
2882
- var Pi = [
2883
- "name",
2884
- "title",
2885
- "label",
2886
- "display_name",
2887
- "username"
2888
- ];
2889
- function Fi(e) {
2890
- for (let t of Pi) if (Object.keys(e).includes(t)) return t;
2891
- for (let [t, n] of Object.entries(e)) if (t !== "id" && typeof n == "string") return t;
2892
- return "id";
2893
- }
2894
- function Ii({ config: e, subset: t, baseListParams: n, displayField: i, valueField: o = "id", placeholder: u, clearable: d, disabled: p, className: m, multiple: h = !1, preload: g = !1, searchable: _, value: v, onValueChange: y, onRowChange: b }) {
2895
- let { SD: x } = J(), S = ue(), C = typeof i == "function", w = r((e) => {
2896
- if (C) return i(e);
2897
- let t = typeof i == "string" ? i : Fi(e);
2898
- return String(e[t] ?? "");
2899
- }, [i, C]), [T, E] = l(void 0), D = r((e) => {
2900
- E(e || void 0);
2901
- }, []), O = (e) => e == null || e === "" ? !1 : typeof e == "number" ? e !== 0 && !Number.isNaN(e) : !0, k = new Set([
2902
- "search",
2903
- "orderBy",
2904
- "queryMode",
2905
- "num",
2906
- "page",
2907
- "keyword"
2908
- ]), A = n && Object.entries(n).some(([e, t]) => !k.has(e) && O(t)), j = g || A, M = {
2909
- ...n,
2910
- ...T ? { keyword: T } : {}
2911
- }, N = j || typeof T == "string" && T.length > 0 || h && Array.isArray(v) && v.length > 0, P = e.useListInfinite(t, M, { enabled: N }), F = P.data?.rows ?? [], ee = P.isLoading, te = P.error ?? void 0, I = !h && O(v) ? v : null, ne = s(() => F.find((e) => e[o] === I), [
2912
- F,
2913
- I,
2914
- o
2915
- ]), re = I !== null && !ne, ie = e.useList(t, {
2916
- id: I,
2917
- num: 1,
2918
- page: 1
2919
- }, { enabled: re }), ae = ie.data?.rows?.[0] || ne, oe = h && Array.isArray(v) ? v : [], L = s(() => oe.map((e) => F.find((t) => t[o] === e)).filter(Boolean), [
2920
- F,
2921
- oe,
2922
- o
2923
- ]), se = s(() => {
2924
- let e = new Set(L.map((e) => e?.[o]));
2925
- return oe.filter((t) => !e.has(t));
2926
- }, [
2927
- oe,
2928
- L,
2929
- o
2930
- ]), R = se.length > 0, ce = e.useList(t, {
2931
- id: se,
2932
- num: se.length,
2933
- page: 1
2934
- }, { enabled: R }), z = s(() => {
2935
- let e = ce.data?.rows ?? [];
2936
- return [...L, ...e];
2937
- }, [L, ce.data]), le = ee || re && ie.isLoading || R && ce.isLoading, B = r(() => {
2938
- S.resetQueries({ predicate: (e) => {
2939
- let n = e.queryKey;
2940
- return Array.isArray(n) && n[2] === "infinite" && n[3] === t;
2941
- } });
2942
- }, [S, t]), V = r((e) => {
2943
- S.removeQueries({ predicate: (n) => {
2944
- let r = n.queryKey;
2945
- return !Array.isArray(r) || r[2] !== "infinite" || r[3] !== t ? !1 : r[4]?.keyword === e;
2946
- } });
2947
- }, [S, t]), de = c(void 0);
2948
- a(() => {
2949
- let e = de.current;
2950
- e !== T && V(e), de.current = T;
2951
- }, [T, V]);
2952
- let fe = r((e) => {
2953
- e || B();
2954
- }, [B]), pe = r(() => {
2955
- P.hasNextPage && !P.isFetchingNextPage && P.fetchNextPage();
2956
- }, [P]), { items: me, rowMap: he } = s(() => {
2957
- let e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map();
2958
- if (!h && ae && I !== null && (e.set(I, ae), t.set(I, {
2959
- value: I,
2960
- label: w(ae)
2961
- })), h && z.length > 0) for (let n of z) {
2962
- let r = n[o];
2963
- e.set(r, n), t.set(r, {
2964
- value: r,
2965
- label: w(n)
2966
- });
2967
- }
2968
- for (let n of F) {
2969
- let r = n[o];
2970
- e.set(r, n), t.set(r, {
2971
- value: r,
2972
- label: w(n)
2973
- });
2974
- }
2975
- return {
2976
- items: Array.from(t.values()),
2977
- rowMap: e
2978
- };
2979
- }, [
2980
- F,
2981
- ae,
2982
- I,
2983
- z,
2984
- h,
2985
- w,
2986
- o
2987
- ]), ge = (e) => String(e), H = !!P.hasNextPage, _e = !!P.isFetchingNextPage, ve = _ ?? !j;
2988
- return h ? /* @__PURE__ */ f($, {
2989
- items: me,
2990
- valueKey: ge,
2991
- value: v ?? [],
2992
- onValueChange: (e) => {
2993
- y?.(e), b?.(e.map((e) => he.get(e)).filter(Boolean));
2994
- },
2995
- placeholder: u ?? x(e.placeholderKey),
2996
- clearable: d,
2997
- disabled: p,
2998
- className: m,
2999
- multiple: !0,
3000
- async: !0,
3001
- searchable: ve,
3002
- loading: le,
3003
- error: te,
3004
- onSearch: D,
3005
- onOpenChange: fe,
3006
- onLoadMore: pe,
3007
- hasMore: H,
3008
- isLoadingMore: _e
3009
- }) : /* @__PURE__ */ f($, {
3010
- items: me,
3011
- valueKey: ge,
3012
- value: I ?? void 0,
3013
- onValueChange: (e) => {
3014
- y?.(e), b?.(e ? he.get(e) : void 0);
3015
- },
3016
- placeholder: u ?? x(e.placeholderKey),
3017
- clearable: d,
3018
- disabled: p,
3019
- className: m,
3020
- multiple: !1,
3021
- async: !0,
3022
- searchable: ve,
3023
- loading: le,
3024
- error: te,
3025
- onSearch: D,
3026
- onOpenChange: fe,
3027
- onLoadMore: pe,
3028
- hasMore: H,
3029
- isLoadingMore: _e
3030
- });
3031
- }
3032
- //#endregion
3033
- //#region src/components/ui/sheet.tsx
3034
- var Li = D.Root, Ri = D.Trigger, zi = D.Close, Bi = D.Portal, Vi = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(D.Overlay, {
3035
- className: G("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", e),
3036
- ...t,
3037
- ref: n
3038
- }));
3039
- Vi.displayName = D.Overlay.displayName;
3040
- var Hi = g("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500", {
3041
- variants: { side: {
3042
- top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
3043
- bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
3044
- left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
3045
- right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
3046
- } },
3047
- defaultVariants: { side: "right" }
3048
- }), Ui = e.forwardRef(({ side: e = "right", className: t, children: n, ...r }, i) => /* @__PURE__ */ p(Bi, { children: [/* @__PURE__ */ f(Vi, {}), /* @__PURE__ */ p(D.Content, {
3049
- ref: i,
3050
- className: G(Hi({ side: e }), t),
3051
- ...r,
3052
- children: [n, /* @__PURE__ */ p(D.Close, {
3053
- className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",
3054
- children: [/* @__PURE__ */ f(Zt, { className: "h-4 w-4" }), /* @__PURE__ */ f("span", {
3055
- className: "sr-only",
3056
- children: "Close"
3057
- })]
3058
- })]
3059
- })] }));
3060
- Ui.displayName = D.Content.displayName;
3061
- var Wi = ({ className: e, ...t }) => /* @__PURE__ */ f("div", {
3062
- className: G("flex flex-col space-y-2 text-center sm:text-left", e),
3063
- ...t
3064
- });
3065
- Wi.displayName = "SheetHeader";
3066
- var Gi = ({ className: e, ...t }) => /* @__PURE__ */ f("div", {
3067
- className: G("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e),
3068
- ...t
3069
- });
3070
- Gi.displayName = "SheetFooter";
3071
- var Ki = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(D.Title, {
3072
- ref: n,
3073
- className: G("text-lg font-semibold text-foreground", e),
3074
- ...t
3075
- }));
3076
- Ki.displayName = D.Title.displayName;
3077
- var qi = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(D.Description, {
3078
- ref: n,
3079
- className: G("text-sm text-muted-foreground", e),
3080
- ...t
3081
- }));
3082
- qi.displayName = D.Description.displayName;
3083
- //#endregion
3084
- //#region ~icons/lucide/panel-left.jsx
3085
- var Ji = (e) => /* @__PURE__ */ f("svg", {
3086
- viewBox: "0 0 24 24",
3087
- width: "1.2em",
3088
- height: "1.2em",
3089
- ...e,
3090
- children: /* @__PURE__ */ p("g", {
3091
- fill: "none",
3092
- stroke: "currentColor",
3093
- strokeLinecap: "round",
3094
- strokeLinejoin: "round",
3095
- strokeWidth: 2,
3096
- children: [/* @__PURE__ */ f("rect", {
3097
- width: 18,
3098
- height: 18,
3099
- x: 3,
3100
- y: 3,
3101
- rx: 2
3102
- }), /* @__PURE__ */ f("path", { d: "M9 3v18" })]
3103
- })
3104
- }), Yi = 768;
3105
- function Xi() {
3106
- let [t, n] = e.useState(void 0);
3107
- return e.useEffect(() => {
3108
- let e = window.matchMedia(`(max-width: ${Yi - 1}px)`), t = () => {
3109
- n(window.innerWidth < Yi);
3110
- };
3111
- return e.addEventListener("change", t), n(window.innerWidth < Yi), () => e.removeEventListener("change", t);
3112
- }, []), !!t;
3113
- }
3114
- //#endregion
3115
- //#region src/components/ui/skeleton.tsx
3116
- function Zi({ className: e, ...t }) {
3117
- return /* @__PURE__ */ f("div", {
3118
- className: G("animate-pulse rounded-md bg-muted", e),
3119
- ...t
3120
- });
3121
- }
3122
- //#endregion
3123
- //#region src/components/ui/tooltip.tsx
3124
- var Qi = V.Provider, $i = V.Root, ea = V.Trigger, ta = e.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ f(V.Content, {
3125
- ref: r,
3126
- sideOffset: t,
3127
- className: G("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 origin-[--radix-tooltip-content-transform-origin]", e),
3128
- ...n
3129
- }));
3130
- ta.displayName = V.Content.displayName;
3131
- //#endregion
3132
- //#region src/components/ui/sidebar.tsx
3133
- var na = "16rem", ra = "18rem", ia = "3rem", aa = "b", oa = e.createContext(null);
3134
- function sa() {
3135
- let t = e.useContext(oa);
3136
- if (!t) throw Error("useSidebar must be used within a SidebarProvider.");
3137
- return t;
3138
- }
3139
- function ca({ defaultOpen: t = !0, open: n, onOpenChange: r, className: i, style: a, children: o, ...s }) {
3140
- let c = Xi(), [l, u] = e.useState(!1), [d, p] = e.useState(t), m = n ?? d, h = e.useCallback((e) => {
3141
- let t = typeof e == "function" ? e(m) : e;
3142
- r ? r(t) : p(t);
3143
- }, [r, m]), g = e.useCallback(() => c ? u((e) => !e) : h((e) => !e), [
3144
- c,
3145
- h,
3146
- u
3147
- ]);
3148
- e.useEffect(() => {
3149
- let e = (e) => {
3150
- e.key === aa && (e.metaKey || e.ctrlKey) && (e.preventDefault(), g());
3151
- };
3152
- return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
3153
- }, [g]);
3154
- let _ = m ? "expanded" : "collapsed", v = e.useMemo(() => ({
3155
- state: _,
3156
- open: m,
3157
- setOpen: h,
3158
- isMobile: c,
3159
- openMobile: l,
3160
- setOpenMobile: u,
3161
- toggleSidebar: g
3162
- }), [
3163
- _,
3164
- m,
3165
- h,
3166
- c,
3167
- l,
3168
- u,
3169
- g
3170
- ]);
3171
- return /* @__PURE__ */ f(oa.Provider, {
3172
- value: v,
3173
- children: /* @__PURE__ */ f(Qi, {
3174
- delayDuration: 0,
3175
- children: /* @__PURE__ */ f("div", {
3176
- "data-slot": "sidebar-wrapper",
3177
- style: {
3178
- "--sidebar-width": na,
3179
- "--sidebar-width-icon": ia,
3180
- ...a
3181
- },
3182
- className: G("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full", i),
3183
- ...s,
3184
- children: o
3185
- })
3186
- })
3187
- });
3188
- }
3189
- function la({ side: e = "left", variant: t = "sidebar", collapsible: n = "offcanvas", className: r, children: i, ...a }) {
3190
- let { isMobile: o, state: s, openMobile: c, setOpenMobile: l } = sa();
3191
- return n === "none" ? /* @__PURE__ */ f("div", {
3192
- "data-slot": "sidebar",
3193
- className: G("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col", r),
3194
- ...a,
3195
- children: i
3196
- }) : o ? /* @__PURE__ */ f(Li, {
3197
- open: c,
3198
- onOpenChange: l,
3199
- ...a,
3200
- children: /* @__PURE__ */ p(Ui, {
3201
- "data-sidebar": "sidebar",
3202
- "data-slot": "sidebar",
3203
- "data-mobile": "true",
3204
- className: "bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",
3205
- style: { "--sidebar-width": ra },
3206
- side: e,
3207
- children: [/* @__PURE__ */ p(Wi, {
3208
- className: "sr-only",
3209
- children: [/* @__PURE__ */ f(Ki, { children: "Sidebar" }), /* @__PURE__ */ f(qi, { children: "Displays the mobile sidebar." })]
3210
- }), /* @__PURE__ */ f("div", {
3211
- className: "flex h-full w-full flex-col",
3212
- children: i
3213
- })]
3214
- })
3215
- }) : /* @__PURE__ */ p("div", {
3216
- className: "group peer text-sidebar-foreground hidden md:block",
3217
- "data-state": s,
3218
- "data-collapsible": s === "collapsed" ? n : "",
3219
- "data-variant": t,
3220
- "data-side": e,
3221
- "data-slot": "sidebar",
3222
- children: [/* @__PURE__ */ f("div", {
3223
- "data-slot": "sidebar-gap",
3224
- className: G("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear", "group-data-[collapsible=offcanvas]:w-0", "group-data-[side=right]:rotate-180", t === "floating" || t === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+1rem)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)")
3225
- }), /* @__PURE__ */ f("div", {
3226
- "data-slot": "sidebar-container",
3227
- className: G("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex", e === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]", t === "floating" || t === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+1rem+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l", r),
3228
- ...a,
3229
- children: /* @__PURE__ */ f("div", {
3230
- "data-sidebar": "sidebar",
3231
- "data-slot": "sidebar-inner",
3232
- className: "bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",
3233
- children: i
3234
- })
3235
- })]
3236
- });
3237
- }
3238
- function ua({ className: e, onClick: t, ...n }) {
3239
- let { toggleSidebar: r } = sa();
3240
- return /* @__PURE__ */ p(K, {
3241
- "data-sidebar": "trigger",
3242
- "data-slot": "sidebar-trigger",
3243
- variant: "ghost",
3244
- className: G("size-7", e),
3245
- onClick: (e) => {
3246
- t?.(e), r();
3247
- },
3248
- ...n,
3249
- children: [/* @__PURE__ */ f(Ji, {}), /* @__PURE__ */ f("span", {
3250
- className: "sr-only",
3251
- children: "Toggle Sidebar"
3252
- })]
3253
- });
3254
- }
3255
- function da({ className: e, ...t }) {
3256
- let { toggleSidebar: n } = sa();
3257
- return /* @__PURE__ */ f("button", {
3258
- "data-sidebar": "rail",
3259
- "data-slot": "sidebar-rail",
3260
- "aria-label": "Toggle Sidebar",
3261
- tabIndex: -1,
3262
- onClick: n,
3263
- title: "Toggle Sidebar",
3264
- className: G("hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex", "in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize", "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize", "hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full", "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2", "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2", e),
3265
- ...t
3266
- });
3267
- }
3268
- function fa({ className: e, ...t }) {
3269
- return /* @__PURE__ */ f("main", {
3270
- "data-slot": "sidebar-inset",
3271
- className: G("bg-background relative flex w-full flex-1 flex-col", "md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2", e),
3272
- ...t
3273
- });
3274
- }
3275
- function pa({ className: e, ...t }) {
3276
- return /* @__PURE__ */ f(Q, {
3277
- "data-slot": "sidebar-input",
3278
- "data-sidebar": "input",
3279
- className: G("bg-background h-8 w-full shadow-none", e),
3280
- ...t
3281
- });
3282
- }
3283
- function ma({ className: e, ...t }) {
3284
- return /* @__PURE__ */ f("div", {
3285
- "data-slot": "sidebar-header",
3286
- "data-sidebar": "header",
3287
- className: G("flex shrink-0 flex-col gap-2 p-2", e),
3288
- ...t
3289
- });
3290
- }
3291
- function ha({ className: e, ...t }) {
3292
- return /* @__PURE__ */ f("div", {
3293
- "data-slot": "sidebar-footer",
3294
- "data-sidebar": "footer",
3295
- className: G("flex shrink-0 flex-col gap-2 p-2", e),
3296
- ...t
3297
- });
3298
- }
3299
- function ga({ className: e, ...t }) {
3300
- return /* @__PURE__ */ f(oi, {
3301
- "data-slot": "sidebar-separator",
3302
- "data-sidebar": "separator",
3303
- className: G("bg-sidebar-border mx-2 w-auto", e),
3304
- ...t
3305
- });
3306
- }
3307
- function _a({ className: e, ...t }) {
3308
- return /* @__PURE__ */ f("div", {
3309
- "data-slot": "sidebar-content",
3310
- "data-sidebar": "content",
3311
- className: G("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden", e),
3312
- ...t
3313
- });
3314
- }
3315
- function va({ className: e, ...t }) {
3316
- return /* @__PURE__ */ f("div", {
3317
- "data-slot": "sidebar-group",
3318
- "data-sidebar": "group",
3319
- className: G("relative flex w-full min-w-0 flex-col p-2", e),
3320
- ...t
3321
- });
3322
- }
3323
- function ya({ className: e, asChild: t = !1, ...n }) {
3324
- return /* @__PURE__ */ f(t ? v : "div", {
3325
- "data-slot": "sidebar-group-label",
3326
- "data-sidebar": "group-label",
3327
- className: G("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-none transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0", e),
3328
- ...n
3329
- });
3330
- }
3331
- function ba({ className: e, asChild: t = !1, ...n }) {
3332
- return /* @__PURE__ */ f(t ? v : "button", {
3333
- "data-slot": "sidebar-group-action",
3334
- "data-sidebar": "group-action",
3335
- className: G("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-none transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "after:absolute after:-inset-2 md:after:hidden", "group-data-[collapsible=icon]:hidden", e),
3336
- ...n
3337
- });
3338
- }
3339
- function xa({ className: e, ...t }) {
3340
- return /* @__PURE__ */ f("div", {
3341
- "data-slot": "sidebar-group-content",
3342
- "data-sidebar": "group-content",
3343
- className: G("w-full text-sm", e),
3344
- ...t
3345
- });
3346
- }
3347
- function Sa({ className: e, ...t }) {
3348
- return /* @__PURE__ */ f("ul", {
3349
- "data-slot": "sidebar-menu",
3350
- "data-sidebar": "menu",
3351
- className: G("flex w-full min-w-0 flex-col gap-1", e),
3352
- ...t
3353
- });
3354
- }
3355
- function Ca({ className: e, ...t }) {
3356
- return /* @__PURE__ */ f("li", {
3357
- "data-slot": "sidebar-menu-item",
3358
- "data-sidebar": "menu-item",
3359
- className: G("group/menu-item relative", e),
3360
- ...t
3361
- });
3362
- }
3363
- var wa = g("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0", {
3364
- variants: {
3365
- variant: {
3366
- default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
3367
- outline: "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
3368
- },
3369
- size: {
3370
- default: "h-8 text-sm",
3371
- sm: "h-7 text-xs",
3372
- lg: "h-12 text-sm group-data-[collapsible=icon]:!p-0"
3373
- }
3374
- },
3375
- defaultVariants: {
3376
- variant: "default",
3377
- size: "default"
3378
- }
3379
- });
3380
- function Ta({ asChild: e = !1, isActive: t = !1, variant: n = "default", size: r = "default", tooltip: i, className: a, ...o }) {
3381
- let s = e ? v : "button", { isMobile: c, state: l } = sa(), u = /* @__PURE__ */ f(s, {
3382
- "data-slot": "sidebar-menu-button",
3383
- "data-sidebar": "menu-button",
3384
- "data-size": r,
3385
- "data-active": t,
3386
- className: G(wa({
3387
- variant: n,
3388
- size: r
3389
- }), a),
3390
- ...o
3391
- });
3392
- return i ? (typeof i == "string" && (i = { children: i }), /* @__PURE__ */ p($i, { children: [/* @__PURE__ */ f(ea, {
3393
- asChild: !0,
3394
- children: u
3395
- }), /* @__PURE__ */ f(ta, {
3396
- side: "right",
3397
- align: "center",
3398
- hidden: l !== "collapsed" || c,
3399
- ...i
3400
- })] })) : u;
3401
- }
3402
- function Ea({ className: e, asChild: t = !1, showOnHover: n = !1, ...r }) {
3403
- return /* @__PURE__ */ f(t ? v : "button", {
3404
- "data-slot": "sidebar-menu-action",
3405
- "data-sidebar": "menu-action",
3406
- className: G("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-none transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "after:absolute after:-inset-2 md:after:hidden", "peer-data-[size=sm]/menu-button:top-1", "peer-data-[size=default]/menu-button:top-1.5", "peer-data-[size=lg]/menu-button:top-2.5", "group-data-[collapsible=icon]:hidden", n && "peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0", e),
3407
- ...r
3408
- });
3409
- }
3410
- function Da({ className: e, ...t }) {
3411
- return /* @__PURE__ */ f("div", {
3412
- "data-slot": "sidebar-menu-badge",
3413
- "data-sidebar": "menu-badge",
3414
- className: G("text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none", "peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground", "peer-data-[size=sm]/menu-button:top-1", "peer-data-[size=default]/menu-button:top-1.5", "peer-data-[size=lg]/menu-button:top-2.5", "group-data-[collapsible=icon]:hidden", e),
3415
- ...t
3416
- });
3417
- }
3418
- function Oa({ className: t, showIcon: n = !1, ...r }) {
3419
- let i = e.useMemo(() => `${Math.floor(Math.random() * 40) + 50}%`, []);
3420
- return /* @__PURE__ */ p("div", {
3421
- "data-slot": "sidebar-menu-skeleton",
3422
- "data-sidebar": "menu-skeleton",
3423
- className: G("flex h-8 items-center gap-2 rounded-md px-2", t),
3424
- ...r,
3425
- children: [n && /* @__PURE__ */ f(Zi, {
3426
- className: "size-4 rounded-md",
3427
- "data-sidebar": "menu-skeleton-icon"
3428
- }), /* @__PURE__ */ f(Zi, {
3429
- className: "h-4 max-w-(--skeleton-width) flex-1",
3430
- "data-sidebar": "menu-skeleton-text",
3431
- style: { "--skeleton-width": i }
3432
- })]
3433
- });
3434
- }
3435
- function ka({ className: e, ...t }) {
3436
- return /* @__PURE__ */ f("ul", {
3437
- "data-slot": "sidebar-menu-sub",
3438
- "data-sidebar": "menu-sub",
3439
- className: G("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5", "group-data-[collapsible=icon]:hidden", e),
3440
- ...t
3441
- });
3442
- }
3443
- function Aa({ className: e, ...t }) {
3444
- return /* @__PURE__ */ f("li", {
3445
- "data-slot": "sidebar-menu-sub-item",
3446
- "data-sidebar": "menu-sub-item",
3447
- className: G("group/menu-sub-item relative", e),
3448
- ...t
3449
- });
3450
- }
3451
- function ja({ asChild: e = !1, size: t = "md", isActive: n = !1, className: r, ...i }) {
3452
- return /* @__PURE__ */ f(e ? v : "a", {
3453
- "data-slot": "sidebar-menu-sub-button",
3454
- "data-sidebar": "menu-sub-button",
3455
- "data-size": t,
3456
- "data-active": n,
3457
- className: G("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0", "data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground", t === "sm" && "text-xs", t === "md" && "text-sm", "group-data-[collapsible=icon]:hidden", r),
3458
- ...i
3459
- });
3460
- }
3461
- //#endregion
3462
- //#region src/components/ui/slider.tsx
3463
- var Ma = e.forwardRef(({ className: t, name: n, value: r, defaultValue: i, onValueChange: a, onBlur: o, ...s }, c) => {
3464
- let l = e.useRef(null);
3465
- e.useImperativeHandle(c, () => l.current);
3466
- let u = (e) => {
3467
- a?.(e[0]);
3468
- }, m = Ie(r), h = Ie(i);
3469
- return /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("input", {
3470
- type: "range",
3471
- ref: l,
3472
- name: n,
3473
- defaultValue: h?.[0],
3474
- onBlur: o,
3475
- className: "sr-only",
3476
- tabIndex: -1,
3477
- "aria-hidden": "true"
3478
- }), /* @__PURE__ */ p(de.Root, {
3479
- value: m,
3480
- defaultValue: h,
3481
- onValueChange: u,
3482
- className: G("relative flex w-full touch-none select-none items-center", t),
3483
- ...s,
3484
- children: [/* @__PURE__ */ f(de.Track, {
3485
- className: "relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",
3486
- children: /* @__PURE__ */ f(de.Range, { className: "absolute h-full bg-primary" })
3487
- }), /* @__PURE__ */ f(de.Thumb, { className: "block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" })]
3488
- })] });
3489
- });
3490
- Ma.displayName = "Slider";
3491
- //#endregion
3492
- //#region ~icons/lucide/plus.jsx
3493
- var Na = (e) => /* @__PURE__ */ f("svg", {
3494
- viewBox: "0 0 24 24",
3495
- width: "1.2em",
3496
- height: "1.2em",
3497
- ...e,
3498
- children: /* @__PURE__ */ f("path", {
3499
- fill: "none",
3500
- stroke: "currentColor",
3501
- strokeLinecap: "round",
3502
- strokeLinejoin: "round",
3503
- strokeWidth: 2,
3504
- d: "M5 12h14m-7-7v14"
3505
- })
3506
- }), Pa = (e) => /* @__PURE__ */ f("svg", {
3507
- viewBox: "0 0 24 24",
3508
- width: "1.2em",
3509
- height: "1.2em",
3510
- ...e,
3511
- children: /* @__PURE__ */ f("path", {
3512
- fill: "none",
3513
- stroke: "currentColor",
3514
- strokeLinecap: "round",
3515
- strokeLinejoin: "round",
3516
- strokeWidth: 2,
3517
- d: "M10 11v6m4-6v6m5-11v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"
3518
- })
3519
- }), Fa = {
3520
- string: [
3521
- "eq",
3522
- "ne",
3523
- "contains",
3524
- "startsWith",
3525
- "endsWith",
3526
- "in",
3527
- "notIn",
3528
- "isNull",
3529
- "isNotNull"
3530
- ],
3531
- integer: [
3532
- "eq",
3533
- "ne",
3534
- "gt",
3535
- "gte",
3536
- "lt",
3537
- "lte",
3538
- "in",
3539
- "notIn",
3540
- "between",
3541
- "isNull",
3542
- "isNotNull"
3543
- ],
3544
- numeric: [
3545
- "eq",
3546
- "ne",
3547
- "gt",
3548
- "gte",
3549
- "lt",
3550
- "lte",
3551
- "in",
3552
- "notIn",
3553
- "between",
3554
- "isNull",
3555
- "isNotNull"
3556
- ],
3557
- boolean: [
3558
- "eq",
3559
- "ne",
3560
- "isNull",
3561
- "isNotNull"
3562
- ],
3563
- date: [
3564
- "eq",
3565
- "ne",
3566
- "before",
3567
- "after",
3568
- "between",
3569
- "isNull",
3570
- "isNotNull"
3571
- ],
3572
- datetime: [
3573
- "eq",
3574
- "ne",
3575
- "before",
3576
- "after",
3577
- "between",
3578
- "isNull",
3579
- "isNotNull"
3580
- ],
3581
- enum: [
3582
- "eq",
3583
- "ne",
3584
- "in",
3585
- "notIn",
3586
- "isNull",
3587
- "isNotNull"
3588
- ],
3589
- json: ["isNull", "isNotNull"]
3590
- }, Ia = {
3591
- string: "contains",
3592
- integer: "eq",
3593
- numeric: "eq",
3594
- boolean: "eq",
3595
- date: "eq",
3596
- datetime: "eq",
3597
- enum: "eq",
3598
- json: "isNull"
3599
- }, La = {
3600
- eq: "=",
3601
- ne: "≠",
3602
- gt: ">",
3603
- gte: "≥",
3604
- lt: "<",
3605
- lte: "≤",
3606
- contains: "contains",
3607
- startsWith: "starts with",
3608
- endsWith: "ends with",
3609
- in: "in",
3610
- notIn: "not in",
3611
- between: "between",
3612
- before: "before",
3613
- after: "after",
3614
- isNull: "null",
3615
- isNotNull: "not null"
3616
- }, Ra = {
3617
- string: "string",
3618
- number: "integer",
3619
- boolean: "boolean",
3620
- date: "datetime",
3621
- enum: "enum",
3622
- array: "json",
3623
- object: "json"
3624
- };
3625
- //#endregion
3626
- //#region src/components/ui/tag-input.tsx
3627
- function za({ value: e = [], onChange: t, type: n = "text", placeholder: r, disabled: i, className: a }) {
3628
- let [o, s] = l(""), c = (r) => {
3629
- let i = r.trim();
3630
- if (i && !(n === "number" && !/^-?\d+(\.\d+)?$/.test(i))) {
3631
- if (e.includes(i)) {
3632
- s("");
3633
- return;
3634
- }
3635
- t?.([...e, i]), s("");
3636
- }
3637
- }, u = (n) => {
3638
- t?.(e.filter((e, t) => t !== n));
3639
- };
3640
- return /* @__PURE__ */ p("div", {
3641
- className: `flex flex-wrap gap-1 items-center border rounded-md p-2 min-h-[40px] ${i ? "bg-gray-100 cursor-not-allowed" : "bg-white"} ${a}`,
3642
- children: [e.map((e, t) => /* @__PURE__ */ p(ut, {
3643
- variant: "secondary",
3644
- className: "flex items-center gap-1 px-2 py-1",
3645
- children: [/* @__PURE__ */ f("span", { children: e }), !i && /* @__PURE__ */ f("button", {
3646
- type: "button",
3647
- onClick: () => u(t),
3648
- className: "hover:bg-gray-300 rounded-full p-0.5",
3649
- children: /* @__PURE__ */ f(Zt, {})
3650
- })]
3651
- }, t)), !i && /* @__PURE__ */ f("input", {
3652
- type: "text",
3653
- value: o,
3654
- onChange: (e) => {
3655
- let t = e.target.value;
3656
- if (t.includes(",")) {
3657
- let e = t.split(",");
3658
- e.slice(0, -1).map((e) => c(e)), s(e[e.length - 1]);
3659
- return;
3660
- }
3661
- s(t);
3662
- },
3663
- onKeyDown: (t) => {
3664
- t.key === "Enter" ? (t.preventDefault(), c(o)) : t.key === "Backspace" && !o && e.length > 0 && u(e.length - 1);
3665
- },
3666
- onBlur: () => {
3667
- o.trim() && c(o);
3668
- },
3669
- placeholder: e.length === 0 ? r ?? "Enter 또는 콤마로 구분..." : "",
3670
- className: "flex-1 min-w-[120px] outline-none bg-transparent text-sm",
3671
- disabled: i
3672
- })]
3673
- });
3674
- }
3675
- //#endregion
3676
- //#region src/components/ui/sonamu-filter/value-input.tsx
3677
- var Ba = {
3678
- options: ["true", "false"],
3679
- labels: {
3680
- true: "True",
3681
- false: "False"
3682
- }
3683
- };
3684
- function Va({ propType: e, operator: t, value: n, onChange: r, fieldMeta: i }) {
3685
- let { SD: a } = J();
3686
- if (t === "isNull" || t === "isNotNull") return /* @__PURE__ */ f(Ni, {
3687
- enum: { options: Ba.options },
3688
- labels: Ba.labels,
3689
- value: n === void 0 ? "" : String(n),
3690
- onValueChange: (e) => e && r(e === "true"),
3691
- className: "w-full"
3692
- });
3693
- if (t === "in" || t === "notIn") return e === "enum" && i?.enumData ? /* @__PURE__ */ f(Ni, {
3694
- enum: { options: i.enumData.options },
3695
- labels: i.enumData.labels,
3696
- value: n ?? [],
3697
- onValueChange: r,
3698
- multiple: !0
3699
- }) : /* @__PURE__ */ f(za, {
3700
- value: n ?? [],
3701
- onChange: r,
3702
- type: e === "integer" || e === "numeric" ? "number" : "text"
3703
- });
3704
- if (t === "between") {
3705
- if (e === "integer" || e === "numeric") return /* @__PURE__ */ f(Ei, {
3706
- value: n ?? [void 0, void 0],
3707
- onChange: r
3708
- });
3709
- if (e === "date" || e === "datetime") {
3710
- let [e, t] = n ?? [void 0, void 0];
3711
- return /* @__PURE__ */ p("div", {
3712
- className: "flex items-center gap-2",
3713
- children: [
3714
- /* @__PURE__ */ f(zn, {
3715
- value: e ?? null,
3716
- onValueChange: (e) => r([e ?? void 0, t]),
3717
- placeholder: a("rc.sonamuFilter.startDate"),
3718
- className: "flex-1"
3719
- }),
3720
- /* @__PURE__ */ f("span", {
3721
- className: "text-muted-foreground",
3722
- children: "~"
3723
- }),
3724
- /* @__PURE__ */ f(zn, {
3725
- value: t ?? null,
3726
- onValueChange: (t) => r([e, t ?? void 0]),
3727
- placeholder: a("rc.sonamuFilter.endDate"),
3728
- className: "flex-1"
3729
- })
3730
- ]
3731
- });
3732
- }
3733
- }
3734
- return e === "enum" && i?.enumData ? /* @__PURE__ */ f(Ni, {
3735
- enum: { options: i.enumData.options },
3736
- labels: i.enumData.labels,
3737
- value: n ?? "",
3738
- onValueChange: r
3739
- }) : e === "date" || e === "datetime" ? /* @__PURE__ */ f(Vn, {
3740
- value: n ?? void 0,
3741
- onValueChange: r
3742
- }) : e === "string" ? /* @__PURE__ */ f(Q, {
3743
- type: "text",
3744
- value: n ?? "",
3745
- onValueChange: r,
3746
- placeholder: a("rc.sonamuFilter.enterValue")
3747
- }) : e === "integer" || e === "numeric" ? /* @__PURE__ */ f(Q, {
3748
- type: "number",
3749
- value: n === void 0 ? "" : String(n),
3750
- onValueChange: (e) => r(e === "" ? void 0 : Number(e)),
3751
- placeholder: a("rc.sonamuFilter.enterNumber")
3752
- }) : e === "boolean" ? /* @__PURE__ */ f(Ni, {
3753
- enum: { options: Ba.options },
3754
- labels: Ba.labels,
3755
- value: n === void 0 ? "" : String(n),
3756
- onValueChange: (e) => e && r(e === "true"),
3757
- className: "w-full"
3758
- }) : /* @__PURE__ */ f(Q, {
3759
- type: "text",
3760
- value: "",
3761
- placeholder: a("rc.sonamuFilter.notSupported"),
3762
- disabled: !0
3763
- });
3764
- }
3765
- //#endregion
3766
- //#region src/components/ui/sonamu-filter/rule-row-input.tsx
3767
- function Ha({ rule: e, fieldMeta: t, onUpdate: n, onRemove: r }) {
3768
- let { SD: i } = J(), a = Object.keys(t), o = e.field ? t[e.field] : null, s = o ? Fa[o.propType] : [];
3769
- return /* @__PURE__ */ p("div", {
3770
- className: "flex items-start gap-2 p-3 border rounded-lg bg-gray-50",
3771
- children: [
3772
- /* @__PURE__ */ f("div", {
3773
- className: "flex-1 min-w-[150px]",
3774
- children: /* @__PURE__ */ f($, {
3775
- items: a,
3776
- value: e.field ?? "",
3777
- onValueChange: (e) => {
3778
- n({
3779
- field: e ?? null,
3780
- operator: null,
3781
- value: void 0
3782
- });
3783
- },
3784
- placeholder: i("rc.sonamuFilter.selectField")
3785
- })
3786
- }),
3787
- /* @__PURE__ */ f("div", {
3788
- className: "flex-1 min-w-[120px]",
3789
- children: /* @__PURE__ */ f($, {
3790
- items: s.map((e) => ({
3791
- value: e,
3792
- label: La[e]
3793
- })),
3794
- value: e.operator ?? void 0,
3795
- onValueChange: (e) => {
3796
- n({
3797
- operator: e ?? null,
3798
- value: void 0
3799
- });
3800
- },
3801
- disabled: !e.field,
3802
- placeholder: i("rc.sonamuFilter.selectOperator")
3803
- })
3804
- }),
3805
- /* @__PURE__ */ f("div", {
3806
- className: "flex-1 min-w-[150px]",
3807
- children: e.operator && o ? /* @__PURE__ */ f(Va, {
3808
- propType: o.propType,
3809
- operator: e.operator,
3810
- value: e.value,
3811
- onChange: (e) => n({ value: e }),
3812
- fieldMeta: o
3813
- }) : /* @__PURE__ */ f(Q, {
3814
- type: "text",
3815
- disabled: !0,
3816
- placeholder: i("rc.sonamuFilter.selectOperatorFirst")
3817
- })
3818
- }),
3819
- /* @__PURE__ */ f(K, {
3820
- variant: "ghost",
3821
- size: "sm",
3822
- onClick: r,
3823
- className: "shrink-0 h-10 px-3",
3824
- children: /* @__PURE__ */ f(Pa, {})
3825
- })
3826
- ]
3827
- });
3828
- }
3829
- //#endregion
3830
- //#region src/components/ui/sonamu-filter/utils.ts
3831
- function Ua(e) {
3832
- let t = e, n = !1;
3833
- for (; t._def.type === "nullable" || t._def.type === "optional";) t._def.type === "nullable" && (n = !0), t = t._def.innerType;
3834
- return {
3835
- innerType: t,
3836
- nullable: n
3837
- };
3838
- }
3839
- function Wa(e) {
3840
- return Ra[e] ?? "string";
3841
- }
3842
- function Ga(e, t) {
3843
- let n = e.options ? Array.from(e.options) : void 0;
3844
- if (!n) return;
3845
- let r = e._def?.description || e.description, i = {};
3846
- if (r) for (let e of n) i[e] = t(`enum.${r}.${e}`);
3847
- return {
3848
- options: n,
3849
- labels: i
3850
- };
3851
- }
3852
- function Ka(e, t) {
3853
- let n = e.shape, r = {};
3854
- for (let [e, i] of Object.entries(n)) {
3855
- if (e.startsWith("virtual") || e.startsWith("textsearchable")) continue;
3856
- let { innerType: n, nullable: a } = Ua(i), o = i.meta?.()?.SonamuPropType === "numeric" ? "numeric" : Wa(n._def.type);
3857
- r[e] = {
3858
- propType: o,
3859
- nullable: a,
3860
- enumData: o === "enum" ? Ga(n, t) : void 0
3861
- };
3862
- }
3863
- return r;
3864
- }
3865
- //#endregion
3866
- //#region src/components/ui/sonamu-filter/sonamu-filter-modal.tsx
3867
- function qa({ baseSchema: e, open: t, onOpenChange: n, initialRules: r = [], onApply: i }) {
3868
- let { SD: o } = J(), [s, c] = l(r), [u, d] = l([]);
3869
- a(() => {
3870
- c(r);
3871
- }, [r]), a(() => {
3872
- t && d(s.map((e) => ({ ...e })));
3873
- }, [t, s]);
3874
- let m = Ka(e, o), h = () => {
3875
- d([...u, {
3876
- id: crypto.randomUUID(),
3877
- field: null,
3878
- operator: null,
3879
- value: void 0
3880
- }]);
3881
- }, g = (e) => {
3882
- d(u.filter((t) => t.id !== e));
3883
- }, _ = (e, t) => {
3884
- d(u.map((n) => n.id === e ? {
3885
- ...n,
3886
- ...t
3887
- } : n));
3888
- }, v = () => {
3889
- let e = {};
3890
- for (let t of u) !t.field || !t.operator || (t.operator === "isNull" || t.operator, e[t.field] = { [t.operator]: t.value });
3891
- return e;
3892
- };
3893
- return /* @__PURE__ */ f(Qt, {
3894
- open: t,
3895
- onOpenChange: n,
3896
- children: /* @__PURE__ */ p(rn, {
3897
- className: "max-w-4xl max-h-[90vh] overflow-hidden flex flex-col",
3898
- children: [
3899
- /* @__PURE__ */ f(an, { children: /* @__PURE__ */ f(sn, { children: o("rc.sonamuFilter.title") }) }),
3900
- /* @__PURE__ */ p("div", {
3901
- className: "flex-1 overflow-auto space-y-4 py-4",
3902
- children: [
3903
- u.length === 0 ? /* @__PURE__ */ f("div", {
3904
- className: "text-center py-8 text-muted-foreground",
3905
- children: /* @__PURE__ */ f("p", {
3906
- className: "text-sm",
3907
- children: o("rc.sonamuFilter.noRulesYet")
3908
- })
3909
- }) : /* @__PURE__ */ f("div", {
3910
- className: "space-y-2",
3911
- children: u.map((e) => /* @__PURE__ */ f(Ha, {
3912
- rule: e,
3913
- fieldMeta: m,
3914
- onUpdate: (t) => _(e.id, t),
3915
- onRemove: () => g(e.id)
3916
- }, e.id))
3917
- }),
3918
- /* @__PURE__ */ p("div", {
3919
- className: "flex gap-2",
3920
- children: [/* @__PURE__ */ p(K, {
3921
- variant: "outline",
3922
- onClick: h,
3923
- className: "flex-1",
3924
- children: [/* @__PURE__ */ f(Na, {}), o("rc.sonamuFilter.addRule")]
3925
- }), u.length > 0 && /* @__PURE__ */ f(K, {
3926
- variant: "outline",
3927
- onClick: () => {
3928
- d([]);
3929
- },
3930
- className: "flex-1",
3931
- children: o("rc.sonamuFilter.reset")
3932
- })]
3933
- }),
3934
- u.length > 0 && /* @__PURE__ */ p("div", {
3935
- className: "border rounded-lg p-4 bg-muted/50",
3936
- children: [/* @__PURE__ */ f("h4", {
3937
- className: "text-sm font-semibold mb-2",
3938
- children: "Preview (JSON)"
3939
- }), /* @__PURE__ */ f("pre", {
3940
- className: "text-xs overflow-auto max-h-[200px] bg-background p-3 rounded border",
3941
- children: JSON.stringify(v(), null, 2)
3942
- })]
3943
- })
3944
- ]
3945
- }),
3946
- /* @__PURE__ */ p("div", {
3947
- className: "flex justify-end gap-2 pt-4 border-t",
3948
- children: [/* @__PURE__ */ f(K, {
3949
- variant: "outline",
3950
- onClick: () => {
3951
- d(s.map((e) => ({ ...e }))), n(!1);
3952
- },
3953
- children: o("rc.common.cancel")
3954
- }), /* @__PURE__ */ f(K, {
3955
- onClick: () => {
3956
- let e = v(), t = u.map((e) => ({ ...e }));
3957
- c(t), i?.(e, t), n(!1);
3958
- },
3959
- children: o("rc.sonamuFilter.apply")
3960
- })]
3961
- })
3962
- ]
3963
- })
3964
- });
3965
- }
3966
- //#endregion
3967
- //#region src/lib/caster.ts
3968
- function Ja(e) {
3969
- return e instanceof H.ZodNumber || e instanceof H.ZodNullable && e._def.innerType instanceof H.ZodNumber || e instanceof H.ZodOptional && e._def.innerType instanceof H.ZodNumber ? !0 : e instanceof H.ZodOptional && e._def.innerType instanceof H.ZodOptional && e._def.innerType._def.innerType instanceof H.ZodNumber;
3970
- }
3971
- function Ya(e, t) {
3972
- if (Ja(e) && typeof t == "string") return Number(t);
3973
- if (e instanceof H.ZodUnion) {
3974
- let n = e.options;
3975
- if (n.some((e) => Ja(e))) if (Array.isArray(t)) {
3976
- let e = n.find((e) => e instanceof H.ZodNumber);
3977
- if (!e) throw Error("Expected to find a number type in union");
3978
- return t.map((t) => Ya(e, t));
3979
- } else return Number(t);
3980
- } else if (e instanceof H.ZodBoolean && (t === "true" || t === "false")) return t === "true";
3981
- else if (e instanceof H.ZodArray) return t.map((t) => Ya(e.element, t));
3982
- else if (e instanceof H.ZodObject && typeof t == "object") return Object.keys(t).reduce((n, r) => (n[r] = Ya(e.shape[r], t[r]), n), {});
3983
- else if (e instanceof H.ZodOptional) return Ya(e._def.innerType, t);
3984
- return t;
3985
- }
3986
- function Xa(e) {
3987
- return H.preprocess((t) => Ya(e, t), e);
3988
- }
3989
- //#endregion
3990
- //#region src/lib/base-helpers.ts
3991
- function Za(e) {
3992
- return e === !0 ? "hidden" : "";
3993
- }
3994
- function Qa(e, t) {
3995
- return Ya(t, fe.parse(e.toString()));
3996
- }
3997
- function $a(e) {
3998
- return Object.fromEntries(Object.entries(e).filter(([, e]) => e !== void 0).map(([e, t]) => Array.isArray(t) ? [[`${e}[]`, t]] : me(t) ? Object.keys(t).map((n) => [`${e}[${n}]`, String(t[n])]) : [[e, String(t)]]).flat());
3999
- }
4000
- function eo(e) {
4001
- return e === null ? null : e.slice(0, 10);
4002
- }
4003
- function to(e) {
4004
- return e && new Intl.NumberFormat().format(e);
4005
- }
4006
- function no(e) {
4007
- return e == null ? null : e instanceof Date ? e.toISOString().slice(0, 10) : e.slice(0, 10);
4008
- }
4009
- function ro(e) {
4010
- return e == null ? null : e instanceof Date ? e.toISOString().slice(0, 19).replace("T", " ") : e.slice(0, 19);
4011
- }
4012
- function io(e) {
4013
- return e ? Array.isArray(e) ? e : [e] : [];
4014
- }
4015
- function ao() {
4016
- let e = null;
4017
- return {
4018
- set: (t) => {
4019
- e = t;
4020
- },
4021
- call: ((...t) => {
4022
- e && e.call(t);
4023
- })
4024
- };
4025
- }
4026
- //#endregion
4027
- //#region src/lib/form-helpers.ts
4028
- async function oo(e, t) {
4029
- if (e instanceof File) {
4030
- let [n] = await t([e]);
4031
- return n;
4032
- }
4033
- if (Array.isArray(e)) return e.length > 0 && e.every((e) => e instanceof File) ? await t(e) : await Promise.all(e.map((e) => oo(e, t)));
4034
- if (typeof e == "object" && e && Object.prototype.toString.call(e) === "[object Object]") {
4035
- let n = {};
4036
- for (let [r, i] of Object.entries(e)) n[r] = await oo(i, t);
4037
- return n;
4038
- }
4039
- return e;
4040
- }
4041
- function so(e, t) {
4042
- let [n, r] = l(t), [i, a] = l(/* @__PURE__ */ new Map()), { uploader: o } = J();
4043
- function s(e, t) {
4044
- let n = t.replace(/\./g, ".shape.").replace(/\[[^\]]+\]/g, ".element").replace(/^\.element/, "element"), r;
4045
- return e instanceof H.ZodObject ? r = pe(e.shape, n) : e instanceof H.ZodArray && (r = pe(e, n)), r === void 0 ? "normal" : r instanceof H.ZodOptional ? "optional" : r instanceof H.ZodNullable ? "nullable" : "normal";
4046
- }
4047
- return {
4048
- form: n,
4049
- setForm: r,
4050
- register: (t, o) => {
4051
- let c = o ?? s(e, t), l = pe(n, t), u = i.get(t), d = {
4052
- value: l ?? "",
4053
- onValueChange: (e) => {
4054
- u !== void 0 && a((e) => {
4055
- let n = new Map(e);
4056
- return n.delete(t), n;
4057
- });
4058
- let i = e;
4059
- c === "nullable" ? i = e === "" ? null : e : c === "optional" && (i = e === "" ? void 0 : e);
4060
- let o = t.indexOf(".") === -1 && t.indexOf("[") === -1;
4061
- r(i === void 0 && o ? {
4062
- ...n,
4063
- [t]: void 0
4064
- } : he(n, t, i));
4065
- }
4066
- };
4067
- return u && (d.error = u), d;
4068
- },
4069
- submit: (e) => async () => {
4070
- let t = await oo(n, o);
4071
- return r(t), await e(t);
4072
- },
4073
- addError: (e, t) => {
4074
- a((n) => {
4075
- let r = new Map(n);
4076
- return r.set(e, typeof t == "string" ? { content: t } : t), r;
4077
- });
4078
- },
4079
- removeError: (e) => {
4080
- a((t) => {
4081
- let n = new Map(t);
4082
- return n.delete(e), n;
4083
- });
4084
- },
4085
- clearError: () => {
4086
- a(/* @__PURE__ */ new Map());
4087
- },
4088
- reset: () => {
4089
- r(t);
4090
- }
4091
- };
4092
- }
4093
- //#endregion
4094
- //#region src/lib/list-helpers.ts
4095
- function co(e, t) {
4096
- return e.filter((e) => t.includes(e));
4097
- }
4098
- function lo(e, t, n) {
4099
- let r = ve({ strict: !1 }), i = _e(), a = (() => {
4100
- if (n?.disableSearchParams) return t;
4101
- let i = e.safeParse(r);
4102
- return i.success ? {
4103
- ...t,
4104
- ...i.data
4105
- } : t;
4106
- })(), o = (e) => {
4107
- ye(a, e) || i({ search: e });
4108
- };
4109
- function s(e) {
4110
- let n = a[e], r = t[e];
4111
- return {
4112
- value: n ?? r ?? (e === "page" ? 1 : ""),
4113
- onValueChange: (t) => {
4114
- o(e === "page" ? {
4115
- ...a,
4116
- page: t
4117
- } : {
4118
- ...a,
4119
- page: 1,
4120
- [e]: t === "" ? void 0 : t
4121
- });
4122
- }
4123
- };
4124
- }
4125
- return {
4126
- listParams: a,
4127
- setListParams: o,
4128
- register: s
4129
- };
4130
- }
4131
- function uo(e, t = []) {
4132
- let [n, r] = l(new Map(e.map((e) => [e, t.includes(e)]))), [i, o] = l(0);
4133
- a(() => {
4134
- let t = Array.from(n.keys());
4135
- co(e, t).length !== t.length && r(new Map(Array.from(n).filter(([t, n]) => e.includes(t))));
4136
- }, [e, n]);
4137
- let s = Array.from(n).filter(([t, n]) => e.includes(t) && n).map(([e]) => e);
4138
- return {
4139
- getSelected: (e) => n.get(e) ?? !1,
4140
- toggle: (e) => {
4141
- r((t) => new Map([...t, [e, !(t.get(e) ?? !1)]]));
4142
- },
4143
- selectedKeys: s,
4144
- deselectAll: () => r(new Map(e.map((e) => [e, !1]))),
4145
- selectAll: () => r(new Map(e.map((e) => [e, !0]))),
4146
- isAllSelected: s.length === e.length,
4147
- handleCheckboxClick: (t, n) => {
4148
- let a = t.currentTarget.getElementsByTagName("input");
4149
- if (t.shiftKey && !a[0]?.checked) {
4150
- let [t, a] = i < n ? [i, n] : [n + 1, i];
4151
- r(new Map(ge([...s, ...e.slice(t, a)]).map((e) => [e, !0])));
4152
- } else o(n);
4153
- }
4154
- };
4155
- }
4156
- //#endregion
4157
- //#region src/lib/modal-helpers.ts
4158
- function fo(e, n) {
4159
- let [r, i] = l({
4160
- ...n,
4161
- open: !1
4162
- }), a = () => {
4163
- i({
4164
- ...r,
4165
- open: !1
4166
- });
4167
- };
4168
- return {
4169
- open: (e) => {
4170
- i({
4171
- ...e,
4172
- open: !0,
4173
- close: a
4174
- });
4175
- },
4176
- modal: t.createElement(e, {
4177
- ...r,
4178
- close: a
4179
- })
4180
- };
4181
- }
4182
- //#endregion
4183
- //#region src/components/ui/sonamu-filter/sonamu-filter-popover.tsx
4184
- function po({ rules: e, fieldMeta: t, children: n, side: r = "bottom", align: i = "start" }) {
4185
- let { SD: a } = J(), o = (e) => e ? La[e] : "", s = (e) => {
4186
- let { value: n, field: r, operator: i } = e;
4187
- if (i === "isNull" || i === "isNotNull" || !r || n == null) return "";
4188
- let a = t[r];
4189
- return a ? a.propType === "enum" && a.enumData ? Array.isArray(n) ? n.map((e) => a.enumData?.labels[e] || e).join(", ") : a.enumData.labels[n] || String(n) : a.propType === "date" || a.propType === "datetime" ? Array.isArray(n) ? n.map((e) => ro(e) ?? "").join(" ~ ") : ro(n) ?? "" : a.propType === "integer" || a.propType === "numeric" ? Array.isArray(n) ? n.map((e) => String(to(e) ?? "")).join(" ~ ") : String(to(n) ?? "") : Array.isArray(n) ? n.join(", ") : String(n) : String(n);
4190
- };
4191
- return e.length === 0 ? /* @__PURE__ */ f(d, { children: n }) : /* @__PURE__ */ p(Y, {
4192
- open: !0,
4193
- children: [/* @__PURE__ */ f(X, {
4194
- asChild: !0,
4195
- children: n
4196
- }), /* @__PURE__ */ f(Z, {
4197
- side: r,
4198
- align: i,
4199
- sideOffset: 5,
4200
- className: "p-3",
4201
- style: { width: "var(--radix-popover-trigger-width)" },
4202
- children: /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("div", {
4203
- className: "text-xs font-semibold mb-2",
4204
- children: a("rc.sonamuFilter.appliedFilters")
4205
- }), /* @__PURE__ */ f("ul", {
4206
- className: "space-y-1.5 text-xs",
4207
- children: e.map((e) => {
4208
- if (!e.field || !e.operator) return null;
4209
- let t = o(e.operator), n = s(e);
4210
- return /* @__PURE__ */ p("li", {
4211
- className: "flex items-start gap-1",
4212
- children: [/* @__PURE__ */ f("span", {
4213
- className: "text-muted-foreground",
4214
- children: "•"
4215
- }), /* @__PURE__ */ p("div", { children: [
4216
- /* @__PURE__ */ f("span", {
4217
- className: "font-medium",
4218
- children: e.field
4219
- }),
4220
- " ",
4221
- /* @__PURE__ */ f("span", {
4222
- className: "text-muted-foreground",
4223
- children: t
4224
- }),
4225
- " ",
4226
- n && /* @__PURE__ */ f("span", { children: n })
4227
- ] })]
4228
- }, e.id);
4229
- })
4230
- })] })
4231
- })]
4232
- });
4233
- }
4234
- //#endregion
4235
- //#region src/components/ui/switch.tsx
4236
- var mo = e.forwardRef(({ className: t, name: n, checked: r, value: i, defaultChecked: a, onValueChange: o, onBlur: s, ...c }, l) => {
4237
- let u = i === void 0 ? r : i, m = e.useRef(null);
4238
- e.useImperativeHandle(l, () => m.current);
4239
- let h = (e) => {
4240
- o?.(e);
4241
- };
4242
- return /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("input", {
4243
- type: "checkbox",
4244
- ref: m,
4245
- name: n,
4246
- defaultChecked: a,
4247
- onBlur: s,
4248
- className: "sr-only",
4249
- tabIndex: -1,
4250
- "aria-hidden": "true"
4251
- }), /* @__PURE__ */ f(be.Root, {
4252
- checked: u,
4253
- defaultChecked: a,
4254
- onCheckedChange: h,
4255
- className: G("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input", t),
4256
- ...c,
4257
- children: /* @__PURE__ */ f(be.Thumb, { className: G("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0") })
4258
- })] });
4259
- });
4260
- mo.displayName = "Switch";
4261
- //#endregion
4262
- //#region src/components/ui/table.tsx
4263
- function ho({ className: e, containerClassName: t, ...n }) {
4264
- return /* @__PURE__ */ f("div", {
4265
- "data-slot": "table-container",
4266
- className: G("relative w-full overflow-x-auto", t),
4267
- children: /* @__PURE__ */ f("table", {
4268
- "data-slot": "table",
4269
- className: G("w-full caption-bottom text-sm", e),
4270
- ...n
4271
- })
4272
- });
4273
- }
4274
- function go({ className: e, ...t }) {
4275
- return /* @__PURE__ */ f("thead", {
4276
- "data-slot": "table-header",
4277
- className: G("[&_tr]:border-b", e),
4278
- ...t
4279
- });
4280
- }
4281
- function _o({ className: e, ...t }) {
4282
- return /* @__PURE__ */ f("tbody", {
4283
- "data-slot": "table-body",
4284
- className: G("[&_tr:last-child]:border-0", e),
4285
- ...t
4286
- });
4287
- }
4288
- function vo({ className: e, ...t }) {
4289
- return /* @__PURE__ */ f("tfoot", {
4290
- "data-slot": "table-footer",
4291
- className: G("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0", e),
4292
- ...t
4293
- });
4294
- }
4295
- function yo({ className: e, ...t }) {
4296
- return /* @__PURE__ */ f("tr", {
4297
- "data-slot": "table-row",
4298
- className: G("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors", e),
4299
- ...t
4300
- });
4301
- }
4302
- function bo({ className: e, fit: t, align: n, ...r }) {
4303
- return /* @__PURE__ */ f("th", {
4304
- "data-slot": "table-head",
4305
- className: G("text-foreground h-10 px-2 text-left font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 *:[[role=checkbox]]:translate-y-[2px]", t && "w-px", n === "center" && "text-center", n === "right" && "text-right", e),
4306
- style: { verticalAlign: "middle" },
4307
- ...r
4308
- });
4309
- }
4310
- function xo({ className: e, fit: t, align: n, ...r }) {
4311
- return /* @__PURE__ */ f("td", {
4312
- "data-slot": "table-cell",
4313
- className: G("p-2 whitespace-nowrap [&:has([role=checkbox])]:pr-0 *:[[role=checkbox]]:translate-y-[2px]", t && "w-px", n === "center" && "text-center", n === "right" && "text-right", e),
4314
- style: { verticalAlign: "middle" },
4315
- ...r
4316
- });
4317
- }
4318
- function So({ className: e, ...t }) {
4319
- return /* @__PURE__ */ f("caption", {
4320
- "data-slot": "table-caption",
4321
- className: G("text-muted-foreground mt-4 text-sm", e),
4322
- ...t
4323
- });
4324
- }
4325
- //#endregion
4326
- //#region src/components/ui/tabs.tsx
4327
- var Co = U.Root, wo = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(U.List, {
4328
- ref: n,
4329
- className: G("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground", e),
4330
- ...t
4331
- }));
4332
- wo.displayName = U.List.displayName;
4333
- var To = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(U.Trigger, {
4334
- ref: n,
4335
- className: G("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm", e),
4336
- ...t
4337
- }));
4338
- To.displayName = U.Trigger.displayName;
4339
- var Eo = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(U.Content, {
4340
- ref: n,
4341
- className: G("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", e),
4342
- ...t
4343
- }));
4344
- Eo.displayName = U.Content.displayName;
4345
- //#endregion
4346
- //#region src/components/ui/textarea.tsx
4347
- var Do = e.forwardRef(({ className: e, onValueChange: t, onChange: n, ...r }, i) => {
4348
- let a = (e) => {
4349
- t?.(e.target.value), n?.(e);
4350
- };
4351
- return /* @__PURE__ */ f("textarea", {
4352
- className: G("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", e),
4353
- ref: i,
4354
- ...r,
4355
- onChange: a
4356
- });
4357
- });
4358
- Do.displayName = "Textarea";
4359
- //#endregion
4360
- //#region src/components/ui/toast.tsx
4361
- var Oo = W.Provider, ko = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(W.Viewport, {
4362
- ref: n,
4363
- className: G("fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]", e),
4364
- ...t
4365
- }));
4366
- ko.displayName = W.Viewport.displayName;
4367
- var Ao = g("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full", {
4368
- variants: { variant: {
4369
- default: "border bg-background text-foreground",
4370
- destructive: "destructive group border-destructive bg-destructive text-destructive-foreground"
4371
- } },
4372
- defaultVariants: { variant: "default" }
4373
- }), jo = e.forwardRef(({ className: e, variant: t, ...n }, r) => /* @__PURE__ */ f(W.Root, {
4374
- ref: r,
4375
- className: G(Ao({ variant: t }), e),
4376
- ...n
4377
- }));
4378
- jo.displayName = W.Root.displayName;
4379
- var Mo = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(W.Action, {
4380
- ref: n,
4381
- className: G("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive", e),
4382
- ...t
4383
- }));
4384
- Mo.displayName = W.Action.displayName;
4385
- var No = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(W.Close, {
4386
- ref: n,
4387
- className: G("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600", e),
4388
- "toast-close": "",
4389
- ...t,
4390
- children: /* @__PURE__ */ f(Zt, { className: "h-4 w-4" })
4391
- }));
4392
- No.displayName = W.Close.displayName;
4393
- var Po = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(W.Title, {
4394
- ref: n,
4395
- className: G("text-sm font-semibold", e),
4396
- ...t
4397
- }));
4398
- Po.displayName = W.Title.displayName;
4399
- var Fo = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(W.Description, {
4400
- ref: n,
4401
- className: G("text-sm opacity-90", e),
4402
- ...t
4403
- }));
4404
- Fo.displayName = W.Description.displayName;
4405
- //#endregion
4406
- //#region src/components/ui/toaster.tsx
4407
- function Io() {
4408
- let { toasts: e } = Pe();
4409
- return /* @__PURE__ */ p(Oo, { children: [e.map(({ id: e, title: t, description: n, action: r, ...i }) => /* @__PURE__ */ p(jo, {
4410
- ...i,
4411
- children: [
4412
- /* @__PURE__ */ p("div", {
4413
- className: "grid gap-1",
4414
- children: [t && /* @__PURE__ */ f(Po, { children: t }), n && /* @__PURE__ */ f(Fo, { children: n })]
4415
- }),
4416
- r,
4417
- /* @__PURE__ */ f(No, {})
4418
- ]
4419
- }, e)), /* @__PURE__ */ f(ko, {})] });
4420
- }
4421
- var Lo = g("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 gap-2", {
4422
- variants: {
4423
- variant: {
4424
- default: "bg-transparent",
4425
- outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
4426
- },
4427
- size: {
4428
- default: "h-10 px-3 min-w-10",
4429
- sm: "h-9 px-2.5 min-w-9",
4430
- lg: "h-11 px-5 min-w-11"
4431
- }
4432
- },
4433
- defaultVariants: {
4434
- variant: "default",
4435
- size: "default"
4436
- }
4437
- }), Ro = e.forwardRef(({ className: e, variant: t, size: n, value: r, pressed: i, onValueChange: a, onPressedChange: o, ...s }, c) => {
4438
- let l = r === void 0 ? i : r;
4439
- return /* @__PURE__ */ f(xe.Root, {
4440
- ref: c,
4441
- pressed: l,
4442
- onPressedChange: (e) => {
4443
- a?.(e), o?.(e);
4444
- },
4445
- className: G(Lo({
4446
- variant: t,
4447
- size: n,
4448
- className: e
4449
- })),
4450
- ...s
4451
- });
4452
- });
4453
- Ro.displayName = xe.Root.displayName;
4454
- //#endregion
4455
- //#region src/components/ui/toggle-group.tsx
4456
- var zo = e.createContext({
4457
- size: "default",
4458
- variant: "default"
4459
- }), Bo = e.forwardRef(({ className: e, variant: t, size: n, children: r, ...i }, a) => /* @__PURE__ */ f(Se.Root, {
4460
- ref: a,
4461
- className: G("flex items-center justify-center gap-1", e),
4462
- ...i,
4463
- children: /* @__PURE__ */ f(zo.Provider, {
4464
- value: {
4465
- variant: t,
4466
- size: n
4467
- },
4468
- children: r
4469
- })
4470
- }));
4471
- Bo.displayName = Se.Root.displayName;
4472
- var Vo = e.forwardRef(({ className: t, children: n, variant: r, size: i, ...a }, o) => {
4473
- let s = e.useContext(zo);
4474
- return /* @__PURE__ */ f(Se.Item, {
4475
- ref: o,
4476
- className: G(Lo({
4477
- variant: s.variant || r,
4478
- size: s.size || i
4479
- }), t),
4480
- ...a,
4481
- children: n
4482
- });
4483
- });
4484
- Vo.displayName = Se.Item.displayName;
4485
- //#endregion
4486
- export { Re as Accordion, Ve as AccordionContent, ze as AccordionItem, Be as AccordionTrigger, Ue as Alert, Ge as AlertDescription, Je as AlertDialog, rt as AlertDialogAction, it as AlertDialogCancel, Qe as AlertDialogContent, nt as AlertDialogDescription, et as AlertDialogFooter, $e as AlertDialogHeader, Ze as AlertDialogOverlay, Xe as AlertDialogPortal, tt as AlertDialogTitle, Ye as AlertDialogTrigger, We as AlertTitle, at as AspectRatio, ot as Avatar, ct as AvatarFallback, st as AvatarImage, ut as Badge, pt as Breadcrumb, yt as BreadcrumbEllipsis, ht as BreadcrumbItem, gt as BreadcrumbLink, mt as BreadcrumbList, _t as BreadcrumbPage, vt as BreadcrumbSeparator, K as Button, xt as Calendar, St as Card, Et as CardAction, Dt as CardContent, Tt as CardDescription, Ot as CardFooter, Ct as CardHeader, wt as CardTitle, Nt as Carousel, Pt as CarouselContent, Ft as CarouselItem, Lt as CarouselNext, It as CarouselPrevious, Rt as Checkbox, zt as Collapsible, Vt as CollapsibleContent, Bt as CollapsibleTrigger, yn as Combobox, ln as Command, un as CommandDialog, pn as CommandEmpty, mn as CommandGroup, dn as CommandInput, gn as CommandItem, fn as CommandList, hn as CommandSeparator, _n as CommandShortcut, xn as CommonModal, wn as ContextMenu, Pn as ContextMenuCheckboxItem, Mn as ContextMenuContent, En as ContextMenuGroup, Nn as ContextMenuItem, In as ContextMenuLabel, Dn as ContextMenuPortal, kn as ContextMenuRadioGroup, Fn as ContextMenuRadioItem, Ln as ContextMenuSeparator, Rn as ContextMenuShortcut, On as ContextMenuSub, jn as ContextMenuSubContent, An as ContextMenuSubTrigger, Tn as ContextMenuTrigger, zn as DateInput, Vn as DatePicker, Hn as DatePickerWithDropdown, Un as DatePickerWithRange, Qt as Dialog, tn as DialogClose, rn as DialogContent, cn as DialogDescription, on as DialogFooter, an as DialogHeader, nn as DialogOverlay, en as DialogPortal, sn as DialogTitle, $t as DialogTrigger, Wn as Drawer, qn as DrawerClose, Yn as DrawerContent, $n as DrawerDescription, Zn as DrawerFooter, Xn as DrawerHeader, Jn as DrawerOverlay, Kn as DrawerPortal, Qn as DrawerTitle, Gn as DrawerTrigger, er as DropdownMenu, ur as DropdownMenuCheckboxItem, cr as DropdownMenuContent, nr as DropdownMenuGroup, lr as DropdownMenuItem, fr as DropdownMenuLabel, rr as DropdownMenuPortal, ar as DropdownMenuRadioGroup, dr as DropdownMenuRadioItem, pr as DropdownMenuSeparator, mr as DropdownMenuShortcut, ir as DropdownMenuSub, sr as DropdownMenuSubContent, or as DropdownMenuSubTrigger, tr as DropdownMenuTrigger, Ni as EnumSelect, Cr as FileInput, Er as Form, Nr as FormControl, Pr as FormDescription, Or as FormField, jr as FormItem, Mr as FormLabel, Fr as FormMessage, Ir as HoverCard, Rr as HoverCardContent, Lr as HoverCardTrigger, Ii as IdAsyncSelect, Q as Input, Br as InputOTP, Vr as InputOTPGroup, Ur as InputOTPSeparator, Hr as InputOTPSlot, Tr as Label, Yr as Menubar, ti as MenubarCheckboxItem, $r as MenubarContent, Gr as MenubarGroup, ei as MenubarItem, ri as MenubarLabel, Wr as MenubarMenu, Kr as MenubarPortal, qr as MenubarRadioGroup, ni as MenubarRadioItem, ii as MenubarSeparator, ai as MenubarShortcut, Jr as MenubarSub, Qr as MenubarSubContent, Zr as MenubarSubTrigger, Xr as MenubarTrigger, fi as MonthPickerMultiple, pi as NavigationMenu, vi as NavigationMenuContent, xi as NavigationMenuIndicator, hi as NavigationMenuItem, yi as NavigationMenuLink, mi as NavigationMenuList, _i as NavigationMenuTrigger, bi as NavigationMenuViewport, Si as Pagination, Y as Popover, vn as PopoverAnchor, Z as PopoverContent, X as PopoverTrigger, Ci as Progress, wi as RadioGroup, Ti as RadioGroupItem, Ei as RangeNumberInput, Ai as ResizableHandle, ki as ResizablePanel, Oi as ResizablePanelGroup, ji as ScrollArea, Mi as ScrollBar, $ as Select, oi as Separator, Li as Sheet, zi as SheetClose, Ui as SheetContent, qi as SheetDescription, Gi as SheetFooter, Wi as SheetHeader, Vi as SheetOverlay, Bi as SheetPortal, Ki as SheetTitle, Ri as SheetTrigger, la as Sidebar, _a as SidebarContent, ha as SidebarFooter, va as SidebarGroup, ba as SidebarGroupAction, xa as SidebarGroupContent, ya as SidebarGroupLabel, ma as SidebarHeader, pa as SidebarInput, fa as SidebarInset, Sa as SidebarMenu, Ea as SidebarMenuAction, Da as SidebarMenuBadge, Ta as SidebarMenuButton, Ca as SidebarMenuItem, Oa as SidebarMenuSkeleton, ka as SidebarMenuSub, ja as SidebarMenuSubButton, Aa as SidebarMenuSubItem, ca as SidebarProvider, da as SidebarRail, ga as SidebarSeparator, ua as SidebarTrigger, Zi as Skeleton, Ma as Slider, qa as SonamuFilterModal, po as SonamuFilterPopover, po as SonamuFilterTooltip, Yt as SonamuProvider, mo as Switch, ho as Table, _o as TableBody, So as TableCaption, xo as TableCell, vo as TableFooter, bo as TableHead, go as TableHeader, yo as TableRow, Co as Tabs, Eo as TabsContent, wo as TabsList, To as TabsTrigger, za as TagInput, Do as Textarea, jo as Toast, Mo as ToastAction, No as ToastClose, Fo as ToastDescription, Oo as ToastProvider, Po as ToastTitle, ko as ToastViewport, Io as Toaster, Ro as Toggle, Bo as ToggleGroup, Vo as ToggleGroupItem, $i as Tooltip, ta as TooltipContent, Qi as TooltipProvider, ea as TooltipTrigger, io as arrayableToArray, lt as badgeVariants, qe as buttonVariants, ao as caller, Ya as caster, G as cn, bn as commonModalAtom, no as dateF, ro as datetimeF, Ia as defaultOperatorByPropType, Ka as extractFieldMetaFromSchema, Xa as fastifyCaster, Za as hidden, gi as navigationMenuTriggerStyle, to as numF, Fa as operatorsByPropType, $a as paramsToSearchParams, Qa as searchParamsToParams, eo as sqlDateToDateString, Ne as toast, Lo as toggleVariants, Sn as useCommonModal, kr as useFormField, Xi as useIsMobile, lo as useListParams, fo as useModal, uo as useSelection, sa as useSidebar, J as useSonamuBaseContext, Pe as useToast, so as useTypeForm };
4487
-
4488
- //# sourceMappingURL=react-components.es.js.map