@vc-shell/framework 2.4.0-pr306.cc97338 → 2.4.0-pr307.72245d2

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/ai-agent/index.js +2 -2
  2. package/dist/chunks/{VcAiAgentPanel.vue_vue_type_script_setup_true_lang-B6-CbU4n.js → VcAiAgentPanel.vue_vue_type_script_setup_true_lang-DqvIE1_F.js} +302 -299
  3. package/dist/chunks/VcAiAgentPanel.vue_vue_type_script_setup_true_lang-DqvIE1_F.js.map +1 -0
  4. package/dist/chunks/{VcScheduler.vue_vue_type_script_setup_true_lang-rZsBM9o8.js → VcScheduler.vue_vue_type_script_setup_true_lang-D_oJl9RI.js} +4925 -4957
  5. package/dist/chunks/VcScheduler.vue_vue_type_script_setup_true_lang-D_oJl9RI.js.map +1 -0
  6. package/dist/chunks/{dashboard-feed-row.vue_vue_type_script_setup_true_lang-BCsJG_hk.js → dashboard-feed-row.vue_vue_type_script_setup_true_lang-DSujdkDw.js} +141 -146
  7. package/dist/chunks/{dashboard-feed-row.vue_vue_type_script_setup_true_lang-BCsJG_hk.js.map → dashboard-feed-row.vue_vue_type_script_setup_true_lang-DSujdkDw.js.map} +1 -1
  8. package/dist/chunks/{index-QlzA13tK.js → index-CWzujGzi.js} +1 -1
  9. package/dist/chunks/{index-QlzA13tK.js.map → index-CWzujGzi.js.map} +1 -1
  10. package/dist/core/plugins/ai-agent/components/VcAiAgentPanel.vue.d.ts.map +1 -1
  11. package/dist/core/plugins/ai-agent/services/message-transport.d.ts.map +1 -1
  12. package/dist/dashboard/index.js +1 -1
  13. package/dist/framework.js +12 -12
  14. package/dist/locales/de.js +0 -1
  15. package/dist/locales/en.js +0 -1
  16. package/dist/locales/en.json +0 -1
  17. package/dist/locales/types.d.ts +0 -1
  18. package/dist/shell/dashboard/draggable-dashboard/GridstackDashboard.vue.d.ts.map +1 -1
  19. package/dist/tsconfig.tsbuildinfo +1 -1
  20. package/dist/ui/components/molecules/vc-popover/vc-popover.vue.d.ts +0 -4
  21. package/dist/ui/components/molecules/vc-popover/vc-popover.vue.d.ts.map +1 -1
  22. package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts.map +1 -1
  23. package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts.map +1 -1
  24. package/dist/ui/components/organisms/vc-scheduler/_internal/month/MonthMorePopover.vue.d.ts.map +1 -1
  25. package/dist/ui/index.js +1 -1
  26. package/package.json +4 -4
  27. package/dist/chunks/VcAiAgentPanel.vue_vue_type_script_setup_true_lang-B6-CbU4n.js.map +0 -1
  28. package/dist/chunks/VcScheduler.vue_vue_type_script_setup_true_lang-rZsBM9o8.js.map +0 -1
  29. package/dist/ui/components/organisms/vc-blade/useBladeSkeleton.d.ts +0 -16
  30. package/dist/ui/components/organisms/vc-blade/useBladeSkeleton.d.ts.map +0 -1
@@ -1,4 +1,4 @@
1
- import { ref as L, computed as b, shallowRef as Ge, watch as q, getCurrentInstance as ee, inject as $, isRef as Ve, provide as Pe, defineComponent as H, openBlock as y, createElementBlock as S, createElementVNode as w, createCommentVNode as z, createStaticVNode as Ke, Fragment as we, renderList as qe, toDisplayString as K, createVNode as M, createBlock as se, unref as x, withCtx as F, withKeys as U, withModifiers as G, createTextVNode as Ce, Transition as ke, normalizeClass as Me, onUnmounted as ze, normalizeStyle as He } from "vue";
1
+ import { ref as M, computed as b, shallowRef as Ge, watch as q, getCurrentInstance as ee, inject as N, isRef as Ve, provide as ke, defineComponent as H, openBlock as B, createElementBlock as S, createElementVNode as w, createCommentVNode as z, createStaticVNode as Ke, Fragment as Ae, renderList as qe, toDisplayString as K, createVNode as k, createBlock as se, unref as x, withCtx as F, withKeys as U, withModifiers as G, createTextVNode as Ce, Transition as Pe, normalizeClass as Me, onUnmounted as ze, normalizeStyle as He } from "vue";
2
2
  import { c as W, b as De, d as We, B as Ze, e as Xe, f as Ye, A as be, L as je, g as Qe, T as Je, a as me, _ as ie, E as et } from "./VcAiAgentPanel.vue_vue_type_style_index_0_lang-CZdY18Hq.js";
3
3
  import { c as te } from "./vendor-lodash-es-D2n90GJy.js";
4
4
  import { u as tt } from "./vendor-vueuse-core-BFa9je5E.js";
@@ -20,9 +20,9 @@ const at = {
20
20
  AI_CHAT_MESSAGE: "AI_CHAT_MESSAGE"
21
21
  }, ot = "ai-agent-toggle", rt = "lucide-sparkles", it = "AI Assistant", ne = W("ai-agent-panel");
