proctoring-ui-3 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ui-3.es.js CHANGED
@@ -1,7 +1,6 @@
1
- import ve, { useState as O, useRef as K, useEffect as J } from "react";
2
- import { useTranslation as pe } from "react-i18next";
3
- import { Heart as Ne, Home as ye, Calendar as Ee, Users as Ce, Settings as Se, User as fe, ChevronDown as ae, LogOut as ke, X, AlertCircle as he, Upload as $e, File as Le, Trash2 as Re, Search as le, Save as Me, Edit as oe, Sparkles as _e, Check as re, ChevronRight as se, CheckCircle as ze, ChevronLeft as ie, AlertTriangle as we } from "lucide-react";
4
- import { useNavigate as Te, useLocation as xe, Link as ne } from "react-router-dom";
1
+ import ve, { useState as z, useRef as K, useEffect as J } from "react";
2
+ import { Heart as je, Home as Ne, Calendar as ye, Users as Ee, Settings as Ce, User as pe, ChevronDown as ae, LogOut as fe, X, AlertCircle as he, Upload as Se, File as $e, Trash2 as Le, Search as le, Save as Re, Edit as oe, Sparkles as Me, Check as re, ChevronRight as se, CheckCircle as _e, ChevronLeft as ie, AlertTriangle as ke } from "lucide-react";
3
+ import { useNavigate as ze, useLocation as xe, Link as ne } from "react-router-dom";
5
4
  import { createPortal as de } from "react-dom";
6
5
  var ce = { exports: {} }, ee = {};
7
6
  /**
@@ -14,23 +13,23 @@ var ce = { exports: {} }, ee = {};
14
13
  * LICENSE file in the root directory of this source tree.
15
14
  */
16
15
  var be;
