@levo-so/studio 0.1.104 → 0.1.106
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/{BillingStep-2cKT5Pir.js → BillingStep-BNRcxjRl.js} +1 -1
- package/{Button-DtPwDEN0.js → Button-BIpdwMrO.js} +29 -29
- package/{EntryCard-j4uZb2cE.js → EntryCard-yFsTPjEj.js} +2 -2
- package/{LoginCard-asvOHIRg.js → LoginCard-CUapIHAo.js} +2 -2
- package/{LoginForm-BdsPVHdO.js → LoginForm-n-6Z7eVb.js} +1 -1
- package/{LoginModal-CyvbEK26.js → LoginModal-wyVhIJk8.js} +3 -3
- package/{MessageCard-lrXKEsBP.js → MessageCard-C2fU_Bo_.js} +1 -1
- package/{MessageFooter-D-dCrzJH.js → MessageFooter-4qIEK91O.js} +1 -1
- package/{ModalManager-BcPk4sbK.js → ModalManager-D-yKU_15.js} +1 -1
- package/{PendingApprovalCard-hYkupl9A.js → PendingApprovalCard-CDZRD8Jm.js} +2 -2
- package/{PopupRenderer-C7OHYphU-IWM6d7gW.js → PopupRenderer-CV5HY1dP-DlAn5Rc8.js} +281 -280
- package/{bookingCard-BdV2YSkq.js → bookingCard-MDpR8SL_.js} +3 -3
- package/collection.d.ts +5 -4
- package/collection.js +3 -3
- package/{dist-CsX9NP5P.js → dist-BjFMATnH.js} +1258 -896
- package/index.js +457 -449
- package/{generateRadiusScale-BpcgkGtN.js → inlineCollectionTheme-WpCvMKrW.js} +19 -4
- package/package.json +4 -4
- package/studio.css +1 -1
- package/{utils-CZLafTgN.js → utils-B01DL3RB.js} +1 -1
- package/widgets-NzmPF3Ji.js +215 -0
- package/widgets-eu5zXTf-.js +0 -230
- /package/{StripePaymentModal-DrLMN18M.js → StripePaymentModal-Do1xHctU.js} +0 -0
- /package/{dialog-C8-iHixJ.js → dialog-DoxC50i0.js} +0 -0
- /package/{useLogin-B2qE8710.js → useLogin-D4A5iRey.js} +0 -0
|
@@ -2,49 +2,49 @@ import { t as e } from "./rolldown-runtime-CAFD8bLK.js";
|
|
|
2
2
|
import { a as t, c as n, i as r, l as i, o as a, r as o, s, t as c, u as l } from "./Dialog-IrII0ugb.js";
|
|
3
3
|
import { i as u, t as d } from "./Button-lUfKisu8.js";
|
|
4
4
|
import { n as f, r as p, t as m } from "./inlineRteTheme-Ajq9PNpQ.js";
|
|
5
|
-
import {
|
|
6
|
-
import { n as
|
|
7
|
-
import { t as
|
|
8
|
-
import { c as
|
|
9
|
-
import { $activity as
|
|
10
|
-
import { useLevo as
|
|
11
|
-
import { Suspense as
|
|
12
|
-
import { persistentAtom as
|
|
13
|
-
import { atom as M, computed as
|
|
14
|
-
import { Fragment as
|
|
15
|
-
import
|
|
16
|
-
import { createRuntimeFn as
|
|
17
|
-
import { IconCheck as
|
|
18
|
-
import { generateJSON as
|
|
19
|
-
import { renderToReactElement as
|
|
20
|
-
import { Bold as
|
|
21
|
-
import { BulletList as
|
|
22
|
-
import { Code as
|
|
23
|
-
import { Color as
|
|
24
|
-
import { Document as
|
|
25
|
-
import { HardBreak as
|
|
26
|
-
import { Heading as
|
|
27
|
-
import { Highlight as
|
|
28
|
-
import { Italic as
|
|
29
|
-
import { Link as
|
|
30
|
-
import { ListItem as
|
|
31
|
-
import { OrderedList as
|
|
32
|
-
import { Paragraph as
|
|
33
|
-
import { Strike as
|
|
34
|
-
import { Subscript as
|
|
35
|
-
import { Superscript as
|
|
36
|
-
import { Text as
|
|
37
|
-
import { TextStyle as
|
|
38
|
-
import { Typography as
|
|
39
|
-
import { Underline as
|
|
40
|
-
import { UniqueID as
|
|
41
|
-
import { Extension as
|
|
42
|
-
import { useStore as
|
|
5
|
+
import { i as h, r as g, t as _ } from "./inlineCollectionTheme-WpCvMKrW.js";
|
|
6
|
+
import { n as v, t as y } from "./theme.cssm-BXDp-ojp.js";
|
|
7
|
+
import { t as b } from "./nodeAlignment-DKCIjzlR.js";
|
|
8
|
+
import { c as x } from "react/compiler-runtime";
|
|
9
|
+
import { $activity as S, $isIdentityContextReady as C, $pageLifecycle as w, $scrollBehavior as T, $session as E } from "@levo-so/insights/stores";
|
|
10
|
+
import { useLevo as ee, useLevoInsights as D } from "@levo-so/react";
|
|
11
|
+
import { Suspense as te, createContext as O, lazy as k, useContext as A, useEffect as j, useMemo as ne, useRef as re, useState as ie } from "react";
|
|
12
|
+
import { persistentAtom as ae } from "@nanostores/persistent";
|
|
13
|
+
import { atom as M, computed as oe } from "nanostores";
|
|
14
|
+
import { Fragment as se, jsx as N, jsxs as P } from "react/jsx-runtime";
|
|
15
|
+
import ce from "clsx";
|
|
16
|
+
import { createRuntimeFn as le } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
17
|
+
import { IconCheck as ue, IconCopy as de, IconX as fe } from "@tabler/icons-react";
|
|
18
|
+
import { generateJSON as pe } from "@tiptap/html";
|
|
19
|
+
import { renderToReactElement as me } from "@tiptap/static-renderer/pm/react";
|
|
20
|
+
import { Bold as he } from "@tiptap/extension-bold";
|
|
21
|
+
import { BulletList as ge } from "@tiptap/extension-bullet-list";
|
|
22
|
+
import { Code as _e } from "@tiptap/extension-code";
|
|
23
|
+
import { Color as ve } from "@tiptap/extension-color";
|
|
24
|
+
import { Document as ye } from "@tiptap/extension-document";
|
|
25
|
+
import { HardBreak as be } from "@tiptap/extension-hard-break";
|
|
26
|
+
import { Heading as xe } from "@tiptap/extension-heading";
|
|
27
|
+
import { Highlight as Se } from "@tiptap/extension-highlight";
|
|
28
|
+
import { Italic as Ce } from "@tiptap/extension-italic";
|
|
29
|
+
import { Link as we } from "@tiptap/extension-link";
|
|
30
|
+
import { ListItem as Te } from "@tiptap/extension-list-item";
|
|
31
|
+
import { OrderedList as Ee } from "@tiptap/extension-ordered-list";
|
|
32
|
+
import { Paragraph as De } from "@tiptap/extension-paragraph";
|
|
33
|
+
import { Strike as Oe } from "@tiptap/extension-strike";
|
|
34
|
+
import { Subscript as ke } from "@tiptap/extension-subscript";
|
|
35
|
+
import { Superscript as Ae } from "@tiptap/extension-superscript";
|
|
36
|
+
import { Text as je } from "@tiptap/extension-text";
|
|
37
|
+
import { TextStyle as Me } from "@tiptap/extension-text-style";
|
|
38
|
+
import { Typography as Ne } from "@tiptap/extension-typography";
|
|
39
|
+
import { Underline as Pe } from "@tiptap/extension-underline";
|
|
40
|
+
import { UniqueID as Fe } from "@tiptap/extension-unique-id";
|
|
41
|
+
import { Extension as Ie, Node as Le, mergeAttributes as Re } from "@tiptap/core";
|
|
42
|
+
import { useStore as ze } from "@nanostores/react";
|
|
43
43
|
//#region ../../libraries/levocn/dist/styles/inlineBaseTheme.js
|
|
44
|
-
var
|
|
44
|
+
var Be = v(h), Ve = (e) => e ? e.radius && !e.radiusScale ? Be({
|
|
45
45
|
...e,
|
|
46
46
|
radiusScale: g(e.radius)
|
|
47
|
-
}) :
|
|
47
|
+
}) : Be(e) : {}, He = {
|
|
48
48
|
100: "1f4af",
|
|
49
49
|
1234: "1f522",
|
|
50
50
|
regional_indicator_a: "🇦",
|
|
@@ -1978,7 +1978,7 @@ var Re = _(h), ze = (e) => e ? e.radius && !e.radiusScale ? Re({
|
|
|
1978
1978
|
england: "1f3f4-e0067-e0062-e0065-e006e-e0067-e007f",
|
|
1979
1979
|
scotland: "1f3f4-e0067-e0062-e0073-e0063-e0074-e007f",
|
|
1980
1980
|
wales: "1f3f4-e0067-e0062-e0077-e006c-e0073-e007f"
|
|
1981
|
-
},
|
|
1981
|
+
}, Ue = "https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64", We = (e) => /^[A-Fa-f0-9-]+$/.test(e), Ge = Le.create({
|
|
1982
1982
|
name: "emoji",
|
|
1983
1983
|
inline: !0,
|
|
1984
1984
|
group: "inline",
|
|
@@ -1995,12 +1995,12 @@ var Re = _(h), ze = (e) => e ? e.radius && !e.radiusScale ? Re({
|
|
|
1995
1995
|
return [{ tag: "span[data-type=\"emoji\"]" }];
|
|
1996
1996
|
},
|
|
1997
1997
|
renderHTML({ HTMLAttributes: e, node: t }) {
|
|
1998
|
-
let n =
|
|
1999
|
-
return i ?
|
|
1998
|
+
let n = Re(e, { "data-type": "emoji" }), r = t.attrs.name, i = r ? He[r] : void 0;
|
|
1999
|
+
return i ? We(i) ? [
|
|
2000
2000
|
"span",
|
|
2001
2001
|
n,
|
|
2002
2002
|
["img", {
|
|
2003
|
-
src: `${
|
|
2003
|
+
src: `${Ue}/${i}.png`,
|
|
2004
2004
|
draggable: "false",
|
|
2005
2005
|
loading: "lazy",
|
|
2006
2006
|
align: "absmiddle",
|
|
@@ -2016,7 +2016,7 @@ var Re = _(h), ze = (e) => e ? e.radius && !e.radiusScale ? Re({
|
|
|
2016
2016
|
`:${r || "emoji"}:`
|
|
2017
2017
|
];
|
|
2018
2018
|
}
|
|
2019
|
-
}),
|
|
2019
|
+
}), Ke = Ie.create({
|
|
2020
2020
|
name: "fontSize",
|
|
2021
2021
|
addOptions() {
|
|
2022
2022
|
return { types: ["textStyle"] };
|
|
@@ -2037,124 +2037,124 @@ var Re = _(h), ze = (e) => e ? e.radius && !e.radiusScale ? Re({
|
|
|
2037
2037
|
unsetFontSize: () => ({ chain: e }) => e().setMark("textStyle", { fontSize: null }).removeEmptyTextStyle().run()
|
|
2038
2038
|
};
|
|
2039
2039
|
}
|
|
2040
|
-
}),
|
|
2041
|
-
_: () =>
|
|
2042
|
-
c: () =>
|
|
2043
|
-
d: () =>
|
|
2044
|
-
f: () =>
|
|
2045
|
-
g: () =>
|
|
2046
|
-
h: () =>
|
|
2047
|
-
i: () =>
|
|
2048
|
-
l: () =>
|
|
2049
|
-
m: () =>
|
|
2050
|
-
n: () =>
|
|
2051
|
-
o: () =>
|
|
2052
|
-
p: () =>
|
|
2053
|
-
r: () =>
|
|
2054
|
-
s: () =>
|
|
2055
|
-
t: () =>
|
|
2056
|
-
u: () =>
|
|
2057
|
-
v: () =>
|
|
2058
|
-
y: () =>
|
|
2059
|
-
}),
|
|
2040
|
+
}), qe = /* @__PURE__ */ e({
|
|
2041
|
+
_: () => V,
|
|
2042
|
+
c: () => X,
|
|
2043
|
+
d: () => dt,
|
|
2044
|
+
f: () => Y,
|
|
2045
|
+
g: () => z,
|
|
2046
|
+
h: () => L,
|
|
2047
|
+
i: () => jt,
|
|
2048
|
+
l: () => lt,
|
|
2049
|
+
m: () => B,
|
|
2050
|
+
n: () => Yt,
|
|
2051
|
+
o: () => Ot,
|
|
2052
|
+
p: () => R,
|
|
2053
|
+
r: () => $,
|
|
2054
|
+
s: () => Z,
|
|
2055
|
+
t: () => Zt,
|
|
2056
|
+
u: () => J,
|
|
2057
|
+
v: () => q,
|
|
2058
|
+
y: () => G
|
|
2059
|
+
}), Je = Object.defineProperty, Ye = (e, t) => {
|
|
2060
2060
|
let n = {};
|
|
2061
|
-
for (var r in e)
|
|
2061
|
+
for (var r in e) Je(n, r, {
|
|
2062
2062
|
get: e[r],
|
|
2063
2063
|
enumerable: !0
|
|
2064
2064
|
});
|
|
2065
|
-
return t ||
|
|
2066
|
-
},
|
|
2065
|
+
return t || Je(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
2066
|
+
}, Xe = 6e4, Ze = "lv_popups_session", F = {
|
|
2067
2067
|
active_popup_id: null,
|
|
2068
2068
|
shown_popup_ids: [],
|
|
2069
2069
|
last_closed_at: null
|
|
2070
|
-
},
|
|
2070
|
+
}, I = ae("lv_popups_state", {}, {
|
|
2071
2071
|
encode: JSON.stringify,
|
|
2072
2072
|
decode: JSON.parse
|
|
2073
|
-
}),
|
|
2074
|
-
if (!e) return
|
|
2073
|
+
}), Qe = (e) => {
|
|
2074
|
+
if (!e) return F;
|
|
2075
2075
|
try {
|
|
2076
2076
|
return JSON.parse(e);
|
|
2077
2077
|
} catch {
|
|
2078
|
-
return
|
|
2078
|
+
return F;
|
|
2079
2079
|
}
|
|
2080
|
-
},
|
|
2081
|
-
if (typeof sessionStorage > "u") return
|
|
2080
|
+
}, L = M((() => {
|
|
2081
|
+
if (typeof sessionStorage > "u") return F;
|
|
2082
2082
|
try {
|
|
2083
|
-
return
|
|
2083
|
+
return Qe(sessionStorage.getItem(Ze));
|
|
2084
2084
|
} catch {
|
|
2085
|
-
return
|
|
2085
|
+
return F;
|
|
2086
2086
|
}
|
|
2087
|
-
})()),
|
|
2088
|
-
|
|
2089
|
-
|
|
2087
|
+
})()), $e = L.set;
|
|
2088
|
+
L.set = (e) => {
|
|
2089
|
+
$e(e);
|
|
2090
2090
|
try {
|
|
2091
|
-
sessionStorage.setItem(
|
|
2091
|
+
sessionStorage.setItem(Ze, JSON.stringify(e));
|
|
2092
2092
|
} catch {}
|
|
2093
2093
|
};
|
|
2094
|
-
var
|
|
2094
|
+
var et = oe([L, I], (e, t) => ({
|
|
2095
2095
|
active_popup_id: e.active_popup_id,
|
|
2096
2096
|
shown_popup_ids: e.shown_popup_ids,
|
|
2097
2097
|
last_closed_at: e.last_closed_at,
|
|
2098
2098
|
previous_popups: t
|
|
2099
|
-
})),
|
|
2100
|
-
|
|
2101
|
-
},
|
|
2102
|
-
|
|
2103
|
-
},
|
|
2104
|
-
if (
|
|
2105
|
-
let { last_closed_at: e } =
|
|
2099
|
+
})), R = M([]), z = (e) => {
|
|
2100
|
+
R.set(e);
|
|
2101
|
+
}, B = M(!0), V = (e) => {
|
|
2102
|
+
B.set(e);
|
|
2103
|
+
}, tt = () => et.get(), nt = (e, t) => e.includes(t) ? e : [...e, t], H = "manual", rt = () => H, U = [], W = null, it = () => {
|
|
2104
|
+
if (W) return;
|
|
2105
|
+
let { last_closed_at: e } = L.get();
|
|
2106
2106
|
if (!e) return;
|
|
2107
|
-
let t =
|
|
2107
|
+
let t = Xe - (Date.now() - e);
|
|
2108
2108
|
if (t <= 0) {
|
|
2109
|
-
|
|
2109
|
+
at();
|
|
2110
2110
|
return;
|
|
2111
2111
|
}
|
|
2112
|
-
|
|
2113
|
-
|
|
2112
|
+
W = setTimeout(() => {
|
|
2113
|
+
W = null, at();
|
|
2114
2114
|
}, t);
|
|
2115
|
-
},
|
|
2116
|
-
let e =
|
|
2115
|
+
}, at = () => {
|
|
2116
|
+
let e = L.get();
|
|
2117
2117
|
if (!e.active_popup_id) {
|
|
2118
2118
|
if (e.last_closed_at && Date.now() - e.last_closed_at < 6e4) {
|
|
2119
|
-
|
|
2119
|
+
it();
|
|
2120
2120
|
return;
|
|
2121
2121
|
}
|
|
2122
|
-
for (;
|
|
2123
|
-
let e =
|
|
2124
|
-
if (
|
|
2122
|
+
for (; U.length > 0;) {
|
|
2123
|
+
let e = U.shift();
|
|
2124
|
+
if (G(e.popup, { trigger_type: e.trigger_type })) return;
|
|
2125
2125
|
}
|
|
2126
2126
|
}
|
|
2127
|
-
},
|
|
2128
|
-
|
|
2127
|
+
}, ot = (e, t) => {
|
|
2128
|
+
U.some((t) => t.popup.id === e.id) || (U.push({
|
|
2129
2129
|
popup: e,
|
|
2130
2130
|
trigger_type: t
|
|
2131
|
-
}),
|
|
2132
|
-
},
|
|
2133
|
-
let n =
|
|
2131
|
+
}), it());
|
|
2132
|
+
}, st = (e, t) => {
|
|
2133
|
+
let n = tt();
|
|
2134
2134
|
if (!t || t.type === "always") return !n.shown_popup_ids.includes(e);
|
|
2135
2135
|
let r = n.previous_popups[e];
|
|
2136
2136
|
return r ? t.type === "once" ? !1 : t.type === "interval" && t.interval_ms ? Date.now() - r.triggered_at >= t.interval_ms : !0 : !0;
|
|
2137
|
-
},
|
|
2138
|
-
let { force: n = !1, trigger_type: r = "manual" } = t, i = e.id, a = e.settings?.display_frequency, o =
|
|
2139
|
-
return o.active_popup_id === i ? !0 : !n && (o.active_popup_id || o.last_closed_at && Date.now() - o.last_closed_at < 6e4 || !
|
|
2137
|
+
}, G = (e, t = {}) => {
|
|
2138
|
+
let { force: n = !1, trigger_type: r = "manual" } = t, i = e.id, a = e.settings?.display_frequency, o = L.get();
|
|
2139
|
+
return o.active_popup_id === i ? !0 : !n && (o.active_popup_id || o.last_closed_at && Date.now() - o.last_closed_at < 6e4 || !st(i, a)) ? !1 : (W &&= (clearTimeout(W), null), H = r, L.set({
|
|
2140
2140
|
active_popup_id: i,
|
|
2141
|
-
shown_popup_ids:
|
|
2141
|
+
shown_popup_ids: nt(o.shown_popup_ids, i),
|
|
2142
2142
|
last_closed_at: o.last_closed_at
|
|
2143
|
-
}), !a || a.type === "always" ||
|
|
2144
|
-
...
|
|
2143
|
+
}), !a || a.type === "always" || I.set({
|
|
2144
|
+
...I.get(),
|
|
2145
2145
|
[i]: { triggered_at: Date.now() }
|
|
2146
2146
|
}), !0);
|
|
2147
|
-
},
|
|
2147
|
+
}, K = (e, t = {}) => {
|
|
2148
2148
|
let { trigger_type: n = "manual" } = t;
|
|
2149
|
-
return
|
|
2150
|
-
},
|
|
2151
|
-
let t =
|
|
2152
|
-
t.active_popup_id === e && (
|
|
2149
|
+
return G(e, { trigger_type: n }) ? !0 : (st(e.id, e.settings?.display_frequency) && ot(e, n), !1);
|
|
2150
|
+
}, q = (e) => {
|
|
2151
|
+
let t = L.get();
|
|
2152
|
+
t.active_popup_id === e && (H = "manual", L.set({
|
|
2153
2153
|
...t,
|
|
2154
2154
|
active_popup_id: null,
|
|
2155
2155
|
last_closed_at: Date.now()
|
|
2156
|
-
}), setTimeout(
|
|
2157
|
-
},
|
|
2156
|
+
}), setTimeout(at, 0));
|
|
2157
|
+
}, J = le({
|
|
2158
2158
|
defaultClassName: "_1gklknd4",
|
|
2159
2159
|
variantClassNames: {
|
|
2160
2160
|
placement: {
|
|
@@ -2170,7 +2170,7 @@ var Qe = ae([R, L], (e, t) => ({
|
|
|
2170
2170
|
},
|
|
2171
2171
|
defaultVariants: { placement: "popup" },
|
|
2172
2172
|
compoundVariants: []
|
|
2173
|
-
}),
|
|
2173
|
+
}), ct = "_1gklkndb", Y = "_1gklkndc", lt = "_1gklkndd", ut = le({
|
|
2174
2174
|
defaultClassName: "_1gklknde",
|
|
2175
2175
|
variantClassNames: { size: {
|
|
2176
2176
|
small: "_1gklkndf",
|
|
@@ -2180,75 +2180,75 @@ var Qe = ae([R, L], (e, t) => ({
|
|
|
2180
2180
|
} },
|
|
2181
2181
|
defaultVariants: { size: "medium" },
|
|
2182
2182
|
compoundVariants: []
|
|
2183
|
-
}),
|
|
2184
|
-
_e,
|
|
2185
|
-
Te,
|
|
2186
|
-
ke,
|
|
2183
|
+
}), dt = "_1gklkndl", X = "_1gklkndm", ft = [
|
|
2187
2184
|
ye,
|
|
2188
|
-
|
|
2185
|
+
De,
|
|
2186
|
+
je,
|
|
2189
2187
|
xe,
|
|
2190
|
-
Ee,
|
|
2191
2188
|
he,
|
|
2192
|
-
me,
|
|
2193
|
-
we,
|
|
2194
2189
|
Ce,
|
|
2195
|
-
ve,
|
|
2196
|
-
Me,
|
|
2197
|
-
Se.configure({ openOnClick: !1 }),
|
|
2198
|
-
Ae,
|
|
2199
|
-
We,
|
|
2200
|
-
je,
|
|
2201
2190
|
Oe,
|
|
2202
|
-
|
|
2191
|
+
_e,
|
|
2203
2192
|
ge,
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2193
|
+
Ee,
|
|
2194
|
+
Te,
|
|
2195
|
+
be,
|
|
2196
|
+
Pe,
|
|
2197
|
+
we.configure({ openOnClick: !1 }),
|
|
2198
|
+
Me,
|
|
2199
|
+
Ke,
|
|
2200
|
+
Ne,
|
|
2201
|
+
Ae,
|
|
2202
|
+
ke,
|
|
2203
|
+
ve,
|
|
2204
|
+
Se.configure({ multicolor: !0 }),
|
|
2205
|
+
Ge,
|
|
2206
|
+
b,
|
|
2207
|
+
Fe.configure({ types: [
|
|
2208
2208
|
"paragraph",
|
|
2209
2209
|
"heading",
|
|
2210
2210
|
"bulletList",
|
|
2211
2211
|
"orderedList"
|
|
2212
2212
|
] })
|
|
2213
|
-
],
|
|
2214
|
-
let i =
|
|
2213
|
+
], pt = (e) => pe(e, ft), mt = ({ content: e, className: t, ref: n, ...r }) => {
|
|
2214
|
+
let i = ne(() => e ? typeof e == "string" ? e ? pt(e) : null : e.json && Object.keys(e.json).length > 0 ? e.json : e.html ? pt(e.html) : null : null, [e]), a = ne(() => i ? me({
|
|
2215
2215
|
content: i,
|
|
2216
|
-
extensions:
|
|
2216
|
+
extensions: ft
|
|
2217
2217
|
}) : null, [i]);
|
|
2218
2218
|
return a ? /* @__PURE__ */ N("div", {
|
|
2219
2219
|
ref: n,
|
|
2220
|
-
className:
|
|
2220
|
+
className: ce(p, t),
|
|
2221
2221
|
...r,
|
|
2222
2222
|
children: a
|
|
2223
2223
|
}) : null;
|
|
2224
|
-
},
|
|
2225
|
-
let t =
|
|
2224
|
+
}, ht = O(null), gt = (e) => {
|
|
2225
|
+
let t = x(6), { popup: n, callbacks: r, children: i } = e, a;
|
|
2226
2226
|
t[0] !== r || t[1] !== n ? (a = {
|
|
2227
2227
|
popup: n,
|
|
2228
2228
|
callbacks: r
|
|
2229
2229
|
}, t[0] = r, t[1] = n, t[2] = a) : a = t[2];
|
|
2230
2230
|
let o;
|
|
2231
|
-
return t[3] !== i || t[4] !== a ? (o = /* @__PURE__ */ N(
|
|
2231
|
+
return t[3] !== i || t[4] !== a ? (o = /* @__PURE__ */ N(ht.Provider, {
|
|
2232
2232
|
value: a,
|
|
2233
2233
|
children: i
|
|
2234
2234
|
}), t[3] = i, t[4] = a, t[5] = o) : o = t[5], o;
|
|
2235
|
-
},
|
|
2236
|
-
let e = A(
|
|
2235
|
+
}, _t = () => {
|
|
2236
|
+
let e = A(ht);
|
|
2237
2237
|
if (!e) throw Error("usePopupContext must be used within a PopupProvider");
|
|
2238
2238
|
return e;
|
|
2239
|
-
},
|
|
2240
|
-
let e =
|
|
2239
|
+
}, vt = () => A(ht), yt = () => {
|
|
2240
|
+
let e = x(2), t = vt(), n;
|
|
2241
2241
|
return e[0] === t ? n = e[1] : (n = () => {
|
|
2242
|
-
t && (t.callbacks?.onPopupClose?.(t.popup, { trigger_type:
|
|
2242
|
+
t && (t.callbacks?.onPopupClose?.(t.popup, { trigger_type: rt() }), q(t.popup.id));
|
|
2243
2243
|
}, e[0] = t, e[1] = n), n;
|
|
2244
|
-
},
|
|
2245
|
-
left:
|
|
2246
|
-
center:
|
|
2247
|
-
right:
|
|
2248
|
-
},
|
|
2244
|
+
}, bt = "zv6sjd4", xt = "zv6sjd5", St = "zv6sjd6", Ct = k(() => import("./dist-BjFMATnH.js").then((e) => e.t).then((e) => ({ default: e.CollectionFormBuilder }))), wt = {
|
|
2245
|
+
left: bt,
|
|
2246
|
+
center: xt,
|
|
2247
|
+
right: St
|
|
2248
|
+
}, Tt = (e) => (e ?? "16:9").replace(":", " / "), Et = (e) => {
|
|
2249
2249
|
if (e.content.coverImage?.srcset) return Object.entries(e.content.coverImage.srcset).filter(([e]) => e !== "path").map(([e, t]) => `${t} ${e}`).join(", ");
|
|
2250
|
-
},
|
|
2251
|
-
let t =
|
|
2250
|
+
}, Z = (e) => {
|
|
2251
|
+
let t = x(42), { popup: n } = e, i = vt(), a = i?.popup ?? n, s = i?.callbacks?.onAction, l = yt(), u = !i, { content: f } = a, { workspace: p } = ee(), [m, h] = ie(!1), g;
|
|
2252
2252
|
t[0] !== f.action || t[1] !== s || t[2] !== a ? (g = () => {
|
|
2253
2253
|
if (f.action?.type !== "redirect" || !f.action.copyValue) return;
|
|
2254
2254
|
let e = f.action.copyValue;
|
|
@@ -2260,36 +2260,36 @@ var Qe = ae([R, L], (e, t) => ({
|
|
|
2260
2260
|
});
|
|
2261
2261
|
}, t[0] = f.action, t[1] = s, t[2] = a, t[3] = g) : g = t[3];
|
|
2262
2262
|
let _ = g, v = f.align ?? "left", y;
|
|
2263
|
-
t[4] === f.coverImageRatio ? y = t[5] : (y =
|
|
2264
|
-
let
|
|
2265
|
-
t[6] !==
|
|
2263
|
+
t[4] === f.coverImageRatio ? y = t[5] : (y = Tt(f.coverImageRatio), t[4] = f.coverImageRatio, t[5] = y);
|
|
2264
|
+
let b = y, S;
|
|
2265
|
+
t[6] !== b || t[7] !== f.coverImage || t[8] !== f.coverImageFocus || t[9] !== a ? (S = f.coverImage && /* @__PURE__ */ N("div", {
|
|
2266
2266
|
className: "_1gklkndj",
|
|
2267
|
-
style: { aspectRatio:
|
|
2267
|
+
style: { aspectRatio: b },
|
|
2268
2268
|
children: /* @__PURE__ */ N("img", {
|
|
2269
2269
|
src: f.coverImage.location,
|
|
2270
|
-
srcSet:
|
|
2270
|
+
srcSet: Et(a),
|
|
2271
2271
|
alt: "",
|
|
2272
2272
|
className: "_1gklkndk",
|
|
2273
2273
|
style: f.coverImageFocus ? { objectPosition: f.coverImageFocus.replace("-", " ") } : void 0
|
|
2274
2274
|
})
|
|
2275
|
-
}), t[6] =
|
|
2275
|
+
}), t[6] = b, t[7] = f.coverImage, t[8] = f.coverImageFocus, t[9] = a, t[10] = S) : S = t[10];
|
|
2276
2276
|
let C = f.size ?? "medium", w;
|
|
2277
|
-
t[11] === C ? w = t[12] : (w =
|
|
2277
|
+
t[11] === C ? w = t[12] : (w = ut({ size: C }), t[11] = C, t[12] = w);
|
|
2278
2278
|
let T;
|
|
2279
2279
|
t[13] !== v || t[14] !== f.description || t[15] !== f.heading ? (T = (f.heading || f.description) && /* @__PURE__ */ P(c, {
|
|
2280
2280
|
className: "zv6sjd0",
|
|
2281
2281
|
style: { textAlign: v },
|
|
2282
2282
|
children: [f.heading && /* @__PURE__ */ N(r, { children: f.heading }), f.description && /* @__PURE__ */ N(o, { children: f.description })]
|
|
2283
2283
|
}), t[13] = v, t[14] = f.description, t[15] = f.heading, t[16] = T) : T = t[16];
|
|
2284
|
-
let
|
|
2285
|
-
t[17] === f.body ?
|
|
2284
|
+
let E;
|
|
2285
|
+
t[17] === f.body ? E = t[18] : (E = (f.body?.html || f.body?.json) && /* @__PURE__ */ N(mt, {
|
|
2286
2286
|
className: "zv6sjd1",
|
|
2287
2287
|
content: f.body
|
|
2288
|
-
}), t[17] = f.body, t[18] =
|
|
2289
|
-
let
|
|
2290
|
-
t[19] !== v || t[20] !== f.action || t[21] !== u || t[22] !== s || t[23] !== a || t[24] !== p ? (
|
|
2288
|
+
}), t[17] = f.body, t[18] = E);
|
|
2289
|
+
let D;
|
|
2290
|
+
t[19] !== v || t[20] !== f.action || t[21] !== u || t[22] !== s || t[23] !== a || t[24] !== p ? (D = f.action?.type === "form" && /* @__PURE__ */ N("div", {
|
|
2291
2291
|
className: "zv6sjd3",
|
|
2292
|
-
children: /* @__PURE__ */ N(
|
|
2292
|
+
children: /* @__PURE__ */ N(te, { children: /* @__PURE__ */ N(Ct, {
|
|
2293
2293
|
collection_id: f.action.collectionKey,
|
|
2294
2294
|
uiConfig: {
|
|
2295
2295
|
hideFormHeading: !0,
|
|
@@ -2297,8 +2297,8 @@ var Qe = ae([R, L], (e, t) => ({
|
|
|
2297
2297
|
},
|
|
2298
2298
|
submitButtonConfig: {
|
|
2299
2299
|
show: !0,
|
|
2300
|
-
text: "Submit",
|
|
2301
|
-
styles:
|
|
2300
|
+
text: f.action.label || "Submit",
|
|
2301
|
+
styles: f.action.fullWidth ? "zv6sjd7" : wt[v]
|
|
2302
2302
|
},
|
|
2303
2303
|
workspace_id: p,
|
|
2304
2304
|
containerStyles: "zv6sjd2",
|
|
@@ -2310,28 +2310,28 @@ var Qe = ae([R, L], (e, t) => ({
|
|
|
2310
2310
|
});
|
|
2311
2311
|
}
|
|
2312
2312
|
}) })
|
|
2313
|
-
}), t[19] = v, t[20] = f.action, t[21] = u, t[22] = s, t[23] = a, t[24] = p, t[25] =
|
|
2314
|
-
let
|
|
2315
|
-
t[26] !== l || t[27] !== f.action || t[28] !== m || t[29] !== _ || t[30] !== s || t[31] !== a ? (
|
|
2313
|
+
}), t[19] = v, t[20] = f.action, t[21] = u, t[22] = s, t[23] = a, t[24] = p, t[25] = D) : D = t[25];
|
|
2314
|
+
let O;
|
|
2315
|
+
t[26] !== l || t[27] !== f.action || t[28] !== m || t[29] !== _ || t[30] !== s || t[31] !== a ? (O = f.action?.type === "redirect" && /* @__PURE__ */ P(se, { children: [f.action.copyValue && /* @__PURE__ */ P("button", {
|
|
2316
2316
|
type: "button",
|
|
2317
|
-
className: "
|
|
2317
|
+
className: "zv6sjd9",
|
|
2318
2318
|
onClick: _,
|
|
2319
2319
|
children: [
|
|
2320
2320
|
/* @__PURE__ */ N("span", {
|
|
2321
|
-
className: "
|
|
2321
|
+
className: "zv6sjda",
|
|
2322
2322
|
children: f.action.copyValue
|
|
2323
2323
|
}),
|
|
2324
|
-
N(m ?
|
|
2324
|
+
N(m ? ue : de, {
|
|
2325
2325
|
size: 18,
|
|
2326
|
-
className: "
|
|
2326
|
+
className: "zv6sjdb"
|
|
2327
2327
|
}),
|
|
2328
2328
|
/* @__PURE__ */ N("span", {
|
|
2329
|
-
className: "
|
|
2329
|
+
className: "zv6sjdc",
|
|
2330
2330
|
children: m ? "Copied!" : "Click to copy"
|
|
2331
2331
|
})
|
|
2332
2332
|
]
|
|
2333
2333
|
}), /* @__PURE__ */ N(d, {
|
|
2334
|
-
className: "
|
|
2334
|
+
className: "zv6sjd8",
|
|
2335
2335
|
onClick: () => {
|
|
2336
2336
|
f.action?.type === "redirect" && (s?.(a, {
|
|
2337
2337
|
action_type: "redirect",
|
|
@@ -2340,23 +2340,23 @@ var Qe = ae([R, L], (e, t) => ({
|
|
|
2340
2340
|
}), l(), f.action.openInNewTab ? window.open(f.action.url, "_blank", "noopener,noreferrer") : window.location.href = f.action.url);
|
|
2341
2341
|
},
|
|
2342
2342
|
children: f.action.label || "Button"
|
|
2343
|
-
})] }), t[26] = l, t[27] = f.action, t[28] = m, t[29] = _, t[30] = s, t[31] = a, t[32] =
|
|
2344
|
-
let
|
|
2345
|
-
t[33] !== w || t[34] !== T || t[35] !==
|
|
2343
|
+
})] }), t[26] = l, t[27] = f.action, t[28] = m, t[29] = _, t[30] = s, t[31] = a, t[32] = O) : O = t[32];
|
|
2344
|
+
let k;
|
|
2345
|
+
t[33] !== w || t[34] !== T || t[35] !== E || t[36] !== D || t[37] !== O ? (k = /* @__PURE__ */ P("div", {
|
|
2346
2346
|
className: w,
|
|
2347
2347
|
children: [
|
|
2348
2348
|
T,
|
|
2349
|
+
E,
|
|
2349
2350
|
D,
|
|
2350
|
-
O
|
|
2351
|
-
k
|
|
2351
|
+
O
|
|
2352
2352
|
]
|
|
2353
|
-
}), t[33] = w, t[34] = T, t[35] =
|
|
2354
|
-
let
|
|
2355
|
-
return t[39] !==
|
|
2356
|
-
className:
|
|
2357
|
-
children: [S,
|
|
2358
|
-
}), t[39] =
|
|
2359
|
-
},
|
|
2353
|
+
}), t[33] = w, t[34] = T, t[35] = E, t[36] = D, t[37] = O, t[38] = k) : k = t[38];
|
|
2354
|
+
let A;
|
|
2355
|
+
return t[39] !== k || t[40] !== S ? (A = /* @__PURE__ */ P("div", {
|
|
2356
|
+
className: ct,
|
|
2357
|
+
children: [S, k]
|
|
2358
|
+
}), t[39] = k, t[40] = S, t[41] = A) : A = t[41], A;
|
|
2359
|
+
}, Q = (e) => {
|
|
2360
2360
|
if (e == null) return;
|
|
2361
2361
|
if (typeof e == "string") return e;
|
|
2362
2362
|
if (typeof e != "object") return;
|
|
@@ -2364,22 +2364,22 @@ var Qe = ae([R, L], (e, t) => ({
|
|
|
2364
2364
|
if (typeof t.l != "number" || typeof t.c != "number" || typeof t.h != "number") return;
|
|
2365
2365
|
let n = (e) => Math.round(e * 1e4) / 1e4, r = n(t.l), i = n(t.c), a = n(t.h), o = typeof t.alpha == "number" ? n(t.alpha) : 1;
|
|
2366
2366
|
return o < 1 ? `oklch(${r} ${i} ${a} / ${o})` : `oklch(${r} ${i} ${a})`;
|
|
2367
|
-
},
|
|
2367
|
+
}, Dt = (e) => {
|
|
2368
2368
|
let t = e.colors;
|
|
2369
2369
|
return !t || typeof t != "object" ? !1 : Object.values(t).some((e) => e != null);
|
|
2370
|
-
},
|
|
2371
|
-
if (!e || !
|
|
2370
|
+
}, Ot = (e) => {
|
|
2371
|
+
if (!e || !Dt(e)) return null;
|
|
2372
2372
|
let t = e.colors, n = t?.brand ?? {}, r = e.fonts, i = e.sizes;
|
|
2373
2373
|
return {
|
|
2374
2374
|
colors: {
|
|
2375
2375
|
brand: {
|
|
2376
|
-
main:
|
|
2377
|
-
foreground:
|
|
2376
|
+
main: Q(n.main) ?? "",
|
|
2377
|
+
foreground: Q(n.foreground) ?? ""
|
|
2378
2378
|
},
|
|
2379
|
-
text1:
|
|
2380
|
-
text2:
|
|
2381
|
-
page:
|
|
2382
|
-
border:
|
|
2379
|
+
text1: Q(t.text1) ?? "",
|
|
2380
|
+
text2: Q(t.text2) ?? "",
|
|
2381
|
+
page: Q(t.page) ?? "",
|
|
2382
|
+
border: Q(t.border) ?? ""
|
|
2383
2383
|
},
|
|
2384
2384
|
fonts: {
|
|
2385
2385
|
heading: r?.heading ?? "inherit",
|
|
@@ -2387,7 +2387,7 @@ var Qe = ae([R, L], (e, t) => ({
|
|
|
2387
2387
|
},
|
|
2388
2388
|
sizes: { radius: i?.radius ?? "4px" }
|
|
2389
2389
|
};
|
|
2390
|
-
},
|
|
2390
|
+
}, kt = (e) => {
|
|
2391
2391
|
if (e) return {
|
|
2392
2392
|
colors: {
|
|
2393
2393
|
primary: e.colors?.brand?.main,
|
|
@@ -2408,82 +2408,83 @@ var Qe = ae([R, L], (e, t) => ({
|
|
|
2408
2408
|
fonts: e.fonts,
|
|
2409
2409
|
radius: e.sizes?.radius
|
|
2410
2410
|
};
|
|
2411
|
-
},
|
|
2412
|
-
let t =
|
|
2411
|
+
}, At = (e) => Ve(kt(e)), jt = (e) => {
|
|
2412
|
+
let t = x(21), n, r, i, a, o;
|
|
2413
2413
|
t[0] === e ? (n = t[1], r = t[2], i = t[3], a = t[4], o = t[5]) : ({children: n, popupTheme: r, siteTheme: a, style: o, ...i} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = a, t[5] = o);
|
|
2414
2414
|
let s;
|
|
2415
|
-
t[6] !== r || t[7] !== a ? (s = r ?? (a ?
|
|
2415
|
+
t[6] !== r || t[7] !== a ? (s = r ?? (a ? Ot(a) : null), t[6] = r, t[7] = a, t[8] = s) : s = t[8];
|
|
2416
2416
|
let c = s, l;
|
|
2417
|
-
t[9] === Symbol.for("react.memo_cache_sentinel") ? (l =
|
|
2418
|
-
let d;
|
|
2419
|
-
t[10] === Symbol.for("react.memo_cache_sentinel") ? (d = m({ baseSpacing: ".625rem" }), t[10] = d) : d = t[10];
|
|
2420
|
-
let p;
|
|
2421
|
-
t[11] === c ? p = t[12] : (p = Ot(c), t[11] = c, t[12] = p);
|
|
2417
|
+
t[9] === Symbol.for("react.memo_cache_sentinel") ? (l = ce(y, f), t[9] = l) : l = t[9];
|
|
2418
|
+
let d, p;
|
|
2419
|
+
t[10] === Symbol.for("react.memo_cache_sentinel") ? (d = m({ baseSpacing: ".625rem" }), p = _({ form: { gap: "1rem" } }), t[10] = d, t[11] = p) : (d = t[10], p = t[11]);
|
|
2422
2420
|
let h;
|
|
2423
|
-
t[
|
|
2421
|
+
t[12] === c ? h = t[13] : (h = At(c), t[12] = c, t[13] = h);
|
|
2422
|
+
let g;
|
|
2423
|
+
t[14] !== o || t[15] !== h ? (g = {
|
|
2424
2424
|
...d,
|
|
2425
2425
|
...p,
|
|
2426
|
+
...h,
|
|
2426
2427
|
...o
|
|
2427
|
-
}, t[
|
|
2428
|
-
let
|
|
2429
|
-
return t[
|
|
2428
|
+
}, t[14] = o, t[15] = h, t[16] = g) : g = t[16];
|
|
2429
|
+
let v;
|
|
2430
|
+
return t[17] !== n || t[18] !== i || t[19] !== g ? (v = /* @__PURE__ */ N(u, {
|
|
2430
2431
|
className: l,
|
|
2431
2432
|
cssReset: !0,
|
|
2432
|
-
style:
|
|
2433
|
+
style: g,
|
|
2433
2434
|
...i,
|
|
2434
2435
|
children: n
|
|
2435
|
-
}), t[
|
|
2436
|
-
},
|
|
2437
|
-
let e =
|
|
2436
|
+
}), t[17] = n, t[18] = i, t[19] = g, t[20] = v) : v = t[20], v;
|
|
2437
|
+
}, $ = (e) => e.content.position || "top-right", Mt = () => {
|
|
2438
|
+
let e = x(32), { popup: r, callbacks: o } = _t(), { placement: c, id: u } = r, d = ze(et).active_popup_id === u, f = re(!1), p, m;
|
|
2438
2439
|
e[0] !== o || e[1] !== d || e[2] !== r ? (p = () => {
|
|
2439
|
-
d && !f.current && (f.current = !0, o?.onPopupOpen?.(r, { trigger_type:
|
|
2440
|
+
d && !f.current && (f.current = !0, o?.onPopupOpen?.(r, { trigger_type: rt() })), d || (f.current = !1);
|
|
2440
2441
|
}, m = [
|
|
2441
2442
|
d,
|
|
2442
2443
|
r,
|
|
2443
2444
|
o
|
|
2444
2445
|
], e[0] = o, e[1] = d, e[2] = r, e[3] = p, e[4] = m) : (p = e[3], m = e[4]), j(p, m);
|
|
2445
|
-
let h =
|
|
2446
|
+
let h = yt(), g, _, v, y, b, S, C, w;
|
|
2446
2447
|
if (e[5] !== h || e[6] !== d || e[7] !== c || e[8] !== r) {
|
|
2447
|
-
let o =
|
|
2448
|
-
_ = a,
|
|
2449
|
-
className:
|
|
2448
|
+
let o = $(r), u = c === "popup", f = c === "slide_in";
|
|
2449
|
+
_ = a, b = d, e[17] === h ? S = e[18] : (S = (e) => !e && h(), e[17] = h, e[18] = S), C = u, w = !u, g = n, e[19] === u ? v = e[20] : (v = u && /* @__PURE__ */ N(i, {}), e[19] = u, e[20] = v), y = u ? /* @__PURE__ */ N(l, {
|
|
2450
|
+
className: Y,
|
|
2450
2451
|
children: /* @__PURE__ */ P(s.Popup, {
|
|
2451
|
-
className:
|
|
2452
|
+
className: J({ placement: c }),
|
|
2452
2453
|
children: [/* @__PURE__ */ N(t, {
|
|
2453
2454
|
variant: "ghost",
|
|
2454
2455
|
size: "icon-xs",
|
|
2455
|
-
className:
|
|
2456
|
+
className: X,
|
|
2456
2457
|
"aria-label": "Close popup",
|
|
2457
|
-
children: /* @__PURE__ */ N(
|
|
2458
|
-
}), /* @__PURE__ */ N(
|
|
2458
|
+
children: /* @__PURE__ */ N(fe, { size: 16 })
|
|
2459
|
+
}), /* @__PURE__ */ N(Z, {})]
|
|
2459
2460
|
})
|
|
2460
2461
|
}) : /* @__PURE__ */ P(s.Popup, {
|
|
2461
|
-
className:
|
|
2462
|
+
className: ce(J({
|
|
2462
2463
|
placement: c,
|
|
2463
2464
|
position: o
|
|
2464
2465
|
}), f && "_1gklkndd"),
|
|
2465
2466
|
children: [/* @__PURE__ */ N(t, {
|
|
2466
2467
|
variant: "ghost",
|
|
2467
2468
|
size: "icon-xs",
|
|
2468
|
-
className:
|
|
2469
|
+
className: X,
|
|
2469
2470
|
"aria-label": "Close popup",
|
|
2470
|
-
children: /* @__PURE__ */ N(
|
|
2471
|
-
}), /* @__PURE__ */ N(
|
|
2472
|
-
}), e[5] = h, e[6] = d, e[7] = c, e[8] = r, e[9] = g, e[10] = _, e[11] = v, e[12] = y, e[13] =
|
|
2473
|
-
} else g = e[9], _ = e[10], v = e[11], y = e[12],
|
|
2471
|
+
children: /* @__PURE__ */ N(fe, { size: 16 })
|
|
2472
|
+
}), /* @__PURE__ */ N(Z, {})]
|
|
2473
|
+
}), e[5] = h, e[6] = d, e[7] = c, e[8] = r, e[9] = g, e[10] = _, e[11] = v, e[12] = y, e[13] = b, e[14] = S, e[15] = C, e[16] = w;
|
|
2474
|
+
} else g = e[9], _ = e[10], v = e[11], y = e[12], b = e[13], S = e[14], C = e[15], w = e[16];
|
|
2474
2475
|
let T;
|
|
2475
2476
|
e[21] !== g || e[22] !== v || e[23] !== y ? (T = /* @__PURE__ */ P(g, { children: [v, y] }), e[21] = g, e[22] = v, e[23] = y, e[24] = T) : T = e[24];
|
|
2476
2477
|
let E;
|
|
2477
|
-
return e[25] !== _ || e[26] !==
|
|
2478
|
-
open:
|
|
2478
|
+
return e[25] !== _ || e[26] !== b || e[27] !== S || e[28] !== C || e[29] !== w || e[30] !== T ? (E = /* @__PURE__ */ N(_, {
|
|
2479
|
+
open: b,
|
|
2479
2480
|
onOpenChange: S,
|
|
2480
2481
|
modal: C,
|
|
2481
2482
|
disablePointerDismissal: w,
|
|
2482
2483
|
children: T
|
|
2483
|
-
}), e[25] = _, e[26] =
|
|
2484
|
-
},
|
|
2484
|
+
}), e[25] = _, e[26] = b, e[27] = S, e[28] = C, e[29] = w, e[30] = T, e[31] = E) : E = e[31], E;
|
|
2485
|
+
}, Nt = 3e4, Pt = 5e3, Ft = 5e3, It = 100, Lt = .5, Rt = 5, zt = (e) => {
|
|
2485
2486
|
if (typeof document > "u") return () => {};
|
|
2486
|
-
let t = !1, n = Date.now(), r = [], i = 0, a = null, o = () => Date.now() - n >=
|
|
2487
|
+
let t = !1, n = Date.now(), r = [], i = 0, a = null, o = () => Date.now() - n >= Nt, s = () => {
|
|
2487
2488
|
t || (t = !0, c(), e());
|
|
2488
2489
|
}, c = () => {
|
|
2489
2490
|
a &&= (clearTimeout(a), null);
|
|
@@ -2495,51 +2496,51 @@ var Qe = ae([R, L], (e, t) => ({
|
|
|
2495
2496
|
r.push({
|
|
2496
2497
|
y: e.clientY,
|
|
2497
2498
|
t: Date.now()
|
|
2498
|
-
}), r.length >
|
|
2499
|
+
}), r.length > Rt && r.shift();
|
|
2499
2500
|
}, f = (e) => {
|
|
2500
|
-
t || !o() || e.clientY > 0 || u() <
|
|
2501
|
+
t || !o() || e.clientY > 0 || u() < It || Date.now() - i < Ft || l() < Lt || (c(), a = setTimeout(s, Pt));
|
|
2501
2502
|
}, p = () => {
|
|
2502
2503
|
c();
|
|
2503
2504
|
}, m = () => {
|
|
2504
2505
|
i = Date.now();
|
|
2505
|
-
}, h =
|
|
2506
|
+
}, h = w.listen((e) => {
|
|
2506
2507
|
o() && (e === "hidden" || e === "frozen") && s();
|
|
2507
2508
|
});
|
|
2508
2509
|
return document.addEventListener("mousemove", d, { passive: !0 }), document.addEventListener("mouseleave", f), document.addEventListener("mouseenter", p), window.addEventListener("scroll", m, { passive: !0 }), () => {
|
|
2509
2510
|
c(), document.removeEventListener("mousemove", d), document.removeEventListener("mouseleave", f), document.removeEventListener("mouseenter", p), window.removeEventListener("scroll", m), h();
|
|
2510
2511
|
};
|
|
2511
|
-
},
|
|
2512
|
+
}, Bt = (e, t) => {
|
|
2512
2513
|
if (!e) return null;
|
|
2513
|
-
let n = setTimeout(() =>
|
|
2514
|
+
let n = setTimeout(() => K(t, { trigger_type: "time_on_page" }), e);
|
|
2514
2515
|
return () => clearTimeout(n);
|
|
2515
|
-
},
|
|
2516
|
+
}, Vt = (e, t) => {
|
|
2516
2517
|
if (e === void 0) return null;
|
|
2517
2518
|
let n = !1;
|
|
2518
|
-
return
|
|
2519
|
-
n || r.depth >= e && (n = !0,
|
|
2519
|
+
return T.listen((r) => {
|
|
2520
|
+
n || r.depth >= e && (n = !0, K(t, { trigger_type: "scroll_depth" }));
|
|
2520
2521
|
});
|
|
2521
|
-
},
|
|
2522
|
+
}, Ht = (e) => {
|
|
2522
2523
|
let t = !1;
|
|
2523
|
-
return
|
|
2524
|
-
t || n.status === "idle" && (t = !0,
|
|
2524
|
+
return S.listen((n) => {
|
|
2525
|
+
t || n.status === "idle" && (t = !0, K(e, { trigger_type: "inactivity" }));
|
|
2525
2526
|
});
|
|
2526
|
-
},
|
|
2527
|
-
let n =
|
|
2527
|
+
}, Ut = (e, t) => {
|
|
2528
|
+
let n = x(11), r = t === void 0 ? !0 : t, { triggers: i, id: a } = e, o = ze(C), s;
|
|
2528
2529
|
n[0] === Symbol.for("react.memo_cache_sentinel") ? (s = [], n[0] = s) : s = n[0];
|
|
2529
|
-
let c =
|
|
2530
|
+
let c = re(s), l;
|
|
2530
2531
|
n[1] !== r || n[2] !== o || n[3] !== e || n[4] !== i ? (l = () => {
|
|
2531
2532
|
if (!r || !o || !i) return;
|
|
2532
2533
|
let t = [];
|
|
2533
2534
|
if (i.time_on_page.enabled) {
|
|
2534
|
-
let n =
|
|
2535
|
+
let n = Bt(i.time_on_page.delay_ms, e);
|
|
2535
2536
|
n && t.push(n);
|
|
2536
2537
|
}
|
|
2537
2538
|
if (i.scroll_depth.enabled) {
|
|
2538
|
-
let n =
|
|
2539
|
+
let n = Vt(i.scroll_depth.percent, e);
|
|
2539
2540
|
n && t.push(n);
|
|
2540
2541
|
}
|
|
2541
|
-
return i.exit_intent.enabled && t.push(
|
|
2542
|
-
t.forEach(
|
|
2542
|
+
return i.exit_intent.enabled && t.push(zt(() => K(e, { trigger_type: "exit_intent" }))), i.inactivity.enabled && t.push(Ht(e)), c.current = t, () => {
|
|
2543
|
+
t.forEach(Wt), c.current = [];
|
|
2543
2544
|
};
|
|
2544
2545
|
}, n[1] = r, n[2] = o, n[3] = e, n[4] = i, n[5] = l) : l = n[5];
|
|
2545
2546
|
let u;
|
|
@@ -2550,10 +2551,10 @@ var Qe = ae([R, L], (e, t) => ({
|
|
|
2550
2551
|
i
|
|
2551
2552
|
], n[6] = r, n[7] = o, n[8] = a, n[9] = i, n[10] = u) : u = n[10], j(l, u);
|
|
2552
2553
|
};
|
|
2553
|
-
function
|
|
2554
|
+
function Wt(e) {
|
|
2554
2555
|
return e();
|
|
2555
2556
|
}
|
|
2556
|
-
var
|
|
2557
|
+
var Gt = (e, t) => {
|
|
2557
2558
|
switch (e.match_type) {
|
|
2558
2559
|
case "is_all_pages": return !0;
|
|
2559
2560
|
case "is": return e.page_id ? t.pageId === e.page_id ? e.value == null || e.value === t.path : !1 : e.value != null && e.value === t.path;
|
|
@@ -2561,7 +2562,7 @@ var Wt = (e, t) => {
|
|
|
2561
2562
|
case "begins_with": return e.value != null && t.path.startsWith(e.value);
|
|
2562
2563
|
default: return !1;
|
|
2563
2564
|
}
|
|
2564
|
-
},
|
|
2565
|
+
}, Kt = (e, t) => {
|
|
2565
2566
|
switch (e.match_type) {
|
|
2566
2567
|
case "exact": return t === e.value;
|
|
2567
2568
|
case "contains": return t.includes(e.value);
|
|
@@ -2573,17 +2574,17 @@ var Wt = (e, t) => {
|
|
|
2573
2574
|
}
|
|
2574
2575
|
default: return !1;
|
|
2575
2576
|
}
|
|
2576
|
-
},
|
|
2577
|
+
}, qt = (e, t, n) => {
|
|
2577
2578
|
let r = e.pages?.exclude ?? [];
|
|
2578
|
-
if (r.length > 0 && r.some((e) =>
|
|
2579
|
+
if (r.length > 0 && r.some((e) => Gt(e, t))) return !1;
|
|
2579
2580
|
let i = e.pages?.include ?? [];
|
|
2580
|
-
if (i.length > 0 && !i.some((e) =>
|
|
2581
|
+
if (i.length > 0 && !i.some((e) => Gt(e, t))) return !1;
|
|
2581
2582
|
let a = e.referrer?.include ?? [];
|
|
2582
|
-
if (a.length > 0 && (!n || !a.some((e) =>
|
|
2583
|
+
if (a.length > 0 && (!n || !a.some((e) => Kt(e, n)))) return !1;
|
|
2583
2584
|
let o = e.referrer?.exclude ?? [];
|
|
2584
|
-
return !(o.length > 0 && n && o.some((e) =>
|
|
2585
|
-
},
|
|
2586
|
-
let t =
|
|
2585
|
+
return !(o.length > 0 && n && o.some((e) => Kt(e, n)));
|
|
2586
|
+
}, Jt = (e) => {
|
|
2587
|
+
let t = x(4), { pageId: n } = e, { popup: r } = _t(), i;
|
|
2587
2588
|
bb0: {
|
|
2588
2589
|
if (!r.target) {
|
|
2589
2590
|
i = !0;
|
|
@@ -2595,8 +2596,8 @@ var Wt = (e, t) => {
|
|
|
2595
2596
|
}
|
|
2596
2597
|
let e;
|
|
2597
2598
|
if (t[0] !== n || t[1] !== r.target) {
|
|
2598
|
-
let i =
|
|
2599
|
-
e =
|
|
2599
|
+
let i = E.get().identity?.referrer?.raw || document.referrer || null, a = new URL(window.location.href, window.location.origin);
|
|
2600
|
+
e = qt(r.target, {
|
|
2600
2601
|
pageId: n,
|
|
2601
2602
|
path: a.pathname
|
|
2602
2603
|
}, i), t[0] = n, t[1] = r.target, t[2] = e;
|
|
@@ -2604,19 +2605,19 @@ var Wt = (e, t) => {
|
|
|
2604
2605
|
i = e;
|
|
2605
2606
|
}
|
|
2606
2607
|
let a = i;
|
|
2607
|
-
if (
|
|
2608
|
+
if (Ut(r, a), !a) return null;
|
|
2608
2609
|
let o;
|
|
2609
|
-
return t[3] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ N(
|
|
2610
|
-
},
|
|
2611
|
-
let t =
|
|
2610
|
+
return t[3] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ N(Mt, {}), t[3] = o) : o = t[3], o;
|
|
2611
|
+
}, Yt = (e) => {
|
|
2612
|
+
let t = x(16), { popups: n, pageId: r } = e, i = D(), a, o;
|
|
2612
2613
|
t[0] === n ? (a = t[1], o = t[2]) : (a = () => {
|
|
2613
|
-
|
|
2614
|
+
z(n), V(!1);
|
|
2614
2615
|
}, o = [n], t[0] = n, t[1] = a, t[2] = o), j(a, o);
|
|
2615
2616
|
let s;
|
|
2616
2617
|
t[3] === i ? s = t[4] : (s = (e, t) => {
|
|
2617
2618
|
!i || typeof i.track != "function" || i?.track(e, t);
|
|
2618
2619
|
}, t[3] = i, t[4] = s);
|
|
2619
|
-
let c = s, l =
|
|
2620
|
+
let c = s, l = Xt, u;
|
|
2620
2621
|
t[5] === c ? u = t[6] : (u = {
|
|
2621
2622
|
onPopupOpen: (e, t) => {
|
|
2622
2623
|
c("popup.view", {
|
|
@@ -2642,20 +2643,20 @@ var Wt = (e, t) => {
|
|
|
2642
2643
|
let d = u, f;
|
|
2643
2644
|
if (t[7] !== d || t[8] !== r || t[9] !== n) {
|
|
2644
2645
|
let e;
|
|
2645
|
-
t[11] !== d || t[12] !== r ? (e = (e) => /* @__PURE__ */ N(
|
|
2646
|
+
t[11] !== d || t[12] !== r ? (e = (e) => /* @__PURE__ */ N(jt, {
|
|
2646
2647
|
popupTheme: e.theme,
|
|
2647
2648
|
siteTheme: e.site?.theme,
|
|
2648
|
-
children: /* @__PURE__ */ N(
|
|
2649
|
+
children: /* @__PURE__ */ N(gt, {
|
|
2649
2650
|
popup: e,
|
|
2650
2651
|
callbacks: d,
|
|
2651
|
-
children: /* @__PURE__ */ N(
|
|
2652
|
+
children: /* @__PURE__ */ N(Jt, { pageId: r })
|
|
2652
2653
|
})
|
|
2653
2654
|
}, e.id), t[11] = d, t[12] = r, t[13] = e) : e = t[13], f = n.map(e), t[7] = d, t[8] = r, t[9] = n, t[10] = f;
|
|
2654
2655
|
} else f = t[10];
|
|
2655
2656
|
let p;
|
|
2656
|
-
return t[14] === f ? p = t[15] : (p = /* @__PURE__ */ N(
|
|
2657
|
+
return t[14] === f ? p = t[15] : (p = /* @__PURE__ */ N(se, { children: f }), t[14] = f, t[15] = p), p;
|
|
2657
2658
|
};
|
|
2658
|
-
function
|
|
2659
|
+
function Xt(e) {
|
|
2659
2660
|
return {
|
|
2660
2661
|
resource: "builder.popup",
|
|
2661
2662
|
identifier: e.id,
|
|
@@ -2663,6 +2664,6 @@ function Yt(e) {
|
|
|
2663
2664
|
placement: e.placement
|
|
2664
2665
|
};
|
|
2665
2666
|
}
|
|
2666
|
-
var
|
|
2667
|
+
var Zt = /* @__PURE__ */ Ye({ PopupRenderer: () => Yt });
|
|
2667
2668
|
//#endregion
|
|
2668
|
-
export {
|
|
2669
|
+
export { Ge as _, qe as a, z as c, Z as d, Y as f, Ke as g, jt as h, G as i, X as l, dt as m, B as n, L as o, $ as p, J as r, V as s, R as t, q as u, Ve as v };
|