@seliseblocks/genesis-os 4.3.6 → 4.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/{chunk-VQWYNAO5.cjs → chunk-4QN4CYSC.cjs} +10 -7
  2. package/dist/chunk-4QN4CYSC.cjs.map +1 -0
  3. package/dist/{chunk-OJG2XE7Z.cjs → chunk-IJMKS4XG.cjs} +6 -6
  4. package/dist/{chunk-OJG2XE7Z.cjs.map → chunk-IJMKS4XG.cjs.map} +1 -1
  5. package/dist/{chunk-PKRBEIHK.js → chunk-JITR3QYC.js} +10 -7
  6. package/dist/chunk-JITR3QYC.js.map +1 -0
  7. package/dist/{chunk-SKKVJAXT.js → chunk-LNQUCEQU.js} +44 -7
  8. package/dist/chunk-LNQUCEQU.js.map +1 -0
  9. package/dist/{chunk-SHCA37CD.cjs → chunk-OVQEP63V.cjs} +215 -115
  10. package/dist/chunk-OVQEP63V.cjs.map +1 -0
  11. package/dist/{chunk-Y36F6N2O.js → chunk-PSJHGD3M.js} +156 -56
  12. package/dist/chunk-PSJHGD3M.js.map +1 -0
  13. package/dist/{chunk-JDWJ2HXQ.cjs → chunk-QN6HLQ67.cjs} +45 -8
  14. package/dist/chunk-QN6HLQ67.cjs.map +1 -0
  15. package/dist/{chunk-OAWBQY5W.js → chunk-XRAO7JBH.js} +3 -3
  16. package/dist/{chunk-OAWBQY5W.js.map → chunk-XRAO7JBH.js.map} +1 -1
  17. package/dist/components/index.cjs +351 -351
  18. package/dist/components/index.js +4 -4
  19. package/dist/guards/index.cjs +10 -10
  20. package/dist/guards/index.js +4 -4
  21. package/dist/hooks/index.cjs +54 -54
  22. package/dist/hooks/index.d.cts +3 -3
  23. package/dist/hooks/index.d.ts +3 -3
  24. package/dist/hooks/index.js +2 -2
  25. package/dist/index.cjs +431 -431
  26. package/dist/index.d.cts +2 -2
  27. package/dist/index.d.ts +2 -2
  28. package/dist/index.js +4 -4
  29. package/dist/layouts/index.cjs +11 -11
  30. package/dist/layouts/index.js +4 -4
  31. package/dist/models/index.d.cts +1 -1
  32. package/dist/models/index.d.ts +1 -1
  33. package/dist/pages/index.cjs +9 -9
  34. package/dist/pages/index.js +4 -4
  35. package/dist/providers/index.cjs +6 -6
  36. package/dist/providers/index.js +2 -2
  37. package/dist/{service-registry.model-pcv_ix2e.d.cts → service-registry.model-DJGsTRWZ.d.cts} +17 -1
  38. package/dist/{service-registry.model-pcv_ix2e.d.ts → service-registry.model-DJGsTRWZ.d.ts} +17 -1
  39. package/dist/store/index.cjs +7 -7
  40. package/dist/store/index.d.cts +16 -6
  41. package/dist/store/index.d.ts +16 -6
  42. package/dist/store/index.js +1 -1
  43. package/package.json +1 -1
  44. package/dist/chunk-JDWJ2HXQ.cjs.map +0 -1
  45. package/dist/chunk-PKRBEIHK.js.map +0 -1
  46. package/dist/chunk-SHCA37CD.cjs.map +0 -1
  47. package/dist/chunk-SKKVJAXT.js.map +0 -1
  48. package/dist/chunk-VQWYNAO5.cjs.map +0 -1
  49. package/dist/chunk-Y36F6N2O.js.map +0 -1
@@ -1,15 +1,15 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkXJ6DPUCV_cjs = require('./chunk-XJ6DPUCV.cjs');
4
- var chunkJDWJ2HXQ_cjs = require('./chunk-JDWJ2HXQ.cjs');
4
+ var chunkQN6HLQ67_cjs = require('./chunk-QN6HLQ67.cjs');
5
5
  var chunkQTSTAWK3_cjs = require('./chunk-QTSTAWK3.cjs');
6
6
  var chunk4QKE3WAW_cjs = require('./chunk-4QKE3WAW.cjs');
7
7
  var chunkX4YCRWXO_cjs = require('./chunk-X4YCRWXO.cjs');
8
- var chunkOJG2XE7Z_cjs = require('./chunk-OJG2XE7Z.cjs');
8
+ var chunkIJMKS4XG_cjs = require('./chunk-IJMKS4XG.cjs');
9
9
  var chunkBPJM3L7O_cjs = require('./chunk-BPJM3L7O.cjs');
10
10
  var chunkYAF2X7W5_cjs = require('./chunk-YAF2X7W5.cjs');
11
11
  var chunkF2LXD7RI_cjs = require('./chunk-F2LXD7RI.cjs');
12
- var chunkVQWYNAO5_cjs = require('./chunk-VQWYNAO5.cjs');
12
+ var chunk4QN4CYSC_cjs = require('./chunk-4QN4CYSC.cjs');
13
13
  var chunk6GCU5LM7_cjs = require('./chunk-6GCU5LM7.cjs');
14
14
  var chunkQJOVCH5A_cjs = require('./chunk-QJOVCH5A.cjs');
15
15
  var React8 = require('react');
