@askdialog/dialog-vue 3.5.0 → 3.6.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 -6
- package/dist/components/DialogSearch/useDialogSearch.d.ts +7 -5
- package/dist/dialog-vue.js +462 -432
- package/dist/dialog-vue.umd.cjs +2 -2
- package/package.json +2 -2
package/dist/dialog-vue.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
return new Intl.Locale(t).language;
|
|
8
|
-
} catch {
|
|
9
|
-
return t;
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
var N;
|
|
1
|
+
var ae = Object.defineProperty;
|
|
2
|
+
var ce = (t, e, o) => e in t ? ae(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
|
|
3
|
+
var H = (t, e, o) => ce(t, typeof e != "symbol" ? e + "" : e, o);
|
|
4
|
+
import { defineComponent as R, createElementBlock as v, openBlock as _, createElementVNode as u, toDisplayString as k, Fragment as N, renderList as ee, createVNode as L, createBlock as O, ref as $, withDirectives as te, withKeys as le, vModelText as oe, onMounted as V, watch as U, renderSlot as de, computed as T, withCtx as ue, createCommentVNode as M, withModifiers as pe, onUnmounted as se, Teleport as _e, normalizeStyle as he, unref as q, shallowRef as fe } from "vue";
|
|
5
|
+
const ge = /* @__PURE__ */ new Set(["ar", "he", "iw", "fa", "ur"]), ve = (t) => t !== void 0 && ge.has(t.trim().toLowerCase().slice(0, 2)), me = (t) => ve(t) ? "rtl" : "ltr";
|
|
6
|
+
var x;
|
|
13
7
|
(function(t) {
|
|
14
8
|
t.OPEN_ASSISTANT = "open_assistant", 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";
|
|
15
|
-
})(
|
|
16
|
-
var
|
|
9
|
+
})(x || (x = {}));
|
|
10
|
+
var z;
|
|
17
11
|
(function(t) {
|
|
18
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";
|
|
19
|
-
})(
|
|
20
|
-
|
|
21
|
-
class
|
|
22
|
-
constructor({ status: o, code:
|
|
23
|
-
super(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
this.name = "DialogSearchError", this.status = o, this.code =
|
|
13
|
+
})(z || (z = {}));
|
|
14
|
+
x.TRACK_ADD_TO_CART, x.TRACK_SUBMIT_CHECKOUT, x.TRACK_VIEW_SEARCH_RESULTS, x.TRACK_SELECT_SEARCH_RESULT;
|
|
15
|
+
class Se extends Error {
|
|
16
|
+
constructor({ status: o, code: s, message: i }) {
|
|
17
|
+
super(i);
|
|
18
|
+
H(this, "status");
|
|
19
|
+
H(this, "code");
|
|
20
|
+
this.name = "DialogSearchError", this.status = o, this.code = s;
|
|
27
21
|
}
|
|
28
22
|
}
|
|
29
|
-
const
|
|
30
|
-
|
|
23
|
+
const j = (t, e, o) => {
|
|
24
|
+
if (!/^[a-z]{2}$/.test(e))
|
|
25
|
+
throw new Error("Search language must be a lowercase ISO 639-1 code.");
|
|
26
|
+
if (!/^[A-Za-z]{3}$/.test(o))
|
|
27
|
+
throw new Error("Search currency must be an ISO 4217 code.");
|
|
28
|
+
return `${t}_${e}_${o.toLowerCase()}`;
|
|
29
|
+
}, W = "multiple installation methods detected:", be = () => typeof window > "u" ? void 0 : window, ne = () => {
|
|
30
|
+
const t = be();
|
|
31
31
|
if (t !== void 0)
|
|
32
32
|
return t.dialog = t.dialog ?? {}, t.dialog.audit = t.dialog.audit ?? {
|
|
33
33
|
methods: [],
|
|
@@ -35,228 +35,264 @@ const Se = (t, e) => `${t}_${ve(e)}`, Q = "multiple installation methods detecte
|
|
|
35
35
|
capabilities: [],
|
|
36
36
|
warnings: []
|
|
37
37
|
}, t.dialog.audit;
|
|
38
|
-
},
|
|
39
|
-
if (t.warnings = t.warnings.filter((e) => !e.startsWith(
|
|
38
|
+
}, Ce = (t) => {
|
|
39
|
+
if (t.warnings = t.warnings.filter((e) => !e.startsWith(W)), t.methods.length >= 2) {
|
|
40
40
|
const e = t.methods.map((o) => o.method).join(", ");
|
|
41
|
-
t.warnings.push(`${
|
|
41
|
+
t.warnings.push(`${W} ${e}`);
|
|
42
42
|
}
|
|
43
43
|
}, Ee = (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
|
-
},
|
|
47
|
-
const e =
|
|
46
|
+
}, re = (t) => {
|
|
47
|
+
const e = ne();
|
|
48
48
|
if (e === void 0)
|
|
49
49
|
return;
|
|
50
|
-
const o = e.methods.find((
|
|
50
|
+
const o = e.methods.find((s) => s.method === t.method);
|
|
51
51
|
if (o === void 0) {
|
|
52
|
-
e.methods.push({ ...t, registeredAt: (/* @__PURE__ */ new Date()).toISOString() }),
|
|
52
|
+
e.methods.push({ ...t, registeredAt: (/* @__PURE__ */ new Date()).toISOString() }), Ce(e);
|
|
53
53
|
return;
|
|
54
54
|
}
|
|
55
55
|
o.version = o.version ?? t.version, o.build = Ee(o.build, t.build), o.source = o.source ?? t.source;
|
|
56
|
-
},
|
|
57
|
-
const e =
|
|
56
|
+
}, we = (t) => {
|
|
57
|
+
const e = ne();
|
|
58
58
|
e !== void 0 && (e.capabilities.includes(t) || e.capabilities.push(t));
|
|
59
|
-
},
|
|
59
|
+
}, y = {
|
|
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 ye({ emit: t, visibilityThreshold: e =
|
|
68
|
-
let
|
|
69
|
-
const
|
|
70
|
-
let
|
|
71
|
-
const
|
|
72
|
-
clearTimeout(
|
|
66
|
+
}, Ie = 0.5, Re = 500, Te = 1500, ke = 100;
|
|
67
|
+
function ye({ emit: t, visibilityThreshold: e = Ie, dwellMs: o = Re, idleFlushMs: s = Te, maxItemsPerEvent: i = ke }) {
|
|
68
|
+
let r, n = [];
|
|
69
|
+
const a = /* @__PURE__ */ new Set(), p = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map();
|
|
70
|
+
let l;
|
|
71
|
+
const h = () => {
|
|
72
|
+
clearTimeout(l), !(r === void 0 || n.length === 0) && (t({ ...r, items: n }), n = []);
|
|
73
73
|
}, S = (f) => {
|
|
74
|
-
if (
|
|
74
|
+
if (r === void 0)
|
|
75
75
|
return;
|
|
76
|
-
const
|
|
77
|
-
if (!
|
|
78
|
-
if (
|
|
79
|
-
|
|
76
|
+
const g = `${r.query_id}:${f.product_id}`;
|
|
77
|
+
if (!a.has(g)) {
|
|
78
|
+
if (a.add(g), n.push(f), n.length >= i) {
|
|
79
|
+
h();
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
|
-
clearTimeout(
|
|
82
|
+
clearTimeout(l), l = setTimeout(h, s);
|
|
83
83
|
}
|
|
84
|
-
},
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
},
|
|
88
|
-
for (const
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}, o)) :
|
|
84
|
+
}, w = (f) => {
|
|
85
|
+
const g = c.get(f);
|
|
86
|
+
g !== void 0 && (clearTimeout(g), c.delete(f));
|
|
87
|
+
}, d = new IntersectionObserver((f) => {
|
|
88
|
+
for (const g of f) {
|
|
89
|
+
const m = p.get(g.target);
|
|
90
|
+
m !== void 0 && (g.intersectionRatio >= e ? c.has(g.target) || c.set(g.target, setTimeout(() => {
|
|
91
|
+
c.delete(g.target), S(m);
|
|
92
|
+
}, o)) : w(g.target));
|
|
93
93
|
}
|
|
94
94
|
}, { threshold: e }), b = () => {
|
|
95
|
-
|
|
96
|
-
for (const f of
|
|
95
|
+
d.disconnect();
|
|
96
|
+
for (const f of c.values())
|
|
97
97
|
clearTimeout(f);
|
|
98
|
-
|
|
99
|
-
},
|
|
100
|
-
|
|
101
|
-
},
|
|
98
|
+
c.clear(), p.clear();
|
|
99
|
+
}, C = () => {
|
|
100
|
+
h();
|
|
101
|
+
}, I = (f) => {
|
|
102
102
|
if (f.persisted) {
|
|
103
|
-
|
|
104
|
-
for (const
|
|
105
|
-
|
|
103
|
+
a.clear();
|
|
104
|
+
for (const g of p.keys())
|
|
105
|
+
w(g), d.unobserve(g), d.observe(g);
|
|
106
106
|
}
|
|
107
107
|
};
|
|
108
|
-
return window.addEventListener("pagehide",
|
|
108
|
+
return window.addEventListener("pagehide", C), window.addEventListener("pageshow", I), {
|
|
109
109
|
setContext(f) {
|
|
110
|
-
|
|
110
|
+
h(), a.clear(), r = f, b();
|
|
111
111
|
},
|
|
112
|
-
observe(f,
|
|
113
|
-
|
|
112
|
+
observe(f, g) {
|
|
113
|
+
p.set(f, g), d.observe(f);
|
|
114
114
|
},
|
|
115
115
|
forceImpression(f) {
|
|
116
|
-
S(f),
|
|
116
|
+
S(f), h();
|
|
117
117
|
},
|
|
118
|
-
flush:
|
|
118
|
+
flush: h,
|
|
119
119
|
disconnect() {
|
|
120
|
-
|
|
120
|
+
h(), b(), window.removeEventListener("pagehide", C), window.removeEventListener("pageshow", I);
|
|
121
121
|
}
|
|
122
122
|
};
|
|
123
123
|
}
|
|
124
|
-
const
|
|
124
|
+
const Y = (t, e) => ({
|
|
125
125
|
product_id: t.hits[e].objectID,
|
|
126
|
-
//
|
|
126
|
+
// One-based position across all pages.
|
|
127
127
|
position: t.page * t.hitsPerPage + e + 1
|
|
128
128
|
});
|
|
129
|
-
function
|
|
129
|
+
function $e(t) {
|
|
130
130
|
let e, o;
|
|
131
|
-
const
|
|
131
|
+
const s = () => (e ?? (e = ye({
|
|
132
132
|
emit: t.trackViewSearchResults
|
|
133
133
|
})), e);
|
|
134
134
|
return {
|
|
135
|
-
onResponse(
|
|
135
|
+
onResponse(i) {
|
|
136
136
|
o = {
|
|
137
|
-
query_id:
|
|
138
|
-
index:
|
|
137
|
+
query_id: i.queryID,
|
|
138
|
+
index: i.index,
|
|
139
139
|
surface: t.surface,
|
|
140
|
-
// The storefront search API is lexical-only today.
|
|
141
140
|
search_type: "lexical",
|
|
142
|
-
//
|
|
143
|
-
page:
|
|
144
|
-
total_hits:
|
|
145
|
-
query_length: [...
|
|
146
|
-
},
|
|
141
|
+
// Convert the API page to one-based analytics numbering.
|
|
142
|
+
page: i.page + 1,
|
|
143
|
+
total_hits: i.nbHits,
|
|
144
|
+
query_length: [...i.query].length
|
|
145
|
+
}, s().setContext(o), i.nbHits === 0 && t.trackViewSearchResults({ ...o, items: [] });
|
|
147
146
|
},
|
|
148
|
-
observeResult(
|
|
149
|
-
|
|
147
|
+
observeResult(i, r, n) {
|
|
148
|
+
s().observe(i, Y(r, n));
|
|
150
149
|
},
|
|
151
|
-
select(
|
|
150
|
+
select(i, r) {
|
|
152
151
|
if (o === void 0)
|
|
153
152
|
return;
|
|
154
|
-
const
|
|
155
|
-
|
|
153
|
+
const n = Y(i, r);
|
|
154
|
+
s().forceImpression(n), t.trackSelectSearchResult({ ...o, items: [n] });
|
|
156
155
|
},
|
|
157
156
|
dispose() {
|
|
158
157
|
e == null || e.disconnect();
|
|
159
158
|
}
|
|
160
159
|
};
|
|
161
160
|
}
|
|
162
|
-
const Ae =
|
|
163
|
-
|
|
161
|
+
const Ae = 2, X = (t) => {
|
|
162
|
+
const e = t.trim();
|
|
163
|
+
return [...e].length >= Ae ? e : void 0;
|
|
164
|
+
}, Le = (t, e, o, { indexName: s, language: i, currency: r, hitsPerPage: n }) => ({
|
|
165
|
+
requests: [
|
|
166
|
+
{ indexName: s, query: t, page: e, hitsPerPage: n },
|
|
167
|
+
...o.map((a) => ({
|
|
168
|
+
indexName: j(a.index, i, r),
|
|
169
|
+
query: t,
|
|
170
|
+
page: 0,
|
|
171
|
+
hitsPerPage: a.hitsPerPage ?? n
|
|
172
|
+
}))
|
|
173
|
+
]
|
|
174
|
+
}), De = (t, e, { indexName: o, language: s, currency: i }) => {
|
|
175
|
+
const r = t.results.find((a) => a.index === o);
|
|
176
|
+
if (r === void 0)
|
|
177
|
+
throw new Error(`Dialog search returned no ${o} entry`);
|
|
178
|
+
const n = {};
|
|
179
|
+
for (const a of e) {
|
|
180
|
+
const p = j(a.index, s, i), c = t.results.find((l) => l.index === p);
|
|
181
|
+
c !== void 0 && (n[a.index] = c);
|
|
182
|
+
}
|
|
183
|
+
return {
|
|
184
|
+
response: r,
|
|
185
|
+
sections: e.length === 0 ? void 0 : n
|
|
186
|
+
};
|
|
187
|
+
}, F = {
|
|
188
|
+
status: y.IDLE,
|
|
164
189
|
query: "",
|
|
165
190
|
page: 0,
|
|
166
191
|
response: void 0,
|
|
192
|
+
sections: void 0,
|
|
167
193
|
error: void 0
|
|
168
194
|
};
|
|
169
|
-
function Pe({ search: t,
|
|
170
|
-
const
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
195
|
+
function Pe({ search: t, language: e, currency: o, analytics: s, navigate: i, debounceMs: r = 250, hitsPerPage: n = 12, sections: a = [] }) {
|
|
196
|
+
const p = {
|
|
197
|
+
indexName: j("products", e, o),
|
|
198
|
+
language: e,
|
|
199
|
+
currency: o,
|
|
200
|
+
hitsPerPage: n
|
|
201
|
+
};
|
|
202
|
+
let c = F;
|
|
203
|
+
const l = /* @__PURE__ */ new Set(), h = $e(s);
|
|
204
|
+
let S, w, d, b = 0, C = !1;
|
|
205
|
+
const I = (m) => {
|
|
206
|
+
c = { ...c, ...m };
|
|
207
|
+
for (const E of l)
|
|
208
|
+
E(c);
|
|
209
|
+
}, f = () => {
|
|
210
|
+
clearTimeout(S), w = void 0, b += 1, d == null || d.abort(), d = void 0;
|
|
211
|
+
}, g = async (m, E) => {
|
|
212
|
+
f(), d = new AbortController();
|
|
213
|
+
const D = b;
|
|
214
|
+
I({ status: y.LOADING, query: m, page: E });
|
|
186
215
|
try {
|
|
187
|
-
const
|
|
188
|
-
signal:
|
|
216
|
+
const A = typeof a == "function" ? a() : a, Q = Le(m, E, A, p), ie = await t(Q, {
|
|
217
|
+
signal: d.signal
|
|
189
218
|
});
|
|
190
|
-
if (
|
|
219
|
+
if (D !== b)
|
|
191
220
|
return;
|
|
192
|
-
const
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
status: B.nbHits === 0 ? k.EMPTY : k.SUCCESS,
|
|
197
|
-
response: B,
|
|
221
|
+
const K = De(ie, A, p);
|
|
222
|
+
h.onResponse(K.response), I({
|
|
223
|
+
...K,
|
|
224
|
+
status: K.response.nbHits === 0 ? y.EMPTY : y.SUCCESS,
|
|
198
225
|
error: void 0
|
|
199
226
|
});
|
|
200
|
-
} catch (
|
|
201
|
-
if (
|
|
227
|
+
} catch (A) {
|
|
228
|
+
if (A instanceof DOMException && A.name === "AbortError" || D !== b)
|
|
202
229
|
return;
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
return;
|
|
230
|
+
I({
|
|
231
|
+
status: y.ERROR,
|
|
232
|
+
error: A,
|
|
233
|
+
response: void 0,
|
|
234
|
+
sections: void 0
|
|
235
|
+
});
|
|
210
236
|
}
|
|
211
|
-
return v;
|
|
212
237
|
};
|
|
213
238
|
return {
|
|
214
|
-
setQuery(
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
239
|
+
setQuery(m) {
|
|
240
|
+
if (C)
|
|
241
|
+
return;
|
|
242
|
+
f();
|
|
243
|
+
const E = X(m);
|
|
244
|
+
if (E === void 0) {
|
|
245
|
+
I(F);
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
w = E, S = setTimeout(() => void g(E, 0), r);
|
|
219
249
|
},
|
|
220
|
-
submit(
|
|
221
|
-
|
|
222
|
-
|
|
250
|
+
submit(m) {
|
|
251
|
+
if (C)
|
|
252
|
+
return;
|
|
253
|
+
f();
|
|
254
|
+
const E = X(m);
|
|
255
|
+
if (E === void 0) {
|
|
256
|
+
I(F);
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
g(E, 0);
|
|
223
260
|
},
|
|
224
|
-
setPage(
|
|
225
|
-
if (!
|
|
226
|
-
if (
|
|
227
|
-
|
|
228
|
-
p = void 0, f(v, 0);
|
|
261
|
+
setPage(m) {
|
|
262
|
+
if (!C) {
|
|
263
|
+
if (w !== void 0) {
|
|
264
|
+
g(w, 0);
|
|
229
265
|
return;
|
|
230
266
|
}
|
|
231
|
-
|
|
267
|
+
c.query !== "" && g(c.query, m);
|
|
232
268
|
}
|
|
233
269
|
},
|
|
234
270
|
retry() {
|
|
235
|
-
|
|
271
|
+
C || c.status !== y.ERROR || g(c.query, c.page);
|
|
236
272
|
},
|
|
237
|
-
observeResult(
|
|
238
|
-
|
|
273
|
+
observeResult(m, E) {
|
|
274
|
+
c.response !== void 0 && h.observeResult(m, c.response, E);
|
|
239
275
|
},
|
|
240
|
-
selectResult(
|
|
241
|
-
const
|
|
242
|
-
if (
|
|
276
|
+
selectResult(m, E) {
|
|
277
|
+
const D = c.response;
|
|
278
|
+
if (D === void 0)
|
|
243
279
|
return !1;
|
|
244
|
-
h.select(
|
|
245
|
-
const
|
|
246
|
-
return ((
|
|
280
|
+
h.select(D, m);
|
|
281
|
+
const A = D.hits[m].url;
|
|
282
|
+
return ((E == null ? void 0 : E.navigate) ?? !0) && i !== void 0 && A !== void 0 ? (i(A, D.hits[m]), !0) : !1;
|
|
247
283
|
},
|
|
248
|
-
subscribe(
|
|
249
|
-
return l.add(
|
|
250
|
-
l.delete(
|
|
284
|
+
subscribe(m) {
|
|
285
|
+
return l.add(m), () => {
|
|
286
|
+
l.delete(m);
|
|
251
287
|
};
|
|
252
288
|
},
|
|
253
|
-
getState: () =>
|
|
289
|
+
getState: () => c,
|
|
254
290
|
dispose() {
|
|
255
|
-
|
|
291
|
+
C = !0, f(), l.clear(), h.dispose();
|
|
256
292
|
}
|
|
257
293
|
};
|
|
258
294
|
}
|
|
259
|
-
const
|
|
295
|
+
const xe = { class: "dialog-block-header-container" }, Ne = { class: "dialog-block-title" }, Oe = { class: "dialog-block-description" }, Ue = /* @__PURE__ */ R({
|
|
260
296
|
__name: "DialogBlockHeader",
|
|
261
297
|
props: {
|
|
262
298
|
title: {},
|
|
@@ -264,32 +300,32 @@ const Ne = { class: "dialog-block-header-container" }, Oe = { class: "dialog-blo
|
|
|
264
300
|
},
|
|
265
301
|
setup(t) {
|
|
266
302
|
const e = t;
|
|
267
|
-
return (o,
|
|
268
|
-
|
|
269
|
-
|
|
303
|
+
return (o, s) => (_(), v("div", xe, [
|
|
304
|
+
u("div", Ne, k(e.title ?? "Your expert"), 1),
|
|
305
|
+
u("div", Oe, k(e.description ?? "A question about this product?"), 1)
|
|
270
306
|
]));
|
|
271
307
|
}
|
|
272
|
-
}),
|
|
308
|
+
}), P = (t, e) => {
|
|
273
309
|
const o = t.__vccOpts || t;
|
|
274
|
-
for (const [
|
|
275
|
-
o[
|
|
310
|
+
for (const [s, i] of e)
|
|
311
|
+
o[s] = i;
|
|
276
312
|
return o;
|
|
277
|
-
}, Me = /* @__PURE__ */
|
|
313
|
+
}, Me = /* @__PURE__ */ P(Ue, [["__scopeId", "data-v-28e6dda7"]]), qe = {
|
|
278
314
|
width: "20",
|
|
279
315
|
height: "20",
|
|
280
316
|
viewBox: "0 0 20 20",
|
|
281
317
|
fill: "none",
|
|
282
318
|
xmlns: "http://www.w3.org/2000/svg"
|
|
283
|
-
}, Be = { "clip-path": "url(#clip0_466_934)" }, Ve = ["stroke"],
|
|
319
|
+
}, Be = { "clip-path": "url(#clip0_466_934)" }, Ve = ["stroke"], Ke = ["stroke"], He = /* @__PURE__ */ R({
|
|
284
320
|
__name: "AiStarsIcon",
|
|
285
321
|
props: {
|
|
286
322
|
color: {}
|
|
287
323
|
},
|
|
288
324
|
setup(t) {
|
|
289
325
|
const e = t;
|
|
290
|
-
return (o,
|
|
291
|
-
|
|
292
|
-
|
|
326
|
+
return (o, s) => (_(), v("svg", qe, [
|
|
327
|
+
u("g", Be, [
|
|
328
|
+
u("path", {
|
|
293
329
|
d: `M5.41675 10.8333L6.07046 12.1408C6.2917 12.5832 6.40232 12.8045 6.55011
|
|
294
330
|
12.9962C6.68124 13.1663 6.83375 13.3188 7.00388 13.45C7.19559 13.5977 7.41684
|
|
295
331
|
13.7084 7.85932 13.9296L9.16675 14.5833L7.85932 15.237C7.41684 15.4583 7.19559
|
|
@@ -305,7 +341,7 @@ const Ne = { class: "dialog-block-header-container" }, Oe = { class: "dialog-blo
|
|
|
305
341
|
"stroke-linecap": "round",
|
|
306
342
|
"stroke-linejoin": "round"
|
|
307
343
|
}, null, 8, Ve),
|
|
308
|
-
|
|
344
|
+
u("path", {
|
|
309
345
|
d: `M12.5001 1.66666L13.4823 4.22034C13.7173 4.83136 13.8348 5.13688 14.0175
|
|
310
346
|
5.39386C14.1795 5.62162 14.3785 5.82061 14.6062 5.98256C14.8632 6.16529 15.1687
|
|
311
347
|
6.2828 15.7797 6.5178L18.3334 7.49999L15.7797 8.48217C15.1687 8.71718 14.8632
|
|
@@ -320,11 +356,11 @@ const Ne = { class: "dialog-block-header-container" }, Oe = { class: "dialog-blo
|
|
|
320
356
|
"stroke-width": "1.5",
|
|
321
357
|
"stroke-linecap": "round",
|
|
322
358
|
"stroke-linejoin": "round"
|
|
323
|
-
}, null, 8,
|
|
359
|
+
}, null, 8, Ke)
|
|
324
360
|
]),
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
361
|
+
s[0] || (s[0] = u("defs", null, [
|
|
362
|
+
u("clipPath", { id: "clip0_466_934" }, [
|
|
363
|
+
u("rect", {
|
|
328
364
|
width: "20",
|
|
329
365
|
height: "20",
|
|
330
366
|
fill: "white"
|
|
@@ -333,7 +369,7 @@ const Ne = { class: "dialog-block-header-container" }, Oe = { class: "dialog-blo
|
|
|
333
369
|
], -1))
|
|
334
370
|
]));
|
|
335
371
|
}
|
|
336
|
-
}), Fe = ["onClick"], Ge = { class: "dialog-block-suggestions-item-label" }, je = /* @__PURE__ */
|
|
372
|
+
}), Fe = ["onClick"], Ge = { class: "dialog-block-suggestions-item-label" }, je = /* @__PURE__ */ R({
|
|
337
373
|
__name: "DialogBlockSuggestions",
|
|
338
374
|
props: {
|
|
339
375
|
client: {},
|
|
@@ -343,36 +379,36 @@ const Ne = { class: "dialog-block-header-container" }, Oe = { class: "dialog-blo
|
|
|
343
379
|
selectedVariantId: {}
|
|
344
380
|
},
|
|
345
381
|
setup(t) {
|
|
346
|
-
const e = t, o = (
|
|
382
|
+
const e = t, o = (s) => {
|
|
347
383
|
e.client.sendProductMessage({
|
|
348
384
|
productId: e.productId,
|
|
349
385
|
productTitle: e.productTitle,
|
|
350
386
|
selectedVariantId: e.selectedVariantId,
|
|
351
|
-
question:
|
|
387
|
+
question: s,
|
|
352
388
|
fromQuestionSuggestion: !0
|
|
353
389
|
});
|
|
354
390
|
};
|
|
355
|
-
return (
|
|
356
|
-
key:
|
|
391
|
+
return (s, i) => (_(!0), v(N, null, ee(e.questions, (r) => (_(), v("button", {
|
|
392
|
+
key: r.question,
|
|
357
393
|
class: "dialog-block-suggestions-item",
|
|
358
|
-
onClick: (
|
|
394
|
+
onClick: (n) => o(r.question)
|
|
359
395
|
}, [
|
|
360
|
-
|
|
396
|
+
L(He, {
|
|
361
397
|
class: "dialog-block-suggestions-item-icon",
|
|
362
398
|
color: e.client.theme.primaryColor
|
|
363
399
|
}, null, 8, ["color"]),
|
|
364
|
-
|
|
400
|
+
u("span", Ge, k(r.question), 1)
|
|
365
401
|
], 8, Fe))), 128));
|
|
366
402
|
}
|
|
367
|
-
}), Qe = /* @__PURE__ */
|
|
368
|
-
function
|
|
369
|
-
return _(),
|
|
370
|
-
e[0] || (e[0] =
|
|
371
|
-
e[1] || (e[1] =
|
|
372
|
-
e[2] || (e[2] =
|
|
403
|
+
}), Qe = /* @__PURE__ */ P(je, [["__scopeId", "data-v-db34d4b4"]]), ze = {};
|
|
404
|
+
function We(t, e) {
|
|
405
|
+
return _(), v(N, null, [
|
|
406
|
+
e[0] || (e[0] = u("div", { class: "dialog-block-suggestions-skeleton-item" }, null, -1)),
|
|
407
|
+
e[1] || (e[1] = u("div", { class: "dialog-block-suggestions-skeleton-item" }, null, -1)),
|
|
408
|
+
e[2] || (e[2] = u("div", { class: "dialog-block-suggestions-skeleton-item" }, null, -1))
|
|
373
409
|
], 64);
|
|
374
410
|
}
|
|
375
|
-
const
|
|
411
|
+
const Ye = /* @__PURE__ */ P(ze, [["render", We], ["__scopeId", "data-v-26a64b58"]]), Xe = { class: "dialog-block-suggestions-container" }, Ze = /* @__PURE__ */ R({
|
|
376
412
|
__name: "DialogBlockSuggestionsContainer",
|
|
377
413
|
props: {
|
|
378
414
|
client: {},
|
|
@@ -384,8 +420,8 @@ const ze = /* @__PURE__ */ D(We, [["render", Ye], ["__scopeId", "data-v-26a64b58
|
|
|
384
420
|
},
|
|
385
421
|
setup(t) {
|
|
386
422
|
const e = t;
|
|
387
|
-
return (o,
|
|
388
|
-
e.isLoading || !e.questions ? (_(),
|
|
423
|
+
return (o, s) => (_(), v("div", Xe, [
|
|
424
|
+
e.isLoading || !e.questions ? (_(), O(Ye, { key: 0 })) : (_(), O(Qe, {
|
|
389
425
|
key: 1,
|
|
390
426
|
client: e.client,
|
|
391
427
|
questions: e.questions,
|
|
@@ -395,21 +431,21 @@ const ze = /* @__PURE__ */ D(We, [["render", Ye], ["__scopeId", "data-v-26a64b58
|
|
|
395
431
|
}, null, 8, ["client", "questions", "product-id", "product-title", "selected-variant-id"]))
|
|
396
432
|
]));
|
|
397
433
|
}
|
|
398
|
-
}), Je = /* @__PURE__ */
|
|
434
|
+
}), Je = /* @__PURE__ */ P(Ze, [["__scopeId", "data-v-18c9e78b"]]), et = {
|
|
399
435
|
width: "20",
|
|
400
436
|
height: "20",
|
|
401
437
|
viewBox: "0 0 20 20",
|
|
402
438
|
fill: "none",
|
|
403
439
|
xmlns: "http://www.w3.org/2000/svg"
|
|
404
|
-
}, tt = ["stroke"], ot = /* @__PURE__ */
|
|
440
|
+
}, tt = ["stroke"], ot = /* @__PURE__ */ R({
|
|
405
441
|
__name: "ArrowIcon",
|
|
406
442
|
props: {
|
|
407
443
|
color: {}
|
|
408
444
|
},
|
|
409
445
|
setup(t) {
|
|
410
446
|
const e = t;
|
|
411
|
-
return (o,
|
|
412
|
-
|
|
447
|
+
return (o, s) => (_(), v("svg", et, [
|
|
448
|
+
u("path", {
|
|
413
449
|
d: "M10 16.6667V3.33334M10 3.33334L5 8.33334M10 3.33334L15 8.33334",
|
|
414
450
|
stroke: e.color || "#ffffff",
|
|
415
451
|
"stroke-width": "1.5",
|
|
@@ -418,7 +454,7 @@ const ze = /* @__PURE__ */ D(We, [["render", Ye], ["__scopeId", "data-v-26a64b58
|
|
|
418
454
|
}, null, 8, tt)
|
|
419
455
|
]));
|
|
420
456
|
}
|
|
421
|
-
}),
|
|
457
|
+
}), st = ["placeholder"], nt = ["disabled"], rt = /* @__PURE__ */ R({
|
|
422
458
|
__name: "DialogInput",
|
|
423
459
|
props: {
|
|
424
460
|
client: {},
|
|
@@ -428,93 +464,93 @@ const ze = /* @__PURE__ */ D(We, [["render", Ye], ["__scopeId", "data-v-26a64b58
|
|
|
428
464
|
selectedVariantId: {}
|
|
429
465
|
},
|
|
430
466
|
setup(t) {
|
|
431
|
-
const e = t, o =
|
|
432
|
-
var
|
|
433
|
-
(
|
|
434
|
-
},
|
|
435
|
-
const
|
|
436
|
-
|
|
467
|
+
const e = t, o = $(), s = $(""), i = () => {
|
|
468
|
+
var n;
|
|
469
|
+
(n = o.value) == null || n.focus();
|
|
470
|
+
}, r = () => {
|
|
471
|
+
const n = s.value;
|
|
472
|
+
n.trim() && (e.client.sendProductMessage({
|
|
437
473
|
productId: e.productId,
|
|
438
474
|
productTitle: e.productTitle,
|
|
439
475
|
selectedVariantId: e.selectedVariantId,
|
|
440
|
-
question:
|
|
476
|
+
question: n,
|
|
441
477
|
fromQuestionSuggestion: !0
|
|
442
|
-
}),
|
|
478
|
+
}), s.value = "");
|
|
443
479
|
};
|
|
444
|
-
return (
|
|
480
|
+
return (n, a) => (_(), v("div", {
|
|
445
481
|
class: "dialog-input-wrapper",
|
|
446
|
-
onClick:
|
|
482
|
+
onClick: i
|
|
447
483
|
}, [
|
|
448
|
-
|
|
484
|
+
te(u("input", {
|
|
449
485
|
id: "dialog-ask-anything-input-ai-input",
|
|
450
486
|
ref_key: "inputRef",
|
|
451
487
|
ref: o,
|
|
452
|
-
"onUpdate:modelValue":
|
|
488
|
+
"onUpdate:modelValue": a[0] || (a[0] = (p) => s.value = p),
|
|
453
489
|
class: "dialog-ask-anything-input-ai-input",
|
|
454
490
|
placeholder: e.placeholder ?? "Ask anything...",
|
|
455
|
-
onKeydown:
|
|
456
|
-
}, null, 40,
|
|
457
|
-
[
|
|
491
|
+
onKeydown: le(r, ["enter"])
|
|
492
|
+
}, null, 40, st), [
|
|
493
|
+
[oe, s.value]
|
|
458
494
|
]),
|
|
459
|
-
|
|
495
|
+
u("button", {
|
|
460
496
|
id: "send-message-button-ai-input",
|
|
461
497
|
class: "dialog-input-submit",
|
|
462
|
-
disabled: !
|
|
463
|
-
onClick:
|
|
498
|
+
disabled: !s.value.trim(),
|
|
499
|
+
onClick: r
|
|
464
500
|
}, [
|
|
465
|
-
|
|
501
|
+
L(ot, {
|
|
466
502
|
color: e.client.theme.ctaTextColor
|
|
467
503
|
}, null, 8, ["color"])
|
|
468
|
-
], 8,
|
|
504
|
+
], 8, nt)
|
|
469
505
|
]));
|
|
470
506
|
}
|
|
471
|
-
}), it = /* @__PURE__ */
|
|
507
|
+
}), it = /* @__PURE__ */ P(rt, [["__scopeId", "data-v-4f5901c9"]]), at = /* @__PURE__ */ R({
|
|
472
508
|
__name: "ThemeProvider",
|
|
473
509
|
props: {
|
|
474
510
|
theme: {}
|
|
475
511
|
},
|
|
476
512
|
setup(t) {
|
|
477
|
-
const e = t, o = document.body,
|
|
478
|
-
|
|
479
|
-
const
|
|
480
|
-
if (
|
|
481
|
-
if (typeof
|
|
482
|
-
Object.keys(
|
|
483
|
-
var
|
|
484
|
-
const
|
|
485
|
-
if (
|
|
486
|
-
const S =
|
|
513
|
+
const e = t, o = document.body, s = (r) => r.replace(/([A-Z])/g, "-$1").toLowerCase(), i = (r) => {
|
|
514
|
+
r && Object.keys(r).forEach((n) => {
|
|
515
|
+
const a = n, p = s(n);
|
|
516
|
+
if (r[a] !== void 0) {
|
|
517
|
+
if (typeof r[a] == "object") {
|
|
518
|
+
Object.keys(r[a]).forEach((c) => {
|
|
519
|
+
var h;
|
|
520
|
+
const l = c;
|
|
521
|
+
if (l !== void 0) {
|
|
522
|
+
const S = s(c), w = r[a];
|
|
487
523
|
o.style.setProperty(
|
|
488
|
-
`--dialog-theme-${
|
|
489
|
-
(
|
|
524
|
+
`--dialog-theme-${p}-${S}`,
|
|
525
|
+
(h = w[l]) == null ? void 0 : h.toString()
|
|
490
526
|
);
|
|
491
527
|
}
|
|
492
528
|
});
|
|
493
529
|
return;
|
|
494
530
|
}
|
|
495
|
-
if (
|
|
496
|
-
const
|
|
497
|
-
o.style.setProperty(`--dialog-theme-${
|
|
531
|
+
if (a === "ctaBorderType") {
|
|
532
|
+
const c = r[a] === "rounded" ? "24px" : "0";
|
|
533
|
+
o.style.setProperty(`--dialog-theme-${p}`, c);
|
|
498
534
|
return;
|
|
499
535
|
}
|
|
500
536
|
o.style.setProperty(
|
|
501
|
-
`--dialog-theme-${
|
|
502
|
-
|
|
537
|
+
`--dialog-theme-${p}`,
|
|
538
|
+
r[a].toString()
|
|
503
539
|
);
|
|
504
540
|
}
|
|
505
541
|
});
|
|
506
542
|
};
|
|
507
|
-
return
|
|
508
|
-
e.theme &&
|
|
543
|
+
return V(() => {
|
|
544
|
+
e.theme && i(e.theme);
|
|
509
545
|
}), U(
|
|
510
546
|
() => e.theme,
|
|
511
|
-
(
|
|
512
|
-
|
|
547
|
+
(r) => {
|
|
548
|
+
r && i(r);
|
|
513
549
|
},
|
|
514
550
|
{ deep: !0 }
|
|
515
|
-
), (
|
|
551
|
+
), (r, n) => de(r.$slots, "default");
|
|
516
552
|
}
|
|
517
|
-
}), ct = ["dir"], lt = /* @__PURE__ */
|
|
553
|
+
}), ct = ["dir"], lt = /* @__PURE__ */ R({
|
|
518
554
|
__name: "DialogProductBlock",
|
|
519
555
|
props: {
|
|
520
556
|
client: {},
|
|
@@ -525,73 +561,73 @@ const ze = /* @__PURE__ */ D(We, [["render", Ye], ["__scopeId", "data-v-26a64b58
|
|
|
525
561
|
},
|
|
526
562
|
setup(t) {
|
|
527
563
|
const e = t;
|
|
528
|
-
|
|
529
|
-
|
|
564
|
+
V(() => {
|
|
565
|
+
re({
|
|
530
566
|
method: "vue",
|
|
531
|
-
version: "3.
|
|
532
|
-
}),
|
|
567
|
+
version: "3.6.0"
|
|
568
|
+
}), we("pdp-block");
|
|
533
569
|
});
|
|
534
|
-
const o =
|
|
535
|
-
var
|
|
536
|
-
return o.value ? "" : (
|
|
537
|
-
}),
|
|
538
|
-
var
|
|
539
|
-
return o.value ? "" : (
|
|
540
|
-
}),
|
|
541
|
-
var
|
|
542
|
-
return o.value ? "" : (
|
|
543
|
-
}),
|
|
570
|
+
const o = $(!0), s = $(void 0), i = $(0), r = T(() => {
|
|
571
|
+
var l;
|
|
572
|
+
return o.value ? "" : (l = s.value) == null ? void 0 : l.assistantName;
|
|
573
|
+
}), n = T(() => {
|
|
574
|
+
var l;
|
|
575
|
+
return o.value ? "" : (l = s.value) == null ? void 0 : l.description;
|
|
576
|
+
}), a = T(() => {
|
|
577
|
+
var l;
|
|
578
|
+
return o.value ? "" : (l = s.value) == null ? void 0 : l.inputPlaceholder;
|
|
579
|
+
}), p = T(
|
|
544
580
|
() => {
|
|
545
|
-
var
|
|
546
|
-
return
|
|
547
|
-
(
|
|
581
|
+
var l;
|
|
582
|
+
return me(
|
|
583
|
+
(l = e.client.getLocalizationInformations()) == null ? void 0 : l.languageCode
|
|
548
584
|
);
|
|
549
585
|
}
|
|
550
|
-
),
|
|
551
|
-
const
|
|
552
|
-
o.value = !0,
|
|
586
|
+
), c = async () => {
|
|
587
|
+
const l = ++i.value;
|
|
588
|
+
o.value = !0, s.value = void 0;
|
|
553
589
|
try {
|
|
554
|
-
const
|
|
555
|
-
|
|
556
|
-
} catch (
|
|
557
|
-
console.error("error",
|
|
590
|
+
const h = await e.client.getSuggestions(e.productId);
|
|
591
|
+
l === i.value && (s.value = h);
|
|
592
|
+
} catch (h) {
|
|
593
|
+
console.error("error", h);
|
|
558
594
|
} finally {
|
|
559
|
-
|
|
595
|
+
l === i.value && (o.value = !1);
|
|
560
596
|
}
|
|
561
597
|
};
|
|
562
598
|
return U(
|
|
563
599
|
() => [e.client, e.productId],
|
|
564
600
|
() => {
|
|
565
|
-
|
|
601
|
+
c();
|
|
566
602
|
},
|
|
567
603
|
{ immediate: !0 }
|
|
568
|
-
), (
|
|
604
|
+
), (l, h) => (_(), O(at, {
|
|
569
605
|
theme: e.client.theme
|
|
570
606
|
}, {
|
|
571
|
-
default:
|
|
607
|
+
default: ue(() => {
|
|
572
608
|
var S;
|
|
573
609
|
return [
|
|
574
|
-
|
|
610
|
+
u("div", {
|
|
575
611
|
id: "dialog-instant",
|
|
576
612
|
class: "dialog-block-container",
|
|
577
|
-
dir:
|
|
613
|
+
dir: p.value
|
|
578
614
|
}, [
|
|
579
|
-
|
|
580
|
-
title:
|
|
581
|
-
description:
|
|
615
|
+
L(Me, {
|
|
616
|
+
title: r.value,
|
|
617
|
+
description: n.value
|
|
582
618
|
}, null, 8, ["title", "description"]),
|
|
583
|
-
|
|
619
|
+
L(Je, {
|
|
584
620
|
client: e.client,
|
|
585
|
-
questions: (S =
|
|
621
|
+
questions: (S = s.value) == null ? void 0 : S.questions,
|
|
586
622
|
"is-loading": o.value,
|
|
587
623
|
"product-id": e.productId,
|
|
588
624
|
"product-title": e.productTitle,
|
|
589
625
|
"selected-variant-id": e == null ? void 0 : e.selectedVariantId
|
|
590
626
|
}, null, 8, ["client", "questions", "is-loading", "product-id", "product-title", "selected-variant-id"]),
|
|
591
|
-
e.enableInput ? (_(),
|
|
627
|
+
e.enableInput ? (_(), O(it, {
|
|
592
628
|
key: 0,
|
|
593
629
|
client: e.client,
|
|
594
|
-
placeholder:
|
|
630
|
+
placeholder: a.value,
|
|
595
631
|
"product-id": e.productId,
|
|
596
632
|
"product-title": e.productTitle,
|
|
597
633
|
"selected-variant-id": e == null ? void 0 : e.selectedVariantId
|
|
@@ -602,7 +638,7 @@ const ze = /* @__PURE__ */ D(We, [["render", Ye], ["__scopeId", "data-v-26a64b58
|
|
|
602
638
|
_: 1
|
|
603
639
|
}, 8, ["theme"]));
|
|
604
640
|
}
|
|
605
|
-
}),
|
|
641
|
+
}), zt = /* @__PURE__ */ P(lt, [["__scopeId", "data-v-c57aa677"]]), dt = {}, ut = {
|
|
606
642
|
width: "16",
|
|
607
643
|
height: "16",
|
|
608
644
|
viewBox: "0 0 16 16",
|
|
@@ -611,8 +647,8 @@ const ze = /* @__PURE__ */ D(We, [["render", Ye], ["__scopeId", "data-v-26a64b58
|
|
|
611
647
|
"aria-hidden": "true"
|
|
612
648
|
};
|
|
613
649
|
function pt(t, e) {
|
|
614
|
-
return _(),
|
|
615
|
-
|
|
650
|
+
return _(), v("svg", ut, e[0] || (e[0] = [
|
|
651
|
+
u("path", {
|
|
616
652
|
d: "M8 13V3M8 3L3 8M8 3L13 8",
|
|
617
653
|
stroke: "currentColor",
|
|
618
654
|
"stroke-width": "1.5",
|
|
@@ -621,28 +657,28 @@ function pt(t, e) {
|
|
|
621
657
|
}, null, -1)
|
|
622
658
|
]));
|
|
623
659
|
}
|
|
624
|
-
const _t = /* @__PURE__ */
|
|
660
|
+
const _t = /* @__PURE__ */ P(dt, [["render", pt]]), ht = {
|
|
625
661
|
width: "16",
|
|
626
662
|
height: "16",
|
|
627
663
|
viewBox: "0 0 12 12",
|
|
628
664
|
fill: "none",
|
|
629
665
|
xmlns: "http://www.w3.org/2000/svg",
|
|
630
666
|
"aria-hidden": "true"
|
|
631
|
-
}, ft = ["fill"], gt = "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__ */
|
|
667
|
+
}, ft = ["fill"], gt = "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__ */ R({
|
|
632
668
|
__name: "ShurikenIcon",
|
|
633
669
|
props: {
|
|
634
670
|
color: {}
|
|
635
671
|
},
|
|
636
672
|
setup(t) {
|
|
637
673
|
const e = t;
|
|
638
|
-
return (o,
|
|
639
|
-
|
|
674
|
+
return (o, s) => (_(), v("svg", ht, [
|
|
675
|
+
u("path", {
|
|
640
676
|
d: gt,
|
|
641
677
|
fill: e.color || "currentColor"
|
|
642
678
|
}, null, 8, ft)
|
|
643
679
|
]));
|
|
644
680
|
}
|
|
645
|
-
}), mt = { class: "dialog-search-bar-field" }, St = { class: "dialog-search-bar-icon" },
|
|
681
|
+
}), mt = { class: "dialog-search-bar-field" }, St = { class: "dialog-search-bar-icon" }, bt = ["aria-label", "placeholder", "autofocus"], Ct = ["aria-label"], Wt = /* @__PURE__ */ R({
|
|
646
682
|
__name: "DialogSearchBar",
|
|
647
683
|
props: {
|
|
648
684
|
controller: {},
|
|
@@ -651,47 +687,47 @@ const _t = /* @__PURE__ */ D(dt, [["render", pt]]), ht = {
|
|
|
651
687
|
submitAriaLabel: { default: "Search" }
|
|
652
688
|
},
|
|
653
689
|
setup(t) {
|
|
654
|
-
const e = t, o =
|
|
690
|
+
const e = t, o = $(""), s = () => {
|
|
655
691
|
e.controller.setQuery(o.value);
|
|
656
|
-
},
|
|
692
|
+
}, i = () => {
|
|
657
693
|
e.controller.submit(o.value);
|
|
658
694
|
};
|
|
659
|
-
return (
|
|
695
|
+
return (r, n) => (_(), v("form", {
|
|
660
696
|
class: "dialog-search-bar",
|
|
661
697
|
role: "search",
|
|
662
|
-
onSubmit:
|
|
698
|
+
onSubmit: pe(i, ["prevent"])
|
|
663
699
|
}, [
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
700
|
+
u("div", mt, [
|
|
701
|
+
u("span", St, [
|
|
702
|
+
L(vt)
|
|
667
703
|
]),
|
|
668
|
-
|
|
669
|
-
"onUpdate:modelValue":
|
|
704
|
+
te(u("input", {
|
|
705
|
+
"onUpdate:modelValue": n[0] || (n[0] = (a) => o.value = a),
|
|
670
706
|
type: "text",
|
|
671
707
|
name: "dialog-search-query",
|
|
672
708
|
class: "dialog-search-bar-input",
|
|
673
709
|
"aria-label": e.placeholder,
|
|
674
710
|
placeholder: e.placeholder,
|
|
675
711
|
autofocus: e.autoFocus,
|
|
676
|
-
onInput:
|
|
677
|
-
}, null, 40,
|
|
678
|
-
[
|
|
712
|
+
onInput: s
|
|
713
|
+
}, null, 40, bt), [
|
|
714
|
+
[oe, o.value]
|
|
679
715
|
])
|
|
680
716
|
]),
|
|
681
|
-
|
|
717
|
+
u("button", {
|
|
682
718
|
type: "submit",
|
|
683
719
|
class: "dialog-search-bar-submit",
|
|
684
720
|
"aria-label": e.submitAriaLabel
|
|
685
721
|
}, [
|
|
686
|
-
|
|
687
|
-
], 8,
|
|
722
|
+
L(_t)
|
|
723
|
+
], 8, Ct)
|
|
688
724
|
], 32));
|
|
689
725
|
}
|
|
690
726
|
}), Et = {
|
|
691
727
|
key: 0,
|
|
692
728
|
"aria-label": "Search results pages",
|
|
693
729
|
class: "dialog-search-pagination"
|
|
694
|
-
},
|
|
730
|
+
}, wt = ["disabled"], It = ["disabled"], Rt = /* @__PURE__ */ R({
|
|
695
731
|
__name: "DialogSearchPagination",
|
|
696
732
|
props: {
|
|
697
733
|
controller: {},
|
|
@@ -699,28 +735,28 @@ const _t = /* @__PURE__ */ D(dt, [["render", pt]]), ht = {
|
|
|
699
735
|
},
|
|
700
736
|
setup(t) {
|
|
701
737
|
const e = t, o = T(() => e.state.response);
|
|
702
|
-
return (
|
|
703
|
-
|
|
738
|
+
return (s, i) => o.value !== void 0 && o.value.nbPages > 1 ? (_(), v("nav", Et, [
|
|
739
|
+
u("button", {
|
|
704
740
|
type: "button",
|
|
705
741
|
disabled: o.value.page === 0,
|
|
706
|
-
onClick:
|
|
707
|
-
}, " Previous ", 8,
|
|
708
|
-
|
|
709
|
-
|
|
742
|
+
onClick: i[0] || (i[0] = (r) => e.controller.setPage(o.value.page - 1))
|
|
743
|
+
}, " Previous ", 8, wt),
|
|
744
|
+
u("span", null, " Page " + k(o.value.page + 1) + " / " + k(o.value.nbPages), 1),
|
|
745
|
+
u("button", {
|
|
710
746
|
type: "button",
|
|
711
747
|
disabled: o.value.page >= o.value.nbPages - 1,
|
|
712
|
-
onClick:
|
|
713
|
-
}, " Next ", 8,
|
|
748
|
+
onClick: i[1] || (i[1] = (r) => e.controller.setPage(o.value.page + 1))
|
|
749
|
+
}, " Next ", 8, It)
|
|
714
750
|
])) : M("", !0);
|
|
715
751
|
}
|
|
716
752
|
}), G = ({ amount: t, currencyCode: e }, o) => e === void 0 ? new Intl.NumberFormat(o).format(Number(t)) : new Intl.NumberFormat(o, {
|
|
717
753
|
style: "currency",
|
|
718
754
|
currency: e
|
|
719
|
-
}).format(Number(t)),
|
|
755
|
+
}).format(Number(t)), Tt = ({ min: t, max: e }, o) => t.amount === e.amount ? G(t, o) : `${G(t, o)} – ${G(e, o)}`, kt = (t, e) => {
|
|
720
756
|
if (t === void 0)
|
|
721
757
|
return "";
|
|
722
758
|
try {
|
|
723
|
-
return
|
|
759
|
+
return Tt(t, e);
|
|
724
760
|
} catch {
|
|
725
761
|
return "";
|
|
726
762
|
}
|
|
@@ -731,38 +767,38 @@ const _t = /* @__PURE__ */ D(dt, [["render", pt]]), ht = {
|
|
|
731
767
|
} catch {
|
|
732
768
|
return;
|
|
733
769
|
}
|
|
734
|
-
},
|
|
770
|
+
}, $t = { class: "dialog-search-card-image" }, At = ["src", "alt"], Lt = { class: "dialog-search-card-info" }, Dt = { class: "dialog-search-card-title" }, Pt = {
|
|
735
771
|
key: 0,
|
|
736
772
|
class: "dialog-search-card-price"
|
|
737
|
-
},
|
|
773
|
+
}, Z = /* @__PURE__ */ R({
|
|
738
774
|
__name: "DialogSearchProductCardContent",
|
|
739
775
|
props: {
|
|
740
776
|
hit: {},
|
|
741
777
|
locale: {}
|
|
742
778
|
},
|
|
743
779
|
setup(t) {
|
|
744
|
-
const e = t, o = T(() => e.hit.title ?? e.hit.objectID),
|
|
780
|
+
const e = t, o = T(() => e.hit.title ?? e.hit.objectID), s = T(
|
|
745
781
|
() => kt(e.hit.priceRange, e.locale)
|
|
746
782
|
);
|
|
747
|
-
return (
|
|
748
|
-
|
|
749
|
-
e.hit.imageUrl !== void 0 ? (_(),
|
|
783
|
+
return (i, r) => (_(), v(N, null, [
|
|
784
|
+
u("div", $t, [
|
|
785
|
+
e.hit.imageUrl !== void 0 ? (_(), v("img", {
|
|
750
786
|
key: 0,
|
|
751
787
|
src: e.hit.imageUrl,
|
|
752
788
|
alt: o.value,
|
|
753
789
|
loading: "lazy"
|
|
754
790
|
}, null, 8, At)) : M("", !0)
|
|
755
791
|
]),
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
792
|
+
u("div", Lt, [
|
|
793
|
+
u("p", Dt, k(o.value), 1),
|
|
794
|
+
s.value !== "" ? (_(), v("p", Pt, k(s.value), 1)) : M("", !0)
|
|
759
795
|
])
|
|
760
796
|
], 64));
|
|
761
797
|
}
|
|
762
|
-
}),
|
|
798
|
+
}), xt = {
|
|
763
799
|
key: 0,
|
|
764
800
|
class: "dialog-search-card-body"
|
|
765
|
-
},
|
|
801
|
+
}, Nt = ["href"], Ot = /* @__PURE__ */ R({
|
|
766
802
|
__name: "DialogSearchProductCard",
|
|
767
803
|
props: {
|
|
768
804
|
controller: {},
|
|
@@ -771,7 +807,7 @@ const _t = /* @__PURE__ */ D(dt, [["render", pt]]), ht = {
|
|
|
771
807
|
locale: {}
|
|
772
808
|
},
|
|
773
809
|
setup(t) {
|
|
774
|
-
const e = t, o =
|
|
810
|
+
const e = t, o = $();
|
|
775
811
|
U(
|
|
776
812
|
() => e.hit,
|
|
777
813
|
() => {
|
|
@@ -779,63 +815,63 @@ const _t = /* @__PURE__ */ D(dt, [["render", pt]]), ht = {
|
|
|
779
815
|
},
|
|
780
816
|
{ immediate: !0, flush: "post" }
|
|
781
817
|
);
|
|
782
|
-
const
|
|
783
|
-
const
|
|
784
|
-
e.controller.selectResult(e.index, { navigate: !
|
|
785
|
-
},
|
|
786
|
-
|
|
787
|
-
},
|
|
818
|
+
const s = (n) => {
|
|
819
|
+
const a = n.metaKey || n.ctrlKey || n.shiftKey || n.altKey;
|
|
820
|
+
e.controller.selectResult(e.index, { navigate: !a }) && n.preventDefault();
|
|
821
|
+
}, i = (n) => {
|
|
822
|
+
n.button === 1 && e.controller.selectResult(e.index, { navigate: !1 });
|
|
823
|
+
}, r = T(
|
|
788
824
|
() => e.hit.url === void 0 ? void 0 : yt(e.hit.url)
|
|
789
825
|
);
|
|
790
|
-
return (
|
|
826
|
+
return (n, a) => (_(), v("li", {
|
|
791
827
|
ref_key: "cardRef",
|
|
792
828
|
ref: o,
|
|
793
829
|
class: "dialog-search-card"
|
|
794
830
|
}, [
|
|
795
|
-
|
|
796
|
-
|
|
831
|
+
r.value === void 0 ? (_(), v("div", xt, [
|
|
832
|
+
L(Z, {
|
|
797
833
|
hit: e.hit,
|
|
798
834
|
locale: e.locale
|
|
799
835
|
}, null, 8, ["hit", "locale"])
|
|
800
|
-
])) : (_(),
|
|
836
|
+
])) : (_(), v("a", {
|
|
801
837
|
key: 1,
|
|
802
838
|
class: "dialog-search-card-body",
|
|
803
|
-
href:
|
|
804
|
-
onClick:
|
|
805
|
-
onAuxclick:
|
|
839
|
+
href: r.value,
|
|
840
|
+
onClick: s,
|
|
841
|
+
onAuxclick: i
|
|
806
842
|
}, [
|
|
807
|
-
|
|
843
|
+
L(Z, {
|
|
808
844
|
hit: e.hit,
|
|
809
845
|
locale: e.locale
|
|
810
846
|
}, null, 8, ["hit", "locale"])
|
|
811
|
-
], 40,
|
|
847
|
+
], 40, Nt))
|
|
812
848
|
], 512));
|
|
813
849
|
}
|
|
814
850
|
}), Ut = (t) => {
|
|
815
|
-
const e =
|
|
851
|
+
const e = $(), o = $(void 0), s = $(0);
|
|
816
852
|
return U(
|
|
817
853
|
t,
|
|
818
|
-
(
|
|
819
|
-
if (!
|
|
854
|
+
(i, r, n) => {
|
|
855
|
+
if (!i)
|
|
820
856
|
return;
|
|
821
|
-
const
|
|
822
|
-
const
|
|
823
|
-
if (
|
|
857
|
+
const a = () => {
|
|
858
|
+
const p = e.value;
|
|
859
|
+
if (p === void 0)
|
|
824
860
|
return;
|
|
825
|
-
const
|
|
826
|
-
|
|
827
|
-
const
|
|
828
|
-
(
|
|
861
|
+
const c = p.previousElementSibling ?? p, { top: l, bottom: h, left: S, width: w } = c.getBoundingClientRect();
|
|
862
|
+
s.value = window.innerHeight;
|
|
863
|
+
const d = o.value;
|
|
864
|
+
(d === void 0 || d.top !== l || d.bottom !== h || d.left !== S || d.width !== w) && (o.value = { top: l, bottom: h, left: S, width: w });
|
|
829
865
|
};
|
|
830
|
-
|
|
831
|
-
window.removeEventListener("scroll",
|
|
866
|
+
a(), window.addEventListener("scroll", a, !0), window.addEventListener("resize", a), n(() => {
|
|
867
|
+
window.removeEventListener("scroll", a, !0), window.removeEventListener("resize", a);
|
|
832
868
|
});
|
|
833
869
|
},
|
|
834
870
|
{ immediate: !0, flush: "post" }
|
|
835
|
-
), { anchorRef: e, rect: o, viewportHeight:
|
|
871
|
+
), { anchorRef: e, rect: o, viewportHeight: s };
|
|
836
872
|
}, Mt = (t, e) => {
|
|
837
|
-
const o =
|
|
838
|
-
() => t.value.status !==
|
|
873
|
+
const o = $(!1), s = $(), i = T(
|
|
874
|
+
() => t.value.status !== y.IDLE && !o.value
|
|
839
875
|
);
|
|
840
876
|
U(
|
|
841
877
|
() => t.value.query,
|
|
@@ -843,40 +879,40 @@ const _t = /* @__PURE__ */ D(dt, [["render", pt]]), ht = {
|
|
|
843
879
|
o.value = !1;
|
|
844
880
|
}
|
|
845
881
|
), U(
|
|
846
|
-
|
|
847
|
-
(
|
|
848
|
-
if (!
|
|
882
|
+
i,
|
|
883
|
+
(n, a, p) => {
|
|
884
|
+
if (!n)
|
|
849
885
|
return;
|
|
850
|
-
const
|
|
851
|
-
var b,
|
|
852
|
-
const
|
|
853
|
-
if (!(
|
|
886
|
+
const c = (l) => {
|
|
887
|
+
var b, C;
|
|
888
|
+
const h = l.target;
|
|
889
|
+
if (!(h instanceof Node))
|
|
854
890
|
return;
|
|
855
|
-
const S = (b = e.value) == null ? void 0 : b.previousElementSibling,
|
|
856
|
-
!
|
|
891
|
+
const S = (b = e.value) == null ? void 0 : b.previousElementSibling, w = ((C = s.value) == null ? void 0 : C.contains(h)) ?? !1, d = (S == null ? void 0 : S.contains(h)) ?? !1;
|
|
892
|
+
!w && !d && (o.value = !0);
|
|
857
893
|
};
|
|
858
|
-
document.addEventListener("pointerdown",
|
|
859
|
-
() => document.removeEventListener("pointerdown",
|
|
894
|
+
document.addEventListener("pointerdown", c), p(
|
|
895
|
+
() => document.removeEventListener("pointerdown", c)
|
|
860
896
|
);
|
|
861
897
|
},
|
|
862
898
|
{ immediate: !0 }
|
|
863
899
|
);
|
|
864
|
-
const
|
|
900
|
+
const r = () => {
|
|
865
901
|
o.value = !1;
|
|
866
902
|
};
|
|
867
|
-
return
|
|
868
|
-
var
|
|
869
|
-
(
|
|
903
|
+
return V(() => {
|
|
904
|
+
var n, a;
|
|
905
|
+
(a = (n = e.value) == null ? void 0 : n.previousElementSibling) == null || a.addEventListener(
|
|
870
906
|
"focusin",
|
|
871
|
-
|
|
907
|
+
r
|
|
872
908
|
);
|
|
873
|
-
}),
|
|
874
|
-
var
|
|
875
|
-
(
|
|
909
|
+
}), se(() => {
|
|
910
|
+
var n, a;
|
|
911
|
+
(a = (n = e.value) == null ? void 0 : n.previousElementSibling) == null || a.removeEventListener(
|
|
876
912
|
"focusin",
|
|
877
|
-
|
|
913
|
+
r
|
|
878
914
|
);
|
|
879
|
-
}), { isOpen:
|
|
915
|
+
}), { isOpen: i, panelRef: s };
|
|
880
916
|
}, qt = {
|
|
881
917
|
key: 0,
|
|
882
918
|
role: "status",
|
|
@@ -887,14 +923,14 @@ const _t = /* @__PURE__ */ D(dt, [["render", pt]]), ht = {
|
|
|
887
923
|
}, Vt = {
|
|
888
924
|
role: "alert",
|
|
889
925
|
class: "dialog-search-status dialog-search-status-error"
|
|
890
|
-
},
|
|
926
|
+
}, Kt = {
|
|
891
927
|
key: 2,
|
|
892
928
|
role: "status",
|
|
893
929
|
class: "dialog-search-status"
|
|
894
|
-
},
|
|
930
|
+
}, Ht = {
|
|
895
931
|
role: "status",
|
|
896
932
|
class: "dialog-search-status"
|
|
897
|
-
}, Ft = { class: "dialog-search-results" },
|
|
933
|
+
}, Ft = { class: "dialog-search-results" }, B = 8, J = 16, Gt = 200, Yt = /* @__PURE__ */ R({
|
|
898
934
|
__name: "DialogSearchResults",
|
|
899
935
|
props: {
|
|
900
936
|
controller: {},
|
|
@@ -902,58 +938,58 @@ const _t = /* @__PURE__ */ D(dt, [["render", pt]]), ht = {
|
|
|
902
938
|
locale: {}
|
|
903
939
|
},
|
|
904
940
|
setup(t) {
|
|
905
|
-
const e = t, o = (
|
|
906
|
-
const
|
|
907
|
-
return
|
|
941
|
+
const e = t, o = (d) => d instanceof Se ? `Search failed (${d.status}${d.code ? ` ${d.code}` : ""}): ${d.message}` : "Search failed: network error. Check your connection and try again.", s = (d, b) => d.bottom > 0 && d.top < b, i = (d, b) => {
|
|
942
|
+
const C = b - d.bottom - B - J, I = d.top - B - J, f = { left: `${d.left}px`, width: `${d.width}px` };
|
|
943
|
+
return C < Gt && I > C ? {
|
|
908
944
|
...f,
|
|
909
|
-
bottom: `${b -
|
|
910
|
-
maxHeight: `${Math.max(
|
|
945
|
+
bottom: `${b - d.top + B}px`,
|
|
946
|
+
maxHeight: `${Math.max(I, 0)}px`
|
|
911
947
|
} : {
|
|
912
948
|
...f,
|
|
913
|
-
top: `${
|
|
914
|
-
maxHeight: `${Math.max(
|
|
949
|
+
top: `${d.bottom + B}px`,
|
|
950
|
+
maxHeight: `${Math.max(C, 0)}px`
|
|
915
951
|
};
|
|
916
|
-
},
|
|
917
|
-
() =>
|
|
918
|
-
),
|
|
919
|
-
() =>
|
|
952
|
+
}, r = T(() => e.state), n = T(() => e.state.status !== y.IDLE), { anchorRef: a, rect: p, viewportHeight: c } = Ut(n), { isOpen: l, panelRef: h } = Mt(r, a), S = T(
|
|
953
|
+
() => l.value && p.value !== void 0 && s(p.value, c.value)
|
|
954
|
+
), w = T(
|
|
955
|
+
() => p.value === void 0 ? void 0 : i(p.value, c.value)
|
|
920
956
|
);
|
|
921
|
-
return (
|
|
922
|
-
var
|
|
923
|
-
return _(),
|
|
924
|
-
|
|
957
|
+
return (d, b) => {
|
|
958
|
+
var C;
|
|
959
|
+
return _(), v(N, null, [
|
|
960
|
+
u("div", {
|
|
925
961
|
ref_key: "anchorRef",
|
|
926
|
-
ref:
|
|
962
|
+
ref: a
|
|
927
963
|
}, null, 512),
|
|
928
|
-
S.value ? (_(),
|
|
964
|
+
S.value ? (_(), O(_e, {
|
|
929
965
|
key: 0,
|
|
930
966
|
to: "body"
|
|
931
967
|
}, [
|
|
932
|
-
|
|
968
|
+
u("div", {
|
|
933
969
|
ref_key: "panelRef",
|
|
934
|
-
ref:
|
|
970
|
+
ref: h,
|
|
935
971
|
class: "dialog-search-panel",
|
|
936
|
-
style:
|
|
972
|
+
style: he(w.value)
|
|
937
973
|
}, [
|
|
938
|
-
e.state.status ===
|
|
939
|
-
|
|
940
|
-
|
|
974
|
+
e.state.status === q(y).LOADING ? (_(), v("p", qt, " Searching “" + k(e.state.query) + "”… ", 1)) : e.state.status === q(y).ERROR ? (_(), v("div", Bt, [
|
|
975
|
+
u("p", Vt, k(o(e.state.error)), 1),
|
|
976
|
+
u("button", {
|
|
941
977
|
type: "button",
|
|
942
978
|
class: "dialog-search-retry",
|
|
943
|
-
onClick: b[0] || (b[0] = (
|
|
979
|
+
onClick: b[0] || (b[0] = (I) => e.controller.retry())
|
|
944
980
|
}, " Retry ")
|
|
945
|
-
])) : e.state.status ===
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
(_(!0),
|
|
949
|
-
key:
|
|
981
|
+
])) : e.state.status === q(y).EMPTY ? (_(), v("p", Kt, " No products match “" + k((C = e.state.response) == null ? void 0 : C.query) + "”. ", 1)) : e.state.status === q(y).SUCCESS && e.state.response !== void 0 ? (_(), v(N, { key: 3 }, [
|
|
982
|
+
u("p", Ht, k(e.state.response.nbHits) + " result" + k(e.state.response.nbHits > 1 ? "s" : ""), 1),
|
|
983
|
+
u("ul", Ft, [
|
|
984
|
+
(_(!0), v(N, null, ee(e.state.response.hits, (I, f) => (_(), O(Ot, {
|
|
985
|
+
key: I.objectID,
|
|
950
986
|
controller: e.controller,
|
|
951
|
-
hit:
|
|
987
|
+
hit: I,
|
|
952
988
|
index: f,
|
|
953
989
|
locale: e.locale
|
|
954
990
|
}, null, 8, ["controller", "hit", "index", "locale"]))), 128))
|
|
955
991
|
]),
|
|
956
|
-
|
|
992
|
+
L(Rt, {
|
|
957
993
|
controller: e.controller,
|
|
958
994
|
state: e.state
|
|
959
995
|
}, null, 8, ["controller", "state"])
|
|
@@ -964,38 +1000,32 @@ const _t = /* @__PURE__ */ D(dt, [["render", pt]]), ht = {
|
|
|
964
1000
|
};
|
|
965
1001
|
}
|
|
966
1002
|
}), Xt = (t) => {
|
|
967
|
-
const {
|
|
968
|
-
|
|
969
|
-
surface: o = "search_page",
|
|
970
|
-
locale: n = e.locale,
|
|
971
|
-
...a
|
|
972
|
-
} = t, s = Pe({
|
|
973
|
-
search: (l, h) => e.search(l, h),
|
|
974
|
-
locale: n,
|
|
1003
|
+
const { client: e, surface: o = "search_page", ...s } = t, i = Pe({
|
|
1004
|
+
search: (a, p) => e.search(a, p),
|
|
975
1005
|
analytics: {
|
|
976
1006
|
surface: o,
|
|
977
|
-
trackViewSearchResults: (
|
|
978
|
-
trackSelectSearchResult: (
|
|
1007
|
+
trackViewSearchResults: (a) => e.trackViewSearchResults(a),
|
|
1008
|
+
trackSelectSearchResult: (a) => e.trackSelectSearchResult(a)
|
|
979
1009
|
},
|
|
980
|
-
...
|
|
981
|
-
}), r =
|
|
982
|
-
r.value =
|
|
1010
|
+
...s
|
|
1011
|
+
}), r = fe(i.getState()), n = i.subscribe(() => {
|
|
1012
|
+
r.value = i.getState();
|
|
983
1013
|
});
|
|
984
|
-
return
|
|
985
|
-
|
|
1014
|
+
return V(() => {
|
|
1015
|
+
re({
|
|
986
1016
|
method: "vue",
|
|
987
|
-
version: "3.
|
|
1017
|
+
version: "3.6.0"
|
|
988
1018
|
});
|
|
989
|
-
}),
|
|
990
|
-
|
|
991
|
-
}), { controller:
|
|
1019
|
+
}), se(() => {
|
|
1020
|
+
n(), i.dispose();
|
|
1021
|
+
}), { controller: i, state: r };
|
|
992
1022
|
};
|
|
993
1023
|
export {
|
|
994
1024
|
it as DialogInput,
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1025
|
+
zt as DialogProductBlock,
|
|
1026
|
+
Wt as DialogSearchBar,
|
|
1027
|
+
Rt as DialogSearchPagination,
|
|
1028
|
+
Ot as DialogSearchProductCard,
|
|
1029
|
+
Yt as DialogSearchResults,
|
|
1000
1030
|
Xt as useDialogSearch
|
|
1001
1031
|
};
|