@levo-so/studio 0.3.8 → 0.3.9

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.
@@ -4,54 +4,54 @@ import { n as o, t as s } from "./themeMapping-Bi9Rcr5G-C7UXWE6o.js";
4
4
  import { t as c } from "./theme.cssm-Czj9sF4X.js";
5
5
  import { a as l, c as u, l as d, o as f, s as p, u as m } from "./Dialog-CPE8yUqK.js";
6
6
  import { t as h } from "./rteTheme.cssm-W4gTOijw.js";
7
- import { _ as g, c as _, d as v, f as y, g as b, h as x, m as S, n as C, o as w, p as T, s as E, t as D, u as O } from "./usePopupRedirect-BThP_YPW-jXtfhYu6.js";
8
- import { c as k } from "react/compiler-runtime";
9
- import { $activity as A, $isIdentityContextReady as j, $pageLifecycle as M, $scrollBehavior as N, $session as ee, getTabCount as te } from "@levo-so/insights/stores";
10
- import { useLevoInsights as ne } from "@levo-so/react";
11
- import { Suspense as re, lazy as ie, useEffect as P, useRef as F } from "react";
12
- import { Fragment as I, jsx as L, jsxs as R } from "react/jsx-runtime";
13
- import { useStore as z } from "@nanostores/react";
14
- import B from "clsx";
15
- import { IconX as V } from "@tabler/icons-react";
7
+ import { a as g, d as _, f as v, g as y, h as b, l as x, m as S, n as C, o as w, p as T, s as ee, t as te, u as E } from "./usePopupRedirect-CAAdcpaW-DdME0F7f.js";
8
+ import { c as D } from "react/compiler-runtime";
9
+ import { $activity as O, $isIdentityContextReady as k, $pageLifecycle as A, $scrollBehavior as j, $session as M, getTabCount as ne } from "@levo-so/insights/stores";
10
+ import { useLevo as re, useLevoInsights as N } from "@levo-so/react";
11
+ import { Suspense as P, lazy as F, useEffect as I, useRef as L } from "react";
12
+ import { Fragment as ie, jsx as R, jsxs as z } from "react/jsx-runtime";
13
+ import { useStore as B } from "@nanostores/react";
14
+ import V from "clsx";
15
+ import { IconX as H } from "@tabler/icons-react";
16
16
  //#region ../../libraries/levocn/dist/theme/utils/googleFonts.js
17
- var H = "wght@300;400;500;600;700;900", U = (e) => !!e && e !== "inherit" && !e.includes(",") && !e.includes("var("), W = (...e) => {
18
- let t = Array.from(new Set(e.filter((e) => typeof e == "string").map((e) => e.trim()).filter(U)));
19
- return t.length === 0 ? null : `https://fonts.googleapis.com/css2?${t.map((e) => `family=${e.replace(/ /g, "+")}:${H}`).join("&")}&display=swap`;
20
- }, G = (e) => {
17
+ var U = "wght@300;400;500;600;700;900", W = (e) => !!e && e !== "inherit" && !e.includes(",") && !e.includes("var("), G = (...e) => {
18
+ let t = Array.from(new Set(e.filter((e) => typeof e == "string").map((e) => e.trim()).filter(W)));
19
+ return t.length === 0 ? null : `https://fonts.googleapis.com/css2?${t.map((e) => `family=${e.replace(/ /g, "+")}:${U}`).join("&")}&display=swap`;
20
+ }, K = (e) => {
21
21
  if (document.querySelector(`link[rel="preconnect"][href="${e}"]`)) return;
22
22
  let t = document.createElement("link");
23
23
  t.rel = "preconnect", t.href = e, t.crossOrigin = "anonymous", document.head.appendChild(t);
24
- }, K = (e) => {
24
+ }, q = (e) => {
25
25
  let t = `family=${e.replace(/ /g, "+")}:`;
26
26
  return Array.from(document.querySelectorAll("link[rel=\"stylesheet\"][href*=\"fonts.googleapis.com\"]")).some((e) => e.href.includes(t));
27
- }, q = (...e) => {
28
- let t = k(5), n = e, r;
29
- t[0] === n ? r = t[1] : (r = n.filter(J).map(Y).join("|"), t[0] = n, t[1] = r);
27
+ }, J = (...e) => {
28
+ let t = D(5), n = e, r;
29
+ t[0] === n ? r = t[1] : (r = n.filter(Y).map(ae).join("|"), t[0] = n, t[1] = r);
30
30
  let i = r, a, o;
31
31
  t[2] === i ? (a = t[3], o = t[4]) : (a = () => {
32
- let e = W(...(i ? i.split("|") : []).filter(ae));
32
+ let e = G(...(i ? i.split("|") : []).filter(X));
33
33
  if (!e) return;
34
- G("https://fonts.googleapis.com"), G("https://fonts.gstatic.com");
34
+ K("https://fonts.googleapis.com"), K("https://fonts.gstatic.com");
35
35
  let t = document.createElement("link");
36
36
  t.rel = "stylesheet", t.href = e, t.crossOrigin = "anonymous", t.setAttribute("data-levo-fonts", e), document.head.appendChild(t);
37
- }, o = [i], t[2] = i, t[3] = a, t[4] = o), P(a, o);
37
+ }, o = [i], t[2] = i, t[3] = a, t[4] = o), I(a, o);
38
38
  };
