webim-adapter 0.28.0 → 0.29.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 +474 -463
- package/build/webim-embed.js +11 -11
- package/build/webim-ssr.js +464 -453
- package/package.json +1 -1
package/build/webim-adapter.js
CHANGED
|
@@ -210,36 +210,36 @@ function C(e) {
|
|
|
210
210
|
color: j,
|
|
211
211
|
inset: M
|
|
212
212
|
})), N.length && (t.boxShadow = N.join(", "));
|
|
213
|
-
let P = (e) => e.type === "blur" ? `blur(${x(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:
|
|
213
|
+
let P = (e) => e.type === "blur" ? `blur(${x(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: I, filterBlur: L, filterGrayscale: R, filterBrightness: z, filterContrast: te, filterSaturate: ne } = t;
|
|
214
214
|
delete t.filters, delete t.backdropFilters, delete t.filterBlur, delete t.filterGrayscale, delete t.filterBrightness, delete t.filterContrast, delete t.filterSaturate;
|
|
215
|
+
let B = F(ee);
|
|
216
|
+
L !== void 0 && B.push(`blur(${x(L)})`), R !== void 0 && B.push(`grayscale(${R}%)`), z !== void 0 && B.push(`brightness(${z}%)`), te !== void 0 && B.push(`contrast(${te}%)`), ne !== void 0 && B.push(`saturate(${ne}%)`), B.length && (t.filter = B.join(" "));
|
|
215
217
|
let V = F(I);
|
|
216
|
-
|
|
217
|
-
let ne = F(L);
|
|
218
|
-
ne.length && (t.backdropFilter = ne.join(" "), t.WebkitBackdropFilter = t.backdropFilter);
|
|
218
|
+
V.length && (t.backdropFilter = V.join(" "), t.WebkitBackdropFilter = t.backdropFilter);
|
|
219
219
|
let { textStrokeWidth: re, textStrokeColor: ie } = t;
|
|
220
220
|
delete t.textStrokeWidth, delete t.textStrokeColor, (re !== void 0 || ie !== void 0) && (t.WebkitTextStroke = `${x(re ?? 1)} ${ie || "currentColor"}`);
|
|
221
221
|
let { clipText: ae } = t;
|
|
222
222
|
delete t.clipText, ae && (t.WebkitBackgroundClip = "text", t.backgroundClip = "text", t.WebkitTextFillColor = "transparent");
|
|
223
|
-
let { transitions: oe, transitionDuration:
|
|
223
|
+
let { transitions: oe, transitionDuration: se, transitionEasing: ce, transitionProperty: le } = t, ue = (e) => typeof e == "number" || !Number.isNaN(Number(e)) ? `${Number(e)}ms` : e;
|
|
224
224
|
delete t.transitions, delete t.transitionDuration, delete t.transitionEasing, delete t.transitionProperty;
|
|
225
|
-
let
|
|
226
|
-
if (
|
|
225
|
+
let de = (Array.isArray(oe) ? oe : []).filter((e) => e && e.on !== !1).map((e) => `${e.property || "all"} ${ue(e.duration ?? 200)} ${e.easing || "ease"}`);
|
|
226
|
+
if (se !== void 0 && de.push(`${le || "all"} ${ue(se)} ${ce || "ease"}`), de.length && (t.transition = de.join(", ")), t.textDecoration !== void 0 && (t.textDecorationLine = t.textDecoration, delete t.textDecoration), t.backgroundImage && !String(t.backgroundImage).includes("(") && (t.backgroundImage = `url("${t.backgroundImage}")`), n) {
|
|
227
227
|
let e = `${i || "rgba(0,0,0,0.5)"}, ${a || "transparent"}`, o = n === "radial" ? `radial-gradient(circle, ${e})` : `linear-gradient(${r ?? 180}deg, ${e})`;
|
|
228
228
|
t.backgroundImage = t.backgroundImage ? `${o}, ${t.backgroundImage}` : o;
|
|
229
229
|
}
|
|
230
230
|
delete t.backgroundVideo;
|
|
231
|
-
let { overlayColor:
|
|
232
|
-
if (delete t.overlayColor, delete t.overlayOpacity,
|
|
233
|
-
let e = `color-mix(in srgb, ${
|
|
231
|
+
let { overlayColor: fe, overlayOpacity: H } = t;
|
|
232
|
+
if (delete t.overlayColor, delete t.overlayOpacity, fe) {
|
|
233
|
+
let e = `color-mix(in srgb, ${fe} ${H ?? 50}%, transparent)`, n = `linear-gradient(${e}, ${e})`;
|
|
234
234
|
t.backgroundImage = t.backgroundImage ? `${n}, ${t.backgroundImage}` : n;
|
|
235
235
|
}
|
|
236
236
|
t.backgroundImage && (t.backgroundSize ??= "cover", t.backgroundPosition ??= "center", t.backgroundRepeat ??= "no-repeat");
|
|
237
|
-
let { backgroundLayers:
|
|
237
|
+
let { backgroundLayers: U } = t;
|
|
238
238
|
delete t.backgroundLayers;
|
|
239
|
-
let
|
|
240
|
-
if (
|
|
239
|
+
let W = (Array.isArray(U) ? U : []).filter((e) => e && e.on !== !1);
|
|
240
|
+
if (W.length) {
|
|
241
241
|
let e = [], n = [], r = [], i = [], a = [];
|
|
242
|
-
for (let t of
|
|
242
|
+
for (let t of W) 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");
|
|
243
243
|
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");
|
|
244
244
|
else {
|
|
245
245
|
if (!t.src) continue;
|
|
@@ -260,26 +260,30 @@ var w = {
|
|
|
260
260
|
"data-wb",
|
|
261
261
|
"data-wb-class",
|
|
262
262
|
"data-slot"
|
|
263
|
-
]), E = (e) => /^[a-zA-Z_][\w-]*$/.test(e) && !/^on/i.test(e) && !T.has(e.toLowerCase());
|
|
264
|
-
function
|
|
263
|
+
]), E = (e) => /^[a-zA-Z_][\w-]*$/.test(e) && !/^on/i.test(e) && !T.has(e.toLowerCase()), D = (e) => [...new Set(String(e ?? "").split(/\s+/).map((e) => e.replace(/^\./, "")).filter((e) => /^-?[_a-zA-Z][\w-]*$/.test(e)))];
|
|
264
|
+
function O(e, t, n = []) {
|
|
265
265
|
t.htmlId ? e.id = t.htmlId : e.removeAttribute("id");
|
|
266
|
+
let r = D(t.classNames), i = D(e.getAttribute("data-wb-class"));
|
|
267
|
+
for (let t of i) r.includes(t) || e.classList.remove(t);
|
|
268
|
+
for (let t of r) e.classList.add(t);
|
|
269
|
+
r.length ? e.setAttribute("data-wb-class", r.join(" ")) : e.removeAttribute("data-wb-class");
|
|
266
270
|
for (let t of n) e.removeAttribute(t);
|
|
267
|
-
let
|
|
271
|
+
let a = [];
|
|
268
272
|
for (let n of t.attributes ?? []) {
|
|
269
273
|
let t = String(n?.name ?? "").trim();
|
|
270
|
-
E(t) && (e.setAttribute(t, n.value ?? ""),
|
|
274
|
+
E(t) && (e.setAttribute(t, n.value ?? ""), a.push(t));
|
|
271
275
|
}
|
|
272
|
-
return
|
|
276
|
+
return a;
|
|
273
277
|
}
|
|
274
|
-
var
|
|
275
|
-
function
|
|
276
|
-
let i = Object.entries(C(t)).map(([e, t]) => `${
|
|
278
|
+
var k = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
|
|
279
|
+
function A(e, t, n, r = !1) {
|
|
280
|
+
let i = Object.entries(C(t)).map(([e, t]) => `${k(e)}: ${t} !important;`).join(" ");
|
|
277
281
|
return i ? `[data-wb="${e}"]${r ? "" : n} { ${i} }` : "";
|
|
278
282
|
}
|
|
279
|
-
function
|
|
280
|
-
return Object.entries(w).map(([r, i]) =>
|
|
283
|
+
function j(e, t, n) {
|
|
284
|
+
return Object.entries(w).map(([r, i]) => A(e, t?.[r], i, n === r)).filter(Boolean).join("\n");
|
|
281
285
|
}
|
|
282
|
-
var
|
|
286
|
+
var M = [
|
|
283
287
|
{
|
|
284
288
|
key: "tablet",
|
|
285
289
|
max: 991
|
|
@@ -292,17 +296,17 @@ var j = [
|
|
|
292
296
|
key: "mobile",
|
|
293
297
|
max: 478
|
|
294
298
|
}
|
|
295
|
-
],
|
|
296
|
-
function
|
|
297
|
-
return
|
|
298
|
-
let i = t?.[n] ?
|
|
299
|
+
], N = (e) => Object.entries(C(e)).map(([e, t]) => `${k(e)}: ${t} !important;`).join(" ");
|
|
300
|
+
function P(e, t) {
|
|
301
|
+
return M.map(({ key: n, max: r }) => {
|
|
302
|
+
let i = t?.[n] ? N(t[n]) : "";
|
|
299
303
|
return i ? `@media (max-width: ${r}px) { [data-wb="${e}"] { ${i} } }` : "";
|
|
300
304
|
}).filter(Boolean).join("\n");
|
|
301
305
|
}
|
|
302
|
-
function
|
|
306
|
+
function F(e, t) {
|
|
303
307
|
let n = [], r = (e) => {
|
|
304
308
|
for (let [t, r] of Object.entries(e || {})) {
|
|
305
|
-
let e =
|
|
309
|
+
let e = P(t, r.props);
|
|
306
310
|
e && n.push(e);
|
|
307
311
|
}
|
|
308
312
|
};
|
|
@@ -310,10 +314,10 @@ function P(e, t) {
|
|
|
310
314
|
for (let e of Object.values(t || {})) r(e.template?.nodes);
|
|
311
315
|
return n.join("\n");
|
|
312
316
|
}
|
|
313
|
-
function
|
|
317
|
+
function ee(e, t) {
|
|
314
318
|
let n = [], r = (e) => {
|
|
315
319
|
for (let [t, r] of Object.entries(e || {})) {
|
|
316
|
-
let e =
|
|
320
|
+
let e = j(t, r.props);
|
|
317
321
|
e && n.push(e);
|
|
318
322
|
}
|
|
319
323
|
};
|
|
@@ -388,7 +392,7 @@ var I = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Ari
|
|
|
388
392
|
label: "Mono",
|
|
389
393
|
value: "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"
|
|
390
394
|
}
|
|
391
|
-
},
|
|
395
|
+
}, te = (e, t) => z[e]?.value ?? v(e) ?? (typeof e == "string" && e.trim() ? `"${e.trim()}", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif` : t), ne = (e, ...t) => {
|
|
392
396
|
let n = Object.assign({}, e, ...t);
|
|
393
397
|
return n.primary = {
|
|
394
398
|
...e.primary,
|
|
@@ -409,8 +413,8 @@ function B(e) {
|
|
|
409
413
|
return {
|
|
410
414
|
font: r ?? R.font,
|
|
411
415
|
headingFont: i ?? R.headingFont,
|
|
412
|
-
light:
|
|
413
|
-
dark:
|
|
416
|
+
light: ne(L.light, a, t),
|
|
417
|
+
dark: ne(L.dark, n)
|
|
414
418
|
};
|
|
415
419
|
}
|
|
416
420
|
function V(e) {
|
|
@@ -431,31 +435,31 @@ function V(e) {
|
|
|
431
435
|
"--page-secondary-contrast": e.secondary.contrastText
|
|
432
436
|
};
|
|
433
437
|
}
|
|
434
|
-
function
|
|
438
|
+
function re(e) {
|
|
435
439
|
let t = B(e);
|
|
436
440
|
return {
|
|
437
441
|
backgroundColor: "var(--page-bg)",
|
|
438
442
|
color: "var(--page-text)",
|
|
439
|
-
fontFamily:
|
|
440
|
-
"--page-heading-font": t.headingFont === "inherit" ? "inherit" :
|
|
443
|
+
fontFamily: te(t.font, I),
|
|
444
|
+
"--page-heading-font": t.headingFont === "inherit" ? "inherit" : te(t.headingFont, "inherit")
|
|
441
445
|
};
|
|
442
446
|
}
|
|
443
|
-
function
|
|
447
|
+
function ie(e, t = "light") {
|
|
444
448
|
let n = B(e);
|
|
445
449
|
return {
|
|
446
|
-
...
|
|
450
|
+
...re(e),
|
|
447
451
|
...V(n[t] ?? n.light)
|
|
448
452
|
};
|
|
449
453
|
}
|
|
450
|
-
function
|
|
454
|
+
function ae(e, t) {
|
|
451
455
|
return e?.themeRef && t?.[e.themeRef] || e?.theme;
|
|
452
456
|
}
|
|
453
|
-
function
|
|
457
|
+
function oe(e, t) {
|
|
454
458
|
return e === "light" || e === "dark" ? e : t === "light" || t === "dark" ? t : "auto";
|
|
455
459
|
}
|
|
456
460
|
//#endregion
|
|
457
461
|
//#region src/bundle.js
|
|
458
|
-
function
|
|
462
|
+
function se({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
|
|
459
463
|
let a = {
|
|
460
464
|
...t?.global ?? {},
|
|
461
465
|
...t?.tenant ?? {}
|
|
@@ -465,7 +469,7 @@ function oe({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
|
|
|
465
469
|
title: e.title,
|
|
466
470
|
slug: e.slug,
|
|
467
471
|
blocks: i && o.i18n?.[i]?.blocks || e.blocks,
|
|
468
|
-
theme:
|
|
472
|
+
theme: ae(o, a.builder_themes?.themes),
|
|
469
473
|
components: a.builder_components?.components ?? {},
|
|
470
474
|
custom: o.custom,
|
|
471
475
|
seo: o.seo,
|
|
@@ -480,18 +484,18 @@ function oe({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
|
|
|
480
484
|
}
|
|
481
485
|
//#endregion
|
|
482
486
|
//#region src/fetchPage.js
|
|
483
|
-
var
|
|
487
|
+
var ce = async (e) => {
|
|
484
488
|
let t = await e.json().catch(() => null);
|
|
485
489
|
if (!e.ok || t?.success === !1) throw Error(t?.error?.message || `Request failed (${e.status})`);
|
|
486
490
|
return t?.payload ?? t;
|
|
487
491
|
};
|
|
488
|
-
async function
|
|
492
|
+
async function le({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token: a, page: o, fetch: s }) {
|
|
489
493
|
if (!e) throw Error("fetchPage: apiUrl is required");
|
|
490
494
|
if (!n) throw Error("fetchPage: slug is required");
|
|
491
495
|
let c = s ?? fetch, l = e.replace(/\/$/, ""), u = {
|
|
492
496
|
...t ? { "x-tenant": t } : {},
|
|
493
497
|
...a ? { authorization: `Bearer ${a}` } : {}
|
|
494
|
-
}, [d, f] = await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: u }).then(
|
|
498
|
+
}, [d, f] = await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: u }).then(ce), c(`${l}/settings/public`, { headers: u }).then(ce)]), p = se({
|
|
495
499
|
page: d,
|
|
496
500
|
settings: f,
|
|
497
501
|
tenant: t,
|
|
@@ -499,7 +503,7 @@ async function se({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token:
|
|
|
499
503
|
locale: r
|
|
500
504
|
}), m = [...new Set(Object.values(p.blocks ?? {}).map((e) => e?.type?.resolvedName === "CollectionList" ? e.props?.collection : e?.type?.resolvedName === "TableBlock" || e?.type?.resolvedName === "OrgChartBlock" ? e.props?.source : null).filter(Boolean))];
|
|
501
505
|
if (m.length) {
|
|
502
|
-
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(
|
|
506
|
+
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(ce).then((e) => {
|
|
503
507
|
let n = Array.isArray(e) ? e : Array.isArray(e?.data) ? e.data : [], r = Number(e?.total?.filtered ?? e?.total?.all ?? n.length);
|
|
504
508
|
return [[t, n], [`${t}:total`, Number.isFinite(r) ? r : n.length]];
|
|
505
509
|
}).catch(() => [[t, []]])));
|
|
@@ -513,7 +517,7 @@ async function se({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token:
|
|
|
513
517
|
}
|
|
514
518
|
//#endregion
|
|
515
519
|
//#region ../ui/src/components/builder/locale.js
|
|
516
|
-
var
|
|
520
|
+
var ue = /* @__PURE__ */ new Set([
|
|
517
521
|
"ar",
|
|
518
522
|
"he",
|
|
519
523
|
"fa",
|
|
@@ -524,34 +528,34 @@ var ce = /* @__PURE__ */ new Set([
|
|
|
524
528
|
"yi",
|
|
525
529
|
"dv",
|
|
526
530
|
"ckb"
|
|
527
|
-
]),
|
|
531
|
+
]), de = (e) => ue.has(String(e || "").toLowerCase().split(/[-_]/)[0]) ? "rtl" : "ltr", fe = (e, t) => e === "ltr" || e === "rtl" ? e : t ? de(t) : void 0, H = t({
|
|
528
532
|
tenant: "",
|
|
529
533
|
apiUrl: "/api",
|
|
530
534
|
locale: "",
|
|
531
535
|
settings: null
|
|
532
|
-
}),
|
|
536
|
+
}), U = t(null), W = (e) => {
|
|
533
537
|
let t = Number(e?.__page);
|
|
534
538
|
if (Number.isFinite(t) && t >= 1) return Math.floor(t);
|
|
535
539
|
if (typeof window > "u") return 1;
|
|
536
540
|
let n = Number(new URLSearchParams(window.location.search).get("page"));
|
|
537
541
|
return Number.isFinite(n) && n >= 1 ? Math.floor(n) : 1;
|
|
538
|
-
},
|
|
542
|
+
}, pe = () => {
|
|
539
543
|
if (typeof window > "u") return {};
|
|
540
544
|
let e = {};
|
|
541
545
|
return new URLSearchParams(window.location.search).forEach((t, n) => {
|
|
542
546
|
n.startsWith("f_") && n.length > 2 && t !== "" && (e[n.slice(2)] = t);
|
|
543
547
|
}), e;
|
|
544
|
-
},
|
|
548
|
+
}, me = (e) => {
|
|
545
549
|
let t = {
|
|
546
550
|
...e && typeof e == "object" && !Array.isArray(e) ? e : {},
|
|
547
|
-
...
|
|
551
|
+
...pe()
|
|
548
552
|
};
|
|
549
553
|
return Object.fromEntries(Object.entries(t).filter(([, e]) => typeof e == "string" && e.trim() !== ""));
|
|
550
|
-
},
|
|
551
|
-
function
|
|
554
|
+
}, he = t(null), ge = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
555
|
+
function G(e, t) {
|
|
552
556
|
if (t) return t.includes(".") ? t.split(".").reduce((e, t) => e && typeof e == "object" ? e[t] : void 0, e) : e?.[t];
|
|
553
557
|
}
|
|
554
|
-
var
|
|
558
|
+
var _e = (e) => {
|
|
555
559
|
let t = [];
|
|
556
560
|
for (let [n, r] of Object.entries(e ?? {})) {
|
|
557
561
|
if (!/^[\w-]+$/.test(n)) continue;
|
|
@@ -561,36 +565,36 @@ var he = (e) => {
|
|
|
561
565
|
}
|
|
562
566
|
return t;
|
|
563
567
|
};
|
|
564
|
-
function
|
|
568
|
+
function K(e) {
|
|
565
569
|
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(" ") : "";
|
|
566
570
|
}
|
|
567
|
-
function
|
|
568
|
-
let n = t?.data ?? {}, r =
|
|
571
|
+
function ve(e, t) {
|
|
572
|
+
let n = t?.data ?? {}, r = _e(n);
|
|
569
573
|
if (!r.length) return e;
|
|
570
|
-
let i = RegExp(`:(${r.map(
|
|
574
|
+
let i = RegExp(`:(${r.map(ge).sort((e, t) => t.length - e.length).join("|")})`, "g"), a = (e) => typeof e == "string" ? e.replace(i, (e, t) => K(G(n, t))) : Array.isArray(e) ? e.map(a) : e && typeof e == "object" ? Object.fromEntries(Object.entries(e).map(([e, t]) => [e, a(t)])) : e;
|
|
571
575
|
return a(e);
|
|
572
576
|
}
|
|
573
|
-
var
|
|
577
|
+
var ye = {
|
|
574
578
|
margin: 0,
|
|
575
579
|
fontWeight: 700,
|
|
576
580
|
lineHeight: 1.2,
|
|
577
581
|
fontFamily: "var(--page-heading-font, inherit)"
|
|
578
|
-
},
|
|
582
|
+
}, be = { margin: 0 }, q = {
|
|
579
583
|
display: "inline-block",
|
|
580
584
|
textDecoration: "none",
|
|
581
585
|
cursor: "pointer",
|
|
582
586
|
backgroundColor: "var(--page-accent, #111827)",
|
|
583
587
|
color: "var(--page-accent-text, #ffffff)"
|
|
584
|
-
},
|
|
588
|
+
}, xe = {
|
|
585
589
|
flexGrow: 1,
|
|
586
590
|
display: "flex",
|
|
587
591
|
flexDirection: "column",
|
|
588
592
|
position: "relative"
|
|
589
|
-
},
|
|
593
|
+
}, Se = {
|
|
590
594
|
display: "flex",
|
|
591
595
|
flexDirection: "column"
|
|
592
596
|
};
|
|
593
|
-
function
|
|
597
|
+
function Ce({ style: e }) {
|
|
594
598
|
let t = e?.backgroundVideo;
|
|
595
599
|
if (!t) return null;
|
|
596
600
|
let n = {
|
|
@@ -616,7 +620,7 @@ function xe({ style: e }) {
|
|
|
616
620
|
background: r
|
|
617
621
|
} })] });
|
|
618
622
|
}
|
|
619
|
-
var
|
|
623
|
+
var we = (e, t) => e?.backgroundVideo ? {
|
|
620
624
|
position: "relative",
|
|
621
625
|
...t,
|
|
622
626
|
...C(e)
|
|
@@ -624,24 +628,24 @@ var Se = (e, t) => e?.backgroundVideo ? {
|
|
|
624
628
|
...t,
|
|
625
629
|
...C(e)
|
|
626
630
|
};
|
|
627
|
-
function
|
|
631
|
+
function Te({ style: e, nodeRef: t, children: n }) {
|
|
628
632
|
return /* @__PURE__ */ d("div", {
|
|
629
633
|
ref: t,
|
|
630
634
|
style: {
|
|
631
|
-
...
|
|
635
|
+
...xe,
|
|
632
636
|
...C(e)
|
|
633
637
|
},
|
|
634
|
-
children: [/* @__PURE__ */ u(
|
|
638
|
+
children: [/* @__PURE__ */ u(Ce, { style: e }), n]
|
|
635
639
|
});
|
|
636
640
|
}
|
|
637
|
-
function
|
|
641
|
+
function Ee({ style: e, nodeRef: t, children: n }) {
|
|
638
642
|
return /* @__PURE__ */ d("section", {
|
|
639
643
|
ref: t,
|
|
640
|
-
style:
|
|
641
|
-
children: [/* @__PURE__ */ u(
|
|
644
|
+
style: we(e, Se),
|
|
645
|
+
children: [/* @__PURE__ */ u(Ce, { style: e }), n]
|
|
642
646
|
});
|
|
643
647
|
}
|
|
644
|
-
function
|
|
648
|
+
function De({ style: e, freeLayout: t, nodeRef: n, children: r }) {
|
|
645
649
|
let i = t ? {
|
|
646
650
|
position: "relative",
|
|
647
651
|
minHeight: 240
|
|
@@ -650,32 +654,32 @@ function Te({ style: e, freeLayout: t, nodeRef: n, children: r }) {
|
|
|
650
654
|
ref: n,
|
|
651
655
|
style: i ? {
|
|
652
656
|
...i,
|
|
653
|
-
...
|
|
654
|
-
} :
|
|
655
|
-
children: [/* @__PURE__ */ u(
|
|
657
|
+
...we(e)
|
|
658
|
+
} : we(e),
|
|
659
|
+
children: [/* @__PURE__ */ u(Ce, { style: e }), r]
|
|
656
660
|
});
|
|
657
661
|
}
|
|
658
|
-
function
|
|
662
|
+
function Oe({ text: e, parts: t, tag: n = "h2", style: r, linked: i, nodeRef: a }) {
|
|
659
663
|
return /* @__PURE__ */ u(n, {
|
|
660
664
|
ref: a,
|
|
661
665
|
style: {
|
|
662
|
-
...
|
|
666
|
+
...ye,
|
|
663
667
|
...C(r)
|
|
664
668
|
},
|
|
665
|
-
children:
|
|
669
|
+
children: J(t, e, i)
|
|
666
670
|
});
|
|
667
671
|
}
|
|
668
|
-
var
|
|
672
|
+
var ke = {
|
|
669
673
|
fontFamily: z.mono.value,
|
|
670
674
|
background: "rgba(148, 163, 184, 0.18)",
|
|
671
675
|
padding: "1px 5px",
|
|
672
676
|
borderRadius: 4,
|
|
673
677
|
fontSize: "0.9em"
|
|
674
678
|
};
|
|
675
|
-
function
|
|
679
|
+
function Ae(e, t = [], n, r) {
|
|
676
680
|
let i = e;
|
|
677
681
|
return t.includes("sup") ? i = /* @__PURE__ */ u("sup", { children: i }) : t.includes("sub") && (i = /* @__PURE__ */ u("sub", { children: i })), t.includes("code") && (i = /* @__PURE__ */ u("code", {
|
|
678
|
-
style:
|
|
682
|
+
style: ke,
|
|
679
683
|
children: i
|
|
680
684
|
})), t.includes("strike") && (i = /* @__PURE__ */ u("s", { children: i })), t.includes("underline") && (i = /* @__PURE__ */ u("u", { children: i })), t.includes("italic") && (i = /* @__PURE__ */ u("em", { children: i })), t.includes("bold") && (i = /* @__PURE__ */ u("strong", { children: i })), n && (i = /* @__PURE__ */ u("a", {
|
|
681
685
|
href: n,
|
|
@@ -685,13 +689,13 @@ function Oe(e, t = [], n, r) {
|
|
|
685
689
|
children: i
|
|
686
690
|
})), i;
|
|
687
691
|
}
|
|
688
|
-
function
|
|
692
|
+
function J(t, n, r) {
|
|
689
693
|
return t?.length ? t.map((t, n) => {
|
|
690
694
|
if (t.slot) return /* @__PURE__ */ u(e, { children: r?.[t.slot] ?? null }, n);
|
|
691
|
-
if (t.parts) return /* @__PURE__ */ u(e, { children:
|
|
695
|
+
if (t.parts) return /* @__PURE__ */ u(e, { children: J(t.parts, "", r) }, n);
|
|
692
696
|
let i = t.text;
|
|
693
697
|
return t.sup ? i = /* @__PURE__ */ u("sup", { children: i }) : t.sub && (i = /* @__PURE__ */ u("sub", { children: i })), t.code && (i = /* @__PURE__ */ u("code", {
|
|
694
|
-
style:
|
|
698
|
+
style: ke,
|
|
695
699
|
children: i
|
|
696
700
|
})), t.strike && (i = /* @__PURE__ */ u("s", { children: i })), t.underline && (i = /* @__PURE__ */ u("u", { children: i })), t.italic && (i = /* @__PURE__ */ u("em", { children: i })), t.bold && (i = /* @__PURE__ */ u("strong", { children: i })), (t.color || t.background) && (i = /* @__PURE__ */ u("span", {
|
|
697
701
|
style: {
|
|
@@ -708,13 +712,13 @@ function Y(t, n, r) {
|
|
|
708
712
|
})), /* @__PURE__ */ u(e, { children: i }, n);
|
|
709
713
|
}) : n;
|
|
710
714
|
}
|
|
711
|
-
function
|
|
715
|
+
function je({ parts: e, text: t, marks: n, href: r, target: i, style: a }) {
|
|
712
716
|
return /* @__PURE__ */ u("span", {
|
|
713
717
|
style: C(a),
|
|
714
|
-
children: e?.length ?
|
|
718
|
+
children: e?.length ? J(e, t) : Ae(t, n, r, i)
|
|
715
719
|
});
|
|
716
720
|
}
|
|
717
|
-
var
|
|
721
|
+
var Me = {
|
|
718
722
|
h1: 40,
|
|
719
723
|
h2: 32,
|
|
720
724
|
h3: 26,
|
|
@@ -722,7 +726,7 @@ var Ae = {
|
|
|
722
726
|
h5: 19,
|
|
723
727
|
h6: 16
|
|
724
728
|
};
|
|
725
|
-
function
|
|
729
|
+
function Ne({ align: e = "center", width: t, wrap: n } = {}) {
|
|
726
730
|
let r = t ? `${t}%` : void 0;
|
|
727
731
|
if (e === "full") return { width: "100%" };
|
|
728
732
|
let i = e === "left" || e === "right";
|
|
@@ -756,8 +760,8 @@ function je({ align: e = "center", width: t, wrap: n } = {}) {
|
|
|
756
760
|
marginRight: "auto"
|
|
757
761
|
};
|
|
758
762
|
}
|
|
759
|
-
function
|
|
760
|
-
let r = n ?? ((e, n) =>
|
|
763
|
+
function Pe(e = [], t, n) {
|
|
764
|
+
let r = n ?? ((e, n) => J(e, n, t));
|
|
761
765
|
return e.map((t, n) => {
|
|
762
766
|
let i = {
|
|
763
767
|
marginTop: 0,
|
|
@@ -779,7 +783,7 @@ function Me(e = [], t, n) {
|
|
|
779
783
|
marginLeft: 0,
|
|
780
784
|
marginRight: 0,
|
|
781
785
|
...i,
|
|
782
|
-
...
|
|
786
|
+
...Ne(t)
|
|
783
787
|
},
|
|
784
788
|
children: [t.href ? /* @__PURE__ */ u("a", {
|
|
785
789
|
href: t.href,
|
|
@@ -798,16 +802,16 @@ function Me(e = [], t, n) {
|
|
|
798
802
|
})]
|
|
799
803
|
}, n);
|
|
800
804
|
}
|
|
801
|
-
if (t.type === "video") return
|
|
805
|
+
if (t.type === "video") return Ge(t.url) ? /* @__PURE__ */ u("div", {
|
|
802
806
|
style: {
|
|
803
807
|
...i,
|
|
804
|
-
...
|
|
808
|
+
...Ne({
|
|
805
809
|
align: t.align,
|
|
806
810
|
wrap: t.wrap,
|
|
807
811
|
width: t.width ?? 100
|
|
808
812
|
})
|
|
809
813
|
},
|
|
810
|
-
children: /* @__PURE__ */ u(
|
|
814
|
+
children: /* @__PURE__ */ u(Ke, {
|
|
811
815
|
url: t.url,
|
|
812
816
|
autoplay: t.autoplay,
|
|
813
817
|
muted: t.muted,
|
|
@@ -869,17 +873,17 @@ function Me(e = [], t, n) {
|
|
|
869
873
|
}
|
|
870
874
|
if (t.type === "quote") return /* @__PURE__ */ u("blockquote", {
|
|
871
875
|
style: {
|
|
872
|
-
...
|
|
876
|
+
...Ie,
|
|
873
877
|
...i
|
|
874
878
|
},
|
|
875
879
|
children: r(t.parts, t.text)
|
|
876
880
|
}, n);
|
|
877
|
-
if (
|
|
881
|
+
if (Me[t.type]) {
|
|
878
882
|
let e = t.type;
|
|
879
883
|
return /* @__PURE__ */ u(e, {
|
|
880
884
|
style: {
|
|
881
|
-
...
|
|
882
|
-
fontSize:
|
|
885
|
+
...ye,
|
|
886
|
+
fontSize: Me[t.type],
|
|
883
887
|
...i
|
|
884
888
|
},
|
|
885
889
|
children: r(t.parts, t.text)
|
|
@@ -887,39 +891,39 @@ function Me(e = [], t, n) {
|
|
|
887
891
|
}
|
|
888
892
|
return /* @__PURE__ */ u("p", {
|
|
889
893
|
style: {
|
|
890
|
-
...
|
|
894
|
+
...be,
|
|
891
895
|
...i
|
|
892
896
|
},
|
|
893
897
|
children: r(t.parts, t.text)
|
|
894
898
|
}, n);
|
|
895
899
|
});
|
|
896
900
|
}
|
|
897
|
-
function
|
|
901
|
+
function Fe({ content: e, style: t, linked: n, nodeRef: r }) {
|
|
898
902
|
return /* @__PURE__ */ u("div", {
|
|
899
903
|
ref: r,
|
|
900
904
|
style: {
|
|
901
905
|
display: "flow-root",
|
|
902
906
|
...C(t)
|
|
903
907
|
},
|
|
904
|
-
children:
|
|
908
|
+
children: Pe(e, n)
|
|
905
909
|
});
|
|
906
910
|
}
|
|
907
|
-
var
|
|
911
|
+
var Ie = {
|
|
908
912
|
margin: 0,
|
|
909
913
|
padding: "8px 0 8px 20px",
|
|
910
914
|
borderLeft: "4px solid var(--page-accent, rgba(148, 163, 184, 0.6))"
|
|
911
915
|
};
|
|
912
|
-
function
|
|
916
|
+
function Le({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
|
|
913
917
|
return /* @__PURE__ */ u("blockquote", {
|
|
914
918
|
ref: i,
|
|
915
919
|
style: {
|
|
916
|
-
...
|
|
920
|
+
...Ie,
|
|
917
921
|
...C(n)
|
|
918
922
|
},
|
|
919
|
-
children:
|
|
923
|
+
children: J(t, e, r)
|
|
920
924
|
});
|
|
921
925
|
}
|
|
922
|
-
function
|
|
926
|
+
function Re({ ordered: e, items: t = [], style: n, nodeRef: r }) {
|
|
923
927
|
return /* @__PURE__ */ u(e ? "ol" : "ul", {
|
|
924
928
|
ref: r,
|
|
925
929
|
style: {
|
|
@@ -929,53 +933,53 @@ function Ie({ ordered: e, items: t = [], style: n, nodeRef: r }) {
|
|
|
929
933
|
},
|
|
930
934
|
children: t.map((e, t) => /* @__PURE__ */ u("li", {
|
|
931
935
|
style: { marginBottom: 4 },
|
|
932
|
-
children:
|
|
936
|
+
children: J(e.parts, e.text)
|
|
933
937
|
}, t))
|
|
934
938
|
});
|
|
935
939
|
}
|
|
936
|
-
function
|
|
940
|
+
function ze({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
|
|
937
941
|
return /* @__PURE__ */ u("p", {
|
|
938
942
|
ref: i,
|
|
939
943
|
style: {
|
|
940
|
-
...
|
|
944
|
+
...be,
|
|
941
945
|
...C(n)
|
|
942
946
|
},
|
|
943
|
-
children:
|
|
947
|
+
children: J(t, e, r)
|
|
944
948
|
});
|
|
945
949
|
}
|
|
946
|
-
var
|
|
950
|
+
var Be = {
|
|
947
951
|
color: "var(--page-accent, inherit)",
|
|
948
952
|
textDecoration: "underline",
|
|
949
953
|
textUnderlineOffset: 3,
|
|
950
954
|
cursor: "pointer"
|
|
951
955
|
};
|
|
952
|
-
function
|
|
956
|
+
function Ve({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
|
|
953
957
|
return /* @__PURE__ */ u("a", {
|
|
954
958
|
ref: o,
|
|
955
959
|
href: n || "#",
|
|
956
960
|
target: r || void 0,
|
|
957
961
|
rel: r === "_blank" ? "noopener noreferrer" : void 0,
|
|
958
962
|
style: {
|
|
959
|
-
...
|
|
963
|
+
...Be,
|
|
960
964
|
...C(i)
|
|
961
965
|
},
|
|
962
|
-
children:
|
|
966
|
+
children: J(t, e, a)
|
|
963
967
|
});
|
|
964
968
|
}
|
|
965
|
-
function
|
|
969
|
+
function He({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
|
|
966
970
|
return /* @__PURE__ */ u("a", {
|
|
967
971
|
ref: o,
|
|
968
972
|
href: n || "#",
|
|
969
973
|
target: r || void 0,
|
|
970
974
|
rel: r === "_blank" ? "noopener noreferrer" : void 0,
|
|
971
975
|
style: {
|
|
972
|
-
...
|
|
976
|
+
...q,
|
|
973
977
|
...C(i)
|
|
974
978
|
},
|
|
975
|
-
children:
|
|
979
|
+
children: J(t, e, a)
|
|
976
980
|
});
|
|
977
981
|
}
|
|
978
|
-
function
|
|
982
|
+
function Ue({ src: e, alt: t, style: n, nodeRef: r }) {
|
|
979
983
|
return e ? /* @__PURE__ */ u("img", {
|
|
980
984
|
ref: r,
|
|
981
985
|
src: e,
|
|
@@ -987,7 +991,7 @@ function Ve({ src: e, alt: t, style: n, nodeRef: r }) {
|
|
|
987
991
|
}
|
|
988
992
|
}) : null;
|
|
989
993
|
}
|
|
990
|
-
function
|
|
994
|
+
function We({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !1, muted: a = !1, style: o, nodeRef: s }) {
|
|
991
995
|
return e ? /* @__PURE__ */ u("video", {
|
|
992
996
|
ref: s,
|
|
993
997
|
src: e,
|
|
@@ -1005,9 +1009,9 @@ function He({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !
|
|
|
1005
1009
|
}
|
|
1006
1010
|
}) : null;
|
|
1007
1011
|
}
|
|
1008
|
-
var
|
|
1009
|
-
function
|
|
1010
|
-
let c =
|
|
1012
|
+
var Ge = (e = "") => (e.match(/(?:youtu\.be\/|v=|embed\/|shorts\/|live\/)([\w-]{11})/) || e.match(/^([\w-]{11})$/))?.[1];
|
|
1013
|
+
function Ke({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i = !0, start: a, style: o, nodeRef: s }) {
|
|
1014
|
+
let c = Ge(e);
|
|
1011
1015
|
if (!c) return null;
|
|
1012
1016
|
let l = new URLSearchParams({ rel: "0" });
|
|
1013
1017
|
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__ */ u("div", {
|
|
@@ -1033,7 +1037,7 @@ function We({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i
|
|
|
1033
1037
|
})
|
|
1034
1038
|
});
|
|
1035
1039
|
}
|
|
1036
|
-
function
|
|
1040
|
+
function qe({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i }) {
|
|
1037
1041
|
return e ? /* @__PURE__ */ u("iframe", {
|
|
1038
1042
|
ref: i,
|
|
1039
1043
|
src: e,
|
|
@@ -1049,7 +1053,7 @@ function Ge({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i })
|
|
|
1049
1053
|
}
|
|
1050
1054
|
}) : null;
|
|
1051
1055
|
}
|
|
1052
|
-
function
|
|
1056
|
+
function Je({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
|
|
1053
1057
|
let [a, o] = c(null);
|
|
1054
1058
|
return i(() => {
|
|
1055
1059
|
a && (a.innerHTML = e || "", t && a.querySelectorAll("script").forEach((e) => {
|
|
@@ -1068,7 +1072,7 @@ function Ke({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
|
|
|
1068
1072
|
style: C(n)
|
|
1069
1073
|
});
|
|
1070
1074
|
}
|
|
1071
|
-
function
|
|
1075
|
+
function Ye({ height: e, nodeRef: t }) {
|
|
1072
1076
|
return /* @__PURE__ */ u("div", {
|
|
1073
1077
|
ref: t,
|
|
1074
1078
|
style: {
|
|
@@ -1078,7 +1082,7 @@ function qe({ height: e, nodeRef: t }) {
|
|
|
1078
1082
|
}
|
|
1079
1083
|
});
|
|
1080
1084
|
}
|
|
1081
|
-
function
|
|
1085
|
+
function Xe({ style: e, nodeRef: t }) {
|
|
1082
1086
|
return /* @__PURE__ */ u("div", {
|
|
1083
1087
|
ref: t,
|
|
1084
1088
|
style: {
|
|
@@ -1089,7 +1093,7 @@ function Je({ style: e, nodeRef: t }) {
|
|
|
1089
1093
|
}
|
|
1090
1094
|
});
|
|
1091
1095
|
}
|
|
1092
|
-
var
|
|
1096
|
+
var Ze = {
|
|
1093
1097
|
position: "absolute",
|
|
1094
1098
|
top: "50%",
|
|
1095
1099
|
transform: "translateY(-50%)",
|
|
@@ -1106,7 +1110,7 @@ var Ye = {
|
|
|
1106
1110
|
alignItems: "center",
|
|
1107
1111
|
justifyContent: "center",
|
|
1108
1112
|
padding: 0
|
|
1109
|
-
},
|
|
1113
|
+
}, Qe = {
|
|
1110
1114
|
bottom: {
|
|
1111
1115
|
inset: "auto 0 0 0",
|
|
1112
1116
|
padding: "40px 24px 20px",
|
|
@@ -1125,8 +1129,8 @@ var Ye = {
|
|
|
1125
1129
|
padding: 24,
|
|
1126
1130
|
textShadow: "0 2px 12px rgba(0, 0, 0, 0.6)"
|
|
1127
1131
|
}
|
|
1128
|
-
},
|
|
1129
|
-
function
|
|
1132
|
+
}, $e = 48;
|
|
1133
|
+
function et({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, height: a = 320, swipe: o = !0, style: s, nodeRef: f }) {
|
|
1130
1134
|
let [p, m] = c(0), [h, g] = c(!1), [_, v] = c(null), y = e ? Math.min(p, e - 1) : 0;
|
|
1131
1135
|
if (i(() => {
|
|
1132
1136
|
if (!n || h || _ || e < 2) return;
|
|
@@ -1142,7 +1146,7 @@ function Qe({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1142
1146
|
let b = (t) => m((t + e) % e), x = () => {
|
|
1143
1147
|
if (!_) return;
|
|
1144
1148
|
let { dx: e } = _;
|
|
1145
|
-
v(null), e < -48 ? b(y + 1) : e >
|
|
1149
|
+
v(null), e < -48 ? b(y + 1) : e > $e && b(y - 1);
|
|
1146
1150
|
};
|
|
1147
1151
|
return /* @__PURE__ */ d("div", {
|
|
1148
1152
|
ref: f,
|
|
@@ -1190,7 +1194,7 @@ function Qe({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1190
1194
|
type: "button",
|
|
1191
1195
|
"aria-label": "Previous slide",
|
|
1192
1196
|
style: {
|
|
1193
|
-
...
|
|
1197
|
+
...Ze,
|
|
1194
1198
|
left: 12
|
|
1195
1199
|
},
|
|
1196
1200
|
onClick: () => b(y - 1),
|
|
@@ -1200,7 +1204,7 @@ function Qe({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1200
1204
|
type: "button",
|
|
1201
1205
|
"aria-label": "Next slide",
|
|
1202
1206
|
style: {
|
|
1203
|
-
...
|
|
1207
|
+
...Ze,
|
|
1204
1208
|
right: 12
|
|
1205
1209
|
},
|
|
1206
1210
|
onClick: () => b(y + 1),
|
|
@@ -1234,7 +1238,7 @@ function Qe({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1234
1238
|
] })]
|
|
1235
1239
|
});
|
|
1236
1240
|
}
|
|
1237
|
-
var
|
|
1241
|
+
var tt = (e, t) => ({
|
|
1238
1242
|
position: "absolute",
|
|
1239
1243
|
inset: 0,
|
|
1240
1244
|
backgroundImage: e ? `url(${e})` : "none",
|
|
@@ -1242,18 +1246,18 @@ var $e = (e, t) => ({
|
|
|
1242
1246
|
backgroundSize: "cover",
|
|
1243
1247
|
backgroundPosition: "center"
|
|
1244
1248
|
});
|
|
1245
|
-
function
|
|
1246
|
-
return e.length ? /* @__PURE__ */ u(
|
|
1249
|
+
function nt({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "left", ...r }) {
|
|
1250
|
+
return e.length ? /* @__PURE__ */ u(et, {
|
|
1247
1251
|
...r,
|
|
1248
1252
|
count: e.length,
|
|
1249
1253
|
renderSlide: (r) => {
|
|
1250
1254
|
let i = e[r];
|
|
1251
|
-
return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style:
|
|
1255
|
+
return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style: tt(i.image) }), (i.title || i.text) && /* @__PURE__ */ d("div", {
|
|
1252
1256
|
style: {
|
|
1253
1257
|
position: "absolute",
|
|
1254
1258
|
color: "#fff",
|
|
1255
1259
|
textAlign: n,
|
|
1256
|
-
...
|
|
1260
|
+
...Qe[t] ?? Qe.bottom
|
|
1257
1261
|
},
|
|
1258
1262
|
children: [i.title && /* @__PURE__ */ u("div", {
|
|
1259
1263
|
style: {
|
|
@@ -1273,13 +1277,13 @@ function et({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "
|
|
|
1273
1277
|
}
|
|
1274
1278
|
}) : null;
|
|
1275
1279
|
}
|
|
1276
|
-
function
|
|
1277
|
-
return e.length ? /* @__PURE__ */ u(
|
|
1280
|
+
function rt({ slides: e = [], linked: t, ...n }) {
|
|
1281
|
+
return e.length ? /* @__PURE__ */ u(et, {
|
|
1278
1282
|
...n,
|
|
1279
1283
|
count: e.length,
|
|
1280
1284
|
renderSlide: (n) => {
|
|
1281
1285
|
let r = e[n];
|
|
1282
|
-
return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style:
|
|
1286
|
+
return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style: tt(r.image, r.color) }), /* @__PURE__ */ u("div", {
|
|
1283
1287
|
style: {
|
|
1284
1288
|
position: "absolute",
|
|
1285
1289
|
inset: 0,
|
|
@@ -1291,7 +1295,7 @@ function tt({ slides: e = [], linked: t, ...n }) {
|
|
|
1291
1295
|
}
|
|
1292
1296
|
}) : null;
|
|
1293
1297
|
}
|
|
1294
|
-
function
|
|
1298
|
+
function it({ images: e = [], columns: t = 3, gap: n = 8, showNames: r = !1, lightbox: a = !0, style: o, nodeRef: s, inert: f }) {
|
|
1295
1299
|
let p = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.src) : [], m = Math.max(0, Number(n) || 0), h = f ? (e) => e.preventDefault() : void 0, [g, _] = c(null), v = a && !f && g !== null && p[g];
|
|
1296
1300
|
i(() => {
|
|
1297
1301
|
if (!v) return;
|
|
@@ -1490,19 +1494,19 @@ function nt({ images: e = [], columns: t = 3, gap: n = 8, showNames: r = !1, lig
|
|
|
1490
1494
|
]
|
|
1491
1495
|
});
|
|
1492
1496
|
}
|
|
1493
|
-
var
|
|
1497
|
+
var at = {
|
|
1494
1498
|
color: "inherit",
|
|
1495
1499
|
textDecoration: "none",
|
|
1496
1500
|
fontSize: 14,
|
|
1497
1501
|
opacity: .85
|
|
1498
|
-
},
|
|
1502
|
+
}, ot = {
|
|
1499
1503
|
background: "var(--page-surface, #f2f2f2)",
|
|
1500
1504
|
color: "var(--page-text, #111827)",
|
|
1501
1505
|
border: "1px solid rgba(148, 163, 184, 0.25)",
|
|
1502
1506
|
boxShadow: "0 16px 40px rgba(15, 23, 42, 0.16)",
|
|
1503
1507
|
zIndex: 60
|
|
1504
1508
|
};
|
|
1505
|
-
function
|
|
1509
|
+
function st({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], style: s, nodeRef: f, menu: p = "auto", breakpoint: m = 768 }) {
|
|
1506
1510
|
let [h, g] = c(null), [_, v] = c(!1), [y, b] = c(!1), [x, S] = c(null);
|
|
1507
1511
|
i(() => {
|
|
1508
1512
|
if (!h) return;
|
|
@@ -1512,7 +1516,7 @@ function at({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1512
1516
|
let w = p === "hamburger" || p === "auto" && _, T = (e, t) => /* @__PURE__ */ d("a", {
|
|
1513
1517
|
href: e.href || "#",
|
|
1514
1518
|
style: {
|
|
1515
|
-
...
|
|
1519
|
+
...at,
|
|
1516
1520
|
display: "block",
|
|
1517
1521
|
...t
|
|
1518
1522
|
},
|
|
@@ -1600,7 +1604,7 @@ function at({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1600
1604
|
let t = e.children ?? [];
|
|
1601
1605
|
if (!t.length) return /* @__PURE__ */ u("a", {
|
|
1602
1606
|
href: e.href || "#",
|
|
1603
|
-
style:
|
|
1607
|
+
style: at,
|
|
1604
1608
|
children: e.label
|
|
1605
1609
|
}, e.key);
|
|
1606
1610
|
let n = e.type === "mega";
|
|
@@ -1614,7 +1618,7 @@ function at({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1614
1618
|
children: [/* @__PURE__ */ d("a", {
|
|
1615
1619
|
href: e.href || "#",
|
|
1616
1620
|
style: {
|
|
1617
|
-
...
|
|
1621
|
+
...at,
|
|
1618
1622
|
cursor: "pointer"
|
|
1619
1623
|
},
|
|
1620
1624
|
children: [
|
|
@@ -1630,7 +1634,7 @@ function at({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1630
1634
|
]
|
|
1631
1635
|
}), x === e.key && (n ? /* @__PURE__ */ u("div", {
|
|
1632
1636
|
style: {
|
|
1633
|
-
...
|
|
1637
|
+
...ot,
|
|
1634
1638
|
position: "absolute",
|
|
1635
1639
|
left: 0,
|
|
1636
1640
|
right: 0,
|
|
@@ -1646,7 +1650,7 @@ function at({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1646
1650
|
}))
|
|
1647
1651
|
}) : /* @__PURE__ */ u("div", {
|
|
1648
1652
|
style: {
|
|
1649
|
-
...
|
|
1653
|
+
...ot,
|
|
1650
1654
|
position: "absolute",
|
|
1651
1655
|
top: "100%",
|
|
1652
1656
|
left: 0,
|
|
@@ -1675,7 +1679,7 @@ function at({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1675
1679
|
children: o.map((t) => /* @__PURE__ */ d(e, { children: [/* @__PURE__ */ u("a", {
|
|
1676
1680
|
href: t.href || "#",
|
|
1677
1681
|
style: {
|
|
1678
|
-
...
|
|
1682
|
+
...at,
|
|
1679
1683
|
padding: "10px 4px",
|
|
1680
1684
|
fontWeight: (t.children ?? []).length ? 600 : 400,
|
|
1681
1685
|
opacity: 1
|
|
@@ -1686,7 +1690,7 @@ function at({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1686
1690
|
]
|
|
1687
1691
|
});
|
|
1688
1692
|
}
|
|
1689
|
-
function
|
|
1693
|
+
function ct({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
|
|
1690
1694
|
let [i, a] = c(0), o = e.length ? Math.min(i, e.length - 1) : 0;
|
|
1691
1695
|
return e.length ? /* @__PURE__ */ d("div", {
|
|
1692
1696
|
ref: r,
|
|
@@ -1726,7 +1730,7 @@ function ot({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
|
|
|
1726
1730
|
}, e.key))]
|
|
1727
1731
|
}) : null;
|
|
1728
1732
|
}
|
|
1729
|
-
function
|
|
1733
|
+
function lt({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }) {
|
|
1730
1734
|
let [a, o] = c(() => new Set(e.length ? [e[0].key] : []));
|
|
1731
1735
|
if (!e.length) return null;
|
|
1732
1736
|
let s = (e) => o((t) => {
|
|
@@ -1783,15 +1787,15 @@ function st({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }
|
|
|
1783
1787
|
})
|
|
1784
1788
|
});
|
|
1785
1789
|
}
|
|
1786
|
-
var
|
|
1790
|
+
var ut = {
|
|
1787
1791
|
display: "flex",
|
|
1788
1792
|
flexDirection: "column",
|
|
1789
1793
|
gap: "12px"
|
|
1790
|
-
},
|
|
1794
|
+
}, Y = {
|
|
1791
1795
|
fontSize: "14px",
|
|
1792
1796
|
fontWeight: 500,
|
|
1793
1797
|
color: "var(--page-text, #111827)"
|
|
1794
|
-
},
|
|
1798
|
+
}, X = {
|
|
1795
1799
|
padding: "10px 12px",
|
|
1796
1800
|
border: "1px solid var(--page-border, #d1d5db)",
|
|
1797
1801
|
borderRadius: "6px",
|
|
@@ -1801,18 +1805,18 @@ var ct = {
|
|
|
1801
1805
|
boxSizing: "border-box",
|
|
1802
1806
|
backgroundColor: "var(--page-surface, #f2f2f2)",
|
|
1803
1807
|
color: "var(--page-text, #111827)"
|
|
1804
|
-
},
|
|
1808
|
+
}, dt = {
|
|
1805
1809
|
display: "flex",
|
|
1806
1810
|
alignItems: "center",
|
|
1807
1811
|
gap: "8px",
|
|
1808
1812
|
fontSize: "14px",
|
|
1809
1813
|
color: "var(--page-text, #111827)"
|
|
1810
|
-
},
|
|
1814
|
+
}, Z = (e) => e ? {
|
|
1811
1815
|
readOnly: !0,
|
|
1812
1816
|
tabIndex: -1,
|
|
1813
1817
|
onMouseDown: (e) => e.preventDefault()
|
|
1814
1818
|
} : {};
|
|
1815
|
-
function
|
|
1819
|
+
function ft(e, t) {
|
|
1816
1820
|
if (!e) return !0;
|
|
1817
1821
|
let n = t[e.field], r = n == null || n === "" ? "" : String(n), i = e.value ?? "";
|
|
1818
1822
|
switch (e.op) {
|
|
@@ -1826,11 +1830,11 @@ function ut(e, t) {
|
|
|
1826
1830
|
default: return !1;
|
|
1827
1831
|
}
|
|
1828
1832
|
}
|
|
1829
|
-
var
|
|
1833
|
+
var pt = {
|
|
1830
1834
|
display: "flex",
|
|
1831
1835
|
flexDirection: "column",
|
|
1832
1836
|
gap: 6
|
|
1833
|
-
},
|
|
1837
|
+
}, mt = {
|
|
1834
1838
|
font: "inherit",
|
|
1835
1839
|
fontSize: 15,
|
|
1836
1840
|
padding: "10px 12px",
|
|
@@ -1841,16 +1845,16 @@ var dt = {
|
|
|
1841
1845
|
width: "100%",
|
|
1842
1846
|
boxSizing: "border-box"
|
|
1843
1847
|
};
|
|
1844
|
-
function
|
|
1848
|
+
function ht(e, t) {
|
|
1845
1849
|
let n = Array.isArray(e?.options) ? e.options : [];
|
|
1846
1850
|
if (!e?.parentField) return n;
|
|
1847
1851
|
let r = t?.[e.parentField];
|
|
1848
1852
|
return r ? n.filter((e) => typeof e == "string" ? !1 : !e.parent || e.parent === r) : [];
|
|
1849
1853
|
}
|
|
1850
|
-
function
|
|
1854
|
+
function gt({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
1851
1855
|
let a = /* @__PURE__ */ d("span", {
|
|
1852
1856
|
style: {
|
|
1853
|
-
...
|
|
1857
|
+
...Y,
|
|
1854
1858
|
fontSize: 14
|
|
1855
1859
|
},
|
|
1856
1860
|
children: [e.label, e.required ? " *" : ""]
|
|
@@ -1859,7 +1863,7 @@ function mt({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1859
1863
|
required: e.required || void 0,
|
|
1860
1864
|
placeholder: e.placeholder || void 0,
|
|
1861
1865
|
disabled: r || void 0,
|
|
1862
|
-
style:
|
|
1866
|
+
style: mt,
|
|
1863
1867
|
value: t ?? "",
|
|
1864
1868
|
onChange: (t) => n(e.name, t.target.value)
|
|
1865
1869
|
};
|
|
@@ -1888,7 +1892,7 @@ function mt({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1888
1892
|
borderRadius: 8,
|
|
1889
1893
|
display: "block"
|
|
1890
1894
|
}
|
|
1891
|
-
}) : null : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ u(
|
|
1895
|
+
}) : null : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ u(Ke, {
|
|
1892
1896
|
url: e.src,
|
|
1893
1897
|
style: { width: "100%" }
|
|
1894
1898
|
}) : /* @__PURE__ */ u("video", {
|
|
@@ -1900,14 +1904,14 @@ function mt({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1900
1904
|
display: "block"
|
|
1901
1905
|
}
|
|
1902
1906
|
}) : null : /* @__PURE__ */ d("label", {
|
|
1903
|
-
style:
|
|
1907
|
+
style: pt,
|
|
1904
1908
|
children: [
|
|
1905
1909
|
a,
|
|
1906
1910
|
e.type === "textarea" || e.multiline ? /* @__PURE__ */ u("textarea", {
|
|
1907
1911
|
...o,
|
|
1908
1912
|
rows: 4,
|
|
1909
1913
|
style: {
|
|
1910
|
-
...
|
|
1914
|
+
...mt,
|
|
1911
1915
|
resize: "vertical"
|
|
1912
1916
|
}
|
|
1913
1917
|
}) : e.type === "select" ? /* @__PURE__ */ d("select", {
|
|
@@ -1916,7 +1920,7 @@ function mt({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1916
1920
|
children: [/* @__PURE__ */ u("option", {
|
|
1917
1921
|
value: "",
|
|
1918
1922
|
children: e.placeholder || "—"
|
|
1919
|
-
}),
|
|
1923
|
+
}), ht(e, i).map((e, t) => /* @__PURE__ */ u("option", {
|
|
1920
1924
|
value: typeof e == "string" ? e : e.value,
|
|
1921
1925
|
children: typeof e == "string" ? e : e.label ?? e.value
|
|
1922
1926
|
}, t))]
|
|
@@ -1963,8 +1967,8 @@ function mt({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1963
1967
|
]
|
|
1964
1968
|
});
|
|
1965
1969
|
}
|
|
1966
|
-
function
|
|
1967
|
-
let { tenant: y, apiUrl: b } = r(
|
|
1970
|
+
function _t({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s, auto: f, submitLabel: p, nodeRef: m, inert: h, children: g, linked: _, show: v }) {
|
|
1971
|
+
let { tenant: y, apiUrl: b } = r(H), [x, S] = c("form"), [w, T] = c(null), [E, D] = c({}), [O, k] = c(0), A = h ? v || "form" : x;
|
|
1968
1972
|
i(() => {
|
|
1969
1973
|
if (!f || !s) return;
|
|
1970
1974
|
let e = !0;
|
|
@@ -1985,13 +1989,13 @@ function ht({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
1985
1989
|
section: e,
|
|
1986
1990
|
fields: []
|
|
1987
1991
|
}) : j[j.length - 1].fields.push(e);
|
|
1988
|
-
let M = j.filter((e) => e.section || e.fields.length), N = M.filter((e) => !e.section ||
|
|
1992
|
+
let M = j.filter((e) => e.section || e.fields.length), N = M.filter((e) => !e.section || ft(e.section.condition, E)).map((e) => ({
|
|
1989
1993
|
...e,
|
|
1990
|
-
fields: e.fields.filter((e) =>
|
|
1991
|
-
})), P = M.length > 1, F = Math.min(O, Math.max(0, N.length - 1)),
|
|
1994
|
+
fields: e.fields.filter((e) => ft(e.condition, E))
|
|
1995
|
+
})), P = M.length > 1, F = Math.min(O, Math.max(0, N.length - 1)), ee = P ? N[F]?.fields ?? [] : N.flatMap((e) => e.fields), I = ee.filter((e) => {
|
|
1992
1996
|
let t = E[e.name];
|
|
1993
1997
|
return e.required && (t == null || t === "" || t === !1);
|
|
1994
|
-
}),
|
|
1998
|
+
}), L = F >= N.length - 1, R = (e, t) => D((n) => {
|
|
1995
1999
|
let r = {
|
|
1996
2000
|
...n,
|
|
1997
2001
|
[e]: t
|
|
@@ -2045,11 +2049,11 @@ function ht({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
2045
2049
|
}
|
|
2046
2050
|
},
|
|
2047
2051
|
style: {
|
|
2048
|
-
...
|
|
2052
|
+
...ut,
|
|
2049
2053
|
display: A === "success" ? "none" : "flex"
|
|
2050
2054
|
},
|
|
2051
2055
|
children: f && s ? /* @__PURE__ */ d(l, { children: [
|
|
2052
|
-
P && /* @__PURE__ */ u(
|
|
2056
|
+
P && /* @__PURE__ */ u(Ut, {
|
|
2053
2057
|
steps: N.map((e) => ({ label: e.section?.label ?? "Start" })),
|
|
2054
2058
|
active: F + 1,
|
|
2055
2059
|
style: { marginBottom: 8 }
|
|
@@ -2062,11 +2066,11 @@ function ht({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
2062
2066
|
},
|
|
2063
2067
|
children: N[F].section.help
|
|
2064
2068
|
}),
|
|
2065
|
-
|
|
2069
|
+
ee.map((e) => /* @__PURE__ */ u(gt, {
|
|
2066
2070
|
field: e,
|
|
2067
2071
|
value: E[e.name],
|
|
2068
2072
|
values: E,
|
|
2069
|
-
onChange:
|
|
2073
|
+
onChange: R,
|
|
2070
2074
|
inert: h
|
|
2071
2075
|
}, e.name)),
|
|
2072
2076
|
/* @__PURE__ */ d("div", {
|
|
@@ -2081,7 +2085,7 @@ function ht({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
2081
2085
|
disabled: h || void 0,
|
|
2082
2086
|
onClick: () => k(F - 1),
|
|
2083
2087
|
style: {
|
|
2084
|
-
...
|
|
2088
|
+
...q,
|
|
2085
2089
|
background: "transparent",
|
|
2086
2090
|
color: "inherit",
|
|
2087
2091
|
border: 0,
|
|
@@ -2089,26 +2093,26 @@ function ht({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
2089
2093
|
cursor: "pointer"
|
|
2090
2094
|
},
|
|
2091
2095
|
children: "Back"
|
|
2092
|
-
}), P && !
|
|
2096
|
+
}), P && !L ? /* @__PURE__ */ u("button", {
|
|
2093
2097
|
type: "button",
|
|
2094
|
-
disabled: h ||
|
|
2098
|
+
disabled: h || I.length > 0,
|
|
2095
2099
|
onClick: () => k(F + 1),
|
|
2096
2100
|
style: {
|
|
2097
|
-
...
|
|
2101
|
+
...q,
|
|
2098
2102
|
border: 0,
|
|
2099
2103
|
padding: "10px 22px",
|
|
2100
2104
|
borderRadius: 8,
|
|
2101
2105
|
fontSize: 15,
|
|
2102
2106
|
fontWeight: 600,
|
|
2103
2107
|
cursor: "pointer",
|
|
2104
|
-
opacity:
|
|
2108
|
+
opacity: I.length ? .5 : 1
|
|
2105
2109
|
},
|
|
2106
2110
|
children: "Next"
|
|
2107
2111
|
}) : /* @__PURE__ */ u("button", {
|
|
2108
2112
|
type: "submit",
|
|
2109
2113
|
disabled: h || void 0,
|
|
2110
2114
|
style: {
|
|
2111
|
-
...
|
|
2115
|
+
...q,
|
|
2112
2116
|
border: 0,
|
|
2113
2117
|
padding: "10px 22px",
|
|
2114
2118
|
borderRadius: 8,
|
|
@@ -2135,10 +2139,10 @@ function ht({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
2135
2139
|
]
|
|
2136
2140
|
});
|
|
2137
2141
|
}
|
|
2138
|
-
var
|
|
2142
|
+
var Q = null, vt = null, yt = (e) => {
|
|
2139
2143
|
let t = typeof e == "string" && e.trim() ? e.trim() : "";
|
|
2140
|
-
if (
|
|
2141
|
-
if (
|
|
2144
|
+
if (Q && vt === t) return Q;
|
|
2145
|
+
if (Q && typeof window < "u") {
|
|
2142
2146
|
for (let e of ["grecaptcha", "___grecaptcha_cfg"]) try {
|
|
2143
2147
|
delete window[e];
|
|
2144
2148
|
} catch {
|
|
@@ -2146,22 +2150,22 @@ var $ = null, gt = null, _t = (e) => {
|
|
|
2146
2150
|
}
|
|
2147
2151
|
document.querySelectorAll("script[src*=\"recaptcha\"]").forEach((e) => e.remove());
|
|
2148
2152
|
}
|
|
2149
|
-
return
|
|
2153
|
+
return vt = t, Q = new Promise((e) => {
|
|
2150
2154
|
if (typeof window > "u") return;
|
|
2151
2155
|
if (window.grecaptcha?.render) return e(window.grecaptcha);
|
|
2152
2156
|
window.__webimRecaptchaReady = () => e(window.grecaptcha);
|
|
2153
2157
|
let n = document.createElement("script");
|
|
2154
2158
|
n.src = `https://www.google.com/recaptcha/api.js?onload=__webimRecaptchaReady&render=explicit${t ? `&hl=${encodeURIComponent(t)}` : ""}`, n.async = !0, document.head.appendChild(n);
|
|
2155
|
-
}),
|
|
2159
|
+
}), Q;
|
|
2156
2160
|
};
|
|
2157
|
-
function
|
|
2158
|
-
let p = r(
|
|
2161
|
+
function bt({ siteKey: e, theme: t, size: n, hl: a, style: o, nodeRef: c, inert: l, onChange: f }) {
|
|
2162
|
+
let p = r(H), m = p?.settings && typeof p.settings == "object" ? p.settings["google.recaptchaKey"] : "", h = typeof e == "string" && e.trim() || (typeof m == "string" ? m.trim() : ""), g = s(null), _ = s(f);
|
|
2159
2163
|
if (_.current = f, i(() => {
|
|
2160
2164
|
if (l || !h || !g.current) return;
|
|
2161
2165
|
let e = !0, r = (t) => {
|
|
2162
2166
|
e && typeof _.current == "function" && _.current(t);
|
|
2163
2167
|
};
|
|
2164
|
-
return
|
|
2168
|
+
return yt(a).then((i) => {
|
|
2165
2169
|
if (!(!e || !g.current || !i?.render)) {
|
|
2166
2170
|
g.current.innerHTML = "", r("");
|
|
2167
2171
|
try {
|
|
@@ -2243,17 +2247,17 @@ function vt({ siteKey: e, theme: t, size: n, hl: a, style: o, nodeRef: c, inert:
|
|
|
2243
2247
|
children: /* @__PURE__ */ u("div", { ref: g })
|
|
2244
2248
|
}) : null;
|
|
2245
2249
|
}
|
|
2246
|
-
function
|
|
2250
|
+
function xt({ text: e, parts: t, style: n, nodeRef: r, linked: i }) {
|
|
2247
2251
|
return /* @__PURE__ */ u("label", {
|
|
2248
2252
|
ref: r,
|
|
2249
2253
|
style: {
|
|
2250
|
-
...
|
|
2254
|
+
...Y,
|
|
2251
2255
|
...C(n)
|
|
2252
2256
|
},
|
|
2253
|
-
children:
|
|
2257
|
+
children: J(t, e, i)
|
|
2254
2258
|
});
|
|
2255
2259
|
}
|
|
2256
|
-
function
|
|
2260
|
+
function St({ type: e = "text", name: t, placeholder: n, required: r, style: i, nodeRef: a, inert: o }) {
|
|
2257
2261
|
return /* @__PURE__ */ u("input", {
|
|
2258
2262
|
ref: a,
|
|
2259
2263
|
type: e,
|
|
@@ -2261,13 +2265,13 @@ function bt({ type: e = "text", name: t, placeholder: n, required: r, style: i,
|
|
|
2261
2265
|
placeholder: n,
|
|
2262
2266
|
required: !o && !!r,
|
|
2263
2267
|
style: {
|
|
2264
|
-
...
|
|
2268
|
+
...X,
|
|
2265
2269
|
...C(i)
|
|
2266
2270
|
},
|
|
2267
|
-
...
|
|
2271
|
+
...Z(o)
|
|
2268
2272
|
});
|
|
2269
2273
|
}
|
|
2270
|
-
function
|
|
2274
|
+
function Ct({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeRef: a, inert: o }) {
|
|
2271
2275
|
return /* @__PURE__ */ u("textarea", {
|
|
2272
2276
|
ref: a,
|
|
2273
2277
|
name: e || void 0,
|
|
@@ -2275,18 +2279,18 @@ function xt({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeR
|
|
|
2275
2279
|
rows: n,
|
|
2276
2280
|
required: !o && !!r,
|
|
2277
2281
|
style: {
|
|
2278
|
-
...
|
|
2282
|
+
...X,
|
|
2279
2283
|
resize: "vertical",
|
|
2280
2284
|
...C(i)
|
|
2281
2285
|
},
|
|
2282
|
-
...
|
|
2286
|
+
...Z(o)
|
|
2283
2287
|
});
|
|
2284
2288
|
}
|
|
2285
|
-
function
|
|
2289
|
+
function wt({ kind: e = "checkbox", label: t, name: n, value: r, required: i, style: a, nodeRef: o, inert: s }) {
|
|
2286
2290
|
return /* @__PURE__ */ d("label", {
|
|
2287
2291
|
ref: o,
|
|
2288
2292
|
style: {
|
|
2289
|
-
...
|
|
2293
|
+
...dt,
|
|
2290
2294
|
...C(a)
|
|
2291
2295
|
},
|
|
2292
2296
|
children: [/* @__PURE__ */ u("input", {
|
|
@@ -2303,7 +2307,7 @@ function St({ kind: e = "checkbox", label: t, name: n, value: r, required: i, st
|
|
|
2303
2307
|
}), t]
|
|
2304
2308
|
});
|
|
2305
2309
|
}
|
|
2306
|
-
function
|
|
2310
|
+
function Tt({ name: e, placeholder: t, options: n = [], required: r, style: i, nodeRef: a, inert: o }) {
|
|
2307
2311
|
return /* @__PURE__ */ d("select", {
|
|
2308
2312
|
ref: a,
|
|
2309
2313
|
name: e || void 0,
|
|
@@ -2312,7 +2316,7 @@ function Ct({ name: e, placeholder: t, options: n = [], required: r, style: i, n
|
|
|
2312
2316
|
onMouseDown: o ? (e) => e.preventDefault() : void 0,
|
|
2313
2317
|
tabIndex: o ? -1 : void 0,
|
|
2314
2318
|
style: {
|
|
2315
|
-
...
|
|
2319
|
+
...X,
|
|
2316
2320
|
appearance: "auto",
|
|
2317
2321
|
...C(i)
|
|
2318
2322
|
},
|
|
@@ -2326,12 +2330,12 @@ function Ct({ name: e, placeholder: t, options: n = [], required: r, style: i, n
|
|
|
2326
2330
|
}, t))]
|
|
2327
2331
|
});
|
|
2328
2332
|
}
|
|
2329
|
-
function
|
|
2333
|
+
function Et({ name: e, accept: t, required: n, text: r = "Choose a file…", style: i, nodeRef: a, inert: o }) {
|
|
2330
2334
|
let [s, l] = c(null);
|
|
2331
2335
|
return /* @__PURE__ */ d("label", {
|
|
2332
2336
|
ref: a,
|
|
2333
2337
|
style: {
|
|
2334
|
-
...
|
|
2338
|
+
...X,
|
|
2335
2339
|
display: "flex",
|
|
2336
2340
|
alignItems: "center",
|
|
2337
2341
|
gap: "8px",
|
|
@@ -2358,12 +2362,12 @@ function wt({ name: e, accept: t, required: n, text: r = "Choose a file…", sty
|
|
|
2358
2362
|
]
|
|
2359
2363
|
});
|
|
2360
2364
|
}
|
|
2361
|
-
function
|
|
2365
|
+
function Dt({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
|
|
2362
2366
|
return /* @__PURE__ */ u("button", {
|
|
2363
2367
|
ref: n,
|
|
2364
2368
|
type: r ? "button" : "submit",
|
|
2365
2369
|
style: {
|
|
2366
|
-
...
|
|
2370
|
+
...q,
|
|
2367
2371
|
border: 0,
|
|
2368
2372
|
cursor: "pointer",
|
|
2369
2373
|
alignSelf: "flex-start",
|
|
@@ -2378,7 +2382,7 @@ function Tt({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
|
|
|
2378
2382
|
children: e
|
|
2379
2383
|
});
|
|
2380
2384
|
}
|
|
2381
|
-
function
|
|
2385
|
+
function Ot({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
|
|
2382
2386
|
let a = Math.max(1, (Number(e) || 1) * (Number(t) || 1));
|
|
2383
2387
|
return /* @__PURE__ */ u("div", {
|
|
2384
2388
|
ref: r,
|
|
@@ -2395,8 +2399,8 @@ function Et({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
|
|
|
2395
2399
|
}, t))
|
|
2396
2400
|
});
|
|
2397
2401
|
}
|
|
2398
|
-
function
|
|
2399
|
-
let { tenant: v, apiUrl: y, locale: b } = r(
|
|
2402
|
+
function kt({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, imageField: o, titleField: s = "name", textField: l, custom: f, templateId: p, paged: m, filters: h, style: g, nodeRef: _ }) {
|
|
2403
|
+
let { tenant: v, apiUrl: y, locale: b } = r(H), x = r(he), S = r(U), [, w] = c(0);
|
|
2400
2404
|
i(() => {
|
|
2401
2405
|
if (typeof window > "u") return;
|
|
2402
2406
|
let e = () => w((e) => e + 1);
|
|
@@ -2404,7 +2408,7 @@ function Dt({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
|
|
|
2404
2408
|
window.removeEventListener("popstate", e), window.removeEventListener("webim:urlchange", e);
|
|
2405
2409
|
};
|
|
2406
2410
|
}, []);
|
|
2407
|
-
let T =
|
|
2411
|
+
let T = me(h), E = JSON.stringify(T), D = E !== "{}" && !e?.startsWith?.("api:"), O = D ? null : S?.[e], k = m ? W(S) : 1, [A, j] = c(null);
|
|
2408
2412
|
if (i(() => {
|
|
2409
2413
|
if (!e || O) return;
|
|
2410
2414
|
let n = !0, r = new URLSearchParams();
|
|
@@ -2449,7 +2453,7 @@ function Dt({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
|
|
|
2449
2453
|
},
|
|
2450
2454
|
children: N.map((e) => /* @__PURE__ */ u("div", {
|
|
2451
2455
|
style: { minWidth: 0 },
|
|
2452
|
-
children: x.render(p, (t) =>
|
|
2456
|
+
children: x.render(p, (t) => ve(t, e))
|
|
2453
2457
|
}, e.id ?? e?.data?.slug))
|
|
2454
2458
|
}) : /* @__PURE__ */ u("div", {
|
|
2455
2459
|
ref: _,
|
|
@@ -2459,7 +2463,7 @@ function Dt({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
|
|
|
2459
2463
|
...C(g)
|
|
2460
2464
|
},
|
|
2461
2465
|
children: N.map((e) => {
|
|
2462
|
-
let t = o ?
|
|
2466
|
+
let t = o ? G(e?.data, o) : null, r = s ? K(G(e?.data, s)) : null, i = l ? G(e?.data, l) : null, a = Array.isArray(i) ? i : null, c = a || i == null ? null : K(i), f = n === "list";
|
|
2463
2467
|
return /* @__PURE__ */ d("div", {
|
|
2464
2468
|
style: {
|
|
2465
2469
|
display: "flex",
|
|
@@ -2506,7 +2510,7 @@ function Dt({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
|
|
|
2506
2510
|
lineHeight: 1.55,
|
|
2507
2511
|
opacity: .85
|
|
2508
2512
|
},
|
|
2509
|
-
children:
|
|
2513
|
+
children: Pe(a)
|
|
2510
2514
|
})
|
|
2511
2515
|
]
|
|
2512
2516
|
})]
|
|
@@ -2514,8 +2518,8 @@ function Dt({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
|
|
|
2514
2518
|
})
|
|
2515
2519
|
});
|
|
2516
2520
|
}
|
|
2517
|
-
function
|
|
2518
|
-
let a = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && typeof e.name == "string" && e.name) : [], o = i ? {} :
|
|
2521
|
+
function At({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, inert: i }) {
|
|
2522
|
+
let a = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && typeof e.name == "string" && e.name) : [], o = i ? {} : pe(), s = {
|
|
2519
2523
|
height: 34,
|
|
2520
2524
|
padding: "0 12px",
|
|
2521
2525
|
borderRadius: 8,
|
|
@@ -2563,7 +2567,7 @@ function Ot({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
2563
2567
|
name: `f_${e.name}`,
|
|
2564
2568
|
defaultValue: o[e.name] ?? "",
|
|
2565
2569
|
style: s,
|
|
2566
|
-
...
|
|
2570
|
+
...Z(i),
|
|
2567
2571
|
children: [/* @__PURE__ */ u("option", {
|
|
2568
2572
|
value: "",
|
|
2569
2573
|
children: e.label || e.name
|
|
@@ -2578,7 +2582,7 @@ function Ot({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
2578
2582
|
name: `f_${e.name}`,
|
|
2579
2583
|
defaultValue: o[e.name] ?? "",
|
|
2580
2584
|
style: s,
|
|
2581
|
-
...
|
|
2585
|
+
...Z(i),
|
|
2582
2586
|
children: [
|
|
2583
2587
|
/* @__PURE__ */ u("option", {
|
|
2584
2588
|
value: "",
|
|
@@ -2599,7 +2603,7 @@ function Ot({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
2599
2603
|
defaultValue: o[e.name] ?? "",
|
|
2600
2604
|
placeholder: e.label || e.name,
|
|
2601
2605
|
style: s,
|
|
2602
|
-
...
|
|
2606
|
+
...Z(i)
|
|
2603
2607
|
}, e.name)), /* @__PURE__ */ u("button", {
|
|
2604
2608
|
type: "submit",
|
|
2605
2609
|
style: {
|
|
@@ -2612,12 +2616,12 @@ function Ot({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
2612
2616
|
fontWeight: 600,
|
|
2613
2617
|
cursor: i ? "default" : "pointer"
|
|
2614
2618
|
},
|
|
2615
|
-
...
|
|
2619
|
+
...Z(i),
|
|
2616
2620
|
children: t
|
|
2617
2621
|
})]
|
|
2618
2622
|
});
|
|
2619
2623
|
}
|
|
2620
|
-
function
|
|
2624
|
+
function jt({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
|
|
2621
2625
|
return e.length ? /* @__PURE__ */ u("nav", {
|
|
2622
2626
|
ref: r,
|
|
2623
2627
|
"aria-label": "Breadcrumb",
|
|
@@ -2667,8 +2671,8 @@ function kt({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
|
|
|
2667
2671
|
})
|
|
2668
2672
|
}) : null;
|
|
2669
2673
|
}
|
|
2670
|
-
function
|
|
2671
|
-
let { tenant: g, apiUrl: _ } = r(
|
|
2674
|
+
function Mt({ pages: e = 5, current: t = 1, prevNext: n = !0, href: a = "#", source: o, pageSize: s = 6, align: l, hideEmpty: f, inert: p, style: m, nodeRef: h }) {
|
|
2675
|
+
let { tenant: g, apiUrl: _ } = r(H), v = r(U), [y, b] = c(null), x = o ? Number(v?.[`${o}:total`]) : NaN;
|
|
2672
2676
|
i(() => {
|
|
2673
2677
|
if (!o || Number.isFinite(x)) return;
|
|
2674
2678
|
let e = !0, t = o.startsWith("api:") ? `${_}/data/${encodeURIComponent(o.slice(4))}` : `${_}/dynamic/${encodeURIComponent(o)}?limit=1`;
|
|
@@ -2687,7 +2691,7 @@ function At({ pages: e = 5, current: t = 1, prevNext: n = !0, href: a = "#", sou
|
|
|
2687
2691
|
]);
|
|
2688
2692
|
let S = Math.max(1, Number(s) || 6), w = Number.isFinite(x) ? x : y;
|
|
2689
2693
|
if (o && w === null || o && f && !(w > 0)) return null;
|
|
2690
|
-
let T = Math.min(Math.max(o ? Math.ceil(w / S) : Number(e) || 1, 1), 50), E = Math.min(Math.max(o ?
|
|
2694
|
+
let T = Math.min(Math.max(o ? Math.ceil(w / S) : Number(e) || 1, 1), 50), E = Math.min(Math.max(o ? W(v) : Number(t) || 1, 1), T), D = (e) => {
|
|
2691
2695
|
if (o) {
|
|
2692
2696
|
if (typeof window < "u") {
|
|
2693
2697
|
let t = new URLSearchParams(window.location.search);
|
|
@@ -2752,15 +2756,15 @@ function At({ pages: e = 5, current: t = 1, prevNext: n = !0, href: a = "#", sou
|
|
|
2752
2756
|
]
|
|
2753
2757
|
});
|
|
2754
2758
|
}
|
|
2755
|
-
var
|
|
2759
|
+
var Nt = "webim.page_mode", Pt = () => {
|
|
2756
2760
|
if (typeof window > "u") return "auto";
|
|
2757
2761
|
try {
|
|
2758
|
-
let e = window.localStorage.getItem(
|
|
2762
|
+
let e = window.localStorage.getItem(Nt);
|
|
2759
2763
|
return e === "light" || e === "dark" ? e : "auto";
|
|
2760
2764
|
} catch {
|
|
2761
2765
|
return "auto";
|
|
2762
2766
|
}
|
|
2763
|
-
},
|
|
2767
|
+
}, Ft = (e) => {
|
|
2764
2768
|
let t = {
|
|
2765
2769
|
width: 16,
|
|
2766
2770
|
height: 16,
|
|
@@ -2792,13 +2796,13 @@ var jt = "webim.page_mode", Mt = () => {
|
|
|
2792
2796
|
rx: "2"
|
|
2793
2797
|
}), /* @__PURE__ */ u("path", { d: "M8 21h8M12 17v4" })]
|
|
2794
2798
|
});
|
|
2795
|
-
},
|
|
2799
|
+
}, $ = {
|
|
2796
2800
|
light: "Light theme",
|
|
2797
2801
|
dark: "Dark theme",
|
|
2798
2802
|
auto: "Follow the device theme"
|
|
2799
2803
|
};
|
|
2800
|
-
function
|
|
2801
|
-
let [o, l] = c(a ? "auto" :
|
|
2804
|
+
function It({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
|
|
2805
|
+
let [o, l] = c(a ? "auto" : Pt), d = s(null), f = (e) => {
|
|
2802
2806
|
d.current = e, typeof r == "function" && r(e);
|
|
2803
2807
|
};
|
|
2804
2808
|
i(() => {
|
|
@@ -2806,7 +2810,7 @@ function Ft({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
|
|
|
2806
2810
|
let e = d.current?.closest?.(".webim-page");
|
|
2807
2811
|
e && (o === "light" || o === "dark" ? e.setAttribute("data-webim-mode", o) : e.removeAttribute("data-webim-mode"));
|
|
2808
2812
|
try {
|
|
2809
|
-
o === "auto" ? window.localStorage.removeItem(
|
|
2813
|
+
o === "auto" ? window.localStorage.removeItem(Nt) : window.localStorage.setItem(Nt, o);
|
|
2810
2814
|
} catch {}
|
|
2811
2815
|
}, [o, a]);
|
|
2812
2816
|
let p = t === !1 ? ["light", "dark"] : [
|
|
@@ -2841,8 +2845,8 @@ function Ft({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
|
|
|
2841
2845
|
},
|
|
2842
2846
|
children: p.map((e) => /* @__PURE__ */ u("button", {
|
|
2843
2847
|
type: "button",
|
|
2844
|
-
title:
|
|
2845
|
-
"aria-label":
|
|
2848
|
+
title: $[e],
|
|
2849
|
+
"aria-label": $[e],
|
|
2846
2850
|
"aria-pressed": e === m,
|
|
2847
2851
|
onClick: a ? void 0 : () => l(e),
|
|
2848
2852
|
style: {
|
|
@@ -2853,15 +2857,15 @@ function Ft({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
|
|
|
2853
2857
|
background: e === m ? "var(--page-accent, #111827)" : "transparent",
|
|
2854
2858
|
opacity: e === m ? 1 : .7
|
|
2855
2859
|
},
|
|
2856
|
-
children:
|
|
2860
|
+
children: Ft(e)
|
|
2857
2861
|
}, e))
|
|
2858
2862
|
});
|
|
2859
2863
|
let g = p[(p.indexOf(m) + 1) % p.length];
|
|
2860
2864
|
return /* @__PURE__ */ u("button", {
|
|
2861
2865
|
ref: f,
|
|
2862
2866
|
type: "button",
|
|
2863
|
-
title:
|
|
2864
|
-
"aria-label": `Theme: ${
|
|
2867
|
+
title: $[m],
|
|
2868
|
+
"aria-label": `Theme: ${$[m]} — switch to ${$[g]}`,
|
|
2865
2869
|
onClick: a ? void 0 : () => l(g),
|
|
2866
2870
|
style: {
|
|
2867
2871
|
...h,
|
|
@@ -2870,10 +2874,10 @@ function Ft({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
|
|
|
2870
2874
|
border: "1px solid rgba(148, 163, 184, 0.4)",
|
|
2871
2875
|
...C(n)
|
|
2872
2876
|
},
|
|
2873
|
-
children:
|
|
2877
|
+
children: Ft(m)
|
|
2874
2878
|
});
|
|
2875
2879
|
}
|
|
2876
|
-
function
|
|
2880
|
+
function Lt(e) {
|
|
2877
2881
|
let t = e?.parentElement;
|
|
2878
2882
|
for (; t && t !== document.body;) {
|
|
2879
2883
|
let e = getComputedStyle(t).overflowY;
|
|
@@ -2882,7 +2886,7 @@ function It(e) {
|
|
|
2882
2886
|
}
|
|
2883
2887
|
return window;
|
|
2884
2888
|
}
|
|
2885
|
-
var
|
|
2889
|
+
var Rt = (e) => e === window ? window.scrollY : e.scrollTop, zt = {
|
|
2886
2890
|
"bottom-right": (e) => ({
|
|
2887
2891
|
right: e,
|
|
2888
2892
|
bottom: e
|
|
@@ -2897,26 +2901,33 @@ var Lt = (e) => e === window ? window.scrollY : e.scrollTop, Rt = {
|
|
|
2897
2901
|
transform: "translateX(-50%)"
|
|
2898
2902
|
})
|
|
2899
2903
|
};
|
|
2900
|
-
function
|
|
2901
|
-
let [
|
|
2902
|
-
|
|
2904
|
+
function Bt({ variant: e, label: t, position: n, offset: r, showAfter: a, smooth: o, bg: s, fg: l, style: f, nodeRef: p, inert: m, frame: h, builder: g }) {
|
|
2905
|
+
let [_, v] = c(!!m), [y, b] = c(null), x = (e) => {
|
|
2906
|
+
b(e), typeof p == "function" && p(e);
|
|
2903
2907
|
};
|
|
2904
2908
|
i(() => {
|
|
2905
2909
|
if (m) {
|
|
2906
|
-
|
|
2910
|
+
v(!0);
|
|
2907
2911
|
return;
|
|
2908
2912
|
}
|
|
2909
|
-
if (!
|
|
2910
|
-
let e =
|
|
2911
|
-
|
|
2913
|
+
if (!y) return;
|
|
2914
|
+
let e = Number(a) >= 0 ? Number(a) : 300, t = () => {
|
|
2915
|
+
let t = Lt(y), n = g && !(t === window ? document.documentElement.scrollHeight > window.innerHeight : t.scrollHeight > t.clientHeight);
|
|
2916
|
+
v(n || Rt(t) > e);
|
|
2917
|
+
};
|
|
2918
|
+
return t(), document.addEventListener("scroll", t, {
|
|
2919
|
+
capture: !0,
|
|
2920
|
+
passive: !0
|
|
2921
|
+
}), () => document.removeEventListener("scroll", t, { capture: !0 });
|
|
2912
2922
|
}, [
|
|
2913
2923
|
m,
|
|
2914
|
-
|
|
2915
|
-
a
|
|
2924
|
+
y,
|
|
2925
|
+
a,
|
|
2926
|
+
g
|
|
2916
2927
|
]);
|
|
2917
|
-
let
|
|
2928
|
+
let S = () => {
|
|
2918
2929
|
if (m) return;
|
|
2919
|
-
let e =
|
|
2930
|
+
let e = Lt(y), t = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches, n = o === !1 || t ? "auto" : "smooth";
|
|
2920
2931
|
e === window ? window.scrollTo({
|
|
2921
2932
|
top: 0,
|
|
2922
2933
|
behavior: n
|
|
@@ -2924,53 +2935,53 @@ function zt({ variant: e, label: t, position: n, offset: r, showAfter: a, smooth
|
|
|
2924
2935
|
top: 0,
|
|
2925
2936
|
behavior: n
|
|
2926
2937
|
});
|
|
2927
|
-
},
|
|
2938
|
+
}, w = Number(r) >= 0 ? Number(r) : 24, T = e === "pill", E = t || "Top", D = zt[n] ? n : "bottom-right", O = h ? {
|
|
2928
2939
|
position: "fixed",
|
|
2929
2940
|
zIndex: 5,
|
|
2930
|
-
bottom: (h.bottom ?? 0) +
|
|
2931
|
-
...
|
|
2932
|
-
...
|
|
2933
|
-
...
|
|
2941
|
+
bottom: (h.bottom ?? 0) + w,
|
|
2942
|
+
...D === "bottom-left" ? { left: (h.left ?? 0) + w } : null,
|
|
2943
|
+
...D === "bottom-right" ? { right: (h.right ?? 0) + w } : null,
|
|
2944
|
+
...D === "bottom-center" ? {
|
|
2934
2945
|
left: (h.left ?? 0) + (h.width ?? 0) / 2,
|
|
2935
2946
|
transform: "translateX(-50%)"
|
|
2936
2947
|
} : null
|
|
2937
2948
|
} : {
|
|
2938
2949
|
position: "fixed",
|
|
2939
2950
|
zIndex: 2147482e3,
|
|
2940
|
-
...
|
|
2951
|
+
...zt[D](w)
|
|
2941
2952
|
};
|
|
2942
2953
|
return /* @__PURE__ */ d("button", {
|
|
2943
|
-
ref:
|
|
2954
|
+
ref: x,
|
|
2944
2955
|
type: "button",
|
|
2945
|
-
title:
|
|
2946
|
-
"aria-label":
|
|
2947
|
-
"aria-hidden": !
|
|
2948
|
-
tabIndex:
|
|
2949
|
-
onClick:
|
|
2956
|
+
title: E,
|
|
2957
|
+
"aria-label": E,
|
|
2958
|
+
"aria-hidden": !_,
|
|
2959
|
+
tabIndex: _ ? 0 : -1,
|
|
2960
|
+
onClick: S,
|
|
2950
2961
|
style: {
|
|
2951
2962
|
display: "inline-flex",
|
|
2952
2963
|
alignItems: "center",
|
|
2953
2964
|
justifyContent: "center",
|
|
2954
|
-
gap:
|
|
2965
|
+
gap: T ? 8 : 0,
|
|
2955
2966
|
appearance: "none",
|
|
2956
2967
|
font: "inherit",
|
|
2957
2968
|
fontSize: 14,
|
|
2958
2969
|
fontWeight: 600,
|
|
2959
|
-
width:
|
|
2970
|
+
width: T ? "auto" : 44,
|
|
2960
2971
|
height: 44,
|
|
2961
|
-
padding:
|
|
2972
|
+
padding: T ? "0 18px" : 0,
|
|
2962
2973
|
borderRadius: 999,
|
|
2963
2974
|
border: "1px solid transparent",
|
|
2964
2975
|
background: s || "var(--page-accent, #111827)",
|
|
2965
2976
|
color: l || "var(--page-accent-text, #ffffff)",
|
|
2966
2977
|
boxShadow: "0 6px 20px rgba(15, 23, 42, 0.25)",
|
|
2967
2978
|
cursor: m ? "default" : "pointer",
|
|
2968
|
-
opacity: +!!
|
|
2969
|
-
pointerEvents:
|
|
2979
|
+
opacity: +!!_,
|
|
2980
|
+
pointerEvents: _ ? "auto" : "none",
|
|
2970
2981
|
transition: "opacity 160ms ease, transform 160ms ease",
|
|
2971
|
-
...
|
|
2982
|
+
...O,
|
|
2972
2983
|
...C(f),
|
|
2973
|
-
...
|
|
2984
|
+
...O.transform ? { transform: O.transform } : null
|
|
2974
2985
|
},
|
|
2975
2986
|
children: [/* @__PURE__ */ u("svg", {
|
|
2976
2987
|
width: "18",
|
|
@@ -2985,10 +2996,10 @@ function zt({ variant: e, label: t, position: n, offset: r, showAfter: a, smooth
|
|
|
2985
2996
|
strokeLinecap: "round",
|
|
2986
2997
|
strokeLinejoin: "round"
|
|
2987
2998
|
})
|
|
2988
|
-
}),
|
|
2999
|
+
}), T ? /* @__PURE__ */ u("span", { children: E }) : null]
|
|
2989
3000
|
});
|
|
2990
3001
|
}
|
|
2991
|
-
var
|
|
3002
|
+
var Vt = {
|
|
2992
3003
|
facebook: {
|
|
2993
3004
|
label: "Facebook",
|
|
2994
3005
|
color: "#1877f2",
|
|
@@ -3055,8 +3066,8 @@ var Bt = {
|
|
|
3055
3066
|
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"
|
|
3056
3067
|
}
|
|
3057
3068
|
};
|
|
3058
|
-
function
|
|
3059
|
-
let l = Array.isArray(e) ? e.filter((e) => e &&
|
|
3069
|
+
function Ht({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, style: o, nodeRef: s, inert: c }) {
|
|
3070
|
+
let l = Array.isArray(e) ? e.filter((e) => e && Vt[e.network]) : [];
|
|
3060
3071
|
if (!l.length) return null;
|
|
3061
3072
|
let d = Math.min(Math.max(Number(r) || 18, 10), 64), f = Math.round(d * 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;
|
|
3062
3073
|
return /* @__PURE__ */ u("div", {
|
|
@@ -3069,7 +3080,7 @@ function Vt({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, s
|
|
|
3069
3080
|
...C(o)
|
|
3070
3081
|
},
|
|
3071
3082
|
children: l.map((e, r) => {
|
|
3072
|
-
let i =
|
|
3083
|
+
let i = Vt[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);
|
|
3073
3084
|
return /* @__PURE__ */ u("a", {
|
|
3074
3085
|
href: e.url || "#",
|
|
3075
3086
|
onClick: h,
|
|
@@ -3103,7 +3114,7 @@ function Vt({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, s
|
|
|
3103
3114
|
})
|
|
3104
3115
|
});
|
|
3105
3116
|
}
|
|
3106
|
-
function
|
|
3117
|
+
function Ut({ steps: t = [], active: n = 1, vertical: r = !1, style: i, nodeRef: a }) {
|
|
3107
3118
|
if (!t.length) return null;
|
|
3108
3119
|
let o = Math.min(Math.max(Number(n) || 1, 1), t.length), s = (e) => ({
|
|
3109
3120
|
width: 32,
|
|
@@ -3181,7 +3192,7 @@ function Ht({ steps: t = [], active: n = 1, vertical: r = !1, style: i, nodeRef:
|
|
|
3181
3192
|
})
|
|
3182
3193
|
});
|
|
3183
3194
|
}
|
|
3184
|
-
var
|
|
3195
|
+
var Wt = {
|
|
3185
3196
|
small: {
|
|
3186
3197
|
w: 132,
|
|
3187
3198
|
h: 46,
|
|
@@ -3203,10 +3214,10 @@ var Ut = {
|
|
|
3203
3214
|
title: 12.5,
|
|
3204
3215
|
avatar: 46
|
|
3205
3216
|
}
|
|
3206
|
-
},
|
|
3207
|
-
|
|
3208
|
-
function
|
|
3209
|
-
let r =
|
|
3217
|
+
}, Gt = (e) => Wt[e] ?? Wt.medium;
|
|
3218
|
+
Wt.medium.w, Wt.medium.h;
|
|
3219
|
+
function Kt(e, { size: t = "medium", horizontal: n = !1 } = {}) {
|
|
3220
|
+
let r = Gt(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 = [];
|
|
3210
3221
|
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);
|
|
3211
3222
|
let d = /* @__PURE__ */ new Map(), f = (e, t) => {
|
|
3212
3223
|
if (t.has(e.id)) return 0;
|
|
@@ -3258,19 +3269,19 @@ function Gt(e, { size: t = "medium", horizontal: n = !1 } = {}) {
|
|
|
3258
3269
|
horizontal: n
|
|
3259
3270
|
};
|
|
3260
3271
|
}
|
|
3261
|
-
var
|
|
3272
|
+
var qt = (e, t) => {
|
|
3262
3273
|
let n = String(e ?? "");
|
|
3263
3274
|
return n.length > t ? `${n.slice(0, t - 1)}…` : n;
|
|
3264
|
-
},
|
|
3275
|
+
}, Jt = (e) => {
|
|
3265
3276
|
let t = /^#([0-9a-f]{6}|[0-9a-f]{3})$/i.exec(String(e ?? "").trim());
|
|
3266
3277
|
if (!t) return "#ffffff";
|
|
3267
3278
|
let n = t[1];
|
|
3268
3279
|
n.length === 3 && (n = [...n].map((e) => e + e).join(""));
|
|
3269
3280
|
let r = parseInt(n, 16);
|
|
3270
3281
|
return .299 * (r >> 16 & 255) + .587 * (r >> 8 & 255) + .114 * (r & 255) > 150 ? "#111827" : "#ffffff";
|
|
3271
|
-
},
|
|
3272
|
-
function
|
|
3273
|
-
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 ? "" :
|
|
3282
|
+
}, Yt = (e) => !!(e?.cv?.trim?.() || e?.photo);
|
|
3283
|
+
function Xt(e, t = {}) {
|
|
3284
|
+
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 ? "" : K(e);
|
|
3274
3285
|
return n.map((e) => {
|
|
3275
3286
|
let n = e.data ?? {}, a = r(n[t.parentField]), o = a && typeof a == "object" ? a.id ?? null : a || null;
|
|
3276
3287
|
return {
|
|
@@ -3284,11 +3295,11 @@ function Yt(e, t = {}) {
|
|
|
3284
3295
|
};
|
|
3285
3296
|
});
|
|
3286
3297
|
}
|
|
3287
|
-
var
|
|
3298
|
+
var Zt = {
|
|
3288
3299
|
size: 36,
|
|
3289
3300
|
pad: 10
|
|
3290
3301
|
};
|
|
3291
|
-
function
|
|
3302
|
+
function Qt({ node: e, onClose: t }) {
|
|
3292
3303
|
return i(() => {
|
|
3293
3304
|
let e = (e) => e.key === "Escape" && t();
|
|
3294
3305
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
@@ -3409,8 +3420,8 @@ function Zt({ node: e, onClose: t }) {
|
|
|
3409
3420
|
})
|
|
3410
3421
|
});
|
|
3411
3422
|
}
|
|
3412
|
-
function
|
|
3413
|
-
let b = a(), [x, S] = c(null), { tenant: w, apiUrl: T } = r(
|
|
3423
|
+
function $t({ nodes: e = [], source: t, nameField: n, titleField: o, photoField: s, parentField: f, cvField: p, hrefField: m, size: h = "medium", horizontal: g = !1, style: _, nodeRef: v, interactive: y = !0 }) {
|
|
3424
|
+
let b = a(), [x, S] = c(null), { tenant: w, apiUrl: T } = r(H), E = r(U)?.[t], [D, O] = c(null);
|
|
3414
3425
|
i(() => {
|
|
3415
3426
|
if (!t || E) return;
|
|
3416
3427
|
let e = !0;
|
|
@@ -3426,14 +3437,14 @@ function Qt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
3426
3437
|
T,
|
|
3427
3438
|
E
|
|
3428
3439
|
]);
|
|
3429
|
-
let k = t ?
|
|
3440
|
+
let k = t ? Xt(E ?? D ?? [], {
|
|
3430
3441
|
nameField: n,
|
|
3431
3442
|
titleField: o,
|
|
3432
3443
|
photoField: s,
|
|
3433
3444
|
parentField: f,
|
|
3434
3445
|
cvField: p,
|
|
3435
3446
|
hrefField: m
|
|
3436
|
-
}) : e, A =
|
|
3447
|
+
}) : e, A = Gt(h), { boxes: j, links: M, width: N, height: P } = Kt(k, {
|
|
3437
3448
|
size: h,
|
|
3438
3449
|
horizontal: g
|
|
3439
3450
|
});
|
|
@@ -3479,7 +3490,7 @@ function Qt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
3479
3490
|
stroke: "rgba(148, 163, 184, 0.7)",
|
|
3480
3491
|
strokeWidth: "1.5"
|
|
3481
3492
|
}, t)), j.map(({ node: e, x: t, y: n }) => {
|
|
3482
|
-
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 ?
|
|
3493
|
+
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 ? Jt(e.color) : r ? "var(--page-accent-text, #ffffff)" : "var(--page-text, #111827)", c = i ? Jt(e.color2) : s, f = y && (Yt(e) || e.href), p = () => Yt(e) ? S(e) : window.open(e.href, "_blank", "noreferrer"), m = e.photo ? t + Zt.pad + A.avatar + 8 : t + A.w / 2, h = e.photo ? "start" : "middle", g = e.photo ? Math.floor((A.w - A.avatar - 26) / 7) : Math.floor(A.w / 7.6), _ = A.h / 2, v = [e.name, e.title].map((e) => String(e ?? "").trim()).filter(Boolean);
|
|
3483
3494
|
return /* @__PURE__ */ d("g", {
|
|
3484
3495
|
onClick: f ? p : void 0,
|
|
3485
3496
|
style: f ? { cursor: "pointer" } : void 0,
|
|
@@ -3543,13 +3554,13 @@ function Qt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
3543
3554
|
e.photo && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("clipPath", {
|
|
3544
3555
|
id: `${b}-${e.id}`,
|
|
3545
3556
|
children: /* @__PURE__ */ u("circle", {
|
|
3546
|
-
cx: t +
|
|
3557
|
+
cx: t + Zt.pad + A.avatar / 2,
|
|
3547
3558
|
cy: n + A.h / 2,
|
|
3548
3559
|
r: A.avatar / 2
|
|
3549
3560
|
})
|
|
3550
3561
|
}), /* @__PURE__ */ u("image", {
|
|
3551
3562
|
href: e.photo,
|
|
3552
|
-
x: t +
|
|
3563
|
+
x: t + Zt.pad,
|
|
3553
3564
|
y: n + (A.h - A.avatar) / 2,
|
|
3554
3565
|
width: A.avatar,
|
|
3555
3566
|
height: A.avatar,
|
|
@@ -3563,7 +3574,7 @@ function Qt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
3563
3574
|
fontSize: A.title,
|
|
3564
3575
|
fontWeight: "600",
|
|
3565
3576
|
fill: s,
|
|
3566
|
-
children:
|
|
3577
|
+
children: qt(e.title, g + 4)
|
|
3567
3578
|
}), e.name && /* @__PURE__ */ u("text", {
|
|
3568
3579
|
x: m,
|
|
3569
3580
|
y: n + _ + _ / 2 + A.name * .35,
|
|
@@ -3571,7 +3582,7 @@ function Qt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
3571
3582
|
fontSize: A.name,
|
|
3572
3583
|
fontWeight: "600",
|
|
3573
3584
|
fill: c,
|
|
3574
|
-
children:
|
|
3585
|
+
children: qt(e.name, g)
|
|
3575
3586
|
})] }) : /* @__PURE__ */ d(l, { children: [v[0] && /* @__PURE__ */ u("text", {
|
|
3576
3587
|
x: m,
|
|
3577
3588
|
y: n + (v[1] ? A.h * .43 : A.h * .57),
|
|
@@ -3579,7 +3590,7 @@ function Qt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
3579
3590
|
fontSize: A.name,
|
|
3580
3591
|
fontWeight: "600",
|
|
3581
3592
|
fill: s,
|
|
3582
|
-
children:
|
|
3593
|
+
children: qt(v[0], g)
|
|
3583
3594
|
}), v[1] && /* @__PURE__ */ u("text", {
|
|
3584
3595
|
x: m,
|
|
3585
3596
|
y: n + A.h * .73,
|
|
@@ -3587,19 +3598,19 @@ function Qt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
3587
3598
|
fontSize: A.title,
|
|
3588
3599
|
opacity: "0.7",
|
|
3589
3600
|
fill: s,
|
|
3590
|
-
children:
|
|
3601
|
+
children: qt(v[1], g + 4)
|
|
3591
3602
|
})] })
|
|
3592
3603
|
]
|
|
3593
3604
|
}, e.id);
|
|
3594
3605
|
})]
|
|
3595
|
-
}), x && /* @__PURE__ */ u(
|
|
3606
|
+
}), x && /* @__PURE__ */ u(Qt, {
|
|
3596
3607
|
node: x,
|
|
3597
3608
|
onClose: () => S(null)
|
|
3598
3609
|
})]
|
|
3599
3610
|
});
|
|
3600
3611
|
}
|
|
3601
|
-
function
|
|
3602
|
-
let { tenant: g, apiUrl: _ } = r(
|
|
3612
|
+
function en({ columns: e = [], rows: t = [], source: n, limit: a = 10, striped: o = !0, bordered: s = !1, compact: l = !1, paged: f, emptyText: p, style: m, nodeRef: h }) {
|
|
3613
|
+
let { tenant: g, apiUrl: _ } = r(H), v = r(U), y = v?.[n], b = f ? W(v) : 1, [x, S] = c(null);
|
|
3603
3614
|
if (i(() => {
|
|
3604
3615
|
if (!n || y) return;
|
|
3605
3616
|
let e = !0, t = Math.max(1, Number(a) || 10), r = f && !n.startsWith("api:") ? `?offset=${(b - 1) * t}&limit=${t}` : "", i = n.startsWith("api:") ? `${_}/data/${encodeURIComponent(n.slice(4))}` : `${_}/dynamic/${encodeURIComponent(n)}${r}`;
|
|
@@ -3618,7 +3629,7 @@ function $t({ columns: e = [], rows: t = [], source: n, limit: a = 10, striped:
|
|
|
3618
3629
|
b,
|
|
3619
3630
|
a
|
|
3620
3631
|
]), !e.length) return null;
|
|
3621
|
-
let w = Math.max(1, Number(a) || 10), T = n ? f ? y || n.startsWith("api:") ? (y ?? x ?? []).slice((b - 1) * w, b * w) : (x ?? []).slice(0, w) : (y ?? x ?? []).slice(0, w) : null, E = T ? T.map((t) => e.map((e) =>
|
|
3632
|
+
let w = Math.max(1, Number(a) || 10), T = n ? f ? y || n.startsWith("api:") ? (y ?? x ?? []).slice((b - 1) * w, b * w) : (x ?? []).slice(0, w) : (y ?? x ?? []).slice(0, w) : null, E = T ? T.map((t) => e.map((e) => K(G(t?.data, e.field)))) : t, D = !!n && !(n && !y && x === null) && E.length === 0, O = l ? "6px 10px" : "10px 14px", k = "1px solid rgba(148, 163, 184, 0.35)", A = s ? { border: k } : { borderBottom: k };
|
|
3622
3633
|
return /* @__PURE__ */ u("div", {
|
|
3623
3634
|
ref: h,
|
|
3624
3635
|
style: {
|
|
@@ -3664,80 +3675,80 @@ function $t({ columns: e = [], rows: t = [], source: n, limit: a = 10, striped:
|
|
|
3664
3675
|
})
|
|
3665
3676
|
});
|
|
3666
3677
|
}
|
|
3667
|
-
var
|
|
3668
|
-
PageRoot:
|
|
3669
|
-
Section:
|
|
3670
|
-
Container:
|
|
3671
|
-
Heading:
|
|
3672
|
-
TextBlock:
|
|
3673
|
-
ButtonBlock:
|
|
3674
|
-
ImageBlock:
|
|
3675
|
-
Spacer:
|
|
3676
|
-
Divider:
|
|
3677
|
-
SliderBlock:
|
|
3678
|
-
CanvasSlider:
|
|
3679
|
-
TabsBlock:
|
|
3680
|
-
QuickStack:
|
|
3681
|
-
CollectionList:
|
|
3682
|
-
CollectionSearch:
|
|
3683
|
-
BreadcrumbsBlock:
|
|
3684
|
-
PaginationBlock:
|
|
3685
|
-
StepperBlock:
|
|
3686
|
-
SocialLinksBlock:
|
|
3687
|
-
ThemeModeBlock:
|
|
3688
|
-
ScrollTopBlock:
|
|
3689
|
-
OrgChartBlock:
|
|
3690
|
-
TableBlock:
|
|
3691
|
-
MasonryBlock:
|
|
3692
|
-
AccordionBlock:
|
|
3693
|
-
NavbarBlock:
|
|
3694
|
-
ListBlock:
|
|
3695
|
-
TextSpan:
|
|
3696
|
-
QuoteBlock:
|
|
3697
|
-
TextLink:
|
|
3698
|
-
RichTextBlock:
|
|
3699
|
-
RichContentBlock:
|
|
3700
|
-
VideoBlock:
|
|
3701
|
-
YouTubeBlock:
|
|
3702
|
-
IframeBlock:
|
|
3703
|
-
EmbedBlock:
|
|
3704
|
-
FormBlock:
|
|
3705
|
-
FormLabel:
|
|
3706
|
-
FormInput:
|
|
3707
|
-
FormTextarea:
|
|
3708
|
-
FormCheckbox: (e) => /* @__PURE__ */ u(
|
|
3678
|
+
var tn = {
|
|
3679
|
+
PageRoot: Te,
|
|
3680
|
+
Section: Ee,
|
|
3681
|
+
Container: De,
|
|
3682
|
+
Heading: Oe,
|
|
3683
|
+
TextBlock: ze,
|
|
3684
|
+
ButtonBlock: He,
|
|
3685
|
+
ImageBlock: Ue,
|
|
3686
|
+
Spacer: Ye,
|
|
3687
|
+
Divider: Xe,
|
|
3688
|
+
SliderBlock: nt,
|
|
3689
|
+
CanvasSlider: rt,
|
|
3690
|
+
TabsBlock: ct,
|
|
3691
|
+
QuickStack: Ot,
|
|
3692
|
+
CollectionList: kt,
|
|
3693
|
+
CollectionSearch: At,
|
|
3694
|
+
BreadcrumbsBlock: jt,
|
|
3695
|
+
PaginationBlock: Mt,
|
|
3696
|
+
StepperBlock: Ut,
|
|
3697
|
+
SocialLinksBlock: Ht,
|
|
3698
|
+
ThemeModeBlock: It,
|
|
3699
|
+
ScrollTopBlock: Bt,
|
|
3700
|
+
OrgChartBlock: $t,
|
|
3701
|
+
TableBlock: en,
|
|
3702
|
+
MasonryBlock: it,
|
|
3703
|
+
AccordionBlock: lt,
|
|
3704
|
+
NavbarBlock: st,
|
|
3705
|
+
ListBlock: Re,
|
|
3706
|
+
TextSpan: je,
|
|
3707
|
+
QuoteBlock: Le,
|
|
3708
|
+
TextLink: Ve,
|
|
3709
|
+
RichTextBlock: Fe,
|
|
3710
|
+
RichContentBlock: Fe,
|
|
3711
|
+
VideoBlock: We,
|
|
3712
|
+
YouTubeBlock: Ke,
|
|
3713
|
+
IframeBlock: qe,
|
|
3714
|
+
EmbedBlock: Je,
|
|
3715
|
+
FormBlock: _t,
|
|
3716
|
+
FormLabel: xt,
|
|
3717
|
+
FormInput: St,
|
|
3718
|
+
FormTextarea: Ct,
|
|
3719
|
+
FormCheckbox: (e) => /* @__PURE__ */ u(wt, {
|
|
3709
3720
|
kind: "checkbox",
|
|
3710
3721
|
...e
|
|
3711
3722
|
}),
|
|
3712
|
-
FormRadio: (e) => /* @__PURE__ */ u(
|
|
3723
|
+
FormRadio: (e) => /* @__PURE__ */ u(wt, {
|
|
3713
3724
|
kind: "radio",
|
|
3714
3725
|
...e
|
|
3715
3726
|
}),
|
|
3716
|
-
FormSelect:
|
|
3717
|
-
FormFile:
|
|
3718
|
-
FormRecaptcha:
|
|
3719
|
-
FormSubmit:
|
|
3720
|
-
},
|
|
3727
|
+
FormSelect: Tt,
|
|
3728
|
+
FormFile: Et,
|
|
3729
|
+
FormRecaptcha: bt,
|
|
3730
|
+
FormSubmit: Dt
|
|
3731
|
+
}, nn = {
|
|
3721
3732
|
id: "auth",
|
|
3722
3733
|
label: "Accounts",
|
|
3723
3734
|
category: "Apps",
|
|
3724
3735
|
keys: ["SiteLoginForm", "SiteAccountMenu"],
|
|
3725
3736
|
ssr: "shell",
|
|
3726
3737
|
settings: ["site.authRedirect"]
|
|
3727
|
-
},
|
|
3738
|
+
}, rn = t({
|
|
3728
3739
|
user: null,
|
|
3729
3740
|
status: "idle",
|
|
3730
3741
|
ensure: () => {},
|
|
3731
3742
|
refresh: () => {},
|
|
3732
3743
|
signOut: () => {}
|
|
3733
|
-
}),
|
|
3734
|
-
let e = r(
|
|
3744
|
+
}), an = () => {
|
|
3745
|
+
let e = r(rn);
|
|
3735
3746
|
return i(() => {
|
|
3736
3747
|
e.ensure();
|
|
3737
3748
|
}, [e]), e;
|
|
3738
3749
|
};
|
|
3739
|
-
function
|
|
3740
|
-
let d = r(
|
|
3750
|
+
function on({ children: e, initialUser: t, disabled: i, apiUrl: a, tenant: l }) {
|
|
3751
|
+
let d = r(H), f = a || d?.apiUrl || "/api", p = l || d?.tenant || "", [m, h] = c(t ?? null), [g, _] = c(t ? "user" : i ? "guest" : "idle"), v = s(!1), y = n((e, t) => fetch(`${f}${e}`, {
|
|
3741
3752
|
...t,
|
|
3742
3753
|
credentials: "include",
|
|
3743
3754
|
headers: {
|
|
@@ -3769,19 +3780,19 @@ function an({ children: e, initialUser: t, disabled: i, apiUrl: a, tenant: l })
|
|
|
3769
3780
|
b,
|
|
3770
3781
|
x
|
|
3771
3782
|
]);
|
|
3772
|
-
return /* @__PURE__ */ u(
|
|
3783
|
+
return /* @__PURE__ */ u(rn.Provider, {
|
|
3773
3784
|
value: C,
|
|
3774
3785
|
children: e
|
|
3775
3786
|
});
|
|
3776
3787
|
}
|
|
3777
|
-
function
|
|
3778
|
-
let { status: n } =
|
|
3788
|
+
function sn({ when: e, children: t }) {
|
|
3789
|
+
let { status: n } = an();
|
|
3779
3790
|
return !e || e === "always" ? t : n === "idle" || n === "loading" ? null : e === "user" == (n === "user") ? t : null;
|
|
3780
3791
|
}
|
|
3781
3792
|
//#endregion
|
|
3782
3793
|
//#region ../ui/src/components/builder/apps/auth/views.jsx
|
|
3783
|
-
function
|
|
3784
|
-
let { tenant: h, apiUrl: g, settings: _ } = r(
|
|
3794
|
+
function cn({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordLabel: i = "Password", nameLabel: a = "Name", submitLabel: o, style: s, nodeRef: l, inert: f, linked: p, show: m }) {
|
|
3795
|
+
let { tenant: h, apiUrl: g, settings: _ } = r(H), [v, y] = c("form"), [b, x] = c(""), [S, w] = c(!1), T = e === "register", E = f ? m || "form" : v, D = (e) => typeof e == "string" && e.startsWith("/") && !e.startsWith("//") ? e : "", O = async (e) => {
|
|
3785
3796
|
if (e.preventDefault(), f) return;
|
|
3786
3797
|
let n = new FormData(e.currentTarget);
|
|
3787
3798
|
w(!0), x("");
|
|
@@ -3829,20 +3840,20 @@ function sn({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
3829
3840
|
children: [
|
|
3830
3841
|
T ? /* @__PURE__ */ d("label", {
|
|
3831
3842
|
style: {
|
|
3832
|
-
...
|
|
3843
|
+
...Y,
|
|
3833
3844
|
display: "grid",
|
|
3834
3845
|
gap: 6
|
|
3835
3846
|
},
|
|
3836
3847
|
children: [a, /* @__PURE__ */ u("input", {
|
|
3837
3848
|
name: "name",
|
|
3838
3849
|
type: "text",
|
|
3839
|
-
style:
|
|
3840
|
-
...
|
|
3850
|
+
style: X,
|
|
3851
|
+
...Z(f)
|
|
3841
3852
|
})]
|
|
3842
3853
|
}) : null,
|
|
3843
3854
|
/* @__PURE__ */ d("label", {
|
|
3844
3855
|
style: {
|
|
3845
|
-
...
|
|
3856
|
+
...Y,
|
|
3846
3857
|
display: "grid",
|
|
3847
3858
|
gap: 6
|
|
3848
3859
|
},
|
|
@@ -3850,13 +3861,13 @@ function sn({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
3850
3861
|
name: "email",
|
|
3851
3862
|
type: "email",
|
|
3852
3863
|
required: !f,
|
|
3853
|
-
style:
|
|
3854
|
-
...
|
|
3864
|
+
style: X,
|
|
3865
|
+
...Z(f)
|
|
3855
3866
|
})]
|
|
3856
3867
|
}),
|
|
3857
3868
|
/* @__PURE__ */ d("label", {
|
|
3858
3869
|
style: {
|
|
3859
|
-
...
|
|
3870
|
+
...Y,
|
|
3860
3871
|
display: "grid",
|
|
3861
3872
|
gap: 6
|
|
3862
3873
|
},
|
|
@@ -3864,15 +3875,15 @@ function sn({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
3864
3875
|
name: "password",
|
|
3865
3876
|
type: "password",
|
|
3866
3877
|
required: !f,
|
|
3867
|
-
style:
|
|
3868
|
-
...
|
|
3878
|
+
style: X,
|
|
3879
|
+
...Z(f)
|
|
3869
3880
|
})]
|
|
3870
3881
|
}),
|
|
3871
3882
|
/* @__PURE__ */ u("button", {
|
|
3872
3883
|
type: f ? "button" : "submit",
|
|
3873
3884
|
disabled: S || void 0,
|
|
3874
3885
|
style: {
|
|
3875
|
-
...
|
|
3886
|
+
...q,
|
|
3876
3887
|
border: 0,
|
|
3877
3888
|
padding: "10px 22px",
|
|
3878
3889
|
borderRadius: 8,
|
|
@@ -3904,8 +3915,8 @@ function sn({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
3904
3915
|
]
|
|
3905
3916
|
});
|
|
3906
3917
|
}
|
|
3907
|
-
function
|
|
3908
|
-
let { user: c, status: l, signOut: f } =
|
|
3918
|
+
function ln({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !1, style: r, nodeRef: i, inert: a, linked: o, show: s }) {
|
|
3919
|
+
let { user: c, status: l, signOut: f } = an(), p = a ? s || "user" : l, m = a ? {
|
|
3909
3920
|
name: "Ada Lovelace",
|
|
3910
3921
|
email: "ada@example.com"
|
|
3911
3922
|
} : c;
|
|
@@ -3926,7 +3937,7 @@ function cn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
3926
3937
|
children: [
|
|
3927
3938
|
/* @__PURE__ */ d("span", {
|
|
3928
3939
|
style: {
|
|
3929
|
-
...
|
|
3940
|
+
...Y,
|
|
3930
3941
|
fontWeight: 600
|
|
3931
3942
|
},
|
|
3932
3943
|
children: [
|
|
@@ -3937,7 +3948,7 @@ function cn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
3937
3948
|
}),
|
|
3938
3949
|
n && m?.email ? /* @__PURE__ */ u("span", {
|
|
3939
3950
|
style: {
|
|
3940
|
-
...
|
|
3951
|
+
...Y,
|
|
3941
3952
|
opacity: .7
|
|
3942
3953
|
},
|
|
3943
3954
|
children: m.email
|
|
@@ -3946,14 +3957,14 @@ function cn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
3946
3957
|
type: "button",
|
|
3947
3958
|
onClick: a ? void 0 : f,
|
|
3948
3959
|
style: {
|
|
3949
|
-
...
|
|
3960
|
+
...q,
|
|
3950
3961
|
border: 0,
|
|
3951
3962
|
padding: "8px 16px",
|
|
3952
3963
|
borderRadius: 8,
|
|
3953
3964
|
fontSize: 14,
|
|
3954
3965
|
cursor: a ? "default" : "pointer"
|
|
3955
3966
|
},
|
|
3956
|
-
...
|
|
3967
|
+
...Z(a),
|
|
3957
3968
|
children: t
|
|
3958
3969
|
})
|
|
3959
3970
|
]
|
|
@@ -3970,40 +3981,40 @@ function cn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
3970
3981
|
}
|
|
3971
3982
|
//#endregion
|
|
3972
3983
|
//#region ../ui/src/components/builder/apps/consent/manifest.js
|
|
3973
|
-
var
|
|
3984
|
+
var un = {
|
|
3974
3985
|
id: "consent",
|
|
3975
3986
|
label: "Cookie consent",
|
|
3976
3987
|
category: "Apps",
|
|
3977
3988
|
keys: ["CookieConsent"],
|
|
3978
3989
|
ssr: "shell",
|
|
3979
3990
|
settings: []
|
|
3980
|
-
},
|
|
3981
|
-
function
|
|
3991
|
+
}, dn = "webim.cookie_consent";
|
|
3992
|
+
function fn() {
|
|
3982
3993
|
try {
|
|
3983
|
-
let e = window.localStorage.getItem(
|
|
3994
|
+
let e = window.localStorage.getItem(dn), t = e ? JSON.parse(e) : null;
|
|
3984
3995
|
return t?.choice === "accepted" || t?.choice === "declined" ? t.choice : "";
|
|
3985
3996
|
} catch {
|
|
3986
3997
|
return "";
|
|
3987
3998
|
}
|
|
3988
3999
|
}
|
|
3989
|
-
function
|
|
4000
|
+
function pn(e) {
|
|
3990
4001
|
try {
|
|
3991
4002
|
document.querySelectorAll(".webim-page").forEach((t) => t.setAttribute("data-webim-consent", e));
|
|
3992
4003
|
} catch {}
|
|
3993
4004
|
}
|
|
3994
|
-
function
|
|
4005
|
+
function mn(e) {
|
|
3995
4006
|
try {
|
|
3996
|
-
window.localStorage.setItem(
|
|
4007
|
+
window.localStorage.setItem(dn, JSON.stringify({
|
|
3997
4008
|
choice: e,
|
|
3998
4009
|
at: (/* @__PURE__ */ new Date()).toISOString()
|
|
3999
4010
|
}));
|
|
4000
4011
|
} catch {}
|
|
4001
|
-
|
|
4012
|
+
pn(e);
|
|
4002
4013
|
try {
|
|
4003
4014
|
window.dispatchEvent(new CustomEvent("webim:consent", { detail: { choice: e } }));
|
|
4004
4015
|
} catch {}
|
|
4005
4016
|
}
|
|
4006
|
-
var
|
|
4017
|
+
var hn = {
|
|
4007
4018
|
bottom: {
|
|
4008
4019
|
left: 0,
|
|
4009
4020
|
right: 0,
|
|
@@ -4025,21 +4036,21 @@ var mn = {
|
|
|
4025
4036
|
maxWidth: 400
|
|
4026
4037
|
}
|
|
4027
4038
|
};
|
|
4028
|
-
function
|
|
4039
|
+
function gn({ message: e, acceptLabel: t, rejectLabel: n, showReject: r, linkLabel: a, linkHref: o, position: s, linked: f, style: p, nodeRef: m, inert: h }) {
|
|
4029
4040
|
let [g, _] = c(!!h), [v, y] = c(null), b = (e) => {
|
|
4030
4041
|
y(e), typeof m == "function" && m(e);
|
|
4031
4042
|
};
|
|
4032
4043
|
if (i(() => {
|
|
4033
4044
|
if (h) return;
|
|
4034
|
-
let e =
|
|
4045
|
+
let e = fn();
|
|
4035
4046
|
if (e) {
|
|
4036
4047
|
let t = v?.closest?.(".webim-page");
|
|
4037
4048
|
t && t.setAttribute("data-webim-consent", e);
|
|
4038
4049
|
} else _(!0);
|
|
4039
4050
|
}, [h, v]), !g) return null;
|
|
4040
4051
|
let x = (e) => () => {
|
|
4041
|
-
h || (
|
|
4042
|
-
}, S =
|
|
4052
|
+
h || (mn(e, v), _(!1));
|
|
4053
|
+
}, S = hn[s] ?? hn.bottom, w = {
|
|
4043
4054
|
appearance: "none",
|
|
4044
4055
|
font: "inherit",
|
|
4045
4056
|
fontSize: 14,
|
|
@@ -4119,7 +4130,7 @@ function hn({ message: e, acceptLabel: t, rejectLabel: n, showReject: r, linkLab
|
|
|
4119
4130
|
}
|
|
4120
4131
|
//#endregion
|
|
4121
4132
|
//#region ../ui/src/components/builder/apps/language/manifest.js
|
|
4122
|
-
var
|
|
4133
|
+
var _n = {
|
|
4123
4134
|
id: "language",
|
|
4124
4135
|
label: "Language",
|
|
4125
4136
|
category: "Apps",
|
|
@@ -4129,21 +4140,21 @@ var gn = {
|
|
|
4129
4140
|
};
|
|
4130
4141
|
//#endregion
|
|
4131
4142
|
//#region ../ui/src/components/builder/apps/language/views.jsx
|
|
4132
|
-
function
|
|
4143
|
+
function vn(e) {
|
|
4133
4144
|
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());
|
|
4134
4145
|
return [...new Set(n.map((e) => e.trim()))];
|
|
4135
4146
|
}
|
|
4136
|
-
var
|
|
4137
|
-
function
|
|
4147
|
+
var yn = (e) => e && e.charAt(0).toUpperCase() + e.slice(1);
|
|
4148
|
+
function bn(e, t) {
|
|
4138
4149
|
let n = String(e ?? "").toUpperCase();
|
|
4139
4150
|
if (t === "code") return n;
|
|
4140
4151
|
let r = "";
|
|
4141
4152
|
try {
|
|
4142
|
-
r =
|
|
4153
|
+
r = yn(new Intl.DisplayNames([e], { type: "language" }).of(e) ?? "");
|
|
4143
4154
|
} catch {}
|
|
4144
4155
|
return !r || r.toUpperCase() === n ? n : t === "both" ? `${n} — ${r}` : r;
|
|
4145
4156
|
}
|
|
4146
|
-
function
|
|
4157
|
+
function xn(e, t) {
|
|
4147
4158
|
let n = t ? "" : `?locale=${encodeURIComponent(e)}`;
|
|
4148
4159
|
if (typeof window > "u") return n || "?";
|
|
4149
4160
|
try {
|
|
@@ -4153,8 +4164,8 @@ function bn(e, t) {
|
|
|
4153
4164
|
return n || "/";
|
|
4154
4165
|
}
|
|
4155
4166
|
}
|
|
4156
|
-
function
|
|
4157
|
-
let c = r(
|
|
4167
|
+
function Sn({ variant: e, display: t, separator: n, label: i, style: a, nodeRef: o, inert: s }) {
|
|
4168
|
+
let c = r(H), l = vn(c?.settings), f = l[0] ?? "", p = l.includes(c?.locale) ? c.locale : f, m = {
|
|
4158
4169
|
display: "inline-flex",
|
|
4159
4170
|
alignItems: "center",
|
|
4160
4171
|
gap: 8,
|
|
@@ -4189,7 +4200,7 @@ function xn({ variant: e, display: t, separator: n, label: i, style: a, nodeRef:
|
|
|
4189
4200
|
style: { opacity: .4 },
|
|
4190
4201
|
children: n ?? "·"
|
|
4191
4202
|
}), /* @__PURE__ */ u("a", {
|
|
4192
|
-
href:
|
|
4203
|
+
href: xn(e, e === f),
|
|
4193
4204
|
hrefLang: e,
|
|
4194
4205
|
"aria-current": e === p ? "true" : void 0,
|
|
4195
4206
|
onClick: s ? (e) => e.preventDefault() : void 0,
|
|
@@ -4199,7 +4210,7 @@ function xn({ variant: e, display: t, separator: n, label: i, style: a, nodeRef:
|
|
|
4199
4210
|
textDecoration: "none",
|
|
4200
4211
|
cursor: s ? "default" : "pointer"
|
|
4201
4212
|
},
|
|
4202
|
-
children:
|
|
4213
|
+
children: bn(e, t)
|
|
4203
4214
|
})]
|
|
4204
4215
|
}, e))]
|
|
4205
4216
|
}) : /* @__PURE__ */ d("div", {
|
|
@@ -4210,7 +4221,7 @@ function xn({ variant: e, display: t, separator: n, label: i, style: a, nodeRef:
|
|
|
4210
4221
|
value: p,
|
|
4211
4222
|
onChange: s ? void 0 : (e) => {
|
|
4212
4223
|
let t = e.target.value;
|
|
4213
|
-
window.location.assign(
|
|
4224
|
+
window.location.assign(xn(t, t === f));
|
|
4214
4225
|
},
|
|
4215
4226
|
onKeyDown: s ? (e) => e.preventDefault() : void 0,
|
|
4216
4227
|
style: {
|
|
@@ -4224,55 +4235,55 @@ function xn({ variant: e, display: t, separator: n, label: i, style: a, nodeRef:
|
|
|
4224
4235
|
},
|
|
4225
4236
|
children: l.map((e) => /* @__PURE__ */ u("option", {
|
|
4226
4237
|
value: e,
|
|
4227
|
-
children:
|
|
4238
|
+
children: bn(e, t)
|
|
4228
4239
|
}, e))
|
|
4229
4240
|
})]
|
|
4230
4241
|
});
|
|
4231
4242
|
}
|
|
4232
4243
|
//#endregion
|
|
4233
4244
|
//#region ../ui/src/components/builder/apps/index.js
|
|
4234
|
-
var
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
],
|
|
4239
|
-
SiteLoginForm:
|
|
4240
|
-
SiteAccountMenu:
|
|
4241
|
-
SiteLanguagePicker:
|
|
4242
|
-
CookieConsent:
|
|
4245
|
+
var Cn = [
|
|
4246
|
+
nn,
|
|
4247
|
+
_n,
|
|
4248
|
+
un
|
|
4249
|
+
], wn = {
|
|
4250
|
+
SiteLoginForm: cn,
|
|
4251
|
+
SiteAccountMenu: ln,
|
|
4252
|
+
SiteLanguagePicker: Sn,
|
|
4253
|
+
CookieConsent: gn
|
|
4243
4254
|
};
|
|
4244
|
-
new Set(
|
|
4255
|
+
new Set(Cn.filter((e) => e.ssr === "shell").flatMap((e) => e.keys));
|
|
4245
4256
|
//#endregion
|
|
4246
4257
|
//#region ../ui/src/components/builder/plugins/runtime.js
|
|
4247
|
-
var
|
|
4248
|
-
function
|
|
4249
|
-
if (
|
|
4258
|
+
var Tn = /* @__PURE__ */ new Map();
|
|
4259
|
+
function En(e) {
|
|
4260
|
+
if (Tn.has(e)) return Tn.get(e);
|
|
4250
4261
|
let t = URL.createObjectURL(new Blob([e], { type: "text/javascript" })), n = import(
|
|
4251
4262
|
/* @vite-ignore */
|
|
4252
4263
|
/* webpackIgnore: true */
|
|
4253
4264
|
t
|
|
4254
4265
|
).finally(() => URL.revokeObjectURL(t));
|
|
4255
|
-
return
|
|
4266
|
+
return Tn.set(e, n), n;
|
|
4256
4267
|
}
|
|
4257
|
-
function
|
|
4268
|
+
function Dn(e) {
|
|
4258
4269
|
let t = e && typeof e == "object" ? e.builder_plugins : null, n = t && typeof t == "object" ? t.plugins : null;
|
|
4259
4270
|
return n && typeof n == "object" ? n : {};
|
|
4260
4271
|
}
|
|
4261
4272
|
//#endregion
|
|
4262
4273
|
//#region ../ui/src/components/builder/plugins/view.jsx
|
|
4263
|
-
async function
|
|
4264
|
-
let n = await
|
|
4274
|
+
async function On(e, t) {
|
|
4275
|
+
let n = await En(e);
|
|
4265
4276
|
return (Array.isArray(n?.default?.blocks) ? n.default.blocks : []).find((e) => e?.id === t && typeof e.mount == "function") ?? null;
|
|
4266
4277
|
}
|
|
4267
|
-
var
|
|
4278
|
+
var kn = {
|
|
4268
4279
|
padding: "10px 12px",
|
|
4269
4280
|
border: "1px dashed rgba(148, 163, 184, 0.5)",
|
|
4270
4281
|
borderRadius: 8,
|
|
4271
4282
|
fontSize: 12,
|
|
4272
4283
|
opacity: .6
|
|
4273
4284
|
};
|
|
4274
|
-
function
|
|
4275
|
-
let c = r(
|
|
4285
|
+
function An({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
|
|
4286
|
+
let c = r(H), l = Dn(c?.settings)[e], f = s(null), p = s(null), m = {
|
|
4276
4287
|
tenant: c?.tenant ?? "",
|
|
4277
4288
|
apiUrl: c?.apiUrl ?? "/api",
|
|
4278
4289
|
locale: c?.locale ?? "",
|
|
@@ -4284,7 +4295,7 @@ function kn({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
|
|
|
4284
4295
|
let e = f.current;
|
|
4285
4296
|
if (!l?.code || !e) return;
|
|
4286
4297
|
let n = !0;
|
|
4287
|
-
return
|
|
4298
|
+
return On(l.code, t).then((e) => {
|
|
4288
4299
|
if (!(!n || !e || !f.current)) {
|
|
4289
4300
|
p.current = e;
|
|
4290
4301
|
try {
|
|
@@ -4314,7 +4325,7 @@ function kn({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
|
|
|
4314
4325
|
}) : /* @__PURE__ */ d("div", {
|
|
4315
4326
|
ref: o,
|
|
4316
4327
|
style: {
|
|
4317
|
-
...
|
|
4328
|
+
...kn,
|
|
4318
4329
|
...C(a)
|
|
4319
4330
|
},
|
|
4320
4331
|
children: [
|
|
@@ -4326,12 +4337,12 @@ function kn({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
|
|
|
4326
4337
|
}
|
|
4327
4338
|
//#endregion
|
|
4328
4339
|
//#region ../ui/src/components/builder/render.jsx
|
|
4329
|
-
var
|
|
4330
|
-
...
|
|
4331
|
-
...
|
|
4332
|
-
PluginBlock:
|
|
4340
|
+
var jn = {
|
|
4341
|
+
...tn,
|
|
4342
|
+
...wn,
|
|
4343
|
+
PluginBlock: An
|
|
4333
4344
|
};
|
|
4334
|
-
function
|
|
4345
|
+
function Mn(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
|
|
4335
4346
|
let o = n[t];
|
|
4336
4347
|
if (!o || o.hidden) return null;
|
|
4337
4348
|
let s = o.type?.resolvedName, c = a?.mapProps ? a.mapProps(o.props ?? {}, s) : o.props ?? {};
|
|
@@ -4339,29 +4350,29 @@ function jn(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
|
|
|
4339
4350
|
let n = o.props?.componentId, s = r?.[n];
|
|
4340
4351
|
if (!s?.template || i.has(n)) return null;
|
|
4341
4352
|
let c = new Set(i).add(n);
|
|
4342
|
-
return /* @__PURE__ */ u(e, { children:
|
|
4353
|
+
return /* @__PURE__ */ u(e, { children: Mn(s.template.rootId, s.template.nodes, r, c, a) }, t);
|
|
4343
4354
|
}
|
|
4344
|
-
let l =
|
|
4355
|
+
let l = jn[s];
|
|
4345
4356
|
if (!l) return null;
|
|
4346
|
-
let d = (o.nodes ?? []).map((e) =>
|
|
4357
|
+
let d = (o.nodes ?? []).map((e) => Mn(e, n, r, i, a)).filter(Boolean), f = Object.entries(o.linkedNodes ?? {}), p = f.length ? Object.fromEntries(f.map(([e, t]) => [e, Mn(t, n, r, i)])) : void 0, m = /* @__PURE__ */ u(l, {
|
|
4347
4358
|
...c,
|
|
4348
4359
|
...s === "CollectionList" ? { templateId: o.linkedNodes?.card } : null,
|
|
4349
4360
|
linked: p,
|
|
4350
4361
|
nodeRef: (e) => {
|
|
4351
|
-
e && (e.setAttribute("data-wb", t),
|
|
4362
|
+
e && (e.setAttribute("data-wb", t), O(e, c));
|
|
4352
4363
|
},
|
|
4353
4364
|
children: d.length ? d : void 0
|
|
4354
4365
|
}, t);
|
|
4355
|
-
return c.when && c.when !== "always" ? /* @__PURE__ */ u(
|
|
4366
|
+
return c.when && c.when !== "always" ? /* @__PURE__ */ u(sn, {
|
|
4356
4367
|
when: c.when,
|
|
4357
4368
|
children: m
|
|
4358
4369
|
}, t) : m;
|
|
4359
4370
|
}
|
|
4360
4371
|
//#endregion
|
|
4361
4372
|
//#region ../ui/src/components/builder/PageRenderer.jsx
|
|
4362
|
-
var
|
|
4373
|
+
var Nn = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" "), Pn = (e) => `.webim-page[data-webim-mode="light"] { ${Object.entries(V(e.light)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }
|
|
4363
4374
|
.webim-page[data-webim-mode="dark"] { ${Object.entries(V(e.dark)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }`;
|
|
4364
|
-
function
|
|
4375
|
+
function Fn({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, custom: s, tenant: c, apiUrl: l, datasets: f, locale: p, direction: m, settings: h, siteUser: _ }) {
|
|
4365
4376
|
let v = s?.js?.trim();
|
|
4366
4377
|
if (i(() => {
|
|
4367
4378
|
if (!v) return;
|
|
@@ -4370,40 +4381,40 @@ function Pn({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
|
|
|
4370
4381
|
}, [v]), !e?.ROOT) return null;
|
|
4371
4382
|
let b = {
|
|
4372
4383
|
lang: p || void 0,
|
|
4373
|
-
dir:
|
|
4384
|
+
dir: fe(m, p)
|
|
4374
4385
|
}, x = ".webim-page, .webim-page *, .webim-page *::before, .webim-page *::after { box-sizing: border-box; }", S = {
|
|
4375
4386
|
minHeight: "100%",
|
|
4376
4387
|
display: "flex",
|
|
4377
4388
|
flexDirection: "column"
|
|
4378
|
-
}, C =
|
|
4389
|
+
}, C = Mn("ROOT", e, n), w = o(() => ({ render: (t, r) => Mn(t, e, n, void 0, { mapProps: r }) }), [e, n]), T = ee(e, n), E = F(e, n), D = s?.css?.trim(), O = B(t), k = [O.font, O.headingFont].filter((e) => typeof e == "string" && e.trim() && e !== "inherit" && !z[e]), A = [.../* @__PURE__ */ new Set([...y(e, n), ...k])].map((e) => /* @__PURE__ */ u("link", {
|
|
4379
4390
|
rel: "stylesheet",
|
|
4380
4391
|
precedence: "default",
|
|
4381
4392
|
href: g(e)
|
|
4382
|
-
}, e)), j =
|
|
4383
|
-
return r === "auto" ? /* @__PURE__ */ u(
|
|
4393
|
+
}, e)), j = Pn(O);
|
|
4394
|
+
return r === "auto" ? /* @__PURE__ */ u(H.Provider, {
|
|
4384
4395
|
value: {
|
|
4385
4396
|
tenant: c || "",
|
|
4386
4397
|
apiUrl: l || "/api",
|
|
4387
4398
|
locale: p || "",
|
|
4388
4399
|
settings: h ?? null
|
|
4389
4400
|
},
|
|
4390
|
-
children: /* @__PURE__ */ u(
|
|
4401
|
+
children: /* @__PURE__ */ u(on, {
|
|
4391
4402
|
initialUser: _,
|
|
4392
|
-
children: /* @__PURE__ */ u(
|
|
4403
|
+
children: /* @__PURE__ */ u(U.Provider, {
|
|
4393
4404
|
value: f ?? null,
|
|
4394
|
-
children: /* @__PURE__ */ u(
|
|
4405
|
+
children: /* @__PURE__ */ u(he.Provider, {
|
|
4395
4406
|
value: w,
|
|
4396
4407
|
children: /* @__PURE__ */ d("div", {
|
|
4397
4408
|
...b,
|
|
4398
4409
|
className: "webim-page",
|
|
4399
4410
|
style: {
|
|
4400
4411
|
...S,
|
|
4401
|
-
...
|
|
4412
|
+
...re(t),
|
|
4402
4413
|
...a
|
|
4403
4414
|
},
|
|
4404
4415
|
children: [
|
|
4405
|
-
/* @__PURE__ */ u("style", { children: `.webim-page { ${
|
|
4406
|
-
@media (prefers-color-scheme: dark) { .webim-page { ${
|
|
4416
|
+
/* @__PURE__ */ u("style", { children: `.webim-page { ${Nn(V(O.light))} }
|
|
4417
|
+
@media (prefers-color-scheme: dark) { .webim-page { ${Nn(V(O.dark))} } }` }),
|
|
4407
4418
|
/* @__PURE__ */ u("style", { children: j }),
|
|
4408
4419
|
A,
|
|
4409
4420
|
/* @__PURE__ */ u("style", { children: x }),
|
|
@@ -4416,25 +4427,25 @@ function Pn({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
|
|
|
4416
4427
|
})
|
|
4417
4428
|
})
|
|
4418
4429
|
})
|
|
4419
|
-
}) : /* @__PURE__ */ u(
|
|
4430
|
+
}) : /* @__PURE__ */ u(H.Provider, {
|
|
4420
4431
|
value: {
|
|
4421
4432
|
tenant: c || "",
|
|
4422
4433
|
apiUrl: l || "/api",
|
|
4423
4434
|
locale: p || "",
|
|
4424
4435
|
settings: h ?? null
|
|
4425
4436
|
},
|
|
4426
|
-
children: /* @__PURE__ */ u(
|
|
4437
|
+
children: /* @__PURE__ */ u(on, {
|
|
4427
4438
|
initialUser: _,
|
|
4428
|
-
children: /* @__PURE__ */ u(
|
|
4439
|
+
children: /* @__PURE__ */ u(U.Provider, {
|
|
4429
4440
|
value: f ?? null,
|
|
4430
|
-
children: /* @__PURE__ */ u(
|
|
4441
|
+
children: /* @__PURE__ */ u(he.Provider, {
|
|
4431
4442
|
value: w,
|
|
4432
4443
|
children: /* @__PURE__ */ d("div", {
|
|
4433
4444
|
...b,
|
|
4434
4445
|
className: "webim-page",
|
|
4435
4446
|
style: {
|
|
4436
4447
|
...S,
|
|
4437
|
-
...
|
|
4448
|
+
...ie(t, r),
|
|
4438
4449
|
...a
|
|
4439
4450
|
},
|
|
4440
4451
|
children: [
|
|
@@ -4454,8 +4465,8 @@ function Pn({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
|
|
|
4454
4465
|
}
|
|
4455
4466
|
//#endregion
|
|
4456
4467
|
//#region src/WebimContent.jsx
|
|
4457
|
-
function
|
|
4458
|
-
return e?.blocks?.ROOT ? /* @__PURE__ */ u(
|
|
4468
|
+
function In({ bundle: e, mode: t = "auto", style: n }) {
|
|
4469
|
+
return e?.blocks?.ROOT ? /* @__PURE__ */ u(Fn, {
|
|
4459
4470
|
blocks: e.blocks,
|
|
4460
4471
|
theme: e.theme,
|
|
4461
4472
|
components: e.components,
|
|
@@ -4466,13 +4477,13 @@ function Fn({ bundle: e, mode: t = "auto", style: n }) {
|
|
|
4466
4477
|
locale: e.locale,
|
|
4467
4478
|
direction: e.direction,
|
|
4468
4479
|
settings: e.settings,
|
|
4469
|
-
mode:
|
|
4480
|
+
mode: oe(t, e.scheme),
|
|
4470
4481
|
style: n
|
|
4471
4482
|
}) : null;
|
|
4472
4483
|
}
|
|
4473
4484
|
//#endregion
|
|
4474
4485
|
//#region src/WebimPage.jsx
|
|
4475
|
-
function
|
|
4486
|
+
function Ln({ apiUrl: e, tenant: t, slug: n, locale: r, preview: a, token: o, mode: l = "auto", style: d, fallback: f = null, errorFallback: p = null, onLoad: m, onError: h }) {
|
|
4476
4487
|
let [g, _] = c({ status: "loading" }), v = s({
|
|
4477
4488
|
onLoad: m,
|
|
4478
4489
|
onError: h
|
|
@@ -4482,7 +4493,7 @@ function In({ apiUrl: e, tenant: t, slug: n, locale: r, preview: a, token: o, mo
|
|
|
4482
4493
|
onError: h
|
|
4483
4494
|
}, i(() => {
|
|
4484
4495
|
let i = !0;
|
|
4485
|
-
return _({ status: "loading" }),
|
|
4496
|
+
return _({ status: "loading" }), le({
|
|
4486
4497
|
apiUrl: e,
|
|
4487
4498
|
tenant: t,
|
|
4488
4499
|
slug: n,
|
|
@@ -4509,11 +4520,11 @@ function In({ apiUrl: e, tenant: t, slug: n, locale: r, preview: a, token: o, mo
|
|
|
4509
4520
|
r,
|
|
4510
4521
|
a,
|
|
4511
4522
|
o
|
|
4512
|
-
]), g.status === "loading" ? f : g.status === "error" ? typeof p == "function" ? p(g.error) : p : /* @__PURE__ */ u(
|
|
4523
|
+
]), g.status === "loading" ? f : g.status === "error" ? typeof p == "function" ? p(g.error) : p : /* @__PURE__ */ u(In, {
|
|
4513
4524
|
bundle: g.bundle,
|
|
4514
4525
|
mode: l,
|
|
4515
4526
|
style: d
|
|
4516
4527
|
});
|
|
4517
4528
|
}
|
|
4518
4529
|
//#endregion
|
|
4519
|
-
export {
|
|
4530
|
+
export { Fn as PageRenderer, In as WebimContent, Ln as WebimPage, le as fetchPage, Pe as renderRichContent, ae as resolveTheme };
|