@vc-shell/framework 2.4.0 → 2.5.0
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-Cm_izaFs.js → VcAiAgentPanel.vue_vue_type_script_setup_true_lang-9mBLzIi1.js} +490 -468
- package/dist/chunks/VcAiAgentPanel.vue_vue_type_script_setup_true_lang-9mBLzIi1.js.map +1 -0
- package/dist/chunks/{VcAiAgentPanel.vue_vue_type_style_index_0_lang-DrGobYkj.js → VcAiAgentPanel.vue_vue_type_style_index_0_lang-CZdY18Hq.js} +74 -68
- package/dist/chunks/{VcAiAgentPanel.vue_vue_type_style_index_0_lang-DrGobYkj.js.map → VcAiAgentPanel.vue_vue_type_style_index_0_lang-CZdY18Hq.js.map} +1 -1
- package/dist/chunks/{VcScheduler.vue_vue_type_script_setup_true_lang-B-xA79lJ.js → VcScheduler.vue_vue_type_script_setup_true_lang-BmlVL_rn.js} +6388 -6183
- package/dist/chunks/VcScheduler.vue_vue_type_script_setup_true_lang-BmlVL_rn.js.map +1 -0
- package/dist/chunks/{VcScheduler.vue_vue_type_style_index_0_lang-BSvjI-39.js → VcScheduler.vue_vue_type_style_index_0_lang-BTg4PjTB.js} +533 -521
- package/dist/chunks/VcScheduler.vue_vue_type_style_index_0_lang-BTg4PjTB.js.map +1 -0
- package/dist/chunks/dashboard-feed-row.vue_vue_type_script_setup_true_lang-BCsJG_hk.js +724 -0
- package/dist/chunks/dashboard-feed-row.vue_vue_type_script_setup_true_lang-BCsJG_hk.js.map +1 -0
- package/dist/chunks/{index-C-SEYj46.js → index-B7RhGTNx.js} +2 -2
- package/dist/chunks/{index-C-SEYj46.js.map → index-B7RhGTNx.js.map} +1 -1
- package/dist/core/blade-navigation/utils/bladeRouterGuard.d.ts +1 -2
- package/dist/core/blade-navigation/utils/bladeRouterGuard.d.ts.map +1 -1
- package/dist/core/composables/index.d.ts +1 -0
- package/dist/core/composables/index.d.ts.map +1 -1
- package/dist/core/composables/useLatestRequest/index.d.ts +43 -0
- package/dist/core/composables/useLatestRequest/index.d.ts.map +1 -0
- package/dist/core/composables/usePopup/index.d.ts +12 -3
- package/dist/core/composables/usePopup/index.d.ts.map +1 -1
- package/dist/core/composables/usePopup/keys.d.ts +3 -1
- package/dist/core/composables/usePopup/keys.d.ts.map +1 -1
- package/dist/core/composables/usePopup/types.d.ts +32 -1
- package/dist/core/composables/usePopup/types.d.ts.map +1 -1
- package/dist/core/interceptors/index.d.ts.map +1 -1
- package/dist/core/plugins/ai-agent/components/VcAiAgentPanel.vue.d.ts +4 -1
- package/dist/core/plugins/ai-agent/components/VcAiAgentPanel.vue.d.ts.map +1 -1
- package/dist/core/plugins/ai-agent/services/ai-agent-service.d.ts.map +1 -1
- package/dist/core/plugins/ai-agent/services/message-transport.d.ts +2 -0
- package/dist/core/plugins/ai-agent/services/message-transport.d.ts.map +1 -1
- package/dist/core/plugins/ai-agent/types.d.ts +1 -1
- package/dist/core/plugins/ai-agent/types.d.ts.map +1 -1
- package/dist/core/utilities/error.d.ts.map +1 -1
- package/dist/core/utilities/focus.d.ts +25 -0
- package/dist/core/utilities/focus.d.ts.map +1 -0
- package/dist/core/utilities/index.d.ts +1 -0
- package/dist/core/utilities/index.d.ts.map +1 -1
- package/dist/core/utilities/sessionExpiration.d.ts +14 -0
- package/dist/core/utilities/sessionExpiration.d.ts.map +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/framework.js +1300 -1262
- package/dist/framework.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/injection-keys.d.ts +1 -2
- package/dist/injection-keys.d.ts.map +1 -1
- package/dist/locales/de.js +3 -0
- package/dist/locales/en.js +3 -0
- package/dist/locales/en.json +3 -0
- package/dist/locales/types.d.ts +3 -0
- package/dist/shell/_internal/blade-navigation/components/vc-blade-navigation/focus-target.d.ts +20 -0
- package/dist/shell/_internal/blade-navigation/components/vc-blade-navigation/focus-target.d.ts.map +1 -0
- 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 +5 -0
- package/dist/shell/_internal/blade-navigation/components/vc-blade-slot/vc-blade-slot.vue.d.ts.map +1 -1
- package/dist/shell/_internal/popup/components/vc-popup-container/PopupInstanceProvider.vue.d.ts +30 -0
- package/dist/shell/_internal/popup/components/vc-popup-container/PopupInstanceProvider.vue.d.ts.map +1 -0
- package/dist/shell/_internal/popup/components/vc-popup-container/vc-popup-container.vue.d.ts.map +1 -1
- package/dist/shell/auth/ChangePasswordPage/components/change-password/ChangePassword.vue.d.ts.map +1 -1
- package/dist/shell/auth/InvitePage/components/invite/Invite.vue.d.ts.map +1 -1
- package/dist/shell/auth/ResetPasswordPage/components/reset-password/ResetPassword.vue.d.ts.map +1 -1
- package/dist/shell/components/change-password/change-password.vue.d.ts.map +1 -1
- package/dist/shell/dashboard/draggable-dashboard/GridstackDashboard.vue.d.ts.map +1 -1
- package/dist/shell/dashboard/draggable-dashboard/composables/useGridstack.d.ts +5 -8
- package/dist/shell/dashboard/draggable-dashboard/composables/useGridstack.d.ts.map +1 -1
- package/dist/shell/dashboard/draggable-dashboard/composables/useGridstackAdapter.d.ts +6 -6
- package/dist/shell/dashboard/draggable-dashboard/composables/useGridstackAdapter.d.ts.map +1 -1
- package/dist/shell/dashboard/draggable-dashboard/types.d.ts +11 -0
- package/dist/shell/dashboard/draggable-dashboard/types.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/molecules/vc-color-input/vc-color-input.vue.d.ts +2 -2
- package/dist/ui/components/molecules/vc-date-picker/vc-date-picker.vue.d.ts +2 -2
- package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts +2 -2
- package/dist/ui/components/molecules/vc-multivalue/_internal/MultivalueTrigger.vue.d.ts +2 -2
- package/dist/ui/components/molecules/vc-popover/vc-popover.vue.d.ts +4 -0
- package/dist/ui/components/molecules/vc-popover/vc-popover.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-select/_internal/SelectTrigger.vue.d.ts +2 -2
- package/dist/ui/components/organisms/vc-app/_internal/app-bar/components/MenuSidebar.vue.d.ts +1 -0
- package/dist/ui/components/organisms/vc-app/_internal/app-bar/components/MenuSidebar.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/layouts/DesktopLayout.vue.d.ts +8 -0
- package/dist/ui/components/organisms/vc-app/_internal/layouts/DesktopLayout.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/layouts/MobileLayout.vue.d.ts +5 -0
- package/dist/ui/components/organisms/vc-app/_internal/layouts/MobileLayout.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/sidebar/SidebarHeader.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/BladeHeader.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/useBladeSkeleton.d.ts +16 -0
- package/dist/ui/components/organisms/vc-blade/useBladeSkeleton.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/VcDataTable.vue.d.ts +1 -2
- package/dist/ui/components/organisms/vc-data-table/VcDataTable.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/components/GlobalFiltersPanel.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/components/TableSearchHeader.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/components/mobile/PullToRefresh.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-scheduler/VcScheduler.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-scheduler/_internal/SchedulerToolbar.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-scheduler/_internal/month/MonthEventBar.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-scheduler/_internal/month/MonthMorePopover.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-scheduler/_internal/month/MonthWeekRow.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-scheduler/_internal/views/SchedulerTimelineView.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-scheduler/composables/useTimelineTimeGrid.d.ts +2 -0
- package/dist/ui/components/organisms/vc-scheduler/composables/useTimelineTimeGrid.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-sidebar/vc-sidebar.vue.d.ts +1 -0
- package/dist/ui/components/organisms/vc-sidebar/vc-sidebar.vue.d.ts.map +1 -1
- package/dist/ui/composables/useDataTablePagination.d.ts +22 -1
- package/dist/ui/composables/useDataTablePagination.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-Cm_izaFs.js.map +0 -1
- package/dist/chunks/VcScheduler.vue_vue_type_script_setup_true_lang-B-xA79lJ.js.map +0 -1
- package/dist/chunks/VcScheduler.vue_vue_type_style_index_0_lang-BSvjI-39.js.map +0 -1
- package/dist/chunks/dashboard-feed-row.vue_vue_type_script_setup_true_lang-BXDneKBz.js +0 -679
- package/dist/chunks/dashboard-feed-row.vue_vue_type_script_setup_true_lang-BXDneKBz.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ref as
|
|
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-
|
|
1
|
+
import { ref as L, computed as b, shallowRef as Ge, watch as q, getCurrentInstance as ee, inject as $, 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 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 Pe, normalizeClass as Me, onUnmounted as ze, normalizeStyle as He } from "vue";
|
|
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";
|
|
5
5
|
import { u as nt } from "./vendor-vue-i18n-LO-EJStU.js";
|
|
@@ -10,19 +10,19 @@ const at = {
|
|
|
10
10
|
expandedWidth: 500,
|
|
11
11
|
// Secure by default: no origins trusted until the embedder configures them.
|
|
12
12
|
allowedOrigins: []
|
|
13
|
-
},
|
|
13
|
+
}, hn = "APP_AI_AGENT_URL", _n = {
|
|
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
|
+
}, En = {
|
|
19
19
|
EMBEDDED_HOST_READY: "EMBEDDED_HOST_READY",
|
|
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 =
|
|
23
|
+
const e = L("closed"), o = L(!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
|
-
},
|
|
25
|
+
}, l = () => {
|
|
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:
|
|
34
|
+
close: l,
|
|
35
35
|
toggle: () => {
|
|
36
|
-
e.value === "closed" ? n() :
|
|
36
|
+
e.value === "closed" ? n() : l();
|
|
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
|
|
50
|
+
function Ae(e) {
|
|
51
51
|
return e ? {
|
|
52
52
|
id: e.id,
|
|
53
53
|
name: e.name,
|
|
@@ -56,9 +56,9 @@ function we(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,
|
|
59
|
+
const { userGetter: o, bladeGetter: t, localeGetter: s, tokenGetter: n } = e, l = L(/* @__PURE__ */ new Map()), g = () => {
|
|
60
60
|
const v = t();
|
|
61
|
-
return v ?
|
|
61
|
+
return v ? l.value.get(v.id) ?? {
|
|
62
62
|
items: [],
|
|
63
63
|
type: "list",
|
|
64
64
|
suggestions: void 0
|
|
@@ -67,251 +67,263 @@ function lt(e) {
|
|
|
67
67
|
type: "list",
|
|
68
68
|
suggestions: void 0
|
|
69
69
|
};
|
|
70
|
-
},
|
|
70
|
+
}, c = b(() => g().items), d = b(() => g().type), u = b(() => g().suggestions), h = b(() => c.value.length);
|
|
71
71
|
return {
|
|
72
|
-
contextItems:
|
|
73
|
-
contextType:
|
|
74
|
-
contextSuggestions:
|
|
75
|
-
totalItemsCount:
|
|
76
|
-
setContextData: (v,
|
|
77
|
-
const
|
|
78
|
-
return
|
|
72
|
+
contextItems: c,
|
|
73
|
+
contextType: d,
|
|
74
|
+
contextSuggestions: u,
|
|
75
|
+
totalItemsCount: h,
|
|
76
|
+
setContextData: (v, A, I, k) => {
|
|
77
|
+
const P = t()?.id || k;
|
|
78
|
+
return P ? v.length === 0 && !I ? (l.value.delete(P), he.debug(`Context cleared for blade: ${P}`), { cleared: !0 }) : (l.value.set(P, { items: v, type: A, suggestions: I }), he.debug(`Context set for blade: ${P}, 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
81
|
const v = n ? await n() ?? void 0 : void 0;
|
|
82
82
|
return {
|
|
83
83
|
userId: o()?.id || "",
|
|
84
84
|
locale: s(),
|
|
85
|
-
blade:
|
|
86
|
-
contextType:
|
|
87
|
-
items: te(
|
|
88
|
-
suggestions:
|
|
85
|
+
blade: Ae(t()),
|
|
86
|
+
contextType: d.value,
|
|
87
|
+
items: te(c.value),
|
|
88
|
+
suggestions: u.value ? te(u.value) : void 0,
|
|
89
89
|
accessToken: v
|
|
90
90
|
};
|
|
91
91
|
},
|
|
92
92
|
buildUpdatePayload: async () => {
|
|
93
93
|
const v = n ? await n() ?? void 0 : void 0;
|
|
94
94
|
return {
|
|
95
|
-
blade:
|
|
96
|
-
contextType:
|
|
97
|
-
items: te(
|
|
98
|
-
suggestions:
|
|
95
|
+
blade: Ae(t()),
|
|
96
|
+
contextType: d.value,
|
|
97
|
+
items: te(c.value),
|
|
98
|
+
suggestions: u.value ? te(u.value) : void 0,
|
|
99
99
|
locale: s(),
|
|
100
100
|
accessToken: v
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
|
-
const
|
|
106
|
-
function
|
|
107
|
-
const { getConfig: o, isEmbedded: t, navigateToBlade: s } = e,
|
|
108
|
-
function
|
|
109
|
-
switch (
|
|
105
|
+
const O = W("ai-agent-transport");
|
|
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, E) {
|
|
109
|
+
switch (f) {
|
|
110
110
|
case "NAVIGATE_TO_APP": {
|
|
111
|
-
const
|
|
112
|
-
s &&
|
|
111
|
+
const A = E;
|
|
112
|
+
s && A?.bladeName && (s(A.bladeName, A.param, A.options), O.debug(`Navigation requested to: ${A.bladeName}`));
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
115
|
+
// The panel's own Escape handler listens on the host document, which never sees a
|
|
116
|
+
// keystroke delivered to a cross-origin iframe. So while the chatbot holds focus the
|
|
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.
|
|
119
|
+
case "CLOSE_PANEL": {
|
|
120
|
+
n && (n(), O.debug("Panel close requested by the chatbot"));
|
|
113
121
|
break;
|
|
114
122
|
}
|
|
115
123
|
}
|
|
116
|
-
const
|
|
117
|
-
type:
|
|
118
|
-
payload:
|
|
124
|
+
const v = {
|
|
125
|
+
type: f,
|
|
126
|
+
payload: E,
|
|
119
127
|
timestamp: Date.now()
|
|
120
128
|
};
|
|
121
|
-
d.forEach((
|
|
129
|
+
d.forEach((A) => {
|
|
122
130
|
try {
|
|
123
|
-
v
|
|
131
|
+
A(v);
|
|
124
132
|
} catch (I) {
|
|
125
|
-
|
|
133
|
+
O.error("Handler error:", I);
|
|
126
134
|
}
|
|
127
135
|
});
|
|
128
136
|
}
|
|
129
|
-
function
|
|
130
|
-
const
|
|
131
|
-
if (
|
|
132
|
-
|
|
137
|
+
function C(f) {
|
|
138
|
+
const v = o().allowedOrigins ?? [];
|
|
139
|
+
if (v.length === 0) {
|
|
140
|
+
O.warn(
|
|
133
141
|
"Ignoring postMessage: aiAgentConfig.allowedOrigins is empty. Configure explicit origins to enable the AI agent bridge.",
|
|
134
|
-
{ origin:
|
|
142
|
+
{ origin: f.origin, type: f.data?.type }
|
|
135
143
|
);
|
|
136
144
|
return;
|
|
137
145
|
}
|
|
138
|
-
if (
|
|
139
|
-
|
|
146
|
+
if (v.includes("*")) {
|
|
147
|
+
O.error(
|
|
140
148
|
'Refusing postMessage with wildcard allowedOrigins. Replace "*" with explicit origins (e.g. ["https://chat.example.com"]).'
|
|
141
149
|
);
|
|
142
150
|
return;
|
|
143
151
|
}
|
|
144
|
-
if (!
|
|
152
|
+
if (!v.includes(f.origin))
|
|
153
|
+
return;
|
|
154
|
+
const A = t ? window.parent : l.value?.contentWindow;
|
|
155
|
+
if (!A || f.source !== A)
|
|
145
156
|
return;
|
|
146
|
-
const
|
|
147
|
-
if (!(!
|
|
148
|
-
switch (
|
|
157
|
+
const I = f.data;
|
|
158
|
+
if (!(!I?.type || typeof I.type != "string"))
|
|
159
|
+
switch (O.debug(`Message received: ${I.type}`), I.type) {
|
|
149
160
|
// Embedded: parent forwards chat messages wrapped in AI_CHAT_MESSAGE
|
|
150
161
|
case "AI_CHAT_MESSAGE": {
|
|
151
162
|
if (t) {
|
|
152
|
-
const
|
|
153
|
-
|
|
163
|
+
const k = I.payload;
|
|
164
|
+
k?.type && h(k.type, k.payload);
|
|
154
165
|
}
|
|
155
166
|
return;
|
|
156
167
|
}
|
|
157
168
|
// Normal: chatbot signals it's ready
|
|
158
169
|
case "CHAT_READY":
|
|
159
|
-
u.forEach((
|
|
170
|
+
u.forEach((k) => {
|
|
160
171
|
try {
|
|
161
|
-
|
|
172
|
+
k();
|
|
162
173
|
} catch (P) {
|
|
163
|
-
|
|
174
|
+
O.error("ChatReady handler error:", P);
|
|
164
175
|
}
|
|
165
176
|
});
|
|
166
177
|
break;
|
|
167
178
|
// Normal: direct chat protocol messages
|
|
168
179
|
default:
|
|
169
|
-
|
|
180
|
+
h(I.type, I.payload);
|
|
170
181
|
break;
|
|
171
182
|
}
|
|
172
183
|
}
|
|
173
184
|
return {
|
|
174
|
-
iframeRef:
|
|
175
|
-
pendingInitContext:
|
|
176
|
-
isListenerRegistered:
|
|
177
|
-
setIframeRef(
|
|
178
|
-
|
|
185
|
+
iframeRef: l,
|
|
186
|
+
pendingInitContext: g,
|
|
187
|
+
isListenerRegistered: c,
|
|
188
|
+
setIframeRef(f) {
|
|
189
|
+
l.value = f, O.debug("Iframe ref set:", f ? "available" : "null");
|
|
179
190
|
},
|
|
180
|
-
sendToIframe(
|
|
181
|
-
if (!
|
|
182
|
-
|
|
191
|
+
sendToIframe(f) {
|
|
192
|
+
if (!l.value?.contentWindow) {
|
|
193
|
+
O.warn("Cannot send message: iframe not available");
|
|
183
194
|
return;
|
|
184
195
|
}
|
|
185
|
-
const
|
|
186
|
-
if (!
|
|
187
|
-
|
|
196
|
+
const E = o().allowedOrigins?.[0];
|
|
197
|
+
if (!E || E === "*") {
|
|
198
|
+
O.error(
|
|
188
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.",
|
|
189
|
-
{ type:
|
|
200
|
+
{ type: f.type }
|
|
190
201
|
);
|
|
191
202
|
return;
|
|
192
203
|
}
|
|
193
|
-
|
|
204
|
+
l.value.contentWindow.postMessage(f, E), O.debug(`Sent to iframe: ${f.type}`);
|
|
194
205
|
},
|
|
195
|
-
sendToParent(
|
|
206
|
+
sendToParent(f) {
|
|
196
207
|
if (!window.parent || window.parent === window) {
|
|
197
|
-
|
|
208
|
+
O.warn("Cannot send to parent: not in iframe");
|
|
198
209
|
return;
|
|
199
210
|
}
|
|
200
|
-
const
|
|
201
|
-
if (!
|
|
202
|
-
|
|
211
|
+
const E = o().parentOrigin;
|
|
212
|
+
if (!E || E === "*") {
|
|
213
|
+
O.error(
|
|
203
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.",
|
|
204
|
-
{ type:
|
|
215
|
+
{ type: f.type }
|
|
205
216
|
);
|
|
206
217
|
return;
|
|
207
218
|
}
|
|
208
|
-
window.parent.postMessage(
|
|
219
|
+
window.parent.postMessage(f, E), O.debug(`Sent to parent: ${f.type}`);
|
|
209
220
|
},
|
|
210
221
|
startListening() {
|
|
211
|
-
|
|
222
|
+
c.value || (window.addEventListener("message", C), c.value = !0);
|
|
212
223
|
},
|
|
213
224
|
stopListening() {
|
|
214
|
-
|
|
225
|
+
c.value && (window.removeEventListener("message", C), c.value = !1);
|
|
215
226
|
},
|
|
216
|
-
onChatReady(
|
|
217
|
-
return u.add(
|
|
218
|
-
u.delete(
|
|
227
|
+
onChatReady(f) {
|
|
228
|
+
return u.add(f), () => {
|
|
229
|
+
u.delete(f);
|
|
219
230
|
};
|
|
220
231
|
},
|
|
221
|
-
onMessage(
|
|
222
|
-
return d.add(
|
|
223
|
-
d.delete(
|
|
232
|
+
onMessage(f) {
|
|
233
|
+
return d.add(f), () => {
|
|
234
|
+
d.delete(f);
|
|
224
235
|
};
|
|
225
236
|
}
|
|
226
237
|
};
|
|
227
238
|
}
|
|
228
239
|
const ae = W("ai-agent-service");
|
|
229
|
-
function
|
|
240
|
+
function dt(e) {
|
|
230
241
|
const {
|
|
231
242
|
userGetter: o,
|
|
232
243
|
bladeGetter: t,
|
|
233
244
|
localeGetter: s,
|
|
234
245
|
tokenGetter: n,
|
|
235
|
-
navigateToBlade:
|
|
236
|
-
initialConfig:
|
|
237
|
-
isEmbedded:
|
|
238
|
-
} = e,
|
|
246
|
+
navigateToBlade: l,
|
|
247
|
+
initialConfig: g,
|
|
248
|
+
isEmbedded: c = !1
|
|
249
|
+
} = e, d = L({ ...at, ...g }), u = st(), h = lt({
|
|
239
250
|
userGetter: o,
|
|
240
251
|
bladeGetter: t,
|
|
241
252
|
localeGetter: s,
|
|
242
253
|
tokenGetter: n
|
|
243
|
-
}),
|
|
244
|
-
getConfig: () =>
|
|
245
|
-
isEmbedded:
|
|
246
|
-
navigateToBlade:
|
|
247
|
-
|
|
254
|
+
}), C = ct({
|
|
255
|
+
getConfig: () => d.value,
|
|
256
|
+
isEmbedded: c,
|
|
257
|
+
navigateToBlade: l,
|
|
258
|
+
closePanel: () => u.close()
|
|
259
|
+
}), f = b(() => ({
|
|
248
260
|
user: o(),
|
|
249
261
|
currentBlade: t(),
|
|
250
|
-
items:
|
|
251
|
-
})),
|
|
252
|
-
if (
|
|
253
|
-
|
|
254
|
-
const
|
|
255
|
-
|
|
262
|
+
items: h.contextItems.value
|
|
263
|
+
})), E = async () => {
|
|
264
|
+
if (C.pendingInitContext.value && C.iframeRef.value?.contentWindow) {
|
|
265
|
+
C.pendingInitContext.value = !1, u.isInitialized.value = !0;
|
|
266
|
+
const T = await h.buildInitPayload();
|
|
267
|
+
C.sendToIframe({ type: "INIT_CONTEXT", payload: T }), ae.debug("Flushed pending INIT_CONTEXT");
|
|
256
268
|
}
|
|
257
269
|
};
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
})) : (
|
|
262
|
-
}), q(
|
|
263
|
-
() => ({ currentBlade:
|
|
270
|
+
C.onChatReady(() => {
|
|
271
|
+
C.iframeRef.value?.contentWindow ? (u.isInitialized.value = !0, h.buildInitPayload().then((T) => {
|
|
272
|
+
C.sendToIframe({ type: "INIT_CONTEXT", payload: T }), ae.info("Chatbot ready, sent INIT_CONTEXT");
|
|
273
|
+
})) : (C.pendingInitContext.value = !0, ae.info("Chatbot ready, iframe ref not available yet — pending INIT_CONTEXT"));
|
|
274
|
+
}), q(C.iframeRef, () => E()), q(
|
|
275
|
+
() => ({ currentBlade: f.value.currentBlade, items: f.value.items }),
|
|
264
276
|
async () => {
|
|
265
|
-
if (
|
|
266
|
-
const
|
|
267
|
-
|
|
277
|
+
if (c) {
|
|
278
|
+
const T = await h.buildInitPayload();
|
|
279
|
+
C.sendToParent({ type: "AI_CONTEXT_UPDATE", payload: T });
|
|
268
280
|
return;
|
|
269
281
|
}
|
|
270
|
-
if (
|
|
271
|
-
const
|
|
272
|
-
|
|
282
|
+
if (u.isOpen.value && u.isInitialized.value && C.iframeRef.value?.contentWindow) {
|
|
283
|
+
const T = await h.buildUpdatePayload();
|
|
284
|
+
C.sendToIframe({ type: "UPDATE_CONTEXT", payload: T });
|
|
273
285
|
}
|
|
274
286
|
},
|
|
275
287
|
{ deep: !0 }
|
|
276
288
|
);
|
|
277
|
-
const v = () =>
|
|
278
|
-
|
|
279
|
-
},
|
|
280
|
-
const { cleared: Y } =
|
|
281
|
-
|
|
289
|
+
const v = () => c ? C.sendToParent({ type: "AI_TOGGLE_PANEL" }) : u.open(), A = () => c ? C.sendToParent({ type: "AI_TOGGLE_PANEL" }) : u.close(), I = () => c ? C.sendToParent({ type: "AI_TOGGLE_PANEL" }) : u.toggle(), k = (T) => {
|
|
290
|
+
C.setIframeRef(T), E();
|
|
291
|
+
}, P = (T, R, Z, X) => {
|
|
292
|
+
const { cleared: Y } = h.setContextData(T, R, Z, X);
|
|
293
|
+
c && Y && C.sendToParent({ type: "AI_CONTEXT_CLEAR" });
|
|
282
294
|
};
|
|
283
|
-
return
|
|
295
|
+
return C.startListening(), c && (C.sendToParent({
|
|
284
296
|
type: "EMBEDDED_APP_READY",
|
|
285
297
|
payload: { supportedFeatures: ["ai-agent"] }
|
|
286
298
|
}), ae.info("Embedded mode: sent EMBEDDED_APP_READY to parent")), {
|
|
287
299
|
// State
|
|
288
|
-
panelState:
|
|
289
|
-
config:
|
|
290
|
-
context:
|
|
291
|
-
isOpen:
|
|
292
|
-
isExpanded:
|
|
293
|
-
totalItemsCount:
|
|
300
|
+
panelState: u.panelState,
|
|
301
|
+
config: d,
|
|
302
|
+
context: f,
|
|
303
|
+
isOpen: b(() => !c && u.isOpen.value),
|
|
304
|
+
isExpanded: u.isExpanded,
|
|
305
|
+
totalItemsCount: h.totalItemsCount,
|
|
294
306
|
// Panel control
|
|
295
307
|
openPanel: v,
|
|
296
|
-
closePanel:
|
|
297
|
-
togglePanel:
|
|
298
|
-
expandPanel: () =>
|
|
299
|
-
collapsePanel: () =>
|
|
308
|
+
closePanel: A,
|
|
309
|
+
togglePanel: I,
|
|
310
|
+
expandPanel: () => u.expand(),
|
|
311
|
+
collapsePanel: () => u.collapse(),
|
|
300
312
|
// Configuration
|
|
301
|
-
setConfig: (
|
|
302
|
-
|
|
313
|
+
setConfig: (T) => {
|
|
314
|
+
d.value = { ...d.value, ...T };
|
|
303
315
|
},
|
|
304
316
|
// Communication
|
|
305
|
-
sendMessage: (
|
|
306
|
-
|
|
317
|
+
sendMessage: (T, R) => {
|
|
318
|
+
C.sendToIframe({ type: T, payload: R });
|
|
307
319
|
},
|
|
308
|
-
onMessage:
|
|
320
|
+
onMessage: C.onMessage,
|
|
309
321
|
// Internal API
|
|
310
|
-
iframeRef:
|
|
311
|
-
_setIframeRef:
|
|
312
|
-
_startListening:
|
|
313
|
-
_stopListening:
|
|
314
|
-
_setContextData:
|
|
322
|
+
iframeRef: C.iframeRef,
|
|
323
|
+
_setIframeRef: k,
|
|
324
|
+
_startListening: C.startListening,
|
|
325
|
+
_stopListening: C.stopListening,
|
|
326
|
+
_setContextData: P
|
|
315
327
|
};
|
|
316
328
|
}
|
|
317
329
|
const ut = /* @__PURE__ */ new Set(["mod", "ctrl", "meta", "alt", "shift"]);
|
|
@@ -364,10 +376,10 @@ function ft(e) {
|
|
|
364
376
|
return e in Be ? Be[e] : e.length === 1 ? e.toUpperCase() : e.charAt(0).toUpperCase() + e.slice(1);
|
|
365
377
|
}
|
|
366
378
|
function Ee(e, o) {
|
|
367
|
-
const t = !!e.ctrl || !!e.mod && !o, s = !!e.meta || !!e.mod && o, n = [],
|
|
368
|
-
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 &&
|
|
369
|
-
const
|
|
370
|
-
return { parts: n, aria:
|
|
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("+");
|
|
382
|
+
return { parts: n, aria: g };
|
|
371
383
|
}
|
|
372
384
|
const Ie = {
|
|
373
385
|
backslash: "Backslash",
|
|
@@ -411,8 +423,8 @@ function _t(e, o) {
|
|
|
411
423
|
return s !== void 0 ? o.key === s : !1;
|
|
412
424
|
}
|
|
413
425
|
function Et(e, o, t) {
|
|
414
|
-
const s = !!e.ctrl || !!e.mod && !t, n = !!e.meta || !!e.mod && t,
|
|
415
|
-
return o.ctrlKey !== s || o.metaKey !== n || o.altKey !==
|
|
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);
|
|
416
428
|
}
|
|
417
429
|
const bt = /* @__PURE__ */ new Set([
|
|
418
430
|
"button",
|
|
@@ -425,7 +437,7 @@ const bt = /* @__PURE__ */ new Set([
|
|
|
425
437
|
"range",
|
|
426
438
|
"color"
|
|
427
439
|
]);
|
|
428
|
-
function
|
|
440
|
+
function bn() {
|
|
429
441
|
const e = document.activeElement;
|
|
430
442
|
if (!e) return !1;
|
|
431
443
|
const o = e.tagName;
|
|
@@ -434,51 +446,51 @@ function En() {
|
|
|
434
446
|
const t = e.getAttribute("contenteditable");
|
|
435
447
|
return t === "true" || t === "";
|
|
436
448
|
}
|
|
437
|
-
function
|
|
449
|
+
function wt() {
|
|
438
450
|
return typeof navigator > "u" ? !1 : /Mac|iPhone|iPad|iPod/i.test(navigator.userAgent);
|
|
439
451
|
}
|
|
440
452
|
function Ne() {
|
|
441
|
-
const e =
|
|
453
|
+
const e = wt();
|
|
442
454
|
return {
|
|
443
455
|
hotkey: Q,
|
|
444
456
|
isMac: e,
|
|
445
457
|
formatShortcut: (o) => Ee(o, e)
|
|
446
458
|
};
|
|
447
459
|
}
|
|
448
|
-
let
|
|
449
|
-
function
|
|
450
|
-
|
|
460
|
+
let $e, Fe, Re, At;
|
|
461
|
+
function wn(e) {
|
|
462
|
+
$e = e;
|
|
451
463
|
}
|
|
452
464
|
function An(e) {
|
|
453
|
-
|
|
465
|
+
Fe = e;
|
|
454
466
|
}
|
|
455
|
-
function
|
|
467
|
+
function yn(e) {
|
|
456
468
|
Re = e;
|
|
457
469
|
}
|
|
458
|
-
function
|
|
459
|
-
|
|
470
|
+
function Bn(e) {
|
|
471
|
+
At = e;
|
|
460
472
|
}
|
|
461
473
|
function xe(e, o) {
|
|
462
474
|
if (o.length === 0)
|
|
463
475
|
return { path: e ? `/${e}` : "/", query: {} };
|
|
464
476
|
const t = o[0], s = Se(t.url);
|
|
465
477
|
let n;
|
|
466
|
-
for (let
|
|
467
|
-
if (o[
|
|
468
|
-
n = o[
|
|
478
|
+
for (let c = o.length - 1; c >= 1; c--)
|
|
479
|
+
if (o[c].visible) {
|
|
480
|
+
n = o[c];
|
|
469
481
|
break;
|
|
470
482
|
}
|
|
471
|
-
let
|
|
472
|
-
if (s && (
|
|
473
|
-
const
|
|
474
|
-
|
|
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}`);
|
|
475
487
|
}
|
|
476
|
-
const
|
|
477
|
-
for (const
|
|
478
|
-
|
|
479
|
-
return { path:
|
|
488
|
+
const g = {};
|
|
489
|
+
for (const c of o)
|
|
490
|
+
c.visible && c.query && Object.assign(g, c.query);
|
|
491
|
+
return { path: l || "/", query: g };
|
|
480
492
|
}
|
|
481
|
-
function
|
|
493
|
+
function In(e, o) {
|
|
482
494
|
let t = e.split("/").filter(Boolean);
|
|
483
495
|
return o && t.length > 0 && t[0] === o && (t = t.slice(1)), t.length === 0 ? {} : {
|
|
484
496
|
workspaceUrl: t[0],
|
|
@@ -496,151 +508,151 @@ function Oe(e) {
|
|
|
496
508
|
}
|
|
497
509
|
function yt(e, o) {
|
|
498
510
|
function t() {
|
|
499
|
-
const { path: n, query:
|
|
500
|
-
e.push({ path: n, query:
|
|
511
|
+
const { path: n, query: l } = xe(Oe(e), o.blades.value);
|
|
512
|
+
e.push({ path: n, query: l });
|
|
501
513
|
}
|
|
502
514
|
function s() {
|
|
503
|
-
const { path: n, query:
|
|
504
|
-
e.replace({ path: n, query:
|
|
515
|
+
const { path: n, query: l } = xe(Oe(e), o.blades.value);
|
|
516
|
+
e.replace({ path: n, query: l });
|
|
505
517
|
}
|
|
506
518
|
return { syncUrlPush: t, syncUrlReplace: s };
|
|
507
519
|
}
|
|
508
520
|
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.";
|
|
509
|
-
function
|
|
521
|
+
function y(e) {
|
|
510
522
|
throw new Error(`[vc-shell] ${e} requires blade context.
|
|
511
523
|
${Bt}`);
|
|
512
524
|
}
|
|
513
525
|
function It() {
|
|
514
|
-
const e = (ee() ?
|
|
526
|
+
const e = (ee() ? $(De, void 0) : void 0) ?? Fe, o = (ee() ? $(We, void 0) : void 0) ?? Re;
|
|
515
527
|
if (!e || !o)
|
|
516
528
|
throw new Error(
|
|
517
529
|
"[vc-shell] useBlade() failed: BladeStack or BladeMessaging not available. Ensure BladeNavigationPlugin (plugin-v2) is installed."
|
|
518
530
|
);
|
|
519
|
-
const t = e, s = o, n = ee() ?
|
|
520
|
-
let
|
|
521
|
-
function
|
|
522
|
-
if (
|
|
523
|
-
const r =
|
|
524
|
-
return r && (
|
|
531
|
+
const t = e, s = o, n = ee() ? $(Ze, void 0) : void 0, l = ee() ? $(Xe, void 0) : void 0;
|
|
532
|
+
let g;
|
|
533
|
+
function c() {
|
|
534
|
+
if (g) return g;
|
|
535
|
+
const r = $e?.router;
|
|
536
|
+
return r && (g = yt(r, t)), g;
|
|
525
537
|
}
|
|
526
|
-
const
|
|
538
|
+
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(() => {
|
|
527
539
|
if (!n) return;
|
|
528
540
|
const r = n.value.id;
|
|
529
|
-
return t.blades.value.find((
|
|
541
|
+
return t.blades.value.find((m) => m.parentId === r)?.param;
|
|
530
542
|
});
|
|
531
|
-
let
|
|
532
|
-
function
|
|
533
|
-
if (
|
|
543
|
+
let I = !1;
|
|
544
|
+
function k(r) {
|
|
545
|
+
if (I) {
|
|
534
546
|
console.warn(
|
|
535
547
|
"[vc-shell] provideBladeData() called more than once in the same blade. Only the first call takes effect."
|
|
536
548
|
);
|
|
537
549
|
return;
|
|
538
550
|
}
|
|
539
|
-
|
|
540
|
-
const
|
|
541
|
-
ke(Ye,
|
|
551
|
+
I = !0;
|
|
552
|
+
const m = Ve(r) ? r : L(r);
|
|
553
|
+
ke(Ye, m);
|
|
542
554
|
}
|
|
543
|
-
async function
|
|
544
|
-
const { isWorkspace:
|
|
545
|
-
if (
|
|
546
|
-
await t.openWorkspace(
|
|
555
|
+
async function P(r) {
|
|
556
|
+
const { isWorkspace: m, ...D } = r;
|
|
557
|
+
if (m)
|
|
558
|
+
await t.openWorkspace(D);
|
|
547
559
|
else {
|
|
548
|
-
const
|
|
549
|
-
|
|
560
|
+
const N = n?.value.id;
|
|
561
|
+
N ? await t.openBlade({ ...D, parentId: N }) : await t.openBlade(D);
|
|
550
562
|
}
|
|
551
|
-
t.activeBlade.value?.url &&
|
|
563
|
+
t.activeBlade.value?.url && c()?.syncUrlPush();
|
|
552
564
|
}
|
|
553
|
-
async function
|
|
554
|
-
n ||
|
|
565
|
+
async function T() {
|
|
566
|
+
n || y("closeSelf()");
|
|
555
567
|
const r = await t.closeBlade(n.value.id);
|
|
556
|
-
return r ||
|
|
568
|
+
return r || c()?.syncUrlReplace(), r;
|
|
557
569
|
}
|
|
558
570
|
async function R() {
|
|
559
|
-
n ||
|
|
571
|
+
n || y("closeChildren()"), await t.closeChildren(n.value.id), c()?.syncUrlReplace();
|
|
560
572
|
}
|
|
561
573
|
async function Z(r) {
|
|
562
|
-
n ||
|
|
574
|
+
n || y("replaceWith()"), await t.replaceCurrentBlade({
|
|
563
575
|
...r,
|
|
564
576
|
parentId: n.value.parentId
|
|
565
|
-
}), t.activeBlade.value?.url &&
|
|
577
|
+
}), t.activeBlade.value?.url && c()?.syncUrlReplace();
|
|
566
578
|
}
|
|
567
579
|
async function X(r) {
|
|
568
|
-
n ||
|
|
580
|
+
n || y("coverWith()"), await t.coverCurrentBlade({
|
|
569
581
|
...r,
|
|
570
582
|
parentId: n.value.parentId
|
|
571
|
-
}), t.activeBlade.value?.url &&
|
|
583
|
+
}), t.activeBlade.value?.url && c()?.syncUrlPush();
|
|
572
584
|
}
|
|
573
|
-
async function Y(r,
|
|
574
|
-
return n ||
|
|
585
|
+
async function Y(r, m) {
|
|
586
|
+
return n || y("callParent()"), s.callParent(n.value.id, r, m);
|
|
575
587
|
}
|
|
576
588
|
function le(r) {
|
|
577
|
-
n ||
|
|
578
|
-
}
|
|
579
|
-
function de(r) {
|
|
580
|
-
n || w("onBeforeClose()"), t.registerBeforeClose(n.value.id, r);
|
|
589
|
+
n || y("exposeToChildren()"), s.exposeToChildren(n.value.id, r);
|
|
581
590
|
}
|
|
582
591
|
function ce(r) {
|
|
583
|
-
n ||
|
|
592
|
+
n || y("onBeforeClose()"), t.registerBeforeClose(n.value.id, r);
|
|
593
|
+
}
|
|
594
|
+
function de(r) {
|
|
595
|
+
n || y("setError()"), t.setBladeError(n.value.id, r);
|
|
584
596
|
}
|
|
585
597
|
function j() {
|
|
586
|
-
n ||
|
|
598
|
+
n || y("clearError()"), t.clearBladeError(n.value.id);
|
|
587
599
|
}
|
|
588
600
|
let ue = 0;
|
|
589
601
|
function pe(r) {
|
|
590
|
-
|
|
591
|
-
const
|
|
592
|
-
return
|
|
602
|
+
l || y("addBanner()");
|
|
603
|
+
const m = `banner-${n.value.id}-${++ue}`;
|
|
604
|
+
return l.value.push({
|
|
593
605
|
...r,
|
|
594
|
-
id:
|
|
606
|
+
id: m,
|
|
595
607
|
dismissible: r.dismissible ?? !1
|
|
596
|
-
}),
|
|
608
|
+
}), m;
|
|
597
609
|
}
|
|
598
610
|
function fe(r) {
|
|
599
|
-
|
|
611
|
+
l || y("removeBanner()"), l.value = l.value.filter((m) => m.id !== r);
|
|
600
612
|
}
|
|
601
613
|
function ge() {
|
|
602
|
-
|
|
614
|
+
l || y("clearBanners()"), l.value = l.value.filter((r) => r._system);
|
|
603
615
|
}
|
|
604
616
|
let a = !1, i = !1;
|
|
605
617
|
function p(r) {
|
|
606
|
-
if (n ||
|
|
618
|
+
if (n || y("onActivated()"), a) {
|
|
607
619
|
console.warn("[useBlade] onActivated() already registered in this blade.");
|
|
608
620
|
return;
|
|
609
621
|
}
|
|
610
|
-
a = !0, q(
|
|
611
|
-
|
|
622
|
+
a = !0, q(E, (m) => {
|
|
623
|
+
m && r();
|
|
612
624
|
});
|
|
613
625
|
}
|
|
614
|
-
function
|
|
615
|
-
if (n ||
|
|
626
|
+
function _(r) {
|
|
627
|
+
if (n || y("onDeactivated()"), i) {
|
|
616
628
|
console.warn("[useBlade] onDeactivated() already registered in this blade.");
|
|
617
629
|
return;
|
|
618
630
|
}
|
|
619
|
-
i = !0, q(
|
|
620
|
-
|
|
631
|
+
i = !0, q(E, (m) => {
|
|
632
|
+
m || r();
|
|
621
633
|
});
|
|
622
634
|
}
|
|
623
635
|
return {
|
|
624
|
-
id:
|
|
625
|
-
param:
|
|
626
|
-
activeChildParam:
|
|
627
|
-
options:
|
|
628
|
-
query:
|
|
629
|
-
closable:
|
|
630
|
-
expanded:
|
|
636
|
+
id: d,
|
|
637
|
+
param: u,
|
|
638
|
+
activeChildParam: A,
|
|
639
|
+
options: h,
|
|
640
|
+
query: C,
|
|
641
|
+
closable: f,
|
|
642
|
+
expanded: E,
|
|
631
643
|
name: v,
|
|
632
|
-
provideBladeData:
|
|
633
|
-
openBlade:
|
|
634
|
-
closeSelf:
|
|
644
|
+
provideBladeData: k,
|
|
645
|
+
openBlade: P,
|
|
646
|
+
closeSelf: T,
|
|
635
647
|
closeChildren: R,
|
|
636
648
|
replaceWith: Z,
|
|
637
649
|
coverWith: X,
|
|
638
650
|
callParent: Y,
|
|
639
651
|
exposeToChildren: le,
|
|
640
|
-
onBeforeClose:
|
|
652
|
+
onBeforeClose: ce,
|
|
641
653
|
onActivated: p,
|
|
642
|
-
onDeactivated:
|
|
643
|
-
setError:
|
|
654
|
+
onDeactivated: _,
|
|
655
|
+
setError: de,
|
|
644
656
|
clearError: j,
|
|
645
657
|
addBanner: pe,
|
|
646
658
|
removeBanner: fe,
|
|
@@ -698,24 +710,24 @@ let kt = 0;
|
|
|
698
710
|
function Pt() {
|
|
699
711
|
return `blade_${++kt}_${Math.random().toString(36).slice(2, 8)}`;
|
|
700
712
|
}
|
|
701
|
-
function
|
|
702
|
-
const t =
|
|
713
|
+
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(() => {
|
|
703
715
|
for (let a = t.value.length - 1; a >= 0; a--)
|
|
704
716
|
if (t.value[a].visible) return t.value[a];
|
|
705
717
|
});
|
|
706
|
-
function
|
|
707
|
-
s.delete(a), n.delete(a),
|
|
718
|
+
function h(a) {
|
|
719
|
+
s.delete(a), n.delete(a), l.delete(a), g.delete(a);
|
|
708
720
|
}
|
|
709
|
-
function
|
|
721
|
+
function C(a) {
|
|
710
722
|
const i = e.getBlade(a);
|
|
711
723
|
if (i)
|
|
712
724
|
return i.route;
|
|
713
725
|
}
|
|
714
|
-
const
|
|
726
|
+
const f = {
|
|
715
727
|
generateId: Pt,
|
|
716
|
-
resolveUrl:
|
|
728
|
+
resolveUrl: C
|
|
717
729
|
};
|
|
718
|
-
async function
|
|
730
|
+
async function E(a) {
|
|
719
731
|
for (let i = a.length - 1; i >= 0; i--) {
|
|
720
732
|
const p = s.get(a[i].id);
|
|
721
733
|
if (p && await p())
|
|
@@ -725,10 +737,10 @@ function In(e, o) {
|
|
|
725
737
|
}
|
|
726
738
|
function v(a) {
|
|
727
739
|
for (const i of a)
|
|
728
|
-
|
|
740
|
+
l.get(i.id)?.(), h(i.id);
|
|
729
741
|
}
|
|
730
|
-
async function
|
|
731
|
-
if (
|
|
742
|
+
async function A(a) {
|
|
743
|
+
if (c.value?.name === a.name) return;
|
|
732
744
|
const p = e.getBlade(a.name);
|
|
733
745
|
if (!p)
|
|
734
746
|
throw new Error(`[BladeStack] Blade '${a.name}' not found in registry`);
|
|
@@ -737,79 +749,79 @@ function In(e, o) {
|
|
|
737
749
|
return;
|
|
738
750
|
}
|
|
739
751
|
v([...t.value]);
|
|
740
|
-
const
|
|
741
|
-
t.value = [
|
|
752
|
+
const _ = Tt(a, f);
|
|
753
|
+
t.value = [_], a.onOpen && n.set(_.id, a.onOpen), a.onClose && l.set(_.id, a.onClose), a.onOpen?.();
|
|
742
754
|
}
|
|
743
|
-
async function
|
|
755
|
+
async function I(a) {
|
|
744
756
|
if (!e.getBlade(a.name))
|
|
745
757
|
throw new Error(`[BladeStack] Blade '${a.name}' not found in registry`);
|
|
746
|
-
const i = a.parentId ??
|
|
758
|
+
const i = a.parentId ?? u.value?.id ?? c.value?.id;
|
|
747
759
|
if (!i)
|
|
748
760
|
throw new Error("[BladeStack] Cannot open blade: no parent blade found");
|
|
749
|
-
const p = t.value.findIndex((
|
|
761
|
+
const p = t.value.findIndex((m) => m.id === i);
|
|
750
762
|
if (p === -1)
|
|
751
763
|
throw new Error(`[BladeStack] Parent blade '${i}' not found in stack`);
|
|
752
|
-
const
|
|
753
|
-
if (
|
|
764
|
+
const _ = t.value.slice(p + 1);
|
|
765
|
+
if (_.length > 0 && await E(_))
|
|
754
766
|
return;
|
|
755
|
-
v(
|
|
756
|
-
const r = xt(a, i,
|
|
757
|
-
t.value = [...t.value.slice(0, p + 1), r], a.onOpen && n.set(r.id, a.onOpen), a.onClose &&
|
|
767
|
+
v(_);
|
|
768
|
+
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?.();
|
|
758
770
|
}
|
|
759
|
-
async function
|
|
760
|
-
const i = t.value.findIndex((
|
|
771
|
+
async function k(a) {
|
|
772
|
+
const i = t.value.findIndex((m) => m.id === a);
|
|
761
773
|
if (i === -1 || i === 0) return !1;
|
|
762
774
|
const p = t.value.slice(i);
|
|
763
|
-
if (await
|
|
775
|
+
if (await E(p)) return !0;
|
|
764
776
|
v(p), t.value = t.value.slice(0, i);
|
|
765
777
|
const r = t.value.length - 1;
|
|
766
778
|
if (r > 0 && !t.value[r].visible) {
|
|
767
|
-
const
|
|
768
|
-
|
|
779
|
+
const m = [...t.value];
|
|
780
|
+
m[r] = { ...m[r], visible: !0 }, t.value = m;
|
|
769
781
|
}
|
|
770
782
|
return !1;
|
|
771
783
|
}
|
|
772
|
-
async function
|
|
773
|
-
const i =
|
|
784
|
+
async function P(a) {
|
|
785
|
+
const i = u.value;
|
|
774
786
|
if (!i)
|
|
775
787
|
throw new Error("[BladeStack] No active blade to replace");
|
|
776
788
|
if (!e.getBlade(a.name))
|
|
777
789
|
throw new Error(`[BladeStack] Blade '${a.name}' not found in registry`);
|
|
778
|
-
const p = t.value.findIndex((
|
|
790
|
+
const p = t.value.findIndex((D) => D.id === i.id);
|
|
779
791
|
if (p === -1)
|
|
780
792
|
throw new Error(`[BladeStack] Active blade '${i.id}' not found in stack`);
|
|
781
|
-
const
|
|
782
|
-
if (
|
|
783
|
-
if (await _
|
|
784
|
-
v(
|
|
793
|
+
const _ = t.value.slice(p + 1);
|
|
794
|
+
if (_.length > 0) {
|
|
795
|
+
if (await E(_)) return;
|
|
796
|
+
v(_);
|
|
785
797
|
}
|
|
786
|
-
const r = St(a, i.parentId,
|
|
798
|
+
const r = St(a, i.parentId, f);
|
|
787
799
|
v([i]);
|
|
788
|
-
const
|
|
789
|
-
t.value =
|
|
800
|
+
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?.();
|
|
790
802
|
}
|
|
791
|
-
async function
|
|
792
|
-
const i =
|
|
803
|
+
async function T(a) {
|
|
804
|
+
const i = u.value;
|
|
793
805
|
if (!i)
|
|
794
806
|
throw new Error("[BladeStack] No active blade to cover");
|
|
795
807
|
if (!e.getBlade(a.name))
|
|
796
808
|
throw new Error(`[BladeStack] Blade '${a.name}' not found in registry`);
|
|
797
|
-
const p = t.value.findIndex((
|
|
809
|
+
const p = t.value.findIndex((D) => D.id === i.id);
|
|
798
810
|
if (p === -1)
|
|
799
811
|
throw new Error(`[BladeStack] Active blade '${i.id}' not found in stack`);
|
|
800
|
-
const
|
|
801
|
-
if (
|
|
802
|
-
if (await _
|
|
803
|
-
v(
|
|
812
|
+
const _ = t.value.slice(p + 1);
|
|
813
|
+
if (_.length > 0) {
|
|
814
|
+
if (await E(_)) return;
|
|
815
|
+
v(_);
|
|
804
816
|
}
|
|
805
|
-
const r = Ot(a, i.id,
|
|
806
|
-
|
|
817
|
+
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?.();
|
|
807
819
|
}
|
|
808
820
|
async function R(a) {
|
|
809
821
|
const i = t.value.findIndex((r) => r.id === a);
|
|
810
822
|
if (i === -1) return;
|
|
811
823
|
const p = t.value.slice(i + 1);
|
|
812
|
-
p.length === 0 || await
|
|
824
|
+
p.length === 0 || await E(p) || (v(p), t.value = t.value.slice(0, i + 1));
|
|
813
825
|
}
|
|
814
826
|
function Z(a, i) {
|
|
815
827
|
s.set(a, i);
|
|
@@ -820,39 +832,39 @@ function In(e, o) {
|
|
|
820
832
|
function Y(a, i) {
|
|
821
833
|
const p = t.value.findIndex((r) => r.id === a);
|
|
822
834
|
if (p === -1) return;
|
|
823
|
-
const
|
|
824
|
-
|
|
835
|
+
const _ = [...t.value];
|
|
836
|
+
_[p] = { ..._[p], error: i }, t.value = _;
|
|
825
837
|
}
|
|
826
838
|
function le(a) {
|
|
827
|
-
const i = t.value.findIndex((
|
|
839
|
+
const i = t.value.findIndex((_) => _.id === a);
|
|
828
840
|
if (i === -1) return;
|
|
829
841
|
const p = [...t.value];
|
|
830
842
|
p[i] = { ...p[i], error: void 0 }, t.value = p;
|
|
831
843
|
}
|
|
832
|
-
function
|
|
844
|
+
function ce(a, i) {
|
|
833
845
|
const p = t.value.findIndex((r) => r.id === a);
|
|
834
846
|
if (p === -1 || t.value[p].title === i) return;
|
|
835
|
-
const
|
|
836
|
-
|
|
847
|
+
const _ = [...t.value];
|
|
848
|
+
_[p] = { ..._[p], title: i }, t.value = _;
|
|
837
849
|
}
|
|
838
|
-
function
|
|
839
|
-
const p = t.value.findIndex((
|
|
850
|
+
function de(a, i) {
|
|
851
|
+
const p = t.value.findIndex((N) => N.id === a);
|
|
840
852
|
if (p === -1) return;
|
|
841
|
-
const
|
|
842
|
-
for (const [
|
|
843
|
-
ve === "" || ve == null ? delete r[
|
|
844
|
-
const
|
|
845
|
-
if (
|
|
853
|
+
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]))
|
|
846
858
|
return;
|
|
847
859
|
const J = [...t.value];
|
|
848
860
|
J[p] = { ...J[p], query: r }, t.value = J;
|
|
849
861
|
}
|
|
850
862
|
function j(a) {
|
|
851
|
-
let i =
|
|
852
|
-
return i || (i =
|
|
863
|
+
let i = g.get(a);
|
|
864
|
+
return i || (i = L(!1), g.set(a, i)), i;
|
|
853
865
|
}
|
|
854
866
|
function ue(a) {
|
|
855
|
-
return
|
|
867
|
+
return g.get(a)?.value ?? !1;
|
|
856
868
|
}
|
|
857
869
|
function pe(a, i) {
|
|
858
870
|
j(a).value = i;
|
|
@@ -863,25 +875,25 @@ function In(e, o) {
|
|
|
863
875
|
}
|
|
864
876
|
function ge(a) {
|
|
865
877
|
for (const i of t.value)
|
|
866
|
-
|
|
878
|
+
h(i.id);
|
|
867
879
|
t.value = a;
|
|
868
880
|
}
|
|
869
881
|
return {
|
|
870
|
-
workspace:
|
|
871
|
-
blades:
|
|
872
|
-
activeBlade:
|
|
873
|
-
openWorkspace:
|
|
874
|
-
openBlade:
|
|
875
|
-
closeBlade:
|
|
882
|
+
workspace: c,
|
|
883
|
+
blades: d,
|
|
884
|
+
activeBlade: u,
|
|
885
|
+
openWorkspace: A,
|
|
886
|
+
openBlade: I,
|
|
887
|
+
closeBlade: k,
|
|
876
888
|
closeChildren: R,
|
|
877
|
-
replaceCurrentBlade:
|
|
878
|
-
coverCurrentBlade:
|
|
889
|
+
replaceCurrentBlade: P,
|
|
890
|
+
coverCurrentBlade: T,
|
|
879
891
|
registerBeforeClose: Z,
|
|
880
892
|
unregisterBeforeClose: X,
|
|
881
893
|
setBladeError: Y,
|
|
882
894
|
clearBladeError: le,
|
|
883
|
-
setBladeTitle:
|
|
884
|
-
updateBladeQuery:
|
|
895
|
+
setBladeTitle: ce,
|
|
896
|
+
updateBladeQuery: de,
|
|
885
897
|
getMaximizedRef: j,
|
|
886
898
|
isMaximized: ue,
|
|
887
899
|
setMaximized: pe,
|
|
@@ -890,14 +902,14 @@ function In(e, o) {
|
|
|
890
902
|
};
|
|
891
903
|
}
|
|
892
904
|
function Mt() {
|
|
893
|
-
const e =
|
|
905
|
+
const e = $(De);
|
|
894
906
|
if (!e)
|
|
895
907
|
throw new Error("[useBladeStack] BladeStack not found. Ensure BladeNavigationPlugin is installed.");
|
|
896
908
|
return e;
|
|
897
909
|
}
|
|
898
910
|
const V = W("use-ai-agent");
|
|
899
|
-
function
|
|
900
|
-
const o =
|
|
911
|
+
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({
|
|
901
913
|
userGetter: () => {
|
|
902
914
|
if (t.value)
|
|
903
915
|
return {
|
|
@@ -908,47 +920,47 @@ function Tn(e) {
|
|
|
908
920
|
};
|
|
909
921
|
},
|
|
910
922
|
bladeGetter: () => {
|
|
911
|
-
const
|
|
912
|
-
return
|
|
913
|
-
id:
|
|
914
|
-
name:
|
|
915
|
-
title:
|
|
916
|
-
param:
|
|
917
|
-
options:
|
|
923
|
+
const h = g.value ?? l.value[l.value.length - 1];
|
|
924
|
+
return h ? {
|
|
925
|
+
id: h.id,
|
|
926
|
+
name: h.name,
|
|
927
|
+
title: h.title,
|
|
928
|
+
param: h.param,
|
|
929
|
+
options: h.options
|
|
918
930
|
} : null;
|
|
919
931
|
},
|
|
920
932
|
localeGetter: () => o?.currentLocale.value ?? "en",
|
|
921
933
|
tokenGetter: s,
|
|
922
|
-
navigateToBlade: (
|
|
923
|
-
n({ name:
|
|
924
|
-
V.debug(`Navigated to blade: ${
|
|
925
|
-
}).catch((
|
|
926
|
-
V.warn(`Blade not found or cannot be opened: ${
|
|
934
|
+
navigateToBlade: (h, C, f) => {
|
|
935
|
+
n({ name: h, param: C, options: f }).then(() => {
|
|
936
|
+
V.debug(`Navigated to blade: ${h}`);
|
|
937
|
+
}).catch((E) => {
|
|
938
|
+
V.warn(`Blade not found or cannot be opened: ${h}`, E);
|
|
927
939
|
});
|
|
928
940
|
},
|
|
929
941
|
initialConfig: e?.config,
|
|
930
|
-
isEmbedded:
|
|
942
|
+
isEmbedded: c
|
|
931
943
|
});
|
|
932
|
-
if (ke(be,
|
|
933
|
-
const
|
|
934
|
-
|
|
944
|
+
if (ke(be, d), V.debug("AiAgentService provided"), e?.addGlobalToolbarButton ?? !0) {
|
|
945
|
+
const h = $(Je, null);
|
|
946
|
+
h ? (h.registerToolbarItem(
|
|
935
947
|
{
|
|
936
948
|
id: ot,
|
|
937
949
|
icon: rt,
|
|
938
950
|
title: it,
|
|
939
951
|
shortcut: Q.mod.i,
|
|
940
952
|
clickHandler: () => {
|
|
941
|
-
|
|
953
|
+
d.togglePanel();
|
|
942
954
|
}
|
|
943
955
|
},
|
|
944
956
|
"*"
|
|
945
957
|
// Wildcard for all blades
|
|
946
958
|
), V.debug("Global AI toolbar button registered with wildcard '*'")) : V.warn("Toolbar service not available, AI button not registered");
|
|
947
959
|
}
|
|
948
|
-
return
|
|
960
|
+
return d;
|
|
949
961
|
}
|
|
950
|
-
function
|
|
951
|
-
const e =
|
|
962
|
+
function Sn() {
|
|
963
|
+
const e = $(be);
|
|
952
964
|
if (!e) {
|
|
953
965
|
V.error("AiAgentService not found. Did you forget to call provideAiAgentService()?");
|
|
954
966
|
return;
|
|
@@ -974,7 +986,7 @@ function xn() {
|
|
|
974
986
|
onMessage: e.onMessage
|
|
975
987
|
};
|
|
976
988
|
}
|
|
977
|
-
function
|
|
989
|
+
function On(e) {
|
|
978
990
|
return {
|
|
979
991
|
id: "ai-agent-toggle",
|
|
980
992
|
icon: e?.icon ?? "lucide-sparkles",
|
|
@@ -988,7 +1000,7 @@ const Dt = ["width", "height"], Lt = ["clip-path"], Nt = {
|
|
|
988
1000
|
key: 1,
|
|
989
1001
|
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",
|
|
990
1002
|
fill: "url(#virto-oz-gradient-animated)"
|
|
991
|
-
},
|
|
1003
|
+
}, $t = ["id"], Ft = {
|
|
992
1004
|
key: 1,
|
|
993
1005
|
id: "virto-oz-gradient-animated",
|
|
994
1006
|
gradientUnits: "userSpaceOnUse",
|
|
@@ -1004,8 +1016,8 @@ const Dt = ["width", "height"], Lt = ["clip-path"], Nt = {
|
|
|
1004
1016
|
animated: { type: Boolean, default: !1 }
|
|
1005
1017
|
},
|
|
1006
1018
|
setup(e) {
|
|
1007
|
-
const o =
|
|
1008
|
-
return (t, s) => (
|
|
1019
|
+
const o = b(() => `virto-oz-clip-${Math.random().toString(36).substring(2, 11)}`);
|
|
1020
|
+
return (t, s) => (B(), S("svg", {
|
|
1009
1021
|
width: e.width,
|
|
1010
1022
|
height: e.height,
|
|
1011
1023
|
viewBox: "0 0 99 108",
|
|
@@ -1013,22 +1025,22 @@ const Dt = ["width", "height"], Lt = ["clip-path"], Nt = {
|
|
|
1013
1025
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1014
1026
|
class: "vc-virto-oz-logo"
|
|
1015
1027
|
}, [
|
|
1016
|
-
s[3] || (s[3] =
|
|
1028
|
+
s[3] || (s[3] = w("path", {
|
|
1017
1029
|
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",
|
|
1018
1030
|
fill: "white"
|
|
1019
1031
|
}, null, -1)),
|
|
1020
|
-
e.animated ? (
|
|
1032
|
+
e.animated ? (B(), S("path", Nt)) : (B(), S("g", {
|
|
1021
1033
|
key: 0,
|
|
1022
1034
|
"clip-path": `url(#${o.value})`
|
|
1023
1035
|
}, [...s[0] || (s[0] = [
|
|
1024
|
-
|
|
1025
|
-
|
|
1036
|
+
w("g", { transform: "matrix(0 -0.161514 0.160417 0 49.1357 53.9479)" }, [
|
|
1037
|
+
w("foreignObject", {
|
|
1026
1038
|
x: "-334.01",
|
|
1027
1039
|
y: "-334.01",
|
|
1028
1040
|
width: "668.02",
|
|
1029
1041
|
height: "668.02"
|
|
1030
1042
|
}, [
|
|
1031
|
-
|
|
1043
|
+
w("div", {
|
|
1032
1044
|
xmlns: "http://www.w3.org/1999/xhtml",
|
|
1033
1045
|
style: { background: `conic-gradient(
|
|
1034
1046
|
from 90deg,
|
|
@@ -1043,39 +1055,39 @@ const Dt = ["width", "height"], Lt = ["clip-path"], Nt = {
|
|
|
1043
1055
|
])
|
|
1044
1056
|
], -1)
|
|
1045
1057
|
])], 8, Lt)),
|
|
1046
|
-
s[4] || (s[4] =
|
|
1058
|
+
s[4] || (s[4] = w("path", {
|
|
1047
1059
|
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",
|
|
1048
1060
|
fill: "white"
|
|
1049
1061
|
}, null, -1)),
|
|
1050
|
-
s[5] || (s[5] =
|
|
1062
|
+
s[5] || (s[5] = w("ellipse", {
|
|
1051
1063
|
cx: "49.12",
|
|
1052
1064
|
cy: "54.09",
|
|
1053
1065
|
rx: "4.05",
|
|
1054
1066
|
ry: "4.05",
|
|
1055
1067
|
fill: "#6C6C6C"
|
|
1056
1068
|
}, null, -1)),
|
|
1057
|
-
s[6] || (s[6] =
|
|
1069
|
+
s[6] || (s[6] = w("ellipse", {
|
|
1058
1070
|
cx: "60.62",
|
|
1059
1071
|
cy: "54.09",
|
|
1060
1072
|
rx: "4.05",
|
|
1061
1073
|
ry: "4.05",
|
|
1062
1074
|
fill: "#6C6C6C"
|
|
1063
1075
|
}, null, -1)),
|
|
1064
|
-
s[7] || (s[7] =
|
|
1076
|
+
s[7] || (s[7] = w("ellipse", {
|
|
1065
1077
|
cx: "37.62",
|
|
1066
1078
|
cy: "54.09",
|
|
1067
1079
|
rx: "4.05",
|
|
1068
1080
|
ry: "4.05",
|
|
1069
1081
|
fill: "#6C6C6C"
|
|
1070
1082
|
}, null, -1)),
|
|
1071
|
-
|
|
1072
|
-
e.animated ? z("", !0) : (
|
|
1083
|
+
w("defs", null, [
|
|
1084
|
+
e.animated ? z("", !0) : (B(), S("clipPath", {
|
|
1073
1085
|
key: 0,
|
|
1074
1086
|
id: o.value
|
|
1075
1087
|
}, [...s[1] || (s[1] = [
|
|
1076
|
-
|
|
1077
|
-
])], 8,
|
|
1078
|
-
e.animated ? (
|
|
1088
|
+
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
|
+
])], 8, $t)),
|
|
1090
|
+
e.animated ? (B(), S("linearGradient", Ft, [...s[2] || (s[2] = [
|
|
1079
1091
|
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)
|
|
1080
1092
|
])])) : z("", !0)
|
|
1081
1093
|
])
|
|
@@ -1091,10 +1103,10 @@ const Dt = ["width", "height"], Lt = ["clip-path"], Nt = {
|
|
|
1091
1103
|
separated: { type: Boolean, default: !1 }
|
|
1092
1104
|
},
|
|
1093
1105
|
setup(e) {
|
|
1094
|
-
return (o, t) => (
|
|
1095
|
-
(
|
|
1096
|
-
e.separated && n > 0 ? (
|
|
1097
|
-
|
|
1106
|
+
return (o, t) => (B(), S("span", Rt, [
|
|
1107
|
+
(B(!0), S(we, null, qe(e.parts, (s, n) => (B(), S(we, { key: n }, [
|
|
1108
|
+
e.separated && n > 0 ? (B(), S("span", Ut, "+")) : z("", !0),
|
|
1109
|
+
w("kbd", Gt, K(s), 1)
|
|
1098
1110
|
], 64))), 128))
|
|
1099
1111
|
]));
|
|
1100
1112
|
}
|
|
@@ -1107,106 +1119,106 @@ const Dt = ["width", "height"], Lt = ["clip-path"], Nt = {
|
|
|
1107
1119
|
},
|
|
1108
1120
|
emits: ["close", "expand", "collapse"],
|
|
1109
1121
|
setup(e) {
|
|
1110
|
-
const { t: o } = nt(), { isMac: t } = Ne(), s =
|
|
1111
|
-
return (
|
|
1112
|
-
|
|
1113
|
-
|
|
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) => (B(), S("div", Vt, [
|
|
1124
|
+
w("div", Kt, [
|
|
1125
|
+
M(Ue, {
|
|
1114
1126
|
width: 22,
|
|
1115
1127
|
height: 24,
|
|
1116
1128
|
"show-dots": ""
|
|
1117
1129
|
})
|
|
1118
1130
|
]),
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1131
|
+
w("div", qt, [
|
|
1132
|
+
w("div", zt, [
|
|
1133
|
+
w("div", Ht, K(e.title), 1)
|
|
1122
1134
|
])
|
|
1123
1135
|
]),
|
|
1124
|
-
|
|
1125
|
-
e.isExpanded ? (
|
|
1136
|
+
w("div", Wt, [
|
|
1137
|
+
e.isExpanded ? (B(), se(x(me), {
|
|
1126
1138
|
key: 0,
|
|
1127
1139
|
placement: "bottom"
|
|
1128
1140
|
}, {
|
|
1129
1141
|
tooltip: F(() => [
|
|
1130
|
-
|
|
1131
|
-
Ce(K(
|
|
1132
|
-
|
|
1142
|
+
w("span", Xt, [
|
|
1143
|
+
Ce(K(x(o)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.RESTORE")) + " ", 1),
|
|
1144
|
+
M(_e, {
|
|
1133
1145
|
parts: n.value.parts,
|
|
1134
|
-
separated: !
|
|
1146
|
+
separated: !x(t)
|
|
1135
1147
|
}, null, 8, ["parts", "separated"])
|
|
1136
1148
|
])
|
|
1137
1149
|
]),
|
|
1138
1150
|
default: F(() => [
|
|
1139
|
-
|
|
1151
|
+
w("div", {
|
|
1140
1152
|
class: "vc-ai-agent-header__button",
|
|
1141
1153
|
role: "button",
|
|
1142
1154
|
tabindex: "0",
|
|
1143
|
-
"aria-label":
|
|
1144
|
-
"aria-keyshortcuts":
|
|
1145
|
-
onClick:
|
|
1155
|
+
"aria-label": x(o)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.RESTORE"),
|
|
1156
|
+
"aria-keyshortcuts": g.value,
|
|
1157
|
+
onClick: d[0] || (d[0] = (u) => c.$emit("collapse")),
|
|
1146
1158
|
onKeydown: [
|
|
1147
|
-
|
|
1148
|
-
|
|
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"]))
|
|
1149
1161
|
]
|
|
1150
1162
|
}, [
|
|
1151
|
-
|
|
1163
|
+
M(x(ie), { icon: "lucide-minus" })
|
|
1152
1164
|
], 40, Zt)
|
|
1153
1165
|
]),
|
|
1154
1166
|
_: 1
|
|
1155
|
-
})) : (
|
|
1167
|
+
})) : (B(), se(x(me), {
|
|
1156
1168
|
key: 1,
|
|
1157
1169
|
placement: "bottom"
|
|
1158
1170
|
}, {
|
|
1159
1171
|
tooltip: F(() => [
|
|
1160
|
-
|
|
1161
|
-
Ce(K(
|
|
1162
|
-
|
|
1172
|
+
w("span", jt, [
|
|
1173
|
+
Ce(K(x(o)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.MAXIMIZE")) + " ", 1),
|
|
1174
|
+
M(_e, {
|
|
1163
1175
|
parts: n.value.parts,
|
|
1164
|
-
separated: !
|
|
1176
|
+
separated: !x(t)
|
|
1165
1177
|
}, null, 8, ["parts", "separated"])
|
|
1166
1178
|
])
|
|
1167
1179
|
]),
|
|
1168
1180
|
default: F(() => [
|
|
1169
|
-
|
|
1181
|
+
w("div", {
|
|
1170
1182
|
class: "vc-ai-agent-header__button",
|
|
1171
1183
|
role: "button",
|
|
1172
1184
|
tabindex: "0",
|
|
1173
|
-
"aria-label":
|
|
1174
|
-
"aria-keyshortcuts":
|
|
1175
|
-
onClick:
|
|
1185
|
+
"aria-label": x(o)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.MAXIMIZE"),
|
|
1186
|
+
"aria-keyshortcuts": g.value,
|
|
1187
|
+
onClick: d[3] || (d[3] = (u) => c.$emit("expand")),
|
|
1176
1188
|
onKeydown: [
|
|
1177
|
-
|
|
1178
|
-
|
|
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"]))
|
|
1179
1191
|
]
|
|
1180
1192
|
}, [
|
|
1181
|
-
|
|
1193
|
+
M(x(ie), { icon: "lucide-panel-top" })
|
|
1182
1194
|
], 40, Yt)
|
|
1183
1195
|
]),
|
|
1184
1196
|
_: 1
|
|
1185
1197
|
})),
|
|
1186
|
-
|
|
1198
|
+
M(x(me), { placement: "bottom" }, {
|
|
1187
1199
|
tooltip: F(() => [
|
|
1188
|
-
|
|
1189
|
-
Ce(K(
|
|
1190
|
-
|
|
1200
|
+
w("span", Jt, [
|
|
1201
|
+
Ce(K(x(o)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.CLOSE")) + " ", 1),
|
|
1202
|
+
M(_e, {
|
|
1191
1203
|
parts: s.value.parts,
|
|
1192
|
-
separated: !
|
|
1204
|
+
separated: !x(t)
|
|
1193
1205
|
}, null, 8, ["parts", "separated"])
|
|
1194
1206
|
])
|
|
1195
1207
|
]),
|
|
1196
1208
|
default: F(() => [
|
|
1197
|
-
|
|
1209
|
+
w("div", {
|
|
1198
1210
|
class: "vc-ai-agent-header__button",
|
|
1199
1211
|
role: "button",
|
|
1200
1212
|
tabindex: "0",
|
|
1201
|
-
"aria-label":
|
|
1202
|
-
"aria-keyshortcuts":
|
|
1203
|
-
onClick:
|
|
1213
|
+
"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")),
|
|
1204
1216
|
onKeydown: [
|
|
1205
|
-
|
|
1206
|
-
|
|
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"]))
|
|
1207
1219
|
]
|
|
1208
1220
|
}, [
|
|
1209
|
-
|
|
1221
|
+
M(x(ie), { icon: "lucide-x" })
|
|
1210
1222
|
], 40, Qt)
|
|
1211
1223
|
]),
|
|
1212
1224
|
_: 1
|
|
@@ -1223,158 +1235,168 @@ const Dt = ["width", "height"], Lt = ["clip-path"], Nt = {
|
|
|
1223
1235
|
text: {}
|
|
1224
1236
|
},
|
|
1225
1237
|
setup(e) {
|
|
1226
|
-
return (o, t) => (
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1238
|
+
return (o, t) => (B(), S("div", tn, [
|
|
1239
|
+
w("div", nn, [
|
|
1240
|
+
w("div", an, [
|
|
1241
|
+
M(Ue, {
|
|
1230
1242
|
width: 80,
|
|
1231
1243
|
height: 87,
|
|
1232
1244
|
animated: ""
|
|
1233
1245
|
})
|
|
1234
1246
|
]),
|
|
1235
|
-
e.text ? (
|
|
1247
|
+
e.text ? (B(), S("p", on, K(e.text), 1)) : z("", !0)
|
|
1236
1248
|
])
|
|
1237
1249
|
]));
|
|
1238
1250
|
}
|
|
1239
|
-
}), sn = { class: "vc-ai-agent-iframe" }, ln = ["src"],
|
|
1251
|
+
}), sn = { class: "vc-ai-agent-iframe" }, ln = ["src"], cn = {
|
|
1240
1252
|
key: 1,
|
|
1241
1253
|
class: "vc-ai-agent-iframe__placeholder"
|
|
1242
|
-
},
|
|
1254
|
+
}, dn = /* @__PURE__ */ H({
|
|
1243
1255
|
__name: "VcAiAgentIframe",
|
|
1244
1256
|
props: {
|
|
1245
1257
|
url: {}
|
|
1246
1258
|
},
|
|
1247
1259
|
emits: ["iframe-ready"],
|
|
1248
1260
|
setup(e, { emit: o }) {
|
|
1249
|
-
const t = W("ai-agent-iframe"), s = e, n = o,
|
|
1261
|
+
const t = W("ai-agent-iframe"), s = e, n = o, l = L(null), g = L(!0);
|
|
1250
1262
|
q(
|
|
1251
|
-
|
|
1252
|
-
(
|
|
1253
|
-
|
|
1263
|
+
l,
|
|
1264
|
+
(d) => {
|
|
1265
|
+
d && n("iframe-ready", d);
|
|
1254
1266
|
},
|
|
1255
1267
|
{ immediate: !0 }
|
|
1256
1268
|
);
|
|
1257
|
-
const
|
|
1258
|
-
|
|
1269
|
+
const c = () => {
|
|
1270
|
+
g.value = !1, t.debug("Iframe loaded");
|
|
1259
1271
|
};
|
|
1260
1272
|
return q(
|
|
1261
1273
|
() => s.url,
|
|
1262
1274
|
() => {
|
|
1263
|
-
|
|
1275
|
+
g.value = !0;
|
|
1264
1276
|
}
|
|
1265
|
-
), (
|
|
1266
|
-
|
|
1277
|
+
), (d, u) => (B(), S("div", sn, [
|
|
1278
|
+
M(Pe, { name: "fade" }, {
|
|
1267
1279
|
default: F(() => [
|
|
1268
|
-
|
|
1280
|
+
g.value && e.url ? (B(), se(rn, {
|
|
1269
1281
|
key: 0,
|
|
1270
|
-
text:
|
|
1282
|
+
text: d.$t("AI_AGENT.LOADING")
|
|
1271
1283
|
}, null, 8, ["text"])) : z("", !0)
|
|
1272
1284
|
]),
|
|
1273
1285
|
_: 1
|
|
1274
1286
|
}),
|
|
1275
|
-
e.url ? (
|
|
1287
|
+
e.url ? (B(), S("iframe", {
|
|
1276
1288
|
key: 0,
|
|
1277
1289
|
ref_key: "iframeRef",
|
|
1278
|
-
ref:
|
|
1290
|
+
ref: l,
|
|
1279
1291
|
src: e.url,
|
|
1280
|
-
class: Me(["vc-ai-agent-iframe__frame", { "vc-ai-agent-iframe__frame--loading":
|
|
1292
|
+
class: Me(["vc-ai-agent-iframe__frame", { "vc-ai-agent-iframe__frame--loading": g.value }]),
|
|
1281
1293
|
sandbox: "allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox",
|
|
1282
1294
|
allow: "clipboard-read; clipboard-write",
|
|
1283
|
-
onLoad:
|
|
1284
|
-
}, null, 42, ln)) : (
|
|
1285
|
-
|
|
1295
|
+
onLoad: c
|
|
1296
|
+
}, null, 42, ln)) : (B(), S("div", cn, [
|
|
1297
|
+
M(x(ie), {
|
|
1286
1298
|
icon: "lucide-sparkles",
|
|
1287
1299
|
size: "xl",
|
|
1288
1300
|
class: "vc-ai-agent-iframe__placeholder-icon"
|
|
1289
1301
|
}),
|
|
1290
|
-
|
|
1302
|
+
u[0] || (u[0] = w("p", { class: "vc-ai-agent-iframe__placeholder-text" }, "AI Agent URL not configured", -1))
|
|
1291
1303
|
]))
|
|
1292
1304
|
]));
|
|
1293
1305
|
}
|
|
1294
|
-
}), un = { class: "vc-ai-agent-panel__content" },
|
|
1306
|
+
}), un = ["inert"], pn = { class: "vc-ai-agent-panel__content" }, kn = /* @__PURE__ */ H({
|
|
1295
1307
|
__name: "VcAiAgentPanel",
|
|
1308
|
+
props: {
|
|
1309
|
+
inert: { type: Boolean }
|
|
1310
|
+
},
|
|
1296
1311
|
setup(e) {
|
|
1297
|
-
const { isMac: o } = Ne(), t =
|
|
1312
|
+
const { isMac: o } = Ne(), t = $(be), s = $(et, !1);
|
|
1298
1313
|
t || console.error("[VcAiAgentPanel] AiAgentService not provided");
|
|
1299
|
-
const n =
|
|
1314
|
+
const n = b(
|
|
1300
1315
|
() => t?.config.value ?? { url: "", title: "AI Assistant", width: 362, expandedWidth: 500 }
|
|
1301
|
-
),
|
|
1302
|
-
width:
|
|
1303
|
-
})),
|
|
1304
|
-
tt(document, "keydown", (
|
|
1305
|
-
if (
|
|
1306
|
-
if (
|
|
1307
|
-
|
|
1316
|
+
), l = b(() => !s && (t?.isOpen.value ?? !1)), g = b(() => t?.isExpanded.value ?? !1), c = b(() => t?.totalItemsCount.value ?? 0), d = b(() => ({
|
|
1317
|
+
width: g.value ? `${n.value.expandedWidth ?? 500}px` : `${n.value.width ?? 362}px`
|
|
1318
|
+
})), u = () => t?.closePanel(), h = () => t?.expandPanel(), C = () => t?.collapsePanel(), f = L(null);
|
|
1319
|
+
tt(document, "keydown", (v) => {
|
|
1320
|
+
if (l.value && !v.isComposing && !v.defaultPrevented) {
|
|
1321
|
+
if (v.key === "Escape") {
|
|
1322
|
+
v.preventDefault(), u();
|
|
1308
1323
|
return;
|
|
1309
1324
|
}
|
|
1310
|
-
Et(Q.mod.backslash,
|
|
1325
|
+
if (Et(Q.mod.backslash, v, o)) {
|
|
1326
|
+
const A = document.activeElement;
|
|
1327
|
+
if (!A || !f.value?.contains(A)) return;
|
|
1328
|
+
v.preventDefault(), g.value ? C() : h();
|
|
1329
|
+
}
|
|
1311
1330
|
}
|
|
1312
1331
|
});
|
|
1313
|
-
const
|
|
1314
|
-
t?._setIframeRef(
|
|
1332
|
+
const E = (v) => {
|
|
1333
|
+
t?._setIframeRef(v);
|
|
1315
1334
|
};
|
|
1316
1335
|
return ze(() => {
|
|
1317
1336
|
t?._setIframeRef(null);
|
|
1318
|
-
}), (
|
|
1337
|
+
}), (v, A) => (B(), se(Pe, { name: "ai-panel-slide" }, {
|
|
1319
1338
|
default: F(() => [
|
|
1320
|
-
|
|
1339
|
+
l.value ? (B(), S("div", {
|
|
1321
1340
|
key: 0,
|
|
1341
|
+
ref_key: "panelRef",
|
|
1342
|
+
ref: f,
|
|
1322
1343
|
class: Me(["vc-ai-agent-panel", {
|
|
1323
|
-
"vc-ai-agent-panel--expanded":
|
|
1344
|
+
"vc-ai-agent-panel--expanded": g.value
|
|
1324
1345
|
}]),
|
|
1325
|
-
style: He(
|
|
1346
|
+
style: He(d.value),
|
|
1347
|
+
inert: e.inert || void 0
|
|
1326
1348
|
}, [
|
|
1327
|
-
|
|
1349
|
+
M(en, {
|
|
1328
1350
|
title: n.value.title,
|
|
1329
|
-
"is-expanded":
|
|
1330
|
-
"items-count":
|
|
1331
|
-
onClose:
|
|
1332
|
-
onExpand:
|
|
1333
|
-
onCollapse:
|
|
1351
|
+
"is-expanded": g.value,
|
|
1352
|
+
"items-count": c.value,
|
|
1353
|
+
onClose: u,
|
|
1354
|
+
onExpand: h,
|
|
1355
|
+
onCollapse: C
|
|
1334
1356
|
}, null, 8, ["title", "is-expanded", "items-count"]),
|
|
1335
|
-
|
|
1336
|
-
|
|
1357
|
+
w("div", pn, [
|
|
1358
|
+
M(dn, {
|
|
1337
1359
|
url: n.value.url,
|
|
1338
|
-
onIframeReady:
|
|
1360
|
+
onIframeReady: E
|
|
1339
1361
|
}, null, 8, ["url"])
|
|
1340
1362
|
])
|
|
1341
|
-
],
|
|
1363
|
+
], 14, un)) : z("", !0)
|
|
1342
1364
|
]),
|
|
1343
1365
|
_: 1
|
|
1344
1366
|
}));
|
|
1345
1367
|
}
|
|
1346
1368
|
});
|
|
1347
1369
|
export {
|
|
1348
|
-
|
|
1349
|
-
|
|
1370
|
+
hn as A,
|
|
1371
|
+
xn as B,
|
|
1350
1372
|
at as D,
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1373
|
+
_n as E,
|
|
1374
|
+
En as H,
|
|
1375
|
+
kn as _,
|
|
1376
|
+
Tn as a,
|
|
1355
1377
|
xe as b,
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1378
|
+
On as c,
|
|
1379
|
+
yn as d,
|
|
1380
|
+
wn as e,
|
|
1381
|
+
Bn as f,
|
|
1360
1382
|
It as g,
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1383
|
+
$e as h,
|
|
1384
|
+
Fe as i,
|
|
1385
|
+
At as j,
|
|
1364
1386
|
Re as k,
|
|
1365
1387
|
Oe as l,
|
|
1366
1388
|
yt as m,
|
|
1367
1389
|
mt as n,
|
|
1368
1390
|
ht as o,
|
|
1369
|
-
|
|
1391
|
+
In as p,
|
|
1370
1392
|
Ee as q,
|
|
1371
1393
|
Q as r,
|
|
1372
1394
|
An as s,
|
|
1373
|
-
|
|
1374
|
-
|
|
1395
|
+
bn as t,
|
|
1396
|
+
Sn as u,
|
|
1375
1397
|
Et as v,
|
|
1376
1398
|
Mt as w,
|
|
1377
|
-
|
|
1399
|
+
wt as x,
|
|
1378
1400
|
Ne as y,
|
|
1379
1401
|
_e as z
|
|
1380
1402
|
};
|