@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/StoreLocator.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as s, jsxs as
|
|
1
|
+
import { jsx as s, jsxs as d, Fragment as se } from "react/jsx-runtime";
|
|
2
2
|
import * as B from "react";
|
|
3
|
-
import T, { useState as
|
|
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
|
|
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-
|
|
3
|
+
import T, { useState as $, 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 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 Le, l as Ge, m as Ue } from "./globals-B8-hYoIU.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-DCL-K8mn.js";
|
|
6
|
+
import { S as nt } from "./index-FM02Uq_P.js";
|
|
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-DTBKy_6d.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,
|
|
10
10
|
title: ht,
|
|
@@ -19,38 +19,38 @@ 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
|
|
27
|
-
return /* @__PURE__ */
|
|
28
|
-
/* @__PURE__ */ s("div", { children:
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
|
|
26
|
+
const u = i.getUTCMinutes() === 0 ? new Intl.DateTimeFormat(a, { hour: "numeric" }) : new Intl.DateTimeFormat(a, { hour: "numeric", minute: "2-digit" }), l = r.getUTCMinutes() === 0 ? new Intl.DateTimeFormat(a, { hour: "numeric" }) : new Intl.DateTimeFormat(a, { hour: "numeric", minute: "2-digit" });
|
|
27
|
+
return /* @__PURE__ */ d("div", { className: `${N.subHours} ${t.day === (/* @__PURE__ */ new Date()).getDay() ? N.today : ""}`, children: [
|
|
28
|
+
/* @__PURE__ */ s("div", { children: n(`store.days.${t.day}`) }),
|
|
29
|
+
/* @__PURE__ */ d("div", { children: [
|
|
30
|
+
u.format(i),
|
|
31
31
|
" - ",
|
|
32
|
-
|
|
32
|
+
l.format(r)
|
|
33
33
|
] })
|
|
34
34
|
] }, t.day);
|
|
35
|
-
},
|
|
36
|
-
const { t:
|
|
37
|
-
if (!(e == null ? void 0 : e.find((
|
|
38
|
-
const W = i, I = e.sort((
|
|
35
|
+
}, Mt = ({ hours: e, defaultOpen: t = !1 }) => {
|
|
36
|
+
const { t: n, locale: a } = E(), { isOpen: i, openingSoon: r, closingSoon: u, openAt: l, closeAt: m, openFormatter: p, closeAtFormatter: f } = je(e), [y, _] = $(t), o = (/* @__PURE__ */ new Date()).getDay();
|
|
37
|
+
if (!(e == null ? void 0 : e.find((M) => M.day === o))) return null;
|
|
38
|
+
const W = i, I = e.sort((M, x) => M.day - x.day);
|
|
39
39
|
let S = null, h = null;
|
|
40
|
-
return W ?
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
/* @__PURE__ */
|
|
40
|
+
return W ? u ? (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__ */ d("div", { className: y ? c(N.wrapper, N.shown) : c(N.wrapper), children: [
|
|
41
|
+
/* @__PURE__ */ d("div", { className: c(N.title), onClick: () => _(!y), children: [
|
|
42
|
+
/* @__PURE__ */ d("span", { className: h, children: [
|
|
43
43
|
/* @__PURE__ */ s("i", { className: "lpe-icons", children: "clock" }),
|
|
44
44
|
S
|
|
45
45
|
] }),
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
p.format(
|
|
46
|
+
/* @__PURE__ */ d("span", { className: N.shownHours, children: [
|
|
47
|
+
p.format(l),
|
|
48
48
|
" - ",
|
|
49
|
-
f.format(
|
|
49
|
+
f.format(m)
|
|
50
50
|
] }),
|
|
51
51
|
/* @__PURE__ */ s("i", { className: c("lpe-icons", N.toggle), children: "arrow" })
|
|
52
52
|
] }),
|
|
53
|
-
/* @__PURE__ */ s(qe, { in: y, children: /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s("div", { className: c(N.subHoursWrapper), children: I.map((
|
|
53
|
+
/* @__PURE__ */ s(qe, { in: y, children: /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s("div", { className: c(N.subHoursWrapper), children: I.map((M, x) => /* @__PURE__ */ s(St, { i: x, hour: M }, M.day)) }) }) })
|
|
54
54
|
] });
|
|
55
55
|
};
|
|
56
56
|
var ve = {
|
|
@@ -59,60 +59,60 @@ var ve = {
|
|
|
59
59
|
className: void 0,
|
|
60
60
|
style: void 0,
|
|
61
61
|
attr: void 0
|
|
62
|
-
}, le = T.createContext && /* @__PURE__ */ T.createContext(ve),
|
|
63
|
-
function
|
|
62
|
+
}, le = T.createContext && /* @__PURE__ */ T.createContext(ve), Ot = ["attr", "size", "title"];
|
|
63
|
+
function xt(e, t) {
|
|
64
64
|
if (e == null) return {};
|
|
65
|
-
var
|
|
65
|
+
var n = kt(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
|
-
function
|
|
73
|
+
function kt(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
|
-
|
|
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
|
+
$t(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
|
|
115
|
-
return t = Et(t), t in e ? Object.defineProperty(e, t, { value:
|
|
114
|
+
function $t(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,
|
|
148
|
-
return
|
|
147
|
+
} = e, u = xt(e, Ot), l = i || n.size || "1em", m;
|
|
148
|
+
return n.className && (m = n.className), e.className && (m = (m ? m + " " : "") + e.className), /* @__PURE__ */ T.createElement("svg", X({
|
|
149
149
|
stroke: "currentColor",
|
|
150
150
|
fill: "currentColor",
|
|
151
151
|
strokeWidth: "0"
|
|
152
|
-
},
|
|
153
|
-
className:
|
|
152
|
+
}, n.attr, a, u, {
|
|
153
|
+
className: m,
|
|
154
154
|
style: K(K({
|
|
155
|
-
color: e.color ||
|
|
156
|
-
},
|
|
157
|
-
height:
|
|
158
|
-
width:
|
|
155
|
+
color: e.color || n.color
|
|
156
|
+
}, n.style), e.style),
|
|
157
|
+
height: l,
|
|
158
|
+
width: l,
|
|
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);
|
|
@@ -217,14 +217,14 @@ const zt = [
|
|
|
217
217
|
key: "9njp5v"
|
|
218
218
|
}
|
|
219
219
|
]
|
|
220
|
-
],
|
|
221
|
-
const { t: e } = E(), { locationName: t, setLocationName:
|
|
220
|
+
], Lt = Y("phone", zt), Gt = () => {
|
|
221
|
+
const { t: e } = E(), { locationName: t, setLocationName: n, setSearchCenter: a, setMapCenter: i, setShowFilters: r, setLoadingGeo: u, getPosition: l } = H(), m = pe(null), [p, f] = $(null), y = We("places");
|
|
222
222
|
return D(() => {
|
|
223
|
-
if (!y || !
|
|
223
|
+
if (!y || !m.current) return;
|
|
224
224
|
const b = {
|
|
225
225
|
fields: ["geometry", "name", "formatted_address"]
|
|
226
226
|
};
|
|
227
|
-
f(new y.Autocomplete(
|
|
227
|
+
f(new y.Autocomplete(m.current, b));
|
|
228
228
|
}, [y]), D(() => {
|
|
229
229
|
p && p.addListener("place_changed", () => {
|
|
230
230
|
const b = p.getPlace();
|
|
@@ -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,
|
|
239
|
-
|
|
238
|
+
}, [p, n]), /* @__PURE__ */ s(Je, { locationName: t, setLocationName: n, setSearchCenter: a, setMapCenter: i, handleLocate: () => {
|
|
239
|
+
u(!0), l();
|
|
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,23 +261,23 @@ 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
|
|
267
|
-
|
|
266
|
+
const a = "store-locator-sidebar-list-item", { selectedLocation: i, searchCenter: r, showDetails: u, setShowDetails: l, setMessageModalOpen: m, setSelectedLocationId: p } = H(), { t: f, i18n: y } = E(), _ = y == null ? void 0 : y.language, [b, o] = $(!1), [j, W] = $(!1), I = () => {
|
|
267
|
+
m(!0);
|
|
268
268
|
}, S = () => {
|
|
269
269
|
p(e);
|
|
270
270
|
const R = new URLSearchParams(window.location.search);
|
|
271
271
|
R.set("location", e), window.history.replaceState({}, "", `?${R.toString()}`);
|
|
272
272
|
}, h = (R) => {
|
|
273
273
|
b || (R.preventDefault(), o(!0));
|
|
274
|
-
},
|
|
275
|
-
return /* @__PURE__ */
|
|
276
|
-
/* @__PURE__ */
|
|
277
|
-
/* @__PURE__ */
|
|
274
|
+
}, M = Math.round(Qe({ lat: (q = t == null ? void 0 : t.address) == null ? void 0 : q.latitude, lng: (P = t == null ? void 0 : t.address) == null ? void 0 : P.longitude }, r) * 10) / 10, x = e === (i == null ? void 0 : i.id) ? C(["wrapper", "selected"], v, "sidebar-list-item") : C("wrapper", v, "sidebar-list-item");
|
|
275
|
+
return /* @__PURE__ */ d("div", { onClick: S, className: x, children: [
|
|
276
|
+
/* @__PURE__ */ d("section", { className: c(v.nameWrapper), children: [
|
|
277
|
+
/* @__PURE__ */ d("div", { className: c(v.name), children: [
|
|
278
278
|
t == null ? void 0 : t.retailer_name,
|
|
279
|
-
/* @__PURE__ */
|
|
280
|
-
Math.round(Xe(
|
|
279
|
+
/* @__PURE__ */ d("div", { className: `text-muted fw-normal mt-1 ${v.distance}`, children: [
|
|
280
|
+
Math.round(Xe(M, _) * 10) / 10,
|
|
281
281
|
" ",
|
|
282
282
|
Ve(_),
|
|
283
283
|
" away"
|
|
@@ -286,10 +286,10 @@ global.navigator.product === "ReactNative", qt = typeof document < "u", Jt = qt
|
|
|
286
286
|
/* @__PURE__ */ s("div", { className: "text-end d-flex align-items-center justify-content-end", children: /* @__PURE__ */ s(Ke, { type: t == null ? void 0 : t.store_type }) })
|
|
287
287
|
] }),
|
|
288
288
|
/* @__PURE__ */ s("section", { className: `${v.hoursWrapper} d-flex justify-content-between align-items-center pe-3`, children: /* @__PURE__ */ s(Ye, { hours: t == null ? void 0 : t.retailer_location_hours }) }),
|
|
289
|
-
/* @__PURE__ */ s("section", { className: c(v.addressWrapper), children: /* @__PURE__ */
|
|
289
|
+
/* @__PURE__ */ s("section", { className: c(v.addressWrapper), children: /* @__PURE__ */ d("div", { className: c(v.address), children: [
|
|
290
290
|
/* @__PURE__ */ s("div", { children: t == null ? void 0 : t.address.street_line_one }),
|
|
291
291
|
/* @__PURE__ */ s("div", { children: t == null ? void 0 : t.address.street_line_two }),
|
|
292
|
-
/* @__PURE__ */
|
|
292
|
+
/* @__PURE__ */ d("div", { children: [
|
|
293
293
|
t == null ? void 0 : t.address.city,
|
|
294
294
|
", ",
|
|
295
295
|
t == null ? void 0 : t.address.province,
|
|
@@ -298,123 +298,123 @@ global.navigator.product === "ReactNative", qt = typeof document < "u", Jt = qt
|
|
|
298
298
|
] }),
|
|
299
299
|
/* @__PURE__ */ s("div", { className: "d-none", children: t == null ? void 0 : t.address.country })
|
|
300
300
|
] }) }),
|
|
301
|
-
/* @__PURE__ */
|
|
302
|
-
(t == null ? void 0 : t.phone_number) && /* @__PURE__ */
|
|
301
|
+
/* @__PURE__ */ d("section", { className: C("interactWrapper", v, "store-locator-sidebar-list-item"), children: [
|
|
302
|
+
(t == null ? void 0 : t.phone_number) && /* @__PURE__ */ d(
|
|
303
303
|
"a",
|
|
304
304
|
{
|
|
305
305
|
href: `tel:${(A = t == null ? void 0 : t.phone_number) == null ? void 0 : A.phone_number}`,
|
|
306
306
|
className: [C("interactItem", v, "store-locator-sidebar-list-item"), "cc-interact-item-phone"].join(" "),
|
|
307
307
|
onClick: h,
|
|
308
308
|
children: [
|
|
309
|
-
/* @__PURE__ */ s("div", { className: [v.interactIcon, "cc-interact-icon", "cc-interact-icon-phone"].join(" "), children: /* @__PURE__ */ s(
|
|
309
|
+
/* @__PURE__ */ s("div", { className: [v.interactIcon, "cc-interact-icon", "cc-interact-icon-phone"].join(" "), children: /* @__PURE__ */ s(Lt, { size: 20 }) }),
|
|
310
310
|
/* @__PURE__ */ s("div", { className: [v.interactText, "cc-interact-text", "cc-interact-text-phone"].join(" "), children: b ? (z = t == null ? void 0 : t.phone_number) == null ? void 0 : z.formatted : f("general.phone") })
|
|
311
311
|
]
|
|
312
312
|
}
|
|
313
313
|
),
|
|
314
|
-
/* @__PURE__ */
|
|
314
|
+
/* @__PURE__ */ d(
|
|
315
315
|
"a",
|
|
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__ */
|
|
327
|
-
/* @__PURE__ */ s("div", { className: C("interactIcon", v,
|
|
328
|
-
/* @__PURE__ */ s("div", { className: C("interactText", v,
|
|
326
|
+
/* @__PURE__ */ d("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__ */
|
|
331
|
-
/* @__PURE__ */ s("div", { className: C("interactIcon", v,
|
|
332
|
-
/* @__PURE__ */ s("div", { className: C("interactText", v,
|
|
330
|
+
(t == null ? void 0 : t.website) && /* @__PURE__ */ d("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
|
] });
|
|
336
|
-
}, fs = "pCNHg", gs = "frwR4", vs = "sUqpG",
|
|
336
|
+
}, fs = "pCNHg", gs = "frwR4", vs = "sUqpG", L = {
|
|
337
337
|
loading: fs,
|
|
338
338
|
itemWrapper: gs,
|
|
339
339
|
wrapper: vs
|
|
340
340
|
}, ys = () => {
|
|
341
|
-
const { t: e } = E(), { locations: t, isLoading:
|
|
342
|
-
function i(r,
|
|
343
|
-
if (!r || !
|
|
344
|
-
const
|
|
341
|
+
const { t: e } = E(), { locations: t, isLoading: n, selectedLocationId: a } = H();
|
|
342
|
+
function i(r, u) {
|
|
343
|
+
if (!r || !u) return;
|
|
344
|
+
const l = r.getBoundingClientRect(), p = u.getBoundingClientRect().top - l.top + r.scrollTop;
|
|
345
345
|
r.scrollTo({
|
|
346
346
|
top: p,
|
|
347
347
|
behavior: "smooth"
|
|
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
|
-
const
|
|
354
|
-
i(
|
|
353
|
+
const u = document.getElementById("llw");
|
|
354
|
+
i(u, r);
|
|
355
355
|
}
|
|
356
|
-
}, [
|
|
357
|
-
}, ws = "N2FHA", Ns = "BSoIL", bs = "xMDdB", _s = "-zMng",
|
|
356
|
+
}, [a]), n ? /* @__PURE__ */ s("div", { className: c(L.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: `${L.wrapper} ${a ? L.hasSelected : ""}`, children: t.map((r) => /* @__PURE__ */ s("div", { id: `location-${r.id}`, className: `${L.itemWrapper} ${a === r.id ? L.selected : ""}`, children: /* @__PURE__ */ s(hs, { id: r.id, location: r }) }, r.id)) });
|
|
357
|
+
}, ws = "N2FHA", Ns = "BSoIL", bs = "xMDdB", _s = "-zMng", G = {
|
|
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__ */
|
|
365
|
-
/* @__PURE__ */ s("div", { className: c(
|
|
366
|
-
/* @__PURE__ */ s("div", { className: `${
|
|
363
|
+
const { showMap: e, showFilters: t, setShowFilters: n, locale: a, selectedLocationId: i } = H();
|
|
364
|
+
return /* @__PURE__ */ d(ne, { xs: { order: 1 }, lg: { order: 0, span: 4 }, xxl: { order: 0, span: 3 }, className: c(G.wrapper), children: [
|
|
365
|
+
/* @__PURE__ */ s("div", { className: c(G.top), children: /* @__PURE__ */ s("div", { className: c(G.searchWrapper), children: /* @__PURE__ */ s("div", { className: "mb-3", children: /* @__PURE__ */ s(Gt, {}) }) }) }),
|
|
366
|
+
/* @__PURE__ */ s("div", { className: `${G.listWrapper} ${i ? G.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] = $(() => 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
|
|
382
|
-
const
|
|
381
|
+
let u = ae.get(t);
|
|
382
|
+
const l = () => {
|
|
383
383
|
i(r.matches);
|
|
384
384
|
};
|
|
385
|
-
return r.refCount++, r.addListener(
|
|
386
|
-
r.removeListener(
|
|
385
|
+
return r.refCount++, r.addListener(l), l(), () => {
|
|
386
|
+
r.removeListener(l), r.refCount--, r.refCount <= 0 && (u == null || u.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
|
|
393
|
-
return
|
|
392
|
+
function n(l, m) {
|
|
393
|
+
return l === m ? m : l ? `${l} and ${m}` : m;
|
|
394
394
|
}
|
|
395
|
-
function
|
|
396
|
-
return t[Math.min(t.indexOf(
|
|
395
|
+
function a(l) {
|
|
396
|
+
return t[Math.min(t.indexOf(l) + 1, t.length - 1)];
|
|
397
397
|
}
|
|
398
|
-
function i(
|
|
399
|
-
const
|
|
400
|
-
let p = e[
|
|
398
|
+
function i(l) {
|
|
399
|
+
const m = a(l);
|
|
400
|
+
let p = e[m];
|
|
401
401
|
return typeof p == "number" ? p = `${p - 0.2}px` : p = `calc(${p} - 0.2px)`, `(max-width: ${p})`;
|
|
402
402
|
}
|
|
403
|
-
function r(
|
|
404
|
-
let
|
|
405
|
-
return typeof
|
|
403
|
+
function r(l) {
|
|
404
|
+
let m = e[l];
|
|
405
|
+
return typeof m == "number" && (m = `${m}px`), `(min-width: ${m})`;
|
|
406
406
|
}
|
|
407
|
-
function
|
|
407
|
+
function u(l, m, p) {
|
|
408
408
|
let f;
|
|
409
|
-
typeof
|
|
410
|
-
[
|
|
409
|
+
typeof l == "object" ? (f = l, p = m, m = !0) : (m = m || !0, f = {
|
|
410
|
+
[l]: m
|
|
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
|
-
return
|
|
415
|
+
return u;
|
|
416
416
|
}
|
|
417
|
-
const
|
|
417
|
+
const Ms = Ss({
|
|
418
418
|
xs: 0,
|
|
419
419
|
sm: 576,
|
|
420
420
|
md: 768,
|
|
@@ -424,72 +424,72 @@ 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
|
-
const
|
|
435
|
+
const Os = {
|
|
436
436
|
[fe]: "show",
|
|
437
437
|
[Pe]: "show"
|
|
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
|
-
appear:
|
|
446
|
-
...
|
|
447
|
-
},
|
|
448
|
-
ref:
|
|
445
|
+
appear: u = !1,
|
|
446
|
+
...l
|
|
447
|
+
}, m) => (e = U(e, "offcanvas"), /* @__PURE__ */ s(Re, {
|
|
448
|
+
ref: m,
|
|
449
449
|
addEndListener: De,
|
|
450
|
-
in:
|
|
450
|
+
in: a,
|
|
451
451
|
mountOnEnter: i,
|
|
452
452
|
unmountOnExit: r,
|
|
453
|
-
appear:
|
|
454
|
-
...
|
|
455
|
-
childRef: Be(
|
|
456
|
-
children: (p, f) => /* @__PURE__ */ B.cloneElement(
|
|
453
|
+
appear: u,
|
|
454
|
+
...l,
|
|
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`, Os[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
|
-
const
|
|
476
|
+
const xs = 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 = xs,
|
|
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
|
-
function
|
|
487
|
+
function ks(e) {
|
|
488
488
|
return /* @__PURE__ */ s(Ne, {
|
|
489
489
|
...e
|
|
490
490
|
});
|
|
491
491
|
}
|
|
492
|
-
function
|
|
492
|
+
function $s(e) {
|
|
493
493
|
return /* @__PURE__ */ s(dt, {
|
|
494
494
|
...e
|
|
495
495
|
});
|
|
@@ -497,14 +497,14 @@ 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 */
|
|
505
|
-
show:
|
|
506
|
-
backdrop:
|
|
507
|
-
keyboard:
|
|
505
|
+
show: u = !1,
|
|
506
|
+
backdrop: l = !0,
|
|
507
|
+
keyboard: m = !0,
|
|
508
508
|
scroll: p = !1,
|
|
509
509
|
onEscapeKeyDown: f,
|
|
510
510
|
onShow: y,
|
|
@@ -516,8 +516,8 @@ const Ce = /* @__PURE__ */ B.forwardRef(({
|
|
|
516
516
|
restoreFocusOptions: I,
|
|
517
517
|
onEntered: S,
|
|
518
518
|
onExit: h,
|
|
519
|
-
onExiting:
|
|
520
|
-
onEnter:
|
|
519
|
+
onExiting: M,
|
|
520
|
+
onEnter: x,
|
|
521
521
|
onEntering: q,
|
|
522
522
|
onExited: P,
|
|
523
523
|
backdropClassName: A,
|
|
@@ -527,41 +527,41 @@ const Ce = /* @__PURE__ */ B.forwardRef(({
|
|
|
527
527
|
}, Ie) => {
|
|
528
528
|
const Z = pe();
|
|
529
529
|
e = U(e, "offcanvas");
|
|
530
|
-
const [re, Se] =
|
|
530
|
+
const [re, Se] = $(!1), ee = ct(_), ie = Ms(r || "xs", "up");
|
|
531
531
|
D(() => {
|
|
532
|
-
Se(r ?
|
|
533
|
-
}, [
|
|
534
|
-
const
|
|
532
|
+
Se(r ? u && !ie : u);
|
|
533
|
+
}, [u, r, ie]);
|
|
534
|
+
const Me = he(() => ({
|
|
535
535
|
onHide: ee
|
|
536
536
|
}), [ee]);
|
|
537
|
-
function
|
|
537
|
+
function Oe() {
|
|
538
538
|
return z || (p ? (Z.current || (Z.current = new mt({
|
|
539
539
|
handleContainerOverflow: !1
|
|
540
540
|
})), Z.current) : ut());
|
|
541
541
|
}
|
|
542
|
-
const
|
|
543
|
-
|
|
544
|
-
},
|
|
545
|
-
|
|
546
|
-
},
|
|
547
|
-
...
|
|
542
|
+
const xe = (O, ...te) => {
|
|
543
|
+
O && (O.style.visibility = "visible"), x == null || x(O, ...te);
|
|
544
|
+
}, ke = (O, ...te) => {
|
|
545
|
+
O && (O.style.visibility = ""), P == null || P(...te);
|
|
546
|
+
}, $e = Te((O) => /* @__PURE__ */ s("div", {
|
|
547
|
+
...O,
|
|
548
548
|
className: F(`${e}-backdrop`, A)
|
|
549
|
-
}), [A, e]), ce = (
|
|
550
|
-
...
|
|
549
|
+
}), [A, e]), ce = (O) => /* @__PURE__ */ s("div", {
|
|
550
|
+
...O,
|
|
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
|
-
return /* @__PURE__ */
|
|
556
|
+
return /* @__PURE__ */ d(se, {
|
|
557
557
|
children: [!re && (r || J) && ce({}), /* @__PURE__ */ s(ot.Provider, {
|
|
558
|
-
value:
|
|
558
|
+
value: Me,
|
|
559
559
|
children: /* @__PURE__ */ s(lt, {
|
|
560
560
|
show: re,
|
|
561
561
|
ref: Ie,
|
|
562
|
-
backdrop:
|
|
562
|
+
backdrop: l,
|
|
563
563
|
container: b,
|
|
564
|
-
keyboard:
|
|
564
|
+
keyboard: m,
|
|
565
565
|
autoFocus: o,
|
|
566
566
|
enforceFocus: j && !p,
|
|
567
567
|
restoreFocus: W,
|
|
@@ -569,16 +569,16 @@ const Ce = /* @__PURE__ */ B.forwardRef(({
|
|
|
569
569
|
onEscapeKeyDown: f,
|
|
570
570
|
onShow: y,
|
|
571
571
|
onHide: ee,
|
|
572
|
-
onEnter:
|
|
572
|
+
onEnter: xe,
|
|
573
573
|
onEntering: q,
|
|
574
574
|
onEntered: S,
|
|
575
575
|
onExit: h,
|
|
576
|
-
onExiting:
|
|
577
|
-
onExited:
|
|
578
|
-
manager:
|
|
579
|
-
transition:
|
|
580
|
-
backdropTransition:
|
|
581
|
-
renderBackdrop:
|
|
576
|
+
onExiting: M,
|
|
577
|
+
onExited: ke,
|
|
578
|
+
manager: Oe(),
|
|
579
|
+
transition: ks,
|
|
580
|
+
backdropTransition: $s,
|
|
581
|
+
renderBackdrop: $e,
|
|
582
582
|
renderDialog: ce
|
|
583
583
|
})
|
|
584
584
|
})]
|
|
@@ -590,45 +590,45 @@ const ue = Object.assign(Ce, {
|
|
|
590
590
|
Header: be,
|
|
591
591
|
Title: _e
|
|
592
592
|
}), g = {}, Es = () => {
|
|
593
|
-
var
|
|
594
|
-
const { selectedLocation: e, showDetails: t, setShowDetails:
|
|
595
|
-
|
|
596
|
-
},
|
|
597
|
-
|
|
593
|
+
var l, m, p;
|
|
594
|
+
const { selectedLocation: e, showDetails: t, setShowDetails: n, setMessageModalOpen: a } = H(), { t: i } = E(), r = () => {
|
|
595
|
+
n(!1);
|
|
596
|
+
}, u = () => {
|
|
597
|
+
a(!0);
|
|
598
598
|
};
|
|
599
|
-
return /* @__PURE__ */ s(ue, { show: t, onHide: r, backdrop: !1, placement: "start", className: c(g.wrapper), scroll: !0, children: /* @__PURE__ */
|
|
600
|
-
/* @__PURE__ */
|
|
601
|
-
/* @__PURE__ */
|
|
599
|
+
return /* @__PURE__ */ s(ue, { show: t, onHide: r, backdrop: !1, placement: "start", className: c(g.wrapper), scroll: !0, children: /* @__PURE__ */ d(ue.Body, { className: "px-0", children: [
|
|
600
|
+
/* @__PURE__ */ d("section", { className: c(g.nameWrapper), children: [
|
|
601
|
+
/* @__PURE__ */ d("div", { className: c(g.close), onClick: r, children: [
|
|
602
602
|
/* @__PURE__ */ s("i", { className: "lpe-icons", children: "back" }),
|
|
603
603
|
" ",
|
|
604
604
|
i("general.viewAll")
|
|
605
605
|
] }),
|
|
606
606
|
/* @__PURE__ */ s("div", { className: c(g.name), children: e == null ? void 0 : e.retailer_name })
|
|
607
607
|
] }),
|
|
608
|
-
/* @__PURE__ */
|
|
609
|
-
/* @__PURE__ */
|
|
608
|
+
/* @__PURE__ */ d("section", { className: c(g.interactWrapper), children: [
|
|
609
|
+
/* @__PURE__ */ d("a", { href: `tel:${(l = e == null ? void 0 : e.phone_number) == null ? void 0 : l.phone_number}`, className: c(g.interactItem), children: [
|
|
610
610
|
/* @__PURE__ */ s("div", { className: c(g.interactIcon), children: /* @__PURE__ */ s("i", { className: "lpe-icons", children: "phone" }) }),
|
|
611
611
|
/* @__PURE__ */ s("div", { className: c(g.interactText), children: i("general.phone") })
|
|
612
612
|
] }),
|
|
613
|
-
/* @__PURE__ */
|
|
613
|
+
/* @__PURE__ */ d("a", { href: `https://www.google.com/maps/dir/?api=1&destination=${encodeURIComponent((m = e == null ? void 0 : e.address) == null ? void 0 : m.string)}=&destination_place_id=${e == null ? void 0 : e.place_id}`, target: "new", className: c(g.interactItem), children: [
|
|
614
614
|
/* @__PURE__ */ s("div", { className: c(g.interactIcon), children: /* @__PURE__ */ s("i", { className: "lpe-icons", children: "direction" }) }),
|
|
615
615
|
/* @__PURE__ */ s("div", { className: c(g.interactText), children: i("general.directions") })
|
|
616
616
|
] }),
|
|
617
|
-
/* @__PURE__ */
|
|
617
|
+
/* @__PURE__ */ d("a", { className: c(g.interactItem), onClick: u, children: [
|
|
618
618
|
/* @__PURE__ */ s("div", { className: c(g.interactIcon), children: /* @__PURE__ */ s(Wt, {}) }),
|
|
619
619
|
/* @__PURE__ */ s("div", { className: c(g.interactText), children: i("general.message") })
|
|
620
620
|
] }),
|
|
621
|
-
/* @__PURE__ */
|
|
621
|
+
/* @__PURE__ */ d("a", { href: e == null ? void 0 : e.website, target: "_blank", className: c(g.interactItem), children: [
|
|
622
622
|
/* @__PURE__ */ s("div", { className: c(g.interactIcon), children: /* @__PURE__ */ s("i", { className: "lpe-icons", children: "world" }) }),
|
|
623
623
|
/* @__PURE__ */ s("div", { className: c(g.interactText), children: i("general.website") })
|
|
624
624
|
] })
|
|
625
625
|
] }),
|
|
626
|
-
/* @__PURE__ */
|
|
626
|
+
/* @__PURE__ */ d("section", { className: c(g.addressWrapper), children: [
|
|
627
627
|
/* @__PURE__ */ s("div", { children: /* @__PURE__ */ s("i", { className: "lpe-icons", children: "marker" }) }),
|
|
628
|
-
/* @__PURE__ */
|
|
628
|
+
/* @__PURE__ */ d("div", { className: c(g.address), children: [
|
|
629
629
|
/* @__PURE__ */ s("div", { children: e == null ? void 0 : e.address.street_line_one }),
|
|
630
630
|
/* @__PURE__ */ s("div", { children: e == null ? void 0 : e.address.street_line_two }),
|
|
631
|
-
/* @__PURE__ */
|
|
631
|
+
/* @__PURE__ */ d("div", { children: [
|
|
632
632
|
e == null ? void 0 : e.address.city,
|
|
633
633
|
", ",
|
|
634
634
|
e == null ? void 0 : e.address.province,
|
|
@@ -638,28 +638,28 @@ const ue = Object.assign(Ce, {
|
|
|
638
638
|
/* @__PURE__ */ s("div", { children: e == null ? void 0 : e.address.country })
|
|
639
639
|
] })
|
|
640
640
|
] }),
|
|
641
|
-
/* @__PURE__ */ s("section", { className: c(g.hoursWrapper), children: /* @__PURE__ */ s(
|
|
642
|
-
/* @__PURE__ */
|
|
641
|
+
/* @__PURE__ */ s("section", { className: c(g.hoursWrapper), children: /* @__PURE__ */ s(Mt, { hours: e == null ? void 0 : e.retailer_location_hours }) }),
|
|
642
|
+
/* @__PURE__ */ d("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__ */ d("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 })
|
|
648
648
|
] }) }, y)) })
|
|
649
649
|
] })
|
|
650
650
|
] }) });
|
|
651
|
-
}, Ts = "_3k9so", Hs = "-sMg9", js = "IGCsG", Ws = "Ri4DF", Rs = "AmPYE",
|
|
651
|
+
}, Ts = "_3k9so", Hs = "-sMg9", js = "IGCsG", Ws = "Ri4DF", Rs = "AmPYE", k = {
|
|
652
652
|
title: Ts,
|
|
653
653
|
formGroup: Hs,
|
|
654
654
|
submit: js,
|
|
655
655
|
error: Ws,
|
|
656
656
|
success: Rs
|
|
657
657
|
}, Bs = () => {
|
|
658
|
-
const { id: e, messageModalOpen: t, setMessageModalOpen:
|
|
659
|
-
name: Q().required(
|
|
660
|
-
email: Q().email(
|
|
658
|
+
const { id: e, messageModalOpen: t, setMessageModalOpen: n, selectedLocation: a, locale: i, searchCenter: r } = H(), { t: u } = E("default", { lng: i }), [l, m] = $(!1), [p, f] = $(!1), y = /^((\\+[1-9]{1,4}[ \\-]*)|(\\([0-9]{2,3}\\)[ \\-]*)|([0-9]{2,4})[ \\-]*)*?[0-9]{3,4}?[ \\-]*[0-9]{3,4}?$/, _ = Ae({
|
|
659
|
+
name: Q().required(u("message.validation.name")),
|
|
660
|
+
email: Q().email(u("message.validation.email")).required(u("message.validation.email")),
|
|
661
661
|
phone: Q().matches(y, "Phone number is not valid"),
|
|
662
|
-
message: Q().required(
|
|
662
|
+
message: Q().required(u("message.validation.message"))
|
|
663
663
|
}), o = ze({
|
|
664
664
|
initialValues: {
|
|
665
665
|
name: "",
|
|
@@ -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",
|
|
@@ -707,34 +707,34 @@ const ue = Object.assign(Ce, {
|
|
|
707
707
|
}
|
|
708
708
|
})
|
|
709
709
|
})).ok) {
|
|
710
|
-
o.setErrors({ general:
|
|
710
|
+
o.setErrors({ general: u("message.validation.general") }), f(!1);
|
|
711
711
|
return;
|
|
712
712
|
}
|
|
713
|
-
|
|
713
|
+
m(!0), f(!1);
|
|
714
714
|
}
|
|
715
715
|
}), j = () => {
|
|
716
|
-
|
|
716
|
+
n(!1), m(!1), o.resetForm();
|
|
717
717
|
}, W = typeof window < "u" ? document.querySelector(".cc") : null;
|
|
718
|
-
return /* @__PURE__ */
|
|
719
|
-
|
|
718
|
+
return /* @__PURE__ */ d(V, { container: W, show: t, centered: !0, dialogClassName: "cc", onHide: j, children: [
|
|
719
|
+
l && /* @__PURE__ */ d("div", { className: "p-5 d-flex align-items-center justify-content-center flex-column", style: { display: l ? "flex" : "none" }, children: [
|
|
720
720
|
/* @__PURE__ */ s("div", { className: "fw-bold fs-2", children: "Thank you!" }),
|
|
721
721
|
/* @__PURE__ */ s("div", { className: "fw-bold mb-3", children: "Your Palliser retailer will be in touch soon" }),
|
|
722
722
|
/* @__PURE__ */ s(oe, { variant: "dark", onClick: j, children: "Close" })
|
|
723
723
|
] }),
|
|
724
|
-
!
|
|
725
|
-
/* @__PURE__ */ s(V.Header, { closeButton: !0, children: /* @__PURE__ */
|
|
726
|
-
|
|
724
|
+
!l && /* @__PURE__ */ d(se, { children: [
|
|
725
|
+
/* @__PURE__ */ s(V.Header, { closeButton: !0, children: /* @__PURE__ */ d(V.Title, { className: c(k.title), children: [
|
|
726
|
+
u("message.title"),
|
|
727
727
|
" ",
|
|
728
|
-
|
|
728
|
+
a == null ? void 0 : a.retailer_name
|
|
729
729
|
] }) }),
|
|
730
|
-
/* @__PURE__ */ s(V.Body, { children: /* @__PURE__ */
|
|
731
|
-
/* @__PURE__ */
|
|
732
|
-
/* @__PURE__ */ s(w.Label, { htmlFor: "name", children:
|
|
730
|
+
/* @__PURE__ */ s(V.Body, { children: /* @__PURE__ */ d(w, { onSubmit: o.handleSubmit, children: [
|
|
731
|
+
/* @__PURE__ */ d(w.Group, { className: c(k.formGroup), children: [
|
|
732
|
+
/* @__PURE__ */ s(w.Label, { htmlFor: "name", children: u("message.name") }),
|
|
733
733
|
/* @__PURE__ */ s(w.Control, { type: "text", name: "name", isInvalid: !!o.errors.name && o.touched.name, value: o.values.name, onChange: o.handleChange }),
|
|
734
734
|
/* @__PURE__ */ s(w.Control.Feedback, { type: "invalid", style: { display: o.errors.name && o.touched.name ? "block" : "none" }, children: o.errors.name })
|
|
735
735
|
] }),
|
|
736
|
-
/* @__PURE__ */
|
|
737
|
-
/* @__PURE__ */ s(w.Label, { htmlFor: "email", children:
|
|
736
|
+
/* @__PURE__ */ d(w.Group, { className: c(k.formGroup), children: [
|
|
737
|
+
/* @__PURE__ */ s(w.Label, { htmlFor: "email", children: u("message.email") }),
|
|
738
738
|
/* @__PURE__ */ s(
|
|
739
739
|
w.Control,
|
|
740
740
|
{
|
|
@@ -747,44 +747,48 @@ const ue = Object.assign(Ce, {
|
|
|
747
747
|
),
|
|
748
748
|
/* @__PURE__ */ s(w.Control.Feedback, { type: "invalid", style: { display: o.errors.email && o.touched.email ? "block" : "none" }, children: o.errors.email })
|
|
749
749
|
] }),
|
|
750
|
-
/* @__PURE__ */
|
|
751
|
-
/* @__PURE__ */ s(w.Label, { children:
|
|
750
|
+
/* @__PURE__ */ d(w.Group, { className: c(k.formGroup), children: [
|
|
751
|
+
/* @__PURE__ */ s(w.Label, { children: u("message.phone") }),
|
|
752
752
|
/* @__PURE__ */ s(w.Control, { type: "tel", name: "phone", isInvalid: !!o.errors.phone && o.touched.phone, value: o.values.phone, onChange: o.handleChange }),
|
|
753
753
|
/* @__PURE__ */ s(w.Control.Feedback, { type: "invalid", style: { display: o.errors.phone && o.touched.phone ? "block" : "none" }, children: o.errors.phone })
|
|
754
754
|
] }),
|
|
755
|
-
/* @__PURE__ */
|
|
756
|
-
/* @__PURE__ */ s(w.Label, { children:
|
|
755
|
+
/* @__PURE__ */ d(w.Group, { className: c(k.formGroup), children: [
|
|
756
|
+
/* @__PURE__ */ s(w.Label, { children: u("message.message") }),
|
|
757
757
|
/* @__PURE__ */ s(w.Control, { as: "textarea", name: "message", isInvalid: !!o.errors.message && o.touched.message, value: o.values.message, onChange: o.handleChange }),
|
|
758
758
|
/* @__PURE__ */ s(w.Control.Feedback, { type: "invalid", style: { display: o.errors.message && o.touched.message ? "block" : "none" }, children: o.errors.message })
|
|
759
759
|
] }),
|
|
760
|
-
/* @__PURE__ */
|
|
761
|
-
!
|
|
762
|
-
|
|
760
|
+
/* @__PURE__ */ d(oe, { className: c(k.submit), variant: "dark", type: "submit", disabled: o.isSubmitting || l, children: [
|
|
761
|
+
!l && /* @__PURE__ */ s(se, { children: o.isSubmitting ? u("message.sending") : u("message.send") }),
|
|
762
|
+
l && u("message.sent"),
|
|
763
763
|
o.isSubmitting && /* @__PURE__ */ s("img", { src: "https://images.sofasandsectionals.com/cc/pal-loader.svg", alt: "Loading", width: 20, height: 20 })
|
|
764
764
|
] }),
|
|
765
|
-
/* @__PURE__ */ s(w.Text, { className: c(
|
|
766
|
-
/* @__PURE__ */ s(w.Text, { className: c(
|
|
765
|
+
/* @__PURE__ */ s(w.Text, { className: c(k.success), children: l && u("message.success") }),
|
|
766
|
+
/* @__PURE__ */ s(w.Text, { className: c(k.error), children: o.errors.general })
|
|
767
767
|
] }) })
|
|
768
768
|
] })
|
|
769
769
|
] });
|
|
770
|
-
}, Ds = {}, Fs = ({ id: e, locale: t, baseUrl:
|
|
771
|
-
var
|
|
772
|
-
const { t:
|
|
773
|
-
|
|
770
|
+
}, Ds = {}, Fs = ({ id: e, locale: t, baseUrl: n = "/retailers" }) => {
|
|
771
|
+
var m;
|
|
772
|
+
const { t: a, i18n: i } = E("default"), { settings: r, setSelectedLocationId: u } = H();
|
|
773
|
+
D(() => {
|
|
774
774
|
i.changeLanguage(t);
|
|
775
|
-
}, [t])
|
|
776
|
-
|
|
777
|
-
|
|
775
|
+
}, [t]);
|
|
776
|
+
const l = (p) => {
|
|
777
|
+
u(p.id);
|
|
778
|
+
};
|
|
779
|
+
return /* @__PURE__ */ d("div", { className: "cc", children: [
|
|
780
|
+
/* @__PURE__ */ s("style", { dangerouslySetInnerHTML: { __html: ((m = r == null ? void 0 : r.entity) == null ? void 0 : m.store_locator_css) || "" } }),
|
|
781
|
+
/* @__PURE__ */ d(ge, { children: [
|
|
778
782
|
/* @__PURE__ */ s(Cs, {}),
|
|
779
|
-
/* @__PURE__ */ s(
|
|
780
|
-
/* @__PURE__ */ s(
|
|
781
|
-
/* @__PURE__ */ s(
|
|
783
|
+
/* @__PURE__ */ s(ne, { xs: { order: 0 }, lg: { order: 1 }, className: c(Ds.noMap, "position-relative"), children: /* @__PURE__ */ d("div", { className: "position-relative", children: [
|
|
784
|
+
/* @__PURE__ */ s(at, {}),
|
|
785
|
+
/* @__PURE__ */ s(nt, { onMarkerClick: l })
|
|
782
786
|
] }) })
|
|
783
787
|
] }),
|
|
784
788
|
/* @__PURE__ */ s(Es, {}),
|
|
785
789
|
/* @__PURE__ */ s(Bs, {})
|
|
786
790
|
] });
|
|
787
|
-
}, qs = ({ id: e, locale: t }) => /* @__PURE__ */ s(He, { children: /* @__PURE__ */ s(
|
|
791
|
+
}, qs = ({ id: e, locale: t }) => /* @__PURE__ */ s(He, { children: /* @__PURE__ */ s(Le, { i18n: Ge, children: /* @__PURE__ */ d(Ue, { apiKey: "AIzaSyAnJmWEU1r63DiRWHkjczxzHyIEq3dhj4M", libraries: ["places"], children: [
|
|
788
792
|
/* @__PURE__ */ s("script", { src: "https://maps.googleapis.com/maps/api/js?key=AIzaSyAnJmWEU1r63DiRWHkjczxzHyIEq3dhj4M&libraries=places" }),
|
|
789
793
|
/* @__PURE__ */ s(st, { id: e, lngLocale: t, autolocate: !0, children: /* @__PURE__ */ s(Fs, { id: e, locale: t }) })
|
|
790
794
|
] }) }) });
|