@carlonicora/nextjs-jsonapi 5.1.1 → 5.1.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.
@@ -6919,14 +6919,15 @@ function useDataListRetriever(params) {
6919
6919
  if ((_optionalChain([fetchParams, 'optionalAccess', _130 => _130.callNext]) || _optionalChain([fetchParams, 'optionalAccess', _131 => _131.callPrevious])) && isPaginatingRef.current) {
6920
6920
  return;
6921
6921
  }
6922
- if (isFetchingRef.current && !_optionalChain([fetchParams, 'optionalAccess', _132 => _132.callNext]) && !_optionalChain([fetchParams, 'optionalAccess', _133 => _133.callPrevious])) return;
6923
- if (stableParams.requiresSearch === true && _optionalChain([fetchParams, 'optionalAccess', _134 => _134.isRefine]) !== true && _optionalChain([fetchParams, 'optionalAccess', _135 => _135.isRefresh]) !== true) {
6922
+ if (isFetchingRef.current && !_optionalChain([fetchParams, 'optionalAccess', _132 => _132.isRefine]) && !_optionalChain([fetchParams, 'optionalAccess', _133 => _133.callNext]) && !_optionalChain([fetchParams, 'optionalAccess', _134 => _134.callPrevious]))
6923
+ return;
6924
+ if (stableParams.requiresSearch === true && _optionalChain([fetchParams, 'optionalAccess', _135 => _135.isRefine]) !== true && _optionalChain([fetchParams, 'optionalAccess', _136 => _136.isRefresh]) !== true) {
6924
6925
  return;
6925
6926
  }
6926
- 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) {
6927
+ if (_optionalChain([fetchParams, 'optionalAccess', _137 => _137.force]) !== true && !nextPage && !previousPage && isLoaded && _optionalChain([fetchParams, 'optionalAccess', _138 => _138.callNext]) !== true && _optionalChain([fetchParams, 'optionalAccess', _139 => _139.callPrevious]) !== true && params.search === searchTermRef.current) {
6927
6928
  return;
6928
6929
  }
6929
- if (_optionalChain([fetchParams, 'optionalAccess', _139 => _139.callNext]) || _optionalChain([fetchParams, 'optionalAccess', _140 => _140.callPrevious])) {
6930
+ if (_optionalChain([fetchParams, 'optionalAccess', _140 => _140.callNext]) || _optionalChain([fetchParams, 'optionalAccess', _141 => _141.callPrevious])) {
6930
6931
  isPaginatingRef.current = true;
6931
6932
  }
6932
6933
  const thisRequestId = ++requestIdRef.current;
@@ -6939,7 +6940,7 @@ function useDataListRetriever(params) {
6939
6940
  const previousRef = { previous: void 0 };
6940
6941
  const selfRef = { self: void 0 };
6941
6942
  const totalRef = { total: void 0 };
6942
- if (nextPage && _optionalChain([fetchParams, 'optionalAccess', _141 => _141.callNext]) && _optionalChain([fetchParams, 'optionalAccess', _142 => _142.isRefine]) !== true) {
6943
+ if (nextPage && _optionalChain([fetchParams, 'optionalAccess', _142 => _142.callNext]) && _optionalChain([fetchParams, 'optionalAccess', _143 => _143.isRefine]) !== true) {
6943
6944
  const ServiceClass = stableParams.service;
6944
6945
  response = await ServiceClass.next({
6945
6946
  type: stableParams.type,
@@ -6949,7 +6950,7 @@ function useDataListRetriever(params) {
6949
6950
  self: selfRef,
6950
6951
  total: totalRef
6951
6952
  });
6952
- } else if (previousPage && _optionalChain([fetchParams, 'optionalAccess', _143 => _143.callPrevious]) && _optionalChain([fetchParams, 'optionalAccess', _144 => _144.isRefine]) !== true) {
6953
+ } else if (previousPage && _optionalChain([fetchParams, 'optionalAccess', _144 => _144.callPrevious]) && _optionalChain([fetchParams, 'optionalAccess', _145 => _145.isRefine]) !== true) {
6953
6954
  const ServiceClass = stableParams.service;
6954
6955
  response = await ServiceClass.previous({
6955
6956
  type: stableParams.type,
@@ -6972,8 +6973,8 @@ function useDataListRetriever(params) {
6972
6973
  retrieverParams.total = totalRef;
6973
6974
  response = await stableParams.retriever(retrieverParams);
6974
6975
  }
6975
- if (thisRequestId === requestIdRef.current && !_optionalChain([abortControllerRef, 'access', _145 => _145.current, 'optionalAccess', _146 => _146.signal, 'access', _147 => _147.aborted])) {
6976
- if (_optionalChain([fetchParams, 'optionalAccess', _148 => _148.isRefresh]) === true) {
6976
+ if (thisRequestId === requestIdRef.current && !_optionalChain([abortControllerRef, 'access', _146 => _146.current, 'optionalAccess', _147 => _147.signal, 'access', _148 => _148.aborted])) {
6977
+ if (_optionalChain([fetchParams, 'optionalAccess', _149 => _149.isRefresh]) === true) {
6977
6978
  setData(response);
6978
6979
  } else {
6979
6980
  setData((prevData) => [...prevData ? prevData : [], ...response]);
@@ -7196,12 +7197,12 @@ var SUBTITLE_PX_PER_CHAR_11 = 6;
7196
7197
  var LABEL_PADDING_PX = 16;
7197
7198
  function estimateLabelWidth(node) {
7198
7199
  if (node.subtitle) {
7199
- const titleWidth = (_nullishCoalesce(_optionalChain([node, 'access', _149 => _149.name, 'optionalAccess', _150 => _150.length]), () => ( 0))) * TITLE_PX_PER_CHAR_16;
7200
+ const titleWidth = (_nullishCoalesce(_optionalChain([node, 'access', _150 => _150.name, 'optionalAccess', _151 => _151.length]), () => ( 0))) * TITLE_PX_PER_CHAR_16;
7200
7201
  const subtitleWidth = node.subtitle.length * SUBTITLE_PX_PER_CHAR_11;
7201
7202
  return Math.max(titleWidth, subtitleWidth) + LABEL_PADDING_PX;
7202
7203
  }
7203
7204
  const perChar = node.bold ? NAME_PX_PER_CHAR_16_BOLD : NAME_PX_PER_CHAR_12;
7204
- return (_nullishCoalesce(_optionalChain([node, 'access', _151 => _151.name, 'optionalAccess', _152 => _152.length]), () => ( 0))) * perChar + LABEL_PADDING_PX;
7205
+ return (_nullishCoalesce(_optionalChain([node, 'access', _152 => _152.name, 'optionalAccess', _153 => _153.length]), () => ( 0))) * perChar + LABEL_PADDING_PX;
7205
7206
  }
7206
7207
  _chunk7QVYU63Ejs.__name.call(void 0, estimateLabelWidth, "estimateLabelWidth");
7207
7208
  function linkEndpointId(end) {
@@ -7314,12 +7315,12 @@ var SUBTITLE_PX_PER_CHAR_112 = 6;
7314
7315
  var LABEL_PADDING_PX2 = 16;
7315
7316
  function estimateLabelWidth2(node) {
7316
7317
  if (node.subtitle) {
7317
- const titleWidth = (_nullishCoalesce(_optionalChain([node, 'access', _153 => _153.name, 'optionalAccess', _154 => _154.length]), () => ( 0))) * TITLE_PX_PER_CHAR_162;
7318
+ const titleWidth = (_nullishCoalesce(_optionalChain([node, 'access', _154 => _154.name, 'optionalAccess', _155 => _155.length]), () => ( 0))) * TITLE_PX_PER_CHAR_162;
7318
7319
  const subtitleWidth = node.subtitle.length * SUBTITLE_PX_PER_CHAR_112;
7319
7320
  return Math.max(titleWidth, subtitleWidth) + LABEL_PADDING_PX2;
7320
7321
  }
7321
7322
  const perChar = node.bold ? NAME_PX_PER_CHAR_16_BOLD2 : NAME_PX_PER_CHAR_122;
7322
- return (_nullishCoalesce(_optionalChain([node, 'access', _155 => _155.name, 'optionalAccess', _156 => _156.length]), () => ( 0))) * perChar + LABEL_PADDING_PX2;
7323
+ return (_nullishCoalesce(_optionalChain([node, 'access', _156 => _156.name, 'optionalAccess', _157 => _157.length]), () => ( 0))) * perChar + LABEL_PADDING_PX2;
7323
7324
  }
7324
7325
  _chunk7QVYU63Ejs.__name.call(void 0, estimateLabelWidth2, "estimateLabelWidth");
7325
7326
  function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, loadingNodeIds, containerKey) {
@@ -7386,7 +7387,7 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, lo
7386
7387
  });
7387
7388
  const typeColorMap = /* @__PURE__ */ new Map();
7388
7389
  Array.from(groupTypes).forEach((type, index) => {
7389
- if (type === _optionalChain([nodes, 'access', _157 => _157[0], 'optionalAccess', _158 => _158.instanceType])) {
7390
+ if (type === _optionalChain([nodes, 'access', _158 => _158[0], 'optionalAccess', _159 => _159.instanceType])) {
7390
7391
  typeColorMap.set(type, accentColor);
7391
7392
  } else if (type === "documents" || type === "articles" || type === "hyperlinks") {
7392
7393
  typeColorMap.set(type, contentColor);
@@ -7436,14 +7437,14 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, lo
7436
7437
  });
7437
7438
  const svg = d3.select(svgRef.current);
7438
7439
  svg.selectAll("*").remove();
7439
- const container = _optionalChain([svgRef, 'access', _159 => _159.current, 'optionalAccess', _160 => _160.parentElement]);
7440
+ const container = _optionalChain([svgRef, 'access', _160 => _160.current, 'optionalAccess', _161 => _161.parentElement]);
7440
7441
  if (!container) return;
7441
7442
  const width = container.clientWidth;
7442
7443
  const height = container.clientHeight;
7443
7444
  svg.attr("width", width).attr("height", height).attr("viewBox", `0 0 ${width} ${height}`);
7444
7445
  const graphGroup = svg.append("g").attr("class", "graph-content");
7445
7446
  const nodeRadius = 40;
7446
- const directed = _optionalChain([options, 'optionalAccess', _161 => _161.directed]) === true;
7447
+ const directed = _optionalChain([options, 'optionalAccess', _162 => _162.directed]) === true;
7447
7448
  if (directed) {
7448
7449
  const defs = svg.append("defs");
7449
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");
@@ -7455,10 +7456,10 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, lo
7455
7456
  });
7456
7457
  zoomBehaviorRef.current = zoom2;
7457
7458
  svg.call(zoom2).on("wheel.zoom", null).on("dblclick.zoom", null);
7458
- const layoutMode = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _162 => _162.layout]), () => ( "radial"));
7459
+ const layoutMode = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _163 => _163.layout]), () => ( "radial"));
7459
7460
  let layeredPositionsApplied = false;
7460
7461
  if (layoutMode === "layered") {
7461
- const layeredOpts = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _163 => _163.layered]), () => ( {}));
7462
+ const layeredOpts = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _164 => _164.layered]), () => ( {}));
7462
7463
  const useFit = layeredOpts.fitContainer === true && width > 0 && height > 0;
7463
7464
  const positions = useFit ? fitLayeredLayoutToAspectRatio(visibleNodes, visibleLinks, {
7464
7465
  rankdir: _nullishCoalesce(layeredOpts.rankdir, () => ( "LR")),
@@ -7541,7 +7542,7 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, lo
7541
7542
  sourceNode.children.push(targetId);
7542
7543
  }
7543
7544
  });
7544
- const rootChildren = _optionalChain([nodeHierarchy, 'access', _164 => _164.get, 'call', _165 => _165(centralNodeId), 'optionalAccess', _166 => _166.children]) || [];
7545
+ const rootChildren = _optionalChain([nodeHierarchy, 'access', _165 => _165.get, 'call', _166 => _166(centralNodeId), 'optionalAccess', _167 => _167.children]) || [];
7545
7546
  const childAngleStep = 2 * Math.PI / Math.max(rootChildren.length, 1);
7546
7547
  rootChildren.forEach((childId, index) => {
7547
7548
  const childNode = nodeHierarchy.get(childId);
@@ -7693,7 +7694,7 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, lo
7693
7694
  if (d.instanceType === "root") return;
7694
7695
  const currentNode = d3.select(this);
7695
7696
  currentNode.raise();
7696
- const currentZoom = _optionalChain([zoomRef, 'access', _167 => _167.current, 'optionalAccess', _168 => _168.k]) || 1;
7697
+ const currentZoom = _optionalChain([zoomRef, 'access', _168 => _168.current, 'optionalAccess', _169 => _169.k]) || 1;
7697
7698
  const targetScreenFontSize = 20;
7698
7699
  const baseFontSize = 12;
7699
7700
  const textScale = targetScreenFontSize / (baseFontSize * currentZoom);
@@ -7768,19 +7769,19 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, lo
7768
7769
  }
7769
7770
  });
7770
7771
  return () => {
7771
- _optionalChain([simulation, 'optionalAccess', _169 => _169.stop, 'call', _170 => _170()]);
7772
+ _optionalChain([simulation, 'optionalAccess', _170 => _170.stop, 'call', _171 => _171()]);
7772
7773
  };
7773
7774
  }, [
7774
7775
  nodes,
7775
7776
  links,
7776
7777
  colorScale,
7777
7778
  visibleNodeIds,
7778
- _optionalChain([options, 'optionalAccess', _171 => _171.directed]),
7779
- _optionalChain([options, 'optionalAccess', _172 => _172.layout]),
7780
- _optionalChain([options, 'optionalAccess', _173 => _173.layered, 'optionalAccess', _174 => _174.rankdir]),
7781
- _optionalChain([options, 'optionalAccess', _175 => _175.layered, 'optionalAccess', _176 => _176.nodesep]),
7782
- _optionalChain([options, 'optionalAccess', _177 => _177.layered, 'optionalAccess', _178 => _178.ranksep]),
7783
- _optionalChain([options, 'optionalAccess', _179 => _179.layered, 'optionalAccess', _180 => _180.fitContainer]),
7779
+ _optionalChain([options, 'optionalAccess', _172 => _172.directed]),
7780
+ _optionalChain([options, 'optionalAccess', _173 => _173.layout]),
7781
+ _optionalChain([options, 'optionalAccess', _174 => _174.layered, 'optionalAccess', _175 => _175.rankdir]),
7782
+ _optionalChain([options, 'optionalAccess', _176 => _176.layered, 'optionalAccess', _177 => _177.nodesep]),
7783
+ _optionalChain([options, 'optionalAccess', _178 => _178.layered, 'optionalAccess', _179 => _179.ranksep]),
7784
+ _optionalChain([options, 'optionalAccess', _180 => _180.layered, 'optionalAccess', _181 => _181.fitContainer]),
7784
7785
  loadingNodeIds,
7785
7786
  onNodeClick
7786
7787
  ]);
@@ -7968,21 +7969,21 @@ var CurrentUserContext = _react.createContext.call(void 0, void 0);
7968
7969
  var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ children }) => {
7969
7970
  const [dehydratedUser, setDehydratedUser] = _jotai.useAtom.call(void 0, userAtom);
7970
7971
  const matchUrlToModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => {
7971
- const path = _optionalChain([params, 'optionalAccess', _181 => _181.path, 'optionalAccess', _182 => _182.toLowerCase, 'call', _183 => _183()]);
7972
+ const path = _optionalChain([params, 'optionalAccess', _182 => _182.path, 'optionalAccess', _183 => _183.toLowerCase, 'call', _184 => _184()]);
7972
7973
  if (!path) return void 0;
7973
7974
  const moduleKeys = Object.getOwnPropertyNames(_chunkVVJDWQEIjs.Modules).filter(
7974
7975
  (key) => key !== "prototype" && key !== "_factory" && key !== "length" && key !== "name"
7975
7976
  );
7976
7977
  const matchedModuleKey = moduleKeys.find((key) => {
7977
7978
  const descriptor2 = Object.getOwnPropertyDescriptor(_chunkVVJDWQEIjs.Modules, key);
7978
- if (!_optionalChain([descriptor2, 'optionalAccess', _184 => _184.get])) return false;
7979
+ if (!_optionalChain([descriptor2, 'optionalAccess', _185 => _185.get])) return false;
7979
7980
  const selectedModule = descriptor2.get.call(_chunkVVJDWQEIjs.Modules);
7980
- if (!_optionalChain([selectedModule, 'optionalAccess', _185 => _185.pageUrl])) return false;
7981
+ if (!_optionalChain([selectedModule, 'optionalAccess', _186 => _186.pageUrl])) return false;
7981
7982
  return path.startsWith(selectedModule.pageUrl.toLowerCase());
7982
7983
  });
7983
7984
  if (!matchedModuleKey) return void 0;
7984
7985
  const descriptor = Object.getOwnPropertyDescriptor(_chunkVVJDWQEIjs.Modules, matchedModuleKey);
7985
- return _optionalChain([descriptor, 'optionalAccess', _186 => _186.get, 'optionalAccess', _187 => _187.call, 'call', _188 => _188(_chunkVVJDWQEIjs.Modules)]);
7986
+ return _optionalChain([descriptor, 'optionalAccess', _187 => _187.get, 'optionalAccess', _188 => _188.call, 'call', _189 => _189(_chunkVVJDWQEIjs.Modules)]);
7986
7987
  }, "matchUrlToModule");
7987
7988
  const currentUser = _react.useMemo.call(void 0,
7988
7989
  () => dehydratedUser ? _chunkVVJDWQEIjs.rehydrate.call(void 0, _chunkVVJDWQEIjs.Modules.User, dehydratedUser) : null,
@@ -7990,7 +7991,7 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
7990
7991
  );
7991
7992
  const [creditOverride, setCreditOverride] = _react.useState.call(void 0, null);
7992
7993
  const company = _react.useMemo.call(void 0, () => {
7993
- const c = _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _189 => _189.company]), () => ( null));
7994
+ const c = _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _190 => _190.company]), () => ( null));
7994
7995
  if (!c || !creditOverride) return c;
7995
7996
  return Object.assign(Object.create(Object.getPrototypeOf(c)), c, {
7996
7997
  _availableMonthlyCredits: creditOverride.availableMonthlyCredits,
@@ -8004,7 +8005,7 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
8004
8005
  }, "setUser");
8005
8006
  const hasRole = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (roleId) => {
8006
8007
  if (!currentUser) return false;
8007
- return !!_optionalChain([currentUser, 'access', _190 => _190.roles, 'optionalAccess', _191 => _191.some, 'call', _192 => _192((userRole) => userRole.id === roleId)]);
8008
+ return !!_optionalChain([currentUser, 'access', _191 => _191.roles, 'optionalAccess', _192 => _192.some, 'call', _193 => _193((userRole) => userRole.id === roleId)]);
8008
8009
  }, "hasRole");
