@expofp/floorplan 3.0.0-alpha.14 → 3.0.0-alpha.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/browser/Debug-Bn7mmuWl.js +40 -0
  2. package/dist/browser/Demo-pwpeopeB.js +47 -0
  3. package/dist/browser/{Free-Dm2FRajw.js → Free-CeZSHheC.js} +29 -20
  4. package/dist/browser/Gallery-BTasOfWx.js +288 -0
  5. package/dist/browser/GpsLoader-BS8b-Aif.js +140 -0
  6. package/dist/browser/{KioskStore-Bvvm0aNQ.js → KioskStore-_Zcv0Bc0.js} +57 -48
  7. package/dist/browser/Mapbox-Cl59-8BN.js +118 -0
  8. package/dist/browser/{SetKioskMode-BecTBVRp.js → SetKioskMode-CjjAW8SI.js} +66 -57
  9. package/dist/browser/{ShowKiosk-C-6DHz7T.js → ShowKiosk-DUcthTIK.js} +28 -19
  10. package/dist/browser/{ThreeComponent-Brnrh22I.js → ThreeComponent-CdelmApV.js} +181 -172
  11. package/dist/browser/boolean-editor-HetrPeeC.js +157 -0
  12. package/dist/browser/bundle.json +29 -29
  13. package/dist/browser/{client-D3Op9Jdd.js → client-BMgLu7eB.js} +590 -581
  14. package/dist/browser/{data-0pZ-ZMEi.js → data-eO9H1gMa.js} +276 -267
  15. package/dist/browser/{debug-overlay-6c_tWF4O.js → debug-overlay-DqIeCuHo.js} +98 -89
  16. package/dist/browser/debug-ui-6t_iunMd.js +67 -0
  17. package/dist/browser/{favicon-DalyEhbd.js → favicon-CoF9H4Pb.js} +11 -2
  18. package/dist/browser/fetch-retry.umd-GcX1W9qV.js +123 -0
  19. package/dist/browser/{flex-OW_m-DBA.js → flex-BC_JSvaB.js} +80 -71
  20. package/dist/browser/{floorplan.ready-D-VQ-QvS.js → floorplan.ready-CZn5dvsU.js} +1011 -987
  21. package/dist/browser/index-C1Rwmp91.js +54 -0
  22. package/dist/browser/{index-BuJlIIdP.js → index-CEVUHq8g.js} +96 -87
  23. package/dist/browser/{index-BUq8_R36.js → index-Dba8EyWF.js} +41 -32
  24. package/dist/browser/{index-Zz9lJz5_.js → index-DnV82MKb.js} +296 -287
  25. package/dist/browser/index-Dp-WygGH.js +57 -0
  26. package/dist/browser/index-sNwIhVDZ.js +92 -0
  27. package/dist/browser/{index-AJbTBu7z.js → index-uGr-_9rk.js} +258 -249
  28. package/dist/browser/index.js +11 -2
  29. package/dist/browser/jsx-runtime-BHfPvO9I.js +40 -0
  30. package/dist/browser/{main-CD9JioNt.js → main-DYasSc7U.js} +24 -15
  31. package/dist/browser/{particles.min-BZTb0pvb.js → particles.min-B6O6_M_h.js} +43 -34
  32. package/package.json +4 -3
  33. package/dist/browser/Debug-Pul6-ZdY.js +0 -31
  34. package/dist/browser/Demo-DN_Ej-P_.js +0 -38
  35. package/dist/browser/Gallery-TLr-wfCG.js +0 -279
  36. package/dist/browser/GpsLoader-CeS0cp98.js +0 -131
  37. package/dist/browser/Mapbox-DizBJSb0.js +0 -109
  38. package/dist/browser/boolean-editor-Duwgypgb.js +0 -148
  39. package/dist/browser/debug-ui-TGRI1j4k.js +0 -58
  40. package/dist/browser/fetch-retry.umd-BZ52tMyv.js +0 -114
  41. package/dist/browser/index-B2YV6GNs.js +0 -48
  42. package/dist/browser/index-D0SjrKD-.js +0 -45
  43. package/dist/browser/index-Vc2rrV4B.js +0 -83
  44. package/dist/browser/jsx-runtime-jIxVPx5o.js +0 -31
