@carlonicora/nextjs-jsonapi 4.2.3 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/{BlockNoteEditor-NTKPWYWW.mjs → BlockNoteEditor-7BKKGFH3.mjs} +2 -2
  2. package/dist/{BlockNoteEditor-J533UMWG.js → BlockNoteEditor-E6HJD4HB.js} +9 -9
  3. package/dist/{BlockNoteEditor-J533UMWG.js.map → BlockNoteEditor-E6HJD4HB.js.map} +1 -1
  4. package/dist/billing/index.js +371 -371
  5. package/dist/billing/index.mjs +1 -1
  6. package/dist/{chunk-NCWCC56Q.mjs → chunk-MELHUPVN.mjs} +28 -13
  7. package/dist/chunk-MELHUPVN.mjs.map +1 -0
  8. package/dist/{chunk-4EGA5UP5.js → chunk-TPGXNPGY.js} +202 -187
  9. package/dist/chunk-TPGXNPGY.js.map +1 -0
  10. package/dist/client/index.js +2 -2
  11. package/dist/client/index.mjs +1 -1
  12. package/dist/components/index.js +2 -2
  13. package/dist/components/index.mjs +1 -1
  14. package/dist/contexts/index.js +2 -2
  15. package/dist/contexts/index.mjs +1 -1
  16. package/dist/features/analytics/index.js +88 -88
  17. package/dist/features/analytics/index.mjs +1 -1
  18. package/dist/features/help/index.js +31 -31
  19. package/dist/features/help/index.mjs +1 -1
  20. package/dist/features/tokenusage/index.js +75 -75
  21. package/dist/features/tokenusage/index.mjs +1 -1
  22. package/dist/next-config/index.d.mts +0 -1
  23. package/dist/next-config/index.d.ts +0 -1
  24. package/dist/next-config/index.js +0 -6
  25. package/dist/next-config/index.js.map +1 -1
  26. package/dist/next-config/index.mjs +0 -6
  27. package/dist/next-config/index.mjs.map +1 -1
  28. package/package.json +4 -2
  29. package/pwa/offline.template.html +138 -0
  30. package/pwa/sw.js +175 -0
  31. package/src/features/notification/components/notifications/PushNotificationProvider.tsx +5 -1
  32. package/src/features/notification/components/notifications/__tests__/PushNotificationProvider.spec.tsx +51 -0
  33. package/src/hooks/__tests__/usePushNotifications.spec.tsx +87 -34
  34. package/src/hooks/usePushNotifications.ts +42 -18
  35. package/src/next-config/__tests__/createNextConfig.spec.ts +7 -5
  36. package/src/next-config/index.ts +1 -8
  37. package/src/pwa/__tests__/offline.template.spec.ts +246 -0
  38. package/src/pwa/__tests__/sw.spec.ts +309 -0
  39. package/dist/chunk-4EGA5UP5.js.map +0 -1
  40. package/dist/chunk-NCWCC56Q.mjs.map +0 -1
  41. /package/dist/{BlockNoteEditor-NTKPWYWW.mjs.map → BlockNoteEditor-7BKKGFH3.mjs.map} +0 -0
@@ -12,7 +12,6 @@
12
12
 
13
13
 
14
14
 
15
-
16
15
  var _chunkGPXYQMOZjs = require('./chunk-GPXYQMOZ.js');
17
16
 
18
17
 
@@ -10684,7 +10683,7 @@ FileInput.displayName = "FileInput";
10684
10683
  var _dynamic = require('next/dynamic'); var _dynamic2 = _interopRequireDefault(_dynamic);
10685
10684
 
10686
10685
 