8009
8010
  const hasAccesToFeature = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (featureIdentifier) => {
8010
8011
  if (hasRole(_chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator)) return true;
@@ -8044,12 +8045,12 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
8044
8045
  try {
8045
8046
  const fullUser = await _chunkVVJDWQEIjs.UserService.findFullUser();
8046
8047
  if (fullUser) {
8047
- if (!_optionalChain([options, 'optionalAccess', _193 => _193.skipCookieUpdate])) {
8048
- await _optionalChain([_chunkVVJDWQEIjs.getTokenHandler.call(void 0, ), 'optionalAccess', _194 => _194.updateToken, 'call', _195 => _195({
8048
+ if (!_optionalChain([options, 'optionalAccess', _194 => _194.skipCookieUpdate])) {
8049
+ await _optionalChain([_chunkVVJDWQEIjs.getTokenHandler.call(void 0, ), 'optionalAccess', _195 => _195.updateToken, 'call', _196 => _196({
8049
8050
  userId: fullUser.id,
8050
- companyId: _optionalChain([fullUser, 'access', _196 => _196.company, 'optionalAccess', _197 => _197.id]),
8051
+ companyId: _optionalChain([fullUser, 'access', _197 => _197.company, 'optionalAccess', _198 => _198.id]),
8051
8052
  roles: fullUser.roles.map((role) => role.id),
8052
- features: _nullishCoalesce(_optionalChain([fullUser, 'access', _198 => _198.company, 'optionalAccess', _199 => _199.features, 'optionalAccess', _200 => _200.map, 'call', _201 => _201((feature) => feature.id)]), () => ( [])),
8053
+ features: _nullishCoalesce(_optionalChain([fullUser, 'access', _199 => _199.company, 'optionalAccess', _200 => _200.features, 'optionalAccess', _201 => _201.map, 'call', _202 => _202((feature) => feature.id)]), () => ( [])),
8053
8054
  modules: fullUser.modules.map((module) => ({
8054
8055
  id: module.id,
8055
8056
  permissions: module.permissions
@@ -8078,18 +8079,18 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
8078
8079
  }, []);
8079
8080
  const isRefreshingRef = _react.useRef.call(void 0, false);
8080
8081
  _react.useEffect.call(void 0, () => {
8081
- if (!socket || !isConnected || !_optionalChain([currentUser, 'optionalAccess', _202 => _202.company, 'optionalAccess', _203 => _203.id])) {
8082
+ if (!socket || !isConnected || !_optionalChain([currentUser, 'optionalAccess', _203 => _203.company, 'optionalAccess', _204 => _204.id])) {
8082
8083
  return;
8083
8084
  }
8084
8085
  const handleCreditsUpdated = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (data) => {
8085
- if (data.companyId !== _optionalChain([currentUser, 'access', _204 => _204.company, 'optionalAccess', _205 => _205.id])) return;
8086
+ if (data.companyId !== _optionalChain([currentUser, 'access', _205 => _205.company, 'optionalAccess', _206 => _206.id])) return;
8086
8087
  setCreditOverride({
8087
8088
  availableMonthlyCredits: data.availableMonthlyCredits,
8088
8089
  availableExtraCredits: data.availableExtraCredits
8089
8090
  });
8090
8091
  }, "handleCreditsUpdated");
8091
8092
  const handleSubscriptionUpdated = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (data) => {
8092
- if (data.companyId === _optionalChain([currentUser, 'access', _206 => _206.company, 'optionalAccess', _207 => _207.id]) && !isRefreshingRef.current) {
8093
+ if (data.companyId === _optionalChain([currentUser, 'access', _207 => _207.company, 'optionalAccess', _208 => _208.id]) && !isRefreshingRef.current) {
8093
8094
  isRefreshingRef.current = true;
8094
8095
  refreshUserRef.current({ skipCookieUpdate: true }).finally(() => {
8095
8096
  isRefreshingRef.current = false;
@@ -8102,7 +8103,7 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
8102
8103
  socket.off("company:credits_updated", handleCreditsUpdated);
8103
8104
  socket.off("company:subscription_updated", handleSubscriptionUpdated);
8104
8105
  };
8105
- }, [socket, isConnected, _optionalChain([currentUser, 'optionalAccess', _208 => _208.company, 'optionalAccess', _209 => _209.id])]);
8106
+ }, [socket, isConnected, _optionalChain([currentUser, 'optionalAccess', _209 => _209.company, 'optionalAccess', _210 => _210.id])]);
8106
8107
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
8107
8108
  CurrentUserContext.Provider,
8108
8109
  {
@@ -8177,7 +8178,7 @@ function AddUserToRoleInternal({ role, refresh }) {
8177
8178
  const data = useDataListRetriever({
8178
8179
  ready: !!company && show,
8179
8180
  retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkVVJDWQEIjs.UserService.findAllUsers(params), "retriever"),
8180
- retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _210 => _210.id]) },
8181
+ retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _211 => _211.id]) },
8181
8182
  module: _chunkVVJDWQEIjs.Modules.User
8182
8183
  });
8183
8184
  _react.useEffect.call(void 0, () => {
@@ -8229,7 +8230,7 @@ function UserAvatarEditor({ user, file, setFile, resetImage, setResetImage }) {
8229
8230
  setFile(files[0]);
8230
8231
  }
8231
8232
  }, [files]);
8232
- const avatarSrc = file ? URL.createObjectURL(file) : _optionalChain([user, 'optionalAccess', _211 => _211.avatar]) || "";
8233
+ const avatarSrc = file ? URL.createObjectURL(file) : _optionalChain([user, 'optionalAccess', _212 => _212.avatar]) || "";
8233
8234
  const dropzone2 = {
8234
8235
  multiple: false,
8235
8236
  maxSize: 100 * 1024 * 1024,
@@ -8246,7 +8247,7 @@ function UserAvatarEditor({ user, file, setFile, resetImage, setResetImage }) {
8246
8247
  onValueChange: setFiles,
8247
8248
  dropzoneOptions: dropzone2,
8248
8249
  className: "h-40 w-40 rounded-full p-0",
8249
- 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,
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', _213 => _213.avatar])) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
8250
8251
  _image2.default,
8251
8252
  {
8252
8253
  src: avatarSrc,
@@ -8258,7 +8259,7 @@ function UserAvatarEditor({ user, file, setFile, resetImage, setResetImage }) {
8258
8259
  ) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.UploadIcon, { className: "my-4 h-8 w-8" }) })
8259
8260
  }
8260
8261
  ),
8261
- !resetImage && (file || _optionalChain([user, 'optionalAccess', _213 => _213.avatar])) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
8262
+ !resetImage && (file || _optionalChain([user, 'optionalAccess', _214 => _214.avatar])) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
8262
8263
  Button,
8263
8264
  {
8264
8265
  className: "",
@@ -8286,7 +8287,7 @@ function UserDeleterInternal({ user, onDeleted, companyId }) {
8286
8287
  const router = _chunkVVJDWQEIjs.useI18nRouter.call(void 0, );
8287
8288
  const _t = _nextintl.useTranslations.call(void 0, );
8288
8289
  let cId;
8289
- if (_optionalChain([currentUser, 'optionalAccess', _214 => _214.roles, 'access', _215 => _215.find, 'call', _216 => _216((role) => role.id === _chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator)]) && companyId) {
8290
+ if (_optionalChain([currentUser, 'optionalAccess', _215 => _215.roles, 'access', _216 => _216.find, 'call', _217 => _217((role) => role.id === _chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator)]) && companyId) {
8290
8291
  cId = companyId;
8291
8292
  } else {
8292
8293
  if (!company) return;
@@ -8349,18 +8350,18 @@ function UserEditorInternal({
8349
8350
  }, [company]);
8350
8351
  const handleDialogOpenChange = _react.useCallback.call(void 0,
8351
8352
  (open) => {
8352
- 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) {
8353
+ if (open && (company || _optionalChain([currentUser, 'optionalAccess', _218 => _218.roles, 'access', _219 => _219.find, 'call', _220 => _220((role) => role.id === _chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator)])) && roles.length === 0) {
8353
8354
  async function fetchRoles() {
8354
8355
  const allRoles = await _chunkVVJDWQEIjs.RoleService.findAllRoles({});
8355
8356
  const availableRoles = allRoles.filter(
8356
- (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]))]))
8357
+ (role) => role.id !== _chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator && (role.requiredFeature === void 0 || _optionalChain([company, 'optionalAccess', _221 => _221.features, 'access', _222 => _222.some, 'call', _223 => _223((feature) => feature.id === _optionalChain([role, 'access', _224 => _224.requiredFeature, 'optionalAccess', _225 => _225.id]))]))
8357
8358
  );
8358
8359
  setRoles(availableRoles);
8359
8360
  }
8360
8361
  _chunk7QVYU63Ejs.__name.call(void 0, fetchRoles, "fetchRoles");
8361
8362
  fetchRoles();
8362
8363
  }
8363
- _optionalChain([onDialogOpenChange, 'optionalCall', _225 => _225(open)]);
8364
+ _optionalChain([onDialogOpenChange, 'optionalCall', _226 => _226(open)]);
8364
8365
  },
8365
8366
  [company, currentUser, roles.length, onDialogOpenChange]
8366
8367
  );
@@ -8399,29 +8400,29 @@ function UserEditorInternal({
8399
8400
  );
8400
8401
  const getDefaultValues = _react.useCallback.call(void 0, () => {
8401
8402
  return {
8402
- id: _optionalChain([user, 'optionalAccess', _226 => _226.id]) || _uuid.v4.call(void 0, ),
8403
- name: _optionalChain([user, 'optionalAccess', _227 => _227.name]) || "",
8404
- title: _optionalChain([user, 'optionalAccess', _228 => _228.title]) || "",
8405
- bio: _optionalChain([user, 'optionalAccess', _229 => _229.bio]) || "",
8406
- email: _optionalChain([user, 'optionalAccess', _230 => _230.email]) || "",
8407
- phone: _optionalChain([user, 'optionalAccess', _231 => _231.phone]) || "",
8403
+ id: _optionalChain([user, 'optionalAccess', _227 => _227.id]) || _uuid.v4.call(void 0, ),
8404
+ name: _optionalChain([user, 'optionalAccess', _228 => _228.name]) || "",
8405
+ title: _optionalChain([user, 'optionalAccess', _229 => _229.title]) || "",
8406
+ bio: _optionalChain([user, 'optionalAccess', _230 => _230.bio]) || "",
8407
+ email: _optionalChain([user, 'optionalAccess', _231 => _231.email]) || "",
8408
+ phone: _optionalChain([user, 'optionalAccess', _232 => _232.phone]) || "",
8408
8409
  password: "",
8409
- roleIds: _optionalChain([user, 'optionalAccess', _232 => _232.roles, 'access', _233 => _233.map, 'call', _234 => _234((role) => role.id)]) || [],
8410
+ roleIds: _optionalChain([user, 'optionalAccess', _233 => _233.roles, 'access', _234 => _234.map, 'call', _235 => _235((role) => role.id)]) || [],
8410
8411
  sendInvitationEmail: false,
8411
- avatar: _optionalChain([user, 'optionalAccess', _235 => _235.avatarUrl]) || ""
8412
+ avatar: _optionalChain([user, 'optionalAccess', _236 => _236.avatarUrl]) || ""
8412
8413
  };
8413
8414
  }, [user]);
8414
8415
  const form = _reacthookform.useForm.call(void 0, {
8415
8416
  resolver: _zod.zodResolver.call(void 0, formSchema),
8416
8417
  defaultValues: getDefaultValues()
8417
8418
  });
8418
- const canChangeRoles = !(_optionalChain([currentUser, 'optionalAccess', _236 => _236.id]) === _optionalChain([user, 'optionalAccess', _237 => _237.id]) && hasRole(_chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator)) && (hasPermissionToModule({ module: _chunkVVJDWQEIjs.Modules.User, action: "update" /* Update */ }) || hasRole(_chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator));
8419
+ const canChangeRoles = !(_optionalChain([currentUser, 'optionalAccess', _237 => _237.id]) === _optionalChain([user, 'optionalAccess', _238 => _238.id]) && hasRole(_chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator)) && (hasPermissionToModule({ module: _chunkVVJDWQEIjs.Modules.User, action: "update" /* Update */ }) || hasRole(_chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator));
8419
8420
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
8420
8421
  EditorSheet,
8421
8422
  {
8422
8423
  form,
8423
8424
  entityType: t(`entities.users`, { count: 1 }),
8424
- entityName: _optionalChain([user, 'optionalAccess', _238 => _238.name]),
8425
+ entityName: _optionalChain([user, 'optionalAccess', _239 => _239.name]),
8425
8426
  isEdit: !!user,
8426
8427
  module: _chunkVVJDWQEIjs.Modules.User,
8427
8428
  propagateChanges,
@@ -8473,11 +8474,11 @@ function UserEditorInternal({
8473
8474
  // can legitimately have no company (the seeded Administrator does), in
8474
8475
  // which case `company` is null here. `company!.id` threw a TypeError
8475
8476
  // and surfaced as a generic "update failed" toast.
8476
- companyId: _optionalChain([company, 'optionalAccess', _239 => _239.id]),
8477
+ companyId: _optionalChain([company, 'optionalAccess', _240 => _240.id]),
8477
8478
  adminCreated
8478
8479
  };
8479
8480
  const updatedUser = user ? await _chunkVVJDWQEIjs.UserService.update(payload) : await _chunkVVJDWQEIjs.UserService.create(payload);
8480
- if (_optionalChain([currentUser, 'optionalAccess', _240 => _240.id]) === updatedUser.id) setUser(updatedUser);
8481
+ if (_optionalChain([currentUser, 'optionalAccess', _241 => _241.id]) === updatedUser.id) setUser(updatedUser);
8481
8482
  return updatedUser;
8482
8483
  },
8483
8484
  onRevalidate,
@@ -8742,7 +8743,7 @@ function EntityMultiSelector({
8742
8743
  if (open) {
8743
8744
  setSearchTerm("");
8744
8745
  requestAnimationFrame(() => {
8745
- _optionalChain([searchInputRef, 'access', _241 => _241.current, 'optionalAccess', _242 => _242.focus, 'call', _243 => _243()]);
8746
+ _optionalChain([searchInputRef, 'access', _242 => _242.current, 'optionalAccess', _243 => _243.focus, 'call', _244 => _244()]);
8746
8747
  });
8747
8748
  }
8748
8749
  }, [open]);
@@ -8759,7 +8760,7 @@ function EntityMultiSelector({
8759
8760
  form.setValue(id, next, { shouldDirty: true, shouldTouch: true });
8760
8761
  const cb = onChangeRef.current;
8761
8762
  if (cb) {
8762
- 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);
8763
+ const fullData = next.map((v) => _optionalChain([options, 'access', _245 => _245.find, 'call', _246 => _246((opt) => opt.id === v.id), 'optionalAccess', _247 => _247.entityData])).filter(Boolean);
8763
8764
  cb(fullData);
8764
8765
  }
8765
8766
  },
@@ -8772,7 +8773,7 @@ function EntityMultiSelector({
8772
8773
  form.setValue(id, next, { shouldDirty: true, shouldTouch: true });
8773
8774
  const cb = onChangeRef.current;
8774
8775
  if (cb) {
8775
- 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);
8776
+ const fullData = next.map((v) => _optionalChain([options, 'access', _248 => _248.find, 'call', _249 => _249((opt) => opt.id === v.id), 'optionalAccess', _250 => _250.entityData])).filter(Boolean);
8776
8777
  cb(fullData);
8777
8778
  }
8778
8779
  },
@@ -8915,11 +8916,11 @@ function UserMultiSelect({
8915
8916
  emptyText: t("ui.search.no_results", { type: t("entities.users", { count: 2 }) }),
8916
8917
  isRequired,
8917
8918
  retriever: (params) => _chunkVVJDWQEIjs.UserService.findAllUsers(params),
8918
- retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _250 => _250.id]) },
8919
+ retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _251 => _251.id]) },
8919
8920
  module: _chunkVVJDWQEIjs.Modules.User,
8920
8921
  getLabel: (user) => user.name,
8921
8922
  toFormValue: (user) => ({ id: user.id, name: user.name, avatar: user.avatar }),
8922
- excludeId: _optionalChain([currentUser, 'optionalAccess', _251 => _251.id]),
8923
+ excludeId: _optionalChain([currentUser, 'optionalAccess', _252 => _252.id]),
8923
8924
  onChange,
8924
8925
  renderOption: (user) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-2", children: [
8925
8926
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatarIcon, { url: user.avatar, name: user.name }),
@@ -9729,7 +9730,7 @@ var DatePickerPopover = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
9729
9730
  function nextDateRange(params) {
9730
9731
  const { current, computed, triggerDate } = params;
9731
9732
  if (!computed) return void 0;
9732
- if (_optionalChain([current, 'optionalAccess', _252 => _252.from]) && _optionalChain([current, 'optionalAccess', _253 => _253.to])) return { from: triggerDate, to: void 0 };
9733
+ if (_optionalChain([current, 'optionalAccess', _253 => _253.from]) && _optionalChain([current, 'optionalAccess', _254 => _254.to])) return { from: triggerDate, to: void 0 };
9733
9734
  return computed;
9734
9735
  }
9735
9736
  _chunk7QVYU63Ejs.__name.call(void 0, nextDateRange, "nextDateRange");
@@ -9749,7 +9750,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
9749
9750
  }, []);
9750
9751
  const [prevRange, setPrevRange] = _react.useState.call(void 0, date);
9751
9752
  _react.useEffect.call(void 0, () => {
9752
- 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())) {
9753
+ if (_optionalChain([date, 'optionalAccess', _255 => _255.from]) && _optionalChain([date, 'optionalAccess', _256 => _256.to]) && date.to > date.from && (_optionalChain([prevRange, 'optionalAccess', _257 => _257.from, 'optionalAccess', _258 => _258.getTime, 'call', _259 => _259()]) !== date.from.getTime() || _optionalChain([prevRange, 'optionalAccess', _260 => _260.to, 'optionalAccess', _261 => _261.getTime, 'call', _262 => _262()]) !== date.to.getTime())) {
9753
9754
  onDateChange(date);
9754
9755
  setPrevRange(date);
9755
9756
  setOpen(false);
@@ -9767,7 +9768,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
9767
9768
  className: _chunkVVJDWQEIjs.cn.call(void 0, "w-[300px] justify-start text-start font-normal", !date && "text-muted-foreground"),
9768
9769
  children: [
9769
9770
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CalendarIcon, {}),
9770
- _optionalChain([date, 'optionalAccess', _262 => _262.from]) ? date.to ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
9771
+ _optionalChain([date, 'optionalAccess', _263 => _263.from]) ? date.to ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
9771
9772
  _datefns.format.call(void 0, date.from, "d MMM yyyy", { locale: dateFnsLocale }),
9772
9773
  " -",
9773
9774
  " ",
@@ -9791,7 +9792,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
9791
9792
  ),
9792
9793
  children: [
9793
9794
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CalendarIcon, {}),
9794
- _optionalChain([date, 'optionalAccess', _263 => _263.from]) ? date.to ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
9795
+ _optionalChain([date, 'optionalAccess', _264 => _264.from]) ? date.to ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
9795
9796
  _datefns.format.call(void 0, date.from, "d MMM yyyy", { locale: dateFnsLocale }),
9796
9797
  " -",
9797
9798
  " ",
@@ -9805,7 +9806,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
9805
9806
  Calendar,
9806
9807
  {
9807
9808
  mode: "range",
9808
- defaultMonth: _nullishCoalesce(_optionalChain([date, 'optionalAccess', _264 => _264.from]), () => ( (showPreviousMonth ? new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth() - 1, 1) : void 0))),
9809
+ defaultMonth: _nullishCoalesce(_optionalChain([date, 'optionalAccess', _265 => _265.from]), () => ( (showPreviousMonth ? new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth() - 1, 1) : void 0))),
9809
9810
  selected: date,
9810
9811
  onSelect: handleSelect,
9811
9812
  numberOfMonths: 2
@@ -9880,31 +9881,31 @@ function useEditorDialog(isFormDirty, options) {
9880
9881
  }, []);
9881
9882
  _react.useEffect.call(void 0, () => {
9882
9883
  if (ignoreTrueFromParent.current) {
9883
- if (_optionalChain([options, 'optionalAccess', _265 => _265.dialogOpen]) === true) return;
9884
- if (_optionalChain([options, 'optionalAccess', _266 => _266.dialogOpen]) === false) ignoreTrueFromParent.current = false;
9884
+ if (_optionalChain([options, 'optionalAccess', _266 => _266.dialogOpen]) === true) return;
9885
+ if (_optionalChain([options, 'optionalAccess', _267 => _267.dialogOpen]) === false) ignoreTrueFromParent.current = false;
9885
9886
  }
9886
- if (_optionalChain([options, 'optionalAccess', _267 => _267.dialogOpen]) !== void 0 && options.dialogOpen !== open) {
9887
+ if (_optionalChain([options, 'optionalAccess', _268 => _268.dialogOpen]) !== void 0 && options.dialogOpen !== open) {
9887
9888
  syncingFromProp.current = true;
9888
9889
  setOpen(options.dialogOpen);
9889
9890
  }
9890
- }, [_optionalChain([options, 'optionalAccess', _268 => _268.dialogOpen])]);
9891
- const onDialogOpenChangeRef = _react.useRef.call(void 0, _optionalChain([options, 'optionalAccess', _269 => _269.onDialogOpenChange]));
9892
- onDialogOpenChangeRef.current = _optionalChain([options, 'optionalAccess', _270 => _270.onDialogOpenChange]);
9891
+ }, [_optionalChain([options, 'optionalAccess', _269 => _269.dialogOpen])]);
9892
+ const onDialogOpenChangeRef = _react.useRef.call(void 0, _optionalChain([options, 'optionalAccess', _270 => _270.onDialogOpenChange]));
9893
+ onDialogOpenChangeRef.current = _optionalChain([options, 'optionalAccess', _271 => _271.onDialogOpenChange]);
9893
9894
  _react.useEffect.call(void 0, () => {
9894
9895
  if (syncingFromProp.current) {
9895
9896
  syncingFromProp.current = false;
9896
9897
  return;
9897
9898
  }
9898
- _optionalChain([onDialogOpenChangeRef, 'access', _271 => _271.current, 'optionalCall', _272 => _272(open)]);
9899
+ _optionalChain([onDialogOpenChangeRef, 'access', _272 => _272.current, 'optionalCall', _273 => _273(open)]);
9899
9900
  }, [open]);
9900
9901
  const lastForceShow = _react.useRef.call(void 0, void 0);
9901
9902
  _react.useEffect.call(void 0, () => {
9902
- if (_optionalChain([options, 'optionalAccess', _273 => _273.forceShow]) && lastForceShow.current !== true) setOpen(true);
9903
- lastForceShow.current = _optionalChain([options, 'optionalAccess', _274 => _274.forceShow]);
9904
- }, [_optionalChain([options, 'optionalAccess', _275 => _275.forceShow])]);
9903
+ if (_optionalChain([options, 'optionalAccess', _274 => _274.forceShow]) && lastForceShow.current !== true) setOpen(true);
9904
+ lastForceShow.current = _optionalChain([options, 'optionalAccess', _275 => _275.forceShow]);
9905
+ }, [_optionalChain([options, 'optionalAccess', _276 => _276.forceShow])]);
9905
9906
  _react.useEffect.call(void 0, () => {
9906
9907
  if (!open) {
9907
- if (_optionalChain([options, 'optionalAccess', _276 => _276.onClose])) options.onClose();
9908
+ if (_optionalChain([options, 'optionalAccess', _277 => _277.onClose])) options.onClose();
9908
9909
  }
9909
9910
  }, [open]);
9910
9911
  const handleOpenChange = _react.useCallback.call(void 0,
@@ -10030,7 +10031,7 @@ function EditorSheet({
10030
10031
  const next = onReset();
10031
10032
  form.reset(next);
10032
10033
  if (isEdit) seeded.current = JSON.stringify(next);
10033
- _optionalChain([onClose, 'optionalCall', _277 => _277()]);
10034
+ _optionalChain([onClose, 'optionalCall', _278 => _278()]);
10034
10035
  }
10035
10036
  }, [open]);
