@useinsider/guido 3.9.0 → 3.9.1-beta.4718ccb
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/dist/composables/useCortexBlueprintBridge.js +34 -30
- package/dist/composables/useEmailTemplateApplier.js +11 -9
- package/dist/config/compiler/utils/recommendationCompilerUtils.js +121 -126
- package/dist/config/migrator/itemsBlockMigrator.js +159 -114
- package/dist/config/migrator/unsubscribeMigrator.js +89 -67
- package/dist/extensions/Blocks/Items/block.js +57 -37
- package/dist/extensions/Blocks/Items/controls/name/trimming.js +17 -18
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +67 -78
- package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +13 -9
- package/dist/extensions/Blocks/Items/layouts/vertical.html.js +26 -14
- package/dist/extensions/Blocks/Items/template.js +245 -247
- package/dist/extensions/Blocks/Items/utils/nodeConfigUtils.js +53 -45
- package/dist/extensions/Blocks/Recommendation/templates/list/template.js +15 -15
- package/dist/extensions/Blocks/Recommendation/utils/captureStyleTemplates.js +75 -69
- package/dist/package.json.js +1 -1
- package/dist/src/composables/useCortexBlueprintBridge.d.ts +5 -2
- package/dist/src/composables/useEmailTemplateApplier.d.ts +8 -3
- package/dist/src/extensions/Blocks/Items/block.d.ts +9 -0
- package/dist/src/extensions/Blocks/Items/template.d.ts +7 -0
- package/dist/src/extensions/Blocks/Items/utils/nodeConfigUtils.d.ts +12 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/captureStyleTemplates.d.ts +6 -0
- package/package.json +2 -2
|
@@ -1,55 +1,59 @@
|
|
|
1
|
-
import { useEmailTemplateApplier as
|
|
2
|
-
import { useToaster as
|
|
3
|
-
import { useTranslations as
|
|
1
|
+
import { useEmailTemplateApplier as w, resetEmailTemplateApplier as _ } from "./useEmailTemplateApplier.js";
|
|
2
|
+
import { useToaster as I } from "./useToaster.js";
|
|
3
|
+
import { useTranslations as P } from "./useTranslations.js";
|
|
4
4
|
import { ToasterTypeOptions as S } from "../enums/toaster.js";
|
|
5
5
|
import { getActivePinia as v } from "pinia";
|
|
6
6
|
import { watch as B, onUnmounted as D } from "vue";
|
|
7
|
-
const
|
|
7
|
+
const x = "email_template", L = "chat", M = "guido:debug:ai", R = () => {
|
|
8
8
|
if (typeof window > "u")
|
|
9
9
|
return !1;
|
|
10
10
|
try {
|
|
11
|
-
return window.localStorage.getItem(
|
|
11
|
+
return window.localStorage.getItem(M) === "1";
|
|
12
12
|
} catch {
|
|
13
13
|
return !1;
|
|
14
14
|
}
|
|
15
|
-
},
|
|
16
|
-
const
|
|
17
|
-
if (!
|
|
15
|
+
}, H = () => {
|
|
16
|
+
const c = v();
|
|
17
|
+
if (!c)
|
|
18
18
|
return;
|
|
19
|
-
const l =
|
|
19
|
+
const l = c._s, p = l == null ? void 0 : l.get(L);
|
|
20
20
|
if (!p)
|
|
21
21
|
return;
|
|
22
|
-
const {
|
|
23
|
-
const
|
|
24
|
-
return
|
|
25
|
-
}, i = /* @__PURE__ */ new Map(),
|
|
26
|
-
u && console.debug(`[guido:cortex] msg=${
|
|
27
|
-
},
|
|
28
|
-
if (
|
|
22
|
+
const { markPending: d, applyTemplate: f, applyTemplateDebounced: T } = w(), { showToaster: h } = I(), y = P(), A = (r, t) => {
|
|
23
|
+
const e = y(r);
|
|
24
|
+
return e === r ? t : e;
|
|
25
|
+
}, i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Set(), u = R(), E = (r, t) => {
|
|
26
|
+
u && console.debug(`[guido:cortex] msg=${r ?? "?"} type=${(t == null ? void 0 : t.type) ?? "?"}`, t);
|
|
27
|
+
}, b = (r) => {
|
|
28
|
+
if (r.blueprintType !== x)
|
|
29
29
|
return;
|
|
30
|
-
const t =
|
|
31
|
-
if (!t || !(
|
|
30
|
+
const t = r.blueprintId, e = r.blueprintData;
|
|
31
|
+
if (!t || !(e != null && e.html))
|
|
32
32
|
return;
|
|
33
|
+
if (!r.applyRequested) {
|
|
34
|
+
d(t);
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
33
37
|
const o = i.get(t);
|
|
34
|
-
o === void 0 ? (i.set(t,
|
|
35
|
-
}, s = (
|
|
38
|
+
o === void 0 ? (i.set(t, e.html), f(t, e)) : o !== e.html && (i.set(t, e.html), T(t, e));
|
|
39
|
+
}, s = (r) => r === void 0 || a.has(r) ? !1 : (a.add(r), h({
|
|
36
40
|
type: S.Alert,
|
|
37
41
|
message: A("newsletter.ai-template-failed", "AI couldn't generate the template. Please try again.")
|
|
38
|
-
}), !0),
|
|
42
|
+
}), !0), m = B(
|
|
39
43
|
() => p.messages,
|
|
40
|
-
(
|
|
41
|
-
Array.isArray(
|
|
42
|
-
const
|
|
43
|
-
(t == null ? void 0 : t.isError) === !0 && s(
|
|
44
|
+
(r) => {
|
|
45
|
+
Array.isArray(r) && r.forEach((t) => {
|
|
46
|
+
const e = t == null ? void 0 : t.id;
|
|
47
|
+
(t == null ? void 0 : t.isError) === !0 && s(e) && u && console.debug(`[guido:cortex] message-level error id=${e}`, t);
|
|
44
48
|
const o = t == null ? void 0 : t.segments;
|
|
45
49
|
Array.isArray(o) && o.forEach((n) => {
|
|
46
50
|
if (n)
|
|
47
|
-
switch (E(
|
|
51
|
+
switch (E(e, n), n.type) {
|
|
48
52
|
case "blueprint":
|
|
49
|
-
|
|
53
|
+
b(n);
|
|
50
54
|
break;
|
|
51
55
|
case "error":
|
|
52
|
-
s(
|
|
56
|
+
s(e);
|
|
53
57
|
break;
|
|
54
58
|
}
|
|
55
59
|
});
|
|
@@ -58,9 +62,9 @@ const P = "email_template", x = "chat", L = "guido:debug:ai", M = () => {
|
|
|
58
62
|
{ deep: !0, immediate: !0 }
|
|
59
63
|
);
|
|
60
64
|
D(() => {
|
|
61
|
-
|
|
65
|
+
m(), i.clear(), a.clear(), _();
|
|
62
66
|
});
|
|
63
67
|
};
|
|
64
68
|
export {
|
|
65
|
-
|
|
69
|
+
H as useCortexBlueprintBridge
|
|
66
70
|
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
2
|
-
import { useToaster as
|
|
3
|
-
import { useTranslations as
|
|
1
|
+
import { useActionsApi as T } from "./useActionsApi.js";
|
|
2
|
+
import { useToaster as f } from "./useToaster.js";
|
|
3
|
+
import { useTranslations as y } from "./useTranslations.js";
|
|
4
4
|
import { ToasterTypeOptions as n } from "../enums/toaster.js";
|
|
5
|
-
import { ref as
|
|
6
|
-
const h = 250, s =
|
|
7
|
-
const { updateHtmlAndCss: l } =
|
|
5
|
+
import { ref as v } from "vue";
|
|
6
|
+
const h = 250, s = v({}), o = {}, j = () => {
|
|
7
|
+
const { updateHtmlAndCss: l } = T(), { showToaster: r } = f(), i = y(), u = (e) => {
|
|
8
|
+
s.value[e] === void 0 && (s.value = { ...s.value, [e]: "pending" });
|
|
9
|
+
}, c = (e, t, p) => {
|
|
8
10
|
s.value = { ...s.value, [e]: "applying" };
|
|
9
11
|
try {
|
|
10
12
|
l(t, p), s.value = { ...s.value, [e]: "applied" }, r({
|
|
@@ -21,7 +23,7 @@ const h = 250, s = y({}), o = {}, j = () => {
|
|
|
21
23
|
const t = o[e];
|
|
22
24
|
t && (clearTimeout(t), delete o[e]);
|
|
23
25
|
};
|
|
24
|
-
return { applyStatus: s, applyTemplate: (e, t) => {
|
|
26
|
+
return { applyStatus: s, markPending: u, applyTemplate: (e, t) => {
|
|
25
27
|
t.html && (m(e), c(e, t.html, t.css ?? ""));
|
|
26
28
|
}, applyTemplateDebounced: (e, t) => {
|
|
27
29
|
if (!t.html)
|
|
@@ -32,10 +34,10 @@ const h = 250, s = y({}), o = {}, j = () => {
|
|
|
32
34
|
delete o[e], c(e, p, a);
|
|
33
35
|
}, h);
|
|
34
36
|
} };
|
|
35
|
-
},
|
|
37
|
+
}, k = () => {
|
|
36
38
|
Object.values(o).forEach(clearTimeout), Object.keys(o).forEach((l) => delete o[l]), s.value = {};
|
|
37
39
|
};
|
|
38
40
|
export {
|
|
39
|
-
|
|
41
|
+
k as resetEmailTemplateApplier,
|
|
40
42
|
j as useEmailTemplateApplier
|
|
41
43
|
};
|
|
@@ -1,181 +1,176 @@
|
|
|
1
1
|
import { useConfig as _ } from "../../../composables/useConfig.js";
|
|
2
|
-
import { useRecommendation as
|
|
3
|
-
import { CSS_CLASS_RECO_BUTTON as
|
|
4
|
-
import { useRecommendationExtensionStore as
|
|
2
|
+
import { useRecommendation as q } from "../../../composables/useRecommendation.js";
|
|
3
|
+
import { CSS_CLASS_RECO_BUTTON as C } from "../../../extensions/Blocks/Recommendation/constants/selectors.js";
|
|
4
|
+
import { useRecommendationExtensionStore as E } from "../../../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
5
5
|
import { isIgnoredRecommendationBlock as w } from "./recommendationIgnoreUtils.js";
|
|
6
|
-
function
|
|
7
|
-
const
|
|
8
|
-
return
|
|
6
|
+
function P(t, r, e, n, s = "") {
|
|
7
|
+
const c = `{{${s}${t}_${r}_${e}}}`, o = `{{${s}${t}_${r}_currency}}`;
|
|
8
|
+
return n === "before" ? `${o} ${c}` : `${c} ${o}`;
|
|
9
9
|
}
|
|
10
|
-
function m(
|
|
11
|
-
let
|
|
12
|
-
for (;
|
|
13
|
-
[
|
|
14
|
-
return
|
|
10
|
+
function m(t) {
|
|
11
|
+
let r = t;
|
|
12
|
+
for (; r.children.length === 1; )
|
|
13
|
+
[r] = r.children;
|
|
14
|
+
return r;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
switch (
|
|
16
|
+
function b(t, r, e, n, s, c) {
|
|
17
|
+
switch (r) {
|
|
18
18
|
case "productImage": {
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
const
|
|
22
|
-
|
|
19
|
+
const o = t.querySelector("img");
|
|
20
|
+
o && (o.setAttribute("src", `{{${c}${e}_${n}_image_url}}`), o.setAttribute("alt", `{{${c}${e}_${n}_name}}`));
|
|
21
|
+
const i = t.querySelector("a");
|
|
22
|
+
i && (i.setAttribute("href", `{{${c}${e}_${n}_url}}`), i.classList.add(C));
|
|
23
23
|
break;
|
|
24
24
|
}
|
|
25
25
|
case "productName": {
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
break;
|
|
29
|
-
}
|
|
30
|
-
case "productPrice": {
|
|
31
|
-
const r = e.querySelector(".product-price p") ?? e.querySelector("p");
|
|
32
|
-
r && (m(r).textContent = b(
|
|
33
|
-
t,
|
|
34
|
-
o,
|
|
35
|
-
"price",
|
|
36
|
-
c,
|
|
37
|
-
i
|
|
38
|
-
));
|
|
39
|
-
const s = e.querySelector(".product-old-price p");
|
|
40
|
-
s && (m(s).textContent = b(
|
|
41
|
-
t,
|
|
42
|
-
o,
|
|
43
|
-
"original_price",
|
|
44
|
-
c,
|
|
45
|
-
i
|
|
46
|
-
));
|
|
26
|
+
const o = t.querySelector("p");
|
|
27
|
+
o && (m(o).textContent = `{{${c}${e}_${n}_name}}`);
|
|
47
28
|
break;
|
|
48
29
|
}
|
|
30
|
+
// Inline mode ("Move to next line" OFF) merges BOTH prices into one row
|
|
31
|
+
// anchored on whichever attribute comes first in the composition, so
|
|
32
|
+
// substitute by cell content, not by the row's anchor (SD-145161).
|
|
33
|
+
case "productPrice":
|
|
49
34
|
case "productOldPrice": {
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
35
|
+
const o = (d, l) => {
|
|
36
|
+
d && (m(d).textContent = P(
|
|
37
|
+
e,
|
|
38
|
+
n,
|
|
39
|
+
l,
|
|
40
|
+
s,
|
|
41
|
+
c
|
|
42
|
+
));
|
|
43
|
+
}, i = t.querySelector(".product-price p"), a = t.querySelector(".product-old-price p"), u = !i && !a ? t.querySelector("p") : null;
|
|
44
|
+
o(i ?? (r === "productPrice" ? u : null), "price"), o(a ?? (r === "productOldPrice" ? u : null), "original_price");
|
|
58
45
|
break;
|
|
59
46
|
}
|
|
60
47
|
case "productButton": {
|
|
61
|
-
const
|
|
62
|
-
|
|
48
|
+
const o = t.querySelector("a");
|
|
49
|
+
o && o.setAttribute("href", `{{${c}${e}_${n}_url}}`);
|
|
63
50
|
break;
|
|
64
51
|
}
|
|
65
52
|
case "productOmnibusPrice": {
|
|
66
|
-
const
|
|
67
|
-
if (
|
|
68
|
-
|
|
69
|
-
const
|
|
70
|
-
|
|
53
|
+
const o = t.querySelector(".omnibus-price-value");
|
|
54
|
+
if (o) {
|
|
55
|
+
o.textContent = `{{${c}${e}_${n}_omnibus_price}}`;
|
|
56
|
+
const i = o.closest("p");
|
|
57
|
+
i && (i.setAttribute("product-attr", "omnibus_price"), i.setAttribute("composition", "true"));
|
|
71
58
|
}
|
|
72
59
|
break;
|
|
73
60
|
}
|
|
74
61
|
case "productOmnibusDiscount": {
|
|
75
|
-
const
|
|
76
|
-
if (
|
|
77
|
-
|
|
78
|
-
const
|
|
79
|
-
|
|
62
|
+
const o = t.querySelector(".omnibus-discount-value");
|
|
63
|
+
if (o) {
|
|
64
|
+
o.textContent = `{{${c}${e}_${n}_omnibus_discount}}`;
|
|
65
|
+
const i = o.closest("p");
|
|
66
|
+
i && (i.setAttribute("product-attr", "omnibus_discount"), i.setAttribute("composition", "true"));
|
|
80
67
|
}
|
|
81
68
|
break;
|
|
82
69
|
}
|
|
83
70
|
default: {
|
|
84
|
-
const
|
|
85
|
-
if (
|
|
86
|
-
const
|
|
87
|
-
a && (m(a).textContent = `{{${
|
|
71
|
+
const o = t.getAttribute("product-attr") ? t : t.querySelector("[product-attr]");
|
|
72
|
+
if (o) {
|
|
73
|
+
const i = o.getAttribute("product-attr"), a = o.querySelector("p");
|
|
74
|
+
a && (m(a).textContent = `{{${c}${e}_${n}_${i}}}`);
|
|
88
75
|
}
|
|
89
76
|
break;
|
|
90
77
|
}
|
|
91
78
|
}
|
|
92
79
|
}
|
|
93
|
-
function
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
const u = a.getAttribute("data-attribute-type") || "",
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}) :
|
|
80
|
+
function R(t, r, e, n) {
|
|
81
|
+
t.querySelectorAll(".recommendation-product-row").forEach((c, o) => {
|
|
82
|
+
c.querySelectorAll("[data-attribute-type]").forEach((a) => {
|
|
83
|
+
const u = a.getAttribute("data-attribute-type") || "", d = a.querySelectorAll(".attribute-cell");
|
|
84
|
+
d.length > 0 ? d.forEach((l) => {
|
|
85
|
+
b(l, u, r, o, e, n);
|
|
86
|
+
}) : b(a, u, r, o, e, n);
|
|
100
87
|
});
|
|
101
88
|
});
|
|
102
89
|
}
|
|
103
|
-
function
|
|
104
|
-
const
|
|
105
|
-
if (!
|
|
90
|
+
function W(t, r, e, n) {
|
|
91
|
+
const s = t.querySelectorAll(".recommendation-product-row");
|
|
92
|
+
if (!s.length)
|
|
106
93
|
return;
|
|
107
|
-
const [
|
|
108
|
-
|
|
94
|
+
const [c] = s, o = c.querySelector("[data-attribute-type]"), i = o ? o.querySelectorAll(".attribute-cell").length : 1;
|
|
95
|
+
s.forEach((a, u) => {
|
|
109
96
|
a.querySelectorAll("[data-attribute-type]").forEach((l) => {
|
|
110
|
-
const
|
|
111
|
-
l.querySelectorAll(".attribute-cell").forEach((
|
|
112
|
-
const
|
|
113
|
-
|
|
97
|
+
const p = l.getAttribute("data-attribute-type") || "";
|
|
98
|
+
l.querySelectorAll(".attribute-cell").forEach(($, S) => {
|
|
99
|
+
const g = u * i + S;
|
|
100
|
+
b($, p, r, g, e, n);
|
|
114
101
|
});
|
|
115
102
|
});
|
|
116
103
|
});
|
|
117
104
|
}
|
|
118
|
-
function
|
|
119
|
-
|
|
120
|
-
|
|
105
|
+
function v(t, r, e, n) {
|
|
106
|
+
t.querySelectorAll(".ins-recommendation-product-container").forEach((c) => {
|
|
107
|
+
W(c, r, e, n);
|
|
121
108
|
});
|
|
122
109
|
}
|
|
123
|
-
function O(
|
|
124
|
-
const
|
|
125
|
-
|
|
110
|
+
function O(t, r, e) {
|
|
111
|
+
const n = t.getAttribute("data-layout") || "grid", s = t.getAttribute("currency-alignment") || "after";
|
|
112
|
+
n === "list" ? R(t, r, s, e) : v(t, r, s, e);
|
|
126
113
|
}
|
|
127
|
-
function
|
|
128
|
-
const
|
|
129
|
-
return
|
|
114
|
+
function f(t, r, e) {
|
|
115
|
+
const n = new RegExp(`${r}\\s*:\\s*(\\d+)\\s*px`, "i"), s = t.match(n);
|
|
116
|
+
return s ? parseInt(s[1]) : e;
|
|
130
117
|
}
|
|
131
|
-
function
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
118
|
+
function y(t) {
|
|
119
|
+
const r = t.trim();
|
|
120
|
+
return r.endsWith("%") ? parseFloat(r) < 100 : /^\d+(?:\.\d+)?(?:px)?$/.test(r) && parseInt(r) > 0;
|
|
121
|
+
}
|
|
122
|
+
function A(t) {
|
|
123
|
+
const r = t.getAttribute("width");
|
|
124
|
+
if (r && y(r))
|
|
125
|
+
return r.trim();
|
|
126
|
+
const e = (t.getAttribute("style") || "").match(/(?:^|[;\s])width\s*:\s*(\d+(?:\.\d+)?(?:px|%))/i);
|
|
127
|
+
return e && y(e[1]) ? e[1] : null;
|
|
128
|
+
}
|
|
129
|
+
function M(t, r) {
|
|
130
|
+
let e = t.parentElement;
|
|
131
|
+
for (; e && e !== r; ) {
|
|
132
|
+
if (e.tagName === "TD" && A(e))
|
|
133
|
+
return e;
|
|
134
|
+
e = e.parentElement;
|
|
140
135
|
}
|
|
141
136
|
return null;
|
|
142
137
|
}
|
|
143
|
-
function
|
|
144
|
-
const
|
|
145
|
-
|
|
146
|
-
if (
|
|
138
|
+
function T(t) {
|
|
139
|
+
const r = t.getAttribute("style") || "", e = f(r, "width", 600), n = f(r, "padding", 0) * 2, s = Math.max(0, e - n);
|
|
140
|
+
s !== 0 && t.querySelectorAll("img.adapt-img").forEach((c) => {
|
|
141
|
+
if (c.hasAttribute("width"))
|
|
147
142
|
return;
|
|
148
|
-
const
|
|
149
|
-
if (!
|
|
143
|
+
const o = M(c, t);
|
|
144
|
+
if (!o)
|
|
150
145
|
return;
|
|
151
|
-
const
|
|
152
|
-
|
|
153
|
-
const
|
|
154
|
-
if (!/\bwidth\s*:\s*\d/i.test(
|
|
155
|
-
const
|
|
156
|
-
|
|
146
|
+
const i = A(o), a = f(o.getAttribute("style") || "", "padding", 0) * 2, u = i.endsWith("%") ? Math.floor(s * parseFloat(i) / 100) : parseInt(i), d = Math.max(1, u - a);
|
|
147
|
+
c.setAttribute("width", String(d));
|
|
148
|
+
const l = c.getAttribute("style") || "";
|
|
149
|
+
if (!/\bwidth\s*:\s*\d/i.test(l)) {
|
|
150
|
+
const p = l && !l.trim().endsWith(";") ? "; " : "";
|
|
151
|
+
c.setAttribute("style", `${l}${p}width: ${d}px`);
|
|
157
152
|
}
|
|
158
153
|
});
|
|
159
154
|
}
|
|
160
|
-
function
|
|
161
|
-
const
|
|
162
|
-
return (
|
|
163
|
-
` : "") +
|
|
155
|
+
function B(t, r) {
|
|
156
|
+
const e = t.match(/<!DOCTYPE[^>]*>/i);
|
|
157
|
+
return (e ? `${e[0]}
|
|
158
|
+
` : "") + r.documentElement.outerHTML;
|
|
164
159
|
}
|
|
165
|
-
function
|
|
166
|
-
const
|
|
167
|
-
if (!
|
|
168
|
-
return
|
|
169
|
-
const { buildCampaignUrl:
|
|
170
|
-
|
|
171
|
-
const { isFeatureEnabled:
|
|
172
|
-
return
|
|
173
|
-
var l,
|
|
174
|
-
const
|
|
175
|
-
|
|
176
|
-
}),
|
|
160
|
+
function G(t) {
|
|
161
|
+
const r = t.replaceAll("{%", "<!--{%").replaceAll("%}", "%}-->"), e = new DOMParser().parseFromString(r, "text/html"), n = e.querySelectorAll(".recommendation-block-v2");
|
|
162
|
+
if (!n.length)
|
|
163
|
+
return t;
|
|
164
|
+
const { buildCampaignUrl: s } = q(), c = E();
|
|
165
|
+
c.recommendationCampaignUrls = {};
|
|
166
|
+
const { isFeatureEnabled: o } = _(), i = o("liquidSyntax") ? "reco_" : "";
|
|
167
|
+
return n.forEach((u) => {
|
|
168
|
+
var l, p;
|
|
169
|
+
const d = u.getAttribute("recommendation-id");
|
|
170
|
+
d && ((l = u.parentNode) == null || l.insertBefore(e.createComment("REC_START"), u), (p = u.parentNode) == null || p.insertBefore(e.createComment("REC_END"), u.nextSibling), u.querySelectorAll('[data-visibility="0"]').forEach((h) => h.remove()), s(d), w(u) || O(u, d, i), T(u));
|
|
171
|
+
}), B(r, e).replaceAll("<!--{%", "{%").replaceAll("%}-->", "%}").replaceAll("<!--{%", "{%").replaceAll("%}-->", "%}");
|
|
177
172
|
}
|
|
178
173
|
export {
|
|
179
|
-
|
|
180
|
-
|
|
174
|
+
P as formatPriceVariable,
|
|
175
|
+
G as prepareRecommendationBlocks
|
|
181
176
|
};
|