@carlonicora/nextjs-jsonapi 4.2.1 → 4.2.3

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.
@@ -6921,17 +6921,17 @@ function useDataListRetriever(params) {
6921
6921
  return;
6922
6922
  }
6923
6923
  if (isFetchingRef.current && !_optionalChain([fetchParams, 'optionalAccess', _132 => _132.callNext]) && !_optionalChain([fetchParams, 'optionalAccess', _133 => _133.callPrevious])) return;
6924
- if (_optionalChain([fetchParams, 'optionalAccess', _134 => _134.callNext]) || _optionalChain([fetchParams, 'optionalAccess', _135 => _135.callPrevious])) {
6925
- isPaginatingRef.current = true;
6926
- }
6927
- const thisRequestId = ++requestIdRef.current;
6928
- isFetchingRef.current = true;
6929
- if (stableParams.requiresSearch === true && _optionalChain([fetchParams, 'optionalAccess', _136 => _136.isRefine]) !== true && _optionalChain([fetchParams, 'optionalAccess', _137 => _137.isRefresh]) !== true) {
6924
+ if (stableParams.requiresSearch === true && _optionalChain([fetchParams, 'optionalAccess', _134 => _134.isRefine]) !== true && _optionalChain([fetchParams, 'optionalAccess', _135 => _135.isRefresh]) !== true) {
6930
6925
  return;
6931
6926
  }
6932
- if (!nextPage && !previousPage && isLoaded && _optionalChain([fetchParams, 'optionalAccess', _138 => _138.callNext]) !== true && _optionalChain([fetchParams, 'optionalAccess', _139 => _139.callPrevious]) !== true && params.search === searchTermRef.current) {
6927
+ if (_optionalChain([fetchParams, 'optionalAccess', _136 => _136.force]) !== true && !nextPage && !previousPage && isLoaded && _optionalChain([fetchParams, 'optionalAccess', _137 => _137.callNext]) !== true && _optionalChain([fetchParams, 'optionalAccess', _138 => _138.callPrevious]) !== true && params.search === searchTermRef.current) {
6933
6928
  return;
6934
6929
  }
6930
+ if (_optionalChain([fetchParams, 'optionalAccess', _139 => _139.callNext]) || _optionalChain([fetchParams, 'optionalAccess', _140 => _140.callPrevious])) {
6931
+ isPaginatingRef.current = true;
6932
+ }
6933
+ const thisRequestId = ++requestIdRef.current;
6934
+ isFetchingRef.current = true;
6935
6935
  const currentSearchTerm = searchTermRef.current;
6936
6936
  setIsLoaded(false);
6937
6937
  try {
@@ -6940,7 +6940,7 @@ function useDataListRetriever(params) {
6940
6940
  const previousRef = { previous: void 0 };
6941
6941
  const selfRef = { self: void 0 };
6942
6942
  const totalRef = { total: void 0 };
6943
- if (nextPage && _optionalChain([fetchParams, 'optionalAccess', _140 => _140.callNext]) && _optionalChain([fetchParams, 'optionalAccess', _141 => _141.isRefine]) !== true) {
6943
+ if (nextPage && _optionalChain([fetchParams, 'optionalAccess', _141 => _141.callNext]) && _optionalChain([fetchParams, 'optionalAccess', _142 => _142.isRefine]) !== true) {
6944
6944
  const ServiceClass = stableParams.service;
6945
6945
  response = await ServiceClass.next({
6946
6946
  type: stableParams.type,
@@ -6950,7 +6950,7 @@ function useDataListRetriever(params) {
6950
6950
  self: selfRef,
6951
6951
  total: totalRef
6952
6952
  });
6953
- } else if (previousPage && _optionalChain([fetchParams, 'optionalAccess', _142 => _142.callPrevious]) && _optionalChain([fetchParams, 'optionalAccess', _143 => _143.isRefine]) !== true) {
6953
+ } else if (previousPage && _optionalChain([fetchParams, 'optionalAccess', _143 => _143.callPrevious]) && _optionalChain([fetchParams, 'optionalAccess', _144 => _144.isRefine]) !== true) {
6954
6954
  const ServiceClass = stableParams.service;
6955
6955
  response = await ServiceClass.previous({
6956
6956
  type: stableParams.type,
@@ -6973,8 +6973,8 @@ function useDataListRetriever(params) {
6973
6973
  retrieverParams.total = totalRef;
6974
6974
  response = await stableParams.retriever(retrieverParams);
6975
6975
  }
6976
- if (thisRequestId === requestIdRef.current && !_optionalChain([abortControllerRef, 'access', _144 => _144.current, 'optionalAccess', _145 => _145.signal, 'access', _146 => _146.aborted])) {
6977
- if (_optionalChain([fetchParams, 'optionalAccess', _147 => _147.isRefresh]) === true) {
6976
+ if (thisRequestId === requestIdRef.current && !_optionalChain([abortControllerRef, 'access', _145 => _145.current, 'optionalAccess', _146 => _146.signal, 'access', _147 => _147.aborted])) {
6977
+ if (_optionalChain([fetchParams, 'optionalAccess', _148 => _148.isRefresh]) === true) {
6978
6978
  setData(response);
6979
6979
  } else {
6980
6980
  setData((prevData) => [...prevData ? prevData : [], ...response]);
@@ -7035,6 +7035,19 @@ function useDataListRetriever(params) {
7035
7035
  fetchData({ isRefresh: true });
7036
7036
  }
7037
7037
  }, [ready, fetchData]);
7038
+ const fetchDataRef = _react.useRef.call(void 0, fetchData);
7039
+ const isLoadedRef = _react.useRef.call(void 0, isLoaded);
7040
+ _react.useEffect.call(void 0, () => {
7041
+ fetchDataRef.current = fetchData;
7042
+ isLoadedRef.current = isLoaded;
7043
+ });
7044
+ const wasHiddenRef = _react.useRef.call(void 0, false);
7045
+ _react.useEffect.call(void 0, () => {
7046
+ if (wasHiddenRef.current && isLoadedRef.current) fetchDataRef.current({ isRefresh: true, force: true });
7047
+ return () => {
7048
+ wasHiddenRef.current = true;
7049
+ };
7050
+ }, []);
7038
7051
  const loadNext = _react.useCallback.call(void 0,
7039
7052
  async (onlyNewRecords) => {
7040
7053
  if (nextPage) {
@@ -7184,12 +7197,12 @@ var SUBTITLE_PX_PER_CHAR_11 = 6;
7184
7197
  var LABEL_PADDING_PX = 16;
7185
7198
  function estimateLabelWidth(node) {
7186
7199
  if (node.subtitle) {
7187
- const titleWidth = (_nullishCoalesce(_optionalChain([node, 'access', _148 => _148.name, 'optionalAccess', _149 => _149.length]), () => ( 0))) * TITLE_PX_PER_CHAR_16;
7200
+ const titleWidth = (_nullishCoalesce(_optionalChain([node, 'access', _149 => _149.name, 'optionalAccess', _150 => _150.length]), () => ( 0))) * TITLE_PX_PER_CHAR_16;
7188
7201
  const subtitleWidth = node.subtitle.length * SUBTITLE_PX_PER_CHAR_11;
7189
7202
  return Math.max(titleWidth, subtitleWidth) + LABEL_PADDING_PX;
7190
7203
  }
7191
7204
  const perChar = node.bold ? NAME_PX_PER_CHAR_16_BOLD : NAME_PX_PER_CHAR_12;
7192
- return (_nullishCoalesce(_optionalChain([node, 'access', _150 => _150.name, 'optionalAccess', _151 => _151.length]), () => ( 0))) * perChar + LABEL_PADDING_PX;
7205
+ return (_nullishCoalesce(_optionalChain([node, 'access', _151 => _151.name, 'optionalAccess', _152 => _152.length]), () => ( 0))) * perChar + LABEL_PADDING_PX;
7193
7206
  }
7194
7207
  _chunk7QVYU63Ejs.__name.call(void 0, estimateLabelWidth, "estimateLabelWidth");
7195
7208
  function linkEndpointId(end) {
@@ -7302,12 +7315,12 @@ var SUBTITLE_PX_PER_CHAR_112 = 6;
7302
7315
  var LABEL_PADDING_PX2 = 16;
7303
7316
  function estimateLabelWidth2(node) {
7304
7317
  if (node.subtitle) {
7305
- const titleWidth = (_nullishCoalesce(_optionalChain([node, 'access', _152 => _152.name, 'optionalAccess', _153 => _153.length]), () => ( 0))) * TITLE_PX_PER_CHAR_162;
7318
+ const titleWidth = (_nullishCoalesce(_optionalChain([node, 'access', _153 => _153.name, 'optionalAccess', _154 => _154.length]), () => ( 0))) * TITLE_PX_PER_CHAR_162;
7306
7319
  const subtitleWidth = node.subtitle.length * SUBTITLE_PX_PER_CHAR_112;
7307
7320
  return Math.max(titleWidth, subtitleWidth) + LABEL_PADDING_PX2;
7308
7321
  }
7309
7322
  const perChar = node.bold ? NAME_PX_PER_CHAR_16_BOLD2 : NAME_PX_PER_CHAR_122;
7310
- return (_nullishCoalesce(_optionalChain([node, 'access', _154 => _154.name, 'optionalAccess', _155 => _155.length]), () => ( 0))) * perChar + LABEL_PADDING_PX2;
7323
+ return (_nullishCoalesce(_optionalChain([node, 'access', _155 => _155.name, 'optionalAccess', _156 => _156.length]), () => ( 0))) * perChar + LABEL_PADDING_PX2;
7311
7324
  }
7312
7325
  _chunk7QVYU63Ejs.__name.call(void 0, estimateLabelWidth2, "estimateLabelWidth");
7313
7326
  function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, loadingNodeIds, containerKey) {
@@ -7374,7 +7387,7 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, lo
7374
7387
  });
7375
7388
  const typeColorMap = /* @__PURE__ */ new Map();
7376
7389
  Array.from(groupTypes).forEach((type, index) => {
7377
- if (type === _optionalChain([nodes, 'access', _156 => _156[0], 'optionalAccess', _157 => _157.instanceType])) {
7390
+ if (type === _optionalChain([nodes, 'access', _157 => _157[0], 'optionalAccess', _158 => _158.instanceType])) {
7378
7391
  typeColorMap.set(type, accentColor);
7379
7392
  } else if (type === "documents" || type === "articles" || type === "hyperlinks") {
7380
7393
  typeColorMap.set(type, contentColor);
@@ -7424,14 +7437,14 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, lo
7424
7437
  });
7425
7438
  const svg = d3.select(svgRef.current);
7426
7439
  svg.selectAll("*").remove();
7427
- const container = _optionalChain([svgRef, 'access', _158 => _158.current, 'optionalAccess', _159 => _159.parentElement]);
7440
+ const container = _optionalChain([svgRef, 'access', _159 => _159.current, 'optionalAccess', _160 => _160.parentElement]);
7428
7441
  if (!container) return;
7429
7442
  const width = container.clientWidth;
7430
7443
  const height = container.clientHeight;
7431
7444
  svg.attr("width", width).attr("height", height).attr("viewBox", `0 0 ${width} ${height}`);
7432
7445
  const graphGroup = svg.append("g").attr("class", "graph-content");
7433
7446
  const nodeRadius = 40;
7434
- const directed = _optionalChain([options, 'optionalAccess', _160 => _160.directed]) === true;
7447
+ const directed = _optionalChain([options, 'optionalAccess', _161 => _161.directed]) === true;
7435
7448
  if (directed) {
7436
7449
  const defs = svg.append("defs");
7437
7450
  defs.append("marker").attr("id", "narr8-arrow").attr("viewBox", "-10 -10 20 20").attr("markerWidth", 14).attr("markerHeight", 14).attr("markerUnits", "userSpaceOnUse").attr("orient", "auto").attr("refX", 0).attr("refY", 0).append("path").attr("d", "M-10,-10 L0,0 L-10,10 z").attr("fill", "#999");
@@ -7443,10 +7456,10 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, lo
7443
7456
  });
7444
7457
  zoomBehaviorRef.current = zoom2;
7445
7458
  svg.call(zoom2).on("wheel.zoom", null).on("dblclick.zoom", null);
7446
- const layoutMode = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _161 => _161.layout]), () => ( "radial"));
7459
+ const layoutMode = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _162 => _162.layout]), () => ( "radial"));
7447
7460
  let layeredPositionsApplied = false;
7448
7461
  if (layoutMode === "layered") {
7449
- const layeredOpts = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _162 => _162.layered]), () => ( {}));
7462
+ const layeredOpts = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _163 => _163.layered]), () => ( {}));
7450
7463
  const useFit = layeredOpts.fitContainer === true && width > 0 && height > 0;
7451
7464
  const positions = useFit ? fitLayeredLayoutToAspectRatio(visibleNodes, visibleLinks, {
7452
7465
  rankdir: _nullishCoalesce(layeredOpts.rankdir, () => ( "LR")),
@@ -7529,7 +7542,7 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, lo
7529
7542
  sourceNode.children.push(targetId);
7530
7543
  }
7531
7544
  });
7532
- const rootChildren = _optionalChain([nodeHierarchy, 'access', _163 => _163.get, 'call', _164 => _164(centralNodeId), 'optionalAccess', _165 => _165.children]) || [];
7545
+ const rootChildren = _optionalChain([nodeHierarchy, 'access', _164 => _164.get, 'call', _165 => _165(centralNodeId), 'optionalAccess', _166 => _166.children]) || [];
7533
7546
  const childAngleStep = 2 * Math.PI / Math.max(rootChildren.length, 1);
7534
7547
  rootChildren.forEach((childId, index) => {
7535
7548
  const childNode = nodeHierarchy.get(childId);
@@ -7681,7 +7694,7 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, lo
7681
7694
  if (d.instanceType === "root") return;
7682
7695
  const currentNode = d3.select(this);
7683
7696
  currentNode.raise();
7684
- const currentZoom = _optionalChain([zoomRef, 'access', _166 => _166.current, 'optionalAccess', _167 => _167.k]) || 1;
7697
+ const currentZoom = _optionalChain([zoomRef, 'access', _167 => _167.current, 'optionalAccess', _168 => _168.k]) || 1;
7685
7698
  const targetScreenFontSize = 20;
7686
7699
  const baseFontSize = 12;
7687
7700
  const textScale = targetScreenFontSize / (baseFontSize * currentZoom);
@@ -7756,19 +7769,19 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, lo
7756
7769
  }
7757
7770
  });
7758
7771
  return () => {
7759
- _optionalChain([simulation, 'optionalAccess', _168 => _168.stop, 'call', _169 => _169()]);
7772
+ _optionalChain([simulation, 'optionalAccess', _169 => _169.stop, 'call', _170 => _170()]);
7760
7773
  };
7761
7774
  }, [
7762
7775
  nodes,
7763
7776
  links,
7764
7777
  colorScale,
7765
7778
  visibleNodeIds,
7766
- _optionalChain([options, 'optionalAccess', _170 => _170.directed]),
7767
- _optionalChain([options, 'optionalAccess', _171 => _171.layout]),
7768
- _optionalChain([options, 'optionalAccess', _172 => _172.layered, 'optionalAccess', _173 => _173.rankdir]),
7769
- _optionalChain([options, 'optionalAccess', _174 => _174.layered, 'optionalAccess', _175 => _175.nodesep]),
7770
- _optionalChain([options, 'optionalAccess', _176 => _176.layered, 'optionalAccess', _177 => _177.ranksep]),
7771
- _optionalChain([options, 'optionalAccess', _178 => _178.layered, 'optionalAccess', _179 => _179.fitContainer]),
7779
+ _optionalChain([options, 'optionalAccess', _171 => _171.directed]),
7780
+ _optionalChain([options, 'optionalAccess', _172 => _172.layout]),
7781
+ _optionalChain([options, 'optionalAccess', _173 => _173.layered, 'optionalAccess', _174 => _174.rankdir]),
7782
+ _optionalChain([options, 'optionalAccess', _175 => _175.layered, 'optionalAccess', _176 => _176.nodesep]),
7783
+ _optionalChain([options, 'optionalAccess', _177 => _177.layered, 'optionalAccess', _178 => _178.ranksep]),
7784
+ _optionalChain([options, 'optionalAccess', _179 => _179.layered, 'optionalAccess', _180 => _180.fitContainer]),
7772
7785
  loadingNodeIds,
7773
7786
  onNodeClick
7774
7787
  ]);
@@ -7956,21 +7969,21 @@ var CurrentUserContext = _react.createContext.call(void 0, void 0);
7956
7969
  var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ children }) => {
7957
7970
  const [dehydratedUser, setDehydratedUser] = _jotai.useAtom.call(void 0, userAtom);
7958
7971
  const matchUrlToModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => {
7959
- const path = _optionalChain([params, 'optionalAccess', _180 => _180.path, 'optionalAccess', _181 => _181.toLowerCase, 'call', _182 => _182()]);
7972
+ const path = _optionalChain([params, 'optionalAccess', _181 => _181.path, 'optionalAccess', _182 => _182.toLowerCase, 'call', _183 => _183()]);
7960
7973
  if (!path) return void 0;
7961
7974
  const moduleKeys = Object.getOwnPropertyNames(_chunk4ORLPEK7js.Modules).filter(
7962
7975
  (key) => key !== "prototype" && key !== "_factory" && key !== "length" && key !== "name"
7963
7976
  );
7964
7977
  const matchedModuleKey = moduleKeys.find((key) => {
7965
7978
  const descriptor2 = Object.getOwnPropertyDescriptor(_chunk4ORLPEK7js.Modules, key);
7966
- if (!_optionalChain([descriptor2, 'optionalAccess', _183 => _183.get])) return false;
7979
+ if (!_optionalChain([descriptor2, 'optionalAccess', _184 => _184.get])) return false;
7967
7980
  const selectedModule = descriptor2.get.call(_chunk4ORLPEK7js.Modules);
7968
- if (!_optionalChain([selectedModule, 'optionalAccess', _184 => _184.pageUrl])) return false;
7981
+ if (!_optionalChain([selectedModule, 'optionalAccess', _185 => _185.pageUrl])) return false;
7969
7982
  return path.startsWith(selectedModule.pageUrl.toLowerCase());
7970
7983
  });
7971
7984
  if (!matchedModuleKey) return void 0;
7972
7985
  const descriptor = Object.getOwnPropertyDescriptor(_chunk4ORLPEK7js.Modules, matchedModuleKey);
7973
- return _optionalChain([descriptor, 'optionalAccess', _185 => _185.get, 'optionalAccess', _186 => _186.call, 'call', _187 => _187(_chunk4ORLPEK7js.Modules)]);
7986
+ return _optionalChain([descriptor, 'optionalAccess', _186 => _186.get, 'optionalAccess', _187 => _187.call, 'call', _188 => _188(_chunk4ORLPEK7js.Modules)]);
7974
7987
  }, "matchUrlToModule");
7975
7988
  const currentUser = _react.useMemo.call(void 0,
7976
7989
  () => dehydratedUser ? _chunk4ORLPEK7js.rehydrate.call(void 0, _chunk4ORLPEK7js.Modules.User, dehydratedUser) : null,
@@ -7978,7 +7991,7 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
7978
7991
  );
7979
7992
  const [creditOverride, setCreditOverride] = _react.useState.call(void 0, null);
7980
7993
  const company = _react.useMemo.call(void 0, () => {
7981
- const c = _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _188 => _188.company]), () => ( null));
7994
+ const c = _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _189 => _189.company]), () => ( null));
7982
7995
  if (!c || !creditOverride) return c;
7983
7996
  return Object.assign(Object.create(Object.getPrototypeOf(c)), c, {
7984
7997
  _availableMonthlyCredits: creditOverride.availableMonthlyCredits,
@@ -7992,7 +8005,7 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
7992
8005
  }, "setUser");
7993
8006
  const hasRole = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (roleId) => {
7994
8007
  if (!currentUser) return false;
7995
- return !!_optionalChain([currentUser, 'access', _189 => _189.roles, 'optionalAccess', _190 => _190.some, 'call', _191 => _191((userRole) => userRole.id === roleId)]);
8008
+ return !!_optionalChain([currentUser, 'access', _190 => _190.roles, 'optionalAccess', _191 => _191.some, 'call', _192 => _192((userRole) => userRole.id === roleId)]);
7996
8009
  }, "hasRole");