10687
- var BlockNoteEditor = _dynamic2.default.call(void 0, () => Promise.resolve().then(() => _interopRequireWildcard(require("./BlockNoteEditor-J533UMWG.js"))), {
10686
+ var BlockNoteEditor = _dynamic2.default.call(void 0, () => Promise.resolve().then(() => _interopRequireWildcard(require("./BlockNoteEditor-E6HJD4HB.js"))), {
10688
10687
  ssr: false
10689
10688
  });
10690
10689
  var BlockNoteEditorContainer = React2.default.memo(/* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, function EditorContainer(props) {
@@ -15185,16 +15184,16 @@ function urlBase64ToUint8Array(base64String) {
15185
15184
  return outputArray;
15186
15185
  }
15187
15186
  _chunk7QVYU63Ejs.__name.call(void 0, urlBase64ToUint8Array, "urlBase64ToUint8Array");
15188
- function usePushNotifications() {
15189
- const { currentUser, hasRole } = useCurrentUserContext();
15187
+ function usePushNotifications(params) {
15188
+ const { currentUser, canSubscribe } = params;
15189
+ const userId = _optionalChain([currentUser, 'optionalAccess', _459 => _459.id]);
15190
15190
  _react.useEffect.call(void 0, () => {
15191
+ if (!userId || !canSubscribe) return;
15191
15192
  const register = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
15192
15193
  if ("serviceWorker" in navigator && "PushManager" in window) {
15193
15194
  try {
15194
- const sessionKey = `push_registered_${_optionalChain([currentUser, 'optionalAccess', _459 => _459.id])}`;
15195
- const lastRegisteredSubscription = sessionStorage.getItem(sessionKey);
15196
- const swUrl = _chunkGHE4VT2Rjs.ENV.IS_PRODUCTION ? `${_chunkGPXYQMOZjs.getAppUrl.call(void 0, )}/sw.js` : `${_chunkGPXYQMOZjs.getAppUrl.call(void 0, )}/sw-dev.js`;
15197
- const registration = await navigator.serviceWorker.register(swUrl);
15195
+ const sessionKey = `push_registered_${userId}`;
15196
+ const registration = await navigator.serviceWorker.register("/sw.js", { updateViaCache: "none" });
15198
15197
  let permission = Notification.permission;
15199
15198
  if (permission === "default") {
15200
15199
  permission = await Notification.requestPermission();
@@ -15221,7 +15220,7 @@ function usePushNotifications() {
15221
15220
  keys: subscription.toJSON().keys
15222
15221
  };
15223
15222
  const subscriptionHash = btoa(JSON.stringify(plainSubscription));
15224
- if (lastRegisteredSubscription !== subscriptionHash) {
15223
+ if (sessionStorage.getItem(sessionKey) !== subscriptionHash) {
15225
15224
  await _chunk4ORLPEK7js.PushService.register({ data: plainSubscription });
15226
15225
  sessionStorage.setItem(sessionKey, subscriptionHash);
15227
15226
  }
@@ -15230,8 +15229,23 @@ function usePushNotifications() {
15230
15229
  }
15231
15230
  }
15232
15231
  }, "register");
15233
- if (currentUser && !hasRole(_chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator)) register();
15234
- }, [currentUser]);
15232
+ register();
15233
+ }, [userId, canSubscribe]);
15234
+ _react.useEffect.call(void 0, () => {
15235
+ if (!userId || !canSubscribe) return;
15236
+ if (!("serviceWorker" in navigator)) return;
15237
+ const sessionKey = `push_registered_${userId}`;
15238
+ const onMessage = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (event) => {
15239
+ if (_optionalChain([event, 'access', _460 => _460.data, 'optionalAccess', _461 => _461.type]) !== "PUSH_RESUBSCRIBED" || !event.data.subscription) return;
15240
+ const subscription = event.data.subscription;
15241
+ const subscriptionHash = btoa(JSON.stringify(subscription));
15242
+ if (sessionStorage.getItem(sessionKey) === subscriptionHash) return;
15243
+ void _chunk4ORLPEK7js.PushService.register({ data: subscription }).then(() => sessionStorage.setItem(sessionKey, subscriptionHash)).catch((error) => console.error("Error re-registering rotated push subscription:", error));
15244
+ }, "onMessage");
15245
+ const container = navigator.serviceWorker;
15246
+ container.addEventListener("message", onMessage);
15247
+ return () => container.removeEventListener("message", onMessage);
15248
+ }, [userId, canSubscribe]);
15235
15249
  }
15236
15250
  _chunk7QVYU63Ejs.__name.call(void 0, usePushNotifications, "usePushNotifications");
15237
15251
 
@@ -15304,14 +15318,14 @@ function useSocket({ token }) {
15304
15318
  });
15305
15319
  }, "handleMessage");
15306
15320
  const handleNotification = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (data) => {
15307
- const resource = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _460 => _460.data]), () => ( _optionalChain([data, 'optionalAccess', _461 => _461.jsonApi])));
15308
- if (!_optionalChain([resource, 'optionalAccess', _462 => _462.type])) {
15321
+ const resource = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _462 => _462.data]), () => ( _optionalChain([data, 'optionalAccess', _463 => _463.jsonApi])));
15322
+ if (!_optionalChain([resource, 'optionalAccess', _464 => _464.type])) {
15309
15323
  console.warn("[useSocket] ignoring notification with unexpected payload shape", data);
15310
15324
  return;
15311
15325
  }
15312
15326
  const notification = _chunk4ORLPEK7js.rehydrate.call(void 0, _chunk4ORLPEK7js.Modules.Notification, {
15313
15327
  jsonApi: resource,
15314
- included: _optionalChain([data, 'optionalAccess', _463 => _463.included]) || []
15328
+ included: _optionalChain([data, 'optionalAccess', _465 => _465.included]) || []
15315
15329
  });
15316
15330
  if (notification) {
15317
15331
  setSocketNotifications((prev) => {
@@ -15435,11 +15449,11 @@ function BreadcrumbMobile({
15435
15449
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Breadcrumb, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BreadcrumbList, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BreadcrumbItem, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Link, { href: generateUrl({ page: `/` }), children: rootLabel }) }) }) });
15436
15450
  }
15437
15451
  if (allItems.length <= 1) {
15438
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-foreground block min-w-0 truncate px-1.5 text-xs/relaxed font-normal", children: _optionalChain([lastItem, 'optionalAccess', _464 => _464.name]) });
15452
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-foreground block min-w-0 truncate px-1.5 text-xs/relaxed font-normal", children: _optionalChain([lastItem, 'optionalAccess', _466 => _466.name]) });
15439
15453
  }
15440
15454
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DropdownMenu, { open, onOpenChange: setOpen, children: [
15441
15455
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DropdownMenuTrigger, { className: "text-foreground text-xs/relaxed font-normal hover:bg-accent flex min-h-9 min-w-0 items-center gap-1 rounded-md px-1.5 py-0.5 transition-colors outline-none", children: [
15442
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "truncate", children: _optionalChain([lastItem, 'optionalAccess', _465 => _465.name]) }),
15456
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "truncate", children: _optionalChain([lastItem, 'optionalAccess', _467 => _467.name]) }),
15443
15457
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronDownIcon, { className: "text-muted-foreground size-3.5 shrink-0" })
15444
15458
  ] }),
15445
15459
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DropdownMenuContent, { align: "start", children: allItems.map(
@@ -15457,8 +15471,8 @@ function BreadcrumbMobile({
15457
15471
  href: item.href,
15458
15472
  className: _chunk4ORLPEK7js.cn.call(void 0, props.className, "text-foreground font-normal"),
15459
15473
  onClick: (event) => {
15460
- _optionalChain([props, 'access', _466 => _466.onClick, 'optionalCall', _467 => _467(event)]);
15461
- _optionalChain([item, 'access', _468 => _468.onClick, 'optionalCall', _469 => _469()]);
15474
+ _optionalChain([props, 'access', _468 => _468.onClick, 'optionalCall', _469 => _469(event)]);
15475
+ _optionalChain([item, 'access', _470 => _470.onClick, 'optionalCall', _471 => _471()]);
15462
15476
  },
15463
15477
  children: props.children
15464
15478
  }
@@ -15476,7 +15490,7 @@ function BreadcrumbNavigation({ items, rootLabel, showRoot = true }) {
15476
15490
  const generateUrl = usePageUrlGenerator();
15477
15491
  const t = _nextintl.useTranslations.call(void 0, );
15478
15492
  const isMobile = _chunk4ORLPEK7js.useIsMobile.call(void 0, );
15479
- const root = _optionalChain([rootLabel, 'optionalAccess', _470 => _470.trim, 'call', _471 => _471()]) ? rootLabel : t(`common.home`);
15493
+ const root = _optionalChain([rootLabel, 'optionalAccess', _472 => _472.trim, 'call', _473 => _473()]) ? rootLabel : t(`common.home`);
15480
15494
  if (isMobile) {
15481
15495
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BreadcrumbMobile, { items, generateUrl, rootLabel: root, showRoot });
15482
15496
  }
@@ -15874,12 +15888,12 @@ var _remarkgfm = require('remark-gfm'); var _remarkgfm2 = _interopRequireDefault
15874
15888
 
15875
15889
  function mermaidSourceOf(node) {
15876
15890
  const pre = node;
15877
- const code = _optionalChain([pre, 'optionalAccess', _472 => _472.children, 'optionalAccess', _473 => _473[0]]);
15878
- if (_optionalChain([code, 'optionalAccess', _474 => _474.tagName]) !== "code") return void 0;
15879
- const classNames = Array.isArray(_optionalChain([code, 'access', _475 => _475.properties, 'optionalAccess', _476 => _476.className])) ? code.properties.className : [];
15891
+ const code = _optionalChain([pre, 'optionalAccess', _474 => _474.children, 'optionalAccess', _475 => _475[0]]);
15892
+ if (_optionalChain([code, 'optionalAccess', _476 => _476.tagName]) !== "code") return void 0;
15893
+ const classNames = Array.isArray(_optionalChain([code, 'access', _477 => _477.properties, 'optionalAccess', _478 => _478.className])) ? code.properties.className : [];
15880
15894
  if (!classNames.includes("language-mermaid")) return void 0;
15881
- const text = _optionalChain([code, 'access', _477 => _477.children, 'optionalAccess', _478 => _478[0]]);
15882
- if (_optionalChain([text, 'optionalAccess', _479 => _479.type]) !== "text" || typeof text.value !== "string") return void 0;
15895
+ const text = _optionalChain([code, 'access', _479 => _479.children, 'optionalAccess', _480 => _480[0]]);
15896
+ if (_optionalChain([text, 'optionalAccess', _481 => _481.type]) !== "text" || typeof text.value !== "string") return void 0;
15883
15897
  return text.value;
15884
15898
  }
15885
15899
  _chunk7QVYU63Ejs.__name.call(void 0, mermaidSourceOf, "mermaidSourceOf");
@@ -16136,7 +16150,7 @@ var railTriggerClass = _chunk4ORLPEK7js.cn.call(void 0,
16136
16150
  "data-active:text-primary dark:data-active:text-primary",
16137
16151
  "data-active:font-medium data-active:shadow-none"
16138
16152
  );
16139
- var tabValue = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (tab) => _nullishCoalesce(_nullishCoalesce(tab.sectionKey, () => ( _optionalChain([tab, 'access', _480 => _480.key, 'optionalAccess', _481 => _481.name]))), () => ( tab.label)), "tabValue");
16153
+ var tabValue = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (tab) => _nullishCoalesce(_nullishCoalesce(tab.sectionKey, () => ( _optionalChain([tab, 'access', _482 => _482.key, 'optionalAccess', _483 => _483.name]))), () => ( tab.label)), "tabValue");
16140
16154
  function RoundPageContainer({
16141
16155
  module,
16142
16156
  id,
@@ -16168,7 +16182,7 @@ function RoundPageContainer({
16168
16182
  const [mounted, setMounted] = _react.useState.call(void 0, false);
16169
16183
  _react.useEffect.call(void 0, () => {
16170
16184
  const match = document.cookie.split("; ").find((row) => row.startsWith(`${detailsCookieName}=`));
16171
- const stored = _optionalChain([match, 'optionalAccess', _482 => _482.split, 'call', _483 => _483("="), 'access', _484 => _484[1]]);
16185
+ const stored = _optionalChain([match, 'optionalAccess', _484 => _484.split, 'call', _485 => _485("="), 'access', _486 => _486[1]]);
16172
16186
  if (stored === "true") setShowDetailsState(true);
16173
16187
  else if (stored === "false") setShowDetailsState(false);
16174
16188
  }, []);
@@ -16183,7 +16197,7 @@ function RoundPageContainer({
16183
16197
  const clip = isFixed ? `overflow-hidden` : ``;
16184
16198
  const scrollY = isFixed ? `overflow-y-auto` : ``;
16185
16199
  const mobileBarClass = isFixed ? `` : `sticky bottom-0 z-30`;
16186
- const detailsCookieName = _optionalChain([module, 'optionalAccess', _485 => _485.name]) ? `${DETAILS_COOKIE_NAME}_${module.name}` : DETAILS_COOKIE_NAME;
16200
+ const detailsCookieName = _optionalChain([module, 'optionalAccess', _487 => _487.name]) ? `${DETAILS_COOKIE_NAME}_${module.name}` : DETAILS_COOKIE_NAME;
16187
16201
  const setShowDetails = _react.useCallback.call(void 0,
16188
16202
  (value) => {
16189
16203
  setShowDetailsState(value);
@@ -16216,13 +16230,13 @@ function RoundPageContainer({
16216
16230
  } else {
16217
16231
  rewriteUrl({ page: window.location.pathname, additionalParameters: { section: key }, mode: "push" });
16218
16232
  }
16219
- _optionalChain([onSectionChange, 'optionalCall', _486 => _486(key)]);
16233
+ _optionalChain([onSectionChange, 'optionalCall', _488 => _488(key)]);
16220
16234
  },
16221
16235
  [module, id, rewriteUrl, onSectionChange]
16222
16236
  );
16223
- const activeTabDefinition = _optionalChain([tabs, 'optionalAccess', _487 => _487.find, 'call', _488 => _488((t2) => tabValue(t2) === activeTab)]);
16224
- const activeFillHeight = _optionalChain([activeTabDefinition, 'optionalAccess', _489 => _489.fillHeight]) === true;
16225
- const activeConstrainWidth = _optionalChain([activeTabDefinition, 'optionalAccess', _490 => _490.constrainWidth]) === true;
16237
+ const activeTabDefinition = _optionalChain([tabs, 'optionalAccess', _489 => _489.find, 'call', _490 => _490((t2) => tabValue(t2) === activeTab)]);
16238
+ const activeFillHeight = _optionalChain([activeTabDefinition, 'optionalAccess', _491 => _491.fillHeight]) === true;
16239
+ const activeConstrainWidth = _optionalChain([activeTabDefinition, 'optionalAccess', _492 => _492.constrainWidth]) === true;
16226
16240
  const { ungrouped, groups } = _react.useMemo.call(void 0, () => partitionTabs(_nullishCoalesce(tabs, () => ( []))), [tabs]);
16227
16241
  const tabItems = _react.useMemo.call(void 0,
16228
16242
  () => Object.fromEntries((_nullishCoalesce(tabs, () => ( []))).map((tab) => [tabValue(tab), _nullishCoalesce(tab.contentLabel, () => ( tab.label))])),
@@ -16233,7 +16247,7 @@ function RoundPageContainer({
16233
16247
  const mobileFlow = isMobile && isFixed && (!activeFillHeight || activeDocumentTab) && !fullWidth;
16234
16248
  const innerClip = mobileFlow ? `` : clip;
16235
16249
  const innerScrollY = mobileFlow ? `` : scrollY;
16236
- const showMobileSectionPicker = (_nullishCoalesce(_optionalChain([tabs, 'optionalAccess', _491 => _491.length]), () => ( 0))) > 1;
16250
+ const showMobileSectionPicker = (_nullishCoalesce(_optionalChain([tabs, 'optionalAccess', _493 => _493.length]), () => ( 0))) > 1;
16237
16251
  if (!isReady) {
16238
16252
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
16239
16253
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -16633,14 +16647,14 @@ function BlockNoteEditorMentionHoverCard({
16633
16647
  const entityType = target.dataset.mentionType;
16634
16648
  const alias = target.dataset.mentionAlias;
16635
16649
  setHovered((prev) => {
16636
- if (_optionalChain([prev, 'optionalAccess', _492 => _492.id]) === id && _optionalChain([prev, 'optionalAccess', _493 => _493.element]) === target) return prev;
16650
+ if (_optionalChain([prev, 'optionalAccess', _494 => _494.id]) === id && _optionalChain([prev, 'optionalAccess', _495 => _495.element]) === target) return prev;
16637
16651
  return { id, entityType, alias, element: target };
16638
16652
  });
16639
16653
  }, "handleMouseOver");
16640
16654
  const handleMouseOut = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (e) => {
16641
16655
  const target = e.target.closest("[data-mention-id]");
16642
16656
  if (!target) return;
16643
- const related = _optionalChain([e, 'access', _494 => _494.relatedTarget, 'optionalAccess', _495 => _495.closest, 'call', _496 => _496("[data-mention-id]")]);
16657
+ const related = _optionalChain([e, 'access', _496 => _496.relatedTarget, 'optionalAccess', _497 => _497.closest, 'call', _498 => _498("[data-mention-id]")]);
16644
16658
  if (related) return;
16645
16659
  scheduleClose();
16646
16660
  }, "handleMouseOut");
@@ -16654,7 +16668,7 @@ function BlockNoteEditorMentionHoverCard({
16654
16668
  }, [containerRef, mentionResolveFn, cancelClose, scheduleClose]);
16655
16669
  if (!hovered || !mentionResolveFn) return null;
16656
16670
  const resolved = mentionResolveFn(hovered.id, hovered.entityType, hovered.alias);
16657
- if (!_optionalChain([resolved, 'optionalAccess', _497 => _497.HoverContent])) return null;
16671
+ if (!_optionalChain([resolved, 'optionalAccess', _499 => _499.HoverContent])) return null;
16658
16672
  const ContentComponent = resolved.HoverContent;
16659
16673
  const rect = hovered.element.getBoundingClientRect();
16660
16674
  return _reactdom.createPortal.call(void 0,
@@ -16698,28 +16712,28 @@ var parseMentionElement = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
16698
16712
  }, "parseMentionElement");
16699
16713
  var createMentionInlineContentSpec = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (resolveFn, disableMention, nameResolver) => {
16700
16714
  const MentionExternalHTML = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (props) => {
16701
- const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall', _498 => _498(props.id, props.entityType, props.alias)]), () => ( props.alias));
16715
+ const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall', _500 => _500(props.id, props.entityType, props.alias)]), () => ( props.alias));
16702
16716
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { "data-mention-id": props.id, "data-mention-type": props.entityType, "data-mention-alias": props.alias, children: [
16703
16717
  "@",
16704
16718
  displayName
16705
16719
  ] });
16706
16720
  }, "MentionExternalHTML");
16707
16721
  const Mention = React2.default.memo(/* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, function Mention2(props) {
16708
- const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall', _499 => _499(props.id, props.entityType, props.alias)]), () => ( props.alias));
16722
+ const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall', _501 => _501(props.id, props.entityType, props.alias)]), () => ( props.alias));
16709
16723
  if (disableMention) {
16710
- const resolved2 = _optionalChain([resolveFn, 'optionalCall', _500 => _500(props.id, props.entityType, displayName)]);
16711
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _link2.default, { href: _nullishCoalesce(_optionalChain([resolved2, 'optionalAccess', _501 => _501.url]), () => ( "#")), className: "text-primary", children: [
16724
+ const resolved2 = _optionalChain([resolveFn, 'optionalCall', _502 => _502(props.id, props.entityType, displayName)]);
16725
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _link2.default, { href: _nullishCoalesce(_optionalChain([resolved2, 'optionalAccess', _503 => _503.url]), () => ( "#")), className: "text-primary", children: [
16712
16726
  "@",
16713
16727
  displayName
16714
16728
  ] });
16715
16729
  }
16716
- const resolved = _optionalChain([resolveFn, 'optionalCall', _502 => _502(props.id, props.entityType, displayName)]);
16717
- if (_optionalChain([resolved, 'optionalAccess', _503 => _503.Inline])) {
16730
+ const resolved = _optionalChain([resolveFn, 'optionalCall', _504 => _504(props.id, props.entityType, displayName)]);
16731
+ if (_optionalChain([resolved, 'optionalAccess', _505 => _505.Inline])) {
16718
16732
  const Custom = resolved.Inline;
16719
16733
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Custom, { ...props, alias: displayName });
16720
16734
  }
16721
- const href = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _504 => _504.url]), () => ( "#"));
16722
- const handleClick = _optionalChain([resolved, 'optionalAccess', _505 => _505.onActivate]) ? (e) => resolved.onActivate(e, props) : void 0;
16735
+ const href = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _506 => _506.url]), () => ( "#"));
16736
+ const handleClick = _optionalChain([resolved, 'optionalAccess', _507 => _507.onActivate]) ? (e) => resolved.onActivate(e, props) : void 0;
16723
16737
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
16724
16738
  _link2.default,
16725
16739
  {
@@ -16827,7 +16841,7 @@ function BlockNoteEditorMentionSuggestionMenu({
16827
16841
  if (!suggestionMenuComponent) return void 0;
16828
16842
  const Component2 = suggestionMenuComponent;
16829
16843
  const Wrapped = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (props) => {
16830
- const isSentinelOnly = props.items.length === 1 && _optionalChain([props, 'access', _506 => _506.items, 'access', _507 => _507[0], 'optionalAccess', _508 => _508.title]) === KEEP_OPEN_SENTINEL_TITLE;
16844
+ const isSentinelOnly = props.items.length === 1 && _optionalChain([props, 'access', _508 => _508.items, 'access', _509 => _509[0], 'optionalAccess', _510 => _510.title]) === KEEP_OPEN_SENTINEL_TITLE;
16831
16845
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
16832
16846
  Component2,
16833
16847
  {
@@ -16836,7 +16850,7 @@ function BlockNoteEditorMentionSuggestionMenu({
16836
16850
  selectedIndex: isSentinelOnly ? void 0 : props.selectedIndex,
16837
16851
  onItemClick: (item) => {
16838
16852
  if (item.title === KEEP_OPEN_SENTINEL_TITLE) return;
16839
- _optionalChain([props, 'access', _509 => _509.onItemClick, 'optionalCall', _510 => _510(item)]);
16853
+ _optionalChain([props, 'access', _511 => _511.onItemClick, 'optionalCall', _512 => _512(item)]);
16840
16854
  }
16841
16855
  }
16842
16856
  );
@@ -17050,10 +17064,10 @@ var cellId = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => {
17050
17064
  cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => params.toggleId ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
17051
17065
  SelectRowCheckbox,
17052
17066
  {
17053
- checked: _optionalChain([params, 'access', _511 => _511.checkedIds, 'optionalAccess', _512 => _512.includes, 'call', _513 => _513(row.getValue(params.name))]) || false,
17067
+ checked: _optionalChain([params, 'access', _513 => _513.checkedIds, 'optionalAccess', _514 => _514.includes, 'call', _515 => _515(row.getValue(params.name))]) || false,
17054
17068
  onCheckedChange: (value) => {
17055
17069
  row.toggleSelected(!!value);
17056
- _optionalChain([params, 'access', _514 => _514.toggleId, 'optionalCall', _515 => _515(row.getValue(params.name))]);
17070
+ _optionalChain([params, 'access', _516 => _516.toggleId, 'optionalCall', _517 => _517(row.getValue(params.name))]);
17057
17071
  }
17058
17072
  }
17059
17073
  ) : null, "cell"),
@@ -17111,7 +17125,7 @@ function useJsonApiGet(params) {
17111
17125
  const [response, setResponse] = _react.useState.call(void 0, null);
17112
17126
  const isMounted = _react.useRef.call(void 0, true);
17113
17127
  const fetchData = _react.useCallback.call(void 0, async () => {
17114
- if (_optionalChain([params, 'access', _516 => _516.options, 'optionalAccess', _517 => _517.enabled]) === false) return;
17128
+ if (_optionalChain([params, 'access', _518 => _518.options, 'optionalAccess', _519 => _519.enabled]) === false) return;
17115
17129
  setLoading(true);
17116
17130
  setError(null);
17117
17131
  try {
@@ -17138,9 +17152,9 @@ function useJsonApiGet(params) {
17138
17152
  setLoading(false);
17139
17153
  }
17140
17154
  }
17141
- }, [params.classKey, params.endpoint, params.companyId, _optionalChain([params, 'access', _518 => _518.options, 'optionalAccess', _519 => _519.enabled])]);
17155
+ }, [params.classKey, params.endpoint, params.companyId, _optionalChain([params, 'access', _520 => _520.options, 'optionalAccess', _521 => _521.enabled])]);
17142
17156
  const fetchNextPage = _react.useCallback.call(void 0, async () => {
17143
- if (!_optionalChain([response, 'optionalAccess', _520 => _520.nextPage])) return;
17157
+ if (!_optionalChain([response, 'optionalAccess', _522 => _522.nextPage])) return;
17144
17158
  setLoading(true);
17145
17159
  try {
17146
17160
  const nextResponse = await response.nextPage();
@@ -17161,7 +17175,7 @@ function useJsonApiGet(params) {
17161
17175
  }
17162
17176
  }, [response]);
17163
17177
  const fetchPreviousPage = _react.useCallback.call(void 0, async () => {
17164
- if (!_optionalChain([response, 'optionalAccess', _521 => _521.prevPage])) return;
17178
+ if (!_optionalChain([response, 'optionalAccess', _523 => _523.prevPage])) return;
17165
17179
  setLoading(true);
17166
17180
  try {
17167
17181
  const prevResponse = await response.prevPage();
@@ -17187,15 +17201,15 @@ function useJsonApiGet(params) {
17187
17201
  return () => {
17188
17202
  isMounted.current = false;
17189
17203
  };
17190
- }, [fetchData, ..._optionalChain([params, 'access', _522 => _522.options, 'optionalAccess', _523 => _523.deps]) || []]);
17204
+ }, [fetchData, ..._optionalChain([params, 'access', _524 => _524.options, 'optionalAccess', _525 => _525.deps]) || []]);
17191
17205
  return {
17192
17206
  data,
17193
17207
  loading,
17194
17208
  error,
17195
17209
  response,
17196
17210
  refetch: fetchData,
17197
- hasNextPage: !!_optionalChain([response, 'optionalAccess', _524 => _524.next]),
17198
- hasPreviousPage: !!_optionalChain([response, 'optionalAccess', _525 => _525.prev]),
17211
+ hasNextPage: !!_optionalChain([response, 'optionalAccess', _526 => _526.next]),
17212
+ hasPreviousPage: !!_optionalChain([response, 'optionalAccess', _527 => _527.prev]),
17199
17213
  fetchNextPage,
17200
17214
  fetchPreviousPage
17201
17215
  };
@@ -17273,17 +17287,17 @@ function useJsonApiMutation(config) {
17273
17287
  if (apiResponse.ok) {
17274
17288
  const resultData = apiResponse.data;
17275
17289
  setData(resultData);
17276
- _optionalChain([config, 'access', _526 => _526.onSuccess, 'optionalCall', _527 => _527(resultData)]);
17290
+ _optionalChain([config, 'access', _528 => _528.onSuccess, 'optionalCall', _529 => _529(resultData)]);
17277
17291
  return resultData;
17278
17292
  } else {
17279
17293
  setError(apiResponse.error);
17280
- _optionalChain([config, 'access', _528 => _528.onError, 'optionalCall', _529 => _529(apiResponse.error)]);
17294
+ _optionalChain([config, 'access', _530 => _530.onError, 'optionalCall', _531 => _531(apiResponse.error)]);
17281
17295
  return null;
17282
17296
  }
17283
17297
  } catch (err) {
17284
17298
  const errorMessage = err instanceof Error ? err.message : "Unknown error";
17285
17299
  setError(errorMessage);
17286
- _optionalChain([config, 'access', _530 => _530.onError, 'optionalCall', _531 => _531(errorMessage)]);
17300
+ _optionalChain([config, 'access', _532 => _532.onError, 'optionalCall', _533 => _533(errorMessage)]);
17287
17301
  return null;
17288
17302
  } finally {
17289
17303
  setLoading(false);
@@ -17356,7 +17370,7 @@ var useCompanyTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
17356
17370
  {
17357
17371
  href: hasRole(_chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator) ? generateUrl({
17358
17372
  page: "/administration",
17359
- id: _optionalChain([_chunk4ORLPEK7js.Modules, 'access', _532 => _532.Company, 'access', _533 => _533.pageUrl, 'optionalAccess', _534 => _534.substring, 'call', _535 => _535(1)]),
17373
+ id: _optionalChain([_chunk4ORLPEK7js.Modules, 'access', _534 => _534.Company, 'access', _535 => _535.pageUrl, 'optionalAccess', _536 => _536.substring, 'call', _537 => _537(1)]),
17360
17374
  childPage: company.id
17361
17375
  }) : generateUrl({ page: _chunk4ORLPEK7js.Modules.Company, id: company.id }),
17362
17376
  children: row.getValue("name")
@@ -17372,7 +17386,7 @@ var useCompanyTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
17372
17386
  })
17373
17387
  };
17374
17388
  const columns = _react.useMemo.call(void 0, () => {
17375
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _536 => _536[field], 'optionalCall', _537 => _537()])).filter((col) => col !== void 0);
17389
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _538 => _538[field], 'optionalCall', _539 => _539()])).filter((col) => col !== void 0);
17376
17390
  }, [params.fields, fieldColumnMap, t, generateUrl, hasRole]);
17377
17391
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
17378
17392
  }, "useCompanyTableStructure");
@@ -17385,7 +17399,7 @@ var DAY_MS = 1e3 * 60 * 60 * 24;
17385
17399
  var isAdministrator = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (currentUser) => {
17386
17400
  if (!currentUser || !_chunkG4JR3SFVjs.isRolesConfigured.call(void 0, )) return false;
17387
17401
  const adminRoleId = _chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator;
17388
- return !!_optionalChain([currentUser, 'access', _538 => _538.roles, 'optionalAccess', _539 => _539.some, 'call', _540 => _540((role) => role.id === adminRoleId)]);
17402
+ return !!_optionalChain([currentUser, 'access', _540 => _540.roles, 'optionalAccess', _541 => _541.some, 'call', _542 => _542((role) => role.id === adminRoleId)]);
17389
17403
  }, "isAdministrator");
17390
17404
  function useSubscriptionStatus() {
17391
17405
  const { company, currentUser } = useCurrentUserContext();
@@ -17502,7 +17516,7 @@ var useRoleTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0,
17502
17516
  })
17503
17517
  };
17504
17518
  const columns = _react.useMemo.call(void 0, () => {
17505
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _541 => _541[field], 'optionalCall', _542 => _542()])).filter((col) => col !== void 0);
17519
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _543 => _543[field], 'optionalCall', _544 => _544()])).filter((col) => col !== void 0);
17506
17520
  }, [params.fields, fieldColumnMap, t, generateUrl]);
17507
17521
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
17508
17522
  }, "useRoleTableStructure");
@@ -17619,8 +17633,8 @@ var useStripePriceTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(
17619
17633
  const t = _nextintl.useTranslations.call(void 0, );
17620
17634
  const fmt = useBillingFormatOptions();
17621
17635
  const generateUrl = usePageUrlGenerator();
17622
- const onClone = _optionalChain([params, 'access', _543 => _543.context, 'optionalAccess', _544 => _544.onClone]);
17623
- const onExport = _optionalChain([params, 'access', _545 => _545.context, 'optionalAccess', _546 => _546.onExport]);
17636
+ const onClone = _optionalChain([params, 'access', _545 => _545.context, 'optionalAccess', _546 => _546.onClone]);
17637
+ const onExport = _optionalChain([params, 'access', _547 => _547.context, 'optionalAccess', _548 => _548.onExport]);
17624
17638
  const tableData = _react.useMemo.call(void 0, () => {
17625
17639
  return params.data.map((price) => {
17626
17640
  const entry = { jsonApiData: price };
@@ -17685,7 +17699,7 @@ var useStripePriceTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(
17685
17699
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex flex-wrap items-center gap-1", children: [
17686
17700
  price.active ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { variant: "softGreen", children: t("billing.admin.prices.status.active") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { variant: "softGray", children: t("billing.admin.prices.status.archived") }),
17687
17701
  price.isTrial && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { variant: "softBlue", children: t("billing.admin.prices.badge.trial") }),
17688
- _optionalChain([price, 'access', _547 => _547.recurring, 'optionalAccess', _548 => _548.usageType]) === "metered" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { variant: "softBlue", children: t("billing.admin.prices.badge.metered") })
17702
+ _optionalChain([price, 'access', _549 => _549.recurring, 'optionalAccess', _550 => _550.usageType]) === "metered" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { variant: "softBlue", children: t("billing.admin.prices.badge.metered") })
17689
17703
  ] });
17690
17704
  }, "cell"),
17691
17705
  enableSorting: false,
@@ -17733,7 +17747,7 @@ var useStripePriceTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(
17733
17747
  })
17734
17748
  };
17735
17749
  const columns = _react.useMemo.call(void 0, () => {
17736
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _549 => _549[field], 'optionalCall', _550 => _550()])).filter((col) => col !== void 0);
17750
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _551 => _551[field], 'optionalCall', _552 => _552()])).filter((col) => col !== void 0);
17737
17751
  }, [params.fields, fieldColumnMap, t, fmt, generateUrl, onClone, onExport]);
17738
17752
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
17739
17753
  }, "useStripePriceTableStructure");
@@ -17792,7 +17806,7 @@ var useStripeProductTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.cal
17792
17806
  })
17793
17807
  };
17794
17808
  const columns = _react.useMemo.call(void 0, () => {
17795
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _551 => _551[field], 'optionalCall', _552 => _552()])).filter((col) => col !== void 0);
17809
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _553 => _553[field], 'optionalCall', _554 => _554()])).filter((col) => col !== void 0);
17796
17810
  }, [params.fields, fieldColumnMap, t, generateUrl]);
17797
17811
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
17798
17812
  }, "useStripeProductTableStructure");
@@ -17815,7 +17829,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, parseQuestionnaire, "parseQuestionnaire");
17815
17829
  var useWaitlistTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => {
17816
17830
  const t = _nextintl.useTranslations.call(void 0, );
17817
17831
  const locale = _chunk4ORLPEK7js.useI18nLocale.call(void 0, );
17818
- const onInvite = _optionalChain([params, 'access', _553 => _553.context, 'optionalAccess', _554 => _554.onInvite]);
17832
+ const onInvite = _optionalChain([params, 'access', _555 => _555.context, 'optionalAccess', _556 => _556.onInvite]);
17819
17833
  const tableData = _react.useMemo.call(void 0, () => {
17820
17834
  return params.data.map((entry) => {
17821
17835
  const row = { jsonApiData: entry };
@@ -17895,7 +17909,7 @@ var useWaitlistTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(voi
17895
17909
  cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => {
17896
17910
  const entry = row.original.jsonApiData;
17897
17911
  if (entry.status === "confirmed") {
17898
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Button, { size: "sm", variant: "outline", onClick: () => _optionalChain([onInvite, 'optionalCall', _555 => _555(entry)]), children: [
17912
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Button, { size: "sm", variant: "outline", onClick: () => _optionalChain([onInvite, 'optionalCall', _557 => _557(entry)]), children: [
17899
17913
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Send, { className: "me-2 h-4 w-4" }),
17900
17914
  t("waitlist.admin.actions.invite")
17901
17915
  ] });
@@ -17913,7 +17927,7 @@ var useWaitlistTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(voi
17913
17927
  })
17914
17928
  };
17915
17929
  const columns = _react.useMemo.call(void 0, () => {
17916
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _556 => _556[field], 'optionalCall', _557 => _557()])).filter((col) => col !== void 0);
17930
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _558 => _558[field], 'optionalCall', _559 => _559()])).filter((col) => col !== void 0);
17917
17931
  }, [params.fields, fieldColumnMap, t, locale]);
17918
17932
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
17919
17933
  }, "useWaitlistTableStructure");
@@ -18014,11 +18028,11 @@ var useContentTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
18014
18028
  return params.fields.map((field) => {
18015
18029
  const localHandler = fieldColumnMap[field];
18016
18030
  if (localHandler) return localHandler();
18017
- const customHandler = _optionalChain([params, 'access', _558 => _558.context, 'optionalAccess', _559 => _559.customCells, 'optionalAccess', _560 => _560[field]]);
18031
+ const customHandler = _optionalChain([params, 'access', _560 => _560.context, 'optionalAccess', _561 => _561.customCells, 'optionalAccess', _562 => _562[field]]);
18018
18032
  if (customHandler) return customHandler({ t });
18019
18033
  return void 0;
18020
18034
  }).filter((col) => col !== void 0);
18021
- }, [params.fields, fieldColumnMap, t, generateUrl, _optionalChain([params, 'access', _561 => _561.context, 'optionalAccess', _562 => _562.customCells])]);
18035
+ }, [params.fields, fieldColumnMap, t, generateUrl, _optionalChain([params, 'access', _563 => _563.context, 'optionalAccess', _564 => _564.customCells])]);
18022
18036
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
18023
18037
  }, "useContentTableStructure");
18024
18038
 
@@ -18253,17 +18267,17 @@ function useOAuthConsent(params, options) {
18253
18267
  const [error, setError] = _react.useState.call(void 0, null);
18254
18268
  const [isSubmitting, setIsSubmitting] = _react.useState.call(void 0, false);
18255
18269
  const [companyId, setCompanyId] = _react.useState.call(void 0, void 0);
18256
- const contextCompanyId = _optionalChain([useCurrentUserContextOptional, 'call', _563 => _563(), 'optionalAccess', _564 => _564.company, 'optionalAccess', _565 => _565.id]);
18257
- const currentCompanyId = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _566 => _566.defaultCompanyId]), () => ( contextCompanyId));
18270
+ const contextCompanyId = _optionalChain([useCurrentUserContextOptional, 'call', _565 => _565(), 'optionalAccess', _566 => _566.company, 'optionalAccess', _567 => _567.id]);
18271
+ const currentCompanyId = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _568 => _568.defaultCompanyId]), () => ( contextCompanyId));
18258
18272
  const t = _nextintl.useTranslations.call(void 0, );
18259
18273
  const tRef = _react.useRef.call(void 0, t);
18260
18274
  tRef.current = t;
18261
18275
  _react.useEffect.call(void 0, () => {
18262
- const companies = _nullishCoalesce(_optionalChain([clientInfo, 'optionalAccess', _567 => _567.companies]), () => ( []));
18276
+ const companies = _nullishCoalesce(_optionalChain([clientInfo, 'optionalAccess', _569 => _569.companies]), () => ( []));
18263
18277
  if (companies.length === 0) return;
18264
18278
  if (companyId && companies.some((company) => company.id === companyId)) return;
18265
18279
  const current = currentCompanyId ? companies.find((company) => company.id === currentCompanyId) : void 0;
18266
- setCompanyId(_nullishCoalesce(_optionalChain([current, 'optionalAccess', _568 => _568.id]), () => ( _optionalChain([companies, 'access', _569 => _569[0], 'optionalAccess', _570 => _570.id]))));
18280
+ setCompanyId(_nullishCoalesce(_optionalChain([current, 'optionalAccess', _570 => _570.id]), () => ( _optionalChain([companies, 'access', _571 => _571[0], 'optionalAccess', _572 => _572.id]))));
18267
18281
  }, [clientInfo, currentCompanyId, companyId]);
18268
18282
  _react.useEffect.call(void 0, () => {
18269
18283
  const fetchInfo = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
@@ -18349,7 +18363,7 @@ function useOAuthScopeText() {
18349
18363
  };
18350
18364
  }
18351
18365
  const info = typeof scope === "string" ? void 0 : scope;
18352
- return { name: _optionalChain([info, 'optionalAccess', _571 => _571.name]) || id, description: _nullishCoalesce(_optionalChain([info, 'optionalAccess', _572 => _572.description]), () => ( "")) };
18366
+ return { name: _optionalChain([info, 'optionalAccess', _573 => _573.name]) || id, description: _nullishCoalesce(_optionalChain([info, 'optionalAccess', _574 => _574.description]), () => ( "")) };
18353
18367
  },
18354
18368
  [t]
18355
18369
  );
@@ -18403,7 +18417,7 @@ function ContentTableSearch({ data }) {
18403
18417
  const handleSearchIconClick = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
18404
18418
  if (!isExpanded) {
18405
18419
  setIsFocused(true);
18406
- setTimeout(() => _optionalChain([inputRef, 'access', _573 => _573.current, 'optionalAccess', _574 => _574.focus, 'call', _575 => _575()]), 50);
18420
+ setTimeout(() => _optionalChain([inputRef, 'access', _575 => _575.current, 'optionalAccess', _576 => _576.focus, 'call', _577 => _577()]), 50);
18407
18421
  }
18408
18422
  }, "handleSearchIconClick");
18409
18423
  const handleBlur = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
@@ -18489,7 +18503,7 @@ function getGroupKeys(item, field) {
18489
18503
  return [String(_nullishCoalesce(value, () => ( "")))];
18490
18504
  }
18491
18505
  _chunk7QVYU63Ejs.__name.call(void 0, getGroupKeys, "getGroupKeys");
18492
- var isClassComponent = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (component) => typeof component === "function" && !!_optionalChain([component, 'access', _576 => _576.prototype, 'optionalAccess', _577 => _577.isReactComponent]), "isClassComponent");
18506
+ var isClassComponent = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (component) => typeof component === "function" && !!_optionalChain([component, 'access', _578 => _578.prototype, 'optionalAccess', _579 => _579.isReactComponent]), "isClassComponent");
18493
18507
  function StableCell({ render, context }) {
18494
18508
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: render(context) });
18495
18509
  }
@@ -18513,7 +18527,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
18513
18527
  if (data.isLoaded) setPendingDirection(null);
18514
18528
  }, [data.isLoaded]);
18515
18529
  const { data: tableData, columns: tableColumns } = useTableGenerator(props.tableGeneratorType, {
18516
- data: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _578 => _578.data]), () => ( EMPTY_ARRAY)),
18530
+ data: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _580 => _580.data]), () => ( EMPTY_ARRAY)),
18517
18531
  fields,
18518
18532
  checkedIds,
18519
18533
  toggleId,
@@ -18543,7 +18557,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
18543
18557
  ...props.renderExpandedRow && {
18544
18558
  getExpandedRowModel: _reacttable.getExpandedRowModel.call(void 0, ),
18545
18559
  // Key rows by record id so an expansion stays with its record when a search or filter reorders the rows.
18546
- getRowId: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (row, index) => _nullishCoalesce(_optionalChain([row, 'access', _579 => _579.jsonApiData, 'optionalAccess', _580 => _580.id]), () => ( String(index))), "getRowId"),
18560
+ getRowId: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (row, index) => _nullishCoalesce(_optionalChain([row, 'access', _581 => _581.jsonApiData, 'optionalAccess', _582 => _582.id]), () => ( String(index))), "getRowId"),
18547
18561
  getRowCanExpand: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => true, "getRowCanExpand"),
18548
18562
  onExpandedChange: setExpanded,
18549
18563
  state: { expanded }
@@ -18560,7 +18574,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
18560
18574
  });
18561
18575
  const rowModel = tableData ? table.getRowModel() : null;
18562
18576
  const groupedRows = _react.useMemo.call(void 0, () => {
18563
- if (!props.groupBy || !_optionalChain([rowModel, 'optionalAccess', _581 => _581.rows, 'optionalAccess', _582 => _582.length])) return null;
18577
+ if (!props.groupBy || !_optionalChain([rowModel, 'optionalAccess', _583 => _583.rows, 'optionalAccess', _584 => _584.length])) return null;
18564
18578
  const groupMap = /* @__PURE__ */ new Map();
18565
18579
  for (const row of rowModel.rows) {
18566
18580
  const keys = getGroupKeys(row.original, props.groupBy);
@@ -18639,20 +18653,20 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
18639
18653
  ) }),
18640
18654
  !props.hideHeader && table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: headerGroup.headers.map((header) => {
18641
18655
  const meta = header.column.columnDef.meta;
18642
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableHead, { className: _optionalChain([meta, 'optionalAccess', _583 => _583.className]), children: header.isPlaceholder ? null : _reacttable.flexRender.call(void 0, header.column.columnDef.header, header.getContext()) }, header.id);
18656
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableHead, { className: _optionalChain([meta, 'optionalAccess', _585 => _585.className]), children: header.isPlaceholder ? null : _reacttable.flexRender.call(void 0, header.column.columnDef.header, header.getContext()) }, header.id);
18643
18657
  }) }, headerGroup.id))
