easyorders 0.1.13 → 0.1.15
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 +93 -93
- package/dist/bin/cli.js +12 -5
- package/dist/template/theme/config.json +95 -95
- package/dist/template/theme/home-sections/category-mosaic/config.json +40 -40
- package/dist/template/theme/home-sections/category-mosaic/template.liquid +155 -155
- package/dist/template/theme/home-sections/editorial-feature/config.json +67 -67
- package/dist/template/theme/home-sections/editorial-feature/template.liquid +153 -153
- package/dist/template/theme/home-sections/newsletter-luxe/config.json +60 -60
- package/dist/template/theme/home-sections/newsletter-luxe/template.liquid +144 -144
- package/dist/template/theme/home-sections/runway-hero/config.json +91 -91
- package/dist/template/theme/home-sections/runway-hero/template.liquid +159 -159
- package/dist/template/theme/home-sections/shop-the-look/config.json +75 -75
- package/dist/template/theme/home-sections/shop-the-look/template.liquid +304 -304
- package/dist/template/theme/home-sections/trust-promise/config.json +47 -47
- package/dist/template/theme/home-sections/trust-promise/template.liquid +96 -96
- package/dist/template/theme/schema.json +151 -151
- package/dist/template/theme/script.js +586 -586
- package/dist/template/theme/sections/breadcrumbs.liquid +17 -17
- package/dist/template/theme/sections/categories.liquid +9 -9
- package/dist/template/theme/sections/fake-counter.liquid +27 -27
- package/dist/template/theme/sections/fake-stock.liquid +6 -6
- package/dist/template/theme/sections/fake-visitor.liquid +6 -6
- package/dist/template/theme/sections/featured-products.liquid +110 -110
- package/dist/template/theme/sections/fixed-buy-button.liquid +46 -46
- package/dist/template/theme/sections/footer.liquid +128 -128
- package/dist/template/theme/sections/gallery.liquid +61 -61
- package/dist/template/theme/sections/header.liquid +152 -152
- package/dist/template/theme/sections/home-products-grid.liquid +109 -109
- package/dist/template/theme/sections/list-products.liquid +93 -93
- package/dist/template/theme/sections/order-invoice.liquid +154 -154
- package/dist/template/theme/sections/product-description.liquid +30 -30
- package/dist/template/theme/sections/product-details.liquid +63 -63
- package/dist/template/theme/sections/products-grid.liquid +86 -86
- package/dist/template/theme/sections/related-products.liquid +88 -88
- package/dist/template/theme/sections/reviews.liquid +55 -55
- package/dist/template/theme/sections/slider.liquid +43 -43
- package/dist/template/theme/sections/thanks.liquid +33 -33
- package/dist/template/theme/style.css +3923 -3923
- package/dist/template/theme/theme-data.json +9 -9
- package/package.json +40 -40
|
@@ -1,586 +1,586 @@
|
|
|
1
|
-
!(function () {
|
|
2
|
-
function e() {
|
|
3
|
-
var e = document.querySelector(".ab-header");
|
|
4
|
-
if (e && !e.dataset.scrollInit) {
|
|
5
|
-
e.dataset.scrollInit = "1";
|
|
6
|
-
var t = window.scrollY;
|
|
7
|
-
window.addEventListener(
|
|
8
|
-
"scroll",
|
|
9
|
-
function () {
|
|
10
|
-
var a = window.scrollY;
|
|
11
|
-
Math.abs(a - t) < 5 ||
|
|
12
|
-
(a > t && a > 100
|
|
13
|
-
? e.classList.add("ab-hidden")
|
|
14
|
-
: e.classList.remove("ab-hidden"),
|
|
15
|
-
(t = a));
|
|
16
|
-
},
|
|
17
|
-
{ passive: !0 }
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
function t() {
|
|
22
|
-
var e = document.getElementById("eo-menu-btn"),
|
|
23
|
-
t = document.getElementById("eo-mobile-menu"),
|
|
24
|
-
a = document.getElementById("eo-mobile-overlay"),
|
|
25
|
-
n = document.getElementById("eo-mobile-close");
|
|
26
|
-
function r() {
|
|
27
|
-
t.classList.remove("ab-open"),
|
|
28
|
-
a && a.classList.remove("ab-open"),
|
|
29
|
-
(document.body.style.overflow = "");
|
|
30
|
-
}
|
|
31
|
-
e &&
|
|
32
|
-
t &&
|
|
33
|
-
!e.dataset.menuInit &&
|
|
34
|
-
((e.dataset.menuInit = "1"),
|
|
35
|
-
e.addEventListener("click", function () {
|
|
36
|
-
t.classList.add("ab-open"),
|
|
37
|
-
a && a.classList.add("ab-open"),
|
|
38
|
-
(document.body.style.overflow = "hidden");
|
|
39
|
-
}),
|
|
40
|
-
n && n.addEventListener("click", r),
|
|
41
|
-
a && a.addEventListener("click", r),
|
|
42
|
-
t.querySelectorAll(".ab-mobile-nav > a").forEach(function (e) {
|
|
43
|
-
e.addEventListener("click", r);
|
|
44
|
-
}),
|
|
45
|
-
t.querySelectorAll(".ab-mobile-accordion-panel a").forEach(function (e) {
|
|
46
|
-
e.addEventListener("click", r);
|
|
47
|
-
}),
|
|
48
|
-
t.querySelectorAll(".ab-mobile-accordion-trigger").forEach(function (e) {
|
|
49
|
-
e.dataset.accordionInit ||
|
|
50
|
-
((e.dataset.accordionInit = "1"),
|
|
51
|
-
e.addEventListener("click", function () {
|
|
52
|
-
var a = e.closest(".ab-mobile-accordion");
|
|
53
|
-
if (a) {
|
|
54
|
-
var n = a.classList.contains("ab-open");
|
|
55
|
-
t.querySelectorAll(".ab-mobile-accordion.ab-open").forEach(function (e) {
|
|
56
|
-
e !== a && e.classList.remove("ab-open");
|
|
57
|
-
}),
|
|
58
|
-
a.classList.toggle("ab-open", !n);
|
|
59
|
-
}
|
|
60
|
-
}));
|
|
61
|
-
}));
|
|
62
|
-
}
|
|
63
|
-
function a() {
|
|
64
|
-
document.querySelectorAll(".ab-plist").forEach(function (e) {
|
|
65
|
-
if (!e.dataset.scrollArrowInit) {
|
|
66
|
-
e.dataset.scrollArrowInit = "1";
|
|
67
|
-
var t = e.querySelector(".ab-plist-track"),
|
|
68
|
-
a = e.querySelector(".ab-plist-prev"),
|
|
69
|
-
n = e.querySelector(".ab-plist-next");
|
|
70
|
-
t &&
|
|
71
|
-
(a &&
|
|
72
|
-
a.addEventListener("click", function () {
|
|
73
|
-
t.scrollBy({ left: -r(), behavior: "smooth" });
|
|
74
|
-
}),
|
|
75
|
-
n &&
|
|
76
|
-
n.addEventListener("click", function () {
|
|
77
|
-
t.scrollBy({ left: r(), behavior: "smooth" });
|
|
78
|
-
}));
|
|
79
|
-
}
|
|
80
|
-
function r() {
|
|
81
|
-
var e = t.querySelector(".ab-plist-card");
|
|
82
|
-
if (!e) return 0.8 * t.clientWidth;
|
|
83
|
-
var a = getComputedStyle(t),
|
|
84
|
-
n = parseFloat(a.gap) || 16;
|
|
85
|
-
return e.offsetWidth + n;
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
function n() {
|
|
90
|
-
document.querySelectorAll(".ab-slider").forEach(function (e) {
|
|
91
|
-
if (!e.dataset.sliderInit) {
|
|
92
|
-
e.dataset.sliderInit = "1";
|
|
93
|
-
var t = e.querySelectorAll(".ab-slider-slide");
|
|
94
|
-
if (!(t.length < 2)) {
|
|
95
|
-
var a = e.querySelector(".ab-slider-progress-bar"),
|
|
96
|
-
n = e.querySelector(".ab-slider-pause"),
|
|
97
|
-
r = parseInt(e.dataset.autoplay) || 5e3,
|
|
98
|
-
o = 0,
|
|
99
|
-
i = !1,
|
|
100
|
-
c = 0,
|
|
101
|
-
l = null;
|
|
102
|
-
n &&
|
|
103
|
-
n.addEventListener("click", function () {
|
|
104
|
-
i
|
|
105
|
-
? d()
|
|
106
|
-
: ((i = !0), e.classList.add("ab-paused"), l && cancelAnimationFrame(l));
|
|
107
|
-
}),
|
|
108
|
-
d();
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
function s(e) {
|
|
112
|
-
if (!i) {
|
|
113
|
-
var n,
|
|
114
|
-
d = e - c,
|
|
115
|
-
u = Math.min((d / r) * 100, 100);
|
|
116
|
-
a && (a.style.width = u + "%"),
|
|
117
|
-
d >= r &&
|
|
118
|
-
((n = o + 1),
|
|
119
|
-
t[o].classList.remove("ab-active"),
|
|
120
|
-
(o = n % t.length),
|
|
121
|
-
t[o].classList.add("ab-active"),
|
|
122
|
-
(c = performance.now())),
|
|
123
|
-
(l = requestAnimationFrame(s));
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
function d() {
|
|
127
|
-
(i = !1),
|
|
128
|
-
e.classList.remove("ab-paused"),
|
|
129
|
-
(c = performance.now()),
|
|
130
|
-
(l = requestAnimationFrame(s));
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
function r() {
|
|
135
|
-
var e = document.querySelectorAll(".ab-reveal:not(.ab-observed)");
|
|
136
|
-
if (e.length) {
|
|
137
|
-
var t = new IntersectionObserver(
|
|
138
|
-
function (e) {
|
|
139
|
-
e.forEach(function (e) {
|
|
140
|
-
e.isIntersecting &&
|
|
141
|
-
(e.target.classList.add("ab-visible"), t.unobserve(e.target));
|
|
142
|
-
});
|
|
143
|
-
},
|
|
144
|
-
{ threshold: 0.1 }
|
|
145
|
-
);
|
|
146
|
-
e.forEach(function (e) {
|
|
147
|
-
e.classList.add("ab-observed"), t.observe(e);
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
function o() {
|
|
152
|
-
document.querySelectorAll(".ab-gallery").forEach(function (e) {
|
|
153
|
-
if (!e.dataset.galleryInit) {
|
|
154
|
-
e.dataset.galleryInit = "1";
|
|
155
|
-
var t = e.querySelector(".ab-gallery-main-media"),
|
|
156
|
-
a = e.querySelectorAll(".ab-gallery-thumb"),
|
|
157
|
-
n = [];
|
|
158
|
-
a.forEach(function (e) {
|
|
159
|
-
e.dataset.src && n.push(e.dataset.src);
|
|
160
|
-
}),
|
|
161
|
-
0 === n.length && t && n.push(t.src),
|
|
162
|
-
document.querySelectorAll("body > .ab-lightbox").forEach(function (e) {
|
|
163
|
-
e.remove();
|
|
164
|
-
});
|
|
165
|
-
var r = e.querySelector("[data-lightbox]");
|
|
166
|
-
r && document.body.appendChild(r);
|
|
167
|
-
var o = r && r.querySelector("[data-lightbox-img]"),
|
|
168
|
-
i = r && r.querySelector("[data-lightbox-counter]"),
|
|
169
|
-
c = 0;
|
|
170
|
-
a.forEach(function (n) {
|
|
171
|
-
n.addEventListener("click", function () {
|
|
172
|
-
var r = n.dataset.src;
|
|
173
|
-
r &&
|
|
174
|
-
t &&
|
|
175
|
-
((t.src = r),
|
|
176
|
-
a.forEach(function (e) {
|
|
177
|
-
e.classList.remove("ab-active");
|
|
178
|
-
}),
|
|
179
|
-
n.classList.add("ab-active"));
|
|
180
|
-
});
|
|
181
|
-
}),
|
|
182
|
-
e.querySelectorAll("[data-gallery-open]").forEach(function (e) {
|
|
183
|
-
e.addEventListener("click", function (e) {
|
|
184
|
-
if (!e.target.closest("[data-src]") && r) {
|
|
185
|
-
var a = t ? n.indexOf(t.src) : 0;
|
|
186
|
-
l(-1 === a ? 0 : a),
|
|
187
|
-
r.classList.add("ab-open"),
|
|
188
|
-
(document.body.style.overflow = "hidden");
|
|
189
|
-
}
|
|
190
|
-
});
|
|
191
|
-
}),
|
|
192
|
-
r &&
|
|
193
|
-
r.addEventListener("click", function (e) {
|
|
194
|
-
var t = e.target;
|
|
195
|
-
if (t.closest("[data-lightbox-close]"))
|
|
196
|
-
return (
|
|
197
|
-
r.classList.remove("ab-open"), void (document.body.style.overflow = "")
|
|
198
|
-
);
|
|
199
|
-
t.closest("[data-lightbox-prev]")
|
|
200
|
-
? l(c - 1)
|
|
201
|
-
: t.closest("[data-lightbox-next]") && l(c + 1);
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
function l(e) {
|
|
205
|
-
(c = ((e % n.length) + n.length) % n.length),
|
|
206
|
-
o && (o.src = n[c]),
|
|
207
|
-
i && (i.textContent = c + 1 + " / " + n.length);
|
|
208
|
-
}
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
function i() {
|
|
212
|
-
document.querySelectorAll(".ab-reviews").forEach(function (e) {
|
|
213
|
-
e.getAttribute("data-reviews-init") ||
|
|
214
|
-
(e.setAttribute("data-reviews-init", "1"),
|
|
215
|
-
e.querySelectorAll("[data-review-comment]").forEach(function (e) {
|
|
216
|
-
var t = document.createElement("button");
|
|
217
|
-
(t.className = "ab-review-read-more"),
|
|
218
|
-
(t.type = "button"),
|
|
219
|
-
(t.textContent = "...Read more"),
|
|
220
|
-
e.parentNode.insertBefore(t, e.nextSibling),
|
|
221
|
-
requestAnimationFrame(function () {
|
|
222
|
-
e.scrollHeight > e.clientHeight + 2 && t.classList.add("ab-visible");
|
|
223
|
-
}),
|
|
224
|
-
t.addEventListener("click", function () {
|
|
225
|
-
e.classList.contains("ab-review-expanded")
|
|
226
|
-
? (e.classList.remove("ab-review-expanded"),
|
|
227
|
-
(t.textContent = "...Read more"))
|
|
228
|
-
: (e.classList.add("ab-review-expanded"), (t.textContent = "Show less"));
|
|
229
|
-
});
|
|
230
|
-
}));
|
|
231
|
-
});
|
|
232
|
-
}
|
|
233
|
-
function c() {
|
|
234
|
-
for (
|
|
235
|
-
var e = document.querySelectorAll(".ab-fake-counter"), t = 0;
|
|
236
|
-
t < e.length;
|
|
237
|
-
t++
|
|
238
|
-
) {
|
|
239
|
-
var a = e[t];
|
|
240
|
-
a.dataset.counterInit ||
|
|
241
|
-
((a.dataset.counterInit = "1"),
|
|
242
|
-
(function (e) {
|
|
243
|
-
var t = e.dataset.productId || "",
|
|
244
|
-
a = 36e5 * (parseFloat(e.dataset.hours) || 1);
|
|
245
|
-
try {
|
|
246
|
-
var n = localStorage.getItem("counter-" + t);
|
|
247
|
-
n && Number(n) > 36e4 && (a = Number(n));
|
|
248
|
-
} catch (e) {}
|
|
249
|
-
var r = Date.now() + a,
|
|
250
|
-
o = e.querySelector('[data-unit="days"]'),
|
|
251
|
-
i = e.querySelector('[data-unit="hours"]'),
|
|
252
|
-
c = e.querySelector('[data-unit="minutes"]'),
|
|
253
|
-
l = e.querySelector('[data-unit="seconds"]');
|
|
254
|
-
function s(e) {
|
|
255
|
-
return e < 10 ? "0" + e : String(e);
|
|
256
|
-
}
|
|
257
|
-
!(function e() {
|
|
258
|
-
var a = Math.max(0, r - Date.now()),
|
|
259
|
-
n = Math.floor(a / 1e3),
|
|
260
|
-
d = Math.floor(n / 86400);
|
|
261
|
-
n -= 86400 * d;
|
|
262
|
-
var u = Math.floor(n / 3600);
|
|
263
|
-
n -= 3600 * u;
|
|
264
|
-
var v = Math.floor(n / 60);
|
|
265
|
-
(n -= 60 * v),
|
|
266
|
-
o && (o.textContent = s(d)),
|
|
267
|
-
i && (i.textContent = s(u)),
|
|
268
|
-
c && (c.textContent = s(v)),
|
|
269
|
-
l && (l.textContent = s(n));
|
|
270
|
-
try {
|
|
271
|
-
localStorage.setItem("counter-" + t, String(a));
|
|
272
|
-
} catch (e) {}
|
|
273
|
-
a > 0 &&
|
|
274
|
-
requestAnimationFrame(function () {
|
|
275
|
-
setTimeout(e, 1e3);
|
|
276
|
-
});
|
|
277
|
-
})();
|
|
278
|
-
})(a));
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
function l() {
|
|
282
|
-
for (
|
|
283
|
-
var e = document.querySelectorAll(".ab-fake-visitor"), t = 0;
|
|
284
|
-
t < e.length;
|
|
285
|
-
t++
|
|
286
|
-
) {
|
|
287
|
-
var a = e[t];
|
|
288
|
-
a.dataset.visitorInit ||
|
|
289
|
-
((a.dataset.visitorInit = "1"),
|
|
290
|
-
(function (e) {
|
|
291
|
-
var t = parseInt(e.dataset.min, 10) || 10,
|
|
292
|
-
a = parseInt(e.dataset.max, 10) || 50,
|
|
293
|
-
n = e.querySelector(".ab-fv-count");
|
|
294
|
-
function r() {
|
|
295
|
-
return Math.floor(Math.random() * (a - t + 1)) + t;
|
|
296
|
-
}
|
|
297
|
-
n &&
|
|
298
|
-
((n.textContent = String(r())),
|
|
299
|
-
setInterval(function () {
|
|
300
|
-
n.textContent = String(r());
|
|
301
|
-
}, 3e3));
|
|
302
|
-
})(a));
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
function s() {
|
|
306
|
-
for (
|
|
307
|
-
var e = document.querySelectorAll(".lq-desc-accordion"), t = 0;
|
|
308
|
-
t < e.length;
|
|
309
|
-
t++
|
|
310
|
-
) {
|
|
311
|
-
var a = e[t];
|
|
312
|
-
a.dataset.descInit ||
|
|
313
|
-
((a.dataset.descInit = "1"),
|
|
314
|
-
a.addEventListener("click", function (e) {
|
|
315
|
-
var t = e.target.closest(".lq-desc-toggle");
|
|
316
|
-
if (t) {
|
|
317
|
-
var a = t.parentElement,
|
|
318
|
-
n = a.querySelector(".lq-desc-panel");
|
|
319
|
-
if (n)
|
|
320
|
-
"true" === a.getAttribute("data-open")
|
|
321
|
-
? (a.removeAttribute("data-open"),
|
|
322
|
-
t.setAttribute("aria-expanded", "false"),
|
|
323
|
-
(n.style.display = "none"))
|
|
324
|
-
: (a.setAttribute("data-open", "true"),
|
|
325
|
-
t.setAttribute("aria-expanded", "true"),
|
|
326
|
-
(n.style.display = "block"));
|
|
327
|
-
}
|
|
328
|
-
}));
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
function u() {
|
|
332
|
-
document
|
|
333
|
-
.querySelectorAll('.ab-announce[data-ann-type="slider"]')
|
|
334
|
-
.forEach(function (e) {
|
|
335
|
-
if (!e.dataset.annSliderInit) {
|
|
336
|
-
e.dataset.annSliderInit = "1";
|
|
337
|
-
var t = e.querySelectorAll(".ab-ann-slide");
|
|
338
|
-
if (t.length < 2) return;
|
|
339
|
-
var a = 0;
|
|
340
|
-
setInterval(function () {
|
|
341
|
-
var n = t[a],
|
|
342
|
-
next = (a + 1) % t.length;
|
|
343
|
-
n.classList.remove("ab-active");
|
|
344
|
-
n.classList.add("ab-exit-left");
|
|
345
|
-
t[next].classList.add("ab-active");
|
|
346
|
-
setTimeout(function () {
|
|
347
|
-
n.classList.remove("ab-exit-left");
|
|
348
|
-
}, 500);
|
|
349
|
-
a = next;
|
|
350
|
-
}, 3e3);
|
|
351
|
-
}
|
|
352
|
-
});
|
|
353
|
-
}
|
|
354
|
-
function v() {
|
|
355
|
-
document.querySelectorAll(".ab-ann-marquee").forEach(function (e) {
|
|
356
|
-
if (!e.dataset.marqueeInit) {
|
|
357
|
-
e.dataset.marqueeInit = "1";
|
|
358
|
-
var t = e.querySelector(".ab-ann-marquee-track");
|
|
359
|
-
if (!t) return;
|
|
360
|
-
var a = t.innerHTML,
|
|
361
|
-
n = t.scrollWidth,
|
|
362
|
-
r = e.offsetWidth;
|
|
363
|
-
if (n < 1) return;
|
|
364
|
-
var o = Math.ceil((2 * r) / n);
|
|
365
|
-
if (o < 2) o = 2;
|
|
366
|
-
t.innerHTML = "";
|
|
367
|
-
for (var i = 0; i < o; i++) t.insertAdjacentHTML("beforeend", a);
|
|
368
|
-
var c = t.scrollWidth / o,
|
|
369
|
-
l = Math.max(c / 40, 5);
|
|
370
|
-
t.style.setProperty("--marquee-dur", l + "s"),
|
|
371
|
-
t.style.setProperty("--marquee-offset", "-" + c + "px"),
|
|
372
|
-
t.classList.add("ab-running");
|
|
373
|
-
}
|
|
374
|
-
});
|
|
375
|
-
}
|
|
376
|
-
function h() {
|
|
377
|
-
function m(root) {
|
|
378
|
-
var wrap = root.closest("[data-eo-api-base]");
|
|
379
|
-
if (wrap && wrap.getAttribute("data-eo-api-base")) {
|
|
380
|
-
return wrap.getAttribute("data-eo-api-base").replace(/\/$/, "");
|
|
381
|
-
}
|
|
382
|
-
if (typeof window.__EO_STORE_API_BASE__ === "string" && window.__EO_STORE_API_BASE__) {
|
|
383
|
-
return window.__EO_STORE_API_BASE__.replace(/\/$/, "");
|
|
384
|
-
}
|
|
385
|
-
return "https://api.easyorders.dev/api/v1";
|
|
386
|
-
}
|
|
387
|
-
function p(body) {
|
|
388
|
-
if (Array.isArray(body)) return body;
|
|
389
|
-
if (body && Array.isArray(body.data)) return body.data;
|
|
390
|
-
return [];
|
|
391
|
-
}
|
|
392
|
-
document.querySelectorAll("[data-eo-hs-entity]:not([data-eo-hs-done])").forEach(function (root) {
|
|
393
|
-
var base = m(root);
|
|
394
|
-
var mount = root.querySelector("[data-eo-hs-mount]");
|
|
395
|
-
var idsStr = root.getAttribute("data-eo-hs-ids") || "";
|
|
396
|
-
var ids = idsStr
|
|
397
|
-
.split(",")
|
|
398
|
-
.map(function (s) {
|
|
399
|
-
return s.trim();
|
|
400
|
-
})
|
|
401
|
-
.filter(Boolean);
|
|
402
|
-
if (!base || !mount || ids.length === 0) {
|
|
403
|
-
root.setAttribute("data-eo-hs-done", "1");
|
|
404
|
-
return;
|
|
405
|
-
}
|
|
406
|
-
root.setAttribute("data-eo-hs-done", "1");
|
|
407
|
-
var entity = root.getAttribute("data-eo-hs-entity") || "";
|
|
408
|
-
var path =
|
|
409
|
-
entity === "categories"
|
|
410
|
-
? "categories"
|
|
411
|
-
: entity === "pages"
|
|
412
|
-
? "simple-pages"
|
|
413
|
-
: "products";
|
|
414
|
-
var url =
|
|
415
|
-
base.replace(/\/$/, "") +
|
|
416
|
-
"/" +
|
|
417
|
-
path +
|
|
418
|
-
"?filter=id||$in||" +
|
|
419
|
-
ids.join(",") +
|
|
420
|
-
"&limit=" +
|
|
421
|
-
ids.length;
|
|
422
|
-
mount.classList.add("eo-hs-loading");
|
|
423
|
-
fetch(url, { credentials: "omit", headers: { Accept: "application/json" } })
|
|
424
|
-
.then(function (res) {
|
|
425
|
-
return res.ok ? res.json() : Promise.reject(new Error(String(res.status)));
|
|
426
|
-
})
|
|
427
|
-
.then(function (body) {
|
|
428
|
-
var rows = p(body);
|
|
429
|
-
var byId = {};
|
|
430
|
-
rows.forEach(function (row) {
|
|
431
|
-
if (row && row.id != null) byId[String(row.id)] = row;
|
|
432
|
-
});
|
|
433
|
-
var frag = document.createDocumentFragment();
|
|
434
|
-
ids.forEach(function (id) {
|
|
435
|
-
var row = byId[id];
|
|
436
|
-
if (!row) return;
|
|
437
|
-
if (entity === "products") {
|
|
438
|
-
var slug = row.slug || "";
|
|
439
|
-
var name = row.name || "";
|
|
440
|
-
var thumb = row.thumb || "";
|
|
441
|
-
var price =
|
|
442
|
-
row.sale_price != null && row.price != null && row.sale_price < row.price
|
|
443
|
-
? row.sale_price
|
|
444
|
-
: row.price;
|
|
445
|
-
var el = document.createElement("a");
|
|
446
|
-
el.className = "eo-hs-card eo-hs-card--product";
|
|
447
|
-
el.href = slug ? "/products/" + encodeURIComponent(slug) : "#";
|
|
448
|
-
el.innerHTML =
|
|
449
|
-
(thumb
|
|
450
|
-
? '<span class="eo-hs-card__media"><img src="' +
|
|
451
|
-
String(thumb).replace(/"/g, "") +
|
|
452
|
-
'" alt="" loading="lazy" width="280" height="350" /></span>'
|
|
453
|
-
: '<span class="eo-hs-card__media eo-hs-card__media--empty"></span>') +
|
|
454
|
-
'<span class="eo-hs-card__body"><span class="eo-hs-card__title">' +
|
|
455
|
-
String(name || "").replace(/</g, "<") +
|
|
456
|
-
"</span>" +
|
|
457
|
-
(price != null
|
|
458
|
-
? '<span class="eo-hs-card__meta">' + String(price) + "</span>"
|
|
459
|
-
: "") +
|
|
460
|
-
"</span>";
|
|
461
|
-
frag.appendChild(el);
|
|
462
|
-
} else if (entity === "categories") {
|
|
463
|
-
var cslug = row.slug || "";
|
|
464
|
-
var cname = row.name || "";
|
|
465
|
-
var cthumb = row.thumb || "";
|
|
466
|
-
var ca = document.createElement("a");
|
|
467
|
-
ca.className = "eo-hs-card eo-hs-card--category";
|
|
468
|
-
ca.href = cslug ? "/collections/" + encodeURIComponent(cslug) : "#";
|
|
469
|
-
ca.innerHTML =
|
|
470
|
-
(cthumb
|
|
471
|
-
? '<span class="eo-hs-card__media"><img src="' +
|
|
472
|
-
String(cthumb).replace(/"/g, "") +
|
|
473
|
-
'" alt="" loading="lazy" width="320" height="200" /></span>'
|
|
474
|
-
: '<span class="eo-hs-card__media eo-hs-card__media--empty"></span>') +
|
|
475
|
-
'<span class="eo-hs-card__body"><span class="eo-hs-card__title">' +
|
|
476
|
-
String(cname || "").replace(/</g, "<") +
|
|
477
|
-
"</span></span>";
|
|
478
|
-
frag.appendChild(ca);
|
|
479
|
-
} else {
|
|
480
|
-
var pslug = row.slug || "";
|
|
481
|
-
var ptitle = row.title || "";
|
|
482
|
-
var pa = document.createElement("a");
|
|
483
|
-
pa.className = "eo-hs-card eo-hs-card--page";
|
|
484
|
-
pa.href = pslug ? "/pages/" + encodeURIComponent(pslug) : "#";
|
|
485
|
-
pa.innerHTML =
|
|
486
|
-
'<span class="eo-hs-card__body"><span class="eo-hs-card__title">' +
|
|
487
|
-
String(ptitle || "").replace(/</g, "<") +
|
|
488
|
-
"</span></span>";
|
|
489
|
-
frag.appendChild(pa);
|
|
490
|
-
}
|
|
491
|
-
});
|
|
492
|
-
mount.textContent = "";
|
|
493
|
-
mount.appendChild(frag);
|
|
494
|
-
mount.classList.remove("eo-hs-loading");
|
|
495
|
-
root.classList.remove("eo-hs--empty");
|
|
496
|
-
})
|
|
497
|
-
.catch(function () {
|
|
498
|
-
mount.classList.remove("eo-hs-loading");
|
|
499
|
-
mount.innerHTML =
|
|
500
|
-
'<p class="eo-hs-error" role="status">Unable to load this block. Check your connection or try again later.</p>';
|
|
501
|
-
});
|
|
502
|
-
});
|
|
503
|
-
}
|
|
504
|
-
function d() {
|
|
505
|
-
function b(el) {
|
|
506
|
-
var wrap = el.closest("[data-eo-api-base]");
|
|
507
|
-
if (wrap && wrap.getAttribute("data-eo-api-base")) {
|
|
508
|
-
return wrap.getAttribute("data-eo-api-base").replace(/\/$/, "");
|
|
509
|
-
}
|
|
510
|
-
if (typeof window.__EO_STORE_API_BASE__ === "string" && window.__EO_STORE_API_BASE__) {
|
|
511
|
-
return window.__EO_STORE_API_BASE__.replace(/\/$/, "");
|
|
512
|
-
}
|
|
513
|
-
return "https://api.easyorders.dev/api/v1";
|
|
514
|
-
}
|
|
515
|
-
document.querySelectorAll("a[data-eo-hs-cta]:not([data-eo-hs-cta-done])").forEach(function (a) {
|
|
516
|
-
var id = String(a.getAttribute("data-eo-hs-cta-id") || "").trim();
|
|
517
|
-
var entity = a.getAttribute("data-eo-hs-cta-entity") || "";
|
|
518
|
-
a.setAttribute("data-eo-hs-cta-done", "1");
|
|
519
|
-
if (!id) return;
|
|
520
|
-
var base = b(a);
|
|
521
|
-
var path =
|
|
522
|
-
entity === "categories"
|
|
523
|
-
? "categories"
|
|
524
|
-
: entity === "pages"
|
|
525
|
-
? "simple-pages"
|
|
526
|
-
: "products";
|
|
527
|
-
var url =
|
|
528
|
-
base.replace(/\/$/, "") +
|
|
529
|
-
"/" +
|
|
530
|
-
path +
|
|
531
|
-
"?filter=id||$in||" + id + "&limit=1";
|
|
532
|
-
fetch(url, { credentials: "omit", headers: { Accept: "application/json" } })
|
|
533
|
-
.then(function (res) {
|
|
534
|
-
return res.ok ? res.json() : Promise.reject(new Error(String(res.status)));
|
|
535
|
-
})
|
|
536
|
-
.then(function (body) {
|
|
537
|
-
var rows = Array.isArray(body) ? body : body && Array.isArray(body.data) ? body.data : [];
|
|
538
|
-
var row = rows[0];
|
|
539
|
-
if (!row) return;
|
|
540
|
-
var slug = row.slug || "";
|
|
541
|
-
if (entity === "categories" && slug) a.href = "/collections/" + encodeURIComponent(slug);
|
|
542
|
-
else if (entity === "pages" && slug) a.href = "/pages/" + encodeURIComponent(slug);
|
|
543
|
-
else if (entity === "products" && slug) a.href = "/products/" + encodeURIComponent(slug);
|
|
544
|
-
})
|
|
545
|
-
.catch(function () {});
|
|
546
|
-
});
|
|
547
|
-
}
|
|
548
|
-
e(),
|
|
549
|
-
t(),
|
|
550
|
-
a(),
|
|
551
|
-
n(),
|
|
552
|
-
r(),
|
|
553
|
-
o(),
|
|
554
|
-
u(),
|
|
555
|
-
v(),
|
|
556
|
-
h(),
|
|
557
|
-
d(),
|
|
558
|
-
window.__abGalleryKeyInit ||
|
|
559
|
-
((window.__abGalleryKeyInit = !0),
|
|
560
|
-
document.addEventListener("keydown", function (e) {
|
|
561
|
-
var t = document.querySelector("body > .ab-lightbox.ab-open");
|
|
562
|
-
if (t) {
|
|
563
|
-
if ("Escape" === e.key)
|
|
564
|
-
return (
|
|
565
|
-
t.classList.remove("ab-open"), void (document.body.style.overflow = "")
|
|
566
|
-
);
|
|
567
|
-
if ("ArrowLeft" !== e.key)
|
|
568
|
-
if ("ArrowRight" !== e.key);
|
|
569
|
-
else {
|
|
570
|
-
var a = t.querySelector("[data-lightbox-next]");
|
|
571
|
-
a && a.click();
|
|
572
|
-
}
|
|
573
|
-
else {
|
|
574
|
-
var n = t.querySelector("[data-lightbox-prev]");
|
|
575
|
-
n && n.click();
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
})),
|
|
579
|
-
i(),
|
|
580
|
-
c(),
|
|
581
|
-
l(),
|
|
582
|
-
s(),
|
|
583
|
-
new MutationObserver(function () {
|
|
584
|
-
e(), t(), a(), n(), r(), o(), u(), v(), h(), d(), i(), c(), l(), s();
|
|
585
|
-
}).observe(document.body, { childList: !0, subtree: !0 });
|
|
586
|
-
})();
|
|
1
|
+
!(function () {
|
|
2
|
+
function e() {
|
|
3
|
+
var e = document.querySelector(".ab-header");
|
|
4
|
+
if (e && !e.dataset.scrollInit) {
|
|
5
|
+
e.dataset.scrollInit = "1";
|
|
6
|
+
var t = window.scrollY;
|
|
7
|
+
window.addEventListener(
|
|
8
|
+
"scroll",
|
|
9
|
+
function () {
|
|
10
|
+
var a = window.scrollY;
|
|
11
|
+
Math.abs(a - t) < 5 ||
|
|
12
|
+
(a > t && a > 100
|
|
13
|
+
? e.classList.add("ab-hidden")
|
|
14
|
+
: e.classList.remove("ab-hidden"),
|
|
15
|
+
(t = a));
|
|
16
|
+
},
|
|
17
|
+
{ passive: !0 }
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function t() {
|
|
22
|
+
var e = document.getElementById("eo-menu-btn"),
|
|
23
|
+
t = document.getElementById("eo-mobile-menu"),
|
|
24
|
+
a = document.getElementById("eo-mobile-overlay"),
|
|
25
|
+
n = document.getElementById("eo-mobile-close");
|
|
26
|
+
function r() {
|
|
27
|
+
t.classList.remove("ab-open"),
|
|
28
|
+
a && a.classList.remove("ab-open"),
|
|
29
|
+
(document.body.style.overflow = "");
|
|
30
|
+
}
|
|
31
|
+
e &&
|
|
32
|
+
t &&
|
|
33
|
+
!e.dataset.menuInit &&
|
|
34
|
+
((e.dataset.menuInit = "1"),
|
|
35
|
+
e.addEventListener("click", function () {
|
|
36
|
+
t.classList.add("ab-open"),
|
|
37
|
+
a && a.classList.add("ab-open"),
|
|
38
|
+
(document.body.style.overflow = "hidden");
|
|
39
|
+
}),
|
|
40
|
+
n && n.addEventListener("click", r),
|
|
41
|
+
a && a.addEventListener("click", r),
|
|
42
|
+
t.querySelectorAll(".ab-mobile-nav > a").forEach(function (e) {
|
|
43
|
+
e.addEventListener("click", r);
|
|
44
|
+
}),
|
|
45
|
+
t.querySelectorAll(".ab-mobile-accordion-panel a").forEach(function (e) {
|
|
46
|
+
e.addEventListener("click", r);
|
|
47
|
+
}),
|
|
48
|
+
t.querySelectorAll(".ab-mobile-accordion-trigger").forEach(function (e) {
|
|
49
|
+
e.dataset.accordionInit ||
|
|
50
|
+
((e.dataset.accordionInit = "1"),
|
|
51
|
+
e.addEventListener("click", function () {
|
|
52
|
+
var a = e.closest(".ab-mobile-accordion");
|
|
53
|
+
if (a) {
|
|
54
|
+
var n = a.classList.contains("ab-open");
|
|
55
|
+
t.querySelectorAll(".ab-mobile-accordion.ab-open").forEach(function (e) {
|
|
56
|
+
e !== a && e.classList.remove("ab-open");
|
|
57
|
+
}),
|
|
58
|
+
a.classList.toggle("ab-open", !n);
|
|
59
|
+
}
|
|
60
|
+
}));
|
|
61
|
+
}));
|
|
62
|
+
}
|
|
63
|
+
function a() {
|
|
64
|
+
document.querySelectorAll(".ab-plist").forEach(function (e) {
|
|
65
|
+
if (!e.dataset.scrollArrowInit) {
|
|
66
|
+
e.dataset.scrollArrowInit = "1";
|
|
67
|
+
var t = e.querySelector(".ab-plist-track"),
|
|
68
|
+
a = e.querySelector(".ab-plist-prev"),
|
|
69
|
+
n = e.querySelector(".ab-plist-next");
|
|
70
|
+
t &&
|
|
71
|
+
(a &&
|
|
72
|
+
a.addEventListener("click", function () {
|
|
73
|
+
t.scrollBy({ left: -r(), behavior: "smooth" });
|
|
74
|
+
}),
|
|
75
|
+
n &&
|
|
76
|
+
n.addEventListener("click", function () {
|
|
77
|
+
t.scrollBy({ left: r(), behavior: "smooth" });
|
|
78
|
+
}));
|
|
79
|
+
}
|
|
80
|
+
function r() {
|
|
81
|
+
var e = t.querySelector(".ab-plist-card");
|
|
82
|
+
if (!e) return 0.8 * t.clientWidth;
|
|
83
|
+
var a = getComputedStyle(t),
|
|
84
|
+
n = parseFloat(a.gap) || 16;
|
|
85
|
+
return e.offsetWidth + n;
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
function n() {
|
|
90
|
+
document.querySelectorAll(".ab-slider").forEach(function (e) {
|
|
91
|
+
if (!e.dataset.sliderInit) {
|
|
92
|
+
e.dataset.sliderInit = "1";
|
|
93
|
+
var t = e.querySelectorAll(".ab-slider-slide");
|
|
94
|
+
if (!(t.length < 2)) {
|
|
95
|
+
var a = e.querySelector(".ab-slider-progress-bar"),
|
|
96
|
+
n = e.querySelector(".ab-slider-pause"),
|
|
97
|
+
r = parseInt(e.dataset.autoplay) || 5e3,
|
|
98
|
+
o = 0,
|
|
99
|
+
i = !1,
|
|
100
|
+
c = 0,
|
|
101
|
+
l = null;
|
|
102
|
+
n &&
|
|
103
|
+
n.addEventListener("click", function () {
|
|
104
|
+
i
|
|
105
|
+
? d()
|
|
106
|
+
: ((i = !0), e.classList.add("ab-paused"), l && cancelAnimationFrame(l));
|
|
107
|
+
}),
|
|
108
|
+
d();
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
function s(e) {
|
|
112
|
+
if (!i) {
|
|
113
|
+
var n,
|
|
114
|
+
d = e - c,
|
|
115
|
+
u = Math.min((d / r) * 100, 100);
|
|
116
|
+
a && (a.style.width = u + "%"),
|
|
117
|
+
d >= r &&
|
|
118
|
+
((n = o + 1),
|
|
119
|
+
t[o].classList.remove("ab-active"),
|
|
120
|
+
(o = n % t.length),
|
|
121
|
+
t[o].classList.add("ab-active"),
|
|
122
|
+
(c = performance.now())),
|
|
123
|
+
(l = requestAnimationFrame(s));
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
function d() {
|
|
127
|
+
(i = !1),
|
|
128
|
+
e.classList.remove("ab-paused"),
|
|
129
|
+
(c = performance.now()),
|
|
130
|
+
(l = requestAnimationFrame(s));
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
function r() {
|
|
135
|
+
var e = document.querySelectorAll(".ab-reveal:not(.ab-observed)");
|
|
136
|
+
if (e.length) {
|
|
137
|
+
var t = new IntersectionObserver(
|
|
138
|
+
function (e) {
|
|
139
|
+
e.forEach(function (e) {
|
|
140
|
+
e.isIntersecting &&
|
|
141
|
+
(e.target.classList.add("ab-visible"), t.unobserve(e.target));
|
|
142
|
+
});
|
|
143
|
+
},
|
|
144
|
+
{ threshold: 0.1 }
|
|
145
|
+
);
|
|
146
|
+
e.forEach(function (e) {
|
|
147
|
+
e.classList.add("ab-observed"), t.observe(e);
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
function o() {
|
|
152
|
+
document.querySelectorAll(".ab-gallery").forEach(function (e) {
|
|
153
|
+
if (!e.dataset.galleryInit) {
|
|
154
|
+
e.dataset.galleryInit = "1";
|
|
155
|
+
var t = e.querySelector(".ab-gallery-main-media"),
|
|
156
|
+
a = e.querySelectorAll(".ab-gallery-thumb"),
|
|
157
|
+
n = [];
|
|
158
|
+
a.forEach(function (e) {
|
|
159
|
+
e.dataset.src && n.push(e.dataset.src);
|
|
160
|
+
}),
|
|
161
|
+
0 === n.length && t && n.push(t.src),
|
|
162
|
+
document.querySelectorAll("body > .ab-lightbox").forEach(function (e) {
|
|
163
|
+
e.remove();
|
|
164
|
+
});
|
|
165
|
+
var r = e.querySelector("[data-lightbox]");
|
|
166
|
+
r && document.body.appendChild(r);
|
|
167
|
+
var o = r && r.querySelector("[data-lightbox-img]"),
|
|
168
|
+
i = r && r.querySelector("[data-lightbox-counter]"),
|
|
169
|
+
c = 0;
|
|
170
|
+
a.forEach(function (n) {
|
|
171
|
+
n.addEventListener("click", function () {
|
|
172
|
+
var r = n.dataset.src;
|
|
173
|
+
r &&
|
|
174
|
+
t &&
|
|
175
|
+
((t.src = r),
|
|
176
|
+
a.forEach(function (e) {
|
|
177
|
+
e.classList.remove("ab-active");
|
|
178
|
+
}),
|
|
179
|
+
n.classList.add("ab-active"));
|
|
180
|
+
});
|
|
181
|
+
}),
|
|
182
|
+
e.querySelectorAll("[data-gallery-open]").forEach(function (e) {
|
|
183
|
+
e.addEventListener("click", function (e) {
|
|
184
|
+
if (!e.target.closest("[data-src]") && r) {
|
|
185
|
+
var a = t ? n.indexOf(t.src) : 0;
|
|
186
|
+
l(-1 === a ? 0 : a),
|
|
187
|
+
r.classList.add("ab-open"),
|
|
188
|
+
(document.body.style.overflow = "hidden");
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
}),
|
|
192
|
+
r &&
|
|
193
|
+
r.addEventListener("click", function (e) {
|
|
194
|
+
var t = e.target;
|
|
195
|
+
if (t.closest("[data-lightbox-close]"))
|
|
196
|
+
return (
|
|
197
|
+
r.classList.remove("ab-open"), void (document.body.style.overflow = "")
|
|
198
|
+
);
|
|
199
|
+
t.closest("[data-lightbox-prev]")
|
|
200
|
+
? l(c - 1)
|
|
201
|
+
: t.closest("[data-lightbox-next]") && l(c + 1);
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
function l(e) {
|
|
205
|
+
(c = ((e % n.length) + n.length) % n.length),
|
|
206
|
+
o && (o.src = n[c]),
|
|
207
|
+
i && (i.textContent = c + 1 + " / " + n.length);
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
function i() {
|
|
212
|
+
document.querySelectorAll(".ab-reviews").forEach(function (e) {
|
|
213
|
+
e.getAttribute("data-reviews-init") ||
|
|
214
|
+
(e.setAttribute("data-reviews-init", "1"),
|
|
215
|
+
e.querySelectorAll("[data-review-comment]").forEach(function (e) {
|
|
216
|
+
var t = document.createElement("button");
|
|
217
|
+
(t.className = "ab-review-read-more"),
|
|
218
|
+
(t.type = "button"),
|
|
219
|
+
(t.textContent = "...Read more"),
|
|
220
|
+
e.parentNode.insertBefore(t, e.nextSibling),
|
|
221
|
+
requestAnimationFrame(function () {
|
|
222
|
+
e.scrollHeight > e.clientHeight + 2 && t.classList.add("ab-visible");
|
|
223
|
+
}),
|
|
224
|
+
t.addEventListener("click", function () {
|
|
225
|
+
e.classList.contains("ab-review-expanded")
|
|
226
|
+
? (e.classList.remove("ab-review-expanded"),
|
|
227
|
+
(t.textContent = "...Read more"))
|
|
228
|
+
: (e.classList.add("ab-review-expanded"), (t.textContent = "Show less"));
|
|
229
|
+
});
|
|
230
|
+
}));
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
function c() {
|
|
234
|
+
for (
|
|
235
|
+
var e = document.querySelectorAll(".ab-fake-counter"), t = 0;
|
|
236
|
+
t < e.length;
|
|
237
|
+
t++
|
|
238
|
+
) {
|
|
239
|
+
var a = e[t];
|
|
240
|
+
a.dataset.counterInit ||
|
|
241
|
+
((a.dataset.counterInit = "1"),
|
|
242
|
+
(function (e) {
|
|
243
|
+
var t = e.dataset.productId || "",
|
|
244
|
+
a = 36e5 * (parseFloat(e.dataset.hours) || 1);
|
|
245
|
+
try {
|
|
246
|
+
var n = localStorage.getItem("counter-" + t);
|
|
247
|
+
n && Number(n) > 36e4 && (a = Number(n));
|
|
248
|
+
} catch (e) {}
|
|
249
|
+
var r = Date.now() + a,
|
|
250
|
+
o = e.querySelector('[data-unit="days"]'),
|
|
251
|
+
i = e.querySelector('[data-unit="hours"]'),
|
|
252
|
+
c = e.querySelector('[data-unit="minutes"]'),
|
|
253
|
+
l = e.querySelector('[data-unit="seconds"]');
|
|
254
|
+
function s(e) {
|
|
255
|
+
return e < 10 ? "0" + e : String(e);
|
|
256
|
+
}
|
|
257
|
+
!(function e() {
|
|
258
|
+
var a = Math.max(0, r - Date.now()),
|
|
259
|
+
n = Math.floor(a / 1e3),
|
|
260
|
+
d = Math.floor(n / 86400);
|
|
261
|
+
n -= 86400 * d;
|
|
262
|
+
var u = Math.floor(n / 3600);
|
|
263
|
+
n -= 3600 * u;
|
|
264
|
+
var v = Math.floor(n / 60);
|
|
265
|
+
(n -= 60 * v),
|
|
266
|
+
o && (o.textContent = s(d)),
|
|
267
|
+
i && (i.textContent = s(u)),
|
|
268
|
+
c && (c.textContent = s(v)),
|
|
269
|
+
l && (l.textContent = s(n));
|
|
270
|
+
try {
|
|
271
|
+
localStorage.setItem("counter-" + t, String(a));
|
|
272
|
+
} catch (e) {}
|
|
273
|
+
a > 0 &&
|
|
274
|
+
requestAnimationFrame(function () {
|
|
275
|
+
setTimeout(e, 1e3);
|
|
276
|
+
});
|
|
277
|
+
})();
|
|
278
|
+
})(a));
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
function l() {
|
|
282
|
+
for (
|
|
283
|
+
var e = document.querySelectorAll(".ab-fake-visitor"), t = 0;
|
|
284
|
+
t < e.length;
|
|
285
|
+
t++
|
|
286
|
+
) {
|
|
287
|
+
var a = e[t];
|
|
288
|
+
a.dataset.visitorInit ||
|
|
289
|
+
((a.dataset.visitorInit = "1"),
|
|
290
|
+
(function (e) {
|
|
291
|
+
var t = parseInt(e.dataset.min, 10) || 10,
|
|
292
|
+
a = parseInt(e.dataset.max, 10) || 50,
|
|
293
|
+
n = e.querySelector(".ab-fv-count");
|
|
294
|
+
function r() {
|
|
295
|
+
return Math.floor(Math.random() * (a - t + 1)) + t;
|
|
296
|
+
}
|
|
297
|
+
n &&
|
|
298
|
+
((n.textContent = String(r())),
|
|
299
|
+
setInterval(function () {
|
|
300
|
+
n.textContent = String(r());
|
|
301
|
+
}, 3e3));
|
|
302
|
+
})(a));
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
function s() {
|
|
306
|
+
for (
|
|
307
|
+
var e = document.querySelectorAll(".lq-desc-accordion"), t = 0;
|
|
308
|
+
t < e.length;
|
|
309
|
+
t++
|
|
310
|
+
) {
|
|
311
|
+
var a = e[t];
|
|
312
|
+
a.dataset.descInit ||
|
|
313
|
+
((a.dataset.descInit = "1"),
|
|
314
|
+
a.addEventListener("click", function (e) {
|
|
315
|
+
var t = e.target.closest(".lq-desc-toggle");
|
|
316
|
+
if (t) {
|
|
317
|
+
var a = t.parentElement,
|
|
318
|
+
n = a.querySelector(".lq-desc-panel");
|
|
319
|
+
if (n)
|
|
320
|
+
"true" === a.getAttribute("data-open")
|
|
321
|
+
? (a.removeAttribute("data-open"),
|
|
322
|
+
t.setAttribute("aria-expanded", "false"),
|
|
323
|
+
(n.style.display = "none"))
|
|
324
|
+
: (a.setAttribute("data-open", "true"),
|
|
325
|
+
t.setAttribute("aria-expanded", "true"),
|
|
326
|
+
(n.style.display = "block"));
|
|
327
|
+
}
|
|
328
|
+
}));
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
function u() {
|
|
332
|
+
document
|
|
333
|
+
.querySelectorAll('.ab-announce[data-ann-type="slider"]')
|
|
334
|
+
.forEach(function (e) {
|
|
335
|
+
if (!e.dataset.annSliderInit) {
|
|
336
|
+
e.dataset.annSliderInit = "1";
|
|
337
|
+
var t = e.querySelectorAll(".ab-ann-slide");
|
|
338
|
+
if (t.length < 2) return;
|
|
339
|
+
var a = 0;
|
|
340
|
+
setInterval(function () {
|
|
341
|
+
var n = t[a],
|
|
342
|
+
next = (a + 1) % t.length;
|
|
343
|
+
n.classList.remove("ab-active");
|
|
344
|
+
n.classList.add("ab-exit-left");
|
|
345
|
+
t[next].classList.add("ab-active");
|
|
346
|
+
setTimeout(function () {
|
|
347
|
+
n.classList.remove("ab-exit-left");
|
|
348
|
+
}, 500);
|
|
349
|
+
a = next;
|
|
350
|
+
}, 3e3);
|
|
351
|
+
}
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
function v() {
|
|
355
|
+
document.querySelectorAll(".ab-ann-marquee").forEach(function (e) {
|
|
356
|
+
if (!e.dataset.marqueeInit) {
|
|
357
|
+
e.dataset.marqueeInit = "1";
|
|
358
|
+
var t = e.querySelector(".ab-ann-marquee-track");
|
|
359
|
+
if (!t) return;
|
|
360
|
+
var a = t.innerHTML,
|
|
361
|
+
n = t.scrollWidth,
|
|
362
|
+
r = e.offsetWidth;
|
|
363
|
+
if (n < 1) return;
|
|
364
|
+
var o = Math.ceil((2 * r) / n);
|
|
365
|
+
if (o < 2) o = 2;
|
|
366
|
+
t.innerHTML = "";
|
|
367
|
+
for (var i = 0; i < o; i++) t.insertAdjacentHTML("beforeend", a);
|
|
368
|
+
var c = t.scrollWidth / o,
|
|
369
|
+
l = Math.max(c / 40, 5);
|
|
370
|
+
t.style.setProperty("--marquee-dur", l + "s"),
|
|
371
|
+
t.style.setProperty("--marquee-offset", "-" + c + "px"),
|
|
372
|
+
t.classList.add("ab-running");
|
|
373
|
+
}
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
function h() {
|
|
377
|
+
function m(root) {
|
|
378
|
+
var wrap = root.closest("[data-eo-api-base]");
|
|
379
|
+
if (wrap && wrap.getAttribute("data-eo-api-base")) {
|
|
380
|
+
return wrap.getAttribute("data-eo-api-base").replace(/\/$/, "");
|
|
381
|
+
}
|
|
382
|
+
if (typeof window.__EO_STORE_API_BASE__ === "string" && window.__EO_STORE_API_BASE__) {
|
|
383
|
+
return window.__EO_STORE_API_BASE__.replace(/\/$/, "");
|
|
384
|
+
}
|
|
385
|
+
return "https://api.easyorders.dev/api/v1";
|
|
386
|
+
}
|
|
387
|
+
function p(body) {
|
|
388
|
+
if (Array.isArray(body)) return body;
|
|
389
|
+
if (body && Array.isArray(body.data)) return body.data;
|
|
390
|
+
return [];
|
|
391
|
+
}
|
|
392
|
+
document.querySelectorAll("[data-eo-hs-entity]:not([data-eo-hs-done])").forEach(function (root) {
|
|
393
|
+
var base = m(root);
|
|
394
|
+
var mount = root.querySelector("[data-eo-hs-mount]");
|
|
395
|
+
var idsStr = root.getAttribute("data-eo-hs-ids") || "";
|
|
396
|
+
var ids = idsStr
|
|
397
|
+
.split(",")
|
|
398
|
+
.map(function (s) {
|
|
399
|
+
return s.trim();
|
|
400
|
+
})
|
|
401
|
+
.filter(Boolean);
|
|
402
|
+
if (!base || !mount || ids.length === 0) {
|
|
403
|
+
root.setAttribute("data-eo-hs-done", "1");
|
|
404
|
+
return;
|
|
405
|
+
}
|
|
406
|
+
root.setAttribute("data-eo-hs-done", "1");
|
|
407
|
+
var entity = root.getAttribute("data-eo-hs-entity") || "";
|
|
408
|
+
var path =
|
|
409
|
+
entity === "categories"
|
|
410
|
+
? "categories"
|
|
411
|
+
: entity === "pages"
|
|
412
|
+
? "simple-pages"
|
|
413
|
+
: "products";
|
|
414
|
+
var url =
|
|
415
|
+
base.replace(/\/$/, "") +
|
|
416
|
+
"/" +
|
|
417
|
+
path +
|
|
418
|
+
"?filter=id||$in||" +
|
|
419
|
+
ids.join(",") +
|
|
420
|
+
"&limit=" +
|
|
421
|
+
ids.length;
|
|
422
|
+
mount.classList.add("eo-hs-loading");
|
|
423
|
+
fetch(url, { credentials: "omit", headers: { Accept: "application/json" } })
|
|
424
|
+
.then(function (res) {
|
|
425
|
+
return res.ok ? res.json() : Promise.reject(new Error(String(res.status)));
|
|
426
|
+
})
|
|
427
|
+
.then(function (body) {
|
|
428
|
+
var rows = p(body);
|
|
429
|
+
var byId = {};
|
|
430
|
+
rows.forEach(function (row) {
|
|
431
|
+
if (row && row.id != null) byId[String(row.id)] = row;
|
|
432
|
+
});
|
|
433
|
+
var frag = document.createDocumentFragment();
|
|
434
|
+
ids.forEach(function (id) {
|
|
435
|
+
var row = byId[id];
|
|
436
|
+
if (!row) return;
|
|
437
|
+
if (entity === "products") {
|
|
438
|
+
var slug = row.slug || "";
|
|
439
|
+
var name = row.name || "";
|
|
440
|
+
var thumb = row.thumb || "";
|
|
441
|
+
var price =
|
|
442
|
+
row.sale_price != null && row.price != null && row.sale_price < row.price
|
|
443
|
+
? row.sale_price
|
|
444
|
+
: row.price;
|
|
445
|
+
var el = document.createElement("a");
|
|
446
|
+
el.className = "eo-hs-card eo-hs-card--product";
|
|
447
|
+
el.href = slug ? "/products/" + encodeURIComponent(slug) : "#";
|
|
448
|
+
el.innerHTML =
|
|
449
|
+
(thumb
|
|
450
|
+
? '<span class="eo-hs-card__media"><img src="' +
|
|
451
|
+
String(thumb).replace(/"/g, "") +
|
|
452
|
+
'" alt="" loading="lazy" width="280" height="350" /></span>'
|
|
453
|
+
: '<span class="eo-hs-card__media eo-hs-card__media--empty"></span>') +
|
|
454
|
+
'<span class="eo-hs-card__body"><span class="eo-hs-card__title">' +
|
|
455
|
+
String(name || "").replace(/</g, "<") +
|
|
456
|
+
"</span>" +
|
|
457
|
+
(price != null
|
|
458
|
+
? '<span class="eo-hs-card__meta">' + String(price) + "</span>"
|
|
459
|
+
: "") +
|
|
460
|
+
"</span>";
|
|
461
|
+
frag.appendChild(el);
|
|
462
|
+
} else if (entity === "categories") {
|
|
463
|
+
var cslug = row.slug || "";
|
|
464
|
+
var cname = row.name || "";
|
|
465
|
+
var cthumb = row.thumb || "";
|
|
466
|
+
var ca = document.createElement("a");
|
|
467
|
+
ca.className = "eo-hs-card eo-hs-card--category";
|
|
468
|
+
ca.href = cslug ? "/collections/" + encodeURIComponent(cslug) : "#";
|
|
469
|
+
ca.innerHTML =
|
|
470
|
+
(cthumb
|
|
471
|
+
? '<span class="eo-hs-card__media"><img src="' +
|
|
472
|
+
String(cthumb).replace(/"/g, "") +
|
|
473
|
+
'" alt="" loading="lazy" width="320" height="200" /></span>'
|
|
474
|
+
: '<span class="eo-hs-card__media eo-hs-card__media--empty"></span>') +
|
|
475
|
+
'<span class="eo-hs-card__body"><span class="eo-hs-card__title">' +
|
|
476
|
+
String(cname || "").replace(/</g, "<") +
|
|
477
|
+
"</span></span>";
|
|
478
|
+
frag.appendChild(ca);
|
|
479
|
+
} else {
|
|
480
|
+
var pslug = row.slug || "";
|
|
481
|
+
var ptitle = row.title || "";
|
|
482
|
+
var pa = document.createElement("a");
|
|
483
|
+
pa.className = "eo-hs-card eo-hs-card--page";
|
|
484
|
+
pa.href = pslug ? "/pages/" + encodeURIComponent(pslug) : "#";
|
|
485
|
+
pa.innerHTML =
|
|
486
|
+
'<span class="eo-hs-card__body"><span class="eo-hs-card__title">' +
|
|
487
|
+
String(ptitle || "").replace(/</g, "<") +
|
|
488
|
+
"</span></span>";
|
|
489
|
+
frag.appendChild(pa);
|
|
490
|
+
}
|
|
491
|
+
});
|
|
492
|
+
mount.textContent = "";
|
|
493
|
+
mount.appendChild(frag);
|
|
494
|
+
mount.classList.remove("eo-hs-loading");
|
|
495
|
+
root.classList.remove("eo-hs--empty");
|
|
496
|
+
})
|
|
497
|
+
.catch(function () {
|
|
498
|
+
mount.classList.remove("eo-hs-loading");
|
|
499
|
+
mount.innerHTML =
|
|
500
|
+
'<p class="eo-hs-error" role="status">Unable to load this block. Check your connection or try again later.</p>';
|
|
501
|
+
});
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
function d() {
|
|
505
|
+
function b(el) {
|
|
506
|
+
var wrap = el.closest("[data-eo-api-base]");
|
|
507
|
+
if (wrap && wrap.getAttribute("data-eo-api-base")) {
|
|
508
|
+
return wrap.getAttribute("data-eo-api-base").replace(/\/$/, "");
|
|
509
|
+
}
|
|
510
|
+
if (typeof window.__EO_STORE_API_BASE__ === "string" && window.__EO_STORE_API_BASE__) {
|
|
511
|
+
return window.__EO_STORE_API_BASE__.replace(/\/$/, "");
|
|
512
|
+
}
|
|
513
|
+
return "https://api.easyorders.dev/api/v1";
|
|
514
|
+
}
|
|
515
|
+
document.querySelectorAll("a[data-eo-hs-cta]:not([data-eo-hs-cta-done])").forEach(function (a) {
|
|
516
|
+
var id = String(a.getAttribute("data-eo-hs-cta-id") || "").trim();
|
|
517
|
+
var entity = a.getAttribute("data-eo-hs-cta-entity") || "";
|
|
518
|
+
a.setAttribute("data-eo-hs-cta-done", "1");
|
|
519
|
+
if (!id) return;
|
|
520
|
+
var base = b(a);
|
|
521
|
+
var path =
|
|
522
|
+
entity === "categories"
|
|
523
|
+
? "categories"
|
|
524
|
+
: entity === "pages"
|
|
525
|
+
? "simple-pages"
|
|
526
|
+
: "products";
|
|
527
|
+
var url =
|
|
528
|
+
base.replace(/\/$/, "") +
|
|
529
|
+
"/" +
|
|
530
|
+
path +
|
|
531
|
+
"?filter=id||$in||" + id + "&limit=1";
|
|
532
|
+
fetch(url, { credentials: "omit", headers: { Accept: "application/json" } })
|
|
533
|
+
.then(function (res) {
|
|
534
|
+
return res.ok ? res.json() : Promise.reject(new Error(String(res.status)));
|
|
535
|
+
})
|
|
536
|
+
.then(function (body) {
|
|
537
|
+
var rows = Array.isArray(body) ? body : body && Array.isArray(body.data) ? body.data : [];
|
|
538
|
+
var row = rows[0];
|
|
539
|
+
if (!row) return;
|
|
540
|
+
var slug = row.slug || "";
|
|
541
|
+
if (entity === "categories" && slug) a.href = "/collections/" + encodeURIComponent(slug);
|
|
542
|
+
else if (entity === "pages" && slug) a.href = "/pages/" + encodeURIComponent(slug);
|
|
543
|
+
else if (entity === "products" && slug) a.href = "/products/" + encodeURIComponent(slug);
|
|
544
|
+
})
|
|
545
|
+
.catch(function () {});
|
|
546
|
+
});
|
|
547
|
+
}
|
|
548
|
+
e(),
|
|
549
|
+
t(),
|
|
550
|
+
a(),
|
|
551
|
+
n(),
|
|
552
|
+
r(),
|
|
553
|
+
o(),
|
|
554
|
+
u(),
|
|
555
|
+
v(),
|
|
556
|
+
h(),
|
|
557
|
+
d(),
|
|
558
|
+
window.__abGalleryKeyInit ||
|
|
559
|
+
((window.__abGalleryKeyInit = !0),
|
|
560
|
+
document.addEventListener("keydown", function (e) {
|
|
561
|
+
var t = document.querySelector("body > .ab-lightbox.ab-open");
|
|
562
|
+
if (t) {
|
|
563
|
+
if ("Escape" === e.key)
|
|
564
|
+
return (
|
|
565
|
+
t.classList.remove("ab-open"), void (document.body.style.overflow = "")
|
|
566
|
+
);
|
|
567
|
+
if ("ArrowLeft" !== e.key)
|
|
568
|
+
if ("ArrowRight" !== e.key);
|
|
569
|
+
else {
|
|
570
|
+
var a = t.querySelector("[data-lightbox-next]");
|
|
571
|
+
a && a.click();
|
|
572
|
+
}
|
|
573
|
+
else {
|
|
574
|
+
var n = t.querySelector("[data-lightbox-prev]");
|
|
575
|
+
n && n.click();
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
})),
|
|
579
|
+
i(),
|
|
580
|
+
c(),
|
|
581
|
+
l(),
|
|
582
|
+
s(),
|
|
583
|
+
new MutationObserver(function () {
|
|
584
|
+
e(), t(), a(), n(), r(), o(), u(), v(), h(), d(), i(), c(), l(), s();
|
|
585
|
+
}).observe(document.body, { childList: !0, subtree: !0 });
|
|
586
|
+
})();
|