analytica-frontend-lib 1.2.17 → 1.2.18

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.js CHANGED
@@ -2088,6 +2088,7 @@ var MessageStep = ({
2088
2088
  const handleRemoveFile = () => {
2089
2089
  setImage(null);
2090
2090
  };
2091
+ const isImageFile = image instanceof File;
2091
2092
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("section", { className: "flex flex-col gap-4", children: [
2092
2093
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2093
2094
  Input_default,
@@ -2113,7 +2114,7 @@ var MessageStep = ({
2113
2114
  allowImageAttachment && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2114
2115
  ImageUpload,
2115
2116
  {
2116
- selectedFile: image,
2117
+ selectedFile: isImageFile ? image : null,
2117
2118
  onFileSelect: handleFileSelect,
2118
2119
  onRemoveFile: handleRemoveFile
2119
2120
  }
@@ -2316,13 +2317,8 @@ var DateStep = ({
2316
2317
 
2317
2318
  // src/components/AlertManager/AlertSteps/PreviewStep.tsx
2318
2319
  var import_react12 = require("react");
2319
-
2320
- // src/assets/img/notification.png
2321
- var notification_default = "./notification-TD7ZFRLL.png";
2322
-
2323
- // src/components/AlertManager/AlertSteps/PreviewStep.tsx
2324
2320
  var import_jsx_runtime18 = require("react/jsx-runtime");
2325
- var PreviewStep = () => {
2321
+ var PreviewStep = ({ imageLink, defaultImage }) => {
2326
2322
  const title = useAlertFormStore((state) => state.title);
2327
2323
  const message = useAlertFormStore((state) => state.message);
2328
2324
  const image = useAlertFormStore((state) => state.image);
@@ -2333,17 +2329,21 @@ var PreviewStep = () => {
2333
2329
  if (image instanceof File) {
2334
2330
  return globalThis.window.URL.createObjectURL(image);
2335
2331
  }
2332
+ if (typeof image === "string") {
2333
+ return image;
2334
+ }
2336
2335
  return void 0;
2337
2336
  }, [image]);
2338
2337
  (0, import_react12.useEffect)(() => {
2339
2338
  return () => {
2340
- if (imageUrl && globalThis.window !== void 0) {
2339
+ if (globalThis.window !== void 0 && imageUrl && image instanceof File) {
2341
2340
  URL.revokeObjectURL(imageUrl);
2342
2341
  }
2343
2342
  };
2344
- }, [imageUrl]);
2343
+ }, [imageUrl, image]);
2344
+ const finalImageUrl = imageLink || imageUrl || defaultImage || void 0;
2345
2345
  return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("section", { className: "flex flex-col gap-4", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "bg-background-50 px-5 py-6 flex flex-col items-center gap-4 rounded-xl", children: [
2346
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("img", { src: imageUrl || notification_default, alt: title || "Imagem do alerta" }),
2346
+ finalImageUrl && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("img", { src: finalImageUrl, alt: title || "Imagem do alerta" }),
2347
2347
  /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col items-center text-center gap-3", children: [
2348
2348
  /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Text_default, { size: "lg", weight: "semibold", children: title || "Nenhum T\xEDtulo de Alerta" }),
2349
2349
  /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Text_default, { size: "sm", weight: "normal", className: "text-text-500", children: message || "Aqui aparecer\xE1 a mensagem do alerta definido pelo usu\xE1rio" })
@@ -2437,7 +2437,9 @@ var StepWrapper = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx
2437
2437
  var AlertsManager = ({
2438
2438
  config,
2439
2439
  isOpen = false,
2440
- onClose
2440
+ onClose,
2441
+ imageLink,
2442
+ defaultImage
2441
2443
  }) => {
2442
2444
  const [isModalOpen, setIsModalOpen] = (0, import_react13.useState)(isOpen);
2443
2445
  const [currentStep, setCurrentStep] = (0, import_react13.useState)(0);
@@ -2596,7 +2598,7 @@ var AlertsManager = ({
2596
2598
  }
2597
2599
  ) });
2598
2600
  case 3:
2599
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(StepWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(PreviewStep, {}) });
2601
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(StepWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(PreviewStep, { imageLink, defaultImage }) });
2600
2602
  default:
2601
2603
  return null;
2602
2604
  }
@@ -2607,7 +2609,9 @@ var AlertsManager = ({
2607
2609
  labels,
2608
2610
  behavior,
2609
2611
  handleNext2,
2610
- handlePrevious
2612
+ handlePrevious,
2613
+ imageLink,
2614
+ defaultImage
2611
2615
  ]);
2612
2616
  const isFirstStep = currentStep === 0;
2613
2617
  const isLastStep = currentStep === steps.length - 1;
@@ -2670,9 +2674,6 @@ var AlertsManager = ({
2670
2674
  );
2671
2675
  };
2672
2676
 
2673
- // src/components/AlertManagerView/AlertsManagerView.tsx
2674
- var import_react16 = require("react");
2675
-
2676
2677
  // src/components/Modal/Modal.tsx
2677
2678
  var import_react14 = require("react");
2678
2679
  var import_phosphor_react9 = require("phosphor-react");
@@ -3459,27 +3460,13 @@ var AlertsManagerView = ({
3459
3460
  alertData,
3460
3461
  isOpen = false,
3461
3462
  onClose,
3463
+ imageLink,
3464
+ defaultImage,
3462
3465
  currentPage = 1,
3463
3466
  totalPages: externalTotalPages,
3464
3467
  onPageChange,
3465
3468
  itemsPerPage = 10
3466
3469
  }) => {
3467
- const imageUrl = (0, import_react16.useMemo)(() => {
3468
- if (globalThis.window == void 0) {
3469
- return void 0;
3470
- }
3471
- if (alertData.image instanceof File) {
3472
- return globalThis.window.URL.createObjectURL(alertData.image);
3473
- }
3474
- return void 0;
3475
- }, [alertData.image]);
3476
- (0, import_react16.useEffect)(() => {
3477
- return () => {
3478
- if (imageUrl && globalThis.window !== void 0) {
3479
- URL.revokeObjectURL(imageUrl);
3480
- }
3481
- };
3482
- }, [imageUrl]);
3483
3470
  const totalPages = externalTotalPages ?? Math.ceil(alertData.recipients.length / itemsPerPage);
3484
3471
  const effectiveCurrentPage = Math.min(totalPages, Math.max(1, currentPage));
3485
3472
  const startIndex = (effectiveCurrentPage - 1) * itemsPerPage;
@@ -3507,10 +3494,10 @@ var AlertsManagerView = ({
3507
3494
  contentClassName: "p-0",
3508
3495
  children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "flex flex-col h-[calc(100vh-8rem)] max-h-[700px]", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex-1 overflow-y-auto px-6 py-4", children: [
3509
3496
  /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "bg-background-50 px-5 py-6 flex flex-col items-center gap-4 rounded-xl mb-4", children: [
3510
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3497
+ (imageLink || alertData.image || defaultImage) && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3511
3498
  "img",
3512
3499
  {
3513
- src: imageUrl || notification_default,
3500
+ src: imageLink || alertData.image || defaultImage || void 0,
3514
3501
  alt: alertData.title || "Imagem do alerta"
3515
3502
  }
3516
3503
  ),
@@ -3599,7 +3586,7 @@ var AlertsManagerView = ({
3599
3586
  };
3600
3587
 
3601
3588
  // src/components/Radio/Radio.tsx
3602
- var import_react17 = require("react");
3589
+ var import_react16 = require("react");
3603
3590
  var import_zustand3 = require("zustand");
3604
3591
  var import_jsx_runtime26 = require("react/jsx-runtime");
3605
3592
  var SIZE_CLASSES7 = {
@@ -3666,7 +3653,7 @@ var DOT_CLASSES = {
3666
3653
  invalid: "bg-primary-950",
3667
3654
  disabled: "bg-primary-950"
3668
3655
  };
3669
- var Radio = (0, import_react17.forwardRef)(
3656
+ var Radio = (0, import_react16.forwardRef)(
3670
3657
  ({
3671
3658
  label,
3672
3659
  size = "medium",
@@ -3684,10 +3671,10 @@ var Radio = (0, import_react17.forwardRef)(
3684
3671
  onChange,
3685
3672
  ...props
3686
3673
  }, ref) => {
3687
- const generatedId = (0, import_react17.useId)();
3674
+ const generatedId = (0, import_react16.useId)();
3688
3675
  const inputId = id ?? `radio-${generatedId}`;
3689
- const inputRef = (0, import_react17.useRef)(null);
3690
- const [internalChecked, setInternalChecked] = (0, import_react17.useState)(defaultChecked);
3676
+ const inputRef = (0, import_react16.useRef)(null);
3677
+ const [internalChecked, setInternalChecked] = (0, import_react16.useState)(defaultChecked);
3691
3678
  const isControlled = checkedProp !== void 0;
3692
3679
  const checked = isControlled ? checkedProp : internalChecked;
3693
3680
  const handleChange = (event) => {
@@ -3873,16 +3860,16 @@ var useRadioGroupStore = (externalStore) => {
3873
3860
  }
3874
3861
  return externalStore;
3875
3862
  };
3876
- var injectStore2 = (children, store) => import_react17.Children.map(children, (child) => {
3877
- if (!(0, import_react17.isValidElement)(child)) return child;
3863
+ var injectStore2 = (children, store) => import_react16.Children.map(children, (child) => {
3864
+ if (!(0, import_react16.isValidElement)(child)) return child;
3878
3865
  const typedChild = child;
3879
3866
  const shouldInject = typedChild.type === RadioGroupItem;
3880
- return (0, import_react17.cloneElement)(typedChild, {
3867
+ return (0, import_react16.cloneElement)(typedChild, {
3881
3868
  ...shouldInject ? { store } : {},
3882
3869
  ...typedChild.props.children ? { children: injectStore2(typedChild.props.children, store) } : {}
3883
3870
  });
3884
3871
  });
3885
- var RadioGroup = (0, import_react17.forwardRef)(
3872
+ var RadioGroup = (0, import_react16.forwardRef)(
3886
3873
  ({
3887
3874
  value: propValue,
3888
3875
  defaultValue = "",
@@ -3893,9 +3880,9 @@ var RadioGroup = (0, import_react17.forwardRef)(
3893
3880
  children,
3894
3881
  ...props
3895
3882
  }, ref) => {
3896
- const generatedId = (0, import_react17.useId)();
3883
+ const generatedId = (0, import_react16.useId)();
3897
3884
  const name = propName || `radio-group-${generatedId}`;
3898
- const storeRef = (0, import_react17.useRef)(null);
3885
+ const storeRef = (0, import_react16.useRef)(null);
3899
3886
  storeRef.current ??= createRadioGroupStore(
3900
3887
  name,
3901
3888
  defaultValue,
@@ -3904,18 +3891,18 @@ var RadioGroup = (0, import_react17.forwardRef)(
3904
3891
  );
3905
3892
  const store = storeRef.current;
3906
3893
  const { setValue } = (0, import_zustand3.useStore)(store, (s) => s);
3907
- (0, import_react17.useEffect)(() => {
3894
+ (0, import_react16.useEffect)(() => {
3908
3895
  const currentValue = store.getState().value;
3909
3896
  if (currentValue && onValueChange) {
3910
3897
  onValueChange(currentValue);
3911
3898
  }
3912
3899
  }, []);
3913
- (0, import_react17.useEffect)(() => {
3900
+ (0, import_react16.useEffect)(() => {
3914
3901
  if (propValue !== void 0) {
3915
3902
  setValue(propValue);
3916
3903
  }
3917
3904
  }, [propValue, setValue]);
3918
- (0, import_react17.useEffect)(() => {
3905
+ (0, import_react16.useEffect)(() => {
3919
3906
  store.setState({ disabled });
3920
3907
  }, [disabled, store]);
3921
3908
  return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
@@ -3932,7 +3919,7 @@ var RadioGroup = (0, import_react17.forwardRef)(
3932
3919
  }
3933
3920
  );
3934
3921
  RadioGroup.displayName = "RadioGroup";
3935
- var RadioGroupItem = (0, import_react17.forwardRef)(
3922
+ var RadioGroupItem = (0, import_react16.forwardRef)(
3936
3923
  ({
3937
3924
  value,
3938
3925
  store: externalStore,
@@ -3950,7 +3937,7 @@ var RadioGroupItem = (0, import_react17.forwardRef)(
3950
3937
  disabled: groupDisabled,
3951
3938
  name
3952
3939
  } = (0, import_zustand3.useStore)(store);
3953
- const generatedId = (0, import_react17.useId)();
3940
+ const generatedId = (0, import_react16.useId)();
3954
3941
  const inputId = id ?? `radio-item-${generatedId}`;
3955
3942
  const isChecked = groupValue === value;
3956
3943
  const isDisabled = groupDisabled || itemDisabled;
@@ -4098,19 +4085,19 @@ var Toaster_default = Toaster;
4098
4085
 
4099
4086
  // src/components/Search/Search.tsx
4100
4087
  var import_phosphor_react16 = require("phosphor-react");
4101
- var import_react21 = require("react");
4088
+ var import_react20 = require("react");
4102
4089
 
4103
4090
  // src/components/DropdownMenu/DropdownMenu.tsx
4104
4091
  var import_phosphor_react15 = require("phosphor-react");
4105
- var import_react20 = require("react");
4092
+ var import_react19 = require("react");
4106
4093
  var import_zustand6 = require("zustand");
4107
4094
 
4108
4095
  // src/components/ThemeToggle/ThemeToggle.tsx
4109
4096
  var import_phosphor_react14 = require("phosphor-react");
4110
- var import_react19 = require("react");
4097
+ var import_react18 = require("react");
4111
4098
 
4112
4099
  // src/hooks/useTheme.ts
4113
- var import_react18 = require("react");
4100
+ var import_react17 = require("react");
4114
4101
 
4115
4102
  // src/store/themeStore.ts
4116
4103
  var import_zustand5 = require("zustand");
@@ -4214,7 +4201,7 @@ var useTheme = () => {
4214
4201
  initializeTheme,
4215
4202
  handleSystemThemeChange
4216
4203
  } = useThemeStore();
4217
- (0, import_react18.useEffect)(() => {
4204
+ (0, import_react17.useEffect)(() => {
4218
4205
  initializeTheme();
4219
4206
  const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
4220
4207
  mediaQuery.addEventListener("change", handleSystemThemeChange);
@@ -4237,8 +4224,8 @@ var ThemeToggle = ({
4237
4224
  onToggle
4238
4225
  }) => {
4239
4226
  const { themeMode, setTheme } = useTheme();
4240
- const [tempTheme, setTempTheme] = (0, import_react19.useState)(themeMode);
4241
- (0, import_react19.useEffect)(() => {
4227
+ const [tempTheme, setTempTheme] = (0, import_react18.useState)(themeMode);
4228
+ (0, import_react18.useEffect)(() => {
4242
4229
  setTempTheme(themeMode);
4243
4230
  }, [themeMode]);
4244
4231
  const problemTypes = [
@@ -4315,8 +4302,8 @@ var useDropdownStore = (externalStore) => {
4315
4302
  return externalStore;
4316
4303
  };
4317
4304
  var injectStore3 = (children, store) => {
4318
- return import_react20.Children.map(children, (child) => {
4319
- if ((0, import_react20.isValidElement)(child)) {
4305
+ return import_react19.Children.map(children, (child) => {
4306
+ if ((0, import_react19.isValidElement)(child)) {
4320
4307
  const typedChild = child;
4321
4308
  const displayName = typedChild.type.displayName;
4322
4309
  const allowed = [
@@ -4338,7 +4325,7 @@ var injectStore3 = (children, store) => {
4338
4325
  if (typedChild.props.children) {
4339
4326
  newProps.children = injectStore3(typedChild.props.children, store);
4340
4327
  }
4341
- return (0, import_react20.cloneElement)(typedChild, newProps);
4328
+ return (0, import_react19.cloneElement)(typedChild, newProps);
4342
4329
  }
4343
4330
  return child;
4344
4331
  });
@@ -4348,14 +4335,14 @@ var DropdownMenu = ({
4348
4335
  open: propOpen,
4349
4336
  onOpenChange
4350
4337
  }) => {
4351
- const storeRef = (0, import_react20.useRef)(null);
4338
+ const storeRef = (0, import_react19.useRef)(null);
4352
4339
  storeRef.current ??= createDropdownStore();
4353
4340
  const store = storeRef.current;
4354
4341
  const { open, setOpen: storeSetOpen } = (0, import_zustand6.useStore)(store, (s) => s);
4355
4342
  const setOpen = (newOpen) => {
4356
4343
  storeSetOpen(newOpen);
4357
4344
  };
4358
- const menuRef = (0, import_react20.useRef)(null);
4345
+ const menuRef = (0, import_react19.useRef)(null);
4359
4346
  const handleArrowDownOrArrowUp = (event) => {
4360
4347
  const menuContent = menuRef.current?.querySelector('[role="menu"]');
4361
4348
  if (menuContent) {
@@ -4389,7 +4376,7 @@ var DropdownMenu = ({
4389
4376
  setOpen(false);
4390
4377
  }
4391
4378
  };
4392
- (0, import_react20.useEffect)(() => {
4379
+ (0, import_react19.useEffect)(() => {
4393
4380
  if (open) {
4394
4381
  document.addEventListener("pointerdown", handleClickOutside);
4395
4382
  document.addEventListener("keydown", handleDownkey);
@@ -4399,10 +4386,10 @@ var DropdownMenu = ({
4399
4386
  document.removeEventListener("keydown", handleDownkey);
4400
4387
  };
4401
4388
  }, [open]);
4402
- (0, import_react20.useEffect)(() => {
4389
+ (0, import_react19.useEffect)(() => {
4403
4390
  onOpenChange?.(open);
4404
4391
  }, [open, onOpenChange]);
4405
- (0, import_react20.useEffect)(() => {
4392
+ (0, import_react19.useEffect)(() => {
4406
4393
  if (propOpen !== void 0) {
4407
4394
  setOpen(propOpen);
4408
4395
  }
@@ -4463,7 +4450,7 @@ var MENUCONTENT_VARIANT_CLASSES = {
4463
4450
  menu: "p-1",
4464
4451
  profile: "p-6"
4465
4452
  };
4466
- var MenuLabel = (0, import_react20.forwardRef)(({ className, inset, store: _store, ...props }, ref) => {
4453
+ var MenuLabel = (0, import_react19.forwardRef)(({ className, inset, store: _store, ...props }, ref) => {
4467
4454
  return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4468
4455
  "div",
4469
4456
  {
@@ -4474,7 +4461,7 @@ var MenuLabel = (0, import_react20.forwardRef)(({ className, inset, store: _stor
4474
4461
  );
4475
4462
  });
4476
4463
  MenuLabel.displayName = "MenuLabel";
4477
- var DropdownMenuContent = (0, import_react20.forwardRef)(
4464
+ var DropdownMenuContent = (0, import_react19.forwardRef)(
4478
4465
  ({
4479
4466
  className,
4480
4467
  align = "start",
@@ -4487,8 +4474,8 @@ var DropdownMenuContent = (0, import_react20.forwardRef)(
4487
4474
  }, ref) => {
4488
4475
  const store = useDropdownStore(externalStore);
4489
4476
  const open = (0, import_zustand6.useStore)(store, (s) => s.open);
4490
- const [isVisible, setIsVisible] = (0, import_react20.useState)(open);
4491
- (0, import_react20.useEffect)(() => {
4477
+ const [isVisible, setIsVisible] = (0, import_react19.useState)(open);
4478
+ (0, import_react19.useEffect)(() => {
4492
4479
  if (open) {
4493
4480
  setIsVisible(true);
4494
4481
  } else {
@@ -4528,7 +4515,7 @@ var DropdownMenuContent = (0, import_react20.forwardRef)(
4528
4515
  }
4529
4516
  );
4530
4517
  DropdownMenuContent.displayName = "DropdownMenuContent";
4531
- var DropdownMenuItem = (0, import_react20.forwardRef)(
4518
+ var DropdownMenuItem = (0, import_react19.forwardRef)(
4532
4519
  ({
4533
4520
  className,
4534
4521
  size = "small",
@@ -4606,7 +4593,7 @@ var DropdownMenuItem = (0, import_react20.forwardRef)(
4606
4593
  }
4607
4594
  );
4608
4595
  DropdownMenuItem.displayName = "DropdownMenuItem";
4609
- var DropdownMenuSeparator = (0, import_react20.forwardRef)(({ className, store: _store, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4596
+ var DropdownMenuSeparator = (0, import_react19.forwardRef)(({ className, store: _store, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4610
4597
  "div",
4611
4598
  {
4612
4599
  ref,
@@ -4615,7 +4602,7 @@ var DropdownMenuSeparator = (0, import_react20.forwardRef)(({ className, store:
4615
4602
  }
4616
4603
  ));
4617
4604
  DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
4618
- var ProfileMenuTrigger = (0, import_react20.forwardRef)(({ className, onClick, store: externalStore, ...props }, ref) => {
4605
+ var ProfileMenuTrigger = (0, import_react19.forwardRef)(({ className, onClick, store: externalStore, ...props }, ref) => {
4619
4606
  const store = useDropdownStore(externalStore);
4620
4607
  const open = (0, import_zustand6.useStore)(store, (s) => s.open);
4621
4608
  const toggleOpen = () => store.setState({ open: !open });
@@ -4639,7 +4626,7 @@ var ProfileMenuTrigger = (0, import_react20.forwardRef)(({ className, onClick, s
4639
4626
  );
4640
4627
  });
4641
4628
  ProfileMenuTrigger.displayName = "ProfileMenuTrigger";
4642
- var ProfileMenuHeader = (0, import_react20.forwardRef)(({ className, name, email, photoUrl, store: _store, ...props }, ref) => {
4629
+ var ProfileMenuHeader = (0, import_react19.forwardRef)(({ className, name, email, photoUrl, store: _store, ...props }, ref) => {
4643
4630
  return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
4644
4631
  "div",
4645
4632
  {
@@ -4670,9 +4657,9 @@ var ProfileToggleTheme = ({
4670
4657
  ...props
4671
4658
  }) => {
4672
4659
  const { themeMode, setTheme } = useTheme();
4673
- const [modalThemeToggle, setModalThemeToggle] = (0, import_react20.useState)(false);
4674
- const [selectedTheme, setSelectedTheme] = (0, import_react20.useState)(themeMode);
4675
- const internalStoreRef = (0, import_react20.useRef)(null);
4660
+ const [modalThemeToggle, setModalThemeToggle] = (0, import_react19.useState)(false);
4661
+ const [selectedTheme, setSelectedTheme] = (0, import_react19.useState)(themeMode);
4662
+ const internalStoreRef = (0, import_react19.useRef)(null);
4676
4663
  internalStoreRef.current ??= createDropdownStore();
4677
4664
  const store = externalStore ?? internalStoreRef.current;
4678
4665
  const setOpen = (0, import_zustand6.useStore)(store, (s) => s.setOpen);
@@ -4748,7 +4735,7 @@ var ProfileToggleTheme = ({
4748
4735
  ] });
4749
4736
  };
4750
4737
  ProfileToggleTheme.displayName = "ProfileToggleTheme";
4751
- var ProfileMenuSection = (0, import_react20.forwardRef)(({ className, children, store: _store, ...props }, ref) => {
4738
+ var ProfileMenuSection = (0, import_react19.forwardRef)(({ className, children, store: _store, ...props }, ref) => {
4752
4739
  return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { ref, className: cn("flex flex-col p-2", className), ...props, children });
4753
4740
  });
4754
4741
  ProfileMenuSection.displayName = "ProfileMenuSection";
@@ -4808,7 +4795,7 @@ var updateInputValue = (value, ref, onChange) => {
4808
4795
  onChange(event);
4809
4796
  }
4810
4797
  };
4811
- var Search = (0, import_react21.forwardRef)(
4798
+ var Search = (0, import_react20.forwardRef)(
4812
4799
  ({
4813
4800
  options = [],
4814
4801
  onSelect,
@@ -4829,13 +4816,13 @@ var Search = (0, import_react21.forwardRef)(
4829
4816
  onKeyDown: userOnKeyDown,
4830
4817
  ...props
4831
4818
  }, ref) => {
4832
- const [dropdownOpen, setDropdownOpen] = (0, import_react21.useState)(false);
4833
- const [forceClose, setForceClose] = (0, import_react21.useState)(false);
4834
- const justSelectedRef = (0, import_react21.useRef)(false);
4835
- const dropdownStore = (0, import_react21.useRef)(createDropdownStore()).current;
4836
- const dropdownRef = (0, import_react21.useRef)(null);
4837
- const inputElRef = (0, import_react21.useRef)(null);
4838
- const filteredOptions = (0, import_react21.useMemo)(() => {
4819
+ const [dropdownOpen, setDropdownOpen] = (0, import_react20.useState)(false);
4820
+ const [forceClose, setForceClose] = (0, import_react20.useState)(false);
4821
+ const justSelectedRef = (0, import_react20.useRef)(false);
4822
+ const dropdownStore = (0, import_react20.useRef)(createDropdownStore()).current;
4823
+ const dropdownRef = (0, import_react20.useRef)(null);
4824
+ const inputElRef = (0, import_react20.useRef)(null);
4825
+ const filteredOptions = (0, import_react20.useMemo)(() => {
4839
4826
  if (!options.length) {
4840
4827
  return [];
4841
4828
  }
@@ -4848,7 +4835,7 @@ var Search = (0, import_react21.forwardRef)(
4848
4835
  dropdownStore.setState({ open });
4849
4836
  onDropdownChange?.(open);
4850
4837
  };
4851
- (0, import_react21.useEffect)(() => {
4838
+ (0, import_react20.useEffect)(() => {
4852
4839
  if (justSelectedRef.current) {
4853
4840
  justSelectedRef.current = false;
4854
4841
  return;
@@ -4867,7 +4854,7 @@ var Search = (0, import_react21.forwardRef)(
4867
4854
  setOpenAndNotify(false);
4868
4855
  updateInputValue(option, ref, onChange);
4869
4856
  };
4870
- (0, import_react21.useEffect)(() => {
4857
+ (0, import_react20.useEffect)(() => {
4871
4858
  const handleClickOutside = (event) => {
4872
4859
  if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
4873
4860
  setOpenAndNotify(false);
@@ -4880,7 +4867,7 @@ var Search = (0, import_react21.forwardRef)(
4880
4867
  document.removeEventListener("mousedown", handleClickOutside);
4881
4868
  };
4882
4869
  }, [showDropdown, dropdownStore, onDropdownChange]);
4883
- const generatedId = (0, import_react21.useId)();
4870
+ const generatedId = (0, import_react20.useId)();
4884
4871
  const inputId = id ?? `search-${generatedId}`;
4885
4872
  const dropdownId = `${inputId}-dropdown`;
4886
4873
  const handleClear = () => {
@@ -6008,7 +5995,7 @@ var Stepper = ({
6008
5995
  var Stepper_default = Stepper;
6009
5996
 
6010
5997
  // src/components/Calendar/Calendar.tsx
6011
- var import_react22 = require("react");
5998
+ var import_react21 = require("react");
6012
5999
  var import_jsx_runtime36 = require("react/jsx-runtime");
6013
6000
  var WEEK_DAYS = ["SEG", "TER", "QUA", "QUI", "SEX", "S\xC1B", "DOM"];
6014
6001
  var WEEK_DAYS_SHORT = ["S", "T", "Q", "Q", "S", "S", "D"];
@@ -6108,11 +6095,11 @@ var Calendar = ({
6108
6095
  showActivities = true,
6109
6096
  className = ""
6110
6097
  }) => {
6111
- const [currentDate, setCurrentDate] = (0, import_react22.useState)(selectedDate || /* @__PURE__ */ new Date());
6112
- const [isMonthPickerOpen, setIsMonthPickerOpen] = (0, import_react22.useState)(false);
6113
- const monthPickerRef = (0, import_react22.useRef)(null);
6114
- const monthPickerContainerRef = (0, import_react22.useRef)(null);
6115
- (0, import_react22.useEffect)(() => {
6098
+ const [currentDate, setCurrentDate] = (0, import_react21.useState)(selectedDate || /* @__PURE__ */ new Date());
6099
+ const [isMonthPickerOpen, setIsMonthPickerOpen] = (0, import_react21.useState)(false);
6100
+ const monthPickerRef = (0, import_react21.useRef)(null);
6101
+ const monthPickerContainerRef = (0, import_react21.useRef)(null);
6102
+ (0, import_react21.useEffect)(() => {
6116
6103
  const handleClickOutside = (event) => {
6117
6104
  if (monthPickerContainerRef.current && !monthPickerContainerRef.current.contains(event.target)) {
6118
6105
  setIsMonthPickerOpen(false);
@@ -6126,7 +6113,7 @@ var Calendar = ({
6126
6113
  };
6127
6114
  }, [isMonthPickerOpen]);
6128
6115
  const today = /* @__PURE__ */ new Date();
6129
- const availableYears = (0, import_react22.useMemo)(() => {
6116
+ const availableYears = (0, import_react21.useMemo)(() => {
6130
6117
  const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
6131
6118
  const years = [];
6132
6119
  for (let year = currentYear - 10; year <= currentYear + 10; year++) {
@@ -6134,7 +6121,7 @@ var Calendar = ({
6134
6121
  }
6135
6122
  return years;
6136
6123
  }, []);
6137
- const calendarData = (0, import_react22.useMemo)(() => {
6124
+ const calendarData = (0, import_react21.useMemo)(() => {
6138
6125
  const year = currentDate.getFullYear();
6139
6126
  const month = currentDate.getMonth();
6140
6127
  const firstDay = new Date(year, month, 1);
@@ -6505,7 +6492,7 @@ var Calendar = ({
6505
6492
  var Calendar_default = Calendar;
6506
6493
 
6507
6494
  // src/components/AlertDialog/AlertDialog.tsx
6508
- var import_react23 = require("react");
6495
+ var import_react22 = require("react");
6509
6496
  var import_jsx_runtime37 = require("react/jsx-runtime");
6510
6497
  var SIZE_CLASSES11 = {
6511
6498
  "extra-small": "w-screen max-w-[324px]",
@@ -6514,7 +6501,7 @@ var SIZE_CLASSES11 = {
6514
6501
  large: "w-screen max-w-[578px]",
6515
6502
  "extra-large": "w-screen max-w-[912px]"
6516
6503
  };
6517
- var AlertDialog = (0, import_react23.forwardRef)(
6504
+ var AlertDialog = (0, import_react22.forwardRef)(
6518
6505
  ({
6519
6506
  description,
6520
6507
  cancelButtonLabel = "Cancelar",
@@ -6532,7 +6519,7 @@ var AlertDialog = (0, import_react23.forwardRef)(
6532
6519
  size = "medium",
6533
6520
  ...props
6534
6521
  }, ref) => {
6535
- (0, import_react23.useEffect)(() => {
6522
+ (0, import_react22.useEffect)(() => {
6536
6523
  if (!isOpen || !closeOnEscape) return;
6537
6524
  const handleEscape = (event) => {
6538
6525
  if (event.key === "Escape") {
@@ -6542,7 +6529,7 @@ var AlertDialog = (0, import_react23.forwardRef)(
6542
6529
  document.addEventListener("keydown", handleEscape);
6543
6530
  return () => document.removeEventListener("keydown", handleEscape);
6544
6531
  }, [isOpen, closeOnEscape]);
6545
- (0, import_react23.useEffect)(() => {
6532
+ (0, import_react22.useEffect)(() => {
6546
6533
  if (isOpen) {
6547
6534
  document.body.style.overflow = "hidden";
6548
6535
  } else {
@@ -6628,9 +6615,9 @@ var AlertDialog = (0, import_react23.forwardRef)(
6628
6615
  AlertDialog.displayName = "AlertDialog";
6629
6616
 
6630
6617
  // src/components/LoadingModal/loadingModal.tsx
6631
- var import_react24 = require("react");
6618
+ var import_react23 = require("react");
6632
6619
  var import_jsx_runtime38 = require("react/jsx-runtime");
6633
- var LoadingModal = (0, import_react24.forwardRef)(
6620
+ var LoadingModal = (0, import_react23.forwardRef)(
6634
6621
  ({ open, title = "Titulo...", subtitle = "Subtitulo...", ...props }, ref) => {
6635
6622
  if (!open) return null;
6636
6623
  return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
@@ -6684,10 +6671,10 @@ var loadingModal_default = LoadingModal;
6684
6671
 
6685
6672
  // src/components/NotificationCard/NotificationCard.tsx
6686
6673
  var import_phosphor_react19 = require("phosphor-react");
6687
- var import_react27 = require("react");
6674
+ var import_react26 = require("react");
6688
6675
 
6689
6676
  // src/components/Skeleton/Skeleton.tsx
6690
- var import_react25 = require("react");
6677
+ var import_react24 = require("react");
6691
6678
  var import_jsx_runtime39 = require("react/jsx-runtime");
6692
6679
  var SKELETON_ANIMATION_CLASSES = {
6693
6680
  pulse: "animate-pulse",
@@ -6705,7 +6692,7 @@ var SPACING_CLASSES = {
6705
6692
  medium: "space-y-2",
6706
6693
  large: "space-y-3"
6707
6694
  };
6708
- var Skeleton = (0, import_react25.forwardRef)(
6695
+ var Skeleton = (0, import_react24.forwardRef)(
6709
6696
  ({
6710
6697
  variant = "text",
6711
6698
  width,
@@ -6754,13 +6741,13 @@ var Skeleton = (0, import_react25.forwardRef)(
6754
6741
  );
6755
6742
  }
6756
6743
  );
6757
- var SkeletonText = (0, import_react25.forwardRef)(
6744
+ var SkeletonText = (0, import_react24.forwardRef)(
6758
6745
  (props, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Skeleton, { ref, variant: "text", ...props })
6759
6746
  );
6760
- var SkeletonCircle = (0, import_react25.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Skeleton, { ref, variant: "circular", ...props }));
6761
- var SkeletonRectangle = (0, import_react25.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Skeleton, { ref, variant: "rectangular", ...props }));
6762
- var SkeletonRounded = (0, import_react25.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Skeleton, { ref, variant: "rounded", ...props }));
6763
- var SkeletonCard = (0, import_react25.forwardRef)(
6747
+ var SkeletonCircle = (0, import_react24.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Skeleton, { ref, variant: "circular", ...props }));
6748
+ var SkeletonRectangle = (0, import_react24.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Skeleton, { ref, variant: "rectangular", ...props }));
6749
+ var SkeletonRounded = (0, import_react24.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Skeleton, { ref, variant: "rounded", ...props }));
6750
+ var SkeletonCard = (0, import_react24.forwardRef)(
6764
6751
  ({
6765
6752
  showAvatar = true,
6766
6753
  showTitle = true,
@@ -6796,7 +6783,7 @@ var SkeletonCard = (0, import_react25.forwardRef)(
6796
6783
  );
6797
6784
  }
6798
6785
  );
6799
- var SkeletonList = (0, import_react25.forwardRef)(
6786
+ var SkeletonList = (0, import_react24.forwardRef)(
6800
6787
  ({
6801
6788
  items = 3,
6802
6789
  showAvatar = true,
@@ -6815,7 +6802,7 @@ var SkeletonList = (0, import_react25.forwardRef)(
6815
6802
  ] }, index)) });
6816
6803
  }
6817
6804
  );
6818
- var SkeletonTable = (0, import_react25.forwardRef)(
6805
+ var SkeletonTable = (0, import_react24.forwardRef)(
6819
6806
  ({ rows = 5, columns = 4, showHeader = true, className = "", ...props }, ref) => {
6820
6807
  return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { ref, className: cn("w-full", className), ...props, children: [
6821
6808
  showHeader && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex space-x-2 mb-3", children: Array.from({ length: columns }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
@@ -6839,7 +6826,7 @@ var SkeletonTable = (0, import_react25.forwardRef)(
6839
6826
  );
6840
6827
 
6841
6828
  // src/hooks/useMobile.ts
6842
- var import_react26 = require("react");
6829
+ var import_react25 = require("react");
6843
6830
  var MOBILE_WIDTH = 500;
6844
6831
  var TABLET_WIDTH = 931;
6845
6832
  var SMALL_MOBILE_WIDTH = 425;
@@ -6858,13 +6845,13 @@ var getDeviceType = () => {
6858
6845
  return width < TABLET_WIDTH ? "responsive" : "desktop";
6859
6846
  };
6860
6847
  var useMobile = () => {
6861
- const [isMobile, setIsMobile] = (0, import_react26.useState)(false);
6862
- const [isTablet, setIsTablet] = (0, import_react26.useState)(false);
6863
- const [isSmallMobile, setIsSmallMobile] = (0, import_react26.useState)(false);
6864
- const [isExtraSmallMobile, setIsExtraSmallMobile] = (0, import_react26.useState)(false);
6865
- const [isUltraSmallMobile, setIsUltraSmallMobile] = (0, import_react26.useState)(false);
6866
- const [isTinyMobile, setIsTinyMobile] = (0, import_react26.useState)(false);
6867
- (0, import_react26.useEffect)(() => {
6848
+ const [isMobile, setIsMobile] = (0, import_react25.useState)(false);
6849
+ const [isTablet, setIsTablet] = (0, import_react25.useState)(false);
6850
+ const [isSmallMobile, setIsSmallMobile] = (0, import_react25.useState)(false);
6851
+ const [isExtraSmallMobile, setIsExtraSmallMobile] = (0, import_react25.useState)(false);
6852
+ const [isUltraSmallMobile, setIsUltraSmallMobile] = (0, import_react25.useState)(false);
6853
+ const [isTinyMobile, setIsTinyMobile] = (0, import_react25.useState)(false);
6854
+ (0, import_react25.useEffect)(() => {
6868
6855
  const checkScreenSize = () => {
6869
6856
  const width = getWindowWidth();
6870
6857
  setIsMobile(width < MOBILE_WIDTH);
@@ -7297,7 +7284,7 @@ var NotificationList = ({
7297
7284
  className,
7298
7285
  emptyStateImage
7299
7286
  }) => {
7300
- const [globalNotificationModal, setGlobalNotificationModal] = (0, import_react27.useState)({ isOpen: false, notification: null });
7287
+ const [globalNotificationModal, setGlobalNotificationModal] = (0, import_react26.useState)({ isOpen: false, notification: null });
7301
7288
  const handleGlobalNotificationClick = (notification) => {
7302
7289
  if (onGlobalNotificationClick) {
7303
7290
  onGlobalNotificationClick(notification);
@@ -7411,8 +7398,8 @@ var NotificationCenter = ({
7411
7398
  className
7412
7399
  }) => {
7413
7400
  const { isMobile } = useMobile();
7414
- const [isModalOpen, setIsModalOpen] = (0, import_react27.useState)(false);
7415
- const [globalNotificationModal, setGlobalNotificationModal] = (0, import_react27.useState)({ isOpen: false, notification: null });
7401
+ const [isModalOpen, setIsModalOpen] = (0, import_react26.useState)(false);
7402
+ const [globalNotificationModal, setGlobalNotificationModal] = (0, import_react26.useState)({ isOpen: false, notification: null });
7416
7403
  const handleMobileClick = () => {
7417
7404
  setIsModalOpen(true);
7418
7405
  onFetchNotifications?.();
@@ -7427,7 +7414,7 @@ var NotificationCenter = ({
7427
7414
  onToggleActive?.();
7428
7415
  }
7429
7416
  };
7430
- (0, import_react27.useEffect)(() => {
7417
+ (0, import_react26.useEffect)(() => {
7431
7418
  if (isActive) {
7432
7419
  onFetchNotifications?.();
7433
7420
  }
@@ -7960,7 +7947,7 @@ var createUseNotificationStore = (apiClient) => {
7960
7947
  };
7961
7948
 
7962
7949
  // src/hooks/useNotifications.ts
7963
- var import_react28 = require("react");
7950
+ var import_react27 = require("react");
7964
7951
  var createUseNotifications = (apiClient) => {
7965
7952
  const useNotificationStore = createUseNotificationStore(apiClient);
7966
7953
  return () => {
@@ -7979,7 +7966,7 @@ var createUseNotifications = (apiClient) => {
7979
7966
  resetError,
7980
7967
  getGroupedNotifications
7981
7968
  } = useNotificationStore();
7982
- const handleNavigate = (0, import_react28.useCallback)(
7969
+ const handleNavigate = (0, import_react27.useCallback)(
7983
7970
  (entityType, entityId, onAfterNavigate) => {
7984
7971
  if (entityType && entityId) {
7985
7972
  switch (entityType.toUpperCase()) {
@@ -7997,7 +7984,7 @@ var createUseNotifications = (apiClient) => {
7997
7984
  },
7998
7985
  []
7999
7986
  );
8000
- const getActionLabel = (0, import_react28.useCallback)(
7987
+ const getActionLabel = (0, import_react27.useCallback)(
8001
7988
  (entityType) => {
8002
7989
  if (!entityType) return "Ver mais";
8003
7990
  switch (entityType.toUpperCase()) {
@@ -8011,7 +7998,7 @@ var createUseNotifications = (apiClient) => {
8011
7998
  },
8012
7999
  []
8013
8000
  );
8014
- const markAsReadAndNavigate = (0, import_react28.useCallback)(
8001
+ const markAsReadAndNavigate = (0, import_react27.useCallback)(
8015
8002
  async (id, entityType, entityId, onAfterNavigate) => {
8016
8003
  await markAsRead(id);
8017
8004
  if (entityType && entityId) {
@@ -8020,11 +8007,11 @@ var createUseNotifications = (apiClient) => {
8020
8007
  },
8021
8008
  [markAsRead, handleNavigate]
8022
8009
  );
8023
- const refreshNotifications = (0, import_react28.useCallback)(async () => {
8010
+ const refreshNotifications = (0, import_react27.useCallback)(async () => {
8024
8011
  resetError();
8025
8012
  await fetchNotifications();
8026
8013
  }, [resetError, fetchNotifications]);
8027
- const formatNotification = (0, import_react28.useCallback)(
8014
+ const formatNotification = (0, import_react27.useCallback)(
8028
8015
  (notification) => ({
8029
8016
  ...notification,
8030
8017
  time: formatTimeAgo(notification.createdAt),
@@ -8033,7 +8020,7 @@ var createUseNotifications = (apiClient) => {
8033
8020
  }),
8034
8021
  []
8035
8022
  );
8036
- const getFormattedGroupedNotifications = (0, import_react28.useCallback)(() => {
8023
+ const getFormattedGroupedNotifications = (0, import_react27.useCallback)(() => {
8037
8024
  const groups = getGroupedNotifications();
8038
8025
  return groups.map((group) => ({
8039
8026
  ...group,
@@ -8213,10 +8200,10 @@ var FilterModal = ({
8213
8200
  };
8214
8201
 
8215
8202
  // src/components/Filter/useTableFilter.ts
8216
- var import_react29 = require("react");
8203
+ var import_react28 = require("react");
8217
8204
  var useTableFilter = (initialConfigs, options = {}) => {
8218
8205
  const { syncWithUrl = false } = options;
8219
- const getInitialState = (0, import_react29.useCallback)(() => {
8206
+ const getInitialState = (0, import_react28.useCallback)(() => {
8220
8207
  if (!syncWithUrl || globalThis.window === void 0) {
8221
8208
  return initialConfigs;
8222
8209
  }
@@ -8234,8 +8221,8 @@ var useTableFilter = (initialConfigs, options = {}) => {
8234
8221
  }));
8235
8222
  return configsWithUrlState;
8236
8223
  }, [initialConfigs, syncWithUrl]);
8237
- const [filterConfigs, setFilterConfigs] = (0, import_react29.useState)(getInitialState);
8238
- const activeFilters = (0, import_react29.useMemo)(() => {
8224
+ const [filterConfigs, setFilterConfigs] = (0, import_react28.useState)(getInitialState);
8225
+ const activeFilters = (0, import_react28.useMemo)(() => {
8239
8226
  const filters = {};
8240
8227
  for (const config of filterConfigs) {
8241
8228
  for (const category of config.categories) {
@@ -8247,10 +8234,10 @@ var useTableFilter = (initialConfigs, options = {}) => {
8247
8234
  return filters;
8248
8235
  }, [filterConfigs]);
8249
8236
  const hasActiveFilters = Object.keys(activeFilters).length > 0;
8250
- const updateFilters = (0, import_react29.useCallback)((configs) => {
8237
+ const updateFilters = (0, import_react28.useCallback)((configs) => {
8251
8238
  setFilterConfigs(configs);
8252
8239
  }, []);
8253
- const applyFilters = (0, import_react29.useCallback)(() => {
8240
+ const applyFilters = (0, import_react28.useCallback)(() => {
8254
8241
  if (!syncWithUrl || globalThis.window === void 0) {
8255
8242
  return;
8256
8243
  }
@@ -8268,7 +8255,7 @@ var useTableFilter = (initialConfigs, options = {}) => {
8268
8255
  }
8269
8256
  globalThis.window.history.replaceState({}, "", url.toString());
8270
8257
  }, [filterConfigs, syncWithUrl]);
8271
- const clearFilters = (0, import_react29.useCallback)(() => {
8258
+ const clearFilters = (0, import_react28.useCallback)(() => {
8272
8259
  const clearedConfigs = filterConfigs.map((config) => ({
8273
8260
  ...config,
8274
8261
  categories: config.categories.map((category) => ({
@@ -8288,7 +8275,7 @@ var useTableFilter = (initialConfigs, options = {}) => {
8288
8275
  globalThis.window.history.replaceState({}, "", url.toString());
8289
8276
  }
8290
8277
  }, [filterConfigs, syncWithUrl]);
8291
- (0, import_react29.useEffect)(() => {
8278
+ (0, import_react28.useEffect)(() => {
8292
8279
  if (!syncWithUrl || globalThis.window === void 0) {
8293
8280
  return;
8294
8281
  }
@@ -8310,7 +8297,7 @@ var useTableFilter = (initialConfigs, options = {}) => {
8310
8297
 
8311
8298
  // src/components/Select/Select.tsx
8312
8299
  var import_zustand8 = require("zustand");
8313
- var import_react30 = require("react");
8300
+ var import_react29 = require("react");
8314
8301
  var import_phosphor_react21 = require("phosphor-react");
8315
8302
  var import_jsx_runtime49 = require("react/jsx-runtime");
8316
8303
  var VARIANT_CLASSES4 = {
@@ -8370,13 +8357,13 @@ function getLabelAsNode(children) {
8370
8357
  if (typeof children === "string" || typeof children === "number") {
8371
8358
  return children;
8372
8359
  }
8373
- const flattened = import_react30.Children.toArray(children);
8360
+ const flattened = import_react29.Children.toArray(children);
8374
8361
  if (flattened.length === 1) return flattened[0];
8375
8362
  return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_jsx_runtime49.Fragment, { children: flattened });
8376
8363
  }
8377
8364
  var injectStore4 = (children, store, size, selectId) => {
8378
- return import_react30.Children.map(children, (child) => {
8379
- if ((0, import_react30.isValidElement)(child)) {
8365
+ return import_react29.Children.map(children, (child) => {
8366
+ if ((0, import_react29.isValidElement)(child)) {
8380
8367
  const typedChild = child;
8381
8368
  const newProps = {
8382
8369
  store
@@ -8393,7 +8380,7 @@ var injectStore4 = (children, store, size, selectId) => {
8393
8380
  selectId
8394
8381
  );
8395
8382
  }
8396
- return (0, import_react30.cloneElement)(typedChild, newProps);
8383
+ return (0, import_react29.cloneElement)(typedChild, newProps);
8397
8384
  }
8398
8385
  return child;
8399
8386
  });
@@ -8410,18 +8397,18 @@ var Select = ({
8410
8397
  errorMessage,
8411
8398
  id
8412
8399
  }) => {
8413
- const storeRef = (0, import_react30.useRef)(null);
8400
+ const storeRef = (0, import_react29.useRef)(null);
8414
8401
  storeRef.current ??= createSelectStore(onValueChange);
8415
8402
  const store = storeRef.current;
8416
- const selectRef = (0, import_react30.useRef)(null);
8403
+ const selectRef = (0, import_react29.useRef)(null);
8417
8404
  const { open, setOpen, setValue, selectedLabel } = (0, import_zustand8.useStore)(store, (s) => s);
8418
- const generatedId = (0, import_react30.useId)();
8405
+ const generatedId = (0, import_react29.useId)();
8419
8406
  const selectId = id ?? `select-${generatedId}`;
8420
8407
  const findLabelForValue = (children2, targetValue) => {
8421
8408
  let found = null;
8422
8409
  const search = (nodes) => {
8423
- import_react30.Children.forEach(nodes, (child) => {
8424
- if (!(0, import_react30.isValidElement)(child)) return;
8410
+ import_react29.Children.forEach(nodes, (child) => {
8411
+ if (!(0, import_react29.isValidElement)(child)) return;
8425
8412
  const typedChild = child;
8426
8413
  if (typedChild.type === SelectItem && typedChild.props.value === targetValue) {
8427
8414
  if (typeof typedChild.props.children === "string")
@@ -8434,13 +8421,13 @@ var Select = ({
8434
8421
  search(children2);
8435
8422
  return found;
8436
8423
  };
8437
- (0, import_react30.useEffect)(() => {
8424
+ (0, import_react29.useEffect)(() => {
8438
8425
  if (!selectedLabel && defaultValue) {
8439
8426
  const label2 = findLabelForValue(children, defaultValue);
8440
8427
  if (label2) store.setState({ selectedLabel: label2 });
8441
8428
  }
8442
8429
  }, [children, defaultValue, selectedLabel]);
8443
- (0, import_react30.useEffect)(() => {
8430
+ (0, import_react29.useEffect)(() => {
8444
8431
  const handleClickOutside = (event) => {
8445
8432
  if (selectRef.current && !selectRef.current.contains(event.target)) {
8446
8433
  setOpen(false);
@@ -8475,7 +8462,7 @@ var Select = ({
8475
8462
  document.removeEventListener("keydown", handleArrowKeys);
8476
8463
  };
8477
8464
  }, [open]);
8478
- (0, import_react30.useEffect)(() => {
8465
+ (0, import_react29.useEffect)(() => {
8479
8466
  if (propValue) {
8480
8467
  setValue(propValue);
8481
8468
  const label2 = findLabelForValue(children, propValue);
@@ -8512,7 +8499,7 @@ var SelectValue = ({
8512
8499
  const value = (0, import_zustand8.useStore)(store, (s) => s.value);
8513
8500
  return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "text-inherit flex gap-2 items-center", children: selectedLabel || placeholder || value });
8514
8501
  };
8515
- var SelectTrigger = (0, import_react30.forwardRef)(
8502
+ var SelectTrigger = (0, import_react29.forwardRef)(
8516
8503
  ({
8517
8504
  className,
8518
8505
  invalid = false,
@@ -8566,7 +8553,7 @@ var SelectTrigger = (0, import_react30.forwardRef)(
8566
8553
  }
8567
8554
  );
8568
8555
  SelectTrigger.displayName = "SelectTrigger";
8569
- var SelectContent = (0, import_react30.forwardRef)(
8556
+ var SelectContent = (0, import_react29.forwardRef)(
8570
8557
  ({
8571
8558
  children,
8572
8559
  className,
@@ -8596,7 +8583,7 @@ var SelectContent = (0, import_react30.forwardRef)(
8596
8583
  }
8597
8584
  );
8598
8585
  SelectContent.displayName = "SelectContent";
8599
- var SelectItem = (0, import_react30.forwardRef)(
8586
+ var SelectItem = (0, import_react29.forwardRef)(
8600
8587
  ({
8601
8588
  className,
8602
8589
  children,
@@ -8655,7 +8642,7 @@ var Select_default = Select;
8655
8642
 
8656
8643
  // src/components/Menu/Menu.tsx
8657
8644
  var import_zustand9 = require("zustand");
8658
- var import_react31 = require("react");
8645
+ var import_react30 = require("react");
8659
8646
  var import_phosphor_react22 = require("phosphor-react");
8660
8647
  var import_jsx_runtime50 = require("react/jsx-runtime");
8661
8648
  var createMenuStore = (onValueChange) => (0, import_zustand9.create)((set) => ({
@@ -8676,7 +8663,7 @@ var VARIANT_CLASSES5 = {
8676
8663
  "menu-overflow": "",
8677
8664
  breadcrumb: "bg-transparent shadow-none !px-0"
8678
8665
  };
8679
- var Menu = (0, import_react31.forwardRef)(
8666
+ var Menu = (0, import_react30.forwardRef)(
8680
8667
  ({
8681
8668
  className,
8682
8669
  children,
@@ -8686,11 +8673,11 @@ var Menu = (0, import_react31.forwardRef)(
8686
8673
  onValueChange,
8687
8674
  ...props
8688
8675
  }, ref) => {
8689
- const storeRef = (0, import_react31.useRef)(null);
8676
+ const storeRef = (0, import_react30.useRef)(null);
8690
8677
  storeRef.current ??= createMenuStore(onValueChange);
8691
8678
  const store = storeRef.current;
8692
8679
  const { setValue } = (0, import_zustand9.useStore)(store, (s) => s);
8693
- (0, import_react31.useEffect)(() => {
8680
+ (0, import_react30.useEffect)(() => {
8694
8681
  setValue(propValue ?? defaultValue);
8695
8682
  }, [defaultValue, propValue, setValue]);
8696
8683
  const baseClasses = variant === "menu-overflow" ? "w-fit py-2 flex flex-row items-center justify-center" : "w-full py-2 flex flex-row items-center justify-center";
@@ -8711,7 +8698,7 @@ var Menu = (0, import_react31.forwardRef)(
8711
8698
  }
8712
8699
  );
8713
8700
  Menu.displayName = "Menu";
8714
- var MenuContent = (0, import_react31.forwardRef)(
8701
+ var MenuContent = (0, import_react30.forwardRef)(
8715
8702
  ({ className, children, variant = "menu", ...props }, ref) => {
8716
8703
  const baseClasses = "w-full flex flex-row items-center gap-2";
8717
8704
  const variantClasses = variant === "menu2" || variant === "menu-overflow" ? "overflow-x-auto scroll-smooth" : "";
@@ -8733,7 +8720,7 @@ var MenuContent = (0, import_react31.forwardRef)(
8733
8720
  }
8734
8721
  );
8735
8722
  MenuContent.displayName = "MenuContent";
8736
- var MenuItem = (0, import_react31.forwardRef)(
8723
+ var MenuItem = (0, import_react30.forwardRef)(
8737
8724
  ({
8738
8725
  className,
8739
8726
  children,
@@ -8891,10 +8878,10 @@ var MenuOverflow = ({
8891
8878
  onValueChange,
8892
8879
  ...props
8893
8880
  }) => {
8894
- const containerRef = (0, import_react31.useRef)(null);
8895
- const [showLeftArrow, setShowLeftArrow] = (0, import_react31.useState)(false);
8896
- const [showRightArrow, setShowRightArrow] = (0, import_react31.useState)(false);
8897
- (0, import_react31.useEffect)(() => {
8881
+ const containerRef = (0, import_react30.useRef)(null);
8882
+ const [showLeftArrow, setShowLeftArrow] = (0, import_react30.useState)(false);
8883
+ const [showRightArrow, setShowRightArrow] = (0, import_react30.useState)(false);
8884
+ (0, import_react30.useEffect)(() => {
8898
8885
  const checkScroll = () => internalCheckScroll(
8899
8886
  containerRef.current,
8900
8887
  setShowLeftArrow,
@@ -8954,11 +8941,11 @@ var MenuOverflow = ({
8954
8941
  }
8955
8942
  );
8956
8943
  };
8957
- var injectStore5 = (children, store) => import_react31.Children.map(children, (child) => {
8958
- if (!(0, import_react31.isValidElement)(child)) return child;
8944
+ var injectStore5 = (children, store) => import_react30.Children.map(children, (child) => {
8945
+ if (!(0, import_react30.isValidElement)(child)) return child;
8959
8946
  const typedChild = child;
8960
8947
  const shouldInject = typedChild.type === MenuItem;
8961
- return (0, import_react31.cloneElement)(typedChild, {
8948
+ return (0, import_react30.cloneElement)(typedChild, {
8962
8949
  ...shouldInject ? { store } : {},
8963
8950
  ...typedChild.props.children ? { children: injectStore5(typedChild.props.children, store) } : {}
8964
8951
  });
@@ -8966,11 +8953,11 @@ var injectStore5 = (children, store) => import_react31.Children.map(children, (c
8966
8953
  var Menu_default = Menu;
8967
8954
 
8968
8955
  // src/components/Card/Card.tsx
8969
- var import_react33 = require("react");
8956
+ var import_react32 = require("react");
8970
8957
  var import_phosphor_react23 = require("phosphor-react");
8971
8958
 
8972
8959
  // src/components/IconRender/IconRender.tsx
8973
- var import_react32 = require("react");
8960
+ var import_react31 = require("react");
8974
8961
  var PhosphorIcons = __toESM(require("phosphor-react"));
8975
8962
  var import_jsx_runtime51 = require("react/jsx-runtime");
8976
8963
  var IconRender = ({
@@ -8993,7 +8980,7 @@ var IconRender = ({
8993
8980
  }
8994
8981
  }
8995
8982
  } else {
8996
- return (0, import_react32.cloneElement)(iconName, {
8983
+ return (0, import_react31.cloneElement)(iconName, {
8997
8984
  size,
8998
8985
  color: "currentColor"
8999
8986
  });
@@ -9028,7 +9015,7 @@ var CARD_CURSOR_CLASSES = {
9028
9015
  default: "",
9029
9016
  pointer: "cursor-pointer"
9030
9017
  };
9031
- var CardBase = (0, import_react33.forwardRef)(
9018
+ var CardBase = (0, import_react32.forwardRef)(
9032
9019
  ({
9033
9020
  children,
9034
9021
  variant = "default",
@@ -9086,7 +9073,7 @@ var ACTION_HEADER_CLASSES = {
9086
9073
  error: "text-error-300",
9087
9074
  info: "text-info-300"
9088
9075
  };
9089
- var CardActivitiesResults = (0, import_react33.forwardRef)(
9076
+ var CardActivitiesResults = (0, import_react32.forwardRef)(
9090
9077
  ({
9091
9078
  icon,
9092
9079
  title,
@@ -9168,7 +9155,7 @@ var CardActivitiesResults = (0, import_react33.forwardRef)(
9168
9155
  );
9169
9156
  }
9170
9157
  );
9171
- var CardQuestions = (0, import_react33.forwardRef)(
9158
+ var CardQuestions = (0, import_react32.forwardRef)(
9172
9159
  ({
9173
9160
  header,
9174
9161
  state = "undone",
@@ -9216,7 +9203,7 @@ var CardQuestions = (0, import_react33.forwardRef)(
9216
9203
  );
9217
9204
  }
9218
9205
  );
9219
- var CardProgress = (0, import_react33.forwardRef)(
9206
+ var CardProgress = (0, import_react32.forwardRef)(
9220
9207
  ({
9221
9208
  header,
9222
9209
  subhead,
@@ -9314,7 +9301,7 @@ var CardProgress = (0, import_react33.forwardRef)(
9314
9301
  );
9315
9302
  }
9316
9303
  );
9317
- var CardTopic = (0, import_react33.forwardRef)(
9304
+ var CardTopic = (0, import_react32.forwardRef)(
9318
9305
  ({
9319
9306
  header,
9320
9307
  subHead,
@@ -9335,7 +9322,7 @@ var CardTopic = (0, import_react33.forwardRef)(
9335
9322
  className: cn("justify-center gap-2 py-2 px-4", className),
9336
9323
  ...props,
9337
9324
  children: [
9338
- subHead && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "text-text-600 text-2xs flex flex-row gap-1", children: subHead.map((text, index) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_react33.Fragment, { children: [
9325
+ subHead && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "text-text-600 text-2xs flex flex-row gap-1", children: subHead.map((text, index) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_react32.Fragment, { children: [
9339
9326
  /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { children: text }),
9340
9327
  index < subHead.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { children: "\u2022" })
9341
9328
  ] }, `${text} - ${index}`)) }),
@@ -9370,7 +9357,7 @@ var CardTopic = (0, import_react33.forwardRef)(
9370
9357
  );
9371
9358
  }
9372
9359
  );
9373
- var CardPerformance = (0, import_react33.forwardRef)(
9360
+ var CardPerformance = (0, import_react32.forwardRef)(
9374
9361
  ({
9375
9362
  header,
9376
9363
  progress,
@@ -9433,7 +9420,7 @@ var CardPerformance = (0, import_react33.forwardRef)(
9433
9420
  );
9434
9421
  }
9435
9422
  );
9436
- var CardResults = (0, import_react33.forwardRef)(
9423
+ var CardResults = (0, import_react32.forwardRef)(
9437
9424
  ({
9438
9425
  header,
9439
9426
  correct_answers,
@@ -9515,7 +9502,7 @@ var CardResults = (0, import_react33.forwardRef)(
9515
9502
  );
9516
9503
  }
9517
9504
  );
9518
- var CardStatus = (0, import_react33.forwardRef)(
9505
+ var CardStatus = (0, import_react32.forwardRef)(
9519
9506
  ({ header, className, status, label, ...props }, ref) => {
9520
9507
  const getLabelBadge = (status2) => {
9521
9508
  switch (status2) {
@@ -9585,7 +9572,7 @@ var CardStatus = (0, import_react33.forwardRef)(
9585
9572
  );
9586
9573
  }
9587
9574
  );
9588
- var CardSettings = (0, import_react33.forwardRef)(
9575
+ var CardSettings = (0, import_react32.forwardRef)(
9589
9576
  ({ header, className, icon, ...props }, ref) => {
9590
9577
  return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
9591
9578
  CardBase,
@@ -9608,7 +9595,7 @@ var CardSettings = (0, import_react33.forwardRef)(
9608
9595
  );
9609
9596
  }
9610
9597
  );
9611
- var CardSupport = (0, import_react33.forwardRef)(
9598
+ var CardSupport = (0, import_react32.forwardRef)(
9612
9599
  ({ header, className, direction = "col", children, ...props }, ref) => {
9613
9600
  return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
9614
9601
  CardBase,
@@ -9642,7 +9629,7 @@ var CardSupport = (0, import_react33.forwardRef)(
9642
9629
  );
9643
9630
  }
9644
9631
  );
9645
- var CardForum = (0, import_react33.forwardRef)(
9632
+ var CardForum = (0, import_react32.forwardRef)(
9646
9633
  ({
9647
9634
  title,
9648
9635
  content,
@@ -9709,7 +9696,7 @@ var CardForum = (0, import_react33.forwardRef)(
9709
9696
  );
9710
9697
  }
9711
9698
  );
9712
- var CardAudio = (0, import_react33.forwardRef)(
9699
+ var CardAudio = (0, import_react32.forwardRef)(
9713
9700
  ({
9714
9701
  src,
9715
9702
  title,
@@ -9723,16 +9710,16 @@ var CardAudio = (0, import_react33.forwardRef)(
9723
9710
  className,
9724
9711
  ...props
9725
9712
  }, ref) => {
9726
- const [isPlaying, setIsPlaying] = (0, import_react33.useState)(false);
9727
- const [currentTime, setCurrentTime] = (0, import_react33.useState)(0);
9728
- const [duration, setDuration] = (0, import_react33.useState)(0);
9729
- const [volume, setVolume] = (0, import_react33.useState)(1);
9730
- const [showVolumeControl, setShowVolumeControl] = (0, import_react33.useState)(false);
9731
- const [showSpeedMenu, setShowSpeedMenu] = (0, import_react33.useState)(false);
9732
- const [playbackRate, setPlaybackRate] = (0, import_react33.useState)(1);
9733
- const audioRef = (0, import_react33.useRef)(null);
9734
- const volumeControlRef = (0, import_react33.useRef)(null);
9735
- const speedMenuRef = (0, import_react33.useRef)(null);
9713
+ const [isPlaying, setIsPlaying] = (0, import_react32.useState)(false);
9714
+ const [currentTime, setCurrentTime] = (0, import_react32.useState)(0);
9715
+ const [duration, setDuration] = (0, import_react32.useState)(0);
9716
+ const [volume, setVolume] = (0, import_react32.useState)(1);
9717
+ const [showVolumeControl, setShowVolumeControl] = (0, import_react32.useState)(false);
9718
+ const [showSpeedMenu, setShowSpeedMenu] = (0, import_react32.useState)(false);
9719
+ const [playbackRate, setPlaybackRate] = (0, import_react32.useState)(1);
9720
+ const audioRef = (0, import_react32.useRef)(null);
9721
+ const volumeControlRef = (0, import_react32.useRef)(null);
9722
+ const speedMenuRef = (0, import_react32.useRef)(null);
9736
9723
  const formatTime2 = (time) => {
9737
9724
  const minutes = Math.floor(time / 60);
9738
9725
  const seconds = Math.floor(time % 60);
@@ -9806,7 +9793,7 @@ var CardAudio = (0, import_react33.forwardRef)(
9806
9793
  }
9807
9794
  return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_phosphor_react23.SpeakerHigh, { size: 24 });
9808
9795
  };
9809
- (0, import_react33.useEffect)(() => {
9796
+ (0, import_react32.useEffect)(() => {
9810
9797
  const handleClickOutside = (event) => {
9811
9798
  if (volumeControlRef.current && !volumeControlRef.current.contains(event.target)) {
9812
9799
  setShowVolumeControl(false);
@@ -10010,7 +9997,7 @@ var SIMULADO_BACKGROUND_CLASSES = {
10010
9997
  simuladao: "bg-exam-3",
10011
9998
  vestibular: "bg-exam-4"
10012
9999
  };
10013
- var CardSimulado = (0, import_react33.forwardRef)(
10000
+ var CardSimulado = (0, import_react32.forwardRef)(
10014
10001
  ({ title, duration, info, backgroundColor, className, ...props }, ref) => {
10015
10002
  const backgroundClass = SIMULADO_BACKGROUND_CLASSES[backgroundColor];
10016
10003
  return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
@@ -10050,7 +10037,7 @@ var CardSimulado = (0, import_react33.forwardRef)(
10050
10037
  );
10051
10038
  }
10052
10039
  );
10053
- var CardTest = (0, import_react33.forwardRef)(
10040
+ var CardTest = (0, import_react32.forwardRef)(
10054
10041
  ({
10055
10042
  title,
10056
10043
  duration,
@@ -10193,7 +10180,7 @@ var SIMULATION_TYPE_STYLES = {
10193
10180
  text: "Vestibular"
10194
10181
  }
10195
10182
  };
10196
- var CardSimulationHistory = (0, import_react33.forwardRef)(({ data, onSimulationClick, className, ...props }, ref) => {
10183
+ var CardSimulationHistory = (0, import_react32.forwardRef)(({ data, onSimulationClick, className, ...props }, ref) => {
10197
10184
  return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
10198
10185
  "div",
10199
10186
  {
@@ -10530,12 +10517,12 @@ var NotFound = ({
10530
10517
  var NotFound_default = NotFound;
10531
10518
 
10532
10519
  // src/components/VideoPlayer/VideoPlayer.tsx
10533
- var import_react35 = require("react");
10520
+ var import_react34 = require("react");
10534
10521
  var import_react_dom = require("react-dom");
10535
10522
  var import_phosphor_react26 = require("phosphor-react");
10536
10523
 
10537
10524
  // src/components/DownloadButton/DownloadButton.tsx
10538
- var import_react34 = require("react");
10525
+ var import_react33 = require("react");
10539
10526
  var import_phosphor_react25 = require("phosphor-react");
10540
10527
  var import_jsx_runtime55 = require("react/jsx-runtime");
10541
10528
  var getMimeType = (url) => {
@@ -10612,13 +10599,13 @@ var DownloadButton = ({
10612
10599
  lessonTitle = "aula",
10613
10600
  disabled = false
10614
10601
  }) => {
10615
- const [isDownloading, setIsDownloading] = (0, import_react34.useState)(false);
10616
- const isValidUrl = (0, import_react34.useCallback)((url) => {
10602
+ const [isDownloading, setIsDownloading] = (0, import_react33.useState)(false);
10603
+ const isValidUrl = (0, import_react33.useCallback)((url) => {
10617
10604
  return Boolean(
10618
10605
  url && url.trim() !== "" && url !== "undefined" && url !== "null"
10619
10606
  );
10620
10607
  }, []);
10621
- const getAvailableContent = (0, import_react34.useCallback)(() => {
10608
+ const getAvailableContent = (0, import_react33.useCallback)(() => {
10622
10609
  const downloads = [];
10623
10610
  if (isValidUrl(content.urlDoc)) {
10624
10611
  downloads.push({
@@ -10653,7 +10640,7 @@ var DownloadButton = ({
10653
10640
  }
10654
10641
  return downloads;
10655
10642
  }, [content, isValidUrl]);
10656
- const handleDownload = (0, import_react34.useCallback)(async () => {
10643
+ const handleDownload = (0, import_react33.useCallback)(async () => {
10657
10644
  if (disabled || isDownloading) return;
10658
10645
  const availableContent = getAvailableContent();
10659
10646
  if (availableContent.length === 0) {
@@ -10791,9 +10778,9 @@ var SpeedMenu = ({
10791
10778
  iconSize = 24,
10792
10779
  isTinyMobile = false
10793
10780
  }) => {
10794
- const buttonRef = (0, import_react35.useRef)(null);
10795
- const speedMenuContainerRef = (0, import_react35.useRef)(null);
10796
- const speedMenuRef = (0, import_react35.useRef)(null);
10781
+ const buttonRef = (0, import_react34.useRef)(null);
10782
+ const speedMenuContainerRef = (0, import_react34.useRef)(null);
10783
+ const speedMenuRef = (0, import_react34.useRef)(null);
10797
10784
  const getMenuPosition = () => {
10798
10785
  if (!buttonRef.current) return { top: 0, left: 0 };
10799
10786
  const rect = buttonRef.current.getBoundingClientRect();
@@ -10807,7 +10794,7 @@ var SpeedMenu = ({
10807
10794
  };
10808
10795
  };
10809
10796
  const position = getMenuPosition();
10810
- (0, import_react35.useEffect)(() => {
10797
+ (0, import_react34.useEffect)(() => {
10811
10798
  const handleClickOutside = (event) => {
10812
10799
  const target = event.target;
10813
10800
  const isOutsideContainer = speedMenuContainerRef.current && !speedMenuContainerRef.current.contains(target);
@@ -10886,28 +10873,28 @@ var VideoPlayer = ({
10886
10873
  onDownloadComplete,
10887
10874
  onDownloadError
10888
10875
  }) => {
10889
- const videoRef = (0, import_react35.useRef)(null);
10876
+ const videoRef = (0, import_react34.useRef)(null);
10890
10877
  const { isUltraSmallMobile, isTinyMobile } = useMobile();
10891
- const [isPlaying, setIsPlaying] = (0, import_react35.useState)(false);
10892
- const [currentTime, setCurrentTime] = (0, import_react35.useState)(0);
10893
- const [duration, setDuration] = (0, import_react35.useState)(0);
10894
- const [isMuted, setIsMuted] = (0, import_react35.useState)(false);
10895
- const [volume, setVolume] = (0, import_react35.useState)(1);
10896
- const [isFullscreen, setIsFullscreen] = (0, import_react35.useState)(false);
10897
- const [showControls, setShowControls] = (0, import_react35.useState)(true);
10898
- const [hasCompleted, setHasCompleted] = (0, import_react35.useState)(false);
10899
- const [showCaptions, setShowCaptions] = (0, import_react35.useState)(false);
10900
- const [subtitlesValidation, setSubtitlesValidation] = (0, import_react35.useState)("idle");
10901
- (0, import_react35.useEffect)(() => {
10878
+ const [isPlaying, setIsPlaying] = (0, import_react34.useState)(false);
10879
+ const [currentTime, setCurrentTime] = (0, import_react34.useState)(0);
10880
+ const [duration, setDuration] = (0, import_react34.useState)(0);
10881
+ const [isMuted, setIsMuted] = (0, import_react34.useState)(false);
10882
+ const [volume, setVolume] = (0, import_react34.useState)(1);
10883
+ const [isFullscreen, setIsFullscreen] = (0, import_react34.useState)(false);
10884
+ const [showControls, setShowControls] = (0, import_react34.useState)(true);
10885
+ const [hasCompleted, setHasCompleted] = (0, import_react34.useState)(false);
10886
+ const [showCaptions, setShowCaptions] = (0, import_react34.useState)(false);
10887
+ const [subtitlesValidation, setSubtitlesValidation] = (0, import_react34.useState)("idle");
10888
+ (0, import_react34.useEffect)(() => {
10902
10889
  setHasCompleted(false);
10903
10890
  }, [src]);
10904
- const [playbackRate, setPlaybackRate] = (0, import_react35.useState)(1);
10905
- const [showSpeedMenu, setShowSpeedMenu] = (0, import_react35.useState)(false);
10906
- const lastSaveTimeRef = (0, import_react35.useRef)(0);
10907
- const trackRef = (0, import_react35.useRef)(null);
10908
- const controlsTimeoutRef = (0, import_react35.useRef)(null);
10909
- const lastMousePositionRef = (0, import_react35.useRef)({ x: 0, y: 0 });
10910
- const isUserInteracting = (0, import_react35.useCallback)(() => {
10891
+ const [playbackRate, setPlaybackRate] = (0, import_react34.useState)(1);
10892
+ const [showSpeedMenu, setShowSpeedMenu] = (0, import_react34.useState)(false);
10893
+ const lastSaveTimeRef = (0, import_react34.useRef)(0);
10894
+ const trackRef = (0, import_react34.useRef)(null);
10895
+ const controlsTimeoutRef = (0, import_react34.useRef)(null);
10896
+ const lastMousePositionRef = (0, import_react34.useRef)({ x: 0, y: 0 });
10897
+ const isUserInteracting = (0, import_react34.useCallback)(() => {
10911
10898
  if (showSpeedMenu) {
10912
10899
  return true;
10913
10900
  }
@@ -10924,13 +10911,13 @@ var VideoPlayer = ({
10924
10911
  }
10925
10912
  return false;
10926
10913
  }, [showSpeedMenu]);
10927
- const clearControlsTimeout = (0, import_react35.useCallback)(() => {
10914
+ const clearControlsTimeout = (0, import_react34.useCallback)(() => {
10928
10915
  if (controlsTimeoutRef.current) {
10929
10916
  clearTimeout(controlsTimeoutRef.current);
10930
10917
  controlsTimeoutRef.current = null;
10931
10918
  }
10932
10919
  }, []);
10933
- const showControlsWithTimer = (0, import_react35.useCallback)(() => {
10920
+ const showControlsWithTimer = (0, import_react34.useCallback)(() => {
10934
10921
  setShowControls(true);
10935
10922
  clearControlsTimeout();
10936
10923
  if (isFullscreen) {
@@ -10945,7 +10932,7 @@ var VideoPlayer = ({
10945
10932
  }, CONTROLS_HIDE_TIMEOUT);
10946
10933
  }
10947
10934
  }, [isFullscreen, isPlaying, clearControlsTimeout]);
10948
- const handleMouseMove = (0, import_react35.useCallback)(
10935
+ const handleMouseMove = (0, import_react34.useCallback)(
10949
10936
  (event) => {
10950
10937
  const currentX = event.clientX;
10951
10938
  const currentY = event.clientY;
@@ -10958,10 +10945,10 @@ var VideoPlayer = ({
10958
10945
  },
10959
10946
  [showControlsWithTimer]
10960
10947
  );
10961
- const handleMouseEnter = (0, import_react35.useCallback)(() => {
10948
+ const handleMouseEnter = (0, import_react34.useCallback)(() => {
10962
10949
  showControlsWithTimer();
10963
10950
  }, [showControlsWithTimer]);
10964
- const handleMouseLeave = (0, import_react35.useCallback)(() => {
10951
+ const handleMouseLeave = (0, import_react34.useCallback)(() => {
10965
10952
  const userInteracting = isUserInteracting();
10966
10953
  clearControlsTimeout();
10967
10954
  if (!isFullscreen && !userInteracting) {
@@ -10970,13 +10957,13 @@ var VideoPlayer = ({
10970
10957
  }, LEAVE_HIDE_TIMEOUT);
10971
10958
  }
10972
10959
  }, [isFullscreen, clearControlsTimeout, isUserInteracting]);
10973
- (0, import_react35.useEffect)(() => {
10960
+ (0, import_react34.useEffect)(() => {
10974
10961
  if (videoRef.current) {
10975
10962
  videoRef.current.volume = volume;
10976
10963
  videoRef.current.muted = isMuted;
10977
10964
  }
10978
10965
  }, [volume, isMuted]);
10979
- (0, import_react35.useEffect)(() => {
10966
+ (0, import_react34.useEffect)(() => {
10980
10967
  const video = videoRef.current;
10981
10968
  if (!video) return;
10982
10969
  const onPlay = () => setIsPlaying(true);
@@ -10991,13 +10978,13 @@ var VideoPlayer = ({
10991
10978
  video.removeEventListener("ended", onEnded);
10992
10979
  };
10993
10980
  }, []);
10994
- (0, import_react35.useEffect)(() => {
10981
+ (0, import_react34.useEffect)(() => {
10995
10982
  const video = videoRef.current;
10996
10983
  if (!video) return;
10997
10984
  video.setAttribute("playsinline", "");
10998
10985
  video.setAttribute("webkit-playsinline", "");
10999
10986
  }, []);
11000
- (0, import_react35.useEffect)(() => {
10987
+ (0, import_react34.useEffect)(() => {
11001
10988
  if (isPlaying) {
11002
10989
  showControlsWithTimer();
11003
10990
  } else {
@@ -11009,7 +10996,7 @@ var VideoPlayer = ({
11009
10996
  }
11010
10997
  }
11011
10998
  }, [isPlaying, isFullscreen, showControlsWithTimer, clearControlsTimeout]);
11012
- (0, import_react35.useEffect)(() => {
10999
+ (0, import_react34.useEffect)(() => {
11013
11000
  const video = videoRef.current;
11014
11001
  if (!video) return;
11015
11002
  const handleFullscreenChange = () => {
@@ -11044,7 +11031,7 @@ var VideoPlayer = ({
11044
11031
  );
11045
11032
  };
11046
11033
  }, [showControlsWithTimer]);
11047
- (0, import_react35.useEffect)(() => {
11034
+ (0, import_react34.useEffect)(() => {
11048
11035
  const init = () => {
11049
11036
  if (!isFullscreen) {
11050
11037
  showControlsWithTimer();
@@ -11066,7 +11053,7 @@ var VideoPlayer = ({
11066
11053
  };
11067
11054
  }
11068
11055
  }, []);
11069
- const getInitialTime = (0, import_react35.useCallback)(() => {
11056
+ const getInitialTime = (0, import_react34.useCallback)(() => {
11070
11057
  if (!autoSave || !storageKey) {
11071
11058
  return Number.isFinite(initialTime) && initialTime >= 0 ? initialTime : void 0;
11072
11059
  }
@@ -11079,14 +11066,14 @@ var VideoPlayer = ({
11079
11066
  if (hasValidSaved) return saved;
11080
11067
  return void 0;
11081
11068
  }, [autoSave, storageKey, src, initialTime]);
11082
- (0, import_react35.useEffect)(() => {
11069
+ (0, import_react34.useEffect)(() => {
11083
11070
  const start = getInitialTime();
11084
11071
  if (start !== void 0 && videoRef.current) {
11085
11072
  videoRef.current.currentTime = start;
11086
11073
  setCurrentTime(start);
11087
11074
  }
11088
11075
  }, [getInitialTime]);
11089
- const saveProgress = (0, import_react35.useCallback)(
11076
+ const saveProgress = (0, import_react34.useCallback)(
11090
11077
  (time) => {
11091
11078
  if (!autoSave || !storageKey) return;
11092
11079
  const now = Date.now();
@@ -11097,7 +11084,7 @@ var VideoPlayer = ({
11097
11084
  },
11098
11085
  [autoSave, storageKey, src]
11099
11086
  );
11100
- const togglePlayPause = (0, import_react35.useCallback)(async () => {
11087
+ const togglePlayPause = (0, import_react34.useCallback)(async () => {
11101
11088
  const video = videoRef.current;
11102
11089
  if (!video) return;
11103
11090
  if (!video.paused) {
@@ -11109,7 +11096,7 @@ var VideoPlayer = ({
11109
11096
  } catch {
11110
11097
  }
11111
11098
  }, []);
11112
- const handleVolumeChange = (0, import_react35.useCallback)(
11099
+ const handleVolumeChange = (0, import_react34.useCallback)(
11113
11100
  (newVolume) => {
11114
11101
  const video = videoRef.current;
11115
11102
  if (!video) return;
@@ -11128,7 +11115,7 @@ var VideoPlayer = ({
11128
11115
  },
11129
11116
  [isMuted]
11130
11117
  );
11131
- const toggleMute = (0, import_react35.useCallback)(() => {
11118
+ const toggleMute = (0, import_react34.useCallback)(() => {
11132
11119
  const video = videoRef.current;
11133
11120
  if (!video) return;
11134
11121
  if (isMuted) {
@@ -11142,20 +11129,20 @@ var VideoPlayer = ({
11142
11129
  setIsMuted(true);
11143
11130
  }
11144
11131
  }, [isMuted, volume]);
11145
- const handleSeek = (0, import_react35.useCallback)((newTime) => {
11132
+ const handleSeek = (0, import_react34.useCallback)((newTime) => {
11146
11133
  const video = videoRef.current;
11147
11134
  if (video) {
11148
11135
  video.currentTime = newTime;
11149
11136
  }
11150
11137
  }, []);
11151
- const isSafariIOS = (0, import_react35.useCallback)(() => {
11138
+ const isSafariIOS = (0, import_react34.useCallback)(() => {
11152
11139
  const ua = navigator.userAgent;
11153
11140
  const isIOS = /iPad|iPhone|iPod/.test(ua);
11154
11141
  const isWebKit = /WebKit/.test(ua);
11155
11142
  const isNotChrome = !/CriOS|Chrome/.test(ua);
11156
11143
  return isIOS && isWebKit && isNotChrome;
11157
11144
  }, []);
11158
- const toggleFullscreen = (0, import_react35.useCallback)(() => {
11145
+ const toggleFullscreen = (0, import_react34.useCallback)(() => {
11159
11146
  const video = videoRef.current;
11160
11147
  const container = video?.parentElement;
11161
11148
  if (!video || !container) return;
@@ -11172,24 +11159,24 @@ var VideoPlayer = ({
11172
11159
  document.exitFullscreen();
11173
11160
  }
11174
11161
  }, [isFullscreen, isSafariIOS]);
11175
- const handleSpeedChange = (0, import_react35.useCallback)((speed) => {
11162
+ const handleSpeedChange = (0, import_react34.useCallback)((speed) => {
11176
11163
  if (videoRef.current) {
11177
11164
  videoRef.current.playbackRate = speed;
11178
11165
  setPlaybackRate(speed);
11179
11166
  setShowSpeedMenu(false);
11180
11167
  }
11181
11168
  }, []);
11182
- const toggleSpeedMenu = (0, import_react35.useCallback)(() => {
11169
+ const toggleSpeedMenu = (0, import_react34.useCallback)(() => {
11183
11170
  setShowSpeedMenu(!showSpeedMenu);
11184
11171
  }, [showSpeedMenu]);
11185
- const toggleCaptions = (0, import_react35.useCallback)(() => {
11172
+ const toggleCaptions = (0, import_react34.useCallback)(() => {
11186
11173
  if (!trackRef.current?.track || !subtitles || subtitlesValidation !== "valid")
11187
11174
  return;
11188
11175
  const newShowCaptions = !showCaptions;
11189
11176
  setShowCaptions(newShowCaptions);
11190
11177
  trackRef.current.track.mode = newShowCaptions ? "showing" : "hidden";
11191
11178
  }, [showCaptions, subtitles, subtitlesValidation]);
11192
- const checkVideoCompletion = (0, import_react35.useCallback)(
11179
+ const checkVideoCompletion = (0, import_react34.useCallback)(
11193
11180
  (progressPercent) => {
11194
11181
  if (progressPercent >= 95 && !hasCompleted) {
11195
11182
  setHasCompleted(true);
@@ -11198,7 +11185,7 @@ var VideoPlayer = ({
11198
11185
  },
11199
11186
  [hasCompleted, onVideoComplete]
11200
11187
  );
11201
- const handleTimeUpdate = (0, import_react35.useCallback)(() => {
11188
+ const handleTimeUpdate = (0, import_react34.useCallback)(() => {
11202
11189
  const video = videoRef.current;
11203
11190
  if (!video) return;
11204
11191
  const current = video.currentTime;
@@ -11211,12 +11198,12 @@ var VideoPlayer = ({
11211
11198
  checkVideoCompletion(progressPercent);
11212
11199
  }
11213
11200
  }, [duration, saveProgress, onTimeUpdate, onProgress, checkVideoCompletion]);
11214
- const handleLoadedMetadata = (0, import_react35.useCallback)(() => {
11201
+ const handleLoadedMetadata = (0, import_react34.useCallback)(() => {
11215
11202
  if (videoRef.current) {
11216
11203
  setDuration(videoRef.current.duration);
11217
11204
  }
11218
11205
  }, []);
11219
- (0, import_react35.useEffect)(() => {
11206
+ (0, import_react34.useEffect)(() => {
11220
11207
  const controller = new AbortController();
11221
11208
  const validateSubtitles = async () => {
11222
11209
  if (!subtitles) {
@@ -11263,12 +11250,12 @@ var VideoPlayer = ({
11263
11250
  controller.abort();
11264
11251
  };
11265
11252
  }, [subtitles]);
11266
- (0, import_react35.useEffect)(() => {
11253
+ (0, import_react34.useEffect)(() => {
11267
11254
  if (trackRef.current?.track) {
11268
11255
  trackRef.current.track.mode = showCaptions && subtitles && subtitlesValidation === "valid" ? "showing" : "hidden";
11269
11256
  }
11270
11257
  }, [subtitles, showCaptions, subtitlesValidation]);
11271
- (0, import_react35.useEffect)(() => {
11258
+ (0, import_react34.useEffect)(() => {
11272
11259
  const handleVisibilityChange = () => {
11273
11260
  if (document.hidden && isPlaying && videoRef.current) {
11274
11261
  videoRef.current.pause();
@@ -11290,54 +11277,54 @@ var VideoPlayer = ({
11290
11277
  };
11291
11278
  }, [isPlaying, clearControlsTimeout]);
11292
11279
  const progressPercentage = duration > 0 ? currentTime / duration * 100 : 0;
11293
- const getIconSize2 = (0, import_react35.useCallback)(() => {
11280
+ const getIconSize2 = (0, import_react34.useCallback)(() => {
11294
11281
  if (isTinyMobile) return 18;
11295
11282
  if (isUltraSmallMobile) return 20;
11296
11283
  return 24;
11297
11284
  }, [isTinyMobile, isUltraSmallMobile]);
11298
- const getControlsPadding = (0, import_react35.useCallback)(() => {
11285
+ const getControlsPadding = (0, import_react34.useCallback)(() => {
11299
11286
  if (isTinyMobile) return "px-2 pb-2 pt-1";
11300
11287
  if (isUltraSmallMobile) return "px-3 pb-3 pt-1";
11301
11288
  return "px-4 pb-4";
11302
11289
  }, [isTinyMobile, isUltraSmallMobile]);
11303
- const getControlsGap = (0, import_react35.useCallback)(() => {
11290
+ const getControlsGap = (0, import_react34.useCallback)(() => {
11304
11291
  if (isTinyMobile) return "gap-1";
11305
11292
  if (isUltraSmallMobile) return "gap-2";
11306
11293
  return "gap-4";
11307
11294
  }, [isTinyMobile, isUltraSmallMobile]);
11308
- const getProgressBarPadding = (0, import_react35.useCallback)(() => {
11295
+ const getProgressBarPadding = (0, import_react34.useCallback)(() => {
11309
11296
  if (isTinyMobile) return "px-2 pb-1";
11310
11297
  if (isUltraSmallMobile) return "px-3 pb-1";
11311
11298
  return "px-4 pb-2";
11312
11299
  }, [isTinyMobile, isUltraSmallMobile]);
11313
- const getCenterPlayButtonPosition = (0, import_react35.useCallback)(() => {
11300
+ const getCenterPlayButtonPosition = (0, import_react34.useCallback)(() => {
11314
11301
  if (isTinyMobile) return "items-center justify-center -translate-y-12";
11315
11302
  if (isUltraSmallMobile) return "items-center justify-center -translate-y-8";
11316
11303
  return "items-center justify-center";
11317
11304
  }, [isTinyMobile, isUltraSmallMobile]);
11318
- const getTopControlsOpacity = (0, import_react35.useCallback)(() => {
11305
+ const getTopControlsOpacity = (0, import_react34.useCallback)(() => {
11319
11306
  return showControls ? "opacity-100" : "opacity-0";
11320
11307
  }, [showControls]);
11321
- const getBottomControlsOpacity = (0, import_react35.useCallback)(() => {
11308
+ const getBottomControlsOpacity = (0, import_react34.useCallback)(() => {
11322
11309
  return showControls ? "opacity-100" : "opacity-0";
11323
11310
  }, [showControls]);
11324
- const seekBackward = (0, import_react35.useCallback)(() => {
11311
+ const seekBackward = (0, import_react34.useCallback)(() => {
11325
11312
  if (videoRef.current) {
11326
11313
  videoRef.current.currentTime -= 10;
11327
11314
  }
11328
11315
  }, []);
11329
- const seekForward = (0, import_react35.useCallback)(() => {
11316
+ const seekForward = (0, import_react34.useCallback)(() => {
11330
11317
  if (videoRef.current) {
11331
11318
  videoRef.current.currentTime += 10;
11332
11319
  }
11333
11320
  }, []);
11334
- const increaseVolume = (0, import_react35.useCallback)(() => {
11321
+ const increaseVolume = (0, import_react34.useCallback)(() => {
11335
11322
  handleVolumeChange(Math.min(100, volume * 100 + 10));
11336
11323
  }, [handleVolumeChange, volume]);
11337
- const decreaseVolume = (0, import_react35.useCallback)(() => {
11324
+ const decreaseVolume = (0, import_react34.useCallback)(() => {
11338
11325
  handleVolumeChange(Math.max(0, volume * 100 - 10));
11339
11326
  }, [handleVolumeChange, volume]);
11340
- const handleVideoKeyDown = (0, import_react35.useCallback)(
11327
+ const handleVideoKeyDown = (0, import_react34.useCallback)(
11341
11328
  (e) => {
11342
11329
  if (!e.key) return;
11343
11330
  e.stopPropagation();
@@ -11580,7 +11567,7 @@ var VideoPlayer = ({
11580
11567
  var VideoPlayer_default = VideoPlayer;
11581
11568
 
11582
11569
  // src/components/Whiteboard/Whiteboard.tsx
11583
- var import_react36 = require("react");
11570
+ var import_react35 = require("react");
11584
11571
  var import_phosphor_react27 = require("phosphor-react");
11585
11572
  var import_jsx_runtime57 = require("react/jsx-runtime");
11586
11573
  var IMAGE_WIDTH = 225;
@@ -11593,8 +11580,8 @@ var Whiteboard = ({
11593
11580
  imagesPerRow = 2,
11594
11581
  ...rest
11595
11582
  }) => {
11596
- const [imageErrors, setImageErrors] = (0, import_react36.useState)(/* @__PURE__ */ new Set());
11597
- const handleDownload = (0, import_react36.useCallback)(
11583
+ const [imageErrors, setImageErrors] = (0, import_react35.useState)(/* @__PURE__ */ new Set());
11584
+ const handleDownload = (0, import_react35.useCallback)(
11598
11585
  (image) => {
11599
11586
  if (onDownload) {
11600
11587
  onDownload(image);
@@ -11611,7 +11598,7 @@ var Whiteboard = ({
11611
11598
  },
11612
11599
  [onDownload]
11613
11600
  );
11614
- const handleImageError = (0, import_react36.useCallback)((imageId) => {
11601
+ const handleImageError = (0, import_react35.useCallback)((imageId) => {
11615
11602
  setImageErrors((prev) => new Set(prev).add(imageId));
11616
11603
  }, []);
11617
11604
  const gridColsClass = images?.length === 1 ? "grid-cols-1" : {
@@ -11698,10 +11685,10 @@ var Whiteboard = ({
11698
11685
  var Whiteboard_default = Whiteboard;
11699
11686
 
11700
11687
  // src/components/Auth/Auth.tsx
11701
- var import_react37 = require("react");
11688
+ var import_react36 = require("react");
11702
11689
  var import_react_router_dom = require("react-router-dom");
11703
11690
  var import_jsx_runtime58 = require("react/jsx-runtime");
11704
- var AuthContext = (0, import_react37.createContext)(void 0);
11691
+ var AuthContext = (0, import_react36.createContext)(void 0);
11705
11692
  var AuthProvider = ({
11706
11693
  children,
11707
11694
  checkAuthFn,
@@ -11711,12 +11698,12 @@ var AuthProvider = ({
11711
11698
  getSessionFn,
11712
11699
  getTokensFn
11713
11700
  }) => {
11714
- const [authState, setAuthState] = (0, import_react37.useState)({
11701
+ const [authState, setAuthState] = (0, import_react36.useState)({
11715
11702
  isAuthenticated: false,
11716
11703
  isLoading: true,
11717
11704
  ...initialAuthState
11718
11705
  });
11719
- const checkAuth = (0, import_react37.useCallback)(async () => {
11706
+ const checkAuth = (0, import_react36.useCallback)(async () => {
11720
11707
  try {
11721
11708
  setAuthState((prev) => ({ ...prev, isLoading: true }));
11722
11709
  if (!checkAuthFn) {
@@ -11747,7 +11734,7 @@ var AuthProvider = ({
11747
11734
  return false;
11748
11735
  }
11749
11736
  }, [checkAuthFn, getUserFn, getSessionFn, getTokensFn]);
11750
- const signOut = (0, import_react37.useCallback)(() => {
11737
+ const signOut = (0, import_react36.useCallback)(() => {
11751
11738
  if (signOutFn) {
11752
11739
  signOutFn();
11753
11740
  }
@@ -11759,10 +11746,10 @@ var AuthProvider = ({
11759
11746
  tokens: void 0
11760
11747
  }));
11761
11748
  }, [signOutFn]);
11762
- (0, import_react37.useEffect)(() => {
11749
+ (0, import_react36.useEffect)(() => {
11763
11750
  checkAuth();
11764
11751
  }, [checkAuth]);
11765
- const contextValue = (0, import_react37.useMemo)(
11752
+ const contextValue = (0, import_react36.useMemo)(
11766
11753
  () => ({
11767
11754
  ...authState,
11768
11755
  checkAuth,
@@ -11773,7 +11760,7 @@ var AuthProvider = ({
11773
11760
  return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(AuthContext.Provider, { value: contextValue, children });
11774
11761
  };
11775
11762
  var useAuth = () => {
11776
- const context = (0, import_react37.useContext)(AuthContext);
11763
+ const context = (0, import_react36.useContext)(AuthContext);
11777
11764
  if (context === void 0) {
11778
11765
  throw new Error("useAuth deve ser usado dentro de um AuthProvider");
11779
11766
  }
@@ -11871,10 +11858,10 @@ var getRootDomain = () => {
11871
11858
  };
11872
11859
 
11873
11860
  // src/components/Accordation/Accordation.tsx
11874
- var import_react38 = require("react");
11861
+ var import_react37 = require("react");
11875
11862
  var import_phosphor_react28 = require("phosphor-react");
11876
11863
  var import_jsx_runtime59 = require("react/jsx-runtime");
11877
- var CardAccordation = (0, import_react38.forwardRef)(
11864
+ var CardAccordation = (0, import_react37.forwardRef)(
11878
11865
  ({
11879
11866
  trigger,
11880
11867
  children,
@@ -11886,13 +11873,13 @@ var CardAccordation = (0, import_react38.forwardRef)(
11886
11873
  disabled = false,
11887
11874
  ...props
11888
11875
  }, ref) => {
11889
- const [internalExpanded, setInternalExpanded] = (0, import_react38.useState)(defaultExpanded);
11890
- const generatedId = (0, import_react38.useId)();
11876
+ const [internalExpanded, setInternalExpanded] = (0, import_react37.useState)(defaultExpanded);
11877
+ const generatedId = (0, import_react37.useId)();
11891
11878
  const contentId = value ? `accordion-content-${value}` : generatedId;
11892
11879
  const headerId = value ? `accordion-header-${value}` : `${generatedId}-header`;
11893
11880
  const isControlled = controlledExpanded !== void 0;
11894
11881
  const isExpanded = isControlled ? controlledExpanded : internalExpanded;
11895
- (0, import_react38.useEffect)(() => {
11882
+ (0, import_react37.useEffect)(() => {
11896
11883
  if (isControlled) {
11897
11884
  setInternalExpanded(controlledExpanded);
11898
11885
  }
@@ -11978,7 +11965,7 @@ var CardAccordation = (0, import_react38.forwardRef)(
11978
11965
  CardAccordation.displayName = "CardAccordation";
11979
11966
 
11980
11967
  // src/components/Accordation/AccordionGroup.tsx
11981
- var import_react39 = require("react");
11968
+ var import_react38 = require("react");
11982
11969
  var import_zustand10 = require("zustand");
11983
11970
  var import_jsx_runtime60 = require("react/jsx-runtime");
11984
11971
  function createAccordionGroupStore(type, initialValue, collapsible) {
@@ -11998,8 +11985,8 @@ function createAccordionGroupStore(type, initialValue, collapsible) {
11998
11985
  }));
11999
11986
  }
12000
11987
  var injectStore6 = (children, store, indexRef, onItemToggle) => {
12001
- return import_react39.Children.map(children, (child) => {
12002
- if (!(0, import_react39.isValidElement)(child)) {
11988
+ return import_react38.Children.map(children, (child) => {
11989
+ if (!(0, import_react38.isValidElement)(child)) {
12003
11990
  return child;
12004
11991
  }
12005
11992
  const typedChild = child;
@@ -12026,16 +12013,16 @@ var injectStore6 = (children, store, indexRef, onItemToggle) => {
12026
12013
  if (displayName === "CardAccordation") {
12027
12014
  newProps.children = processedChildren;
12028
12015
  } else if (processedChildren !== typedChild.props.children) {
12029
- return (0, import_react39.cloneElement)(typedChild, { children: processedChildren });
12016
+ return (0, import_react38.cloneElement)(typedChild, { children: processedChildren });
12030
12017
  }
12031
12018
  }
12032
12019
  if (Object.keys(newProps).length > 0) {
12033
- return (0, import_react39.cloneElement)(typedChild, newProps);
12020
+ return (0, import_react38.cloneElement)(typedChild, newProps);
12034
12021
  }
12035
12022
  return child;
12036
12023
  });
12037
12024
  };
12038
- var AccordionGroup = (0, import_react39.forwardRef)(
12025
+ var AccordionGroup = (0, import_react38.forwardRef)(
12039
12026
  ({
12040
12027
  type = "single",
12041
12028
  defaultValue,
@@ -12046,12 +12033,12 @@ var AccordionGroup = (0, import_react39.forwardRef)(
12046
12033
  className,
12047
12034
  ...props
12048
12035
  }, ref) => {
12049
- const [internalValue, setInternalValue] = (0, import_react39.useState)(
12036
+ const [internalValue, setInternalValue] = (0, import_react38.useState)(
12050
12037
  defaultValue || (type === "single" ? "" : [])
12051
12038
  );
12052
12039
  const isControlled = controlledValue !== void 0;
12053
12040
  const currentValue = isControlled ? controlledValue : internalValue;
12054
- const storeRef = (0, import_react39.useRef)(null);
12041
+ const storeRef = (0, import_react38.useRef)(null);
12055
12042
  if (storeRef.current) {
12056
12043
  storeRef.current.setState((prev) => {
12057
12044
  const nextState = {};
@@ -12071,10 +12058,10 @@ var AccordionGroup = (0, import_react39.forwardRef)(
12071
12058
  );
12072
12059
  }
12073
12060
  const store = storeRef.current;
12074
- (0, import_react39.useEffect)(() => {
12061
+ (0, import_react38.useEffect)(() => {
12075
12062
  store.setState({ value: currentValue });
12076
12063
  }, [currentValue, store]);
12077
- (0, import_react39.useEffect)(() => {
12064
+ (0, import_react38.useEffect)(() => {
12078
12065
  if (!isControlled) {
12079
12066
  setInternalValue((prev) => {
12080
12067
  if (type === "single") {
@@ -12127,7 +12114,7 @@ AccordionGroup.displayName = "AccordionGroup";
12127
12114
 
12128
12115
  // src/components/Alternative/Alternative.tsx
12129
12116
  var import_phosphor_react29 = require("phosphor-react");
12130
- var import_react40 = require("react");
12117
+ var import_react39 = require("react");
12131
12118
  var import_jsx_runtime61 = require("react/jsx-runtime");
12132
12119
  var AlternativesList = ({
12133
12120
  alternatives,
@@ -12141,9 +12128,9 @@ var AlternativesList = ({
12141
12128
  mode = "interactive",
12142
12129
  selectedValue
12143
12130
  }) => {
12144
- const uniqueId = (0, import_react40.useId)();
12131
+ const uniqueId = (0, import_react39.useId)();
12145
12132
  const groupName = name || `alternatives-${uniqueId}`;
12146
- const [actualValue, setActualValue] = (0, import_react40.useState)(value);
12133
+ const [actualValue, setActualValue] = (0, import_react39.useState)(value);
12147
12134
  const isReadonly = mode === "readonly";
12148
12135
  const getStatusStyles2 = (status, isReadonly2) => {
12149
12136
  const hoverClass = isReadonly2 ? "" : "hover:bg-background-50";
@@ -12362,7 +12349,7 @@ var AlternativesList = ({
12362
12349
  }
12363
12350
  );
12364
12351
  };
12365
- var HeaderAlternative = (0, import_react40.forwardRef)(
12352
+ var HeaderAlternative = (0, import_react39.forwardRef)(
12366
12353
  ({ className, title, subTitle, content, ...props }, ref) => {
12367
12354
  return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
12368
12355
  "div",
@@ -12428,7 +12415,7 @@ function createZustandAuthAdapter(useAuthStore2) {
12428
12415
  }
12429
12416
 
12430
12417
  // src/components/Auth/useUrlAuthentication.ts
12431
- var import_react41 = require("react");
12418
+ var import_react40 = require("react");
12432
12419
  var import_react_router_dom2 = require("react-router-dom");
12433
12420
  var getAuthParams = (location, extractParams) => {
12434
12421
  const searchParams = new URLSearchParams(location.search);
@@ -12476,8 +12463,8 @@ var handleUserData = (responseData, setUser) => {
12476
12463
  };
12477
12464
  function useUrlAuthentication(options) {
12478
12465
  const location = (0, import_react_router_dom2.useLocation)();
12479
- const processedRef = (0, import_react41.useRef)(false);
12480
- (0, import_react41.useEffect)(() => {
12466
+ const processedRef = (0, import_react40.useRef)(false);
12467
+ (0, import_react40.useEffect)(() => {
12481
12468
  const handleAuthentication = async () => {
12482
12469
  if (processedRef.current) {
12483
12470
  return;
@@ -12548,9 +12535,9 @@ function useUrlAuthentication(options) {
12548
12535
  }
12549
12536
 
12550
12537
  // src/components/Auth/useApiConfig.ts
12551
- var import_react42 = require("react");
12538
+ var import_react41 = require("react");
12552
12539
  function useApiConfig(api) {
12553
- return (0, import_react42.useMemo)(
12540
+ return (0, import_react41.useMemo)(
12554
12541
  () => ({
12555
12542
  get: (endpoint, config) => api.get(endpoint, config)
12556
12543
  }),
@@ -12560,7 +12547,7 @@ function useApiConfig(api) {
12560
12547
 
12561
12548
  // src/components/Quiz/Quiz.tsx
12562
12549
  var import_phosphor_react32 = require("phosphor-react");
12563
- var import_react45 = require("react");
12550
+ var import_react44 = require("react");
12564
12551
 
12565
12552
  // src/components/Quiz/useQuizStore.ts
12566
12553
  var import_zustand11 = require("zustand");
@@ -13170,10 +13157,10 @@ var useQuizStore = (0, import_zustand11.create)()(
13170
13157
  );
13171
13158
 
13172
13159
  // src/components/Quiz/QuizContent.tsx
13173
- var import_react44 = require("react");
13160
+ var import_react43 = require("react");
13174
13161
 
13175
13162
  // src/components/MultipleChoice/MultipleChoice.tsx
13176
- var import_react43 = require("react");
13163
+ var import_react42 = require("react");
13177
13164
  var import_phosphor_react30 = require("phosphor-react");
13178
13165
  var import_jsx_runtime62 = require("react/jsx-runtime");
13179
13166
  var MultipleChoiceList = ({
@@ -13185,8 +13172,8 @@ var MultipleChoiceList = ({
13185
13172
  onHandleSelectedValues,
13186
13173
  mode = "interactive"
13187
13174
  }) => {
13188
- const [actualValue, setActualValue] = (0, import_react43.useState)(selectedValues);
13189
- (0, import_react43.useEffect)(() => {
13175
+ const [actualValue, setActualValue] = (0, import_react42.useState)(selectedValues);
13176
+ (0, import_react42.useEffect)(() => {
13190
13177
  setActualValue(selectedValues);
13191
13178
  }, [selectedValues]);
13192
13179
  const getStatusBadge2 = (status) => {
@@ -13331,12 +13318,12 @@ var getStatusStyles = (variantCorrect) => {
13331
13318
  return "bg-error-background border-error-300";
13332
13319
  }
13333
13320
  };
13334
- var QuizSubTitle = (0, import_react44.forwardRef)(
13321
+ var QuizSubTitle = (0, import_react43.forwardRef)(
13335
13322
  ({ subTitle, ...props }, ref) => {
13336
13323
  return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "px-4 pb-2 pt-6", ...props, ref, children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("p", { className: "font-bold text-lg text-text-950", children: subTitle }) });
13337
13324
  }
13338
13325
  );
13339
- var QuizContainer = (0, import_react44.forwardRef)(({ children, className, ...props }, ref) => {
13326
+ var QuizContainer = (0, import_react43.forwardRef)(({ children, className, ...props }, ref) => {
13340
13327
  return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
13341
13328
  "div",
13342
13329
  {
@@ -13425,15 +13412,15 @@ var QuizMultipleChoice = ({ paddingBottom }) => {
13425
13412
  const currentQuestionResult = getQuestionResultByQuestionId(
13426
13413
  currentQuestion?.id || ""
13427
13414
  );
13428
- const prevSelectedValuesRef = (0, import_react44.useRef)([]);
13429
- const prevQuestionIdRef = (0, import_react44.useRef)("");
13430
- const allCurrentAnswerIds = (0, import_react44.useMemo)(() => {
13415
+ const prevSelectedValuesRef = (0, import_react43.useRef)([]);
13416
+ const prevQuestionIdRef = (0, import_react43.useRef)("");
13417
+ const allCurrentAnswerIds = (0, import_react43.useMemo)(() => {
13431
13418
  return allCurrentAnswers?.map((answer) => answer.optionId) || [];
13432
13419
  }, [allCurrentAnswers]);
13433
- const selectedValues = (0, import_react44.useMemo)(() => {
13420
+ const selectedValues = (0, import_react43.useMemo)(() => {
13434
13421
  return allCurrentAnswerIds?.filter((id) => id !== null) || [];
13435
13422
  }, [allCurrentAnswerIds]);
13436
- const stableSelectedValues = (0, import_react44.useMemo)(() => {
13423
+ const stableSelectedValues = (0, import_react43.useMemo)(() => {
13437
13424
  const currentQuestionId = currentQuestion?.id || "";
13438
13425
  const hasQuestionChanged = prevQuestionIdRef.current !== currentQuestionId;
13439
13426
  if (hasQuestionChanged) {
@@ -13457,7 +13444,7 @@ var QuizMultipleChoice = ({ paddingBottom }) => {
13457
13444
  variant,
13458
13445
  currentQuestionResult?.selectedOptions
13459
13446
  ]);
13460
- const handleSelectedValues = (0, import_react44.useCallback)(
13447
+ const handleSelectedValues = (0, import_react43.useCallback)(
13461
13448
  (values) => {
13462
13449
  if (currentQuestion) {
13463
13450
  selectMultipleAnswer(currentQuestion.id, values);
@@ -13465,7 +13452,7 @@ var QuizMultipleChoice = ({ paddingBottom }) => {
13465
13452
  },
13466
13453
  [currentQuestion, selectMultipleAnswer]
13467
13454
  );
13468
- const questionKey = (0, import_react44.useMemo)(
13455
+ const questionKey = (0, import_react43.useMemo)(
13469
13456
  () => `question-${currentQuestion?.id || "1"}`,
13470
13457
  [currentQuestion?.id]
13471
13458
  );
@@ -13526,14 +13513,14 @@ var QuizDissertative = ({ paddingBottom }) => {
13526
13513
  currentQuestion?.id || ""
13527
13514
  );
13528
13515
  const currentAnswer = getCurrentAnswer();
13529
- const textareaRef = (0, import_react44.useRef)(null);
13516
+ const textareaRef = (0, import_react43.useRef)(null);
13530
13517
  const charLimit = getDissertativeCharLimit();
13531
13518
  const handleAnswerChange = (value) => {
13532
13519
  if (currentQuestion) {
13533
13520
  selectDissertativeAnswer(currentQuestion.id, value);
13534
13521
  }
13535
13522
  };
13536
- const adjustTextareaHeight = (0, import_react44.useCallback)(() => {
13523
+ const adjustTextareaHeight = (0, import_react43.useCallback)(() => {
13537
13524
  if (textareaRef.current) {
13538
13525
  textareaRef.current.style.height = "auto";
13539
13526
  const scrollHeight = textareaRef.current.scrollHeight;
@@ -13543,7 +13530,7 @@ var QuizDissertative = ({ paddingBottom }) => {
13543
13530
  textareaRef.current.style.height = `${newHeight}px`;
13544
13531
  }
13545
13532
  }, []);
13546
- (0, import_react44.useEffect)(() => {
13533
+ (0, import_react43.useEffect)(() => {
13547
13534
  adjustTextareaHeight();
13548
13535
  }, [currentAnswer, adjustTextareaHeight]);
13549
13536
  if (!currentQuestion) {
@@ -13684,7 +13671,7 @@ var QuizConnectDots = ({ paddingBottom }) => {
13684
13671
  isCorrect: false
13685
13672
  }
13686
13673
  ];
13687
- const [userAnswers, setUserAnswers] = (0, import_react44.useState)(() => {
13674
+ const [userAnswers, setUserAnswers] = (0, import_react43.useState)(() => {
13688
13675
  if (variant === "result") {
13689
13676
  return mockUserAnswers;
13690
13677
  }
@@ -13803,8 +13790,8 @@ var QuizFill = ({ paddingBottom }) => {
13803
13790
  isCorrect: true
13804
13791
  }
13805
13792
  ];
13806
- const [answers, setAnswers] = (0, import_react44.useState)({});
13807
- const baseId = (0, import_react44.useId)();
13793
+ const [answers, setAnswers] = (0, import_react43.useState)({});
13794
+ const baseId = (0, import_react43.useId)();
13808
13795
  const getAvailableOptionsForSelect = (selectId) => {
13809
13796
  const usedOptions = new Set(
13810
13797
  Object.entries(answers).filter(([key]) => key !== selectId).map(([, value]) => value)
@@ -13943,7 +13930,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
13943
13930
  };
13944
13931
  const correctRadiusRelative = calculateCorrectRadiusRelative();
13945
13932
  const mockUserAnswerRelative = { x: 0.72, y: 0.348 };
13946
- const [clickPositionRelative, setClickPositionRelative] = (0, import_react44.useState)(variant == "result" ? mockUserAnswerRelative : null);
13933
+ const [clickPositionRelative, setClickPositionRelative] = (0, import_react43.useState)(variant == "result" ? mockUserAnswerRelative : null);
13947
13934
  const convertToRelativeCoordinates = (x, y, rect) => {
13948
13935
  const safeWidth = Math.max(rect.width, 1e-3);
13949
13936
  const safeHeight = Math.max(rect.height, 1e-3);
@@ -14109,14 +14096,14 @@ var getFinishConfirmationText = (type) => {
14109
14096
  const config = getQuizTypeConfig(type);
14110
14097
  return `Tem certeza que deseja finalizar ${config.article} ${config.label.toLowerCase()}?`;
14111
14098
  };
14112
- var Quiz = (0, import_react45.forwardRef)(({ children, className, variant = "default", ...props }, ref) => {
14099
+ var Quiz = (0, import_react44.forwardRef)(({ children, className, variant = "default", ...props }, ref) => {
14113
14100
  const { setVariant } = useQuizStore();
14114
- (0, import_react45.useEffect)(() => {
14101
+ (0, import_react44.useEffect)(() => {
14115
14102
  setVariant(variant);
14116
14103
  }, [variant, setVariant]);
14117
14104
  return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { ref, className: cn("flex flex-col", className), ...props, children });
14118
14105
  });
14119
- var QuizTitle = (0, import_react45.forwardRef)(({ className, onBack, ...props }, ref) => {
14106
+ var QuizTitle = (0, import_react44.forwardRef)(({ className, onBack, ...props }, ref) => {
14120
14107
  const {
14121
14108
  quiz,
14122
14109
  currentQuestionIndex,
@@ -14126,7 +14113,7 @@ var QuizTitle = (0, import_react45.forwardRef)(({ className, onBack, ...props },
14126
14113
  formatTime: formatTime2,
14127
14114
  isStarted
14128
14115
  } = useQuizStore();
14129
- const [showExitConfirmation, setShowExitConfirmation] = (0, import_react45.useState)(false);
14116
+ const [showExitConfirmation, setShowExitConfirmation] = (0, import_react44.useState)(false);
14130
14117
  const totalQuestions = getTotalQuestions();
14131
14118
  const quizTitle = getQuizTitle();
14132
14119
  const handleBackClick = () => {
@@ -14295,7 +14282,7 @@ var QuizQuestionList = ({
14295
14282
  )
14296
14283
  ] });
14297
14284
  };
14298
- var QuizFooter = (0, import_react45.forwardRef)(
14285
+ var QuizFooter = (0, import_react44.forwardRef)(
14299
14286
  ({
14300
14287
  className,
14301
14288
  onGoToSimulated,
@@ -14329,8 +14316,8 @@ var QuizFooter = (0, import_react45.forwardRef)(
14329
14316
  const currentAnswer = getCurrentAnswer();
14330
14317
  const currentQuestion = getCurrentQuestion();
14331
14318
  const isCurrentQuestionSkipped = currentQuestion ? getQuestionStatusFromUserAnswers(currentQuestion.id) === "skipped" : false;
14332
- const [activeModal, setActiveModal] = (0, import_react45.useState)(null);
14333
- const [filterType, setFilterType] = (0, import_react45.useState)("all");
14319
+ const [activeModal, setActiveModal] = (0, import_react44.useState)(null);
14320
+ const [filterType, setFilterType] = (0, import_react44.useState)("all");
14334
14321
  const openModal = (modalName) => setActiveModal(modalName);
14335
14322
  const closeModal = () => setActiveModal(null);
14336
14323
  const isModalOpen = (modalName) => activeModal === modalName;
@@ -14672,7 +14659,7 @@ var QuizFooter = (0, import_react45.forwardRef)(
14672
14659
  );
14673
14660
 
14674
14661
  // src/components/Quiz/QuizResult.tsx
14675
- var import_react46 = require("react");
14662
+ var import_react45 = require("react");
14676
14663
  var import_phosphor_react33 = require("phosphor-react");
14677
14664
  var import_jsx_runtime65 = require("react/jsx-runtime");
14678
14665
  var QuizBadge = ({
@@ -14694,15 +14681,15 @@ var QuizBadge = ({
14694
14681
  return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Badge_default, { variant: "solid", action: "info", "data-testid": "quiz-badge", children: subtype });
14695
14682
  }
14696
14683
  };
14697
- var QuizHeaderResult = (0, import_react46.forwardRef)(
14684
+ var QuizHeaderResult = (0, import_react45.forwardRef)(
14698
14685
  ({ className, ...props }, ref) => {
14699
14686
  const {
14700
14687
  getQuestionResultByQuestionId,
14701
14688
  getCurrentQuestion,
14702
14689
  questionsResult
14703
14690
  } = useQuizStore();
14704
- const [status, setStatus] = (0, import_react46.useState)(void 0);
14705
- (0, import_react46.useEffect)(() => {
14691
+ const [status, setStatus] = (0, import_react45.useState)(void 0);
14692
+ (0, import_react45.useEffect)(() => {
14706
14693
  const cq = getCurrentQuestion();
14707
14694
  if (!cq) {
14708
14695
  setStatus(void 0);
@@ -14766,7 +14753,7 @@ var QuizHeaderResult = (0, import_react46.forwardRef)(
14766
14753
  );
14767
14754
  }
14768
14755
  );
14769
- var QuizResultHeaderTitle = (0, import_react46.forwardRef)(({ className, showBadge = true, onRepeat, canRetry, ...props }, ref) => {
14756
+ var QuizResultHeaderTitle = (0, import_react45.forwardRef)(({ className, showBadge = true, onRepeat, canRetry, ...props }, ref) => {
14770
14757
  const { quiz } = useQuizStore();
14771
14758
  return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
14772
14759
  "div",
@@ -14796,7 +14783,7 @@ var QuizResultHeaderTitle = (0, import_react46.forwardRef)(({ className, showBad
14796
14783
  }
14797
14784
  );
14798
14785
  });
14799
- var QuizResultTitle = (0, import_react46.forwardRef)(({ className, ...props }, ref) => {
14786
+ var QuizResultTitle = (0, import_react45.forwardRef)(({ className, ...props }, ref) => {
14800
14787
  const { getQuizTitle } = useQuizStore();
14801
14788
  const quizTitle = getQuizTitle();
14802
14789
  return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
@@ -14840,7 +14827,7 @@ var calculateAnswerStatistics = (answers) => {
14840
14827
  }
14841
14828
  return stats;
14842
14829
  };
14843
- var QuizResultPerformance = (0, import_react46.forwardRef)(({ showDetails = true, ...props }, ref) => {
14830
+ var QuizResultPerformance = (0, import_react45.forwardRef)(({ showDetails = true, ...props }, ref) => {
14844
14831
  const {
14845
14832
  getTotalQuestions,
14846
14833
  formatTime: formatTime2,
@@ -14945,7 +14932,7 @@ var QuizResultPerformance = (0, import_react46.forwardRef)(({ showDetails = true
14945
14932
  }
14946
14933
  );
14947
14934
  });
14948
- var QuizListResult = (0, import_react46.forwardRef)(({ className, onSubjectClick, ...props }, ref) => {
14935
+ var QuizListResult = (0, import_react45.forwardRef)(({ className, onSubjectClick, ...props }, ref) => {
14949
14936
  const { getQuestionsGroupedBySubject } = useQuizStore();
14950
14937
  const { isDark } = useTheme();
14951
14938
  const groupedQuestions = getQuestionsGroupedBySubject();
@@ -15075,7 +15062,7 @@ var BreadcrumbMenu = ({
15075
15062
  };
15076
15063
 
15077
15064
  // src/components/BreadcrumbMenu/useBreadcrumbBuilder.ts
15078
- var import_react47 = require("react");
15065
+ var import_react46 = require("react");
15079
15066
 
15080
15067
  // src/components/BreadcrumbMenu/breadcrumbStore.ts
15081
15068
  var import_zustand12 = require("zustand");
@@ -15204,7 +15191,7 @@ var useBreadcrumbBuilder = (config) => {
15204
15191
  (level) => isBreadcrumbWithData(level) ? level.data : null
15205
15192
  );
15206
15193
  const levelUrlIds = levels.map((level) => level.urlId);
15207
- (0, import_react47.useEffect)(() => {
15194
+ (0, import_react46.useEffect)(() => {
15208
15195
  const newBreadcrumbs = [root];
15209
15196
  const previousIds = [];
15210
15197
  for (const level of levels) {
@@ -15236,11 +15223,11 @@ var useBreadcrumbBuilder = (config) => {
15236
15223
  };
15237
15224
 
15238
15225
  // src/components/BreadcrumbMenu/useUrlParams.ts
15239
- var import_react48 = require("react");
15226
+ var import_react47 = require("react");
15240
15227
  var import_react_router_dom4 = require("react-router-dom");
15241
15228
  var useUrlParams = (config) => {
15242
15229
  const location = (0, import_react_router_dom4.useLocation)();
15243
- return (0, import_react48.useMemo)(() => {
15230
+ return (0, import_react47.useMemo)(() => {
15244
15231
  const segments = location.pathname.split("/").filter(Boolean);
15245
15232
  const params = {};
15246
15233
  for (const [key, index] of Object.entries(config)) {
@@ -15251,15 +15238,15 @@ var useUrlParams = (config) => {
15251
15238
  };
15252
15239
 
15253
15240
  // src/hooks/useAppInitialization.ts
15254
- var import_react50 = require("react");
15241
+ var import_react49 = require("react");
15255
15242
 
15256
15243
  // src/hooks/useInstitution.ts
15257
- var import_react49 = require("react");
15244
+ var import_react48 = require("react");
15258
15245
  function useInstitutionId() {
15259
- const [institutionId, setInstitutionId] = (0, import_react49.useState)(() => {
15246
+ const [institutionId, setInstitutionId] = (0, import_react48.useState)(() => {
15260
15247
  return document.querySelector('meta[name="institution-id"]')?.getAttribute("content") ?? null;
15261
15248
  });
15262
- (0, import_react49.useEffect)(() => {
15249
+ (0, import_react48.useEffect)(() => {
15263
15250
  const metaTag = document.querySelector('meta[name="institution-id"]');
15264
15251
  if (!metaTag) return;
15265
15252
  const observer = new MutationObserver(() => {
@@ -15426,7 +15413,7 @@ var useAuthStore = (0, import_zustand14.create)()(
15426
15413
  function useAppInitialization() {
15427
15414
  const getInstitutionId = useInstitutionId();
15428
15415
  const { initialize, initialized, institutionId } = useAppStore();
15429
- const authFunctions = (0, import_react50.useMemo)(
15416
+ const authFunctions = (0, import_react49.useMemo)(
15430
15417
  () => ({
15431
15418
  checkAuth: async () => {
15432
15419
  const { sessionInfo, tokens } = useAuthStore.getState();
@@ -15463,7 +15450,7 @@ function useAppInitialization() {
15463
15450
  }
15464
15451
 
15465
15452
  // src/hooks/useAppContent.ts
15466
- var import_react51 = require("react");
15453
+ var import_react50 = require("react");
15467
15454
  var import_react_router_dom5 = require("react-router-dom");
15468
15455
  function useAppContent(config) {
15469
15456
  const navigate = (0, import_react_router_dom5.useNavigate)();
@@ -15489,20 +15476,20 @@ function useAppContent(config) {
15489
15476
  navigate("/painel");
15490
15477
  }
15491
15478
  };
15492
- const handleSetSelectedProfile = (0, import_react51.useCallback)(
15479
+ const handleSetSelectedProfile = (0, import_react50.useCallback)(
15493
15480
  (profile) => {
15494
15481
  setSelectedProfile(profile);
15495
15482
  },
15496
15483
  [setSelectedProfile]
15497
15484
  );
15498
- const handleClearParamsFromURL = (0, import_react51.useCallback)(() => {
15485
+ const handleClearParamsFromURL = (0, import_react50.useCallback)(() => {
15499
15486
  if (onClearParamsFromURL) {
15500
15487
  onClearParamsFromURL();
15501
15488
  } else {
15502
15489
  globalThis.location.replace("/painel");
15503
15490
  }
15504
15491
  }, [onClearParamsFromURL]);
15505
- const handleError = (0, import_react51.useCallback)(
15492
+ const handleError = (0, import_react50.useCallback)(
15506
15493
  (error) => {
15507
15494
  if (onError) {
15508
15495
  onError(error);
@@ -15513,7 +15500,7 @@ function useAppContent(config) {
15513
15500
  },
15514
15501
  [navigate, onError]
15515
15502
  );
15516
- const urlAuthConfig = (0, import_react51.useMemo)(
15503
+ const urlAuthConfig = (0, import_react50.useMemo)(
15517
15504
  () => ({
15518
15505
  setTokens,
15519
15506
  setSessionInfo,
@@ -15539,10 +15526,10 @@ function useAppContent(config) {
15539
15526
  );
15540
15527
  useUrlAuthentication(urlAuthConfig);
15541
15528
  const { sessionInfo } = useAuth();
15542
- const institutionIdToUse = (0, import_react51.useMemo)(() => {
15529
+ const institutionIdToUse = (0, import_react50.useMemo)(() => {
15543
15530
  return sessionInfo?.institutionId || getInstitutionId;
15544
15531
  }, [sessionInfo?.institutionId, getInstitutionId]);
15545
- (0, import_react51.useEffect)(() => {
15532
+ (0, import_react50.useEffect)(() => {
15546
15533
  if (institutionIdToUse && !initialized) {
15547
15534
  initialize(institutionIdToUse);
15548
15535
  }