@@ -0,0 +1,40 @@
1
+ function __vite_inject_css__(css, id, nonce){ if (typeof document==='undefined') return; var s=document.createElement('style'); s.setAttribute('data-vite-chunk-style', id); s.appendChild(document.createTextNode(css)); document.head.appendChild(s);}
2
+ import { j as s } from "./jsx-runtime-BHfPvO9I.js";
3
+ import { c as o, a as d, s as c } from "./floorplan.ready-CZn5dvsU.js";
4
+ import { u as i } from "./index-DnV82MKb.js";
5
+ (function() {
6
+ try {
7
+ var a = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
8
+ a.SENTRY_RELEASE = { id: "3.0.0-alpha.15" };
9
+ var t = new a.Error().stack;
10
+ t && (a._sentryDebugIds = a._sentryDebugIds || {}, a._sentryDebugIds[t] = "acded0c5-868f-4fe1-823e-4fdbfc2fcba1", a._sentryDebugIdIdentifier = "sentry-dbid-acded0c5-868f-4fe1-823e-4fdbfc2fcba1");
11
+ } catch {
12
+ }
13
+ })();
14
+ const r = [];
15
+ function l() {
16
+ const a = r.map((e) => e.width * e.height).reduce((e, n) => e += n, 0), t = r.map((e) => /* @__PURE__ */ s.jsxs("div", { className: "debug__canvas", id: e.toDataURL(), children: [
17
+ e.width,
18
+ "x",
19
+ e.height,
20
+ "=",
21
+ e.width * e.height,
22
+ /* @__PURE__ */ s.jsx("br", {}),
23
+ /* @__PURE__ */ s.jsx("img", { src: e.toDataURL(), alt: "", crossOrigin: "anonymous" })
24
+ ] }, e.toDataURL()));
25
+ return /* @__PURE__ */ s.jsxs("div", { className: "debug", children: [
26
+ /* @__PURE__ */ s.jsx("button", { onClick: () => c.searchStore.selectSearch(""), children: i("Close") }),
27
+ /* @__PURE__ */ s.jsxs("div", { children: [
28
+ "Total square: ",
29
+ a
30
+ ] }),
31
+ t
32
+ ] });
33
+ }
34
+ const h = () => o(() => /* @__PURE__ */ s.jsx(s.Fragment, { children: d.list.type === "search" && d.list.text === "q1" ? /* @__PURE__ */ s.jsx(l, {}) : null }));
35
+ export {
36
+ h as default
37
+ };
38
+
39
+ ;/* vite-per-chunk-css */
40
+ __vite_inject_css__(".debug{position:fixed;top:1rem;left:1vw;z-index:999;width:calc(100vw - 2rem);height:calc(100vh - 2rem);padding:1rem;overflow:scroll;background:var(--color-white);box-shadow:0 0 1rem #00000080}.debug label{display:block;font-weight:var(--font-weight-bold)}.debug__canvas{display:inline-block;padding:2px;vertical-align:top}.debug__canvas>img{background:var(--color-gray-300)}\n/*$vite$:1*/", "Debug.css", undefined);
@@ -0,0 +1,47 @@
1
+ import { j as s } from "./jsx-runtime-BHfPvO9I.js";
2
+ import { y as o } from "./index-C1Rwmp91.js";
3
+ import { u as d, a, b as f, c as l } from "./floorplan.ready-CZn5dvsU.js";
4
+ import { u as n } from "./index-DnV82MKb.js";
5
+ (function() {
6
+ try {
7
+ var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
8
+ e.SENTRY_RELEASE = { id: "3.0.0-alpha.15" };
9
+ var t = new e.Error().stack;
10
+ t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "98a216a2-b4af-400a-91e3-d9d05b81f97e", e._sentryDebugIdIdentifier = "sentry-dbid-98a216a2-b4af-400a-91e3-d9d05b81f97e");
11
+ } catch {
12
+ }
13
+ })();
14
+ const i = "note-dismissed5";
15
+ function h() {
16
+ const e = d(() => ({
17
+ hidden: !0,
18
+ get top() {
19
+ return a.screenSize.width <= 820;
20
+ },
21
+ get classes() {
22
+ return o({
23
+ demo: !0,
24
+ top: this.top,
25
+ hidden: this.hidden
26
+ });
27
+ }
28
+ }));
29
+ return f(() => {
30
+ sessionStorage.getItem(i) || window.setTimeout(() => {
31
+ e.hidden = !1;
32
+ }, 2e3);
33
+ }), l(() => /* @__PURE__ */ s.jsx("div", { className: e.classes, children: /* @__PURE__ */ s.jsxs("section", { children: [
34
+ /* @__PURE__ */ s.jsx("div", { className: "demo__message", children: /* @__PURE__ */ s.jsxs("span", { children: [
35
+ n("Get your free floor plan at"),
36
+ " ",
37
+ /* @__PURE__ */ s.jsx("a", { href: "https://expofp.com/", target: "_blank", rel: "noopener noreferrer", children: "ExpoFP.com" })
38
+ ] }) }),
39
+ /* @__PURE__ */ s.jsx("a", { href: "/", onClick: t, className: "demo__dismiss", children: n("Dismiss") })
40
+ ] }) }));
41
+ function t(r) {
42
+ r.preventDefault(), e.hidden = !0, sessionStorage.setItem(i, "1");
43
+ }
44
+ }
45
+ export {
46
+ h as default
47
+ };
@@ -1,41 +1,50 @@
1
1
  function __vite_inject_css__(css, id, nonce){ if (typeof document==='undefined') return; var s=document.createElement('style'); s.setAttribute('data-vite-chunk-style', id); s.appendChild(document.createTextNode(css)); document.head.appendChild(s);}
