@colabcommerce/elements 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CartForm.js +5 -5
- package/dist/{Container-7bFgo-eP.js → Container-CU_WrBOi.js} +1 -1
- package/dist/{Modal-BqRDRCTs.js → Modal-DTBKy_6d.js} +1 -1
- package/dist/ProductForm.js +114 -119
- package/dist/Retailer.js +4 -4
- package/dist/StoreLocator.js +268 -264
- package/dist/{addressComponentsToAddress-f0L6qfjZ.js → addressComponentsToAddress-DCL-K8mn.js} +54 -54
- package/dist/{browser-ponyfill-BEmK0BQJ.js → browser-ponyfill-DcK7_cJB.js} +1 -1
- package/dist/{globals-C3lGVSJ0.js → globals-B8-hYoIU.js} +1208 -1210
- package/dist/{index-BkhS8Nlh.js → index-CqSfhXDd.js} +2 -2
- package/dist/index-FM02Uq_P.js +100 -0
- package/package.json +1 -1
- package/dist/index-GbXQ8qje.js +0 -98
package/dist/{addressComponentsToAddress-f0L6qfjZ.js → addressComponentsToAddress-DCL-K8mn.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as E, jsxs as J } from "react/jsx-runtime";
|
|
2
2
|
import yt, { useMemo as me, createContext as hr, useContext as mr, useState as $, useEffect as ne, useRef as fn } from "react";
|
|
3
|
-
import { T as pn, r as yn, t as dn, q as vn, y as Ut, G as hn, v as mn, E as gn, s as Sn, S as wn, d as Ge, u as dt, f as vt, U as _n, V as Gt, W as bn, a as ye, c as T, F as gr, n as En, o as ge, b as An, B as On } from "./globals-
|
|
3
|
+
import { T as pn, r as yn, t as dn, q as vn, y as Ut, G as hn, v as mn, E as gn, s as Sn, S as wn, d as Ge, u as dt, f as vt, U as _n, V as Gt, W as bn, a as ye, c as T, F as gr, n as En, o as ge, b as An, B as On } from "./globals-B8-hYoIU.js";
|
|
4
4
|
function Se(...t) {
|
|
5
5
|
return t.filter((e) => e != null).reduce((e, r) => {
|
|
6
6
|
if (typeof r != "function")
|
|
@@ -125,7 +125,7 @@ const Mn = [
|
|
|
125
125
|
["line", { x1: "16", x2: "16", y1: "18", y2: "22", key: "1lctlv" }]
|
|
126
126
|
], Tn = Ge("sliders-horizontal", Mn), Sr = hr(), Al = ({ id: t, children: e }) => {
|
|
127
127
|
var S, b, d, I, O, _, x, U, F, C, G, B, m;
|
|
128
|
-
const { data: r } = dt([`
|
|
128
|
+
const { data: r } = dt([`https://api.colabcommerce.com/widget_api/store_locator/${t}`], vt), n = ((S = r == null ? void 0 : r.entity) == null ? void 0 : S.store_locator_default_center) || { lat: 49.8954, lng: -97.1385 }, o = ((b = r == null ? void 0 : r.entity) == null ? void 0 : b.store_locator_default_center_name) || "San Francisco, CA", a = (d = r == null ? void 0 : r.entity) == null ? void 0 : d.store_locator_center_icon, i = (I = r == null ? void 0 : r.entity) == null ? void 0 : I.store_locator_css, c = ((O = r == null ? void 0 : r.entity) == null ? void 0 : O.store_locator_default_radius) || "30000mi", s = ((_ = r == null ? void 0 : r.entity) == null ? void 0 : _.store_locator_default_zoom) || 4, l = (x = r == null ? void 0 : r.entity) == null ? void 0 : x.store_locator_store_icon, f = (U = r == null ? void 0 : r.entity) == null ? void 0 : U.store_type_icons, p = (F = r == null ? void 0 : r.entity) == null ? void 0 : F.store_types, u = ((C = r == null ? void 0 : r.entity) == null ? void 0 : C.store_locator_default_lat) || 49.8954, y = ((G = r == null ? void 0 : r.entity) == null ? void 0 : G.store_locator_default_lng) || -97.1385, v = ((B = r == null ? void 0 : r.entity) == null ? void 0 : B.store_locator_default_name) || null, g = ((m = r == null ? void 0 : r.entity) == null ? void 0 : m.cc_company_retailer_location_id) || null, h = {
|
|
129
129
|
id: t,
|
|
130
130
|
defaultCenter: n,
|
|
131
131
|
defaultCenterName: o,
|
|
@@ -153,7 +153,7 @@ const Ln = {}, kn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
153
153
|
__proto__: null,
|
|
154
154
|
default: Ln
|
|
155
155
|
}, Symbol.toStringTag, { value: "Module" })), Bn = /* @__PURE__ */ _n(kn);
|
|
156
|
-
var Et = typeof Map == "function" && Map.prototype, je = Object.getOwnPropertyDescriptor && Et ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, ke = Et && je && typeof je.get == "function" ? je.get : null, Ht = Et && Map.prototype.forEach, At = typeof Set == "function" && Set.prototype, Je = Object.getOwnPropertyDescriptor && At ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, Be = At && Je && typeof Je.get == "function" ? Je.get : null, qt = At && Set.prototype.forEach, Wn = typeof WeakMap == "function" && WeakMap.prototype, _e = Wn ? WeakMap.prototype.has : null, Un = typeof WeakSet == "function" && WeakSet.prototype, be = Un ? WeakSet.prototype.has : null, Gn = typeof WeakRef == "function" && WeakRef.prototype, zt = Gn ? WeakRef.prototype.deref : null, Hn = Boolean.prototype.valueOf, qn = Object.prototype.toString, zn = Function.prototype.toString, Vn = String.prototype.match, Ot = String.prototype.slice,
|
|
156
|
+
var Et = typeof Map == "function" && Map.prototype, je = Object.getOwnPropertyDescriptor && Et ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, ke = Et && je && typeof je.get == "function" ? je.get : null, Ht = Et && Map.prototype.forEach, At = typeof Set == "function" && Set.prototype, Je = Object.getOwnPropertyDescriptor && At ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, Be = At && Je && typeof Je.get == "function" ? Je.get : null, qt = At && Set.prototype.forEach, Wn = typeof WeakMap == "function" && WeakMap.prototype, _e = Wn ? WeakMap.prototype.has : null, Un = typeof WeakSet == "function" && WeakSet.prototype, be = Un ? WeakSet.prototype.has : null, Gn = typeof WeakRef == "function" && WeakRef.prototype, zt = Gn ? WeakRef.prototype.deref : null, Hn = Boolean.prototype.valueOf, qn = Object.prototype.toString, zn = Function.prototype.toString, Vn = String.prototype.match, Ot = String.prototype.slice, Z = String.prototype.replace, Kn = String.prototype.toUpperCase, Vt = String.prototype.toLowerCase, wr = RegExp.prototype.test, Kt = Array.prototype.concat, K = Array.prototype.join, Qn = Array.prototype.slice, Qt = Math.floor, ht = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, Xe = Object.getOwnPropertySymbols, mt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, fe = typeof Symbol == "function" && typeof Symbol.iterator == "object", Ee = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === fe || !0) ? Symbol.toStringTag : null, _r = Object.prototype.propertyIsEnumerable, jt = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(t) {
|
|
157
157
|
return t.__proto__;
|
|
158
158
|
} : null);
|
|
159
159
|
function Jt(t, e) {
|
|
@@ -164,12 +164,12 @@ function Jt(t, e) {
|
|
|
164
164
|
var n = t < 0 ? -Qt(-t) : Qt(t);
|
|
165
165
|
if (n !== t) {
|
|
166
166
|
var o = String(n), a = Ot.call(e, o.length + 1);
|
|
167
|
-
return
|
|
167
|
+
return Z.call(o, r, "$&_") + "." + Z.call(Z.call(a, /([0-9]{3})/g, "$&_"), /_$/, "");
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
|
-
return
|
|
170
|
+
return Z.call(e, r, "$&_");
|
|
171
171
|
}
|
|
172
|
-
var gt = Bn, Xt = gt.custom,
|
|
172
|
+
var gt = Bn, Xt = gt.custom, Zt = Ar(Xt) ? Xt : null, br = {
|
|
173
173
|
__proto__: null,
|
|
174
174
|
double: '"',
|
|
175
175
|
single: "'"
|
|
@@ -226,12 +226,12 @@ var gt = Bn, Xt = gt.custom, Yt = Ar(Xt) ? Xt : null, br = {
|
|
|
226
226
|
}
|
|
227
227
|
return t(m, a, n + 1, o);
|
|
228
228
|
}
|
|
229
|
-
if (typeof e == "function" && !
|
|
229
|
+
if (typeof e == "function" && !Yt(e)) {
|
|
230
230
|
var y = oo(e), v = Re(e, u);
|
|
231
231
|
return "[Function" + (y ? ": " + y : " (anonymous)") + "]" + (v.length > 0 ? " { " + K.call(v, ", ") + " }" : "");
|
|
232
232
|
}
|
|
233
233
|
if (Ar(e)) {
|
|
234
|
-
var g = fe ?
|
|
234
|
+
var g = fe ? Z.call(String(e), /^(Symbol\(.*\))_[^)]*$/, "$1") : mt.call(e);
|
|
235
235
|
return typeof e == "object" && !fe ? we(g) : g;
|
|
236
236
|
}
|
|
237
237
|
if (uo(e)) {
|
|
@@ -245,12 +245,12 @@ var gt = Bn, Xt = gt.custom, Yt = Ar(Xt) ? Xt : null, br = {
|
|
|
245
245
|
var d = Re(e, u);
|
|
246
246
|
return p && !po(d) ? "[" + wt(d, p) + "]" : "[ " + K.call(d, ", ") + " ]";
|
|
247
247
|
}
|
|
248
|
-
if (
|
|
248
|
+
if (Zn(e)) {
|
|
249
249
|
var I = Re(e, u);
|
|
250
250
|
return !("cause" in Error.prototype) && "cause" in e && !_r.call(e, "cause") ? "{ [" + String(e) + "] " + K.call(Kt.call("[cause]: " + u(e.cause), I), ", ") + " }" : I.length === 0 ? "[" + String(e) + "]" : "{ [" + String(e) + "] " + K.call(I, ", ") + " }";
|
|
251
251
|
}
|
|
252
252
|
if (typeof e == "object" && i) {
|
|
253
|
-
if (
|
|
253
|
+
if (Zt && typeof e[Zt] == "function" && gt)
|
|
254
254
|
return gt(e, { depth: f - n });
|
|
255
255
|
if (i !== "symbol" && typeof e.inspect == "function")
|
|
256
256
|
return e.inspect();
|
|
@@ -268,25 +268,25 @@ var gt = Bn, Xt = gt.custom, Yt = Ar(Xt) ? Xt : null, br = {
|
|
|
268
268
|
}), er("Set", Be.call(e), _, p);
|
|
269
269
|
}
|
|
270
270
|
if (io(e))
|
|
271
|
-
return
|
|
271
|
+
return Ze("WeakMap");
|
|
272
272
|
if (so(e))
|
|
273
|
-
return
|
|
273
|
+
return Ze("WeakSet");
|
|
274
274
|
if (lo(e))
|
|
275
|
-
return
|
|
275
|
+
return Ze("WeakRef");
|
|
276
276
|
if (eo(e))
|
|
277
277
|
return we(u(Number(e)));
|
|
278
278
|
if (ro(e))
|
|
279
279
|
return we(u(ht.call(e)));
|
|
280
280
|
if (to(e))
|
|
281
281
|
return we(Hn.call(e));
|
|
282
|
-
if (
|
|
282
|
+
if (Yn(e))
|
|
283
283
|
return we(u(String(e)));
|
|
284
284
|
if (typeof window < "u" && e === window)
|
|
285
285
|
return "{ [object Window] }";
|
|
286
286
|
if (typeof globalThis < "u" && e === globalThis || typeof Gt < "u" && e === Gt)
|
|
287
287
|
return "{ [object globalThis] }";
|
|
288
|
-
if (!Xn(e) && !
|
|
289
|
-
var x = Re(e, u), U = jt ? jt(e) === Object.prototype : e instanceof Object || e.constructor === Object, F = e instanceof Object ? "" : "null prototype", C = !U && Ee && Object(e) === e && Ee in e ? Ot.call(
|
|
288
|
+
if (!Xn(e) && !Yt(e)) {
|
|
289
|
+
var x = Re(e, u), U = jt ? jt(e) === Object.prototype : e instanceof Object || e.constructor === Object, F = e instanceof Object ? "" : "null prototype", C = !U && Ee && Object(e) === e && Ee in e ? Ot.call(Y(e), 8, -1) : F ? "Object" : "", G = U || typeof e.constructor != "function" ? "" : e.constructor.name ? e.constructor.name + " " : "", B = G + (C || F ? "[" + K.call(Kt.call([], C || [], F || []), ": ") + "] " : "");
|
|
290
290
|
return x.length === 0 ? B + "{}" : p ? B + "{" + wt(x, p) + "}" : B + "{ " + K.call(x, ", ") + " }";
|
|
291
291
|
}
|
|
292
292
|
return String(e);
|
|
@@ -296,31 +296,31 @@ function Er(t, e, r) {
|
|
|
296
296
|
return o + t + o;
|
|
297
297
|
}
|
|
298
298
|
function Jn(t) {
|
|
299
|
-
return
|
|
299
|
+
return Z.call(String(t), /"/g, """);
|
|
300
300
|
}
|
|
301
301
|
function ie(t) {
|
|
302
302
|
return !Ee || !(typeof t == "object" && (Ee in t || typeof t[Ee] < "u"));
|
|
303
303
|
}
|
|
304
304
|
function St(t) {
|
|
305
|
-
return
|
|
305
|
+
return Y(t) === "[object Array]" && ie(t);
|
|
306
306
|
}
|
|
307
307
|
function Xn(t) {
|
|
308
|
-
return
|
|
308
|
+
return Y(t) === "[object Date]" && ie(t);
|
|
309
309
|
}
|
|
310
|
-
function
|
|
311
|
-
return
|
|
312
|
-
}
|
|
313
|
-
function Yn(t) {
|
|
314
|
-
return Z(t) === "[object Error]" && ie(t);
|
|
310
|
+
function Yt(t) {
|
|
311
|
+
return Y(t) === "[object RegExp]" && ie(t);
|
|
315
312
|
}
|
|
316
313
|
function Zn(t) {
|
|
317
|
-
return
|
|
314
|
+
return Y(t) === "[object Error]" && ie(t);
|
|
315
|
+
}
|
|
316
|
+
function Yn(t) {
|
|
317
|
+
return Y(t) === "[object String]" && ie(t);
|
|
318
318
|
}
|
|
319
319
|
function eo(t) {
|
|
320
|
-
return
|
|
320
|
+
return Y(t) === "[object Number]" && ie(t);
|
|
321
321
|
}
|
|
322
322
|
function to(t) {
|
|
323
|
-
return
|
|
323
|
+
return Y(t) === "[object Boolean]" && ie(t);
|
|
324
324
|
}
|
|
325
325
|
function Ar(t) {
|
|
326
326
|
if (fe)
|
|
@@ -350,7 +350,7 @@ var no = Object.prototype.hasOwnProperty || function(t) {
|
|
|
350
350
|
function j(t, e) {
|
|
351
351
|
return no.call(t, e);
|
|
352
352
|
}
|
|
353
|
-
function
|
|
353
|
+
function Y(t) {
|
|
354
354
|
return qn.call(t);
|
|
355
355
|
}
|
|
356
356
|
function oo(t) {
|
|
@@ -446,7 +446,7 @@ function $r(t, e) {
|
|
|
446
446
|
}
|
|
447
447
|
var o = jn[e.quoteStyle || "single"];
|
|
448
448
|
o.lastIndex = 0;
|
|
449
|
-
var a =
|
|
449
|
+
var a = Z.call(Z.call(t, o, "\\$1"), /[\x00-\x1f]/g, fo);
|
|
450
450
|
return Er(a, "single", e);
|
|
451
451
|
}
|
|
452
452
|
function fo(t) {
|
|
@@ -462,7 +462,7 @@ function fo(t) {
|
|
|
462
462
|
function we(t) {
|
|
463
463
|
return "Object(" + t + ")";
|
|
464
464
|
}
|
|
465
|
-
function
|
|
465
|
+
function Ze(t) {
|
|
466
466
|
return t + " { ? }";
|
|
467
467
|
}
|
|
468
468
|
function er(t, e, r, n) {
|
|
@@ -587,9 +587,9 @@ if (Te)
|
|
|
587
587
|
} catch {
|
|
588
588
|
Te = !1;
|
|
589
589
|
}
|
|
590
|
-
var ko = Te,
|
|
590
|
+
var ko = Te, Ye, tr;
|
|
591
591
|
function Bo() {
|
|
592
|
-
return tr || (tr = 1,
|
|
592
|
+
return tr || (tr = 1, Ye = function() {
|
|
593
593
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
594
594
|
return !1;
|
|
595
595
|
if (typeof Symbol.iterator == "symbol")
|
|
@@ -615,7 +615,7 @@ function Bo() {
|
|
|
615
615
|
return !1;
|
|
616
616
|
}
|
|
617
617
|
return !0;
|
|
618
|
-
}),
|
|
618
|
+
}), Ye;
|
|
619
619
|
}
|
|
620
620
|
var et, rr;
|
|
621
621
|
function Wo() {
|
|
@@ -679,7 +679,7 @@ var Uo = "Function.prototype.bind called on incompatible ", Go = Object.prototyp
|
|
|
679
679
|
function Rr() {
|
|
680
680
|
return ir || (ir = 1, nt = Function.prototype.apply), nt;
|
|
681
681
|
}
|
|
682
|
-
var jo = typeof Reflect < "u" && Reflect && Reflect.apply, Jo = ze, Xo = Rr(),
|
|
682
|
+
var jo = typeof Reflect < "u" && Reflect && Reflect.apply, Jo = ze, Xo = Rr(), Zo = $t, Yo = jo, ea = Yo || Jo.call(Zo, Xo), ta = ze, ra = de, na = $t, oa = ea, Fr = function(e) {
|
|
683
683
|
if (e.length < 1 || typeof e[0] != "function")
|
|
684
684
|
throw new ra("a function is required");
|
|
685
685
|
return oa(ta, na, e);
|
|
@@ -1022,11 +1022,11 @@ function() {
|
|
|
1022
1022
|
};
|
|
1023
1023
|
return n;
|
|
1024
1024
|
}
|
|
1025
|
-
) : Fe,
|
|
1025
|
+
) : Fe, Za = de, Ya = He, ei = _o, ti = kr, ri = Xa, ni = ri || ti || ei, oi = function() {
|
|
1026
1026
|
var e, r = {
|
|
1027
1027
|
assert: function(n) {
|
|
1028
1028
|
if (!r.has(n))
|
|
1029
|
-
throw new
|
|
1029
|
+
throw new Za("Side channel does not contain " + Ya(n));
|
|
1030
1030
|
},
|
|
1031
1031
|
delete: function(n) {
|
|
1032
1032
|
return !!e && e.delete(n);
|
|
@@ -1643,7 +1643,7 @@ const qi = () => {
|
|
|
1643
1643
|
ne(() => {
|
|
1644
1644
|
e && s(e);
|
|
1645
1645
|
}, [e]);
|
|
1646
|
-
const { data: l, isLoading: f } = dt([`
|
|
1646
|
+
const { data: l, isLoading: f } = dt([`https://api.colabcommerce.com/widget_api/store_locator/${t}`], vt);
|
|
1647
1647
|
Gi("AIzaSyAnJmWEU1r63DiRWHkjczxzHyIEq3dhj4M");
|
|
1648
1648
|
const [p, u] = $(!1), { coords: y, isGeolocationAvailable: v, isGeolocationEnabled: g, getPosition: h } = ki({
|
|
1649
1649
|
suppressLocationOnMount: !r,
|
|
@@ -1651,7 +1651,7 @@ const qi = () => {
|
|
|
1651
1651
|
onSuccess: () => u(!1),
|
|
1652
1652
|
positionOptions: { enableHighAccuracy: !1 },
|
|
1653
1653
|
userDecisionTimeout: 5e3
|
|
1654
|
-
}), { location: S } = qi(), [b, d] = $(((Ct = l == null ? void 0 : l.entity) == null ? void 0 : Ct.store_locator_default_center_lat) || null), [I, O] = $(((Rt = l == null ? void 0 : l.entity) == null ? void 0 : Rt.store_locator_default_center_lng) || null), [_, x] = $(((Ft = l == null ? void 0 : l.entity) == null ? void 0 : Ft.store_locator_default_name) || null), [U, F] = $(null), [C, G] = $(null), [B, m] = $({ lat: ((Nt = l == null ? void 0 : l.entity) == null ? void 0 : Nt.store_locator_default_center_lat) * 1 || null, lng: ((Dt = l == null ? void 0 : l.entity) == null ? void 0 : Dt.store_locator_default_center_lng) * 1 || null }), [A, H] = $(((Mt = l == null ? void 0 : l.entity) == null ? void 0 : Mt.store_locator_default_center_lat) * 1 || null), [Q, ee] = $(((Tt = l == null ? void 0 : l.entity) == null ? void 0 : Tt.store_locator_default_center_lng) * 1 || null), [Qe, Ie] = $(9), [ve, Qr] = $("300mi"), [jr, Jr] = $("km"), [It, Xr] = $([]), [
|
|
1654
|
+
}), { location: S } = qi(), [b, d] = $(((Ct = l == null ? void 0 : l.entity) == null ? void 0 : Ct.store_locator_default_center_lat) || null), [I, O] = $(((Rt = l == null ? void 0 : l.entity) == null ? void 0 : Rt.store_locator_default_center_lng) || null), [_, x] = $(((Ft = l == null ? void 0 : l.entity) == null ? void 0 : Ft.store_locator_default_name) || null), [U, F] = $(null), [C, G] = $(null), [B, m] = $({ lat: ((Nt = l == null ? void 0 : l.entity) == null ? void 0 : Nt.store_locator_default_center_lat) * 1 || null, lng: ((Dt = l == null ? void 0 : l.entity) == null ? void 0 : Dt.store_locator_default_center_lng) * 1 || null }), [A, H] = $(((Mt = l == null ? void 0 : l.entity) == null ? void 0 : Mt.store_locator_default_center_lat) * 1 || null), [Q, ee] = $(((Tt = l == null ? void 0 : l.entity) == null ? void 0 : Tt.store_locator_default_center_lng) * 1 || null), [Qe, Ie] = $(9), [ve, Qr] = $("300mi"), [jr, Jr] = $("km"), [It, Xr] = $([]), [Zr, Yr] = $(!1), [en, tn] = $(!1), [rn, nn] = $(!0), [on, an] = $(!1), { data: q, error: ln, isLoading: cn } = dt(() => {
|
|
1655
1655
|
var L;
|
|
1656
1656
|
if (A && Q) {
|
|
1657
1657
|
const W = {
|
|
@@ -1660,7 +1660,7 @@ const qi = () => {
|
|
|
1660
1660
|
radius: "300mi"
|
|
1661
1661
|
}, X = n == null ? void 0 : n.map((k) => k == null ? void 0 : k.sku), Ce = n == null ? void 0 : n.map((k) => k == null ? void 0 : k.external_id), Bt = n == null ? void 0 : n.map((k) => k == null ? void 0 : k.collection_id);
|
|
1662
1662
|
o && (W.stocked_product_skus = X, W.stocked_product_external_ids = Ce, W.stocked_product_collection_ids = Bt), a && (W.available_product_skus = X, W.available_product_external_ids = Ce, W.available_product_collection_ids = Bt);
|
|
1663
|
-
let he = `
|
|
1663
|
+
let he = `https://api.colabcommerce.com/widget_api/store_locator?${Li.stringify(W, { arrayFormat: "brackets" })}`;
|
|
1664
1664
|
const Wt = (L = It.find((k) => k.bucket === "store_type")) == null ? void 0 : L.values;
|
|
1665
1665
|
if (Wt) {
|
|
1666
1666
|
const k = Wt.map((un) => `store_type[]=${un}`).join("&");
|
|
@@ -1715,8 +1715,8 @@ const qi = () => {
|
|
|
1715
1715
|
setLoadingGeo: u,
|
|
1716
1716
|
activeFilters: It,
|
|
1717
1717
|
setActiveFilters: Xr,
|
|
1718
|
-
messageModalOpen:
|
|
1719
|
-
setMessageModalOpen:
|
|
1718
|
+
messageModalOpen: Zr,
|
|
1719
|
+
setMessageModalOpen: Yr,
|
|
1720
1720
|
showMap: rn,
|
|
1721
1721
|
setShowMap: nn,
|
|
1722
1722
|
showDetails: en,
|
|
@@ -1767,13 +1767,13 @@ const qi = () => {
|
|
|
1767
1767
|
onChange: f
|
|
1768
1768
|
}
|
|
1769
1769
|
);
|
|
1770
|
-
}, Ki = "ttF7M", Qi = "mrH0z", ji = "Sx2fb", Ji = "ndAJC", Xi = "mrB--",
|
|
1770
|
+
}, Ki = "ttF7M", Qi = "mrH0z", ji = "Sx2fb", Ji = "ndAJC", Xi = "mrB--", Zi = "G9KVo", te = {
|
|
1771
1771
|
searchWrapper: Ki,
|
|
1772
1772
|
wrapper: Qi,
|
|
1773
1773
|
locateToggle: ji,
|
|
1774
1774
|
input: Ji,
|
|
1775
1775
|
filterToggle: Xi,
|
|
1776
|
-
filtersWrapper:
|
|
1776
|
+
filtersWrapper: Zi
|
|
1777
1777
|
}, Pl = ({ locationName: t, setLocationName: e, setSearchCenter: r, setMapCenter: n, handleLocate: o }) => {
|
|
1778
1778
|
var v;
|
|
1779
1779
|
const { t: a } = ye(), { settings: i } = Ke(), c = ((v = i == null ? void 0 : i.entity) == null ? void 0 : v.store_type_icons) || [], [s, l] = $(!1), f = fn(null), [p, u] = $(null), y = En("places");
|
|
@@ -1827,8 +1827,8 @@ const qi = () => {
|
|
|
1827
1827
|
] }) }),
|
|
1828
1828
|
/* @__PURE__ */ E(bt, { in: s, children: /* @__PURE__ */ E("div", { children: c && c.length > 0 && /* @__PURE__ */ E("div", { className: T(te.filtersWrapper), children: /* @__PURE__ */ E("div", { className: T(te.filterOptions), children: c.map((g) => /* @__PURE__ */ E(Vi, { storeType: g, name: g.name }, g.name)) }) }) }) })
|
|
1829
1829
|
] });
|
|
1830
|
-
},
|
|
1831
|
-
wrapper:
|
|
1830
|
+
}, Yi = "pPXOE", el = "WFut0", tl = "Vwghe", rl = "RK0kk", nl = "gHzpV", ol = "S-6Tm", al = "_2bPVX", il = "BXMg-", ll = "n-B3P", cl = "K-iBJ", sl = "uh8I9", ul = "j5fbV", fl = "ysYvV", N = {
|
|
1831
|
+
wrapper: Yi,
|
|
1832
1832
|
title: el,
|
|
1833
1833
|
clockIcon: tl,
|
|
1834
1834
|
hours: rl,
|
|
@@ -1842,17 +1842,17 @@ const qi = () => {
|
|
|
1842
1842
|
shown: ul,
|
|
1843
1843
|
shownHours: fl
|
|
1844
1844
|
}, pl = ({ i: t, hour: e }) => {
|
|
1845
|
-
const { t: r, locale: n } = ye(), o = /* @__PURE__ */ new Date();
|
|
1846
|
-
|
|
1847
|
-
const
|
|
1848
|
-
|
|
1849
|
-
const
|
|
1845
|
+
const { t: r, locale: n } = ye(), o = e.timezone || Intl.DateTimeFormat().resolvedOptions().timeZone || "America/Los_Angeles", a = /* @__PURE__ */ new Date();
|
|
1846
|
+
a.setUTCHours(e.open_at_hour - e.utc_offset_minute / 60, e.open_at_minute, 0, 0);
|
|
1847
|
+
const i = /* @__PURE__ */ new Date();
|
|
1848
|
+
i.setUTCHours(e.close_at_hour - e.utc_offset_minute / 60, e.close_at_minute, 0, 0);
|
|
1849
|
+
const c = a.getUTCMinutes() === 0 ? new Intl.DateTimeFormat(n, { hour: "numeric", timeZone: o }) : new Intl.DateTimeFormat(n, { hour: "numeric", minute: "2-digit", timeZone: o }), s = i.getUTCMinutes() === 0 ? new Intl.DateTimeFormat(n, { hour: "numeric", timeZone: o }) : new Intl.DateTimeFormat(n, { hour: "numeric", minute: "2-digit", timeZone: o });
|
|
1850
1850
|
return /* @__PURE__ */ J("div", { className: `${N.subHours} ${e.day === (/* @__PURE__ */ new Date()).getDay() ? N.today : ""}`, children: [
|
|
1851
1851
|
/* @__PURE__ */ E("div", { children: r(`store.days.${e.day}`) }),
|
|
1852
1852
|
/* @__PURE__ */ J("div", { children: [
|
|
1853
|
-
|
|
1853
|
+
c.format(a),
|
|
1854
1854
|
" - ",
|
|
1855
|
-
|
|
1855
|
+
s.format(i)
|
|
1856
1856
|
] })
|
|
1857
1857
|
] }, e.day);
|
|
1858
1858
|
}, xl = ({ hours: t, defaultOpen: e = !1 }) => {
|
|
@@ -1864,7 +1864,7 @@ const qi = () => {
|
|
|
1864
1864
|
const I = (O) => {
|
|
1865
1865
|
O.stopPropagation(), u(!p);
|
|
1866
1866
|
};
|
|
1867
|
-
return /* @__PURE__ */ J("div", { className: p ? T(N.wrapper, N.shown) : T(N.wrapper), children: [
|
|
1867
|
+
return /* @__PURE__ */ J("div", { "data-cy-id": "wrapper", className: p ? T(N.wrapper, N.shown) : T(N.wrapper), children: [
|
|
1868
1868
|
/* @__PURE__ */ J("div", { className: T(N.title), onClick: I, children: [
|
|
1869
1869
|
/* @__PURE__ */ J("span", { className: d, children: [
|
|
1870
1870
|
/* @__PURE__ */ E(Fn, { size: 16, className: T(N.clockIcon) }),
|
|
@@ -1877,7 +1877,7 @@ const qi = () => {
|
|
|
1877
1877
|
] }),
|
|
1878
1878
|
/* @__PURE__ */ E(Cn, { className: T(N.toggle) })
|
|
1879
1879
|
] }),
|
|
1880
|
-
/* @__PURE__ */ E(bt, { in: p, children: /* @__PURE__ */ E("div", { children: /* @__PURE__ */ E("div", { className: T(N.subHoursWrapper), children: S.map((O, _) => /* @__PURE__ */ E(pl, { i: _, hour: O }, O.day)) }) }) })
|
|
1880
|
+
/* @__PURE__ */ E(bt, { in: p, children: /* @__PURE__ */ E("div", { "data-cy-id": "sub-hours-wrapper", children: /* @__PURE__ */ E("div", { className: T(N.subHoursWrapper), children: S.map((O, _) => /* @__PURE__ */ E(pl, { i: _, hour: O }, O.day)) }) }) })
|
|
1881
1881
|
] });
|
|
1882
1882
|
}, yl = (t, e) => {
|
|
1883
1883
|
var r = 6371, n = De(e.lat - t.lat), o = De(e.lng - t.lng), a = Math.sin(n / 2) * Math.sin(n / 2) + Math.cos(De(t.lat)) * Math.cos(De(e.lat)) * Math.sin(o / 2) * Math.sin(o / 2), i = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)), c = r * i;
|