@askdialog/dialog-vue 3.8.0 → 3.10.0
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/README.md +8 -9
- package/dist/components/DialogProductBlock/DialogAskSomethingElse.vue.d.ts +11 -0
- package/dist/components/DialogProductBlock/DialogProductBlock.vue.d.ts +1 -0
- package/dist/components/DialogProductBlock/inputMessages.d.ts +1 -0
- package/dist/components/DialogSearch/DialogSearchProductCard.vue.d.ts +2 -2
- package/dist/components/DialogSearch/DialogSearchProducts.vue.d.ts +2 -2
- package/dist/components/DialogSearch/searchDisplay.d.ts +8 -3
- package/dist/components/DialogSearch/useDialogSearch.d.ts +4 -4
- package/dist/dialog-vue.css +1 -1
- package/dist/dialog-vue.js +532 -487
- package/dist/dialog-vue.umd.cjs +3 -3
- package/package.json +3 -3
package/dist/dialog-vue.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var
|
|
2
|
-
var ye = (t, e, s) => e in t ?
|
|
1
|
+
var Ee = Object.defineProperty;
|
|
2
|
+
var ye = (t, e, s) => e in t ? Ee(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
|
|
3
3
|
var z = (t, e, s) => ye(t, typeof e != "symbol" ? e + "" : e, s);
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
const
|
|
4
|
+
import { defineComponent as I, createElementBlock as _, openBlock as u, toDisplayString as y, unref as H, createElementVNode as l, Fragment as N, renderList as W, createVNode as T, createBlock as P, ref as R, computed as b, withDirectives as ie, withKeys as Ie, vModelText as ae, onMounted as K, watch as M, renderSlot as we, withCtx as le, withModifiers as $e, createCommentVNode as L, resolveDynamicComponent as ke, mergeProps as Te, toHandlers as Re, createTextVNode as ce, onUnmounted as de, Teleport as Ae, normalizeStyle as Le, normalizeClass as Z, shallowRef as xe } from "vue";
|
|
5
|
+
const De = /* @__PURE__ */ new Set(["ar", "he", "iw", "fa", "ur"]), Pe = (t) => t !== void 0 && De.has(t.trim().toLowerCase().slice(0, 2)), Oe = (t) => Pe(t) ? "rtl" : "ltr";
|
|
6
6
|
var q;
|
|
7
7
|
(function(t) {
|
|
8
8
|
t.OPEN_ASSISTANT = "open_assistant", t.OPEN_WITH_SUGGESTIONS = "OPEN_WITH_SUGGESTIONS", t.CLOSE_ASSISTANT = "close_assistant", t.SEND_MESSAGE = "PRODUCT_QUESTION", t.SEND_GENERIC_QUESTION = "GENERIC_QUESTION", t.TRACK_ADD_TO_CART = "TRACK_ADD_TO_CART", t.TRACK_SUBMIT_CHECKOUT = "TRACK_SUBMIT_CHECKOUT", t.TRACK_VIEW_SEARCH_RESULTS = "TRACK_VIEW_SEARCH_RESULTS", t.TRACK_SELECT_SEARCH_RESULT = "TRACK_SELECT_SEARCH_RESULT";
|
|
@@ -12,7 +12,7 @@ var J;
|
|
|
12
12
|
t.USER_OPENED_ASSISTANT = "userOpenedAssistant", t.USER_CLOSED_ASSISTANT = "userClosedAssistant", t.USER_SENT_MESSAGE = "userSentMessage", t.USER_CLICKED_ON_PRODUCT_CARD = "userClickedOnProductCard", t.USER_OPENED_RECOMMENDATION = "userOpenedRecommendation", t.USER_ADDED_TO_CART = "userAddedToCart", t.USER_SEND_POSITIVE_FEEDBACK = "userSendPositiveFeedback", t.USER_SEND_NEGATIVE_FEEDBACK = "userSendNegativeFeedback";
|
|
13
13
|
})(J || (J = {}));
|
|
14
14
|
q.TRACK_ADD_TO_CART, q.TRACK_SUBMIT_CHECKOUT, q.TRACK_VIEW_SEARCH_RESULTS, q.TRACK_SELECT_SEARCH_RESULT;
|
|
15
|
-
class
|
|
15
|
+
class Ne extends Error {
|
|
16
16
|
constructor({ status: s, code: o, message: r }) {
|
|
17
17
|
super(r);
|
|
18
18
|
z(this, "status");
|
|
@@ -23,11 +23,11 @@ class Oe extends Error {
|
|
|
23
23
|
const X = (t, e, s) => {
|
|
24
24
|
if (!/^[a-z]{2}$/.test(e))
|
|
25
25
|
throw new Error("Search language must be a lowercase ISO 639-1 code.");
|
|
26
|
-
if (!/^[A-Za-z]{
|
|
27
|
-
throw new Error("Search
|
|
26
|
+
if (!/^[A-Za-z]{2}$/.test(s))
|
|
27
|
+
throw new Error("Search country must be an ISO 3166-1 alpha-2 code.");
|
|
28
28
|
return `${t}_${e}_${s.toLowerCase()}`;
|
|
29
|
-
}, ee = "multiple installation methods detected:",
|
|
30
|
-
const t =
|
|
29
|
+
}, ee = "multiple installation methods detected:", qe = () => typeof window > "u" ? void 0 : window, ue = () => {
|
|
30
|
+
const t = qe();
|
|
31
31
|
if (t !== void 0)
|
|
32
32
|
return t.dialog = t.dialog ?? {}, t.dialog.audit = t.dialog.audit ?? {
|
|
33
33
|
methods: [],
|
|
@@ -35,100 +35,101 @@ const X = (t, e, s) => {
|
|
|
35
35
|
capabilities: [],
|
|
36
36
|
warnings: []
|
|
37
37
|
}, t.dialog.audit;
|
|
38
|
-
},
|
|
38
|
+
}, Me = (t) => {
|
|
39
39
|
if (t.warnings = t.warnings.filter((e) => !e.startsWith(ee)), t.methods.length >= 2) {
|
|
40
40
|
const e = t.methods.map((s) => s.method).join(", ");
|
|
41
41
|
t.warnings.push(`${ee} ${e}`);
|
|
42
42
|
}
|
|
43
|
-
},
|
|
43
|
+
}, Ue = (t, e) => e === void 0 ? t : {
|
|
44
44
|
version: (t == null ? void 0 : t.version) ?? e.version,
|
|
45
45
|
commit: (t == null ? void 0 : t.commit) ?? e.commit
|
|
46
46
|
}, pe = (t) => {
|
|
47
|
-
const e =
|
|
47
|
+
const e = ue();
|
|
48
48
|
if (e === void 0)
|
|
49
49
|
return;
|
|
50
50
|
const s = e.methods.find((o) => o.method === t.method);
|
|
51
51
|
if (s === void 0) {
|
|
52
|
-
e.methods.push({ ...t, registeredAt: (/* @__PURE__ */ new Date()).toISOString() }),
|
|
52
|
+
e.methods.push({ ...t, registeredAt: (/* @__PURE__ */ new Date()).toISOString() }), Me(e);
|
|
53
53
|
return;
|
|
54
54
|
}
|
|
55
|
-
s.version = s.version ?? t.version, s.build =
|
|
56
|
-
},
|
|
57
|
-
const e =
|
|
55
|
+
s.version = s.version ?? t.version, s.build = Ue(s.build, t.build), s.source = s.source ?? t.source;
|
|
56
|
+
}, He = (t) => {
|
|
57
|
+
const e = ue();
|
|
58
58
|
e !== void 0 && (e.capabilities.includes(t) || e.capabilities.push(t));
|
|
59
|
-
},
|
|
59
|
+
}, A = {
|
|
60
60
|
IDLE: "idle",
|
|
61
61
|
LOADING: "loading",
|
|
62
62
|
SUCCESS: "success",
|
|
63
63
|
/** Successful request with zero hits. */
|
|
64
64
|
EMPTY: "empty",
|
|
65
65
|
ERROR: "error"
|
|
66
|
-
},
|
|
67
|
-
function
|
|
68
|
-
let n,
|
|
69
|
-
const
|
|
70
|
-
let
|
|
71
|
-
const
|
|
72
|
-
clearTimeout(
|
|
73
|
-
},
|
|
66
|
+
}, Ve = 0.5, Be = 500, Ke = 1500, Fe = 100;
|
|
67
|
+
function ze({ emit: t, visibilityThreshold: e = Ve, dwellMs: s = Be, idleFlushMs: o = Ke, maxItemsPerEvent: r = Fe }) {
|
|
68
|
+
let n, a = [];
|
|
69
|
+
const i = /* @__PURE__ */ new Set(), p = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map();
|
|
70
|
+
let C;
|
|
71
|
+
const d = () => {
|
|
72
|
+
clearTimeout(C), !(n === void 0 || a.length === 0) && (t({ ...n, items: a }), a = []);
|
|
73
|
+
}, f = (S) => {
|
|
74
74
|
if (n === void 0)
|
|
75
75
|
return;
|
|
76
|
-
const
|
|
77
|
-
if (!
|
|
78
|
-
if (
|
|
79
|
-
|
|
76
|
+
const m = `${n.query_id}:${S.product_id}`;
|
|
77
|
+
if (!i.has(m)) {
|
|
78
|
+
if (i.add(m), a.push(S), a.length >= r) {
|
|
79
|
+
d();
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
|
-
clearTimeout(
|
|
82
|
+
clearTimeout(C), C = setTimeout(d, o);
|
|
83
83
|
}
|
|
84
|
-
},
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
},
|
|
88
|
-
for (const
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
c.delete(
|
|
92
|
-
}, s)) :
|
|
84
|
+
}, v = (S) => {
|
|
85
|
+
const m = c.get(S);
|
|
86
|
+
m !== void 0 && (clearTimeout(m), c.delete(S));
|
|
87
|
+
}, g = new IntersectionObserver((S) => {
|
|
88
|
+
for (const m of S) {
|
|
89
|
+
const h = p.get(m.target);
|
|
90
|
+
h !== void 0 && (m.intersectionRatio >= e ? c.has(m.target) || c.set(m.target, setTimeout(() => {
|
|
91
|
+
c.delete(m.target), f(h);
|
|
92
|
+
}, s)) : v(m.target));
|
|
93
93
|
}
|
|
94
|
-
}, { threshold: e }),
|
|
95
|
-
|
|
96
|
-
for (const
|
|
97
|
-
clearTimeout(
|
|
98
|
-
c.clear(),
|
|
94
|
+
}, { threshold: e }), w = () => {
|
|
95
|
+
g.disconnect();
|
|
96
|
+
for (const S of c.values())
|
|
97
|
+
clearTimeout(S);
|
|
98
|
+
c.clear(), p.clear();
|
|
99
99
|
}, $ = () => {
|
|
100
|
-
|
|
101
|
-
},
|
|
102
|
-
if (
|
|
103
|
-
|
|
104
|
-
for (const
|
|
105
|
-
|
|
100
|
+
d();
|
|
101
|
+
}, k = (S) => {
|
|
102
|
+
if (S.persisted) {
|
|
103
|
+
i.clear();
|
|
104
|
+
for (const m of p.keys())
|
|
105
|
+
v(m), g.unobserve(m), g.observe(m);
|
|
106
106
|
}
|
|
107
107
|
};
|
|
108
|
-
return window.addEventListener("pagehide", $), window.addEventListener("pageshow",
|
|
109
|
-
setContext(
|
|
110
|
-
|
|
108
|
+
return window.addEventListener("pagehide", $), window.addEventListener("pageshow", k), {
|
|
109
|
+
setContext(S) {
|
|
110
|
+
d(), i.clear(), n = S, w();
|
|
111
111
|
},
|
|
112
|
-
observe(
|
|
113
|
-
|
|
112
|
+
observe(S, m) {
|
|
113
|
+
p.set(S, m), g.observe(S);
|
|
114
114
|
},
|
|
115
|
-
forceImpression(
|
|
116
|
-
|
|
115
|
+
forceImpression(S) {
|
|
116
|
+
f(S), d();
|
|
117
117
|
},
|
|
118
|
-
flush:
|
|
118
|
+
flush: d,
|
|
119
119
|
disconnect() {
|
|
120
|
-
|
|
120
|
+
d(), w(), window.removeEventListener("pagehide", $), window.removeEventListener("pageshow", k);
|
|
121
121
|
}
|
|
122
122
|
};
|
|
123
123
|
}
|
|
124
124
|
const te = (t, e) => ({
|
|
125
|
-
|
|
125
|
+
// `objectID` is the variant id; analytics count products.
|
|
126
|
+
product_id: String(t.hits[e].id),
|
|
126
127
|
// One-based position across all pages.
|
|
127
128
|
position: t.page * t.hitsPerPage + e + 1
|
|
128
129
|
});
|
|
129
|
-
function
|
|
130
|
+
function Ge(t) {
|
|
130
131
|
let e, s;
|
|
131
|
-
const o = () => (e ?? (e =
|
|
132
|
+
const o = () => (e ?? (e = ze({
|
|
132
133
|
emit: t.trackViewSearchResults
|
|
133
134
|
})), e);
|
|
134
135
|
return {
|
|
@@ -144,14 +145,14 @@ function ze(t) {
|
|
|
144
145
|
query_length: [...r.query].length
|
|
145
146
|
}, o().setContext(s), r.nbHits === 0 && t.trackViewSearchResults({ ...s, items: [] });
|
|
146
147
|
},
|
|
147
|
-
observeResult(r, n,
|
|
148
|
-
o().observe(r, te(n,
|
|
148
|
+
observeResult(r, n, a) {
|
|
149
|
+
o().observe(r, te(n, a));
|
|
149
150
|
},
|
|
150
151
|
select(r, n) {
|
|
151
152
|
if (s === void 0)
|
|
152
153
|
return;
|
|
153
|
-
const
|
|
154
|
-
o().forceImpression(
|
|
154
|
+
const a = te(r, n);
|
|
155
|
+
o().forceImpression(a), t.trackSelectSearchResult({ ...s, items: [a] });
|
|
155
156
|
},
|
|
156
157
|
dispose() {
|
|
157
158
|
e == null || e.disconnect();
|
|
@@ -161,138 +162,192 @@ function ze(t) {
|
|
|
161
162
|
const je = 2, se = (t) => {
|
|
162
163
|
const e = t.trim();
|
|
163
164
|
return [...e].length >= je ? e : void 0;
|
|
164
|
-
},
|
|
165
|
+
}, Qe = (t, e, s, { indexName: o, language: r, country: n, hitsPerPage: a }) => ({
|
|
165
166
|
requests: [
|
|
166
|
-
{ indexName: o, query: t, page: e, hitsPerPage:
|
|
167
|
-
...s.map((
|
|
168
|
-
indexName: X(
|
|
167
|
+
{ indexName: o, query: t, page: e, hitsPerPage: a },
|
|
168
|
+
...s.map((i) => ({
|
|
169
|
+
indexName: X(i.index, r, n),
|
|
169
170
|
query: t,
|
|
170
171
|
page: 0,
|
|
171
|
-
hitsPerPage:
|
|
172
|
+
hitsPerPage: i.hitsPerPage ?? a
|
|
172
173
|
}))
|
|
173
174
|
]
|
|
174
|
-
}), We = (t, e, { indexName: s, language: o,
|
|
175
|
-
const n = t.results.find((
|
|
175
|
+
}), We = (t, e, { indexName: s, language: o, country: r }) => {
|
|
176
|
+
const n = t.results.find((i) => i.index === s);
|
|
176
177
|
if (n === void 0)
|
|
177
178
|
throw new Error(`Dialog search returned no ${s} entry`);
|
|
178
|
-
const
|
|
179
|
-
for (const
|
|
180
|
-
const
|
|
181
|
-
c !== void 0 && (i
|
|
179
|
+
const a = {};
|
|
180
|
+
for (const i of e) {
|
|
181
|
+
const p = X(i.index, o, r), c = t.results.find((C) => C.index === p);
|
|
182
|
+
c !== void 0 && (a[i.index] = c);
|
|
182
183
|
}
|
|
183
184
|
return {
|
|
185
|
+
// The products index answers product records only.
|
|
184
186
|
response: n,
|
|
185
|
-
sections: e.length === 0 ? void 0 :
|
|
187
|
+
sections: e.length === 0 ? void 0 : a
|
|
186
188
|
};
|
|
187
|
-
},
|
|
188
|
-
status:
|
|
189
|
+
}, G = {
|
|
190
|
+
status: A.IDLE,
|
|
189
191
|
query: "",
|
|
190
192
|
page: 0,
|
|
191
193
|
response: void 0,
|
|
192
194
|
sections: void 0,
|
|
193
195
|
error: void 0
|
|
194
196
|
};
|
|
195
|
-
function
|
|
196
|
-
const
|
|
197
|
+
function Xe({ search: t, language: e, country: s, analytics: o, navigate: r, debounceMs: n = 250, hitsPerPage: a = 12, sections: i = [] }) {
|
|
198
|
+
const p = {
|
|
197
199
|
indexName: X("products", e, s),
|
|
198
200
|
language: e,
|
|
199
|
-
|
|
200
|
-
hitsPerPage:
|
|
201
|
+
country: s,
|
|
202
|
+
hitsPerPage: a
|
|
201
203
|
};
|
|
202
|
-
let c =
|
|
203
|
-
const
|
|
204
|
-
let
|
|
205
|
-
const
|
|
206
|
-
c = { ...c, ...
|
|
207
|
-
for (const
|
|
208
|
-
|
|
209
|
-
},
|
|
210
|
-
clearTimeout(
|
|
211
|
-
},
|
|
212
|
-
|
|
213
|
-
const
|
|
214
|
-
|
|
204
|
+
let c = G;
|
|
205
|
+
const C = /* @__PURE__ */ new Set(), d = Ge(o);
|
|
206
|
+
let f, v, g, w = 0, $ = !1;
|
|
207
|
+
const k = (h) => {
|
|
208
|
+
c = { ...c, ...h };
|
|
209
|
+
for (const E of C)
|
|
210
|
+
E(c);
|
|
211
|
+
}, S = () => {
|
|
212
|
+
clearTimeout(f), v = void 0, w += 1, g == null || g.abort(), g = void 0;
|
|
213
|
+
}, m = async (h, E) => {
|
|
214
|
+
S(), g = new AbortController();
|
|
215
|
+
const O = w;
|
|
216
|
+
k({ status: A.LOADING, query: h, page: E });
|
|
215
217
|
try {
|
|
216
|
-
const
|
|
217
|
-
signal:
|
|
218
|
+
const D = typeof i == "function" ? i() : i, Y = Qe(h, E, D, p), Ce = await t(Y, {
|
|
219
|
+
signal: g.signal
|
|
218
220
|
});
|
|
219
|
-
if (
|
|
221
|
+
if (O !== w)
|
|
220
222
|
return;
|
|
221
|
-
const F = We(
|
|
222
|
-
|
|
223
|
+
const F = We(Ce, D, p);
|
|
224
|
+
d.onResponse(F.response), k({
|
|
223
225
|
...F,
|
|
224
|
-
status: F.response.nbHits === 0 ?
|
|
226
|
+
status: F.response.nbHits === 0 ? A.EMPTY : A.SUCCESS,
|
|
225
227
|
error: void 0
|
|
226
228
|
});
|
|
227
|
-
} catch (
|
|
228
|
-
if (
|
|
229
|
+
} catch (D) {
|
|
230
|
+
if (D instanceof DOMException && D.name === "AbortError" || O !== w)
|
|
229
231
|
return;
|
|
230
|
-
|
|
231
|
-
status:
|
|
232
|
-
error:
|
|
232
|
+
k({
|
|
233
|
+
status: A.ERROR,
|
|
234
|
+
error: D,
|
|
233
235
|
response: void 0,
|
|
234
236
|
sections: void 0
|
|
235
237
|
});
|
|
236
238
|
}
|
|
237
239
|
};
|
|
238
240
|
return {
|
|
239
|
-
setQuery(
|
|
241
|
+
setQuery(h) {
|
|
240
242
|
if ($)
|
|
241
243
|
return;
|
|
242
|
-
|
|
243
|
-
const
|
|
244
|
-
if (
|
|
245
|
-
|
|
244
|
+
S();
|
|
245
|
+
const E = se(h);
|
|
246
|
+
if (E === void 0) {
|
|
247
|
+
k(G);
|
|
246
248
|
return;
|
|
247
249
|
}
|
|
248
|
-
|
|
250
|
+
v = E, f = setTimeout(() => void m(E, 0), n);
|
|
249
251
|
},
|
|
250
|
-
submit(
|
|
252
|
+
submit(h) {
|
|
251
253
|
if ($)
|
|
252
254
|
return;
|
|
253
|
-
|
|
254
|
-
const
|
|
255
|
-
if (
|
|
256
|
-
|
|
255
|
+
S();
|
|
256
|
+
const E = se(h);
|
|
257
|
+
if (E === void 0) {
|
|
258
|
+
k(G);
|
|
257
259
|
return;
|
|
258
260
|
}
|
|
259
|
-
|
|
261
|
+
m(E, 0);
|
|
260
262
|
},
|
|
261
|
-
setPage(
|
|
263
|
+
setPage(h) {
|
|
262
264
|
if (!$) {
|
|
263
|
-
if (
|
|
264
|
-
v
|
|
265
|
+
if (v !== void 0) {
|
|
266
|
+
m(v, 0);
|
|
265
267
|
return;
|
|
266
268
|
}
|
|
267
|
-
c.query !== "" &&
|
|
269
|
+
c.query !== "" && m(c.query, h);
|
|
268
270
|
}
|
|
269
271
|
},
|
|
270
272
|
retry() {
|
|
271
|
-
$ || c.status !==
|
|
273
|
+
$ || c.status !== A.ERROR || m(c.query, c.page);
|
|
272
274
|
},
|
|
273
|
-
observeResult(
|
|
274
|
-
c.response !== void 0 &&
|
|
275
|
+
observeResult(h, E) {
|
|
276
|
+
c.response !== void 0 && d.observeResult(h, c.response, E);
|
|
275
277
|
},
|
|
276
|
-
selectResult(
|
|
277
|
-
const
|
|
278
|
-
if (
|
|
278
|
+
selectResult(h, E) {
|
|
279
|
+
const O = c.response;
|
|
280
|
+
if (O === void 0)
|
|
279
281
|
return !1;
|
|
280
|
-
|
|
281
|
-
const
|
|
282
|
-
return ((
|
|
282
|
+
d.select(O, h);
|
|
283
|
+
const D = O.hits[h].url;
|
|
284
|
+
return ((E == null ? void 0 : E.navigate) ?? !0) && r !== void 0 && D !== void 0 ? (r(D, O.hits[h]), !0) : !1;
|
|
283
285
|
},
|
|
284
|
-
subscribe(
|
|
285
|
-
return
|
|
286
|
-
|
|
286
|
+
subscribe(h) {
|
|
287
|
+
return C.add(h), () => {
|
|
288
|
+
C.delete(h);
|
|
287
289
|
};
|
|
288
290
|
},
|
|
289
291
|
getState: () => c,
|
|
290
292
|
dispose() {
|
|
291
|
-
$ = !0,
|
|
293
|
+
$ = !0, S(), C.clear(), d.dispose();
|
|
292
294
|
}
|
|
293
295
|
};
|
|
294
296
|
}
|
|
295
|
-
const
|
|
297
|
+
const oe = {
|
|
298
|
+
en: {
|
|
299
|
+
placeholder: "Ask the AI a question",
|
|
300
|
+
aiDisclosure: "You're chatting with an AI assistant. It can make mistakes, so please double-check important information",
|
|
301
|
+
askSomethingElse: "Ask something else"
|
|
302
|
+
},
|
|
303
|
+
fr: {
|
|
304
|
+
placeholder: "Posez une question à l'IA",
|
|
305
|
+
aiDisclosure: "Vous discutez avec un assistant IA. Il peut se tromper, pensez à vérifier les informations importantes",
|
|
306
|
+
askSomethingElse: "Posez une autre question"
|
|
307
|
+
},
|
|
308
|
+
es: {
|
|
309
|
+
placeholder: "Haz una pregunta a la IA",
|
|
310
|
+
aiDisclosure: "Estás chateando con un asistente de IA. Puede cometer errores, así que verifica la información importante",
|
|
311
|
+
askSomethingElse: "Pregunta otra cosa"
|
|
312
|
+
}
|
|
313
|
+
}, he = (t) => {
|
|
314
|
+
var s;
|
|
315
|
+
const e = ((s = t == null ? void 0 : t.split("-")[0]) == null ? void 0 : s.toLowerCase()) ?? "en";
|
|
316
|
+
return oe[e] ?? oe.en;
|
|
317
|
+
}, Ye = ["disabled"], Ze = /* @__PURE__ */ I({
|
|
318
|
+
__name: "DialogAskSomethingElse",
|
|
319
|
+
props: {
|
|
320
|
+
client: {},
|
|
321
|
+
questions: {},
|
|
322
|
+
disabled: { type: Boolean },
|
|
323
|
+
productId: {},
|
|
324
|
+
productTitle: {},
|
|
325
|
+
selectedVariantId: {}
|
|
326
|
+
},
|
|
327
|
+
setup(t) {
|
|
328
|
+
const e = t, s = () => {
|
|
329
|
+
e.client.openAssistantWithSuggestions({
|
|
330
|
+
questions: e.questions ?? [],
|
|
331
|
+
product: {
|
|
332
|
+
id: e.productId,
|
|
333
|
+
title: e.productTitle,
|
|
334
|
+
selectedVariantId: e.selectedVariantId
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
};
|
|
338
|
+
return (o, r) => (u(), _("button", {
|
|
339
|
+
type: "button",
|
|
340
|
+
class: "dialog-ask-something-else",
|
|
341
|
+
disabled: e.disabled,
|
|
342
|
+
onClick: s
|
|
343
|
+
}, y(H(he)(e.client.locale).askSomethingElse), 9, Ye));
|
|
344
|
+
}
|
|
345
|
+
}), x = (t, e) => {
|
|
346
|
+
const s = t.__vccOpts || t;
|
|
347
|
+
for (const [o, r] of e)
|
|
348
|
+
s[o] = r;
|
|
349
|
+
return s;
|
|
350
|
+
}, Je = /* @__PURE__ */ x(Ze, [["__scopeId", "data-v-d0e272a0"]]), et = { class: "dialog-block-header-container" }, tt = { class: "dialog-block-title" }, st = { class: "dialog-block-description" }, ot = /* @__PURE__ */ I({
|
|
296
351
|
__name: "DialogBlockHeader",
|
|
297
352
|
props: {
|
|
298
353
|
title: {},
|
|
@@ -300,31 +355,26 @@ const Xe = { class: "dialog-block-header-container" }, Ye = { class: "dialog-blo
|
|
|
300
355
|
},
|
|
301
356
|
setup(t) {
|
|
302
357
|
const e = t;
|
|
303
|
-
return (s, o) => (u(), _("div",
|
|
304
|
-
l("div",
|
|
305
|
-
l("div",
|
|
358
|
+
return (s, o) => (u(), _("div", et, [
|
|
359
|
+
l("div", tt, y(e.title ?? "Your expert"), 1),
|
|
360
|
+
l("div", st, y(e.description ?? "A question about this product?"), 1)
|
|
306
361
|
]));
|
|
307
362
|
}
|
|
308
|
-
}),
|
|
309
|
-
const s = t.__vccOpts || t;
|
|
310
|
-
for (const [o, r] of e)
|
|
311
|
-
s[o] = r;
|
|
312
|
-
return s;
|
|
313
|
-
}, et = /* @__PURE__ */ D(Je, [["__scopeId", "data-v-28e6dda7"]]), tt = {
|
|
363
|
+
}), nt = /* @__PURE__ */ x(ot, [["__scopeId", "data-v-28e6dda7"]]), rt = {
|
|
314
364
|
width: "20",
|
|
315
365
|
height: "20",
|
|
316
366
|
viewBox: "0 0 20 20",
|
|
317
367
|
fill: "none",
|
|
318
368
|
xmlns: "http://www.w3.org/2000/svg"
|
|
319
|
-
},
|
|
369
|
+
}, it = { "clip-path": "url(#clip0_466_934)" }, at = ["stroke"], lt = ["stroke"], ct = /* @__PURE__ */ I({
|
|
320
370
|
__name: "AiStarsIcon",
|
|
321
371
|
props: {
|
|
322
372
|
color: {}
|
|
323
373
|
},
|
|
324
374
|
setup(t) {
|
|
325
375
|
const e = t;
|
|
326
|
-
return (s, o) => (u(), _("svg",
|
|
327
|
-
l("g",
|
|
376
|
+
return (s, o) => (u(), _("svg", rt, [
|
|
377
|
+
l("g", it, [
|
|
328
378
|
l("path", {
|
|
329
379
|
d: `M5.41675 10.8333L6.07046 12.1408C6.2917 12.5832 6.40232 12.8045 6.55011
|
|
330
380
|
12.9962C6.68124 13.1663 6.83375 13.3188 7.00388 13.45C7.19559 13.5977 7.41684
|
|
@@ -340,7 +390,7 @@ const Xe = { class: "dialog-block-header-container" }, Ye = { class: "dialog-blo
|
|
|
340
390
|
"stroke-width": "1.5",
|
|
341
391
|
"stroke-linecap": "round",
|
|
342
392
|
"stroke-linejoin": "round"
|
|
343
|
-
}, null, 8,
|
|
393
|
+
}, null, 8, at),
|
|
344
394
|
l("path", {
|
|
345
395
|
d: `M12.5001 1.66666L13.4823 4.22034C13.7173 4.83136 13.8348 5.13688 14.0175
|
|
346
396
|
5.39386C14.1795 5.62162 14.3785 5.82061 14.6062 5.98256C14.8632 6.16529 15.1687
|
|
@@ -356,7 +406,7 @@ const Xe = { class: "dialog-block-header-container" }, Ye = { class: "dialog-blo
|
|
|
356
406
|
"stroke-width": "1.5",
|
|
357
407
|
"stroke-linecap": "round",
|
|
358
408
|
"stroke-linejoin": "round"
|
|
359
|
-
}, null, 8,
|
|
409
|
+
}, null, 8, lt)
|
|
360
410
|
]),
|
|
361
411
|
o[0] || (o[0] = l("defs", null, [
|
|
362
412
|
l("clipPath", { id: "clip0_466_934" }, [
|
|
@@ -369,7 +419,7 @@ const Xe = { class: "dialog-block-header-container" }, Ye = { class: "dialog-blo
|
|
|
369
419
|
], -1))
|
|
370
420
|
]));
|
|
371
421
|
}
|
|
372
|
-
}),
|
|
422
|
+
}), dt = ["onClick"], ut = { class: "dialog-block-suggestions-item-label" }, pt = /* @__PURE__ */ I({
|
|
373
423
|
__name: "DialogBlockSuggestions",
|
|
374
424
|
props: {
|
|
375
425
|
client: {},
|
|
@@ -388,27 +438,27 @@ const Xe = { class: "dialog-block-header-container" }, Ye = { class: "dialog-blo
|
|
|
388
438
|
fromQuestionSuggestion: !0
|
|
389
439
|
});
|
|
390
440
|
};
|
|
391
|
-
return (o, r) => (u(!0), _(N, null,
|
|
441
|
+
return (o, r) => (u(!0), _(N, null, W(e.questions, (n) => (u(), _("button", {
|
|
392
442
|
key: n.question,
|
|
393
443
|
class: "dialog-block-suggestions-item",
|
|
394
|
-
onClick: (
|
|
444
|
+
onClick: (a) => s(n.question)
|
|
395
445
|
}, [
|
|
396
|
-
T(
|
|
446
|
+
T(ct, {
|
|
397
447
|
class: "dialog-block-suggestions-item-icon",
|
|
398
448
|
color: e.client.theme.primaryColor
|
|
399
449
|
}, null, 8, ["color"]),
|
|
400
|
-
l("span",
|
|
401
|
-
], 8,
|
|
450
|
+
l("span", ut, y(n.question), 1)
|
|
451
|
+
], 8, dt))), 128));
|
|
402
452
|
}
|
|
403
|
-
}),
|
|
404
|
-
function
|
|
453
|
+
}), ht = /* @__PURE__ */ x(pt, [["__scopeId", "data-v-db34d4b4"]]), _t = {};
|
|
454
|
+
function gt(t, e) {
|
|
405
455
|
return u(), _(N, null, [
|
|
406
456
|
e[0] || (e[0] = l("div", { class: "dialog-block-suggestions-skeleton-item" }, null, -1)),
|
|
407
457
|
e[1] || (e[1] = l("div", { class: "dialog-block-suggestions-skeleton-item" }, null, -1)),
|
|
408
458
|
e[2] || (e[2] = l("div", { class: "dialog-block-suggestions-skeleton-item" }, null, -1))
|
|
409
459
|
], 64);
|
|
410
460
|
}
|
|
411
|
-
const
|
|
461
|
+
const ft = /* @__PURE__ */ x(_t, [["render", gt], ["__scopeId", "data-v-26a64b58"]]), vt = { class: "dialog-block-suggestions-container" }, mt = /* @__PURE__ */ I({
|
|
412
462
|
__name: "DialogBlockSuggestionsContainer",
|
|
413
463
|
props: {
|
|
414
464
|
client: {},
|
|
@@ -420,8 +470,8 @@ const pt = /* @__PURE__ */ D(ut, [["render", dt], ["__scopeId", "data-v-26a64b58
|
|
|
420
470
|
},
|
|
421
471
|
setup(t) {
|
|
422
472
|
const e = t;
|
|
423
|
-
return (s, o) => (u(), _("div",
|
|
424
|
-
e.isLoading || !e.questions ? (u(),
|
|
473
|
+
return (s, o) => (u(), _("div", vt, [
|
|
474
|
+
e.isLoading || !e.questions ? (u(), P(ft, { key: 0 })) : (u(), P(ht, {
|
|
425
475
|
key: 1,
|
|
426
476
|
client: e.client,
|
|
427
477
|
questions: e.questions,
|
|
@@ -431,50 +481,33 @@ const pt = /* @__PURE__ */ D(ut, [["render", dt], ["__scopeId", "data-v-26a64b58
|
|
|
431
481
|
}, null, 8, ["client", "questions", "product-id", "product-title", "selected-variant-id"]))
|
|
432
482
|
]));
|
|
433
483
|
}
|
|
434
|
-
}),
|
|
484
|
+
}), bt = /* @__PURE__ */ x(mt, [["__scopeId", "data-v-18c9e78b"]]), St = {
|
|
435
485
|
width: "20",
|
|
436
486
|
height: "20",
|
|
437
487
|
viewBox: "0 0 20 20",
|
|
438
488
|
fill: "none",
|
|
439
489
|
xmlns: "http://www.w3.org/2000/svg"
|
|
440
|
-
},
|
|
490
|
+
}, Ct = ["stroke"], Et = /* @__PURE__ */ I({
|
|
441
491
|
__name: "ArrowIcon",
|
|
442
492
|
props: {
|
|
443
493
|
color: {}
|
|
444
494
|
},
|
|
445
495
|
setup(t) {
|
|
446
496
|
const e = t;
|
|
447
|
-
return (s, o) => (u(), _("svg",
|
|
497
|
+
return (s, o) => (u(), _("svg", St, [
|
|
448
498
|
l("path", {
|
|
449
499
|
d: "M10 16.6667V3.33334M10 3.33334L5 8.33334M10 3.33334L15 8.33334",
|
|
450
500
|
stroke: e.color || "#ffffff",
|
|
451
501
|
"stroke-width": "1.5",
|
|
452
502
|
"stroke-linecap": "round",
|
|
453
503
|
"stroke-linejoin": "round"
|
|
454
|
-
}, null, 8,
|
|
504
|
+
}, null, 8, Ct)
|
|
455
505
|
]));
|
|
456
506
|
}
|
|
457
|
-
}),
|
|
458
|
-
en: {
|
|
459
|
-
placeholder: "Ask the AI a question",
|
|
460
|
-
aiDisclosure: "You're chatting with an AI assistant. It can make mistakes, so please double-check important information"
|
|
461
|
-
},
|
|
462
|
-
fr: {
|
|
463
|
-
placeholder: "Posez une question à l'IA",
|
|
464
|
-
aiDisclosure: "Vous discutez avec un assistant IA. Il peut se tromper, pensez à vérifier les informations importantes"
|
|
465
|
-
},
|
|
466
|
-
es: {
|
|
467
|
-
placeholder: "Haz una pregunta a la IA",
|
|
468
|
-
aiDisclosure: "Estás chateando con un asistente de IA. Puede cometer errores, así que verifica la información importante"
|
|
469
|
-
}
|
|
470
|
-
}, bt = (t) => {
|
|
471
|
-
var s;
|
|
472
|
-
const e = ((s = t == null ? void 0 : t.split("-")[0]) == null ? void 0 : s.toLowerCase()) ?? "en";
|
|
473
|
-
return oe[e] ?? oe.en;
|
|
474
|
-
}, St = { class: "dialog-input-container" }, Ct = ["placeholder"], yt = ["disabled"], Et = {
|
|
507
|
+
}), yt = { class: "dialog-input-container" }, It = ["placeholder"], wt = ["disabled"], $t = {
|
|
475
508
|
id: "dialog-input-ai-disclosure",
|
|
476
509
|
class: "dialog-input-ai-disclosure"
|
|
477
|
-
},
|
|
510
|
+
}, kt = /* @__PURE__ */ I({
|
|
478
511
|
__name: "DialogInput",
|
|
479
512
|
props: {
|
|
480
513
|
client: {},
|
|
@@ -484,87 +517,87 @@ const pt = /* @__PURE__ */ D(ut, [["render", dt], ["__scopeId", "data-v-26a64b58
|
|
|
484
517
|
selectedVariantId: {}
|
|
485
518
|
},
|
|
486
519
|
setup(t) {
|
|
487
|
-
const e = t, s =
|
|
488
|
-
var
|
|
489
|
-
(
|
|
490
|
-
},
|
|
491
|
-
const
|
|
492
|
-
|
|
520
|
+
const e = t, s = R(), o = R(""), r = b(() => he(e.client.locale)), n = () => {
|
|
521
|
+
var i;
|
|
522
|
+
(i = s.value) == null || i.focus();
|
|
523
|
+
}, a = () => {
|
|
524
|
+
const i = o.value;
|
|
525
|
+
i.trim() && (e.client.sendProductMessage({
|
|
493
526
|
productId: e.productId,
|
|
494
527
|
productTitle: e.productTitle,
|
|
495
528
|
selectedVariantId: e.selectedVariantId,
|
|
496
|
-
question:
|
|
529
|
+
question: i,
|
|
497
530
|
fromQuestionSuggestion: !0
|
|
498
531
|
}), o.value = "");
|
|
499
532
|
};
|
|
500
|
-
return (
|
|
533
|
+
return (i, p) => (u(), _("div", yt, [
|
|
501
534
|
l("div", {
|
|
502
535
|
class: "dialog-input-wrapper",
|
|
503
536
|
onClick: n
|
|
504
537
|
}, [
|
|
505
|
-
|
|
538
|
+
ie(l("input", {
|
|
506
539
|
id: "dialog-ask-anything-input-ai-input",
|
|
507
540
|
ref_key: "inputRef",
|
|
508
541
|
ref: s,
|
|
509
|
-
"onUpdate:modelValue":
|
|
542
|
+
"onUpdate:modelValue": p[0] || (p[0] = (c) => o.value = c),
|
|
510
543
|
class: "dialog-ask-anything-input-ai-input",
|
|
511
544
|
placeholder: r.value.placeholder,
|
|
512
545
|
"aria-describedby": "dialog-input-ai-disclosure",
|
|
513
|
-
onKeydown:
|
|
514
|
-
}, null, 40,
|
|
515
|
-
[
|
|
546
|
+
onKeydown: Ie(a, ["enter"])
|
|
547
|
+
}, null, 40, It), [
|
|
548
|
+
[ae, o.value]
|
|
516
549
|
]),
|
|
517
550
|
l("button", {
|
|
518
551
|
id: "send-message-button-ai-input",
|
|
519
552
|
class: "dialog-input-submit",
|
|
520
553
|
disabled: !o.value.trim(),
|
|
521
|
-
onClick:
|
|
554
|
+
onClick: a
|
|
522
555
|
}, [
|
|
523
|
-
T(
|
|
556
|
+
T(Et, {
|
|
524
557
|
color: e.client.theme.ctaTextColor
|
|
525
558
|
}, null, 8, ["color"])
|
|
526
|
-
], 8,
|
|
559
|
+
], 8, wt)
|
|
527
560
|
]),
|
|
528
|
-
l("p",
|
|
561
|
+
l("p", $t, y(r.value.aiDisclosure), 1)
|
|
529
562
|
]));
|
|
530
563
|
}
|
|
531
|
-
}),
|
|
564
|
+
}), Tt = /* @__PURE__ */ x(kt, [["__scopeId", "data-v-87013888"]]), Rt = /* @__PURE__ */ I({
|
|
532
565
|
__name: "ThemeProvider",
|
|
533
566
|
props: {
|
|
534
567
|
theme: {}
|
|
535
568
|
},
|
|
536
569
|
setup(t) {
|
|
537
570
|
const e = t, s = document.body, o = (n) => n.replace(/([A-Z])/g, "-$1").toLowerCase(), r = (n) => {
|
|
538
|
-
n && Object.keys(n).forEach((
|
|
539
|
-
const
|
|
540
|
-
if (n[
|
|
541
|
-
if (typeof n[
|
|
542
|
-
Object.keys(n[
|
|
543
|
-
var
|
|
544
|
-
const
|
|
545
|
-
if (
|
|
546
|
-
const
|
|
571
|
+
n && Object.keys(n).forEach((a) => {
|
|
572
|
+
const i = a, p = o(a);
|
|
573
|
+
if (n[i] !== void 0) {
|
|
574
|
+
if (typeof n[i] == "object") {
|
|
575
|
+
Object.keys(n[i]).forEach((c) => {
|
|
576
|
+
var d;
|
|
577
|
+
const C = c;
|
|
578
|
+
if (C !== void 0) {
|
|
579
|
+
const f = o(c), v = n[i];
|
|
547
580
|
s.style.setProperty(
|
|
548
|
-
`--dialog-theme-${
|
|
549
|
-
(
|
|
581
|
+
`--dialog-theme-${p}-${f}`,
|
|
582
|
+
(d = v[C]) == null ? void 0 : d.toString()
|
|
550
583
|
);
|
|
551
584
|
}
|
|
552
585
|
});
|
|
553
586
|
return;
|
|
554
587
|
}
|
|
555
|
-
if (
|
|
556
|
-
const c = n[
|
|
557
|
-
s.style.setProperty(`--dialog-theme-${
|
|
588
|
+
if (i === "ctaBorderType") {
|
|
589
|
+
const c = n[i] === "rounded" ? "24px" : "0";
|
|
590
|
+
s.style.setProperty(`--dialog-theme-${p}`, c);
|
|
558
591
|
return;
|
|
559
592
|
}
|
|
560
593
|
s.style.setProperty(
|
|
561
|
-
`--dialog-theme-${
|
|
562
|
-
n[
|
|
594
|
+
`--dialog-theme-${p}`,
|
|
595
|
+
n[i].toString()
|
|
563
596
|
);
|
|
564
597
|
}
|
|
565
598
|
});
|
|
566
599
|
};
|
|
567
|
-
return
|
|
600
|
+
return K(() => {
|
|
568
601
|
e.theme && r(e.theme);
|
|
569
602
|
}), M(
|
|
570
603
|
() => e.theme,
|
|
@@ -572,49 +605,56 @@ const pt = /* @__PURE__ */ D(ut, [["render", dt], ["__scopeId", "data-v-26a64b58
|
|
|
572
605
|
n && r(n);
|
|
573
606
|
},
|
|
574
607
|
{ deep: !0 }
|
|
575
|
-
), (n,
|
|
608
|
+
), (n, a) => we(n.$slots, "default");
|
|
576
609
|
}
|
|
577
|
-
}),
|
|
610
|
+
}), At = ["dir"], Lt = 2, xt = 5, Dt = /* @__PURE__ */ I({
|
|
578
611
|
__name: "DialogProductBlock",
|
|
579
612
|
props: {
|
|
580
613
|
client: {},
|
|
581
614
|
productId: {},
|
|
582
615
|
productTitle: {},
|
|
583
616
|
selectedVariantId: { default: void 0 },
|
|
584
|
-
enableInput: { type: Boolean, default: !
|
|
617
|
+
enableInput: { type: Boolean, default: !1 }
|
|
585
618
|
},
|
|
586
619
|
setup(t) {
|
|
587
620
|
const e = t;
|
|
588
|
-
|
|
621
|
+
K(() => {
|
|
589
622
|
pe({
|
|
590
623
|
method: "vue",
|
|
591
|
-
version: "3.
|
|
592
|
-
}),
|
|
624
|
+
version: "3.10.0"
|
|
625
|
+
}), He("pdp-block");
|
|
593
626
|
});
|
|
594
|
-
const s =
|
|
627
|
+
const s = R(!0), o = R(void 0), r = R(0), n = b(() => {
|
|
595
628
|
var d;
|
|
596
629
|
return s.value ? "" : (d = o.value) == null ? void 0 : d.assistantName;
|
|
597
|
-
}),
|
|
630
|
+
}), a = b(() => {
|
|
598
631
|
var d;
|
|
599
632
|
return s.value ? "" : (d = o.value) == null ? void 0 : d.description;
|
|
600
|
-
}),
|
|
633
|
+
}), i = b(
|
|
634
|
+
() => {
|
|
635
|
+
var d, f;
|
|
636
|
+
return (f = (d = o.value) == null ? void 0 : d.questions) == null ? void 0 : f.slice(0, Lt);
|
|
637
|
+
}
|
|
638
|
+
), p = b(() => {
|
|
601
639
|
var d;
|
|
602
640
|
return s.value ? "" : (d = o.value) == null ? void 0 : d.inputPlaceholder;
|
|
603
|
-
}),
|
|
641
|
+
}), c = b(
|
|
604
642
|
() => {
|
|
605
643
|
var d;
|
|
606
|
-
return
|
|
644
|
+
return Oe(
|
|
607
645
|
(d = e.client.getLocalizationInformations()) == null ? void 0 : d.languageCode
|
|
608
646
|
);
|
|
609
647
|
}
|
|
610
|
-
),
|
|
648
|
+
), C = async () => {
|
|
611
649
|
const d = ++r.value;
|
|
612
650
|
s.value = !0, o.value = void 0;
|
|
613
651
|
try {
|
|
614
|
-
const
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
652
|
+
const f = await e.client.getSuggestions(e.productId, {
|
|
653
|
+
limit: xt
|
|
654
|
+
});
|
|
655
|
+
d === r.value && (o.value = f);
|
|
656
|
+
} catch (f) {
|
|
657
|
+
console.error("error", f);
|
|
618
658
|
} finally {
|
|
619
659
|
d === r.value && (s.value = !1);
|
|
620
660
|
}
|
|
@@ -622,47 +662,55 @@ const pt = /* @__PURE__ */ D(ut, [["render", dt], ["__scopeId", "data-v-26a64b58
|
|
|
622
662
|
return M(
|
|
623
663
|
() => [e.client, e.productId],
|
|
624
664
|
() => {
|
|
625
|
-
|
|
665
|
+
C();
|
|
626
666
|
},
|
|
627
667
|
{ immediate: !0 }
|
|
628
|
-
), (d,
|
|
668
|
+
), (d, f) => (u(), P(Rt, {
|
|
629
669
|
theme: e.client.theme
|
|
630
670
|
}, {
|
|
631
671
|
default: le(() => {
|
|
632
|
-
var
|
|
672
|
+
var v;
|
|
633
673
|
return [
|
|
634
674
|
l("div", {
|
|
635
675
|
id: "dialog-instant",
|
|
636
676
|
class: "dialog-block-container",
|
|
637
|
-
dir:
|
|
677
|
+
dir: c.value
|
|
638
678
|
}, [
|
|
639
|
-
T(
|
|
679
|
+
T(nt, {
|
|
640
680
|
title: n.value,
|
|
641
|
-
description:
|
|
681
|
+
description: a.value
|
|
642
682
|
}, null, 8, ["title", "description"]),
|
|
643
|
-
T(
|
|
683
|
+
T(bt, {
|
|
644
684
|
client: e.client,
|
|
645
|
-
questions:
|
|
685
|
+
questions: i.value,
|
|
646
686
|
"is-loading": s.value,
|
|
647
687
|
"product-id": e.productId,
|
|
648
688
|
"product-title": e.productTitle,
|
|
649
689
|
"selected-variant-id": e == null ? void 0 : e.selectedVariantId
|
|
650
690
|
}, null, 8, ["client", "questions", "is-loading", "product-id", "product-title", "selected-variant-id"]),
|
|
651
|
-
e.enableInput ? (u(),
|
|
691
|
+
e.enableInput ? (u(), P(Tt, {
|
|
652
692
|
key: 0,
|
|
653
693
|
client: e.client,
|
|
654
|
-
placeholder:
|
|
694
|
+
placeholder: p.value,
|
|
655
695
|
"product-id": e.productId,
|
|
656
696
|
"product-title": e.productTitle,
|
|
657
697
|
"selected-variant-id": e == null ? void 0 : e.selectedVariantId
|
|
658
|
-
}, null, 8, ["client", "placeholder", "product-id", "product-title", "selected-variant-id"])) :
|
|
659
|
-
|
|
698
|
+
}, null, 8, ["client", "placeholder", "product-id", "product-title", "selected-variant-id"])) : (u(), P(Je, {
|
|
699
|
+
key: 1,
|
|
700
|
+
client: e.client,
|
|
701
|
+
questions: (v = o.value) == null ? void 0 : v.questions,
|
|
702
|
+
disabled: s.value,
|
|
703
|
+
"product-id": e.productId,
|
|
704
|
+
"product-title": e.productTitle,
|
|
705
|
+
"selected-variant-id": e.selectedVariantId
|
|
706
|
+
}, null, 8, ["client", "questions", "disabled", "product-id", "product-title", "selected-variant-id"]))
|
|
707
|
+
], 8, At)
|
|
660
708
|
];
|
|
661
709
|
}),
|
|
662
710
|
_: 1
|
|
663
711
|
}, 8, ["theme"]));
|
|
664
712
|
}
|
|
665
|
-
}),
|
|
713
|
+
}), ao = /* @__PURE__ */ x(Dt, [["__scopeId", "data-v-0c307e5f"]]), Pt = {}, Ot = {
|
|
666
714
|
width: "16",
|
|
667
715
|
height: "16",
|
|
668
716
|
viewBox: "0 0 16 16",
|
|
@@ -670,8 +718,8 @@ const pt = /* @__PURE__ */ D(ut, [["render", dt], ["__scopeId", "data-v-26a64b58
|
|
|
670
718
|
xmlns: "http://www.w3.org/2000/svg",
|
|
671
719
|
"aria-hidden": "true"
|
|
672
720
|
};
|
|
673
|
-
function
|
|
674
|
-
return u(), _("svg",
|
|
721
|
+
function Nt(t, e) {
|
|
722
|
+
return u(), _("svg", Ot, e[0] || (e[0] = [
|
|
675
723
|
l("path", {
|
|
676
724
|
d: "M8 13V3M8 3L3 8M8 3L13 8",
|
|
677
725
|
stroke: "currentColor",
|
|
@@ -681,28 +729,28 @@ function Lt(t, e) {
|
|
|
681
729
|
}, null, -1)
|
|
682
730
|
]));
|
|
683
731
|
}
|
|
684
|
-
const
|
|
732
|
+
const qt = /* @__PURE__ */ x(Pt, [["render", Nt]]), Mt = {
|
|
685
733
|
width: "16",
|
|
686
734
|
height: "16",
|
|
687
735
|
viewBox: "0 0 12 12",
|
|
688
736
|
fill: "none",
|
|
689
737
|
xmlns: "http://www.w3.org/2000/svg",
|
|
690
738
|
"aria-hidden": "true"
|
|
691
|
-
},
|
|
739
|
+
}, Ut = ["fill"], Ht = "M5.3217 0.588255C5.63241 -0.196084 6.36759 -0.196085 6.6783 0.588254C6.98901 1.37259 7.68193 2.82807 8.42693 3.57307C9.17193 4.31807 10.6274 5.01099 11.4117 5.3217C12.1961 5.63241 12.1961 6.36759 11.4117 6.6783C10.6274 6.98901 9.17193 7.68193 8.42693 8.42693C7.68193 9.17193 6.98901 10.6274 6.6783 11.4117C6.36759 12.1961 5.63241 12.1961 5.3217 11.4117C5.01099 10.6274 4.31807 9.17193 3.57307 8.42693C2.82808 7.68193 1.37259 6.98901 0.588255 6.6783C-0.196084 6.36759 -0.196085 5.63241 0.588254 5.3217C1.37259 5.01099 2.82807 4.31807 3.57307 3.57307C4.31807 2.82808 5.01099 1.37259 5.3217 0.588255Z", Vt = /* @__PURE__ */ I({
|
|
692
740
|
__name: "ShurikenIcon",
|
|
693
741
|
props: {
|
|
694
742
|
color: {}
|
|
695
743
|
},
|
|
696
744
|
setup(t) {
|
|
697
745
|
const e = t;
|
|
698
|
-
return (s, o) => (u(), _("svg",
|
|
746
|
+
return (s, o) => (u(), _("svg", Mt, [
|
|
699
747
|
l("path", {
|
|
700
|
-
d:
|
|
748
|
+
d: Ht,
|
|
701
749
|
fill: e.color || "currentColor"
|
|
702
|
-
}, null, 8,
|
|
750
|
+
}, null, 8, Ut)
|
|
703
751
|
]));
|
|
704
752
|
}
|
|
705
|
-
}),
|
|
753
|
+
}), Bt = { class: "dialog-search-bar-field" }, Kt = { class: "dialog-search-bar-icon" }, Ft = ["aria-label", "placeholder", "autofocus"], zt = ["aria-label"], lo = /* @__PURE__ */ I({
|
|
706
754
|
__name: "DialogSearchBar",
|
|
707
755
|
props: {
|
|
708
756
|
controller: {},
|
|
@@ -711,22 +759,22 @@ const xt = /* @__PURE__ */ D(kt, [["render", Lt]]), Dt = {
|
|
|
711
759
|
submitAriaLabel: { default: "Search" }
|
|
712
760
|
},
|
|
713
761
|
setup(t) {
|
|
714
|
-
const e = t, s =
|
|
762
|
+
const e = t, s = R(""), o = () => {
|
|
715
763
|
e.controller.setQuery(s.value);
|
|
716
764
|
}, r = () => {
|
|
717
765
|
e.controller.submit(s.value);
|
|
718
766
|
};
|
|
719
|
-
return (n,
|
|
767
|
+
return (n, a) => (u(), _("form", {
|
|
720
768
|
class: "dialog-search-bar",
|
|
721
769
|
role: "search",
|
|
722
|
-
onSubmit:
|
|
770
|
+
onSubmit: $e(r, ["prevent"])
|
|
723
771
|
}, [
|
|
724
|
-
l("div",
|
|
725
|
-
l("span",
|
|
726
|
-
T(
|
|
772
|
+
l("div", Bt, [
|
|
773
|
+
l("span", Kt, [
|
|
774
|
+
T(Vt)
|
|
727
775
|
]),
|
|
728
|
-
|
|
729
|
-
"onUpdate:modelValue":
|
|
776
|
+
ie(l("input", {
|
|
777
|
+
"onUpdate:modelValue": a[0] || (a[0] = (i) => s.value = i),
|
|
730
778
|
type: "text",
|
|
731
779
|
name: "dialog-search-query",
|
|
732
780
|
class: "dialog-search-bar-input",
|
|
@@ -734,8 +782,8 @@ const xt = /* @__PURE__ */ D(kt, [["render", Lt]]), Dt = {
|
|
|
734
782
|
placeholder: e.placeholder,
|
|
735
783
|
autofocus: e.autoFocus,
|
|
736
784
|
onInput: o
|
|
737
|
-
}, null, 40,
|
|
738
|
-
[
|
|
785
|
+
}, null, 40, Ft), [
|
|
786
|
+
[ae, s.value]
|
|
739
787
|
])
|
|
740
788
|
]),
|
|
741
789
|
l("button", {
|
|
@@ -743,11 +791,11 @@ const xt = /* @__PURE__ */ D(kt, [["render", Lt]]), Dt = {
|
|
|
743
791
|
class: "dialog-search-bar-submit",
|
|
744
792
|
"aria-label": e.submitAriaLabel
|
|
745
793
|
}, [
|
|
746
|
-
T(
|
|
747
|
-
], 8,
|
|
794
|
+
T(qt)
|
|
795
|
+
], 8, zt)
|
|
748
796
|
], 32));
|
|
749
797
|
}
|
|
750
|
-
}),
|
|
798
|
+
}), Gt = (t, e) => {
|
|
751
799
|
try {
|
|
752
800
|
return new Intl.NumberFormat(e).format(t);
|
|
753
801
|
} catch {
|
|
@@ -819,15 +867,15 @@ const xt = /* @__PURE__ */ D(kt, [["render", Lt]]), Dt = {
|
|
|
819
867
|
next: "Successivo",
|
|
820
868
|
pageOf: (e, s) => `Pagina ${t(e)} / ${t(s)}`
|
|
821
869
|
})
|
|
822
|
-
},
|
|
870
|
+
}, _e = (t) => {
|
|
823
871
|
var o;
|
|
824
872
|
const e = ((o = t == null ? void 0 : t.split("-")[0]) == null ? void 0 : o.toLowerCase()) ?? "en";
|
|
825
|
-
return (ne[e] ?? ne.en)((r) =>
|
|
826
|
-
},
|
|
873
|
+
return (ne[e] ?? ne.en)((r) => Gt(r, t));
|
|
874
|
+
}, ge = (t) => t.status !== A.LOADING && t.response !== void 0 && t.response.nbPages > 1, jt = {
|
|
827
875
|
key: 0,
|
|
828
876
|
"aria-label": "Search results pages",
|
|
829
877
|
class: "dialog-search-pagination"
|
|
830
|
-
},
|
|
878
|
+
}, Qt = ["disabled"], Wt = ["disabled"], Xt = /* @__PURE__ */ I({
|
|
831
879
|
__name: "DialogSearchPagination",
|
|
832
880
|
props: {
|
|
833
881
|
controller: {},
|
|
@@ -835,87 +883,86 @@ const xt = /* @__PURE__ */ D(kt, [["render", Lt]]), Dt = {
|
|
|
835
883
|
locale: {}
|
|
836
884
|
},
|
|
837
885
|
setup(t) {
|
|
838
|
-
const e = t, s = b(() => e.state.response), o = b(() =>
|
|
839
|
-
return (r, n) => s.value !== void 0 &&
|
|
886
|
+
const e = t, s = b(() => e.state.response), o = b(() => _e(e.locale));
|
|
887
|
+
return (r, n) => s.value !== void 0 && H(ge)(e.state) ? (u(), _("nav", jt, [
|
|
840
888
|
l("button", {
|
|
841
889
|
type: "button",
|
|
842
890
|
disabled: s.value.page === 0,
|
|
843
|
-
onClick: n[0] || (n[0] = (
|
|
844
|
-
},
|
|
845
|
-
l("span", null,
|
|
891
|
+
onClick: n[0] || (n[0] = (a) => e.controller.setPage(s.value.page - 1))
|
|
892
|
+
}, y(o.value.previous), 9, Qt),
|
|
893
|
+
l("span", null, y(o.value.pageOf(s.value.page + 1, s.value.nbPages)), 1),
|
|
846
894
|
l("button", {
|
|
847
895
|
type: "button",
|
|
848
896
|
disabled: s.value.page >= s.value.nbPages - 1,
|
|
849
|
-
onClick: n[1] || (n[1] = (
|
|
850
|
-
},
|
|
851
|
-
])) :
|
|
897
|
+
onClick: n[1] || (n[1] = (a) => e.controller.setPage(s.value.page + 1))
|
|
898
|
+
}, y(o.value.next), 9, Wt)
|
|
899
|
+
])) : L("", !0);
|
|
852
900
|
}
|
|
853
|
-
}), re = (t) => t.normalize("NFD").replace(new RegExp("\\p{M}", "gu"), "").replace(/ẞ/gu, "ß").toUpperCase().toLowerCase().replace(/ς/g, "σ"),
|
|
901
|
+
}), re = (t) => t.normalize("NFD").replace(new RegExp("\\p{M}", "gu"), "").replace(/ẞ/gu, "ß").toUpperCase().toLowerCase().replace(/ς/g, "σ"), Yt = (t, e) => {
|
|
854
902
|
const s = { before: "", match: t, after: "" }, o = re(e.trim());
|
|
855
903
|
if (o === "")
|
|
856
904
|
return s;
|
|
857
905
|
const r = [...t], n = [];
|
|
858
|
-
let
|
|
859
|
-
r.forEach((
|
|
860
|
-
const
|
|
861
|
-
for (let
|
|
862
|
-
n.push(
|
|
863
|
-
|
|
906
|
+
let a = "";
|
|
907
|
+
r.forEach((C, d) => {
|
|
908
|
+
const f = re(C);
|
|
909
|
+
for (let v = 0; v < f.length; v += 1)
|
|
910
|
+
n.push(d);
|
|
911
|
+
a += f;
|
|
864
912
|
});
|
|
865
|
-
const
|
|
866
|
-
if (
|
|
913
|
+
const i = a.indexOf(o);
|
|
914
|
+
if (i === -1)
|
|
867
915
|
return s;
|
|
868
|
-
const
|
|
916
|
+
const p = n[i], c = n[i + o.length - 1] + 1;
|
|
869
917
|
return {
|
|
870
|
-
before: r.slice(0,
|
|
871
|
-
match: r.slice(
|
|
918
|
+
before: r.slice(0, p).join(""),
|
|
919
|
+
match: r.slice(p, c).join(""),
|
|
872
920
|
after: r.slice(c).join("")
|
|
873
921
|
};
|
|
874
|
-
},
|
|
922
|
+
}, Zt = {
|
|
875
923
|
key: 0,
|
|
876
924
|
class: "dialog-search-muted"
|
|
877
|
-
},
|
|
925
|
+
}, Jt = { class: "dialog-search-match" }, es = {
|
|
878
926
|
key: 1,
|
|
879
927
|
class: "dialog-search-muted"
|
|
880
|
-
},
|
|
928
|
+
}, fe = /* @__PURE__ */ I({
|
|
881
929
|
__name: "HighlightedTitle",
|
|
882
930
|
props: {
|
|
883
931
|
title: {},
|
|
884
932
|
query: {}
|
|
885
933
|
},
|
|
886
934
|
setup(t) {
|
|
887
|
-
const e = t, s = b(() =>
|
|
935
|
+
const e = t, s = b(() => Yt(e.title, e.query));
|
|
888
936
|
return (o, r) => (u(), _(N, null, [
|
|
889
|
-
s.value.before !== "" ? (u(), _("span",
|
|
890
|
-
l("span",
|
|
891
|
-
s.value.after !== "" ? (u(), _("span",
|
|
937
|
+
s.value.before !== "" ? (u(), _("span", Zt, y(s.value.before), 1)) : L("", !0),
|
|
938
|
+
l("span", Jt, y(s.value.match), 1),
|
|
939
|
+
s.value.after !== "" ? (u(), _("span", es, y(s.value.after), 1)) : L("", !0)
|
|
892
940
|
], 64));
|
|
893
941
|
}
|
|
894
|
-
}),
|
|
895
|
-
style: "currency",
|
|
896
|
-
currency: e
|
|
897
|
-
}).format(Number(t)), Yt = (t, e) => {
|
|
942
|
+
}), ts = ({ variants_min_price: t, currency: e }, s) => {
|
|
898
943
|
if (t === void 0)
|
|
899
944
|
return "";
|
|
900
945
|
try {
|
|
901
|
-
return
|
|
946
|
+
return e === void 0 ? new Intl.NumberFormat(s).format(t) : new Intl.NumberFormat(s, { style: "currency", currency: e }).format(
|
|
947
|
+
t
|
|
948
|
+
);
|
|
902
949
|
} catch {
|
|
903
950
|
return "";
|
|
904
951
|
}
|
|
905
|
-
},
|
|
952
|
+
}, ss = (t) => t.product_image || t.image || void 0, os = (t) => {
|
|
906
953
|
try {
|
|
907
954
|
const { protocol: e } = new URL(t, window.location.href);
|
|
908
955
|
return e === "http:" || e === "https:" ? t : void 0;
|
|
909
956
|
} catch {
|
|
910
957
|
return;
|
|
911
958
|
}
|
|
912
|
-
},
|
|
959
|
+
}, ve = (t) => t.url === void 0 || t.url === "" ? void 0 : os(t.url), me = (t) => t.title ?? t.handle ?? t.objectID, ns = {
|
|
913
960
|
class: "dialog-search-product-thumb",
|
|
914
961
|
"aria-hidden": "true"
|
|
915
|
-
},
|
|
962
|
+
}, rs = ["src"], is = { class: "dialog-search-product-title" }, as = {
|
|
916
963
|
key: 0,
|
|
917
964
|
class: "dialog-search-product-price"
|
|
918
|
-
},
|
|
965
|
+
}, ls = /* @__PURE__ */ I({
|
|
919
966
|
__name: "DialogSearchProductCard",
|
|
920
967
|
props: {
|
|
921
968
|
controller: {},
|
|
@@ -925,7 +972,7 @@ const xt = /* @__PURE__ */ D(kt, [["render", Lt]]), Dt = {
|
|
|
925
972
|
query: { default: "" }
|
|
926
973
|
},
|
|
927
974
|
setup(t) {
|
|
928
|
-
const e = t, s =
|
|
975
|
+
const e = t, s = R();
|
|
929
976
|
M(
|
|
930
977
|
() => e.hit,
|
|
931
978
|
() => {
|
|
@@ -933,47 +980,45 @@ const xt = /* @__PURE__ */ D(kt, [["render", Lt]]), Dt = {
|
|
|
933
980
|
},
|
|
934
981
|
{ immediate: !0, flush: "post" }
|
|
935
982
|
);
|
|
936
|
-
const o = b(() =>
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
e.controller.selectResult(e.index, { navigate: !
|
|
941
|
-
}, i = (a) => {
|
|
942
|
-
a.button === 1 && e.controller.selectResult(e.index, { navigate: !1 });
|
|
983
|
+
const o = b(() => ve(e.hit)), r = b(() => ss(e.hit)), n = b(() => ts(e.hit, e.locale)), a = (p) => {
|
|
984
|
+
const c = p.metaKey || p.ctrlKey || p.shiftKey || p.altKey;
|
|
985
|
+
e.controller.selectResult(e.index, { navigate: !c }) && p.preventDefault();
|
|
986
|
+
}, i = (p) => {
|
|
987
|
+
p.button === 1 && e.controller.selectResult(e.index, { navigate: !1 });
|
|
943
988
|
};
|
|
944
|
-
return (
|
|
989
|
+
return (p, c) => (u(), _("li", {
|
|
945
990
|
ref_key: "cardRef",
|
|
946
991
|
ref: s,
|
|
947
992
|
class: "dialog-search-card"
|
|
948
993
|
}, [
|
|
949
|
-
(u(),
|
|
994
|
+
(u(), P(ke(o.value === void 0 ? "div" : "a"), Te({
|
|
950
995
|
class: "dialog-search-product",
|
|
951
996
|
href: o.value
|
|
952
|
-
},
|
|
953
|
-
o.value === void 0 ? {} : { click:
|
|
997
|
+
}, Re(
|
|
998
|
+
o.value === void 0 ? {} : { click: a, auxclick: i }
|
|
954
999
|
)), {
|
|
955
1000
|
default: le(() => [
|
|
956
|
-
l("span",
|
|
957
|
-
|
|
1001
|
+
l("span", ns, [
|
|
1002
|
+
r.value !== void 0 ? (u(), _("img", {
|
|
958
1003
|
key: 0,
|
|
959
|
-
src:
|
|
1004
|
+
src: r.value,
|
|
960
1005
|
alt: "",
|
|
961
1006
|
loading: "lazy"
|
|
962
|
-
}, null, 8,
|
|
1007
|
+
}, null, 8, rs)) : L("", !0)
|
|
963
1008
|
]),
|
|
964
|
-
l("span",
|
|
965
|
-
T(
|
|
966
|
-
title:
|
|
1009
|
+
l("span", is, [
|
|
1010
|
+
T(fe, {
|
|
1011
|
+
title: H(me)(e.hit),
|
|
967
1012
|
query: e.query
|
|
968
1013
|
}, null, 8, ["title", "query"])
|
|
969
1014
|
]),
|
|
970
|
-
|
|
1015
|
+
n.value !== "" ? (u(), _("span", as, y(n.value), 1)) : L("", !0)
|
|
971
1016
|
]),
|
|
972
1017
|
_: 1
|
|
973
1018
|
}, 16, ["href"]))
|
|
974
1019
|
], 512));
|
|
975
1020
|
}
|
|
976
|
-
}),
|
|
1021
|
+
}), cs = {}, ds = {
|
|
977
1022
|
width: "16",
|
|
978
1023
|
height: "16",
|
|
979
1024
|
viewBox: "0 0 256 256",
|
|
@@ -981,12 +1026,12 @@ const xt = /* @__PURE__ */ D(kt, [["render", Lt]]), Dt = {
|
|
|
981
1026
|
xmlns: "http://www.w3.org/2000/svg",
|
|
982
1027
|
"aria-hidden": "true"
|
|
983
1028
|
};
|
|
984
|
-
function
|
|
985
|
-
return u(), _("svg",
|
|
1029
|
+
function us(t, e) {
|
|
1030
|
+
return u(), _("svg", ds, e[0] || (e[0] = [
|
|
986
1031
|
l("path", { d: "M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z" }, null, -1)
|
|
987
1032
|
]));
|
|
988
1033
|
}
|
|
989
|
-
const
|
|
1034
|
+
const ps = /* @__PURE__ */ x(cs, [["render", us]]), hs = {}, _s = {
|
|
990
1035
|
width: "12",
|
|
991
1036
|
height: "12",
|
|
992
1037
|
viewBox: "0 0 256 256",
|
|
@@ -994,21 +1039,21 @@ const is = /* @__PURE__ */ D(ns, [["render", as]]), ls = {}, cs = {
|
|
|
994
1039
|
xmlns: "http://www.w3.org/2000/svg",
|
|
995
1040
|
"aria-hidden": "true"
|
|
996
1041
|
};
|
|
997
|
-
function
|
|
998
|
-
return u(), _("svg",
|
|
1042
|
+
function gs(t, e) {
|
|
1043
|
+
return u(), _("svg", _s, e[0] || (e[0] = [
|
|
999
1044
|
l("path", { d: "M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z" }, null, -1)
|
|
1000
1045
|
]));
|
|
1001
1046
|
}
|
|
1002
|
-
const
|
|
1003
|
-
const s =
|
|
1047
|
+
const fs = /* @__PURE__ */ x(hs, [["render", gs]]), be = (t) => (t ?? []).flatMap((e) => {
|
|
1048
|
+
const s = ve(e);
|
|
1004
1049
|
return s === void 0 ? [] : [{ collection: e, href: s }];
|
|
1005
|
-
}),
|
|
1050
|
+
}), vs = {
|
|
1006
1051
|
key: 0,
|
|
1007
1052
|
class: "dialog-search-collections"
|
|
1008
|
-
},
|
|
1053
|
+
}, ms = { class: "dialog-search-section-head" }, bs = { class: "dialog-search-label" }, Ss = { class: "dialog-search-count" }, Cs = { class: "dialog-search-collection-list" }, Es = ["href"], ys = {
|
|
1009
1054
|
class: "dialog-search-collection-thumb",
|
|
1010
1055
|
"aria-hidden": "true"
|
|
1011
|
-
},
|
|
1056
|
+
}, Is = ["src"], ws = { class: "dialog-search-collection-title" }, $s = { class: "dialog-search-caret" }, ks = /* @__PURE__ */ I({
|
|
1012
1057
|
__name: "DialogSearchCollections",
|
|
1013
1058
|
props: {
|
|
1014
1059
|
collections: {},
|
|
@@ -1016,50 +1061,50 @@ const ds = /* @__PURE__ */ D(ls, [["render", us]]), me = (t) => (t ?? []).flatMa
|
|
|
1016
1061
|
messages: {}
|
|
1017
1062
|
},
|
|
1018
1063
|
setup(t) {
|
|
1019
|
-
const e = t, s = b(() =>
|
|
1020
|
-
return (o, r) => s.value.length > 0 ? (u(), _("aside",
|
|
1021
|
-
l("div",
|
|
1022
|
-
l("p",
|
|
1023
|
-
l("span",
|
|
1064
|
+
const e = t, s = b(() => be(e.collections));
|
|
1065
|
+
return (o, r) => s.value.length > 0 ? (u(), _("aside", vs, [
|
|
1066
|
+
l("div", ms, [
|
|
1067
|
+
l("p", bs, y(e.messages.collectionsLabel), 1),
|
|
1068
|
+
l("span", Ss, y(e.messages.collectionsCount(s.value.length)), 1)
|
|
1024
1069
|
]),
|
|
1025
|
-
l("ul",
|
|
1026
|
-
(u(!0), _(N, null,
|
|
1070
|
+
l("ul", Cs, [
|
|
1071
|
+
(u(!0), _(N, null, W(s.value, ({ collection: n, href: a }) => (u(), _("li", {
|
|
1027
1072
|
key: n.objectID
|
|
1028
1073
|
}, [
|
|
1029
1074
|
l("a", {
|
|
1030
1075
|
class: "dialog-search-collection",
|
|
1031
|
-
href:
|
|
1076
|
+
href: a
|
|
1032
1077
|
}, [
|
|
1033
|
-
l("span",
|
|
1078
|
+
l("span", ys, [
|
|
1034
1079
|
n.imageUrl !== void 0 && n.imageUrl !== "" ? (u(), _("img", {
|
|
1035
1080
|
key: 0,
|
|
1036
1081
|
src: n.imageUrl,
|
|
1037
1082
|
alt: "",
|
|
1038
1083
|
loading: "lazy"
|
|
1039
|
-
}, null, 8,
|
|
1084
|
+
}, null, 8, Is)) : L("", !0)
|
|
1040
1085
|
]),
|
|
1041
|
-
l("span",
|
|
1042
|
-
T(
|
|
1043
|
-
title:
|
|
1086
|
+
l("span", ws, [
|
|
1087
|
+
T(fe, {
|
|
1088
|
+
title: H(me)(n),
|
|
1044
1089
|
query: e.query
|
|
1045
1090
|
}, null, 8, ["title", "query"])
|
|
1046
1091
|
]),
|
|
1047
|
-
l("span",
|
|
1048
|
-
T(
|
|
1092
|
+
l("span", $s, [
|
|
1093
|
+
T(fs)
|
|
1049
1094
|
])
|
|
1050
|
-
], 8,
|
|
1095
|
+
], 8, Es)
|
|
1051
1096
|
]))), 128))
|
|
1052
1097
|
])
|
|
1053
|
-
])) :
|
|
1098
|
+
])) : L("", !0);
|
|
1054
1099
|
}
|
|
1055
|
-
}),
|
|
1100
|
+
}), Ts = { class: "dialog-search-products" }, Rs = { class: "dialog-search-section-head" }, As = { class: "dialog-search-label" }, Ls = {
|
|
1056
1101
|
key: 0,
|
|
1057
1102
|
class: "dialog-search-label-count"
|
|
1058
|
-
},
|
|
1103
|
+
}, xs = { class: "dialog-search-results" }, Ds = {
|
|
1059
1104
|
key: 0,
|
|
1060
1105
|
class: "dialog-search-empty",
|
|
1061
1106
|
role: "status"
|
|
1062
|
-
},
|
|
1107
|
+
}, Ps = /* @__PURE__ */ I({
|
|
1063
1108
|
__name: "DialogSearchProducts",
|
|
1064
1109
|
props: {
|
|
1065
1110
|
controller: {},
|
|
@@ -1069,15 +1114,15 @@ const ds = /* @__PURE__ */ D(ls, [["render", us]]), me = (t) => (t ?? []).flatMa
|
|
|
1069
1114
|
},
|
|
1070
1115
|
setup(t) {
|
|
1071
1116
|
const e = t;
|
|
1072
|
-
return (s, o) => (u(), _("section",
|
|
1073
|
-
l("div",
|
|
1074
|
-
l("p",
|
|
1075
|
-
ce(
|
|
1076
|
-
e.response.nbHits > 0 ? (u(), _("span",
|
|
1117
|
+
return (s, o) => (u(), _("section", Ts, [
|
|
1118
|
+
l("div", Rs, [
|
|
1119
|
+
l("p", As, [
|
|
1120
|
+
ce(y(e.messages.productsLabel), 1),
|
|
1121
|
+
e.response.nbHits > 0 ? (u(), _("span", Ls, " · " + y(e.messages.resultsCount(e.response.nbHits)), 1)) : L("", !0)
|
|
1077
1122
|
])
|
|
1078
1123
|
]),
|
|
1079
|
-
l("ul",
|
|
1080
|
-
e.response.hits.length === 0 ? (u(), _("li",
|
|
1124
|
+
l("ul", xs, [
|
|
1125
|
+
e.response.hits.length === 0 ? (u(), _("li", Ds, y(e.messages.noResults), 1)) : (u(!0), _(N, { key: 1 }, W(e.response.hits, (r, n) => (u(), P(ls, {
|
|
1081
1126
|
key: r.objectID,
|
|
1082
1127
|
controller: e.controller,
|
|
1083
1128
|
hit: r,
|
|
@@ -1088,27 +1133,27 @@ const ds = /* @__PURE__ */ D(ls, [["render", us]]), me = (t) => (t ?? []).flatMa
|
|
|
1088
1133
|
])
|
|
1089
1134
|
]));
|
|
1090
1135
|
}
|
|
1091
|
-
}),
|
|
1136
|
+
}), V = 8, U = 16, Os = 200, Ns = 1440, qs = (t, e) => t.bottom > 0 && t.top < e, Ms = (t, e) => {
|
|
1092
1137
|
const s = Math.min(
|
|
1093
|
-
|
|
1138
|
+
Ns,
|
|
1094
1139
|
e - 2 * U
|
|
1095
1140
|
), o = t.left + t.width / 2 - s / 2;
|
|
1096
1141
|
return { left: `${Math.min(
|
|
1097
1142
|
Math.max(o, U),
|
|
1098
1143
|
e - U - s
|
|
1099
1144
|
)}px`, width: `${s}px` };
|
|
1100
|
-
},
|
|
1101
|
-
const o = s - t.bottom -
|
|
1102
|
-
return o <
|
|
1145
|
+
}, Us = (t, e, s) => {
|
|
1146
|
+
const o = s - t.bottom - V - U, r = t.top - V - U, n = Ms(t, e);
|
|
1147
|
+
return o < Os && r > o ? {
|
|
1103
1148
|
...n,
|
|
1104
|
-
bottom: `${s - t.top +
|
|
1149
|
+
bottom: `${s - t.top + V}px`,
|
|
1105
1150
|
maxHeight: `${Math.max(r, 0)}px`
|
|
1106
1151
|
} : {
|
|
1107
1152
|
...n,
|
|
1108
|
-
top: `${t.bottom +
|
|
1153
|
+
top: `${t.bottom + V}px`,
|
|
1109
1154
|
maxHeight: `${Math.max(o, 0)}px`
|
|
1110
1155
|
};
|
|
1111
|
-
},
|
|
1156
|
+
}, Hs = (t) => {
|
|
1112
1157
|
const e = t.trim().replace(/^#/, "");
|
|
1113
1158
|
if (!/^(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(e))
|
|
1114
1159
|
return;
|
|
@@ -1116,29 +1161,29 @@ const ds = /* @__PURE__ */ D(ls, [["render", us]]), me = (t) => (t ?? []).flatMa
|
|
|
1116
1161
|
return [0, 2, 4].map(
|
|
1117
1162
|
(o) => Number.parseInt(s.slice(o, o + 2), 16)
|
|
1118
1163
|
);
|
|
1119
|
-
},
|
|
1164
|
+
}, Vs = (t) => {
|
|
1120
1165
|
const e = /^rgba?\((\d+), (\d+), (\d+)(?:, [\d.]+)?\)$/.exec(t);
|
|
1121
1166
|
if (e !== null)
|
|
1122
1167
|
return [e[1], e[2], e[3]].map(Number);
|
|
1123
|
-
},
|
|
1168
|
+
}, Bs = (t) => {
|
|
1124
1169
|
if (typeof document > "u")
|
|
1125
1170
|
return;
|
|
1126
1171
|
const e = document.createElement("span");
|
|
1127
1172
|
if (e.style.color = t, e.style.color === "")
|
|
1128
1173
|
return;
|
|
1129
1174
|
document.body.appendChild(e);
|
|
1130
|
-
const s =
|
|
1175
|
+
const s = Vs(getComputedStyle(e).color);
|
|
1131
1176
|
return e.remove(), s;
|
|
1132
|
-
},
|
|
1177
|
+
}, Ks = (t) => Hs(t) ?? Bs(t), Fs = (t) => {
|
|
1133
1178
|
const e = t / 255;
|
|
1134
1179
|
return e <= 0.03928 ? e / 12.92 : ((e + 0.055) / 1.055) ** 2.4;
|
|
1135
|
-
},
|
|
1136
|
-
const e =
|
|
1180
|
+
}, Se = (t) => {
|
|
1181
|
+
const e = Ks(t);
|
|
1137
1182
|
if (e === void 0)
|
|
1138
1183
|
return;
|
|
1139
|
-
const [s, o, r] = e.map(
|
|
1184
|
+
const [s, o, r] = e.map(Fs);
|
|
1140
1185
|
return 0.2126 * s + 0.7152 * o + 0.0722 * r;
|
|
1141
|
-
},
|
|
1186
|
+
}, zs = "#181825", Gs = "#ffffff", js = "straight", j = 0.5, Q = {
|
|
1142
1187
|
light: {
|
|
1143
1188
|
panel: "#ffffff",
|
|
1144
1189
|
side: "#fafbfc",
|
|
@@ -1157,7 +1202,7 @@ const ds = /* @__PURE__ */ D(ls, [["render", us]]), me = (t) => (t ?? []).flatMa
|
|
|
1157
1202
|
hover: "#242830",
|
|
1158
1203
|
thumb: "#2b2f38"
|
|
1159
1204
|
}
|
|
1160
|
-
},
|
|
1205
|
+
}, Qs = {
|
|
1161
1206
|
rectangle: {
|
|
1162
1207
|
"r-panel": "4px",
|
|
1163
1208
|
"r-item": "4px",
|
|
@@ -1170,52 +1215,52 @@ const ds = /* @__PURE__ */ D(ls, [["render", us]]), me = (t) => (t ?? []).flatMa
|
|
|
1170
1215
|
"r-thumb": "8px",
|
|
1171
1216
|
"r-btn": "10px"
|
|
1172
1217
|
}
|
|
1173
|
-
},
|
|
1174
|
-
const e = t === void 0 ? void 0 :
|
|
1175
|
-
return e === void 0 ? "light" : e <
|
|
1176
|
-
},
|
|
1177
|
-
const s =
|
|
1178
|
-
return s === void 0 ?
|
|
1179
|
-
},
|
|
1180
|
-
const e =
|
|
1181
|
-
...
|
|
1182
|
-
...
|
|
1218
|
+
}, B = (t) => t === void 0 || t.trim() === "" ? void 0 : t.trim(), Ws = (t) => {
|
|
1219
|
+
const e = t === void 0 ? void 0 : Se(t);
|
|
1220
|
+
return e === void 0 ? "light" : e < j ? "dark" : "light";
|
|
1221
|
+
}, Xs = (t, e) => {
|
|
1222
|
+
const s = Se(t);
|
|
1223
|
+
return s === void 0 ? Q[e].text : (e === "light" ? s < j : s >= j) ? t : Q[e].text;
|
|
1224
|
+
}, Ys = (t) => {
|
|
1225
|
+
const e = Ws(B(t == null ? void 0 : t.backgroundColor)), s = (t == null ? void 0 : t.ctaBorderType) === js ? "rectangle" : "rectangle-rounded", o = B(t == null ? void 0 : t.primaryColor) ?? zs, r = B(t == null ? void 0 : t.fontFamily), n = {
|
|
1226
|
+
...Q[e],
|
|
1227
|
+
...Qs[s],
|
|
1183
1228
|
primary: o,
|
|
1184
|
-
accent:
|
|
1185
|
-
"cta-text":
|
|
1229
|
+
accent: Xs(o, e),
|
|
1230
|
+
"cta-text": B(t == null ? void 0 : t.ctaTextColor) ?? Gs,
|
|
1186
1231
|
...r === void 0 ? {} : { font: r }
|
|
1187
1232
|
};
|
|
1188
1233
|
return Object.fromEntries(
|
|
1189
|
-
Object.entries(n).map(([
|
|
1234
|
+
Object.entries(n).map(([a, i]) => [`--dso-${a}`, i])
|
|
1190
1235
|
);
|
|
1191
|
-
},
|
|
1192
|
-
const e =
|
|
1236
|
+
}, Zs = (t) => {
|
|
1237
|
+
const e = R(), s = R(void 0), o = R({ width: 0, height: 0 });
|
|
1193
1238
|
return M(
|
|
1194
1239
|
t,
|
|
1195
|
-
(r, n,
|
|
1240
|
+
(r, n, a) => {
|
|
1196
1241
|
if (!r)
|
|
1197
1242
|
return;
|
|
1198
|
-
const
|
|
1199
|
-
const
|
|
1200
|
-
if (
|
|
1243
|
+
const i = () => {
|
|
1244
|
+
const p = e.value;
|
|
1245
|
+
if (p === void 0)
|
|
1201
1246
|
return;
|
|
1202
|
-
const c =
|
|
1247
|
+
const c = p.previousElementSibling ?? p, { top: C, bottom: d, left: f, width: v } = c.getBoundingClientRect();
|
|
1203
1248
|
(o.value.width !== window.innerWidth || o.value.height !== window.innerHeight) && (o.value = {
|
|
1204
1249
|
width: window.innerWidth,
|
|
1205
1250
|
height: window.innerHeight
|
|
1206
1251
|
});
|
|
1207
|
-
const
|
|
1208
|
-
(
|
|
1252
|
+
const g = s.value;
|
|
1253
|
+
(g === void 0 || g.top !== C || g.bottom !== d || g.left !== f || g.width !== v) && (s.value = { top: C, bottom: d, left: f, width: v });
|
|
1209
1254
|
};
|
|
1210
|
-
|
|
1211
|
-
window.removeEventListener("scroll",
|
|
1255
|
+
i(), window.addEventListener("scroll", i, !0), window.addEventListener("resize", i), a(() => {
|
|
1256
|
+
window.removeEventListener("scroll", i, !0), window.removeEventListener("resize", i);
|
|
1212
1257
|
});
|
|
1213
1258
|
},
|
|
1214
1259
|
{ immediate: !0, flush: "post" }
|
|
1215
1260
|
), { anchorRef: e, rect: s, viewport: o };
|
|
1216
|
-
},
|
|
1217
|
-
const s =
|
|
1218
|
-
() => t.value.status !==
|
|
1261
|
+
}, Js = (t, e) => {
|
|
1262
|
+
const s = R(!1), o = R(), r = b(
|
|
1263
|
+
() => t.value.status !== A.IDLE && !s.value
|
|
1219
1264
|
);
|
|
1220
1265
|
M(
|
|
1221
1266
|
() => t.value.query,
|
|
@@ -1224,18 +1269,18 @@ const ds = /* @__PURE__ */ D(ls, [["render", us]]), me = (t) => (t ?? []).flatMa
|
|
|
1224
1269
|
}
|
|
1225
1270
|
), M(
|
|
1226
1271
|
r,
|
|
1227
|
-
(
|
|
1228
|
-
if (!
|
|
1272
|
+
(a, i, p) => {
|
|
1273
|
+
if (!a)
|
|
1229
1274
|
return;
|
|
1230
|
-
const c = (
|
|
1231
|
-
var
|
|
1232
|
-
const
|
|
1233
|
-
if (!(
|
|
1275
|
+
const c = (C) => {
|
|
1276
|
+
var w, $;
|
|
1277
|
+
const d = C.target;
|
|
1278
|
+
if (!(d instanceof Node))
|
|
1234
1279
|
return;
|
|
1235
|
-
const
|
|
1236
|
-
!
|
|
1280
|
+
const f = (w = e.value) == null ? void 0 : w.previousElementSibling, v = (($ = o.value) == null ? void 0 : $.contains(d)) ?? !1, g = (f == null ? void 0 : f.contains(d)) ?? !1;
|
|
1281
|
+
!v && !g && (s.value = !0);
|
|
1237
1282
|
};
|
|
1238
|
-
document.addEventListener("pointerdown", c),
|
|
1283
|
+
document.addEventListener("pointerdown", c), p(
|
|
1239
1284
|
() => document.removeEventListener("pointerdown", c)
|
|
1240
1285
|
);
|
|
1241
1286
|
},
|
|
@@ -1244,33 +1289,33 @@ const ds = /* @__PURE__ */ D(ls, [["render", us]]), me = (t) => (t ?? []).flatMa
|
|
|
1244
1289
|
const n = () => {
|
|
1245
1290
|
s.value = !1;
|
|
1246
1291
|
};
|
|
1247
|
-
return
|
|
1248
|
-
var
|
|
1249
|
-
(
|
|
1292
|
+
return K(() => {
|
|
1293
|
+
var a, i;
|
|
1294
|
+
(i = (a = e.value) == null ? void 0 : a.previousElementSibling) == null || i.addEventListener(
|
|
1250
1295
|
"focusin",
|
|
1251
1296
|
n
|
|
1252
1297
|
);
|
|
1253
|
-
}),
|
|
1254
|
-
var
|
|
1255
|
-
(
|
|
1298
|
+
}), de(() => {
|
|
1299
|
+
var a, i;
|
|
1300
|
+
(i = (a = e.value) == null ? void 0 : a.previousElementSibling) == null || i.removeEventListener(
|
|
1256
1301
|
"focusin",
|
|
1257
1302
|
n
|
|
1258
1303
|
);
|
|
1259
1304
|
}), { isOpen: r, panelRef: o };
|
|
1260
|
-
},
|
|
1305
|
+
}, eo = {
|
|
1261
1306
|
key: 0,
|
|
1262
1307
|
class: "dialog-search-error"
|
|
1263
|
-
},
|
|
1308
|
+
}, to = {
|
|
1264
1309
|
role: "alert",
|
|
1265
1310
|
class: "dialog-search-status dialog-search-status-error"
|
|
1266
|
-
},
|
|
1311
|
+
}, so = {
|
|
1267
1312
|
key: 1,
|
|
1268
1313
|
role: "status",
|
|
1269
1314
|
class: "dialog-search-status"
|
|
1270
|
-
},
|
|
1315
|
+
}, oo = {
|
|
1271
1316
|
key: 0,
|
|
1272
1317
|
class: "dialog-search-footer"
|
|
1273
|
-
},
|
|
1318
|
+
}, no = ["href"], co = /* @__PURE__ */ I({
|
|
1274
1319
|
__name: "DialogSearchResults",
|
|
1275
1320
|
props: {
|
|
1276
1321
|
controller: {},
|
|
@@ -1281,32 +1326,32 @@ const ds = /* @__PURE__ */ D(ls, [["render", us]]), me = (t) => (t ?? []).flatMa
|
|
|
1281
1326
|
seeAllHref: { type: Function, default: void 0 }
|
|
1282
1327
|
},
|
|
1283
1328
|
setup(t) {
|
|
1284
|
-
const e = t, s = (
|
|
1285
|
-
() =>
|
|
1286
|
-
),
|
|
1287
|
-
...
|
|
1288
|
-
...
|
|
1289
|
-
})),
|
|
1329
|
+
const e = t, s = (h) => h instanceof Ne ? `Search failed (${h.status}${h.code ? ` ${h.code}` : ""}): ${h.message}` : "Search failed: network error. Check your connection and try again.", o = b(() => e.state), r = b(() => e.state.status !== A.IDLE), { anchorRef: n, rect: a, viewport: i } = Zs(r), { isOpen: p, panelRef: c } = Js(o, n), C = b(
|
|
1330
|
+
() => p.value && a.value !== void 0 && qs(a.value, i.value.height)
|
|
1331
|
+
), d = b(() => Ys(e.theme)), f = b(() => ({
|
|
1332
|
+
...a.value === void 0 ? {} : Us(a.value, i.value.width, i.value.height),
|
|
1333
|
+
...d.value
|
|
1334
|
+
})), v = b(() => _e(e.locale)), g = b(() => e.state.response), w = b(
|
|
1290
1335
|
() => {
|
|
1291
|
-
var
|
|
1292
|
-
return ((
|
|
1336
|
+
var h, E;
|
|
1337
|
+
return ((E = (h = e.state.sections) == null ? void 0 : h.collections) == null ? void 0 : E.hits) ?? [];
|
|
1293
1338
|
}
|
|
1294
1339
|
), $ = b(
|
|
1295
|
-
() =>
|
|
1296
|
-
),
|
|
1297
|
-
() => e.seeAllHref !== void 0 &&
|
|
1298
|
-
),
|
|
1340
|
+
() => be(w.value).length > 0
|
|
1341
|
+
), k = b(
|
|
1342
|
+
() => e.seeAllHref !== void 0 && g.value !== void 0 && g.value.nbHits > 0
|
|
1343
|
+
), S = b(() => !k.value && ge(e.state)), m = b(
|
|
1299
1344
|
() => {
|
|
1300
|
-
var
|
|
1301
|
-
return
|
|
1345
|
+
var h;
|
|
1346
|
+
return g.value === void 0 || (h = e.seeAllHref) == null ? void 0 : h.call(e, g.value.query);
|
|
1302
1347
|
}
|
|
1303
1348
|
);
|
|
1304
|
-
return (
|
|
1349
|
+
return (h, E) => (u(), _(N, null, [
|
|
1305
1350
|
l("div", {
|
|
1306
1351
|
ref_key: "anchorRef",
|
|
1307
1352
|
ref: n
|
|
1308
1353
|
}, null, 512),
|
|
1309
|
-
|
|
1354
|
+
C.value ? (u(), P(Ae, {
|
|
1310
1355
|
key: 0,
|
|
1311
1356
|
to: "body"
|
|
1312
1357
|
}, [
|
|
@@ -1314,81 +1359,81 @@ const ds = /* @__PURE__ */ D(ls, [["render", us]]), me = (t) => (t ?? []).flatMa
|
|
|
1314
1359
|
ref_key: "panelRef",
|
|
1315
1360
|
ref: c,
|
|
1316
1361
|
class: Z(["dialog-search-panel", `dialog-search-panel--${e.layout}`]),
|
|
1317
|
-
style:
|
|
1362
|
+
style: Le(f.value)
|
|
1318
1363
|
}, [
|
|
1319
|
-
e.state.status ===
|
|
1320
|
-
l("p",
|
|
1364
|
+
e.state.status === H(A).ERROR ? (u(), _("div", eo, [
|
|
1365
|
+
l("p", to, y(s(e.state.error)), 1),
|
|
1321
1366
|
l("button", {
|
|
1322
1367
|
type: "button",
|
|
1323
1368
|
class: "dialog-search-retry",
|
|
1324
|
-
onClick:
|
|
1325
|
-
},
|
|
1326
|
-
])) :
|
|
1369
|
+
onClick: E[0] || (E[0] = (O) => e.controller.retry())
|
|
1370
|
+
}, y(v.value.retry), 1)
|
|
1371
|
+
])) : g.value === void 0 ? (u(), _("p", so, y(v.value.searching(e.state.query)), 1)) : (u(), _(N, { key: 2 }, [
|
|
1327
1372
|
l("div", {
|
|
1328
1373
|
class: Z([
|
|
1329
1374
|
"dialog-search-body",
|
|
1330
1375
|
{ "dialog-search-body--no-collections": !$.value }
|
|
1331
1376
|
])
|
|
1332
1377
|
}, [
|
|
1333
|
-
T(ys, {
|
|
1334
|
-
collections: I.value,
|
|
1335
|
-
query: f.value.query,
|
|
1336
|
-
messages: S.value
|
|
1337
|
-
}, null, 8, ["collections", "query", "messages"]),
|
|
1338
1378
|
T(ks, {
|
|
1379
|
+
collections: w.value,
|
|
1380
|
+
query: g.value.query,
|
|
1381
|
+
messages: v.value
|
|
1382
|
+
}, null, 8, ["collections", "query", "messages"]),
|
|
1383
|
+
T(Ps, {
|
|
1339
1384
|
controller: e.controller,
|
|
1340
|
-
response:
|
|
1385
|
+
response: g.value,
|
|
1341
1386
|
locale: e.locale,
|
|
1342
|
-
messages:
|
|
1387
|
+
messages: v.value
|
|
1343
1388
|
}, null, 8, ["controller", "response", "locale", "messages"])
|
|
1344
1389
|
], 2),
|
|
1345
|
-
|
|
1346
|
-
|
|
1390
|
+
k.value || S.value ? (u(), _("div", oo, [
|
|
1391
|
+
k.value ? (u(), _("a", {
|
|
1347
1392
|
key: 0,
|
|
1348
1393
|
class: "dialog-search-cta",
|
|
1349
|
-
href:
|
|
1394
|
+
href: m.value
|
|
1350
1395
|
}, [
|
|
1351
|
-
ce(
|
|
1352
|
-
T(
|
|
1353
|
-
], 8,
|
|
1396
|
+
ce(y(v.value.seeAllLabel(g.value.nbHits)) + " ", 1),
|
|
1397
|
+
T(ps)
|
|
1398
|
+
], 8, no)) : (u(), P(Xt, {
|
|
1354
1399
|
key: 1,
|
|
1355
1400
|
controller: e.controller,
|
|
1356
1401
|
state: e.state,
|
|
1357
1402
|
locale: e.locale
|
|
1358
1403
|
}, null, 8, ["controller", "state", "locale"]))
|
|
1359
|
-
])) :
|
|
1404
|
+
])) : L("", !0)
|
|
1360
1405
|
], 64))
|
|
1361
1406
|
], 6)
|
|
1362
|
-
])) :
|
|
1407
|
+
])) : L("", !0)
|
|
1363
1408
|
], 64));
|
|
1364
1409
|
}
|
|
1365
|
-
}),
|
|
1366
|
-
const { client: e, surface: s = "search_page", ...o } = t, r =
|
|
1367
|
-
search: (
|
|
1410
|
+
}), uo = (t) => {
|
|
1411
|
+
const { client: e, surface: s = "search_page", ...o } = t, r = Xe({
|
|
1412
|
+
search: (i, p) => e.search(i, p),
|
|
1368
1413
|
analytics: {
|
|
1369
1414
|
surface: s,
|
|
1370
|
-
trackViewSearchResults: (
|
|
1371
|
-
trackSelectSearchResult: (
|
|
1415
|
+
trackViewSearchResults: (i) => e.trackViewSearchResults(i),
|
|
1416
|
+
trackSelectSearchResult: (i) => e.trackSelectSearchResult(i)
|
|
1372
1417
|
},
|
|
1373
1418
|
...o
|
|
1374
|
-
}), n =
|
|
1419
|
+
}), n = xe(r.getState()), a = r.subscribe(() => {
|
|
1375
1420
|
n.value = r.getState();
|
|
1376
1421
|
});
|
|
1377
|
-
return
|
|
1422
|
+
return K(() => {
|
|
1378
1423
|
pe({
|
|
1379
1424
|
method: "vue",
|
|
1380
|
-
version: "3.
|
|
1425
|
+
version: "3.10.0"
|
|
1381
1426
|
});
|
|
1382
|
-
}),
|
|
1383
|
-
|
|
1427
|
+
}), de(() => {
|
|
1428
|
+
a(), r.dispose();
|
|
1384
1429
|
}), { controller: r, state: n, theme: e.theme };
|
|
1385
1430
|
};
|
|
1386
1431
|
export {
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1432
|
+
Tt as DialogInput,
|
|
1433
|
+
ao as DialogProductBlock,
|
|
1434
|
+
lo as DialogSearchBar,
|
|
1435
|
+
Xt as DialogSearchPagination,
|
|
1436
|
+
ls as DialogSearchProductCard,
|
|
1437
|
+
co as DialogSearchResults,
|
|
1438
|
+
uo as useDialogSearch
|
|
1394
1439
|
};
|