10036
10037
  const wrappedOnSubmit = _react.useCallback.call(void 0,
@@ -10044,11 +10045,11 @@ function EditorSheet({
10044
10045
  if (onSuccess) {
10045
10046
  await onSuccess();
10046
10047
  } else if (result) {
10047
- _optionalChain([onRevalidate, 'optionalCall', _278 => _278(generateUrl({ page: module, id: result.id, language: "[locale]" }))]);
10048
+ _optionalChain([onRevalidate, 'optionalCall', _279 => _279(generateUrl({ page: module, id: result.id, language: "[locale]" }))]);
10048
10049
  if (propagateChanges) {
10049
10050
  propagateChanges(result);
10050
10051
  } else {
10051
- _optionalChain([onNavigate, 'optionalCall', _279 => _279(generateUrl({ page: module, id: result.id }))]);
10052
+ _optionalChain([onNavigate, 'optionalCall', _280 => _280(generateUrl({ page: module, id: result.id }))]);
10052
10053
  }
10053
10054
  }
10054
10055
  } catch (error) {
@@ -10271,7 +10272,7 @@ function EntitySelector({
10271
10272
  {
10272
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" : ""}`,
10273
10274
  children: [
10274
- /* @__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 }),
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', _281 => _281.name]), () => ( "")) : placeholder }),
10275
10276
  hasValue(effectiveValue) && !disabled && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
10276
10277
  _lucidereact.CircleX,
10277
10278
  {
@@ -10432,7 +10433,7 @@ var FileUploader = _react.forwardRef.call(void 0,
10432
10433
  movePrev();
10433
10434
  } else if (e.key === "Enter" || e.key === "Space") {
10434
10435
  if (activeIndex === -1) {
10435
- _optionalChain([dropzoneState, 'access', _281 => _281.inputRef, 'access', _282 => _282.current, 'optionalAccess', _283 => _283.click, 'call', _284 => _284()]);
10436
+ _optionalChain([dropzoneState, 'access', _282 => _282.inputRef, 'access', _283 => _283.current, 'optionalAccess', _284 => _284.click, 'call', _285 => _285()]);
10436
10437
  }
10437
10438
  } else if (e.key === "Delete" || e.key === "Backspace") {
10438
10439
  if (activeIndex !== -1) {
@@ -10478,13 +10479,13 @@ var FileUploader = _react.forwardRef.call(void 0,
10478
10479
  }
10479
10480
  if (rejectedFiles.length > 0) {
10480
10481
  for (let i = 0; i < rejectedFiles.length; i++) {
10481
- if (_optionalChain([rejectedFiles, 'access', _285 => _285[i], 'access', _286 => _286.errors, 'access', _287 => _287[0], 'optionalAccess', _288 => _288.code]) === "file-too-large") {
10482
+ if (_optionalChain([rejectedFiles, 'access', _286 => _286[i], 'access', _287 => _287.errors, 'access', _288 => _288[0], 'optionalAccess', _289 => _289.code]) === "file-too-large") {
10482
10483
  _chunkVVJDWQEIjs.showError.call(void 0, t("common.errors.file"), {
10483
10484
  description: t(`common.errors.file_max`, { size: maxSize / 1024 / 1024 })
10484
10485
  });
10485
10486
  break;
10486
10487
  }
10487
- if (_optionalChain([rejectedFiles, 'access', _289 => _289[i], 'access', _290 => _290.errors, 'access', _291 => _291[0], 'optionalAccess', _292 => _292.message])) {
10488
+ if (_optionalChain([rejectedFiles, 'access', _290 => _290[i], 'access', _291 => _291.errors, 'access', _292 => _292[0], 'optionalAccess', _293 => _293.message])) {
10488
10489
  _chunkVVJDWQEIjs.showError.call(void 0, t(`common.errors.file`), {
10489
10490
  description: rejectedFiles[i].errors[0].message
10490
10491
  });
@@ -10683,7 +10684,7 @@ FileInput.displayName = "FileInput";
10683
10684
  var _dynamic = require('next/dynamic'); var _dynamic2 = _interopRequireDefault(_dynamic);
10684
10685
 
10685
10686
 
10686
- var BlockNoteEditor = _dynamic2.default.call(void 0, () => Promise.resolve().then(() => _interopRequireWildcard(require("./BlockNoteEditor-OP7LWYOG.js"))), {
10687
+ var BlockNoteEditor = _dynamic2.default.call(void 0, () => Promise.resolve().then(() => _interopRequireWildcard(require("./BlockNoteEditor-KO6YFNIU.js"))), {
10687
10688
  ssr: false
10688
10689
  });
10689
10690
  var BlockNoteEditorContainer = React2.default.memo(/* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, function EditorContainer(props) {
@@ -10767,7 +10768,7 @@ function FormBlockNote({
10767
10768
  } else {
10768
10769
  field.onChange(content);
10769
10770
  }
10770
- _optionalChain([onEmptyChange, 'optionalCall', _293 => _293(isEmpty)]);
10771
+ _optionalChain([onEmptyChange, 'optionalCall', _294 => _294(isEmpty)]);
10771
10772
  },
10772
10773
  placeholder,
10773
10774
  bordered: true,
@@ -11434,11 +11435,11 @@ function FormPlaceAutocomplete({
11434
11435
  const data = await response.json();
11435
11436
  if (data.suggestions) {
11436
11437
  const formattedSuggestions = data.suggestions.map((suggestion) => ({
11437
- place_id: _optionalChain([suggestion, 'access', _294 => _294.placePrediction, 'optionalAccess', _295 => _295.placeId]) || "",
11438
- description: _optionalChain([suggestion, 'access', _296 => _296.placePrediction, 'optionalAccess', _297 => _297.text, 'optionalAccess', _298 => _298.text]) || "",
11438
+ place_id: _optionalChain([suggestion, 'access', _295 => _295.placePrediction, 'optionalAccess', _296 => _296.placeId]) || "",
11439
+ description: _optionalChain([suggestion, 'access', _297 => _297.placePrediction, 'optionalAccess', _298 => _298.text, 'optionalAccess', _299 => _299.text]) || "",
11439
11440
  structured_formatting: {
11440
- main_text: _optionalChain([suggestion, 'access', _299 => _299.placePrediction, 'optionalAccess', _300 => _300.structuredFormat, 'optionalAccess', _301 => _301.mainText, 'optionalAccess', _302 => _302.text]) || "",
11441
- secondary_text: _optionalChain([suggestion, 'access', _303 => _303.placePrediction, 'optionalAccess', _304 => _304.structuredFormat, 'optionalAccess', _305 => _305.secondaryText, 'optionalAccess', _306 => _306.text]) || ""
11441
+ main_text: _optionalChain([suggestion, 'access', _300 => _300.placePrediction, 'optionalAccess', _301 => _301.structuredFormat, 'optionalAccess', _302 => _302.mainText, 'optionalAccess', _303 => _303.text]) || "",
11442
+ secondary_text: _optionalChain([suggestion, 'access', _304 => _304.placePrediction, 'optionalAccess', _305 => _305.structuredFormat, 'optionalAccess', _306 => _306.secondaryText, 'optionalAccess', _307 => _307.text]) || ""
11442
11443
  }
11443
11444
  }));
11444
11445
  setSuggestions(formattedSuggestions);
@@ -11585,8 +11586,8 @@ function FormPlaceAutocomplete({
11585
11586
  className: "hover:bg-muted cursor-pointer px-3 py-2 text-sm",
11586
11587
  onClick: () => handleSuggestionSelect(suggestion),
11587
11588
  children: [
11588
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "font-medium", children: _optionalChain([suggestion, 'access', _307 => _307.structured_formatting, 'optionalAccess', _308 => _308.main_text]) }),
11589
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground", children: _optionalChain([suggestion, 'access', _309 => _309.structured_formatting, 'optionalAccess', _310 => _310.secondary_text]) })
11589
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "font-medium", children: _optionalChain([suggestion, 'access', _308 => _308.structured_formatting, 'optionalAccess', _309 => _309.main_text]) }),
11590
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground", children: _optionalChain([suggestion, 'access', _310 => _310.structured_formatting, 'optionalAccess', _311 => _311.secondary_text]) })
11590
11591
  ]
11591
11592
  },
11592
11593
  suggestion.place_id || index
@@ -11634,7 +11635,7 @@ function FormSelect({
11634
11635
  disabled,
11635
11636
  "data-testid": testId,
11636
11637
  children: [
11637
- /* @__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, () => ( "")) }) }),
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', _312 => _312.find, 'call', _313 => _313((v) => v.id === field.value), 'optionalAccess', _314 => _314.text]) : _nullishCoalesce(placeholder, () => ( "")) }) }),
11638
11639
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, SelectContent, { children: [
11639
11640
  allowEmpty && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: EMPTY_VALUE, className: "text-muted-foreground", children: _nullishCoalesce(placeholder, () => ( "")) }),
11640
11641
  values.map((type) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: type.id, children: type.text }, type.id))
@@ -11814,7 +11815,7 @@ var FilePreviewItem = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ fi
11814
11815
  setObjectUrl(null);
11815
11816
  }, [file]);
11816
11817
  const getFileIcon = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
11817
- 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()]);
11818
+ const extension = _optionalChain([file, 'access', _315 => _315.name, 'access', _316 => _316.split, 'call', _317 => _317("."), 'access', _318 => _318.pop, 'call', _319 => _319(), 'optionalAccess', _320 => _320.toLowerCase, 'call', _321 => _321()]);
11818
11819
  if (file.type.startsWith("image/")) {
11819
11820
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.FileImageIcon, { className: "text-muted h-10 w-10 sm:h-12 sm:w-12" });
11820
11821
  }
@@ -11864,7 +11865,7 @@ function UserAvatar({ user, className, showFull, showLink, showTooltip = true })
11864
11865
  }, "getInitials");
11865
11866
  const getAvatar = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
11866
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: [
11867
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { className: "object-cover", src: _optionalChain([user, 'optionalAccess', _321 => _321.avatar]) }),
11868
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { className: "object-cover", src: _optionalChain([user, 'optionalAccess', _322 => _322.avatar]) }),
11868
11869
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { children: getInitials3(user.name) })
11869
11870
  ] }) });
11870
11871
  }, "getAvatar");
@@ -12070,7 +12071,7 @@ var useUserTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0,
12070
12071
  })
12071
12072
  };
12072
12073
  const columns = _react.useMemo.call(void 0, () => {
12073
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _322 => _322[field], 'optionalCall', _323 => _323()])).filter((col) => col !== void 0);
12074
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _323 => _323[field], 'optionalCall', _324 => _324()])).filter((col) => col !== void 0);
12074
12075
  }, [params.fields, fieldColumnMap, t, generateUrl]);
12075
12076
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
12076
12077
  }, "useUserTableStructure");
@@ -12185,10 +12186,10 @@ function UserSelector({ id, form, label, placeholder, onChange, isRequired = fal
12185
12186
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between", children: [
12186
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: [
12187
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: [
12188
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { src: _optionalChain([field, 'access', _324 => _324.value, 'optionalAccess', _325 => _325.avatar]) }),
12189
- /* @__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" })
12189
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { src: _optionalChain([field, 'access', _325 => _325.value, 'optionalAccess', _326 => _326.avatar]) }),
12190
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { children: _optionalChain([field, 'access', _327 => _327.value, 'optionalAccess', _328 => _328.name]) ? _optionalChain([field, 'access', _329 => _329.value, 'optionalAccess', _330 => _330.name, 'access', _331 => _331.split, 'call', _332 => _332(" "), 'access', _333 => _333.map, 'call', _334 => _334((name) => name.charAt(0).toUpperCase())]) : "X" })
12190
12191
  ] }) }),
12191
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _nullishCoalesce(_optionalChain([field, 'access', _334 => _334.value, 'optionalAccess', _335 => _335.name]), () => ( "")) })
12192
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _nullishCoalesce(_optionalChain([field, 'access', _335 => _335.value, 'optionalAccess', _336 => _336.name]), () => ( "")) })
12192
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 }) }))) }) }) }),
12193
12194
  field.value && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12194
12195
  _lucidereact.CircleX,
@@ -12402,7 +12403,7 @@ function UserContent({ user }) {
12402
12403
  const updated = await _chunkVVJDWQEIjs.UserService.patchAvatar({ id: user.id, avatar: imageKey });
12403
12404
  setUser(updated);
12404
12405
  },
12405
- companyId: _nullishCoalesce(_optionalChain([company, 'optionalAccess', _336 => _336.id]), () => ( "")),
12406
+ companyId: _nullishCoalesce(_optionalChain([company, 'optionalAccess', _337 => _337.id]), () => ( "")),
12406
12407
  className: "h-24 w-24",
12407
12408
  fallbackClassName: "text-2xl"
12408
12409
  }
@@ -12558,7 +12559,7 @@ function CompanyUsersList({ isDeleted, fullWidth }) {
12558
12559
  const data = useDataListRetriever({
12559
12560
  ready: !!company,
12560
12561
  retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkVVJDWQEIjs.UserService.findAllUsers(params), "retriever"),
12561
- retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _337 => _337.id]), isDeleted },
12562
+ retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _338 => _338.id]), isDeleted },
12562
12563
  module: _chunkVVJDWQEIjs.Modules.User
12563
12564
  });
12564
12565
  _react.useEffect.call(void 0, () => {
@@ -12666,11 +12667,11 @@ function UserListInAdd({ data, existingUsers, setSelectedUser, setLevelOpen }) {
12666
12667
  value: user.id,
12667
12668
  onClick: (_e) => {
12668
12669
  setSelectedUser(user);
12669
- _optionalChain([setLevelOpen, 'optionalCall', _338 => _338(true)]);
12670
+ _optionalChain([setLevelOpen, 'optionalCall', _339 => _339(true)]);
12670
12671
  },
12671
12672
  onSelect: (_e) => {
12672
12673
  setSelectedUser(user);
12673
- _optionalChain([setLevelOpen, 'optionalCall', _339 => _339(true)]);
12674
+ _optionalChain([setLevelOpen, 'optionalCall', _340 => _340(true)]);
12674
12675
  },
12675
12676
  children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between px-4 py-1", children: [
12676
12677
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatar, { user }),
@@ -12811,7 +12812,7 @@ function CompanyContent({ company, actions }) {
12811
12812
  company.legal_address
12812
12813
  ] }),
12813
12814
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-1", children: [
12814
- _optionalChain([company, 'access', _340 => _340.configurations, 'optionalAccess', _341 => _341.country]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-muted-foreground text-sm", children: [
12815
+ _optionalChain([company, 'access', _341 => _341.configurations, 'optionalAccess', _342 => _342.country]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-muted-foreground text-sm", children: [
12815
12816
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "font-medium", children: [
12816
12817
  t("features.configuration.country"),
12817
12818
  ":"
@@ -12819,7 +12820,7 @@ function CompanyContent({ company, actions }) {
12819
12820
  " ",
12820
12821
  company.configurations.country
12821
12822
  ] }),
12822
- _optionalChain([company, 'access', _342 => _342.configurations, 'optionalAccess', _343 => _343.currency]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-muted-foreground text-sm", children: [
12823
+ _optionalChain([company, 'access', _343 => _343.configurations, 'optionalAccess', _344 => _344.currency]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-muted-foreground text-sm", children: [
12823
12824
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "font-medium", children: [
12824
12825
  t("features.configuration.currency"),
12825
12826
  ":"
@@ -13065,7 +13066,7 @@ function CompanyEditorInternal({
13065
13066
  _chunk7QVYU63Ejs.__name.call(void 0, fetchFeatures, "fetchFeatures");
13066
13067
  fetchFeatures();
13067
13068
  }
13068
- _optionalChain([onDialogOpenChange, 'optionalCall', _344 => _344(open)]);
13069
+ _optionalChain([onDialogOpenChange, 'optionalCall', _345 => _345(open)]);
13069
13070
  },
13070
13071
  [features.length, canAccessFeatures, hasRole, onDialogOpenChange]
13071
13072
  );
@@ -13110,12 +13111,12 @@ function CompanyEditorInternal({
13110
13111
  );
13111
13112
  const getDefaultValues = _react.useCallback.call(void 0, () => {
13112
13113
  return {
13113
- id: _optionalChain([company, 'optionalAccess', _345 => _345.id]) || _uuid.v4.call(void 0, ),
13114
- name: _optionalChain([company, 'optionalAccess', _346 => _346.name]) || "",
13115
- featureIds: _optionalChain([company, 'optionalAccess', _347 => _347.features, 'access', _348 => _348.map, 'call', _349 => _349((feature) => feature.id)]) || [],
13116
- moduleIds: _optionalChain([company, 'optionalAccess', _350 => _350.modules, 'access', _351 => _351.map, 'call', _352 => _352((module) => module.id)]) || [],
13117
- logo: _optionalChain([company, 'optionalAccess', _353 => _353.logo]) || "",
13118
- legal_address: _optionalChain([company, 'optionalAccess', _354 => _354.legal_address]) || ""
13114
+ id: _optionalChain([company, 'optionalAccess', _346 => _346.id]) || _uuid.v4.call(void 0, ),
13115
+ name: _optionalChain([company, 'optionalAccess', _347 => _347.name]) || "",
13116
+ featureIds: _optionalChain([company, 'optionalAccess', _348 => _348.features, 'access', _349 => _349.map, 'call', _350 => _350((feature) => feature.id)]) || [],
13117
+ moduleIds: _optionalChain([company, 'optionalAccess', _351 => _351.modules, 'access', _352 => _352.map, 'call', _353 => _353((module) => module.id)]) || [],
13118
+ logo: _optionalChain([company, 'optionalAccess', _354 => _354.logo]) || "",
13119
+ legal_address: _optionalChain([company, 'optionalAccess', _355 => _355.legal_address]) || ""
13119
13120
  };
13120
13121
  }, [company]);
13121
13122
  const form = _reacthookform.useForm.call(void 0, {
@@ -13127,7 +13128,7 @@ function CompanyEditorInternal({
13127
13128
  {
13128
13129
  form,
13129
13130
  entityType: t(`entities.companies`, { count: 1 }),
13130
- entityName: _optionalChain([company, 'optionalAccess', _355 => _355.name]),
13131
+ entityName: _optionalChain([company, 'optionalAccess', _356 => _356.name]),
13131
13132
  isEdit: !!company,
13132
13133
  module: _chunkVVJDWQEIjs.Modules.Company,
13133
13134
  propagateChanges,
@@ -13152,7 +13153,7 @@ function CompanyEditorInternal({
13152
13153
  throw new Error(t("company.fiscal_data_invalid"));
13153
13154
  }
13154
13155
  const payload = {
13155
- id: _nullishCoalesce(_optionalChain([company, 'optionalAccess', _356 => _356.id]), () => ( _uuid.v4.call(void 0, ))),
13156
+ id: _nullishCoalesce(_optionalChain([company, 'optionalAccess', _357 => _357.id]), () => ( _uuid.v4.call(void 0, ))),
13156
13157
  name: values.name,
13157
13158
  logo: files && contentType ? values.logo : void 0,
13158
13159
  featureIds: values.featureIds,
@@ -13183,14 +13184,14 @@ function CompanyEditorInternal({
13183
13184
  dialogOpen,
13184
13185
  onDialogOpenChange: handleDialogOpenChange,
13185
13186
  children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full items-start justify-between gap-x-4", children: [
13186
- /* @__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,
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', _358 => _358.logo]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
13187
13188
  _image2.default,
13188
13189
  {
13189
- src: file ? URL.createObjectURL(file) : _optionalChain([company, 'optionalAccess', _358 => _358.logo]) || "",
13190
+ src: file ? URL.createObjectURL(file) : _optionalChain([company, 'optionalAccess', _359 => _359.logo]) || "",
13190
13191
  alt: t("company.logo_alt"),
13191
13192
  width: 200,
13192
13193
  height: 200,
13193
- unoptimized: _chunkVVJDWQEIjs.isRemoteImageSrc.call(void 0, file ? void 0 : _optionalChain([company, 'optionalAccess', _359 => _359.logo]))
13194
+ unoptimized: _chunkVVJDWQEIjs.isRemoteImageSrc.call(void 0, file ? void 0 : _optionalChain([company, 'optionalAccess', _360 => _360.logo]))
13194
13195
  }
13195
13196
  ) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
13196
13197
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.UploadIcon, { className: "my-4 h-8 w-8" }),
@@ -13221,7 +13222,7 @@ function CompanyEditorInternal({
13221
13222
  }
13222
13223
  ),
13223
13224
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SectionHeader, { className: "mt-2", children: t(`company.sections.fiscal_data`) }),
13224
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ItalianFiscalData_default, { ref: fiscalRef, initialData: parseFiscalData(_optionalChain([company, 'optionalAccess', _360 => _360.fiscal_data])) })
13225
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ItalianFiscalData_default, { ref: fiscalRef, initialData: parseFiscalData(_optionalChain([company, 'optionalAccess', _361 => _361.fiscal_data])) })
13225
13226
  ] }),
13226
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 }) }) })
13227
13228
  ] })
@@ -13587,7 +13588,7 @@ function NotificationToast(notification, t, generateUrl, reouter, locale) {
13587
13588
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col", children: [
13588
13589
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
13589
13590
  strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: chunks }), "strong"),
13590
- actor: _nullishCoalesce(_optionalChain([data, 'access', _361 => _361.actor, 'optionalAccess', _362 => _362.name]), () => ( "")),
13591
+ actor: _nullishCoalesce(_optionalChain([data, 'access', _362 => _362.actor, 'optionalAccess', _363 => _363.name]), () => ( "")),
13591
13592
  title: data.title,
13592
13593
  message: _nullishCoalesce(notification.message, () => ( ""))
13593
13594
  }) }),
@@ -13625,7 +13626,7 @@ function NotificationMenuItem({ notification, closePopover }) {
13625
13626
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex min-w-0 flex-1 flex-col", children: [
13626
13627
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-foreground text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
13627
13628
  strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { className: "font-medium", children: chunks }), "strong"),
13628
- actor: _nullishCoalesce(_optionalChain([data, 'access', _363 => _363.actor, 'optionalAccess', _364 => _364.name]), () => ( "")),
13629
+ actor: _nullishCoalesce(_optionalChain([data, 'access', _364 => _364.actor, 'optionalAccess', _365 => _365.name]), () => ( "")),
13629
13630
  title: data.title,
13630
13631
  message: _nullishCoalesce(notification.message, () => ( ""))
13631
13632
  }) }),
@@ -13696,7 +13697,7 @@ var NotificationContextProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(v
13696
13697
  _react.useEffect.call(void 0, () => {
13697
13698
  if (hasInitiallyLoaded || !currentUser) return;
13698
13699
  if (_chunkG4JR3SFVjs.isRolesConfigured.call(void 0, )) {
13699
- const isAdmin = _optionalChain([currentUser, 'access', _365 => _365.roles, 'optionalAccess', _366 => _366.some, 'call', _367 => _367((role) => role.id === _chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator)]);
13700
+ const isAdmin = _optionalChain([currentUser, 'access', _366 => _366.roles, 'optionalAccess', _367 => _367.some, 'call', _368 => _368((role) => role.id === _chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator)]);
13700
13701
  if (isAdmin) {
13701
13702
  setHasInitiallyLoaded(true);
13702
13703
  return;
@@ -13882,7 +13883,7 @@ function OnboardingProvider({
13882
13883
  const id = activeTourIdRef.current;
13883
13884
  cleanupRoots();
13884
13885
  resetState();
13885
- if (id) _optionalChain([onTourEnd, 'optionalCall', _368 => _368(id, reason)]);
13886
+ if (id) _optionalChain([onTourEnd, 'optionalCall', _369 => _369(id, reason)]);
13886
13887
  },
13887
13888
  [cleanupRoots, resetState, onTourEnd]
13888
13889
  );
@@ -13895,14 +13896,14 @@ function OnboardingProvider({
13895
13896
  cleanupRoots();
13896
13897
  resetState();
13897
13898
  }, [cleanupRoots, resetState, teardown]);
13898
- const nextStep = _react.useCallback.call(void 0, () => _optionalChain([driverRef, 'access', _369 => _369.current, 'optionalAccess', _370 => _370.moveNext, 'call', _371 => _371()]), []);
13899
- const previousStep = _react.useCallback.call(void 0, () => _optionalChain([driverRef, 'access', _372 => _372.current, 'optionalAccess', _373 => _373.movePrevious, 'call', _374 => _374()]), []);
13900
- const goToStep = _react.useCallback.call(void 0, (index) => _optionalChain([driverRef, 'access', _375 => _375.current, 'optionalAccess', _376 => _376.moveTo, 'call', _377 => _377(index)]), []);
13899
+ const nextStep = _react.useCallback.call(void 0, () => _optionalChain([driverRef, 'access', _370 => _370.current, 'optionalAccess', _371 => _371.moveNext, 'call', _372 => _372()]), []);
13900
+ const previousStep = _react.useCallback.call(void 0, () => _optionalChain([driverRef, 'access', _373 => _373.current, 'optionalAccess', _374 => _374.movePrevious, 'call', _375 => _375()]), []);
13901
+ const goToStep = _react.useCallback.call(void 0, (index) => _optionalChain([driverRef, 'access', _376 => _376.current, 'optionalAccess', _377 => _377.moveTo, 'call', _378 => _378(index)]), []);
13901
13902
  const startTour = _react.useCallback.call(void 0,
13902
13903
  (tourId, steps) => {
13903
13904
  if (typeof window === "undefined") return;
13904
13905
  if (driverRef.current) closeTour();
13905
- const tourSteps = _nullishCoalesce(steps, () => ( _optionalChain([tours, 'access', _378 => _378.find, 'call', _379 => _379((t) => t.id === tourId), 'optionalAccess', _380 => _380.steps])));
13906
+ const tourSteps = _nullishCoalesce(steps, () => ( _optionalChain([tours, 'access', _379 => _379.find, 'call', _380 => _380((t) => t.id === tourId), 'optionalAccess', _381 => _381.steps])));
13906
13907
  if (!tourSteps || tourSteps.length === 0) {
13907
13908
  console.warn(`No steps found for tour: ${tourId}`);
13908
13909
  return;
@@ -13913,13 +13914,13 @@ function OnboardingProvider({
13913
13914
  endReasonRef.current = "dismissed";
13914
13915
  const move = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (direction, from) => {
13915
13916
  const target = tourSteps[direction === "next" ? from + 1 : from - 1];
13916
- 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");
13917
- if (_optionalChain([target, 'optionalAccess', _387 => _387.showDelay])) setTimeout(go, target.showDelay);
13917
+ const go = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => direction === "next" ? _optionalChain([driverRef, 'access', _382 => _382.current, 'optionalAccess', _383 => _383.moveNext, 'call', _384 => _384()]) : _optionalChain([driverRef, 'access', _385 => _385.current, 'optionalAccess', _386 => _386.movePrevious, 'call', _387 => _387()]), "go");
13918
+ if (_optionalChain([target, 'optionalAccess', _388 => _388.showDelay])) setTimeout(go, target.showDelay);
13918
13919
  else go();
13919
13920
  }, "move");
13920
13921
  const end = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (reason) => {
13921
13922
  endReasonRef.current = reason;
13922
- _optionalChain([driverRef, 'access', _388 => _388.current, 'optionalAccess', _389 => _389.destroy, 'call', _390 => _390()]);
13923
+ _optionalChain([driverRef, 'access', _389 => _389.current, 'optionalAccess', _390 => _390.destroy, 'call', _391 => _391()]);
13923
13924
  teardown(reason);
13924
13925
  }, "end");
13925
13926
  const driveSteps = tourSteps.map((stepConfig, index) => {
@@ -13961,10 +13962,10 @@ function OnboardingProvider({
13961
13962
  onHighlightStarted: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
13962
13963
  setIsTourActive(true);
13963
13964
  setCurrentStepIndex(index);
13964
- _optionalChain([stepConfig, 'access', _391 => _391.onShow, 'optionalCall', _392 => _392()]);
13965
+ _optionalChain([stepConfig, 'access', _392 => _392.onShow, 'optionalCall', _393 => _393()]);
13965
13966
  }, "onHighlightStarted"),
13966
13967
  onDeselected: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
13967
- _optionalChain([stepConfig, 'access', _393 => _393.onHide, 'optionalCall', _394 => _394()]);
13968
+ _optionalChain([stepConfig, 'access', _394 => _394.onHide, 'optionalCall', _395 => _395()]);
13968
13969
  const root = rootsRef.current.get(index);
13969
13970
  if (root) {
13970
13971
  rootsRef.current.delete(index);
@@ -13992,7 +13993,7 @@ function OnboardingProvider({
13992
13993
  );
13993
13994
  _react.useEffect.call(void 0, () => {
13994
13995
  return () => {
13995
- _optionalChain([driverRef, 'access', _395 => _395.current, 'optionalAccess', _396 => _396.destroy, 'call', _397 => _397()]);
13996
+ _optionalChain([driverRef, 'access', _396 => _396.current, 'optionalAccess', _397 => _397.destroy, 'call', _398 => _398()]);
13996
13997
  cleanupRoots();
13997
13998
  };
13998
13999
  }, [cleanupRoots]);
@@ -14125,7 +14126,7 @@ function HowToMultiSelector({
14125
14126
  retriever: (params) => _chunkVVJDWQEIjs.HowToService.findMany(params),
14126
14127
  module: _chunkVVJDWQEIjs.Modules.HowTo,
14127
14128
  getLabel: (howTo) => howTo.name,
14128
- excludeId: _optionalChain([currentHowTo, 'optionalAccess', _398 => _398.id]),
14129
+ excludeId: _optionalChain([currentHowTo, 'optionalAccess', _399 => _399.id]),
14129
14130
  onChange
14130
14131
  }
14131
14132
  );
@@ -14233,17 +14234,17 @@ function HowToEditorInternal({
14233
14234
  );
14234
14235
  const getDefaultValues = _react.useCallback.call(void 0,
14235
14236
  () => ({
14236
- id: _optionalChain([howTo, 'optionalAccess', _399 => _399.id]) || _uuid.v4.call(void 0, ),
14237
- name: _optionalChain([howTo, 'optionalAccess', _400 => _400.name]) || "",
14238
- description: _optionalChain([howTo, 'optionalAccess', _401 => _401.description]) || [],
14239
- pages: _chunkVVJDWQEIjs.HowTo.parsePagesFromString(_optionalChain([howTo, 'optionalAccess', _402 => _402.pages])),
14240
- howToType: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _403 => _403.howToType]), () => ( "how-to")),
14241
- slug: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _404 => _404.slug]), () => ( "")),
14242
- order: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _405 => _405.order]), () => ( 0)),
14243
- summary: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _406 => _406.summary]), () => ( "")),
14244
- tags: (_nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _407 => _407.tags]), () => ( []))).join(", "),
14245
- contextualKeys: (_nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _408 => _408.contextualKeys]), () => ( []))).join(", "),
14246
- draft: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _409 => _409.draft]), () => ( false)),
14237
+ id: _optionalChain([howTo, 'optionalAccess', _400 => _400.id]) || _uuid.v4.call(void 0, ),
14238
+ name: _optionalChain([howTo, 'optionalAccess', _401 => _401.name]) || "",
14239
+ description: _optionalChain([howTo, 'optionalAccess', _402 => _402.description]) || [],
14240
+ pages: _chunkVVJDWQEIjs.HowTo.parsePagesFromString(_optionalChain([howTo, 'optionalAccess', _403 => _403.pages])),
14241
+ howToType: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _404 => _404.howToType]), () => ( "how-to")),
14242
+ slug: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _405 => _405.slug]), () => ( "")),
14243
+ order: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _406 => _406.order]), () => ( 0)),
14244
+ summary: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _407 => _407.summary]), () => ( "")),
14245
+ tags: (_nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _408 => _408.tags]), () => ( []))).join(", "),
14246
+ contextualKeys: (_nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _409 => _409.contextualKeys]), () => ( []))).join(", "),
14247
+ draft: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _410 => _410.draft]), () => ( false)),
14247
14248
  relatedArticles: []
14248
14249
  }),
14249
14250
  [howTo]
@@ -14254,7 +14255,7 @@ function HowToEditorInternal({
14254
14255
  });
14255
14256
  const initialRelatedIds = _react.useRef.call(void 0, []);
14256
14257
  _react.useEffect.call(void 0, () => {
14257
- if (!_optionalChain([howTo, 'optionalAccess', _410 => _410.howToType]) || !_optionalChain([howTo, 'optionalAccess', _411 => _411.slug])) return;
14258
+ if (!_optionalChain([howTo, 'optionalAccess', _411 => _411.howToType]) || !_optionalChain([howTo, 'optionalAccess', _412 => _412.slug])) return;
14258
14259
  let active = true;
14259
14260
  _chunkVVJDWQEIjs.HowToService.findRelated({ howToType: howTo.howToType, slug: howTo.slug }).then((list) => {
14260
14261
  if (!active) return;
@@ -14293,7 +14294,7 @@ function HowToEditorInternal({
14293
14294
  {
14294
14295
  form,
14295
14296
  entityType: t(`entities.howtos`, { count: 1 }),
14296
- entityName: _optionalChain([howTo, 'optionalAccess', _412 => _412.name]),
14297
+ entityName: _optionalChain([howTo, 'optionalAccess', _413 => _413.name]),
14297
14298
  isEdit: !!howTo,
14298
14299
  module: _chunkVVJDWQEIjs.Modules.HowTo,
14299
14300
  propagateChanges,
@@ -14674,7 +14675,7 @@ function withPatchedTitle(source, title) {
14674
14675
  return _chunkVVJDWQEIjs.rehydrate.call(void 0, _chunkVVJDWQEIjs.Modules.Assistant, {
14675
14676
  jsonApi: {
14676
14677
  ...dehydrated.jsonApi,
14677
- attributes: { ..._nullishCoalesce(_optionalChain([dehydrated, 'access', _413 => _413.jsonApi, 'optionalAccess', _414 => _414.attributes]), () => ( {})), title }
14678
+ attributes: { ..._nullishCoalesce(_optionalChain([dehydrated, 'access', _414 => _414.jsonApi, 'optionalAccess', _415 => _415.attributes]), () => ( {})), title }
14678
14679
  },
14679
14680
  included: dehydrated.included
14680
14681
  });
@@ -14709,7 +14710,7 @@ function AssistantProvider({
14709
14710
  const [status, setStatus] = _react.useState.call(void 0, void 0);
14710
14711
  const [failedMessageIds, setFailedMessageIds] = _react.useState.call(void 0, () => /* @__PURE__ */ new Set());
14711
14712
  const [operatorMode, setOperatorMode] = _react.useState.call(void 0,
14712
- () => _optionalChain([dehydratedAssistant, 'optionalAccess', _415 => _415.jsonApi, 'optionalAccess', _416 => _416.attributes, 'optionalAccess', _417 => _417.engine]) === "operator"
14713
+ () => _optionalChain([dehydratedAssistant, 'optionalAccess', _416 => _416.jsonApi, 'optionalAccess', _417 => _417.attributes, 'optionalAccess', _418 => _418.engine]) === "operator"
14713
14714
  );
14714
14715
  const [pendingScope, setPendingScope] = _react.useState.call(void 0, scope);
14715
14716
  const { socket } = useSocketContext();
@@ -14719,7 +14720,7 @@ function AssistantProvider({
14719
14720
  if (!trimmed) return;
14720
14721
  const optimistic = _chunkVVJDWQEIjs.AssistantMessage.buildOptimistic({
14721
14722
  content: trimmed,
14722
- assistantId: _optionalChain([assistant, 'optionalAccess', _418 => _418.id]),
14723
+ assistantId: _optionalChain([assistant, 'optionalAccess', _419 => _419.id]),
14723
14724
  position: nextPosition(messages)
14724
14725
  });
14725
14726
  setMessages((prev) => [...prev, optimistic]);
@@ -14729,22 +14730,22 @@ function AssistantProvider({
14729
14730
  if (assistant && payload.assistantId && payload.assistantId !== assistant.id) return;
14730
14731
  if (typeof payload.status === "string") setStatus(payload.status);
14731
14732
  }, "handler");
14732
- _optionalChain([socket, 'optionalAccess', _419 => _419.on, 'call', _420 => _420("assistant:status", handler)]);
14733
+ _optionalChain([socket, 'optionalAccess', _420 => _420.on, 'call', _421 => _421("assistant:status", handler)]);
14733
14734
  let createdHandled = false;
14734
14735
  const createdHandler = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (payload) => {
14735
14736
  if (createdHandled) return;
14736
- const data = _optionalChain([payload, 'optionalAccess', _421 => _421.assistant, 'optionalAccess', _422 => _422.data]);
14737
+ const data = _optionalChain([payload, 'optionalAccess', _422 => _422.assistant, 'optionalAccess', _423 => _423.data]);
14737
14738
  if (!data || typeof data !== "object" || typeof data.id !== "string" || !data.id) return;
14738
14739
  let thread;
14739
14740
  try {
14740
14741
  thread = _chunkVVJDWQEIjs.rehydrate.call(void 0, _chunkVVJDWQEIjs.Modules.Assistant, {
14741
14742
  jsonApi: data,
14742
- included: _nullishCoalesce(_optionalChain([payload, 'access', _423 => _423.assistant, 'optionalAccess', _424 => _424.included]), () => ( []))
14743
+ included: _nullishCoalesce(_optionalChain([payload, 'access', _424 => _424.assistant, 'optionalAccess', _425 => _425.included]), () => ( []))
14743
14744
  });
14744
14745
  } catch (e9) {
14745
14746
  return;
14746
14747
  }
14747
- if (!_optionalChain([thread, 'optionalAccess', _425 => _425.id])) return;
14748
+ if (!_optionalChain([thread, 'optionalAccess', _426 => _426.id])) return;
14748
14749
  createdHandled = true;
14749
14750
  setAssistant(thread);
14750
14751
  setThreads((prev) => [thread, ...prev.filter((row) => row.id !== thread.id)]);
@@ -14752,16 +14753,16 @@ function AssistantProvider({
14752
14753
  window.history.replaceState(null, "", resolveThreadUrl(thread.id));
14753
14754
  }
14754
14755
  }, "createdHandler");
14755
- if (!assistant) _optionalChain([socket, 'optionalAccess', _426 => _426.on, 'call', _427 => _427("assistant:created", createdHandler)]);
14756
+ if (!assistant) _optionalChain([socket, 'optionalAccess', _427 => _427.on, 'call', _428 => _428("assistant:created", createdHandler)]);
14756
14757
  try {
14757
14758
  if (!assistant) {
14758
14759
  const input = {
14759
14760
  firstMessage: trimmed,
14760
- howToMode: _optionalChain([opts, 'optionalAccess', _428 => _428.howToMode]),
14761
- limitToHowToId: _optionalChain([opts, 'optionalAccess', _429 => _429.limitToHowToId]),
14762
- handbookMode: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _430 => _430.handbookMode]), () => ( _optionalChain([retrievalMode, 'optionalAccess', _431 => _431.handbookMode]))),
14763
- limitToHandbookPageId: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _432 => _432.limitToHandbookPageId]), () => ( _optionalChain([retrievalMode, 'optionalAccess', _433 => _433.limitToHandbookPageId]))),
14764
- contentBlocks: _optionalChain([opts, 'optionalAccess', _434 => _434.contentBlocks]),
14761
+ howToMode: _optionalChain([opts, 'optionalAccess', _429 => _429.howToMode]),
14762
+ limitToHowToId: _optionalChain([opts, 'optionalAccess', _430 => _430.limitToHowToId]),
14763
+ handbookMode: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _431 => _431.handbookMode]), () => ( _optionalChain([retrievalMode, 'optionalAccess', _432 => _432.handbookMode]))),
14764
+ limitToHandbookPageId: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _433 => _433.limitToHandbookPageId]), () => ( _optionalChain([retrievalMode, 'optionalAccess', _434 => _434.limitToHandbookPageId]))),
14765
+ contentBlocks: _optionalChain([opts, 'optionalAccess', _435 => _435.contentBlocks]),
14765
14766
  boundContent: pendingScope