17
- function Oe() {
16
+ function Te() {
18
17
  if (be) return ee;
19
18
  be = 1;
20
19
  var t = Symbol.for("react.transitional.element"), r = Symbol.for("react.fragment");
21
- function n(l, d, x) {
22
- var m = null;
23
- if (x !== void 0 && (m = "" + x), d.key !== void 0 && (m = "" + d.key), "key" in d) {
24
- x = {};
25
- for (var h in d)
26
- h !== "key" && (x[h] = d[h]);
27
- } else x = d;
28
- return d = x.ref, {
20
+ function n(l, c, h) {
21
+ var x = null;
22
+ if (h !== void 0 && (x = "" + h), c.key !== void 0 && (x = "" + c.key), "key" in c) {
23
+ h = {};
24
+ for (var m in c)
25
+ m !== "key" && (h[m] = c[m]);
26
+ } else h = c;
27
+ return c = h.ref, {
29
28
  $$typeof: t,
30
29
  type: l,
31
- key: m,
32
- ref: d !== void 0 ? d : null,
33
- props: x
30
+ key: x,
31
+ ref: c !== void 0 ? c : null,
32
+ props: h
34
33
  };
35
34
  }
36
35
  return ee.Fragment = r, ee.jsx = n, ee.jsxs = n, ee;
@@ -46,19 +45,19 @@ var te = {};
46
45
  * LICENSE file in the root directory of this source tree.
47
46
  */
48
47
  var ue;
49
- function Ae() {
48
+ function Oe() {
50
49
  return ue || (ue = 1, process.env.NODE_ENV !== "production" && function() {
51
50
  function t(s) {
52
51
  if (s == null) return null;
53
52
  if (typeof s == "function")
54
- return s.$$typeof === i ? null : s.displayName || s.name || null;
53
+ return s.$$typeof === d ? null : s.displayName || s.name || null;
55
54
  if (typeof s == "string") return s;
56
55
  switch (s) {
57
- case N:
56
+ case i:
58
57
  return "Fragment";
59
- case z:
58
+ case D:
60
59
  return "Profiler";
61
- case c:
60
+ case j:
62
61
  return "StrictMode";
63
62
  case Y:
64
63
  return "Suspense";
@@ -75,14 +74,14 @@ function Ae() {
75
74
  return "Portal";
76
75
  case V:
77
76
  return s.displayName || "Context";
78
- case I:
77
+ case T:
79
78
  return (s._context.displayName || "Context") + ".Consumer";
80
- case M:
79
+ case I:
81
80
  var a = s.render;
82
81
  return s = s.displayName, s || (s = a.displayName || a.name || "", s = s !== "" ? "ForwardRef(" + s + ")" : "ForwardRef"), s;
83
82
  case B:
84
83
  return a = s.displayName || null, a !== null ? a : t(s.type) || "Memo";
85
- case j:
84
+ case w:
86
85
  a = s._payload, s = s._init;
87
86
  try {
88
87
  return t(s(a));
@@ -103,17 +102,17 @@ function Ae() {
103
102
  }
104
103
  if (a) {
105
104
  a = console;
106
- var o = a.error, p = typeof Symbol == "function" && Symbol.toStringTag && s[Symbol.toStringTag] || s.constructor.name || "Object";
105
+ var o = a.error, f = typeof Symbol == "function" && Symbol.toStringTag && s[Symbol.toStringTag] || s.constructor.name || "Object";
107
106
  return o.call(
108
107
  a,
109
108
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
110
- p
109
+ f
111
110
  ), r(s);
112
111
  }
113
112
  }
114
113
  function l(s) {
115
- if (s === N) return "<>";
116
- if (typeof s == "object" && s !== null && s.$$typeof === j)
114
+ if (s === i) return "<>";
115
+ if (typeof s == "object" && s !== null && s.$$typeof === w)
117
116
  return "<...>";
118
117
  try {
119
118
  var a = t(s);
@@ -122,21 +121,21 @@ function Ae() {
122
121
  return "<...>";
123
122
  }
124
123
  }
125
- function d() {
124
+ function c() {
126
125
  var s = v.A;
127
126
  return s === null ? null : s.getOwner();
128
127
  }
129
- function x() {
128
+ function h() {
130
129
  return Error("react-stack-top-frame");
131
130
  }
132
- function m(s) {
133
- if (S.call(s, "key")) {
131
+ function x(s) {
132
+ if (C.call(s, "key")) {
134
133
  var a = Object.getOwnPropertyDescriptor(s, "key").get;
135
134
  if (a && a.isReactWarning) return !1;
136
135
  }
137
136
  return s.key !== void 0;
138
137
  }
139
- function h(s, a) {
138
+ function m(s, a) {
140
139
  function o() {
141
140
  b || (b = !0, console.error(
142
141
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
@@ -148,23 +147,23 @@ function Ae() {
148
147
  configurable: !0
149
148
  });
150
149
  }
151
- function f() {
150
+ function p() {
152
151
  var s = t(this.type);
153
152
  return $[s] || ($[s] = !0, console.error(
154
153
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
155
154
  )), s = this.props.ref, s !== void 0 ? s : null;
156
155
  }
157
- function k(s, a, o, p, w, D) {
158
- var R = o.ref;
156
+ function N(s, a, o, f, k, P) {
157
+ var L = o.ref;
159
158
  return s = {
160
- $$typeof: C,
159
+ $$typeof: M,
161
160
  type: s,
162
161
  key: a,
163
162
  props: o,
164
- _owner: p
165
- }, (R !== void 0 ? R : null) !== null ? Object.defineProperty(s, "ref", {
163
+ _owner: f
164
+ }, (L !== void 0 ? L : null) !== null ? Object.defineProperty(s, "ref", {
166
165
  enumerable: !1,
167
- get: f
166
+ get: p
168
167
  }) : Object.defineProperty(s, "ref", { enumerable: !1, value: null }), s._store = {}, Object.defineProperty(s._store, "validated", {
169
168
  configurable: !1,
170
169
  enumerable: !1,
@@ -179,132 +178,132 @@ function Ae() {
179
178
  configurable: !1,
180
179
  enumerable: !1,
181
180
  writable: !0,
182
- value: w
181
+ value: k
183
182
  }), Object.defineProperty(s, "_debugTask", {
184
183
  configurable: !1,
185
184
  enumerable: !1,
186
185
  writable: !0,
187
- value: D
186
+ value: P
188
187
  }), Object.freeze && (Object.freeze(s.props), Object.freeze(s)), s;
189
188
  }
190
- function _(s, a, o, p, w, D) {
191
- var R = a.children;
192
- if (R !== void 0)
193
- if (p)
194
- if (P(R)) {
195
- for (p = 0; p < R.length; p++)
196
- y(R[p]);
197
- Object.freeze && Object.freeze(R);
189
+ function S(s, a, o, f, k, P) {
190
+ var L = a.children;
191
+ if (L !== void 0)
192
+ if (f)
193
+ if (A(L)) {
194
+ for (f = 0; f < L.length; f++)
195
+ R(L[f]);
196
+ Object.freeze && Object.freeze(L);
198
197
  } else
199
198
  console.error(
200
199
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
201
200
  );
202
- else y(R);
203
- if (S.call(a, "key")) {
204
- R = t(s);
201
+ else R(L);
202
+ if (C.call(a, "key")) {
203
+ L = t(s);
205
204
  var q = Object.keys(a).filter(function(Q) {
206
205
  return Q !== "key";
207
206
  });
208
- p = 0 < q.length ? "{key: someKey, " + q.join(": ..., ") + ": ...}" : "{key: someKey}", G[R + p] || (q = 0 < q.length ? "{" + q.join(": ..., ") + ": ...}" : "{}", console.error(
207
+ f = 0 < q.length ? "{key: someKey, " + q.join(": ..., ") + ": ...}" : "{key: someKey}", G[L + f] || (q = 0 < q.length ? "{" + q.join(": ..., ") + ": ...}" : "{}", console.error(
209
208
  `A props object containing a "key" prop is being spread into JSX:
210
209
  let props = %s;
211
210
  <%s {...props} />
212
211
  React keys must be passed directly to JSX without using spread:
213
212
  let props = %s;
214
213
  <%s key={someKey} {...props} />`,
215
- p,
216
- R,
214
+ f,
215
+ L,
217
216
  q,
218
- R
219
- ), G[R + p] = !0);
217
+ L
218
+ ), G[L + f] = !0);
220
219
  }
221
- if (R = null, o !== void 0 && (n(o), R = "" + o), m(a) && (n(a.key), R = "" + a.key), "key" in a) {
220
+ if (L = null, o !== void 0 && (n(o), L = "" + o), x(a) && (n(a.key), L = "" + a.key), "key" in a) {
222
221
  o = {};
223
222
  for (var u in a)
224
223
  u !== "key" && (o[u] = a[u]);
225
224
  } else o = a;
226
- return R && h(
225
+ return L && m(
227
226
  o,
228
227
  typeof s == "function" ? s.displayName || s.name || "Unknown" : s
229
- ), k(
228
+ ), N(
230
229
  s,
231
- R,
230
+ L,
232
231
  o,
233
- d(),
234
- w,
235
- D
232
+ c(),
233
+ k,
234
+ P
236
235
  );
237
236
  }
238
- function y(s) {
239
- E(s) ? s._store && (s._store.validated = 1) : typeof s == "object" && s !== null && s.$$typeof === j && (s._payload.status === "fulfilled" ? E(s._payload.value) && s._payload.value._store && (s._payload.value._store.validated = 1) : s._store && (s._store.validated = 1));
237
+ function R(s) {
238
+ y(s) ? s._store && (s._store.validated = 1) : typeof s == "object" && s !== null && s.$$typeof === w && (s._payload.status === "fulfilled" ? y(s._payload.value) && s._payload.value._store && (s._payload.value._store.validated = 1) : s._store && (s._store.validated = 1));
240
239
  }
241
- function E(s) {
242
- return typeof s == "object" && s !== null && s.$$typeof === C;
240
+ function y(s) {
241
+ return typeof s == "object" && s !== null && s.$$typeof === M;
243
242
  }
244
- var L = ve, C = Symbol.for("react.transitional.element"), g = Symbol.for("react.portal"), N = Symbol.for("react.fragment"), c = Symbol.for("react.strict_mode"), z = Symbol.for("react.profiler"), I = Symbol.for("react.consumer"), V = Symbol.for("react.context"), M = Symbol.for("react.forward_ref"), Y = Symbol.for("react.suspense"), U = Symbol.for("react.suspense_list"), B = Symbol.for("react.memo"), j = Symbol.for("react.lazy"), W = Symbol.for("react.activity"), i = Symbol.for("react.client.reference"), v = L.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, S = Object.prototype.hasOwnProperty, P = Array.isArray, A = console.createTask ? console.createTask : function() {
243
+ var E = ve, M = Symbol.for("react.transitional.element"), g = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), j = Symbol.for("react.strict_mode"), D = Symbol.for("react.profiler"), T = Symbol.for("react.consumer"), V = Symbol.for("react.context"), I = Symbol.for("react.forward_ref"), Y = Symbol.for("react.suspense"), U = Symbol.for("react.suspense_list"), B = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), W = Symbol.for("react.activity"), d = Symbol.for("react.client.reference"), v = E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, C = Object.prototype.hasOwnProperty, A = Array.isArray, O = console.createTask ? console.createTask : function() {
245
244
  return null;
246
245
  };
247
- L = {
246
+ E = {
248
247
  react_stack_bottom_frame: function(s) {
249
248
  return s();
250
249
  }
251
250
  };
252
- var b, $ = {}, F = L.react_stack_bottom_frame.bind(
253
- L,
254
- x
255
- )(), H = A(l(x)), G = {};
256
- te.Fragment = N, te.jsx = function(s, a, o) {
257
- var p = 1e4 > v.recentlyCreatedOwnerStacks++;
258
- return _(
251
+ var b, $ = {}, F = E.react_stack_bottom_frame.bind(
252
+ E,
253
+ h
254
+ )(), H = O(l(h)), G = {};
255
+ te.Fragment = i, te.jsx = function(s, a, o) {
256
+ var f = 1e4 > v.recentlyCreatedOwnerStacks++;
257
+ return S(
259
258
  s,
260
259
  a,
261
260
  o,
262
261
  !1,
263
- p ? Error("react-stack-top-frame") : F,
264
- p ? A(l(s)) : H
262
+ f ? Error("react-stack-top-frame") : F,
263
+ f ? O(l(s)) : H
265
264
  );
266
265
  }, te.jsxs = function(s, a, o) {
267
- var p = 1e4 > v.recentlyCreatedOwnerStacks++;
268
- return _(
266
+ var f = 1e4 > v.recentlyCreatedOwnerStacks++;
267
+ return S(
269
268
  s,
270
269
  a,
271
270
  o,
272
271
  !0,
273
- p ? Error("react-stack-top-frame") : F,
274
- p ? A(l(s)) : H
272
+ f ? Error("react-stack-top-frame") : F,
273
+ f ? O(l(s)) : H
275
274
  );
276
275
  };
277
276
  }()), te;
278
277
  }
279
- process.env.NODE_ENV === "production" ? ce.exports = Oe() : ce.exports = Ae();
278
+ process.env.NODE_ENV === "production" ? ce.exports = Te() : ce.exports = Oe();
280
279
  var e = ce.exports;
281
- function Ye({ text: t, link: r, linkText: n, year: l, navigationItems: d = [] }) {
282
- const { t: x } = pe("pages-product-page"), m = Te(), h = xe(), f = [
280
+ function Be({ text: t, link: r, linkText: n, year: l, navigationItems: c = [] }) {
281
+ const h = ze(), x = xe(), m = [
283
282
  {
284
- icon: ye,
283
+ icon: Ne,
285
284
  label: "Dashboard",
286
285
  path: "/dashboard",
287
286
  key: "dashboard"
288
287
  },
289
288
  {
290
- icon: Ee,
289
+ icon: ye,
291
290
  label: "Calendar",
292
291
  path: "/calendar",
293
292
  key: "calendar"
294
293
  },
295
294
  {
296
- icon: Ce,
295
+ icon: Ee,
297
296
  label: "Admins",
298
297
  path: "/admins",
299
298
  key: "admins"
300
299
  },
301
300
  {
302
- icon: Se,
301
+ icon: Ce,
303
302
  label: "Settings",
304
303
  path: "/settings",
305
304
  key: "settings"
306
305
  }
307
- ], k = d.length > 0 ? d : f, _ = (y) => h.pathname === y;
306
+ ], p = c.length > 0 ? c : m, N = (S) => x.pathname === S;
308
307
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
309
308
  /* @__PURE__ */ e.jsxs("footer", { className: "hidden md:block relative overflow-hidden border-t transition-all duration-300 bg-gradient-to-r from-white via-violet-50/30 to-white border-slate-200/50 dark:bg-gradient-to-r dark:from-slate-800 dark:via-slate-900 dark:to-slate-800 dark:border-slate-700/50 shadow-sm", children: [
310
309
  /* @__PURE__ */ e.jsx("div", { className: "absolute inset-0 w-full h-full opacity-5 bg-gradient-to-r from-violet-300 to-indigo-300 dark:bg-gradient-to-r dark:from-violet-500 dark:to-indigo-500" }),
@@ -339,7 +338,7 @@ function Ye({ text: t, link: r, linkText: n, year: l, navigationItems: d = [] })
339
338
  target: "_blank",
340
339
  rel: "noopener noreferrer",
341
340
  className: "text-sm font-medium transition-all duration-200 hover:scale-105 inline-block text-violet-600 hover:text-violet-700 dark:text-violet-400 dark:hover:text-violet-300",
342
- children: x("footer.text")
341
+ children: t || n || "Footer Text"
343
342
  }
344
343
  )
345
344
  ] }),
@@ -362,7 +361,7 @@ function Ye({ text: t, link: r, linkText: n, year: l, navigationItems: d = [] })
362
361
  ),
363
362
  /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-slate-500 dark:text-slate-500", children: [
364
363
  "Made with ",
365
- /* @__PURE__ */ e.jsx(Ne, { className: "w-3 h-3 inline text-red-500 fill-red-500" })
364
+ /* @__PURE__ */ e.jsx(je, { className: "w-3 h-3 inline text-red-500 fill-red-500" })
366
365
  ] })
367
366
  ] })
368
367
  ] }) })
@@ -370,30 +369,30 @@ function Ye({ text: t, link: r, linkText: n, year: l, navigationItems: d = [] })
370
369
  /* @__PURE__ */ e.jsx("nav", { className: "md:hidden fixed bottom-0 left-0 right-0 z-50 safe-area-bottom", children: /* @__PURE__ */ e.jsxs("div", { className: "relative backdrop-blur-2xl bg-white/90 dark:bg-slate-900/95 border-t border-slate-200/50 dark:border-slate-700/50 shadow-2xl", children: [
371
370
  /* @__PURE__ */ e.jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-violet-50/30 to-transparent dark:from-violet-950/20 dark:to-transparent pointer-events-none" }),
372
371
  /* @__PURE__ */ e.jsx("div", { className: "absolute top-0 left-0 right-0 h-0.5 bg-gradient-to-r from-transparent via-violet-500 to-transparent opacity-50" }),
373
- /* @__PURE__ */ e.jsx("div", { className: "relative grid grid-cols-4 gap-1 px-2 py-2 pb-safe", children: k.map((y, E) => {
374
- const L = y.icon, C = _(y.path);
372
+ /* @__PURE__ */ e.jsx("div", { className: "relative grid grid-cols-4 gap-1 px-2 py-2 pb-safe", children: p.map((S, R) => {
373
+ const y = S.icon, E = N(S.path);
375
374
  return /* @__PURE__ */ e.jsxs(
376
375
  "button",
377
376
  {
378
- onClick: () => m(y.path),
379
- className: `relative flex flex-col items-center justify-center py-2 px-1 rounded-2xl transition-all duration-300 group ${C ? "bg-gradient-to-br from-violet-500 to-indigo-600 shadow-lg shadow-violet-500/30" : "hover:bg-slate-100 dark:hover:bg-slate-800/50 active:scale-95"}`,
377
+ onClick: () => h(S.path),
378
+ className: `relative flex flex-col items-center justify-center py-2 px-1 rounded-2xl transition-all duration-300 group ${E ? "bg-gradient-to-br from-violet-500 to-indigo-600 shadow-lg shadow-violet-500/30" : "hover:bg-slate-100 dark:hover:bg-slate-800/50 active:scale-95"}`,
380
379
  children: [
381
- C && /* @__PURE__ */ e.jsx("div", { className: "absolute -top-1 left-1/2 -translate-x-1/2 w-1 h-1 rounded-full bg-white shadow-lg shadow-white/50 animate-pulse" }),
382
- /* @__PURE__ */ e.jsxs("div", { className: `relative mb-1 transition-transform duration-300 ${C ? "scale-110" : "group-hover:scale-110"}`, children: [
380
+ E && /* @__PURE__ */ e.jsx("div", { className: "absolute -top-1 left-1/2 -translate-x-1/2 w-1 h-1 rounded-full bg-white shadow-lg shadow-white/50 animate-pulse" }),
381
+ /* @__PURE__ */ e.jsxs("div", { className: `relative mb-1 transition-transform duration-300 ${E ? "scale-110" : "group-hover:scale-110"}`, children: [
383
382
  /* @__PURE__ */ e.jsx(
384
- L,
383
+ y,
385
384
  {
386
- className: `w-6 h-6 transition-colors duration-300 ${C ? "text-white" : "text-slate-600 dark:text-slate-400 group-hover:text-violet-600 dark:group-hover:text-violet-400"}`,
387
- strokeWidth: C ? 2.5 : 2
385
+ className: `w-6 h-6 transition-colors duration-300 ${E ? "text-white" : "text-slate-600 dark:text-slate-400 group-hover:text-violet-600 dark:group-hover:text-violet-400"}`,
386
+ strokeWidth: E ? 2.5 : 2
388
387
  }
389
388
  ),
390
- C && /* @__PURE__ */ e.jsx("div", { className: "absolute inset-0 rounded-full bg-white/20 animate-ping" })
389
+ E && /* @__PURE__ */ e.jsx("div", { className: "absolute inset-0 rounded-full bg-white/20 animate-ping" })
391
390
  ] }),
392
- /* @__PURE__ */ e.jsx("span", { className: `text-xs font-semibold transition-all duration-300 ${C ? "text-white scale-105" : "text-slate-600 dark:text-slate-400 group-hover:text-violet-600 dark:group-hover:text-violet-400"}`, children: y.label }),
393
- y.badge && /* @__PURE__ */ e.jsx("div", { className: "absolute top-1 right-2 w-2 h-2 rounded-full bg-red-500 border-2 border-white dark:border-slate-900 animate-pulse" })
391
+ /* @__PURE__ */ e.jsx("span", { className: `text-xs font-semibold transition-all duration-300 ${E ? "text-white scale-105" : "text-slate-600 dark:text-slate-400 group-hover:text-violet-600 dark:group-hover:text-violet-400"}`, children: S.label }),
392
+ S.badge && /* @__PURE__ */ e.jsx("div", { className: "absolute top-1 right-2 w-2 h-2 rounded-full bg-red-500 border-2 border-white dark:border-slate-900 animate-pulse" })
394
393
  ]
395
394
  },
396
- y.key || E
395
+ S.key || R
397
396
  );
398
397
  }) }),
399
398
  /* @__PURE__ */ e.jsx("div", { className: "h-safe-area-inset-bottom bg-white/50 dark:bg-slate-900/50" })
@@ -411,27 +410,27 @@ function Ye({ text: t, link: r, linkText: n, year: l, navigationItems: d = [] })
411
410
  ` })
412
411
  ] });
413
412
  }
414
- const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
415
- const [l, d] = O(!1), [x, m] = O({ top: 0, right: 0 }), h = K(null), f = K(null);
413
+ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
414
+ const [l, c] = z(!1), [h, x] = z({ top: 0, right: 0 }), m = K(null), p = K(null);
416
415
  return J(() => {
417
- const k = (_) => {
418
- h.current && !h.current.contains(_.target) && f.current && !f.current.contains(_.target) && d(!1);
416
+ const N = (S) => {
417
+ m.current && !m.current.contains(S.target) && p.current && !p.current.contains(S.target) && c(!1);
419
418
  };
420
- return l && document.addEventListener("mousedown", k), () => document.removeEventListener("mousedown", k);
419
+ return l && document.addEventListener("mousedown", N), () => document.removeEventListener("mousedown", N);
421
420
  }, [l]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
422
421
  /* @__PURE__ */ e.jsxs(
423
422
  "button",
424
423
  {
425
- ref: h,
424
+ ref: m,
426
425
  onClick: () => {
427
- if (!l && h.current) {
428
- const k = h.current.getBoundingClientRect();
429
- m({
430
- top: k.bottom + 6,
431
- right: window.innerWidth - k.right
426
+ if (!l && m.current) {
427
+ const N = m.current.getBoundingClientRect();
428
+ x({
429
+ top: N.bottom + 6,
430
+ right: window.innerWidth - N.right
432
431
  });
433
432
  }
434
- d(!l);
433
+ c(!l);
435
434
  },
436
435
  title: "Account",
437
436
  className: `p-2 sm:p-2.5 rounded-xl transition-all duration-200
@@ -441,7 +440,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
441
440
  hover:scale-105 active:scale-95
442
441
  flex items-center gap-1`,
443
442
  children: [
444
- /* @__PURE__ */ e.jsx(fe, { className: "w-[18px] h-[18px]" }),
443
+ /* @__PURE__ */ e.jsx(pe, { className: "w-[18px] h-[18px]" }),
445
444
  /* @__PURE__ */ e.jsx(
446
445
  ae,
447
446
  {
@@ -455,8 +454,8 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
455
454
  /* @__PURE__ */ e.jsxs(
456
455
  "div",
457
456
  {
458
- ref: f,
459
- style: { top: x.top, right: x.right },
457
+ ref: p,
458
+ style: { top: h.top, right: h.right },
460
459
  className: `fixed w-48 rounded-xl border shadow-lg overflow-hidden z-[9999]
461
460
  bg-white border-slate-200/60
462
461
  dark:bg-slate-800 dark:border-slate-700/60
@@ -470,14 +469,14 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
470
469
  "button",
471
470
  {
472
471
  onClick: () => {
473
- d(!1), r();
472
+ c(!1), r();
474
473
  },
475
474
  className: `w-full flex items-center gap-2 px-3.5 py-2.5
476
475
  text-sm font-medium text-red-600 dark:text-red-400
477
476
  hover:bg-red-50 dark:hover:bg-red-900/20
478
477
  transition-colors duration-150`,
479
478
  children: [
480
- /* @__PURE__ */ e.jsx(ke, { className: "w-4 h-4 flex-shrink-0" }),
479
+ /* @__PURE__ */ e.jsx(fe, { className: "w-4 h-4 flex-shrink-0" }),
481
480
  "Logout"
482
481
  ]
483
482
  }
@@ -488,33 +487,33 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
488
487
  document.body
489
488
  )
490
489
  ] });
491
- }, Ue = ({
490
+ }, He = ({
492
491
  appIcon: t,
493
492
  appName: r,
494
493
  appShortName: n,
495
494
  appTagline: l,
496
- userName: d,
495
+ userName: c,
497
496
  // <-- Taken from props!
498
- userEmail: x,
497
+ userEmail: h,
499
498
  // <-- Taken from props!
500
- userRole: m,
501
- onLogout: h,
499
+ userRole: x,
500
+ onLogout: m,
502
501
  // <-- Added onLogout prop!
503
- navLinks: f = [],
504
- showAccessibility: k = !0,
505
- showUserInfo: _ = !0,
506
- showLanguageSelector: y = !0,
507
- showThemeToggle: E = !0,
508
- showAppIcon: L = !0,
509
- showAppFullName: C = !0,
502
+ navLinks: p = [],
503
+ showAccessibility: N = !0,
504
+ showUserInfo: S = !0,
505
+ showLanguageSelector: R = !0,
506
+ showThemeToggle: y = !0,
507
+ showAppIcon: E = !0,
508
+ showAppFullName: M = !0,
510
509
  showAppTagline: g = !1,
511
- showNavLinks: N = !1,
512
- rightContent: c
510
+ showNavLinks: i = !1,
511
+ rightContent: j
513
512
  }) => {
514
513
  var q;
515
- const z = xe(), [I, V] = O(
514
+ const D = xe(), [T, V] = z(
516
515
  localStorage.getItem("language") || "eng"
517
- ), [M, Y] = O(!1), [U, B] = O(!1), [j, W] = O(16), [i, v] = O(!1), [S, P] = O(!1), [A, b] = O(!1), [$, F] = O(!1), [H, G] = O(!1);
516
+ ), [I, Y] = z(!1), [U, B] = z(!1), [w, W] = z(16), [d, v] = z(!1), [C, A] = z(!1), [O, b] = z(!1), [$, F] = z(!1), [H, G] = z(!1);
518
517
  J(() => {
519
518
  const u = localStorage.getItem("theme") || "light";
520
519
  b(u === "dark"), document.documentElement.classList.toggle("dark", u === "dark");
@@ -523,7 +522,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
523
522
  return window.addEventListener("scroll", u, { passive: !0 }), () => window.removeEventListener("scroll", u);
524
523
  }, []), J(() => {
525
524
  F(!1);
526
- }, [z.pathname]);
525
+ }, [D.pathname]);
527
526
  const s = () => {
528
527
  b((u) => {
529
528
  const Q = !u;
@@ -533,16 +532,16 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
533
532
  V(u), localStorage.setItem("language", u), B(!1);
534
533
  };
535
534
  J(() => {
536
- document.documentElement.style.fontSize = `${j}px`, document.body.style.filter = i ? "grayscale(100%)" : "none", document.body.style.fontFamily = S ? "OpenDyslexic, Arial, sans-serif" : "inherit";
537
- }, [j, i, S]);
535
+ document.documentElement.style.fontSize = `${w}px`, document.body.style.filter = d ? "grayscale(100%)" : "none", document.body.style.fontFamily = C ? "OpenDyslexic, Arial, sans-serif" : "inherit";
536
+ }, [w, d, C]);
538
537
  const o = {
539
538
  eng: { label: "English", disabled: !1 },
540
539
  hin: { label: "Hindi", disabled: !1 }
541
- }, p = () => {
542
- j < 24 && W(j + 2);
543
- }, w = () => {
544
- j > 12 && W(j - 2);
545
- }, D = () => W(16), R = (u) => u === "/" ? z.pathname === "/" : z.pathname.startsWith(u);
540
+ }, f = () => {
541
+ w < 24 && W(w + 2);
542
+ }, k = () => {
543
+ w > 12 && W(w - 2);
544
+ }, P = () => W(16), L = (u) => u === "/" ? D.pathname === "/" : D.pathname.startsWith(u);
546
545
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
547
546
  /* @__PURE__ */ e.jsxs(
548
547
  "nav",
@@ -560,7 +559,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
560
559
  /* @__PURE__ */ e.jsxs("div", { className: "relative z-10 mx-auto px-3 sm:px-5 lg:px-6 py-2 sm:py-0", children: [
561
560
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between h-14 sm:h-20", children: [
562
561
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 sm:gap-4 group flex-shrink-0", children: [
563
- L && t && /* @__PURE__ */ e.jsx("div", { className: "w-8 h-8 sm:w-16 sm:h-16 flex items-center justify-center group-hover:scale-105 transition-transform duration-200", children: /* @__PURE__ */ e.jsx(
562
+ E && t && /* @__PURE__ */ e.jsx("div", { className: "w-8 h-8 sm:w-16 sm:h-16 flex items-center justify-center group-hover:scale-105 transition-transform duration-200", children: /* @__PURE__ */ e.jsx(
564
563
  "img",
565
564
  {
566
565
  src: t,
@@ -572,12 +571,12 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
572
571
  /* @__PURE__ */ e.jsx("span", { className: "font-extrabold text-base sm:text-xl text-slate-900 dark:text-white sm:hidden tracking-tight", children: n || r }),
573
572
  /* @__PURE__ */ e.jsxs("div", { className: "hidden sm:flex flex-col", children: [
574
573
  /* @__PURE__ */ e.jsx("span", { className: "font-extrabold text-slate-900 dark:text-white tracking-tight text-lg lg:hidden", children: n || r }),
575
- C && /* @__PURE__ */ e.jsx("span", { className: "font-extrabold text-slate-900 dark:text-white tracking-tight hidden lg:block text-[17px] xl:text-lg leading-tight max-w-md", children: r }),
574
+ M && /* @__PURE__ */ e.jsx("span", { className: "font-extrabold text-slate-900 dark:text-white tracking-tight hidden lg:block text-[17px] xl:text-lg leading-tight max-w-md", children: r }),
576
575
  g && l && /* @__PURE__ */ e.jsx("span", { className: "mt-0.5 text-[10px] font-semibold tracking-[0.2em] text-violet-600 dark:text-violet-400 uppercase", children: l })
577
576
  ] })
578
577
  ] })
579
578
  ] }),
580
- N && f.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "hidden md:flex items-center gap-2", children: f.map((u) => {
579
+ i && p.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "hidden md:flex items-center gap-2", children: p.map((u) => {
581
580
  var Z;
582
581
  return u != null && u.to ? ((Z = u == null ? void 0 : u.to) == null ? void 0 : Z.startsWith("http")) ? /* @__PURE__ */ e.jsx(
583
582
  "a",
@@ -595,18 +594,18 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
595
594
  to: u.to,
596
595
  target: u.target || "_self",
597
596
  rel: u.target === "_blank" ? "noopener noreferrer" : void 0,
598
- className: `relative px-4 lg:px-5 py-2.5 rounded-xl text-sm font-semibold tracking-wide transition-all duration-200 ${R(u.to) ? "text-violet-700 dark:text-violet-400 bg-violet-50 dark:bg-violet-600/10 shadow-sm" : "text-slate-600 dark:text-slate-300 hover:text-violet-700 dark:hover:text-violet-400 hover:bg-violet-50/80 dark:hover:bg-slate-700/50"}`,
597
+ className: `relative px-4 lg:px-5 py-2.5 rounded-xl text-sm font-semibold tracking-wide transition-all duration-200 ${L(u.to) ? "text-violet-700 dark:text-violet-400 bg-violet-50 dark:bg-violet-600/10 shadow-sm" : "text-slate-600 dark:text-slate-300 hover:text-violet-700 dark:hover:text-violet-400 hover:bg-violet-50/80 dark:hover:bg-slate-700/50"}`,
599
598
  children: [
600
599
  u.label,
601
- R(u.to) && /* @__PURE__ */ e.jsx("span", { className: "absolute bottom-1 left-1/2 -translate-x-1/2 w-4 h-0.5 rounded-full bg-gradient-to-r from-violet-600 to-indigo-600" })
600
+ L(u.to) && /* @__PURE__ */ e.jsx("span", { className: "absolute bottom-1 left-1/2 -translate-x-1/2 w-4 h-0.5 rounded-full bg-gradient-to-r from-violet-600 to-indigo-600" })
602
601
  ]
603
602
  },
604
603
  u.to
605
604
  ) : null;
606
605
  }) }),
607
606
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1.5 sm:gap-2", children: [
608
- c && /* @__PURE__ */ e.jsx("div", { className: "flex items-center", children: c }),
609
- k && /* @__PURE__ */ e.jsx(
607
+ j && /* @__PURE__ */ e.jsx("div", { className: "flex items-center", children: j }),
608
+ N && /* @__PURE__ */ e.jsx(
610
609
  "button",
611
610
  {
612
611
  onClick: () => Y(!0),
@@ -615,28 +614,28 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
615
614
  children: /* @__PURE__ */ e.jsx("svg", { className: "w-4 h-4 sm:w-[18px] sm:h-[18px]", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4" }) })
616
615
  }
617
616
  ),
618
- E && /* @__PURE__ */ e.jsx(
617
+ y && /* @__PURE__ */ e.jsx(
619
618
  "button",
620
619
  {
621
620
  onClick: s,
622
621
  "aria-label": "Toggle theme",
623
- title: A ? "Switch to Light Mode" : "Switch to Dark Mode",
622
+ title: O ? "Switch to Light Mode" : "Switch to Dark Mode",
624
623
  className: "p-2 sm:p-2.5 rounded-xl transition-all duration-200 bg-white hover:bg-slate-50 text-slate-700 border border-slate-200 shadow-sm dark:bg-slate-700/50 dark:hover:bg-slate-700 dark:text-yellow-400 dark:border-slate-600/50 hover:scale-105 active:scale-95",
625
- children: A ? /* @__PURE__ */ e.jsx("svg", { className: "w-4 h-4 sm:w-[18px] sm:h-[18px]", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ e.jsx("path", { fillRule: "evenodd", d: "M10 2a1 1 0 011 1v1a1 1 0 11-2 0V3a1 1 0 011-1zm4 8a4 4 0 11-8 0 4 4 0 018 0zm-.464 4.95l.707.707a1 1 0 001.414-1.414l-.707-.707a1 1 0 00-1.414 1.414zm2.12-10.607a1 1 0 010 1.414l-.706.707a1 1 0 11-1.414-1.414l.707-.707a1 1 0 011.414 0zM17 11a1 1 0 100-2h-1a1 1 0 100 2h1zm-7 4a1 1 0 011 1v1a1 1 0 11-2 0v-1a1 1 0 011-1zM5.05 6.464A1 1 0 106.465 5.05l-.708-.707a1 1 0 00-1.414 1.414l.707.707zm1.414 8.486l-.707.707a1 1 0 01-1.414-1.414l.707-.707a1 1 0 011.414 1.414zM4 11a1 1 0 100-2H3a1 1 0 000 2h1z", clipRule: "evenodd" }) }) : /* @__PURE__ */ e.jsx("svg", { className: "w-4 h-4 sm:w-[18px] sm:h-[18px]", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ e.jsx("path", { d: "M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z" }) })
624
+ children: O ? /* @__PURE__ */ e.jsx("svg", { className: "w-4 h-4 sm:w-[18px] sm:h-[18px]", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ e.jsx("path", { fillRule: "evenodd", d: "M10 2a1 1 0 011 1v1a1 1 0 11-2 0V3a1 1 0 011-1zm4 8a4 4 0 11-8 0 4 4 0 018 0zm-.464 4.95l.707.707a1 1 0 001.414-1.414l-.707-.707a1 1 0 00-1.414 1.414zm2.12-10.607a1 1 0 010 1.414l-.706.707a1 1 0 11-1.414-1.414l.707-.707a1 1 0 011.414 0zM17 11a1 1 0 100-2h-1a1 1 0 100 2h1zm-7 4a1 1 0 011 1v1a1 1 0 11-2 0v-1a1 1 0 011-1zM5.05 6.464A1 1 0 106.465 5.05l-.708-.707a1 1 0 00-1.414 1.414l.707.707zm1.414 8.486l-.707.707a1 1 0 01-1.414-1.414l.707-.707a1 1 0 011.414 1.414zM4 11a1 1 0 100-2H3a1 1 0 000 2h1z", clipRule: "evenodd" }) }) : /* @__PURE__ */ e.jsx("svg", { className: "w-4 h-4 sm:w-[18px] sm:h-[18px]", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ e.jsx("path", { d: "M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z" }) })
626
625
  }
627
626
  ),
628
- y && /* @__PURE__ */ e.jsxs(
627
+ R && /* @__PURE__ */ e.jsxs(
629
628
  "button",
630
629
  {
631
630
  onClick: () => B(!0),
632
631
  className: "hidden sm:flex items-center gap-2 px-4 py-2.5 rounded-xl bg-white hover:bg-slate-50 text-slate-700 border border-slate-200 shadow-sm dark:bg-slate-700/50 dark:hover:bg-slate-700 dark:text-slate-300 dark:border-slate-600/50 hover:scale-105 active:scale-95 transition-all duration-200",
633
632
  children: [
634
633
  /* @__PURE__ */ e.jsx("svg", { className: "w-[18px] h-[18px]", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 2a10 10 0 100 20 10 10 0 000-20zm0 0c2.5 2.5 4 6 4 10s-1.5 7.5-4 10m0-20C9.5 4.5 8 8 8 12s1.5 7.5 4 10m-9-10h18" }) }),
635
- /* @__PURE__ */ e.jsx("span", { className: "text-sm font-medium", children: (q = o[I]) == null ? void 0 : q.label })
634
+ /* @__PURE__ */ e.jsx("span", { className: "text-sm font-medium", children: (q = o[T]) == null ? void 0 : q.label })
636
635
  ]
637
636
  }
638
637
  ),
639
- y && /* @__PURE__ */ e.jsx(
638
+ R && /* @__PURE__ */ e.jsx(
640
639
  "button",
641
640
  {
642
641
  onClick: () => B(!0),
@@ -644,15 +643,15 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
644
643
  children: /* @__PURE__ */ e.jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 2a10 10 0 100 20 10 10 0 000-20zm0 0c2.5 2.5 4 6 4 10s-1.5 7.5-4 10m0-20C9.5 4.5 8 8 8 12s1.5 7.5 4 10m-9-10h18" }) })
645
644
  }
646
645
  ),
647
- _ && /* @__PURE__ */ e.jsx(
648
- Pe,
646
+ S && /* @__PURE__ */ e.jsx(
647
+ Ae,
649
648
  {
650
- user: { name: d, email: x },
651
- onLogout: h,
649
+ user: { name: c, email: h },
650
+ onLogout: m,
652
651
  showEmail: !0
653
652
  }
654
653
  ),
655
- N && f.length > 0 && /* @__PURE__ */ e.jsx(
654
+ i && p.length > 0 && /* @__PURE__ */ e.jsx(
656
655
  "button",
657
656
  {
658
657
  onClick: () => F((u) => !u),
@@ -663,7 +662,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
663
662
  )
664
663
  ] })
665
664
  ] }),
666
- N && $ && f.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "md:hidden border-t border-slate-200 dark:border-slate-700 pb-3 animate-in slide-in-from-top-2 duration-200", children: /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-0.5 pt-2", children: f.map((u) => {
665
+ i && $ && p.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "md:hidden border-t border-slate-200 dark:border-slate-700 pb-3 animate-in slide-in-from-top-2 duration-200", children: /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-0.5 pt-2", children: p.map((u) => {
667
666
  var Z;
668
667
  return u != null && u.to ? ((Z = u == null ? void 0 : u.to) == null ? void 0 : Z.startsWith("http")) ? /* @__PURE__ */ e.jsx(
669
668
  "a",
@@ -681,10 +680,10 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
681
680
  to: u.to,
682
681
  target: u.target || "_self",
683
682
  rel: u.target === "_blank" ? "noopener noreferrer" : void 0,
684
- className: `flex items-center justify-between px-3 py-2.5 rounded-xl text-sm font-semibold transition-all duration-200 ${R(u.to) ? "bg-violet-50 dark:bg-violet-600/10 text-violet-700 dark:text-violet-400" : "text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-700/50"}`,
683
+ className: `flex items-center justify-between px-3 py-2.5 rounded-xl text-sm font-semibold transition-all duration-200 ${L(u.to) ? "bg-violet-50 dark:bg-violet-600/10 text-violet-700 dark:text-violet-400" : "text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-700/50"}`,
685
684
  children: [
686
685
  u.label,
687
- R(u.to) && /* @__PURE__ */ e.jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-gradient-to-r from-violet-600 to-indigo-600" })
686
+ L(u.to) && /* @__PURE__ */ e.jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-gradient-to-r from-violet-600 to-indigo-600" })
688
687
  ]
689
688
  },
690
689
  u.to
@@ -694,7 +693,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
694
693
  ]
695
694
  }
696
695
  ),
697
- M && /* Accessibility Modal (unchanged) */
696
+ I && /* Accessibility Modal (unchanged) */
698
697
  /* @__PURE__ */ e.jsx("div", { className: "overflow-hidden overflow-x-hidden fixed top-0 right-0 left-0 z-50 flex justify-center items-center w-full h-full bg-gray-800 bg-opacity-50", children: /* @__PURE__ */ e.jsx("div", { className: "relative p-4 w-full max-w-md", children: /* @__PURE__ */ e.jsxs("div", { className: "relative rounded-2xl shadow-2xl bg-white border border-slate-200 dark:bg-gradient-to-br dark:from-slate-800 dark:to-slate-900 dark:border dark:border-slate-700", children: [
699
698
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between p-5 border-b rounded-t-2xl border-slate-200 dark:border-slate-700 bg-gradient-to-r from-slate-50 to-violet-50/30 dark:bg-gradient-to-r dark:from-slate-800 dark:to-slate-900", children: [
700
699
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-3", children: [
@@ -708,25 +707,25 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
708
707
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
709
708
  /* @__PURE__ */ e.jsx("span", { className: "text-sm font-semibold text-slate-700 dark:text-slate-300", children: "Font Size" }),
710
709
  /* @__PURE__ */ e.jsxs("span", { className: "text-sm font-medium px-3 py-1 rounded-lg bg-violet-100 text-violet-700 border border-violet-200 dark:bg-violet-600/20 dark:text-violet-400 dark:border dark:border-violet-500/30", children: [
711
- j,
710
+ w,
712
711
  "px"
713
712
  ] })
714
713
  ] }),
715
714
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
716
- /* @__PURE__ */ e.jsx("button", { onClick: w, className: "flex-1 py-3 px-4 rounded-xl font-semibold transition-all duration-200 bg-slate-100 hover:bg-slate-200 text-slate-700 border border-slate-200 dark:bg-slate-700 dark:hover:bg-slate-600 dark:text-slate-300 dark:border dark:border-slate-600", children: "A-" }),
717
- /* @__PURE__ */ e.jsx("button", { onClick: D, className: "flex-1 py-3 px-4 rounded-xl font-semibold transition-all duration-200 bg-slate-100 hover:bg-slate-200 text-slate-700 border border-slate-200 dark:bg-slate-700 dark:hover:bg-slate-600 dark:text-slate-300 dark:border dark:border-slate-600", children: "A" }),
718
- /* @__PURE__ */ e.jsx("button", { onClick: p, className: "flex-1 py-3 px-4 rounded-xl font-semibold transition-all duration-200 bg-slate-100 hover:bg-slate-200 text-slate-700 border border-slate-200 dark:bg-slate-700 dark:hover:bg-slate-600 dark:text-slate-300 dark:border dark:border-slate-600", children: "A+" })
715
+ /* @__PURE__ */ e.jsx("button", { onClick: k, className: "flex-1 py-3 px-4 rounded-xl font-semibold transition-all duration-200 bg-slate-100 hover:bg-slate-200 text-slate-700 border border-slate-200 dark:bg-slate-700 dark:hover:bg-slate-600 dark:text-slate-300 dark:border dark:border-slate-600", children: "A-" }),
716
+ /* @__PURE__ */ e.jsx("button", { onClick: P, className: "flex-1 py-3 px-4 rounded-xl font-semibold transition-all duration-200 bg-slate-100 hover:bg-slate-200 text-slate-700 border border-slate-200 dark:bg-slate-700 dark:hover:bg-slate-600 dark:text-slate-300 dark:border dark:border-slate-600", children: "A" }),
717
+ /* @__PURE__ */ e.jsx("button", { onClick: f, className: "flex-1 py-3 px-4 rounded-xl font-semibold transition-all duration-200 bg-slate-100 hover:bg-slate-200 text-slate-700 border border-slate-200 dark:bg-slate-700 dark:hover:bg-slate-600 dark:text-slate-300 dark:border dark:border-slate-600", children: "A+" })
719
718
  ] })
720
719
  ] }),
721
720
  /* @__PURE__ */ e.jsx("div", { className: "border-t border-slate-200 dark:border-slate-700" }),
722
721
  /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between items-center", children: [
723
722
  /* @__PURE__ */ e.jsx("label", { className: "text-sm font-semibold text-slate-700 dark:text-slate-300", children: "Grayscale Mode" }),
724
- /* @__PURE__ */ e.jsx("button", { onClick: () => v(!i), className: `relative inline-flex h-7 w-12 items-center rounded-full transition-colors ${i ? "bg-gradient-to-r from-violet-600 to-indigo-600" : "bg-slate-300 dark:bg-slate-700"}`, children: /* @__PURE__ */ e.jsx("span", { className: `inline-block h-5 w-5 transform rounded-full bg-white shadow-lg transition-transform ${i ? "translate-x-6" : "translate-x-1"}` }) })
723
+ /* @__PURE__ */ e.jsx("button", { onClick: () => v(!d), className: `relative inline-flex h-7 w-12 items-center rounded-full transition-colors ${d ? "bg-gradient-to-r from-violet-600 to-indigo-600" : "bg-slate-300 dark:bg-slate-700"}`, children: /* @__PURE__ */ e.jsx("span", { className: `inline-block h-5 w-5 transform rounded-full bg-white shadow-lg transition-transform ${d ? "translate-x-6" : "translate-x-1"}` }) })
725
724
  ] }),
726
725
  /* @__PURE__ */ e.jsx("div", { className: "border-t border-slate-200 dark:border-slate-700" }),
727
726
  /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between items-center", children: [
728
727
  /* @__PURE__ */ e.jsx("label", { className: "text-sm font-semibold text-slate-700 dark:text-slate-300", children: "Dyslexia-Friendly Font" }),
729
- /* @__PURE__ */ e.jsx("button", { onClick: () => P(!S), className: `relative inline-flex h-7 w-12 items-center rounded-full transition-colors ${S ? "bg-gradient-to-r from-violet-600 to-indigo-600" : "bg-slate-300 dark:bg-slate-700"}`, children: /* @__PURE__ */ e.jsx("span", { className: `inline-block h-5 w-5 transform rounded-full bg-white shadow-lg transition-transform ${S ? "translate-x-6" : "translate-x-1"}` }) })
728
+ /* @__PURE__ */ e.jsx("button", { onClick: () => A(!C), className: `relative inline-flex h-7 w-12 items-center rounded-full transition-colors ${C ? "bg-gradient-to-r from-violet-600 to-indigo-600" : "bg-slate-300 dark:bg-slate-700"}`, children: /* @__PURE__ */ e.jsx("span", { className: `inline-block h-5 w-5 transform rounded-full bg-white shadow-lg transition-transform ${C ? "translate-x-6" : "translate-x-1"}` }) })
730
729
  ] })
731
730
  ] }),
732
731
  /* @__PURE__ */ e.jsx("div", { className: "flex p-5 border-t rounded-b border-slate-200 dark:border-slate-700", children: /* @__PURE__ */ e.jsx("button", { onClick: () => Y(!1), className: "w-full py-3 px-5 text-sm font-semibold text-white bg-gradient-to-r from-violet-600 to-indigo-600 hover:from-violet-700 hover:to-indigo-700 rounded-xl shadow-lg transition-all duration-200", children: "Close" }) })
@@ -740,77 +739,77 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
740
739
  ] }),
741
740
  /* @__PURE__ */ e.jsx("button", { onClick: () => B(!1), className: "p-2 rounded-lg transition-colors text-slate-400 hover:bg-slate-100 hover:text-slate-900 dark:hover:bg-slate-700 dark:hover:text-white", children: /* @__PURE__ */ e.jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) })
742
741
  ] }),
743
- /* @__PURE__ */ e.jsx("div", { className: "p-5", children: /* @__PURE__ */ e.jsx("ul", { className: "space-y-3", children: Object.keys(o).map((u) => /* @__PURE__ */ e.jsx("li", { children: /* @__PURE__ */ e.jsx("button", { onClick: () => a(u), disabled: o[u].disabled, className: `w-full px-5 py-4 rounded-xl text-left font-semibold transition-all duration-200 ${u === I ? "bg-gradient-to-r from-violet-600 to-indigo-600 text-white shadow-lg" : "bg-slate-50 hover:bg-slate-100 text-slate-700 border border-slate-200 dark:bg-slate-700/50 dark:hover:bg-slate-700 dark:text-slate-300 dark:border dark:border-slate-600"} ${o[u].disabled ? "opacity-50 cursor-not-allowed" : "hover:scale-[1.02]"}`, children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
742
+ /* @__PURE__ */ e.jsx("div", { className: "p-5", children: /* @__PURE__ */ e.jsx("ul", { className: "space-y-3", children: Object.keys(o).map((u) => /* @__PURE__ */ e.jsx("li", { children: /* @__PURE__ */ e.jsx("button", { onClick: () => a(u), disabled: o[u].disabled, className: `w-full px-5 py-4 rounded-xl text-left font-semibold transition-all duration-200 ${u === T ? "bg-gradient-to-r from-violet-600 to-indigo-600 text-white shadow-lg" : "bg-slate-50 hover:bg-slate-100 text-slate-700 border border-slate-200 dark:bg-slate-700/50 dark:hover:bg-slate-700 dark:text-slate-300 dark:border dark:border-slate-600"} ${o[u].disabled ? "opacity-50 cursor-not-allowed" : "hover:scale-[1.02]"}`, children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
744
743
  /* @__PURE__ */ e.jsx("span", { children: o[u].label }),
745
- u === I && /* @__PURE__ */ e.jsx("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ e.jsx("path", { fillRule: "evenodd", d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z", clipRule: "evenodd" }) })
744
+ u === T && /* @__PURE__ */ e.jsx("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ e.jsx("path", { fillRule: "evenodd", d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z", clipRule: "evenodd" }) })
746
745
  ] }) }) }, u)) }) }),
747
746
  /* @__PURE__ */ e.jsx("div", { className: "flex p-5 border-t rounded-b border-slate-200 dark:border-slate-700", children: /* @__PURE__ */ e.jsx("button", { onClick: () => B(!1), className: "w-full py-3 px-5 text-sm font-semibold text-white bg-gradient-to-r from-violet-600 to-indigo-600 hover:from-violet-700 hover:to-indigo-700 rounded-xl shadow-lg transition-all duration-200", children: "Close" }) })
748
747
  ] }) }) })
749
748
  ] });
750
749
  }, ge = (t, r) => {
751
- const n = {}, l = (d) => {
752
- for (const x of d)
753
- if (x.subItems) {
754
- const m = x.subItems.some(
755
- (h) => h.path && r.startsWith(h.path)
750
+ const n = {}, l = (c) => {
751
+ for (const h of c)
752
+ if (h.subItems) {
753
+ const x = h.subItems.some(
754
+ (m) => m.path && r.startsWith(m.path)
756
755
  );
757
- l(x.subItems), m && (n[x.name] = !0);
756
+ l(h.subItems), x && (n[h.name] = !0);
758
757
  }
759
758
  };
760
759
  return l(t), n;
761
- }, qe = ({ menuItems: t, user: r, onLogout: n, onNavigate: l }) => {
762
- const { t: d } = pe("pages-product-page"), [x, m] = O(!1), h = K(null), f = xe(), [k, _] = O(
763
- () => ge(t, f.pathname)
764
- ), y = (c) => _((z) => ({ ...z, [c]: !z[c] })), E = (c) => f.pathname === c;
760
+ }, Ye = ({ menuItems: t, user: r, onLogout: n, onNavigate: l }) => {
761
+ const [c, h] = z(!1), x = K(null), m = xe(), [p, N] = z(
762
+ () => ge(t, m.pathname)
763
+ ), S = (i) => N((j) => ({ ...j, [i]: !j[i] })), R = (i) => m.pathname === i;
765
764
  J(() => {
766
- _((c) => ({
767
- ...c,
768
- ...ge(t, f.pathname)
765
+ N((i) => ({
766
+ ...i,
767
+ ...ge(t, m.pathname)
769
768
  }));
770
- }, [f.pathname, t]), J(() => {
771
- const c = (z) => {
772
- h.current && !h.current.contains(z.target) && m(!1);
769
+ }, [m.pathname, t]), J(() => {
770
+ const i = (j) => {
771
+ x.current && !x.current.contains(j.target) && h(!1);
773
772
  };
774
- return x && document.addEventListener("mousedown", c), () => document.removeEventListener("mousedown", c);
775
- }, [x]);
776
- const L = "bg-violet-100 text-violet-700 dark:bg-violet-600/20 dark:text-violet-400", C = "bg-violet-600 dark:bg-violet-400", g = "bg-slate-300 group-hover:bg-violet-400 dark:bg-slate-600 dark:group-hover:bg-slate-500", N = ({ item: c, depth: z = 0 }) => {
777
- const I = !!c.path, V = E(c.path);
778
- return z === 0 ? /* @__PURE__ */ e.jsx("div", { children: I ? /* @__PURE__ */ e.jsx(ne, { to: c.path, onClick: () => l == null ? void 0 : l(), children: /* @__PURE__ */ e.jsxs("div", { className: `
773
+ return c && document.addEventListener("mousedown", i), () => document.removeEventListener("mousedown", i);
774
+ }, [c]);
775
+ const y = "bg-violet-100 text-violet-700 dark:bg-violet-600/20 dark:text-violet-400", E = "bg-violet-600 dark:bg-violet-400", M = "bg-slate-300 group-hover:bg-violet-400 dark:bg-slate-600 dark:group-hover:bg-slate-500", g = ({ item: i, depth: j = 0 }) => {
776
+ const D = !!i.path, T = R(i.path);
777
+ return j === 0 ? /* @__PURE__ */ e.jsx("div", { children: D ? /* @__PURE__ */ e.jsx(ne, { to: i.path, onClick: () => l == null ? void 0 : l(), children: /* @__PURE__ */ e.jsxs("div", { className: `
779
778
  flex items-center gap-2.5
780
779
  px-3 py-2 rounded-xl cursor-pointer
781
780
  transition-all duration-150 group
782
- ${V ? "bg-gradient-to-r from-violet-600 to-indigo-600 text-white shadow-sm shadow-violet-500/20" : "text-slate-600 hover:bg-slate-100/80 hover:text-slate-900 dark:text-slate-400 dark:hover:bg-slate-700/50 dark:hover:text-white"}
781
+ ${T ? "bg-gradient-to-r from-violet-600 to-indigo-600 text-white shadow-sm shadow-violet-500/20" : "text-slate-600 hover:bg-slate-100/80 hover:text-slate-900 dark:text-slate-400 dark:hover:bg-slate-700/50 dark:hover:text-white"}
783
782
  `, children: [
784
783
  /* @__PURE__ */ e.jsx("div", { className: `
785
784
  w-6 h-6 rounded-lg flex items-center justify-center flex-shrink-0
786
- ${V ? "bg-white/20" : "bg-slate-100 group-hover:bg-slate-200 dark:bg-slate-700/60 dark:group-hover:bg-slate-700"}
787
- `, children: /* @__PURE__ */ e.jsx(c.icon, { className: `w-3.5 h-3.5 ${V ? "text-white" : "text-slate-500 dark:text-slate-400"}` }) }),
788
- /* @__PURE__ */ e.jsx("span", { className: "text-sm font-medium leading-none", children: d(c.name) })
785
+ ${T ? "bg-white/20" : "bg-slate-100 group-hover:bg-slate-200 dark:bg-slate-700/60 dark:group-hover:bg-slate-700"}
786
+ `, children: /* @__PURE__ */ e.jsx(i.icon, { className: `w-3.5 h-3.5 ${T ? "text-white" : "text-slate-500 dark:text-slate-400"}` }) }),
787
+ /* @__PURE__ */ e.jsx("span", { className: "text-sm font-medium leading-none", children: i.name })
789
788
  ] }) }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
790
789
  /* @__PURE__ */ e.jsxs(
791
790
  "div",
792
791
  {
793
- onClick: () => y(c.name),
792
+ onClick: () => S(i.name),
794
793
  className: `
795
794
  flex items-center justify-between
796
795
  px-3 py-2 rounded-xl cursor-pointer
797
796
  transition-all duration-150 group
798
- ${k[c.name] ? "bg-slate-100/80 text-slate-900 dark:bg-slate-700/40 dark:text-white" : "text-slate-600 hover:bg-slate-100/80 hover:text-slate-900 dark:text-slate-400 dark:hover:bg-slate-700/50 dark:hover:text-white"}
797
+ ${p[i.name] ? "bg-slate-100/80 text-slate-900 dark:bg-slate-700/40 dark:text-white" : "text-slate-600 hover:bg-slate-100/80 hover:text-slate-900 dark:text-slate-400 dark:hover:bg-slate-700/50 dark:hover:text-white"}
799
798
  `,
800
799
  children: [
801
800
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2.5", children: [
802
801
  /* @__PURE__ */ e.jsx("div", { className: `
803
802
  w-6 h-6 rounded-lg flex items-center justify-center flex-shrink-0
804
- ${k[c.name] ? "bg-violet-100 dark:bg-violet-600/20" : "bg-slate-100 group-hover:bg-slate-200 dark:bg-slate-700/60 dark:group-hover:bg-slate-700"}
805
- `, children: /* @__PURE__ */ e.jsx(c.icon, { className: `w-3.5 h-3.5 ${k[c.name] ? "text-violet-600 dark:text-violet-400" : "text-slate-500 dark:text-slate-400"}` }) }),
806
- /* @__PURE__ */ e.jsx("span", { className: "text-sm font-semibold leading-none", children: d(c.name) })
803
+ ${p[i.name] ? "bg-violet-100 dark:bg-violet-600/20" : "bg-slate-100 group-hover:bg-slate-200 dark:bg-slate-700/60 dark:group-hover:bg-slate-700"}
804
+ `, children: /* @__PURE__ */ e.jsx(i.icon, { className: `w-3.5 h-3.5 ${p[i.name] ? "text-violet-600 dark:text-violet-400" : "text-slate-500 dark:text-slate-400"}` }) }),
805
+ /* @__PURE__ */ e.jsx("span", { className: "text-sm font-semibold leading-none", children: i.name })
807
806
  ] }),
808
807
  /* @__PURE__ */ e.jsx(
809
808
  "svg",
810
809
  {
811
810
  className: `w-3 h-3 flex-shrink-0 transition-transform duration-200
812
811
  text-slate-400 dark:text-slate-500
813
- ${k[c.name] ? "rotate-90" : ""}`,
812
+ ${p[i.name] ? "rotate-90" : ""}`,
814
813
  fill: "none",
815
814
  stroke: "currentColor",
816
815
  viewBox: "0 0 24 24",
@@ -820,39 +819,39 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
820
819
  ]
821
820
  }
822
821
  ),
823
- c.subItems && k[c.name] && /* @__PURE__ */ e.jsx("div", { className: "mt-0.5 ml-3.5 pl-3 space-y-0.5 border-l border-slate-200/70 dark:border-slate-700/70", children: c.subItems.map((M) => /* @__PURE__ */ e.jsx(N, { item: M, depth: 1 }, M.name)) })
824
- ] }) }) : /* @__PURE__ */ e.jsx("div", { children: I ? /* @__PURE__ */ e.jsx(ne, { to: c.path, onClick: () => l == null ? void 0 : l(), children: /* @__PURE__ */ e.jsxs("div", { className: `
822
+ i.subItems && p[i.name] && /* @__PURE__ */ e.jsx("div", { className: "mt-0.5 ml-3.5 pl-3 space-y-0.5 border-l border-slate-200/70 dark:border-slate-700/70", children: i.subItems.map((V) => /* @__PURE__ */ e.jsx(g, { item: V, depth: 1 }, V.name)) })
823
+ ] }) }) : /* @__PURE__ */ e.jsx("div", { children: D ? /* @__PURE__ */ e.jsx(ne, { to: i.path, onClick: () => l == null ? void 0 : l(), children: /* @__PURE__ */ e.jsxs("div", { className: `
825
824
  flex items-center gap-2
826
825
  px-2.5 py-1.5 rounded-lg cursor-pointer
827
826
  transition-all duration-150 group
828
- ${V ? L : "text-slate-500 hover:bg-slate-100/70 hover:text-slate-700 dark:text-slate-400 dark:hover:bg-slate-700/30 dark:hover:text-slate-300"}
827
+ ${T ? y : "text-slate-500 hover:bg-slate-100/70 hover:text-slate-700 dark:text-slate-400 dark:hover:bg-slate-700/30 dark:hover:text-slate-300"}
829
828
  `, children: [
830
829
  /* @__PURE__ */ e.jsx("div", { className: `w-1.5 h-1.5 rounded-full flex-shrink-0 transition-all duration-200
831
- ${V ? C : g}` }),
832
- /* @__PURE__ */ e.jsx("span", { className: "text-[13px] font-medium", children: d(c.name) })
830
+ ${T ? E : M}` }),
831
+ /* @__PURE__ */ e.jsx("span", { className: "text-[13px] font-medium", children: i.name })
833
832
  ] }) }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
834
833
  /* @__PURE__ */ e.jsxs(
835
834
  "div",
836
835
  {
837
- onClick: () => y(c.name),
836
+ onClick: () => S(i.name),
838
837
  className: `
839
838
  flex items-center justify-between
840
839
  px-2.5 py-1.5 rounded-lg cursor-pointer
841
840
  transition-all duration-150 group
842
- ${k[c.name] ? "bg-slate-100/70 text-slate-700 dark:bg-slate-700/30 dark:text-slate-300" : "text-slate-500 hover:bg-slate-100/70 hover:text-slate-700 dark:text-slate-400 dark:hover:bg-slate-700/30 dark:hover:text-slate-300"}
841
+ ${p[i.name] ? "bg-slate-100/70 text-slate-700 dark:bg-slate-700/30 dark:text-slate-300" : "text-slate-500 hover:bg-slate-100/70 hover:text-slate-700 dark:text-slate-400 dark:hover:bg-slate-700/30 dark:hover:text-slate-300"}
843
842
  `,
844
843
  children: [
845
844
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
846
845
  /* @__PURE__ */ e.jsx("div", { className: `w-1.5 h-1.5 rounded-full flex-shrink-0 transition-all duration-200
847
- ${k[c.name] ? C : g}` }),
848
- /* @__PURE__ */ e.jsx("span", { className: "text-[13px] font-medium", children: d(c.name) })
846
+ ${p[i.name] ? E : M}` }),
847
+ /* @__PURE__ */ e.jsx("span", { className: "text-[13px] font-medium", children: i.name })
849
848
  ] }),
850
849
  /* @__PURE__ */ e.jsx(
851
850
  "svg",
852
851
  {
853
852
  className: `w-3 h-3 flex-shrink-0 transition-transform duration-200
854
853
  text-slate-400 dark:text-slate-500
855
- ${k[c.name] ? "rotate-90" : ""}`,
854
+ ${p[i.name] ? "rotate-90" : ""}`,
856
855
  fill: "none",
857
856
  stroke: "currentColor",
858
857
  viewBox: "0 0 24 24",
@@ -862,7 +861,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
862
861
  ]
863
862
  }
864
863
  ),
865
- c.subItems && k[c.name] && /* @__PURE__ */ e.jsx("div", { className: "mt-0.5 ml-3 pl-2.5 space-y-0.5 border-l border-slate-200/70 dark:border-slate-700/70", children: c.subItems.map((M) => /* @__PURE__ */ e.jsx(N, { item: M, depth: z + 1 }, M.name)) })
864
+ i.subItems && p[i.name] && /* @__PURE__ */ e.jsx("div", { className: "mt-0.5 ml-3 pl-2.5 space-y-0.5 border-l border-slate-200/70 dark:border-slate-700/70", children: i.subItems.map((V) => /* @__PURE__ */ e.jsx(g, { item: V, depth: j + 1 }, V.name)) })
866
865
  ] }) });
