@algorithm-shift/design-system 1.3.126 → 1.3.128

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1076,13 +1076,98 @@ function Icon(props) {
1076
1076
  return null;
1077
1077
  }
1078
1078
 
1079
+ // src/components/Basic/Audio/Audio.tsx
1080
+ import { useRef as useRef2, useState as useState6, useEffect as useEffect4 } from "react";
1081
+ import { Play, Pause } from "lucide-react";
1082
+ import { jsx as jsx19, jsxs as jsxs8 } from "react/jsx-runtime";
1083
+ var formatTime = (time) => {
1084
+ if (isNaN(time) || !isFinite(time)) return "00:00";
1085
+ const minutes = Math.floor(time / 60);
1086
+ const seconds = Math.floor(time % 60);
1087
+ return `${minutes.toString().padStart(2, "0")}:${seconds.toString().padStart(2, "0")}`;
1088
+ };
1089
+ var AudioWrapper = (props) => {
1090
+ const audioRef = useRef2(null);
1091
+ const [isPlaying, setIsPlaying] = useState6(false);
1092
+ const [currentTime, setCurrentTime] = useState6(0);
1093
+ const [duration, setDuration] = useState6(0);
1094
+ useEffect4(() => {
1095
+ const audioEl = audioRef.current;
1096
+ if (!audioEl) return;
1097
+ const handleEnded = () => setIsPlaying(false);
1098
+ const handlePause = () => setIsPlaying(false);
1099
+ const handlePlay = () => setIsPlaying(true);
1100
+ const handleTimeUpdate = () => setCurrentTime(audioEl.currentTime);
1101
+ const handleLoadedMetadata = () => setDuration(audioEl.duration);
1102
+ audioEl.addEventListener("ended", handleEnded);
1103
+ audioEl.addEventListener("pause", handlePause);
1104
+ audioEl.addEventListener("play", handlePlay);
1105
+ audioEl.addEventListener("timeupdate", handleTimeUpdate);
1106
+ audioEl.addEventListener("loadedmetadata", handleLoadedMetadata);
1107
+ return () => {
1108
+ audioEl.removeEventListener("ended", handleEnded);
1109
+ audioEl.removeEventListener("pause", handlePause);
1110
+ audioEl.removeEventListener("play", handlePlay);
1111
+ audioEl.removeEventListener("timeupdate", handleTimeUpdate);
1112
+ audioEl.removeEventListener("loadedmetadata", handleLoadedMetadata);
1113
+ };
1114
+ }, []);
1115
+ const togglePlay = () => {
1116
+ if (audioRef.current) {
1117
+ if (isPlaying) {
1118
+ audioRef.current.pause();
1119
+ } else {
1120
+ audioRef.current.play();
1121
+ }
1122
+ }
1123
+ };
1124
+ const handleSeek = (e) => {
1125
+ const time = Number(e.target.value);
1126
+ if (audioRef.current) {
1127
+ audioRef.current.currentTime = time;
1128
+ setCurrentTime(time);
1129
+ }
1130
+ };
1131
+ const url = props.data || props.src || props.value;
1132
+ return /* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-3 p-3 bg-white rounded-lg border shadow-sm w-full min-w-[250px]", children: [
1133
+ url && /* @__PURE__ */ jsx19("audio", { ref: audioRef, src: url, preload: "metadata" }),
1134
+ /* @__PURE__ */ jsx19(
1135
+ "button",
1136
+ {
1137
+ onClick: togglePlay,
1138
+ disabled: !url,
1139
+ className: "p-2 flex-shrink-0 flex items-center justify-center text-blue-600 bg-blue-50 rounded-full hover:bg-blue-100 disabled:opacity-50 disabled:bg-gray-50 disabled:text-gray-400 transition-colors",
1140
+ title: isPlaying ? "Pause Audio" : "Play Audio",
1141
+ children: isPlaying ? /* @__PURE__ */ jsx19(Pause, { size: 20, className: "fill-current" }) : /* @__PURE__ */ jsx19(Play, { size: 20, className: "fill-current transform translate-x-0.5" })
1142
+ }
1143
+ ),
1144
+ /* @__PURE__ */ jsxs8("div", { className: "flex-1 flex items-center gap-3", children: [
1145
+ /* @__PURE__ */ jsx19("span", { className: "text-xs font-medium text-gray-500 tabular-nums w-10 text-right", children: formatTime(currentTime) }),
1146
+ /* @__PURE__ */ jsx19(
1147
+ "input",
1148
+ {
1149
+ type: "range",
1150
+ min: "0",
1151
+ max: duration || 100,
1152
+ value: currentTime,
1153
+ onChange: handleSeek,
1154
+ disabled: !url,
1155
+ className: "flex-1 h-1.5 bg-gray-200 rounded-lg appearance-none cursor-pointer accent-blue-600 disabled:accent-gray-400"
1156
+ }
1157
+ ),
1158
+ /* @__PURE__ */ jsx19("span", { className: "text-xs font-medium text-gray-500 tabular-nums w-10", children: formatTime(duration) })
1159
+ ] })
1160
+ ] });
1161
+ };
1162
+ var Audio_default = AudioWrapper;
1163
+
1079
1164
  // src/components/Inputs/TextInput/TextInput.tsx
1080
- import { useEffect as useEffect4 } from "react";
1165
+ import { useEffect as useEffect5 } from "react";
1081
1166
 
1082
1167
  // src/components/ui/input.tsx
