webim-adapter 1.1.3 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/webim-adapter.js +1268 -607
- package/build/webim-embed.js +13 -7
- package/build/webim-ssr.js +1380 -719
- package/package.json +1 -1
package/build/webim-ssr.js
CHANGED
|
@@ -259,36 +259,36 @@ function P(e) {
|
|
|
259
259
|
color: O,
|
|
260
260
|
inset: k
|
|
261
261
|
})), A.length && (t.boxShadow = A.join(", "));
|
|
262
|
-
let P = (e) => e.type === "blur" ? `blur(${M(e.v ?? 0)})` : e.type === "hue-rotate" ? `hue-rotate(${f(e.v ?? 0)})` : `${e.type}(${e.v ?? 100}%)`, F = (e) => (Array.isArray(e) ? e : []).filter((e) => e && e.on !== !1 && e.type).map(P), { filters: I, backdropFilters: L, filterBlur: R, filterGrayscale: z, filterBrightness: B, filterContrast:
|
|
262
|
+
let P = (e) => e.type === "blur" ? `blur(${M(e.v ?? 0)})` : e.type === "hue-rotate" ? `hue-rotate(${f(e.v ?? 0)})` : `${e.type}(${e.v ?? 100}%)`, F = (e) => (Array.isArray(e) ? e : []).filter((e) => e && e.on !== !1 && e.type).map(P), { filters: I, backdropFilters: L, filterBlur: R, filterGrayscale: z, filterBrightness: B, filterContrast: V, filterSaturate: H } = t;
|
|
263
263
|
delete t.filters, delete t.backdropFilters, delete t.filterBlur, delete t.filterGrayscale, delete t.filterBrightness, delete t.filterContrast, delete t.filterSaturate;
|
|
264
|
-
let
|
|
265
|
-
R !== void 0 &&
|
|
266
|
-
let
|
|
267
|
-
|
|
268
|
-
let { textStrokeWidth:
|
|
269
|
-
delete t.textStrokeWidth, delete t.textStrokeColor, (
|
|
270
|
-
let { clipText:
|
|
271
|
-
delete t.clipText,
|
|
272
|
-
let { transitions:
|
|
264
|
+
let U = F(I);
|
|
265
|
+
R !== void 0 && U.push(`blur(${M(R)})`), z !== void 0 && U.push(`grayscale(${z}%)`), B !== void 0 && U.push(`brightness(${B}%)`), V !== void 0 && U.push(`contrast(${V}%)`), H !== void 0 && U.push(`saturate(${H}%)`), U.length && (t.filter = U.join(" "));
|
|
266
|
+
let ee = F(L);
|
|
267
|
+
ee.length && (t.backdropFilter = ee.join(" "), t.WebkitBackdropFilter = t.backdropFilter);
|
|
268
|
+
let { textStrokeWidth: te, textStrokeColor: ne } = t;
|
|
269
|
+
delete t.textStrokeWidth, delete t.textStrokeColor, (te !== void 0 || ne !== void 0) && (t.WebkitTextStroke = `${M(te ?? 1)} ${ne || "currentColor"}`);
|
|
270
|
+
let { clipText: re } = t;
|
|
271
|
+
delete t.clipText, re && (t.WebkitBackgroundClip = "text", t.backgroundClip = "text", t.WebkitTextFillColor = "transparent");
|
|
272
|
+
let { transitions: ie, transitionDuration: W, transitionEasing: ae, transitionProperty: oe } = t, se = (e) => typeof e == "number" || !Number.isNaN(Number(e)) ? `${Number(e)}ms` : e;
|
|
273
273
|
delete t.transitions, delete t.transitionDuration, delete t.transitionEasing, delete t.transitionProperty;
|
|
274
|
-
let
|
|
275
|
-
if (
|
|
274
|
+
let ce = (Array.isArray(ie) ? ie : []).filter((e) => e && e.on !== !1).map((e) => `${e.property || "all"} ${se(e.duration ?? 200)} ${e.easing || "ease"}`);
|
|
275
|
+
if (W !== void 0 && ce.push(`${oe || "all"} ${se(W)} ${ae || "ease"}`), ce.length && (t.transition = ce.join(", ")), t.textDecoration !== void 0 && (t.textDecorationLine = t.textDecoration, delete t.textDecoration), t.backgroundImage && !String(t.backgroundImage).includes("(") && (t.backgroundImage = `url("${t.backgroundImage}")`), n) {
|
|
276
276
|
let e = `${i || "rgba(0,0,0,0.5)"}, ${a || "transparent"}`, o = n === "radial" ? `radial-gradient(circle, ${e})` : `linear-gradient(${r ?? 180}deg, ${e})`;
|
|
277
277
|
t.backgroundImage = t.backgroundImage ? `${o}, ${t.backgroundImage}` : o;
|
|
278
278
|
}
|
|
279
279
|
delete t.backgroundVideo;
|
|
280
|
-
let { overlayColor:
|
|
281
|
-
if (delete t.overlayColor, delete t.overlayOpacity,
|
|
282
|
-
let e = `color-mix(in srgb, ${
|
|
280
|
+
let { overlayColor: G, overlayOpacity: le } = t;
|
|
281
|
+
if (delete t.overlayColor, delete t.overlayOpacity, G) {
|
|
282
|
+
let e = `color-mix(in srgb, ${G} ${le ?? 50}%, transparent)`, n = `linear-gradient(${e}, ${e})`;
|
|
283
283
|
t.backgroundImage = t.backgroundImage ? `${n}, ${t.backgroundImage}` : n;
|
|
284
284
|
}
|
|
285
285
|
t.backgroundImage && (t.backgroundSize ??= "cover", t.backgroundPosition ??= "center", t.backgroundRepeat ??= "no-repeat");
|
|
286
|
-
let { backgroundLayers:
|
|
286
|
+
let { backgroundLayers: K } = t;
|
|
287
287
|
delete t.backgroundLayers;
|
|
288
|
-
let
|
|
289
|
-
if (
|
|
288
|
+
let q = (Array.isArray(K) ? K : []).filter((e) => e && e.on !== !1);
|
|
289
|
+
if (q.length) {
|
|
290
290
|
let e = [], n = [], r = [], i = [], a = [];
|
|
291
|
-
for (let t of
|
|
291
|
+
for (let t of q) 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");
|
|
292
292
|
else if (t.kind === "radial") e.push(`radial-gradient(circle, ${t.from || "rgba(0,0,0,0.5)"}, ${t.to || "transparent"})`), n.push("auto"), r.push("0% 0%"), i.push("repeat"), a.push("scroll");
|
|
293
293
|
else {
|
|
294
294
|
if (!t.src) continue;
|
|
@@ -322,8 +322,8 @@ var F = {
|
|
|
322
322
|
"submit",
|
|
323
323
|
"keydown",
|
|
324
324
|
"inview"
|
|
325
|
-
], B = ["load", "pagescroll"],
|
|
326
|
-
function
|
|
325
|
+
], B = ["load", "pagescroll"], V = [...z, ...B], H = /^[A-Za-z_$][\w$]*$/;
|
|
326
|
+
function U(e, t) {
|
|
327
327
|
let n = String(t ?? "").trim();
|
|
328
328
|
if (!n) return [e];
|
|
329
329
|
let r = e.closest?.(".webim-page") ?? e.closest?.(".builder-canvas") ?? document, i = /^[A-Za-z_][\w-]*$/.test(n) ? [`#${n}`, n] : [n];
|
|
@@ -335,15 +335,15 @@ function H(e, t) {
|
|
|
335
335
|
}
|
|
336
336
|
return [];
|
|
337
337
|
}
|
|
338
|
-
function
|
|
338
|
+
function ee(e, t) {
|
|
339
339
|
for (let t of e.__webimEvents ?? []) t();
|
|
340
340
|
let n = [];
|
|
341
341
|
for (let r of t ?? []) {
|
|
342
342
|
let t = String(r?.event ?? ""), i = r?.action === "animation", a = i ? (Array.isArray(r?.animations) ? r.animations : [r?.animation]).map((e) => String(e ?? "").trim()).filter(Boolean) : [], o = i ? "" : String(r?.handler ?? "").trim();
|
|
343
|
-
if (!
|
|
343
|
+
if (!V.includes(t) || (i ? !a.length : !H.test(o))) continue;
|
|
344
344
|
let s = (t) => {
|
|
345
345
|
if (i) {
|
|
346
|
-
for (let t of
|
|
346
|
+
for (let t of U(e, r?.target)) x(t, a);
|
|
347
347
|
return;
|
|
348
348
|
}
|
|
349
349
|
let n = window[o];
|
|
@@ -366,7 +366,7 @@ function te(e, t) {
|
|
|
366
366
|
}
|
|
367
367
|
e.__webimEvents = n;
|
|
368
368
|
}
|
|
369
|
-
function
|
|
369
|
+
function te(e, t, n = []) {
|
|
370
370
|
t.htmlId ? e.id = t.htmlId : e.removeAttribute("id");
|
|
371
371
|
let r = R(t.classNames), i = R(e.getAttribute("data-wb-class"));
|
|
372
372
|
for (let t of i) r.includes(t) || e.classList.remove(t);
|
|
@@ -380,15 +380,15 @@ function ne(e, t, n = []) {
|
|
|
380
380
|
}
|
|
381
381
|
return a;
|
|
382
382
|
}
|
|
383
|
-
var
|
|
384
|
-
function
|
|
385
|
-
let i = Object.entries(P(t)).map(([e, t]) => `${
|
|
383
|
+
var ne = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
|
|
384
|
+
function re(e, t, n, r = !1) {
|
|
385
|
+
let i = Object.entries(P(t)).map(([e, t]) => `${ne(e)}: ${t} !important;`).join(" ");
|
|
386
386
|
return i ? `[data-wb="${e}"]${r ? "" : n} { ${i} }` : "";
|
|
387
387
|
}
|
|
388
|
-
function
|
|
389
|
-
return Object.entries(F).map(([r, i]) =>
|
|
388
|
+
function ie(e, t, n) {
|
|
389
|
+
return Object.entries(F).map(([r, i]) => re(e, t?.[r], i, n === r)).filter(Boolean).join("\n");
|
|
390
390
|
}
|
|
391
|
-
var
|
|
391
|
+
var W = [
|
|
392
392
|
{
|
|
393
393
|
key: "tablet",
|
|
394
394
|
max: 991
|
|
@@ -401,17 +401,17 @@ var U = [
|
|
|
401
401
|
key: "mobile",
|
|
402
402
|
max: 478
|
|
403
403
|
}
|
|
404
|
-
],
|
|
405
|
-
function
|
|
406
|
-
return
|
|
407
|
-
let i = t?.[n] ?
|
|
404
|
+
], ae = (e) => Object.entries(P(e)).map(([e, t]) => `${ne(e)}: ${t} !important;`).join(" ");
|
|
405
|
+
function oe(e, t) {
|
|
406
|
+
return W.map(({ key: n, max: r }) => {
|
|
407
|
+
let i = t?.[n] ? ae(t[n]) : "";
|
|
408
408
|
return i ? `@media (max-width: ${r}px) { [data-wb="${e}"] { ${i} } }` : "";
|
|
409
409
|
}).filter(Boolean).join("\n");
|
|
410
410
|
}
|
|
411
|
-
function
|
|
411
|
+
function se(e, t) {
|
|
412
412
|
let n = [], r = (e) => {
|
|
413
413
|
for (let [t, r] of Object.entries(e || {})) {
|
|
414
|
-
let e =
|
|
414
|
+
let e = oe(t, r.props);
|
|
415
415
|
e && n.push(e);
|
|
416
416
|
}
|
|
417
417
|
};
|
|
@@ -419,10 +419,10 @@ function ce(e, t) {
|
|
|
419
419
|
for (let e of Object.values(t || {})) r(e.template?.nodes);
|
|
420
420
|
return n.join("\n");
|
|
421
421
|
}
|
|
422
|
-
function
|
|
422
|
+
function ce(e, t) {
|
|
423
423
|
let n = [], r = (e) => {
|
|
424
424
|
for (let [t, r] of Object.entries(e || {})) {
|
|
425
|
-
let e =
|
|
425
|
+
let e = ie(t, r.props);
|
|
426
426
|
e && n.push(e);
|
|
427
427
|
}
|
|
428
428
|
};
|
|
@@ -430,15 +430,15 @@ function le(e, t) {
|
|
|
430
430
|
for (let e of Object.values(t || {})) r(e.template?.nodes);
|
|
431
431
|
return n.join("\n");
|
|
432
432
|
}
|
|
433
|
-
var
|
|
434
|
-
fontFamily:
|
|
433
|
+
var G = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif", le = {
|
|
434
|
+
fontFamily: G,
|
|
435
435
|
fontStyle: "normal",
|
|
436
436
|
fontWeight: 400,
|
|
437
437
|
letterSpacing: "normal",
|
|
438
438
|
textTransform: "none",
|
|
439
439
|
lineHeight: 1.4,
|
|
440
440
|
textShadow: "none"
|
|
441
|
-
},
|
|
441
|
+
}, K = {
|
|
442
442
|
light: {
|
|
443
443
|
background: "#f2f2f2",
|
|
444
444
|
surface: "#f2f2f2",
|
|
@@ -479,23 +479,32 @@ var W = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Ari
|
|
|
479
479
|
contrastText: "#052e2b"
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
|
-
},
|
|
482
|
+
}, q = {
|
|
483
|
+
h1: 40,
|
|
484
|
+
h2: 32,
|
|
485
|
+
h3: 26,
|
|
486
|
+
h4: 22,
|
|
487
|
+
h5: 19,
|
|
488
|
+
h6: 16
|
|
489
|
+
}, ue = {
|
|
483
490
|
font: "system",
|
|
484
491
|
headingFont: "inherit",
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
492
|
+
headings: q,
|
|
493
|
+
bodySize: 16,
|
|
494
|
+
light: K.light,
|
|
495
|
+
dark: K.dark
|
|
496
|
+
}, de = {
|
|
488
497
|
system: {
|
|
489
498
|
label: "System",
|
|
490
|
-
value:
|
|
499
|
+
value: G
|
|
491
500
|
},
|
|
492
501
|
inter: {
|
|
493
502
|
label: "Inter",
|
|
494
|
-
value: `"Inter", ${
|
|
503
|
+
value: `"Inter", ${G}`
|
|
495
504
|
},
|
|
496
505
|
outfit: {
|
|
497
506
|
label: "Outfit",
|
|
498
|
-
value: `"Outfit", ${
|
|
507
|
+
value: `"Outfit", ${G}`
|
|
499
508
|
},
|
|
500
509
|
serif: {
|
|
501
510
|
label: "Serif",
|
|
@@ -505,7 +514,7 @@ var W = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Ari
|
|
|
505
514
|
label: "Mono",
|
|
506
515
|
value: "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"
|
|
507
516
|
}
|
|
508
|
-
},
|
|
517
|
+
}, fe = (e, t) => de[e]?.value ?? k(e) ?? (typeof e == "string" && e.trim() ? `"${e.trim()}", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif` : t), J = (e, ...t) => {
|
|
509
518
|
let n = Object.assign({}, e, ...t);
|
|
510
519
|
return n.primary = {
|
|
511
520
|
...e.primary,
|
|
@@ -521,20 +530,25 @@ var W = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Ari
|
|
|
521
530
|
}), {})
|
|
522
531
|
}, n;
|
|
523
532
|
};
|
|
524
|
-
function
|
|
525
|
-
let { light: t, dark: n, font: r, headingFont: i,
|
|
533
|
+
function pe(e) {
|
|
534
|
+
let { light: t, dark: n, font: r, headingFont: i, headings: a, bodySize: o, ...s } = e ?? {};
|
|
526
535
|
return {
|
|
527
|
-
font: r ??
|
|
528
|
-
headingFont: i ??
|
|
529
|
-
|
|
530
|
-
|
|
536
|
+
font: r ?? ue.font,
|
|
537
|
+
headingFont: i ?? ue.headingFont,
|
|
538
|
+
headings: {
|
|
539
|
+
...q,
|
|
540
|
+
...a ?? {}
|
|
541
|
+
},
|
|
542
|
+
bodySize: o ?? 16,
|
|
543
|
+
light: J(K.light, s, t),
|
|
544
|
+
dark: J(K.dark, n)
|
|
531
545
|
};
|
|
532
546
|
}
|
|
533
|
-
function
|
|
547
|
+
function me(e) {
|
|
534
548
|
return {
|
|
535
549
|
"--page-bg": e.background,
|
|
536
550
|
"--page-surface": e.surface ?? e.background,
|
|
537
|
-
"--page-border": e.border ??
|
|
551
|
+
"--page-border": e.border ?? K.light.border,
|
|
538
552
|
"--page-text": e.text,
|
|
539
553
|
"--page-accent": e.accent,
|
|
540
554
|
"--page-accent-text": e.accentText,
|
|
@@ -549,57 +563,70 @@ function q(e) {
|
|
|
549
563
|
};
|
|
550
564
|
}
|
|
551
565
|
function he(e) {
|
|
552
|
-
let t =
|
|
566
|
+
let t = pe(e);
|
|
553
567
|
return {
|
|
554
568
|
backgroundColor: "var(--page-bg)",
|
|
555
569
|
color: "var(--page-text)",
|
|
556
|
-
fontFamily:
|
|
557
|
-
"--page-heading-font": t.headingFont === "inherit" ? "inherit" :
|
|
570
|
+
fontFamily: fe(t.font, G),
|
|
571
|
+
"--page-heading-font": t.headingFont === "inherit" ? "inherit" : fe(t.headingFont, "inherit"),
|
|
572
|
+
..._e(t.headings),
|
|
573
|
+
"--page-body-size": ge(t.bodySize, 16)
|
|
558
574
|
};
|
|
559
575
|
}
|
|
560
|
-
function ge(e, t
|
|
561
|
-
|
|
576
|
+
function ge(e, t) {
|
|
577
|
+
return e === "" || e == null ? `${t}px` : isNaN(Number(e)) ? String(e) : `${Number(e)}px`;
|
|
578
|
+
}
|
|
579
|
+
function _e(e) {
|
|
580
|
+
let t = {};
|
|
581
|
+
for (let n of Object.keys(q)) {
|
|
582
|
+
let r = e?.[n] ?? q[n];
|
|
583
|
+
t[`--page-${n}`] = ge(r, q[n]);
|
|
584
|
+
}
|
|
585
|
+
return t;
|
|
586
|
+
}
|
|
587
|
+
function ve(e, t = "light") {
|
|
588
|
+
let n = pe(e);
|
|
562
589
|
return {
|
|
563
590
|
...he(e),
|
|
564
|
-
...
|
|
591
|
+
...me(n[t] ?? n.light)
|
|
565
592
|
};
|
|
566
593
|
}
|
|
567
|
-
function
|
|
594
|
+
function ye(e, t) {
|
|
568
595
|
return e?.themeRef && t?.[e.themeRef] || e?.theme;
|
|
569
596
|
}
|
|
570
|
-
function
|
|
597
|
+
function be(e, t) {
|
|
571
598
|
return e === "light" || e === "dark" ? e : t === "light" || t === "dark" ? t : "auto";
|
|
572
599
|
}
|
|
573
600
|
//#endregion
|
|
574
601
|
//#region ../ui/src/components/builder/views.jsx
|
|
575
|
-
var
|
|
602
|
+
var Y = n({
|
|
576
603
|
tenant: "",
|
|
577
604
|
apiUrl: "/api",
|
|
578
605
|
locale: "",
|
|
579
606
|
settings: null
|
|
580
|
-
}),
|
|
607
|
+
}), xe = n(null), Se = (e) => {
|
|
581
608
|
let t = Number(e?.__page);
|
|
582
609
|
if (Number.isFinite(t) && t >= 1) return Math.floor(t);
|
|
583
610
|
if (typeof window > "u") return 1;
|
|
584
611
|
let n = Number(new URLSearchParams(window.location.search).get("page"));
|
|
585
612
|
return Number.isFinite(n) && n >= 1 ? Math.floor(n) : 1;
|
|
586
|
-
},
|
|
613
|
+
}, X = () => {
|
|
587
614
|
if (typeof window > "u") return {};
|
|
588
615
|
let e = {};
|
|
589
616
|
return new URLSearchParams(window.location.search).forEach((t, n) => {
|
|
590
617
|
n.startsWith("f_") && n.length > 2 && t !== "" && (e[n.slice(2)] = t);
|
|
591
618
|
}), e;
|
|
592
|
-
},
|
|
619
|
+
}, Z = (e) => {
|
|
593
620
|
let t = {
|
|
594
621
|
...e && typeof e == "object" && !Array.isArray(e) ? e : {},
|
|
595
|
-
...
|
|
622
|
+
...X()
|
|
596
623
|
};
|
|
597
624
|
return Object.fromEntries(Object.entries(t).filter(([, e]) => typeof e == "string" && e.trim() !== ""));
|
|
598
|
-
},
|
|
599
|
-
function
|
|
625
|
+
}, Q = n(null), Ce = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
626
|
+
function we(e, t) {
|
|
600
627
|
if (t) return t.includes(".") ? t.split(".").reduce((e, t) => e && typeof e == "object" ? e[t] : void 0, e) : e?.[t];
|
|
601
628
|
}
|
|
602
|
-
var
|
|
629
|
+
var Te = (e) => {
|
|
603
630
|
let t = [];
|
|
604
631
|
for (let [n, r] of Object.entries(e ?? {})) {
|
|
605
632
|
if (!/^[\w-]+$/.test(n)) continue;
|
|
@@ -609,36 +636,39 @@ var Z = (e) => {
|
|
|
609
636
|
}
|
|
610
637
|
return t;
|
|
611
638
|
};
|
|
612
|
-
function
|
|
639
|
+
function Ee(e) {
|
|
613
640
|
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(" ") : "";
|
|
614
641
|
}
|
|
615
|
-
function
|
|
616
|
-
let n = t?.data ?? {}, r =
|
|
642
|
+
function De(e, t) {
|
|
643
|
+
let n = t?.data ?? {}, r = Te(n);
|
|
617
644
|
if (!r.length) return e;
|
|
618
|
-
let i = RegExp(`:(${r.map(
|
|
645
|
+
let i = RegExp(`:(${r.map(Ce).sort((e, t) => t.length - e.length).join("|")})`, "g"), a = (e) => typeof e == "string" ? e.replace(i, (e, t) => Ee(we(n, t))) : Array.isArray(e) ? e.map(a) : e && typeof e == "object" ? Object.fromEntries(Object.entries(e).map(([e, t]) => [e, a(t)])) : e;
|
|
619
646
|
return a(e);
|
|
620
647
|
}
|
|
621
|
-
var
|
|
648
|
+
var Oe = {
|
|
622
649
|
margin: 0,
|
|
623
650
|
fontWeight: 700,
|
|
624
651
|
lineHeight: 1.2,
|
|
625
652
|
fontFamily: "var(--page-heading-font, inherit)"
|
|
626
|
-
},
|
|
653
|
+
}, ke = q, Ae = (e) => `var(--page-${e}, ${q[e] ?? q.h2}px)`, je = {
|
|
654
|
+
margin: 0,
|
|
655
|
+
fontSize: "var(--page-body-size, 16px)"
|
|
656
|
+
}, Me = {
|
|
627
657
|
display: "inline-block",
|
|
628
658
|
textDecoration: "none",
|
|
629
659
|
cursor: "pointer",
|
|
630
660
|
backgroundColor: "var(--page-accent, #111827)",
|
|
631
661
|
color: "var(--page-accent-text, #ffffff)"
|
|
632
|
-
},
|
|
662
|
+
}, Ne = {
|
|
633
663
|
flexGrow: 1,
|
|
634
664
|
display: "flex",
|
|
635
665
|
flexDirection: "column",
|
|
636
666
|
position: "relative"
|
|
637
|
-
},
|
|
667
|
+
}, Pe = {
|
|
638
668
|
display: "flex",
|
|
639
669
|
flexDirection: "column"
|
|
640
670
|
};
|
|
641
|
-
function
|
|
671
|
+
function Fe({ style: e }) {
|
|
642
672
|
let t = e?.backgroundVideo;
|
|
643
673
|
if (!t) return null;
|
|
644
674
|
let n = {
|
|
@@ -664,7 +694,7 @@ function Ae({ style: e }) {
|
|
|
664
694
|
background: r
|
|
665
695
|
} })] });
|
|
666
696
|
}
|
|
667
|
-
var
|
|
697
|
+
var Ie = (e, t) => e?.backgroundVideo ? {
|
|
668
698
|
position: "relative",
|
|
669
699
|
...t,
|
|
670
700
|
...P(e)
|
|
@@ -672,24 +702,24 @@ var je = (e, t) => e?.backgroundVideo ? {
|
|
|
672
702
|
...t,
|
|
673
703
|
...P(e)
|
|
674
704
|
};
|
|
675
|
-
function
|
|
705
|
+
function Le({ style: e, nodeRef: t, children: n }) {
|
|
676
706
|
return /* @__PURE__ */ f("div", {
|
|
677
707
|
ref: t,
|
|
678
708
|
style: {
|
|
679
|
-
...
|
|
709
|
+
...Ne,
|
|
680
710
|
...P(e)
|
|
681
711
|
},
|
|
682
|
-
children: [/* @__PURE__ */ d(
|
|
712
|
+
children: [/* @__PURE__ */ d(Fe, { style: e }), n]
|
|
683
713
|
});
|
|
684
714
|
}
|
|
685
|
-
function
|
|
715
|
+
function Re({ style: e, nodeRef: t, children: n }) {
|
|
686
716
|
return /* @__PURE__ */ f("section", {
|
|
687
717
|
ref: t,
|
|
688
|
-
style:
|
|
689
|
-
children: [/* @__PURE__ */ d(
|
|
718
|
+
style: Ie(e, Pe),
|
|
719
|
+
children: [/* @__PURE__ */ d(Fe, { style: e }), n]
|
|
690
720
|
});
|
|
691
721
|
}
|
|
692
|
-
function
|
|
722
|
+
function ze({ style: e, freeLayout: t, nodeRef: n, children: r }) {
|
|
693
723
|
let i = t ? {
|
|
694
724
|
position: "relative",
|
|
695
725
|
minHeight: 240
|
|
@@ -698,32 +728,33 @@ function Pe({ style: e, freeLayout: t, nodeRef: n, children: r }) {
|
|
|
698
728
|
ref: n,
|
|
699
729
|
style: i ? {
|
|
700
730
|
...i,
|
|
701
|
-
...
|
|
702
|
-
} :
|
|
703
|
-
children: [/* @__PURE__ */ d(
|
|
731
|
+
...Ie(e)
|
|
732
|
+
} : Ie(e),
|
|
733
|
+
children: [/* @__PURE__ */ d(Fe, { style: e }), r]
|
|
704
734
|
});
|
|
705
735
|
}
|
|
706
|
-
function
|
|
736
|
+
function Be({ text: e, parts: t, tag: n = "h2", style: r, linked: i, nodeRef: a }) {
|
|
707
737
|
return /* @__PURE__ */ d(n, {
|
|
708
738
|
ref: a,
|
|
709
739
|
style: {
|
|
710
|
-
...
|
|
740
|
+
...Oe,
|
|
741
|
+
fontSize: Ae(n),
|
|
711
742
|
...P(r)
|
|
712
743
|
},
|
|
713
|
-
children:
|
|
744
|
+
children: Ue(t, e, i)
|
|
714
745
|
});
|
|
715
746
|
}
|
|
716
|
-
var
|
|
717
|
-
fontFamily:
|
|
747
|
+
var Ve = {
|
|
748
|
+
fontFamily: de.mono.value,
|
|
718
749
|
background: "rgba(148, 163, 184, 0.18)",
|
|
719
750
|
padding: "1px 5px",
|
|
720
751
|
borderRadius: 4,
|
|
721
752
|
fontSize: "0.9em"
|
|
722
753
|
};
|
|
723
|
-
function
|
|
754
|
+
function He(e, t = [], n, r) {
|
|
724
755
|
let i = e;
|
|
725
756
|
return t.includes("sup") ? i = /* @__PURE__ */ d("sup", { children: i }) : t.includes("sub") && (i = /* @__PURE__ */ d("sub", { children: i })), t.includes("code") && (i = /* @__PURE__ */ d("code", {
|
|
726
|
-
style:
|
|
757
|
+
style: Ve,
|
|
727
758
|
children: i
|
|
728
759
|
})), t.includes("strike") && (i = /* @__PURE__ */ d("s", { children: i })), t.includes("underline") && (i = /* @__PURE__ */ d("u", { children: i })), t.includes("italic") && (i = /* @__PURE__ */ d("em", { children: i })), t.includes("bold") && (i = /* @__PURE__ */ d("strong", { children: i })), n ? i = /* @__PURE__ */ d("a", {
|
|
729
760
|
href: n,
|
|
@@ -739,13 +770,13 @@ function Le(e, t = [], n, r) {
|
|
|
739
770
|
children: i
|
|
740
771
|
})), i;
|
|
741
772
|
}
|
|
742
|
-
function
|
|
773
|
+
function Ue(e, n, r) {
|
|
743
774
|
return e?.length ? e.map((e, n) => {
|
|
744
775
|
if (e.slot) return /* @__PURE__ */ d(t, { children: r?.[e.slot] ?? null }, n);
|
|
745
|
-
if (e.parts) return /* @__PURE__ */ d(t, { children:
|
|
776
|
+
if (e.parts) return /* @__PURE__ */ d(t, { children: Ue(e.parts, "", r) }, n);
|
|
746
777
|
let i = e.text;
|
|
747
778
|
return e.sup ? i = /* @__PURE__ */ d("sup", { children: i }) : e.sub && (i = /* @__PURE__ */ d("sub", { children: i })), e.code && (i = /* @__PURE__ */ d("code", {
|
|
748
|
-
style:
|
|
779
|
+
style: Ve,
|
|
749
780
|
children: i
|
|
750
781
|
})), e.strike && (i = /* @__PURE__ */ d("s", { children: i })), e.underline && (i = /* @__PURE__ */ d("u", { children: i })), e.italic && (i = /* @__PURE__ */ d("em", { children: i })), e.bold && (i = /* @__PURE__ */ d("strong", { children: i })), (e.color || e.background) && (i = /* @__PURE__ */ d("span", {
|
|
751
782
|
style: {
|
|
@@ -768,42 +799,35 @@ function Re(e, n, r) {
|
|
|
768
799
|
})), /* @__PURE__ */ d(t, { children: i }, n);
|
|
769
800
|
}) : n;
|
|
770
801
|
}
|
|
771
|
-
function
|
|
802
|
+
function We({ parts: e, text: t, marks: n, href: r, target: i, style: a }) {
|
|
772
803
|
return /* @__PURE__ */ d("span", {
|
|
773
804
|
style: P(a),
|
|
774
|
-
children: e?.length ?
|
|
805
|
+
children: e?.length ? Ue(e, t) : He(t, n, r, i)
|
|
775
806
|
});
|
|
776
807
|
}
|
|
777
|
-
var
|
|
778
|
-
h1: 40,
|
|
779
|
-
h2: 32,
|
|
780
|
-
h3: 26,
|
|
781
|
-
h4: 22,
|
|
782
|
-
h5: 19,
|
|
783
|
-
h6: 16
|
|
784
|
-
}, Ve = [
|
|
808
|
+
var Ge = [
|
|
785
809
|
"left",
|
|
786
810
|
"center",
|
|
787
811
|
"right",
|
|
788
812
|
"justify"
|
|
789
813
|
];
|
|
790
|
-
function
|
|
814
|
+
function Ke(e, t, n) {
|
|
791
815
|
let r = e && e.cellStyles;
|
|
792
816
|
if (!r || typeof r != "object" || Array.isArray(r)) return {};
|
|
793
817
|
let i = r[`${t}:${n}`];
|
|
794
818
|
return i && typeof i == "object" && !Array.isArray(i) ? i : {};
|
|
795
819
|
}
|
|
796
|
-
function
|
|
820
|
+
function qe(e, t) {
|
|
797
821
|
let n = e || {}, r = typeof n.bold == "boolean" ? n.bold : !!t;
|
|
798
822
|
return {
|
|
799
|
-
textAlign:
|
|
823
|
+
textAlign: Ge.includes(n.align) ? n.align : "left",
|
|
800
824
|
fontWeight: r ? 700 : 400,
|
|
801
825
|
fontStyle: n.italic ? "italic" : void 0,
|
|
802
826
|
color: typeof n.color == "string" && n.color ? n.color : void 0,
|
|
803
827
|
backgroundColor: typeof n.bg == "string" && n.bg ? n.bg : void 0
|
|
804
828
|
};
|
|
805
829
|
}
|
|
806
|
-
function
|
|
830
|
+
function Je({ align: e = "center", width: t, wrap: n } = {}) {
|
|
807
831
|
let r = t ? `${t}%` : void 0;
|
|
808
832
|
if (e === "full") return { width: "100%" };
|
|
809
833
|
let i = e === "left" || e === "right";
|
|
@@ -837,8 +861,8 @@ function We({ align: e = "center", width: t, wrap: n } = {}) {
|
|
|
837
861
|
marginRight: "auto"
|
|
838
862
|
};
|
|
839
863
|
}
|
|
840
|
-
function
|
|
841
|
-
let r = n ?? ((e, n) =>
|
|
864
|
+
function Ye(e = [], t, n) {
|
|
865
|
+
let r = n ?? ((e, n) => Ue(e, n, t));
|
|
842
866
|
return e.map((t, n) => {
|
|
843
867
|
let i = {
|
|
844
868
|
marginTop: 0,
|
|
@@ -860,7 +884,7 @@ function Ge(e = [], t, n) {
|
|
|
860
884
|
marginLeft: 0,
|
|
861
885
|
marginRight: 0,
|
|
862
886
|
...i,
|
|
863
|
-
...
|
|
887
|
+
...Je(t)
|
|
864
888
|
},
|
|
865
889
|
children: [t.href ? /* @__PURE__ */ d("a", {
|
|
866
890
|
href: t.href,
|
|
@@ -879,16 +903,16 @@ function Ge(e = [], t, n) {
|
|
|
879
903
|
})]
|
|
880
904
|
}, n);
|
|
881
905
|
}
|
|
882
|
-
if (t.type === "video") return
|
|
906
|
+
if (t.type === "video") return ot(t.url) ? /* @__PURE__ */ d("div", {
|
|
883
907
|
style: {
|
|
884
908
|
...i,
|
|
885
|
-
...
|
|
909
|
+
...Je({
|
|
886
910
|
align: t.align,
|
|
887
911
|
wrap: t.wrap,
|
|
888
912
|
width: t.width ?? 100
|
|
889
913
|
})
|
|
890
914
|
},
|
|
891
|
-
children: /* @__PURE__ */ d(
|
|
915
|
+
children: /* @__PURE__ */ d(st, {
|
|
892
916
|
url: t.url,
|
|
893
917
|
autoplay: t.autoplay,
|
|
894
918
|
muted: t.muted,
|
|
@@ -952,7 +976,7 @@ function Ge(e = [], t, n) {
|
|
|
952
976
|
verticalAlign: "top"
|
|
953
977
|
}, o = r ? e.slice(1) : e, s = Array.isArray(t.widths) ? t.widths : null, c = (e, n, r) => ({
|
|
954
978
|
...a,
|
|
955
|
-
...
|
|
979
|
+
...qe(Ke(t, e, n), r)
|
|
956
980
|
});
|
|
957
981
|
return /* @__PURE__ */ f("table", {
|
|
958
982
|
style: {
|
|
@@ -990,17 +1014,17 @@ function Ge(e = [], t, n) {
|
|
|
990
1014
|
}
|
|
991
1015
|
if (t.type === "quote") return /* @__PURE__ */ d("blockquote", {
|
|
992
1016
|
style: {
|
|
993
|
-
...
|
|
1017
|
+
...Ze,
|
|
994
1018
|
...i
|
|
995
1019
|
},
|
|
996
1020
|
children: r(t.parts, t.text)
|
|
997
1021
|
}, n);
|
|
998
|
-
if (
|
|
1022
|
+
if (ke[t.type]) {
|
|
999
1023
|
let e = t.type;
|
|
1000
1024
|
return /* @__PURE__ */ d(e, {
|
|
1001
1025
|
style: {
|
|
1002
|
-
...
|
|
1003
|
-
fontSize:
|
|
1026
|
+
...Oe,
|
|
1027
|
+
fontSize: Ae(t.type),
|
|
1004
1028
|
...i
|
|
1005
1029
|
},
|
|
1006
1030
|
children: r(t.parts, t.text)
|
|
@@ -1008,39 +1032,39 @@ function Ge(e = [], t, n) {
|
|
|
1008
1032
|
}
|
|
1009
1033
|
return /* @__PURE__ */ d("p", {
|
|
1010
1034
|
style: {
|
|
1011
|
-
...
|
|
1035
|
+
...je,
|
|
1012
1036
|
...i
|
|
1013
1037
|
},
|
|
1014
1038
|
children: r(t.parts, t.text)
|
|
1015
1039
|
}, n);
|
|
1016
1040
|
});
|
|
1017
1041
|
}
|
|
1018
|
-
function
|
|
1042
|
+
function Xe({ content: e, style: t, linked: n, nodeRef: r }) {
|
|
1019
1043
|
return /* @__PURE__ */ d("div", {
|
|
1020
1044
|
ref: r,
|
|
1021
1045
|
style: {
|
|
1022
1046
|
display: "flow-root",
|
|
1023
1047
|
...P(t)
|
|
1024
1048
|
},
|
|
1025
|
-
children:
|
|
1049
|
+
children: Ye(e, n)
|
|
1026
1050
|
});
|
|
1027
1051
|
}
|
|
1028
|
-
var
|
|
1052
|
+
var Ze = {
|
|
1029
1053
|
margin: 0,
|
|
1030
1054
|
padding: "8px 0 8px 20px",
|
|
1031
1055
|
borderLeft: "4px solid var(--page-accent, rgba(148, 163, 184, 0.6))"
|
|
1032
1056
|
};
|
|
1033
|
-
function
|
|
1057
|
+
function Qe({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
|
|
1034
1058
|
return /* @__PURE__ */ d("blockquote", {
|
|
1035
1059
|
ref: i,
|
|
1036
1060
|
style: {
|
|
1037
|
-
...
|
|
1061
|
+
...Ze,
|
|
1038
1062
|
...P(n)
|
|
1039
1063
|
},
|
|
1040
|
-
children:
|
|
1064
|
+
children: Ue(t, e, r)
|
|
1041
1065
|
});
|
|
1042
1066
|
}
|
|
1043
|
-
function
|
|
1067
|
+
function $e({ ordered: e, items: t = [], style: n, nodeRef: r }) {
|
|
1044
1068
|
return /* @__PURE__ */ d(e ? "ol" : "ul", {
|
|
1045
1069
|
ref: r,
|
|
1046
1070
|
style: {
|
|
@@ -1050,53 +1074,53 @@ function Ye({ ordered: e, items: t = [], style: n, nodeRef: r }) {
|
|
|
1050
1074
|
},
|
|
1051
1075
|
children: t.map((e, t) => /* @__PURE__ */ d("li", {
|
|
1052
1076
|
style: { marginBottom: 4 },
|
|
1053
|
-
children:
|
|
1077
|
+
children: Ue(e.parts, e.text)
|
|
1054
1078
|
}, t))
|
|
1055
1079
|
});
|
|
1056
1080
|
}
|
|
1057
|
-
function
|
|
1081
|
+
function et({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
|
|
1058
1082
|
return /* @__PURE__ */ d("p", {
|
|
1059
1083
|
ref: i,
|
|
1060
1084
|
style: {
|
|
1061
|
-
...
|
|
1085
|
+
...je,
|
|
1062
1086
|
...P(n)
|
|
1063
1087
|
},
|
|
1064
|
-
children:
|
|
1088
|
+
children: Ue(t, e, r)
|
|
1065
1089
|
});
|
|
1066
1090
|
}
|
|
1067
|
-
var
|
|
1091
|
+
var tt = {
|
|
1068
1092
|
color: "var(--page-accent, inherit)",
|
|
1069
1093
|
textDecoration: "underline",
|
|
1070
1094
|
textUnderlineOffset: 3,
|
|
1071
1095
|
cursor: "pointer"
|
|
1072
1096
|
};
|
|
1073
|
-
function
|
|
1097
|
+
function nt({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
|
|
1074
1098
|
return /* @__PURE__ */ d("a", {
|
|
1075
1099
|
ref: o,
|
|
1076
1100
|
href: n || "#",
|
|
1077
1101
|
target: r || void 0,
|
|
1078
1102
|
rel: r === "_blank" ? "noopener noreferrer" : void 0,
|
|
1079
1103
|
style: {
|
|
1080
|
-
...
|
|
1104
|
+
...tt,
|
|
1081
1105
|
...P(i)
|
|
1082
1106
|
},
|
|
1083
|
-
children:
|
|
1107
|
+
children: Ue(t, e, a)
|
|
1084
1108
|
});
|
|
1085
1109
|
}
|
|
1086
|
-
function
|
|
1110
|
+
function rt({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
|
|
1087
1111
|
return /* @__PURE__ */ d("a", {
|
|
1088
1112
|
ref: o,
|
|
1089
1113
|
href: n || "#",
|
|
1090
1114
|
target: r || void 0,
|
|
1091
1115
|
rel: r === "_blank" ? "noopener noreferrer" : void 0,
|
|
1092
1116
|
style: {
|
|
1093
|
-
...
|
|
1117
|
+
...Me,
|
|
1094
1118
|
...P(i)
|
|
1095
1119
|
},
|
|
1096
|
-
children:
|
|
1120
|
+
children: Ue(t, e, a)
|
|
1097
1121
|
});
|
|
1098
1122
|
}
|
|
1099
|
-
function
|
|
1123
|
+
function it({ src: e, alt: t, style: n, nodeRef: r }) {
|
|
1100
1124
|
return e ? /* @__PURE__ */ d("img", {
|
|
1101
1125
|
ref: r,
|
|
1102
1126
|
src: e,
|
|
@@ -1108,7 +1132,7 @@ function et({ src: e, alt: t, style: n, nodeRef: r }) {
|
|
|
1108
1132
|
}
|
|
1109
1133
|
}) : null;
|
|
1110
1134
|
}
|
|
1111
|
-
function
|
|
1135
|
+
function at({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !1, muted: a = !1, style: o, nodeRef: s }) {
|
|
1112
1136
|
return e ? /* @__PURE__ */ d("video", {
|
|
1113
1137
|
ref: s,
|
|
1114
1138
|
src: e,
|
|
@@ -1126,9 +1150,9 @@ function tt({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !
|
|
|
1126
1150
|
}
|
|
1127
1151
|
}) : null;
|
|
1128
1152
|
}
|
|
1129
|
-
var
|
|
1130
|
-
function
|
|
1131
|
-
let c =
|
|
1153
|
+
var ot = (e = "") => (e.match(/(?:youtu\.be\/|v=|embed\/|shorts\/|live\/)([\w-]{11})/) || e.match(/^([\w-]{11})$/))?.[1];
|
|
1154
|
+
function st({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i = !0, start: a, style: o, nodeRef: s }) {
|
|
1155
|
+
let c = ot(e);
|
|
1132
1156
|
if (!c) return null;
|
|
1133
1157
|
let l = new URLSearchParams({ rel: "0" });
|
|
1134
1158
|
return t && l.set("autoplay", "1"), (n || t) && l.set("mute", "1"), i || l.set("controls", "0"), r && (l.set("loop", "1"), l.set("playlist", c)), Number(a) > 0 && l.set("start", String(Math.floor(Number(a)))), /* @__PURE__ */ d("div", {
|
|
@@ -1154,7 +1178,7 @@ function rt({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i
|
|
|
1154
1178
|
})
|
|
1155
1179
|
});
|
|
1156
1180
|
}
|
|
1157
|
-
function
|
|
1181
|
+
function ct({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i }) {
|
|
1158
1182
|
return e ? /* @__PURE__ */ d("iframe", {
|
|
1159
1183
|
ref: i,
|
|
1160
1184
|
src: e,
|
|
@@ -1170,7 +1194,7 @@ function it({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i })
|
|
|
1170
1194
|
}
|
|
1171
1195
|
}) : null;
|
|
1172
1196
|
}
|
|
1173
|
-
function
|
|
1197
|
+
function lt({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
|
|
1174
1198
|
let [i, o] = l(null);
|
|
1175
1199
|
return a(() => {
|
|
1176
1200
|
i && (i.innerHTML = e || "", t && i.querySelectorAll("script").forEach((e) => {
|
|
@@ -1189,17 +1213,18 @@ function at({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
|
|
|
1189
1213
|
style: P(n)
|
|
1190
1214
|
});
|
|
1191
1215
|
}
|
|
1192
|
-
function
|
|
1216
|
+
function ut({ height: e, style: t, nodeRef: n }) {
|
|
1193
1217
|
return /* @__PURE__ */ d("div", {
|
|
1194
|
-
ref:
|
|
1218
|
+
ref: n,
|
|
1195
1219
|
style: {
|
|
1196
1220
|
height: e || 32,
|
|
1197
1221
|
flexShrink: 0,
|
|
1198
|
-
alignSelf: "stretch"
|
|
1222
|
+
alignSelf: "stretch",
|
|
1223
|
+
...P(t)
|
|
1199
1224
|
}
|
|
1200
1225
|
});
|
|
1201
1226
|
}
|
|
1202
|
-
function
|
|
1227
|
+
function dt({ style: e, nodeRef: t }) {
|
|
1203
1228
|
return /* @__PURE__ */ d("div", {
|
|
1204
1229
|
ref: t,
|
|
1205
1230
|
style: {
|
|
@@ -1210,7 +1235,16 @@ function st({ style: e, nodeRef: t }) {
|
|
|
1210
1235
|
}
|
|
1211
1236
|
});
|
|
1212
1237
|
}
|
|
1213
|
-
|
|
1238
|
+
function ft({ style: e, nodeRef: t }) {
|
|
1239
|
+
return /* @__PURE__ */ d("div", {
|
|
1240
|
+
ref: t,
|
|
1241
|
+
style: {
|
|
1242
|
+
flexShrink: 0,
|
|
1243
|
+
...P(e)
|
|
1244
|
+
}
|
|
1245
|
+
});
|
|
1246
|
+
}
|
|
1247
|
+
var pt = {
|
|
1214
1248
|
position: "absolute",
|
|
1215
1249
|
top: "50%",
|
|
1216
1250
|
transform: "translateY(-50%)",
|
|
@@ -1227,7 +1261,7 @@ var ct = {
|
|
|
1227
1261
|
alignItems: "center",
|
|
1228
1262
|
justifyContent: "center",
|
|
1229
1263
|
padding: 0
|
|
1230
|
-
},
|
|
1264
|
+
}, mt = {
|
|
1231
1265
|
bottom: {
|
|
1232
1266
|
inset: "auto 0 0 0",
|
|
1233
1267
|
padding: "40px 24px 20px",
|
|
@@ -1246,8 +1280,8 @@ var ct = {
|
|
|
1246
1280
|
padding: 24,
|
|
1247
1281
|
textShadow: "0 2px 12px rgba(0, 0, 0, 0.6)"
|
|
1248
1282
|
}
|
|
1249
|
-
},
|
|
1250
|
-
function
|
|
1283
|
+
}, ht = 48;
|
|
1284
|
+
function gt({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, height: i = 320, swipe: o = !0, style: s, nodeRef: c }) {
|
|
1251
1285
|
let [p, m] = l(0), [h, g] = l(!1), [_, v] = l(null), y = e ? Math.min(p, e - 1) : 0;
|
|
1252
1286
|
if (a(() => {
|
|
1253
1287
|
if (!n || h || _ || e < 2) return;
|
|
@@ -1263,7 +1297,7 @@ function dt({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1263
1297
|
let b = (t) => m((t + e) % e), x = () => {
|
|
1264
1298
|
if (!_) return;
|
|
1265
1299
|
let { dx: e } = _;
|
|
1266
|
-
v(null), e < -48 ? b(y + 1) : e >
|
|
1300
|
+
v(null), e < -48 ? b(y + 1) : e > ht && b(y - 1);
|
|
1267
1301
|
};
|
|
1268
1302
|
return /* @__PURE__ */ f("div", {
|
|
1269
1303
|
ref: c,
|
|
@@ -1311,7 +1345,7 @@ function dt({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1311
1345
|
type: "button",
|
|
1312
1346
|
"aria-label": "Previous slide",
|
|
1313
1347
|
style: {
|
|
1314
|
-
...
|
|
1348
|
+
...pt,
|
|
1315
1349
|
left: 12
|
|
1316
1350
|
},
|
|
1317
1351
|
onClick: () => b(y - 1),
|
|
@@ -1321,7 +1355,7 @@ function dt({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1321
1355
|
type: "button",
|
|
1322
1356
|
"aria-label": "Next slide",
|
|
1323
1357
|
style: {
|
|
1324
|
-
...
|
|
1358
|
+
...pt,
|
|
1325
1359
|
right: 12
|
|
1326
1360
|
},
|
|
1327
1361
|
onClick: () => b(y + 1),
|
|
@@ -1355,7 +1389,7 @@ function dt({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1355
1389
|
] })]
|
|
1356
1390
|
});
|
|
1357
1391
|
}
|
|
1358
|
-
var
|
|
1392
|
+
var _t = (e, t) => ({
|
|
1359
1393
|
position: "absolute",
|
|
1360
1394
|
inset: 0,
|
|
1361
1395
|
backgroundImage: e ? `url(${e})` : "none",
|
|
@@ -1363,18 +1397,18 @@ var ft = (e, t) => ({
|
|
|
1363
1397
|
backgroundSize: "cover",
|
|
1364
1398
|
backgroundPosition: "center"
|
|
1365
1399
|
});
|
|
1366
|
-
function
|
|
1367
|
-
return e.length ? /* @__PURE__ */ d(
|
|
1400
|
+
function vt({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "left", ...r }) {
|
|
1401
|
+
return e.length ? /* @__PURE__ */ d(gt, {
|
|
1368
1402
|
...r,
|
|
1369
1403
|
count: e.length,
|
|
1370
1404
|
renderSlide: (r) => {
|
|
1371
1405
|
let i = e[r];
|
|
1372
|
-
return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style:
|
|
1406
|
+
return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style: _t(i.image) }), (i.title || i.text) && /* @__PURE__ */ f("div", {
|
|
1373
1407
|
style: {
|
|
1374
1408
|
position: "absolute",
|
|
1375
1409
|
color: "#fff",
|
|
1376
1410
|
textAlign: n,
|
|
1377
|
-
...
|
|
1411
|
+
...mt[t] ?? mt.bottom
|
|
1378
1412
|
},
|
|
1379
1413
|
children: [i.title && /* @__PURE__ */ d("div", {
|
|
1380
1414
|
style: {
|
|
@@ -1394,13 +1428,13 @@ function pt({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "
|
|
|
1394
1428
|
}
|
|
1395
1429
|
}) : null;
|
|
1396
1430
|
}
|
|
1397
|
-
function
|
|
1398
|
-
return e.length ? /* @__PURE__ */ d(
|
|
1431
|
+
function yt({ slides: e = [], linked: t, ...n }) {
|
|
1432
|
+
return e.length ? /* @__PURE__ */ d(gt, {
|
|
1399
1433
|
...n,
|
|
1400
1434
|
count: e.length,
|
|
1401
1435
|
renderSlide: (n) => {
|
|
1402
1436
|
let r = e[n];
|
|
1403
|
-
return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style:
|
|
1437
|
+
return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style: _t(r.image, r.color) }), /* @__PURE__ */ d("div", {
|
|
1404
1438
|
style: {
|
|
1405
1439
|
position: "absolute",
|
|
1406
1440
|
inset: 0,
|
|
@@ -1412,23 +1446,23 @@ function mt({ slides: e = [], linked: t, ...n }) {
|
|
|
1412
1446
|
}
|
|
1413
1447
|
}) : null;
|
|
1414
1448
|
}
|
|
1415
|
-
var
|
|
1416
|
-
let r =
|
|
1449
|
+
var bt = 256, xt = (e) => Math.log(Math.tan(Math.PI / 4 + Math.max(-85, Math.min(85, e)) * Math.PI / 360)), St = (e, t, n) => {
|
|
1450
|
+
let r = bt * 2 ** n;
|
|
1417
1451
|
return {
|
|
1418
1452
|
x: (Number(t) + 180) / 360 * r,
|
|
1419
|
-
y: (.5 -
|
|
1453
|
+
y: (.5 - xt(Number(e)) / (2 * Math.PI)) * r
|
|
1420
1454
|
};
|
|
1421
1455
|
}, $ = (e, t) => {
|
|
1422
1456
|
if (e === "" || e == null) return null;
|
|
1423
1457
|
let n = Number(e);
|
|
1424
1458
|
return Number.isFinite(n) && Math.abs(n) <= t ? n : null;
|
|
1425
|
-
},
|
|
1426
|
-
function
|
|
1459
|
+
}, Ct = (e) => !!e && $(e.lat, 90) !== null && $(e.lng, 180) !== null;
|
|
1460
|
+
function wt(e, t, n = "directions", r = "") {
|
|
1427
1461
|
let i = `${e},${t}`;
|
|
1428
1462
|
return n === "place" ? `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(i)}${r ? "&query_place_id=" : ""}` : `https://www.google.com/maps/dir/?api=1&destination=${encodeURIComponent(i)}`;
|
|
1429
1463
|
}
|
|
1430
|
-
var
|
|
1431
|
-
function
|
|
1464
|
+
var Tt = (e, t, n = 13) => `https://www.openstreetmap.org/?mlat=${e}&mlon=${t}#map=${Math.round(Number(n) || 13)}/${e}/${t}`;
|
|
1465
|
+
function Et({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize: o = 22, pinLink: s = "directions", link: u = !1, label: p = "", style: m, nodeRef: h, inert: g }) {
|
|
1432
1466
|
let _ = c(null), [v, y] = l(1200);
|
|
1433
1467
|
a(() => {
|
|
1434
1468
|
let e = _.current;
|
|
@@ -1438,7 +1472,7 @@ function xt({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
|
|
|
1438
1472
|
let n = new ResizeObserver(t);
|
|
1439
1473
|
return n.observe(e), () => n.disconnect();
|
|
1440
1474
|
}, []);
|
|
1441
|
-
let b = (Array.isArray(e) ? e : []).filter(
|
|
1475
|
+
let b = (Array.isArray(e) ? e : []).filter(Ct), x = Ct({
|
|
1442
1476
|
lat: t,
|
|
1443
1477
|
lng: n
|
|
1444
1478
|
}) ? {
|
|
@@ -1450,7 +1484,7 @@ function xt({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
|
|
|
1450
1484
|
} : null, S = Math.max(80, Number(i) || 320), C = $(r, 19) ? Math.min(Math.max(Math.round(Number(r)), 1), 19) : (() => {
|
|
1451
1485
|
if (b.length < 2) return 13;
|
|
1452
1486
|
for (let e = 19; e >= 1; e--) {
|
|
1453
|
-
let t = b.map((t) =>
|
|
1487
|
+
let t = b.map((t) => St($(t.lat, 90), $(t.lng, 180), e)), n = Math.max(...t.map((e) => e.x)) - Math.min(...t.map((e) => e.x)), r = Math.max(...t.map((e) => e.y)) - Math.min(...t.map((e) => e.y));
|
|
1454
1488
|
if (n <= v * .8 && r <= S * .7) return e;
|
|
1455
1489
|
}
|
|
1456
1490
|
return 1;
|
|
@@ -1474,12 +1508,12 @@ function xt({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
|
|
|
1474
1508
|
},
|
|
1475
1509
|
children: "Set the coordinates in Settings"
|
|
1476
1510
|
});
|
|
1477
|
-
let T =
|
|
1511
|
+
let T = St(x.lat, x.lng, C), E = {
|
|
1478
1512
|
x: T.x - v / 2,
|
|
1479
1513
|
y: T.y - S / 2
|
|
1480
1514
|
}, D = [], O = [];
|
|
1481
|
-
for (let e = Math.floor(E.x /
|
|
1482
|
-
for (let e = Math.floor(E.y /
|
|
1515
|
+
for (let e = Math.floor(E.x / bt); e <= Math.floor((E.x + v) / bt); e++) D.push(e);
|
|
1516
|
+
for (let e = Math.floor(E.y / bt); e <= Math.floor((E.y + S) / bt); e++) O.push(e);
|
|
1483
1517
|
let k = 2 ** C;
|
|
1484
1518
|
return /* @__PURE__ */ f("div", {
|
|
1485
1519
|
ref: (e) => {
|
|
@@ -1502,22 +1536,22 @@ function xt({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
|
|
|
1502
1536
|
return e < 0 || e >= k ? null : /* @__PURE__ */ d("img", {
|
|
1503
1537
|
src: `https://tile.openstreetmap.org/${C}/${n}/${e}.png`,
|
|
1504
1538
|
alt: "",
|
|
1505
|
-
width:
|
|
1506
|
-
height:
|
|
1539
|
+
width: bt,
|
|
1540
|
+
height: bt,
|
|
1507
1541
|
loading: "lazy",
|
|
1508
1542
|
style: {
|
|
1509
1543
|
position: "absolute",
|
|
1510
|
-
left: Math.round(t *
|
|
1511
|
-
top: Math.round(e *
|
|
1512
|
-
width:
|
|
1513
|
-
height:
|
|
1544
|
+
left: Math.round(t * bt - E.x),
|
|
1545
|
+
top: Math.round(e * bt - E.y),
|
|
1546
|
+
width: bt,
|
|
1547
|
+
height: bt,
|
|
1514
1548
|
userSelect: "none",
|
|
1515
1549
|
pointerEvents: "none"
|
|
1516
1550
|
}
|
|
1517
1551
|
}, `${t}-${e}`);
|
|
1518
1552
|
})),
|
|
1519
1553
|
b.map((e, t) => {
|
|
1520
|
-
let n =
|
|
1554
|
+
let n = St($(e.lat, 90), $(e.lng, 180), C), r = n.x - E.x, i = n.y - E.y, a = e.color || "var(--page-accent, #dc2626)", c = s === "none" || g ? null : wt($(e.lat, 90), $(e.lng, 180), s, e.title);
|
|
1521
1555
|
return /* @__PURE__ */ f(c ? "a" : "span", {
|
|
1522
1556
|
href: c || void 0,
|
|
1523
1557
|
target: c ? "_blank" : void 0,
|
|
@@ -1556,8 +1590,8 @@ function xt({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
|
|
|
1556
1590
|
viewBox: "0 0 24 24",
|
|
1557
1591
|
fill: a,
|
|
1558
1592
|
style: { display: "block" },
|
|
1559
|
-
children: [/* @__PURE__ */ d("path", { d: "M12 22s7-6 7-11a7 7 0 1 0-14 0c0 5 7 11 7 11z" }),
|
|
1560
|
-
d:
|
|
1593
|
+
children: [/* @__PURE__ */ d("path", { d: "M12 22s7-6 7-11a7 7 0 1 0-14 0c0 5 7 11 7 11z" }), Dt[e.icon] ? /* @__PURE__ */ d("path", {
|
|
1594
|
+
d: Dt[e.icon],
|
|
1561
1595
|
transform: "translate(12 10.5) scale(0.46) translate(-12 -12)",
|
|
1562
1596
|
fill: "none",
|
|
1563
1597
|
stroke: "#fff",
|
|
@@ -1593,7 +1627,7 @@ function xt({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
|
|
|
1593
1627
|
})
|
|
1594
1628
|
]
|
|
1595
1629
|
}), u ? /* @__PURE__ */ d("a", {
|
|
1596
|
-
href:
|
|
1630
|
+
href: Tt(x.lat, x.lng, C),
|
|
1597
1631
|
target: "_blank",
|
|
1598
1632
|
rel: "noopener noreferrer",
|
|
1599
1633
|
onClick: g ? (e) => e.preventDefault() : void 0,
|
|
@@ -1607,7 +1641,7 @@ function xt({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
|
|
|
1607
1641
|
}) : null]
|
|
1608
1642
|
});
|
|
1609
1643
|
}
|
|
1610
|
-
var
|
|
1644
|
+
var Dt = {
|
|
1611
1645
|
check: "M4 12l5 5L20 6",
|
|
1612
1646
|
close: "M6 6l12 12M18 6L6 18",
|
|
1613
1647
|
plus: "M12 5v14M5 12h14",
|
|
@@ -1704,8 +1738,8 @@ var St = {
|
|
|
1704
1738
|
droplet: "M12 3s6 6.4 6 10.5a6 6 0 0 1-12 0C6 9.4 12 3 12 3z",
|
|
1705
1739
|
leaf: "M4 20c0-8 6-14 16-14 0 10-6 14-12 14H4zM8 16c2-4 5-6 8-7"
|
|
1706
1740
|
};
|
|
1707
|
-
function
|
|
1708
|
-
let p = Array.isArray(t) ? t.filter((e) => typeof e == "string" && e.trim()) : [], m = n && p.length > 0, h = p.length ? p : [
|
|
1741
|
+
function Ot({ name: e = "star", paths: t, fill: n = !1, size: r = 24, stroke: i = 2, color: a = "", href: o = "", target: s = "", label: c = "", style: l, nodeRef: u, inert: f }) {
|
|
1742
|
+
let p = Array.isArray(t) ? t.filter((e) => typeof e == "string" && e.trim()) : [], m = n && p.length > 0, h = p.length ? p : [Dt[e] ?? Dt.star], g = Math.min(Math.max(Number(r) || 24, 8), 240), _ = a === "accent" ? "var(--page-accent, currentColor)" : a || "currentColor", v = /* @__PURE__ */ d("svg", {
|
|
1709
1743
|
viewBox: "0 0 24 24",
|
|
1710
1744
|
width: g,
|
|
1711
1745
|
height: g,
|
|
@@ -1741,10 +1775,10 @@ function Ct({ name: e = "star", paths: t, fill: n = !1, size: r = 24, stroke: i
|
|
|
1741
1775
|
children: v
|
|
1742
1776
|
});
|
|
1743
1777
|
}
|
|
1744
|
-
function
|
|
1745
|
-
let r = Array.isArray(e) ? e.filter((e) => e && typeof e == "object") : [], i = (e) => e == null ? "" :
|
|
1778
|
+
function kt(e, t = {}, n = 0) {
|
|
1779
|
+
let r = Array.isArray(e) ? e.filter((e) => e && typeof e == "object") : [], i = (e) => e == null ? "" : Ee(e), a = Math.max(0, Number(n) || 0), o = [];
|
|
1746
1780
|
for (let e of r) {
|
|
1747
|
-
let n = e.data ?? e, r =
|
|
1781
|
+
let n = e.data ?? e, r = we(n, t.imageField), s = (Array.isArray(r) ? r : [r]).map((e) => e && typeof e == "object" ? e.url ?? e.src ?? "" : e).filter((e) => typeof e == "string" && e.trim()), c = t.nameField ? i(we(n, t.nameField)) : i(n.name), l = t.hrefField ? i(we(n, t.hrefField)) : "";
|
|
1748
1782
|
for (let e of s) if (o.push({
|
|
1749
1783
|
src: e,
|
|
1750
1784
|
name: c,
|
|
@@ -1754,8 +1788,8 @@ function wt(e, t = {}, n = 0) {
|
|
|
1754
1788
|
}
|
|
1755
1789
|
return o;
|
|
1756
1790
|
}
|
|
1757
|
-
function
|
|
1758
|
-
let { tenant: x, apiUrl: S } = i(
|
|
1791
|
+
function At({ images: e = [], source: t = "", entry: n = "", imageField: r = "", nameField: o = "", hrefField: s = "", limit: c = 0, emptyText: p = "", columns: m = 3, gap: h = 8, showNames: g = !1, lightbox: _ = !0, style: v, nodeRef: y, inert: b }) {
|
|
1792
|
+
let { tenant: x, apiUrl: S } = i(Y), C = i(xe)?.[t], [w, T] = l(null), [E, D] = l(() => /* @__PURE__ */ new Set());
|
|
1759
1793
|
a(() => {
|
|
1760
1794
|
if (!t || C) return;
|
|
1761
1795
|
let e = !0;
|
|
@@ -1772,7 +1806,7 @@ function Tt({ images: e = [], source: t = "", entry: n = "", imageField: r = "",
|
|
|
1772
1806
|
C
|
|
1773
1807
|
]);
|
|
1774
1808
|
let O = C ?? w ?? [], k = n ? O.filter((e) => e?.id === n || e?.data?.slug === n || e?.slug === n) : O, A = Math.max(0, Number(c) || 0), j = t ? (() => {
|
|
1775
|
-
let e =
|
|
1809
|
+
let e = kt(k, {
|
|
1776
1810
|
imageField: r,
|
|
1777
1811
|
nameField: o,
|
|
1778
1812
|
hrefField: s
|
|
@@ -1786,7 +1820,7 @@ function Tt({ images: e = [], source: t = "", entry: n = "", imageField: r = "",
|
|
|
1786
1820
|
};
|
|
1787
1821
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
1788
1822
|
}, [B, N.length]);
|
|
1789
|
-
let
|
|
1823
|
+
let V = (e) => {
|
|
1790
1824
|
if (typeof e.name == "string" && e.name.trim()) return e.name;
|
|
1791
1825
|
if (typeof e.alt == "string" && e.alt.trim()) return e.alt;
|
|
1792
1826
|
try {
|
|
@@ -1822,7 +1856,7 @@ function Tt({ images: e = [], source: t = "", entry: n = "", imageField: r = "",
|
|
|
1822
1856
|
display: "block",
|
|
1823
1857
|
borderRadius: "inherit"
|
|
1824
1858
|
}
|
|
1825
|
-
}), g &&
|
|
1859
|
+
}), g && V(e) && /* @__PURE__ */ d("span", {
|
|
1826
1860
|
style: {
|
|
1827
1861
|
position: "absolute",
|
|
1828
1862
|
insetInline: 0,
|
|
@@ -1836,7 +1870,7 @@ function Tt({ images: e = [], source: t = "", entry: n = "", imageField: r = "",
|
|
|
1836
1870
|
overflow: "hidden",
|
|
1837
1871
|
textOverflow: "ellipsis"
|
|
1838
1872
|
},
|
|
1839
|
-
children:
|
|
1873
|
+
children: V(e)
|
|
1840
1874
|
})]
|
|
1841
1875
|
}), i = e.href ? /* @__PURE__ */ d("a", {
|
|
1842
1876
|
href: e.href,
|
|
@@ -1907,14 +1941,14 @@ function Tt({ images: e = [], source: t = "", entry: n = "", imageField: r = "",
|
|
|
1907
1941
|
boxShadow: "0 12px 48px rgba(0,0,0,0.5)"
|
|
1908
1942
|
}
|
|
1909
1943
|
}),
|
|
1910
|
-
|
|
1944
|
+
V(N[R]) && /* @__PURE__ */ d("div", {
|
|
1911
1945
|
style: {
|
|
1912
1946
|
color: "#fff",
|
|
1913
1947
|
fontSize: 14,
|
|
1914
1948
|
marginTop: 12,
|
|
1915
1949
|
opacity: .85
|
|
1916
1950
|
},
|
|
1917
|
-
children:
|
|
1951
|
+
children: V(N[R])
|
|
1918
1952
|
}),
|
|
1919
1953
|
/* @__PURE__ */ d("button", {
|
|
1920
1954
|
type: "button",
|
|
@@ -1977,20 +2011,20 @@ function Tt({ images: e = [], source: t = "", entry: n = "", imageField: r = "",
|
|
|
1977
2011
|
]
|
|
1978
2012
|
});
|
|
1979
2013
|
}
|
|
1980
|
-
var
|
|
2014
|
+
var jt = {
|
|
1981
2015
|
color: "inherit",
|
|
1982
2016
|
textDecoration: "none",
|
|
1983
2017
|
fontSize: 14,
|
|
1984
2018
|
opacity: .85
|
|
1985
|
-
},
|
|
2019
|
+
}, Mt = {
|
|
1986
2020
|
background: "var(--page-surface, #f2f2f2)",
|
|
1987
2021
|
color: "var(--page-text, #111827)",
|
|
1988
2022
|
border: "1px solid rgba(148, 163, 184, 0.25)",
|
|
1989
2023
|
boxShadow: "0 16px 40px rgba(15, 23, 42, 0.16)",
|
|
1990
2024
|
zIndex: 60
|
|
1991
2025
|
};
|
|
1992
|
-
function
|
|
1993
|
-
let r = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.id) : [], i = (e) => Array.isArray(e) ? e[0] : e, a = (e) => e == null ? "" :
|
|
2026
|
+
function Nt(e, t = {}, n = "dropdown") {
|
|
2027
|
+
let r = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.id) : [], i = (e) => Array.isArray(e) ? e[0] : e, a = (e) => e == null ? "" : Ee(e), o = r.map((e) => {
|
|
1994
2028
|
let n = e.data ?? {}, r = t.parentField ? i(n[t.parentField]) : null;
|
|
1995
2029
|
return {
|
|
1996
2030
|
key: e.id,
|
|
@@ -2031,8 +2065,8 @@ function Ot(e, t = {}, n = "dropdown") {
|
|
|
2031
2065
|
type: e.children.length ? n : "link"
|
|
2032
2066
|
}));
|
|
2033
2067
|
}
|
|
2034
|
-
function
|
|
2035
|
-
let [C, w] = l(null), [T, E] = l(!1), [D, O] = l(!1), [k, A] = l(null), { tenant: j, apiUrl: M } = i(
|
|
2068
|
+
function Pt({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], style: c, nodeRef: p, menu: m = "auto", breakpoint: h = 768, source: g = "", labelField: _ = "", hrefField: v = "", imageField: y = "", descField: b = "", parentField: x = "", submenu: S = "dropdown" }) {
|
|
2069
|
+
let [C, w] = l(null), [T, E] = l(!1), [D, O] = l(!1), [k, A] = l(null), { tenant: j, apiUrl: M } = i(Y), N = i(xe)?.[g], [F, I] = l(null);
|
|
2036
2070
|
a(() => {
|
|
2037
2071
|
if (!g || N) return;
|
|
2038
2072
|
let e = !0;
|
|
@@ -2052,7 +2086,7 @@ function kt({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
|
|
|
2052
2086
|
let e = new ResizeObserver(() => E(C.offsetWidth < h));
|
|
2053
2087
|
return e.observe(C), () => e.disconnect();
|
|
2054
2088
|
}, [C, h]);
|
|
2055
|
-
let L = g ?
|
|
2089
|
+
let L = g ? Nt(N ?? F ?? [], {
|
|
2056
2090
|
labelField: _,
|
|
2057
2091
|
hrefField: v,
|
|
2058
2092
|
imageField: y,
|
|
@@ -2081,7 +2115,7 @@ function kt({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
|
|
|
2081
2115
|
return /* @__PURE__ */ f("a", {
|
|
2082
2116
|
href: e.href || "#",
|
|
2083
2117
|
style: {
|
|
2084
|
-
...
|
|
2118
|
+
...jt,
|
|
2085
2119
|
display: n ? "block" : "flex",
|
|
2086
2120
|
alignItems: n ? void 0 : "center",
|
|
2087
2121
|
gap: n ? void 0 : 10,
|
|
@@ -2178,7 +2212,7 @@ function kt({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
|
|
|
2178
2212
|
let t = e.children ?? [];
|
|
2179
2213
|
if (!t.length) return /* @__PURE__ */ d("a", {
|
|
2180
2214
|
href: e.href || "#",
|
|
2181
|
-
style:
|
|
2215
|
+
style: jt,
|
|
2182
2216
|
children: e.label
|
|
2183
2217
|
}, e.key);
|
|
2184
2218
|
let n = e.type === "mega";
|
|
@@ -2192,7 +2226,7 @@ function kt({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
|
|
|
2192
2226
|
children: [/* @__PURE__ */ f("a", {
|
|
2193
2227
|
href: e.href || "#",
|
|
2194
2228
|
style: {
|
|
2195
|
-
...
|
|
2229
|
+
...jt,
|
|
2196
2230
|
cursor: "pointer"
|
|
2197
2231
|
},
|
|
2198
2232
|
children: [
|
|
@@ -2208,7 +2242,7 @@ function kt({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
|
|
|
2208
2242
|
]
|
|
2209
2243
|
}), k === e.key && (n ? /* @__PURE__ */ d("div", {
|
|
2210
2244
|
style: {
|
|
2211
|
-
...
|
|
2245
|
+
...Mt,
|
|
2212
2246
|
position: "absolute",
|
|
2213
2247
|
left: 0,
|
|
2214
2248
|
right: 0,
|
|
@@ -2224,7 +2258,7 @@ function kt({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
|
|
|
2224
2258
|
}, !0))
|
|
2225
2259
|
}) : /* @__PURE__ */ d("div", {
|
|
2226
2260
|
style: {
|
|
2227
|
-
...
|
|
2261
|
+
...Mt,
|
|
2228
2262
|
position: "absolute",
|
|
2229
2263
|
top: "100%",
|
|
2230
2264
|
left: 0,
|
|
@@ -2253,7 +2287,7 @@ function kt({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
|
|
|
2253
2287
|
children: L.map((e) => /* @__PURE__ */ f(t, { children: [/* @__PURE__ */ d("a", {
|
|
2254
2288
|
href: e.href || "#",
|
|
2255
2289
|
style: {
|
|
2256
|
-
...
|
|
2290
|
+
...jt,
|
|
2257
2291
|
padding: "10px 4px",
|
|
2258
2292
|
fontWeight: (e.children ?? []).length ? 600 : 400,
|
|
2259
2293
|
opacity: 1
|
|
@@ -2264,7 +2298,7 @@ function kt({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
|
|
|
2264
2298
|
]
|
|
2265
2299
|
});
|
|
2266
2300
|
}
|
|
2267
|
-
function
|
|
2301
|
+
function Ft({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
|
|
2268
2302
|
let [i, a] = l(0), o = e.length ? Math.min(i, e.length - 1) : 0;
|
|
2269
2303
|
return e.length ? /* @__PURE__ */ f("div", {
|
|
2270
2304
|
ref: r,
|
|
@@ -2304,13 +2338,13 @@ function At({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
|
|
|
2304
2338
|
}, e.key))]
|
|
2305
2339
|
}) : null;
|
|
2306
2340
|
}
|
|
2307
|
-
function
|
|
2341
|
+
function It({ items: e = [], linked: t, multiple: n = !1, icon: r = "", padX: i, padY: a, headerBg: o, headerColor: s, openBg: c, openColor: u, borderColor: p, style: m, nodeRef: h }) {
|
|
2308
2342
|
let [g, _] = l(() => new Set(e.length ? [e[0].key] : []));
|
|
2309
2343
|
if (!e.length) return null;
|
|
2310
2344
|
let v = (e, t) => typeof e == "string" && e ? e : t, y = (e, t) => {
|
|
2311
2345
|
let n = Number(e);
|
|
2312
2346
|
return e === "" || e == null || !Number.isFinite(n) ? t : n;
|
|
2313
|
-
}, b =
|
|
2347
|
+
}, b = Dt[r], x = (e) => _((t) => {
|
|
2314
2348
|
let r = new Set(n ? t : []);
|
|
2315
2349
|
return t.has(e) ? r.delete(e) : r.add(e), r;
|
|
2316
2350
|
});
|
|
@@ -2385,15 +2419,15 @@ function jt({ items: e = [], linked: t, multiple: n = !1, icon: r = "", padX: i,
|
|
|
2385
2419
|
})
|
|
2386
2420
|
});
|
|
2387
2421
|
}
|
|
2388
|
-
var
|
|
2422
|
+
var Lt = {
|
|
2389
2423
|
display: "flex",
|
|
2390
2424
|
flexDirection: "column",
|
|
2391
2425
|
gap: "12px"
|
|
2392
|
-
},
|
|
2426
|
+
}, Rt = {
|
|
2393
2427
|
fontSize: "14px",
|
|
2394
2428
|
fontWeight: 500,
|
|
2395
2429
|
color: "var(--page-text, #111827)"
|
|
2396
|
-
},
|
|
2430
|
+
}, zt = {
|
|
2397
2431
|
padding: "10px 12px",
|
|
2398
2432
|
border: "1px solid var(--page-border, #d1d5db)",
|
|
2399
2433
|
borderRadius: "6px",
|
|
@@ -2403,18 +2437,18 @@ var Mt = {
|
|
|
2403
2437
|
boxSizing: "border-box",
|
|
2404
2438
|
backgroundColor: "var(--page-surface, #f2f2f2)",
|
|
2405
2439
|
color: "var(--page-text, #111827)"
|
|
2406
|
-
},
|
|
2440
|
+
}, Bt = {
|
|
2407
2441
|
display: "flex",
|
|
2408
2442
|
alignItems: "center",
|
|
2409
2443
|
gap: "8px",
|
|
2410
2444
|
fontSize: "14px",
|
|
2411
2445
|
color: "var(--page-text, #111827)"
|
|
2412
|
-
},
|
|
2446
|
+
}, Vt = (e) => e ? {
|
|
2413
2447
|
readOnly: !0,
|
|
2414
2448
|
tabIndex: -1,
|
|
2415
2449
|
onMouseDown: (e) => e.preventDefault()
|
|
2416
2450
|
} : {};
|
|
2417
|
-
function
|
|
2451
|
+
function Ht(e, t) {
|
|
2418
2452
|
if (!e) return !0;
|
|
2419
2453
|
let n = t[e.field], r = n == null || n === "" ? "" : String(n), i = e.value ?? "";
|
|
2420
2454
|
switch (e.op) {
|
|
@@ -2428,11 +2462,11 @@ function Lt(e, t) {
|
|
|
2428
2462
|
default: return !1;
|
|
2429
2463
|
}
|
|
2430
2464
|
}
|
|
2431
|
-
var
|
|
2465
|
+
var Ut = {
|
|
2432
2466
|
display: "flex",
|
|
2433
2467
|
flexDirection: "column",
|
|
2434
2468
|
gap: 6
|
|
2435
|
-
},
|
|
2469
|
+
}, Wt = {
|
|
2436
2470
|
font: "inherit",
|
|
2437
2471
|
fontSize: 15,
|
|
2438
2472
|
padding: "10px 12px",
|
|
@@ -2443,17 +2477,17 @@ var Rt = {
|
|
|
2443
2477
|
width: "100%",
|
|
2444
2478
|
boxSizing: "border-box"
|
|
2445
2479
|
};
|
|
2446
|
-
function
|
|
2480
|
+
function Gt(e, t) {
|
|
2447
2481
|
let n = Array.isArray(e?.options) ? e.options : [];
|
|
2448
2482
|
if (!e?.parentField) return n;
|
|
2449
2483
|
let r = t?.[e.parentField];
|
|
2450
2484
|
return r ? n.filter((e) => typeof e == "string" ? !1 : !e.parent || e.parent === r) : [];
|
|
2451
2485
|
}
|
|
2452
|
-
var
|
|
2453
|
-
function
|
|
2486
|
+
var Kt = "g-recaptcha-response", qt = (e) => e?.type === "recaptcha" ? Kt : e?.name;
|
|
2487
|
+
function Jt({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
2454
2488
|
let a = /* @__PURE__ */ f("span", {
|
|
2455
2489
|
style: {
|
|
2456
|
-
...
|
|
2490
|
+
...Rt,
|
|
2457
2491
|
fontSize: 14
|
|
2458
2492
|
},
|
|
2459
2493
|
children: [e.label, e.required ? " *" : ""]
|
|
@@ -2462,7 +2496,7 @@ function Ut({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
2462
2496
|
required: e.required || void 0,
|
|
2463
2497
|
placeholder: e.placeholder || void 0,
|
|
2464
2498
|
disabled: r || void 0,
|
|
2465
|
-
style:
|
|
2499
|
+
style: Wt,
|
|
2466
2500
|
value: t ?? "",
|
|
2467
2501
|
onChange: (t) => n(e.name, t.target.value)
|
|
2468
2502
|
};
|
|
@@ -2491,12 +2525,12 @@ function Ut({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
2491
2525
|
borderRadius: 8,
|
|
2492
2526
|
display: "block"
|
|
2493
2527
|
}
|
|
2494
|
-
}) : null : e.type === "recaptcha" ? /* @__PURE__ */ d(
|
|
2528
|
+
}) : null : e.type === "recaptcha" ? /* @__PURE__ */ d($t, {
|
|
2495
2529
|
theme: e.captchaTheme,
|
|
2496
2530
|
size: e.captchaSize,
|
|
2497
2531
|
inert: r,
|
|
2498
|
-
onChange: (e) => n(
|
|
2499
|
-
}) : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ d(
|
|
2532
|
+
onChange: (e) => n(Kt, e)
|
|
2533
|
+
}) : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ d(st, {
|
|
2500
2534
|
url: e.src,
|
|
2501
2535
|
style: { width: "100%" }
|
|
2502
2536
|
}) : /* @__PURE__ */ d("video", {
|
|
@@ -2508,14 +2542,14 @@ function Ut({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
2508
2542
|
display: "block"
|
|
2509
2543
|
}
|
|
2510
2544
|
}) : null : /* @__PURE__ */ f("label", {
|
|
2511
|
-
style:
|
|
2545
|
+
style: Ut,
|
|
2512
2546
|
children: [
|
|
2513
2547
|
a,
|
|
2514
2548
|
e.type === "textarea" || e.multiline ? /* @__PURE__ */ d("textarea", {
|
|
2515
2549
|
...o,
|
|
2516
2550
|
rows: 4,
|
|
2517
2551
|
style: {
|
|
2518
|
-
...
|
|
2552
|
+
...Wt,
|
|
2519
2553
|
resize: "vertical"
|
|
2520
2554
|
}
|
|
2521
2555
|
}) : e.type === "select" ? /* @__PURE__ */ f("select", {
|
|
@@ -2524,7 +2558,7 @@ function Ut({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
2524
2558
|
children: [/* @__PURE__ */ d("option", {
|
|
2525
2559
|
value: "",
|
|
2526
2560
|
children: e.placeholder || "—"
|
|
2527
|
-
}),
|
|
2561
|
+
}), Gt(e, i).map((e, t) => /* @__PURE__ */ d("option", {
|
|
2528
2562
|
value: typeof e == "string" ? e : e.value,
|
|
2529
2563
|
children: typeof e == "string" ? e : e.label ?? e.value
|
|
2530
2564
|
}, t))]
|
|
@@ -2571,8 +2605,8 @@ function Ut({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
2571
2605
|
]
|
|
2572
2606
|
});
|
|
2573
2607
|
}
|
|
2574
|
-
function
|
|
2575
|
-
let { tenant: y, apiUrl: b } = i(
|
|
2608
|
+
function Yt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s, auto: c, submitLabel: p, nodeRef: m, inert: h, children: g, linked: _, show: v }) {
|
|
2609
|
+
let { tenant: y, apiUrl: b } = i(Y), [x, S] = l("form"), [C, w] = l(null), [T, E] = l({}), [D, O] = l(0), k = h ? v || "form" : x;
|
|
2576
2610
|
a(() => {
|
|
2577
2611
|
if (!c || !s) return;
|
|
2578
2612
|
let e = !0;
|
|
@@ -2593,11 +2627,11 @@ function Wt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
2593
2627
|
section: e,
|
|
2594
2628
|
fields: []
|
|
2595
2629
|
}) : A[A.length - 1].fields.push(e);
|
|
2596
|
-
let j = A.filter((e) => e.section || e.fields.length), M = j.filter((e) => !e.section ||
|
|
2630
|
+
let j = A.filter((e) => e.section || e.fields.length), M = j.filter((e) => !e.section || Ht(e.section.condition, T)).map((e) => ({
|
|
2597
2631
|
...e,
|
|
2598
|
-
fields: e.fields.filter((e) =>
|
|
2632
|
+
fields: e.fields.filter((e) => Ht(e.condition, T))
|
|
2599
2633
|
})), N = j.length > 1, F = Math.min(D, Math.max(0, M.length - 1)), I = N ? M[F]?.fields ?? [] : M.flatMap((e) => e.fields), L = I.filter((e) => {
|
|
2600
|
-
let t = T[
|
|
2634
|
+
let t = T[qt(e)];
|
|
2601
2635
|
return e.required && (t == null || t === "" || t === !1);
|
|
2602
2636
|
}), R = F >= M.length - 1, z = (e, t) => E((n) => {
|
|
2603
2637
|
let r = {
|
|
@@ -2653,11 +2687,11 @@ function Wt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
2653
2687
|
}
|
|
2654
2688
|
},
|
|
2655
2689
|
style: {
|
|
2656
|
-
...
|
|
2690
|
+
...Lt,
|
|
2657
2691
|
display: k === "success" ? "none" : "flex"
|
|
2658
2692
|
},
|
|
2659
2693
|
children: c && s ? /* @__PURE__ */ f(u, { children: [
|
|
2660
|
-
N && /* @__PURE__ */ d(
|
|
2694
|
+
N && /* @__PURE__ */ d(wn, {
|
|
2661
2695
|
steps: M.map((e) => ({ label: e.section?.label ?? "Start" })),
|
|
2662
2696
|
active: F + 1,
|
|
2663
2697
|
style: { marginBottom: 8 }
|
|
@@ -2670,9 +2704,9 @@ function Wt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
2670
2704
|
},
|
|
2671
2705
|
children: M[F].section.help
|
|
2672
2706
|
}),
|
|
2673
|
-
I.map((e) => /* @__PURE__ */ d(
|
|
2707
|
+
I.map((e) => /* @__PURE__ */ d(Jt, {
|
|
2674
2708
|
field: e,
|
|
2675
|
-
value: T[
|
|
2709
|
+
value: T[qt(e)],
|
|
2676
2710
|
values: T,
|
|
2677
2711
|
onChange: z,
|
|
2678
2712
|
inert: h
|
|
@@ -2689,7 +2723,7 @@ function Wt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
2689
2723
|
disabled: h || void 0,
|
|
2690
2724
|
onClick: () => O(F - 1),
|
|
2691
2725
|
style: {
|
|
2692
|
-
...
|
|
2726
|
+
...Me,
|
|
2693
2727
|
background: "transparent",
|
|
2694
2728
|
color: "inherit",
|
|
2695
2729
|
border: 0,
|
|
@@ -2702,7 +2736,7 @@ function Wt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
2702
2736
|
disabled: h || L.length > 0,
|
|
2703
2737
|
onClick: () => O(F + 1),
|
|
2704
2738
|
style: {
|
|
2705
|
-
...
|
|
2739
|
+
...Me,
|
|
2706
2740
|
border: 0,
|
|
2707
2741
|
padding: "10px 22px",
|
|
2708
2742
|
borderRadius: 8,
|
|
@@ -2716,7 +2750,7 @@ function Wt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
2716
2750
|
type: "submit",
|
|
2717
2751
|
disabled: h || void 0,
|
|
2718
2752
|
style: {
|
|
2719
|
-
...
|
|
2753
|
+
...Me,
|
|
2720
2754
|
border: 0,
|
|
2721
2755
|
padding: "10px 22px",
|
|
2722
2756
|
borderRadius: 8,
|
|
@@ -2743,10 +2777,10 @@ function Wt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
2743
2777
|
]
|
|
2744
2778
|
});
|
|
2745
2779
|
}
|
|
2746
|
-
var
|
|
2780
|
+
var Xt = null, Zt = null, Qt = (e) => {
|
|
2747
2781
|
let t = typeof e == "string" && e.trim() ? e.trim() : "";
|
|
2748
|
-
if (
|
|
2749
|
-
if (
|
|
2782
|
+
if (Xt && Zt === t) return Xt;
|
|
2783
|
+
if (Xt && typeof window < "u") {
|
|
2750
2784
|
for (let e of ["grecaptcha", "___grecaptcha_cfg"]) try {
|
|
2751
2785
|
delete window[e];
|
|
2752
2786
|
} catch {
|
|
@@ -2754,22 +2788,22 @@ var Gt = null, Kt = null, qt = (e) => {
|
|
|
2754
2788
|
}
|
|
2755
2789
|
document.querySelectorAll("script[src*=\"recaptcha\"]").forEach((e) => e.remove());
|
|
2756
2790
|
}
|
|
2757
|
-
return
|
|
2791
|
+
return Zt = t, Xt = new Promise((e) => {
|
|
2758
2792
|
if (typeof window > "u") return;
|
|
2759
2793
|
if (window.grecaptcha?.render) return e(window.grecaptcha);
|
|
2760
2794
|
window.__webimRecaptchaReady = () => e(window.grecaptcha);
|
|
2761
2795
|
let n = document.createElement("script");
|
|
2762
2796
|
n.src = `https://www.google.com/recaptcha/api.js?onload=__webimRecaptchaReady&render=explicit${t ? `&hl=${encodeURIComponent(t)}` : ""}`, n.async = !0, document.head.appendChild(n);
|
|
2763
|
-
}),
|
|
2797
|
+
}), Xt;
|
|
2764
2798
|
};
|
|
2765
|
-
function
|
|
2766
|
-
let p = i(
|
|
2799
|
+
function $t({ siteKey: e, theme: t, size: n, hl: r, style: o, nodeRef: s, inert: l, onChange: u }) {
|
|
2800
|
+
let p = i(Y), m = p?.settings && typeof p.settings == "object" ? p.settings["google.recaptchaKey"] : "", h = typeof e == "string" && e.trim() || (typeof m == "string" ? m.trim() : ""), g = c(null), _ = c(u);
|
|
2767
2801
|
if (_.current = u, a(() => {
|
|
2768
2802
|
if (l || !h || !g.current) return;
|
|
2769
2803
|
let e = !0, i = (t) => {
|
|
2770
2804
|
e && typeof _.current == "function" && _.current(t);
|
|
2771
2805
|
};
|
|
2772
|
-
return
|
|
2806
|
+
return Qt(r).then((r) => {
|
|
2773
2807
|
if (!(!e || !g.current || !r?.render)) {
|
|
2774
2808
|
g.current.innerHTML = "", i("");
|
|
2775
2809
|
try {
|
|
@@ -2851,17 +2885,17 @@ function Jt({ siteKey: e, theme: t, size: n, hl: r, style: o, nodeRef: s, inert:
|
|
|
2851
2885
|
children: /* @__PURE__ */ d("div", { ref: g })
|
|
2852
2886
|
}) : null;
|
|
2853
2887
|
}
|
|
2854
|
-
function
|
|
2888
|
+
function en({ text: e, parts: t, style: n, nodeRef: r, linked: i }) {
|
|
2855
2889
|
return /* @__PURE__ */ d("label", {
|
|
2856
2890
|
ref: r,
|
|
2857
2891
|
style: {
|
|
2858
|
-
...
|
|
2892
|
+
...Rt,
|
|
2859
2893
|
...P(n)
|
|
2860
2894
|
},
|
|
2861
|
-
children:
|
|
2895
|
+
children: Ue(t, e, i)
|
|
2862
2896
|
});
|
|
2863
2897
|
}
|
|
2864
|
-
function
|
|
2898
|
+
function tn({ type: e = "text", name: t, placeholder: n, required: r, style: i, nodeRef: a, inert: o }) {
|
|
2865
2899
|
return /* @__PURE__ */ d("input", {
|
|
2866
2900
|
ref: a,
|
|
2867
2901
|
type: e,
|
|
@@ -2869,13 +2903,13 @@ function Xt({ type: e = "text", name: t, placeholder: n, required: r, style: i,
|
|
|
2869
2903
|
placeholder: n,
|
|
2870
2904
|
required: !o && !!r,
|
|
2871
2905
|
style: {
|
|
2872
|
-
...
|
|
2906
|
+
...zt,
|
|
2873
2907
|
...P(i)
|
|
2874
2908
|
},
|
|
2875
|
-
...
|
|
2909
|
+
...Vt(o)
|
|
2876
2910
|
});
|
|
2877
2911
|
}
|
|
2878
|
-
function
|
|
2912
|
+
function nn({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeRef: a, inert: o }) {
|
|
2879
2913
|
return /* @__PURE__ */ d("textarea", {
|
|
2880
2914
|
ref: a,
|
|
2881
2915
|
name: e || void 0,
|
|
@@ -2883,18 +2917,18 @@ function Zt({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeR
|
|
|
2883
2917
|
rows: n,
|
|
2884
2918
|
required: !o && !!r,
|
|
2885
2919
|
style: {
|
|
2886
|
-
...
|
|
2920
|
+
...zt,
|
|
2887
2921
|
resize: "vertical",
|
|
2888
2922
|
...P(i)
|
|
2889
2923
|
},
|
|
2890
|
-
...
|
|
2924
|
+
...Vt(o)
|
|
2891
2925
|
});
|
|
2892
2926
|
}
|
|
2893
|
-
function
|
|
2927
|
+
function rn({ kind: e = "checkbox", label: t, name: n, value: r, required: i, style: a, nodeRef: o, inert: s }) {
|
|
2894
2928
|
return /* @__PURE__ */ f("label", {
|
|
2895
2929
|
ref: o,
|
|
2896
2930
|
style: {
|
|
2897
|
-
...
|
|
2931
|
+
...Bt,
|
|
2898
2932
|
...P(a)
|
|
2899
2933
|
},
|
|
2900
2934
|
children: [/* @__PURE__ */ d("input", {
|
|
@@ -2911,7 +2945,7 @@ function Qt({ kind: e = "checkbox", label: t, name: n, value: r, required: i, st
|
|
|
2911
2945
|
}), t]
|
|
2912
2946
|
});
|
|
2913
2947
|
}
|
|
2914
|
-
function
|
|
2948
|
+
function an({ name: e, placeholder: t, options: n = [], required: r, style: i, nodeRef: a, inert: o }) {
|
|
2915
2949
|
return /* @__PURE__ */ f("select", {
|
|
2916
2950
|
ref: a,
|
|
2917
2951
|
name: e || void 0,
|
|
@@ -2920,7 +2954,7 @@ function $t({ name: e, placeholder: t, options: n = [], required: r, style: i, n
|
|
|
2920
2954
|
onMouseDown: o ? (e) => e.preventDefault() : void 0,
|
|
2921
2955
|
tabIndex: o ? -1 : void 0,
|
|
2922
2956
|
style: {
|
|
2923
|
-
...
|
|
2957
|
+
...zt,
|
|
2924
2958
|
appearance: "auto",
|
|
2925
2959
|
...P(i)
|
|
2926
2960
|
},
|
|
@@ -2934,12 +2968,12 @@ function $t({ name: e, placeholder: t, options: n = [], required: r, style: i, n
|
|
|
2934
2968
|
}, t))]
|
|
2935
2969
|
});
|
|
2936
2970
|
}
|
|
2937
|
-
function
|
|
2971
|
+
function on({ name: e, accept: t, required: n, text: r = "Choose a file…", style: i, nodeRef: a, inert: o }) {
|
|
2938
2972
|
let [s, c] = l(null);
|
|
2939
2973
|
return /* @__PURE__ */ f("label", {
|
|
2940
2974
|
ref: a,
|
|
2941
2975
|
style: {
|
|
2942
|
-
...
|
|
2976
|
+
...zt,
|
|
2943
2977
|
display: "flex",
|
|
2944
2978
|
alignItems: "center",
|
|
2945
2979
|
gap: "8px",
|
|
@@ -2966,12 +3000,12 @@ function en({ name: e, accept: t, required: n, text: r = "Choose a file…", sty
|
|
|
2966
3000
|
]
|
|
2967
3001
|
});
|
|
2968
3002
|
}
|
|
2969
|
-
function
|
|
3003
|
+
function sn({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
|
|
2970
3004
|
return /* @__PURE__ */ d("button", {
|
|
2971
3005
|
ref: n,
|
|
2972
3006
|
type: r ? "button" : "submit",
|
|
2973
3007
|
style: {
|
|
2974
|
-
...
|
|
3008
|
+
...Me,
|
|
2975
3009
|
border: 0,
|
|
2976
3010
|
cursor: "pointer",
|
|
2977
3011
|
alignSelf: "flex-start",
|
|
@@ -2986,7 +3020,7 @@ function tn({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
|
|
|
2986
3020
|
children: e
|
|
2987
3021
|
});
|
|
2988
3022
|
}
|
|
2989
|
-
function
|
|
3023
|
+
function cn({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
|
|
2990
3024
|
let a = Math.max(1, (Number(e) || 1) * (Number(t) || 1));
|
|
2991
3025
|
return /* @__PURE__ */ d("div", {
|
|
2992
3026
|
ref: r,
|
|
@@ -3003,8 +3037,8 @@ function nn({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
|
|
|
3003
3037
|
}, t))
|
|
3004
3038
|
});
|
|
3005
3039
|
}
|
|
3006
|
-
function
|
|
3007
|
-
let { tenant: v, apiUrl: y, locale: b } = i(
|
|
3040
|
+
function ln({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, imageField: o, titleField: s = "name", textField: c, custom: u, templateId: p, paged: m, filters: h, style: g, nodeRef: _ }) {
|
|
3041
|
+
let { tenant: v, apiUrl: y, locale: b } = i(Y), x = i(Q), S = i(xe), [, C] = l(0);
|
|
3008
3042
|
a(() => {
|
|
3009
3043
|
if (typeof window > "u") return;
|
|
3010
3044
|
let e = () => C((e) => e + 1);
|
|
@@ -3012,7 +3046,7 @@ function rn({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
|
|
|
3012
3046
|
window.removeEventListener("popstate", e), window.removeEventListener("webim:urlchange", e);
|
|
3013
3047
|
};
|
|
3014
3048
|
}, []);
|
|
3015
|
-
let w =
|
|
3049
|
+
let w = Z(h), T = JSON.stringify(w), E = T !== "{}" && !e?.startsWith?.("api:"), D = E ? null : S?.[e], O = m ? Se(S) : 1, [k, A] = l(null);
|
|
3016
3050
|
if (a(() => {
|
|
3017
3051
|
if (!e || D) return;
|
|
3018
3052
|
let n = !0, r = new URLSearchParams();
|
|
@@ -3057,7 +3091,7 @@ function rn({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
|
|
|
3057
3091
|
},
|
|
3058
3092
|
children: M.map((e) => /* @__PURE__ */ d("div", {
|
|
3059
3093
|
style: { minWidth: 0 },
|
|
3060
|
-
children: x.render(p, (t) =>
|
|
3094
|
+
children: x.render(p, (t) => De(t, e))
|
|
3061
3095
|
}, e.id ?? e?.data?.slug))
|
|
3062
3096
|
}) : /* @__PURE__ */ d("div", {
|
|
3063
3097
|
ref: _,
|
|
@@ -3067,7 +3101,7 @@ function rn({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
|
|
|
3067
3101
|
...P(g)
|
|
3068
3102
|
},
|
|
3069
3103
|
children: M.map((e) => {
|
|
3070
|
-
let t = o ?
|
|
3104
|
+
let t = o ? we(e?.data, o) : null, r = s ? Ee(we(e?.data, s)) : null, i = c ? we(e?.data, c) : null, a = Array.isArray(i) ? i : null, l = a || i == null ? null : Ee(i), u = n === "list";
|
|
3071
3105
|
return /* @__PURE__ */ f("div", {
|
|
3072
3106
|
style: {
|
|
3073
3107
|
display: "flex",
|
|
@@ -3114,7 +3148,7 @@ function rn({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
|
|
|
3114
3148
|
lineHeight: 1.55,
|
|
3115
3149
|
opacity: .85
|
|
3116
3150
|
},
|
|
3117
|
-
children:
|
|
3151
|
+
children: Ye(a)
|
|
3118
3152
|
})
|
|
3119
3153
|
]
|
|
3120
3154
|
})]
|
|
@@ -3122,8 +3156,8 @@ function rn({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
|
|
|
3122
3156
|
})
|
|
3123
3157
|
});
|
|
3124
3158
|
}
|
|
3125
|
-
function
|
|
3126
|
-
let a = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && typeof e.name == "string" && e.name) : [], o = i ? {} :
|
|
3159
|
+
function un({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, inert: i }) {
|
|
3160
|
+
let a = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && typeof e.name == "string" && e.name) : [], o = i ? {} : X(), s = {
|
|
3127
3161
|
height: 34,
|
|
3128
3162
|
padding: "0 12px",
|
|
3129
3163
|
borderRadius: 8,
|
|
@@ -3171,7 +3205,7 @@ function an({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
3171
3205
|
name: `f_${e.name}`,
|
|
3172
3206
|
defaultValue: o[e.name] ?? "",
|
|
3173
3207
|
style: s,
|
|
3174
|
-
...
|
|
3208
|
+
...Vt(i),
|
|
3175
3209
|
children: [/* @__PURE__ */ d("option", {
|
|
3176
3210
|
value: "",
|
|
3177
3211
|
children: e.label || e.name
|
|
@@ -3186,7 +3220,7 @@ function an({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
3186
3220
|
name: `f_${e.name}`,
|
|
3187
3221
|
defaultValue: o[e.name] ?? "",
|
|
3188
3222
|
style: s,
|
|
3189
|
-
...
|
|
3223
|
+
...Vt(i),
|
|
3190
3224
|
children: [
|
|
3191
3225
|
/* @__PURE__ */ d("option", {
|
|
3192
3226
|
value: "",
|
|
@@ -3207,7 +3241,7 @@ function an({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
3207
3241
|
defaultValue: o[e.name] ?? "",
|
|
3208
3242
|
placeholder: e.label || e.name,
|
|
3209
3243
|
style: s,
|
|
3210
|
-
...
|
|
3244
|
+
...Vt(i)
|
|
3211
3245
|
}, e.name)), /* @__PURE__ */ d("button", {
|
|
3212
3246
|
type: "submit",
|
|
3213
3247
|
style: {
|
|
@@ -3220,12 +3254,12 @@ function an({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
3220
3254
|
fontWeight: 600,
|
|
3221
3255
|
cursor: i ? "default" : "pointer"
|
|
3222
3256
|
},
|
|
3223
|
-
...
|
|
3257
|
+
...Vt(i),
|
|
3224
3258
|
children: t
|
|
3225
3259
|
})]
|
|
3226
3260
|
});
|
|
3227
3261
|
}
|
|
3228
|
-
function
|
|
3262
|
+
function dn({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
|
|
3229
3263
|
return e.length ? /* @__PURE__ */ d("nav", {
|
|
3230
3264
|
ref: r,
|
|
3231
3265
|
"aria-label": "Breadcrumb",
|
|
@@ -3275,8 +3309,8 @@ function on({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
|
|
|
3275
3309
|
})
|
|
3276
3310
|
}) : null;
|
|
3277
3311
|
}
|
|
3278
|
-
function
|
|
3279
|
-
let { tenant: g, apiUrl: _ } = i(
|
|
3312
|
+
function fn({ pages: e = 5, current: t = 1, prevNext: n = !0, href: r = "#", source: o, pageSize: s = 6, align: c, hideEmpty: u, inert: p, style: m, nodeRef: h }) {
|
|
3313
|
+
let { tenant: g, apiUrl: _ } = i(Y), v = i(xe), [y, b] = l(null), x = o ? Number(v?.[`${o}:total`]) : NaN;
|
|
3280
3314
|
a(() => {
|
|
3281
3315
|
if (!o || Number.isFinite(x)) return;
|
|
3282
3316
|
let e = !0, t = o.startsWith("api:") ? `${_}/data/${encodeURIComponent(o.slice(4))}` : `${_}/dynamic/${encodeURIComponent(o)}?limit=1`;
|
|
@@ -3295,7 +3329,7 @@ function sn({ pages: e = 5, current: t = 1, prevNext: n = !0, href: r = "#", sou
|
|
|
3295
3329
|
]);
|
|
3296
3330
|
let S = Math.max(1, Number(s) || 6), C = Number.isFinite(x) ? x : y;
|
|
3297
3331
|
if (o && C === null || o && u && !(C > 0)) return null;
|
|
3298
|
-
let w = Math.min(Math.max(o ? Math.ceil(C / S) : Number(e) || 1, 1), 50), T = Math.min(Math.max(o ?
|
|
3332
|
+
let w = Math.min(Math.max(o ? Math.ceil(C / S) : Number(e) || 1, 1), 50), T = Math.min(Math.max(o ? Se(v) : Number(t) || 1, 1), w), E = (e) => {
|
|
3299
3333
|
if (o) {
|
|
3300
3334
|
if (typeof window < "u") {
|
|
3301
3335
|
let t = new URLSearchParams(window.location.search);
|
|
@@ -3360,15 +3394,15 @@ function sn({ pages: e = 5, current: t = 1, prevNext: n = !0, href: r = "#", sou
|
|
|
3360
3394
|
]
|
|
3361
3395
|
});
|
|
3362
3396
|
}
|
|
3363
|
-
var
|
|
3397
|
+
var pn = "webim.page_mode", mn = () => {
|
|
3364
3398
|
if (typeof window > "u") return "auto";
|
|
3365
3399
|
try {
|
|
3366
|
-
let e = window.localStorage.getItem(
|
|
3400
|
+
let e = window.localStorage.getItem(pn);
|
|
3367
3401
|
return e === "light" || e === "dark" ? e : "auto";
|
|
3368
3402
|
} catch {
|
|
3369
3403
|
return "auto";
|
|
3370
3404
|
}
|
|
3371
|
-
},
|
|
3405
|
+
}, hn = (e) => {
|
|
3372
3406
|
let t = {
|
|
3373
3407
|
width: 16,
|
|
3374
3408
|
height: 16,
|
|
@@ -3400,13 +3434,13 @@ var cn = "webim.page_mode", ln = () => {
|
|
|
3400
3434
|
rx: "2"
|
|
3401
3435
|
}), /* @__PURE__ */ d("path", { d: "M8 21h8M12 17v4" })]
|
|
3402
3436
|
});
|
|
3403
|
-
},
|
|
3437
|
+
}, gn = {
|
|
3404
3438
|
light: "Light theme",
|
|
3405
3439
|
dark: "Dark theme",
|
|
3406
3440
|
auto: "Follow the device theme"
|
|
3407
3441
|
};
|
|
3408
|
-
function
|
|
3409
|
-
let [o, s] = l(i ? "auto" :
|
|
3442
|
+
function _n({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
|
|
3443
|
+
let [o, s] = l(i ? "auto" : mn), u = c(null), f = (e) => {
|
|
3410
3444
|
u.current = e, typeof r == "function" && r(e);
|
|
3411
3445
|
};
|
|
3412
3446
|
a(() => {
|
|
@@ -3414,7 +3448,7 @@ function fn({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
|
|
|
3414
3448
|
let e = u.current?.closest?.(".webim-page");
|
|
3415
3449
|
e && (o === "light" || o === "dark" ? e.setAttribute("data-webim-mode", o) : e.removeAttribute("data-webim-mode"));
|
|
3416
3450
|
try {
|
|
3417
|
-
o === "auto" ? window.localStorage.removeItem(
|
|
3451
|
+
o === "auto" ? window.localStorage.removeItem(pn) : window.localStorage.setItem(pn, o);
|
|
3418
3452
|
} catch {}
|
|
3419
3453
|
}, [o, i]);
|
|
3420
3454
|
let p = t === !1 ? ["light", "dark"] : [
|
|
@@ -3449,8 +3483,8 @@ function fn({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
|
|
|
3449
3483
|
},
|
|
3450
3484
|
children: p.map((e) => /* @__PURE__ */ d("button", {
|
|
3451
3485
|
type: "button",
|
|
3452
|
-
title:
|
|
3453
|
-
"aria-label":
|
|
3486
|
+
title: gn[e],
|
|
3487
|
+
"aria-label": gn[e],
|
|
3454
3488
|
"aria-pressed": e === m,
|
|
3455
3489
|
onClick: i ? void 0 : () => s(e),
|
|
3456
3490
|
style: {
|
|
@@ -3461,15 +3495,15 @@ function fn({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
|
|
|
3461
3495
|
background: e === m ? "var(--page-accent, #111827)" : "transparent",
|
|
3462
3496
|
opacity: e === m ? 1 : .7
|
|
3463
3497
|
},
|
|
3464
|
-
children:
|
|
3498
|
+
children: hn(e)
|
|
3465
3499
|
}, e))
|
|
3466
3500
|
});
|
|
3467
3501
|
let g = p[(p.indexOf(m) + 1) % p.length];
|
|
3468
3502
|
return /* @__PURE__ */ d("button", {
|
|
3469
3503
|
ref: f,
|
|
3470
3504
|
type: "button",
|
|
3471
|
-
title:
|
|
3472
|
-
"aria-label": `Theme: ${
|
|
3505
|
+
title: gn[m],
|
|
3506
|
+
"aria-label": `Theme: ${gn[m]} — switch to ${gn[g]}`,
|
|
3473
3507
|
onClick: i ? void 0 : () => s(g),
|
|
3474
3508
|
style: {
|
|
3475
3509
|
...h,
|
|
@@ -3478,10 +3512,10 @@ function fn({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
|
|
|
3478
3512
|
border: "1px solid rgba(148, 163, 184, 0.4)",
|
|
3479
3513
|
...P(n)
|
|
3480
3514
|
},
|
|
3481
|
-
children:
|
|
3515
|
+
children: hn(m)
|
|
3482
3516
|
});
|
|
3483
3517
|
}
|
|
3484
|
-
function
|
|
3518
|
+
function vn(e) {
|
|
3485
3519
|
let t = e?.parentElement;
|
|
3486
3520
|
for (; t && t !== document.body;) {
|
|
3487
3521
|
let e = getComputedStyle(t).overflowY;
|
|
@@ -3490,7 +3524,7 @@ function pn(e) {
|
|
|
3490
3524
|
}
|
|
3491
3525
|
return window;
|
|
3492
3526
|
}
|
|
3493
|
-
var
|
|
3527
|
+
var yn = (e) => e === window ? window.scrollY : e.scrollTop, bn = {
|
|
3494
3528
|
"bottom-right": (e) => ({
|
|
3495
3529
|
right: e,
|
|
3496
3530
|
bottom: e
|
|
@@ -3505,7 +3539,7 @@ var mn = (e) => e === window ? window.scrollY : e.scrollTop, hn = {
|
|
|
3505
3539
|
transform: "translateX(-50%)"
|
|
3506
3540
|
})
|
|
3507
3541
|
};
|
|
3508
|
-
function
|
|
3542
|
+
function xn({ variant: e, label: t, position: n, offset: r, showAfter: i, smooth: o, bg: s, fg: c, style: u, nodeRef: p, inert: m, frame: h, builder: g }) {
|
|
3509
3543
|
let [_, v] = l(!!m), [y, b] = l(null), x = (e) => {
|
|
3510
3544
|
b(e), typeof p == "function" && p(e);
|
|
3511
3545
|
};
|
|
@@ -3516,8 +3550,8 @@ function gn({ variant: e, label: t, position: n, offset: r, showAfter: i, smooth
|
|
|
3516
3550
|
}
|
|
3517
3551
|
if (!y) return;
|
|
3518
3552
|
let e = Number(i) >= 0 ? Number(i) : 300, t = () => {
|
|
3519
|
-
let t =
|
|
3520
|
-
v(n ||
|
|
3553
|
+
let t = vn(y), n = g && !(t === window ? document.documentElement.scrollHeight > window.innerHeight : t.scrollHeight > t.clientHeight);
|
|
3554
|
+
v(n || yn(t) > e);
|
|
3521
3555
|
};
|
|
3522
3556
|
return t(), document.addEventListener("scroll", t, {
|
|
3523
3557
|
capture: !0,
|
|
@@ -3531,7 +3565,7 @@ function gn({ variant: e, label: t, position: n, offset: r, showAfter: i, smooth
|
|
|
3531
3565
|
]);
|
|
3532
3566
|
let S = () => {
|
|
3533
3567
|
if (m) return;
|
|
3534
|
-
let e =
|
|
3568
|
+
let e = vn(y), t = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches, n = o === !1 || t ? "auto" : "smooth";
|
|
3535
3569
|
e === window ? window.scrollTo({
|
|
3536
3570
|
top: 0,
|
|
3537
3571
|
behavior: n
|
|
@@ -3539,7 +3573,7 @@ function gn({ variant: e, label: t, position: n, offset: r, showAfter: i, smooth
|
|
|
3539
3573
|
top: 0,
|
|
3540
3574
|
behavior: n
|
|
3541
3575
|
});
|
|
3542
|
-
}, C = Number(r) >= 0 ? Number(r) : 24, w = e === "pill", T = t || "Top", E =
|
|
3576
|
+
}, C = Number(r) >= 0 ? Number(r) : 24, w = e === "pill", T = t || "Top", E = bn[n] ? n : "bottom-right", D = h ? {
|
|
3543
3577
|
position: "fixed",
|
|
3544
3578
|
zIndex: 5,
|
|
3545
3579
|
bottom: (h.bottom ?? 0) + C,
|
|
@@ -3552,7 +3586,7 @@ function gn({ variant: e, label: t, position: n, offset: r, showAfter: i, smooth
|
|
|
3552
3586
|
} : {
|
|
3553
3587
|
position: "fixed",
|
|
3554
3588
|
zIndex: 2147482e3,
|
|
3555
|
-
...
|
|
3589
|
+
...bn[E](C)
|
|
3556
3590
|
};
|
|
3557
3591
|
return /* @__PURE__ */ f("button", {
|
|
3558
3592
|
ref: x,
|
|
@@ -3603,7 +3637,7 @@ function gn({ variant: e, label: t, position: n, offset: r, showAfter: i, smooth
|
|
|
3603
3637
|
}), w ? /* @__PURE__ */ d("span", { children: T }) : null]
|
|
3604
3638
|
});
|
|
3605
3639
|
}
|
|
3606
|
-
var
|
|
3640
|
+
var Sn = {
|
|
3607
3641
|
facebook: {
|
|
3608
3642
|
label: "Facebook",
|
|
3609
3643
|
color: "#1877f2",
|
|
@@ -3670,8 +3704,8 @@ var _n = {
|
|
|
3670
3704
|
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"
|
|
3671
3705
|
}
|
|
3672
3706
|
};
|
|
3673
|
-
function
|
|
3674
|
-
let l = Array.isArray(e) ? e.filter((e) => e &&
|
|
3707
|
+
function Cn({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, style: o, nodeRef: s, inert: c }) {
|
|
3708
|
+
let l = Array.isArray(e) ? e.filter((e) => e && Sn[e.network]) : [];
|
|
3675
3709
|
if (!l.length) return null;
|
|
3676
3710
|
let u = Math.min(Math.max(Number(r) || 18, 10), 64), f = Math.round(u * 1.9), p = Number.isFinite(Number(i)) ? Number(i) : 10, m = (e) => n === "accent" ? "var(--page-accent, #111827)" : n === "inherit" ? "currentColor" : e.color, h = c ? (e) => e.preventDefault() : void 0;
|
|
3677
3711
|
return /* @__PURE__ */ d("div", {
|
|
@@ -3684,7 +3718,7 @@ function vn({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, s
|
|
|
3684
3718
|
...P(o)
|
|
3685
3719
|
},
|
|
3686
3720
|
children: l.map((e, r) => {
|
|
3687
|
-
let i =
|
|
3721
|
+
let i = Sn[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);
|
|
3688
3722
|
return /* @__PURE__ */ d("a", {
|
|
3689
3723
|
href: e.url || "#",
|
|
3690
3724
|
onClick: h,
|
|
@@ -3718,7 +3752,7 @@ function vn({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, s
|
|
|
3718
3752
|
})
|
|
3719
3753
|
});
|
|
3720
3754
|
}
|
|
3721
|
-
function
|
|
3755
|
+
function wn({ steps: e = [], active: n = 1, vertical: r = !1, style: i, nodeRef: a }) {
|
|
3722
3756
|
if (!e.length) return null;
|
|
3723
3757
|
let o = Math.min(Math.max(Number(n) || 1, 1), e.length), s = (e) => ({
|
|
3724
3758
|
width: 32,
|
|
@@ -3796,7 +3830,7 @@ function yn({ steps: e = [], active: n = 1, vertical: r = !1, style: i, nodeRef:
|
|
|
3796
3830
|
})
|
|
3797
3831
|
});
|
|
3798
3832
|
}
|
|
3799
|
-
var
|
|
3833
|
+
var Tn = {
|
|
3800
3834
|
small: {
|
|
3801
3835
|
w: 132,
|
|
3802
3836
|
h: 46,
|
|
@@ -3818,21 +3852,21 @@ var bn = {
|
|
|
3818
3852
|
title: 12.5,
|
|
3819
3853
|
avatar: 46
|
|
3820
3854
|
}
|
|
3821
|
-
},
|
|
3822
|
-
|
|
3823
|
-
var
|
|
3855
|
+
}, En = (e) => Tn[e] ?? Tn.medium;
|
|
3856
|
+
Tn.medium.w, Tn.medium.h;
|
|
3857
|
+
var Dn = (e) => String(e?.group ?? "").trim(), On = (e) => {
|
|
3824
3858
|
let t = [], n = /* @__PURE__ */ new Map();
|
|
3825
3859
|
return e.forEach((e, r) => {
|
|
3826
|
-
let i =
|
|
3860
|
+
let i = Dn(e) || `#${r}`;
|
|
3827
3861
|
n.has(i) || (n.set(i, []), t.push(i)), n.get(i).push(e);
|
|
3828
3862
|
}), t.flatMap((e) => n.get(e));
|
|
3829
3863
|
};
|
|
3830
|
-
function
|
|
3831
|
-
let i =
|
|
3864
|
+
function kn(e, { size: t = "medium", horizontal: n = !1, groupTitles: r = "top" } = {}) {
|
|
3865
|
+
let i = En(t), a = n ? i.h : i.w, o = n ? 16 : 20, s = (n ? i.w : i.h) + (n ? 56 : 48), c = Array.isArray(e) ? e.filter((e) => e && e.id) : [], l = new Set(c.map((e) => e.id)), u = /* @__PURE__ */ new Map(), d = [];
|
|
3832
3866
|
for (let e of c) e.parent && l.has(e.parent) && e.parent !== e.id ? (u.has(e.parent) || u.set(e.parent, []), u.get(e.parent).push(e)) : d.push(e);
|
|
3833
|
-
d =
|
|
3834
|
-
for (let [e, t] of u) u.set(e,
|
|
3835
|
-
let f = (e, t) => o + (
|
|
3867
|
+
d = On(d);
|
|
3868
|
+
for (let [e, t] of u) u.set(e, On(t));
|
|
3869
|
+
let f = (e, t) => o + (Dn(e) !== Dn(t) && (Dn(e) || Dn(t)) ? 24 : 0), p = /* @__PURE__ */ new Map(), m = (e, t) => {
|
|
3836
3870
|
if (t.has(e.id)) return 0;
|
|
3837
3871
|
t.add(e.id);
|
|
3838
3872
|
let n = u.get(e.id) ?? [], r = n.reduce((e, r, i) => e + m(r, t) + (i ? f(n[i - 1], r) : 0), 0), i = Math.max(a, r);
|
|
@@ -3848,7 +3882,7 @@ function wn(e, { size: t = "medium", horizontal: n = !1, groupTitles: r = "top"
|
|
|
3848
3882
|
x: m,
|
|
3849
3883
|
y: b
|
|
3850
3884
|
});
|
|
3851
|
-
let x =
|
|
3885
|
+
let x = Dn(e);
|
|
3852
3886
|
if (x) {
|
|
3853
3887
|
let t = `${e.parent && l.has(e.parent) && e.parent !== e.id ? e.parent : ""}|${x}`;
|
|
3854
3888
|
_.has(t) || _.set(t, {
|
|
@@ -3922,19 +3956,19 @@ function wn(e, { size: t = "medium", horizontal: n = !1, groupTitles: r = "top"
|
|
|
3922
3956
|
horizontal: n
|
|
3923
3957
|
};
|
|
3924
3958
|
}
|
|
3925
|
-
var
|
|
3959
|
+
var An = (e, t) => {
|
|
3926
3960
|
let n = String(e ?? "");
|
|
3927
3961
|
return n.length > t ? `${n.slice(0, t - 1)}…` : n;
|
|
3928
|
-
},
|
|
3962
|
+
}, jn = (e) => {
|
|
3929
3963
|
let t = /^#([0-9a-f]{6}|[0-9a-f]{3})$/i.exec(String(e ?? "").trim());
|
|
3930
3964
|
if (!t) return "#ffffff";
|
|
3931
3965
|
let n = t[1];
|
|
3932
3966
|
n.length === 3 && (n = [...n].map((e) => e + e).join(""));
|
|
3933
3967
|
let r = parseInt(n, 16);
|
|
3934
3968
|
return .299 * (r >> 16 & 255) + .587 * (r >> 8 & 255) + .114 * (r & 255) > 150 ? "#111827" : "#ffffff";
|
|
3935
|
-
},
|
|
3936
|
-
function
|
|
3937
|
-
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 ? "" :
|
|
3969
|
+
}, Mn = (e) => !!(e?.cv?.trim?.() || e?.photo);
|
|
3970
|
+
function Nn(e, t = {}) {
|
|
3971
|
+
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 ? "" : Ee(e);
|
|
3938
3972
|
return n.map((e) => {
|
|
3939
3973
|
let n = e.data ?? {}, a = r(n[t.parentField]), o = a && typeof a == "object" ? a.id ?? null : a || null;
|
|
3940
3974
|
return {
|
|
@@ -3949,11 +3983,11 @@ function On(e, t = {}) {
|
|
|
3949
3983
|
};
|
|
3950
3984
|
});
|
|
3951
3985
|
}
|
|
3952
|
-
var
|
|
3986
|
+
var Pn = {
|
|
3953
3987
|
size: 36,
|
|
3954
3988
|
pad: 10
|
|
3955
3989
|
};
|
|
3956
|
-
function
|
|
3990
|
+
function Fn({ node: e, onClose: t }) {
|
|
3957
3991
|
return a(() => {
|
|
3958
3992
|
let e = (e) => e.key === "Escape" && t();
|
|
3959
3993
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
@@ -4074,8 +4108,8 @@ function An({ node: e, onClose: t }) {
|
|
|
4074
4108
|
})
|
|
4075
4109
|
});
|
|
4076
4110
|
}
|
|
4077
|
-
function
|
|
4078
|
-
let C = o(), [w, T] = l(null), { tenant: E, apiUrl: D } = i(
|
|
4111
|
+
function In({ nodes: e = [], source: t, nameField: n, titleField: r, photoField: s, parentField: c, cvField: p, hrefField: m, groupField: h, groupTitles: g = "top", groupBg: _ = "", size: v = "medium", horizontal: y = !1, style: b, nodeRef: x, interactive: S = !0 }) {
|
|
4112
|
+
let C = o(), [w, T] = l(null), { tenant: E, apiUrl: D } = i(Y), O = i(xe)?.[t], [k, A] = l(null);
|
|
4079
4113
|
a(() => {
|
|
4080
4114
|
if (!t || O) return;
|
|
4081
4115
|
let e = !0;
|
|
@@ -4091,7 +4125,7 @@ function jn({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
4091
4125
|
D,
|
|
4092
4126
|
O
|
|
4093
4127
|
]);
|
|
4094
|
-
let j = t ?
|
|
4128
|
+
let j = t ? Nn(O ?? k ?? [], {
|
|
4095
4129
|
nameField: n,
|
|
4096
4130
|
titleField: r,
|
|
4097
4131
|
photoField: s,
|
|
@@ -4099,7 +4133,7 @@ function jn({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
4099
4133
|
cvField: p,
|
|
4100
4134
|
hrefField: m,
|
|
4101
4135
|
groupField: h
|
|
4102
|
-
}) : e, M =
|
|
4136
|
+
}) : e, M = En(v), { boxes: N, links: F, groups: I, width: L, height: R } = kn(j, {
|
|
4103
4137
|
size: v,
|
|
4104
4138
|
horizontal: y,
|
|
4105
4139
|
groupTitles: g
|
|
@@ -4157,8 +4191,8 @@ function jn({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
4157
4191
|
fontSize: M.title + 1,
|
|
4158
4192
|
fontWeight: "600",
|
|
4159
4193
|
opacity: "0.55",
|
|
4160
|
-
fill: r ?
|
|
4161
|
-
children:
|
|
4194
|
+
fill: r ? jn(e.color || _) : "var(--page-text, #111827)",
|
|
4195
|
+
children: An(e.title, Math.floor(e.width / 7))
|
|
4162
4196
|
})] }, `group-${t}`);
|
|
4163
4197
|
}),
|
|
4164
4198
|
F.map((e, t) => /* @__PURE__ */ d("path", {
|
|
@@ -4168,7 +4202,7 @@ function jn({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
4168
4202
|
strokeWidth: "1.5"
|
|
4169
4203
|
}, t)),
|
|
4170
4204
|
N.map(({ node: e, x: t, y: n }) => {
|
|
4171
|
-
let r = z.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 ?
|
|
4205
|
+
let r = z.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 ? jn(e.color) : r ? "var(--page-accent-text, #ffffff)" : "var(--page-text, #111827)", c = i ? jn(e.color2) : s, l = S && (Mn(e) || e.href), p = () => Mn(e) ? T(e) : window.open(e.href, "_blank", "noreferrer"), m = e.photo ? t + Pn.pad + M.avatar + 8 : t + M.w / 2, h = e.photo ? "start" : "middle", g = e.photo ? Math.floor((M.w - M.avatar - 26) / 7) : Math.floor(M.w / 7.6), _ = M.h / 2, v = [e.name, e.title].map((e) => String(e ?? "").trim()).filter(Boolean);
|
|
4172
4206
|
return /* @__PURE__ */ f("g", {
|
|
4173
4207
|
onClick: l ? p : void 0,
|
|
4174
4208
|
style: l ? { cursor: "pointer" } : void 0,
|
|
@@ -4232,13 +4266,13 @@ function jn({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
4232
4266
|
e.photo && /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("clipPath", {
|
|
4233
4267
|
id: `${C}-${e.id}`,
|
|
4234
4268
|
children: /* @__PURE__ */ d("circle", {
|
|
4235
|
-
cx: t +
|
|
4269
|
+
cx: t + Pn.pad + M.avatar / 2,
|
|
4236
4270
|
cy: n + M.h / 2,
|
|
4237
4271
|
r: M.avatar / 2
|
|
4238
4272
|
})
|
|
4239
4273
|
}), /* @__PURE__ */ d("image", {
|
|
4240
4274
|
href: e.photo,
|
|
4241
|
-
x: t +
|
|
4275
|
+
x: t + Pn.pad,
|
|
4242
4276
|
y: n + (M.h - M.avatar) / 2,
|
|
4243
4277
|
width: M.avatar,
|
|
4244
4278
|
height: M.avatar,
|
|
@@ -4252,7 +4286,7 @@ function jn({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
4252
4286
|
fontSize: M.title,
|
|
4253
4287
|
fontWeight: "600",
|
|
4254
4288
|
fill: s,
|
|
4255
|
-
children:
|
|
4289
|
+
children: An(e.title, g + 4)
|
|
4256
4290
|
}), e.name && /* @__PURE__ */ d("text", {
|
|
4257
4291
|
x: m,
|
|
4258
4292
|
y: n + _ + _ / 2 + M.name * .35,
|
|
@@ -4260,7 +4294,7 @@ function jn({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
4260
4294
|
fontSize: M.name,
|
|
4261
4295
|
fontWeight: "600",
|
|
4262
4296
|
fill: c,
|
|
4263
|
-
children:
|
|
4297
|
+
children: An(e.name, g)
|
|
4264
4298
|
})] }) : /* @__PURE__ */ f(u, { children: [v[0] && /* @__PURE__ */ d("text", {
|
|
4265
4299
|
x: m,
|
|
4266
4300
|
y: n + (v[1] ? M.h * .43 : M.h * .57),
|
|
@@ -4268,7 +4302,7 @@ function jn({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
4268
4302
|
fontSize: M.name,
|
|
4269
4303
|
fontWeight: "600",
|
|
4270
4304
|
fill: s,
|
|
4271
|
-
children:
|
|
4305
|
+
children: An(v[0], g)
|
|
4272
4306
|
}), v[1] && /* @__PURE__ */ d("text", {
|
|
4273
4307
|
x: m,
|
|
4274
4308
|
y: n + M.h * .73,
|
|
@@ -4276,19 +4310,19 @@ function jn({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
4276
4310
|
fontSize: M.title,
|
|
4277
4311
|
opacity: "0.7",
|
|
4278
4312
|
fill: s,
|
|
4279
|
-
children:
|
|
4313
|
+
children: An(v[1], g + 4)
|
|
4280
4314
|
})] })
|
|
4281
4315
|
]
|
|
4282
4316
|
}, e.id);
|
|
4283
4317
|
})
|
|
4284
4318
|
]
|
|
4285
|
-
}), w && /* @__PURE__ */ d(
|
|
4319
|
+
}), w && /* @__PURE__ */ d(Fn, {
|
|
4286
4320
|
node: w,
|
|
4287
4321
|
onClose: () => T(null)
|
|
4288
4322
|
})]
|
|
4289
4323
|
});
|
|
4290
4324
|
}
|
|
4291
|
-
function
|
|
4325
|
+
function Ln({ value: e, onCommit: t, style: n, hint: r }) {
|
|
4292
4326
|
let [i, o] = l(!1), s = c(null);
|
|
4293
4327
|
return a(() => {
|
|
4294
4328
|
if (!i || !s.current) return;
|
|
@@ -4318,7 +4352,7 @@ function Mn({ value: e, onCommit: t, style: n, hint: r }) {
|
|
|
4318
4352
|
children: e ?? ""
|
|
4319
4353
|
});
|
|
4320
4354
|
}
|
|
4321
|
-
var
|
|
4355
|
+
var Rn = 360, zn = "\n.wb-tedit-btn {\n cursor: pointer;\n border-radius: 4px;\n font-size: 11px;\n line-height: 16px;\n min-width: 20px;\n text-align: center;\n padding: 1px 4px;\n user-select: none;\n color: #e2e8f0;\n background: rgba(148, 163, 184, 0.16);\n}\n.wb-tedit-btn:hover { background: #4f46e5; color: #fff; }\n.wb-tedit-btn[data-hint] { position: relative; }\n.wb-tedit-btn[data-hint]:hover::after {\n content: attr(data-hint);\n position: absolute;\n bottom: calc(100% + 6px);\n left: 50%;\n transform: translateX(-50%);\n padding: 3px 6px;\n border-radius: 5px;\n background: #1e293b;\n border: 1px solid rgba(148, 163, 184, 0.35);\n color: #e2e8f0;\n font-size: 10px;\n line-height: 14px;\n white-space: nowrap;\n pointer-events: none;\n z-index: 6;\n}\n.wb-tedit-grip { position: absolute; top: 0; right: -3px; width: 6px; height: 100%; cursor: col-resize; }\n.wb-tedit-grip:hover { background: rgba(99, 102, 241, 0.55); }\n.wb-tedit-rowgrip { position: absolute; left: 0; right: 0; bottom: -3px; height: 6px; cursor: row-resize; }\n.wb-tedit-rowgrip:hover { background: rgba(99, 102, 241, 0.55); }\n.wb-tedit-cellon { outline: 2px solid rgba(99, 102, 241, 0.75); outline-offset: -2px; }\n.wb-tedit-bar {\n position: absolute;\n z-index: 5;\n display: flex;\n align-items: center;\n gap: 3px;\n padding: 4px 5px;\n border-radius: 8px;\n background: #0f172a;\n border: 1px solid rgba(148, 163, 184, 0.35);\n box-shadow: 0 6px 18px rgba(15, 23, 42, 0.35);\n white-space: nowrap;\n}\n.wb-tedit-sep { width: 1px; align-self: stretch; margin: 0 2px; background: rgba(148, 163, 184, 0.3); }\n.wb-tedit-at { font-size: 10px; color: #94a3b8; padding-right: 2px; }\n", Bn = (e, t) => e && t ? `cell-${e}-${t}` : "", Vn = (e) => {
|
|
4322
4356
|
if (!e || typeof e != "object") return e ?? "";
|
|
4323
4357
|
let t = String(e.text ?? "");
|
|
4324
4358
|
return typeof e.href == "string" && e.href ? /* @__PURE__ */ d("a", {
|
|
@@ -4329,8 +4363,8 @@ var Nn = 360, Pn = "\n.wb-tedit-btn {\n cursor: pointer;\n border-radius: 4px;
|
|
|
4329
4363
|
children: t
|
|
4330
4364
|
}) : t;
|
|
4331
4365
|
};
|
|
4332
|
-
function
|
|
4333
|
-
let F = c(null), I = c(null), [L, R] = l(null), [z, B] = l(null),
|
|
4366
|
+
function Hn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], colKeys: o = [], heights: s = [], spans: p, linked: m, source: h, limit: g = 10, header: _ = !0, striped: v = !0, bordered: y = !1, compact: b = !1, padX: x, padY: S, paged: C, emptyText: w, stickyHeader: T, headerBg: E, headerColor: D, headerAlign: O, borderColor: k, maxHeight: A, style: j, nodeRef: M, edit: N }) {
|
|
4367
|
+
let F = c(null), I = c(null), [L, R] = l(null), [z, B] = l(null), V = (e, t) => () => R({
|
|
4334
4368
|
r: e,
|
|
4335
4369
|
c: t
|
|
4336
4370
|
});
|
|
@@ -4343,7 +4377,7 @@ function Ln({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
|
|
|
4343
4377
|
}
|
|
4344
4378
|
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = {
|
|
4345
4379
|
top: r.bottom - n.top + 4,
|
|
4346
|
-
left: Math.max(0, Math.min(r.left - n.left, n.width -
|
|
4380
|
+
left: Math.max(0, Math.min(r.left - n.left, n.width - Rn))
|
|
4347
4381
|
};
|
|
4348
4382
|
(z?.top !== i.top || z?.left !== i.left) && B(i);
|
|
4349
4383
|
}), a(() => {
|
|
@@ -4353,58 +4387,58 @@ function Ln({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
|
|
|
4353
4387
|
};
|
|
4354
4388
|
return document.addEventListener("mousedown", e, !0), () => document.removeEventListener("mousedown", e, !0);
|
|
4355
4389
|
}, [N, L]);
|
|
4356
|
-
let { tenant:
|
|
4390
|
+
let { tenant: H, apiUrl: U } = i(Y), ee = i(xe), te = ee?.[h], ne = C ? Se(ee) : 1, [re, ie] = l(null);
|
|
4357
4391
|
if (a(() => {
|
|
4358
|
-
if (!h ||
|
|
4359
|
-
let e = !0, t = Math.max(1, Number(g) || 10), n = C && !h.startsWith("api:") ? `?offset=${(
|
|
4360
|
-
return fetch(r, { headers:
|
|
4392
|
+
if (!h || te) return;
|
|
4393
|
+
let e = !0, t = Math.max(1, Number(g) || 10), n = C && !h.startsWith("api:") ? `?offset=${(ne - 1) * t}&limit=${t}` : "", r = h.startsWith("api:") ? `${U}/data/${encodeURIComponent(h.slice(4))}` : `${U}/dynamic/${encodeURIComponent(h)}${n}`;
|
|
4394
|
+
return fetch(r, { headers: H ? { "x-tenant": H } : {} }).then((e) => e.json()).then((t) => {
|
|
4361
4395
|
let n = Array.isArray(t?.payload) ? t.payload : Array.isArray(t?.payload?.data) ? t.payload.data : [];
|
|
4362
|
-
return e &&
|
|
4363
|
-
}).catch(() => e &&
|
|
4396
|
+
return e && ie(n);
|
|
4397
|
+
}).catch(() => e && ie([])), () => {
|
|
4364
4398
|
e = !1;
|
|
4365
4399
|
};
|
|
4366
4400
|
}, [
|
|
4367
4401
|
h,
|
|
4368
|
-
V,
|
|
4369
4402
|
H,
|
|
4370
|
-
|
|
4403
|
+
U,
|
|
4404
|
+
te,
|
|
4371
4405
|
C,
|
|
4372
|
-
|
|
4406
|
+
ne,
|
|
4373
4407
|
g
|
|
4374
4408
|
]), !e.length) return null;
|
|
4375
|
-
let
|
|
4409
|
+
let W = Math.max(1, Number(g) || 10), ae = h ? C ? te || h.startsWith("api:") ? (te ?? re ?? []).slice((ne - 1) * W, ne * W) : (re ?? []).slice(0, W) : (te ?? re ?? []).slice(0, W) : null, oe = ae ? ae.map((t) => e.map((e) => Ee(we(t?.data, e.field)))) : t, se = !!h && !(h && !te && re === null) && oe.length === 0, ce = b ? {
|
|
4376
4410
|
y: 6,
|
|
4377
4411
|
x: 10
|
|
4378
4412
|
} : {
|
|
4379
4413
|
y: 10,
|
|
4380
4414
|
x: 14
|
|
4381
|
-
},
|
|
4415
|
+
}, G = `${Number.isFinite(Number(S)) && S !== "" ? Number(S) : ce.y}px ${Number.isFinite(Number(x)) && x !== "" ? Number(x) : ce.x}px`, le = `1px solid ${typeof k == "string" && k ? k : "rgba(148, 163, 184, 0.35)"}`, K = y ? { border: le } : { borderBottom: le }, q = Array.isArray(n) && n.length === e.length && n.every((e) => Number.isFinite(e) && e > 0), ue = [
|
|
4382
4416
|
"left",
|
|
4383
4417
|
"center",
|
|
4384
4418
|
"right"
|
|
4385
|
-
],
|
|
4386
|
-
...
|
|
4419
|
+
], de = (t) => ue.includes(e[t]?.align) ? e[t].align : "", fe = (e) => de(e) || (ue.includes(O) ? O : "left"), J = Number.isFinite(Number(A)) && Number(A) > 0 ? Number(A) : 0, pe = P(j), me = !J && pe && pe.maxHeight !== void 0 ? pe.maxHeight : 0, he = J || me, ge = me ? {
|
|
4420
|
+
...pe,
|
|
4387
4421
|
maxHeight: void 0
|
|
4388
|
-
} :
|
|
4422
|
+
} : pe, _e = !!N && N.rows !== !1, ve = (t) => (r) => {
|
|
4389
4423
|
if (!N?.resize || t >= e.length - 1) return;
|
|
4390
4424
|
r.preventDefault(), r.stopPropagation();
|
|
4391
4425
|
let i = F.current, a = i ? i.clientWidth : 0;
|
|
4392
4426
|
if (!a) return;
|
|
4393
|
-
let o =
|
|
4427
|
+
let o = q ? [...n] : e.map(() => 100 / e.length), s = r.clientX, c = o[t] + o[t + 1], l = (e) => {
|
|
4394
4428
|
let n = (e.clientX - s) / a * 100, r = Math.min(c - 5, Math.max(5, o[t] + n)), i = [...o];
|
|
4395
4429
|
i[t] = Math.round(r * 10) / 10, i[t + 1] = Math.round((c - r) * 10) / 10, N.resize(i);
|
|
4396
4430
|
}, u = () => {
|
|
4397
4431
|
window.removeEventListener("pointermove", l), window.removeEventListener("pointerup", u);
|
|
4398
4432
|
};
|
|
4399
4433
|
window.addEventListener("pointermove", l), window.addEventListener("pointerup", u);
|
|
4400
|
-
},
|
|
4401
|
-
p &&
|
|
4402
|
-
let i = p[
|
|
4434
|
+
}, ye = /* @__PURE__ */ new Set();
|
|
4435
|
+
p && oe.forEach((t, n) => e.forEach((e, t) => {
|
|
4436
|
+
let i = p[Bn(r[n], o[t])];
|
|
4403
4437
|
if (!i) return;
|
|
4404
4438
|
let a = Math.max(1, Number(i.c) || 1), s = Math.max(1, Number(i.r) || 1);
|
|
4405
|
-
for (let e = 0; e < s; e++) for (let r = 0; r < a; r++) (e || r) &&
|
|
4439
|
+
for (let e = 0; e < s; e++) for (let r = 0; r < a; r++) (e || r) && ye.add(`${n + e},${t + r}`);
|
|
4406
4440
|
}));
|
|
4407
|
-
let
|
|
4441
|
+
let be = (e) => (t) => {
|
|
4408
4442
|
if (!N?.resizeRow) return;
|
|
4409
4443
|
t.preventDefault(), t.stopPropagation();
|
|
4410
4444
|
let n = t.currentTarget.closest("tr");
|
|
@@ -4413,7 +4447,7 @@ function Ln({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
|
|
|
4413
4447
|
window.removeEventListener("pointermove", a), window.removeEventListener("pointerup", o);
|
|
4414
4448
|
};
|
|
4415
4449
|
window.addEventListener("pointermove", a), window.addEventListener("pointerup", o);
|
|
4416
|
-
},
|
|
4450
|
+
}, X = (e, t, n, r) => r ? null : /* @__PURE__ */ d("span", {
|
|
4417
4451
|
className: "wb-tedit-btn",
|
|
4418
4452
|
role: "button",
|
|
4419
4453
|
"data-hint": t,
|
|
@@ -4422,7 +4456,7 @@ function Ln({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
|
|
|
4422
4456
|
},
|
|
4423
4457
|
onClick: n,
|
|
4424
4458
|
children: e
|
|
4425
|
-
}, t), Z = L && L.r <
|
|
4459
|
+
}, t), Z = L && L.r < oe.length && L.c < e.length ? L : null, Q = (e, t) => N?.labels?.[e] ?? t, Ce = Z ? p?.[Bn(r[Z.r], o[Z.c])] : null, Te = Math.max(1, Number(Ce?.c) || 1), De = Math.max(1, Number(Ce?.r) || 1);
|
|
4426
4460
|
return /* @__PURE__ */ f("div", {
|
|
4427
4461
|
ref: (e) => {
|
|
4428
4462
|
I.current = e, typeof M == "function" && M(e);
|
|
@@ -4430,10 +4464,10 @@ function Ln({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
|
|
|
4430
4464
|
style: {
|
|
4431
4465
|
width: "100%",
|
|
4432
4466
|
...N ? { position: "relative" } : null,
|
|
4433
|
-
...
|
|
4467
|
+
...ge
|
|
4434
4468
|
},
|
|
4435
4469
|
children: [
|
|
4436
|
-
N && /* @__PURE__ */ d("style", { children:
|
|
4470
|
+
N && /* @__PURE__ */ d("style", { children: zn }),
|
|
4437
4471
|
N && Z && z && /* @__PURE__ */ f("div", {
|
|
4438
4472
|
className: "wb-tedit-bar",
|
|
4439
4473
|
style: {
|
|
@@ -4446,29 +4480,29 @@ function Ln({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
|
|
|
4446
4480
|
className: "wb-tedit-at",
|
|
4447
4481
|
children: `R${Z.r + 1}·C${Z.c + 1}`
|
|
4448
4482
|
}),
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4483
|
+
X("+↑", Q("rowAbove", "Insert row above"), () => N.addRow(Z.r - 1)),
|
|
4484
|
+
X("+↓", Q("rowBelow", "Insert row below"), () => N.addRow(Z.r)),
|
|
4485
|
+
X("↑", Q("rowUp", "Move row up"), () => N.moveRow(Z.r, -1), Z.r === 0),
|
|
4486
|
+
X("↓", Q("rowDown", "Move row down"), () => N.moveRow(Z.r, 1), Z.r >= oe.length - 1),
|
|
4487
|
+
X("✕ row", Q("rowDelete", "Delete row"), () => N.dropRow(Z.r), oe.length <= 1),
|
|
4454
4488
|
/* @__PURE__ */ d("span", { className: "wb-tedit-sep" }),
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4489
|
+
X("+←", Q("colLeft", "Insert column left"), () => N.addColumn(Z.c - 1)),
|
|
4490
|
+
X("+→", Q("colRight", "Insert column right"), () => N.addColumn(Z.c)),
|
|
4491
|
+
X("←", Q("colMoveLeft", "Move column left"), () => N.moveColumn(Z.c, -1), Z.c === 0),
|
|
4492
|
+
X("→", Q("colMoveRight", "Move column right"), () => N.moveColumn(Z.c, 1), Z.c >= e.length - 1),
|
|
4493
|
+
X("✕ col", Q("colDelete", "Delete column"), () => N.dropColumn(Z.c), e.length <= 1),
|
|
4460
4494
|
/* @__PURE__ */ d("span", { className: "wb-tedit-sep" }),
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4495
|
+
X("↔", Q("mergeRight", "Merge with the cell on the right"), () => N.merge(Z.r, Z.c, "right"), Z.c + Te >= e.length),
|
|
4496
|
+
X("↕", Q("mergeDown", "Merge with the cell below"), () => N.merge(Z.r, Z.c, "down"), Z.r + De >= oe.length),
|
|
4497
|
+
X("⤫", Q("split", "Split this cell"), () => N.split(Z.r, Z.c), Te === 1 && De === 1)
|
|
4464
4498
|
]
|
|
4465
4499
|
}),
|
|
4466
4500
|
/* @__PURE__ */ d("div", {
|
|
4467
4501
|
style: {
|
|
4468
4502
|
width: "100%",
|
|
4469
4503
|
overflowX: "auto",
|
|
4470
|
-
...
|
|
4471
|
-
maxHeight:
|
|
4504
|
+
...he ? {
|
|
4505
|
+
maxHeight: he,
|
|
4472
4506
|
overflowY: "auto"
|
|
4473
4507
|
} : null
|
|
4474
4508
|
},
|
|
@@ -4479,17 +4513,17 @@ function Ln({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
|
|
|
4479
4513
|
borderCollapse: T && _ !== !1 ? "separate" : "collapse",
|
|
4480
4514
|
borderSpacing: 0,
|
|
4481
4515
|
fontSize: 14,
|
|
4482
|
-
...
|
|
4483
|
-
...y ? { border:
|
|
4516
|
+
...q ? { tableLayout: "fixed" } : null,
|
|
4517
|
+
...y ? { border: le } : {}
|
|
4484
4518
|
},
|
|
4485
4519
|
children: [
|
|
4486
|
-
|
|
4520
|
+
q && /* @__PURE__ */ d("colgroup", { children: n.map((e, t) => /* @__PURE__ */ d("col", { style: { width: `${e}%` } }, t)) }),
|
|
4487
4521
|
_ === !1 ? null : /* @__PURE__ */ d("thead", { children: /* @__PURE__ */ d("tr", { children: e.map((t, n) => /* @__PURE__ */ d("th", {
|
|
4488
4522
|
className: N ? "wb-tedit-head" : void 0,
|
|
4489
4523
|
style: {
|
|
4490
|
-
textAlign:
|
|
4524
|
+
textAlign: fe(n),
|
|
4491
4525
|
fontWeight: 600,
|
|
4492
|
-
padding:
|
|
4526
|
+
padding: G,
|
|
4493
4527
|
...typeof D == "string" && D ? { color: D } : null,
|
|
4494
4528
|
background: typeof E == "string" && E ? E : T ? "var(--page-surface, #f2f2f2)" : "rgba(148, 163, 184, 0.12)",
|
|
4495
4529
|
...T ? {
|
|
@@ -4497,9 +4531,9 @@ function Ln({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
|
|
|
4497
4531
|
top: 0,
|
|
4498
4532
|
zIndex: 2
|
|
4499
4533
|
} : N ? { position: "relative" } : null,
|
|
4500
|
-
...
|
|
4534
|
+
...K
|
|
4501
4535
|
},
|
|
4502
|
-
children: N ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(
|
|
4536
|
+
children: N ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(Ln, {
|
|
4503
4537
|
value: t.label ?? t,
|
|
4504
4538
|
onCommit: (e) => N.header(n, e),
|
|
4505
4539
|
hint: Q("editCell", "Double-click to edit"),
|
|
@@ -4507,43 +4541,43 @@ function Ln({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
|
|
|
4507
4541
|
}), n < e.length - 1 && /* @__PURE__ */ d("span", {
|
|
4508
4542
|
className: "wb-tedit-grip",
|
|
4509
4543
|
title: Q("colWidth", "Drag to resize the column"),
|
|
4510
|
-
onPointerDown:
|
|
4544
|
+
onPointerDown: ve(n)
|
|
4511
4545
|
})] }) : t.label ?? t
|
|
4512
4546
|
}, n)) }) }),
|
|
4513
|
-
/* @__PURE__ */ f("tbody", { children: [
|
|
4547
|
+
/* @__PURE__ */ f("tbody", { children: [se && /* @__PURE__ */ d("tr", { children: /* @__PURE__ */ d("td", {
|
|
4514
4548
|
colSpan: e.length,
|
|
4515
4549
|
style: {
|
|
4516
|
-
padding:
|
|
4550
|
+
padding: G,
|
|
4517
4551
|
textAlign: "center",
|
|
4518
4552
|
opacity: .6,
|
|
4519
|
-
...
|
|
4553
|
+
...K
|
|
4520
4554
|
},
|
|
4521
4555
|
children: w || "No data yet"
|
|
4522
|
-
}) }),
|
|
4556
|
+
}) }), oe.map((t, n) => /* @__PURE__ */ d("tr", {
|
|
4523
4557
|
className: N ? "wb-tedit-row" : void 0,
|
|
4524
4558
|
style: {
|
|
4525
4559
|
...v && n % 2 == 1 ? { background: "rgba(148, 163, 184, 0.07)" } : null,
|
|
4526
4560
|
...Number.isFinite(Number(s?.[n])) && s[n] > 0 ? { height: s[n] } : null
|
|
4527
4561
|
},
|
|
4528
4562
|
children: e.map((e, i) => {
|
|
4529
|
-
if (
|
|
4530
|
-
let a =
|
|
4563
|
+
if (ye.has(`${n},${i}`)) return null;
|
|
4564
|
+
let a = Bn(r[n], o[i]), s = m?.[a], c = p?.[a], l = Math.max(1, Number(c?.c) || 1), u = Math.max(1, Number(c?.r) || 1);
|
|
4531
4565
|
return /* @__PURE__ */ f("td", {
|
|
4532
4566
|
className: N ? `wb-tedit-cell${L?.r === n && L?.c === i ? " wb-tedit-cellon" : ""}` : void 0,
|
|
4533
|
-
onMouseDownCapture:
|
|
4567
|
+
onMouseDownCapture: _e ? V(n, i) : void 0,
|
|
4534
4568
|
"data-cell": N ? `${n}-${i}` : void 0,
|
|
4535
4569
|
colSpan: l > 1 ? l : void 0,
|
|
4536
4570
|
rowSpan: u > 1 ? u : void 0,
|
|
4537
4571
|
style: {
|
|
4538
|
-
padding:
|
|
4539
|
-
...
|
|
4572
|
+
padding: G,
|
|
4573
|
+
...de(i) ? { textAlign: de(i) } : null,
|
|
4540
4574
|
...N ? { position: "relative" } : null,
|
|
4541
|
-
...
|
|
4575
|
+
...K
|
|
4542
4576
|
},
|
|
4543
|
-
children: [s ??
|
|
4577
|
+
children: [s ?? Vn(t?.[i]), N && _e && /* @__PURE__ */ d("span", {
|
|
4544
4578
|
className: "wb-tedit-rowgrip",
|
|
4545
4579
|
title: Q("rowHeight", "Drag to set the row height — double-click to fit the content"),
|
|
4546
|
-
onPointerDown:
|
|
4580
|
+
onPointerDown: be(n),
|
|
4547
4581
|
onDoubleClick: () => N.resizeRow(n, 0)
|
|
4548
4582
|
})]
|
|
4549
4583
|
}, i);
|
|
@@ -4555,7 +4589,7 @@ function Ln({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
|
|
|
4555
4589
|
]
|
|
4556
4590
|
});
|
|
4557
4591
|
}
|
|
4558
|
-
var
|
|
4592
|
+
var Un = {
|
|
4559
4593
|
small: {
|
|
4560
4594
|
cell: 62,
|
|
4561
4595
|
font: 10.5,
|
|
@@ -4580,9 +4614,9 @@ var Rn = {
|
|
|
4580
4614
|
pad: 8,
|
|
4581
4615
|
gap: 4
|
|
4582
4616
|
}
|
|
4583
|
-
},
|
|
4584
|
-
function
|
|
4585
|
-
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 ? "" :
|
|
4617
|
+
}, Wn = (e) => `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`, Gn = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), Kn = 366;
|
|
4618
|
+
function qn(e, t = {}) {
|
|
4619
|
+
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 ? "" : Ee(e), a = (e) => {
|
|
4586
4620
|
let t = i(r(e)), n = t ? new Date(t) : null;
|
|
4587
4621
|
return n && !Number.isNaN(n.getTime()) ? n : null;
|
|
4588
4622
|
};
|
|
@@ -4598,7 +4632,7 @@ function Hn(e, t = {}) {
|
|
|
4598
4632
|
} : null;
|
|
4599
4633
|
}).filter(Boolean);
|
|
4600
4634
|
}
|
|
4601
|
-
function
|
|
4635
|
+
function Jn(e) {
|
|
4602
4636
|
return (Array.isArray(e) ? e : []).map((e, t) => {
|
|
4603
4637
|
let n = e?.start ? new Date(e.start) : null;
|
|
4604
4638
|
if (!n || Number.isNaN(n.getTime())) return null;
|
|
@@ -4613,20 +4647,20 @@ function Un(e) {
|
|
|
4613
4647
|
};
|
|
4614
4648
|
}).filter(Boolean);
|
|
4615
4649
|
}
|
|
4616
|
-
function
|
|
4650
|
+
function Yn(e) {
|
|
4617
4651
|
let t = /* @__PURE__ */ new Map();
|
|
4618
4652
|
for (let n of e) {
|
|
4619
|
-
let e =
|
|
4653
|
+
let e = Gn(n.start), r = n.end ? Gn(n.end) : e, i = Math.min(Math.max(0, Math.round((r - e) / 864e5)), Kn);
|
|
4620
4654
|
for (let r = 0; r <= i; r += 1) {
|
|
4621
|
-
let i =
|
|
4655
|
+
let i = Wn(new Date(e.getFullYear(), e.getMonth(), e.getDate() + r));
|
|
4622
4656
|
t.has(i) || t.set(i, []), t.get(i).push(n);
|
|
4623
4657
|
}
|
|
4624
4658
|
}
|
|
4625
4659
|
for (let e of t.values()) e.sort((e, t) => e.start - t.start);
|
|
4626
4660
|
return t;
|
|
4627
4661
|
}
|
|
4628
|
-
function
|
|
4629
|
-
let { tenant: T, apiUrl: E, locale: D } = i(
|
|
4662
|
+
function Xn({ events: e = [], source: t = "", titleField: n = "", startField: r = "", endField: o = "", hrefField: s = "", colorField: c = "", variant: p = "month", size: m = "medium", accent: h = "", eventBg: g = "", eventText: _ = "", borderColor: v = "", weekStart: y = "monday", max: b = 3, emptyText: x = "No events", style: S, nodeRef: C, interactive: w = !0 }) {
|
|
4663
|
+
let { tenant: T, apiUrl: E, locale: D } = i(Y), O = i(xe)?.[t], [k, A] = l(null), [j, M] = l(() => {
|
|
4630
4664
|
let e = /* @__PURE__ */ new Date();
|
|
4631
4665
|
return {
|
|
4632
4666
|
year: e.getFullYear(),
|
|
@@ -4648,13 +4682,13 @@ function Gn({ events: e = [], source: t = "", titleField: n = "", startField: r
|
|
|
4648
4682
|
E,
|
|
4649
4683
|
O
|
|
4650
4684
|
]);
|
|
4651
|
-
let N =
|
|
4685
|
+
let N = Un[m] ?? Un.medium, F = h || "var(--page-accent, #4f46e5)", I = v || "var(--page-border, rgba(148, 163, 184, 0.35))", L = g || F, R = _ || "var(--page-accent-text, #ffffff)", z = t ? qn(O ?? k ?? [], {
|
|
4652
4686
|
titleField: n,
|
|
4653
4687
|
startField: r,
|
|
4654
4688
|
endField: o,
|
|
4655
4689
|
hrefField: s,
|
|
4656
4690
|
colorField: c
|
|
4657
|
-
}) :
|
|
4691
|
+
}) : Jn(e), B = Yn(z), V = D || void 0, H = (e, t) => {
|
|
4658
4692
|
let n = /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("span", { style: {
|
|
4659
4693
|
width: 6,
|
|
4660
4694
|
height: 6,
|
|
@@ -4692,19 +4726,19 @@ function Gn({ events: e = [], source: t = "", titleField: n = "", startField: r
|
|
|
4692
4726
|
title: e.title,
|
|
4693
4727
|
children: n
|
|
4694
4728
|
}, e.key);
|
|
4695
|
-
},
|
|
4729
|
+
}, U = new Intl.DateTimeFormat(V, {
|
|
4696
4730
|
month: "long",
|
|
4697
4731
|
year: "numeric"
|
|
4698
|
-
}).format(new Date(j.year, j.month, 1)),
|
|
4732
|
+
}).format(new Date(j.year, j.month, 1)), ee = (e) => M((t) => {
|
|
4699
4733
|
let n = new Date(t.year, t.month + e, 1);
|
|
4700
4734
|
return {
|
|
4701
4735
|
year: n.getFullYear(),
|
|
4702
4736
|
month: n.getMonth()
|
|
4703
4737
|
};
|
|
4704
|
-
}),
|
|
4738
|
+
}), te = (e, t) => /* @__PURE__ */ d("button", {
|
|
4705
4739
|
type: "button",
|
|
4706
4740
|
"aria-label": e,
|
|
4707
|
-
onClick: () =>
|
|
4741
|
+
onClick: () => ee(t),
|
|
4708
4742
|
style: {
|
|
4709
4743
|
background: "transparent",
|
|
4710
4744
|
border: `1px solid ${I}`,
|
|
@@ -4716,7 +4750,7 @@ function Gn({ events: e = [], source: t = "", titleField: n = "", startField: r
|
|
|
4716
4750
|
padding: "4px 8px"
|
|
4717
4751
|
},
|
|
4718
4752
|
children: t < 0 ? "‹" : "›"
|
|
4719
|
-
}),
|
|
4753
|
+
}), ne = /* @__PURE__ */ f("div", {
|
|
4720
4754
|
style: {
|
|
4721
4755
|
display: "flex",
|
|
4722
4756
|
alignItems: "center",
|
|
@@ -4731,14 +4765,14 @@ function Gn({ events: e = [], source: t = "", titleField: n = "", startField: r
|
|
|
4731
4765
|
flexGrow: 1,
|
|
4732
4766
|
fontFamily: "var(--page-heading-font, inherit)"
|
|
4733
4767
|
},
|
|
4734
|
-
children:
|
|
4768
|
+
children: U
|
|
4735
4769
|
}),
|
|
4736
|
-
|
|
4737
|
-
|
|
4770
|
+
te("Previous month", -1),
|
|
4771
|
+
te("Next month", 1)
|
|
4738
4772
|
]
|
|
4739
4773
|
});
|
|
4740
4774
|
if (p === "list") {
|
|
4741
|
-
let e = z.filter((e) => e.start.getFullYear() === j.year && e.start.getMonth() === j.month).sort((e, t) => e.start - t.start), t = new Intl.DateTimeFormat(
|
|
4775
|
+
let e = z.filter((e) => e.start.getFullYear() === j.year && e.start.getMonth() === j.month).sort((e, t) => e.start - t.start), t = new Intl.DateTimeFormat(V, {
|
|
4742
4776
|
day: "numeric",
|
|
4743
4777
|
month: "short",
|
|
4744
4778
|
hour: "2-digit",
|
|
@@ -4750,7 +4784,7 @@ function Gn({ events: e = [], source: t = "", titleField: n = "", startField: r
|
|
|
4750
4784
|
width: "100%",
|
|
4751
4785
|
...P(S)
|
|
4752
4786
|
},
|
|
4753
|
-
children: [
|
|
4787
|
+
children: [ne, e.length ? /* @__PURE__ */ d("div", {
|
|
4754
4788
|
style: {
|
|
4755
4789
|
display: "flex",
|
|
4756
4790
|
flexDirection: "column",
|
|
@@ -4771,7 +4805,7 @@ function Gn({ events: e = [], source: t = "", titleField: n = "", startField: r
|
|
|
4771
4805
|
minWidth: 96
|
|
4772
4806
|
},
|
|
4773
4807
|
children: t.format(e.start)
|
|
4774
|
-
}),
|
|
4808
|
+
}), H(e, {
|
|
4775
4809
|
flexGrow: 1,
|
|
4776
4810
|
minWidth: 0
|
|
4777
4811
|
})]
|
|
@@ -4786,10 +4820,10 @@ function Gn({ events: e = [], source: t = "", titleField: n = "", startField: r
|
|
|
4786
4820
|
})]
|
|
4787
4821
|
});
|
|
4788
4822
|
}
|
|
4789
|
-
let
|
|
4790
|
-
for (let e = 0; e <
|
|
4791
|
-
let t = e -
|
|
4792
|
-
|
|
4823
|
+
let re = new Date(j.year, j.month, 1), ie = y === "sunday" ? 0 : 1, W = (re.getDay() - ie + 7) % 7, ae = new Date(j.year, j.month + 1, 0).getDate(), oe = Math.ceil((W + ae) / 7), se = Wn(/* @__PURE__ */ new Date()), ce = new Intl.DateTimeFormat(V, { weekday: "short" }), G = [];
|
|
4824
|
+
for (let e = 0; e < oe * 7; e += 1) {
|
|
4825
|
+
let t = e - W + 1, n = t >= 1 && t <= ae, r = Wn(new Date(j.year, j.month, t)), i = n ? B.get(r) ?? [] : [], a = i.slice(0, Math.max(1, b)), o = n && r === se;
|
|
4826
|
+
G.push(/* @__PURE__ */ f("div", {
|
|
4793
4827
|
style: {
|
|
4794
4828
|
minHeight: N.cell,
|
|
4795
4829
|
borderTop: `1px solid ${I}`,
|
|
@@ -4814,7 +4848,7 @@ function Gn({ events: e = [], source: t = "", titleField: n = "", startField: r
|
|
|
4814
4848
|
},
|
|
4815
4849
|
children: n ? t : new Date(j.year, j.month, t).getDate()
|
|
4816
4850
|
}),
|
|
4817
|
-
a.map((e) =>
|
|
4851
|
+
a.map((e) => H(e)),
|
|
4818
4852
|
i.length > a.length && /* @__PURE__ */ d("span", {
|
|
4819
4853
|
style: {
|
|
4820
4854
|
fontSize: N.font,
|
|
@@ -4832,7 +4866,7 @@ function Gn({ events: e = [], source: t = "", titleField: n = "", startField: r
|
|
|
4832
4866
|
...P(S)
|
|
4833
4867
|
},
|
|
4834
4868
|
children: [
|
|
4835
|
-
|
|
4869
|
+
ne,
|
|
4836
4870
|
/* @__PURE__ */ f("div", {
|
|
4837
4871
|
style: {
|
|
4838
4872
|
display: "grid",
|
|
@@ -4846,31 +4880,31 @@ function Gn({ events: e = [], source: t = "", titleField: n = "", startField: r
|
|
|
4846
4880
|
textAlign: "center",
|
|
4847
4881
|
padding: `0 0 ${N.pad}px`
|
|
4848
4882
|
},
|
|
4849
|
-
children:
|
|
4850
|
-
}, `head-${t}`)),
|
|
4883
|
+
children: ce.format(new Date(2024, 0, 7 + ie + t))
|
|
4884
|
+
}, `head-${t}`)), G]
|
|
4851
4885
|
}),
|
|
4852
4886
|
/* @__PURE__ */ d("div", { style: { borderTop: `1px solid ${I}` } })
|
|
4853
4887
|
]
|
|
4854
4888
|
});
|
|
4855
4889
|
}
|
|
4856
|
-
var
|
|
4890
|
+
var Zn = {
|
|
4857
4891
|
small: 36,
|
|
4858
4892
|
medium: 56,
|
|
4859
4893
|
large: 88
|
|
4860
4894
|
};
|
|
4861
|
-
function
|
|
4862
|
-
let n = Array.isArray(e) ? e.filter((e) => e && typeof e == "object") : [], r = (e) => e == null ? "" :
|
|
4895
|
+
function Qn(e, t = {}) {
|
|
4896
|
+
let n = Array.isArray(e) ? e.filter((e) => e && typeof e == "object") : [], r = (e) => e == null ? "" : Ee(e);
|
|
4863
4897
|
return n.map((e) => {
|
|
4864
|
-
let n = e.data ?? e, i =
|
|
4898
|
+
let n = e.data ?? e, i = we(n, t.imageField), a = Array.isArray(i) ? i[0] : i, o = a && typeof a == "object" ? a.url ?? a.src ?? "" : a, s = t.nameField ? r(we(n, t.nameField)) : r(n.name);
|
|
4865
4899
|
return {
|
|
4866
4900
|
src: typeof o == "string" ? o.trim() : "",
|
|
4867
4901
|
alt: s,
|
|
4868
|
-
href: t.hrefField ? r(
|
|
4902
|
+
href: t.hrefField ? r(we(n, t.hrefField)) : ""
|
|
4869
4903
|
};
|
|
4870
4904
|
}).filter((e) => e.src);
|
|
4871
4905
|
}
|
|
4872
|
-
function
|
|
4873
|
-
let { tenant: D, apiUrl: O } = i(
|
|
4906
|
+
function $n({ logos: e = [], source: t = "", imageField: n = "", nameField: r = "", hrefField: o = "", variant: s = "step", size: p = "medium", perView: m = 5, gap: h = 48, hold: g = 3, slideMs: _ = 500, direction: v = "left", arrows: y = "show", pauseOnHover: b = !0, grayscale: x = !0, newTab: S = !0, emptyText: C = "", style: w, nodeRef: T, inert: E }) {
|
|
4907
|
+
let { tenant: D, apiUrl: O } = i(Y), k = i(xe)?.[t], [A, j] = l(null), M = c(null), N = c(null), [F, I] = l(0), [L, R] = l(0), [z, B] = l(0), [V, H] = l(!0), [U, ee] = l(!1), [te, ne] = l(!1);
|
|
4874
4908
|
a(() => {
|
|
4875
4909
|
if (!t || k) return;
|
|
4876
4910
|
let e = !0;
|
|
@@ -4887,7 +4921,7 @@ function Jn({ logos: e = [], source: t = "", imageField: n = "", nameField: r =
|
|
|
4887
4921
|
k
|
|
4888
4922
|
]), a(() => {
|
|
4889
4923
|
if (typeof window > "u" || !window.matchMedia) return;
|
|
4890
|
-
let e = window.matchMedia("(prefers-reduced-motion: reduce)"), t = () =>
|
|
4924
|
+
let e = window.matchMedia("(prefers-reduced-motion: reduce)"), t = () => ne(e.matches);
|
|
4891
4925
|
return t(), e.addEventListener?.("change", t), () => e.removeEventListener?.("change", t);
|
|
4892
4926
|
}, []), a(() => {
|
|
4893
4927
|
let e = N.current;
|
|
@@ -4900,7 +4934,7 @@ function Jn({ logos: e = [], source: t = "", imageField: n = "", nameField: r =
|
|
|
4900
4934
|
let e = M.current;
|
|
4901
4935
|
if (!e) return;
|
|
4902
4936
|
let t = !0, n = () => {
|
|
4903
|
-
let n = [...e.querySelectorAll("img")].filter((e) => e.complete && e.naturalHeight).map((e) => e.naturalWidth / e.naturalHeight *
|
|
4937
|
+
let n = [...e.querySelectorAll("img")].filter((e) => e.complete && e.naturalHeight).map((e) => e.naturalWidth / e.naturalHeight * W);
|
|
4904
4938
|
t && n.length && R(Math.ceil(Math.max(...n)));
|
|
4905
4939
|
};
|
|
4906
4940
|
n();
|
|
@@ -4909,12 +4943,12 @@ function Jn({ logos: e = [], source: t = "", imageField: n = "", nameField: r =
|
|
|
4909
4943
|
t = !1, r.forEach((e) => e.removeEventListener("load", n));
|
|
4910
4944
|
};
|
|
4911
4945
|
});
|
|
4912
|
-
let
|
|
4946
|
+
let re = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.src) : [], ie = t ? Qn(k ?? A ?? [], {
|
|
4913
4947
|
imageField: n,
|
|
4914
4948
|
nameField: r,
|
|
4915
4949
|
hrefField: o
|
|
4916
|
-
}) :
|
|
4917
|
-
if (!
|
|
4950
|
+
}) : re, W = Zn[p] ?? Zn.medium, ae = Number.isFinite(Number(h)) ? Math.max(0, Number(h)) : 48, oe = s === "marquee" ? "step" : s, se = Math.min(3e4, Math.max(300, (Number(g) || 3) * 1e3)), ce = Math.min(3e3, Math.max(100, Number(_) || 500)), G = Math.min(12, Math.max(1, Math.round(Number(m) || 5))), K = (L || W * 3) + ae, q = F ? Math.max(1, Math.floor(F / K)) : G, ue = Math.min(G, q), de = F ? Math.min(K, F / ue) : K;
|
|
4951
|
+
if (!ie.length) return /* @__PURE__ */ d("div", {
|
|
4918
4952
|
ref: T,
|
|
4919
4953
|
style: {
|
|
4920
4954
|
width: "100%",
|
|
@@ -4926,7 +4960,7 @@ function Jn({ logos: e = [], source: t = "", imageField: n = "", nameField: r =
|
|
|
4926
4960
|
alignItems: "center",
|
|
4927
4961
|
justifyContent: "center",
|
|
4928
4962
|
flexWrap: "wrap",
|
|
4929
|
-
gap:
|
|
4963
|
+
gap: ae
|
|
4930
4964
|
},
|
|
4931
4965
|
children: [
|
|
4932
4966
|
0,
|
|
@@ -4936,16 +4970,16 @@ function Jn({ logos: e = [], source: t = "", imageField: n = "", nameField: r =
|
|
|
4936
4970
|
4
|
|
4937
4971
|
].map((e) => /* @__PURE__ */ d("div", {
|
|
4938
4972
|
style: {
|
|
4939
|
-
height:
|
|
4940
|
-
width:
|
|
4973
|
+
height: W,
|
|
4974
|
+
width: W * 3,
|
|
4941
4975
|
border: "1px dashed var(--page-border, rgba(148, 163, 184, 0.5))",
|
|
4942
4976
|
borderRadius: 6,
|
|
4943
4977
|
display: "flex",
|
|
4944
4978
|
alignItems: "center",
|
|
4945
4979
|
justifyContent: "center",
|
|
4946
|
-
fontSize: Math.max(10, Math.round(
|
|
4980
|
+
fontSize: Math.max(10, Math.round(W / 4)),
|
|
4947
4981
|
opacity: .45,
|
|
4948
|
-
...
|
|
4982
|
+
...le
|
|
4949
4983
|
},
|
|
4950
4984
|
children: "LOGO"
|
|
4951
4985
|
}, e))
|
|
@@ -4959,21 +4993,21 @@ function Jn({ logos: e = [], source: t = "", imageField: n = "", nameField: r =
|
|
|
4959
4993
|
children: C
|
|
4960
4994
|
}) : null
|
|
4961
4995
|
});
|
|
4962
|
-
let
|
|
4996
|
+
let fe = ie.length, J = oe === "step" && fe > ue, pe = oe === "slider", me = J && !E && !U && !te, he = v === "right", ge = he ? fe : 0, _e = J ? [...ie, ...ie] : ie, ve = J ? z * de : 0, ye = (e, t, n) => {
|
|
4963
4997
|
let r = /* @__PURE__ */ d("img", {
|
|
4964
4998
|
src: e.src,
|
|
4965
4999
|
alt: e.alt ?? "",
|
|
4966
5000
|
style: {
|
|
4967
|
-
height:
|
|
5001
|
+
height: W,
|
|
4968
5002
|
width: "auto",
|
|
4969
5003
|
maxWidth: "100%",
|
|
4970
5004
|
objectFit: "contain",
|
|
4971
5005
|
display: "block"
|
|
4972
5006
|
}
|
|
4973
|
-
}), i =
|
|
4974
|
-
width:
|
|
5007
|
+
}), i = J ? {
|
|
5008
|
+
width: de,
|
|
4975
5009
|
flex: "0 0 auto",
|
|
4976
|
-
padding: `0 ${
|
|
5010
|
+
padding: `0 ${ae / 2}px`,
|
|
4977
5011
|
justifyContent: "center"
|
|
4978
5012
|
} : {};
|
|
4979
5013
|
return e.href && !E ? /* @__PURE__ */ d("a", {
|
|
@@ -4996,30 +5030,30 @@ function Jn({ logos: e = [], source: t = "", imageField: n = "", nameField: r =
|
|
|
4996
5030
|
...n ? { "aria-hidden": "true" } : {},
|
|
4997
5031
|
children: r
|
|
4998
5032
|
}, `${n ? "c" : "o"}-${t}`);
|
|
4999
|
-
},
|
|
5033
|
+
}, be = /* @__PURE__ */ d("div", {
|
|
5000
5034
|
ref: M,
|
|
5001
5035
|
className: "wb-logos-track",
|
|
5002
5036
|
style: {
|
|
5003
5037
|
display: "flex",
|
|
5004
5038
|
alignItems: "center",
|
|
5005
|
-
...
|
|
5006
|
-
width:
|
|
5007
|
-
transform: `translateX(-${
|
|
5008
|
-
transition:
|
|
5009
|
-
} :
|
|
5010
|
-
gap:
|
|
5039
|
+
...J ? {
|
|
5040
|
+
width: _e.length * de,
|
|
5041
|
+
transform: `translateX(-${ve}px)`,
|
|
5042
|
+
transition: V ? `transform ${ce}ms ease` : "none"
|
|
5043
|
+
} : pe ? {
|
|
5044
|
+
gap: ae,
|
|
5011
5045
|
overflowX: "auto",
|
|
5012
5046
|
scrollBehavior: "smooth",
|
|
5013
5047
|
scrollSnapType: "x proximity"
|
|
5014
5048
|
} : {
|
|
5015
|
-
gap:
|
|
5049
|
+
gap: ae,
|
|
5016
5050
|
flexWrap: "wrap",
|
|
5017
5051
|
justifyContent: "center"
|
|
5018
5052
|
}
|
|
5019
5053
|
},
|
|
5020
|
-
children:
|
|
5021
|
-
}),
|
|
5022
|
-
if (
|
|
5054
|
+
children: _e.map((e, t) => ye(e, t, J && t >= fe))
|
|
5055
|
+
}), Se = (e) => {
|
|
5056
|
+
if (pe) {
|
|
5023
5057
|
let t = M.current;
|
|
5024
5058
|
t && t.scrollBy({
|
|
5025
5059
|
left: e * Math.max(120, t.clientWidth * .8),
|
|
@@ -5028,19 +5062,19 @@ function Jn({ logos: e = [], source: t = "", imageField: n = "", nameField: r =
|
|
|
5028
5062
|
return;
|
|
5029
5063
|
}
|
|
5030
5064
|
let t = z + e;
|
|
5031
|
-
if (t >= 0 && t <=
|
|
5032
|
-
|
|
5065
|
+
if (t >= 0 && t <= fe) {
|
|
5066
|
+
H(!0), B(t);
|
|
5033
5067
|
return;
|
|
5034
5068
|
}
|
|
5035
|
-
let n = t < 0 ?
|
|
5036
|
-
|
|
5037
|
-
|
|
5069
|
+
let n = t < 0 ? fe : 0;
|
|
5070
|
+
H(!1), B(n), requestAnimationFrame(() => requestAnimationFrame(() => {
|
|
5071
|
+
H(!0), B(n + e);
|
|
5038
5072
|
}));
|
|
5039
|
-
},
|
|
5073
|
+
}, X = y === !1 || y === "off" ? "off" : y === "hover" ? "hover" : "show", Z = X !== "off" && (pe ? F > 0 : J), Q = (e) => /* @__PURE__ */ d("button", {
|
|
5040
5074
|
type: "button",
|
|
5041
5075
|
"aria-label": e < 0 ? "Previous logos" : "Next logos",
|
|
5042
|
-
onClick: () =>
|
|
5043
|
-
className: `wb-logos-arrow${
|
|
5076
|
+
onClick: () => Se(e),
|
|
5077
|
+
className: `wb-logos-arrow${X === "hover" ? " wb-logos-arrow-shy" : ""}`,
|
|
5044
5078
|
style: { [e < 0 ? "left" : "right"]: 0 },
|
|
5045
5079
|
children: e < 0 ? "‹" : "›"
|
|
5046
5080
|
});
|
|
@@ -5055,8 +5089,8 @@ function Jn({ logos: e = [], source: t = "", imageField: n = "", nameField: r =
|
|
|
5055
5089
|
overflow: "hidden",
|
|
5056
5090
|
...P(w)
|
|
5057
5091
|
},
|
|
5058
|
-
onMouseEnter: b === !1 ? void 0 : () =>
|
|
5059
|
-
onMouseLeave: b === !1 ? void 0 : () =>
|
|
5092
|
+
onMouseEnter: b === !1 ? void 0 : () => ee(!0),
|
|
5093
|
+
onMouseLeave: b === !1 ? void 0 : () => ee(!1),
|
|
5060
5094
|
children: [
|
|
5061
5095
|
/* @__PURE__ */ d("style", { children: `
|
|
5062
5096
|
.wb-logos .wb-logo { display: flex; align-items: center; flex-shrink: 0; text-decoration: none; box-sizing: border-box; }
|
|
@@ -5078,41 +5112,41 @@ function Jn({ logos: e = [], source: t = "", imageField: n = "", nameField: r =
|
|
|
5078
5112
|
border: 1px solid var(--page-border, rgba(148, 163, 184, 0.5));
|
|
5079
5113
|
}
|
|
5080
5114
|
` }),
|
|
5081
|
-
|
|
5115
|
+
J ? /* @__PURE__ */ f("div", {
|
|
5082
5116
|
style: {
|
|
5083
5117
|
position: "relative",
|
|
5084
|
-
width:
|
|
5118
|
+
width: ue * de,
|
|
5085
5119
|
maxWidth: "100%",
|
|
5086
5120
|
margin: "0 auto"
|
|
5087
5121
|
},
|
|
5088
5122
|
children: [
|
|
5089
|
-
|
|
5123
|
+
Z ? Q(-1) : null,
|
|
5090
5124
|
/* @__PURE__ */ d("div", {
|
|
5091
5125
|
style: { overflow: "hidden" },
|
|
5092
|
-
children:
|
|
5126
|
+
children: be
|
|
5093
5127
|
}),
|
|
5094
|
-
|
|
5128
|
+
Z ? Q(1) : null
|
|
5095
5129
|
]
|
|
5096
5130
|
}) : /* @__PURE__ */ f(u, { children: [
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5131
|
+
Z ? Q(-1) : null,
|
|
5132
|
+
be,
|
|
5133
|
+
Z ? Q(1) : null
|
|
5100
5134
|
] }),
|
|
5101
|
-
/* @__PURE__ */ d(
|
|
5102
|
-
running:
|
|
5103
|
-
every:
|
|
5104
|
-
slide:
|
|
5105
|
-
step:
|
|
5135
|
+
/* @__PURE__ */ d(er, {
|
|
5136
|
+
running: me,
|
|
5137
|
+
every: se + ce,
|
|
5138
|
+
slide: ce,
|
|
5139
|
+
step: he ? -1 : 1,
|
|
5106
5140
|
index: z,
|
|
5107
|
-
total:
|
|
5108
|
-
home:
|
|
5141
|
+
total: fe,
|
|
5142
|
+
home: ge,
|
|
5109
5143
|
setIndex: B,
|
|
5110
|
-
setAnimate:
|
|
5144
|
+
setAnimate: H
|
|
5111
5145
|
})
|
|
5112
5146
|
]
|
|
5113
5147
|
});
|
|
5114
5148
|
}
|
|
5115
|
-
function
|
|
5149
|
+
function er({ running: e, every: t, slide: n, step: r, index: i, total: o, home: s, setIndex: c, setAnimate: l }) {
|
|
5116
5150
|
a(() => {
|
|
5117
5151
|
if (!e) return;
|
|
5118
5152
|
let n = setInterval(() => {
|
|
@@ -5148,13 +5182,13 @@ function Yn({ running: e, every: t, slide: n, step: r, index: i, total: o, home:
|
|
|
5148
5182
|
l
|
|
5149
5183
|
]), null;
|
|
5150
5184
|
}
|
|
5151
|
-
var
|
|
5185
|
+
var tr = {
|
|
5152
5186
|
small: 380,
|
|
5153
5187
|
medium: 560,
|
|
5154
5188
|
large: 820,
|
|
5155
5189
|
full: "100%"
|
|
5156
5190
|
};
|
|
5157
|
-
function
|
|
5191
|
+
function nr({ dialogId: e = "", trigger: t = "button", triggerLabel: n = "Open", openOn: r = "trigger", delay: i = 0, size: o = "medium", title: s = "", showClose: u = !0, backdropClose: p = !0, position: m = "center", actions: h = [], showCloseAction: g = !1, closeLabel: _ = "Close", actionsAlign: v = "right", linked: y, style: b, nodeRef: x, inert: S = !1 }) {
|
|
5158
5192
|
let [C, w] = l(!1), T = c(null);
|
|
5159
5193
|
a(() => {
|
|
5160
5194
|
if (S || !e) return;
|
|
@@ -5179,7 +5213,7 @@ function Zn({ dialogId: e = "", trigger: t = "button", triggerLabel: n = "Open",
|
|
|
5179
5213
|
document.removeEventListener("keydown", e), document.body.style.overflow = t;
|
|
5180
5214
|
};
|
|
5181
5215
|
}, [S, C]);
|
|
5182
|
-
let E =
|
|
5216
|
+
let E = tr[o] ?? tr.medium, D = (e) => {
|
|
5183
5217
|
let t = {
|
|
5184
5218
|
padding: "9px 16px",
|
|
5185
5219
|
borderRadius: 6,
|
|
@@ -5348,97 +5382,98 @@ function Zn({ dialogId: e = "", trigger: t = "button", triggerLabel: n = "Open",
|
|
|
5348
5382
|
})]
|
|
5349
5383
|
});
|
|
5350
5384
|
}
|
|
5351
|
-
var
|
|
5352
|
-
PageRoot:
|
|
5353
|
-
CalendarBlock:
|
|
5354
|
-
LogoCarousel:
|
|
5355
|
-
DialogBlock:
|
|
5356
|
-
Section:
|
|
5357
|
-
Container:
|
|
5358
|
-
Heading:
|
|
5359
|
-
TextBlock:
|
|
5360
|
-
ButtonBlock:
|
|
5361
|
-
ImageBlock:
|
|
5362
|
-
Spacer:
|
|
5363
|
-
Divider:
|
|
5364
|
-
|
|
5365
|
-
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5391
|
-
|
|
5392
|
-
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
|
|
5397
|
-
|
|
5385
|
+
var rr = {
|
|
5386
|
+
PageRoot: Le,
|
|
5387
|
+
CalendarBlock: Xn,
|
|
5388
|
+
LogoCarousel: $n,
|
|
5389
|
+
DialogBlock: nr,
|
|
5390
|
+
Section: Re,
|
|
5391
|
+
Container: ze,
|
|
5392
|
+
Heading: Be,
|
|
5393
|
+
TextBlock: et,
|
|
5394
|
+
ButtonBlock: rt,
|
|
5395
|
+
ImageBlock: it,
|
|
5396
|
+
Spacer: ut,
|
|
5397
|
+
Divider: dt,
|
|
5398
|
+
BoxBlock: ft,
|
|
5399
|
+
SliderBlock: vt,
|
|
5400
|
+
CanvasSlider: yt,
|
|
5401
|
+
TabsBlock: Ft,
|
|
5402
|
+
QuickStack: cn,
|
|
5403
|
+
CollectionList: ln,
|
|
5404
|
+
CollectionSearch: un,
|
|
5405
|
+
BreadcrumbsBlock: dn,
|
|
5406
|
+
PaginationBlock: fn,
|
|
5407
|
+
StepperBlock: wn,
|
|
5408
|
+
SocialLinksBlock: Cn,
|
|
5409
|
+
ThemeModeBlock: _n,
|
|
5410
|
+
ScrollTopBlock: xn,
|
|
5411
|
+
OrgChartBlock: In,
|
|
5412
|
+
TableBlock: Hn,
|
|
5413
|
+
IconBlock: Ot,
|
|
5414
|
+
MapBlock: Et,
|
|
5415
|
+
MasonryBlock: At,
|
|
5416
|
+
AccordionBlock: It,
|
|
5417
|
+
NavbarBlock: Pt,
|
|
5418
|
+
ListBlock: $e,
|
|
5419
|
+
TextSpan: We,
|
|
5420
|
+
QuoteBlock: Qe,
|
|
5421
|
+
TextLink: nt,
|
|
5422
|
+
RichTextBlock: Xe,
|
|
5423
|
+
RichContentBlock: Xe,
|
|
5424
|
+
VideoBlock: at,
|
|
5425
|
+
YouTubeBlock: st,
|
|
5426
|
+
IframeBlock: ct,
|
|
5427
|
+
EmbedBlock: lt,
|
|
5428
|
+
FormBlock: Yt,
|
|
5429
|
+
FormLabel: en,
|
|
5430
|
+
FormInput: tn,
|
|
5431
|
+
FormTextarea: nn,
|
|
5432
|
+
FormCheckbox: (e) => /* @__PURE__ */ d(rn, {
|
|
5398
5433
|
kind: "checkbox",
|
|
5399
5434
|
...e
|
|
5400
5435
|
}),
|
|
5401
|
-
FormRadio: (e) => /* @__PURE__ */ d(
|
|
5436
|
+
FormRadio: (e) => /* @__PURE__ */ d(rn, {
|
|
5402
5437
|
kind: "radio",
|
|
5403
5438
|
...e
|
|
5404
5439
|
}),
|
|
5405
|
-
FormSelect:
|
|
5406
|
-
FormFile:
|
|
5407
|
-
FormRecaptcha:
|
|
5408
|
-
FormSubmit:
|
|
5409
|
-
},
|
|
5440
|
+
FormSelect: an,
|
|
5441
|
+
FormFile: on,
|
|
5442
|
+
FormRecaptcha: $t,
|
|
5443
|
+
FormSubmit: sn
|
|
5444
|
+
}, ir = {
|
|
5410
5445
|
id: "auth",
|
|
5411
5446
|
label: "Accounts",
|
|
5412
5447
|
category: "Apps",
|
|
5413
5448
|
keys: ["SiteLoginForm", "SiteAccountMenu"],
|
|
5414
5449
|
ssr: "shell",
|
|
5415
5450
|
settings: ["site.authRedirect"]
|
|
5416
|
-
},
|
|
5451
|
+
}, ar = n({
|
|
5417
5452
|
user: null,
|
|
5418
5453
|
status: "idle",
|
|
5419
5454
|
ensure: () => {},
|
|
5420
5455
|
refresh: () => {},
|
|
5421
5456
|
signOut: () => {}
|
|
5422
5457
|
});
|
|
5423
|
-
function
|
|
5458
|
+
function or(e, t) {
|
|
5424
5459
|
return t ? /^https?:\/\//i.test(t) ? t : `${e.replace(/\/+$/, "")}${t.startsWith("/") ? t : `/${t}`}` : "";
|
|
5425
5460
|
}
|
|
5426
|
-
function
|
|
5461
|
+
function sr(e) {
|
|
5427
5462
|
let t = e && typeof e == "object" ? e["site.session"] : null, n = t && typeof t == "object" && !Array.isArray(t) ? t : {}, r = (e) => typeof e == "string" ? e.trim() : "", i = r(n.url), a = r(n.mePath), o = r(n.logoutPath);
|
|
5428
5463
|
return {
|
|
5429
5464
|
mode: n.mode === "custom" || n.mode === "off" ? n.mode : "system",
|
|
5430
5465
|
url: i,
|
|
5431
5466
|
mePath: a,
|
|
5432
5467
|
logoutPath: o,
|
|
5433
|
-
meUrl:
|
|
5434
|
-
logoutUrl:
|
|
5468
|
+
meUrl: or(i, a),
|
|
5469
|
+
logoutUrl: or(i, o),
|
|
5435
5470
|
loginPage: r(n.loginPage),
|
|
5436
5471
|
userPath: r(n.userPath),
|
|
5437
5472
|
auth: n.auth === "bearer" ? "bearer" : "cookies",
|
|
5438
5473
|
tokenKey: r(n.tokenKey) || "webim_session_token"
|
|
5439
5474
|
};
|
|
5440
5475
|
}
|
|
5441
|
-
function
|
|
5476
|
+
function cr(e, t) {
|
|
5442
5477
|
if (!t) return e ?? null;
|
|
5443
5478
|
let n = e;
|
|
5444
5479
|
for (let e of t.split(".")) {
|
|
@@ -5447,26 +5482,26 @@ function rr(e, t) {
|
|
|
5447
5482
|
}
|
|
5448
5483
|
return n ?? null;
|
|
5449
5484
|
}
|
|
5450
|
-
function
|
|
5485
|
+
function lr(e) {
|
|
5451
5486
|
try {
|
|
5452
5487
|
return window.localStorage.getItem(e) || "";
|
|
5453
5488
|
} catch {
|
|
5454
5489
|
return "";
|
|
5455
5490
|
}
|
|
5456
5491
|
}
|
|
5457
|
-
function
|
|
5492
|
+
function ur(e) {
|
|
5458
5493
|
try {
|
|
5459
5494
|
window.localStorage.removeItem(e);
|
|
5460
5495
|
} catch {}
|
|
5461
5496
|
}
|
|
5462
|
-
var
|
|
5463
|
-
let e = i(
|
|
5497
|
+
var dr = () => {
|
|
5498
|
+
let e = i(ar);
|
|
5464
5499
|
return a(() => {
|
|
5465
5500
|
e.ensure();
|
|
5466
5501
|
}, [e]), e;
|
|
5467
5502
|
};
|
|
5468
|
-
function
|
|
5469
|
-
let f = i(
|
|
5503
|
+
function fr({ children: e, initialUser: t, disabled: n, apiUrl: o, tenant: u }) {
|
|
5504
|
+
let f = i(Y), p = o || f?.apiUrl || "/api", m = u || f?.tenant || "", h = s(() => sr(f?.settings), [f?.settings]), [g, _] = l(t ?? null), [v, y] = l(t ? "user" : n ? "guest" : "idle"), b = c(!1), x = r((e, t) => fetch(`${p}${e}`, {
|
|
5470
5505
|
...t,
|
|
5471
5506
|
credentials: "include",
|
|
5472
5507
|
headers: {
|
|
@@ -5478,9 +5513,9 @@ function sr({ children: e, initialUser: t, disabled: n, apiUrl: o, tenant: u })
|
|
|
5478
5513
|
if (n) return Promise.resolve(null);
|
|
5479
5514
|
if (h.mode === "off") return Promise.resolve(S(null));
|
|
5480
5515
|
if (h.mode === "custom") {
|
|
5481
|
-
let e = h.auth === "bearer" ?
|
|
5516
|
+
let e = h.auth === "bearer" ? lr(h.tokenKey) : "";
|
|
5482
5517
|
return !h.meUrl || h.auth === "bearer" && !e ? Promise.resolve(S(null)) : fetch(h.meUrl, { ...h.auth === "bearer" ? { headers: { authorization: `Bearer ${e}` } } : { credentials: "include" } }).then((e) => e.ok ? e.json() : null).then((e) => {
|
|
5483
|
-
let t =
|
|
5518
|
+
let t = cr(e, h.userPath);
|
|
5484
5519
|
return S(t && typeof t == "object" ? t : null);
|
|
5485
5520
|
}).catch(() => S(null));
|
|
5486
5521
|
}
|
|
@@ -5493,12 +5528,12 @@ function sr({ children: e, initialUser: t, disabled: n, apiUrl: o, tenant: u })
|
|
|
5493
5528
|
]), w = r(() => {
|
|
5494
5529
|
if (h.mode === "off") return S(null), Promise.resolve();
|
|
5495
5530
|
if (h.mode === "custom") {
|
|
5496
|
-
let e = h.auth === "bearer" ?
|
|
5531
|
+
let e = h.auth === "bearer" ? lr(h.tokenKey) : "";
|
|
5497
5532
|
return (h.logoutUrl ? fetch(h.logoutUrl, {
|
|
5498
5533
|
method: "post",
|
|
5499
5534
|
...h.auth === "bearer" ? { headers: e ? { authorization: `Bearer ${e}` } : {} } : { credentials: "include" }
|
|
5500
5535
|
}).catch(() => {}) : Promise.resolve()).then(() => {
|
|
5501
|
-
h.auth === "bearer" &&
|
|
5536
|
+
h.auth === "bearer" && ur(h.tokenKey), S(null);
|
|
5502
5537
|
});
|
|
5503
5538
|
}
|
|
5504
5539
|
return x("/site/logout", { method: "post" }).catch(() => {}).then(() => {
|
|
@@ -5548,19 +5583,19 @@ function sr({ children: e, initialUser: t, disabled: n, apiUrl: o, tenant: u })
|
|
|
5548
5583
|
h.loginPage,
|
|
5549
5584
|
C,
|
|
5550
5585
|
w
|
|
5551
|
-
]), /* @__PURE__ */ d(
|
|
5586
|
+
]), /* @__PURE__ */ d(ar.Provider, {
|
|
5552
5587
|
value: E,
|
|
5553
5588
|
children: e
|
|
5554
5589
|
});
|
|
5555
5590
|
}
|
|
5556
|
-
function
|
|
5557
|
-
let { status: n } =
|
|
5591
|
+
function pr({ when: e, children: t }) {
|
|
5592
|
+
let { status: n } = dr();
|
|
5558
5593
|
return !e || e === "always" ? t : n === "idle" || n === "loading" ? null : e === "user" == (n === "user") ? t : null;
|
|
5559
5594
|
}
|
|
5560
5595
|
//#endregion
|
|
5561
5596
|
//#region ../ui/src/components/builder/apps/auth/views.jsx
|
|
5562
|
-
function
|
|
5563
|
-
let { tenant: h, apiUrl: g, settings: _ } = i(
|
|
5597
|
+
function mr({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordLabel: r = "Password", nameLabel: a = "Name", submitLabel: o, style: s, nodeRef: c, inert: u, linked: p, show: m }) {
|
|
5598
|
+
let { tenant: h, apiUrl: g, settings: _ } = i(Y), [v, y] = l("form"), [b, x] = l(""), [S, C] = l(!1), w = e === "register", T = u ? m || "form" : v, E = (e) => typeof e == "string" && e.startsWith("/") && !e.startsWith("//") ? e : "", D = async (e) => {
|
|
5564
5599
|
if (e.preventDefault(), u) return;
|
|
5565
5600
|
let n = new FormData(e.currentTarget);
|
|
5566
5601
|
C(!0), x("");
|
|
@@ -5608,20 +5643,20 @@ function lr({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
5608
5643
|
children: [
|
|
5609
5644
|
w ? /* @__PURE__ */ f("label", {
|
|
5610
5645
|
style: {
|
|
5611
|
-
...
|
|
5646
|
+
...Rt,
|
|
5612
5647
|
display: "grid",
|
|
5613
5648
|
gap: 6
|
|
5614
5649
|
},
|
|
5615
5650
|
children: [a, /* @__PURE__ */ d("input", {
|
|
5616
5651
|
name: "name",
|
|
5617
5652
|
type: "text",
|
|
5618
|
-
style:
|
|
5619
|
-
...
|
|
5653
|
+
style: zt,
|
|
5654
|
+
...Vt(u)
|
|
5620
5655
|
})]
|
|
5621
5656
|
}) : null,
|
|
5622
5657
|
/* @__PURE__ */ f("label", {
|
|
5623
5658
|
style: {
|
|
5624
|
-
...
|
|
5659
|
+
...Rt,
|
|
5625
5660
|
display: "grid",
|
|
5626
5661
|
gap: 6
|
|
5627
5662
|
},
|
|
@@ -5629,13 +5664,13 @@ function lr({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
5629
5664
|
name: "email",
|
|
5630
5665
|
type: "email",
|
|
5631
5666
|
required: !u,
|
|
5632
|
-
style:
|
|
5633
|
-
...
|
|
5667
|
+
style: zt,
|
|
5668
|
+
...Vt(u)
|
|
5634
5669
|
})]
|
|
5635
5670
|
}),
|
|
5636
5671
|
/* @__PURE__ */ f("label", {
|
|
5637
5672
|
style: {
|
|
5638
|
-
...
|
|
5673
|
+
...Rt,
|
|
5639
5674
|
display: "grid",
|
|
5640
5675
|
gap: 6
|
|
5641
5676
|
},
|
|
@@ -5643,15 +5678,15 @@ function lr({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
5643
5678
|
name: "password",
|
|
5644
5679
|
type: "password",
|
|
5645
5680
|
required: !u,
|
|
5646
|
-
style:
|
|
5647
|
-
...
|
|
5681
|
+
style: zt,
|
|
5682
|
+
...Vt(u)
|
|
5648
5683
|
})]
|
|
5649
5684
|
}),
|
|
5650
5685
|
/* @__PURE__ */ d("button", {
|
|
5651
5686
|
type: u ? "button" : "submit",
|
|
5652
5687
|
disabled: S || void 0,
|
|
5653
5688
|
style: {
|
|
5654
|
-
...
|
|
5689
|
+
...Me,
|
|
5655
5690
|
border: 0,
|
|
5656
5691
|
padding: "10px 22px",
|
|
5657
5692
|
borderRadius: 8,
|
|
@@ -5683,8 +5718,8 @@ function lr({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
5683
5718
|
]
|
|
5684
5719
|
});
|
|
5685
5720
|
}
|
|
5686
|
-
function
|
|
5687
|
-
let { user: c, status: l, signOut: u } =
|
|
5721
|
+
function hr({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !1, style: r, nodeRef: i, inert: a, linked: o, show: s }) {
|
|
5722
|
+
let { user: c, status: l, signOut: u } = dr(), p = a ? s || "user" : l, m = a ? {
|
|
5688
5723
|
name: "Ada Lovelace",
|
|
5689
5724
|
email: "ada@example.com"
|
|
5690
5725
|
} : c;
|
|
@@ -5705,7 +5740,7 @@ function ur({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
5705
5740
|
children: [
|
|
5706
5741
|
/* @__PURE__ */ f("span", {
|
|
5707
5742
|
style: {
|
|
5708
|
-
...
|
|
5743
|
+
...Rt,
|
|
5709
5744
|
fontWeight: 600
|
|
5710
5745
|
},
|
|
5711
5746
|
children: [
|
|
@@ -5716,7 +5751,7 @@ function ur({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
5716
5751
|
}),
|
|
5717
5752
|
n && m?.email ? /* @__PURE__ */ d("span", {
|
|
5718
5753
|
style: {
|
|
5719
|
-
...
|
|
5754
|
+
...Rt,
|
|
5720
5755
|
opacity: .7
|
|
5721
5756
|
},
|
|
5722
5757
|
children: m.email
|
|
@@ -5725,14 +5760,14 @@ function ur({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
5725
5760
|
type: "button",
|
|
5726
5761
|
onClick: a ? void 0 : u,
|
|
5727
5762
|
style: {
|
|
5728
|
-
...
|
|
5763
|
+
...Me,
|
|
5729
5764
|
border: 0,
|
|
5730
5765
|
padding: "8px 16px",
|
|
5731
5766
|
borderRadius: 8,
|
|
5732
5767
|
fontSize: 14,
|
|
5733
5768
|
cursor: a ? "default" : "pointer"
|
|
5734
5769
|
},
|
|
5735
|
-
...
|
|
5770
|
+
...Vt(a),
|
|
5736
5771
|
children: t
|
|
5737
5772
|
})
|
|
5738
5773
|
]
|
|
@@ -5749,40 +5784,40 @@ function ur({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
5749
5784
|
}
|
|
5750
5785
|
//#endregion
|
|
5751
5786
|
//#region ../ui/src/components/builder/apps/consent/manifest.js
|
|
5752
|
-
var
|
|
5787
|
+
var gr = {
|
|
5753
5788
|
id: "consent",
|
|
5754
5789
|
label: "Cookie consent",
|
|
5755
5790
|
category: "Apps",
|
|
5756
5791
|
keys: ["CookieConsent"],
|
|
5757
5792
|
ssr: "shell",
|
|
5758
5793
|
settings: []
|
|
5759
|
-
},
|
|
5760
|
-
function
|
|
5794
|
+
}, _r = "webim.cookie_consent";
|
|
5795
|
+
function vr() {
|
|
5761
5796
|
try {
|
|
5762
|
-
let e = window.localStorage.getItem(
|
|
5797
|
+
let e = window.localStorage.getItem(_r), t = e ? JSON.parse(e) : null;
|
|
5763
5798
|
return t?.choice === "accepted" || t?.choice === "declined" ? t.choice : "";
|
|
5764
5799
|
} catch {
|
|
5765
5800
|
return "";
|
|
5766
5801
|
}
|
|
5767
5802
|
}
|
|
5768
|
-
function
|
|
5803
|
+
function yr(e) {
|
|
5769
5804
|
try {
|
|
5770
5805
|
document.querySelectorAll(".webim-page").forEach((t) => t.setAttribute("data-webim-consent", e));
|
|
5771
5806
|
} catch {}
|
|
5772
5807
|
}
|
|
5773
|
-
function
|
|
5808
|
+
function br(e) {
|
|
5774
5809
|
try {
|
|
5775
|
-
window.localStorage.setItem(
|
|
5810
|
+
window.localStorage.setItem(_r, JSON.stringify({
|
|
5776
5811
|
choice: e,
|
|
5777
5812
|
at: (/* @__PURE__ */ new Date()).toISOString()
|
|
5778
5813
|
}));
|
|
5779
5814
|
} catch {}
|
|
5780
|
-
|
|
5815
|
+
yr(e);
|
|
5781
5816
|
try {
|
|
5782
5817
|
window.dispatchEvent(new CustomEvent("webim:consent", { detail: { choice: e } }));
|
|
5783
5818
|
} catch {}
|
|
5784
5819
|
}
|
|
5785
|
-
var
|
|
5820
|
+
var xr = {
|
|
5786
5821
|
bottom: {
|
|
5787
5822
|
left: 0,
|
|
5788
5823
|
right: 0,
|
|
@@ -5804,18 +5839,18 @@ var gr = {
|
|
|
5804
5839
|
maxWidth: 400
|
|
5805
5840
|
}
|
|
5806
5841
|
};
|
|
5807
|
-
function
|
|
5842
|
+
function Sr({ message: e, acceptLabel: t, rejectLabel: n, showReject: r, linkLabel: i, linkHref: o, position: s, linked: c, style: p, nodeRef: m, inert: h }) {
|
|
5808
5843
|
let [g, _] = l(!!h), [v, y] = l(null), b = (e) => {
|
|
5809
5844
|
y(e), typeof m == "function" && m(e);
|
|
5810
5845
|
};
|
|
5811
5846
|
if (a(() => {
|
|
5812
5847
|
if (h) return;
|
|
5813
|
-
let e =
|
|
5814
|
-
e ?
|
|
5848
|
+
let e = vr();
|
|
5849
|
+
e ? yr(e) : _(!0);
|
|
5815
5850
|
}, [h, v]), !g) return null;
|
|
5816
5851
|
let x = (e) => () => {
|
|
5817
|
-
h || (
|
|
5818
|
-
}, S =
|
|
5852
|
+
h || (br(e), _(!1));
|
|
5853
|
+
}, S = xr[s] ?? xr.bottom, C = {
|
|
5819
5854
|
appearance: "none",
|
|
5820
5855
|
font: "inherit",
|
|
5821
5856
|
fontSize: 14,
|
|
@@ -5895,37 +5930,37 @@ function _r({ message: e, acceptLabel: t, rejectLabel: n, showReject: r, linkLab
|
|
|
5895
5930
|
}
|
|
5896
5931
|
//#endregion
|
|
5897
5932
|
//#region ../ui/src/components/builder/apps/language/manifest.js
|
|
5898
|
-
var
|
|
5933
|
+
var Cr = {
|
|
5899
5934
|
id: "language",
|
|
5900
5935
|
label: "Language",
|
|
5901
5936
|
category: "Apps",
|
|
5902
5937
|
keys: ["SiteLanguagePicker"],
|
|
5903
5938
|
ssr: "prefetch",
|
|
5904
5939
|
settings: ["locales"]
|
|
5905
|
-
},
|
|
5940
|
+
}, wr = {
|
|
5906
5941
|
id: "search",
|
|
5907
5942
|
label: "Search",
|
|
5908
5943
|
category: "Apps",
|
|
5909
5944
|
keys: ["SiteSearch"],
|
|
5910
5945
|
ssr: "prefetch",
|
|
5911
5946
|
settings: []
|
|
5912
|
-
},
|
|
5913
|
-
function
|
|
5947
|
+
}, Tr = 50, Er = 2e3;
|
|
5948
|
+
function Dr() {
|
|
5914
5949
|
return typeof window > "u" ? "" : new URLSearchParams(window.location.search).get("q") ?? "";
|
|
5915
5950
|
}
|
|
5916
|
-
function
|
|
5951
|
+
function Or(e, t) {
|
|
5917
5952
|
let n = e?.data ?? {}, r = [];
|
|
5918
5953
|
for (let e of Object.values(n)) {
|
|
5919
|
-
let t = e == null ? "" :
|
|
5920
|
-
if (t && r.push(t), r.join(" ").length >
|
|
5954
|
+
let t = e == null ? "" : Ee(e);
|
|
5955
|
+
if (t && r.push(t), r.join(" ").length > Er) break;
|
|
5921
5956
|
}
|
|
5922
|
-
return r.join(" ").slice(0,
|
|
5957
|
+
return r.join(" ").slice(0, Er).toLocaleLowerCase(t || void 0);
|
|
5923
5958
|
}
|
|
5924
|
-
function
|
|
5925
|
-
let { tenant: b, apiUrl: x, locale: S } = i(
|
|
5959
|
+
function kr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButton: n = !0, live: r = !1, layout: o = "inline", includePages: s = !0, collections: u = [], limit: p = 10, emptyText: m = "Nothing found", hint: h = "", style: g, nodeRef: _, inert: v = !1, sample: y = !1 }) {
|
|
5960
|
+
let { tenant: b, apiUrl: x, locale: S } = i(Y), [C, w] = l(() => Dr()), [T, E] = l(() => Dr()), [D, O] = l(null), [k, A] = l(!1), j = c(null), M = o === "popup";
|
|
5926
5961
|
a(() => {
|
|
5927
5962
|
let e = () => {
|
|
5928
|
-
let e =
|
|
5963
|
+
let e = Dr();
|
|
5929
5964
|
w(e), E(e);
|
|
5930
5965
|
};
|
|
5931
5966
|
return window.addEventListener("popstate", e), window.addEventListener("webim:urlchange", e), () => {
|
|
@@ -5976,8 +6011,8 @@ function wr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButto
|
|
|
5976
6011
|
});
|
|
5977
6012
|
}
|
|
5978
6013
|
else for (let t of e.rows) {
|
|
5979
|
-
if (!
|
|
5980
|
-
let n = t?.data ?? {}, r =
|
|
6014
|
+
if (!Or(t, S).includes(N)) continue;
|
|
6015
|
+
let n = t?.data ?? {}, r = Ee(n.name) || "Untitled", i = Ee(n.slug);
|
|
5981
6016
|
F.push({
|
|
5982
6017
|
key: `entry:${t.id}`,
|
|
5983
6018
|
title: r,
|
|
@@ -5985,7 +6020,7 @@ function wr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButto
|
|
|
5985
6020
|
kind: "entry"
|
|
5986
6021
|
});
|
|
5987
6022
|
}
|
|
5988
|
-
let I = F.slice(0, Math.min(Math.max(1, p),
|
|
6023
|
+
let I = F.slice(0, Math.min(Math.max(1, p), Tr)), L = (e) => {
|
|
5989
6024
|
if (v) {
|
|
5990
6025
|
e.preventDefault(), w(T), A(!0);
|
|
5991
6026
|
return;
|
|
@@ -6006,7 +6041,7 @@ function wr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButto
|
|
|
6006
6041
|
title: "Spring collection",
|
|
6007
6042
|
url: "/blog/spring",
|
|
6008
6043
|
kind: "entry"
|
|
6009
|
-
}] : null, z = R ?? I, B = !R && N && D && !I.length,
|
|
6044
|
+
}] : null, z = R ?? I, B = !R && N && D && !I.length, V = !M || k && (z.length > 0 || B), H = z.length > 0 && /* @__PURE__ */ d("ul", {
|
|
6010
6045
|
style: {
|
|
6011
6046
|
listStyle: "none",
|
|
6012
6047
|
margin: 0,
|
|
@@ -6067,7 +6102,7 @@ function wr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButto
|
|
|
6067
6102
|
onChange: (e) => E(e.target.value),
|
|
6068
6103
|
onFocus: () => N && A(!0),
|
|
6069
6104
|
style: {
|
|
6070
|
-
...
|
|
6105
|
+
...zt,
|
|
6071
6106
|
flexGrow: 1,
|
|
6072
6107
|
minWidth: 0
|
|
6073
6108
|
}
|
|
@@ -6094,7 +6129,7 @@ function wr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButto
|
|
|
6094
6129
|
},
|
|
6095
6130
|
children: h
|
|
6096
6131
|
}),
|
|
6097
|
-
|
|
6132
|
+
V && /* @__PURE__ */ f("div", {
|
|
6098
6133
|
style: M ? {
|
|
6099
6134
|
position: "absolute",
|
|
6100
6135
|
top: "100%",
|
|
@@ -6110,7 +6145,7 @@ function wr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButto
|
|
|
6110
6145
|
background: "var(--page-surface, #f2f2f2)",
|
|
6111
6146
|
boxShadow: "0 12px 32px rgba(15, 23, 42, 0.18)"
|
|
6112
6147
|
} : { marginTop: 14 },
|
|
6113
|
-
children: [
|
|
6148
|
+
children: [H, B && /* @__PURE__ */ d("div", {
|
|
6114
6149
|
style: {
|
|
6115
6150
|
fontSize: 14,
|
|
6116
6151
|
opacity: .65,
|
|
@@ -6125,21 +6160,21 @@ function wr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButto
|
|
|
6125
6160
|
}
|
|
6126
6161
|
//#endregion
|
|
6127
6162
|
//#region ../ui/src/components/builder/apps/language/views.jsx
|
|
6128
|
-
function
|
|
6163
|
+
function Ar(e) {
|
|
6129
6164
|
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());
|
|
6130
6165
|
return [...new Set(n.map((e) => e.trim()))];
|
|
6131
6166
|
}
|
|
6132
|
-
var
|
|
6133
|
-
function
|
|
6167
|
+
var jr = (e) => e && e.charAt(0).toUpperCase() + e.slice(1);
|
|
6168
|
+
function Mr(e, t) {
|
|
6134
6169
|
let n = String(e ?? "").toUpperCase();
|
|
6135
6170
|
if (t === "code") return n;
|
|
6136
6171
|
let r = "";
|
|
6137
6172
|
try {
|
|
6138
|
-
r =
|
|
6173
|
+
r = jr(new Intl.DisplayNames([e], { type: "language" }).of(e) ?? "");
|
|
6139
6174
|
} catch {}
|
|
6140
6175
|
return !r || r.toUpperCase() === n ? n : t === "both" ? `${n} — ${r}` : r;
|
|
6141
6176
|
}
|
|
6142
|
-
function
|
|
6177
|
+
function Nr(e, t) {
|
|
6143
6178
|
let n = t ? "" : `?locale=${encodeURIComponent(e)}`;
|
|
6144
6179
|
if (typeof window > "u") return n || "?";
|
|
6145
6180
|
try {
|
|
@@ -6149,8 +6184,8 @@ function Or(e, t) {
|
|
|
6149
6184
|
return n || "/";
|
|
6150
6185
|
}
|
|
6151
6186
|
}
|
|
6152
|
-
function
|
|
6153
|
-
let c = i(
|
|
6187
|
+
function Pr({ variant: e, display: t, separator: n, label: r, style: a, nodeRef: o, inert: s }) {
|
|
6188
|
+
let c = i(Y), l = Ar(c?.settings), u = l[0] ?? "", p = l.includes(c?.locale) ? c.locale : u, m = {
|
|
6154
6189
|
display: "inline-flex",
|
|
6155
6190
|
alignItems: "center",
|
|
6156
6191
|
gap: 8,
|
|
@@ -6185,7 +6220,7 @@ function kr({ variant: e, display: t, separator: n, label: r, style: a, nodeRef:
|
|
|
6185
6220
|
style: { opacity: .4 },
|
|
6186
6221
|
children: n ?? "·"
|
|
6187
6222
|
}), /* @__PURE__ */ d("a", {
|
|
6188
|
-
href:
|
|
6223
|
+
href: Nr(e, e === u),
|
|
6189
6224
|
hrefLang: e,
|
|
6190
6225
|
"aria-current": e === p ? "true" : void 0,
|
|
6191
6226
|
onClick: s ? (e) => e.preventDefault() : void 0,
|
|
@@ -6195,7 +6230,7 @@ function kr({ variant: e, display: t, separator: n, label: r, style: a, nodeRef:
|
|
|
6195
6230
|
textDecoration: "none",
|
|
6196
6231
|
cursor: s ? "default" : "pointer"
|
|
6197
6232
|
},
|
|
6198
|
-
children:
|
|
6233
|
+
children: Mr(e, t)
|
|
6199
6234
|
})]
|
|
6200
6235
|
}, e))]
|
|
6201
6236
|
}) : /* @__PURE__ */ f("div", {
|
|
@@ -6206,7 +6241,7 @@ function kr({ variant: e, display: t, separator: n, label: r, style: a, nodeRef:
|
|
|
6206
6241
|
value: p,
|
|
6207
6242
|
onChange: s ? void 0 : (e) => {
|
|
6208
6243
|
let t = e.target.value;
|
|
6209
|
-
window.location.assign(
|
|
6244
|
+
window.location.assign(Nr(t, t === u));
|
|
6210
6245
|
},
|
|
6211
6246
|
onKeyDown: s ? (e) => e.preventDefault() : void 0,
|
|
6212
6247
|
style: {
|
|
@@ -6220,57 +6255,682 @@ function kr({ variant: e, display: t, separator: n, label: r, style: a, nodeRef:
|
|
|
6220
6255
|
},
|
|
6221
6256
|
children: l.map((e) => /* @__PURE__ */ d("option", {
|
|
6222
6257
|
value: e,
|
|
6223
|
-
children:
|
|
6258
|
+
children: Mr(e, t)
|
|
6224
6259
|
}, e))
|
|
6225
6260
|
})]
|
|
6226
6261
|
});
|
|
6227
6262
|
}
|
|
6228
6263
|
//#endregion
|
|
6229
6264
|
//#region ../ui/src/components/builder/apps/index.js
|
|
6230
|
-
var
|
|
6231
|
-
|
|
6232
|
-
|
|
6233
|
-
|
|
6234
|
-
|
|
6235
|
-
],
|
|
6236
|
-
SiteLoginForm:
|
|
6237
|
-
SiteAccountMenu:
|
|
6238
|
-
SiteLanguagePicker:
|
|
6239
|
-
CookieConsent:
|
|
6240
|
-
SiteSearch:
|
|
6265
|
+
var Fr = [
|
|
6266
|
+
ir,
|
|
6267
|
+
Cr,
|
|
6268
|
+
gr,
|
|
6269
|
+
wr
|
|
6270
|
+
], Ir = {
|
|
6271
|
+
SiteLoginForm: mr,
|
|
6272
|
+
SiteAccountMenu: hr,
|
|
6273
|
+
SiteLanguagePicker: Pr,
|
|
6274
|
+
CookieConsent: Sr,
|
|
6275
|
+
SiteSearch: kr
|
|
6241
6276
|
};
|
|
6242
|
-
new Set(
|
|
6277
|
+
new Set(Fr.filter((e) => e.ssr === "shell").flatMap((e) => e.keys));
|
|
6243
6278
|
//#endregion
|
|
6244
|
-
//#region ../ui/src/components/builder/
|
|
6245
|
-
var
|
|
6246
|
-
|
|
6247
|
-
|
|
6279
|
+
//#region ../ui/src/components/builder/three/runtime.js
|
|
6280
|
+
var Lr = "0.185.1", Rr = "4.3.1", zr = "https://cdn.jsdelivr.net/npm", Br = `${zr}/three@${Lr}/build/three.module.js`, Vr = `${zr}/@google/model-viewer@${Rr}/dist/model-viewer.min.js`, Hr = (e) => import(
|
|
6281
|
+
/* @vite-ignore */
|
|
6282
|
+
/* webpackIgnore: true */
|
|
6283
|
+
e
|
|
6284
|
+
), Ur = /* @__PURE__ */ new Map();
|
|
6285
|
+
function Wr(e) {
|
|
6286
|
+
if (Ur.has(e)) return Ur.get(e);
|
|
6287
|
+
if (typeof window > "u") return new Promise(() => {});
|
|
6288
|
+
let t = Hr(e).catch((t) => {
|
|
6289
|
+
throw Ur.delete(e), t;
|
|
6290
|
+
});
|
|
6291
|
+
return Ur.set(e, t), t;
|
|
6292
|
+
}
|
|
6293
|
+
var Gr = () => Wr(Br);
|
|
6294
|
+
function Kr() {
|
|
6295
|
+
return typeof window < "u" && window.customElements?.get("model-viewer") ? Promise.resolve(null) : Wr(Vr);
|
|
6296
|
+
}
|
|
6297
|
+
var qr = () => typeof window < "u" && !!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches, Jr = (e = 2) => Math.min(typeof window > "u" ? 1 : window.devicePixelRatio || 1, e);
|
|
6298
|
+
function Yr(e, t) {
|
|
6299
|
+
let n = 0, r = 0, i = 0, a = !0, o = (e) => {
|
|
6300
|
+
n = requestAnimationFrame(o), i ||= e;
|
|
6301
|
+
let a = r ? (e - r) / 1e3 : 0;
|
|
6302
|
+
r = e, t(a, (e - i) / 1e3);
|
|
6303
|
+
}, s = () => {
|
|
6304
|
+
n && cancelAnimationFrame(n), n = 0, r = 0;
|
|
6305
|
+
}, c = () => {
|
|
6306
|
+
let e = a && document.visibilityState !== "hidden";
|
|
6307
|
+
e && !n ? n = requestAnimationFrame(o) : !e && n && s();
|
|
6308
|
+
};
|
|
6309
|
+
t(0, 0);
|
|
6310
|
+
let l = typeof IntersectionObserver > "u" ? null : new IntersectionObserver((e) => {
|
|
6311
|
+
a = e.some((e) => e.isIntersecting), c();
|
|
6312
|
+
}, { rootMargin: "120px" });
|
|
6313
|
+
return l && e && l.observe(e), document.addEventListener("visibilitychange", c), c(), () => {
|
|
6314
|
+
s(), l?.disconnect(), document.removeEventListener("visibilitychange", c);
|
|
6315
|
+
};
|
|
6316
|
+
}
|
|
6317
|
+
function Xr(e, t, n = {}) {
|
|
6318
|
+
let r = {
|
|
6319
|
+
radius: n.distance ?? 4,
|
|
6320
|
+
polar: n.polar ?? Math.PI / 2.4,
|
|
6321
|
+
azimuth: n.azimuth ?? .6,
|
|
6322
|
+
target: n.target ?? {
|
|
6323
|
+
x: 0,
|
|
6324
|
+
y: 0,
|
|
6325
|
+
z: 0
|
|
6326
|
+
}
|
|
6327
|
+
}, i = { ...r }, a = n.minDistance ?? .4, o = n.maxDistance ?? 200, s = n.damping ?? .12, c = .05, l = null, u = (e) => {
|
|
6328
|
+
e.button !== void 0 && e.button !== 0 || (l = {
|
|
6329
|
+
x: e.clientX,
|
|
6330
|
+
y: e.clientY,
|
|
6331
|
+
id: e.pointerId
|
|
6332
|
+
}, t.setPointerCapture?.(e.pointerId));
|
|
6333
|
+
}, d = (e) => {
|
|
6334
|
+
if (!l || e.pointerId !== l.id) return;
|
|
6335
|
+
let t = e.clientX - l.x, n = e.clientY - l.y;
|
|
6336
|
+
l = {
|
|
6337
|
+
...l,
|
|
6338
|
+
x: e.clientX,
|
|
6339
|
+
y: e.clientY
|
|
6340
|
+
}, i.azimuth -= t * .006, i.polar = Math.max(c, Math.min(Math.PI - c, i.polar - n * .006)), e.preventDefault();
|
|
6341
|
+
}, f = (e) => {
|
|
6342
|
+
l && e.pointerId === l.id && t.releasePointerCapture?.(e.pointerId), l = null;
|
|
6343
|
+
}, p = (e) => {
|
|
6344
|
+
n.enableZoom !== !1 && (e.preventDefault(), i.radius = Math.max(a, Math.min(o, i.radius * (1 + Math.sign(e.deltaY) * .12))));
|
|
6345
|
+
};
|
|
6346
|
+
return t.addEventListener("pointerdown", u), t.addEventListener("pointermove", d), t.addEventListener("pointerup", f), t.addEventListener("pointercancel", f), t.addEventListener("wheel", p, { passive: !1 }), {
|
|
6347
|
+
update: () => {
|
|
6348
|
+
r.radius += (i.radius - r.radius) * s, r.polar += (i.polar - r.polar) * s, r.azimuth += (i.azimuth - r.azimuth) * s;
|
|
6349
|
+
let t = Math.sin(r.polar);
|
|
6350
|
+
e.position.set(r.target.x + r.radius * t * Math.sin(r.azimuth), r.target.y + r.radius * Math.cos(r.polar), r.target.z + r.radius * t * Math.cos(r.azimuth)), e.lookAt(r.target.x, r.target.y, r.target.z);
|
|
6351
|
+
},
|
|
6352
|
+
dragging: () => !!l,
|
|
6353
|
+
autoSpin: (e, t) => {
|
|
6354
|
+
!l && e && (i.azimuth += e * t);
|
|
6355
|
+
},
|
|
6356
|
+
frame: (e, t) => {
|
|
6357
|
+
i.radius = Math.max(a, Math.min(o, e)), r.radius = i.radius, t && (r.target = { ...t }, i.target = { ...t });
|
|
6358
|
+
},
|
|
6359
|
+
dispose: () => {
|
|
6360
|
+
t.removeEventListener("pointerdown", u), t.removeEventListener("pointermove", d), t.removeEventListener("pointerup", f), t.removeEventListener("pointercancel", f), t.removeEventListener("wheel", p);
|
|
6361
|
+
}
|
|
6362
|
+
};
|
|
6363
|
+
}
|
|
6364
|
+
//#endregion
|
|
6365
|
+
//#region ../ui/src/components/builder/three/views.jsx
|
|
6366
|
+
var Zr = (e, t) => Number.isFinite(Number(e)) && Number(e) > 0 ? Number(e) : t, Qr = (e, t) => (Number.isFinite(Number(e)) ? Number(e) : t) / 100, $r = (e) => (Number.isFinite(Number(e)) ? Number(e) : 0) * Math.PI / 180;
|
|
6367
|
+
function ei({ label: e, note: t, height: n, nodeRef: r, style: i }) {
|
|
6368
|
+
return /* @__PURE__ */ f("div", {
|
|
6369
|
+
ref: r,
|
|
6370
|
+
style: {
|
|
6371
|
+
...P(i),
|
|
6372
|
+
minHeight: Zr(n, 320),
|
|
6373
|
+
display: "flex",
|
|
6374
|
+
flexDirection: "column",
|
|
6375
|
+
alignItems: "center",
|
|
6376
|
+
justifyContent: "center",
|
|
6377
|
+
gap: 6,
|
|
6378
|
+
border: "1px dashed rgba(148,163,184,.55)",
|
|
6379
|
+
borderRadius: 10,
|
|
6380
|
+
background: "rgba(148,163,184,.08)",
|
|
6381
|
+
...le,
|
|
6382
|
+
color: "rgba(100,116,139,.95)",
|
|
6383
|
+
fontSize: 13,
|
|
6384
|
+
textAlign: "center",
|
|
6385
|
+
padding: 16
|
|
6386
|
+
},
|
|
6387
|
+
children: [/* @__PURE__ */ d("div", {
|
|
6388
|
+
style: { fontWeight: 600 },
|
|
6389
|
+
children: e
|
|
6390
|
+
}), t ? /* @__PURE__ */ d("div", {
|
|
6391
|
+
style: {
|
|
6392
|
+
fontSize: 11,
|
|
6393
|
+
opacity: .8,
|
|
6394
|
+
maxWidth: 320
|
|
6395
|
+
},
|
|
6396
|
+
children: t
|
|
6397
|
+
}) : null]
|
|
6398
|
+
});
|
|
6399
|
+
}
|
|
6400
|
+
function ti({ src: e, poster: t, alt: n, height: r, bg: i, autoRotate: o, rotateDelay: s, cameraControls: c, ar: u, exposure: f, shadow: p, fieldOfView: m, environment: h, style: g, nodeRef: _, inert: v }) {
|
|
6401
|
+
let [y, b] = l(typeof window < "u" && !!window.customElements?.get("model-viewer")), [x, S] = l(!1);
|
|
6402
|
+
a(() => {
|
|
6403
|
+
if (y || !e) return;
|
|
6404
|
+
let t = !0;
|
|
6405
|
+
return Kr().then(() => t && b(!0), () => t && S(!0)), () => {
|
|
6406
|
+
t = !1;
|
|
6407
|
+
};
|
|
6408
|
+
}, [y, e]);
|
|
6409
|
+
let C = {
|
|
6410
|
+
...P(g),
|
|
6411
|
+
display: "block",
|
|
6412
|
+
width: "100%",
|
|
6413
|
+
minHeight: Zr(r, 360),
|
|
6414
|
+
height: Zr(r, 360),
|
|
6415
|
+
backgroundColor: i || "transparent",
|
|
6416
|
+
borderRadius: P(g).borderRadius ?? void 0
|
|
6417
|
+
};
|
|
6418
|
+
if (!e) return v ? /* @__PURE__ */ d(ei, {
|
|
6419
|
+
nodeRef: _,
|
|
6420
|
+
style: g,
|
|
6421
|
+
height: r,
|
|
6422
|
+
label: "3D Model",
|
|
6423
|
+
note: "Pick a .glb or .gltf file in the Settings panel."
|
|
6424
|
+
}) : /* @__PURE__ */ d("div", {
|
|
6425
|
+
ref: _,
|
|
6426
|
+
style: C
|
|
6427
|
+
});
|
|
6428
|
+
if (x) return /* @__PURE__ */ d("div", {
|
|
6429
|
+
ref: _,
|
|
6430
|
+
style: {
|
|
6431
|
+
...C,
|
|
6432
|
+
display: "flex",
|
|
6433
|
+
alignItems: "center",
|
|
6434
|
+
justifyContent: "center"
|
|
6435
|
+
},
|
|
6436
|
+
children: t ? /* @__PURE__ */ d("img", {
|
|
6437
|
+
src: t,
|
|
6438
|
+
alt: n || "",
|
|
6439
|
+
style: {
|
|
6440
|
+
maxWidth: "100%",
|
|
6441
|
+
maxHeight: "100%"
|
|
6442
|
+
}
|
|
6443
|
+
}) : null
|
|
6444
|
+
});
|
|
6445
|
+
let w = (e) => e ? "" : void 0, T = o !== !1;
|
|
6446
|
+
return /* @__PURE__ */ d("model-viewer", {
|
|
6447
|
+
ref: _,
|
|
6448
|
+
src: e,
|
|
6449
|
+
alt: n || "A 3D model",
|
|
6450
|
+
poster: t || void 0,
|
|
6451
|
+
style: C,
|
|
6452
|
+
"camera-controls": w(!v && c !== !1),
|
|
6453
|
+
"auto-rotate": w(T && !qr()),
|
|
6454
|
+
"auto-rotate-delay": T ? String(Zr(s, 0)) : void 0,
|
|
6455
|
+
"rotation-per-second": "18deg",
|
|
6456
|
+
ar: w(!v && u === !0),
|
|
6457
|
+
"ar-modes": "webxr scene-viewer quick-look",
|
|
6458
|
+
"shadow-intensity": String(Qr(p, 100)),
|
|
6459
|
+
exposure: String(Qr(f, 100)),
|
|
6460
|
+
"field-of-view": m ? `${Number(m)}deg` : void 0,
|
|
6461
|
+
"environment-image": h && h !== "neutral" ? h : "neutral",
|
|
6462
|
+
"interaction-prompt": v ? "none" : void 0,
|
|
6463
|
+
loading: "lazy",
|
|
6464
|
+
"touch-action": "pan-y",
|
|
6465
|
+
children: t ? /* @__PURE__ */ d("img", {
|
|
6466
|
+
slot: "poster",
|
|
6467
|
+
src: t,
|
|
6468
|
+
alt: n || "",
|
|
6469
|
+
style: {
|
|
6470
|
+
width: "100%",
|
|
6471
|
+
height: "100%",
|
|
6472
|
+
objectFit: "contain"
|
|
6473
|
+
}
|
|
6474
|
+
}) : null
|
|
6475
|
+
});
|
|
6476
|
+
}
|
|
6477
|
+
var ni = ["attribute vec2 p;", "void main() { gl_Position = vec4(p, 0.0, 1.0); }"].join("\n"), ri = [
|
|
6478
|
+
"precision highp float;",
|
|
6479
|
+
"uniform vec2 u_res;",
|
|
6480
|
+
"uniform float u_time;",
|
|
6481
|
+
"uniform vec2 u_mouse;",
|
|
6482
|
+
"uniform vec3 u_a;",
|
|
6483
|
+
"uniform vec3 u_b;",
|
|
6484
|
+
"uniform vec3 u_c;",
|
|
6485
|
+
"uniform float u_scale;",
|
|
6486
|
+
"",
|
|
6487
|
+
"float hash(vec2 p){ return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453123); }",
|
|
6488
|
+
"float noise(vec2 p){",
|
|
6489
|
+
" vec2 i = floor(p); vec2 f = fract(p);",
|
|
6490
|
+
" vec2 u = f * f * (3.0 - 2.0 * f);",
|
|
6491
|
+
" return mix(mix(hash(i), hash(i + vec2(1.0, 0.0)), u.x),",
|
|
6492
|
+
" mix(hash(i + vec2(0.0, 1.0)), hash(i + vec2(1.0, 1.0)), u.x), u.y);",
|
|
6493
|
+
"}",
|
|
6494
|
+
"float fbm(vec2 p){",
|
|
6495
|
+
" float v = 0.0; float a = 0.5;",
|
|
6496
|
+
" for (int i = 0; i < 5; i++) { v += a * noise(p); p *= 2.02; a *= 0.5; }",
|
|
6497
|
+
" return v;",
|
|
6498
|
+
"}",
|
|
6499
|
+
""
|
|
6500
|
+
].join("\n"), ii = {
|
|
6501
|
+
gradient: [
|
|
6502
|
+
"void main(){",
|
|
6503
|
+
" vec2 uv = gl_FragCoord.xy / u_res;",
|
|
6504
|
+
" vec2 sp = (gl_FragCoord.xy - 0.5 * u_res) / min(u_res.x, u_res.y);",
|
|
6505
|
+
" float t = u_time * 0.25;",
|
|
6506
|
+
" float d1 = length(sp - vec2(sin(t) * 0.4, cos(t * 0.8) * 0.3) - u_mouse * 0.25);",
|
|
6507
|
+
" float d2 = length(sp + vec2(cos(t * 1.1) * 0.45, sin(t * 0.7) * 0.35));",
|
|
6508
|
+
" vec3 col = mix(u_a, u_b, smoothstep(0.0, 1.0, d1 * u_scale));",
|
|
6509
|
+
" col = mix(col, u_c, smoothstep(0.0, 1.2, d2 * u_scale) * 0.65);",
|
|
6510
|
+
" gl_FragColor = vec4(col, 1.0);",
|
|
6511
|
+
"}"
|
|
6512
|
+
].join("\n"),
|
|
6513
|
+
waves: [
|
|
6514
|
+
"void main(){",
|
|
6515
|
+
" vec2 uv = gl_FragCoord.xy / u_res;",
|
|
6516
|
+
" float t = u_time * 0.5;",
|
|
6517
|
+
" float y = uv.y * u_scale;",
|
|
6518
|
+
" float w = sin((uv.x * 6.0) + t) * 0.08 + sin((uv.x * 11.0) - (t * 1.3)) * 0.05;",
|
|
6519
|
+
" float band = smoothstep(0.0, 1.0, y + w + (u_mouse.y * 0.1));",
|
|
6520
|
+
" vec3 col = mix(u_a, u_b, band);",
|
|
6521
|
+
" col += u_c * (0.12 * smoothstep(0.02, 0.0, abs(y + w - 0.5)));",
|
|
6522
|
+
" gl_FragColor = vec4(col, 1.0);",
|
|
6523
|
+
"}"
|
|
6524
|
+
].join("\n"),
|
|
6525
|
+
plasma: [
|
|
6526
|
+
"void main(){",
|
|
6527
|
+
" vec2 uv = gl_FragCoord.xy / u_res;",
|
|
6528
|
+
" vec2 p = (uv - 0.5) * u_scale * 3.0 + u_mouse * 0.3;",
|
|
6529
|
+
" float t = u_time * 0.2;",
|
|
6530
|
+
" float n = fbm(p + vec2(fbm(p + t), fbm(p - t)));",
|
|
6531
|
+
" vec3 col = mix(u_a, u_b, smoothstep(0.25, 0.75, n));",
|
|
6532
|
+
" col = mix(col, u_c, smoothstep(0.6, 0.95, n));",
|
|
6533
|
+
" gl_FragColor = vec4(col, 1.0);",
|
|
6534
|
+
"}"
|
|
6535
|
+
].join("\n"),
|
|
6536
|
+
grid: [
|
|
6537
|
+
"void main(){",
|
|
6538
|
+
" vec2 uv = gl_FragCoord.xy / u_res;",
|
|
6539
|
+
" vec2 sp = (gl_FragCoord.xy - 0.5 * u_res) / min(u_res.x, u_res.y);",
|
|
6540
|
+
" float t = u_time * 0.15;",
|
|
6541
|
+
" vec2 g = sp * (8.0 * u_scale);",
|
|
6542
|
+
" g.y += t;",
|
|
6543
|
+
" vec2 f = abs(fract(g) - 0.5);",
|
|
6544
|
+
" float line = smoothstep(0.48, 0.5, max(f.x, f.y));",
|
|
6545
|
+
" float glow = 1.0 - smoothstep(0.0, 0.9, length(sp - u_mouse * 0.4));",
|
|
6546
|
+
" vec3 col = mix(u_a, u_b, line);",
|
|
6547
|
+
" col += u_c * glow * 0.35;",
|
|
6548
|
+
" gl_FragColor = vec4(col, 1.0);",
|
|
6549
|
+
"}"
|
|
6550
|
+
].join("\n")
|
|
6551
|
+
};
|
|
6552
|
+
function ai(e, t) {
|
|
6553
|
+
let n = /^#?([0-9a-f]{6})$/i.exec(String(e ?? "").trim());
|
|
6554
|
+
if (!n) return t;
|
|
6555
|
+
let r = parseInt(n[1], 16);
|
|
6556
|
+
return [
|
|
6557
|
+
(r >> 16 & 255) / 255,
|
|
6558
|
+
(r >> 8 & 255) / 255,
|
|
6559
|
+
(r & 255) / 255
|
|
6560
|
+
];
|
|
6561
|
+
}
|
|
6562
|
+
function oi(e, t, n) {
|
|
6563
|
+
let r = e.createShader(t);
|
|
6564
|
+
if (e.shaderSource(r, n), e.compileShader(r), !e.getShaderParameter(r, e.COMPILE_STATUS)) {
|
|
6565
|
+
let t = e.getShaderInfoLog(r);
|
|
6566
|
+
throw e.deleteShader(r), Error(t || "Shader failed to compile");
|
|
6567
|
+
}
|
|
6568
|
+
return r;
|
|
6569
|
+
}
|
|
6570
|
+
function si({ preset: e, code: t, colorA: n, colorB: r, colorC: i, speed: o, scale: s, height: u, interactive: p, style: m, nodeRef: h, inert: g }) {
|
|
6571
|
+
let _ = c(null), v = c(null), [y, b] = l(""), x = typeof t == "string" && t.trim() ? t : ii[e] ?? ii.gradient, S = String(n ?? ""), C = String(r ?? ""), w = String(i ?? ""), T = Qr(o, 100), E = Math.max(.05, Qr(s, 100));
|
|
6572
|
+
return a(() => {
|
|
6573
|
+
let e = _.current, t = v.current;
|
|
6574
|
+
if (!e || !t) return;
|
|
6575
|
+
let n = e.getContext("webgl", {
|
|
6576
|
+
antialias: !0,
|
|
6577
|
+
alpha: !0,
|
|
6578
|
+
premultipliedAlpha: !1
|
|
6579
|
+
});
|
|
6580
|
+
if (!n) {
|
|
6581
|
+
b("WebGL is not available in this browser");
|
|
6582
|
+
return;
|
|
6583
|
+
}
|
|
6584
|
+
let r = null;
|
|
6585
|
+
try {
|
|
6586
|
+
let e = oi(n, n.VERTEX_SHADER, ni), t = oi(n, n.FRAGMENT_SHADER, ri + x);
|
|
6587
|
+
if (r = n.createProgram(), n.attachShader(r, e), n.attachShader(r, t), n.linkProgram(r), !n.getProgramParameter(r, n.LINK_STATUS)) throw Error(n.getProgramInfoLog(r) || "Link failed");
|
|
6588
|
+
b("");
|
|
6589
|
+
} catch (e) {
|
|
6590
|
+
b(e?.message || "Shader failed to compile");
|
|
6591
|
+
return;
|
|
6592
|
+
}
|
|
6593
|
+
n.useProgram(r);
|
|
6594
|
+
let i = n.createBuffer();
|
|
6595
|
+
n.bindBuffer(n.ARRAY_BUFFER, i), n.bufferData(n.ARRAY_BUFFER, new Float32Array([
|
|
6596
|
+
-1,
|
|
6597
|
+
-1,
|
|
6598
|
+
3,
|
|
6599
|
+
-1,
|
|
6600
|
+
-1,
|
|
6601
|
+
3
|
|
6602
|
+
]), n.STATIC_DRAW);
|
|
6603
|
+
let a = n.getAttribLocation(r, "p");
|
|
6604
|
+
n.enableVertexAttribArray(a), n.vertexAttribPointer(a, 2, n.FLOAT, !1, 0, 0);
|
|
6605
|
+
let o = (e) => n.getUniformLocation(r, e), s = {
|
|
6606
|
+
res: o("u_res"),
|
|
6607
|
+
time: o("u_time"),
|
|
6608
|
+
mouse: o("u_mouse"),
|
|
6609
|
+
a: o("u_a"),
|
|
6610
|
+
b: o("u_b"),
|
|
6611
|
+
c: o("u_c"),
|
|
6612
|
+
scale: o("u_scale")
|
|
6613
|
+
}, c = {
|
|
6614
|
+
x: 0,
|
|
6615
|
+
y: 0
|
|
6616
|
+
}, l = (t) => {
|
|
6617
|
+
let n = e.getBoundingClientRect();
|
|
6618
|
+
!n.width || !n.height || (c.x = ((t.clientX - n.left) / n.width - .5) * 2, c.y = (.5 - (t.clientY - n.top) / n.height) * 2);
|
|
6619
|
+
};
|
|
6620
|
+
p !== !1 && t.addEventListener("pointermove", l);
|
|
6621
|
+
let u = () => {
|
|
6622
|
+
let r = Jr(), i = Math.max(1, Math.round(t.clientWidth * r)), a = Math.max(1, Math.round(t.clientHeight * r));
|
|
6623
|
+
(e.width !== i || e.height !== a) && (e.width = i, e.height = a, n.viewport(0, 0, i, a));
|
|
6624
|
+
}, d = typeof ResizeObserver > "u" ? null : new ResizeObserver(u);
|
|
6625
|
+
d?.observe(t), u();
|
|
6626
|
+
let f = qr(), m = {
|
|
6627
|
+
a: ai(S, [
|
|
6628
|
+
.35,
|
|
6629
|
+
.4,
|
|
6630
|
+
.95
|
|
6631
|
+
]),
|
|
6632
|
+
b: ai(C, [
|
|
6633
|
+
.05,
|
|
6634
|
+
.06,
|
|
6635
|
+
.16
|
|
6636
|
+
]),
|
|
6637
|
+
c: ai(w, [
|
|
6638
|
+
.95,
|
|
6639
|
+
.35,
|
|
6640
|
+
.6
|
|
6641
|
+
])
|
|
6642
|
+
}, h = {};
|
|
6643
|
+
return h.stop = Yr(t, (t, r) => {
|
|
6644
|
+
u(), n.uniform2f(s.res, e.width, e.height), n.uniform1f(s.time, (f ? 0 : r) * T), n.uniform2f(s.mouse, c.x, c.y), n.uniform3fv(s.a, m.a), n.uniform3fv(s.b, m.b), n.uniform3fv(s.c, m.c), n.uniform1f(s.scale, E), n.drawArrays(n.TRIANGLES, 0, 3), f && h.stop?.();
|
|
6645
|
+
}), () => {
|
|
6646
|
+
h.stop?.(), d?.disconnect(), t.removeEventListener("pointermove", l), n.deleteProgram(r), n.deleteBuffer(i), n.getExtension("WEBGL_lose_context")?.loseContext();
|
|
6647
|
+
};
|
|
6648
|
+
}, [
|
|
6649
|
+
x,
|
|
6650
|
+
S,
|
|
6651
|
+
C,
|
|
6652
|
+
w,
|
|
6653
|
+
T,
|
|
6654
|
+
E,
|
|
6655
|
+
p
|
|
6656
|
+
]), /* @__PURE__ */ f("div", {
|
|
6657
|
+
ref: (e) => {
|
|
6658
|
+
v.current = e, typeof h == "function" && h(e);
|
|
6659
|
+
},
|
|
6660
|
+
style: {
|
|
6661
|
+
...P(m),
|
|
6662
|
+
position: P(m).position ?? "relative",
|
|
6663
|
+
minHeight: Zr(u, 320),
|
|
6664
|
+
overflow: "hidden"
|
|
6665
|
+
},
|
|
6666
|
+
children: [/* @__PURE__ */ d("canvas", {
|
|
6667
|
+
ref: _,
|
|
6668
|
+
style: {
|
|
6669
|
+
display: "block",
|
|
6670
|
+
width: "100%",
|
|
6671
|
+
height: "100%",
|
|
6672
|
+
position: "absolute",
|
|
6673
|
+
inset: 0
|
|
6674
|
+
}
|
|
6675
|
+
}), y && g ? /* @__PURE__ */ d("div", {
|
|
6676
|
+
style: {
|
|
6677
|
+
position: "absolute",
|
|
6678
|
+
inset: 0,
|
|
6679
|
+
display: "flex",
|
|
6680
|
+
alignItems: "center",
|
|
6681
|
+
justifyContent: "center",
|
|
6682
|
+
padding: 12,
|
|
6683
|
+
background: "rgba(15,23,42,.75)",
|
|
6684
|
+
...le,
|
|
6685
|
+
color: "#fecaca",
|
|
6686
|
+
fontSize: 11,
|
|
6687
|
+
whiteSpace: "pre-wrap",
|
|
6688
|
+
overflow: "auto"
|
|
6689
|
+
},
|
|
6690
|
+
children: y
|
|
6691
|
+
}) : null]
|
|
6692
|
+
});
|
|
6693
|
+
}
|
|
6694
|
+
function ci(e, t) {
|
|
6695
|
+
let n = new e.Scene(), r = new e.BoxGeometry();
|
|
6696
|
+
r.deleteAttribute("uv");
|
|
6697
|
+
let i = new e.Mesh(r, new e.MeshBasicMaterial({
|
|
6698
|
+
side: e.BackSide,
|
|
6699
|
+
color: 6710886
|
|
6700
|
+
}));
|
|
6701
|
+
i.scale.setScalar(12), n.add(i);
|
|
6702
|
+
let a = (t, i, a, o, s, c, l, u) => {
|
|
6703
|
+
let d = new e.Mesh(r, new e.MeshBasicMaterial());
|
|
6704
|
+
d.material.color.setHex(t), d.material.color.multiplyScalar(i), d.position.set(a, o, s), d.scale.set(c, l, u), n.add(d);
|
|
6705
|
+
};
|
|
6706
|
+
a(16777215, 4, 0, 6, 0, 10, .5, 10), a(16777215, 1.4, -6, 1, 2, .4, 6, 6), a(16777215, 1, 6, 1, -2, .4, 6, 6);
|
|
6707
|
+
let o = new e.PMREMGenerator(t), s = o.fromScene(n, .04);
|
|
6708
|
+
return o.dispose(), r.dispose(), n.traverse((e) => e.material?.dispose?.()), s.texture;
|
|
6709
|
+
}
|
|
6710
|
+
var li = {
|
|
6711
|
+
box: (e) => new e.BoxGeometry(1, 1, 1, 1, 1, 1),
|
|
6712
|
+
sphere: (e) => new e.SphereGeometry(.62, 48, 32),
|
|
6713
|
+
torus: (e) => new e.TorusGeometry(.5, .2, 24, 64),
|
|
6714
|
+
knot: (e) => new e.TorusKnotGeometry(.44, .15, 128, 24),
|
|
6715
|
+
cone: (e) => new e.ConeGeometry(.55, 1.1, 48),
|
|
6716
|
+
cylinder: (e) => new e.CylinderGeometry(.45, .45, 1.1, 48),
|
|
6717
|
+
plane: (e) => new e.PlaneGeometry(1.4, 1.4),
|
|
6718
|
+
capsule: (e) => new e.CapsuleGeometry(.35, .6, 8, 32)
|
|
6719
|
+
}, ui = (e, t) => Number.isFinite(Number(e)) ? Number(e) : t;
|
|
6720
|
+
function di({ objects: e, background: t, cameraDistance: n, fov: r, autoRotate: i, spinSpeed: o, controls: s, ground: u, height: f, style: p, nodeRef: m, inert: h }) {
|
|
6721
|
+
let g = c(null), [_, v] = l(!1), y = Array.isArray(e) ? e.filter((e) => e && typeof e == "object") : [], b = JSON.stringify(y), x = i !== !1 && !qr(), S = s !== !1 && !h;
|
|
6722
|
+
return a(() => {
|
|
6723
|
+
let e = g.current;
|
|
6724
|
+
if (!e) return;
|
|
6725
|
+
let i = !0, a = null;
|
|
6726
|
+
return Gr().then((s) => {
|
|
6727
|
+
if (!i || !e) return;
|
|
6728
|
+
let c = new s.WebGLRenderer({
|
|
6729
|
+
antialias: !0,
|
|
6730
|
+
alpha: !t
|
|
6731
|
+
});
|
|
6732
|
+
c.setPixelRatio(Jr()), c.shadowMap.enabled = u !== !1, c.shadowMap.type = s.PCFSoftShadowMap, c.outputColorSpace = s.SRGBColorSpace, c.toneMapping = s.ACESFilmicToneMapping, c.domElement.style.display = "block", c.domElement.style.width = "100%", c.domElement.style.height = "100%", e.appendChild(c.domElement);
|
|
6733
|
+
let l = new s.Scene();
|
|
6734
|
+
t && (l.background = new s.Color(t)), l.environment = ci(s, c);
|
|
6735
|
+
let d = new s.PerspectiveCamera(ui(r, 45), 1, .1, 400), f = Xr(d, c.domElement, {
|
|
6736
|
+
distance: ui(n, 5),
|
|
6737
|
+
enableZoom: S
|
|
6738
|
+
}), p = new s.DirectionalLight(16777215, 2.2);
|
|
6739
|
+
p.position.set(4, 7, 5), p.castShadow = u !== !1, p.shadow.mapSize.set(1024, 1024), p.shadow.camera.near = .5, p.shadow.camera.far = 30, l.add(p, new s.AmbientLight(16777215, .35));
|
|
6740
|
+
let m = [], h = new s.Group();
|
|
6741
|
+
for (let e of y) {
|
|
6742
|
+
let t = (li[e.shape] ?? li.box)(s), n = new s.MeshStandardMaterial({
|
|
6743
|
+
color: /^#?[0-9a-f]{6}$/i.test(String(e.color ?? "")) ? e.color : "#6366f1",
|
|
6744
|
+
metalness: Math.min(1, Math.max(0, Qr(e.metalness, 10))),
|
|
6745
|
+
roughness: Math.min(1, Math.max(0, Qr(e.roughness, 35))),
|
|
6746
|
+
transparent: Qr(e.opacity, 100) < 1,
|
|
6747
|
+
opacity: Math.min(1, Math.max(0, Qr(e.opacity, 100))),
|
|
6748
|
+
flatShading: e.flat === !0,
|
|
6749
|
+
wireframe: e.wireframe === !0,
|
|
6750
|
+
side: e.shape === "plane" ? s.DoubleSide : s.FrontSide
|
|
6751
|
+
}), r = new s.Mesh(t, n), i = ui(e.scale, 1);
|
|
6752
|
+
r.position.set(ui(e.x, 0), ui(e.y, 0), ui(e.z, 0)), r.rotation.set(ui(e.rx, 0) * Math.PI / 180, ui(e.ry, 0) * Math.PI / 180, ui(e.rz, 0) * Math.PI / 180), r.scale.setScalar(i > 0 ? i : 1), r.castShadow = !0, r.receiveShadow = !0, r.userData.spin = $r(e.spin), h.add(r), m.push(t, n);
|
|
6753
|
+
}
|
|
6754
|
+
l.add(h);
|
|
6755
|
+
let g = null;
|
|
6756
|
+
if (u !== !1) {
|
|
6757
|
+
let e = new s.ShadowMaterial({ opacity: .22 }), t = new s.PlaneGeometry(60, 60);
|
|
6758
|
+
g = new s.Mesh(t, e), g.rotation.x = -Math.PI / 2, g.position.y = ui(u === !0 ? 0 : u, -.85), g.receiveShadow = !0, l.add(g), m.push(t, e);
|
|
6759
|
+
}
|
|
6760
|
+
let _ = () => {
|
|
6761
|
+
let t = Math.max(1, e.clientWidth), n = Math.max(1, e.clientHeight);
|
|
6762
|
+
c.setSize(t, n, !1), d.aspect = t / n, d.updateProjectionMatrix();
|
|
6763
|
+
}, v = typeof ResizeObserver > "u" ? null : new ResizeObserver(_);
|
|
6764
|
+
v?.observe(e), _();
|
|
6765
|
+
let b = $r(Number.isFinite(Number(o)) ? o : 20), C = Yr(e, (e) => {
|
|
6766
|
+
f.autoSpin(x ? b : 0, e), f.update();
|
|
6767
|
+
for (let t of h.children) t.userData.spin && (t.rotation.y += t.userData.spin * e);
|
|
6768
|
+
c.render(l, d);
|
|
6769
|
+
});
|
|
6770
|
+
a = () => {
|
|
6771
|
+
C(), v?.disconnect(), f.dispose();
|
|
6772
|
+
for (let e of m) e.dispose?.();
|
|
6773
|
+
l.environment?.dispose?.(), c.dispose(), c.domElement.remove();
|
|
6774
|
+
};
|
|
6775
|
+
}, () => {
|
|
6776
|
+
i && v(!0);
|
|
6777
|
+
}), () => {
|
|
6778
|
+
i = !1, a?.();
|
|
6779
|
+
};
|
|
6780
|
+
}, [
|
|
6781
|
+
b,
|
|
6782
|
+
t,
|
|
6783
|
+
n,
|
|
6784
|
+
r,
|
|
6785
|
+
x,
|
|
6786
|
+
o,
|
|
6787
|
+
S,
|
|
6788
|
+
u
|
|
6789
|
+
]), _ && h ? /* @__PURE__ */ d(ei, {
|
|
6790
|
+
nodeRef: m,
|
|
6791
|
+
style: p,
|
|
6792
|
+
height: f,
|
|
6793
|
+
label: "3D Scene",
|
|
6794
|
+
note: "The 3D engine could not be loaded. Check the connection and try again."
|
|
6795
|
+
}) : /* @__PURE__ */ d("div", {
|
|
6796
|
+
ref: (e) => {
|
|
6797
|
+
g.current = e, typeof m == "function" && m(e);
|
|
6798
|
+
},
|
|
6799
|
+
style: {
|
|
6800
|
+
...P(p),
|
|
6801
|
+
minHeight: Zr(f, 380),
|
|
6802
|
+
height: Zr(f, 380),
|
|
6803
|
+
overflow: "hidden",
|
|
6804
|
+
touchAction: S ? "pan-y" : void 0
|
|
6805
|
+
}
|
|
6806
|
+
});
|
|
6807
|
+
}
|
|
6808
|
+
function fi({ code: e, height: t, background: n, style: r, nodeRef: i, inert: o }) {
|
|
6809
|
+
let s = c(null), [u, f] = l("");
|
|
6810
|
+
return a(() => {
|
|
6811
|
+
let t = s.current;
|
|
6812
|
+
if (o || !t || typeof e != "string" || !e.trim()) return;
|
|
6813
|
+
let r = !0, i = null;
|
|
6814
|
+
return Gr().then((a) => {
|
|
6815
|
+
if (!r || !t) return;
|
|
6816
|
+
let o = new a.WebGLRenderer({
|
|
6817
|
+
antialias: !0,
|
|
6818
|
+
alpha: !n
|
|
6819
|
+
});
|
|
6820
|
+
o.setPixelRatio(Jr()), o.outputColorSpace = a.SRGBColorSpace, o.domElement.style.display = "block", o.domElement.style.width = "100%", o.domElement.style.height = "100%", t.appendChild(o.domElement);
|
|
6821
|
+
let s = new a.Scene();
|
|
6822
|
+
n && (s.background = new a.Color(n));
|
|
6823
|
+
let c = new a.PerspectiveCamera(45, 1, .1, 1e3);
|
|
6824
|
+
c.position.set(0, 1.2, 4);
|
|
6825
|
+
let l = null;
|
|
6826
|
+
try {
|
|
6827
|
+
l = Function("ctx", `"use strict";\n${e}`)({
|
|
6828
|
+
THREE: a,
|
|
6829
|
+
scene: s,
|
|
6830
|
+
camera: c,
|
|
6831
|
+
renderer: o,
|
|
6832
|
+
canvas: o.domElement,
|
|
6833
|
+
host: t
|
|
6834
|
+
});
|
|
6835
|
+
} catch (e) {
|
|
6836
|
+
f(e?.message || String(e));
|
|
6837
|
+
}
|
|
6838
|
+
let u = () => {
|
|
6839
|
+
let e = Math.max(1, t.clientWidth), n = Math.max(1, t.clientHeight);
|
|
6840
|
+
o.setSize(e, n, !1), c.aspect = e / n, c.updateProjectionMatrix();
|
|
6841
|
+
}, d = typeof ResizeObserver > "u" ? null : new ResizeObserver(u);
|
|
6842
|
+
d?.observe(t), u();
|
|
6843
|
+
let p = !1, m = Yr(t, (e, t) => {
|
|
6844
|
+
if (!p && typeof l?.frame == "function") try {
|
|
6845
|
+
l.frame(e, t);
|
|
6846
|
+
} catch (e) {
|
|
6847
|
+
p = !0, f(e?.message || String(e));
|
|
6848
|
+
}
|
|
6849
|
+
o.render(s, c);
|
|
6850
|
+
});
|
|
6851
|
+
i = () => {
|
|
6852
|
+
m(), d?.disconnect();
|
|
6853
|
+
try {
|
|
6854
|
+
l?.dispose?.();
|
|
6855
|
+
} catch {}
|
|
6856
|
+
o.dispose(), o.domElement.remove();
|
|
6857
|
+
};
|
|
6858
|
+
}), () => {
|
|
6859
|
+
r = !1, i?.();
|
|
6860
|
+
};
|
|
6861
|
+
}, [
|
|
6862
|
+
e,
|
|
6863
|
+
o,
|
|
6864
|
+
n
|
|
6865
|
+
]), o ? /* @__PURE__ */ d(ei, {
|
|
6866
|
+
nodeRef: i,
|
|
6867
|
+
style: r,
|
|
6868
|
+
height: t,
|
|
6869
|
+
label: "three.js",
|
|
6870
|
+
note: typeof e == "string" && e.trim() ? "Custom scene code runs in Preview and on the published page." : "Open the code editor in the Settings panel to write your scene."
|
|
6871
|
+
}) : /* @__PURE__ */ d("div", {
|
|
6872
|
+
ref: (e) => {
|
|
6873
|
+
s.current = e, typeof i == "function" && i(e);
|
|
6874
|
+
},
|
|
6875
|
+
style: {
|
|
6876
|
+
...P(r),
|
|
6877
|
+
minHeight: Zr(t, 380),
|
|
6878
|
+
height: Zr(t, 380),
|
|
6879
|
+
overflow: "hidden",
|
|
6880
|
+
position: "relative",
|
|
6881
|
+
touchAction: "pan-y"
|
|
6882
|
+
},
|
|
6883
|
+
children: u ? /* @__PURE__ */ d("div", {
|
|
6884
|
+
style: {
|
|
6885
|
+
position: "absolute",
|
|
6886
|
+
left: 8,
|
|
6887
|
+
top: 8,
|
|
6888
|
+
right: 8,
|
|
6889
|
+
padding: "6px 8px",
|
|
6890
|
+
borderRadius: 6,
|
|
6891
|
+
background: "rgba(127,29,29,.85)",
|
|
6892
|
+
...le,
|
|
6893
|
+
color: "#fee2e2",
|
|
6894
|
+
fontSize: 11
|
|
6895
|
+
},
|
|
6896
|
+
children: u
|
|
6897
|
+
}) : null
|
|
6898
|
+
});
|
|
6899
|
+
}
|
|
6900
|
+
var pi = {
|
|
6901
|
+
ModelViewerBlock: ti,
|
|
6902
|
+
ShaderBlock: si,
|
|
6903
|
+
SceneBlock: di,
|
|
6904
|
+
ThreeCanvasBlock: fi
|
|
6905
|
+
}, mi = /* @__PURE__ */ new Map();
|
|
6906
|
+
function hi(e) {
|
|
6907
|
+
if (mi.has(e)) return mi.get(e);
|
|
6248
6908
|
let t = URL.createObjectURL(new Blob([e], { type: "text/javascript" })), n = import(
|
|
6249
6909
|
/* @vite-ignore */
|
|
6250
6910
|
/* webpackIgnore: true */
|
|
6251
6911
|
t
|
|
6252
6912
|
).finally(() => URL.revokeObjectURL(t));
|
|
6253
|
-
return
|
|
6913
|
+
return mi.set(e, n), n;
|
|
6254
6914
|
}
|
|
6255
|
-
function
|
|
6915
|
+
function gi(e) {
|
|
6256
6916
|
let t = e && typeof e == "object" ? e.builder_plugins : null, n = t && typeof t == "object" ? t.plugins : null;
|
|
6257
6917
|
return n && typeof n == "object" ? n : {};
|
|
6258
6918
|
}
|
|
6259
6919
|
//#endregion
|
|
6260
6920
|
//#region ../ui/src/components/builder/plugins/view.jsx
|
|
6261
|
-
async function
|
|
6262
|
-
let n = await
|
|
6921
|
+
async function _i(e, t) {
|
|
6922
|
+
let n = await hi(e);
|
|
6263
6923
|
return (Array.isArray(n?.default?.blocks) ? n.default.blocks : []).find((e) => e?.id === t && typeof e.mount == "function") ?? null;
|
|
6264
6924
|
}
|
|
6265
|
-
var
|
|
6925
|
+
var vi = {
|
|
6266
6926
|
padding: "10px 12px",
|
|
6267
6927
|
border: "1px dashed rgba(148, 163, 184, 0.5)",
|
|
6268
6928
|
borderRadius: 8,
|
|
6269
6929
|
fontSize: 12,
|
|
6270
6930
|
opacity: .6
|
|
6271
6931
|
};
|
|
6272
|
-
function
|
|
6273
|
-
let s = i(
|
|
6932
|
+
function yi({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
|
|
6933
|
+
let s = i(Y), l = gi(s?.settings)[e], u = c(null), p = c(null), m = {
|
|
6274
6934
|
tenant: s?.tenant ?? "",
|
|
6275
6935
|
apiUrl: s?.apiUrl ?? "/api",
|
|
6276
6936
|
locale: s?.locale ?? "",
|
|
@@ -6282,7 +6942,7 @@ function Lr({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
|
|
|
6282
6942
|
let e = u.current;
|
|
6283
6943
|
if (!l?.code || !e) return;
|
|
6284
6944
|
let n = !0;
|
|
6285
|
-
return
|
|
6945
|
+
return _i(l.code, t).then((e) => {
|
|
6286
6946
|
if (!(!n || !e || !u.current)) {
|
|
6287
6947
|
p.current = e;
|
|
6288
6948
|
try {
|
|
@@ -6312,7 +6972,7 @@ function Lr({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
|
|
|
6312
6972
|
}) : /* @__PURE__ */ f("div", {
|
|
6313
6973
|
ref: o,
|
|
6314
6974
|
style: {
|
|
6315
|
-
...
|
|
6975
|
+
...vi,
|
|
6316
6976
|
...P(r)
|
|
6317
6977
|
},
|
|
6318
6978
|
children: [
|
|
@@ -6324,12 +6984,13 @@ function Lr({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
|
|
|
6324
6984
|
}
|
|
6325
6985
|
//#endregion
|
|
6326
6986
|
//#region ../ui/src/components/builder/render.jsx
|
|
6327
|
-
var
|
|
6328
|
-
...
|
|
6329
|
-
...
|
|
6330
|
-
|
|
6987
|
+
var bi = {
|
|
6988
|
+
...rr,
|
|
6989
|
+
...Ir,
|
|
6990
|
+
...pi,
|
|
6991
|
+
PluginBlock: yi
|
|
6331
6992
|
};
|
|
6332
|
-
function
|
|
6993
|
+
function xi(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
|
|
6333
6994
|
let o = n[e];
|
|
6334
6995
|
if (!o || o.hidden) return null;
|
|
6335
6996
|
let s = o.type?.resolvedName, c = a?.mapProps ? a.mapProps(o.props ?? {}, s) : o.props ?? {};
|
|
@@ -6337,29 +6998,29 @@ function zr(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
|
|
|
6337
6998
|
let n = o.props?.componentId, s = r?.[n];
|
|
6338
6999
|
if (!s?.template || i.has(n)) return null;
|
|
6339
7000
|
let c = new Set(i).add(n);
|
|
6340
|
-
return /* @__PURE__ */ d(t, { children:
|
|
7001
|
+
return /* @__PURE__ */ d(t, { children: xi(s.template.rootId, s.template.nodes, r, c, a) }, e);
|
|
6341
7002
|
}
|
|
6342
|
-
let l =
|
|
7003
|
+
let l = bi[s];
|
|
6343
7004
|
if (!l) return null;
|
|
6344
|
-
let u = (o.nodes ?? []).map((e) =>
|
|
7005
|
+
let u = (o.nodes ?? []).map((e) => xi(e, n, r, i, a)).filter(Boolean), f = Object.entries(o.linkedNodes ?? {}), p = f.length ? Object.fromEntries(f.map(([e, t]) => [e, xi(t, n, r, i, a)])) : void 0, m = /* @__PURE__ */ d(l, {
|
|
6345
7006
|
...c,
|
|
6346
7007
|
...s === "CollectionList" ? { templateId: o.linkedNodes?.card } : null,
|
|
6347
7008
|
linked: p,
|
|
6348
7009
|
nodeRef: (t) => {
|
|
6349
|
-
t && (t.setAttribute("data-wb", e),
|
|
7010
|
+
t && (t.setAttribute("data-wb", e), te(t, c), ee(t, a?.events === !1 ? [] : c.events));
|
|
6350
7011
|
},
|
|
6351
7012
|
children: u.length ? u : void 0
|
|
6352
7013
|
}, e);
|
|
6353
|
-
return c.when && c.when !== "always" ? /* @__PURE__ */ d(
|
|
7014
|
+
return c.when && c.when !== "always" ? /* @__PURE__ */ d(pr, {
|
|
6354
7015
|
when: c.when,
|
|
6355
7016
|
children: m
|
|
6356
7017
|
}, e) : m;
|
|
6357
7018
|
}
|
|
6358
7019
|
//#endregion
|
|
6359
7020
|
//#region ../ui/src/components/builder/PageRenderer.jsx
|
|
6360
|
-
var
|
|
6361
|
-
.webim-page[data-webim-mode="dark"] { ${Object.entries(
|
|
6362
|
-
function
|
|
7021
|
+
var Si = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" "), Ci = (e) => `.webim-page[data-webim-mode="light"] { ${Object.entries(me(e.light)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }
|
|
7022
|
+
.webim-page[data-webim-mode="dark"] { ${Object.entries(me(e.dark)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }`;
|
|
7023
|
+
function wi({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, custom: o, animations: c, tenant: l, apiUrl: u, datasets: p, locale: m, direction: g, settings: _, siteUser: v }) {
|
|
6363
7024
|
let y = o?.js?.trim();
|
|
6364
7025
|
if (a(() => {
|
|
6365
7026
|
if (!y) return;
|
|
@@ -6373,23 +7034,23 @@ function Hr({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
|
|
|
6373
7034
|
minHeight: "100%",
|
|
6374
7035
|
display: "flex",
|
|
6375
7036
|
flexDirection: "column"
|
|
6376
|
-
}, w =
|
|
7037
|
+
}, w = xi("ROOT", e, n), T = s(() => ({ render: (t, r) => xi(t, e, n, void 0, { mapProps: r }) }), [e, n]), E = ce(e, n), O = se(e, n), k = o?.css?.trim(), j = S(c), M = pe(t), N = [M.font, M.headingFont].filter((e) => typeof e == "string" && e.trim() && e !== "inherit" && !de[e]), P = [.../* @__PURE__ */ new Set([...A(e, n), ...N])].map((e) => /* @__PURE__ */ d("link", {
|
|
6377
7038
|
rel: "stylesheet",
|
|
6378
7039
|
precedence: "default",
|
|
6379
7040
|
href: D(e)
|
|
6380
|
-
}, e)), F =
|
|
6381
|
-
return r === "auto" ? /* @__PURE__ */ d(
|
|
7041
|
+
}, e)), F = Ci(M);
|
|
7042
|
+
return r === "auto" ? /* @__PURE__ */ d(Y.Provider, {
|
|
6382
7043
|
value: {
|
|
6383
7044
|
tenant: l || "",
|
|
6384
7045
|
apiUrl: u || "/api",
|
|
6385
7046
|
locale: m || "",
|
|
6386
7047
|
settings: _ ?? null
|
|
6387
7048
|
},
|
|
6388
|
-
children: /* @__PURE__ */ d(
|
|
7049
|
+
children: /* @__PURE__ */ d(fr, {
|
|
6389
7050
|
initialUser: v,
|
|
6390
|
-
children: /* @__PURE__ */ d(
|
|
7051
|
+
children: /* @__PURE__ */ d(xe.Provider, {
|
|
6391
7052
|
value: p ?? null,
|
|
6392
|
-
children: /* @__PURE__ */ d(
|
|
7053
|
+
children: /* @__PURE__ */ d(Q.Provider, {
|
|
6393
7054
|
value: T,
|
|
6394
7055
|
children: /* @__PURE__ */ f("div", {
|
|
6395
7056
|
...b,
|
|
@@ -6400,8 +7061,8 @@ function Hr({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
|
|
|
6400
7061
|
...i
|
|
6401
7062
|
},
|
|
6402
7063
|
children: [
|
|
6403
|
-
/* @__PURE__ */ d("style", { children: `.webim-page { ${
|
|
6404
|
-
@media (prefers-color-scheme: dark) { .webim-page { ${
|
|
7064
|
+
/* @__PURE__ */ d("style", { children: `.webim-page { ${Si(me(M.light))} }
|
|
7065
|
+
@media (prefers-color-scheme: dark) { .webim-page { ${Si(me(M.dark))} } }` }),
|
|
6405
7066
|
/* @__PURE__ */ d("style", { children: F }),
|
|
6406
7067
|
P,
|
|
6407
7068
|
/* @__PURE__ */ d("style", { children: x }),
|
|
@@ -6414,25 +7075,25 @@ function Hr({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
|
|
|
6414
7075
|
})
|
|
6415
7076
|
})
|
|
6416
7077
|
})
|
|
6417
|
-
}) : /* @__PURE__ */ d(
|
|
7078
|
+
}) : /* @__PURE__ */ d(Y.Provider, {
|
|
6418
7079
|
value: {
|
|
6419
7080
|
tenant: l || "",
|
|
6420
7081
|
apiUrl: u || "/api",
|
|
6421
7082
|
locale: m || "",
|
|
6422
7083
|
settings: _ ?? null
|
|
6423
7084
|
},
|
|
6424
|
-
children: /* @__PURE__ */ d(
|
|
7085
|
+
children: /* @__PURE__ */ d(fr, {
|
|
6425
7086
|
initialUser: v,
|
|
6426
|
-
children: /* @__PURE__ */ d(
|
|
7087
|
+
children: /* @__PURE__ */ d(xe.Provider, {
|
|
6427
7088
|
value: p ?? null,
|
|
6428
|
-
children: /* @__PURE__ */ d(
|
|
7089
|
+
children: /* @__PURE__ */ d(Q.Provider, {
|
|
6429
7090
|
value: T,
|
|
6430
7091
|
children: /* @__PURE__ */ f("div", {
|
|
6431
7092
|
...b,
|
|
6432
7093
|
className: "webim-page",
|
|
6433
7094
|
style: {
|
|
6434
7095
|
...C,
|
|
6435
|
-
...
|
|
7096
|
+
...ve(t, r),
|
|
6436
7097
|
...i
|
|
6437
7098
|
},
|
|
6438
7099
|
children: [
|
|
@@ -6454,8 +7115,8 @@ function Hr({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
|
|
|
6454
7115
|
}
|
|
6455
7116
|
//#endregion
|
|
6456
7117
|
//#region src/WebimContent.jsx
|
|
6457
|
-
function
|
|
6458
|
-
return e?.blocks?.ROOT ? /* @__PURE__ */ d(
|
|
7118
|
+
function Ti({ bundle: e, mode: t = "auto", style: n }) {
|
|
7119
|
+
return e?.blocks?.ROOT ? /* @__PURE__ */ d(wi, {
|
|
6459
7120
|
blocks: e.blocks,
|
|
6460
7121
|
theme: e.theme,
|
|
6461
7122
|
components: e.components,
|
|
@@ -6467,13 +7128,13 @@ function Ur({ bundle: e, mode: t = "auto", style: n }) {
|
|
|
6467
7128
|
locale: e.locale,
|
|
6468
7129
|
direction: e.direction,
|
|
6469
7130
|
settings: e.settings,
|
|
6470
|
-
mode:
|
|
7131
|
+
mode: be(t, e.scheme),
|
|
6471
7132
|
style: n
|
|
6472
7133
|
}) : null;
|
|
6473
7134
|
}
|
|
6474
7135
|
//#endregion
|
|
6475
7136
|
//#region src/bundle.js
|
|
6476
|
-
function
|
|
7137
|
+
function Ei({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
|
|
6477
7138
|
let a = {
|
|
6478
7139
|
...t?.global ?? {},
|
|
6479
7140
|
...t?.tenant ?? {}
|
|
@@ -6483,7 +7144,7 @@ function Wr({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
|
|
|
6483
7144
|
title: e.title,
|
|
6484
7145
|
slug: e.slug,
|
|
6485
7146
|
blocks: i && o.i18n?.[i]?.blocks || e.blocks,
|
|
6486
|
-
theme:
|
|
7147
|
+
theme: ye(o, a.builder_themes?.themes),
|
|
6487
7148
|
components: a.builder_components?.components ?? {},
|
|
6488
7149
|
custom: o.custom,
|
|
6489
7150
|
animations: o.animations,
|
|
@@ -6499,18 +7160,18 @@ function Wr({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
|
|
|
6499
7160
|
}
|
|
6500
7161
|
//#endregion
|
|
6501
7162
|
//#region src/fetchPage.js
|
|
6502
|
-
var
|
|
7163
|
+
var Di = async (e) => {
|
|
6503
7164
|
let t = await e.json().catch(() => null);
|
|
6504
7165
|
if (!e.ok || t?.success === !1) throw Error(t?.error?.message || `Request failed (${e.status})`);
|
|
6505
7166
|
return t?.payload ?? t;
|
|
6506
7167
|
};
|
|
6507
|
-
async function
|
|
7168
|
+
async function Oi({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token: a, page: o, fetch: s }) {
|
|
6508
7169
|
if (!e) throw Error("fetchPage: apiUrl is required");
|
|
6509
7170
|
if (!n) throw Error("fetchPage: slug is required");
|
|
6510
7171
|
let c = s ?? fetch, l = e.replace(/\/$/, ""), u = {
|
|
6511
7172
|
...t ? { "x-tenant": t } : {},
|
|
6512
7173
|
...a ? { authorization: `Bearer ${a}` } : {}
|
|
6513
|
-
}, [d, f] = await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: u }).then(
|
|
7174
|
+
}, [d, f] = await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: u }).then(Di), c(`${l}/settings/public`, { headers: u }).then(Di)]), p = Ei({
|
|
6514
7175
|
page: d,
|
|
6515
7176
|
settings: f,
|
|
6516
7177
|
tenant: t,
|
|
@@ -6525,7 +7186,7 @@ async function Kr({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token:
|
|
|
6525
7186
|
"LogoCarousel"
|
|
6526
7187
|
].includes(e?.type?.resolvedName) ? e.props?.source : null).filter(Boolean))];
|
|
6527
7188
|
if (m.length) {
|
|
6528
|
-
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(
|
|
7189
|
+
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(Di).then((e) => {
|
|
6529
7190
|
let n = Array.isArray(e) ? e : Array.isArray(e?.data) ? e.data : [], r = Number(e?.total?.filtered ?? e?.total?.all ?? n.length);
|
|
6530
7191
|
return [[t, n], [`${t}:total`, Number.isFinite(r) ? r : n.length]];
|
|
6531
7192
|
}).catch(() => [[t, []]])));
|
|
@@ -6539,40 +7200,40 @@ async function Kr({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token:
|
|
|
6539
7200
|
}
|
|
6540
7201
|
//#endregion
|
|
6541
7202
|
//#region src/ssr.jsx
|
|
6542
|
-
var
|
|
7203
|
+
var ki = (e) => String(e ?? "").replace(/[&<>"]/g, (e) => ({
|
|
6543
7204
|
"&": "&",
|
|
6544
7205
|
"<": "<",
|
|
6545
7206
|
">": ">",
|
|
6546
7207
|
"\"": """
|
|
6547
7208
|
})[e]);
|
|
6548
|
-
function
|
|
6549
|
-
return e(/* @__PURE__ */ d(
|
|
7209
|
+
function Ai(t, { mode: n = "auto", style: r } = {}) {
|
|
7210
|
+
return e(/* @__PURE__ */ d(Ti, {
|
|
6550
7211
|
bundle: t,
|
|
6551
7212
|
mode: n,
|
|
6552
7213
|
style: r
|
|
6553
7214
|
}));
|
|
6554
7215
|
}
|
|
6555
|
-
function
|
|
7216
|
+
function ji(e, { mode: t = "auto", lang: n } = {}) {
|
|
6556
7217
|
let r = e.seo ?? {}, i = n || e.locale || "en", a = h(e.direction, i), o = r.title || e.title || e.slug || "Page", s = e.custom?.js?.trim(), c = [
|
|
6557
7218
|
"<meta charset=\"utf-8\"/>",
|
|
6558
7219
|
"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"/>",
|
|
6559
|
-
`<title>${
|
|
6560
|
-
r.description && `<meta name="description" content="${
|
|
6561
|
-
`<meta property="og:title" content="${
|
|
6562
|
-
r.image && `<meta property="og:image" content="${
|
|
7220
|
+
`<title>${ki(o)}</title>`,
|
|
7221
|
+
r.description && `<meta name="description" content="${ki(r.description)}"/>`,
|
|
7222
|
+
`<meta property="og:title" content="${ki(o)}"/>`,
|
|
7223
|
+
r.image && `<meta property="og:image" content="${ki(r.image)}"/>`,
|
|
6563
7224
|
r.noindex && "<meta name=\"robots\" content=\"noindex\"/>",
|
|
6564
7225
|
"<style>html,body{margin:0;height:100%}</style>"
|
|
6565
7226
|
].filter(Boolean).join("\n");
|
|
6566
7227
|
return `<!doctype html>
|
|
6567
|
-
<html lang="${
|
|
7228
|
+
<html lang="${ki(i)}"${a ? ` dir="${a}"` : ""}>
|
|
6568
7229
|
<head>
|
|
6569
7230
|
${c}
|
|
6570
7231
|
</head>
|
|
6571
7232
|
<body>
|
|
6572
|
-
${
|
|
7233
|
+
${Ai(e, { mode: t })}
|
|
6573
7234
|
${s ? `<script>${s.replaceAll("<\/script", "<\\/script")}<\/script>` : ""}
|
|
6574
7235
|
</body>
|
|
6575
7236
|
</html>`;
|
|
6576
7237
|
}
|
|
6577
7238
|
//#endregion
|
|
6578
|
-
export {
|
|
7239
|
+
export { Ei as assembleBundle, Oi as fetchPage, Ai as renderBundleHtml, ji as renderPageDocument };
|