867
866
  };
868
867
  return /* @__PURE__ */ e.jsxs("div", { className: "h-full w-full flex pl-2.5 sm:pl-3.5 max-sm:pr-2.5 sm:max-sm:pr-3.5", children: [
@@ -898,16 +897,16 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
898
897
  {
899
898
  className: "flex-1 overflow-y-auto space-y-0.5 custom-scrollbar",
900
899
  "aria-label": "Main navigation",
901
- children: t.map((c) => /* @__PURE__ */ e.jsx(N, { item: c, depth: 0 }, c.name))
900
+ children: t.map((i) => /* @__PURE__ */ e.jsx(g, { item: i, depth: 0 }, i.name))
902
901
  }
903
902
  ),
904
903
  r && /* @__PURE__ */ e.jsxs(
905
904
  "div",
906
905
  {
907
- ref: h,
906
+ ref: x,
908
907
  className: "flex-shrink-0 mt-2.5 sm:mt-3.5 pt-2.5 sm:pt-3.5 border-t border-slate-200/80 dark:border-slate-700/80",
909
908
  children: [
910
- x && n && /* @__PURE__ */ e.jsx("div", { className: `
909
+ c && n && /* @__PURE__ */ e.jsx("div", { className: `
911
910
  mb-1.5 rounded-xl overflow-hidden
912
911
  bg-white dark:bg-slate-800
913
912
  border border-red-100 dark:border-red-500/20
@@ -917,7 +916,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
917
916
  "button",
918
917
  {
919
918
  onClick: () => {
920
- n(), m(!1);
919
+ n(), h(!1);
921
920
  },
922
921
  className: `
923
922
  w-full flex items-center gap-2.5 px-3 py-2.5
@@ -926,7 +925,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
926
925
  transition-colors duration-150
927
926
  `,
928
927
  children: [
929
- /* @__PURE__ */ e.jsx(ke, { className: "w-3.5 h-3.5 flex-shrink-0" }),
928
+ /* @__PURE__ */ e.jsx(fe, { className: "w-3.5 h-3.5 flex-shrink-0" }),
930
929
  "Sign out"
931
930
  ]
932
931
  }
@@ -934,19 +933,19 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
934
933
  /* @__PURE__ */ e.jsxs(
935
934
  "button",
936
935
  {
937
- onClick: () => m((c) => !c),
936
+ onClick: () => h((i) => !i),
938
937
  className: `
939
938
  w-full flex items-center gap-2.5
940
939
  px-2.5 py-2 rounded-xl border
941
940
  transition-all duration-150
942
- ${x ? "bg-violet-50 border-violet-200/60 dark:bg-violet-900/20 dark:border-violet-700/40" : "bg-slate-50/60 border-slate-200/50 hover:bg-violet-50 hover:border-violet-200/60 dark:bg-slate-800/40 dark:border-slate-700/50 dark:hover:bg-violet-900/20 dark:hover:border-violet-700/40"}
941
+ ${c ? "bg-violet-50 border-violet-200/60 dark:bg-violet-900/20 dark:border-violet-700/40" : "bg-slate-50/60 border-slate-200/50 hover:bg-violet-50 hover:border-violet-200/60 dark:bg-slate-800/40 dark:border-slate-700/50 dark:hover:bg-violet-900/20 dark:hover:border-violet-700/40"}
943
942
  `,
944
943
  children: [
945
944
  /* @__PURE__ */ e.jsx("div", { className: `
946
945
  w-7 h-7 rounded-lg flex-shrink-0
947
946
  bg-gradient-to-br from-violet-600 to-indigo-600
948
947
  flex items-center justify-center shadow-sm shadow-violet-500/20
949
- `, children: /* @__PURE__ */ e.jsx(fe, { className: "w-3.5 h-3.5 text-white" }) }),
948
+ `, children: /* @__PURE__ */ e.jsx(pe, { className: "w-3.5 h-3.5 text-white" }) }),
950
949
  /* @__PURE__ */ e.jsxs("div", { className: "flex-1 text-left min-w-0", children: [
951
950
  /* @__PURE__ */ e.jsx("p", { className: "text-[13px] font-semibold text-slate-900 dark:text-white truncate leading-none", children: r.username }),
952
951
  /* @__PURE__ */ e.jsx("p", { className: "text-[11px] text-slate-400 dark:text-slate-500 truncate mt-0.5 leading-none", children: r.email })
@@ -954,7 +953,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
954
953
  /* @__PURE__ */ e.jsx(ae, { className: `
955
954
  w-3 h-3 flex-shrink-0 text-slate-400 dark:text-slate-500
956
955
  transition-transform duration-200
957
- ${x ? "rotate-180" : ""}
956
+ ${c ? "rotate-180" : ""}
958
957
  ` })
959
958
  ]
960
959
  }
@@ -971,15 +970,15 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
971
970
  .custom-scrollbar::-webkit-scrollbar-thumb:hover { background: rgb(148 163 184); }
972
971
  ` })
973
972
  ] });
974
- }, Ge = ({
973
+ }, Ue = ({
975
974
  icon: t,
976
975
  title: r,
977
976
  subtitle: n,
978
977
  badge: l,
979
- actions: d,
980
- searchBar: x,
981
- onIconClick: m,
982
- iconTitle: h
978
+ actions: c,
979
+ searchBar: h,
980
+ onIconClick: x,
981
+ iconTitle: m
983
982
  }) => /* @__PURE__ */ e.jsxs(
984
983
  "div",
985
984
  {
@@ -1010,14 +1009,14 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1010
1009
  flex items-center justify-center
1011
1010
  shadow-md shadow-violet-200/40 dark:shadow-violet-900/30
1012
1011
  transition-all duration-200
1013
- ${m ? "cursor-pointer hover:scale-110 hover:shadow-lg active:scale-95" : "hover:scale-105"}
1012
+ ${x ? "cursor-pointer hover:scale-110 hover:shadow-lg active:scale-95" : "hover:scale-105"}
1014
1013
  `,
1015
- onClick: m,
1016
- title: h,
1017
- role: m ? "button" : void 0,
1018
- tabIndex: m ? 0 : void 0,
1019
- onKeyDown: m ? (f) => {
1020
- (f.key === "Enter" || f.key === " ") && (f.preventDefault(), m());
1014
+ onClick: x,
1015
+ title: m,
1016
+ role: x ? "button" : void 0,
1017
+ tabIndex: x ? 0 : void 0,
1018
+ onKeyDown: x ? (p) => {
1019
+ (p.key === "Enter" || p.key === " ") && (p.preventDefault(), x());
1021
1020
  } : void 0,
1022
1021
  children: /* @__PURE__ */ e.jsx(t, { className: "w-[18px] h-[18px] sm:w-5 sm:h-5 text-white" })
1023
1022
  }
@@ -1036,7 +1035,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1036
1035
  ] }),
1037
1036
  n && /* @__PURE__ */ e.jsx("p", { className: "mt-0.5 text-xs text-slate-500 dark:text-slate-400 leading-snug truncate", children: n })
1038
1037
  ] }),
1039
- d && /* @__PURE__ */ e.jsx("div", { className: `
1038
+ c && /* @__PURE__ */ e.jsx("div", { className: `
1040
1039
  flex-shrink-0
1041
1040
  flex items-center gap-1.5
1042
1041
  overflow-x-auto sm:overflow-x-visible
@@ -1046,31 +1045,31 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1046
1045
  sm:max-w-none
1047
1046
  sm:flex-wrap
1048
1047
  [&::-webkit-scrollbar]:hidden
1049
- `, children: d })
1048
+ `, children: c })
1050
1049
  ] }),
1051
- x && /* @__PURE__ */ e.jsx("div", { className: "mt-3 pt-3 border-t border-slate-200/40 dark:border-slate-700/50", children: x })
1050
+ h && /* @__PURE__ */ e.jsx("div", { className: "mt-3 pt-3 border-t border-slate-200/40 dark:border-slate-700/50", children: h })
1052
1051
  ] })
1053
1052
  ]
1054
1053
  }
1055
- ), Je = ({
1054
+ ), qe = ({
1056
1055
  icon: t,
1057
1056
  onClick: r,
1058
1057
  title: n,
1059
1058
  variant: l = "secondary",
1060
- size: d = "md"
1059
+ size: c = "md"
1061
1060
  // sm | md
1062
1061
  }) => {
1063
- const x = {
1062
+ const h = {
1064
1063
  secondary: `bg-white hover:bg-slate-50 text-slate-700 border border-slate-200 shadow-sm
1065
1064
  dark:bg-slate-700/50 dark:hover:bg-slate-700 dark:text-slate-300 dark:border-slate-600/50`,
1066
1065
  danger: `bg-white hover:bg-red-50 text-slate-500 hover:text-red-600 border border-slate-200 shadow-sm
1067
1066
  dark:bg-slate-700/50 dark:hover:bg-red-900/20 dark:text-slate-400 dark:hover:text-red-400 dark:border-slate-600/50`,
1068
1067
  primary: `bg-violet-100 hover:bg-violet-200 text-violet-700 border border-violet-200 shadow-sm
1069
1068
  dark:bg-violet-600/20 dark:hover:bg-violet-600/30 dark:text-violet-400 dark:border-violet-500/30`
1070
- }, m = {
1069
+ }, x = {
1071
1070
  sm: "p-1.5",
1072
1071
  md: "p-2 sm:p-2.5"
1073
- }, h = {
1072
+ }, m = {
1074
1073
  sm: "w-3.5 h-3.5",
1075
1074
  md: "w-4 h-4 sm:w-[18px] sm:h-[18px]"
1076
1075
  };
@@ -1082,62 +1081,62 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1082
1081
  "aria-label": n,
1083
1082
  className: `
1084
1083
  rounded-xl transition-all duration-200
1085
- ${m[d]}
1086
- ${x[l] ?? x.secondary}
1084
+ ${x[c]}
1085
+ ${h[l] ?? h.secondary}
1087
1086
  hover:scale-105 active:scale-95
1088
1087
  `,
1089
- children: /* @__PURE__ */ e.jsx(t, { className: h[d] })
1088
+ children: /* @__PURE__ */ e.jsx(t, { className: m[c] })
1090
1089
  }
1091
1090
  );
1092
- }, Xe = ({
1091
+ }, Ge = ({
1093
1092
  children: t,
1094
1093
  icon: r,
1095
1094
  iconPosition: n = "left",
1096
1095
  disabled: l = !1,
1097
- onClick: d,
1098
- variant: x = "primary",
1099
- loading: m = !1,
1100
- size: h = "md",
1096
+ onClick: c,
1097
+ variant: h = "primary",
1098
+ loading: x = !1,
1099
+ size: m = "md",
1101
1100
  // sm | md | lg
1102
- className: f = "",
1103
- ...k
1101
+ className: p = "",
1102
+ ...N
1104
1103
  }) => {
1105
- const _ = {
1104
+ const S = {
1106
1105
  sm: "px-3 py-1.5 text-xs rounded-lg gap-1.5",
1107
1106
  md: "px-4 py-2 sm:px-5 sm:py-2.5 text-sm rounded-xl gap-2",
1108
1107
  lg: "px-5 py-2.5 sm:px-6 sm:py-3 text-sm sm:text-base rounded-xl gap-2"
1109
- }, y = {
1108
+ }, R = {
1110
1109
  sm: "w-3.5 h-3.5",
1111
1110
  md: "w-4 h-4",
1112
1111
  lg: "w-4 h-4 sm:w-5 sm:h-5"
1113
- }, E = {
1114
- primary: l || m ? "bg-violet-300 text-white cursor-not-allowed opacity-60 dark:bg-violet-800/50" : "bg-gradient-to-r from-violet-600 to-indigo-600 text-white hover:from-violet-700 hover:to-indigo-700 shadow-md hover:shadow-lg hover:scale-105 active:scale-95",
1115
- secondary: l || m ? "bg-gray-200 text-gray-400 cursor-not-allowed opacity-60 dark:bg-gray-700 dark:text-gray-500" : "bg-white text-slate-700 border border-slate-200 hover:bg-slate-50 dark:bg-slate-700/50 dark:text-slate-300 dark:border-slate-600 dark:hover:bg-slate-700 shadow-sm hover:shadow-md hover:scale-105 active:scale-95",
1116
- danger: l || m ? "bg-red-300 text-white cursor-not-allowed opacity-60 dark:bg-red-800/50" : "bg-red-600 text-white hover:bg-red-700 shadow-md hover:shadow-lg hover:scale-105 active:scale-95"
1112
+ }, y = {
1113
+ primary: l || x ? "bg-violet-300 text-white cursor-not-allowed opacity-60 dark:bg-violet-800/50" : "bg-gradient-to-r from-violet-600 to-indigo-600 text-white hover:from-violet-700 hover:to-indigo-700 shadow-md hover:shadow-lg hover:scale-105 active:scale-95",
1114
+ secondary: l || x ? "bg-gray-200 text-gray-400 cursor-not-allowed opacity-60 dark:bg-gray-700 dark:text-gray-500" : "bg-white text-slate-700 border border-slate-200 hover:bg-slate-50 dark:bg-slate-700/50 dark:text-slate-300 dark:border-slate-600 dark:hover:bg-slate-700 shadow-sm hover:shadow-md hover:scale-105 active:scale-95",
1115
+ danger: l || x ? "bg-red-300 text-white cursor-not-allowed opacity-60 dark:bg-red-800/50" : "bg-red-600 text-white hover:bg-red-700 shadow-md hover:shadow-lg hover:scale-105 active:scale-95"
1117
1116
  };
1118
1117
  return /* @__PURE__ */ e.jsxs(
1119
1118
  "button",
1120
1119
  {
1121
- disabled: l || m,
1122
- onClick: l || m ? void 0 : d,
1120
+ disabled: l || x,
1121
+ onClick: l || x ? void 0 : c,
1123
1122
  className: `
1124
1123
  inline-flex items-center justify-center font-semibold whitespace-nowrap
1125
1124
  transition-all duration-200
1126
- ${_[h]}
1127
- ${E[x]}
1128
- ${f}
1125
+ ${S[m]}
1126
+ ${y[h]}
1127
+ ${p}
1129
1128
  `,
1130
- ...k,
1129
+ ...N,
1131
1130
  children: [
1132
- r && n === "left" && !m && /* @__PURE__ */ e.jsx(r, { className: `${y[h]} flex-shrink-0` }),
1133
- m && /* @__PURE__ */ e.jsx("span", { className: `${y[h]} flex-shrink-0 animate-spin rounded-full
1131
+ r && n === "left" && !x && /* @__PURE__ */ e.jsx(r, { className: `${R[m]} flex-shrink-0` }),
1132
+ x && /* @__PURE__ */ e.jsx("span", { className: `${R[m]} flex-shrink-0 animate-spin rounded-full
1134
1133
  border-2 border-white/30 border-t-white` }),
1135
- /* @__PURE__ */ e.jsx("span", { children: m ? "Loading..." : t }),
1136
- r && n === "right" && !m && /* @__PURE__ */ e.jsx(r, { className: `${y[h]} flex-shrink-0` })
1134
+ /* @__PURE__ */ e.jsx("span", { children: x ? "Loading..." : t }),
1135
+ r && n === "right" && !x && /* @__PURE__ */ e.jsx(r, { className: `${R[m]} flex-shrink-0` })
1137
1136
  ]
1138
1137
  }
1139
1138
  );
1140
- }, Qe = ({
1139
+ }, Je = ({
1141
1140
  value: t,
1142
1141
  onChange: r,
1143
1142
  placeholder: n = "Search...",
@@ -1179,59 +1178,59 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1179
1178
  children: /* @__PURE__ */ e.jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
1180
1179
  }
1181
1180
  )
1182
- ] }), Ze = ({
1181
+ ] }), Xe = ({
1183
1182
  columns: t,
1184
1183
  data: r,
1185
1184
  onSort: n,
1186
1185
  sortConfig: l,
1187
- emptyMessage: d = "No data found",
1188
- emptyDescription: x = "Try adjusting your filters or add new data",
1189
- emptyIcon: m
1186
+ emptyMessage: c = "No data found",
1187
+ emptyDescription: h = "Try adjusting your filters or add new data",
1188
+ emptyIcon: x
1190
1189
  }) => r.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "h-full rounded-2xl border bg-white border-slate-200/50 dark:bg-slate-800/50 dark:border-slate-700/50 flex items-center justify-center", children: /* @__PURE__ */ e.jsxs("div", { className: "text-center py-12 px-6", children: [
1191
- /* @__PURE__ */ e.jsx("div", { className: "w-16 h-16 rounded-full bg-slate-100 dark:bg-slate-700 flex items-center justify-center mx-auto mb-4", children: m ? /* @__PURE__ */ e.jsx(m, { className: "w-8 h-8 text-slate-400 dark:text-slate-500" }) : /* @__PURE__ */ e.jsx("svg", { className: "w-8 h-8 text-slate-400 dark:text-slate-500", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4" }) }) }),
1192
- /* @__PURE__ */ e.jsx("h3", { className: "text-lg font-semibold text-slate-900 dark:text-slate-300 mb-2", children: d }),
1193
- /* @__PURE__ */ e.jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400", children: x })
1190
+ /* @__PURE__ */ e.jsx("div", { className: "w-16 h-16 rounded-full bg-slate-100 dark:bg-slate-700 flex items-center justify-center mx-auto mb-4", children: x ? /* @__PURE__ */ e.jsx(x, { className: "w-8 h-8 text-slate-400 dark:text-slate-500" }) : /* @__PURE__ */ e.jsx("svg", { className: "w-8 h-8 text-slate-400 dark:text-slate-500", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4" }) }) }),
1191
+ /* @__PURE__ */ e.jsx("h3", { className: "text-lg font-semibold text-slate-900 dark:text-slate-300 mb-2", children: c }),
1192
+ /* @__PURE__ */ e.jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400", children: h })
1194
1193
  ] }) }) : /* @__PURE__ */ e.jsx("div", { className: "h-full rounded-2xl border bg-white border-slate-200/50 dark:bg-slate-800/50 dark:border-slate-700/50 flex flex-col overflow-hidden", children: /* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-auto", children: /* @__PURE__ */ e.jsxs("table", { className: "w-full", children: [
1195
- /* @__PURE__ */ e.jsx("thead", { className: "bg-slate-50 dark:bg-slate-800/50 sticky top-0 ", children: /* @__PURE__ */ e.jsx("tr", { children: t.map((h) => /* @__PURE__ */ e.jsx(
1194
+ /* @__PURE__ */ e.jsx("thead", { className: "bg-slate-50 dark:bg-slate-800/50 sticky top-0 ", children: /* @__PURE__ */ e.jsx("tr", { children: t.map((m) => /* @__PURE__ */ e.jsx(
1196
1195
  "th",
1197
1196
  {
1198
- onClick: () => h.sortable && n && n(h.key),
1197
+ onClick: () => m.sortable && n && n(m.key),
1199
1198
  className: `
1200
1199
  px-6 py-4 text-left text-xs font-semibold text-slate-700 dark:text-slate-300 uppercase tracking-wider
1201
- ${h.sortable ? "cursor-pointer select-none hover:bg-slate-100 dark:hover:bg-slate-700/50" : ""}
1200
+ ${m.sortable ? "cursor-pointer select-none hover:bg-slate-100 dark:hover:bg-slate-700/50" : ""}
1202
1201
  `,
1203
1202
  children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
1204
- /* @__PURE__ */ e.jsx("span", { children: h.label }),
1205
- h.sortable && (l == null ? void 0 : l.key) === h.key && /* @__PURE__ */ e.jsx("span", { className: "text-violet-600 dark:text-violet-400", children: l.direction === "asc" ? "↑" : "↓" })
1203
+ /* @__PURE__ */ e.jsx("span", { children: m.label }),
1204
+ m.sortable && (l == null ? void 0 : l.key) === m.key && /* @__PURE__ */ e.jsx("span", { className: "text-violet-600 dark:text-violet-400", children: l.direction === "asc" ? "↑" : "↓" })
1206
1205
  ] })
1207
1206
  },
1208
- h.key
1207
+ m.key
1209
1208
  )) }) }),
1210
- /* @__PURE__ */ e.jsx("tbody", { className: "divide-y divide-slate-200 dark:divide-slate-700", children: r.map((h, f) => /* @__PURE__ */ e.jsx(
1209
+ /* @__PURE__ */ e.jsx("tbody", { className: "divide-y divide-slate-200 dark:divide-slate-700", children: r.map((m, p) => /* @__PURE__ */ e.jsx(
1211
1210
  "tr",
1212
1211
  {
1213
1212
  className: "hover:bg-slate-50 dark:hover:bg-slate-800/30 transition-colors",
1214
- children: t.map((k) => /* @__PURE__ */ e.jsx(
1213
+ children: t.map((N) => /* @__PURE__ */ e.jsx(
1215
1214
  "td",
1216
1215
  {
1217
1216
  className: "px-6 py-4 whitespace-nowrap text-sm",
1218
- children: k.render ? k.render(h) : h[k.key]
1217
+ children: N.render ? N.render(m) : m[N.key]
1219
1218
  },
1220
- k.key
1219
+ N.key
1221
1220
  ))
1222
1221
  },
1223
- h.id || f
1222
+ m.id || p
1224
1223
  )) })
1225
- ] }) }) }), Ke = ({
1224
+ ] }) }) }), Qe = ({
1226
1225
  icon: t,
1227
1226
  onClick: r,
1228
1227
  children: n,
1229
1228
  variant: l = "primary",
1230
- disabled: d = !1,
1231
- title: x = "",
1232
- size: m = "md"
1229
+ disabled: c = !1,
1230
+ title: h = "",
1231
+ size: x = "md"
1233
1232
  }) => {
1234
- const h = {
1233
+ const m = {
1235
1234
  primary: "bg-violet-100 text-violet-700 hover:bg-violet-200 border border-violet-200 dark:bg-violet-600/20 dark:text-violet-400 dark:hover:bg-violet-600/30 dark:border dark:border-violet-500/30",
1236
1235
  amber: "bg-amber-50 text-amber-700 border border-amber-200 hover:bg-amber-100 dark:bg-amber-900/20 dark:text-amber-300 dark:border-amber-700/40",
1237
1236
  emerald: "bg-emerald-50 text-emerald-700 border border-emerald-200 hover:bg-emerald-100 dark:bg-emerald-900/20 dark:text-emerald-300 dark:border-emerald-700/40",
@@ -1246,10 +1245,10 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1246
1245
  ghost: "bg-transparent text-slate-600 border border-dashed border-slate-300 hover:bg-slate-50 dark:text-slate-400 dark:border-slate-600 dark:hover:bg-slate-800/50",
1247
1246
  rainbow: "action-btn-rainbow",
1248
1247
  disabled: "bg-slate-100/50 text-slate-400 border border-slate-200/50 cursor-not-allowed dark:bg-slate-800/30 dark:text-slate-500 dark:border-slate-700/50"
1249
- }, f = {
1248
+ }, p = {
1250
1249
  sm: "px-2.5 py-1.5 text-xs gap-1",
1251
1250
  md: "px-3 py-1.5 sm:px-3.5 sm:py-2 text-sm gap-1.5"
1252
- }, k = d ? h.disabled : h[l] ?? h.primary;
1251
+ }, N = c ? m.disabled : m[l] ?? m.primary;
1253
1252
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1254
1253
  /* @__PURE__ */ e.jsx("style", { children: `
1255
1254
  @property --beam-angle {
@@ -1337,17 +1336,17 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1337
1336
  /* @__PURE__ */ e.jsxs(
1338
1337
  "button",
1339
1338
  {
1340
- onClick: d ? void 0 : r,
1339
+ onClick: c ? void 0 : r,
1341
1340
  type: "button",
1342
- title: x,
1343
- disabled: d,
1341
+ title: h,
1342
+ disabled: c,
1344
1343
  className: `
1345
1344
  inline-flex items-center justify-center relative
1346
- ${f[m]}
1345
+ ${p[x]}
1347
1346
  rounded-xl font-semibold whitespace-nowrap
1348
1347
  transition-all duration-200
1349
- ${k}
1350
- ${d ? "opacity-60" : "active:scale-95"}
1348
+ ${N}
1349
+ ${c ? "opacity-60" : "active:scale-95"}
1351
1350
  `,
1352
1351
  children: [
1353
1352
  t && /* @__PURE__ */ e.jsx(t, { className: "w-3.5 h-3.5 flex-shrink-0" }),
@@ -1356,38 +1355,38 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1356
1355
  }
1357
1356
  )
1358
1357
  ] });
1359
- }, et = ({
1358
+ }, Ze = ({
1360
1359
  isOpen: t,
1361
1360
  onClose: r,
1362
1361
  title: n,
1363
1362
  subtitle: l,
1364
- icon: d,
1365
- children: x,
1366
- size: m = "md",
1367
- fullscreen: h = !1,
1368
- hideHeader: f = !1
1363
+ icon: c,
1364
+ children: h,
1365
+ size: x = "md",
1366
+ fullscreen: m = !1,
1367
+ hideHeader: p = !1
1369
1368
  }) => {
1370
1369
  if (J(() => {
1371
- const y = (E) => {
1372
- E.key === "Escape" && r();
1370
+ const R = (y) => {
1371
+ y.key === "Escape" && r();
1373
1372
  };
1374
- return t && (document.addEventListener("keydown", y), document.body.style.overflow = "hidden"), () => {
1375
- document.removeEventListener("keydown", y), document.body.style.overflow = "unset";
1373
+ return t && (document.addEventListener("keydown", R), document.body.style.overflow = "hidden"), () => {
1374
+ document.removeEventListener("keydown", R), document.body.style.overflow = "unset";
1376
1375
  };
1377
1376
  }, [t, r]), !t) return null;
1378
- const k = {
1377
+ const N = {
1379
1378
  sm: "max-w-md",
1380
1379
  md: "max-w-2xl",
1381
1380
  lg: "max-w-4xl",
1382
1381
  xl: "max-w-6xl"
1383
- }, _ = /* @__PURE__ */ e.jsx("div", { className: `flex-shrink-0 px-4 py-3 sm:px-5 sm:py-4
1382
+ }, S = /* @__PURE__ */ e.jsx("div", { className: `flex-shrink-0 px-4 py-3 sm:px-5 sm:py-4
1384
1383
  bg-gradient-to-r from-violet-50 via-indigo-50 to-violet-50
1385
1384
  dark:from-slate-700/50 dark:via-slate-800/50 dark:to-slate-700/50
1386
1385
  border-b border-slate-200 dark:border-slate-700`, children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-3", children: [
1387
1386
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2.5 sm:gap-3 min-w-0", children: [
1388
- d && /* @__PURE__ */ e.jsx("div", { className: `flex-shrink-0 w-9 h-9 sm:w-10 sm:h-10 rounded-xl
1387
+ c && /* @__PURE__ */ e.jsx("div", { className: `flex-shrink-0 w-9 h-9 sm:w-10 sm:h-10 rounded-xl
1389
1388
  flex items-center justify-center
1390
- bg-gradient-to-br from-violet-600 to-indigo-600 shadow-lg`, children: /* @__PURE__ */ e.jsx(d, { className: "w-[18px] h-[18px] sm:w-5 sm:h-5 text-white" }) }),
1389
+ bg-gradient-to-br from-violet-600 to-indigo-600 shadow-lg`, children: /* @__PURE__ */ e.jsx(c, { className: "w-[18px] h-[18px] sm:w-5 sm:h-5 text-white" }) }),
1391
1390
  /* @__PURE__ */ e.jsxs("div", { className: "min-w-0", children: [
1392
1391
  /* @__PURE__ */ e.jsx("h3", { className: "text-sm sm:text-base font-bold text-slate-900 dark:text-white truncate", children: n }),
1393
1392
  l && /* @__PURE__ */ e.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400 mt-0.5 truncate", children: l })
@@ -1409,10 +1408,10 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1409
1408
  }
1410
1409
  )
1411
1410
  ] }) });
1412
- return h ? de(
1411
+ return m ? de(
1413
1412
  /* @__PURE__ */ e.jsxs("div", { className: "fixed inset-0 z-[11000] flex flex-col animate-in fade-in duration-200 bg-white dark:bg-slate-800", children: [
1414
- !f && _,
1415
- /* @__PURE__ */ e.jsx("div", { className: "flex-1 min-h-0 overflow-hidden", children: x })
1413
+ !p && S,
1414
+ /* @__PURE__ */ e.jsx("div", { className: "flex-1 min-h-0 overflow-hidden", children: h })
1416
1415
  ] }),
1417
1416
  document.body
1418
1417
  ) : de(
@@ -1424,28 +1423,28 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1424
1423
  onClick: r
1425
1424
  }
1426
1425
  ),
1427
- /* @__PURE__ */ e.jsx("div", { className: `relative z-[11001] w-full ${k[m]} animate-in zoom-in-95 duration-200 my-auto`, children: /* @__PURE__ */ e.jsxs("div", { className: `
1426
+ /* @__PURE__ */ e.jsx("div", { className: `relative z-[11001] w-full ${N[x]} animate-in zoom-in-95 duration-200 my-auto`, children: /* @__PURE__ */ e.jsxs("div", { className: `
1428
1427
  rounded-xl sm:rounded-2xl border overflow-hidden
1429
1428
  bg-white border-slate-200/50 shadow-2xl ml-2 mr-2
1430
1429
  dark:bg-slate-800 dark:border-slate-700/50
1431
1430
  flex flex-col max-h-[70dvh] sm:max-h-[80dvh]
1432
1431
  `, children: [
1433
- !f && _,
1434
- /* @__PURE__ */ e.jsx("div", { className: "flex-1 min-h-0 overflow-y-auto", children: x })
1432
+ !p && S,
1433
+ /* @__PURE__ */ e.jsx("div", { className: "flex-1 min-h-0 overflow-y-auto", children: h })
1435
1434
  ] }) })
1436
1435
  ] }),
1437
1436
  document.body
1438
1437
  );
1439
- }, De = ({
1438
+ }, Pe = ({
1440
1439
  checked: t = !1,
1441
1440
  onChange: r,
1442
1441
  disabled: n = !1,
1443
1442
  label: l,
1444
- name: d,
1445
- helpText: x
1443
+ name: c,
1444
+ helpText: h
1446
1445
  }) => {
1447
- const m = () => {
1448
- n || r(d, !t);
1446
+ const x = () => {
1447
+ n || r(c, !t);
1449
1448
  };
1450
1449
  return /* @__PURE__ */ e.jsxs("div", { className: "space-y-1.5", children: [
1451
1450
  l && /* @__PURE__ */ e.jsx("span", { className: "block text-sm font-semibold text-slate-700 dark:text-slate-300", children: l }),
@@ -1456,7 +1455,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1456
1455
  type: "button",
1457
1456
  role: "switch",
1458
1457
  "aria-checked": t,
1459
- onClick: m,
1458
+ onClick: x,
1460
1459
  disabled: n,
1461
1460
  className: `
1462
1461
  relative inline-flex h-6 w-11 flex-shrink-0 items-center rounded-full
@@ -1479,53 +1478,53 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1479
1478
  ),
1480
1479
  /* @__PURE__ */ e.jsx("span", { className: `text-sm font-medium ${t ? "text-violet-700 dark:text-violet-400" : "text-slate-500 dark:text-slate-400"}`, children: t ? "Yes" : "No" })
1481
1480
  ] }),
1482
- x && /* @__PURE__ */ e.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400 leading-snug", children: x })
1481
+ h && /* @__PURE__ */ e.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400 leading-snug", children: h })
1483
1482
  ] });
1484
- }, je = ({ field: t, value: r, onChange: n, error: l, index: d, mode: x = "create" }) => {
1485
- var A;
1486
- const [m, h] = O(""), [f, k] = O(!1), [_, y] = O(!1), [E, L] = O(null), [C, g] = O(""), [N, c] = O(!1), z = (b) => {
1483
+ }, we = ({ field: t, value: r, onChange: n, error: l, index: c, mode: h = "create" }) => {
1484
+ var O;
1485
+ const [x, m] = z(""), [p, N] = z(!1), [S, R] = z(!1), [y, E] = z(null), [M, g] = z(""), [i, j] = z(!1), D = (b) => {
1487
1486
  const $ = b.target.value;
1488
1487
  n(t.name, $);
1489
- }, I = (b) => {
1490
- n(t.name, b), k(!1), h("");
1488
+ }, T = (b) => {
1489
+ n(t.name, b), N(!1), m("");
1491
1490
  }, V = () => {
1492
- k(!1), h(""), c(!1), L(null);
1493
- }, M = () => {
1494
- m.trim() && (n(t.name, m.trim()), y(!0), k(!1), h(""));
1491
+ N(!1), m(""), j(!1), E(null);
1492
+ }, I = () => {
1493
+ x.trim() && (n(t.name, x.trim()), R(!0), N(!1), m(""));
1495
1494
  }, Y = (b, $) => {
1496
- $.preventDefault(), $.stopPropagation(), L(b), g(b.label), c(!0);
1495
+ $.preventDefault(), $.stopPropagation(), E(b), g(b.label), j(!0);
1497
1496
  }, U = async (b) => {
1498
- b.preventDefault(), b.stopPropagation(), C.trim() && E && t.onEditRank && await t.onEditRank(E.value, C.trim()) && (r === E.value && n(t.name, E.value), c(!1), L(null), g(""));
1497
+ b.preventDefault(), b.stopPropagation(), M.trim() && y && t.onEditRank && await t.onEditRank(y.value, M.trim()) && (r === y.value && n(t.name, y.value), j(!1), E(null), g(""));
1499
1498
  }, B = (b) => {
1500
- b.preventDefault(), b.stopPropagation(), c(!1), L(null), g("");
1501
- }, j = (() => {
1502
- if (!m) return t.options || [];
1499
+ b.preventDefault(), b.stopPropagation(), j(!1), E(null), g("");
1500
+ }, w = (() => {
1501
+ if (!x) return t.options || [];
1503
1502
  const b = Array.isArray(t.options) ? t.options : [];
1504
1503
  if (t.fuzzySearch && typeof t.findFuzzyMatches == "function")
1505
1504
  try {
1506
- return t.findFuzzyMatches(m, b, t.fuzzyThreshold || 0.5);
1505
+ return t.findFuzzyMatches(x, b, t.fuzzyThreshold || 0.5);
1507
1506
  } catch ($) {
1508
1507
  return console.error("Fuzzy search error:", $), b.filter(
1509
1508
  (F) => {
1510
1509
  var H;
1511
- return (H = F.label) == null ? void 0 : H.toLowerCase().includes(m.toLowerCase());
1510
+ return (H = F.label) == null ? void 0 : H.toLowerCase().includes(x.toLowerCase());
1512
1511
  }
1513
1512
  );
1514
1513
  }
1515
1514
  return b.filter(
1516
1515
  ($) => {
1517
1516
  var F;
1518
- return (F = $.label) == null ? void 0 : F.toLowerCase().includes(m.toLowerCase());
1517
+ return (F = $.label) == null ? void 0 : F.toLowerCase().includes(x.toLowerCase());
1519
1518
  }
1520
1519
  ) || [];
1521
- })(), W = m.trim() && t.fuzzySearch && t.options && typeof t.checkForDuplicateDesignation == "function" ? t.checkForDuplicateDesignation(m, t.options, 0.8) : null, i = W && W.similarityScore === 1, v = t.type === "select-or-custom" && r && !((A = t.options) != null && A.some((b) => b.value === r)), S = () => {
1520
+ })(), W = x.trim() && t.fuzzySearch && t.options && typeof t.checkForDuplicateDesignation == "function" ? t.checkForDuplicateDesignation(x, t.options, 0.8) : null, d = W && W.similarityScore === 1, v = t.type === "select-or-custom" && r && !((O = t.options) != null && O.some((b) => b.value === r)), C = () => {
1522
1521
  var $;
1523
1522
  if (!r) return t.placeholder;
1524
1523
  if (t.type === "select-or-custom" && v)
1525
1524
  return r;
1526
1525
  const b = ($ = t.options) == null ? void 0 : $.find((F) => F.value === r);
1527
1526
  return b ? b.label : t.placeholder;
1528
- }, P = () => {
1527
+ }, A = () => {
1529
1528
  var H, G;
1530
1529
  const b = t.icon, $ = `
1531
1530
  w-full px-3.5 py-2.5 rounded-xl border transition-all duration-200
@@ -1534,7 +1533,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1534
1533
  `, F = l ? "border-red-300 dark:border-red-700 focus:border-red-500 focus:ring-red-500" : "border-slate-300 dark:border-slate-600 focus:border-violet-500 focus:ring-violet-500";
1535
1534
  switch (t.type) {
1536
1535
  case "select-or-custom":
1537
- return _ || v ? /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
1536
+ return S || v ? /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
1538
1537
  b && /* @__PURE__ */ e.jsx("div", { className: "absolute left-3 sm:left-4 top-1/2 -translate-y-1/2 pointer-events-none", children: /* @__PURE__ */ e.jsx(b, { className: "w-4 h-4 sm:w-5 sm:h-5 text-slate-400" }) }),
1539
1538
  /* @__PURE__ */ e.jsx(
1540
1539
  "input",
@@ -1552,7 +1551,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1552
1551
  {
1553
1552
  type: "button",
1554
1553
  onClick: (s) => {
1555
- s.preventDefault(), s.stopPropagation(), y(!1), n(t.name, "");
1554
+ s.preventDefault(), s.stopPropagation(), R(!1), n(t.name, "");
1556
1555
  },
1557
1556
  className: "absolute right-3 top-1/2 -translate-y-1/2 px-3 py-1.5 text-xs font-semibold text-slate-600 hover:text-slate-900 dark:text-slate-400 dark:hover:text-white transition-colors rounded-lg hover:bg-slate-100 dark:hover:bg-slate-700",
1558
1557
  children: "Select Existing"
@@ -1564,7 +1563,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1564
1563
  {
1565
1564
  type: "button",
1566
1565
  onClick: (s) => {
1567
- s.preventDefault(), s.stopPropagation(), t.disabled || k(!0);
1566
+ s.preventDefault(), s.stopPropagation(), t.disabled || N(!0);
1568
1567
  },
1569
1568
  disabled: t.disabled,
1570
1569
  className: ` relative ${$} ${F} ${b ? "pl-12" : ""} pr-4 text-left flex items-center justify-between disabled:opacity-50 disabled:cursor-not-allowed hover:border-violet-400 dark:hover:border-violet-500`,
@@ -1574,15 +1573,15 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1574
1573
  "span",
1575
1574
  {
1576
1575
  className: `${r ? "" : "text-slate-400"} truncate pr-2`,
1577
- title: S(),
1578
- children: S()
1576
+ title: C(),
1577
+ children: C()
1579
1578
  }
1580
1579
  ),
1581
1580
  /* @__PURE__ */ e.jsx(ae, { className: "w-5 h-5 text-slate-400 " })
1582
1581
  ]
1583
1582
  }
1584
1583
  ),
1585
- f && /* @__PURE__ */ e.jsx(
1584
+ p && /* @__PURE__ */ e.jsx(
1586
1585
  "div",
1587
1586
  {
1588
1587
  className: "fixed inset-0 z-50 flex items-center justify-center p-3 sm:p-4 bg-slate-900/50 backdrop-blur-sm animate-in fade-in duration-200",
@@ -1600,8 +1599,8 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1600
1599
  dark:from-slate-700/50 dark:via-slate-800/50 dark:to-slate-700/50
1601
1600
  border-b border-slate-200 dark:border-slate-700 rounded-t-2xl`, children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-3", children: [
1602
1601
  /* @__PURE__ */ e.jsxs("div", { className: "min-w-0", children: [
1603
- /* @__PURE__ */ e.jsx("h3", { className: "text-sm sm:text-base font-bold text-slate-900 dark:text-white truncate", children: N ? "Edit Rank Designation" : t.modalTitle || t.label }),
1604
- /* @__PURE__ */ e.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400 mt-0.5 truncate", children: N ? `Editing: ${E == null ? void 0 : E.label}` : t.modalSubtitle || "Search existing or create new" })
1602
+ /* @__PURE__ */ e.jsx("h3", { className: "text-sm sm:text-base font-bold text-slate-900 dark:text-white truncate", children: i ? "Edit Rank Designation" : t.modalTitle || t.label }),
1603
+ /* @__PURE__ */ e.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400 mt-0.5 truncate", children: i ? `Editing: ${y == null ? void 0 : y.label}` : t.modalSubtitle || "Search existing or create new" })
1605
1604
  ] }),
1606
1605
  /* @__PURE__ */ e.jsx(
1607
1606
  "button",
@@ -1620,7 +1619,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1620
1619
  }
1621
1620
  )
1622
1621
  ] }) }),
1623
- N ? /* @__PURE__ */ e.jsxs("div", { className: "p-4 sm:p-5 space-y-3 sm:space-y-4", children: [
1622
+ i ? /* @__PURE__ */ e.jsxs("div", { className: "p-4 sm:p-5 space-y-3 sm:space-y-4", children: [
1624
1623
  /* @__PURE__ */ e.jsxs("div", { children: [
1625
1624
  /* @__PURE__ */ e.jsx("label", { className: `block text-xs font-semibold uppercase tracking-wide
1626
1625
  text-slate-700 dark:text-slate-300 mb-1.5`, children: "Edit Rank Designation" }),
@@ -1628,7 +1627,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1628
1627
  "input",
1629
1628
  {
1630
1629
  type: "text",
1631
- value: C,
1630
+ value: M,
1632
1631
  onChange: (s) => g(s.target.value),
1633
1632
  className: `w-full px-3 py-2.5 sm:px-4 sm:py-3 rounded-xl border
1634
1633
  border-slate-200/50 dark:border-slate-700/50
@@ -1671,7 +1670,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1671
1670
  shadow-md hover:shadow-lg
1672
1671
  transition-all duration-200 hover:scale-105 active:scale-95`,
1673
1672
  children: [
1674
- /* @__PURE__ */ e.jsx(Me, { className: "w-4 h-4" }),
1673
+ /* @__PURE__ */ e.jsx(Re, { className: "w-4 h-4" }),
1675
1674
  " Save Changes"
1676
1675
  ]
1677
1676
  }
@@ -1684,8 +1683,8 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1684
1683
  "input",
1685
1684
  {
1686
1685
  type: "text",
1687
- value: m,
1688
- onChange: (s) => h(s.target.value),
1686
+ value: x,
1687
+ onChange: (s) => m(s.target.value),
1689
1688
  placeholder: t.fuzzySearch ? "Search or type to create new..." : "Search...",
1690
1689
  className: "w-full pl-10 pr-4 py-2.5 rounded-lg border border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 text-slate-900 dark:text-white placeholder-slate-400 focus:border-violet-500 focus:ring-2 focus:ring-violet-500/20 transition-all",
1691
1690
  autoFocus: !0
@@ -1703,17 +1702,17 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1703
1702
  ] })
1704
1703
  ] })
1705
1704
  ] }) }),
1706
- /* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-y-auto p-2", children: m.trim() ? (
1705
+ /* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-y-auto p-2", children: x.trim() ? (
1707
1706
  /* Show filtered results + Create New when user types */
1708
1707
  /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1709
- j.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "space-y-1 mb-3", children: [
1708
+ w.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "space-y-1 mb-3", children: [
1710
1709
  /* @__PURE__ */ e.jsx("p", { className: "px-4 py-2 text-xs font-semibold text-slate-500 dark:text-slate-400 uppercase tracking-wider", children: "Existing Options" }),
1711
- j.map((s) => /* @__PURE__ */ e.jsx("div", { className: "group relative", children: /* @__PURE__ */ e.jsxs(
1710
+ w.map((s) => /* @__PURE__ */ e.jsx("div", { className: "group relative", children: /* @__PURE__ */ e.jsxs(
1712
1711
  "button",
1713
1712
  {
1714
1713
  type: "button",
1715
1714
  onClick: (a) => {
1716
- a.preventDefault(), a.stopPropagation(), I(s.value);
1715
+ a.preventDefault(), a.stopPropagation(), T(s.value);
1717
1716
  },
1718
1717
  className: `w-full text-left px-4 py-3 rounded-lg transition-all duration-200 flex items-center justify-between ${r === s.value ? "bg-violet-100 dark:bg-violet-600/20 text-violet-900 dark:text-violet-300 font-semibold" : "hover:bg-slate-100 dark:hover:bg-slate-700 text-slate-700 dark:text-slate-300"}`,
1719
1718
  children: [
@@ -1738,22 +1737,22 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1738
1737
  }
1739
1738
  ) }, s.value))
1740
1739
  ] }),
1741
- (!i || (W == null ? void 0 : W.similarityScore) < 1) && /* @__PURE__ */ e.jsxs("div", { className: j.length > 0 ? "border-t border-slate-200 dark:border-slate-700 pt-3" : "", children: [
1742
- /* @__PURE__ */ e.jsx("p", { className: "px-4 py-2 text-xs font-semibold text-slate-500 dark:text-slate-400 uppercase tracking-wider", children: j.length > 0 ? x === "edit" ? "Or Update To" : "Or Create New" : "No matches found" }),
1740
+ (!d || (W == null ? void 0 : W.similarityScore) < 1) && /* @__PURE__ */ e.jsxs("div", { className: w.length > 0 ? "border-t border-slate-200 dark:border-slate-700 pt-3" : "", children: [
1741
+ /* @__PURE__ */ e.jsx("p", { className: "px-4 py-2 text-xs font-semibold text-slate-500 dark:text-slate-400 uppercase tracking-wider", children: w.length > 0 ? h === "edit" ? "Or Update To" : "Or Create New" : "No matches found" }),
1743
1742
  /* @__PURE__ */ e.jsx("div", { className: "px-2", children: /* @__PURE__ */ e.jsx(
1744
1743
  "button",
1745
1744
  {
1746
1745
  type: "button",
1747
1746
  onClick: (s) => {
1748
- s.preventDefault(), s.stopPropagation(), M();
1747
+ s.preventDefault(), s.stopPropagation(), I();
1749
1748
  },
1750
1749
  className: "w-full px-4 py-3 rounded-lg transition-all duration-200 bg-gradient-to-r from-violet-600 to-indigo-600 hover:from-violet-700 hover:to-indigo-700 text-white font-semibold shadow-lg hover:shadow-xl transform hover:-translate-y-0.5 min-w-0",
1751
1750
  children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-center space-x-2 min-w-0", children: [
1752
- /* @__PURE__ */ e.jsx(_e, { className: "w-5 h-5 flex-shrink-0" }),
1751
+ /* @__PURE__ */ e.jsx(Me, { className: "w-5 h-5 flex-shrink-0" }),
1753
1752
  /* @__PURE__ */ e.jsxs("span", { className: "truncate", children: [
1754
- x === "edit" ? "Update to" : "Create New",
1753
+ h === "edit" ? "Update to" : "Create New",
1755
1754
  ": ",
1756
- m.trim()
1755
+ x.trim()
1757
1756
  ] })
1758
1757
  ] })
1759
1758
  }
@@ -1767,7 +1766,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1767
1766
  {
1768
1767
  type: "button",
1769
1768
  onClick: (a) => {
1770
- a.preventDefault(), a.stopPropagation(), I(s.value);
1769
+ a.preventDefault(), a.stopPropagation(), T(s.value);
1771
1770
  },
1772
1771
  className: `w-full text-left px-4 py-3 rounded-lg transition-all duration-200 break-words whitespace-normal ${r === s.value ? "bg-violet-100 dark:bg-violet-600/20 text-violet-900 dark:text-violet-300 font-semibold" : "hover:bg-slate-100 dark:hover:bg-slate-700 text-slate-700 dark:text-slate-300"}`,
1773
1772
  children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
@@ -1788,8 +1787,8 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1788
1787
  ) })
1789
1788
  ] }),
1790
1789
  /* @__PURE__ */ e.jsx("div", { className: "flex-shrink-0 px-6 py-3 border-t border-slate-200 dark:border-slate-700 bg-slate-50 dark:bg-slate-800/50", children: /* @__PURE__ */ e.jsxs("p", { className: "text-xs text-slate-500 dark:text-slate-400 text-center", children: [
1791
- !N && (j ? `${j.length} option${j.length !== 1 ? "s" : ""} available` : ""),
1792
- N && "Edit the rank designation and save changes"
1790
+ !i && (w ? `${w.length} option${w.length !== 1 ? "s" : ""} available` : ""),
1791
+ i && "Edit the rank designation and save changes"
1793
1792
  ] }) })
1794
1793
  ] })
1795
1794
  }
@@ -1804,18 +1803,18 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1804
1803
  {
1805
1804
  type: "button",
1806
1805
  onClick: (s) => {
1807
- s.preventDefault(), s.stopPropagation(), t.disabled || k(!0);
1806
+ s.preventDefault(), s.stopPropagation(), t.disabled || N(!0);
1808
1807
  },
1809
1808
  disabled: t.disabled,
1810
1809
  className: `relative ${$} ${F} flex items-center justify-between ${b ? "pl-12" : ""} pr-4 text-left disabled:opacity-50 disabled:cursor-not-allowed hover:border-violet-400 dark:hover:border-violet-500`,
1811
1810
  children: [
1812
1811
  b && /* @__PURE__ */ e.jsx("div", { className: "absolute left-3 sm:left-4 top-1/2 -translate-y-1/2 pointer-events-none", children: /* @__PURE__ */ e.jsx(b, { className: "w-4 h-4 sm:w-5 sm:h-5 text-slate-400" }) }),
1813
- /* @__PURE__ */ e.jsx("span", { className: r ? "text-slate-900 dark:text-white truncate" : "text-slate-400", children: S() }),
1812
+ /* @__PURE__ */ e.jsx("span", { className: r ? "text-slate-900 dark:text-white truncate" : "text-slate-400", children: C() }),
1814
1813
  /* @__PURE__ */ e.jsx(ae, { className: "w-5 h-5 text-slate-400" })
1815
1814
  ]
1816
1815
  }
1817
1816
  ),
1818
- f && /* @__PURE__ */ e.jsx(
1817
+ p && /* @__PURE__ */ e.jsx(
1819
1818
  "div",
1820
1819
  {
1821
1820
  className: "fixed inset-0 z-50 flex items-center justify-center p-3 sm:p-4 bg-black/50 backdrop-blur-sm animate-in fade-in duration-200",
@@ -1858,20 +1857,20 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1858
1857
  "input",
1859
1858
  {
1860
1859
  type: "text",
1861
- value: m,
1862
- onChange: (s) => h(s.target.value),
1860
+ value: x,
1861
+ onChange: (s) => m(s.target.value),
1863
1862
  placeholder: "Search...",
1864
1863
  className: "w-full pl-10 pr-4 py-2.5 rounded-lg border border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 text-slate-900 dark:text-white placeholder-slate-400 focus:border-violet-500 focus:ring-2 focus:ring-violet-500/20 transition-all",
1865
1864
  autoFocus: !0
1866
1865
  }
1867
1866
  )
1868
1867
  ] }) }),
1869
- /* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-y-auto p-2", children: j.length > 0 ? /* @__PURE__ */ e.jsx("div", { className: "space-y-1", children: j.map((s) => /* @__PURE__ */ e.jsx(
1868
+ /* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-y-auto p-2", children: w.length > 0 ? /* @__PURE__ */ e.jsx("div", { className: "space-y-1", children: w.map((s) => /* @__PURE__ */ e.jsx(
1870
1869
  "button",
1871
1870
  {
1872
1871
  type: "button",
1873
1872
  onClick: (a) => {
1874
- a.preventDefault(), a.stopPropagation(), I(s.value);
1873
+ a.preventDefault(), a.stopPropagation(), T(s.value);
1875
1874
  },
1876
1875
  className: `w-full text-left px-4 py-3 rounded-lg transition-all duration-200 break-all whitespace-normal ${r === s.value ? "bg-violet-100 dark:bg-violet-600/20 text-violet-900 dark:text-violet-300 font-semibold" : "hover:bg-slate-100 dark:hover:bg-slate-700 text-slate-700 dark:text-slate-300"}`,
1877
1876
  children: s.label
@@ -1889,7 +1888,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1889
1888
  "select",
1890
1889
  {
1891
1890
  value: r,
1892
- onChange: z,
1891
+ onChange: D,
1893
1892
  disabled: t.disabled,
1894
1893
  className: `${$} ${F} ${b ? "pl-12" : ""} pr-10 appearance-none cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-violet-500/20`,
1895
1894
  children: [
@@ -1968,7 +1967,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1968
1967
  ] });
1969
1968
  case "toggle":
1970
1969
  return /* @__PURE__ */ e.jsx(
1971
- De,
1970
+ Pe,
1972
1971
  {
1973
1972
  checked: r || !1,
1974
1973
  onChange: n,
@@ -2028,7 +2027,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2028
2027
  },
2029
2028
  className: "absolute right-2 top-1/2 -translate-y-1/2 p-2 rounded-lg bg-violet-600 hover:bg-violet-700 active:bg-violet-800 disabled:opacity-50 disabled:cursor-not-allowed text-white transition-colors",
2030
2029
  title: "Browse files",
2031
- children: /* @__PURE__ */ e.jsx($e, { className: "w-4 h-4" })
2030
+ children: /* @__PURE__ */ e.jsx(Se, { className: "w-4 h-4" })
2032
2031
  }
2033
2032
  ),
2034
2033
  /* @__PURE__ */ e.jsx(
@@ -2045,11 +2044,11 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2045
2044
  }
2046
2045
  )
2047
2046
  ] }),
2048
- a.map(({ tempId: o, file: p, documentName: w }) => /* @__PURE__ */ e.jsxs("div", { className: "group flex items-center gap-3 px-4 py-3 rounded-xl border border-violet-200 dark:border-violet-700/40 bg-violet-50/50 dark:bg-violet-900/10 transition-colors", children: [
2049
- /* @__PURE__ */ e.jsx("div", { className: "w-8 h-8 rounded-lg bg-violet-100 dark:bg-violet-900/30 flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ e.jsx(Le, { className: "w-4 h-4 text-violet-600 dark:text-violet-400" }) }),
2047
+ a.map(({ tempId: o, file: f, documentName: k }) => /* @__PURE__ */ e.jsxs("div", { className: "group flex items-center gap-3 px-4 py-3 rounded-xl border border-violet-200 dark:border-violet-700/40 bg-violet-50/50 dark:bg-violet-900/10 transition-colors", children: [
2048
+ /* @__PURE__ */ e.jsx("div", { className: "w-8 h-8 rounded-lg bg-violet-100 dark:bg-violet-900/30 flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ e.jsx($e, { className: "w-4 h-4 text-violet-600 dark:text-violet-400" }) }),
2050
2049
  /* @__PURE__ */ e.jsxs("div", { className: "flex-1 min-w-0", children: [
2051
- /* @__PURE__ */ e.jsx("p", { className: "text-sm font-semibold text-slate-800 dark:text-slate-200 truncate", children: w || (p == null ? void 0 : p.name) }),
2052
- (p == null ? void 0 : p.size) !== void 0 && /* @__PURE__ */ e.jsx("p", { className: "text-xs text-violet-600 dark:text-violet-400 mt-0.5", children: p.size < 1024 * 1024 ? `${(p.size / 1024).toFixed(1)} KB` : `${(p.size / (1024 * 1024)).toFixed(2)} MB` })
2050
+ /* @__PURE__ */ e.jsx("p", { className: "text-sm font-semibold text-slate-800 dark:text-slate-200 truncate", children: k || (f == null ? void 0 : f.name) }),
2051
+ (f == null ? void 0 : f.size) !== void 0 && /* @__PURE__ */ e.jsx("p", { className: "text-xs text-violet-600 dark:text-violet-400 mt-0.5", children: f.size < 1024 * 1024 ? `${(f.size / 1024).toFixed(1)} KB` : `${(f.size / (1024 * 1024)).toFixed(2)} MB` })
2053
2052
  ] }),
2054
2053
  t.onRemove && /* @__PURE__ */ e.jsx(
2055
2054
  "button",
@@ -2058,7 +2057,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2058
2057
  onClick: () => t.onRemove(o),
2059
2058
  className: "w-7 h-7 rounded-lg flex items-center justify-center text-red-500 hover:bg-red-50 dark:hover:bg-red-900/20 transition-all flex-shrink-0 opacity-60 sm:opacity-0 sm:group-hover:opacity-100",
2060
2059
  title: "Remove",
2061
- children: /* @__PURE__ */ e.jsx(Re, { className: "w-3.5 h-3.5" })
2060
+ children: /* @__PURE__ */ e.jsx(Le, { className: "w-3.5 h-3.5" })
2062
2061
  }
2063
2062
  )
2064
2063
  ] }, o))
@@ -2089,100 +2088,100 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2089
2088
  /* @__PURE__ */ e.jsx("span", { children: t.label }),
2090
2089
  t.required && /* @__PURE__ */ e.jsx("span", { className: "text-red-500 dark:text-red-400", children: "*" })
2091
2090
  ] }) }),
2092
- /* @__PURE__ */ e.jsx("div", { className: "mt-2", children: P() }),
2091
+ /* @__PURE__ */ e.jsx("div", { className: "mt-2", children: A() }),
2093
2092
  l && /* @__PURE__ */ e.jsxs("p", { className: "text-xs sm:text-sm text-red-600 dark:text-red-400 flex items-center gap-1.5 animate-in slide-in-from-top-1 duration-200", children: [
2094
2093
  /* @__PURE__ */ e.jsx(he, { className: "w-3.5 h-3.5 flex-shrink-0" }),
2095
2094
  /* @__PURE__ */ e.jsx("span", { children: l })
2096
2095
  ] }),
2097
2096
  t.helpText && !l && /* @__PURE__ */ e.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400", children: t.helpText })
2098
2097
  ] });
2099
- }, tt = ({
2098
+ }, Ke = ({
2100
2099
  fields: t = [],
2101
2100
  initialData: r = {},
2102
2101
  onSubmit: n,
2103
2102
  onCancel: l,
2104
- onEdit: d,
2105
- onFieldChange: x,
2106
- submitButtonText: m = "Submit",
2107
- cancelButtonText: h = "Cancel",
2108
- editButtonText: f = "Edit",
2109
- showEditingBadge: k = !1,
2110
- editingEntity: _ = "",
2111
- helpText: y = "All fields marked with * are required",
2112
- isModal: E = !0,
2113
- mode: L = "edit",
2114
- disabled: C = !1,
2103
+ onEdit: c,
2104
+ onFieldChange: h,
2105
+ submitButtonText: x = "Submit",
2106
+ cancelButtonText: m = "Cancel",
2107
+ editButtonText: p = "Edit",
2108
+ showEditingBadge: N = !1,
2109
+ editingEntity: S = "",
2110
+ helpText: R = "All fields marked with * are required",
2111
+ isModal: y = !0,
2112
+ mode: E = "edit",
2113
+ disabled: M = !1,
2115
2114
  // ✅ Add disabled prop for loading states
2116
2115
  renderCustomField: g
2117
2116
  }) => {
2118
- const N = K(!0), [c, z] = O(() => {
2119
- const i = {};
2120
- return (typeof t == "function" ? t(r) : t).forEach((S) => {
2121
- i[S.name] = r[S.name] || "";
2122
- }), i;
2123
- }), [I, V] = O({}), M = L === "view", Y = M ? !0 : !E;
2117
+ const i = K(!0), [j, D] = z(() => {
2118
+ const d = {};
2119
+ return (typeof t == "function" ? t(r) : t).forEach((C) => {
2120
+ d[C.name] = r[C.name] || "";
2121
+ }), d;
2122
+ }), [T, V] = z({}), I = E === "view", Y = I ? !0 : !y;
2124
2123
  J(() => {
2125
- if (N.current) {
2126
- N.current = !1;
2124
+ if (i.current) {
2125
+ i.current = !1;
2127
2126
  return;
2128
2127
  }
2129
2128
  if (r && Object.keys(r).length > 0 && r.id) {
2130
2129
  const v = {};
2131
- (typeof t == "function" ? t(c) : t).forEach((P) => {
2132
- v[P.name] = r[P.name] || "";
2133
- }), z(v);
2130
+ (typeof t == "function" ? t(j) : t).forEach((A) => {
2131
+ v[A.name] = r[A.name] || "";
2132
+ }), D(v);
2134
2133
  }
2135
2134
  }, [r.id]);
2136
- const U = typeof t == "function" ? t(c) : t, B = (i, v) => {
2137
- if (M) return;
2138
- const S = { ...c, [i]: v };
2139
- z(S);
2140
- const P = { ...I };
2141
- delete P[i], U.forEach((A) => {
2135
+ const U = typeof t == "function" ? t(j) : t, B = (d, v) => {
2136
+ if (I) return;
2137
+ const C = { ...j, [d]: v };
2138
+ D(C);
2139
+ const A = { ...T };
2140
+ delete A[d], U.forEach((O) => {
2142
2141
  var b;
2143
- if ((b = A.validation) != null && b.custom && P[A.name]) {
2144
- const $ = A.name === i ? v : c[A.name];
2145
- A.validation.custom($, S) === !0 && delete P[A.name];
2142
+ if ((b = O.validation) != null && b.custom && A[O.name]) {
2143
+ const $ = O.name === d ? v : j[O.name];
2144
+ O.validation.custom($, C) === !0 && delete A[O.name];
2146
2145
  }
2147
- }), V(P), x && x(i, v, S);
2148
- }, j = () => {
2149
- if (M) return !0;
2150
- const i = {};
2146
+ }), V(A), h && h(d, v, C);
2147
+ }, w = () => {
2148
+ if (I) return !0;
2149
+ const d = {};
2151
2150
  return U.forEach((v) => {
2152
- const S = c[v.name], P = v.isHtml ? !(S || "").replace(/<[^>]*>/g, "").trim() : !S;
2153
- if (v.required && P) {
2154
- i[v.name] = `${v.label} is required`;
2151
+ const C = j[v.name], A = v.isHtml ? !(C || "").replace(/<[^>]*>/g, "").trim() : !C;
2152
+ if (v.required && A) {
2153
+ d[v.name] = `${v.label} is required`;
2155
2154
  return;
2156
2155
  }
2157
- if (v.validation && S) {
2158
- const { minLength: A, maxLength: b, pattern: $, custom: F } = v.validation, H = v.isHtml ? (S || "").replace(/<[^>]*>/g, "").trim() : S;
2159
- if (A && H.length < A) {
2160
- i[v.name] = `Minimum ${A} characters required`;
2156
+ if (v.validation && C) {
2157
+ const { minLength: O, maxLength: b, pattern: $, custom: F } = v.validation, H = v.isHtml ? (C || "").replace(/<[^>]*>/g, "").trim() : C;
2158
+ if (O && H.length < O) {
2159
+ d[v.name] = `Minimum ${O} characters required`;
2161
2160
  return;
2162
2161
  }
2163
2162
  if (b && H.length > b) {
2164
- i[v.name] = `Maximum ${b} characters allowed`;
2163
+ d[v.name] = `Maximum ${b} characters allowed`;
2165
2164
  return;
2166
2165
  }
2167
- if ($ && !$.test(S)) {
2168
- i[v.name] = v.validation.patternMessage || v.validation.message || "Invalid format";
2166
+ if ($ && !$.test(C)) {
2167
+ d[v.name] = v.validation.patternMessage || v.validation.message || "Invalid format";
2169
2168
  return;
2170
2169
  }
2171
2170
  if (F) {
2172
- const G = F(S, c);
2171
+ const G = F(C, j);
2173
2172
  if (G !== !0) {
2174
- i[v.name] = typeof G == "string" ? G : v.validation.message || "Validation failed";
2173
+ d[v.name] = typeof G == "string" ? G : v.validation.message || "Validation failed";
2175
2174
  return;
2176
2175
  }
2177
2176
  }
2178
2177
  }
2179
- }), V(i), Object.keys(i).length === 0;
2180
- }, W = (i) => {
2181
- i.preventDefault(), !M && j() && n(c);
2178
+ }), V(d), Object.keys(d).length === 0;
2179
+ }, W = (d) => {
2180
+ d.preventDefault(), !I && w() && n(j);
2182
2181
  };
2183
2182
  return /* @__PURE__ */ e.jsxs("form", { onSubmit: W, className: "flex flex-col h-full max-h-[75vh] sm:max-h-[70vh]", children: [
2184
2183
  /* @__PURE__ */ e.jsxs("div", { className: "flex-1 overflow-y-auto px-4 pt-4 sm:px-5 sm:pt-5", children: [
2185
- M && /* @__PURE__ */ e.jsxs("div", { className: `mb-4 flex items-center gap-3 p-3 sm:p-3.5 rounded-xl
2184
+ I && /* @__PURE__ */ e.jsxs("div", { className: `mb-4 flex items-center gap-3 p-3 sm:p-3.5 rounded-xl
2186
2185
  bg-blue-50 border border-blue-200
2187
2186
  dark:bg-blue-600/10 dark:border-blue-500/30`, children: [
2188
2187
  /* @__PURE__ */ e.jsx("div", { className: "flex-shrink-0 p-1.5 rounded-lg bg-blue-600 dark:bg-blue-500", children: /* @__PURE__ */ e.jsx(re, { className: "w-3.5 h-3.5 text-white" }) }),
@@ -2191,7 +2190,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2191
2190
  /* @__PURE__ */ e.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400 leading-snug", children: "Read-only — no changes will be saved" })
2192
2191
  ] })
2193
2192
  ] }),
2194
- !M && k && _ && /* @__PURE__ */ e.jsxs("div", { className: `mb-4 flex items-center gap-3 p-3 sm:p-3.5 rounded-xl
2193
+ !I && N && S && /* @__PURE__ */ e.jsxs("div", { className: `mb-4 flex items-center gap-3 p-3 sm:p-3.5 rounded-xl
2195
2194
  bg-violet-50 border border-violet-200
2196
2195
  dark:bg-violet-600/10 dark:border-violet-500/30`, children: [
2197
2196
  /* @__PURE__ */ e.jsx("span", { className: "flex-shrink-0 w-2 h-2 rounded-full bg-violet-500 animate-pulse" }),
@@ -2200,47 +2199,47 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2200
2199
  /* @__PURE__ */ e.jsxs("p", { className: "text-xs text-slate-500 dark:text-slate-400 truncate", children: [
2201
2200
  "Modifying:",
2202
2201
  " ",
2203
- /* @__PURE__ */ e.jsx("span", { className: "font-semibold text-violet-600 dark:text-violet-400", children: _ })
2202
+ /* @__PURE__ */ e.jsx("span", { className: "font-semibold text-violet-600 dark:text-violet-400", children: S })
2204
2203
  ] })
2205
2204
  ] })
2206
2205
  ] }),
2207
- /* @__PURE__ */ e.jsx("div", { className: "space-y-4 pb-4", children: U.map((i, v) => {
2208
- const S = c[i.name], P = I[i.name];
2206
+ /* @__PURE__ */ e.jsx("div", { className: "space-y-4 pb-4", children: U.map((d, v) => {
2207
+ const C = j[d.name], A = T[d.name];
2209
2208
  if (g) {
2210
- const A = g({
2211
- field: i,
2212
- value: S,
2213
- error: P,
2209
+ const O = g({
2210
+ field: d,
2211
+ value: C,
2212
+ error: A,
2214
2213
  index: v,
2215
- mode: L,
2216
- disabled: M || i.disabled || C,
2214
+ mode: E,
2215
+ disabled: I || d.disabled || M,
2217
2216
  onChange: B
2218
2217
  });
2219
- if (A) return /* @__PURE__ */ e.jsx("div", { children: A }, i.name || v);
2218
+ if (O) return /* @__PURE__ */ e.jsx("div", { children: O }, d.name || v);
2220
2219
  }
2221
2220
  return /* @__PURE__ */ e.jsx(
2222
- je,
2221
+ we,
2223
2222
  {
2224
- field: { ...i, disabled: M || i.disabled || C },
2225
- value: S,
2223
+ field: { ...d, disabled: I || d.disabled || M },
2224
+ value: C,
2226
2225
  onChange: B,
2227
- error: P,
2228
- mode: L
2226
+ error: A,
2227
+ mode: E
2229
2228
  },
2230
- i.name || v
2229
+ d.name || v
2231
2230
  );
2232
2231
  }) })
2233
2232
  ] }),
2234
2233
  /* @__PURE__ */ e.jsxs("div", { className: `flex-shrink-0 bg-white dark:bg-slate-800
2235
2234
  border-t border-slate-200 dark:border-slate-700
2236
2235
  px-4 py-3 sm:px-5 sm:py-4`, children: [
2237
- M ? /* @__PURE__ */ e.jsxs("div", { className: `flex ${E ? "flex-col-reverse sm:flex-row" : "flex-row"} gap-2.5`, children: [
2236
+ I ? /* @__PURE__ */ e.jsxs("div", { className: `flex ${y ? "flex-col-reverse sm:flex-row" : "flex-row"} gap-2.5`, children: [
2238
2237
  Y && l && /* @__PURE__ */ e.jsxs(
2239
2238
  "button",
2240
2239
  {
2241
2240
  type: "button",
2242
2241
  onClick: l,
2243
- className: `${E ? "flex-1 sm:flex-none" : "w-auto"}
2242
+ className: `${y ? "flex-1 sm:flex-none" : "w-auto"}
2244
2243
  flex items-center justify-center gap-2
2245
2244
  px-4 py-2.5 rounded-xl text-sm font-semibold transition-all duration-200
2246
2245
  bg-slate-100 hover:bg-slate-200 text-slate-700 border border-slate-200
@@ -2252,12 +2251,12 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2252
2251
  ]
2253
2252
  }
2254
2253
  ),
2255
- d && /* @__PURE__ */ e.jsxs(
2254
+ c && /* @__PURE__ */ e.jsxs(
2256
2255
  "button",
2257
2256
  {
2258
2257
  type: "button",
2259
- onClick: d,
2260
- className: `${E ? "flex-1" : "w-auto"}
2258
+ onClick: c,
2259
+ className: `${y ? "flex-1" : "w-auto"}
2261
2260
  flex items-center justify-center gap-2
2262
2261
  px-4 py-2.5 rounded-xl text-sm font-semibold transition-all duration-200
2263
2262
  bg-gradient-to-r from-violet-600 to-indigo-600
@@ -2266,20 +2265,20 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2266
2265
  hover:scale-[1.02] active:scale-[0.98]`,
2267
2266
  children: [
2268
2267
  /* @__PURE__ */ e.jsx(oe, { className: "w-4 h-4" }),
2269
- /* @__PURE__ */ e.jsx("span", { children: f })
2268
+ /* @__PURE__ */ e.jsx("span", { children: p })
2270
2269
  ]
2271
2270
  }
2272
2271
  )
2273
2272
  ] }) : (
2274
2273
  /* Edit mode actions */
2275
- /* @__PURE__ */ e.jsxs("div", { className: `flex ${E ? "flex-col-reverse sm:flex-row" : "flex-row justify-start"} gap-2.5`, children: [
2274
+ /* @__PURE__ */ e.jsxs("div", { className: `flex ${y ? "flex-col-reverse sm:flex-row" : "flex-row justify-start"} gap-2.5`, children: [
2276
2275
  l && /* @__PURE__ */ e.jsxs(
2277
2276
  "button",
2278
2277
  {
2279
2278
  type: "button",
2280
2279
  onClick: l,
2281
- disabled: C,
2282
- className: `${E ? "flex-1 sm:flex-none" : "w-auto"}
2280
+ disabled: M,
2281
+ className: `${y ? "flex-1 sm:flex-none" : "w-auto"}
2283
2282
  flex items-center justify-center gap-2
2284
2283
  px-4 py-2.5 rounded-xl text-sm font-semibold transition-all duration-200
2285
2284
  bg-slate-100 hover:bg-slate-200 text-slate-700 border border-slate-200
@@ -2288,7 +2287,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2288
2287
  hover:scale-[1.02] active:scale-[0.98]`,
2289
2288
  children: [
2290
2289
  /* @__PURE__ */ e.jsx(X, { className: "w-4 h-4" }),
2291
- /* @__PURE__ */ e.jsx("span", { children: h })
2290
+ /* @__PURE__ */ e.jsx("span", { children: m })
2292
2291
  ]
2293
2292
  }
2294
2293
  ),
@@ -2296,8 +2295,8 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2296
2295
  "button",
2297
2296
  {
2298
2297
  type: "submit",
2299
- disabled: C,
2300
- className: `${E ? "flex-1" : "w-auto"}
2298
+ disabled: M,
2299
+ className: `${y ? "flex-1" : "w-auto"}
2301
2300
  flex items-center justify-center gap-2
2302
2301
  px-4 py-2.5 rounded-xl text-sm font-semibold transition-all duration-200
2303
2302
  bg-gradient-to-r from-violet-600 to-indigo-600
@@ -2306,14 +2305,14 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2306
2305
  disabled:opacity-50 disabled:cursor-not-allowed
2307
2306
  hover:scale-[1.02] active:scale-[0.98] disabled:hover:scale-100`,
2308
2307
  children: [
2309
- C ? /* @__PURE__ */ e.jsx("span", { className: "w-4 h-4 rounded-full border-2 border-white/30 border-t-white animate-spin flex-shrink-0" }) : /* @__PURE__ */ e.jsx(re, { className: "w-4 h-4 flex-shrink-0" }),
2310
- /* @__PURE__ */ e.jsx("span", { children: C ? "Saving..." : m })
2308
+ M ? /* @__PURE__ */ e.jsx("span", { className: "w-4 h-4 rounded-full border-2 border-white/30 border-t-white animate-spin flex-shrink-0" }) : /* @__PURE__ */ e.jsx(re, { className: "w-4 h-4 flex-shrink-0" }),
2309
+ /* @__PURE__ */ e.jsx("span", { children: M ? "Saving..." : x })
2311
2310
  ]
2312
2311
  }
2313
2312
  )
2314
2313
  ] })
2315
2314
  ),
2316
- !M && y && /* @__PURE__ */ e.jsx("p", { className: "mt-2.5 text-xs text-slate-400 dark:text-slate-500 text-center", children: y })
2315
+ !I && R && /* @__PURE__ */ e.jsx("p", { className: "mt-2.5 text-xs text-slate-400 dark:text-slate-500 text-center", children: R })
2317
2316
  ] })
2318
2317
  ] });
2319
2318
  }, Fe = ({
@@ -2321,27 +2320,27 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2321
2320
  onClose: r,
2322
2321
  onSelect: n,
2323
2322
  options: l = [],
2324
- selectedValue: d,
2325
- title: x = "Select Option",
2326
- subtitle: m = "Choose from the list below",
2327
- icon: h,
2328
- searchable: f = !0,
2329
- searchPlaceholder: k = "Search options..."
2323
+ selectedValue: c,
2324
+ title: h = "Select Option",
2325
+ subtitle: x = "Choose from the list below",
2326
+ icon: m,
2327
+ searchable: p = !0,
2328
+ searchPlaceholder: N = "Search options..."
2330
2329
  }) => {
2331
- const [_, y] = O(""), E = K(null);
2330
+ const [S, R] = z(""), y = K(null);
2332
2331
  J(() => {
2333
- const g = (N) => {
2334
- N.key === "Escape" && r();
2332
+ const g = (i) => {
2333
+ i.key === "Escape" && r();
2335
2334
  };
2336
- return t && (document.addEventListener("keydown", g), f && E.current && setTimeout(() => {
2337
- var N;
2338
- return (N = E.current) == null ? void 0 : N.focus();
2335
+ return t && (document.addEventListener("keydown", g), p && y.current && setTimeout(() => {
2336
+ var i;
2337
+ return (i = y.current) == null ? void 0 : i.focus();
2339
2338
  }, 100)), () => document.removeEventListener("keydown", g);
2340
- }, [t, r, f]);
2341
- const L = _ ? l.filter(
2342
- (g) => g.label.toLowerCase().includes(_.toLowerCase())
2343
- ) : l, C = (g) => {
2344
- n(g), r(), y("");
2339
+ }, [t, r, p]);
2340
+ const E = S ? l.filter(
2341
+ (g) => g.label.toLowerCase().includes(S.toLowerCase())
2342
+ ) : l, M = (g) => {
2343
+ n(g), r(), R("");
2345
2344
  };
2346
2345
  return t ? /* @__PURE__ */ e.jsxs("div", { className: "fixed inset-0 z-[60] flex items-center justify-center p-4 animate-in fade-in duration-200", children: [
2347
2346
  /* @__PURE__ */ e.jsx(
@@ -2355,10 +2354,10 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2355
2354
  /* @__PURE__ */ e.jsxs("div", { className: "flex-shrink-0 px-6 py-5 bg-gradient-to-r from-violet-50 via-indigo-50 to-violet-50 border-b border-slate-200 dark:bg-gradient-to-r dark:from-slate-700/50 dark:via-slate-800/50 dark:to-slate-700/50 dark:border-slate-700", children: [
2356
2355
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
2357
2356
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-3", children: [
2358
- h && /* @__PURE__ */ e.jsx("div", { className: "w-12 h-12 rounded-xl flex items-center justify-center bg-gradient-to-br from-violet-600 to-indigo-600 shadow-lg", children: /* @__PURE__ */ e.jsx(h, { className: "w-6 h-6 text-white" }) }),
2357
+ m && /* @__PURE__ */ e.jsx("div", { className: "w-12 h-12 rounded-xl flex items-center justify-center bg-gradient-to-br from-violet-600 to-indigo-600 shadow-lg", children: /* @__PURE__ */ e.jsx(m, { className: "w-6 h-6 text-white" }) }),
2359
2358
  /* @__PURE__ */ e.jsxs("div", { children: [
2360
- /* @__PURE__ */ e.jsx("h3", { className: "text-lg font-bold text-slate-900 dark:text-white", children: x }),
2361
- m && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400 mt-0.5", children: m })
2359
+ /* @__PURE__ */ e.jsx("h3", { className: "text-lg font-bold text-slate-900 dark:text-white", children: h }),
2360
+ x && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400 mt-0.5", children: x })
2362
2361
  ] })
2363
2362
  ] }),
2364
2363
  /* @__PURE__ */ e.jsx(
@@ -2370,16 +2369,16 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2370
2369
  }
2371
2370
  )
2372
2371
  ] }),
2373
- f && /* @__PURE__ */ e.jsxs("div", { className: "mt-4 relative", children: [
2372
+ p && /* @__PURE__ */ e.jsxs("div", { className: "mt-4 relative", children: [
2374
2373
  /* @__PURE__ */ e.jsx(le, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400 dark:text-slate-500" }),
2375
2374
  /* @__PURE__ */ e.jsx(
2376
2375
  "input",
2377
2376
  {
2378
- ref: E,
2377
+ ref: y,
2379
2378
  type: "text",
2380
- value: _,
2381
- onChange: (g) => y(g.target.value),
2382
- placeholder: k,
2379
+ value: S,
2380
+ onChange: (g) => R(g.target.value),
2381
+ placeholder: N,
2383
2382
  className: `w-full pl-11 pr-4 py-3 rounded-xl border transition-all duration-200
2384
2383
  bg-white border-slate-200 text-slate-900 placeholder-slate-400
2385
2384
  focus:border-violet-400 focus:bg-slate-50
@@ -2390,18 +2389,18 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2390
2389
  )
2391
2390
  ] })
2392
2391
  ] }),
2393
- /* @__PURE__ */ e.jsx("div", { className: "flex-grow overflow-y-auto custom-scrollbar", children: L.length > 0 ? /* @__PURE__ */ e.jsx("div", { className: "p-3 space-y-1", children: L.map((g) => {
2394
- const N = g.value === d;
2392
+ /* @__PURE__ */ e.jsx("div", { className: "flex-grow overflow-y-auto custom-scrollbar", children: E.length > 0 ? /* @__PURE__ */ e.jsx("div", { className: "p-3 space-y-1", children: E.map((g) => {
2393
+ const i = g.value === c;
2395
2394
  return /* @__PURE__ */ e.jsxs(
2396
2395
  "button",
2397
2396
  {
2398
2397
  type: "button",
2399
- onClick: () => C(g.value),
2398
+ onClick: () => M(g.value),
2400
2399
  className: `w-full px-4 py-3.5 rounded-xl text-left flex items-center justify-between transition-all duration-200 group
2401
- ${N ? "bg-gradient-to-r from-violet-600 to-indigo-600 text-white shadow-lg shadow-violet-500/30 dark:shadow-violet-900/30" : "text-slate-700 hover:bg-slate-100 dark:text-slate-300 dark:hover:bg-slate-700/50"}`,
2400
+ ${i ? "bg-gradient-to-r from-violet-600 to-indigo-600 text-white shadow-lg shadow-violet-500/30 dark:shadow-violet-900/30" : "text-slate-700 hover:bg-slate-100 dark:text-slate-300 dark:hover:bg-slate-700/50"}`,
2402
2401
  children: [
2403
2402
  /* @__PURE__ */ e.jsx("span", { className: "font-medium", children: g.label }),
2404
- N && /* @__PURE__ */ e.jsx("div", { className: "w-6 h-6 rounded-full bg-white/20 flex items-center justify-center", children: /* @__PURE__ */ e.jsx(re, { className: "w-4 h-4 text-white" }) })
2403
+ i && /* @__PURE__ */ e.jsx("div", { className: "w-6 h-6 rounded-full bg-white/20 flex items-center justify-center", children: /* @__PURE__ */ e.jsx(re, { className: "w-4 h-4 text-white" }) })
2405
2404
  ]
2406
2405
  },
2407
2406
  g.value
@@ -2412,163 +2411,163 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2412
2411
  /* @__PURE__ */ e.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-500 mt-1", children: "Try adjusting your search terms" })
2413
2412
  ] }) }),
2414
2413
  /* @__PURE__ */ e.jsx("div", { className: "flex-shrink-0 px-6 py-3 border-t border-slate-200 dark:border-slate-700 bg-slate-50 dark:bg-slate-800/50", children: /* @__PURE__ */ e.jsxs("p", { className: "text-xs text-slate-500 dark:text-slate-400 text-center", children: [
2415
- L.length,
2414
+ E.length,
2416
2415
  " option",
2417
- L.length !== 1 ? "s" : "",
2416
+ E.length !== 1 ? "s" : "",
2418
2417
  " available"
2419
2418
  ] }) })
2420
2419
  ] }) })
2421
2420
  ] }) : null;