22
22
  function st() {
23
- const e = L("closed"), o = L(!1), t = b(() => e.value !== "closed"), s = b(() => e.value === "expanded"), n = () => {
23
+ const e = M("closed"), o = M(!1), t = b(() => e.value !== "closed"), s = b(() => e.value === "expanded"), n = () => {
24
24
  e.value === "closed" && (e.value = "open", ne.debug("Panel opened"));
25
- }, l = () => {
25
+ }, c = () => {
26
26
  e.value = "closed", o.value = !1, ne.debug("Panel closed, reset initialized state");
27
27
  };
28
28
  return {
@@ -31,9 +31,9 @@ function st() {
31
31
  isExpanded: s,
32
32
  isInitialized: o,
33
33
  open: n,
34
- close: l,
34
+ close: c,
35
35
  toggle: () => {
36
- e.value === "closed" ? n() : l();
36
+ e.value === "closed" ? n() : c();
37
37
  },
38
38
  expand: () => {
39
39
  e.value === "open" && (e.value = "expanded", ne.debug("Panel expanded"));
@@ -47,7 +47,7 @@ function st() {
47
47
  };
48
48
  }
49
49
  const he = W("ai-agent-context");
50
- function Ae(e) {
50
+ function we(e) {
51
51
  return e ? {
52
52
  id: e.id,
53
53
  name: e.name,
@@ -56,9 +56,9 @@ function Ae(e) {
56
56
  } : { id: "unknown", name: "unknown", title: "Unknown" };
57
57
  }
58
58
  function lt(e) {
59
- const { userGetter: o, bladeGetter: t, localeGetter: s, tokenGetter: n } = e, l = L(/* @__PURE__ */ new Map()), g = () => {
60
- const E = t();
61
- return E ? l.value.get(E.id) ?? {
59
+ const { userGetter: o, bladeGetter: t, localeGetter: s, tokenGetter: n } = e, c = M(/* @__PURE__ */ new Map()), g = () => {
60
+ const v = t();
61
+ return v ? c.value.get(v.id) ?? {
62
62
  items: [],
63
63
  type: "list",
64
64
  suggestions: void 0
@@ -67,162 +67,159 @@ function lt(e) {
67
67
  type: "list",
68
68
  suggestions: void 0
69
69
  };
70
- }, c = b(() => g().items), d = b(() => g().type), u = b(() => g().suggestions), h = b(() => c.value.length);
70
+ }, l = b(() => g().items), d = b(() => g().type), u = b(() => g().suggestions), h = b(() => l.value.length);
71
71
  return {
72
- contextItems: c,
72
+ contextItems: l,
73
73
  contextType: d,
74
74
  contextSuggestions: u,
75
75
  totalItemsCount: h,
76
- setContextData: (E, B, I, P) => {
77
- const k = t()?.id || P;
78
- return k ? E.length === 0 && !I ? (l.value.delete(k), he.debug(`Context cleared for blade: ${k}`), { cleared: !0 }) : (l.value.set(k, { items: E, type: B, suggestions: I }), he.debug(`Context set for blade: ${k}, items: ${E.length}, type: ${B}`), { cleared: !1 }) : (he.warn("Cannot set context data: no blade id available"), { cleared: !1 });
76
+ setContextData: (v, A, T, $) => {
77
+ const D = t()?.id || $;
78
+ return D ? v.length === 0 && !T ? (c.value.delete(D), he.debug(`Context cleared for blade: ${D}`), { cleared: !0 }) : (c.value.set(D, { items: v, type: A, suggestions: T }), he.debug(`Context set for blade: ${D}, items: ${v.length}, type: ${A}`), { cleared: !1 }) : (he.warn("Cannot set context data: no blade id available"), { cleared: !1 });
79
79
  },
80
80
  buildInitPayload: async () => {
81
- const E = n ? await n() ?? void 0 : void 0;
81
+ const v = n ? await n() ?? void 0 : void 0;
82
82
  return {
83
83
  userId: o()?.id || "",
84
84
  locale: s(),
85
- blade: Ae(t()),
85
+ blade: we(t()),
86
86
  contextType: d.value,
87
- items: te(c.value),
87
+ items: te(l.value),
88
88
  suggestions: u.value ? te(u.value) : void 0,
89
- accessToken: E
89
+ accessToken: v
90
90
  };
91
91
  },
92
92
  buildUpdatePayload: async () => {
93
- const E = n ? await n() ?? void 0 : void 0;
93
+ const v = n ? await n() ?? void 0 : void 0;
94
94
  return {
95
- blade: Ae(t()),
95
+ blade: we(t()),
96
96
  contextType: d.value,
97
- items: te(c.value),
97
+ items: te(l.value),
98
98
  suggestions: u.value ? te(u.value) : void 0,
99
99
  locale: s(),
100
- accessToken: E
100
+ accessToken: v
101
101
  };
102
102
  }
103
103
  };
104
104
  }
105
105
  const O = W("ai-agent-transport");
106
106
  function ct(e) {
107
- const { getConfig: o, isEmbedded: t, navigateToBlade: s, closePanel: n } = e, l = Ge(null), g = L(!1), c = L(!1), d = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set();
108
- function h(f, C) {
107
+ const { getConfig: o, isEmbedded: t, navigateToBlade: s, closePanel: n } = e, c = Ge(null), g = M(!1), l = M(!1), d = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set();
108
+ function h(f, E) {
109
109
  switch (f) {
110
110
  case "NAVIGATE_TO_APP": {
111
- const B = C;
112
- s && B?.bladeName && (s(B.bladeName, B.param, B.options), O.debug(`Navigation requested to: ${B.bladeName}`));
111
+ const A = E;
112
+ s && A?.bladeName && (s(A.bladeName, A.param, A.options), O.debug(`Navigation requested to: ${A.bladeName}`));
113
113
  break;
114
114
  }
115
115
  // The panel's own Escape handler listens on the host document, which never sees a
116
116
  // keystroke delivered to a cross-origin iframe. So while the chatbot holds focus the
117
117
  // only route back is the chatbot relaying it here (VCST-5673). Closing a panel exposes
118
- // nothing, and the sender's origin and window are checked before this runs.
118
+ // nothing, and the sender's origin is already checked before this runs.
119
119
  case "CLOSE_PANEL": {
120
120
  n && (n(), O.debug("Panel close requested by the chatbot"));
121
121
  break;
122
122
  }
123
123
  }
124
- const E = {
124
+ const v = {
125
125
  type: f,
126
- payload: C,
126
+ payload: E,
127
127
  timestamp: Date.now()
128
128
  };
129
- d.forEach((B) => {
129
+ d.forEach((A) => {
130
130
  try {
131
- B(E);
132
- } catch (I) {
133
- O.error("Handler error:", I);
131
+ A(v);
132
+ } catch (T) {
133
+ O.error("Handler error:", T);
134
134
  }
135
135
  });
136
136
  }
137
- function v(f) {
138
- const E = o().allowedOrigins ?? [];
139
- if (E.length === 0) {
137
+ function C(f) {
138
+ const v = o().allowedOrigins ?? [];
139
+ if (v.length === 0) {
140
140
  O.warn(
141
141
  "Ignoring postMessage: aiAgentConfig.allowedOrigins is empty. Configure explicit origins to enable the AI agent bridge.",
142
142
  { origin: f.origin, type: f.data?.type }
143
143
  );
144
144
  return;
145
145
  }
146
- if (E.includes("*")) {
146
+ if (v.includes("*")) {
147
147
  O.error(
148
148
  'Refusing postMessage with wildcard allowedOrigins. Replace "*" with explicit origins (e.g. ["https://chat.example.com"]).'
149
149
  );
150
150
  return;
151
151
  }
152
- if (!E.includes(f.origin))
152
+ if (!v.includes(f.origin))
153
153
  return;
154
- const B = t ? window.parent : l.value?.contentWindow;
155
- if (!B || f.source !== B)
156
- return;
157
- const I = f.data;
158
- if (!(!I?.type || typeof I.type != "string"))
159
- switch (O.debug(`Message received: ${I.type}`), I.type) {
154
+ const A = f.data;
155
+ if (!(!A?.type || typeof A.type != "string"))
156
+ switch (O.debug(`Message received: ${A.type}`), A.type) {
160
157
  // Embedded: parent forwards chat messages wrapped in AI_CHAT_MESSAGE
161
158
  case "AI_CHAT_MESSAGE": {
162
159
  if (t) {
163
- const P = I.payload;
164
- P?.type && h(P.type, P.payload);
160
+ const T = A.payload;
161
+ T?.type && h(T.type, T.payload);
165
162
  }
166
163
  return;
167
164
  }
168
165
  // Normal: chatbot signals it's ready
169
166
  case "CHAT_READY":
170
- u.forEach((P) => {
167
+ u.forEach((T) => {
171
168
  try {
172
- P();
173
- } catch (k) {
174
- O.error("ChatReady handler error:", k);
169
+ T();
170
+ } catch ($) {
171
+ O.error("ChatReady handler error:", $);
175
172
  }
176
173
  });
177
174
  break;
178
175
  // Normal: direct chat protocol messages
179
176
  default:
180
- h(I.type, I.payload);
177
+ h(A.type, A.payload);
181
178
  break;
182
179
  }
183
180
  }
184
181
  return {
185
- iframeRef: l,
182
+ iframeRef: c,
186
183
  pendingInitContext: g,
187
- isListenerRegistered: c,
184
+ isListenerRegistered: l,
188
185
  setIframeRef(f) {
189
- l.value = f, O.debug("Iframe ref set:", f ? "available" : "null");
186
+ c.value = f, O.debug("Iframe ref set:", f ? "available" : "null");
190
187
  },
191
188
  sendToIframe(f) {
192
- if (!l.value?.contentWindow) {
189
+ if (!c.value?.contentWindow) {
193
190
  O.warn("Cannot send message: iframe not available");
194
191
  return;
195
192
  }
196
- const C = o().allowedOrigins?.[0];
197
- if (!C || C === "*") {
193
+ const E = o().allowedOrigins?.[0];
194
+ if (!E || E === "*") {
198
195
  O.error(
199
196
  "Refusing to send to iframe: aiAgentConfig.allowedOrigins must contain an explicit origin. Message dropped to avoid leaking data (including access tokens) to arbitrary origins.",
200
197
  { type: f.type }
201
198
  );
202
199
  return;
203
200
  }
204
- l.value.contentWindow.postMessage(f, C), O.debug(`Sent to iframe: ${f.type}`);
201
+ c.value.contentWindow.postMessage(f, E), O.debug(`Sent to iframe: ${f.type}`);
205
202
  },
206
203
  sendToParent(f) {
207
204
  if (!window.parent || window.parent === window) {
208
205
  O.warn("Cannot send to parent: not in iframe");
209
206
  return;
210
207
  }
211
- const C = o().parentOrigin;
212
- if (!C || C === "*") {
208
+ const E = o().parentOrigin;
209
+ if (!E || E === "*") {
213
210
  O.error(
214
211
  "Refusing to send to parent: aiAgentConfig.parentOrigin must be an explicit origin. Message dropped to avoid leaking data (including access tokens) to arbitrary origins.",
215
212
  { type: f.type }
216
213
  );
217
214
  return;
218
215
  }
219
- window.parent.postMessage(f, C), O.debug(`Sent to parent: ${f.type}`);
216
+ window.parent.postMessage(f, E), O.debug(`Sent to parent: ${f.type}`);
220
217
  },
221
218
  startListening() {
222
- c.value || (window.addEventListener("message", v), c.value = !0);
219
+ l.value || (window.addEventListener("message", C), l.value = !0);
223
220
  },
224
221
  stopListening() {
225
- c.value && (window.removeEventListener("message", v), c.value = !1);
222
+ l.value && (window.removeEventListener("message", C), l.value = !1);
226
223
  },
227
224
  onChatReady(f) {
228
225
  return u.add(f), () => {
@@ -243,56 +240,56 @@ function dt(e) {
243
240
  bladeGetter: t,
244
241
  localeGetter: s,
245
242
  tokenGetter: n,
246
- navigateToBlade: l,
243
+ navigateToBlade: c,
247
244
  initialConfig: g,
248
- isEmbedded: c = !1
249
- } = e, d = L({ ...at, ...g }), u = st(), h = lt({
245
+ isEmbedded: l = !1
246
+ } = e, d = M({ ...at, ...g }), u = st(), h = lt({
250
247
  userGetter: o,
251
248
  bladeGetter: t,
252
249
  localeGetter: s,
253
250
  tokenGetter: n
254
- }), v = ct({
251
+ }), C = ct({
255
252
  getConfig: () => d.value,
256
- isEmbedded: c,
257
- navigateToBlade: l,
253
+ isEmbedded: l,
254
+ navigateToBlade: c,
258
255
  closePanel: () => u.close()
259
256
  }), f = b(() => ({
260
257
  user: o(),
261
258
  currentBlade: t(),
262
259
  items: h.contextItems.value
263
- })), C = async () => {
264
- if (v.pendingInitContext.value && v.iframeRef.value?.contentWindow) {
265
- v.pendingInitContext.value = !1, u.isInitialized.value = !0;
266
- const T = await h.buildInitPayload();
267
- v.sendToIframe({ type: "INIT_CONTEXT", payload: T }), ae.debug("Flushed pending INIT_CONTEXT");
260
+ })), E = async () => {
261
+ if (C.pendingInitContext.value && C.iframeRef.value?.contentWindow) {
262
+ C.pendingInitContext.value = !1, u.isInitialized.value = !0;
263
+ const I = await h.buildInitPayload();
264
+ C.sendToIframe({ type: "INIT_CONTEXT", payload: I }), ae.debug("Flushed pending INIT_CONTEXT");
268
265
  }
269
266
  };
270
- v.onChatReady(() => {
271
- v.iframeRef.value?.contentWindow ? (u.isInitialized.value = !0, h.buildInitPayload().then((T) => {
272
- v.sendToIframe({ type: "INIT_CONTEXT", payload: T }), ae.info("Chatbot ready, sent INIT_CONTEXT");
273
- })) : (v.pendingInitContext.value = !0, ae.info("Chatbot ready, iframe ref not available yet — pending INIT_CONTEXT"));
274
- }), q(v.iframeRef, () => C()), q(
267
+ C.onChatReady(() => {
268
+ C.iframeRef.value?.contentWindow ? (u.isInitialized.value = !0, h.buildInitPayload().then((I) => {
269
+ C.sendToIframe({ type: "INIT_CONTEXT", payload: I }), ae.info("Chatbot ready, sent INIT_CONTEXT");
270
+ })) : (C.pendingInitContext.value = !0, ae.info("Chatbot ready, iframe ref not available yet — pending INIT_CONTEXT"));
271
+ }), q(C.iframeRef, () => E()), q(
275
272
  () => ({ currentBlade: f.value.currentBlade, items: f.value.items }),
276
273
  async () => {
277
- if (c) {
278
- const T = await h.buildInitPayload();
279
- v.sendToParent({ type: "AI_CONTEXT_UPDATE", payload: T });
274
+ if (l) {
275
+ const I = await h.buildInitPayload();
276
+ C.sendToParent({ type: "AI_CONTEXT_UPDATE", payload: I });
280
277
  return;
281
278
  }
282
- if (u.isOpen.value && u.isInitialized.value && v.iframeRef.value?.contentWindow) {
283
- const T = await h.buildUpdatePayload();
284
- v.sendToIframe({ type: "UPDATE_CONTEXT", payload: T });
279
+ if (u.isOpen.value && u.isInitialized.value && C.iframeRef.value?.contentWindow) {
280
+ const I = await h.buildUpdatePayload();
281
+ C.sendToIframe({ type: "UPDATE_CONTEXT", payload: I });
285
282
  }
286
283
  },
287
284
  { deep: !0 }
288
285
  );
289
- const E = () => c ? v.sendToParent({ type: "AI_TOGGLE_PANEL" }) : u.open(), B = () => c ? v.sendToParent({ type: "AI_TOGGLE_PANEL" }) : u.close(), I = () => c ? v.sendToParent({ type: "AI_TOGGLE_PANEL" }) : u.toggle(), P = (T) => {
290
- v.setIframeRef(T), C();
291
- }, k = (T, R, Z, X) => {
292
- const { cleared: Y } = h.setContextData(T, R, Z, X);
293
- c && Y && v.sendToParent({ type: "AI_CONTEXT_CLEAR" });
286
+ const v = () => l ? C.sendToParent({ type: "AI_TOGGLE_PANEL" }) : u.open(), A = () => l ? C.sendToParent({ type: "AI_TOGGLE_PANEL" }) : u.close(), T = () => l ? C.sendToParent({ type: "AI_TOGGLE_PANEL" }) : u.toggle(), $ = (I) => {
287
+ C.setIframeRef(I), E();
288
+ }, D = (I, R, Z, X) => {
289
+ const { cleared: Y } = h.setContextData(I, R, Z, X);
290
+ l && Y && C.sendToParent({ type: "AI_CONTEXT_CLEAR" });
294
291
  };
295
- return v.startListening(), c && (v.sendToParent({
292
+ return C.startListening(), l && (C.sendToParent({
296
293
  type: "EMBEDDED_APP_READY",
297
294
  payload: { supportedFeatures: ["ai-agent"] }
298
295
  }), ae.info("Embedded mode: sent EMBEDDED_APP_READY to parent")), {
@@ -300,30 +297,30 @@ function dt(e) {
300
297
  panelState: u.panelState,
301
298
  config: d,
302
299
  context: f,
303
- isOpen: b(() => !c && u.isOpen.value),
300
+ isOpen: b(() => !l && u.isOpen.value),
304
301
  isExpanded: u.isExpanded,
305
302
  totalItemsCount: h.totalItemsCount,
306
303
  // Panel control
307
- openPanel: E,
308
- closePanel: B,
309
- togglePanel: I,
304
+ openPanel: v,
305
+ closePanel: A,
306
+ togglePanel: T,
310
307
  expandPanel: () => u.expand(),
311
308
  collapsePanel: () => u.collapse(),
312
309
  // Configuration
313
- setConfig: (T) => {
314
- d.value = { ...d.value, ...T };
310
+ setConfig: (I) => {
311
+ d.value = { ...d.value, ...I };
315
312
  },
316
313
  // Communication
317
- sendMessage: (T, R) => {
318
- v.sendToIframe({ type: T, payload: R });
314
+ sendMessage: (I, R) => {
315
+ C.sendToIframe({ type: I, payload: R });
319
316
  },
320
- onMessage: v.onMessage,
317
+ onMessage: C.onMessage,
321
318
  // Internal API
322
- iframeRef: v.iframeRef,
323
- _setIframeRef: P,
324
- _startListening: v.startListening,
325
- _stopListening: v.stopListening,
326
- _setContextData: k
319
+ iframeRef: C.iframeRef,
320
+ _setIframeRef: $,
321
+ _startListening: C.startListening,
322
+ _stopListening: C.stopListening,
323
+ _setContextData: D
327
324
  };
328
325
  }
329
326
  const ut = /* @__PURE__ */ new Set(["mod", "ctrl", "meta", "alt", "shift"]);
@@ -376,9 +373,9 @@ function ft(e) {
376
373
  return e in Be ? Be[e] : e.length === 1 ? e.toUpperCase() : e.charAt(0).toUpperCase() + e.slice(1);
377
374
  }
378
375
  function Ee(e, o) {
379
- const t = !!e.ctrl || !!e.mod && !o, s = !!e.meta || !!e.mod && o, n = [], l = [];
380
- o ? (t && n.push(oe.ctrl), e.alt && n.push(oe.alt), e.shift && n.push(oe.shift), s && n.push(oe.meta)) : (t && n.push(re.ctrl), s && n.push(re.meta), e.alt && n.push(re.alt), e.shift && n.push(re.shift)), t && l.push("Control"), s && l.push("Meta"), e.alt && l.push("Alt"), e.shift && l.push("Shift"), n.push(pt(e.key));
381
- const g = [...l, ft(e.key)].join("+");
376
+ const t = !!e.ctrl || !!e.mod && !o, s = !!e.meta || !!e.mod && o, n = [], c = [];
377
+ o ? (t && n.push(oe.ctrl), e.alt && n.push(oe.alt), e.shift && n.push(oe.shift), s && n.push(oe.meta)) : (t && n.push(re.ctrl), s && n.push(re.meta), e.alt && n.push(re.alt), e.shift && n.push(re.shift)), t && c.push("Control"), s && c.push("Meta"), e.alt && c.push("Alt"), e.shift && c.push("Shift"), n.push(pt(e.key));
378
+ const g = [...c, ft(e.key)].join("+");
382
379
  return { parts: n, aria: g };
383
380
  }
384
381
  const Ie = {
@@ -423,8 +420,8 @@ function _t(e, o) {
423
420
  return s !== void 0 ? o.key === s : !1;
424
421
  }
425
422
  function Et(e, o, t) {
426
- const s = !!e.ctrl || !!e.mod && !t, n = !!e.meta || !!e.mod && t, l = !!e.alt, g = !!e.shift;
427
- return o.ctrlKey !== s || o.metaKey !== n || o.altKey !== l || o.shiftKey !== g ? !1 : _t(e, o);
423
+ const s = !!e.ctrl || !!e.mod && !t, n = !!e.meta || !!e.mod && t, c = !!e.alt, g = !!e.shift;
424
+ return o.ctrlKey !== s || o.metaKey !== n || o.altKey !== c || o.shiftKey !== g ? !1 : _t(e, o);
428
425
  }
429
426
  const bt = /* @__PURE__ */ new Set([
430
427
  "button",
@@ -446,49 +443,49 @@ function bn() {
446
443
  const t = e.getAttribute("contenteditable");
447
444
  return t === "true" || t === "";
448
445
  }
449
- function wt() {
446
+ function At() {
450
447
  return typeof navigator > "u" ? !1 : /Mac|iPhone|iPad|iPod/i.test(navigator.userAgent);
451
448
  }
452
449
  function Ne() {
453
- const e = wt();
450
+ const e = At();
454
451
  return {
455
452
  hotkey: Q,
456
453
  isMac: e,
457
454
  formatShortcut: (o) => Ee(o, e)
458
455
  };
459
456
  }
460
- let $e, Fe, Re, At;
461
- function wn(e) {
457
+ let $e, Fe, Re, wt;
458
+ function An(e) {
462
459
  $e = e;
463
460
  }
464
- function An(e) {
461
+ function wn(e) {
465
462
  Fe = e;
466
463
  }
467
464
  function yn(e) {
468
465
  Re = e;
469
466
  }
470
467
  function Bn(e) {
471
- At = e;
468
+ wt = e;
472
469
  }
473
470
  function xe(e, o) {
474
471
  if (o.length === 0)
475
472
  return { path: e ? `/${e}` : "/", query: {} };
476
473
  const t = o[0], s = Se(t.url);
477
474
  let n;
478
- for (let c = o.length - 1; c >= 1; c--)
479
- if (o[c].visible) {
480
- n = o[c];
475
+ for (let l = o.length - 1; l >= 1; l--)
476
+ if (o[l].visible) {
477
+ n = o[l];
481
478
  break;
482
479
  }
483
- let l = e ? `/${e}` : "";
484
- if (s && (l += `/${s}`), n) {
485
- const c = Se(n.url);
486
- c && (l += `/${c}`), n.param && (l += `/${n.param}`);
480
+ let c = e ? `/${e}` : "";
481
+ if (s && (c += `/${s}`), n) {
482
+ const l = Se(n.url);
483
+ l && (c += `/${l}`), n.param && (c += `/${n.param}`);
487
484
  }
488
485
  const g = {};
489
- for (const c of o)
490
- c.visible && c.query && Object.assign(g, c.query);
491
- return { path: l || "/", query: g };
486
+ for (const l of o)
487
+ l.visible && l.query && Object.assign(g, l.query);
488
+ return { path: c || "/", query: g };
492
489
  }
493
490
  function In(e, o) {
494
491
  let t = e.split("/").filter(Boolean);
@@ -508,142 +505,142 @@ function Oe(e) {
508
505
  }
509
506
  function yt(e, o) {
510
507
  function t() {
511
- const { path: n, query: l } = xe(Oe(e), o.blades.value);
512
- e.push({ path: n, query: l });
508
+ const { path: n, query: c } = xe(Oe(e), o.blades.value);
509
+ e.push({ path: n, query: c });
513
510
  }
514
511
  function s() {
515
- const { path: n, query: l } = xe(Oe(e), o.blades.value);
516
- e.replace({ path: n, query: l });
512
+ const { path: n, query: c } = xe(Oe(e), o.blades.value);
513
+ e.replace({ path: n, query: c });
517
514
  }
518
515
  return { syncUrlPush: t, syncUrlReplace: s };
519
516
  }
520
517
  const Bt = "useBlade() was called outside a blade. Navigation methods (openBlade) work everywhere, but blade-specific methods require the component to be rendered inside VcBladeSlot.";
521
- function A(e) {
518
+ function y(e) {
522
519
  throw new Error(`[vc-shell] ${e} requires blade context.
523
520
  ${Bt}`);
524
521
  }
525
522
  function It() {
526
- const e = (ee() ? $(De, void 0) : void 0) ?? Fe, o = (ee() ? $(We, void 0) : void 0) ?? Re;
523
+ const e = (ee() ? N(De, void 0) : void 0) ?? Fe, o = (ee() ? N(We, void 0) : void 0) ?? Re;
527
524
  if (!e || !o)
528
525
  throw new Error(
529
526
  "[vc-shell] useBlade() failed: BladeStack or BladeMessaging not available. Ensure BladeNavigationPlugin (plugin-v2) is installed."
530
527
  );
531
- const t = e, s = o, n = ee() ? $(Ze, void 0) : void 0, l = ee() ? $(Xe, void 0) : void 0;
528
+ const t = e, s = o, n = ee() ? N(Ze, void 0) : void 0, c = ee() ? N(Xe, void 0) : void 0;
532
529
  let g;
533
- function c() {
530
+ function l() {
534
531
  if (g) return g;
535
532
  const r = $e?.router;
536
533
  return r && (g = yt(r, t)), g;
537
534
  }
538
- const d = b(() => (n || A("id"), n.value.id)), u = b(() => (n || A("param"), n.value.param)), h = b(() => (n || A("options"), n.value.options)), v = b(() => (n || A("query"), n.value.query)), f = b(() => (n || A("closable"), n.value.parentId !== void 0)), C = b(() => (n || A("expanded"), t.activeBlade.value?.id === n.value.id)), E = b(() => (n || A("name"), n.value.name)), B = b(() => {
535
+ const d = b(() => (n || y("id"), n.value.id)), u = b(() => (n || y("param"), n.value.param)), h = b(() => (n || y("options"), n.value.options)), C = b(() => (n || y("query"), n.value.query)), f = b(() => (n || y("closable"), n.value.parentId !== void 0)), E = b(() => (n || y("expanded"), t.activeBlade.value?.id === n.value.id)), v = b(() => (n || y("name"), n.value.name)), A = b(() => {
539
536
  if (!n) return;
540
537
  const r = n.value.id;
541
538
  return t.blades.value.find((m) => m.parentId === r)?.param;
542
539
  });
543
- let I = !1;
544
- function P(r) {
545
- if (I) {
540
+ let T = !1;
541
+ function $(r) {
542
+ if (T) {
546
543
  console.warn(
547
544
  "[vc-shell] provideBladeData() called more than once in the same blade. Only the first call takes effect."
548
545
  );
549
546
  return;
550
547
  }
551
- I = !0;
552
- const m = Ve(r) ? r : L(r);
553
- Pe(Ye, m);
548
+ T = !0;
549
+ const m = Ve(r) ? r : M(r);
550
+ ke(Ye, m);
554
551
  }
555
- async function k(r) {
556
- const { isWorkspace: m, ...D } = r;
552
+ async function D(r) {
553
+ const { isWorkspace: m, ...P } = r;
557
554
  if (m)
558
- await t.openWorkspace(D);
555
+ await t.openWorkspace(P);
559
556
  else {
560
- const N = n?.value.id;
561
- N ? await t.openBlade({ ...D, parentId: N }) : await t.openBlade(D);
557
+ const L = n?.value.id;
558
+ L ? await t.openBlade({ ...P, parentId: L }) : await t.openBlade(P);
562
559
  }
563
- t.activeBlade.value?.url && c()?.syncUrlPush();
560
+ t.activeBlade.value?.url && l()?.syncUrlPush();
564
561
  }
565
- async function T() {
566
- n || A("closeSelf()");
562
+ async function I() {
563
+ n || y("closeSelf()");
567
564
  const r = await t.closeBlade(n.value.id);
568
- return r || c()?.syncUrlReplace(), r;
565
+ return r || l()?.syncUrlReplace(), r;
569
566
  }
570
567
  async function R() {
571
- n || A("closeChildren()"), await t.closeChildren(n.value.id), c()?.syncUrlReplace();
568
+ n || y("closeChildren()"), await t.closeChildren(n.value.id), l()?.syncUrlReplace();
572
569
  }
573
570
  async function Z(r) {
574
- n || A("replaceWith()"), await t.replaceCurrentBlade({
571
+ n || y("replaceWith()"), await t.replaceCurrentBlade({
575
572
  ...r,
576
573
  parentId: n.value.parentId
577
- }), t.activeBlade.value?.url && c()?.syncUrlReplace();
574
+ }), t.activeBlade.value?.url && l()?.syncUrlReplace();
578
575
  }
579
576
  async function X(r) {
580
- n || A("coverWith()"), await t.coverCurrentBlade({
577
+ n || y("coverWith()"), await t.coverCurrentBlade({
581
578
  ...r,
582
579
  parentId: n.value.parentId
583
- }), t.activeBlade.value?.url && c()?.syncUrlPush();
580
+ }), t.activeBlade.value?.url && l()?.syncUrlPush();
584
581
  }
585
582
  async function Y(r, m) {
586
- return n || A("callParent()"), s.callParent(n.value.id, r, m);
583
+ return n || y("callParent()"), s.callParent(n.value.id, r, m);
587
584
  }
588
585
  function le(r) {
589
- n || A("exposeToChildren()"), s.exposeToChildren(n.value.id, r);
586
+ n || y("exposeToChildren()"), s.exposeToChildren(n.value.id, r);
590
587
  }
591
588
  function ce(r) {
592
- n || A("onBeforeClose()"), t.registerBeforeClose(n.value.id, r);
589
+ n || y("onBeforeClose()"), t.registerBeforeClose(n.value.id, r);
593
590
  }
594
591
  function de(r) {
595
- n || A("setError()"), t.setBladeError(n.value.id, r);
592
+ n || y("setError()"), t.setBladeError(n.value.id, r);
596
593
  }
597
594
  function j() {
598
- n || A("clearError()"), t.clearBladeError(n.value.id);
595
+ n || y("clearError()"), t.clearBladeError(n.value.id);
599
596
  }
600
597
  let ue = 0;
601
598
  function pe(r) {
602
- l || A("addBanner()");
599
+ c || y("addBanner()");
603
600
  const m = `banner-${n.value.id}-${++ue}`;
604
- return l.value.push({
601
+ return c.value.push({
605
602
  ...r,
606
603
  id: m,
607
604
  dismissible: r.dismissible ?? !1
608
605
  }), m;
609
606
  }
610
607
  function fe(r) {
611
- l || A("removeBanner()"), l.value = l.value.filter((m) => m.id !== r);
608
+ c || y("removeBanner()"), c.value = c.value.filter((m) => m.id !== r);
612
609
  }
613
610
  function ge() {
614
- l || A("clearBanners()"), l.value = l.value.filter((r) => r._system);
611
+ c || y("clearBanners()"), c.value = c.value.filter((r) => r._system);
615
612
  }
616
613
  let a = !1, i = !1;
617
614
  function p(r) {
618
- if (n || A("onActivated()"), a) {
615
+ if (n || y("onActivated()"), a) {
619
616
  console.warn("[useBlade] onActivated() already registered in this blade.");
620
617
  return;
621
618
  }
622
- a = !0, q(C, (m) => {
619
+ a = !0, q(E, (m) => {
623
620
  m && r();
624
621
  });
625
622
  }
626
623
  function _(r) {
627
- if (n || A("onDeactivated()"), i) {
624
+ if (n || y("onDeactivated()"), i) {
628
625
  console.warn("[useBlade] onDeactivated() already registered in this blade.");
629
626
  return;
630
627
  }
631
- i = !0, q(C, (m) => {
628
+ i = !0, q(E, (m) => {
632
629
  m || r();
633
630
  });
634
631
  }
635
632
  return {
636
633
  id: d,
637
634
  param: u,
638
- activeChildParam: B,
635
+ activeChildParam: A,
639
636
  options: h,
640
- query: v,
637
+ query: C,
641
638
  closable: f,
642
- expanded: C,
643
- name: E,
644
- provideBladeData: P,
645
- openBlade: k,
646
- closeSelf: T,
639
+ expanded: E,
640
+ name: v,
641
+ provideBladeData: $,
642
+ openBlade: D,
643
+ closeSelf: I,
647
644
  closeChildren: R,
648
645
  replaceWith: Z,
649
646
  coverWith: X,
@@ -706,28 +703,28 @@ function Ot(e, o, t) {
706
703
  visible: !0
707
704
  };
708
705
  }
709
- let Pt = 0;
710
- function kt() {
711
- return `blade_${++Pt}_${Math.random().toString(36).slice(2, 8)}`;
706
+ let kt = 0;
707
+ function Pt() {
708
+ return `blade_${++kt}_${Math.random().toString(36).slice(2, 8)}`;
712
709
  }
713
710
  function Tn(e, o) {
714
- const t = L([]), s = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map(), c = b(() => t.value[0]), d = b(() => t.value), u = b(() => {
711
+ const t = M([]), s = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map(), l = b(() => t.value[0]), d = b(() => t.value), u = b(() => {
715
712
  for (let a = t.value.length - 1; a >= 0; a--)
716
713
  if (t.value[a].visible) return t.value[a];
717
714
  });
718
715
  function h(a) {
719
- s.delete(a), n.delete(a), l.delete(a), g.delete(a);
716
+ s.delete(a), n.delete(a), c.delete(a), g.delete(a);
720
717
  }
721
- function v(a) {
718
+ function C(a) {
722
719
  const i = e.getBlade(a);
723
720
  if (i)
724
721
  return i.route;
725
722
  }
726
723
  const f = {
727
- generateId: kt,
728
- resolveUrl: v
724
+ generateId: Pt,
725
+ resolveUrl: C
729
726
  };
730
- async function C(a) {
727
+ async function E(a) {
731
728
  for (let i = a.length - 1; i >= 0; i--) {
732
729
  const p = s.get(a[i].id);
733
730
  if (p && await p())
@@ -735,12 +732,12 @@ function Tn(e, o) {
735
732
  }
736
733
  return !1;
737
734
  }
738
- function E(a) {
735
+ function v(a) {
739
736
  for (const i of a)
740
- l.get(i.id)?.(), h(i.id);
737
+ c.get(i.id)?.(), h(i.id);
741
738
  }
742
- async function B(a) {
743
- if (c.value?.name === a.name) return;
739
+ async function A(a) {
740
+ if (l.value?.name === a.name) return;
744
741
  const p = e.getBlade(a.name);
745
742
  if (!p)
746
743
  throw new Error(`[BladeStack] Blade '${a.name}' not found in registry`);
@@ -748,32 +745,32 @@ function Tn(e, o) {
748
745
  console.warn(`[BladeStack] Access denied to workspace '${a.name}'`);
749
746
  return;
750
747
  }
751
- E([...t.value]);
748
+ v([...t.value]);
752
749
  const _ = Tt(a, f);
753
- t.value = [_], a.onOpen && n.set(_.id, a.onOpen), a.onClose && l.set(_.id, a.onClose), a.onOpen?.();
750
+ t.value = [_], a.onOpen && n.set(_.id, a.onOpen), a.onClose && c.set(_.id, a.onClose), a.onOpen?.();
754
751
  }
755
- async function I(a) {
752
+ async function T(a) {
756
753
  if (!e.getBlade(a.name))
757
754
  throw new Error(`[BladeStack] Blade '${a.name}' not found in registry`);
758
- const i = a.parentId ?? u.value?.id ?? c.value?.id;
755
+ const i = a.parentId ?? u.value?.id ?? l.value?.id;
759
756
  if (!i)
760
757
  throw new Error("[BladeStack] Cannot open blade: no parent blade found");
761
758
  const p = t.value.findIndex((m) => m.id === i);
762
759
  if (p === -1)
763
760
  throw new Error(`[BladeStack] Parent blade '${i}' not found in stack`);
764
761
  const _ = t.value.slice(p + 1);
765
- if (_.length > 0 && await C(_))
762
+ if (_.length > 0 && await E(_))
766
763
  return;
767
- E(_);
764
+ v(_);
768
765
  const r = xt(a, i, f);
769
- t.value = [...t.value.slice(0, p + 1), r], a.onOpen && n.set(r.id, a.onOpen), a.onClose && l.set(r.id, a.onClose), a.onOpen?.();
766
+ t.value = [...t.value.slice(0, p + 1), r], a.onOpen && n.set(r.id, a.onOpen), a.onClose && c.set(r.id, a.onClose), a.onOpen?.();
770
767
  }
771
- async function P(a) {
768
+ async function $(a) {
772
769
  const i = t.value.findIndex((m) => m.id === a);
773
770
  if (i === -1 || i === 0) return !1;
774
771
  const p = t.value.slice(i);
775
- if (await C(p)) return !0;
776
- E(p), t.value = t.value.slice(0, i);
772
+ if (await E(p)) return !0;
773
+ v(p), t.value = t.value.slice(0, i);
777
774
  const r = t.value.length - 1;
778
775
  if (r > 0 && !t.value[r].visible) {
779
776
  const m = [...t.value];
@@ -781,47 +778,47 @@ function Tn(e, o) {
781
778
  }
782
779
  return !1;
783
780
  }
784
- async function k(a) {
781
+ async function D(a) {
785
782
  const i = u.value;
786
783
  if (!i)
787
784
  throw new Error("[BladeStack] No active blade to replace");
788
785
  if (!e.getBlade(a.name))
789
786
  throw new Error(`[BladeStack] Blade '${a.name}' not found in registry`);
790
- const p = t.value.findIndex((D) => D.id === i.id);
787
+ const p = t.value.findIndex((P) => P.id === i.id);
791
788
  if (p === -1)
792
789
  throw new Error(`[BladeStack] Active blade '${i.id}' not found in stack`);
793
790
  const _ = t.value.slice(p + 1);
794
791
  if (_.length > 0) {
795
- if (await C(_)) return;
796
- E(_);
792
+ if (await E(_)) return;
793
+ v(_);
797
794
  }
798
795
  const r = St(a, i.parentId, f);
799
- E([i]);
796
+ v([i]);
800
797
  const m = [...t.value.slice(0, p), r, ...t.value.slice(p + 1)];
801
- t.value = m, a.onOpen && n.set(r.id, a.onOpen), a.onClose && l.set(r.id, a.onClose), a.onOpen?.();
798
+ t.value = m, a.onOpen && n.set(r.id, a.onOpen), a.onClose && c.set(r.id, a.onClose), a.onOpen?.();
802
799
  }
803
- async function T(a) {
800
+ async function I(a) {
804
801
  const i = u.value;
805
802
  if (!i)
806
803
  throw new Error("[BladeStack] No active blade to cover");
807
804
  if (!e.getBlade(a.name))
808
805
  throw new Error(`[BladeStack] Blade '${a.name}' not found in registry`);
809
- const p = t.value.findIndex((D) => D.id === i.id);
806
+ const p = t.value.findIndex((P) => P.id === i.id);
810
807
  if (p === -1)
811
808
  throw new Error(`[BladeStack] Active blade '${i.id}' not found in stack`);
812
809
  const _ = t.value.slice(p + 1);
813
810
  if (_.length > 0) {
814
- if (await C(_)) return;
815
- E(_);
811
+ if (await E(_)) return;
812
+ v(_);
816
813
  }
817
814
  const r = Ot(a, i.id, f), m = t.value.slice(0, p);
818
- m.push({ ...i, visible: !1 }), m.push(r), t.value = m, a.onOpen && n.set(r.id, a.onOpen), a.onClose && l.set(r.id, a.onClose), a.onOpen?.();
815
+ m.push({ ...i, visible: !1 }), m.push(r), t.value = m, a.onOpen && n.set(r.id, a.onOpen), a.onClose && c.set(r.id, a.onClose), a.onOpen?.();
819
816
  }
820
817
  async function R(a) {
821
818
  const i = t.value.findIndex((r) => r.id === a);
822
819
  if (i === -1) return;
823
820
  const p = t.value.slice(i + 1);
824
- p.length === 0 || await C(p) || (E(p), t.value = t.value.slice(0, i + 1));
821
+ p.length === 0 || await E(p) || (v(p), t.value = t.value.slice(0, i + 1));
825
822
  }
826
823
  function Z(a, i) {
827
824
  s.set(a, i);
@@ -848,20 +845,20 @@ function Tn(e, o) {
848
845
  _[p] = { ..._[p], title: i }, t.value = _;
849
846
  }
850
847
  function de(a, i) {
851
- const p = t.value.findIndex((N) => N.id === a);
848
+ const p = t.value.findIndex((L) => L.id === a);
852
849
  if (p === -1) return;
853
850
  const _ = t.value[p].query ?? {}, r = { ..._ };
854
- for (const [N, ve] of Object.entries(i))
855
- ve === "" || ve == null ? delete r[N] : r[N] = ve;
856
- const m = Object.keys(_), D = Object.keys(r);
857
- if (m.length === D.length && D.every((N) => _[N] === r[N]))
851
+ for (const [L, ve] of Object.entries(i))
852
+ ve === "" || ve == null ? delete r[L] : r[L] = ve;
853
+ const m = Object.keys(_), P = Object.keys(r);
854
+ if (m.length === P.length && P.every((L) => _[L] === r[L]))
858
855
  return;
859
856
  const J = [...t.value];
860
857
  J[p] = { ...J[p], query: r }, t.value = J;
861
858
  }
862
859
  function j(a) {
863
860
  let i = g.get(a);
864
- return i || (i = L(!1), g.set(a, i)), i;
861
+ return i || (i = M(!1), g.set(a, i)), i;
865
862
  }
866
863
  function ue(a) {
867
864
  return g.get(a)?.value ?? !1;
@@ -879,15 +876,15 @@ function Tn(e, o) {
879
876
  t.value = a;
880
877
  }
881
878
  return {
882
- workspace: c,
879
+ workspace: l,
883
880
  blades: d,
884
881
  activeBlade: u,
885
- openWorkspace: B,
886
- openBlade: I,
887
- closeBlade: P,
882
+ openWorkspace: A,
883
+ openBlade: T,
884
+ closeBlade: $,
888
885
  closeChildren: R,
889
- replaceCurrentBlade: k,
890
- coverCurrentBlade: T,
886
+ replaceCurrentBlade: D,
887
+ coverCurrentBlade: I,
891
888
  registerBeforeClose: Z,
892
889
  unregisterBeforeClose: X,
893
890
  setBladeError: Y,
@@ -902,14 +899,14 @@ function Tn(e, o) {
902
899
  };
903
900
  }
904
901
  function Mt() {
905
- const e = $(De);
902
+ const e = N(De);
906
903
  if (!e)
907
904
  throw new Error("[useBladeStack] BladeStack not found. Ensure BladeNavigationPlugin is installed.");
908
905
  return e;
909
906
  }
910
907
  const V = W("use-ai-agent");
911
908
  function xn(e) {
912
- const o = $(je), { user: t, getAccessToken: s } = Qe(), { openBlade: n } = It(), { blades: l, activeBlade: g } = Mt(), c = e?.isEmbedded, d = dt({
909
+ const o = N(je), { user: t, getAccessToken: s } = Qe(), { openBlade: n } = It(), { blades: c, activeBlade: g } = Mt(), l = e?.isEmbedded, d = dt({
913
910
  userGetter: () => {
914
911
  if (t.value)
915
912
  return {
@@ -920,7 +917,7 @@ function xn(e) {
920
917
  };
921
918
  },
922
919
  bladeGetter: () => {
923
- const h = g.value ?? l.value[l.value.length - 1];
920
+ const h = g.value ?? c.value[c.value.length - 1];
924
921
  return h ? {
925
922
  id: h.id,
926
923
  name: h.name,
@@ -931,18 +928,18 @@ function xn(e) {
931
928
  },
932
929
  localeGetter: () => o?.currentLocale.value ?? "en",
933
930
  tokenGetter: s,
934
- navigateToBlade: (h, v, f) => {
935
- n({ name: h, param: v, options: f }).then(() => {
931
+ navigateToBlade: (h, C, f) => {
932
+ n({ name: h, param: C, options: f }).then(() => {
936
933
  V.debug(`Navigated to blade: ${h}`);
937
- }).catch((C) => {
938
- V.warn(`Blade not found or cannot be opened: ${h}`, C);
934
+ }).catch((E) => {
935
+ V.warn(`Blade not found or cannot be opened: ${h}`, E);
939
936
  });
940
937
  },
941
938
  initialConfig: e?.config,
942
- isEmbedded: c
939
+ isEmbedded: l
943
940
  });
944
- if (Pe(be, d), V.debug("AiAgentService provided"), e?.addGlobalToolbarButton ?? !0) {
945
- const h = $(Je, null);
941
+ if (ke(be, d), V.debug("AiAgentService provided"), e?.addGlobalToolbarButton ?? !0) {
942
+ const h = N(Je, null);
946
943
  h ? (h.registerToolbarItem(
947
944
  {
948
945
  id: ot,
@@ -960,7 +957,7 @@ function xn(e) {
960
957
  return d;
961
958
  }
962
959
  function Sn() {
963
- const e = $(be);
960
+ const e = N(be);
964
961
  if (!e) {
965
962
  V.error("AiAgentService not found. Did you forget to call provideAiAgentService()?");
966
963
  return;
@@ -1017,7 +1014,7 @@ const Dt = ["width", "height"], Lt = ["clip-path"], Nt = {
1017
1014
  },
1018
1015
  setup(e) {
1019
1016
  const o = b(() => `virto-oz-clip-${Math.random().toString(36).substring(2, 11)}`);
1020
- return (t, s) => (y(), S("svg", {
1017
+ return (t, s) => (B(), S("svg", {
1021
1018
  width: e.width,
1022
1019
  height: e.height,
1023
1020
  viewBox: "0 0 99 108",
@@ -1029,7 +1026,7 @@ const Dt = ["width", "height"], Lt = ["clip-path"], Nt = {
1029
1026
  d: "M40.1199 2.41576C45.6989 -0.805254 52.5724 -0.805253 58.1514 2.41576L89.2556 20.3738C94.8345 23.5948 98.2713 29.5475 98.2713 35.9895V71.9055C98.2713 78.3475 94.8345 84.3002 89.2556 87.5212L58.1514 105.479C52.5724 108.7 45.6989 108.7 40.1199 105.479L9.01574 87.5212C3.43678 84.3002 0 78.3475 0 71.9055V35.9895C0 29.5475 3.43678 23.5948 9.01574 20.3738L40.1199 2.41576Z",
1030
1027
  fill: "white"
1031
1028
  }, null, -1)),
1032
- e.animated ? (y(), S("path", Nt)) : (y(), S("g", {
1029
+ e.animated ? (B(), S("path", Nt)) : (B(), S("g", {
1033
1030
  key: 0,
1034
1031
  "clip-path": `url(#${o.value})`
1035
1032
  }, [...s[0] || (s[0] = [
@@ -1081,13 +1078,13 @@ const Dt = ["width", "height"], Lt = ["clip-path"], Nt = {
1081
1078
  fill: "#6C6C6C"
1082
1079
  }, null, -1)),
1083
1080
  w("defs", null, [
1084
- e.animated ? z("", !0) : (y(), S("clipPath", {
1081
+ e.animated ? z("", !0) : (B(), S("clipPath", {
1085
1082
  key: 0,
1086
1083
  id: o.value
1087
1084
  }, [...s[1] || (s[1] = [
1088
1085
  w("path", { d: "M72.9199 46.4165C73.2527 46.9495 73.5831 47.4996 73.9092 48.0679C78.4022 55.8976 79.0605 66.3551 76.7793 76.6079C74.5635 86.5668 69.6096 96.1504 62.9795 102.692L58.1514 105.48C52.5725 108.701 45.699 108.701 40.1201 105.48L21.665 94.8247C29.1398 95.4723 37.0781 94.4072 44.3848 91.9233C54.5984 88.4512 63.7463 82.1497 68.6807 73.6548C75.124 62.5619 75.4351 53.2694 72.9199 46.4165ZM56.5205 29.5093C65.5697 29.5331 75.1259 33.9964 83.0215 40.8853C89.9848 46.9608 95.5441 54.8286 98.2715 62.9478V71.9058C98.2715 78.3478 94.8348 84.301 89.2559 87.522L69.4658 98.9468C74.0688 92.6731 77.4601 84.9996 79.207 77.1479C81.5723 66.517 80.9666 55.3703 76.0654 46.8296C69.6817 35.7054 61.7917 30.789 54.6006 29.5396C55.2271 29.5179 55.867 29.5076 56.5205 29.5093ZM0 50.688C3.16812 57.476 8.04614 63.7935 13.8389 68.853C21.9305 75.9204 31.9368 80.6465 41.7578 80.6724C54.5833 80.706 62.7851 76.3308 67.4629 70.728C67.1684 71.2812 66.8584 71.8408 66.5303 72.4058C61.9844 80.2318 53.417 86.2251 43.584 89.5679C34.4355 92.6779 24.3375 93.4401 15.6328 91.3423L9.01562 87.522C3.43667 84.301 0 78.3478 0 71.9058V50.688ZM26.7559 10.1313C22.5672 16.2131 19.6599 23.483 18.2695 30.9126C16.3077 41.3962 17.3358 52.3558 22.2188 60.8647C28.6034 71.9905 36.4946 76.9061 43.6865 78.1548C43.0594 78.1765 42.4188 78.1868 41.7646 78.1851C32.7113 78.1612 23.2602 73.7801 15.4746 66.98C8.2197 60.6434 2.52684 52.3035 0 43.7075V35.9897C6.33247e-05 29.5479 3.43687 23.5955 9.01562 20.3745L26.7559 10.1313ZM51.2432 31.6978C54.0287 31.7659 57.0796 32.4389 60.1875 33.9976C58.8529 33.7029 57.5584 33.677 56.3965 33.9722L57.0088 36.3833C58.4774 36.0102 60.6741 36.4134 63.0332 37.8237C65.3553 39.212 67.6865 41.4953 69.375 44.5923C70.7081 47.0376 71.6489 50.015 71.8535 53.4839C71.4414 52.1828 70.818 51.0505 69.9824 50.1929L68.2012 51.9282C69.2585 53.0135 70.0076 55.1176 69.9658 57.8657C69.9246 60.5708 69.1121 63.731 67.2744 66.7417C65.8225 69.1203 63.7129 71.4251 60.8086 73.3374C61.7311 72.329 62.4012 71.2217 62.7266 70.0679L60.333 69.3931C59.9218 70.8514 58.4742 72.5523 56.0732 73.8901C53.71 75.207 50.5672 76.0837 47.041 75.9976C44.2551 75.9294 41.204 75.2549 38.0957 73.6958C39.4307 73.9907 40.7254 74.0184 41.8877 73.7231L41.2754 71.312C39.8069 71.6851 37.6101 71.2818 35.251 69.8716C32.9289 68.4834 30.5977 66.2 28.9092 63.103C27.5754 60.6565 26.6337 57.6775 26.4297 54.2065C26.8418 55.5096 27.4661 56.6438 28.3027 57.5024L30.084 55.7661C29.0267 54.6807 28.2775 52.5767 28.3193 49.8286C28.3606 47.1236 29.173 43.9633 31.0107 40.9526C32.4621 38.5751 34.5702 36.2706 37.4727 34.3589C36.5514 35.3666 35.8827 36.4736 35.5576 37.6265L37.9512 38.3013C38.3625 36.8429 39.8101 35.142 42.2109 33.8042C44.5742 32.4874 47.717 31.6116 51.2432 31.6978ZM40.1201 2.4165C45.6991 -0.804509 52.5724 -0.804509 58.1514 2.4165L75.6777 12.5356C68.4683 12.0708 60.8765 13.1991 53.8691 15.6333C43.6671 19.1774 34.5353 25.5492 29.6035 34.0396C23.1612 45.1305 22.8486 54.4223 25.3623 61.2749C25.0301 60.7429 24.7004 60.1936 24.375 59.6265C19.8639 51.765 18.8286 41.4457 20.7139 31.3706C22.4486 22.1007 26.633 13.1734 32.6709 6.71631L40.1201 2.4165ZM54.6855 17.9829C63.3703 14.966 72.9092 14.0715 81.3008 15.7817L89.2559 20.3745C94.8346 23.5955 98.2714 29.5479 98.2715 35.9897V56.4692C95.0606 49.9731 90.2759 43.9144 84.6562 39.0112C76.4636 31.8632 66.3524 27.0488 56.5273 27.0229C43.6978 26.9893 35.4935 31.3659 30.8164 36.9712C31.1117 36.4161 31.4247 35.8554 31.7539 35.2886C36.3024 27.4582 44.8633 21.395 54.6855 17.9829Z" }, null, -1)
1089
1086
  ])], 8, $t)),
1090
- e.animated ? (y(), S("linearGradient", Ft, [...s[2] || (s[2] = [
1087
+ e.animated ? (B(), S("linearGradient", Ft, [...s[2] || (s[2] = [
1091
1088
  Ke('<stop offset="0%" stop-color="#FF9533"><animate attributeName="stop-color" values="#FF9533;#FF4FBB;#EAFF4F;#1C91FC;#9A2DF8;#FF9533" dur="4s" repeatCount="indefinite"></animate></stop><stop offset="25%" stop-color="#FF4FBB"><animate attributeName="stop-color" values="#FF4FBB;#EAFF4F;#1C91FC;#9A2DF8;#FF9533;#FF4FBB" dur="4s" repeatCount="indefinite"></animate></stop><stop offset="50%" stop-color="#EAFF4F"><animate attributeName="stop-color" values="#EAFF4F;#1C91FC;#9A2DF8;#FF9533;#FF4FBB;#EAFF4F" dur="4s" repeatCount="indefinite"></animate></stop><stop offset="75%" stop-color="#1C91FC"><animate attributeName="stop-color" values="#1C91FC;#9A2DF8;#FF9533;#FF4FBB;#EAFF4F;#1C91FC" dur="4s" repeatCount="indefinite"></animate></stop><stop offset="100%" stop-color="#9A2DF8"><animate attributeName="stop-color" values="#9A2DF8;#FF9533;#FF4FBB;#EAFF4F;#1C91FC;#9A2DF8" dur="4s" repeatCount="indefinite"></animate></stop>', 5)
1092
1089
  ])])) : z("", !0)
1093
1090
  ])
@@ -1103,9 +1100,9 @@ const Dt = ["width", "height"], Lt = ["clip-path"], Nt = {
1103
1100
  separated: { type: Boolean, default: !1 }
1104
1101
  },
1105
1102
  setup(e) {
1106
- return (o, t) => (y(), S("span", Rt, [
1107
- (y(!0), S(we, null, qe(e.parts, (s, n) => (y(), S(we, { key: n }, [
1108
- e.separated && n > 0 ? (y(), S("span", Ut, "+")) : z("", !0),
1103
+ return (o, t) => (B(), S("span", Rt, [
1104
+ (B(!0), S(Ae, null, qe(e.parts, (s, n) => (B(), S(Ae, { key: n }, [
1105
+ e.separated && n > 0 ? (B(), S("span", Ut, "+")) : z("", !0),
1109
1106
  w("kbd", Gt, K(s), 1)
1110
1107
  ], 64))), 128))
1111
1108
  ]));
@@ -1119,10 +1116,10 @@ const Dt = ["width", "height"], Lt = ["clip-path"], Nt = {
1119
1116
  },
1120
1117
  emits: ["close", "expand", "collapse"],
1121
1118
  setup(e) {
1122
- const { t: o } = nt(), { isMac: t } = Ne(), s = b(() => Ee(Q.escape, t)), n = b(() => Ee(Q.mod.backslash, t)), l = b(() => s.value.aria), g = b(() => n.value.aria);
1123
- return (c, d) => (y(), S("div", Vt, [
1119
+ const { t: o } = nt(), { isMac: t } = Ne(), s = b(() => Ee(Q.escape, t)), n = b(() => Ee(Q.mod.backslash, t)), c = b(() => s.value.aria), g = b(() => n.value.aria);
1120
+ return (l, d) => (B(), S("div", Vt, [
1124
1121
  w("div", Kt, [
1125
- M(Ue, {
1122
+ k(Ue, {
1126
1123
  width: 22,
1127
1124
  height: 24,
1128
1125
  "show-dots": ""
@@ -1134,14 +1131,14 @@ const Dt = ["width", "height"], Lt = ["clip-path"], Nt = {
1134
1131
  ])
1135
1132
  ]),
1136
1133
  w("div", Wt, [
1137
- e.isExpanded ? (y(), se(x(me), {
1134
+ e.isExpanded ? (B(), se(x(me), {
1138
1135
  key: 0,
1139
1136
  placement: "bottom"
1140
1137
  }, {
1141
1138
  tooltip: F(() => [
1142
1139
  w("span", Xt, [
1143
1140
  Ce(K(x(o)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.RESTORE")) + " ", 1),
1144
- M(_e, {
1141
+ k(_e, {
1145
1142
  parts: n.value.parts,
1146
1143
  separated: !x(t)
1147
1144
  }, null, 8, ["parts", "separated"])
@@ -1154,24 +1151,24 @@ const Dt = ["width", "height"], Lt = ["clip-path"], Nt = {
1154
1151
  tabindex: "0",
1155
1152
  "aria-label": x(o)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.RESTORE"),
1156
1153
  "aria-keyshortcuts": g.value,
1157
- onClick: d[0] || (d[0] = (u) => c.$emit("collapse")),
1154
+ onClick: d[0] || (d[0] = (u) => l.$emit("collapse")),
1158
1155
  onKeydown: [
1159
- d[1] || (d[1] = U(G((u) => c.$emit("collapse"), ["prevent"]), ["enter"])),
1160
- d[2] || (d[2] = U(G((u) => c.$emit("collapse"), ["prevent"]), ["space"]))
1156
+ d[1] || (d[1] = U(G((u) => l.$emit("collapse"), ["prevent"]), ["enter"])),
1157
+ d[2] || (d[2] = U(G((u) => l.$emit("collapse"), ["prevent"]), ["space"]))
1161
1158
  ]
1162
1159
  }, [
1163
- M(x(ie), { icon: "lucide-minus" })
1160
+ k(x(ie), { icon: "lucide-minus" })
1164
1161
  ], 40, Zt)
1165
1162
  ]),
1166
1163
  _: 1
1167
- })) : (y(), se(x(me), {
1164
+ })) : (B(), se(x(me), {
1168
1165
  key: 1,
1169
1166
  placement: "bottom"
1170
1167
  }, {
1171
1168
  tooltip: F(() => [
1172
1169
  w("span", jt, [
1173
1170
  Ce(K(x(o)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.MAXIMIZE")) + " ", 1),
1174
- M(_e, {
1171
+ k(_e, {
1175
1172
  parts: n.value.parts,
1176
1173
  separated: !x(t)
1177
1174
  }, null, 8, ["parts", "separated"])
@@ -1184,22 +1181,22 @@ const Dt = ["width", "height"], Lt = ["clip-path"], Nt = {
1184
1181
  tabindex: "0",
1185
1182
  "aria-label": x(o)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.MAXIMIZE"),
1186
1183
  "aria-keyshortcuts": g.value,
1187
- onClick: d[3] || (d[3] = (u) => c.$emit("expand")),
1184
+ onClick: d[3] || (d[3] = (u) => l.$emit("expand")),
1188
1185
  onKeydown: [
1189
- d[4] || (d[4] = U(G((u) => c.$emit("expand"), ["prevent"]), ["enter"])),
1190
- d[5] || (d[5] = U(G((u) => c.$emit("expand"), ["prevent"]), ["space"]))
1186
+ d[4] || (d[4] = U(G((u) => l.$emit("expand"), ["prevent"]), ["enter"])),
1187
+ d[5] || (d[5] = U(G((u) => l.$emit("expand"), ["prevent"]), ["space"]))
1191
1188
  ]
1192
1189
  }, [
1193
- M(x(ie), { icon: "lucide-panel-top" })
1190
+ k(x(ie), { icon: "lucide-panel-top" })
1194
1191
  ], 40, Yt)
1195
1192
  ]),
1196
1193
  _: 1
1197
1194
  })),
1198
- M(x(me), { placement: "bottom" }, {
1195
+ k(x(me), { placement: "bottom" }, {
1199
1196
  tooltip: F(() => [
1200
1197
  w("span", Jt, [
1201
1198
  Ce(K(x(o)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.CLOSE")) + " ", 1),
1202
- M(_e, {
1199
+ k(_e, {
1203
1200
  parts: s.value.parts,
1204
1201
  separated: !x(t)
1205
1202
  }, null, 8, ["parts", "separated"])
@@ -1211,14 +1208,14 @@ const Dt = ["width", "height"], Lt = ["clip-path"], Nt = {
1211
1208
  role: "button",
1212
1209
  tabindex: "0",
1213
1210
  "aria-label": x(o)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.CLOSE"),
1214
- "aria-keyshortcuts": l.value,
1215
- onClick: d[6] || (d[6] = (u) => c.$emit("close")),
1211
+ "aria-keyshortcuts": c.value,
1212
+ onClick: d[6] || (d[6] = (u) => l.$emit("close")),
1216
1213
  onKeydown: [
1217
- d[7] || (d[7] = U(G((u) => c.$emit("close"), ["prevent"]), ["enter"])),
1218
- d[8] || (d[8] = U(G((u) => c.$emit("close"), ["prevent"]), ["space"]))
1214
+ d[7] || (d[7] = U(G((u) => l.$emit("close"), ["prevent"]), ["enter"])),
1215
+ d[8] || (d[8] = U(G((u) => l.$emit("close"), ["prevent"]), ["space"]))
1219
1216
  ]
1220
1217
  }, [
1221
- M(x(ie), { icon: "lucide-x" })
1218
+ k(x(ie), { icon: "lucide-x" })
1222
1219
  ], 40, Qt)
1223
1220
  ]),
1224
1221
  _: 1
@@ -1235,16 +1232,16 @@ const Dt = ["width", "height"], Lt = ["clip-path"], Nt = {
1235
1232
  text: {}
1236
1233
  },
1237
1234
  setup(e) {
1238
- return (o, t) => (y(), S("div", tn, [
1235
+ return (o, t) => (B(), S("div", tn, [
1239
1236
  w("div", nn, [
1240
1237
  w("div", an, [
1241
- M(Ue, {
1238
+ k(Ue, {
1242
1239
  width: 80,
1243
1240
  height: 87,
1244
1241
  animated: ""
1245
1242
  })
1246
1243
  ]),
1247
- e.text ? (y(), S("p", on, K(e.text), 1)) : z("", !0)
1244
+ e.text ? (B(), S("p", on, K(e.text), 1)) : z("", !0)
1248
1245
  ])
1249
1246
  ]));
1250
1247
  }
@@ -1258,15 +1255,15 @@ const Dt = ["width", "height"], Lt = ["clip-path"], Nt = {
1258
1255
  },
1259
1256
  emits: ["iframe-ready"],
1260
1257
  setup(e, { emit: o }) {
1261
- const t = W("ai-agent-iframe"), s = e, n = o, l = L(null), g = L(!0);
1258
+ const t = W("ai-agent-iframe"), s = e, n = o, c = M(null), g = M(!0);
1262
1259
  q(
1263
- l,
1260
+ c,
1264
1261
  (d) => {
1265
1262
  d && n("iframe-ready", d);
1266
1263
  },
1267
1264
  { immediate: !0 }
1268
1265
  );
1269
- const c = () => {
1266
+ const l = () => {
1270
1267
  g.value = !1, t.debug("Iframe loaded");
1271
1268
  };
1272
1269
  return q(
@@ -1274,27 +1271,27 @@ const Dt = ["width", "height"], Lt = ["clip-path"], Nt = {
1274
1271
  () => {
1275
1272
  g.value = !0;
1276
1273
  }
1277
- ), (d, u) => (y(), S("div", sn, [
1278
- M(ke, { name: "fade" }, {
1274
+ ), (d, u) => (B(), S("div", sn, [
1275
+ k(Pe, { name: "fade" }, {
1279
1276
  default: F(() => [
1280
- g.value && e.url ? (y(), se(rn, {
1277
+ g.value && e.url ? (B(), se(rn, {
1281
1278
  key: 0,
1282
1279
  text: d.$t("AI_AGENT.LOADING")
1283
1280
  }, null, 8, ["text"])) : z("", !0)
1284
1281
  ]),
1285
1282
  _: 1
1286
1283
  }),
1287
- e.url ? (y(), S("iframe", {
1284
+ e.url ? (B(), S("iframe", {
1288
1285
  key: 0,
1289
1286
  ref_key: "iframeRef",
1290
- ref: l,
1287
+ ref: c,
1291
1288
  src: e.url,
1292
1289
  class: Me(["vc-ai-agent-iframe__frame", { "vc-ai-agent-iframe__frame--loading": g.value }]),
1293
1290
  sandbox: "allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox",
1294
1291
  allow: "clipboard-read; clipboard-write",
1295
- onLoad: c
1296
- }, null, 42, ln)) : (y(), S("div", cn, [
1297
- M(x(ie), {
1292
+ onLoad: l
1293
+ }, null, 42, ln)) : (B(), S("div", cn, [
1294
+ k(x(ie), {
1298
1295
  icon: "lucide-sparkles",
1299
1296
  size: "xl",
1300
1297
  class: "vc-ai-agent-iframe__placeholder-icon"
@@ -1303,55 +1300,61 @@ const Dt = ["width", "height"], Lt = ["clip-path"], Nt = {
1303
1300
  ]))
1304
1301
  ]));
1305
1302
  }
1306
- }), un = ["inert"], pn = { class: "vc-ai-agent-panel__content" }, Pn = /* @__PURE__ */ H({
1303
+ }), un = ["inert"], pn = { class: "vc-ai-agent-panel__content" }, kn = /* @__PURE__ */ H({
1307
1304
  __name: "VcAiAgentPanel",
1308
1305
  props: {
1309
1306
  inert: { type: Boolean }
1310
1307
  },
1311
1308
  setup(e) {
1312
- const { isMac: o } = Ne(), t = $(be), s = $(et, !1);
1309
+ const { isMac: o } = Ne(), t = N(be), s = N(et, !1);
1313
1310
  t || console.error("[VcAiAgentPanel] AiAgentService not provided");
1314
1311
  const n = b(
1315
1312
  () => t?.config.value ?? { url: "", title: "AI Assistant", width: 362, expandedWidth: 500 }
1316
- ), l = b(() => !s && (t?.isOpen.value ?? !1)), g = b(() => t?.isExpanded.value ?? !1), c = b(() => t?.totalItemsCount.value ?? 0), d = b(() => ({
1313
+ ), c = b(() => !s && (t?.isOpen.value ?? !1)), g = b(() => t?.isExpanded.value ?? !1), l = b(() => t?.totalItemsCount.value ?? 0), d = b(() => ({
1317
1314
  width: g.value ? `${n.value.expandedWidth ?? 500}px` : `${n.value.width ?? 362}px`
1318
- })), u = () => t?.closePanel(), h = () => t?.expandPanel(), v = () => t?.collapsePanel();
1319
- tt(document, "keydown", (C) => {
1320
- if (l.value && !C.isComposing && !C.defaultPrevented) {
1321
- if (C.key === "Escape") {
1322
- C.preventDefault(), u();
1315
+ })), u = () => t?.closePanel(), h = () => t?.expandPanel(), C = () => t?.collapsePanel(), f = M(null);
1316
+ tt(document, "keydown", (v) => {
1317
+ if (c.value && !v.isComposing && !v.defaultPrevented) {
1318
+ if (v.key === "Escape") {
1319
+ v.preventDefault(), u();
1323
1320
  return;
1324
1321
  }
1325
- Et(Q.mod.backslash, C, o) && (C.preventDefault(), g.value ? v() : h());
1322
+ if (Et(Q.mod.backslash, v, o)) {
1323
+ const A = document.activeElement;
1324
+ if (!A || !f.value?.contains(A)) return;
1325
+ v.preventDefault(), g.value ? C() : h();
1326
+ }
1326
1327
  }
1327
1328
  });
1328
- const f = (C) => {
1329
- t?._setIframeRef(C);
1329
+ const E = (v) => {
1330
+ t?._setIframeRef(v);
1330
1331
  };
1331
1332
  return ze(() => {
1332
1333
  t?._setIframeRef(null);
1333
- }), (C, E) => (y(), se(ke, { name: "ai-panel-slide" }, {
1334
+ }), (v, A) => (B(), se(Pe, { name: "ai-panel-slide" }, {
1334
1335
  default: F(() => [
1335
- l.value ? (y(), S("div", {
1336
+ c.value ? (B(), S("div", {
1336
1337
  key: 0,
1338
+ ref_key: "panelRef",
1339
+ ref: f,
1337
1340
  class: Me(["vc-ai-agent-panel", {
1338
1341
  "vc-ai-agent-panel--expanded": g.value
1339
1342
  }]),
1340
1343
  style: He(d.value),
1341
1344
  inert: e.inert || void 0
1342
1345
  }, [
1343
- M(en, {
1346
+ k(en, {
1344
1347
  title: n.value.title,
1345
1348
  "is-expanded": g.value,
1346
- "items-count": c.value,
1349
+ "items-count": l.value,
1347
1350
  onClose: u,
1348
1351
  onExpand: h,
1349
- onCollapse: v
1352
+ onCollapse: C
1350
1353
  }, null, 8, ["title", "is-expanded", "items-count"]),
1351
1354
  w("div", pn, [
1352
- M(dn, {
1355
+ k(dn, {
1353
1356
  url: n.value.url,
1354
- onIframeReady: f
1357
+ onIframeReady: E
1355
1358
  }, null, 8, ["url"])
1356
1359
  ])
1357
1360
  ], 14, un)) : z("", !0)
@@ -1366,17 +1369,17 @@ export {
1366
1369
  at as D,
1367
1370
  _n as E,
1368
1371
  En as H,
1369
- Pn as _,
1372
+ kn as _,
1370
1373
  Tn as a,
1371
1374
  xe as b,
1372
1375
  On as c,
1373
1376
  yn as d,
1374
- wn as e,
1377
+ An as e,
1375
1378
  Bn as f,
1376
1379
  It as g,
1377
1380
  $e as h,
1378
1381
  Fe as i,
1379
- At as j,
1382
+ wt as j,
1380
1383
  Re as k,
1381
1384
  Oe as l,
1382
1385
  yt as m,
@@ -1385,12 +1388,12 @@ export {
1385
1388
  In as p,
1386
1389
  Ee as q,
1387
1390
  Q as r,
1388
- An as s,
1391
+ wn as s,
1389
1392
  bn as t,
1390
1393
  Sn as u,
1391
1394
  Et as v,
1392
1395
  Mt as w,
1393
- wt as x,
1396
+ At as x,
1394
1397
  Ne as y,
1395
1398
  _e as z
1396
1399
  };