7997
8010
  const hasAccesToFeature = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (featureIdentifier) => {
7998
8011
  if (hasRole(_chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator)) return true;
@@ -8032,12 +8045,12 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
8032
8045
  try {
8033
8046
  const fullUser = await _chunk4ORLPEK7js.UserService.findFullUser();
8034
8047
  if (fullUser) {
8035
- if (!_optionalChain([options, 'optionalAccess', _192 => _192.skipCookieUpdate])) {
8036
- await _optionalChain([_chunk4ORLPEK7js.getTokenHandler.call(void 0, ), 'optionalAccess', _193 => _193.updateToken, 'call', _194 => _194({
8048
+ if (!_optionalChain([options, 'optionalAccess', _193 => _193.skipCookieUpdate])) {
8049
+ await _optionalChain([_chunk4ORLPEK7js.getTokenHandler.call(void 0, ), 'optionalAccess', _194 => _194.updateToken, 'call', _195 => _195({
8037
8050
  userId: fullUser.id,
8038
- companyId: _optionalChain([fullUser, 'access', _195 => _195.company, 'optionalAccess', _196 => _196.id]),
8051
+ companyId: _optionalChain([fullUser, 'access', _196 => _196.company, 'optionalAccess', _197 => _197.id]),
8039
8052
  roles: fullUser.roles.map((role) => role.id),
8040
- features: _nullishCoalesce(_optionalChain([fullUser, 'access', _197 => _197.company, 'optionalAccess', _198 => _198.features, 'optionalAccess', _199 => _199.map, 'call', _200 => _200((feature) => feature.id)]), () => ( [])),
8053
+ features: _nullishCoalesce(_optionalChain([fullUser, 'access', _198 => _198.company, 'optionalAccess', _199 => _199.features, 'optionalAccess', _200 => _200.map, 'call', _201 => _201((feature) => feature.id)]), () => ( [])),
8041
8054
  modules: fullUser.modules.map((module) => ({
8042
8055
  id: module.id,
8043
8056
  permissions: module.permissions
@@ -8066,18 +8079,18 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
8066
8079
  }, []);
8067
8080
  const isRefreshingRef = _react.useRef.call(void 0, false);
8068
8081
  _react.useEffect.call(void 0, () => {
8069
- if (!socket || !isConnected || !_optionalChain([currentUser, 'optionalAccess', _201 => _201.company, 'optionalAccess', _202 => _202.id])) {
8082
+ if (!socket || !isConnected || !_optionalChain([currentUser, 'optionalAccess', _202 => _202.company, 'optionalAccess', _203 => _203.id])) {
8070
8083
  return;
8071
8084
  }
8072
8085
  const handleCreditsUpdated = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (data) => {
8073
- if (data.companyId !== _optionalChain([currentUser, 'access', _203 => _203.company, 'optionalAccess', _204 => _204.id])) return;
8086
+ if (data.companyId !== _optionalChain([currentUser, 'access', _204 => _204.company, 'optionalAccess', _205 => _205.id])) return;
8074
8087
  setCreditOverride({
8075
8088
  availableMonthlyCredits: data.availableMonthlyCredits,
8076
8089
  availableExtraCredits: data.availableExtraCredits
8077
8090
  });
8078
8091
  }, "handleCreditsUpdated");
8079
8092
  const handleSubscriptionUpdated = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (data) => {
8080
- if (data.companyId === _optionalChain([currentUser, 'access', _205 => _205.company, 'optionalAccess', _206 => _206.id]) && !isRefreshingRef.current) {
8093
+ if (data.companyId === _optionalChain([currentUser, 'access', _206 => _206.company, 'optionalAccess', _207 => _207.id]) && !isRefreshingRef.current) {
8081
8094
  isRefreshingRef.current = true;
8082
8095
  refreshUserRef.current({ skipCookieUpdate: true }).finally(() => {
8083
8096
  isRefreshingRef.current = false;
@@ -8090,7 +8103,7 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
8090
8103
  socket.off("company:credits_updated", handleCreditsUpdated);
8091
8104
  socket.off("company:subscription_updated", handleSubscriptionUpdated);
8092
8105
  };
8093
- }, [socket, isConnected, _optionalChain([currentUser, 'optionalAccess', _207 => _207.company, 'optionalAccess', _208 => _208.id])]);
8106
+ }, [socket, isConnected, _optionalChain([currentUser, 'optionalAccess', _208 => _208.company, 'optionalAccess', _209 => _209.id])]);
8094
8107
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
8095
8108
  CurrentUserContext.Provider,
8096
8109
  {
@@ -8165,7 +8178,7 @@ function AddUserToRoleInternal({ role, refresh }) {
8165
8178
  const data = useDataListRetriever({
8166
8179
  ready: !!company && show,
8167
8180
  retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunk4ORLPEK7js.UserService.findAllUsers(params), "retriever"),
8168
- retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _209 => _209.id]) },
8181
+ retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _210 => _210.id]) },
8169
8182
  module: _chunk4ORLPEK7js.Modules.User
8170
8183
  });
8171
8184
  _react.useEffect.call(void 0, () => {
@@ -8217,7 +8230,7 @@ function UserAvatarEditor({ user, file, setFile, resetImage, setResetImage }) {
8217
8230
  setFile(files[0]);
8218
8231
  }
8219
8232
  }, [files]);
8220
- const avatarSrc = file ? URL.createObjectURL(file) : _optionalChain([user, 'optionalAccess', _210 => _210.avatar]) || "";
8233
+ const avatarSrc = file ? URL.createObjectURL(file) : _optionalChain([user, 'optionalAccess', _211 => _211.avatar]) || "";
8221
8234
  const dropzone2 = {
8222
8235
  multiple: false,
8223
8236
  maxSize: 100 * 1024 * 1024,
@@ -8234,7 +8247,7 @@ function UserAvatarEditor({ user, file, setFile, resetImage, setResetImage }) {
8234
8247
  onValueChange: setFiles,
8235
8248
  dropzoneOptions: dropzone2,
8236
8249
  className: "h-40 w-40 rounded-full p-0",
8237
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FileInput, { className: "bg-muted text-muted-foreground flex h-full w-full flex-col items-center justify-center", children: !resetImage && (file || _optionalChain([user, 'optionalAccess', _211 => _211.avatar])) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
8250
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FileInput, { className: "bg-muted text-muted-foreground flex h-full w-full flex-col items-center justify-center", children: !resetImage && (file || _optionalChain([user, 'optionalAccess', _212 => _212.avatar])) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
8238
8251
  _image2.default,
8239
8252
  {
8240
8253
  src: avatarSrc,
@@ -8246,7 +8259,7 @@ function UserAvatarEditor({ user, file, setFile, resetImage, setResetImage }) {
8246
8259
  ) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.UploadIcon, { className: "my-4 h-8 w-8" }) })
8247
8260
  }
8248
8261
  ),
8249
- !resetImage && (file || _optionalChain([user, 'optionalAccess', _212 => _212.avatar])) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
8262
+ !resetImage && (file || _optionalChain([user, 'optionalAccess', _213 => _213.avatar])) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
8250
8263
  Button,
8251
8264
  {
8252
8265
  className: "",
@@ -8274,7 +8287,7 @@ function UserDeleterInternal({ user, onDeleted, companyId }) {
8274
8287
  const router = _chunk4ORLPEK7js.useI18nRouter.call(void 0, );
8275
8288
  const _t = _nextintl.useTranslations.call(void 0, );
8276
8289
  let cId;
8277
- if (_optionalChain([currentUser, 'optionalAccess', _213 => _213.roles, 'access', _214 => _214.find, 'call', _215 => _215((role) => role.id === _chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator)]) && companyId) {
8290
+ if (_optionalChain([currentUser, 'optionalAccess', _214 => _214.roles, 'access', _215 => _215.find, 'call', _216 => _216((role) => role.id === _chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator)]) && companyId) {
8278
8291
  cId = companyId;
8279
8292
  } else {
8280
8293
  if (!company) return;
@@ -8337,18 +8350,18 @@ function UserEditorInternal({
8337
8350
  }, [company]);
8338
8351
  const handleDialogOpenChange = _react.useCallback.call(void 0,
8339
8352
  (open) => {
8340
- if (open && (company || _optionalChain([currentUser, 'optionalAccess', _216 => _216.roles, 'access', _217 => _217.find, 'call', _218 => _218((role) => role.id === _chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator)])) && roles.length === 0) {
8353
+ if (open && (company || _optionalChain([currentUser, 'optionalAccess', _217 => _217.roles, 'access', _218 => _218.find, 'call', _219 => _219((role) => role.id === _chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator)])) && roles.length === 0) {
8341
8354
  async function fetchRoles() {
8342
8355
  const allRoles = await _chunk4ORLPEK7js.RoleService.findAllRoles({});
8343
8356
  const availableRoles = allRoles.filter(
8344
- (role) => role.id !== _chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator && (role.requiredFeature === void 0 || _optionalChain([company, 'optionalAccess', _219 => _219.features, 'access', _220 => _220.some, 'call', _221 => _221((feature) => feature.id === _optionalChain([role, 'access', _222 => _222.requiredFeature, 'optionalAccess', _223 => _223.id]))]))
8357
+ (role) => role.id !== _chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator && (role.requiredFeature === void 0 || _optionalChain([company, 'optionalAccess', _220 => _220.features, 'access', _221 => _221.some, 'call', _222 => _222((feature) => feature.id === _optionalChain([role, 'access', _223 => _223.requiredFeature, 'optionalAccess', _224 => _224.id]))]))
8345
8358
  );
8346
8359
  setRoles(availableRoles);
8347
8360
  }
8348
8361
  _chunk7QVYU63Ejs.__name.call(void 0, fetchRoles, "fetchRoles");
8349
8362
  fetchRoles();
8350
8363
  }
8351
- _optionalChain([onDialogOpenChange, 'optionalCall', _224 => _224(open)]);
8364
+ _optionalChain([onDialogOpenChange, 'optionalCall', _225 => _225(open)]);
8352
8365
  },
8353
8366
  [company, currentUser, roles.length, onDialogOpenChange]
8354
8367
  );
@@ -8387,29 +8400,29 @@ function UserEditorInternal({
8387
8400
  );
8388
8401
  const getDefaultValues = _react.useCallback.call(void 0, () => {
8389
8402
  return {
8390
- id: _optionalChain([user, 'optionalAccess', _225 => _225.id]) || _uuid.v4.call(void 0, ),
8391
- name: _optionalChain([user, 'optionalAccess', _226 => _226.name]) || "",
8392
- title: _optionalChain([user, 'optionalAccess', _227 => _227.title]) || "",
8393
- bio: _optionalChain([user, 'optionalAccess', _228 => _228.bio]) || "",
8394
- email: _optionalChain([user, 'optionalAccess', _229 => _229.email]) || "",
8395
- phone: _optionalChain([user, 'optionalAccess', _230 => _230.phone]) || "",
8403
+ id: _optionalChain([user, 'optionalAccess', _226 => _226.id]) || _uuid.v4.call(void 0, ),
8404
+ name: _optionalChain([user, 'optionalAccess', _227 => _227.name]) || "",
8405
+ title: _optionalChain([user, 'optionalAccess', _228 => _228.title]) || "",
8406
+ bio: _optionalChain([user, 'optionalAccess', _229 => _229.bio]) || "",
8407
+ email: _optionalChain([user, 'optionalAccess', _230 => _230.email]) || "",
8408
+ phone: _optionalChain([user, 'optionalAccess', _231 => _231.phone]) || "",
8396
8409
  password: "",
8397
- roleIds: _optionalChain([user, 'optionalAccess', _231 => _231.roles, 'access', _232 => _232.map, 'call', _233 => _233((role) => role.id)]) || [],
8410
+ roleIds: _optionalChain([user, 'optionalAccess', _232 => _232.roles, 'access', _233 => _233.map, 'call', _234 => _234((role) => role.id)]) || [],
8398
8411
  sendInvitationEmail: false,
8399
- avatar: _optionalChain([user, 'optionalAccess', _234 => _234.avatarUrl]) || ""
8412
+ avatar: _optionalChain([user, 'optionalAccess', _235 => _235.avatarUrl]) || ""
8400
8413
  };
8401
8414
  }, [user]);
8402
8415
  const form = _reacthookform.useForm.call(void 0, {
8403
8416
  resolver: _zod.zodResolver.call(void 0, formSchema),
8404
8417
  defaultValues: getDefaultValues()
8405
8418
  });
8406
- const canChangeRoles = !(_optionalChain([currentUser, 'optionalAccess', _235 => _235.id]) === _optionalChain([user, 'optionalAccess', _236 => _236.id]) && hasRole(_chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator)) && (hasPermissionToModule({ module: _chunk4ORLPEK7js.Modules.User, action: "update" /* Update */ }) || hasRole(_chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator));
8419
+ const canChangeRoles = !(_optionalChain([currentUser, 'optionalAccess', _236 => _236.id]) === _optionalChain([user, 'optionalAccess', _237 => _237.id]) && hasRole(_chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator)) && (hasPermissionToModule({ module: _chunk4ORLPEK7js.Modules.User, action: "update" /* Update */ }) || hasRole(_chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator));
8407
8420
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
8408
8421
  EditorSheet,
8409
8422
  {
8410
8423
  form,
8411
8424
  entityType: t(`entities.users`, { count: 1 }),
8412
- entityName: _optionalChain([user, 'optionalAccess', _237 => _237.name]),
8425
+ entityName: _optionalChain([user, 'optionalAccess', _238 => _238.name]),
8413
8426
  isEdit: !!user,
8414
8427
  module: _chunk4ORLPEK7js.Modules.User,
8415
8428
  propagateChanges,
@@ -8461,11 +8474,11 @@ function UserEditorInternal({
8461
8474
  // can legitimately have no company (the seeded Administrator does), in
8462
8475
  // which case `company` is null here. `company!.id` threw a TypeError
8463
8476
  // and surfaced as a generic "update failed" toast.
8464
- companyId: _optionalChain([company, 'optionalAccess', _238 => _238.id]),
8477
+ companyId: _optionalChain([company, 'optionalAccess', _239 => _239.id]),
8465
8478
  adminCreated
8466
8479
  };
8467
8480
  const updatedUser = user ? await _chunk4ORLPEK7js.UserService.update(payload) : await _chunk4ORLPEK7js.UserService.create(payload);
8468
- if (_optionalChain([currentUser, 'optionalAccess', _239 => _239.id]) === updatedUser.id) setUser(updatedUser);
8481
+ if (_optionalChain([currentUser, 'optionalAccess', _240 => _240.id]) === updatedUser.id) setUser(updatedUser);
8469
8482
  return updatedUser;
8470
8483
  },
8471
8484
  onRevalidate,
@@ -8730,7 +8743,7 @@ function EntityMultiSelector({
8730
8743
  if (open) {
8731
8744
  setSearchTerm("");
8732
8745
  requestAnimationFrame(() => {
8733
- _optionalChain([searchInputRef, 'access', _240 => _240.current, 'optionalAccess', _241 => _241.focus, 'call', _242 => _242()]);
8746
+ _optionalChain([searchInputRef, 'access', _241 => _241.current, 'optionalAccess', _242 => _242.focus, 'call', _243 => _243()]);
8734
8747
  });
8735
8748
  }
8736
8749
  }, [open]);
@@ -8747,7 +8760,7 @@ function EntityMultiSelector({
8747
8760
  form.setValue(id, next, { shouldDirty: true, shouldTouch: true });
8748
8761
  const cb = onChangeRef.current;
8749
8762
  if (cb) {
8750
- const fullData = next.map((v) => _optionalChain([options, 'access', _243 => _243.find, 'call', _244 => _244((opt) => opt.id === v.id), 'optionalAccess', _245 => _245.entityData])).filter(Boolean);
8763
+ const fullData = next.map((v) => _optionalChain([options, 'access', _244 => _244.find, 'call', _245 => _245((opt) => opt.id === v.id), 'optionalAccess', _246 => _246.entityData])).filter(Boolean);
8751
8764
  cb(fullData);
8752
8765
  }
8753
8766
  },
@@ -8760,7 +8773,7 @@ function EntityMultiSelector({
8760
8773
  form.setValue(id, next, { shouldDirty: true, shouldTouch: true });
8761
8774
  const cb = onChangeRef.current;
8762
8775
  if (cb) {
8763
- const fullData = next.map((v) => _optionalChain([options, 'access', _246 => _246.find, 'call', _247 => _247((opt) => opt.id === v.id), 'optionalAccess', _248 => _248.entityData])).filter(Boolean);
8776
+ const fullData = next.map((v) => _optionalChain([options, 'access', _247 => _247.find, 'call', _248 => _248((opt) => opt.id === v.id), 'optionalAccess', _249 => _249.entityData])).filter(Boolean);
8764
8777
  cb(fullData);
8765
8778
  }
8766
8779
  },
@@ -8903,11 +8916,11 @@ function UserMultiSelect({
8903
8916
  emptyText: t("ui.search.no_results", { type: t("entities.users", { count: 2 }) }),
8904
8917
  isRequired,
8905
8918
  retriever: (params) => _chunk4ORLPEK7js.UserService.findAllUsers(params),
8906
- retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _249 => _249.id]) },
8919
+ retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _250 => _250.id]) },
8907
8920
  module: _chunk4ORLPEK7js.Modules.User,
8908
8921
  getLabel: (user) => user.name,
8909
8922
  toFormValue: (user) => ({ id: user.id, name: user.name, avatar: user.avatar }),
8910
- excludeId: _optionalChain([currentUser, 'optionalAccess', _250 => _250.id]),
8923
+ excludeId: _optionalChain([currentUser, 'optionalAccess', _251 => _251.id]),
8911
8924
  onChange,
8912
8925
  renderOption: (user) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-2", children: [
8913
8926
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatarIcon, { url: user.avatar, name: user.name }),
@@ -9717,7 +9730,7 @@ var DatePickerPopover = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
9717
9730
  function nextDateRange(params) {
9718
9731
  const { current, computed, triggerDate } = params;
9719
9732
  if (!computed) return void 0;
9720
- if (_optionalChain([current, 'optionalAccess', _251 => _251.from]) && _optionalChain([current, 'optionalAccess', _252 => _252.to])) return { from: triggerDate, to: void 0 };
9733
+ if (_optionalChain([current, 'optionalAccess', _252 => _252.from]) && _optionalChain([current, 'optionalAccess', _253 => _253.to])) return { from: triggerDate, to: void 0 };
9721
9734
  return computed;
9722
9735
  }
9723
9736
  _chunk7QVYU63Ejs.__name.call(void 0, nextDateRange, "nextDateRange");
@@ -9737,7 +9750,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
9737
9750
  }, []);
9738
9751
  const [prevRange, setPrevRange] = _react.useState.call(void 0, date);
9739
9752
  _react.useEffect.call(void 0, () => {
9740
- if (_optionalChain([date, 'optionalAccess', _253 => _253.from]) && _optionalChain([date, 'optionalAccess', _254 => _254.to]) && date.to > date.from && (_optionalChain([prevRange, 'optionalAccess', _255 => _255.from, 'optionalAccess', _256 => _256.getTime, 'call', _257 => _257()]) !== date.from.getTime() || _optionalChain([prevRange, 'optionalAccess', _258 => _258.to, 'optionalAccess', _259 => _259.getTime, 'call', _260 => _260()]) !== date.to.getTime())) {
9753
+ if (_optionalChain([date, 'optionalAccess', _254 => _254.from]) && _optionalChain([date, 'optionalAccess', _255 => _255.to]) && date.to > date.from && (_optionalChain([prevRange, 'optionalAccess', _256 => _256.from, 'optionalAccess', _257 => _257.getTime, 'call', _258 => _258()]) !== date.from.getTime() || _optionalChain([prevRange, 'optionalAccess', _259 => _259.to, 'optionalAccess', _260 => _260.getTime, 'call', _261 => _261()]) !== date.to.getTime())) {
9741
9754
  onDateChange(date);
9742
9755
  setPrevRange(date);
9743
9756
  setOpen(false);
@@ -9755,7 +9768,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
9755
9768
  className: _chunk4ORLPEK7js.cn.call(void 0, "w-[300px] justify-start text-start font-normal", !date && "text-muted-foreground"),
9756
9769
  children: [
9757
9770
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CalendarIcon, {}),
9758
- _optionalChain([date, 'optionalAccess', _261 => _261.from]) ? date.to ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
9771
+ _optionalChain([date, 'optionalAccess', _262 => _262.from]) ? date.to ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
9759
9772
  _datefns.format.call(void 0, date.from, "d MMM yyyy", { locale: dateFnsLocale }),
9760
9773
  " -",
9761
9774
  " ",
@@ -9779,7 +9792,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
9779
9792
  ),
9780
9793
  children: [
9781
9794
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CalendarIcon, {}),
9782
- _optionalChain([date, 'optionalAccess', _262 => _262.from]) ? date.to ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
9795
+ _optionalChain([date, 'optionalAccess', _263 => _263.from]) ? date.to ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
9783
9796
  _datefns.format.call(void 0, date.from, "d MMM yyyy", { locale: dateFnsLocale }),
9784
9797
  " -",
9785
9798
  " ",
@@ -9793,7 +9806,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
9793
9806
  Calendar,
9794
9807
  {
9795
9808
  mode: "range",
9796
- defaultMonth: _nullishCoalesce(_optionalChain([date, 'optionalAccess', _263 => _263.from]), () => ( (showPreviousMonth ? new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth() - 1, 1) : void 0))),
9809
+ defaultMonth: _nullishCoalesce(_optionalChain([date, 'optionalAccess', _264 => _264.from]), () => ( (showPreviousMonth ? new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth() - 1, 1) : void 0))),
9797
9810
  selected: date,
9798
9811
  onSelect: handleSelect,
9799
9812
  numberOfMonths: 2
@@ -9868,31 +9881,31 @@ function useEditorDialog(isFormDirty, options) {
9868
9881
  }, []);
9869
9882
  _react.useEffect.call(void 0, () => {
9870
9883
  if (ignoreTrueFromParent.current) {
9871
- if (_optionalChain([options, 'optionalAccess', _264 => _264.dialogOpen]) === true) return;
9872
- if (_optionalChain([options, 'optionalAccess', _265 => _265.dialogOpen]) === false) ignoreTrueFromParent.current = false;
9884
+ if (_optionalChain([options, 'optionalAccess', _265 => _265.dialogOpen]) === true) return;
9885
+ if (_optionalChain([options, 'optionalAccess', _266 => _266.dialogOpen]) === false) ignoreTrueFromParent.current = false;
9873
9886
  }
9874
- if (_optionalChain([options, 'optionalAccess', _266 => _266.dialogOpen]) !== void 0 && options.dialogOpen !== open) {
9887
+ if (_optionalChain([options, 'optionalAccess', _267 => _267.dialogOpen]) !== void 0 && options.dialogOpen !== open) {
9875
9888
  syncingFromProp.current = true;
9876
9889
  setOpen(options.dialogOpen);
9877
9890
  }
9878
- }, [_optionalChain([options, 'optionalAccess', _267 => _267.dialogOpen])]);
9879
- const onDialogOpenChangeRef = _react.useRef.call(void 0, _optionalChain([options, 'optionalAccess', _268 => _268.onDialogOpenChange]));
9880
- onDialogOpenChangeRef.current = _optionalChain([options, 'optionalAccess', _269 => _269.onDialogOpenChange]);
9891
+ }, [_optionalChain([options, 'optionalAccess', _268 => _268.dialogOpen])]);
9892
+ const onDialogOpenChangeRef = _react.useRef.call(void 0, _optionalChain([options, 'optionalAccess', _269 => _269.onDialogOpenChange]));
9893
+ onDialogOpenChangeRef.current = _optionalChain([options, 'optionalAccess', _270 => _270.onDialogOpenChange]);
9881
9894
  _react.useEffect.call(void 0, () => {
9882
9895
  if (syncingFromProp.current) {
9883
9896
  syncingFromProp.current = false;
9884
9897
  return;
9885
9898
  }
9886
- _optionalChain([onDialogOpenChangeRef, 'access', _270 => _270.current, 'optionalCall', _271 => _271(open)]);
9899
+ _optionalChain([onDialogOpenChangeRef, 'access', _271 => _271.current, 'optionalCall', _272 => _272(open)]);
9887
9900
  }, [open]);
9888
9901
  const lastForceShow = _react.useRef.call(void 0, void 0);
9889
9902
  _react.useEffect.call(void 0, () => {
9890
- if (_optionalChain([options, 'optionalAccess', _272 => _272.forceShow]) && lastForceShow.current !== true) setOpen(true);
9891
- lastForceShow.current = _optionalChain([options, 'optionalAccess', _273 => _273.forceShow]);
9892
- }, [_optionalChain([options, 'optionalAccess', _274 => _274.forceShow])]);
9903
+ if (_optionalChain([options, 'optionalAccess', _273 => _273.forceShow]) && lastForceShow.current !== true) setOpen(true);
9904
+ lastForceShow.current = _optionalChain([options, 'optionalAccess', _274 => _274.forceShow]);
9905
+ }, [_optionalChain([options, 'optionalAccess', _275 => _275.forceShow])]);
9893
9906
  _react.useEffect.call(void 0, () => {
9894
9907
  if (!open) {
9895
- if (_optionalChain([options, 'optionalAccess', _275 => _275.onClose])) options.onClose();
9908
+ if (_optionalChain([options, 'optionalAccess', _276 => _276.onClose])) options.onClose();
9896
9909
  }
9897
9910
  }, [open]);
9898
9911
  const handleOpenChange = _react.useCallback.call(void 0,
@@ -10018,7 +10031,7 @@ function EditorSheet({
10018
10031
  const next = onReset();
10019
10032
  form.reset(next);
10020
10033
  if (isEdit) seeded.current = JSON.stringify(next);
10021
- _optionalChain([onClose, 'optionalCall', _276 => _276()]);
10034
+ _optionalChain([onClose, 'optionalCall', _277 => _277()]);
10022
10035
  }
10023
10036
  }, [open]);
10024
10037
  const wrappedOnSubmit = _react.useCallback.call(void 0,
@@ -10032,11 +10045,11 @@ function EditorSheet({
10032
10045
  if (onSuccess) {
10033
10046
  await onSuccess();
10034
10047
  } else if (result) {
10035
- _optionalChain([onRevalidate, 'optionalCall', _277 => _277(generateUrl({ page: module, id: result.id, language: "[locale]" }))]);
10048
+ _optionalChain([onRevalidate, 'optionalCall', _278 => _278(generateUrl({ page: module, id: result.id, language: "[locale]" }))]);
10036
10049
  if (propagateChanges) {
10037
10050
  propagateChanges(result);
10038
10051
  } else {
10039
- _optionalChain([onNavigate, 'optionalCall', _278 => _278(generateUrl({ page: module, id: result.id }))]);
10052
+ _optionalChain([onNavigate, 'optionalCall', _279 => _279(generateUrl({ page: module, id: result.id }))]);
10040
10053
  }
10041
10054
  }
10042
10055
  } catch (error) {
@@ -10259,7 +10272,7 @@ function EntitySelector({
10259
10272
  {
10260
10273
  className: `bg-input/20 dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/30 focus-visible:ring-[2px] flex min-h-7 max-md:min-h-10 w-full items-center gap-2 rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed ${hasValue(effectiveValue) ? "" : "text-muted-foreground"} ${disabled ? "cursor-not-allowed opacity-50" : ""}`,
10261
10274
  children: [
10262
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "min-w-0 flex-1 truncate text-start", children: hasValue(effectiveValue) ? getSelectedItemDisplay ? getSelectedItemDisplay(effectiveValue) : _nullishCoalesce(_optionalChain([effectiveValue, 'optionalAccess', _279 => _279.name]), () => ( "")) : placeholder }),
10275
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "min-w-0 flex-1 truncate text-start", children: hasValue(effectiveValue) ? getSelectedItemDisplay ? getSelectedItemDisplay(effectiveValue) : _nullishCoalesce(_optionalChain([effectiveValue, 'optionalAccess', _280 => _280.name]), () => ( "")) : placeholder }),
10263
10276
  hasValue(effectiveValue) && !disabled && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
10264
10277
  _lucidereact.CircleX,
10265
10278
  {
@@ -10420,7 +10433,7 @@ var FileUploader = _react.forwardRef.call(void 0,
10420
10433
  movePrev();
10421
10434
  } else if (e.key === "Enter" || e.key === "Space") {
10422
10435
  if (activeIndex === -1) {
10423
- _optionalChain([dropzoneState, 'access', _280 => _280.inputRef, 'access', _281 => _281.current, 'optionalAccess', _282 => _282.click, 'call', _283 => _283()]);
10436
+ _optionalChain([dropzoneState, 'access', _281 => _281.inputRef, 'access', _282 => _282.current, 'optionalAccess', _283 => _283.click, 'call', _284 => _284()]);
10424
10437
  }
10425
10438
  } else if (e.key === "Delete" || e.key === "Backspace") {
10426
10439
  if (activeIndex !== -1) {
@@ -10466,13 +10479,13 @@ var FileUploader = _react.forwardRef.call(void 0,
10466
10479
  }
10467
10480
  if (rejectedFiles.length > 0) {
10468
10481
  for (let i = 0; i < rejectedFiles.length; i++) {
10469
- if (_optionalChain([rejectedFiles, 'access', _284 => _284[i], 'access', _285 => _285.errors, 'access', _286 => _286[0], 'optionalAccess', _287 => _287.code]) === "file-too-large") {
10482
+ if (_optionalChain([rejectedFiles, 'access', _285 => _285[i], 'access', _286 => _286.errors, 'access', _287 => _287[0], 'optionalAccess', _288 => _288.code]) === "file-too-large") {
10470
10483
  _chunk4ORLPEK7js.showError.call(void 0, t("common.errors.file"), {
10471
10484
  description: t(`common.errors.file_max`, { size: maxSize / 1024 / 1024 })
10472
10485
  });
10473
10486
  break;
10474
10487
  }
10475
- if (_optionalChain([rejectedFiles, 'access', _288 => _288[i], 'access', _289 => _289.errors, 'access', _290 => _290[0], 'optionalAccess', _291 => _291.message])) {
10488
+ if (_optionalChain([rejectedFiles, 'access', _289 => _289[i], 'access', _290 => _290.errors, 'access', _291 => _291[0], 'optionalAccess', _292 => _292.message])) {
10476
10489
  _chunk4ORLPEK7js.showError.call(void 0, t(`common.errors.file`), {
10477
10490
  description: rejectedFiles[i].errors[0].message
10478
10491
  });
@@ -10671,7 +10684,7 @@ FileInput.displayName = "FileInput";
10671
10684
  var _dynamic = require('next/dynamic'); var _dynamic2 = _interopRequireDefault(_dynamic);
10672
10685
 
10673
10686
 
10674
- var BlockNoteEditor = _dynamic2.default.call(void 0, () => Promise.resolve().then(() => _interopRequireWildcard(require("./BlockNoteEditor-LLCZDFLZ.js"))), {
10687
+ var BlockNoteEditor = _dynamic2.default.call(void 0, () => Promise.resolve().then(() => _interopRequireWildcard(require("./BlockNoteEditor-J533UMWG.js"))), {
10675
10688
  ssr: false
10676
10689
  });
10677
10690
  var BlockNoteEditorContainer = React2.default.memo(/* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, function EditorContainer(props) {
@@ -10755,7 +10768,7 @@ function FormBlockNote({
10755
10768
  } else {
10756
10769
  field.onChange(content);
10757
10770
  }
10758
- _optionalChain([onEmptyChange, 'optionalCall', _292 => _292(isEmpty)]);
10771
+ _optionalChain([onEmptyChange, 'optionalCall', _293 => _293(isEmpty)]);
10759
10772
  },
10760
10773
  placeholder,
10761
10774
  bordered: true,
@@ -11422,11 +11435,11 @@ function FormPlaceAutocomplete({
11422
11435
  const data = await response.json();
11423
11436
  if (data.suggestions) {
11424
11437
  const formattedSuggestions = data.suggestions.map((suggestion) => ({
11425
- place_id: _optionalChain([suggestion, 'access', _293 => _293.placePrediction, 'optionalAccess', _294 => _294.placeId]) || "",
11426
- description: _optionalChain([suggestion, 'access', _295 => _295.placePrediction, 'optionalAccess', _296 => _296.text, 'optionalAccess', _297 => _297.text]) || "",
11438
+ place_id: _optionalChain([suggestion, 'access', _294 => _294.placePrediction, 'optionalAccess', _295 => _295.placeId]) || "",
11439
+ description: _optionalChain([suggestion, 'access', _296 => _296.placePrediction, 'optionalAccess', _297 => _297.text, 'optionalAccess', _298 => _298.text]) || "",
11427
11440
  structured_formatting: {
11428
- main_text: _optionalChain([suggestion, 'access', _298 => _298.placePrediction, 'optionalAccess', _299 => _299.structuredFormat, 'optionalAccess', _300 => _300.mainText, 'optionalAccess', _301 => _301.text]) || "",
11429
- secondary_text: _optionalChain([suggestion, 'access', _302 => _302.placePrediction, 'optionalAccess', _303 => _303.structuredFormat, 'optionalAccess', _304 => _304.secondaryText, 'optionalAccess', _305 => _305.text]) || ""
11441
+ main_text: _optionalChain([suggestion, 'access', _299 => _299.placePrediction, 'optionalAccess', _300 => _300.structuredFormat, 'optionalAccess', _301 => _301.mainText, 'optionalAccess', _302 => _302.text]) || "",
11442
+ secondary_text: _optionalChain([suggestion, 'access', _303 => _303.placePrediction, 'optionalAccess', _304 => _304.structuredFormat, 'optionalAccess', _305 => _305.secondaryText, 'optionalAccess', _306 => _306.text]) || ""
11430
11443
  }
11431
11444
  }));
11432
11445
  setSuggestions(formattedSuggestions);
@@ -11573,8 +11586,8 @@ function FormPlaceAutocomplete({
11573
11586
  className: "hover:bg-muted cursor-pointer px-3 py-2 text-sm",
11574
11587
  onClick: () => handleSuggestionSelect(suggestion),
11575
11588
  children: [
11576
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "font-medium", children: _optionalChain([suggestion, 'access', _306 => _306.structured_formatting, 'optionalAccess', _307 => _307.main_text]) }),
11577
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground", children: _optionalChain([suggestion, 'access', _308 => _308.structured_formatting, 'optionalAccess', _309 => _309.secondary_text]) })
11589
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "font-medium", children: _optionalChain([suggestion, 'access', _307 => _307.structured_formatting, 'optionalAccess', _308 => _308.main_text]) }),
11590
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground", children: _optionalChain([suggestion, 'access', _309 => _309.structured_formatting, 'optionalAccess', _310 => _310.secondary_text]) })
11578
11591
  ]
11579
11592
  },
11580
11593
  suggestion.place_id || index
@@ -11622,7 +11635,7 @@ function FormSelect({
11622
11635
  disabled,
11623
11636
  "data-testid": testId,
11624
11637
  children: [
11625
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectValue, { children: field.value ? _optionalChain([values, 'access', _310 => _310.find, 'call', _311 => _311((v) => v.id === field.value), 'optionalAccess', _312 => _312.text]) : _nullishCoalesce(placeholder, () => ( "")) }) }),
11638
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectValue, { children: field.value ? _optionalChain([values, 'access', _311 => _311.find, 'call', _312 => _312((v) => v.id === field.value), 'optionalAccess', _313 => _313.text]) : _nullishCoalesce(placeholder, () => ( "")) }) }),
11626
11639
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, SelectContent, { children: [
11627
11640
  allowEmpty && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: EMPTY_VALUE, className: "text-muted-foreground", children: _nullishCoalesce(placeholder, () => ( "")) }),
11628
11641
  values.map((type) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: type.id, children: type.text }, type.id))
@@ -11802,7 +11815,7 @@ var FilePreviewItem = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ fi
11802
11815
  setObjectUrl(null);
11803
11816
  }, [file]);
11804
11817
  const getFileIcon = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
11805
- const extension = _optionalChain([file, 'access', _313 => _313.name, 'access', _314 => _314.split, 'call', _315 => _315("."), 'access', _316 => _316.pop, 'call', _317 => _317(), 'optionalAccess', _318 => _318.toLowerCase, 'call', _319 => _319()]);
11818
+ const extension = _optionalChain([file, 'access', _314 => _314.name, 'access', _315 => _315.split, 'call', _316 => _316("."), 'access', _317 => _317.pop, 'call', _318 => _318(), 'optionalAccess', _319 => _319.toLowerCase, 'call', _320 => _320()]);
11806
11819
  if (file.type.startsWith("image/")) {
11807
11820
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.FileImageIcon, { className: "text-muted h-10 w-10 sm:h-12 sm:w-12" });
11808
11821
  }
@@ -11852,7 +11865,7 @@ function UserAvatar({ user, className, showFull, showLink, showTooltip = true })
11852
11865
  }, "getInitials");
11853
11866
  const getAvatar = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
11854
11867
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "*:ring-border *:ring-1", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Avatar, { className: `h-6 w-6 ${className}`, children: [
11855
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { className: "object-cover", src: _optionalChain([user, 'optionalAccess', _320 => _320.avatar]) }),
11868
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { className: "object-cover", src: _optionalChain([user, 'optionalAccess', _321 => _321.avatar]) }),
11856
11869
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { children: getInitials3(user.name) })
11857
11870
  ] }) });
11858
11871
  }, "getAvatar");
@@ -12058,7 +12071,7 @@ var useUserTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0,
12058
12071
  })
12059
12072
  };
12060
12073
  const columns = _react.useMemo.call(void 0, () => {
12061
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _321 => _321[field], 'optionalCall', _322 => _322()])).filter((col) => col !== void 0);
12074
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _322 => _322[field], 'optionalCall', _323 => _323()])).filter((col) => col !== void 0);
12062
12075
  }, [params.fields, fieldColumnMap, t, generateUrl]);
12063
12076
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
12064
12077
  }, "useUserTableStructure");
@@ -12173,10 +12186,10 @@ function UserSelector({ id, form, label, placeholder, onChange, isRequired = fal
12173
12186
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between", children: [
12174
12187
  /* @__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.jsxs.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: [
12175
12188
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "*:ring-border *:ring-1", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Avatar, { className: `me-2 h-4 w-4`, children: [
12176
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { src: _optionalChain([field, 'access', _323 => _323.value, 'optionalAccess', _324 => _324.avatar]) }),
12177
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { children: _optionalChain([field, 'access', _325 => _325.value, 'optionalAccess', _326 => _326.name]) ? _optionalChain([field, 'access', _327 => _327.value, 'optionalAccess', _328 => _328.name, 'access', _329 => _329.split, 'call', _330 => _330(" "), 'access', _331 => _331.map, 'call', _332 => _332((name) => name.charAt(0).toUpperCase())]) : "X" })
12189
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { src: _optionalChain([field, 'access', _324 => _324.value, 'optionalAccess', _325 => _325.avatar]) }),
12190
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { children: _optionalChain([field, 'access', _326 => _326.value, 'optionalAccess', _327 => _327.name]) ? _optionalChain([field, 'access', _328 => _328.value, 'optionalAccess', _329 => _329.name, 'access', _330 => _330.split, 'call', _331 => _331(" "), 'access', _332 => _332.map, 'call', _333 => _333((name) => name.charAt(0).toUpperCase())]) : "X" })
12178
12191
  ] }) }),
12179
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _nullishCoalesce(_optionalChain([field, 'access', _333 => _333.value, 'optionalAccess', _334 => _334.name]), () => ( "")) })
12192
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _nullishCoalesce(_optionalChain([field, 'access', _334 => _334.value, 'optionalAccess', _335 => _335.name]), () => ( "")) })
12180
12193
  ] }) : /* @__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(`ui.search.placeholder`, { type: t(`entities.users`, { count: 1 }) }))) }) }) }),
12181
12194
  field.value && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12182
12195
  _lucidereact.CircleX,
@@ -12390,7 +12403,7 @@ function UserContent({ user }) {
12390
12403
  const updated = await _chunk4ORLPEK7js.UserService.patchAvatar({ id: user.id, avatar: imageKey });
12391
12404
  setUser(updated);
12392
12405
  },
12393
- companyId: _nullishCoalesce(_optionalChain([company, 'optionalAccess', _335 => _335.id]), () => ( "")),
12406
+ companyId: _nullishCoalesce(_optionalChain([company, 'optionalAccess', _336 => _336.id]), () => ( "")),
12394
12407
  className: "h-24 w-24",
12395
12408
  fallbackClassName: "text-2xl"
12396
12409
  }
@@ -12546,7 +12559,7 @@ function CompanyUsersList({ isDeleted, fullWidth }) {
12546
12559
  const data = useDataListRetriever({
12547
12560
  ready: !!company,
12548
12561
  retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunk4ORLPEK7js.UserService.findAllUsers(params), "retriever"),
12549
- retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _336 => _336.id]), isDeleted },
12562
+ retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _337 => _337.id]), isDeleted },
12550
12563
  module: _chunk4ORLPEK7js.Modules.User
12551
12564
  });
12552
12565
  _react.useEffect.call(void 0, () => {
@@ -12654,11 +12667,11 @@ function UserListInAdd({ data, existingUsers, setSelectedUser, setLevelOpen }) {
12654
12667
  value: user.id,
12655
12668
  onClick: (_e) => {
12656
12669
  setSelectedUser(user);
12657
- _optionalChain([setLevelOpen, 'optionalCall', _337 => _337(true)]);
12670
+ _optionalChain([setLevelOpen, 'optionalCall', _338 => _338(true)]);
12658
12671
  },
12659
12672
  onSelect: (_e) => {
12660
12673
  setSelectedUser(user);
12661
- _optionalChain([setLevelOpen, 'optionalCall', _338 => _338(true)]);
12674
+ _optionalChain([setLevelOpen, 'optionalCall', _339 => _339(true)]);
12662
12675
  },
12663
12676
  children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between px-4 py-1", children: [
12664
12677
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatar, { user }),
@@ -12799,7 +12812,7 @@ function CompanyContent({ company, actions }) {
12799
12812
  company.legal_address
12800
12813
  ] }),
12801
12814
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-1", children: [
12802
- _optionalChain([company, 'access', _339 => _339.configurations, 'optionalAccess', _340 => _340.country]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-muted-foreground text-sm", children: [
12815
+ _optionalChain([company, 'access', _340 => _340.configurations, 'optionalAccess', _341 => _341.country]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-muted-foreground text-sm", children: [
12803
12816
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "font-medium", children: [
12804
12817
  t("features.configuration.country"),
12805
12818
  ":"
@@ -12807,7 +12820,7 @@ function CompanyContent({ company, actions }) {
12807
12820
  " ",
12808
12821
  company.configurations.country
12809
12822
  ] }),
12810
- _optionalChain([company, 'access', _341 => _341.configurations, 'optionalAccess', _342 => _342.currency]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-muted-foreground text-sm", children: [
12823
+ _optionalChain([company, 'access', _342 => _342.configurations, 'optionalAccess', _343 => _343.currency]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-muted-foreground text-sm", children: [
12811
12824
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "font-medium", children: [
12812
12825
  t("features.configuration.currency"),
12813
12826
  ":"
@@ -13053,7 +13066,7 @@ function CompanyEditorInternal({
13053
13066
  _chunk7QVYU63Ejs.__name.call(void 0, fetchFeatures, "fetchFeatures");
13054
13067
  fetchFeatures();
13055
13068
  }
13056
- _optionalChain([onDialogOpenChange, 'optionalCall', _343 => _343(open)]);
13069
+ _optionalChain([onDialogOpenChange, 'optionalCall', _344 => _344(open)]);
13057
13070
  },
13058
13071
  [features.length, canAccessFeatures, hasRole, onDialogOpenChange]
13059
13072
  );
@@ -13098,12 +13111,12 @@ function CompanyEditorInternal({
13098
13111
  );
13099
13112
  const getDefaultValues = _react.useCallback.call(void 0, () => {
13100
13113
  return {
13101
- id: _optionalChain([company, 'optionalAccess', _344 => _344.id]) || _uuid.v4.call(void 0, ),
13102
- name: _optionalChain([company, 'optionalAccess', _345 => _345.name]) || "",
13103
- featureIds: _optionalChain([company, 'optionalAccess', _346 => _346.features, 'access', _347 => _347.map, 'call', _348 => _348((feature) => feature.id)]) || [],
13104
- moduleIds: _optionalChain([company, 'optionalAccess', _349 => _349.modules, 'access', _350 => _350.map, 'call', _351 => _351((module) => module.id)]) || [],
13105
- logo: _optionalChain([company, 'optionalAccess', _352 => _352.logo]) || "",
13106
- legal_address: _optionalChain([company, 'optionalAccess', _353 => _353.legal_address]) || ""
13114
+ id: _optionalChain([company, 'optionalAccess', _345 => _345.id]) || _uuid.v4.call(void 0, ),
13115
+ name: _optionalChain([company, 'optionalAccess', _346 => _346.name]) || "",
13116
+ featureIds: _optionalChain([company, 'optionalAccess', _347 => _347.features, 'access', _348 => _348.map, 'call', _349 => _349((feature) => feature.id)]) || [],
13117
+ moduleIds: _optionalChain([company, 'optionalAccess', _350 => _350.modules, 'access', _351 => _351.map, 'call', _352 => _352((module) => module.id)]) || [],
13118
+ logo: _optionalChain([company, 'optionalAccess', _353 => _353.logo]) || "",
13119
+ legal_address: _optionalChain([company, 'optionalAccess', _354 => _354.legal_address]) || ""
13107
13120
  };
13108
13121
  }, [company]);
13109
13122
  const form = _reacthookform.useForm.call(void 0, {
@@ -13115,7 +13128,7 @@ function CompanyEditorInternal({
13115
13128
  {
13116
13129
  form,
13117
13130
  entityType: t(`entities.companies`, { count: 1 }),
13118
- entityName: _optionalChain([company, 'optionalAccess', _354 => _354.name]),
13131
+ entityName: _optionalChain([company, 'optionalAccess', _355 => _355.name]),
13119
13132
  isEdit: !!company,
13120
13133
  module: _chunk4ORLPEK7js.Modules.Company,
13121
13134
  propagateChanges,
@@ -13140,7 +13153,7 @@ function CompanyEditorInternal({
13140
13153
  throw new Error(t("company.fiscal_data_invalid"));
13141
13154
  }
13142
13155
  const payload = {
13143
- id: _nullishCoalesce(_optionalChain([company, 'optionalAccess', _355 => _355.id]), () => ( _uuid.v4.call(void 0, ))),
13156
+ id: _nullishCoalesce(_optionalChain([company, 'optionalAccess', _356 => _356.id]), () => ( _uuid.v4.call(void 0, ))),
13144
13157
  name: values.name,
13145
13158
  logo: files && contentType ? values.logo : void 0,
13146
13159
  featureIds: values.featureIds,
@@ -13171,14 +13184,14 @@ function CompanyEditorInternal({
13171
13184
  dialogOpen,
13172
13185
  onDialogOpenChange: handleDialogOpenChange,
13173
13186
  children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full items-start justify-between gap-x-4", children: [
13174
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-96 flex-col justify-start gap-y-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FileUploader, { value: files, onValueChange: setFiles, dropzoneOptions: dropzone2, className: "w-full p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FileInput, { className: "text-muted-foreground/50 rounded-lg outline-1 outline-dashed", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col items-center justify-center pt-3 pb-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col items-center justify-center pt-3 pb-4", children: file || _optionalChain([company, 'optionalAccess', _356 => _356.logo]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
13187
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-96 flex-col justify-start gap-y-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FileUploader, { value: files, onValueChange: setFiles, dropzoneOptions: dropzone2, className: "w-full p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FileInput, { className: "text-muted-foreground/50 rounded-lg outline-1 outline-dashed", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col items-center justify-center pt-3 pb-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col items-center justify-center pt-3 pb-4", children: file || _optionalChain([company, 'optionalAccess', _357 => _357.logo]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
13175
13188
  _image2.default,
13176
13189
  {
13177
- src: file ? URL.createObjectURL(file) : _optionalChain([company, 'optionalAccess', _357 => _357.logo]) || "",
13190
+ src: file ? URL.createObjectURL(file) : _optionalChain([company, 'optionalAccess', _358 => _358.logo]) || "",
13178
13191
  alt: t("company.logo_alt"),
13179
13192
  width: 200,
13180
13193
  height: 200,
13181
- unoptimized: _chunk4ORLPEK7js.isRemoteImageSrc.call(void 0, file ? void 0 : _optionalChain([company, 'optionalAccess', _358 => _358.logo]))
13194
+ unoptimized: _chunk4ORLPEK7js.isRemoteImageSrc.call(void 0, file ? void 0 : _optionalChain([company, 'optionalAccess', _359 => _359.logo]))
13182
13195
  }
13183
13196
  ) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
13184
13197
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.UploadIcon, { className: "my-4 h-8 w-8" }),
@@ -13209,7 +13222,7 @@ function CompanyEditorInternal({
13209
13222
  }
13210
13223
  ),
13211
13224
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SectionHeader, { className: "mt-2", children: t(`company.sections.fiscal_data`) }),
13212
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ItalianFiscalData_default, { ref: fiscalRef, initialData: parseFiscalData(_optionalChain([company, 'optionalAccess', _359 => _359.fiscal_data])) })
13225
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ItalianFiscalData_default, { ref: fiscalRef, initialData: parseFiscalData(_optionalChain([company, 'optionalAccess', _360 => _360.fiscal_data])) })
13213
13226
  ] }),
13214
13227
  canAccessFeatures && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-96 flex-col justify-start gap-y-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ScrollArea, { className: "h-max", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FormFeatures, { form, name: t(`company.features_and_modules`), features }) }) })
13215
13228
  ] })
@@ -13575,7 +13588,7 @@ function NotificationToast(notification, t, generateUrl, reouter, locale) {
13575
13588
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col", children: [
13576
13589
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
13577
13590
  strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: chunks }), "strong"),
13578
- actor: _nullishCoalesce(_optionalChain([data, 'access', _360 => _360.actor, 'optionalAccess', _361 => _361.name]), () => ( "")),
13591
+ actor: _nullishCoalesce(_optionalChain([data, 'access', _361 => _361.actor, 'optionalAccess', _362 => _362.name]), () => ( "")),
13579
13592
  title: data.title,
13580
13593
  message: _nullishCoalesce(notification.message, () => ( ""))
13581
13594
  }) }),
@@ -13613,7 +13626,7 @@ function NotificationMenuItem({ notification, closePopover }) {
13613
13626
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex min-w-0 flex-1 flex-col", children: [
13614
13627
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-foreground text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
13615
13628
  strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { className: "font-medium", children: chunks }), "strong"),
13616
- actor: _nullishCoalesce(_optionalChain([data, 'access', _362 => _362.actor, 'optionalAccess', _363 => _363.name]), () => ( "")),
13629
+ actor: _nullishCoalesce(_optionalChain([data, 'access', _363 => _363.actor, 'optionalAccess', _364 => _364.name]), () => ( "")),
13617
13630
  title: data.title,
13618
13631
  message: _nullishCoalesce(notification.message, () => ( ""))
13619
13632
  }) }),
@@ -13684,7 +13697,7 @@ var NotificationContextProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(v
13684
13697
  _react.useEffect.call(void 0, () => {
13685
13698
  if (hasInitiallyLoaded || !currentUser) return;
13686
13699
  if (_chunkG4JR3SFVjs.isRolesConfigured.call(void 0, )) {
13687
- const isAdmin = _optionalChain([currentUser, 'access', _364 => _364.roles, 'optionalAccess', _365 => _365.some, 'call', _366 => _366((role) => role.id === _chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator)]);
13700
+ const isAdmin = _optionalChain([currentUser, 'access', _365 => _365.roles, 'optionalAccess', _366 => _366.some, 'call', _367 => _367((role) => role.id === _chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator)]);
13688
13701
  if (isAdmin) {
13689
13702
  setHasInitiallyLoaded(true);
13690
13703
  return;
@@ -13870,7 +13883,7 @@ function OnboardingProvider({
13870
13883
  const id = activeTourIdRef.current;
13871
13884
  cleanupRoots();
13872
13885
  resetState();
13873
- if (id) _optionalChain([onTourEnd, 'optionalCall', _367 => _367(id, reason)]);
13886
+ if (id) _optionalChain([onTourEnd, 'optionalCall', _368 => _368(id, reason)]);
13874
13887
  },
13875
13888
  [cleanupRoots, resetState, onTourEnd]
13876
13889
  );
@@ -13883,14 +13896,14 @@ function OnboardingProvider({
13883
13896
  cleanupRoots();
13884
13897
  resetState();
13885
13898
  }, [cleanupRoots, resetState, teardown]);
13886
- const nextStep = _react.useCallback.call(void 0, () => _optionalChain([driverRef, 'access', _368 => _368.current, 'optionalAccess', _369 => _369.moveNext, 'call', _370 => _370()]), []);
13887
- const previousStep = _react.useCallback.call(void 0, () => _optionalChain([driverRef, 'access', _371 => _371.current, 'optionalAccess', _372 => _372.movePrevious, 'call', _373 => _373()]), []);
13888
- const goToStep = _react.useCallback.call(void 0, (index) => _optionalChain([driverRef, 'access', _374 => _374.current, 'optionalAccess', _375 => _375.moveTo, 'call', _376 => _376(index)]), []);
13899
+ const nextStep = _react.useCallback.call(void 0, () => _optionalChain([driverRef, 'access', _369 => _369.current, 'optionalAccess', _370 => _370.moveNext, 'call', _371 => _371()]), []);
13900
+ const previousStep = _react.useCallback.call(void 0, () => _optionalChain([driverRef, 'access', _372 => _372.current, 'optionalAccess', _373 => _373.movePrevious, 'call', _374 => _374()]), []);
13901
+ const goToStep = _react.useCallback.call(void 0, (index) => _optionalChain([driverRef, 'access', _375 => _375.current, 'optionalAccess', _376 => _376.moveTo, 'call', _377 => _377(index)]), []);
13889
13902
  const startTour = _react.useCallback.call(void 0,
13890
13903
  (tourId, steps) => {
13891
13904
  if (typeof window === "undefined") return;
13892
13905
  if (driverRef.current) closeTour();
13893
- const tourSteps = _nullishCoalesce(steps, () => ( _optionalChain([tours, 'access', _377 => _377.find, 'call', _378 => _378((t) => t.id === tourId), 'optionalAccess', _379 => _379.steps])));
13906
+ const tourSteps = _nullishCoalesce(steps, () => ( _optionalChain([tours, 'access', _378 => _378.find, 'call', _379 => _379((t) => t.id === tourId), 'optionalAccess', _380 => _380.steps])));
13894
13907
  if (!tourSteps || tourSteps.length === 0) {
13895
13908
  console.warn(`No steps found for tour: ${tourId}`);
13896
13909
  return;
@@ -13901,13 +13914,13 @@ function OnboardingProvider({
13901
13914
  endReasonRef.current = "dismissed";
13902
13915
  const move = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (direction, from) => {
13903
13916
  const target = tourSteps[direction === "next" ? from + 1 : from - 1];
13904
- const go = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => direction === "next" ? _optionalChain([driverRef, 'access', _380 => _380.current, 'optionalAccess', _381 => _381.moveNext, 'call', _382 => _382()]) : _optionalChain([driverRef, 'access', _383 => _383.current, 'optionalAccess', _384 => _384.movePrevious, 'call', _385 => _385()]), "go");
13905
- if (_optionalChain([target, 'optionalAccess', _386 => _386.showDelay])) setTimeout(go, target.showDelay);
13917
+ const go = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => direction === "next" ? _optionalChain([driverRef, 'access', _381 => _381.current, 'optionalAccess', _382 => _382.moveNext, 'call', _383 => _383()]) : _optionalChain([driverRef, 'access', _384 => _384.current, 'optionalAccess', _385 => _385.movePrevious, 'call', _386 => _386()]), "go");
13918
+ if (_optionalChain([target, 'optionalAccess', _387 => _387.showDelay])) setTimeout(go, target.showDelay);
13906
13919
  else go();
13907
13920
  }, "move");
13908
13921
  const end = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (reason) => {
13909
13922
  endReasonRef.current = reason;
13910
- _optionalChain([driverRef, 'access', _387 => _387.current, 'optionalAccess', _388 => _388.destroy, 'call', _389 => _389()]);
13923
+ _optionalChain([driverRef, 'access', _388 => _388.current, 'optionalAccess', _389 => _389.destroy, 'call', _390 => _390()]);
13911
13924
  teardown(reason);
13912
13925
  }, "end");
13913
13926
  const driveSteps = tourSteps.map((stepConfig, index) => {
@@ -13949,10 +13962,10 @@ function OnboardingProvider({
13949
13962
  onHighlightStarted: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
13950
13963
  setIsTourActive(true);
13951
13964
  setCurrentStepIndex(index);
13952
- _optionalChain([stepConfig, 'access', _390 => _390.onShow, 'optionalCall', _391 => _391()]);
13965
+ _optionalChain([stepConfig, 'access', _391 => _391.onShow, 'optionalCall', _392 => _392()]);
13953
13966
  }, "onHighlightStarted"),
13954
13967
  onDeselected: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
13955
- _optionalChain([stepConfig, 'access', _392 => _392.onHide, 'optionalCall', _393 => _393()]);
13968
+ _optionalChain([stepConfig, 'access', _393 => _393.onHide, 'optionalCall', _394 => _394()]);
13956
13969
  const root = rootsRef.current.get(index);
13957
13970
  if (root) {
13958
13971
  rootsRef.current.delete(index);
@@ -13980,7 +13993,7 @@ function OnboardingProvider({
13980
13993
  );
13981
13994
  _react.useEffect.call(void 0, () => {
13982
13995
  return () => {
13983
- _optionalChain([driverRef, 'access', _394 => _394.current, 'optionalAccess', _395 => _395.destroy, 'call', _396 => _396()]);
13996
+ _optionalChain([driverRef, 'access', _395 => _395.current, 'optionalAccess', _396 => _396.destroy, 'call', _397 => _397()]);
13984
13997
  cleanupRoots();
13985
13998
  };
13986
13999
  }, [cleanupRoots]);
@@ -14113,7 +14126,7 @@ function HowToMultiSelector({
14113
14126
  retriever: (params) => _chunk4ORLPEK7js.HowToService.findMany(params),
14114
14127
  module: _chunk4ORLPEK7js.Modules.HowTo,
14115
14128
  getLabel: (howTo) => howTo.name,
14116
- excludeId: _optionalChain([currentHowTo, 'optionalAccess', _397 => _397.id]),
14129
+ excludeId: _optionalChain([currentHowTo, 'optionalAccess', _398 => _398.id]),
14117
14130
  onChange
14118
14131
  }
14119
14132
  );
@@ -14221,17 +14234,17 @@ function HowToEditorInternal({
14221
14234
  );
14222
14235
  const getDefaultValues = _react.useCallback.call(void 0,
14223
14236
  () => ({
14224
- id: _optionalChain([howTo, 'optionalAccess', _398 => _398.id]) || _uuid.v4.call(void 0, ),
14225
- name: _optionalChain([howTo, 'optionalAccess', _399 => _399.name]) || "",
14226
- description: _optionalChain([howTo, 'optionalAccess', _400 => _400.description]) || [],
14227
- pages: _chunk4ORLPEK7js.HowTo.parsePagesFromString(_optionalChain([howTo, 'optionalAccess', _401 => _401.pages])),
14228
- howToType: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _402 => _402.howToType]), () => ( "how-to")),
14229
- slug: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _403 => _403.slug]), () => ( "")),
14230
- order: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _404 => _404.order]), () => ( 0)),
14231
- summary: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _405 => _405.summary]), () => ( "")),
14232
- tags: (_nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _406 => _406.tags]), () => ( []))).join(", "),
14233
- contextualKeys: (_nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _407 => _407.contextualKeys]), () => ( []))).join(", "),
14234
- draft: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _408 => _408.draft]), () => ( false)),
14237
+ id: _optionalChain([howTo, 'optionalAccess', _399 => _399.id]) || _uuid.v4.call(void 0, ),
14238
+ name: _optionalChain([howTo, 'optionalAccess', _400 => _400.name]) || "",
14239
+ description: _optionalChain([howTo, 'optionalAccess', _401 => _401.description]) || [],
14240
+ pages: _chunk4ORLPEK7js.HowTo.parsePagesFromString(_optionalChain([howTo, 'optionalAccess', _402 => _402.pages])),
14241
+ howToType: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _403 => _403.howToType]), () => ( "how-to")),
14242
+ slug: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _404 => _404.slug]), () => ( "")),
14243
+ order: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _405 => _405.order]), () => ( 0)),
14244
+ summary: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _406 => _406.summary]), () => ( "")),
14245
+ tags: (_nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _407 => _407.tags]), () => ( []))).join(", "),
14246
+ contextualKeys: (_nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _408 => _408.contextualKeys]), () => ( []))).join(", "),
14247
+ draft: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _409 => _409.draft]), () => ( false)),
14235
14248
  relatedArticles: []
14236
14249
  }),
14237
14250
  [howTo]
@@ -14242,7 +14255,7 @@ function HowToEditorInternal({
14242
14255
  });
14243
14256
  const initialRelatedIds = _react.useRef.call(void 0, []);
14244
14257
  _react.useEffect.call(void 0, () => {
14245
- if (!_optionalChain([howTo, 'optionalAccess', _409 => _409.howToType]) || !_optionalChain([howTo, 'optionalAccess', _410 => _410.slug])) return;
14258
+ if (!_optionalChain([howTo, 'optionalAccess', _410 => _410.howToType]) || !_optionalChain([howTo, 'optionalAccess', _411 => _411.slug])) return;
14246
14259
  let active = true;
14247
14260
  _chunk4ORLPEK7js.HowToService.findRelated({ howToType: howTo.howToType, slug: howTo.slug }).then((list) => {
14248
14261
  if (!active) return;
@@ -14281,7 +14294,7 @@ function HowToEditorInternal({
14281
14294
  {
14282
14295
  form,
14283
14296
  entityType: t(`entities.howtos`, { count: 1 }),
14284
- entityName: _optionalChain([howTo, 'optionalAccess', _411 => _411.name]),
14297
+ entityName: _optionalChain([howTo, 'optionalAccess', _412 => _412.name]),
14285
14298
  isEdit: !!howTo,
14286
14299
  module: _chunk4ORLPEK7js.Modules.HowTo,
14287
14300
  propagateChanges,
@@ -14662,7 +14675,7 @@ function withPatchedTitle(source, title) {
14662
14675
  return _chunk4ORLPEK7js.rehydrate.call(void 0, _chunk4ORLPEK7js.Modules.Assistant, {
14663
14676
  jsonApi: {
14664
14677
  ...dehydrated.jsonApi,
14665
- attributes: { ..._nullishCoalesce(_optionalChain([dehydrated, 'access', _412 => _412.jsonApi, 'optionalAccess', _413 => _413.attributes]), () => ( {})), title }
14678
+ attributes: { ..._nullishCoalesce(_optionalChain([dehydrated, 'access', _413 => _413.jsonApi, 'optionalAccess', _414 => _414.attributes]), () => ( {})), title }
14666
14679
  },
14667
14680
  included: dehydrated.included
14668
14681
  });
@@ -14697,7 +14710,7 @@ function AssistantProvider({
14697
14710
  const [status, setStatus] = _react.useState.call(void 0, void 0);
14698
14711
  const [failedMessageIds, setFailedMessageIds] = _react.useState.call(void 0, () => /* @__PURE__ */ new Set());
14699
14712
  const [operatorMode, setOperatorMode] = _react.useState.call(void 0,
14700
- () => _optionalChain([dehydratedAssistant, 'optionalAccess', _414 => _414.jsonApi, 'optionalAccess', _415 => _415.attributes, 'optionalAccess', _416 => _416.engine]) === "operator"
14713
+ () => _optionalChain([dehydratedAssistant, 'optionalAccess', _415 => _415.jsonApi, 'optionalAccess', _416 => _416.attributes, 'optionalAccess', _417 => _417.engine]) === "operator"
14701
14714
  );
14702
14715
  const [pendingScope, setPendingScope] = _react.useState.call(void 0, scope);
14703
14716
  const { socket } = useSocketContext();
@@ -14707,7 +14720,7 @@ function AssistantProvider({
14707
14720
  if (!trimmed) return;
14708
14721
  const optimistic = _chunk4ORLPEK7js.AssistantMessage.buildOptimistic({
14709
14722
  content: trimmed,
14710
- assistantId: _optionalChain([assistant, 'optionalAccess', _417 => _417.id]),
14723
+ assistantId: _optionalChain([assistant, 'optionalAccess', _418 => _418.id]),
14711
14724
  position: nextPosition(messages)
14712
14725
  });
14713
14726
  setMessages((prev) => [...prev, optimistic]);
@@ -14717,22 +14730,22 @@ function AssistantProvider({
14717
14730
  if (assistant && payload.assistantId && payload.assistantId !== assistant.id) return;
14718
14731
  if (typeof payload.status === "string") setStatus(payload.status);
14719
14732
  }, "handler");
14720
- _optionalChain([socket, 'optionalAccess', _418 => _418.on, 'call', _419 => _419("assistant:status", handler)]);
14733
+ _optionalChain([socket, 'optionalAccess', _419 => _419.on, 'call', _420 => _420("assistant:status", handler)]);
14721
14734
  let createdHandled = false;
14722
14735
  const createdHandler = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (payload) => {
14723
14736
  if (createdHandled) return;
14724
- const data = _optionalChain([payload, 'optionalAccess', _420 => _420.assistant, 'optionalAccess', _421 => _421.data]);
14737
+ const data = _optionalChain([payload, 'optionalAccess', _421 => _421.assistant, 'optionalAccess', _422 => _422.data]);
14725
14738
  if (!data || typeof data !== "object" || typeof data.id !== "string" || !data.id) return;
14726
14739
  let thread;
14727
14740
  try {
14728
14741
  thread = _chunk4ORLPEK7js.rehydrate.call(void 0, _chunk4ORLPEK7js.Modules.Assistant, {
14729
14742
  jsonApi: data,
14730
- included: _nullishCoalesce(_optionalChain([payload, 'access', _422 => _422.assistant, 'optionalAccess', _423 => _423.included]), () => ( []))
14743
+ included: _nullishCoalesce(_optionalChain([payload, 'access', _423 => _423.assistant, 'optionalAccess', _424 => _424.included]), () => ( []))
14731
14744
  });
14732
14745
  } catch (e9) {
14733
14746
  return;
14734
14747
  }
14735
- if (!_optionalChain([thread, 'optionalAccess', _424 => _424.id])) return;
14748
+ if (!_optionalChain([thread, 'optionalAccess', _425 => _425.id])) return;
14736
14749
  createdHandled = true;
14737
14750
  setAssistant(thread);
14738
14751
  setThreads((prev) => [thread, ...prev.filter((row) => row.id !== thread.id)]);
@@ -14740,16 +14753,16 @@ function AssistantProvider({
14740
14753
  window.history.replaceState(null, "", resolveThreadUrl(thread.id));
14741
14754
  }
14742
14755
  }, "createdHandler");
14743
- if (!assistant) _optionalChain([socket, 'optionalAccess', _425 => _425.on, 'call', _426 => _426("assistant:created", createdHandler)]);
14756
+ if (!assistant) _optionalChain([socket, 'optionalAccess', _426 => _426.on, 'call', _427 => _427("assistant:created", createdHandler)]);
14744
14757
  try {
14745
14758
  if (!assistant) {
14746
14759
  const input = {
14747
14760
  firstMessage: trimmed,
14748
- howToMode: _optionalChain([opts, 'optionalAccess', _427 => _427.howToMode]),
14749
- limitToHowToId: _optionalChain([opts, 'optionalAccess', _428 => _428.limitToHowToId]),
14750
- handbookMode: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _429 => _429.handbookMode]), () => ( _optionalChain([retrievalMode, 'optionalAccess', _430 => _430.handbookMode]))),
14751
- limitToHandbookPageId: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _431 => _431.limitToHandbookPageId]), () => ( _optionalChain([retrievalMode, 'optionalAccess', _432 => _432.limitToHandbookPageId]))),
14752
- contentBlocks: _optionalChain([opts, 'optionalAccess', _433 => _433.contentBlocks]),
14761
+ howToMode: _optionalChain([opts, 'optionalAccess', _428 => _428.howToMode]),
14762
+ limitToHowToId: _optionalChain([opts, 'optionalAccess', _429 => _429.limitToHowToId]),
14763
+ handbookMode: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _430 => _430.handbookMode]), () => ( _optionalChain([retrievalMode, 'optionalAccess', _431 => _431.handbookMode]))),
14764
+ limitToHandbookPageId: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _432 => _432.limitToHandbookPageId]), () => ( _optionalChain([retrievalMode, 'optionalAccess', _433 => _433.limitToHandbookPageId]))),
14765
+ contentBlocks: _optionalChain([opts, 'optionalAccess', _434 => _434.contentBlocks]),
14753
14766
  boundContent: pendingScope
14754
14767
  };
14755
14768
  const created = operatorMode ? await _chunk4ORLPEK7js.AssistantService.createOperator(input) : await _chunk4ORLPEK7js.AssistantService.create(input);
@@ -14766,15 +14779,15 @@ function AssistantProvider({
14766
14779
  const result = operatorMode ? await _chunk4ORLPEK7js.AssistantService.appendMessageOperator({
14767
14780
  assistantId: assistant.id,
14768
14781
  content: trimmed,
14769
- contentBlocks: _optionalChain([opts, 'optionalAccess', _434 => _434.contentBlocks])
14782
+ contentBlocks: _optionalChain([opts, 'optionalAccess', _435 => _435.contentBlocks])
14770
14783
  }) : await _chunk4ORLPEK7js.AssistantService.appendMessage({
14771
14784
  assistantId: assistant.id,
14772
14785
  content: trimmed,
14773
- howToMode: _optionalChain([opts, 'optionalAccess', _435 => _435.howToMode]),
14774
- limitToHowToId: _optionalChain([opts, 'optionalAccess', _436 => _436.limitToHowToId]),
14775
- handbookMode: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _437 => _437.handbookMode]), () => ( _optionalChain([retrievalMode, 'optionalAccess', _438 => _438.handbookMode]))),
14776
- limitToHandbookPageId: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _439 => _439.limitToHandbookPageId]), () => ( _optionalChain([retrievalMode, 'optionalAccess', _440 => _440.limitToHandbookPageId]))),
14777
- contentBlocks: _optionalChain([opts, 'optionalAccess', _441 => _441.contentBlocks])
14786
+ howToMode: _optionalChain([opts, 'optionalAccess', _436 => _436.howToMode]),
14787
+ limitToHowToId: _optionalChain([opts, 'optionalAccess', _437 => _437.limitToHowToId]),
14788
+ handbookMode: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _438 => _438.handbookMode]), () => ( _optionalChain([retrievalMode, 'optionalAccess', _439 => _439.handbookMode]))),
14789
+ limitToHandbookPageId: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _440 => _440.limitToHandbookPageId]), () => ( _optionalChain([retrievalMode, 'optionalAccess', _441 => _441.limitToHandbookPageId]))),
14790
+ contentBlocks: _optionalChain([opts, 'optionalAccess', _442 => _442.contentBlocks])
14778
14791
  });
14779
14792
  setMessages((prev) => [...stripOptimistic(prev), ...result]);
14780
14793
  }
@@ -14785,8 +14798,8 @@ function AssistantProvider({
14785
14798
  return next;
14786
14799
  });
14787
14800
  } finally {
14788
- _optionalChain([socket, 'optionalAccess', _442 => _442.off, 'call', _443 => _443("assistant:status", handler)]);
14789
- if (!assistant) _optionalChain([socket, 'optionalAccess', _444 => _444.off, 'call', _445 => _445("assistant:created", createdHandler)]);
14801
+ _optionalChain([socket, 'optionalAccess', _443 => _443.off, 'call', _444 => _444("assistant:status", handler)]);
14802
+ if (!assistant) _optionalChain([socket, 'optionalAccess', _445 => _445.off, 'call', _446 => _446("assistant:created", createdHandler)]);
14790
14803
  setSending(false);
14791
14804
  setStatus(void 0);
14792
14805
  }
@@ -14852,7 +14865,7 @@ function AssistantProvider({
14852
14865
  await _chunk4ORLPEK7js.AssistantService.delete({ id });
14853
14866
  setThreads((prev) => prev.filter((t2) => t2.id !== id));
14854
14867
  setAssistant((prev) => {
14855
- if (_optionalChain([prev, 'optionalAccess', _446 => _446.id]) === id) {
14868
+ if (_optionalChain([prev, 'optionalAccess', _447 => _447.id]) === id) {
14856
14869
  setMessages([]);
14857
14870
  return void 0;
14858
14871
  }
@@ -14864,7 +14877,7 @@ function AssistantProvider({
14864
14877
  (async () => {
14865
14878
  setThreadsLoading(true);
14866
14879
  try {
14867
- const loaded = await _chunk4ORLPEK7js.AssistantService.findMany({ boundType: _optionalChain([scope, 'optionalAccess', _447 => _447.type]), boundId: _optionalChain([scope, 'optionalAccess', _448 => _448.id]) });
14880
+ const loaded = await _chunk4ORLPEK7js.AssistantService.findMany({ boundType: _optionalChain([scope, 'optionalAccess', _448 => _448.type]), boundId: _optionalChain([scope, 'optionalAccess', _449 => _449.id]) });
14868
14881
  if (!cancelled) setThreads(loaded);
14869
14882
  } finally {
14870
14883
  if (!cancelled) setThreadsLoading(false);
@@ -14873,7 +14886,7 @@ function AssistantProvider({
14873
14886
  return () => {
14874
14887
  cancelled = true;
14875
14888
  };
14876
- }, [_optionalChain([scope, 'optionalAccess', _449 => _449.type]), _optionalChain([scope, 'optionalAccess', _450 => _450.id])]);
14889
+ }, [_optionalChain([scope, 'optionalAccess', _450 => _450.type]), _optionalChain([scope, 'optionalAccess', _451 => _451.id])]);
14877
14890
  const value = _react.useMemo.call(void 0,
14878
14891
  () => ({
14879
14892
  assistant,
@@ -14925,7 +14938,7 @@ function AssistantProvider({
14925
14938
  const response = {
14926
14939
  type: _nullishCoalesce(titleOverride, () => ( t("entities.assistants", { count: assistant ? 1 : 2 })))
14927
14940
  };
14928
- if (_optionalChain([assistant, 'optionalAccess', _451 => _451.title])) {
14941
+ if (_optionalChain([assistant, 'optionalAccess', _452 => _452.title])) {
14929
14942
  response.element = assistant.title.length > 25 ? `${assistant.title.substring(0, 25)}...` : assistant.title;
14930
14943
  }
14931
14944
  response.functions = [
@@ -15087,7 +15100,7 @@ function readEntityTitle() {
15087
15100
  if (typeof document === "undefined") return null;
15088
15101
  const afterEntityType = document.title.split("]")[1];
15089
15102
  if (!afterEntityType) return null;
15090
- return _optionalChain([afterEntityType, 'access', _452 => _452.split, 'call', _453 => _453("|"), 'access', _454 => _454[0], 'optionalAccess', _455 => _455.trim, 'call', _456 => _456()]) || null;
15103
+ return _optionalChain([afterEntityType, 'access', _453 => _453.split, 'call', _454 => _454("|"), 'access', _455 => _455[0], 'optionalAccess', _456 => _456.trim, 'call', _457 => _457()]) || null;
15091
15104
  }
15092
15105
  _chunk7QVYU63Ejs.__name.call(void 0, readEntityTitle, "readEntityTitle");
15093
15106
  function usePageTracker() {
@@ -15116,7 +15129,7 @@ function usePageTracker() {
15116
15129
  const existing = prev.find((page) => page.url === baseUrl);
15117
15130
  const refreshed = {
15118
15131
  url: baseUrl,
15119
- title: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _457 => _457.title]), () => ( foundModule.name)),
15132
+ title: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _458 => _458.title]), () => ( foundModule.name)),
15120
15133
  moduleType: foundModule.name,
15121
15134
  timestamp: Date.now()
15122
15135
  };
@@ -15178,7 +15191,7 @@ function usePushNotifications() {
15178
15191
  const register = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
15179
15192
  if ("serviceWorker" in navigator && "PushManager" in window) {
15180
15193
  try {
15181
- const sessionKey = `push_registered_${_optionalChain([currentUser, 'optionalAccess', _458 => _458.id])}`;
15194
+ const sessionKey = `push_registered_${_optionalChain([currentUser, 'optionalAccess', _459 => _459.id])}`;
15182
15195
  const lastRegisteredSubscription = sessionStorage.getItem(sessionKey);
15183
15196
  const swUrl = _chunkGHE4VT2Rjs.ENV.IS_PRODUCTION ? `${_chunkGPXYQMOZjs.getAppUrl.call(void 0, )}/sw.js` : `${_chunkGPXYQMOZjs.getAppUrl.call(void 0, )}/sw-dev.js`;
15184
15197
  const registration = await navigator.serviceWorker.register(swUrl);
@@ -15291,14 +15304,14 @@ function useSocket({ token }) {
15291
15304
  });
15292
15305
  }, "handleMessage");
15293
15306
  const handleNotification = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (data) => {
15294
- const resource = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _459 => _459.data]), () => ( _optionalChain([data, 'optionalAccess', _460 => _460.jsonApi])));
15295
- if (!_optionalChain([resource, 'optionalAccess', _461 => _461.type])) {
15307
+ const resource = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _460 => _460.data]), () => ( _optionalChain([data, 'optionalAccess', _461 => _461.jsonApi])));
15308
+ if (!_optionalChain([resource, 'optionalAccess', _462 => _462.type])) {
15296
15309
  console.warn("[useSocket] ignoring notification with unexpected payload shape", data);
15297
15310
  return;
15298
15311
  }
15299
15312
  const notification = _chunk4ORLPEK7js.rehydrate.call(void 0, _chunk4ORLPEK7js.Modules.Notification, {
15300
15313
  jsonApi: resource,
15301
- included: _optionalChain([data, 'optionalAccess', _462 => _462.included]) || []
15314
+ included: _optionalChain([data, 'optionalAccess', _463 => _463.included]) || []
15302
15315
  });
15303
15316
  if (notification) {
15304
15317
  setSocketNotifications((prev) => {
@@ -15422,11 +15435,11 @@ function BreadcrumbMobile({
15422
15435
  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 }) }) }) });
15423
15436
  }
15424
15437
  if (allItems.length <= 1) {
15425
- 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', _463 => _463.name]) });
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]) });
15426
15439
  }
15427
15440
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DropdownMenu, { open, onOpenChange: setOpen, children: [
15428
15441
  /* @__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: [
15429
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "truncate", children: _optionalChain([lastItem, 'optionalAccess', _464 => _464.name]) }),
15442
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "truncate", children: _optionalChain([lastItem, 'optionalAccess', _465 => _465.name]) }),
15430
15443
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronDownIcon, { className: "text-muted-foreground size-3.5 shrink-0" })
15431
15444
  ] }),
15432
15445
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DropdownMenuContent, { align: "start", children: allItems.map(
@@ -15444,8 +15457,8 @@ function BreadcrumbMobile({
15444
15457
  href: item.href,
15445
15458
  className: _chunk4ORLPEK7js.cn.call(void 0, props.className, "text-foreground font-normal"),
15446
15459
  onClick: (event) => {
15447
- _optionalChain([props, 'access', _465 => _465.onClick, 'optionalCall', _466 => _466(event)]);
15448
- _optionalChain([item, 'access', _467 => _467.onClick, 'optionalCall', _468 => _468()]);
15460
+ _optionalChain([props, 'access', _466 => _466.onClick, 'optionalCall', _467 => _467(event)]);
15461
+ _optionalChain([item, 'access', _468 => _468.onClick, 'optionalCall', _469 => _469()]);
15449
15462
  },
15450
15463
  children: props.children
15451
15464
  }
@@ -15463,7 +15476,7 @@ function BreadcrumbNavigation({ items, rootLabel, showRoot = true }) {
15463
15476
  const generateUrl = usePageUrlGenerator();
15464
15477
  const t = _nextintl.useTranslations.call(void 0, );
15465
15478
  const isMobile = _chunk4ORLPEK7js.useIsMobile.call(void 0, );
15466
- const root = _optionalChain([rootLabel, 'optionalAccess', _469 => _469.trim, 'call', _470 => _470()]) ? rootLabel : t(`common.home`);
15479
+ const root = _optionalChain([rootLabel, 'optionalAccess', _470 => _470.trim, 'call', _471 => _471()]) ? rootLabel : t(`common.home`);
15467
15480
  if (isMobile) {
15468
15481
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BreadcrumbMobile, { items, generateUrl, rootLabel: root, showRoot });
15469
15482
  }
@@ -15861,12 +15874,12 @@ var _remarkgfm = require('remark-gfm'); var _remarkgfm2 = _interopRequireDefault
15861
15874
 
15862
15875
  function mermaidSourceOf(node) {
15863
15876
  const pre = node;
15864
- const code = _optionalChain([pre, 'optionalAccess', _471 => _471.children, 'optionalAccess', _472 => _472[0]]);
15865
- if (_optionalChain([code, 'optionalAccess', _473 => _473.tagName]) !== "code") return void 0;
15866
- const classNames = Array.isArray(_optionalChain([code, 'access', _474 => _474.properties, 'optionalAccess', _475 => _475.className])) ? code.properties.className : [];
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 : [];
15867
15880
  if (!classNames.includes("language-mermaid")) return void 0;
15868
- const text = _optionalChain([code, 'access', _476 => _476.children, 'optionalAccess', _477 => _477[0]]);
15869
- if (_optionalChain([text, 'optionalAccess', _478 => _478.type]) !== "text" || typeof text.value !== "string") 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;
15870
15883
  return text.value;
15871
15884
  }
15872
15885
  _chunk7QVYU63Ejs.__name.call(void 0, mermaidSourceOf, "mermaidSourceOf");
@@ -16123,7 +16136,7 @@ var railTriggerClass = _chunk4ORLPEK7js.cn.call(void 0,
16123
16136
  "data-active:text-primary dark:data-active:text-primary",
16124
16137
  "data-active:font-medium data-active:shadow-none"
16125
16138
  );
16126
- var tabValue = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (tab) => _nullishCoalesce(_nullishCoalesce(tab.sectionKey, () => ( _optionalChain([tab, 'access', _479 => _479.key, 'optionalAccess', _480 => _480.name]))), () => ( tab.label)), "tabValue");
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");
16127
16140
  function RoundPageContainer({
16128
16141
  module,
16129
16142
  id,
@@ -16155,7 +16168,7 @@ function RoundPageContainer({
16155
16168
  const [mounted, setMounted] = _react.useState.call(void 0, false);
16156
16169
  _react.useEffect.call(void 0, () => {
16157
16170
  const match = document.cookie.split("; ").find((row) => row.startsWith(`${detailsCookieName}=`));
16158
- const stored = _optionalChain([match, 'optionalAccess', _481 => _481.split, 'call', _482 => _482("="), 'access', _483 => _483[1]]);
16171
+ const stored = _optionalChain([match, 'optionalAccess', _482 => _482.split, 'call', _483 => _483("="), 'access', _484 => _484[1]]);
16159
16172
  if (stored === "true") setShowDetailsState(true);
16160
16173
  else if (stored === "false") setShowDetailsState(false);
16161
16174
  }, []);
@@ -16170,7 +16183,7 @@ function RoundPageContainer({
16170
16183
  const clip = isFixed ? `overflow-hidden` : ``;
16171
16184
  const scrollY = isFixed ? `overflow-y-auto` : ``;
16172
16185
  const mobileBarClass = isFixed ? `` : `sticky bottom-0 z-30`;
16173
- const detailsCookieName = _optionalChain([module, 'optionalAccess', _484 => _484.name]) ? `${DETAILS_COOKIE_NAME}_${module.name}` : DETAILS_COOKIE_NAME;
16186
+ const detailsCookieName = _optionalChain([module, 'optionalAccess', _485 => _485.name]) ? `${DETAILS_COOKIE_NAME}_${module.name}` : DETAILS_COOKIE_NAME;
16174
16187
  const setShowDetails = _react.useCallback.call(void 0,
16175
16188
  (value) => {
16176
16189
  setShowDetailsState(value);
@@ -16203,13 +16216,13 @@ function RoundPageContainer({
16203
16216
  } else {
16204
16217
  rewriteUrl({ page: window.location.pathname, additionalParameters: { section: key }, mode: "push" });
16205
16218
  }
16206
- _optionalChain([onSectionChange, 'optionalCall', _485 => _485(key)]);
16219
+ _optionalChain([onSectionChange, 'optionalCall', _486 => _486(key)]);
16207
16220
  },
16208
16221
  [module, id, rewriteUrl, onSectionChange]
16209
16222
  );
16210
- const activeTabDefinition = _optionalChain([tabs, 'optionalAccess', _486 => _486.find, 'call', _487 => _487((t2) => tabValue(t2) === activeTab)]);
16211
- const activeFillHeight = _optionalChain([activeTabDefinition, 'optionalAccess', _488 => _488.fillHeight]) === true;
16212
- const activeConstrainWidth = _optionalChain([activeTabDefinition, 'optionalAccess', _489 => _489.constrainWidth]) === true;
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;
16213
16226
  const { ungrouped, groups } = _react.useMemo.call(void 0, () => partitionTabs(_nullishCoalesce(tabs, () => ( []))), [tabs]);
16214
16227
  const tabItems = _react.useMemo.call(void 0,
16215
16228
  () => Object.fromEntries((_nullishCoalesce(tabs, () => ( []))).map((tab) => [tabValue(tab), _nullishCoalesce(tab.contentLabel, () => ( tab.label))])),
@@ -16220,7 +16233,7 @@ function RoundPageContainer({
16220
16233
  const mobileFlow = isMobile && isFixed && (!activeFillHeight || activeDocumentTab) && !fullWidth;
16221
16234
  const innerClip = mobileFlow ? `` : clip;
16222
16235
  const innerScrollY = mobileFlow ? `` : scrollY;
16223
- const showMobileSectionPicker = (_nullishCoalesce(_optionalChain([tabs, 'optionalAccess', _490 => _490.length]), () => ( 0))) > 1;
16236
+ const showMobileSectionPicker = (_nullishCoalesce(_optionalChain([tabs, 'optionalAccess', _491 => _491.length]), () => ( 0))) > 1;
16224
16237
  if (!isReady) {
16225
16238
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
16226
16239
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -16620,14 +16633,14 @@ function BlockNoteEditorMentionHoverCard({
16620
16633
  const entityType = target.dataset.mentionType;
16621
16634
  const alias = target.dataset.mentionAlias;
16622
16635
  setHovered((prev) => {
16623
- if (_optionalChain([prev, 'optionalAccess', _491 => _491.id]) === id && _optionalChain([prev, 'optionalAccess', _492 => _492.element]) === target) return prev;
16636
+ if (_optionalChain([prev, 'optionalAccess', _492 => _492.id]) === id && _optionalChain([prev, 'optionalAccess', _493 => _493.element]) === target) return prev;
16624
16637
  return { id, entityType, alias, element: target };
16625
16638
  });
16626
16639
  }, "handleMouseOver");
16627
16640
  const handleMouseOut = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (e) => {
16628
16641
  const target = e.target.closest("[data-mention-id]");
16629
16642
  if (!target) return;
16630
- const related = _optionalChain([e, 'access', _493 => _493.relatedTarget, 'optionalAccess', _494 => _494.closest, 'call', _495 => _495("[data-mention-id]")]);
16643
+ const related = _optionalChain([e, 'access', _494 => _494.relatedTarget, 'optionalAccess', _495 => _495.closest, 'call', _496 => _496("[data-mention-id]")]);
16631
16644
  if (related) return;
16632
16645
  scheduleClose();
16633
16646
  }, "handleMouseOut");
@@ -16641,7 +16654,7 @@ function BlockNoteEditorMentionHoverCard({
16641
16654
  }, [containerRef, mentionResolveFn, cancelClose, scheduleClose]);
16642
16655
  if (!hovered || !mentionResolveFn) return null;
16643
16656
  const resolved = mentionResolveFn(hovered.id, hovered.entityType, hovered.alias);
16644
- if (!_optionalChain([resolved, 'optionalAccess', _496 => _496.HoverContent])) return null;
16657
+ if (!_optionalChain([resolved, 'optionalAccess', _497 => _497.HoverContent])) return null;
16645
16658
  const ContentComponent = resolved.HoverContent;
16646
16659
  const rect = hovered.element.getBoundingClientRect();
16647
16660
  return _reactdom.createPortal.call(void 0,
@@ -16685,28 +16698,28 @@ var parseMentionElement = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
16685
16698
  }, "parseMentionElement");
16686
16699
  var createMentionInlineContentSpec = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (resolveFn, disableMention, nameResolver) => {
16687
16700
  const MentionExternalHTML = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (props) => {
16688
- const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall', _497 => _497(props.id, props.entityType, props.alias)]), () => ( props.alias));
16701
+ const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall', _498 => _498(props.id, props.entityType, props.alias)]), () => ( props.alias));
16689
16702
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { "data-mention-id": props.id, "data-mention-type": props.entityType, "data-mention-alias": props.alias, children: [
16690
16703
  "@",
16691
16704
  displayName
16692
16705
  ] });
16693
16706
  }, "MentionExternalHTML");
16694
16707
  const Mention = React2.default.memo(/* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, function Mention2(props) {
16695
- const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall', _498 => _498(props.id, props.entityType, props.alias)]), () => ( props.alias));
16708
+ const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall', _499 => _499(props.id, props.entityType, props.alias)]), () => ( props.alias));
16696
16709
  if (disableMention) {
16697
- const resolved2 = _optionalChain([resolveFn, 'optionalCall', _499 => _499(props.id, props.entityType, displayName)]);
16698
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _link2.default, { href: _nullishCoalesce(_optionalChain([resolved2, 'optionalAccess', _500 => _500.url]), () => ( "#")), className: "text-primary", children: [
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: [
16699
16712
  "@",
16700
16713
  displayName
16701
16714
  ] });
16702
16715
  }
16703
- const resolved = _optionalChain([resolveFn, 'optionalCall', _501 => _501(props.id, props.entityType, displayName)]);
16704
- if (_optionalChain([resolved, 'optionalAccess', _502 => _502.Inline])) {
16716
+ const resolved = _optionalChain([resolveFn, 'optionalCall', _502 => _502(props.id, props.entityType, displayName)]);
16717
+ if (_optionalChain([resolved, 'optionalAccess', _503 => _503.Inline])) {
16705
16718
  const Custom = resolved.Inline;
16706
16719
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Custom, { ...props, alias: displayName });
16707
16720
  }
16708
- const href = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _503 => _503.url]), () => ( "#"));
16709
- const handleClick = _optionalChain([resolved, 'optionalAccess', _504 => _504.onActivate]) ? (e) => resolved.onActivate(e, props) : void 0;
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;
16710
16723
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
16711
16724
  _link2.default,
16712
16725
  {
@@ -16814,7 +16827,7 @@ function BlockNoteEditorMentionSuggestionMenu({
16814
16827
  if (!suggestionMenuComponent) return void 0;
16815
16828
  const Component2 = suggestionMenuComponent;
16816
16829
  const Wrapped = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (props) => {
16817
- const isSentinelOnly = props.items.length === 1 && _optionalChain([props, 'access', _505 => _505.items, 'access', _506 => _506[0], 'optionalAccess', _507 => _507.title]) === KEEP_OPEN_SENTINEL_TITLE;
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;
16818
16831
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
16819
16832
  Component2,
16820
16833
  {
@@ -16823,7 +16836,7 @@ function BlockNoteEditorMentionSuggestionMenu({
16823
16836
  selectedIndex: isSentinelOnly ? void 0 : props.selectedIndex,
16824
16837
  onItemClick: (item) => {
16825
16838
  if (item.title === KEEP_OPEN_SENTINEL_TITLE) return;
16826
- _optionalChain([props, 'access', _508 => _508.onItemClick, 'optionalCall', _509 => _509(item)]);
16839
+ _optionalChain([props, 'access', _509 => _509.onItemClick, 'optionalCall', _510 => _510(item)]);
16827
16840
  }
16828
16841
  }
16829
16842
  );
@@ -17037,10 +17050,10 @@ var cellId = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => {
17037
17050
  cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => params.toggleId ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
17038
17051
  SelectRowCheckbox,
17039
17052
  {
17040
- checked: _optionalChain([params, 'access', _510 => _510.checkedIds, 'optionalAccess', _511 => _511.includes, 'call', _512 => _512(row.getValue(params.name))]) || false,
17053
+ checked: _optionalChain([params, 'access', _511 => _511.checkedIds, 'optionalAccess', _512 => _512.includes, 'call', _513 => _513(row.getValue(params.name))]) || false,
17041
17054
  onCheckedChange: (value) => {
17042
17055
  row.toggleSelected(!!value);
17043
- _optionalChain([params, 'access', _513 => _513.toggleId, 'optionalCall', _514 => _514(row.getValue(params.name))]);
17056
+ _optionalChain([params, 'access', _514 => _514.toggleId, 'optionalCall', _515 => _515(row.getValue(params.name))]);
17044
17057
  }
17045
17058
  }
17046
17059
  ) : null, "cell"),
@@ -17098,7 +17111,7 @@ function useJsonApiGet(params) {
17098
17111
  const [response, setResponse] = _react.useState.call(void 0, null);
17099
17112
  const isMounted = _react.useRef.call(void 0, true);
17100
17113
  const fetchData = _react.useCallback.call(void 0, async () => {
17101
- if (_optionalChain([params, 'access', _515 => _515.options, 'optionalAccess', _516 => _516.enabled]) === false) return;
17114
+ if (_optionalChain([params, 'access', _516 => _516.options, 'optionalAccess', _517 => _517.enabled]) === false) return;
17102
17115
  setLoading(true);
17103
17116
  setError(null);
17104
17117
  try {
@@ -17125,9 +17138,9 @@ function useJsonApiGet(params) {
17125
17138
  setLoading(false);
17126
17139
  }
17127
17140
  }
17128
- }, [params.classKey, params.endpoint, params.companyId, _optionalChain([params, 'access', _517 => _517.options, 'optionalAccess', _518 => _518.enabled])]);
17141
+ }, [params.classKey, params.endpoint, params.companyId, _optionalChain([params, 'access', _518 => _518.options, 'optionalAccess', _519 => _519.enabled])]);
17129
17142
  const fetchNextPage = _react.useCallback.call(void 0, async () => {
17130
- if (!_optionalChain([response, 'optionalAccess', _519 => _519.nextPage])) return;
17143
+ if (!_optionalChain([response, 'optionalAccess', _520 => _520.nextPage])) return;
17131
17144
  setLoading(true);
17132
17145
  try {
17133
17146
  const nextResponse = await response.nextPage();
@@ -17148,7 +17161,7 @@ function useJsonApiGet(params) {
17148
17161
  }
17149
17162
  }, [response]);
17150
17163
  const fetchPreviousPage = _react.useCallback.call(void 0, async () => {
17151
- if (!_optionalChain([response, 'optionalAccess', _520 => _520.prevPage])) return;
17164
+ if (!_optionalChain([response, 'optionalAccess', _521 => _521.prevPage])) return;
17152
17165
  setLoading(true);
17153
17166
  try {
17154
17167
  const prevResponse = await response.prevPage();
@@ -17174,15 +17187,15 @@ function useJsonApiGet(params) {
17174
17187
  return () => {
17175
17188
  isMounted.current = false;
17176
17189
  };
17177
- }, [fetchData, ..._optionalChain([params, 'access', _521 => _521.options, 'optionalAccess', _522 => _522.deps]) || []]);
17190
+ }, [fetchData, ..._optionalChain([params, 'access', _522 => _522.options, 'optionalAccess', _523 => _523.deps]) || []]);
17178
17191
  return {
17179
17192
  data,
17180
17193
  loading,
17181
17194
  error,
17182
17195
  response,
17183
17196
  refetch: fetchData,
17184
- hasNextPage: !!_optionalChain([response, 'optionalAccess', _523 => _523.next]),
17185
- hasPreviousPage: !!_optionalChain([response, 'optionalAccess', _524 => _524.prev]),
17197
+ hasNextPage: !!_optionalChain([response, 'optionalAccess', _524 => _524.next]),
17198
+ hasPreviousPage: !!_optionalChain([response, 'optionalAccess', _525 => _525.prev]),
17186
17199
  fetchNextPage,
17187
17200
  fetchPreviousPage
17188
17201
  };
@@ -17260,17 +17273,17 @@ function useJsonApiMutation(config) {
17260
17273
  if (apiResponse.ok) {
17261
17274
  const resultData = apiResponse.data;
17262
17275
  setData(resultData);
17263
- _optionalChain([config, 'access', _525 => _525.onSuccess, 'optionalCall', _526 => _526(resultData)]);
17276
+ _optionalChain([config, 'access', _526 => _526.onSuccess, 'optionalCall', _527 => _527(resultData)]);
17264
17277
  return resultData;
17265
17278
  } else {
17266
17279
  setError(apiResponse.error);
17267
- _optionalChain([config, 'access', _527 => _527.onError, 'optionalCall', _528 => _528(apiResponse.error)]);
17280
+ _optionalChain([config, 'access', _528 => _528.onError, 'optionalCall', _529 => _529(apiResponse.error)]);
17268
17281
  return null;
17269
17282
  }
17270
17283
  } catch (err) {
17271
17284
  const errorMessage = err instanceof Error ? err.message : "Unknown error";
17272
17285
  setError(errorMessage);
17273
- _optionalChain([config, 'access', _529 => _529.onError, 'optionalCall', _530 => _530(errorMessage)]);
17286
+ _optionalChain([config, 'access', _530 => _530.onError, 'optionalCall', _531 => _531(errorMessage)]);
17274
17287
  return null;
17275
17288
  } finally {
17276
17289
  setLoading(false);
@@ -17343,7 +17356,7 @@ var useCompanyTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
17343
17356
  {
17344
17357
  href: hasRole(_chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator) ? generateUrl({
17345
17358
  page: "/administration",
17346
- id: _optionalChain([_chunk4ORLPEK7js.Modules, 'access', _531 => _531.Company, 'access', _532 => _532.pageUrl, 'optionalAccess', _533 => _533.substring, 'call', _534 => _534(1)]),
17359
+ id: _optionalChain([_chunk4ORLPEK7js.Modules, 'access', _532 => _532.Company, 'access', _533 => _533.pageUrl, 'optionalAccess', _534 => _534.substring, 'call', _535 => _535(1)]),
17347
17360
  childPage: company.id
17348
17361
  }) : generateUrl({ page: _chunk4ORLPEK7js.Modules.Company, id: company.id }),
17349
17362
  children: row.getValue("name")
@@ -17359,7 +17372,7 @@ var useCompanyTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
17359
17372
  })
17360
17373
  };
17361
17374
  const columns = _react.useMemo.call(void 0, () => {
17362
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _535 => _535[field], 'optionalCall', _536 => _536()])).filter((col) => col !== void 0);
17375
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _536 => _536[field], 'optionalCall', _537 => _537()])).filter((col) => col !== void 0);
17363
17376
  }, [params.fields, fieldColumnMap, t, generateUrl, hasRole]);
17364
17377
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
17365
17378
  }, "useCompanyTableStructure");
@@ -17372,7 +17385,7 @@ var DAY_MS = 1e3 * 60 * 60 * 24;
17372
17385
  var isAdministrator = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (currentUser) => {
17373
17386
  if (!currentUser || !_chunkG4JR3SFVjs.isRolesConfigured.call(void 0, )) return false;
17374
17387
  const adminRoleId = _chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator;
17375
- return !!_optionalChain([currentUser, 'access', _537 => _537.roles, 'optionalAccess', _538 => _538.some, 'call', _539 => _539((role) => role.id === adminRoleId)]);
17388
+ return !!_optionalChain([currentUser, 'access', _538 => _538.roles, 'optionalAccess', _539 => _539.some, 'call', _540 => _540((role) => role.id === adminRoleId)]);
17376
17389
  }, "isAdministrator");
17377
17390
  function useSubscriptionStatus() {
17378
17391
  const { company, currentUser } = useCurrentUserContext();
@@ -17489,7 +17502,7 @@ var useRoleTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0,
17489
17502
  })
17490
17503
  };
17491
17504
  const columns = _react.useMemo.call(void 0, () => {
17492
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _540 => _540[field], 'optionalCall', _541 => _541()])).filter((col) => col !== void 0);
17505
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _541 => _541[field], 'optionalCall', _542 => _542()])).filter((col) => col !== void 0);
17493
17506
  }, [params.fields, fieldColumnMap, t, generateUrl]);
17494
17507
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
17495
17508
  }, "useRoleTableStructure");
@@ -17606,8 +17619,8 @@ var useStripePriceTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(
17606
17619
  const t = _nextintl.useTranslations.call(void 0, );
17607
17620
  const fmt = useBillingFormatOptions();
17608
17621
  const generateUrl = usePageUrlGenerator();
17609
- const onClone = _optionalChain([params, 'access', _542 => _542.context, 'optionalAccess', _543 => _543.onClone]);
17610
- const onExport = _optionalChain([params, 'access', _544 => _544.context, 'optionalAccess', _545 => _545.onExport]);
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]);
17611
17624
  const tableData = _react.useMemo.call(void 0, () => {
17612
17625
  return params.data.map((price) => {
17613
17626
  const entry = { jsonApiData: price };
@@ -17672,7 +17685,7 @@ var useStripePriceTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(
17672
17685
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex flex-wrap items-center gap-1", children: [
17673
17686
  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") }),
17674
17687
  price.isTrial && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { variant: "softBlue", children: t("billing.admin.prices.badge.trial") }),
17675
- _optionalChain([price, 'access', _546 => _546.recurring, 'optionalAccess', _547 => _547.usageType]) === "metered" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { variant: "softBlue", children: t("billing.admin.prices.badge.metered") })
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") })
17676
17689
  ] });
17677
17690
  }, "cell"),
17678
17691
  enableSorting: false,
@@ -17720,7 +17733,7 @@ var useStripePriceTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(
17720
17733
  })
17721
17734
  };
17722
17735
  const columns = _react.useMemo.call(void 0, () => {
17723
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _548 => _548[field], 'optionalCall', _549 => _549()])).filter((col) => col !== void 0);
17736
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _549 => _549[field], 'optionalCall', _550 => _550()])).filter((col) => col !== void 0);
17724
17737
  }, [params.fields, fieldColumnMap, t, fmt, generateUrl, onClone, onExport]);
17725
17738
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
17726
17739
  }, "useStripePriceTableStructure");
@@ -17779,7 +17792,7 @@ var useStripeProductTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.cal
17779
17792
  })
17780
17793
  };
17781
17794
  const columns = _react.useMemo.call(void 0, () => {
17782
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _550 => _550[field], 'optionalCall', _551 => _551()])).filter((col) => col !== void 0);
17795
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _551 => _551[field], 'optionalCall', _552 => _552()])).filter((col) => col !== void 0);
17783
17796
  }, [params.fields, fieldColumnMap, t, generateUrl]);
17784
17797
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
17785
17798
  }, "useStripeProductTableStructure");
@@ -17802,7 +17815,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, parseQuestionnaire, "parseQuestionnaire");
17802
17815
  var useWaitlistTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => {
17803
17816
  const t = _nextintl.useTranslations.call(void 0, );
17804
17817
  const locale = _chunk4ORLPEK7js.useI18nLocale.call(void 0, );
17805
- const onInvite = _optionalChain([params, 'access', _552 => _552.context, 'optionalAccess', _553 => _553.onInvite]);
17818
+ const onInvite = _optionalChain([params, 'access', _553 => _553.context, 'optionalAccess', _554 => _554.onInvite]);
17806
17819
  const tableData = _react.useMemo.call(void 0, () => {
17807
17820
  return params.data.map((entry) => {
17808
17821
  const row = { jsonApiData: entry };
@@ -17882,7 +17895,7 @@ var useWaitlistTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(voi
17882
17895
  cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => {
17883
17896
  const entry = row.original.jsonApiData;
17884
17897
  if (entry.status === "confirmed") {
17885
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Button, { size: "sm", variant: "outline", onClick: () => _optionalChain([onInvite, 'optionalCall', _554 => _554(entry)]), children: [
17898
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Button, { size: "sm", variant: "outline", onClick: () => _optionalChain([onInvite, 'optionalCall', _555 => _555(entry)]), children: [
17886
17899
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Send, { className: "me-2 h-4 w-4" }),
17887
17900
  t("waitlist.admin.actions.invite")
17888
17901
  ] });
@@ -17900,7 +17913,7 @@ var useWaitlistTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(voi
17900
17913
  })
17901
17914
  };
17902
17915
  const columns = _react.useMemo.call(void 0, () => {
17903
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _555 => _555[field], 'optionalCall', _556 => _556()])).filter((col) => col !== void 0);
17916
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _556 => _556[field], 'optionalCall', _557 => _557()])).filter((col) => col !== void 0);
17904
17917
  }, [params.fields, fieldColumnMap, t, locale]);
17905
17918
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
17906
17919
  }, "useWaitlistTableStructure");
@@ -18001,11 +18014,11 @@ var useContentTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
18001
18014
  return params.fields.map((field) => {
18002
18015
  const localHandler = fieldColumnMap[field];
18003
18016
  if (localHandler) return localHandler();
18004
- const customHandler = _optionalChain([params, 'access', _557 => _557.context, 'optionalAccess', _558 => _558.customCells, 'optionalAccess', _559 => _559[field]]);
18017
+ const customHandler = _optionalChain([params, 'access', _558 => _558.context, 'optionalAccess', _559 => _559.customCells, 'optionalAccess', _560 => _560[field]]);
18005
18018
  if (customHandler) return customHandler({ t });
18006
18019
  return void 0;
18007
18020
  }).filter((col) => col !== void 0);
18008
- }, [params.fields, fieldColumnMap, t, generateUrl, _optionalChain([params, 'access', _560 => _560.context, 'optionalAccess', _561 => _561.customCells])]);
18021
+ }, [params.fields, fieldColumnMap, t, generateUrl, _optionalChain([params, 'access', _561 => _561.context, 'optionalAccess', _562 => _562.customCells])]);
18009
18022
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
18010
18023
  }, "useContentTableStructure");
18011
18024
 
@@ -18240,17 +18253,17 @@ function useOAuthConsent(params, options) {
18240
18253
  const [error, setError] = _react.useState.call(void 0, null);
18241
18254
  const [isSubmitting, setIsSubmitting] = _react.useState.call(void 0, false);
18242
18255
  const [companyId, setCompanyId] = _react.useState.call(void 0, void 0);
18243
- const contextCompanyId = _optionalChain([useCurrentUserContextOptional, 'call', _562 => _562(), 'optionalAccess', _563 => _563.company, 'optionalAccess', _564 => _564.id]);
18244
- const currentCompanyId = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _565 => _565.defaultCompanyId]), () => ( contextCompanyId));
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));
18245
18258
  const t = _nextintl.useTranslations.call(void 0, );
18246
18259
  const tRef = _react.useRef.call(void 0, t);
18247
18260
  tRef.current = t;
18248
18261
  _react.useEffect.call(void 0, () => {
18249
- const companies = _nullishCoalesce(_optionalChain([clientInfo, 'optionalAccess', _566 => _566.companies]), () => ( []));
18262
+ const companies = _nullishCoalesce(_optionalChain([clientInfo, 'optionalAccess', _567 => _567.companies]), () => ( []));
18250
18263
  if (companies.length === 0) return;
18251
18264
  if (companyId && companies.some((company) => company.id === companyId)) return;
18252
18265
  const current = currentCompanyId ? companies.find((company) => company.id === currentCompanyId) : void 0;
18253
- setCompanyId(_nullishCoalesce(_optionalChain([current, 'optionalAccess', _567 => _567.id]), () => ( _optionalChain([companies, 'access', _568 => _568[0], 'optionalAccess', _569 => _569.id]))));
18266
+ setCompanyId(_nullishCoalesce(_optionalChain([current, 'optionalAccess', _568 => _568.id]), () => ( _optionalChain([companies, 'access', _569 => _569[0], 'optionalAccess', _570 => _570.id]))));
18254
18267
  }, [clientInfo, currentCompanyId, companyId]);
18255
18268
  _react.useEffect.call(void 0, () => {
18256
18269
  const fetchInfo = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
@@ -18336,7 +18349,7 @@ function useOAuthScopeText() {
18336
18349
  };
18337
18350
  }
18338
18351
  const info = typeof scope === "string" ? void 0 : scope;
18339
- return { name: _optionalChain([info, 'optionalAccess', _570 => _570.name]) || id, description: _nullishCoalesce(_optionalChain([info, 'optionalAccess', _571 => _571.description]), () => ( "")) };
18352
+ return { name: _optionalChain([info, 'optionalAccess', _571 => _571.name]) || id, description: _nullishCoalesce(_optionalChain([info, 'optionalAccess', _572 => _572.description]), () => ( "")) };
18340
18353
  },
18341
18354
  [t]
18342
18355
  );
@@ -18390,7 +18403,7 @@ function ContentTableSearch({ data }) {
18390
18403
  const handleSearchIconClick = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
18391
18404
  if (!isExpanded) {
18392
18405
  setIsFocused(true);
18393
- setTimeout(() => _optionalChain([inputRef, 'access', _572 => _572.current, 'optionalAccess', _573 => _573.focus, 'call', _574 => _574()]), 50);
18406
+ setTimeout(() => _optionalChain([inputRef, 'access', _573 => _573.current, 'optionalAccess', _574 => _574.focus, 'call', _575 => _575()]), 50);
18394
18407
  }
18395
18408
  }, "handleSearchIconClick");
18396
18409
  const handleBlur = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
@@ -18476,7 +18489,7 @@ function getGroupKeys(item, field) {
18476
18489
  return [String(_nullishCoalesce(value, () => ( "")))];
18477
18490
  }
18478
18491
  _chunk7QVYU63Ejs.__name.call(void 0, getGroupKeys, "getGroupKeys");
18479
- var isClassComponent = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (component) => typeof component === "function" && !!_optionalChain([component, 'access', _575 => _575.prototype, 'optionalAccess', _576 => _576.isReactComponent]), "isClassComponent");
18492
+ var isClassComponent = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (component) => typeof component === "function" && !!_optionalChain([component, 'access', _576 => _576.prototype, 'optionalAccess', _577 => _577.isReactComponent]), "isClassComponent");
18480
18493
  function StableCell({ render, context }) {
18481
18494
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: render(context) });
18482
18495
  }
@@ -18500,7 +18513,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
18500
18513
  if (data.isLoaded) setPendingDirection(null);
18501
18514
  }, [data.isLoaded]);
18502
18515
  const { data: tableData, columns: tableColumns } = useTableGenerator(props.tableGeneratorType, {
18503
- data: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _577 => _577.data]), () => ( EMPTY_ARRAY)),
18516
+ data: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _578 => _578.data]), () => ( EMPTY_ARRAY)),
18504
18517
  fields,
18505
18518
  checkedIds,
18506
18519
  toggleId,
@@ -18521,10 +18534,16 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
18521
18534
  data: tableData,
18522
18535
  columns: tableColumns,
18523
18536
  getCoreRowModel: _reacttable.getCoreRowModel.call(void 0, ),
18537
+ // Pagination is server-side (the data retriever), never TanStack's. Left on,
18538
+ // every core-row-model rebuild queues resetPageIndex -> setState -> re-render,
18539
+ // and the table generators rebuild their columns on every render, so it never
18540
+ // settles: a render loop that starves other updates (the current user never
18541
+ // committed, leaving the sidebar empty).
18542
+ autoResetPageIndex: false,
18524
18543
  ...props.renderExpandedRow && {
18525
18544
  getExpandedRowModel: _reacttable.getExpandedRowModel.call(void 0, ),
18526
18545
  // Key rows by record id so an expansion stays with its record when a search or filter reorders the rows.
18527
- getRowId: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (row, index) => _nullishCoalesce(_optionalChain([row, 'access', _578 => _578.jsonApiData, 'optionalAccess', _579 => _579.id]), () => ( String(index))), "getRowId"),
18546
+ getRowId: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (row, index) => _nullishCoalesce(_optionalChain([row, 'access', _579 => _579.jsonApiData, 'optionalAccess', _580 => _580.id]), () => ( String(index))), "getRowId"),
18528
18547
  getRowCanExpand: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => true, "getRowCanExpand"),
18529
18548
  onExpandedChange: setExpanded,
18530
18549
  state: { expanded }
@@ -18541,7 +18560,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
18541
18560
  });
18542
18561
  const rowModel = tableData ? table.getRowModel() : null;
18543
18562
  const groupedRows = _react.useMemo.call(void 0, () => {
18544
- if (!props.groupBy || !_optionalChain([rowModel, 'optionalAccess', _580 => _580.rows, 'optionalAccess', _581 => _581.length])) return null;
18563
+ if (!props.groupBy || !_optionalChain([rowModel, 'optionalAccess', _581 => _581.rows, 'optionalAccess', _582 => _582.length])) return null;
18545
18564
  const groupMap = /* @__PURE__ */ new Map();
18546
18565
  for (const row of rowModel.rows) {
18547
18566
  const keys = getGroupKeys(row.original, props.groupBy);
@@ -18620,20 +18639,20 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
18620
18639
  ) }),
18621
18640
  !props.hideHeader && table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: headerGroup.headers.map((header) => {
18622
18641
  const meta = header.column.columnDef.meta;
18623
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableHead, { className: _optionalChain([meta, 'optionalAccess', _582 => _582.className]), children: header.isPlaceholder ? null : _reacttable.flexRender.call(void 0, header.column.columnDef.header, header.getContext()) }, header.id);
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);
18624
18643
  }) }, headerGroup.id))
