@burdenoff/fe-libs 2026.601.5 → 2026.601.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 (30) hide show
  1. package/dist/chrome/ProductSideNav.d.ts.map +1 -1
  2. package/dist/chrome/SideNavigation.d.ts.map +1 -1
  3. package/dist/chrome/sideNavigation/NavItemRenderer.d.ts.map +1 -1
  4. package/dist/shared/components/PWAInstallBanner.d.ts.map +1 -1
  5. package/dist/shared/events/index.d.ts +77 -1
  6. package/dist/shared/events/index.d.ts.map +1 -1
  7. package/dist/shared/graphql/client.d.ts.map +1 -1
  8. package/dist/shared/graphql/client.js +63 -63
  9. package/dist/shared/graphql/fetch.d.ts.map +1 -1
  10. package/dist/shared/graphql/fetch.js +120 -120
  11. package/dist/shared/providers/AppShellProvider.d.ts.map +1 -1
  12. package/dist/shared/providers/AppShellProvider.js +204 -184
  13. package/dist/shared/providers/shell/ProfileStorageManager.d.ts +1 -1
  14. package/dist/shared/providers/shell/ProfileStorageManager.d.ts.map +1 -1
  15. package/dist/shared/providers/shell/ProfileStorageManager.js +110 -102
  16. package/dist/shared/providers/shell/authProvider/useAuthActions.d.ts.map +1 -1
  17. package/dist/shared/providers/shell/authProvider/useAuthActions.js +12 -10
  18. package/dist/shared/providers/shell/authProvider/useTokenExpiryTimer.d.ts.map +1 -1
  19. package/dist/shared/providers/shell/authProvider/useTokenExpiryTimer.js +8 -8
  20. package/dist/shared/utils/apollo.js +1 -1
  21. package/dist/shared/utils/authErrorHandling.d.ts.map +1 -1
  22. package/dist/shared/utils/authErrorHandling.js +23 -8
  23. package/dist/shared/utils/backendErrors.d.ts +23 -0
  24. package/dist/shared/utils/backendErrors.d.ts.map +1 -1
  25. package/dist/shared/utils/backendErrors.js +113 -39
  26. package/dist/shared/utils/index.d.ts +2 -2
  27. package/dist/shared/utils/index.d.ts.map +1 -1
  28. package/dist/shared-utils.js +12 -12
  29. package/dist/shared.js +97 -97
  30. package/package.json +1 -1
@@ -1,44 +1,44 @@
1
1
  import { isShellLessRoute as e } from "../config/shellRoutes.js";
2
2
  import { readActiveContextValueWithUrlPrecedence as t } from "./shell/ActiveContextStorage.js";
3
- import { BACKEND_ERROR_EVENT as n, dispatchBackendErrorEvent as r, isBackendErrorDisplay as i, shouldToastBackendError as a } from "../utils/backendErrors.js";
4
- import { graphqlFetch as o } from "../graphql/fetch.js";
5
- import { attemptTokenRefresh as s, clearAuthSessionStorage as c, isAuthNetworkError as l } from "../utils/authErrorHandling.js";
6
- import { AuthProvider as u } from "./shell/AuthProvider.js";
7
- import { ActiveContextProvider as ee } from "./shell/ActiveContextProvider.js";
8
- import { LogManager as te } from "../logger/LogManager.js";
3
+ import { BACKEND_ERROR_EVENT as n, CONNECTION_STATUS_EVENT as r, dispatchBackendErrorEvent as i, isBackendErrorDisplay as a, shouldToastBackendError as o } from "../utils/backendErrors.js";
4
+ import { graphqlFetch as s } from "../graphql/fetch.js";
5
+ import { attemptTokenRefresh as c, clearAuthSessionStorage as l, isAuthNetworkError as ee } from "../utils/authErrorHandling.js";
6
+ import { AuthProvider as te } from "./shell/AuthProvider.js";
7
+ import { ActiveContextProvider as ne } from "./shell/ActiveContextProvider.js";
8
+ import { LogManager as u } from "../logger/LogManager.js";
9
9
  import { ConsoleTransport as d } from "../logger/ConsoleTransport.js";
10
10
  import { ThemeProvider as f } from "./shell/ThemeProvider.js";