18644
18658
  ] }),
18645
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: rowModel && _optionalChain([rowModel, 'access', _584 => _584.rows, 'optionalAccess', _585 => _585.length]) ? groupedRows ? groupedRows.map((group) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, React2.default.Fragment, { children: [
18646
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { colSpan: tableColumns.length, className: "bg-muted px-4 py-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MicroLabel, { children: _nullishCoalesce(_optionalChain([props, 'access', _586 => _586.groupLabel, 'optionalCall', _587 => _587(group.groupKey)]), () => ( group.groupKey)) }) }) }),
18659
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: rowModel && _optionalChain([rowModel, 'access', _586 => _586.rows, 'optionalAccess', _587 => _587.length]) ? groupedRows ? groupedRows.map((group) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, React2.default.Fragment, { children: [
18660
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { colSpan: tableColumns.length, className: "bg-muted px-4 py-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MicroLabel, { children: _nullishCoalesce(_optionalChain([props, 'access', _588 => _588.groupLabel, 'optionalCall', _589 => _589(group.groupKey)]), () => ( group.groupKey)) }) }) }),
18647
18661
  group.rows.map((row) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, React2.default.Fragment, { children: [
18648
18662
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
18649
18663
  TableRow,
18650
18664
  {
18651
- onClick: () => _optionalChain([onRowClick, 'optionalCall', _588 => _588(row.original.jsonApiData)]),
18665
+ onClick: () => _optionalChain([onRowClick, 'optionalCall', _590 => _590(row.original.jsonApiData)]),
18652
18666
  className: `group ${onRowClick ? "hover:bg-muted/50 cursor-pointer" : ""}`,
18653
18667
  children: row.getVisibleCells().map((cell) => {
18654
18668
  const meta = cell.column.columnDef.meta;
18655
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess', _589 => _589.className]), children: renderCell(cell.column.columnDef.cell, cell.getContext()) }, cell.id);
18669
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess', _591 => _591.className]), children: renderCell(cell.column.columnDef.cell, cell.getContext()) }, cell.id);
18656
18670
  })
18657
18671
  }
18658
18672
  ),
@@ -18662,11 +18676,11 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
18662
18676
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
18663
18677
  TableRow,
18664
18678
  {
18665
- onClick: () => _optionalChain([onRowClick, 'optionalCall', _590 => _590(row.original.jsonApiData)]),
18679
+ onClick: () => _optionalChain([onRowClick, 'optionalCall', _592 => _592(row.original.jsonApiData)]),
18666
18680
  className: `group ${onRowClick ? "hover:bg-muted/50 cursor-pointer" : ""}`,
18667
18681
  children: row.getVisibleCells().map((cell) => {
18668
18682
  const meta = cell.column.columnDef.meta;
18669
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess', _591 => _591.className]), children: renderCell(cell.column.columnDef.cell, cell.getContext()) }, cell.id);
18683
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess', _593 => _593.className]), children: renderCell(cell.column.columnDef.cell, cell.getContext()) }, cell.id);
18670
18684
  })
18671
18685
  }
18672
18686
  ),
@@ -18681,7 +18695,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
18681
18695
  onClick: (e) => {
18682
18696
  e.preventDefault();
18683
18697
  setPendingDirection("prev");
18684
- _optionalChain([data, 'access', _592 => _592.previous, 'optionalCall', _593 => _593(true)]);
18698
+ _optionalChain([data, 'access', _594 => _594.previous, 'optionalCall', _595 => _595(true)]);
18685
18699
  },
18686
18700
  disabled: !data.previous || pendingDirection !== null,
18687
18701
  children: pendingDirection === "prev" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronLeft, { className: "h-4 w-4 rtl:rotate-180" })
@@ -18696,7 +18710,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
18696
18710
  onClick: (e) => {
18697
18711
  e.preventDefault();
18698
18712
  setPendingDirection("next");
18699
- _optionalChain([data, 'access', _594 => _594.next, 'optionalCall', _595 => _595(true)]);
18713
+ _optionalChain([data, 'access', _596 => _596.next, 'optionalCall', _597 => _597(true)]);
18700
18714
  },
18701
18715
  disabled: !data.next || pendingDirection !== null,
18702
18716
  children: pendingDirection === "next" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronRight, { className: "h-4 w-4 rtl:rotate-180" })
@@ -18718,7 +18732,7 @@ function ContentListGrid(props) {
18718
18732
  if (!data.next || !sentinelRef.current) return;
18719
18733
  const observer = new IntersectionObserver(
18720
18734
  (entries) => {
18721
- if (_optionalChain([entries, 'access', _596 => _596[0], 'optionalAccess', _597 => _597.isIntersecting])) _optionalChain([data, 'access', _598 => _598.next, 'optionalCall', _599 => _599()]);
18735
+ if (_optionalChain([entries, 'access', _598 => _598[0], 'optionalAccess', _599 => _599.isIntersecting])) _optionalChain([data, 'access', _600 => _600.next, 'optionalCall', _601 => _601()]);
18722
18736
  },
18723
18737
  { threshold: 0.1, rootMargin: "200px" }
18724
18738
  );
@@ -19505,7 +19519,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
19505
19519
  newDigits[index] = digit;
19506
19520
  setDigits(newDigits);
19507
19521
  if (digit && index < 5) {
19508
- _optionalChain([inputRefs, 'access', _600 => _600.current, 'access', _601 => _601[index + 1], 'optionalAccess', _602 => _602.focus, 'call', _603 => _603()]);
19522
+ _optionalChain([inputRefs, 'access', _602 => _602.current, 'access', _603 => _603[index + 1], 'optionalAccess', _604 => _604.focus, 'call', _605 => _605()]);
19509
19523
  }
19510
19524
  const code = newDigits.join("");
19511
19525
  if (code.length === 6 && newDigits.every((d) => d !== "")) {
@@ -19514,7 +19528,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
19514
19528
  }, "handleChange");
19515
19529
  const handleKeyDown = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (index, e) => {
19516
19530
  if (e.key === "Backspace" && !digits[index] && index > 0) {
19517
- _optionalChain([inputRefs, 'access', _604 => _604.current, 'access', _605 => _605[index - 1], 'optionalAccess', _606 => _606.focus, 'call', _607 => _607()]);
19531
+ _optionalChain([inputRefs, 'access', _606 => _606.current, 'access', _607 => _607[index - 1], 'optionalAccess', _608 => _608.focus, 'call', _609 => _609()]);
19518
19532
  }
19519
19533
  }, "handleKeyDown");
19520
19534
  const handlePaste = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (e) => {
@@ -19523,7 +19537,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
19523
19537
  if (pastedData.length === 6) {
19524
19538
  const newDigits = pastedData.split("");
19525
19539
  setDigits(newDigits);
19526
- _optionalChain([inputRefs, 'access', _608 => _608.current, 'access', _609 => _609[5], 'optionalAccess', _610 => _610.focus, 'call', _611 => _611()]);
19540
+ _optionalChain([inputRefs, 'access', _610 => _610.current, 'access', _611 => _611[5], 'optionalAccess', _612 => _612.focus, 'call', _613 => _613()]);
19527
19541
  onComplete(pastedData);
19528
19542
  }
19529
19543
  }, "handlePaste");
@@ -19735,8 +19749,8 @@ function PasskeySetupDialog({ open, onOpenChange, onSuccess }) {
19735
19749
  try {
19736
19750
  const registrationData = await _chunk4ORLPEK7js.TwoFactorService.getPasskeyRegistrationOptions({
19737
19751
  id: _uuid.v4.call(void 0, ),
19738
- userName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _612 => _612.email]), () => ( "")),
19739
- userDisplayName: _optionalChain([currentUser, 'optionalAccess', _613 => _613.name])
19752
+ userName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _614 => _614.email]), () => ( "")),
19753
+ userDisplayName: _optionalChain([currentUser, 'optionalAccess', _615 => _615.name])
19740
19754
  });
19741
19755
  const credential = await _browser.startRegistration.call(void 0, { optionsJSON: registrationData.options });
19742
19756
  await _chunk4ORLPEK7js.TwoFactorService.verifyPasskeyRegistration({
@@ -19888,7 +19902,7 @@ function TotpSetupDialog({ onSuccess, trigger }) {
19888
19902
  const setup = await _chunk4ORLPEK7js.TwoFactorService.setupTotp({
19889
19903
  id: _uuid.v4.call(void 0, ),
19890
19904
  name: name.trim(),
19891
- accountName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _614 => _614.email]), () => ( ""))
19905
+ accountName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _616 => _616.email]), () => ( ""))
19892
19906
  });