18625
18644
  ] }),
18626
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: rowModel && _optionalChain([rowModel, 'access', _583 => _583.rows, 'optionalAccess', _584 => _584.length]) ? groupedRows ? groupedRows.map((group) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, React2.default.Fragment, { children: [
18627
- /* @__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', _585 => _585.groupLabel, 'optionalCall', _586 => _586(group.groupKey)]), () => ( group.groupKey)) }) }) }),
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)) }) }) }),
18628
18647
  group.rows.map((row) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, React2.default.Fragment, { children: [
18629
18648
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
18630
18649
  TableRow,
18631
18650
  {
18632
- onClick: () => _optionalChain([onRowClick, 'optionalCall', _587 => _587(row.original.jsonApiData)]),
18651
+ onClick: () => _optionalChain([onRowClick, 'optionalCall', _588 => _588(row.original.jsonApiData)]),
18633
18652
  className: `group ${onRowClick ? "hover:bg-muted/50 cursor-pointer" : ""}`,
18634
18653
  children: row.getVisibleCells().map((cell) => {
18635
18654
  const meta = cell.column.columnDef.meta;
18636
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess', _588 => _588.className]), children: renderCell(cell.column.columnDef.cell, cell.getContext()) }, cell.id);
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);
18637
18656
  })
18638
18657
  }
18639
18658
  ),
@@ -18643,11 +18662,11 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
18643
18662
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
18644
18663
  TableRow,
18645
18664
  {
18646
- onClick: () => _optionalChain([onRowClick, 'optionalCall', _589 => _589(row.original.jsonApiData)]),
18665
+ onClick: () => _optionalChain([onRowClick, 'optionalCall', _590 => _590(row.original.jsonApiData)]),
18647
18666
  className: `group ${onRowClick ? "hover:bg-muted/50 cursor-pointer" : ""}`,
18648
18667
  children: row.getVisibleCells().map((cell) => {
18649
18668
  const meta = cell.column.columnDef.meta;
18650
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess', _590 => _590.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);
18651
18670
  })
18652
18671
  }
18653
18672
  ),
@@ -18662,7 +18681,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
18662
18681
  onClick: (e) => {
18663
18682
  e.preventDefault();
18664
18683
  setPendingDirection("prev");
18665
- _optionalChain([data, 'access', _591 => _591.previous, 'optionalCall', _592 => _592(true)]);
18684
+ _optionalChain([data, 'access', _592 => _592.previous, 'optionalCall', _593 => _593(true)]);
18666
18685
  },
18667
18686
  disabled: !data.previous || pendingDirection !== null,
18668
18687
  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" })
@@ -18677,7 +18696,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
18677
18696
  onClick: (e) => {
18678
18697
  e.preventDefault();
18679
18698
  setPendingDirection("next");
18680
- _optionalChain([data, 'access', _593 => _593.next, 'optionalCall', _594 => _594(true)]);
18699
+ _optionalChain([data, 'access', _594 => _594.next, 'optionalCall', _595 => _595(true)]);
18681
18700
  },
18682
18701
  disabled: !data.next || pendingDirection !== null,
18683
18702
  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" })
@@ -18699,7 +18718,7 @@ function ContentListGrid(props) {
18699
18718
  if (!data.next || !sentinelRef.current) return;
18700
18719
  const observer = new IntersectionObserver(
18701
18720
  (entries) => {
18702
- if (_optionalChain([entries, 'access', _595 => _595[0], 'optionalAccess', _596 => _596.isIntersecting])) _optionalChain([data, 'access', _597 => _597.next, 'optionalCall', _598 => _598()]);
18721
+ if (_optionalChain([entries, 'access', _596 => _596[0], 'optionalAccess', _597 => _597.isIntersecting])) _optionalChain([data, 'access', _598 => _598.next, 'optionalCall', _599 => _599()]);
18703
18722
  },
18704
18723
  { threshold: 0.1, rootMargin: "200px" }
18705
18724
  );
@@ -19486,7 +19505,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
19486
19505
  newDigits[index] = digit;
19487
19506
  setDigits(newDigits);
19488
19507
  if (digit && index < 5) {
19489
- _optionalChain([inputRefs, 'access', _599 => _599.current, 'access', _600 => _600[index + 1], 'optionalAccess', _601 => _601.focus, 'call', _602 => _602()]);
19508
+ _optionalChain([inputRefs, 'access', _600 => _600.current, 'access', _601 => _601[index + 1], 'optionalAccess', _602 => _602.focus, 'call', _603 => _603()]);
19490
19509
  }
19491
19510
  const code = newDigits.join("");
19492
19511
  if (code.length === 6 && newDigits.every((d) => d !== "")) {
@@ -19495,7 +19514,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
19495
19514
  }, "handleChange");
19496
19515
  const handleKeyDown = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (index, e) => {
19497
19516
  if (e.key === "Backspace" && !digits[index] && index > 0) {
19498
- _optionalChain([inputRefs, 'access', _603 => _603.current, 'access', _604 => _604[index - 1], 'optionalAccess', _605 => _605.focus, 'call', _606 => _606()]);
19517
+ _optionalChain([inputRefs, 'access', _604 => _604.current, 'access', _605 => _605[index - 1], 'optionalAccess', _606 => _606.focus, 'call', _607 => _607()]);
19499
19518
  }
19500
19519
  }, "handleKeyDown");
19501
19520
  const handlePaste = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (e) => {
@@ -19504,7 +19523,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
19504
19523
  if (pastedData.length === 6) {
19505
19524
  const newDigits = pastedData.split("");
19506
19525
  setDigits(newDigits);
19507
- _optionalChain([inputRefs, 'access', _607 => _607.current, 'access', _608 => _608[5], 'optionalAccess', _609 => _609.focus, 'call', _610 => _610()]);
19526
+ _optionalChain([inputRefs, 'access', _608 => _608.current, 'access', _609 => _609[5], 'optionalAccess', _610 => _610.focus, 'call', _611 => _611()]);
19508
19527
  onComplete(pastedData);
19509
19528
  }
19510
19529
  }, "handlePaste");
@@ -19716,8 +19735,8 @@ function PasskeySetupDialog({ open, onOpenChange, onSuccess }) {
19716
19735
  try {
19717
19736
  const registrationData = await _chunk4ORLPEK7js.TwoFactorService.getPasskeyRegistrationOptions({
19718
19737
  id: _uuid.v4.call(void 0, ),
19719
- userName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _611 => _611.email]), () => ( "")),
19720
- userDisplayName: _optionalChain([currentUser, 'optionalAccess', _612 => _612.name])
19738
+ userName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _612 => _612.email]), () => ( "")),
19739
+ userDisplayName: _optionalChain([currentUser, 'optionalAccess', _613 => _613.name])
19721
19740
  });
19722
19741
  const credential = await _browser.startRegistration.call(void 0, { optionsJSON: registrationData.options });
19723
19742
  await _chunk4ORLPEK7js.TwoFactorService.verifyPasskeyRegistration({
@@ -19869,7 +19888,7 @@ function TotpSetupDialog({ onSuccess, trigger }) {
19869
19888
  const setup = await _chunk4ORLPEK7js.TwoFactorService.setupTotp({
19870
19889
  id: _uuid.v4.call(void 0, ),
19871
19890
  name: name.trim(),
19872
- accountName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _613 => _613.email]), () => ( ""))
19891
+ accountName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _614 => _614.email]), () => ( ""))
19873
19892
  });
19874
19893
  setQrCodeUri(setup.qrCodeUri);
19875
19894
  setAuthenticatorId(setup.authenticatorId);
@@ -20003,7 +20022,7 @@ function TwoFactorSettings() {
20003
20022
  if (isLoading) {
20004
20023
  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") }) }) });
20005
20024
  }
20006
- const isEnabled = _nullishCoalesce(_optionalChain([status, 'optionalAccess', _614 => _614.isEnabled]), () => ( false));
20025
+ const isEnabled = _nullishCoalesce(_optionalChain([status, 'optionalAccess', _615 => _615.isEnabled]), () => ( false));
20007
20026
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Card, { children: [
20008
20027
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
20009
20028
  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" }),
@@ -20041,7 +20060,7 @@ function TwoFactorSettings() {
20041
20060
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "font-medium", children: t("auth.two_factor.backup_codes") }),
20042
20061
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: t("auth.two_factor.backup_codes_description") })
20043
20062
  ] }),
20044
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BackupCodesDialog, { remainingCodes: _nullishCoalesce(_optionalChain([status, 'optionalAccess', _615 => _615.backupCodesCount]), () => ( 0)), onRegenerate: handleRefresh })
20063
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BackupCodesDialog, { remainingCodes: _nullishCoalesce(_optionalChain([status, 'optionalAccess', _616 => _616.backupCodesCount]), () => ( 0)), onRegenerate: handleRefresh })
20045
20064
  ] }) }),
20046
20065
  !isEnabled && (authenticators.length > 0 || passkeys.length > 0) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
20047
20066
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Separator, {}),
@@ -20221,9 +20240,9 @@ function AcceptInvitation() {
20221
20240
  });
20222
20241
  const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (values) => {
20223
20242
  try {
20224
- if (!_optionalChain([params, 'optionalAccess', _616 => _616.code])) return;
20243
+ if (!_optionalChain([params, 'optionalAccess', _617 => _617.code])) return;
20225
20244
  const payload = {
20226
- code: _optionalChain([params, 'optionalAccess', _617 => _617.code]),
20245
+ code: _optionalChain([params, 'optionalAccess', _618 => _618.code]),
20227
20246
  password: values.password
20228
20247
  };
20229
20248
  await _chunk4ORLPEK7js.AuthService.acceptInvitation(payload);
@@ -20594,14 +20613,14 @@ function RefreshUser() {
20594
20613
  setUser(fullUser);
20595
20614
  const token = {
20596
20615
  userId: fullUser.id,
20597
- companyId: _optionalChain([fullUser, 'access', _618 => _618.company, 'optionalAccess', _619 => _619.id]),
20616
+ companyId: _optionalChain([fullUser, 'access', _619 => _619.company, 'optionalAccess', _620 => _620.id]),
20598
20617
  roles: fullUser.roles.map((role) => role.id),
20599
- features: _nullishCoalesce(_optionalChain([fullUser, 'access', _620 => _620.company, 'optionalAccess', _621 => _621.features, 'optionalAccess', _622 => _622.map, 'call', _623 => _623((feature) => feature.id)]), () => ( [])),
20618
+ features: _nullishCoalesce(_optionalChain([fullUser, 'access', _621 => _621.company, 'optionalAccess', _622 => _622.features, 'optionalAccess', _623 => _623.map, 'call', _624 => _624((feature) => feature.id)]), () => ( [])),
20600
20619
  modules: fullUser.modules.map((module) => {
20601
20620
  return { id: module.id, permissions: module.permissions };
20602
20621
  })
20603
20622
  };
20604
- await _optionalChain([_chunk4ORLPEK7js.getTokenHandler.call(void 0, ), 'optionalAccess', _624 => _624.updateToken, 'call', _625 => _625(token)]);
20623
+ await _optionalChain([_chunk4ORLPEK7js.getTokenHandler.call(void 0, ), 'optionalAccess', _625 => _625.updateToken, 'call', _626 => _626(token)]);
20605
20624
  _cookiesnext.deleteCookie.call(void 0, "reloadData");
20606
20625
  }
20607
20626
  }, "loadFullUser");
@@ -20665,9 +20684,9 @@ function ResetPassword() {
20665
20684
  });
20666
20685
  const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (values) => {
20667
20686
  try {
20668
- if (!_optionalChain([params, 'optionalAccess', _626 => _626.code])) return;
20687
+ if (!_optionalChain([params, 'optionalAccess', _627 => _627.code])) return;
20669
20688
  const payload = {
20670
- code: _optionalChain([params, 'optionalAccess', _627 => _627.code]),
20689
+ code: _optionalChain([params, 'optionalAccess', _628 => _628.code]),
20671
20690
  password: values.password
20672
20691
  };
20673
20692
  await _chunk4ORLPEK7js.AuthService.resetPassword(payload);
@@ -21202,7 +21221,7 @@ function AiConnectionEditor({
21202
21221
  const registryRows = _react.useMemo.call(void 0, () => _nullishCoalesce(providerRegistry[connectionType], () => ( [])), [providerRegistry, connectionType]);
21203
21222
  const providers = _react.useMemo.call(void 0, () => registryRows.map((row) => row.provider), [registryRows]);
21204
21223
  const fieldsFor = _react.useCallback.call(void 0,
21205
- (provider) => _nullishCoalesce(_optionalChain([registryRows, 'access', _628 => _628.find, 'call', _629 => _629((row) => row.provider === provider), 'optionalAccess', _630 => _630.fields]), () => ( [])),
21224
+ (provider) => _nullishCoalesce(_optionalChain([registryRows, 'access', _629 => _629.find, 'call', _630 => _630((row) => row.provider === provider), 'optionalAccess', _631 => _631.fields]), () => ( [])),
21206
21225
  [registryRows]
21207
21226
  );
21208
21227
  const defaultsFor = _react.useCallback.call(void 0,
@@ -21211,7 +21230,7 @@ function AiConnectionEditor({
21211
21230
  const seeded = {};
21212
21231
  fieldsFor(provider).forEach((descriptor) => {
21213
21232
  if (descriptor.kind === "boolean") {
21214
- const current2 = _optionalChain([stored, 'optionalAccess', _631 => _631[descriptor.field]]);
21233
+ const current2 = _optionalChain([stored, 'optionalAccess', _632 => _632[descriptor.field]]);
21215
21234
  seeded[descriptor.field] = current2 !== void 0 && current2 !== null ? current2 === true : descriptor.default === true;
21216
21235
  return;
21217
21236
  }
@@ -21219,7 +21238,7 @@ function AiConnectionEditor({
21219
21238
  seeded[descriptor.field] = "";
21220
21239
  return;
21221
21240
  }
21222
- const current = _optionalChain([stored, 'optionalAccess', _632 => _632[descriptor.field]]);
21241
+ const current = _optionalChain([stored, 'optionalAccess', _633 => _633[descriptor.field]]);
21223
21242
  if (current !== void 0 && current !== null) seeded[descriptor.field] = String(current);
21224
21243
  else seeded[descriptor.field] = descriptor.default !== void 0 ? String(descriptor.default) : "";
21225
21244
  });
@@ -21245,7 +21264,7 @@ function AiConnectionEditor({
21245
21264
  values: _zod3.z.record(_zod3.z.string(), _zod3.z.any())
21246
21265
  }).superRefine((data, ctx) => {
21247
21266
  fieldsFor(data.provider).filter((descriptor) => descriptor.required).forEach((descriptor) => {
21248
- const value = _optionalChain([data, 'access', _633 => _633.values, 'optionalAccess', _634 => _634[descriptor.field]]);
21267
+ const value = _optionalChain([data, 'access', _634 => _634.values, 'optionalAccess', _635 => _635[descriptor.field]]);
21249
21268
  const filled = descriptor.kind === "secret" ? !!value || hasStoredSecret(descriptor.field) : descriptor.kind === "boolean" ? value !== void 0 : value !== void 0 && value !== null && String(value).trim() !== "";
21250
21269
  if (filled) return;
21251
21270
  ctx.addIssue({
@@ -21259,11 +21278,11 @@ function AiConnectionEditor({
21259
21278
  );
21260
21279
  const getDefaultValues = _react.useCallback.call(void 0,
21261
21280
  () => ({
21262
- id: _nullishCoalesce(_optionalChain([connection, 'optionalAccess', _635 => _635.id]), () => ( _uuid.v4.call(void 0, ))),
21263
- name: _nullishCoalesce(_optionalChain([connection, 'optionalAccess', _636 => _636.name]), () => ( "")),
21264
- provider: _nullishCoalesce(_nullishCoalesce(_optionalChain([connection, 'optionalAccess', _637 => _637.provider]), () => ( providers[0])), () => ( "")),
21265
- enabled: _nullishCoalesce(_optionalChain([connection, 'optionalAccess', _638 => _638.enabled]), () => ( true)),
21266
- values: defaultsFor(_nullishCoalesce(_nullishCoalesce(_optionalChain([connection, 'optionalAccess', _639 => _639.provider]), () => ( providers[0])), () => ( "")))
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])), () => ( "")))
21267
21286
  }),
21268
21287
  [connection, providers, defaultsFor]
21269
21288
  );
@@ -21274,7 +21293,7 @@ function AiConnectionEditor({
21274
21293
  _react.useEffect.call(void 0, () => {
21275
21294
  if (registryRows.length === 0) return;
21276
21295
  const currentProvider = form.getValues("provider");
21277
- const provider = currentProvider || _optionalChain([connection, 'optionalAccess', _640 => _640.provider]) || providers[0] || "";
21296
+ const provider = currentProvider || _optionalChain([connection, 'optionalAccess', _641 => _641.provider]) || providers[0] || "";
21278
21297
  if (!provider) return;
21279
21298
  if (provider !== currentProvider) form.setValue("provider", provider);
21280
21299
  const currentValues = form.getValues("values");
@@ -21345,7 +21364,7 @@ function AiConnectionEditor({
21345
21364
  {
21346
21365
  form,
21347
21366
  entityType: t("ai_connections.admin.entity"),
21348
- entityName: _optionalChain([connection, 'optionalAccess', _641 => _641.name]),
21367
+ entityName: _optionalChain([connection, 'optionalAccess', _642 => _642.name]),
21349
21368
  isEdit,
21350
21369
  module: _chunk4ORLPEK7js.Modules.AiConnection,
21351
21370
  size: "md",
@@ -21353,7 +21372,7 @@ function AiConnectionEditor({
21353
21372
  onSubmit: async (values) => {
21354
21373
  const attributes = {};
21355
21374
  fieldsFor(values.provider).forEach((descriptor) => {
21356
- const coerced = coerce(descriptor, _optionalChain([values, 'access', _642 => _642.values, 'optionalAccess', _643 => _643[descriptor.field]]));
21375
+ const coerced = coerce(descriptor, _optionalChain([values, 'access', _643 => _643.values, 'optionalAccess', _644 => _644[descriptor.field]]));
21357
21376
  if (coerced !== void 0) attributes[descriptor.field] = coerced;
21358
21377
  });
21359
21378
  const payload = {
@@ -21583,7 +21602,7 @@ function AiConnectionTypeCard({ connectionType }) {
21583
21602
  ),
21584
21603
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "bg-muted/40 flex flex-wrap items-center gap-2 px-3 py-2", children: [
21585
21604
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { variant: "softGray", children: t("ai_connections.admin.env_fallback") }),
21586
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground truncate text-xs", children: [_optionalChain([envDefault, 'optionalAccess', _644 => _644.provider]), _optionalChain([envDefault, 'optionalAccess', _645 => _645.model]), _optionalChain([envDefault, 'optionalAccess', _646 => _646.url])].filter(Boolean).join(" \xB7 ") })
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 ") })
21587
21606
  ] })
21588
21607
  ] })
21589
21608
  ] })
@@ -21781,7 +21800,7 @@ function extractHeadings(blocks) {
21781
21800
  function processBlocks(blockArray) {
21782
21801
  for (const block of blockArray) {
21783
21802
  if (block.type === "heading") {
21784
- const level = _optionalChain([block, 'access', _647 => _647.props, 'optionalAccess', _648 => _648.level]) || 1;
21803
+ const level = _optionalChain([block, 'access', _648 => _648.props, 'optionalAccess', _649 => _649.level]) || 1;
21785
21804
  const text = extractTextFromContent(block.content);
21786
21805
  if (text.trim()) {
21787
21806
  headings.push({
@@ -22141,7 +22160,7 @@ var useHowToTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0
22141
22160
  })
22142
22161
  };
22143
22162
  const columns = _react.useMemo.call(void 0, () => {
22144
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _649 => _649[field], 'optionalCall', _650 => _650()])).filter((col) => col !== void 0);
22163
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _650 => _650[field], 'optionalCall', _651 => _651()])).filter((col) => col !== void 0);
22145
22164
  }, [params.fields, fieldColumnMap, t, generateUrl]);
22146
22165
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
22147
22166
  }, "useHowToTableStructure");
@@ -22267,7 +22286,7 @@ function HowToSelector({
22267
22286
  }, "setHowTo");
22268
22287
  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: [
22269
22288
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between", children: [
22270
- /* @__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', _651 => _651.value, 'optionalAccess', _652 => _652.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 }) }))) }) }) }),
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 }) }))) }) }) }),
22271
22290
  field.value && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
22272
22291
  _lucidereact.CircleX,
22273
22292
  {
@@ -22572,10 +22591,10 @@ function CitationsTab({ citations, sources }) {
22572
22591
  ] }) }),
22573
22592
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: sorted.map((chunk) => {
22574
22593
  const isOpen = expanded.has(chunk.id);
22575
- const resolved = chunk.nodeId ? _optionalChain([sources, 'optionalAccess', _653 => _653.get, 'call', _654 => _654(chunk.nodeId)]) : void 0;
22594
+ const resolved = chunk.nodeId ? _optionalChain([sources, 'optionalAccess', _654 => _654.get, 'call', _655 => _655(chunk.nodeId)]) : void 0;
22576
22595
  const typeLabel = chunk.nodeType ? entityLabel(chunk.nodeType) : t("features.assistant.message.sources.source");
22577
22596
  const fallbackName = chunk.nodeId ? `${typeLabel} ${chunk.nodeId.slice(0, 8)}` : typeLabel;
22578
- const sourceName = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _655 => _655.name]), () => ( fallbackName));
22597
+ const sourceName = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _656 => _656.name]), () => ( fallbackName));
22579
22598
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react.Fragment, { children: [
22580
22599
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, TableRow, { children: [
22581
22600
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
@@ -22639,7 +22658,7 @@ function ContentsTab({ citations, sources }) {
22639
22658
  for (const c of citations) {
22640
22659
  const id = c.nodeId;
22641
22660
  if (!id) continue;
22642
- const source = _optionalChain([sources, 'optionalAccess', _656 => _656.get, 'call', _657 => _657(id)]);
22661
+ const source = _optionalChain([sources, 'optionalAccess', _657 => _657.get, 'call', _658 => _658(id)]);
22643
22662
  if (!source) continue;
22644
22663
  const existing = map.get(id);
22645
22664
  if (existing) {
@@ -22706,7 +22725,7 @@ function UsersTab({ users, citations, sources }) {
22706
22725
  const generate = usePageUrlGenerator();
22707
22726
  const userMap = /* @__PURE__ */ new Map();
22708
22727
  for (const u of users) {
22709
- if (!_optionalChain([u, 'optionalAccess', _658 => _658.id])) continue;
22728
+ if (!_optionalChain([u, 'optionalAccess', _659 => _659.id])) continue;
22710
22729
  userMap.set(u.id, { user: u, contentCount: 0, citationCount: 0 });
22711
22730
  }
22712
22731
  if (citations && sources) {
@@ -22811,7 +22830,7 @@ function MessageSourcesPanel({ message, isLatestAssistant, onSelectFollowUp, sou
22811
22830
  }
22812
22831
  return ids.size;
22813
22832
  }, [message.citations, sources]);
22814
- const usersCount = _nullishCoalesce(_optionalChain([users, 'optionalAccess', _659 => _659.length]), () => ( 0));
22833
+ const usersCount = _nullishCoalesce(_optionalChain([users, 'optionalAccess', _660 => _660.length]), () => ( 0));
22815
22834
  const total = refsCount + citationsCount + contentsCount + usersCount + suggestionsCount;
22816
22835
  const visibleTabs = [];
22817
22836
  if (suggestionsCount > 0) visibleTabs.push("suggested");
@@ -22954,7 +22973,7 @@ function MessageSourcesContainer({ message, isLatestAssistant, onSelectFollowUp
22954
22973
  return void 0;
22955
22974
  }
22956
22975
  })()));