14766
14767
  };
14767
14768
  const created = operatorMode ? await _chunkVVJDWQEIjs.AssistantService.createOperator(input) : await _chunkVVJDWQEIjs.AssistantService.create(input);
@@ -14778,15 +14779,15 @@ function AssistantProvider({
14778
14779
  const result = operatorMode ? await _chunkVVJDWQEIjs.AssistantService.appendMessageOperator({
14779
14780
  assistantId: assistant.id,
14780
14781
  content: trimmed,
14781
- contentBlocks: _optionalChain([opts, 'optionalAccess', _435 => _435.contentBlocks])
14782
+ contentBlocks: _optionalChain([opts, 'optionalAccess', _436 => _436.contentBlocks])
14782
14783
  }) : await _chunkVVJDWQEIjs.AssistantService.appendMessage({
14783
14784
  assistantId: assistant.id,
14784
14785
  content: trimmed,
14785
- howToMode: _optionalChain([opts, 'optionalAccess', _436 => _436.howToMode]),
14786
- limitToHowToId: _optionalChain([opts, 'optionalAccess', _437 => _437.limitToHowToId]),
14787
- handbookMode: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _438 => _438.handbookMode]), () => ( _optionalChain([retrievalMode, 'optionalAccess', _439 => _439.handbookMode]))),
14788
- limitToHandbookPageId: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _440 => _440.limitToHandbookPageId]), () => ( _optionalChain([retrievalMode, 'optionalAccess', _441 => _441.limitToHandbookPageId]))),
14789
- contentBlocks: _optionalChain([opts, 'optionalAccess', _442 => _442.contentBlocks])
14786
+ howToMode: _optionalChain([opts, 'optionalAccess', _437 => _437.howToMode]),
14787
+ limitToHowToId: _optionalChain([opts, 'optionalAccess', _438 => _438.limitToHowToId]),
14788
+ handbookMode: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _439 => _439.handbookMode]), () => ( _optionalChain([retrievalMode, 'optionalAccess', _440 => _440.handbookMode]))),
14789
+ limitToHandbookPageId: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _441 => _441.limitToHandbookPageId]), () => ( _optionalChain([retrievalMode, 'optionalAccess', _442 => _442.limitToHandbookPageId]))),
14790
+ contentBlocks: _optionalChain([opts, 'optionalAccess', _443 => _443.contentBlocks])
14790
14791
  });
14791
14792
  setMessages((prev) => [...stripOptimistic(prev), ...result]);
14792
14793
  }
@@ -14797,8 +14798,8 @@ function AssistantProvider({
14797
14798
  return next;
14798
14799
  });
14799
14800
  } finally {
14800
- _optionalChain([socket, 'optionalAccess', _443 => _443.off, 'call', _444 => _444("assistant:status", handler)]);
14801
- if (!assistant) _optionalChain([socket, 'optionalAccess', _445 => _445.off, 'call', _446 => _446("assistant:created", createdHandler)]);
14801
+ _optionalChain([socket, 'optionalAccess', _444 => _444.off, 'call', _445 => _445("assistant:status", handler)]);
14802
+ if (!assistant) _optionalChain([socket, 'optionalAccess', _446 => _446.off, 'call', _447 => _447("assistant:created", createdHandler)]);
14802
14803
  setSending(false);
14803
14804
  setStatus(void 0);
14804
14805
  }