2
- import { j as e } from "./jsx-runtime-jIxVPx5o.js";
3
- import { y as n } from "./index-D0SjrKD-.js";
4
- import { u as a, a as d, b as m, c } from "./floorplan.ready-D-VQ-QvS.js";
5
- import { a5 as f, u as r } from "./index-Zz9lJz5_.js";
6
- const t = "free-dismissed5";
7
- function x() {
8
- const s = a(() => ({
2
+ import { j as s } from "./jsx-runtime-BHfPvO9I.js";
3
+ import { y as o } from "./index-C1Rwmp91.js";
4
+ import { u as a, a as d, b as f, c as l } from "./floorplan.ready-CZn5dvsU.js";
5
+ import { a5 as c, u as i } from "./index-DnV82MKb.js";
6
+ (function() {
7
+ try {
8
+ var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
9
+ e.SENTRY_RELEASE = { id: "3.0.0-alpha.15" };
10
+ var t = new e.Error().stack;
11
+ t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "9d7bb43e-16a0-48b9-b310-8e313c32c744", e._sentryDebugIdIdentifier = "sentry-dbid-9d7bb43e-16a0-48b9-b310-8e313c32c744");
12
+ } catch {
13
+ }
14
+ })();
15
+ const n = "free-dismissed5";
16
+ function p() {
17
+ const e = a(() => ({
9
18
  hidden: !0,
10
19
  get top() {
11
- return d.screenSize.width < f;
20
+ return d.screenSize.width < c;
12
21
  },
13
22
  get classes() {
14
- return n({
23
+ return o({
15
24
  free: !0,
16
25
  bottom: !this.top,
17
26
  hidden: this.hidden
18
27
  });
19
28
  }
20
29
  }));
21
- return m(() => {
22
- sessionStorage.getItem(t) || window.setTimeout(() => {
23
- s.hidden = !1;
30
+ return f(() => {
31
+ sessionStorage.getItem(n) || window.setTimeout(() => {
32
+ e.hidden = !1;
24
33
  }, 2e3);
25
- }), c(() => /* @__PURE__ */ e.jsx("div", { className: s.classes, children: /* @__PURE__ */ e.jsxs("section", { children: [
26
- /* @__PURE__ */ e.jsx("div", { className: "free__message", children: /* @__PURE__ */ e.jsxs("span", { children: [
27
- r("Create a free floor plan at"),
34
+ }), l(() => /* @__PURE__ */ s.jsx("div", { className: e.classes, children: /* @__PURE__ */ s.jsxs("section", { children: [
35
+ /* @__PURE__ */ s.jsx("div", { className: "free__message", children: /* @__PURE__ */ s.jsxs("span", { children: [
36
+ i("Create a free floor plan at"),
28
37
  " ",
29
- /* @__PURE__ */ e.jsx("a", { href: "https://expofp.com/", target: "_blank", rel: "noopener noreferrer", children: "ExpoFP.com" })
38
+ /* @__PURE__ */ s.jsx("a", { href: "https://expofp.com/", target: "_blank", rel: "noopener noreferrer", children: "ExpoFP.com" })
30
39
  ] }) }),
31
- /* @__PURE__ */ e.jsx("a", { href: "/", onClick: i, className: "free__dismiss", children: r("Dismiss") })
40
+ /* @__PURE__ */ s.jsx("a", { href: "/", onClick: t, className: "free__dismiss", children: i("Dismiss") })
32
41
  ] }) }));
33
- function i(o) {
34
- o.preventDefault(), s.hidden = !0, sessionStorage.setItem(t, "1");
42
+ function t(r) {
43
+ r.preventDefault(), e.hidden = !0, sessionStorage.setItem(n, "1");
35
44
  }
36
45
  }
37
46
  export {
38
- x as default
47
+ p as default
39
48
  };
40
49
 
41
50
  ;/* vite-per-chunk-css */
@@ -0,0 +1,288 @@
1
+ import { j as l } from "./jsx-runtime-BHfPvO9I.js";
2
+ import { r as h, u as j, o as k } from "./index-DnV82MKb.js";
3
+ import { y as N, r as O } from "./index-C1Rwmp91.js";
4
+ import { ax as z, ay as L, az as R, aA as T, aB as D, aC as G, aD as A, aE as B } from "./floorplan.ready-CZn5dvsU.js";
5
+ (function() {
6
+ try {
7
+ var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
8
+ e.SENTRY_RELEASE = { id: "3.0.0-alpha.15" };
9
+ var i = new e.Error().stack;
10
+ i && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[i] = "0ab2dd3c-6d1e-420d-8b1c-d3d59d5bd669", e._sentryDebugIdIdentifier = "sentry-dbid-0ab2dd3c-6d1e-420d-8b1c-d3d59d5bd669");
11
+ } catch {
12
+ }
13
+ })();
14
+ const M = ({
15
+ count: e,
16
+ onFullscreen: i
17
+ }) => /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
18
+ /* @__PURE__ */ l.jsxs("div", { className: "gallery__badge gallery__badge-count", children: [
19
+ /* @__PURE__ */ l.jsx("i", { className: "icon-image" }),
20
+ /* @__PURE__ */ l.jsx("span", { children: e })
21
+ ] }),
22
+ /* @__PURE__ */ l.jsx("div", { className: "gallery__badge gallery__badge-fullscreen", onClick: i, children: /* @__PURE__ */ l.jsx("i", { className: "icon-maximize" }) })
23
+ ] });
24
+ class P {
25
+ constructor() {
26
+ this.cache = [], this.load = (i) => new Promise((r, d) => {
27
+ i || r(null);
28
+ var t = this.cache.filter((g) => g.src === i)[0];
29
+ t ? r(t) : (t = new Image(), t.crossOrigin = "anonymous", t.src = i, t.onload = () => {
30
+ this.cache.length > 10 && this.cache.shift(), this.cache.push(t), r(t);
31
+ }, t.onerror = (g) => {
32
+ d(g);
33
+ });
34
+ });
35
+ }
36
+ }
37
+ const I = new P(), S = ({
38
+ url: e,
39
+ setHeight: i = !1,
40
+ position: r = "center",
41
+ isFullscreen: d = !1,
42
+ leading: t = !1,
43
+ fillMode: g = "contain",
44
+ onImageLoadHeightUpdate: u
45
+ }) => {
46
+ const m = h.useRef(null), f = h.useRef(null);
47
+ h.useEffect(() => {
48
+ !m.current || !f.current || !t || v(e);
49
+ }, [e]);
50
+ const v = async (y) => {
51
+ if (i)
52
+ try {
53
+ const x = await I.load(y);
54
+ f.current.style.height = x.height * f.current.clientWidth / x.width + "px", u && u();
55
+ } catch {
56
+ }
57
+ }, E = {
58
+ backgroundImage: `url("${e}")`,
59
+ backgroundSize: g,
60
+ backgroundRepeat: "no-repeat",
61
+ transition: t ? "all 0.5s ease 0s" : "none",
62
+ backgroundPosition: r
63
+ };
64
+ return /* @__PURE__ */ l.jsx("div", { ref: f, style: {
65
+ width: "100%",
66
+ height: t && !d ? "250px" : "100%"
67
+ }, children: /* @__PURE__ */ l.jsx("div", { ref: m, className: "gallery__img", style: E }) });
68
+ }, _ = ({
69
+ url: e,
70
+ position: i = "center",
71
+ leading: r = !1,
72
+ setHeight: d = !1,
73
+ fillMode: t,
74
+ onClick: g,
75
+ onImageLoadHeightUpdate: u
76
+ }) => /* @__PURE__ */ l.jsx("div", { className: "gallery__item", onClick: g, children: /* @__PURE__ */ l.jsx(S, { position: i, fillMode: t, url: e, leading: r, setHeight: d, onImageLoadHeightUpdate: u }) });
77
+ function q(e, i, r, d) {
78
+ return e.params.createElements && Object.keys(d).forEach((t) => {
79
+ if (!r[t] && r.auto === !0) {
80
+ let g = z(e.el, `.${d[t]}`)[0];
81
+ g || (g = L("div", d[t]), g.className = d[t], e.el.append(g)), r[t] = g, i[t] = g;
82
+ }
83
+ }), r;
84
+ }
85
+ function F({
86
+ swiper: e,
87
+ extendParams: i,
88
+ on: r,
89
+ emit: d
90
+ }) {
91
+ i({
92
+ navigation: {
93
+ nextEl: null,
94
+ prevEl: null,
95
+ hideOnClick: !1,
96
+ disabledClass: "swiper-button-disabled",
97
+ hiddenClass: "swiper-button-hidden",
98
+ lockClass: "swiper-button-lock",
99
+ navigationDisabledClass: "swiper-navigation-disabled"
100
+ }
101
+ }), e.navigation = {
102
+ nextEl: null,
103
+ prevEl: null
104
+ };
105
+ const t = (a) => (Array.isArray(a) || (a = [a].filter((s) => !!s)), a);
106
+ function g(a) {
107
+ let s;
108
+ return a && typeof a == "string" && e.isElement && (s = e.el.shadowRoot.querySelector(a), s) ? s : (a && (typeof a == "string" && (s = [...document.querySelectorAll(a)]), e.params.uniqueNavElements && typeof a == "string" && s.length > 1 && e.el.querySelectorAll(a).length === 1 && (s = e.el.querySelector(a))), a && !s ? a : s);
109
+ }
110
+ function u(a, s) {
111
+ const o = e.params.navigation;
112
+ a = t(a), a.forEach((n) => {
113
+ n && (n.classList[s ? "add" : "remove"](...o.disabledClass.split(" ")), n.tagName === "BUTTON" && (n.disabled = s), e.params.watchOverflow && e.enabled && n.classList[e.isLocked ? "add" : "remove"](o.lockClass));
114
+ });
115
+ }
116
+ function m() {
117
+ const {
118
+ nextEl: a,
119
+ prevEl: s
120
+ } = e.navigation;
121
+ if (e.params.loop) {
122
+ u(s, !1), u(a, !1);
123
+ return;
124
+ }
125
+ u(s, e.isBeginning && !e.params.rewind), u(a, e.isEnd && !e.params.rewind);
126
+ }
127
+ function f(a) {
128
+ a.preventDefault(), !(e.isBeginning && !e.params.loop && !e.params.rewind) && (e.slidePrev(), d("navigationPrev"));
129
+ }
130
+ function v(a) {
131
+ a.preventDefault(), !(e.isEnd && !e.params.loop && !e.params.rewind) && (e.slideNext(), d("navigationNext"));
132
+ }
133
+ function E() {
134
+ const a = e.params.navigation;
135
+ if (e.params.navigation = q(e, e.originalParams.navigation, e.params.navigation, {
136
+ nextEl: "swiper-button-next",
137
+ prevEl: "swiper-button-prev"
138
+ }), !(a.nextEl || a.prevEl)) return;
139
+ let s = g(a.nextEl), o = g(a.prevEl);
140
+ Object.assign(e.navigation, {
141
+ nextEl: s,
142
+ prevEl: o
143
+ }), s = t(s), o = t(o);
144
+ const n = (c, b) => {
145
+ c && c.addEventListener("click", b === "next" ? v : f), !e.enabled && c && c.classList.add(...a.lockClass.split(" "));
146
+ };
147
+ s.forEach((c) => n(c, "next")), o.forEach((c) => n(c, "prev"));
148
+ }
149
+ function y() {
150
+ let {
151
+ nextEl: a,
152
+ prevEl: s
153
+ } = e.navigation;
154
+ a = t(a), s = t(s);
155
+ const o = (n, c) => {
156
+ n.removeEventListener("click", c === "next" ? v : f), n.classList.remove(...e.params.navigation.disabledClass.split(" "));
157
+ };
158
+ a.forEach((n) => o(n, "next")), s.forEach((n) => o(n, "prev"));
159
+ }
160
+ r("init", () => {
161
+ e.params.navigation.enabled === !1 ? p() : (E(), m());
162
+ }), r("toEdge fromEdge lock unlock", () => {
163
+ m();
164
+ }), r("destroy", () => {
165
+ y();
166
+ }), r("enable disable", () => {
167
+ let {
168
+ nextEl: a,
169
+ prevEl: s
170
+ } = e.navigation;
171
+ a = t(a), s = t(s), [...a, ...s].filter((o) => !!o).forEach((o) => o.classList[e.enabled ? "remove" : "add"](e.params.navigation.lockClass));
172
+ }), r("click", (a, s) => {
173
+ let {
174
+ nextEl: o,
175
+ prevEl: n
176
+ } = e.navigation;
177
+ o = t(o), n = t(n);
178
+ const c = s.target;
179
+ if (e.params.navigation.hideOnClick && !n.includes(c) && !o.includes(c)) {
180
+ if (e.pagination && e.params.pagination && e.params.pagination.clickable && (e.pagination.el === c || e.pagination.el.contains(c))) return;
181
+ let b;
182
+ o.length ? b = o[0].classList.contains(e.params.navigation.hiddenClass) : n.length && (b = n[0].classList.contains(e.params.navigation.hiddenClass)), d(b === !0 ? "navigationShow" : "navigationHide"), [...o, ...n].filter((C) => !!C).forEach((C) => C.classList.toggle(e.params.navigation.hiddenClass));
183
+ }
184
+ });
185
+ const x = () => {
186
+ e.el.classList.remove(...e.params.navigation.navigationDisabledClass.split(" ")), E(), m();
187
+ }, p = () => {
188
+ e.el.classList.add(...e.params.navigation.navigationDisabledClass.split(" ")), y();
189
+ };
190
+ Object.assign(e.navigation, {
191
+ enable: x,
192
+ disable: p,
193
+ update: m,
194
+ init: E,
195
+ destroy: y
196
+ });
197
+ }
198
+ const U = ({
199
+ zoomIn: e,
200
+ zoomOut: i,
201
+ onClose: r
202
+ }) => /* @__PURE__ */ l.jsxs("div", { className: "gallery-slider__controls", children: [
203
+ /* @__PURE__ */ l.jsx("button", { className: "gallery-slider__btn close", title: j("Close"), "aria-label": j("Close"), onClick: r, children: /* @__PURE__ */ l.jsx("i", { className: "icon-close", "aria-hidden": "true" }) }),
204
+ /* @__PURE__ */ l.jsx("button", { className: "gallery-slider__btn zoom-in", title: j("Zoom In"), "aria-label": j("Zoom In"), onClick: () => e(), children: /* @__PURE__ */ l.jsx("i", { className: "icon-zoom-in", "aria-hidden": "true" }) }),
205
+ /* @__PURE__ */ l.jsx("button", { className: "gallery-slider__btn zoom-out", title: j("Zoom Out"), "aria-label": j("Zoom Out"), onClick: () => i(), children: /* @__PURE__ */ l.jsx("i", { className: "icon-zoom-out", "aria-hidden": "true" }) })
206
+ ] }), Z = ({
207
+ swiperRef: e,
208
+ leading: i,
209
+ url: r
210
+ }) => (R(({
211
+ state: d,
212
+ instance: t
213
+ }) => {
214
+ e.current && (e.current.allowTouchMove = d.scale === 1, d.scale === 1 && d.positionX !== 0 && d.positionY !== 0 && t.setCenter());
215
+ }), /* @__PURE__ */ l.jsx(T, { wrapperClass: "gallery-slider__zoom", contentClass: "gallery-slider__zoom-content", children: /* @__PURE__ */ l.jsx(S, { isFullscreen: !0, leading: i, url: r }) })), H = (e) => {
216
+ const {
217
+ images: i,
218
+ leading: r,
219
+ initialSlideIndex: d,
220
+ onClose: t,
221
+ className: g
222
+ } = e, u = D(), [m, f] = h.useState(d), [v, E] = h.useState([]), y = h.useRef(null), x = h.useRef(null), p = h.useRef(null), a = {
223
+ initialSlide: d,
224
+ draggable: !1,
225
+ modules: [F],
226
+ spaceBetween: 50,
227
+ slidesPerView: 1,
228
+ navigation: {
229
+ prevEl: x.current,
230
+ nextEl: p.current
231
+ },
232
+ grabCursor: !0
233
+ }, s = /* @__PURE__ */ l.jsx("div", { className: N("gallery-modal", g), children: /* @__PURE__ */ l.jsxs(G, { onSwiper: (o) => y.current = o, className: "gallery-slider", onSlideChange: (o) => {
234
+ var n;
235
+ f(o.activeIndex), (n = v[o.previousIndex]) == null || n.resetTransform();
236
+ }, ...a, children: [
237
+ v.length ? /* @__PURE__ */ l.jsx(U, { onClose: t, zoomIn: v[m].zoomIn, zoomOut: v[m].zoomOut }) : null,
238
+ i.length > 1 && /* @__PURE__ */ l.jsx("button", { ref: p, title: j("Next slide"), "aria-label": "˃", className: "gallery-slider__btn next", children: /* @__PURE__ */ l.jsx("i", { className: "icon-chevron-right" }) }),
239
+ i.length > 1 && /* @__PURE__ */ l.jsx("button", { ref: x, title: j("Prev slide"), "aria-label": "˂", className: "gallery-slider__btn prev", children: /* @__PURE__ */ l.jsx("i", { className: "icon-chevron-left" }) }),
240
+ i.map((o, n) => /* @__PURE__ */ l.jsx(A, { children: /* @__PURE__ */ l.jsx(B, { initialScale: 1, alignmentAnimation: {
241
+ sizeX: 0,
242
+ sizeY: 0
243
+ }, onInit: (c) => {
244
+ E((b) => [...b, c]);
245
+ }, children: /* @__PURE__ */ l.jsx(Z, { leading: r, swiperRef: y, url: o }) }) }, o + n))
246
+ ] }) });
247
+ return u ? O.createPortal(s, u) : null;
248
+ }, V = (e) => {
249
+ const {
250
+ images: i,
251
+ leading: r = !1,
252
+ onImageLoadHeightUpdate: d,
253
+ onOpenGallery: t,
254
+ onCloseGallery: g,
255
+ className: u
256
+ } = e, [m, f] = h.useState(!1), [v, E] = h.useState(0), [y, x] = h.useState(!1), p = (n) => {
257
+ E(n), f(!0), t && t();
258
+ }, a = () => {
259
+ f(!1), g && g();
260
+ }, s = (n) => {
261
+ let c = n.split("/");
262
+ const b = c[c.length - 1];
263
+ return b.indexOf("original-") === -1 && (c[c.length - 1] = "original-" + b), c.join("/");
264
+ }, o = (n, c) => c ? s(n) : n;
265
+ return h.useEffect(() => {
266
+ (async () => {
267
+ if (i.length > 0) {
268
+ const c = o(i[0], !0);
269
+ try {
270
+ await I.load(c), x(!0);
271
+ } catch {
272
+ x(!1);
273
+ }
274
+ }
275
+ })();
276
+ }, [i]), /* @__PURE__ */ l.jsxs(k.Fragment, { children: [
277
+ /* @__PURE__ */ l.jsxs("div", { className: N("gallery", {
278
+ "gallery-leading": r
279
+ }, u), children: [
280
+ /* @__PURE__ */ l.jsx("div", { className: "gallery__wrapper", children: r ? /* @__PURE__ */ l.jsx(_, { url: i[0], leading: r, setHeight: !0, fillMode: "contain", onClick: () => p(0), onImageLoadHeightUpdate: d }) : i.map((n, c) => /* @__PURE__ */ l.jsx(_, { url: n, position: "top", fillMode: "cover", onClick: () => p(c), onImageLoadHeightUpdate: d }, n + c)) }),
281
+ !r && /* @__PURE__ */ l.jsx(M, { onFullscreen: () => p(0), count: i.length })
282
+ ] }),
283
+ m && /* @__PURE__ */ l.jsx(H, { className: u, images: i.map((n) => o(n, y)), leading: r, initialSlideIndex: v, onClose: a })
284
+ ] });
285
+ };
286
+ export {
287
+ V as default
288
+ };
@@ -0,0 +1,140 @@
1
+ import { j as S } from "./jsx-runtime-BHfPvO9I.js";
2
+ import { r as a, l as I, u as y, R as _ } from "./index-DnV82MKb.js";
3
+ import { af as T, ag as A, ah as k, s as p, ai as x, e as G } from "./floorplan.ready-CZn5dvsU.js";
4
+ import "./index-C1Rwmp91.js";
5
+ (function() {
6
+ try {
7
+ var t = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
8
+ t.SENTRY_RELEASE = { id: "3.0.0-alpha.15" };
9
+ var n = new t.Error().stack;
10
+ n && (t._sentryDebugIds = t._sentryDebugIds || {}, t._sentryDebugIds[n] = "86e91887-47e6-4dfc-8a8f-c0df8ffb8b29", t._sentryDebugIdIdentifier = "sentry-dbid-86e91887-47e6-4dfc-8a8f-c0df8ffb8b29");
11
+ } catch {
12
+ }
13
+ })();
14
+ const v = 3;
15
+ function D(t) {
16
+ return Math.floor(t);
17
+ }
18
+ function L(t, n) {
19
+ return T(t.lat, t.lng, n.lat, n.lng) >= v ? !0 : t.heading !== n.heading;
20
+ }
21
+ const M = 120, N = 3e3, P = 360;
22
+ function H(t) {
23
+ const n = a.useRef(null), r = a.useRef(null), s = a.useRef(0), i = a.useRef(null), l = a.useRef(!1), o = a.useRef(null), u = a.useRef(!1), c = a.useRef(null), d = (e) => t(e), R = (e) => {
24
+ const f = Date.now();
25
+ if (f - s.current < M) return;
26
+ const h = i.current;
27
+ if (!o.current) {
28
+ o.current = e, s.current = f, i.current = e, d(e);
29
+ return;
30
+ }
31
+ const E = T(o.current.lat, o.current.lng, e.lat, e.lng);
32
+ let g;
33
+ u.current ? E <= v ? (u.current = !1, o.current = e, g = {
34
+ ...o.current,
35
+ heading: e.heading
36
+ }) : (o.current = e, g = e) : E >= v ? (u.current = !0, o.current = e, c.current = null, g = e) : (c.current == null && (c.current = f), f - c.current > N && (o.current = e), g = {
37
+ ...o.current,
38
+ heading: e.heading
39
+ }), !(h && !L(h, g)) && (s.current = f, i.current = g, d(g));
40
+ }, m = a.useCallback((e) => {
41
+ var E;
42
+ const f = (E = e.webkitCompassHeading) != null ? E : e.alpha != null ? P - e.alpha : null;
43
+ if (f == null) return;
44
+ const h = D(f);
45
+ r.current !== h && (r.current = h, i.current && R({
46
+ ...i.current,
47
+ heading: h
48
+ }));
49
+ }, [t]);
50
+ return {
51
+ startGeolocation: () => {
52
+ n.current == null && (n.current = navigator.geolocation.watchPosition((e) => {
53
+ R({
54
+ lat: e.coords.latitude,
55
+ lng: e.coords.longitude,
56
+ heading: r.current
57
+ });
58
+ }, (e) => I.warn("Geolocation watch error:", e), {
59
+ enableHighAccuracy: !0,
60
+ maximumAge: 0
61
+ }));
62
+ },
63
+ startOrientation: () => {
64
+ l.current || (l.current = !0, window.addEventListener("deviceorientation", m, !0));
65
+ },
66
+ stopGeolocation: () => {
67
+ n.current != null && (navigator.geolocation.clearWatch(n.current), n.current = null), o.current = null, u.current = !1;
68
+ },
69
+ stopOrientation: () => {
70
+ l.current = !1, window.removeEventListener("deviceorientation", m, !0);
71
+ }
72
+ };
73
+ }
74
+ function q({
75
+ isOpen: t,
76
+ onAllow: n,
77
+ onCancel: r
78
+ }) {
79
+ return t ? /* @__PURE__ */ S.jsx(A, { title: y("Show your position on the map"), acceptText: y("Allow compass access"), rejectText: y("Not now"), onClickAccept: n, onClickReject: r, children: y("To display your current position and orient the map around you, we’ll ask for permission to access your device orientation") }) : null;
80
+ }
81
+ function j({
82
+ onPositionUpdate: t,
83
+ onAllowCompass: n,
84
+ onRejectCompass: r,
85
+ orientationStorageKey: s = "compass-permission-granted",
86
+ requestCompass: i = !0,
87
+ requestCompassAllowed: l = !0
88
+ }) {
89
+ const {
90
+ startOrientation: o,
91
+ startGeolocation: u,
92
+ stopOrientation: c,
93
+ stopGeolocation: d
94
+ } = H(t), [R, m] = a.useState(!1), [O, w] = a.useState(!1);
95
+ a.useEffect(() => (navigator.geolocation.getCurrentPosition(() => {
96
+ m(!0), u();
97
+ }, (e) => {
98
+ I.warn("Geolocation error:", e), m(!1);
99
+ }), () => {
100
+ c(), d();
101
+ }), [u, d, c]);
102
+ const b = async () => {
103
+ typeof DeviceOrientationEvent < "u" && typeof DeviceOrientationEvent.requestPermission == "function" && await DeviceOrientationEvent.requestPermission() !== "granted" || (localStorage.setItem(s, "true"), o(), w(!1), n == null || n());
104
+ }, C = a.useCallback(() => {
105
+ localStorage.setItem(s, "false"), w(!1), r == null || r();
106
+ }, [r]);
107
+ return a.useEffect(() => {
108
+ if (!R || !l || typeof navigator > "u" || !k) return;
109
+ const e = localStorage.getItem(s);
110
+ if (!e || i) {
111
+ w(!0);
112
+ return;
113
+ }
114
+ e === "true" && b();
115
+ }, [R, i, l, b]), /* @__PURE__ */ S.jsx(q, { isOpen: O, onAllow: b, onCancel: C });
116
+ }
117
+ function z({
118
+ requestCompassAllowed: t
119
+ }) {
120
+ const [n, r] = a.useState(!1), s = a.useCallback(({
121
+ lat: o,
122
+ lng: u,
123
+ angle: c,
124
+ heading: d
125
+ }) => {
126
+ p.routeStore.selectCurrentPosition(new x(0, 0, 0, c || d, o, u), !1);
127
+ }, []), i = a.useCallback(() => {
128
+ p.routeStore.requestCompass = void 0, r(!1);
129
+ }, [r]), l = a.useCallback(() => {
130
+ p.routeStore.requestCompass = void 0, r(!1);
131
+ }, [r]);
132
+ return G(() => p.uiState.hideCookieConsent, (o) => {
133
+ r(o);
134
+ }), G(() => p.routeStore.requestCompass, (o) => {
135
+ r(o);
136
+ }), /* @__PURE__ */ S.jsx(j, { requestCompass: n, requestCompassAllowed: t, onRejectCompass: i, onAllowCompass: l, orientationStorageKey: _, onPositionUpdate: s });
137
+ }
138
+ export {
139
+ z as default
140
+ };