@@ -1141,7 +1141,7 @@ var SidebarMenuSubButton = React8__namespace.forwardRef(({ asChild = false, size
1141
1141
  });
1142
1142
  SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
1143
1143
  function useRightSidePanel() {
1144
- return React8.useContext(chunkOJG2XE7Z_cjs.RightSidePanelContext) ?? chunkOJG2XE7Z_cjs.defaultRightSidePanelContextValue;
1144
+ return React8.useContext(chunkIJMKS4XG_cjs.RightSidePanelContext) ?? chunkIJMKS4XG_cjs.defaultRightSidePanelContextValue;
1145
1145
  }
1146
1146
  function RenderConditionally({
1147
1147
  condition,
@@ -1227,7 +1227,7 @@ function DesktopPanel({
1227
1227
  setLiveWidth,
1228
1228
  topOffset
1229
1229
  } = useRightSidePanel();
1230
- const { setLayoutSetting } = chunkVQWYNAO5_cjs.useLayoutSettingsStore();
1230
+ const { setLayoutSetting } = chunk4QN4CYSC_cjs.useLayoutSettingsStore();
1231
1231
  const containerRef = React8__namespace.useRef(null);
1232
1232
  React8__namespace.useLayoutEffect(() => {
1233
1233
  const container = containerRef.current;
@@ -1481,7 +1481,7 @@ function RightSidePanelProvider({
1481
1481
  const generatedId = React8__namespace.useId();
1482
1482
  const resolvedPanelId = panelId ?? `right-side-panel-${generatedId}`;
1483
1483
  const resolvedTopOffset = parseWidth(topOffset, "0px");
1484
- const { layout } = chunkVQWYNAO5_cjs.useLayoutSettingsStore();
1484
+ const { layout } = chunk4QN4CYSC_cjs.useLayoutSettingsStore();
1485
1485
  const sizing = React8__namespace.useMemo(
1486
1486
  () => ({
1487
1487
  width: parseWidth(width, DEFAULT_SIZING_VALUES.width),
@@ -1523,7 +1523,7 @@ function RightSidePanelProvider({
1523
1523
  const close = React8__namespace.useCallback(() => {
1524
1524
  setOpen(false);
1525
1525
  }, [setOpen]);
1526
- chunkJDWJ2HXQ_cjs.useKeyboardShortcut(shortcut, toggle);
1526
+ chunkQN6HLQ67_cjs.useKeyboardShortcut(shortcut, toggle);
1527
1527
  React8__namespace.useEffect(() => {
1528
1528
  if (!syncHash || isControlled || typeof window === "undefined") return;
1529
1529
  const handleHashChange = () => {
@@ -1579,7 +1579,7 @@ function RightSidePanelProvider({
1579
1579
  resolvedTopOffset
1580
1580
  ]
1581
1581
  );
1582
- return /* @__PURE__ */ jsxRuntime.jsx(chunkOJG2XE7Z_cjs.RightSidePanelContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(
1582
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkIJMKS4XG_cjs.RightSidePanelContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(
1583
1583
  "div",
1584
1584
  {
1585
1585
  "data-slot": "right-side-panel-provider",
@@ -3499,7 +3499,7 @@ function MultiSelect({
3499
3499
  onChange,
3500
3500
  value: selectedValues
3501
3501
  }) {
3502
- const [buttonRef, popoverWidth] = chunkJDWJ2HXQ_cjs.usePopoverWidth();
3502
+ const [buttonRef, popoverWidth] = chunkQN6HLQ67_cjs.usePopoverWidth();
3503
3503
  const onSelectHandler = (value) => {
3504
3504
  const nextValues = selectedValues.includes(value) ? selectedValues.filter((item) => item !== value) : [...selectedValues, value];
3505
3505
  onChange(nextValues);
@@ -6688,7 +6688,7 @@ function useAppRedirectUrls({
6688
6688
  const controller = new AbortController();
6689
6689
  const { signal } = controller;
6690
6690
  stableApps.forEach((app) => {
6691
- chunkJDWJ2HXQ_cjs.initiateService.fetchRedirectUrl({
6691
+ chunkQN6HLQ67_cjs.initiateService.fetchRedirectUrl({
6692
6692
  clientId: chunkX4YCRWXO_cjs.getRuntimeEnv(app.clientId),
6693
6693
  redirectUri: chunkX4YCRWXO_cjs.getRuntimeEnv(app.redirectUri),
6694
6694
  forwardedTo: resolveRef.current(app)
@@ -6714,7 +6714,7 @@ function useAppRedirectUrls({
6714
6714
  }
6715
6715
  var AppSwitcher = ({ forwardedTo }) => {
6716
6716
  const [open, setOpen] = React8.useState(false);
6717
- const config = chunkJDWJ2HXQ_cjs.useBlocksAppConfigStore((state) => state.getConfig());
6717
+ const config = chunkQN6HLQ67_cjs.useBlocksAppConfigStore((state) => state.getConfig());
6718
6718
  const filteredApps = React8.useMemo(
6719
6719
  () => filteredAppSwitcherData.filter((app) => app.id !== config.name),
6720
6720
  [config.name]
@@ -6753,7 +6753,7 @@ function ThemeSwitcher({
6753
6753
  className,
6754
6754
  showChevron = true
6755
6755
  } = {}) {
6756
- const { theme, setTheme } = chunkJDWJ2HXQ_cjs.useTheme();
6756
+ const { theme, setTheme } = chunkQN6HLQ67_cjs.useTheme();
6757
6757
  const { Icon: ThemeIcon } = OPTIONS[theme];
6758
6758
  return /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { children: [
6759
6759
  /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
@@ -6826,7 +6826,7 @@ var UserService = class {
6826
6826
  };
6827
6827
  var userService = new UserService();
6828
6828
  var useGetUserInfo = (options) => {
6829
- const userStore = chunkVQWYNAO5_cjs.useUserStore();
6829
+ const userStore = chunk4QN4CYSC_cjs.useUserStore();
6830
6830
  return reactQuery.useQuery({
6831
6831
  queryKey: ["user-info"],
6832
6832
  queryFn: async () => {
@@ -6838,7 +6838,7 @@ var useGetUserInfo = (options) => {
6838
6838
  });
6839
6839
  };
6840
6840
  function UserAvatar({ size = "sm" }) {
6841
- const { userDetails: userData } = chunkVQWYNAO5_cjs.useUserStore();
6841
+ const { userDetails: userData } = chunk4QN4CYSC_cjs.useUserStore();
6842
6842
  const initials = `${userData?.firstName?.[0] || ""}${userData?.lastName?.[0] || ""}`.toUpperCase();
6843
6843
  const sizeClass = size === "lg" ? "h-14 w-14 text-xl" : "h-10 w-10 text-base";
6844
6844
  if (userData?.profileImageUrl) {
@@ -6863,14 +6863,14 @@ function UserAvatar({ size = "sm" }) {
6863
6863
  );
6864
6864
  }
6865
6865
  function UserDropdownMenu() {
6866
- const { name } = chunkJDWJ2HXQ_cjs.useBlocksAppConfigStore((state) => state.config);
6866
+ const { name } = chunkQN6HLQ67_cjs.useBlocksAppConfigStore((state) => state.config);
6867
6867
  const { data } = useGetUserInfo();
6868
6868
  const userData = data?.data;
6869
- const { isPending, mutateAsync } = chunkJDWJ2HXQ_cjs.useLogout();
6869
+ const { isPending, mutateAsync } = chunkQN6HLQ67_cjs.useLogout();
6870
6870
  const { resetProjectStore } = chunk6GCU5LM7_cjs.useProjectStore();
6871
6871
  const { setUnAuthenticated, clearTokens } = chunk6GCU5LM7_cjs.useAuthStore();
6872
- const { resetSelectedLanguages } = chunkVQWYNAO5_cjs.useLanguageViewStore();
6873
- const { data: myOrgsData, isLoading: isOrgsLoading } = chunkJDWJ2HXQ_cjs.useGetMyOrganizations();
6872
+ const { resetSelectedLanguages } = chunk4QN4CYSC_cjs.useLanguageViewStore();
6873
+ const { data: myOrgsData, isLoading: isOrgsLoading } = chunkQN6HLQ67_cjs.useGetMyOrganizations();
6874
6874
  const fullName = [userData?.firstName, userData?.lastName].filter(Boolean).join(" ") || "\u2014";
6875
6875
  const email = userData?.email || "";
6876
6876
  const roles = Object.values(userData?.roles || {}).flat();
@@ -7000,7 +7000,7 @@ var languages = [
7000
7000
  { key: "fr", title: "French" }
7001
7001
  ];
7002
7002
  function LanguageSelector() {
7003
- const { changeLanguage, language } = chunkJDWJ2HXQ_cjs.useLanguageSwitcher();
7003
+ const { changeLanguage, language } = chunkQN6HLQ67_cjs.useLanguageSwitcher();
7004
7004
  return /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { children: [
7005
7005
  /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
7006
7006
  "button",
@@ -7090,7 +7090,7 @@ var notificationListenerService = new NotificationListenerService();
7090
7090
 
7091
7091
  // src/components/common/notification/use-notification-socket.ts
7092
7092
  function useNotificationSocket() {
7093
- const { data: configData } = chunkJDWJ2HXQ_cjs.useGetBlocksNotificationConfig(0, 100);
7093
+ const { data: configData } = chunkQN6HLQ67_cjs.useGetBlocksNotificationConfig(0, 100);
7094
7094
  const queryClient = reactQuery.useQueryClient();
7095
7095
  notificationListenerService.connect();
7096
7096
  React8.useEffect(() => {
@@ -7105,7 +7105,7 @@ function useNotificationSocket() {
7105
7105
  notificationListenerService.connection.on(
7106
7106
  config.notifyMethod,
7107
7107
  (message) => {
7108
- chunkJDWJ2HXQ_cjs.notificationService.getNotificationConfig(config, message);
7108
+ chunkQN6HLQ67_cjs.notificationService.getNotificationConfig(config, message);
7109
7109
  try {
7110
7110
  const notice = typeof message === "string" ? JSON.parse(message) : message;
7111
7111
  const denom = JSON.parse(
@@ -7129,12 +7129,12 @@ function useNotificationFeed(open) {
7129
7129
  const [notifications, setNotifications] = React8.useState([]);
7130
7130
  const [hasMore, setHasMore] = React8.useState(true);
7131
7131
  const listRef = React8.useRef(null);
7132
- const { data, isLoading, isFetching } = chunkJDWJ2HXQ_cjs.useGetNotifications(
7132
+ const { data, isLoading, isFetching } = chunkQN6HLQ67_cjs.useGetNotifications(
7133
7133
  pageNumber,
7134
7134
  PAGE_SIZE
7135
7135
  );
7136
- const markAsRead = chunkJDWJ2HXQ_cjs.useMarkAsRead();
7137
- const markAllAsRead = chunkJDWJ2HXQ_cjs.useMarkAllAsRead();
7136
+ const markAsRead = chunkQN6HLQ67_cjs.useMarkAsRead();
7137
+ const markAllAsRead = chunkQN6HLQ67_cjs.useMarkAllAsRead();
7138
7138
  React8.useEffect(() => {
7139
7139
  if (!data?.notifications) return;
7140
7140
  setNotifications((prev) => {
@@ -7368,7 +7368,7 @@ function ConsoleHeader() {
7368
7368
  window.addEventListener("scroll", handleScroll);
7369
7369
  return () => window.removeEventListener("scroll", handleScroll);
7370
7370
  }, []);
7371
- const { appLightLogo, appDarkLogo } = chunkJDWJ2HXQ_cjs.useLogo();
7371
+ const { appLightLogo, appDarkLogo } = chunkQN6HLQ67_cjs.useLogo();
7372
7372
  return /* @__PURE__ */ jsxRuntime.jsx(
7373
7373
  "div",
7374
7374
  {
@@ -7432,7 +7432,7 @@ function ConsoleHeader() {
7432
7432
  var HeaderHeight = 60;
7433
7433
  function DashboardHeader(props) {
7434
7434
  const { forwardedTo, redirectPaths, navigationMenus } = props;
7435
- const { isSidebarOpen, toggleSidebar } = React8.useContext(chunkOJG2XE7Z_cjs.SidebarContext);
7435
+ const { isSidebarOpen, toggleSidebar } = React8.useContext(chunkIJMKS4XG_cjs.SidebarContext);
7436
7436
  const { pathname } = reactRouter.useLocation();
7437
7437
  const { selectedProject } = chunk6GCU5LM7_cjs.useProjectStore();
7438
7438
  const projectName = selectedProject?.name;
@@ -7547,7 +7547,7 @@ var EnvironmentCard = ({
7547
7547
  className
7548
7548
  }) => {
7549
7549
  const { setSelectedProject, setTenantGroup } = chunk6GCU5LM7_cjs.useProjectStore();
7550
- const { mutateAsync } = chunkJDWJ2HXQ_cjs.useStartImpersonation();
7550
+ const { mutateAsync } = chunkQN6HLQ67_cjs.useStartImpersonation();
7551
7551
  const navigate = reactRouter.useNavigate();
7552
7552
  const handleCardClick = async () => {
7553
7553
  try {
@@ -7601,11 +7601,11 @@ function EnvironmentList({
7601
7601
  }) {
7602
7602
  const navigate = reactRouter.useNavigate();
7603
7603
  const { pathname } = reactRouter.useLocation();
7604
- const { data: projectGroups = [], isLoading } = chunkJDWJ2HXQ_cjs.useGetProjects({
7604
+ const { data: projectGroups = [], isLoading } = chunkQN6HLQ67_cjs.useGetProjects({
7605
7605
  enabled: true
7606
7606
  });
7607
7607
  const { selectedProject, setSelectedProject } = chunk6GCU5LM7_cjs.useProjectStore();
7608
- const { data: projectData } = chunkJDWJ2HXQ_cjs.useGetProject();
7608
+ const { data: projectData } = chunkQN6HLQ67_cjs.useGetProject();
7609
7609
  const pendingProjectRef = React8.useRef(null);
7610
7610
  const redirectRegexMap = React8.useMemo(
7611
7611
  () => Object.entries(redirectPaths).reduce(
@@ -7848,11 +7848,12 @@ var AppLoadingSpinner = ({ size = 64 }) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRu
7848
7848
  ` }),
7849
7849
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-background fixed inset-0 z-50 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "animate-breathe", children: /* @__PURE__ */ jsxRuntime.jsx(BlocksIcon, { size }) }) })
7850
7850
  ] });
7851
+ var projectNameFor = (projects, tenantId) => tenantId && projects.find((p) => p.tenantId === tenantId)?.name || null;
7851
7852
  var ImpersonationChecker = ({
7852
7853
  children
7853
7854
  }) => {
7854
- const { data, isLoading, isSuccess } = chunkJDWJ2HXQ_cjs.useImpersonationStatusChecker();
7855
- const { setImpersonation, isInitialized, setInitialized } = chunkVQWYNAO5_cjs.useImpersonateStore();
7855
+ const { data, isLoading, isSuccess } = chunkQN6HLQ67_cjs.useImpersonationStatusChecker();
7856
+ const { setImpersonation, isInitialized, setInitialized } = chunk4QN4CYSC_cjs.useImpersonateStore();
7856
7857
  React8.useEffect(() => {
7857
7858
  if (!data) return;
7858
7859
  setImpersonation(
@@ -7865,55 +7866,108 @@ var ImpersonationChecker = ({
7865
7866
  if (isLoading || !isSuccess || !isInitialized) return null;
7866
7867
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
7867
7868
  };
7869
+ function ImpersonationBlocked({
7870
+ title,
7871
+ description,
7872
+ primaryLabel,
7873
+ onPrimary,
7874
+ consolePath
7875
+ }) {
7876
+ const navigate = reactRouter.useNavigate();
7877
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full min-h-[320px] w-full flex-col items-center justify-center gap-4 p-8 text-center", children: [
7878
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
7879
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-base font-semibold", children: title }),
7880
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "max-w-md text-sm text-muted-foreground", children: description })
7881
+ ] }),
7882
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row items-center gap-2", children: [
7883
+ primaryLabel && onPrimary && /* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: onPrimary, children: primaryLabel }),
7884
+ consolePath && /* @__PURE__ */ jsxRuntime.jsx(
7885
+ Button,
7886
+ {
7887
+ variant: primaryLabel && onPrimary ? "outline" : "default",
7888
+ onClick: () => navigate(consolePath),
7889
+ children: "Go to console"
7890
+ }
7891
+ )
7892
+ ] })
7893
+ ] });
7894
+ }
7895
+ function ImpersonationWaiting({ label }) {
7896
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full min-h-[320px] w-full flex-col items-center justify-center gap-3", children: [
7897
+ /* @__PURE__ */ jsxRuntime.jsx(AppLoadingSpinner, {}),
7898
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: label })
7899
+ ] });
7900
+ }
7868
7901
  function ImpersonationTerminator({
7869
7902
  children
7870
7903
  }) {
7871
- const { terminate, isImpersonated } = chunkVQWYNAO5_cjs.useImpersonateStore();
7872
- const { mutateAsync } = chunkJDWJ2HXQ_cjs.useStopImpersonation();
7904
+ const {
7905
+ terminate,
7906
+ isImpersonated,
7907
+ detachedReason,
7908
+ detachedTenantId,
7909
+ setDetached
7910
+ } = chunk4QN4CYSC_cjs.useImpersonateStore();
7911
+ const { mutateAsync } = chunkQN6HLQ67_cjs.useStopImpersonation();
7912
+ const { projects } = chunk6GCU5LM7_cjs.useProjectStore();
7873
7913
  const isTriggering = React8.useRef(false);
7874
7914
  const [isTerminating, setIsTerminating] = React8.useState(false);
7915
+ const rootTenantId = window.process?.env.BLOCKS_X_BLOCKS_KEY || "";
7916
+ React8.useEffect(() => {
7917
+ if (!rootTenantId) return;
7918
+ const owner = chunk4QKE3WAW_cjs.readCurrentOwner();
7919
+ if (owner && owner.tabId !== chunk4QKE3WAW_cjs.TAB_ID && owner.tenantId !== rootTenantId) {
7920
+ setDetached("another-project", owner.tenantId);
7921
+ }
7922
+ return chunk4QKE3WAW_cjs.subscribeToTenantClaims((claim) => {
7923
+ if (claim.tenantId === rootTenantId) {
7924
+ setDetached(null);
7925
+ return;
7926
+ }
7927
+ setDetached("another-project", claim.tenantId);
7928
+ });
7929
+ }, [rootTenantId, setDetached]);
7875
7930
  React8.useEffect(() => {
7876
7931
  if (isTriggering.current || !isImpersonated) return;
7932
+ if (detachedReason) return;
7877
7933
  isTriggering.current = true;
7878
7934
  setIsTerminating(true);
7879
- const blocksKey = window.process?.env.BLOCKS_X_BLOCKS_KEY || "";
7880
7935
  const stopImpersonation = async () => {
7936
+ let sessionIsRootScoped = false;
7881
7937
  try {
7882
7938
  await mutateAsync(void 0);
7939
+ sessionIsRootScoped = true;
7883
7940
  } catch (error) {
7884
7941
  if (!(error instanceof chunkX4YCRWXO_cjs.HttpError) || error.status !== 401) {
7885
7942
  console.error("Error stopping impersonation:", error);
7886
7943
  }
7944
+ sessionIsRootScoped = error instanceof chunkX4YCRWXO_cjs.HttpError && error.status === 401;
7887
7945
  } finally {
7888
- terminate(blocksKey);
7946
+ terminate(rootTenantId);
7947
+ if (sessionIsRootScoped && rootTenantId) chunk4QKE3WAW_cjs.claimTenant(rootTenantId);
7889
7948
  isTriggering.current = false;
7890
7949
  setIsTerminating(false);
7891
7950
  }
7892
7951
  };
7893
7952
  void stopImpersonation();
7894
- }, [mutateAsync, terminate, isImpersonated]);
7895
- if (isImpersonated || isTerminating) return /* @__PURE__ */ jsxRuntime.jsx(AppLoadingSpinner, {});
7953
+ }, [mutateAsync, terminate, isImpersonated, detachedReason, rootTenantId]);
7954
+ if (detachedReason) {
7955
+ const name = projectNameFor(projects, detachedTenantId);
7956
+ return /* @__PURE__ */ jsxRuntime.jsx(
7957
+ ImpersonationBlocked,
7958
+ {
7959
+ title: name ? `Your session is in ${name}` : "Your session is in a project",
7960
+ description: "The project is open in another window. A session can only be in one place at a time.",
7961
+ primaryLabel: name ? `Leave ${name}` : "Leave the project",
7962
+ onPrimary: () => setDetached(null)
7963
+ }
7964
+ );
7965
+ }
7966
+ if (isImpersonated || isTerminating) {
7967
+ return /* @__PURE__ */ jsxRuntime.jsx(ImpersonationWaiting, { label: "Returning to the console\u2026" });
7968
+ }
7896
7969
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
7897
7970
  }
7898
- function ImpersonationBlocked({
7899
- title,
7900
- description,
7901
- actionLabel,
7902
- onAction,
7903
- consolePath
7904
- }) {
7905
- const navigate = reactRouter.useNavigate();
7906
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full min-h-[320px] w-full flex-col items-center justify-center gap-4 p-8 text-center", children: [
7907
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
7908
- /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-base font-semibold", children: title }),
7909
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "max-w-md text-sm text-muted-foreground", children: description })
7910
- ] }),
7911
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row items-center gap-2", children: [
7912
- /* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: onAction, children: actionLabel }),
7913
- /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", onClick: () => navigate(consolePath), children: "Back to console" })
7914
- ] })
7915
- ] });
7916
- }
7917
7971
  function ImpersonationSynchronizer({
7918
7972
  children,
7919
7973
  consolePath = "/app/console"
@@ -7923,16 +7977,18 @@ function ImpersonationSynchronizer({
7923
7977
  isImpersonated,
7924
7978
  impersonatedTenantId,
7925
7979
  impersonationError,
7926
- isDetached,
7980
+ detachedReason,
7981
+ detachedTenantId,
7927
7982
  setImpersonationError,
7928
7983
  setDetached
7929
- } = chunkVQWYNAO5_cjs.useImpersonateStore();
7930
- const { mutateAsync } = chunkJDWJ2HXQ_cjs.useStartImpersonation();
7931
- const { data: _data } = chunkJDWJ2HXQ_cjs.useGetProjects({ enabled: true });
7984
+ } = chunk4QN4CYSC_cjs.useImpersonateStore();
7985
+ const { mutateAsync } = chunkQN6HLQ67_cjs.useStartImpersonation();
7986
+ const { data: _data } = chunkQN6HLQ67_cjs.useGetProjects({ enabled: true });
7932
7987
  const { selectedProject, setSelectedProject, projects, setTenantGroup } = chunk6GCU5LM7_cjs.useProjectStore();
7933
7988
  const isTriggering = React8.useRef(false);
7934
7989
  const [isImpersonating, setIsImpersonating] = React8.useState(false);
7935
7990
  const { itemId } = reactRouter.useParams();
7991
+ const rootTenantId = window.process?.env.BLOCKS_X_BLOCKS_KEY || "";
7936
7992
  const routeTenantId = React8.useMemo(() => {
7937
7993
  if (!itemId) return null;
7938
7994
  return projects.find((p) => p.itemId === itemId)?.tenantId ?? null;
@@ -7962,7 +8018,7 @@ function ImpersonationSynchronizer({
7962
8018
  ]);
7963
8019
  const getImpersonatedProject = async () => {
7964
8020
  try {
7965
- const res = chunkJDWJ2HXQ_cjs.projectService.getProject();
8021
+ const res = chunkQN6HLQ67_cjs.projectService.getProject();
7966
8022
  return (await res).data;
7967
8023
  } catch (error) {
7968
8024
  console.error("Error fetching projects:", error);
@@ -7986,11 +8042,7 @@ function ImpersonationSynchronizer({
7986
8042
  return;
7987
8043
  }
7988
8044
  await mutateAsync({ targeted_tenant_id: targetTenantId });
7989
- impersonate(
7990
- targetTenantId,
7991
- window.process?.env.BLOCKS_X_BLOCKS_KEY || ""
7992
- );
7993
- chunk4QKE3WAW_cjs.claimTenant(targetTenantId);
8045
+ impersonate(targetTenantId, rootTenantId);
7994
8046
  const project = knownProjects.find((p) => p.tenantId === targetTenantId);
7995
8047
  if (project) {
7996
8048
  setSelectedProject(project);
@@ -8005,30 +8057,41 @@ function ImpersonationSynchronizer({
8005
8057
  }, [
8006
8058
  mutateAsync,
8007
8059
  impersonate,
8060
+ rootTenantId,
8008
8061
  setSelectedProject,
8009
8062
  setTenantGroup,
8010
8063
  setImpersonationError
8011
8064
  ]);
8012
- const retry = React8.useCallback(() => {
8065
+ const takeSession = React8.useCallback(() => {
8013
8066
  setImpersonationError(null);
8014
- setDetached(false);
8067
+ setDetached(null);
8015
8068
  void runImpersonation();
8016
8069
  }, [runImpersonation, setImpersonationError, setDetached]);
8017
8070
  React8.useEffect(() => {
8018
8071
  const owner = chunk4QKE3WAW_cjs.readCurrentOwner();
8019
- if (owner && routeTenantId && owner.tenantId !== routeTenantId) {
8020
- setDetached(true);
8072
+ if (owner && owner.tabId !== chunk4QKE3WAW_cjs.TAB_ID && routeTenantId && owner.tenantId !== routeTenantId) {
8073
+ setDetached(
8074
+ owner.tenantId === rootTenantId ? "console" : "another-project",
8075
+ owner.tenantId
8076
+ );
8021
8077
  }
8022
8078
  return chunk4QKE3WAW_cjs.subscribeToTenantClaims((claim) => {
8023
8079
  const mine = routeTenantIdRef.current;
8024
8080
  if (!mine) return;
8025
- setDetached(claim.tenantId !== mine);
8081
+ if (claim.tenantId === mine) {
8082
+ setDetached(null);
8083
+ return;
8084
+ }
8085
+ setDetached(
8086
+ claim.tenantId === rootTenantId ? "console" : "another-project",
8087
+ claim.tenantId
8088
+ );
8026
8089
  });
8027
- }, [routeTenantId, setDetached]);
8090
+ }, [routeTenantId, rootTenantId, setDetached]);
8028
8091
  React8.useEffect(() => {
8029
8092
  if (!itemId) return;
8030
8093
  if (isTriggering.current) return;
8031
- if (impersonationError || isDetached) return;
8094
+ if (impersonationError || detachedReason) return;
8032
8095
  const needsColdStart = !routeTenantId && !!impersonatedTenantId && !selectedProject;
8033
8096
  const needsRetarget = !!routeTenantId && routeTenantId !== impersonatedTenantId;
8034
8097
  if (!needsColdStart && !needsRetarget) return;
@@ -8039,40 +8102,77 @@ function ImpersonationSynchronizer({
8039
8102
  impersonatedTenantId,
8040
8103
  selectedProject,
8041
8104
  impersonationError,
8042
- isDetached,
8105
+ detachedReason,
8043
8106
  runImpersonation
8044
8107
  ]);
8045
- if (isImpersonating) return /* @__PURE__ */ jsxRuntime.jsx(AppLoadingSpinner, {});
8108
+ const thisProjectName = projectNameFor(projects, routeTenantId);
8109
+ if (isImpersonating) {
8110
+ return /* @__PURE__ */ jsxRuntime.jsx(
8111
+ ImpersonationWaiting,
8112
+ {
8113
+ label: thisProjectName ? `Opening ${thisProjectName}\u2026` : "Opening project\u2026"
8114
+ }
8115
+ );
8116
+ }
8046
8117
  if (!itemId) {
8047
8118
  if (!isImpersonated || isTriggering.current) return null;
8048
8119
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
8049
8120
  }
8050
8121
  if (impersonationError) {
8122
+ const accessDenied = impersonationError instanceof chunkX4YCRWXO_cjs.HttpError && impersonationError.status === 403;
8123
+ return accessDenied ? /* @__PURE__ */ jsxRuntime.jsx(
8124
+ ImpersonationBlocked,
8125
+ {
8126
+ title: thisProjectName ? `You don't have access to ${thisProjectName}` : "You don't have access to this project",
8127
+ description: "Your access to this project may have been removed. Pick another project from the console.",
8128
+ consolePath
8129
+ }
8130
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
8131
+ ImpersonationBlocked,
8132
+ {
8133
+ title: thisProjectName ? `Couldn't open ${thisProjectName}` : "Couldn't open this project",
8134
+ description: "Something went wrong switching to this project. Try again, or pick a different one from the console.",
8135
+ primaryLabel: "Try again",
8136
+ onPrimary: takeSession,
8137
+ consolePath
8138
+ }
8139
+ );
8140
+ }
8141
+ if (detachedReason === "console") {
8051
8142
  return /* @__PURE__ */ jsxRuntime.jsx(
8052
8143
  ImpersonationBlocked,
8053
8144
  {
8054
- title: "Could not open this project",
8055
- description: "We could not switch your session to this project. Retry, or go back to the console and pick a project again.",
8056
- actionLabel: "Retry",
8057
- onAction: retry,
8145
+ title: "Your session returned to the console",
8146
+ description: thisProjectName ? `You went back to the console in another window, so ${thisProjectName} is no longer open here.` : "You went back to the console in another window, so this project is no longer open here.",
8147
+ primaryLabel: thisProjectName ? `Reopen ${thisProjectName}` : "Reopen this project",
8148
+ onPrimary: takeSession,
8058
8149
  consolePath
8059
8150
  }
8060
8151
  );
8061
8152
  }
8062
- if (isDetached) {
8153
+ if (detachedReason === "another-project") {
8154
+ const otherName = projectNameFor(projects, detachedTenantId);
8063
8155
  return /* @__PURE__ */ jsxRuntime.jsx(
8064
8156
  ImpersonationBlocked,
8065
8157
  {
8066
- title: "This project is open in another tab",
8067
- description: "Your session can only be in one project at a time. Use this tab instead, or return to the console.",
8068
- actionLabel: "Use this tab",
8069
- onAction: retry,
8158
+ title: "Another project is open in this browser",
8159
+ description: otherName ? `Your session moved to ${otherName} in another window. A session can only be in one project at a time.` : "Your session moved to another project in a different window. A session can only be in one project at a time.",
8160
+ primaryLabel: thisProjectName ? `Continue in ${thisProjectName}` : "Continue in this project",
8161
+ onPrimary: takeSession,
8070
8162
  consolePath
8071
8163
  }
8072
8164
  );
8073
8165
  }
8074
- if (!routeTenantId) return /* @__PURE__ */ jsxRuntime.jsx(AppLoadingSpinner, {});
8075
- if (routeTenantId !== impersonatedTenantId) return /* @__PURE__ */ jsxRuntime.jsx(AppLoadingSpinner, {});
8166
+ if (!routeTenantId)
8167
+ return /* @__PURE__ */ jsxRuntime.jsx(ImpersonationWaiting, { label: "Loading your projects\u2026" });
8168
+ if (routeTenantId !== impersonatedTenantId) {
8169
+ return /* @__PURE__ */ jsxRuntime.jsx(
8170
+ ImpersonationWaiting,
8171
+ {
8172
+ label: thisProjectName ? `Switching to ${thisProjectName}\u2026` : "Switching projects\u2026"
8173
+ }
8174
+ );
8175
+ }
8076
8176
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
8077
8177
  }
8078
8178
  function PublicLayout({ children }) {
@@ -8101,7 +8201,7 @@ function DashboardLayout({
8101
8201
  navigationMenus,
8102
8202
  forwardedTo
8103
8203
  }) {
8104
- const content = /* @__PURE__ */ jsxRuntime.jsx(chunkOJG2XE7Z_cjs.DashboardLayoutProvider, { isOpen: true, children: /* @__PURE__ */ jsxRuntime.jsx(RightSidePanelProvider, { resizable: true, topOffset: HeaderHeight, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full overflow-hidden", children: [
8204
+ const content = /* @__PURE__ */ jsxRuntime.jsx(chunkIJMKS4XG_cjs.DashboardLayoutProvider, { isOpen: true, children: /* @__PURE__ */ jsxRuntime.jsx(RightSidePanelProvider, { resizable: true, topOffset: HeaderHeight, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full overflow-hidden", children: [
8105
8205
  /* @__PURE__ */ jsxRuntime.jsx(
8106
8206
  SidebarMenuDesktop,
8107
8207
  {
@@ -8181,7 +8281,7 @@ var LoginHeader = ({
8181
8281
  }) => {
8182
8282
  const {
8183
8283
  config: { appLogoUrl }
8184
- } = chunkJDWJ2HXQ_cjs.useBlocksAppConfigStore((state) => state);
8284
+ } = chunkQN6HLQ67_cjs.useBlocksAppConfigStore((state) => state);
8185
8285
  const resolveLogo = (variant) => {
8186
8286
  if (!appLogoUrl) return void 0;
8187
8287
  if (typeof appLogoUrl === "string") return appLogoUrl;
@@ -9446,10 +9546,10 @@ var BlocksLoginPage = ({
9446
9546
  ] });
9447
9547
  };
9448
9548
  var LoginPage = () => {
9449
- const config = chunkJDWJ2HXQ_cjs.useBlocksAppConfigStore((state) => state.getConfig());
9450
- const { start, isLoading } = chunkJDWJ2HXQ_cjs.useLogin();
9451
- const { canSignUp } = chunkJDWJ2HXQ_cjs.useSignUpAffordance();
9452
- const { start: startSignUp, isLoading: isSignUpLoading } = chunkJDWJ2HXQ_cjs.useSignUpRedirect();
9549
+ const config = chunkQN6HLQ67_cjs.useBlocksAppConfigStore((state) => state.getConfig());
9550
+ const { start, isLoading } = chunkQN6HLQ67_cjs.useLogin();
9551
+ const { canSignUp } = chunkQN6HLQ67_cjs.useSignUpAffordance();
9552
+ const { start: startSignUp, isLoading: isSignUpLoading } = chunkQN6HLQ67_cjs.useSignUpRedirect();
9453
9553
  return /* @__PURE__ */ jsxRuntime.jsx(
9454
9554
  BlocksLoginPage,
9455
9555
  {
@@ -9564,10 +9664,10 @@ var BentoCard = ({
9564
9664
  );
9565
9665
  var DefaultDoc = () => /* @__PURE__ */ jsxRuntime.jsx(BentoGrid, { children: resources.map((resource) => /* @__PURE__ */ jsxRuntime.jsx(BentoCard, { ...resource }, resource.url)) });
9566
9666
  function useCreateProjectRedirect() {
9567
- const { name } = chunkJDWJ2HXQ_cjs.useBlocksAppConfigStore((state) => state.config);
9667
+ const { name } = chunkQN6HLQ67_cjs.useBlocksAppConfigStore((state) => state.config);
9568
9668
  const navigate = reactRouter.useNavigate();
9569
9669
  const osApp = filteredAppSwitcherData.find((app) => app.id === "blocks-os");
9570
- const { isFetching, isReady, redirect } = chunkJDWJ2HXQ_cjs.usePrefetchRedirect({
9670
+ const { isFetching, isReady, redirect } = chunkQN6HLQ67_cjs.usePrefetchRedirect({
9571
9671
  clientId: osApp ? chunkX4YCRWXO_cjs.getRuntimeEnv(osApp.clientId) : "",
9572
9672
  redirectUri: osApp ? chunkX4YCRWXO_cjs.getRuntimeEnv(osApp.redirectUri) : "",
9573
9673
  forwardedTo: "/app/create-project",
@@ -9659,10 +9759,10 @@ function useProjectOverviewRedirect({
9659
9759
  tenantGroupId
9660
9760
  }) {
9661
9761
  const navigate = reactRouter.useNavigate();
9662
- const { name } = chunkJDWJ2HXQ_cjs.useBlocksAppConfigStore((state) => state.config);
9762
+ const { name } = chunkQN6HLQ67_cjs.useBlocksAppConfigStore((state) => state.config);
9663
9763
  const osApp = filteredAppSwitcherData.find((app) => app.id === "blocks-os");
9664
9764
  const redirectedRoute = `/app/project/${tenantGroupId}/environments`;
9665
- const { isFetching, isReady, redirect } = chunkJDWJ2HXQ_cjs.usePrefetchRedirect({
9765
+ const { isFetching, isReady, redirect } = chunkQN6HLQ67_cjs.usePrefetchRedirect({
9666
9766
  clientId: osApp ? chunkX4YCRWXO_cjs.getRuntimeEnv(osApp.clientId) : "",
9667
9767
  redirectUri: osApp ? chunkX4YCRWXO_cjs.getRuntimeEnv(osApp.redirectUri) : "",
9668
9768
  forwardedTo: redirectedRoute,
@@ -10020,7 +10120,7 @@ function MultiSelect2({
10020
10120
  onChange,
10021
10121
  value: selectedValues
10022
10122
  }) {
10023
- const [buttonRef, popoverWidth] = chunkJDWJ2HXQ_cjs.usePopoverWidth();
10123
+ const [buttonRef, popoverWidth] = chunkQN6HLQ67_cjs.usePopoverWidth();
10024
10124
  const onSelectHandler = (value) => {
10025
10125
  const nextValues = selectedValues.includes(value) ? selectedValues.filter((item) => item !== value) : [...selectedValues, value];
10026
10126
  onChange(nextValues);
@@ -10301,7 +10401,7 @@ var useProjectListState = (projectGroups) => {
10301
10401
  })),
10302
10402
  [projectGroups]
10303
10403
  );
10304
- const searchedGroups = chunkJDWJ2HXQ_cjs.useDebouncedFuseFilter(
10404
+ const searchedGroups = chunkQN6HLQ67_cjs.useDebouncedFuseFilter(
10305
10405
  searchableGroups,
10306
10406
  searchText,
10307
10407
  SEARCH_OPTIONS
@@ -10371,7 +10471,7 @@ var SelfProjectLoading = ({ viewMode }) => {
10371
10471
  ) });
10372
10472
  };
10373
10473
  var SelfProject = ({ canCreateProject = false }) => {
10374
- const { data, isLoading, isFetching } = chunkJDWJ2HXQ_cjs.useGetProjects({ enabled: true });
10474
+ const { data, isLoading, isFetching } = chunkQN6HLQ67_cjs.useGetProjects({ enabled: true });
10375
10475
  const isPending = isLoading || isFetching;
10376
10476
  const projectGroups = data || [];
10377
10477
  const {
@@ -10529,7 +10629,7 @@ var CallbackPage = ({ defaultRedirectUrl }) => {
10529
10629
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-h-screen items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader, { className: "h-12 w-12 animate-spin text-gray-500" }) });
10530
10630
  };
10531
10631
  function ProfilePage() {
10532
- const { isLoading, error } = chunkJDWJ2HXQ_cjs.useInitiateRedirect({
10632
+ const { isLoading, error } = chunkQN6HLQ67_cjs.useInitiateRedirect({
10533
10633
  clientId: chunkX4YCRWXO_cjs.getRuntimeEnv("BLOCKS_IAM_CLIENT_ID"),
10534
10634
  redirectUri: chunkX4YCRWXO_cjs.getRuntimeEnv("BLOCKS_IAM_CALLBACK_URL"),
10535
10635
  forwardedTo: "/app/profile"
@@ -10807,8 +10907,8 @@ var ConfirmationModal = ({
10807
10907
  ] })
10808
10908
  ] });
10809
10909
  var DashboardOverview = () => {
10810
- const { name } = chunkJDWJ2HXQ_cjs.useBlocksAppConfigStore((state) => state.config);
10811
- const { data, isFetching } = chunkJDWJ2HXQ_cjs.useGetProject();
10910
+ const { name } = chunkQN6HLQ67_cjs.useBlocksAppConfigStore((state) => state.config);
10911
+ const { data, isFetching } = chunkQN6HLQ67_cjs.useGetProject();
10812
10912
  const {
10813
10913
  endpoints,
10814
10914
  isLoading: isLoadingEndpoints,
@@ -10902,11 +11002,11 @@ function ProjectList2({
10902
11002
  }) {
10903
11003
  const navigate = reactRouter.useNavigate();
10904
11004
  const { pathname } = reactRouter.useLocation();
10905
- const { data: projectGroups = [], isLoading } = chunkJDWJ2HXQ_cjs.useGetProjects({
11005
+ const { data: projectGroups = [], isLoading } = chunkQN6HLQ67_cjs.useGetProjects({
10906
11006
  enabled: true
10907
11007
  });
10908
11008
  const { selectedProject, setSelectedProject } = chunk6GCU5LM7_cjs.useProjectStore();
10909
- const { data: projectData } = chunkJDWJ2HXQ_cjs.useGetProject();
11009
+ const { data: projectData } = chunkQN6HLQ67_cjs.useGetProject();
10910
11010
  const pendingProjectRef = React8.useRef(null);
10911
11011
  const redirectRegexMap = React8.useMemo(
10912
11012
  () => Object.entries(redirectPaths).reduce(
@@ -11055,7 +11155,7 @@ var SetCustomDomainDialog = ({
11055
11155
  projectKey,
11056
11156
  projectEnv
11057
11157
  }) => {
11058
- const { mutateAsync, isPending } = chunkJDWJ2HXQ_cjs.useUpdateRepositories();
11158
+ const { mutateAsync, isPending } = chunkQN6HLQ67_cjs.useUpdateRepositories();
11059
11159
  const verifiedDomains = React8.useMemo(
11060
11160
  () => Array.from(
11061
11161
  new Set(domains.filter((d) => d.isDomainVerified).map((d) => d.domain))
@@ -11239,7 +11339,7 @@ var ProjectRepoList = ({
11239
11339
  data: envRepositoriesResponse,
11240
11340
  isLoading: isLoadingEnvRepos,
11241
11341
  isFetching: isFetchingEnvRepos
11242
- } = chunkJDWJ2HXQ_cjs.useGetEnvRepositories(project?.tenantId || "");
11342
+ } = chunkQN6HLQ67_cjs.useGetEnvRepositories(project?.tenantId || "");
11243
11343
  if (isLoading || isLoadingEnvRepos || isFetchingEnvRepos) {
11244
11344
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-6 rounded-lg border bg-card px-2 py-2 shadow-sm md:mt-0", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid-col-1 grid gap-3 px-2 py-4 md:grid-cols-2 md:gap-4 lg:gap-6", children: ["sk-1", "sk-2", "sk-3", "sk-4", "sk-5", "sk-6"].map((itemKey) => /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
11245
11345
  /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-5 w-1/2" }),
@@ -11339,7 +11439,7 @@ var EditProjectForm = ({
11339
11439
  onAfterSubmit
11340
11440
  }) => {
11341
11441
  const queryClient = reactQuery.useQueryClient();
11342
- const { mutateAsync, isPending } = chunkJDWJ2HXQ_cjs.useUpdateTenantGroup();
11442
+ const { mutateAsync, isPending } = chunkQN6HLQ67_cjs.useUpdateTenantGroup();
11343
11443
  const form = reactHookForm.useForm({
11344
11444
  resolver: zod$1.zodResolver(editProjectFormSchema),
11345
11445
  defaultValues: {
@@ -11475,7 +11575,7 @@ function SidebarMobileView({
11475
11575
  navigationMenus
11476
11576
  }) {
11477
11577
  const [open, setOpen] = React8.useState(false);
11478
- const { appLightLogo, appDarkLogo } = chunkJDWJ2HXQ_cjs.useLogo();
11578
+ const { appLightLogo, appDarkLogo } = chunkQN6HLQ67_cjs.useLogo();
11479
11579
  const allowedMenu = chunkBPJM3L7O_cjs.useFilteredMenus(navigationMenus);
11480
11580
  return /* @__PURE__ */ jsxRuntime.jsxs(Sheet, { open, onOpenChange: setOpen, children: [
11481
11581
  /* @__PURE__ */ jsxRuntime.jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", size: "icon", className: "shrink-0", children: [
@@ -11524,9 +11624,9 @@ function SidebarMenuDesktop({
11524
11624
  redirectPaths,
11525
11625
  navigationMenus
11526
11626
  }) {
11527
- const { isSidebarOpen, toggleSidebar } = React8.useContext(chunkOJG2XE7Z_cjs.SidebarContext);
11528
- const { appLightLogo, appDarkLogo } = chunkJDWJ2HXQ_cjs.useLogo();
11529
- const icon = chunkJDWJ2HXQ_cjs.useIcon();
11627
+ const { isSidebarOpen, toggleSidebar } = React8.useContext(chunkIJMKS4XG_cjs.SidebarContext);
11628
+ const { appLightLogo, appDarkLogo } = chunkQN6HLQ67_cjs.useLogo();
11629
+ const icon = chunkQN6HLQ67_cjs.useIcon();
11530
11630
  const allowedMenu = chunkBPJM3L7O_cjs.useFilteredMenus(navigationMenus);
11531
11631
  const { isActivePath: isProjectOverviewRoute } = chunkBPJM3L7O_cjs.useIsActiveMenu("/app/project");
11532
11632
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -11655,7 +11755,7 @@ var ErrorBoundary = class extends React8.Component {
11655
11755
  var ArchiveProject = () => {
11656
11756
  const navigate = reactRouter.useNavigate();
11657
11757
  const projectKey = chunk6GCU5LM7_cjs.useProjectStore().selectedProject?.tenantId || "";
11658
- const { mutateAsync, isPending } = chunkJDWJ2HXQ_cjs.useDisableProject({ projectKey });
11758
+ const { mutateAsync, isPending } = chunkQN6HLQ67_cjs.useDisableProject({ projectKey });
11659
11759
  const onClickHandler = async () => {
11660
11760
  try {
11661
11761
  const res = await mutateAsync();
@@ -12625,7 +12725,7 @@ var ClearButton = ({ onClear }) => {
12625
12725
  };
12626
12726
  function Radio({ label, options, onChange, value }) {
12627
12727
  const [search, setSearch] = React8.useState("");
12628
- const [buttonRef, popoverWidth] = chunkJDWJ2HXQ_cjs.usePopoverWidth();
12728
+ const [buttonRef, popoverWidth] = chunkQN6HLQ67_cjs.usePopoverWidth();
12629
12729
  const isMobile = chunkBPJM3L7O_cjs.useIsMobile();
12630
12730
  const selected = React8.useMemo(
12631
12731
  () => options.find((item) => item.value === value) || null,
@@ -13634,5 +13734,5 @@ exports.usePaginationQueryParams = usePaginationQueryParams;
13634
13734
  exports.useRightSidePanel = useRightSidePanel;
13635
13735
  exports.useSortQueryParams = useSortQueryParams;
13636
13736
  exports.useWizardStepper = useWizardStepper;
13637
- //# sourceMappingURL=chunk-SHCA37CD.cjs.map
13638
- //# sourceMappingURL=chunk-SHCA37CD.cjs.map
13737
+ //# sourceMappingURL=chunk-OVQEP63V.cjs.map
13738
+ //# sourceMappingURL=chunk-OVQEP63V.cjs.map