@seliseblocks/genesis-os 4.3.6 → 4.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/{chunk-VQWYNAO5.cjs → chunk-4QN4CYSC.cjs} +10 -7
  2. package/dist/chunk-4QN4CYSC.cjs.map +1 -0
  3. package/dist/{chunk-SKKVJAXT.js → chunk-CBQL2T6H.js} +3 -3
  4. package/dist/{chunk-SKKVJAXT.js.map → chunk-CBQL2T6H.js.map} +1 -1
  5. package/dist/{chunk-OJG2XE7Z.cjs → chunk-IJMKS4XG.cjs} +6 -6
  6. package/dist/{chunk-OJG2XE7Z.cjs.map → chunk-IJMKS4XG.cjs.map} +1 -1
  7. package/dist/{chunk-PKRBEIHK.js → chunk-JITR3QYC.js} +10 -7
  8. package/dist/chunk-JITR3QYC.js.map +1 -0
  9. package/dist/{chunk-JDWJ2HXQ.cjs → chunk-SXEXXJHL.cjs} +6 -6
  10. package/dist/{chunk-JDWJ2HXQ.cjs.map → chunk-SXEXXJHL.cjs.map} +1 -1
  11. package/dist/{chunk-Y36F6N2O.js → chunk-X7X4QYK4.js} +156 -55
  12. package/dist/chunk-X7X4QYK4.js.map +1 -0
  13. package/dist/{chunk-OAWBQY5W.js → chunk-XRAO7JBH.js} +3 -3
  14. package/dist/{chunk-OAWBQY5W.js.map → chunk-XRAO7JBH.js.map} +1 -1
  15. package/dist/{chunk-SHCA37CD.cjs → chunk-YFTRLNLF.cjs} +215 -114
  16. package/dist/chunk-YFTRLNLF.cjs.map +1 -0
  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.js +2 -2
  23. package/dist/index.cjs +431 -431
  24. package/dist/index.d.cts +1 -1
  25. package/dist/index.d.ts +1 -1
  26. package/dist/index.js +4 -4
  27. package/dist/layouts/index.cjs +11 -11
  28. package/dist/layouts/index.js +4 -4
  29. package/dist/pages/index.cjs +9 -9
  30. package/dist/pages/index.js +4 -4
  31. package/dist/providers/index.cjs +6 -6
  32. package/dist/providers/index.js +2 -2
  33. package/dist/store/index.cjs +7 -7
  34. package/dist/store/index.d.cts +16 -6
  35. package/dist/store/index.d.ts +16 -6
  36. package/dist/store/index.js +1 -1
  37. package/package.json +1 -1
  38. package/dist/chunk-PKRBEIHK.js.map +0 -1
  39. package/dist/chunk-SHCA37CD.cjs.map +0 -1
  40. package/dist/chunk-VQWYNAO5.cjs.map +0 -1
  41. 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 chunkSXEXXJHL_cjs = require('./chunk-SXEXXJHL.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
+ chunkSXEXXJHL_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] = chunkSXEXXJHL_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
+ chunkSXEXXJHL_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 = chunkSXEXXJHL_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 } = chunkSXEXXJHL_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 } = chunkSXEXXJHL_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 } = chunkSXEXXJHL_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 } = chunkSXEXXJHL_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 } = chunkSXEXXJHL_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 } = chunkSXEXXJHL_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
+ chunkSXEXXJHL_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 } = chunkSXEXXJHL_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 = chunkSXEXXJHL_cjs.useMarkAsRead();
7137
+ const markAllAsRead = chunkSXEXXJHL_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 } = chunkSXEXXJHL_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 } = chunkSXEXXJHL_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 } = chunkSXEXXJHL_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 } = chunkSXEXXJHL_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 } = chunkSXEXXJHL_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 } = chunkSXEXXJHL_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 } = chunkSXEXXJHL_cjs.useStartImpersonation();
7986
+ const { data: _data } = chunkSXEXXJHL_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 = chunkSXEXXJHL_cjs.projectService.getProject();
7966
8022
  return (await res).data;
7967
8023
  } catch (error) {
7968
8024
  console.error("Error fetching projects:", error);
@@ -7986,10 +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
- );
8045
+ impersonate(targetTenantId, rootTenantId);
7993
8046
  chunk4QKE3WAW_cjs.claimTenant(targetTenantId);