19893
19907
  setQrCodeUri(setup.qrCodeUri);
19894
19908
  setAuthenticatorId(setup.authenticatorId);
@@ -20022,7 +20036,7 @@ function TwoFactorSettings() {
20022
20036
  if (isLoading) {
20023
20037
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardContent, { className: "flex items-center justify-center py-8", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground", children: t("common.loading") }) }) });
20024
20038
  }
20025
- const isEnabled = _nullishCoalesce(_optionalChain([status, 'optionalAccess', _615 => _615.isEnabled]), () => ( false));
20039
+ const isEnabled = _nullishCoalesce(_optionalChain([status, 'optionalAccess', _617 => _617.isEnabled]), () => ( false));
20026
20040
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Card, { children: [
20027
20041
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
20028
20042
  isEnabled ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ShieldCheck, { className: "text-success h-6 w-6" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ShieldAlert, { className: "text-warning h-6 w-6" }),
@@ -20060,7 +20074,7 @@ function TwoFactorSettings() {
20060
20074
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "font-medium", children: t("auth.two_factor.backup_codes") }),
20061
20075
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: t("auth.two_factor.backup_codes_description") })
20062
20076
  ] }),
20063
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BackupCodesDialog, { remainingCodes: _nullishCoalesce(_optionalChain([status, 'optionalAccess', _616 => _616.backupCodesCount]), () => ( 0)), onRegenerate: handleRefresh })
20077
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BackupCodesDialog, { remainingCodes: _nullishCoalesce(_optionalChain([status, 'optionalAccess', _618 => _618.backupCodesCount]), () => ( 0)), onRegenerate: handleRefresh })
20064
20078
  ] }) }),
20065
20079
  !isEnabled && (authenticators.length > 0 || passkeys.length > 0) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
20066
20080
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Separator, {}),
@@ -20240,9 +20254,9 @@ function AcceptInvitation() {
20240
20254
  });
20241
20255
  const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (values) => {
20242
20256
  try {
20243
- if (!_optionalChain([params, 'optionalAccess', _617 => _617.code])) return;
20257
+ if (!_optionalChain([params, 'optionalAccess', _619 => _619.code])) return;
20244
20258
  const payload = {
20245
- code: _optionalChain([params, 'optionalAccess', _618 => _618.code]),
20259
+ code: _optionalChain([params, 'optionalAccess', _620 => _620.code]),
20246
20260
  password: values.password
20247
20261
  };
20248
20262
  await _chunk4ORLPEK7js.AuthService.acceptInvitation(payload);
@@ -20613,14 +20627,14 @@ function RefreshUser() {
20613
20627
  setUser(fullUser);
20614
20628
  const token = {
20615
20629
  userId: fullUser.id,
20616
- companyId: _optionalChain([fullUser, 'access', _619 => _619.company, 'optionalAccess', _620 => _620.id]),
20630
+ companyId: _optionalChain([fullUser, 'access', _621 => _621.company, 'optionalAccess', _622 => _622.id]),
20617
20631
  roles: fullUser.roles.map((role) => role.id),
20618
- features: _nullishCoalesce(_optionalChain([fullUser, 'access', _621 => _621.company, 'optionalAccess', _622 => _622.features, 'optionalAccess', _623 => _623.map, 'call', _624 => _624((feature) => feature.id)]), () => ( [])),
20632
+ features: _nullishCoalesce(_optionalChain([fullUser, 'access', _623 => _623.company, 'optionalAccess', _624 => _624.features, 'optionalAccess', _625 => _625.map, 'call', _626 => _626((feature) => feature.id)]), () => ( [])),
20619
20633
  modules: fullUser.modules.map((module) => {
20620
20634
  return { id: module.id, permissions: module.permissions };
20621
20635
  })
20622
20636
  };
20623
- await _optionalChain([_chunk4ORLPEK7js.getTokenHandler.call(void 0, ), 'optionalAccess', _625 => _625.updateToken, 'call', _626 => _626(token)]);
20637
+ await _optionalChain([_chunk4ORLPEK7js.getTokenHandler.call(void 0, ), 'optionalAccess', _627 => _627.updateToken, 'call', _628 => _628(token)]);
20624
20638
  _cookiesnext.deleteCookie.call(void 0, "reloadData");
20625
20639
  }
20626
20640
  }, "loadFullUser");
@@ -20684,9 +20698,9 @@ function ResetPassword() {
20684
20698
  });
20685
20699
  const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (values) => {
20686
20700
  try {
20687
- if (!_optionalChain([params, 'optionalAccess', _627 => _627.code])) return;
20701
+ if (!_optionalChain([params, 'optionalAccess', _629 => _629.code])) return;
20688
20702
  const payload = {
20689
- code: _optionalChain([params, 'optionalAccess', _628 => _628.code]),
20703
+ code: _optionalChain([params, 'optionalAccess', _630 => _630.code]),
20690
20704
  password: values.password
20691
20705
  };
20692
20706
  await _chunk4ORLPEK7js.AuthService.resetPassword(payload);
@@ -21221,7 +21235,7 @@ function AiConnectionEditor({
21221
21235
  const registryRows = _react.useMemo.call(void 0, () => _nullishCoalesce(providerRegistry[connectionType], () => ( [])), [providerRegistry, connectionType]);
21222
21236
  const providers = _react.useMemo.call(void 0, () => registryRows.map((row) => row.provider), [registryRows]);
21223
21237
  const fieldsFor = _react.useCallback.call(void 0,
21224
- (provider) => _nullishCoalesce(_optionalChain([registryRows, 'access', _629 => _629.find, 'call', _630 => _630((row) => row.provider === provider), 'optionalAccess', _631 => _631.fields]), () => ( [])),
21238
+ (provider) => _nullishCoalesce(_optionalChain([registryRows, 'access', _631 => _631.find, 'call', _632 => _632((row) => row.provider === provider), 'optionalAccess', _633 => _633.fields]), () => ( [])),
21225
21239
  [registryRows]
21226
21240
  );
21227
21241
  const defaultsFor = _react.useCallback.call(void 0,
@@ -21230,7 +21244,7 @@ function AiConnectionEditor({
21230
21244
  const seeded = {};
21231
21245
  fieldsFor(provider).forEach((descriptor) => {
21232
21246
  if (descriptor.kind === "boolean") {
21233
- const current2 = _optionalChain([stored, 'optionalAccess', _632 => _632[descriptor.field]]);
21247
+ const current2 = _optionalChain([stored, 'optionalAccess', _634 => _634[descriptor.field]]);
21234
21248
  seeded[descriptor.field] = current2 !== void 0 && current2 !== null ? current2 === true : descriptor.default === true;
21235
21249
  return;
21236
21250
  }
@@ -21238,7 +21252,7 @@ function AiConnectionEditor({
21238
21252
  seeded[descriptor.field] = "";
21239
21253
  return;
21240
21254
  }
21241
- const current = _optionalChain([stored, 'optionalAccess', _633 => _633[descriptor.field]]);
21255
+ const current = _optionalChain([stored, 'optionalAccess', _635 => _635[descriptor.field]]);
21242
21256
  if (current !== void 0 && current !== null) seeded[descriptor.field] = String(current);
21243
21257
  else seeded[descriptor.field] = descriptor.default !== void 0 ? String(descriptor.default) : "";
21244
21258
  });
@@ -21264,7 +21278,7 @@ function AiConnectionEditor({
21264
21278
  values: _zod3.z.record(_zod3.z.string(), _zod3.z.any())
21265
21279
  }).superRefine((data, ctx) => {
21266
21280
  fieldsFor(data.provider).filter((descriptor) => descriptor.required).forEach((descriptor) => {
21267
- const value = _optionalChain([data, 'access', _634 => _634.values, 'optionalAccess', _635 => _635[descriptor.field]]);
21281
+ const value = _optionalChain([data, 'access', _636 => _636.values, 'optionalAccess', _637 => _637[descriptor.field]]);
21268
21282
  const filled = descriptor.kind === "secret" ? !!value || hasStoredSecret(descriptor.field) : descriptor.kind === "boolean" ? value !== void 0 : value !== void 0 && value !== null && String(value).trim() !== "";
21269
21283
  if (filled) return;
21270
21284
  ctx.addIssue({
@@ -21278,11 +21292,11 @@ function AiConnectionEditor({
21278
21292
  );
21279
21293
  const getDefaultValues = _react.useCallback.call(void 0,
21280
21294
  () => ({
21281
- id: _nullishCoalesce(_optionalChain([connection, 'optionalAccess', _636 => _636.id]), () => ( _uuid.v4.call(void 0, ))),
21282
- name: _nullishCoalesce(_optionalChain([connection, 'optionalAccess', _637 => _637.name]), () => ( "")),
21283
- provider: _nullishCoalesce(_nullishCoalesce(_optionalChain([connection, 'optionalAccess', _638 => _638.provider]), () => ( providers[0])), () => ( "")),
21284
- enabled: _nullishCoalesce(_optionalChain([connection, 'optionalAccess', _639 => _639.enabled]), () => ( true)),
21285
- values: defaultsFor(_nullishCoalesce(_nullishCoalesce(_optionalChain([connection, 'optionalAccess', _640 => _640.provider]), () => ( providers[0])), () => ( "")))
21295
+ id: _nullishCoalesce(_optionalChain([connection, 'optionalAccess', _638 => _638.id]), () => ( _uuid.v4.call(void 0, ))),
21296
+ name: _nullishCoalesce(_optionalChain([connection, 'optionalAccess', _639 => _639.name]), () => ( "")),
21297
+ provider: _nullishCoalesce(_nullishCoalesce(_optionalChain([connection, 'optionalAccess', _640 => _640.provider]), () => ( providers[0])), () => ( "")),
21298
+ enabled: _nullishCoalesce(_optionalChain([connection, 'optionalAccess', _641 => _641.enabled]), () => ( true)),
21299
+ values: defaultsFor(_nullishCoalesce(_nullishCoalesce(_optionalChain([connection, 'optionalAccess', _642 => _642.provider]), () => ( providers[0])), () => ( "")))
21286
21300
  }),
21287
21301
  [connection, providers, defaultsFor]
21288
21302
  );
@@ -21293,7 +21307,7 @@ function AiConnectionEditor({
21293
21307
  _react.useEffect.call(void 0, () => {
21294
21308
  if (registryRows.length === 0) return;
21295
21309
  const currentProvider = form.getValues("provider");
21296
- const provider = currentProvider || _optionalChain([connection, 'optionalAccess', _641 => _641.provider]) || providers[0] || "";
21310
+ const provider = currentProvider || _optionalChain([connection, 'optionalAccess', _643 => _643.provider]) || providers[0] || "";
21297
21311
  if (!provider) return;
21298
21312
  if (provider !== currentProvider) form.setValue("provider", provider);
21299
21313
  const currentValues = form.getValues("values");
@@ -21364,7 +21378,7 @@ function AiConnectionEditor({
21364
21378
  {
21365
21379
  form,
21366
21380
  entityType: t("ai_connections.admin.entity"),
21367
- entityName: _optionalChain([connection, 'optionalAccess', _642 => _642.name]),
21381
+ entityName: _optionalChain([connection, 'optionalAccess', _644 => _644.name]),
21368
21382
  isEdit,
21369
21383
  module: _chunk4ORLPEK7js.Modules.AiConnection,
21370
21384
  size: "md",
@@ -21372,7 +21386,7 @@ function AiConnectionEditor({
21372
21386
  onSubmit: async (values) => {
21373
21387
  const attributes = {};
21374
21388
  fieldsFor(values.provider).forEach((descriptor) => {
21375
- const coerced = coerce(descriptor, _optionalChain([values, 'access', _643 => _643.values, 'optionalAccess', _644 => _644[descriptor.field]]));
21389
+ const coerced = coerce(descriptor, _optionalChain([values, 'access', _645 => _645.values, 'optionalAccess', _646 => _646[descriptor.field]]));
21376
21390
  if (coerced !== void 0) attributes[descriptor.field] = coerced;
21377
21391
  });
21378
21392
  const payload = {
@@ -21602,7 +21616,7 @@ function AiConnectionTypeCard({ connectionType }) {
21602
21616
  ),
21603
21617
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "bg-muted/40 flex flex-wrap items-center gap-2 px-3 py-2", children: [
21604
21618
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { variant: "softGray", children: t("ai_connections.admin.env_fallback") }),
21605
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground truncate text-xs", children: [_optionalChain([envDefault, 'optionalAccess', _645 => _645.provider]), _optionalChain([envDefault, 'optionalAccess', _646 => _646.model]), _optionalChain([envDefault, 'optionalAccess', _647 => _647.url])].filter(Boolean).join(" \xB7 ") })
21619
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground truncate text-xs", children: [_optionalChain([envDefault, 'optionalAccess', _647 => _647.provider]), _optionalChain([envDefault, 'optionalAccess', _648 => _648.model]), _optionalChain([envDefault, 'optionalAccess', _649 => _649.url])].filter(Boolean).join(" \xB7 ") })
21606
21620
  ] })
21607
21621
  ] })
21608
21622
  ] })
@@ -21800,7 +21814,7 @@ function extractHeadings(blocks) {
21800
21814
  function processBlocks(blockArray) {
21801
21815
  for (const block of blockArray) {
21802
21816
  if (block.type === "heading") {
21803
- const level = _optionalChain([block, 'access', _648 => _648.props, 'optionalAccess', _649 => _649.level]) || 1;
21817
+ const level = _optionalChain([block, 'access', _650 => _650.props, 'optionalAccess', _651 => _651.level]) || 1;
21804
21818
  const text = extractTextFromContent(block.content);
21805
21819
  if (text.trim()) {
21806
21820
  headings.push({
@@ -22160,7 +22174,7 @@ var useHowToTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0
22160
22174
  })
22161
22175
  };
22162
22176
  const columns = _react.useMemo.call(void 0, () => {
22163
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _650 => _650[field], 'optionalCall', _651 => _651()])).filter((col) => col !== void 0);
22177
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _652 => _652[field], 'optionalCall', _653 => _653()])).filter((col) => col !== void 0);
22164
22178
  }, [params.fields, fieldColumnMap, t, generateUrl]);
22165
22179
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
22166
22180
  }, "useHowToTableStructure");
@@ -22286,7 +22300,7 @@ function HowToSelector({
22286
22300
  }, "setHowTo");
22287
22301
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FormFieldWrapper, { form, name: id, label, isRequired, children: (field) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Popover, { open, onOpenChange: setOpen, modal: true, children: [
22288
22302
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between", children: [
22289
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-row items-center justify-start rounded-md", children: field.value ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-input/20 dark:bg-input/30 border-input flex h-7 w-full flex-row items-center justify-start rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _nullishCoalesce(_optionalChain([field, 'access', _652 => _652.value, 'optionalAccess', _653 => _653.name]), () => ( "")) }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-input/20 dark:bg-input/30 border-input text-muted-foreground flex h-7 w-full flex-row items-center justify-start rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed", children: _nullishCoalesce(placeholder, () => ( t(`generic.search.placeholder`, { type: t(`entities.howtos`, { count: 1 }) }))) }) }) }),
22303
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-row items-center justify-start rounded-md", children: field.value ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-input/20 dark:bg-input/30 border-input flex h-7 w-full flex-row items-center justify-start rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _nullishCoalesce(_optionalChain([field, 'access', _654 => _654.value, 'optionalAccess', _655 => _655.name]), () => ( "")) }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-input/20 dark:bg-input/30 border-input text-muted-foreground flex h-7 w-full flex-row items-center justify-start rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed", children: _nullishCoalesce(placeholder, () => ( t(`generic.search.placeholder`, { type: t(`entities.howtos`, { count: 1 }) }))) }) }) }),
22290
22304
  field.value && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
22291
22305
  _lucidereact.CircleX,
22292
22306
  {
@@ -22591,10 +22605,10 @@ function CitationsTab({ citations, sources }) {
22591
22605
  ] }) }),
22592
22606
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: sorted.map((chunk) => {
22593
22607
  const isOpen = expanded.has(chunk.id);
22594
- const resolved = chunk.nodeId ? _optionalChain([sources, 'optionalAccess', _654 => _654.get, 'call', _655 => _655(chunk.nodeId)]) : void 0;
22608
+ const resolved = chunk.nodeId ? _optionalChain([sources, 'optionalAccess', _656 => _656.get, 'call', _657 => _657(chunk.nodeId)]) : void 0;
22595
22609
  const typeLabel = chunk.nodeType ? entityLabel(chunk.nodeType) : t("features.assistant.message.sources.source");
22596
22610
  const fallbackName = chunk.nodeId ? `${typeLabel} ${chunk.nodeId.slice(0, 8)}` : typeLabel;
22597
- const sourceName = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _656 => _656.name]), () => ( fallbackName));
22611
+ const sourceName = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _658 => _658.name]), () => ( fallbackName));
22598
22612
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react.Fragment, { children: [
22599
22613
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, TableRow, { children: [
22600
22614
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
@@ -22658,7 +22672,7 @@ function ContentsTab({ citations, sources }) {
22658
22672
  for (const c of citations) {
22659
22673
  const id = c.nodeId;
22660
22674
  if (!id) continue;
22661
- const source = _optionalChain([sources, 'optionalAccess', _657 => _657.get, 'call', _658 => _658(id)]);
22675
+ const source = _optionalChain([sources, 'optionalAccess', _659 => _659.get, 'call', _660 => _660(id)]);
22662
22676
  if (!source) continue;
22663
22677
  const existing = map.get(id);
22664
22678
  if (existing) {
@@ -22725,7 +22739,7 @@ function UsersTab({ users, citations, sources }) {
22725
22739
  const generate = usePageUrlGenerator();
22726
22740
  const userMap = /* @__PURE__ */ new Map();
22727
22741
  for (const u of users) {
22728
- if (!_optionalChain([u, 'optionalAccess', _659 => _659.id])) continue;
22742
+ if (!_optionalChain([u, 'optionalAccess', _661 => _661.id])) continue;
22729
22743
  userMap.set(u.id, { user: u, contentCount: 0, citationCount: 0 });
22730
22744
  }
22731
22745
  if (citations && sources) {
@@ -22830,7 +22844,7 @@ function MessageSourcesPanel({ message, isLatestAssistant, onSelectFollowUp, sou
22830
22844
  }
22831
22845
  return ids.size;
22832
22846
  }, [message.citations, sources]);
22833
- const usersCount = _nullishCoalesce(_optionalChain([users, 'optionalAccess', _660 => _660.length]), () => ( 0));
22847
+ const usersCount = _nullishCoalesce(_optionalChain([users, 'optionalAccess', _662 => _662.length]), () => ( 0));
22834
22848
  const total = refsCount + citationsCount + contentsCount + usersCount + suggestionsCount;
22835
22849
  const visibleTabs = [];
22836
22850
  if (suggestionsCount > 0) visibleTabs.push("suggested");
@@ -22973,7 +22987,7 @@ function MessageSourcesContainer({ message, isLatestAssistant, onSelectFollowUp
22973
22987
  return void 0;
22974
22988
  }
22975
22989
  })()));
22976
- if (_optionalChain([author, 'optionalAccess', _661 => _661.id])) userMap.set(author.id, author);
22990
+ if (_optionalChain([author, 'optionalAccess', _663 => _663.id])) userMap.set(author.id, author);
22977
22991
  }
22978
22992
  return Array.from(userMap.values());
22979
22993
  }, [resolved]);
@@ -23008,7 +23022,7 @@ function MessageItem({
23008
23022
  }) {
23009
23023
  const t = _nextintl.useTranslations.call(void 0, );
23010
23024
  const isUser = message.role === "user";
23011
- const isFailed = isUser && !!_optionalChain([failedMessageIds, 'optionalAccess', _662 => _662.has, 'call', _663 => _663(message.id)]);
23025
+ const isFailed = isUser && !!_optionalChain([failedMessageIds, 'optionalAccess', _664 => _664.has, 'call', _665 => _665(message.id)]);
23012
23026
  const markdownComponents = _react.useMemo.call(void 0,
23013
23027
  () => ({
23014
23028
  a: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ href, children }) => {
@@ -23025,7 +23039,7 @@ function MessageItem({
23025
23039
  isFailed && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-destructive flex items-center gap-2 text-xs", children: [
23026
23040
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.AlertCircle, { className: "h-3.5 w-3.5" }),
23027
23041
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: t("features.assistant.send_failed") }),
23028
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", onClick: () => _optionalChain([onRetry, 'optionalCall', _664 => _664(message.id)]), children: t("features.assistant.retry") })
23042
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", onClick: () => _optionalChain([onRetry, 'optionalCall', _666 => _666(message.id)]), children: t("features.assistant.retry") })
23029
23043
  ] })
23030
23044
  ] });
