@webx-ui/module-banners 0.2.4 → 0.3.1
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/BannerEditorPage-j7WlEaek.js +243 -0
- package/dist/BannerEditorPage-j7WlEaek.js.map +1 -0
- package/dist/BannersPage-Dl_BCozz.js +591 -0
- package/dist/BannersPage-Dl_BCozz.js.map +1 -0
- package/dist/index-3RALKrkh.js +1681 -0
- package/dist/index-3RALKrkh.js.map +1 -0
- package/dist/index.d.ts +14 -2
- package/dist/index.js +28 -2484
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +5 -5
|
@@ -0,0 +1,1681 @@
|
|
|
1
|
+
import { provide as Vt, inject as zt, defineComponent as lt, computed as v, openBlock as f, createElementBlock as x, createElementVNode as g, createVNode as d, unref as e, withCtx as m, createTextVNode as O, toDisplayString as z, Fragment as H, createBlock as W, createCommentVNode as I, isRef as me, renderList as oe, normalizeClass as J, normalizeStyle as xe, ref as te, reactive as _t, watch as Ct, onMounted as St, onBeforeUnmount as Ot, resolveDynamicComponent as Bt, withModifiers as Ee, defineAsyncComponent as at } from "vue";
|
|
2
|
+
import { useLocales as nt, WxInput as Ze, WxButton as E, WxIcon as F, WxFormItem as S, WxTextarea as Lt, WxText as Y, WxSelect as ye, WxInputNumber as ge, WxSwitch as _e, WxSegmented as st, WxColorPicker as Nt, WxTooltip as qe, WxSortableList as Pt } from "@webx-ui/core";
|
|
3
|
+
import { useAdmin as ot, useTranslate as it, WxLinkField as Ut } from "@webx-ui/module-admin";
|
|
4
|
+
import { WxMediaField as Wt, createMediaApi as Tt } from "@webx-ui/module-media";
|
|
5
|
+
function It(t) {
|
|
6
|
+
const c = `${t.apiPath}/banners`, r = (s) => `${c}/places/${encodeURIComponent(s)}`, y = (s) => s.data;
|
|
7
|
+
return {
|
|
8
|
+
places: () => t.http.get(`${c}/places`).then(y),
|
|
9
|
+
createPlace: (s) => t.http.post(`${c}/places`, s).then(y),
|
|
10
|
+
renamePlace: (s, w) => t.http.put(r(s), { title: w }).then(y),
|
|
11
|
+
removePlace: (s) => t.http.delete(r(s)).then(() => {
|
|
12
|
+
}),
|
|
13
|
+
list: (s, w = !1) => t.http.get(`${r(s)}/banners${w ? "?trashed=1" : ""}`).then(y),
|
|
14
|
+
get: (s) => t.http.get(`${c}/${s}`).then(y),
|
|
15
|
+
create: (s, w) => t.http.post(`${r(s)}/banners`, { values: w }).then(y),
|
|
16
|
+
save: (s, w, B) => t.http.put(
|
|
17
|
+
`${c}/${s}`,
|
|
18
|
+
B === void 0 ? { values: w } : { values: w, place: B }
|
|
19
|
+
).then(y),
|
|
20
|
+
remove: (s) => t.http.delete(`${c}/${s}`).then(() => {
|
|
21
|
+
}),
|
|
22
|
+
// The resource of the list line, and not the form's pair: a restored banner stays closed.
|
|
23
|
+
restore: (s) => t.http.post(`${c}/${s}/restore`, {}).then(y),
|
|
24
|
+
reorder: (s, w) => t.http.post(`${r(s)}/reorder`, { ids: w }).then(() => {
|
|
25
|
+
}),
|
|
26
|
+
theme: () => t.http.get(`${c}/theme`).then(y)
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
const rt = /* @__PURE__ */ Symbol("wx-banner-editor");
|
|
30
|
+
function El(t) {
|
|
31
|
+
Vt(rt, t);
|
|
32
|
+
}
|
|
33
|
+
function Et() {
|
|
34
|
+
return zt(rt, null);
|
|
35
|
+
}
|
|
36
|
+
const Dt = {
|
|
37
|
+
module: {
|
|
38
|
+
banners: "Banners"
|
|
39
|
+
},
|
|
40
|
+
places: {
|
|
41
|
+
hero: "Home page slider",
|
|
42
|
+
promo: "Promo strip",
|
|
43
|
+
notice: "Announcement bar",
|
|
44
|
+
list: "Places",
|
|
45
|
+
new: "New place",
|
|
46
|
+
title: "Name",
|
|
47
|
+
key: "Key",
|
|
48
|
+
"key-help": "What the site’s template asks for: lowercase Latin letters, digits and dashes, starting with a letter. It cannot be changed later.",
|
|
49
|
+
declared: "Declared in the configuration",
|
|
50
|
+
"in-template": "In a template: banners(':key')",
|
|
51
|
+
count: "Banners",
|
|
52
|
+
rename: "Rename",
|
|
53
|
+
delete: "Delete",
|
|
54
|
+
"delete-confirm": "Delete the place “:title”?",
|
|
55
|
+
"delete-not-empty": "Only an empty place can be deleted — the bin counts too.",
|
|
56
|
+
empty: "No places yet",
|
|
57
|
+
choose: "Choose a place on the left",
|
|
58
|
+
create: "Create",
|
|
59
|
+
save: "Save",
|
|
60
|
+
cancel: "Cancel",
|
|
61
|
+
created: "Place created",
|
|
62
|
+
renamed: "Place renamed",
|
|
63
|
+
deleted: "Place deleted",
|
|
64
|
+
places: "Places",
|
|
65
|
+
"new-title": "New place",
|
|
66
|
+
"rename-title": "Rename the place",
|
|
67
|
+
"delete-title": "Delete the place “:place”?",
|
|
68
|
+
"delete-text": "There is nothing in it. A template that still asks for it gets an empty list, not an error.",
|
|
69
|
+
"delete-empty-first": "Delete: empty it first",
|
|
70
|
+
"delete-blocked": "Banners in this place, the bin included: :count. Take them out first.",
|
|
71
|
+
"field-title": "Name",
|
|
72
|
+
"field-key": "Key",
|
|
73
|
+
"declared-help": "Cannot be renamed or deleted here: a template asks for it by its key.",
|
|
74
|
+
usage: "In a template:",
|
|
75
|
+
"layout-single": "One banner",
|
|
76
|
+
"layout-random": "A random one",
|
|
77
|
+
"layout-slider": "Slider",
|
|
78
|
+
"empty-help": "The site’s config declares the places its templates ask for.",
|
|
79
|
+
"choose-help": "Its banners open beside the list."
|
|
80
|
+
},
|
|
81
|
+
banner: {
|
|
82
|
+
new: "New banner",
|
|
83
|
+
trash: "Bin",
|
|
84
|
+
"to-trash": "Move to the bin",
|
|
85
|
+
restore: "Restore",
|
|
86
|
+
open: "Open",
|
|
87
|
+
enable: "Turn on",
|
|
88
|
+
disable: "Turn off",
|
|
89
|
+
disabled: "Off",
|
|
90
|
+
video: "Video",
|
|
91
|
+
empty: "No banners in this place yet",
|
|
92
|
+
"trash-empty": "The bin is empty",
|
|
93
|
+
place: "Place",
|
|
94
|
+
"place-help": "Moving the banner puts it at the end of the new place.",
|
|
95
|
+
back: "Back to the place",
|
|
96
|
+
save: "Save",
|
|
97
|
+
saved: "Banner saved",
|
|
98
|
+
trashed: "Bin",
|
|
99
|
+
restored: "Banner restored",
|
|
100
|
+
"leave-title": "Leave without saving?",
|
|
101
|
+
"leave-text": "The changes to this banner will be lost.",
|
|
102
|
+
leave: "Leave",
|
|
103
|
+
stay: "Stay",
|
|
104
|
+
reorder: "Reorder",
|
|
105
|
+
untitled: "Untitled banner",
|
|
106
|
+
all: "Banners",
|
|
107
|
+
"empty-help": "The site shows them wherever a template asks for this place.",
|
|
108
|
+
"empty-bin": "The bin is empty.",
|
|
109
|
+
"no-picture": "No picture",
|
|
110
|
+
order: "Drag to change the order on the site.",
|
|
111
|
+
"switched-on": "Switched on.",
|
|
112
|
+
"switched-off": "Switched off.",
|
|
113
|
+
delete: "Delete",
|
|
114
|
+
"delete-title": "Delete “:name”?",
|
|
115
|
+
"delete-text": "It goes to the bin and leaves the site. Restored, it comes back to its place.",
|
|
116
|
+
deleted: "Moved to the bin.",
|
|
117
|
+
"reorder-failed": "The new order was not saved.",
|
|
118
|
+
"save-failed": "Not saved.",
|
|
119
|
+
cancel: "Cancel",
|
|
120
|
+
previous: "Previous banner",
|
|
121
|
+
next: "Next banner"
|
|
122
|
+
},
|
|
123
|
+
screen: {
|
|
124
|
+
media: "Pictures and video",
|
|
125
|
+
image: "Picture",
|
|
126
|
+
"image-help": "Required. Shown on wide screens, and as the poster of the video.",
|
|
127
|
+
"image-mobile": "Picture for phones",
|
|
128
|
+
"image-mobile-help": "Optional. Narrow screens show it instead of the picture above.",
|
|
129
|
+
video: "Video",
|
|
130
|
+
"video-help": "Optional. Plays silently over the picture; the picture becomes its poster and what is seen without it.",
|
|
131
|
+
words: "Words",
|
|
132
|
+
title: "Title",
|
|
133
|
+
"title-help": "A banner with words is shown only in the languages they are written in; one without words is shown everywhere.",
|
|
134
|
+
text: "Text",
|
|
135
|
+
"text-help": "Plain text; line breaks are kept.",
|
|
136
|
+
buttons: "Buttons",
|
|
137
|
+
"buttons-help": "Up to three. A button without a label in a language is not shown in it.",
|
|
138
|
+
"buttons-add": "Add a button",
|
|
139
|
+
"buttons-empty": "No buttons",
|
|
140
|
+
label: "Label",
|
|
141
|
+
link: "Link",
|
|
142
|
+
variant: "Look",
|
|
143
|
+
"variant-placeholder": "The first one",
|
|
144
|
+
settings: "Settings",
|
|
145
|
+
enabled: "On",
|
|
146
|
+
"enabled-help": "Only a banner that is on is shown on the site. A new one starts off.",
|
|
147
|
+
layers: "Layers",
|
|
148
|
+
"layers-help": "Texts, pictures and buttons placed on the picture. Every size is a percent of the picture’s width, so the banner scales as a whole."
|
|
149
|
+
},
|
|
150
|
+
layers: {
|
|
151
|
+
text: "Text",
|
|
152
|
+
image: "Picture",
|
|
153
|
+
button: "Button",
|
|
154
|
+
"title-layer": "Banner title",
|
|
155
|
+
"text-layer": "Banner text",
|
|
156
|
+
"buttons-layer": "Banner buttons",
|
|
157
|
+
desktop: "Computer",
|
|
158
|
+
mobile: "Phone",
|
|
159
|
+
layout: "Layout",
|
|
160
|
+
undo: "Undo (Ctrl+Z)",
|
|
161
|
+
redo: "Redo (Ctrl+Shift+Z)",
|
|
162
|
+
"not-here": "This place does not print layers: they are kept, but the site does not show them.",
|
|
163
|
+
canvas: "Banner canvas",
|
|
164
|
+
"no-picture": "Choose a picture above",
|
|
165
|
+
hint: "Click to select, drag to move, the handles resize. Arrows move by 0.05 (with Shift by 0.5), Delete removes, Ctrl+D duplicates, Ctrl+Z undoes. Alt while dragging: no snapping. The shade is what the frame of the place crops away.",
|
|
166
|
+
empty: "No layers yet",
|
|
167
|
+
list: "Layers",
|
|
168
|
+
outside: "Outside the frame: not seen on the site",
|
|
169
|
+
show: "Show on this layout",
|
|
170
|
+
hide: "Hide on this layout",
|
|
171
|
+
delete: "Delete",
|
|
172
|
+
choose: "Select a layer on the picture or in the list.",
|
|
173
|
+
name: "Name in the list",
|
|
174
|
+
label: "Label",
|
|
175
|
+
words: "Words",
|
|
176
|
+
"falls-back": "Empty here: the site shows the words in :code.",
|
|
177
|
+
"words-help": "Empty in a language — the default language is shown. {title} and {text} put in the banner’s fields.",
|
|
178
|
+
"unknown-field": "Not a field of the banner: :fields. Fields are {title} and {text}.",
|
|
179
|
+
tag: "Tag",
|
|
180
|
+
link: "Link",
|
|
181
|
+
variant: "Look",
|
|
182
|
+
"buttons-help": "The buttons of the banner, in a row. Edit them in “Buttons” below.",
|
|
183
|
+
"geometry-desktop": "Position on a computer",
|
|
184
|
+
"geometry-mobile-own": "Position on a phone",
|
|
185
|
+
"geometry-mobile-same": "Position on a phone — as on a computer",
|
|
186
|
+
"same-as-desktop": "As on a computer",
|
|
187
|
+
unit: "In percent of the picture’s width.",
|
|
188
|
+
x: "x (from the left)",
|
|
189
|
+
y: "y (from the top)",
|
|
190
|
+
w: "Width",
|
|
191
|
+
size: "Font size",
|
|
192
|
+
pad: "Padding",
|
|
193
|
+
radius: "Rounding",
|
|
194
|
+
tracking: "Letter spacing, em",
|
|
195
|
+
rotate: "Rotation, °",
|
|
196
|
+
gap: "Gap",
|
|
197
|
+
origin: "Anchor",
|
|
198
|
+
"origin-help": "Which point of the layer stands at x and y: longer words grow away from it.",
|
|
199
|
+
"hidden-here": "Hidden on this layout",
|
|
200
|
+
look: "Look",
|
|
201
|
+
font: "Font",
|
|
202
|
+
"font-site": "As on the site",
|
|
203
|
+
"font-heading": "Headings",
|
|
204
|
+
"font-body": "Body text",
|
|
205
|
+
weight: "Weight",
|
|
206
|
+
"line-height": "Line height",
|
|
207
|
+
opacity: "Opacity",
|
|
208
|
+
align: "Alignment",
|
|
209
|
+
"align-start": "Start",
|
|
210
|
+
"align-center": "Centre",
|
|
211
|
+
"align-end": "End",
|
|
212
|
+
italic: "Italic",
|
|
213
|
+
uppercase: "Capitals",
|
|
214
|
+
shadow: "Shadow",
|
|
215
|
+
color: "Colour",
|
|
216
|
+
background: "Background",
|
|
217
|
+
motion: "Motion",
|
|
218
|
+
entrance: "Entrance",
|
|
219
|
+
loop: "Loop",
|
|
220
|
+
delay: "Delay, ms",
|
|
221
|
+
duration: "Duration, ms",
|
|
222
|
+
"motion-none": "None",
|
|
223
|
+
"in-fade": "Fade in",
|
|
224
|
+
"in-rise": "Rise",
|
|
225
|
+
"in-slide-start": "From the start",
|
|
226
|
+
"in-slide-end": "From the end",
|
|
227
|
+
"in-zoom": "Zoom",
|
|
228
|
+
"loop-spin": "Spin",
|
|
229
|
+
"loop-float": "Float"
|
|
230
|
+
}
|
|
231
|
+
}, Ge = /* @__PURE__ */ new WeakSet();
|
|
232
|
+
function At() {
|
|
233
|
+
try {
|
|
234
|
+
const { i18n: t } = ot();
|
|
235
|
+
Ge.has(t) || (t.defaults("webx-banners", Dt), Ge.add(t));
|
|
236
|
+
} catch {
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
const ke = {
|
|
240
|
+
x: [-50, 150, 5],
|
|
241
|
+
y: [-50, 150, 5],
|
|
242
|
+
w: [1, 150, 40],
|
|
243
|
+
size: [0.3, 20, 3],
|
|
244
|
+
pad: [0, 10, 0],
|
|
245
|
+
radius: [0, 50, 0],
|
|
246
|
+
tracking: [-0.2, 1, 0],
|
|
247
|
+
rotate: [-180, 180, 0],
|
|
248
|
+
gap: [0, 10, 1]
|
|
249
|
+
}, Mt = ["tl", "t", "tr", "l", "c", "r", "bl", "b", "br"], Ft = {
|
|
250
|
+
tl: [0, 0],
|
|
251
|
+
t: [-50, 0],
|
|
252
|
+
tr: [-100, 0],
|
|
253
|
+
l: [0, -50],
|
|
254
|
+
c: [-50, -50],
|
|
255
|
+
r: [-100, -50],
|
|
256
|
+
bl: [0, -100],
|
|
257
|
+
b: [-50, -100],
|
|
258
|
+
br: [-100, -100]
|
|
259
|
+
}, Xe = ["fade", "rise", "slide-start", "slide-end", "zoom"], Ye = ["spin", "float"], Rt = ["title", "text"];
|
|
260
|
+
function ie(t = {}) {
|
|
261
|
+
return {
|
|
262
|
+
x: 5,
|
|
263
|
+
y: 5,
|
|
264
|
+
w: 40,
|
|
265
|
+
size: 3,
|
|
266
|
+
pad: 0,
|
|
267
|
+
radius: 0,
|
|
268
|
+
tracking: 0,
|
|
269
|
+
rotate: 0,
|
|
270
|
+
gap: 1,
|
|
271
|
+
origin: "tl",
|
|
272
|
+
hidden: !1,
|
|
273
|
+
...t
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
function Ce(t = {}) {
|
|
277
|
+
return {
|
|
278
|
+
font: null,
|
|
279
|
+
weight: 400,
|
|
280
|
+
italic: !1,
|
|
281
|
+
uppercase: !1,
|
|
282
|
+
align: "start",
|
|
283
|
+
line_height: 1.2,
|
|
284
|
+
color: null,
|
|
285
|
+
background: null,
|
|
286
|
+
opacity: 1,
|
|
287
|
+
shadow: !1,
|
|
288
|
+
...t
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
function Se(t = {}) {
|
|
292
|
+
return { in: null, loop: null, delay: 0, duration: 600, ...t };
|
|
293
|
+
}
|
|
294
|
+
function De(t) {
|
|
295
|
+
return JSON.parse(JSON.stringify(t));
|
|
296
|
+
}
|
|
297
|
+
function dt(t = []) {
|
|
298
|
+
const c = new Set(t);
|
|
299
|
+
let r = "";
|
|
300
|
+
do
|
|
301
|
+
r = Math.random().toString(36).slice(2, 8).padEnd(6, "0");
|
|
302
|
+
while (c.has(r) || !/^[a-z0-9]{4,12}$/.test(r));
|
|
303
|
+
return r;
|
|
304
|
+
}
|
|
305
|
+
function Qe(t, c, r) {
|
|
306
|
+
const y = { id: dt(c), type: t, style: Ce(), motion: Se() };
|
|
307
|
+
switch (t) {
|
|
308
|
+
case "text":
|
|
309
|
+
return {
|
|
310
|
+
...y,
|
|
311
|
+
text: { [r]: "Text" },
|
|
312
|
+
tag: "p",
|
|
313
|
+
frames: { desktop: ie({ x: 10, y: 10, size: 2.4 }), mobile: null }
|
|
314
|
+
};
|
|
315
|
+
case "image":
|
|
316
|
+
return {
|
|
317
|
+
...y,
|
|
318
|
+
image: null,
|
|
319
|
+
frames: { desktop: ie({ x: 60, y: 10, w: 20 }), mobile: null }
|
|
320
|
+
};
|
|
321
|
+
case "button":
|
|
322
|
+
return {
|
|
323
|
+
...y,
|
|
324
|
+
text: { [r]: "Button" },
|
|
325
|
+
link: null,
|
|
326
|
+
variant: null,
|
|
327
|
+
frames: { desktop: ie({ x: 10, y: 25, w: 30, size: 1.2 }), mobile: null }
|
|
328
|
+
};
|
|
329
|
+
case "buttons":
|
|
330
|
+
return {
|
|
331
|
+
...y,
|
|
332
|
+
frames: { desktop: ie({ x: 6, y: 27, w: 50, size: 1.2 }), mobile: null }
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
function Dl(t) {
|
|
337
|
+
const c = [], r = (y) => {
|
|
338
|
+
const s = { ...y, id: dt(c) };
|
|
339
|
+
return c.push(s.id), s;
|
|
340
|
+
};
|
|
341
|
+
return [
|
|
342
|
+
r({
|
|
343
|
+
type: "text",
|
|
344
|
+
text: { [t]: "{title}" },
|
|
345
|
+
tag: "h2",
|
|
346
|
+
style: Ce({ weight: 700, line_height: 1.05, color: "#ffffff", shadow: !0 }),
|
|
347
|
+
frames: { desktop: ie({ x: 6, y: 6, w: 45, size: 4.2 }), mobile: null },
|
|
348
|
+
motion: Se({ in: "rise" })
|
|
349
|
+
}),
|
|
350
|
+
r({
|
|
351
|
+
type: "text",
|
|
352
|
+
text: { [t]: "{text}" },
|
|
353
|
+
tag: "p",
|
|
354
|
+
style: Ce({ line_height: 1.4, color: "#ffffff", shadow: !0 }),
|
|
355
|
+
frames: { desktop: ie({ x: 6, y: 18, w: 40, size: 1.4 }), mobile: null },
|
|
356
|
+
motion: Se({ in: "rise", delay: 150 })
|
|
357
|
+
}),
|
|
358
|
+
r({
|
|
359
|
+
type: "buttons",
|
|
360
|
+
style: Ce(),
|
|
361
|
+
frames: { desktop: ie({ x: 6, y: 28, w: 50, size: 1.2 }), mobile: null },
|
|
362
|
+
motion: Se({ in: "rise", delay: 300 })
|
|
363
|
+
})
|
|
364
|
+
];
|
|
365
|
+
}
|
|
366
|
+
function Kt(t, c, r, y) {
|
|
367
|
+
const s = t ?? {};
|
|
368
|
+
return ([.../* @__PURE__ */ new Set([c, ...r, ...Object.keys(s)])].map((T) => s[T]).find((T) => (T ?? "").trim() !== "") ?? "").replaceAll("{title}", y.title ?? "").replaceAll("{text}", y.text ?? "").trim();
|
|
369
|
+
}
|
|
370
|
+
function jt(t) {
|
|
371
|
+
return [...t.matchAll(/\{([a-z_.]+)\}/g)].map((c) => c[1] ?? "").filter((c) => !Rt.includes(c));
|
|
372
|
+
}
|
|
373
|
+
function et(t) {
|
|
374
|
+
if (typeof t != "string") return null;
|
|
375
|
+
if (/^#[0-9a-f]{6}([0-9a-f]{2})?$/.test(t)) return t;
|
|
376
|
+
const c = /^token:([a-z][a-z0-9-]{0,40})$/.exec(t);
|
|
377
|
+
return c ? `var(--site-color-${c[1]})` : null;
|
|
378
|
+
}
|
|
379
|
+
const ut = (t) => Math.round(t * 100) / 100;
|
|
380
|
+
function Jt(t, c) {
|
|
381
|
+
const r = {}, y = t.frames.desktop, s = t.frames.mobile ?? y;
|
|
382
|
+
for (const [T, C] of [
|
|
383
|
+
["", y],
|
|
384
|
+
["m-", s]
|
|
385
|
+
]) {
|
|
386
|
+
for (const V of Object.keys(ke))
|
|
387
|
+
r[`--${T}${V}`] = String(ut(C[V]));
|
|
388
|
+
const [p, k] = Ft[C.origin] ?? [0, 0];
|
|
389
|
+
r[`--${T}ox`] = `${p}%`, r[`--${T}oy`] = `${k}%`, r[`--${T}display`] = C.hidden ? "none" : "block";
|
|
390
|
+
}
|
|
391
|
+
r["--weight"] = String(t.style.weight), r["--leading"] = String(t.style.line_height), r["--opacity"] = String(t.style.opacity), r["--align"] = t.style.align;
|
|
392
|
+
const w = et(t.style.color), B = et(t.style.background);
|
|
393
|
+
return w && (r["--color"] = w), B && (r["--background"] = B), t.style.font && (r["--font"] = `var(--site-font-${t.style.font})`), r["z-index"] = String(c), r;
|
|
394
|
+
}
|
|
395
|
+
function Ht(t) {
|
|
396
|
+
const c = ["webx-banner__layer", `webx-banner__layer--${t.type}`];
|
|
397
|
+
return t.style.italic && c.push("is-italic"), t.style.uppercase && c.push("is-uppercase"), t.style.shadow && c.push("is-shadow"), t.style.background && c.push("has-background"), c;
|
|
398
|
+
}
|
|
399
|
+
function tt(t, c) {
|
|
400
|
+
if (typeof t == "number") return t > 0 ? t : c;
|
|
401
|
+
const r = /^\s*(\d+(?:\.\d+)?)\s*(?:\/\s*(\d+(?:\.\d+)?))?\s*$/.exec(t ?? "");
|
|
402
|
+
if (!r) return c;
|
|
403
|
+
const y = Number(r[1]) / Number(r[2] ?? 1);
|
|
404
|
+
return Number.isFinite(y) && y > 0 ? y : c;
|
|
405
|
+
}
|
|
406
|
+
function Zt(t, c) {
|
|
407
|
+
if (t > c) {
|
|
408
|
+
const y = c / t * 100;
|
|
409
|
+
return { left: (100 - y) / 2, top: 0, width: y, height: 100 };
|
|
410
|
+
}
|
|
411
|
+
const r = t / c * 100;
|
|
412
|
+
return { left: 0, top: (100 - r) / 2, width: 100, height: r };
|
|
413
|
+
}
|
|
414
|
+
function qt(t) {
|
|
415
|
+
const c = { ...t };
|
|
416
|
+
for (const r of Object.keys(ke)) {
|
|
417
|
+
const [y, s] = ke[r];
|
|
418
|
+
c[r] = ut(Math.min(s, Math.max(y, Number(c[r]) || 0)));
|
|
419
|
+
}
|
|
420
|
+
return c;
|
|
421
|
+
}
|
|
422
|
+
const Gt = { class: "wx-banner-layer-inspector" }, Xt = { class: "wx-banner-layer-inspector__head" }, Yt = { class: "wx-banner-layer-inspector__fields" }, Qt = { class: "wx-banner-layer-inspector__group" }, el = { class: "wx-banner-layer-inspector__title" }, tl = { class: "wx-banner-layer-inspector__grid" }, ll = ["aria-label"], al = ["aria-checked", "aria-label", "disabled", "onClick"], nl = {
|
|
423
|
+
key: 5,
|
|
424
|
+
class: "wx-banner-layer-inspector__group"
|
|
425
|
+
}, sl = { class: "wx-banner-layer-inspector__grid" }, ol = { class: "wx-banner-layer-inspector__switches" }, il = { class: "wx-banner-layer-inspector__color" }, rl = ["title", "aria-label", "disabled", "onClick"], dl = { class: "wx-banner-layer-inspector__group" }, ul = { class: "wx-banner-layer-inspector__grid" }, cl = /* @__PURE__ */ lt({
|
|
426
|
+
name: "WxBannerLayerInspector",
|
|
427
|
+
__name: "LayerInspector",
|
|
428
|
+
props: {
|
|
429
|
+
layer: {},
|
|
430
|
+
view: {},
|
|
431
|
+
tags: {},
|
|
432
|
+
variants: {},
|
|
433
|
+
palette: {},
|
|
434
|
+
disabled: { type: Boolean }
|
|
435
|
+
},
|
|
436
|
+
emits: ["update", "frame", "same-as-desktop", "delete"],
|
|
437
|
+
setup(t, { emit: c }) {
|
|
438
|
+
const r = t, y = c, s = it("webx-banners"), w = nt(), B = v(
|
|
439
|
+
() => r.view === "mobile" ? r.layer.frames.mobile ?? r.layer.frames.desktop : r.layer.frames.desktop
|
|
440
|
+
), T = v(() => r.view === "mobile" && r.layer.frames.mobile !== null);
|
|
441
|
+
function C(u) {
|
|
442
|
+
const a = De(r.layer);
|
|
443
|
+
u(a), y("update", a);
|
|
444
|
+
}
|
|
445
|
+
function p(u, a) {
|
|
446
|
+
C((o) => {
|
|
447
|
+
o.style[u] = a;
|
|
448
|
+
});
|
|
449
|
+
}
|
|
450
|
+
const k = v(() => r.layer.type === "text" || r.layer.type === "button"), V = v({
|
|
451
|
+
get: () => r.layer.text ?? {},
|
|
452
|
+
set: (u) => C((a) => {
|
|
453
|
+
a.text = u;
|
|
454
|
+
})
|
|
455
|
+
}), D = v({
|
|
456
|
+
get: () => r.layer.name ?? "",
|
|
457
|
+
set: (u) => C((a) => {
|
|
458
|
+
a.name = u;
|
|
459
|
+
})
|
|
460
|
+
}), N = v(() => jt(V.value[w.active.value] ?? "")), Q = v(() => N.value.map((u) => `{${u}}`).join(", ")), Z = v(() => {
|
|
461
|
+
const u = V.value, a = w.active.value;
|
|
462
|
+
return (u[a] ?? "").trim() !== "" ? null : [...w.list.value.map((o) => o.code), ...Object.keys(u)].find(
|
|
463
|
+
(o) => (u[o] ?? "").trim() !== ""
|
|
464
|
+
) ?? null;
|
|
465
|
+
});
|
|
466
|
+
function $e(u) {
|
|
467
|
+
const a = w.active.value, o = V.value[a] ?? "";
|
|
468
|
+
V.value = { ...V.value, [a]: `${o}${o === "" ? "" : " "}{${u}}` };
|
|
469
|
+
}
|
|
470
|
+
const A = v({
|
|
471
|
+
get: () => r.layer.image ?? null,
|
|
472
|
+
set: (u) => C((a) => {
|
|
473
|
+
a.image = u;
|
|
474
|
+
})
|
|
475
|
+
}), R = v({
|
|
476
|
+
get: () => r.layer.link ?? null,
|
|
477
|
+
set: (u) => C((a) => {
|
|
478
|
+
a.link = u;
|
|
479
|
+
})
|
|
480
|
+
}), q = (u, a) => v({
|
|
481
|
+
get: () => u(),
|
|
482
|
+
set: (o) => a(o)
|
|
483
|
+
}), G = q(
|
|
484
|
+
() => r.layer.tag ?? "p",
|
|
485
|
+
(u) => C((a) => {
|
|
486
|
+
a.tag = u;
|
|
487
|
+
})
|
|
488
|
+
), re = q(
|
|
489
|
+
() => r.layer.variant ?? r.variants[0]?.value ?? null,
|
|
490
|
+
(u) => C((a) => {
|
|
491
|
+
a.variant = u;
|
|
492
|
+
})
|
|
493
|
+
), le = q(
|
|
494
|
+
() => r.layer.style.font ?? "site",
|
|
495
|
+
(u) => p("font", u === "heading" || u === "body" ? u : null)
|
|
496
|
+
), ae = q(
|
|
497
|
+
() => r.layer.style.weight,
|
|
498
|
+
(u) => p("weight", Number(u))
|
|
499
|
+
), M = v({
|
|
500
|
+
get: () => r.layer.style.align,
|
|
501
|
+
set: (u) => p("align", u)
|
|
502
|
+
}), K = q(
|
|
503
|
+
() => r.layer.motion.in ?? "none",
|
|
504
|
+
(u) => C((a) => {
|
|
505
|
+
a.motion.in = Xe.includes(u) ? u : null;
|
|
506
|
+
})
|
|
507
|
+
), j = q(
|
|
508
|
+
() => r.layer.motion.loop ?? "none",
|
|
509
|
+
(u) => C((a) => {
|
|
510
|
+
a.motion.loop = Ye.includes(u) ? u : null;
|
|
511
|
+
})
|
|
512
|
+
), Oe = v(() => {
|
|
513
|
+
switch (r.layer.type) {
|
|
514
|
+
case "image":
|
|
515
|
+
return ["x", "y", "w", "radius", "rotate"];
|
|
516
|
+
case "buttons":
|
|
517
|
+
return ["x", "y", "w", "size", "gap", "rotate"];
|
|
518
|
+
default:
|
|
519
|
+
return ["x", "y", "w", "size", "pad", "radius", "tracking", "rotate"];
|
|
520
|
+
}
|
|
521
|
+
}), de = {
|
|
522
|
+
x: 0.05,
|
|
523
|
+
y: 0.05,
|
|
524
|
+
w: 0.5,
|
|
525
|
+
size: 0.05,
|
|
526
|
+
pad: 0.05,
|
|
527
|
+
radius: 0.1,
|
|
528
|
+
tracking: 0.01,
|
|
529
|
+
rotate: 1,
|
|
530
|
+
gap: 0.1
|
|
531
|
+
};
|
|
532
|
+
function pe(u, a) {
|
|
533
|
+
a === null || Number.isNaN(a) || y("frame", { [u]: a });
|
|
534
|
+
}
|
|
535
|
+
function Be(u) {
|
|
536
|
+
y("frame", { origin: u });
|
|
537
|
+
}
|
|
538
|
+
const Le = v(() => [
|
|
539
|
+
{ value: "site", label: s("layers.font-site") },
|
|
540
|
+
{ value: "heading", label: s("layers.font-heading") },
|
|
541
|
+
{ value: "body", label: s("layers.font-body") }
|
|
542
|
+
]), Ne = [100, 200, 300, 400, 500, 600, 700, 800, 900].map((u) => ({
|
|
543
|
+
value: u,
|
|
544
|
+
label: String(u)
|
|
545
|
+
})), Ve = v(() => [
|
|
546
|
+
{ value: "start", label: s("layers.align-start") },
|
|
547
|
+
{ value: "center", label: s("layers.align-center") },
|
|
548
|
+
{ value: "end", label: s("layers.align-end") }
|
|
549
|
+
]), X = v(() => [
|
|
550
|
+
{ value: "none", label: s("layers.motion-none") },
|
|
551
|
+
...Xe.map((u) => ({ value: u, label: s(`layers.in-${u}`) }))
|
|
552
|
+
]), ue = v(() => [
|
|
553
|
+
{ value: "none", label: s("layers.motion-none") },
|
|
554
|
+
...Ye.map((u) => ({ value: u, label: s(`layers.loop-${u}`) }))
|
|
555
|
+
]);
|
|
556
|
+
function Pe(u) {
|
|
557
|
+
const a = r.layer.style[u];
|
|
558
|
+
return a === null ? null : a.startsWith("token:") ? r.palette.find((o) => `token:${o.key}` === a)?.value ?? null : a;
|
|
559
|
+
}
|
|
560
|
+
function fe(u, a) {
|
|
561
|
+
const o = typeof a == "string" && /^#[0-9a-f]{6}([0-9a-f]{2})?$/i.test(a) ? a.toLowerCase() : null;
|
|
562
|
+
p(u, o);
|
|
563
|
+
}
|
|
564
|
+
return (u, a) => (f(), x("div", Gt, [
|
|
565
|
+
g("div", Xt, [
|
|
566
|
+
d(e(Ze), {
|
|
567
|
+
modelValue: D.value,
|
|
568
|
+
"onUpdate:modelValue": a[0] || (a[0] = (o) => D.value = o),
|
|
569
|
+
size: "sm",
|
|
570
|
+
placeholder: e(s)("layers.name"),
|
|
571
|
+
"aria-label": e(s)("layers.name"),
|
|
572
|
+
disabled: t.disabled
|
|
573
|
+
}, null, 8, ["modelValue", "placeholder", "aria-label", "disabled"]),
|
|
574
|
+
d(e(E), {
|
|
575
|
+
size: "sm",
|
|
576
|
+
variant: "outline",
|
|
577
|
+
danger: "",
|
|
578
|
+
disabled: t.disabled,
|
|
579
|
+
onClick: a[1] || (a[1] = (o) => y("delete"))
|
|
580
|
+
}, {
|
|
581
|
+
icon: m(() => [
|
|
582
|
+
d(e(F), { name: "trash" })
|
|
583
|
+
]),
|
|
584
|
+
default: m(() => [
|
|
585
|
+
O(" " + z(e(s)("layers.delete")), 1)
|
|
586
|
+
]),
|
|
587
|
+
_: 1
|
|
588
|
+
}, 8, ["disabled"])
|
|
589
|
+
]),
|
|
590
|
+
k.value ? (f(), x(H, { key: 0 }, [
|
|
591
|
+
d(e(S), {
|
|
592
|
+
label: t.layer.type === "button" ? e(s)("layers.label") : e(s)("layers.words"),
|
|
593
|
+
help: Z.value ? e(s)("layers.falls-back", { code: Z.value.toUpperCase() }) : e(s)("layers.words-help")
|
|
594
|
+
}, {
|
|
595
|
+
default: m(() => [
|
|
596
|
+
t.layer.type === "text" ? (f(), W(e(Lt), {
|
|
597
|
+
key: 0,
|
|
598
|
+
modelValue: V.value,
|
|
599
|
+
"onUpdate:modelValue": a[2] || (a[2] = (o) => V.value = o),
|
|
600
|
+
localized: "",
|
|
601
|
+
rows: 2,
|
|
602
|
+
disabled: t.disabled
|
|
603
|
+
}, null, 8, ["modelValue", "disabled"])) : (f(), W(e(Ze), {
|
|
604
|
+
key: 1,
|
|
605
|
+
modelValue: V.value,
|
|
606
|
+
"onUpdate:modelValue": a[3] || (a[3] = (o) => V.value = o),
|
|
607
|
+
localized: "",
|
|
608
|
+
disabled: t.disabled
|
|
609
|
+
}, null, 8, ["modelValue", "disabled"]))
|
|
610
|
+
]),
|
|
611
|
+
_: 1
|
|
612
|
+
}, 8, ["label", "help"]),
|
|
613
|
+
g("div", Yt, [
|
|
614
|
+
d(e(E), {
|
|
615
|
+
size: "sm",
|
|
616
|
+
variant: "text",
|
|
617
|
+
disabled: t.disabled,
|
|
618
|
+
onClick: a[4] || (a[4] = (o) => $e("title"))
|
|
619
|
+
}, {
|
|
620
|
+
default: m(() => [...a[24] || (a[24] = [
|
|
621
|
+
O("+ {title}", -1)
|
|
622
|
+
])]),
|
|
623
|
+
_: 1
|
|
624
|
+
}, 8, ["disabled"]),
|
|
625
|
+
d(e(E), {
|
|
626
|
+
size: "sm",
|
|
627
|
+
variant: "text",
|
|
628
|
+
disabled: t.disabled,
|
|
629
|
+
onClick: a[5] || (a[5] = (o) => $e("text"))
|
|
630
|
+
}, {
|
|
631
|
+
default: m(() => [...a[25] || (a[25] = [
|
|
632
|
+
O("+ {text}", -1)
|
|
633
|
+
])]),
|
|
634
|
+
_: 1
|
|
635
|
+
}, 8, ["disabled"])
|
|
636
|
+
]),
|
|
637
|
+
N.value.length > 0 ? (f(), W(e(Y), {
|
|
638
|
+
key: 0,
|
|
639
|
+
size: "sm",
|
|
640
|
+
tone: "warning"
|
|
641
|
+
}, {
|
|
642
|
+
default: m(() => [
|
|
643
|
+
O(z(e(s)("layers.unknown-field", { fields: Q.value })), 1)
|
|
644
|
+
]),
|
|
645
|
+
_: 1
|
|
646
|
+
})) : I("", !0)
|
|
647
|
+
], 64)) : I("", !0),
|
|
648
|
+
t.layer.type === "text" ? (f(), W(e(S), {
|
|
649
|
+
key: 1,
|
|
650
|
+
label: e(s)("layers.tag")
|
|
651
|
+
}, {
|
|
652
|
+
default: m(() => [
|
|
653
|
+
d(e(ye), {
|
|
654
|
+
modelValue: e(G),
|
|
655
|
+
"onUpdate:modelValue": a[6] || (a[6] = (o) => me(G) ? G.value = o : null),
|
|
656
|
+
options: t.tags,
|
|
657
|
+
size: "sm",
|
|
658
|
+
disabled: t.disabled
|
|
659
|
+
}, null, 8, ["modelValue", "options", "disabled"])
|
|
660
|
+
]),
|
|
661
|
+
_: 1
|
|
662
|
+
}, 8, ["label"])) : I("", !0),
|
|
663
|
+
t.layer.type === "image" ? (f(), W(e(S), {
|
|
664
|
+
key: 2,
|
|
665
|
+
label: e(s)("layers.image")
|
|
666
|
+
}, {
|
|
667
|
+
default: m(() => [
|
|
668
|
+
d(e(Wt), {
|
|
669
|
+
modelValue: A.value,
|
|
670
|
+
"onUpdate:modelValue": a[7] || (a[7] = (o) => A.value = o),
|
|
671
|
+
accept: "image",
|
|
672
|
+
aspect: null,
|
|
673
|
+
height: 120,
|
|
674
|
+
disabled: t.disabled
|
|
675
|
+
}, null, 8, ["modelValue", "disabled"])
|
|
676
|
+
]),
|
|
677
|
+
_: 1
|
|
678
|
+
}, 8, ["label"])) : I("", !0),
|
|
679
|
+
t.layer.type === "button" ? (f(), x(H, { key: 3 }, [
|
|
680
|
+
d(e(S), {
|
|
681
|
+
label: e(s)("layers.link")
|
|
682
|
+
}, {
|
|
683
|
+
default: m(() => [
|
|
684
|
+
d(e(Ut), {
|
|
685
|
+
modelValue: R.value,
|
|
686
|
+
"onUpdate:modelValue": a[8] || (a[8] = (o) => R.value = o),
|
|
687
|
+
"allow-none": !1,
|
|
688
|
+
disabled: t.disabled
|
|
689
|
+
}, null, 8, ["modelValue", "disabled"])
|
|
690
|
+
]),
|
|
691
|
+
_: 1
|
|
692
|
+
}, 8, ["label"]),
|
|
693
|
+
d(e(S), {
|
|
694
|
+
label: e(s)("layers.variant")
|
|
695
|
+
}, {
|
|
696
|
+
default: m(() => [
|
|
697
|
+
d(e(ye), {
|
|
698
|
+
modelValue: e(re),
|
|
699
|
+
"onUpdate:modelValue": a[9] || (a[9] = (o) => me(re) ? re.value = o : null),
|
|
700
|
+
options: t.variants,
|
|
701
|
+
size: "sm",
|
|
702
|
+
disabled: t.disabled
|
|
703
|
+
}, null, 8, ["modelValue", "options", "disabled"])
|
|
704
|
+
]),
|
|
705
|
+
_: 1
|
|
706
|
+
}, 8, ["label"])
|
|
707
|
+
], 64)) : I("", !0),
|
|
708
|
+
t.layer.type === "buttons" ? (f(), W(e(Y), {
|
|
709
|
+
key: 4,
|
|
710
|
+
size: "sm",
|
|
711
|
+
tone: "muted"
|
|
712
|
+
}, {
|
|
713
|
+
default: m(() => [
|
|
714
|
+
O(z(e(s)("layers.buttons-help")), 1)
|
|
715
|
+
]),
|
|
716
|
+
_: 1
|
|
717
|
+
})) : I("", !0),
|
|
718
|
+
g("section", Qt, [
|
|
719
|
+
g("div", el, [
|
|
720
|
+
d(e(Y), {
|
|
721
|
+
size: "sm",
|
|
722
|
+
strong: ""
|
|
723
|
+
}, {
|
|
724
|
+
default: m(() => [
|
|
725
|
+
O(z(t.view === "mobile" ? T.value ? e(s)("layers.geometry-mobile-own") : e(s)("layers.geometry-mobile-same") : e(s)("layers.geometry-desktop")), 1)
|
|
726
|
+
]),
|
|
727
|
+
_: 1
|
|
728
|
+
}),
|
|
729
|
+
T.value ? (f(), W(e(E), {
|
|
730
|
+
key: 0,
|
|
731
|
+
size: "sm",
|
|
732
|
+
variant: "text",
|
|
733
|
+
disabled: t.disabled,
|
|
734
|
+
onClick: a[10] || (a[10] = (o) => y("same-as-desktop"))
|
|
735
|
+
}, {
|
|
736
|
+
default: m(() => [
|
|
737
|
+
O(z(e(s)("layers.same-as-desktop")), 1)
|
|
738
|
+
]),
|
|
739
|
+
_: 1
|
|
740
|
+
}, 8, ["disabled"])) : I("", !0)
|
|
741
|
+
]),
|
|
742
|
+
d(e(Y), {
|
|
743
|
+
size: "sm",
|
|
744
|
+
tone: "muted"
|
|
745
|
+
}, {
|
|
746
|
+
default: m(() => [
|
|
747
|
+
O(z(e(s)("layers.unit")), 1)
|
|
748
|
+
]),
|
|
749
|
+
_: 1
|
|
750
|
+
}),
|
|
751
|
+
g("div", tl, [
|
|
752
|
+
(f(!0), x(H, null, oe(Oe.value, (o) => (f(), W(e(S), {
|
|
753
|
+
key: o,
|
|
754
|
+
label: e(s)(`layers.${o}`)
|
|
755
|
+
}, {
|
|
756
|
+
default: m(() => [
|
|
757
|
+
d(e(ge), {
|
|
758
|
+
"model-value": B.value[o],
|
|
759
|
+
min: e(ke)[o][0],
|
|
760
|
+
max: e(ke)[o][1],
|
|
761
|
+
step: de[o],
|
|
762
|
+
precision: 2,
|
|
763
|
+
size: "sm",
|
|
764
|
+
disabled: t.disabled,
|
|
765
|
+
"onUpdate:modelValue": (_) => pe(o, _ ?? null)
|
|
766
|
+
}, null, 8, ["model-value", "min", "max", "step", "disabled", "onUpdate:modelValue"])
|
|
767
|
+
]),
|
|
768
|
+
_: 2
|
|
769
|
+
}, 1032, ["label"]))), 128))
|
|
770
|
+
]),
|
|
771
|
+
d(e(S), {
|
|
772
|
+
label: e(s)("layers.origin"),
|
|
773
|
+
help: e(s)("layers.origin-help")
|
|
774
|
+
}, {
|
|
775
|
+
default: m(() => [
|
|
776
|
+
g("div", {
|
|
777
|
+
class: "wx-banner-layer-inspector__origins",
|
|
778
|
+
role: "radiogroup",
|
|
779
|
+
"aria-label": e(s)("layers.origin")
|
|
780
|
+
}, [
|
|
781
|
+
(f(!0), x(H, null, oe(e(Mt), (o) => (f(), x("button", {
|
|
782
|
+
key: o,
|
|
783
|
+
type: "button",
|
|
784
|
+
role: "radio",
|
|
785
|
+
"aria-checked": B.value.origin === o,
|
|
786
|
+
"aria-label": o,
|
|
787
|
+
disabled: t.disabled,
|
|
788
|
+
class: J([
|
|
789
|
+
"wx-banner-layer-inspector__origin",
|
|
790
|
+
{ "is-active": B.value.origin === o }
|
|
791
|
+
]),
|
|
792
|
+
onClick: (_) => Be(o)
|
|
793
|
+
}, null, 10, al))), 128))
|
|
794
|
+
], 8, ll)
|
|
795
|
+
]),
|
|
796
|
+
_: 1
|
|
797
|
+
}, 8, ["label", "help"]),
|
|
798
|
+
d(e(_e), {
|
|
799
|
+
"model-value": B.value.hidden,
|
|
800
|
+
label: e(s)("layers.hidden-here"),
|
|
801
|
+
disabled: t.disabled,
|
|
802
|
+
"onUpdate:modelValue": a[11] || (a[11] = (o) => y("frame", { hidden: o === !0 }))
|
|
803
|
+
}, null, 8, ["model-value", "label", "disabled"])
|
|
804
|
+
]),
|
|
805
|
+
t.layer.type !== "image" ? (f(), x("section", nl, [
|
|
806
|
+
d(e(Y), {
|
|
807
|
+
size: "sm",
|
|
808
|
+
strong: ""
|
|
809
|
+
}, {
|
|
810
|
+
default: m(() => [
|
|
811
|
+
O(z(e(s)("layers.look")), 1)
|
|
812
|
+
]),
|
|
813
|
+
_: 1
|
|
814
|
+
}),
|
|
815
|
+
g("div", sl, [
|
|
816
|
+
d(e(S), {
|
|
817
|
+
label: e(s)("layers.font")
|
|
818
|
+
}, {
|
|
819
|
+
default: m(() => [
|
|
820
|
+
d(e(ye), {
|
|
821
|
+
modelValue: e(le),
|
|
822
|
+
"onUpdate:modelValue": a[12] || (a[12] = (o) => me(le) ? le.value = o : null),
|
|
823
|
+
options: Le.value,
|
|
824
|
+
size: "sm",
|
|
825
|
+
disabled: t.disabled
|
|
826
|
+
}, null, 8, ["modelValue", "options", "disabled"])
|
|
827
|
+
]),
|
|
828
|
+
_: 1
|
|
829
|
+
}, 8, ["label"]),
|
|
830
|
+
d(e(S), {
|
|
831
|
+
label: e(s)("layers.weight")
|
|
832
|
+
}, {
|
|
833
|
+
default: m(() => [
|
|
834
|
+
d(e(ye), {
|
|
835
|
+
modelValue: e(ae),
|
|
836
|
+
"onUpdate:modelValue": a[13] || (a[13] = (o) => me(ae) ? ae.value = o : null),
|
|
837
|
+
options: e(Ne),
|
|
838
|
+
size: "sm",
|
|
839
|
+
disabled: t.disabled
|
|
840
|
+
}, null, 8, ["modelValue", "options", "disabled"])
|
|
841
|
+
]),
|
|
842
|
+
_: 1
|
|
843
|
+
}, 8, ["label"]),
|
|
844
|
+
d(e(S), {
|
|
845
|
+
label: e(s)("layers.line-height")
|
|
846
|
+
}, {
|
|
847
|
+
default: m(() => [
|
|
848
|
+
d(e(ge), {
|
|
849
|
+
"model-value": t.layer.style.line_height,
|
|
850
|
+
min: 0.8,
|
|
851
|
+
max: 3,
|
|
852
|
+
step: 0.05,
|
|
853
|
+
precision: 2,
|
|
854
|
+
size: "sm",
|
|
855
|
+
disabled: t.disabled,
|
|
856
|
+
"onUpdate:modelValue": a[14] || (a[14] = (o) => o != null && p("line_height", o))
|
|
857
|
+
}, null, 8, ["model-value", "disabled"])
|
|
858
|
+
]),
|
|
859
|
+
_: 1
|
|
860
|
+
}, 8, ["label"]),
|
|
861
|
+
d(e(S), {
|
|
862
|
+
label: e(s)("layers.opacity")
|
|
863
|
+
}, {
|
|
864
|
+
default: m(() => [
|
|
865
|
+
d(e(ge), {
|
|
866
|
+
"model-value": t.layer.style.opacity,
|
|
867
|
+
min: 0,
|
|
868
|
+
max: 1,
|
|
869
|
+
step: 0.05,
|
|
870
|
+
precision: 2,
|
|
871
|
+
size: "sm",
|
|
872
|
+
disabled: t.disabled,
|
|
873
|
+
"onUpdate:modelValue": a[15] || (a[15] = (o) => o != null && p("opacity", o))
|
|
874
|
+
}, null, 8, ["model-value", "disabled"])
|
|
875
|
+
]),
|
|
876
|
+
_: 1
|
|
877
|
+
}, 8, ["label"])
|
|
878
|
+
]),
|
|
879
|
+
d(e(S), {
|
|
880
|
+
label: e(s)("layers.align")
|
|
881
|
+
}, {
|
|
882
|
+
default: m(() => [
|
|
883
|
+
d(e(st), {
|
|
884
|
+
modelValue: M.value,
|
|
885
|
+
"onUpdate:modelValue": a[16] || (a[16] = (o) => M.value = o),
|
|
886
|
+
options: Ve.value,
|
|
887
|
+
size: "sm",
|
|
888
|
+
disabled: t.disabled
|
|
889
|
+
}, null, 8, ["modelValue", "options", "disabled"])
|
|
890
|
+
]),
|
|
891
|
+
_: 1
|
|
892
|
+
}, 8, ["label"]),
|
|
893
|
+
g("div", ol, [
|
|
894
|
+
d(e(_e), {
|
|
895
|
+
"model-value": t.layer.style.italic,
|
|
896
|
+
label: e(s)("layers.italic"),
|
|
897
|
+
disabled: t.disabled,
|
|
898
|
+
"onUpdate:modelValue": a[17] || (a[17] = (o) => p("italic", o === !0))
|
|
899
|
+
}, null, 8, ["model-value", "label", "disabled"]),
|
|
900
|
+
d(e(_e), {
|
|
901
|
+
"model-value": t.layer.style.uppercase,
|
|
902
|
+
label: e(s)("layers.uppercase"),
|
|
903
|
+
disabled: t.disabled,
|
|
904
|
+
"onUpdate:modelValue": a[18] || (a[18] = (o) => p("uppercase", o === !0))
|
|
905
|
+
}, null, 8, ["model-value", "label", "disabled"]),
|
|
906
|
+
d(e(_e), {
|
|
907
|
+
"model-value": t.layer.style.shadow,
|
|
908
|
+
label: e(s)("layers.shadow"),
|
|
909
|
+
disabled: t.disabled,
|
|
910
|
+
"onUpdate:modelValue": a[19] || (a[19] = (o) => p("shadow", o === !0))
|
|
911
|
+
}, null, 8, ["model-value", "label", "disabled"])
|
|
912
|
+
]),
|
|
913
|
+
(f(), x(H, null, oe(["color", "background"], (o) => d(e(S), {
|
|
914
|
+
key: o,
|
|
915
|
+
label: e(s)(`layers.${o}`)
|
|
916
|
+
}, {
|
|
917
|
+
default: m(() => [
|
|
918
|
+
g("div", il, [
|
|
919
|
+
(f(!0), x(H, null, oe(t.palette, (_) => (f(), x("button", {
|
|
920
|
+
key: _.key,
|
|
921
|
+
type: "button",
|
|
922
|
+
title: _.key,
|
|
923
|
+
"aria-label": _.key,
|
|
924
|
+
disabled: t.disabled,
|
|
925
|
+
class: J([
|
|
926
|
+
"wx-banner-layer-inspector__swatch",
|
|
927
|
+
{ "is-active": t.layer.style[o] === `token:${_.key}` }
|
|
928
|
+
]),
|
|
929
|
+
style: xe({ background: _.value }),
|
|
930
|
+
onClick: (ne) => p(o, `token:${_.key}`)
|
|
931
|
+
}, null, 14, rl))), 128)),
|
|
932
|
+
d(e(Nt), {
|
|
933
|
+
"model-value": Pe(o),
|
|
934
|
+
clearable: "",
|
|
935
|
+
size: "sm",
|
|
936
|
+
disabled: t.disabled,
|
|
937
|
+
"onUpdate:modelValue": (_) => fe(o, _)
|
|
938
|
+
}, null, 8, ["model-value", "disabled", "onUpdate:modelValue"])
|
|
939
|
+
])
|
|
940
|
+
]),
|
|
941
|
+
_: 2
|
|
942
|
+
}, 1032, ["label"])), 64))
|
|
943
|
+
])) : I("", !0),
|
|
944
|
+
g("section", dl, [
|
|
945
|
+
d(e(Y), {
|
|
946
|
+
size: "sm",
|
|
947
|
+
strong: ""
|
|
948
|
+
}, {
|
|
949
|
+
default: m(() => [
|
|
950
|
+
O(z(e(s)("layers.motion")), 1)
|
|
951
|
+
]),
|
|
952
|
+
_: 1
|
|
953
|
+
}),
|
|
954
|
+
g("div", ul, [
|
|
955
|
+
d(e(S), {
|
|
956
|
+
label: e(s)("layers.entrance")
|
|
957
|
+
}, {
|
|
958
|
+
default: m(() => [
|
|
959
|
+
d(e(ye), {
|
|
960
|
+
modelValue: e(K),
|
|
961
|
+
"onUpdate:modelValue": a[20] || (a[20] = (o) => me(K) ? K.value = o : null),
|
|
962
|
+
options: X.value,
|
|
963
|
+
size: "sm",
|
|
964
|
+
disabled: t.disabled
|
|
965
|
+
}, null, 8, ["modelValue", "options", "disabled"])
|
|
966
|
+
]),
|
|
967
|
+
_: 1
|
|
968
|
+
}, 8, ["label"]),
|
|
969
|
+
d(e(S), {
|
|
970
|
+
label: e(s)("layers.loop")
|
|
971
|
+
}, {
|
|
972
|
+
default: m(() => [
|
|
973
|
+
d(e(ye), {
|
|
974
|
+
modelValue: e(j),
|
|
975
|
+
"onUpdate:modelValue": a[21] || (a[21] = (o) => me(j) ? j.value = o : null),
|
|
976
|
+
options: ue.value,
|
|
977
|
+
size: "sm",
|
|
978
|
+
disabled: t.disabled
|
|
979
|
+
}, null, 8, ["modelValue", "options", "disabled"])
|
|
980
|
+
]),
|
|
981
|
+
_: 1
|
|
982
|
+
}, 8, ["label"]),
|
|
983
|
+
d(e(S), {
|
|
984
|
+
label: e(s)("layers.delay")
|
|
985
|
+
}, {
|
|
986
|
+
default: m(() => [
|
|
987
|
+
d(e(ge), {
|
|
988
|
+
"model-value": t.layer.motion.delay,
|
|
989
|
+
min: 0,
|
|
990
|
+
max: 1e4,
|
|
991
|
+
step: 50,
|
|
992
|
+
size: "sm",
|
|
993
|
+
disabled: t.disabled || t.layer.motion.in === null,
|
|
994
|
+
"onUpdate:modelValue": a[22] || (a[22] = (o) => o != null && C((_) => _.motion.delay = o))
|
|
995
|
+
}, null, 8, ["model-value", "disabled"])
|
|
996
|
+
]),
|
|
997
|
+
_: 1
|
|
998
|
+
}, 8, ["label"]),
|
|
999
|
+
d(e(S), {
|
|
1000
|
+
label: e(s)("layers.duration")
|
|
1001
|
+
}, {
|
|
1002
|
+
default: m(() => [
|
|
1003
|
+
d(e(ge), {
|
|
1004
|
+
"model-value": t.layer.motion.duration,
|
|
1005
|
+
min: 100,
|
|
1006
|
+
max: 5e3,
|
|
1007
|
+
step: 50,
|
|
1008
|
+
size: "sm",
|
|
1009
|
+
disabled: t.disabled || t.layer.motion.in === null,
|
|
1010
|
+
"onUpdate:modelValue": a[23] || (a[23] = (o) => o != null && C((_) => _.motion.duration = o))
|
|
1011
|
+
}, null, 8, ["model-value", "disabled"])
|
|
1012
|
+
]),
|
|
1013
|
+
_: 1
|
|
1014
|
+
}, 8, ["label"])
|
|
1015
|
+
])
|
|
1016
|
+
])
|
|
1017
|
+
]));
|
|
1018
|
+
}
|
|
1019
|
+
}), ct = (t, c) => {
|
|
1020
|
+
const r = t.__vccOpts || t;
|
|
1021
|
+
for (const [y, s] of c)
|
|
1022
|
+
r[y] = s;
|
|
1023
|
+
return r;
|
|
1024
|
+
}, bl = /* @__PURE__ */ ct(cl, [["__scopeId", "data-v-32ff51cd"]]), ml = { class: "wx-banner-layers__bar" }, yl = { class: "wx-banner-layers__tools" }, pl = { class: "wx-banner-layers__body" }, fl = { class: "wx-banner-layers__main" }, vl = ["aria-label"], hl = { class: "webx-banner__picture" }, wl = ["src"], gl = {
|
|
1025
|
+
key: 1,
|
|
1026
|
+
class: "wx-banner-layers__empty"
|
|
1027
|
+
}, xl = {
|
|
1028
|
+
key: 0,
|
|
1029
|
+
class: "webx-banner__inner wx-banner-layers__words"
|
|
1030
|
+
}, kl = ["src"], $l = {
|
|
1031
|
+
key: 2,
|
|
1032
|
+
class: "webx-banner__inner webx-banner__buttons"
|
|
1033
|
+
}, Vl = {
|
|
1034
|
+
key: 3,
|
|
1035
|
+
class: "webx-banner__inner webx-banner__buttons"
|
|
1036
|
+
}, zl = {
|
|
1037
|
+
key: 0,
|
|
1038
|
+
class: "webx-banner__button"
|
|
1039
|
+
}, _l = ["onPointerdown"], Cl = ["onPointerdown"], Sl = ["onClick"], Ol = { class: "wx-banner-layers__name" }, Bl = 3, Ll = 6, Nl = /* @__PURE__ */ lt({
|
|
1040
|
+
name: "WxBannerLayers",
|
|
1041
|
+
__name: "LayersField",
|
|
1042
|
+
props: {
|
|
1043
|
+
modelValue: {},
|
|
1044
|
+
disabled: { type: Boolean }
|
|
1045
|
+
},
|
|
1046
|
+
emits: ["update:modelValue"],
|
|
1047
|
+
setup(t, { emit: c }) {
|
|
1048
|
+
const r = t, y = c, s = ot(), w = Et(), B = nt(), T = Tt(s), C = It(s);
|
|
1049
|
+
At();
|
|
1050
|
+
const p = it("webx-banners"), k = v(() => r.modelValue ?? []), V = v(() => w?.place.value?.layers ?? null), D = te("desktop"), N = te(null), Q = v(() => k.value.find((l) => l.id === N.value) ?? null), Z = v(() => {
|
|
1051
|
+
const l = B.active.value;
|
|
1052
|
+
return B.list.value.some((n) => n.code === l) ? l : B.list.value[0]?.code ?? "en";
|
|
1053
|
+
}), $e = v(() => B.list.value.map((l) => l.code)), A = te([]), R = te([]);
|
|
1054
|
+
function q() {
|
|
1055
|
+
A.value = [...A.value.slice(-99), JSON.stringify(k.value)], R.value = [];
|
|
1056
|
+
}
|
|
1057
|
+
function G(l, n = !0) {
|
|
1058
|
+
n && q(), y("update:modelValue", l);
|
|
1059
|
+
}
|
|
1060
|
+
function re() {
|
|
1061
|
+
const l = A.value.at(-1);
|
|
1062
|
+
l !== void 0 && (R.value = [...R.value, JSON.stringify(k.value)], A.value = A.value.slice(0, -1), y("update:modelValue", JSON.parse(l)));
|
|
1063
|
+
}
|
|
1064
|
+
function le() {
|
|
1065
|
+
const l = R.value.at(-1);
|
|
1066
|
+
l !== void 0 && (A.value = [...A.value, JSON.stringify(k.value)], R.value = R.value.slice(0, -1), y("update:modelValue", JSON.parse(l)));
|
|
1067
|
+
}
|
|
1068
|
+
function ae(l, n, i = !0) {
|
|
1069
|
+
G(
|
|
1070
|
+
k.value.map((b) => b.id === l ? n(De(b)) : b),
|
|
1071
|
+
i
|
|
1072
|
+
);
|
|
1073
|
+
}
|
|
1074
|
+
function M(l, n = D.value) {
|
|
1075
|
+
return n === "mobile" ? l.frames.mobile ?? l.frames.desktop : l.frames.desktop;
|
|
1076
|
+
}
|
|
1077
|
+
function K(l, n, i = !0) {
|
|
1078
|
+
ae(
|
|
1079
|
+
l,
|
|
1080
|
+
(b) => {
|
|
1081
|
+
const h = qt({ ...M(b), ...n });
|
|
1082
|
+
return D.value === "mobile" ? b.frames.mobile = h : b.frames.desktop = h, b;
|
|
1083
|
+
},
|
|
1084
|
+
i
|
|
1085
|
+
);
|
|
1086
|
+
}
|
|
1087
|
+
let j = { id: "", at: 0 };
|
|
1088
|
+
function Oe(l) {
|
|
1089
|
+
const n = Date.now(), i = j.id === l.id && n - j.at < 800;
|
|
1090
|
+
j = { id: l.id, at: n }, ae(l.id, () => l, !i);
|
|
1091
|
+
}
|
|
1092
|
+
function de(l) {
|
|
1093
|
+
const n = Qe(
|
|
1094
|
+
l,
|
|
1095
|
+
k.value.map((i) => i.id),
|
|
1096
|
+
Z.value
|
|
1097
|
+
);
|
|
1098
|
+
G([n, ...k.value]), N.value = n.id;
|
|
1099
|
+
}
|
|
1100
|
+
function pe(l) {
|
|
1101
|
+
G(k.value.filter((n) => n.id !== l)), N.value === l && (N.value = null);
|
|
1102
|
+
}
|
|
1103
|
+
function Be(l) {
|
|
1104
|
+
const n = k.value.findIndex((P) => P.id === l), i = k.value[n];
|
|
1105
|
+
if (!i || i.type === "buttons") return;
|
|
1106
|
+
const b = De(i);
|
|
1107
|
+
b.id = Qe(
|
|
1108
|
+
"text",
|
|
1109
|
+
k.value.map((P) => P.id),
|
|
1110
|
+
Z.value
|
|
1111
|
+
).id, b.frames.desktop = {
|
|
1112
|
+
...b.frames.desktop,
|
|
1113
|
+
x: b.frames.desktop.x + 2,
|
|
1114
|
+
y: b.frames.desktop.y + 2
|
|
1115
|
+
};
|
|
1116
|
+
const h = [...k.value];
|
|
1117
|
+
h.splice(n, 0, b), G(h), N.value = b.id;
|
|
1118
|
+
}
|
|
1119
|
+
function Le(l) {
|
|
1120
|
+
K(l.id, { hidden: !M(l).hidden });
|
|
1121
|
+
}
|
|
1122
|
+
const Ne = v(() => k.value.some((l) => l.type === "buttons")), Ve = v({
|
|
1123
|
+
get: () => k.value,
|
|
1124
|
+
set: (l) => G(l)
|
|
1125
|
+
}), X = _t({});
|
|
1126
|
+
function ue(l) {
|
|
1127
|
+
const n = l?.path;
|
|
1128
|
+
return typeof n == "string" && n !== "" ? n : null;
|
|
1129
|
+
}
|
|
1130
|
+
async function Pe(l) {
|
|
1131
|
+
if (!(l === null || l in X)) {
|
|
1132
|
+
X[l] = null;
|
|
1133
|
+
try {
|
|
1134
|
+
const n = await T.fileByPath(l);
|
|
1135
|
+
X[l] = n ? { url: n.url, ratio: n.width && n.height ? n.width / n.height : null } : null;
|
|
1136
|
+
} catch {
|
|
1137
|
+
X[l] = null;
|
|
1138
|
+
}
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1141
|
+
const fe = v(() => ue(w?.values.value.image)), u = v(() => ue(w?.values.value.image_mobile));
|
|
1142
|
+
Ct(
|
|
1143
|
+
() => [fe.value, u.value, ...k.value.map((l) => ue(l.image))],
|
|
1144
|
+
(l) => l.forEach((n) => {
|
|
1145
|
+
Pe(n);
|
|
1146
|
+
}),
|
|
1147
|
+
{ immediate: !0 }
|
|
1148
|
+
);
|
|
1149
|
+
const a = v(
|
|
1150
|
+
() => D.value === "mobile" ? tt(V.value?.ratio_mobile, 0.8) : tt(V.value?.ratio, 16 / 6)
|
|
1151
|
+
), o = v(() => {
|
|
1152
|
+
const l = u.value === null ? null : X[u.value] ?? null, n = fe.value === null ? null : X[fe.value] ?? null;
|
|
1153
|
+
return D.value === "mobile" ? l ?? n : n;
|
|
1154
|
+
}), _ = v(() => o.value?.ratio ?? a.value), ne = v(() => Zt(_.value, a.value)), bt = v(() => {
|
|
1155
|
+
const l = String(_.value);
|
|
1156
|
+
return { "--ratio": l, "--ratio-mobile": l, "--img": l, "--img-m": l };
|
|
1157
|
+
}), mt = v(() => {
|
|
1158
|
+
const l = (n) => (w?.values.value[n]?.[Z.value] ?? "").trim();
|
|
1159
|
+
return { title: l("title"), text: l("text") };
|
|
1160
|
+
});
|
|
1161
|
+
function Ae(l) {
|
|
1162
|
+
return Kt(l.text, Z.value, $e.value, mt.value);
|
|
1163
|
+
}
|
|
1164
|
+
const Me = v(
|
|
1165
|
+
() => (w?.values.value.buttons ?? []).map((l) => ({
|
|
1166
|
+
label: (l.label?.[Z.value] ?? "").trim(),
|
|
1167
|
+
variant: l.variant ?? V.value?.variants[0]?.value ?? "primary"
|
|
1168
|
+
})).filter((l) => l.label !== "")
|
|
1169
|
+
);
|
|
1170
|
+
function yt(l) {
|
|
1171
|
+
return l.type === "text" && /^(p|span|h[1-6])$/.test(l.tag ?? "") ? l.tag : "div";
|
|
1172
|
+
}
|
|
1173
|
+
function pt(l) {
|
|
1174
|
+
if (l.name) return l.name;
|
|
1175
|
+
const n = l.text?.[Z.value] ?? Object.values(l.text ?? {})[0] ?? "";
|
|
1176
|
+
return n.trim() === "{title}" ? p("layers.title-layer") : n.trim() === "{text}" ? p("layers.text-layer") : l.type === "buttons" ? p("layers.buttons-layer") : l.type === "image" ? p("layers.image") : n.trim() || p(`layers.${l.type}`);
|
|
1177
|
+
}
|
|
1178
|
+
const ft = {
|
|
1179
|
+
text: "file-text",
|
|
1180
|
+
image: "image",
|
|
1181
|
+
button: "link",
|
|
1182
|
+
buttons: "grid"
|
|
1183
|
+
};
|
|
1184
|
+
function Fe(l) {
|
|
1185
|
+
const n = M(l), i = 100 / _.value, b = ne.value, h = b.left, P = b.left + b.width, L = b.top / 100 * i, U = (b.top + b.height) / 100 * i, $ = n.x + Te(n.origin)[0] / 100 * n.w;
|
|
1186
|
+
return $ > P || $ + n.w < h || n.y > U || n.y < L - 50;
|
|
1187
|
+
}
|
|
1188
|
+
const Ue = te(null), Re = te(null), ve = te([]);
|
|
1189
|
+
function vt(l, n) {
|
|
1190
|
+
const i = 100 / _.value, b = ne.value, h = l === "x" ? [0, 50, 100, b.left, b.left + b.width] : [0, i / 2, i, b.top / 100 * i, (b.top + b.height) / 100 * i];
|
|
1191
|
+
for (const P of k.value) {
|
|
1192
|
+
if (P.id === n) continue;
|
|
1193
|
+
const L = M(P);
|
|
1194
|
+
l === "x" ? h.push(L.x, L.x + L.w) : h.push(L.y);
|
|
1195
|
+
}
|
|
1196
|
+
return h;
|
|
1197
|
+
}
|
|
1198
|
+
function Ke(l, n, i, b, h, P) {
|
|
1199
|
+
if (P) return n;
|
|
1200
|
+
const L = [0, i / 2, i];
|
|
1201
|
+
let U = null;
|
|
1202
|
+
for (const $ of vt(l, h))
|
|
1203
|
+
for (const ee of L) {
|
|
1204
|
+
const ce = $ - (n + ee);
|
|
1205
|
+
Math.abs(ce) * b <= Ll && (U === null || Math.abs(ce) < Math.abs(U.delta)) && (U = { delta: ce, at: $ });
|
|
1206
|
+
}
|
|
1207
|
+
return U === null ? n : (ve.value = [...ve.value.filter(($) => $.axis !== l), { axis: l, at: U.at }], n + U.delta);
|
|
1208
|
+
}
|
|
1209
|
+
function je(l) {
|
|
1210
|
+
N.value = l.id, Re.value?.focus({ preventScroll: !0 });
|
|
1211
|
+
}
|
|
1212
|
+
function We(l, n, i) {
|
|
1213
|
+
if (je(n), r.disabled || l.button !== 0 || !Ue.value) return;
|
|
1214
|
+
l.preventDefault();
|
|
1215
|
+
const h = Ue.value.getBoundingClientRect().width / 100, L = l.target.closest(".webx-banner__layer")?.getBoundingClientRect(), U = L ? L.height / h : 0, $ = { ...M(n) }, ee = { x: l.clientX, y: l.clientY };
|
|
1216
|
+
let ce = !1;
|
|
1217
|
+
const He = (be) => {
|
|
1218
|
+
const Ie = (be.clientX - ee.x) / h, xt = (be.clientY - ee.y) / h;
|
|
1219
|
+
if (!ce) {
|
|
1220
|
+
if (Math.hypot(be.clientX - ee.x, be.clientY - ee.y) < Bl) return;
|
|
1221
|
+
ce = !0, q();
|
|
1222
|
+
}
|
|
1223
|
+
if (ve.value = [], i === "move") {
|
|
1224
|
+
const se = {
|
|
1225
|
+
x: Te($.origin)[0] / 100 * $.w,
|
|
1226
|
+
y: Te($.origin)[1] / 100 * U
|
|
1227
|
+
}, kt = Ke("x", $.x + Ie + se.x, $.w, h, n.id, be.altKey), $t = Ke("y", $.y + xt + se.y, U, h, n.id, be.altKey);
|
|
1228
|
+
K(n.id, { x: kt - se.x, y: $t - se.y }, !1);
|
|
1229
|
+
} else if (i === "width")
|
|
1230
|
+
K(n.id, { w: Math.max(1, $.w + Ie) }, !1);
|
|
1231
|
+
else {
|
|
1232
|
+
const se = Math.max(0.05, ($.w + Ie) / $.w);
|
|
1233
|
+
K(n.id, { w: $.w * se, size: $.size * se }, !1);
|
|
1234
|
+
}
|
|
1235
|
+
}, ze = () => {
|
|
1236
|
+
window.removeEventListener("pointermove", He), window.removeEventListener("pointerup", ze), window.removeEventListener("pointercancel", ze), ve.value = [];
|
|
1237
|
+
};
|
|
1238
|
+
window.addEventListener("pointermove", He), window.addEventListener("pointerup", ze), window.addEventListener("pointercancel", ze);
|
|
1239
|
+
}
|
|
1240
|
+
function Te(l) {
|
|
1241
|
+
const n = l.endsWith("r") ? -100 : l === "t" || l === "c" || l === "b" ? -50 : 0, i = l.startsWith("b") ? -100 : l === "l" || l === "c" || l === "r" ? -50 : 0;
|
|
1242
|
+
return [n, i];
|
|
1243
|
+
}
|
|
1244
|
+
function ht(l) {
|
|
1245
|
+
l.target.closest(".webx-banner__layer") || (N.value = null);
|
|
1246
|
+
}
|
|
1247
|
+
function wt(l) {
|
|
1248
|
+
const n = l.ctrlKey || l.metaKey, i = l.key.toLowerCase();
|
|
1249
|
+
if (n && i === "z") {
|
|
1250
|
+
l.preventDefault(), l.shiftKey ? le() : re();
|
|
1251
|
+
return;
|
|
1252
|
+
}
|
|
1253
|
+
if (n && i === "y") {
|
|
1254
|
+
l.preventDefault(), le();
|
|
1255
|
+
return;
|
|
1256
|
+
}
|
|
1257
|
+
const b = Q.value;
|
|
1258
|
+
if (!b || r.disabled) return;
|
|
1259
|
+
if (n && i === "d") {
|
|
1260
|
+
l.preventDefault(), Be(b.id);
|
|
1261
|
+
return;
|
|
1262
|
+
}
|
|
1263
|
+
if (i === "delete" || i === "backspace") {
|
|
1264
|
+
l.preventDefault(), pe(b.id);
|
|
1265
|
+
return;
|
|
1266
|
+
}
|
|
1267
|
+
if (i === "escape") {
|
|
1268
|
+
N.value = null;
|
|
1269
|
+
return;
|
|
1270
|
+
}
|
|
1271
|
+
const h = l.shiftKey ? 0.5 : 0.05, L = {
|
|
1272
|
+
arrowleft: [-h, 0],
|
|
1273
|
+
arrowright: [h, 0],
|
|
1274
|
+
arrowup: [0, -h],
|
|
1275
|
+
arrowdown: [0, h]
|
|
1276
|
+
}[i];
|
|
1277
|
+
if (!L) return;
|
|
1278
|
+
l.preventDefault();
|
|
1279
|
+
const U = M(b), $ = Date.now(), ee = j.id === `arrows:${b.id}` && $ - j.at < 800;
|
|
1280
|
+
j = { id: `arrows:${b.id}`, at: $ }, K(b.id, { x: U.x + L[0], y: U.y + L[1] }, !ee);
|
|
1281
|
+
}
|
|
1282
|
+
const he = te(null);
|
|
1283
|
+
let we = null;
|
|
1284
|
+
St(async () => {
|
|
1285
|
+
try {
|
|
1286
|
+
he.value = await C.theme();
|
|
1287
|
+
} catch {
|
|
1288
|
+
he.value = null;
|
|
1289
|
+
}
|
|
1290
|
+
const l = `${he.value?.tokens_css ?? ""}
|
|
1291
|
+
${he.value?.fonts_css ?? ""}`.trim();
|
|
1292
|
+
l !== "" && !document.getElementById("wx-banners-theme") && (we = document.createElement("style"), we.id = "wx-banners-theme", we.textContent = l, document.head.append(we));
|
|
1293
|
+
}), Ot(() => {
|
|
1294
|
+
we?.remove();
|
|
1295
|
+
});
|
|
1296
|
+
const gt = v(() => [
|
|
1297
|
+
{ value: "desktop", label: p("layers.desktop"), icon: "monitor" },
|
|
1298
|
+
{ value: "mobile", label: p("layers.mobile"), icon: "smartphone" }
|
|
1299
|
+
]), Je = v({
|
|
1300
|
+
get: () => D.value,
|
|
1301
|
+
set: (l) => {
|
|
1302
|
+
D.value = l === "mobile" ? "mobile" : "desktop";
|
|
1303
|
+
}
|
|
1304
|
+
});
|
|
1305
|
+
return (l, n) => (f(), x("div", {
|
|
1306
|
+
class: J(["wx-banner-layers", { "is-disabled": t.disabled }])
|
|
1307
|
+
}, [
|
|
1308
|
+
g("div", ml, [
|
|
1309
|
+
d(e(st), {
|
|
1310
|
+
modelValue: Je.value,
|
|
1311
|
+
"onUpdate:modelValue": n[0] || (n[0] = (i) => Je.value = i),
|
|
1312
|
+
options: gt.value,
|
|
1313
|
+
size: "sm",
|
|
1314
|
+
"aria-label": e(p)("layers.layout")
|
|
1315
|
+
}, null, 8, ["modelValue", "options", "aria-label"]),
|
|
1316
|
+
g("div", yl, [
|
|
1317
|
+
d(e(qe), {
|
|
1318
|
+
content: e(p)("layers.undo")
|
|
1319
|
+
}, {
|
|
1320
|
+
default: m(() => [
|
|
1321
|
+
d(e(E), {
|
|
1322
|
+
size: "sm",
|
|
1323
|
+
variant: "text",
|
|
1324
|
+
disabled: t.disabled || A.value.length === 0,
|
|
1325
|
+
"aria-label": e(p)("layers.undo"),
|
|
1326
|
+
onClick: re
|
|
1327
|
+
}, {
|
|
1328
|
+
icon: m(() => [
|
|
1329
|
+
d(e(F), { name: "rotate-left" })
|
|
1330
|
+
]),
|
|
1331
|
+
_: 1
|
|
1332
|
+
}, 8, ["disabled", "aria-label"])
|
|
1333
|
+
]),
|
|
1334
|
+
_: 1
|
|
1335
|
+
}, 8, ["content"]),
|
|
1336
|
+
d(e(qe), {
|
|
1337
|
+
content: e(p)("layers.redo")
|
|
1338
|
+
}, {
|
|
1339
|
+
default: m(() => [
|
|
1340
|
+
d(e(E), {
|
|
1341
|
+
size: "sm",
|
|
1342
|
+
variant: "text",
|
|
1343
|
+
disabled: t.disabled || R.value.length === 0,
|
|
1344
|
+
"aria-label": e(p)("layers.redo"),
|
|
1345
|
+
onClick: le
|
|
1346
|
+
}, {
|
|
1347
|
+
icon: m(() => [
|
|
1348
|
+
d(e(F), { name: "rotate-right" })
|
|
1349
|
+
]),
|
|
1350
|
+
_: 1
|
|
1351
|
+
}, 8, ["disabled", "aria-label"])
|
|
1352
|
+
]),
|
|
1353
|
+
_: 1
|
|
1354
|
+
}, 8, ["content"]),
|
|
1355
|
+
d(e(E), {
|
|
1356
|
+
size: "sm",
|
|
1357
|
+
variant: "outline",
|
|
1358
|
+
disabled: t.disabled,
|
|
1359
|
+
onClick: n[1] || (n[1] = (i) => de("text"))
|
|
1360
|
+
}, {
|
|
1361
|
+
icon: m(() => [
|
|
1362
|
+
d(e(F), { name: "plus" })
|
|
1363
|
+
]),
|
|
1364
|
+
default: m(() => [
|
|
1365
|
+
O(" " + z(e(p)("layers.text")), 1)
|
|
1366
|
+
]),
|
|
1367
|
+
_: 1
|
|
1368
|
+
}, 8, ["disabled"]),
|
|
1369
|
+
d(e(E), {
|
|
1370
|
+
size: "sm",
|
|
1371
|
+
variant: "outline",
|
|
1372
|
+
disabled: t.disabled,
|
|
1373
|
+
onClick: n[2] || (n[2] = (i) => de("image"))
|
|
1374
|
+
}, {
|
|
1375
|
+
icon: m(() => [
|
|
1376
|
+
d(e(F), { name: "plus" })
|
|
1377
|
+
]),
|
|
1378
|
+
default: m(() => [
|
|
1379
|
+
O(" " + z(e(p)("layers.image")), 1)
|
|
1380
|
+
]),
|
|
1381
|
+
_: 1
|
|
1382
|
+
}, 8, ["disabled"]),
|
|
1383
|
+
d(e(E), {
|
|
1384
|
+
size: "sm",
|
|
1385
|
+
variant: "outline",
|
|
1386
|
+
disabled: t.disabled,
|
|
1387
|
+
onClick: n[3] || (n[3] = (i) => de("button"))
|
|
1388
|
+
}, {
|
|
1389
|
+
icon: m(() => [
|
|
1390
|
+
d(e(F), { name: "plus" })
|
|
1391
|
+
]),
|
|
1392
|
+
default: m(() => [
|
|
1393
|
+
O(" " + z(e(p)("layers.button")), 1)
|
|
1394
|
+
]),
|
|
1395
|
+
_: 1
|
|
1396
|
+
}, 8, ["disabled"]),
|
|
1397
|
+
Ne.value ? I("", !0) : (f(), W(e(E), {
|
|
1398
|
+
key: 0,
|
|
1399
|
+
size: "sm",
|
|
1400
|
+
variant: "outline",
|
|
1401
|
+
disabled: t.disabled,
|
|
1402
|
+
onClick: n[4] || (n[4] = (i) => de("buttons"))
|
|
1403
|
+
}, {
|
|
1404
|
+
icon: m(() => [
|
|
1405
|
+
d(e(F), { name: "plus" })
|
|
1406
|
+
]),
|
|
1407
|
+
default: m(() => [
|
|
1408
|
+
O(" " + z(e(p)("layers.buttons-layer")), 1)
|
|
1409
|
+
]),
|
|
1410
|
+
_: 1
|
|
1411
|
+
}, 8, ["disabled"]))
|
|
1412
|
+
])
|
|
1413
|
+
]),
|
|
1414
|
+
V.value ? I("", !0) : (f(), W(e(Y), {
|
|
1415
|
+
key: 0,
|
|
1416
|
+
size: "sm",
|
|
1417
|
+
tone: "muted"
|
|
1418
|
+
}, {
|
|
1419
|
+
default: m(() => [
|
|
1420
|
+
O(z(e(p)("layers.not-here")), 1)
|
|
1421
|
+
]),
|
|
1422
|
+
_: 1
|
|
1423
|
+
})),
|
|
1424
|
+
g("div", pl, [
|
|
1425
|
+
g("div", fl, [
|
|
1426
|
+
g("div", {
|
|
1427
|
+
ref_key: "canvas",
|
|
1428
|
+
ref: Re,
|
|
1429
|
+
class: J(["wx-banner-layers__canvas", { "is-overflow": V.value?.overflow }]),
|
|
1430
|
+
tabindex: "0",
|
|
1431
|
+
"aria-label": e(p)("layers.canvas"),
|
|
1432
|
+
onPointerdown: ht,
|
|
1433
|
+
onKeydown: wt
|
|
1434
|
+
}, [
|
|
1435
|
+
g("div", {
|
|
1436
|
+
class: J(["webx-banner wx-banner-layers__frame", { "is-mobile": D.value === "mobile" }]),
|
|
1437
|
+
style: xe(bt.value)
|
|
1438
|
+
}, [
|
|
1439
|
+
g("div", hl, [
|
|
1440
|
+
o.value ? (f(), x("img", {
|
|
1441
|
+
key: 0,
|
|
1442
|
+
class: "webx-banner__image",
|
|
1443
|
+
src: o.value.url,
|
|
1444
|
+
alt: ""
|
|
1445
|
+
}, null, 8, wl)) : (f(), x("div", gl, z(e(p)("layers.no-picture")), 1))
|
|
1446
|
+
]),
|
|
1447
|
+
g("div", {
|
|
1448
|
+
ref_key: "stage",
|
|
1449
|
+
ref: Ue,
|
|
1450
|
+
class: "webx-banner__stage"
|
|
1451
|
+
}, [
|
|
1452
|
+
(f(!0), x(H, null, oe(k.value, (i, b) => (f(), W(Bt(yt(i)), {
|
|
1453
|
+
key: i.id,
|
|
1454
|
+
class: J([
|
|
1455
|
+
...e(Ht)(i),
|
|
1456
|
+
{ "is-selected": i.id === N.value, "is-outside": Fe(i) }
|
|
1457
|
+
]),
|
|
1458
|
+
style: xe(e(Jt)(i, k.value.length - b)),
|
|
1459
|
+
onPointerdown: Ee((h) => We(h, i, "move"), ["stop"])
|
|
1460
|
+
}, {
|
|
1461
|
+
default: m(() => [
|
|
1462
|
+
i.type === "text" ? (f(), x("span", xl, z(Ae(i) || "…"), 1)) : i.type === "image" ? (f(), x("img", {
|
|
1463
|
+
key: 1,
|
|
1464
|
+
class: "webx-banner__inner",
|
|
1465
|
+
src: X[ue(i.image) ?? ""]?.url ?? "",
|
|
1466
|
+
alt: "",
|
|
1467
|
+
draggable: "false"
|
|
1468
|
+
}, null, 8, kl)) : i.type === "button" ? (f(), x("span", $l, [
|
|
1469
|
+
g("span", {
|
|
1470
|
+
class: J([
|
|
1471
|
+
"webx-banner__button",
|
|
1472
|
+
`webx-banner__button--${i.variant ?? V.value?.variants[0]?.value ?? "primary"}`
|
|
1473
|
+
])
|
|
1474
|
+
}, z(Ae(i) || "…"), 3)
|
|
1475
|
+
])) : (f(), x("span", Vl, [
|
|
1476
|
+
(f(!0), x(H, null, oe(Me.value, (h, P) => (f(), x("span", {
|
|
1477
|
+
key: P,
|
|
1478
|
+
class: J(["webx-banner__button", `webx-banner__button--${h.variant}`])
|
|
1479
|
+
}, z(h.label), 3))), 128)),
|
|
1480
|
+
Me.value.length === 0 ? (f(), x("span", zl, z(e(p)("layers.buttons-layer")), 1)) : I("", !0)
|
|
1481
|
+
])),
|
|
1482
|
+
i.id === N.value && !t.disabled ? (f(), x(H, { key: 4 }, [
|
|
1483
|
+
g("span", {
|
|
1484
|
+
class: "wx-banner-layers__handle wx-banner-layers__handle--width",
|
|
1485
|
+
onPointerdown: Ee((h) => We(h, i, "width"), ["stop"])
|
|
1486
|
+
}, null, 40, _l),
|
|
1487
|
+
g("span", {
|
|
1488
|
+
class: "wx-banner-layers__handle wx-banner-layers__handle--scale",
|
|
1489
|
+
onPointerdown: Ee((h) => We(h, i, "scale"), ["stop"])
|
|
1490
|
+
}, null, 40, Cl)
|
|
1491
|
+
], 64)) : I("", !0)
|
|
1492
|
+
]),
|
|
1493
|
+
_: 2
|
|
1494
|
+
}, 1064, ["class", "style", "onPointerdown"]))), 128))
|
|
1495
|
+
], 512),
|
|
1496
|
+
g("div", {
|
|
1497
|
+
class: "wx-banner-layers__crop",
|
|
1498
|
+
style: xe({
|
|
1499
|
+
left: `${ne.value.left}%`,
|
|
1500
|
+
top: `${ne.value.top}%`,
|
|
1501
|
+
width: `${ne.value.width}%`,
|
|
1502
|
+
height: `${ne.value.height}%`
|
|
1503
|
+
})
|
|
1504
|
+
}, null, 4),
|
|
1505
|
+
(f(!0), x(H, null, oe(ve.value, (i) => (f(), x("div", {
|
|
1506
|
+
key: i.axis,
|
|
1507
|
+
class: J(["wx-banner-layers__guide", `wx-banner-layers__guide--${i.axis}`]),
|
|
1508
|
+
style: xe(
|
|
1509
|
+
i.axis === "x" ? { left: `${i.at}%` } : { top: `calc(${i.at} * 1cqw)` }
|
|
1510
|
+
)
|
|
1511
|
+
}, null, 6))), 128))
|
|
1512
|
+
], 6)
|
|
1513
|
+
], 42, vl),
|
|
1514
|
+
d(e(Y), {
|
|
1515
|
+
size: "sm",
|
|
1516
|
+
tone: "muted"
|
|
1517
|
+
}, {
|
|
1518
|
+
default: m(() => [
|
|
1519
|
+
O(z(e(p)("layers.hint")), 1)
|
|
1520
|
+
]),
|
|
1521
|
+
_: 1
|
|
1522
|
+
}),
|
|
1523
|
+
d(e(Pt), {
|
|
1524
|
+
modelValue: Ve.value,
|
|
1525
|
+
"onUpdate:modelValue": n[5] || (n[5] = (i) => Ve.value = i),
|
|
1526
|
+
class: "wx-banner-layers__list",
|
|
1527
|
+
"item-key": "id",
|
|
1528
|
+
size: "sm",
|
|
1529
|
+
disabled: t.disabled,
|
|
1530
|
+
"empty-text": e(p)("layers.empty"),
|
|
1531
|
+
"aria-label": e(p)("layers.list")
|
|
1532
|
+
}, {
|
|
1533
|
+
default: m(({ item: i }) => [
|
|
1534
|
+
g("button", {
|
|
1535
|
+
type: "button",
|
|
1536
|
+
class: J(["wx-banner-layers__row", { "is-selected": i.id === N.value }]),
|
|
1537
|
+
onClick: (b) => je(i)
|
|
1538
|
+
}, [
|
|
1539
|
+
d(e(F), {
|
|
1540
|
+
name: ft[i.type]
|
|
1541
|
+
}, null, 8, ["name"]),
|
|
1542
|
+
g("span", Ol, z(pt(i)), 1),
|
|
1543
|
+
Fe(i) ? (f(), W(e(F), {
|
|
1544
|
+
key: 0,
|
|
1545
|
+
name: "warning",
|
|
1546
|
+
class: "wx-banner-layers__warn",
|
|
1547
|
+
"aria-label": e(p)("layers.outside")
|
|
1548
|
+
}, null, 8, ["aria-label"])) : I("", !0)
|
|
1549
|
+
], 10, Sl)
|
|
1550
|
+
]),
|
|
1551
|
+
actions: m(({ item: i }) => [
|
|
1552
|
+
d(e(E), {
|
|
1553
|
+
size: "sm",
|
|
1554
|
+
variant: "text",
|
|
1555
|
+
disabled: t.disabled,
|
|
1556
|
+
"aria-label": M(i).hidden ? e(p)("layers.show") : e(p)("layers.hide"),
|
|
1557
|
+
onClick: (b) => Le(i)
|
|
1558
|
+
}, {
|
|
1559
|
+
icon: m(() => [
|
|
1560
|
+
d(e(F), {
|
|
1561
|
+
name: M(i).hidden ? "eye-off" : "eye"
|
|
1562
|
+
}, null, 8, ["name"])
|
|
1563
|
+
]),
|
|
1564
|
+
_: 2
|
|
1565
|
+
}, 1032, ["disabled", "aria-label", "onClick"]),
|
|
1566
|
+
d(e(E), {
|
|
1567
|
+
size: "sm",
|
|
1568
|
+
variant: "text",
|
|
1569
|
+
disabled: t.disabled,
|
|
1570
|
+
"aria-label": e(p)("layers.delete"),
|
|
1571
|
+
onClick: (b) => pe(i.id)
|
|
1572
|
+
}, {
|
|
1573
|
+
icon: m(() => [
|
|
1574
|
+
d(e(F), { name: "trash" })
|
|
1575
|
+
]),
|
|
1576
|
+
_: 1
|
|
1577
|
+
}, 8, ["disabled", "aria-label", "onClick"])
|
|
1578
|
+
]),
|
|
1579
|
+
_: 1
|
|
1580
|
+
}, 8, ["modelValue", "disabled", "empty-text", "aria-label"])
|
|
1581
|
+
]),
|
|
1582
|
+
Q.value ? (f(), W(bl, {
|
|
1583
|
+
key: 0,
|
|
1584
|
+
class: "wx-banner-layers__inspector",
|
|
1585
|
+
layer: Q.value,
|
|
1586
|
+
view: D.value,
|
|
1587
|
+
tags: V.value?.tags ?? [],
|
|
1588
|
+
variants: V.value?.variants ?? [],
|
|
1589
|
+
palette: he.value?.palette ?? [],
|
|
1590
|
+
disabled: t.disabled,
|
|
1591
|
+
onUpdate: Oe,
|
|
1592
|
+
onFrame: n[6] || (n[6] = (i) => K(Q.value.id, i)),
|
|
1593
|
+
onSameAsDesktop: n[7] || (n[7] = (i) => ae(Q.value.id, (b) => ({
|
|
1594
|
+
...b,
|
|
1595
|
+
frames: { ...b.frames, mobile: null }
|
|
1596
|
+
}))),
|
|
1597
|
+
onDelete: n[8] || (n[8] = (i) => pe(Q.value.id))
|
|
1598
|
+
}, null, 8, ["layer", "view", "tags", "variants", "palette", "disabled"])) : (f(), W(e(Y), {
|
|
1599
|
+
key: 1,
|
|
1600
|
+
class: "wx-banner-layers__inspector",
|
|
1601
|
+
size: "sm",
|
|
1602
|
+
tone: "muted"
|
|
1603
|
+
}, {
|
|
1604
|
+
default: m(() => [
|
|
1605
|
+
O(z(e(p)("layers.choose")), 1)
|
|
1606
|
+
]),
|
|
1607
|
+
_: 1
|
|
1608
|
+
}))
|
|
1609
|
+
])
|
|
1610
|
+
], 2));
|
|
1611
|
+
}
|
|
1612
|
+
}), Pl = /* @__PURE__ */ ct(Nl, [["__scopeId", "data-v-540c304c"]]);
|
|
1613
|
+
function Al(t = {}) {
|
|
1614
|
+
const c = t.path ?? "/banners";
|
|
1615
|
+
return {
|
|
1616
|
+
id: "banners",
|
|
1617
|
+
path: c,
|
|
1618
|
+
routes: [
|
|
1619
|
+
// The open place is in the address (`?place=`), so a link to it is a link to its banners.
|
|
1620
|
+
{
|
|
1621
|
+
path: c,
|
|
1622
|
+
name: "webx.banners",
|
|
1623
|
+
component: () => import("./BannersPage-Dl_BCozz.js"),
|
|
1624
|
+
props: { base: c }
|
|
1625
|
+
},
|
|
1626
|
+
// A banner not written yet: the place it goes to rides in the query (`?place=hero`).
|
|
1627
|
+
{
|
|
1628
|
+
path: `${c}/new`,
|
|
1629
|
+
name: "webx.banners.new",
|
|
1630
|
+
component: () => import("./BannerEditorPage-j7WlEaek.js"),
|
|
1631
|
+
props: { base: c }
|
|
1632
|
+
},
|
|
1633
|
+
{
|
|
1634
|
+
path: `${c}/:id(\\d+)`,
|
|
1635
|
+
name: "webx.banners.edit",
|
|
1636
|
+
component: () => import("./BannerEditorPage-j7WlEaek.js"),
|
|
1637
|
+
props: { base: c }
|
|
1638
|
+
}
|
|
1639
|
+
],
|
|
1640
|
+
/*
|
|
1641
|
+
* The one node of `banners.form` only this module can draw: the layers, on the banner's
|
|
1642
|
+
* picture. A field like any other — its value is the list of layers.
|
|
1643
|
+
*/
|
|
1644
|
+
types: {
|
|
1645
|
+
"wx-banner-layers": { component: Pl, kind: "field", wide: !0 }
|
|
1646
|
+
}
|
|
1647
|
+
};
|
|
1648
|
+
}
|
|
1649
|
+
const Ml = at(() => import("./BannersPage-Dl_BCozz.js")), Fl = at(() => import("./BannerEditorPage-j7WlEaek.js"));
|
|
1650
|
+
export {
|
|
1651
|
+
Xe as E,
|
|
1652
|
+
Rt as F,
|
|
1653
|
+
Ye as L,
|
|
1654
|
+
Mt as O,
|
|
1655
|
+
Fl as W,
|
|
1656
|
+
ct as _,
|
|
1657
|
+
ke as a,
|
|
1658
|
+
Pl as b,
|
|
1659
|
+
It as c,
|
|
1660
|
+
Dl as d,
|
|
1661
|
+
Ml as e,
|
|
1662
|
+
Al as f,
|
|
1663
|
+
Dt as g,
|
|
1664
|
+
qt as h,
|
|
1665
|
+
De as i,
|
|
1666
|
+
Zt as j,
|
|
1667
|
+
et as k,
|
|
1668
|
+
ie as l,
|
|
1669
|
+
Ht as m,
|
|
1670
|
+
dt as n,
|
|
1671
|
+
Jt as o,
|
|
1672
|
+
El as p,
|
|
1673
|
+
Kt as q,
|
|
1674
|
+
Se as r,
|
|
1675
|
+
Qe as s,
|
|
1676
|
+
tt as t,
|
|
1677
|
+
At as u,
|
|
1678
|
+
Ce as v,
|
|
1679
|
+
jt as w
|
|
1680
|
+
};
|
|
1681
|
+
//# sourceMappingURL=index-3RALKrkh.js.map
|