1083
- import { jsx as jsx19 } from "react/jsx-runtime";
1168
+ import { jsx as jsx20 } from "react/jsx-runtime";
1084
1169
  function Input({ className, type, ...props }) {
1085
- return /* @__PURE__ */ jsx19(
1170
+ return /* @__PURE__ */ jsx20(
1086
1171
  "input",
1087
1172
  {
1088
1173
  type,
@@ -1099,14 +1184,14 @@ function Input({ className, type, ...props }) {
1099
1184
  }
1100
1185
 
1101
1186
  // src/components/Inputs/TextInput/TextInput.tsx
1102
- import { Fragment as Fragment3, jsx as jsx20, jsxs as jsxs8 } from "react/jsx-runtime";
1187
+ import { Fragment as Fragment3, jsx as jsx21, jsxs as jsxs9 } from "react/jsx-runtime";
1103
1188
  var TextInput = ({ className, style, ...props }) => {
1104
1189
  const placeholder = props.placeholder || "Placeholder text";
1105
1190
  const isEditable = props.isEditable ?? true;
1106
1191
  const isDisabled = props.isDisabled ?? false;
1107
1192
  const isReadonly = props.isReadonly ?? false;
1108
1193
  const isAutocomplete = props.isAutocomplete ?? false;
1109
- useEffect4(() => {
1194
+ useEffect5(() => {
1110
1195
  if (props.value !== void 0) {
1111
1196
  const e = { target: { value: props.value }, type: "change" };
1112
1197
  handleChange?.(e);
@@ -1122,8 +1207,8 @@ var TextInput = ({ className, style, ...props }) => {
1122
1207
  if (value === null || value === void 0) return "";
1123
1208
  return value;
1124
1209
  };
1125
- return /* @__PURE__ */ jsxs8(Fragment3, { children: [
1126
- /* @__PURE__ */ jsx20(
1210
+ return /* @__PURE__ */ jsxs9(Fragment3, { children: [
1211
+ /* @__PURE__ */ jsx21(
1127
1212
  Input,
1128
1213
  {
1129
1214
  type: props.inputType || "text",
@@ -1142,21 +1227,21 @@ var TextInput = ({ className, style, ...props }) => {
1142
1227
  readOnly: isReadonly
1143
1228
  }
1144
1229
  ),
1145
- props.errorMessage && /* @__PURE__ */ jsx20("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1230
+ props.errorMessage && /* @__PURE__ */ jsx21("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1146
1231
  ] });
1147
1232
  };
1148
1233
  var TextInput_default = TextInput;
1149
1234
 
1150
1235
  // src/components/Inputs/NumberInput/NumberInput.tsx
1151
- import { useEffect as useEffect5 } from "react";
1152
- import { Fragment as Fragment4, jsx as jsx21, jsxs as jsxs9 } from "react/jsx-runtime";
1236
+ import { useEffect as useEffect6 } from "react";
1237
+ import { Fragment as Fragment4, jsx as jsx22, jsxs as jsxs10 } from "react/jsx-runtime";
1153
1238
  var NumberInput = ({ className, style, ...props }) => {
1154
1239
  const placeholder = props.placeholder ?? "Placeholder text";
1155
1240
  const isEditable = props.isEditable ?? true;
1156
1241
  const isDisabled = props.isDisabled ?? false;
1157
1242
  const isReadonly = props.isReadonly ?? false;
1158
1243
  const isAutocomplete = props.isAutocomplete ?? false;
1159
- useEffect5(() => {
1244
+ useEffect6(() => {
1160
1245
  if (props.value !== void 0) {
1161
1246
  const e = { target: { value: props.value }, type: "change" };
1162
1247
  handleChange?.(e);
@@ -1172,8 +1257,8 @@ var NumberInput = ({ className, style, ...props }) => {
1172
1257
  if (value === null || value === void 0) return 0;
1173
1258
  return value;
1174
1259
  };
1175
- return /* @__PURE__ */ jsxs9(Fragment4, { children: [
1176
- /* @__PURE__ */ jsx21("div", { className: "flex justify-start items-center relative", children: /* @__PURE__ */ jsx21(
1260
+ return /* @__PURE__ */ jsxs10(Fragment4, { children: [
1261
+ /* @__PURE__ */ jsx22("div", { className: "flex justify-start items-center relative", children: /* @__PURE__ */ jsx22(
1177
1262
  Input,
1178
1263
  {
1179
1264
  type: props.inputType || "number",
@@ -1192,21 +1277,21 @@ var NumberInput = ({ className, style, ...props }) => {
1192
1277
  readOnly: isReadonly
1193
1278
  }
1194
1279
  ) }),
1195
- props.errorMessage && /* @__PURE__ */ jsx21("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1280
+ props.errorMessage && /* @__PURE__ */ jsx22("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1196
1281
  ] });
1197
1282
  };
1198
1283
  var NumberInput_default = NumberInput;
1199
1284
 
1200
1285
  // src/components/Inputs/EmailInput/EmailInput.tsx
1201
- import { useEffect as useEffect6 } from "react";
1202
- import { Fragment as Fragment5, jsx as jsx22, jsxs as jsxs10 } from "react/jsx-runtime";
1286
+ import { useEffect as useEffect7 } from "react";
1287
+ import { Fragment as Fragment5, jsx as jsx23, jsxs as jsxs11 } from "react/jsx-runtime";
1203
1288
  var EmailInput = ({ className, style, ...props }) => {
1204
1289
  const placeholder = props.placeholder ?? "Placeholder text";
1205
1290
  const isEditable = props.isEditable ?? true;
1206
1291
  const isDisabled = props.isDisabled ?? false;
1207
1292
  const isReadonly = props.isReadonly ?? false;
1208
1293
  const isAutocomplete = props.isAutocomplete ?? false;
1209
- useEffect6(() => {
1294
+ useEffect7(() => {
1210
1295
  if (props.value !== void 0) {
1211
1296
  const e = { target: { value: props.value }, type: "change" };
1212
1297
  handleChange?.(e);
@@ -1222,8 +1307,8 @@ var EmailInput = ({ className, style, ...props }) => {
1222
1307
  if (value === null || value === void 0) return "";
1223
1308
  return value;
1224
1309
  };
1225
- return /* @__PURE__ */ jsxs10(Fragment5, { children: [
1226
- /* @__PURE__ */ jsx22("div", { className: "flex justify-start items-center relative", children: /* @__PURE__ */ jsx22(
1310
+ return /* @__PURE__ */ jsxs11(Fragment5, { children: [
1311
+ /* @__PURE__ */ jsx23("div", { className: "flex justify-start items-center relative", children: /* @__PURE__ */ jsx23(
1227
1312
  Input,
1228
1313
  {
1229
1314
  type: props.inputType || "email",
@@ -1242,21 +1327,21 @@ var EmailInput = ({ className, style, ...props }) => {
1242
1327
  readOnly: isReadonly
1243
1328
  }
1244
1329
  ) }),
1245
- props.errorMessage && /* @__PURE__ */ jsx22("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1330
+ props.errorMessage && /* @__PURE__ */ jsx23("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1246
1331
  ] });
1247
1332
  };
1248
1333
  var EmailInput_default = EmailInput;
1249
1334
 
1250
1335
  // src/components/Inputs/PasswordInput/PasswordInput.tsx
1251
- import { useEffect as useEffect7 } from "react";
1252
- import { Fragment as Fragment6, jsx as jsx23, jsxs as jsxs11 } from "react/jsx-runtime";
1336
+ import { useEffect as useEffect8 } from "react";
1337
+ import { Fragment as Fragment6, jsx as jsx24, jsxs as jsxs12 } from "react/jsx-runtime";
1253
1338
  var PasswordInput = ({ className, style, ...props }) => {
1254
1339
  const placeholder = props.placeholder ?? "Placeholder text";
1255
1340
  const isEditable = props.isEditable ?? true;
1256
1341
  const isDisabled = props.isDisabled ?? false;
1257
1342
  const isReadonly = props.isReadonly ?? false;
1258
1343
  const isAutocomplete = props.isAutocomplete ?? false;
1259
- useEffect7(() => {
1344
+ useEffect8(() => {
1260
1345
  if (props.value !== void 0) {
1261
1346
  const e = { target: { value: props.value }, type: "change" };
1262
1347
  handleChange?.(e);
@@ -1272,8 +1357,8 @@ var PasswordInput = ({ className, style, ...props }) => {
1272
1357
  if (value === null || value === void 0) return "";
1273
1358
  return value;
1274
1359
  };
1275
- return /* @__PURE__ */ jsxs11(Fragment6, { children: [
1276
- /* @__PURE__ */ jsx23("div", { className: "flex justify-start items-center relative", children: /* @__PURE__ */ jsx23(
1360
+ return /* @__PURE__ */ jsxs12(Fragment6, { children: [
1361
+ /* @__PURE__ */ jsx24("div", { className: "flex justify-start items-center relative", children: /* @__PURE__ */ jsx24(
1277
1362
  Input,
1278
1363
  {
1279
1364
  type: props.inputType || "password",
@@ -1292,18 +1377,18 @@ var PasswordInput = ({ className, style, ...props }) => {
1292
1377
  readOnly: isReadonly
1293
1378
  }
1294
1379
  ) }),
1295
- props.errorMessage && /* @__PURE__ */ jsx23("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1380
+ props.errorMessage && /* @__PURE__ */ jsx24("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1296
1381
  ] });
1297
1382
  };
1298
1383
  var PasswordInput_default = PasswordInput;
1299
1384
 
1300
1385
  // src/components/Inputs/Textarea/Textarea.tsx
1301
- import { useEffect as useEffect8 } from "react";
1386
+ import { useEffect as useEffect9 } from "react";
1302
1387
 
1303
1388
  // src/components/ui/textarea.tsx
1304
- import { jsx as jsx24 } from "react/jsx-runtime";
1389
+ import { jsx as jsx25 } from "react/jsx-runtime";
1305
1390
  function Textarea({ className, ...props }) {
1306
- return /* @__PURE__ */ jsx24(
1391
+ return /* @__PURE__ */ jsx25(
1307
1392
  "textarea",
1308
1393
  {
1309
1394
  "data-slot": "textarea",
@@ -1317,14 +1402,14 @@ function Textarea({ className, ...props }) {
1317
1402
  }
1318
1403
 
1319
1404
  // src/components/Inputs/Textarea/Textarea.tsx
1320
- import { Fragment as Fragment7, jsx as jsx25, jsxs as jsxs12 } from "react/jsx-runtime";
1405
+ import { Fragment as Fragment7, jsx as jsx26, jsxs as jsxs13 } from "react/jsx-runtime";
1321
1406
  var Textarea2 = ({ className, style, ...props }) => {
1322
1407
  const placeholder = props.placeholder ?? "Placeholder text";
1323
1408
  const isEditable = props.isEditable ?? true;
1324
1409
  const isDisabled = props.isDisabled ?? false;
1325
1410
  const isReadonly = props.isReadonly ?? false;
1326
1411
  const isAutocomplete = props.isAutocomplete ?? false;
1327
- useEffect8(() => {
1412
+ useEffect9(() => {
1328
1413
  if (props.value !== void 0) {
1329
1414
  const e = { target: { value: props.value }, type: "change" };
1330
1415
  handleChange?.(e);
@@ -1333,8 +1418,8 @@ var Textarea2 = ({ className, style, ...props }) => {
1333
1418
  const handleChange = (e) => {
1334
1419
  props.onChange?.(e, props?.name || "");
1335
1420
  };
1336
- return /* @__PURE__ */ jsxs12(Fragment7, { children: [
1337
- /* @__PURE__ */ jsx25(
1421
+ return /* @__PURE__ */ jsxs13(Fragment7, { children: [
1422
+ /* @__PURE__ */ jsx26(
1338
1423
  Textarea,
1339
1424
  {
1340
1425
  id: "textarea-field",
@@ -1352,21 +1437,21 @@ var Textarea2 = ({ className, style, ...props }) => {
1352
1437
  readOnly: isReadonly
1353
1438
  }
1354
1439
  ),
1355
- props.errorMessage && /* @__PURE__ */ jsx25("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1440
+ props.errorMessage && /* @__PURE__ */ jsx26("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1356
1441
  ] });
1357
1442
  };
1358
1443
  var Textarea_default = Textarea2;
1359
1444
 
1360
1445
  // src/components/Inputs/UrlInput/UrlInput.tsx
1361
- import { useEffect as useEffect9 } from "react";
1362
- import { Fragment as Fragment8, jsx as jsx26, jsxs as jsxs13 } from "react/jsx-runtime";
1446
+ import { useEffect as useEffect10 } from "react";
1447
+ import { Fragment as Fragment8, jsx as jsx27, jsxs as jsxs14 } from "react/jsx-runtime";
1363
1448
  var UrlInput = ({ className, style, ...props }) => {
1364
1449
  const placeholder = props.placeholder ?? "Placeholder text";
1365
1450
  const isEditable = props.isEditable ?? true;
1366
1451
  const isDisabled = props.isDisabled ?? false;
1367
1452
  const isReadonly = props.isReadonly ?? false;
1368
1453
  const isAutocomplete = props.isAutocomplete ?? false;
1369
- useEffect9(() => {
1454
+ useEffect10(() => {
1370
1455
  if (props.value !== void 0) {
1371
1456
  const e = { target: { value: props.value }, type: "change" };
1372
1457
  handleChange?.(e);
@@ -1382,10 +1467,10 @@ var UrlInput = ({ className, style, ...props }) => {
1382
1467
  if (value === null || value === void 0) return "";
1383
1468
  return value;
1384
1469
  };
1385
- return /* @__PURE__ */ jsxs13(Fragment8, { children: [
1386
- /* @__PURE__ */ jsxs13("div", { className: "flex justify-start items-center relative", children: [
1387
- /* @__PURE__ */ jsx26("div", { className: "bg-[#E9E9E9] absolute px-10 text-center top-1/2 h-full justify-center items-center flex w-10 -translate-y-1/2 text-[#383838] font-[500] text-[12px]", children: "https://" }),
1388
- /* @__PURE__ */ jsx26(
1470
+ return /* @__PURE__ */ jsxs14(Fragment8, { children: [
1471
+ /* @__PURE__ */ jsxs14("div", { className: "flex justify-start items-center relative", children: [
1472
+ /* @__PURE__ */ jsx27("div", { className: "bg-[#E9E9E9] absolute px-10 text-center top-1/2 h-full justify-center items-center flex w-10 -translate-y-1/2 text-[#383838] font-[500] text-[12px]", children: "https://" }),
1473
+ /* @__PURE__ */ jsx27(
1389
1474
  Input,
1390
1475
  {
1391
1476
  id: props.name || "url-field",
@@ -1405,23 +1490,23 @@ var UrlInput = ({ className, style, ...props }) => {
1405
1490
  }
1406
1491
  )
1407
1492
  ] }),
1408
- props.errorMessage && /* @__PURE__ */ jsx26("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1493
+ props.errorMessage && /* @__PURE__ */ jsx27("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1409
1494
  ] });
1410
1495
  };
1411
1496
  var UrlInput_default = UrlInput;
1412
1497
 
1413
1498
  // src/components/Inputs/Checkbox/Checkbox.tsx
1414
- import { useEffect as useEffect10 } from "react";
1499
+ import { useEffect as useEffect11 } from "react";
1415
1500
 
1416
1501
  // src/components/ui/checkbox.tsx
1417
1502
  import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
1418
1503
  import { CheckIcon as CheckIcon2 } from "lucide-react";
1419
- import { jsx as jsx27 } from "react/jsx-runtime";
1504
+ import { jsx as jsx28 } from "react/jsx-runtime";
1420
1505
  function Checkbox({
1421
1506
  className,
1422
1507
  ...props
1423
1508
  }) {
1424
- return /* @__PURE__ */ jsx27(
1509
+ return /* @__PURE__ */ jsx28(
1425
1510
  CheckboxPrimitive.Root,
1426
1511
  {
1427
1512
  "data-slot": "checkbox",
@@ -1430,12 +1515,12 @@ function Checkbox({
1430
1515
  className
1431
1516
  ),
1432
1517
  ...props,
1433
- children: /* @__PURE__ */ jsx27(
1518
+ children: /* @__PURE__ */ jsx28(
1434
1519
  CheckboxPrimitive.Indicator,
1435
1520
  {
1436
1521
  "data-slot": "checkbox-indicator",
1437
1522
  className: "flex items-center justify-center text-current transition-none",
1438
- children: /* @__PURE__ */ jsx27(CheckIcon2, { className: "size-3.5" })
1523
+ children: /* @__PURE__ */ jsx28(CheckIcon2, { className: "size-3.5" })
1439
1524
  }
1440
1525
  )
1441
1526
  }
@@ -1444,12 +1529,12 @@ function Checkbox({
1444
1529
 
1445
1530
  // src/components/ui/label.tsx
1446
1531
  import * as LabelPrimitive from "@radix-ui/react-label";
1447
- import { jsx as jsx28 } from "react/jsx-runtime";
1532
+ import { jsx as jsx29 } from "react/jsx-runtime";
1448
1533
  function Label2({
1449
1534
  className,
1450
1535
  ...props
1451
1536
  }) {
1452
- return /* @__PURE__ */ jsx28(
1537
+ return /* @__PURE__ */ jsx29(
1453
1538
  LabelPrimitive.Root,
1454
1539
  {
1455
1540
  "data-slot": "label",
@@ -1463,7 +1548,7 @@ function Label2({
1463
1548
  }
1464
1549
 
1465
1550
  // src/components/Inputs/Checkbox/Checkbox.tsx
1466
- import { Fragment as Fragment9, jsx as jsx29, jsxs as jsxs14 } from "react/jsx-runtime";
1551
+ import { Fragment as Fragment9, jsx as jsx30, jsxs as jsxs15 } from "react/jsx-runtime";
1467
1552
  var CheckboxInput = ({ className, style, ...props }) => {
1468
1553
  const isEditable = props.isEditable ?? true;
1469
1554
  const isDisabled = props.isDisabled ?? false;
@@ -1477,7 +1562,7 @@ var CheckboxInput = ({ className, style, ...props }) => {
1477
1562
  }
1478
1563
  return false;
1479
1564
  };
1480
- useEffect10(() => {
1565
+ useEffect11(() => {
1481
1566
  if (props.value) {
1482
1567
  handleChange(formatValue(props.value));
1483
1568
  }
@@ -1485,9 +1570,9 @@ var CheckboxInput = ({ className, style, ...props }) => {
1485
1570
  const handleChange = (value) => {
1486
1571
  props.onChange?.(value, props?.name || "");
1487
1572
  };
1488
- return /* @__PURE__ */ jsxs14(Fragment9, { children: [
1489
- /* @__PURE__ */ jsx29("div", { className, style, children: /* @__PURE__ */ jsxs14("div", { className: "flex items-center space-x-2", children: [
1490
- /* @__PURE__ */ jsx29(
1573
+ return /* @__PURE__ */ jsxs15(Fragment9, { children: [
1574
+ /* @__PURE__ */ jsx30("div", { className, style, children: /* @__PURE__ */ jsxs15("div", { className: "flex items-center space-x-2", children: [
1575
+ /* @__PURE__ */ jsx30(
1491
1576
  Checkbox,
1492
1577
  {
1493
1578
  id: props.name || "checkbox",
@@ -1496,25 +1581,25 @@ var CheckboxInput = ({ className, style, ...props }) => {
1496
1581
  disabled: !isEditable || isDisabled
1497
1582
  }
1498
1583
  ),
1499
- /* @__PURE__ */ jsx29(Label2, { htmlFor: props.name || "checkbox", children: text })
1584
+ /* @__PURE__ */ jsx30(Label2, { htmlFor: props.name || "checkbox", children: text })
1500
1585
  ] }) }),
1501
- props.errorMessage && /* @__PURE__ */ jsx29("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1586
+ props.errorMessage && /* @__PURE__ */ jsx30("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1502
1587
  ] });
1503
1588
  };
1504
1589
  var Checkbox_default = CheckboxInput;
1505
1590
 
1506
1591
  // src/components/Inputs/RadioInput/RadioInput.tsx
1507
- import { useEffect as useEffect11 } from "react";
1592
+ import { useEffect as useEffect12 } from "react";
1508
1593
 
1509
1594
  // src/components/ui/radio-group.tsx
1510
1595
  import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
1511
1596
  import { CircleIcon as CircleIcon2 } from "lucide-react";
1512
- import { jsx as jsx30 } from "react/jsx-runtime";
1597
+ import { jsx as jsx31 } from "react/jsx-runtime";
1513
1598
  function RadioGroup2({
1514
1599
  className,
1515
1600
  ...props
1516
1601
  }) {
1517
- return /* @__PURE__ */ jsx30(
1602
+ return /* @__PURE__ */ jsx31(
1518
1603
  RadioGroupPrimitive.Root,
1519
1604
  {
1520
1605
  "data-slot": "radio-group",
@@ -1527,7 +1612,7 @@ function RadioGroupItem({
1527
1612
  className,
1528
1613
  ...props
1529
1614
  }) {
1530
- return /* @__PURE__ */ jsx30(
1615
+ return /* @__PURE__ */ jsx31(
1531
1616
  RadioGroupPrimitive.Item,
1532
1617
  {
1533
1618
  "data-slot": "radio-group-item",
@@ -1536,12 +1621,12 @@ function RadioGroupItem({
1536
1621
  className
1537
1622
  ),
1538
1623
  ...props,
1539
- children: /* @__PURE__ */ jsx30(
1624
+ children: /* @__PURE__ */ jsx31(
1540
1625
  RadioGroupPrimitive.Indicator,
1541
1626
  {
1542
1627
  "data-slot": "radio-group-indicator",
1543
1628
  className: "relative flex items-center justify-center",
1544
- children: /* @__PURE__ */ jsx30(CircleIcon2, { className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" })
1629
+ children: /* @__PURE__ */ jsx31(CircleIcon2, { className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" })
1545
1630
  }
1546
1631
  )
1547
1632
  }
@@ -1549,7 +1634,7 @@ function RadioGroupItem({
1549
1634
  }
1550
1635
 
1551
1636
  // src/components/Inputs/RadioInput/RadioInput.tsx
1552
- import { Fragment as Fragment10, jsx as jsx31, jsxs as jsxs15 } from "react/jsx-runtime";
1637
+ import { Fragment as Fragment10, jsx as jsx32, jsxs as jsxs16 } from "react/jsx-runtime";
1553
1638
  var RadioInput = ({
1554
1639
  className,
1555
1640
  style,
@@ -1565,7 +1650,7 @@ var RadioInput = ({
1565
1650
  value: item[dataKey || "value"],
1566
1651
  label: item[dataLabel || "label"]
1567
1652
  }));
1568
- useEffect11(() => {
1653
+ useEffect12(() => {
1569
1654
  if (props.value !== void 0) {
1570
1655
  handleChange?.(props.value);
1571
1656
  }
@@ -1574,29 +1659,29 @@ var RadioInput = ({
1574
1659
  onChange?.(value, props?.name || "");
1575
1660
  };
1576
1661
  const resolvedDefaultValue = (typeof defaultValue === "string" ? defaultValue : void 0) ?? options[0]?.value;
1577
- return /* @__PURE__ */ jsxs15(Fragment10, { children: [
1578
- /* @__PURE__ */ jsx31("div", { className, style, children: /* @__PURE__ */ jsxs15(
1662
+ return /* @__PURE__ */ jsxs16(Fragment10, { children: [
1663
+ /* @__PURE__ */ jsx32("div", { className, style, children: /* @__PURE__ */ jsxs16(
1579
1664
  RadioGroup2,
1580
1665
  {
1581
1666
  defaultValue: resolvedDefaultValue,
1582
1667
  onValueChange: handleChange,
1583
1668
  children: [
1584
- options.length === 0 && /* @__PURE__ */ jsx31("div", { className: "text-sm text-gray-500", children: "No options available" }),
1585
- options.map((item) => /* @__PURE__ */ jsxs15("div", { className: "flex items-center space-x-2", children: [
1586
- /* @__PURE__ */ jsx31(RadioGroupItem, { value: item.value, id: `radio-${item.value}` }),
1587
- /* @__PURE__ */ jsx31(Label2, { htmlFor: `radio-${item.value}`, children: item.label })
1669
+ options.length === 0 && /* @__PURE__ */ jsx32("div", { className: "text-sm text-gray-500", children: "No options available" }),
1670
+ options.map((item) => /* @__PURE__ */ jsxs16("div", { className: "flex items-center space-x-2", children: [
1671
+ /* @__PURE__ */ jsx32(RadioGroupItem, { value: item.value, id: `radio-${item.value}` }),
1672
+ /* @__PURE__ */ jsx32(Label2, { htmlFor: `radio-${item.value}`, children: item.label })
1588
1673
  ] }, item.value))
1589
1674
  ]
1590
1675
  }
1591
1676
  ) }),
1592
- props.errorMessage && /* @__PURE__ */ jsx31("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1677
+ props.errorMessage && /* @__PURE__ */ jsx32("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1593
1678
  ] });
1594
1679
  };
1595
1680
  var RadioInput_default = RadioInput;
1596
1681
 
1597
1682
  // src/components/Inputs/MultiCheckbox/MultiCheckbox.tsx
1598
- import { useEffect as useEffect12, useState as useState6, useRef as useRef2, useCallback } from "react";
1599
- import { jsx as jsx32, jsxs as jsxs16 } from "react/jsx-runtime";
1683
+ import { useEffect as useEffect13, useState as useState7, useRef as useRef3, useCallback } from "react";
1684
+ import { jsx as jsx33, jsxs as jsxs17 } from "react/jsx-runtime";
1600
1685
  function MultiCheckbox({
1601
1686
  apiUrl,
1602
1687
  axiosInstance,
@@ -1614,11 +1699,11 @@ function MultiCheckbox({
1614
1699
  onUncheckItems,
1615
1700
  ...props
1616
1701
  }) {
1617
- const [options, setOptions] = useState6([]);
1618
- const [page, setPage] = useState6(1);
1619
- const [hasMore, setHasMore] = useState6(true);
1620
- const [pageLoading, setPageLoading] = useState6(false);
1621
- const loadMoreRef = useRef2(null);
1702
+ const [options, setOptions] = useState7([]);
1703
+ const [page, setPage] = useState7(1);
1704
+ const [hasMore, setHasMore] = useState7(true);
1705
+ const [pageLoading, setPageLoading] = useState7(false);
1706
+ const loadMoreRef = useRef3(null);
1622
1707
  const normalizeInput = (val) => {
1623
1708
  if (!val) return [];
1624
1709
  if (Array.isArray(val)) return val;
@@ -1677,7 +1762,7 @@ function MultiCheckbox({
1677
1762
  setPageLoading(false);
1678
1763
  }
1679
1764
  }, [source, pageLoading, fetchApiPage, mapData, pageSize]);
1680
- useEffect12(() => {
1765
+ useEffect13(() => {
1681
1766
  if (source === "api") {
1682
1767
  setOptions([]);
1683
1768
  setPage(1);
@@ -1687,10 +1772,10 @@ function MultiCheckbox({
1687
1772
  setHasMore(false);
1688
1773
  }
1689
1774
  }, [source, JSON.stringify(data)]);
1690
- useEffect12(() => {
1775
+ useEffect13(() => {
1691
1776
  if (source === "api") loadPage();
1692
1777
  }, [page, source]);
1693
- useEffect12(() => {
1778
+ useEffect13(() => {
1694
1779
  if (source !== "api") return;
1695
1780
  if (!hasMore || pageLoading) return;
1696
1781
  const observer = new IntersectionObserver((entries) => {
@@ -1709,11 +1794,11 @@ function MultiCheckbox({
1709
1794
  options.filter((opt) => !updated.includes(opt.value)).map((opt) => opt.value)
1710
1795
  ), props.name || "");
1711
1796
  };
1712
- return /* @__PURE__ */ jsxs16("div", { className: cn("flex flex-col gap-2 max-h-64 overflow-auto", className), style, children: [
1713
- options.length === 0 && !pageLoading && !loading && /* @__PURE__ */ jsx32("div", { className: "text-center py-2 text-gray-500 text-sm", children: "No options available." }),
1797
+ return /* @__PURE__ */ jsxs17("div", { className: cn("flex flex-col gap-2 max-h-64 overflow-auto", className), style, children: [
1798
+ options.length === 0 && !pageLoading && !loading && /* @__PURE__ */ jsx33("div", { className: "text-center py-2 text-gray-500 text-sm", children: "No options available." }),
1714
1799
  options.map((opt, index) => {
1715
1800
  const hasError = !!props.errorMessage;
1716
- return /* @__PURE__ */ jsxs16(
1801
+ return /* @__PURE__ */ jsxs17(
1717
1802
  "div",
1718
1803
  {
1719
1804
  className: cn(
@@ -1721,7 +1806,7 @@ function MultiCheckbox({
1721
1806
  hasError && "bg-red-50"
1722
1807
  ),
1723
1808
  children: [
1724
- /* @__PURE__ */ jsx32(
1809
+ /* @__PURE__ */ jsx33(
1725
1810
  Checkbox,
1726
1811
  {
1727
1812
  id: props.name ? `${props.name}-${opt.value}` : opt.value,
@@ -1733,7 +1818,7 @@ function MultiCheckbox({
1733
1818
  )
1734
1819
  }
1735
1820
  ),
1736
- /* @__PURE__ */ jsx32(
1821
+ /* @__PURE__ */ jsx33(
1737
1822
  Label2,
1738
1823
  {
1739
1824
  id: props.name ? `${props.name}-${opt.value}` : opt.value,
@@ -1747,25 +1832,25 @@ function MultiCheckbox({
1747
1832
  `${index}-${opt.value}`
1748
1833
  );
1749
1834
  }),
1750
- source === "api" && hasMore && /* @__PURE__ */ jsx32("div", { ref: loadMoreRef, className: "h-4" }),
1751
- (pageLoading || loading) && /* @__PURE__ */ jsx32("div", { className: "text-center py-2 text-gray-500 text-sm", children: "Loading\u2026" }),
1752
- props.errorMessage && /* @__PURE__ */ jsx32("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1835
+ source === "api" && hasMore && /* @__PURE__ */ jsx33("div", { ref: loadMoreRef, className: "h-4" }),
1836
+ (pageLoading || loading) && /* @__PURE__ */ jsx33("div", { className: "text-center py-2 text-gray-500 text-sm", children: "Loading\u2026" }),
1837
+ props.errorMessage && /* @__PURE__ */ jsx33("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1753
1838
  ] });
1754
1839
  }
1755
1840
 
1756
1841
  // src/components/Inputs/RichText/RichText.tsx
1757
- import { useEffect as useEffect13 } from "react";
1842
+ import { useEffect as useEffect14 } from "react";
1758
1843
 
1759
1844
  // src/components/Global/TinyMceEditor.tsx
1760
- import { useMemo as useMemo3, useRef as useRef3 } from "react";
1845
+ import { useMemo as useMemo3, useRef as useRef4 } from "react";
1761
1846
  import { Editor } from "@tinymce/tinymce-react";
1762
- import { jsx as jsx33 } from "react/jsx-runtime";
1847
+ import { jsx as jsx34 } from "react/jsx-runtime";
1763
1848
  function MyEditor({
1764
1849
  value,
1765
1850
  onChange,
1766
1851
  isDefault
1767
1852
  }) {
1768
- const editorRef = useRef3(null);
1853
+ const editorRef = useRef4(null);
1769
1854
  function stripOuterP(html) {
1770
1855
  const trimmedHtml = html.trim();
1771
1856
  if (!trimmedHtml) return "";
@@ -1784,7 +1869,7 @@ function MyEditor({
1784
1869
  }
1785
1870
  return toolbar;
1786
1871
  }, [isDefault]);
1787
- return /* @__PURE__ */ jsx33(
1872
+ return /* @__PURE__ */ jsx34(
1788
1873
  Editor,
1789
1874
  {
1790
1875
  apiKey: process.env.NEXT_PUBLIC_TINYMCE_API_KEY,
@@ -1828,9 +1913,9 @@ function MyEditor({
1828
1913
  }
1829
1914
 
1830
1915
  // src/components/Inputs/RichText/RichText.tsx
1831
- import { jsx as jsx34, jsxs as jsxs17 } from "react/jsx-runtime";
1916
+ import { jsx as jsx35, jsxs as jsxs18 } from "react/jsx-runtime";
1832
1917
  function RichText({ className, style, ...props }) {
1833
- useEffect13(() => {
1918
+ useEffect14(() => {
1834
1919
  if (props.value !== void 0) {
1835
1920
  handleChange?.(props.value);
1836
1921
  }
@@ -1838,7 +1923,7 @@ function RichText({ className, style, ...props }) {
1838
1923
  const handleChange = (content) => {
1839
1924
  props.onChange?.(content, props?.name || "");
1840
1925
  };
1841
- return /* @__PURE__ */ jsxs17(
1926
+ return /* @__PURE__ */ jsxs18(
1842
1927
  "div",
1843
1928
  {
1844
1929
  className: cn(className, props.errorMessage ? "border-red-500" : ""),
@@ -1847,29 +1932,29 @@ function RichText({ className, style, ...props }) {
1847
1932
  borderColor: props.errorMessage ? "#f87171" : style?.borderColor
1848
1933
  },
1849
1934
  children: [
1850
- /* @__PURE__ */ jsx34(MyEditor, { onChange: handleChange, value: props.value || "", isDefault: true }),
1851
- props.errorMessage && /* @__PURE__ */ jsx34("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1935
+ /* @__PURE__ */ jsx35(MyEditor, { onChange: handleChange, value: props.value || "", isDefault: true }),
1936
+ props.errorMessage && /* @__PURE__ */ jsx35("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
1852
1937
  ]
1853
1938
  }
1854
1939
  );
1855
1940
  }
1856
1941
 
1857
1942
  // src/components/Inputs/Dropdown/Dropdown.tsx
1858
- import { useEffect as useEffect16 } from "react";
1943
+ import { useEffect as useEffect17 } from "react";
1859
1944
 
1860
1945
  // src/components/ui/select.tsx
1861
1946
  import * as SelectPrimitive from "@radix-ui/react-select";
1862
1947
  import { CheckIcon as CheckIcon3, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
1863
- import { jsx as jsx35, jsxs as jsxs18 } from "react/jsx-runtime";
1948
+ import { jsx as jsx36, jsxs as jsxs19 } from "react/jsx-runtime";
1864
1949
  function Select({
1865
1950
  ...props
1866
1951
  }) {
1867
- return /* @__PURE__ */ jsx35(SelectPrimitive.Root, { "data-slot": "select", ...props });
1952
+ return /* @__PURE__ */ jsx36(SelectPrimitive.Root, { "data-slot": "select", ...props });
1868
1953
  }
1869
1954
  function SelectValue({
1870
1955
  ...props
1871
1956
  }) {
1872
- return /* @__PURE__ */ jsx35(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
1957
+ return /* @__PURE__ */ jsx36(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
1873
1958
  }
1874
1959
  function SelectTrigger({
1875
1960
  className,
@@ -1877,7 +1962,7 @@ function SelectTrigger({
1877
1962
  children,
1878
1963
  ...props
1879
1964
  }) {
1880
- return /* @__PURE__ */ jsxs18(
1965
+ return /* @__PURE__ */ jsxs19(
1881
1966
  SelectPrimitive.Trigger,
1882
1967
  {
1883
1968
  "data-slot": "select-trigger",
@@ -1889,7 +1974,7 @@ function SelectTrigger({
1889
1974
  ...props,
1890
1975
  children: [
1891
1976
  children,
1892
- /* @__PURE__ */ jsx35(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx35(ChevronDownIcon, { className: "size-4 opacity-50" }) })
1977
+ /* @__PURE__ */ jsx36(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx36(ChevronDownIcon, { className: "size-4 opacity-50" }) })
1893
1978
  ]
1894
1979
  }
1895
1980
  );
@@ -1900,7 +1985,7 @@ function SelectContent({
1900
1985
  position = "popper",
1901
1986
  ...props
1902
1987
  }) {
1903
- return /* @__PURE__ */ jsx35(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs18(
1988
+ return /* @__PURE__ */ jsx36(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs19(
1904
1989
  SelectPrimitive.Content,
1905
1990
  {
1906
1991
  "data-slot": "select-content",
@@ -1912,8 +1997,8 @@ function SelectContent({
1912
1997
  position,
1913
1998
  ...props,
1914
1999
  children: [
1915
- /* @__PURE__ */ jsx35(SelectScrollUpButton, {}),
1916
- /* @__PURE__ */ jsx35(
2000
+ /* @__PURE__ */ jsx36(SelectScrollUpButton, {}),
2001
+ /* @__PURE__ */ jsx36(
1917
2002
  SelectPrimitive.Viewport,
1918
2003
  {
1919
2004
  className: cn(
@@ -1923,7 +2008,7 @@ function SelectContent({
1923
2008
  children
1924
2009
  }
1925
2010
  ),
1926
- /* @__PURE__ */ jsx35(SelectScrollDownButton, {})
2011
+ /* @__PURE__ */ jsx36(SelectScrollDownButton, {})
1927
2012
  ]
1928
2013
  }
1929
2014
  ) });
@@ -1933,7 +2018,7 @@ function SelectItem({
1933
2018
  children,
1934
2019
  ...props
1935
2020
  }) {
1936
- return /* @__PURE__ */ jsxs18(
2021
+ return /* @__PURE__ */ jsxs19(
1937
2022
  SelectPrimitive.Item,
1938
2023
  {
1939
2024
  "data-slot": "select-item",
@@ -1943,8 +2028,8 @@ function SelectItem({
1943
2028
  ),
1944
2029
  ...props,
1945
2030
  children: [
1946
- /* @__PURE__ */ jsx35("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx35(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx35(CheckIcon3, { className: "size-4" }) }) }),
1947
- /* @__PURE__ */ jsx35(SelectPrimitive.ItemText, { children })
2031
+ /* @__PURE__ */ jsx36("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx36(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx36(CheckIcon3, { className: "size-4" }) }) }),
2032
+ /* @__PURE__ */ jsx36(SelectPrimitive.ItemText, { children })
1948
2033
  ]
1949
2034
  }
1950
2035
  );
@@ -1953,7 +2038,7 @@ function SelectScrollUpButton({
1953
2038
  className,
1954
2039
  ...props
1955
2040
  }) {
1956
- return /* @__PURE__ */ jsx35(
2041
+ return /* @__PURE__ */ jsx36(
1957
2042
  SelectPrimitive.ScrollUpButton,
1958
2043
  {
1959
2044
  "data-slot": "select-scroll-up-button",
@@ -1962,7 +2047,7 @@ function SelectScrollUpButton({
1962
2047
  className
1963
2048
  ),
1964
2049
  ...props,
1965
- children: /* @__PURE__ */ jsx35(ChevronUpIcon, { className: "size-4" })
2050
+ children: /* @__PURE__ */ jsx36(ChevronUpIcon, { className: "size-4" })
1966
2051
  }
1967
2052
  );
1968
2053
  }
@@ -1970,7 +2055,7 @@ function SelectScrollDownButton({
1970
2055
  className,
1971
2056
  ...props
1972
2057
  }) {
1973
- return /* @__PURE__ */ jsx35(
2058
+ return /* @__PURE__ */ jsx36(
1974
2059
  SelectPrimitive.ScrollDownButton,
1975
2060
  {
1976
2061
  "data-slot": "select-scroll-down-button",
@@ -1979,29 +2064,29 @@ function SelectScrollDownButton({
1979
2064
  className
1980
2065
  ),
1981
2066
  ...props,
1982
- children: /* @__PURE__ */ jsx35(ChevronDownIcon, { className: "size-4" })
2067
+ children: /* @__PURE__ */ jsx36(ChevronDownIcon, { className: "size-4" })
1983
2068
  }
1984
2069
  );
1985
2070
  }
1986
2071
 
1987
2072
  // src/components/Inputs/Dropdown/LazyDropdown.tsx
1988
- import { useState as useState8, useRef as useRef5, useEffect as useEffect15, useMemo as useMemo4 } from "react";
2073
+ import { useState as useState9, useRef as useRef6, useEffect as useEffect16, useMemo as useMemo4 } from "react";
1989
2074
  import { XSquareIcon } from "lucide-react";
1990
2075
 
1991
2076
  // src/hooks/useLazyDropdown.ts
1992
- import { useState as useState7, useEffect as useEffect14, useRef as useRef4, useCallback as useCallback2 } from "react";
2077
+ import { useState as useState8, useEffect as useEffect15, useRef as useRef5, useCallback as useCallback2 } from "react";
1993
2078
  import axios2 from "axios";
1994
2079
  function useLazyDropdown(config) {
1995
- const [options, setOptions] = useState7([]);
1996
- const [page, setPage] = useState7(1);
1997
- const [hasMore, setHasMore] = useState7(true);
1998
- const [loading, setLoading] = useState7(false);
1999
- const [searchTerm, setSearchTerm] = useState7("");
2000
- const debounceTimer = useRef4(null);
2001
- const allDataRef = useRef4([]);
2002
- const configRef = useRef4(config);
2080
+ const [options, setOptions] = useState8([]);
2081
+ const [page, setPage] = useState8(1);
2082
+ const [hasMore, setHasMore] = useState8(true);
2083
+ const [loading, setLoading] = useState8(false);
2084
+ const [searchTerm, setSearchTerm] = useState8("");
2085
+ const debounceTimer = useRef5(null);
2086
+ const allDataRef = useRef5([]);
2087
+ const configRef = useRef5(config);
2003
2088
  const PAGE_SIZE = config.pageSize || 10;
2004
- useEffect14(() => {
2089
+ useEffect15(() => {
2005
2090
  setOptions([]);
2006
2091
  setPage(1);
2007
2092
  setHasMore(true);
@@ -2014,7 +2099,7 @@ function useLazyDropdown(config) {
2014
2099
  return true;
2015
2100
  });
2016
2101
  };
2017
- useEffect14(() => {
2102
+ useEffect15(() => {
2018
2103
  configRef.current = config;
2019
2104
  }, [config]);
2020
2105
  function getValueByPath2(obj, path) {
@@ -2176,7 +2261,7 @@ function useLazyDropdown(config) {
2176
2261
  setLoading(false);
2177
2262
  }
2178
2263
  };
2179
- useEffect14(() => {
2264
+ useEffect15(() => {
2180
2265
  const cfg = configRef.current;
2181
2266
  if (!cfg.enabled || !cfg.value || cfg.dataSource !== "api" || !cfg.apiUrl) return;
2182
2267
  if (cfg.isMultiSelect) {
@@ -2205,12 +2290,12 @@ function useLazyDropdown(config) {
2205
2290
  setSearchTerm("");
2206
2291
  setPage(1);
2207
2292
  }, []);
2208
- useEffect14(() => {
2293
+ useEffect15(() => {
2209
2294
  if (config.initialData?.length) {
2210
2295
  allDataRef.current = config.initialData;
2211
2296
  }
2212
2297
  }, [config.initialData]);
2213
- useEffect14(() => {
2298
+ useEffect15(() => {
2214
2299
  if (config.fetchOnMount) loadPage(1, "");
2215
2300
  return () => {
2216
2301
  if (debounceTimer.current) clearTimeout(debounceTimer.current);
@@ -2257,7 +2342,7 @@ function useLazyDropdown(config) {
2257
2342
  }
2258
2343
 
2259
2344
  // src/components/Inputs/Dropdown/LazyDropdown.tsx
2260
- import { Fragment as Fragment11, jsx as jsx36, jsxs as jsxs19 } from "react/jsx-runtime";
2345
+ import { Fragment as Fragment11, jsx as jsx37, jsxs as jsxs20 } from "react/jsx-runtime";
2261
2346
  function LazySelectDropdown({
2262
2347
  options = [],
2263
2348
  value,
@@ -2278,11 +2363,12 @@ function LazySelectDropdown({
2278
2363
  enforceStrictQueryParams = false,
2279
2364
  ...props
2280
2365
  }) {
2281
- const [isOpen, setIsOpen] = useState8(false);
2282
- const [searchTerm, setSearchTerm] = useState8("");
2283
- const [highlightedIndex, setHighlightedIndex] = useState8(-1);
2284
- const dropdownRef = useRef5(null);
2285
- const observerTarget = useRef5(null);
2366
+ const [isOpen, setIsOpen] = useState9(false);
2367
+ const [searchTerm, setSearchTerm] = useState9("");
2368
+ const [highlightedIndex, setHighlightedIndex] = useState9(-1);
2369
+ const dropdownRef = useRef6(null);
2370
+ const popupRef = useRef6(null);
2371
+ const observerTarget = useRef6(null);
2286
2372
  const {
2287
2373
  options: lazyOptions,
2288
2374
  loading,
@@ -2305,25 +2391,30 @@ function LazySelectDropdown({
2305
2391
  enforceStrictQueryParams
2306
2392
  });
2307
2393
  const selectedOption = useMemo4(() => lazyOptions.find((opt) => opt.value === value), [lazyOptions, value]);
2308
- useEffect15(() => {
2394
+ useEffect16(() => {
2309
2395
  if (!isOpen) {
2310
2396
  setHighlightedIndex(-1);
2311
2397
  } else if (lazyOptions.length > 0 && highlightedIndex === -1) {
2312
2398
  setHighlightedIndex(0);
2313
2399
  }
2314
2400
  }, [isOpen, lazyOptions.length, highlightedIndex]);
2315
- useEffect15(() => {
2316
- const handleClickOutside = (e) => {
2317
- if (dropdownRef.current && !dropdownRef.current.contains(e.target)) {
2401
+ useEffect16(() => {
2402
+ const handleOutside = (e) => {
2403
+ const target = e.target;
2404
+ if (dropdownRef.current && !dropdownRef.current.contains(target) && (!popupRef.current || !popupRef.current.contains(target))) {
2318
2405
  setIsOpen(false);
2319
2406
  setSearchTerm("");
2320
2407
  setHighlightedIndex(-1);
2321
2408
  }
2322
2409
  };
2323
- document.addEventListener("mousedown", handleClickOutside);
2324
- return () => document.removeEventListener("mousedown", handleClickOutside);
2410
+ document.addEventListener("mousedown", handleOutside);
2411
+ document.addEventListener("focusin", handleOutside);
2412
+ return () => {
2413
+ document.removeEventListener("mousedown", handleOutside);
2414
+ document.removeEventListener("focusin", handleOutside);
2415
+ };
2325
2416
  }, []);
2326
- useEffect15(() => {
2417
+ useEffect16(() => {
2327
2418
  if (!isOpen || !hasMore || loading) return;
2328
2419
  const observer = new IntersectionObserver(
2329
2420
  (entries) => {
@@ -2414,8 +2505,8 @@ function LazySelectDropdown({
2414
2505
  break;
2415
2506
  }
2416
2507
  };
2417
- return /* @__PURE__ */ jsxs19("div", { ref: dropdownRef, className: "relative w-full", children: [
2418
- /* @__PURE__ */ jsx36(
2508
+ return /* @__PURE__ */ jsxs20("div", { ref: dropdownRef, className: "relative w-full", children: [
2509
+ /* @__PURE__ */ jsx37(
2419
2510
  "input",
2420
2511
  {
2421
2512
  type: "text",
@@ -2437,20 +2528,21 @@ function LazySelectDropdown({
2437
2528
  autoComplete: "off"
2438
2529
  }
2439
2530
  ),
2440
- selectedOption && !disabled && !readOnly && /* @__PURE__ */ jsx36(
2531
+ selectedOption && !disabled && !readOnly && /* @__PURE__ */ jsx37(
2441
2532
  "button",
2442
2533
  {
2443
2534
  type: "button",
2444
2535
  "aria-label": "Clear selection",
2445
2536
  onClick: handleRemoveSelection,
2446
2537
  className: "absolute right-2 top-1/2 -translate-y-1/2 h-5 w-5 flex items-center justify-center rounded hover:bg-gray-200 text-gray-500 focus:outline-none",
2447
- children: /* @__PURE__ */ jsx36(XSquareIcon, { className: "h-5 w-5 pointer-events-none" })
2538
+ children: /* @__PURE__ */ jsx37(XSquareIcon, { className: "h-5 w-5 pointer-events-none" })
2448
2539
  }
2449
2540
  ),
2450
- errorMessage && /* @__PURE__ */ jsx36("p", { className: "mt-1 text-xs text-red-500", children: errorMessage }),
2451
- isOpen && !disabled && /* @__PURE__ */ jsx36(Portal_default, { children: /* @__PURE__ */ jsx36(
2541
+ errorMessage && /* @__PURE__ */ jsx37("p", { className: "mt-1 text-xs text-red-500", children: errorMessage }),
2542
+ isOpen && !disabled && /* @__PURE__ */ jsx37(Portal_default, { children: /* @__PURE__ */ jsx37(
2452
2543
  "div",
2453
2544
  {
2545
+ ref: popupRef,
2454
2546
  onMouseDown: (e) => e.stopPropagation(),
2455
2547
  className: "absolute z-[900] w-fit mt-1 bg-white border border-gray-300 rounded-lg shadow-lg max-h-60 overflow-y-auto",
2456
2548
  style: {
@@ -2459,14 +2551,14 @@ function LazySelectDropdown({
2459
2551
  top: dropdownRef.current ? dropdownRef.current.getBoundingClientRect().bottom + window.scrollY : 0,
2460
2552
  left: dropdownRef.current ? dropdownRef.current.getBoundingClientRect().left + window.scrollX : 0
2461
2553
  },
2462
- children: props.loading && !loading ? /* @__PURE__ */ jsxs19("div", { className: "px-3 py-4 text-center text-gray-500 flex items-center justify-center gap-2 text-sm", children: [
2463
- /* @__PURE__ */ jsx36("div", { className: "animate-spin w-4 h-4 border-2 border-gray-300 border-t-blue-500 rounded-full" }),
2554
+ children: props.loading && !loading ? /* @__PURE__ */ jsxs20("div", { className: "px-3 py-4 text-center text-gray-500 flex items-center justify-center gap-2 text-sm", children: [
2555
+ /* @__PURE__ */ jsx37("div", { className: "animate-spin w-4 h-4 border-2 border-gray-300 border-t-blue-500 rounded-full" }),
2464
2556
  "Loading..."
2465
- ] }) : /* @__PURE__ */ jsx36(Fragment11, { children: loading && lazyOptions.length === 0 ? /* @__PURE__ */ jsxs19("div", { className: "px-3 py-4 text-center text-gray-500 flex items-center justify-center gap-2 text-sm", children: [
2466
- /* @__PURE__ */ jsx36("div", { className: "animate-spin w-4 h-4 border-2 border-gray-300 border-t-blue-500 rounded-full" }),
2557
+ ] }) : /* @__PURE__ */ jsx37(Fragment11, { children: loading && lazyOptions.length === 0 ? /* @__PURE__ */ jsxs20("div", { className: "px-3 py-4 text-center text-gray-500 flex items-center justify-center gap-2 text-sm", children: [
2558
+ /* @__PURE__ */ jsx37("div", { className: "animate-spin w-4 h-4 border-2 border-gray-300 border-t-blue-500 rounded-full" }),
2467
2559
  "Loading..."
2468
- ] }) : lazyOptions.length > 0 ? /* @__PURE__ */ jsxs19(Fragment11, { children: [
2469
- lazyOptions.map((option, index) => /* @__PURE__ */ jsx36(
2560
+ ] }) : lazyOptions.length > 0 ? /* @__PURE__ */ jsxs20(Fragment11, { children: [
2561
+ lazyOptions.map((option, index) => /* @__PURE__ */ jsx37(
2470
2562
  "div",
2471
2563
  {
2472
2564
  tabIndex: 0,
@@ -2485,20 +2577,20 @@ function LazySelectDropdown({
2485
2577
  },
2486
2578
  `${option.value}-${index}`
2487
2579
  )),
2488
- hasMore && /* @__PURE__ */ jsx36(
2580
+ hasMore && /* @__PURE__ */ jsx37(
2489
2581
  "div",
2490
2582
  {
2491
2583
  ref: observerTarget,
2492
2584
  className: "px-3 py-2 text-center text-gray-400 text-sm border-t",
2493
- children: loading ? /* @__PURE__ */ jsxs19("div", { className: "flex items-center justify-center gap-2 text-sm", children: [
2494
- /* @__PURE__ */ jsx36("div", { className: "animate-spin w-3 h-3 border-2 border-gray-300 border-t-blue-500 rounded-full" }),
2585
+ children: loading ? /* @__PURE__ */ jsxs20("div", { className: "flex items-center justify-center gap-2 text-sm", children: [
2586
+ /* @__PURE__ */ jsx37("div", { className: "animate-spin w-3 h-3 border-2 border-gray-300 border-t-blue-500 rounded-full" }),
2495
2587
  "Loading more..."
2496
2588
  ] }) : "Scroll for more..."
2497
2589
  }
2498
2590
  )
2499
- ] }) : /* @__PURE__ */ jsxs19("div", { className: "px-3 py-4 text-sm text-center text-gray-500", children: [
2591
+ ] }) : /* @__PURE__ */ jsxs20("div", { className: "px-3 py-4 text-sm text-center text-gray-500", children: [
2500
2592
  searchTerm ? `No results for "${searchTerm}"` : "No options available",
2501
- enableAddNewOption && searchTerm && /* @__PURE__ */ jsx36(
2593
+ enableAddNewOption && searchTerm && /* @__PURE__ */ jsx37(
2502
2594
  "div",
2503
2595
  {
2504
2596
  onClick: () => handleAddNewOption(searchTerm),
@@ -2514,14 +2606,14 @@ function LazySelectDropdown({
2514
2606
  var LazyDropdown_default = LazySelectDropdown;
2515
2607
 
2516
2608
  // src/components/Inputs/Dropdown/Dropdown.tsx
2517
- import { Fragment as Fragment12, jsx as jsx37, jsxs as jsxs20 } from "react/jsx-runtime";
2609
+ import { Fragment as Fragment12, jsx as jsx38, jsxs as jsxs21 } from "react/jsx-runtime";
2518
2610
  var Dropdown = ({ className, style, ...props }) => {
2519
2611
  const list = Array.isArray(props?.data) ? props.data : [];
2520
2612
  const placeholder = props.placeholder ? props.placeholder : "Select an option";
2521
2613
  const isEditable = props.isEditable ?? true;
2522
2614
  const isDisabled = props.isDisabled ?? false;
2523
2615
  const isReadonly = props.isReadonly ?? false;
2524
- useEffect16(() => {
2616
+ useEffect17(() => {
2525
2617
  if (props.value !== void 0) {
2526
2618
  handleChange(props.value);
2527
2619
  }
@@ -2536,7 +2628,7 @@ var Dropdown = ({ className, style, ...props }) => {
2536
2628
  label: item[dataLabel]
2537
2629
  }));
2538
2630
  if (props.lazyLoad) {
2539
- return /* @__PURE__ */ jsx37(
2631
+ return /* @__PURE__ */ jsx38(
2540
2632
  LazyDropdown_default,
2541
2633
  {
2542
2634
  ...props,
@@ -2553,9 +2645,9 @@ var Dropdown = ({ className, style, ...props }) => {
2553
2645
  }
2554
2646
  );
2555
2647
  }
2556
- return /* @__PURE__ */ jsxs20(Fragment12, { children: [
2557
- /* @__PURE__ */ jsxs20(Select, { name: props.name, value: props.value || "", onValueChange: handleChange, disabled: isDisabled || !isEditable, children: [
2558
- /* @__PURE__ */ jsx37(
2648
+ return /* @__PURE__ */ jsxs21(Fragment12, { children: [
2649
+ /* @__PURE__ */ jsxs21(Select, { name: props.name, value: props.value || "", onValueChange: handleChange, disabled: isDisabled || !isEditable, children: [
2650
+ /* @__PURE__ */ jsx38(
2559
2651
  SelectTrigger,
2560
2652
  {
2561
2653
  id: props.name || "select-field",
@@ -2565,31 +2657,31 @@ var Dropdown = ({ className, style, ...props }) => {
2565
2657
  borderColor: props.errorMessage ? "#f87171" : style?.borderColor
2566
2658
  },
2567
2659
  "aria-readonly": isReadonly,
2568
- children: /* @__PURE__ */ jsx37(SelectValue, { placeholder })
2660
+ children: /* @__PURE__ */ jsx38(SelectValue, { placeholder })
2569
2661
  }
2570
2662
  ),
2571
- /* @__PURE__ */ jsxs20(SelectContent, { children: [
2572
- props.dataLoading && /* @__PURE__ */ jsx37(SelectItem, { value: "none", disabled: true, children: "Loading..." }),
2573
- !props.dataLoading && options.length === 0 && /* @__PURE__ */ jsx37(SelectItem, { value: "none", disabled: true, children: "No options" }),
2574
- options.map((opt) => /* @__PURE__ */ jsx37(SelectItem, { value: opt.value, children: opt.label }, opt.value))
2663
+ /* @__PURE__ */ jsxs21(SelectContent, { children: [
2664
+ props.dataLoading && /* @__PURE__ */ jsx38(SelectItem, { value: "none", disabled: true, children: "Loading..." }),
2665
+ !props.dataLoading && options.length === 0 && /* @__PURE__ */ jsx38(SelectItem, { value: "none", disabled: true, children: "No options" }),
2666
+ options.map((opt) => /* @__PURE__ */ jsx38(SelectItem, { value: opt.value, children: opt.label }, opt.value))
2575
2667
  ] })
2576
2668
  ] }),
2577
- props.errorMessage && /* @__PURE__ */ jsx37("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
2669
+ props.errorMessage && /* @__PURE__ */ jsx38("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
2578
2670
  ] });
2579
2671
  };
2580
2672
  var Dropdown_default = Dropdown;
2581
2673
 
2582
2674
  // src/components/Inputs/SwitchToggle/SwitchToggle.tsx
2583
- import { useEffect as useEffect17 } from "react";
2675
+ import { useEffect as useEffect18 } from "react";
2584
2676
 
2585
2677
  // src/components/ui/switch.tsx
2586
2678
  import * as SwitchPrimitive from "@radix-ui/react-switch";
2587
- import { jsx as jsx38 } from "react/jsx-runtime";
2679
+ import { jsx as jsx39 } from "react/jsx-runtime";
2588
2680
  function Switch({
2589
2681
  className,
2590
2682
  ...props
2591
2683
  }) {
2592
- return /* @__PURE__ */ jsx38(
2684
+ return /* @__PURE__ */ jsx39(
2593
2685
  SwitchPrimitive.Root,
2594
2686
  {
2595
2687
  "data-slot": "switch",
@@ -2598,7 +2690,7 @@ function Switch({
2598
2690
  className
2599
2691
  ),
2600
2692
  ...props,
2601
- children: /* @__PURE__ */ jsx38(
2693
+ children: /* @__PURE__ */ jsx39(
2602
2694
  SwitchPrimitive.Thumb,
2603
2695
  {
2604
2696
  "data-slot": "switch-thumb",
@@ -2612,11 +2704,11 @@ function Switch({
2612
2704
  }
2613
2705
 
2614
2706
  // src/components/Inputs/SwitchToggle/SwitchToggle.tsx
2615
- import { Fragment as Fragment13, jsx as jsx39, jsxs as jsxs21 } from "react/jsx-runtime";
2707
+ import { Fragment as Fragment13, jsx as jsx40, jsxs as jsxs22 } from "react/jsx-runtime";
2616
2708
  var SwitchToggle = ({ className, style, ...props }) => {
2617
2709
  const isEditable = props.isEditable ?? true;
2618
2710
  const isDisabled = props.isDisabled ?? false;
2619
- useEffect17(() => {
2711
+ useEffect18(() => {
2620
2712
  if (props.value !== void 0) {
2621
2713
  handleChange?.(props.value);
2622
2714
  }
@@ -2624,9 +2716,9 @@ var SwitchToggle = ({ className, style, ...props }) => {
2624
2716
  const handleChange = (value) => {
2625
2717
  props.onChange?.(value, props?.name || "");
2626
2718
  };
2627
- return /* @__PURE__ */ jsxs21(Fragment13, { children: [
2628
- /* @__PURE__ */ jsx39("div", { className, style, children: /* @__PURE__ */ jsxs21("div", { className: "flex items-center space-x-2 mb-2", children: [
2629
- /* @__PURE__ */ jsx39(
2719
+ return /* @__PURE__ */ jsxs22(Fragment13, { children: [
2720
+ /* @__PURE__ */ jsx40("div", { className, style, children: /* @__PURE__ */ jsxs22("div", { className: "flex items-center space-x-2 mb-2", children: [
2721
+ /* @__PURE__ */ jsx40(
2630
2722
  Switch,
2631
2723
  {
2632
2724
  id: props.name || "switch",
@@ -2635,18 +2727,18 @@ var SwitchToggle = ({ className, style, ...props }) => {
2635
2727
  disabled: isDisabled || !isEditable
2636
2728
  }
2637
2729
  ),
2638
- /* @__PURE__ */ jsx39(Label2, { htmlFor: props.name || "switch", children: props.text })
2730
+ /* @__PURE__ */ jsx40(Label2, { htmlFor: props.name || "switch", children: props.text })
2639
2731
  ] }) }),
2640
- props.errorMessage && /* @__PURE__ */ jsx39("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
2732
+ props.errorMessage && /* @__PURE__ */ jsx40("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
2641
2733
  ] });
2642
2734
  };
2643
2735
  var SwitchToggle_default = SwitchToggle;
2644
2736
 
2645
2737
  // src/components/Inputs/PhoneInput/PhoneInput.tsx
2646
- import { useEffect as useEffect18, useRef as useRef6 } from "react";
2738
+ import { useEffect as useEffect19, useRef as useRef7 } from "react";
2647
2739
  import { PhoneInput as PhoneInputField } from "react-international-phone";
2648
2740
  import "react-international-phone/style.css";
2649
- import { Fragment as Fragment14, jsx as jsx40, jsxs as jsxs22 } from "react/jsx-runtime";
2741
+ import { Fragment as Fragment14, jsx as jsx41, jsxs as jsxs23 } from "react/jsx-runtime";
2650
2742
  var ensureDialcode = (val) => {
2651
2743
  if (!val) return "";
2652
2744
  const trimmed = val.trim();
@@ -2655,11 +2747,11 @@ var ensureDialcode = (val) => {
2655
2747
  return `+91${local}`;
2656
2748
  };
2657
2749
  var PhoneInput = ({ className, style, ...props }) => {
2658
- const ref = useRef6(null);
2750
+ const ref = useRef7(null);
2659
2751
  const placeholder = props.placeholder ?? "Enter phone number";
2660
2752
  const isEditable = props.isEditable ?? true;
2661
2753
  const isDisabled = props.isDisabled ?? false;
2662
- useEffect18(() => {
2754
+ useEffect19(() => {
2663
2755
  if (props.value !== void 0) {
2664
2756
  handleChange?.(ensureDialcode(props.value), ref.current?.state);
2665
2757
  }
@@ -2674,8 +2766,8 @@ var PhoneInput = ({ className, style, ...props }) => {
2674
2766
  props.onChange?.(event, props.name || "");
2675
2767
  props.getPhoneState?.(meta);
2676
2768
  };
2677
- return /* @__PURE__ */ jsxs22(Fragment14, { children: [
2678
- /* @__PURE__ */ jsx40(
2769
+ return /* @__PURE__ */ jsxs23(Fragment14, { children: [
2770
+ /* @__PURE__ */ jsx41(
2679
2771
  PhoneInputField,
2680
2772
  {
2681
2773
  ref,
@@ -2700,21 +2792,21 @@ var PhoneInput = ({ className, style, ...props }) => {
2700
2792
  disabled: isDisabled || !isEditable
2701
2793
  }
2702
2794
  ),
2703
- props.errorMessage && /* @__PURE__ */ jsx40("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
2795
+ props.errorMessage && /* @__PURE__ */ jsx41("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
2704
2796
  ] });
2705
2797
  };
2706
2798
  var PhoneInput_default = PhoneInput;
2707
2799
 
2708
2800
  // src/components/Inputs/SearchInput/SearchInput.tsx
2709
- import { useEffect as useEffect19 } from "react";
2710
- import { Fragment as Fragment15, jsx as jsx41, jsxs as jsxs23 } from "react/jsx-runtime";
2801
+ import { useEffect as useEffect20 } from "react";
2802
+ import { Fragment as Fragment15, jsx as jsx42, jsxs as jsxs24 } from "react/jsx-runtime";
2711
2803
  var SearchInput = ({ className, style, ...props }) => {
2712
2804
  const placeholder = props.placeholder ?? "Placeholder text";
2713
2805
  const isEditable = props.isEditable ?? true;
2714
2806
  const isDisabled = props.isDisabled ?? false;
2715
2807
  const isReadonly = props.isReadonly ?? false;
2716
2808
  const isAutocomplete = props.isAutocomplete ?? false;
2717
- useEffect19(() => {
2809
+ useEffect20(() => {
2718
2810
  if (props.value !== void 0) {
2719
2811
  const e = { target: { value: props.value }, type: "change" };
2720
2812
  handleChange?.(e);
@@ -2730,8 +2822,8 @@ var SearchInput = ({ className, style, ...props }) => {
2730
2822
  if (value === null || value === void 0) return "";
2731
2823
  return value;
2732
2824
  };
2733
- return /* @__PURE__ */ jsxs23(Fragment15, { children: [
2734
- /* @__PURE__ */ jsx41("div", { className: "flex justify-start items-center relative", children: /* @__PURE__ */ jsx41(
2825
+ return /* @__PURE__ */ jsxs24(Fragment15, { children: [
2826
+ /* @__PURE__ */ jsx42("div", { className: "flex justify-start items-center relative", children: /* @__PURE__ */ jsx42(
2735
2827
  Input,
2736
2828
  {
2737
2829
  type: props.inputType || "search",
@@ -2750,17 +2842,17 @@ var SearchInput = ({ className, style, ...props }) => {
2750
2842
  readOnly: isReadonly
2751
2843
  }
2752
2844
  ) }),
2753
- props.errorMessage && /* @__PURE__ */ jsx41("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
2845
+ props.errorMessage && /* @__PURE__ */ jsx42("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
2754
2846
  ] });
2755
2847
  };
2756
2848
  var SearchInput_default = SearchInput;
2757
2849
 
2758
2850
  // src/components/Inputs/FileInput/FileInput.tsx
2759
- import { useEffect as useEffect20 } from "react";
2760
- import { jsx as jsx42, jsxs as jsxs24 } from "react/jsx-runtime";
2851
+ import { useEffect as useEffect21 } from "react";
2852
+ import { jsx as jsx43, jsxs as jsxs25 } from "react/jsx-runtime";
2761
2853
  var FileInput = ({ className, style, ...props }) => {
2762
2854
  const placeholder = props.placeholder ?? "Placeholder text";
2763
- useEffect20(() => {
2855
+ useEffect21(() => {
2764
2856
  if (props.value !== void 0) {
2765
2857
  const e = { target: { value: props.value }, type: "change" };
2766
2858
  handleChange?.(e);
@@ -2776,8 +2868,8 @@ var FileInput = ({ className, style, ...props }) => {
2776
2868
  if (value === null || value === void 0) return "";
2777
2869
  return value;
2778
2870
  };
2779
- return /* @__PURE__ */ jsxs24("div", { className: "d-flex items-center relative align-middle", children: [
2780
- /* @__PURE__ */ jsx42(
2871
+ return /* @__PURE__ */ jsxs25("div", { className: "d-flex items-center relative align-middle", children: [
2872
+ /* @__PURE__ */ jsx43(
2781
2873
  Input,
2782
2874
  {
2783
2875
  type: props.inputType || "file",
@@ -2794,25 +2886,25 @@ var FileInput = ({ className, style, ...props }) => {
2794
2886
  onChange: handleChange
2795
2887
  }
2796
2888
  ),
2797
- props.errorMessage && /* @__PURE__ */ jsx42("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
2889
+ props.errorMessage && /* @__PURE__ */ jsx43("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
2798
2890
  ] });
2799
2891
  };
2800
2892
  var FileInput_default = FileInput;
2801
2893
 
2802
2894
  // src/components/Inputs/DatePicker/DatePicker.tsx
2803
- import * as React8 from "react";
2895
+ import * as React9 from "react";
2804
2896
  import { format } from "date-fns";
2805
2897
  import { Calendar1Icon, XSquareIcon as XSquareIcon2 } from "lucide-react";
2806
2898
 
2807
2899
  // src/components/ui/calendar.tsx
2808
- import * as React7 from "react";
2900
+ import * as React8 from "react";
2809
2901
  import {
2810
2902
  ChevronDownIcon as ChevronDownIcon2,
2811
2903
  ChevronLeftIcon,
2812
2904
  ChevronRightIcon as ChevronRightIcon2
2813
2905
  } from "lucide-react";
2814
2906
  import { DayPicker, getDefaultClassNames } from "react-day-picker";
2815
- import { jsx as jsx43 } from "react/jsx-runtime";
2907
+ import { jsx as jsx44 } from "react/jsx-runtime";
2816
2908
  function Calendar({
2817
2909
  className,
2818
2910
  classNames,
@@ -2824,7 +2916,7 @@ function Calendar({
2824
2916
  ...props
2825
2917
  }) {
2826
2918
  const defaultClassNames = getDefaultClassNames();
2827
- return /* @__PURE__ */ jsx43(
2919
+ return /* @__PURE__ */ jsx44(
2828
2920
  DayPicker,
2829
2921
  {
2830
2922
  showOutsideDays,
@@ -2923,7 +3015,7 @@ function Calendar({
2923
3015
  },
2924
3016
  components: {
2925
3017
  Root: ({ className: className2, rootRef, ...props2 }) => {
2926
- return /* @__PURE__ */ jsx43(
3018
+ return /* @__PURE__ */ jsx44(
2927
3019
  "div",
2928
3020
  {
2929
3021
  "data-slot": "calendar",
@@ -2935,10 +3027,10 @@ function Calendar({
2935
3027
  },
2936
3028
  Chevron: ({ className: className2, orientation, ...props2 }) => {
2937
3029
  if (orientation === "left") {
2938
- return /* @__PURE__ */ jsx43(ChevronLeftIcon, { className: cn("size-4", className2), ...props2 });
3030
+ return /* @__PURE__ */ jsx44(ChevronLeftIcon, { className: cn("size-4", className2), ...props2 });
2939
3031
  }
2940
3032
  if (orientation === "right") {
2941
- return /* @__PURE__ */ jsx43(
3033
+ return /* @__PURE__ */ jsx44(
2942
3034
  ChevronRightIcon2,
2943
3035
  {
2944
3036
  className: cn("size-4", className2),
@@ -2946,11 +3038,11 @@ function Calendar({
2946
3038
  }
2947
3039
  );
2948
3040
  }
2949
- return /* @__PURE__ */ jsx43(ChevronDownIcon2, { className: cn("size-4", className2), ...props2 });
3041
+ return /* @__PURE__ */ jsx44(ChevronDownIcon2, { className: cn("size-4", className2), ...props2 });
2950
3042
  },
2951
3043
  DayButton: CalendarDayButton,
2952
3044
  WeekNumber: ({ children, ...props2 }) => {
2953
- return /* @__PURE__ */ jsx43("td", { ...props2, children: /* @__PURE__ */ jsx43("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) });
3045
+ return /* @__PURE__ */ jsx44("td", { ...props2, children: /* @__PURE__ */ jsx44("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) });
2954
3046
  },
2955
3047
  ...components
2956
3048
  },
@@ -2965,11 +3057,11 @@ function CalendarDayButton({
2965
3057
  ...props
2966
3058
  }) {
2967
3059
  const defaultClassNames = getDefaultClassNames();
2968
- const ref = React7.useRef(null);
2969
- React7.useEffect(() => {
3060
+ const ref = React8.useRef(null);
3061
+ React8.useEffect(() => {
2970
3062
  if (modifiers.focused) ref.current?.focus();
2971
3063
  }, [modifiers.focused]);
2972
- return /* @__PURE__ */ jsx43(
3064
+ return /* @__PURE__ */ jsx44(
2973
3065
  Button,
2974
3066
  {
2975
3067
  ref,
@@ -2992,16 +3084,16 @@ function CalendarDayButton({
2992
3084
 
2993
3085
  // src/components/ui/popover.tsx
2994
3086
  import * as PopoverPrimitive from "@radix-ui/react-popover";
2995
- import { jsx as jsx44 } from "react/jsx-runtime";
3087
+ import { jsx as jsx45 } from "react/jsx-runtime";
2996
3088
  function Popover({
2997
3089
  ...props
2998
3090
  }) {
2999
- return /* @__PURE__ */ jsx44(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
3091
+ return /* @__PURE__ */ jsx45(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
3000
3092
  }
3001
3093
  function PopoverTrigger({
3002
3094
  ...props
3003
3095
  }) {
3004
- return /* @__PURE__ */ jsx44(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
3096
+ return /* @__PURE__ */ jsx45(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
3005
3097
  }
3006
3098
  function PopoverContent({
3007
3099
  className,
@@ -3009,7 +3101,7 @@ function PopoverContent({
3009
3101
  sideOffset = 4,
3010
3102
  ...props
3011
3103
  }) {
3012
- return /* @__PURE__ */ jsx44(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx44(
3104
+ return /* @__PURE__ */ jsx45(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx45(
3013
3105
  PopoverPrimitive.Content,
3014
3106
  {
3015
3107
  "data-slot": "popover-content",
@@ -3025,7 +3117,7 @@ function PopoverContent({
3025
3117
  }
3026
3118
 
3027
3119
  // src/components/Inputs/DatePicker/DatePicker.tsx
3028
- import { Fragment as Fragment16, jsx as jsx45, jsxs as jsxs25 } from "react/jsx-runtime";
3120
+ import { Fragment as Fragment16, jsx as jsx46, jsxs as jsxs26 } from "react/jsx-runtime";
3029
3121
  function resolveDate(option, customOption) {
3030
3122
  if (!option) return void 0;
3031
3123
  switch (option) {
@@ -3092,7 +3184,7 @@ function DateTimePicker({
3092
3184
  mode = "date",
3093
3185
  ...props
3094
3186
  }) {
3095
- const [open, setOpen] = React8.useState(false);
3187
+ const [open, setOpen] = React9.useState(false);
3096
3188
  const placeholderMap = {
3097
3189
  date: "Select date",
3098
3190
  datetime: "Select date & time",
@@ -3111,7 +3203,7 @@ function DateTimePicker({
3111
3203
  const isAutocomplete = props.isAutocomplete ?? false;
3112
3204
  const minDate = resolveDate(minimumDate, customMinimumDate);
3113
3205
  const maxDate = resolveDate(maximumDate, customMaximumDate);
3114
- const [date, setDate] = React8.useState(() => {
3206
+ const [date, setDate] = React9.useState(() => {
3115
3207
  if (props.value) {
3116
3208
  const d = new Date(props.value);
3117
3209
  if (!isNaN(d.getTime())) return d;
@@ -3120,15 +3212,15 @@ function DateTimePicker({
3120
3212
  });
3121
3213
  const initialHours = date ? date.getHours() : 0;
3122
3214
  const initialMinutes = date ? date.getMinutes() : 0;
3123
- const [hours, setHours] = React8.useState(initialHours);
3124
- const [minutes, setMinutes] = React8.useState(initialMinutes);
3125
- const [amPm, setAmPm] = React8.useState("AM");
3126
- const displayHours = React8.useMemo(() => {
3215
+ const [hours, setHours] = React9.useState(initialHours);
3216
+ const [minutes, setMinutes] = React9.useState(initialMinutes);
3217
+ const [amPm, setAmPm] = React9.useState("AM");
3218
+ const displayHours = React9.useMemo(() => {
3127
3219
  if (hours === 0) return 12;
3128
3220
  if (hours > 12) return hours - 12;
3129
3221
  return hours;
3130
3222
  }, [hours]);
3131
- React8.useEffect(() => {
3223
+ React9.useEffect(() => {
3132
3224
  setAmPm(hours >= 12 ? "PM" : "AM");
3133
3225
  }, [hours]);
3134
3226
  const emitChange = (nextDate) => {
@@ -3152,7 +3244,7 @@ function DateTimePicker({
3152
3244
  };
3153
3245
  props.onChange(event, props.name || "");
3154
3246
  };
3155
- React8.useEffect(() => {
3247
+ React9.useEffect(() => {
3156
3248
  if (!props.value) {
3157
3249
  const defaultDate = resolveDefaultDate(defaultDateValue, customDefaultDate);
3158
3250
  setDate(defaultDate);
@@ -3174,8 +3266,8 @@ function DateTimePicker({
3174
3266
  setMinutes(d.getMinutes());
3175
3267
  }
3176
3268
  }, [props.value, defaultDateValue, customDefaultDate]);
3177
- const [year, setYear] = React8.useState(date ? date.getFullYear() : (/* @__PURE__ */ new Date()).getFullYear());
3178
- React8.useEffect(() => {
3269
+ const [year, setYear] = React9.useState(date ? date.getFullYear() : (/* @__PURE__ */ new Date()).getFullYear());
3270
+ React9.useEffect(() => {
3179
3271
  if (!date) return;
3180
3272
  const newDate = new Date(date);
3181
3273
  newDate.setFullYear(year);
@@ -3259,7 +3351,7 @@ function DateTimePicker({
3259
3351
  for (let y = currentYear - 90; y <= currentYear; y++) {
3260
3352
  yearOptions.push(y);
3261
3353
  }
3262
- const displayValue = React8.useMemo(() => {
3354
+ const displayValue = React9.useMemo(() => {
3263
3355
  if (!date) return "";
3264
3356
  try {
3265
3357
  if (mode === "date") return format(date, "dd-MM-yyyy");
@@ -3270,11 +3362,11 @@ function DateTimePicker({
3270
3362
  }
3271
3363
  }, [date, mode]);
3272
3364
  const isInputDisabled = isDisabled || !isEditable;
3273
- const [calendarMonthState, setCalendarMonthState] = React8.useState(() => {
3365
+ const [calendarMonthState, setCalendarMonthState] = React9.useState(() => {
3274
3366
  const currentMonth = (/* @__PURE__ */ new Date()).getMonth();
3275
3367
  return date ? new Date(date.getFullYear(), date.getMonth()) : new Date(year, currentMonth);
3276
3368
  });
3277
- React8.useEffect(() => {
3369
+ React9.useEffect(() => {
3278
3370
  setCalendarMonthState(new Date(year, calendarMonthState.getMonth()));
3279
3371
  }, [year]);
3280
3372
  const handleToday = () => {
@@ -3283,9 +3375,9 @@ function DateTimePicker({
3283
3375
  updateDateTime(selectedYearDate);
3284
3376
  setOpen(false);
3285
3377
  };
3286
- return /* @__PURE__ */ jsxs25("div", { className: "flex flex-col", children: [
3287
- /* @__PURE__ */ jsxs25(Popover, { open, onOpenChange: setOpen, children: [
3288
- /* @__PURE__ */ jsx45(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs25(
3378
+ return /* @__PURE__ */ jsxs26("div", { className: "flex flex-col", children: [
3379
+ /* @__PURE__ */ jsxs26(Popover, { open, onOpenChange: setOpen, children: [
3380
+ /* @__PURE__ */ jsx46(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs26(
3289
3381
  Button,
3290
3382
  {
3291
3383
  type: "button",
@@ -3302,9 +3394,9 @@ function DateTimePicker({
3302
3394
  },
3303
3395
  disabled: isInputDisabled,
3304
3396
  children: [
3305
- /* @__PURE__ */ jsx45(Calendar1Icon, { className: "absolute left-2 top-2" }),
3306
- /* @__PURE__ */ jsx45("span", { className: "ml-5", children: displayValue || placeholder }),
3307
- displayValue && /* @__PURE__ */ jsx45(
3397
+ /* @__PURE__ */ jsx46(Calendar1Icon, { className: "absolute left-2 top-2" }),
3398
+ /* @__PURE__ */ jsx46("span", { className: "ml-5", children: displayValue || placeholder }),
3399
+ displayValue && /* @__PURE__ */ jsx46(
3308
3400
  XSquareIcon2,
3309
3401
  {
3310
3402
  className: "absolute right-2 top-2 cursor-pointer",
@@ -3321,10 +3413,10 @@ function DateTimePicker({
3321
3413
  ]
3322
3414
  }
3323
3415
  ) }),
3324
- /* @__PURE__ */ jsx45(PopoverContent, { className: "w-auto text-sm p-2", align: "start", children: /* @__PURE__ */ jsxs25("div", { className: "flex flex-col gap-1", children: [
3325
- (mode === "date" || mode === "datetime") && /* @__PURE__ */ jsxs25(Fragment16, { children: [
3326
- /* @__PURE__ */ jsxs25("div", { className: "flex items-center justify-between gap-1", children: [
3327
- /* @__PURE__ */ jsx45(
3416
+ /* @__PURE__ */ jsx46(PopoverContent, { className: "w-auto text-sm p-2", align: "start", children: /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-1", children: [
3417
+ (mode === "date" || mode === "datetime") && /* @__PURE__ */ jsxs26(Fragment16, { children: [
3418
+ /* @__PURE__ */ jsxs26("div", { className: "flex items-center justify-between gap-1", children: [
3419
+ /* @__PURE__ */ jsx46(
3328
3420
  "label",
3329
3421
  {
3330
3422
  className: "text-xs text-blue-600 font-bold cursor-pointer",
@@ -3333,18 +3425,18 @@ function DateTimePicker({
3333
3425
  children: "Today"
3334
3426
  }
3335
3427
  ),
3336
- /* @__PURE__ */ jsx45(
3428
+ /* @__PURE__ */ jsx46(
3337
3429
  "select",
3338
3430
  {
3339
3431
  className: "h-8 rounded border bg-background px-2 text-xs",
3340
3432
  value: year,
3341
3433
  onChange: (e) => setYear(Number(e.target.value)),
3342
3434
  disabled: isInputDisabled || isReadonly,
3343
- children: yearOptions.map((y) => /* @__PURE__ */ jsx45("option", { value: y, children: y }, y))
3435
+ children: yearOptions.map((y) => /* @__PURE__ */ jsx46("option", { value: y, children: y }, y))
3344
3436
  }
3345
3437
  )
3346
3438
  ] }),
3347
- /* @__PURE__ */ jsx45("div", { className: "calendar-container", children: /* @__PURE__ */ jsx45(
3439
+ /* @__PURE__ */ jsx46("div", { className: "calendar-container", children: /* @__PURE__ */ jsx46(
3348
3440
  Calendar,
3349
3441
  {
3350
3442
  mode: "single",
@@ -3362,20 +3454,20 @@ function DateTimePicker({
3362
3454
  }
3363
3455
  ) })
3364
3456
  ] }),
3365
- (mode === "time" || mode === "datetime") && /* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2 mt-0", children: [
3366
- /* @__PURE__ */ jsx45("label", { className: "text-xs text-muted-foreground", children: "Time" }),
3367
- /* @__PURE__ */ jsx45(
3457
+ (mode === "time" || mode === "datetime") && /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-2 mt-0", children: [
3458
+ /* @__PURE__ */ jsx46("label", { className: "text-xs text-muted-foreground", children: "Time" }),
3459
+ /* @__PURE__ */ jsx46(
3368
3460
  "select",
3369
3461
  {
3370
3462
  className: "h-8 rounded border bg-background px-2 text-xs",
3371
3463
  value: displayHours,
3372
3464
  onChange: handleHoursChange,
3373
3465
  disabled: isInputDisabled || isReadonly,
3374
- children: Array.from({ length: 12 }, (_, i) => i + 1).map((hour) => /* @__PURE__ */ jsx45("option", { value: hour, children: hour.toString().padStart(2, "0") }, hour))
3466
+ children: Array.from({ length: 12 }, (_, i) => i + 1).map((hour) => /* @__PURE__ */ jsx46("option", { value: hour, children: hour.toString().padStart(2, "0") }, hour))
3375
3467
  }
3376
3468
  ),
3377
- /* @__PURE__ */ jsx45("span", { className: "text-sm", children: ":" }),
3378
- /* @__PURE__ */ jsx45(
3469
+ /* @__PURE__ */ jsx46("span", { className: "text-sm", children: ":" }),
3470
+ /* @__PURE__ */ jsx46(
3379
3471
  "select",
3380
3472
  {
3381
3473
  className: "h-8 rounded border bg-background px-2 text-xs",
@@ -3384,11 +3476,11 @@ function DateTimePicker({
3384
3476
  disabled: isInputDisabled || isReadonly,
3385
3477
  children: Array.from({ length: 12 }).map((_, i) => {
3386
3478
  const val = i * 5;
3387
- return /* @__PURE__ */ jsx45("option", { value: val, children: val.toString().padStart(2, "0") }, val);
3479
+ return /* @__PURE__ */ jsx46("option", { value: val, children: val.toString().padStart(2, "0") }, val);
3388
3480
  })
3389
3481
  }
3390
3482
  ),
3391
- /* @__PURE__ */ jsxs25(
3483
+ /* @__PURE__ */ jsxs26(
3392
3484
  "select",
3393
3485
  {
3394
3486
  className: "h-8 rounded border bg-background px-2 text-xs",
@@ -3396,15 +3488,15 @@ function DateTimePicker({
3396
3488
  onChange: handleAmPmChange,
3397
3489
  disabled: isInputDisabled || isReadonly,
3398
3490
  children: [
3399
- /* @__PURE__ */ jsx45("option", { value: "AM", children: "AM" }),
3400
- /* @__PURE__ */ jsx45("option", { value: "PM", children: "PM" })
3491
+ /* @__PURE__ */ jsx46("option", { value: "AM", children: "AM" }),
3492
+ /* @__PURE__ */ jsx46("option", { value: "PM", children: "PM" })
3401
3493
  ]
3402
3494
  }
3403
3495
  )
3404
3496
  ] })
3405
3497
  ] }) })
3406
3498
  ] }),
3407
- /* @__PURE__ */ jsx45(
3499
+ /* @__PURE__ */ jsx46(
3408
3500
  Input,
3409
3501
  {
3410
3502
  type: "hidden",
@@ -3417,23 +3509,23 @@ function DateTimePicker({
3417
3509
  }
3418
3510
  }
3419
3511
  ),
3420
- props.errorMessage && /* @__PURE__ */ jsx45("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
3512
+ props.errorMessage && /* @__PURE__ */ jsx46("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
3421
3513
  ] });
3422
3514
  }
3423
3515
 
3424
3516
  // src/components/Inputs/DateRange/DateRange.tsx
3425
- import React9, { useEffect as useEffect23 } from "react";
3517
+ import React10, { useEffect as useEffect24 } from "react";
3426
3518
  import { addDays, format as format2 } from "date-fns";
3427
- import { Fragment as Fragment17, jsx as jsx46, jsxs as jsxs26 } from "react/jsx-runtime";
3519
+ import { Fragment as Fragment17, jsx as jsx47, jsxs as jsxs27 } from "react/jsx-runtime";
3428
3520
  var DateRange = ({ className, style, ...props }) => {
3429
3521
  const isDateRange = (val) => !!val && val.from instanceof Date;
3430
- const [date, setDate] = React9.useState(
3522
+ const [date, setDate] = React10.useState(
3431
3523
  isDateRange(props.value) ? props.value : {
3432
3524
  from: /* @__PURE__ */ new Date(),
3433
3525
  to: addDays(/* @__PURE__ */ new Date(), 7)
3434
3526
  }
3435
3527
  );
3436
- useEffect23(() => {
3528
+ useEffect24(() => {
3437
3529
  if (props.value && isDateRange(props.value)) {
3438
3530
  handleChange?.(props.value);
3439
3531
  }
@@ -3444,9 +3536,9 @@ var DateRange = ({ className, style, ...props }) => {
3444
3536
  props.onChange?.(value, props?.name || "");
3445
3537
  }
3446
3538
  };
3447
- return /* @__PURE__ */ jsxs26(Fragment17, { children: [
3448
- /* @__PURE__ */ jsx46("div", { className, style, children: /* @__PURE__ */ jsxs26(Popover, { children: [
3449
- /* @__PURE__ */ jsx46(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx46(
3539
+ return /* @__PURE__ */ jsxs27(Fragment17, { children: [
3540
+ /* @__PURE__ */ jsx47("div", { className, style, children: /* @__PURE__ */ jsxs27(Popover, { children: [
3541
+ /* @__PURE__ */ jsx47(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx47(
3450
3542
  Button,
3451
3543
  {
3452
3544
  id: "date",
@@ -3455,15 +3547,15 @@ var DateRange = ({ className, style, ...props }) => {
3455
3547
  "w-full justify-start text-left font-normal text-[11px] border-[#BDBDBD]",
3456
3548
  !date && "text-muted-foreground"
3457
3549
  ),
3458
- children: date?.from ? date.to ? /* @__PURE__ */ jsxs26(Fragment17, { children: [
3550
+ children: date?.from ? date.to ? /* @__PURE__ */ jsxs27(Fragment17, { children: [
3459
3551
  format2(date.from, "LLL dd, y"),
3460
3552
  " -",
3461
3553
  " ",
3462
3554
  format2(date.to, "LLL dd, y")
3463
- ] }) : format2(date.from, "LLL dd, y") : /* @__PURE__ */ jsx46("span", { children: "Pick a date range" })
3555
+ ] }) : format2(date.from, "LLL dd, y") : /* @__PURE__ */ jsx47("span", { children: "Pick a date range" })
3464
3556
  }
3465
3557
  ) }),
3466
- /* @__PURE__ */ jsx46(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsx46(
3558
+ /* @__PURE__ */ jsx47(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsx47(
3467
3559
  Calendar,
3468
3560
  {
3469
3561
  mode: "range",
@@ -3474,21 +3566,21 @@ var DateRange = ({ className, style, ...props }) => {
3474
3566
  }
3475
3567
  ) })
3476
3568
  ] }) }),
3477
- props.errorMessage && /* @__PURE__ */ jsx46("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
3569
+ props.errorMessage && /* @__PURE__ */ jsx47("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
3478
3570
  ] });
3479
3571
  };
3480
3572
  var DateRange_default = DateRange;
3481
3573
 
3482
3574
  // src/components/Inputs/TextInputGroup/TextInputGroup.tsx
3483
- import { useEffect as useEffect24 } from "react";
3484
- import { Fragment as Fragment18, jsx as jsx47, jsxs as jsxs27 } from "react/jsx-runtime";
3575
+ import { useEffect as useEffect25 } from "react";
3576
+ import { Fragment as Fragment18, jsx as jsx48, jsxs as jsxs28 } from "react/jsx-runtime";
3485
3577
  var TextInputGroup = ({ className, style, prepend, append, ...props }) => {
3486
3578
  const placeholder = props.placeholder ?? "Placeholder text";
3487
3579
  const isEditable = props.isEditable ?? true;
3488
3580
  const isDisabled = props.isDisabled ?? false;
3489
3581
  const isReadonly = props.isReadonly ?? false;
3490
3582
  const isAutocomplete = props.isAutocomplete ?? false;
3491
- useEffect24(() => {
3583
+ useEffect25(() => {
3492
3584
  if (props.value !== void 0) {
3493
3585
  const e = { target: { value: props.value }, type: "change" };
3494
3586
  handleChange?.(e);
@@ -3497,8 +3589,8 @@ var TextInputGroup = ({ className, style, prepend, append, ...props }) => {
3497
3589
  const handleChange = (e) => {
3498
3590
  props.onChange?.(e, props?.name || "");
3499
3591
  };
3500
- return /* @__PURE__ */ jsxs27(Fragment18, { children: [
3501
- /* @__PURE__ */ jsxs27(
3592
+ return /* @__PURE__ */ jsxs28(Fragment18, { children: [
3593
+ /* @__PURE__ */ jsxs28(
3502
3594
  "div",
3503
3595
  {
3504
3596
  className: cn(
@@ -3508,8 +3600,8 @@ var TextInputGroup = ({ className, style, prepend, append, ...props }) => {
3508
3600
  props.errorMessage ? "border-red-500" : ""
3509
3601
  ),
3510
3602
  children: [
3511
- prepend && /* @__PURE__ */ jsx47("div", { className: "px-3 flex items-center bg-gray-500 text-white h-10 rounded-l-md", children: prepend }),
3512
- /* @__PURE__ */ jsx47(
3603
+ prepend && /* @__PURE__ */ jsx48("div", { className: "px-3 flex items-center bg-gray-500 text-white h-10 rounded-l-md", children: prepend }),
3604
+ /* @__PURE__ */ jsx48(
3513
3605
  Input,
3514
3606
  {
3515
3607
  id: props.name || "prepend-input",
@@ -3531,19 +3623,19 @@ var TextInputGroup = ({ className, style, prepend, append, ...props }) => {
3531
3623
  readOnly: isReadonly
3532
3624
  }
3533
3625
  ),
3534
- append && /* @__PURE__ */ jsx47("div", { className: "px-3 flex items-center bg-gray-500 text-white h-10 rounded-r-md", children: append })
3626
+ append && /* @__PURE__ */ jsx48("div", { className: "px-3 flex items-center bg-gray-500 text-white h-10 rounded-r-md", children: append })
3535
3627
  ]
3536
3628
  }
3537
3629
  ),
3538
- props.errorMessage && /* @__PURE__ */ jsx47("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
3630
+ props.errorMessage && /* @__PURE__ */ jsx48("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
3539
3631
  ] });
3540
3632
  };
3541
3633
  var TextInputGroup_default = TextInputGroup;
3542
3634
 
3543
3635
  // src/components/Inputs/Multiselect/MultiSelect.tsx
3544
- import { useState as useState10, useRef as useRef8, useEffect as useEffect25, useMemo as useMemo6 } from "react";
3636
+ import { useState as useState11, useRef as useRef9, useEffect as useEffect26, useMemo as useMemo6 } from "react";
3545
3637
  import { XIcon, XSquareIcon as XSquareIcon3 } from "lucide-react";
3546
- import { Fragment as Fragment19, jsx as jsx48, jsxs as jsxs28 } from "react/jsx-runtime";
3638
+ import { Fragment as Fragment19, jsx as jsx49, jsxs as jsxs29 } from "react/jsx-runtime";
3547
3639
  function LazyMultiSelectDropdown({
3548
3640
  value = [],
3549
3641
  onChange,
@@ -3561,10 +3653,10 @@ function LazyMultiSelectDropdown({
3561
3653
  outputFormat = "array",
3562
3654
  ...props
3563
3655
  }) {
3564
- const [isOpen, setIsOpen] = useState10(false);
3565
- const [searchTerm, setSearchTerm] = useState10("");
3566
- const dropdownRef = useRef8(null);
3567
- const observerTarget = useRef8(null);
3656
+ const [isOpen, setIsOpen] = useState11(false);
3657
+ const [searchTerm, setSearchTerm] = useState11("");
3658
+ const dropdownRef = useRef9(null);
3659
+ const observerTarget = useRef9(null);
3568
3660
  const ensureUnique = (arr) => {
3569
3661
  return Array.from(new Set(arr));
3570
3662
  };
@@ -3620,7 +3712,7 @@ function LazyMultiSelectDropdown({
3620
3712
  return { value: id, label: id };
3621
3713
  });
3622
3714
  }, [normalizedValue, lazyOptions]);
3623
- useEffect25(() => {
3715
+ useEffect26(() => {
3624
3716
  const handleClick = (e) => {
3625
3717
  if (dropdownRef.current && !dropdownRef.current.contains(e.target)) {
3626
3718
  setIsOpen(false);
@@ -3629,7 +3721,7 @@ function LazyMultiSelectDropdown({
3629
3721
  document.addEventListener("mousedown", handleClick);
3630
3722
  return () => document.removeEventListener("mousedown", handleClick);
3631
3723
  }, []);
3632
- useEffect25(() => {
3724
+ useEffect26(() => {
3633
3725
  if (!isOpen || !hasMore || loading) return;
3634
3726
  const obs = new IntersectionObserver(
3635
3727
  (entries) => {
@@ -3666,8 +3758,8 @@ function LazyMultiSelectDropdown({
3666
3758
  }
3667
3759
  }
3668
3760
  };
3669
- return /* @__PURE__ */ jsxs28("div", { ref: dropdownRef, className: "relative w-full", children: [
3670
- /* @__PURE__ */ jsxs28(
3761
+ return /* @__PURE__ */ jsxs29("div", { ref: dropdownRef, className: "relative w-full", children: [
3762
+ /* @__PURE__ */ jsxs29(
3671
3763
  "div",
3672
3764
  {
3673
3765
  onClick: handleFocus,
@@ -3679,13 +3771,13 @@ function LazyMultiSelectDropdown({
3679
3771
  "px-2 py-2 min-h-[35px]"
3680
3772
  ),
3681
3773
  children: [
3682
- selectedOptions.map((opt) => /* @__PURE__ */ jsxs28(
3774
+ selectedOptions.map((opt) => /* @__PURE__ */ jsxs29(
3683
3775
  "span",
3684
3776
  {
3685
3777
  className: "bg-blue-100 text-blue-700 px-2 py-1 rounded-md text-xs flex items-center gap-1",
3686
3778
  children: [
3687
3779
  opt.label,
3688
- !disabled && !readOnly && /* @__PURE__ */ jsx48(
3780
+ !disabled && !readOnly && /* @__PURE__ */ jsx49(
3689
3781
  "button",
3690
3782
  {
3691
3783
  type: "button",
@@ -3694,14 +3786,14 @@ function LazyMultiSelectDropdown({
3694
3786
  removeTag(opt.value);
3695
3787
  },
3696
3788
  className: "hover:text-red-600",
3697
- children: /* @__PURE__ */ jsx48(XIcon, { size: 12 })
3789
+ children: /* @__PURE__ */ jsx49(XIcon, { size: 12 })
3698
3790
  }
3699
3791
  )
3700
3792
  ]
3701
3793
  },
3702
3794
  opt.value
3703
3795
  )),
3704
- /* @__PURE__ */ jsx48(
3796
+ /* @__PURE__ */ jsx49(
3705
3797
  "input",
3706
3798
  {
3707
3799
  type: "text",
@@ -3717,8 +3809,8 @@ function LazyMultiSelectDropdown({
3717
3809
  ]
3718
3810
  }
3719
3811
  ),
3720
- errorMessage && /* @__PURE__ */ jsx48("p", { className: "mt-1 text-xs text-red-500", children: errorMessage }),
3721
- isOpen && !disabled && /* @__PURE__ */ jsx48(Portal_default, { children: /* @__PURE__ */ jsx48(
3812
+ errorMessage && /* @__PURE__ */ jsx49("p", { className: "mt-1 text-xs text-red-500", children: errorMessage }),
3813
+ isOpen && !disabled && /* @__PURE__ */ jsx49(Portal_default, { children: /* @__PURE__ */ jsx49(
3722
3814
  "div",
3723
3815
  {
3724
3816
  onMouseDown: (e) => e.stopPropagation(),
@@ -3729,10 +3821,10 @@ function LazyMultiSelectDropdown({
3729
3821
  top: dropdownRef.current ? dropdownRef.current.getBoundingClientRect().bottom + window.scrollY : 0,
3730
3822
  left: dropdownRef.current ? dropdownRef.current.getBoundingClientRect().left + window.scrollX : 0
3731
3823
  },
3732
- children: dataLoading && lazyOptions.length === 0 ? /* @__PURE__ */ jsx48("div", { className: "px-3 py-3 text-center text-gray-500", children: "Loading..." }) : lazyOptions.length > 0 ? /* @__PURE__ */ jsxs28(Fragment19, { children: [
3824
+ children: dataLoading && lazyOptions.length === 0 ? /* @__PURE__ */ jsx49("div", { className: "px-3 py-3 text-center text-gray-500", children: "Loading..." }) : lazyOptions.length > 0 ? /* @__PURE__ */ jsxs29(Fragment19, { children: [
3733
3825
  lazyOptions.map((option) => {
3734
3826
  const isSelected = normalizedValue.includes(option.value);
3735
- return /* @__PURE__ */ jsxs28(
3827
+ return /* @__PURE__ */ jsxs29(
3736
3828
  "div",
3737
3829
  {
3738
3830
  onClick: () => toggleSelect(option.value),
@@ -3742,13 +3834,13 @@ function LazyMultiSelectDropdown({
3742
3834
  ),
3743
3835
  children: [
3744
3836
  option.label,
3745
- isSelected && /* @__PURE__ */ jsx48(XSquareIcon3, { size: 16 })
3837
+ isSelected && /* @__PURE__ */ jsx49(XSquareIcon3, { size: 16 })
3746
3838
  ]
3747
3839
  },
3748
3840
  option.value
3749
3841
  );
3750
3842
  }),
3751
- hasMore && /* @__PURE__ */ jsx48(
3843
+ hasMore && /* @__PURE__ */ jsx49(
3752
3844
  "div",
3753
3845
  {
3754
3846
  ref: observerTarget,
@@ -3756,14 +3848,14 @@ function LazyMultiSelectDropdown({
3756
3848
  children: loading ? "Loading\u2026" : "Scroll for more\u2026"
3757
3849
  }
3758
3850
  )
3759
- ] }) : /* @__PURE__ */ jsx48("div", { className: "px-3 py-3 text-center text-gray-500", children: "No results" })
3851
+ ] }) : /* @__PURE__ */ jsx49("div", { className: "px-3 py-3 text-center text-gray-500", children: "No results" })
3760
3852
  }
3761
3853
  ) })
3762
3854
  ] });
3763
3855
  }
3764
3856
 
3765
3857
  // src/components/ui/data-table.tsx
3766
- import * as React11 from "react";
3858
+ import * as React12 from "react";
3767
3859
  import { faEllipsisH } from "@fortawesome/free-solid-svg-icons";
3768
3860
  import { FontAwesomeIcon as FontAwesomeIcon3 } from "@fortawesome/react-fontawesome";
3769
3861
  import {
@@ -3777,14 +3869,14 @@ import axios3 from "axios";
3777
3869
  import { ArrowDown, ArrowUp, ArrowUpDown, Search } from "lucide-react";
3778
3870
 
3779
3871
  // src/components/ui/table.tsx
3780
- import { jsx as jsx49 } from "react/jsx-runtime";
3872
+ import { jsx as jsx50 } from "react/jsx-runtime";
3781
3873
  function Table({ className, ...props }) {
3782
- return /* @__PURE__ */ jsx49(
3874
+ return /* @__PURE__ */ jsx50(
3783
3875
  "div",
3784
3876
  {
3785
3877
  "data-slot": "table-container",
3786
3878
  className: "relative w-full overflow-x-auto rounded-md border border-gray-200 bg-white",
3787
- children: /* @__PURE__ */ jsx49(
3879
+ children: /* @__PURE__ */ jsx50(
3788
3880
  "table",
3789
3881
  {
3790
3882
  "data-slot": "table",
@@ -3796,7 +3888,7 @@ function Table({ className, ...props }) {
3796
3888
  );
3797
3889
  }
3798
3890
  function TableHeader({ className, ...props }) {
3799
- return /* @__PURE__ */ jsx49(
3891
+ return /* @__PURE__ */ jsx50(
3800
3892
  "thead",
3801
3893
  {
3802
3894
  "data-slot": "table-header",
@@ -3809,7 +3901,7 @@ function TableHeader({ className, ...props }) {
3809
3901
  );
3810
3902
  }
3811
3903
  function TableBody({ className, ...props }) {
3812
- return /* @__PURE__ */ jsx49(
3904
+ return /* @__PURE__ */ jsx50(
3813
3905
  "tbody",
3814
3906
  {
3815
3907
  "data-slot": "table-body",
@@ -3822,7 +3914,7 @@ function TableBody({ className, ...props }) {
3822
3914
  );
3823
3915
  }
3824
3916
  function TableRow({ className, ...props }) {
3825
- return /* @__PURE__ */ jsx49(
3917
+ return /* @__PURE__ */ jsx50(
3826
3918
  "tr",
3827
3919
  {
3828
3920
  "data-slot": "table-row",
@@ -3835,7 +3927,7 @@ function TableRow({ className, ...props }) {
3835
3927
  );
3836
3928
  }
3837
3929
  function TableHead({ className, ...props }) {
3838
- return /* @__PURE__ */ jsx49(
3930
+ return /* @__PURE__ */ jsx50(
3839
3931
  "th",
3840
3932
  {
3841
3933
  "data-slot": "table-head",
@@ -3848,7 +3940,7 @@ function TableHead({ className, ...props }) {
3848
3940
  );
3849
3941
  }
3850
3942
  function TableCell({ className, ...props }) {
3851
- return /* @__PURE__ */ jsx49(
3943
+ return /* @__PURE__ */ jsx50(
3852
3944
  "td",
3853
3945
  {
3854
3946
  "data-slot": "table-cell",
@@ -3865,11 +3957,11 @@ function TableCell({ className, ...props }) {
3865
3957
  import { createColumnHelper } from "@tanstack/react-table";
3866
3958
 
3867
3959
  // src/lib/table/cellRendererFactory.tsx
3868
- import React10 from "react";
3960
+ import React11 from "react";
3869
3961
  import * as LucideIcons2 from "lucide-react";
3870
3962
  import { Star as Star2 } from "lucide-react";
3871
3963
  import Image from "next/image";
3872
- import { Fragment as Fragment20, jsx as jsx50, jsxs as jsxs29 } from "react/jsx-runtime";
3964
+ import { Fragment as Fragment20, jsx as jsx51, jsxs as jsxs30 } from "react/jsx-runtime";
3873
3965
  var getContrastColor = (bg) => {
3874
3966
  let c = bg.trim().toUpperCase();
3875
3967
  if (/^#([a-fA-F0-9]{3})$/.test(c)) {
@@ -3903,9 +3995,9 @@ var getContrastColor = (bg) => {
3903
3995
  };
3904
3996
  var sanitizeValue = (val) => {
3905
3997
  if (val == null) return null;
3906
- if (React10.isValidElement(val)) return val;
3998
+ if (React11.isValidElement(val)) return val;
3907
3999
  if (typeof val === "string" || typeof val === "number") return val;
3908
- if (Array.isArray(val)) return val.map((v, i) => /* @__PURE__ */ jsx50(React10.Fragment, { children: sanitizeValue(v) }, i));
4000
+ if (Array.isArray(val)) return val.map((v, i) => /* @__PURE__ */ jsx51(React11.Fragment, { children: sanitizeValue(v) }, i));
3909
4001
  if (typeof val === "object") {
3910
4002
  if ("name" in val && typeof val.name === "string") return val.name;
3911
4003
  if ("label" in val && typeof val.label === "string") return val.label;
@@ -3923,13 +4015,13 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
3923
4015
  switch (renderer) {
3924
4016
  /* -------------------- BASIC -------------------- */
3925
4017
  case "text":
3926
- return /* @__PURE__ */ jsx50("span", { children: rowValue || formattedValue });
4018
+ return /* @__PURE__ */ jsx51("span", { children: rowValue || formattedValue });
3927
4019
  case "number":
3928
- return /* @__PURE__ */ jsx50("span", { className: "tabular-nums text-right", children: valueFormatter(rowValue || value, "number:2") });
4020
+ return /* @__PURE__ */ jsx51("span", { className: "tabular-nums text-right", children: valueFormatter(rowValue || value, "number:2") });
3929
4021
  case "date":
3930
- return /* @__PURE__ */ jsx50("span", { children: valueFormatter(rowValue || value, format3) });
4022
+ return /* @__PURE__ */ jsx51("span", { children: valueFormatter(rowValue || value, format3) });
3931
4023
  case "link":
3932
- return /* @__PURE__ */ jsx50(
4024
+ return /* @__PURE__ */ jsx51(
3933
4025
  "a",
3934
4026
  {
3935
4027
  href: `${rendererProps?.prefix || ""}${rowValue || formattedValue}`,
@@ -3941,7 +4033,7 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
3941
4033
  );
3942
4034
  /* -------------------- VISUAL -------------------- */
3943
4035
  case "image":
3944
- return /* @__PURE__ */ jsx50("div", { className: "relative", children: /* @__PURE__ */ jsx50(
4036
+ return /* @__PURE__ */ jsx51("div", { className: "relative", children: /* @__PURE__ */ jsx51(
3945
4037
  Image,
3946
4038
  {
3947
4039
  src: rowValue || formattedValue || rendererProps?.fallback || "/placeholder.png",
@@ -3957,7 +4049,7 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
3957
4049
  ) });
3958
4050
  case "icon":
3959
4051
  if (!formattedValue) return null;
3960
- return /* @__PURE__ */ jsx50(
4052
+ return /* @__PURE__ */ jsx51(
3961
4053
  Icon,
3962
4054
  {
3963
4055
  iconSet: rendererProps?.iconSet,
@@ -3974,7 +4066,7 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
3974
4066
  const color = rendererProps?.colorMap?.[formattedValue] || rendererProps?.color || "gray";
3975
4067
  if (!formattedValue) return null;
3976
4068
  const textColor = getContrastColor(color);
3977
- return /* @__PURE__ */ jsx50(
4069
+ return /* @__PURE__ */ jsx51(
3978
4070
  "span",
3979
4071
  {
3980
4072
  className: `inline-block px-2 py-1 text-xs rounded-full bg-${color}-100 text-${textColor}-700 ${rendererProps?.className || ""}`,
@@ -3989,13 +4081,13 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
3989
4081
  const IconComponent = typeof maybeIcon === "function" ? maybeIcon : LucideIcons2.Star;
3990
4082
  if (!formattedValue) return null;
3991
4083
  const textColor = getContrastColor(color);
3992
- return /* @__PURE__ */ jsxs29(
4084
+ return /* @__PURE__ */ jsxs30(
3993
4085
  "span",
3994
4086
  {
3995
4087
  className: `inline-flex items-center gap-1 px-2 py-1 text-xs rounded-full bg-[${color}]-100 text-[${textColor}]-700`,
3996
4088
  style: { backgroundColor: color, color: textColor },
3997
4089
  children: [
3998
- rendererProps?.icon && /* @__PURE__ */ jsx50(Fragment20, { children: IconComponent ? /* @__PURE__ */ jsx50(IconComponent, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx50(LucideIcons2.Box, { className: "h-4 w-4" }) }),
4090
+ rendererProps?.icon && /* @__PURE__ */ jsx51(Fragment20, { children: IconComponent ? /* @__PURE__ */ jsx51(IconComponent, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx51(LucideIcons2.Box, { className: "h-4 w-4" }) }),
3999
4091
  formattedValue
4000
4092
  ]
4001
4093
  }
@@ -4003,7 +4095,7 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
4003
4095
  }
4004
4096
  /* -------------------- INTERACTIVE -------------------- */
4005
4097
  case "button":
4006
- return /* @__PURE__ */ jsx50(
4098
+ return /* @__PURE__ */ jsx51(
4007
4099
  "button",
4008
4100
  {
4009
4101
  onClick: () => rendererProps?.onClick?.(row, formattedValue),
@@ -4012,8 +4104,8 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
4012
4104
  }
4013
4105
  );
4014
4106
  case "switch":
4015
- return /* @__PURE__ */ jsxs29("label", { className: "inline-flex items-center cursor-pointer", children: [
4016
- /* @__PURE__ */ jsx50(
4107
+ return /* @__PURE__ */ jsxs30("label", { className: "inline-flex items-center cursor-pointer", children: [
4108
+ /* @__PURE__ */ jsx51(
4017
4109
  "input",
4018
4110
  {
4019
4111
  type: "checkbox",
@@ -4022,10 +4114,10 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
4022
4114
  className: "sr-only peer"
4023
4115
  }
4024
4116
  ),
4025
- /* @__PURE__ */ jsx50("div", { className: "relative w-9 h-5 bg-gray-300 peer-checked:bg-blue-600 rounded-full transition-all", children: /* @__PURE__ */ jsx50("div", { className: "absolute top-[2px] left-[2px] w-4 h-4 bg-white rounded-full peer-checked:translate-x-4 transition-all" }) })
4117
+ /* @__PURE__ */ jsx51("div", { className: "relative w-9 h-5 bg-gray-300 peer-checked:bg-blue-600 rounded-full transition-all", children: /* @__PURE__ */ jsx51("div", { className: "absolute top-[2px] left-[2px] w-4 h-4 bg-white rounded-full peer-checked:translate-x-4 transition-all" }) })
4026
4118
  ] });
4027
4119
  case "progress":
4028
- return /* @__PURE__ */ jsx50("div", { className: "w-full bg-gray-100 rounded-full h-2", children: /* @__PURE__ */ jsx50(
4120
+ return /* @__PURE__ */ jsx51("div", { className: "w-full bg-gray-100 rounded-full h-2", children: /* @__PURE__ */ jsx51(
4029
4121
  "div",
4030
4122
  {
4031
4123
  className: "bg-blue-600 h-2 rounded-full transition-all",
@@ -4034,7 +4126,7 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
4034
4126
  ) });
4035
4127
  case "rating": {
4036
4128
  const stars = Math.round(Number(rowValue || formattedValue) || 0);
4037
- return /* @__PURE__ */ jsx50("div", { className: "flex items-center", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsx50(
4129
+ return /* @__PURE__ */ jsx51("div", { className: "flex items-center", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsx51(
4038
4130
  Star2,
4039
4131
  {
4040
4132
  size: 16,
@@ -4045,7 +4137,7 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
4045
4137
  )) });
4046
4138
  }
4047
4139
  case "checkbox":
4048
- return /* @__PURE__ */ jsx50(
4140
+ return /* @__PURE__ */ jsx51(
4049
4141
  "input",
4050
4142
  {
4051
4143
  type: "checkbox",
@@ -4055,7 +4147,7 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
4055
4147
  }
4056
4148
  );
4057
4149
  case "html":
4058
- return /* @__PURE__ */ jsx50(
4150
+ return /* @__PURE__ */ jsx51(
4059
4151
  "span",
4060
4152
  {
4061
4153
  dangerouslySetInnerHTML: { __html: String(rowValue || formattedValue) }
@@ -4065,7 +4157,7 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
4065
4157
  case "custom": {
4066
4158
  const CustomRenderer = customRenderers[rendererProps?.customRendererId] || customRenderers[rendererProps?.rendererId];
4067
4159
  if (CustomRenderer)
4068
- return /* @__PURE__ */ jsx50(
4160
+ return /* @__PURE__ */ jsx51(
4069
4161
  CustomRenderer,
4070
4162
  {
4071
4163
  value: formattedValue,
@@ -4073,11 +4165,11 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
4073
4165
  ...rendererProps
4074
4166
  }
4075
4167
  );
4076
- return /* @__PURE__ */ jsx50("span", { children: "Missing custom renderer" });
4168
+ return /* @__PURE__ */ jsx51("span", { children: "Missing custom renderer" });
4077
4169
  }
4078
4170
  /* -------------------- DEFAULT -------------------- */
4079
4171
  default:
4080
- return /* @__PURE__ */ jsx50("span", { children: formattedValue || "-" });
4172
+ return /* @__PURE__ */ jsx51("span", { children: formattedValue || "-" });
4081
4173
  }
4082
4174
  };
4083
4175
 
@@ -4141,7 +4233,7 @@ var useDynamicColumns = (config, customRenderers = {}, customFormatters = {}) =>
4141
4233
  };
4142
4234
 
4143
4235
  // src/components/ui/data-table.tsx
4144
- import { Fragment as Fragment21, jsx as jsx51, jsxs as jsxs30 } from "react/jsx-runtime";
4236
+ import { Fragment as Fragment21, jsx as jsx52, jsxs as jsxs31 } from "react/jsx-runtime";
4145
4237
  function DataTable({
4146
4238
  columns,
4147
4239
  data,
@@ -4168,13 +4260,13 @@ function DataTable({
4168
4260
  enableTotalRecords,
4169
4261
  getRowCount
4170
4262
  }) {
4171
- const [columnFilters, setColumnFilters] = React11.useState([]);
4172
- const [columnVisibility, setColumnVisibility] = React11.useState({});
4173
- const hasLoadedInitialState = React11.useRef(false);
4174
- const isSavingRef = React11.useRef(false);
4175
- const isFetchingRef = React11.useRef(false);
4176
- const [fetchLoading, setFetchLoading] = React11.useState(false);
4177
- const transformApiToFrontend = React11.useCallback((apiSettings, allColumnIds) => {
4263
+ const [columnFilters, setColumnFilters] = React12.useState([]);
4264
+ const [columnVisibility, setColumnVisibility] = React12.useState({});
4265
+ const hasLoadedInitialState = React12.useRef(false);
4266
+ const isSavingRef = React12.useRef(false);
4267
+ const isFetchingRef = React12.useRef(false);
4268
+ const [fetchLoading, setFetchLoading] = React12.useState(false);
4269
+ const transformApiToFrontend = React12.useCallback((apiSettings, allColumnIds) => {
4178
4270
  if (!apiSettings || !apiSettings.columns || !apiSettings.columns.visible) {
4179
4271
  return {};
4180
4272
  }
@@ -4185,7 +4277,7 @@ function DataTable({
4185
4277
  });
4186
4278
  return result;
4187
4279
  }, []);
4188
- const transformFrontendToApi = React11.useCallback((visibility) => {
4280
+ const transformFrontendToApi = React12.useCallback((visibility) => {
4189
4281
  const visibleColumns = Object.keys(visibility).filter((colId) => visibility[colId] === true);
4190
4282
  return {
4191
4283
  columns: {
@@ -4193,7 +4285,7 @@ function DataTable({
4193
4285
  }
4194
4286
  };
4195
4287
  }, []);
4196
- const fetchColumnPreferences = React11.useCallback(async () => {
4288
+ const fetchColumnPreferences = React12.useCallback(async () => {
4197
4289
  if (isFetchingRef.current) {
4198
4290
  return;
4199
4291
  }
@@ -4253,7 +4345,7 @@ function DataTable({
4253
4345
  isFetchingRef.current = false;
4254
4346
  }
4255
4347
  }, [tableId, transformApiToFrontend, manageColumns]);
4256
- const saveColumnPreferences = React11.useCallback(async (visibility) => {
4348
+ const saveColumnPreferences = React12.useCallback(async (visibility) => {
4257
4349
  if (!tableId || isSavingRef.current || !manageColumns) {
4258
4350
  return;
4259
4351
  }
@@ -4279,7 +4371,7 @@ function DataTable({
4279
4371
  isSavingRef.current = false;
4280
4372
  }
4281
4373
  }, [tableId, transformFrontendToApi, manageColumns]);
4282
- React11.useEffect(() => {
4374
+ React12.useEffect(() => {
4283
4375
  if (hasLoadedInitialState.current || isFetchingRef.current) {
4284
4376
  return;
4285
4377
  }
@@ -4290,10 +4382,10 @@ function DataTable({
4290
4382
  fetchColumnPreferences();
4291
4383
  }
4292
4384
  }, [tableId, manageColumns]);
4293
- const [manualSort, setManualSort] = React11.useState(null);
4294
- const [searchTerm, setSearchTerm] = React11.useState("");
4385
+ const [manualSort, setManualSort] = React12.useState(null);
4386
+ const [searchTerm, setSearchTerm] = React12.useState("");
4295
4387
  const tableData = Array.isArray(data) ? data : [];
4296
- const filteredData = React11.useMemo(() => {
4388
+ const filteredData = React12.useMemo(() => {
4297
4389
  if (paginationMode === "client" && globalSearch && searchTerm.trim()) {
4298
4390
  const searchLower = searchTerm.toLowerCase().trim();
4299
4391
  return tableData.filter((row) => {
@@ -4316,7 +4408,7 @@ function DataTable({
4316
4408
  id: "__select__",
4317
4409
  renderer: "checkbox",
4318
4410
  size: 40,
4319
- header: ({ table: table2 }) => /* @__PURE__ */ jsx51(
4411
+ header: ({ table: table2 }) => /* @__PURE__ */ jsx52(
4320
4412
  "input",
4321
4413
  {
4322
4414
  type: "checkbox",
@@ -4334,12 +4426,12 @@ function DataTable({
4334
4426
  });
4335
4427
  }
4336
4428
  const dynamicCols = useDynamicColumns({ columns: finalCols, enableRowSelection });
4337
- const [rowSelection, setRowSelection] = React11.useState({});
4338
- const [localPageSize, setLocalPageSize] = React11.useState(pageSize);
4339
- const [localPageIndex, setLocalPageIndex] = React11.useState(0);
4340
- const isUpdatingPageSizeRef = React11.useRef(false);
4341
- const tableRef = React11.useRef(null);
4342
- React11.useEffect(() => {
4429
+ const [rowSelection, setRowSelection] = React12.useState({});
4430
+ const [localPageSize, setLocalPageSize] = React12.useState(pageSize);
4431
+ const [localPageIndex, setLocalPageIndex] = React12.useState(0);
4432
+ const isUpdatingPageSizeRef = React12.useRef(false);
4433
+ const tableRef = React12.useRef(null);
4434
+ React12.useEffect(() => {
4343
4435
  if (paginationMode === "client") {
4344
4436
  setLocalPageSize(pageSize);
4345
4437
  } else if (paginationMode === "server" && meta?.limit != null) {
@@ -4415,7 +4507,7 @@ function DataTable({
4415
4507
  }
4416
4508
  }
4417
4509
  });
4418
- React11.useEffect(() => {
4510
+ React12.useEffect(() => {
4419
4511
  tableRef.current = table;
4420
4512
  if (table && !hasLoadedInitialState.current && !isFetchingRef.current && tableId) {
4421
4513
  fetchColumnPreferences();
@@ -4453,7 +4545,7 @@ function DataTable({
4453
4545
  setLocalPageIndex(0);
4454
4546
  }
4455
4547
  };
4456
- const pageSizeOptions = React11.useMemo(() => {
4548
+ const pageSizeOptions = React12.useMemo(() => {
4457
4549
  if (paginationMode === "client") {
4458
4550
  return [5, 10, 20, 50, 100];
4459
4551
  }
@@ -4464,10 +4556,10 @@ function DataTable({
4464
4556
  }
4465
4557
  return base;
4466
4558
  }, [paginationMode, meta?.limit]);
4467
- return /* @__PURE__ */ jsxs30("div", { className: "overflow-hidden rounded-md w-full", children: [
4468
- !loading && /* @__PURE__ */ jsxs30("div", { className: "flex justify-between p-2 bg-gray-50", children: [
4469
- /* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-4 w-full", children: [
4470
- enableTotalRecords && /* @__PURE__ */ jsx51(
4559
+ return /* @__PURE__ */ jsxs31("div", { className: "overflow-hidden rounded-md w-full", children: [
4560
+ !loading && /* @__PURE__ */ jsxs31("div", { className: "flex justify-between p-2 bg-gray-50", children: [
4561
+ /* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-4 w-full", children: [
4562
+ enableTotalRecords && /* @__PURE__ */ jsx52(
4471
4563
  Button,
4472
4564
  {
4473
4565
  size: "sm",
@@ -4482,9 +4574,9 @@ function DataTable({
4482
4574
  children: fetchLoading ? "Fetching..." : "Get Count"
4483
4575
  }
4484
4576
  ),
4485
- globalSearch && /* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-2 w-full max-w-sm", children: [
4486
- /* @__PURE__ */ jsxs30("div", { className: "relative w-full", children: [
4487
- /* @__PURE__ */ jsx51(
4577
+ globalSearch && /* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-2 w-full max-w-sm", children: [
4578
+ /* @__PURE__ */ jsxs31("div", { className: "relative w-full", children: [
4579
+ /* @__PURE__ */ jsx52(
4488
4580
  "input",
4489
4581
  {
4490
4582
  type: "text",
@@ -4506,9 +4598,9 @@ function DataTable({
4506
4598
  className: "border border-gray-300 rounded-md text-sm px-3 py-2 pl-8 w-full focus:outline-none focus:ring-1 focus:ring-[#12715B]"
4507
4599
  }
4508
4600
  ),
4509
- /* @__PURE__ */ jsx51(Search, { className: "absolute left-2 top-2.5 text-gray-400", size: 16 })
4601
+ /* @__PURE__ */ jsx52(Search, { className: "absolute left-2 top-2.5 text-gray-400", size: 16 })
4510
4602
  ] }),
4511
- paginationMode === "server" && /* @__PURE__ */ jsx51(
4603
+ paginationMode === "server" && /* @__PURE__ */ jsx52(
4512
4604
  Button,
4513
4605
  {
4514
4606
  size: "sm",
@@ -4519,8 +4611,8 @@ function DataTable({
4519
4611
  )
4520
4612
  ] })
4521
4613
  ] }),
4522
- manageColumns && /* @__PURE__ */ jsxs30(Popover, { children: [
4523
- /* @__PURE__ */ jsx51(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx51(
4614
+ manageColumns && /* @__PURE__ */ jsxs31(Popover, { children: [
4615
+ /* @__PURE__ */ jsx52(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx52(
4524
4616
  Button,
4525
4617
  {
4526
4618
  variant: "outline",
@@ -4529,11 +4621,11 @@ function DataTable({
4529
4621
  children: "Manage Columns"
4530
4622
  }
4531
4623
  ) }),
4532
- /* @__PURE__ */ jsxs30(PopoverContent, { align: "end", className: "w-48 p-3", children: [
4533
- /* @__PURE__ */ jsx51("div", { className: "text-sm font-medium mb-2", children: "Show / Hide Columns" }),
4534
- /* @__PURE__ */ jsxs30("div", { className: "max-h-56 overflow-y-auto pr-1 space-y-2", children: [
4535
- /* @__PURE__ */ jsxs30("label", { className: "flex items-center gap-2 text-sm font-semibold border-b pb-2 mb-2", children: [
4536
- /* @__PURE__ */ jsx51(
4624
+ /* @__PURE__ */ jsxs31(PopoverContent, { align: "end", className: "w-48 p-3", children: [
4625
+ /* @__PURE__ */ jsx52("div", { className: "text-sm font-medium mb-2", children: "Show / Hide Columns" }),
4626
+ /* @__PURE__ */ jsxs31("div", { className: "max-h-56 overflow-y-auto pr-1 space-y-2", children: [
4627
+ /* @__PURE__ */ jsxs31("label", { className: "flex items-center gap-2 text-sm font-semibold border-b pb-2 mb-2", children: [
4628
+ /* @__PURE__ */ jsx52(
4537
4629
  "input",
4538
4630
  {
4539
4631
  type: "checkbox",
@@ -4554,8 +4646,8 @@ function DataTable({
4554
4646
  ] }),
4555
4647
  table.getAllLeafColumns().map((column) => {
4556
4648
  const header = column.columnDef.header;
4557
- return /* @__PURE__ */ jsxs30("label", { className: "flex items-center gap-2 text-sm", children: [
4558
- /* @__PURE__ */ jsx51(
4649
+ return /* @__PURE__ */ jsxs31("label", { className: "flex items-center gap-2 text-sm", children: [
4650
+ /* @__PURE__ */ jsx52(
4559
4651
  "input",
4560
4652
  {
4561
4653
  type: "checkbox",
@@ -4570,12 +4662,12 @@ function DataTable({
4570
4662
  ] })
4571
4663
  ] })
4572
4664
  ] }),
4573
- /* @__PURE__ */ jsxs30(Table, { className: "table-fixed", children: [
4574
- /* @__PURE__ */ jsx51(TableHeader, { children: table.getHeaderGroups().map((hg) => /* @__PURE__ */ jsx51(TableRow, { children: hg.headers.map((header, index) => {
4665
+ /* @__PURE__ */ jsxs31(Table, { className: "table-fixed", children: [
4666
+ /* @__PURE__ */ jsx52(TableHeader, { children: table.getHeaderGroups().map((hg) => /* @__PURE__ */ jsx52(TableRow, { children: hg.headers.map((header, index) => {
4575
4667
  const canSort = header.column.getCanSort();
4576
4668
  const canFilter = header.column.getCanFilter();
4577
4669
  const sortDir = manualSort?.key === header.column.id ? manualSort.dir : null;
4578
- return /* @__PURE__ */ jsx51(
4670
+ return /* @__PURE__ */ jsx52(
4579
4671
  TableHead,
4580
4672
  {
4581
4673
  className: "relative select-none",
@@ -4584,8 +4676,8 @@ function DataTable({
4584
4676
  minWidth: header.column.columnDef.minSize,
4585
4677
  maxWidth: header.column.columnDef.maxSize
4586
4678
  },
4587
- children: /* @__PURE__ */ jsxs30("div", { className: "flex items-center justify-between", children: [
4588
- /* @__PURE__ */ jsxs30(
4679
+ children: /* @__PURE__ */ jsxs31("div", { className: "flex items-center justify-between", children: [
4680
+ /* @__PURE__ */ jsxs31(
4589
4681
  "span",
4590
4682
  {
4591
4683
  className: `flex items-center gap-1 ${canSort ? "cursor-pointer" : ""}`,
@@ -4597,32 +4689,32 @@ function DataTable({
4597
4689
  },
4598
4690
  children: [
4599
4691
  flexRender(header.column.columnDef.header, header.getContext()),
4600
- canSort && /* @__PURE__ */ jsxs30(Fragment21, { children: [
4601
- sortDir === "asc" && /* @__PURE__ */ jsx51(ArrowUp, { size: 14, className: "text-gray-500" }),
4602
- sortDir === "desc" && /* @__PURE__ */ jsx51(ArrowDown, { size: 14, className: "text-gray-500" }),
4603
- !sortDir && /* @__PURE__ */ jsx51(ArrowUpDown, { size: 14, className: "text-gray-400" })
4692
+ canSort && /* @__PURE__ */ jsxs31(Fragment21, { children: [
4693
+ sortDir === "asc" && /* @__PURE__ */ jsx52(ArrowUp, { size: 14, className: "text-gray-500" }),
4694
+ sortDir === "desc" && /* @__PURE__ */ jsx52(ArrowDown, { size: 14, className: "text-gray-500" }),
4695
+ !sortDir && /* @__PURE__ */ jsx52(ArrowUpDown, { size: 14, className: "text-gray-400" })
4604
4696
  ] })
4605
4697
  ]
4606
4698
  }
4607
4699
  ),
4608
- canFilter && /* @__PURE__ */ jsxs30(Popover, { children: [
4609
- /* @__PURE__ */ jsx51(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx51(
4700
+ canFilter && /* @__PURE__ */ jsxs31(Popover, { children: [
4701
+ /* @__PURE__ */ jsx52(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx52(
4610
4702
  "span",
4611
4703
  {
4612
4704
  role: "presentation",
4613
4705
  className: "pl-5 cursor-pointer",
4614
4706
  onClick: (e) => e.stopPropagation(),
4615
- children: /* @__PURE__ */ jsx51(FontAwesomeIcon3, { icon: faEllipsisH, className: "w-5 h-5 text-gray-500" })
4707
+ children: /* @__PURE__ */ jsx52(FontAwesomeIcon3, { icon: faEllipsisH, className: "w-5 h-5 text-gray-500" })
4616
4708
  }
4617
4709
  ) }),
4618
- /* @__PURE__ */ jsx51(
4710
+ /* @__PURE__ */ jsx52(
4619
4711
  PopoverContent,
4620
4712
  {
4621
4713
  align: "center",
4622
4714
  sideOffset: 14,
4623
4715
  className: "w-50 p-3 z-[200] border-gray-300",
4624
4716
  avoidCollisions: true,
4625
- children: /* @__PURE__ */ jsxs30(
4717
+ children: /* @__PURE__ */ jsxs31(
4626
4718
  "form",
4627
4719
  {
4628
4720
  onSubmit: (e) => {
@@ -4635,8 +4727,8 @@ function DataTable({
4635
4727
  },
4636
4728
  className: "space-y-2",
4637
4729
  children: [
4638
- /* @__PURE__ */ jsx51("label", { htmlFor: "filter", className: "text-xs text-gray-500 font-normal", children: "Filter by value:" }),
4639
- /* @__PURE__ */ jsx51(
4730
+ /* @__PURE__ */ jsx52("label", { htmlFor: "filter", className: "text-xs text-gray-500 font-normal", children: "Filter by value:" }),
4731
+ /* @__PURE__ */ jsx52(
4640
4732
  "input",
4641
4733
  {
4642
4734
  name: "filter",
@@ -4646,7 +4738,7 @@ function DataTable({
4646
4738
  autoComplete: "off"
4647
4739
  }
4648
4740
  ),
4649
- /* @__PURE__ */ jsx51("div", { className: "justify-end flex", children: /* @__PURE__ */ jsx51(
4741
+ /* @__PURE__ */ jsx52("div", { className: "justify-end flex", children: /* @__PURE__ */ jsx52(
4650
4742
  Button,
4651
4743
  {
4652
4744
  type: "submit",
@@ -4665,9 +4757,9 @@ function DataTable({
4665
4757
  `header-${header.id}-${index}`
4666
4758
  );
4667
4759
  }) }, `header-group-${hg.id}`)) }),
4668
- /* @__PURE__ */ jsx51(TableBody, { children: loading ? /* @__PURE__ */ jsx51(Fragment21, { children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsx51(TableRow, { children: table.getHeaderGroups()[0].headers.map((header, j) => {
4760
+ /* @__PURE__ */ jsx52(TableBody, { children: loading ? /* @__PURE__ */ jsx52(Fragment21, { children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsx52(TableRow, { children: table.getHeaderGroups()[0].headers.map((header, j) => {
4669
4761
  const column = header.column;
4670
- return /* @__PURE__ */ jsx51(
4762
+ return /* @__PURE__ */ jsx52(
4671
4763
  TableCell,
4672
4764
  {
4673
4765
  className: "p-3",
@@ -4676,15 +4768,15 @@ function DataTable({
4676
4768
  minWidth: column.columnDef.minSize,
4677
4769
  maxWidth: column.columnDef.maxSize
4678
4770
  },
4679
- children: /* @__PURE__ */ jsx51("span", { className: "h-4 bg-gray-200 rounded w-full block animate-pulse" })
4771
+ children: /* @__PURE__ */ jsx52("span", { className: "h-4 bg-gray-200 rounded w-full block animate-pulse" })
4680
4772
  },
4681
4773
  j
4682
4774
  );
4683
- }) }, i)) }) : table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx51(TableRow, { children: row.getVisibleCells().map((cell, cellIndex, arr) => {
4775
+ }) }, i)) }) : table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx52(TableRow, { children: row.getVisibleCells().map((cell, cellIndex, arr) => {
4684
4776
  const meta2 = cell.column.columnDef.meta || {};
4685
4777
  const isClickable = meta2?.isClickable;
4686
4778
  const isLastCell = cellIndex === arr.length - 1;
4687
- return /* @__PURE__ */ jsxs30(
4779
+ return /* @__PURE__ */ jsxs31(
4688
4780
  TableCell,
4689
4781
  {
4690
4782
  className: `break-words whitespace-normal align-top ${isClickable ? "cursor-pointer hover:bg-gray-100 underline text-blue-500" : ""} relative py-2 ${meta2?.cellClass ?? ""}`,
@@ -4701,9 +4793,9 @@ function DataTable({
4701
4793
  },
4702
4794
  children: [
4703
4795
  flexRender(cell.column.columnDef.cell, cell.getContext()),
4704
- isLastCell && rowActions && rowActions.length > 0 && /* @__PURE__ */ jsx51("div", { className: "absolute p-1 px-2 inset-y-0 right-0 flex items-center transition-opacity duration-200", children: rowActions.map((action) => {
4796
+ isLastCell && rowActions && rowActions.length > 0 && /* @__PURE__ */ jsx52("div", { className: "absolute p-1 px-2 inset-y-0 right-0 flex items-center transition-opacity duration-200", children: rowActions.map((action) => {
4705
4797
  const isDelete = action.id === "delete" || action.icon === "delete";
4706
- return /* @__PURE__ */ jsx51(
4798
+ return /* @__PURE__ */ jsx52(
4707
4799
  "button",
4708
4800
  {
4709
4801
  className: `ml-2 px-2 py-1 text-[12px] rounded cursor-pointer ${isDelete ? "bg-red-800 text-white hover:bg-neutral-600" : "bg-gray-300 hover:bg-gray-400"}`,
@@ -4725,23 +4817,23 @@ function DataTable({
4725
4817
  },
4726
4818
  `cell-${cell.id}-${cellIndex}`
4727
4819
  );
4728
- }) }, row.id)) : /* @__PURE__ */ jsx51(TableRow, { children: /* @__PURE__ */ jsx51(TableCell, { colSpan: dynamicCols.length, className: "h-24 text-center", children: /* @__PURE__ */ jsx51("span", { className: "flex items-center justify-center py-10 w-full min-w-full text-gray-600 bg-gray-100", children: "No results." }) }) }) })
4820
+ }) }, row.id)) : /* @__PURE__ */ jsx52(TableRow, { children: /* @__PURE__ */ jsx52(TableCell, { colSpan: dynamicCols.length, className: "h-24 text-center", children: /* @__PURE__ */ jsx52("span", { className: "flex items-center justify-center py-10 w-full min-w-full text-gray-600 bg-gray-100", children: "No results." }) }) }) })
4729
4821
  ] }),
4730
- pagination && /* @__PURE__ */ jsxs30("div", { className: "flex items-center justify-between py-3 text-sm w-full", children: [
4731
- !loading && /* @__PURE__ */ jsx51("div", { className: "flex gap-2 items-center", children: /* @__PURE__ */ jsx51(
4822
+ pagination && /* @__PURE__ */ jsxs31("div", { className: "flex items-center justify-between py-3 text-sm w-full", children: [
4823
+ !loading && /* @__PURE__ */ jsx52("div", { className: "flex gap-2 items-center", children: /* @__PURE__ */ jsx52(
4732
4824
  "select",
4733
4825
  {
4734
4826
  value: paginationMode === "server" && meta?.limit != null ? meta.limit : localPageSize,
4735
4827
  onChange: handlePageSizeChange,
4736
4828
  className: "ml-2 border rounded py-1 text-sm cursor-pointer border-blue-600",
4737
- children: pageSizeOptions.map((size) => /* @__PURE__ */ jsxs30("option", { value: size, children: [
4829
+ children: pageSizeOptions.map((size) => /* @__PURE__ */ jsxs31("option", { value: size, children: [
4738
4830
  size,
4739
4831
  " / page"
4740
4832
  ] }, size))
4741
4833
  }
4742
4834
  ) }),
4743
- /* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-2", children: [
4744
- /* @__PURE__ */ jsx51(
4835
+ /* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-2", children: [
4836
+ /* @__PURE__ */ jsx52(
4745
4837
  "button",
4746
4838
  {
4747
4839
  onClick: () => table.previousPage(),
@@ -4750,7 +4842,7 @@ function DataTable({
4750
4842
  children: "Prev"
4751
4843
  }
4752
4844
  ),
4753
- /* @__PURE__ */ jsx51(
4845
+ /* @__PURE__ */ jsx52(
4754
4846
  "button",
4755
4847
  {
4756
4848
  onClick: () => table.nextPage(),
@@ -4765,7 +4857,7 @@ function DataTable({
4765
4857
  }
4766
4858
 
4767
4859
  // src/components/DataDisplay/Table/Table.tsx
4768
- import { jsx as jsx52 } from "react/jsx-runtime";
4860
+ import { jsx as jsx53 } from "react/jsx-runtime";
4769
4861
  var Table2 = ({
4770
4862
  columns,
4771
4863
  data,
@@ -4790,7 +4882,7 @@ var Table2 = ({
4790
4882
  const rawColumns = Array.isArray(columns) ? columns : [];
4791
4883
  const rawData = Array.isArray(data) ? data : [];
4792
4884
  const isControlled = typeof page === "number";
4793
- return /* @__PURE__ */ jsx52("div", { className: `${className || ""} space-y-3`, style, children: /* @__PURE__ */ jsx52(
4885
+ return /* @__PURE__ */ jsx53("div", { className: `${className || ""} space-y-3`, style, children: /* @__PURE__ */ jsx53(
4794
4886
  DataTable,
4795
4887
  {
4796
4888
  ...props,
@@ -4826,9 +4918,9 @@ import {
4826
4918
  ChevronRightIcon as ChevronRightIcon3,
4827
4919
  MoreHorizontalIcon
4828
4920
  } from "lucide-react";
4829
- import { jsx as jsx53, jsxs as jsxs31 } from "react/jsx-runtime";
4921
+ import { jsx as jsx54, jsxs as jsxs32 } from "react/jsx-runtime";
4830
4922
  function Pagination({ className, ...props }) {
4831
- return /* @__PURE__ */ jsx53(
4923
+ return /* @__PURE__ */ jsx54(
4832
4924
  "nav",
4833
4925
  {
4834
4926
  role: "navigation",
@@ -4843,7 +4935,7 @@ function PaginationContent({
4843
4935
  className,
4844
4936
  ...props
4845
4937
  }) {
4846
- return /* @__PURE__ */ jsx53(
4938
+ return /* @__PURE__ */ jsx54(
4847
4939
  "ul",
4848
4940
  {
4849
4941
  "data-slot": "pagination-content",
@@ -4853,7 +4945,7 @@ function PaginationContent({
4853
4945
  );
4854
4946
  }
4855
4947
  function PaginationItem({ ...props }) {
4856
- return /* @__PURE__ */ jsx53("li", { "data-slot": "pagination-item", ...props });
4948
+ return /* @__PURE__ */ jsx54("li", { "data-slot": "pagination-item", ...props });
4857
4949
  }
4858
4950
  function PaginationLink({
4859
4951
  className,
@@ -4861,7 +4953,7 @@ function PaginationLink({
4861
4953
  size = "icon",
4862
4954
  ...props
4863
4955
  }) {
4864
- return /* @__PURE__ */ jsx53(
4956
+ return /* @__PURE__ */ jsx54(
4865
4957
  "a",
4866
4958
  {
4867
4959
  "aria-current": isActive ? "page" : void 0,
@@ -4882,7 +4974,7 @@ function PaginationPrevious({
4882
4974
  className,
4883
4975
  ...props
4884
4976
  }) {
4885
- return /* @__PURE__ */ jsxs31(
4977
+ return /* @__PURE__ */ jsxs32(
4886
4978
  PaginationLink,
4887
4979
  {
4888
4980
  "aria-label": "Go to previous page",
@@ -4890,8 +4982,8 @@ function PaginationPrevious({
4890
4982
  className: cn("gap-1 px-2.5 sm:pl-2.5", className),
4891
4983
  ...props,
4892
4984
  children: [
4893
- /* @__PURE__ */ jsx53(ChevronLeftIcon2, {}),
4894
- /* @__PURE__ */ jsx53("span", { className: "hidden sm:block", children: "Previous" })
4985
+ /* @__PURE__ */ jsx54(ChevronLeftIcon2, {}),
4986
+ /* @__PURE__ */ jsx54("span", { className: "hidden sm:block", children: "Previous" })
4895
4987
  ]
4896
4988
  }
4897
4989
  );
@@ -4900,7 +4992,7 @@ function PaginationNext({
4900
4992
  className,
4901
4993
  ...props
4902
4994
  }) {
4903
- return /* @__PURE__ */ jsxs31(
4995
+ return /* @__PURE__ */ jsxs32(
4904
4996
  PaginationLink,
4905
4997
  {
4906
4998
  "aria-label": "Go to next page",
@@ -4908,8 +5000,8 @@ function PaginationNext({
4908
5000
  className: cn("gap-1 px-2.5 sm:pr-2.5", className),
4909
5001
  ...props,
4910
5002
  children: [
4911
- /* @__PURE__ */ jsx53("span", { className: "hidden sm:block", children: "Next" }),
4912
- /* @__PURE__ */ jsx53(ChevronRightIcon3, {})
5003
+ /* @__PURE__ */ jsx54("span", { className: "hidden sm:block", children: "Next" }),
5004
+ /* @__PURE__ */ jsx54(ChevronRightIcon3, {})
4913
5005
  ]
4914
5006
  }
4915
5007
  );
@@ -4918,7 +5010,7 @@ function PaginationEllipsis({
4918
5010
  className,
4919
5011
  ...props
4920
5012
  }) {
4921
- return /* @__PURE__ */ jsxs31(
5013
+ return /* @__PURE__ */ jsxs32(
4922
5014
  "span",
4923
5015
  {
4924
5016
  "aria-hidden": true,
@@ -4926,15 +5018,15 @@ function PaginationEllipsis({
4926
5018
  className: cn("flex size-9 items-center justify-center", className),
4927
5019
  ...props,
4928
5020
  children: [
4929
- /* @__PURE__ */ jsx53(MoreHorizontalIcon, { className: "size-4" }),
4930
- /* @__PURE__ */ jsx53("span", { className: "sr-only", children: "More pages" })
5021
+ /* @__PURE__ */ jsx54(MoreHorizontalIcon, { className: "size-4" }),
5022
+ /* @__PURE__ */ jsx54("span", { className: "sr-only", children: "More pages" })
4931
5023
  ]
4932
5024
  }
4933
5025
  );
4934
5026
  }
4935
5027
 
4936
5028
  // src/components/DataDisplay/Pagination/Pagination.tsx
4937
- import { jsx as jsx54, jsxs as jsxs32 } from "react/jsx-runtime";
5029
+ import { jsx as jsx55, jsxs as jsxs33 } from "react/jsx-runtime";
4938
5030
  var CustomPagination = ({
4939
5031
  totalPages,
4940
5032
  currentPage,
@@ -4980,10 +5072,10 @@ var CustomPagination = ({
4980
5072
  }
4981
5073
  };
4982
5074
  const pageNumbers = getPageNumbers();
4983
- return /* @__PURE__ */ jsxs32("div", { className: "flex flex-row gap-1 w-full items-center justify-between", children: [
4984
- /* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-2", children: [
4985
- /* @__PURE__ */ jsx54("p", { className: "text-sm text-muted-foreground whitespace-nowrap", children: "Items per page:" }),
4986
- /* @__PURE__ */ jsxs32(
5075
+ return /* @__PURE__ */ jsxs33("div", { className: "flex flex-row gap-1 w-full items-center justify-between", children: [
5076
+ /* @__PURE__ */ jsxs33("div", { className: "flex items-center gap-2", children: [
5077
+ /* @__PURE__ */ jsx55("p", { className: "text-sm text-muted-foreground whitespace-nowrap", children: "Items per page:" }),
5078
+ /* @__PURE__ */ jsxs33(
4987
5079
  Select,
4988
5080
  {
4989
5081
  defaultValue: String(perPage),
@@ -4991,26 +5083,26 @@ var CustomPagination = ({
4991
5083
  onPageChange({ page: 1, itemsPerPage: Number(value) });
4992
5084
  },
4993
5085
  children: [
4994
- /* @__PURE__ */ jsx54(SelectTrigger, { className: "w-[100px]", children: /* @__PURE__ */ jsx54(SelectValue, { placeholder: "Select" }) }),
4995
- /* @__PURE__ */ jsxs32(SelectContent, { children: [
4996
- /* @__PURE__ */ jsx54(SelectItem, { value: "5", children: "5" }),
4997
- /* @__PURE__ */ jsx54(SelectItem, { value: "10", children: "10" }),
4998
- /* @__PURE__ */ jsx54(SelectItem, { value: "20", children: "20" }),
4999
- /* @__PURE__ */ jsx54(SelectItem, { value: "50", children: "50" })
5086
+ /* @__PURE__ */ jsx55(SelectTrigger, { className: "w-[100px]", children: /* @__PURE__ */ jsx55(SelectValue, { placeholder: "Select" }) }),
5087
+ /* @__PURE__ */ jsxs33(SelectContent, { children: [
5088
+ /* @__PURE__ */ jsx55(SelectItem, { value: "5", children: "5" }),
5089
+ /* @__PURE__ */ jsx55(SelectItem, { value: "10", children: "10" }),
5090
+ /* @__PURE__ */ jsx55(SelectItem, { value: "20", children: "20" }),
5091
+ /* @__PURE__ */ jsx55(SelectItem, { value: "50", children: "50" })
5000
5092
  ] })
5001
5093
  ]
5002
5094
  }
5003
5095
  )
5004
5096
  ] }),
5005
- /* @__PURE__ */ jsx54(Pagination, { className: "justify-end", children: /* @__PURE__ */ jsxs32(PaginationContent, { children: [
5006
- /* @__PURE__ */ jsx54(PaginationItem, { children: /* @__PURE__ */ jsx54(
5097
+ /* @__PURE__ */ jsx55(Pagination, { className: "justify-end", children: /* @__PURE__ */ jsxs33(PaginationContent, { children: [
5098
+ /* @__PURE__ */ jsx55(PaginationItem, { children: /* @__PURE__ */ jsx55(
5007
5099
  PaginationPrevious,
5008
5100
  {
5009
5101
  onClick: () => handlePageChange(currentPage - 1),
5010
5102
  className: currentPage === 1 ? "pointer-events-none opacity-50" : "cursor-pointer"
5011
5103
  }
5012
5104
  ) }),
5013
- pageNumbers.map((pageNumber, index) => /* @__PURE__ */ jsx54(PaginationItem, { children: pageNumber === "..." ? /* @__PURE__ */ jsx54(PaginationEllipsis, {}) : /* @__PURE__ */ jsx54(
5105
+ pageNumbers.map((pageNumber, index) => /* @__PURE__ */ jsx55(PaginationItem, { children: pageNumber === "..." ? /* @__PURE__ */ jsx55(PaginationEllipsis, {}) : /* @__PURE__ */ jsx55(
5014
5106
  PaginationLink,
5015
5107
  {
5016
5108
  onClick: () => handlePageChange(pageNumber),
@@ -5019,7 +5111,7 @@ var CustomPagination = ({
5019
5111
  children: pageNumber
5020
5112
  }
5021
5113
  ) }, index)),
5022
- /* @__PURE__ */ jsx54(PaginationItem, { children: /* @__PURE__ */ jsx54(
5114
+ /* @__PURE__ */ jsx55(PaginationItem, { children: /* @__PURE__ */ jsx55(
5023
5115
  PaginationNext,
5024
5116
  {
5025
5117
  onClick: () => handlePageChange(currentPage + 1),
@@ -5038,17 +5130,17 @@ import { LoaderCircle, Info } from "lucide-react";
5038
5130
  // src/components/ui/accordion.tsx
5039
5131
  import * as AccordionPrimitive from "@radix-ui/react-accordion";
5040
5132
  import { ChevronDownIcon as ChevronDownIcon3 } from "lucide-react";
5041
- import { jsx as jsx55, jsxs as jsxs33 } from "react/jsx-runtime";
5133
+ import { jsx as jsx56, jsxs as jsxs34 } from "react/jsx-runtime";
5042
5134
  function Accordion2({
5043
5135
  ...props
5044
5136
  }) {
5045
- return /* @__PURE__ */ jsx55(AccordionPrimitive.Root, { "data-slot": "accordion", ...props });
5137
+ return /* @__PURE__ */ jsx56(AccordionPrimitive.Root, { "data-slot": "accordion", ...props });
5046
5138
  }
5047
5139
  function AccordionItem({
5048
5140
  className,
5049
5141
  ...props
5050
5142
  }) {
5051
- return /* @__PURE__ */ jsx55(
5143
+ return /* @__PURE__ */ jsx56(
5052
5144
  AccordionPrimitive.Item,
5053
5145
  {
5054
5146
  "data-slot": "accordion-item",
@@ -5062,7 +5154,7 @@ function AccordionTrigger({
5062
5154
  children,
5063
5155
  ...props
5064
5156
  }) {
5065
- return /* @__PURE__ */ jsx55(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs33(
5157
+ return /* @__PURE__ */ jsx56(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs34(
5066
5158
  AccordionPrimitive.Trigger,
5067
5159
  {
5068
5160
  "data-slot": "accordion-trigger",
@@ -5073,7 +5165,7 @@ function AccordionTrigger({
5073
5165
  ...props,
5074
5166
  children: [
5075
5167
  children,
5076
- /* @__PURE__ */ jsx55(ChevronDownIcon3, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })
5168
+ /* @__PURE__ */ jsx56(ChevronDownIcon3, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })
5077
5169
  ]
5078
5170
  }
5079
5171
  ) });
@@ -5083,21 +5175,21 @@ function AccordionContent({
5083
5175
  children,
5084
5176
  ...props
5085
5177
  }) {
5086
- return /* @__PURE__ */ jsx55(
5178
+ return /* @__PURE__ */ jsx56(
5087
5179
  AccordionPrimitive.Content,
5088
5180
  {
5089
5181
  "data-slot": "accordion-content",
5090
5182
  className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
5091
5183
  ...props,
5092
- children: /* @__PURE__ */ jsx55("div", { className: cn("pt-0 pb-4", className), children })
5184
+ children: /* @__PURE__ */ jsx56("div", { className: cn("pt-0 pb-4", className), children })
5093
5185
  }
5094
5186
  );
5095
5187
  }
5096
5188
 
5097
5189
  // src/components/ui/card.tsx
5098
- import { jsx as jsx56 } from "react/jsx-runtime";
5190
+ import { jsx as jsx57 } from "react/jsx-runtime";
5099
5191
  function Card({ className, ...props }) {
5100
- return /* @__PURE__ */ jsx56(
5192
+ return /* @__PURE__ */ jsx57(
5101
5193
  "div",
5102
5194
  {
5103
5195
  "data-slot": "card",
@@ -5110,7 +5202,7 @@ function Card({ className, ...props }) {
5110
5202
  );
5111
5203
  }
5112
5204
  function CardHeader({ className, ...props }) {
5113
- return /* @__PURE__ */ jsx56(
5205
+ return /* @__PURE__ */ jsx57(
5114
5206
  "div",
5115
5207
  {
5116
5208
  "data-slot": "card-header",
@@ -5123,7 +5215,7 @@ function CardHeader({ className, ...props }) {
5123
5215
  );
5124
5216
  }
5125
5217
  function CardTitle({ className, ...props }) {
5126
- return /* @__PURE__ */ jsx56(
5218
+ return /* @__PURE__ */ jsx57(
5127
5219
  "div",
5128
5220
  {
5129
5221
  "data-slot": "card-title",
@@ -5133,7 +5225,7 @@ function CardTitle({ className, ...props }) {
5133
5225
  );
5134
5226
  }
5135
5227
  function CardContent({ className, ...props }) {
5136
- return /* @__PURE__ */ jsx56(
5228
+ return /* @__PURE__ */ jsx57(
5137
5229
  "div",
5138
5230
  {
5139
5231
  "data-slot": "card-content",
@@ -5144,7 +5236,7 @@ function CardContent({ className, ...props }) {
5144
5236
  }
5145
5237
 
5146
5238
  // src/components/DataDisplay/HistoryTimeline/HistoryTimeline.tsx
5147
- import { jsx as jsx57, jsxs as jsxs34 } from "react/jsx-runtime";
5239
+ import { jsx as jsx58, jsxs as jsxs35 } from "react/jsx-runtime";
5148
5240
  function getValue(item, key) {
5149
5241
  if (!key) return void 0;
5150
5242
  return item[key];
@@ -5165,26 +5257,26 @@ var HistoryTimeline = ({
5165
5257
  return [];
5166
5258
  }, [props.data]);
5167
5259
  if (loading) {
5168
- return /* @__PURE__ */ jsx57(Card, { className: cn("w-full", className), children: /* @__PURE__ */ jsxs34(CardContent, { className: "flex items-center justify-center px-4 py-8", children: [
5169
- /* @__PURE__ */ jsx57(LoaderCircle, { className: "h-5 w-5 animate-spin text-muted-foreground" }),
5170
- /* @__PURE__ */ jsx57("span", { className: "ml-2 text-sm text-muted-foreground", children: "Loading history\u2026" })
5260
+ return /* @__PURE__ */ jsx58(Card, { className: cn("w-full", className), children: /* @__PURE__ */ jsxs35(CardContent, { className: "flex items-center justify-center px-4 py-8", children: [
5261
+ /* @__PURE__ */ jsx58(LoaderCircle, { className: "h-5 w-5 animate-spin text-muted-foreground" }),
5262
+ /* @__PURE__ */ jsx58("span", { className: "ml-2 text-sm text-muted-foreground", children: "Loading history\u2026" })
5171
5263
  ] }) });
5172
5264
  }
5173
5265
  if (data.length === 0) {
5174
- return /* @__PURE__ */ jsx57(Card, { className: cn("w-full", className), children: /* @__PURE__ */ jsx57(CardContent, { className: "px-4 py-8 text-center text-muted-foreground", children: "No history available." }) });
5266
+ return /* @__PURE__ */ jsx58(Card, { className: cn("w-full", className), children: /* @__PURE__ */ jsx58(CardContent, { className: "px-4 py-8 text-center text-muted-foreground", children: "No history available." }) });
5175
5267
  }
5176
- return /* @__PURE__ */ jsx57(Card, { className: cn("w-full", className), children: /* @__PURE__ */ jsx57(Accordion2, { type: "single", collapsible: true, defaultValue: "history", children: /* @__PURE__ */ jsxs34(AccordionItem, { value: "history", className: "border-0", children: [
5177
- /* @__PURE__ */ jsx57(CardHeader, { className: "flex flex-row items-center justify-between gap-2 border-b px-4 py-3", children: /* @__PURE__ */ jsx57(
5268
+ return /* @__PURE__ */ jsx58(Card, { className: cn("w-full", className), children: /* @__PURE__ */ jsx58(Accordion2, { type: "single", collapsible: true, defaultValue: "history", children: /* @__PURE__ */ jsxs35(AccordionItem, { value: "history", className: "border-0", children: [
5269
+ /* @__PURE__ */ jsx58(CardHeader, { className: "flex flex-row items-center justify-between gap-2 border-b px-4 py-3", children: /* @__PURE__ */ jsx58(
5178
5270
  AccordionTrigger,
5179
5271
  {
5180
5272
  className: cn(
5181
5273
  "flex flex-1 items-center justify-between gap-2 p-0 text-left",
5182
5274
  "hover:no-underline"
5183
5275
  ),
5184
- children: /* @__PURE__ */ jsx57(CardTitle, { className: "text-base font-semibold", children: title })
5276
+ children: /* @__PURE__ */ jsx58(CardTitle, { className: "text-base font-semibold", children: title })
5185
5277
  }
5186
5278
  ) }),
5187
- /* @__PURE__ */ jsx57(AccordionContent, { asChild: true, children: /* @__PURE__ */ jsx57(CardContent, { className: "px-4 py-3", children: /* @__PURE__ */ jsx57("ol", { className: "relative ml-4 border-l-2 border-[#939393] space-y-4", children: data.map((item, index) => {
5279
+ /* @__PURE__ */ jsx58(AccordionContent, { asChild: true, children: /* @__PURE__ */ jsx58(CardContent, { className: "px-4 py-3", children: /* @__PURE__ */ jsx58("ol", { className: "relative ml-4 border-l-2 border-[#939393] space-y-4", children: data.map((item, index) => {
5188
5280
  const id = item.id ?? index;
5189
5281
  const rawTitle = getValue(item, titleKey);
5190
5282
  const rawDescription = getValue(item, descriptionKey);
@@ -5192,8 +5284,8 @@ var HistoryTimeline = ({
5192
5284
  const titleText = String(rawTitle ?? "");
5193
5285
  const descriptionText = rawDescription != null ? String(rawDescription) : "";
5194
5286
  const createdAtDate = rawCreatedAt != null ? new Date(rawCreatedAt) : null;
5195
- return /* @__PURE__ */ jsxs34("li", { className: "relative pl-4", children: [
5196
- /* @__PURE__ */ jsx57("span", { className: "absolute left-[-9px] top-2 flex h-4 w-4 items-center justify-center rounded-full bg-primary text-primary-foreground", children: /* @__PURE__ */ jsx57("div", { className: "bg-[#06A59A] text-white rounded-md p-[5px]", children: /* @__PURE__ */ jsx57(
5287
+ return /* @__PURE__ */ jsxs35("li", { className: "relative pl-4", children: [
5288
+ /* @__PURE__ */ jsx58("span", { className: "absolute left-[-9px] top-2 flex h-4 w-4 items-center justify-center rounded-full bg-primary text-primary-foreground", children: /* @__PURE__ */ jsx58("div", { className: "bg-[#06A59A] text-white rounded-md p-[5px]", children: /* @__PURE__ */ jsx58(
5197
5289
  Info,
5198
5290
  {
5199
5291
  className: cn(
@@ -5201,30 +5293,30 @@ var HistoryTimeline = ({
5201
5293
  )
5202
5294
  }
5203
5295
  ) }) }),
5204
- /* @__PURE__ */ jsx57(
5296
+ /* @__PURE__ */ jsx58(
5205
5297
  Accordion2,
5206
5298
  {
5207
5299
  type: "single",
5208
5300
  collapsible: true,
5209
5301
  className: "w-full",
5210
- children: /* @__PURE__ */ jsxs34(AccordionItem, { value: `item-${item.id}`, className: "border-0", children: [
5211
- /* @__PURE__ */ jsx57(
5302
+ children: /* @__PURE__ */ jsxs35(AccordionItem, { value: `item-${item.id}`, className: "border-0", children: [
5303
+ /* @__PURE__ */ jsx58(
5212
5304
  AccordionTrigger,
5213
5305
  {
5214
5306
  className: cn(
5215
5307
  "flex items-center justify-between gap-2 rounded-md px-2 py-1 text-left",
5216
5308
  "hover:bg-muted/60 hover:no-underline"
5217
5309
  ),
5218
- children: /* @__PURE__ */ jsxs34("div", { className: "flex flex-col gap-1", children: [
5219
- /* @__PURE__ */ jsx57("span", { className: "text-sm font-medium leading-none", children: titleText }),
5220
- /* @__PURE__ */ jsx57("span", { className: "text-[11px] text-muted-foreground", children: new Intl.DateTimeFormat("default", {
5310
+ children: /* @__PURE__ */ jsxs35("div", { className: "flex flex-col gap-1", children: [
5311
+ /* @__PURE__ */ jsx58("span", { className: "text-sm font-medium leading-none", children: titleText }),
5312
+ /* @__PURE__ */ jsx58("span", { className: "text-[11px] text-muted-foreground", children: new Intl.DateTimeFormat("default", {
5221
5313
  dateStyle: "medium",
5222
5314
  timeStyle: "short"
5223
5315
  }).format(createdAtDate ?? /* @__PURE__ */ new Date()) })
5224
5316
  ] })
5225
5317
  }
5226
5318
  ),
5227
- /* @__PURE__ */ jsx57(AccordionContent, { className: "pt-1", children: descriptionText && /* @__PURE__ */ jsx57("p", { className: "rounded-md bg-muted px-2 py-2 text-xs text-muted-foreground", children: descriptionText }) })
5319
+ /* @__PURE__ */ jsx58(AccordionContent, { className: "pt-1", children: descriptionText && /* @__PURE__ */ jsx58("p", { className: "rounded-md bg-muted px-2 py-2 text-xs text-muted-foreground", children: descriptionText }) })
5228
5320
  ] })
5229
5321
  }
5230
5322
  )
@@ -5235,7 +5327,7 @@ var HistoryTimeline = ({
5235
5327
  var HistoryTimeline_default = HistoryTimeline;
5236
5328
 
5237
5329
  // src/components/Navigation/Tabs/Tabs.tsx
5238
- import { useCallback as useCallback5, useMemo as useMemo9, useState as useState12 } from "react";
5330
+ import { useCallback as useCallback5, useMemo as useMemo9, useState as useState13 } from "react";
5239
5331
  import { ChevronDown as ChevronDown2, Menu } from "lucide-react";
5240
5332
  import Link3 from "next/link";
5241
5333
  import { usePathname, useRouter } from "next/navigation";
@@ -5243,22 +5335,22 @@ import { usePathname, useRouter } from "next/navigation";
5243
5335
  // src/components/ui/dialog.tsx
5244
5336
  import * as DialogPrimitive from "@radix-ui/react-dialog";
5245
5337
  import { XIcon as XIcon2 } from "lucide-react";
5246
- import { jsx as jsx58, jsxs as jsxs35 } from "react/jsx-runtime";
5338
+ import { jsx as jsx59, jsxs as jsxs36 } from "react/jsx-runtime";
5247
5339
  function Dialog({
5248
5340
  ...props
5249
5341
  }) {
5250
- return /* @__PURE__ */ jsx58(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
5342
+ return /* @__PURE__ */ jsx59(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
5251
5343
  }
5252
5344
  function DialogPortal({
5253
5345
  ...props
5254
5346
  }) {
5255
- return /* @__PURE__ */ jsx58(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
5347
+ return /* @__PURE__ */ jsx59(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
5256
5348
  }
5257
5349
  function DialogOverlay({
5258
5350
  className,
5259
5351
  ...props
5260
5352
  }) {
5261
- return /* @__PURE__ */ jsx58(
5353
+ return /* @__PURE__ */ jsx59(
5262
5354
  DialogPrimitive.Overlay,
5263
5355
  {
5264
5356
  "data-slot": "dialog-overlay",
@@ -5276,9 +5368,9 @@ function DialogContent({
5276
5368
  showCloseButton = true,
5277
5369
  ...props
5278
5370
  }) {
5279
- return /* @__PURE__ */ jsxs35(DialogPortal, { "data-slot": "dialog-portal", children: [
5280
- /* @__PURE__ */ jsx58(DialogOverlay, {}),
5281
- /* @__PURE__ */ jsxs35(
5371
+ return /* @__PURE__ */ jsxs36(DialogPortal, { "data-slot": "dialog-portal", children: [
5372
+ /* @__PURE__ */ jsx59(DialogOverlay, {}),
5373
+ /* @__PURE__ */ jsxs36(
5282
5374
  DialogPrimitive.Content,
5283
5375
  {
5284
5376
  "data-slot": "dialog-content",
@@ -5289,14 +5381,14 @@ function DialogContent({
5289
5381
  ...props,
5290
5382
  children: [
5291
5383
  children,
5292
- showCloseButton && /* @__PURE__ */ jsxs35(
5384
+ showCloseButton && /* @__PURE__ */ jsxs36(
5293
5385
  DialogPrimitive.Close,
5294
5386
  {
5295
5387
  "data-slot": "dialog-close",
5296
5388
  className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
5297
5389
  children: [
5298
- /* @__PURE__ */ jsx58(XIcon2, {}),
5299
- /* @__PURE__ */ jsx58("span", { className: "sr-only", children: "Close" })
5390
+ /* @__PURE__ */ jsx59(XIcon2, {}),
5391
+ /* @__PURE__ */ jsx59("span", { className: "sr-only", children: "Close" })
5300
5392
  ]
5301
5393
  }
5302
5394
  )
@@ -5306,7 +5398,7 @@ function DialogContent({
5306
5398
  ] });
5307
5399
  }
5308
5400
  function DialogHeader({ className, ...props }) {
5309
- return /* @__PURE__ */ jsx58(
5401
+ return /* @__PURE__ */ jsx59(
5310
5402
  "div",
5311
5403
  {
5312
5404
  "data-slot": "dialog-header",
@@ -5316,7 +5408,7 @@ function DialogHeader({ className, ...props }) {
5316
5408
  );
5317
5409
  }
5318
5410
  function DialogFooter({ className, ...props }) {
5319
- return /* @__PURE__ */ jsx58(
5411
+ return /* @__PURE__ */ jsx59(
5320
5412
  "div",
5321
5413
  {
5322
5414
  "data-slot": "dialog-footer",
@@ -5332,7 +5424,7 @@ function DialogTitle({
5332
5424
  className,
5333
5425
  ...props
5334
5426
  }) {
5335
- return /* @__PURE__ */ jsx58(
5427
+ return /* @__PURE__ */ jsx59(
5336
5428
  DialogPrimitive.Title,
5337
5429
  {
5338
5430
  "data-slot": "dialog-title",
@@ -5345,7 +5437,7 @@ function DialogDescription({
5345
5437
  className,
5346
5438
  ...props
5347
5439
  }) {
5348
- return /* @__PURE__ */ jsx58(
5440
+ return /* @__PURE__ */ jsx59(
5349
5441
  DialogPrimitive.Description,
5350
5442
  {
5351
5443
  "data-slot": "dialog-description",
@@ -5422,9 +5514,9 @@ function showConfirmToast({
5422
5514
  }
5423
5515
 
5424
5516
  // src/components/Navigation/Tabs/Tabs.tsx
5425
- import { Fragment as Fragment22, jsx as jsx59, jsxs as jsxs36 } from "react/jsx-runtime";
5517
+ import { Fragment as Fragment22, jsx as jsx60, jsxs as jsxs37 } from "react/jsx-runtime";
5426
5518
  var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuilder = false, source, parentKey, menuNameKey, menuUrlKey, loading, bgActiveColor, textActiveColor }) => {
5427
- const [openIndex, setOpenIndex] = useState12(null);
5519
+ const [openIndex, setOpenIndex] = useState13(null);
5428
5520
  const currentPathname = usePathname();
5429
5521
  function groupMenus(menus = []) {
5430
5522
  const menuMap = /* @__PURE__ */ new Map();
@@ -5488,8 +5580,8 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
5488
5580
  return tab.children.some((child) => isActive(child.url));
5489
5581
  };
5490
5582
  const router = useRouter();
5491
- const [showExitDialog, setShowExitDialog] = useState12(false);
5492
- const [pendingUrl, setPendingUrl] = useState12(null);
5583
+ const [showExitDialog, setShowExitDialog] = useState13(false);
5584
+ const [pendingUrl, setPendingUrl] = useState13(null);
5493
5585
  const handleBuilderExit = useCallback5(
5494
5586
  (e, url) => {
5495
5587
  if (isBuilder) {
@@ -5521,13 +5613,13 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
5521
5613
  border: active && textActiveColor ? `1px solid ${textActiveColor}` : void 0
5522
5614
  };
5523
5615
  if (Array.isArray(tab.children) && tab.children.length > 0 && tab.isDropDown) {
5524
- return /* @__PURE__ */ jsxs36(
5616
+ return /* @__PURE__ */ jsxs37(
5525
5617
  DropdownMenu,
5526
5618
  {
5527
5619
  open: openIndex === index,
5528
5620
  onOpenChange: (open) => setOpenIndex(open ? index : null),
5529
5621
  children: [
5530
- /* @__PURE__ */ jsxs36(
5622
+ /* @__PURE__ */ jsxs37(
5531
5623
  DropdownMenuTrigger,
5532
5624
  {
5533
5625
  className: `${finalClasses} inline-flex items-center gap-1`,
@@ -5541,11 +5633,11 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
5541
5633
  style: finalStyle,
5542
5634
  children: [
5543
5635
  tab.header,
5544
- /* @__PURE__ */ jsx59(ChevronDown2, { className: "h-4 w-4 opacity-80" })
5636
+ /* @__PURE__ */ jsx60(ChevronDown2, { className: "h-4 w-4 opacity-80" })
5545
5637
  ]
5546
5638
  }
5547
5639
  ),
5548
- /* @__PURE__ */ jsx59(
5640
+ /* @__PURE__ */ jsx60(
5549
5641
  DropdownMenuContent,
5550
5642
  {
5551
5643
  align: "start",
@@ -5558,12 +5650,12 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
5558
5650
  onMouseLeave: () => {
5559
5651
  timeout = setTimeout(() => setOpenIndex(null), 150);
5560
5652
  },
5561
- children: tab.children.map((item, index2) => /* @__PURE__ */ jsx59(
5653
+ children: tab.children.map((item, index2) => /* @__PURE__ */ jsx60(
5562
5654
  DropdownMenuItem,
5563
5655
  {
5564
5656
  asChild: true,
5565
5657
  className: "cursor-pointer rounded-sm px-3 py-2 text-gray-800 hover:bg-gray-100 focus:bg-gray-100",
5566
- children: /* @__PURE__ */ jsx59(
5658
+ children: /* @__PURE__ */ jsx60(
5567
5659
  Link3,
5568
5660
  {
5569
5661
  href: item.url || "#",
@@ -5582,7 +5674,7 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
5582
5674
  index
5583
5675
  );
5584
5676
  }
5585
- return tab.url ? /* @__PURE__ */ jsx59(
5677
+ return tab.url ? /* @__PURE__ */ jsx60(
5586
5678
  Link3,
5587
5679
  {
5588
5680
  href: tab.url,
@@ -5593,14 +5685,14 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
5593
5685
  children: tab.header
5594
5686
  },
5595
5687
  index
5596
- ) : /* @__PURE__ */ jsx59("div", { className: finalClasses, style: finalStyle, role: "button", tabIndex: 0, children: tab.header }, index);
5688
+ ) : /* @__PURE__ */ jsx60("div", { className: finalClasses, style: finalStyle, role: "button", tabIndex: 0, children: tab.header }, index);
5597
5689
  };
5598
- const renderMobileMenu = () => /* @__PURE__ */ jsxs36(DropdownMenu, { children: [
5599
- /* @__PURE__ */ jsxs36(DropdownMenuTrigger, { className: "flex items-center gap-2 px-3 py-2 rounded-md bg-white/10 text-white text-sm", children: [
5600
- /* @__PURE__ */ jsx59(Menu, { className: "h-4 w-4" }),
5690
+ const renderMobileMenu = () => /* @__PURE__ */ jsxs37(DropdownMenu, { children: [
5691
+ /* @__PURE__ */ jsxs37(DropdownMenuTrigger, { className: "flex items-center gap-2 px-3 py-2 rounded-md bg-white/10 text-white text-sm", children: [
5692
+ /* @__PURE__ */ jsx60(Menu, { className: "h-4 w-4" }),
5601
5693
  "Menu"
5602
5694
  ] }),
5603
- /* @__PURE__ */ jsx59(
5695
+ /* @__PURE__ */ jsx60(
5604
5696
  DropdownMenuContent,
5605
5697
  {
5606
5698
  align: "start",
@@ -5609,25 +5701,25 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
5609
5701
  children: rawTabs.map((tab, i) => {
5610
5702
  const hasChildren = Array.isArray(tab.children) && tab.children.length > 0 && tab.isDropDown;
5611
5703
  if (hasChildren) {
5612
- return /* @__PURE__ */ jsxs36(DropdownMenuSub, { children: [
5613
- /* @__PURE__ */ jsx59(DropdownMenuSubTrigger, { className: "flex items-center justify-between cursor-pointer rounded-sm px-3 py-2 text-[13px] text-foreground hover:text-foreground", children: tab.header }),
5614
- /* @__PURE__ */ jsx59(DropdownMenuSubContent, { className: "bg-white border shadow-lg rounded-md p-1", children: tab.children.map((item, index) => /* @__PURE__ */ jsx59(
5704
+ return /* @__PURE__ */ jsxs37(DropdownMenuSub, { children: [
5705
+ /* @__PURE__ */ jsx60(DropdownMenuSubTrigger, { className: "flex items-center justify-between cursor-pointer rounded-sm px-3 py-2 text-[13px] text-foreground hover:text-foreground", children: tab.header }),
5706
+ /* @__PURE__ */ jsx60(DropdownMenuSubContent, { className: "bg-white border shadow-lg rounded-md p-1", children: tab.children.map((item, index) => /* @__PURE__ */ jsx60(
5615
5707
  DropdownMenuItem,
5616
5708
  {
5617
5709
  asChild: true,
5618
5710
  className: "cursor-pointer rounded-sm px-3 py-2 text-gray-800 hover:bg-gray-100",
5619
- children: /* @__PURE__ */ jsx59(Link3, { href: item.url || "#", onClick: (e) => handleBuilderExit(e, item.url || "#"), children: item.header })
5711
+ children: /* @__PURE__ */ jsx60(Link3, { href: item.url || "#", onClick: (e) => handleBuilderExit(e, item.url || "#"), children: item.header })
5620
5712
  },
5621
5713
  item.id || index
5622
5714
  )) })
5623
5715
  ] }, i);
5624
5716
  }
5625
- return /* @__PURE__ */ jsx59(
5717
+ return /* @__PURE__ */ jsx60(
5626
5718
  DropdownMenuItem,
5627
5719
  {
5628
5720
  asChild: true,
5629
5721
  className: "cursor-pointer rounded-sm px-3 py-2 text-[13px] text-gray-800 hover:bg-gray-100",
5630
- children: /* @__PURE__ */ jsx59(Link3, { href: tab.url || "#", onClick: (e) => handleBuilderExit(e, tab.url || "#"), children: tab.header })
5722
+ children: /* @__PURE__ */ jsx60(Link3, { href: tab.url || "#", onClick: (e) => handleBuilderExit(e, tab.url || "#"), children: tab.header })
5631
5723
  },
5632
5724
  i
5633
5725
  );
@@ -5637,19 +5729,19 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
5637
5729
  ] });
5638
5730
  const forceMobile = canvasMode ? canvasMode === "mobile" || canvasMode === "tablet" : void 0;
5639
5731
  const forceDesktop = canvasMode ? canvasMode === "desktop" : void 0;
5640
- return /* @__PURE__ */ jsxs36(Fragment22, { children: [
5641
- /* @__PURE__ */ jsxs36("div", { className: cn("min-h-10", className), style, children: [
5642
- forceDesktop !== void 0 ? forceDesktop && /* @__PURE__ */ jsx59("div", { className: "hidden md:flex", children: /* @__PURE__ */ jsx59("div", { className: `flex gap-2 ${verticalMenu ? "flex-col items-start" : "flex-row"}`, children: rawTabs.map(renderDesktopTab) }) }) : /* @__PURE__ */ jsx59("div", { className: "hidden md:flex", children: /* @__PURE__ */ jsx59("div", { className: `flex gap-2 ${verticalMenu ? "flex-col items-start" : "flex-row"}`, children: rawTabs.map(renderDesktopTab) }) }),
5643
- forceMobile !== void 0 ? forceMobile && /* @__PURE__ */ jsx59("div", { children: renderMobileMenu() }) : /* @__PURE__ */ jsx59("div", { className: "flex md:hidden", children: renderMobileMenu() })
5732
+ return /* @__PURE__ */ jsxs37(Fragment22, { children: [
5733
+ /* @__PURE__ */ jsxs37("div", { className: cn("min-h-10", className), style, children: [
5734
+ forceDesktop !== void 0 ? forceDesktop && /* @__PURE__ */ jsx60("div", { className: "hidden md:flex", children: /* @__PURE__ */ jsx60("div", { className: `flex gap-2 ${verticalMenu ? "flex-col items-start" : "flex-row"}`, children: rawTabs.map(renderDesktopTab) }) }) : /* @__PURE__ */ jsx60("div", { className: "hidden md:flex", children: /* @__PURE__ */ jsx60("div", { className: `flex gap-2 ${verticalMenu ? "flex-col items-start" : "flex-row"}`, children: rawTabs.map(renderDesktopTab) }) }),
5735
+ forceMobile !== void 0 ? forceMobile && /* @__PURE__ */ jsx60("div", { children: renderMobileMenu() }) : /* @__PURE__ */ jsx60("div", { className: "flex md:hidden", children: renderMobileMenu() })
5644
5736
  ] }),
5645
- /* @__PURE__ */ jsx59(Dialog, { open: showExitDialog, onOpenChange: setShowExitDialog, children: /* @__PURE__ */ jsxs36(DialogContent, { className: "bg-[#fff]", children: [
5646
- /* @__PURE__ */ jsxs36(DialogHeader, { children: [
5647
- /* @__PURE__ */ jsx59(DialogTitle, { children: "Exit Builder?" }),
5648
- /* @__PURE__ */ jsx59(DialogDescription, { children: "You are about to leave the builder. Any unsaved changes may be lost." })
5737
+ /* @__PURE__ */ jsx60(Dialog, { open: showExitDialog, onOpenChange: setShowExitDialog, children: /* @__PURE__ */ jsxs37(DialogContent, { className: "bg-[#fff]", children: [
5738
+ /* @__PURE__ */ jsxs37(DialogHeader, { children: [
5739
+ /* @__PURE__ */ jsx60(DialogTitle, { children: "Exit Builder?" }),
5740
+ /* @__PURE__ */ jsx60(DialogDescription, { children: "You are about to leave the builder. Any unsaved changes may be lost." })
5649
5741
  ] }),
5650
- /* @__PURE__ */ jsxs36(DialogFooter, { children: [
5651
- /* @__PURE__ */ jsx59(Button, { className: "cursor-pointer bg-[#12715b] text-[#fff]", variant: "outline", onClick: () => setShowExitDialog(false), children: "Cancel" }),
5652
- /* @__PURE__ */ jsx59(Button, { className: "cursor-pointer border-[#12715b] border", onClick: confirmExit, children: "Yes, Exit" })
5742
+ /* @__PURE__ */ jsxs37(DialogFooter, { children: [
5743
+ /* @__PURE__ */ jsx60(Button, { className: "cursor-pointer bg-[#12715b] text-[#fff]", variant: "outline", onClick: () => setShowExitDialog(false), children: "Cancel" }),
5744
+ /* @__PURE__ */ jsx60(Button, { className: "cursor-pointer border-[#12715b] border", onClick: confirmExit, children: "Yes, Exit" })
5653
5745
  ] })
5654
5746
  ] }) })
5655
5747
  ] });
@@ -5657,16 +5749,16 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuil
5657
5749
  var Tabs_default = Tabs;
5658
5750
 
5659
5751
  // src/components/Navigation/Stages/Stages.tsx
5660
- import React12, { useEffect as useEffect27, useState as useState13 } from "react";
5752
+ import React13, { useEffect as useEffect28, useState as useState14 } from "react";
5661
5753
 
5662
5754
  // src/components/ui/tooltip.tsx
5663
5755
  import * as TooltipPrimitive from "@radix-ui/react-tooltip";
5664
- import { jsx as jsx60, jsxs as jsxs37 } from "react/jsx-runtime";
5756
+ import { jsx as jsx61, jsxs as jsxs38 } from "react/jsx-runtime";
5665
5757
  function TooltipProvider({
5666
5758
  delayDuration = 0,
5667
5759
  ...props
5668
5760
  }) {
5669
- return /* @__PURE__ */ jsx60(
5761
+ return /* @__PURE__ */ jsx61(
5670
5762
  TooltipPrimitive.Provider,
5671
5763
  {
5672
5764
  "data-slot": "tooltip-provider",
@@ -5678,12 +5770,12 @@ function TooltipProvider({
5678
5770
  function Tooltip({
5679
5771
  ...props
5680
5772
  }) {
5681
- return /* @__PURE__ */ jsx60(TooltipProvider, { children: /* @__PURE__ */ jsx60(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props }) });
5773
+ return /* @__PURE__ */ jsx61(TooltipProvider, { children: /* @__PURE__ */ jsx61(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props }) });
5682
5774
  }
5683
5775
  function TooltipTrigger({
5684
5776
  ...props
5685
5777
  }) {
5686
- return /* @__PURE__ */ jsx60(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
5778
+ return /* @__PURE__ */ jsx61(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
5687
5779
  }
5688
5780
  function TooltipContent({
5689
5781
  className,
@@ -5692,7 +5784,7 @@ function TooltipContent({
5692
5784
  hideArrow,
5693
5785
  ...props
5694
5786
  }) {
5695
- return /* @__PURE__ */ jsx60(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs37(
5787
+ return /* @__PURE__ */ jsx61(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs38(
5696
5788
  TooltipPrimitive.Content,
5697
5789
  {
5698
5790
  "data-slot": "tooltip-content",
@@ -5704,14 +5796,14 @@ function TooltipContent({
5704
5796
  ...props,
5705
5797
  children: [
5706
5798
  children,
5707
- !hideArrow && /* @__PURE__ */ jsx60(TooltipPrimitive.Arrow, { className: "bg-primary fill-primary z-50 size-2.5 rotate-45 rounded-[2px]" })
5799
+ !hideArrow && /* @__PURE__ */ jsx61(TooltipPrimitive.Arrow, { className: "bg-primary fill-primary z-50 size-2.5 rotate-45 rounded-[2px]" })
5708
5800
  ]
5709
5801
  }
5710
5802
  ) });
5711
5803
  }
5712
5804
 
5713
5805
  // src/components/Navigation/Stages/Stages.tsx
5714
- import { jsx as jsx61, jsxs as jsxs38 } from "react/jsx-runtime";
5806
+ import { jsx as jsx62, jsxs as jsxs39 } from "react/jsx-runtime";
5715
5807
  var StagesComponent = ({
5716
5808
  stages,
5717
5809
  isShowBtn,
@@ -5728,11 +5820,11 @@ var StagesComponent = ({
5728
5820
  canvasMode = "desktop",
5729
5821
  ...props
5730
5822
  }) => {
5731
- const [activeStage, setActiveStage] = useState13("");
5732
- const [isCompleted, setIsCompleted] = useState13(false);
5733
- const [activeChildStage, setActiveChildStage] = useState13(null);
5734
- const [activeRootStage, setActiveRootStage] = useState13(null);
5735
- useEffect27(() => {
5823
+ const [activeStage, setActiveStage] = useState14("");
5824
+ const [isCompleted, setIsCompleted] = useState14(false);
5825
+ const [activeChildStage, setActiveChildStage] = useState14(null);
5826
+ const [activeRootStage, setActiveRootStage] = useState14(null);
5827
+ useEffect28(() => {
5736
5828
  if (currentStage) {
5737
5829
  setActiveStage(currentStage);
5738
5830
  } else {
@@ -5794,7 +5886,7 @@ var StagesComponent = ({
5794
5886
  }
5795
5887
  return { activeRoot: null, activeChild: null };
5796
5888
  };
5797
- useEffect27(() => {
5889
+ useEffect28(() => {
5798
5890
  if (!currentStage || !Array.isArray(stages)) {
5799
5891
  setActiveRootStage(null);
5800
5892
  setActiveChildStage(null);
@@ -5807,7 +5899,7 @@ var StagesComponent = ({
5807
5899
  const isAllStagesCompleted = isCompleted;
5808
5900
  const disabled = isAllStagesCompleted || loading || saving;
5809
5901
  const primaryColor = props.primaryColor || "#12715b";
5810
- return /* @__PURE__ */ jsx61("div", { className, style, children: /* @__PURE__ */ jsxs38(
5902
+ return /* @__PURE__ */ jsx62("div", { className, style, children: /* @__PURE__ */ jsxs39(
5811
5903
  "div",
5812
5904
  {
5813
5905
  className: `
@@ -5817,8 +5909,8 @@ var StagesComponent = ({
5817
5909
  ${isMobile ? "p-3 sm:p-4" : "p-2"}
5818
5910
  `,
5819
5911
  children: [
5820
- /* @__PURE__ */ jsx61("div", { className: "flex items-center flex-shrink-0 order-1 lg:order-1", children: /* @__PURE__ */ jsx61("button", { className: "p-2 hover:bg-gray-100 rounded flex-shrink-0", children: /* @__PURE__ */ jsx61("svg", { className: "w-4 h-4 text-gray-600", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx61("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) }) }) }),
5821
- /* @__PURE__ */ jsx61(
5912
+ /* @__PURE__ */ jsx62("div", { className: "flex items-center flex-shrink-0 order-1 lg:order-1", children: /* @__PURE__ */ jsx62("button", { className: "p-2 hover:bg-gray-100 rounded flex-shrink-0", children: /* @__PURE__ */ jsx62("svg", { className: "w-4 h-4 text-gray-600", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx62("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) }) }) }),
5913
+ /* @__PURE__ */ jsx62(
5822
5914
  "div",
5823
5915
  {
5824
5916
  className: `
@@ -5826,7 +5918,7 @@ var StagesComponent = ({
5826
5918
  flex-wrap gap-2 sm:gap-2 lg:gap-3 w-full lg:w-auto
5827
5919
  ${isMobile ? "order-2 mt-2 lg:mt-0" : "order-2"}
5828
5920
  `,
5829
- children: loading ? Array(6).fill(null).map((_, index) => /* @__PURE__ */ jsx61(
5921
+ children: loading ? Array(6).fill(null).map((_, index) => /* @__PURE__ */ jsx62(
5830
5922
  "button",
5831
5923
  {
5832
5924
  className: `
@@ -5856,7 +5948,8 @@ var StagesComponent = ({
5856
5948
  const isCurrentRootStage = activeRootStage?.[dataKey] === stage[dataKey];
5857
5949
  const stageHasChildren = Array.isArray(stage?.children) && stage.children.length > 0;
5858
5950
  const isCurrentChildStage = activeChildStage?.[dataKey] === activeStage;
5859
- const showOutcomeForCurrentStage = showAsActive && hasOutcome && stageHasChildren && isCurrentRootStage && isCurrentChildStage;
5951
+ const isNotParentSelected = activeChildStage?.[dataKey] !== activeRootStage?.[dataKey];
5952
+ const showOutcomeForCurrentStage = showAsActive && hasOutcome && stageHasChildren && isCurrentRootStage && isCurrentChildStage && isNotParentSelected;
5860
5953
  let stageColor = `text-[${primaryColor}] border-2 border-[${primaryColor}]`;
5861
5954
  let stageStyle = {
5862
5955
  borderColor: primaryColor,
@@ -5881,8 +5974,8 @@ var StagesComponent = ({
5881
5974
  }
5882
5975
  }
5883
5976
  const stageKey = typeof stage[dataKey] === "string" ? stage[dataKey] : JSON.stringify(stage[dataKey]);
5884
- return /* @__PURE__ */ jsx61(React12.Fragment, { children: /* @__PURE__ */ jsxs38(Tooltip, { delayDuration: 500, disableHoverableContent: true, children: [
5885
- /* @__PURE__ */ jsx61(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx61(
5977
+ return /* @__PURE__ */ jsx62(React13.Fragment, { children: /* @__PURE__ */ jsxs39(Tooltip, { delayDuration: 500, disableHoverableContent: true, children: [
5978
+ /* @__PURE__ */ jsx62(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx62(
5886
5979
  "button",
5887
5980
  {
5888
5981
  className: `
@@ -5900,21 +5993,21 @@ var StagesComponent = ({
5900
5993
  children: stageLabel
5901
5994
  }
5902
5995
  ) }),
5903
- /* @__PURE__ */ jsx61(TooltipContent, { side: "top", sideOffset: 6, hideArrow: true, children: stageLabel }),
5904
- !isMobile && index < safeStages.length - 1 && /* @__PURE__ */ jsx61("div", { className: "hidden sm:flex sm:flex-shrink-0 w-3 h-px bg-gray-300 sm:w-4" })
5996
+ /* @__PURE__ */ jsx62(TooltipContent, { side: "top", sideOffset: 6, hideArrow: true, children: stageLabel }),
5997
+ !isMobile && index < safeStages.length - 1 && /* @__PURE__ */ jsx62("div", { className: "hidden sm:flex sm:flex-shrink-0 w-3 h-px bg-gray-300 sm:w-4" })
5905
5998
  ] }, stageKey) }, stageKey);
5906
5999
  });
5907
6000
  })()
5908
6001
  }
5909
6002
  ),
5910
- isShowBtn && /* @__PURE__ */ jsx61(
6003
+ isShowBtn && /* @__PURE__ */ jsx62(
5911
6004
  "div",
5912
6005
  {
5913
6006
  className: `
5914
6007
  flex items-center flex-shrink-0 w-full lg:w-auto
5915
6008
  ${isMobile ? "order-3 mt-3 lg:mt-0" : "order-3"}
5916
6009
  `,
5917
- children: /* @__PURE__ */ jsx61(
6010
+ children: /* @__PURE__ */ jsx62(
5918
6011
  "button",
5919
6012
  {
5920
6013
  className: `
@@ -5937,33 +6030,33 @@ var StagesComponent = ({
5937
6030
  var Stages_default = StagesComponent;
5938
6031
 
5939
6032
  // src/components/Navigation/Spacer/Spacer.tsx
5940
- import { jsx as jsx62 } from "react/jsx-runtime";
6033
+ import { jsx as jsx63 } from "react/jsx-runtime";
5941
6034
  var Spacer = ({ className, style }) => {
5942
- return /* @__PURE__ */ jsx62("div", { className: `${className}`, style });
6035
+ return /* @__PURE__ */ jsx63("div", { className: `${className}`, style });
5943
6036
  };
5944
6037
  var Spacer_default = Spacer;
5945
6038
 
5946
6039
  // src/components/Navigation/Profile/Profile.tsx
5947
- import { jsx as jsx63, jsxs as jsxs39 } from "react/jsx-runtime";
6040
+ import { jsx as jsx64, jsxs as jsxs40 } from "react/jsx-runtime";
5948
6041
 
5949
6042
  // src/components/Navigation/Notification/Notification.tsx
5950
- import { jsx as jsx64, jsxs as jsxs40 } from "react/jsx-runtime";
6043
+ import { jsx as jsx65, jsxs as jsxs41 } from "react/jsx-runtime";
5951
6044
 
5952
6045
  // src/components/Navigation/Logo/Logo.tsx
5953
- import { jsx as jsx65 } from "react/jsx-runtime";
6046
+ import { jsx as jsx66 } from "react/jsx-runtime";
5954
6047
 
5955
6048
  // src/components/Navigation/Navbar/Navbar.tsx
5956
- import { useCallback as useCallback6, useMemo as useMemo10, useState as useState14, useEffect as useEffect28 } from "react";
6049
+ import { useCallback as useCallback6, useMemo as useMemo10, useState as useState15, useEffect as useEffect29 } from "react";
5957
6050
  import { Bell, Search as Search2, Menu as Menu2 } from "lucide-react";
5958
6051
  import Image3 from "next/image";
5959
6052
  import Link4 from "next/link";
5960
6053
  import { useRouter as useRouter2 } from "next/navigation";
5961
6054
 
5962
6055
  // src/components/ui/avatar.tsx
5963
- import * as React13 from "react";
6056
+ import * as React14 from "react";
5964
6057
  import * as AvatarPrimitive from "@radix-ui/react-avatar";
5965
- import { jsx as jsx66 } from "react/jsx-runtime";
5966
- var Avatar = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx66(
6058
+ import { jsx as jsx67 } from "react/jsx-runtime";
6059
+ var Avatar = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx67(
5967
6060
  AvatarPrimitive.Root,
5968
6061
  {
5969
6062
  ref,
@@ -5975,7 +6068,7 @@ var Avatar = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
5975
6068
  }
5976
6069
  ));
5977
6070
  Avatar.displayName = AvatarPrimitive.Root.displayName;
5978
- var AvatarImage = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx66(
6071
+ var AvatarImage = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx67(
5979
6072
  AvatarPrimitive.Image,
5980
6073
  {
5981
6074
  ref,
@@ -5984,7 +6077,7 @@ var AvatarImage = React13.forwardRef(({ className, ...props }, ref) => /* @__PUR
5984
6077
  }
5985
6078
  ));
5986
6079
  AvatarImage.displayName = AvatarPrimitive.Image.displayName;
5987
- var AvatarFallback = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx66(
6080
+ var AvatarFallback = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx67(
5988
6081
  AvatarPrimitive.Fallback,
5989
6082
  {
5990
6083
  ref,
@@ -5998,7 +6091,7 @@ var AvatarFallback = React13.forwardRef(({ className, ...props }, ref) => /* @__
5998
6091
  AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
5999
6092
 
6000
6093
  // src/components/Navigation/Navbar/Navbar.tsx
6001
- import { Fragment as Fragment23, jsx as jsx67, jsxs as jsxs41 } from "react/jsx-runtime";
6094
+ import { Fragment as Fragment23, jsx as jsx68, jsxs as jsxs42 } from "react/jsx-runtime";
6002
6095
  function Navbar({
6003
6096
  style,
6004
6097
  badgeType,
@@ -6020,10 +6113,10 @@ function Navbar({
6020
6113
  primaryColor = "#2a55a3"
6021
6114
  }) {
6022
6115
  const router = useRouter2();
6023
- const [screenMode, setScreenMode] = useState14(
6116
+ const [screenMode, setScreenMode] = useState15(
6024
6117
  canvasMode
6025
6118
  );
6026
- useEffect28(() => {
6119
+ useEffect29(() => {
6027
6120
  const detectMode = () => {
6028
6121
  if (window.innerWidth < 640) setScreenMode("mobile");
6029
6122
  else if (window.innerWidth < 1024) setScreenMode("tablet");
@@ -6057,9 +6150,9 @@ function Navbar({
6057
6150
  }
6058
6151
  return list;
6059
6152
  }, [source, navList, list]);
6060
- const RenderSearchInput = () => /* @__PURE__ */ jsx67("div", { className: "flex-1 px-2", children: /* @__PURE__ */ jsxs41("div", { className: "relative w-full max-w-md border border-gray-300 rounded-md", children: [
6061
- /* @__PURE__ */ jsx67(Search2, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 dark:text-white text-gray-400" }),
6062
- /* @__PURE__ */ jsx67(
6153
+ const RenderSearchInput = () => /* @__PURE__ */ jsx68("div", { className: "flex-1 px-2", children: /* @__PURE__ */ jsxs42("div", { className: "relative w-full max-w-md border border-gray-300 rounded-md", children: [
6154
+ /* @__PURE__ */ jsx68(Search2, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 dark:text-white text-gray-400" }),
6155
+ /* @__PURE__ */ jsx68(
6063
6156
  Input,
6064
6157
  {
6065
6158
  placeholder: "Search",
@@ -6075,23 +6168,23 @@ function Navbar({
6075
6168
  }
6076
6169
  )
6077
6170
  ] }) });
6078
- return /* @__PURE__ */ jsxs41(Fragment23, { children: [
6079
- /* @__PURE__ */ jsx67(
6171
+ return /* @__PURE__ */ jsxs42(Fragment23, { children: [
6172
+ /* @__PURE__ */ jsx68(
6080
6173
  "nav",
6081
6174
  {
6082
6175
  className: "w-full min-h-[75px] border-b border-gray-200 dark:border-gray-800 dark:bg-gray-800 bg-white shadow-sm",
6083
6176
  style,
6084
- children: /* @__PURE__ */ jsxs41("div", { className: "mx-auto flex max-w-[90%] items-center justify-between px-4 py-4", children: [
6085
- /* @__PURE__ */ jsx67(
6177
+ children: /* @__PURE__ */ jsxs42("div", { className: "mx-auto flex max-w-[90%] items-center justify-between px-4 py-4", children: [
6178
+ /* @__PURE__ */ jsx68(
6086
6179
  Link4,
6087
6180
  {
6088
6181
  href: "/",
6089
6182
  onClick: (e) => handleBuilderExit(e, "/"),
6090
6183
  className: "flex items-center space-x-2",
6091
- children: imageUrl ? /* @__PURE__ */ jsx67(Image3, { src: imageUrl, alt: altText, width: 180, height: 40 }) : /* @__PURE__ */ jsx67("span", { className: "font-semibold text-blue-700", children: "Logo" })
6184
+ children: imageUrl ? /* @__PURE__ */ jsx68(Image3, { src: imageUrl, alt: altText, width: 180, height: 40 }) : /* @__PURE__ */ jsx68("span", { className: "font-semibold text-blue-700", children: "Logo" })
6092
6185
  }
6093
6186
  ),
6094
- isDesktop && /* @__PURE__ */ jsx67("div", { className: "hidden md:flex items-center space-x-6", children: formattedMenu.map((item) => /* @__PURE__ */ jsx67(
6187
+ isDesktop && /* @__PURE__ */ jsx68("div", { className: "hidden md:flex items-center space-x-6", children: formattedMenu.map((item) => /* @__PURE__ */ jsx68(
6095
6188
  Link4,
6096
6189
  {
6097
6190
  href: item.url,
@@ -6101,23 +6194,23 @@ function Navbar({
6101
6194
  },
6102
6195
  item.id
6103
6196
  )) }),
6104
- /* @__PURE__ */ jsxs41("div", { className: "flex items-center space-x-3", children: [
6105
- (isDesktop || isTablet) && /* @__PURE__ */ jsx67(RenderSearchInput, {}),
6106
- /* @__PURE__ */ jsxs41("div", { className: "relative bg-gray-200 dark:bg-gray-700 rounded-md", children: [
6107
- /* @__PURE__ */ jsx67(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ jsx67(Bell, { className: "h-5 w-5 text-gray-700 dark:text-gray-300" }) }),
6108
- badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && Number(badgeCount) > 0 ? /* @__PURE__ */ jsx67("span", { className: "absolute -top-1 -right-1 h-4 w-4 flex items-center justify-center bg-red-500 rounded-full text-white text-[10px]", children: badgeCount }) : !hideBadgeWhenZero && /* @__PURE__ */ jsx67("span", { className: "absolute -top-1 -right-1 h-2 w-2 bg-red-500 rounded-full" })
6197
+ /* @__PURE__ */ jsxs42("div", { className: "flex items-center space-x-3", children: [
6198
+ (isDesktop || isTablet) && /* @__PURE__ */ jsx68(RenderSearchInput, {}),
6199
+ /* @__PURE__ */ jsxs42("div", { className: "relative bg-gray-200 dark:bg-gray-700 rounded-md", children: [
6200
+ /* @__PURE__ */ jsx68(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ jsx68(Bell, { className: "h-5 w-5 text-gray-700 dark:text-gray-300" }) }),
6201
+ badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && Number(badgeCount) > 0 ? /* @__PURE__ */ jsx68("span", { className: "absolute -top-1 -right-1 h-4 w-4 flex items-center justify-center bg-red-500 rounded-full text-white text-[10px]", children: badgeCount }) : !hideBadgeWhenZero && /* @__PURE__ */ jsx68("span", { className: "absolute -top-1 -right-1 h-2 w-2 bg-red-500 rounded-full" })
6109
6202
  ] }),
6110
- /* @__PURE__ */ jsxs41(DropdownMenu, { children: [
6111
- /* @__PURE__ */ jsx67(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs41("div", { className: "flex items-center space-x-2 cursor-pointer", children: [
6112
- !isMobile && showName && /* @__PURE__ */ jsx67("h4", { className: "text-gray-900 dark:text-gray-300 text-sm", children: userName }),
6113
- /* @__PURE__ */ jsx67(Avatar, { className: "h-8 w-8", children: profileType === "avatar" ? /* @__PURE__ */ jsx67(AvatarImage, { src: "/images/appbuilder/toolset/profile.svg", alt: "profile" }) : /* @__PURE__ */ jsx67("div", { className: `bg-[${primaryColor}] text-white h-full w-full rounded-full flex items-center justify-center text-xs`, style: { backgroundColor: primaryColor }, children: getInitials(userName) }) }),
6114
- (isMobile || isTablet) && /* @__PURE__ */ jsx67(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ jsx67(Menu2, { className: "h-6 w-6" }) })
6203
+ /* @__PURE__ */ jsxs42(DropdownMenu, { children: [
6204
+ /* @__PURE__ */ jsx68(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs42("div", { className: "flex items-center space-x-2 cursor-pointer", children: [
6205
+ !isMobile && showName && /* @__PURE__ */ jsx68("h4", { className: "text-gray-900 dark:text-gray-300 text-sm", children: userName }),
6206
+ /* @__PURE__ */ jsx68(Avatar, { className: "h-8 w-8", children: profileType === "avatar" ? /* @__PURE__ */ jsx68(AvatarImage, { src: "/images/appbuilder/toolset/profile.svg", alt: "profile" }) : /* @__PURE__ */ jsx68("div", { className: `bg-[${primaryColor}] text-white h-full w-full rounded-full flex items-center justify-center text-xs`, style: { backgroundColor: primaryColor }, children: getInitials(userName) }) }),
6207
+ (isMobile || isTablet) && /* @__PURE__ */ jsx68(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ jsx68(Menu2, { className: "h-6 w-6" }) })
6115
6208
  ] }) }),
6116
- /* @__PURE__ */ jsxs41(DropdownMenuContent, { align: "end", className: "bg-white dark:bg-gray-800", children: [
6117
- profileMenu.map((item) => /* @__PURE__ */ jsx67(DropdownMenuItem, { children: /* @__PURE__ */ jsx67(Link4, { href: item.url, onClick: (e) => handleBuilderExit(e, item.url), children: item.header }) }, item.id)),
6118
- (isMobile || isTablet) && /* @__PURE__ */ jsxs41(Fragment23, { children: [
6119
- /* @__PURE__ */ jsx67(DropdownMenuSeparator, {}),
6120
- formattedMenu.map((item) => /* @__PURE__ */ jsx67(DropdownMenuItem, { children: /* @__PURE__ */ jsx67(Link4, { href: item.url, onClick: (e) => handleBuilderExit(e, item.url), children: item.header }) }, item.id))
6209
+ /* @__PURE__ */ jsxs42(DropdownMenuContent, { align: "end", className: "bg-white dark:bg-gray-800", children: [
6210
+ profileMenu.map((item) => /* @__PURE__ */ jsx68(DropdownMenuItem, { children: /* @__PURE__ */ jsx68(Link4, { href: item.url, onClick: (e) => handleBuilderExit(e, item.url), children: item.header }) }, item.id)),
6211
+ (isMobile || isTablet) && /* @__PURE__ */ jsxs42(Fragment23, { children: [
6212
+ /* @__PURE__ */ jsx68(DropdownMenuSeparator, {}),
6213
+ formattedMenu.map((item) => /* @__PURE__ */ jsx68(DropdownMenuItem, { children: /* @__PURE__ */ jsx68(Link4, { href: item.url, onClick: (e) => handleBuilderExit(e, item.url), children: item.header }) }, item.id))
6121
6214
  ] })
6122
6215
  ] })
6123
6216
  ] })
@@ -6125,12 +6218,12 @@ function Navbar({
6125
6218
  ] })
6126
6219
  }
6127
6220
  ),
6128
- isMobile && /* @__PURE__ */ jsx67("div", { className: "p-3", children: /* @__PURE__ */ jsx67(RenderSearchInput, {}) })
6221
+ isMobile && /* @__PURE__ */ jsx68("div", { className: "p-3", children: /* @__PURE__ */ jsx68(RenderSearchInput, {}) })
6129
6222
  ] });
6130
6223
  }
6131
6224
 
6132
6225
  // src/components/Chart/BarChart.tsx
6133
- import React14, { useEffect as useEffect29, useMemo as useMemo11, useState as useState15, useCallback as useCallback7 } from "react";
6226
+ import React15, { useEffect as useEffect30, useMemo as useMemo11, useState as useState16, useCallback as useCallback7 } from "react";
6134
6227
  import axios4 from "axios";
6135
6228
  import {
6136
6229
  BarChart,
@@ -6143,7 +6236,7 @@ import {
6143
6236
  Tooltip as Tooltip2,
6144
6237
  ResponsiveContainer
6145
6238
  } from "recharts";
6146
- import { jsx as jsx68, jsxs as jsxs42 } from "react/jsx-runtime";
6239
+ import { jsx as jsx69, jsxs as jsxs43 } from "react/jsx-runtime";
6147
6240
  var palette = [
6148
6241
  "#2563eb",
6149
6242
  "#1d4ed8",
@@ -6203,13 +6296,13 @@ var ChartComponent = ({
6203
6296
  ...props
6204
6297
  }) => {
6205
6298
  const useApi = source === "api" && !!apiUrl;
6206
- const [rawData, setRawData] = useState15([]);
6207
- const [rawMeta, setRawMeta] = useState15(null);
6208
- const [localLoading, setLocalLoading] = useState15(false);
6209
- const [currentPage, setCurrentPage] = useState15(1);
6299
+ const [rawData, setRawData] = useState16([]);
6300
+ const [rawMeta, setRawMeta] = useState16(null);
6301
+ const [localLoading, setLocalLoading] = useState16(false);
6302
+ const [currentPage, setCurrentPage] = useState16(1);
6210
6303
  const effectiveData = useApi ? rawData : props.data || [];
6211
6304
  const effectiveLoading = useApi ? localLoading : externalLoading;
6212
- useEffect29(() => {
6305
+ useEffect30(() => {
6213
6306
  if (useApi) {
6214
6307
  setCurrentPage(1);
6215
6308
  }
@@ -6251,7 +6344,7 @@ var ChartComponent = ({
6251
6344
  if (!cancelled) setLocalLoading(false);
6252
6345
  }
6253
6346
  }, [apiUrl, limit]);
6254
- useEffect29(() => {
6347
+ useEffect30(() => {
6255
6348
  if (!useApi) return;
6256
6349
  fetchData(currentPage);
6257
6350
  }, [useApi, currentPage, fetchData]);
@@ -6274,7 +6367,7 @@ var ChartComponent = ({
6274
6367
  const renderLegends = useMemo11(() => {
6275
6368
  if (!showLegends || !dataKey || !dataLabel) return null;
6276
6369
  const isLegendRight2 = !forceMobile && legendPosition === "right";
6277
- return /* @__PURE__ */ jsx68(
6370
+ return /* @__PURE__ */ jsx69(
6278
6371
  "div",
6279
6372
  {
6280
6373
  className: isLegendRight2 ? "flex flex-col gap-2 w-full min-w-0 justify-start overflow-y-auto max-h-[260px]" : "flex flex-wrap justify-center gap-2 mt-4 w-full max-w-4xl",
@@ -6287,7 +6380,7 @@ var ChartComponent = ({
6287
6380
  [dataLabel]: d[dataLabel],
6288
6381
  [dataKey]: value
6289
6382
  };
6290
- return /* @__PURE__ */ jsxs42(
6383
+ return /* @__PURE__ */ jsxs43(
6291
6384
  "div",
6292
6385
  {
6293
6386
  role: onLegendClick ? "button" : void 0,
@@ -6296,16 +6389,16 @@ var ChartComponent = ({
6296
6389
  onKeyDown: onLegendClick ? (e) => e.key === "Enter" && onLegendClick(payload) : void 0,
6297
6390
  className: `flex items-center space-x-2 rounded-lg border border-gray-200/50 px-3 py-1.5 min-w-[180px] w-[180px] bg-white/80 backdrop-blur-sm shadow-sm hover:shadow-md transition-all ${onLegendClick ? "cursor-pointer" : ""}`,
6298
6391
  children: [
6299
- /* @__PURE__ */ jsx68(
6392
+ /* @__PURE__ */ jsx69(
6300
6393
  "span",
6301
6394
  {
6302
6395
  className: "inline-block w-[12px] h-[12px] rounded-full shrink-0 border-2 border-white/50",
6303
6396
  style: { backgroundColor: d.fill }
6304
6397
  }
6305
6398
  ),
6306
- /* @__PURE__ */ jsxs42("div", { className: "min-w-0 flex-1", children: [
6307
- /* @__PURE__ */ jsx68("span", { className: "text-gray-900 text-[11px] md:text-[13px] font-semibold block truncate leading-tight capitalize", children: d[dataLabel] }),
6308
- /* @__PURE__ */ jsx68("span", { className: "text-xs text-gray-600 font-medium", children: displayValue })
6399
+ /* @__PURE__ */ jsxs43("div", { className: "min-w-0 flex-1", children: [
6400
+ /* @__PURE__ */ jsx69("span", { className: "text-gray-900 text-[11px] md:text-[13px] font-semibold block truncate leading-tight capitalize", children: d[dataLabel] }),
6401
+ /* @__PURE__ */ jsx69("span", { className: "text-xs text-gray-600 font-medium", children: displayValue })
6309
6402
  ] })
6310
6403
  ]
6311
6404
  },
@@ -6316,27 +6409,27 @@ var ChartComponent = ({
6316
6409
  );
6317
6410
  }, [data, dataLabel, dataKey, showLegends, onLegendClick, legendPosition, forceMobile]);
6318
6411
  if (effectiveLoading) {
6319
- return /* @__PURE__ */ jsxs42(
6412
+ return /* @__PURE__ */ jsxs43(
6320
6413
  "div",
6321
6414
  {
6322
6415
  className: `relative flex flex-col w-full h-[300px] md:h-[400px] bg-gradient-to-br from-gray-50 to-gray-100 rounded-xl p-6 ${className}`,
6323
6416
  style,
6324
6417
  children: [
6325
- /* @__PURE__ */ jsx68("div", { className: "mb-6 flex justify-center", children: /* @__PURE__ */ jsxs42("div", { className: "inline-flex items-center space-x-2 bg-white/90 px-6 py-2.5 rounded-xl backdrop-blur-sm border border-gray-200 shadow-lg", children: [
6326
- /* @__PURE__ */ jsx68("div", { className: "w-5 h-5 border-2 border-gray-400 border-t-blue-500 rounded-full animate-spin" }),
6327
- /* @__PURE__ */ jsx68("span", { className: "text-sm font-medium text-gray-700 bg-gradient-to-r from-gray-300 bg-clip-text animate-pulse", children: "Loading chart data..." })
6418
+ /* @__PURE__ */ jsx69("div", { className: "mb-6 flex justify-center", children: /* @__PURE__ */ jsxs43("div", { className: "inline-flex items-center space-x-2 bg-white/90 px-6 py-2.5 rounded-xl backdrop-blur-sm border border-gray-200 shadow-lg", children: [
6419
+ /* @__PURE__ */ jsx69("div", { className: "w-5 h-5 border-2 border-gray-400 border-t-blue-500 rounded-full animate-spin" }),
6420
+ /* @__PURE__ */ jsx69("span", { className: "text-sm font-medium text-gray-700 bg-gradient-to-r from-gray-300 bg-clip-text animate-pulse", children: "Loading chart data..." })
6328
6421
  ] }) }),
6329
- /* @__PURE__ */ jsx68("div", { className: "absolute inset-0 bg-gradient-to-r from-transparent via-white/60 to-transparent animate-shimmer rounded-xl" }),
6330
- /* @__PURE__ */ jsx68("div", { className: "flex-1 relative w-full h-full min-h-[240px] md:min-h-[320px] bg-white/80 rounded-lg border border-gray-200/50 shadow-sm", children: /* @__PURE__ */ jsx68("div", { className: "absolute bottom-0 left-4 right-4 flex gap-2 h-[200px] md:h-[280px] justify-center items-end", children: [...Array(20)].map((_, idx) => {
6422
+ /* @__PURE__ */ jsx69("div", { className: "absolute inset-0 bg-gradient-to-r from-transparent via-white/60 to-transparent animate-shimmer rounded-xl" }),
6423
+ /* @__PURE__ */ jsx69("div", { className: "flex-1 relative w-full h-full min-h-[240px] md:min-h-[320px] bg-white/80 rounded-lg border border-gray-200/50 shadow-sm", children: /* @__PURE__ */ jsx69("div", { className: "absolute bottom-0 left-4 right-4 flex gap-2 h-[200px] md:h-[280px] justify-center items-end", children: [...Array(20)].map((_, idx) => {
6331
6424
  const randomHeight = `${Math.floor(Math.random() * 76) + 20}%`;
6332
- return /* @__PURE__ */ jsxs42(
6425
+ return /* @__PURE__ */ jsxs43(
6333
6426
  "div",
6334
6427
  {
6335
6428
  className: `relative w-10 md:w-12 flex-1 max-w-[48px] rounded-t-lg bg-gradient-to-t from-gray-100 via-gray-200 to-transparent shadow-lg border border-gray-200/50 animate-slide-up stagger-${idx} overflow-hidden`,
6336
6429
  style: { height: randomHeight, animationDelay: `${idx * 0.08}s` },
6337
6430
  children: [
6338
- /* @__PURE__ */ jsx68("div", { className: "absolute inset-0 bg-gradient-to-r from-white/40 via-transparent to-white/40 animate-shimmer-bar" }),
6339
- /* @__PURE__ */ jsx68("div", { className: "absolute bottom-1 left-1/2 w-4 h-1 rounded-full transform -translate-x-1/2 blur-sm" })
6431
+ /* @__PURE__ */ jsx69("div", { className: "absolute inset-0 bg-gradient-to-r from-white/40 via-transparent to-white/40 animate-shimmer-bar" }),
6432
+ /* @__PURE__ */ jsx69("div", { className: "absolute bottom-1 left-1/2 w-4 h-1 rounded-full transform -translate-x-1/2 blur-sm" })
6340
6433
  ]
6341
6434
  },
6342
6435
  `bar-${idx}`
@@ -6347,74 +6440,74 @@ var ChartComponent = ({
6347
6440
  );
6348
6441
  }
6349
6442
  if (data.length === 0) {
6350
- return /* @__PURE__ */ jsx68(
6443
+ return /* @__PURE__ */ jsx69(
6351
6444
  "div",
6352
6445
  {
6353
6446
  className: `relative flex flex-col items-center justify-center w-full h-[300px] md:h-[400px] bg-gradient-to-br from-gray-50 to-gray-100 rounded-xl p-6 ${className}`,
6354
6447
  style,
6355
- children: /* @__PURE__ */ jsx68("div", { className: "text-center", children: /* @__PURE__ */ jsx68("div", { className: "inline-flex items-center space-x-2 bg-white/80 px-6 py-3 rounded-xl backdrop-blur-sm border border-gray-200 shadow-lg", children: /* @__PURE__ */ jsx68("span", { className: "text-sm font-medium text-gray-600", children: "No data" }) }) })
6448
+ children: /* @__PURE__ */ jsx69("div", { className: "text-center", children: /* @__PURE__ */ jsx69("div", { className: "inline-flex items-center space-x-2 bg-white/80 px-6 py-3 rounded-xl backdrop-blur-sm border border-gray-200 shadow-lg", children: /* @__PURE__ */ jsx69("span", { className: "text-sm font-medium text-gray-600", children: "No data" }) }) })
6356
6449
  }
6357
6450
  );
6358
6451
  }
6359
6452
  const isLegendRight = !forceMobile && legendPosition === "right";
6360
- return /* @__PURE__ */ jsxs42(
6453
+ return /* @__PURE__ */ jsxs43(
6361
6454
  "div",
6362
6455
  {
6363
6456
  className: `relative flex ${isLegendRight ? "flex-row items-stretch gap-4" : "flex-col items-center"} ${className}`,
6364
6457
  style,
6365
6458
  children: [
6366
- /* @__PURE__ */ jsxs42(
6459
+ /* @__PURE__ */ jsxs43(
6367
6460
  "div",
6368
6461
  {
6369
6462
  className: `relative flex items-center justify-center ${isLegendRight ? "flex-[2] min-w-0 max-w-[70%] h-[450px]" : "w-full md:w-[75%] h-[450px] mb-2"}`,
6370
6463
  children: [
6371
- isPaginationEnabled && rawMeta && /* @__PURE__ */ jsxs42("div", { className: "flex items-center justify-between mb-4 px-2", children: [
6372
- /* @__PURE__ */ jsxs42("div", { className: "flex items-center space-x-2 sm:hidden w-full justify-center", children: [
6373
- /* @__PURE__ */ jsx68(
6464
+ isPaginationEnabled && rawMeta && /* @__PURE__ */ jsxs43("div", { className: "flex items-center justify-between mb-4 px-2", children: [
6465
+ /* @__PURE__ */ jsxs43("div", { className: "flex items-center space-x-2 sm:hidden w-full justify-center", children: [
6466
+ /* @__PURE__ */ jsx69(
6374
6467
  "button",
6375
6468
  {
6376
6469
  onClick: () => handlePageChange(currentPage - 1),
6377
6470
  disabled: currentPage === 1 || localLoading,
6378
6471
  className: "flex-1 px-3 py-2 text-xs font-medium rounded-lg border bg-white shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed transition-all duration-200 flex items-center justify-center space-x-1 min-w-0",
6379
- children: /* @__PURE__ */ jsx68("span", { children: "\u2190 Prev" })
6472
+ children: /* @__PURE__ */ jsx69("span", { children: "\u2190 Prev" })
6380
6473
  }
6381
6474
  ),
6382
- /* @__PURE__ */ jsx68("span", { className: "px-2 py-2 text-xs font-semibold text-gray-700 min-w-[36px] text-center flex-shrink-0", children: currentPage }),
6383
- /* @__PURE__ */ jsx68(
6475
+ /* @__PURE__ */ jsx69("span", { className: "px-2 py-2 text-xs font-semibold text-gray-700 min-w-[36px] text-center flex-shrink-0", children: currentPage }),
6476
+ /* @__PURE__ */ jsx69(
6384
6477
  "button",
6385
6478
  {
6386
6479
  onClick: () => handlePageChange(currentPage + 1),
6387
6480
  disabled: currentPage >= rawMeta.pages || localLoading,
6388
6481
  className: "flex-1 px-3 py-2 text-xs font-medium rounded-lg border bg-white shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed transition-all duration-200 flex items-center justify-center space-x-1 min-w-0",
6389
- children: /* @__PURE__ */ jsx68("span", { children: "Next \u2192" })
6482
+ children: /* @__PURE__ */ jsx69("span", { children: "Next \u2192" })
6390
6483
  }
6391
6484
  )
6392
6485
  ] }),
6393
- /* @__PURE__ */ jsxs42("div", { className: "hidden sm:flex items-center space-x-2", children: [
6394
- /* @__PURE__ */ jsx68(
6486
+ /* @__PURE__ */ jsxs43("div", { className: "hidden sm:flex items-center space-x-2", children: [
6487
+ /* @__PURE__ */ jsx69(
6395
6488
  "button",
6396
6489
  {
6397
6490
  onClick: () => handlePageChange(currentPage - 1),
6398
6491
  disabled: currentPage === 1 || localLoading,
6399
6492
  className: "px-3 py-1.5 text-sm font-medium rounded-lg border bg-white shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed transition-all duration-200 flex items-center space-x-1",
6400
- children: /* @__PURE__ */ jsx68("span", { children: "\u2190 Prev" })
6493
+ children: /* @__PURE__ */ jsx69("span", { children: "\u2190 Prev" })
6401
6494
  }
6402
6495
  ),
6403
- /* @__PURE__ */ jsx68("span", { className: "px-3 py-1 text-sm font-medium text-gray-700", children: currentPage }),
6404
- /* @__PURE__ */ jsx68(
6496
+ /* @__PURE__ */ jsx69("span", { className: "px-3 py-1 text-sm font-medium text-gray-700", children: currentPage }),
6497
+ /* @__PURE__ */ jsx69(
6405
6498
  "button",
6406
6499
  {
6407
6500
  onClick: () => handlePageChange(currentPage + 1),
6408
6501
  disabled: currentPage >= rawMeta.pages || localLoading,
6409
6502
  className: "px-3 py-1.5 text-sm font-medium rounded-lg border bg-white shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed transition-all duration-200 flex items-center space-x-1",
6410
- children: /* @__PURE__ */ jsx68("span", { children: "Next \u2192" })
6503
+ children: /* @__PURE__ */ jsx69("span", { children: "Next \u2192" })
6411
6504
  }
6412
6505
  )
6413
6506
  ] })
6414
6507
  ] }),
6415
- /* @__PURE__ */ jsx68(ResponsiveContainer, { width: "100%", height: "100%", children: chartType === "bar" ? /* @__PURE__ */ jsxs42(BarChart, { data, children: [
6416
- /* @__PURE__ */ jsx68(CartesianGrid, { strokeDasharray: "3 3" }),
6417
- /* @__PURE__ */ jsx68(
6508
+ /* @__PURE__ */ jsx69(ResponsiveContainer, { width: "100%", height: "100%", children: chartType === "bar" ? /* @__PURE__ */ jsxs43(BarChart, { data, children: [
6509
+ /* @__PURE__ */ jsx69(CartesianGrid, { strokeDasharray: "3 3" }),
6510
+ /* @__PURE__ */ jsx69(
6418
6511
  XAxis,
6419
6512
  {
6420
6513
  dataKey: dataLabel,
@@ -6432,7 +6525,7 @@ var ChartComponent = ({
6432
6525
  className: "hidden sm:block"
6433
6526
  }
6434
6527
  ),
6435
- /* @__PURE__ */ jsx68(
6528
+ /* @__PURE__ */ jsx69(
6436
6529
  YAxis,
6437
6530
  {
6438
6531
  tickFormatter: (value) => `${(value / 1e3).toFixed(0)}k`,
@@ -6445,8 +6538,8 @@ var ChartComponent = ({
6445
6538
  width: 60
6446
6539
  }
6447
6540
  ),
6448
- /* @__PURE__ */ jsx68(Tooltip2, { formatter: (value) => value != null ? [`${value}`, "Count"] : ["", "Count"] }),
6449
- /* @__PURE__ */ jsx68(
6541
+ /* @__PURE__ */ jsx69(Tooltip2, { formatter: (value) => value != null ? [`${value}`, "Count"] : ["", "Count"] }),
6542
+ /* @__PURE__ */ jsx69(
6450
6543
  Bar,
6451
6544
  {
6452
6545
  dataKey,
@@ -6454,13 +6547,13 @@ var ChartComponent = ({
6454
6547
  isAnimationActive: false
6455
6548
  }
6456
6549
  )
6457
- ] }) : /* @__PURE__ */ jsxs42(AreaChart, { data, children: [
6458
- /* @__PURE__ */ jsx68("defs", { children: /* @__PURE__ */ jsxs42("linearGradient", { id: "colorCount", x1: "0", y1: "0", x2: "0", y2: "1", children: [
6459
- /* @__PURE__ */ jsx68("stop", { offset: "5%", stopColor: "#00695C", stopOpacity: 0.8 }),
6460
- /* @__PURE__ */ jsx68("stop", { offset: "95%", stopColor: "#00695C", stopOpacity: 0 })
6550
+ ] }) : /* @__PURE__ */ jsxs43(AreaChart, { data, children: [
6551
+ /* @__PURE__ */ jsx69("defs", { children: /* @__PURE__ */ jsxs43("linearGradient", { id: "colorCount", x1: "0", y1: "0", x2: "0", y2: "1", children: [
6552
+ /* @__PURE__ */ jsx69("stop", { offset: "5%", stopColor: "#00695C", stopOpacity: 0.8 }),
6553
+ /* @__PURE__ */ jsx69("stop", { offset: "95%", stopColor: "#00695C", stopOpacity: 0 })
6461
6554
  ] }) }),
6462
- /* @__PURE__ */ jsx68(CartesianGrid, { strokeDasharray: "3 3" }),
6463
- /* @__PURE__ */ jsx68(
6555
+ /* @__PURE__ */ jsx69(CartesianGrid, { strokeDasharray: "3 3" }),
6556
+ /* @__PURE__ */ jsx69(
6464
6557
  XAxis,
6465
6558
  {
6466
6559
  dataKey: dataLabel,
@@ -6474,7 +6567,7 @@ var ChartComponent = ({
6474
6567
  }
6475
6568
  }
6476
6569
  ),
6477
- /* @__PURE__ */ jsx68(
6570
+ /* @__PURE__ */ jsx69(
6478
6571
  YAxis,
6479
6572
  {
6480
6573
  tickFormatter: (value) => `${(value / 1e3).toFixed(0)}k`,
@@ -6487,8 +6580,8 @@ var ChartComponent = ({
6487
6580
  width: 60
6488
6581
  }
6489
6582
  ),
6490
- /* @__PURE__ */ jsx68(Tooltip2, { formatter: (value) => value != null ? `${value}k` : "" }),
6491
- /* @__PURE__ */ jsx68(
6583
+ /* @__PURE__ */ jsx69(Tooltip2, { formatter: (value) => value != null ? `${value}k` : "" }),
6584
+ /* @__PURE__ */ jsx69(
6492
6585
  Area,
6493
6586
  {
6494
6587
  type: "monotone",
@@ -6503,15 +6596,15 @@ var ChartComponent = ({
6503
6596
  ]
6504
6597
  }
6505
6598
  ),
6506
- showLegends && /* @__PURE__ */ jsx68("div", { className: isLegendRight ? "flex flex-col w-[30%] min-w-[180px] justify-center" : "w-full", children: renderLegends })
6599
+ showLegends && /* @__PURE__ */ jsx69("div", { className: isLegendRight ? "flex flex-col w-[30%] min-w-[180px] justify-center" : "w-full", children: renderLegends })
6507
6600
  ]
6508
6601
  }
6509
6602
  );
6510
6603
  };
6511
- var BarChart_default = React14.memo(ChartComponent);
6604
+ var BarChart_default = React15.memo(ChartComponent);
6512
6605
 
6513
6606
  // src/components/Chart/PieChart.tsx
6514
- import React15, { useEffect as useEffect30, useMemo as useMemo12, useState as useState16 } from "react";
6607
+ import React16, { useEffect as useEffect31, useMemo as useMemo12, useState as useState17 } from "react";
6515
6608
  import axios5 from "axios";
6516
6609
  import {
6517
6610
  PieChart,
@@ -6520,7 +6613,7 @@ import {
6520
6613
  ResponsiveContainer as ResponsiveContainer2,
6521
6614
  Tooltip as Tooltip3
6522
6615
  } from "recharts";
6523
- import { jsx as jsx69, jsxs as jsxs43 } from "react/jsx-runtime";
6616
+ import { jsx as jsx70, jsxs as jsxs44 } from "react/jsx-runtime";
6524
6617
  var getRandomColor = () => {
6525
6618
  const palette2 = [
6526
6619
  "#2563eb",
@@ -6601,11 +6694,11 @@ var DonutChart = ({
6601
6694
  const showLegends = props.showLegends ?? true;
6602
6695
  const canvasMode = props.canvasMode;
6603
6696
  const useApi = source === "api" && !!apiUrl;
6604
- const [rawData, setRawData] = useState16([]);
6605
- const [localLoading, setLocalLoading] = useState16(false);
6697
+ const [rawData, setRawData] = useState17([]);
6698
+ const [localLoading, setLocalLoading] = useState17(false);
6606
6699
  const effectiveData = useApi ? rawData : props.data || [];
6607
6700
  const effectiveLoading = useApi ? localLoading : externalLoading;
6608
- useEffect30(() => {
6701
+ useEffect31(() => {
6609
6702
  if (!useApi) return;
6610
6703
  let cancelled = false;
6611
6704
  const fetchData = async () => {
@@ -6686,15 +6779,15 @@ var DonutChart = ({
6686
6779
  if (chartData.length <= 6) return { inner: 85, outer: 150 };
6687
6780
  return { inner: 70, outer: 130 };
6688
6781
  };
6689
- const [mounted, setMounted] = useState16(false);
6690
- useEffect30(() => {
6782
+ const [mounted, setMounted] = useState17(false);
6783
+ useEffect31(() => {
6691
6784
  const timeout = setTimeout(() => setMounted(true), 100);
6692
6785
  return () => clearTimeout(timeout);
6693
6786
  }, []);
6694
6787
  const renderLegends = useMemo12(() => {
6695
6788
  if (!showLegends) return null;
6696
6789
  const isLegendRight2 = !forceMobile && legendPosition === "right";
6697
- return /* @__PURE__ */ jsx69(
6790
+ return /* @__PURE__ */ jsx70(
6698
6791
  "div",
6699
6792
  {
6700
6793
  className: isLegendRight2 ? "flex flex-col gap-2 w-full min-w-0 justify-start overflow-y-auto max-h-[260px]" : "flex flex-wrap justify-center gap-2 mt-4 w-full max-w-4xl",
@@ -6709,7 +6802,7 @@ var DonutChart = ({
6709
6802
  [dataLabel]: d[dataLabel],
6710
6803
  [dataKey]: actualValue
6711
6804
  };
6712
- return /* @__PURE__ */ jsxs43(
6805
+ return /* @__PURE__ */ jsxs44(
6713
6806
  "div",
6714
6807
  {
6715
6808
  role: onLegendClick ? "button" : void 0,
@@ -6718,22 +6811,22 @@ var DonutChart = ({
6718
6811
  onKeyDown: onLegendClick ? (e) => e.key === "Enter" && onLegendClick(payload) : void 0,
6719
6812
  className: `flex items-center space-x-2 rounded-lg border border-gray-200/50 px-3 py-1.5 w-[48%] sm:w-[32%] md:w-auto bg-white/80 backdrop-blur-sm shadow-sm hover:shadow-md transition-all ${onLegendClick ? "cursor-pointer" : ""}`,
6720
6813
  children: [
6721
- /* @__PURE__ */ jsx69(
6814
+ /* @__PURE__ */ jsx70(
6722
6815
  "span",
6723
6816
  {
6724
6817
  className: "inline-block w-[12px] h-[12px] rounded-full shrink-0 border-2 border-white/50",
6725
6818
  style: { backgroundColor: d.color }
6726
6819
  }
6727
6820
  ),
6728
- /* @__PURE__ */ jsxs43("div", { className: "min-w-0 flex-1", children: [
6729
- /* @__PURE__ */ jsx69("span", { className: "text-gray-900 text-[11px] md:text-[13px] font-semibold block truncate leading-tight", children: d[dataLabel] }),
6730
- /* @__PURE__ */ jsxs43("div", { className: "flex items-center gap-1 text-xs text-gray-600 font-medium", children: [
6731
- /* @__PURE__ */ jsx69("span", { children: displayValue }),
6732
- /* @__PURE__ */ jsxs43("span", { children: [
6821
+ /* @__PURE__ */ jsxs44("div", { className: "min-w-0 flex-1", children: [
6822
+ /* @__PURE__ */ jsx70("span", { className: "text-gray-900 text-[11px] md:text-[13px] font-semibold block truncate leading-tight", children: d[dataLabel] }),
6823
+ /* @__PURE__ */ jsxs44("div", { className: "flex items-center gap-1 text-xs text-gray-600 font-medium", children: [
6824
+ /* @__PURE__ */ jsx70("span", { children: displayValue }),
6825
+ /* @__PURE__ */ jsxs44("span", { children: [
6733
6826
  (actualValue / total * 100).toFixed(1),
6734
6827
  "%"
6735
6828
  ] }),
6736
- d.isBoosted && /* @__PURE__ */ jsx69("span", { className: "text-[9px] px-1 py-0.5 bg-blue-100 text-blue-700 rounded-full", children: "min" })
6829
+ d.isBoosted && /* @__PURE__ */ jsx70("span", { className: "text-[9px] px-1 py-0.5 bg-blue-100 text-blue-700 rounded-full", children: "min" })
6737
6830
  ] })
6738
6831
  ] })
6739
6832
  ]
@@ -6746,26 +6839,26 @@ var DonutChart = ({
6746
6839
  }, [chartData, data, dataLabel, dataKey, total, showLegends, onLegendClick, legendPosition, forceMobile]);
6747
6840
  if (!mounted) return null;
6748
6841
  if (effectiveLoading) {
6749
- return /* @__PURE__ */ jsxs43(
6842
+ return /* @__PURE__ */ jsxs44(
6750
6843
  "div",
6751
6844
  {
6752
6845
  className: `relative flex flex-col items-center w-full h-[300px] md:h-[400px] bg-gradient-to-br from-gray-50 to-gray-100 rounded-xl p-6 ${className}`,
6753
6846
  style,
6754
6847
  children: [
6755
- /* @__PURE__ */ jsx69("div", { className: "absolute inset-0 bg-gradient-to-r from-transparent via-white/60 to-transparent animate-shimmer rounded-xl" }),
6756
- /* @__PURE__ */ jsx69("div", { className: "mt-6 text-center", children: /* @__PURE__ */ jsxs43("div", { className: "inline-flex items-center space-x-2 bg-white/80 px-6 py-2 rounded-full backdrop-blur-sm border border-gray-200 shadow-lg", children: [
6757
- /* @__PURE__ */ jsx69("div", { className: "w-5 h-5 border-2 border-gray-300 border-t-blue-400 rounded-full animate-spin" }),
6758
- /* @__PURE__ */ jsx69("span", { className: "text-sm font-medium text-gray-600 bg-gradient-to-r from-gray-300 bg-clip-text animate-pulse", children: "Loading chart data..." })
6848
+ /* @__PURE__ */ jsx70("div", { className: "absolute inset-0 bg-gradient-to-r from-transparent via-white/60 to-transparent animate-shimmer rounded-xl" }),
6849
+ /* @__PURE__ */ jsx70("div", { className: "mt-6 text-center", children: /* @__PURE__ */ jsxs44("div", { className: "inline-flex items-center space-x-2 bg-white/80 px-6 py-2 rounded-full backdrop-blur-sm border border-gray-200 shadow-lg", children: [
6850
+ /* @__PURE__ */ jsx70("div", { className: "w-5 h-5 border-2 border-gray-300 border-t-blue-400 rounded-full animate-spin" }),
6851
+ /* @__PURE__ */ jsx70("span", { className: "text-sm font-medium text-gray-600 bg-gradient-to-r from-gray-300 bg-clip-text animate-pulse", children: "Loading chart data..." })
6759
6852
  ] }) }),
6760
- /* @__PURE__ */ jsx69("div", { className: "flex flex-wrap justify-center gap-3 mt-8 w-full max-w-4xl", children: [...Array(18)].map((_, idx) => /* @__PURE__ */ jsxs43(
6853
+ /* @__PURE__ */ jsx70("div", { className: "flex flex-wrap justify-center gap-3 mt-8 w-full max-w-4xl", children: [...Array(18)].map((_, idx) => /* @__PURE__ */ jsxs44(
6761
6854
  "div",
6762
6855
  {
6763
6856
  className: `h-10 w-[48%] sm:w-[32%] md:w-32 rounded-xl bg-gradient-to-r from-gray-200 via-gray-300/50 to-gray-200 p-3 flex items-center space-x-3 animate-slide-up stagger-${idx} shadow-sm border border-gray-200/50`,
6764
6857
  children: [
6765
- /* @__PURE__ */ jsx69("div", { className: "w-4 h-4 rounded-full bg-gradient-to-r from-blue-300 to-purple-300 animate-pulse" }),
6766
- /* @__PURE__ */ jsxs43("div", { className: "flex-1 space-y-1", children: [
6767
- /* @__PURE__ */ jsx69("div", { className: "h-3 w-20 bg-gray-300 rounded animate-pulse" }),
6768
- /* @__PURE__ */ jsx69("div", { className: "h-2.5 w-16 bg-gray-200/60 rounded animate-pulse-delayed" })
6858
+ /* @__PURE__ */ jsx70("div", { className: "w-4 h-4 rounded-full bg-gradient-to-r from-blue-300 to-purple-300 animate-pulse" }),
6859
+ /* @__PURE__ */ jsxs44("div", { className: "flex-1 space-y-1", children: [
6860
+ /* @__PURE__ */ jsx70("div", { className: "h-3 w-20 bg-gray-300 rounded animate-pulse" }),
6861
+ /* @__PURE__ */ jsx70("div", { className: "h-2.5 w-16 bg-gray-200/60 rounded animate-pulse-delayed" })
6769
6862
  ] })
6770
6863
  ]
6771
6864
  },
@@ -6776,12 +6869,12 @@ var DonutChart = ({
6776
6869
  );
6777
6870
  }
6778
6871
  if (data.length === 0) {
6779
- return /* @__PURE__ */ jsx69(
6872
+ return /* @__PURE__ */ jsx70(
6780
6873
  "div",
6781
6874
  {
6782
6875
  className: `relative flex flex-col items-center justify-center w-full h-[300px] md:h-[400px] bg-gradient-to-br from-gray-50 to-gray-100 rounded-xl p-6 ${className}`,
6783
6876
  style,
6784
- children: /* @__PURE__ */ jsx69("div", { className: "text-center", children: /* @__PURE__ */ jsx69("div", { className: "inline-flex items-center space-x-2 bg-white/80 px-6 py-3 rounded-xl backdrop-blur-sm border border-gray-200 shadow-lg", children: /* @__PURE__ */ jsx69("span", { className: "text-sm font-medium text-gray-600", children: "No data" }) }) })
6877
+ children: /* @__PURE__ */ jsx70("div", { className: "text-center", children: /* @__PURE__ */ jsx70("div", { className: "inline-flex items-center space-x-2 bg-white/80 px-6 py-3 rounded-xl backdrop-blur-sm border border-gray-200 shadow-lg", children: /* @__PURE__ */ jsx70("span", { className: "text-sm font-medium text-gray-600", children: "No data" }) }) })
6785
6878
  }
6786
6879
  );
6787
6880
  }
@@ -6789,19 +6882,19 @@ var DonutChart = ({
6789
6882
  const innerRadius = inner;
6790
6883
  const outerRadius = outer;
6791
6884
  const isLegendRight = !forceMobile && legendPosition === "right";
6792
- return /* @__PURE__ */ jsxs43(
6885
+ return /* @__PURE__ */ jsxs44(
6793
6886
  "div",
6794
6887
  {
6795
6888
  className: `relative flex ${isLegendRight ? "flex-row items-stretch gap-4" : "flex-col items-center"} ${className}`,
6796
6889
  style,
6797
6890
  children: [
6798
- /* @__PURE__ */ jsxs43(
6891
+ /* @__PURE__ */ jsxs44(
6799
6892
  "div",
6800
6893
  {
6801
6894
  className: `relative flex items-center justify-center ${isLegendRight ? "flex-[2] min-w-0 max-w-[70%]" : "w-full md:w-[75%]"} h-[280px] md:h-[380px] ${isLegendRight ? "" : "mb-2"}`,
6802
6895
  children: [
6803
- /* @__PURE__ */ jsx69(ResponsiveContainer2, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs43(PieChart, { children: [
6804
- /* @__PURE__ */ jsx69(
6896
+ /* @__PURE__ */ jsx70(ResponsiveContainer2, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs44(PieChart, { children: [
6897
+ /* @__PURE__ */ jsx70(
6805
6898
  Pie,
6806
6899
  {
6807
6900
  data: chartData,
@@ -6814,7 +6907,7 @@ var DonutChart = ({
6814
6907
  isAnimationActive: true,
6815
6908
  animationDuration: 800,
6816
6909
  minAngle: 3,
6817
- children: chartData.map((entry, index) => /* @__PURE__ */ jsx69(
6910
+ children: chartData.map((entry, index) => /* @__PURE__ */ jsx70(
6818
6911
  Cell,
6819
6912
  {
6820
6913
  fill: entry.color,
@@ -6825,7 +6918,7 @@ var DonutChart = ({
6825
6918
  ))
6826
6919
  }
6827
6920
  ),
6828
- /* @__PURE__ */ jsx69(
6921
+ /* @__PURE__ */ jsx70(
6829
6922
  Tooltip3,
6830
6923
  {
6831
6924
  formatter: (value, name, payload) => {
@@ -6848,25 +6941,25 @@ var DonutChart = ({
6848
6941
  }
6849
6942
  )
6850
6943
  ] }) }),
6851
- total > 0 && /* @__PURE__ */ jsx69("div", { className: `absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 text-center pointer-events-none ${forceMobile ? "text-xl px-2" : "text-3xl px-4"} font-bold bg-white/90 backdrop-blur-sm rounded-full py-1 shadow-lg`, children: /* @__PURE__ */ jsxs43("div", { className: "text-[#1f2937] leading-tight", children: [
6944
+ total > 0 && /* @__PURE__ */ jsx70("div", { className: `absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 text-center pointer-events-none ${forceMobile ? "text-xl px-2" : "text-3xl px-4"} font-bold bg-white/90 backdrop-blur-sm rounded-full py-1 shadow-lg`, children: /* @__PURE__ */ jsxs44("div", { className: "text-[#1f2937] leading-tight", children: [
6852
6945
  formattedTotal,
6853
- /* @__PURE__ */ jsx69("span", { className: "text-sm md:text-base font-normal text-gray-600 block md:inline-block md:ml-1", children: "total" })
6946
+ /* @__PURE__ */ jsx70("span", { className: "text-sm md:text-base font-normal text-gray-600 block md:inline-block md:ml-1", children: "total" })
6854
6947
  ] }) })
6855
6948
  ]
6856
6949
  }
6857
6950
  ),
6858
- showLegends && /* @__PURE__ */ jsx69("div", { className: isLegendRight ? "flex flex-col w-[30%] min-w-[180px] justify-center" : "w-full", children: renderLegends })
6951
+ showLegends && /* @__PURE__ */ jsx70("div", { className: isLegendRight ? "flex flex-col w-[30%] min-w-[180px] justify-center" : "w-full", children: renderLegends })
6859
6952
  ]
6860
6953
  }
6861
6954
  );
6862
6955
  };
6863
- var PieChart_default = React15.memo(DonutChart);
6956
+ var PieChart_default = React16.memo(DonutChart);
6864
6957
 
6865
6958
  // src/components/Blocks/EmailComposer.tsx
6866
- import { jsx as jsx70, jsxs as jsxs44 } from "react/jsx-runtime";
6959
+ import { jsx as jsx71, jsxs as jsxs45 } from "react/jsx-runtime";
6867
6960
  function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc, setShowBcc, cc, setCc, bcc, setBcc, subject, setSubject, body, setBody }) {
6868
- return /* @__PURE__ */ jsx70("div", { className, style, children: /* @__PURE__ */ jsxs44("div", { className: "border rounded-md shadow bg-[#fff] p-4 mx-auto z-[50] relative", children: [
6869
- /* @__PURE__ */ jsx70("div", { className: "mb-3", children: /* @__PURE__ */ jsx70(
6961
+ return /* @__PURE__ */ jsx71("div", { className, style, children: /* @__PURE__ */ jsxs45("div", { className: "border rounded-md shadow bg-[#fff] p-4 mx-auto z-[50] relative", children: [
6962
+ /* @__PURE__ */ jsx71("div", { className: "mb-3", children: /* @__PURE__ */ jsx71(
6870
6963
  "input",
6871
6964
  {
6872
6965
  type: "email",
@@ -6875,8 +6968,8 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
6875
6968
  required: true
6876
6969
  }
6877
6970
  ) }),
6878
- /* @__PURE__ */ jsx70("div", { className: "mb-3", children: /* @__PURE__ */ jsxs44("div", { className: "flex items-center gap-2", children: [
6879
- /* @__PURE__ */ jsx70(
6971
+ /* @__PURE__ */ jsx71("div", { className: "mb-3", children: /* @__PURE__ */ jsxs45("div", { className: "flex items-center gap-2", children: [
6972
+ /* @__PURE__ */ jsx71(
6880
6973
  "input",
6881
6974
  {
6882
6975
  type: "email",
@@ -6887,7 +6980,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
6887
6980
  required: true
6888
6981
  }
6889
6982
  ),
6890
- !showCc && /* @__PURE__ */ jsx70(
6983
+ !showCc && /* @__PURE__ */ jsx71(
6891
6984
  "button",
6892
6985
  {
6893
6986
  onClick: () => setShowCc?.(true),
@@ -6895,7 +6988,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
6895
6988
  children: "Cc"
6896
6989
  }
6897
6990
  ),
6898
- !showBcc && /* @__PURE__ */ jsx70(
6991
+ !showBcc && /* @__PURE__ */ jsx71(
6899
6992
  "button",
6900
6993
  {
6901
6994
  onClick: () => setShowBcc?.(true),
@@ -6904,7 +6997,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
6904
6997
  }
6905
6998
  )
6906
6999
  ] }) }),
6907
- showCc && /* @__PURE__ */ jsx70("div", { className: "mb-3", children: /* @__PURE__ */ jsx70(
7000
+ showCc && /* @__PURE__ */ jsx71("div", { className: "mb-3", children: /* @__PURE__ */ jsx71(
6908
7001
  "input",
6909
7002
  {
6910
7003
  type: "text",
@@ -6914,7 +7007,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
6914
7007
  className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
6915
7008
  }
6916
7009
  ) }),
6917
- showBcc && /* @__PURE__ */ jsx70("div", { className: "mb-3", children: /* @__PURE__ */ jsx70(
7010
+ showBcc && /* @__PURE__ */ jsx71("div", { className: "mb-3", children: /* @__PURE__ */ jsx71(
6918
7011
  "input",
6919
7012
  {
6920
7013
  type: "text",
@@ -6924,7 +7017,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
6924
7017
  className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
6925
7018
  }
6926
7019
  ) }),
6927
- /* @__PURE__ */ jsx70("div", { className: "mb-3", children: /* @__PURE__ */ jsx70(
7020
+ /* @__PURE__ */ jsx71("div", { className: "mb-3", children: /* @__PURE__ */ jsx71(
6928
7021
  "input",
6929
7022
  {
6930
7023
  type: "text",
@@ -6934,11 +7027,11 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
6934
7027
  className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
6935
7028
  }
6936
7029
  ) }),
6937
- /* @__PURE__ */ jsx70("div", { className: "mb-4", children: /* @__PURE__ */ jsx70(MyEditor, { value: body, onChange: setBody }) }),
6938
- /* @__PURE__ */ jsxs44("div", { className: "flex justify-end gap-2", children: [
6939
- /* @__PURE__ */ jsx70("button", { className: "px-4 py-2 rounded-md text-gray-600 hover:bg-gray-100", children: "Discard" }),
6940
- /* @__PURE__ */ jsx70("button", { className: "px-4 py-2 rounded-md border text-[#12715B] border-[#12715B]", children: "Reset" }),
6941
- /* @__PURE__ */ jsx70("button", { className: "px-4 py-2 rounded-md bg-[#12715B] text-white", children: "Send" })
7030
+ /* @__PURE__ */ jsx71("div", { className: "mb-4", children: /* @__PURE__ */ jsx71(MyEditor, { value: body, onChange: setBody }) }),
7031
+ /* @__PURE__ */ jsxs45("div", { className: "flex justify-end gap-2", children: [
7032
+ /* @__PURE__ */ jsx71("button", { className: "px-4 py-2 rounded-md text-gray-600 hover:bg-gray-100", children: "Discard" }),
7033
+ /* @__PURE__ */ jsx71("button", { className: "px-4 py-2 rounded-md border text-[#12715B] border-[#12715B]", children: "Reset" }),
7034
+ /* @__PURE__ */ jsx71("button", { className: "px-4 py-2 rounded-md bg-[#12715B] text-white", children: "Send" })
6942
7035
  ] })
6943
7036
  ] }) });
6944
7037
  }
@@ -6946,10 +7039,10 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
6946
7039
  // src/components/ui/sonner.tsx
6947
7040
  import { useTheme } from "next-themes";
6948
7041
  import { Toaster as Sonner } from "sonner";
6949
- import { jsx as jsx71 } from "react/jsx-runtime";
7042
+ import { jsx as jsx72 } from "react/jsx-runtime";
6950
7043
  var Toaster = ({ ...props }) => {
6951
7044
  const { theme = "system" } = useTheme();
6952
- return /* @__PURE__ */ jsx71(
7045
+ return /* @__PURE__ */ jsx72(
6953
7046
  Sonner,
6954
7047
  {
6955
7048
  theme,
@@ -6966,6 +7059,7 @@ var Toaster = ({ ...props }) => {
6966
7059
  export {
6967
7060
  Accordion_default as Accordion,
6968
7061
  AccordionGroup_default as AccordionGroup,
7062
+ Audio_default as Audio,
6969
7063
  BarChart_default as BarChart,
6970
7064
  Breadcrumb_default as Breadcrumb,
6971
7065
  Button_default as Button,