@@ -14864,7 +14865,7 @@ function AssistantProvider({
14864
14865
  await _chunkVVJDWQEIjs.AssistantService.delete({ id });
14865
14866
  setThreads((prev) => prev.filter((t2) => t2.id !== id));
14866
14867
  setAssistant((prev) => {
14867
- if (_optionalChain([prev, 'optionalAccess', _447 => _447.id]) === id) {
14868
+ if (_optionalChain([prev, 'optionalAccess', _448 => _448.id]) === id) {
14868
14869
  setMessages([]);
14869
14870
  return void 0;
14870
14871
  }
@@ -14876,7 +14877,7 @@ function AssistantProvider({
14876
14877
  (async () => {
14877
14878
  setThreadsLoading(true);
14878
14879
  try {
14879
- const loaded = await _chunkVVJDWQEIjs.AssistantService.findMany({ boundType: _optionalChain([scope, 'optionalAccess', _448 => _448.type]), boundId: _optionalChain([scope, 'optionalAccess', _449 => _449.id]) });
14880
+ const loaded = await _chunkVVJDWQEIjs.AssistantService.findMany({ boundType: _optionalChain([scope, 'optionalAccess', _449 => _449.type]), boundId: _optionalChain([scope, 'optionalAccess', _450 => _450.id]) });
14880
14881
  if (!cancelled) setThreads(loaded);
14881
14882
  } finally {
14882
14883
  if (!cancelled) setThreadsLoading(false);
@@ -14885,7 +14886,7 @@ function AssistantProvider({
14885
14886
  return () => {
14886
14887
  cancelled = true;
14887
14888
  };
14888
- }, [_optionalChain([scope, 'optionalAccess', _450 => _450.type]), _optionalChain([scope, 'optionalAccess', _451 => _451.id])]);
14889
+ }, [_optionalChain([scope, 'optionalAccess', _451 => _451.type]), _optionalChain([scope, 'optionalAccess', _452 => _452.id])]);
14889
14890
  const value = _react.useMemo.call(void 0,
14890
14891
  () => ({
14891
14892
  assistant,
@@ -14937,7 +14938,7 @@ function AssistantProvider({
14937
14938
  const response = {
14938
14939
  type: _nullishCoalesce(titleOverride, () => ( t("entities.assistants", { count: assistant ? 1 : 2 })))
14939
14940
  };
14940
- if (_optionalChain([assistant, 'optionalAccess', _452 => _452.title])) {
14941
+ if (_optionalChain([assistant, 'optionalAccess', _453 => _453.title])) {
14941
14942
  response.element = assistant.title.length > 25 ? `${assistant.title.substring(0, 25)}...` : assistant.title;
14942
14943
  }
14943
14944
  response.functions = [
@@ -15099,7 +15100,7 @@ function readEntityTitle() {
15099
15100
  if (typeof document === "undefined") return null;
15100
15101
  const afterEntityType = document.title.split("]")[1];
15101
15102
  if (!afterEntityType) return null;
15102
- return _optionalChain([afterEntityType, 'access', _453 => _453.split, 'call', _454 => _454("|"), 'access', _455 => _455[0], 'optionalAccess', _456 => _456.trim, 'call', _457 => _457()]) || null;
15103
+ return _optionalChain([afterEntityType, 'access', _454 => _454.split, 'call', _455 => _455("|"), 'access', _456 => _456[0], 'optionalAccess', _457 => _457.trim, 'call', _458 => _458()]) || null;
15103
15104
  }
15104
15105
  _chunk7QVYU63Ejs.__name.call(void 0, readEntityTitle, "readEntityTitle");
15105
15106
  function usePageTracker() {
@@ -15128,7 +15129,7 @@ function usePageTracker() {
15128
15129
  const existing = prev.find((page) => page.url === baseUrl);
15129
15130
  const refreshed = {
15130
15131
  url: baseUrl,
15131
- title: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _458 => _458.title]), () => ( foundModule.name)),
15132
+ title: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _459 => _459.title]), () => ( foundModule.name)),
15132
15133
  moduleType: foundModule.name,
15133
15134
  timestamp: Date.now()
15134
15135
  };
@@ -15186,7 +15187,7 @@ function urlBase64ToUint8Array(base64String) {
15186
15187
  _chunk7QVYU63Ejs.__name.call(void 0, urlBase64ToUint8Array, "urlBase64ToUint8Array");
15187
15188
  function usePushNotifications(params) {
15188
15189
  const { currentUser, canSubscribe } = params;
15189
- const userId = _optionalChain([currentUser, 'optionalAccess', _459 => _459.id]);
15190
+ const userId = _optionalChain([currentUser, 'optionalAccess', _460 => _460.id]);
15190
15191
  _react.useEffect.call(void 0, () => {
15191
15192
  if (!userId || !canSubscribe) return;
15192
15193
  const register = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
@@ -15236,7 +15237,7 @@ function usePushNotifications(params) {
15236
15237
  if (!("serviceWorker" in navigator)) return;
15237
15238
  const sessionKey = `push_registered_${userId}`;
15238
15239
  const onMessage = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (event) => {
15239
- if (_optionalChain([event, 'access', _460 => _460.data, 'optionalAccess', _461 => _461.type]) !== "PUSH_RESUBSCRIBED" || !event.data.subscription) return;
15240
+ if (_optionalChain([event, 'access', _461 => _461.data, 'optionalAccess', _462 => _462.type]) !== "PUSH_RESUBSCRIBED" || !event.data.subscription) return;
15240
15241
  const subscription = event.data.subscription;
15241
15242
  const subscriptionHash = btoa(JSON.stringify(subscription));
15242
15243
  if (sessionStorage.getItem(sessionKey) === subscriptionHash) return;
@@ -15319,14 +15320,14 @@ function useSocket({ token }) {
15319
15320
  });
15320
15321
  }, "handleMessage");
15321
15322
  const handleNotification = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (data) => {
15322
- const resource = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _462 => _462.data]), () => ( _optionalChain([data, 'optionalAccess', _463 => _463.jsonApi])));
15323
- if (!_optionalChain([resource, 'optionalAccess', _464 => _464.type])) {
15323
+ const resource = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _463 => _463.data]), () => ( _optionalChain([data, 'optionalAccess', _464 => _464.jsonApi])));
15324
+ if (!_optionalChain([resource, 'optionalAccess', _465 => _465.type])) {
15324
15325
  console.warn("[useSocket] ignoring notification with unexpected payload shape", data);
15325
15326
  return;
15326
15327
  }
15327
15328
  const notification = _chunkVVJDWQEIjs.rehydrate.call(void 0, _chunkVVJDWQEIjs.Modules.Notification, {
15328
15329
  jsonApi: resource,
15329
- included: _optionalChain([data, 'optionalAccess', _465 => _465.included]) || []
15330
+ included: _optionalChain([data, 'optionalAccess', _466 => _466.included]) || []
15330
15331
  });
15331
15332
  if (notification) {
15332
15333
  setSocketNotifications((prev) => {
@@ -15450,11 +15451,11 @@ function BreadcrumbMobile({
15450
15451
  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 }) }) }) });
15451
15452
  }
15452
15453
  if (allItems.length <= 1) {
15453
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-foreground block min-w-0 truncate px-1.5 text-xs/relaxed font-normal", children: _optionalChain([lastItem, 'optionalAccess', _466 => _466.name]) });
15454
+ 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', _467 => _467.name]) });
15454
15455
  }
15455
15456
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DropdownMenu, { open, onOpenChange: setOpen, children: [
15456
15457
  /* @__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: [
15457
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "truncate", children: _optionalChain([lastItem, 'optionalAccess', _467 => _467.name]) }),
15458
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "truncate", children: _optionalChain([lastItem, 'optionalAccess', _468 => _468.name]) }),
15458
15459
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronDownIcon, { className: "text-muted-foreground size-3.5 shrink-0" })
15459
15460
  ] }),
15460
15461
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DropdownMenuContent, { align: "start", children: allItems.map(
@@ -15472,8 +15473,8 @@ function BreadcrumbMobile({
15472
15473
  href: item.href,
15473
15474
  className: _chunkVVJDWQEIjs.cn.call(void 0, props.className, "text-foreground font-normal"),
15474
15475
  onClick: (event) => {
15475
- _optionalChain([props, 'access', _468 => _468.onClick, 'optionalCall', _469 => _469(event)]);
15476
- _optionalChain([item, 'access', _470 => _470.onClick, 'optionalCall', _471 => _471()]);
15476
+ _optionalChain([props, 'access', _469 => _469.onClick, 'optionalCall', _470 => _470(event)]);
15477
+ _optionalChain([item, 'access', _471 => _471.onClick, 'optionalCall', _472 => _472()]);
15477
15478
  },
15478
15479
  children: props.children
15479
15480
  }
@@ -15491,7 +15492,7 @@ function BreadcrumbNavigation({ items, rootLabel, showRoot = true }) {
15491
15492
  const generateUrl = usePageUrlGenerator();
15492
15493
  const t = _nextintl.useTranslations.call(void 0, );
15493
15494
  const isMobile = _chunkVVJDWQEIjs.useIsMobile.call(void 0, );
15494
- const root = _optionalChain([rootLabel, 'optionalAccess', _472 => _472.trim, 'call', _473 => _473()]) ? rootLabel : t(`common.home`);
15495
+ const root = _optionalChain([rootLabel, 'optionalAccess', _473 => _473.trim, 'call', _474 => _474()]) ? rootLabel : t(`common.home`);
15495
15496
  if (isMobile) {
15496
15497
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BreadcrumbMobile, { items, generateUrl, rootLabel: root, showRoot });
15497
15498
  }
@@ -15889,12 +15890,12 @@ var _remarkgfm = require('remark-gfm'); var _remarkgfm2 = _interopRequireDefault
15889
15890
 
15890
15891
  function mermaidSourceOf(node) {
15891
15892
  const pre = node;
15892
- const code = _optionalChain([pre, 'optionalAccess', _474 => _474.children, 'optionalAccess', _475 => _475[0]]);
15893
- if (_optionalChain([code, 'optionalAccess', _476 => _476.tagName]) !== "code") return void 0;
15894
- const classNames = Array.isArray(_optionalChain([code, 'access', _477 => _477.properties, 'optionalAccess', _478 => _478.className])) ? code.properties.className : [];
15893
+ const code = _optionalChain([pre, 'optionalAccess', _475 => _475.children, 'optionalAccess', _476 => _476[0]]);
15894
+ if (_optionalChain([code, 'optionalAccess', _477 => _477.tagName]) !== "code") return void 0;
15895
+ const classNames = Array.isArray(_optionalChain([code, 'access', _478 => _478.properties, 'optionalAccess', _479 => _479.className])) ? code.properties.className : [];
15895
15896
  if (!classNames.includes("language-mermaid")) return void 0;
15896
- const text = _optionalChain([code, 'access', _479 => _479.children, 'optionalAccess', _480 => _480[0]]);
15897
- if (_optionalChain([text, 'optionalAccess', _481 => _481.type]) !== "text" || typeof text.value !== "string") return void 0;
15897
+ const text = _optionalChain([code, 'access', _480 => _480.children, 'optionalAccess', _481 => _481[0]]);
15898
+ if (_optionalChain([text, 'optionalAccess', _482 => _482.type]) !== "text" || typeof text.value !== "string") return void 0;
15898
15899
  return text.value;
15899
15900
  }
15900
15901
  _chunk7QVYU63Ejs.__name.call(void 0, mermaidSourceOf, "mermaidSourceOf");
@@ -16151,7 +16152,7 @@ var railTriggerClass = _chunkVVJDWQEIjs.cn.call(void 0,
16151
16152
  "data-active:text-primary dark:data-active:text-primary",
16152
16153
  "data-active:font-medium data-active:shadow-none"
16153
16154
  );
16154
- var tabValue = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (tab) => _nullishCoalesce(_nullishCoalesce(tab.sectionKey, () => ( _optionalChain([tab, 'access', _482 => _482.key, 'optionalAccess', _483 => _483.name]))), () => ( tab.label)), "tabValue");
16155
+ var tabValue = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (tab) => _nullishCoalesce(_nullishCoalesce(tab.sectionKey, () => ( _optionalChain([tab, 'access', _483 => _483.key, 'optionalAccess', _484 => _484.name]))), () => ( tab.label)), "tabValue");
16155
16156
  function RoundPageContainer({
16156
16157
  module,
16157
16158
  id,
@@ -16183,7 +16184,7 @@ function RoundPageContainer({
16183
16184
  const [mounted, setMounted] = _react.useState.call(void 0, false);
16184
16185
  _react.useEffect.call(void 0, () => {
16185
16186
  const match = document.cookie.split("; ").find((row) => row.startsWith(`${detailsCookieName}=`));
16186
- const stored = _optionalChain([match, 'optionalAccess', _484 => _484.split, 'call', _485 => _485("="), 'access', _486 => _486[1]]);
16187
+ const stored = _optionalChain([match, 'optionalAccess', _485 => _485.split, 'call', _486 => _486("="), 'access', _487 => _487[1]]);
16187
16188
  if (stored === "true") setShowDetailsState(true);
16188
16189
  else if (stored === "false") setShowDetailsState(false);
16189
16190
  }, []);
@@ -16198,7 +16199,7 @@ function RoundPageContainer({
16198
16199
  const clip = isFixed ? `overflow-hidden` : ``;
16199
16200
  const scrollY = isFixed ? `overflow-y-auto` : ``;
16200
16201
  const mobileBarClass = isFixed ? `` : `sticky bottom-0 z-30`;
16201
- const detailsCookieName = _optionalChain([module, 'optionalAccess', _487 => _487.name]) ? `${DETAILS_COOKIE_NAME}_${module.name}` : DETAILS_COOKIE_NAME;
16202
+ const detailsCookieName = _optionalChain([module, 'optionalAccess', _488 => _488.name]) ? `${DETAILS_COOKIE_NAME}_${module.name}` : DETAILS_COOKIE_NAME;
16202
16203
  const setShowDetails = _react.useCallback.call(void 0,
16203
16204
  (value) => {
16204
16205
  setShowDetailsState(value);
@@ -16231,13 +16232,13 @@ function RoundPageContainer({
16231
16232
  } else {
16232
16233
  rewriteUrl({ page: window.location.pathname, additionalParameters: { section: key }, mode: "push" });
16233
16234
  }
16234
- _optionalChain([onSectionChange, 'optionalCall', _488 => _488(key)]);
16235
+ _optionalChain([onSectionChange, 'optionalCall', _489 => _489(key)]);
16235
16236
  },
16236
16237
  [module, id, rewriteUrl, onSectionChange]
16237
16238
  );
16238
- const activeTabDefinition = _optionalChain([tabs, 'optionalAccess', _489 => _489.find, 'call', _490 => _490((t2) => tabValue(t2) === activeTab)]);
16239
- const activeFillHeight = _optionalChain([activeTabDefinition, 'optionalAccess', _491 => _491.fillHeight]) === true;
16240
- const activeConstrainWidth = _optionalChain([activeTabDefinition, 'optionalAccess', _492 => _492.constrainWidth]) === true;
16239
+ const activeTabDefinition = _optionalChain([tabs, 'optionalAccess', _490 => _490.find, 'call', _491 => _491((t2) => tabValue(t2) === activeTab)]);
16240
+ const activeFillHeight = _optionalChain([activeTabDefinition, 'optionalAccess', _492 => _492.fillHeight]) === true;
16241
+ const activeConstrainWidth = _optionalChain([activeTabDefinition, 'optionalAccess', _493 => _493.constrainWidth]) === true;
16241
16242
  const { ungrouped, groups } = _react.useMemo.call(void 0, () => partitionTabs(_nullishCoalesce(tabs, () => ( []))), [tabs]);
16242
16243
  const tabItems = _react.useMemo.call(void 0,
16243
16244
  () => Object.fromEntries((_nullishCoalesce(tabs, () => ( []))).map((tab) => [tabValue(tab), _nullishCoalesce(tab.contentLabel, () => ( tab.label))])),
@@ -16248,7 +16249,7 @@ function RoundPageContainer({
16248
16249
  const mobileFlow = isMobile && isFixed && (!activeFillHeight || activeDocumentTab) && !fullWidth;
16249
16250
  const innerClip = mobileFlow ? `` : clip;
16250
16251
  const innerScrollY = mobileFlow ? `` : scrollY;
16251
- const showMobileSectionPicker = (_nullishCoalesce(_optionalChain([tabs, 'optionalAccess', _493 => _493.length]), () => ( 0))) > 1;
16252
+ const showMobileSectionPicker = (_nullishCoalesce(_optionalChain([tabs, 'optionalAccess', _494 => _494.length]), () => ( 0))) > 1;
16252
16253
  if (!isReady) {
16253
16254
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
16254
16255
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -16648,14 +16649,14 @@ function BlockNoteEditorMentionHoverCard({
16648
16649
  const entityType = target.dataset.mentionType;
16649
16650
  const alias = target.dataset.mentionAlias;
16650
16651
  setHovered((prev) => {
16651
- if (_optionalChain([prev, 'optionalAccess', _494 => _494.id]) === id && _optionalChain([prev, 'optionalAccess', _495 => _495.element]) === target) return prev;
16652
+ if (_optionalChain([prev, 'optionalAccess', _495 => _495.id]) === id && _optionalChain([prev, 'optionalAccess', _496 => _496.element]) === target) return prev;
16652
16653
  return { id, entityType, alias, element: target };
16653
16654
  });
16654
16655
  }, "handleMouseOver");
16655
16656
  const handleMouseOut = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (e) => {
16656
16657
  const target = e.target.closest("[data-mention-id]");
16657
16658
  if (!target) return;
16658
- const related = _optionalChain([e, 'access', _496 => _496.relatedTarget, 'optionalAccess', _497 => _497.closest, 'call', _498 => _498("[data-mention-id]")]);
16659
+ const related = _optionalChain([e, 'access', _497 => _497.relatedTarget, 'optionalAccess', _498 => _498.closest, 'call', _499 => _499("[data-mention-id]")]);
16659
16660
  if (related) return;
16660
16661
  scheduleClose();
16661
16662
  }, "handleMouseOut");
@@ -16669,7 +16670,7 @@ function BlockNoteEditorMentionHoverCard({
16669
16670
  }, [containerRef, mentionResolveFn, cancelClose, scheduleClose]);
16670
16671
  if (!hovered || !mentionResolveFn) return null;
16671
16672
  const resolved = mentionResolveFn(hovered.id, hovered.entityType, hovered.alias);
16672
- if (!_optionalChain([resolved, 'optionalAccess', _499 => _499.HoverContent])) return null;
16673
+ if (!_optionalChain([resolved, 'optionalAccess', _500 => _500.HoverContent])) return null;
16673
16674
  const ContentComponent = resolved.HoverContent;
16674
16675
  const rect = hovered.element.getBoundingClientRect();
16675
16676
  return _reactdom.createPortal.call(void 0,
@@ -16713,28 +16714,28 @@ var parseMentionElement = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
16713
16714
  }, "parseMentionElement");
16714
16715
  var createMentionInlineContentSpec = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (resolveFn, disableMention, nameResolver) => {
16715
16716
  const MentionExternalHTML = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (props) => {
16716
- const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall', _500 => _500(props.id, props.entityType, props.alias)]), () => ( props.alias));
16717
+ const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall', _501 => _501(props.id, props.entityType, props.alias)]), () => ( props.alias));
16717
16718
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { "data-mention-id": props.id, "data-mention-type": props.entityType, "data-mention-alias": props.alias, children: [
16718
16719
  "@",
16719
16720
  displayName
16720
16721
  ] });
16721
16722
  }, "MentionExternalHTML");
16722
16723
  const Mention = React2.default.memo(/* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, function Mention2(props) {
16723
- const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall', _501 => _501(props.id, props.entityType, props.alias)]), () => ( props.alias));
16724
+ const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall', _502 => _502(props.id, props.entityType, props.alias)]), () => ( props.alias));
16724
16725
  if (disableMention) {
16725
- const resolved2 = _optionalChain([resolveFn, 'optionalCall', _502 => _502(props.id, props.entityType, displayName)]);
16726
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _link2.default, { href: _nullishCoalesce(_optionalChain([resolved2, 'optionalAccess', _503 => _503.url]), () => ( "#")), className: "text-primary", children: [
16726
+ const resolved2 = _optionalChain([resolveFn, 'optionalCall', _503 => _503(props.id, props.entityType, displayName)]);
16727
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _link2.default, { href: _nullishCoalesce(_optionalChain([resolved2, 'optionalAccess', _504 => _504.url]), () => ( "#")), className: "text-primary", children: [
16727
16728
  "@",
16728
16729
  displayName
16729
16730
  ] });
16730
16731
  }
16731
- const resolved = _optionalChain([resolveFn, 'optionalCall', _504 => _504(props.id, props.entityType, displayName)]);
16732
- if (_optionalChain([resolved, 'optionalAccess', _505 => _505.Inline])) {
16732
+ const resolved = _optionalChain([resolveFn, 'optionalCall', _505 => _505(props.id, props.entityType, displayName)]);
16733
+ if (_optionalChain([resolved, 'optionalAccess', _506 => _506.Inline])) {
16733
16734
  const Custom = resolved.Inline;
16734
16735
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Custom, { ...props, alias: displayName });
16735
16736
  }
16736
- const href = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _506 => _506.url]), () => ( "#"));
16737
- const handleClick = _optionalChain([resolved, 'optionalAccess', _507 => _507.onActivate]) ? (e) => resolved.onActivate(e, props) : void 0;
16737
+ const href = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _507 => _507.url]), () => ( "#"));
16738
+ const handleClick = _optionalChain([resolved, 'optionalAccess', _508 => _508.onActivate]) ? (e) => resolved.onActivate(e, props) : void 0;
16738
16739
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
16739
16740
  _link2.default,
16740
16741
  {
@@ -16842,7 +16843,7 @@ function BlockNoteEditorMentionSuggestionMenu({
16842
16843
  if (!suggestionMenuComponent) return void 0;
16843
16844
  const Component2 = suggestionMenuComponent;
16844
16845
  const Wrapped = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (props) => {
16845
- const isSentinelOnly = props.items.length === 1 && _optionalChain([props, 'access', _508 => _508.items, 'access', _509 => _509[0], 'optionalAccess', _510 => _510.title]) === KEEP_OPEN_SENTINEL_TITLE;
16846
+ const isSentinelOnly = props.items.length === 1 && _optionalChain([props, 'access', _509 => _509.items, 'access', _510 => _510[0], 'optionalAccess', _511 => _511.title]) === KEEP_OPEN_SENTINEL_TITLE;
16846
16847
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
16847
16848
  Component2,
16848
16849
  {
@@ -16851,7 +16852,7 @@ function BlockNoteEditorMentionSuggestionMenu({
16851
16852
  selectedIndex: isSentinelOnly ? void 0 : props.selectedIndex,
16852
16853
  onItemClick: (item) => {
16853
16854
  if (item.title === KEEP_OPEN_SENTINEL_TITLE) return;
16854
- _optionalChain([props, 'access', _511 => _511.onItemClick, 'optionalCall', _512 => _512(item)]);
16855
+ _optionalChain([props, 'access', _512 => _512.onItemClick, 'optionalCall', _513 => _513(item)]);
16855
16856
  }
16856
16857
  }
16857
16858
  );
@@ -17065,10 +17066,10 @@ var cellId = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => {
17065
17066
  cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => params.toggleId ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
17066
17067
  SelectRowCheckbox,
17067
17068
  {
17068
- checked: _optionalChain([params, 'access', _513 => _513.checkedIds, 'optionalAccess', _514 => _514.includes, 'call', _515 => _515(row.getValue(params.name))]) || false,
17069
+ checked: _optionalChain([params, 'access', _514 => _514.checkedIds, 'optionalAccess', _515 => _515.includes, 'call', _516 => _516(row.getValue(params.name))]) || false,
17069
17070
  onCheckedChange: (value) => {
17070
17071
  row.toggleSelected(!!value);
17071
- _optionalChain([params, 'access', _516 => _516.toggleId, 'optionalCall', _517 => _517(row.getValue(params.name))]);
17072
+ _optionalChain([params, 'access', _517 => _517.toggleId, 'optionalCall', _518 => _518(row.getValue(params.name))]);
17072
17073
  }
17073
17074
  }
17074
17075
  ) : null, "cell"),
@@ -17126,7 +17127,7 @@ function useJsonApiGet(params) {
17126
17127
  const [response, setResponse] = _react.useState.call(void 0, null);
17127
17128
  const isMounted = _react.useRef.call(void 0, true);
17128
17129
  const fetchData = _react.useCallback.call(void 0, async () => {
17129
- if (_optionalChain([params, 'access', _518 => _518.options, 'optionalAccess', _519 => _519.enabled]) === false) return;
17130
+ if (_optionalChain([params, 'access', _519 => _519.options, 'optionalAccess', _520 => _520.enabled]) === false) return;
17130
17131
  setLoading(true);
17131
17132
  setError(null);
17132
17133
  try {
@@ -17153,9 +17154,9 @@ function useJsonApiGet(params) {
17153
17154
  setLoading(false);
17154
17155
  }
17155
17156
  }
17156
- }, [params.classKey, params.endpoint, params.companyId, _optionalChain([params, 'access', _520 => _520.options, 'optionalAccess', _521 => _521.enabled])]);
17157
+ }, [params.classKey, params.endpoint, params.companyId, _optionalChain([params, 'access', _521 => _521.options, 'optionalAccess', _522 => _522.enabled])]);
17157
17158
  const fetchNextPage = _react.useCallback.call(void 0, async () => {
17158
- if (!_optionalChain([response, 'optionalAccess', _522 => _522.nextPage])) return;
17159
+ if (!_optionalChain([response, 'optionalAccess', _523 => _523.nextPage])) return;
17159
17160
  setLoading(true);
17160
17161
  try {
17161
17162
  const nextResponse = await response.nextPage();
@@ -17176,7 +17177,7 @@ function useJsonApiGet(params) {
17176
17177
  }
17177
17178
  }, [response]);
17178
17179
  const fetchPreviousPage = _react.useCallback.call(void 0, async () => {
17179
- if (!_optionalChain([response, 'optionalAccess', _523 => _523.prevPage])) return;
17180
+ if (!_optionalChain([response, 'optionalAccess', _524 => _524.prevPage])) return;
17180
17181
  setLoading(true);
17181
17182
  try {
17182
17183
  const prevResponse = await response.prevPage();
@@ -17202,15 +17203,15 @@ function useJsonApiGet(params) {
17202
17203
  return () => {
17203
17204
  isMounted.current = false;
17204
17205
  };
17205
- }, [fetchData, ..._optionalChain([params, 'access', _524 => _524.options, 'optionalAccess', _525 => _525.deps]) || []]);
17206
+ }, [fetchData, ..._optionalChain([params, 'access', _525 => _525.options, 'optionalAccess', _526 => _526.deps]) || []]);
17206
17207
  return {
17207
17208
  data,
17208
17209
  loading,
17209
17210
  error,
17210
17211
  response,
17211
17212
  refetch: fetchData,
17212
- hasNextPage: !!_optionalChain([response, 'optionalAccess', _526 => _526.next]),
17213
- hasPreviousPage: !!_optionalChain([response, 'optionalAccess', _527 => _527.prev]),
17213
+ hasNextPage: !!_optionalChain([response, 'optionalAccess', _527 => _527.next]),
17214
+ hasPreviousPage: !!_optionalChain([response, 'optionalAccess', _528 => _528.prev]),
17214
17215
  fetchNextPage,
17215
17216
  fetchPreviousPage
17216
17217
  };
@@ -17288,17 +17289,17 @@ function useJsonApiMutation(config) {
17288
17289
  if (apiResponse.ok) {
17289
17290
  const resultData = apiResponse.data;
17290
17291
  setData(resultData);
17291
- _optionalChain([config, 'access', _528 => _528.onSuccess, 'optionalCall', _529 => _529(resultData)]);
17292
+ _optionalChain([config, 'access', _529 => _529.onSuccess, 'optionalCall', _530 => _530(resultData)]);
17292
17293
  return resultData;
17293
17294
  } else {
17294
17295
  setError(apiResponse.error);
17295
- _optionalChain([config, 'access', _530 => _530.onError, 'optionalCall', _531 => _531(apiResponse.error)]);
17296
+ _optionalChain([config, 'access', _531 => _531.onError, 'optionalCall', _532 => _532(apiResponse.error)]);
17296
17297
  return null;
17297
17298
  }
17298
17299
  } catch (err) {
17299
17300
  const errorMessage = err instanceof Error ? err.message : "Unknown error";
17300
17301
  setError(errorMessage);
17301
- _optionalChain([config, 'access', _532 => _532.onError, 'optionalCall', _533 => _533(errorMessage)]);
17302
+ _optionalChain([config, 'access', _533 => _533.onError, 'optionalCall', _534 => _534(errorMessage)]);
17302
17303
  return null;
17303
17304
  } finally {
17304
17305
  setLoading(false);
@@ -17371,7 +17372,7 @@ var useCompanyTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
17371
17372
  {
17372
17373
  href: hasRole(_chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator) ? generateUrl({
17373
17374
  page: "/administration",
17374
- id: _optionalChain([_chunkVVJDWQEIjs.Modules, 'access', _534 => _534.Company, 'access', _535 => _535.pageUrl, 'optionalAccess', _536 => _536.substring, 'call', _537 => _537(1)]),
17375
+ id: _optionalChain([_chunkVVJDWQEIjs.Modules, 'access', _535 => _535.Company, 'access', _536 => _536.pageUrl, 'optionalAccess', _537 => _537.substring, 'call', _538 => _538(1)]),
17375
17376
  childPage: company.id
17376
17377
  }) : generateUrl({ page: _chunkVVJDWQEIjs.Modules.Company, id: company.id }),
17377
17378
  children: row.getValue("name")
@@ -17387,7 +17388,7 @@ var useCompanyTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
17387
17388
  })
17388
17389
  };
17389
17390
  const columns = _react.useMemo.call(void 0, () => {
17390
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _538 => _538[field], 'optionalCall', _539 => _539()])).filter((col) => col !== void 0);
17391
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _539 => _539[field], 'optionalCall', _540 => _540()])).filter((col) => col !== void 0);
17391
17392
  }, [params.fields, fieldColumnMap, t, generateUrl, hasRole]);
17392
17393
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
17393
17394
  }, "useCompanyTableStructure");
@@ -17400,7 +17401,7 @@ var DAY_MS = 1e3 * 60 * 60 * 24;
17400
17401
  var isAdministrator = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (currentUser) => {
17401
17402
  if (!currentUser || !_chunkG4JR3SFVjs.isRolesConfigured.call(void 0, )) return false;
17402
17403
  const adminRoleId = _chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator;
17403
- return !!_optionalChain([currentUser, 'access', _540 => _540.roles, 'optionalAccess', _541 => _541.some, 'call', _542 => _542((role) => role.id === adminRoleId)]);
17404
+ return !!_optionalChain([currentUser, 'access', _541 => _541.roles, 'optionalAccess', _542 => _542.some, 'call', _543 => _543((role) => role.id === adminRoleId)]);
17404
17405
  }, "isAdministrator");
17405
17406
  function useSubscriptionStatus() {
17406
17407
  const { company, currentUser } = useCurrentUserContext();
@@ -17517,7 +17518,7 @@ var useRoleTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0,
17517
17518
  })
17518
17519
  };
17519
17520
  const columns = _react.useMemo.call(void 0, () => {
17520
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _543 => _543[field], 'optionalCall', _544 => _544()])).filter((col) => col !== void 0);
17521
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _544 => _544[field], 'optionalCall', _545 => _545()])).filter((col) => col !== void 0);
17521
17522
  }, [params.fields, fieldColumnMap, t, generateUrl]);
17522
17523
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
17523
17524
  }, "useRoleTableStructure");
@@ -17634,8 +17635,8 @@ var useStripePriceTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(
17634
17635
  const t = _nextintl.useTranslations.call(void 0, );
17635
17636
  const fmt = useBillingFormatOptions();
17636
17637
  const generateUrl = usePageUrlGenerator();
17637
- const onClone = _optionalChain([params, 'access', _545 => _545.context, 'optionalAccess', _546 => _546.onClone]);
17638
- const onExport = _optionalChain([params, 'access', _547 => _547.context, 'optionalAccess', _548 => _548.onExport]);
17638
+ const onClone = _optionalChain([params, 'access', _546 => _546.context, 'optionalAccess', _547 => _547.onClone]);
17639
+ const onExport = _optionalChain([params, 'access', _548 => _548.context, 'optionalAccess', _549 => _549.onExport]);
17639
17640
  const tableData = _react.useMemo.call(void 0, () => {
17640
17641
  return params.data.map((price) => {
17641
17642
  const entry = { jsonApiData: price };
@@ -17700,7 +17701,7 @@ var useStripePriceTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(
17700
17701
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex flex-wrap items-center gap-1", children: [
17701
17702
  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") }),
17702
17703
  price.isTrial && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { variant: "softBlue", children: t("billing.admin.prices.badge.trial") }),
17703
- _optionalChain([price, 'access', _549 => _549.recurring, 'optionalAccess', _550 => _550.usageType]) === "metered" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { variant: "softBlue", children: t("billing.admin.prices.badge.metered") })
17704
+ _optionalChain([price, 'access', _550 => _550.recurring, 'optionalAccess', _551 => _551.usageType]) === "metered" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { variant: "softBlue", children: t("billing.admin.prices.badge.metered") })
17704
17705
  ] });
17705
17706
  }, "cell"),
17706
17707
  enableSorting: false,
@@ -17748,7 +17749,7 @@ var useStripePriceTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(
17748
17749
  })
17749
17750
  };
17750
17751
  const columns = _react.useMemo.call(void 0, () => {
17751
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _551 => _551[field], 'optionalCall', _552 => _552()])).filter((col) => col !== void 0);
17752
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _552 => _552[field], 'optionalCall', _553 => _553()])).filter((col) => col !== void 0);
17752
17753
  }, [params.fields, fieldColumnMap, t, fmt, generateUrl, onClone, onExport]);
17753
17754
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
17754
17755
  }, "useStripePriceTableStructure");
@@ -17807,7 +17808,7 @@ var useStripeProductTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.cal
17807
17808
  })
17808
17809
  };
17809
17810
  const columns = _react.useMemo.call(void 0, () => {
17810
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _553 => _553[field], 'optionalCall', _554 => _554()])).filter((col) => col !== void 0);
17811
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _554 => _554[field], 'optionalCall', _555 => _555()])).filter((col) => col !== void 0);
17811
17812
  }, [params.fields, fieldColumnMap, t, generateUrl]);
17812
17813
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
17813
17814
  }, "useStripeProductTableStructure");
@@ -17830,7 +17831,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, parseQuestionnaire, "parseQuestionnaire");
17830
17831
  var useWaitlistTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => {
17831
17832
  const t = _nextintl.useTranslations.call(void 0, );
17832
17833
  const locale = _chunkVVJDWQEIjs.useI18nLocale.call(void 0, );
17833
- const onInvite = _optionalChain([params, 'access', _555 => _555.context, 'optionalAccess', _556 => _556.onInvite]);
17834
+ const onInvite = _optionalChain([params, 'access', _556 => _556.context, 'optionalAccess', _557 => _557.onInvite]);
17834
17835
  const tableData = _react.useMemo.call(void 0, () => {
17835
17836
  return params.data.map((entry) => {
17836
17837
  const row = { jsonApiData: entry };
@@ -17910,7 +17911,7 @@ var useWaitlistTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(voi
17910
17911
  cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => {
17911
17912
  const entry = row.original.jsonApiData;
17912
17913
  if (entry.status === "confirmed") {
17913
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Button, { size: "sm", variant: "outline", onClick: () => _optionalChain([onInvite, 'optionalCall', _557 => _557(entry)]), children: [
17914
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Button, { size: "sm", variant: "outline", onClick: () => _optionalChain([onInvite, 'optionalCall', _558 => _558(entry)]), children: [
17914
17915
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Send, { className: "me-2 h-4 w-4" }),
17915
17916
  t("waitlist.admin.actions.invite")
17916
17917
  ] });
@@ -17928,7 +17929,7 @@ var useWaitlistTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(voi
17928
17929
  })
17929
17930
  };
17930
17931
  const columns = _react.useMemo.call(void 0, () => {
17931
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _558 => _558[field], 'optionalCall', _559 => _559()])).filter((col) => col !== void 0);
17932
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _559 => _559[field], 'optionalCall', _560 => _560()])).filter((col) => col !== void 0);
17932
17933
  }, [params.fields, fieldColumnMap, t, locale]);
17933
17934
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
17934
17935
  }, "useWaitlistTableStructure");
@@ -18029,11 +18030,11 @@ var useContentTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
18029
18030
  return params.fields.map((field) => {
18030
18031
  const localHandler = fieldColumnMap[field];
18031
18032
  if (localHandler) return localHandler();
18032
- const customHandler = _optionalChain([params, 'access', _560 => _560.context, 'optionalAccess', _561 => _561.customCells, 'optionalAccess', _562 => _562[field]]);
18033
+ const customHandler = _optionalChain([params, 'access', _561 => _561.context, 'optionalAccess', _562 => _562.customCells, 'optionalAccess', _563 => _563[field]]);
18033
18034
  if (customHandler) return customHandler({ t });
18034
18035
  return void 0;
18035
18036
  }).filter((col) => col !== void 0);
18036
- }, [params.fields, fieldColumnMap, t, generateUrl, _optionalChain([params, 'access', _563 => _563.context, 'optionalAccess', _564 => _564.customCells])]);
18037
+ }, [params.fields, fieldColumnMap, t, generateUrl, _optionalChain([params, 'access', _564 => _564.context, 'optionalAccess', _565 => _565.customCells])]);
18037
18038
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
18038
18039
  }, "useContentTableStructure");
18039
18040
 
@@ -18268,17 +18269,17 @@ function useOAuthConsent(params, options) {
18268
18269
  const [error, setError] = _react.useState.call(void 0, null);
18269
18270
  const [isSubmitting, setIsSubmitting] = _react.useState.call(void 0, false);
18270
18271
  const [companyId, setCompanyId] = _react.useState.call(void 0, void 0);
18271
- const contextCompanyId = _optionalChain([useCurrentUserContextOptional, 'call', _565 => _565(), 'optionalAccess', _566 => _566.company, 'optionalAccess', _567 => _567.id]);
18272
- const currentCompanyId = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _568 => _568.defaultCompanyId]), () => ( contextCompanyId));
18272
+ const contextCompanyId = _optionalChain([useCurrentUserContextOptional, 'call', _566 => _566(), 'optionalAccess', _567 => _567.company, 'optionalAccess', _568 => _568.id]);
18273
+ const currentCompanyId = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _569 => _569.defaultCompanyId]), () => ( contextCompanyId));
18273
18274
  const t = _nextintl.useTranslations.call(void 0, );
18274
18275
  const tRef = _react.useRef.call(void 0, t);
18275
18276
  tRef.current = t;
18276
18277
  _react.useEffect.call(void 0, () => {
18277
- const companies = _nullishCoalesce(_optionalChain([clientInfo, 'optionalAccess', _569 => _569.companies]), () => ( []));
18278
+ const companies = _nullishCoalesce(_optionalChain([clientInfo, 'optionalAccess', _570 => _570.companies]), () => ( []));
18278
18279
  if (companies.length === 0) return;
18279
18280
  if (companyId && companies.some((company) => company.id === companyId)) return;
18280
18281
  const current = currentCompanyId ? companies.find((company) => company.id === currentCompanyId) : void 0;
18281
- setCompanyId(_nullishCoalesce(_optionalChain([current, 'optionalAccess', _570 => _570.id]), () => ( _optionalChain([companies, 'access', _571 => _571[0], 'optionalAccess', _572 => _572.id]))));
18282
+ setCompanyId(_nullishCoalesce(_optionalChain([current, 'optionalAccess', _571 => _571.id]), () => ( _optionalChain([companies, 'access', _572 => _572[0], 'optionalAccess', _573 => _573.id]))));
18282
18283
  }, [clientInfo, currentCompanyId, companyId]);
18283
18284
  _react.useEffect.call(void 0, () => {
18284
18285
  const fetchInfo = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
@@ -18364,7 +18365,7 @@ function useOAuthScopeText() {
18364
18365
  };
18365
18366
  }
18366
18367
  const info = typeof scope === "string" ? void 0 : scope;
18367
- return { name: _optionalChain([info, 'optionalAccess', _573 => _573.name]) || id, description: _nullishCoalesce(_optionalChain([info, 'optionalAccess', _574 => _574.description]), () => ( "")) };
18368
+ return { name: _optionalChain([info, 'optionalAccess', _574 => _574.name]) || id, description: _nullishCoalesce(_optionalChain([info, 'optionalAccess', _575 => _575.description]), () => ( "")) };
18368
18369
  },
18369
18370
  [t]
18370
18371
  );
@@ -18418,7 +18419,7 @@ function ContentTableSearch({ data }) {
18418
18419
  const handleSearchIconClick = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
18419
18420
  if (!isExpanded) {
18420
18421
  setIsFocused(true);
18421
- setTimeout(() => _optionalChain([inputRef, 'access', _575 => _575.current, 'optionalAccess', _576 => _576.focus, 'call', _577 => _577()]), 50);
18422
+ setTimeout(() => _optionalChain([inputRef, 'access', _576 => _576.current, 'optionalAccess', _577 => _577.focus, 'call', _578 => _578()]), 50);
18422
18423
  }
18423
18424
  }, "handleSearchIconClick");
18424
18425
  const handleBlur = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
@@ -18504,7 +18505,7 @@ function getGroupKeys(item, field) {
18504
18505
  return [String(_nullishCoalesce(value, () => ( "")))];
18505
18506
  }
18506
18507
  _chunk7QVYU63Ejs.__name.call(void 0, getGroupKeys, "getGroupKeys");
18507
- var isClassComponent = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (component) => typeof component === "function" && !!_optionalChain([component, 'access', _578 => _578.prototype, 'optionalAccess', _579 => _579.isReactComponent]), "isClassComponent");
18508
+ var isClassComponent = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (component) => typeof component === "function" && !!_optionalChain([component, 'access', _579 => _579.prototype, 'optionalAccess', _580 => _580.isReactComponent]), "isClassComponent");
18508
18509
  function StableCell({ render, context }) {
18509
18510
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: render(context) });
18510
18511
  }
@@ -18528,7 +18529,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
18528
18529
  if (data.isLoaded) setPendingDirection(null);
18529
18530
  }, [data.isLoaded]);
18530
18531
  const { data: tableData, columns: tableColumns } = useTableGenerator(props.tableGeneratorType, {
18531
- data: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _580 => _580.data]), () => ( EMPTY_ARRAY)),
18532
+ data: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _581 => _581.data]), () => ( EMPTY_ARRAY)),
18532
18533
  fields,
18533
18534
  checkedIds,
18534
18535
  toggleId,
@@ -18558,7 +18559,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
18558
18559
  ...props.renderExpandedRow && {
18559
18560
  getExpandedRowModel: _reacttable.getExpandedRowModel.call(void 0, ),
18560
18561
  // Key rows by record id so an expansion stays with its record when a search or filter reorders the rows.
18561
- getRowId: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (row, index) => _nullishCoalesce(_optionalChain([row, 'access', _581 => _581.jsonApiData, 'optionalAccess', _582 => _582.id]), () => ( String(index))), "getRowId"),
18562
+ getRowId: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (row, index) => _nullishCoalesce(_optionalChain([row, 'access', _582 => _582.jsonApiData, 'optionalAccess', _583 => _583.id]), () => ( String(index))), "getRowId"),
18562
18563
  getRowCanExpand: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => true, "getRowCanExpand"),
18563
18564
  onExpandedChange: setExpanded,
18564
18565
  state: { expanded }
@@ -18575,7 +18576,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
18575
18576
  });
18576
18577
  const rowModel = tableData ? table.getRowModel() : null;
18577
18578
  const groupedRows = _react.useMemo.call(void 0, () => {
18578
- if (!props.groupBy || !_optionalChain([rowModel, 'optionalAccess', _583 => _583.rows, 'optionalAccess', _584 => _584.length])) return null;
18579
+ if (!props.groupBy || !_optionalChain([rowModel, 'optionalAccess', _584 => _584.rows, 'optionalAccess', _585 => _585.length])) return null;
18579
18580
  const groupMap = /* @__PURE__ */ new Map();
18580
18581
  for (const row of rowModel.rows) {
18581
18582
  const keys = getGroupKeys(row.original, props.groupBy);
@@ -18654,20 +18655,20 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
18654
18655
  ) }),
18655
18656
  !props.hideHeader && table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: headerGroup.headers.map((header) => {
18656
18657
  const meta = header.column.columnDef.meta;
18657
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableHead, { className: _optionalChain([meta, 'optionalAccess', _585 => _585.className]), children: header.isPlaceholder ? null : _reacttable.flexRender.call(void 0, header.column.columnDef.header, header.getContext()) }, header.id);
18658
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableHead, { className: _optionalChain([meta, 'optionalAccess', _586 => _586.className]), children: header.isPlaceholder ? null : _reacttable.flexRender.call(void 0, header.column.columnDef.header, header.getContext()) }, header.id);
18658
18659
  }) }, headerGroup.id))
18659
18660
  ] }),
