webim-adapter 2.2.2 → 2.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/webim-adapter.js +654 -578
- package/build/webim-embed.js +15 -15
- package/build/webim-ssr.js +552 -476
- package/package.json +1 -1
package/build/webim-ssr.js
CHANGED
|
@@ -1600,15 +1600,90 @@ function Yt({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i })
|
|
|
1600
1600
|
}
|
|
1601
1601
|
}) : null;
|
|
1602
1602
|
}
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1603
|
+
function Xt(e, { toolbar: t = !0, page: n, zoom: r } = {}) {
|
|
1604
|
+
let i = le(e);
|
|
1605
|
+
if (!i) return "";
|
|
1606
|
+
let a = [];
|
|
1607
|
+
return t === !1 && a.push("toolbar=0&navpanes=0"), Number(n) > 1 && a.push(`page=${Number(n)}`), r && r !== "auto" && a.push(`zoom=${r}`), a.length ? `${i.split("#")[0]}#${a.join("&")}` : i;
|
|
1608
|
+
}
|
|
1609
|
+
function Zt({ src: e, title: t, toolbar: n = !0, page: r, zoom: i = "auto", link: a = !0, linkLabel: o, fallbackText: s, style: c, nodeRef: l }) {
|
|
1610
|
+
let u = le(e);
|
|
1611
|
+
if (!u) return null;
|
|
1612
|
+
let p = o || "Open the PDF", m = t || "PDF document";
|
|
1613
|
+
return /* @__PURE__ */ f("div", {
|
|
1614
|
+
ref: l,
|
|
1615
|
+
style: {
|
|
1616
|
+
display: "flex",
|
|
1617
|
+
flexDirection: "column",
|
|
1618
|
+
width: "100%",
|
|
1619
|
+
height: 600,
|
|
1620
|
+
...P(c)
|
|
1621
|
+
},
|
|
1622
|
+
children: [/* @__PURE__ */ d("object", {
|
|
1623
|
+
data: Xt(u, {
|
|
1624
|
+
toolbar: n,
|
|
1625
|
+
page: r,
|
|
1626
|
+
zoom: i
|
|
1627
|
+
}),
|
|
1628
|
+
type: "application/pdf",
|
|
1629
|
+
"aria-label": m,
|
|
1630
|
+
style: {
|
|
1631
|
+
display: "block",
|
|
1632
|
+
flex: "1 1 auto",
|
|
1633
|
+
minHeight: 0,
|
|
1634
|
+
width: "100%",
|
|
1635
|
+
border: 0
|
|
1636
|
+
},
|
|
1637
|
+
children: /* @__PURE__ */ f("div", {
|
|
1638
|
+
style: {
|
|
1639
|
+
display: "grid",
|
|
1640
|
+
placeItems: "center",
|
|
1641
|
+
gap: 8,
|
|
1642
|
+
height: "100%",
|
|
1643
|
+
padding: 16,
|
|
1644
|
+
textAlign: "center"
|
|
1645
|
+
},
|
|
1646
|
+
children: [/* @__PURE__ */ d("p", {
|
|
1647
|
+
style: {
|
|
1648
|
+
...dt,
|
|
1649
|
+
opacity: .75
|
|
1650
|
+
},
|
|
1651
|
+
children: s || "This browser can’t show the PDF here."
|
|
1652
|
+
}), /* @__PURE__ */ d("a", {
|
|
1653
|
+
href: u,
|
|
1654
|
+
target: "_blank",
|
|
1655
|
+
rel: "noopener noreferrer",
|
|
1656
|
+
style: { color: "var(--page-accent, inherit)" },
|
|
1657
|
+
children: p
|
|
1658
|
+
})]
|
|
1659
|
+
})
|
|
1660
|
+
}, Xt(u, {
|
|
1661
|
+
toolbar: n,
|
|
1662
|
+
page: r,
|
|
1663
|
+
zoom: i
|
|
1664
|
+
})), a && /* @__PURE__ */ d("a", {
|
|
1665
|
+
href: u,
|
|
1666
|
+
target: "_blank",
|
|
1667
|
+
rel: "noopener noreferrer",
|
|
1668
|
+
style: {
|
|
1669
|
+
flexShrink: 0,
|
|
1670
|
+
marginTop: 8,
|
|
1671
|
+
color: "var(--page-accent, inherit)",
|
|
1672
|
+
fontSize: 14
|
|
1673
|
+
},
|
|
1674
|
+
children: p
|
|
1675
|
+
})]
|
|
1676
|
+
});
|
|
1606
1677
|
}
|
|
1607
|
-
|
|
1678
|
+
var Qt = /(^|[\s,>+~{}])(:root|html|body)(?=$|[\s,{.:#[>+~])/g;
|
|
1679
|
+
function $t(e) {
|
|
1680
|
+
return `@scope ([data-wb-embed]) {\n${e.replace(Qt, "$1:scope")}\n}`;
|
|
1681
|
+
}
|
|
1682
|
+
function en({ code: e, runScripts: t = !0, scopeStyles: n = !1, style: r, nodeRef: i }) {
|
|
1608
1683
|
let [o, s] = l(null);
|
|
1609
1684
|
return a(() => {
|
|
1610
1685
|
o && (o.innerHTML = e || "", n ? (o.setAttribute("data-wb-embed", ""), o.querySelectorAll("style").forEach((e) => {
|
|
1611
|
-
e.textContent =
|
|
1686
|
+
e.textContent = $t(e.textContent || "");
|
|
1612
1687
|
})) : o.removeAttribute("data-wb-embed"), t && o.querySelectorAll("script").forEach((e) => {
|
|
1613
1688
|
let t = document.createElement("script");
|
|
1614
1689
|
for (let { name: n, value: r } of e.attributes) t.setAttribute(n, r);
|
|
@@ -1626,7 +1701,7 @@ function Qt({ code: e, runScripts: t = !0, scopeStyles: n = !1, style: r, nodeRe
|
|
|
1626
1701
|
style: P(r)
|
|
1627
1702
|
});
|
|
1628
1703
|
}
|
|
1629
|
-
function
|
|
1704
|
+
function tn({ height: e, style: t, nodeRef: n }) {
|
|
1630
1705
|
return /* @__PURE__ */ d("div", {
|
|
1631
1706
|
ref: n,
|
|
1632
1707
|
style: {
|
|
@@ -1637,7 +1712,7 @@ function $t({ height: e, style: t, nodeRef: n }) {
|
|
|
1637
1712
|
}
|
|
1638
1713
|
});
|
|
1639
1714
|
}
|
|
1640
|
-
function
|
|
1715
|
+
function nn({ style: e, nodeRef: t }) {
|
|
1641
1716
|
return /* @__PURE__ */ d("div", {
|
|
1642
1717
|
ref: t,
|
|
1643
1718
|
style: {
|
|
@@ -1648,7 +1723,7 @@ function en({ style: e, nodeRef: t }) {
|
|
|
1648
1723
|
}
|
|
1649
1724
|
});
|
|
1650
1725
|
}
|
|
1651
|
-
function
|
|
1726
|
+
function rn({ style: e, nodeRef: t }) {
|
|
1652
1727
|
return /* @__PURE__ */ d("div", {
|
|
1653
1728
|
ref: t,
|
|
1654
1729
|
style: {
|
|
@@ -1657,7 +1732,7 @@ function tn({ style: e, nodeRef: t }) {
|
|
|
1657
1732
|
}
|
|
1658
1733
|
});
|
|
1659
1734
|
}
|
|
1660
|
-
var
|
|
1735
|
+
var an = {
|
|
1661
1736
|
position: "absolute",
|
|
1662
1737
|
top: "50%",
|
|
1663
1738
|
transform: "translateY(-50%)",
|
|
@@ -1674,7 +1749,7 @@ var nn = {
|
|
|
1674
1749
|
alignItems: "center",
|
|
1675
1750
|
justifyContent: "center",
|
|
1676
1751
|
padding: 0
|
|
1677
|
-
},
|
|
1752
|
+
}, on = {
|
|
1678
1753
|
bottom: {
|
|
1679
1754
|
inset: "auto 0 0 0",
|
|
1680
1755
|
padding: "40px 24px 20px",
|
|
@@ -1693,8 +1768,8 @@ var nn = {
|
|
|
1693
1768
|
padding: 24,
|
|
1694
1769
|
textShadow: "0 2px 12px rgba(0, 0, 0, 0.6)"
|
|
1695
1770
|
}
|
|
1696
|
-
},
|
|
1697
|
-
function
|
|
1771
|
+
}, sn = 48;
|
|
1772
|
+
function cn({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, height: i = 320, swipe: o = !0, style: s, nodeRef: c }) {
|
|
1698
1773
|
let [p, m] = l(0), [h, g] = l(!1), [_, v] = l(null), y = e ? Math.min(p, e - 1) : 0;
|
|
1699
1774
|
if (a(() => {
|
|
1700
1775
|
if (!n || h || _ || e < 2) return;
|
|
@@ -1710,7 +1785,7 @@ function on({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1710
1785
|
let b = (t) => m((t + e) % e), x = () => {
|
|
1711
1786
|
if (!_) return;
|
|
1712
1787
|
let { dx: e } = _;
|
|
1713
|
-
v(null), e < -48 ? b(y + 1) : e >
|
|
1788
|
+
v(null), e < -48 ? b(y + 1) : e > sn && b(y - 1);
|
|
1714
1789
|
};
|
|
1715
1790
|
return /* @__PURE__ */ f("div", {
|
|
1716
1791
|
ref: c,
|
|
@@ -1759,7 +1834,7 @@ function on({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1759
1834
|
type: "button",
|
|
1760
1835
|
"aria-label": "Previous slide",
|
|
1761
1836
|
style: {
|
|
1762
|
-
...
|
|
1837
|
+
...an,
|
|
1763
1838
|
left: 12
|
|
1764
1839
|
},
|
|
1765
1840
|
onClick: () => b(y - 1),
|
|
@@ -1769,7 +1844,7 @@ function on({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1769
1844
|
type: "button",
|
|
1770
1845
|
"aria-label": "Next slide",
|
|
1771
1846
|
style: {
|
|
1772
|
-
...
|
|
1847
|
+
...an,
|
|
1773
1848
|
right: 12
|
|
1774
1849
|
},
|
|
1775
1850
|
onClick: () => b(y + 1),
|
|
@@ -1803,7 +1878,7 @@ function on({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1803
1878
|
] })]
|
|
1804
1879
|
});
|
|
1805
1880
|
}
|
|
1806
|
-
var
|
|
1881
|
+
var ln = (e, t) => ({
|
|
1807
1882
|
position: "absolute",
|
|
1808
1883
|
inset: 0,
|
|
1809
1884
|
backgroundImage: e ? `url(${e})` : "none",
|
|
@@ -1811,18 +1886,18 @@ var sn = (e, t) => ({
|
|
|
1811
1886
|
backgroundSize: "cover",
|
|
1812
1887
|
backgroundPosition: "center"
|
|
1813
1888
|
});
|
|
1814
|
-
function
|
|
1815
|
-
return e.length ? /* @__PURE__ */ d(
|
|
1889
|
+
function un({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "left", ...r }) {
|
|
1890
|
+
return e.length ? /* @__PURE__ */ d(cn, {
|
|
1816
1891
|
...r,
|
|
1817
1892
|
count: e.length,
|
|
1818
1893
|
renderSlide: (r) => {
|
|
1819
1894
|
let i = e[r];
|
|
1820
|
-
return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style:
|
|
1895
|
+
return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style: ln(i.image) }), (i.title || i.text) && /* @__PURE__ */ f("div", {
|
|
1821
1896
|
style: {
|
|
1822
1897
|
position: "absolute",
|
|
1823
1898
|
color: "#fff",
|
|
1824
1899
|
textAlign: n,
|
|
1825
|
-
...
|
|
1900
|
+
...on[t] ?? on.bottom
|
|
1826
1901
|
},
|
|
1827
1902
|
children: [i.title && /* @__PURE__ */ d("div", {
|
|
1828
1903
|
style: {
|
|
@@ -1842,13 +1917,13 @@ function cn({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "
|
|
|
1842
1917
|
}
|
|
1843
1918
|
}) : null;
|
|
1844
1919
|
}
|
|
1845
|
-
function
|
|
1846
|
-
return e.length ? /* @__PURE__ */ d(
|
|
1920
|
+
function dn({ slides: e = [], linked: t, ...n }) {
|
|
1921
|
+
return e.length ? /* @__PURE__ */ d(cn, {
|
|
1847
1922
|
...n,
|
|
1848
1923
|
count: e.length,
|
|
1849
1924
|
renderSlide: (n) => {
|
|
1850
1925
|
let r = e[n];
|
|
1851
|
-
return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style:
|
|
1926
|
+
return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style: ln(r.image, r.color) }), /* @__PURE__ */ d("div", {
|
|
1852
1927
|
style: {
|
|
1853
1928
|
position: "absolute",
|
|
1854
1929
|
inset: 0,
|
|
@@ -1860,23 +1935,23 @@ function ln({ slides: e = [], linked: t, ...n }) {
|
|
|
1860
1935
|
}
|
|
1861
1936
|
}) : null;
|
|
1862
1937
|
}
|
|
1863
|
-
var
|
|
1864
|
-
let r =
|
|
1938
|
+
var fn = 256, pn = (e) => Math.log(Math.tan(Math.PI / 4 + Math.max(-85, Math.min(85, e)) * Math.PI / 360)), mn = (e, t, n) => {
|
|
1939
|
+
let r = fn * 2 ** n;
|
|
1865
1940
|
return {
|
|
1866
1941
|
x: (Number(t) + 180) / 360 * r,
|
|
1867
|
-
y: (.5 -
|
|
1942
|
+
y: (.5 - pn(Number(e)) / (2 * Math.PI)) * r
|
|
1868
1943
|
};
|
|
1869
1944
|
}, $ = (e, t) => {
|
|
1870
1945
|
if (e === "" || e == null) return null;
|
|
1871
1946
|
let n = Number(e);
|
|
1872
1947
|
return Number.isFinite(n) && Math.abs(n) <= t ? n : null;
|
|
1873
|
-
},
|
|
1874
|
-
function
|
|
1948
|
+
}, hn = (e) => !!e && $(e.lat, 90) !== null && $(e.lng, 180) !== null;
|
|
1949
|
+
function gn(e, t, n = "directions", r = "") {
|
|
1875
1950
|
let i = `${e},${t}`;
|
|
1876
1951
|
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)}`;
|
|
1877
1952
|
}
|
|
1878
|
-
var
|
|
1879
|
-
function
|
|
1953
|
+
var _n = (e, t, n = 13) => `https://www.openstreetmap.org/?mlat=${e}&mlon=${t}#map=${Math.round(Number(n) || 13)}/${e}/${t}`;
|
|
1954
|
+
function vn({ 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 }) {
|
|
1880
1955
|
let _ = c(null), [v, y] = l(1200);
|
|
1881
1956
|
a(() => {
|
|
1882
1957
|
let e = _.current;
|
|
@@ -1886,7 +1961,7 @@ function gn({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
|
|
|
1886
1961
|
let n = new ResizeObserver(t);
|
|
1887
1962
|
return n.observe(e), () => n.disconnect();
|
|
1888
1963
|
}, []);
|
|
1889
|
-
let b = (Array.isArray(e) ? e : []).filter(
|
|
1964
|
+
let b = (Array.isArray(e) ? e : []).filter(hn), x = hn({
|
|
1890
1965
|
lat: t,
|
|
1891
1966
|
lng: n
|
|
1892
1967
|
}) ? {
|
|
@@ -1898,7 +1973,7 @@ function gn({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
|
|
|
1898
1973
|
} : null, S = Math.max(80, Number(i) || 320), C = $(r, 19) ? Math.min(Math.max(Math.round(Number(r)), 1), 19) : (() => {
|
|
1899
1974
|
if (b.length < 2) return 13;
|
|
1900
1975
|
for (let e = 19; e >= 1; e--) {
|
|
1901
|
-
let t = b.map((t) =>
|
|
1976
|
+
let t = b.map((t) => mn($(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));
|
|
1902
1977
|
if (n <= v * .8 && r <= S * .7) return e;
|
|
1903
1978
|
}
|
|
1904
1979
|
return 1;
|
|
@@ -1922,12 +1997,12 @@ function gn({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
|
|
|
1922
1997
|
},
|
|
1923
1998
|
children: "Set the coordinates in Settings"
|
|
1924
1999
|
});
|
|
1925
|
-
let T =
|
|
2000
|
+
let T = mn(x.lat, x.lng, C), E = {
|
|
1926
2001
|
x: T.x - v / 2,
|
|
1927
2002
|
y: T.y - S / 2
|
|
1928
2003
|
}, D = [], O = [];
|
|
1929
|
-
for (let e = Math.floor(E.x /
|
|
1930
|
-
for (let e = Math.floor(E.y /
|
|
2004
|
+
for (let e = Math.floor(E.x / fn); e <= Math.floor((E.x + v) / fn); e++) D.push(e);
|
|
2005
|
+
for (let e = Math.floor(E.y / fn); e <= Math.floor((E.y + S) / fn); e++) O.push(e);
|
|
1931
2006
|
let k = 2 ** C;
|
|
1932
2007
|
return /* @__PURE__ */ f("div", {
|
|
1933
2008
|
ref: (e) => {
|
|
@@ -1950,22 +2025,22 @@ function gn({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
|
|
|
1950
2025
|
return e < 0 || e >= k ? null : /* @__PURE__ */ d("img", {
|
|
1951
2026
|
src: `https://tile.openstreetmap.org/${C}/${n}/${e}.png`,
|
|
1952
2027
|
alt: "",
|
|
1953
|
-
width:
|
|
1954
|
-
height:
|
|
2028
|
+
width: fn,
|
|
2029
|
+
height: fn,
|
|
1955
2030
|
loading: "lazy",
|
|
1956
2031
|
style: {
|
|
1957
2032
|
position: "absolute",
|
|
1958
|
-
left: Math.round(t *
|
|
1959
|
-
top: Math.round(e *
|
|
1960
|
-
width:
|
|
1961
|
-
height:
|
|
2033
|
+
left: Math.round(t * fn - E.x),
|
|
2034
|
+
top: Math.round(e * fn - E.y),
|
|
2035
|
+
width: fn,
|
|
2036
|
+
height: fn,
|
|
1962
2037
|
userSelect: "none",
|
|
1963
2038
|
pointerEvents: "none"
|
|
1964
2039
|
}
|
|
1965
2040
|
}, `${t}-${e}`);
|
|
1966
2041
|
})),
|
|
1967
2042
|
b.map((e, t) => {
|
|
1968
|
-
let n =
|
|
2043
|
+
let n = mn($(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 : gn($(e.lat, 90), $(e.lng, 180), s, e.title);
|
|
1969
2044
|
return /* @__PURE__ */ f(c ? "a" : "span", {
|
|
1970
2045
|
href: c || void 0,
|
|
1971
2046
|
target: c ? "_blank" : void 0,
|
|
@@ -2004,8 +2079,8 @@ function gn({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
|
|
|
2004
2079
|
viewBox: "0 0 24 24",
|
|
2005
2080
|
fill: a,
|
|
2006
2081
|
style: { display: "block" },
|
|
2007
|
-
children: [/* @__PURE__ */ d("path", { d: "M12 22s7-6 7-11a7 7 0 1 0-14 0c0 5 7 11 7 11z" }),
|
|
2008
|
-
d:
|
|
2082
|
+
children: [/* @__PURE__ */ d("path", { d: "M12 22s7-6 7-11a7 7 0 1 0-14 0c0 5 7 11 7 11z" }), yn[e.icon] ? /* @__PURE__ */ d("path", {
|
|
2083
|
+
d: yn[e.icon],
|
|
2009
2084
|
transform: "translate(12 10.5) scale(0.46) translate(-12 -12)",
|
|
2010
2085
|
fill: "none",
|
|
2011
2086
|
stroke: "#fff",
|
|
@@ -2041,7 +2116,7 @@ function gn({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
|
|
|
2041
2116
|
})
|
|
2042
2117
|
]
|
|
2043
2118
|
}), u ? /* @__PURE__ */ d("a", {
|
|
2044
|
-
href:
|
|
2119
|
+
href: _n(x.lat, x.lng, C),
|
|
2045
2120
|
target: "_blank",
|
|
2046
2121
|
rel: "noopener noreferrer",
|
|
2047
2122
|
onClick: g ? (e) => e.preventDefault() : void 0,
|
|
@@ -2055,7 +2130,7 @@ function gn({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
|
|
|
2055
2130
|
}) : null]
|
|
2056
2131
|
});
|
|
2057
2132
|
}
|
|
2058
|
-
var
|
|
2133
|
+
var yn = {
|
|
2059
2134
|
check: "M4 12l5 5L20 6",
|
|
2060
2135
|
close: "M6 6l12 12M18 6L6 18",
|
|
2061
2136
|
plus: "M12 5v14M5 12h14",
|
|
@@ -2152,8 +2227,8 @@ var _n = {
|
|
|
2152
2227
|
droplet: "M12 3s6 6.4 6 10.5a6 6 0 0 1-12 0C6 9.4 12 3 12 3z",
|
|
2153
2228
|
leaf: "M4 20c0-8 6-14 16-14 0 10-6 14-12 14H4zM8 16c2-4 5-6 8-7"
|
|
2154
2229
|
};
|
|
2155
|
-
function
|
|
2156
|
-
let p = Array.isArray(t) ? t.filter((e) => typeof e == "string" && e.trim()) : [], m = n && p.length > 0, h = p.length ? p : [
|
|
2230
|
+
function bn({ 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 }) {
|
|
2231
|
+
let p = Array.isArray(t) ? t.filter((e) => typeof e == "string" && e.trim()) : [], m = n && p.length > 0, h = p.length ? p : [yn[e] ?? yn.star], g = Math.min(Math.max(Number(r) || 24, 8), 240), _ = a === "accent" ? "var(--page-accent, currentColor)" : a || "currentColor", v = /* @__PURE__ */ d("svg", {
|
|
2157
2232
|
viewBox: "0 0 24 24",
|
|
2158
2233
|
width: g,
|
|
2159
2234
|
height: g,
|
|
@@ -2189,7 +2264,7 @@ function vn({ name: e = "star", paths: t, fill: n = !1, size: r = 24, stroke: i
|
|
|
2189
2264
|
children: v
|
|
2190
2265
|
});
|
|
2191
2266
|
}
|
|
2192
|
-
function
|
|
2267
|
+
function xn(e, t = {}, n = 0) {
|
|
2193
2268
|
let r = Array.isArray(e) ? e.filter((e) => e && typeof e == "object") : [], i = (e) => e == null ? "" : ot(e), a = Math.max(0, Number(n) || 0), o = [];
|
|
2194
2269
|
for (let e of r) {
|
|
2195
2270
|
let n = e.data ?? e, r = it(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(it(n, t.nameField)) : i(n.name), l = t.hrefField ? i(it(n, t.hrefField)) : "";
|
|
@@ -2202,7 +2277,7 @@ function yn(e, t = {}, n = 0) {
|
|
|
2202
2277
|
}
|
|
2203
2278
|
return o;
|
|
2204
2279
|
}
|
|
2205
|
-
function
|
|
2280
|
+
function Sn({ 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 }) {
|
|
2206
2281
|
let { tenant: x, apiUrl: S } = i(Q), C = i(Qe)?.[t], [w, T] = l(null), [E, D] = l(() => /* @__PURE__ */ new Set());
|
|
2207
2282
|
a(() => {
|
|
2208
2283
|
if (!t || C) return;
|
|
@@ -2220,7 +2295,7 @@ function bn({ images: e = [], source: t = "", entry: n = "", imageField: r = "",
|
|
|
2220
2295
|
C
|
|
2221
2296
|
]);
|
|
2222
2297
|
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 ? (() => {
|
|
2223
|
-
let e =
|
|
2298
|
+
let e = xn(k, {
|
|
2224
2299
|
imageField: r,
|
|
2225
2300
|
nameField: o,
|
|
2226
2301
|
hrefField: s
|
|
@@ -2425,19 +2500,19 @@ function bn({ images: e = [], source: t = "", entry: n = "", imageField: r = "",
|
|
|
2425
2500
|
]
|
|
2426
2501
|
});
|
|
2427
2502
|
}
|
|
2428
|
-
var
|
|
2503
|
+
var Cn = {
|
|
2429
2504
|
color: "inherit",
|
|
2430
2505
|
textDecoration: "none",
|
|
2431
2506
|
fontSize: 14,
|
|
2432
2507
|
opacity: .85
|
|
2433
|
-
},
|
|
2508
|
+
}, wn = {
|
|
2434
2509
|
background: "var(--page-surface, #f2f2f2)",
|
|
2435
2510
|
color: "var(--page-text, #111827)",
|
|
2436
2511
|
border: "1px solid rgba(148, 163, 184, 0.25)",
|
|
2437
2512
|
boxShadow: "0 16px 40px rgba(15, 23, 42, 0.16)",
|
|
2438
2513
|
zIndex: 60
|
|
2439
2514
|
};
|
|
2440
|
-
function
|
|
2515
|
+
function Tn(e, t = {}, n = "dropdown") {
|
|
2441
2516
|
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 ? "" : ot(e), o = r.map((e) => {
|
|
2442
2517
|
let n = e.data ?? {}, r = t.parentField ? i(n[t.parentField]) : null;
|
|
2443
2518
|
return {
|
|
@@ -2479,7 +2554,7 @@ function Cn(e, t = {}, n = "dropdown") {
|
|
|
2479
2554
|
type: e.children.length ? n : "link"
|
|
2480
2555
|
}));
|
|
2481
2556
|
}
|
|
2482
|
-
function
|
|
2557
|
+
function En({ 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" }) {
|
|
2483
2558
|
let [C, w] = l(null), [T, E] = l(!1), [D, O] = l(!1), [k, A] = l(null), { tenant: j, apiUrl: M } = i(Q), N = i(Qe)?.[g], [F, I] = l(null);
|
|
2484
2559
|
a(() => {
|
|
2485
2560
|
if (!g || N) return;
|
|
@@ -2500,7 +2575,7 @@ function wn({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
|
|
|
2500
2575
|
let e = new ResizeObserver(() => E(C.offsetWidth < h));
|
|
2501
2576
|
return e.observe(C), () => e.disconnect();
|
|
2502
2577
|
}, [C, h]);
|
|
2503
|
-
let L = g ?
|
|
2578
|
+
let L = g ? Tn(N ?? F ?? [], {
|
|
2504
2579
|
labelField: _,
|
|
2505
2580
|
hrefField: v,
|
|
2506
2581
|
imageField: y,
|
|
@@ -2529,7 +2604,7 @@ function wn({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
|
|
|
2529
2604
|
return /* @__PURE__ */ f("a", {
|
|
2530
2605
|
href: e.href || "#",
|
|
2531
2606
|
style: {
|
|
2532
|
-
...
|
|
2607
|
+
...Cn,
|
|
2533
2608
|
display: n ? "block" : "flex",
|
|
2534
2609
|
alignItems: n ? void 0 : "center",
|
|
2535
2610
|
gap: n ? void 0 : 10,
|
|
@@ -2626,7 +2701,7 @@ function wn({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
|
|
|
2626
2701
|
let t = e.children ?? [];
|
|
2627
2702
|
if (!t.length) return /* @__PURE__ */ d("a", {
|
|
2628
2703
|
href: e.href || "#",
|
|
2629
|
-
style:
|
|
2704
|
+
style: Cn,
|
|
2630
2705
|
children: e.label
|
|
2631
2706
|
}, e.key);
|
|
2632
2707
|
let n = e.type === "mega";
|
|
@@ -2640,7 +2715,7 @@ function wn({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
|
|
|
2640
2715
|
children: [/* @__PURE__ */ f("a", {
|
|
2641
2716
|
href: e.href || "#",
|
|
2642
2717
|
style: {
|
|
2643
|
-
...
|
|
2718
|
+
...Cn,
|
|
2644
2719
|
cursor: "pointer"
|
|
2645
2720
|
},
|
|
2646
2721
|
children: [
|
|
@@ -2656,7 +2731,7 @@ function wn({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
|
|
|
2656
2731
|
]
|
|
2657
2732
|
}), k === e.key && (n ? /* @__PURE__ */ d("div", {
|
|
2658
2733
|
style: {
|
|
2659
|
-
...
|
|
2734
|
+
...wn,
|
|
2660
2735
|
position: "absolute",
|
|
2661
2736
|
left: 0,
|
|
2662
2737
|
right: 0,
|
|
@@ -2672,7 +2747,7 @@ function wn({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
|
|
|
2672
2747
|
}, !0))
|
|
2673
2748
|
}) : /* @__PURE__ */ d("div", {
|
|
2674
2749
|
style: {
|
|
2675
|
-
...
|
|
2750
|
+
...wn,
|
|
2676
2751
|
position: "absolute",
|
|
2677
2752
|
top: "100%",
|
|
2678
2753
|
left: 0,
|
|
@@ -2701,7 +2776,7 @@ function wn({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
|
|
|
2701
2776
|
children: L.map((e) => /* @__PURE__ */ f(t, { children: [/* @__PURE__ */ d("a", {
|
|
2702
2777
|
href: e.href || "#",
|
|
2703
2778
|
style: {
|
|
2704
|
-
...
|
|
2779
|
+
...Cn,
|
|
2705
2780
|
padding: "10px 4px",
|
|
2706
2781
|
fontWeight: (e.children ?? []).length ? 600 : 400,
|
|
2707
2782
|
opacity: 1
|
|
@@ -2712,7 +2787,7 @@ function wn({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
|
|
|
2712
2787
|
]
|
|
2713
2788
|
});
|
|
2714
2789
|
}
|
|
2715
|
-
function
|
|
2790
|
+
function Dn({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
|
|
2716
2791
|
let [i, a] = l(0), o = e.length ? Math.min(i, e.length - 1) : 0;
|
|
2717
2792
|
return e.length ? /* @__PURE__ */ f("div", {
|
|
2718
2793
|
ref: r,
|
|
@@ -2752,13 +2827,13 @@ function Tn({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
|
|
|
2752
2827
|
}, e.key))]
|
|
2753
2828
|
}) : null;
|
|
2754
2829
|
}
|
|
2755
|
-
function
|
|
2830
|
+
function On({ 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 }) {
|
|
2756
2831
|
let [g, _] = l(() => new Set(e.length ? [e[0].key] : []));
|
|
2757
2832
|
if (!e.length) return null;
|
|
2758
2833
|
let v = (e, t) => typeof e == "string" && e ? e : t, y = (e, t) => {
|
|
2759
2834
|
let n = Number(e);
|
|
2760
2835
|
return e === "" || e == null || !Number.isFinite(n) ? t : n;
|
|
2761
|
-
}, b =
|
|
2836
|
+
}, b = yn[r], x = (e) => _((t) => {
|
|
2762
2837
|
let r = new Set(n ? t : []);
|
|
2763
2838
|
return t.has(e) ? r.delete(e) : r.add(e), r;
|
|
2764
2839
|
});
|
|
@@ -2833,15 +2908,15 @@ function En({ items: e = [], linked: t, multiple: n = !1, icon: r = "", padX: i,
|
|
|
2833
2908
|
})
|
|
2834
2909
|
});
|
|
2835
2910
|
}
|
|
2836
|
-
var
|
|
2911
|
+
var kn = {
|
|
2837
2912
|
display: "flex",
|
|
2838
2913
|
flexDirection: "column",
|
|
2839
2914
|
gap: "12px"
|
|
2840
|
-
},
|
|
2915
|
+
}, An = {
|
|
2841
2916
|
fontSize: "14px",
|
|
2842
2917
|
fontWeight: 500,
|
|
2843
2918
|
color: "var(--page-text, #111827)"
|
|
2844
|
-
},
|
|
2919
|
+
}, jn = {
|
|
2845
2920
|
padding: "10px 12px",
|
|
2846
2921
|
border: "1px solid var(--page-border, #d1d5db)",
|
|
2847
2922
|
borderRadius: "6px",
|
|
@@ -2851,18 +2926,18 @@ var Dn = {
|
|
|
2851
2926
|
boxSizing: "border-box",
|
|
2852
2927
|
backgroundColor: "var(--page-surface, #f2f2f2)",
|
|
2853
2928
|
color: "var(--page-text, #111827)"
|
|
2854
|
-
},
|
|
2929
|
+
}, Mn = {
|
|
2855
2930
|
display: "flex",
|
|
2856
2931
|
alignItems: "center",
|
|
2857
2932
|
gap: "8px",
|
|
2858
2933
|
fontSize: "14px",
|
|
2859
2934
|
color: "var(--page-text, #111827)"
|
|
2860
|
-
},
|
|
2935
|
+
}, Nn = (e) => e ? {
|
|
2861
2936
|
readOnly: !0,
|
|
2862
2937
|
tabIndex: -1,
|
|
2863
2938
|
onMouseDown: (e) => e.preventDefault()
|
|
2864
2939
|
} : {};
|
|
2865
|
-
function
|
|
2940
|
+
function Pn(e, t) {
|
|
2866
2941
|
if (!e) return !0;
|
|
2867
2942
|
let n = t[e.field], r = n == null || n === "" ? "" : String(n), i = e.value ?? "";
|
|
2868
2943
|
switch (e.op) {
|
|
@@ -2876,11 +2951,11 @@ function Mn(e, t) {
|
|
|
2876
2951
|
default: return !1;
|
|
2877
2952
|
}
|
|
2878
2953
|
}
|
|
2879
|
-
var
|
|
2954
|
+
var Fn = {
|
|
2880
2955
|
display: "flex",
|
|
2881
2956
|
flexDirection: "column",
|
|
2882
2957
|
gap: 6
|
|
2883
|
-
},
|
|
2958
|
+
}, In = {
|
|
2884
2959
|
font: "inherit",
|
|
2885
2960
|
fontSize: 15,
|
|
2886
2961
|
padding: "10px 12px",
|
|
@@ -2891,17 +2966,17 @@ var Nn = {
|
|
|
2891
2966
|
width: "100%",
|
|
2892
2967
|
boxSizing: "border-box"
|
|
2893
2968
|
};
|
|
2894
|
-
function
|
|
2969
|
+
function Ln(e, t) {
|
|
2895
2970
|
let n = Array.isArray(e?.options) ? e.options : [];
|
|
2896
2971
|
if (!e?.parentField) return n;
|
|
2897
2972
|
let r = t?.[e.parentField];
|
|
2898
2973
|
return r ? n.filter((e) => typeof e == "string" ? !1 : !e.parent || e.parent === r) : [];
|
|
2899
2974
|
}
|
|
2900
|
-
var
|
|
2901
|
-
function
|
|
2975
|
+
var Rn = "g-recaptcha-response", zn = (e) => e?.type === "recaptcha" ? Rn : e?.name;
|
|
2976
|
+
function Bn({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
2902
2977
|
let a = /* @__PURE__ */ f("span", {
|
|
2903
2978
|
style: {
|
|
2904
|
-
...
|
|
2979
|
+
...An,
|
|
2905
2980
|
fontSize: 14
|
|
2906
2981
|
},
|
|
2907
2982
|
children: [e.label, e.required ? " *" : ""]
|
|
@@ -2910,7 +2985,7 @@ function Rn({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
2910
2985
|
required: e.required || void 0,
|
|
2911
2986
|
placeholder: e.placeholder || void 0,
|
|
2912
2987
|
disabled: r || void 0,
|
|
2913
|
-
style:
|
|
2988
|
+
style: In,
|
|
2914
2989
|
value: t ?? "",
|
|
2915
2990
|
onChange: (t) => n(e.name, t.target.value)
|
|
2916
2991
|
};
|
|
@@ -2939,11 +3014,11 @@ function Rn({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
2939
3014
|
borderRadius: 8,
|
|
2940
3015
|
display: "block"
|
|
2941
3016
|
}
|
|
2942
|
-
}) : null : e.type === "recaptcha" ? /* @__PURE__ */ d(
|
|
3017
|
+
}) : null : e.type === "recaptcha" ? /* @__PURE__ */ d(Gn, {
|
|
2943
3018
|
theme: e.captchaTheme,
|
|
2944
3019
|
size: e.captchaSize,
|
|
2945
3020
|
inert: r,
|
|
2946
|
-
onChange: (e) => n(
|
|
3021
|
+
onChange: (e) => n(Rn, e)
|
|
2947
3022
|
}) : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ d(Jt, {
|
|
2948
3023
|
url: e.src,
|
|
2949
3024
|
style: { width: "100%" }
|
|
@@ -2956,14 +3031,14 @@ function Rn({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
2956
3031
|
display: "block"
|
|
2957
3032
|
}
|
|
2958
3033
|
}) : null : /* @__PURE__ */ f("label", {
|
|
2959
|
-
style:
|
|
3034
|
+
style: Fn,
|
|
2960
3035
|
children: [
|
|
2961
3036
|
a,
|
|
2962
3037
|
e.type === "textarea" || e.multiline ? /* @__PURE__ */ d("textarea", {
|
|
2963
3038
|
...o,
|
|
2964
3039
|
rows: 4,
|
|
2965
3040
|
style: {
|
|
2966
|
-
...
|
|
3041
|
+
...In,
|
|
2967
3042
|
resize: "vertical"
|
|
2968
3043
|
}
|
|
2969
3044
|
}) : e.type === "select" ? /* @__PURE__ */ f("select", {
|
|
@@ -2972,7 +3047,7 @@ function Rn({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
2972
3047
|
children: [/* @__PURE__ */ d("option", {
|
|
2973
3048
|
value: "",
|
|
2974
3049
|
children: e.placeholder || "—"
|
|
2975
|
-
}),
|
|
3050
|
+
}), Ln(e, i).map((e, t) => /* @__PURE__ */ d("option", {
|
|
2976
3051
|
value: typeof e == "string" ? e : e.value,
|
|
2977
3052
|
children: typeof e == "string" ? e : e.label ?? e.value
|
|
2978
3053
|
}, t))]
|
|
@@ -3019,7 +3094,7 @@ function Rn({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
3019
3094
|
]
|
|
3020
3095
|
});
|
|
3021
3096
|
}
|
|
3022
|
-
function
|
|
3097
|
+
function Vn({ 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 }) {
|
|
3023
3098
|
let { tenant: y, apiUrl: b } = i(Q), [x, S] = l("form"), [C, w] = l(null), [T, E] = l({}), [D, O] = l(0), k = h ? v || "form" : x;
|
|
3024
3099
|
a(() => {
|
|
3025
3100
|
if (!c || !s) return;
|
|
@@ -3041,11 +3116,11 @@ function zn({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
3041
3116
|
section: e,
|
|
3042
3117
|
fields: []
|
|
3043
3118
|
}) : A[A.length - 1].fields.push(e);
|
|
3044
|
-
let j = A.filter((e) => e.section || e.fields.length), M = j.filter((e) => !e.section ||
|
|
3119
|
+
let j = A.filter((e) => e.section || e.fields.length), M = j.filter((e) => !e.section || Pn(e.section.condition, T)).map((e) => ({
|
|
3045
3120
|
...e,
|
|
3046
|
-
fields: e.fields.filter((e) =>
|
|
3121
|
+
fields: e.fields.filter((e) => Pn(e.condition, T))
|
|
3047
3122
|
})), 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) => {
|
|
3048
|
-
let t = T[
|
|
3123
|
+
let t = T[zn(e)];
|
|
3049
3124
|
return e.required && (t == null || t === "" || t === !1);
|
|
3050
3125
|
}), R = F >= M.length - 1, z = (e, t) => E((n) => {
|
|
3051
3126
|
let r = {
|
|
@@ -3101,11 +3176,11 @@ function zn({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
3101
3176
|
}
|
|
3102
3177
|
},
|
|
3103
3178
|
style: {
|
|
3104
|
-
...
|
|
3179
|
+
...kn,
|
|
3105
3180
|
display: k === "success" ? "none" : "flex"
|
|
3106
3181
|
},
|
|
3107
3182
|
children: c && s ? /* @__PURE__ */ f(u, { children: [
|
|
3108
|
-
N && /* @__PURE__ */ d(
|
|
3183
|
+
N && /* @__PURE__ */ d(br, {
|
|
3109
3184
|
steps: M.map((e) => ({ label: e.section?.label ?? "Start" })),
|
|
3110
3185
|
active: F + 1,
|
|
3111
3186
|
style: { marginBottom: 8 }
|
|
@@ -3118,9 +3193,9 @@ function zn({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
3118
3193
|
},
|
|
3119
3194
|
children: M[F].section.help
|
|
3120
3195
|
}),
|
|
3121
|
-
I.map((e) => /* @__PURE__ */ d(
|
|
3196
|
+
I.map((e) => /* @__PURE__ */ d(Bn, {
|
|
3122
3197
|
field: e,
|
|
3123
|
-
value: T[
|
|
3198
|
+
value: T[zn(e)],
|
|
3124
3199
|
values: T,
|
|
3125
3200
|
onChange: z,
|
|
3126
3201
|
inert: h
|
|
@@ -3191,10 +3266,10 @@ function zn({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
|
|
|
3191
3266
|
]
|
|
3192
3267
|
});
|
|
3193
3268
|
}
|
|
3194
|
-
var
|
|
3269
|
+
var Hn = null, Un = null, Wn = (e) => {
|
|
3195
3270
|
let t = typeof e == "string" && e.trim() ? e.trim() : "";
|
|
3196
|
-
if (
|
|
3197
|
-
if (
|
|
3271
|
+
if (Hn && Un === t) return Hn;
|
|
3272
|
+
if (Hn && typeof window < "u") {
|
|
3198
3273
|
for (let e of ["grecaptcha", "___grecaptcha_cfg"]) try {
|
|
3199
3274
|
delete window[e];
|
|
3200
3275
|
} catch {
|
|
@@ -3202,22 +3277,22 @@ var Bn = null, Vn = null, Hn = (e) => {
|
|
|
3202
3277
|
}
|
|
3203
3278
|
document.querySelectorAll("script[src*=\"recaptcha\"]").forEach((e) => e.remove());
|
|
3204
3279
|
}
|
|
3205
|
-
return
|
|
3280
|
+
return Un = t, Hn = new Promise((e) => {
|
|
3206
3281
|
if (typeof window > "u") return;
|
|
3207
3282
|
if (window.grecaptcha?.render) return e(window.grecaptcha);
|
|
3208
3283
|
window.__webimRecaptchaReady = () => e(window.grecaptcha);
|
|
3209
3284
|
let n = document.createElement("script");
|
|
3210
3285
|
n.src = `https://www.google.com/recaptcha/api.js?onload=__webimRecaptchaReady&render=explicit${t ? `&hl=${encodeURIComponent(t)}` : ""}`, n.async = !0, document.head.appendChild(n);
|
|
3211
|
-
}),
|
|
3286
|
+
}), Hn;
|
|
3212
3287
|
};
|
|
3213
|
-
function
|
|
3288
|
+
function Gn({ siteKey: e, theme: t, size: n, hl: r, style: o, nodeRef: s, inert: l, onChange: u }) {
|
|
3214
3289
|
let p = i(Q), 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);
|
|
3215
3290
|
if (_.current = u, a(() => {
|
|
3216
3291
|
if (l || !h || !g.current) return;
|
|
3217
3292
|
let e = !0, i = (t) => {
|
|
3218
3293
|
e && typeof _.current == "function" && _.current(t);
|
|
3219
3294
|
};
|
|
3220
|
-
return
|
|
3295
|
+
return Wn(r).then((r) => {
|
|
3221
3296
|
if (!(!e || !g.current || !r?.render)) {
|
|
3222
3297
|
g.current.innerHTML = "", i("");
|
|
3223
3298
|
try {
|
|
@@ -3299,17 +3374,17 @@ function Un({ siteKey: e, theme: t, size: n, hl: r, style: o, nodeRef: s, inert:
|
|
|
3299
3374
|
children: /* @__PURE__ */ d("div", { ref: g })
|
|
3300
3375
|
}) : null;
|
|
3301
3376
|
}
|
|
3302
|
-
function
|
|
3377
|
+
function Kn({ text: e, parts: t, style: n, nodeRef: r, linked: i }) {
|
|
3303
3378
|
return /* @__PURE__ */ d("label", {
|
|
3304
3379
|
ref: r,
|
|
3305
3380
|
style: {
|
|
3306
|
-
...
|
|
3381
|
+
...An,
|
|
3307
3382
|
...P(n)
|
|
3308
3383
|
},
|
|
3309
3384
|
children: Tt(t, e, i)
|
|
3310
3385
|
});
|
|
3311
3386
|
}
|
|
3312
|
-
function
|
|
3387
|
+
function qn({ type: e = "text", name: t, placeholder: n, required: r, style: i, nodeRef: a, inert: o }) {
|
|
3313
3388
|
return /* @__PURE__ */ d("input", {
|
|
3314
3389
|
ref: a,
|
|
3315
3390
|
type: e,
|
|
@@ -3317,13 +3392,13 @@ function Gn({ type: e = "text", name: t, placeholder: n, required: r, style: i,
|
|
|
3317
3392
|
placeholder: n,
|
|
3318
3393
|
required: !o && !!r,
|
|
3319
3394
|
style: {
|
|
3320
|
-
...
|
|
3395
|
+
...jn,
|
|
3321
3396
|
...P(i)
|
|
3322
3397
|
},
|
|
3323
|
-
...
|
|
3398
|
+
...Nn(o)
|
|
3324
3399
|
});
|
|
3325
3400
|
}
|
|
3326
|
-
function
|
|
3401
|
+
function Jn({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeRef: a, inert: o }) {
|
|
3327
3402
|
return /* @__PURE__ */ d("textarea", {
|
|
3328
3403
|
ref: a,
|
|
3329
3404
|
name: e || void 0,
|
|
@@ -3331,18 +3406,18 @@ function Kn({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeR
|
|
|
3331
3406
|
rows: n,
|
|
3332
3407
|
required: !o && !!r,
|
|
3333
3408
|
style: {
|
|
3334
|
-
...
|
|
3409
|
+
...jn,
|
|
3335
3410
|
resize: "vertical",
|
|
3336
3411
|
...P(i)
|
|
3337
3412
|
},
|
|
3338
|
-
...
|
|
3413
|
+
...Nn(o)
|
|
3339
3414
|
});
|
|
3340
3415
|
}
|
|
3341
|
-
function
|
|
3416
|
+
function Yn({ kind: e = "checkbox", label: t, name: n, value: r, required: i, style: a, nodeRef: o, inert: s }) {
|
|
3342
3417
|
return /* @__PURE__ */ f("label", {
|
|
3343
3418
|
ref: o,
|
|
3344
3419
|
style: {
|
|
3345
|
-
...
|
|
3420
|
+
...Mn,
|
|
3346
3421
|
...P(a)
|
|
3347
3422
|
},
|
|
3348
3423
|
children: [/* @__PURE__ */ d("input", {
|
|
@@ -3359,7 +3434,7 @@ function qn({ kind: e = "checkbox", label: t, name: n, value: r, required: i, st
|
|
|
3359
3434
|
}), t]
|
|
3360
3435
|
});
|
|
3361
3436
|
}
|
|
3362
|
-
function
|
|
3437
|
+
function Xn({ name: e, placeholder: t, options: n = [], required: r, style: i, nodeRef: a, inert: o }) {
|
|
3363
3438
|
return /* @__PURE__ */ f("select", {
|
|
3364
3439
|
ref: a,
|
|
3365
3440
|
name: e || void 0,
|
|
@@ -3368,7 +3443,7 @@ function Jn({ name: e, placeholder: t, options: n = [], required: r, style: i, n
|
|
|
3368
3443
|
onMouseDown: o ? (e) => e.preventDefault() : void 0,
|
|
3369
3444
|
tabIndex: o ? -1 : void 0,
|
|
3370
3445
|
style: {
|
|
3371
|
-
...
|
|
3446
|
+
...jn,
|
|
3372
3447
|
appearance: "auto",
|
|
3373
3448
|
...P(i)
|
|
3374
3449
|
},
|
|
@@ -3382,12 +3457,12 @@ function Jn({ name: e, placeholder: t, options: n = [], required: r, style: i, n
|
|
|
3382
3457
|
}, t))]
|
|
3383
3458
|
});
|
|
3384
3459
|
}
|
|
3385
|
-
function
|
|
3460
|
+
function Zn({ name: e, accept: t, required: n, text: r = "Choose a file…", style: i, nodeRef: a, inert: o }) {
|
|
3386
3461
|
let [s, c] = l(null);
|
|
3387
3462
|
return /* @__PURE__ */ f("label", {
|
|
3388
3463
|
ref: a,
|
|
3389
3464
|
style: {
|
|
3390
|
-
...
|
|
3465
|
+
...jn,
|
|
3391
3466
|
display: "flex",
|
|
3392
3467
|
alignItems: "center",
|
|
3393
3468
|
gap: "8px",
|
|
@@ -3414,7 +3489,7 @@ function Yn({ name: e, accept: t, required: n, text: r = "Choose a file…", sty
|
|
|
3414
3489
|
]
|
|
3415
3490
|
});
|
|
3416
3491
|
}
|
|
3417
|
-
function
|
|
3492
|
+
function Qn({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
|
|
3418
3493
|
return /* @__PURE__ */ d("button", {
|
|
3419
3494
|
ref: n,
|
|
3420
3495
|
type: r ? "button" : "submit",
|
|
@@ -3434,7 +3509,7 @@ function Xn({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
|
|
|
3434
3509
|
children: e
|
|
3435
3510
|
});
|
|
3436
3511
|
}
|
|
3437
|
-
function
|
|
3512
|
+
function $n({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
|
|
3438
3513
|
let a = Math.max(1, (Number(e) || 1) * (Number(t) || 1));
|
|
3439
3514
|
return /* @__PURE__ */ d("div", {
|
|
3440
3515
|
ref: r,
|
|
@@ -3451,7 +3526,7 @@ function Zn({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
|
|
|
3451
3526
|
}, t))
|
|
3452
3527
|
});
|
|
3453
3528
|
}
|
|
3454
|
-
function
|
|
3529
|
+
function er({ 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: _ }) {
|
|
3455
3530
|
let { tenant: v, apiUrl: y, locale: b } = i(Q), x = i(nt), S = i(Qe), [, C] = l(0);
|
|
3456
3531
|
a(() => {
|
|
3457
3532
|
if (typeof window > "u") return;
|
|
@@ -3570,7 +3645,7 @@ function Qn({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
|
|
|
3570
3645
|
})
|
|
3571
3646
|
});
|
|
3572
3647
|
}
|
|
3573
|
-
function
|
|
3648
|
+
function tr({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, inert: i }) {
|
|
3574
3649
|
let a = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && typeof e.name == "string" && e.name) : [], o = i ? {} : et(), s = {
|
|
3575
3650
|
height: 34,
|
|
3576
3651
|
padding: "0 12px",
|
|
@@ -3619,7 +3694,7 @@ function $n({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
3619
3694
|
name: `f_${e.name}`,
|
|
3620
3695
|
defaultValue: o[e.name] ?? "",
|
|
3621
3696
|
style: s,
|
|
3622
|
-
...
|
|
3697
|
+
...Nn(i),
|
|
3623
3698
|
children: [/* @__PURE__ */ d("option", {
|
|
3624
3699
|
value: "",
|
|
3625
3700
|
children: e.label || e.name
|
|
@@ -3634,7 +3709,7 @@ function $n({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
3634
3709
|
name: `f_${e.name}`,
|
|
3635
3710
|
defaultValue: o[e.name] ?? "",
|
|
3636
3711
|
style: s,
|
|
3637
|
-
...
|
|
3712
|
+
...Nn(i),
|
|
3638
3713
|
children: [
|
|
3639
3714
|
/* @__PURE__ */ d("option", {
|
|
3640
3715
|
value: "",
|
|
@@ -3655,7 +3730,7 @@ function $n({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
3655
3730
|
defaultValue: o[e.name] ?? "",
|
|
3656
3731
|
placeholder: e.label || e.name,
|
|
3657
3732
|
style: s,
|
|
3658
|
-
...
|
|
3733
|
+
...Nn(i)
|
|
3659
3734
|
}, e.name)), /* @__PURE__ */ d("button", {
|
|
3660
3735
|
type: "submit",
|
|
3661
3736
|
style: {
|
|
@@ -3668,12 +3743,12 @@ function $n({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
3668
3743
|
fontWeight: 600,
|
|
3669
3744
|
cursor: i ? "default" : "pointer"
|
|
3670
3745
|
},
|
|
3671
|
-
...
|
|
3746
|
+
...Nn(i),
|
|
3672
3747
|
children: t
|
|
3673
3748
|
})]
|
|
3674
3749
|
});
|
|
3675
3750
|
}
|
|
3676
|
-
function
|
|
3751
|
+
function nr({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
|
|
3677
3752
|
return e.length ? /* @__PURE__ */ d("nav", {
|
|
3678
3753
|
ref: r,
|
|
3679
3754
|
"aria-label": "Breadcrumb",
|
|
@@ -3723,7 +3798,7 @@ function er({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
|
|
|
3723
3798
|
})
|
|
3724
3799
|
}) : null;
|
|
3725
3800
|
}
|
|
3726
|
-
function
|
|
3801
|
+
function rr({ 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 }) {
|
|
3727
3802
|
let { tenant: g, apiUrl: _ } = i(Q), v = i(Qe), [y, b] = l(null), x = o ? Number(v?.[`${o}:total`]) : NaN;
|
|
3728
3803
|
a(() => {
|
|
3729
3804
|
if (!o || Number.isFinite(x)) return;
|
|
@@ -3808,15 +3883,15 @@ function tr({ pages: e = 5, current: t = 1, prevNext: n = !0, href: r = "#", sou
|
|
|
3808
3883
|
]
|
|
3809
3884
|
});
|
|
3810
3885
|
}
|
|
3811
|
-
var
|
|
3886
|
+
var ir = "webim.page_mode", ar = () => {
|
|
3812
3887
|
if (typeof window > "u") return "auto";
|
|
3813
3888
|
try {
|
|
3814
|
-
let e = window.localStorage.getItem(
|
|
3889
|
+
let e = window.localStorage.getItem(ir);
|
|
3815
3890
|
return e === "light" || e === "dark" ? e : "auto";
|
|
3816
3891
|
} catch {
|
|
3817
3892
|
return "auto";
|
|
3818
3893
|
}
|
|
3819
|
-
},
|
|
3894
|
+
}, or = (e) => {
|
|
3820
3895
|
let t = {
|
|
3821
3896
|
width: 16,
|
|
3822
3897
|
height: 16,
|
|
@@ -3848,13 +3923,13 @@ var nr = "webim.page_mode", rr = () => {
|
|
|
3848
3923
|
rx: "2"
|
|
3849
3924
|
}), /* @__PURE__ */ d("path", { d: "M8 21h8M12 17v4" })]
|
|
3850
3925
|
});
|
|
3851
|
-
},
|
|
3926
|
+
}, sr = {
|
|
3852
3927
|
light: "Light theme",
|
|
3853
3928
|
dark: "Dark theme",
|
|
3854
3929
|
auto: "Follow the device theme"
|
|
3855
3930
|
};
|
|
3856
|
-
function
|
|
3857
|
-
let [o, s] = l(i ? "auto" :
|
|
3931
|
+
function cr({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
|
|
3932
|
+
let [o, s] = l(i ? "auto" : ar), u = c(null), f = (e) => {
|
|
3858
3933
|
u.current = e, typeof r == "function" && r(e);
|
|
3859
3934
|
};
|
|
3860
3935
|
a(() => {
|
|
@@ -3862,7 +3937,7 @@ function or({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
|
|
|
3862
3937
|
let e = u.current?.closest?.(".webim-page");
|
|
3863
3938
|
e && (o === "light" || o === "dark" ? e.setAttribute("data-webim-mode", o) : e.removeAttribute("data-webim-mode"));
|
|
3864
3939
|
try {
|
|
3865
|
-
o === "auto" ? window.localStorage.removeItem(
|
|
3940
|
+
o === "auto" ? window.localStorage.removeItem(ir) : window.localStorage.setItem(ir, o);
|
|
3866
3941
|
} catch {}
|
|
3867
3942
|
}, [o, i]);
|
|
3868
3943
|
let p = t === !1 ? ["light", "dark"] : [
|
|
@@ -3897,8 +3972,8 @@ function or({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
|
|
|
3897
3972
|
},
|
|
3898
3973
|
children: p.map((e) => /* @__PURE__ */ d("button", {
|
|
3899
3974
|
type: "button",
|
|
3900
|
-
title:
|
|
3901
|
-
"aria-label":
|
|
3975
|
+
title: sr[e],
|
|
3976
|
+
"aria-label": sr[e],
|
|
3902
3977
|
"aria-pressed": e === m,
|
|
3903
3978
|
onClick: i ? void 0 : () => s(e),
|
|
3904
3979
|
style: {
|
|
@@ -3909,15 +3984,15 @@ function or({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
|
|
|
3909
3984
|
background: e === m ? "var(--page-accent, #111827)" : "transparent",
|
|
3910
3985
|
opacity: e === m ? 1 : .7
|
|
3911
3986
|
},
|
|
3912
|
-
children:
|
|
3987
|
+
children: or(e)
|
|
3913
3988
|
}, e))
|
|
3914
3989
|
});
|
|
3915
3990
|
let g = p[(p.indexOf(m) + 1) % p.length];
|
|
3916
3991
|
return /* @__PURE__ */ d("button", {
|
|
3917
3992
|
ref: f,
|
|
3918
3993
|
type: "button",
|
|
3919
|
-
title:
|
|
3920
|
-
"aria-label": `Theme: ${
|
|
3994
|
+
title: sr[m],
|
|
3995
|
+
"aria-label": `Theme: ${sr[m]} — switch to ${sr[g]}`,
|
|
3921
3996
|
onClick: i ? void 0 : () => s(g),
|
|
3922
3997
|
style: {
|
|
3923
3998
|
...h,
|
|
@@ -3926,10 +4001,10 @@ function or({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
|
|
|
3926
4001
|
border: "1px solid rgba(148, 163, 184, 0.4)",
|
|
3927
4002
|
...P(n)
|
|
3928
4003
|
},
|
|
3929
|
-
children:
|
|
4004
|
+
children: or(m)
|
|
3930
4005
|
});
|
|
3931
4006
|
}
|
|
3932
|
-
function
|
|
4007
|
+
function lr(e) {
|
|
3933
4008
|
let t = e?.parentElement;
|
|
3934
4009
|
for (; t && t !== document.body;) {
|
|
3935
4010
|
let e = getComputedStyle(t).overflowY;
|
|
@@ -3938,7 +4013,7 @@ function sr(e) {
|
|
|
3938
4013
|
}
|
|
3939
4014
|
return window;
|
|
3940
4015
|
}
|
|
3941
|
-
var
|
|
4016
|
+
var ur = (e) => e === window ? window.scrollY : e.scrollTop, dr = {
|
|
3942
4017
|
"bottom-right": (e) => ({
|
|
3943
4018
|
right: e,
|
|
3944
4019
|
bottom: e
|
|
@@ -3952,11 +4027,11 @@ var cr = (e) => e === window ? window.scrollY : e.scrollTop, lr = {
|
|
|
3952
4027
|
bottom: e,
|
|
3953
4028
|
transform: "translateX(-50%)"
|
|
3954
4029
|
})
|
|
3955
|
-
},
|
|
4030
|
+
}, fr = {
|
|
3956
4031
|
linear: (e) => e,
|
|
3957
4032
|
out: (e) => 1 - (1 - e) ** 3,
|
|
3958
4033
|
inout: (e) => e < .5 ? 4 * e * e * e : 1 - (-2 * e + 2) ** 3 / 2
|
|
3959
|
-
},
|
|
4034
|
+
}, pr = (e) => {
|
|
3960
4035
|
let t = e.getBoundingClientRect(), n = e.parentElement;
|
|
3961
4036
|
for (; n && n !== document.body;) {
|
|
3962
4037
|
let e = getComputedStyle(n);
|
|
@@ -3964,12 +4039,12 @@ var cr = (e) => e === window ? window.scrollY : e.scrollTop, lr = {
|
|
|
3964
4039
|
n = n.parentElement;
|
|
3965
4040
|
}
|
|
3966
4041
|
return !n || n === document.body ? Math.max(document.documentElement.scrollHeight - (t.bottom + window.scrollY), 0) : Math.max(n.scrollHeight - (t.bottom - n.getBoundingClientRect().top + n.scrollTop), 0);
|
|
3967
|
-
},
|
|
4042
|
+
}, mr = (e, t) => {
|
|
3968
4043
|
let n = typeof e == "number" ? e : parseFloat(e);
|
|
3969
4044
|
return Number.isFinite(n) ? n : t;
|
|
3970
4045
|
};
|
|
3971
|
-
function
|
|
3972
|
-
let i = Math.min(Math.max(Math.round(
|
|
4046
|
+
function hr(e, { locale: t, decimals: n = 0, separator: r = "auto" } = {}) {
|
|
4047
|
+
let i = Math.min(Math.max(Math.round(mr(n, 0)), 0), 6);
|
|
3973
4048
|
try {
|
|
3974
4049
|
return new Intl.NumberFormat(t || void 0, {
|
|
3975
4050
|
minimumFractionDigits: i,
|
|
@@ -3980,8 +4055,8 @@ function pr(e, { locale: t, decimals: n = 0, separator: r = "auto" } = {}) {
|
|
|
3980
4055
|
return e.toFixed(i);
|
|
3981
4056
|
}
|
|
3982
4057
|
}
|
|
3983
|
-
function
|
|
3984
|
-
let { locale: C } = i(Q), w = Math.max(
|
|
4058
|
+
function gr({ from: e, to: t, duration: n, delay: r, decimals: o, prefix: s, suffix: u, separator: p, easing: m, trigger: h, offset: g, once: _, label: v, align: y, style: b, nodeRef: x, inert: S }) {
|
|
4059
|
+
let { locale: C } = i(Q), w = Math.max(mr(g, 0), 0), T = mr(e, 0), E = mr(t, 100), [D, O] = l(E), k = c(null), [A, j] = l(!1);
|
|
3985
4060
|
return a(() => {
|
|
3986
4061
|
let e = k.current;
|
|
3987
4062
|
if (S || !A || !e) {
|
|
@@ -3989,7 +4064,7 @@ function mr({ from: e, to: t, duration: n, delay: r, decimals: o, prefix: s, suf
|
|
|
3989
4064
|
return;
|
|
3990
4065
|
}
|
|
3991
4066
|
O(T);
|
|
3992
|
-
let t = Math.max(
|
|
4067
|
+
let t = Math.max(mr(n, 2e3), 0), i = Math.max(mr(r, 0), 0), a = fr[m] || fr.out, o = typeof window < "u" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches, s = 0, c = 0, l = !1, u = () => {
|
|
3993
4068
|
if (cancelAnimationFrame(s), clearTimeout(c), o || t === 0) {
|
|
3994
4069
|
O(E);
|
|
3995
4070
|
return;
|
|
@@ -4009,7 +4084,7 @@ function mr({ from: e, to: t, duration: n, delay: r, decimals: o, prefix: s, suf
|
|
|
4009
4084
|
let t = e.some((e) => e.isIntersecting);
|
|
4010
4085
|
t && (!l || _ === !1) ? (l = !0, u()) : !t && _ === !1 && (cancelAnimationFrame(s), clearTimeout(c), O(T));
|
|
4011
4086
|
}, {
|
|
4012
|
-
rootMargin: `0px 0px -${Math.min(w, Math.floor(
|
|
4087
|
+
rootMargin: `0px 0px -${Math.min(w, Math.floor(pr(e)))}px 0px`,
|
|
4013
4088
|
threshold: w > 0 ? 0 : .3
|
|
4014
4089
|
});
|
|
4015
4090
|
return d.observe(e), () => {
|
|
@@ -4049,7 +4124,7 @@ function mr({ from: e, to: t, duration: n, delay: r, decimals: o, prefix: s, suf
|
|
|
4049
4124
|
},
|
|
4050
4125
|
children: [
|
|
4051
4126
|
s || "",
|
|
4052
|
-
|
|
4127
|
+
hr(D, {
|
|
4053
4128
|
locale: C,
|
|
4054
4129
|
decimals: o,
|
|
4055
4130
|
separator: p
|
|
@@ -4067,7 +4142,7 @@ function mr({ from: e, to: t, duration: n, delay: r, decimals: o, prefix: s, suf
|
|
|
4067
4142
|
}) : null]
|
|
4068
4143
|
});
|
|
4069
4144
|
}
|
|
4070
|
-
function
|
|
4145
|
+
function _r({ 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 }) {
|
|
4071
4146
|
let [_, v] = l(!!m), [y, b] = l(null), x = (e) => {
|
|
4072
4147
|
b(e), typeof p == "function" && p(e);
|
|
4073
4148
|
};
|
|
@@ -4078,8 +4153,8 @@ function hr({ variant: e, label: t, position: n, offset: r, showAfter: i, smooth
|
|
|
4078
4153
|
}
|
|
4079
4154
|
if (!y) return;
|
|
4080
4155
|
let e = Number(i) >= 0 ? Number(i) : 300, t = () => {
|
|
4081
|
-
let t =
|
|
4082
|
-
v(n ||
|
|
4156
|
+
let t = lr(y), n = g && !(t === window ? document.documentElement.scrollHeight > window.innerHeight : t.scrollHeight > t.clientHeight);
|
|
4157
|
+
v(n || ur(t) > e);
|
|
4083
4158
|
};
|
|
4084
4159
|
return t(), document.addEventListener("scroll", t, {
|
|
4085
4160
|
capture: !0,
|
|
@@ -4093,7 +4168,7 @@ function hr({ variant: e, label: t, position: n, offset: r, showAfter: i, smooth
|
|
|
4093
4168
|
]);
|
|
4094
4169
|
let S = () => {
|
|
4095
4170
|
if (m) return;
|
|
4096
|
-
let e =
|
|
4171
|
+
let e = lr(y), t = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches, n = o === !1 || t ? "auto" : "smooth";
|
|
4097
4172
|
e === window ? window.scrollTo({
|
|
4098
4173
|
top: 0,
|
|
4099
4174
|
behavior: n
|
|
@@ -4101,7 +4176,7 @@ function hr({ variant: e, label: t, position: n, offset: r, showAfter: i, smooth
|
|
|
4101
4176
|
top: 0,
|
|
4102
4177
|
behavior: n
|
|
4103
4178
|
});
|
|
4104
|
-
}, C = Number(r) >= 0 ? Number(r) : 24, w = e === "pill", T = t || "Top", E =
|
|
4179
|
+
}, C = Number(r) >= 0 ? Number(r) : 24, w = e === "pill", T = t || "Top", E = dr[n] ? n : "bottom-right", D = h ? {
|
|
4105
4180
|
position: "fixed",
|
|
4106
4181
|
zIndex: 5,
|
|
4107
4182
|
bottom: (h.bottom ?? 0) + C,
|
|
@@ -4114,7 +4189,7 @@ function hr({ variant: e, label: t, position: n, offset: r, showAfter: i, smooth
|
|
|
4114
4189
|
} : {
|
|
4115
4190
|
position: "fixed",
|
|
4116
4191
|
zIndex: 2147482e3,
|
|
4117
|
-
...
|
|
4192
|
+
...dr[E](C)
|
|
4118
4193
|
};
|
|
4119
4194
|
return /* @__PURE__ */ f("button", {
|
|
4120
4195
|
ref: x,
|
|
@@ -4165,7 +4240,7 @@ function hr({ variant: e, label: t, position: n, offset: r, showAfter: i, smooth
|
|
|
4165
4240
|
}), w ? /* @__PURE__ */ d("span", { children: T }) : null]
|
|
4166
4241
|
});
|
|
4167
4242
|
}
|
|
4168
|
-
var
|
|
4243
|
+
var vr = {
|
|
4169
4244
|
facebook: {
|
|
4170
4245
|
label: "Facebook",
|
|
4171
4246
|
color: "#1877f2",
|
|
@@ -4232,8 +4307,8 @@ var gr = {
|
|
|
4232
4307
|
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"
|
|
4233
4308
|
}
|
|
4234
4309
|
};
|
|
4235
|
-
function
|
|
4236
|
-
let l = Array.isArray(e) ? e.filter((e) => e &&
|
|
4310
|
+
function yr({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, style: o, nodeRef: s, inert: c }) {
|
|
4311
|
+
let l = Array.isArray(e) ? e.filter((e) => e && vr[e.network]) : [];
|
|
4237
4312
|
if (!l.length) return null;
|
|
4238
4313
|
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;
|
|
4239
4314
|
return /* @__PURE__ */ d("div", {
|
|
@@ -4246,7 +4321,7 @@ function _r({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, s
|
|
|
4246
4321
|
...P(o)
|
|
4247
4322
|
},
|
|
4248
4323
|
children: l.map((e, r) => {
|
|
4249
|
-
let i =
|
|
4324
|
+
let i = vr[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);
|
|
4250
4325
|
return /* @__PURE__ */ d("a", {
|
|
4251
4326
|
href: e.url || "#",
|
|
4252
4327
|
onClick: h,
|
|
@@ -4280,7 +4355,7 @@ function _r({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, s
|
|
|
4280
4355
|
})
|
|
4281
4356
|
});
|
|
4282
4357
|
}
|
|
4283
|
-
function
|
|
4358
|
+
function br({ steps: e = [], active: n = 1, vertical: r = !1, style: i, nodeRef: a }) {
|
|
4284
4359
|
if (!e.length) return null;
|
|
4285
4360
|
let o = Math.min(Math.max(Number(n) || 1, 1), e.length), s = (e) => ({
|
|
4286
4361
|
width: 32,
|
|
@@ -4358,7 +4433,7 @@ function vr({ steps: e = [], active: n = 1, vertical: r = !1, style: i, nodeRef:
|
|
|
4358
4433
|
})
|
|
4359
4434
|
});
|
|
4360
4435
|
}
|
|
4361
|
-
var
|
|
4436
|
+
var xr = {
|
|
4362
4437
|
small: {
|
|
4363
4438
|
w: 132,
|
|
4364
4439
|
h: 46,
|
|
@@ -4380,21 +4455,21 @@ var yr = {
|
|
|
4380
4455
|
title: 12.5,
|
|
4381
4456
|
avatar: 46
|
|
4382
4457
|
}
|
|
4383
|
-
},
|
|
4384
|
-
|
|
4385
|
-
var
|
|
4458
|
+
}, Sr = (e) => xr[e] ?? xr.medium;
|
|
4459
|
+
xr.medium.w, xr.medium.h;
|
|
4460
|
+
var Cr = (e) => String(e?.group ?? "").trim(), wr = (e) => {
|
|
4386
4461
|
let t = [], n = /* @__PURE__ */ new Map();
|
|
4387
4462
|
return e.forEach((e, r) => {
|
|
4388
|
-
let i =
|
|
4463
|
+
let i = Cr(e) || `#${r}`;
|
|
4389
4464
|
n.has(i) || (n.set(i, []), t.push(i)), n.get(i).push(e);
|
|
4390
4465
|
}), t.flatMap((e) => n.get(e));
|
|
4391
4466
|
};
|
|
4392
|
-
function
|
|
4393
|
-
let i =
|
|
4467
|
+
function Tr(e, { size: t = "medium", horizontal: n = !1, groupTitles: r = "top" } = {}) {
|
|
4468
|
+
let i = Sr(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 = [];
|
|
4394
4469
|
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);
|
|
4395
|
-
d =
|
|
4396
|
-
for (let [e, t] of u) u.set(e,
|
|
4397
|
-
let f = (e, t) => o + (
|
|
4470
|
+
d = wr(d);
|
|
4471
|
+
for (let [e, t] of u) u.set(e, wr(t));
|
|
4472
|
+
let f = (e, t) => o + (Cr(e) !== Cr(t) && (Cr(e) || Cr(t)) ? 24 : 0), p = /* @__PURE__ */ new Map(), m = (e, t) => {
|
|
4398
4473
|
if (t.has(e.id)) return 0;
|
|
4399
4474
|
t.add(e.id);
|
|
4400
4475
|
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);
|
|
@@ -4410,7 +4485,7 @@ function Cr(e, { size: t = "medium", horizontal: n = !1, groupTitles: r = "top"
|
|
|
4410
4485
|
x: m,
|
|
4411
4486
|
y: b
|
|
4412
4487
|
});
|
|
4413
|
-
let x =
|
|
4488
|
+
let x = Cr(e);
|
|
4414
4489
|
if (x) {
|
|
4415
4490
|
let t = `${e.parent && l.has(e.parent) && e.parent !== e.id ? e.parent : ""}|${x}`;
|
|
4416
4491
|
_.has(t) || _.set(t, {
|
|
@@ -4484,18 +4559,18 @@ function Cr(e, { size: t = "medium", horizontal: n = !1, groupTitles: r = "top"
|
|
|
4484
4559
|
horizontal: n
|
|
4485
4560
|
};
|
|
4486
4561
|
}
|
|
4487
|
-
var
|
|
4562
|
+
var Er = (e, t) => {
|
|
4488
4563
|
let n = String(e ?? "");
|
|
4489
4564
|
return n.length > t ? `${n.slice(0, t - 1)}…` : n;
|
|
4490
|
-
},
|
|
4565
|
+
}, Dr = (e) => {
|
|
4491
4566
|
let t = /^#([0-9a-f]{6}|[0-9a-f]{3})$/i.exec(String(e ?? "").trim());
|
|
4492
4567
|
if (!t) return "#ffffff";
|
|
4493
4568
|
let n = t[1];
|
|
4494
4569
|
n.length === 3 && (n = [...n].map((e) => e + e).join(""));
|
|
4495
4570
|
let r = parseInt(n, 16);
|
|
4496
4571
|
return .299 * (r >> 16 & 255) + .587 * (r >> 8 & 255) + .114 * (r & 255) > 150 ? "#111827" : "#ffffff";
|
|
4497
|
-
},
|
|
4498
|
-
function
|
|
4572
|
+
}, Or = (e) => !!(e?.cv?.trim?.() || e?.photo);
|
|
4573
|
+
function kr(e, t = {}) {
|
|
4499
4574
|
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 ? "" : ot(e);
|
|
4500
4575
|
return n.map((e) => {
|
|
4501
4576
|
let n = e.data ?? {}, a = r(n[t.parentField]), o = a && typeof a == "object" ? a.id ?? null : a || null;
|
|
@@ -4511,11 +4586,11 @@ function Dr(e, t = {}) {
|
|
|
4511
4586
|
};
|
|
4512
4587
|
});
|
|
4513
4588
|
}
|
|
4514
|
-
var
|
|
4589
|
+
var Ar = {
|
|
4515
4590
|
size: 36,
|
|
4516
4591
|
pad: 10
|
|
4517
4592
|
};
|
|
4518
|
-
function
|
|
4593
|
+
function jr({ node: e, onClose: t }) {
|
|
4519
4594
|
return a(() => {
|
|
4520
4595
|
let e = (e) => e.key === "Escape" && t();
|
|
4521
4596
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
@@ -4636,7 +4711,7 @@ function kr({ node: e, onClose: t }) {
|
|
|
4636
4711
|
})
|
|
4637
4712
|
});
|
|
4638
4713
|
}
|
|
4639
|
-
function
|
|
4714
|
+
function Mr({ 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 }) {
|
|
4640
4715
|
let C = o(), [w, T] = l(null), { tenant: E, apiUrl: D } = i(Q), O = i(Qe)?.[t], [k, A] = l(null);
|
|
4641
4716
|
a(() => {
|
|
4642
4717
|
if (!t || O) return;
|
|
@@ -4653,7 +4728,7 @@ function Ar({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
4653
4728
|
D,
|
|
4654
4729
|
O
|
|
4655
4730
|
]);
|
|
4656
|
-
let j = t ?
|
|
4731
|
+
let j = t ? kr(O ?? k ?? [], {
|
|
4657
4732
|
nameField: n,
|
|
4658
4733
|
titleField: r,
|
|
4659
4734
|
photoField: s,
|
|
@@ -4661,7 +4736,7 @@ function Ar({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
4661
4736
|
cvField: p,
|
|
4662
4737
|
hrefField: m,
|
|
4663
4738
|
groupField: h
|
|
4664
|
-
}) : e, M =
|
|
4739
|
+
}) : e, M = Sr(v), { boxes: N, links: F, groups: I, width: L, height: R } = Tr(j, {
|
|
4665
4740
|
size: v,
|
|
4666
4741
|
horizontal: y,
|
|
4667
4742
|
groupTitles: g
|
|
@@ -4719,8 +4794,8 @@ function Ar({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
4719
4794
|
fontSize: M.title + 1,
|
|
4720
4795
|
fontWeight: "600",
|
|
4721
4796
|
opacity: "0.55",
|
|
4722
|
-
fill: r ?
|
|
4723
|
-
children:
|
|
4797
|
+
fill: r ? Dr(e.color || _) : "var(--page-text, #111827)",
|
|
4798
|
+
children: Er(e.title, Math.floor(e.width / 7))
|
|
4724
4799
|
})] }, `group-${t}`);
|
|
4725
4800
|
}),
|
|
4726
4801
|
F.map((e, t) => /* @__PURE__ */ d("path", {
|
|
@@ -4730,7 +4805,7 @@ function Ar({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
4730
4805
|
strokeWidth: "1.5"
|
|
4731
4806
|
}, t)),
|
|
4732
4807
|
N.map(({ node: e, x: t, y: n }) => {
|
|
4733
|
-
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 ?
|
|
4808
|
+
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 ? Dr(e.color) : r ? "var(--page-accent-text, #ffffff)" : "var(--page-text, #111827)", c = i ? Dr(e.color2) : s, l = S && (Or(e) || e.href), p = () => Or(e) ? T(e) : window.open(e.href, "_blank", "noreferrer"), m = e.photo ? t + Ar.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);
|
|
4734
4809
|
return /* @__PURE__ */ f("g", {
|
|
4735
4810
|
onClick: l ? p : void 0,
|
|
4736
4811
|
style: l ? { cursor: "pointer" } : void 0,
|
|
@@ -4794,13 +4869,13 @@ function Ar({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
4794
4869
|
e.photo && /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("clipPath", {
|
|
4795
4870
|
id: `${C}-${e.id}`,
|
|
4796
4871
|
children: /* @__PURE__ */ d("circle", {
|
|
4797
|
-
cx: t +
|
|
4872
|
+
cx: t + Ar.pad + M.avatar / 2,
|
|
4798
4873
|
cy: n + M.h / 2,
|
|
4799
4874
|
r: M.avatar / 2
|
|
4800
4875
|
})
|
|
4801
4876
|
}), /* @__PURE__ */ d("image", {
|
|
4802
4877
|
href: e.photo,
|
|
4803
|
-
x: t +
|
|
4878
|
+
x: t + Ar.pad,
|
|
4804
4879
|
y: n + (M.h - M.avatar) / 2,
|
|
4805
4880
|
width: M.avatar,
|
|
4806
4881
|
height: M.avatar,
|
|
@@ -4814,7 +4889,7 @@ function Ar({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
4814
4889
|
fontSize: M.title,
|
|
4815
4890
|
fontWeight: "600",
|
|
4816
4891
|
fill: s,
|
|
4817
|
-
children:
|
|
4892
|
+
children: Er(e.title, g + 4)
|
|
4818
4893
|
}), e.name && /* @__PURE__ */ d("text", {
|
|
4819
4894
|
x: m,
|
|
4820
4895
|
y: n + _ + _ / 2 + M.name * .35,
|
|
@@ -4822,7 +4897,7 @@ function Ar({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
4822
4897
|
fontSize: M.name,
|
|
4823
4898
|
fontWeight: "600",
|
|
4824
4899
|
fill: c,
|
|
4825
|
-
children:
|
|
4900
|
+
children: Er(e.name, g)
|
|
4826
4901
|
})] }) : /* @__PURE__ */ f(u, { children: [v[0] && /* @__PURE__ */ d("text", {
|
|
4827
4902
|
x: m,
|
|
4828
4903
|
y: n + (v[1] ? M.h * .43 : M.h * .57),
|
|
@@ -4830,7 +4905,7 @@ function Ar({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
4830
4905
|
fontSize: M.name,
|
|
4831
4906
|
fontWeight: "600",
|
|
4832
4907
|
fill: s,
|
|
4833
|
-
children:
|
|
4908
|
+
children: Er(v[0], g)
|
|
4834
4909
|
}), v[1] && /* @__PURE__ */ d("text", {
|
|
4835
4910
|
x: m,
|
|
4836
4911
|
y: n + M.h * .73,
|
|
@@ -4838,19 +4913,19 @@ function Ar({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
|
|
|
4838
4913
|
fontSize: M.title,
|
|
4839
4914
|
opacity: "0.7",
|
|
4840
4915
|
fill: s,
|
|
4841
|
-
children:
|
|
4916
|
+
children: Er(v[1], g + 4)
|
|
4842
4917
|
})] })
|
|
4843
4918
|
]
|
|
4844
4919
|
}, e.id);
|
|
4845
4920
|
})
|
|
4846
4921
|
]
|
|
4847
|
-
}), w && /* @__PURE__ */ d(
|
|
4922
|
+
}), w && /* @__PURE__ */ d(jr, {
|
|
4848
4923
|
node: w,
|
|
4849
4924
|
onClose: () => T(null)
|
|
4850
4925
|
})]
|
|
4851
4926
|
});
|
|
4852
4927
|
}
|
|
4853
|
-
function
|
|
4928
|
+
function Nr({ value: e, onCommit: t, style: n, hint: r }) {
|
|
4854
4929
|
let [i, o] = l(!1), s = c(null);
|
|
4855
4930
|
return a(() => {
|
|
4856
4931
|
if (!i || !s.current) return;
|
|
@@ -4880,7 +4955,7 @@ function jr({ value: e, onCommit: t, style: n, hint: r }) {
|
|
|
4880
4955
|
children: e ?? ""
|
|
4881
4956
|
});
|
|
4882
4957
|
}
|
|
4883
|
-
var
|
|
4958
|
+
var Pr = 360, Fr = "\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", Ir = (e, t) => e && t ? `cell-${e}-${t}` : "", Lr = (e) => {
|
|
4884
4959
|
if (!e || typeof e != "object") return e ?? "";
|
|
4885
4960
|
let t = String(e.text ?? "");
|
|
4886
4961
|
return typeof e.href == "string" && e.href ? /* @__PURE__ */ d("a", {
|
|
@@ -4891,7 +4966,7 @@ var Mr = 360, Nr = "\n.wb-tedit-btn {\n cursor: pointer;\n border-radius: 4px;
|
|
|
4891
4966
|
children: t
|
|
4892
4967
|
}) : t;
|
|
4893
4968
|
};
|
|
4894
|
-
function
|
|
4969
|
+
function Rr({ 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 }) {
|
|
4895
4970
|
let F = c(null), I = c(null), [L, R] = l(null), [z, B] = l(null), V = (e, t) => () => R({
|
|
4896
4971
|
r: e,
|
|
4897
4972
|
c: t
|
|
@@ -4905,7 +4980,7 @@ function Ir({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
|
|
|
4905
4980
|
}
|
|
4906
4981
|
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = {
|
|
4907
4982
|
top: r.bottom - n.top + 4,
|
|
4908
|
-
left: Math.max(0, Math.min(r.left - n.left, n.width -
|
|
4983
|
+
left: Math.max(0, Math.min(r.left - n.left, n.width - Pr))
|
|
4909
4984
|
};
|
|
4910
4985
|
(z?.top !== i.top || z?.left !== i.left) && B(i);
|
|
4911
4986
|
}), a(() => {
|
|
@@ -4961,7 +5036,7 @@ function Ir({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
|
|
|
4961
5036
|
window.addEventListener("pointermove", l), window.addEventListener("pointerup", u);
|
|
4962
5037
|
}, ye = /* @__PURE__ */ new Set();
|
|
4963
5038
|
p && q.forEach((t, n) => e.forEach((e, t) => {
|
|
4964
|
-
let i = p[
|
|
5039
|
+
let i = p[Ir(r[n], o[t])];
|
|
4965
5040
|
if (!i) return;
|
|
4966
5041
|
let a = Math.max(1, Number(i.c) || 1), s = Math.max(1, Number(i.r) || 1);
|
|
4967
5042
|
for (let e = 0; e < s; e++) for (let r = 0; r < a; r++) (e || r) && ye.add(`${n + e},${t + r}`);
|
|
@@ -4984,7 +5059,7 @@ function Ir({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
|
|
|
4984
5059
|
},
|
|
4985
5060
|
onClick: n,
|
|
4986
5061
|
children: e
|
|
4987
|
-
}, t), X = L && L.r < q.length && L.c < e.length ? L : null, Z = (e, t) => N?.labels?.[e] ?? t, xe = X ? p?.[
|
|
5062
|
+
}, t), X = L && L.r < q.length && L.c < e.length ? L : null, Z = (e, t) => N?.labels?.[e] ?? t, xe = X ? p?.[Ir(r[X.r], o[X.c])] : null, Se = Math.max(1, Number(xe?.c) || 1), Ce = Math.max(1, Number(xe?.r) || 1);
|
|
4988
5063
|
return /* @__PURE__ */ f("div", {
|
|
4989
5064
|
ref: (e) => {
|
|
4990
5065
|
I.current = e, typeof M == "function" && M(e);
|
|
@@ -4995,7 +5070,7 @@ function Ir({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
|
|
|
4995
5070
|
...ge
|
|
4996
5071
|
},
|
|
4997
5072
|
children: [
|
|
4998
|
-
N && /* @__PURE__ */ d("style", { children:
|
|
5073
|
+
N && /* @__PURE__ */ d("style", { children: Fr }),
|
|
4999
5074
|
N && X && z && /* @__PURE__ */ f("div", {
|
|
5000
5075
|
className: "wb-tedit-bar",
|
|
5001
5076
|
style: {
|
|
@@ -5061,7 +5136,7 @@ function Ir({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
|
|
|
5061
5136
|
} : N ? { position: "relative" } : null,
|
|
5062
5137
|
...se
|
|
5063
5138
|
},
|
|
5064
|
-
children: N ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(
|
|
5139
|
+
children: N ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(Nr, {
|
|
5065
5140
|
value: t.label ?? t,
|
|
5066
5141
|
onCommit: (e) => N.header(n, e),
|
|
5067
5142
|
hint: Z("editCell", "Double-click to edit"),
|
|
@@ -5089,7 +5164,7 @@ function Ir({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
|
|
|
5089
5164
|
},
|
|
5090
5165
|
children: e.map((e, i) => {
|
|
5091
5166
|
if (ye.has(`${n},${i}`)) return null;
|
|
5092
|
-
let a =
|
|
5167
|
+
let a = Ir(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);
|
|
5093
5168
|
return /* @__PURE__ */ f("td", {
|
|
5094
5169
|
className: N ? `wb-tedit-cell${L?.r === n && L?.c === i ? " wb-tedit-cellon" : ""}` : void 0,
|
|
5095
5170
|
onMouseDownCapture: _e ? V(n, i) : void 0,
|
|
@@ -5102,7 +5177,7 @@ function Ir({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
|
|
|
5102
5177
|
...N ? { position: "relative" } : null,
|
|
5103
5178
|
...se
|
|
5104
5179
|
},
|
|
5105
|
-
children: [s ??
|
|
5180
|
+
children: [s ?? Lr(t?.[i]), N && _e && /* @__PURE__ */ d("span", {
|
|
5106
5181
|
className: "wb-tedit-rowgrip",
|
|
5107
5182
|
title: Z("rowHeight", "Drag to set the row height — double-click to fit the content"),
|
|
5108
5183
|
onPointerDown: be(n),
|
|
@@ -5117,7 +5192,7 @@ function Ir({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
|
|
|
5117
5192
|
]
|
|
5118
5193
|
});
|
|
5119
5194
|
}
|
|
5120
|
-
var
|
|
5195
|
+
var zr = {
|
|
5121
5196
|
small: {
|
|
5122
5197
|
cell: 62,
|
|
5123
5198
|
font: 10.5,
|
|
@@ -5142,8 +5217,8 @@ var Lr = {
|
|
|
5142
5217
|
pad: 8,
|
|
5143
5218
|
gap: 4
|
|
5144
5219
|
}
|
|
5145
|
-
},
|
|
5146
|
-
function
|
|
5220
|
+
}, Br = (e) => `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`, Vr = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), Hr = 366;
|
|
5221
|
+
function Ur(e, t = {}) {
|
|
5147
5222
|
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 ? "" : ot(e), a = (e) => {
|
|
5148
5223
|
let t = i(r(e)), n = t ? new Date(t) : null;
|
|
5149
5224
|
return n && !Number.isNaN(n.getTime()) ? n : null;
|
|
@@ -5160,7 +5235,7 @@ function Vr(e, t = {}) {
|
|
|
5160
5235
|
} : null;
|
|
5161
5236
|
}).filter(Boolean);
|
|
5162
5237
|
}
|
|
5163
|
-
function
|
|
5238
|
+
function Wr(e) {
|
|
5164
5239
|
return (Array.isArray(e) ? e : []).map((e, t) => {
|
|
5165
5240
|
let n = e?.start ? new Date(e.start) : null;
|
|
5166
5241
|
if (!n || Number.isNaN(n.getTime())) return null;
|
|
@@ -5175,19 +5250,19 @@ function Hr(e) {
|
|
|
5175
5250
|
};
|
|
5176
5251
|
}).filter(Boolean);
|
|
5177
5252
|
}
|
|
5178
|
-
function
|
|
5253
|
+
function Gr(e) {
|
|
5179
5254
|
let t = /* @__PURE__ */ new Map();
|
|
5180
5255
|
for (let n of e) {
|
|
5181
|
-
let e =
|
|
5256
|
+
let e = Vr(n.start), r = n.end ? Vr(n.end) : e, i = Math.min(Math.max(0, Math.round((r - e) / 864e5)), Hr);
|
|
5182
5257
|
for (let r = 0; r <= i; r += 1) {
|
|
5183
|
-
let i =
|
|
5258
|
+
let i = Br(new Date(e.getFullYear(), e.getMonth(), e.getDate() + r));
|
|
5184
5259
|
t.has(i) || t.set(i, []), t.get(i).push(n);
|
|
5185
5260
|
}
|
|
5186
5261
|
}
|
|
5187
5262
|
for (let e of t.values()) e.sort((e, t) => e.start - t.start);
|
|
5188
5263
|
return t;
|
|
5189
5264
|
}
|
|
5190
|
-
function
|
|
5265
|
+
function Kr({ 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 }) {
|
|
5191
5266
|
let { tenant: T, apiUrl: E, locale: D } = i(Q), O = i(Qe)?.[t], [k, A] = l(null), [j, M] = l(() => {
|
|
5192
5267
|
let e = /* @__PURE__ */ new Date();
|
|
5193
5268
|
return {
|
|
@@ -5210,13 +5285,13 @@ function Wr({ events: e = [], source: t = "", titleField: n = "", startField: r
|
|
|
5210
5285
|
E,
|
|
5211
5286
|
O
|
|
5212
5287
|
]);
|
|
5213
|
-
let N =
|
|
5288
|
+
let N = zr[m] ?? zr.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 ? Ur(O ?? k ?? [], {
|
|
5214
5289
|
titleField: n,
|
|
5215
5290
|
startField: r,
|
|
5216
5291
|
endField: o,
|
|
5217
5292
|
hrefField: s,
|
|
5218
5293
|
colorField: c
|
|
5219
|
-
}) :
|
|
5294
|
+
}) : Wr(e), B = Gr(z), V = D || void 0, H = (e, t) => {
|
|
5220
5295
|
let n = /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("span", { style: {
|
|
5221
5296
|
width: 6,
|
|
5222
5297
|
height: 6,
|
|
@@ -5348,9 +5423,9 @@ function Wr({ events: e = [], source: t = "", titleField: n = "", startField: r
|
|
|
5348
5423
|
})]
|
|
5349
5424
|
});
|
|
5350
5425
|
}
|
|
5351
|
-
let ne = new Date(j.year, j.month, 1), G = y === "sunday" ? 0 : 1, K = (ne.getDay() - G + 7) % 7, re = new Date(j.year, j.month + 1, 0).getDate(), q = Math.ceil((K + re) / 7), ie =
|
|
5426
|
+
let ne = new Date(j.year, j.month, 1), G = y === "sunday" ? 0 : 1, K = (ne.getDay() - G + 7) % 7, re = new Date(j.year, j.month + 1, 0).getDate(), q = Math.ceil((K + re) / 7), ie = Br(/* @__PURE__ */ new Date()), ae = new Intl.DateTimeFormat(V, { weekday: "short" }), J = [];
|
|
5352
5427
|
for (let e = 0; e < q * 7; e += 1) {
|
|
5353
|
-
let t = e - K + 1, n = t >= 1 && t <= re, r =
|
|
5428
|
+
let t = e - K + 1, n = t >= 1 && t <= re, r = Br(new Date(j.year, j.month, t)), i = n ? B.get(r) ?? [] : [], a = i.slice(0, Math.max(1, b)), o = n && r === ie;
|
|
5354
5429
|
J.push(/* @__PURE__ */ f("div", {
|
|
5355
5430
|
style: {
|
|
5356
5431
|
minHeight: N.cell,
|
|
@@ -5415,12 +5490,12 @@ function Wr({ events: e = [], source: t = "", titleField: n = "", startField: r
|
|
|
5415
5490
|
]
|
|
5416
5491
|
});
|
|
5417
5492
|
}
|
|
5418
|
-
var
|
|
5493
|
+
var qr = {
|
|
5419
5494
|
small: 36,
|
|
5420
5495
|
medium: 56,
|
|
5421
5496
|
large: 88
|
|
5422
5497
|
};
|
|
5423
|
-
function
|
|
5498
|
+
function Jr(e, t = {}) {
|
|
5424
5499
|
let n = Array.isArray(e) ? e.filter((e) => e && typeof e == "object") : [], r = (e) => e == null ? "" : ot(e);
|
|
5425
5500
|
return n.map((e) => {
|
|
5426
5501
|
let n = e.data ?? e, i = it(n, t.imageField), a = Array.isArray(i) ? i[0] : i, o = a && typeof a == "object" ? a.url ?? a.src ?? "" : a, s = t.nameField ? r(it(n, t.nameField)) : r(n.name);
|
|
@@ -5431,7 +5506,7 @@ function Kr(e, t = {}) {
|
|
|
5431
5506
|
};
|
|
5432
5507
|
}).filter((e) => e.src);
|
|
5433
5508
|
}
|
|
5434
|
-
function
|
|
5509
|
+
function Yr({ 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 }) {
|
|
5435
5510
|
let { tenant: D, apiUrl: O } = i(Q), k = i(Qe)?.[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);
|
|
5436
5511
|
a(() => {
|
|
5437
5512
|
if (!t || k) return;
|
|
@@ -5471,11 +5546,11 @@ function qr({ logos: e = [], source: t = "", imageField: n = "", nameField: r =
|
|
|
5471
5546
|
t = !1, r.forEach((e) => e.removeEventListener("load", n));
|
|
5472
5547
|
};
|
|
5473
5548
|
});
|
|
5474
|
-
let ne = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.src) : [], G = t ?
|
|
5549
|
+
let ne = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.src) : [], G = t ? Jr(k ?? A ?? [], {
|
|
5475
5550
|
imageField: n,
|
|
5476
5551
|
nameField: r,
|
|
5477
5552
|
hrefField: o
|
|
5478
|
-
}) : ne, K =
|
|
5553
|
+
}) : ne, K = qr[p] ?? qr.medium, re = Number.isFinite(Number(h)) ? Math.max(0, Number(h)) : 48, q = s === "marquee" ? "step" : s, ie = Math.min(3e4, Math.max(300, (Number(g) || 3) * 1e3)), ae = Math.min(3e3, Math.max(100, Number(_) || 500)), J = Math.min(12, Math.max(1, Math.round(Number(m) || 5))), se = (L || K * 3) + re, ce = F ? Math.max(1, Math.floor(F / se)) : J, le = Math.min(J, ce), ue = F ? Math.min(se, F / le) : se;
|
|
5479
5554
|
if (!G.length) return /* @__PURE__ */ d("div", {
|
|
5480
5555
|
ref: T,
|
|
5481
5556
|
style: {
|
|
@@ -5660,7 +5735,7 @@ function qr({ logos: e = [], source: t = "", imageField: n = "", nameField: r =
|
|
|
5660
5735
|
be,
|
|
5661
5736
|
Z ? xe(1) : null
|
|
5662
5737
|
] }),
|
|
5663
|
-
/* @__PURE__ */ d(
|
|
5738
|
+
/* @__PURE__ */ d(Xr, {
|
|
5664
5739
|
running: me,
|
|
5665
5740
|
every: ie + ae,
|
|
5666
5741
|
slide: ae,
|
|
@@ -5674,7 +5749,7 @@ function qr({ logos: e = [], source: t = "", imageField: n = "", nameField: r =
|
|
|
5674
5749
|
]
|
|
5675
5750
|
});
|
|
5676
5751
|
}
|
|
5677
|
-
function
|
|
5752
|
+
function Xr({ running: e, every: t, slide: n, step: r, index: i, total: o, home: s, setIndex: c, setAnimate: l }) {
|
|
5678
5753
|
a(() => {
|
|
5679
5754
|
if (!e) return;
|
|
5680
5755
|
let n = setInterval(() => {
|
|
@@ -5710,13 +5785,13 @@ function Jr({ running: e, every: t, slide: n, step: r, index: i, total: o, home:
|
|
|
5710
5785
|
l
|
|
5711
5786
|
]), null;
|
|
5712
5787
|
}
|
|
5713
|
-
var
|
|
5788
|
+
var Zr = {
|
|
5714
5789
|
small: 380,
|
|
5715
5790
|
medium: 560,
|
|
5716
5791
|
large: 820,
|
|
5717
5792
|
full: "100%"
|
|
5718
5793
|
};
|
|
5719
|
-
function
|
|
5794
|
+
function Qr({ 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 }) {
|
|
5720
5795
|
let [C, w] = l(!1), T = c(null);
|
|
5721
5796
|
a(() => {
|
|
5722
5797
|
if (S || !e) return;
|
|
@@ -5741,7 +5816,7 @@ function Xr({ dialogId: e = "", trigger: t = "button", triggerLabel: n = "Open",
|
|
|
5741
5816
|
document.removeEventListener("keydown", e), document.body.style.overflow = t;
|
|
5742
5817
|
};
|
|
5743
5818
|
}, [S, C]);
|
|
5744
|
-
let E =
|
|
5819
|
+
let E = Zr[o] ?? Zr.medium, D = (e) => {
|
|
5745
5820
|
let t = {
|
|
5746
5821
|
padding: "9px 16px",
|
|
5747
5822
|
borderRadius: 6,
|
|
@@ -5910,7 +5985,7 @@ function Xr({ dialogId: e = "", trigger: t = "button", triggerLabel: n = "Open",
|
|
|
5910
5985
|
})]
|
|
5911
5986
|
});
|
|
5912
5987
|
}
|
|
5913
|
-
function
|
|
5988
|
+
function $r({ dropdownId: e = "", trigger: t = "button", triggerLabel: n = "Menu", openOn: r = "hover", align: i = "left", panelWidth: o = "", offset: s = 8, editorOpen: u = !0, linked: p, style: m, nodeRef: h, inert: g = !1 }) {
|
|
5914
5989
|
let [_, v] = l(!1), y = c(null), b = c(null), x = r !== "click", S = () => {
|
|
5915
5990
|
b.current && clearTimeout(b.current), b.current = null;
|
|
5916
5991
|
}, C = () => {
|
|
@@ -6011,13 +6086,13 @@ function Zr({ dropdownId: e = "", trigger: t = "button", triggerLabel: n = "Menu
|
|
|
6011
6086
|
}), E]
|
|
6012
6087
|
});
|
|
6013
6088
|
}
|
|
6014
|
-
var
|
|
6089
|
+
var ei = {
|
|
6015
6090
|
PageRoot: _t,
|
|
6016
6091
|
MarkdownBlock: It,
|
|
6017
|
-
CalendarBlock:
|
|
6018
|
-
LogoCarousel:
|
|
6019
|
-
DialogBlock:
|
|
6020
|
-
DropdownBlock:
|
|
6092
|
+
CalendarBlock: Kr,
|
|
6093
|
+
LogoCarousel: Yr,
|
|
6094
|
+
DialogBlock: Qr,
|
|
6095
|
+
DropdownBlock: $r,
|
|
6021
6096
|
Section: vt,
|
|
6022
6097
|
Container: yt,
|
|
6023
6098
|
LinkBlock: bt,
|
|
@@ -6025,29 +6100,29 @@ var Qr = {
|
|
|
6025
6100
|
TextBlock: Bt,
|
|
6026
6101
|
ButtonBlock: Wt,
|
|
6027
6102
|
ImageBlock: Gt,
|
|
6028
|
-
Spacer:
|
|
6029
|
-
Divider:
|
|
6030
|
-
BoxBlock:
|
|
6031
|
-
SliderBlock:
|
|
6032
|
-
CanvasSlider:
|
|
6033
|
-
TabsBlock:
|
|
6034
|
-
QuickStack:
|
|
6035
|
-
CollectionList:
|
|
6036
|
-
CollectionSearch:
|
|
6037
|
-
BreadcrumbsBlock:
|
|
6038
|
-
PaginationBlock:
|
|
6039
|
-
StepperBlock:
|
|
6040
|
-
SocialLinksBlock:
|
|
6041
|
-
ThemeModeBlock:
|
|
6042
|
-
ScrollTopBlock:
|
|
6043
|
-
CounterBlock:
|
|
6044
|
-
OrgChartBlock:
|
|
6045
|
-
TableBlock:
|
|
6046
|
-
IconBlock:
|
|
6047
|
-
MapBlock:
|
|
6048
|
-
MasonryBlock:
|
|
6049
|
-
AccordionBlock:
|
|
6050
|
-
NavbarBlock:
|
|
6103
|
+
Spacer: tn,
|
|
6104
|
+
Divider: nn,
|
|
6105
|
+
BoxBlock: rn,
|
|
6106
|
+
SliderBlock: un,
|
|
6107
|
+
CanvasSlider: dn,
|
|
6108
|
+
TabsBlock: Dn,
|
|
6109
|
+
QuickStack: $n,
|
|
6110
|
+
CollectionList: er,
|
|
6111
|
+
CollectionSearch: tr,
|
|
6112
|
+
BreadcrumbsBlock: nr,
|
|
6113
|
+
PaginationBlock: rr,
|
|
6114
|
+
StepperBlock: br,
|
|
6115
|
+
SocialLinksBlock: yr,
|
|
6116
|
+
ThemeModeBlock: cr,
|
|
6117
|
+
ScrollTopBlock: _r,
|
|
6118
|
+
CounterBlock: gr,
|
|
6119
|
+
OrgChartBlock: Mr,
|
|
6120
|
+
TableBlock: Rr,
|
|
6121
|
+
IconBlock: bn,
|
|
6122
|
+
MapBlock: vn,
|
|
6123
|
+
MasonryBlock: Sn,
|
|
6124
|
+
AccordionBlock: On,
|
|
6125
|
+
NavbarBlock: En,
|
|
6051
6126
|
ListBlock: zt,
|
|
6052
6127
|
TextSpan: Et,
|
|
6053
6128
|
QuoteBlock: Rt,
|
|
@@ -6057,56 +6132,57 @@ var Qr = {
|
|
|
6057
6132
|
VideoBlock: Kt,
|
|
6058
6133
|
YouTubeBlock: Jt,
|
|
6059
6134
|
IframeBlock: Yt,
|
|
6060
|
-
|
|
6061
|
-
|
|
6062
|
-
|
|
6063
|
-
|
|
6064
|
-
|
|
6065
|
-
|
|
6135
|
+
PdfBlock: Zt,
|
|
6136
|
+
EmbedBlock: en,
|
|
6137
|
+
FormBlock: Vn,
|
|
6138
|
+
FormLabel: Kn,
|
|
6139
|
+
FormInput: qn,
|
|
6140
|
+
FormTextarea: Jn,
|
|
6141
|
+
FormCheckbox: (e) => /* @__PURE__ */ d(Yn, {
|
|
6066
6142
|
kind: "checkbox",
|
|
6067
6143
|
...e
|
|
6068
6144
|
}),
|
|
6069
|
-
FormRadio: (e) => /* @__PURE__ */ d(
|
|
6145
|
+
FormRadio: (e) => /* @__PURE__ */ d(Yn, {
|
|
6070
6146
|
kind: "radio",
|
|
6071
6147
|
...e
|
|
6072
6148
|
}),
|
|
6073
|
-
FormSelect:
|
|
6074
|
-
FormFile:
|
|
6075
|
-
FormRecaptcha:
|
|
6076
|
-
FormSubmit:
|
|
6077
|
-
},
|
|
6149
|
+
FormSelect: Xn,
|
|
6150
|
+
FormFile: Zn,
|
|
6151
|
+
FormRecaptcha: Gn,
|
|
6152
|
+
FormSubmit: Qn
|
|
6153
|
+
}, ti = {
|
|
6078
6154
|
id: "auth",
|
|
6079
6155
|
label: "Accounts",
|
|
6080
6156
|
category: "Apps",
|
|
6081
6157
|
keys: ["SiteLoginForm", "SiteAccountMenu"],
|
|
6082
6158
|
ssr: "shell",
|
|
6083
6159
|
settings: ["site.authRedirect"]
|
|
6084
|
-
},
|
|
6160
|
+
}, ni = n({
|
|
6085
6161
|
user: null,
|
|
6086
6162
|
status: "idle",
|
|
6087
6163
|
ensure: () => {},
|
|
6088
6164
|
refresh: () => {},
|
|
6089
6165
|
signOut: () => {}
|
|
6090
6166
|
});
|
|
6091
|
-
function
|
|
6167
|
+
function ri(e, t) {
|
|
6092
6168
|
return t ? /^https?:\/\//i.test(t) ? t : `${e.replace(/\/+$/, "")}${t.startsWith("/") ? t : `/${t}`}` : "";
|
|
6093
6169
|
}
|
|
6094
|
-
function
|
|
6170
|
+
function ii(e) {
|
|
6095
6171
|
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);
|
|
6096
6172
|
return {
|
|
6097
6173
|
mode: n.mode === "custom" || n.mode === "off" ? n.mode : "system",
|
|
6098
6174
|
url: i,
|
|
6099
6175
|
mePath: a,
|
|
6100
6176
|
logoutPath: o,
|
|
6101
|
-
meUrl:
|
|
6102
|
-
logoutUrl:
|
|
6177
|
+
meUrl: ri(i, a),
|
|
6178
|
+
logoutUrl: ri(i, o),
|
|
6103
6179
|
loginPage: r(n.loginPage),
|
|
6104
6180
|
userPath: r(n.userPath),
|
|
6105
6181
|
auth: n.auth === "bearer" ? "bearer" : "cookies",
|
|
6106
6182
|
tokenKey: r(n.tokenKey) || "webim_session_token"
|
|
6107
6183
|
};
|
|
6108
6184
|
}
|
|
6109
|
-
function
|
|
6185
|
+
function ai(e, t) {
|
|
6110
6186
|
if (!t) return e ?? null;
|
|
6111
6187
|
let n = e;
|
|
6112
6188
|
for (let e of t.split(".")) {
|
|
@@ -6115,26 +6191,26 @@ function ri(e, t) {
|
|
|
6115
6191
|
}
|
|
6116
6192
|
return n ?? null;
|
|
6117
6193
|
}
|
|
6118
|
-
function
|
|
6194
|
+
function oi(e) {
|
|
6119
6195
|
try {
|
|
6120
6196
|
return window.localStorage.getItem(e) || "";
|
|
6121
6197
|
} catch {
|
|
6122
6198
|
return "";
|
|
6123
6199
|
}
|
|
6124
6200
|
}
|
|
6125
|
-
function
|
|
6201
|
+
function si(e) {
|
|
6126
6202
|
try {
|
|
6127
6203
|
window.localStorage.removeItem(e);
|
|
6128
6204
|
} catch {}
|
|
6129
6205
|
}
|
|
6130
|
-
var
|
|
6131
|
-
let e = i(
|
|
6206
|
+
var ci = () => {
|
|
6207
|
+
let e = i(ni);
|
|
6132
6208
|
return a(() => {
|
|
6133
6209
|
e.ensure();
|
|
6134
6210
|
}, [e]), e;
|
|
6135
6211
|
};
|
|
6136
|
-
function
|
|
6137
|
-
let f = i(Q), p = o || f?.apiUrl || "/api", m = u || f?.tenant || "", h = s(() =>
|
|
6212
|
+
function li({ children: e, initialUser: t, disabled: n, apiUrl: o, tenant: u }) {
|
|
6213
|
+
let f = i(Q), p = o || f?.apiUrl || "/api", m = u || f?.tenant || "", h = s(() => ii(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}`, {
|
|
6138
6214
|
...t,
|
|
6139
6215
|
credentials: "include",
|
|
6140
6216
|
headers: {
|
|
@@ -6146,9 +6222,9 @@ function si({ children: e, initialUser: t, disabled: n, apiUrl: o, tenant: u })
|
|
|
6146
6222
|
if (n) return Promise.resolve(null);
|
|
6147
6223
|
if (h.mode === "off") return Promise.resolve(S(null));
|
|
6148
6224
|
if (h.mode === "custom") {
|
|
6149
|
-
let e = h.auth === "bearer" ?
|
|
6225
|
+
let e = h.auth === "bearer" ? oi(h.tokenKey) : "";
|
|
6150
6226
|
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) => {
|
|
6151
|
-
let t =
|
|
6227
|
+
let t = ai(e, h.userPath);
|
|
6152
6228
|
return S(t && typeof t == "object" ? t : null);
|
|
6153
6229
|
}).catch(() => S(null));
|
|
6154
6230
|
}
|
|
@@ -6161,12 +6237,12 @@ function si({ children: e, initialUser: t, disabled: n, apiUrl: o, tenant: u })
|
|
|
6161
6237
|
]), w = r(() => {
|
|
6162
6238
|
if (h.mode === "off") return S(null), Promise.resolve();
|
|
6163
6239
|
if (h.mode === "custom") {
|
|
6164
|
-
let e = h.auth === "bearer" ?
|
|
6240
|
+
let e = h.auth === "bearer" ? oi(h.tokenKey) : "";
|
|
6165
6241
|
return (h.logoutUrl ? fetch(h.logoutUrl, {
|
|
6166
6242
|
method: "post",
|
|
6167
6243
|
...h.auth === "bearer" ? { headers: e ? { authorization: `Bearer ${e}` } : {} } : { credentials: "include" }
|
|
6168
6244
|
}).catch(() => {}) : Promise.resolve()).then(() => {
|
|
6169
|
-
h.auth === "bearer" &&
|
|
6245
|
+
h.auth === "bearer" && si(h.tokenKey), S(null);
|
|
6170
6246
|
});
|
|
6171
6247
|
}
|
|
6172
6248
|
return x("/site/logout", { method: "post" }).catch(() => {}).then(() => {
|
|
@@ -6216,18 +6292,18 @@ function si({ children: e, initialUser: t, disabled: n, apiUrl: o, tenant: u })
|
|
|
6216
6292
|
h.loginPage,
|
|
6217
6293
|
C,
|
|
6218
6294
|
w
|
|
6219
|
-
]), /* @__PURE__ */ d(
|
|
6295
|
+
]), /* @__PURE__ */ d(ni.Provider, {
|
|
6220
6296
|
value: E,
|
|
6221
6297
|
children: e
|
|
6222
6298
|
});
|
|
6223
6299
|
}
|
|
6224
|
-
function
|
|
6225
|
-
let { status: n } =
|
|
6300
|
+
function ui({ when: e, children: t }) {
|
|
6301
|
+
let { status: n } = ci();
|
|
6226
6302
|
return !e || e === "always" ? t : n === "idle" || n === "loading" ? null : e === "user" == (n === "user") ? t : null;
|
|
6227
6303
|
}
|
|
6228
6304
|
//#endregion
|
|
6229
6305
|
//#region ../ui/src/components/builder/apps/auth/views.jsx
|
|
6230
|
-
function
|
|
6306
|
+
function di({ 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 }) {
|
|
6231
6307
|
let { tenant: h, apiUrl: g, settings: _ } = i(Q), [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) => {
|
|
6232
6308
|
if (e.preventDefault(), u) return;
|
|
6233
6309
|
let n = new FormData(e.currentTarget);
|
|
@@ -6276,20 +6352,20 @@ function li({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
6276
6352
|
children: [
|
|
6277
6353
|
w ? /* @__PURE__ */ f("label", {
|
|
6278
6354
|
style: {
|
|
6279
|
-
...
|
|
6355
|
+
...An,
|
|
6280
6356
|
display: "grid",
|
|
6281
6357
|
gap: 6
|
|
6282
6358
|
},
|
|
6283
6359
|
children: [a, /* @__PURE__ */ d("input", {
|
|
6284
6360
|
name: "name",
|
|
6285
6361
|
type: "text",
|
|
6286
|
-
style:
|
|
6287
|
-
...
|
|
6362
|
+
style: jn,
|
|
6363
|
+
...Nn(u)
|
|
6288
6364
|
})]
|
|
6289
6365
|
}) : null,
|
|
6290
6366
|
/* @__PURE__ */ f("label", {
|
|
6291
6367
|
style: {
|
|
6292
|
-
...
|
|
6368
|
+
...An,
|
|
6293
6369
|
display: "grid",
|
|
6294
6370
|
gap: 6
|
|
6295
6371
|
},
|
|
@@ -6297,13 +6373,13 @@ function li({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
6297
6373
|
name: "email",
|
|
6298
6374
|
type: "email",
|
|
6299
6375
|
required: !u,
|
|
6300
|
-
style:
|
|
6301
|
-
...
|
|
6376
|
+
style: jn,
|
|
6377
|
+
...Nn(u)
|
|
6302
6378
|
})]
|
|
6303
6379
|
}),
|
|
6304
6380
|
/* @__PURE__ */ f("label", {
|
|
6305
6381
|
style: {
|
|
6306
|
-
...
|
|
6382
|
+
...An,
|
|
6307
6383
|
display: "grid",
|
|
6308
6384
|
gap: 6
|
|
6309
6385
|
},
|
|
@@ -6311,8 +6387,8 @@ function li({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
6311
6387
|
name: "password",
|
|
6312
6388
|
type: "password",
|
|
6313
6389
|
required: !u,
|
|
6314
|
-
style:
|
|
6315
|
-
...
|
|
6390
|
+
style: jn,
|
|
6391
|
+
...Nn(u)
|
|
6316
6392
|
})]
|
|
6317
6393
|
}),
|
|
6318
6394
|
/* @__PURE__ */ d("button", {
|
|
@@ -6351,8 +6427,8 @@ function li({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
6351
6427
|
]
|
|
6352
6428
|
});
|
|
6353
6429
|
}
|
|
6354
|
-
function
|
|
6355
|
-
let { user: c, status: l, signOut: u } =
|
|
6430
|
+
function fi({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !1, style: r, nodeRef: i, inert: a, linked: o, show: s }) {
|
|
6431
|
+
let { user: c, status: l, signOut: u } = ci(), p = a ? s || "user" : l, m = a ? {
|
|
6356
6432
|
name: "Ada Lovelace",
|
|
6357
6433
|
email: "ada@example.com"
|
|
6358
6434
|
} : c;
|
|
@@ -6373,7 +6449,7 @@ function ui({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
6373
6449
|
children: [
|
|
6374
6450
|
/* @__PURE__ */ f("span", {
|
|
6375
6451
|
style: {
|
|
6376
|
-
...
|
|
6452
|
+
...An,
|
|
6377
6453
|
fontWeight: 600
|
|
6378
6454
|
},
|
|
6379
6455
|
children: [
|
|
@@ -6384,7 +6460,7 @@ function ui({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
6384
6460
|
}),
|
|
6385
6461
|
n && m?.email ? /* @__PURE__ */ d("span", {
|
|
6386
6462
|
style: {
|
|
6387
|
-
...
|
|
6463
|
+
...An,
|
|
6388
6464
|
opacity: .7
|
|
6389
6465
|
},
|
|
6390
6466
|
children: m.email
|
|
@@ -6400,7 +6476,7 @@ function ui({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
6400
6476
|
fontSize: 14,
|
|
6401
6477
|
cursor: a ? "default" : "pointer"
|
|
6402
6478
|
},
|
|
6403
|
-
...
|
|
6479
|
+
...Nn(a),
|
|
6404
6480
|
children: t
|
|
6405
6481
|
})
|
|
6406
6482
|
]
|
|
@@ -6417,40 +6493,40 @@ function ui({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
6417
6493
|
}
|
|
6418
6494
|
//#endregion
|
|
6419
6495
|
//#region ../ui/src/components/builder/apps/consent/manifest.js
|
|
6420
|
-
var
|
|
6496
|
+
var pi = {
|
|
6421
6497
|
id: "consent",
|
|
6422
6498
|
label: "Cookie consent",
|
|
6423
6499
|
category: "Apps",
|
|
6424
6500
|
keys: ["CookieConsent"],
|
|
6425
6501
|
ssr: "shell",
|
|
6426
6502
|
settings: []
|
|
6427
|
-
},
|
|
6428
|
-
function
|
|
6503
|
+
}, mi = "webim.cookie_consent";
|
|
6504
|
+
function hi() {
|
|
6429
6505
|
try {
|
|
6430
|
-
let e = window.localStorage.getItem(
|
|
6506
|
+
let e = window.localStorage.getItem(mi), t = e ? JSON.parse(e) : null;
|
|
6431
6507
|
return t?.choice === "accepted" || t?.choice === "declined" ? t.choice : "";
|
|
6432
6508
|
} catch {
|
|
6433
6509
|
return "";
|
|
6434
6510
|
}
|
|
6435
6511
|
}
|
|
6436
|
-
function
|
|
6512
|
+
function gi(e) {
|
|
6437
6513
|
try {
|
|
6438
6514
|
document.querySelectorAll(".webim-page").forEach((t) => t.setAttribute("data-webim-consent", e));
|
|
6439
6515
|
} catch {}
|
|
6440
6516
|
}
|
|
6441
|
-
function
|
|
6517
|
+
function _i(e) {
|
|
6442
6518
|
try {
|
|
6443
|
-
window.localStorage.setItem(
|
|
6519
|
+
window.localStorage.setItem(mi, JSON.stringify({
|
|
6444
6520
|
choice: e,
|
|
6445
6521
|
at: (/* @__PURE__ */ new Date()).toISOString()
|
|
6446
6522
|
}));
|
|
6447
6523
|
} catch {}
|
|
6448
|
-
|
|
6524
|
+
gi(e);
|
|
6449
6525
|
try {
|
|
6450
6526
|
window.dispatchEvent(new CustomEvent("webim:consent", { detail: { choice: e } }));
|
|
6451
6527
|
} catch {}
|
|
6452
6528
|
}
|
|
6453
|
-
var
|
|
6529
|
+
var vi = {
|
|
6454
6530
|
bottom: {
|
|
6455
6531
|
left: 0,
|
|
6456
6532
|
right: 0,
|
|
@@ -6472,18 +6548,18 @@ var gi = {
|
|
|
6472
6548
|
maxWidth: 400
|
|
6473
6549
|
}
|
|
6474
6550
|
};
|
|
6475
|
-
function
|
|
6551
|
+
function yi({ message: e, acceptLabel: t, rejectLabel: n, showReject: r, linkLabel: i, linkHref: o, position: s, linked: c, style: p, nodeRef: m, inert: h }) {
|
|
6476
6552
|
let [g, _] = l(!!h), [v, y] = l(null), b = (e) => {
|
|
6477
6553
|
y(e), typeof m == "function" && m(e);
|
|
6478
6554
|
};
|
|
6479
6555
|
if (a(() => {
|
|
6480
6556
|
if (h) return;
|
|
6481
|
-
let e =
|
|
6482
|
-
e ?
|
|
6557
|
+
let e = hi();
|
|
6558
|
+
e ? gi(e) : _(!0);
|
|
6483
6559
|
}, [h, v]), !g) return null;
|
|
6484
6560
|
let x = (e) => () => {
|
|
6485
|
-
h || (
|
|
6486
|
-
}, S =
|
|
6561
|
+
h || (_i(e), _(!1));
|
|
6562
|
+
}, S = vi[s] ?? vi.bottom, C = {
|
|
6487
6563
|
appearance: "none",
|
|
6488
6564
|
font: "inherit",
|
|
6489
6565
|
fontSize: 14,
|
|
@@ -6563,37 +6639,37 @@ function _i({ message: e, acceptLabel: t, rejectLabel: n, showReject: r, linkLab
|
|
|
6563
6639
|
}
|
|
6564
6640
|
//#endregion
|
|
6565
6641
|
//#region ../ui/src/components/builder/apps/language/manifest.js
|
|
6566
|
-
var
|
|
6642
|
+
var bi = {
|
|
6567
6643
|
id: "language",
|
|
6568
6644
|
label: "Language",
|
|
6569
6645
|
category: "Apps",
|
|
6570
6646
|
keys: ["SiteLanguagePicker"],
|
|
6571
6647
|
ssr: "prefetch",
|
|
6572
6648
|
settings: ["locales"]
|
|
6573
|
-
},
|
|
6649
|
+
}, xi = {
|
|
6574
6650
|
id: "search",
|
|
6575
6651
|
label: "Search",
|
|
6576
6652
|
category: "Apps",
|
|
6577
6653
|
keys: ["SiteSearch"],
|
|
6578
6654
|
ssr: "prefetch",
|
|
6579
6655
|
settings: []
|
|
6580
|
-
},
|
|
6581
|
-
function
|
|
6656
|
+
}, Si = 50, Ci = 2e3;
|
|
6657
|
+
function wi() {
|
|
6582
6658
|
return typeof window > "u" ? "" : new URLSearchParams(window.location.search).get("q") ?? "";
|
|
6583
6659
|
}
|
|
6584
|
-
function
|
|
6660
|
+
function Ti(e, t) {
|
|
6585
6661
|
let n = e?.data ?? {}, r = [];
|
|
6586
6662
|
for (let e of Object.values(n)) {
|
|
6587
6663
|
let t = e == null ? "" : ot(e);
|
|
6588
|
-
if (t && r.push(t), r.join(" ").length >
|
|
6664
|
+
if (t && r.push(t), r.join(" ").length > Ci) break;
|
|
6589
6665
|
}
|
|
6590
|
-
return r.join(" ").slice(0,
|
|
6666
|
+
return r.join(" ").slice(0, Ci).toLocaleLowerCase(t || void 0);
|
|
6591
6667
|
}
|
|
6592
|
-
function
|
|
6593
|
-
let { tenant: b, apiUrl: x, locale: S } = i(Q), [C, w] = l(() =>
|
|
6668
|
+
function Ei({ 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 }) {
|
|
6669
|
+
let { tenant: b, apiUrl: x, locale: S } = i(Q), [C, w] = l(() => wi()), [T, E] = l(() => wi()), [D, O] = l(null), [k, A] = l(!1), j = c(null), M = o === "popup";
|
|
6594
6670
|
a(() => {
|
|
6595
6671
|
let e = () => {
|
|
6596
|
-
let e =
|
|
6672
|
+
let e = wi();
|
|
6597
6673
|
w(e), E(e);
|
|
6598
6674
|
};
|
|
6599
6675
|
return window.addEventListener("popstate", e), window.addEventListener("webim:urlchange", e), () => {
|
|
@@ -6644,7 +6720,7 @@ function wi({ placeholder: e = "Search…", buttonLabel: t = "Search", showButto
|
|
|
6644
6720
|
});
|
|
6645
6721
|
}
|
|
6646
6722
|
else for (let t of e.rows) {
|
|
6647
|
-
if (!
|
|
6723
|
+
if (!Ti(t, S).includes(N)) continue;
|
|
6648
6724
|
let n = t?.data ?? {}, r = ot(n.name) || "Untitled", i = ot(n.slug);
|
|
6649
6725
|
F.push({
|
|
6650
6726
|
key: `entry:${t.id}`,
|
|
@@ -6653,7 +6729,7 @@ function wi({ placeholder: e = "Search…", buttonLabel: t = "Search", showButto
|
|
|
6653
6729
|
kind: "entry"
|
|
6654
6730
|
});
|
|
6655
6731
|
}
|
|
6656
|
-
let I = F.slice(0, Math.min(Math.max(1, p),
|
|
6732
|
+
let I = F.slice(0, Math.min(Math.max(1, p), Si)), L = (e) => {
|
|
6657
6733
|
if (v) {
|
|
6658
6734
|
e.preventDefault(), w(T), A(!0);
|
|
6659
6735
|
return;
|
|
@@ -6735,7 +6811,7 @@ function wi({ placeholder: e = "Search…", buttonLabel: t = "Search", showButto
|
|
|
6735
6811
|
onChange: (e) => E(e.target.value),
|
|
6736
6812
|
onFocus: () => N && A(!0),
|
|
6737
6813
|
style: {
|
|
6738
|
-
...
|
|
6814
|
+
...jn,
|
|
6739
6815
|
flexGrow: 1,
|
|
6740
6816
|
minWidth: 0
|
|
6741
6817
|
}
|
|
@@ -6793,21 +6869,21 @@ function wi({ placeholder: e = "Search…", buttonLabel: t = "Search", showButto
|
|
|
6793
6869
|
}
|
|
6794
6870
|
//#endregion
|
|
6795
6871
|
//#region ../ui/src/components/builder/apps/language/views.jsx
|
|
6796
|
-
function
|
|
6872
|
+
function Di(e) {
|
|
6797
6873
|
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());
|
|
6798
6874
|
return [...new Set(n.map((e) => e.trim()))];
|
|
6799
6875
|
}
|
|
6800
|
-
var
|
|
6801
|
-
function
|
|
6876
|
+
var Oi = (e) => e && e.charAt(0).toUpperCase() + e.slice(1);
|
|
6877
|
+
function ki(e, t) {
|
|
6802
6878
|
let n = String(e ?? "").toUpperCase();
|
|
6803
6879
|
if (t === "code") return n;
|
|
6804
6880
|
let r = "";
|
|
6805
6881
|
try {
|
|
6806
|
-
r =
|
|
6882
|
+
r = Oi(new Intl.DisplayNames([e], { type: "language" }).of(e) ?? "");
|
|
6807
6883
|
} catch {}
|
|
6808
6884
|
return !r || r.toUpperCase() === n ? n : t === "both" ? `${n} — ${r}` : r;
|
|
6809
6885
|
}
|
|
6810
|
-
function
|
|
6886
|
+
function Ai(e, t) {
|
|
6811
6887
|
let n = t ? "" : `?locale=${encodeURIComponent(e)}`;
|
|
6812
6888
|
if (typeof window > "u") return n || "?";
|
|
6813
6889
|
try {
|
|
@@ -6817,8 +6893,8 @@ function Oi(e, t) {
|
|
|
6817
6893
|
return n || "/";
|
|
6818
6894
|
}
|
|
6819
6895
|
}
|
|
6820
|
-
function
|
|
6821
|
-
let c = i(Q), l =
|
|
6896
|
+
function ji({ variant: e, display: t, separator: n, label: r, style: a, nodeRef: o, inert: s }) {
|
|
6897
|
+
let c = i(Q), l = Di(c?.settings), u = l[0] ?? "", p = l.includes(c?.locale) ? c.locale : u, m = {
|
|
6822
6898
|
display: "inline-flex",
|
|
6823
6899
|
alignItems: "center",
|
|
6824
6900
|
gap: 8,
|
|
@@ -6853,7 +6929,7 @@ function ki({ variant: e, display: t, separator: n, label: r, style: a, nodeRef:
|
|
|
6853
6929
|
style: { opacity: .4 },
|
|
6854
6930
|
children: n ?? "·"
|
|
6855
6931
|
}), /* @__PURE__ */ d("a", {
|
|
6856
|
-
href:
|
|
6932
|
+
href: Ai(e, e === u),
|
|
6857
6933
|
hrefLang: e,
|
|
6858
6934
|
"aria-current": e === p ? "true" : void 0,
|
|
6859
6935
|
onClick: s ? (e) => e.preventDefault() : void 0,
|
|
@@ -6863,7 +6939,7 @@ function ki({ variant: e, display: t, separator: n, label: r, style: a, nodeRef:
|
|
|
6863
6939
|
textDecoration: "none",
|
|
6864
6940
|
cursor: s ? "default" : "pointer"
|
|
6865
6941
|
},
|
|
6866
|
-
children:
|
|
6942
|
+
children: ki(e, t)
|
|
6867
6943
|
})]
|
|
6868
6944
|
}, e))]
|
|
6869
6945
|
}) : /* @__PURE__ */ f("div", {
|
|
@@ -6874,7 +6950,7 @@ function ki({ variant: e, display: t, separator: n, label: r, style: a, nodeRef:
|
|
|
6874
6950
|
value: p,
|
|
6875
6951
|
onChange: s ? void 0 : (e) => {
|
|
6876
6952
|
let t = e.target.value;
|
|
6877
|
-
window.location.assign(
|
|
6953
|
+
window.location.assign(Ai(t, t === u));
|
|
6878
6954
|
},
|
|
6879
6955
|
onKeyDown: s ? (e) => e.preventDefault() : void 0,
|
|
6880
6956
|
style: {
|
|
@@ -6888,47 +6964,47 @@ function ki({ variant: e, display: t, separator: n, label: r, style: a, nodeRef:
|
|
|
6888
6964
|
},
|
|
6889
6965
|
children: l.map((e) => /* @__PURE__ */ d("option", {
|
|
6890
6966
|
value: e,
|
|
6891
|
-
children:
|
|
6967
|
+
children: ki(e, t)
|
|
6892
6968
|
}, e))
|
|
6893
6969
|
})]
|
|
6894
6970
|
});
|
|
6895
6971
|
}
|
|
6896
6972
|
//#endregion
|
|
6897
6973
|
//#region ../ui/src/components/builder/apps/index.js
|
|
6898
|
-
var
|
|
6899
|
-
|
|
6900
|
-
|
|
6901
|
-
|
|
6902
|
-
|
|
6903
|
-
],
|
|
6904
|
-
SiteLoginForm:
|
|
6905
|
-
SiteAccountMenu:
|
|
6906
|
-
SiteLanguagePicker:
|
|
6907
|
-
CookieConsent:
|
|
6908
|
-
SiteSearch:
|
|
6974
|
+
var Mi = [
|
|
6975
|
+
ti,
|
|
6976
|
+
bi,
|
|
6977
|
+
pi,
|
|
6978
|
+
xi
|
|
6979
|
+
], Ni = {
|
|
6980
|
+
SiteLoginForm: di,
|
|
6981
|
+
SiteAccountMenu: fi,
|
|
6982
|
+
SiteLanguagePicker: ji,
|
|
6983
|
+
CookieConsent: yi,
|
|
6984
|
+
SiteSearch: Ei
|
|
6909
6985
|
};
|
|
6910
|
-
new Set(
|
|
6986
|
+
new Set(Mi.filter((e) => e.ssr === "shell").flatMap((e) => e.keys));
|
|
6911
6987
|
//#endregion
|
|
6912
6988
|
//#region ../ui/src/components/builder/three/runtime.js
|
|
6913
|
-
var
|
|
6989
|
+
var Pi = "0.185.1", Fi = "4.2.0", Ii = "https://cdn.jsdelivr.net/npm", Li = `${Ii}/three@${Pi}/+esm`, Ri = `${Ii}/@google/model-viewer@${Fi}/dist/model-viewer.min.js`, zi = (e) => import(
|
|
6914
6990
|
/* @vite-ignore */
|
|
6915
6991
|
/* webpackIgnore: true */
|
|
6916
6992
|
e
|
|
6917
|
-
),
|
|
6918
|
-
function
|
|
6919
|
-
if (
|
|
6993
|
+
), Bi = /* @__PURE__ */ new Map();
|
|
6994
|
+
function Vi(e) {
|
|
6995
|
+
if (Bi.has(e)) return Bi.get(e);
|
|
6920
6996
|
if (typeof window > "u") return new Promise(() => {});
|
|
6921
|
-
let t =
|
|
6922
|
-
throw
|
|
6997
|
+
let t = zi(e).catch((t) => {
|
|
6998
|
+
throw Bi.delete(e), t;
|
|
6923
6999
|
});
|
|
6924
|
-
return
|
|
7000
|
+
return Bi.set(e, t), t;
|
|
6925
7001
|
}
|
|
6926
|
-
var
|
|
6927
|
-
function
|
|
6928
|
-
return typeof window < "u" && window.customElements?.get("model-viewer") ? Promise.resolve(null) :
|
|
7002
|
+
var Hi = () => Vi(Li), Ui = (e) => Vi(`${Ii}/three@${Pi}/examples/jsm/${e}/+esm`);
|
|
7003
|
+
function Wi() {
|
|
7004
|
+
return typeof window < "u" && window.customElements?.get("model-viewer") ? Promise.resolve(null) : Vi(Ri);
|
|
6929
7005
|
}
|
|
6930
|
-
var
|
|
6931
|
-
function
|
|
7006
|
+
var Gi = () => typeof window < "u" && !!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches, Ki = (e = 2) => Math.min(typeof window > "u" ? 1 : window.devicePixelRatio || 1, e);
|
|
7007
|
+
function qi(e, t) {
|
|
6932
7008
|
let n = 0, r = 0, i = 0, a = !0, o = (e) => {
|
|
6933
7009
|
n = requestAnimationFrame(o), i ||= e;
|
|
6934
7010
|
let a = r ? (e - r) / 1e3 : 0;
|
|
@@ -6947,7 +7023,7 @@ function Gi(e, t) {
|
|
|
6947
7023
|
s(), l?.disconnect(), document.removeEventListener("visibilitychange", c);
|
|
6948
7024
|
};
|
|
6949
7025
|
}
|
|
6950
|
-
function
|
|
7026
|
+
function Ji(e, t, n = {}) {
|
|
6951
7027
|
let r = {
|
|
6952
7028
|
radius: n.distance ?? 4,
|
|
6953
7029
|
polar: n.polar ?? Math.PI / 2.4,
|
|
@@ -6996,13 +7072,13 @@ function Ki(e, t, n = {}) {
|
|
|
6996
7072
|
}
|
|
6997
7073
|
//#endregion
|
|
6998
7074
|
//#region ../ui/src/components/builder/three/views.jsx
|
|
6999
|
-
var
|
|
7000
|
-
function
|
|
7075
|
+
var Yi = (e, t) => Number.isFinite(Number(e)) && Number(e) > 0 ? Number(e) : t, Xi = (e, t) => (Number.isFinite(Number(e)) ? Number(e) : t) / 100, Zi = (e) => (Number.isFinite(Number(e)) ? Number(e) : 0) * Math.PI / 180, Qi = (e) => typeof e == "string" && !!e.trim();
|
|
7076
|
+
function $i({ label: e, note: t, height: n, nodeRef: r, style: i }) {
|
|
7001
7077
|
return /* @__PURE__ */ f("div", {
|
|
7002
7078
|
ref: r,
|
|
7003
7079
|
style: {
|
|
7004
7080
|
...P(i),
|
|
7005
|
-
minHeight:
|
|
7081
|
+
minHeight: Yi(n, 320),
|
|
7006
7082
|
display: "flex",
|
|
7007
7083
|
flexDirection: "column",
|
|
7008
7084
|
alignItems: "center",
|
|
@@ -7030,24 +7106,24 @@ function Zi({ label: e, note: t, height: n, nodeRef: r, style: i }) {
|
|
|
7030
7106
|
}) : null]
|
|
7031
7107
|
});
|
|
7032
7108
|
}
|
|
7033
|
-
function
|
|
7109
|
+
function ea({ 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 }) {
|
|
7034
7110
|
let [y, b] = l(typeof window < "u" && !!window.customElements?.get("model-viewer")), [x, S] = l(!1);
|
|
7035
7111
|
a(() => {
|
|
7036
7112
|
if (y || !e) return;
|
|
7037
7113
|
let t = !0;
|
|
7038
|
-
return
|
|
7114
|
+
return Wi().then(() => t && b(!0), () => t && S(!0)), () => {
|
|
7039
7115
|
t = !1;
|
|
7040
7116
|
};
|
|
7041
7117
|
}, [y, e]);
|
|
7042
7118
|
let C = {
|
|
7043
7119
|
display: "block",
|
|
7044
7120
|
width: "100%",
|
|
7045
|
-
minHeight:
|
|
7046
|
-
height:
|
|
7121
|
+
minHeight: Yi(r, 360),
|
|
7122
|
+
height: Yi(r, 360),
|
|
7047
7123
|
backgroundColor: i || "transparent",
|
|
7048
7124
|
...P(g)
|
|
7049
7125
|
};
|
|
7050
|
-
if (!e) return v ? /* @__PURE__ */ d(
|
|
7126
|
+
if (!e) return v ? /* @__PURE__ */ d($i, {
|
|
7051
7127
|
nodeRef: _,
|
|
7052
7128
|
style: g,
|
|
7053
7129
|
height: r,
|
|
@@ -7082,13 +7158,13 @@ function Qi({ src: e, poster: t, alt: n, height: r, bg: i, autoRotate: o, rotate
|
|
|
7082
7158
|
poster: t || void 0,
|
|
7083
7159
|
style: C,
|
|
7084
7160
|
"camera-controls": w(!v && c !== !1),
|
|
7085
|
-
"auto-rotate": w(T && !
|
|
7086
|
-
"auto-rotate-delay": T ? String(
|
|
7161
|
+
"auto-rotate": w(T && !Gi()),
|
|
7162
|
+
"auto-rotate-delay": T ? String(Yi(s, 0)) : void 0,
|
|
7087
7163
|
"rotation-per-second": "18deg",
|
|
7088
7164
|
ar: w(!v && u === !0),
|
|
7089
7165
|
"ar-modes": "webxr scene-viewer quick-look",
|
|
7090
|
-
"shadow-intensity": String(
|
|
7091
|
-
exposure: String(
|
|
7166
|
+
"shadow-intensity": String(Xi(p, 100)),
|
|
7167
|
+
exposure: String(Xi(f, 100)),
|
|
7092
7168
|
"field-of-view": m ? `${Number(m)}deg` : void 0,
|
|
7093
7169
|
"environment-image": h && h !== "neutral" ? h : "neutral",
|
|
7094
7170
|
"interaction-prompt": v ? "none" : void 0,
|
|
@@ -7106,7 +7182,7 @@ function Qi({ src: e, poster: t, alt: n, height: r, bg: i, autoRotate: o, rotate
|
|
|
7106
7182
|
}) : null
|
|
7107
7183
|
});
|
|
7108
7184
|
}
|
|
7109
|
-
var
|
|
7185
|
+
var ta = ["attribute vec2 p;", "void main() { gl_Position = vec4(p, 0.0, 1.0); }"].join("\n"), na = [
|
|
7110
7186
|
"precision highp float;",
|
|
7111
7187
|
"uniform vec2 u_res;",
|
|
7112
7188
|
"uniform float u_time;",
|
|
@@ -7129,7 +7205,7 @@ var $i = ["attribute vec2 p;", "void main() { gl_Position = vec4(p, 0.0, 1.0); }
|
|
|
7129
7205
|
" return v;",
|
|
7130
7206
|
"}",
|
|
7131
7207
|
""
|
|
7132
|
-
].join("\n"),
|
|
7208
|
+
].join("\n"), ra = {
|
|
7133
7209
|
gradient: [
|
|
7134
7210
|
"void main(){",
|
|
7135
7211
|
" vec2 uv = gl_FragCoord.xy / u_res;",
|
|
@@ -7181,7 +7257,7 @@ var $i = ["attribute vec2 p;", "void main() { gl_Position = vec4(p, 0.0, 1.0); }
|
|
|
7181
7257
|
"}"
|
|
7182
7258
|
].join("\n")
|
|
7183
7259
|
};
|
|
7184
|
-
function
|
|
7260
|
+
function ia(e, t) {
|
|
7185
7261
|
let n = /^#?([0-9a-f]{6})$/i.exec(String(e ?? "").trim());
|
|
7186
7262
|
if (!n) return t;
|
|
7187
7263
|
let r = parseInt(n[1], 16);
|
|
@@ -7191,7 +7267,7 @@ function na(e, t) {
|
|
|
7191
7267
|
(r & 255) / 255
|
|
7192
7268
|
];
|
|
7193
7269
|
}
|
|
7194
|
-
function
|
|
7270
|
+
function aa(e, t, n) {
|
|
7195
7271
|
let r = e.createShader(t);
|
|
7196
7272
|
if (e.shaderSource(r, n), e.compileShader(r), !e.getShaderParameter(r, e.COMPILE_STATUS)) {
|
|
7197
7273
|
let t = e.getShaderInfoLog(r);
|
|
@@ -7199,13 +7275,13 @@ function ra(e, t, n) {
|
|
|
7199
7275
|
}
|
|
7200
7276
|
return r;
|
|
7201
7277
|
}
|
|
7202
|
-
function
|
|
7278
|
+
function oa({ preset: e, code: t, colorA: n, colorB: r, colorC: i, speed: o, scale: s, height: u, interactive: p, style: m, nodeRef: h, inert: g }) {
|
|
7203
7279
|
let _ = c(null), v = c(null), y = c(null), [b, x] = l("");
|
|
7204
7280
|
a(() => () => {
|
|
7205
7281
|
let e = y.current;
|
|
7206
7282
|
y.current = null, e?.getExtension("WEBGL_lose_context")?.loseContext();
|
|
7207
7283
|
}, []);
|
|
7208
|
-
let S = typeof t == "string" && t.trim() ? t :
|
|
7284
|
+
let S = typeof t == "string" && t.trim() ? t : ra[e] ?? ra.gradient, C = String(n ?? ""), w = String(r ?? ""), T = String(i ?? ""), E = Xi(o, 100), D = Math.max(.05, Xi(s, 100));
|
|
7209
7285
|
return a(() => {
|
|
7210
7286
|
let e = _.current, t = v.current;
|
|
7211
7287
|
if (!e || !t) return;
|
|
@@ -7220,7 +7296,7 @@ function ia({ preset: e, code: t, colorA: n, colorB: r, colorC: i, speed: o, sca
|
|
|
7220
7296
|
}
|
|
7221
7297
|
let r = null;
|
|
7222
7298
|
try {
|
|
7223
|
-
let e =
|
|
7299
|
+
let e = aa(n, n.VERTEX_SHADER, ta), t = aa(n, n.FRAGMENT_SHADER, na + S);
|
|
7224
7300
|
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");
|
|
7225
7301
|
x("");
|
|
7226
7302
|
} catch (e) {
|
|
@@ -7256,28 +7332,28 @@ function ia({ preset: e, code: t, colorA: n, colorB: r, colorC: i, speed: o, sca
|
|
|
7256
7332
|
};
|
|
7257
7333
|
p !== !1 && t.addEventListener("pointermove", l);
|
|
7258
7334
|
let u = () => {
|
|
7259
|
-
let r =
|
|
7335
|
+
let r = Ki(), i = Math.max(1, Math.round(t.clientWidth * r)), a = Math.max(1, Math.round(t.clientHeight * r));
|
|
7260
7336
|
(e.width !== i || e.height !== a) && (e.width = i, e.height = a, n.viewport(0, 0, i, a));
|
|
7261
7337
|
}, d = typeof ResizeObserver > "u" ? null : new ResizeObserver(u);
|
|
7262
7338
|
d?.observe(t), u();
|
|
7263
|
-
let f =
|
|
7264
|
-
a:
|
|
7339
|
+
let f = Gi(), m = {
|
|
7340
|
+
a: ia(C, [
|
|
7265
7341
|
.35,
|
|
7266
7342
|
.4,
|
|
7267
7343
|
.95
|
|
7268
7344
|
]),
|
|
7269
|
-
b:
|
|
7345
|
+
b: ia(w, [
|
|
7270
7346
|
.05,
|
|
7271
7347
|
.06,
|
|
7272
7348
|
.16
|
|
7273
7349
|
]),
|
|
7274
|
-
c:
|
|
7350
|
+
c: ia(T, [
|
|
7275
7351
|
.95,
|
|
7276
7352
|
.35,
|
|
7277
7353
|
.6
|
|
7278
7354
|
])
|
|
7279
7355
|
}, h = {};
|
|
7280
|
-
return h.stop =
|
|
7356
|
+
return h.stop = qi(t, (t, r) => {
|
|
7281
7357
|
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?.();
|
|
7282
7358
|
}), () => {
|
|
7283
7359
|
h.stop?.(), d?.disconnect(), t.removeEventListener("pointermove", l), n.deleteProgram(r), n.deleteBuffer(i);
|
|
@@ -7296,7 +7372,7 @@ function ia({ preset: e, code: t, colorA: n, colorB: r, colorC: i, speed: o, sca
|
|
|
7296
7372
|
},
|
|
7297
7373
|
style: {
|
|
7298
7374
|
position: "relative",
|
|
7299
|
-
minHeight:
|
|
7375
|
+
minHeight: Yi(u, 320),
|
|
7300
7376
|
overflow: "hidden",
|
|
7301
7377
|
...P(m)
|
|
7302
7378
|
},
|
|
@@ -7328,7 +7404,7 @@ function ia({ preset: e, code: t, colorA: n, colorB: r, colorC: i, speed: o, sca
|
|
|
7328
7404
|
}) : null]
|
|
7329
7405
|
});
|
|
7330
7406
|
}
|
|
7331
|
-
function
|
|
7407
|
+
function sa(e, t) {
|
|
7332
7408
|
let n = new e.Scene(), r = new e.BoxGeometry();
|
|
7333
7409
|
r.deleteAttribute("uv");
|
|
7334
7410
|
let i = new e.Mesh(r, new e.MeshBasicMaterial({
|
|
@@ -7344,23 +7420,23 @@ function aa(e, t) {
|
|
|
7344
7420
|
let o = new e.PMREMGenerator(t), s = o.fromScene(n, .04);
|
|
7345
7421
|
return o.dispose(), r.dispose(), n.traverse((e) => e.material?.dispose?.()), s.texture;
|
|
7346
7422
|
}
|
|
7347
|
-
var
|
|
7348
|
-
function
|
|
7349
|
-
if (
|
|
7350
|
-
let t =
|
|
7423
|
+
var ca = /* @__PURE__ */ new Map();
|
|
7424
|
+
function la(e) {
|
|
7425
|
+
if (ca.has(e)) return ca.get(e);
|
|
7426
|
+
let t = Ui("loaders/GLTFLoader.js").then((t) => new Promise((n, r) => {
|
|
7351
7427
|
new t.GLTFLoader().load(e, (e) => n(e.scene), void 0, r);
|
|
7352
7428
|
})).catch((t) => {
|
|
7353
|
-
throw
|
|
7429
|
+
throw ca.delete(e), t;
|
|
7354
7430
|
});
|
|
7355
|
-
return
|
|
7431
|
+
return ca.set(e, t), t;
|
|
7356
7432
|
}
|
|
7357
|
-
function
|
|
7433
|
+
function ua(e, t) {
|
|
7358
7434
|
let n = new e.Box3().setFromObject(t);
|
|
7359
7435
|
if (n.isEmpty()) return t;
|
|
7360
7436
|
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();
|
|
7361
7437
|
return t.position.sub(i), t.scale.multiplyScalar(1 / a), t.position.multiplyScalar(1 / a), o.add(t), o;
|
|
7362
7438
|
}
|
|
7363
|
-
var
|
|
7439
|
+
var da = {
|
|
7364
7440
|
box: (e) => new e.BoxGeometry(1, 1, 1, 1, 1, 1),
|
|
7365
7441
|
sphere: (e) => new e.SphereGeometry(.62, 48, 32),
|
|
7366
7442
|
torus: (e) => new e.TorusGeometry(.5, .2, 24, 64),
|
|
@@ -7369,50 +7445,50 @@ var la = {
|
|
|
7369
7445
|
cylinder: (e) => new e.CylinderGeometry(.45, .45, 1.1, 48),
|
|
7370
7446
|
plane: (e) => new e.PlaneGeometry(1.4, 1.4),
|
|
7371
7447
|
capsule: (e) => new e.CapsuleGeometry(.35, .6, 8, 32)
|
|
7372
|
-
},
|
|
7373
|
-
function
|
|
7374
|
-
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 && !
|
|
7448
|
+
}, fa = (e, t) => Number.isFinite(Number(e)) ? Number(e) : t;
|
|
7449
|
+
function pa({ objects: e, background: t, cameraDistance: n, fov: r, autoRotate: i, spinSpeed: o, controls: s, ground: u, height: f, style: p, nodeRef: m, inert: h }) {
|
|
7450
|
+
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 && !Gi(), S = s !== !1 && !h;
|
|
7375
7451
|
return a(() => {
|
|
7376
7452
|
let e = g.current;
|
|
7377
7453
|
if (!e) return;
|
|
7378
7454
|
let i = !0, a = null;
|
|
7379
|
-
return
|
|
7455
|
+
return Hi().then((s) => {
|
|
7380
7456
|
if (!i || !e) return;
|
|
7381
7457
|
let c = new s.WebGLRenderer({
|
|
7382
7458
|
antialias: !0,
|
|
7383
7459
|
alpha: !t
|
|
7384
7460
|
});
|
|
7385
|
-
c.setPixelRatio(
|
|
7461
|
+
c.setPixelRatio(Ki()), 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);
|
|
7386
7462
|
let l = new s.Scene();
|
|
7387
|
-
t && (l.background = new s.Color(t)), l.environment =
|
|
7388
|
-
let d = new s.PerspectiveCamera(
|
|
7389
|
-
distance:
|
|
7463
|
+
t && (l.background = new s.Color(t)), l.environment = sa(s, c);
|
|
7464
|
+
let d = new s.PerspectiveCamera(fa(r, 45), 1, .1, 400), f = Ji(d, c.domElement, {
|
|
7465
|
+
distance: fa(n, 5),
|
|
7390
7466
|
enableZoom: S
|
|
7391
7467
|
}), p = new s.DirectionalLight(16777215, 2.2);
|
|
7392
7468
|
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));
|
|
7393
7469
|
let m = [], h = new s.Group(), g = (e, t) => {
|
|
7394
|
-
let n =
|
|
7395
|
-
e.position.set(
|
|
7470
|
+
let n = fa(t.scale, 1);
|
|
7471
|
+
e.position.set(fa(t.x, 0), fa(t.y, 0), fa(t.z, 0)), e.rotation.set(Zi(t.rx), Zi(t.ry), Zi(t.rz)), e.scale.setScalar(n > 0 ? n : 1), e.userData.spin = Zi(t.spin);
|
|
7396
7472
|
};
|
|
7397
7473
|
for (let e of y) {
|
|
7398
7474
|
if (e.shape === "model") {
|
|
7399
|
-
if (!
|
|
7475
|
+
if (!Qi(e.src)) continue;
|
|
7400
7476
|
let t = new s.Group();
|
|
7401
|
-
g(t, e), h.add(t),
|
|
7477
|
+
g(t, e), h.add(t), la(e.src).then((e) => {
|
|
7402
7478
|
if (!i) return;
|
|
7403
|
-
let n =
|
|
7479
|
+
let n = ua(s, e.clone(!0));
|
|
7404
7480
|
n.traverse((e) => {
|
|
7405
7481
|
e.isMesh && (e.castShadow = !0, e.receiveShadow = !0);
|
|
7406
7482
|
}), t.add(n);
|
|
7407
7483
|
}, () => {});
|
|
7408
7484
|
continue;
|
|
7409
7485
|
}
|
|
7410
|
-
let t = (
|
|
7486
|
+
let t = (da[e.shape] ?? da.box)(s), n = new s.MeshStandardMaterial({
|
|
7411
7487
|
color: /^#?[0-9a-f]{6}$/i.test(String(e.color ?? "")) ? e.color : "#6366f1",
|
|
7412
|
-
metalness: Math.min(1, Math.max(0,
|
|
7413
|
-
roughness: Math.min(1, Math.max(0,
|
|
7414
|
-
transparent:
|
|
7415
|
-
opacity: Math.min(1, Math.max(0,
|
|
7488
|
+
metalness: Math.min(1, Math.max(0, Xi(e.metalness, 10))),
|
|
7489
|
+
roughness: Math.min(1, Math.max(0, Xi(e.roughness, 35))),
|
|
7490
|
+
transparent: Xi(e.opacity, 100) < 1,
|
|
7491
|
+
opacity: Math.min(1, Math.max(0, Xi(e.opacity, 100))),
|
|
7416
7492
|
flatShading: e.flat === !0,
|
|
7417
7493
|
wireframe: e.wireframe === !0,
|
|
7418
7494
|
side: e.shape === "plane" ? s.DoubleSide : s.FrontSide
|
|
@@ -7423,14 +7499,14 @@ function da({ objects: e, background: t, cameraDistance: n, fov: r, autoRotate:
|
|
|
7423
7499
|
let _ = null;
|
|
7424
7500
|
if (u !== !1) {
|
|
7425
7501
|
let e = new s.ShadowMaterial({ opacity: .22 }), t = new s.PlaneGeometry(60, 60);
|
|
7426
|
-
_ = new s.Mesh(t, e), _.rotation.x = -Math.PI / 2, _.position.y =
|
|
7502
|
+
_ = new s.Mesh(t, e), _.rotation.x = -Math.PI / 2, _.position.y = fa(u === !0 ? 0 : u, -.85), _.receiveShadow = !0, l.add(_), m.push(t, e);
|
|
7427
7503
|
}
|
|
7428
7504
|
let v = () => {
|
|
7429
7505
|
let t = Math.max(1, e.clientWidth), n = Math.max(1, e.clientHeight);
|
|
7430
7506
|
c.setSize(t, n, !1), d.aspect = t / n, d.updateProjectionMatrix();
|
|
7431
7507
|
}, b = typeof ResizeObserver > "u" ? null : new ResizeObserver(v);
|
|
7432
7508
|
b?.observe(e), v();
|
|
7433
|
-
let C =
|
|
7509
|
+
let C = Zi(Number.isFinite(Number(o)) ? o : 20), w = qi(e, (e) => {
|
|
7434
7510
|
f.autoSpin(x ? C : 0, e), f.update();
|
|
7435
7511
|
for (let t of h.children) t.userData.spin && (t.rotation.y += t.userData.spin * e);
|
|
7436
7512
|
c.render(l, d);
|
|
@@ -7454,7 +7530,7 @@ function da({ objects: e, background: t, cameraDistance: n, fov: r, autoRotate:
|
|
|
7454
7530
|
o,
|
|
7455
7531
|
S,
|
|
7456
7532
|
u
|
|
7457
|
-
]), _ && h ? /* @__PURE__ */ d(
|
|
7533
|
+
]), _ && h ? /* @__PURE__ */ d($i, {
|
|
7458
7534
|
nodeRef: m,
|
|
7459
7535
|
style: p,
|
|
7460
7536
|
height: f,
|
|
@@ -7465,27 +7541,27 @@ function da({ objects: e, background: t, cameraDistance: n, fov: r, autoRotate:
|
|
|
7465
7541
|
g.current = e, typeof m == "function" && m(e);
|
|
7466
7542
|
},
|
|
7467
7543
|
style: {
|
|
7468
|
-
minHeight:
|
|
7469
|
-
height:
|
|
7544
|
+
minHeight: Yi(f, 380),
|
|
7545
|
+
height: Yi(f, 380),
|
|
7470
7546
|
overflow: "hidden",
|
|
7471
7547
|
touchAction: S ? "pan-y" : void 0,
|
|
7472
7548
|
...P(p)
|
|
7473
7549
|
}
|
|
7474
7550
|
});
|
|
7475
7551
|
}
|
|
7476
|
-
function
|
|
7552
|
+
function ma({ code: e, height: t, background: n, style: r, nodeRef: i, inert: o }) {
|
|
7477
7553
|
let s = c(null), [u, f] = l("");
|
|
7478
7554
|
return a(() => {
|
|
7479
7555
|
let t = s.current;
|
|
7480
7556
|
if (o || !t || typeof e != "string" || !e.trim()) return;
|
|
7481
7557
|
let r = !0, i = null;
|
|
7482
|
-
return
|
|
7558
|
+
return Hi().then((a) => {
|
|
7483
7559
|
if (!r || !t) return;
|
|
7484
7560
|
let o = new a.WebGLRenderer({
|
|
7485
7561
|
antialias: !0,
|
|
7486
7562
|
alpha: !n
|
|
7487
7563
|
});
|
|
7488
|
-
o.setPixelRatio(
|
|
7564
|
+
o.setPixelRatio(Ki()), o.outputColorSpace = a.SRGBColorSpace, o.domElement.style.display = "block", o.domElement.style.width = "100%", o.domElement.style.height = "100%", t.appendChild(o.domElement);
|
|
7489
7565
|
let s = new a.Scene();
|
|
7490
7566
|
n && (s.background = new a.Color(n));
|
|
7491
7567
|
let c = new a.PerspectiveCamera(45, 1, .1, 1e3);
|
|
@@ -7508,7 +7584,7 @@ function fa({ code: e, height: t, background: n, style: r, nodeRef: i, inert: o
|
|
|
7508
7584
|
o.setSize(e, n, !1), c.aspect = e / n, c.updateProjectionMatrix();
|
|
7509
7585
|
}, d = typeof ResizeObserver > "u" ? null : new ResizeObserver(u);
|
|
7510
7586
|
d?.observe(t), u();
|
|
7511
|
-
let p = !1, m =
|
|
7587
|
+
let p = !1, m = qi(t, (e, t) => {
|
|
7512
7588
|
if (!p && typeof l?.frame == "function") try {
|
|
7513
7589
|
l.frame(e, t);
|
|
7514
7590
|
} catch (e) {
|
|
@@ -7530,7 +7606,7 @@ function fa({ code: e, height: t, background: n, style: r, nodeRef: i, inert: o
|
|
|
7530
7606
|
e,
|
|
7531
7607
|
o,
|
|
7532
7608
|
n
|
|
7533
|
-
]), o ? /* @__PURE__ */ d(
|
|
7609
|
+
]), o ? /* @__PURE__ */ d($i, {
|
|
7534
7610
|
nodeRef: i,
|
|
7535
7611
|
style: r,
|
|
7536
7612
|
height: t,
|
|
@@ -7541,8 +7617,8 @@ function fa({ code: e, height: t, background: n, style: r, nodeRef: i, inert: o
|
|
|
7541
7617
|
s.current = e, typeof i == "function" && i(e);
|
|
7542
7618
|
},
|
|
7543
7619
|
style: {
|
|
7544
|
-
minHeight:
|
|
7545
|
-
height:
|
|
7620
|
+
minHeight: Yi(t, 380),
|
|
7621
|
+
height: Yi(t, 380),
|
|
7546
7622
|
overflow: "hidden",
|
|
7547
7623
|
position: "relative",
|
|
7548
7624
|
touchAction: "pan-y",
|
|
@@ -7565,40 +7641,40 @@ function fa({ code: e, height: t, background: n, style: r, nodeRef: i, inert: o
|
|
|
7565
7641
|
}) : null
|
|
7566
7642
|
});
|
|
7567
7643
|
}
|
|
7568
|
-
var
|
|
7569
|
-
ModelViewerBlock:
|
|
7570
|
-
ShaderBlock:
|
|
7571
|
-
SceneBlock:
|
|
7572
|
-
ThreeCanvasBlock:
|
|
7573
|
-
},
|
|
7574
|
-
function
|
|
7575
|
-
if (
|
|
7644
|
+
var ha = {
|
|
7645
|
+
ModelViewerBlock: ea,
|
|
7646
|
+
ShaderBlock: oa,
|
|
7647
|
+
SceneBlock: pa,
|
|
7648
|
+
ThreeCanvasBlock: ma
|
|
7649
|
+
}, ga = /* @__PURE__ */ new Map();
|
|
7650
|
+
function _a(e) {
|
|
7651
|
+
if (ga.has(e)) return ga.get(e);
|
|
7576
7652
|
let t = URL.createObjectURL(new Blob([e], { type: "text/javascript" })), n = import(
|
|
7577
7653
|
/* @vite-ignore */
|
|
7578
7654
|
/* webpackIgnore: true */
|
|
7579
7655
|
t
|
|
7580
7656
|
).finally(() => URL.revokeObjectURL(t));
|
|
7581
|
-
return
|
|
7657
|
+
return ga.set(e, n), n;
|
|
7582
7658
|
}
|
|
7583
|
-
function
|
|
7659
|
+
function va(e) {
|
|
7584
7660
|
let t = e && typeof e == "object" ? e.builder_plugins : null, n = t && typeof t == "object" ? t.plugins : null;
|
|
7585
7661
|
return n && typeof n == "object" ? n : {};
|
|
7586
7662
|
}
|
|
7587
7663
|
//#endregion
|
|
7588
7664
|
//#region ../ui/src/components/builder/plugins/view.jsx
|
|
7589
|
-
async function
|
|
7590
|
-
let n = await
|
|
7665
|
+
async function ya(e, t) {
|
|
7666
|
+
let n = await _a(e);
|
|
7591
7667
|
return (Array.isArray(n?.default?.blocks) ? n.default.blocks : []).find((e) => e?.id === t && typeof e.mount == "function") ?? null;
|
|
7592
7668
|
}
|
|
7593
|
-
var
|
|
7669
|
+
var ba = {
|
|
7594
7670
|
padding: "10px 12px",
|
|
7595
7671
|
border: "1px dashed rgba(148, 163, 184, 0.5)",
|
|
7596
7672
|
borderRadius: 8,
|
|
7597
7673
|
fontSize: 12,
|
|
7598
7674
|
opacity: .6
|
|
7599
7675
|
};
|
|
7600
|
-
function
|
|
7601
|
-
let s = i(Q), l =
|
|
7676
|
+
function xa({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
|
|
7677
|
+
let s = i(Q), l = va(s?.settings)[e], u = c(null), p = c(null), m = {
|
|
7602
7678
|
tenant: s?.tenant ?? "",
|
|
7603
7679
|
apiUrl: s?.apiUrl ?? "/api",
|
|
7604
7680
|
locale: s?.locale ?? "",
|
|
@@ -7610,7 +7686,7 @@ function ya({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
|
|
|
7610
7686
|
let e = u.current;
|
|
7611
7687
|
if (!l?.code || !e) return;
|
|
7612
7688
|
let n = !0;
|
|
7613
|
-
return
|
|
7689
|
+
return ya(l.code, t).then((e) => {
|
|
7614
7690
|
if (!(!n || !e || !u.current)) {
|
|
7615
7691
|
p.current = e;
|
|
7616
7692
|
try {
|
|
@@ -7640,7 +7716,7 @@ function ya({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
|
|
|
7640
7716
|
}) : /* @__PURE__ */ f("div", {
|
|
7641
7717
|
ref: o,
|
|
7642
7718
|
style: {
|
|
7643
|
-
...
|
|
7719
|
+
...ba,
|
|
7644
7720
|
...P(r)
|
|
7645
7721
|
},
|
|
7646
7722
|
children: [
|
|
@@ -7652,13 +7728,13 @@ function ya({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
|
|
|
7652
7728
|
}
|
|
7653
7729
|
//#endregion
|
|
7654
7730
|
//#region ../ui/src/components/builder/render.jsx
|
|
7655
|
-
var
|
|
7656
|
-
...
|
|
7657
|
-
...
|
|
7658
|
-
...
|
|
7659
|
-
PluginBlock:
|
|
7731
|
+
var Sa = {
|
|
7732
|
+
...ei,
|
|
7733
|
+
...Ni,
|
|
7734
|
+
...ha,
|
|
7735
|
+
PluginBlock: xa
|
|
7660
7736
|
};
|
|
7661
|
-
function
|
|
7737
|
+
function Ca(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
|
|
7662
7738
|
let o = n[e];
|
|
7663
7739
|
if (!o || o.hidden) return null;
|
|
7664
7740
|
let s = o.type?.resolvedName, c = a?.mapProps ? a.mapProps(o.props ?? {}, s) : o.props ?? {};
|
|
@@ -7666,11 +7742,11 @@ function xa(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
|
|
|
7666
7742
|
let n = o.props?.componentId, s = r?.[n];
|
|
7667
7743
|
if (!s?.template || i.has(n)) return null;
|
|
7668
7744
|
let c = new Set(i).add(n);
|
|
7669
|
-
return /* @__PURE__ */ d(t, { children:
|
|
7745
|
+
return /* @__PURE__ */ d(t, { children: Ca(s.template.rootId, s.template.nodes, r, c, a) }, e);
|
|
7670
7746
|
}
|
|
7671
|
-
let l =
|
|
7747
|
+
let l = Sa[s];
|
|
7672
7748
|
if (!l) return null;
|
|
7673
|
-
let u = (o.nodes ?? []).map((e) =>
|
|
7749
|
+
let u = (o.nodes ?? []).map((e) => Ca(e, n, r, i, a)).filter(Boolean), f = Object.entries(o.linkedNodes ?? {}), p = f.length ? Object.fromEntries(f.map(([e, t]) => [e, Ca(t, n, r, i, a)])) : void 0, m = /* @__PURE__ */ d(l, {
|
|
7674
7750
|
...c,
|
|
7675
7751
|
...s === "CollectionList" ? { templateId: o.linkedNodes?.card } : null,
|
|
7676
7752
|
linked: p,
|
|
@@ -7679,16 +7755,16 @@ function xa(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
|
|
|
7679
7755
|
},
|
|
7680
7756
|
children: u.length ? u : void 0
|
|
7681
7757
|
}, e);
|
|
7682
|
-
return c.when && c.when !== "always" ? /* @__PURE__ */ d(
|
|
7758
|
+
return c.when && c.when !== "always" ? /* @__PURE__ */ d(ui, {
|
|
7683
7759
|
when: c.when,
|
|
7684
7760
|
children: m
|
|
7685
7761
|
}, e) : m;
|
|
7686
7762
|
}
|
|
7687
7763
|
//#endregion
|
|
7688
7764
|
//#region ../ui/src/components/builder/PageRenderer.jsx
|
|
7689
|
-
var
|
|
7765
|
+
var wa = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" "), Ta = (e) => `.webim-page[data-webim-mode="light"] { ${Object.entries(Ge(e.light)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }
|
|
7690
7766
|
.webim-page[data-webim-mode="dark"] { ${Object.entries(Ge(e.dark)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }`;
|
|
7691
|
-
function
|
|
7767
|
+
function Ea({ 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 }) {
|
|
7692
7768
|
let y = o?.js?.trim();
|
|
7693
7769
|
if (a(() => {
|
|
7694
7770
|
if (!y) return;
|
|
@@ -7702,11 +7778,11 @@ function wa({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
|
|
|
7702
7778
|
minHeight: "100%",
|
|
7703
7779
|
display: "flex",
|
|
7704
7780
|
flexDirection: "column"
|
|
7705
|
-
}, w =
|
|
7781
|
+
}, w = Ca("ROOT", e, n), T = s(() => ({ render: (t, r) => Ca(t, e, n, void 0, { mapProps: r }) }), [e, n]), E = ae(e, n), O = ie(e, n), k = o?.css?.trim(), j = S(c), M = We(t), N = [M.font, M.headingFont].filter((e) => typeof e == "string" && e.trim() && e !== "inherit" && !Ve[e]), P = [.../* @__PURE__ */ new Set([...A(e, n), ...N])].map((e) => /* @__PURE__ */ d("link", {
|
|
7706
7782
|
rel: "stylesheet",
|
|
7707
7783
|
precedence: "default",
|
|
7708
7784
|
href: D(e)
|
|
7709
|
-
}, e)), F =
|
|
7785
|
+
}, e)), F = Ta(M);
|
|
7710
7786
|
return r === "auto" ? /* @__PURE__ */ d(Q.Provider, {
|
|
7711
7787
|
value: {
|
|
7712
7788
|
tenant: l || "",
|
|
@@ -7714,7 +7790,7 @@ function wa({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
|
|
|
7714
7790
|
locale: m || "",
|
|
7715
7791
|
settings: _ ?? null
|
|
7716
7792
|
},
|
|
7717
|
-
children: /* @__PURE__ */ d(
|
|
7793
|
+
children: /* @__PURE__ */ d(li, {
|
|
7718
7794
|
initialUser: v,
|
|
7719
7795
|
children: /* @__PURE__ */ d(Qe.Provider, {
|
|
7720
7796
|
value: p ?? null,
|
|
@@ -7729,8 +7805,8 @@ function wa({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
|
|
|
7729
7805
|
...i
|
|
7730
7806
|
},
|
|
7731
7807
|
children: [
|
|
7732
|
-
/* @__PURE__ */ d("style", { children: `.webim-page { ${
|
|
7733
|
-
@media (prefers-color-scheme: dark) { .webim-page { ${
|
|
7808
|
+
/* @__PURE__ */ d("style", { children: `.webim-page { ${wa(Ge(M.light))} }
|
|
7809
|
+
@media (prefers-color-scheme: dark) { .webim-page { ${wa(Ge(M.dark))} } }` }),
|
|
7734
7810
|
/* @__PURE__ */ d("style", { children: F }),
|
|
7735
7811
|
P,
|
|
7736
7812
|
/* @__PURE__ */ d("style", { children: x }),
|
|
@@ -7750,7 +7826,7 @@ function wa({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
|
|
|
7750
7826
|
locale: m || "",
|
|
7751
7827
|
settings: _ ?? null
|
|
7752
7828
|
},
|
|
7753
|
-
children: /* @__PURE__ */ d(
|
|
7829
|
+
children: /* @__PURE__ */ d(li, {
|
|
7754
7830
|
initialUser: v,
|
|
7755
7831
|
children: /* @__PURE__ */ d(Qe.Provider, {
|
|
7756
7832
|
value: p ?? null,
|
|
@@ -7783,8 +7859,8 @@ function wa({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
|
|
|
7783
7859
|
}
|
|
7784
7860
|
//#endregion
|
|
7785
7861
|
//#region src/WebimContent.jsx
|
|
7786
|
-
function
|
|
7787
|
-
return e?.blocks?.ROOT ? /* @__PURE__ */ d(
|
|
7862
|
+
function Da({ bundle: e, mode: t = "auto", style: n }) {
|
|
7863
|
+
return e?.blocks?.ROOT ? /* @__PURE__ */ d(Ea, {
|
|
7788
7864
|
blocks: e.blocks,
|
|
7789
7865
|
theme: e.theme,
|
|
7790
7866
|
components: e.components,
|
|
@@ -7802,7 +7878,7 @@ function Ta({ bundle: e, mode: t = "auto", style: n }) {
|
|
|
7802
7878
|
}
|
|
7803
7879
|
//#endregion
|
|
7804
7880
|
//#region src/bundle.js
|
|
7805
|
-
function
|
|
7881
|
+
function Oa({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
|
|
7806
7882
|
let a = {
|
|
7807
7883
|
...t?.global ?? {},
|
|
7808
7884
|
...t?.tenant ?? {}
|
|
@@ -7828,18 +7904,18 @@ function Ea({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
|
|
|
7828
7904
|
}
|
|
7829
7905
|
//#endregion
|
|
7830
7906
|
//#region src/fetchPage.js
|
|
7831
|
-
var
|
|
7907
|
+
var ka = async (e) => {
|
|
7832
7908
|
let t = await e.json().catch(() => null);
|
|
7833
7909
|
if (!e.ok || t?.success === !1) throw Error(t?.error?.message || `Request failed (${e.status})`);
|
|
7834
7910
|
return t?.payload ?? t;
|
|
7835
7911
|
};
|
|
7836
|
-
async function
|
|
7912
|
+
async function Aa({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token: a, page: o, fetch: s }) {
|
|
7837
7913
|
if (!e) throw Error("fetchPage: apiUrl is required");
|
|
7838
7914
|
if (!n) throw Error("fetchPage: slug is required");
|
|
7839
7915
|
let c = s ?? fetch, l = e.replace(/\/$/, ""), u = {
|
|
7840
7916
|
...t ? { "x-tenant": t } : {},
|
|
7841
7917
|
...a ? { authorization: `Bearer ${a}` } : {}
|
|
7842
|
-
}, [d, f] = await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: u }).then(
|
|
7918
|
+
}, [d, f] = await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: u }).then(ka), c(`${l}/settings/public`, { headers: u }).then(ka)]), p = Oa({
|
|
7843
7919
|
page: d,
|
|
7844
7920
|
settings: f,
|
|
7845
7921
|
tenant: t,
|
|
@@ -7854,7 +7930,7 @@ async function Oa({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token:
|
|
|
7854
7930
|
"LogoCarousel"
|
|
7855
7931
|
].includes(e?.type?.resolvedName) ? e.props?.source : null).filter(Boolean))];
|
|
7856
7932
|
if (m.length) {
|
|
7857
|
-
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(
|
|
7933
|
+
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(ka).then((e) => {
|
|
7858
7934
|
let n = Array.isArray(e) ? e : Array.isArray(e?.data) ? e.data : [], r = Number(e?.total?.filtered ?? e?.total?.all ?? n.length);
|
|
7859
7935
|
return [[t, n], [`${t}:total`, Number.isFinite(r) ? r : n.length]];
|
|
7860
7936
|
}).catch(() => [[t, []]])));
|
|
@@ -7868,40 +7944,40 @@ async function Oa({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token:
|
|
|
7868
7944
|
}
|
|
7869
7945
|
//#endregion
|
|
7870
7946
|
//#region src/ssr.jsx
|
|
7871
|
-
var
|
|
7947
|
+
var ja = (e) => String(e ?? "").replace(/[&<>"]/g, (e) => ({
|
|
7872
7948
|
"&": "&",
|
|
7873
7949
|
"<": "<",
|
|
7874
7950
|
">": ">",
|
|
7875
7951
|
"\"": """
|
|
7876
7952
|
})[e]);
|
|
7877
|
-
function
|
|
7878
|
-
return e(/* @__PURE__ */ d(
|
|
7953
|
+
function Ma(t, { mode: n = "auto", style: r } = {}) {
|
|
7954
|
+
return e(/* @__PURE__ */ d(Da, {
|
|
7879
7955
|
bundle: t,
|
|
7880
7956
|
mode: n,
|
|
7881
7957
|
style: r
|
|
7882
7958
|
}));
|
|
7883
7959
|
}
|
|
7884
|
-
function
|
|
7960
|
+
function Na(e, { mode: t = "auto", lang: n } = {}) {
|
|
7885
7961
|
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 = [
|
|
7886
7962
|
"<meta charset=\"utf-8\"/>",
|
|
7887
7963
|
"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"/>",
|
|
7888
|
-
`<title>${
|
|
7889
|
-
r.description && `<meta name="description" content="${
|
|
7890
|
-
`<meta property="og:title" content="${
|
|
7891
|
-
r.image && `<meta property="og:image" content="${
|
|
7964
|
+
`<title>${ja(o)}</title>`,
|
|
7965
|
+
r.description && `<meta name="description" content="${ja(r.description)}"/>`,
|
|
7966
|
+
`<meta property="og:title" content="${ja(o)}"/>`,
|
|
7967
|
+
r.image && `<meta property="og:image" content="${ja(r.image)}"/>`,
|
|
7892
7968
|
r.noindex && "<meta name=\"robots\" content=\"noindex\"/>",
|
|
7893
7969
|
"<style>html,body{margin:0;height:100%}</style>"
|
|
7894
7970
|
].filter(Boolean).join("\n");
|
|
7895
7971
|
return `<!doctype html>
|
|
7896
|
-
<html lang="${
|
|
7972
|
+
<html lang="${ja(i)}"${a ? ` dir="${a}"` : ""}>
|
|
7897
7973
|
<head>
|
|
7898
7974
|
${c}
|
|
7899
7975
|
</head>
|
|
7900
7976
|
<body>
|
|
7901
|
-
${
|
|
7977
|
+
${Ma(e, { mode: t })}
|
|
7902
7978
|
${s ? `<script>${s.replaceAll("<\/script", "<\\/script")}<\/script>` : ""}
|
|
7903
7979
|
</body>
|
|
7904
7980
|
</html>`;
|
|
7905
7981
|
}
|
|
7906
7982
|
//#endregion
|
|
7907
|
-
export {
|
|
7983
|
+
export { Oa as assembleBundle, Aa as fetchPage, Ma as renderBundleHtml, Na as renderPageDocument };
|