@aham.ro/ui-designer 0.1.8 → 0.1.10
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/Designer.vue.d.ts +12 -1
- package/dist/index.d.ts +16 -3
- package/dist/stores/templates.d.ts +26 -0
- package/dist/stores/translations.d.ts +48 -0
- package/dist/stores/workspace.d.ts +68 -0
- package/dist/ui-designer.css +1 -1
- package/dist/ui-designer.js +2384 -1025
- package/dist/widgets/Header.vue.d.ts +10 -1
- package/dist/widgets/Properties.vue.d.ts +17 -1
- package/dist/widgets/TemplateList.vue.d.ts +2 -2
- package/dist/widgets/ThemeSidebar.vue.d.ts +13 -0
- package/dist/widgets/TranslationSidebar.vue.d.ts +22 -0
- package/dist/widgets/Workspace.vue.d.ts +15 -0
- package/dist/widgets/components/Heading.vue.d.ts +1 -1
- package/dist/widgets/header/IconButton.vue.d.ts +2 -0
- package/dist/widgets/workspace/Breadcrumb.vue.d.ts +3 -0
- package/dist/widgets/workspace/ComponentHandler.vue.d.ts +15 -0
- package/dist/widgets/workspace/Composer.vue.d.ts +13 -0
- package/dist/widgets/workspace/Renderer.vue.d.ts +31 -0
- package/dist/widgets/workspace/configuration.d.ts +11 -0
- package/dist/widgets/workspace/editable.d.ts +12 -0
- package/dist/widgets/workspace/screens/Desktop.vue.d.ts +13 -0
- package/dist/widgets/workspace/screens/Device.vue.d.ts +16 -0
- package/dist/widgets/workspace/screens/Mobile.vue.d.ts +13 -0
- package/dist/widgets/workspace/screens/Tablet.vue.d.ts +13 -0
- package/package.json +1 -1
- package/dist/stores/screens.d.ts +0 -26
package/dist/ui-designer.js
CHANGED
|
@@ -1,7 +1,119 @@
|
|
|
1
|
-
import { Fragment as e, Teleport as t,
|
|
2
|
-
import { defineStore as
|
|
1
|
+
import { Fragment as e, Teleport as t, Transition as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, getCurrentInstance as d, guardReactiveProps as f, nextTick as p, normalizeClass as m, normalizeProps as h, normalizeStyle as g, onBeforeUnmount as _, onMounted as v, onUnmounted as y, openBlock as b, ref as x, renderList as S, renderSlot as C, resolveDirective as w, resolveDynamicComponent as T, shallowRef as E, toDisplayString as D, toRefs as O, unref as k, vModelText as A, watch as j, watchPostEffect as M, withCtx as N, withDirectives as P, withKeys as F, withModifiers as I } from "vue";
|
|
2
|
+
import { defineStore as L } from "pinia";
|
|
3
|
+
//#region src/stores/translations.ts
|
|
4
|
+
function R(e) {
|
|
5
|
+
return {
|
|
6
|
+
...e,
|
|
7
|
+
key: e.key ?? e.id,
|
|
8
|
+
translations: {
|
|
9
|
+
...e.value === void 0 ? {} : { en: e.value },
|
|
10
|
+
...e.translations
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
var z = L("translations", {
|
|
15
|
+
state: () => ({ items: [] }),
|
|
16
|
+
getters: { fields: (e) => e.items },
|
|
17
|
+
actions: {
|
|
18
|
+
setItems(e) {
|
|
19
|
+
this.items = e.map(R);
|
|
20
|
+
},
|
|
21
|
+
setScreenItems(e, t) {
|
|
22
|
+
this.items = [...this.items.filter((t) => t.screenId !== e), ...t.map((t) => R({
|
|
23
|
+
...t,
|
|
24
|
+
screenId: e
|
|
25
|
+
}))];
|
|
26
|
+
},
|
|
27
|
+
setComponentItems(e, t) {
|
|
28
|
+
this.items = [...this.items.filter((t) => t.componentId !== e), ...t.map((t) => R({
|
|
29
|
+
...t,
|
|
30
|
+
componentId: e
|
|
31
|
+
}))];
|
|
32
|
+
},
|
|
33
|
+
updateValue(e, t, n = "en") {
|
|
34
|
+
let r = this.items.find((t) => t.id === e);
|
|
35
|
+
r && (r.translations[n] = t, n === "en" && (r.source = t));
|
|
36
|
+
},
|
|
37
|
+
ensureValue(e, t, n) {
|
|
38
|
+
let r = this.items.find((t) => t.id === e);
|
|
39
|
+
if (r) {
|
|
40
|
+
r.translations.en || (r.translations.en = t);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
this.items.push(R({
|
|
44
|
+
id: e,
|
|
45
|
+
path: e,
|
|
46
|
+
source: t,
|
|
47
|
+
value: t,
|
|
48
|
+
componentId: n
|
|
49
|
+
}));
|
|
50
|
+
},
|
|
51
|
+
getValue(e, t = "en") {
|
|
52
|
+
return this.items.find((t) => t.id === e)?.translations[t] ?? "";
|
|
53
|
+
},
|
|
54
|
+
remove(e) {
|
|
55
|
+
this.items = this.items.filter((t) => t.id !== e);
|
|
56
|
+
},
|
|
57
|
+
clear() {
|
|
58
|
+
this.items = [];
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}), B = L("workspace", {
|
|
62
|
+
state: () => ({
|
|
63
|
+
components: [],
|
|
64
|
+
selectedId: void 0,
|
|
65
|
+
activeTemplateId: void 0,
|
|
66
|
+
activeTemplateName: "",
|
|
67
|
+
templateComponents: {}
|
|
68
|
+
}),
|
|
69
|
+
getters: {
|
|
70
|
+
selectedIndex: (e) => e.components.findIndex(({ id: t }) => t === e.selectedId),
|
|
71
|
+
selectedComponent: (e) => e.components.find(({ id: t }) => t === e.selectedId)
|
|
72
|
+
},
|
|
73
|
+
actions: {
|
|
74
|
+
setActiveTemplate(e, t = "") {
|
|
75
|
+
e && e !== this.activeTemplateId && (this.activeTemplateId && (this.templateComponents[this.activeTemplateId] = this.components), this.activeTemplateId = e, this.activeTemplateName = t, this.components = this.templateComponents[e] ?? [], this.selectedId = void 0);
|
|
76
|
+
},
|
|
77
|
+
addComponent(e, t, n = {}) {
|
|
78
|
+
let r = {
|
|
79
|
+
id: `${e}-${Date.now()}-${this.components.length}`,
|
|
80
|
+
type: e,
|
|
81
|
+
props: n
|
|
82
|
+
};
|
|
83
|
+
return t === void 0 || t >= this.components.length ? this.components.push(r) : this.components.splice(Math.max(0, t), 0, r), this.selectedId = r.id, r;
|
|
84
|
+
},
|
|
85
|
+
updateComponentProps(e, t) {
|
|
86
|
+
let n = this.components.find((t) => t.id === e);
|
|
87
|
+
n && (n.props = {
|
|
88
|
+
...n.props,
|
|
89
|
+
...t
|
|
90
|
+
});
|
|
91
|
+
},
|
|
92
|
+
selectComponent(e) {
|
|
93
|
+
let t = this.components[e];
|
|
94
|
+
if (t) return this.selectedId = this.selectedId === t.id ? void 0 : t.id, this.selectedId ? t : void 0;
|
|
95
|
+
},
|
|
96
|
+
deselect() {
|
|
97
|
+
this.selectedId = void 0;
|
|
98
|
+
},
|
|
99
|
+
deleteSelected() {
|
|
100
|
+
let e = this.selectedIndex;
|
|
101
|
+
e < 0 || (this.components.splice(e, 1), this.deselect());
|
|
102
|
+
},
|
|
103
|
+
move(e, t) {
|
|
104
|
+
if (e < 0 || t < 0 || e >= this.components.length || t >= this.components.length) return;
|
|
105
|
+
let [n] = this.components.splice(e, 1);
|
|
106
|
+
this.components.splice(t, 0, n);
|
|
107
|
+
},
|
|
108
|
+
remove(e) {
|
|
109
|
+
let t = this.components.findIndex((t) => t.id === e);
|
|
110
|
+
t < 0 || (this.components.splice(t, 1), this.selectedId === e && this.deselect());
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
//#endregion
|
|
3
115
|
//#region src/composables/useTranslation.ts
|
|
4
|
-
function
|
|
116
|
+
function V() {
|
|
5
117
|
let e = d()?.appContext.config.globalProperties, t = e?.$t, n = typeof t == "function" ? t.bind(e) : void 0;
|
|
6
118
|
return (e, t) => {
|
|
7
119
|
let r = n?.(e);
|
|
@@ -10,7 +122,7 @@ function P() {
|
|
|
10
122
|
}
|
|
11
123
|
//#endregion
|
|
12
124
|
//#region node_modules/overlayscrollbars/overlayscrollbars.mjs
|
|
13
|
-
var
|
|
125
|
+
var H = (e, t) => {
|
|
14
126
|
let { o: n, i: r, u: i } = e, a = n, o, s = (e, t) => {
|
|
15
127
|
let n = a, s = e, c = t || (r ? !r(n, s) : n !== s);
|
|
16
128
|
return (c || i) && (a = s, o = n), [
|
|
@@ -24,42 +136,42 @@ var F = (e, t) => {
|
|
|
24
136
|
!!e,
|
|
25
137
|
o
|
|
26
138
|
]];
|
|
27
|
-
},
|
|
28
|
-
let t = !!e && e.length, n =
|
|
29
|
-
return
|
|
30
|
-
},
|
|
31
|
-
function
|
|
32
|
-
if (
|
|
33
|
-
else e &&
|
|
139
|
+
}, U = typeof window < "u" && typeof HTMLElement < "u" && window.document ? window : {}, ee = Math.max, te = Math.min, ne = Math.round, W = Math.abs, re = Math.sign, ie = U.cancelAnimationFrame, ae = U.requestAnimationFrame, oe = U.setTimeout, se = U.clearTimeout, ce = (e) => U[e] === void 0 ? void 0 : U[e], le = ce("MutationObserver"), ue = ce("IntersectionObserver"), de = ce("ResizeObserver"), fe = ce("ScrollTimeline"), pe = (e) => e === void 0, me = (e) => e === null, he = (e) => typeof e == "number", ge = (e) => typeof e == "string", _e = (e) => typeof e == "boolean", ve = (e) => typeof e == "function", G = (e) => Array.isArray(e), ye = (e) => typeof e == "object" && !G(e) && !me(e), be = (e) => {
|
|
140
|
+
let t = !!e && e.length, n = he(t) && t > -1 && t % 1 == 0;
|
|
141
|
+
return G(e) || !ve(e) && n ? t > 0 && ye(e) ? t - 1 in e : !0 : !1;
|
|
142
|
+
}, xe = (e) => !!e && e.constructor === Object, Se = (e) => e instanceof HTMLElement, Ce = (e) => e instanceof Element;
|
|
143
|
+
function K(e, t) {
|
|
144
|
+
if (be(e)) for (let n = 0; n < e.length && t(e[n], n, e) !== !1; n++);
|
|
145
|
+
else e && K(Object.keys(e), ((n) => t(e[n], n, e)));
|
|
34
146
|
return e;
|
|
35
147
|
}
|
|
36
|
-
var
|
|
37
|
-
|
|
38
|
-
},
|
|
148
|
+
var we = (e, t) => e.indexOf(t) >= 0, Te = (e, t) => e.concat(t), q = (e, t, n) => (!ge(t) && be(t) ? Array.prototype.push.apply(e, t) : e.push(t), e), Ee = (e) => Array.from(e || []), De = (e) => G(e) ? e : !ge(e) && be(e) ? Ee(e) : [e], Oe = (e) => !!e && !e.length, ke = (e) => Ee(new Set(e)), Ae = (e, t, n) => {
|
|
149
|
+
K(e, (e) => !e || e.apply(void 0, t || [])), n || (e.length = 0);
|
|
150
|
+
}, je = "paddingTop", Me = "paddingRight", Ne = "paddingLeft", Pe = "paddingBottom", Fe = "marginLeft", Ie = "marginRight", Le = "marginBottom", Re = "overflowX", ze = "overflowY", Be = "width", Ve = "height", He = "visible", Ue = "hidden", We = "scroll", Ge = (e) => {
|
|
39
151
|
let t = String(e || "");
|
|
40
152
|
return t ? t[0].toUpperCase() + t.slice(1) : "";
|
|
41
|
-
},
|
|
153
|
+
}, Ke = (e, t, n, r) => {
|
|
42
154
|
if (e && t) {
|
|
43
155
|
let r = !0;
|
|
44
|
-
return
|
|
156
|
+
return K(n, ((n) => {
|
|
45
157
|
e[n] !== t[n] && (r = !1);
|
|
46
158
|
})), r;
|
|
47
159
|
}
|
|
48
160
|
return !1;
|
|
49
|
-
},
|
|
161
|
+
}, qe = (e, t) => Ke(e, t, ["w", "h"]), Je = (e, t) => Ke(e, t, ["x", "y"]), Ye = (e, t) => Ke(e, t, [
|
|
50
162
|
"t",
|
|
51
163
|
"r",
|
|
52
164
|
"b",
|
|
53
165
|
"l"
|
|
54
|
-
]), J = (e, ...t) => e.bind(0, ...t),
|
|
55
|
-
let t, n = e ?
|
|
166
|
+
]), J = (e, ...t) => e.bind(0, ...t), Xe = (e) => {
|
|
167
|
+
let t, n = e ? oe : ae, r = e ? se : ie;
|
|
56
168
|
return [(i) => {
|
|
57
|
-
r(t), t = n((() => i()),
|
|
169
|
+
r(t), t = n((() => i()), ve(e) ? e() : e);
|
|
58
170
|
}, () => r(t)];
|
|
59
|
-
},
|
|
60
|
-
let t =
|
|
61
|
-
if (
|
|
62
|
-
let e = t ?
|
|
171
|
+
}, Ze = (e) => {
|
|
172
|
+
let t = ve(e) ? e() : e;
|
|
173
|
+
if (he(t)) {
|
|
174
|
+
let e = t ? oe : ae, n = t ? se : ie;
|
|
63
175
|
return (r) => {
|
|
64
176
|
let i = e((() => r()), t);
|
|
65
177
|
return () => {
|
|
@@ -68,20 +180,20 @@ var be = (e, t) => e.indexOf(t) >= 0, xe = (e, t) => e.concat(t), K = (e, t, n)
|
|
|
68
180
|
};
|
|
69
181
|
}
|
|
70
182
|
return t && t._;
|
|
71
|
-
},
|
|
183
|
+
}, Qe = (e, t) => {
|
|
72
184
|
let { p: n, v: r, S: i, m: a } = t || {}, o, s, c, l, u = function(t) {
|
|
73
185
|
s && s(), o && o(), l = s = o = c = void 0, e.apply(this, t);
|
|
74
186
|
}, d = (e) => a && c ? a(c, e) : e, f = () => {
|
|
75
187
|
s && c && u(d(c) || c);
|
|
76
188
|
}, p = function() {
|
|
77
|
-
let e =
|
|
189
|
+
let e = Ee(arguments), t = Ze(n);
|
|
78
190
|
if (t) {
|
|
79
|
-
let n = typeof i == "function" ? i() : i, a =
|
|
191
|
+
let n = typeof i == "function" ? i() : i, a = Ze(r), p = d(e) || e, m = u.bind(0, p);
|
|
80
192
|
s && s(), n && !l ? (m(), l = !0, s = t((() => l = void 0))) : (s = t(m), a && !o && (o = a(f))), c = p;
|
|
81
193
|
} else u(e);
|
|
82
194
|
};
|
|
83
195
|
return p.O = f, p;
|
|
84
|
-
},
|
|
196
|
+
}, $e = (e, t) => Object.prototype.hasOwnProperty.call(e, t), Y = (e) => e ? Object.keys(e) : [], X = (e, t, n, r, i, a, o) => {
|
|
85
197
|
let s = [
|
|
86
198
|
t,
|
|
87
199
|
n,
|
|
@@ -90,139 +202,139 @@ var be = (e, t) => e.indexOf(t) >= 0, xe = (e, t) => e.concat(t), K = (e, t, n)
|
|
|
90
202
|
a,
|
|
91
203
|
o
|
|
92
204
|
];
|
|
93
|
-
return (typeof e != "object" ||
|
|
94
|
-
|
|
205
|
+
return (typeof e != "object" || me(e)) && !ve(e) && (e = {}), K(s, ((t) => {
|
|
206
|
+
K(t, ((n, r) => {
|
|
95
207
|
let i = t[r];
|
|
96
208
|
if (e === i) return !0;
|
|
97
|
-
let a =
|
|
98
|
-
if (i &&
|
|
209
|
+
let a = G(i);
|
|
210
|
+
if (i && xe(i)) {
|
|
99
211
|
let t = e[r], n = t;
|
|
100
|
-
a && !
|
|
212
|
+
a && !G(t) ? n = [] : !a && !xe(t) && (n = {}), e[r] = X(n, i);
|
|
101
213
|
} else e[r] = a ? i.slice() : i;
|
|
102
214
|
}));
|
|
103
215
|
})), e;
|
|
104
|
-
},
|
|
105
|
-
e === void 0 ? delete n[t] : e &&
|
|
106
|
-
})),
|
|
107
|
-
|
|
216
|
+
}, et = (e, t) => K(X({}, e), ((e, t, n) => {
|
|
217
|
+
e === void 0 ? delete n[t] : e && xe(e) && (n[t] = et(e));
|
|
218
|
+
})), tt = (e) => !Y(e).length, nt = () => {}, rt = (e, t, n) => ee(e, te(t, n)), it = (e) => ke((G(e) ? e : (e || "").split(" ")).filter(((e) => e))), at = (e, t) => e && e.getAttribute(t), ot = (e, t) => e && e.hasAttribute(t), st = (e, t, n) => {
|
|
219
|
+
K(it(t), ((t) => {
|
|
108
220
|
e && e.setAttribute(t, String(n || ""));
|
|
109
221
|
}));
|
|
110
|
-
},
|
|
111
|
-
|
|
112
|
-
},
|
|
113
|
-
let n =
|
|
222
|
+
}, ct = (e, t) => {
|
|
223
|
+
K(it(t), ((t) => e && e.removeAttribute(t)));
|
|
224
|
+
}, lt = (e, t) => {
|
|
225
|
+
let n = it(at(e, t)), r = J(st, e, t), i = (e, t) => {
|
|
114
226
|
let r = new Set(n);
|
|
115
|
-
return
|
|
227
|
+
return K(it(e), ((e) => {
|
|
116
228
|
r[t](e);
|
|
117
|
-
})),
|
|
229
|
+
})), Ee(r).join(" ");
|
|
118
230
|
};
|
|
119
231
|
return {
|
|
120
232
|
C: (e) => r(i(e, "delete")),
|
|
121
233
|
$: (e) => r(i(e, "add")),
|
|
122
234
|
H: (e) => {
|
|
123
|
-
let t =
|
|
235
|
+
let t = it(e);
|
|
124
236
|
return t.reduce(((e, t) => e && n.includes(t)), t.length > 0);
|
|
125
237
|
}
|
|
126
238
|
};
|
|
127
|
-
},
|
|
128
|
-
|
|
129
|
-
},
|
|
130
|
-
let n = t ?
|
|
131
|
-
return n ?
|
|
132
|
-
},
|
|
133
|
-
let n = t ?
|
|
239
|
+
}, ut = (e, t, n) => (lt(e, t).C(n), J(dt, e, t, n)), dt = (e, t, n) => (lt(e, t).$(n), J(ut, e, t, n)), ft = (e, t, n, r) => (r ? dt : ut)(e, t, n), pt = (e, t, n) => lt(e, t).H(n), mt = (e) => lt(e, "class"), ht = (e, t) => {
|
|
240
|
+
mt(e).C(t);
|
|
241
|
+
}, gt = (e, t) => (mt(e).$(t), J(ht, e, t)), _t = (e, t) => {
|
|
242
|
+
let n = t ? Ce(t) && t : document;
|
|
243
|
+
return n ? Ee(n.querySelectorAll(e)) : [];
|
|
244
|
+
}, vt = (e, t) => {
|
|
245
|
+
let n = t ? Ce(t) && t : document;
|
|
134
246
|
return n && n.querySelector(e);
|
|
135
|
-
},
|
|
136
|
-
let r =
|
|
137
|
-
return r && i ? r === e || i === e || a &&
|
|
138
|
-
},
|
|
139
|
-
|
|
140
|
-
let t =
|
|
247
|
+
}, yt = (e, t) => Ce(e) && e.matches(t), bt = (e) => yt(e, "body"), xt = (e) => e ? Ee(e.childNodes) : [], St = (e) => e && e.parentElement, Ct = (e, t) => Ce(e) && e.closest(t), wt = (e) => document.activeElement, Tt = (e, t, n) => {
|
|
248
|
+
let r = Ct(e, t), i = e && vt(n, r), a = Ct(i, t) === r;
|
|
249
|
+
return r && i ? r === e || i === e || a && Ct(Ct(e, n), t) !== r : !1;
|
|
250
|
+
}, Et = (e) => {
|
|
251
|
+
K(De(e), ((e) => {
|
|
252
|
+
let t = St(e);
|
|
141
253
|
e && t && t.removeChild(e);
|
|
142
254
|
}));
|
|
143
|
-
},
|
|
255
|
+
}, Dt = (e, t) => J(Et, e && t && K(De(t), ((t) => {
|
|
144
256
|
t && e.appendChild(t);
|
|
145
|
-
}))),
|
|
146
|
-
|
|
147
|
-
},
|
|
257
|
+
}))), Ot, kt = () => Ot, At = (e) => {
|
|
258
|
+
Ot = e;
|
|
259
|
+
}, jt = (e) => {
|
|
148
260
|
let t = document.createElement("div");
|
|
149
|
-
return
|
|
150
|
-
},
|
|
151
|
-
let t =
|
|
152
|
-
return t.innerHTML = n ? n.createHTML(r) : r,
|
|
153
|
-
},
|
|
261
|
+
return st(t, "class", e), t;
|
|
262
|
+
}, Mt = (e) => {
|
|
263
|
+
let t = jt(), n = kt(), r = e.trim();
|
|
264
|
+
return t.innerHTML = n ? n.createHTML(r) : r, K(xt(t), ((e) => Et(e)));
|
|
265
|
+
}, Nt = (e, t) => e.getPropertyValue(t) || e[t] || "", Pt = (e) => {
|
|
154
266
|
let t = e || 0;
|
|
155
267
|
return isFinite(t) ? t : 0;
|
|
156
|
-
},
|
|
157
|
-
function
|
|
158
|
-
e && t &&
|
|
268
|
+
}, Ft = (e) => Pt(parseFloat(e || "")), It = (e) => Math.round(e * 1e4) / 1e4, Lt = (e) => `${It(Pt(e))}px`;
|
|
269
|
+
function Rt(e, t) {
|
|
270
|
+
e && t && K(t, ((t, n) => {
|
|
159
271
|
try {
|
|
160
|
-
let r = e.style, i =
|
|
272
|
+
let r = e.style, i = me(t) || _e(t) ? "" : he(t) ? Lt(t) : t;
|
|
161
273
|
n.indexOf("--") === 0 ? r.setProperty(n, i) : r[n] = i;
|
|
162
274
|
} catch {}
|
|
163
275
|
}));
|
|
164
276
|
}
|
|
165
|
-
function
|
|
166
|
-
let r =
|
|
277
|
+
function zt(e, t, n) {
|
|
278
|
+
let r = ge(t), i = r ? "" : {};
|
|
167
279
|
if (e) {
|
|
168
|
-
let a =
|
|
169
|
-
i = r ?
|
|
280
|
+
let a = U.getComputedStyle(e, n) || e.style;
|
|
281
|
+
i = r ? Nt(a, t) : Ee(t).reduce(((e, t) => (e[t] = Nt(a, t), e)), i);
|
|
170
282
|
}
|
|
171
283
|
return i;
|
|
172
284
|
}
|
|
173
|
-
var
|
|
174
|
-
let r = t ? `${t}-` : "", i = n ? `-${n}` : "", a = `${r}top${i}`, o = `${r}right${i}`, s = `${r}bottom${i}`, c = `${r}left${i}`, l =
|
|
285
|
+
var Bt = (e, t, n) => {
|
|
286
|
+
let r = t ? `${t}-` : "", i = n ? `-${n}` : "", a = `${r}top${i}`, o = `${r}right${i}`, s = `${r}bottom${i}`, c = `${r}left${i}`, l = zt(e, [
|
|
175
287
|
a,
|
|
176
288
|
o,
|
|
177
289
|
s,
|
|
178
290
|
c
|
|
179
291
|
]);
|
|
180
292
|
return {
|
|
181
|
-
t:
|
|
182
|
-
r:
|
|
183
|
-
b:
|
|
184
|
-
l:
|
|
293
|
+
t: Ft(l[a]),
|
|
294
|
+
r: Ft(l[o]),
|
|
295
|
+
b: Ft(l[s]),
|
|
296
|
+
l: Ft(l[c])
|
|
185
297
|
};
|
|
186
|
-
},
|
|
298
|
+
}, Vt = (e, t) => `translate${ye(e) ? `(${e.x},${e.y})` : `${t ? "X" : "Y"}(${e})`}`, Ht = (e) => !!(e.offsetWidth || e.offsetHeight || e.getClientRects().length), Ut = {
|
|
187
299
|
w: 0,
|
|
188
300
|
h: 0
|
|
189
|
-
},
|
|
301
|
+
}, Wt = (e, t) => t ? {
|
|
190
302
|
w: t[`${e}Width`],
|
|
191
303
|
h: t[`${e}Height`]
|
|
192
|
-
} :
|
|
193
|
-
let t = parseFloat(
|
|
304
|
+
} : Ut, Gt = (e) => Wt("inner", e || U), Kt = J(Wt, "offset"), qt = J(Wt, "client"), Jt = J(Wt, "scroll"), Yt = (e) => {
|
|
305
|
+
let t = parseFloat(zt(e, Be)) || 0, n = parseFloat(zt(e, Ve)) || 0;
|
|
194
306
|
return {
|
|
195
|
-
w: t -
|
|
196
|
-
h: n -
|
|
307
|
+
w: t - ne(t),
|
|
308
|
+
h: n - ne(n)
|
|
197
309
|
};
|
|
198
|
-
},
|
|
199
|
-
let n =
|
|
200
|
-
return !
|
|
201
|
-
},
|
|
202
|
-
|
|
310
|
+
}, Xt = (e) => e.getBoundingClientRect(), Zt = (e) => !!e && Ht(e), Qt = (e) => !!(e && (e[Ve] || e[Be])), $t = (e, t) => {
|
|
311
|
+
let n = Qt(e);
|
|
312
|
+
return !Qt(t) && n;
|
|
313
|
+
}, en = (e, t, n, r) => {
|
|
314
|
+
K(it(t), ((t) => {
|
|
203
315
|
e && e.removeEventListener(t, n, r);
|
|
204
316
|
}));
|
|
205
|
-
},
|
|
317
|
+
}, Z = (e, t, n, r) => {
|
|
206
318
|
let i = (r && r.D) ?? !0, a = r && r.I || !1, o = r && r.A || !1, s = {
|
|
207
319
|
passive: i,
|
|
208
320
|
capture: a
|
|
209
321
|
};
|
|
210
|
-
return J(
|
|
322
|
+
return J(Ae, it(t).map(((t) => {
|
|
211
323
|
let r = o ? (i) => {
|
|
212
|
-
|
|
324
|
+
en(e, t, r, a), n && n(i);
|
|
213
325
|
} : n;
|
|
214
|
-
return e && e.addEventListener(t, r, s), J(
|
|
326
|
+
return e && e.addEventListener(t, r, s), J(en, e, t, r, a);
|
|
215
327
|
})));
|
|
216
|
-
},
|
|
217
|
-
let { x: n, y: r } =
|
|
328
|
+
}, tn = (e) => e.stopPropagation(), nn = (e) => e.preventDefault(), rn = (e) => tn(e) || nn(e), an = (e, t) => {
|
|
329
|
+
let { x: n, y: r } = he(t) ? {
|
|
218
330
|
x: t,
|
|
219
331
|
y: t
|
|
220
332
|
} : t || {};
|
|
221
|
-
|
|
222
|
-
},
|
|
333
|
+
he(n) && (e.scrollLeft = n), he(r) && (e.scrollTop = r);
|
|
334
|
+
}, on = (e) => ({
|
|
223
335
|
x: e.scrollLeft,
|
|
224
336
|
y: e.scrollTop
|
|
225
|
-
}),
|
|
337
|
+
}), sn = () => ({
|
|
226
338
|
T: {
|
|
227
339
|
x: 0,
|
|
228
340
|
y: 0
|
|
@@ -231,11 +343,11 @@ var Pt = (e, t, n) => {
|
|
|
231
343
|
x: 0,
|
|
232
344
|
y: 0
|
|
233
345
|
}
|
|
234
|
-
}),
|
|
346
|
+
}), cn = (e, t) => {
|
|
235
347
|
let { T: n, k: r } = e, { w: i, h: a } = t, o = (e, t, n) => {
|
|
236
|
-
let r =
|
|
348
|
+
let r = re(e) * n, i = re(t) * n;
|
|
237
349
|
if (r === i) {
|
|
238
|
-
let n =
|
|
350
|
+
let n = W(e), a = W(t);
|
|
239
351
|
i = n > a ? 0 : i, r = n < a ? 0 : r;
|
|
240
352
|
}
|
|
241
353
|
return r = r === i ? 0 : r, [r + 0, i + 0];
|
|
@@ -250,104 +362,104 @@ var Pt = (e, t, n) => {
|
|
|
250
362
|
y: u
|
|
251
363
|
}
|
|
252
364
|
};
|
|
253
|
-
},
|
|
365
|
+
}, ln = ({ T: e, k: t }) => {
|
|
254
366
|
let n = (e, t) => e === 0 && e <= t;
|
|
255
367
|
return {
|
|
256
368
|
x: n(e.x, t.x),
|
|
257
369
|
y: n(e.y, t.y)
|
|
258
370
|
};
|
|
259
|
-
},
|
|
260
|
-
let r = (e, t, n) =>
|
|
371
|
+
}, un = ({ T: e, k: t }, n) => {
|
|
372
|
+
let r = (e, t, n) => rt(0, 1, (e - n) / (e - t) || 0);
|
|
261
373
|
return {
|
|
262
374
|
x: r(e.x, t.x, n.x),
|
|
263
375
|
y: r(e.y, t.y, n.y)
|
|
264
376
|
};
|
|
265
|
-
},
|
|
377
|
+
}, dn = (e) => {
|
|
266
378
|
e && e.focus && e.focus({
|
|
267
379
|
preventScroll: !0,
|
|
268
380
|
focusVisible: !1
|
|
269
381
|
});
|
|
270
|
-
},
|
|
271
|
-
|
|
272
|
-
},
|
|
382
|
+
}, fn = (e, t) => {
|
|
383
|
+
K(De(t), e);
|
|
384
|
+
}, pn = (e) => {
|
|
273
385
|
let t = /* @__PURE__ */ new Map(), n = (e, n) => {
|
|
274
386
|
if (e) {
|
|
275
387
|
let r = t.get(e);
|
|
276
|
-
|
|
388
|
+
fn(((e) => {
|
|
277
389
|
r && r[e ? "delete" : "clear"](e);
|
|
278
390
|
}), n);
|
|
279
391
|
} else t.forEach(((e) => {
|
|
280
392
|
e.clear();
|
|
281
393
|
})), t.clear();
|
|
282
394
|
}, r = (e, i) => {
|
|
283
|
-
if (
|
|
395
|
+
if (ge(e)) {
|
|
284
396
|
let r = t.get(e) || /* @__PURE__ */ new Set();
|
|
285
|
-
return t.set(e, r),
|
|
286
|
-
|
|
397
|
+
return t.set(e, r), fn(((e) => {
|
|
398
|
+
ve(e) && r.add(e);
|
|
287
399
|
}), i), J(n, e, i);
|
|
288
400
|
}
|
|
289
|
-
|
|
401
|
+
_e(i) && i && n();
|
|
290
402
|
let a = Y(e), o = [];
|
|
291
|
-
return
|
|
403
|
+
return K(a, ((t) => {
|
|
292
404
|
let n = e[t];
|
|
293
|
-
n &&
|
|
294
|
-
})), J(
|
|
405
|
+
n && q(o, r(t, n));
|
|
406
|
+
})), J(Ae, o);
|
|
295
407
|
};
|
|
296
408
|
return r(e || {}), [
|
|
297
409
|
r,
|
|
298
410
|
n,
|
|
299
411
|
(e, n) => {
|
|
300
|
-
|
|
301
|
-
n && !
|
|
412
|
+
K(Ee(t.get(e)), ((e) => {
|
|
413
|
+
n && !Oe(n) ? e.apply(0, n) : e();
|
|
302
414
|
}));
|
|
303
415
|
}
|
|
304
416
|
];
|
|
305
|
-
},
|
|
306
|
-
|
|
307
|
-
|
|
417
|
+
}, mn = {}, hn = {}, gn = (e) => {
|
|
418
|
+
K(e, ((e) => K(e, ((t, n) => {
|
|
419
|
+
mn[n] = e[n];
|
|
308
420
|
}))));
|
|
309
|
-
},
|
|
421
|
+
}, _n = (e, t, n) => Y(e).map(((r) => {
|
|
310
422
|
let { static: i, instance: a } = e[r], [o, s, c] = n || [], l = n ? a : i;
|
|
311
423
|
if (l) {
|
|
312
424
|
let e = n ? l(o, s, t) : l(t);
|
|
313
|
-
return (c ||
|
|
425
|
+
return (c || hn)[r] = e;
|
|
314
426
|
}
|
|
315
|
-
})),
|
|
316
|
-
`${
|
|
317
|
-
var
|
|
427
|
+
})), vn = (e, t) => e[t], yn = (e) => vn(hn, e), bn = "__osOptionsValidationPlugin", xn = "data-overlayscrollbars", Sn = "os-environment", Cn = `${Sn}-scrollbar-hidden`, wn = `${xn}-initialize`, Tn = "noClipping", En = `${xn}-body`, Dn = xn, On = "host", kn = `${xn}-viewport`, An = Re, jn = ze, Mn = "arrange", Nn = "measuring", Pn = "scrolling", Fn = "scrollbarHidden", In = "noContent", Ln = `${xn}-padding`, Rn = `${xn}-content`, zn = "os-size-observer", Bn = `${zn}-appear`, Vn = `${zn}-listener`;
|
|
428
|
+
`${Vn}`, `${Vn}`;
|
|
429
|
+
var Hn = "os-trinsic-observer", Un = "os-theme-none", Wn = "os-scrollbar", Gn = `${Wn}-rtl`, Kn = `${Wn}-horizontal`, qn = `${Wn}-vertical`, Jn = `${Wn}-track`, Yn = `${Wn}-handle`, Xn = `${Wn}-visible`, Zn = `${Wn}-cornerless`, Qn = `${Wn}-interaction`, $n = `${Wn}-unusable`, er = `${Wn}-auto-hide`, tr = `${er}-hidden`, nr = `${Wn}-wheel`, rr = `${Jn}-interactive`, ir = `${Yn}-interactive`, ar = "__osSizeObserverPlugin", or = (e, t) => {
|
|
318
430
|
let { M: n } = t, [r, i] = e("showNativeOverlaidScrollbars");
|
|
319
431
|
return [r && n.x && n.y, i];
|
|
320
|
-
},
|
|
321
|
-
if (e === "auto") return t ?
|
|
322
|
-
let n = e ||
|
|
432
|
+
}, sr = (e) => e.indexOf(He) === 0, cr = (e) => e.replace(`${He}-`, ""), lr = (e, t) => {
|
|
433
|
+
if (e === "auto") return t ? We : Ue;
|
|
434
|
+
let n = e || Ue;
|
|
323
435
|
return [
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
].includes(n) ? n :
|
|
328
|
-
},
|
|
329
|
-
let { overflowX: n, overflowY: r } =
|
|
436
|
+
Ue,
|
|
437
|
+
We,
|
|
438
|
+
He
|
|
439
|
+
].includes(n) ? n : Ue;
|
|
440
|
+
}, ur = (e, t) => {
|
|
441
|
+
let { overflowX: n, overflowY: r } = zt(e, [Re, ze]);
|
|
330
442
|
return {
|
|
331
|
-
x:
|
|
332
|
-
y:
|
|
443
|
+
x: lr(n, t.x),
|
|
444
|
+
y: lr(r, t.y)
|
|
333
445
|
};
|
|
334
|
-
},
|
|
335
|
-
if (
|
|
446
|
+
}, dr = "__osScrollbarsHidingPlugin", fr = "__osClickScrollPlugin", pr = (e) => JSON.stringify(e, ((e, t) => {
|
|
447
|
+
if (ve(t)) throw 0;
|
|
336
448
|
return t;
|
|
337
|
-
})),
|
|
449
|
+
})), mr = (e, t) => e ? `${t}`.split(".").reduce(((e, t) => e && $e(e, t) ? e[t] : void 0), e) : void 0, hr = [0, 33], gr = [33, 99], _r = [
|
|
338
450
|
222,
|
|
339
451
|
666,
|
|
340
452
|
!0
|
|
341
|
-
],
|
|
453
|
+
], vr = {
|
|
342
454
|
paddingAbsolute: !1,
|
|
343
455
|
showNativeOverlaidScrollbars: !1,
|
|
344
456
|
update: {
|
|
345
457
|
elementEvents: [["img", "load"]],
|
|
346
458
|
debounce: {
|
|
347
|
-
mutation:
|
|
459
|
+
mutation: hr,
|
|
348
460
|
resize: null,
|
|
349
|
-
event:
|
|
350
|
-
env:
|
|
461
|
+
event: gr,
|
|
462
|
+
env: _r
|
|
351
463
|
},
|
|
352
464
|
attributes: null,
|
|
353
465
|
ignoreMutation: null,
|
|
@@ -371,40 +483,40 @@ var In = "os-trinsic-observer", Ln = "os-theme-none", Rn = "os-scrollbar", zn =
|
|
|
371
483
|
"pen"
|
|
372
484
|
]
|
|
373
485
|
}
|
|
374
|
-
},
|
|
486
|
+
}, yr = (e, t) => {
|
|
375
487
|
let n = {};
|
|
376
|
-
return
|
|
488
|
+
return K(Te(Y(t), Y(e)), ((r) => {
|
|
377
489
|
let i = e[r], a = t[r];
|
|
378
|
-
if (
|
|
379
|
-
else if (
|
|
490
|
+
if (ye(i) && ye(a)) X(n[r] = {}, yr(i, a)), tt(n[r]) && delete n[r];
|
|
491
|
+
else if ($e(t, r) && a !== i) {
|
|
380
492
|
let e = !0;
|
|
381
|
-
if (
|
|
382
|
-
|
|
493
|
+
if (G(i) || G(a)) try {
|
|
494
|
+
pr(i) === pr(a) && (e = !1);
|
|
383
495
|
} catch {}
|
|
384
496
|
e && (n[r] = a);
|
|
385
497
|
}
|
|
386
498
|
})), n;
|
|
387
|
-
},
|
|
388
|
-
|
|
389
|
-
},
|
|
499
|
+
}, br = (e, t, n) => (r) => [mr(e, r), n || mr(t, r) !== void 0], xr, Sr = () => xr, Cr = (e) => {
|
|
500
|
+
xr = e;
|
|
501
|
+
}, wr, Tr = () => {
|
|
390
502
|
let e = (e, t, n) => {
|
|
391
|
-
|
|
392
|
-
let r =
|
|
393
|
-
return n &&
|
|
503
|
+
Dt(document.body, e), Dt(document.body, e);
|
|
504
|
+
let r = qt(e), i = Kt(e), a = Yt(t);
|
|
505
|
+
return n && Et(e), {
|
|
394
506
|
x: i.h - r.h + a.h,
|
|
395
507
|
y: i.w - r.w + a.w
|
|
396
508
|
};
|
|
397
509
|
}, t = (e) => {
|
|
398
|
-
let t = !1, n =
|
|
510
|
+
let t = !1, n = gt(e, Cn);
|
|
399
511
|
try {
|
|
400
|
-
t =
|
|
512
|
+
t = zt(e, "scrollbar-width") === "none" || zt(e, "display", "::-webkit-scrollbar") === "none";
|
|
401
513
|
} catch {}
|
|
402
514
|
return n(), t;
|
|
403
|
-
}, n =
|
|
515
|
+
}, n = Mt(`<div class="${Sn}"><div></div><style>${`.${Sn}{scroll-behavior:auto!important;position:fixed;opacity:0;visibility:hidden;overflow:scroll;height:200px;width:200px;z-index:-1}.${Sn} div{width:200%;height:200%;margin:10px 0}.${Cn}{scrollbar-width:none!important}.${Cn}::-webkit-scrollbar,.${Cn}::-webkit-scrollbar-corner{appearance:none!important;display:none!important;width:0!important;height:0!important}`}</style></div>`)[0], r = n.firstChild, i = n.lastChild, a = Sr();
|
|
404
516
|
a && (i.nonce = a);
|
|
405
|
-
let [o, , s] =
|
|
517
|
+
let [o, , s] = pn(), [c, l] = H({
|
|
406
518
|
o: e(n, r),
|
|
407
|
-
i:
|
|
519
|
+
i: Je
|
|
408
520
|
}, J(e, n, r, !0)), [u] = l(), d = t(n), f = {
|
|
409
521
|
x: u.x === 0,
|
|
410
522
|
y: u.y === 0
|
|
@@ -412,7 +524,7 @@ var In = "os-trinsic-observer", Ln = "os-theme-none", Rn = "os-scrollbar", zn =
|
|
|
412
524
|
elements: {
|
|
413
525
|
host: null,
|
|
414
526
|
padding: !d,
|
|
415
|
-
viewport: (e) => d &&
|
|
527
|
+
viewport: (e) => d && bt(e) && e,
|
|
416
528
|
content: !1
|
|
417
529
|
},
|
|
418
530
|
scrollbars: { slot: !0 },
|
|
@@ -420,11 +532,11 @@ var In = "os-trinsic-observer", Ln = "os-theme-none", Rn = "os-scrollbar", zn =
|
|
|
420
532
|
nativeScrollbarsOverlaid: !1,
|
|
421
533
|
body: null
|
|
422
534
|
}
|
|
423
|
-
}, m = X({},
|
|
535
|
+
}, m = X({}, vr), h = J(X, {}, m), g = J(X, {}, p), _ = {
|
|
424
536
|
U: u,
|
|
425
537
|
M: f,
|
|
426
538
|
P: d,
|
|
427
|
-
J: !!
|
|
539
|
+
J: !!fe,
|
|
428
540
|
G: J(o, "r"),
|
|
429
541
|
K: g,
|
|
430
542
|
Z: (e) => X(p, e) && g(),
|
|
@@ -433,11 +545,11 @@ var In = "os-trinsic-observer", Ln = "os-theme-none", Rn = "os-scrollbar", zn =
|
|
|
433
545
|
ot: X({}, p),
|
|
434
546
|
st: X({}, m)
|
|
435
547
|
};
|
|
436
|
-
if (
|
|
548
|
+
if (ct(n, "style"), Et(n), Z(U, "resize", (() => {
|
|
437
549
|
s("r", []);
|
|
438
|
-
})),
|
|
550
|
+
})), ve(U.matchMedia) && !d && (!f.x || !f.y)) {
|
|
439
551
|
let e = (t) => {
|
|
440
|
-
|
|
552
|
+
Z(U.matchMedia(`(resolution: ${U.devicePixelRatio}dppx)`), "change", (() => {
|
|
441
553
|
t(), e(t);
|
|
442
554
|
}), { A: !0 });
|
|
443
555
|
};
|
|
@@ -447,42 +559,42 @@ var In = "os-trinsic-observer", Ln = "os-theme-none", Rn = "os-scrollbar", zn =
|
|
|
447
559
|
}));
|
|
448
560
|
}
|
|
449
561
|
return _;
|
|
450
|
-
},
|
|
562
|
+
}, Er = () => (wr ||= Tr(), wr), Dr = (e, t, n) => {
|
|
451
563
|
let r = !1, i = n ? /* @__PURE__ */ new WeakMap() : !1, a = () => {
|
|
452
564
|
r = !0;
|
|
453
565
|
}, o = (a) => {
|
|
454
|
-
i && n &&
|
|
566
|
+
i && n && K(n.map(((t) => {
|
|
455
567
|
let [n, r] = t || [];
|
|
456
|
-
return [r && n ? (a ||
|
|
457
|
-
})), ((n) =>
|
|
568
|
+
return [r && n ? (a || _t)(n, e) : [], r];
|
|
569
|
+
})), ((n) => K(n[0], ((a) => {
|
|
458
570
|
let o = n[1], s = i.get(a) || [];
|
|
459
571
|
if (e.contains(a) && o) {
|
|
460
|
-
let e =
|
|
572
|
+
let e = Z(a, o, ((n) => {
|
|
461
573
|
r ? (e(), i.delete(a)) : t(n);
|
|
462
574
|
}));
|
|
463
|
-
i.set(a,
|
|
464
|
-
} else
|
|
575
|
+
i.set(a, q(s, e));
|
|
576
|
+
} else Ae(s), i.delete(a);
|
|
465
577
|
}))));
|
|
466
578
|
};
|
|
467
579
|
return o(), [a, o];
|
|
468
|
-
},
|
|
469
|
-
let i = !1, { et: a, ct: o, rt: s, it: c, lt: l, ut: u } = r || {}, [d, f] =
|
|
470
|
-
if (!
|
|
471
|
-
let o = l ||
|
|
472
|
-
if (
|
|
473
|
-
let { attributeName: i, target: a, type: l, oldValue: u, addedNodes: f, removedNodes: _ } = n, v = l === "attributes", y = l === "childList", b = e === a, x = v && i, S = x &&
|
|
580
|
+
}, Or = (e, t, n, r) => {
|
|
581
|
+
let i = !1, { et: a, ct: o, rt: s, it: c, lt: l, ut: u } = r || {}, [d, f] = Dr(e, (() => i && n(!0)), s), p = a || [], m = o || [], h = Te(p, m), g = (i, a) => {
|
|
582
|
+
if (!Oe(a)) {
|
|
583
|
+
let o = l || nt, s = u || nt, d = [], p = [], h = !1, g = !1;
|
|
584
|
+
if (K(a, ((n) => {
|
|
585
|
+
let { attributeName: i, target: a, type: l, oldValue: u, addedNodes: f, removedNodes: _ } = n, v = l === "attributes", y = l === "childList", b = e === a, x = v && i, S = x && at(a, i || ""), C = ge(S) ? S : null, w = x && u !== C, T = we(m, i) && w;
|
|
474
586
|
if (t && (y || !b)) {
|
|
475
|
-
let t = v && w, l = t && c &&
|
|
476
|
-
|
|
587
|
+
let t = v && w, l = t && c && yt(a, c), p = (l ? !o(a, i, u, C) : !v || t) && !s(n, !!l, e, r);
|
|
588
|
+
K(f, ((e) => q(d, e))), K(_, ((e) => q(d, e))), g ||= p;
|
|
477
589
|
}
|
|
478
|
-
!t && b && w && !o(a, i, u, C) && (
|
|
479
|
-
})), f(((e) =>
|
|
480
|
-
if (!
|
|
481
|
-
let e = [
|
|
590
|
+
!t && b && w && !o(a, i, u, C) && (q(p, i), h ||= T);
|
|
591
|
+
})), f(((e) => ke(d).reduce(((t, n) => (q(t, _t(e, n)), yt(n, e) ? q(t, n) : t)), []))), t) return !i && g && n(!1), [!1];
|
|
592
|
+
if (!Oe(p) || h) {
|
|
593
|
+
let e = [ke(p), h];
|
|
482
594
|
return i || n.apply(0, e), e;
|
|
483
595
|
}
|
|
484
596
|
}
|
|
485
|
-
}, _ = new
|
|
597
|
+
}, _ = new le(J(g, !1));
|
|
486
598
|
return [() => (_.observe(e, {
|
|
487
599
|
attributes: !0,
|
|
488
600
|
attributeOldValue: !0,
|
|
@@ -495,52 +607,52 @@ var In = "os-trinsic-observer", Ln = "os-theme-none", Rn = "os-scrollbar", zn =
|
|
|
495
607
|
}), () => {
|
|
496
608
|
if (i) return g(!0, _.takeRecords());
|
|
497
609
|
}];
|
|
498
|
-
},
|
|
499
|
-
let { ft: r } = n || {}, i =
|
|
610
|
+
}, kr = null, Ar = (e, t, n) => {
|
|
611
|
+
let { ft: r } = n || {}, i = yn(ar), [a] = H({
|
|
500
612
|
o: !1,
|
|
501
613
|
u: !0
|
|
502
614
|
});
|
|
503
615
|
return () => {
|
|
504
|
-
let n = [], o =
|
|
505
|
-
let n =
|
|
616
|
+
let n = [], o = Mt(`<div class="${zn}"><div class="${Vn}"></div></div>`)[0], s = o.firstChild, c = (e) => {
|
|
617
|
+
let n = G(e) && !Oe(e), r = !1, i = !1;
|
|
506
618
|
if (n) {
|
|
507
|
-
let t = e[0], [n, , o] = a(t.contentRect), s =
|
|
508
|
-
i =
|
|
619
|
+
let t = e[0], [n, , o] = a(t.contentRect), s = Qt(n);
|
|
620
|
+
i = $t(n, o), r = !i && !s;
|
|
509
621
|
} else i = e === !0;
|
|
510
622
|
r || t({
|
|
511
623
|
_t: !0,
|
|
512
624
|
ft: i
|
|
513
625
|
});
|
|
514
626
|
};
|
|
515
|
-
if (
|
|
516
|
-
if (!
|
|
517
|
-
let t = new
|
|
627
|
+
if (de) {
|
|
628
|
+
if (!_e(kr)) {
|
|
629
|
+
let t = new de(nt);
|
|
518
630
|
t.observe(e, { get box() {
|
|
519
|
-
|
|
520
|
-
} }),
|
|
631
|
+
kr = !0;
|
|
632
|
+
} }), kr ||= !1, t.disconnect();
|
|
521
633
|
}
|
|
522
|
-
let t =
|
|
634
|
+
let t = Qe(c, {
|
|
523
635
|
p: 0,
|
|
524
636
|
v: 0
|
|
525
|
-
}), r = (e) => t(e), i = new
|
|
526
|
-
if (i.observe(
|
|
637
|
+
}), r = (e) => t(e), i = new de(r);
|
|
638
|
+
if (i.observe(kr ? e : s), q(n, [() => {
|
|
527
639
|
i.disconnect();
|
|
528
|
-
}, !
|
|
529
|
-
let t = new
|
|
530
|
-
t.observe(e, { box: "border-box" }),
|
|
640
|
+
}, !kr && Dt(e, o)]), kr) {
|
|
641
|
+
let t = new de(r);
|
|
642
|
+
t.observe(e, { box: "border-box" }), q(n, (() => t.disconnect()));
|
|
531
643
|
}
|
|
532
644
|
} else if (i) {
|
|
533
645
|
let [t, a] = i(s, c, r);
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
646
|
+
q(n, Te([
|
|
647
|
+
gt(o, Bn),
|
|
648
|
+
Z(o, "animationstart", t),
|
|
649
|
+
Dt(e, o)
|
|
538
650
|
], a));
|
|
539
|
-
} else return
|
|
540
|
-
return J(
|
|
651
|
+
} else return nt;
|
|
652
|
+
return J(Ae, n);
|
|
541
653
|
};
|
|
542
|
-
},
|
|
543
|
-
let n, r = (e) => e.h === 0 || e.isIntersecting || e.intersectionRatio > 0, i =
|
|
654
|
+
}, jr = (e, t) => {
|
|
655
|
+
let n, r = (e) => e.h === 0 || e.isIntersecting || e.intersectionRatio > 0, i = jt(Hn), [a] = H({ o: !1 }), o = (e, n) => {
|
|
544
656
|
if (e) {
|
|
545
657
|
let i = a(r(e)), [, o] = i;
|
|
546
658
|
return o && !n && t(i) && [i];
|
|
@@ -548,20 +660,20 @@ var In = "os-trinsic-observer", Ln = "os-theme-none", Rn = "os-scrollbar", zn =
|
|
|
548
660
|
}, s = (e, t) => o(t.pop(), e);
|
|
549
661
|
return [() => {
|
|
550
662
|
let t = [];
|
|
551
|
-
if (
|
|
663
|
+
if (ue) n = new ue(J(s, !1), { root: e }), n.observe(i), q(t, (() => {
|
|
552
664
|
n.disconnect();
|
|
553
665
|
}));
|
|
554
666
|
else {
|
|
555
667
|
let e = () => {
|
|
556
|
-
let e =
|
|
668
|
+
let e = Kt(i);
|
|
557
669
|
o(e);
|
|
558
670
|
};
|
|
559
|
-
|
|
671
|
+
q(t, Ar(i, e)()), e();
|
|
560
672
|
}
|
|
561
|
-
return J(
|
|
673
|
+
return J(Ae, q(t, Dt(e, i)));
|
|
562
674
|
}, () => n && s(!0, n.takeRecords())];
|
|
563
|
-
},
|
|
564
|
-
let i, a, o, s, c, l, u, d, f = `[${
|
|
675
|
+
}, Mr = (e, t, n, r) => {
|
|
676
|
+
let i, a, o, s, c, l, u, d, f = `[${Dn}]`, p = `[${kn}]`, m = [
|
|
565
677
|
"id",
|
|
566
678
|
"class",
|
|
567
679
|
"style",
|
|
@@ -569,70 +681,70 @@ var In = "os-trinsic-observer", Ln = "os-theme-none", Rn = "os-scrollbar", zn =
|
|
|
569
681
|
"wrap",
|
|
570
682
|
"cols",
|
|
571
683
|
"rows"
|
|
572
|
-
], { dt: h, vt: g, L: _, gt: v, ht: y, V: b, bt: x, yt: S, wt: C, St: w } = e, T = (e) =>
|
|
573
|
-
let e, t, n, i =
|
|
684
|
+
], { dt: h, vt: g, L: _, gt: v, ht: y, V: b, bt: x, yt: S, wt: C, St: w } = e, T = (e) => zt(e, "direction") === "rtl", E = () => {
|
|
685
|
+
let e, t, n, i = Qe(r, {
|
|
574
686
|
p: () => e,
|
|
575
687
|
v: () => t,
|
|
576
688
|
S: () => n,
|
|
577
689
|
m(e, t) {
|
|
578
690
|
let [n] = e, [r] = t;
|
|
579
|
-
return [
|
|
691
|
+
return [Te(Y(n), Y(r)).reduce(((e, t) => (e[t] = n[t] || r[t], e)), {})];
|
|
580
692
|
}
|
|
581
693
|
}), a = (r, a) => {
|
|
582
|
-
if (
|
|
694
|
+
if (G(a)) {
|
|
583
695
|
let [r, i, o] = a;
|
|
584
696
|
e = r, t = i, n = o;
|
|
585
|
-
} else
|
|
697
|
+
} else he(a) ? (e = a, t = !1, n = !1) : (e = !1, t = !1, n = !1);
|
|
586
698
|
i(r);
|
|
587
699
|
};
|
|
588
700
|
return a.O = i.O, a;
|
|
589
701
|
}, D = {
|
|
590
702
|
Ot: !1,
|
|
591
703
|
B: T(h)
|
|
592
|
-
}, O =
|
|
593
|
-
i:
|
|
704
|
+
}, O = Er(), k = yn(dr), [A] = H({
|
|
705
|
+
i: qe,
|
|
594
706
|
o: {
|
|
595
707
|
w: 0,
|
|
596
708
|
h: 0
|
|
597
709
|
}
|
|
598
710
|
}, (() => {
|
|
599
|
-
let r = k && k.R(e, t, D, O, n).Y, i = !(x && b) &&
|
|
600
|
-
return l && l(),
|
|
711
|
+
let r = k && k.R(e, t, D, O, n).Y, i = !(x && b) && pt(g, Dn, Tn), a = !b && S(Mn), o = a && on(v), s = o && w(), c = C(Nn, i), l = a && r && r(), u = Jt(_), d = Yt(_);
|
|
712
|
+
return l && l(), an(v, o), s && s(), i && c(), {
|
|
601
713
|
w: u.w + d.w,
|
|
602
714
|
h: u.h + d.h
|
|
603
715
|
};
|
|
604
716
|
})), j = E(), M = (e) => {
|
|
605
717
|
let t = T(h);
|
|
606
718
|
X(e, { Ct: d !== t }), X(D, { B: t }), d = t;
|
|
607
|
-
},
|
|
719
|
+
}, N = (e, t) => {
|
|
608
720
|
let [n, i] = e, a = { $t: i };
|
|
609
721
|
return X(D, { Ot: n }), t || r(a), a;
|
|
610
|
-
},
|
|
722
|
+
}, P = ({ _t: e, ft: t }) => {
|
|
611
723
|
let n = t ? r : j, i = {
|
|
612
724
|
_t: e || t,
|
|
613
725
|
ft: t
|
|
614
726
|
};
|
|
615
727
|
M(i), n(i, a);
|
|
616
|
-
},
|
|
728
|
+
}, F = (e, t) => {
|
|
617
729
|
let [, n] = A(), r = { xt: n };
|
|
618
730
|
return M(r), n && !t && j(r, e ? o : i), r;
|
|
619
|
-
},
|
|
731
|
+
}, I = (e, t, n) => {
|
|
620
732
|
let r = { Ht: t };
|
|
621
733
|
return M(r), t && !n && j(r, i), r;
|
|
622
|
-
}, [
|
|
734
|
+
}, [L, R] = y ? jr(g, N) : [], z = !b && Ar(g, P, { ft: !0 }), [B, V] = Or(g, !1, I, {
|
|
623
735
|
ct: m,
|
|
624
736
|
et: m
|
|
625
|
-
}),
|
|
737
|
+
}), U = b && de && new de(((e) => {
|
|
626
738
|
let t = e[e.length - 1].contentRect;
|
|
627
|
-
|
|
739
|
+
P({
|
|
628
740
|
_t: !0,
|
|
629
|
-
ft:
|
|
741
|
+
ft: $t(t, u)
|
|
630
742
|
}), u = t;
|
|
631
743
|
}));
|
|
632
744
|
return [
|
|
633
745
|
() => {
|
|
634
|
-
|
|
635
|
-
let e =
|
|
746
|
+
U && U.observe(g);
|
|
747
|
+
let e = z && z(), t = L && L(), n = B(), r = O.G(((e) => {
|
|
636
748
|
let [, t] = A();
|
|
637
749
|
j({
|
|
638
750
|
Et: e,
|
|
@@ -641,53 +753,53 @@ var In = "os-trinsic-observer", Ln = "os-theme-none", Rn = "os-scrollbar", zn =
|
|
|
641
753
|
}, s);
|
|
642
754
|
}));
|
|
643
755
|
return () => {
|
|
644
|
-
|
|
756
|
+
U && U.disconnect(), e && e(), t && t(), l && l(), n(), r();
|
|
645
757
|
};
|
|
646
758
|
},
|
|
647
759
|
({ Dt: e, zt: t, It: n }) => {
|
|
648
|
-
let r = {}, [u] = e("update.ignoreMutation"), [d, h] = e("update.attributes"), [g, v] = e("update.elementEvents"), [x, S] = e("update.debounce"), C = v || h, w = t || n, T = (e) =>
|
|
760
|
+
let r = {}, [u] = e("update.ignoreMutation"), [d, h] = e("update.attributes"), [g, v] = e("update.elementEvents"), [x, S] = e("update.debounce"), C = v || h, w = t || n, T = (e) => ve(u) && !!u(e);
|
|
649
761
|
if (C) {
|
|
650
762
|
c && c(), l && l();
|
|
651
|
-
let [e, t] =
|
|
652
|
-
et:
|
|
763
|
+
let [e, t] = Or(y || _, !0, F, {
|
|
764
|
+
et: Te(m, d || []),
|
|
653
765
|
rt: g,
|
|
654
766
|
it: f,
|
|
655
767
|
ut: (e, t) => {
|
|
656
768
|
let { target: n, attributeName: r } = e;
|
|
657
|
-
return (!t && r && !b ?
|
|
769
|
+
return (!t && r && !b ? Tt(n, f, p) : !1) || !!Ct(n, `.${Wn}`) || T(e);
|
|
658
770
|
}
|
|
659
771
|
});
|
|
660
772
|
l = e(), c = t;
|
|
661
773
|
}
|
|
662
|
-
if (S && (j.O(),
|
|
663
|
-
let e =
|
|
664
|
-
e && X(r,
|
|
774
|
+
if (S && (j.O(), G(x) || he(x) ? (i = x, a = !1, o = gr, s = _r) : xe(x) ? (i = x.mutation, a = x.resize, o = x.event, s = x.env) : (i = !1, a = !1, o = !1, s = !1)), w) {
|
|
775
|
+
let e = V(), t = R && R(), n = c && c();
|
|
776
|
+
e && X(r, I(e[0], e[1], w)), t && X(r, N(t[0], w)), n && X(r, F(n[0], w));
|
|
665
777
|
}
|
|
666
778
|
return M(r), r;
|
|
667
779
|
},
|
|
668
780
|
D
|
|
669
781
|
];
|
|
670
|
-
},
|
|
671
|
-
let i =
|
|
672
|
-
return !!i && (
|
|
673
|
-
},
|
|
674
|
-
let { nativeScrollbarsOverlaid: n, body: r } = t || {}, { M: i, P: a, K: o } =
|
|
782
|
+
}, Nr = (e, t) => ve(t) ? t.apply(0, e) : t, Pr = (e, t, n, r) => Nr(e, pe(r) ? n : r) || t.apply(0, e), Fr = (e, t, n, r) => {
|
|
783
|
+
let i = Nr(e, pe(r) ? n : r);
|
|
784
|
+
return !!i && (Se(i) ? i : t.apply(0, e));
|
|
785
|
+
}, Ir = (e, t) => {
|
|
786
|
+
let { nativeScrollbarsOverlaid: n, body: r } = t || {}, { M: i, P: a, K: o } = Er(), { nativeScrollbarsOverlaid: s, body: c } = o().cancel, l = n ?? s, u = pe(r) ? c : r, d = (i.x || i.y) && l, f = e && (me(u) ? !a : u);
|
|
675
787
|
return !!d || !!f;
|
|
676
|
-
},
|
|
677
|
-
let { K: i } =
|
|
788
|
+
}, Lr = (e, t, n, r) => {
|
|
789
|
+
let { K: i } = Er(), { scrollbars: a } = i(), { slot: o } = a, { dt: s, vt: c, L: l, At: u, gt: d, bt: f, V: p } = t, { scrollbars: m } = u ? {} : e, { slot: h } = m || {}, g = [], _ = [], v = [], y = Fr([
|
|
678
790
|
s,
|
|
679
791
|
c,
|
|
680
792
|
l
|
|
681
793
|
], (() => p && f ? s : c), o, h), b = (e) => {
|
|
682
|
-
if (
|
|
683
|
-
let t = null, r = [], i = new
|
|
794
|
+
if (fe) {
|
|
795
|
+
let t = null, r = [], i = new fe({
|
|
684
796
|
source: d,
|
|
685
797
|
axis: e
|
|
686
798
|
}), a = () => {
|
|
687
799
|
t && t.cancel(), t = null;
|
|
688
800
|
};
|
|
689
801
|
return { Mt: (o) => {
|
|
690
|
-
let { Tt: s } = n, c =
|
|
802
|
+
let { Tt: s } = n, c = ln(s)[e], l = e === "x", u = [Vt(0, l), Vt(`calc(-100% + 100cq${l ? "w" : "h"})`, l)], d = c ? u : u.reverse();
|
|
691
803
|
return r[0] === d[0] && r[1] === d[1] ? a : (r = d, a(), t = o.kt.animate({
|
|
692
804
|
clear: ["left"],
|
|
693
805
|
transform: d
|
|
@@ -698,43 +810,43 @@ var In = "os-trinsic-observer", Ln = "os-theme-none", Rn = "os-scrollbar", zn =
|
|
|
698
810
|
x: b("x"),
|
|
699
811
|
y: b("y")
|
|
700
812
|
}, S = () => {
|
|
701
|
-
let { Rt: e, Vt: t } = n, r = (e, t) =>
|
|
813
|
+
let { Rt: e, Vt: t } = n, r = (e, t) => rt(0, 1, e / (e + t) || 0);
|
|
702
814
|
return {
|
|
703
815
|
x: r(t.x, e.x),
|
|
704
816
|
y: r(t.y, e.y)
|
|
705
817
|
};
|
|
706
818
|
}, C = (e, t, n) => {
|
|
707
|
-
let r = n ?
|
|
708
|
-
|
|
819
|
+
let r = n ? gt : ht;
|
|
820
|
+
K(e, ((e) => {
|
|
709
821
|
r(e.Lt, t);
|
|
710
822
|
}));
|
|
711
823
|
}, w = (e, t) => {
|
|
712
|
-
|
|
824
|
+
K(e, ((e) => {
|
|
713
825
|
let [n, r] = t(e);
|
|
714
|
-
|
|
826
|
+
Rt(n, r);
|
|
715
827
|
}));
|
|
716
828
|
}, T = (e, t, n) => {
|
|
717
|
-
let r =
|
|
829
|
+
let r = _e(n), i = !r || n, a = !r || !n;
|
|
718
830
|
i && C(_, e, t), a && C(v, e, t);
|
|
719
831
|
}, E = () => {
|
|
720
|
-
let e = S(), t = (e) => (t) => [t.Lt, { "--os-viewport-percent":
|
|
832
|
+
let e = S(), t = (e) => (t) => [t.Lt, { "--os-viewport-percent": It(e) + "" }];
|
|
721
833
|
w(_, t(e.x)), w(v, t(e.y));
|
|
722
834
|
}, D = () => {
|
|
723
|
-
if (!
|
|
724
|
-
let { Tt: e } = n, t =
|
|
835
|
+
if (!fe) {
|
|
836
|
+
let { Tt: e } = n, t = un(e, on(d)), r = (e) => (t) => [t.Lt, { "--os-scroll-percent": It(e) + "" }];
|
|
725
837
|
w(_, r(t.x)), w(v, r(t.y));
|
|
726
838
|
}
|
|
727
839
|
}, O = () => {
|
|
728
|
-
let { Tt: e } = n, t =
|
|
729
|
-
w(_, r(t.x)), w(v, r(t.y)),
|
|
840
|
+
let { Tt: e } = n, t = ln(e), r = (e) => (t) => [t.Lt, { "--os-scroll-direction": e ? "0" : "1" }];
|
|
841
|
+
w(_, r(t.x)), w(v, r(t.y)), fe && (_.forEach(x.x.Mt), v.forEach(x.y.Mt));
|
|
730
842
|
}, k = () => {
|
|
731
843
|
if (p && !f) {
|
|
732
|
-
let { Rt: e, Tt: t } = n, r =
|
|
733
|
-
let { Lt: n } = t, a =
|
|
844
|
+
let { Rt: e, Tt: t } = n, r = ln(t), i = un(t, on(d)), a = (t) => {
|
|
845
|
+
let { Lt: n } = t, a = St(n) === l && n, o = (e, t, n) => {
|
|
734
846
|
let r = t * e;
|
|
735
|
-
return
|
|
847
|
+
return Lt(n ? r : -r);
|
|
736
848
|
};
|
|
737
|
-
return [a, a && { transform:
|
|
849
|
+
return [a, a && { transform: Vt({
|
|
738
850
|
x: o(i.x, e.x, r.x),
|
|
739
851
|
y: o(i.y, e.y, r.y)
|
|
740
852
|
}) }];
|
|
@@ -742,15 +854,15 @@ var In = "os-trinsic-observer", Ln = "os-theme-none", Rn = "os-scrollbar", zn =
|
|
|
742
854
|
w(_, a), w(v, a);
|
|
743
855
|
}
|
|
744
856
|
}, A = (e) => {
|
|
745
|
-
let t = e ? "x" : "y", n =
|
|
857
|
+
let t = e ? "x" : "y", n = jt(`${Wn} ${e ? Kn : qn}`), i = jt(Jn), a = jt(Yn), o = {
|
|
746
858
|
Lt: n,
|
|
747
859
|
Pt: i,
|
|
748
860
|
kt: a
|
|
749
861
|
}, s = x[t];
|
|
750
|
-
return
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
J(
|
|
862
|
+
return q(e ? _ : v, o), q(g, [
|
|
863
|
+
Dt(n, i),
|
|
864
|
+
Dt(i, a),
|
|
865
|
+
J(Et, n),
|
|
754
866
|
s && s.Mt(o),
|
|
755
867
|
r(o, T, e)
|
|
756
868
|
]), o;
|
|
@@ -771,87 +883,87 @@ var In = "os-trinsic-observer", Ln = "os-theme-none", Rn = "os-scrollbar", zn =
|
|
|
771
883
|
Yt: M,
|
|
772
884
|
Wt: J(w, v)
|
|
773
885
|
}
|
|
774
|
-
}, () => (
|
|
775
|
-
},
|
|
776
|
-
let { vt: c, L: l, V: u, gt: d, Gt: f, St: p } = t, { Lt: m, Pt: h, kt: g } = a, [_, v] =
|
|
777
|
-
|
|
886
|
+
}, () => (Dt(y, _[0].Lt), Dt(y, v[0].Lt), J(Ae, g))];
|
|
887
|
+
}, Rr = (e, t, n, r, i) => (a, o, s) => {
|
|
888
|
+
let { vt: c, L: l, V: u, gt: d, Gt: f, St: p } = t, { Lt: m, Pt: h, kt: g } = a, [_, v] = Xe(333), [y, b] = Xe(444), x = (e) => {
|
|
889
|
+
ve(d.scrollBy) && d.scrollBy({
|
|
778
890
|
behavior: "smooth",
|
|
779
891
|
left: e.x,
|
|
780
892
|
top: e.y
|
|
781
893
|
});
|
|
782
894
|
}, S = () => {
|
|
783
|
-
let t = "pointerup pointercancel lostpointercapture", i = `client${s ? "X" : "Y"}`, a = s ?
|
|
784
|
-
return
|
|
785
|
-
let m =
|
|
895
|
+
let t = "pointerup pointercancel lostpointercapture", i = `client${s ? "X" : "Y"}`, a = s ? Be : Ve, o = s ? "left" : "top", c = s ? "w" : "h", l = s ? "x" : "y", u = [];
|
|
896
|
+
return Z(h, "pointerdown", r(((r) => {
|
|
897
|
+
let m = Ct(r.target, `.${Yn}`) === g, _ = m ? g : h, v = e.scrollbars, S = v[m ? "dragScroll" : "clickScroll"], { button: C, isPrimary: w, pointerType: T } = r, { pointers: E } = v;
|
|
786
898
|
if (C === 0 && w && S && (E || []).includes(T)) {
|
|
787
|
-
|
|
788
|
-
let e = !m && (r.shiftKey || S === "instant"), v = J(
|
|
789
|
-
|
|
899
|
+
Ae(u), b();
|
|
900
|
+
let e = !m && (r.shiftKey || S === "instant"), v = J(Xt, g), C = J(Xt, h), w = (e, t) => (e || v())[o] - (t || C())[o], T = ne(Xt(d)[a]) / Kt(d)[c] || 1, E = on(d)[l], D = (e) => {
|
|
901
|
+
an(d, { [l]: E + e });
|
|
790
902
|
}, O = (e) => {
|
|
791
|
-
let { Rt: t } = n, r =
|
|
903
|
+
let { Rt: t } = n, r = Kt(h)[c] - Kt(g)[c], i = 1 / T * e / r;
|
|
792
904
|
D(i * t[l]);
|
|
793
|
-
}, k = r[i], A = v(), j = C(), M = A[a],
|
|
794
|
-
|
|
795
|
-
},
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
let e =
|
|
802
|
-
|
|
803
|
-
let t =
|
|
905
|
+
}, k = r[i], A = v(), j = C(), M = A[a], N = w(A, j) + M / 2, P = k - j[o] - N, F = m ? 0 : P, I = (e) => {
|
|
906
|
+
Ae(z), _.releasePointerCapture(e.pointerId);
|
|
907
|
+
}, L = m || e, R = p(), z = [
|
|
908
|
+
Z(f, t, I),
|
|
909
|
+
Z(f, "selectstart", ((e) => nn(e)), { D: !1 }),
|
|
910
|
+
Z(h, t, I),
|
|
911
|
+
L && Z(h, "pointermove", ((e) => O(F + e[i] - k))),
|
|
912
|
+
L && (() => {
|
|
913
|
+
let e = on(d);
|
|
914
|
+
R();
|
|
915
|
+
let t = on(d), n = {
|
|
804
916
|
x: t.x - e.x,
|
|
805
917
|
y: t.y - e.y
|
|
806
918
|
};
|
|
807
|
-
(
|
|
919
|
+
(W(n.x) > 3 || W(n.y) > 3) && (p(), an(d, e), x(n), y(R));
|
|
808
920
|
})
|
|
809
921
|
];
|
|
810
|
-
if (_.setPointerCapture(r.pointerId), e) O(
|
|
922
|
+
if (_.setPointerCapture(r.pointerId), e) O(P);
|
|
811
923
|
else if (!m) {
|
|
812
|
-
let e =
|
|
924
|
+
let e = yn(fr);
|
|
813
925
|
if (e) {
|
|
814
|
-
let { Vt: t } = n, r = e(D, O, J(w),
|
|
815
|
-
e ?
|
|
926
|
+
let { Vt: t } = n, r = e(D, O, J(w), P, t[l], S, !!s, ((e) => {
|
|
927
|
+
e ? R() : q(z, R);
|
|
816
928
|
}));
|
|
817
|
-
|
|
929
|
+
q(z, r), q(u, J(r, !0));
|
|
818
930
|
}
|
|
819
931
|
}
|
|
820
932
|
}
|
|
821
933
|
})));
|
|
822
934
|
}, C = !0;
|
|
823
|
-
return J(
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
o(
|
|
935
|
+
return J(Ae, [
|
|
936
|
+
Z(g, "pointermove pointerleave", r(i)),
|
|
937
|
+
Z(m, "pointerenter", r((() => {
|
|
938
|
+
o(Qn, !0);
|
|
827
939
|
}))),
|
|
828
|
-
|
|
829
|
-
o(
|
|
940
|
+
Z(m, "pointerleave pointercancel", r((() => {
|
|
941
|
+
o(Qn, !1);
|
|
830
942
|
}))),
|
|
831
|
-
|
|
943
|
+
Z(m, "wheel", r(((e) => {
|
|
832
944
|
let { deltaX: t, deltaY: n, deltaMode: r } = e;
|
|
833
|
-
C && r === 0 &&
|
|
945
|
+
C && r === 0 && St(m) === c && x({
|
|
834
946
|
x: t,
|
|
835
947
|
y: n
|
|
836
|
-
}), C = !1, o(
|
|
837
|
-
C = !0, o(
|
|
838
|
-
})),
|
|
948
|
+
}), C = !1, o(nr, !0), _((() => {
|
|
949
|
+
C = !0, o(nr);
|
|
950
|
+
})), nn(e);
|
|
839
951
|
})), {
|
|
840
952
|
D: !1,
|
|
841
953
|
I: !0
|
|
842
954
|
}),
|
|
843
|
-
!u &&
|
|
844
|
-
let e =
|
|
845
|
-
(
|
|
955
|
+
!u && Z(m, "mousedown", r((() => {
|
|
956
|
+
let e = wt();
|
|
957
|
+
(ot(e, kn) || ot(e, Dn) || e === document.body) && oe(J(dn, l), 25);
|
|
846
958
|
}))),
|
|
847
|
-
|
|
848
|
-
let e =
|
|
849
|
-
t(),
|
|
959
|
+
Z(m, "pointerdown", (() => {
|
|
960
|
+
let e = Z(f, "click", ((e) => {
|
|
961
|
+
t(), rn(e);
|
|
850
962
|
}), {
|
|
851
963
|
A: !0,
|
|
852
964
|
I: !0,
|
|
853
965
|
D: !1
|
|
854
|
-
}), t =
|
|
966
|
+
}), t = Z(f, "pointerup pointercancel", (() => {
|
|
855
967
|
t(), setTimeout(e, 150);
|
|
856
968
|
}), {
|
|
857
969
|
I: !0,
|
|
@@ -865,144 +977,144 @@ var In = "os-trinsic-observer", Ln = "os-theme-none", Rn = "os-scrollbar", zn =
|
|
|
865
977
|
v,
|
|
866
978
|
b
|
|
867
979
|
]);
|
|
868
|
-
},
|
|
869
|
-
let s, c, l, u, d, f =
|
|
980
|
+
}, zr = (e, t, n, r, i, a, o) => {
|
|
981
|
+
let s, c, l, u, d, f = nt, p = 0, m = ["mouse", "pen"], h = (e) => (t) => {
|
|
870
982
|
n.Kt || e(t);
|
|
871
|
-
}, g = (e) => m.includes(e.pointerType), [_, v] =
|
|
983
|
+
}, g = (e) => m.includes(e.pointerType), [_, v] = Xe(), [y, b] = Xe(100), [x, S] = Xe(50), [C, w] = Xe((() => p)), [T, E] = Lr(e, a, i, Rr(t, a, i, h, ((e) => g(e) && I()))), { vt: D, Qt: O, bt: k } = a, { Ft: A, Ut: j, Nt: M, qt: N, Bt: P } = T, F = (e, t) => {
|
|
872
984
|
w();
|
|
873
985
|
let r = (e) => {
|
|
874
|
-
n.Kt || A(
|
|
986
|
+
n.Kt || A(tr, e);
|
|
875
987
|
};
|
|
876
988
|
if (e) r();
|
|
877
989
|
else {
|
|
878
990
|
let e = !l || !s;
|
|
879
991
|
p > 0 && !t ? C(J(r, e)) : r(e);
|
|
880
992
|
}
|
|
881
|
-
},
|
|
882
|
-
(l ? !s : !u) && (
|
|
883
|
-
|
|
993
|
+
}, I = () => {
|
|
994
|
+
(l ? !s : !u) && (F(!0), y((() => {
|
|
995
|
+
F(!1);
|
|
884
996
|
})));
|
|
885
|
-
}, F = (e) => {
|
|
886
|
-
g(e) && (s = !0, !n.Kt && l && te(!0));
|
|
887
|
-
}, I = (e) => {
|
|
888
|
-
g(e) && (s = !1, !n.Kt && l && te(!1));
|
|
889
997
|
}, L = (e) => {
|
|
890
|
-
|
|
891
|
-
}, R =
|
|
998
|
+
g(e) && (s = !0, !n.Kt && l && F(!0));
|
|
999
|
+
}, R = (e) => {
|
|
1000
|
+
g(e) && (s = !1, !n.Kt && l && F(!1));
|
|
1001
|
+
}, z = (e) => {
|
|
1002
|
+
A(er, e, !0), A(er, e, !1);
|
|
1003
|
+
}, B = [
|
|
892
1004
|
w,
|
|
893
1005
|
b,
|
|
894
1006
|
S,
|
|
895
1007
|
v,
|
|
896
1008
|
() => f(),
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
g(e) && c &&
|
|
1009
|
+
Z(D, "pointerover", L, { A: !0 }),
|
|
1010
|
+
Z(D, "pointerenter", L),
|
|
1011
|
+
Z(D, "pointerleave", R),
|
|
1012
|
+
Z(D, "pointermove", h(((e) => {
|
|
1013
|
+
g(e) && c && I();
|
|
902
1014
|
}))),
|
|
903
|
-
|
|
1015
|
+
Z(O, "scroll", h(((e) => {
|
|
904
1016
|
_((() => {
|
|
905
|
-
M(),
|
|
906
|
-
})), o(e),
|
|
1017
|
+
M(), I();
|
|
1018
|
+
})), o(e), P();
|
|
907
1019
|
})))
|
|
908
|
-
],
|
|
1020
|
+
], V = yn(dr);
|
|
909
1021
|
return [
|
|
910
|
-
() => J(
|
|
1022
|
+
() => J(Ae, q(B, E())),
|
|
911
1023
|
({ Dt: e, It: t, Zt: n, tn: a }) => {
|
|
912
|
-
let { nn: o, sn: s, en: m, cn: g } = a || {}, { Ct: _, ft: v } = n || {}, { B: y } = r, { M: b, P: S } =
|
|
913
|
-
let r = e.includes(
|
|
914
|
-
return A(
|
|
1024
|
+
let { nn: o, sn: s, en: m, cn: g } = a || {}, { Ct: _, ft: v } = n || {}, { B: y } = r, { M: b, P: S } = Er(), { rn: C, j: w } = i, [T, E] = e("showNativeOverlaidScrollbars"), [D, I] = e("scrollbars.theme"), [L, R] = e("scrollbars.visibility"), [B, H] = e("scrollbars.autoHide"), [U, ee] = e("scrollbars.autoHideSuspend"), [te] = e("scrollbars.autoHideDelay"), [ne, W] = e("scrollbars.dragScroll"), [re, ie] = e("scrollbars.clickScroll"), [ae, oe] = e("overflow"), se = v && !t, ce = o || s || g || _ || t, le = m || R || oe, ue = T && b.x && b.y, de = !S && !V, fe = ue || de, pe = (e, t, n) => {
|
|
1025
|
+
let r = e.includes(We) && (L === He || L === "auto" && t === We);
|
|
1026
|
+
return A(Xn, r, n), r;
|
|
915
1027
|
};
|
|
916
|
-
if (p =
|
|
917
|
-
f =
|
|
918
|
-
}))) :
|
|
919
|
-
let e =
|
|
920
|
-
A(
|
|
1028
|
+
if (p = te, (E || de) && A(Un, fe), I && (A(d), A(D, !0), d = D), (ee || se) && (z(!U), se && U && (w.x || w.y ? (f(), x((() => {
|
|
1029
|
+
f = Z(O, We, h(J(z, !0)), { A: !0 });
|
|
1030
|
+
}))) : z(!0))), H && (c = B === "move", l = B === "leave", u = B === "never", F(u, !0)), W && A(ir, ne), ie && A(rr, !!re), le) {
|
|
1031
|
+
let e = pe(ae.x, C.x, !0), t = pe(ae.y, C.y, !1);
|
|
1032
|
+
A(Zn, !(e && t));
|
|
921
1033
|
}
|
|
922
|
-
|
|
1034
|
+
ce && (M(), j(), P(), g && N(), A($n, !w.x, !0), A($n, !w.y, !1), A(Gn, y && !k));
|
|
923
1035
|
},
|
|
924
1036
|
{},
|
|
925
1037
|
T
|
|
926
1038
|
];
|
|
927
|
-
},
|
|
928
|
-
let { K: t, P: n } =
|
|
929
|
-
let t =
|
|
930
|
-
return n.w - t.w > 0 && !
|
|
931
|
-
}, w = x(d), T = w === p, E = T && m, D = !T && S(f), O = !T && w === D, k = E ? g : w, A = E ? k : p, j = !T && y(b, i, u), M = !O && D,
|
|
1039
|
+
}, Br = (e) => {
|
|
1040
|
+
let { K: t, P: n } = Er(), { elements: r } = t(), { padding: i, viewport: a, content: o } = r, s = Se(e), c = s ? {} : e, { elements: l } = c, { padding: u, viewport: d, content: f } = l || {}, p = s ? e : c.target, m = bt(p), h = p.ownerDocument, g = h.documentElement, _ = () => h.defaultView || U, v = J(Pr, [p]), y = J(Fr, [p]), b = J(jt, ""), x = J(v, b, a), S = J(y, b, o), C = (e) => {
|
|
1041
|
+
let t = Kt(e), n = Jt(e), r = zt(e, Re), i = zt(e, ze);
|
|
1042
|
+
return n.w - t.w > 0 && !sr(r) || n.h - t.h > 0 && !sr(i);
|
|
1043
|
+
}, w = x(d), T = w === p, E = T && m, D = !T && S(f), O = !T && w === D, k = E ? g : w, A = E ? k : p, j = !T && y(b, i, u), M = !O && D, N = [
|
|
932
1044
|
M,
|
|
933
1045
|
k,
|
|
934
1046
|
j,
|
|
935
1047
|
A
|
|
936
|
-
].map(((e) =>
|
|
1048
|
+
].map(((e) => Se(e) && !St(e) && e)), P = (e) => e && we(N, e), F = !P(k) && C(k) ? k : p, I = E ? g : k, L = {
|
|
937
1049
|
dt: p,
|
|
938
1050
|
vt: A,
|
|
939
1051
|
L: k,
|
|
940
1052
|
ln: j,
|
|
941
1053
|
ht: M,
|
|
942
|
-
gt:
|
|
1054
|
+
gt: I,
|
|
943
1055
|
Qt: E ? h : k,
|
|
944
|
-
an: m ? g :
|
|
1056
|
+
an: m ? g : F,
|
|
945
1057
|
Gt: h,
|
|
946
1058
|
bt: m,
|
|
947
1059
|
At: s,
|
|
948
1060
|
V: T,
|
|
949
1061
|
un: _,
|
|
950
|
-
yt: (e) =>
|
|
951
|
-
wt: (e, t) =>
|
|
952
|
-
St: () =>
|
|
953
|
-
}, { dt:
|
|
954
|
-
|
|
955
|
-
}],
|
|
1062
|
+
yt: (e) => pt(k, kn, e),
|
|
1063
|
+
wt: (e, t) => ft(k, kn, e, t),
|
|
1064
|
+
St: () => ft(I, kn, Pn, !0)
|
|
1065
|
+
}, { dt: R, vt: z, ln: B, L: V, ht: H } = L, ee = [() => {
|
|
1066
|
+
ct(z, [Dn, wn]), ct(R, wn), m && ct(g, [wn, Dn]);
|
|
1067
|
+
}], te = xt([
|
|
1068
|
+
H,
|
|
956
1069
|
V,
|
|
957
1070
|
B,
|
|
958
1071
|
z,
|
|
959
|
-
R
|
|
960
|
-
|
|
961
|
-
].find(((e) => e && !N(e)))), ie = E ? L : V || B, ae = J(q, ne);
|
|
1072
|
+
R
|
|
1073
|
+
].find(((e) => e && !P(e)))), ne = E ? R : H || V, W = J(Ae, ee);
|
|
962
1074
|
return [
|
|
963
|
-
|
|
1075
|
+
L,
|
|
964
1076
|
() => {
|
|
965
|
-
let e = _(), t =
|
|
966
|
-
|
|
967
|
-
}, i = (e) =>
|
|
1077
|
+
let e = _(), t = wt(), r = (e) => {
|
|
1078
|
+
Dt(St(e), xt(e)), Et(e);
|
|
1079
|
+
}, i = (e) => Z(e, "focusin focusout focus blur", rn, {
|
|
968
1080
|
I: !0,
|
|
969
1081
|
D: !1
|
|
970
|
-
}), a = "tabindex", o =
|
|
971
|
-
return
|
|
972
|
-
let e =
|
|
973
|
-
|
|
974
|
-
}]), n && !T && (
|
|
1082
|
+
}), a = "tabindex", o = at(V, a), s = i(t);
|
|
1083
|
+
return st(z, Dn, T ? "" : On), st(B, Ln, ""), st(V, kn, ""), st(H, Rn, ""), T || (st(V, a, o || "-1"), m && st(g, En, "")), Dt(ne, te), Dt(z, B), Dt(B || z, !T && V), Dt(V, H), q(ee, [s, () => {
|
|
1084
|
+
let e = wt(), t = P(V), n = t && e === V ? R : e, s = i(n);
|
|
1085
|
+
ct(B, Ln), ct(H, Rn), ct(V, kn), m && ct(g, En), o ? st(V, a, o) : ct(V, a), P(H) && r(H), t && r(V), P(B) && r(B), dn(n), s();
|
|
1086
|
+
}]), n && !T && (dt(V, kn, Fn), q(ee, J(ct, V, kn))), dn(!T && m && t === R && e.top === e ? V : t), s(), te = 0, W;
|
|
975
1087
|
},
|
|
976
|
-
|
|
1088
|
+
W
|
|
977
1089
|
];
|
|
978
|
-
},
|
|
1090
|
+
}, Vr = ({ ht: e }) => ({ Zt: t, fn: n, It: r }) => {
|
|
979
1091
|
let { $t: i } = t || {}, { Ot: a } = n;
|
|
980
|
-
e && (i || r) &&
|
|
981
|
-
},
|
|
982
|
-
let [a, o] =
|
|
983
|
-
i:
|
|
984
|
-
o:
|
|
985
|
-
}, J(
|
|
1092
|
+
e && (i || r) && Rt(e, { [Ve]: a && "100%" });
|
|
1093
|
+
}, Hr = ({ vt: e, ln: t, L: n, V: r }, i) => {
|
|
1094
|
+
let [a, o] = H({
|
|
1095
|
+
i: Ye,
|
|
1096
|
+
o: Bt()
|
|
1097
|
+
}, J(Bt, e, "padding", ""));
|
|
986
1098
|
return ({ Dt: e, Zt: s, fn: c, It: l }) => {
|
|
987
|
-
let [u, d] = o(l), { P: f } =
|
|
1099
|
+
let [u, d] = o(l), { P: f } = Er(), { _t: p, xt: m, Ct: h } = s || {}, { B: g } = c, [_, v] = e("paddingAbsolute");
|
|
988
1100
|
(p || d || l || m) && ([u, d] = a(l));
|
|
989
1101
|
let y = !r && (v || h || d);
|
|
990
1102
|
if (y) {
|
|
991
1103
|
let e = !_ || !t && !f, r = u.r + u.l, a = u.t + u.b, o = {
|
|
992
|
-
[
|
|
993
|
-
[
|
|
994
|
-
[
|
|
1104
|
+
[Ie]: e && !g ? -r : 0,
|
|
1105
|
+
[Le]: e ? -a : 0,
|
|
1106
|
+
[Fe]: e && g ? -r : 0,
|
|
995
1107
|
top: e ? -u.t : 0,
|
|
996
1108
|
right: e ? g ? -u.r : "auto" : 0,
|
|
997
1109
|
left: e ? g ? "auto" : -u.l : 0,
|
|
998
|
-
[
|
|
1110
|
+
[Be]: e && `calc(100% + ${r}px)`
|
|
999
1111
|
}, s = {
|
|
1000
|
-
[
|
|
1001
|
-
[
|
|
1002
|
-
[
|
|
1003
|
-
[
|
|
1112
|
+
[je]: e ? u.t : 0,
|
|
1113
|
+
[Me]: e ? u.r : 0,
|
|
1114
|
+
[Pe]: e ? u.b : 0,
|
|
1115
|
+
[Ne]: e ? u.l : 0
|
|
1004
1116
|
};
|
|
1005
|
-
|
|
1117
|
+
Rt(t || n, o), Rt(n, s), X(i, {
|
|
1006
1118
|
ln: u,
|
|
1007
1119
|
_n: !e,
|
|
1008
1120
|
F: t ? s : X({}, o, s)
|
|
@@ -1010,29 +1122,29 @@ var In = "os-trinsic-observer", Ln = "os-theme-none", Rn = "os-scrollbar", zn =
|
|
|
1010
1122
|
}
|
|
1011
1123
|
return { dn: y };
|
|
1012
1124
|
};
|
|
1013
|
-
},
|
|
1014
|
-
let n =
|
|
1125
|
+
}, Ur = (e, t) => {
|
|
1126
|
+
let n = Er(), { vt: r, ln: i, L: a, V: o, Qt: s, gt: c, bt: l, wt: u, un: d } = e, { P: f } = n, p = l && o, m = J(ee, 0), h = {
|
|
1015
1127
|
display: () => !1,
|
|
1016
1128
|
direction: (e) => e !== "ltr",
|
|
1017
1129
|
flexDirection: (e) => e.endsWith("-reverse"),
|
|
1018
1130
|
writingMode: (e) => e !== "horizontal-tb"
|
|
1019
1131
|
}, g = Y(h), _ = {
|
|
1020
|
-
i:
|
|
1132
|
+
i: qe,
|
|
1021
1133
|
o: {
|
|
1022
1134
|
w: 0,
|
|
1023
1135
|
h: 0
|
|
1024
1136
|
}
|
|
1025
1137
|
}, v = {
|
|
1026
|
-
i:
|
|
1138
|
+
i: Je,
|
|
1027
1139
|
o: {}
|
|
1028
1140
|
}, y = (e) => {
|
|
1029
|
-
u(
|
|
1030
|
-
}, b = () =>
|
|
1141
|
+
u(Nn, !p && e);
|
|
1142
|
+
}, b = () => zt(a, g), x = (e, t) => {
|
|
1031
1143
|
let n = !Y(e).length, r = t ? !0 : g.some(((t) => {
|
|
1032
1144
|
let n = e[t];
|
|
1033
|
-
return
|
|
1145
|
+
return ge(n) && h[t](n);
|
|
1034
1146
|
}));
|
|
1035
|
-
if (n || !r || !
|
|
1147
|
+
if (n || !r || !Zt(a)) return {
|
|
1036
1148
|
T: {
|
|
1037
1149
|
x: 0,
|
|
1038
1150
|
y: 0
|
|
@@ -1043,43 +1155,43 @@ var In = "os-trinsic-observer", Ln = "os-theme-none", Rn = "os-scrollbar", zn =
|
|
|
1043
1155
|
}
|
|
1044
1156
|
};
|
|
1045
1157
|
y(!0);
|
|
1046
|
-
let i =
|
|
1047
|
-
let t =
|
|
1048
|
-
e.isTrusted && t.x === i.x && t.y === i.y &&
|
|
1158
|
+
let i = on(c), o = Z(s, We, ((e) => {
|
|
1159
|
+
let t = on(c);
|
|
1160
|
+
e.isTrusted && t.x === i.x && t.y === i.y && tn(e);
|
|
1049
1161
|
}), {
|
|
1050
1162
|
I: !0,
|
|
1051
1163
|
A: !0
|
|
1052
|
-
}), l = u(
|
|
1053
|
-
|
|
1164
|
+
}), l = u(In, !0);
|
|
1165
|
+
an(c, {
|
|
1054
1166
|
x: 0,
|
|
1055
1167
|
y: 0
|
|
1056
1168
|
}), l();
|
|
1057
|
-
let d =
|
|
1058
|
-
|
|
1169
|
+
let d = on(c), f = Jt(c);
|
|
1170
|
+
an(c, {
|
|
1059
1171
|
x: f.w,
|
|
1060
1172
|
y: f.h
|
|
1061
1173
|
});
|
|
1062
|
-
let p =
|
|
1174
|
+
let p = on(c), m = {
|
|
1063
1175
|
x: p.x - d.x,
|
|
1064
1176
|
y: p.y - d.y
|
|
1065
1177
|
};
|
|
1066
|
-
|
|
1178
|
+
an(c, {
|
|
1067
1179
|
x: -f.w,
|
|
1068
1180
|
y: -f.h
|
|
1069
1181
|
});
|
|
1070
|
-
let _ =
|
|
1182
|
+
let _ = on(c), v = {
|
|
1071
1183
|
x: _.x - d.x,
|
|
1072
1184
|
y: _.y - d.y
|
|
1073
1185
|
}, b = {
|
|
1074
|
-
x:
|
|
1075
|
-
y:
|
|
1186
|
+
x: W(m.x) >= W(v.x) ? p.x : _.x,
|
|
1187
|
+
y: W(m.y) >= W(v.y) ? p.y : _.y
|
|
1076
1188
|
};
|
|
1077
|
-
return
|
|
1189
|
+
return an(c, i), ae((() => o())), {
|
|
1078
1190
|
T: d,
|
|
1079
1191
|
k: b
|
|
1080
1192
|
};
|
|
1081
1193
|
}, S = (e, t) => {
|
|
1082
|
-
let n =
|
|
1194
|
+
let n = U.devicePixelRatio % 1 == 0 ? 0 : 1, r = {
|
|
1083
1195
|
w: m(e.w - t.w),
|
|
1084
1196
|
h: m(e.h - t.h)
|
|
1085
1197
|
};
|
|
@@ -1089,8 +1201,8 @@ var In = "os-trinsic-observer", Ln = "os-theme-none", Rn = "os-scrollbar", zn =
|
|
|
1089
1201
|
};
|
|
1090
1202
|
}, C = (e, t) => {
|
|
1091
1203
|
let n = (e, t, n, r) => {
|
|
1092
|
-
let i = e ===
|
|
1093
|
-
return !t && !r ?
|
|
1204
|
+
let i = e === He ? Ue : cr(e), a = sr(e), o = sr(n);
|
|
1205
|
+
return !t && !r ? Ue : a && o ? He : a ? t && r ? i : t ? He : Ue : t ? i : o && r ? He : Ue;
|
|
1094
1206
|
};
|
|
1095
1207
|
return {
|
|
1096
1208
|
x: n(t.x, e.x, t.y, e.y),
|
|
@@ -1098,58 +1210,58 @@ var In = "os-trinsic-observer", Ln = "os-theme-none", Rn = "os-scrollbar", zn =
|
|
|
1098
1210
|
};
|
|
1099
1211
|
}, w = (e) => {
|
|
1100
1212
|
let t = (e) => [
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
].map(((t) =>
|
|
1105
|
-
u(n), u(Y(e).map(((t) =>
|
|
1106
|
-
}, [T, E] =
|
|
1107
|
-
i: (e, t) =>
|
|
1213
|
+
He,
|
|
1214
|
+
Ue,
|
|
1215
|
+
We
|
|
1216
|
+
].map(((t) => z(lr(t), e))), n = t(!0).concat(t()).join(" ");
|
|
1217
|
+
u(n), u(Y(e).map(((t) => z(e[t], t === "x"))).join(" "), !0);
|
|
1218
|
+
}, [T, E] = H(_, J(Yt, a)), [D, O] = H(_, J(Jt, a)), [k, A] = H(_), [j] = H(v), [M, N] = H(_), [P] = H(v), [F] = H({
|
|
1219
|
+
i: (e, t) => Ke(e, t, ke(Te(Y(e), Y(t)))),
|
|
1108
1220
|
o: {}
|
|
1109
|
-
}), [
|
|
1110
|
-
i: (e, t) =>
|
|
1111
|
-
o:
|
|
1112
|
-
}),
|
|
1221
|
+
}), [I, L] = H({
|
|
1222
|
+
i: (e, t) => Je(e.T, t.T) && Je(e.k, t.k),
|
|
1223
|
+
o: sn()
|
|
1224
|
+
}), R = yn(dr), z = (e, t) => `${t ? An : jn}${Ge(e)}`;
|
|
1113
1225
|
return ({ Dt: o, Zt: s, fn: c, It: l }, { dn: h }) => {
|
|
1114
|
-
let { _t: g, Ht: _, xt: v, Ct:
|
|
1115
|
-
if (
|
|
1116
|
-
|
|
1117
|
-
let e =
|
|
1226
|
+
let { _t: g, Ht: _, xt: v, Ct: z, ft: B, Et: V } = s || {}, { X: H, Y: U, W: ee } = R && R.R(e, t, c, n, o) || {}, [te, ne] = or(o, n), [W, re] = o("overflow"), ie = sr(W.x), ae = sr(W.y), oe = g || h || v || z || V || ne, se = E(l), ce = O(l), le = A(l), ue = N(l);
|
|
1227
|
+
if (ne && f && u(Fn, !te), oe) {
|
|
1228
|
+
pt(r, Dn, Tn) && y(!0);
|
|
1229
|
+
let e = U && U(), [t] = se = T(l), [n] = ce = D(l), i = qt(a), o = p && Gt(d()), s = {
|
|
1118
1230
|
w: m(n.w + t.w),
|
|
1119
1231
|
h: m(n.h + t.h)
|
|
1120
1232
|
}, c = {
|
|
1121
1233
|
w: m((o ? o.w : i.w + m(i.w - n.w)) + t.w),
|
|
1122
1234
|
h: m((o ? o.h : i.h + m(i.h - n.h)) + t.h)
|
|
1123
1235
|
};
|
|
1124
|
-
e && e(),
|
|
1125
|
-
}
|
|
1126
|
-
let [
|
|
1127
|
-
x:
|
|
1128
|
-
y:
|
|
1129
|
-
}),
|
|
1130
|
-
y(!1), be && (w(Te), Te =
|
|
1131
|
-
let [q, Ee] =
|
|
1132
|
-
return
|
|
1236
|
+
e && e(), ue = M(c), le = k(S(s, c), l);
|
|
1237
|
+
}
|
|
1238
|
+
let [de, fe] = ue, [pe, me] = le, [he, ge] = ce, [_e, ve] = se, [G] = j({
|
|
1239
|
+
x: pe.w > 0,
|
|
1240
|
+
y: pe.h > 0
|
|
1241
|
+
}), ye = ie && ae && (G.x || G.y) || ie && G.x && !G.y || ae && G.y && !G.x, be = h || z || V || ve || ge || fe || me || re || ne || oe || _ && p, [xe] = o("update.flowDirectionStyles"), [Se, Ce] = F(xe ? xe(a) || {} : b(), l), [K, we] = z || B || Ce || l ? I(x(Se, !!xe), l) : L(), Te = C(G, W);
|
|
1242
|
+
y(!1), be && (w(Te), Te = ur(a, G), ee && H && (H(Te, he, _e), Rt(a, ee(Te))));
|
|
1243
|
+
let [q, Ee] = P(Te);
|
|
1244
|
+
return ft(r, Dn, Tn, ye), ft(i, Ln, Tn, ye), X(t, {
|
|
1133
1245
|
rn: q,
|
|
1134
1246
|
Vt: {
|
|
1135
|
-
x:
|
|
1136
|
-
y:
|
|
1247
|
+
x: de.w,
|
|
1248
|
+
y: de.h
|
|
1137
1249
|
},
|
|
1138
1250
|
Rt: {
|
|
1139
|
-
x:
|
|
1140
|
-
y:
|
|
1251
|
+
x: pe.w,
|
|
1252
|
+
y: pe.h
|
|
1141
1253
|
},
|
|
1142
|
-
j:
|
|
1143
|
-
Tt:
|
|
1254
|
+
j: G,
|
|
1255
|
+
Tt: cn(K, pe)
|
|
1144
1256
|
}), {
|
|
1145
1257
|
en: Ee,
|
|
1146
|
-
nn:
|
|
1147
|
-
sn:
|
|
1148
|
-
cn: we ||
|
|
1258
|
+
nn: fe,
|
|
1259
|
+
sn: me,
|
|
1260
|
+
cn: we || me
|
|
1149
1261
|
};
|
|
1150
1262
|
};
|
|
1151
|
-
},
|
|
1152
|
-
let [t, n, r] =
|
|
1263
|
+
}, Wr = (e) => {
|
|
1264
|
+
let [t, n, r] = Br(e), i = {
|
|
1153
1265
|
ln: {
|
|
1154
1266
|
t: 0,
|
|
1155
1267
|
r: 0,
|
|
@@ -1158,13 +1270,13 @@ var In = "os-trinsic-observer", Ln = "os-theme-none", Rn = "os-scrollbar", zn =
|
|
|
1158
1270
|
},
|
|
1159
1271
|
_n: !1,
|
|
1160
1272
|
F: {
|
|
1273
|
+
[Ie]: 0,
|
|
1274
|
+
[Le]: 0,
|
|
1275
|
+
[Fe]: 0,
|
|
1161
1276
|
[je]: 0,
|
|
1162
1277
|
[Me]: 0,
|
|
1163
|
-
[
|
|
1164
|
-
[
|
|
1165
|
-
[De]: 0,
|
|
1166
|
-
[ke]: 0,
|
|
1167
|
-
[Oe]: 0
|
|
1278
|
+
[Pe]: 0,
|
|
1279
|
+
[Ne]: 0
|
|
1168
1280
|
},
|
|
1169
1281
|
Vt: {
|
|
1170
1282
|
x: 0,
|
|
@@ -1175,42 +1287,42 @@ var In = "os-trinsic-observer", Ln = "os-theme-none", Rn = "os-scrollbar", zn =
|
|
|
1175
1287
|
y: 0
|
|
1176
1288
|
},
|
|
1177
1289
|
rn: {
|
|
1178
|
-
x:
|
|
1179
|
-
y:
|
|
1290
|
+
x: Ue,
|
|
1291
|
+
y: Ue
|
|
1180
1292
|
},
|
|
1181
1293
|
j: {
|
|
1182
1294
|
x: !1,
|
|
1183
1295
|
y: !1
|
|
1184
1296
|
},
|
|
1185
|
-
Tt:
|
|
1186
|
-
}, { dt: a, gt: o, V: s, St: c } = t, { P: l, M: u } =
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1297
|
+
Tt: sn()
|
|
1298
|
+
}, { dt: a, gt: o, V: s, St: c } = t, { P: l, M: u } = Er(), d = !l && (u.x || u.y), f = [
|
|
1299
|
+
Vr(t),
|
|
1300
|
+
Hr(t, i),
|
|
1301
|
+
Ur(t, i)
|
|
1190
1302
|
];
|
|
1191
1303
|
return [
|
|
1192
1304
|
n,
|
|
1193
1305
|
(e) => {
|
|
1194
|
-
let t = {}, n = d &&
|
|
1195
|
-
return
|
|
1306
|
+
let t = {}, n = d && on(o), r = n && c();
|
|
1307
|
+
return K(f, ((n) => {
|
|
1196
1308
|
X(t, n(e, t) || {});
|
|
1197
|
-
})),
|
|
1309
|
+
})), an(o, n), r && r(), s || an(a, 0), t;
|
|
1198
1310
|
},
|
|
1199
1311
|
i,
|
|
1200
1312
|
t,
|
|
1201
1313
|
r
|
|
1202
1314
|
];
|
|
1203
|
-
},
|
|
1315
|
+
}, Gr = (e, t, n, r) => {
|
|
1204
1316
|
let i = !1, a = {
|
|
1205
1317
|
Kt: !1,
|
|
1206
1318
|
pn: !1
|
|
1207
|
-
}, o =
|
|
1319
|
+
}, o = br(t, {}), [s, c, l, u, d] = Wr(e), [f, p, m] = Mr(u, l, o, ((e) => {
|
|
1208
1320
|
y({}, e);
|
|
1209
|
-
})), [h, g, , _] =
|
|
1321
|
+
})), [h, g, , _] = zr(e, t, a, m, l, u, r), v = (e) => Y(e).some(((t) => !!e[t])), y = (e, r) => {
|
|
1210
1322
|
let { Kt: o, pn: s } = a;
|
|
1211
1323
|
if (s || o && i) return !1;
|
|
1212
1324
|
let { vn: l, It: u, zt: d } = e, f = l || {}, h = !!u || !i, _ = {
|
|
1213
|
-
Dt:
|
|
1325
|
+
Dt: br(t, f, h),
|
|
1214
1326
|
vn: f,
|
|
1215
1327
|
It: h
|
|
1216
1328
|
}, y = r || p(X({}, _, { zt: d })), b = c(X({}, _, {
|
|
@@ -1221,7 +1333,7 @@ var In = "os-trinsic-observer", Ln = "os-theme-none", Rn = "os-scrollbar", zn =
|
|
|
1221
1333
|
Zt: y,
|
|
1222
1334
|
tn: b
|
|
1223
1335
|
}));
|
|
1224
|
-
let x = v(y), S = v(b), C = x || S || !
|
|
1336
|
+
let x = v(y), S = v(b), C = x || S || !tt(f) || h;
|
|
1225
1337
|
return i = !0, C && n(e, {
|
|
1226
1338
|
Zt: y,
|
|
1227
1339
|
tn: b
|
|
@@ -1229,7 +1341,7 @@ var In = "os-trinsic-observer", Ln = "os-theme-none", Rn = "os-scrollbar", zn =
|
|
|
1229
1341
|
};
|
|
1230
1342
|
return [
|
|
1231
1343
|
() => {
|
|
1232
|
-
let { an: e, gt: t, St: n } = u, r =
|
|
1344
|
+
let { an: e, gt: t, St: n } = u, r = on(e), i = [
|
|
1233
1345
|
f(),
|
|
1234
1346
|
s(),
|
|
1235
1347
|
h(),
|
|
@@ -1237,7 +1349,7 @@ var In = "os-trinsic-observer", Ln = "os-theme-none", Rn = "os-scrollbar", zn =
|
|
|
1237
1349
|
a.pn = !0;
|
|
1238
1350
|
}
|
|
1239
1351
|
], o = n();
|
|
1240
|
-
return
|
|
1352
|
+
return an(t, r), o(), J(Ae, i);
|
|
1241
1353
|
},
|
|
1242
1354
|
y,
|
|
1243
1355
|
(e) => {
|
|
@@ -1249,7 +1361,7 @@ var In = "os-trinsic-observer", Ln = "os-theme-none", Rn = "os-scrollbar", zn =
|
|
|
1249
1361
|
},
|
|
1250
1362
|
() => {
|
|
1251
1363
|
g({
|
|
1252
|
-
Dt:
|
|
1364
|
+
Dt: br(t, {}, !1),
|
|
1253
1365
|
vn: {},
|
|
1254
1366
|
It: !1
|
|
1255
1367
|
});
|
|
@@ -1265,19 +1377,19 @@ var In = "os-trinsic-observer", Ln = "os-theme-none", Rn = "os-scrollbar", zn =
|
|
|
1265
1377
|
},
|
|
1266
1378
|
d
|
|
1267
1379
|
];
|
|
1268
|
-
},
|
|
1269
|
-
|
|
1270
|
-
},
|
|
1271
|
-
|
|
1272
|
-
},
|
|
1273
|
-
let { tt: r } =
|
|
1380
|
+
}, Kr = /* @__PURE__ */ new WeakMap(), qr = (e, t) => {
|
|
1381
|
+
Kr.set(e, t);
|
|
1382
|
+
}, Jr = (e) => {
|
|
1383
|
+
Kr.delete(e);
|
|
1384
|
+
}, Yr = (e) => Kr.get(e), Xr = (e, t, n) => {
|
|
1385
|
+
let { tt: r } = Er(), i = Se(e), a = i ? e : e.target, o = Yr(a);
|
|
1274
1386
|
if (t && !o) {
|
|
1275
1387
|
let o = [], s = {}, c = (e) => {
|
|
1276
|
-
let t =
|
|
1388
|
+
let t = et(e), n = yn(bn);
|
|
1277
1389
|
return n ? n(t, !0) : t;
|
|
1278
|
-
}, l = X({}, r(), c(t)), [u, d, f] =
|
|
1390
|
+
}, l = X({}, r(), c(t)), [u, d, f] = pn(), [p, m, h] = pn(n), g = (e, t) => {
|
|
1279
1391
|
h(e, t), f(e, t);
|
|
1280
|
-
}, [_, v, y, b, x, S, C] =
|
|
1392
|
+
}, [_, v, y, b, x, S, C] = Gr(e, l, (({ vn: e, It: t }, { Zt: n, tn: r }) => {
|
|
1281
1393
|
let { _t: i, Ct: a, $t: o, xt: s, Ht: c, ft: l } = n, { nn: u, sn: d, en: f, cn: p } = r;
|
|
1282
1394
|
g("updated", [T, {
|
|
1283
1395
|
updateHints: {
|
|
@@ -1297,12 +1409,12 @@ var In = "os-trinsic-observer", Ln = "os-theme-none", Rn = "os-scrollbar", zn =
|
|
|
1297
1409
|
}]);
|
|
1298
1410
|
}), ((e) => g("scroll", [T, e]))), w = (e) => {
|
|
1299
1411
|
let { gn: t } = x(), { pn: n } = t;
|
|
1300
|
-
n || (
|
|
1412
|
+
n || (Jr(a), Ae(o), g("destroyed", [T, e]), d(), m());
|
|
1301
1413
|
}, T = {
|
|
1302
1414
|
options(e, t) {
|
|
1303
1415
|
if (e) {
|
|
1304
|
-
let n = t ? r() : {}, i =
|
|
1305
|
-
|
|
1416
|
+
let n = t ? r() : {}, i = yr(l, X(n, c(e)));
|
|
1417
|
+
tt(i) || (X(l, i), v({ vn: i }));
|
|
1306
1418
|
}
|
|
1307
1419
|
return X({}, l);
|
|
1308
1420
|
},
|
|
@@ -1363,22 +1475,22 @@ var In = "os-trinsic-observer", Ln = "os-theme-none", Rn = "os-scrollbar", zn =
|
|
|
1363
1475
|
sleep: y,
|
|
1364
1476
|
plugin: (e) => s[Y(e)[0]]
|
|
1365
1477
|
};
|
|
1366
|
-
return
|
|
1478
|
+
return q(o, [C]), qr(a, T), _n(mn, Xr, [
|
|
1367
1479
|
T,
|
|
1368
1480
|
u,
|
|
1369
1481
|
s
|
|
1370
|
-
]),
|
|
1482
|
+
]), Ir(S.yn.bt, !i && e.cancel) ? (w(!0), T) : (q(o, _()), g("initialized", [T]), T.update(), T);
|
|
1371
1483
|
}
|
|
1372
1484
|
return o;
|
|
1373
1485
|
};
|
|
1374
|
-
|
|
1375
|
-
let t =
|
|
1376
|
-
return
|
|
1377
|
-
},
|
|
1378
|
-
let t = e && e.elements, n =
|
|
1379
|
-
return
|
|
1380
|
-
},
|
|
1381
|
-
let { U: e, M: t, P: n, J: r, ot: i, st: a, K: o, Z: s, tt: c, nt: l } =
|
|
1486
|
+
Xr.plugin = (e) => {
|
|
1487
|
+
let t = G(e), n = t ? e : [e], r = n.map(((e) => _n(e, Xr)[0]));
|
|
1488
|
+
return gn(n), t ? r : r[0];
|
|
1489
|
+
}, Xr.valid = (e) => {
|
|
1490
|
+
let t = e && e.elements, n = ve(t) && t();
|
|
1491
|
+
return xe(n) && !!Yr(n.target);
|
|
1492
|
+
}, Xr.env = () => {
|
|
1493
|
+
let { U: e, M: t, P: n, J: r, ot: i, st: a, K: o, Z: s, tt: c, nt: l } = Er();
|
|
1382
1494
|
return X({}, {
|
|
1383
1495
|
scrollbarsSize: e,
|
|
1384
1496
|
scrollbarsOverlaid: t,
|
|
@@ -1391,10 +1503,10 @@ Wr.plugin = (e) => {
|
|
|
1391
1503
|
getDefaultOptions: c,
|
|
1392
1504
|
setDefaultOptions: l
|
|
1393
1505
|
});
|
|
1394
|
-
},
|
|
1506
|
+
}, Xr.nonce = Cr, Xr.trustedTypePolicy = At;
|
|
1395
1507
|
//#endregion
|
|
1396
1508
|
//#region node_modules/overlayscrollbars-vue/overlayscrollbars-vue.mjs
|
|
1397
|
-
var
|
|
1509
|
+
var Zr = () => {
|
|
1398
1510
|
if (typeof window > "u") {
|
|
1399
1511
|
let e = () => {};
|
|
1400
1512
|
return [e, e];
|
|
@@ -1407,20 +1519,20 @@ var Gr = () => {
|
|
|
1407
1519
|
c(), t = i(n);
|
|
1408
1520
|
} : n, typeof a == "object" ? a : { timeout: 2233 });
|
|
1409
1521
|
}, c];
|
|
1410
|
-
},
|
|
1411
|
-
let t = null, n, r, i, a =
|
|
1412
|
-
return
|
|
1522
|
+
}, Qr = (e) => {
|
|
1523
|
+
let t = null, n, r, i, a = E(e || {}), [o, s] = Zr();
|
|
1524
|
+
return j(() => k(a.value?.defer), (e) => {
|
|
1413
1525
|
i = e;
|
|
1414
1526
|
}, {
|
|
1415
1527
|
deep: !0,
|
|
1416
1528
|
immediate: !0
|
|
1417
|
-
}),
|
|
1418
|
-
n = e,
|
|
1529
|
+
}), j(() => k(a.value?.options), (e) => {
|
|
1530
|
+
n = e, Xr.valid(t) && t.options(n || {}, !0);
|
|
1419
1531
|
}, {
|
|
1420
1532
|
deep: !0,
|
|
1421
1533
|
immediate: !0
|
|
1422
|
-
}),
|
|
1423
|
-
r = e,
|
|
1534
|
+
}), j(() => k(a.value?.events), (e) => {
|
|
1535
|
+
r = e, Xr.valid(t) && t.on(
|
|
1424
1536
|
/* c8 ignore next */
|
|
1425
1537
|
r || {},
|
|
1426
1538
|
!0
|
|
@@ -1428,14 +1540,14 @@ var Gr = () => {
|
|
|
1428
1540
|
}, {
|
|
1429
1541
|
deep: !0,
|
|
1430
1542
|
immediate: !0
|
|
1431
|
-
}),
|
|
1543
|
+
}), y(() => {
|
|
1432
1544
|
s(), t?.destroy();
|
|
1433
1545
|
}), [(e) => {
|
|
1434
|
-
if (
|
|
1435
|
-
let a = () => t =
|
|
1546
|
+
if (Xr.valid(t)) return t;
|
|
1547
|
+
let a = () => t = Xr(e, n || {}, r || {});
|
|
1436
1548
|
i ? o(a, i) : a();
|
|
1437
1549
|
}, () => t];
|
|
1438
|
-
},
|
|
1550
|
+
}, $r = /* @__PURE__ */ u({
|
|
1439
1551
|
__name: "OverlayScrollbarsComponent",
|
|
1440
1552
|
props: {
|
|
1441
1553
|
element: {
|
|
@@ -1453,12 +1565,12 @@ var Gr = () => {
|
|
|
1453
1565
|
"osScroll"
|
|
1454
1566
|
],
|
|
1455
1567
|
setup(e, { expose: t, emit: n }) {
|
|
1456
|
-
let
|
|
1568
|
+
let r = e, a = {
|
|
1457
1569
|
initialized: "osInitialized",
|
|
1458
1570
|
updated: "osUpdated",
|
|
1459
1571
|
destroyed: "osDestroyed",
|
|
1460
1572
|
scroll: "osScroll"
|
|
1461
|
-
}, { element: s, options: c, events: l, defer: u } =
|
|
1573
|
+
}, { element: s, options: c, events: l, defer: u } = O(r), d = E(null), f = E(null), p = x(), [m, h] = Qr({
|
|
1462
1574
|
options: c,
|
|
1463
1575
|
events: p,
|
|
1464
1576
|
defer: u
|
|
@@ -1466,7 +1578,7 @@ var Gr = () => {
|
|
|
1466
1578
|
return t({
|
|
1467
1579
|
osInstance: h,
|
|
1468
1580
|
getElement: () => d.value
|
|
1469
|
-
}),
|
|
1581
|
+
}), M((e) => {
|
|
1470
1582
|
let { value: t } = d, { value: n } = f;
|
|
1471
1583
|
t && (m(s.value === "body" ? {
|
|
1472
1584
|
target: t,
|
|
@@ -1478,30 +1590,30 @@ var Gr = () => {
|
|
|
1478
1590
|
content: n
|
|
1479
1591
|
}
|
|
1480
1592
|
}), e(() => h()?.destroy()));
|
|
1481
|
-
}),
|
|
1593
|
+
}), j(() => k(l), (e) => {
|
|
1482
1594
|
let t = e || {};
|
|
1483
|
-
p.value = Object.keys(
|
|
1595
|
+
p.value = Object.keys(a).reduce((e, r) => {
|
|
1484
1596
|
let i = t[r];
|
|
1485
|
-
return e[r] = [(...e) => n(
|
|
1597
|
+
return e[r] = [(...e) => n(a[r], ...e), ...(Array.isArray(i) ? i : [i]).filter(Boolean)], e;
|
|
1486
1598
|
}, {});
|
|
1487
1599
|
}, {
|
|
1488
1600
|
deep: !0,
|
|
1489
1601
|
immediate: !0
|
|
1490
|
-
}), (e, t) => (
|
|
1602
|
+
}), (e, t) => (b(), i(T(k(s)), {
|
|
1491
1603
|
"data-overlayscrollbars-initialize": "",
|
|
1492
1604
|
ref_key: "elementRef",
|
|
1493
1605
|
ref: d
|
|
1494
1606
|
}, {
|
|
1495
|
-
default:
|
|
1607
|
+
default: N(() => [k(s) === "body" ? C(e.$slots, "default", { key: 0 }) : (b(), o("div", {
|
|
1496
1608
|
key: 1,
|
|
1497
1609
|
"data-overlayscrollbars-contents": "",
|
|
1498
1610
|
ref_key: "slotRef",
|
|
1499
1611
|
ref: f
|
|
1500
|
-
}, [
|
|
1612
|
+
}, [C(e.$slots, "default")], 512))]),
|
|
1501
1613
|
_: 3
|
|
1502
1614
|
}, 512));
|
|
1503
1615
|
}
|
|
1504
|
-
}),
|
|
1616
|
+
}), ei = /*@__PURE__*/ u({
|
|
1505
1617
|
__name: "TextScroller",
|
|
1506
1618
|
props: {
|
|
1507
1619
|
delay: { default: 500 },
|
|
@@ -1513,69 +1625,70 @@ var Gr = () => {
|
|
|
1513
1625
|
}
|
|
1514
1626
|
},
|
|
1515
1627
|
setup(e) {
|
|
1516
|
-
let t = e, n =
|
|
1628
|
+
let t = e, n = x(), r = x(), i = x(!1), a = x(0), c = x(!1), l;
|
|
1517
1629
|
function u() {
|
|
1518
1630
|
return c.value || t.active;
|
|
1519
1631
|
}
|
|
1520
1632
|
function d() {
|
|
1521
|
-
l &&= (clearTimeout(l), void 0), i.value = !1,
|
|
1633
|
+
l &&= (clearTimeout(l), void 0), i.value = !1, a.value = 0;
|
|
1522
1634
|
}
|
|
1523
|
-
function
|
|
1635
|
+
function f() {
|
|
1524
1636
|
let e = n.value?.clientWidth ?? 0, t = r.value?.scrollWidth ?? 0;
|
|
1525
|
-
|
|
1637
|
+
a.value = Math.max(0, t - e), i.value = a.value > 0;
|
|
1526
1638
|
}
|
|
1527
|
-
function
|
|
1639
|
+
function h() {
|
|
1528
1640
|
d(), l = setTimeout(async () => {
|
|
1529
|
-
await
|
|
1641
|
+
await p(), u() && f();
|
|
1530
1642
|
}, t.delay);
|
|
1531
1643
|
}
|
|
1532
|
-
function
|
|
1644
|
+
function v() {
|
|
1533
1645
|
u() && (i.value = !1, l = setTimeout(() => {
|
|
1534
|
-
u() &&
|
|
1646
|
+
u() && f();
|
|
1535
1647
|
}, t.repeatDelay));
|
|
1536
1648
|
}
|
|
1537
|
-
return
|
|
1538
|
-
e ?
|
|
1539
|
-
}),
|
|
1649
|
+
return j(() => t.active, (e) => {
|
|
1650
|
+
e ? h() : c.value || d();
|
|
1651
|
+
}), _(d), (e, l) => (b(), o("span", {
|
|
1540
1652
|
ref_key: "viewport",
|
|
1541
1653
|
ref: n,
|
|
1542
|
-
class:
|
|
1543
|
-
style:
|
|
1544
|
-
"--scroll-distance": `${
|
|
1545
|
-
"--scroll-duration": `${Math.max(2,
|
|
1654
|
+
class: m(["text-scroller", { scrolling: i.value }]),
|
|
1655
|
+
style: g({
|
|
1656
|
+
"--scroll-distance": `${a.value}px`,
|
|
1657
|
+
"--scroll-duration": `${Math.max(2, a.value / t.speed)}s`
|
|
1546
1658
|
}),
|
|
1547
1659
|
onMouseenter: l[0] ||= (e) => {
|
|
1548
|
-
c.value = !0, t.active ||
|
|
1660
|
+
c.value = !0, t.active || h();
|
|
1549
1661
|
},
|
|
1550
1662
|
onMouseleave: l[1] ||= (e) => {
|
|
1551
1663
|
c.value = !1, t.active || d();
|
|
1552
1664
|
}
|
|
1553
|
-
}, [
|
|
1665
|
+
}, [s("span", {
|
|
1554
1666
|
ref_key: "content",
|
|
1555
1667
|
ref: r,
|
|
1556
1668
|
class: "text-scroller-content",
|
|
1557
|
-
onAnimationend:
|
|
1558
|
-
}, [
|
|
1669
|
+
onAnimationend: v
|
|
1670
|
+
}, [C(e.$slots, "default", {}, void 0, !0)], 544)], 38));
|
|
1559
1671
|
}
|
|
1560
|
-
}),
|
|
1672
|
+
}), Q = (e, t) => {
|
|
1561
1673
|
let n = e.__vccOpts || e;
|
|
1562
1674
|
for (let [e, r] of t) n[e] = r;
|
|
1563
1675
|
return n;
|
|
1564
|
-
},
|
|
1676
|
+
}, ti = /*#__PURE__*/ Q(ei, [["__scopeId", "data-v-8fac895b"]]), ni = { class: "component-list" }, ri = { class: "component-head" }, ii = ["title"], ai = { class: "palette-search" }, oi = {
|
|
1565
1677
|
key: 0,
|
|
1566
1678
|
class: "component-groups"
|
|
1567
|
-
},
|
|
1679
|
+
}, si = { class: "group-label" }, ci = { class: "component-items" }, li = [
|
|
1568
1680
|
"aria-label",
|
|
1681
|
+
"onDragstart",
|
|
1569
1682
|
"onMouseenter",
|
|
1570
1683
|
"onClick"
|
|
1571
|
-
],
|
|
1684
|
+
], ui = { class: "component-icon icon" }, di = {
|
|
1572
1685
|
key: 1,
|
|
1573
1686
|
class: "component-empty"
|
|
1574
|
-
},
|
|
1687
|
+
}, fi = /*#__PURE__*/ Q(/* @__PURE__ */ u({
|
|
1575
1688
|
__name: "ComponenList",
|
|
1576
1689
|
emits: ["select"],
|
|
1577
|
-
setup(t, { emit:
|
|
1578
|
-
let i =
|
|
1690
|
+
setup(t, { emit: n }) {
|
|
1691
|
+
let i = n, a = V(), u = x(""), d = x(), f = {
|
|
1579
1692
|
overflow: {
|
|
1580
1693
|
x: "hidden",
|
|
1581
1694
|
y: "scroll"
|
|
@@ -1753,10 +1866,10 @@ var Gr = () => {
|
|
|
1753
1866
|
groupKey: "component-oauth",
|
|
1754
1867
|
icon: "checklist"
|
|
1755
1868
|
}
|
|
1756
|
-
], m =
|
|
1869
|
+
], m = r(() => {
|
|
1757
1870
|
let e = u.value.trim().toLowerCase();
|
|
1758
1871
|
return e ? p.filter((t) => `${t.label} ${t.type}`.toLowerCase().includes(e)) : p;
|
|
1759
|
-
}), h =
|
|
1872
|
+
}), h = r(() => {
|
|
1760
1873
|
let e = /* @__PURE__ */ new Map();
|
|
1761
1874
|
for (let t of m.value) {
|
|
1762
1875
|
let n = e.get(t.group) ?? [];
|
|
@@ -1768,49 +1881,54 @@ var Gr = () => {
|
|
|
1768
1881
|
items: t
|
|
1769
1882
|
}));
|
|
1770
1883
|
});
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1884
|
+
function g(e, t) {
|
|
1885
|
+
e.dataTransfer && (e.dataTransfer.effectAllowed = "copy", e.dataTransfer.setData("application/x-aham-designer-component", t));
|
|
1886
|
+
}
|
|
1887
|
+
return (t, n) => (b(), o("section", ni, [
|
|
1888
|
+
s("div", ri, [s("span", { title: k(a)("components", "Components") }, D(k(a)("components", "Components")), 9, ii)]),
|
|
1889
|
+
s("div", ai, [n[2] ||= s("span", { class: "icon" }, "search", -1), P(s("input", {
|
|
1774
1890
|
"onUpdate:modelValue": n[0] ||= (e) => u.value = e,
|
|
1775
1891
|
type: "search",
|
|
1776
1892
|
placeholder: "Search components...",
|
|
1777
1893
|
"aria-label": "Search components"
|
|
1778
|
-
}, null, 512), [[
|
|
1779
|
-
l(
|
|
1894
|
+
}, null, 512), [[A, u.value]])]),
|
|
1895
|
+
l(k($r), {
|
|
1780
1896
|
class: "component-content",
|
|
1781
1897
|
options: f,
|
|
1782
1898
|
defer: ""
|
|
1783
1899
|
}, {
|
|
1784
|
-
default:
|
|
1900
|
+
default: N(() => [h.value.length ? (b(), o("div", oi, [(b(!0), o(e, null, S(h.value, (t) => (b(), o("section", {
|
|
1785
1901
|
key: t.name,
|
|
1786
1902
|
class: "component-group"
|
|
1787
|
-
}, [
|
|
1903
|
+
}, [s("div", si, D(k(a)(t.key, t.name)), 1), s("div", ci, [(b(!0), o(e, null, S(t.items, (e) => (b(), o("button", {
|
|
1788
1904
|
key: e.type,
|
|
1789
1905
|
type: "button",
|
|
1790
1906
|
class: "component-item",
|
|
1791
|
-
"aria-label": `${
|
|
1907
|
+
"aria-label": `${k(a)("add-component", "Add")} ${k(a)(e.key, e.label)}`,
|
|
1908
|
+
draggable: "true",
|
|
1909
|
+
onDragstart: (t) => g(t, e.type),
|
|
1792
1910
|
onMouseenter: (t) => d.value = e.type,
|
|
1793
1911
|
onMouseleave: n[1] ||= (e) => d.value = void 0,
|
|
1794
1912
|
onClick: (t) => i("select", e.type)
|
|
1795
|
-
}, [
|
|
1913
|
+
}, [s("span", ui, D(e.icon), 1), l(ti, {
|
|
1796
1914
|
class: "component-label",
|
|
1797
1915
|
active: d.value === e.type
|
|
1798
1916
|
}, {
|
|
1799
|
-
default:
|
|
1917
|
+
default: N(() => [c(D(k(a)(e.key, e.label)), 1)]),
|
|
1800
1918
|
_: 2
|
|
1801
|
-
}, 1032, ["active"])], 40,
|
|
1919
|
+
}, 1032, ["active"])], 40, li))), 128))])]))), 128))])) : (b(), o("span", di, D(k(a)("no-components-found", "No components found.")), 1))]),
|
|
1802
1920
|
_: 1
|
|
1803
1921
|
})
|
|
1804
1922
|
]));
|
|
1805
1923
|
}
|
|
1806
|
-
}), [["__scopeId", "data-v-
|
|
1924
|
+
}), [["__scopeId", "data-v-4ebaf9de"]]), pi = [
|
|
1807
1925
|
"title",
|
|
1808
1926
|
"aria-label",
|
|
1809
1927
|
"disabled"
|
|
1810
|
-
],
|
|
1928
|
+
], mi = {
|
|
1811
1929
|
class: "icon",
|
|
1812
1930
|
"aria-hidden": "true"
|
|
1813
|
-
},
|
|
1931
|
+
}, hi = /*#__PURE__*/ Q(/* @__PURE__ */ u({
|
|
1814
1932
|
__name: "IconButton",
|
|
1815
1933
|
props: {
|
|
1816
1934
|
icon: { default: "settings" },
|
|
@@ -1818,38 +1936,42 @@ var Gr = () => {
|
|
|
1818
1936
|
disabled: {
|
|
1819
1937
|
type: Boolean,
|
|
1820
1938
|
default: !1
|
|
1939
|
+
},
|
|
1940
|
+
active: {
|
|
1941
|
+
type: Boolean,
|
|
1942
|
+
default: !1
|
|
1821
1943
|
}
|
|
1822
1944
|
},
|
|
1823
1945
|
setup(e) {
|
|
1824
|
-
return (t, n) => (
|
|
1825
|
-
class: "icon-button",
|
|
1946
|
+
return (t, n) => (b(), o("button", {
|
|
1947
|
+
class: m(["icon-button", { active: e.active }]),
|
|
1826
1948
|
type: "button",
|
|
1827
1949
|
title: e.title,
|
|
1828
1950
|
"aria-label": e.title,
|
|
1829
1951
|
disabled: e.disabled
|
|
1830
|
-
}, [
|
|
1952
|
+
}, [s("span", mi, D(e.icon), 1)], 10, pi));
|
|
1831
1953
|
}
|
|
1832
|
-
}), [["__scopeId", "data-v-
|
|
1954
|
+
}), [["__scopeId", "data-v-5184fa46"]]), gi = [
|
|
1833
1955
|
"title",
|
|
1834
1956
|
"aria-label",
|
|
1835
1957
|
"aria-expanded"
|
|
1836
|
-
],
|
|
1958
|
+
], _i = ["disabled", "onClick"], vi = {
|
|
1837
1959
|
key: 0,
|
|
1838
1960
|
class: "icon",
|
|
1839
1961
|
"aria-hidden": "true"
|
|
1840
|
-
},
|
|
1962
|
+
}, yi = /*#__PURE__*/ Q(/* @__PURE__ */ u({
|
|
1841
1963
|
__name: "MoreButton",
|
|
1842
1964
|
props: { items: {} },
|
|
1843
1965
|
emits: ["select"],
|
|
1844
|
-
setup(n, { emit:
|
|
1845
|
-
let c =
|
|
1966
|
+
setup(n, { emit: r }) {
|
|
1967
|
+
let c = r, l = x(!1), u = x(), d = x(), f = x(), m = x({
|
|
1846
1968
|
top: 0,
|
|
1847
1969
|
right: 0
|
|
1848
|
-
}),
|
|
1849
|
-
function
|
|
1970
|
+
}), h = V()("tooltip-sidebar-more", "More");
|
|
1971
|
+
function y() {
|
|
1850
1972
|
if (!d.value) return;
|
|
1851
1973
|
let e = d.value.getBoundingClientRect();
|
|
1852
|
-
|
|
1974
|
+
m.value = {
|
|
1853
1975
|
top: e.bottom + 6,
|
|
1854
1976
|
right: Math.max(8, window.innerWidth - e.right)
|
|
1855
1977
|
};
|
|
@@ -1857,63 +1979,63 @@ var Gr = () => {
|
|
|
1857
1979
|
function w() {
|
|
1858
1980
|
l.value = !l.value;
|
|
1859
1981
|
}
|
|
1860
|
-
function
|
|
1982
|
+
function T(e) {
|
|
1861
1983
|
e.disabled || (c("select", e.id), l.value = !1);
|
|
1862
1984
|
}
|
|
1863
|
-
function
|
|
1985
|
+
function E(e) {
|
|
1864
1986
|
let t = e.target;
|
|
1865
|
-
u.value && !u.value.contains(t) && !
|
|
1987
|
+
u.value && !u.value.contains(t) && !f.value?.contains(t) && (l.value = !1);
|
|
1866
1988
|
}
|
|
1867
|
-
function
|
|
1989
|
+
function O(e) {
|
|
1868
1990
|
e.key === "Escape" && (l.value = !1);
|
|
1869
1991
|
}
|
|
1870
|
-
return
|
|
1871
|
-
document.addEventListener("click",
|
|
1872
|
-
}),
|
|
1873
|
-
document.removeEventListener("click",
|
|
1874
|
-
}),
|
|
1875
|
-
e && (await
|
|
1876
|
-
}), (
|
|
1992
|
+
return v(() => {
|
|
1993
|
+
document.addEventListener("click", E), document.addEventListener("keydown", O), window.addEventListener("resize", y), window.addEventListener("scroll", y, !0);
|
|
1994
|
+
}), _(() => {
|
|
1995
|
+
document.removeEventListener("click", E), document.removeEventListener("keydown", O), window.removeEventListener("resize", y), window.removeEventListener("scroll", y, !0);
|
|
1996
|
+
}), j(l, async (e) => {
|
|
1997
|
+
e && (await p(), y());
|
|
1998
|
+
}), (r, c) => (b(), o("div", {
|
|
1877
1999
|
ref_key: "root",
|
|
1878
2000
|
ref: u,
|
|
1879
2001
|
class: "more-menu"
|
|
1880
|
-
}, [
|
|
2002
|
+
}, [s("button", {
|
|
1881
2003
|
ref_key: "button",
|
|
1882
2004
|
ref: d,
|
|
1883
2005
|
class: "more-button",
|
|
1884
2006
|
type: "button",
|
|
1885
|
-
title:
|
|
1886
|
-
"aria-label":
|
|
2007
|
+
title: k(h),
|
|
2008
|
+
"aria-label": k(h),
|
|
1887
2009
|
"aria-expanded": l.value,
|
|
1888
2010
|
"aria-haspopup": "menu",
|
|
1889
|
-
onClick:
|
|
1890
|
-
}, [...c[0] ||= [
|
|
2011
|
+
onClick: I(w, ["stop"])
|
|
2012
|
+
}, [...c[0] ||= [s("span", {
|
|
1891
2013
|
class: "icon",
|
|
1892
2014
|
"aria-hidden": "true"
|
|
1893
|
-
}, "more_vert", -1)]], 8,
|
|
2015
|
+
}, "more_vert", -1)]], 8, gi), (b(), i(t, { to: "body" }, [l.value ? (b(), o("div", {
|
|
1894
2016
|
key: 0,
|
|
1895
2017
|
ref_key: "dropdown",
|
|
1896
|
-
ref:
|
|
2018
|
+
ref: f,
|
|
1897
2019
|
class: "dropdown",
|
|
1898
2020
|
role: "menu",
|
|
1899
|
-
style:
|
|
1900
|
-
top: `${
|
|
1901
|
-
right: `${
|
|
2021
|
+
style: g({
|
|
2022
|
+
top: `${m.value.top}px`,
|
|
2023
|
+
right: `${m.value.right}px`
|
|
1902
2024
|
})
|
|
1903
|
-
}, [n.items?.length ? (
|
|
2025
|
+
}, [n.items?.length ? (b(!0), o(e, { key: 0 }, S(n.items, (e) => (b(), o("button", {
|
|
1904
2026
|
key: e.id,
|
|
1905
2027
|
class: "menu-item",
|
|
1906
2028
|
type: "button",
|
|
1907
2029
|
role: "menuitem",
|
|
1908
2030
|
disabled: e.disabled,
|
|
1909
|
-
onClick: (t) =>
|
|
1910
|
-
}, [e.icon ? (
|
|
2031
|
+
onClick: (t) => T(e)
|
|
2032
|
+
}, [e.icon ? (b(), o("span", vi, D(e.icon), 1)) : a("", !0), s("span", null, D(e.label), 1)], 8, _i))), 128)) : C(r.$slots, "menu", { close: () => l.value = !1 }, void 0, !0, 1)], 4)) : a("", !0)]))], 512));
|
|
1911
2033
|
}
|
|
1912
|
-
}), [["__scopeId", "data-v-923fea1e"]]),
|
|
2034
|
+
}), [["__scopeId", "data-v-923fea1e"]]), bi = ["disabled", "aria-busy"], xi = {
|
|
1913
2035
|
key: 0,
|
|
1914
2036
|
class: "spinner",
|
|
1915
2037
|
"aria-hidden": "true"
|
|
1916
|
-
},
|
|
2038
|
+
}, Si = /*#__PURE__*/ Q(/* @__PURE__ */ u({
|
|
1917
2039
|
__name: "SaveButton",
|
|
1918
2040
|
props: {
|
|
1919
2041
|
disabled: {
|
|
@@ -1926,363 +2048,81 @@ var Gr = () => {
|
|
|
1926
2048
|
}
|
|
1927
2049
|
},
|
|
1928
2050
|
setup(e) {
|
|
1929
|
-
let t =
|
|
1930
|
-
return (n, r) => (
|
|
2051
|
+
let t = V();
|
|
2052
|
+
return (n, r) => (b(), o("button", {
|
|
1931
2053
|
class: "save-button",
|
|
1932
2054
|
type: "button",
|
|
1933
2055
|
disabled: e.disabled || e.working,
|
|
1934
2056
|
"aria-busy": e.working
|
|
1935
|
-
}, [e.working ? (
|
|
2057
|
+
}, [e.working ? (b(), o("span", xi)) : a("", !0), s("span", null, D(k(t)("save-changes", "Save changes")), 1)], 8, bi));
|
|
1936
2058
|
}
|
|
1937
|
-
}), [["__scopeId", "data-v-4a359870"]]),
|
|
2059
|
+
}), [["__scopeId", "data-v-4a359870"]]), Ci = { class: "branding" }, wi = { class: "title" }, Ti = { class: "subject" }, Ei = { class: "document-name" }, Di = ["title"], Oi = { class: "actions" }, ki = /*#__PURE__*/ Q(/* @__PURE__ */ u({
|
|
1938
2060
|
__name: "Header",
|
|
1939
2061
|
props: {
|
|
1940
2062
|
subject: {},
|
|
1941
2063
|
shared: { type: Boolean },
|
|
1942
|
-
|
|
1943
|
-
moreItems: {}
|
|
2064
|
+
darkModeChangeable: { type: Boolean },
|
|
2065
|
+
moreItems: {},
|
|
2066
|
+
darkMode: { type: Boolean },
|
|
2067
|
+
translationsOpen: { type: Boolean },
|
|
2068
|
+
themeOpen: { type: Boolean }
|
|
1944
2069
|
},
|
|
1945
|
-
emits: [
|
|
2070
|
+
emits: [
|
|
2071
|
+
"moreSelect",
|
|
2072
|
+
"toggleTheme",
|
|
2073
|
+
"toggleTranslations",
|
|
2074
|
+
"toggleThemePanel"
|
|
2075
|
+
],
|
|
1946
2076
|
setup(e, { emit: t }) {
|
|
1947
|
-
let n = e,
|
|
1948
|
-
return (t, u) => (
|
|
1949
|
-
|
|
1950
|
-
|
|
2077
|
+
let n = e, r = t, c = V();
|
|
2078
|
+
return (t, u) => (b(), o("header", null, [
|
|
2079
|
+
s("div", Ci, [u[4] ||= s("span", { class: "icon" }, "design_services", -1), s("span", wi, D(k(c)("designer", "Designer")), 1)]),
|
|
2080
|
+
s("div", Ti, [s("span", Ei, D(e.subject), 1), e.shared ? (b(), o("span", {
|
|
1951
2081
|
key: 0,
|
|
1952
2082
|
class: "shared icon",
|
|
1953
|
-
title:
|
|
1954
|
-
}, "groups", 8,
|
|
1955
|
-
|
|
1956
|
-
l(
|
|
2083
|
+
title: k(c)("shared", "Shared")
|
|
2084
|
+
}, "groups", 8, Di)) : a("", !0)]),
|
|
2085
|
+
s("div", Oi, [
|
|
2086
|
+
l(hi, {
|
|
1957
2087
|
icon: "translate",
|
|
1958
|
-
title:
|
|
1959
|
-
|
|
1960
|
-
|
|
2088
|
+
title: k(c)("translations", "Translations"),
|
|
2089
|
+
active: n.translationsOpen,
|
|
2090
|
+
onClick: u[0] ||= (e) => r("toggleTranslations")
|
|
2091
|
+
}, null, 8, ["title", "active"]),
|
|
2092
|
+
l(hi, {
|
|
1961
2093
|
icon: "palette",
|
|
1962
|
-
title:
|
|
1963
|
-
|
|
1964
|
-
|
|
2094
|
+
title: k(c)("change-theme", "Change theme"),
|
|
2095
|
+
active: n.themeOpen,
|
|
2096
|
+
onClick: u[1] ||= (e) => r("toggleThemePanel")
|
|
2097
|
+
}, null, 8, ["title", "active"]),
|
|
2098
|
+
n.darkModeChangeable === !1 ? a("", !0) : (b(), i(hi, {
|
|
1965
2099
|
key: 0,
|
|
1966
|
-
icon: "dark_mode",
|
|
1967
|
-
title:
|
|
1968
|
-
|
|
1969
|
-
|
|
2100
|
+
icon: n.darkMode ? "light_mode" : "dark_mode",
|
|
2101
|
+
title: k(c)("toggle-theme", "Toggle theme"),
|
|
2102
|
+
onClick: u[2] ||= (e) => r("toggleTheme")
|
|
2103
|
+
}, null, 8, ["icon", "title"])),
|
|
2104
|
+
l(hi, {
|
|
1970
2105
|
icon: "visibility",
|
|
1971
|
-
title:
|
|
2106
|
+
title: k(c)("preview", "Preview")
|
|
1972
2107
|
}, null, 8, ["title"]),
|
|
1973
|
-
l(
|
|
2108
|
+
l(Si, {
|
|
1974
2109
|
disabled: !1,
|
|
1975
2110
|
working: !1
|
|
1976
2111
|
}),
|
|
1977
|
-
l(
|
|
2112
|
+
l(yi, {
|
|
1978
2113
|
items: n.moreItems,
|
|
1979
|
-
onSelect: u[
|
|
2114
|
+
onSelect: u[3] ||= (e) => r("moreSelect", e)
|
|
1980
2115
|
}, null, 8, ["items"])
|
|
1981
2116
|
])
|
|
1982
2117
|
]));
|
|
1983
2118
|
}
|
|
1984
|
-
}), [["__scopeId", "data-v-
|
|
1985
|
-
function Ei(e, t) {
|
|
1986
|
-
return v(), a("section", Ti, [...t[0] ||= [s("<div class=\"properties-head\" data-v-d42babf5><span class=\"property-icon icon\" data-v-d42babf5>radio_button_unchecked</span><strong data-v-d42babf5>No selection</strong></div><div class=\"properties-empty\" data-v-d42babf5>Select an element on the canvas, or add one from the left, to edit its properties here.</div><div class=\"layers\" data-v-d42babf5><div class=\"layers-title\" data-v-d42babf5>Layers</div><div class=\"layer-empty\" data-v-d42babf5>No layers yet.</div></div>", 3)]]);
|
|
1987
|
-
}
|
|
1988
|
-
var Di = /*#__PURE__*/ $(wi, [["render", Ei], ["__scopeId", "data-v-d42babf5"]]), Oi = {
|
|
1989
|
-
key: 0,
|
|
1990
|
-
class: "side-info"
|
|
1991
|
-
}, ki = { class: "info-title" }, Ai = 102, ji = /*#__PURE__*/ $(/* @__PURE__ */ u({
|
|
1992
|
-
__name: "SideInfo",
|
|
1993
|
-
props: { items: {} },
|
|
1994
|
-
setup(t) {
|
|
1995
|
-
let s = t, c = P(), l = y(), u = y(0), d = n(() => (s.items?.length ?? 0) > 1 && u.value > Ai), m;
|
|
1996
|
-
function _() {
|
|
1997
|
-
u.value = l.value?.scrollHeight ?? 0;
|
|
1998
|
-
}
|
|
1999
|
-
return k(() => s.items, () => void f(_), { deep: !0 }), g(() => {
|
|
2000
|
-
f(() => {
|
|
2001
|
-
_(), m = new ResizeObserver(_), l.value && m.observe(l.value);
|
|
2002
|
-
});
|
|
2003
|
-
}), h(() => m?.disconnect()), (t, n) => s.items?.length ? (v(), a("section", Oi, [o("div", ki, T(D(c)("checklist", "Checklist")), 1), d.value ? (v(), r(D(qr), {
|
|
2004
|
-
key: 0,
|
|
2005
|
-
class: "info-list scrollable",
|
|
2006
|
-
options: {
|
|
2007
|
-
overflow: {
|
|
2008
|
-
x: "hidden",
|
|
2009
|
-
y: "scroll"
|
|
2010
|
-
},
|
|
2011
|
-
scrollbars: { autoHide: "never" }
|
|
2012
|
-
},
|
|
2013
|
-
defer: ""
|
|
2014
|
-
}, {
|
|
2015
|
-
default: j(() => [o("div", {
|
|
2016
|
-
ref_key: "listElement",
|
|
2017
|
-
ref: l
|
|
2018
|
-
}, [(v(!0), a(e, null, b(s.items, (e) => (v(), a("div", {
|
|
2019
|
-
key: e.id,
|
|
2020
|
-
class: "info-row"
|
|
2021
|
-
}, [o("span", { class: p(["info-dot", { complete: e.complete }]) }, null, 2), o("span", null, T(e.label), 1)]))), 128))], 512)]),
|
|
2022
|
-
_: 1
|
|
2023
|
-
})) : (v(), a("div", {
|
|
2024
|
-
key: 1,
|
|
2025
|
-
ref_key: "listElement",
|
|
2026
|
-
ref: l,
|
|
2027
|
-
class: "info-list"
|
|
2028
|
-
}, [(v(!0), a(e, null, b(s.items, (e) => (v(), a("div", {
|
|
2029
|
-
key: e.id,
|
|
2030
|
-
class: "info-row"
|
|
2031
|
-
}, [o("span", { class: p(["info-dot", { complete: e.complete }]) }, null, 2), o("span", null, T(e.label), 1)]))), 128))], 512))])) : i("", !0);
|
|
2032
|
-
}
|
|
2033
|
-
}), [["__scopeId", "data-v-ee9b479a"]]), Mi = { class: "template-list" }, Ni = { class: "section-head" }, Pi = ["title"], Fi = ["aria-label", "title"], Ii = ["onClick"], Li = {
|
|
2034
|
-
class: "tab-icon icon",
|
|
2035
|
-
"aria-hidden": "true"
|
|
2036
|
-
}, Ri = ["onKeydown", "onBlur"], zi = { class: "tab-channel" }, Bi = { class: "tab-version" }, Vi = {
|
|
2037
|
-
key: 2,
|
|
2038
|
-
class: "tab-changed",
|
|
2039
|
-
"aria-label": "Unsaved changes"
|
|
2040
|
-
}, Hi = {
|
|
2041
|
-
key: 0,
|
|
2042
|
-
class: "empty-list"
|
|
2043
|
-
}, Ui = /*#__PURE__*/ $(/* @__PURE__ */ u({
|
|
2044
|
-
__name: "TemplateList",
|
|
2045
|
-
props: {
|
|
2046
|
-
templates: {},
|
|
2047
|
-
focusedTemplateId: {}
|
|
2048
|
-
},
|
|
2049
|
-
emits: [
|
|
2050
|
-
"add",
|
|
2051
|
-
"rename",
|
|
2052
|
-
"select"
|
|
2053
|
-
],
|
|
2054
|
-
setup(t, { emit: n }) {
|
|
2055
|
-
let s = t, u = n, d = P(), m = /* @__PURE__ */ new Map(), h = y(), g = y(""), _ = y();
|
|
2056
|
-
function x(e, t) {
|
|
2057
|
-
t instanceof HTMLElement ? m.set(e, t) : m.delete(e);
|
|
2058
|
-
}
|
|
2059
|
-
async function S(e) {
|
|
2060
|
-
await f(), m.get(e)?.scrollIntoView({ block: "nearest" });
|
|
2061
|
-
}
|
|
2062
|
-
function C(e) {
|
|
2063
|
-
h.value = e.id, g.value = e.name, f(() => _.value?.select());
|
|
2064
|
-
}
|
|
2065
|
-
function w(e) {
|
|
2066
|
-
let t = g.value.trim();
|
|
2067
|
-
h.value = void 0, t && t !== e.name && u("rename", e.id, t);
|
|
2068
|
-
}
|
|
2069
|
-
function E() {
|
|
2070
|
-
h.value = void 0;
|
|
2071
|
-
}
|
|
2072
|
-
return k(() => s.focusedTemplateId, (e) => {
|
|
2073
|
-
e && S(e);
|
|
2074
|
-
}, { immediate: !0 }), (n, s) => (v(), a("section", Mi, [o("div", Ni, [o("span", { title: D(d)("screens", "Screens") }, T(D(d)("screens", "Screens")), 9, Pi), o("button", {
|
|
2075
|
-
type: "button",
|
|
2076
|
-
"aria-label": D(d)("add-screen", "Add screen"),
|
|
2077
|
-
title: D(d)("add-screen", "Add screen"),
|
|
2078
|
-
onClick: s[0] ||= (e) => u("add")
|
|
2079
|
-
}, [...s[4] ||= [o("span", { "aria-hidden": "true" }, "+", -1)]], 8, Fi)]), l(D(qr), {
|
|
2080
|
-
class: "template-tabs",
|
|
2081
|
-
options: {
|
|
2082
|
-
overflow: {
|
|
2083
|
-
x: "hidden",
|
|
2084
|
-
y: "scroll"
|
|
2085
|
-
},
|
|
2086
|
-
scrollbars: { autoHide: "never" }
|
|
2087
|
-
},
|
|
2088
|
-
defer: ""
|
|
2089
|
-
}, {
|
|
2090
|
-
default: j(() => [(v(!0), a(e, null, b(t.templates ?? [], (e, n) => (v(), a("button", {
|
|
2091
|
-
key: e.id,
|
|
2092
|
-
ref_for: !0,
|
|
2093
|
-
ref: (t) => x(e.id, t),
|
|
2094
|
-
type: "button",
|
|
2095
|
-
class: p(["template-tab", { active: t.focusedTemplateId ? e.id === t.focusedTemplateId : n === 0 }]),
|
|
2096
|
-
onClick: (t) => u("select", e.id)
|
|
2097
|
-
}, [
|
|
2098
|
-
o("span", Li, T(e.icon), 1),
|
|
2099
|
-
h.value === e.id ? M((v(), a("input", {
|
|
2100
|
-
key: 0,
|
|
2101
|
-
ref_for: !0,
|
|
2102
|
-
ref_key: "editInput",
|
|
2103
|
-
ref: _,
|
|
2104
|
-
"onUpdate:modelValue": s[1] ||= (e) => g.value = e,
|
|
2105
|
-
class: "tab-label tab-label-input",
|
|
2106
|
-
type: "text",
|
|
2107
|
-
onClick: s[2] ||= N(() => {}, ["stop"]),
|
|
2108
|
-
onDblclick: s[3] ||= N(() => {}, ["stop"]),
|
|
2109
|
-
onKeydown: [ee(N((t) => w(e), ["prevent"]), ["enter"]), ee(N(E, ["prevent"]), ["esc"])],
|
|
2110
|
-
onBlur: (t) => w(e)
|
|
2111
|
-
}, null, 40, Ri)), [[O, g.value]]) : (v(), r(Yr, {
|
|
2112
|
-
key: 1,
|
|
2113
|
-
class: "tab-label",
|
|
2114
|
-
onDblclick: N((t) => e.type === "dynamic" && C(e), ["stop"])
|
|
2115
|
-
}, {
|
|
2116
|
-
default: j(() => [c(T(e.name), 1)]),
|
|
2117
|
-
_: 2
|
|
2118
|
-
}, 1032, ["onDblclick"])),
|
|
2119
|
-
o("span", zi, T(e.channel.charAt(0).toUpperCase()), 1),
|
|
2120
|
-
o("span", Bi, T(e.version), 1),
|
|
2121
|
-
e.changed ? (v(), a("span", Vi)) : i("", !0)
|
|
2122
|
-
], 10, Ii))), 128)), t.templates?.length ? i("", !0) : (v(), a("p", Hi, "No screens yet."))]),
|
|
2123
|
-
_: 1
|
|
2124
|
-
})]));
|
|
2125
|
-
}
|
|
2126
|
-
}), [["__scopeId", "data-v-927e0835"]]), Wi = { class: "ui-designer" }, Gi = { class: "contents" }, Ki = "aham-ui-designer-screens-height", qi = /*#__PURE__*/ $(/* @__PURE__ */ u({
|
|
2127
|
-
__name: "Designer",
|
|
2128
|
-
props: {
|
|
2129
|
-
value: {},
|
|
2130
|
-
options: {}
|
|
2131
|
-
},
|
|
2132
|
-
emits: [
|
|
2133
|
-
"moreSelect",
|
|
2134
|
-
"screenSelect",
|
|
2135
|
-
"screenAdd",
|
|
2136
|
-
"screenRename"
|
|
2137
|
-
],
|
|
2138
|
-
setup(e, { emit: t }) {
|
|
2139
|
-
let r = e, i = t, s = y(), c = y([]), u = y(), d = y(50), f = !1, p = n(() => r.options?.checklist?.map((e) => ({
|
|
2140
|
-
...e,
|
|
2141
|
-
complete: e.check ? e.check({ templates: c.value }) : e.complete
|
|
2142
|
-
})));
|
|
2143
|
-
k(() => r.options?.templates, (e) => {
|
|
2144
|
-
c.value = e ? [...e] : [], !u.value && c.value[0] && (u.value = c.value[0].id);
|
|
2145
|
-
}, { immediate: !0 });
|
|
2146
|
-
function _() {
|
|
2147
|
-
let e = c.value.filter((e) => e.icon === "view_column").length, t = `layout-${Date.now()}`, n = {
|
|
2148
|
-
id: t,
|
|
2149
|
-
name: e ? `New Layout ${e + 1}` : "New Layout",
|
|
2150
|
-
version: "1",
|
|
2151
|
-
channel: "ui",
|
|
2152
|
-
icon: "view_column",
|
|
2153
|
-
changed: !0,
|
|
2154
|
-
type: "dynamic"
|
|
2155
|
-
};
|
|
2156
|
-
c.value.push(n), u.value = t, i("screenAdd", n), i("screenSelect", n);
|
|
2157
|
-
}
|
|
2158
|
-
function b(e, t) {
|
|
2159
|
-
let n = c.value.find((t) => t.id === e);
|
|
2160
|
-
n && (n.name = t, i("screenRename", e, t));
|
|
2161
|
-
}
|
|
2162
|
-
function x(e) {
|
|
2163
|
-
let t = c.value.find((t) => t.id === e);
|
|
2164
|
-
t && (u.value = e, i("screenSelect", t));
|
|
2165
|
-
}
|
|
2166
|
-
function C(e) {
|
|
2167
|
-
i("moreSelect", e);
|
|
2168
|
-
}
|
|
2169
|
-
function w() {
|
|
2170
|
-
f && (f = !1, document.body.style.removeProperty("cursor"), document.removeEventListener("pointermove", T), document.removeEventListener("pointerup", w));
|
|
2171
|
-
}
|
|
2172
|
-
function T(e) {
|
|
2173
|
-
let t = s.value?.getBoundingClientRect();
|
|
2174
|
-
if (!t) return;
|
|
2175
|
-
let n = (e.clientY - t.top) / t.height * 100;
|
|
2176
|
-
d.value = Math.min(80, Math.max(20, n));
|
|
2177
|
-
}
|
|
2178
|
-
function E(e) {
|
|
2179
|
-
f = !0, document.body.style.cursor = "row-resize", document.addEventListener("pointermove", T), document.addEventListener("pointerup", w), e.currentTarget.setPointerCapture?.(e.pointerId);
|
|
2180
|
-
}
|
|
2181
|
-
return g(() => {
|
|
2182
|
-
let e = Number(localStorage.getItem(Ki));
|
|
2183
|
-
Number.isFinite(e) && (d.value = Math.min(80, Math.max(20, e)));
|
|
2184
|
-
}), k(d, (e) => {
|
|
2185
|
-
localStorage.setItem(Ki, String(e));
|
|
2186
|
-
}), h(w), (t, n) => {
|
|
2187
|
-
let r = S("Workspace");
|
|
2188
|
-
return v(), a("section", Wi, [l(Ci, {
|
|
2189
|
-
subject: e.options?.subject ?? "",
|
|
2190
|
-
shared: e.options?.shared,
|
|
2191
|
-
"theme-changeable": e.options?.theme?.changeable,
|
|
2192
|
-
"more-items": e.options?.moreItems,
|
|
2193
|
-
onMoreSelect: C
|
|
2194
|
-
}, null, 8, [
|
|
2195
|
-
"subject",
|
|
2196
|
-
"shared",
|
|
2197
|
-
"theme-changeable",
|
|
2198
|
-
"more-items"
|
|
2199
|
-
]), o("div", Gi, [
|
|
2200
|
-
o("aside", null, [o("div", {
|
|
2201
|
-
ref_key: "sidebarPanels",
|
|
2202
|
-
ref: s,
|
|
2203
|
-
class: "sidebar-panels",
|
|
2204
|
-
style: m({ "--screens-height": `${d.value}%` })
|
|
2205
|
-
}, [
|
|
2206
|
-
l(Ui, {
|
|
2207
|
-
templates: c.value,
|
|
2208
|
-
"focused-template-id": u.value,
|
|
2209
|
-
onAdd: _,
|
|
2210
|
-
onRename: b,
|
|
2211
|
-
onSelect: x
|
|
2212
|
-
}, null, 8, ["templates", "focused-template-id"]),
|
|
2213
|
-
o("button", {
|
|
2214
|
-
type: "button",
|
|
2215
|
-
class: "panel-resizer",
|
|
2216
|
-
"aria-label": "Resize screens and components panels",
|
|
2217
|
-
onPointerdown: E
|
|
2218
|
-
}, [...n[0] ||= [o("span", { "aria-hidden": "true" }, null, -1)]], 32),
|
|
2219
|
-
l(oi)
|
|
2220
|
-
], 4), l(ji, { items: p.value }, null, 8, ["items"])]),
|
|
2221
|
-
l(r, {
|
|
2222
|
-
class: "workspace",
|
|
2223
|
-
subject: e.options?.subject ?? ""
|
|
2224
|
-
}, null, 8, ["subject"]),
|
|
2225
|
-
l(Di, { class: "properties" })
|
|
2226
|
-
])]);
|
|
2227
|
-
};
|
|
2228
|
-
}
|
|
2229
|
-
}), [["__scopeId", "data-v-9c3240d0"]]), Ji = te("checklist", {
|
|
2230
|
-
state: () => ({ items: [{
|
|
2231
|
-
id: "all-screens-completed",
|
|
2232
|
-
label: "All screens completed",
|
|
2233
|
-
complete: !1,
|
|
2234
|
-
check: ({ templates: e }) => e.length > 0 && e.every((e) => !e.changed)
|
|
2235
|
-
}] }),
|
|
2236
|
-
actions: {
|
|
2237
|
-
setComplete(e, t = !0) {
|
|
2238
|
-
let n = this.items.find((t) => t.id === e);
|
|
2239
|
-
n && (n.complete = t);
|
|
2240
|
-
},
|
|
2241
|
-
reset() {
|
|
2242
|
-
this.items.forEach((e) => {
|
|
2243
|
-
e.complete = !1;
|
|
2244
|
-
});
|
|
2245
|
-
}
|
|
2246
|
-
}
|
|
2247
|
-
}), Yi = te("screens", {
|
|
2248
|
-
state: () => ({
|
|
2249
|
-
screens: [],
|
|
2250
|
-
screen: null
|
|
2251
|
-
}),
|
|
2252
|
-
actions: {
|
|
2253
|
-
setScreens(e) {
|
|
2254
|
-
this.screens = e, this.screen = e[0] ?? null;
|
|
2255
|
-
},
|
|
2256
|
-
setActive(e) {
|
|
2257
|
-
this.screen = this.screens.find((t) => t.id === e) ?? this.screen;
|
|
2258
|
-
},
|
|
2259
|
-
addDynamicLayout(e) {
|
|
2260
|
-
let t = this.screens.filter((e) => e.type === "dynamic").length, n = e ?? {
|
|
2261
|
-
id: `layout-${Date.now()}`,
|
|
2262
|
-
name: t ? `New Layout ${t + 1}` : "New Layout",
|
|
2263
|
-
icon: "view_column",
|
|
2264
|
-
channel: "ui",
|
|
2265
|
-
version: "1",
|
|
2266
|
-
changed: !0,
|
|
2267
|
-
type: "dynamic"
|
|
2268
|
-
};
|
|
2269
|
-
this.screens.push(n), this.screen = n;
|
|
2270
|
-
},
|
|
2271
|
-
rename(e, t) {
|
|
2272
|
-
let n = this.screens.find((t) => t.id === e);
|
|
2273
|
-
n && (n.name = t);
|
|
2274
|
-
},
|
|
2275
|
-
clear() {
|
|
2276
|
-
this.screens = [], this.screen = null;
|
|
2277
|
-
}
|
|
2278
|
-
}
|
|
2279
|
-
});
|
|
2119
|
+
}), [["__scopeId", "data-v-4d3e05c9"]]);
|
|
2280
2120
|
//#endregion
|
|
2281
2121
|
//#region src/widgets/components/types.ts
|
|
2282
|
-
function
|
|
2122
|
+
function Ai(e) {
|
|
2283
2123
|
if (e !== void 0 && e !== "") return typeof e == "number" || /^-?\d+(?:\.\d+)?$/.test(String(e)) ? `${e}px` : String(e);
|
|
2284
2124
|
}
|
|
2285
|
-
function
|
|
2125
|
+
function ji(e) {
|
|
2286
2126
|
let t = {};
|
|
2287
2127
|
for (let n of [
|
|
2288
2128
|
"width",
|
|
@@ -2293,10 +2133,10 @@ function Zi(e) {
|
|
|
2293
2133
|
"borderWidth",
|
|
2294
2134
|
"radius"
|
|
2295
2135
|
]) {
|
|
2296
|
-
let r =
|
|
2136
|
+
let r = Ai(e[n]);
|
|
2297
2137
|
r && (t[n === "radius" ? "borderRadius" : n] = r);
|
|
2298
2138
|
}
|
|
2299
|
-
if (e.background && (t.background = e.background), e.layout === "grid" ? (t.display = "grid", t.gridTemplateColumns = e.columns || "1fr 1fr", t.alignItems = e.align || "stretch") : e.layout === "block" ? t.display = "block" : (t.display = "flex", t.flexDirection = e.direction || "column", t.alignItems = e.align || "stretch", t.justifyContent = e.justify || "flex-start"), e.layout !== "block" && e.gap !== void 0 && (t.gap =
|
|
2139
|
+
if (e.background && (t.background = e.background), e.layout === "grid" ? (t.display = "grid", t.gridTemplateColumns = e.columns || "1fr 1fr", t.alignItems = e.align || "stretch") : e.layout === "block" ? t.display = "block" : (t.display = "flex", t.flexDirection = e.direction || "column", t.alignItems = e.align || "stretch", t.justifyContent = e.justify || "flex-start"), e.layout !== "block" && e.gap !== void 0 && (t.gap = Ai(e.gap) || "0"), e.borderStyle && e.borderStyle !== "none" && (t.border = `${Ai(e.borderWidth) || "1px"} ${e.borderStyle} ${e.borderColor || "currentColor"}`), e.position) {
|
|
2300
2140
|
t.position = e.position;
|
|
2301
2141
|
for (let n of [
|
|
2302
2142
|
"left",
|
|
@@ -2304,15 +2144,25 @@ function Zi(e) {
|
|
|
2304
2144
|
"right",
|
|
2305
2145
|
"bottom"
|
|
2306
2146
|
]) {
|
|
2307
|
-
let r =
|
|
2147
|
+
let r = Ai(e[n]);
|
|
2308
2148
|
r && (t[n] = r);
|
|
2309
2149
|
}
|
|
2310
2150
|
}
|
|
2311
2151
|
return t;
|
|
2312
2152
|
}
|
|
2313
2153
|
//#endregion
|
|
2154
|
+
//#region src/widgets/workspace/editable.ts
|
|
2155
|
+
var Mi = {};
|
|
2156
|
+
function $(e, t) {
|
|
2157
|
+
return Mi[e] = Object.entries(t).map(([e, t]) => ({
|
|
2158
|
+
key: e,
|
|
2159
|
+
label: t.label ?? e.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/^./, (e) => e.toUpperCase()),
|
|
2160
|
+
...t
|
|
2161
|
+
})), t;
|
|
2162
|
+
}
|
|
2163
|
+
//#endregion
|
|
2314
2164
|
//#region src/widgets/components/Container.vue
|
|
2315
|
-
var
|
|
2165
|
+
var Ni = /*#__PURE__*/ Q(/* @__PURE__ */ u({
|
|
2316
2166
|
__name: "Container",
|
|
2317
2167
|
props: {
|
|
2318
2168
|
width: {},
|
|
@@ -2337,13 +2187,28 @@ var Qi = /*#__PURE__*/ $(/* @__PURE__ */ u({
|
|
|
2337
2187
|
bottom: {}
|
|
2338
2188
|
},
|
|
2339
2189
|
setup(e) {
|
|
2340
|
-
|
|
2341
|
-
|
|
2190
|
+
$("container", {
|
|
2191
|
+
padding: {
|
|
2192
|
+
type: "number",
|
|
2193
|
+
defaultValue: 18
|
|
2194
|
+
},
|
|
2195
|
+
direction: {
|
|
2196
|
+
type: "select",
|
|
2197
|
+
options: ["column", "row"],
|
|
2198
|
+
defaultValue: "column"
|
|
2199
|
+
},
|
|
2200
|
+
gap: {
|
|
2201
|
+
type: "number",
|
|
2202
|
+
defaultValue: 12
|
|
2203
|
+
}
|
|
2204
|
+
});
|
|
2205
|
+
let t = e, n = r(() => ji(t));
|
|
2206
|
+
return (e, t) => (b(), o("div", {
|
|
2342
2207
|
class: "container-component",
|
|
2343
|
-
style:
|
|
2344
|
-
}, [
|
|
2208
|
+
style: g(n.value)
|
|
2209
|
+
}, [C(e.$slots, "default", {}, () => [t[0] ||= s("div", { class: "empty" }, "Drop components here", -1)], !0)], 4));
|
|
2345
2210
|
}
|
|
2346
|
-
}), [["__scopeId", "data-v-
|
|
2211
|
+
}), [["__scopeId", "data-v-679aff3f"]]), Pi = /*#__PURE__*/ Q(/* @__PURE__ */ u({
|
|
2347
2212
|
__name: "Card",
|
|
2348
2213
|
props: {
|
|
2349
2214
|
shadow: {
|
|
@@ -2372,32 +2237,59 @@ var Qi = /*#__PURE__*/ $(/* @__PURE__ */ u({
|
|
|
2372
2237
|
bottom: {}
|
|
2373
2238
|
},
|
|
2374
2239
|
setup(e) {
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2240
|
+
$("card", {
|
|
2241
|
+
padding: {
|
|
2242
|
+
type: "number",
|
|
2243
|
+
defaultValue: 18
|
|
2244
|
+
},
|
|
2245
|
+
direction: {
|
|
2246
|
+
type: "select",
|
|
2247
|
+
options: ["column", "row"],
|
|
2248
|
+
defaultValue: "column"
|
|
2249
|
+
},
|
|
2250
|
+
gap: {
|
|
2251
|
+
type: "number",
|
|
2252
|
+
defaultValue: 12
|
|
2253
|
+
},
|
|
2254
|
+
shadow: {
|
|
2255
|
+
type: "boolean",
|
|
2256
|
+
defaultValue: !0
|
|
2257
|
+
}
|
|
2258
|
+
});
|
|
2259
|
+
let t = e, n = r(() => ({
|
|
2260
|
+
...ji(t),
|
|
2261
|
+
boxShadow: t.shadow ? "var(--shadow-soft, 0 8px 24px rgb(0 0 0 / 10%))" : "none"
|
|
2262
|
+
}));
|
|
2263
|
+
return (e, t) => (b(), o("div", {
|
|
2380
2264
|
class: "card-component",
|
|
2381
|
-
style:
|
|
2382
|
-
}, [
|
|
2265
|
+
style: g(n.value)
|
|
2266
|
+
}, [C(e.$slots, "default", {}, () => [t[0] ||= s("div", { class: "empty" }, "Drop components here", -1)], !0)], 4));
|
|
2383
2267
|
}
|
|
2384
|
-
}), [["__scopeId", "data-v-
|
|
2268
|
+
}), [["__scopeId", "data-v-0a1967b2"]]), Fi = /* @__PURE__ */ u({
|
|
2385
2269
|
__name: "Spacer",
|
|
2386
2270
|
props: { height: { default: 20 } },
|
|
2387
2271
|
setup(e) {
|
|
2388
|
-
return (
|
|
2272
|
+
return $("spacer", { height: {
|
|
2273
|
+
label: "Height",
|
|
2274
|
+
type: "number",
|
|
2275
|
+
defaultValue: 20
|
|
2276
|
+
} }), (t, n) => (b(), o("div", {
|
|
2389
2277
|
class: "spacer-component",
|
|
2390
|
-
style:
|
|
2278
|
+
style: g({ height: typeof e.height == "number" ? `${e.height}px` : e.height }),
|
|
2391
2279
|
"aria-hidden": "true"
|
|
2392
2280
|
}, null, 4));
|
|
2393
2281
|
}
|
|
2394
|
-
}),
|
|
2282
|
+
}), Ii = { class: "divider-component" }, Li = { key: 0 }, Ri = /*#__PURE__*/ Q(/* @__PURE__ */ u({
|
|
2395
2283
|
__name: "Divider",
|
|
2396
2284
|
props: { label: { default: "or" } },
|
|
2397
2285
|
setup(e) {
|
|
2398
|
-
return (
|
|
2286
|
+
return $("divider", { label: {
|
|
2287
|
+
type: "string",
|
|
2288
|
+
defaultValue: "or",
|
|
2289
|
+
translations: !0
|
|
2290
|
+
} }), (t, n) => (b(), o("div", Ii, [e.label ? (b(), o("span", Li, D(e.label), 1)) : a("", !0)]));
|
|
2399
2291
|
}
|
|
2400
|
-
}), [["__scopeId", "data-v-
|
|
2292
|
+
}), [["__scopeId", "data-v-28326356"]]), zi = /*#__PURE__*/ Q(/* @__PURE__ */ u({
|
|
2401
2293
|
__name: "Layout",
|
|
2402
2294
|
props: {
|
|
2403
2295
|
direction: { default: "column" },
|
|
@@ -2405,27 +2297,51 @@ var Qi = /*#__PURE__*/ $(/* @__PURE__ */ u({
|
|
|
2405
2297
|
padding: { default: 12 }
|
|
2406
2298
|
},
|
|
2407
2299
|
setup(e) {
|
|
2408
|
-
|
|
2300
|
+
$("layout", {
|
|
2301
|
+
direction: {
|
|
2302
|
+
label: "Direction",
|
|
2303
|
+
type: "select",
|
|
2304
|
+
options: ["column", "row"],
|
|
2305
|
+
defaultValue: "column"
|
|
2306
|
+
},
|
|
2307
|
+
gap: {
|
|
2308
|
+
label: "Gap",
|
|
2309
|
+
type: "number",
|
|
2310
|
+
defaultValue: 12
|
|
2311
|
+
},
|
|
2312
|
+
padding: {
|
|
2313
|
+
label: "Padding",
|
|
2314
|
+
type: "number",
|
|
2315
|
+
defaultValue: 12
|
|
2316
|
+
}
|
|
2317
|
+
});
|
|
2318
|
+
let t = e, n = r(() => ({
|
|
2409
2319
|
display: "flex",
|
|
2410
2320
|
flexDirection: t.direction,
|
|
2411
2321
|
gap: typeof t.gap == "number" ? `${t.gap}px` : t.gap,
|
|
2412
2322
|
padding: typeof t.padding == "number" ? `${t.padding}px` : t.padding
|
|
2413
2323
|
}));
|
|
2414
|
-
return (e, t) => (
|
|
2324
|
+
return (e, t) => (b(), o("div", {
|
|
2415
2325
|
class: "layout-component",
|
|
2416
|
-
style:
|
|
2417
|
-
}, [
|
|
2326
|
+
style: g(n.value)
|
|
2327
|
+
}, [C(e.$slots, "default", {}, () => [t[0] ||= s("div", { class: "empty" }, "Drop components here", -1)], !0)], 4));
|
|
2418
2328
|
}
|
|
2419
|
-
}), [["__scopeId", "data-v-
|
|
2329
|
+
}), [["__scopeId", "data-v-2aeaf70d"]]), Bi = { class: "layout-ref-component" }, Vi = { class: "badge" }, Hi = { key: 0 }, Ui = /*#__PURE__*/ Q(/* @__PURE__ */ u({
|
|
2420
2330
|
__name: "LayoutRef",
|
|
2421
2331
|
props: {
|
|
2422
2332
|
layoutKey: { default: "" },
|
|
2423
2333
|
label: { default: "Layout" }
|
|
2424
2334
|
},
|
|
2425
2335
|
setup(e) {
|
|
2426
|
-
return (
|
|
2336
|
+
return $("layoutRef", {
|
|
2337
|
+
layoutKey: { type: "string" },
|
|
2338
|
+
label: {
|
|
2339
|
+
type: "string",
|
|
2340
|
+
defaultValue: "Layout"
|
|
2341
|
+
}
|
|
2342
|
+
}), (t, n) => (b(), o("div", Bi, [s("div", Vi, [c("◆ " + D(e.label), 1), e.layoutKey ? (b(), o("span", Hi, " · " + D(e.layoutKey), 1)) : a("", !0)]), C(t.$slots, "default", {}, () => [n[0] ||= s("div", { class: "empty" }, "Drop components here", -1)], !0)]));
|
|
2427
2343
|
}
|
|
2428
|
-
}), [["__scopeId", "data-v-
|
|
2344
|
+
}), [["__scopeId", "data-v-00fc31a3"]]), Wi = { class: "field-component" }, Gi = { class: "label" }, Ki = { key: 0 }, qi = ["value", "placeholder"], Ji = /*#__PURE__*/ Q(/* @__PURE__ */ u({
|
|
2429
2345
|
__name: "EmailInput",
|
|
2430
2346
|
props: {
|
|
2431
2347
|
label: { default: "Email" },
|
|
@@ -2437,14 +2353,30 @@ var Qi = /*#__PURE__*/ $(/* @__PURE__ */ u({
|
|
|
2437
2353
|
modelValue: {}
|
|
2438
2354
|
},
|
|
2439
2355
|
setup(e) {
|
|
2440
|
-
return (
|
|
2356
|
+
return $("emailInput", {
|
|
2357
|
+
label: {
|
|
2358
|
+
type: "string",
|
|
2359
|
+
defaultValue: "Email",
|
|
2360
|
+
translations: !0
|
|
2361
|
+
},
|
|
2362
|
+
placeholder: {
|
|
2363
|
+
type: "string",
|
|
2364
|
+
defaultValue: "you@example.com",
|
|
2365
|
+
translations: !0
|
|
2366
|
+
},
|
|
2367
|
+
required: {
|
|
2368
|
+
type: "boolean",
|
|
2369
|
+
defaultValue: !0
|
|
2370
|
+
},
|
|
2371
|
+
modelValue: { type: "string" }
|
|
2372
|
+
}), (t, n) => (b(), o("label", Wi, [s("span", Gi, [c(D(e.label), 1), e.required ? (b(), o("b", Ki, "*")) : a("", !0)]), s("input", {
|
|
2441
2373
|
value: e.modelValue,
|
|
2442
2374
|
type: "email",
|
|
2443
2375
|
placeholder: e.placeholder,
|
|
2444
2376
|
readonly: ""
|
|
2445
|
-
}, null, 8,
|
|
2377
|
+
}, null, 8, qi)]));
|
|
2446
2378
|
}
|
|
2447
|
-
}), [["__scopeId", "data-v-
|
|
2379
|
+
}), [["__scopeId", "data-v-e0ab26e2"]]), Yi = { class: "field-component" }, Xi = { class: "label" }, Zi = { key: 0 }, Qi = ["value", "placeholder"], $i = /*#__PURE__*/ Q(/* @__PURE__ */ u({
|
|
2448
2380
|
__name: "TextInput",
|
|
2449
2381
|
props: {
|
|
2450
2382
|
label: { default: "Full name" },
|
|
@@ -2456,14 +2388,25 @@ var Qi = /*#__PURE__*/ $(/* @__PURE__ */ u({
|
|
|
2456
2388
|
modelValue: {}
|
|
2457
2389
|
},
|
|
2458
2390
|
setup(e) {
|
|
2459
|
-
return (
|
|
2391
|
+
return $("textInput", {
|
|
2392
|
+
label: {
|
|
2393
|
+
type: "string",
|
|
2394
|
+
defaultValue: "Name"
|
|
2395
|
+
},
|
|
2396
|
+
placeholder: { type: "string" },
|
|
2397
|
+
required: {
|
|
2398
|
+
type: "boolean",
|
|
2399
|
+
defaultValue: !1
|
|
2400
|
+
},
|
|
2401
|
+
modelValue: { type: "string" }
|
|
2402
|
+
}), (t, n) => (b(), o("label", Yi, [s("span", Xi, [c(D(e.label), 1), e.required ? (b(), o("b", Zi, "*")) : a("", !0)]), s("input", {
|
|
2460
2403
|
value: e.modelValue,
|
|
2461
2404
|
type: "text",
|
|
2462
2405
|
placeholder: e.placeholder,
|
|
2463
2406
|
readonly: ""
|
|
2464
|
-
}, null, 8,
|
|
2407
|
+
}, null, 8, Qi)]));
|
|
2465
2408
|
}
|
|
2466
|
-
}), [["__scopeId", "data-v-
|
|
2409
|
+
}), [["__scopeId", "data-v-28c44a99"]]), ea = { class: "field-component" }, ta = { class: "field-row" }, na = { class: "label" }, ra = { key: 0 }, ia = ["value", "placeholder"], aa = /*#__PURE__*/ Q(/* @__PURE__ */ u({
|
|
2467
2410
|
__name: "PasswordInput",
|
|
2468
2411
|
props: {
|
|
2469
2412
|
label: { default: "Password" },
|
|
@@ -2479,31 +2422,65 @@ var Qi = /*#__PURE__*/ $(/* @__PURE__ */ u({
|
|
|
2479
2422
|
modelValue: {}
|
|
2480
2423
|
},
|
|
2481
2424
|
setup(e) {
|
|
2482
|
-
return (
|
|
2425
|
+
return $("passwordInput", {
|
|
2426
|
+
label: {
|
|
2427
|
+
type: "string",
|
|
2428
|
+
defaultValue: "Password",
|
|
2429
|
+
translations: !0
|
|
2430
|
+
},
|
|
2431
|
+
placeholder: {
|
|
2432
|
+
type: "string",
|
|
2433
|
+
defaultValue: "••••••••",
|
|
2434
|
+
translations: !0
|
|
2435
|
+
},
|
|
2436
|
+
required: {
|
|
2437
|
+
type: "boolean",
|
|
2438
|
+
defaultValue: !0
|
|
2439
|
+
},
|
|
2440
|
+
showForgot: {
|
|
2441
|
+
type: "boolean",
|
|
2442
|
+
defaultValue: !1
|
|
2443
|
+
},
|
|
2444
|
+
modelValue: { type: "string" }
|
|
2445
|
+
}), (t, n) => (b(), o("label", ea, [s("span", ta, [s("span", na, [c(D(e.label), 1), e.required ? (b(), o("b", ra, "*")) : a("", !0)]), e.showForgot ? (b(), o("a", {
|
|
2483
2446
|
key: 0,
|
|
2484
2447
|
href: "#",
|
|
2485
|
-
onClick: n[0] ||=
|
|
2486
|
-
}, "Forgot?")) :
|
|
2448
|
+
onClick: n[0] ||= I(() => {}, ["prevent"])
|
|
2449
|
+
}, "Forgot?")) : a("", !0)]), s("input", {
|
|
2487
2450
|
value: e.modelValue,
|
|
2451
|
+
name: "designer-password-preview",
|
|
2488
2452
|
type: "password",
|
|
2453
|
+
autocomplete: "off",
|
|
2454
|
+
"data-lpignore": "true",
|
|
2455
|
+
"data-1p-ignore": "true",
|
|
2489
2456
|
placeholder: e.placeholder,
|
|
2490
2457
|
readonly: ""
|
|
2491
|
-
}, null, 8,
|
|
2458
|
+
}, null, 8, ia)]));
|
|
2492
2459
|
}
|
|
2493
|
-
}), [["__scopeId", "data-v-
|
|
2460
|
+
}), [["__scopeId", "data-v-6e3c9aa9"]]), oa = { class: "field-component" }, sa = { class: "label" }, ca = { class: "otp-row" }, la = /*#__PURE__*/ Q(/* @__PURE__ */ u({
|
|
2494
2461
|
__name: "OtpInput",
|
|
2495
2462
|
props: {
|
|
2496
2463
|
label: { default: "Verification code" },
|
|
2497
2464
|
digits: { default: 6 }
|
|
2498
2465
|
},
|
|
2499
2466
|
setup(t) {
|
|
2500
|
-
|
|
2501
|
-
|
|
2467
|
+
$("otpInput", {
|
|
2468
|
+
label: {
|
|
2469
|
+
type: "string",
|
|
2470
|
+
defaultValue: "Verification code"
|
|
2471
|
+
},
|
|
2472
|
+
digits: {
|
|
2473
|
+
type: "number",
|
|
2474
|
+
defaultValue: 6
|
|
2475
|
+
}
|
|
2476
|
+
});
|
|
2477
|
+
let n = t, i = r(() => Array.from({ length: Math.max(1, n.digits) }));
|
|
2478
|
+
return (n, r) => (b(), o("div", oa, [s("span", sa, D(t.label), 1), s("div", ca, [(b(!0), o(e, null, S(i.value, (e, t) => (b(), o("span", {
|
|
2502
2479
|
key: t,
|
|
2503
2480
|
class: "otp-box"
|
|
2504
2481
|
}))), 128))])]));
|
|
2505
2482
|
}
|
|
2506
|
-
}), [["__scopeId", "data-v-
|
|
2483
|
+
}), [["__scopeId", "data-v-f06ab992"]]), ua = { class: "checkbox-component" }, da = ["checked"], fa = /*#__PURE__*/ Q(/* @__PURE__ */ u({
|
|
2507
2484
|
__name: "Checkbox",
|
|
2508
2485
|
props: {
|
|
2509
2486
|
label: { default: "Remember me" },
|
|
@@ -2514,35 +2491,75 @@ var Qi = /*#__PURE__*/ $(/* @__PURE__ */ u({
|
|
|
2514
2491
|
modelValue: { type: Boolean }
|
|
2515
2492
|
},
|
|
2516
2493
|
setup(e) {
|
|
2517
|
-
return (
|
|
2494
|
+
return $("checkbox", {
|
|
2495
|
+
label: {
|
|
2496
|
+
type: "string",
|
|
2497
|
+
defaultValue: "Remember me",
|
|
2498
|
+
translations: !0
|
|
2499
|
+
},
|
|
2500
|
+
checked: {
|
|
2501
|
+
type: "boolean",
|
|
2502
|
+
defaultValue: !1
|
|
2503
|
+
},
|
|
2504
|
+
modelValue: {
|
|
2505
|
+
type: "boolean",
|
|
2506
|
+
defaultValue: !1
|
|
2507
|
+
}
|
|
2508
|
+
}), (t, n) => (b(), o("label", ua, [s("input", {
|
|
2518
2509
|
type: "checkbox",
|
|
2519
2510
|
checked: e.modelValue ?? e.checked,
|
|
2520
2511
|
readonly: ""
|
|
2521
|
-
}, null, 8,
|
|
2512
|
+
}, null, 8, da), s("span", null, D(e.label), 1)]));
|
|
2522
2513
|
}
|
|
2523
|
-
}), [["__scopeId", "data-v-
|
|
2514
|
+
}), [["__scopeId", "data-v-d6f8dcbc"]]), pa = /*#__PURE__*/ Q(/* @__PURE__ */ u({
|
|
2524
2515
|
__name: "SubmitButton",
|
|
2525
2516
|
props: {
|
|
2526
2517
|
text: { default: "Sign in" },
|
|
2527
2518
|
style: { default: "primary" }
|
|
2528
2519
|
},
|
|
2529
2520
|
setup(e) {
|
|
2530
|
-
return (
|
|
2521
|
+
return $("submitButton", {
|
|
2522
|
+
text: {
|
|
2523
|
+
type: "string",
|
|
2524
|
+
defaultValue: "Sign in",
|
|
2525
|
+
translations: !0
|
|
2526
|
+
},
|
|
2527
|
+
style: {
|
|
2528
|
+
type: "select",
|
|
2529
|
+
options: ["primary", "secondary"],
|
|
2530
|
+
defaultValue: "primary"
|
|
2531
|
+
}
|
|
2532
|
+
}), (t, n) => (b(), o("button", {
|
|
2531
2533
|
type: "button",
|
|
2532
|
-
class:
|
|
2533
|
-
},
|
|
2534
|
+
class: m(["submit-button", e.style])
|
|
2535
|
+
}, D(e.text), 3));
|
|
2534
2536
|
}
|
|
2535
|
-
}), [["__scopeId", "data-v-
|
|
2537
|
+
}), [["__scopeId", "data-v-e8246c1e"]]), ma = {
|
|
2536
2538
|
type: "button",
|
|
2537
2539
|
class: "social-button"
|
|
2538
|
-
},
|
|
2540
|
+
}, ha = /*#__PURE__*/ Q(/* @__PURE__ */ u({
|
|
2539
2541
|
__name: "SocialButton",
|
|
2540
2542
|
props: {
|
|
2541
2543
|
provider: { default: "google" },
|
|
2542
2544
|
text: { default: "Continue with Google" }
|
|
2543
2545
|
},
|
|
2544
2546
|
setup(e) {
|
|
2545
|
-
|
|
2547
|
+
$("socialButton", {
|
|
2548
|
+
provider: {
|
|
2549
|
+
type: "select",
|
|
2550
|
+
options: [
|
|
2551
|
+
"google",
|
|
2552
|
+
"github",
|
|
2553
|
+
"microsoft"
|
|
2554
|
+
],
|
|
2555
|
+
defaultValue: "google"
|
|
2556
|
+
},
|
|
2557
|
+
text: {
|
|
2558
|
+
type: "string",
|
|
2559
|
+
defaultValue: "Continue with Google"
|
|
2560
|
+
}
|
|
2561
|
+
});
|
|
2562
|
+
let t = e, n = {
|
|
2546
2563
|
google: {
|
|
2547
2564
|
letter: "G",
|
|
2548
2565
|
color: "#4285f4"
|
|
@@ -2559,17 +2576,17 @@ var Qi = /*#__PURE__*/ $(/* @__PURE__ */ u({
|
|
|
2559
2576
|
letter: "●",
|
|
2560
2577
|
color: "#111"
|
|
2561
2578
|
}
|
|
2562
|
-
}, i =
|
|
2563
|
-
return (t, n) => (
|
|
2579
|
+
}, i = r(() => n[t.provider]);
|
|
2580
|
+
return (t, n) => (b(), o("button", ma, [s("span", {
|
|
2564
2581
|
class: "social-icon",
|
|
2565
|
-
style:
|
|
2566
|
-
},
|
|
2582
|
+
style: g({ background: i.value.color })
|
|
2583
|
+
}, D(i.value.letter), 5), c(D(e.text), 1)]));
|
|
2567
2584
|
}
|
|
2568
|
-
}), [["__scopeId", "data-v-
|
|
2585
|
+
}), [["__scopeId", "data-v-9af640f6"]]), ga = [
|
|
2569
2586
|
"href",
|
|
2570
2587
|
"target",
|
|
2571
2588
|
"rel"
|
|
2572
|
-
],
|
|
2589
|
+
], _a = /*#__PURE__*/ Q(/* @__PURE__ */ u({
|
|
2573
2590
|
__name: "TextLink",
|
|
2574
2591
|
props: {
|
|
2575
2592
|
text: { default: "Forgot password?" },
|
|
@@ -2577,37 +2594,73 @@ var Qi = /*#__PURE__*/ $(/* @__PURE__ */ u({
|
|
|
2577
2594
|
target: { default: "_self" }
|
|
2578
2595
|
},
|
|
2579
2596
|
setup(e) {
|
|
2580
|
-
return (
|
|
2597
|
+
return $("textLink", {
|
|
2598
|
+
text: {
|
|
2599
|
+
type: "string",
|
|
2600
|
+
defaultValue: "Forgot password?",
|
|
2601
|
+
translations: !0
|
|
2602
|
+
},
|
|
2603
|
+
href: {
|
|
2604
|
+
type: "string",
|
|
2605
|
+
defaultValue: "#"
|
|
2606
|
+
},
|
|
2607
|
+
target: {
|
|
2608
|
+
type: "select",
|
|
2609
|
+
options: ["_self", "_blank"],
|
|
2610
|
+
defaultValue: "_self"
|
|
2611
|
+
}
|
|
2612
|
+
}), (t, n) => (b(), o("a", {
|
|
2581
2613
|
class: "text-link",
|
|
2582
2614
|
href: e.href,
|
|
2583
2615
|
target: e.target,
|
|
2584
2616
|
rel: e.target === "_blank" ? "noopener noreferrer" : void 0
|
|
2585
|
-
},
|
|
2617
|
+
}, D(e.text), 9, ga));
|
|
2586
2618
|
}
|
|
2587
|
-
}), [["__scopeId", "data-v-
|
|
2619
|
+
}), [["__scopeId", "data-v-38f46d00"]]), va = /*#__PURE__*/ Q(/* @__PURE__ */ u({
|
|
2588
2620
|
__name: "Heading",
|
|
2589
2621
|
props: {
|
|
2590
2622
|
text: { default: "Welcome back" },
|
|
2591
2623
|
size: { default: "lg" }
|
|
2592
2624
|
},
|
|
2593
2625
|
setup(e) {
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2626
|
+
$("heading", {
|
|
2627
|
+
text: {
|
|
2628
|
+
type: "string",
|
|
2629
|
+
defaultValue: "Welcome back",
|
|
2630
|
+
translations: !0
|
|
2631
|
+
},
|
|
2632
|
+
size: {
|
|
2633
|
+
type: "select",
|
|
2634
|
+
options: [
|
|
2635
|
+
"sm",
|
|
2636
|
+
"md",
|
|
2637
|
+
"lg",
|
|
2638
|
+
"xl"
|
|
2639
|
+
],
|
|
2640
|
+
defaultValue: "lg"
|
|
2641
|
+
}
|
|
2642
|
+
});
|
|
2643
|
+
let t = e, n = r(() => t.size === "xl" ? "h1" : t.size === "lg" ? "h2" : t.size === "md" ? "h3" : "h4");
|
|
2644
|
+
return (t, r) => (b(), i(T(n.value), { class: m(["heading-component", e.size]) }, {
|
|
2645
|
+
default: N(() => [c(D(e.text), 1)]),
|
|
2597
2646
|
_: 1
|
|
2598
2647
|
}, 8, ["class"]));
|
|
2599
2648
|
}
|
|
2600
|
-
}), [["__scopeId", "data-v-
|
|
2649
|
+
}), [["__scopeId", "data-v-4838593c"]]), ya = { class: "text-component" }, ba = /*#__PURE__*/ Q(/* @__PURE__ */ u({
|
|
2601
2650
|
__name: "Text",
|
|
2602
2651
|
props: { text: { default: "Enter your details to continue." } },
|
|
2603
2652
|
setup(e) {
|
|
2604
|
-
return (
|
|
2653
|
+
return $("text", { text: {
|
|
2654
|
+
type: "text",
|
|
2655
|
+
defaultValue: "Enter your details to continue.",
|
|
2656
|
+
translations: !0
|
|
2657
|
+
} }), (t, n) => (b(), o("p", ya, D(e.text), 1));
|
|
2605
2658
|
}
|
|
2606
|
-
}), [["__scopeId", "data-v-
|
|
2659
|
+
}), [["__scopeId", "data-v-a48907c6"]]), xa = [
|
|
2607
2660
|
"href",
|
|
2608
2661
|
"target",
|
|
2609
2662
|
"rel"
|
|
2610
|
-
],
|
|
2663
|
+
], Sa = ["src", "alt"], Ca = { key: 1 }, wa = ["src", "alt"], Ta = { key: 1 }, Ea = /*#__PURE__*/ Q(/* @__PURE__ */ u({
|
|
2611
2664
|
__name: "Image",
|
|
2612
2665
|
props: {
|
|
2613
2666
|
src: { default: "" },
|
|
@@ -2619,63 +2672,113 @@ var Qi = /*#__PURE__*/ $(/* @__PURE__ */ u({
|
|
|
2619
2672
|
hrefTarget: { default: "_self" }
|
|
2620
2673
|
},
|
|
2621
2674
|
setup(e) {
|
|
2622
|
-
|
|
2623
|
-
|
|
2675
|
+
$("image", {
|
|
2676
|
+
src: { type: "string" },
|
|
2677
|
+
alt: {
|
|
2678
|
+
type: "string",
|
|
2679
|
+
defaultValue: "Illustration"
|
|
2680
|
+
},
|
|
2681
|
+
width: {
|
|
2682
|
+
type: "string",
|
|
2683
|
+
defaultValue: "100%"
|
|
2684
|
+
},
|
|
2685
|
+
height: {
|
|
2686
|
+
type: "string",
|
|
2687
|
+
defaultValue: 120
|
|
2688
|
+
},
|
|
2689
|
+
radius: {
|
|
2690
|
+
type: "string",
|
|
2691
|
+
defaultValue: 0
|
|
2692
|
+
},
|
|
2693
|
+
href: { type: "string" },
|
|
2694
|
+
hrefTarget: {
|
|
2695
|
+
type: "select",
|
|
2696
|
+
options: ["_self", "_blank"],
|
|
2697
|
+
defaultValue: "_self"
|
|
2698
|
+
}
|
|
2699
|
+
});
|
|
2700
|
+
let t = e, n = (e) => typeof e == "number" || /^-?\d+(?:\.\d+)?$/.test(String(e)) ? `${e}px` : String(e), i = r(() => ({
|
|
2701
|
+
width: n(t.width),
|
|
2624
2702
|
maxWidth: "100%",
|
|
2625
|
-
height:
|
|
2626
|
-
borderRadius:
|
|
2703
|
+
height: n(t.height),
|
|
2704
|
+
borderRadius: n(t.radius)
|
|
2627
2705
|
}));
|
|
2628
|
-
return (t, n) => e.href ? (
|
|
2706
|
+
return (t, n) => e.href ? (b(), o("a", {
|
|
2629
2707
|
key: 0,
|
|
2630
2708
|
class: "image-link",
|
|
2631
2709
|
href: e.href,
|
|
2632
2710
|
target: e.hrefTarget,
|
|
2633
2711
|
rel: e.hrefTarget === "_blank" ? "noopener noreferrer" : void 0
|
|
2634
|
-
}, [
|
|
2712
|
+
}, [s("div", {
|
|
2635
2713
|
class: "image-component",
|
|
2636
|
-
style:
|
|
2637
|
-
}, [e.src ? (
|
|
2714
|
+
style: g(i.value)
|
|
2715
|
+
}, [e.src ? (b(), o("img", {
|
|
2638
2716
|
key: 0,
|
|
2639
2717
|
src: e.src,
|
|
2640
2718
|
alt: e.alt
|
|
2641
|
-
}, null, 8,
|
|
2719
|
+
}, null, 8, Sa)) : (b(), o("span", Ca, D(e.alt), 1))], 4)], 8, xa)) : (b(), o("div", {
|
|
2642
2720
|
key: 1,
|
|
2643
2721
|
class: "image-component",
|
|
2644
|
-
style:
|
|
2645
|
-
}, [e.src ? (
|
|
2722
|
+
style: g(i.value)
|
|
2723
|
+
}, [e.src ? (b(), o("img", {
|
|
2646
2724
|
key: 0,
|
|
2647
2725
|
src: e.src,
|
|
2648
2726
|
alt: e.alt
|
|
2649
|
-
}, null, 8,
|
|
2727
|
+
}, null, 8, wa)) : (b(), o("span", Ta, D(e.alt), 1))], 4));
|
|
2650
2728
|
}
|
|
2651
|
-
}), [["__scopeId", "data-v-
|
|
2729
|
+
}), [["__scopeId", "data-v-09c5bdec"]]), Da = { "aria-hidden": "true" }, Oa = /*#__PURE__*/ Q(/* @__PURE__ */ u({
|
|
2652
2730
|
__name: "Alert",
|
|
2653
2731
|
props: {
|
|
2654
2732
|
tone: { default: "info" },
|
|
2655
2733
|
text: { default: "Check your inbox for the reset link." }
|
|
2656
2734
|
},
|
|
2657
2735
|
setup(e) {
|
|
2658
|
-
return (
|
|
2736
|
+
return $("alert", {
|
|
2737
|
+
tone: {
|
|
2738
|
+
type: "string",
|
|
2739
|
+
defaultValue: "info"
|
|
2740
|
+
},
|
|
2741
|
+
text: {
|
|
2742
|
+
type: "text",
|
|
2743
|
+
defaultValue: "Check your inbox for the reset link.",
|
|
2744
|
+
translations: !0
|
|
2745
|
+
}
|
|
2746
|
+
}), (t, n) => (b(), o("div", { class: m(["alert-component", e.tone]) }, [s("span", Da, D(e.tone === "error" ? "⚠" : e.tone === "success" ? "✓" : "ⓘ"), 1), s("span", null, D(e.text), 1)], 2));
|
|
2659
2747
|
}
|
|
2660
|
-
}), [["__scopeId", "data-v-
|
|
2748
|
+
}), [["__scopeId", "data-v-ddfdb165"]]), ka = { class: "content-component" }, Aa = { class: "empty" }, ja = /*#__PURE__*/ Q(/* @__PURE__ */ u({
|
|
2661
2749
|
__name: "Content",
|
|
2662
2750
|
props: { note: { default: "Page content goes here" } },
|
|
2663
2751
|
setup(e) {
|
|
2664
|
-
return (
|
|
2752
|
+
return $("content", { note: {
|
|
2753
|
+
type: "text",
|
|
2754
|
+
defaultValue: "Page content goes here",
|
|
2755
|
+
translations: !0
|
|
2756
|
+
} }), (t, n) => (b(), o("div", ka, [C(t.$slots, "default", {}, () => [s("div", Aa, D(e.note), 1)], !0)]));
|
|
2665
2757
|
}
|
|
2666
|
-
}), [["__scopeId", "data-v-
|
|
2758
|
+
}), [["__scopeId", "data-v-ed1632f3"]]), Ma = { class: "consent-card" }, Na = /*#__PURE__*/ Q(/* @__PURE__ */ u({
|
|
2667
2759
|
__name: "ConsentCard",
|
|
2668
2760
|
props: {
|
|
2669
2761
|
appName: { default: "Acme Analytics" },
|
|
2670
2762
|
requestedBy: { default: "acme.io" }
|
|
2671
2763
|
},
|
|
2672
2764
|
setup(e) {
|
|
2673
|
-
return (
|
|
2765
|
+
return $("consentCard", {
|
|
2766
|
+
appName: {
|
|
2767
|
+
type: "string",
|
|
2768
|
+
defaultValue: "Acme Analytics",
|
|
2769
|
+
translations: !0
|
|
2770
|
+
},
|
|
2771
|
+
requestedBy: {
|
|
2772
|
+
type: "string",
|
|
2773
|
+
defaultValue: "acme.io",
|
|
2774
|
+
translations: !0
|
|
2775
|
+
}
|
|
2776
|
+
}), (t, n) => (b(), o("div", Ma, [n[0] ||= s("span", {
|
|
2674
2777
|
class: "icon",
|
|
2675
2778
|
"aria-hidden": "true"
|
|
2676
|
-
}, "✓", -1),
|
|
2779
|
+
}, "✓", -1), s("div", null, [s("strong", null, D(e.appName), 1), s("span", null, "wants to access your account · " + D(e.requestedBy), 1)])]));
|
|
2677
2780
|
}
|
|
2678
|
-
}), [["__scopeId", "data-v-
|
|
2781
|
+
}), [["__scopeId", "data-v-c3ef9d86"]]), Pa = { class: "scope-list" }, Fa = /*#__PURE__*/ Q(/* @__PURE__ */ u({
|
|
2679
2782
|
__name: "ScopeList",
|
|
2680
2783
|
props: { scopes: { default: () => [
|
|
2681
2784
|
"Read your profile",
|
|
@@ -2683,12 +2786,1268 @@ var Qi = /*#__PURE__*/ $(/* @__PURE__ */ u({
|
|
|
2683
2786
|
"Access your workspace list"
|
|
2684
2787
|
] } },
|
|
2685
2788
|
setup(t) {
|
|
2686
|
-
|
|
2687
|
-
|
|
2789
|
+
$("scopeList", { scopes: { type: "text" } });
|
|
2790
|
+
let n = t, i = r(() => Array.isArray(n.scopes) ? n.scopes : n.scopes.split("\n").filter(Boolean));
|
|
2791
|
+
return (t, n) => (b(), o("div", Pa, [(b(!0), o(e, null, S(i.value, (e) => (b(), o("div", {
|
|
2688
2792
|
key: e,
|
|
2689
2793
|
class: "scope"
|
|
2690
|
-
}, [n[0] ||=
|
|
2794
|
+
}, [n[0] ||= s("span", { "aria-hidden": "true" }, "✓", -1), s("span", null, D(e), 1)]))), 128))]));
|
|
2795
|
+
}
|
|
2796
|
+
}), [["__scopeId", "data-v-1760fb81"]]), Ia = {
|
|
2797
|
+
consentCard: "Consent Card",
|
|
2798
|
+
emailInput: "Email Input",
|
|
2799
|
+
layoutRef: "Layout Reference",
|
|
2800
|
+
otpInput: "OTP Input",
|
|
2801
|
+
passwordInput: "Password Input",
|
|
2802
|
+
scopeList: "Scope List",
|
|
2803
|
+
socialButton: "Social Button",
|
|
2804
|
+
submitButton: "Submit Button",
|
|
2805
|
+
textInput: "Text Input",
|
|
2806
|
+
textLink: "Text Link"
|
|
2807
|
+
}, La = {
|
|
2808
|
+
alert: "warning",
|
|
2809
|
+
card: "web_asset",
|
|
2810
|
+
checkbox: "check_box",
|
|
2811
|
+
consentCard: "verified_user",
|
|
2812
|
+
container: "view_agenda",
|
|
2813
|
+
content: "dashboard",
|
|
2814
|
+
divider: "horizontal_rule",
|
|
2815
|
+
emailInput: "mail",
|
|
2816
|
+
heading: "title",
|
|
2817
|
+
image: "image",
|
|
2818
|
+
layout: "view_column",
|
|
2819
|
+
layoutRef: "view_quilt",
|
|
2820
|
+
otpInput: "pin",
|
|
2821
|
+
passwordInput: "lock",
|
|
2822
|
+
scopeList: "checklist",
|
|
2823
|
+
socialButton: "group",
|
|
2824
|
+
spacer: "height",
|
|
2825
|
+
submitButton: "send",
|
|
2826
|
+
text: "subject",
|
|
2827
|
+
textInput: "text_fields",
|
|
2828
|
+
textLink: "link"
|
|
2829
|
+
};
|
|
2830
|
+
function Ra(e) {
|
|
2831
|
+
return Ia[e] ?? e.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/^./, (e) => e.toUpperCase());
|
|
2832
|
+
}
|
|
2833
|
+
var za = {
|
|
2834
|
+
alert: Oa,
|
|
2835
|
+
card: Pi,
|
|
2836
|
+
checkbox: fa,
|
|
2837
|
+
consentCard: Na,
|
|
2838
|
+
container: Ni,
|
|
2839
|
+
content: ja,
|
|
2840
|
+
divider: Ri,
|
|
2841
|
+
emailInput: Ji,
|
|
2842
|
+
heading: va,
|
|
2843
|
+
image: Ea,
|
|
2844
|
+
layout: zi,
|
|
2845
|
+
layoutRef: Ui,
|
|
2846
|
+
otpInput: la,
|
|
2847
|
+
passwordInput: aa,
|
|
2848
|
+
scopeList: Fa,
|
|
2849
|
+
socialButton: ha,
|
|
2850
|
+
spacer: Fi,
|
|
2851
|
+
submitButton: pa,
|
|
2852
|
+
text: ba,
|
|
2853
|
+
textInput: $i,
|
|
2854
|
+
textLink: _a
|
|
2855
|
+
}, Ba = Mi, Va = { class: "properties-panel" }, Ha = { class: "properties-head" }, Ua = { class: "property-icon icon" }, Wa = {
|
|
2856
|
+
key: 0,
|
|
2857
|
+
class: "property-fields"
|
|
2858
|
+
}, Ga = { class: "property-field" }, Ka = ["value"], qa = { class: "property-label" }, Ja = ["aria-label", "onClick"], Ya = ["value", "onChange"], Xa = ["value"], Za = ["checked", "onInput"], Qa = ["value", "onInput"], $a = [
|
|
2859
|
+
"type",
|
|
2860
|
+
"value",
|
|
2861
|
+
"onInput"
|
|
2862
|
+
], eo = {
|
|
2863
|
+
key: 0,
|
|
2864
|
+
class: "property-no-props"
|
|
2865
|
+
}, to = {
|
|
2866
|
+
key: 1,
|
|
2867
|
+
class: "properties-empty"
|
|
2868
|
+
}, no = { class: "layers" }, ro = {
|
|
2869
|
+
key: 0,
|
|
2870
|
+
class: "layers-tree",
|
|
2871
|
+
role: "tree",
|
|
2872
|
+
"aria-label": "Layers"
|
|
2873
|
+
}, io = {
|
|
2874
|
+
class: "layer-icon icon",
|
|
2875
|
+
"aria-hidden": "true"
|
|
2876
|
+
}, ao = { class: "layer-label" }, oo = {
|
|
2877
|
+
key: 1,
|
|
2878
|
+
class: "layer-empty"
|
|
2879
|
+
}, so = /*#__PURE__*/ Q(/* @__PURE__ */ u({
|
|
2880
|
+
__name: "Properties",
|
|
2881
|
+
props: {
|
|
2882
|
+
layers: {},
|
|
2883
|
+
selectedComponent: {}
|
|
2884
|
+
},
|
|
2885
|
+
emits: ["updateProps", "focusTranslation"],
|
|
2886
|
+
setup(t, { emit: n }) {
|
|
2887
|
+
let i = t, l = n, u = z(), d = V(), f = r(() => {
|
|
2888
|
+
let e = i.selectedComponent;
|
|
2889
|
+
return e ? (Ba[e.type] ?? Object.keys(e.props).map((e) => ({
|
|
2890
|
+
key: e,
|
|
2891
|
+
label: e.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/^./, (e) => e.toUpperCase()),
|
|
2892
|
+
type: "string"
|
|
2893
|
+
}))).map((t) => ({
|
|
2894
|
+
...t,
|
|
2895
|
+
value: t.translations ? (() => {
|
|
2896
|
+
let n = g(e.id, t.key);
|
|
2897
|
+
return u.fields.find((e) => e.id === n) ? u.getValue(n) : String(e.props[t.key] ?? t.defaultValue ?? "");
|
|
2898
|
+
})() : e.props[t.key] ?? t.defaultValue ?? "",
|
|
2899
|
+
translationId: g(e.id, t.key)
|
|
2900
|
+
})) : [];
|
|
2901
|
+
});
|
|
2902
|
+
j(f, (e) => {
|
|
2903
|
+
let t = i.selectedComponent?.id;
|
|
2904
|
+
t && e.forEach((e) => {
|
|
2905
|
+
e.translations && u.ensureValue(e.translationId, String(e.value), t);
|
|
2906
|
+
});
|
|
2907
|
+
}, { immediate: !0 });
|
|
2908
|
+
function p(e, t) {
|
|
2909
|
+
l("updateProps", { [e]: t });
|
|
2910
|
+
}
|
|
2911
|
+
function m(e, t, n, r) {
|
|
2912
|
+
u.ensureValue(e, n, r), u.updateValue(e, n), l("updateProps", { [t]: n });
|
|
2913
|
+
}
|
|
2914
|
+
function h(e) {
|
|
2915
|
+
e.target.select();
|
|
2916
|
+
}
|
|
2917
|
+
function g(e, t) {
|
|
2918
|
+
return `${e}.${t.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`)}`;
|
|
2919
|
+
}
|
|
2920
|
+
function _(e) {
|
|
2921
|
+
l("focusTranslation", e);
|
|
2922
|
+
}
|
|
2923
|
+
return (n, r) => {
|
|
2924
|
+
let i = w("tooltip");
|
|
2925
|
+
return b(), o("section", Va, [
|
|
2926
|
+
s("div", Ha, [s("span", Ua, D(t.selectedComponent ? k(La)[t.selectedComponent.type] ?? "widgets" : "radio_button_unchecked"), 1), s("strong", null, D(t.selectedComponent ? k(Ra)(t.selectedComponent.type) : "No selection"), 1)]),
|
|
2927
|
+
t.selectedComponent ? (b(), o("div", Wa, [
|
|
2928
|
+
s("label", Ga, [r[2] ||= s("span", null, "Component ID", -1), s("input", {
|
|
2929
|
+
value: t.selectedComponent.id,
|
|
2930
|
+
readonly: "",
|
|
2931
|
+
"aria-readonly": "true",
|
|
2932
|
+
onClick: h
|
|
2933
|
+
}, null, 8, Ka)]),
|
|
2934
|
+
r[4] ||= s("div", { class: "property-section-title" }, "Component props", -1),
|
|
2935
|
+
(b(!0), o(e, null, S(f.value, (n) => (b(), o("label", {
|
|
2936
|
+
key: n.key,
|
|
2937
|
+
class: "property-field"
|
|
2938
|
+
}, [s("span", qa, [s("span", null, D(n.label), 1), n.translations ? P((b(), o("button", {
|
|
2939
|
+
key: 0,
|
|
2940
|
+
type: "button",
|
|
2941
|
+
class: "translation-icon icon",
|
|
2942
|
+
"aria-label": k(d)("translate-this-value", "Translate this value"),
|
|
2943
|
+
onPointerdown: r[0] ||= I(() => {}, ["stop", "prevent"]),
|
|
2944
|
+
onMousedown: r[1] ||= I(() => {}, ["stop", "prevent"]),
|
|
2945
|
+
onClick: I((e) => _(n.translationId), ["stop", "prevent"])
|
|
2946
|
+
}, [...r[3] ||= [c("translate", -1)]], 40, Ja)), [[i, k(d)("translate-this-value", "Translate this value")]]) : a("", !0)]), n.type === "select" ? (b(), o("select", {
|
|
2947
|
+
key: 0,
|
|
2948
|
+
value: n.value,
|
|
2949
|
+
onChange: (e) => p(n.key, e.target.value)
|
|
2950
|
+
}, [(b(!0), o(e, null, S(n.options, (e) => (b(), o("option", {
|
|
2951
|
+
key: e,
|
|
2952
|
+
value: e
|
|
2953
|
+
}, D(e), 9, Xa))), 128))], 40, Ya)) : n.type === "boolean" ? (b(), o("input", {
|
|
2954
|
+
key: 1,
|
|
2955
|
+
class: "property-toggle",
|
|
2956
|
+
type: "checkbox",
|
|
2957
|
+
checked: n.value === !0 || n.value === "true",
|
|
2958
|
+
onInput: (e) => p(n.key, e.target.checked)
|
|
2959
|
+
}, null, 40, Za)) : n.type === "text" ? (b(), o("textarea", {
|
|
2960
|
+
key: 2,
|
|
2961
|
+
rows: "3",
|
|
2962
|
+
value: String(n.value),
|
|
2963
|
+
onInput: (e) => n.translations ? m(n.translationId, n.key, e.target.value, t.selectedComponent.id) : p(n.key, e.target.value)
|
|
2964
|
+
}, null, 40, Qa)) : (b(), o("input", {
|
|
2965
|
+
key: 3,
|
|
2966
|
+
type: n.type === "number" ? "number" : "text",
|
|
2967
|
+
value: n.value,
|
|
2968
|
+
onInput: (e) => n.translations ? m(n.translationId, n.key, e.target.value, t.selectedComponent.id) : p(n.key, n.type === "number" ? Number(e.target.value) : e.target.value)
|
|
2969
|
+
}, null, 40, $a))]))), 128)),
|
|
2970
|
+
f.value.length ? a("", !0) : (b(), o("div", eo, "No configurable props."))
|
|
2971
|
+
])) : (b(), o("div", to, "Select an element on the canvas, or add one from the left, to edit its properties here.")),
|
|
2972
|
+
s("div", no, [r[6] ||= s("div", { class: "layers-title" }, "Layers", -1), t.layers?.length ? (b(), o("div", ro, [(b(!0), o(e, null, S(t.layers, (e) => (b(), o("div", {
|
|
2973
|
+
key: e.id,
|
|
2974
|
+
class: "layer-item",
|
|
2975
|
+
role: "treeitem"
|
|
2976
|
+
}, [
|
|
2977
|
+
r[5] ||= s("span", {
|
|
2978
|
+
class: "layer-branch",
|
|
2979
|
+
"aria-hidden": "true"
|
|
2980
|
+
}, "└", -1),
|
|
2981
|
+
s("span", io, D(e.icon), 1),
|
|
2982
|
+
s("span", ao, D(e.label), 1)
|
|
2983
|
+
]))), 128))])) : (b(), o("div", oo, "No layers yet."))])
|
|
2984
|
+
]);
|
|
2985
|
+
};
|
|
2986
|
+
}
|
|
2987
|
+
}), [["__scopeId", "data-v-6f45a1fd"]]), co = {
|
|
2988
|
+
key: 0,
|
|
2989
|
+
class: "side-info"
|
|
2990
|
+
}, lo = { class: "info-title" }, uo = 102, fo = /*#__PURE__*/ Q(/* @__PURE__ */ u({
|
|
2991
|
+
__name: "SideInfo",
|
|
2992
|
+
props: { items: {} },
|
|
2993
|
+
setup(t) {
|
|
2994
|
+
let n = t, c = V(), l = x(), u = x(0), d = r(() => (n.items?.length ?? 0) > 1 && u.value > uo), f;
|
|
2995
|
+
function h() {
|
|
2996
|
+
u.value = l.value?.scrollHeight ?? 0;
|
|
2997
|
+
}
|
|
2998
|
+
return j(() => n.items, () => void p(h), { deep: !0 }), v(() => {
|
|
2999
|
+
p(() => {
|
|
3000
|
+
h(), f = new ResizeObserver(h), l.value && f.observe(l.value);
|
|
3001
|
+
});
|
|
3002
|
+
}), _(() => f?.disconnect()), (t, r) => n.items?.length ? (b(), o("section", co, [s("div", lo, D(k(c)("checklist", "Checklist")), 1), d.value ? (b(), i(k($r), {
|
|
3003
|
+
key: 0,
|
|
3004
|
+
class: "info-list scrollable",
|
|
3005
|
+
options: {
|
|
3006
|
+
overflow: {
|
|
3007
|
+
x: "hidden",
|
|
3008
|
+
y: "scroll"
|
|
3009
|
+
},
|
|
3010
|
+
scrollbars: { autoHide: "never" }
|
|
3011
|
+
},
|
|
3012
|
+
defer: ""
|
|
3013
|
+
}, {
|
|
3014
|
+
default: N(() => [s("div", {
|
|
3015
|
+
ref_key: "listElement",
|
|
3016
|
+
ref: l
|
|
3017
|
+
}, [(b(!0), o(e, null, S(n.items, (e) => (b(), o("div", {
|
|
3018
|
+
key: e.id,
|
|
3019
|
+
class: "info-row"
|
|
3020
|
+
}, [s("span", { class: m(["info-dot", { complete: e.complete }]) }, null, 2), s("span", null, D(e.label), 1)]))), 128))], 512)]),
|
|
3021
|
+
_: 1
|
|
3022
|
+
})) : (b(), o("div", {
|
|
3023
|
+
key: 1,
|
|
3024
|
+
ref_key: "listElement",
|
|
3025
|
+
ref: l,
|
|
3026
|
+
class: "info-list"
|
|
3027
|
+
}, [(b(!0), o(e, null, S(n.items, (e) => (b(), o("div", {
|
|
3028
|
+
key: e.id,
|
|
3029
|
+
class: "info-row"
|
|
3030
|
+
}, [s("span", { class: m(["info-dot", { complete: e.complete }]) }, null, 2), s("span", null, D(e.label), 1)]))), 128))], 512))])) : a("", !0);
|
|
3031
|
+
}
|
|
3032
|
+
}), [["__scopeId", "data-v-ee9b479a"]]), po = { class: "template-list" }, mo = { class: "section-head" }, ho = ["title"], go = ["aria-label", "title"], _o = ["onClick"], vo = {
|
|
3033
|
+
class: "tab-icon icon",
|
|
3034
|
+
"aria-hidden": "true"
|
|
3035
|
+
}, yo = ["onKeydown", "onBlur"], bo = { class: "tab-channel" }, xo = { class: "tab-version" }, So = {
|
|
3036
|
+
key: 2,
|
|
3037
|
+
class: "tab-changed",
|
|
3038
|
+
"aria-label": "Unsaved changes"
|
|
3039
|
+
}, Co = {
|
|
3040
|
+
key: 0,
|
|
3041
|
+
class: "empty-list"
|
|
3042
|
+
}, wo = /*#__PURE__*/ Q(/* @__PURE__ */ u({
|
|
3043
|
+
__name: "TemplateList",
|
|
3044
|
+
props: {
|
|
3045
|
+
templates: {},
|
|
3046
|
+
focusedTemplateId: {}
|
|
3047
|
+
},
|
|
3048
|
+
emits: [
|
|
3049
|
+
"add",
|
|
3050
|
+
"rename",
|
|
3051
|
+
"select"
|
|
3052
|
+
],
|
|
3053
|
+
setup(t, { emit: n }) {
|
|
3054
|
+
let r = t, u = n, d = V(), f = /* @__PURE__ */ new Map(), h = x(), g = x(""), _ = x();
|
|
3055
|
+
function v(e, t) {
|
|
3056
|
+
t instanceof HTMLElement ? f.set(e, t) : f.delete(e);
|
|
3057
|
+
}
|
|
3058
|
+
async function y(e) {
|
|
3059
|
+
await p(), f.get(e)?.scrollIntoView({ block: "nearest" });
|
|
3060
|
+
}
|
|
3061
|
+
function C(e) {
|
|
3062
|
+
h.value = e.id, g.value = e.name, p(() => _.value?.select());
|
|
3063
|
+
}
|
|
3064
|
+
function w(e) {
|
|
3065
|
+
let t = g.value.trim();
|
|
3066
|
+
h.value = void 0, t && t !== e.name && u("rename", e.id, t);
|
|
3067
|
+
}
|
|
3068
|
+
function T() {
|
|
3069
|
+
h.value = void 0;
|
|
3070
|
+
}
|
|
3071
|
+
return j(() => r.focusedTemplateId, (e) => {
|
|
3072
|
+
e && y(e);
|
|
3073
|
+
}, { immediate: !0 }), (n, r) => (b(), o("section", po, [s("div", mo, [s("span", { title: k(d)("screens", "Screens") }, D(k(d)("screens", "Screens")), 9, ho), s("button", {
|
|
3074
|
+
type: "button",
|
|
3075
|
+
"aria-label": k(d)("add-screen", "Add screen"),
|
|
3076
|
+
title: k(d)("add-screen", "Add screen"),
|
|
3077
|
+
onClick: r[0] ||= (e) => u("add")
|
|
3078
|
+
}, [...r[4] ||= [s("span", { "aria-hidden": "true" }, "+", -1)]], 8, go)]), l(k($r), {
|
|
3079
|
+
class: "template-tabs",
|
|
3080
|
+
options: {
|
|
3081
|
+
overflow: {
|
|
3082
|
+
x: "hidden",
|
|
3083
|
+
y: "scroll"
|
|
3084
|
+
},
|
|
3085
|
+
scrollbars: { autoHide: "never" }
|
|
3086
|
+
},
|
|
3087
|
+
defer: ""
|
|
3088
|
+
}, {
|
|
3089
|
+
default: N(() => [(b(!0), o(e, null, S(t.templates ?? [], (e, n) => (b(), o("button", {
|
|
3090
|
+
key: e.id,
|
|
3091
|
+
ref_for: !0,
|
|
3092
|
+
ref: (t) => v(e.id, t),
|
|
3093
|
+
type: "button",
|
|
3094
|
+
class: m(["template-tab", { active: t.focusedTemplateId ? e.id === t.focusedTemplateId : n === 0 }]),
|
|
3095
|
+
onClick: (t) => u("select", e.id)
|
|
3096
|
+
}, [
|
|
3097
|
+
s("span", vo, D(e.icon), 1),
|
|
3098
|
+
h.value === e.id ? P((b(), o("input", {
|
|
3099
|
+
key: 0,
|
|
3100
|
+
ref_for: !0,
|
|
3101
|
+
ref_key: "editInput",
|
|
3102
|
+
ref: _,
|
|
3103
|
+
"onUpdate:modelValue": r[1] ||= (e) => g.value = e,
|
|
3104
|
+
class: "tab-label tab-label-input",
|
|
3105
|
+
type: "text",
|
|
3106
|
+
onClick: r[2] ||= I(() => {}, ["stop"]),
|
|
3107
|
+
onDblclick: r[3] ||= I(() => {}, ["stop"]),
|
|
3108
|
+
onKeydown: [F(I((t) => w(e), ["prevent"]), ["enter"]), F(I(T, ["prevent"]), ["esc"])],
|
|
3109
|
+
onBlur: (t) => w(e)
|
|
3110
|
+
}, null, 40, yo)), [[A, g.value]]) : (b(), i(ti, {
|
|
3111
|
+
key: 1,
|
|
3112
|
+
class: "tab-label",
|
|
3113
|
+
onDblclick: I((t) => e.type === "dynamic" && C(e), ["stop"])
|
|
3114
|
+
}, {
|
|
3115
|
+
default: N(() => [c(D(e.name), 1)]),
|
|
3116
|
+
_: 2
|
|
3117
|
+
}, 1032, ["onDblclick"])),
|
|
3118
|
+
s("span", bo, D(e.channel.charAt(0).toUpperCase()), 1),
|
|
3119
|
+
s("span", xo, D(e.version), 1),
|
|
3120
|
+
e.changed ? (b(), o("span", So)) : a("", !0)
|
|
3121
|
+
], 10, _o))), 128)), t.templates?.length ? a("", !0) : (b(), o("p", Co, "No screens yet."))]),
|
|
3122
|
+
_: 1
|
|
3123
|
+
})]));
|
|
2691
3124
|
}
|
|
2692
|
-
}), [["__scopeId", "data-v-
|
|
3125
|
+
}), [["__scopeId", "data-v-927e0835"]]), To = {
|
|
3126
|
+
class: "theme-sidebar",
|
|
3127
|
+
"aria-label": "Theme"
|
|
3128
|
+
}, Eo = { class: "theme-header" }, Do = { class: "theme-heading" }, Oo = ["title"], ko = { class: "theme-body" }, Ao = { class: "theme-label" }, jo = { class: "theme-presets" }, Mo = ["aria-label", "onClick"], No = {
|
|
3129
|
+
class: "theme-label",
|
|
3130
|
+
for: "designer-theme-color"
|
|
3131
|
+
}, Po = { class: "theme-color-row" }, Fo = /*#__PURE__*/ Q(/* @__PURE__ */ u({
|
|
3132
|
+
__name: "ThemeSidebar",
|
|
3133
|
+
props: {
|
|
3134
|
+
open: { type: Boolean },
|
|
3135
|
+
color: {}
|
|
3136
|
+
},
|
|
3137
|
+
emits: ["close", "update"],
|
|
3138
|
+
setup(t, { emit: r }) {
|
|
3139
|
+
let c = t, l = r, u = V(), d = [
|
|
3140
|
+
"#3d7a68",
|
|
3141
|
+
"#2563eb",
|
|
3142
|
+
"#8b6fae",
|
|
3143
|
+
"#c9973f",
|
|
3144
|
+
"#b8564a"
|
|
3145
|
+
], f = x(c.color ?? d[0]);
|
|
3146
|
+
function p(e) {
|
|
3147
|
+
f.value = e, l("update", e);
|
|
3148
|
+
}
|
|
3149
|
+
return (r, c) => (b(), i(n, { name: "theme" }, {
|
|
3150
|
+
default: N(() => [t.open ? (b(), o("div", {
|
|
3151
|
+
key: 0,
|
|
3152
|
+
class: "theme-overlay",
|
|
3153
|
+
onClick: c[5] ||= I((e) => l("close"), ["self"])
|
|
3154
|
+
}, [s("aside", To, [s("div", Eo, [
|
|
3155
|
+
c[6] ||= s("span", {
|
|
3156
|
+
class: "theme-icon icon",
|
|
3157
|
+
"aria-hidden": "true"
|
|
3158
|
+
}, "palette", -1),
|
|
3159
|
+
s("div", Do, [s("strong", null, D(k(u)("theme", "Theme")), 1), s("span", null, D(k(u)("theme-subtitle", "Colors used across every screen")), 1)]),
|
|
3160
|
+
s("button", {
|
|
3161
|
+
type: "button",
|
|
3162
|
+
class: "theme-close icon",
|
|
3163
|
+
title: k(u)("close", "Close"),
|
|
3164
|
+
onClick: c[0] ||= (e) => l("close")
|
|
3165
|
+
}, "close", 8, Oo)
|
|
3166
|
+
]), s("div", ko, [
|
|
3167
|
+
s("span", Ao, D(k(u)("presets", "Presets")), 1),
|
|
3168
|
+
s("div", jo, [(b(), o(e, null, S(d, (e) => s("button", {
|
|
3169
|
+
key: e,
|
|
3170
|
+
type: "button",
|
|
3171
|
+
class: m({ active: f.value === e }),
|
|
3172
|
+
style: g({ "--theme-color": e }),
|
|
3173
|
+
"aria-label": e,
|
|
3174
|
+
onClick: (t) => p(e)
|
|
3175
|
+
}, [...c[7] ||= [s("span", null, null, -1)]], 14, Mo)), 64))]),
|
|
3176
|
+
s("label", No, D(k(u)("primary-color", "Primary color")), 1),
|
|
3177
|
+
s("div", Po, [P(s("input", {
|
|
3178
|
+
id: "designer-theme-color",
|
|
3179
|
+
"onUpdate:modelValue": c[1] ||= (e) => f.value = e,
|
|
3180
|
+
type: "color",
|
|
3181
|
+
onInput: c[2] ||= (e) => p(f.value)
|
|
3182
|
+
}, null, 544), [[A, f.value]]), P(s("input", {
|
|
3183
|
+
"onUpdate:modelValue": c[3] ||= (e) => f.value = e,
|
|
3184
|
+
type: "text",
|
|
3185
|
+
onChange: c[4] ||= (e) => p(f.value)
|
|
3186
|
+
}, null, 544), [[A, f.value]])])
|
|
3187
|
+
])])])) : a("", !0)]),
|
|
3188
|
+
_: 1
|
|
3189
|
+
}));
|
|
3190
|
+
}
|
|
3191
|
+
}), [["__scopeId", "data-v-2b2352d5"]]), Io = {
|
|
3192
|
+
class: "translation-sidebar",
|
|
3193
|
+
"aria-label": "Translations"
|
|
3194
|
+
}, Lo = { class: "translation-header" }, Ro = { class: "translation-heading" }, zo = ["title"], Bo = { class: "translation-body" }, Vo = { class: "translation-controls" }, Ho = { class: "language-row" }, Uo = { class: "language-heading" }, Wo = ["disabled", "title"], Go = {
|
|
3195
|
+
key: 0,
|
|
3196
|
+
class: "translate-spinner",
|
|
3197
|
+
"aria-hidden": "true"
|
|
3198
|
+
}, Ko = { key: 1 }, qo = [
|
|
3199
|
+
"aria-keyshortcuts",
|
|
3200
|
+
"onClick",
|
|
3201
|
+
"onKeydown"
|
|
3202
|
+
], Jo = { class: "translation-search" }, Yo = {
|
|
3203
|
+
key: 0,
|
|
3204
|
+
class: "translation-fields"
|
|
3205
|
+
}, Xo = { class: "translation-field-heading" }, Zo = { class: "field-language" }, Qo = { class: "field-path" }, $o = [
|
|
3206
|
+
"value",
|
|
3207
|
+
"aria-label",
|
|
3208
|
+
"onInput"
|
|
3209
|
+
], es = {
|
|
3210
|
+
key: 1,
|
|
3211
|
+
class: "translation-empty"
|
|
3212
|
+
}, ts = /*#__PURE__*/ Q(/* @__PURE__ */ u({
|
|
3213
|
+
__name: "TranslationSidebar",
|
|
3214
|
+
props: {
|
|
3215
|
+
open: { type: Boolean },
|
|
3216
|
+
fields: {},
|
|
3217
|
+
focusedFieldId: {}
|
|
3218
|
+
},
|
|
3219
|
+
emits: ["close", "update"],
|
|
3220
|
+
setup(t, { emit: c }) {
|
|
3221
|
+
let u = t, d = c, f = V(), h = z(), g = x(["en"]), y = x("en"), C = x(""), w = x(!1), T = x(""), E = x(!1), O = x(), M = x(), L = x(), R = x(), B = r(() => h.fields), H = r(() => {
|
|
3222
|
+
let e = C.value.trim().toLowerCase();
|
|
3223
|
+
return e ? B.value.filter((t) => [
|
|
3224
|
+
t.id,
|
|
3225
|
+
t.key,
|
|
3226
|
+
t.path,
|
|
3227
|
+
t.source
|
|
3228
|
+
].some((t) => t?.toLowerCase().includes(e))) : B.value;
|
|
3229
|
+
});
|
|
3230
|
+
function U(e) {
|
|
3231
|
+
e && (C.value = e);
|
|
3232
|
+
}
|
|
3233
|
+
j(() => u.focusedFieldId, U, { immediate: !0 }), j(() => u.fields, (e) => {
|
|
3234
|
+
e && h.setItems(e);
|
|
3235
|
+
}, { immediate: !0 });
|
|
3236
|
+
function ee(e, t) {
|
|
3237
|
+
return h.getValue(e.id, t);
|
|
3238
|
+
}
|
|
3239
|
+
function te() {
|
|
3240
|
+
E.value = !1, T.value = "", O.value = void 0;
|
|
3241
|
+
}
|
|
3242
|
+
function ne() {
|
|
3243
|
+
let e = T.value.trim().toLowerCase();
|
|
3244
|
+
if (!e || g.value.includes(e)) {
|
|
3245
|
+
te();
|
|
3246
|
+
return;
|
|
3247
|
+
}
|
|
3248
|
+
g.value.push(e), y.value = e, te();
|
|
3249
|
+
}
|
|
3250
|
+
function W(e) {
|
|
3251
|
+
if (e === "en") return;
|
|
3252
|
+
let t = g.value.indexOf(e);
|
|
3253
|
+
if (t !== -1) {
|
|
3254
|
+
if (O.value !== e) {
|
|
3255
|
+
O.value = e;
|
|
3256
|
+
return;
|
|
3257
|
+
}
|
|
3258
|
+
g.value.splice(t, 1), O.value = void 0, y.value === e && (y.value = g.value[Math.max(0, t - 1)] ?? "en");
|
|
3259
|
+
}
|
|
3260
|
+
}
|
|
3261
|
+
function re() {
|
|
3262
|
+
E.value = !0, p(() => L.value?.focus());
|
|
3263
|
+
}
|
|
3264
|
+
function ie(e) {
|
|
3265
|
+
E.value && !M.value?.contains(e.target) && te(), R.value?.contains(e.target) || (O.value = void 0);
|
|
3266
|
+
}
|
|
3267
|
+
function ae(e) {
|
|
3268
|
+
if (e.key === "Escape") {
|
|
3269
|
+
O.value = void 0, E.value && te();
|
|
3270
|
+
return;
|
|
3271
|
+
}
|
|
3272
|
+
!u.open || E.value || e.key !== "Delete" && e.key !== "Backspace" || e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement || W(y.value);
|
|
3273
|
+
}
|
|
3274
|
+
async function oe() {
|
|
3275
|
+
if (y.value === "en" || w.value || !B.value.length) return;
|
|
3276
|
+
w.value = !0;
|
|
3277
|
+
let e = B.value, t = e.map((e) => ee(e, "en")).join("\n"), n = new URL("https://translate.googleapis.com/translate_a/single");
|
|
3278
|
+
n.searchParams.set("client", "gtx"), n.searchParams.set("sl", "en"), n.searchParams.set("tl", y.value), n.searchParams.set("dt", "t"), n.searchParams.set("q", t);
|
|
3279
|
+
try {
|
|
3280
|
+
let t = await fetch(n);
|
|
3281
|
+
if (!t.ok) throw Error(`Translation request failed with status ${t.status}.`);
|
|
3282
|
+
let r = await t.json();
|
|
3283
|
+
if (!Array.isArray(r) || !Array.isArray(r[0])) throw Error("Translation response has an unexpected format.");
|
|
3284
|
+
let i = r[0].map((e) => Array.isArray(e) && typeof e[0] == "string" ? e[0] : "").join("").split("\n");
|
|
3285
|
+
if (i.length !== e.length) throw Error("Translation response did not contain one value per label.");
|
|
3286
|
+
i.forEach((t, n) => {
|
|
3287
|
+
h.updateValue(e[n].id, t, y.value), d("update", e[n].id, t, y.value);
|
|
3288
|
+
});
|
|
3289
|
+
} finally {
|
|
3290
|
+
w.value = !1;
|
|
3291
|
+
}
|
|
3292
|
+
}
|
|
3293
|
+
return v(() => {
|
|
3294
|
+
document.addEventListener("pointerdown", ie), document.addEventListener("keydown", ae);
|
|
3295
|
+
}), _(() => {
|
|
3296
|
+
document.removeEventListener("pointerdown", ie), document.removeEventListener("keydown", ae);
|
|
3297
|
+
}), (r, c) => (b(), i(n, { name: "translation" }, {
|
|
3298
|
+
default: N(() => [t.open ? (b(), o("div", {
|
|
3299
|
+
key: 0,
|
|
3300
|
+
class: "translation-overlay",
|
|
3301
|
+
onClick: c[3] ||= I((e) => d("close"), ["self"])
|
|
3302
|
+
}, [s("aside", Io, [s("div", Lo, [
|
|
3303
|
+
c[4] ||= s("span", {
|
|
3304
|
+
class: "translation-icon icon",
|
|
3305
|
+
"aria-hidden": "true"
|
|
3306
|
+
}, "translate", -1),
|
|
3307
|
+
s("div", Ro, [s("strong", null, D(k(f)("translations", "Translations")), 1), s("span", null, D(k(f)("translations-subtitle", "Translate this screen")), 1)]),
|
|
3308
|
+
s("button", {
|
|
3309
|
+
type: "button",
|
|
3310
|
+
class: "translation-close icon",
|
|
3311
|
+
title: k(f)("close", "Close"),
|
|
3312
|
+
onClick: c[0] ||= (e) => d("close")
|
|
3313
|
+
}, "close", 8, zo)
|
|
3314
|
+
]), s("div", Bo, [s("div", Vo, [s("div", Ho, [s("div", Uo, [s("span", null, D(k(f)("language", "Language")), 1), s("button", {
|
|
3315
|
+
type: "button",
|
|
3316
|
+
class: "translate-labels-button",
|
|
3317
|
+
disabled: y.value === "en" || w.value,
|
|
3318
|
+
title: k(f)("auto-translate", "Auto-translate"),
|
|
3319
|
+
onClick: oe
|
|
3320
|
+
}, [c[5] ||= s("span", {
|
|
3321
|
+
class: "icon",
|
|
3322
|
+
"aria-hidden": "true"
|
|
3323
|
+
}, "translate", -1), w.value ? (b(), o("span", Go)) : (b(), o("span", Ko, D(k(f)("auto-translate", "Auto-translate")), 1))], 8, Wo)]), s("div", {
|
|
3324
|
+
ref_key: "languageChips",
|
|
3325
|
+
ref: R,
|
|
3326
|
+
class: "language-chips"
|
|
3327
|
+
}, [(b(!0), o(e, null, S(g.value, (e) => (b(), o("button", {
|
|
3328
|
+
key: e,
|
|
3329
|
+
type: "button",
|
|
3330
|
+
class: m({
|
|
3331
|
+
active: y.value === e,
|
|
3332
|
+
"delete-armed": O.value === e
|
|
3333
|
+
}),
|
|
3334
|
+
"aria-keyshortcuts": e === "en" ? void 0 : "Delete",
|
|
3335
|
+
onClick: (t) => {
|
|
3336
|
+
y.value = e, O.value = void 0;
|
|
3337
|
+
},
|
|
3338
|
+
onKeydown: [F(I((t) => W(e), ["prevent"]), ["delete"]), F(I((t) => W(e), ["prevent"]), ["backspace"])]
|
|
3339
|
+
}, D(e), 43, qo))), 128)), E.value ? (b(), o("span", {
|
|
3340
|
+
key: 0,
|
|
3341
|
+
ref_key: "languageAdder",
|
|
3342
|
+
ref: M,
|
|
3343
|
+
class: "add-language"
|
|
3344
|
+
}, [s("form", { onSubmit: I(ne, ["prevent"]) }, [P(s("input", {
|
|
3345
|
+
ref_key: "languageInput",
|
|
3346
|
+
ref: L,
|
|
3347
|
+
"onUpdate:modelValue": c[1] ||= (e) => T.value = e,
|
|
3348
|
+
"aria-label": "New language"
|
|
3349
|
+
}, null, 512), [[A, T.value]])], 32)], 512)) : (b(), o("button", {
|
|
3350
|
+
key: 1,
|
|
3351
|
+
type: "button",
|
|
3352
|
+
class: "add-language-button",
|
|
3353
|
+
"aria-label": "Add language",
|
|
3354
|
+
onClick: re
|
|
3355
|
+
}, "+"))], 512)]), s("div", Jo, [c[6] ||= s("span", {
|
|
3356
|
+
class: "icon",
|
|
3357
|
+
"aria-hidden": "true"
|
|
3358
|
+
}, "search", -1), P(s("input", {
|
|
3359
|
+
"onUpdate:modelValue": c[2] ||= (e) => C.value = e,
|
|
3360
|
+
type: "search",
|
|
3361
|
+
"aria-label": "Search translations",
|
|
3362
|
+
placeholder: "Search translations..."
|
|
3363
|
+
}, null, 512), [[A, C.value]])])]), l(k($r), {
|
|
3364
|
+
class: "translation-scroll",
|
|
3365
|
+
options: {
|
|
3366
|
+
overflow: {
|
|
3367
|
+
x: "hidden",
|
|
3368
|
+
y: "scroll"
|
|
3369
|
+
},
|
|
3370
|
+
scrollbars: { autoHide: "never" }
|
|
3371
|
+
},
|
|
3372
|
+
defer: ""
|
|
3373
|
+
}, {
|
|
3374
|
+
default: N(() => [H.value.length ? (b(), o("div", Yo, [(b(!0), o(e, null, S(H.value, (e) => (b(), o("div", {
|
|
3375
|
+
key: e.id,
|
|
3376
|
+
class: "translation-field"
|
|
3377
|
+
}, [s("div", Xo, [s("span", Zo, D(ee(e, "en")), 1), s("span", Qo, D(e.key ?? e.path), 1)]), s("input", {
|
|
3378
|
+
value: ee(e, y.value),
|
|
3379
|
+
"aria-label": e.source,
|
|
3380
|
+
onInput: (t) => d("update", e.id, t.target.value, y.value)
|
|
3381
|
+
}, null, 40, $o)]))), 128))])) : (b(), o("p", es, D(k(f)("no-translations", "No translatable fields are available for this screen.")), 1))]),
|
|
3382
|
+
_: 1
|
|
3383
|
+
})])])])) : a("", !0)]),
|
|
3384
|
+
_: 1
|
|
3385
|
+
}));
|
|
3386
|
+
}
|
|
3387
|
+
}), [["__scopeId", "data-v-19047d8f"]]), ns = { class: "breadcrumb-label" }, rs = { class: "breadcrumb-selection" }, is = /*#__PURE__*/ Q(/* @__PURE__ */ u({
|
|
3388
|
+
__name: "Breadcrumb",
|
|
3389
|
+
setup(t) {
|
|
3390
|
+
let n = B();
|
|
3391
|
+
function i() {
|
|
3392
|
+
n.deselect();
|
|
3393
|
+
}
|
|
3394
|
+
let c = {
|
|
3395
|
+
consentCard: "Consent Card",
|
|
3396
|
+
emailInput: "Email Input",
|
|
3397
|
+
layoutRef: "Layout Reference",
|
|
3398
|
+
otpInput: "OTP Input",
|
|
3399
|
+
passwordInput: "Password Input",
|
|
3400
|
+
scopeList: "Scope List",
|
|
3401
|
+
socialButton: "Social Button",
|
|
3402
|
+
submitButton: "Submit Button",
|
|
3403
|
+
textInput: "Text Input",
|
|
3404
|
+
textLink: "Text Link"
|
|
3405
|
+
}, l = r(() => {
|
|
3406
|
+
let e = n.selectedComponent?.type;
|
|
3407
|
+
return e ? c[e] ?? e.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/^./, (e) => e.toUpperCase()) : "";
|
|
3408
|
+
});
|
|
3409
|
+
return (t, r) => (b(), o("span", ns, [s("button", {
|
|
3410
|
+
type: "button",
|
|
3411
|
+
class: "breadcrumb-template",
|
|
3412
|
+
onClick: i
|
|
3413
|
+
}, D(k(n).activeTemplateName || k(n).activeTemplateId || "Workspace"), 1), l.value ? (b(), o(e, { key: 0 }, [r[0] ||= s("span", {
|
|
3414
|
+
class: "breadcrumb-separator",
|
|
3415
|
+
"aria-hidden": "true"
|
|
3416
|
+
}, "/", -1), s("span", rs, D(l.value), 1)], 64)) : a("", !0)]));
|
|
3417
|
+
}
|
|
3418
|
+
}), [["__scopeId", "data-v-9943cef5"]]), as = ["data-component-id"], os = {
|
|
3419
|
+
key: 0,
|
|
3420
|
+
class: "component-info"
|
|
3421
|
+
}, ss = { class: "component-content" }, cs = /*#__PURE__*/ Q(/* @__PURE__ */ u({
|
|
3422
|
+
__name: "ComponentHandler",
|
|
3423
|
+
props: {
|
|
3424
|
+
type: {},
|
|
3425
|
+
id: {},
|
|
3426
|
+
componentProps: {},
|
|
3427
|
+
selected: { type: Boolean }
|
|
3428
|
+
},
|
|
3429
|
+
emits: ["select", "moveStart"],
|
|
3430
|
+
setup(e, { emit: t }) {
|
|
3431
|
+
let n = e, c = t;
|
|
3432
|
+
function l(e) {
|
|
3433
|
+
e.stopPropagation(), c("select");
|
|
3434
|
+
}
|
|
3435
|
+
let u = r(() => Ra(n.type));
|
|
3436
|
+
return (t, n) => (b(), o("div", {
|
|
3437
|
+
class: m(["component-handler", { selected: e.selected }]),
|
|
3438
|
+
"data-component-id": e.id,
|
|
3439
|
+
draggable: "true",
|
|
3440
|
+
onDragstart: n[0] ||= (t) => c("moveStart", e.id ?? "", t),
|
|
3441
|
+
onClickCapture: l
|
|
3442
|
+
}, [e.selected ? (b(), o("span", os, [s("strong", null, D(u.value), 1)])) : a("", !0), s("div", ss, [(b(), i(T(k(za)[e.type]), h(f(e.componentProps)), null, 16))])], 42, as));
|
|
3443
|
+
}
|
|
3444
|
+
}), [["__scopeId", "data-v-886cfbdd"]]), ls = { class: "renderer-components" }, us = /*#__PURE__*/ Q(/* @__PURE__ */ u({
|
|
3445
|
+
__name: "Renderer",
|
|
3446
|
+
props: {
|
|
3447
|
+
components: {},
|
|
3448
|
+
selectedIndex: {}
|
|
3449
|
+
},
|
|
3450
|
+
emits: ["select"],
|
|
3451
|
+
setup(t, { emit: n }) {
|
|
3452
|
+
let r = t, i = n;
|
|
3453
|
+
return (t, n) => (b(), o("div", ls, [(b(!0), o(e, null, S(r.components, (e, n) => C(t.$slots, "default", {
|
|
3454
|
+
type: e.type,
|
|
3455
|
+
props: e.props,
|
|
3456
|
+
index: n,
|
|
3457
|
+
selected: r.selectedIndex === n,
|
|
3458
|
+
select: () => i("select", n)
|
|
3459
|
+
}, void 0, !0, `${e.type}-${n}`)), 128))]));
|
|
3460
|
+
}
|
|
3461
|
+
}), [["__scopeId", "data-v-8730eb3d"]]), ds = {
|
|
3462
|
+
key: 1,
|
|
3463
|
+
class: "composer-empty"
|
|
3464
|
+
}, fs = /*#__PURE__*/ Q(/* @__PURE__ */ u({
|
|
3465
|
+
__name: "Composer",
|
|
3466
|
+
emits: ["componentDrop", "componentSelect"],
|
|
3467
|
+
setup(e, { expose: t, emit: n }) {
|
|
3468
|
+
let r = n, i = B(), s = x(!1), c = x(), u = x(12), d = x(), f = x(), p = () => i.components;
|
|
3469
|
+
function h(e) {
|
|
3470
|
+
i.addComponent(e), r("componentDrop", e);
|
|
3471
|
+
}
|
|
3472
|
+
function y(e) {
|
|
3473
|
+
if (!i.components[e]) return;
|
|
3474
|
+
let t = i.selectComponent(e);
|
|
3475
|
+
t && r("componentSelect", t);
|
|
3476
|
+
}
|
|
3477
|
+
function S(e) {
|
|
3478
|
+
e.target.closest(".component-handler") || i.deselect();
|
|
3479
|
+
}
|
|
3480
|
+
function C(e) {
|
|
3481
|
+
e.target.closest(".component-handler") || i.deselect();
|
|
3482
|
+
}
|
|
3483
|
+
function w() {
|
|
3484
|
+
i.deleteSelected();
|
|
3485
|
+
}
|
|
3486
|
+
function T(e) {
|
|
3487
|
+
if (e.target?.matches("input, textarea, select, [contenteditable=\"true\"]")) return;
|
|
3488
|
+
if (e.key === "Escape") {
|
|
3489
|
+
i.deselect();
|
|
3490
|
+
return;
|
|
3491
|
+
}
|
|
3492
|
+
let t = i.selectedIndex;
|
|
3493
|
+
if (!(t < 0)) {
|
|
3494
|
+
if (e.key === "Delete" || e.key === "Backspace") {
|
|
3495
|
+
e.preventDefault(), w();
|
|
3496
|
+
return;
|
|
3497
|
+
}
|
|
3498
|
+
if (e.key === "ArrowUp" && t > 0) {
|
|
3499
|
+
e.preventDefault(), i.move(t, t - 1);
|
|
3500
|
+
return;
|
|
3501
|
+
}
|
|
3502
|
+
e.key === "ArrowDown" && t < i.components.length - 1 && (e.preventDefault(), i.move(t, t + 1));
|
|
3503
|
+
}
|
|
3504
|
+
}
|
|
3505
|
+
function E(e) {
|
|
3506
|
+
let t = e.dataTransfer?.types;
|
|
3507
|
+
if (!t?.includes("application/x-aham-designer-component") && !t?.includes("application/x-aham-designer-composed-component") || !e.dataTransfer) return;
|
|
3508
|
+
e.preventDefault(), e.dataTransfer.dropEffect = f.value ? "move" : "copy", s.value = !0;
|
|
3509
|
+
let n = d.value;
|
|
3510
|
+
if (!n) return;
|
|
3511
|
+
let r = [...n.querySelectorAll(".component-handler")].filter((e) => e.dataset.componentId !== f.value);
|
|
3512
|
+
if (!r.length) {
|
|
3513
|
+
c.value = i.components.length, u.value = 12;
|
|
3514
|
+
return;
|
|
3515
|
+
}
|
|
3516
|
+
let a = n.getBoundingClientRect().top, o = e.clientY, l = r.findIndex((e) => {
|
|
3517
|
+
let t = e.getBoundingClientRect();
|
|
3518
|
+
return o < t.top + t.height / 2;
|
|
3519
|
+
});
|
|
3520
|
+
c.value = l < 0 ? r.length : l;
|
|
3521
|
+
let p = r[c.value === r.length ? r.length - 1 : c.value].getBoundingClientRect();
|
|
3522
|
+
u.value = (c.value === r.length ? p.bottom : p.top) - a + n.scrollTop;
|
|
3523
|
+
}
|
|
3524
|
+
function D(e) {
|
|
3525
|
+
e.preventDefault();
|
|
3526
|
+
let t = e.dataTransfer?.getData("application/x-aham-designer-component"), n = e.dataTransfer?.getData("application/x-aham-designer-composed-component");
|
|
3527
|
+
s.value = !1;
|
|
3528
|
+
let a = c.value;
|
|
3529
|
+
if (c.value = void 0, n) {
|
|
3530
|
+
let e = i.components.findIndex(({ id: e }) => e === n);
|
|
3531
|
+
if (e >= 0) {
|
|
3532
|
+
let [t] = i.components.splice(e, 1), r = i.components.filter(({ id: e }) => e !== n), o = Math.min(a ?? r.length, r.length);
|
|
3533
|
+
i.components.splice(o, 0, t);
|
|
3534
|
+
}
|
|
3535
|
+
f.value = void 0;
|
|
3536
|
+
return;
|
|
3537
|
+
}
|
|
3538
|
+
t && (i.addComponent(t, a), r("componentDrop", t));
|
|
3539
|
+
}
|
|
3540
|
+
function O(e, t) {
|
|
3541
|
+
f.value = e, t.dataTransfer && (t.dataTransfer.setData("application/x-aham-designer-composed-component", e), t.dataTransfer.effectAllowed = "move");
|
|
3542
|
+
}
|
|
3543
|
+
function A(e) {
|
|
3544
|
+
e.currentTarget === e.target && (s.value = !1, c.value = void 0);
|
|
3545
|
+
}
|
|
3546
|
+
function j() {
|
|
3547
|
+
f.value = void 0, s.value = !1, c.value = void 0;
|
|
3548
|
+
}
|
|
3549
|
+
return t({ addComponent: h }), v(() => {
|
|
3550
|
+
window.addEventListener("keydown", T);
|
|
3551
|
+
}), _(() => {
|
|
3552
|
+
window.removeEventListener("keydown", T);
|
|
3553
|
+
}), (e, t) => (b(), o("div", {
|
|
3554
|
+
ref_key: "composerElement",
|
|
3555
|
+
ref: d,
|
|
3556
|
+
class: m(["composer", { "drag-active": s.value }]),
|
|
3557
|
+
onPointerdownCapture: C,
|
|
3558
|
+
onClick: S,
|
|
3559
|
+
onDragover: E,
|
|
3560
|
+
onDragleave: A,
|
|
3561
|
+
onDrop: D,
|
|
3562
|
+
onDragend: j
|
|
3563
|
+
}, [
|
|
3564
|
+
s.value ? (b(), o("div", {
|
|
3565
|
+
key: 0,
|
|
3566
|
+
class: "drop-line",
|
|
3567
|
+
style: g({ top: `${u.value}px` }),
|
|
3568
|
+
"aria-hidden": "true"
|
|
3569
|
+
}, null, 4)) : a("", !0),
|
|
3570
|
+
k(i).components.length ? a("", !0) : (b(), o("div", ds, " Click or drag a component from the list to start building. ")),
|
|
3571
|
+
l(us, {
|
|
3572
|
+
components: p(),
|
|
3573
|
+
"selected-index": k(i).selectedIndex,
|
|
3574
|
+
onSelect: y
|
|
3575
|
+
}, {
|
|
3576
|
+
default: N(({ type: e, props: t, index: n, selected: r, select: a }) => [l(cs, {
|
|
3577
|
+
type: e,
|
|
3578
|
+
"component-props": t,
|
|
3579
|
+
id: k(i).components[n].id,
|
|
3580
|
+
selected: r,
|
|
3581
|
+
onSelect: a,
|
|
3582
|
+
onMoveStart: O
|
|
3583
|
+
}, null, 8, [
|
|
3584
|
+
"type",
|
|
3585
|
+
"component-props",
|
|
3586
|
+
"id",
|
|
3587
|
+
"selected",
|
|
3588
|
+
"onSelect"
|
|
3589
|
+
])]),
|
|
3590
|
+
_: 1
|
|
3591
|
+
}, 8, ["components", "selected-index"])
|
|
3592
|
+
], 34));
|
|
3593
|
+
}
|
|
3594
|
+
}), [["__scopeId", "data-v-e3d8752d"]]), ps = {}, ms = { class: "desktop" };
|
|
3595
|
+
function hs(e, t) {
|
|
3596
|
+
return b(), o("div", ms, [t[0] ||= s("div", { class: "browser-bar" }, [
|
|
3597
|
+
s("span"),
|
|
3598
|
+
s("span"),
|
|
3599
|
+
s("span"),
|
|
3600
|
+
s("i")
|
|
3601
|
+
], -1), C(e.$slots, "default", {}, void 0, !0)]);
|
|
3602
|
+
}
|
|
3603
|
+
var gs = /*#__PURE__*/ Q(ps, [["render", hs], ["__scopeId", "data-v-6ae31803"]]), _s = /*#__PURE__*/ Q(/* @__PURE__ */ u({
|
|
3604
|
+
__name: "Device",
|
|
3605
|
+
props: { mode: {} },
|
|
3606
|
+
setup(e) {
|
|
3607
|
+
return (t, n) => (b(), o("div", { class: m(["device", `device-${e.mode}`]) }, [C(t.$slots, "default", {}, void 0, !0)], 2));
|
|
3608
|
+
}
|
|
3609
|
+
}), [["__scopeId", "data-v-8c3e6533"]]), vs = /*#__PURE__*/ Q(/* @__PURE__ */ u({
|
|
3610
|
+
__name: "Mobile",
|
|
3611
|
+
setup(e) {
|
|
3612
|
+
return (e, t) => (b(), i(_s, {
|
|
3613
|
+
mode: "phone",
|
|
3614
|
+
class: "mobile-device"
|
|
3615
|
+
}, {
|
|
3616
|
+
default: N(() => [C(e.$slots, "default", {}, void 0, !0)]),
|
|
3617
|
+
_: 3
|
|
3618
|
+
}));
|
|
3619
|
+
}
|
|
3620
|
+
}), [["__scopeId", "data-v-c499f1db"]]), ys = /*#__PURE__*/ Q(/* @__PURE__ */ u({
|
|
3621
|
+
__name: "Tablet",
|
|
3622
|
+
setup(e) {
|
|
3623
|
+
return (e, t) => (b(), i(_s, {
|
|
3624
|
+
mode: "tablet",
|
|
3625
|
+
class: "tablet-device"
|
|
3626
|
+
}, {
|
|
3627
|
+
default: N(() => [C(e.$slots, "default", {}, void 0, !0)]),
|
|
3628
|
+
_: 3
|
|
3629
|
+
}));
|
|
3630
|
+
}
|
|
3631
|
+
}), [["__scopeId", "data-v-3cc52b8c"]]), bs = { class: "canvas-wrap" }, xs = { class: "canvas-topbar" }, Ss = { class: "breadcrumb" }, Cs = { class: "device-switch" }, ws = "aham-ui-designer-device", Ts = /*#__PURE__*/ Q(/* @__PURE__ */ u({
|
|
3632
|
+
__name: "Workspace",
|
|
3633
|
+
props: {
|
|
3634
|
+
subject: {},
|
|
3635
|
+
templateId: {},
|
|
3636
|
+
templateName: {}
|
|
3637
|
+
},
|
|
3638
|
+
emits: ["componentDrop"],
|
|
3639
|
+
setup(e, { expose: t, emit: n }) {
|
|
3640
|
+
let r = e, a = n, c = x("desktop"), u = {
|
|
3641
|
+
phone: vs,
|
|
3642
|
+
tablet: ys,
|
|
3643
|
+
desktop: gs
|
|
3644
|
+
}, d = x(), p = B(), g = {
|
|
3645
|
+
overflow: {
|
|
3646
|
+
x: "scroll",
|
|
3647
|
+
y: "scroll"
|
|
3648
|
+
},
|
|
3649
|
+
scrollbars: {
|
|
3650
|
+
autoHide: "scroll",
|
|
3651
|
+
autoHideDelay: 800
|
|
3652
|
+
}
|
|
3653
|
+
};
|
|
3654
|
+
function _(e) {
|
|
3655
|
+
a("componentDrop", e);
|
|
3656
|
+
}
|
|
3657
|
+
function y(e) {
|
|
3658
|
+
d.value?.addComponent(e);
|
|
3659
|
+
}
|
|
3660
|
+
function S(e) {
|
|
3661
|
+
e.target.closest(".component-handler") || p.deselect();
|
|
3662
|
+
}
|
|
3663
|
+
t({ addComponent: y });
|
|
3664
|
+
function C(e) {
|
|
3665
|
+
c.value = e;
|
|
3666
|
+
}
|
|
3667
|
+
return v(() => {
|
|
3668
|
+
let e = localStorage.getItem(ws);
|
|
3669
|
+
(e === "phone" || e === "tablet" || e === "desktop") && (c.value = e);
|
|
3670
|
+
}), j(c, (e) => {
|
|
3671
|
+
localStorage.setItem(ws, e);
|
|
3672
|
+
}), j(() => r.templateId, (e) => {
|
|
3673
|
+
p.setActiveTemplate(e, r.templateName ?? e);
|
|
3674
|
+
}, { immediate: !0 }), j(() => r.templateName, (e) => {
|
|
3675
|
+
e && p.activeTemplateId === r.templateId && (p.activeTemplateName = e);
|
|
3676
|
+
}), (e, t) => (b(), o("main", bs, [s("div", xs, [s("span", Ss, [l(is)]), s("div", Cs, [
|
|
3677
|
+
s("button", {
|
|
3678
|
+
type: "button",
|
|
3679
|
+
class: m(["device-button", { active: c.value === "phone" }]),
|
|
3680
|
+
"aria-label": "Phone preview",
|
|
3681
|
+
onClick: t[0] ||= (e) => C("phone")
|
|
3682
|
+
}, [...t[3] ||= [s("span", {
|
|
3683
|
+
class: "icon",
|
|
3684
|
+
"aria-hidden": "true"
|
|
3685
|
+
}, "smartphone", -1)]], 2),
|
|
3686
|
+
s("button", {
|
|
3687
|
+
type: "button",
|
|
3688
|
+
class: m(["device-button", { active: c.value === "tablet" }]),
|
|
3689
|
+
"aria-label": "Tablet preview",
|
|
3690
|
+
onClick: t[1] ||= (e) => C("tablet")
|
|
3691
|
+
}, [...t[4] ||= [s("span", {
|
|
3692
|
+
class: "icon",
|
|
3693
|
+
"aria-hidden": "true"
|
|
3694
|
+
}, "tablet_android", -1)]], 2),
|
|
3695
|
+
s("button", {
|
|
3696
|
+
type: "button",
|
|
3697
|
+
class: m(["device-button", { active: c.value === "desktop" }]),
|
|
3698
|
+
"aria-label": "Desktop preview",
|
|
3699
|
+
onClick: t[2] ||= (e) => C("desktop")
|
|
3700
|
+
}, [...t[5] ||= [s("span", {
|
|
3701
|
+
class: "icon",
|
|
3702
|
+
"aria-hidden": "true"
|
|
3703
|
+
}, "desktop_windows", -1)]], 2)
|
|
3704
|
+
])]), l(k($r), {
|
|
3705
|
+
class: "canvas-scroll",
|
|
3706
|
+
options: g,
|
|
3707
|
+
defer: "",
|
|
3708
|
+
onPointerdownCapture: S
|
|
3709
|
+
}, {
|
|
3710
|
+
default: N(() => [s("div", {
|
|
3711
|
+
class: m(["canvas-frame", `device-${c.value}`]),
|
|
3712
|
+
onPointerdownCapture: S
|
|
3713
|
+
}, [(b(), i(T(u[c.value]), h(f(c.value === "desktop" ? {} : void 0)), {
|
|
3714
|
+
default: N(() => [l(fs, {
|
|
3715
|
+
ref_key: "composer",
|
|
3716
|
+
ref: d,
|
|
3717
|
+
onComponentDrop: _
|
|
3718
|
+
}, null, 512)]),
|
|
3719
|
+
_: 1
|
|
3720
|
+
}, 16))], 34)]),
|
|
3721
|
+
_: 1
|
|
3722
|
+
})]));
|
|
3723
|
+
}
|
|
3724
|
+
}), [["__scopeId", "data-v-71aa67d7"]]), Es = ["data-theme", "data-theme-mode"], Ds = { class: "contents" }, Os = "aham-ui-designer-screens-height", ks = "aham-ui-designer-theme", As = /*#__PURE__*/ Q(/* @__PURE__ */ u({
|
|
3725
|
+
__name: "Designer",
|
|
3726
|
+
props: {
|
|
3727
|
+
value: {},
|
|
3728
|
+
options: {}
|
|
3729
|
+
},
|
|
3730
|
+
emits: [
|
|
3731
|
+
"moreSelect",
|
|
3732
|
+
"translationUpdate",
|
|
3733
|
+
"screenSelect",
|
|
3734
|
+
"screenAdd",
|
|
3735
|
+
"screenRename",
|
|
3736
|
+
"themeUpdate",
|
|
3737
|
+
"componentDrop"
|
|
3738
|
+
],
|
|
3739
|
+
setup(e, { emit: t }) {
|
|
3740
|
+
let n = e, i = t, a = x(), c = x([]), u = x(), d = x(50), f = x(!1), p = x(!1), m = x(), h = x(!1), y = x(n.options?.theme?.color), S = z(), C = B(), w = x(), T = !1, E = r(() => n.options?.theme?.mode ?? "default"), D = r(() => {
|
|
3741
|
+
let e = {
|
|
3742
|
+
alert: {
|
|
3743
|
+
label: "Alert",
|
|
3744
|
+
icon: "warning"
|
|
3745
|
+
},
|
|
3746
|
+
card: {
|
|
3747
|
+
label: "Card",
|
|
3748
|
+
icon: "web_asset"
|
|
3749
|
+
},
|
|
3750
|
+
checkbox: {
|
|
3751
|
+
label: "Checkbox",
|
|
3752
|
+
icon: "check_box"
|
|
3753
|
+
},
|
|
3754
|
+
consentCard: {
|
|
3755
|
+
label: "Consent Card",
|
|
3756
|
+
icon: "verified_user"
|
|
3757
|
+
},
|
|
3758
|
+
container: {
|
|
3759
|
+
label: "Container",
|
|
3760
|
+
icon: "view_agenda"
|
|
3761
|
+
},
|
|
3762
|
+
content: {
|
|
3763
|
+
label: "Layout Content",
|
|
3764
|
+
icon: "dashboard"
|
|
3765
|
+
},
|
|
3766
|
+
divider: {
|
|
3767
|
+
label: "Divider",
|
|
3768
|
+
icon: "horizontal_rule"
|
|
3769
|
+
},
|
|
3770
|
+
emailInput: {
|
|
3771
|
+
label: "Email Input",
|
|
3772
|
+
icon: "mail"
|
|
3773
|
+
},
|
|
3774
|
+
heading: {
|
|
3775
|
+
label: "Heading",
|
|
3776
|
+
icon: "title"
|
|
3777
|
+
},
|
|
3778
|
+
image: {
|
|
3779
|
+
label: "Image",
|
|
3780
|
+
icon: "image"
|
|
3781
|
+
},
|
|
3782
|
+
layout: {
|
|
3783
|
+
label: "Layout",
|
|
3784
|
+
icon: "view_column"
|
|
3785
|
+
},
|
|
3786
|
+
layoutRef: {
|
|
3787
|
+
label: "Layout Reference",
|
|
3788
|
+
icon: "view_quilt"
|
|
3789
|
+
},
|
|
3790
|
+
otpInput: {
|
|
3791
|
+
label: "OTP Input",
|
|
3792
|
+
icon: "pin"
|
|
3793
|
+
},
|
|
3794
|
+
passwordInput: {
|
|
3795
|
+
label: "Password Input",
|
|
3796
|
+
icon: "lock"
|
|
3797
|
+
},
|
|
3798
|
+
scopeList: {
|
|
3799
|
+
label: "Scope List",
|
|
3800
|
+
icon: "checklist"
|
|
3801
|
+
},
|
|
3802
|
+
socialButton: {
|
|
3803
|
+
label: "Social Button",
|
|
3804
|
+
icon: "group"
|
|
3805
|
+
},
|
|
3806
|
+
spacer: {
|
|
3807
|
+
label: "Spacer",
|
|
3808
|
+
icon: "height"
|
|
3809
|
+
},
|
|
3810
|
+
submitButton: {
|
|
3811
|
+
label: "Submit Button",
|
|
3812
|
+
icon: "send"
|
|
3813
|
+
},
|
|
3814
|
+
text: {
|
|
3815
|
+
label: "Text",
|
|
3816
|
+
icon: "subject"
|
|
3817
|
+
},
|
|
3818
|
+
textInput: {
|
|
3819
|
+
label: "Text Input",
|
|
3820
|
+
icon: "text_fields"
|
|
3821
|
+
},
|
|
3822
|
+
textLink: {
|
|
3823
|
+
label: "Text Link",
|
|
3824
|
+
icon: "link"
|
|
3825
|
+
}
|
|
3826
|
+
};
|
|
3827
|
+
return C.components.map((t) => ({
|
|
3828
|
+
...t,
|
|
3829
|
+
...e[t.type] ?? {
|
|
3830
|
+
label: t.type,
|
|
3831
|
+
icon: "widgets"
|
|
3832
|
+
}
|
|
3833
|
+
}));
|
|
3834
|
+
}), O = r(() => n.options?.checklist?.map((e) => ({
|
|
3835
|
+
...e,
|
|
3836
|
+
complete: e.check ? e.check({ templates: c.value }) : e.complete
|
|
3837
|
+
})));
|
|
3838
|
+
j(() => n.options?.templates, (e) => {
|
|
3839
|
+
c.value = e ? [...e] : [], !u.value && c.value[0] && (u.value = c.value[0].id);
|
|
3840
|
+
}, { immediate: !0 }), j(() => n.options?.translations, (e) => {
|
|
3841
|
+
e && S.setItems(e);
|
|
3842
|
+
}, { immediate: !0 }), j(() => n.options?.translationScreens, (e) => {
|
|
3843
|
+
Object.entries(e ?? {}).forEach(([e, t]) => {
|
|
3844
|
+
S.setScreenItems(e, t);
|
|
3845
|
+
});
|
|
3846
|
+
}), j(() => n.options?.translationComponents, (e) => {
|
|
3847
|
+
Object.entries(e ?? {}).forEach(([e, t]) => {
|
|
3848
|
+
S.setComponentItems(e, t);
|
|
3849
|
+
});
|
|
3850
|
+
});
|
|
3851
|
+
function A() {
|
|
3852
|
+
let e = c.value.filter((e) => e.icon === "view_column").length, t = `layout-${Date.now()}`, n = {
|
|
3853
|
+
id: t,
|
|
3854
|
+
name: e ? `New Layout ${e + 1}` : "New Layout",
|
|
3855
|
+
version: "1",
|
|
3856
|
+
channel: "ui",
|
|
3857
|
+
icon: "view_column",
|
|
3858
|
+
changed: !0,
|
|
3859
|
+
type: "dynamic"
|
|
3860
|
+
};
|
|
3861
|
+
c.value.push(n), u.value = t, i("screenAdd", n), i("screenSelect", n);
|
|
3862
|
+
}
|
|
3863
|
+
function M(e, t) {
|
|
3864
|
+
let n = c.value.find((t) => t.id === e);
|
|
3865
|
+
n && (n.name = t, i("screenRename", e, t));
|
|
3866
|
+
}
|
|
3867
|
+
function N(e) {
|
|
3868
|
+
let t = c.value.find((t) => t.id === e);
|
|
3869
|
+
t && (u.value = e, i("screenSelect", t));
|
|
3870
|
+
}
|
|
3871
|
+
function P(e) {
|
|
3872
|
+
i("moreSelect", e);
|
|
3873
|
+
}
|
|
3874
|
+
function F() {
|
|
3875
|
+
f.value = !f.value;
|
|
3876
|
+
}
|
|
3877
|
+
function I() {
|
|
3878
|
+
p.value = !p.value, p.value && (h.value = !1);
|
|
3879
|
+
}
|
|
3880
|
+
function L(e) {
|
|
3881
|
+
m.value = e, p.value = !0, h.value = !1;
|
|
3882
|
+
}
|
|
3883
|
+
function R() {
|
|
3884
|
+
h.value = !h.value, h.value && (p.value = !1);
|
|
3885
|
+
}
|
|
3886
|
+
function V(e) {
|
|
3887
|
+
y.value = e, i("themeUpdate", e);
|
|
3888
|
+
}
|
|
3889
|
+
function H(e) {
|
|
3890
|
+
i("componentDrop", e);
|
|
3891
|
+
}
|
|
3892
|
+
function U(e) {
|
|
3893
|
+
w.value?.addComponent(e);
|
|
3894
|
+
}
|
|
3895
|
+
function ee(e, t, n) {
|
|
3896
|
+
S.updateValue(e, t, n), i("translationUpdate", e, t, n);
|
|
3897
|
+
}
|
|
3898
|
+
function te() {
|
|
3899
|
+
T && (T = !1, document.body.style.removeProperty("cursor"), document.removeEventListener("pointermove", ne), document.removeEventListener("pointerup", te));
|
|
3900
|
+
}
|
|
3901
|
+
function ne(e) {
|
|
3902
|
+
let t = a.value?.getBoundingClientRect();
|
|
3903
|
+
if (!t) return;
|
|
3904
|
+
let n = (e.clientY - t.top) / t.height * 100;
|
|
3905
|
+
d.value = Math.min(80, Math.max(20, n));
|
|
3906
|
+
}
|
|
3907
|
+
function W(e) {
|
|
3908
|
+
T = !0, document.body.style.cursor = "row-resize", document.addEventListener("pointermove", ne), document.addEventListener("pointerup", te), e.currentTarget.setPointerCapture?.(e.pointerId);
|
|
3909
|
+
}
|
|
3910
|
+
return v(() => {
|
|
3911
|
+
let e = Number(localStorage.getItem(Os));
|
|
3912
|
+
Number.isFinite(e) && (d.value = Math.min(80, Math.max(20, e))), f.value = E.value === "default" && localStorage.getItem(ks) === "dark";
|
|
3913
|
+
}), j(d, (e) => {
|
|
3914
|
+
localStorage.setItem(Os, String(e));
|
|
3915
|
+
}), j([f, E], ([e, t]) => {
|
|
3916
|
+
t === "default" && localStorage.setItem(ks, e ? "dark" : "light");
|
|
3917
|
+
}), _(te), (t, n) => (b(), o("section", {
|
|
3918
|
+
class: "ui-designer",
|
|
3919
|
+
"data-theme": f.value ? "dark" : "light",
|
|
3920
|
+
"data-theme-mode": E.value,
|
|
3921
|
+
style: g(y.value ? { "--designer-primary": y.value } : void 0)
|
|
3922
|
+
}, [
|
|
3923
|
+
l(ki, {
|
|
3924
|
+
subject: e.options?.subject ?? "",
|
|
3925
|
+
shared: e.options?.shared,
|
|
3926
|
+
"dark-mode-changeable": e.options?.theme?.darkModeChangeable,
|
|
3927
|
+
"dark-mode": f.value,
|
|
3928
|
+
"translations-open": p.value,
|
|
3929
|
+
"theme-open": h.value,
|
|
3930
|
+
"more-items": e.options?.moreItems,
|
|
3931
|
+
onMoreSelect: P,
|
|
3932
|
+
onToggleTheme: F,
|
|
3933
|
+
onToggleTranslations: I,
|
|
3934
|
+
onToggleThemePanel: R
|
|
3935
|
+
}, null, 8, [
|
|
3936
|
+
"subject",
|
|
3937
|
+
"shared",
|
|
3938
|
+
"dark-mode-changeable",
|
|
3939
|
+
"dark-mode",
|
|
3940
|
+
"translations-open",
|
|
3941
|
+
"theme-open",
|
|
3942
|
+
"more-items"
|
|
3943
|
+
]),
|
|
3944
|
+
s("div", Ds, [
|
|
3945
|
+
s("aside", null, [s("div", {
|
|
3946
|
+
ref_key: "sidebarPanels",
|
|
3947
|
+
ref: a,
|
|
3948
|
+
class: "sidebar-panels",
|
|
3949
|
+
style: g({ "--screens-height": `${d.value}%` })
|
|
3950
|
+
}, [
|
|
3951
|
+
l(wo, {
|
|
3952
|
+
templates: c.value,
|
|
3953
|
+
"focused-template-id": u.value,
|
|
3954
|
+
onAdd: A,
|
|
3955
|
+
onRename: M,
|
|
3956
|
+
onSelect: N
|
|
3957
|
+
}, null, 8, ["templates", "focused-template-id"]),
|
|
3958
|
+
s("button", {
|
|
3959
|
+
type: "button",
|
|
3960
|
+
class: "panel-resizer",
|
|
3961
|
+
"aria-label": "Resize screens and components panels",
|
|
3962
|
+
onPointerdown: W
|
|
3963
|
+
}, [...n[3] ||= [s("span", { "aria-hidden": "true" }, null, -1)]], 32),
|
|
3964
|
+
l(fi, { onSelect: U })
|
|
3965
|
+
], 4), l(fo, { items: O.value }, null, 8, ["items"])]),
|
|
3966
|
+
l(Ts, {
|
|
3967
|
+
ref_key: "workspace",
|
|
3968
|
+
ref: w,
|
|
3969
|
+
class: "workspace",
|
|
3970
|
+
subject: e.options?.subject ?? "",
|
|
3971
|
+
"template-id": u.value,
|
|
3972
|
+
"template-name": c.value.find(({ id: e }) => e === u.value)?.name,
|
|
3973
|
+
onComponentDrop: H
|
|
3974
|
+
}, null, 8, [
|
|
3975
|
+
"subject",
|
|
3976
|
+
"template-id",
|
|
3977
|
+
"template-name"
|
|
3978
|
+
]),
|
|
3979
|
+
l(so, {
|
|
3980
|
+
class: "properties",
|
|
3981
|
+
layers: D.value,
|
|
3982
|
+
"selected-component": k(C).selectedComponent,
|
|
3983
|
+
onUpdateProps: n[0] ||= (e) => k(C).selectedComponent && k(C).updateComponentProps(k(C).selectedComponent.id, e),
|
|
3984
|
+
onFocusTranslation: L
|
|
3985
|
+
}, null, 8, ["layers", "selected-component"])
|
|
3986
|
+
]),
|
|
3987
|
+
l(ts, {
|
|
3988
|
+
open: p.value,
|
|
3989
|
+
"focused-field-id": m.value,
|
|
3990
|
+
onClose: n[1] ||= (e) => p.value = !1,
|
|
3991
|
+
onUpdate: ee
|
|
3992
|
+
}, null, 8, ["open", "focused-field-id"]),
|
|
3993
|
+
l(Fo, {
|
|
3994
|
+
open: h.value,
|
|
3995
|
+
color: y.value,
|
|
3996
|
+
onClose: n[2] ||= (e) => h.value = !1,
|
|
3997
|
+
onUpdate: V
|
|
3998
|
+
}, null, 8, ["open", "color"])
|
|
3999
|
+
], 12, Es));
|
|
4000
|
+
}
|
|
4001
|
+
}), [["__scopeId", "data-v-68f84b1d"]]), js = L("checklist", {
|
|
4002
|
+
state: () => ({ items: [{
|
|
4003
|
+
id: "all-screens-completed",
|
|
4004
|
+
label: "All screens completed",
|
|
4005
|
+
complete: !1,
|
|
4006
|
+
check: ({ templates: e }) => e.length > 0 && e.every((e) => !e.changed)
|
|
4007
|
+
}] }),
|
|
4008
|
+
actions: {
|
|
4009
|
+
setComplete(e, t = !0) {
|
|
4010
|
+
let n = this.items.find((t) => t.id === e);
|
|
4011
|
+
n && (n.complete = t);
|
|
4012
|
+
},
|
|
4013
|
+
reset() {
|
|
4014
|
+
this.items.forEach((e) => {
|
|
4015
|
+
e.complete = !1;
|
|
4016
|
+
});
|
|
4017
|
+
}
|
|
4018
|
+
}
|
|
4019
|
+
}), Ms = L("templates", {
|
|
4020
|
+
state: () => ({
|
|
4021
|
+
templates: [],
|
|
4022
|
+
template: null
|
|
4023
|
+
}),
|
|
4024
|
+
actions: {
|
|
4025
|
+
setTemplates(e) {
|
|
4026
|
+
this.templates = e, this.template = e[0] ?? null;
|
|
4027
|
+
},
|
|
4028
|
+
setActiveTemplate(e) {
|
|
4029
|
+
this.template = this.templates.find((t) => t.id === e) ?? this.template;
|
|
4030
|
+
},
|
|
4031
|
+
addDynamicLayout(e) {
|
|
4032
|
+
let t = this.templates.filter((e) => e.type === "dynamic").length, n = e ?? {
|
|
4033
|
+
id: `layout-${Date.now()}`,
|
|
4034
|
+
name: t ? `New Layout ${t + 1}` : "New Layout",
|
|
4035
|
+
icon: "view_column",
|
|
4036
|
+
channel: "ui",
|
|
4037
|
+
version: "1",
|
|
4038
|
+
changed: !0,
|
|
4039
|
+
type: "dynamic"
|
|
4040
|
+
};
|
|
4041
|
+
this.templates.push(n), this.template = n;
|
|
4042
|
+
},
|
|
4043
|
+
rename(e, t) {
|
|
4044
|
+
let n = this.templates.find((t) => t.id === e);
|
|
4045
|
+
n && (n.name = t);
|
|
4046
|
+
},
|
|
4047
|
+
clear() {
|
|
4048
|
+
this.templates = [], this.template = null;
|
|
4049
|
+
}
|
|
4050
|
+
}
|
|
4051
|
+
});
|
|
2693
4052
|
//#endregion
|
|
2694
|
-
export {
|
|
4053
|
+
export { Oa as Alert, Pi as Card, fa as Checkbox, cs as ComponentHandler, fs as Composer, Na as ConsentCard, Ni as Container, ja as Content, As as Designer, gs as Desktop, _s as Device, Ri as Divider, Ji as EmailInput, va as Heading, Ea as Image, zi as Layout, Ui as LayoutRef, vs as Mobile, la as OtpInput, aa as PasswordInput, us as Renderer, Fa as ScopeList, ha as SocialButton, Fi as Spacer, pa as SubmitButton, ys as Tablet, ba as Text, $i as TextInput, _a as TextLink, ti as TextScroller, Fo as ThemeSidebar, js as useChecklistStore, Ms as useTemplatesStore, z as useTranslationStore, B as useWorkspaceStore, $ as withEditable };
|