22957
- if (_optionalChain([author, 'optionalAccess', _660 => _660.id])) userMap.set(author.id, author);
22976
+ if (_optionalChain([author, 'optionalAccess', _661 => _661.id])) userMap.set(author.id, author);
22958
22977
  }
22959
22978
  return Array.from(userMap.values());
22960
22979
  }, [resolved]);
@@ -22989,7 +23008,7 @@ function MessageItem({
22989
23008
  }) {
22990
23009
  const t = _nextintl.useTranslations.call(void 0, );
22991
23010
  const isUser = message.role === "user";
22992
- const isFailed = isUser && !!_optionalChain([failedMessageIds, 'optionalAccess', _661 => _661.has, 'call', _662 => _662(message.id)]);
23011
+ const isFailed = isUser && !!_optionalChain([failedMessageIds, 'optionalAccess', _662 => _662.has, 'call', _663 => _663(message.id)]);
22993
23012
  const markdownComponents = _react.useMemo.call(void 0,
22994
23013
  () => ({
22995
23014
  a: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ href, children }) => {
@@ -23006,7 +23025,7 @@ function MessageItem({
23006
23025
  isFailed && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-destructive flex items-center gap-2 text-xs", children: [
23007
23026
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.AlertCircle, { className: "h-3.5 w-3.5" }),
23008
23027
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: t("features.assistant.send_failed") }),
23009
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", onClick: () => _optionalChain([onRetry, 'optionalCall', _663 => _663(message.id)]), children: t("features.assistant.retry") })
23028
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", onClick: () => _optionalChain([onRetry, 'optionalCall', _664 => _664(message.id)]), children: t("features.assistant.retry") })
23010
23029
  ] })