18660
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: rowModel && _optionalChain([rowModel, 'access', _586 => _586.rows, 'optionalAccess', _587 => _587.length]) ? groupedRows ? groupedRows.map((group) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, React2.default.Fragment, { children: [
18661
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { colSpan: tableColumns.length, className: "bg-muted px-4 py-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MicroLabel, { children: _nullishCoalesce(_optionalChain([props, 'access', _588 => _588.groupLabel, 'optionalCall', _589 => _589(group.groupKey)]), () => ( group.groupKey)) }) }) }),
18661
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: rowModel && _optionalChain([rowModel, 'access', _587 => _587.rows, 'optionalAccess', _588 => _588.length]) ? groupedRows ? groupedRows.map((group) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, React2.default.Fragment, { children: [
18662
+ /* @__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', _589 => _589.groupLabel, 'optionalCall', _590 => _590(group.groupKey)]), () => ( group.groupKey)) }) }) }),
18662
18663
  group.rows.map((row) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, React2.default.Fragment, { children: [
18663
18664
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
18664
18665
  TableRow,
18665
18666
  {
18666
- onClick: () => _optionalChain([onRowClick, 'optionalCall', _590 => _590(row.original.jsonApiData)]),
18667
+ onClick: () => _optionalChain([onRowClick, 'optionalCall', _591 => _591(row.original.jsonApiData)]),
18667
18668
  className: `group ${onRowClick ? "hover:bg-muted/50 cursor-pointer" : ""}`,
18668
18669
  children: row.getVisibleCells().map((cell) => {
18669
18670
  const meta = cell.column.columnDef.meta;
18670
- 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);
18671
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess', _592 => _592.className]), children: renderCell(cell.column.columnDef.cell, cell.getContext()) }, cell.id);
18671
18672
  })
18672
18673
  }
18673
18674
  ),
@@ -18677,11 +18678,11 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
18677
18678
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
18678
18679
  TableRow,
18679
18680
  {
18680
- onClick: () => _optionalChain([onRowClick, 'optionalCall', _592 => _592(row.original.jsonApiData)]),
18681
+ onClick: () => _optionalChain([onRowClick, 'optionalCall', _593 => _593(row.original.jsonApiData)]),
18681
18682
  className: `group ${onRowClick ? "hover:bg-muted/50 cursor-pointer" : ""}`,
18682
18683
  children: row.getVisibleCells().map((cell) => {
18683
18684
  const meta = cell.column.columnDef.meta;
18684
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess', _593 => _593.className]), children: renderCell(cell.column.columnDef.cell, cell.getContext()) }, cell.id);
18685
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess', _594 => _594.className]), children: renderCell(cell.column.columnDef.cell, cell.getContext()) }, cell.id);
18685
18686
  })
18686
18687
  }
18687
18688
  ),
@@ -18696,7 +18697,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
18696
18697
  onClick: (e) => {
18697
18698
  e.preventDefault();
18698
18699
  setPendingDirection("prev");
18699
- _optionalChain([data, 'access', _594 => _594.previous, 'optionalCall', _595 => _595(true)]);
18700
+ _optionalChain([data, 'access', _595 => _595.previous, 'optionalCall', _596 => _596(true)]);
18700
18701
  },
18701
18702
  disabled: !data.previous || pendingDirection !== null,
18702
18703
  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" })
@@ -18711,7 +18712,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
18711
18712
  onClick: (e) => {
18712
18713
  e.preventDefault();
18713
18714
  setPendingDirection("next");
18714
- _optionalChain([data, 'access', _596 => _596.next, 'optionalCall', _597 => _597(true)]);
18715
+ _optionalChain([data, 'access', _597 => _597.next, 'optionalCall', _598 => _598(true)]);
18715
18716
  },
18716
18717
  disabled: !data.next || pendingDirection !== null,
18717
18718
  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" })
@@ -18733,7 +18734,7 @@ function ContentListGrid(props) {
18733
18734
  if (!data.next || !sentinelRef.current) return;
18734
18735
  const observer = new IntersectionObserver(
18735
18736
  (entries) => {
18736
- if (_optionalChain([entries, 'access', _598 => _598[0], 'optionalAccess', _599 => _599.isIntersecting])) _optionalChain([data, 'access', _600 => _600.next, 'optionalCall', _601 => _601()]);
18737
+ if (_optionalChain([entries, 'access', _599 => _599[0], 'optionalAccess', _600 => _600.isIntersecting])) _optionalChain([data, 'access', _601 => _601.next, 'optionalCall', _602 => _602()]);
18737
18738
  },
18738
18739
  { threshold: 0.1, rootMargin: "200px" }
18739
18740
  );
@@ -19520,7 +19521,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
19520
19521
  newDigits[index] = digit;
19521
19522
  setDigits(newDigits);
19522
19523
  if (digit && index < 5) {
19523
- _optionalChain([inputRefs, 'access', _602 => _602.current, 'access', _603 => _603[index + 1], 'optionalAccess', _604 => _604.focus, 'call', _605 => _605()]);
19524
+ _optionalChain([inputRefs, 'access', _603 => _603.current, 'access', _604 => _604[index + 1], 'optionalAccess', _605 => _605.focus, 'call', _606 => _606()]);
19524
19525
  }
19525
19526
  const code = newDigits.join("");
19526
19527
  if (code.length === 6 && newDigits.every((d) => d !== "")) {
@@ -19529,7 +19530,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
19529
19530
  }, "handleChange");
19530
19531
  const handleKeyDown = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (index, e) => {
19531
19532
  if (e.key === "Backspace" && !digits[index] && index > 0) {
19532
- _optionalChain([inputRefs, 'access', _606 => _606.current, 'access', _607 => _607[index - 1], 'optionalAccess', _608 => _608.focus, 'call', _609 => _609()]);
19533
+ _optionalChain([inputRefs, 'access', _607 => _607.current, 'access', _608 => _608[index - 1], 'optionalAccess', _609 => _609.focus, 'call', _610 => _610()]);
19533
19534
  }
19534
19535
  }, "handleKeyDown");
19535
19536
  const handlePaste = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (e) => {
@@ -19538,7 +19539,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
19538
19539
  if (pastedData.length === 6) {
19539
19540
  const newDigits = pastedData.split("");
19540
19541
  setDigits(newDigits);
19541
- _optionalChain([inputRefs, 'access', _610 => _610.current, 'access', _611 => _611[5], 'optionalAccess', _612 => _612.focus, 'call', _613 => _613()]);
19542
+ _optionalChain([inputRefs, 'access', _611 => _611.current, 'access', _612 => _612[5], 'optionalAccess', _613 => _613.focus, 'call', _614 => _614()]);
19542
19543
  onComplete(pastedData);
19543
19544
  }
19544
19545
  }, "handlePaste");
@@ -19750,8 +19751,8 @@ function PasskeySetupDialog({ open, onOpenChange, onSuccess }) {
19750
19751
  try {
19751
19752
  const registrationData = await _chunkVVJDWQEIjs.TwoFactorService.getPasskeyRegistrationOptions({
19752
19753
  id: _uuid.v4.call(void 0, ),
19753
- userName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _614 => _614.email]), () => ( "")),
19754
- userDisplayName: _optionalChain([currentUser, 'optionalAccess', _615 => _615.name])
19754
+ userName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _615 => _615.email]), () => ( "")),
19755
+ userDisplayName: _optionalChain([currentUser, 'optionalAccess', _616 => _616.name])
19755
19756
  });
19756
19757
  const credential = await _browser.startRegistration.call(void 0, { optionsJSON: registrationData.options });
19757
19758
  await _chunkVVJDWQEIjs.TwoFactorService.verifyPasskeyRegistration({
@@ -19903,7 +19904,7 @@ function TotpSetupDialog({ onSuccess, trigger }) {
19903
19904
  const setup = await _chunkVVJDWQEIjs.TwoFactorService.setupTotp({
19904
19905
  id: _uuid.v4.call(void 0, ),
19905
19906
  name: name.trim(),
19906
- accountName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _616 => _616.email]), () => ( ""))
19907
+ accountName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _617 => _617.email]), () => ( ""))
19907
19908
  });
19908
19909
  setQrCodeUri(setup.qrCodeUri);
19909
19910
  setAuthenticatorId(setup.authenticatorId);
@@ -20037,7 +20038,7 @@ function TwoFactorSettings() {
20037
20038
  if (isLoading) {
20038
20039
  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") }) }) });
20039
20040
  }
20040
- const isEnabled = _nullishCoalesce(_optionalChain([status, 'optionalAccess', _617 => _617.isEnabled]), () => ( false));
20041
+ const isEnabled = _nullishCoalesce(_optionalChain([status, 'optionalAccess', _618 => _618.isEnabled]), () => ( false));
20041
20042
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Card, { children: [
20042
20043
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
20043
20044
  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" }),
@@ -20075,7 +20076,7 @@ function TwoFactorSettings() {
20075
20076
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "font-medium", children: t("auth.two_factor.backup_codes") }),
20076
20077
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: t("auth.two_factor.backup_codes_description") })
20077
20078
  ] }),
20078
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BackupCodesDialog, { remainingCodes: _nullishCoalesce(_optionalChain([status, 'optionalAccess', _618 => _618.backupCodesCount]), () => ( 0)), onRegenerate: handleRefresh })
20079
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BackupCodesDialog, { remainingCodes: _nullishCoalesce(_optionalChain([status, 'optionalAccess', _619 => _619.backupCodesCount]), () => ( 0)), onRegenerate: handleRefresh })
20079
20080
  ] }) }),
20080
20081
  !isEnabled && (authenticators.length > 0 || passkeys.length > 0) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
20081
20082
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Separator, {}),
@@ -20255,9 +20256,9 @@ function AcceptInvitation() {
20255
20256
  });
20256
20257
  const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (values) => {
20257
20258
  try {
20258
- if (!_optionalChain([params, 'optionalAccess', _619 => _619.code])) return;
20259
+ if (!_optionalChain([params, 'optionalAccess', _620 => _620.code])) return;
20259
20260
  const payload = {
20260
- code: _optionalChain([params, 'optionalAccess', _620 => _620.code]),
20261
+ code: _optionalChain([params, 'optionalAccess', _621 => _621.code]),
20261
20262
  password: values.password
20262
20263
  };
20263
20264
  await _chunkVVJDWQEIjs.AuthService.acceptInvitation(payload);
@@ -20628,14 +20629,14 @@ function RefreshUser() {
20628
20629
  setUser(fullUser);
20629
20630
  const token = {
20630
20631
  userId: fullUser.id,
20631
- companyId: _optionalChain([fullUser, 'access', _621 => _621.company, 'optionalAccess', _622 => _622.id]),
20632
+ companyId: _optionalChain([fullUser, 'access', _622 => _622.company, 'optionalAccess', _623 => _623.id]),
20632
20633
  roles: fullUser.roles.map((role) => role.id),
20633
- features: _nullishCoalesce(_optionalChain([fullUser, 'access', _623 => _623.company, 'optionalAccess', _624 => _624.features, 'optionalAccess', _625 => _625.map, 'call', _626 => _626((feature) => feature.id)]), () => ( [])),
20634
+ features: _nullishCoalesce(_optionalChain([fullUser, 'access', _624 => _624.company, 'optionalAccess', _625 => _625.features, 'optionalAccess', _626 => _626.map, 'call', _627 => _627((feature) => feature.id)]), () => ( [])),
20634
20635
  modules: fullUser.modules.map((module) => {
20635
20636
  return { id: module.id, permissions: module.permissions };
20636
20637
  })
20637
20638
  };
20638
- await _optionalChain([_chunkVVJDWQEIjs.getTokenHandler.call(void 0, ), 'optionalAccess', _627 => _627.updateToken, 'call', _628 => _628(token)]);
20639
+ await _optionalChain([_chunkVVJDWQEIjs.getTokenHandler.call(void 0, ), 'optionalAccess', _628 => _628.updateToken, 'call', _629 => _629(token)]);
20639
20640
  _cookiesnext.deleteCookie.call(void 0, "reloadData");
20640
20641
  }
20641
20642
  }, "loadFullUser");
@@ -20699,9 +20700,9 @@ function ResetPassword() {
20699
20700
  });
20700
20701
  const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (values) => {
20701
20702
  try {
20702
- if (!_optionalChain([params, 'optionalAccess', _629 => _629.code])) return;
20703
+ if (!_optionalChain([params, 'optionalAccess', _630 => _630.code])) return;
20703
20704
  const payload = {
20704
- code: _optionalChain([params, 'optionalAccess', _630 => _630.code]),
20705
+ code: _optionalChain([params, 'optionalAccess', _631 => _631.code]),
20705
20706
  password: values.password
20706
20707
  };
20707
20708
  await _chunkVVJDWQEIjs.AuthService.resetPassword(payload);
@@ -21236,7 +21237,7 @@ function AiConnectionEditor({
21236
21237
  const registryRows = _react.useMemo.call(void 0, () => _nullishCoalesce(providerRegistry[connectionType], () => ( [])), [providerRegistry, connectionType]);
21237
21238
  const providers = _react.useMemo.call(void 0, () => registryRows.map((row) => row.provider), [registryRows]);
21238
21239
  const fieldsFor = _react.useCallback.call(void 0,
21239
- (provider) => _nullishCoalesce(_optionalChain([registryRows, 'access', _631 => _631.find, 'call', _632 => _632((row) => row.provider === provider), 'optionalAccess', _633 => _633.fields]), () => ( [])),
21240
+ (provider) => _nullishCoalesce(_optionalChain([registryRows, 'access', _632 => _632.find, 'call', _633 => _633((row) => row.provider === provider), 'optionalAccess', _634 => _634.fields]), () => ( [])),
21240
21241
  [registryRows]
21241
21242
  );
21242
21243
  const defaultsFor = _react.useCallback.call(void 0,
@@ -21245,7 +21246,7 @@ function AiConnectionEditor({
21245
21246
  const seeded = {};
21246
21247
  fieldsFor(provider).forEach((descriptor) => {
21247
21248
  if (descriptor.kind === "boolean") {
21248
- const current2 = _optionalChain([stored, 'optionalAccess', _634 => _634[descriptor.field]]);
21249
+ const current2 = _optionalChain([stored, 'optionalAccess', _635 => _635[descriptor.field]]);
21249
21250
  seeded[descriptor.field] = current2 !== void 0 && current2 !== null ? current2 === true : descriptor.default === true;
21250
21251
  return;
21251
21252
  }
@@ -21253,7 +21254,7 @@ function AiConnectionEditor({
21253
21254
  seeded[descriptor.field] = "";
21254
21255
  return;
21255
21256
  }
21256
- const current = _optionalChain([stored, 'optionalAccess', _635 => _635[descriptor.field]]);
21257
+ const current = _optionalChain([stored, 'optionalAccess', _636 => _636[descriptor.field]]);
21257
21258
  if (current !== void 0 && current !== null) seeded[descriptor.field] = String(current);
21258
21259
  else seeded[descriptor.field] = descriptor.default !== void 0 ? String(descriptor.default) : "";
21259
21260
  });
@@ -21279,7 +21280,7 @@ function AiConnectionEditor({
21279
21280
  values: _zod3.z.record(_zod3.z.string(), _zod3.z.any())
21280
21281
  }).superRefine((data, ctx) => {
21281
21282
  fieldsFor(data.provider).filter((descriptor) => descriptor.required).forEach((descriptor) => {
21282
- const value = _optionalChain([data, 'access', _636 => _636.values, 'optionalAccess', _637 => _637[descriptor.field]]);
21283
+ const value = _optionalChain([data, 'access', _637 => _637.values, 'optionalAccess', _638 => _638[descriptor.field]]);
21283
21284
  const filled = descriptor.kind === "secret" ? !!value || hasStoredSecret(descriptor.field) : descriptor.kind === "boolean" ? value !== void 0 : value !== void 0 && value !== null && String(value).trim() !== "";
21284
21285
  if (filled) return;
21285
21286
  ctx.addIssue({
@@ -21293,11 +21294,11 @@ function AiConnectionEditor({
21293
21294
  );
21294
21295
  const getDefaultValues = _react.useCallback.call(void 0,
21295
21296
  () => ({
21296
- id: _nullishCoalesce(_optionalChain([connection, 'optionalAccess', _638 => _638.id]), () => ( _uuid.v4.call(void 0, ))),
21297
- name: _nullishCoalesce(_optionalChain([connection, 'optionalAccess', _639 => _639.name]), () => ( "")),
21298
- provider: _nullishCoalesce(_nullishCoalesce(_optionalChain([connection, 'optionalAccess', _640 => _640.provider]), () => ( providers[0])), () => ( "")),
21299
- enabled: _nullishCoalesce(_optionalChain([connection, 'optionalAccess', _641 => _641.enabled]), () => ( true)),
21300
- values: defaultsFor(_nullishCoalesce(_nullishCoalesce(_optionalChain([connection, 'optionalAccess', _642 => _642.provider]), () => ( providers[0])), () => ( "")))
21297
+ id: _nullishCoalesce(_optionalChain([connection, 'optionalAccess', _639 => _639.id]), () => ( _uuid.v4.call(void 0, ))),
21298
+ name: _nullishCoalesce(_optionalChain([connection, 'optionalAccess', _640 => _640.name]), () => ( "")),
21299
+ provider: _nullishCoalesce(_nullishCoalesce(_optionalChain([connection, 'optionalAccess', _641 => _641.provider]), () => ( providers[0])), () => ( "")),
21300
+ enabled: _nullishCoalesce(_optionalChain([connection, 'optionalAccess', _642 => _642.enabled]), () => ( true)),
21301
+ values: defaultsFor(_nullishCoalesce(_nullishCoalesce(_optionalChain([connection, 'optionalAccess', _643 => _643.provider]), () => ( providers[0])), () => ( "")))
21301
21302
  }),
21302
21303
  [connection, providers, defaultsFor]
21303
21304
  );
@@ -21308,7 +21309,7 @@ function AiConnectionEditor({
21308
21309
  _react.useEffect.call(void 0, () => {
21309
21310
  if (registryRows.length === 0) return;
21310
21311
  const currentProvider = form.getValues("provider");
21311
- const provider = currentProvider || _optionalChain([connection, 'optionalAccess', _643 => _643.provider]) || providers[0] || "";
21312
+ const provider = currentProvider || _optionalChain([connection, 'optionalAccess', _644 => _644.provider]) || providers[0] || "";
21312
21313
  if (!provider) return;
21313
21314
  if (provider !== currentProvider) form.setValue("provider", provider);
21314
21315
  const currentValues = form.getValues("values");
@@ -21379,7 +21380,7 @@ function AiConnectionEditor({
21379
21380
  {
21380
21381
  form,
21381
21382
  entityType: t("ai_connections.admin.entity"),
21382
- entityName: _optionalChain([connection, 'optionalAccess', _644 => _644.name]),
21383
+ entityName: _optionalChain([connection, 'optionalAccess', _645 => _645.name]),
21383
21384
  isEdit,
21384
21385
  module: _chunkVVJDWQEIjs.Modules.AiConnection,
21385
21386
  size: "md",
@@ -21387,7 +21388,7 @@ function AiConnectionEditor({
21387
21388
  onSubmit: async (values) => {
21388
21389
  const attributes = {};
21389
21390
  fieldsFor(values.provider).forEach((descriptor) => {
21390
- const coerced = coerce(descriptor, _optionalChain([values, 'access', _645 => _645.values, 'optionalAccess', _646 => _646[descriptor.field]]));
21391
+ const coerced = coerce(descriptor, _optionalChain([values, 'access', _646 => _646.values, 'optionalAccess', _647 => _647[descriptor.field]]));
21391
21392
  if (coerced !== void 0) attributes[descriptor.field] = coerced;
21392
21393
  });
21393
21394
  const payload = {
@@ -21617,7 +21618,7 @@ function AiConnectionTypeCard({ connectionType }) {
21617
21618
  ),
21618
21619
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "bg-muted/40 flex flex-wrap items-center gap-2 px-3 py-2", children: [
21619
21620
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { variant: "softGray", children: t("ai_connections.admin.env_fallback") }),
21620
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground truncate text-xs", children: [_optionalChain([envDefault, 'optionalAccess', _647 => _647.provider]), _optionalChain([envDefault, 'optionalAccess', _648 => _648.model]), _optionalChain([envDefault, 'optionalAccess', _649 => _649.url])].filter(Boolean).join(" \xB7 ") })
21621
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground truncate text-xs", children: [_optionalChain([envDefault, 'optionalAccess', _648 => _648.provider]), _optionalChain([envDefault, 'optionalAccess', _649 => _649.model]), _optionalChain([envDefault, 'optionalAccess', _650 => _650.url])].filter(Boolean).join(" \xB7 ") })
21621
21622
  ] })
21622
21623
  ] })
21623
21624
  ] })
@@ -21815,7 +21816,7 @@ function extractHeadings(blocks) {
21815
21816
  function processBlocks(blockArray) {
21816
21817
  for (const block of blockArray) {
21817
21818
  if (block.type === "heading") {
21818
- const level = _optionalChain([block, 'access', _650 => _650.props, 'optionalAccess', _651 => _651.level]) || 1;
21819
+ const level = _optionalChain([block, 'access', _651 => _651.props, 'optionalAccess', _652 => _652.level]) || 1;
21819
21820
  const text = extractTextFromContent(block.content);
21820
21821
  if (text.trim()) {
21821
21822
  headings.push({
@@ -22175,7 +22176,7 @@ var useHowToTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0
22175
22176
  })
22176
22177
  };
22177
22178
  const columns = _react.useMemo.call(void 0, () => {
22178
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _652 => _652[field], 'optionalCall', _653 => _653()])).filter((col) => col !== void 0);
22179
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _653 => _653[field], 'optionalCall', _654 => _654()])).filter((col) => col !== void 0);
22179
22180
  }, [params.fields, fieldColumnMap, t, generateUrl]);
22180
22181
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
22181
22182
  }, "useHowToTableStructure");
@@ -22301,7 +22302,7 @@ function HowToSelector({
22301
22302
  }, "setHowTo");
22302
22303
  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: [
22303
22304
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between", children: [
22304
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-row items-center justify-start rounded-md", children: field.value ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-input/20 dark:bg-input/30 border-input flex h-7 w-full flex-row items-center justify-start rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _nullishCoalesce(_optionalChain([field, 'access', _654 => _654.value, 'optionalAccess', _655 => _655.name]), () => ( "")) }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-input/20 dark:bg-input/30 border-input text-muted-foreground flex h-7 w-full flex-row items-center justify-start rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed", children: _nullishCoalesce(placeholder, () => ( t(`generic.search.placeholder`, { type: t(`entities.howtos`, { count: 1 }) }))) }) }) }),
22305
+ /* @__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', _655 => _655.value, 'optionalAccess', _656 => _656.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 }) }))) }) }) }),
22305
22306
  field.value && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
22306
22307
  _lucidereact.CircleX,
22307
22308
  {
@@ -22606,10 +22607,10 @@ function CitationsTab({ citations, sources }) {
22606
22607
  ] }) }),
22607
22608
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: sorted.map((chunk) => {
22608
22609
  const isOpen = expanded.has(chunk.id);
22609
- const resolved = chunk.nodeId ? _optionalChain([sources, 'optionalAccess', _656 => _656.get, 'call', _657 => _657(chunk.nodeId)]) : void 0;
22610
+ const resolved = chunk.nodeId ? _optionalChain([sources, 'optionalAccess', _657 => _657.get, 'call', _658 => _658(chunk.nodeId)]) : void 0;
22610
22611
  const typeLabel = chunk.nodeType ? entityLabel(chunk.nodeType) : t("features.assistant.message.sources.source");
22611
22612
  const fallbackName = chunk.nodeId ? `${typeLabel} ${chunk.nodeId.slice(0, 8)}` : typeLabel;
22612
- const sourceName = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _658 => _658.name]), () => ( fallbackName));
22613
+ const sourceName = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _659 => _659.name]), () => ( fallbackName));
22613
22614
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react.Fragment, { children: [
22614
22615
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, TableRow, { children: [
22615
22616
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
@@ -22673,7 +22674,7 @@ function ContentsTab({ citations, sources }) {
22673
22674
  for (const c of citations) {
22674
22675
  const id = c.nodeId;
22675
22676
  if (!id) continue;
22676
- const source = _optionalChain([sources, 'optionalAccess', _659 => _659.get, 'call', _660 => _660(id)]);
22677
+ const source = _optionalChain([sources, 'optionalAccess', _660 => _660.get, 'call', _661 => _661(id)]);
22677
22678
  if (!source) continue;
22678
22679
  const existing = map.get(id);
22679
22680
  if (existing) {
@@ -22740,7 +22741,7 @@ function UsersTab({ users, citations, sources }) {
22740
22741
  const generate = usePageUrlGenerator();
22741
22742
  const userMap = /* @__PURE__ */ new Map();
22742
22743
  for (const u of users) {
22743
- if (!_optionalChain([u, 'optionalAccess', _661 => _661.id])) continue;
22744
+ if (!_optionalChain([u, 'optionalAccess', _662 => _662.id])) continue;
22744
22745
  userMap.set(u.id, { user: u, contentCount: 0, citationCount: 0 });
22745
22746
  }
22746
22747
  if (citations && sources) {
@@ -22845,7 +22846,7 @@ function MessageSourcesPanel({ message, isLatestAssistant, onSelectFollowUp, sou
22845
22846
  }
22846
22847
  return ids.size;
22847
22848
  }, [message.citations, sources]);
22848
- const usersCount = _nullishCoalesce(_optionalChain([users, 'optionalAccess', _662 => _662.length]), () => ( 0));
22849
+ const usersCount = _nullishCoalesce(_optionalChain([users, 'optionalAccess', _663 => _663.length]), () => ( 0));
22849
22850
  const total = refsCount + citationsCount + contentsCount + usersCount + suggestionsCount;
22850
22851
  const visibleTabs = [];
22851
22852
  if (suggestionsCount > 0) visibleTabs.push("suggested");
@@ -22988,7 +22989,7 @@ function MessageSourcesContainer({ message, isLatestAssistant, onSelectFollowUp
22988
22989
  return void 0;
22989
22990
  }
22990
22991
  })()));
22991
- if (_optionalChain([author, 'optionalAccess', _663 => _663.id])) userMap.set(author.id, author);
22992
+ if (_optionalChain([author, 'optionalAccess', _664 => _664.id])) userMap.set(author.id, author);
22992
22993
  }
22993
22994
  return Array.from(userMap.values());
22994
22995
  }, [resolved]);
@@ -23023,7 +23024,7 @@ function MessageItem({
23023
23024
  }) {
23024
23025
  const t = _nextintl.useTranslations.call(void 0, );
23025
23026
  const isUser = message.role === "user";
23026
- const isFailed = isUser && !!_optionalChain([failedMessageIds, 'optionalAccess', _664 => _664.has, 'call', _665 => _665(message.id)]);
23027
+ const isFailed = isUser && !!_optionalChain([failedMessageIds, 'optionalAccess', _665 => _665.has, 'call', _666 => _666(message.id)]);
23027
23028
  const markdownComponents = _react.useMemo.call(void 0,
23028
23029
  () => ({
23029
23030
  a: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ href, children }) => {
@@ -23040,7 +23041,7 @@ function MessageItem({
23040
23041
  isFailed && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-destructive flex items-center gap-2 text-xs", children: [
23041
23042
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.AlertCircle, { className: "h-3.5 w-3.5" }),
23042
23043
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: t("features.assistant.send_failed") }),
23043
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", onClick: () => _optionalChain([onRetry, 'optionalCall', _666 => _666(message.id)]), children: t("features.assistant.retry") })
23044
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", onClick: () => _optionalChain([onRetry, 'optionalCall', _667 => _667(message.id)]), children: t("features.assistant.retry") })
23044
23045
  ] })