11
- import { ErrorFallback as p } from "../components/ErrorFallback.js";
12
- import { m } from "../../node_modules/react-error-boundary/dist/react-error-boundary.js";
13
- import { PWAInstallBanner as h } from "../components/PWAInstallBanner.js";
14
- import { FeatureFlagsProvider as g } from "./shell/FeatureFlagsProvider.js";
15
- import { FeatureFlagProvider as _ } from "../feature-flags/FeatureFlagProvider.js";
16
- import { GlobalUiProvider as v } from "./shell/GlobalUiProvider.js";
17
- import { ShellUiProvider as y } from "./shell/ShellUiProvider.js";
18
- import { ContextManagerProvider as ne } from "./shell/ContextManagerProvider.js";
19
- import { AuthTokenProvider as re } from "./shell/AuthTokenProvider.js";
20
- import { MultiGatewayProvider as ie } from "./shell/MultiGatewayProvider.js";
11
+ import { ErrorFallback as re } from "../components/ErrorFallback.js";
12
+ import { m as p } from "../../node_modules/react-error-boundary/dist/react-error-boundary.js";
13
+ import { PWAInstallBanner as m } from "../components/PWAInstallBanner.js";
14
+ import { FeatureFlagsProvider as h } from "./shell/FeatureFlagsProvider.js";
15
+ import { FeatureFlagProvider as g } from "../feature-flags/FeatureFlagProvider.js";
16
+ import { GlobalUiProvider as _ } from "./shell/GlobalUiProvider.js";
17
+ import { ShellUiProvider as v } from "./shell/ShellUiProvider.js";
18
+ import { ContextManagerProvider as y } from "./shell/ContextManagerProvider.js";
19
+ import { AuthTokenProvider as ie } from "./shell/AuthTokenProvider.js";
20
+ import { MultiGatewayProvider as ae } from "./shell/MultiGatewayProvider.js";
21
21
  import { G as b, j as x, w as S } from "../../node_modules/web-vitals/dist/web-vitals.js";
22
22
  import { ProfileI18nBridge as C } from "./shell/ProfileI18nBridge.js";
23
23
  import { ProfileGeographyBridge as w } from "./shell/ProfileGeographyBridge.js";
24
- import { AppShellContextProvider as T } from "./shell/AppShellContext.js";
25
- import { DevtoolsSink as E } from "../events/sinks/DevtoolsSink.js";
26
- import { BroadcastChannelSink as D } from "../events/sinks/BroadcastChannelSink.js";
27
- import { BackendAuditSink as O } from "../events/sinks/BackendAuditSink.js";
28
- import { RybbitSink as k } from "../events/sinks/RybbitSink.js";
29
- import { OtelBrowserSink as A } from "../events/sinks/OtelBrowserSink.js";
30
- import { EventBusProvider as j, useEventBus as M } from "../../shared-events.js";
31
- import { useReferralAttribution as N } from "../hooks/useReferralAttribution.js";
32
- import { TourPlayerProvider as P } from "../tours/TourPlayerProvider.js";
33
- import { ToursProvider as F, useToursContext as I } from "../tours/ToursContext.js";
34
- import { TourInitializer as L } from "../tours/TourInitializer.js";
35
- import { Suspense as R, useCallback as z, useEffect as B, useMemo as V, useRef as H } from "react";
36
- import { Fragment as U, jsx as W, jsxs as G } from "react/jsx-runtime";
37
- import { BrowserRouter as K, useLocation as q } from "react-router-dom";
38
- import { Toaster as J, toast as Y } from "sonner";
39
- import { MutationCache as ae, QueryCache as oe, QueryClient as se, QueryClientProvider as ce } from "@tanstack/react-query";
24
+ import { AppShellContextProvider as oe } from "./shell/AppShellContext.js";
25
+ import { DevtoolsSink as T } from "../events/sinks/DevtoolsSink.js";
26
+ import { BroadcastChannelSink as E } from "../events/sinks/BroadcastChannelSink.js";
27
+ import { BackendAuditSink as D } from "../events/sinks/BackendAuditSink.js";
28
+ import { RybbitSink as O } from "../events/sinks/RybbitSink.js";
29
+ import { OtelBrowserSink as k } from "../events/sinks/OtelBrowserSink.js";
30
+ import { EventBusProvider as A, useEventBus as j } from "../../shared-events.js";
31
+ import { useReferralAttribution as M } from "../hooks/useReferralAttribution.js";
32
+ import { TourPlayerProvider as N } from "../tours/TourPlayerProvider.js";
33
+ import { ToursProvider as P, useToursContext as F } from "../tours/ToursContext.js";
34
+ import { TourInitializer as I } from "../tours/TourInitializer.js";
35
+ import { Suspense as L, useCallback as R, useEffect as z, useMemo as B, useRef as V } from "react";
36
+ import { Fragment as H, jsx as U, jsxs as W } from "react/jsx-runtime";
37
+ import { BrowserRouter as G, useLocation as K } from "react-router-dom";
38
+ import { Toaster as q, toast as J } from "sonner";
39
+ import { MutationCache as se, QueryCache as ce, QueryClient as le, QueryClientProvider as ue } from "@tanstack/react-query";
40
40
  //#region src/shared/providers/AppShellProvider.tsx