23031
23045
  }
@@ -23116,7 +23130,7 @@ function AssistantThread({
23116
23130
  }) {
23117
23131
  const lastMessageRef = _react.useRef.call(void 0, null);
23118
23132
  _react.useEffect.call(void 0, () => {
23119
- _optionalChain([lastMessageRef, 'access', _665 => _665.current, 'optionalAccess', _666 => _666.scrollIntoView, 'call', _667 => _667({ block: "start", behavior: "smooth" })]);
23133
+ _optionalChain([lastMessageRef, 'access', _667 => _667.current, 'optionalAccess', _668 => _668.scrollIntoView, 'call', _669 => _669({ block: "start", behavior: "smooth" })]);
23120
23134
  }, [messages.length, sending]);
23121
23135
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 min-w-0 overflow-x-hidden overflow-y-auto px-6 py-5", children: [
23122
23136
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -23155,7 +23169,7 @@ ${message.sources.map((source) => `- \`${source}\``).join("\n")}`;
23155
23169
  return _chunk4ORLPEK7js.rehydrate.call(void 0, _chunk4ORLPEK7js.Modules.HandbookThreadMessage, {
23156
23170
  jsonApi: {
23157
23171
  ...dehydrated.jsonApi,
23158
- attributes: { ..._nullishCoalesce(_optionalChain([dehydrated, 'access', _668 => _668.jsonApi, 'optionalAccess', _669 => _669.attributes]), () => ( {})), content }
23172
+ attributes: { ..._nullishCoalesce(_optionalChain([dehydrated, 'access', _670 => _670.jsonApi, 'optionalAccess', _671 => _671.attributes]), () => ( {})), content }
23159
23173
  },
23160
23174
  included: dehydrated.included
23161
23175
  });
@@ -23164,8 +23178,8 @@ _chunk7QVYU63Ejs.__name.call(void 0, withSourcesInContent, "withSourcesInContent
23164
23178
  function useHandbookAsk(params) {
23165
23179
  const t = _nextintl.useTranslations.call(void 0, );
23166
23180
  const generateUrl = usePageUrlGenerator();
23167
- const shouldSyncUrl = _nullishCoalesce(_optionalChain([params, 'optionalAccess', _670 => _670.syncUrl]), () => ( true));
23168
- const handbookThreadId = _optionalChain([params, 'optionalAccess', _671 => _671.handbookThreadId]);
23181
+ const shouldSyncUrl = _nullishCoalesce(_optionalChain([params, 'optionalAccess', _672 => _672.syncUrl]), () => ( true));
23182
+ const handbookThreadId = _optionalChain([params, 'optionalAccess', _673 => _673.handbookThreadId]);
23169
23183
  const [threads, setThreads] = _react.useState.call(void 0, []);
23170
23184
  const [thread, setThread] = _react.useState.call(void 0, void 0);
23171
23185
  const [messages, setMessages] = _react.useState.call(void 0, []);
@@ -23227,12 +23241,12 @@ function useHandbookAsk(params) {
23227
23241
  ]);
23228
23242
  setSending(true);
23229
23243
  try {
23230
- let id = _optionalChain([thread, 'optionalAccess', _672 => _672.id]);
23244
+ let id = _optionalChain([thread, 'optionalAccess', _674 => _674.id]);
23231
23245
  if (id === void 0) {
23232
23246
  const created = await _chunk4ORLPEK7js.HandbookThreadService.create({
23233
23247
  id: _uuid.v4.call(void 0, ),
23234
23248
  question: trimmed,
23235
- handbookPageId: _optionalChain([options, 'optionalAccess', _673 => _673.handbookPageId])
23249
+ handbookPageId: _optionalChain([options, 'optionalAccess', _675 => _675.handbookPageId])
23236
23250
  });
23237
23251
  id = created.id;
23238
23252
  setThreads((current) => [created, ...current]);
@@ -23241,7 +23255,7 @@ function useHandbookAsk(params) {
23241
23255
  id: _uuid.v4.call(void 0, ),
23242
23256
  threadId: id,
23243
23257
  question: trimmed,
23244
- handbookPageId: _optionalChain([options, 'optionalAccess', _674 => _674.handbookPageId])
23258
+ handbookPageId: _optionalChain([options, 'optionalAccess', _676 => _676.handbookPageId])
23245
23259
  });
23246
23260
  }
23247
23261
  const loaded = await _chunk4ORLPEK7js.HandbookThreadService.findOne({ id });
@@ -23262,7 +23276,7 @@ function useHandbookAsk(params) {
23262
23276
  setSending(false);
23263
23277
  }
23264
23278
  },
23265
- [messages.length, sending, syncUrl, t, _optionalChain([thread, 'optionalAccess', _675 => _675.id])]
23279
+ [messages.length, sending, syncUrl, t, _optionalChain([thread, 'optionalAccess', _677 => _677.id])]
23266
23280
  );
23267
23281
  return { threads, thread, messages, sending, ask, selectThread, startNew };
23268
23282
  }
@@ -23818,7 +23832,7 @@ function HandbookPageContainer({ handbookPageId }) {
23818
23832
  };
23819
23833
  }, []);
23820
23834
  const section = _react.useMemo.call(void 0,
23821
- () => sections.find((candidate) => candidate.key === _optionalChain([handbookPage, 'optionalAccess', _676 => _676.section])),
23835
+ () => sections.find((candidate) => candidate.key === _optionalChain([handbookPage, 'optionalAccess', _678 => _678.section])),
23822
23836
  [sections, handbookPage]
23823
23837
  );
23824
23838
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -23907,7 +23921,7 @@ function AssistantSidebar({
23907
23921
  className: "block w-full truncate rounded-md px-2 py-1.5 text-start text-sm " + (activeId === thread.id ? "bg-primary/10 text-primary" : "hover:bg-muted text-foreground"),
23908
23922
  children: [
23909
23923
  thread.title,
23910
- _optionalChain([renderThreadBadge, 'optionalCall', _677 => _677(thread)])
23924
+ _optionalChain([renderThreadBadge, 'optionalCall', _679 => _679(thread)])
23911
23925
  ]
23912
23926
  },
23913
23927
  thread.id
@@ -23943,7 +23957,7 @@ function HandbookAskContainer({ handbookThreadId } = {}) {
23943
23957
  AssistantSidebar,
23944
23958
  {
23945
23959
  threads,
23946
- activeId: _optionalChain([thread, 'optionalAccess', _678 => _678.id]),
23960
+ activeId: _optionalChain([thread, 'optionalAccess', _680 => _680.id]),
23947
23961
  onSelect: selectThread,
23948
23962
  onNew: startNew,
23949
23963
  newLabel: t("handbook.chat.new"),
@@ -23951,7 +23965,7 @@ function HandbookAskContainer({ handbookThreadId } = {}) {
23951
23965
  }
23952
23966
  ) })
23953
23967
  ),
23954
- [selectThread, startNew, t, _optionalChain([thread, 'optionalAccess', _679 => _679.id]), threads]
23968
+ [selectThread, startNew, t, _optionalChain([thread, 'optionalAccess', _681 => _681.id]), threads]
23955
23969
  );
23956
23970
  return (
23957
23971
  // `RoundPageContainer` reads the page heading from the shared context, and
@@ -23963,7 +23977,7 @@ function HandbookAskContainer({ handbookThreadId } = {}) {
23963
23977
  RoundPageContainer,
23964
23978
  {
23965
23979
  module: _chunk4ORLPEK7js.Modules.HandbookPage,
23966
- id: _optionalChain([thread, 'optionalAccess', _680 => _680.id]),
23980
+ id: _optionalChain([thread, 'optionalAccess', _682 => _682.id]),
23967
23981
  fullWidth: true,
23968
23982
  forceHeader: true,
23969
23983
  defaultDetailsOpen: true,
@@ -24015,7 +24029,7 @@ function EntityMentionLinkView({ type, id, alias }) {
24015
24029
  } catch (e26) {
24016
24030
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: alias });
24017
24031
  }
24018
- if (!_optionalChain([module, 'optionalAccess', _681 => _681.pageUrl])) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: alias });
24032
+ if (!_optionalChain([module, 'optionalAccess', _683 => _683.pageUrl])) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: alias });
24019
24033
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Link, { href: generate({ page: module, id }), children: alias });
24020
24034
  }
24021
24035
  _chunk7QVYU63Ejs.__name.call(void 0, EntityMentionLinkView, "EntityMentionLinkView");
@@ -24147,13 +24161,13 @@ function AssistantContainer({
24147
24161
  AssistantSidebar,
24148
24162
  {
24149
24163
  threads: ctx.threads,
24150
- activeId: _optionalChain([ctx, 'access', _682 => _682.assistant, 'optionalAccess', _683 => _683.id]),
24164
+ activeId: _optionalChain([ctx, 'access', _684 => _684.assistant, 'optionalAccess', _685 => _685.id]),
24151
24165
  onSelect: ctx.selectThread,
24152
24166
  renderThreadBadge
24153
24167
  }
24154
24168
  ) })
24155
24169
  ),
24156
- [ctx.threads, _optionalChain([ctx, 'access', _684 => _684.assistant, 'optionalAccess', _685 => _685.id]), ctx.selectThread, renderThreadBadge]
24170
+ [ctx.threads, _optionalChain([ctx, 'access', _686 => _686.assistant, 'optionalAccess', _687 => _687.id]), ctx.selectThread, renderThreadBadge]
24157
24171
  );
24158
24172
  const thread = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: !showThread ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
24159
24173
  AssistantEmptyState,
@@ -24161,7 +24175,7 @@ function AssistantContainer({
24161
24175
  onSend: ctx.sendMessage,
24162
24176
  operatorMode: ctx.operatorMode,
24163
24177
  onOperatorModeChange: showOperatorToggle ? ctx.setOperatorMode : void 0,
24164
- composerLeading: _optionalChain([renderScopePicker, 'optionalCall', _686 => _686()])
24178
+ composerLeading: _optionalChain([renderScopePicker, 'optionalCall', _688 => _688()])
24165
24179
  }
24166
24180
  ) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
24167
24181
  ctx.assistant ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -24193,7 +24207,7 @@ function AssistantContainer({
24193
24207
  AssistantSidebar,
24194
24208
  {
24195
24209
  threads: ctx.threads,
24196
- activeId: _optionalChain([ctx, 'access', _687 => _687.assistant, 'optionalAccess', _688 => _688.id]),
24210
+ activeId: _optionalChain([ctx, 'access', _689 => _689.assistant, 'optionalAccess', _690 => _690.id]),
24197
24211
  onSelect: ctx.selectThread,
24198
24212
  onNew: ctx.startNew,
24199
24213
  renderThreadBadge
@@ -24206,7 +24220,7 @@ function AssistantContainer({
24206
24220
  RoundPageContainer,
24207
24221
  {
24208
24222
  module: _chunk4ORLPEK7js.Modules.Assistant,
24209
- id: _optionalChain([ctx, 'access', _689 => _689.assistant, 'optionalAccess', _690 => _690.id]),
24223
+ id: _optionalChain([ctx, 'access', _691 => _691.assistant, 'optionalAccess', _692 => _692.id]),
24210
24224
  fullWidth: true,
24211
24225
  forceHeader: true,
24212
24226
  defaultDetailsOpen: true,
@@ -24234,7 +24248,7 @@ function flattenBlocks(blocks) {
24234
24248
  if (typeof inline === "string") return inline;
24235
24249
  if (!inline || typeof inline !== "object") return "";
24236
24250
  const node = inline;
24237
- if (node.type === "mention") return _nullishCoalesce(_optionalChain([node, 'access', _691 => _691.props, 'optionalAccess', _692 => _692.alias]), () => ( ""));
24251
+ if (node.type === "mention") return _nullishCoalesce(_optionalChain([node, 'access', _693 => _693.props, 'optionalAccess', _694 => _694.alias]), () => ( ""));
24238
24252
  if (typeof node.text === "string") return node.text;
24239
24253
  if (Array.isArray(node.content)) return node.content.map(readInline).join("");
24240
24254
  return "";
@@ -24350,7 +24364,7 @@ function AssistantPageContainer({
24350
24364
  AssistantSidebar,
24351
24365
  {
24352
24366
  threads: ctx.threads,
24353
- activeId: _optionalChain([ctx, 'access', _693 => _693.assistant, 'optionalAccess', _694 => _694.id]),
24367
+ activeId: _optionalChain([ctx, 'access', _695 => _695.assistant, 'optionalAccess', _696 => _696.id]),
24354
24368
  onSelect: ctx.selectThread,
24355
24369
  onNew: ctx.startNew
24356
24370
  }
@@ -24626,14 +24640,14 @@ function ApprovalActionCard({ actionId, summary, onResolved, hiddenRelationshipK
24626
24640
  const presented = _react.useMemo.call(void 0, () => parseOperatorProposal(actionProposal), [actionProposal]);
24627
24641
  const legacy = _react.useMemo.call(void 0, () => presented ? void 0 : parseLegacyProposal(toolArgs), [presented, toolArgs]);
24628
24642
  const isUpdate = toolName === "update_entity";
24629
- const entityType = _nullishCoalesce(_nullishCoalesce(_optionalChain([presented, 'optionalAccess', _695 => _695.type]), () => ( _optionalChain([legacy, 'optionalAccess', _696 => _696.type]))), () => ( ""));
24643
+ const entityType = _nullishCoalesce(_nullishCoalesce(_optionalChain([presented, 'optionalAccess', _697 => _697.type]), () => ( _optionalChain([legacy, 'optionalAccess', _698 => _698.type]))), () => ( ""));
24630
24644
  const loose = t;
24631
24645
  const entityLabel = entityName(loose, entityType);
24632
- const targetLabel = _nullishCoalesce(_optionalChain([presented, 'optionalAccess', _697 => _697.target, 'optionalAccess', _698 => _698.label]), () => ( ""));
24646
+ const targetLabel = _nullishCoalesce(_optionalChain([presented, 'optionalAccess', _699 => _699.target, 'optionalAccess', _700 => _700.label]), () => ( ""));
24633
24647
  const rows = _react.useMemo.call(void 0, () => {
24634
24648
  const yes = t("features.assistant.approval.proposal.yes");
24635
24649
  const no = t("features.assistant.approval.proposal.no");
24636
- const attributes = _nullishCoalesce(_optionalChain([presented, 'optionalAccess', _699 => _699.attributes]), () => ( _optionalChain([legacy, 'optionalAccess', _700 => _700.attributes])));
24650
+ const attributes = _nullishCoalesce(_optionalChain([presented, 'optionalAccess', _701 => _701.attributes]), () => ( _optionalChain([legacy, 'optionalAccess', _702 => _702.attributes])));
24637
24651
  const attributeRows = Object.entries(_nullishCoalesce(attributes, () => ( {}))).flatMap(([key, value]) => {
24638
24652
  const text = formatAttribute(value, yes, no);
24639
24653
  return text === void 0 ? [] : [{ key: `attribute:${key}`, label: fieldLabel(loose, entityType, key), value: text }];
@@ -24671,7 +24685,7 @@ function ApprovalActionCard({ actionId, summary, onResolved, hiddenRelationshipK
24671
24685
  try {
24672
24686
  const message = kind === "approve" ? await _chunk4ORLPEK7js.AssistantActionService.approve({ id: actionId }) : await _chunk4ORLPEK7js.AssistantActionService.deny({ id: actionId });
24673
24687
  setStatus(kind === "approve" ? "executed" : "denied");
24674
- if (message) _optionalChain([onResolved, 'optionalCall', _701 => _701(message)]);
24688
+ if (message) _optionalChain([onResolved, 'optionalCall', _703 => _703(message)]);
24675
24689
  } catch (error) {
24676
24690
  console.error(`ApprovalActionCard: failed to ${kind} assistant action ${actionId}`, error);
24677
24691
  setFailed(true);
@@ -24816,10 +24830,10 @@ var useNotificationTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call
24816
24830
  const dateLocale = _chunk4ORLPEK7js.dateFormatLocale.call(void 0, _chunk4ORLPEK7js.useI18nLocale.call(void 0, ));
24817
24831
  const generateUrl = usePageUrlGenerator();
24818
24832
  const { loadNotifications } = useNotificationContext();
24819
- const archived = _optionalChain([params, 'access', _702 => _702.context, 'optionalAccess', _703 => _703.archived]) === true;
24833
+ const archived = _optionalChain([params, 'access', _704 => _704.context, 'optionalAccess', _705 => _705.archived]) === true;
24820
24834
  const archiveNotification = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (notification) => {
24821
24835
  await _chunk4ORLPEK7js.NotificationService.archive({ id: notification.id });
24822
- _optionalChain([params, 'access', _704 => _704.dataRetriever, 'optionalAccess', _705 => _705.removeElement, 'call', _706 => _706(notification)]);
24836
+ _optionalChain([params, 'access', _706 => _706.dataRetriever, 'optionalAccess', _707 => _707.removeElement, 'call', _708 => _708(notification)]);
24823
24837
  await loadNotifications();
24824
24838
  }, "archiveNotification");
24825
24839
  const tableData = _react.useMemo.call(void 0, () => {
@@ -24858,7 +24872,7 @@ var useNotificationTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call
24858
24872
  const data = generateNotificationData({ notification, generateUrl });
24859
24873
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-foreground text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
24860
24874
  strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { className: "font-medium", children: chunks }), "strong"),
24861
- actor: _nullishCoalesce(_optionalChain([data, 'access', _707 => _707.actor, 'optionalAccess', _708 => _708.name]), () => ( "")),
24875
+ actor: _nullishCoalesce(_optionalChain([data, 'access', _709 => _709.actor, 'optionalAccess', _710 => _710.name]), () => ( "")),
24862
24876
  title: data.title,
24863
24877
  message: _nullishCoalesce(notification.message, () => ( ""))
24864
24878
  }) });
@@ -24913,7 +24927,7 @@ var useNotificationTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call
24913
24927
  })
24914
24928
  };
24915
24929
  const columns = _react.useMemo.call(void 0, () => {
24916
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _709 => _709[field], 'optionalCall', _710 => _710()])).filter((col) => col !== void 0);
24930
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _711 => _711[field], 'optionalCall', _712 => _712()])).filter((col) => col !== void 0);
24917
24931
  }, [params.fields, fieldColumnMap, t, generateUrl]);
24918
24932
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
24919
24933
  }, "useNotificationTableStructure");
@@ -25212,7 +25226,8 @@ _chunk7QVYU63Ejs.__name.call(void 0, NotificationModal, "NotificationModal");
25212
25226
  // src/features/notification/components/notifications/PushNotificationProvider.tsx
25213
25227
 
25214
25228
  function PushNotificationProvider({ children }) {
25215
- usePushNotifications();
25229
+ const { currentUser, hasRole } = useCurrentUserContext();
25230
+ usePushNotifications({ currentUser: _nullishCoalesce(currentUser, () => ( void 0)), canSubscribe: !hasRole(_chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator) });
25216
25231
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children });
25217
25232
  }
25218
25233
  _chunk7QVYU63Ejs.__name.call(void 0, PushNotificationProvider, "PushNotificationProvider");
@@ -25330,7 +25345,7 @@ var DEFAULT_TRANSLATIONS = {
25330
25345
  invalidEmail: "Please enter a valid email address"
25331
25346
  };
25332
25347
  async function copyToClipboard(text) {
25333
- if (_optionalChain([navigator, 'access', _711 => _711.clipboard, 'optionalAccess', _712 => _712.writeText])) {
25348
+ if (_optionalChain([navigator, 'access', _713 => _713.clipboard, 'optionalAccess', _714 => _714.writeText])) {
25334
25349
  try {
25335
25350
  await navigator.clipboard.writeText(text);
25336
25351
  return true;
@@ -25372,7 +25387,7 @@ function ReferralWidget({
25372
25387
  const linkInputRef = _react.useRef.call(void 0, null);
25373
25388
  const config = _chunkGPXYQMOZjs.getReferralConfig.call(void 0, );
25374
25389
  const baseUrl = config.referralUrlBase || (typeof window !== "undefined" ? window.location.origin : "");
25375
- const referralUrl = _optionalChain([stats, 'optionalAccess', _713 => _713.referralCode]) ? `${baseUrl}${config.referralPath}?${config.urlParamName}=${stats.referralCode}` : "";
25390
+ const referralUrl = _optionalChain([stats, 'optionalAccess', _715 => _715.referralCode]) ? `${baseUrl}${config.referralPath}?${config.urlParamName}=${stats.referralCode}` : "";
25376
25391
  if (!_chunkGPXYQMOZjs.isReferralEnabled.call(void 0, )) {
25377
25392
  return null;
25378
25393
  }
@@ -25382,7 +25397,7 @@ function ReferralWidget({
25382
25397
  if (success) {
25383
25398
  setCopied(true);
25384
25399
  _chunk4ORLPEK7js.showToast.call(void 0, t.copiedMessage);
25385
- _optionalChain([onLinkCopied, 'optionalCall', _714 => _714()]);
25400
+ _optionalChain([onLinkCopied, 'optionalCall', _716 => _716()]);
25386
25401
  setTimeout(() => setCopied(false), 2e3);
25387
25402
  } else {
25388
25403
  _chunk4ORLPEK7js.showError.call(void 0, t.copyError);
@@ -25396,12 +25411,12 @@ function ReferralWidget({
25396
25411
  try {
25397
25412
  await sendInvite(email);
25398
25413
  _chunk4ORLPEK7js.showToast.call(void 0, t.inviteSent);
25399
- _optionalChain([onInviteSent, 'optionalCall', _715 => _715(email)]);
25414
+ _optionalChain([onInviteSent, 'optionalCall', _717 => _717(email)]);
25400
25415
  setEmail("");
25401
25416
  } catch (err) {
25402
25417
  const error2 = err instanceof Error ? err : new Error(t.inviteError);
25403
25418
  _chunk4ORLPEK7js.showError.call(void 0, error2.message);
25404
- _optionalChain([onInviteError, 'optionalCall', _716 => _716(error2)]);
25419
+ _optionalChain([onInviteError, 'optionalCall', _718 => _718(error2)]);
25405
25420
  }
25406
25421
  }, [email, sendInvite, t.inviteSent, t.inviteError, t.invalidEmail, onInviteSent, onInviteError]);
25407
25422
  const handleEmailKeyDown = _react.useCallback.call(void 0,
@@ -26169,7 +26184,7 @@ function OAuthClientList({
26169
26184
  OAuthClientCard,
26170
26185
  {
26171
26186
  client,
26172
- onClick: () => _optionalChain([onClientClick, 'optionalCall', _717 => _717(client)]),
26187
+ onClick: () => _optionalChain([onClientClick, 'optionalCall', _719 => _719(client)]),
26173
26188
  onEdit: onEditClick ? () => onEditClick(client) : void 0,
26174
26189
  onDelete: onDeleteClick ? () => onDeleteClick(client) : void 0
26175
26190
  },
@@ -26194,11 +26209,11 @@ function OAuthClientForm({
26194
26209
  const t = _nextintl.useTranslations.call(void 0, );
26195
26210
  const isEditMode = !!client;
26196
26211
  const [formState, setFormState] = _react.useState.call(void 0, {
26197
- name: _optionalChain([client, 'optionalAccess', _718 => _718.name]) || "",
26198
- description: _optionalChain([client, 'optionalAccess', _719 => _719.description]) || "",
26199
- redirectUris: _optionalChain([client, 'optionalAccess', _720 => _720.redirectUris, 'optionalAccess', _721 => _721.length]) ? client.redirectUris : [""],
26212
+ name: _optionalChain([client, 'optionalAccess', _720 => _720.name]) || "",
26213
+ description: _optionalChain([client, 'optionalAccess', _721 => _721.description]) || "",
26214
+ redirectUris: _optionalChain([client, 'optionalAccess', _722 => _722.redirectUris, 'optionalAccess', _723 => _723.length]) ? client.redirectUris : [""],
26200
26215
  allowedScopes: client ? client.allowedScopes || [] : defaultScopes,
26201
- isConfidential: _nullishCoalesce(_optionalChain([client, 'optionalAccess', _722 => _722.isConfidential]), () => ( true))
26216
+ isConfidential: _nullishCoalesce(_optionalChain([client, 'optionalAccess', _724 => _724.isConfidential]), () => ( true))
26202
26217
  });
26203
26218
  const [errors, setErrors] = _react.useState.call(void 0, {});
26204
26219
  const validate = _react.useCallback.call(void 0, () => {
@@ -26608,7 +26623,7 @@ function OAuthConsentScreen({
26608
26623
  if (error || !clientInfo) {
26609
26624
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "min-h-dvh flex items-center justify-center p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Card, { className: "w-full max-w-md", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardContent, { className: "py-8", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Alert, { variant: "destructive", children: [
26610
26625
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.AlertTriangle, { className: "h-4 w-4" }),
26611
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDescription, { children: _optionalChain([error, 'optionalAccess', _723 => _723.message]) || t("oauth.consent.invalid_request") })
26626
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDescription, { children: _optionalChain([error, 'optionalAccess', _725 => _725.message]) || t("oauth.consent.invalid_request") })
26612
26627
  ] }) }) }) });
26613
26628
  }
26614
26629
  const { client, scopes } = clientInfo;
@@ -26829,7 +26844,7 @@ function WaitlistForm({ onSuccess }) {
26829
26844
  questionnaire: values.questionnaire
26830
26845
  });
26831
26846
  setIsSuccess(true);
26832
- _optionalChain([onSuccess, 'optionalCall', _724 => _724()]);
26847
+ _optionalChain([onSuccess, 'optionalCall', _726 => _726()]);
26833
26848
  } catch (e) {
26834
26849
  errorToast({ title: t("common.errors.error"), error: e });
26835
26850
  } finally {
@@ -27369,7 +27384,7 @@ var ModuleEditor = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs.__n
27369
27384
  ] }),
27370
27385
  roleIds.map((roleId) => {
27371
27386
  const roleTokens = block[roleId];
27372
- const roleLabel = _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _725 => _725[roleId]]), () => ( roleId));
27387
+ const roleLabel = _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _727 => _727[roleId]]), () => ( roleId));
27373
27388
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "tr", { className: "border-b last:border-b-0", children: [
27374
27389
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-4 py-1 text-xs font-medium text-muted-foreground", children: roleLabel }),
27375
27390
  _chunkGPXYQMOZjs.ACTION_TYPES.map((action) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-2 py-1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -27406,7 +27421,7 @@ function RbacContainer() {
27406
27421
  }, []);
27407
27422
  const sortedModuleIds = _react.useMemo.call(void 0, () => {
27408
27423
  if (!matrix) return [];
27409
- return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _726 => _726[a]]), () => ( a))).localeCompare(_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _727 => _727[b]]), () => ( b))));
27424
+ return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _728 => _728[a]]), () => ( a))).localeCompare(_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _729 => _729[b]]), () => ( b))));
27410
27425
  }, [matrix, moduleNames]);
27411
27426
  const roleIds = _react.useMemo.call(void 0, () => {
27412
27427
  if (roleNames) {
@@ -27469,7 +27484,7 @@ function RbacContainer() {
27469
27484
  id === selectedModuleId && "bg-muted font-medium text-foreground",
27470
27485
  id !== selectedModuleId && "text-muted-foreground"
27471
27486
  ),
27472
- children: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _728 => _728[id]]), () => ( id))
27487
+ children: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _730 => _730[id]]), () => ( id))
27473
27488
  }
27474
27489
  ) }, id)) }) }),
27475
27490
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "section", { className: "flex-1 overflow-y-auto p-4", children: selectedModuleId && selectedBlock ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -27477,7 +27492,7 @@ function RbacContainer() {
27477
27492
  {
27478
27493
  moduleId: selectedModuleId,
27479
27494
  block: selectedBlock,
27480
- moduleLabel: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _729 => _729[selectedModuleId]]), () => ( selectedModuleId)),
27495
+ moduleLabel: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _731 => _731[selectedModuleId]]), () => ( selectedModuleId)),
27481
27496
  roleIds,
27482
27497
  roleNames,
27483
27498
  onOpenPicker: openPicker
@@ -27488,12 +27503,12 @@ function RbacContainer() {
27488
27503
  RbacPermissionPicker,
27489
27504
  {
27490
27505
  open: !!activePicker,
27491
- anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _730 => _730.anchor]), () => ( null)),
27506
+ anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _732 => _732.anchor]), () => ( null)),
27492
27507
  value: activeValue,
27493
- isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _731 => _731.isRoleColumn]), () => ( false)),
27508
+ isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _733 => _733.isRoleColumn]), () => ( false)),
27494
27509
  knownSegments: activeSegments,
27495
27510
  onSetValue: handleSetValue,
27496
- onClear: _optionalChain([activePicker, 'optionalAccess', _732 => _732.isRoleColumn]) ? handleClear : void 0,
27511
+ onClear: _optionalChain([activePicker, 'optionalAccess', _734 => _734.isRoleColumn]) ? handleClear : void 0,
27497
27512
  onClose: closePicker
27498
27513
  }
27499
27514
  )
@@ -27560,7 +27575,7 @@ function RbacByRoleContainer() {
27560
27575
  }, [roleNames]);
27561
27576
  const sortedModuleIds = _react.useMemo.call(void 0, () => {
27562
27577
  if (!matrix) return [];
27563
- return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _733 => _733[a]]), () => ( a))).localeCompare(_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _734 => _734[b]]), () => ( b))));
27578
+ return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _735 => _735[a]]), () => ( a))).localeCompare(_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _736 => _736[b]]), () => ( b))));
27564
27579
  }, [matrix, moduleNames]);
27565
27580
  _react.useEffect.call(void 0, () => {
27566
27581
  if (!selectedRoleId && sortedRoleIds.length > 0) {
@@ -27609,7 +27624,7 @@ function RbacByRoleContainer() {
27609
27624
  id === selectedRoleId && "bg-muted font-medium text-foreground",
27610
27625
  id !== selectedRoleId && "text-muted-foreground"
27611
27626
  ),
27612
- children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _735 => _735[id]]), () => ( id))
27627
+ children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _737 => _737[id]]), () => ( id))
27613
27628
  }
27614
27629
  ) }, id)) }) }),
27615
27630
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "section", { className: "flex-1 overflow-y-auto p-4", children: sortedModuleIds.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rounded-lg border border-accent bg-card", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-x-auto", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "table", { className: "w-full text-sm", children: [
@@ -27629,7 +27644,7 @@ function RbacByRoleContainer() {
27629
27644
  if (!block) return null;
27630
27645
  const defaultTokens = _nullishCoalesce(block.default, () => ( []));
27631
27646
  const roleTokens = block[selectedRoleId];
27632
- const moduleLabel = _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _736 => _736[moduleId]]), () => ( moduleId));
27647
+ const moduleLabel = _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _738 => _738[moduleId]]), () => ( moduleId));
27633
27648
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react.Fragment, { children: [
27634
27649
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { className: "border-b bg-muted/40", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
27635
27650
  "td",
@@ -27644,7 +27659,7 @@ function RbacByRoleContainer() {
27644
27659
  _chunkGPXYQMOZjs.ACTION_TYPES.map((action) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-2 py-1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RbacPermissionCell, { value: cellValue2(defaultTokens, action) }) }, action))
27645
27660
  ] }),
27646
27661
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "tr", { className: "border-b last:border-b-0", children: [
27647
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-4 py-1 text-xs font-medium text-muted-foreground", children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _737 => _737[selectedRoleId]]), () => ( selectedRoleId)) }),
27662
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-4 py-1 text-xs font-medium text-muted-foreground", children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _739 => _739[selectedRoleId]]), () => ( selectedRoleId)) }),
27648
27663
  _chunkGPXYQMOZjs.ACTION_TYPES.map((action) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-2 py-1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
27649
27664
  CellButton3,
27650
27665
  {
@@ -27665,12 +27680,12 @@ function RbacByRoleContainer() {
27665
27680
  RbacPermissionPicker,
27666
27681
  {
27667
27682
  open: !!activePicker,
27668
- anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _738 => _738.anchor]), () => ( null)),
27683
+ anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _740 => _740.anchor]), () => ( null)),
27669
27684
  value: activeValue,
27670
- isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _739 => _739.isRoleColumn]), () => ( false)),
27685
+ isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _741 => _741.isRoleColumn]), () => ( false)),
27671
27686
  knownSegments: activeSegments,
27672
27687
  onSetValue: handleSetValue,
27673
- onClear: _optionalChain([activePicker, 'optionalAccess', _740 => _740.isRoleColumn]) ? handleClear : void 0,
27688
+ onClear: _optionalChain([activePicker, 'optionalAccess', _742 => _742.isRoleColumn]) ? handleClear : void 0,
27674
27689
  onClose: closePicker
27675
27690
  }
27676
27691
  )
@@ -28288,4 +28303,4 @@ _chunk7QVYU63Ejs.__name.call(void 0, RbacByRoleContainer, "RbacByRoleContainer")
28288
28303
 
28289
28304
 
28290
28305
  exports.JsonApiProvider = JsonApiProvider; exports.useJsonApiGet = useJsonApiGet; exports.useJsonApiMutation = useJsonApiMutation; exports.useRehydration = useRehydration; exports.useRehydrationList = useRehydrationList; exports.TableGeneratorRegistry = TableGeneratorRegistry; exports.tableGeneratorRegistry = tableGeneratorRegistry; exports.usePageUrlGenerator = usePageUrlGenerator; exports.useUrlRewriter = useUrlRewriter; exports.useDataListRetriever = useDataListRetriever; exports.useDebounce = useDebounce2; exports.registerTableGenerator = registerTableGenerator; exports.useTableGenerator = useTableGenerator; exports.computeLayeredLayout = computeLayeredLayout; exports.fitLayeredLayoutToAspectRatio = fitLayeredLayoutToAspectRatio; exports.useCustomD3Graph = useCustomD3Graph; exports.SharedProvider = SharedProvider; exports.useSharedContext = useSharedContext; exports.AdministrationProvider = AdministrationProvider; exports.useAdministrationContext = useAdministrationContext; exports.SocketContext = SocketContext; exports.SocketProvider = SocketProvider; exports.useSocketContext = useSocketContext; exports.CurrentUserProvider = CurrentUserProvider; exports.useCurrentUserContext = useCurrentUserContext; exports.useCurrentUserContextOptional = useCurrentUserContextOptional; exports.Accordion = Accordion; exports.AccordionItem = AccordionItem; exports.AccordionTrigger = AccordionTrigger; exports.AccordionContent = AccordionContent; exports.Alert = Alert; exports.AlertTitle = AlertTitle; exports.AlertDescription = AlertDescription; exports.AlertAction = AlertAction; exports.buttonVariants = buttonVariants; exports.Button = Button; exports.AlertDialog = AlertDialog; exports.AlertDialogTrigger = AlertDialogTrigger; exports.AlertDialogPortal = AlertDialogPortal; exports.AlertDialogOverlay = AlertDialogOverlay; exports.AlertDialogContent = AlertDialogContent; exports.AlertDialogHeader = AlertDialogHeader; exports.AlertDialogFooter = AlertDialogFooter; exports.AlertDialogMedia = AlertDialogMedia; exports.AlertDialogTitle = AlertDialogTitle; exports.AlertDialogDescription = AlertDialogDescription; exports.AlertDialogAction = AlertDialogAction; exports.AlertDialogCancel = AlertDialogCancel; exports.Avatar = Avatar; exports.AvatarImage = AvatarImage; exports.AvatarFallback = AvatarFallback; exports.AvatarBadge = AvatarBadge; exports.AvatarGroup = AvatarGroup; exports.AvatarGroupCount = AvatarGroupCount; exports.badgeVariants = badgeVariants; exports.Badge = Badge; exports.Breadcrumb = Breadcrumb; exports.BreadcrumbList = BreadcrumbList; exports.BreadcrumbItem = BreadcrumbItem; exports.BreadcrumbLink = BreadcrumbLink; exports.BreadcrumbPage = BreadcrumbPage; exports.BreadcrumbSeparator = BreadcrumbSeparator; exports.BreadcrumbEllipsis = BreadcrumbEllipsis; exports.DirectionProvider = DirectionProvider; exports.useDir = useDir; exports.Calendar = Calendar; exports.CalendarDayButton = CalendarDayButton; exports.Card = Card; exports.CardHeader = CardHeader; exports.CardTitle = CardTitle; exports.CardDescription = CardDescription; exports.CardAction = CardAction; exports.CardContent = CardContent; exports.CardFooter = CardFooter; exports.useCarousel = useCarousel; exports.Carousel = Carousel; exports.CarouselContent = CarouselContent; exports.CarouselItem = CarouselItem; exports.CarouselPrevious = CarouselPrevious; exports.CarouselNext = CarouselNext; exports.ChartContainer = ChartContainer; exports.ChartStyle = ChartStyle; exports.ChartTooltip = ChartTooltip; exports.ChartTooltipContent = ChartTooltipContent; exports.ChartLegend = ChartLegend; exports.ChartLegendContent = ChartLegendContent; exports.Checkbox = Checkbox; exports.Collapsible = Collapsible; exports.CollapsibleTrigger = CollapsibleTrigger; exports.CollapsibleContent = CollapsibleContent; exports.Input = Input; exports.Textarea = Textarea; exports.InputGroup = InputGroup; exports.InputGroupAddon = InputGroupAddon; exports.InputGroupButton = InputGroupButton; exports.InputGroupText = InputGroupText; exports.InputGroupInput = InputGroupInput; exports.InputGroupTextarea = InputGroupTextarea; exports.Combobox = Combobox; exports.ComboboxValue = ComboboxValue; exports.ComboboxTrigger = ComboboxTrigger; exports.ComboboxInput = ComboboxInput; exports.ComboboxContent = ComboboxContent; exports.ComboboxList = ComboboxList; exports.ComboboxItem = ComboboxItem; exports.ComboboxGroup = ComboboxGroup; exports.ComboboxLabel = ComboboxLabel; exports.ComboboxCollection = ComboboxCollection; exports.ComboboxEmpty = ComboboxEmpty; exports.ComboboxSeparator = ComboboxSeparator; exports.ComboboxChips = ComboboxChips; exports.ComboboxChip = ComboboxChip; exports.ComboboxChipsInput = ComboboxChipsInput; exports.useComboboxAnchor = useComboboxAnchor; exports.Dialog = Dialog; exports.DialogTrigger = DialogTrigger; exports.DialogPortal = DialogPortal; exports.DialogClose = DialogClose; exports.DialogOverlay = DialogOverlay; exports.DialogContent = DialogContent; exports.DialogHeader = DialogHeader; exports.DialogFooter = DialogFooter; exports.DialogTitle = DialogTitle; exports.DialogDescription = DialogDescription; exports.Command = Command; exports.CommandDialog = CommandDialog; exports.CommandInput = CommandInput; exports.CommandList = CommandList; exports.CommandEmpty = CommandEmpty; exports.CommandGroup = CommandGroup; exports.CommandSeparator = CommandSeparator; exports.CommandItem = CommandItem; exports.CommandShortcut = CommandShortcut; exports.commandFilterByKeywords = commandFilterByKeywords; exports.ConfirmDialog = ConfirmDialog; exports.ContextMenu = ContextMenu; exports.ContextMenuPortal = ContextMenuPortal; exports.ContextMenuTrigger = ContextMenuTrigger; exports.ContextMenuContent = ContextMenuContent; exports.ContextMenuGroup = ContextMenuGroup; exports.ContextMenuLabel = ContextMenuLabel; exports.ContextMenuItem = ContextMenuItem; exports.ContextMenuSub = ContextMenuSub; exports.ContextMenuSubTrigger = ContextMenuSubTrigger; exports.ContextMenuSubContent = ContextMenuSubContent; exports.ContextMenuCheckboxItem = ContextMenuCheckboxItem; exports.ContextMenuRadioGroup = ContextMenuRadioGroup; exports.ContextMenuRadioItem = ContextMenuRadioItem; exports.ContextMenuSeparator = ContextMenuSeparator; exports.ContextMenuShortcut = ContextMenuShortcut; exports.Drawer = Drawer; exports.DrawerTrigger = DrawerTrigger; exports.DrawerPortal = DrawerPortal; exports.DrawerClose = DrawerClose; exports.DrawerOverlay = DrawerOverlay; exports.DrawerContent = DrawerContent; exports.DrawerHeader = DrawerHeader; exports.DrawerFooter = DrawerFooter; exports.DrawerTitle = DrawerTitle; exports.DrawerDescription = DrawerDescription; exports.DropdownMenu = DropdownMenu; exports.DropdownMenuPortal = DropdownMenuPortal; exports.DropdownMenuTrigger = DropdownMenuTrigger; exports.DropdownMenuContent = DropdownMenuContent; exports.DropdownMenuGroup = DropdownMenuGroup; exports.DropdownMenuLabel = DropdownMenuLabel; exports.DropdownMenuItem = DropdownMenuItem; exports.DropdownMenuSub = DropdownMenuSub; exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger; exports.DropdownMenuSubContent = DropdownMenuSubContent; exports.DropdownMenuCheckboxItem = DropdownMenuCheckboxItem; exports.DropdownMenuRadioGroup = DropdownMenuRadioGroup; exports.DropdownMenuRadioItem = DropdownMenuRadioItem; exports.DropdownMenuSeparator = DropdownMenuSeparator; exports.DropdownMenuShortcut = DropdownMenuShortcut; exports.EmptyState = EmptyState; exports.Label = Label; exports.Separator = Separator; exports.FieldSet = FieldSet; exports.FieldLegend = FieldLegend; exports.FieldGroup = FieldGroup; exports.Field = Field; exports.FieldContent = FieldContent; exports.FieldLabel = FieldLabel; exports.FieldTitle = FieldTitle; exports.FieldDescription = FieldDescription; exports.FieldSeparator = FieldSeparator; exports.FieldError = FieldError; exports.Form = Form; exports.HoverCard = HoverCard; exports.HoverCardTrigger = HoverCardTrigger; exports.HoverCardContent = HoverCardContent; exports.InputOTP = InputOTP; exports.InputOTPGroup = InputOTPGroup; exports.InputOTPSlot = InputOTPSlot; exports.InputOTPSeparator = InputOTPSeparator; exports.NavigationMenu = NavigationMenu; exports.NavigationMenuList = NavigationMenuList; exports.NavigationMenuItem = NavigationMenuItem; exports.navigationMenuTriggerStyle = navigationMenuTriggerStyle; exports.NavigationMenuTrigger = NavigationMenuTrigger; exports.NavigationMenuContent = NavigationMenuContent; exports.NavigationMenuPositioner = NavigationMenuPositioner; exports.NavigationMenuLink = NavigationMenuLink; exports.NavigationMenuIndicator = NavigationMenuIndicator; exports.Popover = Popover; exports.PopoverTrigger = PopoverTrigger; exports.PopoverContent = PopoverContent; exports.PopoverHeader = PopoverHeader; exports.PopoverTitle = PopoverTitle; exports.PopoverDescription = PopoverDescription; exports.Progress = Progress; exports.ProgressTrack = ProgressTrack; exports.ProgressIndicator = ProgressIndicator; exports.ProgressLabel = ProgressLabel; exports.ProgressValue = ProgressValue; exports.RadioGroup = RadioGroup; exports.RadioGroupItem = RadioGroupItem; exports.ResizablePanelGroup = ResizablePanelGroup; exports.ResizablePanel = ResizablePanel; exports.ResizableHandle = ResizableHandle; exports.ScrollArea = ScrollArea; exports.ScrollBar = ScrollBar; exports.Select = Select; exports.SelectGroup = SelectGroup; exports.SelectValue = SelectValue; exports.SelectTrigger = SelectTrigger; exports.SelectContent = SelectContent; exports.SelectLabel = SelectLabel; exports.SelectItem = SelectItem; exports.SelectSeparator = SelectSeparator; exports.SelectScrollUpButton = SelectScrollUpButton; exports.SelectScrollDownButton = SelectScrollDownButton; exports.Sheet = Sheet; exports.SheetTrigger = SheetTrigger; exports.SheetClose = SheetClose; exports.SheetContent = SheetContent; exports.SheetHeader = SheetHeader; exports.SheetFooter = SheetFooter; exports.SheetTitle = SheetTitle; exports.SheetDescription = SheetDescription; exports.Skeleton = Skeleton; exports.TooltipProvider = TooltipProvider; exports.Tooltip = Tooltip2; exports.TooltipTrigger = TooltipTrigger; exports.TooltipContent = TooltipContent; exports.useSidebar = useSidebar; exports.useSidebarControls = useSidebarControls; exports.useOptionalSidebar = useOptionalSidebar; exports.SidebarProvider = SidebarProvider; exports.Sidebar = Sidebar; exports.SidebarTrigger = SidebarTrigger; exports.SidebarRail = SidebarRail; exports.SidebarInset = SidebarInset; exports.SidebarInput = SidebarInput; exports.SidebarHeader = SidebarHeader; exports.SidebarFooter = SidebarFooter; exports.SidebarSeparator = SidebarSeparator; exports.SidebarContent = SidebarContent; exports.SidebarGroup = SidebarGroup; exports.SidebarGroupLabel = SidebarGroupLabel; exports.SidebarGroupAction = SidebarGroupAction; exports.SidebarGroupContent = SidebarGroupContent; exports.SidebarMenu = SidebarMenu; exports.SidebarMenuItem = SidebarMenuItem; exports.SidebarMenuButton = SidebarMenuButton; exports.SidebarMenuAction = SidebarMenuAction; exports.SidebarMenuBadge = SidebarMenuBadge; exports.SidebarMenuSkeleton = SidebarMenuSkeleton; exports.SidebarMenuSub = SidebarMenuSub; exports.SidebarMenuSubItem = SidebarMenuSubItem; exports.SidebarMenuSubButton = SidebarMenuSubButton; exports.Slider = Slider; exports.Toaster = Toaster; exports.spinnerVariants = spinnerVariants; exports.Spinner = Spinner; exports.Switch = Switch; exports.Table = Table; exports.TableHeader = TableHeader; exports.TableBody = TableBody; exports.TableFooter = TableFooter; exports.TableRow = TableRow; exports.TableHead = TableHead; exports.TableCell = TableCell; exports.TableCaption = TableCaption; exports.Tabs = Tabs; exports.tabsListVariants = tabsListVariants; exports.TabsList = TabsList; exports.TabsTrigger = TabsTrigger; exports.TabsContent = TabsContent; exports.toggleVariants = toggleVariants; exports.Toggle = Toggle; exports.KanbanRoot = KanbanRoot; exports.KanbanBoard = KanbanBoard; exports.KanbanColumn = KanbanColumn; exports.KanbanColumnHandle = KanbanColumnHandle; exports.KanbanItem = KanbanItem; exports.KanbanItemHandle = KanbanItemHandle; exports.KanbanOverlay = KanbanOverlay; exports.Link = Link; exports.MultiSelect = MultiSelect; exports.useDebounce2 = useDebounce; exports.MultipleSelector = MultipleSelector; exports.EntityAvatar = EntityAvatar; exports.errorToast = errorToast; exports.EditableAvatar = EditableAvatar; exports.TableCellAvatar = TableCellAvatar; exports.HeaderChildrenProvider = HeaderChildrenProvider; exports.useHeaderChildren = useHeaderChildren; exports.useHeaderMobileChildren = useHeaderMobileChildren; exports.useHeaderRootLabel = useHeaderRootLabel; exports.HeaderLeftContentProvider = HeaderLeftContentProvider; exports.useHeaderLeftContent = useHeaderLeftContent; exports.HeaderLogoProvider = HeaderLogoProvider; exports.useHeaderLogo = useHeaderLogo; exports.BreadcrumbNavigation = BreadcrumbNavigation; exports.ContentTitle = ContentTitle; exports.BreadcrumbRootProvider = BreadcrumbRootProvider; exports.useIsBreadcrumbRootHidden = useIsBreadcrumbRootHidden; exports.Header = Header; exports.MobileNavigationProvider = MobileNavigationProvider; exports.useMobileNavigationItems = useMobileNavigationItems; exports.MobileNavigationBar = MobileNavigationBar; exports.ModeToggleSwitch = ModeToggleSwitch; exports.PageSection = PageSection; exports.recentPagesAtom = recentPagesAtom; exports.RecentPagesNavigator = RecentPagesNavigator; exports.PageContainer = PageContainer; exports.partitionTabs = partitionTabs; exports.MermaidDiagram = MermaidDiagram; exports.ReactMarkdownContainer = ReactMarkdownContainer; exports.HEADER_ROW_MIN_H = HEADER_ROW_MIN_H; exports.RoundPageContainerTitle = RoundPageContainerTitle; exports.SectionHeader = SectionHeader; exports.MicroLabel = MicroLabel; exports.DetailField = DetailField; exports.RoundPageContainer = RoundPageContainer; exports.TabsContainer = TabsContainer; exports.AttributeElement = AttributeElement; exports.AllUsersListContainer = AllUsersListContainer; exports.PlatformUsersList = PlatformUsersList; exports.PlatformUsersContainer = PlatformUsersContainer; exports.UserContent = UserContent; exports.UserAvatar = UserAvatar; exports.UserAvatarList = UserAvatarList; exports.useUserSearch = useUserSearch; exports.useUserTableStructure = useUserTableStructure; exports.UserSearchPopover = UserSearchPopover; exports.UserIndexDetails = UserIndexDetails; exports.UserStanadaloneDetails = UserStanadaloneDetails; exports.UserContainer = UserContainer; exports.UserIndexContainer = UserIndexContainer; exports.UsersListContainer = UsersListContainer; exports.AdminUsersList = AdminUsersList; exports.CompanyUsersList = CompanyUsersList; exports.ContributorsList = ContributorsList; exports.RelevantUsersList = RelevantUsersList; exports.RoleUsersList = RoleUsersList; exports.UserListInAdd = UserListInAdd; exports.UsersList = UsersList; exports.UsersListByContentIds = UsersListByContentIds; exports.AllowedUsersDetails = AllowedUsersDetails; exports.ErrorDetails = ErrorDetails; exports.BlockNoteEditorMentionHoverCard = BlockNoteEditorMentionHoverCard; exports.mentionDataAttrs = mentionDataAttrs; exports.parseMentionElement = parseMentionElement; exports.createMentionInlineContentSpec = createMentionInlineContentSpec; exports.useMentionInsert = useMentionInsert; exports.BlockNoteEditorMentionSuggestionMenu = BlockNoteEditorMentionSuggestionMenu; exports.BlockNoteEditorContainer = BlockNoteEditorContainer; exports.BlockNoteViewerContainer = BlockNoteViewerContainer; exports.FormFeatures = FormFeatures; exports.CommonAssociationTrigger = CommonAssociationTrigger; exports.CommonAssociationCommandDialog = CommonAssociationCommandDialog; exports.triggerAssociationToast = triggerAssociationToast; exports.ActionBarProvider = ActionBarProvider; exports.useIsInActionBar = useIsInActionBar; exports.CommonDeleter = CommonDeleter; exports.CommonEditorButtons = CommonEditorButtons; exports.CommonEditorDiscardDialog = CommonEditorDiscardDialog; exports.CommonEditorHeader = CommonEditorHeader; exports.CommonEditorTrigger = CommonEditorTrigger; exports.CommonAddTrigger = CommonAddTrigger; exports.CurrencyInput = CurrencyInput; exports.DatePickerPopover = DatePickerPopover; exports.nextDateRange = nextDateRange; exports.DateRangeSelector = DateRangeSelector; exports.hasOpenInnerLayer = hasOpenInnerLayer; exports.useEditorDialog = useEditorDialog; exports.EditorSheet = EditorSheet; exports.FormFieldWrapper = FormFieldWrapper; exports.EntityMultiSelector = EntityMultiSelector; exports.EntitySelector = EntitySelector; exports.useFileUpload = useFileUpload; exports.FileUploader = FileUploader; exports.FileUploaderContent = FileUploaderContent; exports.FileUploaderItem = FileUploaderItem; exports.FileInput = FileInput; exports.FormBlockNote = FormBlockNote; exports.FormCheckbox = FormCheckbox; exports.FormDate = FormDate; exports.FormDateTime = FormDateTime; exports.FormInput = FormInput; exports.FormBody = FormBody; exports.FormSection = FormSection; exports.FormRow = FormRow; exports.FormCol = FormCol; exports.PasswordInput = PasswordInput; exports.FormPassword = FormPassword; exports.FormPlaceAutocomplete = FormPlaceAutocomplete; exports.FormSelect = FormSelect; exports.FormSlider = FormSlider; exports.FormSwitch = FormSwitch; exports.FormTextarea = FormTextarea; exports.GdprConsentCheckbox = GdprConsentCheckbox; exports.MultiFileUploader = MultiFileUploader; exports.PageContainerContentDetails = PageContainerContentDetails; exports.PageContentContainer = PageContentContainer; exports.cellComponent = cellComponent; exports.cellDate = cellDate; exports.cellDateTime = cellDateTime; exports.cellId = cellId; exports.cellLink = cellLink; exports.cellUrl = cellUrl; exports.ContentTableSearch = ContentTableSearch; exports.ContentListTable = ContentListTable; exports.ContentListGrid = ContentListGrid; exports.ItalianFiscalData_default = ItalianFiscalData_default; exports.ItalianFiscalDataDisplay = ItalianFiscalDataDisplay; exports.parseFiscalData = parseFiscalData; exports.FiscalDataDisplay = FiscalDataDisplay; exports.EntityHeroLayout = EntityHeroLayout; exports.EntityHero = EntityHero; exports.EntityHeroAvatar = EntityHeroAvatar; exports.EntityHeroMetaRow = EntityHeroMetaRow; exports.EntitySection = EntitySection; exports.GdprConsentSection = GdprConsentSection; exports.AuthContainer = AuthContainer; exports.BackupCodesDialog = BackupCodesDialog; exports.TotpInput = TotpInput; exports.DisableTwoFactorDialog = DisableTwoFactorDialog; exports.PasskeyList = PasskeyList; exports.PasskeySetupDialog = PasskeySetupDialog; exports.TotpAuthenticatorList = TotpAuthenticatorList; exports.TotpSetupDialog = TotpSetupDialog; exports.TwoFactorSettings = TwoFactorSettings; exports.SecurityContainer = SecurityContainer; exports.LandingComponent = LandingComponent; exports.AcceptInvitation = AcceptInvitation; exports.ActivateAccount = ActivateAccount; exports.Cookies = Cookies; exports.ForgotPassword = ForgotPassword; exports.Login = Login; exports.Logout = Logout; exports.RefreshUser = RefreshUser; exports.ResetPassword = ResetPassword; exports.PasskeyButton = PasskeyButton; exports.TwoFactorChallenge = TwoFactorChallenge; exports.AdminIndexGrid = AdminIndexGrid; exports.AdminIndexContainer = AdminIndexContainer; exports.ADMINISTRATION_I18N_KEYS = ADMINISTRATION_I18N_KEYS; exports.AI_CONNECTIONS_I18N_KEYS = AI_CONNECTIONS_I18N_KEYS; exports.AI_CONNECTIONS_ADMIN_PAGE_URL = AI_CONNECTIONS_ADMIN_PAGE_URL; exports.AiConnectionsProvider = AiConnectionsProvider; exports.useAiConnections = useAiConnections; exports.AiConnectionDeleter = AiConnectionDeleter; exports.AiConnectionEditor = AiConnectionEditor; exports.AiConnectionTypeCard = AiConnectionTypeCard; exports.AI_CONNECTION_TYPE_ORDER = AI_CONNECTION_TYPE_ORDER; exports.AiConnectionsContainer = AiConnectionsContainer; exports.CompanyContent = CompanyContent; exports.TokenStatusIndicator = TokenStatusIndicator; exports.CompanyDetails = CompanyDetails; exports.AdminCompanyContainer = AdminCompanyContainer; exports.CompanyEditor = CompanyEditor; exports.CompaniesList = CompaniesList; exports.CompaniesListContainer = CompaniesListContainer; exports.CompanyContainer = CompanyContainer; exports.CompanyConfigurationEditor = CompanyConfigurationEditor; exports.CompanyDeleter = CompanyDeleter; exports.ContentsList = ContentsList; exports.ContentsListById = ContentsListById; exports.RelevantContentsList = RelevantContentsList; exports.HowToCommandViewer = HowToCommandViewer; exports.HowToCommand = HowToCommand; exports.HowToDeleter = HowToDeleter; exports.HowToMultiSelector = HowToMultiSelector; exports.HowToEditor = HowToEditor; exports.HowToProvider = HowToProvider; exports.useHowToContext = useHowToContext; exports.HowToContent = HowToContent; exports.HowToDetails = HowToDetails; exports.HowToContainer = HowToContainer; exports.HowToReindexButton = HowToReindexButton; exports.HowToList = HowToList; exports.HowToListContainer = HowToListContainer; exports.HowToSelector = HowToSelector; exports.AssistantComposer = AssistantComposer; exports.MessageSourcesPanel = MessageSourcesPanel; exports.MessageItem = MessageItem; exports.MessageList = MessageList; exports.AssistantThread = AssistantThread; exports.HandbookAskSheet = HandbookAskSheet; exports.HandbookSyncButton = HandbookSyncButton; exports.HandbookIndexStatus = HandbookIndexStatus; exports.HandbookSectionGroup = HandbookSectionGroup; exports.HandbookContents = HandbookContents; exports.HandbookAdminContainer = HandbookAdminContainer; exports.HandbookPageDetails = HandbookPageDetails; exports.HandbookPageNeighbours = HandbookPageNeighbours; exports.HandbookPageToc = HandbookPageToc; exports.HandbookPageNavigator = HandbookPageNavigator; exports.HandbookPageContainer = HandbookPageContainer; exports.HandbookAskContainer = HandbookAskContainer; exports.EntityMentionLink = EntityMentionLink; exports.AssistantProvider = AssistantProvider; exports.useAssistantContext = useAssistantContext; exports.AssistantEmptyState = AssistantEmptyState; exports.AssistantContainer = AssistantContainer; exports.AssistantBlockNoteComposer = AssistantBlockNoteComposer; exports.AssistantPageContainer = AssistantPageContainer; exports.ApprovalActionCard = ApprovalActionCard; exports.AssistantContainerWithApprovals = AssistantContainerWithApprovals; exports.NotificationErrorBoundary = NotificationErrorBoundary; exports.NotificationIcon = NotificationIcon; exports.generateNotificationData = generateNotificationData; exports.NotificationToast = NotificationToast; exports.NotificationMenuItem = NotificationMenuItem; exports.NotificationContextProvider = NotificationContextProvider; exports.useNotificationContext = useNotificationContext; exports.NotificationViewSwitcher = NotificationViewSwitcher; exports.NotificationsList = NotificationsList; exports.NotificationsListContainer = NotificationsListContainer; exports.NotificationModal = NotificationModal; exports.PushNotificationProvider = PushNotificationProvider; exports.OnboardingCard = OnboardingCard; exports.ReferralCodeCapture = ReferralCodeCapture; exports.ReferralWidget = ReferralWidget; exports.ReferralDialog = ReferralDialog; exports.RoleProvider = RoleProvider; exports.useRoleContext = useRoleContext; exports.RoleDetails = RoleDetails; exports.RoleContainer = RoleContainer; exports.FormRoles = FormRoles; exports.RemoveUserFromRole = RemoveUserFromRole; exports.UserRoleAdd = UserRoleAdd; exports.useRoleTableStructure = useRoleTableStructure; exports.RolesList = RolesList; exports.UserRolesList = UserRolesList; exports.OAuthRedirectUriInput = OAuthRedirectUriInput; exports.useOAuthScopeText = useOAuthScopeText; exports.OAuthScopeSelector = OAuthScopeSelector; exports.OAuthClientSecretDisplay = OAuthClientSecretDisplay; exports.OAuthClientCard = OAuthClientCard; exports.OAuthClientList = OAuthClientList; exports.OAuthClientForm = OAuthClientForm; exports.OAuthClientDetail = OAuthClientDetail; exports.OAuthConsentHeader = OAuthConsentHeader; exports.OAuthScopeList = OAuthScopeList; exports.OAuthConsentActions = OAuthConsentActions; exports.OAuthCompanySelector = OAuthCompanySelector; exports.useOAuthConsent = useOAuthConsent; exports.OAuthConsentScreen = OAuthConsentScreen; exports.WaitlistQuestionnaireRenderer = WaitlistQuestionnaireRenderer; exports.WaitlistForm = WaitlistForm; exports.WaitlistHeroSection = WaitlistHeroSection; exports.WaitlistSuccessState = WaitlistSuccessState; exports.WaitlistConfirmation = WaitlistConfirmation; exports.WaitlistList = WaitlistList; exports.RbacProvider = RbacProvider; exports.useRbacContext = useRbacContext; exports.RbacPermissionCell = RbacPermissionCell; exports.RbacPermissionPicker = RbacPermissionPicker; exports.RbacContainer = RbacContainer; exports.RbacByRoleContainer = RbacByRoleContainer; exports.AddUserToRole = AddUserToRole; exports.UserAvatarEditor = UserAvatarEditor; exports.UserDeleter = UserDeleter; exports.UserEditor = UserEditor; exports.UserMultiSelect = UserMultiSelect; exports.UserReactivator = UserReactivator; exports.UserResentInvitationEmail = UserResentInvitationEmail; exports.UserSelector = UserSelector; exports.UserProvider = UserProvider; exports.useUserContext = useUserContext; exports.CompanyProvider = CompanyProvider; exports.useCompanyContext = useCompanyContext; exports.DEFAULT_ONBOARDING_LABELS = DEFAULT_ONBOARDING_LABELS; exports.mapOnboardingSide = mapOnboardingSide; exports.OnboardingProvider = OnboardingProvider; exports.useOnboarding = useOnboarding; exports.CommonProvider = CommonProvider; exports.useCommonContext = useCommonContext; exports.SessionProvider = SessionProvider; exports.useSession = useSession; exports.ViewportProvider = ViewportProvider; exports.useNotificationSync = useNotificationSync; exports.usePageTracker = usePageTracker; exports.useSocket = useSocket; exports.useSubscriptionStatus = useSubscriptionStatus; exports.formatInterval = formatInterval; exports.formatCurrency = formatCurrency; exports.formatFixed = formatFixed; exports.formatDate = formatDate2; exports.useBillingFormatOptions = useBillingFormatOptions; exports.useContentTableStructure = useContentTableStructure; exports.useOAuthClients = useOAuthClients; exports.useOAuthClient = useOAuthClient;
28291
- //# sourceMappingURL=chunk-4EGA5UP5.js.map
28306
+ //# sourceMappingURL=chunk-TPGXNPGY.js.map