2422
- }, st = ({
2421
+ }, et = ({
2423
2422
  value: t,
2424
2423
  onChange: r,
2425
2424
  options: n = [],
2426
2425
  placeholder: l = "Select an option",
2427
- label: d,
2428
- icon: x,
2429
- required: m = !1,
2430
- disabled: h = !1,
2431
- error: f,
2432
- searchable: k = !0,
2433
- name: _,
2434
- modalTitle: y,
2435
- modalSubtitle: E
2426
+ label: c,
2427
+ icon: h,
2428
+ required: x = !1,
2429
+ disabled: m = !1,
2430
+ error: p,
2431
+ searchable: N = !0,
2432
+ name: S,
2433
+ modalTitle: R,
2434
+ modalSubtitle: y
2436
2435
  }) => {
2437
- const [L, C] = O(!1), g = n.find((z) => z.value === t), N = (g == null ? void 0 : g.label) || l, c = (z) => {
2438
- r(_, z);
2436
+ const [E, M] = z(!1), g = n.find((D) => D.value === t), i = (g == null ? void 0 : g.label) || l, j = (D) => {
2437
+ r(S, D);
2439
2438
  };
2440
2439
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2441
2440
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
2442
- d && /* @__PURE__ */ e.jsxs("label", { className: "flex items-center text-sm font-semibold text-slate-700 dark:text-slate-300", children: [
2443
- x && /* @__PURE__ */ e.jsx(x, { className: "w-4 h-4 mr-2 text-violet-600 dark:text-violet-400" }),
2444
- d,
2445
- m && /* @__PURE__ */ e.jsx("span", { className: "text-red-500 ml-1", children: "*" })
2441
+ c && /* @__PURE__ */ e.jsxs("label", { className: "flex items-center text-sm font-semibold text-slate-700 dark:text-slate-300", children: [
2442
+ h && /* @__PURE__ */ e.jsx(h, { className: "w-4 h-4 mr-2 text-violet-600 dark:text-violet-400" }),
2443
+ c,
2444
+ x && /* @__PURE__ */ e.jsx("span", { className: "text-red-500 ml-1", children: "*" })
2446
2445
  ] }),
2447
2446
  /* @__PURE__ */ e.jsxs(
2448
2447
  "button",
2449
2448
  {
2450
2449
  type: "button",
2451
- onClick: () => !h && C(!0),
2452
- disabled: h,
2450
+ onClick: () => !m && M(!0),
2451
+ disabled: m,
2453
2452
  className: `w-full px-4 py-3 rounded-xl border transition-all duration-200 flex items-center justify-between text-left
2454
- ${f ? "border-red-500 focus:border-red-500 focus:ring-red-500/20" : "border-slate-200 focus:border-violet-400 dark:border-slate-600 dark:focus:border-violet-500"}
2455
- ${h ? "opacity-50 cursor-not-allowed bg-slate-100 dark:bg-slate-800" : "bg-slate-50 hover:bg-white dark:bg-slate-700/50 dark:hover:bg-slate-700 cursor-pointer"}
2453
+ ${p ? "border-red-500 focus:border-red-500 focus:ring-red-500/20" : "border-slate-200 focus:border-violet-400 dark:border-slate-600 dark:focus:border-violet-500"}
2454
+ ${m ? "opacity-50 cursor-not-allowed bg-slate-100 dark:bg-slate-800" : "bg-slate-50 hover:bg-white dark:bg-slate-700/50 dark:hover:bg-slate-700 cursor-pointer"}
2456
2455
  text-slate-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-violet-500/20`,
2457
2456
  children: [
2458
2457
  /* @__PURE__ */ e.jsx(
2459
2458
  "span",
2460
2459
  {
2461
2460
  className: `text-sm ${t ? "" : "text-slate-400 dark:text-slate-500"}`,
2462
- children: N
2461
+ children: i
2463
2462
  }
2464
2463
  ),
2465
2464
  /* @__PURE__ */ e.jsx(se, { className: "w-5 h-5 text-slate-400 dark:text-slate-500" })
2466
2465
  ]
2467
2466
  }
2468
2467
  ),
2469
- !f && t && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2 mt-2", children: [
2468
+ !p && t && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2 mt-2", children: [
2470
2469
  /* @__PURE__ */ e.jsx("div", { className: "w-5 h-5 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center", children: /* @__PURE__ */ e.jsx(re, { className: "w-3 h-3 text-green-600 dark:text-green-400" }) }),
2471
2470
  /* @__PURE__ */ e.jsx("span", { className: "text-xs text-green-600 dark:text-green-400 font-medium", children: "Selected" })
2472
2471
  ] }),
2473
- f && /* @__PURE__ */ e.jsx("p", { className: "text-xs text-red-500 flex items-center space-x-1 mt-1", children: /* @__PURE__ */ e.jsx("span", { children: f }) })
2472
+ p && /* @__PURE__ */ e.jsx("p", { className: "text-xs text-red-500 flex items-center space-x-1 mt-1", children: /* @__PURE__ */ e.jsx("span", { children: p }) })
2474
2473
  ] }),