41
- var X = {
41
+ var Y = {
42
42
  bigconsole: {
43
43
  prod: "292459a3e86c",
44
44
  nonProd: "a7e7362b0de3"
@@ -57,23 +57,8 @@ var X = {
57
57
  },
58
58
  vibecontrols: { prod: "8a46449d9c07" },
59
59
  workspaces: { prod: "da0c142f4b2e" }
60
- }, Z = [
61
- "nav.route.changed",
62
- "auth.signed_in",
63
- "auth.signed_out",
64
- "support.ticket.created",
65
- "support.ticket.closed",
66
- "support.ticket.reopened",
67
- "support.kb.article_rated",
68
- "conversations.conversation.created",
69
- "conversations.conversation.archived",
70
- "notification.item.opened",
71
- "notification.preference.updated",
72
- "notification.admin.sent",
73
- "notification.template.saved",
74
- "notification.schedule.updated"
75
- ], Q = 4e3;
76
- function le(e) {
60
+ }, X = /* @__PURE__ */ "nav.route.changed,auth.signed_in,auth.signed_out,support.ticket.created,support.ticket.closed,support.ticket.reopened,support.kb.article_rated,conversations.conversation.created,conversations.conversation.archived,notification.item.opened,notification.preference.updated,notification.admin.sent,notification.template.saved,notification.schedule.updated,vibecontrols.agent.registered,vibecontrols.agent.gateway_auth_setup,vibecontrols.session.created,vibecontrols.session.started,vibecontrols.session.terminal_opened_in_browser,vibecontrols.session.share_link_created,vibecontrols.session.joined_shared,vibecontrols.tunnel.created,vibecontrols.tunnel.started,vibecontrols.vibedeck.button_executed,vibecontrols.quota.agent_limit_hit,vibecontrols.quota.session_limit_hit,vibecontrols.quota.tunnel_limit_hit,vibecontrols.billing.upgrade_clicked".split(","), de = 4e3;
61
+ function fe(e) {
77
62
  let t = e.technicalMessage ?? e.extensions?.technicalMessage, n = {
78
63
  code: e.code,
79
64
  operationName: e.operationName,
@@ -85,13 +70,13 @@ function le(e) {
85
70
  };
86
71
  console.error("[Burdenoff backend error]", e.message, n);
87
72
  }
88
- function ue(e) {
73
+ function pe(e) {
89
74
  return e === "prod" || e === "production" ? "prod" : e === "alpha" || e === "staging" ? "alpha" : "dev";
90
75
  }
91
- function de(e, t) {
76
+ function me(e, t) {
92
77
  return e.VITE_DISABLE_ANALYTICS === "true" ? !1 : e.VITE_ENABLE_ANALYTICS === "true" || e.PROD || t !== "dev" ? !0 : e.VITE_ENABLE_ANALYTICS !== "false";
93
78
  }
94
- function fe() {
79
+ function he() {
95
80
  return {
96
81
  BASE_URL: "/",
97
82
  DEV: !1,
@@ -100,8 +85,8 @@ function fe() {
100
85
  SSR: !1
101
86
  };
102
87
  }
103
- function $(e, t) {
104
- let n = ue(t.VITE_DEPLOY_ENV ?? t.MODE), r = de(t, n), i = X[e], a = n === "prod" ? i?.prod : i?.nonProd, o = t.VITE_RYBBIT_SITE_ID || a, s = t.VITE_BACKEND_AUDIT_ENDPOINT || (t.PROD ? "/api/fe-events" : void 0);
88
+ function Z(e, t) {
89
+ let n = pe(t.VITE_DEPLOY_ENV ?? t.MODE), r = me(t, n), i = Y[e], a = n === "prod" ? i?.prod : i?.nonProd, o = t.VITE_RYBBIT_SITE_ID || a, s = t.VITE_BACKEND_AUDIT_ENDPOINT || (t.PROD ? "/api/fe-events" : void 0);
105
90
  return {
106
91
  enabled: r,
107
92
  appVersion: t.VITE_APP_VERSION || "0.0.0",
@@ -112,7 +97,7 @@ function $(e, t) {
112
97
  enabled: r && !!o,
113
98
  siteId: o,
114
99
  scriptUrl: t.VITE_RYBBIT_SCRIPT_URL,
115
- allowlist: Z,
100
+ allowlist: X,
116
101
  identifyOn: "auth.signed_in",
117
102
  rename: { "nav.route.changed": "pageview" }
118
103
  },
@@ -127,16 +112,16 @@ function $(e, t) {
127
112
  }
128
113
  };
129
114
  }
130
- function pe({ children: e, enablePWA: t, toasterPosition: n, productName: r, brandInitial: i }) {
131
- let { trackProgress: a, recordStepCompletion: o, trackEvent: s } = I(), c = z((e, t) => e.steps?.[t], []);
132
- return /* @__PURE__ */ G(P, {
133
- onTourStart: z((e) => {
115
+ function ge({ children: e, enablePWA: t, toasterPosition: n, productName: r, brandInitial: i }) {
116
+ let { trackProgress: a, recordStepCompletion: o, trackEvent: s } = F(), c = R((e, t) => e.steps?.[t], []);
117
+ return /* @__PURE__ */ W(N, {
118
+ onTourStart: R((e) => {
134
119
  a(e.id, "started"), s("TOUR_STARTED", e.id);
135
120
  }, [s, a]),
136
- onTourComplete: z((e) => {
121
+ onTourComplete: R((e) => {
137
122
  a(e.id, "completed"), s("TOUR_COMPLETED", e.id);
138
123
  }, [s, a]),
139
- onTourSkip: z((e, t) => {
124
+ onTourSkip: R((e, t) => {
140
125
  let n = c(e, t);
141
126
  a(e.id, "skipped"), s("TOUR_SKIPPED", e.id, {
142
127
  stepId: n?.id,
@@ -147,14 +132,14 @@ function pe({ children: e, enablePWA: t, toasterPosition: n, productName: r, bra
147
132
  s,
148
133
  a
149
134
  ]),
150
- onStepChange: z((e, t) => {
135
+ onStepChange: R((e, t) => {
151
136
  let n = c(e, t);
152
137
  n && s("STEP_VIEWED", e.id, {
153
138
  stepId: n.id,
154
139
  stepOrder: n.stepOrder
155
140
  });
156
141
  }, [c, s]),
157
- onStepComplete: z((e, t) => {
142
+ onStepComplete: R((e, t) => {
158
143
  let n = c(e, t);
159
144
  n && (o(e.id, n.id), s("STEP_COMPLETED", e.id, {
160
145
  stepId: n.id,
@@ -166,17 +151,18 @@ function pe({ children: e, enablePWA: t, toasterPosition: n, productName: r, bra
166
151
  s
167
152
  ]),
168
153
  children: [
169
- /* @__PURE__ */ W(L, {}),
154
+ /* @__PURE__ */ U(I, {}),
170
155
  e,
171
- /* @__PURE__ */ W(me, {}),
172
- /* @__PURE__ */ W(J, {
156
+ /* @__PURE__ */ U(_e, {}),
157
+ /* @__PURE__ */ U(ve, {}),
158
+ /* @__PURE__ */ U(q, {
173
159
  position: n,
174
160
  richColors: !0,
175
161
  closeButton: !0
176
162
  }),
177
- t && /* @__PURE__ */ W(R, {
163
+ t && /* @__PURE__ */ U(L, {
178
164
  fallback: null,
179
- children: /* @__PURE__ */ W(h, {
165
+ children: /* @__PURE__ */ U(m, {
180
166
  productName: r,
181
167
  brandInitial: i
182
168
  })
@@ -184,34 +170,68 @@ function pe({ children: e, enablePWA: t, toasterPosition: n, productName: r, bra
184
170
  ]
185
171
  });
186
172
  }
187
- function me() {
188
- let e = H(null);
189
- return B(() => {
173
+ function _e() {
174
+ let e = V(null);
175
+ return z(() => {
190
176
  let t = (t) => {
191
- let n = t instanceof CustomEvent && i(t.detail) ? t.detail : null;
192
- if (!a(n)) return;
193
- le(n);
194
- let r = `${n.code ?? ""}|${n.message}`, o = Date.now(), s = e.current;
195
- s?.key === r && o - s.shownAt < Q || (e.current = {
177
+ let n = t instanceof CustomEvent && a(t.detail) ? t.detail : null;
178
+ if (!o(n)) return;
179
+ fe(n);
180
+ let r = `${n.code ?? ""}|${n.message}`, i = Date.now(), s = e.current;
181
+ s?.key === r && i - s.shownAt < de || (e.current = {
196
182
  key: r,
197
- shownAt: o
198
- }, Y.error(n.message, { duration: 7e3 }));
183
+ shownAt: i
184
+ }, J.error(n.message, { duration: 7e3 }));
199
185
  };
200
186
  return window.addEventListener(n, t), () => window.removeEventListener(n, t);
201
187
  }, []), null;
202
188
  }
203
- function he({ children: e, i18nProductId: t, fallbackTranslations: n, defaultBrand: r, productName: i, brandInitial: a, enablePWA: o, toasterPosition: s }) {
204
- let c = q();
205
- N();
206
- let l = /* @__PURE__ */ W(w, { children: /* @__PURE__ */ W(g, { children: /* @__PURE__ */ W(_, {
189
+ var Q = "burdenoff-connection-status", $ = 1500;
190
+ function ve() {
191
+ let e = V(null), t = V(!1);
192
+ return z(() => {
193
+ let n = () => {
194
+ t.current || (t.current = !0, J.error("Connection lost. Trying to reconnect…", {
195
+ id: Q,
196
+ duration: Infinity
197
+ }));
198
+ }, i = () => {
199
+ t.current || e.current || (e.current = setTimeout(() => {
200
+ e.current = null, n();
201
+ }, $));
202
+ }, a = (n) => {
203
+ if (e.current &&= (clearTimeout(e.current), null), !t.current) {
204
+ J.dismiss(Q);
205
+ return;
206
+ }
207
+ t.current = !1, n ? J.success("Back online", {
208
+ id: Q,
209
+ duration: 2500
210
+ }) : J.dismiss(Q);
211
+ }, o = (e) => {
212
+ if (!(e instanceof CustomEvent)) return;
213
+ let t = e.detail;
214
+ t && (t.online ? a(!0) : i());
215
+ }, s = () => i(), c = () => {
216
+ e.current &&= (clearTimeout(e.current), null);
217
+ };
218
+ return window.addEventListener(r, o), window.addEventListener("offline", s), window.addEventListener("online", c), () => {
219
+ window.removeEventListener(r, o), window.removeEventListener("offline", s), window.removeEventListener("online", c), e.current && clearTimeout(e.current);
220
+ };
221
+ }, []), null;
222
+ }
223
+ function ye({ children: e, i18nProductId: t, fallbackTranslations: n, defaultBrand: r, productName: i, brandInitial: a, enablePWA: o, toasterPosition: s }) {
224
+ let c = K();
225
+ M();
226
+ let l = /* @__PURE__ */ U(w, { children: /* @__PURE__ */ U(h, { children: /* @__PURE__ */ U(g, {
207
227
  workspaceId: null,
208
228
  gateway: "global",
209
229
  defaultEnabled: !0,
210
- children: /* @__PURE__ */ W(v, { children: /* @__PURE__ */ W(y, { children: /* @__PURE__ */ W(m, {
230
+ children: /* @__PURE__ */ U(_, { children: /* @__PURE__ */ U(v, { children: /* @__PURE__ */ U(p, {
211
231
  fallback: null,
212
- children: /* @__PURE__ */ W(F, {
232
+ children: /* @__PURE__ */ U(P, {
213
233
  disabled: c.pathname.startsWith("/devportal") || c.pathname.startsWith("/organizations") || c.pathname.startsWith("/workspaces"),
214
- children: /* @__PURE__ */ W(pe, {
234
+ children: /* @__PURE__ */ U(ge, {
215
235
  enablePWA: o,
216
236
  toasterPosition: s,
217
237
  productName: i,
@@ -221,18 +241,18 @@ function he({ children: e, i18nProductId: t, fallbackTranslations: n, defaultBra
221
241
  })
222
242
  }) }) })
223
243
  }) }) });
224
- return /* @__PURE__ */ G(f, {
244
+ return /* @__PURE__ */ W(f, {
225
245
  defaultBrand: r,
226
- children: [/* @__PURE__ */ W(ge, {}), /* @__PURE__ */ W(C, {
246
+ children: [/* @__PURE__ */ U(be, {}), /* @__PURE__ */ U(C, {
227
247
  i18nProductId: t,
228
248
  fallbackTranslations: n,
229
249
  children: l
230
250
  })]
231
251
  });
232
252
  }
233
- function ge() {
234
- let e = q();
235
- return B(() => {
253
+ function be() {
254
+ let e = K();
255
+ return z(() => {
236
256
  e.hash || requestAnimationFrame(() => {
237
257
  window.scrollTo({
238
258
  top: 0,
@@ -250,7 +270,7 @@ function ge() {
250
270
  e.hash
251
271
  ]), null;
252
272
  }
253
- function _e(e) {
273
+ function xe(e) {
254
274
  if (e instanceof Error) return e.message;
255
275
  if (typeof e == "string") return e;
256
276
  try {
@@ -259,9 +279,9 @@ function _e(e) {
259
279
  return String(e);
260
280
  }
261
281
  }
262
- function ve() {
263
- let e = M(), t = q(), n = H(void 0), r = H(void 0);
264
- return B(() => {
282
+ function Se() {
283
+ let e = j(), t = K(), n = V(void 0), r = V(void 0);
284
+ return z(() => {
265
285
  let i = `${t.pathname}${t.search}${t.hash}`;
266
286
  r.current !== i && (e.emit("nav.route.changed", {
267
287
  pathname: t.pathname,
@@ -275,7 +295,7 @@ function ve() {
275
295
  t.hash,
276
296
  t.pathname,
277
297
  t.search
278
- ]), B(() => {
298
+ ]), z(() => {
279
299
  let t = (t) => {
280
300
  e.emit("error.runtime.caught", {
281
301
  message: t.message || "Runtime error",
@@ -285,12 +305,12 @@ function ve() {
285
305
  errorName: t.error instanceof Error ? t.error.name : void 0
286
306
  });
287
307
  }, n = (t) => {
288
- e.emit("error.unhandledrejection", { reason: _e(t.reason) });
308
+ e.emit("error.unhandledrejection", { reason: xe(t.reason) });
289
309
  };
290
310
  return window.addEventListener("error", t), window.addEventListener("unhandledrejection", n), () => {
291
311
  window.removeEventListener("error", t), window.removeEventListener("unhandledrejection", n);
292
312
  };
293
- }, [e]), B(() => {
313
+ }, [e]), z(() => {
294
314
  b((t) => {
295
315
  e.emit("perf.lcp.measured", {
296
316
  metric: "LCP",
@@ -315,39 +335,39 @@ function ve() {
315
335
  });
316
336
  }, [e]), null;
317
337
  }
318
- function ye({ config: e, productSlug: t }) {
319
- return /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(ve, {}), e.enabled === !1 ? null : /* @__PURE__ */ G(U, { children: [
320
- e.devtools ? /* @__PURE__ */ W(E, { enabled: !0 }) : null,
321
- e.broadcast === !1 ? null : /* @__PURE__ */ W(D, {}),
322
- e.backendAudit?.enabled && e.backendAudit.endpoint ? /* @__PURE__ */ W(O, { endpoint: e.backendAudit.endpoint }) : null,
323
- e.rybbit?.enabled && e.rybbit.siteId ? /* @__PURE__ */ W(k, {
338
+ function Ce({ config: e, productSlug: t }) {
339
+ return /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(Se, {}), e.enabled === !1 ? null : /* @__PURE__ */ W(H, { children: [
340
+ e.devtools ? /* @__PURE__ */ U(T, { enabled: !0 }) : null,
341
+ e.broadcast === !1 ? null : /* @__PURE__ */ U(E, {}),
342
+ e.backendAudit?.enabled && e.backendAudit.endpoint ? /* @__PURE__ */ U(D, { endpoint: e.backendAudit.endpoint }) : null,
343
+ e.rybbit?.enabled && e.rybbit.siteId ? /* @__PURE__ */ U(O, {
324
344
  siteId: e.rybbit.siteId,
325
345
  scriptUrl: e.rybbit.scriptUrl,
326
346
  allowlist: e.rybbit.allowlist,
327
347
  identifyOn: e.rybbit.identifyOn,
328
348
  rename: e.rybbit.rename
329
349
  }) : null,
330
- e.otel?.enabled && e.otel.endpoint ? /* @__PURE__ */ W(A, {
350
+ e.otel?.enabled && e.otel.endpoint ? /* @__PURE__ */ U(k, {
331
351
  endpoint: e.otel.endpoint,
332
352
  serviceName: e.otel.serviceName ?? `${t}-app`,
333
353
  flushInterval: e.otel.flushInterval
334
354
  }) : null
335
355
  ] })] });
336
356
  }
337
- function be({ config: n, children: i, clearAuthStore: a }) {
338
- let { productName: f, productSlug: h = f.toLowerCase().replace(/\s+/g, ""), tagline: g = "", domain: _, i18nProductId: v, gatewayUrls: y, authBridge: b, defaultBrand: x = "default", enablePWA: S = !0, brandInitial: C = f.charAt(0), defaultGateway: w = "workspace", enableSubscriptions: E = !0, fallbackTranslations: D, queryClientOptions: O, toasterPosition: k = "bottom-right", observability: A } = n, M = A ?? $(h, fe()), N = V(() => ({
339
- productName: f,
340
- productSlug: h,
341
- brandInitial: C,
342
- tagline: g,
343
- domain: _
357
+ function we({ config: n, children: r, clearAuthStore: a }) {
358
+ let { productName: o, productSlug: f = o.toLowerCase().replace(/\s+/g, ""), tagline: m = "", domain: h, i18nProductId: g, gatewayUrls: _, authBridge: v, defaultBrand: b = "default", enablePWA: x = !0, brandInitial: S = o.charAt(0), defaultGateway: C = "workspace", enableSubscriptions: w = !0, fallbackTranslations: T, queryClientOptions: E, toasterPosition: D = "bottom-right", observability: O } = n, k = O ?? Z(f, he()), j = B(() => ({
359
+ productName: o,
360
+ productSlug: f,
361
+ brandInitial: S,
362
+ tagline: m,
363
+ domain: h
344
364
  }), [
365
+ o,
345
366
  f,
346
- h,
347
- C,
348
- g,
349
- _
350
- ]), P = H(!1), F = H(!1), I = H(null), L = H(!!b?.url), R = z(() => {
367
+ S,
368
+ m,
369
+ h
370
+ ]), M = V(!1), N = V(!1), P = V(null), F = V(!!v?.url), I = R(() => {
351
371
  if ((() => {
352
372
  try {
353
373
  let e = sessionStorage.getItem("bf-active-profile");
@@ -357,26 +377,26 @@ function be({ config: n, children: i, clearAuthStore: a }) {
357
377
  } catch {
358
378
  return !1;
359
379
  }
360
- })() || L.current || P.current) return;
361
- P.current = !0, c(a);
380
+ })() || F.current || M.current) return;
381
+ M.current = !0, l(a);
362
382
  let t = `${window.location.pathname}${window.location.search}`, n = `/auth/login?reason=session-expired&returnTo=${encodeURIComponent(t)}`, r = /^\/vibecontrols\/(share|deck)\//.test(window.location.pathname);
363
383
  if (window.location.pathname.startsWith("/auth/") || e(window.location.pathname) || r) {
364
- P.current = !1;
384
+ M.current = !1;
365
385
  return;
366
386
  }
367
387
  window.location.replace(n);
368
- }, [a]), U = V(() => ({
369
- globalBaseUrl: y.globalBaseUrl,
370
- isRefreshing: F,
371
- refreshPromise: I
372
- }), [y.globalBaseUrl]), q = z(async () => s(U), [U]), J = z(async () => {
373
- window.location.pathname.startsWith("/auth/") || await q() || R();
374
- }, [q, R]), Y = z(async (e) => {
375
- l(e) ? await q() || R() : console.error("[Network] Backend unreachable:", e.message);
376
- }, [q, R]), X = z(async (e) => {
377
- let t = await o({
388
+ }, [a]), L = B(() => ({
389
+ globalBaseUrl: _.globalBaseUrl,
390
+ isRefreshing: N,
391
+ refreshPromise: P
392
+ }), [_.globalBaseUrl]), H = R(async () => c(L), [L]), K = R(async () => {
393
+ window.location.pathname.startsWith("/auth/") || await H() || I();
394
+ }, [H, I]), q = R(async (e) => {
395
+ ee(e) ? await H() || I() : console.error("[Network] Backend unreachable:", e.message);
396
+ }, [H, I]), J = R(async (e) => {
397
+ let t = await s({
378
398
  gateway: "global",
379
- baseUrl: y.globalBaseUrl,
399
+ baseUrl: _.globalBaseUrl,
380
400
  authToken: "",
381
401
  query: "mutation RefreshToken($token: String!) {\n refreshToken(token: $token) {\n accessToken\n refreshToken\n expiresIn\n }\n }",
382
402
  variables: { token: e }
@@ -388,78 +408,78 @@ function be({ config: n, children: i, clearAuthStore: a }) {
388
408
  refreshToken: n.refreshToken,
389
409
  expiresAt: n.expiresIn ? Date.now() + n.expiresIn * 1e3 : void 0
390
410
  };
391
- }, [y.globalBaseUrl]), Z = z(() => t("organization"), []), Q = V(() => {
392
- let e = new se({
393
- queryCache: new oe({ onError: (e) => {
394
- r(e);
411
+ }, [_.globalBaseUrl]), Y = R(() => t("organization"), []), X = B(() => {
412
+ let e = new le({
413
+ queryCache: new ce({ onError: (e) => {
414
+ i(e);
395
415
  } }),
396
- mutationCache: new ae({
416
+ mutationCache: new se({
397
417
  onSuccess: () => {
398
418
  e.invalidateQueries();
399
419
  },
400
420
  onError: (e) => {
401
- r(e);
421
+ i(e);
402
422
  }
403
423
  }),
404
424
  defaultOptions: { queries: {
405
- staleTime: O?.staleTime ?? 300 * 1e3,
406
- retry: O?.retry ?? 1,
407
- refetchOnWindowFocus: O?.refetchOnWindowFocus ?? !1
425
+ staleTime: E?.staleTime ?? 300 * 1e3,
426
+ retry: E?.retry ?? 1,
427
+ refetchOnWindowFocus: E?.refetchOnWindowFocus ?? !1
408
428
  } }
409
429
  });
410
430
  return e;
411
- }, [O]);
412
- return B(() => {
413
- let e = te.getInstance();
431
+ }, [E]);
432
+ return z(() => {
433
+ let e = u.getInstance();
414
434
  e.getLogger("shell") || e.getLogger("shell").addTransport(new d());
415
- }, []), /* @__PURE__ */ W(T, {
416
- value: N,
417
- children: /* @__PURE__ */ W(j, {
418
- appName: h,
419
- appVersion: M.appVersion,
420
- appEnv: M.appEnv,
421
- sourceMfe: h,
422
- children: /* @__PURE__ */ W(m, {
423
- FallbackComponent: p,
424
- children: /* @__PURE__ */ G(K, { children: [/* @__PURE__ */ W(ye, {
425
- config: M,
426
- productSlug: h
427
- }), /* @__PURE__ */ W(ce, {
428
- client: Q,
429
- children: /* @__PURE__ */ W(re, { children: /* @__PURE__ */ W(ie, {
430
- workspaceBaseUrl: y.workspaceBaseUrl,
431
- globalBaseUrl: y.globalBaseUrl,
432
- organizationId: Z,
433
- defaultGateway: w,
434
- enableSubscriptions: E,
435
- onAuthError: J,
436
- onNetworkError: Y,
437
- onRefreshToken: q,
438
- children: /* @__PURE__ */ W(u, {
439
- bridgeUrl: b?.url,
440
- bridgeAllowedOrigins: b?.allowedOrigins,
441
- bridgeDebug: b?.debug,
442
- onRefreshToken: X,
435
+ }, []), /* @__PURE__ */ U(oe, {
436
+ value: j,
437
+ children: /* @__PURE__ */ U(A, {
438
+ appName: f,
439
+ appVersion: k.appVersion,
440
+ appEnv: k.appEnv,
441
+ sourceMfe: f,
442
+ children: /* @__PURE__ */ U(p, {
443
+ FallbackComponent: re,
444
+ children: /* @__PURE__ */ W(G, { children: [/* @__PURE__ */ U(Ce, {
445
+ config: k,
446
+ productSlug: f
447
+ }), /* @__PURE__ */ U(ue, {
448
+ client: X,
449
+ children: /* @__PURE__ */ U(ie, { children: /* @__PURE__ */ U(ae, {
450
+ workspaceBaseUrl: _.workspaceBaseUrl,
451
+ globalBaseUrl: _.globalBaseUrl,
452
+ organizationId: Y,
453
+ defaultGateway: C,
454
+ enableSubscriptions: w,
455
+ onAuthError: K,
456
+ onNetworkError: q,
457
+ onRefreshToken: H,
458
+ children: /* @__PURE__ */ U(te, {
459
+ bridgeUrl: v?.url,
460
+ bridgeAllowedOrigins: v?.allowedOrigins,
461
+ bridgeDebug: v?.debug,
462
+ onRefreshToken: J,
443
463
  onBridgeReady: () => {
444
- L.current = !1;
464
+ F.current = !1;
445
465
  },
446
466
  onSessionExpiringSoon: () => {
447
467
  console.warn("[Auth] Session will expire in 5 minutes");
448
468
  },
449
469
  onTokenExpired: () => {
450
- R();
470
+ I();
451
471
  },
452
- children: /* @__PURE__ */ W(ee, {
472
+ children: /* @__PURE__ */ U(ne, {
453
473
  syncToUrl: !0,
454
- children: /* @__PURE__ */ W(ne, { children: /* @__PURE__ */ W(he, {
455
- i18nProductId: v,
456
- fallbackTranslations: D,
457
- defaultBrand: x,
458
- productName: f,
459
- brandInitial: C,
460
- enablePWA: S,
461
- toasterPosition: k,
462
- children: i
474
+ children: /* @__PURE__ */ U(y, { children: /* @__PURE__ */ U(ye, {
475
+ i18nProductId: g,
476
+ fallbackTranslations: T,
477
+ defaultBrand: b,
478
+ productName: o,
479
+ brandInitial: S,
480
+ enablePWA: x,
481
+ toasterPosition: D,
482
+ children: r
463
483
  }) })
464
484
  })
465
485
  })
@@ -470,4 +490,4 @@ function be({ config: n, children: i, clearAuthStore: a }) {
470
490
  });
471
491
  }
472
492
  //#endregion
473
- export { be as AppShellProvider, $ as resolveAppShellObservabilityConfig };
493
+ export { we as AppShellProvider, Z as resolveAppShellObservabilityConfig };
@@ -67,7 +67,7 @@ export declare function setActiveProfileId(profileId: string): void;
67
67
  export declare function clearActiveProfileId(): void;
68
68
  /**
69
69
  * Get or initialize active profile.
70
- * If no active profile set for this tab, picks the first profile.
70
+ * Resolution order: per-tab pointer durable last-active hint first profile.
71
71
  */
72
72
  export declare function resolveActiveProfileId(): string | null;
73
73
  export declare function getProfileUser(profileId: string): ProfileUser | null;
@@ -1 +1 @@
1
- {"version":3,"file":"ProfileStorageManager.d.ts","sourceRoot":"","sources":["../../../../src/shared/providers/shell/ProfileStorageManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK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IAAI,MAAM,GAAG,IAAI,CAGvD;AAED,sDAAsD;AACtD,wBAAgB,gBAAgB,IAAI,cAAc,GAAG,IAAI,CAGxD;AAID;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,GAAG,MAAM,CAqB1E;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAS1C;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAGxC;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAOxD"}
1
+ {"version":3,"file":"ProfileStorageManager.d.ts","sourceRoot":"","sources":["../../../../src/shared/providers/shell/ProfileStorageManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,cAAc;IAC7B,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,C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