webim-adapter 0.28.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/webim-adapter.js +1683 -741
- package/build/webim-embed.js +13 -11
- package/build/webim-ssr.js +1684 -744
- package/package.json +1 -1
package/build/webim-ssr.js
CHANGED
|
@@ -13,7 +13,43 @@ var p = /* @__PURE__ */ new Set([
|
|
|
13
13
|
"yi",
|
|
14
14
|
"dv",
|
|
15
15
|
"ckb"
|
|
16
|
-
]), m = (e) => p.has(String(e || "").toLowerCase().split(/[-_]/)[0]) ? "rtl" : "ltr", h = (e, t) => e === "ltr" || e === "rtl" ? e : t ? m(t) : void 0, g =
|
|
16
|
+
]), m = (e) => p.has(String(e || "").toLowerCase().split(/[-_]/)[0]) ? "rtl" : "ltr", h = (e, t) => e === "ltr" || e === "rtl" ? e : t ? m(t) : void 0, g = [
|
|
17
|
+
"linear",
|
|
18
|
+
"ease",
|
|
19
|
+
"ease-in",
|
|
20
|
+
"ease-out",
|
|
21
|
+
"ease-in-out"
|
|
22
|
+
], _ = (e) => {
|
|
23
|
+
let t = String(e ?? "").trim();
|
|
24
|
+
if (!t) return null;
|
|
25
|
+
let n = Number(t);
|
|
26
|
+
return Number.isFinite(n) ? n : null;
|
|
27
|
+
};
|
|
28
|
+
function v(e) {
|
|
29
|
+
let t = [], n = [], r = _(e?.opacity), i = _(e?.x), a = _(e?.y), o = _(e?.scale), s = _(e?.rotate), c = _(e?.blur);
|
|
30
|
+
return r !== null && t.push(`opacity: ${r}`), i !== null && n.push(`translateX(${i}px)`), a !== null && n.push(`translateY(${a}px)`), o !== null && n.push(`scale(${o})`), s !== null && n.push(`rotate(${s}deg)`), n.length && t.push(`transform: ${n.join(" ")}`), c !== null && t.push(`filter: blur(${c}px)`), t.join("; ");
|
|
31
|
+
}
|
|
32
|
+
var y = (e) => `wb-anim-${String(e).replace(/[^\w-]/g, "")}`, b = (e) => `--wb-anim-${String(e).replace(/[^\w-]/g, "")}`;
|
|
33
|
+
function x(e, t) {
|
|
34
|
+
if (!e || !Array.isArray(t)) return;
|
|
35
|
+
let n = window.getComputedStyle(e), r = t.map((e) => n.getPropertyValue(b(e)).trim()).filter(Boolean);
|
|
36
|
+
r.length && (e.style.animation = "none", e.offsetWidth, e.style.animation = r.join(", "));
|
|
37
|
+
}
|
|
38
|
+
function S(e) {
|
|
39
|
+
return Array.isArray(e) ? e.map((e) => {
|
|
40
|
+
let t = String(e?.id ?? "").replace(/[^\w-]/g, "");
|
|
41
|
+
if (!t) return "";
|
|
42
|
+
let n = y(t), r = v(e.from), i = v(e.to);
|
|
43
|
+
if (!r && !i) return "";
|
|
44
|
+
let a = Math.max(0, _(e.duration) ?? 400), o = Math.max(0, _(e.delay) ?? 0), s = `${n} ${a}ms ${g.includes(e.easing) ? e.easing : "ease-out"} ${o}ms ${e.loop ? "infinite" : "1"} both`;
|
|
45
|
+
return [
|
|
46
|
+
`@keyframes ${n} { from { ${r} } to { ${i} } }`,
|
|
47
|
+
`:root { ${b(t)}: ${s}; }`,
|
|
48
|
+
`.${n} { animation: ${s}; }`
|
|
49
|
+
].join("\n");
|
|
50
|
+
}).filter(Boolean).join("\n") : "";
|
|
51
|
+
}
|
|
52
|
+
var C = new Map([
|
|
17
53
|
{
|
|
18
54
|
family: "Bebas Neue",
|
|
19
55
|
fallback: "sans-serif",
|
|
@@ -144,21 +180,21 @@ var p = /* @__PURE__ */ new Set([
|
|
|
144
180
|
fallback: "sans-serif",
|
|
145
181
|
weights: "100..900"
|
|
146
182
|
}
|
|
147
|
-
].map((e) => [e.family, e])),
|
|
148
|
-
let t =
|
|
183
|
+
].map((e) => [e.family, e])), w = (e) => `"${e.family}", ${e.fallback}`, T = (e) => {
|
|
184
|
+
let t = C.get(e)?.weights;
|
|
149
185
|
return `family=${e.replace(/ /g, "+")}${t ? `:wght@${t}` : ""}`;
|
|
150
186
|
};
|
|
151
|
-
function
|
|
152
|
-
return e.length ? `https://fonts.googleapis.com/css2?${e.map(
|
|
187
|
+
function E(e) {
|
|
188
|
+
return e.length ? `https://fonts.googleapis.com/css2?${e.map(T).join("&")}&display=swap` : null;
|
|
153
189
|
}
|
|
154
|
-
var
|
|
190
|
+
var D = (e) => E([e]), O = (e) => {
|
|
155
191
|
let t = typeof e == "string" && e.match(/^"([^"]+)"/);
|
|
156
192
|
return t ? t[1] : null;
|
|
157
|
-
},
|
|
158
|
-
let t =
|
|
159
|
-
return t ?
|
|
193
|
+
}, k = (e) => {
|
|
194
|
+
let t = C.get(e);
|
|
195
|
+
return t ? w(t) : null;
|
|
160
196
|
};
|
|
161
|
-
function
|
|
197
|
+
function A(e, t) {
|
|
162
198
|
let n = /* @__PURE__ */ new Set(), r = (e) => {
|
|
163
199
|
for (let t of Object.values(e || {})) for (let e of [
|
|
164
200
|
"style",
|
|
@@ -166,7 +202,7 @@ function C(e, t) {
|
|
|
166
202
|
"pressed",
|
|
167
203
|
"focused"
|
|
168
204
|
]) {
|
|
169
|
-
let r =
|
|
205
|
+
let r = O(t.props?.[e]?.fontFamily);
|
|
170
206
|
r && n.add(r);
|
|
171
207
|
}
|
|
172
208
|
};
|
|
@@ -176,123 +212,180 @@ function C(e, t) {
|
|
|
176
212
|
}
|
|
177
213
|
//#endregion
|
|
178
214
|
//#region ../ui/src/components/builder/styles.js
|
|
179
|
-
var
|
|
215
|
+
var j = /* @__PURE__ */ new Set(/* @__PURE__ */ "marginTop.marginRight.marginBottom.marginLeft.paddingTop.paddingRight.paddingBottom.paddingLeft.gap.rowGap.columnGap.flexBasis.fontSize.borderRadius.borderTopLeftRadius.borderTopRightRadius.borderBottomRightRadius.borderBottomLeftRadius.borderWidth.borderTopWidth.borderRightWidth.borderBottomWidth.borderLeftWidth.letterSpacing.textDecorationThickness.textUnderlineOffset.top.right.bottom.left".split(".")), M = (e) => typeof e == "number" || typeof e == "string" && e.trim() !== "" && !Number.isNaN(Number(e)) ? `${Number(e)}px` : e, N = [
|
|
180
216
|
"borderWidth",
|
|
181
217
|
"borderStyle",
|
|
182
218
|
"borderColor",
|
|
183
219
|
"borderRadius",
|
|
184
220
|
"gap"
|
|
185
221
|
];
|
|
186
|
-
function
|
|
222
|
+
function P(e) {
|
|
187
223
|
let t = {};
|
|
188
|
-
for (let n of
|
|
224
|
+
for (let n of N) {
|
|
189
225
|
let r = e?.[n];
|
|
190
|
-
r != null && r !== "" && (t[n] =
|
|
226
|
+
r != null && r !== "" && (t[n] = j.has(n) ? M(r) : r);
|
|
191
227
|
}
|
|
192
|
-
for (let [n, r] of Object.entries(e || {})) r == null || r === "" ||
|
|
228
|
+
for (let [n, r] of Object.entries(e || {})) r == null || r === "" || N.includes(n) || (t[n] = j.has(n) ? M(r) : r);
|
|
193
229
|
let { gradientType: n, gradientAngle: r, gradientFrom: i, gradientTo: a } = t;
|
|
194
230
|
delete t.gradientType, delete t.gradientAngle, delete t.gradientFrom, delete t.gradientTo;
|
|
195
231
|
let { textShadows: o, textShadowX: s, textShadowY: c, textShadowBlur: l, textShadowColor: u } = t;
|
|
196
232
|
delete t.textShadows, delete t.textShadowX, delete t.textShadowY, delete t.textShadowBlur, delete t.textShadowColor;
|
|
197
|
-
let d = (Array.isArray(o) ? o : []).filter((e) => e && e.on !== !1).map((e) => `${
|
|
233
|
+
let d = (Array.isArray(o) ? o : []).filter((e) => e && e.on !== !1).map((e) => `${M(e.x ?? 0)} ${M(e.y ?? 0)} ${M(e.blur ?? 0)} ${e.color || "rgba(0, 0, 0, 0.35)"}`);
|
|
198
234
|
[
|
|
199
235
|
s,
|
|
200
236
|
c,
|
|
201
237
|
l,
|
|
202
238
|
u
|
|
203
|
-
].some((e) => e !== void 0) && d.push(`${
|
|
204
|
-
let f = (e) => typeof e == "number" || !Number.isNaN(Number(e)) ? `${Number(e)}deg` : e, p = (e) => e.type === "move" ? `translate(${
|
|
239
|
+
].some((e) => e !== void 0) && d.push(`${M(s ?? 0)} ${M(c ?? 0)} ${M(l ?? 0)} ${u || "rgba(0, 0, 0, 0.35)"}`), d.length && (t.textShadow = d.join(", "));
|
|
240
|
+
let f = (e) => typeof e == "number" || !Number.isNaN(Number(e)) ? `${Number(e)}deg` : e, p = (e) => e.type === "move" ? `translate(${M(e.x ?? 0)}, ${M(e.y ?? 0)})` : e.type === "scale" ? `scale(${e.v ?? 1})` : e.type === "rotate" ? `rotate(${f(e.a ?? 0)})` : e.type === "skew" ? `skew(${f(e.x ?? 0)}, ${f(e.y ?? 0)})` : null, { transforms: m, translateX: h, translateY: g, scale: _, rotate: v, skewX: y, skewY: b } = t;
|
|
205
241
|
delete t.transforms, delete t.translateX, delete t.translateY, delete t.scale, delete t.rotate, delete t.skewX, delete t.skewY;
|
|
206
242
|
let x = (Array.isArray(m) ? m : []).filter((e) => e && e.on !== !1).map(p).filter(Boolean);
|
|
207
|
-
(h !== void 0 || g !== void 0) && x.push(`translate(${
|
|
208
|
-
let S = (e) => `${e.inset ? "inset " : ""}${
|
|
243
|
+
(h !== void 0 || g !== void 0) && x.push(`translate(${M(h ?? 0)}, ${M(g ?? 0)})`), _ !== void 0 && x.push(`scale(${_})`), v !== void 0 && x.push(`rotate(${f(v)})`), (y !== void 0 || b !== void 0) && x.push(`skew(${f(y ?? 0)}, ${f(b ?? 0)})`), x.length && (t.transform = x.join(" "));
|
|
244
|
+
let S = (e) => `${e.inset ? "inset " : ""}${M(e.x ?? 0)} ${M(e.y ?? 0)} ${M(e.blur ?? 0)} ${M(e.spread ?? 0)} ${e.color || "rgba(15, 23, 42, 0.2)"}`, { shadows: C, boxShadowX: w, boxShadowY: T, boxShadowBlur: E, boxShadowSpread: D, boxShadowColor: O, boxShadowInset: k } = t;
|
|
209
245
|
delete t.shadows, delete t.boxShadowX, delete t.boxShadowY, delete t.boxShadowBlur, delete t.boxShadowSpread, delete t.boxShadowColor, delete t.boxShadowInset;
|
|
210
|
-
let
|
|
246
|
+
let A = (Array.isArray(C) ? C : []).filter((e) => e && e.on !== !1).map(S);
|
|
211
247
|
[
|
|
248
|
+
w,
|
|
249
|
+
T,
|
|
250
|
+
E,
|
|
212
251
|
D,
|
|
213
252
|
O,
|
|
214
|
-
k
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
inset: M
|
|
225
|
-
})), N.length && (t.boxShadow = N.join(", "));
|
|
226
|
-
let P = (e) => e.type === "blur" ? `blur(${T(e.v ?? 0)})` : e.type === "hue-rotate" ? `hue-rotate(${f(e.v ?? 0)})` : `${e.type}(${e.v ?? 100}%)`, F = (e) => (Array.isArray(e) ? e : []).filter((e) => e && e.on !== !1 && e.type).map(P), { filters: ee, backdropFilters: te, filterBlur: ne, filterGrayscale: re, filterBrightness: I, filterContrast: L, filterSaturate: ie } = t;
|
|
253
|
+
k
|
|
254
|
+
].some((e) => e !== void 0) && A.push(S({
|
|
255
|
+
x: w,
|
|
256
|
+
y: T,
|
|
257
|
+
blur: E,
|
|
258
|
+
spread: D,
|
|
259
|
+
color: O,
|
|
260
|
+
inset: k
|
|
261
|
+
})), A.length && (t.boxShadow = A.join(", "));
|
|
262
|
+
let P = (e) => e.type === "blur" ? `blur(${M(e.v ?? 0)})` : e.type === "hue-rotate" ? `hue-rotate(${f(e.v ?? 0)})` : `${e.type}(${e.v ?? 100}%)`, F = (e) => (Array.isArray(e) ? e : []).filter((e) => e && e.on !== !1 && e.type).map(P), { filters: I, backdropFilters: L, filterBlur: R, filterGrayscale: z, filterBrightness: B, filterContrast: V, filterSaturate: H } = t;
|
|
227
263
|
delete t.filters, delete t.backdropFilters, delete t.filterBlur, delete t.filterGrayscale, delete t.filterBrightness, delete t.filterContrast, delete t.filterSaturate;
|
|
228
|
-
let
|
|
229
|
-
|
|
230
|
-
let
|
|
231
|
-
|
|
232
|
-
let { textStrokeWidth:
|
|
233
|
-
delete t.textStrokeWidth, delete t.textStrokeColor, (
|
|
234
|
-
let { clipText:
|
|
235
|
-
delete t.clipText,
|
|
236
|
-
let { transitions:
|
|
264
|
+
let U = F(I);
|
|
265
|
+
R !== void 0 && U.push(`blur(${M(R)})`), z !== void 0 && U.push(`grayscale(${z}%)`), B !== void 0 && U.push(`brightness(${B}%)`), V !== void 0 && U.push(`contrast(${V}%)`), H !== void 0 && U.push(`saturate(${H}%)`), U.length && (t.filter = U.join(" "));
|
|
266
|
+
let ee = F(L);
|
|
267
|
+
ee.length && (t.backdropFilter = ee.join(" "), t.WebkitBackdropFilter = t.backdropFilter);
|
|
268
|
+
let { textStrokeWidth: te, textStrokeColor: W } = t;
|
|
269
|
+
delete t.textStrokeWidth, delete t.textStrokeColor, (te !== void 0 || W !== void 0) && (t.WebkitTextStroke = `${M(te ?? 1)} ${W || "currentColor"}`);
|
|
270
|
+
let { clipText: ne } = t;
|
|
271
|
+
delete t.clipText, ne && (t.WebkitBackgroundClip = "text", t.backgroundClip = "text", t.WebkitTextFillColor = "transparent");
|
|
272
|
+
let { transitions: re, transitionDuration: ie, transitionEasing: ae, transitionProperty: oe } = t, se = (e) => typeof e == "number" || !Number.isNaN(Number(e)) ? `${Number(e)}ms` : e;
|
|
237
273
|
delete t.transitions, delete t.transitionDuration, delete t.transitionEasing, delete t.transitionProperty;
|
|
238
|
-
let
|
|
239
|
-
if (
|
|
274
|
+
let ce = (Array.isArray(re) ? re : []).filter((e) => e && e.on !== !1).map((e) => `${e.property || "all"} ${se(e.duration ?? 200)} ${e.easing || "ease"}`);
|
|
275
|
+
if (ie !== void 0 && ce.push(`${oe || "all"} ${se(ie)} ${ae || "ease"}`), ce.length && (t.transition = ce.join(", ")), t.textDecoration !== void 0 && (t.textDecorationLine = t.textDecoration, delete t.textDecoration), t.backgroundImage && !String(t.backgroundImage).includes("(") && (t.backgroundImage = `url("${t.backgroundImage}")`), n) {
|
|
240
276
|
let e = `${i || "rgba(0,0,0,0.5)"}, ${a || "transparent"}`, o = n === "radial" ? `radial-gradient(circle, ${e})` : `linear-gradient(${r ?? 180}deg, ${e})`;
|
|
241
277
|
t.backgroundImage = t.backgroundImage ? `${o}, ${t.backgroundImage}` : o;
|
|
242
278
|
}
|
|
243
279
|
delete t.backgroundVideo;
|
|
244
|
-
let { overlayColor:
|
|
245
|
-
if (delete t.overlayColor, delete t.overlayOpacity,
|
|
246
|
-
let e = `color-mix(in srgb, ${
|
|
280
|
+
let { overlayColor: G, overlayOpacity: le } = t;
|
|
281
|
+
if (delete t.overlayColor, delete t.overlayOpacity, G) {
|
|
282
|
+
let e = `color-mix(in srgb, ${G} ${le ?? 50}%, transparent)`, n = `linear-gradient(${e}, ${e})`;
|
|
247
283
|
t.backgroundImage = t.backgroundImage ? `${n}, ${t.backgroundImage}` : n;
|
|
248
284
|
}
|
|
249
285
|
t.backgroundImage && (t.backgroundSize ??= "cover", t.backgroundPosition ??= "center", t.backgroundRepeat ??= "no-repeat");
|
|
250
|
-
let { backgroundLayers:
|
|
286
|
+
let { backgroundLayers: ue } = t;
|
|
251
287
|
delete t.backgroundLayers;
|
|
252
|
-
let
|
|
253
|
-
if (
|
|
288
|
+
let de = (Array.isArray(ue) ? ue : []).filter((e) => e && e.on !== !1);
|
|
289
|
+
if (de.length) {
|
|
254
290
|
let e = [], n = [], r = [], i = [], a = [];
|
|
255
|
-
for (let t of
|
|
291
|
+
for (let t of de) if (t.kind === "linear") e.push(`linear-gradient(${t.angle ?? 180}deg, ${t.from || "rgba(0,0,0,0.5)"}, ${t.to || "transparent"})`), n.push("auto"), r.push("0% 0%"), i.push("repeat"), a.push("scroll");
|
|
256
292
|
else if (t.kind === "radial") e.push(`radial-gradient(circle, ${t.from || "rgba(0,0,0,0.5)"}, ${t.to || "transparent"})`), n.push("auto"), r.push("0% 0%"), i.push("repeat"), a.push("scroll");
|
|
257
293
|
else {
|
|
258
294
|
if (!t.src) continue;
|
|
259
|
-
e.push(`url("${t.src}")`), n.push(t.size === "custom" ? `${
|
|
295
|
+
e.push(`url("${t.src}")`), n.push(t.size === "custom" ? `${M(t.w ?? "auto")} ${M(t.h ?? "auto")}` : t.size || "cover"), r.push(`${M(t.posX ?? 0)} ${M(t.posY ?? 0)}`), i.push(t.repeat || "no-repeat"), a.push(t.fixed ? "fixed" : "scroll");
|
|
260
296
|
}
|
|
261
297
|
e.length && (t.backgroundImage && (e.push(t.backgroundImage), n.push(t.backgroundSize || "cover"), r.push(t.backgroundPosition || "center"), i.push(t.backgroundRepeat || "no-repeat"), a.push("scroll")), t.backgroundImage = e.join(", "), t.backgroundSize = n.join(", "), t.backgroundPosition = r.join(", "), t.backgroundRepeat = i.join(", "), t.backgroundAttachment = a.join(", "));
|
|
262
298
|
}
|
|
263
299
|
return t;
|
|
264
300
|
}
|
|
265
|
-
var
|
|
301
|
+
var F = {
|
|
266
302
|
hover: ":hover",
|
|
267
303
|
pressed: ":active",
|
|
268
304
|
focused: ":focus"
|
|
269
|
-
},
|
|
305
|
+
}, I = /* @__PURE__ */ new Set([
|
|
270
306
|
"style",
|
|
271
307
|
"class",
|
|
272
308
|
"id",
|
|
273
309
|
"data-wb",
|
|
274
310
|
"data-wb-class",
|
|
275
311
|
"data-slot"
|
|
276
|
-
]),
|
|
277
|
-
|
|
312
|
+
]), L = (e) => /^[a-zA-Z_][\w-]*$/.test(e) && !/^on/i.test(e) && !I.has(e.toLowerCase()), R = (e) => [...new Set(String(e ?? "").split(/\s+/).map((e) => e.replace(/^\./, "")).filter((e) => /^-?[_a-zA-Z][\w-]*$/.test(e)))], z = [
|
|
313
|
+
"click",
|
|
314
|
+
"dblclick",
|
|
315
|
+
"mouseenter",
|
|
316
|
+
"mouseleave",
|
|
317
|
+
"mousemove",
|
|
318
|
+
"focus",
|
|
319
|
+
"blur",
|
|
320
|
+
"input",
|
|
321
|
+
"change",
|
|
322
|
+
"submit",
|
|
323
|
+
"keydown",
|
|
324
|
+
"inview"
|
|
325
|
+
], B = ["load", "pagescroll"], V = [...z, ...B], H = /^[A-Za-z_$][\w$]*$/;
|
|
326
|
+
function U(e, t) {
|
|
327
|
+
let n = String(t ?? "").trim();
|
|
328
|
+
if (!n) return [e];
|
|
329
|
+
let r = e.closest?.(".webim-page") ?? document, i = /^[A-Za-z_][\w-]*$/.test(n) ? [`#${n}`, n] : [n];
|
|
330
|
+
for (let e of i) try {
|
|
331
|
+
let t = Array.from(r.querySelectorAll(e));
|
|
332
|
+
if (t.length) return t;
|
|
333
|
+
} catch {
|
|
334
|
+
return [];
|
|
335
|
+
}
|
|
336
|
+
return [];
|
|
337
|
+
}
|
|
338
|
+
function ee(e, t) {
|
|
339
|
+
for (let t of e.__webimEvents ?? []) t();
|
|
340
|
+
let n = [];
|
|
341
|
+
for (let r of t ?? []) {
|
|
342
|
+
let t = String(r?.event ?? ""), i = r?.action === "animation", a = i ? (Array.isArray(r?.animations) ? r.animations : [r?.animation]).map((e) => String(e ?? "").trim()).filter(Boolean) : [], o = i ? "" : String(r?.handler ?? "").trim();
|
|
343
|
+
if (!V.includes(t) || (i ? !a.length : !H.test(o))) continue;
|
|
344
|
+
let s = (t) => {
|
|
345
|
+
if (i) {
|
|
346
|
+
for (let t of U(e, r?.target)) x(t, a);
|
|
347
|
+
return;
|
|
348
|
+
}
|
|
349
|
+
let n = window[o];
|
|
350
|
+
typeof n == "function" && n.call(e, t);
|
|
351
|
+
};
|
|
352
|
+
if (t === "inview") {
|
|
353
|
+
if (typeof IntersectionObserver > "u") continue;
|
|
354
|
+
let t = new IntersectionObserver((e) => {
|
|
355
|
+
for (let n of e) n.isIntersecting && (t.disconnect(), s(n));
|
|
356
|
+
});
|
|
357
|
+
t.observe(e), n.push(() => t.disconnect());
|
|
358
|
+
} else if (t === "load") if (document.readyState === "complete") {
|
|
359
|
+
let e = setTimeout(s, 0);
|
|
360
|
+
n.push(() => clearTimeout(e));
|
|
361
|
+
} else window.addEventListener("load", s, { once: !0 }), n.push(() => window.removeEventListener("load", s));
|
|
362
|
+
else t === "pagescroll" ? (window.addEventListener("scroll", s, { passive: !0 }), n.push(() => window.removeEventListener("scroll", s))) : (e.addEventListener(t, s), n.push(() => e.removeEventListener(t, s)));
|
|
363
|
+
}
|
|
364
|
+
e.__webimEvents = n;
|
|
365
|
+
}
|
|
366
|
+
function te(e, t, n = []) {
|
|
278
367
|
t.htmlId ? e.id = t.htmlId : e.removeAttribute("id");
|
|
368
|
+
let r = R(t.classNames), i = R(e.getAttribute("data-wb-class"));
|
|
369
|
+
for (let t of i) r.includes(t) || e.classList.remove(t);
|
|
370
|
+
for (let t of r) e.classList.add(t);
|
|
371
|
+
r.length ? e.setAttribute("data-wb-class", r.join(" ")) : e.removeAttribute("data-wb-class");
|
|
279
372
|
for (let t of n) e.removeAttribute(t);
|
|
280
|
-
let
|
|
373
|
+
let a = [];
|
|
281
374
|
for (let n of t.attributes ?? []) {
|
|
282
375
|
let t = String(n?.name ?? "").trim();
|
|
283
|
-
|
|
376
|
+
L(t) && (e.setAttribute(t, n.value ?? ""), a.push(t));
|
|
284
377
|
}
|
|
285
|
-
return
|
|
378
|
+
return a;
|
|
286
379
|
}
|
|
287
|
-
var
|
|
288
|
-
function
|
|
289
|
-
let i = Object.entries(
|
|
380
|
+
var W = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
|
|
381
|
+
function ne(e, t, n, r = !1) {
|
|
382
|
+
let i = Object.entries(P(t)).map(([e, t]) => `${W(e)}: ${t} !important;`).join(" ");
|
|
290
383
|
return i ? `[data-wb="${e}"]${r ? "" : n} { ${i} }` : "";
|
|
291
384
|
}
|
|
292
|
-
function
|
|
293
|
-
return Object.entries(
|
|
385
|
+
function re(e, t, n) {
|
|
386
|
+
return Object.entries(F).map(([r, i]) => ne(e, t?.[r], i, n === r)).filter(Boolean).join("\n");
|
|
294
387
|
}
|
|
295
|
-
var
|
|
388
|
+
var ie = [
|
|
296
389
|
{
|
|
297
390
|
key: "tablet",
|
|
298
391
|
max: 991
|
|
@@ -305,17 +398,17 @@ var F = [
|
|
|
305
398
|
key: "mobile",
|
|
306
399
|
max: 478
|
|
307
400
|
}
|
|
308
|
-
],
|
|
309
|
-
function
|
|
310
|
-
return
|
|
311
|
-
let i = t?.[n] ?
|
|
401
|
+
], ae = (e) => Object.entries(P(e)).map(([e, t]) => `${W(e)}: ${t} !important;`).join(" ");
|
|
402
|
+
function oe(e, t) {
|
|
403
|
+
return ie.map(({ key: n, max: r }) => {
|
|
404
|
+
let i = t?.[n] ? ae(t[n]) : "";
|
|
312
405
|
return i ? `@media (max-width: ${r}px) { [data-wb="${e}"] { ${i} } }` : "";
|
|
313
406
|
}).filter(Boolean).join("\n");
|
|
314
407
|
}
|
|
315
|
-
function
|
|
408
|
+
function se(e, t) {
|
|
316
409
|
let n = [], r = (e) => {
|
|
317
410
|
for (let [t, r] of Object.entries(e || {})) {
|
|
318
|
-
let e =
|
|
411
|
+
let e = oe(t, r.props);
|
|
319
412
|
e && n.push(e);
|
|
320
413
|
}
|
|
321
414
|
};
|
|
@@ -323,10 +416,10 @@ function ne(e, t) {
|
|
|
323
416
|
for (let e of Object.values(t || {})) r(e.template?.nodes);
|
|
324
417
|
return n.join("\n");
|
|
325
418
|
}
|
|
326
|
-
function
|
|
419
|
+
function ce(e, t) {
|
|
327
420
|
let n = [], r = (e) => {
|
|
328
421
|
for (let [t, r] of Object.entries(e || {})) {
|
|
329
|
-
let e =
|
|
422
|
+
let e = re(t, r.props);
|
|
330
423
|
e && n.push(e);
|
|
331
424
|
}
|
|
332
425
|
};
|
|
@@ -334,7 +427,7 @@ function re(e, t) {
|
|
|
334
427
|
for (let e of Object.values(t || {})) r(e.template?.nodes);
|
|
335
428
|
return n.join("\n");
|
|
336
429
|
}
|
|
337
|
-
var
|
|
430
|
+
var G = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif", le = {
|
|
338
431
|
light: {
|
|
339
432
|
background: "#f2f2f2",
|
|
340
433
|
surface: "#f2f2f2",
|
|
@@ -375,23 +468,23 @@ var I = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Ari
|
|
|
375
468
|
contrastText: "#052e2b"
|
|
376
469
|
}
|
|
377
470
|
}
|
|
378
|
-
},
|
|
471
|
+
}, ue = {
|
|
379
472
|
font: "system",
|
|
380
473
|
headingFont: "inherit",
|
|
381
|
-
light:
|
|
382
|
-
dark:
|
|
383
|
-
},
|
|
474
|
+
light: le.light,
|
|
475
|
+
dark: le.dark
|
|
476
|
+
}, de = {
|
|
384
477
|
system: {
|
|
385
478
|
label: "System",
|
|
386
|
-
value:
|
|
479
|
+
value: G
|
|
387
480
|
},
|
|
388
481
|
inter: {
|
|
389
482
|
label: "Inter",
|
|
390
|
-
value: `"Inter", ${
|
|
483
|
+
value: `"Inter", ${G}`
|
|
391
484
|
},
|
|
392
485
|
outfit: {
|
|
393
486
|
label: "Outfit",
|
|
394
|
-
value: `"Outfit", ${
|
|
487
|
+
value: `"Outfit", ${G}`
|
|
395
488
|
},
|
|
396
489
|
serif: {
|
|
397
490
|
label: "Serif",
|
|
@@ -401,7 +494,7 @@ var I = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Ari
|
|
|
401
494
|
label: "Mono",
|
|
402
495
|
value: "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"
|
|
403
496
|
}
|
|
404
|
-
},
|
|
497
|
+
}, fe = (e, t) => de[e]?.value ?? k(e) ?? (typeof e == "string" && e.trim() ? `"${e.trim()}", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif` : t), pe = (e, ...t) => {
|
|
405
498
|
let n = Object.assign({}, e, ...t);
|
|
406
499
|
return n.primary = {
|
|
407
500
|
...e.primary,
|
|
@@ -417,20 +510,20 @@ var I = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Ari
|
|
|
417
510
|
}), {})
|
|
418
511
|
}, n;
|
|
419
512
|
};
|
|
420
|
-
function
|
|
513
|
+
function me(e) {
|
|
421
514
|
let { light: t, dark: n, font: r, headingFont: i, ...a } = e ?? {};
|
|
422
515
|
return {
|
|
423
|
-
font: r ??
|
|
424
|
-
headingFont: i ??
|
|
425
|
-
light:
|
|
426
|
-
dark:
|
|
516
|
+
font: r ?? ue.font,
|
|
517
|
+
headingFont: i ?? ue.headingFont,
|
|
518
|
+
light: pe(le.light, a, t),
|
|
519
|
+
dark: pe(le.dark, n)
|
|
427
520
|
};
|
|
428
521
|
}
|
|
429
|
-
function
|
|
522
|
+
function he(e) {
|
|
430
523
|
return {
|
|
431
524
|
"--page-bg": e.background,
|
|
432
525
|
"--page-surface": e.surface ?? e.background,
|
|
433
|
-
"--page-border": e.border ??
|
|
526
|
+
"--page-border": e.border ?? le.light.border,
|
|
434
527
|
"--page-text": e.text,
|
|
435
528
|
"--page-accent": e.accent,
|
|
436
529
|
"--page-accent-text": e.accentText,
|
|
@@ -444,58 +537,58 @@ function B(e) {
|
|
|
444
537
|
"--page-secondary-contrast": e.secondary.contrastText
|
|
445
538
|
};
|
|
446
539
|
}
|
|
447
|
-
function
|
|
448
|
-
let t =
|
|
540
|
+
function ge(e) {
|
|
541
|
+
let t = me(e);
|
|
449
542
|
return {
|
|
450
543
|
backgroundColor: "var(--page-bg)",
|
|
451
544
|
color: "var(--page-text)",
|
|
452
|
-
fontFamily:
|
|
453
|
-
"--page-heading-font": t.headingFont === "inherit" ? "inherit" :
|
|
545
|
+
fontFamily: fe(t.font, G),
|
|
546
|
+
"--page-heading-font": t.headingFont === "inherit" ? "inherit" : fe(t.headingFont, "inherit")
|
|
454
547
|
};
|
|
455
548
|
}
|
|
456
|
-
function
|
|
457
|
-
let n =
|
|
549
|
+
function _e(e, t = "light") {
|
|
550
|
+
let n = me(e);
|
|
458
551
|
return {
|
|
459
|
-
...
|
|
460
|
-
...
|
|
552
|
+
...ge(e),
|
|
553
|
+
...he(n[t] ?? n.light)
|
|
461
554
|
};
|
|
462
555
|
}
|
|
463
|
-
function
|
|
556
|
+
function ve(e, t) {
|
|
464
557
|
return e?.themeRef && t?.[e.themeRef] || e?.theme;
|
|
465
558
|
}
|
|
466
|
-
function
|
|
559
|
+
function ye(e, t) {
|
|
467
560
|
return e === "light" || e === "dark" ? e : t === "light" || t === "dark" ? t : "auto";
|
|
468
561
|
}
|
|
469
562
|
//#endregion
|
|
470
563
|
//#region ../ui/src/components/builder/views.jsx
|
|
471
|
-
var
|
|
564
|
+
var K = n({
|
|
472
565
|
tenant: "",
|
|
473
566
|
apiUrl: "/api",
|
|
474
567
|
locale: "",
|
|
475
568
|
settings: null
|
|
476
|
-
}),
|
|
569
|
+
}), q = n(null), be = (e) => {
|
|
477
570
|
let t = Number(e?.__page);
|
|
478
571
|
if (Number.isFinite(t) && t >= 1) return Math.floor(t);
|
|
479
572
|
if (typeof window > "u") return 1;
|
|
480
573
|
let n = Number(new URLSearchParams(window.location.search).get("page"));
|
|
481
574
|
return Number.isFinite(n) && n >= 1 ? Math.floor(n) : 1;
|
|
482
|
-
},
|
|
575
|
+
}, xe = () => {
|
|
483
576
|
if (typeof window > "u") return {};
|
|
484
577
|
let e = {};
|
|
485
578
|
return new URLSearchParams(window.location.search).forEach((t, n) => {
|
|
486
579
|
n.startsWith("f_") && n.length > 2 && t !== "" && (e[n.slice(2)] = t);
|
|
487
580
|
}), e;
|
|
488
|
-
},
|
|
581
|
+
}, Se = (e) => {
|
|
489
582
|
let t = {
|
|
490
583
|
...e && typeof e == "object" && !Array.isArray(e) ? e : {},
|
|
491
|
-
...
|
|
584
|
+
...xe()
|
|
492
585
|
};
|
|
493
586
|
return Object.fromEntries(Object.entries(t).filter(([, e]) => typeof e == "string" && e.trim() !== ""));
|
|
494
|
-
},
|
|
495
|
-
function
|
|
587
|
+
}, Ce = n(null), we = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
588
|
+
function Te(e, t) {
|
|
496
589
|
if (t) return t.includes(".") ? t.split(".").reduce((e, t) => e && typeof e == "object" ? e[t] : void 0, e) : e?.[t];
|
|
497
590
|
}
|
|
498
|
-
var
|
|
591
|
+
var Ee = (e) => {
|
|
499
592
|
let t = [];
|
|
500
593
|
for (let [n, r] of Object.entries(e ?? {})) {
|
|
501
594
|
if (!/^[\w-]+$/.test(n)) continue;
|
|
@@ -505,36 +598,36 @@ var me = (e) => {
|
|
|
505
598
|
}
|
|
506
599
|
return t;
|
|
507
600
|
};
|
|
508
|
-
function
|
|
601
|
+
function J(e) {
|
|
509
602
|
return e == null ? "" : typeof e == "string" || typeof e == "number" || typeof e == "boolean" ? String(e) : typeof e == "object" && !Array.isArray(e) && ("label" in e || "name" in e || "slug" in e) ? String(e.label ?? e.name ?? e.slug ?? "") : typeof e == "object" && !Array.isArray(e) && Number.isFinite(Number(e.lat)) && Number.isFinite(Number(e.lng)) ? `${e.lat}, ${e.lng}` : Array.isArray(e) ? e.map((e) => typeof e == "string" ? e : Array.isArray(e?.parts) ? e.parts.map((e) => e?.text ?? "").join("") : Array.isArray(e?.items) ? e.items.map((e) => e?.text ?? "").join(" ") : e && (e.label != null || e.name != null || e.slug != null) ? String(e.label ?? e.name ?? e.slug) : "").filter(Boolean).join(" ") : "";
|
|
510
603
|
}
|
|
511
|
-
function
|
|
512
|
-
let n = t?.data ?? {}, r =
|
|
604
|
+
function De(e, t) {
|
|
605
|
+
let n = t?.data ?? {}, r = Ee(n);
|
|
513
606
|
if (!r.length) return e;
|
|
514
|
-
let i = RegExp(`:(${r.map(
|
|
607
|
+
let i = RegExp(`:(${r.map(we).sort((e, t) => t.length - e.length).join("|")})`, "g"), a = (e) => typeof e == "string" ? e.replace(i, (e, t) => J(Te(n, t))) : Array.isArray(e) ? e.map(a) : e && typeof e == "object" ? Object.fromEntries(Object.entries(e).map(([e, t]) => [e, a(t)])) : e;
|
|
515
608
|
return a(e);
|
|
516
609
|
}
|
|
517
|
-
var
|
|
610
|
+
var Oe = {
|
|
518
611
|
margin: 0,
|
|
519
612
|
fontWeight: 700,
|
|
520
613
|
lineHeight: 1.2,
|
|
521
614
|
fontFamily: "var(--page-heading-font, inherit)"
|
|
522
|
-
},
|
|
615
|
+
}, ke = { margin: 0 }, Y = {
|
|
523
616
|
display: "inline-block",
|
|
524
617
|
textDecoration: "none",
|
|
525
618
|
cursor: "pointer",
|
|
526
619
|
backgroundColor: "var(--page-accent, #111827)",
|
|
527
620
|
color: "var(--page-accent-text, #ffffff)"
|
|
528
|
-
},
|
|
621
|
+
}, Ae = {
|
|
529
622
|
flexGrow: 1,
|
|
530
623
|
display: "flex",
|
|
531
624
|
flexDirection: "column",
|
|
532
625
|
position: "relative"
|
|
533
|
-
},
|
|
626
|
+
}, je = {
|
|
534
627
|
display: "flex",
|
|
535
628
|
flexDirection: "column"
|
|
536
629
|
};
|
|
537
|
-
function
|
|
630
|
+
function Me({ style: e }) {
|
|
538
631
|
let t = e?.backgroundVideo;
|
|
539
632
|
if (!t) return null;
|
|
540
633
|
let n = {
|
|
@@ -560,32 +653,32 @@ function be({ style: e }) {
|
|
|
560
653
|
background: r
|
|
561
654
|
} })] });
|
|
562
655
|
}
|
|
563
|
-
var
|
|
656
|
+
var Ne = (e, t) => e?.backgroundVideo ? {
|
|
564
657
|
position: "relative",
|
|
565
658
|
...t,
|
|
566
|
-
...
|
|
659
|
+
...P(e)
|
|
567
660
|
} : {
|
|
568
661
|
...t,
|
|
569
|
-
...
|
|
662
|
+
...P(e)
|
|
570
663
|
};
|
|
571
|
-
function
|
|
664
|
+
function Pe({ style: e, nodeRef: t, children: n }) {
|
|
572
665
|
return /* @__PURE__ */ f("div", {
|
|
573
666
|
ref: t,
|
|
574
667
|
style: {
|
|
575
|
-
...
|
|
576
|
-
...
|
|
668
|
+
...Ae,
|
|
669
|
+
...P(e)
|
|
577
670
|
},
|
|
578
|
-
children: [/* @__PURE__ */ d(
|
|
671
|
+
children: [/* @__PURE__ */ d(Me, { style: e }), n]
|
|
579
672
|
});
|
|
580
673
|
}
|
|
581
|
-
function
|
|
674
|
+
function Fe({ style: e, nodeRef: t, children: n }) {
|
|
582
675
|
return /* @__PURE__ */ f("section", {
|
|
583
676
|
ref: t,
|
|
584
|
-
style:
|
|
585
|
-
children: [/* @__PURE__ */ d(
|
|
677
|
+
style: Ne(e, je),
|
|
678
|
+
children: [/* @__PURE__ */ d(Me, { style: e }), n]
|
|
586
679
|
});
|
|
587
680
|
}
|
|
588
|
-
function
|
|
681
|
+
function Ie({ style: e, freeLayout: t, nodeRef: n, children: r }) {
|
|
589
682
|
let i = t ? {
|
|
590
683
|
position: "relative",
|
|
591
684
|
minHeight: 240
|
|
@@ -594,32 +687,32 @@ function we({ style: e, freeLayout: t, nodeRef: n, children: r }) {
|
|
|
594
687
|
ref: n,
|
|
595
688
|
style: i ? {
|
|
596
689
|
...i,
|
|
597
|
-
...
|
|
598
|
-
} :
|
|
599
|
-
children: [/* @__PURE__ */ d(
|
|
690
|
+
...Ne(e)
|
|
691
|
+
} : Ne(e),
|
|
692
|
+
children: [/* @__PURE__ */ d(Me, { style: e }), r]
|
|
600
693
|
});
|
|
601
694
|
}
|
|
602
|
-
function
|
|
695
|
+
function Le({ text: e, parts: t, tag: n = "h2", style: r, linked: i, nodeRef: a }) {
|
|
603
696
|
return /* @__PURE__ */ d(n, {
|
|
604
697
|
ref: a,
|
|
605
698
|
style: {
|
|
606
|
-
...
|
|
607
|
-
...
|
|
699
|
+
...Oe,
|
|
700
|
+
...P(r)
|
|
608
701
|
},
|
|
609
|
-
children:
|
|
702
|
+
children: X(t, e, i)
|
|
610
703
|
});
|
|
611
704
|
}
|
|
612
|
-
var
|
|
613
|
-
fontFamily:
|
|
705
|
+
var Re = {
|
|
706
|
+
fontFamily: de.mono.value,
|
|
614
707
|
background: "rgba(148, 163, 184, 0.18)",
|
|
615
708
|
padding: "1px 5px",
|
|
616
709
|
borderRadius: 4,
|
|
617
710
|
fontSize: "0.9em"
|
|
618
711
|
};
|
|
619
|
-
function
|
|
712
|
+
function ze(e, t = [], n, r) {
|
|
620
713
|
let i = e;
|
|
621
714
|
return t.includes("sup") ? i = /* @__PURE__ */ d("sup", { children: i }) : t.includes("sub") && (i = /* @__PURE__ */ d("sub", { children: i })), t.includes("code") && (i = /* @__PURE__ */ d("code", {
|
|
622
|
-
style:
|
|
715
|
+
style: Re,
|
|
623
716
|
children: i
|
|
624
717
|
})), t.includes("strike") && (i = /* @__PURE__ */ d("s", { children: i })), t.includes("underline") && (i = /* @__PURE__ */ d("u", { children: i })), t.includes("italic") && (i = /* @__PURE__ */ d("em", { children: i })), t.includes("bold") && (i = /* @__PURE__ */ d("strong", { children: i })), n && (i = /* @__PURE__ */ d("a", {
|
|
625
718
|
href: n,
|
|
@@ -629,13 +722,13 @@ function De(e, t = [], n, r) {
|
|
|
629
722
|
children: i
|
|
630
723
|
})), i;
|
|
631
724
|
}
|
|
632
|
-
function
|
|
725
|
+
function X(e, n, r) {
|
|
633
726
|
return e?.length ? e.map((e, n) => {
|
|
634
727
|
if (e.slot) return /* @__PURE__ */ d(t, { children: r?.[e.slot] ?? null }, n);
|
|
635
|
-
if (e.parts) return /* @__PURE__ */ d(t, { children:
|
|
728
|
+
if (e.parts) return /* @__PURE__ */ d(t, { children: X(e.parts, "", r) }, n);
|
|
636
729
|
let i = e.text;
|
|
637
730
|
return e.sup ? i = /* @__PURE__ */ d("sup", { children: i }) : e.sub && (i = /* @__PURE__ */ d("sub", { children: i })), e.code && (i = /* @__PURE__ */ d("code", {
|
|
638
|
-
style:
|
|
731
|
+
style: Re,
|
|
639
732
|
children: i
|
|
640
733
|
})), e.strike && (i = /* @__PURE__ */ d("s", { children: i })), e.underline && (i = /* @__PURE__ */ d("u", { children: i })), e.italic && (i = /* @__PURE__ */ d("em", { children: i })), e.bold && (i = /* @__PURE__ */ d("strong", { children: i })), (e.color || e.background) && (i = /* @__PURE__ */ d("span", {
|
|
641
734
|
style: {
|
|
@@ -652,13 +745,13 @@ function J(e, n, r) {
|
|
|
652
745
|
})), /* @__PURE__ */ d(t, { children: i }, n);
|
|
653
746
|
}) : n;
|
|
654
747
|
}
|
|
655
|
-
function
|
|
748
|
+
function Be({ parts: e, text: t, marks: n, href: r, target: i, style: a }) {
|
|
656
749
|
return /* @__PURE__ */ d("span", {
|
|
657
|
-
style:
|
|
658
|
-
children: e?.length ?
|
|
750
|
+
style: P(a),
|
|
751
|
+
children: e?.length ? X(e, t) : ze(t, n, r, i)
|
|
659
752
|
});
|
|
660
753
|
}
|
|
661
|
-
var
|
|
754
|
+
var Ve = {
|
|
662
755
|
h1: 40,
|
|
663
756
|
h2: 32,
|
|
664
757
|
h3: 26,
|
|
@@ -666,7 +759,7 @@ var ke = {
|
|
|
666
759
|
h5: 19,
|
|
667
760
|
h6: 16
|
|
668
761
|
};
|
|
669
|
-
function
|
|
762
|
+
function He({ align: e = "center", width: t, wrap: n } = {}) {
|
|
670
763
|
let r = t ? `${t}%` : void 0;
|
|
671
764
|
if (e === "full") return { width: "100%" };
|
|
672
765
|
let i = e === "left" || e === "right";
|
|
@@ -700,8 +793,8 @@ function Ae({ align: e = "center", width: t, wrap: n } = {}) {
|
|
|
700
793
|
marginRight: "auto"
|
|
701
794
|
};
|
|
702
795
|
}
|
|
703
|
-
function
|
|
704
|
-
let r = n ?? ((e, n) =>
|
|
796
|
+
function Ue(e = [], t, n) {
|
|
797
|
+
let r = n ?? ((e, n) => X(e, n, t));
|
|
705
798
|
return e.map((t, n) => {
|
|
706
799
|
let i = {
|
|
707
800
|
marginTop: 0,
|
|
@@ -723,7 +816,7 @@ function je(e = [], t, n) {
|
|
|
723
816
|
marginLeft: 0,
|
|
724
817
|
marginRight: 0,
|
|
725
818
|
...i,
|
|
726
|
-
...
|
|
819
|
+
...He(t)
|
|
727
820
|
},
|
|
728
821
|
children: [t.href ? /* @__PURE__ */ d("a", {
|
|
729
822
|
href: t.href,
|
|
@@ -742,16 +835,16 @@ function je(e = [], t, n) {
|
|
|
742
835
|
})]
|
|
743
836
|
}, n);
|
|
744
837
|
}
|
|
745
|
-
if (t.type === "video") return
|
|
838
|
+
if (t.type === "video") return et(t.url) ? /* @__PURE__ */ d("div", {
|
|
746
839
|
style: {
|
|
747
840
|
...i,
|
|
748
|
-
...
|
|
841
|
+
...He({
|
|
749
842
|
align: t.align,
|
|
750
843
|
wrap: t.wrap,
|
|
751
844
|
width: t.width ?? 100
|
|
752
845
|
})
|
|
753
846
|
},
|
|
754
|
-
children: /* @__PURE__ */ d(
|
|
847
|
+
children: /* @__PURE__ */ d(tt, {
|
|
755
848
|
url: t.url,
|
|
756
849
|
autoplay: t.autoplay,
|
|
757
850
|
muted: t.muted,
|
|
@@ -813,17 +906,17 @@ function je(e = [], t, n) {
|
|
|
813
906
|
}
|
|
814
907
|
if (t.type === "quote") return /* @__PURE__ */ d("blockquote", {
|
|
815
908
|
style: {
|
|
816
|
-
...
|
|
909
|
+
...Ge,
|
|
817
910
|
...i
|
|
818
911
|
},
|
|
819
912
|
children: r(t.parts, t.text)
|
|
820
913
|
}, n);
|
|
821
|
-
if (
|
|
914
|
+
if (Ve[t.type]) {
|
|
822
915
|
let e = t.type;
|
|
823
916
|
return /* @__PURE__ */ d(e, {
|
|
824
917
|
style: {
|
|
825
|
-
...
|
|
826
|
-
fontSize:
|
|
918
|
+
...Oe,
|
|
919
|
+
fontSize: Ve[t.type],
|
|
827
920
|
...i
|
|
828
921
|
},
|
|
829
922
|
children: r(t.parts, t.text)
|
|
@@ -831,95 +924,95 @@ function je(e = [], t, n) {
|
|
|
831
924
|
}
|
|
832
925
|
return /* @__PURE__ */ d("p", {
|
|
833
926
|
style: {
|
|
834
|
-
...
|
|
927
|
+
...ke,
|
|
835
928
|
...i
|
|
836
929
|
},
|
|
837
930
|
children: r(t.parts, t.text)
|
|
838
931
|
}, n);
|
|
839
932
|
});
|
|
840
933
|
}
|
|
841
|
-
function
|
|
934
|
+
function We({ content: e, style: t, linked: n, nodeRef: r }) {
|
|
842
935
|
return /* @__PURE__ */ d("div", {
|
|
843
936
|
ref: r,
|
|
844
937
|
style: {
|
|
845
938
|
display: "flow-root",
|
|
846
|
-
...
|
|
939
|
+
...P(t)
|
|
847
940
|
},
|
|
848
|
-
children:
|
|
941
|
+
children: Ue(e, n)
|
|
849
942
|
});
|
|
850
943
|
}
|
|
851
|
-
var
|
|
944
|
+
var Ge = {
|
|
852
945
|
margin: 0,
|
|
853
946
|
padding: "8px 0 8px 20px",
|
|
854
947
|
borderLeft: "4px solid var(--page-accent, rgba(148, 163, 184, 0.6))"
|
|
855
948
|
};
|
|
856
|
-
function
|
|
949
|
+
function Ke({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
|
|
857
950
|
return /* @__PURE__ */ d("blockquote", {
|
|
858
951
|
ref: i,
|
|
859
952
|
style: {
|
|
860
|
-
...
|
|
861
|
-
...
|
|
953
|
+
...Ge,
|
|
954
|
+
...P(n)
|
|
862
955
|
},
|
|
863
|
-
children:
|
|
956
|
+
children: X(t, e, r)
|
|
864
957
|
});
|
|
865
958
|
}
|
|
866
|
-
function
|
|
959
|
+
function qe({ ordered: e, items: t = [], style: n, nodeRef: r }) {
|
|
867
960
|
return /* @__PURE__ */ d(e ? "ol" : "ul", {
|
|
868
961
|
ref: r,
|
|
869
962
|
style: {
|
|
870
963
|
margin: 0,
|
|
871
964
|
paddingLeft: 24,
|
|
872
|
-
...
|
|
965
|
+
...P(n)
|
|
873
966
|
},
|
|
874
967
|
children: t.map((e, t) => /* @__PURE__ */ d("li", {
|
|
875
968
|
style: { marginBottom: 4 },
|
|
876
|
-
children:
|
|
969
|
+
children: X(e.parts, e.text)
|
|
877
970
|
}, t))
|
|
878
971
|
});
|
|
879
972
|
}
|
|
880
|
-
function
|
|
973
|
+
function Je({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
|
|
881
974
|
return /* @__PURE__ */ d("p", {
|
|
882
975
|
ref: i,
|
|
883
976
|
style: {
|
|
884
|
-
...
|
|
885
|
-
...
|
|
977
|
+
...ke,
|
|
978
|
+
...P(n)
|
|
886
979
|
},
|
|
887
|
-
children:
|
|
980
|
+
children: X(t, e, r)
|
|
888
981
|
});
|
|
889
982
|
}
|
|
890
|
-
var
|
|
983
|
+
var Ye = {
|
|
891
984
|
color: "var(--page-accent, inherit)",
|
|
892
985
|
textDecoration: "underline",
|
|
893
986
|
textUnderlineOffset: 3,
|
|
894
987
|
cursor: "pointer"
|
|
895
988
|
};
|
|
896
|
-
function
|
|
989
|
+
function Xe({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
|
|
897
990
|
return /* @__PURE__ */ d("a", {
|
|
898
991
|
ref: o,
|
|
899
992
|
href: n || "#",
|
|
900
993
|
target: r || void 0,
|
|
901
994
|
rel: r === "_blank" ? "noopener noreferrer" : void 0,
|
|
902
995
|
style: {
|
|
903
|
-
...
|
|
904
|
-
...
|
|
996
|
+
...Ye,
|
|
997
|
+
...P(i)
|
|
905
998
|
},
|
|
906
|
-
children:
|
|
999
|
+
children: X(t, e, a)
|
|
907
1000
|
});
|
|
908
1001
|
}
|
|
909
|
-
function
|
|
1002
|
+
function Ze({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
|
|
910
1003
|
return /* @__PURE__ */ d("a", {
|
|
911
1004
|
ref: o,
|
|
912
1005
|
href: n || "#",
|
|
913
1006
|
target: r || void 0,
|
|
914
1007
|
rel: r === "_blank" ? "noopener noreferrer" : void 0,
|
|
915
1008
|
style: {
|
|
916
|
-
...
|
|
917
|
-
...
|
|
1009
|
+
...Y,
|
|
1010
|
+
...P(i)
|
|
918
1011
|
},
|
|
919
|
-
children:
|
|
1012
|
+
children: X(t, e, a)
|
|
920
1013
|
});
|
|
921
1014
|
}
|
|
922
|
-
function
|
|
1015
|
+
function Qe({ src: e, alt: t, style: n, nodeRef: r }) {
|
|
923
1016
|
return e ? /* @__PURE__ */ d("img", {
|
|
924
1017
|
ref: r,
|
|
925
1018
|
src: e,
|
|
@@ -927,11 +1020,11 @@ function Be({ src: e, alt: t, style: n, nodeRef: r }) {
|
|
|
927
1020
|
style: {
|
|
928
1021
|
display: "block",
|
|
929
1022
|
maxWidth: "100%",
|
|
930
|
-
...
|
|
1023
|
+
...P(n)
|
|
931
1024
|
}
|
|
932
1025
|
}) : null;
|
|
933
1026
|
}
|
|
934
|
-
function
|
|
1027
|
+
function $e({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !1, muted: a = !1, style: o, nodeRef: s }) {
|
|
935
1028
|
return e ? /* @__PURE__ */ d("video", {
|
|
936
1029
|
ref: s,
|
|
937
1030
|
src: e,
|
|
@@ -945,13 +1038,13 @@ function Ve({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !
|
|
|
945
1038
|
display: "block",
|
|
946
1039
|
width: "100%",
|
|
947
1040
|
maxWidth: "100%",
|
|
948
|
-
...
|
|
1041
|
+
...P(o)
|
|
949
1042
|
}
|
|
950
1043
|
}) : null;
|
|
951
1044
|
}
|
|
952
|
-
var
|
|
953
|
-
function
|
|
954
|
-
let c =
|
|
1045
|
+
var et = (e = "") => (e.match(/(?:youtu\.be\/|v=|embed\/|shorts\/|live\/)([\w-]{11})/) || e.match(/^([\w-]{11})$/))?.[1];
|
|
1046
|
+
function tt({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i = !0, start: a, style: o, nodeRef: s }) {
|
|
1047
|
+
let c = et(e);
|
|
955
1048
|
if (!c) return null;
|
|
956
1049
|
let l = new URLSearchParams({ rel: "0" });
|
|
957
1050
|
return t && l.set("autoplay", "1"), (n || t) && l.set("mute", "1"), i || l.set("controls", "0"), r && (l.set("loop", "1"), l.set("playlist", c)), Number(a) > 0 && l.set("start", String(Math.floor(Number(a)))), /* @__PURE__ */ d("div", {
|
|
@@ -960,7 +1053,7 @@ function Ue({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i
|
|
|
960
1053
|
position: "relative",
|
|
961
1054
|
width: "100%",
|
|
962
1055
|
paddingTop: "56.25%",
|
|
963
|
-
...
|
|
1056
|
+
...P(o)
|
|
964
1057
|
},
|
|
965
1058
|
children: /* @__PURE__ */ d("iframe", {
|
|
966
1059
|
src: `https://www.youtube-nocookie.com/embed/${c}?${l}`,
|
|
@@ -977,7 +1070,7 @@ function Ue({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i
|
|
|
977
1070
|
})
|
|
978
1071
|
});
|
|
979
1072
|
}
|
|
980
|
-
function
|
|
1073
|
+
function nt({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i }) {
|
|
981
1074
|
return e ? /* @__PURE__ */ d("iframe", {
|
|
982
1075
|
ref: i,
|
|
983
1076
|
src: e,
|
|
@@ -989,11 +1082,11 @@ function We({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i })
|
|
|
989
1082
|
width: "100%",
|
|
990
1083
|
height: 300,
|
|
991
1084
|
border: 0,
|
|
992
|
-
...
|
|
1085
|
+
...P(r)
|
|
993
1086
|
}
|
|
994
1087
|
}) : null;
|
|
995
1088
|
}
|
|
996
|
-
function
|
|
1089
|
+
function rt({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
|
|
997
1090
|
let [i, o] = l(null);
|
|
998
1091
|
return a(() => {
|
|
999
1092
|
i && (i.innerHTML = e || "", t && i.querySelectorAll("script").forEach((e) => {
|
|
@@ -1009,10 +1102,10 @@ function Ge({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
|
|
|
1009
1102
|
ref: (e) => {
|
|
1010
1103
|
o(e), r && r(e);
|
|
1011
1104
|
},
|
|
1012
|
-
style:
|
|
1105
|
+
style: P(n)
|
|
1013
1106
|
});
|
|
1014
1107
|
}
|
|
1015
|
-
function
|
|
1108
|
+
function it({ height: e, nodeRef: t }) {
|
|
1016
1109
|
return /* @__PURE__ */ d("div", {
|
|
1017
1110
|
ref: t,
|
|
1018
1111
|
style: {
|
|
@@ -1022,18 +1115,18 @@ function Ke({ height: e, nodeRef: t }) {
|
|
|
1022
1115
|
}
|
|
1023
1116
|
});
|
|
1024
1117
|
}
|
|
1025
|
-
function
|
|
1118
|
+
function at({ style: e, nodeRef: t }) {
|
|
1026
1119
|
return /* @__PURE__ */ d("div", {
|
|
1027
1120
|
ref: t,
|
|
1028
1121
|
style: {
|
|
1029
1122
|
height: 1,
|
|
1030
1123
|
alignSelf: "stretch",
|
|
1031
1124
|
flexShrink: 0,
|
|
1032
|
-
...
|
|
1125
|
+
...P(e)
|
|
1033
1126
|
}
|
|
1034
1127
|
});
|
|
1035
1128
|
}
|
|
1036
|
-
var
|
|
1129
|
+
var ot = {
|
|
1037
1130
|
position: "absolute",
|
|
1038
1131
|
top: "50%",
|
|
1039
1132
|
transform: "translateY(-50%)",
|
|
@@ -1050,7 +1143,7 @@ var Je = {
|
|
|
1050
1143
|
alignItems: "center",
|
|
1051
1144
|
justifyContent: "center",
|
|
1052
1145
|
padding: 0
|
|
1053
|
-
},
|
|
1146
|
+
}, st = {
|
|
1054
1147
|
bottom: {
|
|
1055
1148
|
inset: "auto 0 0 0",
|
|
1056
1149
|
padding: "40px 24px 20px",
|
|
@@ -1069,8 +1162,8 @@ var Je = {
|
|
|
1069
1162
|
padding: 24,
|
|
1070
1163
|
textShadow: "0 2px 12px rgba(0, 0, 0, 0.6)"
|
|
1071
1164
|
}
|
|
1072
|
-
},
|
|
1073
|
-
function
|
|
1165
|
+
}, ct = 48;
|
|
1166
|
+
function lt({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, height: i = 320, swipe: o = !0, style: s, nodeRef: c }) {
|
|
1074
1167
|
let [p, m] = l(0), [h, g] = l(!1), [_, v] = l(null), y = e ? Math.min(p, e - 1) : 0;
|
|
1075
1168
|
if (a(() => {
|
|
1076
1169
|
if (!n || h || _ || e < 2) return;
|
|
@@ -1086,7 +1179,7 @@ function Ze({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1086
1179
|
let b = (t) => m((t + e) % e), x = () => {
|
|
1087
1180
|
if (!_) return;
|
|
1088
1181
|
let { dx: e } = _;
|
|
1089
|
-
v(null), e < -48 ? b(y + 1) : e >
|
|
1182
|
+
v(null), e < -48 ? b(y + 1) : e > ct && b(y - 1);
|
|
1090
1183
|
};
|
|
1091
1184
|
return /* @__PURE__ */ f("div", {
|
|
1092
1185
|
ref: c,
|
|
@@ -1111,7 +1204,7 @@ function Ze({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1111
1204
|
touchAction: "pan-y",
|
|
1112
1205
|
userSelect: _ ? "none" : void 0,
|
|
1113
1206
|
cursor: _ ? "grabbing" : void 0,
|
|
1114
|
-
...
|
|
1207
|
+
...P(s)
|
|
1115
1208
|
},
|
|
1116
1209
|
children: [/* @__PURE__ */ d("div", {
|
|
1117
1210
|
style: {
|
|
@@ -1134,7 +1227,7 @@ function Ze({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1134
1227
|
type: "button",
|
|
1135
1228
|
"aria-label": "Previous slide",
|
|
1136
1229
|
style: {
|
|
1137
|
-
...
|
|
1230
|
+
...ot,
|
|
1138
1231
|
left: 12
|
|
1139
1232
|
},
|
|
1140
1233
|
onClick: () => b(y - 1),
|
|
@@ -1144,7 +1237,7 @@ function Ze({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1144
1237
|
type: "button",
|
|
1145
1238
|
"aria-label": "Next slide",
|
|
1146
1239
|
style: {
|
|
1147
|
-
...
|
|
1240
|
+
...ot,
|
|
1148
1241
|
right: 12
|
|
1149
1242
|
},
|
|
1150
1243
|
onClick: () => b(y + 1),
|
|
@@ -1178,7 +1271,7 @@ function Ze({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1178
1271
|
] })]
|
|
1179
1272
|
});
|
|
1180
1273
|
}
|
|
1181
|
-
var
|
|
1274
|
+
var ut = (e, t) => ({
|
|
1182
1275
|
position: "absolute",
|
|
1183
1276
|
inset: 0,
|
|
1184
1277
|
backgroundImage: e ? `url(${e})` : "none",
|
|
@@ -1186,18 +1279,18 @@ var Qe = (e, t) => ({
|
|
|
1186
1279
|
backgroundSize: "cover",
|
|
1187
1280
|
backgroundPosition: "center"
|
|
1188
1281
|
});
|
|
1189
|
-
function
|
|
1190
|
-
return e.length ? /* @__PURE__ */ d(
|
|
1282
|
+
function dt({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "left", ...r }) {
|
|
1283
|
+
return e.length ? /* @__PURE__ */ d(lt, {
|
|
1191
1284
|
...r,
|
|
1192
1285
|
count: e.length,
|
|
1193
1286
|
renderSlide: (r) => {
|
|
1194
1287
|
let i = e[r];
|
|
1195
|
-
return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style:
|
|
1288
|
+
return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style: ut(i.image) }), (i.title || i.text) && /* @__PURE__ */ f("div", {
|
|
1196
1289
|
style: {
|
|
1197
1290
|
position: "absolute",
|
|
1198
1291
|
color: "#fff",
|
|
1199
1292
|
textAlign: n,
|
|
1200
|
-
...
|
|
1293
|
+
...st[t] ?? st.bottom
|
|
1201
1294
|
},
|
|
1202
1295
|
children: [i.title && /* @__PURE__ */ d("div", {
|
|
1203
1296
|
style: {
|
|
@@ -1217,13 +1310,13 @@ function $e({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "
|
|
|
1217
1310
|
}
|
|
1218
1311
|
}) : null;
|
|
1219
1312
|
}
|
|
1220
|
-
function
|
|
1221
|
-
return e.length ? /* @__PURE__ */ d(
|
|
1313
|
+
function ft({ slides: e = [], linked: t, ...n }) {
|
|
1314
|
+
return e.length ? /* @__PURE__ */ d(lt, {
|
|
1222
1315
|
...n,
|
|
1223
1316
|
count: e.length,
|
|
1224
1317
|
renderSlide: (n) => {
|
|
1225
1318
|
let r = e[n];
|
|
1226
|
-
return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style:
|
|
1319
|
+
return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style: ut(r.image, r.color) }), /* @__PURE__ */ d("div", {
|
|
1227
1320
|
style: {
|
|
1228
1321
|
position: "absolute",
|
|
1229
1322
|
inset: 0,
|
|
@@ -1235,7 +1328,7 @@ function et({ slides: e = [], linked: t, ...n }) {
|
|
|
1235
1328
|
}
|
|
1236
1329
|
}) : null;
|
|
1237
1330
|
}
|
|
1238
|
-
function
|
|
1331
|
+
function pt({ images: e = [], columns: t = 3, gap: n = 8, showNames: r = !1, lightbox: i = !0, style: o, nodeRef: s, inert: c }) {
|
|
1239
1332
|
let p = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.src) : [], m = Math.max(0, Number(n) || 0), h = c ? (e) => e.preventDefault() : void 0, [g, _] = l(null), v = i && !c && g !== null && p[g];
|
|
1240
1333
|
a(() => {
|
|
1241
1334
|
if (!v) return;
|
|
@@ -1260,7 +1353,7 @@ function tt({ images: e = [], columns: t = 3, gap: n = 8, showNames: r = !1, lig
|
|
|
1260
1353
|
columnCount: Math.min(Math.max(Number(t) || 3, 1), 8),
|
|
1261
1354
|
columnGap: m,
|
|
1262
1355
|
width: "100%",
|
|
1263
|
-
...
|
|
1356
|
+
...P(o)
|
|
1264
1357
|
},
|
|
1265
1358
|
children: [
|
|
1266
1359
|
p.map((e, t) => {
|
|
@@ -1434,45 +1527,136 @@ function tt({ images: e = [], columns: t = 3, gap: n = 8, showNames: r = !1, lig
|
|
|
1434
1527
|
]
|
|
1435
1528
|
});
|
|
1436
1529
|
}
|
|
1437
|
-
var
|
|
1530
|
+
var mt = {
|
|
1438
1531
|
color: "inherit",
|
|
1439
1532
|
textDecoration: "none",
|
|
1440
1533
|
fontSize: 14,
|
|
1441
1534
|
opacity: .85
|
|
1442
|
-
},
|
|
1535
|
+
}, ht = {
|
|
1443
1536
|
background: "var(--page-surface, #f2f2f2)",
|
|
1444
1537
|
color: "var(--page-text, #111827)",
|
|
1445
1538
|
border: "1px solid rgba(148, 163, 184, 0.25)",
|
|
1446
1539
|
boxShadow: "0 16px 40px rgba(15, 23, 42, 0.16)",
|
|
1447
1540
|
zIndex: 60
|
|
1448
1541
|
};
|
|
1449
|
-
function
|
|
1450
|
-
let
|
|
1542
|
+
function gt(e, t = {}, n = "dropdown") {
|
|
1543
|
+
let r = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.id) : [], i = (e) => Array.isArray(e) ? e[0] : e, a = (e) => e == null ? "" : J(e), o = r.map((e) => {
|
|
1544
|
+
let n = e.data ?? {}, r = t.parentField ? i(n[t.parentField]) : null;
|
|
1545
|
+
return {
|
|
1546
|
+
key: e.id,
|
|
1547
|
+
parent: (r && typeof r == "object" ? r.id : r) || null,
|
|
1548
|
+
label: a(n[t.labelField || "name"]) || a(n.name) || "Untitled",
|
|
1549
|
+
href: t.hrefField ? a(n[t.hrefField]) : "",
|
|
1550
|
+
image: t.imageField && i(n[t.imageField]) || "",
|
|
1551
|
+
desc: t.descField ? a(n[t.descField]) : ""
|
|
1552
|
+
};
|
|
1553
|
+
}), s = new Map(o.map((e) => [e.key, e])), c = (e) => {
|
|
1554
|
+
let t = /* @__PURE__ */ new Set(), n = e;
|
|
1555
|
+
for (; n.parent && s.has(n.parent) && !t.has(n.key);) t.add(n.key), n = s.get(n.parent);
|
|
1556
|
+
return n;
|
|
1557
|
+
}, l = [], u = /* @__PURE__ */ new Map();
|
|
1558
|
+
for (let e of o) {
|
|
1559
|
+
if (c(e) !== e) continue;
|
|
1560
|
+
let t = {
|
|
1561
|
+
key: e.key,
|
|
1562
|
+
label: e.label,
|
|
1563
|
+
href: e.href,
|
|
1564
|
+
image: e.image,
|
|
1565
|
+
children: []
|
|
1566
|
+
};
|
|
1567
|
+
u.set(e.key, t), l.push(t);
|
|
1568
|
+
}
|
|
1569
|
+
for (let e of o) {
|
|
1570
|
+
let t = c(e);
|
|
1571
|
+
t !== e && u.get(t.key)?.children.push({
|
|
1572
|
+
key: e.key,
|
|
1573
|
+
label: e.label,
|
|
1574
|
+
href: e.href,
|
|
1575
|
+
image: e.image,
|
|
1576
|
+
desc: e.desc
|
|
1577
|
+
});
|
|
1578
|
+
}
|
|
1579
|
+
return l.map((e) => ({
|
|
1580
|
+
...e,
|
|
1581
|
+
type: e.children.length ? n : "link"
|
|
1582
|
+
}));
|
|
1583
|
+
}
|
|
1584
|
+
function _t({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], style: c, nodeRef: p, menu: m = "auto", breakpoint: h = 768, source: g = "", labelField: _ = "", hrefField: v = "", imageField: y = "", descField: b = "", parentField: x = "", submenu: S = "dropdown" }) {
|
|
1585
|
+
let [C, w] = l(null), [T, E] = l(!1), [D, O] = l(!1), [k, A] = l(null), { tenant: j, apiUrl: M } = i(K), N = i(q)?.[g], [F, I] = l(null);
|
|
1451
1586
|
a(() => {
|
|
1452
|
-
if (!
|
|
1453
|
-
let e =
|
|
1454
|
-
return
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1587
|
+
if (!g || N) return;
|
|
1588
|
+
let e = !0;
|
|
1589
|
+
return fetch(`${M}/dynamic/${encodeURIComponent(g)}`, { headers: j ? { "x-tenant": j } : {} }).then((e) => e.json()).then((t) => {
|
|
1590
|
+
let n = Array.isArray(t?.payload) ? t.payload : Array.isArray(t?.payload?.data) ? t.payload.data : [];
|
|
1591
|
+
e && I(n);
|
|
1592
|
+
}).catch(() => e && I([])), () => {
|
|
1593
|
+
e = !1;
|
|
1594
|
+
};
|
|
1595
|
+
}, [
|
|
1596
|
+
g,
|
|
1597
|
+
j,
|
|
1598
|
+
M,
|
|
1599
|
+
N
|
|
1600
|
+
]), a(() => {
|
|
1601
|
+
if (!C) return;
|
|
1602
|
+
let e = new ResizeObserver(() => E(C.offsetWidth < h));
|
|
1603
|
+
return e.observe(C), () => e.disconnect();
|
|
1604
|
+
}, [C, h]);
|
|
1605
|
+
let L = g ? gt(N ?? F ?? [], {
|
|
1606
|
+
labelField: _,
|
|
1607
|
+
hrefField: v,
|
|
1608
|
+
imageField: y,
|
|
1609
|
+
descField: b,
|
|
1610
|
+
parentField: x
|
|
1611
|
+
}, S) : s, R = m === "hamburger" || m === "auto" && T, z = (e, t, n = !1) => {
|
|
1612
|
+
let r = e.image ? /* @__PURE__ */ d("img", {
|
|
1613
|
+
src: e.image,
|
|
1614
|
+
alt: "",
|
|
1615
|
+
style: n ? {
|
|
1616
|
+
width: "100%",
|
|
1617
|
+
aspectRatio: "16 / 9",
|
|
1618
|
+
objectFit: "cover",
|
|
1619
|
+
borderRadius: 6,
|
|
1620
|
+
display: "block",
|
|
1621
|
+
marginBottom: 8
|
|
1622
|
+
} : {
|
|
1623
|
+
width: 22,
|
|
1624
|
+
height: 22,
|
|
1625
|
+
objectFit: "cover",
|
|
1626
|
+
borderRadius: 4,
|
|
1465
1627
|
display: "block",
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1628
|
+
flexShrink: 0
|
|
1629
|
+
}
|
|
1630
|
+
}) : null;
|
|
1631
|
+
return /* @__PURE__ */ f("a", {
|
|
1632
|
+
href: e.href || "#",
|
|
1633
|
+
style: {
|
|
1634
|
+
...mt,
|
|
1635
|
+
display: n ? "block" : "flex",
|
|
1636
|
+
alignItems: n ? void 0 : "center",
|
|
1637
|
+
gap: n ? void 0 : 10,
|
|
1638
|
+
...t
|
|
1469
1639
|
},
|
|
1470
|
-
children:
|
|
1471
|
-
|
|
1472
|
-
|
|
1640
|
+
children: [r, /* @__PURE__ */ f("span", {
|
|
1641
|
+
style: {
|
|
1642
|
+
display: "block",
|
|
1643
|
+
minWidth: 0
|
|
1644
|
+
},
|
|
1645
|
+
children: [e.label, e.desc && /* @__PURE__ */ d("span", {
|
|
1646
|
+
style: {
|
|
1647
|
+
display: "block",
|
|
1648
|
+
fontSize: 12,
|
|
1649
|
+
opacity: .6,
|
|
1650
|
+
marginTop: 2
|
|
1651
|
+
},
|
|
1652
|
+
children: e.desc
|
|
1653
|
+
})]
|
|
1654
|
+
})]
|
|
1655
|
+
}, e.key);
|
|
1656
|
+
};
|
|
1473
1657
|
return /* @__PURE__ */ f("nav", {
|
|
1474
1658
|
ref: (e) => {
|
|
1475
|
-
|
|
1659
|
+
w(e), p && p(e);
|
|
1476
1660
|
},
|
|
1477
1661
|
style: {
|
|
1478
1662
|
display: "flex",
|
|
@@ -1482,7 +1666,7 @@ function it({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], st
|
|
|
1482
1666
|
padding: "14px 24px",
|
|
1483
1667
|
width: "100%",
|
|
1484
1668
|
position: "relative",
|
|
1485
|
-
...
|
|
1669
|
+
...P(c)
|
|
1486
1670
|
},
|
|
1487
1671
|
children: [
|
|
1488
1672
|
(n || e) && (() => {
|
|
@@ -1500,7 +1684,7 @@ function it({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], st
|
|
|
1500
1684
|
fontFamily: "var(--page-heading-font, inherit)"
|
|
1501
1685
|
},
|
|
1502
1686
|
children: e
|
|
1503
|
-
})] }),
|
|
1687
|
+
})] }), i = {
|
|
1504
1688
|
display: "flex",
|
|
1505
1689
|
alignItems: "center",
|
|
1506
1690
|
gap: 10,
|
|
@@ -1509,20 +1693,20 @@ function it({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], st
|
|
|
1509
1693
|
};
|
|
1510
1694
|
return r ? /* @__PURE__ */ d("a", {
|
|
1511
1695
|
href: r,
|
|
1512
|
-
target:
|
|
1513
|
-
rel:
|
|
1514
|
-
style:
|
|
1696
|
+
target: o || void 0,
|
|
1697
|
+
rel: o === "_blank" ? "noopener noreferrer" : void 0,
|
|
1698
|
+
style: i,
|
|
1515
1699
|
children: t
|
|
1516
1700
|
}) : /* @__PURE__ */ d("div", {
|
|
1517
|
-
style:
|
|
1701
|
+
style: i,
|
|
1518
1702
|
children: t
|
|
1519
1703
|
});
|
|
1520
1704
|
})(),
|
|
1521
1705
|
/* @__PURE__ */ d("div", { style: { flexGrow: 1 } }),
|
|
1522
|
-
|
|
1706
|
+
R ? /* @__PURE__ */ d("button", {
|
|
1523
1707
|
type: "button",
|
|
1524
|
-
"aria-label":
|
|
1525
|
-
onClick: () =>
|
|
1708
|
+
"aria-label": D ? "Close menu" : "Open menu",
|
|
1709
|
+
onClick: () => O(!D),
|
|
1526
1710
|
style: {
|
|
1527
1711
|
background: "transparent",
|
|
1528
1712
|
border: 0,
|
|
@@ -1532,7 +1716,7 @@ function it({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], st
|
|
|
1532
1716
|
lineHeight: 1,
|
|
1533
1717
|
padding: 4
|
|
1534
1718
|
},
|
|
1535
|
-
children:
|
|
1719
|
+
children: D ? "✕" : "☰"
|
|
1536
1720
|
}) : /* @__PURE__ */ d("div", {
|
|
1537
1721
|
style: {
|
|
1538
1722
|
display: "flex",
|
|
@@ -1540,11 +1724,11 @@ function it({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], st
|
|
|
1540
1724
|
alignItems: "center",
|
|
1541
1725
|
flexWrap: "wrap"
|
|
1542
1726
|
},
|
|
1543
|
-
children:
|
|
1727
|
+
children: L.map((e) => {
|
|
1544
1728
|
let t = e.children ?? [];
|
|
1545
1729
|
if (!t.length) return /* @__PURE__ */ d("a", {
|
|
1546
1730
|
href: e.href || "#",
|
|
1547
|
-
style:
|
|
1731
|
+
style: mt,
|
|
1548
1732
|
children: e.label
|
|
1549
1733
|
}, e.key);
|
|
1550
1734
|
let n = e.type === "mega";
|
|
@@ -1553,12 +1737,12 @@ function it({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], st
|
|
|
1553
1737
|
position: n ? "static" : "relative",
|
|
1554
1738
|
display: "inline-flex"
|
|
1555
1739
|
},
|
|
1556
|
-
onMouseEnter: () =>
|
|
1557
|
-
onMouseLeave: () =>
|
|
1740
|
+
onMouseEnter: () => A(e.key),
|
|
1741
|
+
onMouseLeave: () => A(null),
|
|
1558
1742
|
children: [/* @__PURE__ */ f("a", {
|
|
1559
1743
|
href: e.href || "#",
|
|
1560
1744
|
style: {
|
|
1561
|
-
...
|
|
1745
|
+
...mt,
|
|
1562
1746
|
cursor: "pointer"
|
|
1563
1747
|
},
|
|
1564
1748
|
children: [
|
|
@@ -1572,9 +1756,9 @@ function it({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], st
|
|
|
1572
1756
|
children: "▼"
|
|
1573
1757
|
})
|
|
1574
1758
|
]
|
|
1575
|
-
}),
|
|
1759
|
+
}), k === e.key && (n ? /* @__PURE__ */ d("div", {
|
|
1576
1760
|
style: {
|
|
1577
|
-
...
|
|
1761
|
+
...ht,
|
|
1578
1762
|
position: "absolute",
|
|
1579
1763
|
left: 0,
|
|
1580
1764
|
right: 0,
|
|
@@ -1584,13 +1768,13 @@ function it({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], st
|
|
|
1584
1768
|
gridTemplateColumns: "repeat(auto-fit, minmax(170px, 1fr))",
|
|
1585
1769
|
gap: 16
|
|
1586
1770
|
},
|
|
1587
|
-
children: t.map((e) =>
|
|
1588
|
-
padding:
|
|
1589
|
-
borderRadius:
|
|
1590
|
-
}))
|
|
1771
|
+
children: t.map((e) => z(e, {
|
|
1772
|
+
padding: 8,
|
|
1773
|
+
borderRadius: 8
|
|
1774
|
+
}, !0))
|
|
1591
1775
|
}) : /* @__PURE__ */ d("div", {
|
|
1592
1776
|
style: {
|
|
1593
|
-
...
|
|
1777
|
+
...ht,
|
|
1594
1778
|
position: "absolute",
|
|
1595
1779
|
top: "100%",
|
|
1596
1780
|
left: 0,
|
|
@@ -1600,7 +1784,7 @@ function it({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], st
|
|
|
1600
1784
|
display: "flex",
|
|
1601
1785
|
flexDirection: "column"
|
|
1602
1786
|
},
|
|
1603
|
-
children: t.map((e) =>
|
|
1787
|
+
children: t.map((e) => z(e, {
|
|
1604
1788
|
padding: "8px 12px",
|
|
1605
1789
|
borderRadius: 6
|
|
1606
1790
|
}))
|
|
@@ -1608,7 +1792,7 @@ function it({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], st
|
|
|
1608
1792
|
}, e.key);
|
|
1609
1793
|
})
|
|
1610
1794
|
}),
|
|
1611
|
-
|
|
1795
|
+
R && D && /* @__PURE__ */ d("div", {
|
|
1612
1796
|
style: {
|
|
1613
1797
|
flexBasis: "100%",
|
|
1614
1798
|
width: "100%",
|
|
@@ -1616,27 +1800,27 @@ function it({ brand: e, logo: n, brandHref: r, brandTarget: i, links: o = [], st
|
|
|
1616
1800
|
flexDirection: "column",
|
|
1617
1801
|
paddingTop: 10
|
|
1618
1802
|
},
|
|
1619
|
-
children:
|
|
1803
|
+
children: L.map((e) => /* @__PURE__ */ f(t, { children: [/* @__PURE__ */ d("a", {
|
|
1620
1804
|
href: e.href || "#",
|
|
1621
1805
|
style: {
|
|
1622
|
-
...
|
|
1806
|
+
...mt,
|
|
1623
1807
|
padding: "10px 4px",
|
|
1624
1808
|
fontWeight: (e.children ?? []).length ? 600 : 400,
|
|
1625
1809
|
opacity: 1
|
|
1626
1810
|
},
|
|
1627
1811
|
children: e.label
|
|
1628
|
-
}), (e.children ?? []).map((e) =>
|
|
1812
|
+
}), (e.children ?? []).map((e) => z(e, { padding: "8px 4px 8px 22px" }))] }, e.key))
|
|
1629
1813
|
})
|
|
1630
1814
|
]
|
|
1631
1815
|
});
|
|
1632
1816
|
}
|
|
1633
|
-
function
|
|
1817
|
+
function vt({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
|
|
1634
1818
|
let [i, a] = l(0), o = e.length ? Math.min(i, e.length - 1) : 0;
|
|
1635
1819
|
return e.length ? /* @__PURE__ */ f("div", {
|
|
1636
1820
|
ref: r,
|
|
1637
1821
|
style: {
|
|
1638
1822
|
width: "100%",
|
|
1639
|
-
...
|
|
1823
|
+
...P(n)
|
|
1640
1824
|
},
|
|
1641
1825
|
children: [/* @__PURE__ */ d("div", {
|
|
1642
1826
|
style: {
|
|
@@ -1670,7 +1854,7 @@ function at({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
|
|
|
1670
1854
|
}, e.key))]
|
|
1671
1855
|
}) : null;
|
|
1672
1856
|
}
|
|
1673
|
-
function
|
|
1857
|
+
function yt({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }) {
|
|
1674
1858
|
let [a, o] = l(() => new Set(e.length ? [e[0].key] : []));
|
|
1675
1859
|
if (!e.length) return null;
|
|
1676
1860
|
let s = (e) => o((t) => {
|
|
@@ -1681,7 +1865,7 @@ function ot({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }
|
|
|
1681
1865
|
ref: i,
|
|
1682
1866
|
style: {
|
|
1683
1867
|
width: "100%",
|
|
1684
|
-
...
|
|
1868
|
+
...P(r)
|
|
1685
1869
|
},
|
|
1686
1870
|
children: e.map((n, r) => {
|
|
1687
1871
|
let i = a.has(n.key);
|
|
@@ -1727,15 +1911,15 @@ function ot({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }
|
|
|
1727
1911
|
})
|
|
1728
1912
|
});
|
|
1729
1913
|
}
|
|
1730
|
-
var
|
|
1914
|
+
var bt = {
|
|
1731
1915
|
display: "flex",
|
|
1732
1916
|
flexDirection: "column",
|
|
1733
1917
|
gap: "12px"
|
|
1734
|
-
},
|
|
1918
|
+
}, Z = {
|
|
1735
1919
|
fontSize: "14px",
|
|
1736
1920
|
fontWeight: 500,
|
|
1737
1921
|
color: "var(--page-text, #111827)"
|
|
1738
|
-
},
|
|
1922
|
+
}, Q = {
|
|
1739
1923
|
padding: "10px 12px",
|
|
1740
1924
|
border: "1px solid var(--page-border, #d1d5db)",
|
|
1741
1925
|
borderRadius: "6px",
|
|
@@ -1745,18 +1929,18 @@ var st = {
|
|
|
1745
1929
|
boxSizing: "border-box",
|
|
1746
1930
|
backgroundColor: "var(--page-surface, #f2f2f2)",
|
|
1747
1931
|
color: "var(--page-text, #111827)"
|
|
1748
|
-
},
|
|
1932
|
+
}, xt = {
|
|
1749
1933
|
display: "flex",
|
|
1750
1934
|
alignItems: "center",
|
|
1751
1935
|
gap: "8px",
|
|
1752
1936
|
fontSize: "14px",
|
|
1753
1937
|
color: "var(--page-text, #111827)"
|
|
1754
|
-
},
|
|
1938
|
+
}, $ = (e) => e ? {
|
|
1755
1939
|
readOnly: !0,
|
|
1756
1940
|
tabIndex: -1,
|
|
1757
1941
|
onMouseDown: (e) => e.preventDefault()
|
|
1758
1942
|
} : {};
|
|
1759
|
-
function
|
|
1943
|
+
function St(e, t) {
|
|
1760
1944
|
if (!e) return !0;
|
|
1761
1945
|
let n = t[e.field], r = n == null || n === "" ? "" : String(n), i = e.value ?? "";
|
|
1762
1946
|
switch (e.op) {
|
|
@@ -1770,11 +1954,11 @@ function lt(e, t) {
|
|
|
1770
1954
|
default: return !1;
|
|
1771
1955
|
}
|
|
1772
1956
|
}
|
|
1773
|
-
var
|
|
1957
|
+
var Ct = {
|
|
1774
1958
|
display: "flex",
|
|
1775
1959
|
flexDirection: "column",
|
|
1776
1960
|
gap: 6
|
|
1777
|
-
},
|
|
1961
|
+
}, wt = {
|
|
1778
1962
|
font: "inherit",
|
|
1779
1963
|
fontSize: 15,
|
|
1780
1964
|
padding: "10px 12px",
|
|
@@ -1785,16 +1969,16 @@ var ut = {
|
|
|
1785
1969
|
width: "100%",
|
|
1786
1970
|
boxSizing: "border-box"
|
|
1787
1971
|
};
|
|
1788
|
-
function
|
|
1972
|
+
function Tt(e, t) {
|
|
1789
1973
|
let n = Array.isArray(e?.options) ? e.options : [];
|
|
1790
1974
|
if (!e?.parentField) return n;
|
|
1791
1975
|
let r = t?.[e.parentField];
|
|
1792
1976
|
return r ? n.filter((e) => typeof e == "string" ? !1 : !e.parent || e.parent === r) : [];
|
|
1793
1977
|
}
|
|
1794
|
-
function
|
|
1978
|
+
function Et({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
1795
1979
|
let a = /* @__PURE__ */ f("span", {
|
|
1796
1980
|
style: {
|
|
1797
|
-
...
|
|
1981
|
+
...Z,
|
|
1798
1982
|
fontSize: 14
|
|
1799
1983
|
},
|
|
1800
1984
|
children: [e.label, e.required ? " *" : ""]
|
|
@@ -1803,7 +1987,7 @@ function pt({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1803
1987
|
required: e.required || void 0,
|
|
1804
1988
|
placeholder: e.placeholder || void 0,
|
|
1805
1989
|
disabled: r || void 0,
|
|
1806
|
-
style:
|
|
1990
|
+
style: wt,
|
|
1807
1991
|
value: t ?? "",
|
|
1808
1992
|
onChange: (t) => n(e.name, t.target.value)
|
|
1809
1993
|
};
|
|
@@ -1832,7 +2016,7 @@ function pt({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1832
2016
|
borderRadius: 8,
|
|
1833
2017
|
display: "block"
|
|
1834
2018
|
}
|
|
1835
|
-
}) : null : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ d(
|
|
2019
|
+
}) : null : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ d(tt, {
|
|
1836
2020
|
url: e.src,
|
|
1837
2021
|
style: { width: "100%" }
|
|
1838
2022
|
}) : /* @__PURE__ */ d("video", {
|
|
@@ -1844,14 +2028,14 @@ function pt({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1844
2028
|
display: "block"
|
|
1845
2029
|
}
|
|
1846
2030
|
}) : null : /* @__PURE__ */ f("label", {
|
|
1847
|
-
style:
|
|
2031
|
+
style: Ct,
|
|
1848
2032
|
children: [
|
|
1849
2033
|
a,
|
|
1850
2034
|
e.type === "textarea" || e.multiline ? /* @__PURE__ */ d("textarea", {
|
|
1851
2035
|
...o,
|
|
1852
2036
|
rows: 4,
|
|
1853
2037
|
style: {
|
|
1854
|
-
...
|
|
2038
|
+
...wt,
|
|
1855
2039
|
resize: "vertical"
|
|
1856
2040
|
}
|
|
1857
2041
|
}) : e.type === "select" ? /* @__PURE__ */ f("select", {
|
|
@@ -1860,7 +2044,7 @@ function pt({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1860
2044
|
children: [/* @__PURE__ */ d("option", {
|
|
1861
2045
|
value: "",
|
|
1862
2046
|
children: e.placeholder || "—"
|
|
1863
|
-
}),
|
|
2047
|
+
}), Tt(e, i).map((e, t) => /* @__PURE__ */ d("option", {
|
|
1864
2048
|
value: typeof e == "string" ? e : e.value,
|
|
1865
2049
|
children: typeof e == "string" ? e : e.label ?? e.value
|
|
1866
2050
|
}, t))]
|
|
@@ -1907,8 +2091,8 @@ function pt({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1907
2091
|
]
|
|
1908
2092
|
});
|
|
1909
2093
|
}
|
|
1910
|
-
function
|
|
1911
|
-
let { tenant: y, apiUrl: b } = i(
|
|
2094
|
+
function Dt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s, auto: c, submitLabel: p, nodeRef: m, inert: h, children: g, linked: _, show: v }) {
|
|
2095
|
+
let { tenant: y, apiUrl: b } = i(K), [x, S] = l("form"), [C, w] = l(null), [T, E] = l({}), [D, O] = l(0), k = h ? v || "form" : x;
|
|
1912
2096
|
a(() => {
|
|
1913
2097
|
if (!c || !s) return;
|
|
1914
2098
|
let e = !0;
|
|
@@ -1921,21 +2105,21 @@ function mt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
1921
2105
|
y,
|
|
1922
2106
|
b
|
|
1923
2107
|
]);
|
|
1924
|
-
let
|
|
2108
|
+
let A = [{
|
|
1925
2109
|
section: null,
|
|
1926
2110
|
fields: []
|
|
1927
2111
|
}];
|
|
1928
|
-
for (let e of Array.isArray(C?.fields) ? C.fields : []) e.type === "section" ?
|
|
2112
|
+
for (let e of Array.isArray(C?.fields) ? C.fields : []) e.type === "section" ? A.push({
|
|
1929
2113
|
section: e,
|
|
1930
2114
|
fields: []
|
|
1931
|
-
}) :
|
|
1932
|
-
let
|
|
2115
|
+
}) : A[A.length - 1].fields.push(e);
|
|
2116
|
+
let j = A.filter((e) => e.section || e.fields.length), M = j.filter((e) => !e.section || St(e.section.condition, T)).map((e) => ({
|
|
1933
2117
|
...e,
|
|
1934
|
-
fields: e.fields.filter((e) =>
|
|
1935
|
-
})),
|
|
2118
|
+
fields: e.fields.filter((e) => St(e.condition, T))
|
|
2119
|
+
})), N = j.length > 1, F = Math.min(D, Math.max(0, M.length - 1)), I = N ? M[F]?.fields ?? [] : M.flatMap((e) => e.fields), L = I.filter((e) => {
|
|
1936
2120
|
let t = T[e.name];
|
|
1937
2121
|
return e.required && (t == null || t === "" || t === !1);
|
|
1938
|
-
}),
|
|
2122
|
+
}), R = F >= M.length - 1, z = (e, t) => E((n) => {
|
|
1939
2123
|
let r = {
|
|
1940
2124
|
...n,
|
|
1941
2125
|
[e]: t
|
|
@@ -1945,7 +2129,7 @@ function mt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
1945
2129
|
});
|
|
1946
2130
|
return /* @__PURE__ */ f("div", {
|
|
1947
2131
|
ref: m,
|
|
1948
|
-
style:
|
|
2132
|
+
style: P(e),
|
|
1949
2133
|
children: [
|
|
1950
2134
|
/* @__PURE__ */ d("form", {
|
|
1951
2135
|
action: t || void 0,
|
|
@@ -1989,28 +2173,28 @@ function mt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
1989
2173
|
}
|
|
1990
2174
|
},
|
|
1991
2175
|
style: {
|
|
1992
|
-
...
|
|
1993
|
-
display:
|
|
2176
|
+
...bt,
|
|
2177
|
+
display: k === "success" ? "none" : "flex"
|
|
1994
2178
|
},
|
|
1995
2179
|
children: c && s ? /* @__PURE__ */ f(u, { children: [
|
|
1996
|
-
|
|
1997
|
-
steps:
|
|
2180
|
+
N && /* @__PURE__ */ d(tn, {
|
|
2181
|
+
steps: M.map((e) => ({ label: e.section?.label ?? "Start" })),
|
|
1998
2182
|
active: F + 1,
|
|
1999
2183
|
style: { marginBottom: 8 }
|
|
2000
2184
|
}),
|
|
2001
|
-
|
|
2185
|
+
N && M[F]?.section?.help && /* @__PURE__ */ d("p", {
|
|
2002
2186
|
style: {
|
|
2003
2187
|
margin: 0,
|
|
2004
2188
|
fontSize: 14,
|
|
2005
2189
|
opacity: .7
|
|
2006
2190
|
},
|
|
2007
|
-
children:
|
|
2191
|
+
children: M[F].section.help
|
|
2008
2192
|
}),
|
|
2009
|
-
|
|
2193
|
+
I.map((e) => /* @__PURE__ */ d(Et, {
|
|
2010
2194
|
field: e,
|
|
2011
2195
|
value: T[e.name],
|
|
2012
2196
|
values: T,
|
|
2013
|
-
onChange:
|
|
2197
|
+
onChange: z,
|
|
2014
2198
|
inert: h
|
|
2015
2199
|
}, e.name)),
|
|
2016
2200
|
/* @__PURE__ */ f("div", {
|
|
@@ -2020,12 +2204,12 @@ function mt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
2020
2204
|
alignItems: "center",
|
|
2021
2205
|
marginTop: 4
|
|
2022
2206
|
},
|
|
2023
|
-
children: [
|
|
2207
|
+
children: [N && F > 0 && /* @__PURE__ */ d("button", {
|
|
2024
2208
|
type: "button",
|
|
2025
2209
|
disabled: h || void 0,
|
|
2026
|
-
onClick: () =>
|
|
2210
|
+
onClick: () => O(F - 1),
|
|
2027
2211
|
style: {
|
|
2028
|
-
...
|
|
2212
|
+
...Y,
|
|
2029
2213
|
background: "transparent",
|
|
2030
2214
|
color: "inherit",
|
|
2031
2215
|
border: 0,
|
|
@@ -2033,26 +2217,26 @@ function mt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
2033
2217
|
cursor: "pointer"
|
|
2034
2218
|
},
|
|
2035
2219
|
children: "Back"
|
|
2036
|
-
}),
|
|
2220
|
+
}), N && !R ? /* @__PURE__ */ d("button", {
|
|
2037
2221
|
type: "button",
|
|
2038
|
-
disabled: h ||
|
|
2039
|
-
onClick: () =>
|
|
2222
|
+
disabled: h || L.length > 0,
|
|
2223
|
+
onClick: () => O(F + 1),
|
|
2040
2224
|
style: {
|
|
2041
|
-
...
|
|
2225
|
+
...Y,
|
|
2042
2226
|
border: 0,
|
|
2043
2227
|
padding: "10px 22px",
|
|
2044
2228
|
borderRadius: 8,
|
|
2045
2229
|
fontSize: 15,
|
|
2046
2230
|
fontWeight: 600,
|
|
2047
2231
|
cursor: "pointer",
|
|
2048
|
-
opacity:
|
|
2232
|
+
opacity: L.length ? .5 : 1
|
|
2049
2233
|
},
|
|
2050
2234
|
children: "Next"
|
|
2051
2235
|
}) : /* @__PURE__ */ d("button", {
|
|
2052
2236
|
type: "submit",
|
|
2053
2237
|
disabled: h || void 0,
|
|
2054
2238
|
style: {
|
|
2055
|
-
...
|
|
2239
|
+
...Y,
|
|
2056
2240
|
border: 0,
|
|
2057
2241
|
padding: "10px 22px",
|
|
2058
2242
|
borderRadius: 8,
|
|
@@ -2066,12 +2250,12 @@ function mt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
2066
2250
|
] }) : g
|
|
2067
2251
|
}),
|
|
2068
2252
|
/* @__PURE__ */ d("div", {
|
|
2069
|
-
style: { display:
|
|
2253
|
+
style: { display: k === "success" ? "block" : "none" },
|
|
2070
2254
|
children: _?.success ?? null
|
|
2071
2255
|
}),
|
|
2072
2256
|
/* @__PURE__ */ d("div", {
|
|
2073
2257
|
style: {
|
|
2074
|
-
display:
|
|
2258
|
+
display: k === "error" ? "block" : "none",
|
|
2075
2259
|
marginTop: 12
|
|
2076
2260
|
},
|
|
2077
2261
|
children: _?.error ?? null
|
|
@@ -2079,10 +2263,10 @@ function mt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
2079
2263
|
]
|
|
2080
2264
|
});
|
|
2081
2265
|
}
|
|
2082
|
-
var
|
|
2266
|
+
var Ot = null, kt = null, At = (e) => {
|
|
2083
2267
|
let t = typeof e == "string" && e.trim() ? e.trim() : "";
|
|
2084
|
-
if (
|
|
2085
|
-
if (
|
|
2268
|
+
if (Ot && kt === t) return Ot;
|
|
2269
|
+
if (Ot && typeof window < "u") {
|
|
2086
2270
|
for (let e of ["grecaptcha", "___grecaptcha_cfg"]) try {
|
|
2087
2271
|
delete window[e];
|
|
2088
2272
|
} catch {
|
|
@@ -2090,22 +2274,22 @@ var Q = null, ht = null, gt = (e) => {
|
|
|
2090
2274
|
}
|
|
2091
2275
|
document.querySelectorAll("script[src*=\"recaptcha\"]").forEach((e) => e.remove());
|
|
2092
2276
|
}
|
|
2093
|
-
return
|
|
2277
|
+
return kt = t, Ot = new Promise((e) => {
|
|
2094
2278
|
if (typeof window > "u") return;
|
|
2095
2279
|
if (window.grecaptcha?.render) return e(window.grecaptcha);
|
|
2096
2280
|
window.__webimRecaptchaReady = () => e(window.grecaptcha);
|
|
2097
2281
|
let n = document.createElement("script");
|
|
2098
2282
|
n.src = `https://www.google.com/recaptcha/api.js?onload=__webimRecaptchaReady&render=explicit${t ? `&hl=${encodeURIComponent(t)}` : ""}`, n.async = !0, document.head.appendChild(n);
|
|
2099
|
-
}),
|
|
2283
|
+
}), Ot;
|
|
2100
2284
|
};
|
|
2101
|
-
function
|
|
2102
|
-
let p = i(
|
|
2285
|
+
function jt({ siteKey: e, theme: t, size: n, hl: r, style: o, nodeRef: s, inert: l, onChange: u }) {
|
|
2286
|
+
let p = i(K), m = p?.settings && typeof p.settings == "object" ? p.settings["google.recaptchaKey"] : "", h = typeof e == "string" && e.trim() || (typeof m == "string" ? m.trim() : ""), g = c(null), _ = c(u);
|
|
2103
2287
|
if (_.current = u, a(() => {
|
|
2104
2288
|
if (l || !h || !g.current) return;
|
|
2105
2289
|
let e = !0, i = (t) => {
|
|
2106
2290
|
e && typeof _.current == "function" && _.current(t);
|
|
2107
2291
|
};
|
|
2108
|
-
return
|
|
2292
|
+
return At(r).then((r) => {
|
|
2109
2293
|
if (!(!e || !g.current || !r?.render)) {
|
|
2110
2294
|
g.current.innerHTML = "", i("");
|
|
2111
2295
|
try {
|
|
@@ -2132,7 +2316,7 @@ function _t({ siteKey: e, theme: t, size: n, hl: r, style: o, nodeRef: s, inert:
|
|
|
2132
2316
|
let e = t === "dark";
|
|
2133
2317
|
return /* @__PURE__ */ f("div", {
|
|
2134
2318
|
ref: s,
|
|
2135
|
-
style:
|
|
2319
|
+
style: P(o),
|
|
2136
2320
|
children: [/* @__PURE__ */ f("div", {
|
|
2137
2321
|
style: {
|
|
2138
2322
|
width: n === "compact" ? 164 : 302,
|
|
@@ -2183,21 +2367,21 @@ function _t({ siteKey: e, theme: t, size: n, hl: r, style: o, nodeRef: s, inert:
|
|
|
2183
2367
|
}
|
|
2184
2368
|
return h ? /* @__PURE__ */ d("div", {
|
|
2185
2369
|
ref: s,
|
|
2186
|
-
style:
|
|
2370
|
+
style: P(o),
|
|
2187
2371
|
children: /* @__PURE__ */ d("div", { ref: g })
|
|
2188
2372
|
}) : null;
|
|
2189
2373
|
}
|
|
2190
|
-
function
|
|
2374
|
+
function Mt({ text: e, parts: t, style: n, nodeRef: r, linked: i }) {
|
|
2191
2375
|
return /* @__PURE__ */ d("label", {
|
|
2192
2376
|
ref: r,
|
|
2193
2377
|
style: {
|
|
2194
|
-
...
|
|
2195
|
-
...
|
|
2378
|
+
...Z,
|
|
2379
|
+
...P(n)
|
|
2196
2380
|
},
|
|
2197
|
-
children:
|
|
2381
|
+
children: X(t, e, i)
|
|
2198
2382
|
});
|
|
2199
2383
|
}
|
|
2200
|
-
function
|
|
2384
|
+
function Nt({ type: e = "text", name: t, placeholder: n, required: r, style: i, nodeRef: a, inert: o }) {
|
|
2201
2385
|
return /* @__PURE__ */ d("input", {
|
|
2202
2386
|
ref: a,
|
|
2203
2387
|
type: e,
|
|
@@ -2205,13 +2389,13 @@ function yt({ type: e = "text", name: t, placeholder: n, required: r, style: i,
|
|
|
2205
2389
|
placeholder: n,
|
|
2206
2390
|
required: !o && !!r,
|
|
2207
2391
|
style: {
|
|
2208
|
-
...
|
|
2209
|
-
...
|
|
2392
|
+
...Q,
|
|
2393
|
+
...P(i)
|
|
2210
2394
|
},
|
|
2211
|
-
|
|
2395
|
+
...$(o)
|
|
2212
2396
|
});
|
|
2213
2397
|
}
|
|
2214
|
-
function
|
|
2398
|
+
function Pt({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeRef: a, inert: o }) {
|
|
2215
2399
|
return /* @__PURE__ */ d("textarea", {
|
|
2216
2400
|
ref: a,
|
|
2217
2401
|
name: e || void 0,
|
|
@@ -2219,19 +2403,19 @@ function bt({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeR
|
|
|
2219
2403
|
rows: n,
|
|
2220
2404
|
required: !o && !!r,
|
|
2221
2405
|
style: {
|
|
2222
|
-
...
|
|
2406
|
+
...Q,
|
|
2223
2407
|
resize: "vertical",
|
|
2224
|
-
...
|
|
2408
|
+
...P(i)
|
|
2225
2409
|
},
|
|
2226
|
-
|
|
2410
|
+
...$(o)
|
|
2227
2411
|
});
|
|
2228
2412
|
}
|
|
2229
|
-
function
|
|
2413
|
+
function Ft({ kind: e = "checkbox", label: t, name: n, value: r, required: i, style: a, nodeRef: o, inert: s }) {
|
|
2230
2414
|
return /* @__PURE__ */ f("label", {
|
|
2231
2415
|
ref: o,
|
|
2232
2416
|
style: {
|
|
2233
|
-
...
|
|
2234
|
-
...
|
|
2417
|
+
...xt,
|
|
2418
|
+
...P(a)
|
|
2235
2419
|
},
|
|
2236
2420
|
children: [/* @__PURE__ */ d("input", {
|
|
2237
2421
|
type: e,
|
|
@@ -2247,7 +2431,7 @@ function xt({ kind: e = "checkbox", label: t, name: n, value: r, required: i, st
|
|
|
2247
2431
|
}), t]
|
|
2248
2432
|
});
|
|
2249
2433
|
}
|
|
2250
|
-
function
|
|
2434
|
+
function It({ name: e, placeholder: t, options: n = [], required: r, style: i, nodeRef: a, inert: o }) {
|
|
2251
2435
|
return /* @__PURE__ */ f("select", {
|
|
2252
2436
|
ref: a,
|
|
2253
2437
|
name: e || void 0,
|
|
@@ -2256,9 +2440,9 @@ function St({ name: e, placeholder: t, options: n = [], required: r, style: i, n
|
|
|
2256
2440
|
onMouseDown: o ? (e) => e.preventDefault() : void 0,
|
|
2257
2441
|
tabIndex: o ? -1 : void 0,
|
|
2258
2442
|
style: {
|
|
2259
|
-
...
|
|
2443
|
+
...Q,
|
|
2260
2444
|
appearance: "auto",
|
|
2261
|
-
...
|
|
2445
|
+
...P(i)
|
|
2262
2446
|
},
|
|
2263
2447
|
children: [t !== "" && /* @__PURE__ */ d("option", {
|
|
2264
2448
|
value: "",
|
|
@@ -2270,19 +2454,19 @@ function St({ name: e, placeholder: t, options: n = [], required: r, style: i, n
|
|
|
2270
2454
|
}, t))]
|
|
2271
2455
|
});
|
|
2272
2456
|
}
|
|
2273
|
-
function
|
|
2457
|
+
function Lt({ name: e, accept: t, required: n, text: r = "Choose a file…", style: i, nodeRef: a, inert: o }) {
|
|
2274
2458
|
let [s, c] = l(null);
|
|
2275
2459
|
return /* @__PURE__ */ f("label", {
|
|
2276
2460
|
ref: a,
|
|
2277
2461
|
style: {
|
|
2278
|
-
...
|
|
2462
|
+
...Q,
|
|
2279
2463
|
display: "flex",
|
|
2280
2464
|
alignItems: "center",
|
|
2281
2465
|
gap: "8px",
|
|
2282
2466
|
cursor: o ? "default" : "pointer",
|
|
2283
2467
|
borderStyle: "dashed",
|
|
2284
2468
|
color: s ? "#111827" : "#6b7280",
|
|
2285
|
-
...
|
|
2469
|
+
...P(i)
|
|
2286
2470
|
},
|
|
2287
2471
|
children: [
|
|
2288
2472
|
/* @__PURE__ */ d("input", {
|
|
@@ -2302,12 +2486,12 @@ function Ct({ name: e, accept: t, required: n, text: r = "Choose a file…", sty
|
|
|
2302
2486
|
]
|
|
2303
2487
|
});
|
|
2304
2488
|
}
|
|
2305
|
-
function
|
|
2489
|
+
function Rt({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
|
|
2306
2490
|
return /* @__PURE__ */ d("button", {
|
|
2307
2491
|
ref: n,
|
|
2308
2492
|
type: r ? "button" : "submit",
|
|
2309
2493
|
style: {
|
|
2310
|
-
...
|
|
2494
|
+
...Y,
|
|
2311
2495
|
border: 0,
|
|
2312
2496
|
cursor: "pointer",
|
|
2313
2497
|
alignSelf: "flex-start",
|
|
@@ -2317,12 +2501,12 @@ function wt({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
|
|
|
2317
2501
|
fontWeight: 600,
|
|
2318
2502
|
lineHeight: 1.4,
|
|
2319
2503
|
fontFamily: "inherit",
|
|
2320
|
-
...
|
|
2504
|
+
...P(t)
|
|
2321
2505
|
},
|
|
2322
2506
|
children: e
|
|
2323
2507
|
});
|
|
2324
2508
|
}
|
|
2325
|
-
function
|
|
2509
|
+
function zt({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
|
|
2326
2510
|
let a = Math.max(1, (Number(e) || 1) * (Number(t) || 1));
|
|
2327
2511
|
return /* @__PURE__ */ d("div", {
|
|
2328
2512
|
ref: r,
|
|
@@ -2331,7 +2515,7 @@ function Tt({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
|
|
|
2331
2515
|
gridTemplateColumns: `repeat(${Math.max(1, Number(e) || 1)}, minmax(0, 1fr))`,
|
|
2332
2516
|
gap: 16,
|
|
2333
2517
|
width: "100%",
|
|
2334
|
-
...
|
|
2518
|
+
...P(n)
|
|
2335
2519
|
},
|
|
2336
2520
|
children: Array.from({ length: a }, (e, t) => /* @__PURE__ */ d("div", {
|
|
2337
2521
|
style: { minWidth: 0 },
|
|
@@ -2339,8 +2523,8 @@ function Tt({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
|
|
|
2339
2523
|
}, t))
|
|
2340
2524
|
});
|
|
2341
2525
|
}
|
|
2342
|
-
function
|
|
2343
|
-
let { tenant: v, apiUrl: y, locale: b } = i(
|
|
2526
|
+
function Bt({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, imageField: o, titleField: s = "name", textField: c, custom: u, templateId: p, paged: m, filters: h, style: g, nodeRef: _ }) {
|
|
2527
|
+
let { tenant: v, apiUrl: y, locale: b } = i(K), x = i(Ce), S = i(q), [, C] = l(0);
|
|
2344
2528
|
a(() => {
|
|
2345
2529
|
if (typeof window > "u") return;
|
|
2346
2530
|
let e = () => C((e) => e + 1);
|
|
@@ -2348,19 +2532,19 @@ function Et({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
|
|
|
2348
2532
|
window.removeEventListener("popstate", e), window.removeEventListener("webim:urlchange", e);
|
|
2349
2533
|
};
|
|
2350
2534
|
}, []);
|
|
2351
|
-
let w =
|
|
2535
|
+
let w = Se(h), T = JSON.stringify(w), E = T !== "{}" && !e?.startsWith?.("api:"), D = E ? null : S?.[e], O = m ? be(S) : 1, [k, A] = l(null);
|
|
2352
2536
|
if (a(() => {
|
|
2353
|
-
if (!e ||
|
|
2537
|
+
if (!e || D) return;
|
|
2354
2538
|
let n = !0, r = new URLSearchParams();
|
|
2355
2539
|
if (b && r.set("locale", b), E && r.set("data_filter", T), m && !e.startsWith("api:")) {
|
|
2356
2540
|
let e = Math.max(1, Number(t) || 6);
|
|
2357
|
-
r.set("offset", String((
|
|
2541
|
+
r.set("offset", String((O - 1) * e)), r.set("limit", String(e));
|
|
2358
2542
|
}
|
|
2359
2543
|
let i = r.toString(), a = e.startsWith("api:") ? `${y}/data/${encodeURIComponent(e.slice(4))}` : `${y}/dynamic/${encodeURIComponent(e)}${i ? `?${i}` : ""}`;
|
|
2360
2544
|
return fetch(a, { headers: v ? { "x-tenant": v } : {} }).then((e) => e.json()).then((e) => {
|
|
2361
2545
|
let t = Array.isArray(e?.payload) ? e.payload : Array.isArray(e?.payload?.data) ? e.payload.data : [];
|
|
2362
|
-
return n &&
|
|
2363
|
-
}).catch(() => n &&
|
|
2546
|
+
return n && A(t.filter((e) => e && typeof e == "object"));
|
|
2547
|
+
}).catch(() => n && A([])), () => {
|
|
2364
2548
|
n = !1;
|
|
2365
2549
|
};
|
|
2366
2550
|
}, [
|
|
@@ -2368,20 +2552,20 @@ function Et({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
|
|
|
2368
2552
|
v,
|
|
2369
2553
|
y,
|
|
2370
2554
|
b,
|
|
2371
|
-
|
|
2555
|
+
D,
|
|
2372
2556
|
m,
|
|
2373
|
-
|
|
2557
|
+
O,
|
|
2374
2558
|
t,
|
|
2375
2559
|
E,
|
|
2376
2560
|
T
|
|
2377
2561
|
]), !e) return null;
|
|
2378
|
-
let
|
|
2562
|
+
let j = Math.max(1, Number(t) || 6), M = m ? D || e.startsWith("api:") ? (D ?? k ?? []).slice((O - 1) * j, O * j) : (k ?? []).slice(0, j) : (D ?? k ?? []).slice(0, j), N = Math.min(Math.max(Number(r) || 3, 1), 6), F = n === "list" ? {
|
|
2379
2563
|
display: "flex",
|
|
2380
2564
|
flexDirection: "column",
|
|
2381
2565
|
gap: 20
|
|
2382
2566
|
} : {
|
|
2383
2567
|
display: "grid",
|
|
2384
|
-
gridTemplateColumns: `repeat(${
|
|
2568
|
+
gridTemplateColumns: `repeat(${N}, minmax(0, 1fr))`,
|
|
2385
2569
|
gap: 24
|
|
2386
2570
|
};
|
|
2387
2571
|
return u && p && x?.render ? /* @__PURE__ */ d("div", {
|
|
@@ -2389,21 +2573,21 @@ function Et({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
|
|
|
2389
2573
|
style: {
|
|
2390
2574
|
width: "100%",
|
|
2391
2575
|
...F,
|
|
2392
|
-
...
|
|
2576
|
+
...P(g)
|
|
2393
2577
|
},
|
|
2394
|
-
children:
|
|
2578
|
+
children: M.map((e) => /* @__PURE__ */ d("div", {
|
|
2395
2579
|
style: { minWidth: 0 },
|
|
2396
|
-
children: x.render(p, (t) =>
|
|
2580
|
+
children: x.render(p, (t) => De(t, e))
|
|
2397
2581
|
}, e.id ?? e?.data?.slug))
|
|
2398
2582
|
}) : /* @__PURE__ */ d("div", {
|
|
2399
2583
|
ref: _,
|
|
2400
2584
|
style: {
|
|
2401
2585
|
width: "100%",
|
|
2402
2586
|
...F,
|
|
2403
|
-
...
|
|
2587
|
+
...P(g)
|
|
2404
2588
|
},
|
|
2405
|
-
children:
|
|
2406
|
-
let t = o ?
|
|
2589
|
+
children: M.map((e) => {
|
|
2590
|
+
let t = o ? Te(e?.data, o) : null, r = s ? J(Te(e?.data, s)) : null, i = c ? Te(e?.data, c) : null, a = Array.isArray(i) ? i : null, l = a || i == null ? null : J(i), u = n === "list";
|
|
2407
2591
|
return /* @__PURE__ */ f("div", {
|
|
2408
2592
|
style: {
|
|
2409
2593
|
display: "flex",
|
|
@@ -2450,7 +2634,7 @@ function Et({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
|
|
|
2450
2634
|
lineHeight: 1.55,
|
|
2451
2635
|
opacity: .85
|
|
2452
2636
|
},
|
|
2453
|
-
children:
|
|
2637
|
+
children: Ue(a)
|
|
2454
2638
|
})
|
|
2455
2639
|
]
|
|
2456
2640
|
})]
|
|
@@ -2458,8 +2642,8 @@ function Et({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
|
|
|
2458
2642
|
})
|
|
2459
2643
|
});
|
|
2460
2644
|
}
|
|
2461
|
-
function
|
|
2462
|
-
let a = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && typeof e.name == "string" && e.name) : [], o = i ? {} :
|
|
2645
|
+
function Vt({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, inert: i }) {
|
|
2646
|
+
let a = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && typeof e.name == "string" && e.name) : [], o = i ? {} : xe(), s = {
|
|
2463
2647
|
height: 34,
|
|
2464
2648
|
padding: "0 12px",
|
|
2465
2649
|
borderRadius: 8,
|
|
@@ -2501,13 +2685,13 @@ function Dt({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
2501
2685
|
alignItems: "center",
|
|
2502
2686
|
gap: 8,
|
|
2503
2687
|
width: "100%",
|
|
2504
|
-
...
|
|
2688
|
+
...P(n)
|
|
2505
2689
|
},
|
|
2506
2690
|
children: [a.map((e) => Array.isArray(e.options) && e.options.length > 0 || e.type === "option" || e.type === "select" ? /* @__PURE__ */ f("select", {
|
|
2507
2691
|
name: `f_${e.name}`,
|
|
2508
2692
|
defaultValue: o[e.name] ?? "",
|
|
2509
2693
|
style: s,
|
|
2510
|
-
|
|
2694
|
+
...$(i),
|
|
2511
2695
|
children: [/* @__PURE__ */ d("option", {
|
|
2512
2696
|
value: "",
|
|
2513
2697
|
children: e.label || e.name
|
|
@@ -2522,7 +2706,7 @@ function Dt({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
2522
2706
|
name: `f_${e.name}`,
|
|
2523
2707
|
defaultValue: o[e.name] ?? "",
|
|
2524
2708
|
style: s,
|
|
2525
|
-
|
|
2709
|
+
...$(i),
|
|
2526
2710
|
children: [
|
|
2527
2711
|
/* @__PURE__ */ d("option", {
|
|
2528
2712
|
value: "",
|
|
@@ -2543,7 +2727,7 @@ function Dt({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
2543
2727
|
defaultValue: o[e.name] ?? "",
|
|
2544
2728
|
placeholder: e.label || e.name,
|
|
2545
2729
|
style: s,
|
|
2546
|
-
|
|
2730
|
+
...$(i)
|
|
2547
2731
|
}, e.name)), /* @__PURE__ */ d("button", {
|
|
2548
2732
|
type: "submit",
|
|
2549
2733
|
style: {
|
|
@@ -2556,16 +2740,16 @@ function Dt({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
2556
2740
|
fontWeight: 600,
|
|
2557
2741
|
cursor: i ? "default" : "pointer"
|
|
2558
2742
|
},
|
|
2559
|
-
|
|
2743
|
+
...$(i),
|
|
2560
2744
|
children: t
|
|
2561
2745
|
})]
|
|
2562
2746
|
});
|
|
2563
2747
|
}
|
|
2564
|
-
function
|
|
2748
|
+
function Ht({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
|
|
2565
2749
|
return e.length ? /* @__PURE__ */ d("nav", {
|
|
2566
2750
|
ref: r,
|
|
2567
2751
|
"aria-label": "Breadcrumb",
|
|
2568
|
-
style: { ...
|
|
2752
|
+
style: { ...P(n) },
|
|
2569
2753
|
children: /* @__PURE__ */ d("ol", {
|
|
2570
2754
|
style: {
|
|
2571
2755
|
display: "flex",
|
|
@@ -2611,8 +2795,8 @@ function Ot({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
|
|
|
2611
2795
|
})
|
|
2612
2796
|
}) : null;
|
|
2613
2797
|
}
|
|
2614
|
-
function
|
|
2615
|
-
let { tenant: g, apiUrl: _ } = i(
|
|
2798
|
+
function Ut({ pages: e = 5, current: t = 1, prevNext: n = !0, href: r = "#", source: o, pageSize: s = 6, align: c, hideEmpty: u, inert: p, style: m, nodeRef: h }) {
|
|
2799
|
+
let { tenant: g, apiUrl: _ } = i(K), v = i(q), [y, b] = l(null), x = o ? Number(v?.[`${o}:total`]) : NaN;
|
|
2616
2800
|
a(() => {
|
|
2617
2801
|
if (!o || Number.isFinite(x)) return;
|
|
2618
2802
|
let e = !0, t = o.startsWith("api:") ? `${_}/data/${encodeURIComponent(o.slice(4))}` : `${_}/dynamic/${encodeURIComponent(o)}?limit=1`;
|
|
@@ -2631,7 +2815,7 @@ function kt({ pages: e = 5, current: t = 1, prevNext: n = !0, href: r = "#", sou
|
|
|
2631
2815
|
]);
|
|
2632
2816
|
let S = Math.max(1, Number(s) || 6), C = Number.isFinite(x) ? x : y;
|
|
2633
2817
|
if (o && C === null || o && u && !(C > 0)) return null;
|
|
2634
|
-
let w = Math.min(Math.max(o ? Math.ceil(C / S) : Number(e) || 1, 1), 50), T = Math.min(Math.max(o ?
|
|
2818
|
+
let w = Math.min(Math.max(o ? Math.ceil(C / S) : Number(e) || 1, 1), 50), T = Math.min(Math.max(o ? be(v) : Number(t) || 1, 1), w), E = (e) => {
|
|
2635
2819
|
if (o) {
|
|
2636
2820
|
if (typeof window < "u") {
|
|
2637
2821
|
let t = new URLSearchParams(window.location.search);
|
|
@@ -2640,7 +2824,7 @@ function kt({ pages: e = 5, current: t = 1, prevNext: n = !0, href: r = "#", sou
|
|
|
2640
2824
|
return `?page=${e}`;
|
|
2641
2825
|
}
|
|
2642
2826
|
return r && r !== "#" ? r.replace("{page}", String(e)) : "#";
|
|
2643
|
-
},
|
|
2827
|
+
}, D = c === "center" ? "center" : c === "right" ? "flex-end" : "flex-start", O = p ? (e) => e.preventDefault() : void 0, k = (e) => ({
|
|
2644
2828
|
display: "inline-flex",
|
|
2645
2829
|
alignItems: "center",
|
|
2646
2830
|
justifyContent: "center",
|
|
@@ -2662,33 +2846,33 @@ function kt({ pages: e = 5, current: t = 1, prevNext: n = !0, href: r = "#", sou
|
|
|
2662
2846
|
flexWrap: "wrap",
|
|
2663
2847
|
gap: 8,
|
|
2664
2848
|
alignItems: "center",
|
|
2665
|
-
justifyContent:
|
|
2666
|
-
...
|
|
2849
|
+
justifyContent: D,
|
|
2850
|
+
...P(m)
|
|
2667
2851
|
},
|
|
2668
2852
|
children: [
|
|
2669
2853
|
n && /* @__PURE__ */ d("a", {
|
|
2670
2854
|
href: T > 1 ? E(T - 1) : "#",
|
|
2671
|
-
onClick:
|
|
2855
|
+
onClick: O,
|
|
2672
2856
|
"aria-label": "Previous",
|
|
2673
2857
|
style: {
|
|
2674
|
-
...
|
|
2858
|
+
...k(!1),
|
|
2675
2859
|
opacity: T > 1 ? 1 : .4
|
|
2676
2860
|
},
|
|
2677
2861
|
children: "‹"
|
|
2678
2862
|
}),
|
|
2679
2863
|
Array.from({ length: w }, (e, t) => t + 1).map((e) => /* @__PURE__ */ d("a", {
|
|
2680
2864
|
href: E(e),
|
|
2681
|
-
onClick:
|
|
2865
|
+
onClick: O,
|
|
2682
2866
|
"aria-current": e === T ? "page" : void 0,
|
|
2683
|
-
style:
|
|
2867
|
+
style: k(e === T),
|
|
2684
2868
|
children: e
|
|
2685
2869
|
}, e)),
|
|
2686
2870
|
n && /* @__PURE__ */ d("a", {
|
|
2687
2871
|
href: T < w ? E(T + 1) : "#",
|
|
2688
|
-
onClick:
|
|
2872
|
+
onClick: O,
|
|
2689
2873
|
"aria-label": "Next",
|
|
2690
2874
|
style: {
|
|
2691
|
-
...
|
|
2875
|
+
...k(!1),
|
|
2692
2876
|
opacity: T < w ? 1 : .4
|
|
2693
2877
|
},
|
|
2694
2878
|
children: "›"
|
|
@@ -2696,15 +2880,15 @@ function kt({ pages: e = 5, current: t = 1, prevNext: n = !0, href: r = "#", sou
|
|
|
2696
2880
|
]
|
|
2697
2881
|
});
|
|
2698
2882
|
}
|
|
2699
|
-
var
|
|
2883
|
+
var Wt = "webim.page_mode", Gt = () => {
|
|
2700
2884
|
if (typeof window > "u") return "auto";
|
|
2701
2885
|
try {
|
|
2702
|
-
let e = window.localStorage.getItem(
|
|
2886
|
+
let e = window.localStorage.getItem(Wt);
|
|
2703
2887
|
return e === "light" || e === "dark" ? e : "auto";
|
|
2704
2888
|
} catch {
|
|
2705
2889
|
return "auto";
|
|
2706
2890
|
}
|
|
2707
|
-
},
|
|
2891
|
+
}, Kt = (e) => {
|
|
2708
2892
|
let t = {
|
|
2709
2893
|
width: 16,
|
|
2710
2894
|
height: 16,
|
|
@@ -2736,13 +2920,13 @@ var At = "webim.page_mode", jt = () => {
|
|
|
2736
2920
|
rx: "2"
|
|
2737
2921
|
}), /* @__PURE__ */ d("path", { d: "M8 21h8M12 17v4" })]
|
|
2738
2922
|
});
|
|
2739
|
-
},
|
|
2923
|
+
}, qt = {
|
|
2740
2924
|
light: "Light theme",
|
|
2741
2925
|
dark: "Dark theme",
|
|
2742
2926
|
auto: "Follow the device theme"
|
|
2743
2927
|
};
|
|
2744
|
-
function
|
|
2745
|
-
let [o, s] = l(i ? "auto" :
|
|
2928
|
+
function Jt({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
|
|
2929
|
+
let [o, s] = l(i ? "auto" : Gt), u = c(null), f = (e) => {
|
|
2746
2930
|
u.current = e, typeof r == "function" && r(e);
|
|
2747
2931
|
};
|
|
2748
2932
|
a(() => {
|
|
@@ -2750,7 +2934,7 @@ function Pt({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
|
|
|
2750
2934
|
let e = u.current?.closest?.(".webim-page");
|
|
2751
2935
|
e && (o === "light" || o === "dark" ? e.setAttribute("data-webim-mode", o) : e.removeAttribute("data-webim-mode"));
|
|
2752
2936
|
try {
|
|
2753
|
-
o === "auto" ? window.localStorage.removeItem(
|
|
2937
|
+
o === "auto" ? window.localStorage.removeItem(Wt) : window.localStorage.setItem(Wt, o);
|
|
2754
2938
|
} catch {}
|
|
2755
2939
|
}, [o, i]);
|
|
2756
2940
|
let p = t === !1 ? ["light", "dark"] : [
|
|
@@ -2781,12 +2965,12 @@ function Pt({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
|
|
|
2781
2965
|
padding: 3,
|
|
2782
2966
|
borderRadius: 999,
|
|
2783
2967
|
border: "1px solid rgba(148, 163, 184, 0.4)",
|
|
2784
|
-
...
|
|
2968
|
+
...P(n)
|
|
2785
2969
|
},
|
|
2786
2970
|
children: p.map((e) => /* @__PURE__ */ d("button", {
|
|
2787
2971
|
type: "button",
|
|
2788
|
-
title:
|
|
2789
|
-
"aria-label":
|
|
2972
|
+
title: qt[e],
|
|
2973
|
+
"aria-label": qt[e],
|
|
2790
2974
|
"aria-pressed": e === m,
|
|
2791
2975
|
onClick: i ? void 0 : () => s(e),
|
|
2792
2976
|
style: {
|
|
@@ -2797,27 +2981,27 @@ function Pt({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
|
|
|
2797
2981
|
background: e === m ? "var(--page-accent, #111827)" : "transparent",
|
|
2798
2982
|
opacity: e === m ? 1 : .7
|
|
2799
2983
|
},
|
|
2800
|
-
children:
|
|
2984
|
+
children: Kt(e)
|
|
2801
2985
|
}, e))
|
|
2802
2986
|
});
|
|
2803
2987
|
let g = p[(p.indexOf(m) + 1) % p.length];
|
|
2804
2988
|
return /* @__PURE__ */ d("button", {
|
|
2805
2989
|
ref: f,
|
|
2806
2990
|
type: "button",
|
|
2807
|
-
title:
|
|
2808
|
-
"aria-label": `Theme: ${
|
|
2991
|
+
title: qt[m],
|
|
2992
|
+
"aria-label": `Theme: ${qt[m]} — switch to ${qt[g]}`,
|
|
2809
2993
|
onClick: i ? void 0 : () => s(g),
|
|
2810
2994
|
style: {
|
|
2811
2995
|
...h,
|
|
2812
2996
|
width: 36,
|
|
2813
2997
|
height: 36,
|
|
2814
2998
|
border: "1px solid rgba(148, 163, 184, 0.4)",
|
|
2815
|
-
...
|
|
2999
|
+
...P(n)
|
|
2816
3000
|
},
|
|
2817
|
-
children:
|
|
3001
|
+
children: Kt(m)
|
|
2818
3002
|
});
|
|
2819
3003
|
}
|
|
2820
|
-
function
|
|
3004
|
+
function Yt(e) {
|
|
2821
3005
|
let t = e?.parentElement;
|
|
2822
3006
|
for (; t && t !== document.body;) {
|
|
2823
3007
|
let e = getComputedStyle(t).overflowY;
|
|
@@ -2826,7 +3010,7 @@ function Ft(e) {
|
|
|
2826
3010
|
}
|
|
2827
3011
|
return window;
|
|
2828
3012
|
}
|
|
2829
|
-
var
|
|
3013
|
+
var Xt = (e) => e === window ? window.scrollY : e.scrollTop, Zt = {
|
|
2830
3014
|
"bottom-right": (e) => ({
|
|
2831
3015
|
right: e,
|
|
2832
3016
|
bottom: e
|
|
@@ -2841,26 +3025,33 @@ var It = (e) => e === window ? window.scrollY : e.scrollTop, Lt = {
|
|
|
2841
3025
|
transform: "translateX(-50%)"
|
|
2842
3026
|
})
|
|
2843
3027
|
};
|
|
2844
|
-
function
|
|
2845
|
-
let [
|
|
2846
|
-
|
|
3028
|
+
function Qt({ variant: e, label: t, position: n, offset: r, showAfter: i, smooth: o, bg: s, fg: c, style: u, nodeRef: p, inert: m, frame: h, builder: g }) {
|
|
3029
|
+
let [_, v] = l(!!m), [y, b] = l(null), x = (e) => {
|
|
3030
|
+
b(e), typeof p == "function" && p(e);
|
|
2847
3031
|
};
|
|
2848
3032
|
a(() => {
|
|
2849
3033
|
if (m) {
|
|
2850
|
-
|
|
3034
|
+
v(!0);
|
|
2851
3035
|
return;
|
|
2852
3036
|
}
|
|
2853
|
-
if (!
|
|
2854
|
-
let e =
|
|
2855
|
-
|
|
3037
|
+
if (!y) return;
|
|
3038
|
+
let e = Number(i) >= 0 ? Number(i) : 300, t = () => {
|
|
3039
|
+
let t = Yt(y), n = g && !(t === window ? document.documentElement.scrollHeight > window.innerHeight : t.scrollHeight > t.clientHeight);
|
|
3040
|
+
v(n || Xt(t) > e);
|
|
3041
|
+
};
|
|
3042
|
+
return t(), document.addEventListener("scroll", t, {
|
|
3043
|
+
capture: !0,
|
|
3044
|
+
passive: !0
|
|
3045
|
+
}), () => document.removeEventListener("scroll", t, { capture: !0 });
|
|
2856
3046
|
}, [
|
|
2857
3047
|
m,
|
|
2858
|
-
|
|
2859
|
-
i
|
|
3048
|
+
y,
|
|
3049
|
+
i,
|
|
3050
|
+
g
|
|
2860
3051
|
]);
|
|
2861
|
-
let
|
|
3052
|
+
let S = () => {
|
|
2862
3053
|
if (m) return;
|
|
2863
|
-
let e =
|
|
3054
|
+
let e = Yt(y), t = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches, n = o === !1 || t ? "auto" : "smooth";
|
|
2864
3055
|
e === window ? window.scrollTo({
|
|
2865
3056
|
top: 0,
|
|
2866
3057
|
behavior: n
|
|
@@ -2868,53 +3059,53 @@ function Rt({ variant: e, label: t, position: n, offset: r, showAfter: i, smooth
|
|
|
2868
3059
|
top: 0,
|
|
2869
3060
|
behavior: n
|
|
2870
3061
|
});
|
|
2871
|
-
},
|
|
3062
|
+
}, C = Number(r) >= 0 ? Number(r) : 24, w = e === "pill", T = t || "Top", E = Zt[n] ? n : "bottom-right", D = h ? {
|
|
2872
3063
|
position: "fixed",
|
|
2873
3064
|
zIndex: 5,
|
|
2874
|
-
bottom: (h.bottom ?? 0) +
|
|
2875
|
-
...
|
|
2876
|
-
...
|
|
2877
|
-
...
|
|
3065
|
+
bottom: (h.bottom ?? 0) + C,
|
|
3066
|
+
...E === "bottom-left" ? { left: (h.left ?? 0) + C } : null,
|
|
3067
|
+
...E === "bottom-right" ? { right: (h.right ?? 0) + C } : null,
|
|
3068
|
+
...E === "bottom-center" ? {
|
|
2878
3069
|
left: (h.left ?? 0) + (h.width ?? 0) / 2,
|
|
2879
3070
|
transform: "translateX(-50%)"
|
|
2880
3071
|
} : null
|
|
2881
3072
|
} : {
|
|
2882
3073
|
position: "fixed",
|
|
2883
3074
|
zIndex: 2147482e3,
|
|
2884
|
-
...
|
|
3075
|
+
...Zt[E](C)
|
|
2885
3076
|
};
|
|
2886
3077
|
return /* @__PURE__ */ f("button", {
|
|
2887
|
-
ref:
|
|
3078
|
+
ref: x,
|
|
2888
3079
|
type: "button",
|
|
2889
|
-
title:
|
|
2890
|
-
"aria-label":
|
|
2891
|
-
"aria-hidden": !
|
|
2892
|
-
tabIndex:
|
|
2893
|
-
onClick:
|
|
3080
|
+
title: T,
|
|
3081
|
+
"aria-label": T,
|
|
3082
|
+
"aria-hidden": !_,
|
|
3083
|
+
tabIndex: _ ? 0 : -1,
|
|
3084
|
+
onClick: S,
|
|
2894
3085
|
style: {
|
|
2895
3086
|
display: "inline-flex",
|
|
2896
3087
|
alignItems: "center",
|
|
2897
3088
|
justifyContent: "center",
|
|
2898
|
-
gap:
|
|
3089
|
+
gap: w ? 8 : 0,
|
|
2899
3090
|
appearance: "none",
|
|
2900
3091
|
font: "inherit",
|
|
2901
3092
|
fontSize: 14,
|
|
2902
3093
|
fontWeight: 600,
|
|
2903
|
-
width:
|
|
3094
|
+
width: w ? "auto" : 44,
|
|
2904
3095
|
height: 44,
|
|
2905
|
-
padding:
|
|
3096
|
+
padding: w ? "0 18px" : 0,
|
|
2906
3097
|
borderRadius: 999,
|
|
2907
3098
|
border: "1px solid transparent",
|
|
2908
3099
|
background: s || "var(--page-accent, #111827)",
|
|
2909
3100
|
color: c || "var(--page-accent-text, #ffffff)",
|
|
2910
3101
|
boxShadow: "0 6px 20px rgba(15, 23, 42, 0.25)",
|
|
2911
3102
|
cursor: m ? "default" : "pointer",
|
|
2912
|
-
opacity: +!!
|
|
2913
|
-
pointerEvents:
|
|
3103
|
+
opacity: +!!_,
|
|
3104
|
+
pointerEvents: _ ? "auto" : "none",
|
|
2914
3105
|
transition: "opacity 160ms ease, transform 160ms ease",
|
|
2915
|
-
...
|
|
2916
|
-
...
|
|
2917
|
-
...
|
|
3106
|
+
...D,
|
|
3107
|
+
...P(u),
|
|
3108
|
+
...D.transform ? { transform: D.transform } : null
|
|
2918
3109
|
},
|
|
2919
3110
|
children: [/* @__PURE__ */ d("svg", {
|
|
2920
3111
|
width: "18",
|
|
@@ -2929,10 +3120,10 @@ function Rt({ variant: e, label: t, position: n, offset: r, showAfter: i, smooth
|
|
|
2929
3120
|
strokeLinecap: "round",
|
|
2930
3121
|
strokeLinejoin: "round"
|
|
2931
3122
|
})
|
|
2932
|
-
}),
|
|
3123
|
+
}), w ? /* @__PURE__ */ d("span", { children: T }) : null]
|
|
2933
3124
|
});
|
|
2934
3125
|
}
|
|
2935
|
-
var
|
|
3126
|
+
var $t = {
|
|
2936
3127
|
facebook: {
|
|
2937
3128
|
label: "Facebook",
|
|
2938
3129
|
color: "#1877f2",
|
|
@@ -2999,8 +3190,8 @@ var zt = {
|
|
|
2999
3190
|
d: "M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z"
|
|
3000
3191
|
}
|
|
3001
3192
|
};
|
|
3002
|
-
function
|
|
3003
|
-
let l = Array.isArray(e) ? e.filter((e) => e &&
|
|
3193
|
+
function en({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, style: o, nodeRef: s, inert: c }) {
|
|
3194
|
+
let l = Array.isArray(e) ? e.filter((e) => e && $t[e.network]) : [];
|
|
3004
3195
|
if (!l.length) return null;
|
|
3005
3196
|
let u = Math.min(Math.max(Number(r) || 18, 10), 64), f = Math.round(u * 1.9), p = Number.isFinite(Number(i)) ? Number(i) : 10, m = (e) => n === "accent" ? "var(--page-accent, #111827)" : n === "inherit" ? "currentColor" : e.color, h = c ? (e) => e.preventDefault() : void 0;
|
|
3006
3197
|
return /* @__PURE__ */ d("div", {
|
|
@@ -3010,10 +3201,10 @@ function Bt({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, s
|
|
|
3010
3201
|
flexWrap: "wrap",
|
|
3011
3202
|
alignItems: "center",
|
|
3012
3203
|
gap: p,
|
|
3013
|
-
...
|
|
3204
|
+
...P(o)
|
|
3014
3205
|
},
|
|
3015
3206
|
children: l.map((e, r) => {
|
|
3016
|
-
let i =
|
|
3207
|
+
let i = $t[e.network], o = t !== "outline" && t !== "plain", s = o ? n === "accent" ? "var(--page-accent-text, #ffffff)" : n === "inherit" ? "var(--page-bg, #ffffff)" : "#ffffff" : m(i);
|
|
3017
3208
|
return /* @__PURE__ */ d("a", {
|
|
3018
3209
|
href: e.url || "#",
|
|
3019
3210
|
onClick: h,
|
|
@@ -3047,7 +3238,7 @@ function Bt({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, s
|
|
|
3047
3238
|
})
|
|
3048
3239
|
});
|
|
3049
3240
|
}
|
|
3050
|
-
function
|
|
3241
|
+
function tn({ steps: e = [], active: n = 1, vertical: r = !1, style: i, nodeRef: a }) {
|
|
3051
3242
|
if (!e.length) return null;
|
|
3052
3243
|
let o = Math.min(Math.max(Number(n) || 1, 1), e.length), s = (e) => ({
|
|
3053
3244
|
width: 32,
|
|
@@ -3085,7 +3276,7 @@ function Vt({ steps: e = [], active: n = 1, vertical: r = !1, style: i, nodeRef:
|
|
|
3085
3276
|
flexDirection: r ? "column" : "row",
|
|
3086
3277
|
alignItems: r ? "stretch" : "flex-start",
|
|
3087
3278
|
gap: r ? 4 : 8,
|
|
3088
|
-
...
|
|
3279
|
+
...P(i)
|
|
3089
3280
|
},
|
|
3090
3281
|
children: e.map((e, n) => {
|
|
3091
3282
|
let i = n + 1, a = i < o ? "done" : i === o ? "active" : "todo";
|
|
@@ -3125,7 +3316,7 @@ function Vt({ steps: e = [], active: n = 1, vertical: r = !1, style: i, nodeRef:
|
|
|
3125
3316
|
})
|
|
3126
3317
|
});
|
|
3127
3318
|
}
|
|
3128
|
-
var
|
|
3319
|
+
var nn = {
|
|
3129
3320
|
small: {
|
|
3130
3321
|
w: 132,
|
|
3131
3322
|
h: 46,
|
|
@@ -3147,10 +3338,10 @@ var Ht = {
|
|
|
3147
3338
|
title: 12.5,
|
|
3148
3339
|
avatar: 46
|
|
3149
3340
|
}
|
|
3150
|
-
},
|
|
3151
|
-
|
|
3152
|
-
function
|
|
3153
|
-
let r =
|
|
3341
|
+
}, rn = (e) => nn[e] ?? nn.medium;
|
|
3342
|
+
nn.medium.w, nn.medium.h;
|
|
3343
|
+
function an(e, { size: t = "medium", horizontal: n = !1 } = {}) {
|
|
3344
|
+
let r = rn(t), i = n ? r.h : r.w, a = n ? 16 : 20, o = (n ? r.w : r.h) + (n ? 56 : 48), s = Array.isArray(e) ? e.filter((e) => e && e.id) : [], c = new Set(s.map((e) => e.id)), l = /* @__PURE__ */ new Map(), u = [];
|
|
3154
3345
|
for (let e of s) e.parent && c.has(e.parent) && e.parent !== e.id ? (l.has(e.parent) || l.set(e.parent, []), l.get(e.parent).push(e)) : u.push(e);
|
|
3155
3346
|
let d = /* @__PURE__ */ new Map(), f = (e, t) => {
|
|
3156
3347
|
if (t.has(e.id)) return 0;
|
|
@@ -3202,19 +3393,19 @@ function Wt(e, { size: t = "medium", horizontal: n = !1 } = {}) {
|
|
|
3202
3393
|
horizontal: n
|
|
3203
3394
|
};
|
|
3204
3395
|
}
|
|
3205
|
-
var
|
|
3396
|
+
var on = (e, t) => {
|
|
3206
3397
|
let n = String(e ?? "");
|
|
3207
3398
|
return n.length > t ? `${n.slice(0, t - 1)}…` : n;
|
|
3208
|
-
},
|
|
3399
|
+
}, sn = (e) => {
|
|
3209
3400
|
let t = /^#([0-9a-f]{6}|[0-9a-f]{3})$/i.exec(String(e ?? "").trim());
|
|
3210
3401
|
if (!t) return "#ffffff";
|
|
3211
3402
|
let n = t[1];
|
|
3212
3403
|
n.length === 3 && (n = [...n].map((e) => e + e).join(""));
|
|
3213
3404
|
let r = parseInt(n, 16);
|
|
3214
3405
|
return .299 * (r >> 16 & 255) + .587 * (r >> 8 & 255) + .114 * (r & 255) > 150 ? "#111827" : "#ffffff";
|
|
3215
|
-
},
|
|
3216
|
-
function
|
|
3217
|
-
let n = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.id) : [], r = (e) => Array.isArray(e) ? e[0] : e, i = (e) => e == null ? "" :
|
|
3406
|
+
}, cn = (e) => !!(e?.cv?.trim?.() || e?.photo);
|
|
3407
|
+
function ln(e, t = {}) {
|
|
3408
|
+
let n = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.id) : [], r = (e) => Array.isArray(e) ? e[0] : e, i = (e) => e == null ? "" : J(e);
|
|
3218
3409
|
return n.map((e) => {
|
|
3219
3410
|
let n = e.data ?? {}, a = r(n[t.parentField]), o = a && typeof a == "object" ? a.id ?? null : a || null;
|
|
3220
3411
|
return {
|
|
@@ -3228,11 +3419,11 @@ function Jt(e, t = {}) {
|
|
|
3228
3419
|
};
|
|
3229
3420
|
});
|
|
3230
3421
|
}
|
|
3231
|
-
var
|
|
3422
|
+
var un = {
|
|
3232
3423
|
size: 36,
|
|
3233
3424
|
pad: 10
|
|
3234
3425
|
};
|
|
3235
|
-
function
|
|
3426
|
+
function dn({ node: e, onClose: t }) {
|
|
3236
3427
|
return a(() => {
|
|
3237
3428
|
let e = (e) => e.key === "Escape" && t();
|
|
3238
3429
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
@@ -3353,15 +3544,15 @@ function Xt({ node: e, onClose: t }) {
|
|
|
3353
3544
|
})
|
|
3354
3545
|
});
|
|
3355
3546
|
}
|
|
3356
|
-
function
|
|
3357
|
-
let b = o(), [x, S] = l(null), { tenant: C, apiUrl: w } = i(
|
|
3547
|
+
function fn({ nodes: e = [], source: t, nameField: n, titleField: r, photoField: s, parentField: c, cvField: p, hrefField: m, size: h = "medium", horizontal: g = !1, style: _, nodeRef: v, interactive: y = !0 }) {
|
|
3548
|
+
let b = o(), [x, S] = l(null), { tenant: C, apiUrl: w } = i(K), T = i(q)?.[t], [E, D] = l(null);
|
|
3358
3549
|
a(() => {
|
|
3359
3550
|
if (!t || T) return;
|
|
3360
3551
|
let e = !0;
|
|
3361
3552
|
return fetch(`${w}/dynamic/${encodeURIComponent(t)}`, { headers: C ? { "x-tenant": C } : {} }).then((e) => e.json()).then((t) => {
|
|
3362
3553
|
let n = Array.isArray(t?.payload) ? t.payload : Array.isArray(t?.payload?.data) ? t.payload.data : [];
|
|
3363
|
-
e &&
|
|
3364
|
-
}).catch(() => e &&
|
|
3554
|
+
e && D(n);
|
|
3555
|
+
}).catch(() => e && D([])), () => {
|
|
3365
3556
|
e = !1;
|
|
3366
3557
|
};
|
|
3367
3558
|
}, [
|
|
@@ -3370,18 +3561,18 @@ function Zt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
3370
3561
|
w,
|
|
3371
3562
|
T
|
|
3372
3563
|
]);
|
|
3373
|
-
let
|
|
3564
|
+
let O = t ? ln(T ?? E ?? [], {
|
|
3374
3565
|
nameField: n,
|
|
3375
3566
|
titleField: r,
|
|
3376
3567
|
photoField: s,
|
|
3377
3568
|
parentField: c,
|
|
3378
3569
|
cvField: p,
|
|
3379
3570
|
hrefField: m
|
|
3380
|
-
}) : e,
|
|
3571
|
+
}) : e, k = rn(h), { boxes: A, links: j, width: M, height: N } = an(O, {
|
|
3381
3572
|
size: h,
|
|
3382
3573
|
horizontal: g
|
|
3383
3574
|
});
|
|
3384
|
-
if (!
|
|
3575
|
+
if (!A.length) return !y && t ? /* @__PURE__ */ f("div", {
|
|
3385
3576
|
ref: v,
|
|
3386
3577
|
style: {
|
|
3387
3578
|
padding: 18,
|
|
@@ -3390,7 +3581,7 @@ function Zt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
3390
3581
|
fontSize: 13,
|
|
3391
3582
|
opacity: .7,
|
|
3392
3583
|
textAlign: "center",
|
|
3393
|
-
...
|
|
3584
|
+
...P(_)
|
|
3394
3585
|
},
|
|
3395
3586
|
children: [
|
|
3396
3587
|
"Org Chart — no published entries in “",
|
|
@@ -3398,32 +3589,32 @@ function Zt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
3398
3589
|
"” yet"
|
|
3399
3590
|
]
|
|
3400
3591
|
}) : null;
|
|
3401
|
-
let F = new Set(
|
|
3592
|
+
let F = new Set(A.filter((e) => e.node.parent == null || e.node.parent === "").map((e) => e.node.id));
|
|
3402
3593
|
return /* @__PURE__ */ f("div", {
|
|
3403
3594
|
ref: v,
|
|
3404
3595
|
style: {
|
|
3405
3596
|
maxWidth: "100%",
|
|
3406
3597
|
overflowX: "auto",
|
|
3407
|
-
...
|
|
3598
|
+
...P(_)
|
|
3408
3599
|
},
|
|
3409
3600
|
children: [/* @__PURE__ */ f("svg", {
|
|
3410
|
-
viewBox: `0 0 ${
|
|
3601
|
+
viewBox: `0 0 ${M} ${N}`,
|
|
3411
3602
|
role: "img",
|
|
3412
3603
|
"aria-label": "Organization chart",
|
|
3413
3604
|
style: {
|
|
3414
3605
|
display: "block",
|
|
3415
3606
|
width: "100%",
|
|
3416
|
-
maxWidth:
|
|
3607
|
+
maxWidth: M,
|
|
3417
3608
|
height: "auto",
|
|
3418
3609
|
margin: "0 auto"
|
|
3419
3610
|
},
|
|
3420
|
-
children: [
|
|
3611
|
+
children: [j.map((e, t) => /* @__PURE__ */ d("path", {
|
|
3421
3612
|
d: g ? `M ${e.from.x} ${e.from.y} H ${(e.from.x + e.to.x) / 2} V ${e.to.y} H ${e.to.x}` : `M ${e.from.x} ${e.from.y} V ${(e.from.y + e.to.y) / 2} H ${e.to.x} V ${e.to.y}`,
|
|
3422
3613
|
fill: "none",
|
|
3423
3614
|
stroke: "rgba(148, 163, 184, 0.7)",
|
|
3424
3615
|
strokeWidth: "1.5"
|
|
3425
|
-
}, t)),
|
|
3426
|
-
let r = F.has(e.id), i = !!e.color2, a = !!e.color || r || i, o = e.color || (r ? "var(--page-accent, #4f46e5)" : "var(--page-bg, #ffffff)"), s = e.color ?
|
|
3616
|
+
}, t)), A.map(({ node: e, x: t, y: n }) => {
|
|
3617
|
+
let r = F.has(e.id), i = !!e.color2, a = !!e.color || r || i, o = e.color || (r ? "var(--page-accent, #4f46e5)" : "var(--page-bg, #ffffff)"), s = e.color ? sn(e.color) : r ? "var(--page-accent-text, #ffffff)" : "var(--page-text, #111827)", c = i ? sn(e.color2) : s, l = y && (cn(e) || e.href), p = () => cn(e) ? S(e) : window.open(e.href, "_blank", "noreferrer"), m = e.photo ? t + un.pad + k.avatar + 8 : t + k.w / 2, h = e.photo ? "start" : "middle", g = e.photo ? Math.floor((k.w - k.avatar - 26) / 7) : Math.floor(k.w / 7.6), _ = k.h / 2, v = [e.name, e.title].map((e) => String(e ?? "").trim()).filter(Boolean);
|
|
3427
3618
|
return /* @__PURE__ */ f("g", {
|
|
3428
3619
|
onClick: l ? p : void 0,
|
|
3429
3620
|
style: l ? { cursor: "pointer" } : void 0,
|
|
@@ -3446,8 +3637,8 @@ function Zt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
3446
3637
|
}), /* @__PURE__ */ d("rect", {
|
|
3447
3638
|
x: t,
|
|
3448
3639
|
y: n,
|
|
3449
|
-
width:
|
|
3450
|
-
height:
|
|
3640
|
+
width: k.w,
|
|
3641
|
+
height: k.h,
|
|
3451
3642
|
rx: "10",
|
|
3452
3643
|
fill: `url(#${b}-${e.id}-grad)`
|
|
3453
3644
|
})] }) : i ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("clipPath", {
|
|
@@ -3455,8 +3646,8 @@ function Zt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
3455
3646
|
children: /* @__PURE__ */ d("rect", {
|
|
3456
3647
|
x: t,
|
|
3457
3648
|
y: n,
|
|
3458
|
-
width:
|
|
3459
|
-
height:
|
|
3649
|
+
width: k.w,
|
|
3650
|
+
height: k.h,
|
|
3460
3651
|
rx: "10"
|
|
3461
3652
|
})
|
|
3462
3653
|
}), /* @__PURE__ */ f("g", {
|
|
@@ -3464,21 +3655,21 @@ function Zt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
3464
3655
|
children: [/* @__PURE__ */ d("rect", {
|
|
3465
3656
|
x: t,
|
|
3466
3657
|
y: n,
|
|
3467
|
-
width:
|
|
3658
|
+
width: k.w,
|
|
3468
3659
|
height: _,
|
|
3469
3660
|
fill: o
|
|
3470
3661
|
}), /* @__PURE__ */ d("rect", {
|
|
3471
3662
|
x: t,
|
|
3472
3663
|
y: n + _,
|
|
3473
|
-
width:
|
|
3474
|
-
height:
|
|
3664
|
+
width: k.w,
|
|
3665
|
+
height: k.h - _,
|
|
3475
3666
|
fill: e.color2
|
|
3476
3667
|
})]
|
|
3477
3668
|
})] }) : /* @__PURE__ */ d("rect", {
|
|
3478
3669
|
x: t,
|
|
3479
3670
|
y: n,
|
|
3480
|
-
width:
|
|
3481
|
-
height:
|
|
3671
|
+
width: k.w,
|
|
3672
|
+
height: k.h,
|
|
3482
3673
|
rx: "10",
|
|
3483
3674
|
fill: o,
|
|
3484
3675
|
stroke: a ? "none" : "var(--page-accent, #4f46e5)",
|
|
@@ -3487,63 +3678,63 @@ function Zt({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
3487
3678
|
e.photo && /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("clipPath", {
|
|
3488
3679
|
id: `${b}-${e.id}`,
|
|
3489
3680
|
children: /* @__PURE__ */ d("circle", {
|
|
3490
|
-
cx: t +
|
|
3491
|
-
cy: n +
|
|
3492
|
-
r:
|
|
3681
|
+
cx: t + un.pad + k.avatar / 2,
|
|
3682
|
+
cy: n + k.h / 2,
|
|
3683
|
+
r: k.avatar / 2
|
|
3493
3684
|
})
|
|
3494
3685
|
}), /* @__PURE__ */ d("image", {
|
|
3495
3686
|
href: e.photo,
|
|
3496
|
-
x: t +
|
|
3497
|
-
y: n + (
|
|
3498
|
-
width:
|
|
3499
|
-
height:
|
|
3687
|
+
x: t + un.pad,
|
|
3688
|
+
y: n + (k.h - k.avatar) / 2,
|
|
3689
|
+
width: k.avatar,
|
|
3690
|
+
height: k.avatar,
|
|
3500
3691
|
preserveAspectRatio: "xMidYMid slice",
|
|
3501
3692
|
clipPath: `url(#${b}-${e.id})`
|
|
3502
3693
|
})] }),
|
|
3503
3694
|
i && !e.gradient ? /* @__PURE__ */ f(u, { children: [e.title && /* @__PURE__ */ d("text", {
|
|
3504
3695
|
x: m,
|
|
3505
|
-
y: n + _ / 2 +
|
|
3696
|
+
y: n + _ / 2 + k.title * .35,
|
|
3506
3697
|
textAnchor: h,
|
|
3507
|
-
fontSize:
|
|
3698
|
+
fontSize: k.title,
|
|
3508
3699
|
fontWeight: "600",
|
|
3509
3700
|
fill: s,
|
|
3510
|
-
children:
|
|
3701
|
+
children: on(e.title, g + 4)
|
|
3511
3702
|
}), e.name && /* @__PURE__ */ d("text", {
|
|
3512
3703
|
x: m,
|
|
3513
|
-
y: n + _ + _ / 2 +
|
|
3704
|
+
y: n + _ + _ / 2 + k.name * .35,
|
|
3514
3705
|
textAnchor: h,
|
|
3515
|
-
fontSize:
|
|
3706
|
+
fontSize: k.name,
|
|
3516
3707
|
fontWeight: "600",
|
|
3517
3708
|
fill: c,
|
|
3518
|
-
children:
|
|
3709
|
+
children: on(e.name, g)
|
|
3519
3710
|
})] }) : /* @__PURE__ */ f(u, { children: [v[0] && /* @__PURE__ */ d("text", {
|
|
3520
3711
|
x: m,
|
|
3521
|
-
y: n + (v[1] ?
|
|
3712
|
+
y: n + (v[1] ? k.h * .43 : k.h * .57),
|
|
3522
3713
|
textAnchor: h,
|
|
3523
|
-
fontSize:
|
|
3714
|
+
fontSize: k.name,
|
|
3524
3715
|
fontWeight: "600",
|
|
3525
3716
|
fill: s,
|
|
3526
|
-
children:
|
|
3717
|
+
children: on(v[0], g)
|
|
3527
3718
|
}), v[1] && /* @__PURE__ */ d("text", {
|
|
3528
3719
|
x: m,
|
|
3529
|
-
y: n +
|
|
3720
|
+
y: n + k.h * .73,
|
|
3530
3721
|
textAnchor: h,
|
|
3531
|
-
fontSize:
|
|
3722
|
+
fontSize: k.title,
|
|
3532
3723
|
opacity: "0.7",
|
|
3533
3724
|
fill: s,
|
|
3534
|
-
children:
|
|
3725
|
+
children: on(v[1], g + 4)
|
|
3535
3726
|
})] })
|
|
3536
3727
|
]
|
|
3537
3728
|
}, e.id);
|
|
3538
3729
|
})]
|
|
3539
|
-
}), x && /* @__PURE__ */ d(
|
|
3730
|
+
}), x && /* @__PURE__ */ d(dn, {
|
|
3540
3731
|
node: x,
|
|
3541
3732
|
onClose: () => S(null)
|
|
3542
3733
|
})]
|
|
3543
3734
|
});
|
|
3544
3735
|
}
|
|
3545
|
-
function
|
|
3546
|
-
let { tenant: g, apiUrl: _ } = i(
|
|
3736
|
+
function pn({ columns: e = [], rows: t = [], source: n, limit: r = 10, striped: o = !0, bordered: s = !1, compact: c = !1, paged: u, emptyText: p, style: m, nodeRef: h }) {
|
|
3737
|
+
let { tenant: g, apiUrl: _ } = i(K), v = i(q), y = v?.[n], b = u ? be(v) : 1, [x, S] = l(null);
|
|
3547
3738
|
if (a(() => {
|
|
3548
3739
|
if (!n || y) return;
|
|
3549
3740
|
let e = !0, t = Math.max(1, Number(r) || 10), i = u && !n.startsWith("api:") ? `?offset=${(b - 1) * t}&limit=${t}` : "", a = n.startsWith("api:") ? `${_}/data/${encodeURIComponent(n.slice(4))}` : `${_}/dynamic/${encodeURIComponent(n)}${i}`;
|
|
@@ -3562,45 +3753,45 @@ function Qt({ columns: e = [], rows: t = [], source: n, limit: r = 10, striped:
|
|
|
3562
3753
|
b,
|
|
3563
3754
|
r
|
|
3564
3755
|
]), !e.length) return null;
|
|
3565
|
-
let C = Math.max(1, Number(r) || 10), w = n ? u ? y || n.startsWith("api:") ? (y ?? x ?? []).slice((b - 1) * C, b * C) : (x ?? []).slice(0, C) : (y ?? x ?? []).slice(0, C) : null, T = w ? w.map((t) => e.map((e) =>
|
|
3756
|
+
let C = Math.max(1, Number(r) || 10), w = n ? u ? y || n.startsWith("api:") ? (y ?? x ?? []).slice((b - 1) * C, b * C) : (x ?? []).slice(0, C) : (y ?? x ?? []).slice(0, C) : null, T = w ? w.map((t) => e.map((e) => J(Te(t?.data, e.field)))) : t, E = !!n && !(n && !y && x === null) && T.length === 0, D = c ? "6px 10px" : "10px 14px", O = "1px solid rgba(148, 163, 184, 0.35)", k = s ? { border: O } : { borderBottom: O };
|
|
3566
3757
|
return /* @__PURE__ */ d("div", {
|
|
3567
3758
|
ref: h,
|
|
3568
3759
|
style: {
|
|
3569
3760
|
width: "100%",
|
|
3570
3761
|
overflowX: "auto",
|
|
3571
|
-
...
|
|
3762
|
+
...P(m)
|
|
3572
3763
|
},
|
|
3573
3764
|
children: /* @__PURE__ */ f("table", {
|
|
3574
3765
|
style: {
|
|
3575
3766
|
width: "100%",
|
|
3576
3767
|
borderCollapse: "collapse",
|
|
3577
3768
|
fontSize: 14,
|
|
3578
|
-
...s ? { border:
|
|
3769
|
+
...s ? { border: O } : {}
|
|
3579
3770
|
},
|
|
3580
3771
|
children: [/* @__PURE__ */ d("thead", { children: /* @__PURE__ */ d("tr", { children: e.map((e, t) => /* @__PURE__ */ d("th", {
|
|
3581
3772
|
style: {
|
|
3582
3773
|
textAlign: "left",
|
|
3583
3774
|
fontWeight: 600,
|
|
3584
|
-
padding:
|
|
3775
|
+
padding: D,
|
|
3585
3776
|
background: "rgba(148, 163, 184, 0.12)",
|
|
3586
|
-
...
|
|
3777
|
+
...k
|
|
3587
3778
|
},
|
|
3588
3779
|
children: e.label ?? e
|
|
3589
3780
|
}, t)) }) }), /* @__PURE__ */ f("tbody", { children: [E && /* @__PURE__ */ d("tr", { children: /* @__PURE__ */ d("td", {
|
|
3590
3781
|
colSpan: e.length,
|
|
3591
3782
|
style: {
|
|
3592
|
-
padding:
|
|
3783
|
+
padding: D,
|
|
3593
3784
|
textAlign: "center",
|
|
3594
3785
|
opacity: .6,
|
|
3595
|
-
...
|
|
3786
|
+
...k
|
|
3596
3787
|
},
|
|
3597
3788
|
children: p || "No data yet"
|
|
3598
3789
|
}) }), T.map((t, n) => /* @__PURE__ */ d("tr", {
|
|
3599
3790
|
style: o && n % 2 == 1 ? { background: "rgba(148, 163, 184, 0.07)" } : void 0,
|
|
3600
3791
|
children: e.map((e, n) => /* @__PURE__ */ d("td", {
|
|
3601
3792
|
style: {
|
|
3602
|
-
padding:
|
|
3603
|
-
...
|
|
3793
|
+
padding: D,
|
|
3794
|
+
...k
|
|
3604
3795
|
},
|
|
3605
3796
|
children: t?.[n] ?? ""
|
|
3606
3797
|
}, n))
|
|
@@ -3608,124 +3799,642 @@ function Qt({ columns: e = [], rows: t = [], source: n, limit: r = 10, striped:
|
|
|
3608
3799
|
})
|
|
3609
3800
|
});
|
|
3610
3801
|
}
|
|
3611
|
-
var
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3802
|
+
var mn = {
|
|
3803
|
+
small: {
|
|
3804
|
+
cell: 62,
|
|
3805
|
+
font: 10.5,
|
|
3806
|
+
head: 11,
|
|
3807
|
+
title: 15,
|
|
3808
|
+
pad: 4,
|
|
3809
|
+
gap: 2
|
|
3810
|
+
},
|
|
3811
|
+
medium: {
|
|
3812
|
+
cell: 92,
|
|
3813
|
+
font: 12,
|
|
3814
|
+
head: 12,
|
|
3815
|
+
title: 18,
|
|
3816
|
+
pad: 6,
|
|
3817
|
+
gap: 3
|
|
3818
|
+
},
|
|
3819
|
+
large: {
|
|
3820
|
+
cell: 124,
|
|
3821
|
+
font: 13,
|
|
3822
|
+
head: 13,
|
|
3823
|
+
title: 22,
|
|
3824
|
+
pad: 8,
|
|
3825
|
+
gap: 4
|
|
3826
|
+
}
|
|
3827
|
+
}, hn = (e) => `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`, gn = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), _n = 366;
|
|
3828
|
+
function vn(e, t = {}) {
|
|
3829
|
+
let n = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.id) : [], r = (e) => Array.isArray(e) ? e[0] : e, i = (e) => e == null ? "" : J(e), a = (e) => {
|
|
3830
|
+
let t = i(r(e)), n = t ? new Date(t) : null;
|
|
3831
|
+
return n && !Number.isNaN(n.getTime()) ? n : null;
|
|
3832
|
+
};
|
|
3833
|
+
return n.map((e) => {
|
|
3834
|
+
let n = e.data ?? {}, o = a(n[t.startField]);
|
|
3835
|
+
return o ? {
|
|
3836
|
+
key: e.id,
|
|
3837
|
+
title: i(n[t.titleField || "name"]) || i(n.name) || "Untitled",
|
|
3838
|
+
start: o,
|
|
3839
|
+
end: a(n[t.endField]),
|
|
3840
|
+
href: t.hrefField ? i(n[t.hrefField]) : "",
|
|
3841
|
+
color: t.colorField ? i(r(n[t.colorField])) : ""
|
|
3842
|
+
} : null;
|
|
3843
|
+
}).filter(Boolean);
|
|
3844
|
+
}
|
|
3845
|
+
function yn(e) {
|
|
3846
|
+
return (Array.isArray(e) ? e : []).map((e, t) => {
|
|
3847
|
+
let n = e?.start ? new Date(e.start) : null;
|
|
3848
|
+
if (!n || Number.isNaN(n.getTime())) return null;
|
|
3849
|
+
let r = e?.end ? new Date(e.end) : null;
|
|
3850
|
+
return {
|
|
3851
|
+
key: e.key ?? `event-${t}`,
|
|
3852
|
+
title: e.title ?? "",
|
|
3853
|
+
start: n,
|
|
3854
|
+
end: r && !Number.isNaN(r.getTime()) ? r : null,
|
|
3855
|
+
href: e.href ?? "",
|
|
3856
|
+
color: e.color ?? ""
|
|
3857
|
+
};
|
|
3858
|
+
}).filter(Boolean);
|
|
3859
|
+
}
|
|
3860
|
+
function bn(e) {
|
|
3861
|
+
let t = /* @__PURE__ */ new Map();
|
|
3862
|
+
for (let n of e) {
|
|
3863
|
+
let e = gn(n.start), r = n.end ? gn(n.end) : e, i = Math.min(Math.max(0, Math.round((r - e) / 864e5)), _n);
|
|
3864
|
+
for (let r = 0; r <= i; r += 1) {
|
|
3865
|
+
let i = hn(new Date(e.getFullYear(), e.getMonth(), e.getDate() + r));
|
|
3866
|
+
t.has(i) || t.set(i, []), t.get(i).push(n);
|
|
3867
|
+
}
|
|
3868
|
+
}
|
|
3869
|
+
for (let e of t.values()) e.sort((e, t) => e.start - t.start);
|
|
3870
|
+
return t;
|
|
3871
|
+
}
|
|
3872
|
+
function xn({ events: e = [], source: t = "", titleField: n = "", startField: r = "", endField: o = "", hrefField: s = "", colorField: c = "", variant: p = "month", size: m = "medium", accent: h = "", eventBg: g = "", eventText: _ = "", borderColor: v = "", weekStart: y = "monday", max: b = 3, emptyText: x = "No events", style: S, nodeRef: C, interactive: w = !0 }) {
|
|
3873
|
+
let { tenant: T, apiUrl: E, locale: D } = i(K), O = i(q)?.[t], [k, A] = l(null), [j, M] = l(() => {
|
|
3874
|
+
let e = /* @__PURE__ */ new Date();
|
|
3875
|
+
return {
|
|
3876
|
+
year: e.getFullYear(),
|
|
3877
|
+
month: e.getMonth()
|
|
3878
|
+
};
|
|
3879
|
+
});
|
|
3880
|
+
a(() => {
|
|
3881
|
+
if (!t || O) return;
|
|
3882
|
+
let e = !0;
|
|
3883
|
+
return fetch(`${E}/dynamic/${encodeURIComponent(t)}`, { headers: T ? { "x-tenant": T } : {} }).then((e) => e.json()).then((t) => {
|
|
3884
|
+
let n = Array.isArray(t?.payload) ? t.payload : Array.isArray(t?.payload?.data) ? t.payload.data : [];
|
|
3885
|
+
e && A(n);
|
|
3886
|
+
}).catch(() => e && A([])), () => {
|
|
3887
|
+
e = !1;
|
|
3888
|
+
};
|
|
3889
|
+
}, [
|
|
3890
|
+
t,
|
|
3891
|
+
T,
|
|
3892
|
+
E,
|
|
3893
|
+
O
|
|
3894
|
+
]);
|
|
3895
|
+
let N = mn[m] ?? mn.medium, F = h || "var(--page-accent, #4f46e5)", I = v || "var(--page-border, rgba(148, 163, 184, 0.35))", L = g || F, R = _ || "var(--page-accent-text, #ffffff)", z = t ? vn(O ?? k ?? [], {
|
|
3896
|
+
titleField: n,
|
|
3897
|
+
startField: r,
|
|
3898
|
+
endField: o,
|
|
3899
|
+
hrefField: s,
|
|
3900
|
+
colorField: c
|
|
3901
|
+
}) : yn(e), B = bn(z), V = D || void 0, H = (e, t) => {
|
|
3902
|
+
let n = /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("span", { style: {
|
|
3903
|
+
width: 6,
|
|
3904
|
+
height: 6,
|
|
3905
|
+
borderRadius: "50%",
|
|
3906
|
+
background: e.color || R,
|
|
3907
|
+
flexShrink: 0,
|
|
3908
|
+
opacity: e.color ? 1 : .85
|
|
3909
|
+
} }), /* @__PURE__ */ d("span", {
|
|
3910
|
+
style: {
|
|
3911
|
+
overflow: "hidden",
|
|
3912
|
+
textOverflow: "ellipsis",
|
|
3913
|
+
whiteSpace: "nowrap"
|
|
3914
|
+
},
|
|
3915
|
+
children: e.title
|
|
3916
|
+
})] }), r = {
|
|
3917
|
+
display: "flex",
|
|
3918
|
+
alignItems: "center",
|
|
3919
|
+
gap: 5,
|
|
3920
|
+
background: e.color ? `color-mix(in srgb, ${e.color} 18%, transparent)` : L,
|
|
3921
|
+
color: e.color ? "inherit" : R,
|
|
3922
|
+
borderRadius: 4,
|
|
3923
|
+
padding: "2px 5px",
|
|
3924
|
+
fontSize: N.font,
|
|
3925
|
+
lineHeight: 1.35,
|
|
3926
|
+
textDecoration: "none",
|
|
3927
|
+
...t
|
|
3928
|
+
};
|
|
3929
|
+
return e.href && w ? /* @__PURE__ */ d("a", {
|
|
3930
|
+
href: e.href,
|
|
3931
|
+
style: r,
|
|
3932
|
+
title: e.title,
|
|
3933
|
+
children: n
|
|
3934
|
+
}, e.key) : /* @__PURE__ */ d("div", {
|
|
3935
|
+
style: r,
|
|
3936
|
+
title: e.title,
|
|
3937
|
+
children: n
|
|
3938
|
+
}, e.key);
|
|
3939
|
+
}, U = new Intl.DateTimeFormat(V, {
|
|
3940
|
+
month: "long",
|
|
3941
|
+
year: "numeric"
|
|
3942
|
+
}).format(new Date(j.year, j.month, 1)), ee = (e) => M((t) => {
|
|
3943
|
+
let n = new Date(t.year, t.month + e, 1);
|
|
3944
|
+
return {
|
|
3945
|
+
year: n.getFullYear(),
|
|
3946
|
+
month: n.getMonth()
|
|
3947
|
+
};
|
|
3948
|
+
}), te = (e, t) => /* @__PURE__ */ d("button", {
|
|
3949
|
+
type: "button",
|
|
3950
|
+
"aria-label": e,
|
|
3951
|
+
onClick: () => ee(t),
|
|
3952
|
+
style: {
|
|
3953
|
+
background: "transparent",
|
|
3954
|
+
border: `1px solid ${I}`,
|
|
3955
|
+
borderRadius: 6,
|
|
3956
|
+
color: "inherit",
|
|
3957
|
+
cursor: "pointer",
|
|
3958
|
+
fontSize: N.head,
|
|
3959
|
+
lineHeight: 1,
|
|
3960
|
+
padding: "4px 8px"
|
|
3961
|
+
},
|
|
3962
|
+
children: t < 0 ? "‹" : "›"
|
|
3963
|
+
}), W = /* @__PURE__ */ f("div", {
|
|
3964
|
+
style: {
|
|
3965
|
+
display: "flex",
|
|
3966
|
+
alignItems: "center",
|
|
3967
|
+
gap: 8,
|
|
3968
|
+
marginBottom: N.pad + 2
|
|
3969
|
+
},
|
|
3970
|
+
children: [
|
|
3971
|
+
/* @__PURE__ */ d("div", {
|
|
3972
|
+
style: {
|
|
3973
|
+
fontSize: N.title,
|
|
3974
|
+
fontWeight: 700,
|
|
3975
|
+
flexGrow: 1,
|
|
3976
|
+
fontFamily: "var(--page-heading-font, inherit)"
|
|
3977
|
+
},
|
|
3978
|
+
children: U
|
|
3979
|
+
}),
|
|
3980
|
+
te("Previous month", -1),
|
|
3981
|
+
te("Next month", 1)
|
|
3982
|
+
]
|
|
3983
|
+
});
|
|
3984
|
+
if (p === "list") {
|
|
3985
|
+
let e = z.filter((e) => e.start.getFullYear() === j.year && e.start.getMonth() === j.month).sort((e, t) => e.start - t.start), t = new Intl.DateTimeFormat(V, {
|
|
3986
|
+
day: "numeric",
|
|
3987
|
+
month: "short",
|
|
3988
|
+
hour: "2-digit",
|
|
3989
|
+
minute: "2-digit"
|
|
3990
|
+
});
|
|
3991
|
+
return /* @__PURE__ */ f("div", {
|
|
3992
|
+
ref: C,
|
|
3993
|
+
style: {
|
|
3994
|
+
width: "100%",
|
|
3995
|
+
...P(S)
|
|
3996
|
+
},
|
|
3997
|
+
children: [W, e.length ? /* @__PURE__ */ d("div", {
|
|
3998
|
+
style: {
|
|
3999
|
+
display: "flex",
|
|
4000
|
+
flexDirection: "column",
|
|
4001
|
+
gap: N.gap + 2
|
|
4002
|
+
},
|
|
4003
|
+
children: e.map((e) => /* @__PURE__ */ f("div", {
|
|
4004
|
+
style: {
|
|
4005
|
+
display: "flex",
|
|
4006
|
+
alignItems: "center",
|
|
4007
|
+
gap: 10,
|
|
4008
|
+
borderBottom: `1px solid ${I}`,
|
|
4009
|
+
paddingBottom: N.gap + 2
|
|
4010
|
+
},
|
|
4011
|
+
children: [/* @__PURE__ */ d("span", {
|
|
4012
|
+
style: {
|
|
4013
|
+
fontSize: N.font,
|
|
4014
|
+
opacity: .7,
|
|
4015
|
+
minWidth: 96
|
|
4016
|
+
},
|
|
4017
|
+
children: t.format(e.start)
|
|
4018
|
+
}), H(e, {
|
|
4019
|
+
flexGrow: 1,
|
|
4020
|
+
minWidth: 0
|
|
4021
|
+
})]
|
|
4022
|
+
}, e.key))
|
|
4023
|
+
}) : /* @__PURE__ */ d("div", {
|
|
4024
|
+
style: {
|
|
4025
|
+
fontSize: N.font,
|
|
4026
|
+
opacity: .6,
|
|
4027
|
+
padding: N.pad * 2
|
|
4028
|
+
},
|
|
4029
|
+
children: x
|
|
4030
|
+
})]
|
|
4031
|
+
});
|
|
4032
|
+
}
|
|
4033
|
+
let ne = new Date(j.year, j.month, 1), re = y === "sunday" ? 0 : 1, ie = (ne.getDay() - re + 7) % 7, ae = new Date(j.year, j.month + 1, 0).getDate(), oe = Math.ceil((ie + ae) / 7), se = hn(/* @__PURE__ */ new Date()), ce = new Intl.DateTimeFormat(V, { weekday: "short" }), G = [];
|
|
4034
|
+
for (let e = 0; e < oe * 7; e += 1) {
|
|
4035
|
+
let t = e - ie + 1, n = t >= 1 && t <= ae, r = hn(new Date(j.year, j.month, t)), i = n ? B.get(r) ?? [] : [], a = i.slice(0, Math.max(1, b)), o = n && r === se;
|
|
4036
|
+
G.push(/* @__PURE__ */ f("div", {
|
|
4037
|
+
style: {
|
|
4038
|
+
minHeight: N.cell,
|
|
4039
|
+
borderTop: `1px solid ${I}`,
|
|
4040
|
+
borderLeft: `1px solid ${I}`,
|
|
4041
|
+
padding: N.pad,
|
|
4042
|
+
display: "flex",
|
|
4043
|
+
flexDirection: "column",
|
|
4044
|
+
gap: N.gap,
|
|
4045
|
+
opacity: n ? 1 : .35,
|
|
4046
|
+
minWidth: 0
|
|
4047
|
+
},
|
|
4048
|
+
children: [
|
|
4049
|
+
/* @__PURE__ */ d("span", {
|
|
4050
|
+
style: {
|
|
4051
|
+
fontSize: N.font,
|
|
4052
|
+
fontWeight: o ? 700 : 400,
|
|
4053
|
+
alignSelf: "flex-start",
|
|
4054
|
+
borderRadius: "999px",
|
|
4055
|
+
padding: o ? "1px 6px" : 0,
|
|
4056
|
+
background: o ? F : "transparent",
|
|
4057
|
+
color: o ? R : "inherit"
|
|
4058
|
+
},
|
|
4059
|
+
children: n ? t : new Date(j.year, j.month, t).getDate()
|
|
4060
|
+
}),
|
|
4061
|
+
a.map((e) => H(e)),
|
|
4062
|
+
i.length > a.length && /* @__PURE__ */ d("span", {
|
|
4063
|
+
style: {
|
|
4064
|
+
fontSize: N.font,
|
|
4065
|
+
opacity: .6
|
|
4066
|
+
},
|
|
4067
|
+
children: `+${i.length - a.length}`
|
|
4068
|
+
})
|
|
4069
|
+
]
|
|
4070
|
+
}, e));
|
|
4071
|
+
}
|
|
4072
|
+
return /* @__PURE__ */ f("div", {
|
|
4073
|
+
ref: C,
|
|
4074
|
+
style: {
|
|
4075
|
+
width: "100%",
|
|
4076
|
+
...P(S)
|
|
4077
|
+
},
|
|
4078
|
+
children: [
|
|
4079
|
+
W,
|
|
4080
|
+
/* @__PURE__ */ f("div", {
|
|
4081
|
+
style: {
|
|
4082
|
+
display: "grid",
|
|
4083
|
+
gridTemplateColumns: "repeat(7, minmax(0, 1fr))"
|
|
4084
|
+
},
|
|
4085
|
+
children: [Array.from({ length: 7 }, (e, t) => /* @__PURE__ */ d("div", {
|
|
4086
|
+
style: {
|
|
4087
|
+
fontSize: N.head,
|
|
4088
|
+
fontWeight: 600,
|
|
4089
|
+
opacity: .7,
|
|
4090
|
+
textAlign: "center",
|
|
4091
|
+
padding: `0 0 ${N.pad}px`
|
|
4092
|
+
},
|
|
4093
|
+
children: ce.format(new Date(2024, 0, 7 + re + t))
|
|
4094
|
+
}, `head-${t}`)), G]
|
|
4095
|
+
}),
|
|
4096
|
+
/* @__PURE__ */ d("div", { style: { borderTop: `1px solid ${I}` } })
|
|
4097
|
+
]
|
|
4098
|
+
});
|
|
4099
|
+
}
|
|
4100
|
+
var Sn = {
|
|
4101
|
+
small: 380,
|
|
4102
|
+
medium: 560,
|
|
4103
|
+
large: 820,
|
|
4104
|
+
full: "100%"
|
|
4105
|
+
};
|
|
4106
|
+
function Cn({ dialogId: e = "", trigger: t = "button", triggerLabel: n = "Open", openOn: r = "trigger", delay: i = 0, size: o = "medium", title: s = "", showClose: u = !0, backdropClose: p = !0, position: m = "center", actions: h = [], showCloseAction: g = !1, closeLabel: _ = "Close", actionsAlign: v = "right", linked: y, style: b, nodeRef: x, inert: S = !1 }) {
|
|
4107
|
+
let [C, w] = l(!1), T = c(null);
|
|
4108
|
+
a(() => {
|
|
4109
|
+
if (S || !e) return;
|
|
4110
|
+
let t = (t) => {
|
|
4111
|
+
t.target.closest?.(`a[href="#${e}"], [data-webim-open="${e}"]`) && (t.preventDefault(), w(!0));
|
|
4112
|
+
};
|
|
4113
|
+
return document.addEventListener("click", t), () => document.removeEventListener("click", t);
|
|
4114
|
+
}, [S, e]), a(() => {
|
|
4115
|
+
if (S || r !== "load") return;
|
|
4116
|
+
let e = setTimeout(() => w(!0), Math.max(0, Number(i) || 0) * 1e3);
|
|
4117
|
+
return () => clearTimeout(e);
|
|
4118
|
+
}, [
|
|
4119
|
+
S,
|
|
4120
|
+
r,
|
|
4121
|
+
i
|
|
4122
|
+
]), a(() => {
|
|
4123
|
+
if (S || !C) return;
|
|
4124
|
+
let e = (e) => e.key === "Escape" && w(!1);
|
|
4125
|
+
document.addEventListener("keydown", e);
|
|
4126
|
+
let t = document.body.style.overflow;
|
|
4127
|
+
return document.body.style.overflow = "hidden", T.current?.focus?.(), () => {
|
|
4128
|
+
document.removeEventListener("keydown", e), document.body.style.overflow = t;
|
|
4129
|
+
};
|
|
4130
|
+
}, [S, C]);
|
|
4131
|
+
let E = Sn[o] ?? Sn.medium, D = (e) => {
|
|
4132
|
+
let t = {
|
|
4133
|
+
padding: "9px 16px",
|
|
4134
|
+
borderRadius: 6,
|
|
4135
|
+
cursor: "pointer",
|
|
4136
|
+
fontSize: 14,
|
|
4137
|
+
fontFamily: "inherit",
|
|
4138
|
+
textDecoration: "none",
|
|
4139
|
+
display: "inline-block",
|
|
4140
|
+
...{
|
|
4141
|
+
primary: {
|
|
4142
|
+
background: "var(--page-accent, #4f46e5)",
|
|
4143
|
+
color: "var(--page-accent-text, #ffffff)",
|
|
4144
|
+
border: "1px solid transparent"
|
|
4145
|
+
},
|
|
4146
|
+
outline: {
|
|
4147
|
+
background: "transparent",
|
|
4148
|
+
color: "inherit",
|
|
4149
|
+
border: "1px solid var(--page-border, rgba(148, 163, 184, 0.35))"
|
|
4150
|
+
},
|
|
4151
|
+
text: {
|
|
4152
|
+
background: "transparent",
|
|
4153
|
+
color: "inherit",
|
|
4154
|
+
border: "1px solid transparent"
|
|
4155
|
+
},
|
|
4156
|
+
danger: {
|
|
4157
|
+
background: "#dc2626",
|
|
4158
|
+
color: "#ffffff",
|
|
4159
|
+
border: "1px solid transparent"
|
|
4160
|
+
}
|
|
4161
|
+
}[e.variant ?? "primary"] ?? {}
|
|
4162
|
+
};
|
|
4163
|
+
return e.href && !S ? /* @__PURE__ */ d("a", {
|
|
4164
|
+
href: e.href,
|
|
4165
|
+
target: e.target || void 0,
|
|
4166
|
+
rel: e.target === "_blank" ? "noopener noreferrer" : void 0,
|
|
4167
|
+
style: t,
|
|
4168
|
+
children: e.label
|
|
4169
|
+
}, e.key) : /* @__PURE__ */ d("button", {
|
|
4170
|
+
type: "button",
|
|
4171
|
+
onClick: () => !S && w(!1),
|
|
4172
|
+
style: t,
|
|
4173
|
+
children: e.label
|
|
4174
|
+
}, e.key);
|
|
4175
|
+
}, O = Array.isArray(h) ? h : [], k = O.filter((e) => e.side === "left"), A = O.filter((e) => e.side !== "left"), j = g === !0 ? D({
|
|
4176
|
+
key: "__close",
|
|
4177
|
+
label: _ || "Close",
|
|
4178
|
+
variant: "outline"
|
|
4179
|
+
}) : null, M = k.length || A.length || j ? /* @__PURE__ */ f("div", {
|
|
4180
|
+
style: {
|
|
4181
|
+
display: "flex",
|
|
4182
|
+
alignItems: "center",
|
|
4183
|
+
gap: 8,
|
|
4184
|
+
padding: "14px 20px",
|
|
4185
|
+
borderTop: "1px solid var(--page-border, rgba(148, 163, 184, 0.35))",
|
|
4186
|
+
justifyContent: k.length ? "space-between" : v === "left" ? "flex-start" : v === "center" ? "center" : "flex-end"
|
|
4187
|
+
},
|
|
4188
|
+
children: [k.length > 0 && /* @__PURE__ */ d("div", {
|
|
4189
|
+
style: {
|
|
4190
|
+
display: "flex",
|
|
4191
|
+
gap: 8
|
|
4192
|
+
},
|
|
4193
|
+
children: k.map(D)
|
|
4194
|
+
}), /* @__PURE__ */ f("div", {
|
|
4195
|
+
style: {
|
|
4196
|
+
display: "flex",
|
|
4197
|
+
gap: 8
|
|
4198
|
+
},
|
|
4199
|
+
children: [j, A.map(D)]
|
|
4200
|
+
})]
|
|
4201
|
+
}) : null, N = /* @__PURE__ */ f("div", {
|
|
4202
|
+
ref: T,
|
|
4203
|
+
role: "dialog",
|
|
4204
|
+
"aria-modal": S ? void 0 : "true",
|
|
4205
|
+
"aria-label": s || void 0,
|
|
4206
|
+
tabIndex: -1,
|
|
4207
|
+
onClick: (e) => e.stopPropagation(),
|
|
4208
|
+
style: {
|
|
4209
|
+
width: typeof E == "number" ? `min(${E}px, 100%)` : E,
|
|
4210
|
+
maxHeight: S ? void 0 : "85vh",
|
|
4211
|
+
overflowY: S ? void 0 : "auto",
|
|
4212
|
+
borderRadius: 12,
|
|
4213
|
+
background: "var(--page-surface, #ffffff)",
|
|
4214
|
+
color: "var(--page-text, #111827)",
|
|
4215
|
+
border: "1px solid var(--page-border, rgba(148, 163, 184, 0.35))",
|
|
4216
|
+
boxShadow: S ? "none" : "0 24px 64px rgba(15, 23, 42, 0.35)",
|
|
4217
|
+
outline: "none",
|
|
4218
|
+
...P(b)
|
|
4219
|
+
},
|
|
4220
|
+
children: [
|
|
4221
|
+
(s || u !== !1) && /* @__PURE__ */ f("div", {
|
|
4222
|
+
style: {
|
|
4223
|
+
display: "flex",
|
|
4224
|
+
alignItems: "center",
|
|
4225
|
+
gap: 12,
|
|
4226
|
+
padding: "16px 20px",
|
|
4227
|
+
borderBottom: "1px solid var(--page-border, rgba(148, 163, 184, 0.35))"
|
|
4228
|
+
},
|
|
4229
|
+
children: [/* @__PURE__ */ d("span", {
|
|
4230
|
+
style: {
|
|
4231
|
+
fontWeight: 700,
|
|
4232
|
+
fontSize: 17,
|
|
4233
|
+
flexGrow: 1,
|
|
4234
|
+
fontFamily: "var(--page-heading-font, inherit)"
|
|
4235
|
+
},
|
|
4236
|
+
children: s
|
|
4237
|
+
}), u !== !1 && /* @__PURE__ */ d("button", {
|
|
4238
|
+
type: "button",
|
|
4239
|
+
"aria-label": "Close",
|
|
4240
|
+
onClick: () => !S && w(!1),
|
|
4241
|
+
style: {
|
|
4242
|
+
background: "transparent",
|
|
4243
|
+
border: 0,
|
|
4244
|
+
color: "inherit",
|
|
4245
|
+
cursor: "pointer",
|
|
4246
|
+
fontSize: 20,
|
|
4247
|
+
lineHeight: 1,
|
|
4248
|
+
padding: 2,
|
|
4249
|
+
opacity: .7
|
|
4250
|
+
},
|
|
4251
|
+
children: "✕"
|
|
4252
|
+
})]
|
|
4253
|
+
}),
|
|
4254
|
+
/* @__PURE__ */ d("div", {
|
|
4255
|
+
style: { padding: 20 },
|
|
4256
|
+
children: y?.content
|
|
4257
|
+
}),
|
|
4258
|
+
M
|
|
4259
|
+
]
|
|
4260
|
+
});
|
|
4261
|
+
return /* @__PURE__ */ f("div", {
|
|
4262
|
+
ref: x,
|
|
4263
|
+
id: e || void 0,
|
|
4264
|
+
style: S ? void 0 : { display: "contents" },
|
|
4265
|
+
children: [t === "button" && /* @__PURE__ */ d("button", {
|
|
4266
|
+
type: "button",
|
|
4267
|
+
onClick: () => !S && w(!0),
|
|
4268
|
+
style: {
|
|
4269
|
+
padding: "10px 18px",
|
|
4270
|
+
border: 0,
|
|
4271
|
+
borderRadius: 6,
|
|
4272
|
+
cursor: "pointer",
|
|
4273
|
+
fontSize: 15,
|
|
4274
|
+
fontFamily: "inherit",
|
|
4275
|
+
background: "var(--page-accent, #4f46e5)",
|
|
4276
|
+
color: "var(--page-accent-text, #ffffff)"
|
|
4277
|
+
},
|
|
4278
|
+
children: n
|
|
4279
|
+
}), S ? /* @__PURE__ */ d("div", {
|
|
4280
|
+
style: { marginTop: t === "button" ? 12 : 0 },
|
|
4281
|
+
children: N
|
|
4282
|
+
}) : C && /* @__PURE__ */ d("div", {
|
|
4283
|
+
onClick: p === !1 ? void 0 : () => w(!1),
|
|
4284
|
+
style: {
|
|
4285
|
+
position: "fixed",
|
|
4286
|
+
inset: 0,
|
|
4287
|
+
zIndex: 2147483e3,
|
|
4288
|
+
display: "flex",
|
|
4289
|
+
alignItems: m === "top" ? "flex-start" : "center",
|
|
4290
|
+
justifyContent: "center",
|
|
4291
|
+
padding: 20,
|
|
4292
|
+
paddingTop: m === "top" ? "8vh" : 20,
|
|
4293
|
+
background: "rgba(15, 23, 42, 0.55)",
|
|
4294
|
+
backdropFilter: "blur(2px)"
|
|
4295
|
+
},
|
|
4296
|
+
children: N
|
|
4297
|
+
})]
|
|
4298
|
+
});
|
|
4299
|
+
}
|
|
4300
|
+
var wn = {
|
|
4301
|
+
PageRoot: Pe,
|
|
4302
|
+
CalendarBlock: xn,
|
|
4303
|
+
DialogBlock: Cn,
|
|
4304
|
+
Section: Fe,
|
|
4305
|
+
Container: Ie,
|
|
4306
|
+
Heading: Le,
|
|
4307
|
+
TextBlock: Je,
|
|
4308
|
+
ButtonBlock: Ze,
|
|
4309
|
+
ImageBlock: Qe,
|
|
4310
|
+
Spacer: it,
|
|
4311
|
+
Divider: at,
|
|
4312
|
+
SliderBlock: dt,
|
|
4313
|
+
CanvasSlider: ft,
|
|
4314
|
+
TabsBlock: vt,
|
|
4315
|
+
QuickStack: zt,
|
|
4316
|
+
CollectionList: Bt,
|
|
4317
|
+
CollectionSearch: Vt,
|
|
4318
|
+
BreadcrumbsBlock: Ht,
|
|
4319
|
+
PaginationBlock: Ut,
|
|
4320
|
+
StepperBlock: tn,
|
|
4321
|
+
SocialLinksBlock: en,
|
|
4322
|
+
ThemeModeBlock: Jt,
|
|
4323
|
+
ScrollTopBlock: Qt,
|
|
4324
|
+
OrgChartBlock: fn,
|
|
4325
|
+
TableBlock: pn,
|
|
4326
|
+
MasonryBlock: pt,
|
|
4327
|
+
AccordionBlock: yt,
|
|
4328
|
+
NavbarBlock: _t,
|
|
4329
|
+
ListBlock: qe,
|
|
4330
|
+
TextSpan: Be,
|
|
4331
|
+
QuoteBlock: Ke,
|
|
4332
|
+
TextLink: Xe,
|
|
4333
|
+
RichTextBlock: We,
|
|
4334
|
+
RichContentBlock: We,
|
|
4335
|
+
VideoBlock: $e,
|
|
4336
|
+
YouTubeBlock: tt,
|
|
4337
|
+
IframeBlock: nt,
|
|
4338
|
+
EmbedBlock: rt,
|
|
4339
|
+
FormBlock: Dt,
|
|
4340
|
+
FormLabel: Mt,
|
|
4341
|
+
FormInput: Nt,
|
|
4342
|
+
FormTextarea: Pt,
|
|
4343
|
+
FormCheckbox: (e) => /* @__PURE__ */ d(Ft, {
|
|
3653
4344
|
kind: "checkbox",
|
|
3654
4345
|
...e
|
|
3655
4346
|
}),
|
|
3656
|
-
FormRadio: (e) => /* @__PURE__ */ d(
|
|
4347
|
+
FormRadio: (e) => /* @__PURE__ */ d(Ft, {
|
|
3657
4348
|
kind: "radio",
|
|
3658
4349
|
...e
|
|
3659
4350
|
}),
|
|
3660
|
-
FormSelect:
|
|
3661
|
-
FormFile:
|
|
3662
|
-
FormRecaptcha:
|
|
3663
|
-
FormSubmit:
|
|
3664
|
-
},
|
|
4351
|
+
FormSelect: It,
|
|
4352
|
+
FormFile: Lt,
|
|
4353
|
+
FormRecaptcha: jt,
|
|
4354
|
+
FormSubmit: Rt
|
|
4355
|
+
}, Tn = {
|
|
3665
4356
|
id: "auth",
|
|
3666
4357
|
label: "Accounts",
|
|
3667
4358
|
category: "Apps",
|
|
3668
4359
|
keys: ["SiteLoginForm", "SiteAccountMenu"],
|
|
3669
4360
|
ssr: "shell",
|
|
3670
4361
|
settings: ["site.authRedirect"]
|
|
3671
|
-
},
|
|
4362
|
+
}, En = n({
|
|
3672
4363
|
user: null,
|
|
3673
4364
|
status: "idle",
|
|
3674
4365
|
ensure: () => {},
|
|
3675
4366
|
refresh: () => {},
|
|
3676
4367
|
signOut: () => {}
|
|
3677
|
-
}),
|
|
3678
|
-
let e = i(
|
|
4368
|
+
}), Dn = () => {
|
|
4369
|
+
let e = i(En);
|
|
3679
4370
|
return a(() => {
|
|
3680
4371
|
e.ensure();
|
|
3681
4372
|
}, [e]), e;
|
|
3682
4373
|
};
|
|
3683
|
-
function
|
|
3684
|
-
let
|
|
4374
|
+
function On({ children: e, initialUser: t, disabled: n, apiUrl: o, tenant: u }) {
|
|
4375
|
+
let f = i(K), p = o || f?.apiUrl || "/api", m = u || f?.tenant || "", [h, g] = l(t ?? null), [_, v] = l(t ? "user" : n ? "guest" : "idle"), y = c(!1), b = r((e, t) => fetch(`${p}${e}`, {
|
|
3685
4376
|
...t,
|
|
3686
4377
|
credentials: "include",
|
|
3687
4378
|
headers: {
|
|
3688
4379
|
"content-type": "application/json",
|
|
3689
|
-
...
|
|
4380
|
+
...m ? { "x-tenant": m } : {},
|
|
3690
4381
|
...t?.headers
|
|
3691
4382
|
}
|
|
3692
|
-
}), [
|
|
4383
|
+
}), [p, m]), x = r(() => n ? Promise.resolve(null) : b("/site/me").then((e) => e.ok ? e.json() : null).then((e) => {
|
|
3693
4384
|
let t = e?.payload ?? null;
|
|
3694
|
-
return
|
|
3695
|
-
}).catch(() => (
|
|
3696
|
-
|
|
3697
|
-
}), [
|
|
3698
|
-
|
|
4385
|
+
return g(t), v(t ? "user" : "guest"), t;
|
|
4386
|
+
}).catch(() => (g(null), v("guest"), null)), [b, n]), S = r(() => b("/site/logout", { method: "post" }).catch(() => {}).then(() => {
|
|
4387
|
+
g(null), v("guest");
|
|
4388
|
+
}), [b]), C = r(() => {
|
|
4389
|
+
y.current || n || t || (y.current = !0, v("loading"), x());
|
|
3699
4390
|
}, [
|
|
3700
4391
|
n,
|
|
3701
4392
|
t,
|
|
3702
|
-
b
|
|
3703
|
-
]), C = s(() => ({
|
|
3704
|
-
user: m,
|
|
3705
|
-
status: g,
|
|
3706
|
-
ensure: S,
|
|
3707
|
-
refresh: b,
|
|
3708
|
-
signOut: x
|
|
3709
|
-
}), [
|
|
3710
|
-
m,
|
|
3711
|
-
g,
|
|
3712
|
-
S,
|
|
3713
|
-
b,
|
|
3714
4393
|
x
|
|
4394
|
+
]), w = s(() => ({
|
|
4395
|
+
user: h,
|
|
4396
|
+
status: _,
|
|
4397
|
+
ensure: C,
|
|
4398
|
+
refresh: x,
|
|
4399
|
+
signOut: S
|
|
4400
|
+
}), [
|
|
4401
|
+
h,
|
|
4402
|
+
_,
|
|
4403
|
+
C,
|
|
4404
|
+
x,
|
|
4405
|
+
S
|
|
3715
4406
|
]);
|
|
3716
|
-
return
|
|
3717
|
-
|
|
4407
|
+
return a(() => {
|
|
4408
|
+
n || typeof window > "u" || (window.webim = {
|
|
4409
|
+
...window.webim,
|
|
4410
|
+
user: h,
|
|
4411
|
+
status: _,
|
|
4412
|
+
requireUser: () => y.current || t ? Promise.resolve(h) : x(),
|
|
4413
|
+
signOut: S
|
|
4414
|
+
}, window.dispatchEvent(new CustomEvent("webim:session", { detail: {
|
|
4415
|
+
user: h,
|
|
4416
|
+
status: _
|
|
4417
|
+
} })));
|
|
4418
|
+
}, [
|
|
4419
|
+
n,
|
|
4420
|
+
h,
|
|
4421
|
+
_,
|
|
4422
|
+
t,
|
|
4423
|
+
x,
|
|
4424
|
+
S
|
|
4425
|
+
]), /* @__PURE__ */ d(En.Provider, {
|
|
4426
|
+
value: w,
|
|
3718
4427
|
children: e
|
|
3719
4428
|
});
|
|
3720
4429
|
}
|
|
3721
|
-
function
|
|
3722
|
-
let { status: n } =
|
|
4430
|
+
function kn({ when: e, children: t }) {
|
|
4431
|
+
let { status: n } = Dn();
|
|
3723
4432
|
return !e || e === "always" ? t : n === "idle" || n === "loading" ? null : e === "user" == (n === "user") ? t : null;
|
|
3724
4433
|
}
|
|
3725
4434
|
//#endregion
|
|
3726
4435
|
//#region ../ui/src/components/builder/apps/auth/views.jsx
|
|
3727
|
-
function
|
|
3728
|
-
let { tenant: h, apiUrl: g, settings: _ } = i(
|
|
4436
|
+
function An({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordLabel: r = "Password", nameLabel: a = "Name", submitLabel: o, style: s, nodeRef: c, inert: u, linked: p, show: m }) {
|
|
4437
|
+
let { tenant: h, apiUrl: g, settings: _ } = i(K), [v, y] = l("form"), [b, x] = l(""), [S, C] = l(!1), w = e === "register", T = u ? m || "form" : v, E = (e) => typeof e == "string" && e.startsWith("/") && !e.startsWith("//") ? e : "", D = async (e) => {
|
|
3729
4438
|
if (e.preventDefault(), u) return;
|
|
3730
4439
|
let n = new FormData(e.currentTarget);
|
|
3731
4440
|
C(!0), x("");
|
|
@@ -3761,11 +4470,11 @@ function on({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
3761
4470
|
display: "grid",
|
|
3762
4471
|
gap: 12,
|
|
3763
4472
|
maxWidth: 360,
|
|
3764
|
-
...
|
|
4473
|
+
...P(s)
|
|
3765
4474
|
},
|
|
3766
4475
|
children: [
|
|
3767
4476
|
/* @__PURE__ */ f("form", {
|
|
3768
|
-
onSubmit:
|
|
4477
|
+
onSubmit: D,
|
|
3769
4478
|
style: {
|
|
3770
4479
|
display: T === "form" ? "grid" : "none",
|
|
3771
4480
|
gap: 10
|
|
@@ -3773,20 +4482,20 @@ function on({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
3773
4482
|
children: [
|
|
3774
4483
|
w ? /* @__PURE__ */ f("label", {
|
|
3775
4484
|
style: {
|
|
3776
|
-
...
|
|
4485
|
+
...Z,
|
|
3777
4486
|
display: "grid",
|
|
3778
4487
|
gap: 6
|
|
3779
4488
|
},
|
|
3780
4489
|
children: [a, /* @__PURE__ */ d("input", {
|
|
3781
4490
|
name: "name",
|
|
3782
4491
|
type: "text",
|
|
3783
|
-
style:
|
|
3784
|
-
|
|
4492
|
+
style: Q,
|
|
4493
|
+
...$(u)
|
|
3785
4494
|
})]
|
|
3786
4495
|
}) : null,
|
|
3787
4496
|
/* @__PURE__ */ f("label", {
|
|
3788
4497
|
style: {
|
|
3789
|
-
...
|
|
4498
|
+
...Z,
|
|
3790
4499
|
display: "grid",
|
|
3791
4500
|
gap: 6
|
|
3792
4501
|
},
|
|
@@ -3794,13 +4503,13 @@ function on({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
3794
4503
|
name: "email",
|
|
3795
4504
|
type: "email",
|
|
3796
4505
|
required: !u,
|
|
3797
|
-
style:
|
|
3798
|
-
|
|
4506
|
+
style: Q,
|
|
4507
|
+
...$(u)
|
|
3799
4508
|
})]
|
|
3800
4509
|
}),
|
|
3801
4510
|
/* @__PURE__ */ f("label", {
|
|
3802
4511
|
style: {
|
|
3803
|
-
...
|
|
4512
|
+
...Z,
|
|
3804
4513
|
display: "grid",
|
|
3805
4514
|
gap: 6
|
|
3806
4515
|
},
|
|
@@ -3808,15 +4517,15 @@ function on({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
3808
4517
|
name: "password",
|
|
3809
4518
|
type: "password",
|
|
3810
4519
|
required: !u,
|
|
3811
|
-
style:
|
|
3812
|
-
|
|
4520
|
+
style: Q,
|
|
4521
|
+
...$(u)
|
|
3813
4522
|
})]
|
|
3814
4523
|
}),
|
|
3815
4524
|
/* @__PURE__ */ d("button", {
|
|
3816
4525
|
type: u ? "button" : "submit",
|
|
3817
4526
|
disabled: S || void 0,
|
|
3818
4527
|
style: {
|
|
3819
|
-
...
|
|
4528
|
+
...Y,
|
|
3820
4529
|
border: 0,
|
|
3821
4530
|
padding: "10px 22px",
|
|
3822
4531
|
borderRadius: 8,
|
|
@@ -3848,8 +4557,8 @@ function on({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
3848
4557
|
]
|
|
3849
4558
|
});
|
|
3850
4559
|
}
|
|
3851
|
-
function
|
|
3852
|
-
let { user: c, status: l, signOut: u } =
|
|
4560
|
+
function jn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !1, style: r, nodeRef: i, inert: a, linked: o, show: s }) {
|
|
4561
|
+
let { user: c, status: l, signOut: u } = Dn(), p = a ? s || "user" : l, m = a ? {
|
|
3853
4562
|
name: "Ada Lovelace",
|
|
3854
4563
|
email: "ada@example.com"
|
|
3855
4564
|
} : c;
|
|
@@ -3857,7 +4566,7 @@ function sn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
3857
4566
|
ref: i,
|
|
3858
4567
|
style: {
|
|
3859
4568
|
minHeight: 24,
|
|
3860
|
-
...
|
|
4569
|
+
...P(r)
|
|
3861
4570
|
}
|
|
3862
4571
|
}) : p === "user" ? /* @__PURE__ */ f("div", {
|
|
3863
4572
|
ref: i,
|
|
@@ -3865,12 +4574,12 @@ function sn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
3865
4574
|
display: "flex",
|
|
3866
4575
|
alignItems: "center",
|
|
3867
4576
|
gap: 10,
|
|
3868
|
-
...
|
|
4577
|
+
...P(r)
|
|
3869
4578
|
},
|
|
3870
4579
|
children: [
|
|
3871
4580
|
/* @__PURE__ */ f("span", {
|
|
3872
4581
|
style: {
|
|
3873
|
-
...
|
|
4582
|
+
...Z,
|
|
3874
4583
|
fontWeight: 600
|
|
3875
4584
|
},
|
|
3876
4585
|
children: [
|
|
@@ -3881,7 +4590,7 @@ function sn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
3881
4590
|
}),
|
|
3882
4591
|
n && m?.email ? /* @__PURE__ */ d("span", {
|
|
3883
4592
|
style: {
|
|
3884
|
-
...
|
|
4593
|
+
...Z,
|
|
3885
4594
|
opacity: .7
|
|
3886
4595
|
},
|
|
3887
4596
|
children: m.email
|
|
@@ -3890,14 +4599,14 @@ function sn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
3890
4599
|
type: "button",
|
|
3891
4600
|
onClick: a ? void 0 : u,
|
|
3892
4601
|
style: {
|
|
3893
|
-
...
|
|
4602
|
+
...Y,
|
|
3894
4603
|
border: 0,
|
|
3895
4604
|
padding: "8px 16px",
|
|
3896
4605
|
borderRadius: 8,
|
|
3897
4606
|
fontSize: 14,
|
|
3898
4607
|
cursor: a ? "default" : "pointer"
|
|
3899
4608
|
},
|
|
3900
|
-
|
|
4609
|
+
...$(a),
|
|
3901
4610
|
children: t
|
|
3902
4611
|
})
|
|
3903
4612
|
]
|
|
@@ -3907,47 +4616,47 @@ function sn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
3907
4616
|
display: "flex",
|
|
3908
4617
|
alignItems: "center",
|
|
3909
4618
|
gap: 10,
|
|
3910
|
-
...
|
|
4619
|
+
...P(r)
|
|
3911
4620
|
},
|
|
3912
4621
|
children: o?.signedOut ?? null
|
|
3913
4622
|
});
|
|
3914
4623
|
}
|
|
3915
4624
|
//#endregion
|
|
3916
4625
|
//#region ../ui/src/components/builder/apps/consent/manifest.js
|
|
3917
|
-
var
|
|
4626
|
+
var Mn = {
|
|
3918
4627
|
id: "consent",
|
|
3919
4628
|
label: "Cookie consent",
|
|
3920
4629
|
category: "Apps",
|
|
3921
4630
|
keys: ["CookieConsent"],
|
|
3922
4631
|
ssr: "shell",
|
|
3923
4632
|
settings: []
|
|
3924
|
-
},
|
|
3925
|
-
function
|
|
4633
|
+
}, Nn = "webim.cookie_consent";
|
|
4634
|
+
function Pn() {
|
|
3926
4635
|
try {
|
|
3927
|
-
let e = window.localStorage.getItem(
|
|
4636
|
+
let e = window.localStorage.getItem(Nn), t = e ? JSON.parse(e) : null;
|
|
3928
4637
|
return t?.choice === "accepted" || t?.choice === "declined" ? t.choice : "";
|
|
3929
4638
|
} catch {
|
|
3930
4639
|
return "";
|
|
3931
4640
|
}
|
|
3932
4641
|
}
|
|
3933
|
-
function
|
|
4642
|
+
function Fn(e) {
|
|
3934
4643
|
try {
|
|
3935
4644
|
document.querySelectorAll(".webim-page").forEach((t) => t.setAttribute("data-webim-consent", e));
|
|
3936
4645
|
} catch {}
|
|
3937
4646
|
}
|
|
3938
|
-
function
|
|
4647
|
+
function In(e) {
|
|
3939
4648
|
try {
|
|
3940
|
-
window.localStorage.setItem(
|
|
4649
|
+
window.localStorage.setItem(Nn, JSON.stringify({
|
|
3941
4650
|
choice: e,
|
|
3942
4651
|
at: (/* @__PURE__ */ new Date()).toISOString()
|
|
3943
4652
|
}));
|
|
3944
4653
|
} catch {}
|
|
3945
|
-
|
|
4654
|
+
Fn(e);
|
|
3946
4655
|
try {
|
|
3947
4656
|
window.dispatchEvent(new CustomEvent("webim:consent", { detail: { choice: e } }));
|
|
3948
4657
|
} catch {}
|
|
3949
4658
|
}
|
|
3950
|
-
var
|
|
4659
|
+
var Ln = {
|
|
3951
4660
|
bottom: {
|
|
3952
4661
|
left: 0,
|
|
3953
4662
|
right: 0,
|
|
@@ -3969,21 +4678,21 @@ var pn = {
|
|
|
3969
4678
|
maxWidth: 400
|
|
3970
4679
|
}
|
|
3971
4680
|
};
|
|
3972
|
-
function
|
|
4681
|
+
function Rn({ message: e, acceptLabel: t, rejectLabel: n, showReject: r, linkLabel: i, linkHref: o, position: s, linked: c, style: p, nodeRef: m, inert: h }) {
|
|
3973
4682
|
let [g, _] = l(!!h), [v, y] = l(null), b = (e) => {
|
|
3974
4683
|
y(e), typeof m == "function" && m(e);
|
|
3975
4684
|
};
|
|
3976
4685
|
if (a(() => {
|
|
3977
4686
|
if (h) return;
|
|
3978
|
-
let e =
|
|
4687
|
+
let e = Pn();
|
|
3979
4688
|
if (e) {
|
|
3980
4689
|
let t = v?.closest?.(".webim-page");
|
|
3981
4690
|
t && t.setAttribute("data-webim-consent", e);
|
|
3982
4691
|
} else _(!0);
|
|
3983
4692
|
}, [h, v]), !g) return null;
|
|
3984
4693
|
let x = (e) => () => {
|
|
3985
|
-
h || (
|
|
3986
|
-
}, S =
|
|
4694
|
+
h || (In(e, v), _(!1));
|
|
4695
|
+
}, S = Ln[s] ?? Ln.bottom, C = {
|
|
3987
4696
|
appearance: "none",
|
|
3988
4697
|
font: "inherit",
|
|
3989
4698
|
fontSize: 14,
|
|
@@ -4015,7 +4724,7 @@ function mn({ message: e, acceptLabel: t, rejectLabel: n, showReject: r, linkLab
|
|
|
4015
4724
|
boxShadow: "0 8px 30px rgba(15, 23, 42, 0.18)",
|
|
4016
4725
|
fontSize: 14,
|
|
4017
4726
|
lineHeight: 1.5,
|
|
4018
|
-
...
|
|
4727
|
+
...P(p)
|
|
4019
4728
|
},
|
|
4020
4729
|
children: [/* @__PURE__ */ f("div", {
|
|
4021
4730
|
style: {
|
|
@@ -4063,31 +4772,251 @@ function mn({ message: e, acceptLabel: t, rejectLabel: n, showReject: r, linkLab
|
|
|
4063
4772
|
}
|
|
4064
4773
|
//#endregion
|
|
4065
4774
|
//#region ../ui/src/components/builder/apps/language/manifest.js
|
|
4066
|
-
var
|
|
4775
|
+
var zn = {
|
|
4067
4776
|
id: "language",
|
|
4068
4777
|
label: "Language",
|
|
4069
4778
|
category: "Apps",
|
|
4070
4779
|
keys: ["SiteLanguagePicker"],
|
|
4071
4780
|
ssr: "prefetch",
|
|
4072
4781
|
settings: ["locales"]
|
|
4073
|
-
}
|
|
4782
|
+
}, Bn = {
|
|
4783
|
+
id: "search",
|
|
4784
|
+
label: "Search",
|
|
4785
|
+
category: "Apps",
|
|
4786
|
+
keys: ["SiteSearch"],
|
|
4787
|
+
ssr: "prefetch",
|
|
4788
|
+
settings: []
|
|
4789
|
+
}, Vn = 50, Hn = 2e3;
|
|
4790
|
+
function Un() {
|
|
4791
|
+
return typeof window > "u" ? "" : new URLSearchParams(window.location.search).get("q") ?? "";
|
|
4792
|
+
}
|
|
4793
|
+
function Wn(e, t) {
|
|
4794
|
+
let n = e?.data ?? {}, r = [];
|
|
4795
|
+
for (let e of Object.values(n)) {
|
|
4796
|
+
let t = e == null ? "" : J(e);
|
|
4797
|
+
if (t && r.push(t), r.join(" ").length > Hn) break;
|
|
4798
|
+
}
|
|
4799
|
+
return r.join(" ").slice(0, Hn).toLocaleLowerCase(t || void 0);
|
|
4800
|
+
}
|
|
4801
|
+
function Gn({ placeholder: e = "Search…", buttonLabel: t = "Search", showButton: n = !0, live: r = !1, layout: o = "inline", includePages: s = !0, collections: u = [], limit: p = 10, emptyText: m = "Nothing found", hint: h = "", style: g, nodeRef: _, inert: v = !1, sample: y = !1 }) {
|
|
4802
|
+
let { tenant: b, apiUrl: x, locale: S } = i(K), [C, w] = l(() => Un()), [T, E] = l(() => Un()), [D, O] = l(null), [k, A] = l(!1), j = c(null), M = o === "popup";
|
|
4803
|
+
a(() => {
|
|
4804
|
+
let e = () => {
|
|
4805
|
+
let e = Un();
|
|
4806
|
+
w(e), E(e);
|
|
4807
|
+
};
|
|
4808
|
+
return window.addEventListener("popstate", e), window.addEventListener("webim:urlchange", e), () => {
|
|
4809
|
+
window.removeEventListener("popstate", e), window.removeEventListener("webim:urlchange", e);
|
|
4810
|
+
};
|
|
4811
|
+
}, []), a(() => {
|
|
4812
|
+
if (!r) return;
|
|
4813
|
+
let e = setTimeout(() => {
|
|
4814
|
+
w(T), T.trim() && A(!0);
|
|
4815
|
+
}, 200);
|
|
4816
|
+
return () => clearTimeout(e);
|
|
4817
|
+
}, [r, T]), a(() => {
|
|
4818
|
+
if (!M) return;
|
|
4819
|
+
let e = (e) => {
|
|
4820
|
+
j.current && !j.current.contains(e.target) && A(!1);
|
|
4821
|
+
}, t = (e) => e.key === "Escape" && A(!1);
|
|
4822
|
+
return document.addEventListener("mousedown", e), document.addEventListener("keydown", t), () => {
|
|
4823
|
+
document.removeEventListener("mousedown", e), document.removeEventListener("keydown", t);
|
|
4824
|
+
};
|
|
4825
|
+
}, [M]), a(() => {
|
|
4826
|
+
let e = !0, t = b ? { "x-tenant": b } : {}, n = (e) => fetch(`${x}${e}`, { headers: t }).then((e) => e.json()).then((e) => e?.payload).catch(() => null), r = [s ? n("/site/pages").then((e) => ({
|
|
4827
|
+
kind: "page",
|
|
4828
|
+
rows: Array.isArray(e) ? e : []
|
|
4829
|
+
})) : null, ...(Array.isArray(u) ? u : []).filter(Boolean).map((e) => n(`/dynamic/${encodeURIComponent(e)}?all=1${S ? `&locale=${encodeURIComponent(S)}` : ""}`).then((t) => ({
|
|
4830
|
+
kind: "entry",
|
|
4831
|
+
slug: e,
|
|
4832
|
+
rows: Array.isArray(t) ? t : Array.isArray(t?.data) ? t.data : []
|
|
4833
|
+
})))].filter(Boolean);
|
|
4834
|
+
return Promise.all(r).then((t) => e && O(t)), () => {
|
|
4835
|
+
e = !1;
|
|
4836
|
+
};
|
|
4837
|
+
}, [
|
|
4838
|
+
x,
|
|
4839
|
+
b,
|
|
4840
|
+
S,
|
|
4841
|
+
s,
|
|
4842
|
+
JSON.stringify(u)
|
|
4843
|
+
]);
|
|
4844
|
+
let N = C.trim().toLocaleLowerCase(S || void 0), F = [];
|
|
4845
|
+
if (N && D) for (let e of D) if (e.kind === "page") for (let t of e.rows) {
|
|
4846
|
+
if (t?.access && t.access !== "public") continue;
|
|
4847
|
+
let e = String(t?.title ?? "");
|
|
4848
|
+
`${e} ${t?.slug ?? ""}`.toLocaleLowerCase(S || void 0).includes(N) && F.push({
|
|
4849
|
+
key: `page:${t.slug}`,
|
|
4850
|
+
title: e || t.slug,
|
|
4851
|
+
url: `/${t.slug}`,
|
|
4852
|
+
kind: "page"
|
|
4853
|
+
});
|
|
4854
|
+
}
|
|
4855
|
+
else for (let t of e.rows) {
|
|
4856
|
+
if (!Wn(t, S).includes(N)) continue;
|
|
4857
|
+
let n = t?.data ?? {}, r = J(n.name) || "Untitled", i = J(n.slug);
|
|
4858
|
+
F.push({
|
|
4859
|
+
key: `entry:${t.id}`,
|
|
4860
|
+
title: r,
|
|
4861
|
+
url: i ? `/${e.slug}/${i}` : `/${e.slug}`,
|
|
4862
|
+
kind: "entry"
|
|
4863
|
+
});
|
|
4864
|
+
}
|
|
4865
|
+
let I = F.slice(0, Math.min(Math.max(1, p), Vn)), L = (e) => {
|
|
4866
|
+
if (v) {
|
|
4867
|
+
e.preventDefault(), w(T), A(!0);
|
|
4868
|
+
return;
|
|
4869
|
+
}
|
|
4870
|
+
if (typeof window > "u" || !window.history?.pushState) return;
|
|
4871
|
+
e.preventDefault();
|
|
4872
|
+
let t = new URLSearchParams(window.location.search);
|
|
4873
|
+
T.trim() ? t.set("q", T.trim()) : t.delete("q"), t.delete("page");
|
|
4874
|
+
let n = t.toString();
|
|
4875
|
+
window.history.pushState({}, "", `${window.location.pathname}${n ? `?${n}` : ""}`), window.dispatchEvent(new Event("webim:urlchange")), A(!0);
|
|
4876
|
+
}, R = y && !N ? [{
|
|
4877
|
+
key: "sample-1",
|
|
4878
|
+
title: "About us",
|
|
4879
|
+
url: "/about",
|
|
4880
|
+
kind: "page"
|
|
4881
|
+
}, {
|
|
4882
|
+
key: "sample-2",
|
|
4883
|
+
title: "Spring collection",
|
|
4884
|
+
url: "/blog/spring",
|
|
4885
|
+
kind: "entry"
|
|
4886
|
+
}] : null, z = R ?? I, B = !R && N && D && !I.length, V = !M || k && (z.length > 0 || B), H = z.length > 0 && /* @__PURE__ */ d("ul", {
|
|
4887
|
+
style: {
|
|
4888
|
+
listStyle: "none",
|
|
4889
|
+
margin: 0,
|
|
4890
|
+
padding: 0,
|
|
4891
|
+
display: "flex",
|
|
4892
|
+
flexDirection: "column",
|
|
4893
|
+
gap: 2
|
|
4894
|
+
},
|
|
4895
|
+
children: z.map((e) => /* @__PURE__ */ d("li", { children: /* @__PURE__ */ f("a", {
|
|
4896
|
+
href: v ? void 0 : e.url,
|
|
4897
|
+
style: {
|
|
4898
|
+
display: "block",
|
|
4899
|
+
padding: "10px 12px",
|
|
4900
|
+
borderRadius: 6,
|
|
4901
|
+
color: "inherit",
|
|
4902
|
+
textDecoration: "none",
|
|
4903
|
+
border: M ? 0 : "1px solid var(--page-border, rgba(148, 163, 184, 0.35))"
|
|
4904
|
+
},
|
|
4905
|
+
children: [/* @__PURE__ */ d("span", {
|
|
4906
|
+
style: {
|
|
4907
|
+
display: "block",
|
|
4908
|
+
fontWeight: 600
|
|
4909
|
+
},
|
|
4910
|
+
children: e.title
|
|
4911
|
+
}), /* @__PURE__ */ d("span", {
|
|
4912
|
+
style: {
|
|
4913
|
+
display: "block",
|
|
4914
|
+
fontSize: 12,
|
|
4915
|
+
opacity: .6
|
|
4916
|
+
},
|
|
4917
|
+
children: e.url
|
|
4918
|
+
})]
|
|
4919
|
+
}) }, e.key))
|
|
4920
|
+
});
|
|
4921
|
+
return /* @__PURE__ */ d("div", {
|
|
4922
|
+
ref: _,
|
|
4923
|
+
style: {
|
|
4924
|
+
width: "100%",
|
|
4925
|
+
...P(g)
|
|
4926
|
+
},
|
|
4927
|
+
children: /* @__PURE__ */ f("div", {
|
|
4928
|
+
ref: j,
|
|
4929
|
+
style: { position: "relative" },
|
|
4930
|
+
children: [
|
|
4931
|
+
/* @__PURE__ */ f("form", {
|
|
4932
|
+
method: "get",
|
|
4933
|
+
onSubmit: L,
|
|
4934
|
+
style: {
|
|
4935
|
+
display: "flex",
|
|
4936
|
+
gap: 8,
|
|
4937
|
+
alignItems: "center"
|
|
4938
|
+
},
|
|
4939
|
+
children: [/* @__PURE__ */ d("input", {
|
|
4940
|
+
type: "search",
|
|
4941
|
+
name: "q",
|
|
4942
|
+
value: T,
|
|
4943
|
+
placeholder: e,
|
|
4944
|
+
onChange: (e) => E(e.target.value),
|
|
4945
|
+
onFocus: () => N && A(!0),
|
|
4946
|
+
style: {
|
|
4947
|
+
...Q,
|
|
4948
|
+
flexGrow: 1,
|
|
4949
|
+
minWidth: 0
|
|
4950
|
+
}
|
|
4951
|
+
}), n !== !1 && /* @__PURE__ */ d("button", {
|
|
4952
|
+
type: "submit",
|
|
4953
|
+
style: {
|
|
4954
|
+
padding: "10px 16px",
|
|
4955
|
+
border: 0,
|
|
4956
|
+
borderRadius: 6,
|
|
4957
|
+
cursor: "pointer",
|
|
4958
|
+
fontSize: 14,
|
|
4959
|
+
fontFamily: "inherit",
|
|
4960
|
+
background: "var(--page-accent, #4f46e5)",
|
|
4961
|
+
color: "var(--page-accent-text, #ffffff)"
|
|
4962
|
+
},
|
|
4963
|
+
children: t
|
|
4964
|
+
})]
|
|
4965
|
+
}),
|
|
4966
|
+
h && /* @__PURE__ */ d("div", {
|
|
4967
|
+
style: {
|
|
4968
|
+
fontSize: 13,
|
|
4969
|
+
opacity: .65,
|
|
4970
|
+
marginTop: 6
|
|
4971
|
+
},
|
|
4972
|
+
children: h
|
|
4973
|
+
}),
|
|
4974
|
+
V && /* @__PURE__ */ f("div", {
|
|
4975
|
+
style: M ? {
|
|
4976
|
+
position: "absolute",
|
|
4977
|
+
top: "100%",
|
|
4978
|
+
left: 0,
|
|
4979
|
+
right: 0,
|
|
4980
|
+
zIndex: 30,
|
|
4981
|
+
marginTop: 6,
|
|
4982
|
+
padding: 6,
|
|
4983
|
+
maxHeight: 320,
|
|
4984
|
+
overflowY: "auto",
|
|
4985
|
+
borderRadius: 8,
|
|
4986
|
+
border: "1px solid var(--page-border, rgba(148, 163, 184, 0.35))",
|
|
4987
|
+
background: "var(--page-surface, #f2f2f2)",
|
|
4988
|
+
boxShadow: "0 12px 32px rgba(15, 23, 42, 0.18)"
|
|
4989
|
+
} : { marginTop: 14 },
|
|
4990
|
+
children: [H, B && /* @__PURE__ */ d("div", {
|
|
4991
|
+
style: {
|
|
4992
|
+
fontSize: 14,
|
|
4993
|
+
opacity: .65,
|
|
4994
|
+
padding: M ? "10px 12px" : 0
|
|
4995
|
+
},
|
|
4996
|
+
children: m
|
|
4997
|
+
})]
|
|
4998
|
+
})
|
|
4999
|
+
]
|
|
5000
|
+
})
|
|
5001
|
+
});
|
|
5002
|
+
}
|
|
4074
5003
|
//#endregion
|
|
4075
5004
|
//#region ../ui/src/components/builder/apps/language/views.jsx
|
|
4076
|
-
function
|
|
5005
|
+
function Kn(e) {
|
|
4077
5006
|
let t = e?.locales, n = [typeof t?.default == "string" && t.default.trim() ? t.default.trim() : "", ...Array.isArray(t?.enabled) ? t.enabled : []].filter((e) => typeof e == "string" && e.trim());
|
|
4078
5007
|
return [...new Set(n.map((e) => e.trim()))];
|
|
4079
5008
|
}
|
|
4080
|
-
var
|
|
4081
|
-
function
|
|
5009
|
+
var qn = (e) => e && e.charAt(0).toUpperCase() + e.slice(1);
|
|
5010
|
+
function Jn(e, t) {
|
|
4082
5011
|
let n = String(e ?? "").toUpperCase();
|
|
4083
5012
|
if (t === "code") return n;
|
|
4084
5013
|
let r = "";
|
|
4085
5014
|
try {
|
|
4086
|
-
r =
|
|
5015
|
+
r = qn(new Intl.DisplayNames([e], { type: "language" }).of(e) ?? "");
|
|
4087
5016
|
} catch {}
|
|
4088
5017
|
return !r || r.toUpperCase() === n ? n : t === "both" ? `${n} — ${r}` : r;
|
|
4089
5018
|
}
|
|
4090
|
-
function
|
|
5019
|
+
function Yn(e, t) {
|
|
4091
5020
|
let n = t ? "" : `?locale=${encodeURIComponent(e)}`;
|
|
4092
5021
|
if (typeof window > "u") return n || "?";
|
|
4093
5022
|
try {
|
|
@@ -4097,12 +5026,12 @@ function yn(e, t) {
|
|
|
4097
5026
|
return n || "/";
|
|
4098
5027
|
}
|
|
4099
5028
|
}
|
|
4100
|
-
function
|
|
4101
|
-
let c = i(
|
|
5029
|
+
function Xn({ variant: e, display: t, separator: n, label: r, style: a, nodeRef: o, inert: s }) {
|
|
5030
|
+
let c = i(K), l = Kn(c?.settings), u = l[0] ?? "", p = l.includes(c?.locale) ? c.locale : u, m = {
|
|
4102
5031
|
display: "inline-flex",
|
|
4103
5032
|
alignItems: "center",
|
|
4104
5033
|
gap: 8,
|
|
4105
|
-
...
|
|
5034
|
+
...P(a)
|
|
4106
5035
|
};
|
|
4107
5036
|
if (l.length < 2) return s ? /* @__PURE__ */ d("div", {
|
|
4108
5037
|
ref: o,
|
|
@@ -4133,7 +5062,7 @@ function bn({ variant: e, display: t, separator: n, label: r, style: a, nodeRef:
|
|
|
4133
5062
|
style: { opacity: .4 },
|
|
4134
5063
|
children: n ?? "·"
|
|
4135
5064
|
}), /* @__PURE__ */ d("a", {
|
|
4136
|
-
href:
|
|
5065
|
+
href: Yn(e, e === u),
|
|
4137
5066
|
hrefLang: e,
|
|
4138
5067
|
"aria-current": e === p ? "true" : void 0,
|
|
4139
5068
|
onClick: s ? (e) => e.preventDefault() : void 0,
|
|
@@ -4143,7 +5072,7 @@ function bn({ variant: e, display: t, separator: n, label: r, style: a, nodeRef:
|
|
|
4143
5072
|
textDecoration: "none",
|
|
4144
5073
|
cursor: s ? "default" : "pointer"
|
|
4145
5074
|
},
|
|
4146
|
-
children:
|
|
5075
|
+
children: Jn(e, t)
|
|
4147
5076
|
})]
|
|
4148
5077
|
}, e))]
|
|
4149
5078
|
}) : /* @__PURE__ */ f("div", {
|
|
@@ -4154,7 +5083,7 @@ function bn({ variant: e, display: t, separator: n, label: r, style: a, nodeRef:
|
|
|
4154
5083
|
value: p,
|
|
4155
5084
|
onChange: s ? void 0 : (e) => {
|
|
4156
5085
|
let t = e.target.value;
|
|
4157
|
-
window.location.assign(
|
|
5086
|
+
window.location.assign(Yn(t, t === u));
|
|
4158
5087
|
},
|
|
4159
5088
|
onKeyDown: s ? (e) => e.preventDefault() : void 0,
|
|
4160
5089
|
style: {
|
|
@@ -4168,55 +5097,57 @@ function bn({ variant: e, display: t, separator: n, label: r, style: a, nodeRef:
|
|
|
4168
5097
|
},
|
|
4169
5098
|
children: l.map((e) => /* @__PURE__ */ d("option", {
|
|
4170
5099
|
value: e,
|
|
4171
|
-
children:
|
|
5100
|
+
children: Jn(e, t)
|
|
4172
5101
|
}, e))
|
|
4173
5102
|
})]
|
|
4174
5103
|
});
|
|
4175
5104
|
}
|
|
4176
5105
|
//#endregion
|
|
4177
5106
|
//#region ../ui/src/components/builder/apps/index.js
|
|
4178
|
-
var
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
5107
|
+
var Zn = [
|
|
5108
|
+
Tn,
|
|
5109
|
+
zn,
|
|
5110
|
+
Mn,
|
|
5111
|
+
Bn
|
|
5112
|
+
], Qn = {
|
|
5113
|
+
SiteLoginForm: An,
|
|
5114
|
+
SiteAccountMenu: jn,
|
|
5115
|
+
SiteLanguagePicker: Xn,
|
|
5116
|
+
CookieConsent: Rn,
|
|
5117
|
+
SiteSearch: Gn
|
|
4187
5118
|
};
|
|
4188
|
-
new Set(
|
|
5119
|
+
new Set(Zn.filter((e) => e.ssr === "shell").flatMap((e) => e.keys));
|
|
4189
5120
|
//#endregion
|
|
4190
5121
|
//#region ../ui/src/components/builder/plugins/runtime.js
|
|
4191
|
-
var
|
|
4192
|
-
function
|
|
4193
|
-
if (
|
|
5122
|
+
var $n = /* @__PURE__ */ new Map();
|
|
5123
|
+
function er(e) {
|
|
5124
|
+
if ($n.has(e)) return $n.get(e);
|
|
4194
5125
|
let t = URL.createObjectURL(new Blob([e], { type: "text/javascript" })), n = import(
|
|
4195
5126
|
/* @vite-ignore */
|
|
4196
5127
|
/* webpackIgnore: true */
|
|
4197
5128
|
t
|
|
4198
5129
|
).finally(() => URL.revokeObjectURL(t));
|
|
4199
|
-
return
|
|
5130
|
+
return $n.set(e, n), n;
|
|
4200
5131
|
}
|
|
4201
|
-
function
|
|
5132
|
+
function tr(e) {
|
|
4202
5133
|
let t = e && typeof e == "object" ? e.builder_plugins : null, n = t && typeof t == "object" ? t.plugins : null;
|
|
4203
5134
|
return n && typeof n == "object" ? n : {};
|
|
4204
5135
|
}
|
|
4205
5136
|
//#endregion
|
|
4206
5137
|
//#region ../ui/src/components/builder/plugins/view.jsx
|
|
4207
|
-
async function
|
|
4208
|
-
let n = await
|
|
5138
|
+
async function nr(e, t) {
|
|
5139
|
+
let n = await er(e);
|
|
4209
5140
|
return (Array.isArray(n?.default?.blocks) ? n.default.blocks : []).find((e) => e?.id === t && typeof e.mount == "function") ?? null;
|
|
4210
5141
|
}
|
|
4211
|
-
var
|
|
5142
|
+
var rr = {
|
|
4212
5143
|
padding: "10px 12px",
|
|
4213
5144
|
border: "1px dashed rgba(148, 163, 184, 0.5)",
|
|
4214
5145
|
borderRadius: 8,
|
|
4215
5146
|
fontSize: 12,
|
|
4216
5147
|
opacity: .6
|
|
4217
5148
|
};
|
|
4218
|
-
function
|
|
4219
|
-
let s = i(
|
|
5149
|
+
function ir({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
|
|
5150
|
+
let s = i(K), l = tr(s?.settings)[e], u = c(null), p = c(null), m = {
|
|
4220
5151
|
tenant: s?.tenant ?? "",
|
|
4221
5152
|
apiUrl: s?.apiUrl ?? "/api",
|
|
4222
5153
|
locale: s?.locale ?? "",
|
|
@@ -4228,7 +5159,7 @@ function On({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
|
|
|
4228
5159
|
let e = u.current;
|
|
4229
5160
|
if (!l?.code || !e) return;
|
|
4230
5161
|
let n = !0;
|
|
4231
|
-
return
|
|
5162
|
+
return nr(l.code, t).then((e) => {
|
|
4232
5163
|
if (!(!n || !e || !u.current)) {
|
|
4233
5164
|
p.current = e;
|
|
4234
5165
|
try {
|
|
@@ -4253,13 +5184,13 @@ function On({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
|
|
|
4253
5184
|
} catch {}
|
|
4254
5185
|
}, [g]), l ? /* @__PURE__ */ d("div", {
|
|
4255
5186
|
ref: o,
|
|
4256
|
-
style:
|
|
5187
|
+
style: P(r),
|
|
4257
5188
|
children: /* @__PURE__ */ d("div", { ref: u })
|
|
4258
5189
|
}) : /* @__PURE__ */ f("div", {
|
|
4259
5190
|
ref: o,
|
|
4260
5191
|
style: {
|
|
4261
|
-
...
|
|
4262
|
-
...
|
|
5192
|
+
...rr,
|
|
5193
|
+
...P(r)
|
|
4263
5194
|
},
|
|
4264
5195
|
children: [
|
|
4265
5196
|
"Plugin “",
|
|
@@ -4270,12 +5201,12 @@ function On({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
|
|
|
4270
5201
|
}
|
|
4271
5202
|
//#endregion
|
|
4272
5203
|
//#region ../ui/src/components/builder/render.jsx
|
|
4273
|
-
var
|
|
4274
|
-
|
|
4275
|
-
...
|
|
4276
|
-
PluginBlock:
|
|
5204
|
+
var ar = {
|
|
5205
|
+
...wn,
|
|
5206
|
+
...Qn,
|
|
5207
|
+
PluginBlock: ir
|
|
4277
5208
|
};
|
|
4278
|
-
function
|
|
5209
|
+
function or(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
|
|
4279
5210
|
let o = n[e];
|
|
4280
5211
|
if (!o || o.hidden) return null;
|
|
4281
5212
|
let s = o.type?.resolvedName, c = a?.mapProps ? a.mapProps(o.props ?? {}, s) : o.props ?? {};
|
|
@@ -4283,111 +5214,113 @@ function An(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
|
|
|
4283
5214
|
let n = o.props?.componentId, s = r?.[n];
|
|
4284
5215
|
if (!s?.template || i.has(n)) return null;
|
|
4285
5216
|
let c = new Set(i).add(n);
|
|
4286
|
-
return /* @__PURE__ */ d(t, { children:
|
|
5217
|
+
return /* @__PURE__ */ d(t, { children: or(s.template.rootId, s.template.nodes, r, c, a) }, e);
|
|
4287
5218
|
}
|
|
4288
|
-
let l =
|
|
5219
|
+
let l = ar[s];
|
|
4289
5220
|
if (!l) return null;
|
|
4290
|
-
let u = (o.nodes ?? []).map((e) =>
|
|
5221
|
+
let u = (o.nodes ?? []).map((e) => or(e, n, r, i, a)).filter(Boolean), f = Object.entries(o.linkedNodes ?? {}), p = f.length ? Object.fromEntries(f.map(([e, t]) => [e, or(t, n, r, i)])) : void 0, m = /* @__PURE__ */ d(l, {
|
|
4291
5222
|
...c,
|
|
4292
5223
|
...s === "CollectionList" ? { templateId: o.linkedNodes?.card } : null,
|
|
4293
5224
|
linked: p,
|
|
4294
5225
|
nodeRef: (t) => {
|
|
4295
|
-
t && (t.setAttribute("data-wb", e),
|
|
5226
|
+
t && (t.setAttribute("data-wb", e), te(t, c), ee(t, c.events));
|
|
4296
5227
|
},
|
|
4297
5228
|
children: u.length ? u : void 0
|
|
4298
5229
|
}, e);
|
|
4299
|
-
return c.when && c.when !== "always" ? /* @__PURE__ */ d(
|
|
5230
|
+
return c.when && c.when !== "always" ? /* @__PURE__ */ d(kn, {
|
|
4300
5231
|
when: c.when,
|
|
4301
5232
|
children: m
|
|
4302
5233
|
}, e) : m;
|
|
4303
5234
|
}
|
|
4304
5235
|
//#endregion
|
|
4305
5236
|
//#region ../ui/src/components/builder/PageRenderer.jsx
|
|
4306
|
-
var
|
|
4307
|
-
.webim-page[data-webim-mode="dark"] { ${Object.entries(
|
|
4308
|
-
function
|
|
4309
|
-
let
|
|
5237
|
+
var sr = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" "), cr = (e) => `.webim-page[data-webim-mode="light"] { ${Object.entries(he(e.light)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }
|
|
5238
|
+
.webim-page[data-webim-mode="dark"] { ${Object.entries(he(e.dark)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }`;
|
|
5239
|
+
function lr({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, custom: o, animations: c, tenant: l, apiUrl: u, datasets: p, locale: m, direction: g, settings: _, siteUser: v }) {
|
|
5240
|
+
let y = o?.js?.trim();
|
|
4310
5241
|
if (a(() => {
|
|
4311
|
-
if (!
|
|
5242
|
+
if (!y) return;
|
|
4312
5243
|
let e = document.createElement("script");
|
|
4313
|
-
return e.text =
|
|
4314
|
-
}, [
|
|
4315
|
-
let
|
|
4316
|
-
lang:
|
|
4317
|
-
dir: h(
|
|
4318
|
-
}, x = ".webim-page, .webim-page *, .webim-page *::before, .webim-page *::after { box-sizing: border-box; }",
|
|
5244
|
+
return e.text = y, document.body.appendChild(e), () => e.remove();
|
|
5245
|
+
}, [y]), !e?.ROOT) return null;
|
|
5246
|
+
let b = {
|
|
5247
|
+
lang: m || void 0,
|
|
5248
|
+
dir: h(g, m)
|
|
5249
|
+
}, x = ".webim-page, .webim-page *, .webim-page *::before, .webim-page *::after { box-sizing: border-box; }", C = {
|
|
4319
5250
|
minHeight: "100%",
|
|
4320
5251
|
display: "flex",
|
|
4321
5252
|
flexDirection: "column"
|
|
4322
|
-
}, w =
|
|
5253
|
+
}, w = or("ROOT", e, n), T = s(() => ({ render: (t, r) => or(t, e, n, void 0, { mapProps: r }) }), [e, n]), E = ce(e, n), O = se(e, n), k = o?.css?.trim(), j = S(c), M = me(t), N = [M.font, M.headingFont].filter((e) => typeof e == "string" && e.trim() && e !== "inherit" && !de[e]), P = [.../* @__PURE__ */ new Set([...A(e, n), ...N])].map((e) => /* @__PURE__ */ d("link", {
|
|
4323
5254
|
rel: "stylesheet",
|
|
4324
5255
|
precedence: "default",
|
|
4325
|
-
href:
|
|
4326
|
-
}, e)),
|
|
4327
|
-
return r === "auto" ? /* @__PURE__ */ d(
|
|
5256
|
+
href: D(e)
|
|
5257
|
+
}, e)), F = cr(M);
|
|
5258
|
+
return r === "auto" ? /* @__PURE__ */ d(K.Provider, {
|
|
4328
5259
|
value: {
|
|
4329
|
-
tenant:
|
|
4330
|
-
apiUrl:
|
|
4331
|
-
locale:
|
|
4332
|
-
settings:
|
|
5260
|
+
tenant: l || "",
|
|
5261
|
+
apiUrl: u || "/api",
|
|
5262
|
+
locale: m || "",
|
|
5263
|
+
settings: _ ?? null
|
|
4333
5264
|
},
|
|
4334
|
-
children: /* @__PURE__ */ d(
|
|
4335
|
-
initialUser:
|
|
4336
|
-
children: /* @__PURE__ */ d(
|
|
4337
|
-
value:
|
|
4338
|
-
children: /* @__PURE__ */ d(
|
|
5265
|
+
children: /* @__PURE__ */ d(On, {
|
|
5266
|
+
initialUser: v,
|
|
5267
|
+
children: /* @__PURE__ */ d(q.Provider, {
|
|
5268
|
+
value: p ?? null,
|
|
5269
|
+
children: /* @__PURE__ */ d(Ce.Provider, {
|
|
4339
5270
|
value: T,
|
|
4340
5271
|
children: /* @__PURE__ */ f("div", {
|
|
4341
|
-
...
|
|
5272
|
+
...b,
|
|
4342
5273
|
className: "webim-page",
|
|
4343
5274
|
style: {
|
|
4344
|
-
...
|
|
4345
|
-
...
|
|
5275
|
+
...C,
|
|
5276
|
+
...ge(t),
|
|
4346
5277
|
...i
|
|
4347
5278
|
},
|
|
4348
5279
|
children: [
|
|
4349
|
-
/* @__PURE__ */ d("style", { children: `.webim-page { ${
|
|
4350
|
-
@media (prefers-color-scheme: dark) { .webim-page { ${
|
|
4351
|
-
/* @__PURE__ */ d("style", { children:
|
|
4352
|
-
|
|
5280
|
+
/* @__PURE__ */ d("style", { children: `.webim-page { ${sr(he(M.light))} }
|
|
5281
|
+
@media (prefers-color-scheme: dark) { .webim-page { ${sr(he(M.dark))} } }` }),
|
|
5282
|
+
/* @__PURE__ */ d("style", { children: F }),
|
|
5283
|
+
P,
|
|
4353
5284
|
/* @__PURE__ */ d("style", { children: x }),
|
|
4354
5285
|
E && /* @__PURE__ */ d("style", { children: E }),
|
|
4355
|
-
D && /* @__PURE__ */ d("style", { children: D }),
|
|
4356
5286
|
O && /* @__PURE__ */ d("style", { children: O }),
|
|
5287
|
+
k && /* @__PURE__ */ d("style", { children: k }),
|
|
4357
5288
|
w
|
|
4358
5289
|
]
|
|
4359
5290
|
})
|
|
4360
5291
|
})
|
|
4361
5292
|
})
|
|
4362
5293
|
})
|
|
4363
|
-
}) : /* @__PURE__ */ d(
|
|
5294
|
+
}) : /* @__PURE__ */ d(K.Provider, {
|
|
4364
5295
|
value: {
|
|
4365
|
-
tenant:
|
|
4366
|
-
apiUrl:
|
|
4367
|
-
locale:
|
|
4368
|
-
settings:
|
|
5296
|
+
tenant: l || "",
|
|
5297
|
+
apiUrl: u || "/api",
|
|
5298
|
+
locale: m || "",
|
|
5299
|
+
settings: _ ?? null
|
|
4369
5300
|
},
|
|
4370
|
-
children: /* @__PURE__ */ d(
|
|
4371
|
-
initialUser:
|
|
4372
|
-
children: /* @__PURE__ */ d(
|
|
4373
|
-
value:
|
|
4374
|
-
children: /* @__PURE__ */ d(
|
|
5301
|
+
children: /* @__PURE__ */ d(On, {
|
|
5302
|
+
initialUser: v,
|
|
5303
|
+
children: /* @__PURE__ */ d(q.Provider, {
|
|
5304
|
+
value: p ?? null,
|
|
5305
|
+
children: /* @__PURE__ */ d(Ce.Provider, {
|
|
4375
5306
|
value: T,
|
|
4376
5307
|
children: /* @__PURE__ */ f("div", {
|
|
4377
|
-
...
|
|
5308
|
+
...b,
|
|
4378
5309
|
className: "webim-page",
|
|
4379
5310
|
style: {
|
|
4380
|
-
...
|
|
4381
|
-
...
|
|
5311
|
+
...C,
|
|
5312
|
+
..._e(t, r),
|
|
4382
5313
|
...i
|
|
4383
5314
|
},
|
|
4384
5315
|
children: [
|
|
4385
|
-
|
|
4386
|
-
/* @__PURE__ */ d("style", { children:
|
|
5316
|
+
P,
|
|
5317
|
+
/* @__PURE__ */ d("style", { children: F }),
|
|
4387
5318
|
/* @__PURE__ */ d("style", { children: x }),
|
|
4388
5319
|
E && /* @__PURE__ */ d("style", { children: E }),
|
|
4389
|
-
D && /* @__PURE__ */ d("style", { children: D }),
|
|
4390
5320
|
O && /* @__PURE__ */ d("style", { children: O }),
|
|
5321
|
+
j && /* @__PURE__ */ d("style", { children: j }),
|
|
5322
|
+
j && /* @__PURE__ */ d("style", { children: j }),
|
|
5323
|
+
k && /* @__PURE__ */ d("style", { children: k }),
|
|
4391
5324
|
w
|
|
4392
5325
|
]
|
|
4393
5326
|
})
|
|
@@ -4398,25 +5331,26 @@ function Nn({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
|
|
|
4398
5331
|
}
|
|
4399
5332
|
//#endregion
|
|
4400
5333
|
//#region src/WebimContent.jsx
|
|
4401
|
-
function
|
|
4402
|
-
return e?.blocks?.ROOT ? /* @__PURE__ */ d(
|
|
5334
|
+
function ur({ bundle: e, mode: t = "auto", style: n }) {
|
|
5335
|
+
return e?.blocks?.ROOT ? /* @__PURE__ */ d(lr, {
|
|
4403
5336
|
blocks: e.blocks,
|
|
4404
5337
|
theme: e.theme,
|
|
4405
5338
|
components: e.components,
|
|
4406
5339
|
custom: e.custom,
|
|
5340
|
+
animations: e.animations,
|
|
4407
5341
|
tenant: e.tenant,
|
|
4408
5342
|
apiUrl: e.apiUrl,
|
|
4409
5343
|
datasets: e.datasets,
|
|
4410
5344
|
locale: e.locale,
|
|
4411
5345
|
direction: e.direction,
|
|
4412
5346
|
settings: e.settings,
|
|
4413
|
-
mode:
|
|
5347
|
+
mode: ye(t, e.scheme),
|
|
4414
5348
|
style: n
|
|
4415
5349
|
}) : null;
|
|
4416
5350
|
}
|
|
4417
5351
|
//#endregion
|
|
4418
5352
|
//#region src/bundle.js
|
|
4419
|
-
function
|
|
5353
|
+
function dr({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
|
|
4420
5354
|
let a = {
|
|
4421
5355
|
...t?.global ?? {},
|
|
4422
5356
|
...t?.tenant ?? {}
|
|
@@ -4426,9 +5360,10 @@ function Fn({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
|
|
|
4426
5360
|
title: e.title,
|
|
4427
5361
|
slug: e.slug,
|
|
4428
5362
|
blocks: i && o.i18n?.[i]?.blocks || e.blocks,
|
|
4429
|
-
theme:
|
|
5363
|
+
theme: ve(o, a.builder_themes?.themes),
|
|
4430
5364
|
components: a.builder_components?.components ?? {},
|
|
4431
5365
|
custom: o.custom,
|
|
5366
|
+
animations: o.animations,
|
|
4432
5367
|
seo: o.seo,
|
|
4433
5368
|
direction: o.direction,
|
|
4434
5369
|
scheme: o.scheme,
|
|
@@ -4441,26 +5376,31 @@ function Fn({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
|
|
|
4441
5376
|
}
|
|
4442
5377
|
//#endregion
|
|
4443
5378
|
//#region src/fetchPage.js
|
|
4444
|
-
var
|
|
5379
|
+
var fr = async (e) => {
|
|
4445
5380
|
let t = await e.json().catch(() => null);
|
|
4446
5381
|
if (!e.ok || t?.success === !1) throw Error(t?.error?.message || `Request failed (${e.status})`);
|
|
4447
5382
|
return t?.payload ?? t;
|
|
4448
5383
|
};
|
|
4449
|
-
async function
|
|
5384
|
+
async function pr({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token: a, page: o, fetch: s }) {
|
|
4450
5385
|
if (!e) throw Error("fetchPage: apiUrl is required");
|
|
4451
5386
|
if (!n) throw Error("fetchPage: slug is required");
|
|
4452
5387
|
let c = s ?? fetch, l = e.replace(/\/$/, ""), u = {
|
|
4453
5388
|
...t ? { "x-tenant": t } : {},
|
|
4454
5389
|
...a ? { authorization: `Bearer ${a}` } : {}
|
|
4455
|
-
}, [d, f] = await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: u }).then(
|
|
5390
|
+
}, [d, f] = await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: u }).then(fr), c(`${l}/settings/public`, { headers: u }).then(fr)]), p = dr({
|
|
4456
5391
|
page: d,
|
|
4457
5392
|
settings: f,
|
|
4458
5393
|
tenant: t,
|
|
4459
5394
|
apiUrl: l,
|
|
4460
5395
|
locale: r
|
|
4461
|
-
}), m = [...new Set(Object.values(p.blocks ?? {}).map((e) => e?.type?.resolvedName === "CollectionList" ? e.props?.collection :
|
|
5396
|
+
}), m = [...new Set(Object.values(p.blocks ?? {}).map((e) => e?.type?.resolvedName === "CollectionList" ? e.props?.collection : [
|
|
5397
|
+
"TableBlock",
|
|
5398
|
+
"OrgChartBlock",
|
|
5399
|
+
"NavbarBlock",
|
|
5400
|
+
"CalendarBlock"
|
|
5401
|
+
].includes(e?.type?.resolvedName) ? e.props?.source : null).filter(Boolean))];
|
|
4462
5402
|
if (m.length) {
|
|
4463
|
-
let e = (e) => e.startsWith("api:") ? `${l}/data/${encodeURIComponent(e.slice(4))}` : `${l}/dynamic/${encodeURIComponent(e)}?all=1${r ? `&locale=${encodeURIComponent(r)}` : ""}`, t = await Promise.all(m.map((t) => c(e(t), { headers: u }).then(
|
|
5403
|
+
let e = (e) => e.startsWith("api:") ? `${l}/data/${encodeURIComponent(e.slice(4))}` : `${l}/dynamic/${encodeURIComponent(e)}?all=1${r ? `&locale=${encodeURIComponent(r)}` : ""}`, t = await Promise.all(m.map((t) => c(e(t), { headers: u }).then(fr).then((e) => {
|
|
4464
5404
|
let n = Array.isArray(e) ? e : Array.isArray(e?.data) ? e.data : [], r = Number(e?.total?.filtered ?? e?.total?.all ?? n.length);
|
|
4465
5405
|
return [[t, n], [`${t}:total`, Number.isFinite(r) ? r : n.length]];
|
|
4466
5406
|
}).catch(() => [[t, []]])));
|
|
@@ -4474,40 +5414,40 @@ async function Ln({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token:
|
|
|
4474
5414
|
}
|
|
4475
5415
|
//#endregion
|
|
4476
5416
|
//#region src/ssr.jsx
|
|
4477
|
-
var
|
|
5417
|
+
var mr = (e) => String(e ?? "").replace(/[&<>"]/g, (e) => ({
|
|
4478
5418
|
"&": "&",
|
|
4479
5419
|
"<": "<",
|
|
4480
5420
|
">": ">",
|
|
4481
5421
|
"\"": """
|
|
4482
5422
|
})[e]);
|
|
4483
|
-
function
|
|
4484
|
-
return e(/* @__PURE__ */ d(
|
|
5423
|
+
function hr(t, { mode: n = "auto", style: r } = {}) {
|
|
5424
|
+
return e(/* @__PURE__ */ d(ur, {
|
|
4485
5425
|
bundle: t,
|
|
4486
5426
|
mode: n,
|
|
4487
5427
|
style: r
|
|
4488
5428
|
}));
|
|
4489
5429
|
}
|
|
4490
|
-
function
|
|
5430
|
+
function gr(e, { mode: t = "auto", lang: n } = {}) {
|
|
4491
5431
|
let r = e.seo ?? {}, i = n || e.locale || "en", a = h(e.direction, i), o = r.title || e.title || e.slug || "Page", s = e.custom?.js?.trim(), c = [
|
|
4492
5432
|
"<meta charset=\"utf-8\"/>",
|
|
4493
5433
|
"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"/>",
|
|
4494
|
-
`<title>${
|
|
4495
|
-
r.description && `<meta name="description" content="${
|
|
4496
|
-
`<meta property="og:title" content="${
|
|
4497
|
-
r.image && `<meta property="og:image" content="${
|
|
5434
|
+
`<title>${mr(o)}</title>`,
|
|
5435
|
+
r.description && `<meta name="description" content="${mr(r.description)}"/>`,
|
|
5436
|
+
`<meta property="og:title" content="${mr(o)}"/>`,
|
|
5437
|
+
r.image && `<meta property="og:image" content="${mr(r.image)}"/>`,
|
|
4498
5438
|
r.noindex && "<meta name=\"robots\" content=\"noindex\"/>",
|
|
4499
5439
|
"<style>html,body{margin:0;height:100%}</style>"
|
|
4500
5440
|
].filter(Boolean).join("\n");
|
|
4501
5441
|
return `<!doctype html>
|
|
4502
|
-
<html lang="${
|
|
5442
|
+
<html lang="${mr(i)}"${a ? ` dir="${a}"` : ""}>
|
|
4503
5443
|
<head>
|
|
4504
5444
|
${c}
|
|
4505
5445
|
</head>
|
|
4506
5446
|
<body>
|
|
4507
|
-
${
|
|
5447
|
+
${hr(e, { mode: t })}
|
|
4508
5448
|
${s ? `<script>${s.replaceAll("<\/script", "<\\/script")}<\/script>` : ""}
|
|
4509
5449
|
</body>
|
|
4510
5450
|
</html>`;
|
|
4511
5451
|
}
|
|
4512
5452
|
//#endregion
|
|
4513
|
-
export {
|
|
5453
|
+
export { dr as assembleBundle, pr as fetchPage, hr as renderBundleHtml, gr as renderPageDocument };
|