webim-adapter 1.1.3 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +57 -0
- package/README.md +24 -0
- package/build/webim-adapter.js +1305 -608
- package/build/webim-embed.js +13 -7
- package/build/webim-ssr.js +1417 -720
- package/package.json +10 -3
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: W, textStrokeColor: te } = t;
|
|
269
|
+
delete t.textStrokeWidth, delete t.textStrokeColor, (W !== void 0 || te !== void 0) && (t.WebkitTextStroke = `${M(W ?? 1)} ${te || "currentColor"}`);
|
|
270
|
+
let { clipText: ne } = t;
|
|
271
|
+
delete t.clipText, ne && (t.WebkitBackgroundClip = "text", t.backgroundClip = "text", t.WebkitTextFillColor = "transparent");
|
|
272
|
+
let { transitions: re, transitionDuration: G, transitionEasing: ie, transitionProperty: ae } = t, oe = (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 se = (Array.isArray(re) ? re : []).filter((e) => e && e.on !== !1).map((e) => `${e.property || "all"} ${oe(e.duration ?? 200)} ${e.easing || "ease"}`);
|
|
275
|
+
if (G !== void 0 && se.push(`${ae || "all"} ${oe(G)} ${ie || "ease"}`), se.length && (t.transition = se.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: K, overlayOpacity: ce } = t;
|
|
281
|
+
if (delete t.overlayColor, delete t.overlayOpacity, K) {
|
|
282
|
+
let e = `color-mix(in srgb, ${K} ${ce ?? 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: q } = t;
|
|
287
287
|
delete t.backgroundLayers;
|
|
288
|
-
let
|
|
289
|
-
if (
|
|
288
|
+
let J = (Array.isArray(q) ? q : []).filter((e) => e && e.on !== !1);
|
|
289
|
+
if (J.length) {
|
|
290
290
|
let e = [], n = [], r = [], i = [], a = [];
|
|
291
|
-
for (let t of
|
|
291
|
+
for (let t of J) 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 W(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 te = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
|
|
384
|
+
function ne(e, t, n, r = !1) {
|
|
385
|
+
let i = Object.entries(P(t)).map(([e, t]) => `${te(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 re(e, t, n) {
|
|
389
|
+
return Object.entries(F).map(([r, i]) => ne(e, t?.[r], i, n === r)).filter(Boolean).join("\n");
|
|
390
390
|
}
|
|
391
|
-
var
|
|
391
|
+
var G = [
|
|
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
|
+
], ie = (e) => Object.entries(P(e)).map(([e, t]) => `${te(e)}: ${t} !important;`).join(" ");
|
|
405
|
+
function ae(e, t) {
|
|
406
|
+
return G.map(({ key: n, max: r }) => {
|
|
407
|
+
let i = t?.[n] ? ie(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 oe(e, t) {
|
|
412
412
|
let n = [], r = (e) => {
|
|
413
413
|
for (let [t, r] of Object.entries(e || {})) {
|
|
414
|
-
let e =
|
|
414
|
+
let e = ae(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 se(e, t) {
|
|
423
423
|
let n = [], r = (e) => {
|
|
424
424
|
for (let [t, r] of Object.entries(e || {})) {
|
|
425
|
-
let e =
|
|
425
|
+
let e = re(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 K = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif", ce = {
|
|
434
|
+
fontFamily: K,
|
|
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
|
+
}, q = {
|
|
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
|
+
}, J = {
|
|
483
|
+
h1: 40,
|
|
484
|
+
h2: 32,
|
|
485
|
+
h3: 26,
|
|
486
|
+
h4: 22,
|
|
487
|
+
h5: 19,
|
|
488
|
+
h6: 16
|
|
489
|
+
}, le = {
|
|
483
490
|
font: "system",
|
|
484
491
|
headingFont: "inherit",
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
492
|
+
headings: J,
|
|
493
|
+
bodySize: 16,
|
|
494
|
+
light: q.light,
|
|
495
|
+
dark: q.dark
|
|
496
|
+
}, ue = {
|
|
488
497
|
system: {
|
|
489
498
|
label: "System",
|
|
490
|
-
value:
|
|
499
|
+
value: K
|
|
491
500
|
},
|
|
492
501
|
inter: {
|
|
493
502
|
label: "Inter",
|
|
494
|
-
value: `"Inter", ${
|
|
503
|
+
value: `"Inter", ${K}`
|
|
495
504
|
},
|
|
496
505
|
outfit: {
|
|
497
506
|
label: "Outfit",
|
|
498
|
-
value: `"Outfit", ${
|
|
507
|
+
value: `"Outfit", ${K}`
|
|
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
|
+
}, de = (e, t) => ue[e]?.value ?? k(e) ?? (typeof e == "string" && e.trim() ? `"${e.trim()}", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif` : t), fe = (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 ?? le.font,
|
|
537
|
+
headingFont: i ?? le.headingFont,
|
|
538
|
+
headings: {
|
|
539
|
+
...J,
|
|
540
|
+
...a ?? {}
|
|
541
|
+
},
|
|
542
|
+
bodySize: o ?? 16,
|
|
543
|
+
light: fe(q.light, s, t),
|
|
544
|
+
dark: fe(q.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 ?? q.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: de(t.font, K),
|
|
571
|
+
"--page-heading-font": t.headingFont === "inherit" ? "inherit" : de(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(J)) {
|
|
582
|
+
let r = e?.[n] ?? J[n];
|
|
583
|
+
t[`--page-${n}`] = ge(r, J[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 = J, Ae = (e) => `var(--page-${e}, ${J[e] ?? J.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: ue.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,
|
|
@@ -1285,6 +1319,7 @@ function dt({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1285
1319
|
position: "relative",
|
|
1286
1320
|
overflow: "hidden",
|
|
1287
1321
|
width: "100%",
|
|
1322
|
+
height: i,
|
|
1288
1323
|
touchAction: "pan-y",
|
|
1289
1324
|
userSelect: _ ? "none" : void 0,
|
|
1290
1325
|
cursor: _ ? "grabbing" : void 0,
|
|
@@ -1293,7 +1328,7 @@ function dt({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1293
1328
|
children: [/* @__PURE__ */ d("div", {
|
|
1294
1329
|
style: {
|
|
1295
1330
|
display: "flex",
|
|
1296
|
-
height:
|
|
1331
|
+
height: "100%",
|
|
1297
1332
|
transform: `translateX(calc(${-y * 100}% + ${_?.dx ?? 0}px))`,
|
|
1298
1333
|
transition: _ ? "none" : "transform 450ms ease"
|
|
1299
1334
|
},
|
|
@@ -1311,7 +1346,7 @@ function dt({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1311
1346
|
type: "button",
|
|
1312
1347
|
"aria-label": "Previous slide",
|
|
1313
1348
|
style: {
|
|
1314
|
-
...
|
|
1349
|
+
...pt,
|
|
1315
1350
|
left: 12
|
|
1316
1351
|
},
|
|
1317
1352
|
onClick: () => b(y - 1),
|
|
@@ -1321,7 +1356,7 @@ function dt({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1321
1356
|
type: "button",
|
|
1322
1357
|
"aria-label": "Next slide",
|
|
1323
1358
|
style: {
|
|
1324
|
-
...
|
|
1359
|
+
...pt,
|
|
1325
1360
|
right: 12
|
|
1326
1361
|
},
|
|
1327
1362
|
onClick: () => b(y + 1),
|
|
@@ -1355,7 +1390,7 @@ function dt({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1355
1390
|
] })]
|
|
1356
1391
|
});
|
|
1357
1392
|
}
|
|
1358
|
-
var
|
|
1393
|
+
var _t = (e, t) => ({
|
|
1359
1394
|
position: "absolute",
|
|
1360
1395
|
inset: 0,
|
|
1361
1396
|
backgroundImage: e ? `url(${e})` : "none",
|
|
@@ -1363,18 +1398,18 @@ var ft = (e, t) => ({
|
|
|
1363
1398
|
backgroundSize: "cover",
|
|
1364
1399
|
backgroundPosition: "center"
|
|
1365
1400
|
});
|
|
1366
|
-
function
|
|
1367
|
-
return e.length ? /* @__PURE__ */ d(
|
|
1401
|
+
function vt({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "left", ...r }) {
|
|
1402
|
+
return e.length ? /* @__PURE__ */ d(gt, {
|
|
1368
1403
|
...r,
|
|
1369
1404
|
count: e.length,
|
|
1370
1405
|
renderSlide: (r) => {
|
|
1371
1406
|
let i = e[r];
|
|
1372
|
-
return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style:
|
|
1407
|
+
return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style: _t(i.image) }), (i.title || i.text) && /* @__PURE__ */ f("div", {
|
|
1373
1408
|
style: {
|
|
1374
1409
|
position: "absolute",
|
|
1375
1410
|
color: "#fff",
|
|
1376
1411
|
textAlign: n,
|
|
1377
|
-
...
|
|
1412
|
+
...mt[t] ?? mt.bottom
|
|
1378
1413
|
},
|
|
1379
1414
|
children: [i.title && /* @__PURE__ */ d("div", {
|
|
1380
1415
|
style: {
|
|
@@ -1394,13 +1429,13 @@ function pt({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "
|
|
|
1394
1429
|
}
|
|
1395
1430
|
}) : null;
|
|
1396
1431
|
}
|
|
1397
|
-
function
|
|
1398
|
-
return e.length ? /* @__PURE__ */ d(
|
|
1432
|
+
function yt({ slides: e = [], linked: t, ...n }) {
|
|
1433
|
+
return e.length ? /* @__PURE__ */ d(gt, {
|
|
1399
1434
|
...n,
|
|
1400
1435
|
count: e.length,
|
|
1401
1436
|
renderSlide: (n) => {
|
|
1402
1437
|
let r = e[n];
|
|
1403
|
-
return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style:
|
|
1438
|
+
return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style: _t(r.image, r.color) }), /* @__PURE__ */ d("div", {
|
|
1404
1439
|
style: {
|
|
1405
1440
|
position: "absolute",
|
|
1406
1441
|
inset: 0,
|
|
@@ -1412,23 +1447,23 @@ function mt({ slides: e = [], linked: t, ...n }) {
|
|
|
1412
1447
|
}
|
|
1413
1448
|
}) : null;
|
|
1414
1449
|
}
|
|
1415
|
-
var
|
|
1416
|
-
let r =
|
|
1450
|
+
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) => {
|
|
1451
|
+
let r = bt * 2 ** n;
|
|
1417
1452
|
return {
|
|
1418
1453
|
x: (Number(t) + 180) / 360 * r,
|
|
1419
|
-
y: (.5 -
|
|
1454
|
+
y: (.5 - xt(Number(e)) / (2 * Math.PI)) * r
|
|
1420
1455
|
};
|
|
1421
1456
|
}, $ = (e, t) => {
|
|
1422
1457
|
if (e === "" || e == null) return null;
|
|
1423
1458
|
let n = Number(e);
|
|
1424
1459
|
return Number.isFinite(n) && Math.abs(n) <= t ? n : null;
|
|
1425
|
-
},
|
|
1426
|
-
function
|
|
1460
|
+
}, Ct = (e) => !!e && $(e.lat, 90) !== null && $(e.lng, 180) !== null;
|
|
1461
|
+
function wt(e, t, n = "directions", r = "") {
|
|
1427
1462
|
let i = `${e},${t}`;
|
|
1428
1463
|
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
1464
|
}
|
|
1430
|
-
var
|
|
1431
|
-
function
|
|
1465
|
+
var Tt = (e, t, n = 13) => `https://www.openstreetmap.org/?mlat=${e}&mlon=${t}#map=${Math.round(Number(n) || 13)}/${e}/${t}`;
|
|
1466
|
+
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
1467
|
let _ = c(null), [v, y] = l(1200);
|
|
1433
1468
|
a(() => {
|
|
1434
1469
|
let e = _.current;
|
|
@@ -1438,7 +1473,7 @@ function xt({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
|
|
|
1438
1473
|
let n = new ResizeObserver(t);
|
|
1439
1474
|
return n.observe(e), () => n.disconnect();
|
|
1440
1475
|
}, []);
|
|
1441
|
-
let b = (Array.isArray(e) ? e : []).filter(
|
|
1476
|
+
let b = (Array.isArray(e) ? e : []).filter(Ct), x = Ct({
|
|
1442
1477
|
lat: t,
|
|
1443
1478
|
lng: n
|
|
1444
1479
|
}) ? {
|
|
@@ -1450,7 +1485,7 @@ function xt({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
|
|
|
1450
1485
|
} : null, S = Math.max(80, Number(i) || 320), C = $(r, 19) ? Math.min(Math.max(Math.round(Number(r)), 1), 19) : (() => {
|
|
1451
1486
|
if (b.length < 2) return 13;
|
|
1452
1487
|
for (let e = 19; e >= 1; e--) {
|
|
1453
|
-
let t = b.map((t) =>
|
|
1488
|
+
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
1489
|
if (n <= v * .8 && r <= S * .7) return e;
|
|
1455
1490
|
}
|
|
1456
1491
|
return 1;
|
|
@@ -1474,12 +1509,12 @@ function xt({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
|
|
|
1474
1509
|
},
|
|
1475
1510
|
children: "Set the coordinates in Settings"
|
|
1476
1511
|
});
|
|
1477
|
-
let T =
|
|
1512
|
+
let T = St(x.lat, x.lng, C), E = {
|
|
1478
1513
|
x: T.x - v / 2,
|
|
1479
1514
|
y: T.y - S / 2
|
|
1480
1515
|
}, D = [], O = [];
|
|
1481
|
-
for (let e = Math.floor(E.x /
|
|
1482
|
-
for (let e = Math.floor(E.y /
|
|
1516
|
+
for (let e = Math.floor(E.x / bt); e <= Math.floor((E.x + v) / bt); e++) D.push(e);
|
|
1517
|
+
for (let e = Math.floor(E.y / bt); e <= Math.floor((E.y + S) / bt); e++) O.push(e);
|
|
1483
1518
|
let k = 2 ** C;
|
|
1484
1519
|
return /* @__PURE__ */ f("div", {
|
|
1485
1520
|
ref: (e) => {
|
|
@@ -1502,22 +1537,22 @@ function xt({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
|
|
|
1502
1537
|
return e < 0 || e >= k ? null : /* @__PURE__ */ d("img", {
|
|
1503
1538
|
src: `https://tile.openstreetmap.org/${C}/${n}/${e}.png`,
|
|
1504
1539
|
alt: "",
|
|
1505
|
-
width:
|
|
1506
|
-
height:
|
|
1540
|
+
width: bt,
|
|
1541
|
+
height: bt,
|
|
1507
1542
|
loading: "lazy",
|
|
1508
1543
|
style: {
|
|
1509
1544
|
position: "absolute",
|
|
1510
|
-
left: Math.round(t *
|
|
1511
|
-
top: Math.round(e *
|
|
1512
|
-
width:
|
|
1513
|
-
height:
|
|
1545
|
+
left: Math.round(t * bt - E.x),
|
|
1546
|
+
top: Math.round(e * bt - E.y),
|
|
1547
|
+
width: bt,
|
|
1548
|
+
height: bt,
|
|
1514
1549
|
userSelect: "none",
|
|
1515
1550
|
pointerEvents: "none"
|
|
1516
1551
|
}
|
|
1517
1552
|
}, `${t}-${e}`);
|
|
1518
1553
|
})),
|
|
1519
1554
|
b.map((e, t) => {
|
|
1520
|
-
let n =
|
|
1555
|
+
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
1556
|
return /* @__PURE__ */ f(c ? "a" : "span", {
|
|
1522
1557
|
href: c || void 0,
|
|
1523
1558
|
target: c ? "_blank" : void 0,
|
|
@@ -1556,8 +1591,8 @@ function xt({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
|
|
|
1556
1591
|
viewBox: "0 0 24 24",
|
|
1557
1592
|
fill: a,
|
|
1558
1593
|
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:
|
|
1594
|
+
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", {
|
|
1595
|
+
d: Dt[e.icon],
|
|
1561
1596
|
transform: "translate(12 10.5) scale(0.46) translate(-12 -12)",
|
|
1562
1597
|
fill: "none",
|
|
1563
1598
|
stroke: "#fff",
|
|
@@ -1593,7 +1628,7 @@ function xt({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
|
|
|
1593
1628
|
})
|
|
1594
1629
|
]
|
|
1595
1630
|
}), u ? /* @__PURE__ */ d("a", {
|
|
1596
|
-
href:
|
|
1631
|
+
href: Tt(x.lat, x.lng, C),
|
|
1597
1632
|
target: "_blank",
|
|
1598
1633
|
rel: "noopener noreferrer",
|
|
1599
1634
|
onClick: g ? (e) => e.preventDefault() : void 0,
|
|
@@ -1607,7 +1642,7 @@ function xt({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
|
|
|
1607
1642
|
}) : null]
|
|
1608
1643
|
});
|
|
1609
1644
|
}
|
|
1610
|
-
var
|
|
1645
|
+
var Dt = {
|
|
1611
1646
|
check: "M4 12l5 5L20 6",
|
|
1612
1647
|
close: "M6 6l12 12M18 6L6 18",
|
|
1613
1648
|
plus: "M12 5v14M5 12h14",
|
|
@@ -1704,8 +1739,8 @@ var St = {
|
|
|
1704
1739
|
droplet: "M12 3s6 6.4 6 10.5a6 6 0 0 1-12 0C6 9.4 12 3 12 3z",
|
|
1705
1740
|
leaf: "M4 20c0-8 6-14 16-14 0 10-6 14-12 14H4zM8 16c2-4 5-6 8-7"
|
|
1706
1741
|
};
|
|
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 : [
|
|
1742
|
+
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 }) {
|
|
1743
|
+
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
1744
|
viewBox: "0 0 24 24",
|
|
1710
1745
|
width: g,
|
|
1711
1746
|
height: g,
|
|
@@ -1741,10 +1776,10 @@ function Ct({ name: e = "star", paths: t, fill: n = !1, size: r = 24, stroke: i
|
|
|
1741
1776
|
children: v
|
|
1742
1777
|
});
|
|
1743
1778
|
}
|
|
1744
|
-
function
|
|
1745
|
-
let r = Array.isArray(e) ? e.filter((e) => e && typeof e == "object") : [], i = (e) => e == null ? "" :
|
|
1779
|
+
function kt(e, t = {}, n = 0) {
|
|
1780
|
+
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
1781
|
for (let e of r) {
|
|
1747
|
-
let n = e.data ?? e, r =
|
|
1782
|
+
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
1783
|
for (let e of s) if (o.push({
|
|
1749
1784
|
src: e,
|
|
1750
1785
|
name: c,
|
|
@@ -1754,8 +1789,8 @@ function wt(e, t = {}, n = 0) {
|
|
|
1754
1789
|
}
|
|
1755
1790
|
return o;
|
|
1756
1791
|
}
|
|
1757
|
-
function
|
|
1758
|
-
let { tenant: x, apiUrl: S } = i(
|
|
1792
|
+
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 }) {
|
|
1793
|
+
let { tenant: x, apiUrl: S } = i(Y), C = i(xe)?.[t], [w, T] = l(null), [E, D] = l(() => /* @__PURE__ */ new Set());
|
|
1759
1794
|
a(() => {
|
|
1760
1795
|
if (!t || C) return;
|
|
1761
1796
|
let e = !0;
|
|
@@ -1772,7 +1807,7 @@ function Tt({ images: e = [], source: t = "", entry: n = "", imageField: r = "",
|
|
|
1772
1807
|
C
|
|
1773
1808
|
]);
|
|
1774
1809
|
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 =
|
|
1810
|
+
let e = kt(k, {
|
|
1776
1811
|
imageField: r,
|
|
1777
1812
|
nameField: o,
|
|
1778
1813
|
hrefField: s
|
|
@@ -1786,7 +1821,7 @@ function Tt({ images: e = [], source: t = "", entry: n = "", imageField: r = "",
|
|
|
1786
1821
|
};
|
|
1787
1822
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
1788
1823
|
}, [B, N.length]);
|
|
1789
|
-
let
|
|
1824
|
+
let V = (e) => {
|
|
1790
1825
|
if (typeof e.name == "string" && e.name.trim()) return e.name;
|
|
1791
1826
|
if (typeof e.alt == "string" && e.alt.trim()) return e.alt;
|
|
1792
1827
|
try {
|
|
@@ -1822,7 +1857,7 @@ function Tt({ images: e = [], source: t = "", entry: n = "", imageField: r = "",
|
|
|
1822
1857
|
display: "block",
|
|
1823
1858
|
borderRadius: "inherit"
|
|
1824
1859
|
}
|
|
1825
|
-
}), g &&
|
|
1860
|
+
}), g && V(e) && /* @__PURE__ */ d("span", {
|
|
1826
1861
|
style: {
|
|
1827
1862
|
position: "absolute",
|
|
1828
1863
|
insetInline: 0,
|
|
@@ -1836,7 +1871,7 @@ function Tt({ images: e = [], source: t = "", entry: n = "", imageField: r = "",
|
|
|
1836
1871
|
overflow: "hidden",
|
|
1837
1872
|
textOverflow: "ellipsis"
|
|
1838
1873
|
},
|
|
1839
|
-
children:
|
|
1874
|
+
children: V(e)
|
|
1840
1875
|
})]
|
|
1841
1876
|
}), i = e.href ? /* @__PURE__ */ d("a", {
|
|
1842
1877
|
href: e.href,
|
|
@@ -1907,14 +1942,14 @@ function Tt({ images: e = [], source: t = "", entry: n = "", imageField: r = "",
|
|
|
1907
1942
|
boxShadow: "0 12px 48px rgba(0,0,0,0.5)"
|
|
1908
1943
|
}
|
|
1909
1944
|
}),
|
|
1910
|
-
|
|
1945
|
+
V(N[R]) && /* @__PURE__ */ d("div", {
|
|
1911
1946
|
style: {
|
|
1912
1947
|
color: "#fff",
|
|
1913
1948
|
fontSize: 14,
|
|
1914
1949
|
marginTop: 12,
|
|
1915
1950
|
opacity: .85
|
|
1916
1951
|
},
|
|
1917
|
-
children:
|
|
1952
|
+
children: V(N[R])
|
|
1918
1953
|
}),
|
|
1919
1954
|
/* @__PURE__ */ d("button", {
|
|
1920
1955
|
type: "button",
|
|
@@ -1977,20 +2012,20 @@ function Tt({ images: e = [], source: t = "", entry: n = "", imageField: r = "",
|
|
|
1977
2012
|
]
|
|
1978
2013
|
});
|
|
1979
2014
|
}
|
|
1980
|
-
var
|
|
2015
|
+
var jt = {
|
|
1981
2016
|
color: "inherit",
|
|
1982
2017
|
textDecoration: "none",
|
|
1983
2018
|
fontSize: 14,
|
|
1984
2019
|
opacity: .85
|
|
1985
|
-
},
|
|
2020
|
+
}, Mt = {
|
|
1986
2021
|
background: "var(--page-surface, #f2f2f2)",
|
|
1987
2022
|
color: "var(--page-text, #111827)",
|
|
1988
2023
|
border: "1px solid rgba(148, 163, 184, 0.25)",
|
|
1989
2024
|
boxShadow: "0 16px 40px rgba(15, 23, 42, 0.16)",
|
|
1990
2025
|
zIndex: 60
|
|
1991
2026
|
};
|
|
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 ? "" :
|
|
2027
|
+
function Nt(e, t = {}, n = "dropdown") {
|
|
2028
|
+
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
2029
|
let n = e.data ?? {}, r = t.parentField ? i(n[t.parentField]) : null;
|
|
1995
2030
|
return {
|
|
1996
2031
|
key: e.id,
|
|
@@ -2031,8 +2066,8 @@ function Ot(e, t = {}, n = "dropdown") {
|
|
|
2031
2066
|
type: e.children.length ? n : "link"
|
|
2032
2067
|
}));
|
|
2033
2068
|
}
|
|
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(
|
|
2069
|
+
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" }) {
|
|
2070
|
+
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
2071
|
a(() => {
|
|
2037
2072
|
if (!g || N) return;
|
|
2038
2073
|
let e = !0;
|
|
@@ -2052,7 +2087,7 @@ function kt({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
|
|
|
2052
2087
|
let e = new ResizeObserver(() => E(C.offsetWidth < h));
|
|
2053
2088
|
return e.observe(C), () => e.disconnect();
|
|
2054
2089
|
}, [C, h]);
|
|
2055
|
-
let L = g ?
|
|
2090
|
+
let L = g ? Nt(N ?? F ?? [], {
|
|
2056
2091
|
labelField: _,
|
|
2057
2092
|
hrefField: v,
|
|
2058
2093
|
imageField: y,
|
|
@@ -2081,7 +2116,7 @@ function kt({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
|
|
|
2081
2116
|
return /* @__PURE__ */ f("a", {
|
|
2082
2117
|
href: e.href || "#",
|
|
2083
2118
|
style: {
|
|
2084
|
-
...
|
|
2119
|
+
...jt,
|
|
2085
2120
|
display: n ? "block" : "flex",
|
|
2086
2121
|
alignItems: n ? void 0 : "center",
|
|
2087
2122
|
gap: n ? void 0 : 10,
|
|
@@ -2178,7 +2213,7 @@ function kt({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
|
|
|
2178
2213
|
let t = e.children ?? [];
|
|
2179
2214
|
if (!t.length) return /* @__PURE__ */ d("a", {
|
|
2180
2215
|
href: e.href || "#",
|
|
2181
|
-
style:
|
|
2216
|
+
style: jt,
|
|
2182
2217
|
children: e.label
|
|
2183
2218
|
}, e.key);
|
|
2184
2219
|
let n = e.type === "mega";
|
|
@@ -2192,7 +2227,7 @@ function kt({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
|
|
|
2192
2227
|
children: [/* @__PURE__ */ f("a", {
|
|
2193
2228
|
href: e.href || "#",
|
|
2194
2229
|
style: {
|
|
2195
|
-
...
|
|
2230
|
+
...jt,
|
|
2196
2231
|
cursor: "pointer"
|
|
2197
2232
|
},
|
|
2198
2233
|
children: [
|
|
@@ -2208,7 +2243,7 @@ function kt({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
|
|
|
2208
2243
|
]
|
|
2209
2244
|
}), k === e.key && (n ? /* @__PURE__ */ d("div", {
|
|
2210
2245
|
style: {
|
|
2211
|
-
...
|
|
2246
|
+
...Mt,
|
|
2212
2247
|
position: "absolute",
|
|
2213
2248
|
left: 0,
|
|
2214
2249
|
right: 0,
|
|
@@ -2224,7 +2259,7 @@ function kt({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
|
|
|
2224
2259
|
}, !0))
|
|
2225
2260
|
}) : /* @__PURE__ */ d("div", {
|
|
2226
2261
|
style: {
|
|
2227
|
-
...
|
|
2262
|
+
...Mt,
|
|
2228
2263
|
position: "absolute",
|
|
2229
2264
|
top: "100%",
|
|
2230
2265
|
left: 0,
|
|
@@ -2253,7 +2288,7 @@ function kt({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
|
|
|
2253
2288
|
children: L.map((e) => /* @__PURE__ */ f(t, { children: [/* @__PURE__ */ d("a", {
|
|
2254
2289
|
href: e.href || "#",
|
|
2255
2290
|
style: {
|
|
2256
|
-
...
|
|
2291
|
+
...jt,
|
|
2257
2292
|
padding: "10px 4px",
|
|
2258
2293
|
fontWeight: (e.children ?? []).length ? 600 : 400,
|
|
2259
2294
|
opacity: 1
|
|
@@ -2264,7 +2299,7 @@ function kt({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
|
|
|
2264
2299
|
]
|
|
2265
2300
|
});
|
|
2266
2301
|
}
|
|
2267
|
-
function
|
|
2302
|
+
function Ft({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
|
|
2268
2303
|
let [i, a] = l(0), o = e.length ? Math.min(i, e.length - 1) : 0;
|
|
2269
2304
|
return e.length ? /* @__PURE__ */ f("div", {
|
|
2270
2305
|
ref: r,
|
|
@@ -2304,13 +2339,13 @@ function At({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
|
|
|
2304
2339
|
}, e.key))]
|
|
2305
2340
|
}) : null;
|
|
2306
2341
|
}
|
|
2307
|
-
function
|
|
2342
|
+
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
2343
|
let [g, _] = l(() => new Set(e.length ? [e[0].key] : []));
|
|
2309
2344
|
if (!e.length) return null;
|
|
2310
2345
|
let v = (e, t) => typeof e == "string" && e ? e : t, y = (e, t) => {
|
|
2311
2346
|
let n = Number(e);
|
|
2312
2347
|
return e === "" || e == null || !Number.isFinite(n) ? t : n;
|
|
2313
|
-
}, b =
|
|
2348
|
+
}, b = Dt[r], x = (e) => _((t) => {
|
|
2314
2349
|
let r = new Set(n ? t : []);
|
|
2315
2350
|
return t.has(e) ? r.delete(e) : r.add(e), r;
|
|
2316
2351
|
});
|
|
@@ -2385,15 +2420,15 @@ function jt({ items: e = [], linked: t, multiple: n = !1, icon: r = "", padX: i,
|
|
|
2385
2420
|
})
|
|
2386
2421
|
});
|
|
2387
2422
|
}
|
|
2388
|
-
var
|
|
2423
|
+
var Lt = {
|
|
2389
2424
|
display: "flex",
|
|
2390
2425
|
flexDirection: "column",
|
|
2391
2426
|
gap: "12px"
|
|
2392
|
-
},
|
|
2427
|
+
}, Rt = {
|
|
2393
2428
|
fontSize: "14px",
|
|
2394
2429
|
fontWeight: 500,
|
|
2395
2430
|
color: "var(--page-text, #111827)"
|
|
2396
|
-
},
|
|
2431
|
+
}, zt = {
|
|
2397
2432
|
padding: "10px 12px",
|
|
2398
2433
|
border: "1px solid var(--page-border, #d1d5db)",
|
|
2399
2434
|
borderRadius: "6px",
|
|
@@ -2403,18 +2438,18 @@ var Mt = {
|
|
|
2403
2438
|
boxSizing: "border-box",
|
|
2404
2439
|
backgroundColor: "var(--page-surface, #f2f2f2)",
|
|
2405
2440
|
color: "var(--page-text, #111827)"
|
|
2406
|
-
},
|
|
2441
|
+
}, Bt = {
|
|
2407
2442
|
display: "flex",
|
|
2408
2443
|
alignItems: "center",
|
|
2409
2444
|
gap: "8px",
|
|
2410
2445
|
fontSize: "14px",
|
|
2411
2446
|
color: "var(--page-text, #111827)"
|
|
2412
|
-
},
|
|
2447
|
+
}, Vt = (e) => e ? {
|
|
2413
2448
|
readOnly: !0,
|
|
2414
2449
|
tabIndex: -1,
|
|
2415
2450
|
onMouseDown: (e) => e.preventDefault()
|
|
2416
2451
|
} : {};
|
|
2417
|
-
function
|
|
2452
|
+
function Ht(e, t) {
|
|
2418
2453
|
if (!e) return !0;
|
|
2419
2454
|
let n = t[e.field], r = n == null || n === "" ? "" : String(n), i = e.value ?? "";
|
|
2420
2455
|
switch (e.op) {
|
|
@@ -2428,11 +2463,11 @@ function Lt(e, t) {
|
|
|
2428
2463
|
default: return !1;
|
|
2429
2464
|
}
|
|
2430
2465
|
}
|
|
2431
|
-
var
|
|
2466
|
+
var Ut = {
|
|
2432
2467
|
display: "flex",
|
|
2433
2468
|
flexDirection: "column",
|
|
2434
2469
|
gap: 6
|
|
2435
|
-
},
|
|
2470
|
+
}, Wt = {
|
|
2436
2471
|
font: "inherit",
|
|
2437
2472
|
fontSize: 15,
|
|
2438
2473
|
padding: "10px 12px",
|
|
@@ -2443,17 +2478,17 @@ var Rt = {
|
|
|
2443
2478
|
width: "100%",
|
|
2444
2479
|
boxSizing: "border-box"
|
|
2445
2480
|
};
|
|
2446
|
-
function
|
|
2481
|
+
function Gt(e, t) {
|
|
2447
2482
|
let n = Array.isArray(e?.options) ? e.options : [];
|
|
2448
2483
|
if (!e?.parentField) return n;
|
|
2449
2484
|
let r = t?.[e.parentField];
|
|
2450
2485
|
return r ? n.filter((e) => typeof e == "string" ? !1 : !e.parent || e.parent === r) : [];
|
|
2451
2486
|
}
|
|
2452
|
-
var
|
|
2453
|
-
function
|
|
2487
|
+
var Kt = "g-recaptcha-response", qt = (e) => e?.type === "recaptcha" ? Kt : e?.name;
|
|
2488
|
+
function Jt({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
2454
2489
|
let a = /* @__PURE__ */ f("span", {
|
|
2455
2490
|
style: {
|
|
2456
|
-
...
|
|
2491
|
+
...Rt,
|
|
2457
2492
|
fontSize: 14
|
|
2458
2493
|
},
|
|
2459
2494
|
children: [e.label, e.required ? " *" : ""]
|
|
@@ -2462,7 +2497,7 @@ function Ut({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
2462
2497
|
required: e.required || void 0,
|
|
2463
2498
|
placeholder: e.placeholder || void 0,
|
|
2464
2499
|
disabled: r || void 0,
|
|
2465
|
-
style:
|
|
2500
|
+
style: Wt,
|
|
2466
2501
|
value: t ?? "",
|
|
2467
2502
|
onChange: (t) => n(e.name, t.target.value)
|
|
2468
2503
|
};
|
|
@@ -2491,12 +2526,12 @@ function Ut({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
2491
2526
|
borderRadius: 8,
|
|
2492
2527
|
display: "block"
|
|
2493
2528
|
}
|
|
2494
|
-
}) : null : e.type === "recaptcha" ? /* @__PURE__ */ d(
|
|
2529
|
+
}) : null : e.type === "recaptcha" ? /* @__PURE__ */ d($t, {
|
|
2495
2530
|
theme: e.captchaTheme,
|
|
2496
2531
|
size: e.captchaSize,
|
|
2497
2532
|
inert: r,
|
|
2498
|
-
onChange: (e) => n(
|
|
2499
|
-
}) : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ d(
|
|
2533
|
+
onChange: (e) => n(Kt, e)
|
|
2534
|
+
}) : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ d(st, {
|
|
2500
2535
|
url: e.src,
|
|
2501
2536
|
style: { width: "100%" }
|
|
2502
2537
|
}) : /* @__PURE__ */ d("video", {
|
|
@@ -2508,14 +2543,14 @@ function Ut({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
2508
2543
|
display: "block"
|
|
2509
2544
|
}
|
|
2510
2545
|
}) : null : /* @__PURE__ */ f("label", {
|
|
2511
|
-
style:
|
|
2546
|
+
style: Ut,
|
|
2512
2547
|
children: [
|
|
2513
2548
|
a,
|
|
2514
2549
|
e.type === "textarea" || e.multiline ? /* @__PURE__ */ d("textarea", {
|
|
2515
2550
|
...o,
|
|
2516
2551
|
rows: 4,
|
|
2517
2552
|
style: {
|
|
2518
|
-
...
|
|
2553
|
+
...Wt,
|
|
2519
2554
|
resize: "vertical"
|
|
2520
2555
|
}
|
|
2521
2556
|
}) : e.type === "select" ? /* @__PURE__ */ f("select", {
|
|
@@ -2524,7 +2559,7 @@ function Ut({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
2524
2559
|
children: [/* @__PURE__ */ d("option", {
|
|
2525
2560
|
value: "",
|
|
2526
2561
|
children: e.placeholder || "—"
|
|
2527
|
-
}),
|
|
2562
|
+
}), Gt(e, i).map((e, t) => /* @__PURE__ */ d("option", {
|
|
2528
2563
|
value: typeof e == "string" ? e : e.value,
|
|
2529
2564
|
children: typeof e == "string" ? e : e.label ?? e.value
|
|
2530
2565
|
}, t))]
|
|
@@ -2571,8 +2606,8 @@ function Ut({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
2571
2606
|
]
|
|
2572
2607
|
});
|
|
2573
2608
|
}
|
|
2574
|
-
function
|
|
2575
|
-
let { tenant: y, apiUrl: b } = i(
|
|
2609
|
+
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 }) {
|
|
2610
|
+
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
2611
|
a(() => {
|
|
2577
2612
|
if (!c || !s) return;
|
|
2578
2613
|
let e = !0;
|
|
@@ -2593,11 +2628,11 @@ function Wt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
2593
2628
|
section: e,
|
|
2594
2629
|
fields: []
|
|
2595
2630
|
}) : A[A.length - 1].fields.push(e);
|
|
2596
|
-
let j = A.filter((e) => e.section || e.fields.length), M = j.filter((e) => !e.section ||
|
|
2631
|
+
let j = A.filter((e) => e.section || e.fields.length), M = j.filter((e) => !e.section || Ht(e.section.condition, T)).map((e) => ({
|
|
2597
2632
|
...e,
|
|
2598
|
-
fields: e.fields.filter((e) =>
|
|
2633
|
+
fields: e.fields.filter((e) => Ht(e.condition, T))
|
|
2599
2634
|
})), 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[
|
|
2635
|
+
let t = T[qt(e)];
|
|
2601
2636
|
return e.required && (t == null || t === "" || t === !1);
|
|
2602
2637
|
}), R = F >= M.length - 1, z = (e, t) => E((n) => {
|
|
2603
2638
|
let r = {
|
|
@@ -2653,11 +2688,11 @@ function Wt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
2653
2688
|
}
|
|
2654
2689
|
},
|
|
2655
2690
|
style: {
|
|
2656
|
-
...
|
|
2691
|
+
...Lt,
|
|
2657
2692
|
display: k === "success" ? "none" : "flex"
|
|
2658
2693
|
},
|
|
2659
2694
|
children: c && s ? /* @__PURE__ */ f(u, { children: [
|
|
2660
|
-
N && /* @__PURE__ */ d(
|
|
2695
|
+
N && /* @__PURE__ */ d(wn, {
|
|
2661
2696
|
steps: M.map((e) => ({ label: e.section?.label ?? "Start" })),
|
|
2662
2697
|
active: F + 1,
|
|
2663
2698
|
style: { marginBottom: 8 }
|
|
@@ -2670,9 +2705,9 @@ function Wt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
2670
2705
|
},
|
|
2671
2706
|
children: M[F].section.help
|
|
2672
2707
|
}),
|
|
2673
|
-
I.map((e) => /* @__PURE__ */ d(
|
|
2708
|
+
I.map((e) => /* @__PURE__ */ d(Jt, {
|
|
2674
2709
|
field: e,
|
|
2675
|
-
value: T[
|
|
2710
|
+
value: T[qt(e)],
|
|
2676
2711
|
values: T,
|
|
2677
2712
|
onChange: z,
|
|
2678
2713
|
inert: h
|
|
@@ -2689,7 +2724,7 @@ function Wt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
2689
2724
|
disabled: h || void 0,
|
|
2690
2725
|
onClick: () => O(F - 1),
|
|
2691
2726
|
style: {
|
|
2692
|
-
...
|
|
2727
|
+
...Me,
|
|
2693
2728
|
background: "transparent",
|
|
2694
2729
|
color: "inherit",
|
|
2695
2730
|
border: 0,
|
|
@@ -2702,7 +2737,7 @@ function Wt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
2702
2737
|
disabled: h || L.length > 0,
|
|
2703
2738
|
onClick: () => O(F + 1),
|
|
2704
2739
|
style: {
|
|
2705
|
-
...
|
|
2740
|
+
...Me,
|
|
2706
2741
|
border: 0,
|
|
2707
2742
|
padding: "10px 22px",
|
|
2708
2743
|
borderRadius: 8,
|
|
@@ -2716,7 +2751,7 @@ function Wt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
2716
2751
|
type: "submit",
|
|
2717
2752
|
disabled: h || void 0,
|
|
2718
2753
|
style: {
|
|
2719
|
-
...
|
|
2754
|
+
...Me,
|
|
2720
2755
|
border: 0,
|
|
2721
2756
|
padding: "10px 22px",
|
|
2722
2757
|
borderRadius: 8,
|
|
@@ -2743,10 +2778,10 @@ function Wt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
2743
2778
|
]
|
|
2744
2779
|
});
|
|
2745
2780
|
}
|
|
2746
|
-
var
|
|
2781
|
+
var Xt = null, Zt = null, Qt = (e) => {
|
|
2747
2782
|
let t = typeof e == "string" && e.trim() ? e.trim() : "";
|
|
2748
|
-
if (
|
|
2749
|
-
if (
|
|
2783
|
+
if (Xt && Zt === t) return Xt;
|
|
2784
|
+
if (Xt && typeof window < "u") {
|
|
2750
2785
|
for (let e of ["grecaptcha", "___grecaptcha_cfg"]) try {
|
|
2751
2786
|
delete window[e];
|
|
2752
2787
|
} catch {
|
|
@@ -2754,22 +2789,22 @@ var Gt = null, Kt = null, qt = (e) => {
|
|
|
2754
2789
|
}
|
|
2755
2790
|
document.querySelectorAll("script[src*=\"recaptcha\"]").forEach((e) => e.remove());
|
|
2756
2791
|
}
|
|
2757
|
-
return
|
|
2792
|
+
return Zt = t, Xt = new Promise((e) => {
|
|
2758
2793
|
if (typeof window > "u") return;
|
|
2759
2794
|
if (window.grecaptcha?.render) return e(window.grecaptcha);
|
|
2760
2795
|
window.__webimRecaptchaReady = () => e(window.grecaptcha);
|
|
2761
2796
|
let n = document.createElement("script");
|
|
2762
2797
|
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
|
-
}),
|
|
2798
|
+
}), Xt;
|
|
2764
2799
|
};
|
|
2765
|
-
function
|
|
2766
|
-
let p = i(
|
|
2800
|
+
function $t({ siteKey: e, theme: t, size: n, hl: r, style: o, nodeRef: s, inert: l, onChange: u }) {
|
|
2801
|
+
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
2802
|
if (_.current = u, a(() => {
|
|
2768
2803
|
if (l || !h || !g.current) return;
|
|
2769
2804
|
let e = !0, i = (t) => {
|
|
2770
2805
|
e && typeof _.current == "function" && _.current(t);
|
|
2771
2806
|
};
|
|
2772
|
-
return
|
|
2807
|
+
return Qt(r).then((r) => {
|
|
2773
2808
|
if (!(!e || !g.current || !r?.render)) {
|
|
2774
2809
|
g.current.innerHTML = "", i("");
|
|
2775
2810
|
try {
|
|
@@ -2851,17 +2886,17 @@ function Jt({ siteKey: e, theme: t, size: n, hl: r, style: o, nodeRef: s, inert:
|
|
|
2851
2886
|
children: /* @__PURE__ */ d("div", { ref: g })
|
|
2852
2887
|
}) : null;
|
|
2853
2888
|
}
|
|
2854
|
-
function
|
|
2889
|
+
function en({ text: e, parts: t, style: n, nodeRef: r, linked: i }) {
|
|
2855
2890
|
return /* @__PURE__ */ d("label", {
|
|
2856
2891
|
ref: r,
|
|
2857
2892
|
style: {
|
|
2858
|
-
...
|
|
2893
|
+
...Rt,
|
|
2859
2894
|
...P(n)
|
|
2860
2895
|
},
|
|
2861
|
-
children:
|
|
2896
|
+
children: Ue(t, e, i)
|
|
2862
2897
|
});
|
|
2863
2898
|
}
|
|
2864
|
-
function
|
|
2899
|
+
function tn({ type: e = "text", name: t, placeholder: n, required: r, style: i, nodeRef: a, inert: o }) {
|
|
2865
2900
|
return /* @__PURE__ */ d("input", {
|
|
2866
2901
|
ref: a,
|
|
2867
2902
|
type: e,
|
|
@@ -2869,13 +2904,13 @@ function Xt({ type: e = "text", name: t, placeholder: n, required: r, style: i,
|
|
|
2869
2904
|
placeholder: n,
|
|
2870
2905
|
required: !o && !!r,
|
|
2871
2906
|
style: {
|
|
2872
|
-
...
|
|
2907
|
+
...zt,
|
|
2873
2908
|
...P(i)
|
|
2874
2909
|
},
|
|
2875
|
-
...
|
|
2910
|
+
...Vt(o)
|
|
2876
2911
|
});
|
|
2877
2912
|
}
|
|
2878
|
-
function
|
|
2913
|
+
function nn({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeRef: a, inert: o }) {
|
|
2879
2914
|
return /* @__PURE__ */ d("textarea", {
|
|
2880
2915
|
ref: a,
|
|
2881
2916
|
name: e || void 0,
|
|
@@ -2883,18 +2918,18 @@ function Zt({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeR
|
|
|
2883
2918
|
rows: n,
|
|
2884
2919
|
required: !o && !!r,
|
|
2885
2920
|
style: {
|
|
2886
|
-
...
|
|
2921
|
+
...zt,
|
|
2887
2922
|
resize: "vertical",
|
|
2888
2923
|
...P(i)
|
|
2889
2924
|
},
|
|
2890
|
-
...
|
|
2925
|
+
...Vt(o)
|
|
2891
2926
|
});
|
|
2892
2927
|
}
|
|
2893
|
-
function
|
|
2928
|
+
function rn({ kind: e = "checkbox", label: t, name: n, value: r, required: i, style: a, nodeRef: o, inert: s }) {
|
|
2894
2929
|
return /* @__PURE__ */ f("label", {
|
|
2895
2930
|
ref: o,
|
|
2896
2931
|
style: {
|
|
2897
|
-
...
|
|
2932
|
+
...Bt,
|
|
2898
2933
|
...P(a)
|
|
2899
2934
|
},
|
|
2900
2935
|
children: [/* @__PURE__ */ d("input", {
|
|
@@ -2911,7 +2946,7 @@ function Qt({ kind: e = "checkbox", label: t, name: n, value: r, required: i, st
|
|
|
2911
2946
|
}), t]
|
|
2912
2947
|
});
|
|
2913
2948
|
}
|
|
2914
|
-
function
|
|
2949
|
+
function an({ name: e, placeholder: t, options: n = [], required: r, style: i, nodeRef: a, inert: o }) {
|
|
2915
2950
|
return /* @__PURE__ */ f("select", {
|
|
2916
2951
|
ref: a,
|
|
2917
2952
|
name: e || void 0,
|
|
@@ -2920,7 +2955,7 @@ function $t({ name: e, placeholder: t, options: n = [], required: r, style: i, n
|
|
|
2920
2955
|
onMouseDown: o ? (e) => e.preventDefault() : void 0,
|
|
2921
2956
|
tabIndex: o ? -1 : void 0,
|
|
2922
2957
|
style: {
|
|
2923
|
-
...
|
|
2958
|
+
...zt,
|
|
2924
2959
|
appearance: "auto",
|
|
2925
2960
|
...P(i)
|
|
2926
2961
|
},
|
|
@@ -2934,12 +2969,12 @@ function $t({ name: e, placeholder: t, options: n = [], required: r, style: i, n
|
|
|
2934
2969
|
}, t))]
|
|
2935
2970
|
});
|
|
2936
2971
|
}
|
|
2937
|
-
function
|
|
2972
|
+
function on({ name: e, accept: t, required: n, text: r = "Choose a file…", style: i, nodeRef: a, inert: o }) {
|
|
2938
2973
|
let [s, c] = l(null);
|
|
2939
2974
|
return /* @__PURE__ */ f("label", {
|
|
2940
2975
|
ref: a,
|
|
2941
2976
|
style: {
|
|
2942
|
-
...
|
|
2977
|
+
...zt,
|
|
2943
2978
|
display: "flex",
|
|
2944
2979
|
alignItems: "center",
|
|
2945
2980
|
gap: "8px",
|
|
@@ -2966,12 +3001,12 @@ function en({ name: e, accept: t, required: n, text: r = "Choose a file…", sty
|
|
|
2966
3001
|
]
|
|
2967
3002
|
});
|
|
2968
3003
|
}
|
|
2969
|
-
function
|
|
3004
|
+
function sn({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
|
|
2970
3005
|
return /* @__PURE__ */ d("button", {
|
|
2971
3006
|
ref: n,
|
|
2972
3007
|
type: r ? "button" : "submit",
|
|
2973
3008
|
style: {
|
|
2974
|
-
...
|
|
3009
|
+
...Me,
|
|
2975
3010
|
border: 0,
|
|
2976
3011
|
cursor: "pointer",
|
|
2977
3012
|
alignSelf: "flex-start",
|
|
@@ -2986,7 +3021,7 @@ function tn({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
|
|
|
2986
3021
|
children: e
|
|
2987
3022
|
});
|
|
2988
3023
|
}
|
|
2989
|
-
function
|
|
3024
|
+
function cn({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
|
|
2990
3025
|
let a = Math.max(1, (Number(e) || 1) * (Number(t) || 1));
|
|
2991
3026
|
return /* @__PURE__ */ d("div", {
|
|
2992
3027
|
ref: r,
|
|
@@ -3003,8 +3038,8 @@ function nn({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
|
|
|
3003
3038
|
}, t))
|
|
3004
3039
|
});
|
|
3005
3040
|
}
|
|
3006
|
-
function
|
|
3007
|
-
let { tenant: v, apiUrl: y, locale: b } = i(
|
|
3041
|
+
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: _ }) {
|
|
3042
|
+
let { tenant: v, apiUrl: y, locale: b } = i(Y), x = i(Q), S = i(xe), [, C] = l(0);
|
|
3008
3043
|
a(() => {
|
|
3009
3044
|
if (typeof window > "u") return;
|
|
3010
3045
|
let e = () => C((e) => e + 1);
|
|
@@ -3012,7 +3047,7 @@ function rn({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
|
|
|
3012
3047
|
window.removeEventListener("popstate", e), window.removeEventListener("webim:urlchange", e);
|
|
3013
3048
|
};
|
|
3014
3049
|
}, []);
|
|
3015
|
-
let w =
|
|
3050
|
+
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
3051
|
if (a(() => {
|
|
3017
3052
|
if (!e || D) return;
|
|
3018
3053
|
let n = !0, r = new URLSearchParams();
|
|
@@ -3057,7 +3092,7 @@ function rn({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
|
|
|
3057
3092
|
},
|
|
3058
3093
|
children: M.map((e) => /* @__PURE__ */ d("div", {
|
|
3059
3094
|
style: { minWidth: 0 },
|
|
3060
|
-
children: x.render(p, (t) =>
|
|
3095
|
+
children: x.render(p, (t) => De(t, e))
|
|
3061
3096
|
}, e.id ?? e?.data?.slug))
|
|
3062
3097
|
}) : /* @__PURE__ */ d("div", {
|
|
3063
3098
|
ref: _,
|
|
@@ -3067,7 +3102,7 @@ function rn({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
|
|
|
3067
3102
|
...P(g)
|
|
3068
3103
|
},
|
|
3069
3104
|
children: M.map((e) => {
|
|
3070
|
-
let t = o ?
|
|
3105
|
+
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
3106
|
return /* @__PURE__ */ f("div", {
|
|
3072
3107
|
style: {
|
|
3073
3108
|
display: "flex",
|
|
@@ -3114,7 +3149,7 @@ function rn({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
|
|
|
3114
3149
|
lineHeight: 1.55,
|
|
3115
3150
|
opacity: .85
|
|
3116
3151
|
},
|
|
3117
|
-
children:
|
|
3152
|
+
children: Ye(a)
|
|
3118
3153
|
})
|
|
3119
3154
|
]
|
|
3120
3155
|
})]
|
|
@@ -3122,8 +3157,8 @@ function rn({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
|
|
|
3122
3157
|
})
|
|
3123
3158
|
});
|
|
3124
3159
|
}
|
|
3125
|
-
function
|
|
3126
|
-
let a = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && typeof e.name == "string" && e.name) : [], o = i ? {} :
|
|
3160
|
+
function un({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, inert: i }) {
|
|
3161
|
+
let a = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && typeof e.name == "string" && e.name) : [], o = i ? {} : X(), s = {
|
|
3127
3162
|
height: 34,
|
|
3128
3163
|
padding: "0 12px",
|
|
3129
3164
|
borderRadius: 8,
|
|
@@ -3171,7 +3206,7 @@ function an({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
3171
3206
|
name: `f_${e.name}`,
|
|
3172
3207
|
defaultValue: o[e.name] ?? "",
|
|
3173
3208
|
style: s,
|
|
3174
|
-
...
|
|
3209
|
+
...Vt(i),
|
|
3175
3210
|
children: [/* @__PURE__ */ d("option", {
|
|
3176
3211
|
value: "",
|
|
3177
3212
|
children: e.label || e.name
|
|
@@ -3186,7 +3221,7 @@ function an({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
3186
3221
|
name: `f_${e.name}`,
|
|
3187
3222
|
defaultValue: o[e.name] ?? "",
|
|
3188
3223
|
style: s,
|
|
3189
|
-
...
|
|
3224
|
+
...Vt(i),
|
|
3190
3225
|
children: [
|
|
3191
3226
|
/* @__PURE__ */ d("option", {
|
|
3192
3227
|
value: "",
|
|
@@ -3207,7 +3242,7 @@ function an({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
3207
3242
|
defaultValue: o[e.name] ?? "",
|
|
3208
3243
|
placeholder: e.label || e.name,
|
|
3209
3244
|
style: s,
|
|
3210
|
-
...
|
|
3245
|
+
...Vt(i)
|
|
3211
3246
|
}, e.name)), /* @__PURE__ */ d("button", {
|
|
3212
3247
|
type: "submit",
|
|
3213
3248
|
style: {
|
|
@@ -3220,12 +3255,12 @@ function an({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
3220
3255
|
fontWeight: 600,
|
|
3221
3256
|
cursor: i ? "default" : "pointer"
|
|
3222
3257
|
},
|
|
3223
|
-
...
|
|
3258
|
+
...Vt(i),
|
|
3224
3259
|
children: t
|
|
3225
3260
|
})]
|
|
3226
3261
|
});
|
|
3227
3262
|
}
|
|
3228
|
-
function
|
|
3263
|
+
function dn({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
|
|
3229
3264
|
return e.length ? /* @__PURE__ */ d("nav", {
|
|
3230
3265
|
ref: r,
|
|
3231
3266
|
"aria-label": "Breadcrumb",
|
|
@@ -3275,8 +3310,8 @@ function on({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
|
|
|
3275
3310
|
})
|
|
3276
3311
|
}) : null;
|
|
3277
3312
|
}
|
|
3278
|
-
function
|
|
3279
|
-
let { tenant: g, apiUrl: _ } = i(
|
|
3313
|
+
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 }) {
|
|
3314
|
+
let { tenant: g, apiUrl: _ } = i(Y), v = i(xe), [y, b] = l(null), x = o ? Number(v?.[`${o}:total`]) : NaN;
|
|
3280
3315
|
a(() => {
|
|
3281
3316
|
if (!o || Number.isFinite(x)) return;
|
|
3282
3317
|
let e = !0, t = o.startsWith("api:") ? `${_}/data/${encodeURIComponent(o.slice(4))}` : `${_}/dynamic/${encodeURIComponent(o)}?limit=1`;
|
|
@@ -3295,7 +3330,7 @@ function sn({ pages: e = 5, current: t = 1, prevNext: n = !0, href: r = "#", sou
|
|
|
3295
3330
|
]);
|
|
3296
3331
|
let S = Math.max(1, Number(s) || 6), C = Number.isFinite(x) ? x : y;
|
|
3297
3332
|
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 ?
|
|
3333
|
+
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
3334
|
if (o) {
|
|
3300
3335
|
if (typeof window < "u") {
|
|
3301
3336
|
let t = new URLSearchParams(window.location.search);
|
|
@@ -3360,15 +3395,15 @@ function sn({ pages: e = 5, current: t = 1, prevNext: n = !0, href: r = "#", sou
|
|
|
3360
3395
|
]
|
|
3361
3396
|
});
|
|
3362
3397
|
}
|
|
3363
|
-
var
|
|
3398
|
+
var pn = "webim.page_mode", mn = () => {
|
|
3364
3399
|
if (typeof window > "u") return "auto";
|
|
3365
3400
|
try {
|
|
3366
|
-
let e = window.localStorage.getItem(
|
|
3401
|
+
let e = window.localStorage.getItem(pn);
|
|
3367
3402
|
return e === "light" || e === "dark" ? e : "auto";
|
|
3368
3403
|
} catch {
|
|
3369
3404
|
return "auto";
|
|
3370
3405
|
}
|
|
3371
|
-
},
|
|
3406
|
+
}, hn = (e) => {
|
|
3372
3407
|
let t = {
|
|
3373
3408
|
width: 16,
|
|
3374
3409
|
height: 16,
|
|
@@ -3400,13 +3435,13 @@ var cn = "webim.page_mode", ln = () => {
|
|
|
3400
3435
|
rx: "2"
|
|
3401
3436
|
}), /* @__PURE__ */ d("path", { d: "M8 21h8M12 17v4" })]
|
|
3402
3437
|
});
|
|
3403
|
-
},
|
|
3438
|
+
}, gn = {
|
|
3404
3439
|
light: "Light theme",
|
|
3405
3440
|
dark: "Dark theme",
|
|
3406
3441
|
auto: "Follow the device theme"
|
|
3407
3442
|
};
|
|
3408
|
-
function
|
|
3409
|
-
let [o, s] = l(i ? "auto" :
|
|
3443
|
+
function _n({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
|
|
3444
|
+
let [o, s] = l(i ? "auto" : mn), u = c(null), f = (e) => {
|
|
3410
3445
|
u.current = e, typeof r == "function" && r(e);
|
|
3411
3446
|
};
|
|
3412
3447
|
a(() => {
|
|
@@ -3414,7 +3449,7 @@ function fn({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
|
|
|
3414
3449
|
let e = u.current?.closest?.(".webim-page");
|
|
3415
3450
|
e && (o === "light" || o === "dark" ? e.setAttribute("data-webim-mode", o) : e.removeAttribute("data-webim-mode"));
|
|
3416
3451
|
try {
|
|
3417
|
-
o === "auto" ? window.localStorage.removeItem(
|
|
3452
|
+
o === "auto" ? window.localStorage.removeItem(pn) : window.localStorage.setItem(pn, o);
|
|
3418
3453
|
} catch {}
|
|
3419
3454
|
}, [o, i]);
|
|
3420
3455
|
let p = t === !1 ? ["light", "dark"] : [
|
|
@@ -3449,8 +3484,8 @@ function fn({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
|
|
|
3449
3484
|
},
|
|
3450
3485
|
children: p.map((e) => /* @__PURE__ */ d("button", {
|
|
3451
3486
|
type: "button",
|
|
3452
|
-
title:
|
|
3453
|
-
"aria-label":
|
|
3487
|
+
title: gn[e],
|
|
3488
|
+
"aria-label": gn[e],
|
|
3454
3489
|
"aria-pressed": e === m,
|
|
3455
3490
|
onClick: i ? void 0 : () => s(e),
|
|
3456
3491
|
style: {
|
|
@@ -3461,15 +3496,15 @@ function fn({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
|
|
|
3461
3496
|
background: e === m ? "var(--page-accent, #111827)" : "transparent",
|
|
3462
3497
|
opacity: e === m ? 1 : .7
|
|
3463
3498
|
},
|
|
3464
|
-
children:
|
|
3499
|
+
children: hn(e)
|
|
3465
3500
|
}, e))
|
|
3466
3501
|
});
|
|
3467
3502
|
let g = p[(p.indexOf(m) + 1) % p.length];
|
|
3468
3503
|
return /* @__PURE__ */ d("button", {
|
|
3469
3504
|
ref: f,
|
|
3470
3505
|
type: "button",
|
|
3471
|
-
title:
|
|
3472
|
-
"aria-label": `Theme: ${
|
|
3506
|
+
title: gn[m],
|
|
3507
|
+
"aria-label": `Theme: ${gn[m]} — switch to ${gn[g]}`,
|
|
3473
3508
|
onClick: i ? void 0 : () => s(g),
|
|
3474
3509
|
style: {
|
|
3475
3510
|
...h,
|
|
@@ -3478,10 +3513,10 @@ function fn({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
|
|
|
3478
3513
|
border: "1px solid rgba(148, 163, 184, 0.4)",
|
|
3479
3514
|
...P(n)
|
|
3480
3515
|
},
|
|
3481
|
-
children:
|
|
3516
|
+
children: hn(m)
|
|
3482
3517
|
});
|
|
3483
3518
|
}
|
|
3484
|
-
function
|
|
3519
|
+
function vn(e) {
|
|
3485
3520
|
let t = e?.parentElement;
|
|
3486
3521
|
for (; t && t !== document.body;) {
|
|
3487
3522
|
let e = getComputedStyle(t).overflowY;
|
|
@@ -3490,7 +3525,7 @@ function pn(e) {
|
|
|
3490
3525
|
}
|
|
3491
3526
|
return window;
|
|
3492
3527
|
}
|
|
3493
|
-
var
|
|
3528
|
+
var yn = (e) => e === window ? window.scrollY : e.scrollTop, bn = {
|
|
3494
3529
|
"bottom-right": (e) => ({
|
|
3495
3530
|
right: e,
|
|
3496
3531
|
bottom: e
|
|
@@ -3505,7 +3540,7 @@ var mn = (e) => e === window ? window.scrollY : e.scrollTop, hn = {
|
|
|
3505
3540
|
transform: "translateX(-50%)"
|
|
3506
3541
|
})
|
|
3507
3542
|
};
|
|
3508
|
-
function
|
|
3543
|
+
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
3544
|
let [_, v] = l(!!m), [y, b] = l(null), x = (e) => {
|
|
3510
3545
|
b(e), typeof p == "function" && p(e);
|
|
3511
3546
|
};
|
|
@@ -3516,8 +3551,8 @@ function gn({ variant: e, label: t, position: n, offset: r, showAfter: i, smooth
|
|
|
3516
3551
|
}
|
|
3517
3552
|
if (!y) return;
|
|
3518
3553
|
let e = Number(i) >= 0 ? Number(i) : 300, t = () => {
|
|
3519
|
-
let t =
|
|
3520
|
-
v(n ||
|
|
3554
|
+
let t = vn(y), n = g && !(t === window ? document.documentElement.scrollHeight > window.innerHeight : t.scrollHeight > t.clientHeight);
|
|
3555
|
+
v(n || yn(t) > e);
|
|
3521
3556
|
};
|
|
3522
3557
|
return t(), document.addEventListener("scroll", t, {
|
|
3523
3558
|
capture: !0,
|
|
@@ -3531,7 +3566,7 @@ function gn({ variant: e, label: t, position: n, offset: r, showAfter: i, smooth
|
|
|
3531
3566
|
]);
|
|
3532
3567
|
let S = () => {
|
|
3533
3568
|
if (m) return;
|
|
3534
|
-
let e =
|
|
3569
|
+
let e = vn(y), t = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches, n = o === !1 || t ? "auto" : "smooth";
|
|
3535
3570
|
e === window ? window.scrollTo({
|
|
3536
3571
|
top: 0,
|
|
3537
3572
|
behavior: n
|
|
@@ -3539,7 +3574,7 @@ function gn({ variant: e, label: t, position: n, offset: r, showAfter: i, smooth
|
|
|
3539
3574
|
top: 0,
|
|
3540
3575
|
behavior: n
|
|
3541
3576
|
});
|
|
3542
|
-
}, C = Number(r) >= 0 ? Number(r) : 24, w = e === "pill", T = t || "Top", E =
|
|
3577
|
+
}, C = Number(r) >= 0 ? Number(r) : 24, w = e === "pill", T = t || "Top", E = bn[n] ? n : "bottom-right", D = h ? {
|
|
3543
3578
|
position: "fixed",
|
|
3544
3579
|
zIndex: 5,
|
|
3545
3580
|
bottom: (h.bottom ?? 0) + C,
|
|
@@ -3552,7 +3587,7 @@ function gn({ variant: e, label: t, position: n, offset: r, showAfter: i, smooth
|
|
|
3552
3587
|
} : {
|
|
3553
3588
|
position: "fixed",
|
|
3554
3589
|
zIndex: 2147482e3,
|
|
3555
|
-
...
|
|
3590
|
+
...bn[E](C)
|
|
3556
3591
|
};
|
|
3557
3592
|
return /* @__PURE__ */ f("button", {
|
|
3558
3593
|
ref: x,
|
|
@@ -3603,7 +3638,7 @@ function gn({ variant: e, label: t, position: n, offset: r, showAfter: i, smooth
|
|
|
3603
3638
|
}), w ? /* @__PURE__ */ d("span", { children: T }) : null]
|
|
3604
3639
|
});
|
|
3605
3640
|
}
|
|
3606
|
-
var
|
|
3641
|
+
var Sn = {
|
|
3607
3642
|
facebook: {
|
|
3608
3643
|
label: "Facebook",
|
|
3609
3644
|
color: "#1877f2",
|
|
@@ -3670,8 +3705,8 @@ var _n = {
|
|
|
3670
3705
|
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
3706
|
}
|
|
3672
3707
|
};
|
|
3673
|
-
function
|
|
3674
|
-
let l = Array.isArray(e) ? e.filter((e) => e &&
|
|
3708
|
+
function Cn({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, style: o, nodeRef: s, inert: c }) {
|
|
3709
|
+
let l = Array.isArray(e) ? e.filter((e) => e && Sn[e.network]) : [];
|
|
3675
3710
|
if (!l.length) return null;
|
|
3676
3711
|
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
3712
|
return /* @__PURE__ */ d("div", {
|
|
@@ -3684,7 +3719,7 @@ function vn({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, s
|
|
|
3684
3719
|
...P(o)
|
|
3685
3720
|
},
|
|
3686
3721
|
children: l.map((e, r) => {
|
|
3687
|
-
let i =
|
|
3722
|
+
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
3723
|
return /* @__PURE__ */ d("a", {
|
|
3689
3724
|
href: e.url || "#",
|
|
3690
3725
|
onClick: h,
|
|
@@ -3718,7 +3753,7 @@ function vn({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, s
|
|
|
3718
3753
|
})
|
|
3719
3754
|
});
|
|
3720
3755
|
}
|
|
3721
|
-
function
|
|
3756
|
+
function wn({ steps: e = [], active: n = 1, vertical: r = !1, style: i, nodeRef: a }) {
|
|
3722
3757
|
if (!e.length) return null;
|
|
3723
3758
|
let o = Math.min(Math.max(Number(n) || 1, 1), e.length), s = (e) => ({
|
|
3724
3759
|
width: 32,
|
|
@@ -3796,7 +3831,7 @@ function yn({ steps: e = [], active: n = 1, vertical: r = !1, style: i, nodeRef:
|
|
|
3796
3831
|
})
|
|
3797
3832
|
});
|
|
3798
3833
|
}
|
|
3799
|
-
var
|
|
3834
|
+
var Tn = {
|
|
3800
3835
|
small: {
|
|
3801
3836
|
w: 132,
|
|
3802
3837
|
h: 46,
|
|
@@ -3818,21 +3853,21 @@ var bn = {
|
|
|
3818
3853
|
title: 12.5,
|
|
3819
3854
|
avatar: 46
|
|
3820
3855
|
}
|
|
3821
|
-
},
|
|
3822
|
-
|
|
3823
|
-
var
|
|
3856
|
+
}, En = (e) => Tn[e] ?? Tn.medium;
|
|
3857
|
+
Tn.medium.w, Tn.medium.h;
|
|
3858
|
+
var Dn = (e) => String(e?.group ?? "").trim(), On = (e) => {
|
|
3824
3859
|
let t = [], n = /* @__PURE__ */ new Map();
|
|
3825
3860
|
return e.forEach((e, r) => {
|
|
3826
|
-
let i =
|
|
3861
|
+
let i = Dn(e) || `#${r}`;
|
|
3827
3862
|
n.has(i) || (n.set(i, []), t.push(i)), n.get(i).push(e);
|
|
3828
3863
|
}), t.flatMap((e) => n.get(e));
|
|
3829
3864
|
};
|
|
3830
|
-
function
|
|
3831
|
-
let i =
|
|
3865
|
+
function kn(e, { size: t = "medium", horizontal: n = !1, groupTitles: r = "top" } = {}) {
|
|
3866
|
+
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
3867
|
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 + (
|
|
3868
|
+
d = On(d);
|
|
3869
|
+
for (let [e, t] of u) u.set(e, On(t));
|
|
3870
|
+
let f = (e, t) => o + (Dn(e) !== Dn(t) && (Dn(e) || Dn(t)) ? 24 : 0), p = /* @__PURE__ */ new Map(), m = (e, t) => {
|
|
3836
3871
|
if (t.has(e.id)) return 0;
|
|
3837
3872
|
t.add(e.id);
|
|
3838
3873
|
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 +3883,7 @@ function wn(e, { size: t = "medium", horizontal: n = !1, groupTitles: r = "top"
|
|
|
3848
3883
|
x: m,
|
|
3849
3884
|
y: b
|
|
3850
3885
|
});
|
|
3851
|
-
let x =
|
|
3886
|
+
let x = Dn(e);
|
|
3852
3887
|
if (x) {
|
|
3853
3888
|
let t = `${e.parent && l.has(e.parent) && e.parent !== e.id ? e.parent : ""}|${x}`;
|
|
3854
3889
|
_.has(t) || _.set(t, {
|
|
@@ -3922,19 +3957,19 @@ function wn(e, { size: t = "medium", horizontal: n = !1, groupTitles: r = "top"
|
|
|
3922
3957
|
horizontal: n
|
|
3923
3958
|
};
|
|
3924
3959
|
}
|
|
3925
|
-
var
|
|
3960
|
+
var An = (e, t) => {
|
|
3926
3961
|
let n = String(e ?? "");
|
|
3927
3962
|
return n.length > t ? `${n.slice(0, t - 1)}…` : n;
|
|
3928
|
-
},
|
|
3963
|
+
}, jn = (e) => {
|
|
3929
3964
|
let t = /^#([0-9a-f]{6}|[0-9a-f]{3})$/i.exec(String(e ?? "").trim());
|
|
3930
3965
|
if (!t) return "#ffffff";
|
|
3931
3966
|
let n = t[1];
|
|
3932
3967
|
n.length === 3 && (n = [...n].map((e) => e + e).join(""));
|
|
3933
3968
|
let r = parseInt(n, 16);
|
|
3934
3969
|
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 ? "" :
|
|
3970
|
+
}, Mn = (e) => !!(e?.cv?.trim?.() || e?.photo);
|
|
3971
|
+
function Nn(e, t = {}) {
|
|
3972
|
+
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
3973
|
return n.map((e) => {
|
|
3939
3974
|
let n = e.data ?? {}, a = r(n[t.parentField]), o = a && typeof a == "object" ? a.id ?? null : a || null;
|
|
3940
3975
|
return {
|
|
@@ -3949,11 +3984,11 @@ function On(e, t = {}) {
|
|
|
3949
3984
|
};
|
|
3950
3985
|
});
|
|
3951
3986
|
}
|
|
3952
|
-
var
|
|
3987
|
+
var Pn = {
|
|
3953
3988
|
size: 36,
|
|
3954
3989
|
pad: 10
|
|
3955
3990
|
};
|
|
3956
|
-
function
|
|
3991
|
+
function Fn({ node: e, onClose: t }) {
|
|
3957
3992
|
return a(() => {
|
|
3958
3993
|
let e = (e) => e.key === "Escape" && t();
|
|
3959
3994
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
@@ -4074,8 +4109,8 @@ function An({ node: e, onClose: t }) {
|
|
|
4074
4109
|
})
|
|
4075
4110
|
});
|
|
4076
4111
|
}
|
|
4077
|
-
function
|
|
4078
|
-
let C = o(), [w, T] = l(null), { tenant: E, apiUrl: D } = i(
|
|
4112
|
+
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 }) {
|
|
4113
|
+
let C = o(), [w, T] = l(null), { tenant: E, apiUrl: D } = i(Y), O = i(xe)?.[t], [k, A] = l(null);
|
|
4079
4114
|
a(() => {
|
|
4080
4115
|
if (!t || O) return;
|
|
4081
4116
|
let e = !0;
|
|
@@ -4091,7 +4126,7 @@ function jn({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
4091
4126
|
D,
|
|
4092
4127
|
O
|
|
4093
4128
|
]);
|
|
4094
|
-
let j = t ?
|
|
4129
|
+
let j = t ? Nn(O ?? k ?? [], {
|
|
4095
4130
|
nameField: n,
|
|
4096
4131
|
titleField: r,
|
|
4097
4132
|
photoField: s,
|
|
@@ -4099,7 +4134,7 @@ function jn({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
4099
4134
|
cvField: p,
|
|
4100
4135
|
hrefField: m,
|
|
4101
4136
|
groupField: h
|
|
4102
|
-
}) : e, M =
|
|
4137
|
+
}) : e, M = En(v), { boxes: N, links: F, groups: I, width: L, height: R } = kn(j, {
|
|
4103
4138
|
size: v,
|
|
4104
4139
|
horizontal: y,
|
|
4105
4140
|
groupTitles: g
|
|
@@ -4157,8 +4192,8 @@ function jn({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
4157
4192
|
fontSize: M.title + 1,
|
|
4158
4193
|
fontWeight: "600",
|
|
4159
4194
|
opacity: "0.55",
|
|
4160
|
-
fill: r ?
|
|
4161
|
-
children:
|
|
4195
|
+
fill: r ? jn(e.color || _) : "var(--page-text, #111827)",
|
|
4196
|
+
children: An(e.title, Math.floor(e.width / 7))
|
|
4162
4197
|
})] }, `group-${t}`);
|
|
4163
4198
|
}),
|
|
4164
4199
|
F.map((e, t) => /* @__PURE__ */ d("path", {
|
|
@@ -4168,7 +4203,7 @@ function jn({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
4168
4203
|
strokeWidth: "1.5"
|
|
4169
4204
|
}, t)),
|
|
4170
4205
|
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 ?
|
|
4206
|
+
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
4207
|
return /* @__PURE__ */ f("g", {
|
|
4173
4208
|
onClick: l ? p : void 0,
|
|
4174
4209
|
style: l ? { cursor: "pointer" } : void 0,
|
|
@@ -4232,13 +4267,13 @@ function jn({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
4232
4267
|
e.photo && /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("clipPath", {
|
|
4233
4268
|
id: `${C}-${e.id}`,
|
|
4234
4269
|
children: /* @__PURE__ */ d("circle", {
|
|
4235
|
-
cx: t +
|
|
4270
|
+
cx: t + Pn.pad + M.avatar / 2,
|
|
4236
4271
|
cy: n + M.h / 2,
|
|
4237
4272
|
r: M.avatar / 2
|
|
4238
4273
|
})
|
|
4239
4274
|
}), /* @__PURE__ */ d("image", {
|
|
4240
4275
|
href: e.photo,
|
|
4241
|
-
x: t +
|
|
4276
|
+
x: t + Pn.pad,
|
|
4242
4277
|
y: n + (M.h - M.avatar) / 2,
|
|
4243
4278
|
width: M.avatar,
|
|
4244
4279
|
height: M.avatar,
|
|
@@ -4252,7 +4287,7 @@ function jn({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
4252
4287
|
fontSize: M.title,
|
|
4253
4288
|
fontWeight: "600",
|
|
4254
4289
|
fill: s,
|
|
4255
|
-
children:
|
|
4290
|
+
children: An(e.title, g + 4)
|
|
4256
4291
|
}), e.name && /* @__PURE__ */ d("text", {
|
|
4257
4292
|
x: m,
|
|
4258
4293
|
y: n + _ + _ / 2 + M.name * .35,
|
|
@@ -4260,7 +4295,7 @@ function jn({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
4260
4295
|
fontSize: M.name,
|
|
4261
4296
|
fontWeight: "600",
|
|
4262
4297
|
fill: c,
|
|
4263
|
-
children:
|
|
4298
|
+
children: An(e.name, g)
|
|
4264
4299
|
})] }) : /* @__PURE__ */ f(u, { children: [v[0] && /* @__PURE__ */ d("text", {
|
|
4265
4300
|
x: m,
|
|
4266
4301
|
y: n + (v[1] ? M.h * .43 : M.h * .57),
|
|
@@ -4268,7 +4303,7 @@ function jn({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
4268
4303
|
fontSize: M.name,
|
|
4269
4304
|
fontWeight: "600",
|
|
4270
4305
|
fill: s,
|
|
4271
|
-
children:
|
|
4306
|
+
children: An(v[0], g)
|
|
4272
4307
|
}), v[1] && /* @__PURE__ */ d("text", {
|
|
4273
4308
|
x: m,
|
|
4274
4309
|
y: n + M.h * .73,
|
|
@@ -4276,19 +4311,19 @@ function jn({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
4276
4311
|
fontSize: M.title,
|
|
4277
4312
|
opacity: "0.7",
|
|
4278
4313
|
fill: s,
|
|
4279
|
-
children:
|
|
4314
|
+
children: An(v[1], g + 4)
|
|
4280
4315
|
})] })
|
|
4281
4316
|
]
|
|
4282
4317
|
}, e.id);
|
|
4283
4318
|
})
|
|
4284
4319
|
]
|
|
4285
|
-
}), w && /* @__PURE__ */ d(
|
|
4320
|
+
}), w && /* @__PURE__ */ d(Fn, {
|
|
4286
4321
|
node: w,
|
|
4287
4322
|
onClose: () => T(null)
|
|
4288
4323
|
})]
|
|
4289
4324
|
});
|
|
4290
4325
|
}
|
|
4291
|
-
function
|
|
4326
|
+
function Ln({ value: e, onCommit: t, style: n, hint: r }) {
|
|
4292
4327
|
let [i, o] = l(!1), s = c(null);
|
|
4293
4328
|
return a(() => {
|
|
4294
4329
|
if (!i || !s.current) return;
|
|
@@ -4318,7 +4353,7 @@ function Mn({ value: e, onCommit: t, style: n, hint: r }) {
|
|
|
4318
4353
|
children: e ?? ""
|
|
4319
4354
|
});
|
|
4320
4355
|
}
|
|
4321
|
-
var
|
|
4356
|
+
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
4357
|
if (!e || typeof e != "object") return e ?? "";
|
|
4323
4358
|
let t = String(e.text ?? "");
|
|
4324
4359
|
return typeof e.href == "string" && e.href ? /* @__PURE__ */ d("a", {
|
|
@@ -4329,8 +4364,8 @@ var Nn = 360, Pn = "\n.wb-tedit-btn {\n cursor: pointer;\n border-radius: 4px;
|
|
|
4329
4364
|
children: t
|
|
4330
4365
|
}) : t;
|
|
4331
4366
|
};
|
|
4332
|
-
function
|
|
4333
|
-
let F = c(null), I = c(null), [L, R] = l(null), [z, B] = l(null),
|
|
4367
|
+
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 }) {
|
|
4368
|
+
let F = c(null), I = c(null), [L, R] = l(null), [z, B] = l(null), V = (e, t) => () => R({
|
|
4334
4369
|
r: e,
|
|
4335
4370
|
c: t
|
|
4336
4371
|
});
|
|
@@ -4343,7 +4378,7 @@ function Ln({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
|
|
|
4343
4378
|
}
|
|
4344
4379
|
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = {
|
|
4345
4380
|
top: r.bottom - n.top + 4,
|
|
4346
|
-
left: Math.max(0, Math.min(r.left - n.left, n.width -
|
|
4381
|
+
left: Math.max(0, Math.min(r.left - n.left, n.width - Rn))
|
|
4347
4382
|
};
|
|
4348
4383
|
(z?.top !== i.top || z?.left !== i.left) && B(i);
|
|
4349
4384
|
}), a(() => {
|
|
@@ -4353,58 +4388,58 @@ function Ln({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
|
|
|
4353
4388
|
};
|
|
4354
4389
|
return document.addEventListener("mousedown", e, !0), () => document.removeEventListener("mousedown", e, !0);
|
|
4355
4390
|
}, [N, L]);
|
|
4356
|
-
let { tenant:
|
|
4391
|
+
let { tenant: H, apiUrl: U } = i(Y), ee = i(xe), W = ee?.[h], te = C ? Se(ee) : 1, [ne, re] = l(null);
|
|
4357
4392
|
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:
|
|
4393
|
+
if (!h || W) return;
|
|
4394
|
+
let e = !0, t = Math.max(1, Number(g) || 10), n = C && !h.startsWith("api:") ? `?offset=${(te - 1) * t}&limit=${t}` : "", r = h.startsWith("api:") ? `${U}/data/${encodeURIComponent(h.slice(4))}` : `${U}/dynamic/${encodeURIComponent(h)}${n}`;
|
|
4395
|
+
return fetch(r, { headers: H ? { "x-tenant": H } : {} }).then((e) => e.json()).then((t) => {
|
|
4361
4396
|
let n = Array.isArray(t?.payload) ? t.payload : Array.isArray(t?.payload?.data) ? t.payload.data : [];
|
|
4362
|
-
return e &&
|
|
4363
|
-
}).catch(() => e &&
|
|
4397
|
+
return e && re(n);
|
|
4398
|
+
}).catch(() => e && re([])), () => {
|
|
4364
4399
|
e = !1;
|
|
4365
4400
|
};
|
|
4366
4401
|
}, [
|
|
4367
4402
|
h,
|
|
4368
|
-
V,
|
|
4369
4403
|
H,
|
|
4370
|
-
|
|
4404
|
+
U,
|
|
4405
|
+
W,
|
|
4371
4406
|
C,
|
|
4372
|
-
|
|
4407
|
+
te,
|
|
4373
4408
|
g
|
|
4374
4409
|
]), !e.length) return null;
|
|
4375
|
-
let
|
|
4410
|
+
let G = Math.max(1, Number(g) || 10), ie = h ? C ? W || h.startsWith("api:") ? (W ?? ne ?? []).slice((te - 1) * G, te * G) : (ne ?? []).slice(0, G) : (W ?? ne ?? []).slice(0, G) : null, ae = ie ? ie.map((t) => e.map((e) => Ee(we(t?.data, e.field)))) : t, oe = !!h && !(h && !W && ne === null) && ae.length === 0, se = b ? {
|
|
4376
4411
|
y: 6,
|
|
4377
4412
|
x: 10
|
|
4378
4413
|
} : {
|
|
4379
4414
|
y: 10,
|
|
4380
4415
|
x: 14
|
|
4381
|
-
},
|
|
4416
|
+
}, K = `${Number.isFinite(Number(S)) && S !== "" ? Number(S) : se.y}px ${Number.isFinite(Number(x)) && x !== "" ? Number(x) : se.x}px`, ce = `1px solid ${typeof k == "string" && k ? k : "rgba(148, 163, 184, 0.35)"}`, q = y ? { border: ce } : { borderBottom: ce }, J = Array.isArray(n) && n.length === e.length && n.every((e) => Number.isFinite(e) && e > 0), le = [
|
|
4382
4417
|
"left",
|
|
4383
4418
|
"center",
|
|
4384
4419
|
"right"
|
|
4385
|
-
],
|
|
4386
|
-
...
|
|
4420
|
+
], ue = (t) => le.includes(e[t]?.align) ? e[t].align : "", de = (e) => ue(e) || (le.includes(O) ? O : "left"), fe = Number.isFinite(Number(A)) && Number(A) > 0 ? Number(A) : 0, pe = P(j), me = !fe && pe && pe.maxHeight !== void 0 ? pe.maxHeight : 0, he = fe || me, ge = me ? {
|
|
4421
|
+
...pe,
|
|
4387
4422
|
maxHeight: void 0
|
|
4388
|
-
} :
|
|
4423
|
+
} : pe, _e = !!N && N.rows !== !1, ve = (t) => (r) => {
|
|
4389
4424
|
if (!N?.resize || t >= e.length - 1) return;
|
|
4390
4425
|
r.preventDefault(), r.stopPropagation();
|
|
4391
4426
|
let i = F.current, a = i ? i.clientWidth : 0;
|
|
4392
4427
|
if (!a) return;
|
|
4393
|
-
let o =
|
|
4428
|
+
let o = J ? [...n] : e.map(() => 100 / e.length), s = r.clientX, c = o[t] + o[t + 1], l = (e) => {
|
|
4394
4429
|
let n = (e.clientX - s) / a * 100, r = Math.min(c - 5, Math.max(5, o[t] + n)), i = [...o];
|
|
4395
4430
|
i[t] = Math.round(r * 10) / 10, i[t + 1] = Math.round((c - r) * 10) / 10, N.resize(i);
|
|
4396
4431
|
}, u = () => {
|
|
4397
4432
|
window.removeEventListener("pointermove", l), window.removeEventListener("pointerup", u);
|
|
4398
4433
|
};
|
|
4399
4434
|
window.addEventListener("pointermove", l), window.addEventListener("pointerup", u);
|
|
4400
|
-
},
|
|
4401
|
-
p &&
|
|
4402
|
-
let i = p[
|
|
4435
|
+
}, ye = /* @__PURE__ */ new Set();
|
|
4436
|
+
p && ae.forEach((t, n) => e.forEach((e, t) => {
|
|
4437
|
+
let i = p[Bn(r[n], o[t])];
|
|
4403
4438
|
if (!i) return;
|
|
4404
4439
|
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) &&
|
|
4440
|
+
for (let e = 0; e < s; e++) for (let r = 0; r < a; r++) (e || r) && ye.add(`${n + e},${t + r}`);
|
|
4406
4441
|
}));
|
|
4407
|
-
let
|
|
4442
|
+
let be = (e) => (t) => {
|
|
4408
4443
|
if (!N?.resizeRow) return;
|
|
4409
4444
|
t.preventDefault(), t.stopPropagation();
|
|
4410
4445
|
let n = t.currentTarget.closest("tr");
|
|
@@ -4413,7 +4448,7 @@ function Ln({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
|
|
|
4413
4448
|
window.removeEventListener("pointermove", a), window.removeEventListener("pointerup", o);
|
|
4414
4449
|
};
|
|
4415
4450
|
window.addEventListener("pointermove", a), window.addEventListener("pointerup", o);
|
|
4416
|
-
},
|
|
4451
|
+
}, X = (e, t, n, r) => r ? null : /* @__PURE__ */ d("span", {
|
|
4417
4452
|
className: "wb-tedit-btn",
|
|
4418
4453
|
role: "button",
|
|
4419
4454
|
"data-hint": t,
|
|
@@ -4422,7 +4457,7 @@ function Ln({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
|
|
|
4422
4457
|
},
|
|
4423
4458
|
onClick: n,
|
|
4424
4459
|
children: e
|
|
4425
|
-
}, t), Z = L && L.r <
|
|
4460
|
+
}, t), Z = L && L.r < ae.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
4461
|
return /* @__PURE__ */ f("div", {
|
|
4427
4462
|
ref: (e) => {
|
|
4428
4463
|
I.current = e, typeof M == "function" && M(e);
|
|
@@ -4430,10 +4465,10 @@ function Ln({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
|
|
|
4430
4465
|
style: {
|
|
4431
4466
|
width: "100%",
|
|
4432
4467
|
...N ? { position: "relative" } : null,
|
|
4433
|
-
...
|
|
4468
|
+
...ge
|
|
4434
4469
|
},
|
|
4435
4470
|
children: [
|
|
4436
|
-
N && /* @__PURE__ */ d("style", { children:
|
|
4471
|
+
N && /* @__PURE__ */ d("style", { children: zn }),
|
|
4437
4472
|
N && Z && z && /* @__PURE__ */ f("div", {
|
|
4438
4473
|
className: "wb-tedit-bar",
|
|
4439
4474
|
style: {
|
|
@@ -4446,29 +4481,29 @@ function Ln({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
|
|
|
4446
4481
|
className: "wb-tedit-at",
|
|
4447
4482
|
children: `R${Z.r + 1}·C${Z.c + 1}`
|
|
4448
4483
|
}),
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4484
|
+
X("+↑", Q("rowAbove", "Insert row above"), () => N.addRow(Z.r - 1)),
|
|
4485
|
+
X("+↓", Q("rowBelow", "Insert row below"), () => N.addRow(Z.r)),
|
|
4486
|
+
X("↑", Q("rowUp", "Move row up"), () => N.moveRow(Z.r, -1), Z.r === 0),
|
|
4487
|
+
X("↓", Q("rowDown", "Move row down"), () => N.moveRow(Z.r, 1), Z.r >= ae.length - 1),
|
|
4488
|
+
X("✕ row", Q("rowDelete", "Delete row"), () => N.dropRow(Z.r), ae.length <= 1),
|
|
4454
4489
|
/* @__PURE__ */ d("span", { className: "wb-tedit-sep" }),
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4490
|
+
X("+←", Q("colLeft", "Insert column left"), () => N.addColumn(Z.c - 1)),
|
|
4491
|
+
X("+→", Q("colRight", "Insert column right"), () => N.addColumn(Z.c)),
|
|
4492
|
+
X("←", Q("colMoveLeft", "Move column left"), () => N.moveColumn(Z.c, -1), Z.c === 0),
|
|
4493
|
+
X("→", Q("colMoveRight", "Move column right"), () => N.moveColumn(Z.c, 1), Z.c >= e.length - 1),
|
|
4494
|
+
X("✕ col", Q("colDelete", "Delete column"), () => N.dropColumn(Z.c), e.length <= 1),
|
|
4460
4495
|
/* @__PURE__ */ d("span", { className: "wb-tedit-sep" }),
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4496
|
+
X("↔", Q("mergeRight", "Merge with the cell on the right"), () => N.merge(Z.r, Z.c, "right"), Z.c + Te >= e.length),
|
|
4497
|
+
X("↕", Q("mergeDown", "Merge with the cell below"), () => N.merge(Z.r, Z.c, "down"), Z.r + De >= ae.length),
|
|
4498
|
+
X("⤫", Q("split", "Split this cell"), () => N.split(Z.r, Z.c), Te === 1 && De === 1)
|
|
4464
4499
|
]
|
|
4465
4500
|
}),
|
|
4466
4501
|
/* @__PURE__ */ d("div", {
|
|
4467
4502
|
style: {
|
|
4468
4503
|
width: "100%",
|
|
4469
4504
|
overflowX: "auto",
|
|
4470
|
-
...
|
|
4471
|
-
maxHeight:
|
|
4505
|
+
...he ? {
|
|
4506
|
+
maxHeight: he,
|
|
4472
4507
|
overflowY: "auto"
|
|
4473
4508
|
} : null
|
|
4474
4509
|
},
|
|
@@ -4479,17 +4514,17 @@ function Ln({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
|
|
|
4479
4514
|
borderCollapse: T && _ !== !1 ? "separate" : "collapse",
|
|
4480
4515
|
borderSpacing: 0,
|
|
4481
4516
|
fontSize: 14,
|
|
4482
|
-
...
|
|
4483
|
-
...y ? { border:
|
|
4517
|
+
...J ? { tableLayout: "fixed" } : null,
|
|
4518
|
+
...y ? { border: ce } : {}
|
|
4484
4519
|
},
|
|
4485
4520
|
children: [
|
|
4486
|
-
|
|
4521
|
+
J && /* @__PURE__ */ d("colgroup", { children: n.map((e, t) => /* @__PURE__ */ d("col", { style: { width: `${e}%` } }, t)) }),
|
|
4487
4522
|
_ === !1 ? null : /* @__PURE__ */ d("thead", { children: /* @__PURE__ */ d("tr", { children: e.map((t, n) => /* @__PURE__ */ d("th", {
|
|
4488
4523
|
className: N ? "wb-tedit-head" : void 0,
|
|
4489
4524
|
style: {
|
|
4490
|
-
textAlign:
|
|
4525
|
+
textAlign: de(n),
|
|
4491
4526
|
fontWeight: 600,
|
|
4492
|
-
padding:
|
|
4527
|
+
padding: K,
|
|
4493
4528
|
...typeof D == "string" && D ? { color: D } : null,
|
|
4494
4529
|
background: typeof E == "string" && E ? E : T ? "var(--page-surface, #f2f2f2)" : "rgba(148, 163, 184, 0.12)",
|
|
4495
4530
|
...T ? {
|
|
@@ -4497,9 +4532,9 @@ function Ln({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
|
|
|
4497
4532
|
top: 0,
|
|
4498
4533
|
zIndex: 2
|
|
4499
4534
|
} : N ? { position: "relative" } : null,
|
|
4500
|
-
...
|
|
4535
|
+
...q
|
|
4501
4536
|
},
|
|
4502
|
-
children: N ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(
|
|
4537
|
+
children: N ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(Ln, {
|
|
4503
4538
|
value: t.label ?? t,
|
|
4504
4539
|
onCommit: (e) => N.header(n, e),
|
|
4505
4540
|
hint: Q("editCell", "Double-click to edit"),
|
|
@@ -4507,43 +4542,43 @@ function Ln({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
|
|
|
4507
4542
|
}), n < e.length - 1 && /* @__PURE__ */ d("span", {
|
|
4508
4543
|
className: "wb-tedit-grip",
|
|
4509
4544
|
title: Q("colWidth", "Drag to resize the column"),
|
|
4510
|
-
onPointerDown:
|
|
4545
|
+
onPointerDown: ve(n)
|
|
4511
4546
|
})] }) : t.label ?? t
|
|
4512
4547
|
}, n)) }) }),
|
|
4513
|
-
/* @__PURE__ */ f("tbody", { children: [
|
|
4548
|
+
/* @__PURE__ */ f("tbody", { children: [oe && /* @__PURE__ */ d("tr", { children: /* @__PURE__ */ d("td", {
|
|
4514
4549
|
colSpan: e.length,
|
|
4515
4550
|
style: {
|
|
4516
|
-
padding:
|
|
4551
|
+
padding: K,
|
|
4517
4552
|
textAlign: "center",
|
|
4518
4553
|
opacity: .6,
|
|
4519
|
-
...
|
|
4554
|
+
...q
|
|
4520
4555
|
},
|
|
4521
4556
|
children: w || "No data yet"
|
|
4522
|
-
}) }),
|
|
4557
|
+
}) }), ae.map((t, n) => /* @__PURE__ */ d("tr", {
|
|
4523
4558
|
className: N ? "wb-tedit-row" : void 0,
|
|
4524
4559
|
style: {
|
|
4525
4560
|
...v && n % 2 == 1 ? { background: "rgba(148, 163, 184, 0.07)" } : null,
|
|
4526
4561
|
...Number.isFinite(Number(s?.[n])) && s[n] > 0 ? { height: s[n] } : null
|
|
4527
4562
|
},
|
|
4528
4563
|
children: e.map((e, i) => {
|
|
4529
|
-
if (
|
|
4530
|
-
let a =
|
|
4564
|
+
if (ye.has(`${n},${i}`)) return null;
|
|
4565
|
+
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
4566
|
return /* @__PURE__ */ f("td", {
|
|
4532
4567
|
className: N ? `wb-tedit-cell${L?.r === n && L?.c === i ? " wb-tedit-cellon" : ""}` : void 0,
|
|
4533
|
-
onMouseDownCapture:
|
|
4568
|
+
onMouseDownCapture: _e ? V(n, i) : void 0,
|
|
4534
4569
|
"data-cell": N ? `${n}-${i}` : void 0,
|
|
4535
4570
|
colSpan: l > 1 ? l : void 0,
|
|
4536
4571
|
rowSpan: u > 1 ? u : void 0,
|
|
4537
4572
|
style: {
|
|
4538
|
-
padding:
|
|
4539
|
-
...
|
|
4573
|
+
padding: K,
|
|
4574
|
+
...ue(i) ? { textAlign: ue(i) } : null,
|
|
4540
4575
|
...N ? { position: "relative" } : null,
|
|
4541
|
-
...
|
|
4576
|
+
...q
|
|
4542
4577
|
},
|
|
4543
|
-
children: [s ??
|
|
4578
|
+
children: [s ?? Vn(t?.[i]), N && _e && /* @__PURE__ */ d("span", {
|
|
4544
4579
|
className: "wb-tedit-rowgrip",
|
|
4545
4580
|
title: Q("rowHeight", "Drag to set the row height — double-click to fit the content"),
|
|
4546
|
-
onPointerDown:
|
|
4581
|
+
onPointerDown: be(n),
|
|
4547
4582
|
onDoubleClick: () => N.resizeRow(n, 0)
|
|
4548
4583
|
})]
|
|
4549
4584
|
}, i);
|
|
@@ -4555,7 +4590,7 @@ function Ln({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
|
|
|
4555
4590
|
]
|
|
4556
4591
|
});
|
|
4557
4592
|
}
|
|
4558
|
-
var
|
|
4593
|
+
var Un = {
|
|
4559
4594
|
small: {
|
|
4560
4595
|
cell: 62,
|
|
4561
4596
|
font: 10.5,
|
|
@@ -4580,9 +4615,9 @@ var Rn = {
|
|
|
4580
4615
|
pad: 8,
|
|
4581
4616
|
gap: 4
|
|
4582
4617
|
}
|
|
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 ? "" :
|
|
4618
|
+
}, 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;
|
|
4619
|
+
function qn(e, t = {}) {
|
|
4620
|
+
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
4621
|
let t = i(r(e)), n = t ? new Date(t) : null;
|
|
4587
4622
|
return n && !Number.isNaN(n.getTime()) ? n : null;
|
|
4588
4623
|
};
|
|
@@ -4598,7 +4633,7 @@ function Hn(e, t = {}) {
|
|
|
4598
4633
|
} : null;
|
|
4599
4634
|
}).filter(Boolean);
|
|
4600
4635
|
}
|
|
4601
|
-
function
|
|
4636
|
+
function Jn(e) {
|
|
4602
4637
|
return (Array.isArray(e) ? e : []).map((e, t) => {
|
|
4603
4638
|
let n = e?.start ? new Date(e.start) : null;
|
|
4604
4639
|
if (!n || Number.isNaN(n.getTime())) return null;
|
|
@@ -4613,20 +4648,20 @@ function Un(e) {
|
|
|
4613
4648
|
};
|
|
4614
4649
|
}).filter(Boolean);
|
|
4615
4650
|
}
|
|
4616
|
-
function
|
|
4651
|
+
function Yn(e) {
|
|
4617
4652
|
let t = /* @__PURE__ */ new Map();
|
|
4618
4653
|
for (let n of e) {
|
|
4619
|
-
let e =
|
|
4654
|
+
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
4655
|
for (let r = 0; r <= i; r += 1) {
|
|
4621
|
-
let i =
|
|
4656
|
+
let i = Wn(new Date(e.getFullYear(), e.getMonth(), e.getDate() + r));
|
|
4622
4657
|
t.has(i) || t.set(i, []), t.get(i).push(n);
|
|
4623
4658
|
}
|
|
4624
4659
|
}
|
|
4625
4660
|
for (let e of t.values()) e.sort((e, t) => e.start - t.start);
|
|
4626
4661
|
return t;
|
|
4627
4662
|
}
|
|
4628
|
-
function
|
|
4629
|
-
let { tenant: T, apiUrl: E, locale: D } = i(
|
|
4663
|
+
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 }) {
|
|
4664
|
+
let { tenant: T, apiUrl: E, locale: D } = i(Y), O = i(xe)?.[t], [k, A] = l(null), [j, M] = l(() => {
|
|
4630
4665
|
let e = /* @__PURE__ */ new Date();
|
|
4631
4666
|
return {
|
|
4632
4667
|
year: e.getFullYear(),
|
|
@@ -4648,13 +4683,13 @@ function Gn({ events: e = [], source: t = "", titleField: n = "", startField: r
|
|
|
4648
4683
|
E,
|
|
4649
4684
|
O
|
|
4650
4685
|
]);
|
|
4651
|
-
let N =
|
|
4686
|
+
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
4687
|
titleField: n,
|
|
4653
4688
|
startField: r,
|
|
4654
4689
|
endField: o,
|
|
4655
4690
|
hrefField: s,
|
|
4656
4691
|
colorField: c
|
|
4657
|
-
}) :
|
|
4692
|
+
}) : Jn(e), B = Yn(z), V = D || void 0, H = (e, t) => {
|
|
4658
4693
|
let n = /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("span", { style: {
|
|
4659
4694
|
width: 6,
|
|
4660
4695
|
height: 6,
|
|
@@ -4692,19 +4727,19 @@ function Gn({ events: e = [], source: t = "", titleField: n = "", startField: r
|
|
|
4692
4727
|
title: e.title,
|
|
4693
4728
|
children: n
|
|
4694
4729
|
}, e.key);
|
|
4695
|
-
},
|
|
4730
|
+
}, U = new Intl.DateTimeFormat(V, {
|
|
4696
4731
|
month: "long",
|
|
4697
4732
|
year: "numeric"
|
|
4698
|
-
}).format(new Date(j.year, j.month, 1)),
|
|
4733
|
+
}).format(new Date(j.year, j.month, 1)), ee = (e) => M((t) => {
|
|
4699
4734
|
let n = new Date(t.year, t.month + e, 1);
|
|
4700
4735
|
return {
|
|
4701
4736
|
year: n.getFullYear(),
|
|
4702
4737
|
month: n.getMonth()
|
|
4703
4738
|
};
|
|
4704
|
-
}),
|
|
4739
|
+
}), W = (e, t) => /* @__PURE__ */ d("button", {
|
|
4705
4740
|
type: "button",
|
|
4706
4741
|
"aria-label": e,
|
|
4707
|
-
onClick: () =>
|
|
4742
|
+
onClick: () => ee(t),
|
|
4708
4743
|
style: {
|
|
4709
4744
|
background: "transparent",
|
|
4710
4745
|
border: `1px solid ${I}`,
|
|
@@ -4716,7 +4751,7 @@ function Gn({ events: e = [], source: t = "", titleField: n = "", startField: r
|
|
|
4716
4751
|
padding: "4px 8px"
|
|
4717
4752
|
},
|
|
4718
4753
|
children: t < 0 ? "‹" : "›"
|
|
4719
|
-
}),
|
|
4754
|
+
}), te = /* @__PURE__ */ f("div", {
|
|
4720
4755
|
style: {
|
|
4721
4756
|
display: "flex",
|
|
4722
4757
|
alignItems: "center",
|
|
@@ -4731,14 +4766,14 @@ function Gn({ events: e = [], source: t = "", titleField: n = "", startField: r
|
|
|
4731
4766
|
flexGrow: 1,
|
|
4732
4767
|
fontFamily: "var(--page-heading-font, inherit)"
|
|
4733
4768
|
},
|
|
4734
|
-
children:
|
|
4769
|
+
children: U
|
|
4735
4770
|
}),
|
|
4736
|
-
|
|
4737
|
-
|
|
4771
|
+
W("Previous month", -1),
|
|
4772
|
+
W("Next month", 1)
|
|
4738
4773
|
]
|
|
4739
4774
|
});
|
|
4740
4775
|
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(
|
|
4776
|
+
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
4777
|
day: "numeric",
|
|
4743
4778
|
month: "short",
|
|
4744
4779
|
hour: "2-digit",
|
|
@@ -4750,7 +4785,7 @@ function Gn({ events: e = [], source: t = "", titleField: n = "", startField: r
|
|
|
4750
4785
|
width: "100%",
|
|
4751
4786
|
...P(S)
|
|
4752
4787
|
},
|
|
4753
|
-
children: [
|
|
4788
|
+
children: [te, e.length ? /* @__PURE__ */ d("div", {
|
|
4754
4789
|
style: {
|
|
4755
4790
|
display: "flex",
|
|
4756
4791
|
flexDirection: "column",
|
|
@@ -4771,7 +4806,7 @@ function Gn({ events: e = [], source: t = "", titleField: n = "", startField: r
|
|
|
4771
4806
|
minWidth: 96
|
|
4772
4807
|
},
|
|
4773
4808
|
children: t.format(e.start)
|
|
4774
|
-
}),
|
|
4809
|
+
}), H(e, {
|
|
4775
4810
|
flexGrow: 1,
|
|
4776
4811
|
minWidth: 0
|
|
4777
4812
|
})]
|
|
@@ -4786,10 +4821,10 @@ function Gn({ events: e = [], source: t = "", titleField: n = "", startField: r
|
|
|
4786
4821
|
})]
|
|
4787
4822
|
});
|
|
4788
4823
|
}
|
|
4789
|
-
let
|
|
4790
|
-
for (let e = 0; e <
|
|
4791
|
-
let t = e -
|
|
4792
|
-
|
|
4824
|
+
let ne = new Date(j.year, j.month, 1), re = y === "sunday" ? 0 : 1, G = (ne.getDay() - re + 7) % 7, ie = new Date(j.year, j.month + 1, 0).getDate(), ae = Math.ceil((G + ie) / 7), oe = Wn(/* @__PURE__ */ new Date()), se = new Intl.DateTimeFormat(V, { weekday: "short" }), K = [];
|
|
4825
|
+
for (let e = 0; e < ae * 7; e += 1) {
|
|
4826
|
+
let t = e - G + 1, n = t >= 1 && t <= ie, 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 === oe;
|
|
4827
|
+
K.push(/* @__PURE__ */ f("div", {
|
|
4793
4828
|
style: {
|
|
4794
4829
|
minHeight: N.cell,
|
|
4795
4830
|
borderTop: `1px solid ${I}`,
|
|
@@ -4814,7 +4849,7 @@ function Gn({ events: e = [], source: t = "", titleField: n = "", startField: r
|
|
|
4814
4849
|
},
|
|
4815
4850
|
children: n ? t : new Date(j.year, j.month, t).getDate()
|
|
4816
4851
|
}),
|
|
4817
|
-
a.map((e) =>
|
|
4852
|
+
a.map((e) => H(e)),
|
|
4818
4853
|
i.length > a.length && /* @__PURE__ */ d("span", {
|
|
4819
4854
|
style: {
|
|
4820
4855
|
fontSize: N.font,
|
|
@@ -4832,7 +4867,7 @@ function Gn({ events: e = [], source: t = "", titleField: n = "", startField: r
|
|
|
4832
4867
|
...P(S)
|
|
4833
4868
|
},
|
|
4834
4869
|
children: [
|
|
4835
|
-
|
|
4870
|
+
te,
|
|
4836
4871
|
/* @__PURE__ */ f("div", {
|
|
4837
4872
|
style: {
|
|
4838
4873
|
display: "grid",
|
|
@@ -4846,31 +4881,31 @@ function Gn({ events: e = [], source: t = "", titleField: n = "", startField: r
|
|
|
4846
4881
|
textAlign: "center",
|
|
4847
4882
|
padding: `0 0 ${N.pad}px`
|
|
4848
4883
|
},
|
|
4849
|
-
children:
|
|
4850
|
-
}, `head-${t}`)),
|
|
4884
|
+
children: se.format(new Date(2024, 0, 7 + re + t))
|
|
4885
|
+
}, `head-${t}`)), K]
|
|
4851
4886
|
}),
|
|
4852
4887
|
/* @__PURE__ */ d("div", { style: { borderTop: `1px solid ${I}` } })
|
|
4853
4888
|
]
|
|
4854
4889
|
});
|
|
4855
4890
|
}
|
|
4856
|
-
var
|
|
4891
|
+
var Zn = {
|
|
4857
4892
|
small: 36,
|
|
4858
4893
|
medium: 56,
|
|
4859
4894
|
large: 88
|
|
4860
4895
|
};
|
|
4861
|
-
function
|
|
4862
|
-
let n = Array.isArray(e) ? e.filter((e) => e && typeof e == "object") : [], r = (e) => e == null ? "" :
|
|
4896
|
+
function Qn(e, t = {}) {
|
|
4897
|
+
let n = Array.isArray(e) ? e.filter((e) => e && typeof e == "object") : [], r = (e) => e == null ? "" : Ee(e);
|
|
4863
4898
|
return n.map((e) => {
|
|
4864
|
-
let n = e.data ?? e, i =
|
|
4899
|
+
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
4900
|
return {
|
|
4866
4901
|
src: typeof o == "string" ? o.trim() : "",
|
|
4867
4902
|
alt: s,
|
|
4868
|
-
href: t.hrefField ? r(
|
|
4903
|
+
href: t.hrefField ? r(we(n, t.hrefField)) : ""
|
|
4869
4904
|
};
|
|
4870
4905
|
}).filter((e) => e.src);
|
|
4871
4906
|
}
|
|
4872
|
-
function
|
|
4873
|
-
let { tenant: D, apiUrl: O } = i(
|
|
4907
|
+
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 }) {
|
|
4908
|
+
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), [W, te] = l(!1);
|
|
4874
4909
|
a(() => {
|
|
4875
4910
|
if (!t || k) return;
|
|
4876
4911
|
let e = !0;
|
|
@@ -4887,7 +4922,7 @@ function Jn({ logos: e = [], source: t = "", imageField: n = "", nameField: r =
|
|
|
4887
4922
|
k
|
|
4888
4923
|
]), a(() => {
|
|
4889
4924
|
if (typeof window > "u" || !window.matchMedia) return;
|
|
4890
|
-
let e = window.matchMedia("(prefers-reduced-motion: reduce)"), t = () =>
|
|
4925
|
+
let e = window.matchMedia("(prefers-reduced-motion: reduce)"), t = () => te(e.matches);
|
|
4891
4926
|
return t(), e.addEventListener?.("change", t), () => e.removeEventListener?.("change", t);
|
|
4892
4927
|
}, []), a(() => {
|
|
4893
4928
|
let e = N.current;
|
|
@@ -4900,7 +4935,7 @@ function Jn({ logos: e = [], source: t = "", imageField: n = "", nameField: r =
|
|
|
4900
4935
|
let e = M.current;
|
|
4901
4936
|
if (!e) return;
|
|
4902
4937
|
let t = !0, n = () => {
|
|
4903
|
-
let n = [...e.querySelectorAll("img")].filter((e) => e.complete && e.naturalHeight).map((e) => e.naturalWidth / e.naturalHeight *
|
|
4938
|
+
let n = [...e.querySelectorAll("img")].filter((e) => e.complete && e.naturalHeight).map((e) => e.naturalWidth / e.naturalHeight * G);
|
|
4904
4939
|
t && n.length && R(Math.ceil(Math.max(...n)));
|
|
4905
4940
|
};
|
|
4906
4941
|
n();
|
|
@@ -4909,12 +4944,12 @@ function Jn({ logos: e = [], source: t = "", imageField: n = "", nameField: r =
|
|
|
4909
4944
|
t = !1, r.forEach((e) => e.removeEventListener("load", n));
|
|
4910
4945
|
};
|
|
4911
4946
|
});
|
|
4912
|
-
let
|
|
4947
|
+
let ne = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.src) : [], re = t ? Qn(k ?? A ?? [], {
|
|
4913
4948
|
imageField: n,
|
|
4914
4949
|
nameField: r,
|
|
4915
4950
|
hrefField: o
|
|
4916
|
-
}) :
|
|
4917
|
-
if (!
|
|
4951
|
+
}) : ne, G = Zn[p] ?? Zn.medium, ie = Number.isFinite(Number(h)) ? Math.max(0, Number(h)) : 48, ae = s === "marquee" ? "step" : s, oe = Math.min(3e4, Math.max(300, (Number(g) || 3) * 1e3)), se = Math.min(3e3, Math.max(100, Number(_) || 500)), K = Math.min(12, Math.max(1, Math.round(Number(m) || 5))), q = (L || G * 3) + ie, J = F ? Math.max(1, Math.floor(F / q)) : K, le = Math.min(K, J), ue = F ? Math.min(q, F / le) : q;
|
|
4952
|
+
if (!re.length) return /* @__PURE__ */ d("div", {
|
|
4918
4953
|
ref: T,
|
|
4919
4954
|
style: {
|
|
4920
4955
|
width: "100%",
|
|
@@ -4926,7 +4961,7 @@ function Jn({ logos: e = [], source: t = "", imageField: n = "", nameField: r =
|
|
|
4926
4961
|
alignItems: "center",
|
|
4927
4962
|
justifyContent: "center",
|
|
4928
4963
|
flexWrap: "wrap",
|
|
4929
|
-
gap:
|
|
4964
|
+
gap: ie
|
|
4930
4965
|
},
|
|
4931
4966
|
children: [
|
|
4932
4967
|
0,
|
|
@@ -4936,16 +4971,16 @@ function Jn({ logos: e = [], source: t = "", imageField: n = "", nameField: r =
|
|
|
4936
4971
|
4
|
|
4937
4972
|
].map((e) => /* @__PURE__ */ d("div", {
|
|
4938
4973
|
style: {
|
|
4939
|
-
height:
|
|
4940
|
-
width:
|
|
4974
|
+
height: G,
|
|
4975
|
+
width: G * 3,
|
|
4941
4976
|
border: "1px dashed var(--page-border, rgba(148, 163, 184, 0.5))",
|
|
4942
4977
|
borderRadius: 6,
|
|
4943
4978
|
display: "flex",
|
|
4944
4979
|
alignItems: "center",
|
|
4945
4980
|
justifyContent: "center",
|
|
4946
|
-
fontSize: Math.max(10, Math.round(
|
|
4981
|
+
fontSize: Math.max(10, Math.round(G / 4)),
|
|
4947
4982
|
opacity: .45,
|
|
4948
|
-
...
|
|
4983
|
+
...ce
|
|
4949
4984
|
},
|
|
4950
4985
|
children: "LOGO"
|
|
4951
4986
|
}, e))
|
|
@@ -4959,21 +4994,21 @@ function Jn({ logos: e = [], source: t = "", imageField: n = "", nameField: r =
|
|
|
4959
4994
|
children: C
|
|
4960
4995
|
}) : null
|
|
4961
4996
|
});
|
|
4962
|
-
let
|
|
4997
|
+
let de = re.length, fe = ae === "step" && de > le, pe = ae === "slider", me = fe && !E && !U && !W, he = v === "right", ge = he ? de : 0, _e = fe ? [...re, ...re] : re, ve = fe ? z * ue : 0, ye = (e, t, n) => {
|
|
4963
4998
|
let r = /* @__PURE__ */ d("img", {
|
|
4964
4999
|
src: e.src,
|
|
4965
5000
|
alt: e.alt ?? "",
|
|
4966
5001
|
style: {
|
|
4967
|
-
height:
|
|
5002
|
+
height: G,
|
|
4968
5003
|
width: "auto",
|
|
4969
5004
|
maxWidth: "100%",
|
|
4970
5005
|
objectFit: "contain",
|
|
4971
5006
|
display: "block"
|
|
4972
5007
|
}
|
|
4973
|
-
}), i =
|
|
4974
|
-
width:
|
|
5008
|
+
}), i = fe ? {
|
|
5009
|
+
width: ue,
|
|
4975
5010
|
flex: "0 0 auto",
|
|
4976
|
-
padding: `0 ${
|
|
5011
|
+
padding: `0 ${ie / 2}px`,
|
|
4977
5012
|
justifyContent: "center"
|
|
4978
5013
|
} : {};
|
|
4979
5014
|
return e.href && !E ? /* @__PURE__ */ d("a", {
|
|
@@ -4996,30 +5031,30 @@ function Jn({ logos: e = [], source: t = "", imageField: n = "", nameField: r =
|
|
|
4996
5031
|
...n ? { "aria-hidden": "true" } : {},
|
|
4997
5032
|
children: r
|
|
4998
5033
|
}, `${n ? "c" : "o"}-${t}`);
|
|
4999
|
-
},
|
|
5034
|
+
}, be = /* @__PURE__ */ d("div", {
|
|
5000
5035
|
ref: M,
|
|
5001
5036
|
className: "wb-logos-track",
|
|
5002
5037
|
style: {
|
|
5003
5038
|
display: "flex",
|
|
5004
5039
|
alignItems: "center",
|
|
5005
|
-
...
|
|
5006
|
-
width:
|
|
5007
|
-
transform: `translateX(-${
|
|
5008
|
-
transition:
|
|
5009
|
-
} :
|
|
5010
|
-
gap:
|
|
5040
|
+
...fe ? {
|
|
5041
|
+
width: _e.length * ue,
|
|
5042
|
+
transform: `translateX(-${ve}px)`,
|
|
5043
|
+
transition: V ? `transform ${se}ms ease` : "none"
|
|
5044
|
+
} : pe ? {
|
|
5045
|
+
gap: ie,
|
|
5011
5046
|
overflowX: "auto",
|
|
5012
5047
|
scrollBehavior: "smooth",
|
|
5013
5048
|
scrollSnapType: "x proximity"
|
|
5014
5049
|
} : {
|
|
5015
|
-
gap:
|
|
5050
|
+
gap: ie,
|
|
5016
5051
|
flexWrap: "wrap",
|
|
5017
5052
|
justifyContent: "center"
|
|
5018
5053
|
}
|
|
5019
5054
|
},
|
|
5020
|
-
children:
|
|
5021
|
-
}),
|
|
5022
|
-
if (
|
|
5055
|
+
children: _e.map((e, t) => ye(e, t, fe && t >= de))
|
|
5056
|
+
}), Se = (e) => {
|
|
5057
|
+
if (pe) {
|
|
5023
5058
|
let t = M.current;
|
|
5024
5059
|
t && t.scrollBy({
|
|
5025
5060
|
left: e * Math.max(120, t.clientWidth * .8),
|
|
@@ -5028,19 +5063,19 @@ function Jn({ logos: e = [], source: t = "", imageField: n = "", nameField: r =
|
|
|
5028
5063
|
return;
|
|
5029
5064
|
}
|
|
5030
5065
|
let t = z + e;
|
|
5031
|
-
if (t >= 0 && t <=
|
|
5032
|
-
|
|
5066
|
+
if (t >= 0 && t <= de) {
|
|
5067
|
+
H(!0), B(t);
|
|
5033
5068
|
return;
|
|
5034
5069
|
}
|
|
5035
|
-
let n = t < 0 ?
|
|
5036
|
-
|
|
5037
|
-
|
|
5070
|
+
let n = t < 0 ? de : 0;
|
|
5071
|
+
H(!1), B(n), requestAnimationFrame(() => requestAnimationFrame(() => {
|
|
5072
|
+
H(!0), B(n + e);
|
|
5038
5073
|
}));
|
|
5039
|
-
},
|
|
5074
|
+
}, X = y === !1 || y === "off" ? "off" : y === "hover" ? "hover" : "show", Z = X !== "off" && (pe ? F > 0 : fe), Q = (e) => /* @__PURE__ */ d("button", {
|
|
5040
5075
|
type: "button",
|
|
5041
5076
|
"aria-label": e < 0 ? "Previous logos" : "Next logos",
|
|
5042
|
-
onClick: () =>
|
|
5043
|
-
className: `wb-logos-arrow${
|
|
5077
|
+
onClick: () => Se(e),
|
|
5078
|
+
className: `wb-logos-arrow${X === "hover" ? " wb-logos-arrow-shy" : ""}`,
|
|
5044
5079
|
style: { [e < 0 ? "left" : "right"]: 0 },
|
|
5045
5080
|
children: e < 0 ? "‹" : "›"
|
|
5046
5081
|
});
|
|
@@ -5055,8 +5090,8 @@ function Jn({ logos: e = [], source: t = "", imageField: n = "", nameField: r =
|
|
|
5055
5090
|
overflow: "hidden",
|
|
5056
5091
|
...P(w)
|
|
5057
5092
|
},
|
|
5058
|
-
onMouseEnter: b === !1 ? void 0 : () =>
|
|
5059
|
-
onMouseLeave: b === !1 ? void 0 : () =>
|
|
5093
|
+
onMouseEnter: b === !1 ? void 0 : () => ee(!0),
|
|
5094
|
+
onMouseLeave: b === !1 ? void 0 : () => ee(!1),
|
|
5060
5095
|
children: [
|
|
5061
5096
|
/* @__PURE__ */ d("style", { children: `
|
|
5062
5097
|
.wb-logos .wb-logo { display: flex; align-items: center; flex-shrink: 0; text-decoration: none; box-sizing: border-box; }
|
|
@@ -5078,41 +5113,41 @@ function Jn({ logos: e = [], source: t = "", imageField: n = "", nameField: r =
|
|
|
5078
5113
|
border: 1px solid var(--page-border, rgba(148, 163, 184, 0.5));
|
|
5079
5114
|
}
|
|
5080
5115
|
` }),
|
|
5081
|
-
|
|
5116
|
+
fe ? /* @__PURE__ */ f("div", {
|
|
5082
5117
|
style: {
|
|
5083
5118
|
position: "relative",
|
|
5084
|
-
width:
|
|
5119
|
+
width: le * ue,
|
|
5085
5120
|
maxWidth: "100%",
|
|
5086
5121
|
margin: "0 auto"
|
|
5087
5122
|
},
|
|
5088
5123
|
children: [
|
|
5089
|
-
|
|
5124
|
+
Z ? Q(-1) : null,
|
|
5090
5125
|
/* @__PURE__ */ d("div", {
|
|
5091
5126
|
style: { overflow: "hidden" },
|
|
5092
|
-
children:
|
|
5127
|
+
children: be
|
|
5093
5128
|
}),
|
|
5094
|
-
|
|
5129
|
+
Z ? Q(1) : null
|
|
5095
5130
|
]
|
|
5096
5131
|
}) : /* @__PURE__ */ f(u, { children: [
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5132
|
+
Z ? Q(-1) : null,
|
|
5133
|
+
be,
|
|
5134
|
+
Z ? Q(1) : null
|
|
5100
5135
|
] }),
|
|
5101
|
-
/* @__PURE__ */ d(
|
|
5102
|
-
running:
|
|
5103
|
-
every:
|
|
5104
|
-
slide:
|
|
5105
|
-
step:
|
|
5136
|
+
/* @__PURE__ */ d(er, {
|
|
5137
|
+
running: me,
|
|
5138
|
+
every: oe + se,
|
|
5139
|
+
slide: se,
|
|
5140
|
+
step: he ? -1 : 1,
|
|
5106
5141
|
index: z,
|
|
5107
|
-
total:
|
|
5108
|
-
home:
|
|
5142
|
+
total: de,
|
|
5143
|
+
home: ge,
|
|
5109
5144
|
setIndex: B,
|
|
5110
|
-
setAnimate:
|
|
5145
|
+
setAnimate: H
|
|
5111
5146
|
})
|
|
5112
5147
|
]
|
|
5113
5148
|
});
|
|
5114
5149
|
}
|
|
5115
|
-
function
|
|
5150
|
+
function er({ running: e, every: t, slide: n, step: r, index: i, total: o, home: s, setIndex: c, setAnimate: l }) {
|
|
5116
5151
|
a(() => {
|
|
5117
5152
|
if (!e) return;
|
|
5118
5153
|
let n = setInterval(() => {
|
|
@@ -5148,13 +5183,13 @@ function Yn({ running: e, every: t, slide: n, step: r, index: i, total: o, home:
|
|
|
5148
5183
|
l
|
|
5149
5184
|
]), null;
|
|
5150
5185
|
}
|
|
5151
|
-
var
|
|
5186
|
+
var tr = {
|
|
5152
5187
|
small: 380,
|
|
5153
5188
|
medium: 560,
|
|
5154
5189
|
large: 820,
|
|
5155
5190
|
full: "100%"
|
|
5156
5191
|
};
|
|
5157
|
-
function
|
|
5192
|
+
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
5193
|
let [C, w] = l(!1), T = c(null);
|
|
5159
5194
|
a(() => {
|
|
5160
5195
|
if (S || !e) return;
|
|
@@ -5179,7 +5214,7 @@ function Zn({ dialogId: e = "", trigger: t = "button", triggerLabel: n = "Open",
|
|
|
5179
5214
|
document.removeEventListener("keydown", e), document.body.style.overflow = t;
|
|
5180
5215
|
};
|
|
5181
5216
|
}, [S, C]);
|
|
5182
|
-
let E =
|
|
5217
|
+
let E = tr[o] ?? tr.medium, D = (e) => {
|
|
5183
5218
|
let t = {
|
|
5184
5219
|
padding: "9px 16px",
|
|
5185
5220
|
borderRadius: 6,
|
|
@@ -5348,97 +5383,98 @@ function Zn({ dialogId: e = "", trigger: t = "button", triggerLabel: n = "Open",
|
|
|
5348
5383
|
})]
|
|
5349
5384
|
});
|
|
5350
5385
|
}
|
|
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
|
-
|
|
5386
|
+
var rr = {
|
|
5387
|
+
PageRoot: Le,
|
|
5388
|
+
CalendarBlock: Xn,
|
|
5389
|
+
LogoCarousel: $n,
|
|
5390
|
+
DialogBlock: nr,
|
|
5391
|
+
Section: Re,
|
|
5392
|
+
Container: ze,
|
|
5393
|
+
Heading: Be,
|
|
5394
|
+
TextBlock: et,
|
|
5395
|
+
ButtonBlock: rt,
|
|
5396
|
+
ImageBlock: it,
|
|
5397
|
+
Spacer: ut,
|
|
5398
|
+
Divider: dt,
|
|
5399
|
+
BoxBlock: ft,
|
|
5400
|
+
SliderBlock: vt,
|
|
5401
|
+
CanvasSlider: yt,
|
|
5402
|
+
TabsBlock: Ft,
|
|
5403
|
+
QuickStack: cn,
|
|
5404
|
+
CollectionList: ln,
|
|
5405
|
+
CollectionSearch: un,
|
|
5406
|
+
BreadcrumbsBlock: dn,
|
|
5407
|
+
PaginationBlock: fn,
|
|
5408
|
+
StepperBlock: wn,
|
|
5409
|
+
SocialLinksBlock: Cn,
|
|
5410
|
+
ThemeModeBlock: _n,
|
|
5411
|
+
ScrollTopBlock: xn,
|
|
5412
|
+
OrgChartBlock: In,
|
|
5413
|
+
TableBlock: Hn,
|
|
5414
|
+
IconBlock: Ot,
|
|
5415
|
+
MapBlock: Et,
|
|
5416
|
+
MasonryBlock: At,
|
|
5417
|
+
AccordionBlock: It,
|
|
5418
|
+
NavbarBlock: Pt,
|
|
5419
|
+
ListBlock: $e,
|
|
5420
|
+
TextSpan: We,
|
|
5421
|
+
QuoteBlock: Qe,
|
|
5422
|
+
TextLink: nt,
|
|
5423
|
+
RichTextBlock: Xe,
|
|
5424
|
+
RichContentBlock: Xe,
|
|
5425
|
+
VideoBlock: at,
|
|
5426
|
+
YouTubeBlock: st,
|
|
5427
|
+
IframeBlock: ct,
|
|
5428
|
+
EmbedBlock: lt,
|
|
5429
|
+
FormBlock: Yt,
|
|
5430
|
+
FormLabel: en,
|
|
5431
|
+
FormInput: tn,
|
|
5432
|
+
FormTextarea: nn,
|
|
5433
|
+
FormCheckbox: (e) => /* @__PURE__ */ d(rn, {
|
|
5398
5434
|
kind: "checkbox",
|
|
5399
5435
|
...e
|
|
5400
5436
|
}),
|
|
5401
|
-
FormRadio: (e) => /* @__PURE__ */ d(
|
|
5437
|
+
FormRadio: (e) => /* @__PURE__ */ d(rn, {
|
|
5402
5438
|
kind: "radio",
|
|
5403
5439
|
...e
|
|
5404
5440
|
}),
|
|
5405
|
-
FormSelect:
|
|
5406
|
-
FormFile:
|
|
5407
|
-
FormRecaptcha:
|
|
5408
|
-
FormSubmit:
|
|
5409
|
-
},
|
|
5441
|
+
FormSelect: an,
|
|
5442
|
+
FormFile: on,
|
|
5443
|
+
FormRecaptcha: $t,
|
|
5444
|
+
FormSubmit: sn
|
|
5445
|
+
}, ir = {
|
|
5410
5446
|
id: "auth",
|
|
5411
5447
|
label: "Accounts",
|
|
5412
5448
|
category: "Apps",
|
|
5413
5449
|
keys: ["SiteLoginForm", "SiteAccountMenu"],
|
|
5414
5450
|
ssr: "shell",
|
|
5415
5451
|
settings: ["site.authRedirect"]
|
|
5416
|
-
},
|
|
5452
|
+
}, ar = n({
|
|
5417
5453
|
user: null,
|
|
5418
5454
|
status: "idle",
|
|
5419
5455
|
ensure: () => {},
|
|
5420
5456
|
refresh: () => {},
|
|
5421
5457
|
signOut: () => {}
|
|
5422
5458
|
});
|
|
5423
|
-
function
|
|
5459
|
+
function or(e, t) {
|
|
5424
5460
|
return t ? /^https?:\/\//i.test(t) ? t : `${e.replace(/\/+$/, "")}${t.startsWith("/") ? t : `/${t}`}` : "";
|
|
5425
5461
|
}
|
|
5426
|
-
function
|
|
5462
|
+
function sr(e) {
|
|
5427
5463
|
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
5464
|
return {
|
|
5429
5465
|
mode: n.mode === "custom" || n.mode === "off" ? n.mode : "system",
|
|
5430
5466
|
url: i,
|
|
5431
5467
|
mePath: a,
|
|
5432
5468
|
logoutPath: o,
|
|
5433
|
-
meUrl:
|
|
5434
|
-
logoutUrl:
|
|
5469
|
+
meUrl: or(i, a),
|
|
5470
|
+
logoutUrl: or(i, o),
|
|
5435
5471
|
loginPage: r(n.loginPage),
|
|
5436
5472
|
userPath: r(n.userPath),
|
|
5437
5473
|
auth: n.auth === "bearer" ? "bearer" : "cookies",
|
|
5438
5474
|
tokenKey: r(n.tokenKey) || "webim_session_token"
|
|
5439
5475
|
};
|
|
5440
5476
|
}
|
|
5441
|
-
function
|
|
5477
|
+
function cr(e, t) {
|
|
5442
5478
|
if (!t) return e ?? null;
|
|
5443
5479
|
let n = e;
|
|
5444
5480
|
for (let e of t.split(".")) {
|
|
@@ -5447,26 +5483,26 @@ function rr(e, t) {
|
|
|
5447
5483
|
}
|
|
5448
5484
|
return n ?? null;
|
|
5449
5485
|
}
|
|
5450
|
-
function
|
|
5486
|
+
function lr(e) {
|
|
5451
5487
|
try {
|
|
5452
5488
|
return window.localStorage.getItem(e) || "";
|
|
5453
5489
|
} catch {
|
|
5454
5490
|
return "";
|
|
5455
5491
|
}
|
|
5456
5492
|
}
|
|
5457
|
-
function
|
|
5493
|
+
function ur(e) {
|
|
5458
5494
|
try {
|
|
5459
5495
|
window.localStorage.removeItem(e);
|
|
5460
5496
|
} catch {}
|
|
5461
5497
|
}
|
|
5462
|
-
var
|
|
5463
|
-
let e = i(
|
|
5498
|
+
var dr = () => {
|
|
5499
|
+
let e = i(ar);
|
|
5464
5500
|
return a(() => {
|
|
5465
5501
|
e.ensure();
|
|
5466
5502
|
}, [e]), e;
|
|
5467
5503
|
};
|
|
5468
|
-
function
|
|
5469
|
-
let f = i(
|
|
5504
|
+
function fr({ children: e, initialUser: t, disabled: n, apiUrl: o, tenant: u }) {
|
|
5505
|
+
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
5506
|
...t,
|
|
5471
5507
|
credentials: "include",
|
|
5472
5508
|
headers: {
|
|
@@ -5478,9 +5514,9 @@ function sr({ children: e, initialUser: t, disabled: n, apiUrl: o, tenant: u })
|
|
|
5478
5514
|
if (n) return Promise.resolve(null);
|
|
5479
5515
|
if (h.mode === "off") return Promise.resolve(S(null));
|
|
5480
5516
|
if (h.mode === "custom") {
|
|
5481
|
-
let e = h.auth === "bearer" ?
|
|
5517
|
+
let e = h.auth === "bearer" ? lr(h.tokenKey) : "";
|
|
5482
5518
|
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 =
|
|
5519
|
+
let t = cr(e, h.userPath);
|
|
5484
5520
|
return S(t && typeof t == "object" ? t : null);
|
|
5485
5521
|
}).catch(() => S(null));
|
|
5486
5522
|
}
|
|
@@ -5493,12 +5529,12 @@ function sr({ children: e, initialUser: t, disabled: n, apiUrl: o, tenant: u })
|
|
|
5493
5529
|
]), w = r(() => {
|
|
5494
5530
|
if (h.mode === "off") return S(null), Promise.resolve();
|
|
5495
5531
|
if (h.mode === "custom") {
|
|
5496
|
-
let e = h.auth === "bearer" ?
|
|
5532
|
+
let e = h.auth === "bearer" ? lr(h.tokenKey) : "";
|
|
5497
5533
|
return (h.logoutUrl ? fetch(h.logoutUrl, {
|
|
5498
5534
|
method: "post",
|
|
5499
5535
|
...h.auth === "bearer" ? { headers: e ? { authorization: `Bearer ${e}` } : {} } : { credentials: "include" }
|
|
5500
5536
|
}).catch(() => {}) : Promise.resolve()).then(() => {
|
|
5501
|
-
h.auth === "bearer" &&
|
|
5537
|
+
h.auth === "bearer" && ur(h.tokenKey), S(null);
|
|
5502
5538
|
});
|
|
5503
5539
|
}
|
|
5504
5540
|
return x("/site/logout", { method: "post" }).catch(() => {}).then(() => {
|
|
@@ -5548,19 +5584,19 @@ function sr({ children: e, initialUser: t, disabled: n, apiUrl: o, tenant: u })
|
|
|
5548
5584
|
h.loginPage,
|
|
5549
5585
|
C,
|
|
5550
5586
|
w
|
|
5551
|
-
]), /* @__PURE__ */ d(
|
|
5587
|
+
]), /* @__PURE__ */ d(ar.Provider, {
|
|
5552
5588
|
value: E,
|
|
5553
5589
|
children: e
|
|
5554
5590
|
});
|
|
5555
5591
|
}
|
|
5556
|
-
function
|
|
5557
|
-
let { status: n } =
|
|
5592
|
+
function pr({ when: e, children: t }) {
|
|
5593
|
+
let { status: n } = dr();
|
|
5558
5594
|
return !e || e === "always" ? t : n === "idle" || n === "loading" ? null : e === "user" == (n === "user") ? t : null;
|
|
5559
5595
|
}
|
|
5560
5596
|
//#endregion
|
|
5561
5597
|
//#region ../ui/src/components/builder/apps/auth/views.jsx
|
|
5562
|
-
function
|
|
5563
|
-
let { tenant: h, apiUrl: g, settings: _ } = i(
|
|
5598
|
+
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 }) {
|
|
5599
|
+
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
5600
|
if (e.preventDefault(), u) return;
|
|
5565
5601
|
let n = new FormData(e.currentTarget);
|
|
5566
5602
|
C(!0), x("");
|
|
@@ -5608,20 +5644,20 @@ function lr({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
5608
5644
|
children: [
|
|
5609
5645
|
w ? /* @__PURE__ */ f("label", {
|
|
5610
5646
|
style: {
|
|
5611
|
-
...
|
|
5647
|
+
...Rt,
|
|
5612
5648
|
display: "grid",
|
|
5613
5649
|
gap: 6
|
|
5614
5650
|
},
|
|
5615
5651
|
children: [a, /* @__PURE__ */ d("input", {
|
|
5616
5652
|
name: "name",
|
|
5617
5653
|
type: "text",
|
|
5618
|
-
style:
|
|
5619
|
-
...
|
|
5654
|
+
style: zt,
|
|
5655
|
+
...Vt(u)
|
|
5620
5656
|
})]
|
|
5621
5657
|
}) : null,
|
|
5622
5658
|
/* @__PURE__ */ f("label", {
|
|
5623
5659
|
style: {
|
|
5624
|
-
...
|
|
5660
|
+
...Rt,
|
|
5625
5661
|
display: "grid",
|
|
5626
5662
|
gap: 6
|
|
5627
5663
|
},
|
|
@@ -5629,13 +5665,13 @@ function lr({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
5629
5665
|
name: "email",
|
|
5630
5666
|
type: "email",
|
|
5631
5667
|
required: !u,
|
|
5632
|
-
style:
|
|
5633
|
-
...
|
|
5668
|
+
style: zt,
|
|
5669
|
+
...Vt(u)
|
|
5634
5670
|
})]
|
|
5635
5671
|
}),
|
|
5636
5672
|
/* @__PURE__ */ f("label", {
|
|
5637
5673
|
style: {
|
|
5638
|
-
...
|
|
5674
|
+
...Rt,
|
|
5639
5675
|
display: "grid",
|
|
5640
5676
|
gap: 6
|
|
5641
5677
|
},
|
|
@@ -5643,15 +5679,15 @@ function lr({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
5643
5679
|
name: "password",
|
|
5644
5680
|
type: "password",
|
|
5645
5681
|
required: !u,
|
|
5646
|
-
style:
|
|
5647
|
-
...
|
|
5682
|
+
style: zt,
|
|
5683
|
+
...Vt(u)
|
|
5648
5684
|
})]
|
|
5649
5685
|
}),
|
|
5650
5686
|
/* @__PURE__ */ d("button", {
|
|
5651
5687
|
type: u ? "button" : "submit",
|
|
5652
5688
|
disabled: S || void 0,
|
|
5653
5689
|
style: {
|
|
5654
|
-
...
|
|
5690
|
+
...Me,
|
|
5655
5691
|
border: 0,
|
|
5656
5692
|
padding: "10px 22px",
|
|
5657
5693
|
borderRadius: 8,
|
|
@@ -5683,8 +5719,8 @@ function lr({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
5683
5719
|
]
|
|
5684
5720
|
});
|
|
5685
5721
|
}
|
|
5686
|
-
function
|
|
5687
|
-
let { user: c, status: l, signOut: u } =
|
|
5722
|
+
function hr({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !1, style: r, nodeRef: i, inert: a, linked: o, show: s }) {
|
|
5723
|
+
let { user: c, status: l, signOut: u } = dr(), p = a ? s || "user" : l, m = a ? {
|
|
5688
5724
|
name: "Ada Lovelace",
|
|
5689
5725
|
email: "ada@example.com"
|
|
5690
5726
|
} : c;
|
|
@@ -5705,7 +5741,7 @@ function ur({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
5705
5741
|
children: [
|
|
5706
5742
|
/* @__PURE__ */ f("span", {
|
|
5707
5743
|
style: {
|
|
5708
|
-
...
|
|
5744
|
+
...Rt,
|
|
5709
5745
|
fontWeight: 600
|
|
5710
5746
|
},
|
|
5711
5747
|
children: [
|
|
@@ -5716,7 +5752,7 @@ function ur({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
5716
5752
|
}),
|
|
5717
5753
|
n && m?.email ? /* @__PURE__ */ d("span", {
|
|
5718
5754
|
style: {
|
|
5719
|
-
...
|
|
5755
|
+
...Rt,
|
|
5720
5756
|
opacity: .7
|
|
5721
5757
|
},
|
|
5722
5758
|
children: m.email
|
|
@@ -5725,14 +5761,14 @@ function ur({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
5725
5761
|
type: "button",
|
|
5726
5762
|
onClick: a ? void 0 : u,
|
|
5727
5763
|
style: {
|
|
5728
|
-
...
|
|
5764
|
+
...Me,
|
|
5729
5765
|
border: 0,
|
|
5730
5766
|
padding: "8px 16px",
|
|
5731
5767
|
borderRadius: 8,
|
|
5732
5768
|
fontSize: 14,
|
|
5733
5769
|
cursor: a ? "default" : "pointer"
|
|
5734
5770
|
},
|
|
5735
|
-
...
|
|
5771
|
+
...Vt(a),
|
|
5736
5772
|
children: t
|
|
5737
5773
|
})
|
|
5738
5774
|
]
|
|
@@ -5749,40 +5785,40 @@ function ur({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
5749
5785
|
}
|
|
5750
5786
|
//#endregion
|
|
5751
5787
|
//#region ../ui/src/components/builder/apps/consent/manifest.js
|
|
5752
|
-
var
|
|
5788
|
+
var gr = {
|
|
5753
5789
|
id: "consent",
|
|
5754
5790
|
label: "Cookie consent",
|
|
5755
5791
|
category: "Apps",
|
|
5756
5792
|
keys: ["CookieConsent"],
|
|
5757
5793
|
ssr: "shell",
|
|
5758
5794
|
settings: []
|
|
5759
|
-
},
|
|
5760
|
-
function
|
|
5795
|
+
}, _r = "webim.cookie_consent";
|
|
5796
|
+
function vr() {
|
|
5761
5797
|
try {
|
|
5762
|
-
let e = window.localStorage.getItem(
|
|
5798
|
+
let e = window.localStorage.getItem(_r), t = e ? JSON.parse(e) : null;
|
|
5763
5799
|
return t?.choice === "accepted" || t?.choice === "declined" ? t.choice : "";
|
|
5764
5800
|
} catch {
|
|
5765
5801
|
return "";
|
|
5766
5802
|
}
|
|
5767
5803
|
}
|
|
5768
|
-
function
|
|
5804
|
+
function yr(e) {
|
|
5769
5805
|
try {
|
|
5770
5806
|
document.querySelectorAll(".webim-page").forEach((t) => t.setAttribute("data-webim-consent", e));
|
|
5771
5807
|
} catch {}
|
|
5772
5808
|
}
|
|
5773
|
-
function
|
|
5809
|
+
function br(e) {
|
|
5774
5810
|
try {
|
|
5775
|
-
window.localStorage.setItem(
|
|
5811
|
+
window.localStorage.setItem(_r, JSON.stringify({
|
|
5776
5812
|
choice: e,
|
|
5777
5813
|
at: (/* @__PURE__ */ new Date()).toISOString()
|
|
5778
5814
|
}));
|
|
5779
5815
|
} catch {}
|
|
5780
|
-
|
|
5816
|
+
yr(e);
|
|
5781
5817
|
try {
|
|
5782
5818
|
window.dispatchEvent(new CustomEvent("webim:consent", { detail: { choice: e } }));
|
|
5783
5819
|
} catch {}
|
|
5784
5820
|
}
|
|
5785
|
-
var
|
|
5821
|
+
var xr = {
|
|
5786
5822
|
bottom: {
|
|
5787
5823
|
left: 0,
|
|
5788
5824
|
right: 0,
|
|
@@ -5804,18 +5840,18 @@ var gr = {
|
|
|
5804
5840
|
maxWidth: 400
|
|
5805
5841
|
}
|
|
5806
5842
|
};
|
|
5807
|
-
function
|
|
5843
|
+
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
5844
|
let [g, _] = l(!!h), [v, y] = l(null), b = (e) => {
|
|
5809
5845
|
y(e), typeof m == "function" && m(e);
|
|
5810
5846
|
};
|
|
5811
5847
|
if (a(() => {
|
|
5812
5848
|
if (h) return;
|
|
5813
|
-
let e =
|
|
5814
|
-
e ?
|
|
5849
|
+
let e = vr();
|
|
5850
|
+
e ? yr(e) : _(!0);
|
|
5815
5851
|
}, [h, v]), !g) return null;
|
|
5816
5852
|
let x = (e) => () => {
|
|
5817
|
-
h || (
|
|
5818
|
-
}, S =
|
|
5853
|
+
h || (br(e), _(!1));
|
|
5854
|
+
}, S = xr[s] ?? xr.bottom, C = {
|
|
5819
5855
|
appearance: "none",
|
|
5820
5856
|
font: "inherit",
|
|
5821
5857
|
fontSize: 14,
|
|
@@ -5895,37 +5931,37 @@ function _r({ message: e, acceptLabel: t, rejectLabel: n, showReject: r, linkLab
|
|
|
5895
5931
|
}
|
|
5896
5932
|
//#endregion
|
|
5897
5933
|
//#region ../ui/src/components/builder/apps/language/manifest.js
|
|
5898
|
-
var
|
|
5934
|
+
var Cr = {
|
|
5899
5935
|
id: "language",
|
|
5900
5936
|
label: "Language",
|
|
5901
5937
|
category: "Apps",
|
|
5902
5938
|
keys: ["SiteLanguagePicker"],
|
|
5903
5939
|
ssr: "prefetch",
|
|
5904
5940
|
settings: ["locales"]
|
|
5905
|
-
},
|
|
5941
|
+
}, wr = {
|
|
5906
5942
|
id: "search",
|
|
5907
5943
|
label: "Search",
|
|
5908
5944
|
category: "Apps",
|
|
5909
5945
|
keys: ["SiteSearch"],
|
|
5910
5946
|
ssr: "prefetch",
|
|
5911
5947
|
settings: []
|
|
5912
|
-
},
|
|
5913
|
-
function
|
|
5948
|
+
}, Tr = 50, Er = 2e3;
|
|
5949
|
+
function Dr() {
|
|
5914
5950
|
return typeof window > "u" ? "" : new URLSearchParams(window.location.search).get("q") ?? "";
|
|
5915
5951
|
}
|
|
5916
|
-
function
|
|
5952
|
+
function Or(e, t) {
|
|
5917
5953
|
let n = e?.data ?? {}, r = [];
|
|
5918
5954
|
for (let e of Object.values(n)) {
|
|
5919
|
-
let t = e == null ? "" :
|
|
5920
|
-
if (t && r.push(t), r.join(" ").length >
|
|
5955
|
+
let t = e == null ? "" : Ee(e);
|
|
5956
|
+
if (t && r.push(t), r.join(" ").length > Er) break;
|
|
5921
5957
|
}
|
|
5922
|
-
return r.join(" ").slice(0,
|
|
5958
|
+
return r.join(" ").slice(0, Er).toLocaleLowerCase(t || void 0);
|
|
5923
5959
|
}
|
|
5924
|
-
function
|
|
5925
|
-
let { tenant: b, apiUrl: x, locale: S } = i(
|
|
5960
|
+
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 }) {
|
|
5961
|
+
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
5962
|
a(() => {
|
|
5927
5963
|
let e = () => {
|
|
5928
|
-
let e =
|
|
5964
|
+
let e = Dr();
|
|
5929
5965
|
w(e), E(e);
|
|
5930
5966
|
};
|
|
5931
5967
|
return window.addEventListener("popstate", e), window.addEventListener("webim:urlchange", e), () => {
|
|
@@ -5976,8 +6012,8 @@ function wr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButto
|
|
|
5976
6012
|
});
|
|
5977
6013
|
}
|
|
5978
6014
|
else for (let t of e.rows) {
|
|
5979
|
-
if (!
|
|
5980
|
-
let n = t?.data ?? {}, r =
|
|
6015
|
+
if (!Or(t, S).includes(N)) continue;
|
|
6016
|
+
let n = t?.data ?? {}, r = Ee(n.name) || "Untitled", i = Ee(n.slug);
|
|
5981
6017
|
F.push({
|
|
5982
6018
|
key: `entry:${t.id}`,
|
|
5983
6019
|
title: r,
|
|
@@ -5985,7 +6021,7 @@ function wr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButto
|
|
|
5985
6021
|
kind: "entry"
|
|
5986
6022
|
});
|
|
5987
6023
|
}
|
|
5988
|
-
let I = F.slice(0, Math.min(Math.max(1, p),
|
|
6024
|
+
let I = F.slice(0, Math.min(Math.max(1, p), Tr)), L = (e) => {
|
|
5989
6025
|
if (v) {
|
|
5990
6026
|
e.preventDefault(), w(T), A(!0);
|
|
5991
6027
|
return;
|
|
@@ -6006,7 +6042,7 @@ function wr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButto
|
|
|
6006
6042
|
title: "Spring collection",
|
|
6007
6043
|
url: "/blog/spring",
|
|
6008
6044
|
kind: "entry"
|
|
6009
|
-
}] : null, z = R ?? I, B = !R && N && D && !I.length,
|
|
6045
|
+
}] : 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
6046
|
style: {
|
|
6011
6047
|
listStyle: "none",
|
|
6012
6048
|
margin: 0,
|
|
@@ -6067,7 +6103,7 @@ function wr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButto
|
|
|
6067
6103
|
onChange: (e) => E(e.target.value),
|
|
6068
6104
|
onFocus: () => N && A(!0),
|
|
6069
6105
|
style: {
|
|
6070
|
-
...
|
|
6106
|
+
...zt,
|
|
6071
6107
|
flexGrow: 1,
|
|
6072
6108
|
minWidth: 0
|
|
6073
6109
|
}
|
|
@@ -6094,7 +6130,7 @@ function wr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButto
|
|
|
6094
6130
|
},
|
|
6095
6131
|
children: h
|
|
6096
6132
|
}),
|
|
6097
|
-
|
|
6133
|
+
V && /* @__PURE__ */ f("div", {
|
|
6098
6134
|
style: M ? {
|
|
6099
6135
|
position: "absolute",
|
|
6100
6136
|
top: "100%",
|
|
@@ -6110,7 +6146,7 @@ function wr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButto
|
|
|
6110
6146
|
background: "var(--page-surface, #f2f2f2)",
|
|
6111
6147
|
boxShadow: "0 12px 32px rgba(15, 23, 42, 0.18)"
|
|
6112
6148
|
} : { marginTop: 14 },
|
|
6113
|
-
children: [
|
|
6149
|
+
children: [H, B && /* @__PURE__ */ d("div", {
|
|
6114
6150
|
style: {
|
|
6115
6151
|
fontSize: 14,
|
|
6116
6152
|
opacity: .65,
|
|
@@ -6125,21 +6161,21 @@ function wr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButto
|
|
|
6125
6161
|
}
|
|
6126
6162
|
//#endregion
|
|
6127
6163
|
//#region ../ui/src/components/builder/apps/language/views.jsx
|
|
6128
|
-
function
|
|
6164
|
+
function Ar(e) {
|
|
6129
6165
|
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
6166
|
return [...new Set(n.map((e) => e.trim()))];
|
|
6131
6167
|
}
|
|
6132
|
-
var
|
|
6133
|
-
function
|
|
6168
|
+
var jr = (e) => e && e.charAt(0).toUpperCase() + e.slice(1);
|
|
6169
|
+
function Mr(e, t) {
|
|
6134
6170
|
let n = String(e ?? "").toUpperCase();
|
|
6135
6171
|
if (t === "code") return n;
|
|
6136
6172
|
let r = "";
|
|
6137
6173
|
try {
|
|
6138
|
-
r =
|
|
6174
|
+
r = jr(new Intl.DisplayNames([e], { type: "language" }).of(e) ?? "");
|
|
6139
6175
|
} catch {}
|
|
6140
6176
|
return !r || r.toUpperCase() === n ? n : t === "both" ? `${n} — ${r}` : r;
|
|
6141
6177
|
}
|
|
6142
|
-
function
|
|
6178
|
+
function Nr(e, t) {
|
|
6143
6179
|
let n = t ? "" : `?locale=${encodeURIComponent(e)}`;
|
|
6144
6180
|
if (typeof window > "u") return n || "?";
|
|
6145
6181
|
try {
|
|
@@ -6149,8 +6185,8 @@ function Or(e, t) {
|
|
|
6149
6185
|
return n || "/";
|
|
6150
6186
|
}
|
|
6151
6187
|
}
|
|
6152
|
-
function
|
|
6153
|
-
let c = i(
|
|
6188
|
+
function Pr({ variant: e, display: t, separator: n, label: r, style: a, nodeRef: o, inert: s }) {
|
|
6189
|
+
let c = i(Y), l = Ar(c?.settings), u = l[0] ?? "", p = l.includes(c?.locale) ? c.locale : u, m = {
|
|
6154
6190
|
display: "inline-flex",
|
|
6155
6191
|
alignItems: "center",
|
|
6156
6192
|
gap: 8,
|
|
@@ -6185,7 +6221,7 @@ function kr({ variant: e, display: t, separator: n, label: r, style: a, nodeRef:
|
|
|
6185
6221
|
style: { opacity: .4 },
|
|
6186
6222
|
children: n ?? "·"
|
|
6187
6223
|
}), /* @__PURE__ */ d("a", {
|
|
6188
|
-
href:
|
|
6224
|
+
href: Nr(e, e === u),
|
|
6189
6225
|
hrefLang: e,
|
|
6190
6226
|
"aria-current": e === p ? "true" : void 0,
|
|
6191
6227
|
onClick: s ? (e) => e.preventDefault() : void 0,
|
|
@@ -6195,7 +6231,7 @@ function kr({ variant: e, display: t, separator: n, label: r, style: a, nodeRef:
|
|
|
6195
6231
|
textDecoration: "none",
|
|
6196
6232
|
cursor: s ? "default" : "pointer"
|
|
6197
6233
|
},
|
|
6198
|
-
children:
|
|
6234
|
+
children: Mr(e, t)
|
|
6199
6235
|
})]
|
|
6200
6236
|
}, e))]
|
|
6201
6237
|
}) : /* @__PURE__ */ f("div", {
|
|
@@ -6206,7 +6242,7 @@ function kr({ variant: e, display: t, separator: n, label: r, style: a, nodeRef:
|
|
|
6206
6242
|
value: p,
|
|
6207
6243
|
onChange: s ? void 0 : (e) => {
|
|
6208
6244
|
let t = e.target.value;
|
|
6209
|
-
window.location.assign(
|
|
6245
|
+
window.location.assign(Nr(t, t === u));
|
|
6210
6246
|
},
|
|
6211
6247
|
onKeyDown: s ? (e) => e.preventDefault() : void 0,
|
|
6212
6248
|
style: {
|
|
@@ -6220,57 +6256,717 @@ function kr({ variant: e, display: t, separator: n, label: r, style: a, nodeRef:
|
|
|
6220
6256
|
},
|
|
6221
6257
|
children: l.map((e) => /* @__PURE__ */ d("option", {
|
|
6222
6258
|
value: e,
|
|
6223
|
-
children:
|
|
6259
|
+
children: Mr(e, t)
|
|
6224
6260
|
}, e))
|
|
6225
6261
|
})]
|
|
6226
6262
|
});
|
|
6227
6263
|
}
|
|
6228
6264
|
//#endregion
|
|
6229
6265
|
//#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:
|
|
6266
|
+
var Fr = [
|
|
6267
|
+
ir,
|
|
6268
|
+
Cr,
|
|
6269
|
+
gr,
|
|
6270
|
+
wr
|
|
6271
|
+
], Ir = {
|
|
6272
|
+
SiteLoginForm: mr,
|
|
6273
|
+
SiteAccountMenu: hr,
|
|
6274
|
+
SiteLanguagePicker: Pr,
|
|
6275
|
+
CookieConsent: Sr,
|
|
6276
|
+
SiteSearch: kr
|
|
6241
6277
|
};
|
|
6242
|
-
new Set(
|
|
6278
|
+
new Set(Fr.filter((e) => e.ssr === "shell").flatMap((e) => e.keys));
|
|
6279
|
+
//#endregion
|
|
6280
|
+
//#region ../ui/src/components/builder/three/runtime.js
|
|
6281
|
+
var Lr = "0.185.1", Rr = "4.2.0", zr = "https://cdn.jsdelivr.net/npm", Br = `${zr}/three@${Lr}/+esm`, Vr = `${zr}/@google/model-viewer@${Rr}/dist/model-viewer.min.js`, Hr = (e) => import(
|
|
6282
|
+
/* @vite-ignore */
|
|
6283
|
+
/* webpackIgnore: true */
|
|
6284
|
+
e
|
|
6285
|
+
), Ur = /* @__PURE__ */ new Map();
|
|
6286
|
+
function Wr(e) {
|
|
6287
|
+
if (Ur.has(e)) return Ur.get(e);
|
|
6288
|
+
if (typeof window > "u") return new Promise(() => {});
|
|
6289
|
+
let t = Hr(e).catch((t) => {
|
|
6290
|
+
throw Ur.delete(e), t;
|
|
6291
|
+
});
|
|
6292
|
+
return Ur.set(e, t), t;
|
|
6293
|
+
}
|
|
6294
|
+
var Gr = () => Wr(Br), Kr = (e) => Wr(`${zr}/three@${Lr}/examples/jsm/${e}/+esm`);
|
|
6295
|
+
function qr() {
|
|
6296
|
+
return typeof window < "u" && window.customElements?.get("model-viewer") ? Promise.resolve(null) : Wr(Vr);
|
|
6297
|
+
}
|
|
6298
|
+
var Jr = () => typeof window < "u" && !!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches, Yr = (e = 2) => Math.min(typeof window > "u" ? 1 : window.devicePixelRatio || 1, e);
|
|
6299
|
+
function Xr(e, t) {
|
|
6300
|
+
let n = 0, r = 0, i = 0, a = !0, o = (e) => {
|
|
6301
|
+
n = requestAnimationFrame(o), i ||= e;
|
|
6302
|
+
let a = r ? (e - r) / 1e3 : 0;
|
|
6303
|
+
r = e, t(a, (e - i) / 1e3);
|
|
6304
|
+
}, s = () => {
|
|
6305
|
+
n && cancelAnimationFrame(n), n = 0, r = 0;
|
|
6306
|
+
}, c = () => {
|
|
6307
|
+
let e = a && document.visibilityState !== "hidden";
|
|
6308
|
+
e && !n ? n = requestAnimationFrame(o) : !e && n && s();
|
|
6309
|
+
};
|
|
6310
|
+
t(0, 0);
|
|
6311
|
+
let l = typeof IntersectionObserver > "u" ? null : new IntersectionObserver((e) => {
|
|
6312
|
+
a = e.some((e) => e.isIntersecting), c();
|
|
6313
|
+
}, { rootMargin: "120px" });
|
|
6314
|
+
return l && e && l.observe(e), document.addEventListener("visibilitychange", c), c(), () => {
|
|
6315
|
+
s(), l?.disconnect(), document.removeEventListener("visibilitychange", c);
|
|
6316
|
+
};
|
|
6317
|
+
}
|
|
6318
|
+
function Zr(e, t, n = {}) {
|
|
6319
|
+
let r = {
|
|
6320
|
+
radius: n.distance ?? 4,
|
|
6321
|
+
polar: n.polar ?? Math.PI / 2.4,
|
|
6322
|
+
azimuth: n.azimuth ?? .6,
|
|
6323
|
+
target: n.target ?? {
|
|
6324
|
+
x: 0,
|
|
6325
|
+
y: 0,
|
|
6326
|
+
z: 0
|
|
6327
|
+
}
|
|
6328
|
+
}, i = { ...r }, a = n.minDistance ?? .4, o = n.maxDistance ?? 200, s = n.damping ?? .12, c = .05, l = null, u = (e) => {
|
|
6329
|
+
e.button !== void 0 && e.button !== 0 || (l = {
|
|
6330
|
+
x: e.clientX,
|
|
6331
|
+
y: e.clientY,
|
|
6332
|
+
id: e.pointerId
|
|
6333
|
+
}, t.setPointerCapture?.(e.pointerId));
|
|
6334
|
+
}, d = (e) => {
|
|
6335
|
+
if (!l || e.pointerId !== l.id) return;
|
|
6336
|
+
let t = e.clientX - l.x, n = e.clientY - l.y;
|
|
6337
|
+
l = {
|
|
6338
|
+
...l,
|
|
6339
|
+
x: e.clientX,
|
|
6340
|
+
y: e.clientY
|
|
6341
|
+
}, i.azimuth -= t * .006, i.polar = Math.max(c, Math.min(Math.PI - c, i.polar - n * .006)), e.preventDefault();
|
|
6342
|
+
}, f = (e) => {
|
|
6343
|
+
l && e.pointerId === l.id && t.releasePointerCapture?.(e.pointerId), l = null;
|
|
6344
|
+
}, p = (e) => {
|
|
6345
|
+
n.enableZoom !== !1 && (e.preventDefault(), i.radius = Math.max(a, Math.min(o, i.radius * (1 + Math.sign(e.deltaY) * .12))));
|
|
6346
|
+
};
|
|
6347
|
+
return t.addEventListener("pointerdown", u), t.addEventListener("pointermove", d), t.addEventListener("pointerup", f), t.addEventListener("pointercancel", f), t.addEventListener("wheel", p, { passive: !1 }), {
|
|
6348
|
+
update: () => {
|
|
6349
|
+
r.radius += (i.radius - r.radius) * s, r.polar += (i.polar - r.polar) * s, r.azimuth += (i.azimuth - r.azimuth) * s;
|
|
6350
|
+
let t = Math.sin(r.polar);
|
|
6351
|
+
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);
|
|
6352
|
+
},
|
|
6353
|
+
dragging: () => !!l,
|
|
6354
|
+
autoSpin: (e, t) => {
|
|
6355
|
+
!l && e && (i.azimuth += e * t);
|
|
6356
|
+
},
|
|
6357
|
+
frame: (e, t) => {
|
|
6358
|
+
i.radius = Math.max(a, Math.min(o, e)), r.radius = i.radius, t && (r.target = { ...t }, i.target = { ...t });
|
|
6359
|
+
},
|
|
6360
|
+
dispose: () => {
|
|
6361
|
+
t.removeEventListener("pointerdown", u), t.removeEventListener("pointermove", d), t.removeEventListener("pointerup", f), t.removeEventListener("pointercancel", f), t.removeEventListener("wheel", p);
|
|
6362
|
+
}
|
|
6363
|
+
};
|
|
6364
|
+
}
|
|
6243
6365
|
//#endregion
|
|
6244
|
-
//#region ../ui/src/components/builder/
|
|
6245
|
-
var
|
|
6246
|
-
function
|
|
6247
|
-
|
|
6366
|
+
//#region ../ui/src/components/builder/three/views.jsx
|
|
6367
|
+
var Qr = (e, t) => Number.isFinite(Number(e)) && Number(e) > 0 ? Number(e) : t, $r = (e, t) => (Number.isFinite(Number(e)) ? Number(e) : t) / 100, ei = (e) => (Number.isFinite(Number(e)) ? Number(e) : 0) * Math.PI / 180, ti = (e) => typeof e == "string" && !!e.trim();
|
|
6368
|
+
function ni({ label: e, note: t, height: n, nodeRef: r, style: i }) {
|
|
6369
|
+
return /* @__PURE__ */ f("div", {
|
|
6370
|
+
ref: r,
|
|
6371
|
+
style: {
|
|
6372
|
+
...P(i),
|
|
6373
|
+
minHeight: Qr(n, 320),
|
|
6374
|
+
display: "flex",
|
|
6375
|
+
flexDirection: "column",
|
|
6376
|
+
alignItems: "center",
|
|
6377
|
+
justifyContent: "center",
|
|
6378
|
+
gap: 6,
|
|
6379
|
+
border: "1px dashed rgba(148,163,184,.55)",
|
|
6380
|
+
borderRadius: 10,
|
|
6381
|
+
background: "rgba(148,163,184,.08)",
|
|
6382
|
+
...ce,
|
|
6383
|
+
color: "rgba(100,116,139,.95)",
|
|
6384
|
+
fontSize: 13,
|
|
6385
|
+
textAlign: "center",
|
|
6386
|
+
padding: 16
|
|
6387
|
+
},
|
|
6388
|
+
children: [/* @__PURE__ */ d("div", {
|
|
6389
|
+
style: { fontWeight: 600 },
|
|
6390
|
+
children: e
|
|
6391
|
+
}), t ? /* @__PURE__ */ d("div", {
|
|
6392
|
+
style: {
|
|
6393
|
+
fontSize: 11,
|
|
6394
|
+
opacity: .8,
|
|
6395
|
+
maxWidth: 320
|
|
6396
|
+
},
|
|
6397
|
+
children: t
|
|
6398
|
+
}) : null]
|
|
6399
|
+
});
|
|
6400
|
+
}
|
|
6401
|
+
function ri({ 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 }) {
|
|
6402
|
+
let [y, b] = l(typeof window < "u" && !!window.customElements?.get("model-viewer")), [x, S] = l(!1);
|
|
6403
|
+
a(() => {
|
|
6404
|
+
if (y || !e) return;
|
|
6405
|
+
let t = !0;
|
|
6406
|
+
return qr().then(() => t && b(!0), () => t && S(!0)), () => {
|
|
6407
|
+
t = !1;
|
|
6408
|
+
};
|
|
6409
|
+
}, [y, e]);
|
|
6410
|
+
let C = {
|
|
6411
|
+
display: "block",
|
|
6412
|
+
width: "100%",
|
|
6413
|
+
minHeight: Qr(r, 360),
|
|
6414
|
+
height: Qr(r, 360),
|
|
6415
|
+
backgroundColor: i || "transparent",
|
|
6416
|
+
...P(g)
|
|
6417
|
+
};
|
|
6418
|
+
if (!e) return v ? /* @__PURE__ */ d(ni, {
|
|
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 && !Jr()),
|
|
6454
|
+
"auto-rotate-delay": T ? String(Qr(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($r(p, 100)),
|
|
6459
|
+
exposure: String($r(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 ii = ["attribute vec2 p;", "void main() { gl_Position = vec4(p, 0.0, 1.0); }"].join("\n"), ai = [
|
|
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"), oi = {
|
|
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 si(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 ci(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 li({ 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 = c(null), [b, x] = l("");
|
|
6572
|
+
a(() => () => {
|
|
6573
|
+
let e = y.current;
|
|
6574
|
+
y.current = null, e?.getExtension("WEBGL_lose_context")?.loseContext();
|
|
6575
|
+
}, []);
|
|
6576
|
+
let S = typeof t == "string" && t.trim() ? t : oi[e] ?? oi.gradient, C = String(n ?? ""), w = String(r ?? ""), T = String(i ?? ""), E = $r(o, 100), D = Math.max(.05, $r(s, 100));
|
|
6577
|
+
return a(() => {
|
|
6578
|
+
let e = _.current, t = v.current;
|
|
6579
|
+
if (!e || !t) return;
|
|
6580
|
+
let n = y.current ??= e.getContext("webgl", {
|
|
6581
|
+
antialias: !0,
|
|
6582
|
+
alpha: !0,
|
|
6583
|
+
premultipliedAlpha: !1
|
|
6584
|
+
});
|
|
6585
|
+
if (!n) {
|
|
6586
|
+
x("WebGL is not available in this browser");
|
|
6587
|
+
return;
|
|
6588
|
+
}
|
|
6589
|
+
let r = null;
|
|
6590
|
+
try {
|
|
6591
|
+
let e = ci(n, n.VERTEX_SHADER, ii), t = ci(n, n.FRAGMENT_SHADER, ai + S);
|
|
6592
|
+
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");
|
|
6593
|
+
x("");
|
|
6594
|
+
} catch (e) {
|
|
6595
|
+
x(e?.message || "Shader failed to compile");
|
|
6596
|
+
return;
|
|
6597
|
+
}
|
|
6598
|
+
n.useProgram(r);
|
|
6599
|
+
let i = n.createBuffer();
|
|
6600
|
+
n.bindBuffer(n.ARRAY_BUFFER, i), n.bufferData(n.ARRAY_BUFFER, new Float32Array([
|
|
6601
|
+
-1,
|
|
6602
|
+
-1,
|
|
6603
|
+
3,
|
|
6604
|
+
-1,
|
|
6605
|
+
-1,
|
|
6606
|
+
3
|
|
6607
|
+
]), n.STATIC_DRAW);
|
|
6608
|
+
let a = n.getAttribLocation(r, "p");
|
|
6609
|
+
n.enableVertexAttribArray(a), n.vertexAttribPointer(a, 2, n.FLOAT, !1, 0, 0);
|
|
6610
|
+
let o = (e) => n.getUniformLocation(r, e), s = {
|
|
6611
|
+
res: o("u_res"),
|
|
6612
|
+
time: o("u_time"),
|
|
6613
|
+
mouse: o("u_mouse"),
|
|
6614
|
+
a: o("u_a"),
|
|
6615
|
+
b: o("u_b"),
|
|
6616
|
+
c: o("u_c"),
|
|
6617
|
+
scale: o("u_scale")
|
|
6618
|
+
}, c = {
|
|
6619
|
+
x: 0,
|
|
6620
|
+
y: 0
|
|
6621
|
+
}, l = (t) => {
|
|
6622
|
+
let n = e.getBoundingClientRect();
|
|
6623
|
+
!n.width || !n.height || (c.x = ((t.clientX - n.left) / n.width - .5) * 2, c.y = (.5 - (t.clientY - n.top) / n.height) * 2);
|
|
6624
|
+
};
|
|
6625
|
+
p !== !1 && t.addEventListener("pointermove", l);
|
|
6626
|
+
let u = () => {
|
|
6627
|
+
let r = Yr(), i = Math.max(1, Math.round(t.clientWidth * r)), a = Math.max(1, Math.round(t.clientHeight * r));
|
|
6628
|
+
(e.width !== i || e.height !== a) && (e.width = i, e.height = a, n.viewport(0, 0, i, a));
|
|
6629
|
+
}, d = typeof ResizeObserver > "u" ? null : new ResizeObserver(u);
|
|
6630
|
+
d?.observe(t), u();
|
|
6631
|
+
let f = Jr(), m = {
|
|
6632
|
+
a: si(C, [
|
|
6633
|
+
.35,
|
|
6634
|
+
.4,
|
|
6635
|
+
.95
|
|
6636
|
+
]),
|
|
6637
|
+
b: si(w, [
|
|
6638
|
+
.05,
|
|
6639
|
+
.06,
|
|
6640
|
+
.16
|
|
6641
|
+
]),
|
|
6642
|
+
c: si(T, [
|
|
6643
|
+
.95,
|
|
6644
|
+
.35,
|
|
6645
|
+
.6
|
|
6646
|
+
])
|
|
6647
|
+
}, h = {};
|
|
6648
|
+
return h.stop = Xr(t, (t, r) => {
|
|
6649
|
+
u(), n.uniform2f(s.res, e.width, e.height), n.uniform1f(s.time, (f ? 0 : r) * E), 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, D), n.drawArrays(n.TRIANGLES, 0, 3), f && h.stop?.();
|
|
6650
|
+
}), () => {
|
|
6651
|
+
h.stop?.(), d?.disconnect(), t.removeEventListener("pointermove", l), n.deleteProgram(r), n.deleteBuffer(i);
|
|
6652
|
+
};
|
|
6653
|
+
}, [
|
|
6654
|
+
S,
|
|
6655
|
+
C,
|
|
6656
|
+
w,
|
|
6657
|
+
T,
|
|
6658
|
+
E,
|
|
6659
|
+
D,
|
|
6660
|
+
p
|
|
6661
|
+
]), /* @__PURE__ */ f("div", {
|
|
6662
|
+
ref: (e) => {
|
|
6663
|
+
v.current = e, typeof h == "function" && h(e);
|
|
6664
|
+
},
|
|
6665
|
+
style: {
|
|
6666
|
+
position: "relative",
|
|
6667
|
+
minHeight: Qr(u, 320),
|
|
6668
|
+
overflow: "hidden",
|
|
6669
|
+
...P(m)
|
|
6670
|
+
},
|
|
6671
|
+
children: [/* @__PURE__ */ d("canvas", {
|
|
6672
|
+
ref: _,
|
|
6673
|
+
style: {
|
|
6674
|
+
display: "block",
|
|
6675
|
+
width: "100%",
|
|
6676
|
+
height: "100%",
|
|
6677
|
+
position: "absolute",
|
|
6678
|
+
inset: 0
|
|
6679
|
+
}
|
|
6680
|
+
}), b && g ? /* @__PURE__ */ d("div", {
|
|
6681
|
+
style: {
|
|
6682
|
+
position: "absolute",
|
|
6683
|
+
inset: 0,
|
|
6684
|
+
display: "flex",
|
|
6685
|
+
alignItems: "center",
|
|
6686
|
+
justifyContent: "center",
|
|
6687
|
+
padding: 12,
|
|
6688
|
+
background: "rgba(15,23,42,.75)",
|
|
6689
|
+
...ce,
|
|
6690
|
+
color: "#fecaca",
|
|
6691
|
+
fontSize: 11,
|
|
6692
|
+
whiteSpace: "pre-wrap",
|
|
6693
|
+
overflow: "auto"
|
|
6694
|
+
},
|
|
6695
|
+
children: b
|
|
6696
|
+
}) : null]
|
|
6697
|
+
});
|
|
6698
|
+
}
|
|
6699
|
+
function ui(e, t) {
|
|
6700
|
+
let n = new e.Scene(), r = new e.BoxGeometry();
|
|
6701
|
+
r.deleteAttribute("uv");
|
|
6702
|
+
let i = new e.Mesh(r, new e.MeshBasicMaterial({
|
|
6703
|
+
side: e.BackSide,
|
|
6704
|
+
color: 6710886
|
|
6705
|
+
}));
|
|
6706
|
+
i.scale.setScalar(12), n.add(i);
|
|
6707
|
+
let a = (t, i, a, o, s, c, l, u) => {
|
|
6708
|
+
let d = new e.Mesh(r, new e.MeshBasicMaterial());
|
|
6709
|
+
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);
|
|
6710
|
+
};
|
|
6711
|
+
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);
|
|
6712
|
+
let o = new e.PMREMGenerator(t), s = o.fromScene(n, .04);
|
|
6713
|
+
return o.dispose(), r.dispose(), n.traverse((e) => e.material?.dispose?.()), s.texture;
|
|
6714
|
+
}
|
|
6715
|
+
var di = /* @__PURE__ */ new Map();
|
|
6716
|
+
function fi(e) {
|
|
6717
|
+
if (di.has(e)) return di.get(e);
|
|
6718
|
+
let t = Kr("loaders/GLTFLoader.js").then((t) => new Promise((n, r) => {
|
|
6719
|
+
new t.GLTFLoader().load(e, (e) => n(e.scene), void 0, r);
|
|
6720
|
+
})).catch((t) => {
|
|
6721
|
+
throw di.delete(e), t;
|
|
6722
|
+
});
|
|
6723
|
+
return di.set(e, t), t;
|
|
6724
|
+
}
|
|
6725
|
+
function pi(e, t) {
|
|
6726
|
+
let n = new e.Box3().setFromObject(t);
|
|
6727
|
+
if (n.isEmpty()) return t;
|
|
6728
|
+
let r = n.getSize(new e.Vector3()), i = n.getCenter(new e.Vector3()), a = Math.max(r.x, r.y, r.z) || 1, o = new e.Group();
|
|
6729
|
+
return t.position.sub(i), t.scale.multiplyScalar(1 / a), t.position.multiplyScalar(1 / a), o.add(t), o;
|
|
6730
|
+
}
|
|
6731
|
+
var mi = {
|
|
6732
|
+
box: (e) => new e.BoxGeometry(1, 1, 1, 1, 1, 1),
|
|
6733
|
+
sphere: (e) => new e.SphereGeometry(.62, 48, 32),
|
|
6734
|
+
torus: (e) => new e.TorusGeometry(.5, .2, 24, 64),
|
|
6735
|
+
knot: (e) => new e.TorusKnotGeometry(.44, .15, 128, 24),
|
|
6736
|
+
cone: (e) => new e.ConeGeometry(.55, 1.1, 48),
|
|
6737
|
+
cylinder: (e) => new e.CylinderGeometry(.45, .45, 1.1, 48),
|
|
6738
|
+
plane: (e) => new e.PlaneGeometry(1.4, 1.4),
|
|
6739
|
+
capsule: (e) => new e.CapsuleGeometry(.35, .6, 8, 32)
|
|
6740
|
+
}, hi = (e, t) => Number.isFinite(Number(e)) ? Number(e) : t;
|
|
6741
|
+
function gi({ objects: e, background: t, cameraDistance: n, fov: r, autoRotate: i, spinSpeed: o, controls: s, ground: u, height: f, style: p, nodeRef: m, inert: h }) {
|
|
6742
|
+
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 && !Jr(), S = s !== !1 && !h;
|
|
6743
|
+
return a(() => {
|
|
6744
|
+
let e = g.current;
|
|
6745
|
+
if (!e) return;
|
|
6746
|
+
let i = !0, a = null;
|
|
6747
|
+
return Gr().then((s) => {
|
|
6748
|
+
if (!i || !e) return;
|
|
6749
|
+
let c = new s.WebGLRenderer({
|
|
6750
|
+
antialias: !0,
|
|
6751
|
+
alpha: !t
|
|
6752
|
+
});
|
|
6753
|
+
c.setPixelRatio(Yr()), 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);
|
|
6754
|
+
let l = new s.Scene();
|
|
6755
|
+
t && (l.background = new s.Color(t)), l.environment = ui(s, c);
|
|
6756
|
+
let d = new s.PerspectiveCamera(hi(r, 45), 1, .1, 400), f = Zr(d, c.domElement, {
|
|
6757
|
+
distance: hi(n, 5),
|
|
6758
|
+
enableZoom: S
|
|
6759
|
+
}), p = new s.DirectionalLight(16777215, 2.2);
|
|
6760
|
+
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));
|
|
6761
|
+
let m = [], h = new s.Group(), g = (e, t) => {
|
|
6762
|
+
let n = hi(t.scale, 1);
|
|
6763
|
+
e.position.set(hi(t.x, 0), hi(t.y, 0), hi(t.z, 0)), e.rotation.set(ei(t.rx), ei(t.ry), ei(t.rz)), e.scale.setScalar(n > 0 ? n : 1), e.userData.spin = ei(t.spin);
|
|
6764
|
+
};
|
|
6765
|
+
for (let e of y) {
|
|
6766
|
+
if (e.shape === "model") {
|
|
6767
|
+
if (!ti(e.src)) continue;
|
|
6768
|
+
let t = new s.Group();
|
|
6769
|
+
g(t, e), h.add(t), fi(e.src).then((e) => {
|
|
6770
|
+
if (!i) return;
|
|
6771
|
+
let n = pi(s, e.clone(!0));
|
|
6772
|
+
n.traverse((e) => {
|
|
6773
|
+
e.isMesh && (e.castShadow = !0, e.receiveShadow = !0);
|
|
6774
|
+
}), t.add(n);
|
|
6775
|
+
}, () => {});
|
|
6776
|
+
continue;
|
|
6777
|
+
}
|
|
6778
|
+
let t = (mi[e.shape] ?? mi.box)(s), n = new s.MeshStandardMaterial({
|
|
6779
|
+
color: /^#?[0-9a-f]{6}$/i.test(String(e.color ?? "")) ? e.color : "#6366f1",
|
|
6780
|
+
metalness: Math.min(1, Math.max(0, $r(e.metalness, 10))),
|
|
6781
|
+
roughness: Math.min(1, Math.max(0, $r(e.roughness, 35))),
|
|
6782
|
+
transparent: $r(e.opacity, 100) < 1,
|
|
6783
|
+
opacity: Math.min(1, Math.max(0, $r(e.opacity, 100))),
|
|
6784
|
+
flatShading: e.flat === !0,
|
|
6785
|
+
wireframe: e.wireframe === !0,
|
|
6786
|
+
side: e.shape === "plane" ? s.DoubleSide : s.FrontSide
|
|
6787
|
+
}), r = new s.Mesh(t, n);
|
|
6788
|
+
g(r, e), r.castShadow = !0, r.receiveShadow = !0, h.add(r), m.push(t, n);
|
|
6789
|
+
}
|
|
6790
|
+
l.add(h);
|
|
6791
|
+
let _ = null;
|
|
6792
|
+
if (u !== !1) {
|
|
6793
|
+
let e = new s.ShadowMaterial({ opacity: .22 }), t = new s.PlaneGeometry(60, 60);
|
|
6794
|
+
_ = new s.Mesh(t, e), _.rotation.x = -Math.PI / 2, _.position.y = hi(u === !0 ? 0 : u, -.85), _.receiveShadow = !0, l.add(_), m.push(t, e);
|
|
6795
|
+
}
|
|
6796
|
+
let v = () => {
|
|
6797
|
+
let t = Math.max(1, e.clientWidth), n = Math.max(1, e.clientHeight);
|
|
6798
|
+
c.setSize(t, n, !1), d.aspect = t / n, d.updateProjectionMatrix();
|
|
6799
|
+
}, b = typeof ResizeObserver > "u" ? null : new ResizeObserver(v);
|
|
6800
|
+
b?.observe(e), v();
|
|
6801
|
+
let C = ei(Number.isFinite(Number(o)) ? o : 20), w = Xr(e, (e) => {
|
|
6802
|
+
f.autoSpin(x ? C : 0, e), f.update();
|
|
6803
|
+
for (let t of h.children) t.userData.spin && (t.rotation.y += t.userData.spin * e);
|
|
6804
|
+
c.render(l, d);
|
|
6805
|
+
});
|
|
6806
|
+
a = () => {
|
|
6807
|
+
w(), b?.disconnect(), f.dispose();
|
|
6808
|
+
for (let e of m) e.dispose?.();
|
|
6809
|
+
l.environment?.dispose?.(), c.dispose(), c.domElement.remove();
|
|
6810
|
+
};
|
|
6811
|
+
}, () => {
|
|
6812
|
+
i && v(!0);
|
|
6813
|
+
}), () => {
|
|
6814
|
+
i = !1, a?.();
|
|
6815
|
+
};
|
|
6816
|
+
}, [
|
|
6817
|
+
b,
|
|
6818
|
+
t,
|
|
6819
|
+
n,
|
|
6820
|
+
r,
|
|
6821
|
+
x,
|
|
6822
|
+
o,
|
|
6823
|
+
S,
|
|
6824
|
+
u
|
|
6825
|
+
]), _ && h ? /* @__PURE__ */ d(ni, {
|
|
6826
|
+
nodeRef: m,
|
|
6827
|
+
style: p,
|
|
6828
|
+
height: f,
|
|
6829
|
+
label: "3D Scene",
|
|
6830
|
+
note: "The 3D engine could not be loaded. Check the connection and try again."
|
|
6831
|
+
}) : /* @__PURE__ */ d("div", {
|
|
6832
|
+
ref: (e) => {
|
|
6833
|
+
g.current = e, typeof m == "function" && m(e);
|
|
6834
|
+
},
|
|
6835
|
+
style: {
|
|
6836
|
+
minHeight: Qr(f, 380),
|
|
6837
|
+
height: Qr(f, 380),
|
|
6838
|
+
overflow: "hidden",
|
|
6839
|
+
touchAction: S ? "pan-y" : void 0,
|
|
6840
|
+
...P(p)
|
|
6841
|
+
}
|
|
6842
|
+
});
|
|
6843
|
+
}
|
|
6844
|
+
function _i({ code: e, height: t, background: n, style: r, nodeRef: i, inert: o }) {
|
|
6845
|
+
let s = c(null), [u, f] = l("");
|
|
6846
|
+
return a(() => {
|
|
6847
|
+
let t = s.current;
|
|
6848
|
+
if (o || !t || typeof e != "string" || !e.trim()) return;
|
|
6849
|
+
let r = !0, i = null;
|
|
6850
|
+
return Gr().then((a) => {
|
|
6851
|
+
if (!r || !t) return;
|
|
6852
|
+
let o = new a.WebGLRenderer({
|
|
6853
|
+
antialias: !0,
|
|
6854
|
+
alpha: !n
|
|
6855
|
+
});
|
|
6856
|
+
o.setPixelRatio(Yr()), o.outputColorSpace = a.SRGBColorSpace, o.domElement.style.display = "block", o.domElement.style.width = "100%", o.domElement.style.height = "100%", t.appendChild(o.domElement);
|
|
6857
|
+
let s = new a.Scene();
|
|
6858
|
+
n && (s.background = new a.Color(n));
|
|
6859
|
+
let c = new a.PerspectiveCamera(45, 1, .1, 1e3);
|
|
6860
|
+
c.position.set(0, 1.2, 4);
|
|
6861
|
+
let l = null;
|
|
6862
|
+
try {
|
|
6863
|
+
l = Function("ctx", `"use strict";\n${e}`)({
|
|
6864
|
+
THREE: a,
|
|
6865
|
+
scene: s,
|
|
6866
|
+
camera: c,
|
|
6867
|
+
renderer: o,
|
|
6868
|
+
canvas: o.domElement,
|
|
6869
|
+
host: t
|
|
6870
|
+
});
|
|
6871
|
+
} catch (e) {
|
|
6872
|
+
f(e?.message || String(e));
|
|
6873
|
+
}
|
|
6874
|
+
let u = () => {
|
|
6875
|
+
let e = Math.max(1, t.clientWidth), n = Math.max(1, t.clientHeight);
|
|
6876
|
+
o.setSize(e, n, !1), c.aspect = e / n, c.updateProjectionMatrix();
|
|
6877
|
+
}, d = typeof ResizeObserver > "u" ? null : new ResizeObserver(u);
|
|
6878
|
+
d?.observe(t), u();
|
|
6879
|
+
let p = !1, m = Xr(t, (e, t) => {
|
|
6880
|
+
if (!p && typeof l?.frame == "function") try {
|
|
6881
|
+
l.frame(e, t);
|
|
6882
|
+
} catch (e) {
|
|
6883
|
+
p = !0, f(e?.message || String(e));
|
|
6884
|
+
}
|
|
6885
|
+
o.render(s, c);
|
|
6886
|
+
});
|
|
6887
|
+
i = () => {
|
|
6888
|
+
m(), d?.disconnect();
|
|
6889
|
+
try {
|
|
6890
|
+
l?.dispose?.();
|
|
6891
|
+
} catch {}
|
|
6892
|
+
o.dispose(), o.domElement.remove();
|
|
6893
|
+
};
|
|
6894
|
+
}), () => {
|
|
6895
|
+
r = !1, i?.();
|
|
6896
|
+
};
|
|
6897
|
+
}, [
|
|
6898
|
+
e,
|
|
6899
|
+
o,
|
|
6900
|
+
n
|
|
6901
|
+
]), o ? /* @__PURE__ */ d(ni, {
|
|
6902
|
+
nodeRef: i,
|
|
6903
|
+
style: r,
|
|
6904
|
+
height: t,
|
|
6905
|
+
label: "three.js",
|
|
6906
|
+
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."
|
|
6907
|
+
}) : /* @__PURE__ */ d("div", {
|
|
6908
|
+
ref: (e) => {
|
|
6909
|
+
s.current = e, typeof i == "function" && i(e);
|
|
6910
|
+
},
|
|
6911
|
+
style: {
|
|
6912
|
+
minHeight: Qr(t, 380),
|
|
6913
|
+
height: Qr(t, 380),
|
|
6914
|
+
overflow: "hidden",
|
|
6915
|
+
position: "relative",
|
|
6916
|
+
touchAction: "pan-y",
|
|
6917
|
+
...P(r)
|
|
6918
|
+
},
|
|
6919
|
+
children: u ? /* @__PURE__ */ d("div", {
|
|
6920
|
+
style: {
|
|
6921
|
+
position: "absolute",
|
|
6922
|
+
left: 8,
|
|
6923
|
+
top: 8,
|
|
6924
|
+
right: 8,
|
|
6925
|
+
padding: "6px 8px",
|
|
6926
|
+
borderRadius: 6,
|
|
6927
|
+
background: "rgba(127,29,29,.85)",
|
|
6928
|
+
...ce,
|
|
6929
|
+
color: "#fee2e2",
|
|
6930
|
+
fontSize: 11
|
|
6931
|
+
},
|
|
6932
|
+
children: u
|
|
6933
|
+
}) : null
|
|
6934
|
+
});
|
|
6935
|
+
}
|
|
6936
|
+
var vi = {
|
|
6937
|
+
ModelViewerBlock: ri,
|
|
6938
|
+
ShaderBlock: li,
|
|
6939
|
+
SceneBlock: gi,
|
|
6940
|
+
ThreeCanvasBlock: _i
|
|
6941
|
+
}, yi = /* @__PURE__ */ new Map();
|
|
6942
|
+
function bi(e) {
|
|
6943
|
+
if (yi.has(e)) return yi.get(e);
|
|
6248
6944
|
let t = URL.createObjectURL(new Blob([e], { type: "text/javascript" })), n = import(
|
|
6249
6945
|
/* @vite-ignore */
|
|
6250
6946
|
/* webpackIgnore: true */
|
|
6251
6947
|
t
|
|
6252
6948
|
).finally(() => URL.revokeObjectURL(t));
|
|
6253
|
-
return
|
|
6949
|
+
return yi.set(e, n), n;
|
|
6254
6950
|
}
|
|
6255
|
-
function
|
|
6951
|
+
function xi(e) {
|
|
6256
6952
|
let t = e && typeof e == "object" ? e.builder_plugins : null, n = t && typeof t == "object" ? t.plugins : null;
|
|
6257
6953
|
return n && typeof n == "object" ? n : {};
|
|
6258
6954
|
}
|
|
6259
6955
|
//#endregion
|
|
6260
6956
|
//#region ../ui/src/components/builder/plugins/view.jsx
|
|
6261
|
-
async function
|
|
6262
|
-
let n = await
|
|
6957
|
+
async function Si(e, t) {
|
|
6958
|
+
let n = await bi(e);
|
|
6263
6959
|
return (Array.isArray(n?.default?.blocks) ? n.default.blocks : []).find((e) => e?.id === t && typeof e.mount == "function") ?? null;
|
|
6264
6960
|
}
|
|
6265
|
-
var
|
|
6961
|
+
var Ci = {
|
|
6266
6962
|
padding: "10px 12px",
|
|
6267
6963
|
border: "1px dashed rgba(148, 163, 184, 0.5)",
|
|
6268
6964
|
borderRadius: 8,
|
|
6269
6965
|
fontSize: 12,
|
|
6270
6966
|
opacity: .6
|
|
6271
6967
|
};
|
|
6272
|
-
function
|
|
6273
|
-
let s = i(
|
|
6968
|
+
function wi({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
|
|
6969
|
+
let s = i(Y), l = xi(s?.settings)[e], u = c(null), p = c(null), m = {
|
|
6274
6970
|
tenant: s?.tenant ?? "",
|
|
6275
6971
|
apiUrl: s?.apiUrl ?? "/api",
|
|
6276
6972
|
locale: s?.locale ?? "",
|
|
@@ -6282,7 +6978,7 @@ function Lr({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
|
|
|
6282
6978
|
let e = u.current;
|
|
6283
6979
|
if (!l?.code || !e) return;
|
|
6284
6980
|
let n = !0;
|
|
6285
|
-
return
|
|
6981
|
+
return Si(l.code, t).then((e) => {
|
|
6286
6982
|
if (!(!n || !e || !u.current)) {
|
|
6287
6983
|
p.current = e;
|
|
6288
6984
|
try {
|
|
@@ -6312,7 +7008,7 @@ function Lr({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
|
|
|
6312
7008
|
}) : /* @__PURE__ */ f("div", {
|
|
6313
7009
|
ref: o,
|
|
6314
7010
|
style: {
|
|
6315
|
-
...
|
|
7011
|
+
...Ci,
|
|
6316
7012
|
...P(r)
|
|
6317
7013
|
},
|
|
6318
7014
|
children: [
|
|
@@ -6324,12 +7020,13 @@ function Lr({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
|
|
|
6324
7020
|
}
|
|
6325
7021
|
//#endregion
|
|
6326
7022
|
//#region ../ui/src/components/builder/render.jsx
|
|
6327
|
-
var
|
|
6328
|
-
...
|
|
6329
|
-
...
|
|
6330
|
-
|
|
7023
|
+
var Ti = {
|
|
7024
|
+
...rr,
|
|
7025
|
+
...Ir,
|
|
7026
|
+
...vi,
|
|
7027
|
+
PluginBlock: wi
|
|
6331
7028
|
};
|
|
6332
|
-
function
|
|
7029
|
+
function Ei(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
|
|
6333
7030
|
let o = n[e];
|
|
6334
7031
|
if (!o || o.hidden) return null;
|
|
6335
7032
|
let s = o.type?.resolvedName, c = a?.mapProps ? a.mapProps(o.props ?? {}, s) : o.props ?? {};
|
|
@@ -6337,29 +7034,29 @@ function zr(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
|
|
|
6337
7034
|
let n = o.props?.componentId, s = r?.[n];
|
|
6338
7035
|
if (!s?.template || i.has(n)) return null;
|
|
6339
7036
|
let c = new Set(i).add(n);
|
|
6340
|
-
return /* @__PURE__ */ d(t, { children:
|
|
7037
|
+
return /* @__PURE__ */ d(t, { children: Ei(s.template.rootId, s.template.nodes, r, c, a) }, e);
|
|
6341
7038
|
}
|
|
6342
|
-
let l =
|
|
7039
|
+
let l = Ti[s];
|
|
6343
7040
|
if (!l) return null;
|
|
6344
|
-
let u = (o.nodes ?? []).map((e) =>
|
|
7041
|
+
let u = (o.nodes ?? []).map((e) => Ei(e, n, r, i, a)).filter(Boolean), f = Object.entries(o.linkedNodes ?? {}), p = f.length ? Object.fromEntries(f.map(([e, t]) => [e, Ei(t, n, r, i, a)])) : void 0, m = /* @__PURE__ */ d(l, {
|
|
6345
7042
|
...c,
|
|
6346
7043
|
...s === "CollectionList" ? { templateId: o.linkedNodes?.card } : null,
|
|
6347
7044
|
linked: p,
|
|
6348
7045
|
nodeRef: (t) => {
|
|
6349
|
-
t && (t.setAttribute("data-wb", e),
|
|
7046
|
+
t && (t.setAttribute("data-wb", e), W(t, c), ee(t, a?.events === !1 ? [] : c.events));
|
|
6350
7047
|
},
|
|
6351
7048
|
children: u.length ? u : void 0
|
|
6352
7049
|
}, e);
|
|
6353
|
-
return c.when && c.when !== "always" ? /* @__PURE__ */ d(
|
|
7050
|
+
return c.when && c.when !== "always" ? /* @__PURE__ */ d(pr, {
|
|
6354
7051
|
when: c.when,
|
|
6355
7052
|
children: m
|
|
6356
7053
|
}, e) : m;
|
|
6357
7054
|
}
|
|
6358
7055
|
//#endregion
|
|
6359
7056
|
//#region ../ui/src/components/builder/PageRenderer.jsx
|
|
6360
|
-
var
|
|
6361
|
-
.webim-page[data-webim-mode="dark"] { ${Object.entries(
|
|
6362
|
-
function
|
|
7057
|
+
var Di = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" "), Oi = (e) => `.webim-page[data-webim-mode="light"] { ${Object.entries(me(e.light)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }
|
|
7058
|
+
.webim-page[data-webim-mode="dark"] { ${Object.entries(me(e.dark)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }`;
|
|
7059
|
+
function ki({ 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
7060
|
let y = o?.js?.trim();
|
|
6364
7061
|
if (a(() => {
|
|
6365
7062
|
if (!y) return;
|
|
@@ -6373,23 +7070,23 @@ function Hr({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
|
|
|
6373
7070
|
minHeight: "100%",
|
|
6374
7071
|
display: "flex",
|
|
6375
7072
|
flexDirection: "column"
|
|
6376
|
-
}, w =
|
|
7073
|
+
}, w = Ei("ROOT", e, n), T = s(() => ({ render: (t, r) => Ei(t, e, n, void 0, { mapProps: r }) }), [e, n]), E = se(e, n), O = oe(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" && !ue[e]), P = [.../* @__PURE__ */ new Set([...A(e, n), ...N])].map((e) => /* @__PURE__ */ d("link", {
|
|
6377
7074
|
rel: "stylesheet",
|
|
6378
7075
|
precedence: "default",
|
|
6379
7076
|
href: D(e)
|
|
6380
|
-
}, e)), F =
|
|
6381
|
-
return r === "auto" ? /* @__PURE__ */ d(
|
|
7077
|
+
}, e)), F = Oi(M);
|
|
7078
|
+
return r === "auto" ? /* @__PURE__ */ d(Y.Provider, {
|
|
6382
7079
|
value: {
|
|
6383
7080
|
tenant: l || "",
|
|
6384
7081
|
apiUrl: u || "/api",
|
|
6385
7082
|
locale: m || "",
|
|
6386
7083
|
settings: _ ?? null
|
|
6387
7084
|
},
|
|
6388
|
-
children: /* @__PURE__ */ d(
|
|
7085
|
+
children: /* @__PURE__ */ d(fr, {
|
|
6389
7086
|
initialUser: v,
|
|
6390
|
-
children: /* @__PURE__ */ d(
|
|
7087
|
+
children: /* @__PURE__ */ d(xe.Provider, {
|
|
6391
7088
|
value: p ?? null,
|
|
6392
|
-
children: /* @__PURE__ */ d(
|
|
7089
|
+
children: /* @__PURE__ */ d(Q.Provider, {
|
|
6393
7090
|
value: T,
|
|
6394
7091
|
children: /* @__PURE__ */ f("div", {
|
|
6395
7092
|
...b,
|
|
@@ -6400,8 +7097,8 @@ function Hr({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
|
|
|
6400
7097
|
...i
|
|
6401
7098
|
},
|
|
6402
7099
|
children: [
|
|
6403
|
-
/* @__PURE__ */ d("style", { children: `.webim-page { ${
|
|
6404
|
-
@media (prefers-color-scheme: dark) { .webim-page { ${
|
|
7100
|
+
/* @__PURE__ */ d("style", { children: `.webim-page { ${Di(me(M.light))} }
|
|
7101
|
+
@media (prefers-color-scheme: dark) { .webim-page { ${Di(me(M.dark))} } }` }),
|
|
6405
7102
|
/* @__PURE__ */ d("style", { children: F }),
|
|
6406
7103
|
P,
|
|
6407
7104
|
/* @__PURE__ */ d("style", { children: x }),
|
|
@@ -6414,25 +7111,25 @@ function Hr({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
|
|
|
6414
7111
|
})
|
|
6415
7112
|
})
|
|
6416
7113
|
})
|
|
6417
|
-
}) : /* @__PURE__ */ d(
|
|
7114
|
+
}) : /* @__PURE__ */ d(Y.Provider, {
|
|
6418
7115
|
value: {
|
|
6419
7116
|
tenant: l || "",
|
|
6420
7117
|
apiUrl: u || "/api",
|
|
6421
7118
|
locale: m || "",
|
|
6422
7119
|
settings: _ ?? null
|
|
6423
7120
|
},
|
|
6424
|
-
children: /* @__PURE__ */ d(
|
|
7121
|
+
children: /* @__PURE__ */ d(fr, {
|
|
6425
7122
|
initialUser: v,
|
|
6426
|
-
children: /* @__PURE__ */ d(
|
|
7123
|
+
children: /* @__PURE__ */ d(xe.Provider, {
|
|
6427
7124
|
value: p ?? null,
|
|
6428
|
-
children: /* @__PURE__ */ d(
|
|
7125
|
+
children: /* @__PURE__ */ d(Q.Provider, {
|
|
6429
7126
|
value: T,
|
|
6430
7127
|
children: /* @__PURE__ */ f("div", {
|
|
6431
7128
|
...b,
|
|
6432
7129
|
className: "webim-page",
|
|
6433
7130
|
style: {
|
|
6434
7131
|
...C,
|
|
6435
|
-
...
|
|
7132
|
+
...ve(t, r),
|
|
6436
7133
|
...i
|
|
6437
7134
|
},
|
|
6438
7135
|
children: [
|
|
@@ -6454,8 +7151,8 @@ function Hr({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
|
|
|
6454
7151
|
}
|
|
6455
7152
|
//#endregion
|
|
6456
7153
|
//#region src/WebimContent.jsx
|
|
6457
|
-
function
|
|
6458
|
-
return e?.blocks?.ROOT ? /* @__PURE__ */ d(
|
|
7154
|
+
function Ai({ bundle: e, mode: t = "auto", style: n }) {
|
|
7155
|
+
return e?.blocks?.ROOT ? /* @__PURE__ */ d(ki, {
|
|
6459
7156
|
blocks: e.blocks,
|
|
6460
7157
|
theme: e.theme,
|
|
6461
7158
|
components: e.components,
|
|
@@ -6467,13 +7164,13 @@ function Ur({ bundle: e, mode: t = "auto", style: n }) {
|
|
|
6467
7164
|
locale: e.locale,
|
|
6468
7165
|
direction: e.direction,
|
|
6469
7166
|
settings: e.settings,
|
|
6470
|
-
mode:
|
|
7167
|
+
mode: be(t, e.scheme),
|
|
6471
7168
|
style: n
|
|
6472
7169
|
}) : null;
|
|
6473
7170
|
}
|
|
6474
7171
|
//#endregion
|
|
6475
7172
|
//#region src/bundle.js
|
|
6476
|
-
function
|
|
7173
|
+
function ji({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
|
|
6477
7174
|
let a = {
|
|
6478
7175
|
...t?.global ?? {},
|
|
6479
7176
|
...t?.tenant ?? {}
|
|
@@ -6483,7 +7180,7 @@ function Wr({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
|
|
|
6483
7180
|
title: e.title,
|
|
6484
7181
|
slug: e.slug,
|
|
6485
7182
|
blocks: i && o.i18n?.[i]?.blocks || e.blocks,
|
|
6486
|
-
theme:
|
|
7183
|
+
theme: ye(o, a.builder_themes?.themes),
|
|
6487
7184
|
components: a.builder_components?.components ?? {},
|
|
6488
7185
|
custom: o.custom,
|
|
6489
7186
|
animations: o.animations,
|
|
@@ -6499,18 +7196,18 @@ function Wr({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
|
|
|
6499
7196
|
}
|
|
6500
7197
|
//#endregion
|
|
6501
7198
|
//#region src/fetchPage.js
|
|
6502
|
-
var
|
|
7199
|
+
var Mi = async (e) => {
|
|
6503
7200
|
let t = await e.json().catch(() => null);
|
|
6504
7201
|
if (!e.ok || t?.success === !1) throw Error(t?.error?.message || `Request failed (${e.status})`);
|
|
6505
7202
|
return t?.payload ?? t;
|
|
6506
7203
|
};
|
|
6507
|
-
async function
|
|
7204
|
+
async function Ni({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token: a, page: o, fetch: s }) {
|
|
6508
7205
|
if (!e) throw Error("fetchPage: apiUrl is required");
|
|
6509
7206
|
if (!n) throw Error("fetchPage: slug is required");
|
|
6510
7207
|
let c = s ?? fetch, l = e.replace(/\/$/, ""), u = {
|
|
6511
7208
|
...t ? { "x-tenant": t } : {},
|
|
6512
7209
|
...a ? { authorization: `Bearer ${a}` } : {}
|
|
6513
|
-
}, [d, f] = await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: u }).then(
|
|
7210
|
+
}, [d, f] = await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: u }).then(Mi), c(`${l}/settings/public`, { headers: u }).then(Mi)]), p = ji({
|
|
6514
7211
|
page: d,
|
|
6515
7212
|
settings: f,
|
|
6516
7213
|
tenant: t,
|
|
@@ -6525,7 +7222,7 @@ async function Kr({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token:
|
|
|
6525
7222
|
"LogoCarousel"
|
|
6526
7223
|
].includes(e?.type?.resolvedName) ? e.props?.source : null).filter(Boolean))];
|
|
6527
7224
|
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(
|
|
7225
|
+
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(Mi).then((e) => {
|
|
6529
7226
|
let n = Array.isArray(e) ? e : Array.isArray(e?.data) ? e.data : [], r = Number(e?.total?.filtered ?? e?.total?.all ?? n.length);
|
|
6530
7227
|
return [[t, n], [`${t}:total`, Number.isFinite(r) ? r : n.length]];
|
|
6531
7228
|
}).catch(() => [[t, []]])));
|
|
@@ -6539,40 +7236,40 @@ async function Kr({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token:
|
|
|
6539
7236
|
}
|
|
6540
7237
|
//#endregion
|
|
6541
7238
|
//#region src/ssr.jsx
|
|
6542
|
-
var
|
|
7239
|
+
var Pi = (e) => String(e ?? "").replace(/[&<>"]/g, (e) => ({
|
|
6543
7240
|
"&": "&",
|
|
6544
7241
|
"<": "<",
|
|
6545
7242
|
">": ">",
|
|
6546
7243
|
"\"": """
|
|
6547
7244
|
})[e]);
|
|
6548
|
-
function
|
|
6549
|
-
return e(/* @__PURE__ */ d(
|
|
7245
|
+
function Fi(t, { mode: n = "auto", style: r } = {}) {
|
|
7246
|
+
return e(/* @__PURE__ */ d(Ai, {
|
|
6550
7247
|
bundle: t,
|
|
6551
7248
|
mode: n,
|
|
6552
7249
|
style: r
|
|
6553
7250
|
}));
|
|
6554
7251
|
}
|
|
6555
|
-
function
|
|
7252
|
+
function Ii(e, { mode: t = "auto", lang: n } = {}) {
|
|
6556
7253
|
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
7254
|
"<meta charset=\"utf-8\"/>",
|
|
6558
7255
|
"<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="${
|
|
7256
|
+
`<title>${Pi(o)}</title>`,
|
|
7257
|
+
r.description && `<meta name="description" content="${Pi(r.description)}"/>`,
|
|
7258
|
+
`<meta property="og:title" content="${Pi(o)}"/>`,
|
|
7259
|
+
r.image && `<meta property="og:image" content="${Pi(r.image)}"/>`,
|
|
6563
7260
|
r.noindex && "<meta name=\"robots\" content=\"noindex\"/>",
|
|
6564
7261
|
"<style>html,body{margin:0;height:100%}</style>"
|
|
6565
7262
|
].filter(Boolean).join("\n");
|
|
6566
7263
|
return `<!doctype html>
|
|
6567
|
-
<html lang="${
|
|
7264
|
+
<html lang="${Pi(i)}"${a ? ` dir="${a}"` : ""}>
|
|
6568
7265
|
<head>
|
|
6569
7266
|
${c}
|
|
6570
7267
|
</head>
|
|
6571
7268
|
<body>
|
|
6572
|
-
${
|
|
7269
|
+
${Fi(e, { mode: t })}
|
|
6573
7270
|
${s ? `<script>${s.replaceAll("<\/script", "<\\/script")}<\/script>` : ""}
|
|
6574
7271
|
</body>
|
|
6575
7272
|
</html>`;
|
|
6576
7273
|
}
|
|
6577
7274
|
//#endregion
|
|
6578
|
-
export {
|
|
7275
|
+
export { ji as assembleBundle, Ni as fetchPage, Fi as renderBundleHtml, Ii as renderPageDocument };
|