7994
8047
  const project = knownProjects.find((p) => p.tenantId === targetTenantId);
7995
8048
  if (project) {
@@ -8005,30 +8058,41 @@ function ImpersonationSynchronizer({
8005
8058
  }, [
8006
8059
  mutateAsync,
8007
8060
  impersonate,
8061
+ rootTenantId,
8008
8062
  setSelectedProject,
8009
8063
  setTenantGroup,
8010
8064
  setImpersonationError
8011
8065
  ]);
8012
- const retry = React8.useCallback(() => {
8066
+ const takeSession = React8.useCallback(() => {
8013
8067
  setImpersonationError(null);
8014
- setDetached(false);
8068
+ setDetached(null);
8015
8069
  void runImpersonation();
8016
8070
  }, [runImpersonation, setImpersonationError, setDetached]);
8017
8071
  React8.useEffect(() => {
8018
8072
  const owner = chunk4QKE3WAW_cjs.readCurrentOwner();
8019
- if (owner && routeTenantId && owner.tenantId !== routeTenantId) {
8020
- setDetached(true);
8073
+ if (owner && owner.tabId !== chunk4QKE3WAW_cjs.TAB_ID && routeTenantId && owner.tenantId !== routeTenantId) {
8074
+ setDetached(
8075
+ owner.tenantId === rootTenantId ? "console" : "another-project",
8076
+ owner.tenantId
8077
+ );
8021
8078
  }
8022
8079
  return chunk4QKE3WAW_cjs.subscribeToTenantClaims((claim) => {
8023
8080
  const mine = routeTenantIdRef.current;
8024
8081
  if (!mine) return;
8025
- setDetached(claim.tenantId !== mine);
8082
+ if (claim.tenantId === mine) {
8083
+ setDetached(null);
8084
+ return;
8085
+ }
8086
+ setDetached(
8087
+ claim.tenantId === rootTenantId ? "console" : "another-project",
8088
+ claim.tenantId
8089
+ );
8026
8090
  });
8027
- }, [routeTenantId, setDetached]);
8091
+ }, [routeTenantId, rootTenantId, setDetached]);
8028
8092
  React8.useEffect(() => {
8029
8093
  if (!itemId) return;
8030
8094
  if (isTriggering.current) return;
8031
- if (impersonationError || isDetached) return;
8095
+ if (impersonationError || detachedReason) return;
8032
8096
  const needsColdStart = !routeTenantId && !!impersonatedTenantId && !selectedProject;
8033
8097
  const needsRetarget = !!routeTenantId && routeTenantId !== impersonatedTenantId;
8034
8098
  if (!needsColdStart && !needsRetarget) return;
@@ -8039,40 +8103,77 @@ function ImpersonationSynchronizer({
8039
8103
  impersonatedTenantId,
8040
8104
  selectedProject,
8041
8105
  impersonationError,
8042
- isDetached,
8106
+ detachedReason,
8043
8107
  runImpersonation
8044
8108
  ]);
8045
- if (isImpersonating) return /* @__PURE__ */ jsxRuntime.jsx(AppLoadingSpinner, {});
8109
+ const thisProjectName = projectNameFor(projects, routeTenantId);
8110
+ if (isImpersonating) {
8111
+ return /* @__PURE__ */ jsxRuntime.jsx(
8112
+ ImpersonationWaiting,
8113
+ {
8114
+ label: thisProjectName ? `Opening ${thisProjectName}\u2026` : "Opening project\u2026"
8115
+ }
8116
+ );
8117
+ }
8046
8118
  if (!itemId) {
8047
8119
  if (!isImpersonated || isTriggering.current) return null;
8048
8120
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
8049
8121
  }
8050
8122
  if (impersonationError) {
8123
+ const accessDenied = impersonationError instanceof chunkX4YCRWXO_cjs.HttpError && impersonationError.status === 403;
8124
+ return accessDenied ? /* @__PURE__ */ jsxRuntime.jsx(
8125
+ ImpersonationBlocked,
8126
+ {
8127
+ title: thisProjectName ? `You don't have access to ${thisProjectName}` : "You don't have access to this project",
8128
+ description: "Your access to this project may have been removed. Pick another project from the console.",
8129
+ consolePath
8130
+ }
8131
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
8132
+ ImpersonationBlocked,
8133
+ {
8134
+ title: thisProjectName ? `Couldn't open ${thisProjectName}` : "Couldn't open this project",
8135
+ description: "Something went wrong switching to this project. Try again, or pick a different one from the console.",
8136
+ primaryLabel: "Try again",
8137
+ onPrimary: takeSession,
8138
+ consolePath
8139
+ }
8140
+ );
8141
+ }
8142
+ if (detachedReason === "console") {
8051
8143
  return /* @__PURE__ */ jsxRuntime.jsx(
8052
8144
  ImpersonationBlocked,
8053
8145
  {
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,
8146
+ title: "Your session returned to the console",
8147
+ 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.",
8148
+ primaryLabel: thisProjectName ? `Reopen ${thisProjectName}` : "Reopen this project",
8149
+ onPrimary: takeSession,
8058
8150
  consolePath
8059
8151
  }
8060
8152
  );
8061
8153
  }
8062
- if (isDetached) {
8154
+ if (detachedReason === "another-project") {
8155
+ const otherName = projectNameFor(projects, detachedTenantId);
8063
8156
  return /* @__PURE__ */ jsxRuntime.jsx(
8064
8157
  ImpersonationBlocked,
8065
8158
  {
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,
8159
+ title: "Another project is open in this browser",
8160
+ 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.",
8161
+ primaryLabel: thisProjectName ? `Continue in ${thisProjectName}` : "Continue in this project",
8162
+ onPrimary: takeSession,
8070
8163
  consolePath
8071
8164
  }
8072
8165
  );
8073
8166
  }
8074
- if (!routeTenantId) return /* @__PURE__ */ jsxRuntime.jsx(AppLoadingSpinner, {});
8075
- if (routeTenantId !== impersonatedTenantId) return /* @__PURE__ */ jsxRuntime.jsx(AppLoadingSpinner, {});
8167
+ if (!routeTenantId)
8168
+ return /* @__PURE__ */ jsxRuntime.jsx(ImpersonationWaiting, { label: "Loading your projects\u2026" });
8169
+ if (routeTenantId !== impersonatedTenantId) {
8170
+ return /* @__PURE__ */ jsxRuntime.jsx(
8171
+ ImpersonationWaiting,
8172
+ {
8173
+ label: thisProjectName ? `Switching to ${thisProjectName}\u2026` : "Switching projects\u2026"
8174
+ }
8175
+ );
8176
+ }
8076
8177
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
8077
8178
  }
8078
8179
  function PublicLayout({ children }) {
@@ -8101,7 +8202,7 @@ function DashboardLayout({
8101
8202
  navigationMenus,
8102
8203
  forwardedTo
8103
8204
  }) {
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: [
8205
+ 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
8206
  /* @__PURE__ */ jsxRuntime.jsx(
8106
8207
  SidebarMenuDesktop,
8107
8208
  {
@@ -8181,7 +8282,7 @@ var LoginHeader = ({
8181
8282
  }) => {
8182
8283
  const {
8183
8284
  config: { appLogoUrl }
8184
- } = chunkJDWJ2HXQ_cjs.useBlocksAppConfigStore((state) => state);
8285
+ } = chunkSXEXXJHL_cjs.useBlocksAppConfigStore((state) => state);
8185
8286
  const resolveLogo = (variant) => {
8186
8287
  if (!appLogoUrl) return void 0;
8187
8288
  if (typeof appLogoUrl === "string") return appLogoUrl;
@@ -9446,10 +9547,10 @@ var BlocksLoginPage = ({
9446
9547
  ] });
9447
9548
  };
9448
9549
  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();
9550
+ const config = chunkSXEXXJHL_cjs.useBlocksAppConfigStore((state) => state.getConfig());
9551
+ const { start, isLoading } = chunkSXEXXJHL_cjs.useLogin();
9552
+ const { canSignUp } = chunkSXEXXJHL_cjs.useSignUpAffordance();
9553
+ const { start: startSignUp, isLoading: isSignUpLoading } = chunkSXEXXJHL_cjs.useSignUpRedirect();
9453
9554
  return /* @__PURE__ */ jsxRuntime.jsx(
9454
9555
  BlocksLoginPage,
9455
9556
  {
@@ -9564,10 +9665,10 @@ var BentoCard = ({
9564
9665
  );
9565
9666
  var DefaultDoc = () => /* @__PURE__ */ jsxRuntime.jsx(BentoGrid, { children: resources.map((resource) => /* @__PURE__ */ jsxRuntime.jsx(BentoCard, { ...resource }, resource.url)) });
9566
9667
  function useCreateProjectRedirect() {
9567
- const { name } = chunkJDWJ2HXQ_cjs.useBlocksAppConfigStore((state) => state.config);
9668
+ const { name } = chunkSXEXXJHL_cjs.useBlocksAppConfigStore((state) => state.config);
9568
9669
  const navigate = reactRouter.useNavigate();
9569
9670
  const osApp = filteredAppSwitcherData.find((app) => app.id === "blocks-os");
9570
- const { isFetching, isReady, redirect } = chunkJDWJ2HXQ_cjs.usePrefetchRedirect({
9671
+ const { isFetching, isReady, redirect } = chunkSXEXXJHL_cjs.usePrefetchRedirect({
9571
9672
  clientId: osApp ? chunkX4YCRWXO_cjs.getRuntimeEnv(osApp.clientId) : "",
9572
9673
  redirectUri: osApp ? chunkX4YCRWXO_cjs.getRuntimeEnv(osApp.redirectUri) : "",
9573
9674
  forwardedTo: "/app/create-project",
@@ -9659,10 +9760,10 @@ function useProjectOverviewRedirect({
9659
9760
  tenantGroupId
9660
9761
  }) {
9661
9762
  const navigate = reactRouter.useNavigate();
9662
- const { name } = chunkJDWJ2HXQ_cjs.useBlocksAppConfigStore((state) => state.config);
9763
+ const { name } = chunkSXEXXJHL_cjs.useBlocksAppConfigStore((state) => state.config);
9663
9764
  const osApp = filteredAppSwitcherData.find((app) => app.id === "blocks-os");
9664
9765
  const redirectedRoute = `/app/project/${tenantGroupId}/environments`;
9665
- const { isFetching, isReady, redirect } = chunkJDWJ2HXQ_cjs.usePrefetchRedirect({
9766
+ const { isFetching, isReady, redirect } = chunkSXEXXJHL_cjs.usePrefetchRedirect({
9666
9767
  clientId: osApp ? chunkX4YCRWXO_cjs.getRuntimeEnv(osApp.clientId) : "",
9667
9768
  redirectUri: osApp ? chunkX4YCRWXO_cjs.getRuntimeEnv(osApp.redirectUri) : "",
9668
9769
  forwardedTo: redirectedRoute,
@@ -10020,7 +10121,7 @@ function MultiSelect2({
10020
10121
  onChange,
10021
10122
  value: selectedValues
10022
10123
  }) {
10023
- const [buttonRef, popoverWidth] = chunkJDWJ2HXQ_cjs.usePopoverWidth();
10124
+ const [buttonRef, popoverWidth] = chunkSXEXXJHL_cjs.usePopoverWidth();
10024
10125
  const onSelectHandler = (value) => {
10025
10126
  const nextValues = selectedValues.includes(value) ? selectedValues.filter((item) => item !== value) : [...selectedValues, value];
10026
10127
  onChange(nextValues);
@@ -10301,7 +10402,7 @@ var useProjectListState = (projectGroups) => {
10301
10402
  })),
10302
10403
  [projectGroups]
10303
10404
  );
10304
- const searchedGroups = chunkJDWJ2HXQ_cjs.useDebouncedFuseFilter(
10405
+ const searchedGroups = chunkSXEXXJHL_cjs.useDebouncedFuseFilter(
10305
10406
  searchableGroups,
10306
10407
  searchText,
10307
10408
  SEARCH_OPTIONS
@@ -10371,7 +10472,7 @@ var SelfProjectLoading = ({ viewMode }) => {
10371
10472
  ) });
10372
10473
  };
10373
10474
  var SelfProject = ({ canCreateProject = false }) => {
10374
- const { data, isLoading, isFetching } = chunkJDWJ2HXQ_cjs.useGetProjects({ enabled: true });
10475
+ const { data, isLoading, isFetching } = chunkSXEXXJHL_cjs.useGetProjects({ enabled: true });
10375
10476
  const isPending = isLoading || isFetching;
10376
10477
  const projectGroups = data || [];
10377
10478
  const {
@@ -10529,7 +10630,7 @@ var CallbackPage = ({ defaultRedirectUrl }) => {
10529
10630
  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
10631
  };
10531
10632
  function ProfilePage() {
10532
- const { isLoading, error } = chunkJDWJ2HXQ_cjs.useInitiateRedirect({
10633
+ const { isLoading, error } = chunkSXEXXJHL_cjs.useInitiateRedirect({
10533
10634
  clientId: chunkX4YCRWXO_cjs.getRuntimeEnv("BLOCKS_IAM_CLIENT_ID"),
10534
10635
  redirectUri: chunkX4YCRWXO_cjs.getRuntimeEnv("BLOCKS_IAM_CALLBACK_URL"),
10535
10636
  forwardedTo: "/app/profile"
@@ -10807,8 +10908,8 @@ var ConfirmationModal = ({
10807
10908
  ] })
10808
10909
  ] });
10809
10910
  var DashboardOverview = () => {
10810
- const { name } = chunkJDWJ2HXQ_cjs.useBlocksAppConfigStore((state) => state.config);
10811
- const { data, isFetching } = chunkJDWJ2HXQ_cjs.useGetProject();
10911
+ const { name } = chunkSXEXXJHL_cjs.useBlocksAppConfigStore((state) => state.config);
10912
+ const { data, isFetching } = chunkSXEXXJHL_cjs.useGetProject();
10812
10913
  const {
10813
10914
  endpoints,
10814
10915
  isLoading: isLoadingEndpoints,
@@ -10902,11 +11003,11 @@ function ProjectList2({
10902
11003
  }) {
10903
11004
  const navigate = reactRouter.useNavigate();
10904
11005
  const { pathname } = reactRouter.useLocation();
10905
- const { data: projectGroups = [], isLoading } = chunkJDWJ2HXQ_cjs.useGetProjects({
11006
+ const { data: projectGroups = [], isLoading } = chunkSXEXXJHL_cjs.useGetProjects({
10906
11007
  enabled: true
10907
11008
  });
10908
11009
  const { selectedProject, setSelectedProject } = chunk6GCU5LM7_cjs.useProjectStore();
10909
- const { data: projectData } = chunkJDWJ2HXQ_cjs.useGetProject();
11010
+ const { data: projectData } = chunkSXEXXJHL_cjs.useGetProject();
10910
11011
  const pendingProjectRef = React8.useRef(null);
10911
11012
  const redirectRegexMap = React8.useMemo(
10912
11013
  () => Object.entries(redirectPaths).reduce(
@@ -11055,7 +11156,7 @@ var SetCustomDomainDialog = ({
11055
11156
  projectKey,
11056
11157
  projectEnv
11057
11158
  }) => {
11058
- const { mutateAsync, isPending } = chunkJDWJ2HXQ_cjs.useUpdateRepositories();
11159
+ const { mutateAsync, isPending } = chunkSXEXXJHL_cjs.useUpdateRepositories();
11059
11160
  const verifiedDomains = React8.useMemo(
11060
11161
  () => Array.from(
11061
11162
  new Set(domains.filter((d) => d.isDomainVerified).map((d) => d.domain))
@@ -11239,7 +11340,7 @@ var ProjectRepoList = ({
11239
11340
  data: envRepositoriesResponse,
11240
11341
  isLoading: isLoadingEnvRepos,
11241
11342
  isFetching: isFetchingEnvRepos
11242
- } = chunkJDWJ2HXQ_cjs.useGetEnvRepositories(project?.tenantId || "");
11343
+ } = chunkSXEXXJHL_cjs.useGetEnvRepositories(project?.tenantId || "");
11243
11344
  if (isLoading || isLoadingEnvRepos || isFetchingEnvRepos) {
11244
11345
  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
11346
  /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-5 w-1/2" }),
@@ -11339,7 +11440,7 @@ var EditProjectForm = ({
11339
11440
  onAfterSubmit
11340
11441
  }) => {
11341
11442
  const queryClient = reactQuery.useQueryClient();
11342
- const { mutateAsync, isPending } = chunkJDWJ2HXQ_cjs.useUpdateTenantGroup();
11443
+ const { mutateAsync, isPending } = chunkSXEXXJHL_cjs.useUpdateTenantGroup();
11343
11444
  const form = reactHookForm.useForm({
11344
11445
  resolver: zod$1.zodResolver(editProjectFormSchema),
11345
11446
  defaultValues: {
@@ -11475,7 +11576,7 @@ function SidebarMobileView({
11475
11576
  navigationMenus
11476
11577
  }) {
11477
11578
  const [open, setOpen] = React8.useState(false);
11478
- const { appLightLogo, appDarkLogo } = chunkJDWJ2HXQ_cjs.useLogo();
11579
+ const { appLightLogo, appDarkLogo } = chunkSXEXXJHL_cjs.useLogo();
11479
11580
  const allowedMenu = chunkBPJM3L7O_cjs.useFilteredMenus(navigationMenus);
11480
11581
  return /* @__PURE__ */ jsxRuntime.jsxs(Sheet, { open, onOpenChange: setOpen, children: [
11481
11582
  /* @__PURE__ */ jsxRuntime.jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", size: "icon", className: "shrink-0", children: [
@@ -11524,9 +11625,9 @@ function SidebarMenuDesktop({
11524
11625
  redirectPaths,
11525
11626
  navigationMenus
11526
11627
  }) {
11527
- const { isSidebarOpen, toggleSidebar } = React8.useContext(chunkOJG2XE7Z_cjs.SidebarContext);
11528
- const { appLightLogo, appDarkLogo } = chunkJDWJ2HXQ_cjs.useLogo();
11529
- const icon = chunkJDWJ2HXQ_cjs.useIcon();
11628
+ const { isSidebarOpen, toggleSidebar } = React8.useContext(chunkIJMKS4XG_cjs.SidebarContext);
11629
+ const { appLightLogo, appDarkLogo } = chunkSXEXXJHL_cjs.useLogo();
11630
+ const icon = chunkSXEXXJHL_cjs.useIcon();
11530
11631
  const allowedMenu = chunkBPJM3L7O_cjs.useFilteredMenus(navigationMenus);
11531
11632
  const { isActivePath: isProjectOverviewRoute } = chunkBPJM3L7O_cjs.useIsActiveMenu("/app/project");
11532
11633
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -11655,7 +11756,7 @@ var ErrorBoundary = class extends React8.Component {
11655
11756
  var ArchiveProject = () => {
11656
11757
  const navigate = reactRouter.useNavigate();
11657
11758
  const projectKey = chunk6GCU5LM7_cjs.useProjectStore().selectedProject?.tenantId || "";
11658
- const { mutateAsync, isPending } = chunkJDWJ2HXQ_cjs.useDisableProject({ projectKey });
11759
+ const { mutateAsync, isPending } = chunkSXEXXJHL_cjs.useDisableProject({ projectKey });
11659
11760
  const onClickHandler = async () => {
11660
11761
  try {
11661
11762
  const res = await mutateAsync();
@@ -12625,7 +12726,7 @@ var ClearButton = ({ onClear }) => {
12625
12726
  };
12626
12727
  function Radio({ label, options, onChange, value }) {
12627
12728
  const [search, setSearch] = React8.useState("");
12628
- const [buttonRef, popoverWidth] = chunkJDWJ2HXQ_cjs.usePopoverWidth();
12729
+ const [buttonRef, popoverWidth] = chunkSXEXXJHL_cjs.usePopoverWidth();
12629
12730
  const isMobile = chunkBPJM3L7O_cjs.useIsMobile();
12630
12731
  const selected = React8.useMemo(
12631
12732
  () => options.find((item) => item.value === value) || null,
@@ -13634,5 +13735,5 @@ exports.usePaginationQueryParams = usePaginationQueryParams;
13634
13735
  exports.useRightSidePanel = useRightSidePanel;
13635
13736
  exports.useSortQueryParams = useSortQueryParams;
13636
13737
  exports.useWizardStepper = useWizardStepper;
13637
- //# sourceMappingURL=chunk-SHCA37CD.cjs.map
13638
- //# sourceMappingURL=chunk-SHCA37CD.cjs.map
13738
+ //# sourceMappingURL=chunk-YFTRLNLF.cjs.map
13739
+ //# sourceMappingURL=chunk-YFTRLNLF.cjs.map