23045
23046
  ] });
23046
23047
  }
@@ -23131,7 +23132,7 @@ function AssistantThread({
23131
23132
  }) {
23132
23133
  const lastMessageRef = _react.useRef.call(void 0, null);
23133
23134
  _react.useEffect.call(void 0, () => {
23134
- _optionalChain([lastMessageRef, 'access', _667 => _667.current, 'optionalAccess', _668 => _668.scrollIntoView, 'call', _669 => _669({ block: "start", behavior: "smooth" })]);
23135
+ _optionalChain([lastMessageRef, 'access', _668 => _668.current, 'optionalAccess', _669 => _669.scrollIntoView, 'call', _670 => _670({ block: "start", behavior: "smooth" })]);
23135
23136
  }, [messages.length, sending]);
23136
23137
  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: [
23137
23138
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -23170,7 +23171,7 @@ ${message.sources.map((source) => `- \`${source}\``).join("\n")}`;
23170
23171
  return _chunkVVJDWQEIjs.rehydrate.call(void 0, _chunkVVJDWQEIjs.Modules.HandbookThreadMessage, {
23171
23172
  jsonApi: {
23172
23173
  ...dehydrated.jsonApi,
23173
- attributes: { ..._nullishCoalesce(_optionalChain([dehydrated, 'access', _670 => _670.jsonApi, 'optionalAccess', _671 => _671.attributes]), () => ( {})), content }
23174
+ attributes: { ..._nullishCoalesce(_optionalChain([dehydrated, 'access', _671 => _671.jsonApi, 'optionalAccess', _672 => _672.attributes]), () => ( {})), content }
23174
23175
  },
23175
23176
  included: dehydrated.included
23176
23177
  });
@@ -23179,8 +23180,8 @@ _chunk7QVYU63Ejs.__name.call(void 0, withSourcesInContent, "withSourcesInContent
23179
23180
  function useHandbookAsk(params) {
23180
23181
  const t = _nextintl.useTranslations.call(void 0, );
23181
23182
  const generateUrl = usePageUrlGenerator();
23182
- const shouldSyncUrl = _nullishCoalesce(_optionalChain([params, 'optionalAccess', _672 => _672.syncUrl]), () => ( true));
23183
- const handbookThreadId = _optionalChain([params, 'optionalAccess', _673 => _673.handbookThreadId]);
23183
+ const shouldSyncUrl = _nullishCoalesce(_optionalChain([params, 'optionalAccess', _673 => _673.syncUrl]), () => ( true));
23184
+ const handbookThreadId = _optionalChain([params, 'optionalAccess', _674 => _674.handbookThreadId]);
23184
23185
  const [threads, setThreads] = _react.useState.call(void 0, []);
23185
23186
  const [thread, setThread] = _react.useState.call(void 0, void 0);
23186
23187
  const [messages, setMessages] = _react.useState.call(void 0, []);
@@ -23242,12 +23243,12 @@ function useHandbookAsk(params) {
23242
23243
  ]);
23243
23244
  setSending(true);
23244
23245
  try {
23245
- let id = _optionalChain([thread, 'optionalAccess', _674 => _674.id]);
23246
+ let id = _optionalChain([thread, 'optionalAccess', _675 => _675.id]);
23246
23247
  if (id === void 0) {
23247
23248
  const created = await _chunkVVJDWQEIjs.HandbookThreadService.create({
23248
23249
  id: _uuid.v4.call(void 0, ),
23249
23250
  question: trimmed,
23250
- handbookPageId: _optionalChain([options, 'optionalAccess', _675 => _675.handbookPageId])
23251
+ handbookPageId: _optionalChain([options, 'optionalAccess', _676 => _676.handbookPageId])
23251
23252
  });
23252
23253
  id = created.id;
23253
23254
  setThreads((current) => [created, ...current]);
@@ -23256,7 +23257,7 @@ function useHandbookAsk(params) {
23256
23257
  id: _uuid.v4.call(void 0, ),
23257
23258
  threadId: id,
23258
23259
  question: trimmed,
23259
- handbookPageId: _optionalChain([options, 'optionalAccess', _676 => _676.handbookPageId])
23260
+ handbookPageId: _optionalChain([options, 'optionalAccess', _677 => _677.handbookPageId])
23260
23261
  });
23261
23262
  }
23262
23263
  const loaded = await _chunkVVJDWQEIjs.HandbookThreadService.findOne({ id });
@@ -23277,7 +23278,7 @@ function useHandbookAsk(params) {
23277
23278
  setSending(false);
23278
23279
  }
23279
23280
  },
23280
- [messages.length, sending, syncUrl, t, _optionalChain([thread, 'optionalAccess', _677 => _677.id])]
23281
+ [messages.length, sending, syncUrl, t, _optionalChain([thread, 'optionalAccess', _678 => _678.id])]
23281
23282
  );
23282
23283
  return { threads, thread, messages, sending, ask, selectThread, startNew };
23283
23284
  }
@@ -23833,7 +23834,7 @@ function HandbookPageContainer({ handbookPageId }) {
23833
23834
  };
23834
23835
  }, []);
23835
23836
  const section = _react.useMemo.call(void 0,
23836
- () => sections.find((candidate) => candidate.key === _optionalChain([handbookPage, 'optionalAccess', _678 => _678.section])),
23837
+ () => sections.find((candidate) => candidate.key === _optionalChain([handbookPage, 'optionalAccess', _679 => _679.section])),
23837
23838
  [sections, handbookPage]
23838
23839
  );
23839
23840
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -23922,7 +23923,7 @@ function AssistantSidebar({
23922
23923
  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"),
23923
23924
  children: [
23924
23925
  thread.title,
23925
- _optionalChain([renderThreadBadge, 'optionalCall', _679 => _679(thread)])
23926
+ _optionalChain([renderThreadBadge, 'optionalCall', _680 => _680(thread)])
23926
23927
  ]
23927
23928
  },
23928
23929
  thread.id
@@ -23958,7 +23959,7 @@ function HandbookAskContainer({ handbookThreadId } = {}) {
23958
23959
  AssistantSidebar,
23959
23960
  {
23960
23961
  threads,
23961
- activeId: _optionalChain([thread, 'optionalAccess', _680 => _680.id]),
23962
+ activeId: _optionalChain([thread, 'optionalAccess', _681 => _681.id]),
23962
23963
  onSelect: selectThread,
23963
23964
  onNew: startNew,
23964
23965
  newLabel: t("handbook.chat.new"),
@@ -23966,7 +23967,7 @@ function HandbookAskContainer({ handbookThreadId } = {}) {
23966
23967
  }
23967
23968
  ) })
23968
23969
  ),
23969
- [selectThread, startNew, t, _optionalChain([thread, 'optionalAccess', _681 => _681.id]), threads]
23970
+ [selectThread, startNew, t, _optionalChain([thread, 'optionalAccess', _682 => _682.id]), threads]
23970
23971
  );
23971
23972
  return (
23972
23973
  // `RoundPageContainer` reads the page heading from the shared context, and
@@ -23978,7 +23979,7 @@ function HandbookAskContainer({ handbookThreadId } = {}) {
23978
23979
  RoundPageContainer,
23979
23980
  {
23980
23981
  module: _chunkVVJDWQEIjs.Modules.HandbookPage,
23981
- id: _optionalChain([thread, 'optionalAccess', _682 => _682.id]),
23982
+ id: _optionalChain([thread, 'optionalAccess', _683 => _683.id]),
23982
23983
  fullWidth: true,
23983
23984
  forceHeader: true,
23984
23985
  defaultDetailsOpen: true,
@@ -24030,7 +24031,7 @@ function EntityMentionLinkView({ type, id, alias }) {
24030
24031
  } catch (e26) {
24031
24032
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: alias });
24032
24033
  }
24033
- if (!_optionalChain([module, 'optionalAccess', _683 => _683.pageUrl])) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: alias });
24034
+ if (!_optionalChain([module, 'optionalAccess', _684 => _684.pageUrl])) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: alias });
24034
24035
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Link, { href: generate({ page: module, id }), children: alias });
24035
24036
  }
24036
24037
  _chunk7QVYU63Ejs.__name.call(void 0, EntityMentionLinkView, "EntityMentionLinkView");
@@ -24162,13 +24163,13 @@ function AssistantContainer({
24162
24163
  AssistantSidebar,
24163
24164
  {
24164
24165
  threads: ctx.threads,
24165
- activeId: _optionalChain([ctx, 'access', _684 => _684.assistant, 'optionalAccess', _685 => _685.id]),
24166
+ activeId: _optionalChain([ctx, 'access', _685 => _685.assistant, 'optionalAccess', _686 => _686.id]),
24166
24167
  onSelect: ctx.selectThread,
24167
24168
  renderThreadBadge
24168
24169
  }
24169
24170
  ) })
24170
24171
  ),
24171
- [ctx.threads, _optionalChain([ctx, 'access', _686 => _686.assistant, 'optionalAccess', _687 => _687.id]), ctx.selectThread, renderThreadBadge]
24172
+ [ctx.threads, _optionalChain([ctx, 'access', _687 => _687.assistant, 'optionalAccess', _688 => _688.id]), ctx.selectThread, renderThreadBadge]
24172
24173
  );
24173
24174
  const thread = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: !showThread ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
24174
24175
  AssistantEmptyState,
@@ -24176,7 +24177,7 @@ function AssistantContainer({
24176
24177
  onSend: ctx.sendMessage,
24177
24178
  operatorMode: ctx.operatorMode,
24178
24179
  onOperatorModeChange: showOperatorToggle ? ctx.setOperatorMode : void 0,
24179
- composerLeading: _optionalChain([renderScopePicker, 'optionalCall', _688 => _688()])
24180
+ composerLeading: _optionalChain([renderScopePicker, 'optionalCall', _689 => _689()])
24180
24181
  }
24181
24182
  ) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
24182
24183
  ctx.assistant ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -24208,7 +24209,7 @@ function AssistantContainer({
24208
24209
  AssistantSidebar,
24209
24210
  {
24210
24211
  threads: ctx.threads,
24211
- activeId: _optionalChain([ctx, 'access', _689 => _689.assistant, 'optionalAccess', _690 => _690.id]),
24212
+ activeId: _optionalChain([ctx, 'access', _690 => _690.assistant, 'optionalAccess', _691 => _691.id]),
24212
24213
  onSelect: ctx.selectThread,
24213
24214
  onNew: ctx.startNew,
24214
24215
  renderThreadBadge
@@ -24221,7 +24222,7 @@ function AssistantContainer({
24221
24222
  RoundPageContainer,
24222
24223
  {
24223
24224
  module: _chunkVVJDWQEIjs.Modules.Assistant,
24224
- id: _optionalChain([ctx, 'access', _691 => _691.assistant, 'optionalAccess', _692 => _692.id]),
24225
+ id: _optionalChain([ctx, 'access', _692 => _692.assistant, 'optionalAccess', _693 => _693.id]),
24225
24226
  fullWidth: true,
24226
24227
  forceHeader: true,
24227
24228
  defaultDetailsOpen: true,
@@ -24249,7 +24250,7 @@ function flattenBlocks(blocks) {
24249
24250
  if (typeof inline === "string") return inline;
24250
24251
  if (!inline || typeof inline !== "object") return "";
24251
24252
  const node = inline;
24252
- if (node.type === "mention") return _nullishCoalesce(_optionalChain([node, 'access', _693 => _693.props, 'optionalAccess', _694 => _694.alias]), () => ( ""));
24253
+ if (node.type === "mention") return _nullishCoalesce(_optionalChain([node, 'access', _694 => _694.props, 'optionalAccess', _695 => _695.alias]), () => ( ""));
24253
24254
  if (typeof node.text === "string") return node.text;
24254
24255
  if (Array.isArray(node.content)) return node.content.map(readInline).join("");
24255
24256
  return "";
@@ -24365,7 +24366,7 @@ function AssistantPageContainer({
24365
24366
  AssistantSidebar,
24366
24367
  {
24367
24368
  threads: ctx.threads,
24368
- activeId: _optionalChain([ctx, 'access', _695 => _695.assistant, 'optionalAccess', _696 => _696.id]),
24369
+ activeId: _optionalChain([ctx, 'access', _696 => _696.assistant, 'optionalAccess', _697 => _697.id]),
24369
24370
  onSelect: ctx.selectThread,
24370
24371
  onNew: ctx.startNew
24371
24372
  }
@@ -24641,14 +24642,14 @@ function ApprovalActionCard({ actionId, summary, onResolved, hiddenRelationshipK
24641
24642
  const presented = _react.useMemo.call(void 0, () => parseOperatorProposal(actionProposal), [actionProposal]);
24642
24643
  const legacy = _react.useMemo.call(void 0, () => presented ? void 0 : parseLegacyProposal(toolArgs), [presented, toolArgs]);
24643
24644
  const isUpdate = toolName === "update_entity";
24644
- const entityType = _nullishCoalesce(_nullishCoalesce(_optionalChain([presented, 'optionalAccess', _697 => _697.type]), () => ( _optionalChain([legacy, 'optionalAccess', _698 => _698.type]))), () => ( ""));
24645
+ const entityType = _nullishCoalesce(_nullishCoalesce(_optionalChain([presented, 'optionalAccess', _698 => _698.type]), () => ( _optionalChain([legacy, 'optionalAccess', _699 => _699.type]))), () => ( ""));
24645
24646
  const loose = t;
24646
24647
  const entityLabel = entityName(loose, entityType);
24647
- const targetLabel = _nullishCoalesce(_optionalChain([presented, 'optionalAccess', _699 => _699.target, 'optionalAccess', _700 => _700.label]), () => ( ""));
24648
+ const targetLabel = _nullishCoalesce(_optionalChain([presented, 'optionalAccess', _700 => _700.target, 'optionalAccess', _701 => _701.label]), () => ( ""));
24648
24649
  const rows = _react.useMemo.call(void 0, () => {
24649
24650
  const yes = t("features.assistant.approval.proposal.yes");
24650
24651
  const no = t("features.assistant.approval.proposal.no");
24651
- const attributes = _nullishCoalesce(_optionalChain([presented, 'optionalAccess', _701 => _701.attributes]), () => ( _optionalChain([legacy, 'optionalAccess', _702 => _702.attributes])));
24652
+ const attributes = _nullishCoalesce(_optionalChain([presented, 'optionalAccess', _702 => _702.attributes]), () => ( _optionalChain([legacy, 'optionalAccess', _703 => _703.attributes])));
24652
24653
  const attributeRows = Object.entries(_nullishCoalesce(attributes, () => ( {}))).flatMap(([key, value]) => {
24653
24654
  const text = formatAttribute(value, yes, no);
24654
24655
  return text === void 0 ? [] : [{ key: `attribute:${key}`, label: fieldLabel(loose, entityType, key), value: text }];
@@ -24686,7 +24687,7 @@ function ApprovalActionCard({ actionId, summary, onResolved, hiddenRelationshipK
24686
24687
  try {
24687
24688
  const message = kind === "approve" ? await _chunkVVJDWQEIjs.AssistantActionService.approve({ id: actionId }) : await _chunkVVJDWQEIjs.AssistantActionService.deny({ id: actionId });
24688
24689
  setStatus(kind === "approve" ? "executed" : "denied");
24689
- if (message) _optionalChain([onResolved, 'optionalCall', _703 => _703(message)]);
24690
+ if (message) _optionalChain([onResolved, 'optionalCall', _704 => _704(message)]);
24690
24691
  } catch (error) {
24691
24692
  console.error(`ApprovalActionCard: failed to ${kind} assistant action ${actionId}`, error);
24692
24693
  setFailed(true);
@@ -24831,10 +24832,10 @@ var useNotificationTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call
24831
24832
  const dateLocale = _chunkVVJDWQEIjs.dateFormatLocale.call(void 0, _chunkVVJDWQEIjs.useI18nLocale.call(void 0, ));
24832
24833
  const generateUrl = usePageUrlGenerator();
24833
24834
  const { loadNotifications } = useNotificationContext();
24834
- const archived = _optionalChain([params, 'access', _704 => _704.context, 'optionalAccess', _705 => _705.archived]) === true;
24835
+ const archived = _optionalChain([params, 'access', _705 => _705.context, 'optionalAccess', _706 => _706.archived]) === true;
24835
24836
  const archiveNotification = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (notification) => {
24836
24837
  await _chunkVVJDWQEIjs.NotificationService.archive({ id: notification.id });
24837
- _optionalChain([params, 'access', _706 => _706.dataRetriever, 'optionalAccess', _707 => _707.removeElement, 'call', _708 => _708(notification)]);
24838
+ _optionalChain([params, 'access', _707 => _707.dataRetriever, 'optionalAccess', _708 => _708.removeElement, 'call', _709 => _709(notification)]);
24838
24839
  await loadNotifications();
24839
24840
  }, "archiveNotification");
24840
24841
  const tableData = _react.useMemo.call(void 0, () => {
@@ -24873,7 +24874,7 @@ var useNotificationTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call
24873
24874
  const data = generateNotificationData({ notification, generateUrl });
24874
24875
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-foreground text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
24875
24876
  strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { className: "font-medium", children: chunks }), "strong"),
24876
- actor: _nullishCoalesce(_optionalChain([data, 'access', _709 => _709.actor, 'optionalAccess', _710 => _710.name]), () => ( "")),
24877
+ actor: _nullishCoalesce(_optionalChain([data, 'access', _710 => _710.actor, 'optionalAccess', _711 => _711.name]), () => ( "")),
24877
24878
  title: data.title,
24878
24879
  message: _nullishCoalesce(notification.message, () => ( ""))
24879
24880
  }) });
@@ -24928,7 +24929,7 @@ var useNotificationTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call
24928
24929
  })
24929
24930
  };
24930
24931
  const columns = _react.useMemo.call(void 0, () => {
24931
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _711 => _711[field], 'optionalCall', _712 => _712()])).filter((col) => col !== void 0);
24932
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _712 => _712[field], 'optionalCall', _713 => _713()])).filter((col) => col !== void 0);
24932
24933
  }, [params.fields, fieldColumnMap, t, generateUrl]);
24933
24934
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
24934
24935
  }, "useNotificationTableStructure");
@@ -25346,7 +25347,7 @@ var DEFAULT_TRANSLATIONS = {
25346
25347
  invalidEmail: "Please enter a valid email address"
25347
25348
  };
25348
25349
  async function copyToClipboard(text) {
25349
- if (_optionalChain([navigator, 'access', _713 => _713.clipboard, 'optionalAccess', _714 => _714.writeText])) {
25350
+ if (_optionalChain([navigator, 'access', _714 => _714.clipboard, 'optionalAccess', _715 => _715.writeText])) {
25350
25351
  try {
25351
25352
  await navigator.clipboard.writeText(text);
25352
25353
  return true;
@@ -25388,7 +25389,7 @@ function ReferralWidget({
25388
25389
  const linkInputRef = _react.useRef.call(void 0, null);
25389
25390
  const config = _chunkTO6IYGMLjs.getReferralConfig.call(void 0, );
25390
25391
  const baseUrl = config.referralUrlBase || (typeof window !== "undefined" ? window.location.origin : "");
25391
- const referralUrl = _optionalChain([stats, 'optionalAccess', _715 => _715.referralCode]) ? `${baseUrl}${config.referralPath}?${config.urlParamName}=${stats.referralCode}` : "";
25392
+ const referralUrl = _optionalChain([stats, 'optionalAccess', _716 => _716.referralCode]) ? `${baseUrl}${config.referralPath}?${config.urlParamName}=${stats.referralCode}` : "";
25392
25393
  if (!_chunkTO6IYGMLjs.isReferralEnabled.call(void 0, )) {
25393
25394
  return null;
25394
25395
  }
@@ -25398,7 +25399,7 @@ function ReferralWidget({
25398
25399
  if (success) {
25399
25400
  setCopied(true);
25400
25401
  _chunkVVJDWQEIjs.showToast.call(void 0, t.copiedMessage);
25401
- _optionalChain([onLinkCopied, 'optionalCall', _716 => _716()]);
25402
+ _optionalChain([onLinkCopied, 'optionalCall', _717 => _717()]);
25402
25403
  setTimeout(() => setCopied(false), 2e3);
25403
25404
  } else {
25404
25405
  _chunkVVJDWQEIjs.showError.call(void 0, t.copyError);
@@ -25412,12 +25413,12 @@ function ReferralWidget({
25412
25413
  try {
25413
25414
  await sendInvite(email);
25414
25415
  _chunkVVJDWQEIjs.showToast.call(void 0, t.inviteSent);
25415
- _optionalChain([onInviteSent, 'optionalCall', _717 => _717(email)]);
25416
+ _optionalChain([onInviteSent, 'optionalCall', _718 => _718(email)]);
25416
25417
  setEmail("");
25417
25418
  } catch (err) {
25418
25419
  const error2 = err instanceof Error ? err : new Error(t.inviteError);
25419
25420
  _chunkVVJDWQEIjs.showError.call(void 0, error2.message);
25420
- _optionalChain([onInviteError, 'optionalCall', _718 => _718(error2)]);
25421
+ _optionalChain([onInviteError, 'optionalCall', _719 => _719(error2)]);
25421
25422
  }
25422
25423
  }, [email, sendInvite, t.inviteSent, t.inviteError, t.invalidEmail, onInviteSent, onInviteError]);
25423
25424
  const handleEmailKeyDown = _react.useCallback.call(void 0,
@@ -26185,7 +26186,7 @@ function OAuthClientList({
26185
26186
  OAuthClientCard,
26186
26187
  {
26187
26188
  client,
26188
- onClick: () => _optionalChain([onClientClick, 'optionalCall', _719 => _719(client)]),
26189
+ onClick: () => _optionalChain([onClientClick, 'optionalCall', _720 => _720(client)]),
26189
26190
  onEdit: onEditClick ? () => onEditClick(client) : void 0,
26190
26191
  onDelete: onDeleteClick ? () => onDeleteClick(client) : void 0
26191
26192
  },
@@ -26210,11 +26211,11 @@ function OAuthClientForm({
26210
26211
  const t = _nextintl.useTranslations.call(void 0, );
26211
26212
  const isEditMode = !!client;
26212
26213
  const [formState, setFormState] = _react.useState.call(void 0, {
26213
- name: _optionalChain([client, 'optionalAccess', _720 => _720.name]) || "",
26214
- description: _optionalChain([client, 'optionalAccess', _721 => _721.description]) || "",
26215
- redirectUris: _optionalChain([client, 'optionalAccess', _722 => _722.redirectUris, 'optionalAccess', _723 => _723.length]) ? client.redirectUris : [""],
26214
+ name: _optionalChain([client, 'optionalAccess', _721 => _721.name]) || "",
26215
+ description: _optionalChain([client, 'optionalAccess', _722 => _722.description]) || "",
26216
+ redirectUris: _optionalChain([client, 'optionalAccess', _723 => _723.redirectUris, 'optionalAccess', _724 => _724.length]) ? client.redirectUris : [""],
26216
26217
  allowedScopes: client ? client.allowedScopes || [] : defaultScopes,
26217
- isConfidential: _nullishCoalesce(_optionalChain([client, 'optionalAccess', _724 => _724.isConfidential]), () => ( true))
26218
+ isConfidential: _nullishCoalesce(_optionalChain([client, 'optionalAccess', _725 => _725.isConfidential]), () => ( true))
26218
26219
  });
26219
26220
  const [errors, setErrors] = _react.useState.call(void 0, {});
26220
26221
  const validate = _react.useCallback.call(void 0, () => {
@@ -26624,7 +26625,7 @@ function OAuthConsentScreen({
26624
26625
  if (error || !clientInfo) {
26625
26626
  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: [
26626
26627
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.AlertTriangle, { className: "h-4 w-4" }),
26627
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDescription, { children: _optionalChain([error, 'optionalAccess', _725 => _725.message]) || t("oauth.consent.invalid_request") })
26628
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDescription, { children: _optionalChain([error, 'optionalAccess', _726 => _726.message]) || t("oauth.consent.invalid_request") })
26628
26629
  ] }) }) }) });
26629
26630
  }
26630
26631
  const { client, scopes } = clientInfo;
@@ -26845,7 +26846,7 @@ function WaitlistForm({ onSuccess }) {
26845
26846
  questionnaire: values.questionnaire
26846
26847
  });
26847
26848
  setIsSuccess(true);
26848
- _optionalChain([onSuccess, 'optionalCall', _726 => _726()]);
26849
+ _optionalChain([onSuccess, 'optionalCall', _727 => _727()]);
26849
26850
  } catch (e) {
26850
26851
  errorToast({ title: t("common.errors.error"), error: e });
26851
26852
  } finally {
@@ -27385,7 +27386,7 @@ var ModuleEditor = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs.__n
27385
27386
  ] }),
27386
27387
  roleIds.map((roleId) => {
27387
27388
  const roleTokens = block[roleId];
27388
- const roleLabel = _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _727 => _727[roleId]]), () => ( roleId));
27389
+ const roleLabel = _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _728 => _728[roleId]]), () => ( roleId));
27389
27390
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "tr", { className: "border-b last:border-b-0", children: [
27390
27391
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-4 py-1 text-xs font-medium text-muted-foreground", children: roleLabel }),
27391
27392
  _chunkTO6IYGMLjs.ACTION_TYPES.map((action) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-2 py-1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -27422,7 +27423,7 @@ function RbacContainer() {
27422
27423
  }, []);
27423
27424
  const sortedModuleIds = _react.useMemo.call(void 0, () => {
27424
27425
  if (!matrix) return [];
27425
- return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _728 => _728[a]]), () => ( a))).localeCompare(_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _729 => _729[b]]), () => ( b))));
27426
+ return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _729 => _729[a]]), () => ( a))).localeCompare(_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _730 => _730[b]]), () => ( b))));
27426
27427
  }, [matrix, moduleNames]);
27427
27428
  const roleIds = _react.useMemo.call(void 0, () => {
27428
27429
  if (roleNames) {
@@ -27485,7 +27486,7 @@ function RbacContainer() {
27485
27486
  id === selectedModuleId && "bg-muted font-medium text-foreground",
27486
27487
  id !== selectedModuleId && "text-muted-foreground"
27487
27488
  ),
27488
- children: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _730 => _730[id]]), () => ( id))
27489
+ children: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _731 => _731[id]]), () => ( id))
27489
27490
  }
27490
27491
  ) }, id)) }) }),
27491
27492
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "section", { className: "flex-1 overflow-y-auto p-4", children: selectedModuleId && selectedBlock ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -27493,7 +27494,7 @@ function RbacContainer() {
27493
27494
  {
27494
27495
  moduleId: selectedModuleId,
27495
27496
  block: selectedBlock,
27496
- moduleLabel: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _731 => _731[selectedModuleId]]), () => ( selectedModuleId)),
27497
+ moduleLabel: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _732 => _732[selectedModuleId]]), () => ( selectedModuleId)),
27497
27498
  roleIds,
27498
27499
  roleNames,
27499
27500
  onOpenPicker: openPicker
@@ -27504,12 +27505,12 @@ function RbacContainer() {
27504
27505
  RbacPermissionPicker,
27505
27506
  {
27506
27507
  open: !!activePicker,
27507
- anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _732 => _732.anchor]), () => ( null)),
27508
+ anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _733 => _733.anchor]), () => ( null)),
27508
27509
  value: activeValue,
27509
- isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _733 => _733.isRoleColumn]), () => ( false)),
27510
+ isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _734 => _734.isRoleColumn]), () => ( false)),
27510
27511
  knownSegments: activeSegments,
27511
27512
  onSetValue: handleSetValue,
27512
- onClear: _optionalChain([activePicker, 'optionalAccess', _734 => _734.isRoleColumn]) ? handleClear : void 0,
27513
+ onClear: _optionalChain([activePicker, 'optionalAccess', _735 => _735.isRoleColumn]) ? handleClear : void 0,
27513
27514
  onClose: closePicker
27514
27515
  }
27515
27516
  )
@@ -27576,7 +27577,7 @@ function RbacByRoleContainer() {
27576
27577
  }, [roleNames]);
27577
27578
  const sortedModuleIds = _react.useMemo.call(void 0, () => {
27578
27579
  if (!matrix) return [];
27579
- return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _735 => _735[a]]), () => ( a))).localeCompare(_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _736 => _736[b]]), () => ( b))));
27580
+ return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _736 => _736[a]]), () => ( a))).localeCompare(_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _737 => _737[b]]), () => ( b))));
27580
27581
  }, [matrix, moduleNames]);
27581
27582
  _react.useEffect.call(void 0, () => {
27582
27583
  if (!selectedRoleId && sortedRoleIds.length > 0) {
@@ -27625,7 +27626,7 @@ function RbacByRoleContainer() {
27625
27626
  id === selectedRoleId && "bg-muted font-medium text-foreground",
27626
27627
  id !== selectedRoleId && "text-muted-foreground"
27627
27628
  ),
27628
- children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _737 => _737[id]]), () => ( id))
27629
+ children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _738 => _738[id]]), () => ( id))
27629
27630
  }
27630
27631
  ) }, id)) }) }),
27631
27632
  /* @__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: [
@@ -27645,7 +27646,7 @@ function RbacByRoleContainer() {
27645
27646
  if (!block) return null;
27646
27647
  const defaultTokens = _nullishCoalesce(block.default, () => ( []));
27647
27648
  const roleTokens = block[selectedRoleId];
27648
- const moduleLabel = _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _738 => _738[moduleId]]), () => ( moduleId));
27649
+ const moduleLabel = _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _739 => _739[moduleId]]), () => ( moduleId));
27649
27650
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react.Fragment, { children: [
27650
27651
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { className: "border-b bg-muted/40", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
27651
27652
  "td",
@@ -27660,7 +27661,7 @@ function RbacByRoleContainer() {
27660
27661
  _chunkTO6IYGMLjs.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))
27661
27662
  ] }),
27662
27663
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "tr", { className: "border-b last:border-b-0", children: [
27663
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-4 py-1 text-xs font-medium text-muted-foreground", children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _739 => _739[selectedRoleId]]), () => ( selectedRoleId)) }),
27664
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-4 py-1 text-xs font-medium text-muted-foreground", children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _740 => _740[selectedRoleId]]), () => ( selectedRoleId)) }),
27664
27665
  _chunkTO6IYGMLjs.ACTION_TYPES.map((action) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-2 py-1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
27665
27666
  CellButton3,
27666
27667
  {
@@ -27681,12 +27682,12 @@ function RbacByRoleContainer() {
27681
27682
  RbacPermissionPicker,
27682
27683
  {
27683
27684
  open: !!activePicker,
27684
- anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _740 => _740.anchor]), () => ( null)),
27685
+ anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _741 => _741.anchor]), () => ( null)),
27685
27686
  value: activeValue,
27686
- isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _741 => _741.isRoleColumn]), () => ( false)),
27687
+ isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _742 => _742.isRoleColumn]), () => ( false)),
27687
27688
  knownSegments: activeSegments,
27688
27689
  onSetValue: handleSetValue,
27689
- onClear: _optionalChain([activePicker, 'optionalAccess', _742 => _742.isRoleColumn]) ? handleClear : void 0,
27690
+ onClear: _optionalChain([activePicker, 'optionalAccess', _743 => _743.isRoleColumn]) ? handleClear : void 0,
27690
27691
  onClose: closePicker
27691
27692
  }
27692
27693
  )
@@ -28305,4 +28306,4 @@ _chunk7QVYU63Ejs.__name.call(void 0, RbacByRoleContainer, "RbacByRoleContainer")
28305
28306
 
28306
28307
 
28307
28308
  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.usePushNotifications = usePushNotifications; 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;
28308
- //# sourceMappingURL=chunk-YZN2774P.js.map
28309
+ //# sourceMappingURL=chunk-SZQNUGDG.js.map