39
- function J(e) {
39
+ function Y(e) {
40
40
  return typeof e == "string" && e.trim() !== "";
41
41
  }
42
- function Y(e) {
42
+ function ae(e) {
43
43
  return e.trim();
44
44
  }
45
- function ae(e) {
46
- return !K(e);
45
+ function X(e) {
46
+ return !q(e);
47
47
  }
48
48
  //#endregion
49
- //#region ../../libraries/popups/dist/PopupDialog-ofRpHB1v.js
49
+ //#region ../../libraries/popups/dist/PopupDialog-DeOpYgDM.js
50
50
  var oe = (e) => (e ?? "16:9").replace(":", " / "), se = (e) => {
51
51
  if (e.content.coverImage?.srcset) return Object.entries(e.content.coverImage.srcset).filter(([e]) => e !== "path").map(([e, t]) => `${t} ${e}`).join(", ");
52
52
  }, ce = (e) => {
53
- let t = k(18), { popup: n, disableInteraction: r, children: i } = e, { content: a } = n, o = b(n), s = !!o && !r, c;
54
- t[0] !== a.coverImage || t[1] !== a.coverImageFocus || t[2] !== n ? (c = a.coverImage && /* @__PURE__ */ L("img", {
53
+ let t = D(18), { popup: n, disableInteraction: r, children: i } = e, { content: a } = n, o = b(n), s = !!o && !r, c;
54
+ t[0] !== a.coverImage || t[1] !== a.coverImageFocus || t[2] !== n ? (c = a.coverImage && /* @__PURE__ */ R("img", {
55
55
  src: a.coverImage.location,
56
56
  srcSet: se(n),
57
57
  alt: "",
@@ -63,32 +63,32 @@ var oe = (e) => (e ?? "16:9").replace(":", " / "), se = (e) => {
63
63
  let d;
64
64
  t[6] === u ? d = t[7] : (d = { aspectRatio: u }, t[6] = u, t[7] = d);
65
65
  let f = d, p;
66
- t[8] !== a.action || t[9] !== a.coverImage || t[10] !== s || t[11] !== l || t[12] !== f || t[13] !== o ? (p = a.coverImage && (s ? /* @__PURE__ */ L("button", {
66
+ t[8] !== a.action || t[9] !== a.coverImage || t[10] !== s || t[11] !== l || t[12] !== f || t[13] !== o ? (p = a.coverImage && (s ? /* @__PURE__ */ R("button", {
67
67
  type: "button",
68
- className: B("_1gklkndj", "_1gklkndk"),
68
+ className: V("_1gklkndj", "_1gklkndk"),
69
69
  style: f,
70
70
  onClick: o ?? void 0,
71
71
  "aria-label": a.action?.type === "redirect" ? a.action.label : void 0,
72
72
  children: l
73
- }) : /* @__PURE__ */ L("div", {
73
+ }) : /* @__PURE__ */ R("div", {
74
74
  className: "_1gklkndj",
75
75
  style: f,
76
76
  children: l
77
77
  })), t[8] = a.action, t[9] = a.coverImage, t[10] = s, t[11] = l, t[12] = f, t[13] = o, t[14] = p) : p = t[14];
78
78
  let m;
79
- return t[15] !== i || t[16] !== p ? (m = /* @__PURE__ */ R("div", {
80
- className: y,
79
+ return t[15] !== i || t[16] !== p ? (m = /* @__PURE__ */ z("div", {
80
+ className: _,
81
81
  children: [p, i]
82
82
  }), t[15] = i, t[16] = p, t[17] = m) : m = t[17], m;
83
83
  }, le = (e) => {
84
- let t = k(19), n, r, i, l, u;
84
+ let t = D(19), n, r, i, l, u;
85
85
  t[0] === e ? (n = t[1], r = t[2], i = t[3], l = t[4], u = t[5]) : ({children: n, popupTheme: r, siteTheme: l, style: u, ...i} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = l, t[5] = u);
86
86
  let d;
87
87
  t[6] !== r || t[7] !== l ? (d = r ?? (l ? o(l) : null), t[6] = r, t[7] = l, t[8] = d) : d = t[8];
88
88
  let f = d;
89
- q(f?.fonts?.heading, f?.fonts?.body);
89
+ J(f?.fonts?.heading, f?.fonts?.body);
90
90
  let p;
91
- t[9] === Symbol.for("react.memo_cache_sentinel") ? (p = B(c, h), t[9] = p) : p = t[9];
91
+ t[9] === Symbol.for("react.memo_cache_sentinel") ? (p = V(c, h), t[9] = p) : p = t[9];
92
92
  let m;
93
93
  t[10] === f ? m = t[11] : (m = s(f), t[10] = f, t[11] = m);
94
94
  let g;
@@ -97,20 +97,20 @@ var oe = (e) => (e ?? "16:9").replace(":", " / "), se = (e) => {
97
97
  ...u
98
98
  }, t[12] = u, t[13] = m, t[14] = g) : g = t[14];
99
99
  let _;
100
- return t[15] !== n || t[16] !== i || t[17] !== g ? (_ = /* @__PURE__ */ L(a, {
100
+ return t[15] !== n || t[16] !== i || t[17] !== g ? (_ = /* @__PURE__ */ R(a, {
101
101
  className: p,
102
102
  cssReset: !0,
103
103
  style: g,
104
104
  ...i,
105
105
  children: n
106
106
  }), t[15] = n, t[16] = i, t[17] = g, t[18] = _) : _ = t[18], _;
107
- }, X = ie(() => import("./PopupBody-DZVwDLkg-PiECxgmc.js").then((e) => e.n).then((e) => ({ default: e.PopupBody }))), ue = (e) => {
108
- let t = k(7), { size: n } = e, r = n ?? "medium", i;
109
- t[0] === r ? i = t[1] : (i = v({ size: r }), t[0] = r, t[1] = i);
107
+ }, ue = F(() => import("./PopupBody-BI-MJqmd-BrzdFaaE.js").then((e) => e.n).then((e) => ({ default: e.PopupBody }))), de = (e) => {
108
+ let t = D(7), { size: n } = e, r = n ?? "medium", i;
109
+ t[0] === r ? i = t[1] : (i = E({ size: r }), t[0] = r, t[1] = i);
110
110
  let a, o, s;
111
- t[2] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ L("div", { className: S }), o = /* @__PURE__ */ L("div", { className: w }), s = /* @__PURE__ */ L("div", { className: C }), t[2] = a, t[3] = o, t[4] = s) : (a = t[2], o = t[3], s = t[4]);
111
+ t[2] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ R("div", { className: T }), o = /* @__PURE__ */ R("div", { className: g }), s = /* @__PURE__ */ R("div", { className: C }), t[2] = a, t[3] = o, t[4] = s) : (a = t[2], o = t[3], s = t[4]);
112
112
  let c;
113
- return t[5] === i ? c = t[6] : (c = /* @__PURE__ */ R("div", {
113
+ return t[5] === i ? c = t[6] : (c = /* @__PURE__ */ z("div", {
114
114
  className: i,
115
115
  children: [
116
116
  a,
@@ -119,78 +119,78 @@ var oe = (e) => (e ?? "16:9").replace(":", " / "), se = (e) => {
119
119
  ]
120
120
  }), t[5] = i, t[6] = c), c;
121
121
  }, Z = () => {
122
- let e = k(10), { popup: t } = x(), n;
123
- e[0] === t.content.size ? n = e[1] : (n = /* @__PURE__ */ L(ue, { size: t.content.size }), e[0] = t.content.size, e[1] = n);
122
+ let e = D(8), { popup: t } = S(), n;
123
+ e[0] === t.content.size ? n = e[1] : (n = /* @__PURE__ */ R(de, { size: t.content.size }), e[0] = t.content.size, e[1] = n);
124
124
  let r;
125
- e[2] === t ? r = e[3] : (r = /* @__PURE__ */ L(X, { popup: t }), e[2] = t, e[3] = r);
125
+ e[2] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ R(ue, {}), e[2] = r) : r = e[2];
126
126
  let i;
127
- e[4] !== n || e[5] !== r ? (i = /* @__PURE__ */ L(re, {
127
+ e[3] === n ? i = e[4] : (i = /* @__PURE__ */ R(P, {
128
128
  fallback: n,
129
129
  children: r
130
- }), e[4] = n, e[5] = r, e[6] = i) : i = e[6];
130
+ }), e[3] = n, e[4] = i);
131
131
  let a;
132
- return e[7] !== t || e[8] !== i ? (a = /* @__PURE__ */ L(ce, {
132
+ return e[5] !== t || e[6] !== i ? (a = /* @__PURE__ */ R(ce, {
133
133
  popup: t,
134
134
  children: i
135
- }), e[7] = t, e[8] = i, e[9] = a) : a = e[9], a;
136
- }, de = (e) => e.content.position || "top-right", fe = (e) => {
135
+ }), e[5] = t, e[6] = i, e[7] = a) : a = e[7], a;
136
+ }, fe = (e) => e.content.position || "top-right", pe = (e) => {
137
137
  switch (e) {
138
138
  case "close-press": return "close_button";
139
139
  case "outside-press": return "outside_click";
140
140
  case "escape-key": return "escape_key";
141
141
  default: return "programmatic";
142
142
  }
143
- }, pe = () => {
144
- let n = k(32), { popup: r, callbacks: i } = x(), { placement: a, id: o } = r, s = z(e).active_popup_id === o, c = F(!1), h, g;
143
+ }, me = () => {
144
+ let n = D(32), { popup: r, callbacks: i } = S(), { placement: a, id: o } = r, s = B(e).active_popup_id === o, c = L(!1), h, g;
145
145
  n[0] !== i || n[1] !== s || n[2] !== r ? (h = () => {
146
146
  s && !c.current && (c.current = !0, i?.onPopupOpen?.(r, { trigger_type: t() })), s || (c.current = !1);
147
147
  }, g = [
148
148
  s,
149
149
  r,
150
150
  i
151
- ], n[0] = i, n[1] = s, n[2] = r, n[3] = h, n[4] = g) : (h = n[3], g = n[4]), P(h, g);
152
- let v = D(), y, b, S, C, w, E, A, j;
153
- if (n[5] !== v || n[6] !== s || n[7] !== a || n[8] !== r) {
154
- let e = de(r), t = a === "popup", i = a === "slide_in";
155
- b = f, w = s, n[17] === v ? E = n[18] : (E = (e, t) => !e && v(fe(t?.reason)), n[17] = v, n[18] = E), A = t, j = !t, y = u, n[19] === t ? S = n[20] : (S = t && /* @__PURE__ */ L(d, {}), n[19] = t, n[20] = S), C = t ? /* @__PURE__ */ L(m, {
156
- className: _,
157
- children: /* @__PURE__ */ R(p.Popup, {
158
- className: O({ placement: a }),
159
- children: [/* @__PURE__ */ L(l, {
151
+ ], n[0] = i, n[1] = s, n[2] = r, n[3] = h, n[4] = g) : (h = n[3], g = n[4]), I(h, g);
152
+ let _ = te(), y, b, C, w, T, E, O, k;
153
+ if (n[5] !== _ || n[6] !== s || n[7] !== a || n[8] !== r) {
154
+ let e = fe(r), t = a === "popup", i = a === "slide_in";
155
+ b = f, T = s, n[17] === _ ? E = n[18] : (E = (e, t) => !e && _(pe(t?.reason)), n[17] = _, n[18] = E), O = t, k = !t, y = u, n[19] === t ? C = n[20] : (C = t && /* @__PURE__ */ R(d, {}), n[19] = t, n[20] = C), w = t ? /* @__PURE__ */ R(m, {
156
+ className: ee,
157
+ children: /* @__PURE__ */ z(p.Popup, {
158
+ className: x({ placement: a }),
159
+ children: [/* @__PURE__ */ R(l, {
160
160
  variant: "ghost",
161
161
  size: "icon-xs",
162
- className: T,
162
+ className: v,
163
163
  "aria-label": "Close popup",
164
- children: /* @__PURE__ */ L(V, { size: 16 })
165
- }), /* @__PURE__ */ L(Z, {})]
164
+ children: /* @__PURE__ */ R(H, { size: 16 })
165
+ }), /* @__PURE__ */ R(Z, {})]
166
166
  })
167
- }) : /* @__PURE__ */ R(p.Popup, {
168
- className: B(O({
167
+ }) : /* @__PURE__ */ z(p.Popup, {
168
+ className: V(x({
169
169
  placement: a,
170
170
  position: e
171
171
  }), i && "_1gklkndd"),
172
- children: [/* @__PURE__ */ L(l, {
172
+ children: [/* @__PURE__ */ R(l, {
173
173
  variant: "ghost",
174
174
  size: "icon-xs",
175
- className: T,
175
+ className: v,
176
176
  "aria-label": "Close popup",
177
- children: /* @__PURE__ */ L(V, { size: 16 })
178
- }), /* @__PURE__ */ L(Z, {})]
179
- }), n[5] = v, n[6] = s, n[7] = a, n[8] = r, n[9] = y, n[10] = b, n[11] = S, n[12] = C, n[13] = w, n[14] = E, n[15] = A, n[16] = j;
180
- } else y = n[9], b = n[10], S = n[11], C = n[12], w = n[13], E = n[14], A = n[15], j = n[16];
181
- let M;
182
- n[21] !== y || n[22] !== S || n[23] !== C ? (M = /* @__PURE__ */ R(y, { children: [S, C] }), n[21] = y, n[22] = S, n[23] = C, n[24] = M) : M = n[24];
183
- let N;
184
- return n[25] !== b || n[26] !== w || n[27] !== E || n[28] !== A || n[29] !== j || n[30] !== M ? (N = /* @__PURE__ */ L(b, {
185
- open: w,
177
+ children: /* @__PURE__ */ R(H, { size: 16 })
178
+ }), /* @__PURE__ */ R(Z, {})]
179
+ }), n[5] = _, n[6] = s, n[7] = a, n[8] = r, n[9] = y, n[10] = b, n[11] = C, n[12] = w, n[13] = T, n[14] = E, n[15] = O, n[16] = k;
180
+ } else y = n[9], b = n[10], C = n[11], w = n[12], T = n[13], E = n[14], O = n[15], k = n[16];
181
+ let A;
182
+ n[21] !== y || n[22] !== C || n[23] !== w ? (A = /* @__PURE__ */ z(y, { children: [C, w] }), n[21] = y, n[22] = C, n[23] = w, n[24] = A) : A = n[24];
183
+ let j;
184
+ return n[25] !== b || n[26] !== T || n[27] !== E || n[28] !== O || n[29] !== k || n[30] !== A ? (j = /* @__PURE__ */ R(b, {
185
+ open: T,
186
186
  onOpenChange: E,
187
- modal: A,
188
- disablePointerDismissal: j,
189
- children: M
190
- }), n[25] = b, n[26] = w, n[27] = E, n[28] = A, n[29] = j, n[30] = M, n[31] = N) : N = n[31], N;
191
- }, me = 3e4, he = 5e3, ge = 5e3, _e = 100, ve = .5, ye = 5, be = (e) => {
187
+ modal: O,
188
+ disablePointerDismissal: k,
189
+ children: A
190
+ }), n[25] = b, n[26] = T, n[27] = E, n[28] = O, n[29] = k, n[30] = A, n[31] = j) : j = n[31], j;
191
+ }, he = 3e4, ge = 5e3, _e = 5e3, ve = 100, ye = .5, be = 5, xe = (e) => {
192
192
  if (typeof document > "u") return () => {};
193
- let t = !1, n = Date.now(), r = [], i = 0, a = null, o = () => Date.now() - n >= me, s = () => {
193
+ let t = !1, n = Date.now(), r = [], i = 0, a = null, o = () => Date.now() - n >= he, s = () => {
194
194
  t || (t = !0, c(), e());
195
195
  }, c = () => {
196
196
  a &&= (clearTimeout(a), null);
@@ -202,51 +202,51 @@ var oe = (e) => (e ?? "16:9").replace(":", " / "), se = (e) => {
202
202
  r.push({
203
203
  y: e.clientY,
204
204
  t: Date.now()
205
- }), r.length > ye && r.shift();
205
+ }), r.length > be && r.shift();
206
206
  }, f = (e) => {
207
- t || !o() || e.clientY > 0 || u() < _e || Date.now() - i < ge || l() < ve || (c(), a = setTimeout(s, he));
207
+ t || !o() || e.clientY > 0 || u() < ve || Date.now() - i < _e || l() < ye || (c(), a = setTimeout(s, ge));
208
208
  }, p = () => {
209
209
  c();
210
210
  }, m = () => {
211
211
  i = Date.now();
212
- }, h = M.listen((e) => {
212
+ }, h = A.listen((e) => {
213
213
  o() && (e === "hidden" || e === "frozen") && s();
214
214
  });
215
215
  return document.addEventListener("mousemove", d, { passive: !0 }), document.addEventListener("mouseleave", f), document.addEventListener("mouseenter", p), window.addEventListener("scroll", m, { passive: !0 }), () => {
216
216
  c(), document.removeEventListener("mousemove", d), document.removeEventListener("mouseleave", f), document.removeEventListener("mouseenter", p), window.removeEventListener("scroll", m), h();
217
217
  };
218
- }, xe = (e, t) => {
218
+ }, Se = (e, t) => {
219
219
  if (!e) return null;
220
220
  let n = setTimeout(() => r(t, { trigger_type: "time_on_page" }), e);
221
221
  return () => clearTimeout(n);
222
- }, Se = (e, t) => {
222
+ }, Ce = (e, t) => {
223
223
  if (e === void 0) return null;
224
224
  let n = !1;
225
- return N.listen((i) => {
225
+ return j.listen((i) => {
226
226
  n || i.depth >= e && (n = !0, r(t, { trigger_type: "scroll_depth" }));
227
227
  });
228
- }, Ce = (e) => {
228
+ }, we = (e) => {
229
229
  let t = !1;
230
- return A.listen((n) => {
230
+ return O.listen((n) => {
231
231
  t || n.status === "idle" && (t = !0, r(e, { trigger_type: "inactivity" }));
232
232
  });
233
- }, we = (e, t) => {
234
- let n = k(11), i = t === void 0 ? !0 : t, { triggers: a, id: o } = e, s = z(j), c;
233
+ }, Te = (e, t) => {
234
+ let n = D(11), i = t === void 0 ? !0 : t, { triggers: a, id: o } = e, s = B(k), c;
235
235
  n[0] === Symbol.for("react.memo_cache_sentinel") ? (c = [], n[0] = c) : c = n[0];
236
- let l = F(c), u;
236
+ let l = L(c), u;
237
237
  n[1] !== i || n[2] !== s || n[3] !== e || n[4] !== a ? (u = () => {
238
238
  if (!i || !s || !a) return;
239
239
  let t = [];
240
240
  if (a.time_on_page.enabled) {
241
- let n = xe(a.time_on_page.delay_ms, e);
241
+ let n = Se(a.time_on_page.delay_ms, e);
242
242
  n && t.push(n);
243
243
  }
244
244
  if (a.scroll_depth.enabled) {
245
- let n = Se(a.scroll_depth.percent, e);
245
+ let n = Ce(a.scroll_depth.percent, e);
246
246
  n && t.push(n);
247
247
  }
248
- return a.exit_intent.enabled && t.push(be(() => r(e, { trigger_type: "exit_intent" }))), a.inactivity.enabled && t.push(Ce(e)), l.current = t, () => {
249
- t.forEach(Te), l.current = [];
248
+ return a.exit_intent.enabled && t.push(xe(() => r(e, { trigger_type: "exit_intent" }))), a.inactivity.enabled && t.push(we(e)), l.current = t, () => {
249
+ t.forEach(Ee), l.current = [];
250
250
  };
251
251
  }, n[1] = i, n[2] = s, n[3] = e, n[4] = a, n[5] = u) : u = n[5];
252
252
  let d;
@@ -255,9 +255,9 @@ var oe = (e) => (e ?? "16:9").replace(":", " / "), se = (e) => {
255
255
  s,
256
256
  o,
257
257
  a
258
- ], n[6] = i, n[7] = s, n[8] = o, n[9] = a, n[10] = d) : d = n[10], P(u, d);
258
+ ], n[6] = i, n[7] = s, n[8] = o, n[9] = a, n[10] = d) : d = n[10], I(u, d);
259
259
  };
260
- function Te(e) {
260
+ function Ee(e) {
261
261
  return e();
262
262
  }
263
263
  var Q = (e, t) => {
@@ -280,7 +280,7 @@ var Q = (e, t) => {
280
280
  }
281
281
  default: return !1;
282
282
  }
283
- }, Ee = (e, t, n) => {
283
+ }, De = (e, t, n) => {
284
284
  let r = e.pages?.exclude ?? [];
285
285
  if (r.length > 0 && r.some((e) => Q(e, t))) return !1;
286
286
  let i = e.pages?.include ?? [];
@@ -289,8 +289,8 @@ var Q = (e, t) => {
289
289
  if (a.length > 0 && (!n || !a.some((e) => $(e, n)))) return !1;
290
290
  let o = e.referrer?.exclude ?? [];
291
291
  return !(o.length > 0 && n && o.some((e) => $(e, n)));
292
- }, De = (e) => {
293
- let t = k(4), { pageId: n } = e, { popup: r } = x(), i;
292
+ }, Oe = (e) => {
293
+ let t = D(4), { pageId: n } = e, { popup: r } = S(), i;
294
294
  bb0: {
295
295
  if (!r.target) {
296
296
  i = !0;
@@ -302,8 +302,8 @@ var Q = (e, t) => {
302
302
  }
303
303
  let e;
304
304
  if (t[0] !== n || t[1] !== r.target) {
305
- let i = ee.get().identity?.referrer?.raw || document.referrer || null, a = new URL(window.location.href, window.location.origin);
306
- e = Ee(r.target, {
305
+ let i = M.get().identity?.referrer?.raw || document.referrer || null, a = new URL(window.location.href, window.location.origin);
306
+ e = De(r.target, {
307
307
  pageId: n,
308
308
  path: a.pathname
309
309
  }, i), t[0] = n, t[1] = r.target, t[2] = e;
@@ -311,70 +311,71 @@ var Q = (e, t) => {
311
311
  i = e;
312
312
  }
313
313
  let a = i;
314
- if (we(r, a), !a) return null;
314
+ if (Te(r, a), !a) return null;
315
315
  let o;
316
- return t[3] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ L(pe, {}), t[3] = o) : o = t[3], o;
317
- }, Oe = () => {
318
- let e = N.get(), t = A.get();
316
+ return t[3] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ R(me, {}), t[3] = o) : o = t[3], o;
317
+ }, ke = () => {
318
+ let e = j.get(), t = O.get();
319
319
  return {
320
320
  trigger_scroll_depth: e.depth,
321
321
  trigger_scroll_speed: e.speedCategory,
322
322
  trigger_scroll_direction: e.direction,
323
323
  trigger_activity_status: t.status,
324
324
  trigger_activity_seconds: t.seconds,
325
- trigger_tab_count: te()
325
+ trigger_tab_count: ne()
326
326
  };
327
- }, ke = (e) => {
328
- let t = k(16), { popups: r, pageId: a } = e, o = ne(), s, c;
329
- t[0] === r ? (s = t[1], c = t[2]) : (s = () => {
327
+ }, Ae = (e) => {
328
+ let t = D(18), { popups: r, pageId: a } = e, o = N(), s = re(), c, l;
329
+ t[0] === r ? (c = t[1], l = t[2]) : (c = () => {
330
330
  i(r), n(!1);
331
- }, c = [r], t[0] = r, t[1] = s, t[2] = c), P(s, c);
332
- let l;
333
- t[3] === o ? l = t[4] : (l = (e, t) => {
331
+ }, l = [r], t[0] = r, t[1] = c, t[2] = l), I(c, l);
332
+ let u;
333
+ t[3] === o ? u = t[4] : (u = (e, t) => {
334
334
  !o || typeof o.track != "function" || o?.track(e, t);
335
- }, t[3] = o, t[4] = l);
336
- let u = l, d = Ae, f;
337
- t[5] === u ? f = t[6] : (f = {
335
+ }, t[3] = o, t[4] = u);
336
+ let d = u, f = je, p;
337
+ t[5] === d ? p = t[6] : (p = {
338
338
  onPopupOpen: (e, t) => {
339
- u("popup.view", {
340
- ...d(e),
339
+ d("popup.view", {
340
+ ...f(e),
341
341
  trigger_type: t.trigger_type,
342
342
  language: e.language,
343
- ...Oe()
343
+ ...ke()
344
344
  });
345
345
  },
346
346
  onPopupClose: (e, t) => {
347
- u("popup.close", {
348
- ...d(e),
347
+ d("popup.close", {
348
+ ...f(e),
349
349
  trigger_type: t.trigger_type,
350
350
  dismiss_reason: t.dismiss_reason,
351
351
  time_shown_ms: t.time_shown_ms
352
352
  });
353
353
  },
354
354
  onAction: (e, t) => {
355
- u("popup.action", {
356
- ...d(e),
355
+ d("popup.action", {
356
+ ...f(e),
357
357
  ...t
358
358
  });
359
359
  }
360
- }, t[5] = u, t[6] = f);
361
- let p = f, m;
362
- if (t[7] !== p || t[8] !== a || t[9] !== r) {
360
+ }, t[5] = d, t[6] = p);
361
+ let m = p, h;
362
+ if (t[7] !== m || t[8] !== s || t[9] !== a || t[10] !== r) {
363
363
  let e;
364
- t[11] !== p || t[12] !== a ? (e = (e) => /* @__PURE__ */ L(le, {
364
+ t[12] !== m || t[13] !== s || t[14] !== a ? (e = (e) => /* @__PURE__ */ R(le, {
365
365
  popupTheme: e.theme,
366
366
  siteTheme: e.site?.theme,
367
- children: /* @__PURE__ */ L(E, {
367
+ children: /* @__PURE__ */ R(w, {
368
368
  popup: e,
369
- callbacks: p,
370
- children: /* @__PURE__ */ L(De, { pageId: a })
369
+ callbacks: m,
370
+ client: s,
371
+ children: /* @__PURE__ */ R(Oe, { pageId: a })
371
372
  })
372
- }, e.id), t[11] = p, t[12] = a, t[13] = e) : e = t[13], m = r.map(e), t[7] = p, t[8] = a, t[9] = r, t[10] = m;
373
- } else m = t[10];
374
- let h;
375
- return t[14] === m ? h = t[15] : (h = /* @__PURE__ */ L(I, { children: m }), t[14] = m, t[15] = h), h;
373
+ }, e.id), t[12] = m, t[13] = s, t[14] = a, t[15] = e) : e = t[15], h = r.map(e), t[7] = m, t[8] = s, t[9] = a, t[10] = r, t[11] = h;
374
+ } else h = t[11];
375
+ let g;
376
+ return t[16] === h ? g = t[17] : (g = /* @__PURE__ */ R(ie, { children: h }), t[16] = h, t[17] = g), g;
376
377
  };
377
- function Ae(e) {
378
+ function je(e) {
378
379
  return {
379
380
  resource: "builder.popup",
380
381
  identifier: e.id,
@@ -383,6 +384,6 @@ function Ae(e) {
383
384
  popup_action_kind: e.content.action?.type || "none"
384
385
  };
385
386
  }
386
- var je = /* @__PURE__ */ g({ PopupRenderer: () => ke });
387
+ var Me = /* @__PURE__ */ y({ PopupRenderer: () => Ae });
387
388
  //#endregion
388
- export { je as t };
389
+ export { Me as t };
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { c as e } from "./dist-2bXx8eVI.js";
2
+ import { c as e } from "./dist-D5mTOitS.js";
3
3
  import { n as t } from "./AuthProvider-B5NfFwbG.js";
4
4
  import { t as n } from "./Spinner-D5spB_Mv.js";
5
5
  import { t as r } from "./card-5ooLmYSr.js";
@@ -1,9 +1,9 @@
1
1
  "use client";
2
- import { t as e } from "./Button-BZDul09m.js";
2
+ import { t as e } from "./Button-Dza3e6Mv.js";
3
3
  import { n as t } from "./AuthProvider-B5NfFwbG.js";
4
4
  import { t as n } from "./cn-B6c1DjO_.js";
5
5
  import { n as r, t as i } from "./StripePaymentModal-CiKqmQwK.js";
6
- import { BillingStep as a } from "./BillingStep-vBBLXLzk.js";
6
+ import { BillingStep as a } from "./BillingStep-CvRmZGdq.js";
7
7
  import { errorHandler as o, useLevo as s } from "@levo-so/react";
8
8
  import { useEffect as c, useRef as l, useState as u } from "react";
9
9
  import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
package/collection.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as e, c as t, i as n, n as r, o as i, r as a, s as o } from "./dist-2bXx8eVI.js";
1
+ import { a as e, c as t, i as n, n as r, o as i, r as a, s as o } from "./dist-D5mTOitS.js";
2
2
  export { t as CollectionForm, a as CollectionFormBuilder, r as CollectionFormRenderer, n as FormBuilder, i as LevoFormProvider, e as useLevoForm, o as useLevoFormContext };