@colabcommerce/elements 0.0.2 → 0.0.3
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 +3 -3
- package/dist/ProductForm.js +4 -4
- package/dist/Retailer.js +1 -1
- package/dist/StoreLocator.js +116 -116
- package/dist/{addressComponentsToAddress-f0L6qfjZ.js → addressComponentsToAddress-CNK2WJ24.js} +3 -3
- package/dist/{index-BkhS8Nlh.js → index-DqABFy0O.js} +1 -1
- package/dist/{index-GbXQ8qje.js → index-TPy0P4tu.js} +1 -1
- package/package.json +1 -1
package/dist/CartForm.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as t, Fragment as H, jsxs as f } from "react/jsx-runtime";
|
|
2
2
|
import * as b from "react";
|
|
3
3
|
import { useRef as ae, useState as E, useCallback as re, useContext as j, useMemo as Y, useEffect as q } from "react";
|
|
4
|
-
import { C as ce, u as I, L as ie, d as le, g as de, b as ue, f as me, A as he, c as pe, w as fe, h as ge, e as _e } from "./addressComponentsToAddress-
|
|
5
|
-
import { L as ye, F as ve, a as Ce, Q as Ne } from "./index-
|
|
4
|
+
import { C as ce, u as I, L as ie, d as le, g as de, b as ue, f as me, A as he, c as pe, w as fe, h as ge, e as _e } from "./addressComponentsToAddress-CNK2WJ24.js";
|
|
5
|
+
import { L as ye, F as ve, a as Ce, Q as Ne } from "./index-DqABFy0O.js";
|
|
6
6
|
import { _ as be, p as B, q as k, j as we, A as Se, a as x, k as Ie, M as Le, c as y, Q as K, e as xe, h as F, i as Ae, F as v, R as qe, C as L, O as P, B as G, l as Q, I as Be, m as ke } from "./globals-C3lGVSJ0.js";
|
|
7
7
|
import { C as Me } from "./Container-7bFgo-eP.js";
|
|
8
8
|
function W() {
|
|
@@ -401,7 +401,7 @@ const Te = Object.assign(oe, {
|
|
|
401
401
|
validationSchema: M,
|
|
402
402
|
onSubmit: async (C) => {
|
|
403
403
|
fe("AIzaSyAnJmWEU1r63DiRWHkjczxzHyIEq3dhj4M");
|
|
404
|
-
const p = await he(i == null ? void 0 : i.lat, i == null ? void 0 : i.lng), m = pe(p.results[0].address_components), S = await fetch("
|
|
404
|
+
const p = await he(i == null ? void 0 : i.lat, i == null ? void 0 : i.lng), m = pe(p.results[0].address_components), S = await fetch("https://api.colabcommerce.com/widget_api/leads", {
|
|
405
405
|
method: "POST",
|
|
406
406
|
headers: {
|
|
407
407
|
"Content-Type": "application/json"
|
package/dist/ProductForm.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect as j, useState as E, Suspense as z } from "react";
|
|
3
|
-
import { u as F, L as H, g as $, d as D, S as Q, b as U, k as J, f as V, A as K, c as G, w as X, h as Y, e as Z } from "./addressComponentsToAddress-
|
|
4
|
-
import { L as ee, F as te, Q as ae } from "./index-
|
|
3
|
+
import { u as F, L as H, g as $, d as D, S as Q, b as U, k as J, f as V, A as K, c as G, w as X, h as Y, e as Z } from "./addressComponentsToAddress-CNK2WJ24.js";
|
|
4
|
+
import { L as ee, F as te, Q as ae } from "./index-DqABFy0O.js";
|
|
5
5
|
import { a as M, c as k, e as oe, h as b, i as ne, B as R, F as d, R as se, C as _, O as y, l as W, I as re, m as ie } from "./globals-C3lGVSJ0.js";
|
|
6
|
-
import { S as le } from "./index-
|
|
6
|
+
import { S as le } from "./index-TPy0P4tu.js";
|
|
7
7
|
const ce = () => {
|
|
8
8
|
const { locationName: m, setLocationName: l, setSearchCenter: c, setMapCenter: t, setLoadingGeo: f, getPosition: n } = F();
|
|
9
9
|
return /* @__PURE__ */ e(
|
|
@@ -93,7 +93,7 @@ const ce = () => {
|
|
|
93
93
|
validationSchema: w,
|
|
94
94
|
onSubmit: async (p) => {
|
|
95
95
|
X("AIzaSyAnJmWEU1r63DiRWHkjczxzHyIEq3dhj4M");
|
|
96
|
-
const T = await K(i == null ? void 0 : i.lat, i == null ? void 0 : i.lng), r = G(T.results[0].address_components), A = await fetch("
|
|
96
|
+
const T = await K(i == null ? void 0 : i.lat, i == null ? void 0 : i.lng), r = G(T.results[0].address_components), A = await fetch("https://api.colabcommerce.com/widget_api/leads", {
|
|
97
97
|
method: "POST",
|
|
98
98
|
headers: {
|
|
99
99
|
"Content-Type": "application/json"
|
package/dist/Retailer.js
CHANGED
|
@@ -10,7 +10,7 @@ const Je = Be(), kt = ({ id: t, lng: e, children: i }) => {
|
|
|
10
10
|
}, [e]);
|
|
11
11
|
const { data: a, error: o, isLoading: c, mutate: d } = Et(() => {
|
|
12
12
|
if (t)
|
|
13
|
-
return [`
|
|
13
|
+
return [`https://api.colabcommerce.com/widget_api/company_retailer_locations/${t}`, { "X-Cc-Id": t }];
|
|
14
14
|
throw new Error("No id provided");
|
|
15
15
|
}, Ct);
|
|
16
16
|
re(() => {
|
package/dist/StoreLocator.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as s, jsxs as l, Fragment as se } from "react/jsx-runtime";
|
|
2
2
|
import * as B from "react";
|
|
3
3
|
import T, { useState as k, useRef as pe, useEffect as D, useLayoutEffect as Ee, useMemo as he, useCallback as Te, Suspense as He } from "react";
|
|
4
|
-
import { a as E, b as je, c, d as Y, n as We, o as C, C as
|
|
5
|
-
import { C as qe, u as H, L as Je, d as Qe, l as Ve, a as Xe, S as Ke, b as Ye, A as Ze, c as et, w as tt, e as st, f as
|
|
6
|
-
import { S as
|
|
4
|
+
import { a as E, b as je, c, d as Y, n as We, o as C, C as ne, p as U, q as F, T as Re, r as Be, t as De, E as fe, s as Fe, v as Pe, R as ge, e as Ae, h as Q, i as ze, B as oe, F as w, I as Ge, l as Le, m as Ue } from "./globals-C3lGVSJ0.js";
|
|
5
|
+
import { C as qe, u as H, L as Je, d as Qe, l as Ve, a as Xe, S as Ke, b as Ye, A as Ze, c as et, w as tt, e as st, f as at } from "./addressComponentsToAddress-CNK2WJ24.js";
|
|
6
|
+
import { S as nt } from "./index-TPy0P4tu.js";
|
|
7
7
|
import { A as rt, d as it, u as ct, a as ot, B as lt, F as dt, b as mt, g as ut, M as V } from "./Modal-BqRDRCTs.js";
|
|
8
8
|
const pt = "-E4vU", ht = "Y9kow", ft = "x0-tL", gt = "XBGE-", vt = "oUgyZ", yt = "_5xvIm", wt = "yR8v8", Nt = "-FfTB", bt = "mPv4I", _t = "DizAj", Ct = "pL7JB", It = "uUoP0", N = {
|
|
9
9
|
wrapper: pt,
|
|
@@ -19,13 +19,13 @@ const pt = "-E4vU", ht = "Y9kow", ft = "x0-tL", gt = "XBGE-", vt = "oUgyZ", yt =
|
|
|
19
19
|
shown: Ct,
|
|
20
20
|
shownHours: It
|
|
21
21
|
}, St = ({ i: e, hour: t }) => {
|
|
22
|
-
const { t:
|
|
22
|
+
const { t: n, locale: a } = E(), i = /* @__PURE__ */ new Date();
|
|
23
23
|
i.setUTCHours(t.open_at_hour - t.utc_offset_minute / 60, t.open_at_minute, 0, 0);
|
|
24
24
|
const r = /* @__PURE__ */ new Date();
|
|
25
25
|
r.setUTCHours(t.close_at_hour - t.utc_offset_minute / 60, t.close_at_minute, 0, 0);
|
|
26
|
-
const d = i.getUTCMinutes() === 0 ? new Intl.DateTimeFormat(
|
|
26
|
+
const d = i.getUTCMinutes() === 0 ? new Intl.DateTimeFormat(a, { hour: "numeric" }) : new Intl.DateTimeFormat(a, { hour: "numeric", minute: "2-digit" }), m = r.getUTCMinutes() === 0 ? new Intl.DateTimeFormat(a, { hour: "numeric" }) : new Intl.DateTimeFormat(a, { hour: "numeric", minute: "2-digit" });
|
|
27
27
|
return /* @__PURE__ */ l("div", { className: `${N.subHours} ${t.day === (/* @__PURE__ */ new Date()).getDay() ? N.today : ""}`, children: [
|
|
28
|
-
/* @__PURE__ */ s("div", { children:
|
|
28
|
+
/* @__PURE__ */ s("div", { children: n(`store.days.${t.day}`) }),
|
|
29
29
|
/* @__PURE__ */ l("div", { children: [
|
|
30
30
|
d.format(i),
|
|
31
31
|
" - ",
|
|
@@ -33,11 +33,11 @@ const pt = "-E4vU", ht = "Y9kow", ft = "x0-tL", gt = "XBGE-", vt = "oUgyZ", yt =
|
|
|
33
33
|
] })
|
|
34
34
|
] }, t.day);
|
|
35
35
|
}, Ot = ({ hours: e, defaultOpen: t = !1 }) => {
|
|
36
|
-
const { t:
|
|
36
|
+
const { t: n, locale: a } = E(), { isOpen: i, openingSoon: r, closingSoon: d, openAt: m, closeAt: u, openFormatter: p, closeAtFormatter: f } = je(e), [y, _] = k(t), o = (/* @__PURE__ */ new Date()).getDay();
|
|
37
37
|
if (!(e == null ? void 0 : e.find((O) => O.day === o))) return null;
|
|
38
38
|
const W = i, I = e.sort((O, M) => O.day - M.day);
|
|
39
39
|
let S = null, h = null;
|
|
40
|
-
return W ? d ? (h = c(N.hours, N.soon), S = /* @__PURE__ */ s("span", { children:
|
|
40
|
+
return W ? d ? (h = c(N.hours, N.soon), S = /* @__PURE__ */ s("span", { children: n("store.closingSoon") })) : (h = c(N.hours, N.open), S = /* @__PURE__ */ s("span", { children: n("store.openNow") })) : r ? (h = c(N.hours, N.soon), S = /* @__PURE__ */ s("span", { children: n("store.openingSoon") })) : (h = c(N.hours, N.closed), S = /* @__PURE__ */ s("span", { children: n("store.closedNow") })), /* @__PURE__ */ l("div", { className: y ? c(N.wrapper, N.shown) : c(N.wrapper), children: [
|
|
41
41
|
/* @__PURE__ */ l("div", { className: c(N.title), onClick: () => _(!y), children: [
|
|
42
42
|
/* @__PURE__ */ l("span", { className: h, children: [
|
|
43
43
|
/* @__PURE__ */ s("i", { className: "lpe-icons", children: "clock" }),
|
|
@@ -62,57 +62,57 @@ var ve = {
|
|
|
62
62
|
}, le = T.createContext && /* @__PURE__ */ T.createContext(ve), xt = ["attr", "size", "title"];
|
|
63
63
|
function Mt(e, t) {
|
|
64
64
|
if (e == null) return {};
|
|
65
|
-
var
|
|
65
|
+
var n = $t(e, t), a, i;
|
|
66
66
|
if (Object.getOwnPropertySymbols) {
|
|
67
67
|
var r = Object.getOwnPropertySymbols(e);
|
|
68
68
|
for (i = 0; i < r.length; i++)
|
|
69
|
-
|
|
69
|
+
a = r[i], !(t.indexOf(a) >= 0) && Object.prototype.propertyIsEnumerable.call(e, a) && (n[a] = e[a]);
|
|
70
70
|
}
|
|
71
|
-
return
|
|
71
|
+
return n;
|
|
72
72
|
}
|
|
73
73
|
function $t(e, t) {
|
|
74
74
|
if (e == null) return {};
|
|
75
|
-
var
|
|
76
|
-
for (var
|
|
77
|
-
if (Object.prototype.hasOwnProperty.call(e,
|
|
78
|
-
if (t.indexOf(
|
|
79
|
-
a
|
|
75
|
+
var n = {};
|
|
76
|
+
for (var a in e)
|
|
77
|
+
if (Object.prototype.hasOwnProperty.call(e, a)) {
|
|
78
|
+
if (t.indexOf(a) >= 0) continue;
|
|
79
|
+
n[a] = e[a];
|
|
80
80
|
}
|
|
81
|
-
return
|
|
81
|
+
return n;
|
|
82
82
|
}
|
|
83
83
|
function X() {
|
|
84
84
|
return X = Object.assign ? Object.assign.bind() : function(e) {
|
|
85
85
|
for (var t = 1; t < arguments.length; t++) {
|
|
86
|
-
var
|
|
87
|
-
for (var
|
|
88
|
-
Object.prototype.hasOwnProperty.call(
|
|
86
|
+
var n = arguments[t];
|
|
87
|
+
for (var a in n)
|
|
88
|
+
Object.prototype.hasOwnProperty.call(n, a) && (e[a] = n[a]);
|
|
89
89
|
}
|
|
90
90
|
return e;
|
|
91
91
|
}, X.apply(this, arguments);
|
|
92
92
|
}
|
|
93
93
|
function de(e, t) {
|
|
94
|
-
var
|
|
94
|
+
var n = Object.keys(e);
|
|
95
95
|
if (Object.getOwnPropertySymbols) {
|
|
96
|
-
var
|
|
97
|
-
t && (
|
|
96
|
+
var a = Object.getOwnPropertySymbols(e);
|
|
97
|
+
t && (a = a.filter(function(i) {
|
|
98
98
|
return Object.getOwnPropertyDescriptor(e, i).enumerable;
|
|
99
|
-
})),
|
|
99
|
+
})), n.push.apply(n, a);
|
|
100
100
|
}
|
|
101
|
-
return
|
|
101
|
+
return n;
|
|
102
102
|
}
|
|
103
103
|
function K(e) {
|
|
104
104
|
for (var t = 1; t < arguments.length; t++) {
|
|
105
|
-
var
|
|
106
|
-
t % 2 ? de(Object(
|
|
107
|
-
kt(e,
|
|
108
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(
|
|
109
|
-
Object.defineProperty(e,
|
|
105
|
+
var n = arguments[t] != null ? arguments[t] : {};
|
|
106
|
+
t % 2 ? de(Object(n), !0).forEach(function(a) {
|
|
107
|
+
kt(e, a, n[a]);
|
|
108
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : de(Object(n)).forEach(function(a) {
|
|
109
|
+
Object.defineProperty(e, a, Object.getOwnPropertyDescriptor(n, a));
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
112
|
return e;
|
|
113
113
|
}
|
|
114
|
-
function kt(e, t,
|
|
115
|
-
return t = Et(t), t in e ? Object.defineProperty(e, t, { value:
|
|
114
|
+
function kt(e, t, n) {
|
|
115
|
+
return t = Et(t), t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
|
|
116
116
|
}
|
|
117
117
|
function Et(e) {
|
|
118
118
|
var t = Tt(e, "string");
|
|
@@ -120,17 +120,17 @@ function Et(e) {
|
|
|
120
120
|
}
|
|
121
121
|
function Tt(e, t) {
|
|
122
122
|
if (typeof e != "object" || !e) return e;
|
|
123
|
-
var
|
|
124
|
-
if (
|
|
125
|
-
var
|
|
126
|
-
if (typeof
|
|
123
|
+
var n = e[Symbol.toPrimitive];
|
|
124
|
+
if (n !== void 0) {
|
|
125
|
+
var a = n.call(e, t);
|
|
126
|
+
if (typeof a != "object") return a;
|
|
127
127
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
128
128
|
}
|
|
129
129
|
return (t === "string" ? String : Number)(e);
|
|
130
130
|
}
|
|
131
131
|
function ye(e) {
|
|
132
|
-
return e && e.map((t,
|
|
133
|
-
key:
|
|
132
|
+
return e && e.map((t, n) => /* @__PURE__ */ T.createElement(t.tag, K({
|
|
133
|
+
key: n
|
|
134
134
|
}, t.attr), ye(t.child)));
|
|
135
135
|
}
|
|
136
136
|
function Ht(e) {
|
|
@@ -139,27 +139,27 @@ function Ht(e) {
|
|
|
139
139
|
}, t), ye(e.child));
|
|
140
140
|
}
|
|
141
141
|
function jt(e) {
|
|
142
|
-
var t = (
|
|
142
|
+
var t = (n) => {
|
|
143
143
|
var {
|
|
144
|
-
attr:
|
|
144
|
+
attr: a,
|
|
145
145
|
size: i,
|
|
146
146
|
title: r
|
|
147
|
-
} = e, d = Mt(e, xt), m = i ||
|
|
148
|
-
return
|
|
147
|
+
} = e, d = Mt(e, xt), m = i || n.size || "1em", u;
|
|
148
|
+
return n.className && (u = n.className), e.className && (u = (u ? u + " " : "") + e.className), /* @__PURE__ */ T.createElement("svg", X({
|
|
149
149
|
stroke: "currentColor",
|
|
150
150
|
fill: "currentColor",
|
|
151
151
|
strokeWidth: "0"
|
|
152
|
-
},
|
|
152
|
+
}, n.attr, a, d, {
|
|
153
153
|
className: u,
|
|
154
154
|
style: K(K({
|
|
155
|
-
color: e.color ||
|
|
156
|
-
},
|
|
155
|
+
color: e.color || n.color
|
|
156
|
+
}, n.style), e.style),
|
|
157
157
|
height: m,
|
|
158
158
|
width: m,
|
|
159
159
|
xmlns: "http://www.w3.org/2000/svg"
|
|
160
160
|
}), r && /* @__PURE__ */ T.createElement("title", null, r), e.children);
|
|
161
161
|
};
|
|
162
|
-
return le !== void 0 ? /* @__PURE__ */ T.createElement(le.Consumer, null, (
|
|
162
|
+
return le !== void 0 ? /* @__PURE__ */ T.createElement(le.Consumer, null, (n) => t(n)) : t(ve);
|
|
163
163
|
}
|
|
164
164
|
function Wt(e) {
|
|
165
165
|
return Ht({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z" }, child: [] }] })(e);
|
|
@@ -218,7 +218,7 @@ const zt = [
|
|
|
218
218
|
}
|
|
219
219
|
]
|
|
220
220
|
], Gt = Y("phone", zt), Lt = () => {
|
|
221
|
-
const { t: e } = E(), { locationName: t, setLocationName:
|
|
221
|
+
const { t: e } = E(), { locationName: t, setLocationName: n, setSearchCenter: a, setMapCenter: i, setShowFilters: r, setLoadingGeo: d, getPosition: m } = H(), u = pe(null), [p, f] = k(null), y = We("places");
|
|
222
222
|
return D(() => {
|
|
223
223
|
if (!y || !u.current) return;
|
|
224
224
|
const b = {
|
|
@@ -233,14 +233,14 @@ const zt = [
|
|
|
233
233
|
return;
|
|
234
234
|
}
|
|
235
235
|
const o = { lat: b.geometry.location.lat(), lng: b.geometry.location.lng() };
|
|
236
|
-
i(o),
|
|
236
|
+
i(o), a(o), n(b.formatted_address);
|
|
237
237
|
});
|
|
238
|
-
}, [p,
|
|
238
|
+
}, [p, n]), /* @__PURE__ */ s(Je, { locationName: t, setLocationName: n, setSearchCenter: a, setMapCenter: i, handleLocate: () => {
|
|
239
239
|
d(!0), m();
|
|
240
240
|
} });
|
|
241
241
|
}, Ut = typeof global < "u" && // @ts-ignore
|
|
242
242
|
global.navigator && // @ts-ignore
|
|
243
|
-
global.navigator.product === "ReactNative", qt = typeof document < "u", Jt = qt || Ut ? Ee : D, Qt = "_0KWD0", Vt = "g3FBG", Xt = "CLUyb", Kt = "npnV3", Yt = "BIswH", Zt = "-m7UC", es = "-q7GQ", ts = "YbQl1", ss = "N8xLz",
|
|
243
|
+
global.navigator.product === "ReactNative", qt = typeof document < "u", Jt = qt || Ut ? Ee : D, Qt = "_0KWD0", Vt = "g3FBG", Xt = "CLUyb", Kt = "npnV3", Yt = "BIswH", Zt = "-m7UC", es = "-q7GQ", ts = "YbQl1", ss = "N8xLz", as = "I-G0P", ns = "OuZOS", rs = "WA4AC", is = "xkI8T", cs = "frXG0", os = "xm9kk", ls = "owF5c", ds = "FeU6b", ms = "XSAWh", us = "RmHU1", ps = "VFB9v", v = {
|
|
244
244
|
wrapper: Qt,
|
|
245
245
|
selected: Vt,
|
|
246
246
|
nameWrapper: Xt,
|
|
@@ -250,8 +250,8 @@ global.navigator.product === "ReactNative", qt = typeof document < "u", Jt = qt
|
|
|
250
250
|
address: es,
|
|
251
251
|
interactWrapper: ts,
|
|
252
252
|
interactItem: ss,
|
|
253
|
-
interactIcon:
|
|
254
|
-
interactText:
|
|
253
|
+
interactIcon: as,
|
|
254
|
+
interactText: ns,
|
|
255
255
|
addressWrapper: rs,
|
|
256
256
|
viewProducts: is,
|
|
257
257
|
rotateIcon: cs,
|
|
@@ -261,9 +261,9 @@ global.navigator.product === "ReactNative", qt = typeof document < "u", Jt = qt
|
|
|
261
261
|
productName: ms,
|
|
262
262
|
productsWrapper: us,
|
|
263
263
|
dismissable: ps
|
|
264
|
-
}, hs = ({ id: e, location: t, dismissable:
|
|
264
|
+
}, hs = ({ id: e, location: t, dismissable: n }) => {
|
|
265
265
|
var q, P, A, z, J;
|
|
266
|
-
const
|
|
266
|
+
const a = "store-locator-sidebar-list-item", { selectedLocation: i, searchCenter: r, showDetails: d, setShowDetails: m, setMessageModalOpen: u, setSelectedLocationId: p } = H(), { t: f, i18n: y } = E(), _ = y == null ? void 0 : y.language, [b, o] = k(!1), [j, W] = k(!1), I = () => {
|
|
267
267
|
u(!0);
|
|
268
268
|
}, S = () => {
|
|
269
269
|
p(e);
|
|
@@ -316,20 +316,20 @@ global.navigator.product === "ReactNative", qt = typeof document < "u", Jt = qt
|
|
|
316
316
|
{
|
|
317
317
|
href: `https://www.google.com/maps/dir/?api=1&destination=${encodeURIComponent((J = t == null ? void 0 : t.address) == null ? void 0 : J.string)}=&destination_place_id=${t == null ? void 0 : t.place_id}`,
|
|
318
318
|
target: "new",
|
|
319
|
-
className: [C("interactItem", v,
|
|
319
|
+
className: [C("interactItem", v, a), "cc-interact-item-directions"].join(" "),
|
|
320
320
|
children: [
|
|
321
|
-
/* @__PURE__ */ s("div", { className: [C("interactIcon", v,
|
|
322
|
-
/* @__PURE__ */ s("div", { className: [C("interactText", v,
|
|
321
|
+
/* @__PURE__ */ s("div", { className: [C("interactIcon", v, a), "cc-interact-icon-directions"].join(" "), children: /* @__PURE__ */ s(Bt, { size: 20 }) }),
|
|
322
|
+
/* @__PURE__ */ s("div", { className: [C("interactText", v, a), "cc-interact-text-directions"].join(" "), children: f("general.directions") })
|
|
323
323
|
]
|
|
324
324
|
}
|
|
325
325
|
),
|
|
326
|
-
/* @__PURE__ */ l("button", { className: C("interactItem", v,
|
|
327
|
-
/* @__PURE__ */ s("div", { className: C("interactIcon", v,
|
|
328
|
-
/* @__PURE__ */ s("div", { className: C("interactText", v,
|
|
326
|
+
/* @__PURE__ */ l("button", { className: C("interactItem", v, a), onClick: I, children: [
|
|
327
|
+
/* @__PURE__ */ s("div", { className: C("interactIcon", v, a), children: /* @__PURE__ */ s(At, { size: 20 }) }),
|
|
328
|
+
/* @__PURE__ */ s("div", { className: C("interactText", v, a), children: f("general.message") })
|
|
329
329
|
] }),
|
|
330
|
-
(t == null ? void 0 : t.website) && /* @__PURE__ */ l("a", { href: t == null ? void 0 : t.website, target: "_blank", className: C("interactItem", v,
|
|
331
|
-
/* @__PURE__ */ s("div", { className: C("interactIcon", v,
|
|
332
|
-
/* @__PURE__ */ s("div", { className: C("interactText", v,
|
|
330
|
+
(t == null ? void 0 : t.website) && /* @__PURE__ */ l("a", { href: t == null ? void 0 : t.website, target: "_blank", className: C("interactItem", v, a), children: [
|
|
331
|
+
/* @__PURE__ */ s("div", { className: C("interactIcon", v, a), children: /* @__PURE__ */ s(Ft, { size: 20 }) }),
|
|
332
|
+
/* @__PURE__ */ s("div", { className: C("interactText", v, a), children: f("general.website") })
|
|
333
333
|
] })
|
|
334
334
|
] })
|
|
335
335
|
] });
|
|
@@ -338,7 +338,7 @@ global.navigator.product === "ReactNative", qt = typeof document < "u", Jt = qt
|
|
|
338
338
|
itemWrapper: gs,
|
|
339
339
|
wrapper: vs
|
|
340
340
|
}, ys = () => {
|
|
341
|
-
const { t: e } = E(), { locations: t, isLoading:
|
|
341
|
+
const { t: e } = E(), { locations: t, isLoading: n, selectedLocationId: a } = H();
|
|
342
342
|
function i(r, d) {
|
|
343
343
|
if (!r || !d) return;
|
|
344
344
|
const m = r.getBoundingClientRect(), p = d.getBoundingClientRect().top - m.top + r.scrollTop;
|
|
@@ -348,55 +348,55 @@ global.navigator.product === "ReactNative", qt = typeof document < "u", Jt = qt
|
|
|
348
348
|
});
|
|
349
349
|
}
|
|
350
350
|
return D(() => {
|
|
351
|
-
const r = document.getElementById(`location-${
|
|
351
|
+
const r = document.getElementById(`location-${a}`);
|
|
352
352
|
if (r) {
|
|
353
353
|
const d = document.getElementById("llw");
|
|
354
354
|
i(d, r);
|
|
355
355
|
}
|
|
356
|
-
}, [
|
|
356
|
+
}, [a]), n ? /* @__PURE__ */ s("div", { className: c(G.loading), children: /* @__PURE__ */ s("img", { src: "https://images.sofasandsectionals.com/cc/pal-loader.svg", width: "50", height: "50", alt: e("store_locator.loading") }) }) : /* @__PURE__ */ s("div", { id: "location-list", className: `${G.wrapper} ${a ? G.hasSelected : ""}`, children: t.map((r) => /* @__PURE__ */ s("div", { id: `location-${r.id}`, className: `${G.itemWrapper} ${a === r.id ? G.selected : ""}`, children: /* @__PURE__ */ s(hs, { id: r.id, location: r }) }, r.id)) });
|
|
357
357
|
}, ws = "N2FHA", Ns = "BSoIL", bs = "xMDdB", _s = "-zMng", L = {
|
|
358
358
|
wrapper: ws,
|
|
359
359
|
top: Ns,
|
|
360
360
|
searchWrapper: bs,
|
|
361
361
|
listWrapper: _s
|
|
362
362
|
}, Cs = () => {
|
|
363
|
-
const { showMap: e, showFilters: t, setShowFilters:
|
|
364
|
-
return /* @__PURE__ */ l(
|
|
363
|
+
const { showMap: e, showFilters: t, setShowFilters: n, locale: a, selectedLocationId: i } = H();
|
|
364
|
+
return /* @__PURE__ */ l(ne, { xs: { order: 1 }, lg: { order: 0, span: 4 }, xxl: { order: 0, span: 3 }, className: c(L.wrapper), children: [
|
|
365
365
|
/* @__PURE__ */ s("div", { className: c(L.top), children: /* @__PURE__ */ s("div", { className: c(L.searchWrapper), children: /* @__PURE__ */ s("div", { className: "mb-3", children: /* @__PURE__ */ s(Lt, {}) }) }) }),
|
|
366
366
|
/* @__PURE__ */ s("div", { className: `${L.listWrapper} ${i ? L.hasSelected : ""}`, id: "llw", children: /* @__PURE__ */ s(ys, {}) })
|
|
367
367
|
] });
|
|
368
|
-
},
|
|
368
|
+
}, ae = /* @__PURE__ */ new WeakMap(), me = (e, t) => {
|
|
369
369
|
if (!e || !t) return;
|
|
370
|
-
const
|
|
371
|
-
|
|
372
|
-
let
|
|
373
|
-
return
|
|
370
|
+
const n = ae.get(t) || /* @__PURE__ */ new Map();
|
|
371
|
+
ae.set(t, n);
|
|
372
|
+
let a = n.get(e);
|
|
373
|
+
return a || (a = t.matchMedia(e), a.refCount = 0, n.set(a.media, a)), a;
|
|
374
374
|
};
|
|
375
375
|
function Is(e, t = typeof window > "u" ? void 0 : window) {
|
|
376
|
-
const
|
|
376
|
+
const n = me(e, t), [a, i] = k(() => n ? n.matches : !1);
|
|
377
377
|
return Jt(() => {
|
|
378
378
|
let r = me(e, t);
|
|
379
379
|
if (!r)
|
|
380
380
|
return i(!1);
|
|
381
|
-
let d =
|
|
381
|
+
let d = ae.get(t);
|
|
382
382
|
const m = () => {
|
|
383
383
|
i(r.matches);
|
|
384
384
|
};
|
|
385
385
|
return r.refCount++, r.addListener(m), m(), () => {
|
|
386
386
|
r.removeListener(m), r.refCount--, r.refCount <= 0 && (d == null || d.delete(r.media)), r = void 0;
|
|
387
387
|
};
|
|
388
|
-
}, [e]),
|
|
388
|
+
}, [e]), a;
|
|
389
389
|
}
|
|
390
390
|
function Ss(e) {
|
|
391
391
|
const t = Object.keys(e);
|
|
392
|
-
function
|
|
392
|
+
function n(m, u) {
|
|
393
393
|
return m === u ? u : m ? `${m} and ${u}` : u;
|
|
394
394
|
}
|
|
395
|
-
function
|
|
395
|
+
function a(m) {
|
|
396
396
|
return t[Math.min(t.indexOf(m) + 1, t.length - 1)];
|
|
397
397
|
}
|
|
398
398
|
function i(m) {
|
|
399
|
-
const u =
|
|
399
|
+
const u = a(m);
|
|
400
400
|
let p = e[u];
|
|
401
401
|
return typeof p == "number" ? p = `${p - 0.2}px` : p = `calc(${p} - 0.2px)`, `(max-width: ${p})`;
|
|
402
402
|
}
|
|
@@ -409,7 +409,7 @@ function Ss(e) {
|
|
|
409
409
|
typeof m == "object" ? (f = m, p = u, u = !0) : (u = u || !0, f = {
|
|
410
410
|
[m]: u
|
|
411
411
|
});
|
|
412
|
-
let y = he(() => Object.entries(f).reduce((_, [b, o]) => ((o === "up" || o === !0) && (_ =
|
|
412
|
+
let y = he(() => Object.entries(f).reduce((_, [b, o]) => ((o === "up" || o === !0) && (_ = n(_, r(b))), (o === "down" || o === !0) && (_ = n(_, i(b))), _), ""), [JSON.stringify(f)]);
|
|
413
413
|
return Is(y, p);
|
|
414
414
|
}
|
|
415
415
|
return d;
|
|
@@ -424,12 +424,12 @@ const Os = Ss({
|
|
|
424
424
|
}), we = /* @__PURE__ */ B.forwardRef(({
|
|
425
425
|
className: e,
|
|
426
426
|
bsPrefix: t,
|
|
427
|
-
as:
|
|
428
|
-
...
|
|
429
|
-
}, i) => (t = U(t, "offcanvas-body"), /* @__PURE__ */ s(
|
|
427
|
+
as: n = "div",
|
|
428
|
+
...a
|
|
429
|
+
}, i) => (t = U(t, "offcanvas-body"), /* @__PURE__ */ s(n, {
|
|
430
430
|
ref: i,
|
|
431
431
|
className: F(e, t),
|
|
432
|
-
...
|
|
432
|
+
...a
|
|
433
433
|
})));
|
|
434
434
|
we.displayName = "OffcanvasBody";
|
|
435
435
|
const xs = {
|
|
@@ -438,8 +438,8 @@ const xs = {
|
|
|
438
438
|
}, Ne = /* @__PURE__ */ B.forwardRef(({
|
|
439
439
|
bsPrefix: e,
|
|
440
440
|
className: t,
|
|
441
|
-
children:
|
|
442
|
-
in:
|
|
441
|
+
children: n,
|
|
442
|
+
in: a = !1,
|
|
443
443
|
mountOnEnter: i = !1,
|
|
444
444
|
unmountOnExit: r = !1,
|
|
445
445
|
appear: d = !1,
|
|
@@ -447,41 +447,41 @@ const xs = {
|
|
|
447
447
|
}, u) => (e = U(e, "offcanvas"), /* @__PURE__ */ s(Re, {
|
|
448
448
|
ref: u,
|
|
449
449
|
addEndListener: De,
|
|
450
|
-
in:
|
|
450
|
+
in: a,
|
|
451
451
|
mountOnEnter: i,
|
|
452
452
|
unmountOnExit: r,
|
|
453
453
|
appear: d,
|
|
454
454
|
...m,
|
|
455
|
-
childRef: Be(
|
|
456
|
-
children: (p, f) => /* @__PURE__ */ B.cloneElement(
|
|
455
|
+
childRef: Be(n),
|
|
456
|
+
children: (p, f) => /* @__PURE__ */ B.cloneElement(n, {
|
|
457
457
|
...f,
|
|
458
|
-
className: F(t,
|
|
458
|
+
className: F(t, n.props.className, (p === fe || p === Fe) && `${e}-toggling`, xs[p])
|
|
459
459
|
})
|
|
460
460
|
})));
|
|
461
461
|
Ne.displayName = "OffcanvasToggling";
|
|
462
462
|
const be = /* @__PURE__ */ B.forwardRef(({
|
|
463
463
|
bsPrefix: e,
|
|
464
464
|
className: t,
|
|
465
|
-
closeLabel:
|
|
466
|
-
closeButton:
|
|
465
|
+
closeLabel: n = "Close",
|
|
466
|
+
closeButton: a = !1,
|
|
467
467
|
...i
|
|
468
468
|
}, r) => (e = U(e, "offcanvas-header"), /* @__PURE__ */ s(rt, {
|
|
469
469
|
ref: r,
|
|
470
470
|
...i,
|
|
471
471
|
className: F(t, e),
|
|
472
|
-
closeLabel:
|
|
473
|
-
closeButton:
|
|
472
|
+
closeLabel: n,
|
|
473
|
+
closeButton: a
|
|
474
474
|
})));
|
|
475
475
|
be.displayName = "OffcanvasHeader";
|
|
476
476
|
const Ms = it("h5"), _e = /* @__PURE__ */ B.forwardRef(({
|
|
477
477
|
className: e,
|
|
478
478
|
bsPrefix: t,
|
|
479
|
-
as:
|
|
480
|
-
...
|
|
481
|
-
}, i) => (t = U(t, "offcanvas-title"), /* @__PURE__ */ s(
|
|
479
|
+
as: n = Ms,
|
|
480
|
+
...a
|
|
481
|
+
}, i) => (t = U(t, "offcanvas-title"), /* @__PURE__ */ s(n, {
|
|
482
482
|
ref: i,
|
|
483
483
|
className: F(e, t),
|
|
484
|
-
...
|
|
484
|
+
...a
|
|
485
485
|
})));
|
|
486
486
|
_e.displayName = "OffcanvasTitle";
|
|
487
487
|
function $s(e) {
|
|
@@ -497,8 +497,8 @@ function ks(e) {
|
|
|
497
497
|
const Ce = /* @__PURE__ */ B.forwardRef(({
|
|
498
498
|
bsPrefix: e,
|
|
499
499
|
className: t,
|
|
500
|
-
children:
|
|
501
|
-
"aria-labelledby":
|
|
500
|
+
children: n,
|
|
501
|
+
"aria-labelledby": a,
|
|
502
502
|
placement: i = "start",
|
|
503
503
|
responsive: r,
|
|
504
504
|
/* BaseModal props */
|
|
@@ -550,8 +550,8 @@ const Ce = /* @__PURE__ */ B.forwardRef(({
|
|
|
550
550
|
...x,
|
|
551
551
|
...R,
|
|
552
552
|
className: F(t, r ? `${e}-${r}` : e, `${e}-${i}`),
|
|
553
|
-
"aria-labelledby":
|
|
554
|
-
children:
|
|
553
|
+
"aria-labelledby": a,
|
|
554
|
+
children: n
|
|
555
555
|
});
|
|
556
556
|
return /* @__PURE__ */ l(se, {
|
|
557
557
|
children: [!re && (r || J) && ce({}), /* @__PURE__ */ s(ot.Provider, {
|
|
@@ -591,10 +591,10 @@ const ue = Object.assign(Ce, {
|
|
|
591
591
|
Title: _e
|
|
592
592
|
}), g = {}, Es = () => {
|
|
593
593
|
var m, u, p;
|
|
594
|
-
const { selectedLocation: e, showDetails: t, setShowDetails:
|
|
595
|
-
|
|
594
|
+
const { selectedLocation: e, showDetails: t, setShowDetails: n, setMessageModalOpen: a } = H(), { t: i } = E(), r = () => {
|
|
595
|
+
n(!1);
|
|
596
596
|
}, d = () => {
|
|
597
|
-
|
|
597
|
+
a(!0);
|
|
598
598
|
};
|
|
599
599
|
return /* @__PURE__ */ s(ue, { show: t, onHide: r, backdrop: !1, placement: "start", className: c(g.wrapper), scroll: !0, children: /* @__PURE__ */ l(ue.Body, { className: "px-0", children: [
|
|
600
600
|
/* @__PURE__ */ l("section", { className: c(g.nameWrapper), children: [
|
|
@@ -641,7 +641,7 @@ const ue = Object.assign(Ce, {
|
|
|
641
641
|
/* @__PURE__ */ s("section", { className: c(g.hoursWrapper), children: /* @__PURE__ */ s(Ot, { hours: e == null ? void 0 : e.retailer_location_hours }) }),
|
|
642
642
|
/* @__PURE__ */ l("section", { className: "container", children: [
|
|
643
643
|
/* @__PURE__ */ s("h5", { className: c(g.productTitle), children: i("store_locator.products") }),
|
|
644
|
-
/* @__PURE__ */ s(ge, { children: (p = e == null ? void 0 : e.retailer_location_products) == null ? void 0 : p.map((f, y) => /* @__PURE__ */ s(
|
|
644
|
+
/* @__PURE__ */ s(ge, { children: (p = e == null ? void 0 : e.retailer_location_products) == null ? void 0 : p.map((f, y) => /* @__PURE__ */ s(ne, { xs: 6, className: "mb-3", children: /* @__PURE__ */ l("div", { className: c(g.product), children: [
|
|
645
645
|
/* @__PURE__ */ s("img", { src: f.image_url || `https://placehold.co/400x400?text=${f.name}`, alt: f.name, className: c(g.productImage) }),
|
|
646
646
|
/* @__PURE__ */ s("div", { className: c(g.productName), children: f.name }),
|
|
647
647
|
/* @__PURE__ */ s("div", { className: c(g.productPrice), children: f.price })
|
|
@@ -655,7 +655,7 @@ const ue = Object.assign(Ce, {
|
|
|
655
655
|
error: Ws,
|
|
656
656
|
success: Rs
|
|
657
657
|
}, Bs = () => {
|
|
658
|
-
const { id: e, messageModalOpen: t, setMessageModalOpen:
|
|
658
|
+
const { id: e, messageModalOpen: t, setMessageModalOpen: n, selectedLocation: a, locale: i, searchCenter: r } = H(), { t: d } = E("default", { lng: i }), [m, u] = k(!1), [p, f] = k(!1), y = /^((\\+[1-9]{1,4}[ \\-]*)|(\\([0-9]{2,3}\\)[ \\-]*)|([0-9]{2,4})[ \\-]*)*?[0-9]{3,4}?[ \\-]*[0-9]{3,4}?$/, _ = Ae({
|
|
659
659
|
name: Q().required(d("message.validation.name")),
|
|
660
660
|
email: Q().email(d("message.validation.email")).required(d("message.validation.email")),
|
|
661
661
|
phone: Q().matches(y, "Phone number is not valid"),
|
|
@@ -673,7 +673,7 @@ const ue = Object.assign(Ce, {
|
|
|
673
673
|
onSubmit: async (I) => {
|
|
674
674
|
f(!0), tt("AIzaSyAnJmWEU1r63DiRWHkjczxzHyIEq3dhj4M");
|
|
675
675
|
const S = await Ze(r == null ? void 0 : r.lat, r == null ? void 0 : r.lng), h = et(S.results[0].address_components);
|
|
676
|
-
if (!(await fetch("
|
|
676
|
+
if (!(await fetch("https://api.colabcommerce.com/widget_api/leads", {
|
|
677
677
|
method: "POST",
|
|
678
678
|
headers: {
|
|
679
679
|
"Content-Type": "application/json"
|
|
@@ -696,7 +696,7 @@ const ue = Object.assign(Ce, {
|
|
|
696
696
|
latitude: (r == null ? void 0 : r.lat) || null,
|
|
697
697
|
longitude: (r == null ? void 0 : r.lng) || null
|
|
698
698
|
},
|
|
699
|
-
assignee_id: (
|
|
699
|
+
assignee_id: (a == null ? void 0 : a.id) || null,
|
|
700
700
|
assignee_type: "CompanyRetailerLocation",
|
|
701
701
|
lead_activities_attributes: [{
|
|
702
702
|
type: "LeadActivity::Referral",
|
|
@@ -713,7 +713,7 @@ const ue = Object.assign(Ce, {
|
|
|
713
713
|
u(!0), f(!1);
|
|
714
714
|
}
|
|
715
715
|
}), j = () => {
|
|
716
|
-
|
|
716
|
+
n(!1), u(!1), o.resetForm();
|
|
717
717
|
}, W = typeof window < "u" ? document.querySelector(".cc") : null;
|
|
718
718
|
return /* @__PURE__ */ l(V, { container: W, show: t, centered: !0, dialogClassName: "cc", onHide: j, children: [
|
|
719
719
|
m && /* @__PURE__ */ l("div", { className: "p-5 d-flex align-items-center justify-content-center flex-column", style: { display: m ? "flex" : "none" }, children: [
|
|
@@ -725,7 +725,7 @@ const ue = Object.assign(Ce, {
|
|
|
725
725
|
/* @__PURE__ */ s(V.Header, { closeButton: !0, children: /* @__PURE__ */ l(V.Title, { className: c($.title), children: [
|
|
726
726
|
d("message.title"),
|
|
727
727
|
" ",
|
|
728
|
-
|
|
728
|
+
a == null ? void 0 : a.retailer_name
|
|
729
729
|
] }) }),
|
|
730
730
|
/* @__PURE__ */ s(V.Body, { children: /* @__PURE__ */ l(w, { onSubmit: o.handleSubmit, children: [
|
|
731
731
|
/* @__PURE__ */ l(w.Group, { className: c($.formGroup), children: [
|
|
@@ -767,18 +767,18 @@ const ue = Object.assign(Ce, {
|
|
|
767
767
|
] }) })
|
|
768
768
|
] })
|
|
769
769
|
] });
|
|
770
|
-
}, Ds = {}, Fs = ({ id: e, locale: t, baseUrl:
|
|
770
|
+
}, Ds = {}, Fs = ({ id: e, locale: t, baseUrl: n = "/retailers" }) => {
|
|
771
771
|
var d;
|
|
772
|
-
const { t:
|
|
772
|
+
const { t: a, i18n: i } = E("default"), { settings: r } = H();
|
|
773
773
|
return D(() => {
|
|
774
774
|
i.changeLanguage(t);
|
|
775
775
|
}, [t]), /* @__PURE__ */ l("div", { className: "cc", children: [
|
|
776
776
|
/* @__PURE__ */ s("style", { dangerouslySetInnerHTML: { __html: ((d = r == null ? void 0 : r.entity) == null ? void 0 : d.store_locator_css) || "" } }),
|
|
777
777
|
/* @__PURE__ */ l(ge, { children: [
|
|
778
778
|
/* @__PURE__ */ s(Cs, {}),
|
|
779
|
-
/* @__PURE__ */ s(
|
|
780
|
-
/* @__PURE__ */ s(
|
|
781
|
-
/* @__PURE__ */ s(
|
|
779
|
+
/* @__PURE__ */ s(ne, { xs: { order: 0 }, lg: { order: 1 }, className: c(Ds.noMap, "position-relative"), children: /* @__PURE__ */ l("div", { className: "position-relative", children: [
|
|
780
|
+
/* @__PURE__ */ s(at, {}),
|
|
781
|
+
/* @__PURE__ */ s(nt, {})
|
|
782
782
|
] }) })
|
|
783
783
|
] }),
|
|
784
784
|
/* @__PURE__ */ s(Es, {}),
|
package/dist/{addressComponentsToAddress-f0L6qfjZ.js → addressComponentsToAddress-CNK2WJ24.js}
RENAMED
|
@@ -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,
|
|
@@ -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,
|
|
@@ -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("&");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as t, jsxs as g } from "react/jsx-runtime";
|
|
2
2
|
import { createContext as Q, useState as c } from "react";
|
|
3
|
-
import { i as R, u as z, d as Y, S as V, l as K, b as W, k as X, g as J } from "./addressComponentsToAddress-
|
|
3
|
+
import { i as R, u as z, d as Y, S as V, l as K, b as W, k as X, g as J } from "./addressComponentsToAddress-CNK2WJ24.js";
|
|
4
4
|
import { d as $, a as U, Q as H, c as u, B as ee } from "./globals-C3lGVSJ0.js";
|
|
5
5
|
/**
|
|
6
6
|
* @license lucide-react v0.542.0 - ISC
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as Z, jsx as p } from "react/jsx-runtime";
|
|
2
2
|
import { useState as k, useEffect as y, useCallback as x } from "react";
|
|
3
3
|
import { j as v, A as z, o as E, a as j, k as D, M as N } from "./globals-C3lGVSJ0.js";
|
|
4
|
-
import { u as I } from "./addressComponentsToAddress-
|
|
4
|
+
import { u as I } from "./addressComponentsToAddress-CNK2WJ24.js";
|
|
5
5
|
const P = "lzEEu", _ = {
|
|
6
6
|
label: P
|
|
7
7
|
}, T = ({ location: t }) => {
|