@vc-shell/framework 2.5.0-pr327.faf792b → 2.5.0-pr329.6ed4c22
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.
- package/dist/ai-agent/index.js +3 -3
- package/dist/chunks/{VcAiAgentPanel.vue_vue_type_script_setup_true_lang-BUqJaQp0.js → VcAiAgentPanel.vue_vue_type_script_setup_true_lang-y-eKcMMU.js} +433 -422
- package/dist/chunks/VcAiAgentPanel.vue_vue_type_script_setup_true_lang-y-eKcMMU.js.map +1 -0
- package/dist/chunks/{VcAiAgentPanel.vue_vue_type_style_index_0_lang-0llGMIi1.js → VcAiAgentPanel.vue_vue_type_style_index_0_lang-JB7OKRk6.js} +2 -2
- package/dist/chunks/{VcAiAgentPanel.vue_vue_type_style_index_0_lang-0llGMIi1.js.map → VcAiAgentPanel.vue_vue_type_style_index_0_lang-JB7OKRk6.js.map} +1 -1
- package/dist/chunks/{VcScheduler.vue_vue_type_script_setup_true_lang-KiYomASz.js → VcScheduler.vue_vue_type_script_setup_true_lang-C4XH4U_D.js} +4871 -4922
- package/dist/chunks/VcScheduler.vue_vue_type_script_setup_true_lang-C4XH4U_D.js.map +1 -0
- package/dist/chunks/{VcScheduler.vue_vue_type_style_index_0_lang-CwXsJo6H.js → VcScheduler.vue_vue_type_style_index_0_lang-BQ09AUgy.js} +4 -4
- package/dist/chunks/{VcScheduler.vue_vue_type_style_index_0_lang-CwXsJo6H.js.map → VcScheduler.vue_vue_type_style_index_0_lang-BQ09AUgy.js.map} +1 -1
- package/dist/chunks/{dashboard-feed-row.vue_vue_type_script_setup_true_lang-DIV6xL6V.js → dashboard-feed-row.vue_vue_type_script_setup_true_lang-C0IjvNtI.js} +2 -2
- package/dist/chunks/{dashboard-feed-row.vue_vue_type_script_setup_true_lang-DIV6xL6V.js.map → dashboard-feed-row.vue_vue_type_script_setup_true_lang-C0IjvNtI.js.map} +1 -1
- package/dist/chunks/{index-CpPgch-Q.js → index-DLsURdJp.js} +2 -2
- package/dist/chunks/{index-CpPgch-Q.js.map → index-DLsURdJp.js.map} +1 -1
- package/dist/chunks/{vendor-vueuse-components-CoR2FSn3.js → vendor-vueuse-components-B3XvEasa.js} +1 -1
- package/dist/chunks/{vendor-vueuse-components-CoR2FSn3.js.map → vendor-vueuse-components-B3XvEasa.js.map} +1 -1
- package/dist/chunks/{vendor-vueuse-core-BFa9je5E.js → vendor-vueuse-core-_wFDcFkI.js} +1 -1
- package/dist/chunks/{vendor-vueuse-core-BFa9je5E.js.map → vendor-vueuse-core-_wFDcFkI.js.map} +1 -1
- package/dist/chunks/{vendor-vueuse-shared-kZH3-Km1.js → vendor-vueuse-shared-CiuC98Kk.js} +28 -44
- package/dist/chunks/{vendor-vueuse-shared-kZH3-Km1.js.map → vendor-vueuse-shared-CiuC98Kk.js.map} +1 -1
- package/dist/core/blade-navigation/types/index.d.ts +7 -0
- package/dist/core/blade-navigation/types/index.d.ts.map +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/framework.js +703 -671
- package/dist/framework.js.map +1 -1
- package/dist/shell/_internal/blade-navigation/components/vc-blade-navigation/vc-blade-navigation-new.vue.d.ts.map +1 -1
- package/dist/shell/_internal/blade-navigation/components/vc-blade-slot/vc-blade-slot.vue.d.ts +1 -0
- package/dist/shell/_internal/blade-navigation/components/vc-blade-slot/vc-blade-slot.vue.d.ts.map +1 -1
- package/dist/test-helpers.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/organisms/vc-blade/useBladeSkeleton.d.ts.map +1 -1
- package/dist/ui/index.js +3 -3
- package/package.json +4 -4
- package/dist/chunks/VcAiAgentPanel.vue_vue_type_script_setup_true_lang-BUqJaQp0.js.map +0 -1
- package/dist/chunks/VcScheduler.vue_vue_type_script_setup_true_lang-KiYomASz.js.map +0 -1
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { ref as N, computed as E, shallowRef as
|
|
2
|
-
import { c as
|
|
1
|
+
import { ref as N, computed as E, shallowRef as ze, watch as Z, getCurrentInstance as ie, inject as F, isRef as qe, provide as De, defineComponent as Y, openBlock as B, createElementBlock as k, createElementVNode as b, createCommentVNode as X, createStaticVNode as Ze, Fragment as Te, renderList as Xe, toDisplayString as q, createVNode as L, createBlock as pe, unref as O, withCtx as G, withKeys as H, withModifiers as W, createTextVNode as Ae, Transition as Le, normalizeClass as Ne, onUnmounted as Ye, normalizeStyle as je } from "vue";
|
|
2
|
+
import { c as j, b as Fe, d as Qe, B as Je, e as et, f as tt, N as nt, A as xe, L as at, g as ot, T as it, a as be, _ as ue, E as rt } from "./VcAiAgentPanel.vue_vue_type_style_index_0_lang-JB7OKRk6.js";
|
|
3
3
|
import { c as re } from "./vendor-lodash-es-D2n90GJy.js";
|
|
4
|
-
import { u as
|
|
5
|
-
import { u as
|
|
6
|
-
const
|
|
4
|
+
import { u as st } from "./vendor-vueuse-core-_wFDcFkI.js";
|
|
5
|
+
import { u as lt } from "./vendor-vue-i18n-LO-EJStU.js";
|
|
6
|
+
const ct = {
|
|
7
7
|
url: "",
|
|
8
8
|
title: "Virto OZ",
|
|
9
9
|
width: 362,
|
|
10
10
|
expandedWidth: 500,
|
|
11
11
|
// Secure by default: no origins trusted until the embedder configures them.
|
|
12
12
|
allowedOrigins: []
|
|
13
|
-
},
|
|
13
|
+
}, yn = "APP_AI_AGENT_URL", Bn = {
|
|
14
14
|
EMBEDDED_APP_READY: "EMBEDDED_APP_READY",
|
|
15
15
|
AI_TOGGLE_PANEL: "AI_TOGGLE_PANEL",
|
|
16
16
|
AI_CONTEXT_UPDATE: "AI_CONTEXT_UPDATE",
|
|
17
17
|
AI_CONTEXT_CLEAR: "AI_CONTEXT_CLEAR"
|
|
18
|
-
},
|
|
18
|
+
}, In = {
|
|
19
19
|
EMBEDDED_HOST_READY: "EMBEDDED_HOST_READY",
|
|
20
20
|
AI_CHAT_MESSAGE: "AI_CHAT_MESSAGE"
|
|
21
|
-
},
|
|
22
|
-
function
|
|
21
|
+
}, dt = "ai-agent-toggle", ut = "lucide-sparkles", pt = "AI Assistant", se = j("ai-agent-panel");
|
|
22
|
+
function ft() {
|
|
23
23
|
const e = N("closed"), r = N(!1), a = E(() => e.value !== "closed"), t = E(() => e.value === "expanded"), o = () => {
|
|
24
|
-
e.value === "closed" && (e.value = "open",
|
|
25
|
-
},
|
|
26
|
-
e.value = "closed", r.value = !1,
|
|
24
|
+
e.value === "closed" && (e.value = "open", se.debug("Panel opened"));
|
|
25
|
+
}, c = () => {
|
|
26
|
+
e.value = "closed", r.value = !1, se.debug("Panel closed, reset initialized state");
|
|
27
27
|
};
|
|
28
28
|
return {
|
|
29
29
|
panelState: e,
|
|
@@ -31,22 +31,22 @@ function pt() {
|
|
|
31
31
|
isExpanded: t,
|
|
32
32
|
isInitialized: r,
|
|
33
33
|
open: o,
|
|
34
|
-
close:
|
|
34
|
+
close: c,
|
|
35
35
|
toggle: () => {
|
|
36
|
-
e.value === "closed" ? o() :
|
|
36
|
+
e.value === "closed" ? o() : c();
|
|
37
37
|
},
|
|
38
38
|
expand: () => {
|
|
39
|
-
e.value === "open" && (e.value = "expanded",
|
|
39
|
+
e.value === "open" && (e.value = "expanded", se.debug("Panel expanded"));
|
|
40
40
|
},
|
|
41
41
|
collapse: () => {
|
|
42
|
-
e.value === "expanded" && (e.value = "open",
|
|
42
|
+
e.value === "expanded" && (e.value = "open", se.debug("Panel collapsed"));
|
|
43
43
|
},
|
|
44
44
|
resetInitialized: () => {
|
|
45
45
|
r.value = !1;
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
|
-
const ye =
|
|
49
|
+
const ye = j("ai-agent-context");
|
|
50
50
|
function Se(e) {
|
|
51
51
|
return e ? {
|
|
52
52
|
id: e.id,
|
|
@@ -55,10 +55,10 @@ function Se(e) {
|
|
|
55
55
|
param: e.param
|
|
56
56
|
} : { id: "unknown", name: "unknown", title: "Unknown" };
|
|
57
57
|
}
|
|
58
|
-
function
|
|
59
|
-
const { userGetter: r, bladeGetter: a, localeGetter: t, tokenGetter: o } = e,
|
|
58
|
+
function gt(e) {
|
|
59
|
+
const { userGetter: r, bladeGetter: a, localeGetter: t, tokenGetter: o } = e, c = N(/* @__PURE__ */ new Map()), C = () => {
|
|
60
60
|
const v = a();
|
|
61
|
-
return v ?
|
|
61
|
+
return v ? c.value.get(v.id) ?? {
|
|
62
62
|
items: [],
|
|
63
63
|
type: "list",
|
|
64
64
|
suggestions: void 0
|
|
@@ -67,15 +67,15 @@ function ft(e) {
|
|
|
67
67
|
type: "list",
|
|
68
68
|
suggestions: void 0
|
|
69
69
|
};
|
|
70
|
-
}, d = E(() => C().items),
|
|
70
|
+
}, d = E(() => C().items), l = E(() => C().type), u = E(() => C().suggestions), g = E(() => d.value.length);
|
|
71
71
|
return {
|
|
72
72
|
contextItems: d,
|
|
73
|
-
contextType:
|
|
73
|
+
contextType: l,
|
|
74
74
|
contextSuggestions: u,
|
|
75
75
|
totalItemsCount: g,
|
|
76
|
-
setContextData: (v, _,
|
|
76
|
+
setContextData: (v, _, x, M) => {
|
|
77
77
|
const D = a()?.id || M;
|
|
78
|
-
return D ? v.length === 0 && !
|
|
78
|
+
return D ? v.length === 0 && !x ? (c.value.delete(D), ye.debug(`Context cleared for blade: ${D}`), { cleared: !0 }) : (c.value.set(D, { items: v, type: _, suggestions: x }), ye.debug(`Context set for blade: ${D}, items: ${v.length}, type: ${_}`), { cleared: !1 }) : (ye.warn("Cannot set context data: no blade id available"), { cleared: !1 });
|
|
79
79
|
},
|
|
80
80
|
buildInitPayload: async () => {
|
|
81
81
|
const v = o ? await o() ?? void 0 : void 0;
|
|
@@ -83,7 +83,7 @@ function ft(e) {
|
|
|
83
83
|
userId: r()?.id || "",
|
|
84
84
|
locale: t(),
|
|
85
85
|
blade: Se(a()),
|
|
86
|
-
contextType:
|
|
86
|
+
contextType: l.value,
|
|
87
87
|
items: re(d.value),
|
|
88
88
|
suggestions: u.value ? re(u.value) : void 0,
|
|
89
89
|
accessToken: v
|
|
@@ -93,7 +93,7 @@ function ft(e) {
|
|
|
93
93
|
const v = o ? await o() ?? void 0 : void 0;
|
|
94
94
|
return {
|
|
95
95
|
blade: Se(a()),
|
|
96
|
-
contextType:
|
|
96
|
+
contextType: l.value,
|
|
97
97
|
items: re(d.value),
|
|
98
98
|
suggestions: u.value ? re(u.value) : void 0,
|
|
99
99
|
locale: t(),
|
|
@@ -102,13 +102,13 @@ function ft(e) {
|
|
|
102
102
|
}
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
|
-
const P =
|
|
106
|
-
function
|
|
107
|
-
const { getConfig: r, isEmbedded: a, navigateToBlade: t, closePanel: o } = e,
|
|
108
|
-
function g(f,
|
|
105
|
+
const P = j("ai-agent-transport");
|
|
106
|
+
function vt(e) {
|
|
107
|
+
const { getConfig: r, isEmbedded: a, navigateToBlade: t, closePanel: o } = e, c = ze(null), C = N(!1), d = N(!1), l = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set();
|
|
108
|
+
function g(f, A) {
|
|
109
109
|
switch (f) {
|
|
110
110
|
case "NAVIGATE_TO_APP": {
|
|
111
|
-
const _ =
|
|
111
|
+
const _ = A;
|
|
112
112
|
t && _?.bladeName && (t(_.bladeName, _.param, _.options), P.debug(`Navigation requested to: ${_.bladeName}`));
|
|
113
113
|
break;
|
|
114
114
|
}
|
|
@@ -123,14 +123,14 @@ function gt(e) {
|
|
|
123
123
|
}
|
|
124
124
|
const v = {
|
|
125
125
|
type: f,
|
|
126
|
-
payload:
|
|
126
|
+
payload: A,
|
|
127
127
|
timestamp: Date.now()
|
|
128
128
|
};
|
|
129
|
-
|
|
129
|
+
l.forEach((_) => {
|
|
130
130
|
try {
|
|
131
131
|
_(v);
|
|
132
|
-
} catch (
|
|
133
|
-
P.error("Handler error:",
|
|
132
|
+
} catch (x) {
|
|
133
|
+
P.error("Handler error:", x);
|
|
134
134
|
}
|
|
135
135
|
});
|
|
136
136
|
}
|
|
@@ -151,16 +151,16 @@ function gt(e) {
|
|
|
151
151
|
}
|
|
152
152
|
if (!v.includes(f.origin))
|
|
153
153
|
return;
|
|
154
|
-
const _ = a ? window.parent :
|
|
154
|
+
const _ = a ? window.parent : c.value?.contentWindow;
|
|
155
155
|
if (!_ || f.source !== _)
|
|
156
156
|
return;
|
|
157
|
-
const
|
|
158
|
-
if (!(!
|
|
159
|
-
switch (P.debug(`Message received: ${
|
|
157
|
+
const x = f.data;
|
|
158
|
+
if (!(!x?.type || typeof x.type != "string"))
|
|
159
|
+
switch (P.debug(`Message received: ${x.type}`), x.type) {
|
|
160
160
|
// Embedded: parent forwards chat messages wrapped in AI_CHAT_MESSAGE
|
|
161
161
|
case "AI_CHAT_MESSAGE": {
|
|
162
162
|
if (a) {
|
|
163
|
-
const M =
|
|
163
|
+
const M = x.payload;
|
|
164
164
|
M?.type && g(M.type, M.payload);
|
|
165
165
|
}
|
|
166
166
|
return;
|
|
@@ -177,46 +177,46 @@ function gt(e) {
|
|
|
177
177
|
break;
|
|
178
178
|
// Normal: direct chat protocol messages
|
|
179
179
|
default:
|
|
180
|
-
g(
|
|
180
|
+
g(x.type, x.payload);
|
|
181
181
|
break;
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
184
|
return {
|
|
185
|
-
iframeRef:
|
|
185
|
+
iframeRef: c,
|
|
186
186
|
pendingInitContext: C,
|
|
187
187
|
isListenerRegistered: d,
|
|
188
188
|
setIframeRef(f) {
|
|
189
|
-
|
|
189
|
+
c.value = f, P.debug("Iframe ref set:", f ? "available" : "null");
|
|
190
190
|
},
|
|
191
191
|
sendToIframe(f) {
|
|
192
|
-
if (!
|
|
192
|
+
if (!c.value?.contentWindow) {
|
|
193
193
|
P.warn("Cannot send message: iframe not available");
|
|
194
194
|
return;
|
|
195
195
|
}
|
|
196
|
-
const
|
|
197
|
-
if (!
|
|
196
|
+
const A = r().allowedOrigins?.[0];
|
|
197
|
+
if (!A || A === "*") {
|
|
198
198
|
P.error(
|
|
199
199
|
"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
200
|
{ type: f.type }
|
|
201
201
|
);
|
|
202
202
|
return;
|
|
203
203
|
}
|
|
204
|
-
|
|
204
|
+
c.value.contentWindow.postMessage(f, A), P.debug(`Sent to iframe: ${f.type}`);
|
|
205
205
|
},
|
|
206
206
|
sendToParent(f) {
|
|
207
207
|
if (!window.parent || window.parent === window) {
|
|
208
208
|
P.warn("Cannot send to parent: not in iframe");
|
|
209
209
|
return;
|
|
210
210
|
}
|
|
211
|
-
const
|
|
212
|
-
if (!
|
|
211
|
+
const A = r().parentOrigin;
|
|
212
|
+
if (!A || A === "*") {
|
|
213
213
|
P.error(
|
|
214
214
|
"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
215
|
{ type: f.type }
|
|
216
216
|
);
|
|
217
217
|
return;
|
|
218
218
|
}
|
|
219
|
-
window.parent.postMessage(f,
|
|
219
|
+
window.parent.postMessage(f, A), P.debug(`Sent to parent: ${f.type}`);
|
|
220
220
|
},
|
|
221
221
|
startListening() {
|
|
222
222
|
d.value || (window.addEventListener("message", p), d.value = !0);
|
|
@@ -230,75 +230,75 @@ function gt(e) {
|
|
|
230
230
|
};
|
|
231
231
|
},
|
|
232
232
|
onMessage(f) {
|
|
233
|
-
return
|
|
234
|
-
|
|
233
|
+
return l.add(f), () => {
|
|
234
|
+
l.delete(f);
|
|
235
235
|
};
|
|
236
236
|
}
|
|
237
237
|
};
|
|
238
238
|
}
|
|
239
|
-
const
|
|
240
|
-
function
|
|
239
|
+
const le = j("ai-agent-service");
|
|
240
|
+
function Ct(e) {
|
|
241
241
|
const {
|
|
242
242
|
userGetter: r,
|
|
243
243
|
bladeGetter: a,
|
|
244
244
|
localeGetter: t,
|
|
245
245
|
tokenGetter: o,
|
|
246
|
-
navigateToBlade:
|
|
246
|
+
navigateToBlade: c,
|
|
247
247
|
initialConfig: C,
|
|
248
248
|
isEmbedded: d = !1
|
|
249
|
-
} = e,
|
|
249
|
+
} = e, l = N({ ...ct, ...C }), u = ft(), g = gt({
|
|
250
250
|
userGetter: r,
|
|
251
251
|
bladeGetter: a,
|
|
252
252
|
localeGetter: t,
|
|
253
253
|
tokenGetter: o
|
|
254
|
-
}), p =
|
|
255
|
-
getConfig: () =>
|
|
254
|
+
}), p = vt({
|
|
255
|
+
getConfig: () => l.value,
|
|
256
256
|
isEmbedded: d,
|
|
257
|
-
navigateToBlade:
|
|
257
|
+
navigateToBlade: c,
|
|
258
258
|
closePanel: () => u.close()
|
|
259
259
|
}), f = E(() => ({
|
|
260
260
|
user: r(),
|
|
261
261
|
currentBlade: a(),
|
|
262
262
|
items: g.contextItems.value
|
|
263
|
-
})),
|
|
263
|
+
})), A = async () => {
|
|
264
264
|
if (p.pendingInitContext.value && p.iframeRef.value?.contentWindow) {
|
|
265
265
|
p.pendingInitContext.value = !1, u.isInitialized.value = !0;
|
|
266
|
-
const
|
|
267
|
-
p.sendToIframe({ type: "INIT_CONTEXT", payload:
|
|
266
|
+
const I = await g.buildInitPayload();
|
|
267
|
+
p.sendToIframe({ type: "INIT_CONTEXT", payload: I }), le.debug("Flushed pending INIT_CONTEXT");
|
|
268
268
|
}
|
|
269
269
|
};
|
|
270
270
|
p.onChatReady(() => {
|
|
271
|
-
p.iframeRef.value?.contentWindow ? (u.isInitialized.value = !0, g.buildInitPayload().then((
|
|
272
|
-
p.sendToIframe({ type: "INIT_CONTEXT", payload:
|
|
273
|
-
})) : (p.pendingInitContext.value = !0,
|
|
274
|
-
}),
|
|
271
|
+
p.iframeRef.value?.contentWindow ? (u.isInitialized.value = !0, g.buildInitPayload().then((I) => {
|
|
272
|
+
p.sendToIframe({ type: "INIT_CONTEXT", payload: I }), le.info("Chatbot ready, sent INIT_CONTEXT");
|
|
273
|
+
})) : (p.pendingInitContext.value = !0, le.info("Chatbot ready, iframe ref not available yet — pending INIT_CONTEXT"));
|
|
274
|
+
}), Z(p.iframeRef, () => A()), Z(
|
|
275
275
|
() => ({ currentBlade: f.value.currentBlade, items: f.value.items }),
|
|
276
276
|
async () => {
|
|
277
277
|
if (d) {
|
|
278
|
-
const
|
|
279
|
-
p.sendToParent({ type: "AI_CONTEXT_UPDATE", payload:
|
|
278
|
+
const I = await g.buildInitPayload();
|
|
279
|
+
p.sendToParent({ type: "AI_CONTEXT_UPDATE", payload: I });
|
|
280
280
|
return;
|
|
281
281
|
}
|
|
282
282
|
if (u.isOpen.value && u.isInitialized.value && p.iframeRef.value?.contentWindow) {
|
|
283
|
-
const
|
|
284
|
-
p.sendToIframe({ type: "UPDATE_CONTEXT", payload:
|
|
283
|
+
const I = await g.buildUpdatePayload();
|
|
284
|
+
p.sendToIframe({ type: "UPDATE_CONTEXT", payload: I });
|
|
285
285
|
}
|
|
286
286
|
},
|
|
287
287
|
{ deep: !0 }
|
|
288
288
|
);
|
|
289
|
-
const v = () => d ? p.sendToParent({ type: "AI_TOGGLE_PANEL" }) : u.open(), _ = () => d ? p.sendToParent({ type: "AI_TOGGLE_PANEL" }) : u.close(),
|
|
290
|
-
p.setIframeRef(
|
|
291
|
-
}, D = (
|
|
292
|
-
const { cleared:
|
|
293
|
-
d &&
|
|
289
|
+
const v = () => d ? p.sendToParent({ type: "AI_TOGGLE_PANEL" }) : u.open(), _ = () => d ? p.sendToParent({ type: "AI_TOGGLE_PANEL" }) : u.close(), x = () => d ? p.sendToParent({ type: "AI_TOGGLE_PANEL" }) : u.toggle(), M = (I) => {
|
|
290
|
+
p.setIframeRef(I), A();
|
|
291
|
+
}, D = (I, U, Q, $) => {
|
|
292
|
+
const { cleared: J } = g.setContextData(I, U, Q, $);
|
|
293
|
+
d && J && p.sendToParent({ type: "AI_CONTEXT_CLEAR" });
|
|
294
294
|
};
|
|
295
295
|
return p.startListening(), d && (p.sendToParent({
|
|
296
296
|
type: "EMBEDDED_APP_READY",
|
|
297
297
|
payload: { supportedFeatures: ["ai-agent"] }
|
|
298
|
-
}),
|
|
298
|
+
}), le.info("Embedded mode: sent EMBEDDED_APP_READY to parent")), {
|
|
299
299
|
// State
|
|
300
300
|
panelState: u.panelState,
|
|
301
|
-
config:
|
|
301
|
+
config: l,
|
|
302
302
|
context: f,
|
|
303
303
|
isOpen: E(() => !d && u.isOpen.value),
|
|
304
304
|
isExpanded: u.isExpanded,
|
|
@@ -306,16 +306,16 @@ function vt(e) {
|
|
|
306
306
|
// Panel control
|
|
307
307
|
openPanel: v,
|
|
308
308
|
closePanel: _,
|
|
309
|
-
togglePanel:
|
|
309
|
+
togglePanel: x,
|
|
310
310
|
expandPanel: () => u.expand(),
|
|
311
311
|
collapsePanel: () => u.collapse(),
|
|
312
312
|
// Configuration
|
|
313
|
-
setConfig: (
|
|
314
|
-
|
|
313
|
+
setConfig: (I) => {
|
|
314
|
+
l.value = { ...l.value, ...I };
|
|
315
315
|
},
|
|
316
316
|
// Communication
|
|
317
|
-
sendMessage: (
|
|
318
|
-
p.sendToIframe({ type:
|
|
317
|
+
sendMessage: (I, U) => {
|
|
318
|
+
p.sendToIframe({ type: I, payload: U });
|
|
319
319
|
},
|
|
320
320
|
onMessage: p.onMessage,
|
|
321
321
|
// Internal API
|
|
@@ -326,19 +326,19 @@ function vt(e) {
|
|
|
326
326
|
_setContextData: D
|
|
327
327
|
};
|
|
328
328
|
}
|
|
329
|
-
const
|
|
329
|
+
const mt = /* @__PURE__ */ new Set(["mod", "ctrl", "meta", "alt", "shift"]);
|
|
330
330
|
function $e(e) {
|
|
331
331
|
return new Proxy(
|
|
332
332
|
{},
|
|
333
333
|
{
|
|
334
334
|
get(r, a) {
|
|
335
335
|
if (!(typeof a != "string" || a === "then"))
|
|
336
|
-
return
|
|
336
|
+
return mt.has(a) ? $e({ ...e, [a]: !0 }) : { key: a, ...e };
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
339
|
);
|
|
340
340
|
}
|
|
341
|
-
const ee = $e({}),
|
|
341
|
+
const ee = $e({}), ce = { ctrl: "⌃", alt: "⌥", shift: "⇧", meta: "⌘" }, de = { ctrl: "Ctrl", alt: "Alt", shift: "Shift", meta: "Meta" }, Oe = {
|
|
342
342
|
escape: "Esc",
|
|
343
343
|
enter: "Enter",
|
|
344
344
|
tab: "Tab",
|
|
@@ -369,16 +369,16 @@ const ee = $e({}), le = { ctrl: "⌃", alt: "⌥", shift: "⇧", meta: "⌘" },
|
|
|
369
369
|
comma: ",",
|
|
370
370
|
slash: "/"
|
|
371
371
|
};
|
|
372
|
-
function
|
|
372
|
+
function ht(e) {
|
|
373
373
|
return e in Oe ? Oe[e] : (e.length === 1, e.toUpperCase());
|
|
374
374
|
}
|
|
375
|
-
function
|
|
375
|
+
function _t(e) {
|
|
376
376
|
return e in ke ? ke[e] : e.length === 1 ? e.toUpperCase() : e.charAt(0).toUpperCase() + e.slice(1);
|
|
377
377
|
}
|
|
378
378
|
function Ie(e, r) {
|
|
379
|
-
const a = !!e.ctrl || !!e.mod && !r, t = !!e.meta || !!e.mod && r, o = [],
|
|
380
|
-
r ? (a && o.push(
|
|
381
|
-
const C = [...
|
|
379
|
+
const a = !!e.ctrl || !!e.mod && !r, t = !!e.meta || !!e.mod && r, o = [], c = [];
|
|
380
|
+
r ? (a && o.push(ce.ctrl), e.alt && o.push(ce.alt), e.shift && o.push(ce.shift), t && o.push(ce.meta)) : (a && o.push(de.ctrl), t && o.push(de.meta), e.alt && o.push(de.alt), e.shift && o.push(de.shift)), a && c.push("Control"), t && c.push("Meta"), e.alt && c.push("Alt"), e.shift && c.push("Shift"), o.push(ht(e.key));
|
|
381
|
+
const C = [...c, _t(e.key)].join("+");
|
|
382
382
|
return { parts: o, aria: C };
|
|
383
383
|
}
|
|
384
384
|
const Pe = {
|
|
@@ -398,35 +398,35 @@ const Pe = {
|
|
|
398
398
|
arrowleft: "ArrowLeft",
|
|
399
399
|
arrowright: "ArrowRight"
|
|
400
400
|
};
|
|
401
|
-
function
|
|
401
|
+
function Et(e) {
|
|
402
402
|
return e.length === 1 && e >= "a" && e <= "z";
|
|
403
403
|
}
|
|
404
|
-
function
|
|
404
|
+
function wt(e) {
|
|
405
405
|
return e.length === 1 && e >= "0" && e <= "9";
|
|
406
406
|
}
|
|
407
|
-
function
|
|
407
|
+
function At(e) {
|
|
408
408
|
return /^f([1-9]|1[0-2])$/.test(e);
|
|
409
409
|
}
|
|
410
410
|
function bt(e) {
|
|
411
|
-
if (
|
|
412
|
-
if (
|
|
411
|
+
if (Et(e)) return `Key${e.toUpperCase()}`;
|
|
412
|
+
if (wt(e)) return `Digit${e}`;
|
|
413
413
|
if (e in Pe) return Pe[e];
|
|
414
414
|
}
|
|
415
|
-
function
|
|
415
|
+
function yt(e) {
|
|
416
416
|
if (e in Me) return Me[e];
|
|
417
|
-
if (
|
|
417
|
+
if (At(e)) return e.toUpperCase();
|
|
418
418
|
}
|
|
419
|
-
function
|
|
419
|
+
function Bt(e, r) {
|
|
420
420
|
const a = bt(e.key);
|
|
421
421
|
if (a !== void 0) return r.code === a;
|
|
422
|
-
const t =
|
|
422
|
+
const t = yt(e.key);
|
|
423
423
|
return t !== void 0 ? r.key === t : !1;
|
|
424
424
|
}
|
|
425
|
-
function
|
|
426
|
-
const t = !!e.ctrl || !!e.mod && !a, o = !!e.meta || !!e.mod && a,
|
|
427
|
-
return r.ctrlKey !== t || r.metaKey !== o || r.altKey !==
|
|
425
|
+
function It(e, r, a) {
|
|
426
|
+
const t = !!e.ctrl || !!e.mod && !a, o = !!e.meta || !!e.mod && a, c = !!e.alt, C = !!e.shift;
|
|
427
|
+
return r.ctrlKey !== t || r.metaKey !== o || r.altKey !== c || r.shiftKey !== C ? !1 : Bt(e, r);
|
|
428
428
|
}
|
|
429
|
-
const
|
|
429
|
+
const xt = /* @__PURE__ */ new Set([
|
|
430
430
|
"button",
|
|
431
431
|
"submit",
|
|
432
432
|
"reset",
|
|
@@ -437,57 +437,57 @@ const It = /* @__PURE__ */ new Set([
|
|
|
437
437
|
"range",
|
|
438
438
|
"color"
|
|
439
439
|
]);
|
|
440
|
-
function
|
|
440
|
+
function xn() {
|
|
441
441
|
const e = document.activeElement;
|
|
442
442
|
if (!e) return !1;
|
|
443
443
|
const r = e.tagName;
|
|
444
|
-
if (r === "INPUT") return !
|
|
444
|
+
if (r === "INPUT") return !xt.has(e.type);
|
|
445
445
|
if (r === "TEXTAREA" || r === "SELECT" || e.isContentEditable === !0) return !0;
|
|
446
446
|
const a = e.getAttribute("contenteditable");
|
|
447
447
|
return a === "true" || a === "";
|
|
448
448
|
}
|
|
449
|
-
function
|
|
449
|
+
function Tt() {
|
|
450
450
|
return typeof navigator > "u" ? !1 : /Mac|iPhone|iPad|iPod/i.test(navigator.userAgent);
|
|
451
451
|
}
|
|
452
452
|
function Re() {
|
|
453
|
-
const e =
|
|
453
|
+
const e = Tt();
|
|
454
454
|
return {
|
|
455
455
|
hotkey: ee,
|
|
456
456
|
isMac: e,
|
|
457
457
|
formatShortcut: (r) => Ie(r, e)
|
|
458
458
|
};
|
|
459
459
|
}
|
|
460
|
-
let
|
|
461
|
-
function xn(e) {
|
|
462
|
-
Tt = e;
|
|
463
|
-
}
|
|
460
|
+
let St, Ge, Ue, Ot;
|
|
464
461
|
function Tn(e) {
|
|
465
|
-
|
|
462
|
+
St = e;
|
|
466
463
|
}
|
|
467
464
|
function Sn(e) {
|
|
468
|
-
|
|
465
|
+
Ge = e;
|
|
469
466
|
}
|
|
470
467
|
function On(e) {
|
|
471
|
-
|
|
468
|
+
Ue = e;
|
|
472
469
|
}
|
|
473
|
-
|
|
470
|
+
function kn(e) {
|
|
471
|
+
Ot = e;
|
|
472
|
+
}
|
|
473
|
+
const kt = "useBlade() was called outside a blade. Navigation methods (openBlade) work everywhere, but blade-specific methods require the component to be rendered inside VcBladeSlot.";
|
|
474
474
|
function y(e) {
|
|
475
475
|
throw new Error(`[vc-shell] ${e} requires blade context.
|
|
476
|
-
${
|
|
476
|
+
${kt}`);
|
|
477
477
|
}
|
|
478
|
-
function
|
|
479
|
-
const e = (
|
|
478
|
+
function Pt() {
|
|
479
|
+
const e = (ie() ? F(Fe, void 0) : void 0) ?? Ge, r = (ie() ? F(Qe, void 0) : void 0) ?? Ue;
|
|
480
480
|
if (!e || !r)
|
|
481
481
|
throw new Error(
|
|
482
482
|
"[vc-shell] useBlade() failed: BladeStack or BladeMessaging not available. Ensure BladeNavigationPlugin (plugin-v2) is installed."
|
|
483
483
|
);
|
|
484
|
-
const a = e, t = r, o =
|
|
484
|
+
const a = e, t = r, o = ie() ? F(Je, void 0) : void 0, c = ie() ? F(et, void 0) : void 0, C = E(() => (o || y("id"), o.value.id)), d = E(() => (o || y("param"), o.value.param)), l = E(() => (o || y("options"), o.value.options)), u = E(() => (o || y("query"), o.value.query)), g = E(() => (o || y("closable"), o.value.parentId !== void 0)), p = E(() => (o || y("expanded"), a.activeBlade.value?.id === o.value.id)), f = E(() => (o || y("name"), o.value.name)), A = E(() => {
|
|
485
485
|
if (!o) return;
|
|
486
|
-
const
|
|
487
|
-
return a.blades.value.find((
|
|
486
|
+
const h = o.value.id;
|
|
487
|
+
return a.blades.value.find((T) => T.parentId === h)?.param;
|
|
488
488
|
});
|
|
489
489
|
let v = !1;
|
|
490
|
-
function _(
|
|
490
|
+
function _(h) {
|
|
491
491
|
if (v) {
|
|
492
492
|
console.warn(
|
|
493
493
|
"[vc-shell] provideBladeData() called more than once in the same blade. Only the first call takes effect."
|
|
@@ -495,16 +495,16 @@ function kt() {
|
|
|
495
495
|
return;
|
|
496
496
|
}
|
|
497
497
|
v = !0;
|
|
498
|
-
const
|
|
499
|
-
De(
|
|
498
|
+
const T = qe(h) ? h : N(h);
|
|
499
|
+
De(tt, T);
|
|
500
500
|
}
|
|
501
|
-
async function
|
|
502
|
-
const { isWorkspace:
|
|
503
|
-
if (
|
|
504
|
-
await a.openWorkspace(
|
|
501
|
+
async function x(h) {
|
|
502
|
+
const { isWorkspace: T, ...V } = h;
|
|
503
|
+
if (T)
|
|
504
|
+
await a.openWorkspace(V);
|
|
505
505
|
else {
|
|
506
|
-
const
|
|
507
|
-
|
|
506
|
+
const oe = o?.value.id;
|
|
507
|
+
oe ? await a.openBlade({ ...V, parentId: oe }) : await a.openBlade(V);
|
|
508
508
|
}
|
|
509
509
|
}
|
|
510
510
|
async function M() {
|
|
@@ -513,96 +513,96 @@ function kt() {
|
|
|
513
513
|
async function D() {
|
|
514
514
|
o || y("closeChildren()"), await a.closeChildren(o.value.id);
|
|
515
515
|
}
|
|
516
|
-
async function
|
|
516
|
+
async function I(h) {
|
|
517
517
|
o || y("replaceWith()"), await a.replaceCurrentBlade({
|
|
518
|
-
...
|
|
518
|
+
...h,
|
|
519
519
|
parentId: o.value.parentId
|
|
520
520
|
});
|
|
521
521
|
}
|
|
522
|
-
async function U(
|
|
522
|
+
async function U(h) {
|
|
523
523
|
o || y("coverWith()"), await a.coverCurrentBlade({
|
|
524
|
-
...
|
|
524
|
+
...h,
|
|
525
525
|
parentId: o.value.parentId
|
|
526
526
|
});
|
|
527
527
|
}
|
|
528
|
-
async function
|
|
529
|
-
return o || y("callParent()"), t.callParent(o.value.id,
|
|
528
|
+
async function Q(h, T) {
|
|
529
|
+
return o || y("callParent()"), t.callParent(o.value.id, h, T);
|
|
530
530
|
}
|
|
531
|
-
function $(
|
|
532
|
-
o || y("exposeToChildren()"), t.exposeToChildren(o.value.id,
|
|
531
|
+
function $(h) {
|
|
532
|
+
o || y("exposeToChildren()"), t.exposeToChildren(o.value.id, h);
|
|
533
533
|
}
|
|
534
|
-
function
|
|
535
|
-
o || y("onBeforeClose()"), a.registerBeforeClose(o.value.id,
|
|
534
|
+
function J(h) {
|
|
535
|
+
o || y("onBeforeClose()"), a.registerBeforeClose(o.value.id, h);
|
|
536
536
|
}
|
|
537
|
-
function
|
|
538
|
-
o || y("setError()"), a.setBladeError(o.value.id,
|
|
537
|
+
function fe(h) {
|
|
538
|
+
o || y("setError()"), a.setBladeError(o.value.id, h);
|
|
539
539
|
}
|
|
540
|
-
function
|
|
540
|
+
function ge() {
|
|
541
541
|
o || y("clearError()"), a.clearBladeError(o.value.id);
|
|
542
542
|
}
|
|
543
|
-
let
|
|
544
|
-
function
|
|
545
|
-
|
|
546
|
-
const
|
|
547
|
-
return
|
|
548
|
-
...
|
|
549
|
-
id:
|
|
550
|
-
dismissible:
|
|
551
|
-
}),
|
|
543
|
+
let ve = 0;
|
|
544
|
+
function Ce(h) {
|
|
545
|
+
c || y("addBanner()");
|
|
546
|
+
const T = `banner-${o.value.id}-${++ve}`;
|
|
547
|
+
return c.value.push({
|
|
548
|
+
...h,
|
|
549
|
+
id: T,
|
|
550
|
+
dismissible: h.dismissible ?? !1
|
|
551
|
+
}), T;
|
|
552
552
|
}
|
|
553
|
-
function
|
|
554
|
-
|
|
553
|
+
function te(h) {
|
|
554
|
+
c || y("removeBanner()"), c.value = c.value.filter((T) => T.id !== h);
|
|
555
555
|
}
|
|
556
556
|
function me() {
|
|
557
|
-
|
|
557
|
+
c || y("clearBanners()"), c.value = c.value.filter((h) => h._system);
|
|
558
558
|
}
|
|
559
|
-
let
|
|
560
|
-
function he(
|
|
561
|
-
if (o || y("onActivated()"),
|
|
559
|
+
let ne = !1, ae = !1;
|
|
560
|
+
function he(h) {
|
|
561
|
+
if (o || y("onActivated()"), ne) {
|
|
562
562
|
console.warn("[useBlade] onActivated() already registered in this blade.");
|
|
563
563
|
return;
|
|
564
564
|
}
|
|
565
|
-
|
|
566
|
-
|
|
565
|
+
ne = !0, Z(p, (T) => {
|
|
566
|
+
T && h();
|
|
567
567
|
});
|
|
568
568
|
}
|
|
569
|
-
function _e(
|
|
570
|
-
if (o || y("onDeactivated()"),
|
|
569
|
+
function _e(h) {
|
|
570
|
+
if (o || y("onDeactivated()"), ae) {
|
|
571
571
|
console.warn("[useBlade] onDeactivated() already registered in this blade.");
|
|
572
572
|
return;
|
|
573
573
|
}
|
|
574
|
-
|
|
575
|
-
|
|
574
|
+
ae = !0, Z(p, (T) => {
|
|
575
|
+
T || h();
|
|
576
576
|
});
|
|
577
577
|
}
|
|
578
578
|
return {
|
|
579
579
|
id: C,
|
|
580
580
|
param: d,
|
|
581
|
-
activeChildParam:
|
|
582
|
-
options:
|
|
581
|
+
activeChildParam: A,
|
|
582
|
+
options: l,
|
|
583
583
|
query: u,
|
|
584
584
|
closable: g,
|
|
585
585
|
expanded: p,
|
|
586
586
|
name: f,
|
|
587
587
|
provideBladeData: _,
|
|
588
|
-
openBlade:
|
|
588
|
+
openBlade: x,
|
|
589
589
|
closeSelf: M,
|
|
590
590
|
closeChildren: D,
|
|
591
|
-
replaceWith:
|
|
591
|
+
replaceWith: I,
|
|
592
592
|
coverWith: U,
|
|
593
|
-
callParent:
|
|
593
|
+
callParent: Q,
|
|
594
594
|
exposeToChildren: $,
|
|
595
|
-
onBeforeClose:
|
|
595
|
+
onBeforeClose: J,
|
|
596
596
|
onActivated: he,
|
|
597
597
|
onDeactivated: _e,
|
|
598
|
-
setError:
|
|
599
|
-
clearError:
|
|
600
|
-
addBanner:
|
|
601
|
-
removeBanner:
|
|
598
|
+
setError: fe,
|
|
599
|
+
clearError: ge,
|
|
600
|
+
addBanner: Ce,
|
|
601
|
+
removeBanner: te,
|
|
602
602
|
clearBanners: me
|
|
603
603
|
};
|
|
604
604
|
}
|
|
605
|
-
function
|
|
605
|
+
function Mt(e, r) {
|
|
606
606
|
return {
|
|
607
607
|
id: r.generateId(),
|
|
608
608
|
name: e.name,
|
|
@@ -613,7 +613,7 @@ function Pt(e, r) {
|
|
|
613
613
|
visible: !0
|
|
614
614
|
};
|
|
615
615
|
}
|
|
616
|
-
function
|
|
616
|
+
function Dt(e, r, a) {
|
|
617
617
|
return {
|
|
618
618
|
id: a.generateId(),
|
|
619
619
|
name: e.name,
|
|
@@ -625,7 +625,7 @@ function Mt(e, r, a) {
|
|
|
625
625
|
visible: !0
|
|
626
626
|
};
|
|
627
627
|
}
|
|
628
|
-
function
|
|
628
|
+
function Lt(e, r, a) {
|
|
629
629
|
return {
|
|
630
630
|
id: a.generateId(),
|
|
631
631
|
name: e.name,
|
|
@@ -637,7 +637,7 @@ function Dt(e, r, a) {
|
|
|
637
637
|
visible: !0
|
|
638
638
|
};
|
|
639
639
|
}
|
|
640
|
-
function
|
|
640
|
+
function Nt(e, r, a) {
|
|
641
641
|
return {
|
|
642
642
|
id: a.generateId(),
|
|
643
643
|
name: e.name,
|
|
@@ -649,31 +649,31 @@ function Lt(e, r, a) {
|
|
|
649
649
|
visible: !0
|
|
650
650
|
};
|
|
651
651
|
}
|
|
652
|
-
let
|
|
653
|
-
function
|
|
654
|
-
return `blade_${++
|
|
652
|
+
let Ft = 0;
|
|
653
|
+
function $t() {
|
|
654
|
+
return `blade_${++Ft}_${Math.random().toString(36).slice(2, 8)}`;
|
|
655
655
|
}
|
|
656
|
-
function
|
|
657
|
-
const t = N([]), o = /* @__PURE__ */ new Map(),
|
|
656
|
+
function Pn(e, r, a = nt) {
|
|
657
|
+
const t = N([]), o = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), C = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map(), l = E(() => t.value[0]), u = E(() => t.value), g = E(() => {
|
|
658
658
|
for (let n = t.value.length - 1; n >= 0; n--)
|
|
659
659
|
if (t.value[n].visible) return t.value[n];
|
|
660
660
|
});
|
|
661
661
|
function p(n) {
|
|
662
|
-
o.delete(n),
|
|
662
|
+
o.delete(n), c.delete(n), C.delete(n), d.delete(n);
|
|
663
663
|
}
|
|
664
664
|
function f(n) {
|
|
665
665
|
const i = e.getBlade(n);
|
|
666
666
|
if (i)
|
|
667
667
|
return i.route;
|
|
668
668
|
}
|
|
669
|
-
const
|
|
670
|
-
generateId:
|
|
669
|
+
const A = {
|
|
670
|
+
generateId: $t,
|
|
671
671
|
resolveUrl: f
|
|
672
672
|
};
|
|
673
673
|
async function v(n) {
|
|
674
674
|
for (let i = n.length - 1; i >= 0; i--) {
|
|
675
|
-
const
|
|
676
|
-
if (
|
|
675
|
+
const s = o.get(n[i].id);
|
|
676
|
+
if (s && await s())
|
|
677
677
|
return !0;
|
|
678
678
|
}
|
|
679
679
|
return !1;
|
|
@@ -682,39 +682,39 @@ function kn(e, r, a = tt) {
|
|
|
682
682
|
for (const i of n)
|
|
683
683
|
C.get(i.id)?.(), p(i.id);
|
|
684
684
|
}
|
|
685
|
-
async function
|
|
686
|
-
if (
|
|
687
|
-
const
|
|
688
|
-
if (!
|
|
685
|
+
async function x(n) {
|
|
686
|
+
if (l.value?.name === n.name) return !1;
|
|
687
|
+
const s = e.getBlade(n.name);
|
|
688
|
+
if (!s)
|
|
689
689
|
throw new Error(`[BladeStack] Blade '${n.name}' not found in registry`);
|
|
690
|
-
if (r &&
|
|
690
|
+
if (r && s.permissions && !r(s.permissions))
|
|
691
691
|
return console.warn(`[BladeStack] Access denied to workspace '${n.name}'`), !1;
|
|
692
692
|
_([...t.value]);
|
|
693
|
-
const
|
|
694
|
-
return t.value = [
|
|
693
|
+
const m = Mt(n, A);
|
|
694
|
+
return t.value = [m], n.onOpen && c.set(m.id, n.onOpen), n.onClose && C.set(m.id, n.onClose), n.onOpen?.(), !0;
|
|
695
695
|
}
|
|
696
696
|
async function M(n) {
|
|
697
697
|
if (!e.getBlade(n.name))
|
|
698
698
|
throw new Error(`[BladeStack] Blade '${n.name}' not found in registry`);
|
|
699
|
-
const i = n.parentId ?? g.value?.id ??
|
|
699
|
+
const i = n.parentId ?? g.value?.id ?? l.value?.id;
|
|
700
700
|
if (!i)
|
|
701
701
|
throw new Error("[BladeStack] Cannot open blade: no parent blade found");
|
|
702
|
-
const
|
|
703
|
-
if (
|
|
702
|
+
const s = t.value.findIndex((S) => S.id === i);
|
|
703
|
+
if (s === -1)
|
|
704
704
|
throw new Error(`[BladeStack] Parent blade '${i}' not found in stack`);
|
|
705
|
-
const
|
|
706
|
-
if (
|
|
705
|
+
const m = t.value.slice(s + 1);
|
|
706
|
+
if (m.length > 0 && await v(m))
|
|
707
707
|
return !1;
|
|
708
|
-
_(
|
|
709
|
-
const w =
|
|
710
|
-
return t.value = [...t.value.slice(0,
|
|
708
|
+
_(m);
|
|
709
|
+
const w = Dt(n, i, A);
|
|
710
|
+
return t.value = [...t.value.slice(0, s + 1), w], n.onOpen && c.set(w.id, n.onOpen), n.onClose && C.set(w.id, n.onClose), n.onOpen?.(), !0;
|
|
711
711
|
}
|
|
712
712
|
async function D(n) {
|
|
713
713
|
const i = t.value.findIndex((S) => S.id === n);
|
|
714
714
|
if (i === -1 || i === 0) return "refused";
|
|
715
|
-
const
|
|
716
|
-
if (await v(
|
|
717
|
-
_(
|
|
715
|
+
const s = t.value.slice(i);
|
|
716
|
+
if (await v(s)) return "prevented";
|
|
717
|
+
_(s), t.value = t.value.slice(0, i);
|
|
718
718
|
const w = t.value.length - 1;
|
|
719
719
|
if (w > 0 && !t.value[w].visible) {
|
|
720
720
|
const S = [...t.value];
|
|
@@ -722,24 +722,24 @@ function kn(e, r, a = tt) {
|
|
|
722
722
|
}
|
|
723
723
|
return "closed";
|
|
724
724
|
}
|
|
725
|
-
async function
|
|
725
|
+
async function I(n) {
|
|
726
726
|
const i = g.value;
|
|
727
727
|
if (!i)
|
|
728
728
|
throw new Error("[BladeStack] No active blade to replace");
|
|
729
729
|
if (!e.getBlade(n.name))
|
|
730
730
|
throw new Error(`[BladeStack] Blade '${n.name}' not found in registry`);
|
|
731
|
-
const
|
|
732
|
-
if (
|
|
731
|
+
const s = t.value.findIndex((R) => R.id === i.id);
|
|
732
|
+
if (s === -1)
|
|
733
733
|
throw new Error(`[BladeStack] Active blade '${i.id}' not found in stack`);
|
|
734
|
-
const
|
|
735
|
-
if (
|
|
736
|
-
if (await v(
|
|
737
|
-
_(
|
|
734
|
+
const m = t.value.slice(s + 1);
|
|
735
|
+
if (m.length > 0) {
|
|
736
|
+
if (await v(m)) return !1;
|
|
737
|
+
_(m);
|
|
738
738
|
}
|
|
739
|
-
const w =
|
|
739
|
+
const w = Lt(n, i.parentId, A);
|
|
740
740
|
_([i]);
|
|
741
|
-
const S = [...t.value.slice(0,
|
|
742
|
-
return t.value = S, n.onOpen &&
|
|
741
|
+
const S = [...t.value.slice(0, s), w, ...t.value.slice(s + 1)];
|
|
742
|
+
return t.value = S, n.onOpen && c.set(w.id, n.onOpen), n.onClose && C.set(w.id, n.onClose), n.onOpen?.(), !0;
|
|
743
743
|
}
|
|
744
744
|
async function U(n) {
|
|
745
745
|
const i = g.value;
|
|
@@ -747,132 +747,143 @@ function kn(e, r, a = tt) {
|
|
|
747
747
|
throw new Error("[BladeStack] No active blade to cover");
|
|
748
748
|
if (!e.getBlade(n.name))
|
|
749
749
|
throw new Error(`[BladeStack] Blade '${n.name}' not found in registry`);
|
|
750
|
-
const
|
|
751
|
-
if (
|
|
750
|
+
const s = t.value.findIndex((R) => R.id === i.id);
|
|
751
|
+
if (s === -1)
|
|
752
752
|
throw new Error(`[BladeStack] Active blade '${i.id}' not found in stack`);
|
|
753
|
-
const
|
|
754
|
-
if (
|
|
755
|
-
if (await v(
|
|
756
|
-
_(
|
|
753
|
+
const m = t.value.slice(s + 1);
|
|
754
|
+
if (m.length > 0) {
|
|
755
|
+
if (await v(m)) return !1;
|
|
756
|
+
_(m);
|
|
757
757
|
}
|
|
758
|
-
const w =
|
|
759
|
-
return S.push({ ...i, visible: !1 }), S.push(w), t.value = S, n.onOpen &&
|
|
758
|
+
const w = Nt(n, i.id, A), S = t.value.slice(0, s);
|
|
759
|
+
return S.push({ ...i, visible: !1 }), S.push(w), t.value = S, n.onOpen && c.set(w.id, n.onOpen), n.onClose && C.set(w.id, n.onClose), n.onOpen?.(), !0;
|
|
760
760
|
}
|
|
761
|
-
async function
|
|
761
|
+
async function Q(n) {
|
|
762
762
|
const i = t.value.findIndex((w) => w.id === n);
|
|
763
763
|
if (i === -1) return !1;
|
|
764
|
-
const
|
|
765
|
-
return
|
|
764
|
+
const s = t.value.slice(i + 1);
|
|
765
|
+
return s.length === 0 || await v(s) ? !1 : (_(s), t.value = t.value.slice(0, i + 1), !0);
|
|
766
766
|
}
|
|
767
767
|
function $(n) {
|
|
768
768
|
g.value?.url && a[n]();
|
|
769
769
|
}
|
|
770
|
-
async function
|
|
771
|
-
await
|
|
772
|
-
}
|
|
773
|
-
async function pe(n) {
|
|
774
|
-
await M(n) && $("push");
|
|
770
|
+
async function J(n) {
|
|
771
|
+
await x(n) && $("push");
|
|
775
772
|
}
|
|
776
773
|
async function fe(n) {
|
|
777
|
-
await
|
|
774
|
+
await M(n) && $("push");
|
|
778
775
|
}
|
|
779
776
|
async function ge(n) {
|
|
780
|
-
await
|
|
777
|
+
await I(n) && $("replace");
|
|
781
778
|
}
|
|
782
779
|
async function ve(n) {
|
|
780
|
+
await U(n) && $("push");
|
|
781
|
+
}
|
|
782
|
+
async function Ce(n) {
|
|
783
783
|
const i = await D(n);
|
|
784
784
|
return i === "closed" && a.replace(), i === "prevented";
|
|
785
785
|
}
|
|
786
|
-
async function
|
|
787
|
-
await
|
|
786
|
+
async function te(n) {
|
|
787
|
+
await Q(n) && a.replace();
|
|
788
788
|
}
|
|
789
789
|
function me(n, i) {
|
|
790
790
|
o.set(n, i);
|
|
791
791
|
}
|
|
792
|
-
function
|
|
792
|
+
function ne(n) {
|
|
793
793
|
o.delete(n);
|
|
794
794
|
}
|
|
795
|
-
function
|
|
796
|
-
const
|
|
797
|
-
if (
|
|
798
|
-
const
|
|
799
|
-
|
|
795
|
+
function ae(n, i) {
|
|
796
|
+
const s = t.value.findIndex((w) => w.id === n);
|
|
797
|
+
if (s === -1) return;
|
|
798
|
+
const m = [...t.value];
|
|
799
|
+
m[s] = { ...m[s], error: i }, t.value = m;
|
|
800
800
|
}
|
|
801
801
|
function he(n) {
|
|
802
|
-
const i = t.value.findIndex((
|
|
802
|
+
const i = t.value.findIndex((m) => m.id === n);
|
|
803
803
|
if (i === -1) return;
|
|
804
|
-
const
|
|
805
|
-
|
|
804
|
+
const s = [...t.value];
|
|
805
|
+
s[i] = { ...s[i], error: void 0 }, t.value = s;
|
|
806
806
|
}
|
|
807
807
|
function _e(n, i) {
|
|
808
|
-
const
|
|
809
|
-
if (
|
|
810
|
-
const
|
|
811
|
-
|
|
808
|
+
const s = t.value.findIndex((w) => w.id === n);
|
|
809
|
+
if (s === -1 || t.value[s].title === i) return;
|
|
810
|
+
const m = [...t.value];
|
|
811
|
+
m[s] = { ...m[s], title: i }, t.value = m;
|
|
812
812
|
}
|
|
813
|
-
function
|
|
814
|
-
const
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
813
|
+
function h(n) {
|
|
814
|
+
const i = t.value.findIndex((s) => s.id === n);
|
|
815
|
+
return i === -1 ? [] : t.value.slice(0, i).filter((s) => s.visible).map((s) => ({
|
|
816
|
+
id: s.id,
|
|
817
|
+
title: s.title ?? s.name,
|
|
818
|
+
clickHandler: async (m) => {
|
|
819
|
+
await te(m);
|
|
820
|
+
}
|
|
821
|
+
}));
|
|
822
|
+
}
|
|
823
|
+
function T(n, i) {
|
|
824
|
+
const s = t.value.findIndex((K) => K.id === n);
|
|
825
|
+
if (s === -1) return;
|
|
826
|
+
const m = t.value[s].query ?? {}, w = { ...m };
|
|
827
|
+
for (const [K, we] of Object.entries(i))
|
|
828
|
+
we === "" || we == null ? delete w[K] : w[K] = we;
|
|
829
|
+
const S = Object.keys(m), R = Object.keys(w);
|
|
830
|
+
if (S.length === R.length && R.every((K) => m[K] === w[K]))
|
|
821
831
|
return;
|
|
822
832
|
const Ee = [...t.value];
|
|
823
|
-
Ee[
|
|
833
|
+
Ee[s] = { ...Ee[s], query: w }, t.value = Ee;
|
|
824
834
|
}
|
|
825
|
-
function
|
|
835
|
+
function V(n) {
|
|
826
836
|
let i = d.get(n);
|
|
827
837
|
return i || (i = N(!1), d.set(n, i)), i;
|
|
828
838
|
}
|
|
829
|
-
function
|
|
839
|
+
function oe(n) {
|
|
830
840
|
return d.get(n)?.value ?? !1;
|
|
831
841
|
}
|
|
832
|
-
function
|
|
833
|
-
|
|
842
|
+
function Ke(n, i) {
|
|
843
|
+
V(n).value = i;
|
|
834
844
|
}
|
|
835
|
-
function
|
|
836
|
-
const i =
|
|
845
|
+
function He(n) {
|
|
846
|
+
const i = V(n);
|
|
837
847
|
i.value = !i.value;
|
|
838
848
|
}
|
|
839
|
-
function
|
|
849
|
+
function We(n) {
|
|
840
850
|
for (const i of t.value)
|
|
841
851
|
p(i.id);
|
|
842
852
|
t.value = n;
|
|
843
853
|
}
|
|
844
854
|
return {
|
|
845
|
-
workspace:
|
|
855
|
+
workspace: l,
|
|
846
856
|
blades: u,
|
|
847
857
|
activeBlade: g,
|
|
848
|
-
openWorkspace:
|
|
849
|
-
openBlade:
|
|
850
|
-
closeBlade:
|
|
851
|
-
closeChildren:
|
|
852
|
-
replaceCurrentBlade:
|
|
853
|
-
coverCurrentBlade:
|
|
858
|
+
openWorkspace: J,
|
|
859
|
+
openBlade: fe,
|
|
860
|
+
closeBlade: Ce,
|
|
861
|
+
closeChildren: te,
|
|
862
|
+
replaceCurrentBlade: ge,
|
|
863
|
+
coverCurrentBlade: ve,
|
|
854
864
|
registerBeforeClose: me,
|
|
855
|
-
unregisterBeforeClose:
|
|
856
|
-
setBladeError:
|
|
865
|
+
unregisterBeforeClose: ne,
|
|
866
|
+
setBladeError: ae,
|
|
857
867
|
clearBladeError: he,
|
|
858
868
|
setBladeTitle: _e,
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
869
|
+
trailFor: h,
|
|
870
|
+
updateBladeQuery: T,
|
|
871
|
+
getMaximizedRef: V,
|
|
872
|
+
isMaximized: oe,
|
|
873
|
+
setMaximized: Ke,
|
|
874
|
+
toggleMaximized: He,
|
|
875
|
+
_restoreStack: We
|
|
865
876
|
};
|
|
866
877
|
}
|
|
867
|
-
function
|
|
878
|
+
function Rt() {
|
|
868
879
|
const e = F(Fe);
|
|
869
880
|
if (!e)
|
|
870
881
|
throw new Error("[useBladeStack] BladeStack not found. Ensure BladeNavigationPlugin is installed.");
|
|
871
882
|
return e;
|
|
872
883
|
}
|
|
873
|
-
const
|
|
874
|
-
function
|
|
875
|
-
const r = F(
|
|
884
|
+
const z = j("use-ai-agent");
|
|
885
|
+
function Mn(e) {
|
|
886
|
+
const r = F(at), { user: a, getAccessToken: t } = ot(), { openBlade: o } = Pt(), { blades: c, activeBlade: C } = Rt(), d = e?.isEmbedded, l = Ct({
|
|
876
887
|
userGetter: () => {
|
|
877
888
|
if (a.value)
|
|
878
889
|
return {
|
|
@@ -883,7 +894,7 @@ function Pn(e) {
|
|
|
883
894
|
};
|
|
884
895
|
},
|
|
885
896
|
bladeGetter: () => {
|
|
886
|
-
const g = C.value ??
|
|
897
|
+
const g = C.value ?? c.value[c.value.length - 1];
|
|
887
898
|
return g ? {
|
|
888
899
|
id: g.id,
|
|
889
900
|
name: g.name,
|
|
@@ -896,36 +907,36 @@ function Pn(e) {
|
|
|
896
907
|
tokenGetter: t,
|
|
897
908
|
navigateToBlade: (g, p, f) => {
|
|
898
909
|
o({ name: g, param: p, options: f }).then(() => {
|
|
899
|
-
|
|
900
|
-
}).catch((
|
|
901
|
-
|
|
910
|
+
z.debug(`Navigated to blade: ${g}`);
|
|
911
|
+
}).catch((A) => {
|
|
912
|
+
z.warn(`Blade not found or cannot be opened: ${g}`, A);
|
|
902
913
|
});
|
|
903
914
|
},
|
|
904
915
|
initialConfig: e?.config,
|
|
905
916
|
isEmbedded: d
|
|
906
917
|
});
|
|
907
|
-
if (De(xe,
|
|
908
|
-
const g = F(
|
|
918
|
+
if (De(xe, l), z.debug("AiAgentService provided"), e?.addGlobalToolbarButton ?? !0) {
|
|
919
|
+
const g = F(it, null);
|
|
909
920
|
g ? (g.registerToolbarItem(
|
|
910
921
|
{
|
|
911
|
-
id:
|
|
912
|
-
icon:
|
|
913
|
-
title:
|
|
922
|
+
id: dt,
|
|
923
|
+
icon: ut,
|
|
924
|
+
title: pt,
|
|
914
925
|
shortcut: ee.mod.i,
|
|
915
926
|
clickHandler: () => {
|
|
916
|
-
|
|
927
|
+
l.togglePanel();
|
|
917
928
|
}
|
|
918
929
|
},
|
|
919
930
|
"*"
|
|
920
931
|
// Wildcard for all blades
|
|
921
|
-
),
|
|
932
|
+
), z.debug("Global AI toolbar button registered with wildcard '*'")) : z.warn("Toolbar service not available, AI button not registered");
|
|
922
933
|
}
|
|
923
|
-
return
|
|
934
|
+
return l;
|
|
924
935
|
}
|
|
925
|
-
function
|
|
936
|
+
function Dn() {
|
|
926
937
|
const e = F(xe);
|
|
927
938
|
if (!e) {
|
|
928
|
-
|
|
939
|
+
z.error("AiAgentService not found. Did you forget to call provideAiAgentService()?");
|
|
929
940
|
return;
|
|
930
941
|
}
|
|
931
942
|
return {
|
|
@@ -949,7 +960,7 @@ function Mn() {
|
|
|
949
960
|
onMessage: e.onMessage
|
|
950
961
|
};
|
|
951
962
|
}
|
|
952
|
-
function
|
|
963
|
+
function Ln(e) {
|
|
953
964
|
return {
|
|
954
965
|
id: "ai-agent-toggle",
|
|
955
966
|
icon: e?.icon ?? "lucide-sparkles",
|
|
@@ -959,11 +970,11 @@ function Dn(e) {
|
|
|
959
970
|
}
|
|
960
971
|
};
|
|
961
972
|
}
|
|
962
|
-
const
|
|
973
|
+
const Gt = ["width", "height"], Ut = ["clip-path"], Vt = {
|
|
963
974
|
key: 1,
|
|
964
975
|
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",
|
|
965
976
|
fill: "url(#virto-oz-gradient-animated)"
|
|
966
|
-
},
|
|
977
|
+
}, Kt = ["id"], Ht = {
|
|
967
978
|
key: 1,
|
|
968
979
|
id: "virto-oz-gradient-animated",
|
|
969
980
|
gradientUnits: "userSpaceOnUse",
|
|
@@ -971,7 +982,7 @@ const Rt = ["width", "height"], Gt = ["clip-path"], Ut = {
|
|
|
971
982
|
y1: "0",
|
|
972
983
|
x2: "99",
|
|
973
984
|
y2: "108"
|
|
974
|
-
}, Ve = /* @__PURE__ */
|
|
985
|
+
}, Ve = /* @__PURE__ */ Y({
|
|
975
986
|
__name: "VcVirtoOzLogo",
|
|
976
987
|
props: {
|
|
977
988
|
width: { default: 22 },
|
|
@@ -980,7 +991,7 @@ const Rt = ["width", "height"], Gt = ["clip-path"], Ut = {
|
|
|
980
991
|
},
|
|
981
992
|
setup(e) {
|
|
982
993
|
const r = E(() => `virto-oz-clip-${Math.random().toString(36).substring(2, 11)}`);
|
|
983
|
-
return (a, t) => (
|
|
994
|
+
return (a, t) => (B(), k("svg", {
|
|
984
995
|
width: e.width,
|
|
985
996
|
height: e.height,
|
|
986
997
|
viewBox: "0 0 99 108",
|
|
@@ -988,22 +999,22 @@ const Rt = ["width", "height"], Gt = ["clip-path"], Ut = {
|
|
|
988
999
|
xmlns: "http://www.w3.org/2000/svg",
|
|
989
1000
|
class: "vc-virto-oz-logo"
|
|
990
1001
|
}, [
|
|
991
|
-
t[3] || (t[3] =
|
|
1002
|
+
t[3] || (t[3] = b("path", {
|
|
992
1003
|
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",
|
|
993
1004
|
fill: "white"
|
|
994
1005
|
}, null, -1)),
|
|
995
|
-
e.animated ? (
|
|
1006
|
+
e.animated ? (B(), k("path", Vt)) : (B(), k("g", {
|
|
996
1007
|
key: 0,
|
|
997
1008
|
"clip-path": `url(#${r.value})`
|
|
998
1009
|
}, [...t[0] || (t[0] = [
|
|
999
|
-
|
|
1000
|
-
|
|
1010
|
+
b("g", { transform: "matrix(0 -0.161514 0.160417 0 49.1357 53.9479)" }, [
|
|
1011
|
+
b("foreignObject", {
|
|
1001
1012
|
x: "-334.01",
|
|
1002
1013
|
y: "-334.01",
|
|
1003
1014
|
width: "668.02",
|
|
1004
1015
|
height: "668.02"
|
|
1005
1016
|
}, [
|
|
1006
|
-
|
|
1017
|
+
b("div", {
|
|
1007
1018
|
xmlns: "http://www.w3.org/1999/xhtml",
|
|
1008
1019
|
style: { background: `conic-gradient(
|
|
1009
1020
|
from 90deg,
|
|
@@ -1017,63 +1028,63 @@ const Rt = ["width", "height"], Gt = ["clip-path"], Ut = {
|
|
|
1017
1028
|
})
|
|
1018
1029
|
])
|
|
1019
1030
|
], -1)
|
|
1020
|
-
])], 8,
|
|
1021
|
-
t[4] || (t[4] =
|
|
1031
|
+
])], 8, Ut)),
|
|
1032
|
+
t[4] || (t[4] = b("path", {
|
|
1022
1033
|
d: "M72.1266 54.0945C72.1266 60.0873 74.3028 71.0379 60.6238 82.8517C65.2871 73.0587 55.8339 77.1002 49.1209 77.1002C36.4152 77.1002 26.1152 66.8002 26.1152 54.0945C26.1152 41.3889 36.4152 31.0889 49.1209 31.0889C61.8266 31.0889 72.1266 41.3889 72.1266 54.0945Z",
|
|
1023
1034
|
fill: "white"
|
|
1024
1035
|
}, null, -1)),
|
|
1025
|
-
t[5] || (t[5] =
|
|
1036
|
+
t[5] || (t[5] = b("ellipse", {
|
|
1026
1037
|
cx: "49.12",
|
|
1027
1038
|
cy: "54.09",
|
|
1028
1039
|
rx: "4.05",
|
|
1029
1040
|
ry: "4.05",
|
|
1030
1041
|
fill: "#6C6C6C"
|
|
1031
1042
|
}, null, -1)),
|
|
1032
|
-
t[6] || (t[6] =
|
|
1043
|
+
t[6] || (t[6] = b("ellipse", {
|
|
1033
1044
|
cx: "60.62",
|
|
1034
1045
|
cy: "54.09",
|
|
1035
1046
|
rx: "4.05",
|
|
1036
1047
|
ry: "4.05",
|
|
1037
1048
|
fill: "#6C6C6C"
|
|
1038
1049
|
}, null, -1)),
|
|
1039
|
-
t[7] || (t[7] =
|
|
1050
|
+
t[7] || (t[7] = b("ellipse", {
|
|
1040
1051
|
cx: "37.62",
|
|
1041
1052
|
cy: "54.09",
|
|
1042
1053
|
rx: "4.05",
|
|
1043
1054
|
ry: "4.05",
|
|
1044
1055
|
fill: "#6C6C6C"
|
|
1045
1056
|
}, null, -1)),
|
|
1046
|
-
|
|
1047
|
-
e.animated ?
|
|
1057
|
+
b("defs", null, [
|
|
1058
|
+
e.animated ? X("", !0) : (B(), k("clipPath", {
|
|
1048
1059
|
key: 0,
|
|
1049
1060
|
id: r.value
|
|
1050
1061
|
}, [...t[1] || (t[1] = [
|
|
1051
|
-
|
|
1052
|
-
])], 8,
|
|
1053
|
-
e.animated ? (
|
|
1054
|
-
|
|
1055
|
-
])])) :
|
|
1062
|
+
b("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)
|
|
1063
|
+
])], 8, Kt)),
|
|
1064
|
+
e.animated ? (B(), k("linearGradient", Ht, [...t[2] || (t[2] = [
|
|
1065
|
+
Ze('<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)
|
|
1066
|
+
])])) : X("", !0)
|
|
1056
1067
|
])
|
|
1057
|
-
], 8,
|
|
1068
|
+
], 8, Gt));
|
|
1058
1069
|
}
|
|
1059
|
-
}),
|
|
1070
|
+
}), Wt = { class: "vc-shortcut-kbd" }, zt = {
|
|
1060
1071
|
key: 0,
|
|
1061
1072
|
class: "vc-shortcut-kbd__plus"
|
|
1062
|
-
},
|
|
1073
|
+
}, qt = { class: "vc-shortcut-kbd__key" }, Be = /* @__PURE__ */ Y({
|
|
1063
1074
|
__name: "ShortcutKbd",
|
|
1064
1075
|
props: {
|
|
1065
1076
|
parts: {},
|
|
1066
1077
|
separated: { type: Boolean, default: !1 }
|
|
1067
1078
|
},
|
|
1068
1079
|
setup(e) {
|
|
1069
|
-
return (r, a) => (
|
|
1070
|
-
(
|
|
1071
|
-
e.separated && o > 0 ? (
|
|
1072
|
-
|
|
1080
|
+
return (r, a) => (B(), k("span", Wt, [
|
|
1081
|
+
(B(!0), k(Te, null, Xe(e.parts, (t, o) => (B(), k(Te, { key: o }, [
|
|
1082
|
+
e.separated && o > 0 ? (B(), k("span", zt, "+")) : X("", !0),
|
|
1083
|
+
b("kbd", qt, q(t), 1)
|
|
1073
1084
|
], 64))), 128))
|
|
1074
1085
|
]));
|
|
1075
1086
|
}
|
|
1076
|
-
}),
|
|
1087
|
+
}), Zt = { class: "vc-ai-agent-header" }, Xt = { class: "vc-ai-agent-header__icon" }, Yt = { class: "vc-ai-agent-header__wrapper" }, jt = { class: "vc-ai-agent-header__content" }, Qt = { class: "vc-ai-agent-header__title" }, Jt = { class: "vc-ai-agent-header__controls" }, en = ["aria-label", "aria-keyshortcuts"], tn = { class: "tw-inline-flex tw-items-center tw-gap-2" }, nn = ["aria-label", "aria-keyshortcuts"], an = { class: "tw-inline-flex tw-items-center tw-gap-2" }, on = ["aria-label", "aria-keyshortcuts"], rn = { class: "tw-inline-flex tw-items-center tw-gap-2" }, sn = /* @__PURE__ */ Y({
|
|
1077
1088
|
__name: "VcAiAgentHeader",
|
|
1078
1089
|
props: {
|
|
1079
1090
|
title: {},
|
|
@@ -1082,28 +1093,28 @@ const Rt = ["width", "height"], Gt = ["clip-path"], Ut = {
|
|
|
1082
1093
|
},
|
|
1083
1094
|
emits: ["close", "expand", "collapse"],
|
|
1084
1095
|
setup(e) {
|
|
1085
|
-
const { t: r } =
|
|
1086
|
-
return (d,
|
|
1087
|
-
|
|
1096
|
+
const { t: r } = lt(), { isMac: a } = Re(), t = E(() => Ie(ee.escape, a)), o = E(() => Ie(ee.mod.backslash, a)), c = E(() => t.value.aria), C = E(() => o.value.aria);
|
|
1097
|
+
return (d, l) => (B(), k("div", Zt, [
|
|
1098
|
+
b("div", Xt, [
|
|
1088
1099
|
L(Ve, {
|
|
1089
1100
|
width: 22,
|
|
1090
1101
|
height: 24,
|
|
1091
1102
|
"show-dots": ""
|
|
1092
1103
|
})
|
|
1093
1104
|
]),
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1105
|
+
b("div", Yt, [
|
|
1106
|
+
b("div", jt, [
|
|
1107
|
+
b("div", Qt, q(e.title), 1)
|
|
1097
1108
|
])
|
|
1098
1109
|
]),
|
|
1099
|
-
|
|
1100
|
-
e.isExpanded ? (
|
|
1110
|
+
b("div", Jt, [
|
|
1111
|
+
e.isExpanded ? (B(), pe(O(be), {
|
|
1101
1112
|
key: 0,
|
|
1102
1113
|
placement: "bottom"
|
|
1103
1114
|
}, {
|
|
1104
1115
|
tooltip: G(() => [
|
|
1105
|
-
|
|
1106
|
-
|
|
1116
|
+
b("span", tn, [
|
|
1117
|
+
Ae(q(O(r)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.RESTORE")) + " ", 1),
|
|
1107
1118
|
L(Be, {
|
|
1108
1119
|
parts: o.value.parts,
|
|
1109
1120
|
separated: !O(a)
|
|
@@ -1111,29 +1122,29 @@ const Rt = ["width", "height"], Gt = ["clip-path"], Ut = {
|
|
|
1111
1122
|
])
|
|
1112
1123
|
]),
|
|
1113
1124
|
default: G(() => [
|
|
1114
|
-
|
|
1125
|
+
b("div", {
|
|
1115
1126
|
class: "vc-ai-agent-header__button",
|
|
1116
1127
|
role: "button",
|
|
1117
1128
|
tabindex: "0",
|
|
1118
1129
|
"aria-label": O(r)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.RESTORE"),
|
|
1119
1130
|
"aria-keyshortcuts": C.value,
|
|
1120
|
-
onClick:
|
|
1131
|
+
onClick: l[0] || (l[0] = (u) => d.$emit("collapse")),
|
|
1121
1132
|
onKeydown: [
|
|
1122
|
-
|
|
1123
|
-
|
|
1133
|
+
l[1] || (l[1] = H(W((u) => d.$emit("collapse"), ["prevent"]), ["enter"])),
|
|
1134
|
+
l[2] || (l[2] = H(W((u) => d.$emit("collapse"), ["prevent"]), ["space"]))
|
|
1124
1135
|
]
|
|
1125
1136
|
}, [
|
|
1126
|
-
L(O(
|
|
1127
|
-
], 40,
|
|
1137
|
+
L(O(ue), { icon: "lucide-minus" })
|
|
1138
|
+
], 40, en)
|
|
1128
1139
|
]),
|
|
1129
1140
|
_: 1
|
|
1130
|
-
})) : (
|
|
1141
|
+
})) : (B(), pe(O(be), {
|
|
1131
1142
|
key: 1,
|
|
1132
1143
|
placement: "bottom"
|
|
1133
1144
|
}, {
|
|
1134
1145
|
tooltip: G(() => [
|
|
1135
|
-
|
|
1136
|
-
|
|
1146
|
+
b("span", an, [
|
|
1147
|
+
Ae(q(O(r)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.MAXIMIZE")) + " ", 1),
|
|
1137
1148
|
L(Be, {
|
|
1138
1149
|
parts: o.value.parts,
|
|
1139
1150
|
separated: !O(a)
|
|
@@ -1141,27 +1152,27 @@ const Rt = ["width", "height"], Gt = ["clip-path"], Ut = {
|
|
|
1141
1152
|
])
|
|
1142
1153
|
]),
|
|
1143
1154
|
default: G(() => [
|
|
1144
|
-
|
|
1155
|
+
b("div", {
|
|
1145
1156
|
class: "vc-ai-agent-header__button",
|
|
1146
1157
|
role: "button",
|
|
1147
1158
|
tabindex: "0",
|
|
1148
1159
|
"aria-label": O(r)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.MAXIMIZE"),
|
|
1149
1160
|
"aria-keyshortcuts": C.value,
|
|
1150
|
-
onClick:
|
|
1161
|
+
onClick: l[3] || (l[3] = (u) => d.$emit("expand")),
|
|
1151
1162
|
onKeydown: [
|
|
1152
|
-
|
|
1153
|
-
|
|
1163
|
+
l[4] || (l[4] = H(W((u) => d.$emit("expand"), ["prevent"]), ["enter"])),
|
|
1164
|
+
l[5] || (l[5] = H(W((u) => d.$emit("expand"), ["prevent"]), ["space"]))
|
|
1154
1165
|
]
|
|
1155
1166
|
}, [
|
|
1156
|
-
L(O(
|
|
1157
|
-
], 40,
|
|
1167
|
+
L(O(ue), { icon: "lucide-panel-top" })
|
|
1168
|
+
], 40, nn)
|
|
1158
1169
|
]),
|
|
1159
1170
|
_: 1
|
|
1160
1171
|
})),
|
|
1161
|
-
L(O(
|
|
1172
|
+
L(O(be), { placement: "bottom" }, {
|
|
1162
1173
|
tooltip: G(() => [
|
|
1163
|
-
|
|
1164
|
-
|
|
1174
|
+
b("span", rn, [
|
|
1175
|
+
Ae(q(O(r)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.CLOSE")) + " ", 1),
|
|
1165
1176
|
L(Be, {
|
|
1166
1177
|
parts: t.value.parts,
|
|
1167
1178
|
separated: !O(a)
|
|
@@ -1169,104 +1180,104 @@ const Rt = ["width", "height"], Gt = ["clip-path"], Ut = {
|
|
|
1169
1180
|
])
|
|
1170
1181
|
]),
|
|
1171
1182
|
default: G(() => [
|
|
1172
|
-
|
|
1183
|
+
b("div", {
|
|
1173
1184
|
class: "vc-ai-agent-header__button",
|
|
1174
1185
|
role: "button",
|
|
1175
1186
|
tabindex: "0",
|
|
1176
1187
|
"aria-label": O(r)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.CLOSE"),
|
|
1177
|
-
"aria-keyshortcuts":
|
|
1178
|
-
onClick:
|
|
1188
|
+
"aria-keyshortcuts": c.value,
|
|
1189
|
+
onClick: l[6] || (l[6] = (u) => d.$emit("close")),
|
|
1179
1190
|
onKeydown: [
|
|
1180
|
-
|
|
1181
|
-
|
|
1191
|
+
l[7] || (l[7] = H(W((u) => d.$emit("close"), ["prevent"]), ["enter"])),
|
|
1192
|
+
l[8] || (l[8] = H(W((u) => d.$emit("close"), ["prevent"]), ["space"]))
|
|
1182
1193
|
]
|
|
1183
1194
|
}, [
|
|
1184
|
-
L(O(
|
|
1185
|
-
], 40,
|
|
1195
|
+
L(O(ue), { icon: "lucide-x" })
|
|
1196
|
+
], 40, on)
|
|
1186
1197
|
]),
|
|
1187
1198
|
_: 1
|
|
1188
1199
|
})
|
|
1189
1200
|
])
|
|
1190
1201
|
]));
|
|
1191
1202
|
}
|
|
1192
|
-
}),
|
|
1203
|
+
}), ln = { class: "vc-ai-agent-loader" }, cn = { class: "vc-ai-agent-loader__content" }, dn = { class: "vc-ai-agent-loader__logo" }, un = {
|
|
1193
1204
|
key: 0,
|
|
1194
1205
|
class: "vc-ai-agent-loader__text"
|
|
1195
|
-
},
|
|
1206
|
+
}, pn = /* @__PURE__ */ Y({
|
|
1196
1207
|
__name: "VcAiAgentLoader",
|
|
1197
1208
|
props: {
|
|
1198
1209
|
text: {}
|
|
1199
1210
|
},
|
|
1200
1211
|
setup(e) {
|
|
1201
|
-
return (r, a) => (
|
|
1202
|
-
|
|
1203
|
-
|
|
1212
|
+
return (r, a) => (B(), k("div", ln, [
|
|
1213
|
+
b("div", cn, [
|
|
1214
|
+
b("div", dn, [
|
|
1204
1215
|
L(Ve, {
|
|
1205
1216
|
width: 80,
|
|
1206
1217
|
height: 87,
|
|
1207
1218
|
animated: ""
|
|
1208
1219
|
})
|
|
1209
1220
|
]),
|
|
1210
|
-
e.text ? (
|
|
1221
|
+
e.text ? (B(), k("p", un, q(e.text), 1)) : X("", !0)
|
|
1211
1222
|
])
|
|
1212
1223
|
]));
|
|
1213
1224
|
}
|
|
1214
|
-
}),
|
|
1225
|
+
}), fn = { class: "vc-ai-agent-iframe" }, gn = ["src"], vn = {
|
|
1215
1226
|
key: 1,
|
|
1216
1227
|
class: "vc-ai-agent-iframe__placeholder"
|
|
1217
|
-
},
|
|
1228
|
+
}, Cn = /* @__PURE__ */ Y({
|
|
1218
1229
|
__name: "VcAiAgentIframe",
|
|
1219
1230
|
props: {
|
|
1220
1231
|
url: {}
|
|
1221
1232
|
},
|
|
1222
1233
|
emits: ["iframe-ready"],
|
|
1223
1234
|
setup(e, { emit: r }) {
|
|
1224
|
-
const a =
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
(
|
|
1228
|
-
|
|
1235
|
+
const a = j("ai-agent-iframe"), t = e, o = r, c = N(null), C = N(!0);
|
|
1236
|
+
Z(
|
|
1237
|
+
c,
|
|
1238
|
+
(l) => {
|
|
1239
|
+
l && o("iframe-ready", l);
|
|
1229
1240
|
},
|
|
1230
1241
|
{ immediate: !0 }
|
|
1231
1242
|
);
|
|
1232
1243
|
const d = () => {
|
|
1233
1244
|
C.value = !1, a.debug("Iframe loaded");
|
|
1234
1245
|
};
|
|
1235
|
-
return
|
|
1246
|
+
return Z(
|
|
1236
1247
|
() => t.url,
|
|
1237
1248
|
() => {
|
|
1238
1249
|
C.value = !0;
|
|
1239
1250
|
}
|
|
1240
|
-
), (
|
|
1251
|
+
), (l, u) => (B(), k("div", fn, [
|
|
1241
1252
|
L(Le, { name: "fade" }, {
|
|
1242
1253
|
default: G(() => [
|
|
1243
|
-
C.value && e.url ? (
|
|
1254
|
+
C.value && e.url ? (B(), pe(pn, {
|
|
1244
1255
|
key: 0,
|
|
1245
|
-
text:
|
|
1246
|
-
}, null, 8, ["text"])) :
|
|
1256
|
+
text: l.$t("AI_AGENT.LOADING")
|
|
1257
|
+
}, null, 8, ["text"])) : X("", !0)
|
|
1247
1258
|
]),
|
|
1248
1259
|
_: 1
|
|
1249
1260
|
}),
|
|
1250
|
-
e.url ? (
|
|
1261
|
+
e.url ? (B(), k("iframe", {
|
|
1251
1262
|
key: 0,
|
|
1252
1263
|
ref_key: "iframeRef",
|
|
1253
|
-
ref:
|
|
1264
|
+
ref: c,
|
|
1254
1265
|
src: e.url,
|
|
1255
1266
|
class: Ne(["vc-ai-agent-iframe__frame", { "vc-ai-agent-iframe__frame--loading": C.value }]),
|
|
1256
1267
|
sandbox: "allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox",
|
|
1257
1268
|
allow: "clipboard-read; clipboard-write",
|
|
1258
1269
|
onLoad: d
|
|
1259
|
-
}, null, 42,
|
|
1260
|
-
L(O(
|
|
1270
|
+
}, null, 42, gn)) : (B(), k("div", vn, [
|
|
1271
|
+
L(O(ue), {
|
|
1261
1272
|
icon: "lucide-sparkles",
|
|
1262
1273
|
size: "xl",
|
|
1263
1274
|
class: "vc-ai-agent-iframe__placeholder-icon"
|
|
1264
1275
|
}),
|
|
1265
|
-
u[0] || (u[0] =
|
|
1276
|
+
u[0] || (u[0] = b("p", { class: "vc-ai-agent-iframe__placeholder-text" }, "AI Agent URL not configured", -1))
|
|
1266
1277
|
]))
|
|
1267
1278
|
]));
|
|
1268
1279
|
}
|
|
1269
|
-
}),
|
|
1280
|
+
}), mn = ["inert"], hn = { class: "vc-ai-agent-panel__content" }, Nn = /* @__PURE__ */ Y({
|
|
1270
1281
|
__name: "VcAiAgentPanel",
|
|
1271
1282
|
props: {
|
|
1272
1283
|
inert: { type: Boolean }
|
|
@@ -1276,40 +1287,40 @@ const Rt = ["width", "height"], Gt = ["clip-path"], Ut = {
|
|
|
1276
1287
|
a || console.error("[VcAiAgentPanel] AiAgentService not provided");
|
|
1277
1288
|
const o = E(
|
|
1278
1289
|
() => a?.config.value ?? { url: "", title: "AI Assistant", width: 362, expandedWidth: 500 }
|
|
1279
|
-
),
|
|
1290
|
+
), c = E(() => !t && (a?.isOpen.value ?? !1)), C = E(() => a?.isExpanded.value ?? !1), d = E(() => a?.totalItemsCount.value ?? 0), l = E(() => ({
|
|
1280
1291
|
width: C.value ? `${o.value.expandedWidth ?? 500}px` : `${o.value.width ?? 362}px`
|
|
1281
1292
|
})), u = () => a?.closePanel(), g = () => a?.expandPanel(), p = () => a?.collapsePanel(), f = N(null);
|
|
1282
|
-
|
|
1283
|
-
if (
|
|
1293
|
+
st(document, "keydown", (v) => {
|
|
1294
|
+
if (c.value && !v.isComposing && !v.defaultPrevented) {
|
|
1284
1295
|
if (v.key === "Escape") {
|
|
1285
1296
|
v.preventDefault(), u();
|
|
1286
1297
|
return;
|
|
1287
1298
|
}
|
|
1288
|
-
if (
|
|
1299
|
+
if (It(ee.mod.backslash, v, r)) {
|
|
1289
1300
|
const _ = document.activeElement;
|
|
1290
1301
|
if (!_ || !f.value?.contains(_)) return;
|
|
1291
1302
|
v.preventDefault(), C.value ? p() : g();
|
|
1292
1303
|
}
|
|
1293
1304
|
}
|
|
1294
1305
|
});
|
|
1295
|
-
const
|
|
1306
|
+
const A = (v) => {
|
|
1296
1307
|
a?._setIframeRef(v);
|
|
1297
1308
|
};
|
|
1298
|
-
return
|
|
1309
|
+
return Ye(() => {
|
|
1299
1310
|
a?._setIframeRef(null);
|
|
1300
|
-
}), (v, _) => (
|
|
1311
|
+
}), (v, _) => (B(), pe(Le, { name: "ai-panel-slide" }, {
|
|
1301
1312
|
default: G(() => [
|
|
1302
|
-
|
|
1313
|
+
c.value ? (B(), k("div", {
|
|
1303
1314
|
key: 0,
|
|
1304
1315
|
ref_key: "panelRef",
|
|
1305
1316
|
ref: f,
|
|
1306
1317
|
class: Ne(["vc-ai-agent-panel", {
|
|
1307
1318
|
"vc-ai-agent-panel--expanded": C.value
|
|
1308
1319
|
}]),
|
|
1309
|
-
style:
|
|
1320
|
+
style: je(l.value),
|
|
1310
1321
|
inert: e.inert || void 0
|
|
1311
1322
|
}, [
|
|
1312
|
-
L(
|
|
1323
|
+
L(sn, {
|
|
1313
1324
|
title: o.value.title,
|
|
1314
1325
|
"is-expanded": C.value,
|
|
1315
1326
|
"items-count": d.value,
|
|
@@ -1317,45 +1328,45 @@ const Rt = ["width", "height"], Gt = ["clip-path"], Ut = {
|
|
|
1317
1328
|
onExpand: g,
|
|
1318
1329
|
onCollapse: p
|
|
1319
1330
|
}, null, 8, ["title", "is-expanded", "items-count"]),
|
|
1320
|
-
|
|
1321
|
-
L(
|
|
1331
|
+
b("div", hn, [
|
|
1332
|
+
L(Cn, {
|
|
1322
1333
|
url: o.value.url,
|
|
1323
|
-
onIframeReady:
|
|
1334
|
+
onIframeReady: A
|
|
1324
1335
|
}, null, 8, ["url"])
|
|
1325
1336
|
])
|
|
1326
|
-
], 14,
|
|
1337
|
+
], 14, mn)) : X("", !0)
|
|
1327
1338
|
]),
|
|
1328
1339
|
_: 1
|
|
1329
1340
|
}));
|
|
1330
1341
|
}
|
|
1331
1342
|
});
|
|
1332
1343
|
export {
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1344
|
+
yn as A,
|
|
1345
|
+
ct as D,
|
|
1346
|
+
Bn as E,
|
|
1347
|
+
In as H,
|
|
1348
|
+
Nn as _,
|
|
1349
|
+
Pn as a,
|
|
1350
|
+
On as b,
|
|
1351
|
+
Ln as c,
|
|
1352
|
+
Tn as d,
|
|
1353
|
+
kn as e,
|
|
1354
|
+
Pt as f,
|
|
1355
|
+
St as g,
|
|
1345
1356
|
Ge as h,
|
|
1346
|
-
|
|
1357
|
+
Ot as i,
|
|
1347
1358
|
Ue as j,
|
|
1348
1359
|
bt as k,
|
|
1349
|
-
|
|
1360
|
+
yt as l,
|
|
1350
1361
|
Ie as m,
|
|
1351
1362
|
ee as n,
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1363
|
+
xn as o,
|
|
1364
|
+
It as p,
|
|
1365
|
+
Rt as q,
|
|
1366
|
+
Tt as r,
|
|
1367
|
+
Sn as s,
|
|
1357
1368
|
Re as t,
|
|
1358
|
-
|
|
1369
|
+
Dn as u,
|
|
1359
1370
|
Be as v,
|
|
1360
|
-
|
|
1371
|
+
Mn as w
|
|
1361
1372
|
};
|