23011
23030
  ] });
23012
23031
  }
@@ -23097,7 +23116,7 @@ function AssistantThread({
23097
23116
  }) {
23098
23117
  const lastMessageRef = _react.useRef.call(void 0, null);
23099
23118
  _react.useEffect.call(void 0, () => {
23100
- _optionalChain([lastMessageRef, 'access', _664 => _664.current, 'optionalAccess', _665 => _665.scrollIntoView, 'call', _666 => _666({ block: "start", behavior: "smooth" })]);
23119
+ _optionalChain([lastMessageRef, 'access', _665 => _665.current, 'optionalAccess', _666 => _666.scrollIntoView, 'call', _667 => _667({ block: "start", behavior: "smooth" })]);
23101
23120
  }, [messages.length, sending]);
23102
23121
  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: [
23103
23122
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -23136,7 +23155,7 @@ ${message.sources.map((source) => `- \`${source}\``).join("\n")}`;
23136
23155
  return _chunk4ORLPEK7js.rehydrate.call(void 0, _chunk4ORLPEK7js.Modules.HandbookThreadMessage, {
23137
23156
  jsonApi: {
23138
23157
  ...dehydrated.jsonApi,
23139
- attributes: { ..._nullishCoalesce(_optionalChain([dehydrated, 'access', _667 => _667.jsonApi, 'optionalAccess', _668 => _668.attributes]), () => ( {})), content }
23158
+ attributes: { ..._nullishCoalesce(_optionalChain([dehydrated, 'access', _668 => _668.jsonApi, 'optionalAccess', _669 => _669.attributes]), () => ( {})), content }
23140
23159
  },
23141
23160
  included: dehydrated.included
23142
23161
  });
@@ -23145,8 +23164,8 @@ _chunk7QVYU63Ejs.__name.call(void 0, withSourcesInContent, "withSourcesInContent
23145
23164
  function useHandbookAsk(params) {
23146
23165
  const t = _nextintl.useTranslations.call(void 0, );
23147
23166
  const generateUrl = usePageUrlGenerator();
23148
- const shouldSyncUrl = _nullishCoalesce(_optionalChain([params, 'optionalAccess', _669 => _669.syncUrl]), () => ( true));
23149
- const handbookThreadId = _optionalChain([params, 'optionalAccess', _670 => _670.handbookThreadId]);
23167
+ const shouldSyncUrl = _nullishCoalesce(_optionalChain([params, 'optionalAccess', _670 => _670.syncUrl]), () => ( true));
23168
+ const handbookThreadId = _optionalChain([params, 'optionalAccess', _671 => _671.handbookThreadId]);
23150
23169
  const [threads, setThreads] = _react.useState.call(void 0, []);
23151
23170
  const [thread, setThread] = _react.useState.call(void 0, void 0);
23152
23171
  const [messages, setMessages] = _react.useState.call(void 0, []);
@@ -23208,12 +23227,12 @@ function useHandbookAsk(params) {
23208
23227
  ]);
23209
23228
  setSending(true);
23210
23229
  try {
23211
- let id = _optionalChain([thread, 'optionalAccess', _671 => _671.id]);
23230
+ let id = _optionalChain([thread, 'optionalAccess', _672 => _672.id]);
23212
23231
  if (id === void 0) {
23213
23232
  const created = await _chunk4ORLPEK7js.HandbookThreadService.create({
23214
23233
  id: _uuid.v4.call(void 0, ),
23215
23234
  question: trimmed,
23216
- handbookPageId: _optionalChain([options, 'optionalAccess', _672 => _672.handbookPageId])
23235
+ handbookPageId: _optionalChain([options, 'optionalAccess', _673 => _673.handbookPageId])
23217
23236
  });
23218
23237
  id = created.id;
23219
23238
  setThreads((current) => [created, ...current]);
@@ -23222,7 +23241,7 @@ function useHandbookAsk(params) {
23222
23241
  id: _uuid.v4.call(void 0, ),
23223
23242
  threadId: id,
23224
23243
  question: trimmed,
23225
- handbookPageId: _optionalChain([options, 'optionalAccess', _673 => _673.handbookPageId])
23244
+ handbookPageId: _optionalChain([options, 'optionalAccess', _674 => _674.handbookPageId])
23226
23245
  });
23227
23246
  }
23228
23247
  const loaded = await _chunk4ORLPEK7js.HandbookThreadService.findOne({ id });
@@ -23243,7 +23262,7 @@ function useHandbookAsk(params) {
23243
23262
  setSending(false);
23244
23263
  }
23245
23264
  },
23246
- [messages.length, sending, syncUrl, t, _optionalChain([thread, 'optionalAccess', _674 => _674.id])]
23265
+ [messages.length, sending, syncUrl, t, _optionalChain([thread, 'optionalAccess', _675 => _675.id])]
23247
23266
  );
23248
23267
  return { threads, thread, messages, sending, ask, selectThread, startNew };
23249
23268
  }
@@ -23799,7 +23818,7 @@ function HandbookPageContainer({ handbookPageId }) {
23799
23818
  };
23800
23819
  }, []);
23801
23820
  const section = _react.useMemo.call(void 0,
23802
- () => sections.find((candidate) => candidate.key === _optionalChain([handbookPage, 'optionalAccess', _675 => _675.section])),
23821
+ () => sections.find((candidate) => candidate.key === _optionalChain([handbookPage, 'optionalAccess', _676 => _676.section])),
23803
23822
  [sections, handbookPage]
23804
23823
  );
23805
23824
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -23888,7 +23907,7 @@ function AssistantSidebar({
23888
23907
  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"),
23889
23908
  children: [
23890
23909
  thread.title,
23891
- _optionalChain([renderThreadBadge, 'optionalCall', _676 => _676(thread)])
23910
+ _optionalChain([renderThreadBadge, 'optionalCall', _677 => _677(thread)])
23892
23911
  ]
23893
23912
  },
23894
23913
  thread.id
@@ -23924,7 +23943,7 @@ function HandbookAskContainer({ handbookThreadId } = {}) {
23924
23943
  AssistantSidebar,
23925
23944
  {
23926
23945
  threads,
23927
- activeId: _optionalChain([thread, 'optionalAccess', _677 => _677.id]),
23946
+ activeId: _optionalChain([thread, 'optionalAccess', _678 => _678.id]),
23928
23947
  onSelect: selectThread,
23929
23948
  onNew: startNew,
23930
23949
  newLabel: t("handbook.chat.new"),
@@ -23932,7 +23951,7 @@ function HandbookAskContainer({ handbookThreadId } = {}) {
23932
23951
  }
23933
23952
  ) })
23934
23953
  ),
23935
- [selectThread, startNew, t, _optionalChain([thread, 'optionalAccess', _678 => _678.id]), threads]
23954
+ [selectThread, startNew, t, _optionalChain([thread, 'optionalAccess', _679 => _679.id]), threads]
23936
23955
  );
23937
23956
  return (
23938
23957
  // `RoundPageContainer` reads the page heading from the shared context, and
@@ -23944,7 +23963,7 @@ function HandbookAskContainer({ handbookThreadId } = {}) {
23944
23963
  RoundPageContainer,
23945
23964
  {
23946
23965
  module: _chunk4ORLPEK7js.Modules.HandbookPage,
23947
- id: _optionalChain([thread, 'optionalAccess', _679 => _679.id]),
23966
+ id: _optionalChain([thread, 'optionalAccess', _680 => _680.id]),
23948
23967
  fullWidth: true,
23949
23968
  forceHeader: true,
23950
23969
  defaultDetailsOpen: true,
@@ -23996,7 +24015,7 @@ function EntityMentionLinkView({ type, id, alias }) {
23996
24015
  } catch (e26) {
23997
24016
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: alias });
23998
24017
  }
23999
- if (!_optionalChain([module, 'optionalAccess', _680 => _680.pageUrl])) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: alias });
24018
+ if (!_optionalChain([module, 'optionalAccess', _681 => _681.pageUrl])) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: alias });
24000
24019
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Link, { href: generate({ page: module, id }), children: alias });
24001
24020
  }
24002
24021
  _chunk7QVYU63Ejs.__name.call(void 0, EntityMentionLinkView, "EntityMentionLinkView");
@@ -24128,13 +24147,13 @@ function AssistantContainer({
24128
24147
  AssistantSidebar,
24129
24148
  {
24130
24149
  threads: ctx.threads,
24131
- activeId: _optionalChain([ctx, 'access', _681 => _681.assistant, 'optionalAccess', _682 => _682.id]),
24150
+ activeId: _optionalChain([ctx, 'access', _682 => _682.assistant, 'optionalAccess', _683 => _683.id]),
24132
24151
  onSelect: ctx.selectThread,
24133
24152
  renderThreadBadge
24134
24153
  }
24135
24154
  ) })
24136
24155
  ),
24137
- [ctx.threads, _optionalChain([ctx, 'access', _683 => _683.assistant, 'optionalAccess', _684 => _684.id]), ctx.selectThread, renderThreadBadge]
24156
+ [ctx.threads, _optionalChain([ctx, 'access', _684 => _684.assistant, 'optionalAccess', _685 => _685.id]), ctx.selectThread, renderThreadBadge]
24138
24157
  );
24139
24158
  const thread = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: !showThread ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
24140
24159
  AssistantEmptyState,
@@ -24142,7 +24161,7 @@ function AssistantContainer({
24142
24161
  onSend: ctx.sendMessage,
24143
24162
  operatorMode: ctx.operatorMode,
24144
24163
  onOperatorModeChange: showOperatorToggle ? ctx.setOperatorMode : void 0,
24145
- composerLeading: _optionalChain([renderScopePicker, 'optionalCall', _685 => _685()])
24164
+ composerLeading: _optionalChain([renderScopePicker, 'optionalCall', _686 => _686()])
24146
24165
  }
24147
24166
  ) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
24148
24167
  ctx.assistant ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -24174,7 +24193,7 @@ function AssistantContainer({
24174
24193
  AssistantSidebar,
24175
24194
  {
24176
24195
  threads: ctx.threads,
24177
- activeId: _optionalChain([ctx, 'access', _686 => _686.assistant, 'optionalAccess', _687 => _687.id]),
24196
+ activeId: _optionalChain([ctx, 'access', _687 => _687.assistant, 'optionalAccess', _688 => _688.id]),
24178
24197
  onSelect: ctx.selectThread,
24179
24198
  onNew: ctx.startNew,
24180
24199
  renderThreadBadge
@@ -24187,7 +24206,7 @@ function AssistantContainer({
24187
24206
  RoundPageContainer,
24188
24207
  {
24189
24208
  module: _chunk4ORLPEK7js.Modules.Assistant,
24190
- id: _optionalChain([ctx, 'access', _688 => _688.assistant, 'optionalAccess', _689 => _689.id]),
24209
+ id: _optionalChain([ctx, 'access', _689 => _689.assistant, 'optionalAccess', _690 => _690.id]),
24191
24210
  fullWidth: true,
24192
24211
  forceHeader: true,
24193
24212
  defaultDetailsOpen: true,
@@ -24215,7 +24234,7 @@ function flattenBlocks(blocks) {
24215
24234
  if (typeof inline === "string") return inline;
24216
24235
  if (!inline || typeof inline !== "object") return "";
24217
24236
  const node = inline;
24218
- if (node.type === "mention") return _nullishCoalesce(_optionalChain([node, 'access', _690 => _690.props, 'optionalAccess', _691 => _691.alias]), () => ( ""));
24237
+ if (node.type === "mention") return _nullishCoalesce(_optionalChain([node, 'access', _691 => _691.props, 'optionalAccess', _692 => _692.alias]), () => ( ""));
24219
24238
  if (typeof node.text === "string") return node.text;
24220
24239
  if (Array.isArray(node.content)) return node.content.map(readInline).join("");
24221
24240
  return "";
@@ -24331,7 +24350,7 @@ function AssistantPageContainer({
24331
24350
  AssistantSidebar,
24332
24351
  {
24333
24352
  threads: ctx.threads,
24334
- activeId: _optionalChain([ctx, 'access', _692 => _692.assistant, 'optionalAccess', _693 => _693.id]),
24353
+ activeId: _optionalChain([ctx, 'access', _693 => _693.assistant, 'optionalAccess', _694 => _694.id]),
24335
24354
  onSelect: ctx.selectThread,
24336
24355
  onNew: ctx.startNew
24337
24356
  }
@@ -24607,14 +24626,14 @@ function ApprovalActionCard({ actionId, summary, onResolved, hiddenRelationshipK
24607
24626
  const presented = _react.useMemo.call(void 0, () => parseOperatorProposal(actionProposal), [actionProposal]);
24608
24627
  const legacy = _react.useMemo.call(void 0, () => presented ? void 0 : parseLegacyProposal(toolArgs), [presented, toolArgs]);
24609
24628
  const isUpdate = toolName === "update_entity";
24610
- const entityType = _nullishCoalesce(_nullishCoalesce(_optionalChain([presented, 'optionalAccess', _694 => _694.type]), () => ( _optionalChain([legacy, 'optionalAccess', _695 => _695.type]))), () => ( ""));
24629
+ const entityType = _nullishCoalesce(_nullishCoalesce(_optionalChain([presented, 'optionalAccess', _695 => _695.type]), () => ( _optionalChain([legacy, 'optionalAccess', _696 => _696.type]))), () => ( ""));
24611
24630
  const loose = t;
24612
24631
  const entityLabel = entityName(loose, entityType);
24613
- const targetLabel = _nullishCoalesce(_optionalChain([presented, 'optionalAccess', _696 => _696.target, 'optionalAccess', _697 => _697.label]), () => ( ""));
24632
+ const targetLabel = _nullishCoalesce(_optionalChain([presented, 'optionalAccess', _697 => _697.target, 'optionalAccess', _698 => _698.label]), () => ( ""));
24614
24633
  const rows = _react.useMemo.call(void 0, () => {
24615
24634
  const yes = t("features.assistant.approval.proposal.yes");
24616
24635
  const no = t("features.assistant.approval.proposal.no");
24617
- const attributes = _nullishCoalesce(_optionalChain([presented, 'optionalAccess', _698 => _698.attributes]), () => ( _optionalChain([legacy, 'optionalAccess', _699 => _699.attributes])));
24636
+ const attributes = _nullishCoalesce(_optionalChain([presented, 'optionalAccess', _699 => _699.attributes]), () => ( _optionalChain([legacy, 'optionalAccess', _700 => _700.attributes])));
24618
24637
  const attributeRows = Object.entries(_nullishCoalesce(attributes, () => ( {}))).flatMap(([key, value]) => {
24619
24638
  const text = formatAttribute(value, yes, no);
24620
24639
  return text === void 0 ? [] : [{ key: `attribute:${key}`, label: fieldLabel(loose, entityType, key), value: text }];
@@ -24652,7 +24671,7 @@ function ApprovalActionCard({ actionId, summary, onResolved, hiddenRelationshipK
24652
24671
  try {
24653
24672
  const message = kind === "approve" ? await _chunk4ORLPEK7js.AssistantActionService.approve({ id: actionId }) : await _chunk4ORLPEK7js.AssistantActionService.deny({ id: actionId });
24654
24673
  setStatus(kind === "approve" ? "executed" : "denied");
24655
- if (message) _optionalChain([onResolved, 'optionalCall', _700 => _700(message)]);
24674
+ if (message) _optionalChain([onResolved, 'optionalCall', _701 => _701(message)]);
24656
24675
  } catch (error) {
24657
24676
  console.error(`ApprovalActionCard: failed to ${kind} assistant action ${actionId}`, error);
24658
24677
  setFailed(true);
@@ -24797,10 +24816,10 @@ var useNotificationTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call
24797
24816
  const dateLocale = _chunk4ORLPEK7js.dateFormatLocale.call(void 0, _chunk4ORLPEK7js.useI18nLocale.call(void 0, ));
24798
24817
  const generateUrl = usePageUrlGenerator();
24799
24818
  const { loadNotifications } = useNotificationContext();
24800
- const archived = _optionalChain([params, 'access', _701 => _701.context, 'optionalAccess', _702 => _702.archived]) === true;
24819
+ const archived = _optionalChain([params, 'access', _702 => _702.context, 'optionalAccess', _703 => _703.archived]) === true;
24801
24820
  const archiveNotification = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (notification) => {
24802
24821
  await _chunk4ORLPEK7js.NotificationService.archive({ id: notification.id });
24803
- _optionalChain([params, 'access', _703 => _703.dataRetriever, 'optionalAccess', _704 => _704.removeElement, 'call', _705 => _705(notification)]);
24822
+ _optionalChain([params, 'access', _704 => _704.dataRetriever, 'optionalAccess', _705 => _705.removeElement, 'call', _706 => _706(notification)]);
24804
24823
  await loadNotifications();
24805
24824
  }, "archiveNotification");
24806
24825
  const tableData = _react.useMemo.call(void 0, () => {
@@ -24839,7 +24858,7 @@ var useNotificationTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call
24839
24858
  const data = generateNotificationData({ notification, generateUrl });
24840
24859
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-foreground text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
24841
24860
  strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { className: "font-medium", children: chunks }), "strong"),
24842
- actor: _nullishCoalesce(_optionalChain([data, 'access', _706 => _706.actor, 'optionalAccess', _707 => _707.name]), () => ( "")),
24861
+ actor: _nullishCoalesce(_optionalChain([data, 'access', _707 => _707.actor, 'optionalAccess', _708 => _708.name]), () => ( "")),
24843
24862
  title: data.title,
24844
24863
  message: _nullishCoalesce(notification.message, () => ( ""))
24845
24864
  }) });
@@ -24894,7 +24913,7 @@ var useNotificationTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call
24894
24913
  })
24895
24914
  };
24896
24915
  const columns = _react.useMemo.call(void 0, () => {
24897
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _708 => _708[field], 'optionalCall', _709 => _709()])).filter((col) => col !== void 0);
24916
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _709 => _709[field], 'optionalCall', _710 => _710()])).filter((col) => col !== void 0);
24898
24917
  }, [params.fields, fieldColumnMap, t, generateUrl]);
24899
24918
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
24900
24919
  }, "useNotificationTableStructure");
@@ -25311,7 +25330,7 @@ var DEFAULT_TRANSLATIONS = {
25311
25330
  invalidEmail: "Please enter a valid email address"
25312
25331
  };
25313
25332
  async function copyToClipboard(text) {
25314
- if (_optionalChain([navigator, 'access', _710 => _710.clipboard, 'optionalAccess', _711 => _711.writeText])) {
25333
+ if (_optionalChain([navigator, 'access', _711 => _711.clipboard, 'optionalAccess', _712 => _712.writeText])) {
25315
25334
  try {
25316
25335
  await navigator.clipboard.writeText(text);
25317
25336
  return true;
@@ -25353,7 +25372,7 @@ function ReferralWidget({
25353
25372
  const linkInputRef = _react.useRef.call(void 0, null);
25354
25373
  const config = _chunkGPXYQMOZjs.getReferralConfig.call(void 0, );
25355
25374
  const baseUrl = config.referralUrlBase || (typeof window !== "undefined" ? window.location.origin : "");
25356
- const referralUrl = _optionalChain([stats, 'optionalAccess', _712 => _712.referralCode]) ? `${baseUrl}${config.referralPath}?${config.urlParamName}=${stats.referralCode}` : "";
25375
+ const referralUrl = _optionalChain([stats, 'optionalAccess', _713 => _713.referralCode]) ? `${baseUrl}${config.referralPath}?${config.urlParamName}=${stats.referralCode}` : "";
25357
25376
  if (!_chunkGPXYQMOZjs.isReferralEnabled.call(void 0, )) {
25358
25377
  return null;
25359
25378
  }
@@ -25363,7 +25382,7 @@ function ReferralWidget({
25363
25382
  if (success) {
25364
25383
  setCopied(true);
25365
25384
  _chunk4ORLPEK7js.showToast.call(void 0, t.copiedMessage);
25366
- _optionalChain([onLinkCopied, 'optionalCall', _713 => _713()]);
25385
+ _optionalChain([onLinkCopied, 'optionalCall', _714 => _714()]);
25367
25386
  setTimeout(() => setCopied(false), 2e3);
25368
25387
  } else {
25369
25388
  _chunk4ORLPEK7js.showError.call(void 0, t.copyError);
@@ -25377,12 +25396,12 @@ function ReferralWidget({
25377
25396
  try {
25378
25397
  await sendInvite(email);
25379
25398
  _chunk4ORLPEK7js.showToast.call(void 0, t.inviteSent);
25380
- _optionalChain([onInviteSent, 'optionalCall', _714 => _714(email)]);
25399
+ _optionalChain([onInviteSent, 'optionalCall', _715 => _715(email)]);
25381
25400
  setEmail("");
25382
25401
  } catch (err) {
25383
25402
  const error2 = err instanceof Error ? err : new Error(t.inviteError);
25384
25403
  _chunk4ORLPEK7js.showError.call(void 0, error2.message);
25385
- _optionalChain([onInviteError, 'optionalCall', _715 => _715(error2)]);
25404
+ _optionalChain([onInviteError, 'optionalCall', _716 => _716(error2)]);
25386
25405
  }
25387
25406
  }, [email, sendInvite, t.inviteSent, t.inviteError, t.invalidEmail, onInviteSent, onInviteError]);
25388
25407
  const handleEmailKeyDown = _react.useCallback.call(void 0,
@@ -26150,7 +26169,7 @@ function OAuthClientList({
26150
26169
  OAuthClientCard,
26151
26170
  {
26152
26171
  client,
26153
- onClick: () => _optionalChain([onClientClick, 'optionalCall', _716 => _716(client)]),
26172
+ onClick: () => _optionalChain([onClientClick, 'optionalCall', _717 => _717(client)]),
26154
26173
  onEdit: onEditClick ? () => onEditClick(client) : void 0,
26155
26174
  onDelete: onDeleteClick ? () => onDeleteClick(client) : void 0
26156
26175
  },
@@ -26175,11 +26194,11 @@ function OAuthClientForm({
26175
26194
  const t = _nextintl.useTranslations.call(void 0, );
26176
26195
  const isEditMode = !!client;
26177
26196
  const [formState, setFormState] = _react.useState.call(void 0, {
26178
- name: _optionalChain([client, 'optionalAccess', _717 => _717.name]) || "",
26179
- description: _optionalChain([client, 'optionalAccess', _718 => _718.description]) || "",
26180
- redirectUris: _optionalChain([client, 'optionalAccess', _719 => _719.redirectUris, 'optionalAccess', _720 => _720.length]) ? client.redirectUris : [""],
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 : [""],
26181
26200
  allowedScopes: client ? client.allowedScopes || [] : defaultScopes,
26182
- isConfidential: _nullishCoalesce(_optionalChain([client, 'optionalAccess', _721 => _721.isConfidential]), () => ( true))
26201
+ isConfidential: _nullishCoalesce(_optionalChain([client, 'optionalAccess', _722 => _722.isConfidential]), () => ( true))
26183
26202
  });
26184
26203
  const [errors, setErrors] = _react.useState.call(void 0, {});
26185
26204
  const validate = _react.useCallback.call(void 0, () => {
@@ -26589,7 +26608,7 @@ function OAuthConsentScreen({
26589
26608
  if (error || !clientInfo) {
26590
26609
  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: [
26591
26610
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.AlertTriangle, { className: "h-4 w-4" }),
26592
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDescription, { children: _optionalChain([error, 'optionalAccess', _722 => _722.message]) || t("oauth.consent.invalid_request") })
26611
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDescription, { children: _optionalChain([error, 'optionalAccess', _723 => _723.message]) || t("oauth.consent.invalid_request") })
26593
26612
  ] }) }) }) });
26594
26613
  }
26595
26614
  const { client, scopes } = clientInfo;
@@ -26810,7 +26829,7 @@ function WaitlistForm({ onSuccess }) {
26810
26829
  questionnaire: values.questionnaire
26811
26830
  });
26812
26831
  setIsSuccess(true);
26813
- _optionalChain([onSuccess, 'optionalCall', _723 => _723()]);
26832
+ _optionalChain([onSuccess, 'optionalCall', _724 => _724()]);
26814
26833
  } catch (e) {
26815
26834
  errorToast({ title: t("common.errors.error"), error: e });
26816
26835
  } finally {
@@ -27350,7 +27369,7 @@ var ModuleEditor = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs.__n
27350
27369
  ] }),
27351
27370
  roleIds.map((roleId) => {
27352
27371
  const roleTokens = block[roleId];
27353
- const roleLabel = _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _724 => _724[roleId]]), () => ( roleId));
27372
+ const roleLabel = _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _725 => _725[roleId]]), () => ( roleId));
27354
27373
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "tr", { className: "border-b last:border-b-0", children: [
27355
27374
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-4 py-1 text-xs font-medium text-muted-foreground", children: roleLabel }),
27356
27375
  _chunkGPXYQMOZjs.ACTION_TYPES.map((action) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-2 py-1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -27387,7 +27406,7 @@ function RbacContainer() {
27387
27406
  }, []);
27388
27407
  const sortedModuleIds = _react.useMemo.call(void 0, () => {
27389
27408
  if (!matrix) return [];
27390
- return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _725 => _725[a]]), () => ( a))).localeCompare(_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _726 => _726[b]]), () => ( b))));
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))));
27391
27410
  }, [matrix, moduleNames]);
27392
27411
  const roleIds = _react.useMemo.call(void 0, () => {
27393
27412
  if (roleNames) {
@@ -27450,7 +27469,7 @@ function RbacContainer() {
27450
27469
  id === selectedModuleId && "bg-muted font-medium text-foreground",
27451
27470
  id !== selectedModuleId && "text-muted-foreground"
27452
27471
  ),
27453
- children: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _727 => _727[id]]), () => ( id))
27472
+ children: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _728 => _728[id]]), () => ( id))
27454
27473
  }
27455
27474
  ) }, id)) }) }),
27456
27475
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "section", { className: "flex-1 overflow-y-auto p-4", children: selectedModuleId && selectedBlock ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -27458,7 +27477,7 @@ function RbacContainer() {
27458
27477
  {
27459
27478
  moduleId: selectedModuleId,
27460
27479
  block: selectedBlock,
27461
- moduleLabel: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _728 => _728[selectedModuleId]]), () => ( selectedModuleId)),
27480
+ moduleLabel: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _729 => _729[selectedModuleId]]), () => ( selectedModuleId)),
27462
27481
  roleIds,
27463
27482
  roleNames,
27464
27483
  onOpenPicker: openPicker
@@ -27469,12 +27488,12 @@ function RbacContainer() {
27469
27488
  RbacPermissionPicker,
27470
27489
  {
27471
27490
  open: !!activePicker,
27472
- anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _729 => _729.anchor]), () => ( null)),
27491
+ anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _730 => _730.anchor]), () => ( null)),
27473
27492
  value: activeValue,
27474
- isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _730 => _730.isRoleColumn]), () => ( false)),
27493
+ isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _731 => _731.isRoleColumn]), () => ( false)),
27475
27494
  knownSegments: activeSegments,
27476
27495
  onSetValue: handleSetValue,
27477
- onClear: _optionalChain([activePicker, 'optionalAccess', _731 => _731.isRoleColumn]) ? handleClear : void 0,
27496
+ onClear: _optionalChain([activePicker, 'optionalAccess', _732 => _732.isRoleColumn]) ? handleClear : void 0,
27478
27497
  onClose: closePicker
27479
27498
  }
27480
27499
  )
@@ -27541,7 +27560,7 @@ function RbacByRoleContainer() {
27541
27560
  }, [roleNames]);
27542
27561
  const sortedModuleIds = _react.useMemo.call(void 0, () => {
27543
27562
  if (!matrix) return [];
27544
- return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _732 => _732[a]]), () => ( a))).localeCompare(_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _733 => _733[b]]), () => ( b))));
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))));
27545
27564
  }, [matrix, moduleNames]);
27546
27565
  _react.useEffect.call(void 0, () => {
27547
27566
  if (!selectedRoleId && sortedRoleIds.length > 0) {
@@ -27590,7 +27609,7 @@ function RbacByRoleContainer() {
27590
27609
  id === selectedRoleId && "bg-muted font-medium text-foreground",
27591
27610
  id !== selectedRoleId && "text-muted-foreground"
27592
27611
  ),
27593
- children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _734 => _734[id]]), () => ( id))
27612
+ children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _735 => _735[id]]), () => ( id))
27594
27613
  }
27595
27614
  ) }, id)) }) }),
27596
27615
  /* @__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: [
@@ -27610,7 +27629,7 @@ function RbacByRoleContainer() {
27610
27629
  if (!block) return null;
27611
27630
  const defaultTokens = _nullishCoalesce(block.default, () => ( []));
27612
27631
  const roleTokens = block[selectedRoleId];
27613
- const moduleLabel = _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _735 => _735[moduleId]]), () => ( moduleId));
27632
+ const moduleLabel = _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _736 => _736[moduleId]]), () => ( moduleId));
27614
27633
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react.Fragment, { children: [
27615
27634
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { className: "border-b bg-muted/40", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
27616
27635
  "td",
@@ -27625,7 +27644,7 @@ function RbacByRoleContainer() {
27625
27644
  _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))
27626
27645
  ] }),
27627
27646
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "tr", { className: "border-b last:border-b-0", children: [
27628
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-4 py-1 text-xs font-medium text-muted-foreground", children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _736 => _736[selectedRoleId]]), () => ( selectedRoleId)) }),
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)) }),
27629
27648
  _chunkGPXYQMOZjs.ACTION_TYPES.map((action) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-2 py-1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
27630
27649
  CellButton3,
27631
27650
  {
@@ -27646,12 +27665,12 @@ function RbacByRoleContainer() {
27646
27665
  RbacPermissionPicker,
27647
27666
  {
27648
27667
  open: !!activePicker,
27649
- anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _737 => _737.anchor]), () => ( null)),
27668
+ anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _738 => _738.anchor]), () => ( null)),
27650
27669
  value: activeValue,
27651
- isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _738 => _738.isRoleColumn]), () => ( false)),
27670
+ isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _739 => _739.isRoleColumn]), () => ( false)),
27652
27671
  knownSegments: activeSegments,
27653
27672
  onSetValue: handleSetValue,
27654
- onClear: _optionalChain([activePicker, 'optionalAccess', _739 => _739.isRoleColumn]) ? handleClear : void 0,
27673
+ onClear: _optionalChain([activePicker, 'optionalAccess', _740 => _740.isRoleColumn]) ? handleClear : void 0,
27655
27674
  onClose: closePicker
27656
27675
  }
27657
27676
  )
@@ -28269,4 +28288,4 @@ _chunk7QVYU63Ejs.__name.call(void 0, RbacByRoleContainer, "RbacByRoleContainer")
28269
28288
 
28270
28289
 
28271
28290
  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;
28272
- //# sourceMappingURL=chunk-VDVIUDY5.js.map
28291
+ //# sourceMappingURL=chunk-4EGA5UP5.js.map