2475
2474
  /* @__PURE__ */ e.jsx(
2476
2475
  Fe,
2477
2476
  {
2478
- isOpen: L,
2479
- onClose: () => C(!1),
2480
- onSelect: c,
2477
+ isOpen: E,
2478
+ onClose: () => M(!1),
2479
+ onSelect: j,
2481
2480
  options: n,
2482
2481
  selectedValue: t,
2483
- title: y || d || "Select Option",
2484
- subtitle: E || `Choose from ${n.length} options`,
2485
- icon: x,
2486
- searchable: k
2482
+ title: R || c || "Select Option",
2483
+ subtitle: y || `Choose from ${n.length} options`,
2484
+ icon: h,
2485
+ searchable: N
2487
2486
  }
2488
2487
  )
2489
2488
  ] });
2490
- }, at = ({
2489
+ }, tt = ({
2491
2490
  steps: t = [],
2492
2491
  initialData: r = {},
2493
2492
  onSubmit: n,
2494
2493
  onCancel: l,
2495
- onEdit: d,
2496
- onStepChange: x,
2497
- submitButtonText: m = "Submit",
2498
- cancelButtonText: h = "Cancel",
2499
- editButtonText: f = "Edit Record",
2500
- showEditingBadge: k = !1,
2501
- editingEntity: _ = "",
2502
- helpText: y = "All fields marked with * are required",
2503
- isModal: E = !0,
2504
- mode: L = "create"
2494
+ onEdit: c,
2495
+ onStepChange: h,
2496
+ submitButtonText: x = "Submit",
2497
+ cancelButtonText: m = "Cancel",
2498
+ editButtonText: p = "Edit Record",
2499
+ showEditingBadge: N = !1,
2500
+ editingEntity: S = "",
2501
+ helpText: R = "All fields marked with * are required",
2502
+ isModal: y = !0,
2503
+ mode: E = "create"
2505
2504
  }) => {
2506
2505
  var s;
2507
- const C = K(null), [g, N] = O(0), [c, z] = O(
2506
+ const M = K(null), [g, i] = z(0), [j, D] = z(
2508
2507
  () => typeof window < "u" ? window.innerWidth >= 1024 : !0
2509
- ), [I, V] = O(() => {
2508
+ ), [T, V] = z(() => {
2510
2509
  const a = typeof t == "function" ? t(r) : t, o = {};
2511
- return a.forEach((p) => {
2512
- p.fields && p.fields.forEach((w) => {
2513
- o[w.name] = r[w.name] || "";
2510
+ return a.forEach((f) => {
2511
+ f.fields && f.fields.forEach((k) => {
2512
+ o[k.name] = r[k.name] || "";
2514
2513
  });
2515
2514
  }), o;
2516
- }), [M, Y] = O({}), [U, B] = O(/* @__PURE__ */ new Set([0])), j = L === "view", W = L === "edit", i = typeof t == "function" ? t(I) : t;
2515
+ }), [I, Y] = z({}), [U, B] = z(/* @__PURE__ */ new Set([0])), w = E === "view", W = E === "edit", d = typeof t == "function" ? t(T) : t;
2517
2516
  J(() => {
2518
- x && x(g, I);
2519
- }, [g, I, x]);
2517
+ h && h(g, T);
2518
+ }, [g, T, h]);
2520
2519
  const v = () => {
2521
2520
  var a;
2522
- (a = C.current) == null || a.scrollTo({ top: 0, behavior: "smooth" });
2523
- }, S = (a, o) => {
2524
- if (j) return;
2525
- const w = i.flatMap((D) => D.fields || []).find((D) => D.name === a);
2526
- V((D) => {
2527
- const R = { ...D, [a]: o };
2528
- return w != null && w.resetFieldsOnChange && w.resetFieldsOnChange.forEach((q) => {
2529
- R[q] = "";
2530
- }), R;
2531
- }), M[a] && Y((D) => ({ ...D, [a]: "" })), w != null && w.onChange && w.onChange(a, o);
2532
- }, P = (a) => {
2533
- if (j) return !0;
2534
- const o = {}, p = i[a];
2535
- if (p.customValidator) {
2536
- const w = p.customValidator(a, I);
2537
- Object.assign(o, w);
2521
+ (a = M.current) == null || a.scrollTo({ top: 0, behavior: "smooth" });
2522
+ }, C = (a, o) => {
2523
+ if (w) return;
2524
+ const k = d.flatMap((P) => P.fields || []).find((P) => P.name === a);
2525
+ V((P) => {
2526
+ const L = { ...P, [a]: o };
2527
+ return k != null && k.resetFieldsOnChange && k.resetFieldsOnChange.forEach((q) => {
2528
+ L[q] = "";
2529
+ }), L;
2530
+ }), I[a] && Y((P) => ({ ...P, [a]: "" })), k != null && k.onChange && k.onChange(a, o);
2531
+ }, A = (a) => {
2532
+ if (w) return !0;
2533
+ const o = {}, f = d[a];
2534
+ if (f.customValidator) {
2535
+ const k = f.customValidator(a, T);
2536
+ Object.assign(o, k);
2538
2537
  }
2539
- return p.fields && p.fields.length > 0 && p.fields.forEach((w) => {
2540
- const D = I[w.name];
2541
- if (w.required && !D) {
2542
- o[w.name] = `${w.label} is required`;
2538
+ return f.fields && f.fields.length > 0 && f.fields.forEach((k) => {
2539
+ const P = T[k.name];
2540
+ if (k.required && !P) {
2541
+ o[k.name] = `${k.label} is required`;
2543
2542
  return;
2544
2543
  }
2545
- if (D && w.validation) {
2546
- const { minLength: R, maxLength: q, pattern: u, min: Q, max: Z, custom: me } = w.validation;
2547
- R && D.length < R && (o[w.name] = `Minimum ${R} characters required`), q && D.length > q && (o[w.name] = `Maximum ${q} characters allowed`), u && !u.test(D) && (o[w.name] = w.validation.message || "Invalid format"), Q !== void 0 && parseFloat(D) < Q && (o[w.name] = w.validation.message || `Minimum value is ${Q}`), Z !== void 0 && parseFloat(D) > Z && (o[w.name] = w.validation.message || `Maximum value is ${Z}`), me && !me(D) && (o[w.name] = w.validation.message || "Validation failed");
2544
+ if (P && k.validation) {
2545
+ const { minLength: L, maxLength: q, pattern: u, min: Q, max: Z, custom: me } = k.validation;
2546
+ L && P.length < L && (o[k.name] = `Minimum ${L} characters required`), q && P.length > q && (o[k.name] = `Maximum ${q} characters allowed`), u && !u.test(P) && (o[k.name] = k.validation.message || "Invalid format"), Q !== void 0 && parseFloat(P) < Q && (o[k.name] = k.validation.message || `Minimum value is ${Q}`), Z !== void 0 && parseFloat(P) > Z && (o[k.name] = k.validation.message || `Maximum value is ${Z}`), me && !me(P) && (o[k.name] = k.validation.message || "Validation failed");
2548
2547
  }
2549
2548
  }), Y(o), Object.keys(o).length === 0;
2550
- }, A = (a) => {
2551
- if (a.preventDefault(), a.stopPropagation(), P(g)) {
2549
+ }, O = (a) => {
2550
+ if (a.preventDefault(), a.stopPropagation(), A(g)) {
2552
2551
  const o = g + 1;
2553
- N(o), B((p) => /* @__PURE__ */ new Set([...p, o])), v();
2552
+ i(o), B((f) => /* @__PURE__ */ new Set([...f, o])), v();
2554
2553
  }
2555
2554
  }, b = (a) => {
2556
- a.preventDefault(), a.stopPropagation(), N((o) => o - 1), v();
2555
+ a.preventDefault(), a.stopPropagation(), i((o) => o - 1), v();
2557
2556
  }, $ = (a) => {
2558
- if (typeof window < "u" && window.innerWidth < 1024 && z(!1), j) {
2559
- N(a), B((o) => /* @__PURE__ */ new Set([...o, a])), v();
2557
+ if (typeof window < "u" && window.innerWidth < 1024 && D(!1), w) {
2558
+ i(a), B((o) => /* @__PURE__ */ new Set([...o, a])), v();
2560
2559
  return;
2561
2560
  }
2562
- (U.has(a) || a === g + 1) && (a > g ? P(g) && (N(a), B((o) => /* @__PURE__ */ new Set([...o, a])), v()) : (N(a), v()));
2561
+ (U.has(a) || a === g + 1) && (a > g ? A(g) && (i(a), B((o) => /* @__PURE__ */ new Set([...o, a])), v()) : (i(a), v()));
2563
2562
  }, F = (a) => {
2564
- a.preventDefault(), !j && P(g) && n(I);
2565
- }, H = g === i.length - 1, G = g === 0;
2563
+ a.preventDefault(), !w && A(g) && n(T);
2564
+ }, H = g === d.length - 1, G = g === 0;
2566
2565
  return /* @__PURE__ */ e.jsxs("form", { onSubmit: F, className: "flex h-full overflow-hidden relative", children: [
2567
- c && /* @__PURE__ */ e.jsx(
2566
+ j && /* @__PURE__ */ e.jsx(
2568
2567
  "div",
2569
2568
  {
2570
2569
  className: "lg:hidden absolute inset-0 z-20 bg-black/40 backdrop-blur-[1px]",
2571
- onClick: () => z(!1)
2570
+ onClick: () => D(!1)
2572
2571
  }
2573
2572
  ),
2574
2573
  /* @__PURE__ */ e.jsxs("div", { className: `
@@ -2576,20 +2575,20 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2576
2575
  border-r border-slate-200 dark:border-slate-700
2577
2576
  absolute z-30 h-full bg-white dark:bg-slate-800
2578
2577
  lg:relative lg:flex-shrink-0 lg:z-auto lg:h-auto lg:bg-transparent dark:lg:bg-transparent
2579
- ${c ? "w-52 lg:w-56" : "w-0 lg:w-10"}
2578
+ ${j ? "w-52 lg:w-56" : "w-0 lg:w-10"}
2580
2579
  `, children: [
2581
- !c && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col h-full items-center justify-between py-4 px-2 gap-3", children: [
2582
- /* @__PURE__ */ e.jsx("div", { className: "flex flex-col items-center gap-2 flex-1 justify-center", children: i.map((a, o) => {
2583
- const p = o === g, w = o < g;
2580
+ !j && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col h-full items-center justify-between py-4 px-2 gap-3", children: [
2581
+ /* @__PURE__ */ e.jsx("div", { className: "flex flex-col items-center gap-2 flex-1 justify-center", children: d.map((a, o) => {
2582
+ const f = o === g, k = o < g;
2584
2583
  return /* @__PURE__ */ e.jsx(
2585
2584
  "button",
2586
2585
  {
2587
2586
  type: "button",
2588
2587
  onClick: () => $(o),
2589
- title: i[o].title,
2588
+ title: d[o].title,
2590
2589
  className: `
2591
2590
  rounded-full transition-all duration-300 flex-shrink-0
2592
- ${w ? "w-2 h-2 bg-emerald-500 shadow-sm" : p ? j ? "w-2.5 h-2.5 bg-blue-500 shadow-md ring-2 ring-blue-300/40 dark:ring-blue-600/40" : "w-2.5 h-2.5 bg-violet-500 shadow-md ring-2 ring-violet-300/40 dark:ring-violet-600/40" : "w-2 h-2 bg-slate-300 dark:bg-slate-600 hover:bg-slate-400"}
2591
+ ${k ? "w-2 h-2 bg-emerald-500 shadow-sm" : f ? w ? "w-2.5 h-2.5 bg-blue-500 shadow-md ring-2 ring-blue-300/40 dark:ring-blue-600/40" : "w-2.5 h-2.5 bg-violet-500 shadow-md ring-2 ring-violet-300/40 dark:ring-violet-600/40" : "w-2 h-2 bg-slate-300 dark:bg-slate-600 hover:bg-slate-400"}
2593
2592
  `
2594
2593
  },
2595
2594
  o
@@ -2598,23 +2597,23 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2598
2597
  /* @__PURE__ */ e.jsx("div", { className: "w-1 h-16 bg-slate-200/60 dark:bg-slate-700/60 rounded-full overflow-hidden", children: /* @__PURE__ */ e.jsx(
2599
2598
  "div",
2600
2599
  {
2601
- className: `w-full rounded-full transition-all duration-500 ${j ? "bg-blue-500" : "bg-gradient-to-b from-violet-500 to-indigo-500"}`,
2602
- style: { height: `${(g + 1) / i.length * 100}%` }
2600
+ className: `w-full rounded-full transition-all duration-500 ${w ? "bg-blue-500" : "bg-gradient-to-b from-violet-500 to-indigo-500"}`,
2601
+ style: { height: `${(g + 1) / d.length * 100}%` }
2603
2602
  }
2604
2603
  ) })
2605
2604
  ] }),
2606
- c && /* @__PURE__ */ e.jsxs("div", { className: "h-full flex flex-col px-3 sm:px-4 pt-4 pb-4 overflow-y-auto", children: [
2607
- /* @__PURE__ */ e.jsx("div", { className: "flex-1 space-y-1.5 mb-4", children: i.map((a, o) => {
2608
- const p = o === g, w = (j || U.has(o)) && o < g, D = j ? !0 : U.has(o) || o === g + 1, R = a.icon;
2605
+ j && /* @__PURE__ */ e.jsxs("div", { className: "h-full flex flex-col px-3 sm:px-4 pt-4 pb-4 overflow-y-auto", children: [
2606
+ /* @__PURE__ */ e.jsx("div", { className: "flex-1 space-y-1.5 mb-4", children: d.map((a, o) => {
2607
+ const f = o === g, k = (w || U.has(o)) && o < g, P = w ? !0 : U.has(o) || o === g + 1, L = a.icon;
2609
2608
  return /* @__PURE__ */ e.jsx(
2610
2609
  "button",
2611
2610
  {
2612
2611
  type: "button",
2613
- onClick: () => D && $(o),
2614
- disabled: !D,
2612
+ onClick: () => P && $(o),
2613
+ disabled: !P,
2615
2614
  className: `
2616
2615
  w-full p-3 rounded-xl transition-all duration-200 text-left
2617
- ${p ? j ? "bg-gradient-to-r from-blue-600 to-cyan-600 text-white shadow-md scale-[1.01]" : "bg-gradient-to-r from-violet-600 to-indigo-600 text-white shadow-md scale-[1.01]" : w ? "bg-white dark:bg-slate-800/50 border border-emerald-200 dark:border-emerald-500/30 hover:shadow-sm" : D ? "bg-white dark:bg-slate-800/50 border border-slate-200 dark:border-slate-700 hover:shadow-sm" : "bg-slate-100 dark:bg-slate-800/30 border border-slate-200 dark:border-slate-700 opacity-50 cursor-not-allowed"}
2616
+ ${f ? w ? "bg-gradient-to-r from-blue-600 to-cyan-600 text-white shadow-md scale-[1.01]" : "bg-gradient-to-r from-violet-600 to-indigo-600 text-white shadow-md scale-[1.01]" : k ? "bg-white dark:bg-slate-800/50 border border-emerald-200 dark:border-emerald-500/30 hover:shadow-sm" : P ? "bg-white dark:bg-slate-800/50 border border-slate-200 dark:border-slate-700 hover:shadow-sm" : "bg-slate-100 dark:bg-slate-800/30 border border-slate-200 dark:border-slate-700 opacity-50 cursor-not-allowed"}
2618
2617
  `,
2619
2618
  children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2.5", children: [
2620
2619
  /* @__PURE__ */ e.jsx(
@@ -2622,35 +2621,35 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2622
2621
  {
2623
2622
  className: `
2624
2623
  w-8 h-8 rounded-lg flex items-center justify-center flex-shrink-0 transition-all
2625
- ${p ? "bg-white/20" : w ? "bg-emerald-100 dark:bg-emerald-500/20" : "bg-slate-100 dark:bg-slate-700"}
2624
+ ${f ? "bg-white/20" : k ? "bg-emerald-100 dark:bg-emerald-500/20" : "bg-slate-100 dark:bg-slate-700"}
2626
2625
  `,
2627
- children: w && !p ? /* @__PURE__ */ e.jsx(ze, { className: "w-4 h-4 text-emerald-600 dark:text-emerald-400" }) : /* @__PURE__ */ e.jsx(
2628
- R,
2626
+ children: k && !f ? /* @__PURE__ */ e.jsx(_e, { className: "w-4 h-4 text-emerald-600 dark:text-emerald-400" }) : /* @__PURE__ */ e.jsx(
2627
+ L,
2629
2628
  {
2630
- className: `w-4 h-4 ${p ? "text-white" : D ? j ? "text-blue-600 dark:text-blue-400" : "text-violet-600 dark:text-violet-400" : "text-slate-400 dark:text-slate-500"}`
2629
+ className: `w-4 h-4 ${f ? "text-white" : P ? w ? "text-blue-600 dark:text-blue-400" : "text-violet-600 dark:text-violet-400" : "text-slate-400 dark:text-slate-500"}`
2631
2630
  }
2632
2631
  )
2633
2632
  }
2634
2633
  ),
2635
2634
  /* @__PURE__ */ e.jsxs("div", { className: "flex-1 min-w-0", children: [
2636
2635
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1.5 mb-0.5", children: [
2637
- /* @__PURE__ */ e.jsxs("span", { className: `text-[10px] font-semibold uppercase tracking-wider ${p ? "text-white/70" : "text-slate-400 dark:text-slate-500"}`, children: [
2638
- j ? "§" : "#",
2636
+ /* @__PURE__ */ e.jsxs("span", { className: `text-[10px] font-semibold uppercase tracking-wider ${f ? "text-white/70" : "text-slate-400 dark:text-slate-500"}`, children: [
2637
+ w ? "§" : "#",
2639
2638
  o + 1
2640
2639
  ] }),
2641
- w && !p && !j && /* @__PURE__ */ e.jsx("span", { className: "inline-flex items-center px-1.5 py-0.5 rounded-full text-[10px] font-semibold bg-emerald-100 text-emerald-700 dark:bg-emerald-500/20 dark:text-emerald-400", children: "✓" })
2640
+ k && !f && !w && /* @__PURE__ */ e.jsx("span", { className: "inline-flex items-center px-1.5 py-0.5 rounded-full text-[10px] font-semibold bg-emerald-100 text-emerald-700 dark:bg-emerald-500/20 dark:text-emerald-400", children: "✓" })
2642
2641
  ] }),
2643
- /* @__PURE__ */ e.jsx("p", { className: `text-xs font-semibold truncate leading-tight ${p ? "text-white" : w ? "text-slate-900 dark:text-white" : D ? "text-slate-700 dark:text-slate-300" : "text-slate-400 dark:text-slate-500"}`, children: a.title }),
2644
- a.subtitle && /* @__PURE__ */ e.jsx("p", { className: `text-[10px] mt-0.5 line-clamp-1 leading-snug ${p ? "text-white/75" : "text-slate-400 dark:text-slate-500"}`, children: a.subtitle })
2642
+ /* @__PURE__ */ e.jsx("p", { className: `text-xs font-semibold truncate leading-tight ${f ? "text-white" : k ? "text-slate-900 dark:text-white" : P ? "text-slate-700 dark:text-slate-300" : "text-slate-400 dark:text-slate-500"}`, children: a.title }),
2643
+ a.subtitle && /* @__PURE__ */ e.jsx("p", { className: `text-[10px] mt-0.5 line-clamp-1 leading-snug ${f ? "text-white/75" : "text-slate-400 dark:text-slate-500"}`, children: a.subtitle })
2645
2644
  ] })
2646
2645
  ] })
2647
2646
  },
2648
2647
  o
2649
2648
  );
2650
2649
  }) }),
2651
- !j && y && /* @__PURE__ */ e.jsx("div", { className: "p-3 rounded-xl bg-blue-50 border border-blue-200 dark:bg-blue-900/20 dark:border-blue-800/30 flex-shrink-0", children: /* @__PURE__ */ e.jsxs("p", { className: "text-[11px] text-slate-600 dark:text-slate-400 leading-relaxed", children: [
2650
+ !w && R && /* @__PURE__ */ e.jsx("div", { className: "p-3 rounded-xl bg-blue-50 border border-blue-200 dark:bg-blue-900/20 dark:border-blue-800/30 flex-shrink-0", children: /* @__PURE__ */ e.jsxs("p", { className: "text-[11px] text-slate-600 dark:text-slate-400 leading-relaxed", children: [
2652
2651
  /* @__PURE__ */ e.jsx("span", { className: "font-semibold text-blue-600 dark:text-blue-400", children: "Tip: " }),
2653
- y
2652
+ R
2654
2653
  ] }) })
2655
2654
  ] })
2656
2655
  ] }),
@@ -2662,31 +2661,31 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2662
2661
  "button",
2663
2662
  {
2664
2663
  type: "button",
2665
- onClick: () => z(!c),
2664
+ onClick: () => D(!j),
2666
2665
  className: `p-2.5 rounded-lg border border-slate-200 dark:border-slate-600
2667
2666
  bg-white dark:bg-slate-700 text-slate-500 dark:text-slate-400
2668
2667
  hover:bg-violet-50 hover:border-violet-300 hover:text-violet-600
2669
2668
  dark:hover:bg-violet-900/30 dark:hover:border-violet-600 dark:hover:text-violet-400
2670
2669
  transition-all duration-200 active:scale-95`,
2671
2670
  "aria-label": "Toggle steps",
2672
- children: c ? /* @__PURE__ */ e.jsx(ie, { className: "w-4 h-4" }) : /* @__PURE__ */ e.jsx(se, { className: "w-4 h-4" })
2671
+ children: j ? /* @__PURE__ */ e.jsx(ie, { className: "w-4 h-4" }) : /* @__PURE__ */ e.jsx(se, { className: "w-4 h-4" })
2673
2672
  }
2674
2673
  ),
2675
2674
  /* @__PURE__ */ e.jsxs("div", { className: "flex-1 min-w-0", children: [
2676
- /* @__PURE__ */ e.jsx("p", { className: "text-xs font-semibold text-slate-700 dark:text-slate-300 truncate", children: i[g].title }),
2677
- /* @__PURE__ */ e.jsxs("p", { className: `text-[10px] font-medium ${j ? "text-blue-500" : "text-violet-500"}`, children: [
2678
- j ? "Section" : "Step",
2675
+ /* @__PURE__ */ e.jsx("p", { className: "text-xs font-semibold text-slate-700 dark:text-slate-300 truncate", children: d[g].title }),
2676
+ /* @__PURE__ */ e.jsxs("p", { className: `text-[10px] font-medium ${w ? "text-blue-500" : "text-violet-500"}`, children: [
2677
+ w ? "Section" : "Step",
2679
2678
  " ",
2680
2679
  g + 1,
2681
2680
  "/",
2682
- i.length
2681
+ d.length
2683
2682
  ] })
2684
2683
  ] }),
2685
2684
  /* @__PURE__ */ e.jsx("div", { className: "w-16 h-1.5 bg-slate-200 dark:bg-slate-700 rounded-full overflow-hidden flex-shrink-0", children: /* @__PURE__ */ e.jsx(
2686
2685
  "div",
2687
2686
  {
2688
- className: `h-1.5 rounded-full transition-all duration-300 ${j ? "bg-blue-500" : "bg-gradient-to-r from-violet-500 to-indigo-500"}`,
2689
- style: { width: `${(g + 1) / i.length * 100}%` }
2687
+ className: `h-1.5 rounded-full transition-all duration-300 ${w ? "bg-blue-500" : "bg-gradient-to-r from-violet-500 to-indigo-500"}`,
2688
+ style: { width: `${(g + 1) / d.length * 100}%` }
2690
2689
  }
2691
2690
  ) })
2692
2691
  ] }),
@@ -2694,7 +2693,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2694
2693
  "button",
2695
2694
  {
2696
2695
  type: "button",
2697
- onClick: () => z(!c),
2696
+ onClick: () => D(!j),
2698
2697
  className: `hidden lg:flex absolute left-0 top-5 -translate-x-[1.625rem] z-20
2699
2698
  w-6 h-6 lg:w-7 lg:h-7 rounded-full
2700
2699
  bg-white dark:bg-slate-800
@@ -2705,19 +2704,19 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2705
2704
  hover:border-violet-300 dark:hover:border-violet-600
2706
2705
  hover:scale-110 active:scale-95
2707
2706
  transition-all duration-200 group`,
2708
- "aria-label": c ? "Collapse steps" : "Expand steps",
2709
- children: c ? /* @__PURE__ */ e.jsx(ie, { className: "w-3 h-3 lg:w-3.5 lg:h-3.5 text-slate-400 group-hover:text-violet-500 transition-colors" }) : /* @__PURE__ */ e.jsx(se, { className: "w-3 h-3 lg:w-3.5 lg:h-3.5 text-slate-400 group-hover:text-violet-500 transition-colors" })
2707
+ "aria-label": j ? "Collapse steps" : "Expand steps",
2708
+ children: j ? /* @__PURE__ */ e.jsx(ie, { className: "w-3 h-3 lg:w-3.5 lg:h-3.5 text-slate-400 group-hover:text-violet-500 transition-colors" }) : /* @__PURE__ */ e.jsx(se, { className: "w-3 h-3 lg:w-3.5 lg:h-3.5 text-slate-400 group-hover:text-violet-500 transition-colors" })
2710
2709
  }
2711
2710
  ),
2712
- /* @__PURE__ */ e.jsx("div", { ref: C, className: "flex-1 min-h-0 overflow-y-auto px-3.5 sm:px-5 lg:px-6 py-4 sm:py-5", children: /* @__PURE__ */ e.jsx("div", { className: "space-y-4 sm:space-y-5 w-full", children: i[g].customRender ? j && i[g].customViewRender ? /* @__PURE__ */ e.jsx("div", { className: "w-full", children: typeof i[g].customViewRender == "function" ? i[g].customViewRender() : i[g].customViewRender }) : /* @__PURE__ */ e.jsx("div", { className: "w-full", children: typeof i[g].customRender == "function" ? i[g].customRender({ formData: I, errors: M, handleChange: S, mode: L }) : i[g].customRender }) : (s = i[g].fields) == null ? void 0 : s.map((a, o) => /* @__PURE__ */ e.jsx(
2713
- je,
2711
+ /* @__PURE__ */ e.jsx("div", { ref: M, className: "flex-1 min-h-0 overflow-y-auto px-3.5 sm:px-5 lg:px-6 py-4 sm:py-5", children: /* @__PURE__ */ e.jsx("div", { className: "space-y-4 sm:space-y-5 w-full", children: d[g].customRender ? w && d[g].customViewRender ? /* @__PURE__ */ e.jsx("div", { className: "w-full", children: typeof d[g].customViewRender == "function" ? d[g].customViewRender() : d[g].customViewRender }) : /* @__PURE__ */ e.jsx("div", { className: "w-full", children: typeof d[g].customRender == "function" ? d[g].customRender({ formData: T, errors: I, handleChange: C, mode: E }) : d[g].customRender }) : (s = d[g].fields) == null ? void 0 : s.map((a, o) => /* @__PURE__ */ e.jsx(
2712
+ we,
2714
2713
  {
2715
2714
  index: o,
2716
- field: { ...a, disabled: j || a.disabled },
2717
- value: I[a.name],
2718
- onChange: S,
2719
- error: M[a.name],
2720
- mode: L
2715
+ field: { ...a, disabled: w || a.disabled },
2716
+ value: T[a.name],
2717
+ onChange: C,
2718
+ error: I[a.name],
2719
+ mode: E
2721
2720
  },
2722
2721
  a.name || o
2723
2722
  )) }) }),
@@ -2742,7 +2741,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2742
2741
  }
2743
2742
  ),
2744
2743
  /* @__PURE__ */ e.jsx("div", { className: "flex-1" }),
2745
- /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: j ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2744
+ /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: w ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2746
2745
  /* @__PURE__ */ e.jsxs(
2747
2746
  "button",
2748
2747
  {
@@ -2764,7 +2763,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2764
2763
  "button",
2765
2764
  {
2766
2765
  type: "button",
2767
- onClick: A,
2766
+ onClick: O,
2768
2767
  className: `inline-flex items-center gap-1.5 px-3.5 py-2.5 sm:px-4 sm:py-2.5
2769
2768
  rounded-xl text-sm font-semibold transition-all duration-200
2770
2769
  bg-white hover:bg-slate-50 text-slate-700
@@ -2777,11 +2776,11 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2777
2776
  ]
2778
2777
  }
2779
2778
  ),
2780
- d && /* @__PURE__ */ e.jsxs(
2779
+ c && /* @__PURE__ */ e.jsxs(
2781
2780
  "button",
2782
2781
  {
2783
2782
  type: "button",
2784
- onClick: d,
2783
+ onClick: c,
2785
2784
  className: `inline-flex items-center gap-1.5 px-3.5 py-2.5 sm:px-4 sm:py-2.5
2786
2785
  rounded-xl text-sm font-semibold transition-all duration-200
2787
2786
  bg-gradient-to-r from-violet-600 to-indigo-600
@@ -2790,7 +2789,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2790
2789
  hover:scale-105 active:scale-95`,
2791
2790
  children: [
2792
2791
  /* @__PURE__ */ e.jsx(oe, { className: "w-4 h-4 flex-shrink-0" }),
2793
- /* @__PURE__ */ e.jsx("span", { className: "hidden sm:inline", children: f }),
2792
+ /* @__PURE__ */ e.jsx("span", { className: "hidden sm:inline", children: p }),
2794
2793
  /* @__PURE__ */ e.jsx("span", { className: "sm:hidden", children: "Edit" })
2795
2794
  ]
2796
2795
  }
@@ -2812,7 +2811,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2812
2811
  `,
2813
2812
  children: [
2814
2813
  /* @__PURE__ */ e.jsx(X, { className: "w-4 h-4 flex-shrink-0" }),
2815
- /* @__PURE__ */ e.jsx("span", { className: "hidden sm:inline", children: h })
2814
+ /* @__PURE__ */ e.jsx("span", { className: "hidden sm:inline", children: m })
2816
2815
  ]
2817
2816
  }
2818
2817
  ),
@@ -2828,14 +2827,14 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2828
2827
  hover:scale-105 active:scale-95`,
2829
2828
  children: [
2830
2829
  /* @__PURE__ */ e.jsx(re, { className: "w-4 h-4 flex-shrink-0" }),
2831
- /* @__PURE__ */ e.jsx("span", { children: m })
2830
+ /* @__PURE__ */ e.jsx("span", { children: x })
2832
2831
  ]
2833
2832
  }
2834
2833
  ) : /* @__PURE__ */ e.jsxs(
2835
2834
  "button",
2836
2835
  {
2837
2836
  type: "button",
2838
- onClick: A,
2837
+ onClick: O,
2839
2838
  className: `inline-flex items-center gap-1.5 px-3.5 py-2.5 sm:px-4 sm:py-2.5
2840
2839
  rounded-xl text-sm font-semibold transition-all duration-200
2841
2840
  bg-white hover:bg-slate-50 text-slate-700
@@ -2852,14 +2851,14 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2852
2851
  ] }) })
2853
2852
  ] })
2854
2853
  ] });
2855
- }, rt = ({
2854
+ }, st = ({
2856
2855
  header: t,
2857
2856
  error: r = null,
2858
2857
  errorDescription: n = null,
2859
2858
  onErrorClose: l,
2860
- children: d,
2861
- loading: x = !1,
2862
- loadingMessage: m = "Loading data..."
2859
+ children: c,
2860
+ loading: h = !1,
2861
+ loadingMessage: x = "Loading data..."
2863
2862
  }) => /* @__PURE__ */ e.jsx("div", { className: "h-full w-full flex flex-col overflow-hidden p-2.5 sm:p-3.5", children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2.5 sm:gap-3 h-full overflow-hidden", children: [
2864
2863
  t && /* @__PURE__ */ e.jsx("div", { className: "flex-shrink-0", children: t }),
2865
2864
  r && /* @__PURE__ */ e.jsx("div", { className: `
@@ -2872,7 +2871,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2872
2871
  flex-shrink-0 w-7 h-7 sm:w-8 sm:h-8 rounded-lg mt-0.5
2873
2872
  bg-red-100 dark:bg-red-800/30
2874
2873
  flex items-center justify-center
2875
- `, children: /* @__PURE__ */ e.jsx(we, { className: "w-3.5 h-3.5 sm:w-4 sm:h-4 text-red-600 dark:text-red-400" }) }),
2874
+ `, children: /* @__PURE__ */ e.jsx(ke, { className: "w-3.5 h-3.5 sm:w-4 sm:h-4 text-red-600 dark:text-red-400" }) }),
2876
2875
  /* @__PURE__ */ e.jsxs("div", { className: "flex-1 min-w-0", children: [
2877
2876
  /* @__PURE__ */ e.jsx("p", { className: "text-sm font-semibold text-red-800 dark:text-red-300 leading-snug", children: r }),
2878
2877
  n && /* @__PURE__ */ e.jsx("p", { className: "mt-0.5 text-xs text-red-700/80 dark:text-red-400 leading-relaxed", children: n })
@@ -2891,7 +2890,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2891
2890
  }
2892
2891
  )
2893
2892
  ] }) }) }),
2894
- /* @__PURE__ */ e.jsx("div", { className: "flex-grow min-h-0 overflow-y-auto", children: x ? /* @__PURE__ */ e.jsx("div", { className: `
2893
+ /* @__PURE__ */ e.jsx("div", { className: "flex-grow min-h-0 overflow-y-auto", children: h ? /* @__PURE__ */ e.jsx("div", { className: `
2895
2894
  h-full flex items-center justify-center
2896
2895
  rounded-xl sm:rounded-2xl border
2897
2896
  bg-white border-slate-200/60 shadow-sm
@@ -2902,51 +2901,51 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2902
2901
  /* @__PURE__ */ e.jsx("div", { className: `absolute inset-0 rounded-full border-[2.5px] border-transparent
2903
2902
  border-t-violet-600 dark:border-t-violet-400 animate-spin` })
2904
2903
  ] }),
2905
- /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-1", children: [0, 120, 240].map((h) => /* @__PURE__ */ e.jsx(
2904
+ /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-1", children: [0, 120, 240].map((m) => /* @__PURE__ */ e.jsx(
2906
2905
  "span",
2907
2906
  {
2908
2907
  className: `w-1 h-1 rounded-full bg-gradient-to-r from-violet-500 to-indigo-500
2909
2908
  animate-bounce`,
2910
- style: { animationDelay: `${h}ms` }
2909
+ style: { animationDelay: `${m}ms` }
2911
2910
  },
2912
- h
2911
+ m
2913
2912
  )) }),
2914
- /* @__PURE__ */ e.jsx("p", { className: "text-xs font-medium text-slate-500 dark:text-slate-400", children: m })
2915
- ] }) }) : d })
2916
- ] }) }), lt = ({
2913
+ /* @__PURE__ */ e.jsx("p", { className: "text-xs font-medium text-slate-500 dark:text-slate-400", children: x })
2914
+ ] }) }) : c })
2915
+ ] }) }), at = ({
2917
2916
  message: t = "Loading...",
2918
2917
  supportingMessage: r = !1,
2919
2918
  title: n = "Loading Data",
2920
2919
  className: l = "",
2921
- size: d = "lg"
2920
+ size: c = "lg"
2922
2921
  }) => {
2923
- const x = {
2922
+ const h = {
2924
2923
  sm: "h-7 w-7 border-2",
2925
2924
  md: "h-9 w-9 border-[3px]",
2926
2925
  lg: "h-10 w-10 sm:h-12 sm:w-12 border-[3px] sm:border-[4px]",
2927
2926
  xl: "h-12 w-12 sm:h-16 sm:w-16 border-[4px]"
2928
2927
  };
2929
2928
  return /* @__PURE__ */ e.jsxs("div", { className: `flex flex-col items-center justify-center h-full w-full text-center px-4 ${l}`, children: [
2930
- /* @__PURE__ */ e.jsx("div", { className: `animate-spin rounded-full ${x[d]}
2929
+ /* @__PURE__ */ e.jsx("div", { className: `animate-spin rounded-full ${h[c]}
2931
2930
  border-slate-200 border-t-violet-500 border-r-violet-500 mb-4` }),
2932
- /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-1 mb-3", children: [0, 120, 240].map((m) => /* @__PURE__ */ e.jsx(
2931
+ /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-1 mb-3", children: [0, 120, 240].map((x) => /* @__PURE__ */ e.jsx(
2933
2932
  "span",
2934
2933
  {
2935
2934
  className: "w-1 h-1 rounded-full bg-gradient-to-r from-violet-500 to-indigo-500 animate-bounce",
2936
- style: { animationDelay: `${m}ms` }
2935
+ style: { animationDelay: `${x}ms` }
2937
2936
  },
2938
- m
2937
+ x
2939
2938
  )) }),
2940
2939
  /* @__PURE__ */ e.jsx("h3", { className: "text-sm sm:text-base font-semibold text-slate-900 dark:text-slate-200 mb-1", children: n }),
2941
2940
  /* @__PURE__ */ e.jsx("p", { className: "text-xs sm:text-sm text-slate-500 dark:text-slate-400 max-w-xs", children: r || t })
2942
2941
  ] });
2943
- }, ot = ({ error: t, errorDescription: r, onClose: n }) => t ? /* @__PURE__ */ e.jsx("div", { className: `mx-4 mt-3 sm:mx-5 sm:mt-4 rounded-xl border
2942
+ }, rt = ({ error: t, errorDescription: r, onClose: n }) => t ? /* @__PURE__ */ e.jsx("div", { className: `mx-4 mt-3 sm:mx-5 sm:mt-4 rounded-xl border
2944
2943
  border-red-200 bg-red-50
2945
2944
  dark:bg-red-900/20 dark:border-red-800/50
2946
2945
  animate-in slide-in-from-top-1 duration-200`, children: /* @__PURE__ */ e.jsx("div", { className: "px-3.5 py-3 sm:px-4", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-start gap-2.5", children: [
2947
2946
  /* @__PURE__ */ e.jsx("div", { className: `flex-shrink-0 w-7 h-7 rounded-lg mt-0.5
2948
2947
  bg-red-100 dark:bg-red-800/30
2949
- flex items-center justify-center`, children: /* @__PURE__ */ e.jsx(we, { className: "w-3.5 h-3.5 text-red-600 dark:text-red-400" }) }),
2948
+ flex items-center justify-center`, children: /* @__PURE__ */ e.jsx(ke, { className: "w-3.5 h-3.5 text-red-600 dark:text-red-400" }) }),
2950
2949
  /* @__PURE__ */ e.jsxs("div", { className: "flex-1 min-w-0", children: [
2951
2950
  /* @__PURE__ */ e.jsx("p", { className: "text-sm font-semibold text-red-800 dark:text-red-300 leading-snug", children: t }),
2952
2951
  r && /* @__PURE__ */ e.jsx("p", { className: "mt-0.5 text-xs text-red-700/80 dark:text-red-400 leading-relaxed", children: r })
@@ -2965,7 +2964,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2965
2964
  children: /* @__PURE__ */ e.jsx(X, { className: "w-3.5 h-3.5" })
2966
2965
  }
2967
2966
  )
2968
- ] }) }) }) : null, nt = ({
2967
+ ] }) }) }) : null, lt = ({
2969
2968
  content: t,
2970
2969
  className: r = "",
2971
2970
  emptyText: n = null,
@@ -2974,7 +2973,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2974
2973
  }) => {
2975
2974
  if (!t || !t.replace(/<[^>]*>/g, "").trim())
2976
2975
  return n ? /* @__PURE__ */ e.jsx("span", { className: "text-slate-400 dark:text-slate-500 text-sm italic", children: n }) : null;
2977
- const d = {
2976
+ const c = {
2978
2977
  xs: "prose-xs text-xs",
2979
2978
  sm: "prose-sm text-sm",
2980
2979
  md: "prose-base text-base"
@@ -2983,7 +2982,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2983
2982
  "div",
2984
2983
  {
2985
2984
  className: `
2986
- prose ${d} max-w-none
2985
+ prose ${c} max-w-none
2987
2986
  text-slate-700 dark:text-slate-300
2988
2987
 
2989
2988
  [&>*]:my-0.5
@@ -3005,105 +3004,105 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
3005
3004
  }
3006
3005
  );
3007
3006
  };
3008
- let T = null;
3009
- const it = ({
3007
+ let _ = null;
3008
+ const ot = ({
3010
3009
  items: t = [],
3011
3010
  onReorder: r,
3012
3011
  onDropFrom: n,
3013
3012
  onDropTo: l,
3014
- listId: d = "default",
3015
- disabled: x = !1,
3016
- renderItem: m,
3017
- className: h = "",
3018
- dropZoneClassName: f = "",
3019
- activeDropZoneClassName: k = "",
3020
- children: _,
3021
- footer: y = null
3013
+ listId: c = "default",
3014
+ disabled: h = !1,
3015
+ renderItem: x,
3016
+ className: m = "",
3017
+ dropZoneClassName: p = "",
3018
+ activeDropZoneClassName: N = "",
3019
+ children: S,
3020
+ footer: R = null
3022
3021
  }) => {
3023
- const E = K(null), [L, C] = O(null), [g, N] = O(!1), [c, z] = O(null);
3022
+ const y = K(null), [E, M] = z(null), [g, i] = z(!1), [j, D] = z(null);
3024
3023
  J(() => {
3025
- const i = () => {
3026
- T && (T = null, z(null), C(null), N(!1), E.current = null);
3024
+ const d = () => {
3025
+ _ && (_ = null, D(null), M(null), i(!1), y.current = null);
3027
3026
  };
3028
- return document.addEventListener("dragend", i), () => document.removeEventListener("dragend", i);
3027
+ return document.addEventListener("dragend", d), () => document.removeEventListener("dragend", d);
3029
3028
  }, []);
3030
- const I = (i, v) => {
3031
- E.current = v, z(t[v].id), T = { listId: d, index: v, item: t[v] }, i.dataTransfer.effectAllowed = "move";
3032
- }, V = (i, v) => {
3033
- i.preventDefault(), (T == null ? void 0 : T.listId) === d && C(v);
3034
- }, M = () => {
3035
- E.current = null, z(null), C(null), N(!1), T = null;
3036
- }, Y = (i) => {
3037
- i.preventDefault(), !x && (T == null ? void 0 : T.listId) !== d && N(!0);
3038
- }, U = (i) => {
3039
- i.currentTarget.contains(i.relatedTarget) || (N(!1), (T == null ? void 0 : T.listId) === d && C(null));
3040
- }, B = (i, v) => {
3041
- if (i.preventDefault(), i.stopPropagation(), !!T) {
3042
- if (T.listId === d) {
3043
- const S = E.current;
3044
- if (S === v) {
3045
- M();
3029
+ const T = (d, v) => {
3030
+ y.current = v, D(t[v].id), _ = { listId: c, index: v, item: t[v] }, d.dataTransfer.effectAllowed = "move";
3031
+ }, V = (d, v) => {
3032
+ d.preventDefault(), (_ == null ? void 0 : _.listId) === c && M(v);
3033
+ }, I = () => {
3034
+ y.current = null, D(null), M(null), i(!1), _ = null;
3035
+ }, Y = (d) => {
3036
+ d.preventDefault(), !h && (_ == null ? void 0 : _.listId) !== c && i(!0);
3037
+ }, U = (d) => {
3038
+ d.currentTarget.contains(d.relatedTarget) || (i(!1), (_ == null ? void 0 : _.listId) === c && M(null));
3039
+ }, B = (d, v) => {
3040
+ if (d.preventDefault(), d.stopPropagation(), !!_) {
3041
+ if (_.listId === c) {
3042
+ const C = y.current;
3043
+ if (C === v) {
3044
+ I();
3046
3045
  return;
3047
3046
  }
3048
- const P = [...t], [A] = P.splice(S, 1);
3049
- P.splice(v, 0, A), r == null || r(P);
3047
+ const A = [...t], [O] = A.splice(C, 1);
3048
+ A.splice(v, 0, O), r == null || r(A);
3050
3049
  } else
3051
- n == null || n({ item: T.item, fromListId: T.listId, toIndex: v }), l == null || l({ item: T.item, fromIndex: T.index });
3052
- M();
3050
+ n == null || n({ item: _.item, fromListId: _.listId, toIndex: v }), l == null || l({ item: _.item, fromIndex: _.index });
3051
+ I();
3053
3052
  }
3054
- }, j = (i) => {
3055
- if (i.preventDefault(), !!T) {
3056
- if (T.listId === d) {
3057
- M();
3053
+ }, w = (d) => {
3054
+ if (d.preventDefault(), !!_) {
3055
+ if (_.listId === c) {
3056
+ I();
3058
3057
  return;
3059
3058
  }
3060
- n == null || n({ item: T.item, fromListId: T.listId, toIndex: t.length }), l == null || l({ item: T.item, fromIndex: T.index }), M();
3059
+ n == null || n({ item: _.item, fromListId: _.listId, toIndex: t.length }), l == null || l({ item: _.item, fromIndex: _.index }), I();
3061
3060
  }
3062
- }, W = g && !x && (T == null ? void 0 : T.listId) !== d;
3061
+ }, W = g && !h && (_ == null ? void 0 : _.listId) !== c;
3063
3062
  return /* @__PURE__ */ e.jsxs(
3064
3063
  "div",
3065
3064
  {
3066
- className: `${f} ${W ? k : ""} ${h}`,
3067
- onDragOver: x ? void 0 : Y,
3068
- onDragLeave: x ? void 0 : U,
3069
- onDrop: x ? void 0 : j,
3065
+ className: `${p} ${W ? N : ""} ${m}`,
3066
+ onDragOver: h ? void 0 : Y,
3067
+ onDragLeave: h ? void 0 : U,
3068
+ onDrop: h ? void 0 : w,
3070
3069
  children: [
3071
- t.length === 0 ? _ : t.map((i, v) => {
3072
- const S = c === i.id, P = (T == null ? void 0 : T.listId) === d && L === v && c !== i.id;
3073
- return m(i, v, x ? {} : {
3070
+ t.length === 0 ? S : t.map((d, v) => {
3071
+ const C = j === d.id, A = (_ == null ? void 0 : _.listId) === c && E === v && j !== d.id;
3072
+ return x(d, v, h ? {} : {
3074
3073
  draggable: !0,
3075
- onDragStart: (b) => I(b, v),
3074
+ onDragStart: (b) => T(b, v),
3076
3075
  onDragEnter: (b) => V(b, v),
3077
- onDragEnd: M,
3076
+ onDragEnd: I,
3078
3077
  onDrop: (b) => B(b, v)
3079
- }, S, P);
3078
+ }, C, A);
3080
3079
  }),
3081
- y
3080
+ R
3082
3081
  ]
3083
3082
  }
3084
3083
  );
3085
3084
  };
3086
3085
  export {
3087
- Ke as ActionButton,
3088
- Ze as DataTable,
3089
- it as DragDropList,
3090
- tt as DynamicForm,
3091
- at as DynamicFormMultiStep,
3092
- Ye as Footer,
3093
- je as FormField,
3094
- nt as HtmlContent,
3095
- Je as IconButton,
3096
- lt as Loader,
3097
- rt as ManagerLayout,
3098
- et as Modal,
3099
- ot as ModalErrorAlert,
3100
- Ue as Navbar,
3101
- Ge as PageHeader,
3102
- Xe as PrimaryButton,
3103
- Qe as SearchInput,
3086
+ Qe as ActionButton,
3087
+ Xe as DataTable,
3088
+ ot as DragDropList,
3089
+ Ke as DynamicForm,
3090
+ tt as DynamicFormMultiStep,
3091
+ Be as Footer,
3092
+ we as FormField,
3093
+ lt as HtmlContent,
3094
+ qe as IconButton,
3095
+ at as Loader,
3096
+ st as ManagerLayout,
3097
+ Ze as Modal,
3098
+ rt as ModalErrorAlert,
3099
+ He as Navbar,
3100
+ Ue as PageHeader,
3101
+ Ge as PrimaryButton,
3102
+ Je as SearchInput,
3104
3103
  Fe as SelectModal,
3105
- st as SelectModalField,
3106
- qe as Sidebar,
3107
- De as Toggle,
3108
- Pe as UserMenu
3104
+ et as SelectModalField,
3105
+ Ye as Sidebar,
3106
+ Pe as Toggle,
3107
+ Ae as UserMenu
3109
3108
  };