js-cloudimage-360-view 4.9.1 → 4.9.2

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.
@@ -91,7 +91,7 @@ function Pe(e) {
91
91
  return i || zi.test(e) ? Zi(e.slice(2), i ? 2 : 8) : Hi.test(e) ? xe : +e;
92
92
  }
93
93
  var Ki = ji;
94
- const Ee = /* @__PURE__ */ Li(Ki), S = {
94
+ const Ee = /* @__PURE__ */ Li(Ki), Y = {
95
95
  SPIN_X: "spin-x",
96
96
  SPIN_Y: "spin-y",
97
97
  SPIN_XY: "spin-xy",
@@ -118,7 +118,7 @@ const Ee = /* @__PURE__ */ Li(Ki), S = {
118
118
  keys: !1,
119
119
  keysReverse: !1,
120
120
  autoplay: !1,
121
- autoplayBehavior: S.SPIN_X,
121
+ autoplayBehavior: Y.SPIN_X,
122
122
  playOnce: !1,
123
123
  autoplayReverse: !1,
124
124
  pointerZoom: 0,
@@ -129,7 +129,7 @@ const Ee = /* @__PURE__ */ Li(Ki), S = {
129
129
  zoomControls: !0,
130
130
  zoomControlsPosition: "bottom-right",
131
131
  scrollHint: !0,
132
- bottomCircle: !0,
132
+ bottomCircle: !1,
133
133
  bottomCircleOffset: 5,
134
134
  ciToken: null,
135
135
  ciFilters: null,
@@ -186,23 +186,23 @@ const Ee = /* @__PURE__ */ Li(Ki), S = {
186
186
  amountY: parseInt(A(e, "amount-y", d.amountY), 10),
187
187
  speed: parseInt(A(e, "speed", d.speed), 10),
188
188
  dragSpeed: parseInt(A(e, "drag-speed", d.dragSpeed), 10),
189
- draggable: Y(e, "draggable", d.draggable),
190
- swipeable: Y(e, "swipeable", d.swipeable),
191
- keys: Y(e, "keys", d.keys),
192
- keysReverse: Y(e, "keys-reverse", d.keysReverse),
193
- autoplay: Y(e, "autoplay", d.autoplay),
189
+ draggable: S(e, "draggable", d.draggable),
190
+ swipeable: S(e, "swipeable", d.swipeable),
191
+ keys: S(e, "keys", d.keys),
192
+ keysReverse: S(e, "keys-reverse", d.keysReverse),
193
+ autoplay: S(e, "autoplay", d.autoplay),
194
194
  autoplayBehavior: A(e, "autoplay-behavior", d.autoplayBehavior),
195
- playOnce: Y(e, "play-once", d.playOnce),
196
- autoplayReverse: Y(e, "autoplay-reverse", d.autoplayReverse),
195
+ playOnce: S(e, "play-once", d.playOnce),
196
+ autoplayReverse: S(e, "autoplay-reverse", d.autoplayReverse),
197
197
  pointerZoom: parseFloat(A(e, "pointer-zoom", d.pointerZoom)),
198
198
  pointerZoomTrigger: A(e, "pointer-zoom-trigger", d.pointerZoomTrigger),
199
- fullscreen: Y(e, "fullscreen") || Y(e, "full-screen", d.fullscreen),
199
+ fullscreen: S(e, "fullscreen") || S(e, "full-screen", d.fullscreen),
200
200
  magnifier: A(e, "magnifier", null) != null ? parseFloat(A(e, "magnifier", null)) : null,
201
201
  zoomMax: parseFloat(A(e, "zoom-max", d.zoomMax)),
202
202
  zoomStep: parseFloat(A(e, "zoom-step", d.zoomStep)),
203
- zoomControls: !ft(e, "zoom-controls"),
203
+ zoomControls: !Et(e, "zoom-controls"),
204
204
  zoomControlsPosition: A(e, "zoom-controls-position", d.zoomControlsPosition),
205
- scrollHint: !ft(e, "scroll-hint"),
205
+ scrollHint: !Et(e, "scroll-hint"),
206
206
  bottomCircleOffset: parseInt(
207
207
  A(e, "bottom-circle-offset", d.bottomCircleOffset),
208
208
  10
@@ -210,24 +210,24 @@ const Ee = /* @__PURE__ */ Li(Ki), S = {
210
210
  ciToken: A(e, "responsive", d.ciToken),
211
211
  ciFilters: A(e, "filters", d.ciFilters),
212
212
  ciTransformation: A(e, "transformation", d.ciTransformation),
213
- lazyload: Y(e, "lazyload", d.lazyload),
214
- dragReverse: Y(e, "drag-reverse", d.dragReverse),
215
- stopAtEdges: Y(e, "stop-at-edges", d.stopAtEdges),
216
- stopAtEdgesX: A(e, "stop-at-edges-x", null) !== null ? Y(e, "stop-at-edges-x", null) : null,
217
- stopAtEdgesY: A(e, "stop-at-edges-y", null) !== null ? Y(e, "stop-at-edges-y", null) : null,
218
- imageInfo: Y(e, "info", d.imageInfo),
219
- initialIconShown: !ft(e, "initial-icon"),
220
- bottomCircle: !ft(e, "bottom-circle"),
221
- hide360Logo: Y(e, "hide-360-logo", d.hide360Logo),
213
+ lazyload: S(e, "lazyload", d.lazyload),
214
+ dragReverse: S(e, "drag-reverse", d.dragReverse),
215
+ stopAtEdges: S(e, "stop-at-edges", d.stopAtEdges),
216
+ stopAtEdgesX: A(e, "stop-at-edges-x", null) !== null ? S(e, "stop-at-edges-x", null) : null,
217
+ stopAtEdgesY: A(e, "stop-at-edges-y", null) !== null ? S(e, "stop-at-edges-y", null) : null,
218
+ imageInfo: S(e, "info", d.imageInfo),
219
+ initialIconShown: !Et(e, "initial-icon"),
220
+ bottomCircle: S(e, "bottom-circle", d.bottomCircle),
221
+ hide360Logo: S(e, "hide-360-logo", d.hide360Logo),
222
222
  logoSrc: A(e, "logo-src", d.logoSrc),
223
- inertia: Y(e, "inertia", d.inertia),
224
- pinchZoom: Y(e, "pinch-zoom", d.pinchZoom),
225
- hints: !ft(e, "hints"),
223
+ inertia: S(e, "inertia", d.inertia),
224
+ pinchZoom: S(e, "pinch-zoom", d.pinchZoom),
225
+ hints: !Et(e, "hints"),
226
226
  theme: A(e, "theme", d.theme),
227
227
  markerTheme: A(e, "marker-theme", d.markerTheme),
228
228
  brandColor: A(e, "brand-color", d.brandColor),
229
229
  hotspotTrigger: A(e, "hotspot-trigger", d.hotspotTrigger),
230
- hotspotTimelineOnClick: !ft(e, "hotspot-timeline-on-click"),
230
+ hotspotTimelineOnClick: !Et(e, "hotspot-timeline-on-click"),
231
231
  aspectRatio: A(e, "aspect-ratio", d.aspectRatio),
232
232
  cropAspectRatio: A(e, "crop-aspect-ratio", d.cropAspectRatio),
233
233
  cropGravity: A(e, "crop-gravity", d.cropGravity)
@@ -318,11 +318,11 @@ const Ee = /* @__PURE__ */ Li(Ki), S = {
318
318
  onProductClick: e.onProductClick ?? d.onProductClick,
319
319
  onNavigate: e.onNavigate ?? d.onNavigate,
320
320
  onError: e.onError ?? d.onError
321
- }), A = (e, t, i) => e.getAttribute(t) || e.getAttribute(`data-${t}`) || i, Y = (e, t, i) => {
321
+ }), A = (e, t, i) => e.getAttribute(t) || e.getAttribute(`data-${t}`) || i, S = (e, t, i) => {
322
322
  if (!(e.hasAttribute(t) || e.hasAttribute(`data-${t}`))) return i;
323
323
  const s = A(e, t, null);
324
324
  return s !== "false" && s !== "0";
325
- }, ft = (e, t) => A(e, t, null) === "false", ho = (e = 1) => {
325
+ }, Et = (e, t) => A(e, t, null) === "false", ho = (e = 1) => {
326
326
  const t = Math.round(window.devicePixelRatio || 1);
327
327
  return parseInt(e) * t;
328
328
  }, co = (e, t, i) => {
@@ -330,7 +330,8 @@ const Ee = /* @__PURE__ */ Li(Ki), S = {
330
330
  if (new URL(e).origin.includes("cloudimg")) return e;
331
331
  } catch {
332
332
  }
333
- return `https://${t}.cloudimg.io/${i}${e}`;
333
+ const o = e.startsWith("/") ? e.slice(1) : e;
334
+ return `https://${t}.cloudimg.io/${i}${o}`;
334
335
  }, ke = (e, t) => e ? `ar=${e}&gravity=${t || "auto"}` : "", uo = ({ ciTransformation: e, responsiveWidth: t, ciFilters: i }) => {
335
336
  const o = `width=${t}`, s = e || o, n = i ? `&f=${i}` : "";
336
337
  return `${s}${n}`;
@@ -784,14 +785,14 @@ const Ee = /* @__PURE__ */ Li(Ki), S = {
784
785
  e ? t() : i();
785
786
  }, $o = ({ autoplayBehavior: e, spinY: t, reversed: i, loopTriggers: o }) => {
786
787
  switch (e) {
787
- case S.SPIN_XY:
788
- case S.SPIN_YX:
788
+ case Y.SPIN_XY:
789
+ case Y.SPIN_YX:
789
790
  t ? ze(i, o) : Ze(i, o);
790
791
  break;
791
- case S.SPIN_Y:
792
+ case Y.SPIN_Y:
792
793
  ze(i, o);
793
794
  break;
794
- case S.SPIN_X:
795
+ case Y.SPIN_X:
795
796
  default:
796
797
  Ze(i, o);
797
798
  }
@@ -810,21 +811,21 @@ const Ee = /* @__PURE__ */ Li(Ki), S = {
810
811
  };
811
812
  if (r)
812
813
  switch (e) {
813
- case S.SPIN_X:
814
+ case Y.SPIN_X:
814
815
  return a(t, o);
815
- case S.SPIN_Y:
816
+ case Y.SPIN_Y:
816
817
  return a(i, s);
817
- case S.SPIN_XY:
818
- case S.SPIN_YX:
818
+ case Y.SPIN_XY:
819
+ case Y.SPIN_YX:
819
820
  default:
820
821
  return a(t, o) && a(i, s);
821
822
  }
822
823
  switch (e) {
823
- case S.SPIN_XY:
824
- case S.SPIN_Y:
824
+ case Y.SPIN_XY:
825
+ case Y.SPIN_Y:
825
826
  return a(i, s);
826
- case S.SPIN_X:
827
- case S.SPIN_YX:
827
+ case Y.SPIN_X:
828
+ case Y.SPIN_YX:
828
829
  default:
829
830
  return a(t, o);
830
831
  }
@@ -840,18 +841,18 @@ const Ee = /* @__PURE__ */ Li(Ki), S = {
840
841
  }) => {
841
842
  if (a) return !1;
842
843
  const l = t === (n ? 0 : o - 1), c = i === (n ? 0 : s - 1);
843
- return e === S.SPIN_XY || e === S.SPIN_YX ? r === "x" && l || r === "y" && c : !1;
844
+ return e === Y.SPIN_XY || e === Y.SPIN_YX ? r === "x" && l || r === "y" && c : !1;
844
845
  }, Jo = (e, t, i) => {
845
846
  if (!i) return "x";
846
847
  if (!t) return "y";
847
848
  switch (e) {
848
- case S.SPIN_XY:
849
+ case Y.SPIN_XY:
849
850
  return "x";
850
- case S.SPIN_YX:
851
+ case Y.SPIN_YX:
851
852
  return "y";
852
- case S.SPIN_Y:
853
+ case Y.SPIN_Y:
853
854
  return "y";
854
- case S.SPIN_X:
855
+ case Y.SPIN_X:
855
856
  default:
856
857
  return "x";
857
858
  }
@@ -1425,19 +1426,19 @@ function Ps(e) {
1425
1426
  `<div class="ci360-popper-image-wrapper"><img class="ci360-popper-image" src="${Tt(e.image)}" alt="${Tt(e.title || "")}"></div>`
1426
1427
  );
1427
1428
  const i = [];
1428
- if (e.title && i.push(`<h3 class="ci360-popper-title">${gt(e.title)}</h3>`), e.originalPrice || e.price) {
1429
+ if (e.title && i.push(`<h3 class="ci360-popper-title">${ft(e.title)}</h3>`), e.originalPrice || e.price) {
1429
1430
  let o = "";
1430
- e.originalPrice && (o += `<span class="ci360-popper-original-price">${gt(e.originalPrice)}</span>`), e.price && (o += `<span class="ci360-popper-price">${gt(e.price)}</span>`), i.push(`<div class="ci360-popper-price-row">${o}</div>`);
1431
+ e.originalPrice && (o += `<span class="ci360-popper-original-price">${ft(e.originalPrice)}</span>`), e.price && (o += `<span class="ci360-popper-price">${ft(e.price)}</span>`), i.push(`<div class="ci360-popper-price-row">${o}</div>`);
1431
1432
  }
1432
- if (e.description && i.push(`<p class="ci360-popper-description">${gt(e.description)}</p>`), e.url && Es(e.url)) {
1433
+ if (e.description && i.push(`<p class="ci360-popper-description">${ft(e.description)}</p>`), e.url && Es(e.url)) {
1433
1434
  const o = e.ctaText || "View details", s = e.id ? ` data-product-id="${Tt(e.id)}"` : "";
1434
1435
  i.push(
1435
- `<a class="ci360-popper-cta" href="${Tt(e.url)}" target="_top"${s}>${gt(String(o))}</a>`
1436
+ `<a class="ci360-popper-cta" href="${Tt(e.url)}" target="_top"${s}>${ft(String(o))}</a>`
1436
1437
  );
1437
1438
  } else if (e.id) {
1438
1439
  const o = e.ctaText || "View details";
1439
1440
  i.push(
1440
- `<button class="ci360-popper-cta" data-product-id="${Tt(e.id)}">${gt(String(o))}</button>`
1441
+ `<button class="ci360-popper-cta" data-product-id="${Tt(e.id)}">${ft(String(o))}</button>`
1441
1442
  );
1442
1443
  }
1443
1444
  return i.length > 0 && t.push(`<div class="ci360-popper-body">${i.join("")}</div>`), t.join("");
@@ -1445,7 +1446,7 @@ function Ps(e) {
1445
1446
  function de(e) {
1446
1447
  return e.content ? e.content : e.data ? Ps(e.data) : "";
1447
1448
  }
1448
- function gt(e) {
1449
+ function ft(e) {
1449
1450
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
1450
1451
  }
1451
1452
  function Tt(e) {
@@ -1455,10 +1456,10 @@ function Es(e) {
1455
1456
  const t = e.replace(/[\s\x00-\x1f]/g, "");
1456
1457
  return /^https?:\/\//i.test(t) || /^\/(?!\/)/.test(t) || /^#/.test(t);
1457
1458
  }
1458
- var R = "top", _ = "bottom", F = "right", z = "left", fe = "auto", Lt = [R, _, F, z], vt = "start", St = "end", Ts = "clippingParents", ai = "viewport", At = "popper", As = "reference", Ne = /* @__PURE__ */ Lt.reduce(function(e, t) {
1459
- return e.concat([t + "-" + vt, t + "-" + St]);
1459
+ var R = "top", _ = "bottom", F = "right", z = "left", fe = "auto", Lt = [R, _, F, z], gt = "start", St = "end", Ts = "clippingParents", ai = "viewport", At = "popper", As = "reference", Ne = /* @__PURE__ */ Lt.reduce(function(e, t) {
1460
+ return e.concat([t + "-" + gt, t + "-" + St]);
1460
1461
  }, []), li = /* @__PURE__ */ [].concat(Lt, [fe]).reduce(function(e, t) {
1461
- return e.concat([t, t + "-" + vt, t + "-" + St]);
1462
+ return e.concat([t, t + "-" + gt, t + "-" + St]);
1462
1463
  }, []), ks = "beforeRead", Xs = "read", Ss = "afterRead", Ys = "beforeMain", Ls = "main", Ms = "afterMain", Os = "beforeWrite", Hs = "write", Rs = "afterWrite", zs = [ks, Xs, Ss, Ys, Ls, Ms, Os, Hs, Rs];
1463
1464
  function j(e) {
1464
1465
  return e ? (e.nodeName || "").toLowerCase() : null;
@@ -1531,7 +1532,7 @@ const Bs = {
1531
1532
  function V(e) {
1532
1533
  return e.split("-")[0];
1533
1534
  }
1534
- var lt = Math.max, Jt = Math.min, yt = Math.round;
1535
+ var lt = Math.max, Jt = Math.min, vt = Math.round;
1535
1536
  function pe() {
1536
1537
  var e = navigator.userAgentData;
1537
1538
  return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) {
@@ -1541,10 +1542,10 @@ function pe() {
1541
1542
  function hi() {
1542
1543
  return !/^((?!chrome|android).)*safari/i.test(pe());
1543
1544
  }
1544
- function bt(e, t, i) {
1545
+ function yt(e, t, i) {
1545
1546
  t === void 0 && (t = !1), i === void 0 && (i = !1);
1546
1547
  var o = e.getBoundingClientRect(), s = 1, n = 1;
1547
- t && G(e) && (s = e.offsetWidth > 0 && yt(o.width) / e.offsetWidth || 1, n = e.offsetHeight > 0 && yt(o.height) / e.offsetHeight || 1);
1548
+ t && G(e) && (s = e.offsetWidth > 0 && vt(o.width) / e.offsetWidth || 1, n = e.offsetHeight > 0 && vt(o.height) / e.offsetHeight || 1);
1548
1549
  var r = ht(e) ? D(e) : window, a = r.visualViewport, l = !hi() && i, c = (o.left + (l && a ? a.offsetLeft : 0)) / s, h = (o.top + (l && a ? a.offsetTop : 0)) / n, u = o.width / s, m = o.height / n;
1549
1550
  return {
1550
1551
  width: u,
@@ -1558,7 +1559,7 @@ function bt(e, t, i) {
1558
1559
  };
1559
1560
  }
1560
1561
  function ve(e) {
1561
- var t = bt(e), i = e.offsetWidth, o = e.offsetHeight;
1562
+ var t = yt(e), i = e.offsetWidth, o = e.offsetHeight;
1562
1563
  return Math.abs(t.width - i) <= 1 && (i = t.width), Math.abs(t.height - o) <= 1 && (o = t.height), {
1563
1564
  x: e.offsetLeft,
1564
1565
  y: e.offsetTop,
@@ -1680,7 +1681,7 @@ const js = {
1680
1681
  requires: ["popperOffsets"],
1681
1682
  requiresIfExists: ["preventOverflow"]
1682
1683
  };
1683
- function wt(e) {
1684
+ function bt(e) {
1684
1685
  return e.split("-")[1];
1685
1686
  }
1686
1687
  var Us = {
@@ -1692,8 +1693,8 @@ var Us = {
1692
1693
  function $s(e, t) {
1693
1694
  var i = e.x, o = e.y, s = t.devicePixelRatio || 1;
1694
1695
  return {
1695
- x: yt(i * s) / s || 0,
1696
- y: yt(o * s) / s || 0
1696
+ x: vt(i * s) / s || 0,
1697
+ y: vt(o * s) / s || 0
1697
1698
  };
1698
1699
  }
1699
1700
  function Ve(e) {
@@ -1743,7 +1744,7 @@ function Ve(e) {
1743
1744
  function Ks(e) {
1744
1745
  var t = e.state, i = e.options, o = i.gpuAcceleration, s = o === void 0 ? !0 : o, n = i.adaptive, r = n === void 0 ? !0 : n, a = i.roundOffsets, l = a === void 0 ? !0 : a, c = {
1745
1746
  placement: V(t.placement),
1746
- variation: wt(t.placement),
1747
+ variation: bt(t.placement),
1747
1748
  popper: t.elements.popper,
1748
1749
  popperRect: t.rects.popper,
1749
1750
  gpuAcceleration: s,
@@ -1820,7 +1821,7 @@ function be(e) {
1820
1821
  };
1821
1822
  }
1822
1823
  function we(e) {
1823
- return bt(ot(e)).left + be(e).scrollLeft;
1824
+ return yt(ot(e)).left + be(e).scrollLeft;
1824
1825
  }
1825
1826
  function on(e, t) {
1826
1827
  var i = D(e), o = ot(e), s = i.visualViewport, n = o.clientWidth, r = o.clientHeight, a = 0, l = 0;
@@ -1870,7 +1871,7 @@ function me(e) {
1870
1871
  });
1871
1872
  }
1872
1873
  function nn(e, t) {
1873
- var i = bt(e, !1, t === "fixed");
1874
+ var i = yt(e, !1, t === "fixed");
1874
1875
  return i.top = i.top + e.clientTop, i.left = i.left + e.clientLeft, i.bottom = i.top + e.clientHeight, i.right = i.left + e.clientWidth, i.width = e.clientWidth, i.height = e.clientHeight, i.x = i.left, i.y = i.top, i;
1875
1876
  }
1876
1877
  function Ue(e, t, i) {
@@ -1890,7 +1891,7 @@ function an(e, t, i, o) {
1890
1891
  return a.width = a.right - a.left, a.height = a.bottom - a.top, a.x = a.left, a.y = a.top, a;
1891
1892
  }
1892
1893
  function fi(e) {
1893
- var t = e.reference, i = e.element, o = e.placement, s = o ? V(o) : null, n = o ? wt(o) : null, r = t.x + t.width / 2 - i.width / 2, a = t.y + t.height / 2 - i.height / 2, l;
1894
+ var t = e.reference, i = e.element, o = e.placement, s = o ? V(o) : null, n = o ? bt(o) : null, r = t.x + t.width / 2 - i.width / 2, a = t.y + t.height / 2 - i.height / 2, l;
1894
1895
  switch (s) {
1895
1896
  case R:
1896
1897
  l = {
@@ -1926,7 +1927,7 @@ function fi(e) {
1926
1927
  if (c != null) {
1927
1928
  var h = c === "y" ? "height" : "width";
1928
1929
  switch (n) {
1929
- case vt:
1930
+ case gt:
1930
1931
  l[c] = l[c] - (t[h] / 2 - i[h] / 2);
1931
1932
  break;
1932
1933
  case St:
@@ -1938,7 +1939,7 @@ function fi(e) {
1938
1939
  }
1939
1940
  function Yt(e, t) {
1940
1941
  t === void 0 && (t = {});
1941
- var i = t, o = i.placement, s = o === void 0 ? e.placement : o, n = i.strategy, r = n === void 0 ? e.strategy : n, a = i.boundary, l = a === void 0 ? Ts : a, c = i.rootBoundary, h = c === void 0 ? ai : c, u = i.elementContext, m = u === void 0 ? At : u, p = i.altBoundary, C = p === void 0 ? !1 : p, v = i.padding, b = v === void 0 ? 0 : v, x = ui(typeof b != "number" ? b : pi(b, Lt)), P = m === At ? As : At, w = e.rects.popper, g = e.elements[C ? P : m], E = an(ht(g) ? g : g.contextElement || ot(e.elements.popper), l, h, r), f = bt(e.elements.reference), y = fi({
1942
+ var i = t, o = i.placement, s = o === void 0 ? e.placement : o, n = i.strategy, r = n === void 0 ? e.strategy : n, a = i.boundary, l = a === void 0 ? Ts : a, c = i.rootBoundary, h = c === void 0 ? ai : c, u = i.elementContext, m = u === void 0 ? At : u, p = i.altBoundary, C = p === void 0 ? !1 : p, v = i.padding, b = v === void 0 ? 0 : v, x = ui(typeof b != "number" ? b : pi(b, Lt)), P = m === At ? As : At, w = e.rects.popper, g = e.elements[C ? P : m], E = an(ht(g) ? g : g.contextElement || ot(e.elements.popper), l, h, r), f = yt(e.elements.reference), y = fi({
1942
1943
  reference: f,
1943
1944
  element: w,
1944
1945
  placement: s
@@ -1959,8 +1960,8 @@ function Yt(e, t) {
1959
1960
  }
1960
1961
  function ln(e, t) {
1961
1962
  t === void 0 && (t = {});
1962
- var i = t, o = i.placement, s = i.boundary, n = i.rootBoundary, r = i.padding, a = i.flipVariations, l = i.allowedAutoPlacements, c = l === void 0 ? li : l, h = wt(o), u = h ? a ? Ne : Ne.filter(function(C) {
1963
- return wt(C) === h;
1963
+ var i = t, o = i.placement, s = i.boundary, n = i.rootBoundary, r = i.padding, a = i.flipVariations, l = i.allowedAutoPlacements, c = l === void 0 ? li : l, h = bt(o), u = h ? a ? Ne : Ne.filter(function(C) {
1964
+ return bt(C) === h;
1964
1965
  }) : Lt, m = u.filter(function(C) {
1965
1966
  return c.indexOf(C) >= 0;
1966
1967
  });
@@ -1996,7 +1997,7 @@ function cn(e) {
1996
1997
  allowedAutoPlacements: v
1997
1998
  }) : W);
1998
1999
  }, []), E = t.rects.reference, f = t.rects.popper, y = /* @__PURE__ */ new Map(), I = !0, T = g[0], k = 0; k < g.length; k++) {
1999
- var X = g[k], O = V(X), M = wt(X) === vt, U = [R, _].indexOf(O) >= 0, $ = U ? "width" : "height", H = Yt(t, {
2000
+ var X = g[k], O = V(X), M = bt(X) === gt, U = [R, _].indexOf(O) >= 0, $ = U ? "width" : "height", H = Yt(t, {
2000
2001
  placement: X,
2001
2002
  boundary: h,
2002
2003
  rootBoundary: u,
@@ -2018,8 +2019,8 @@ function cn(e) {
2018
2019
  var nt = g.find(function(pt) {
2019
2020
  var q = y.get(pt);
2020
2021
  if (q)
2021
- return q.slice(0, W).every(function(Ct) {
2022
- return Ct;
2022
+ return q.slice(0, W).every(function(wt) {
2023
+ return wt;
2023
2024
  });
2024
2025
  });
2025
2026
  if (nt)
@@ -2129,7 +2130,7 @@ function wn(e) {
2129
2130
  rootBoundary: c,
2130
2131
  padding: u,
2131
2132
  altBoundary: h
2132
- }), x = V(t.placement), P = wt(t.placement), w = !P, g = ye(x), E = bn(g), f = t.modifiersData.popperOffsets, y = t.rects.reference, I = t.rects.popper, T = typeof v == "function" ? v(Object.assign({}, t.rects, {
2133
+ }), x = V(t.placement), P = bt(t.placement), w = !P, g = ye(x), E = bn(g), f = t.modifiersData.popperOffsets, y = t.rects.reference, I = t.rects.popper, T = typeof v == "function" ? v(Object.assign({}, t.rects, {
2133
2134
  placement: t.placement
2134
2135
  })) : v, k = typeof T == "number" ? {
2135
2136
  mainAxis: T,
@@ -2143,14 +2144,14 @@ function wn(e) {
2143
2144
  };
2144
2145
  if (f) {
2145
2146
  if (n) {
2146
- var M, U = g === "y" ? R : z, $ = g === "y" ? _ : F, H = g === "y" ? "height" : "width", Z = f[g], ct = Z + b[U], K = Z - b[$], dt = p ? -I[H] / 2 : 0, ut = P === vt ? y[H] : I[H], st = P === vt ? -I[H] : -y[H], et = t.elements.arrow, it = p && et ? ve(et) : {
2147
+ var M, U = g === "y" ? R : z, $ = g === "y" ? _ : F, H = g === "y" ? "height" : "width", Z = f[g], ct = Z + b[U], K = Z - b[$], dt = p ? -I[H] / 2 : 0, ut = P === gt ? y[H] : I[H], st = P === gt ? -I[H] : -y[H], et = t.elements.arrow, it = p && et ? ve(et) : {
2147
2148
  width: 0,
2148
2149
  height: 0
2149
- }, W = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : di(), nt = W[U], pt = W[$], q = kt(0, y[H], it[H]), Ct = w ? y[H] / 2 - dt - q - nt - k.mainAxis : ut - q - nt - k.mainAxis, te = w ? -y[H] / 2 + dt + q + pt + k.mainAxis : st + q + pt + k.mainAxis, It = t.elements.arrow && Mt(t.elements.arrow), ee = It ? g === "y" ? It.clientTop || 0 : It.clientLeft || 0 : 0, Ot = (M = X == null ? void 0 : X[g]) != null ? M : 0, ie = Z + Ct - Ot - ee, oe = Z + te - Ot, Ht = kt(p ? Jt(ct, ie) : ct, Z, p ? lt(K, oe) : K);
2150
+ }, W = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : di(), nt = W[U], pt = W[$], q = kt(0, y[H], it[H]), wt = w ? y[H] / 2 - dt - q - nt - k.mainAxis : ut - q - nt - k.mainAxis, te = w ? -y[H] / 2 + dt + q + pt + k.mainAxis : st + q + pt + k.mainAxis, Ct = t.elements.arrow && Mt(t.elements.arrow), ee = Ct ? g === "y" ? Ct.clientTop || 0 : Ct.clientLeft || 0 : 0, Ot = (M = X == null ? void 0 : X[g]) != null ? M : 0, ie = Z + wt - Ot - ee, oe = Z + te - Ot, Ht = kt(p ? Jt(ct, ie) : ct, Z, p ? lt(K, oe) : K);
2150
2151
  f[g] = Ht, O[g] = Ht - Z;
2151
2152
  }
2152
2153
  if (a) {
2153
- var xt, Rt = g === "x" ? R : z, zt = g === "x" ? _ : F, J = f[E], mt = E === "y" ? "height" : "width", Zt = J + b[Rt], Dt = J - b[zt], Pt = [R, z].indexOf(x) !== -1, Bt = (xt = X == null ? void 0 : X[E]) != null ? xt : 0, Gt = Pt ? Zt : J - y[mt] - I[mt] - Bt + k.altAxis, _t = Pt ? J + y[mt] + I[mt] - Bt - k.altAxis : Dt, Ft = p && Pt ? Fs(Gt, J, _t) : kt(p ? Gt : Zt, J, p ? _t : Dt);
2154
+ var It, Rt = g === "x" ? R : z, zt = g === "x" ? _ : F, J = f[E], mt = E === "y" ? "height" : "width", Zt = J + b[Rt], Dt = J - b[zt], xt = [R, z].indexOf(x) !== -1, Bt = (It = X == null ? void 0 : X[E]) != null ? It : 0, Gt = xt ? Zt : J - y[mt] - I[mt] - Bt + k.altAxis, _t = xt ? J + y[mt] + I[mt] - Bt - k.altAxis : Dt, Ft = p && xt ? Fs(Gt, J, _t) : kt(p ? Gt : Zt, J, p ? _t : Dt);
2154
2155
  f[E] = Ft, O[E] = Ft - J;
2155
2156
  }
2156
2157
  t.modifiersData[o] = O;
@@ -2173,12 +2174,12 @@ function xn(e) {
2173
2174
  return e === D(e) || !G(e) ? be(e) : In(e);
2174
2175
  }
2175
2176
  function Pn(e) {
2176
- var t = e.getBoundingClientRect(), i = yt(t.width) / e.offsetWidth || 1, o = yt(t.height) / e.offsetHeight || 1;
2177
+ var t = e.getBoundingClientRect(), i = vt(t.width) / e.offsetWidth || 1, o = vt(t.height) / e.offsetHeight || 1;
2177
2178
  return i !== 1 || o !== 1;
2178
2179
  }
2179
2180
  function En(e, t, i) {
2180
2181
  i === void 0 && (i = !1);
2181
- var o = G(t), s = G(t) && Pn(t), n = ot(t), r = bt(e, s, i), a = {
2182
+ var o = G(t), s = G(t) && Pn(t), n = ot(t), r = yt(e, s, i), a = {
2182
2183
  scrollLeft: 0,
2183
2184
  scrollTop: 0
2184
2185
  }, l = {
@@ -2186,7 +2187,7 @@ function En(e, t, i) {
2186
2187
  y: 0
2187
2188
  };
2188
2189
  return (o || !o && !i) && ((j(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
2189
- Ce(n)) && (a = xn(t)), G(t) ? (l = bt(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : n && (l.x = we(n))), {
2190
+ Ce(n)) && (a = xn(t)), G(t) ? (l = yt(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : n && (l.x = we(n))), {
2190
2191
  x: r.left + a.scrollLeft - l.x,
2191
2192
  y: r.top + a.scrollTop - l.y,
2192
2193
  width: r.width,
@@ -3264,15 +3265,15 @@ class ti {
3264
3265
  imageInfo: nt = "black",
3265
3266
  initialIconShown: pt,
3266
3267
  bottomCircle: q,
3267
- hotspots: Ct,
3268
+ hotspots: wt,
3268
3269
  hotspotTrigger: te = "hover",
3269
- dragReverse: It,
3270
+ dragReverse: Ct,
3270
3271
  hide360Logo: ee,
3271
3272
  logoSrc: Ot,
3272
3273
  inertia: ie,
3273
3274
  pinchZoom: oe,
3274
3275
  hints: Ht,
3275
- theme: xt,
3276
+ theme: It,
3276
3277
  markerTheme: Rt,
3277
3278
  brandColor: zt,
3278
3279
  hotspotTimelineOnClick: J = !0,
@@ -3280,7 +3281,7 @@ class ti {
3280
3281
  cropAspectRatio: Zt,
3281
3282
  cropGravity: Dt,
3282
3283
  // Event callbacks
3283
- onReady: Pt,
3284
+ onReady: xt,
3284
3285
  onLoad: Bt,
3285
3286
  onSpin: Gt,
3286
3287
  onAutoplayStart: _t,
@@ -3300,7 +3301,7 @@ class ti {
3300
3301
  let rt = Ut(m, []);
3301
3302
  rt.length && Array.isArray(rt[0]) && (rt = rt.flat()), this.isGridMode = !!(c || rt.length);
3302
3303
  const Ai = s.zoomMax === 5 && O > 1 ? Math.min(O, 5) : M || 5;
3303
- if (this.viewerConfig = s, this.amountX = ne.length || C, this.amountY = re.length || v, this.allowSpinX = !!this.amountX, this.allowSpinY = !!this.amountY, this.isGridMode && (this.allowSpinX = !0, this.allowSpinY = !0), this.orientation = this.allowSpinX ? L.X : L.Y, this.activeImageX = T ? this.amountX - 1 : 0, this.activeImageY = T ? this.amountY - 1 : 0, this.bottomCircleOffset = g, this.autoplay = E, this.autoplayBehavior = f, this.playOnce = y, this.speed = I, this.autoplayReverse = T, this.fullscreen = k, this.zoomMax = Ai, this.zoomStep = U || 0.5, this.zoomControls = $ ?? !0, this.zoomControlsPosition = H || "bottom-left", this.scrollHint = Z ?? !0, this.dragSpeed = Math.max(st, so), this.stopAtEdges = et, this.stopAtEdgesX = it ?? et, this.stopAtEdgesY = W ?? et, this.ciParams = se, this.apiVersion = r, this.keysReverse = w, this.info = nt, this.keys = P, this.innerBox = this.innerBox ?? Eo(this.container), this.container.style.aspectRatio = mt || "", this.initialIconShown = pt, this.bottomCircle = q, this.spinDirection = Jo(this.autoplayBehavior, this.allowSpinX, this.allowSpinY), this.dragReverse = It, this.hotspots = Ct, this.hotspotTrigger = te, this.onHotspotOpen = Ii, this.onHotspotClose = xi, this.onProductClick = Pi, this.onNavigate = Ei, this.hide360Logo = ee, this.logoSrc = Ot, this.inertia = ie, this.pinchZoom = oe, this.hints = Ht, this.hotspotTimelineOnClick = J, xt === "dark" ? this.container.classList.add("ci360-theme-dark") : xt === "light" && this.container.classList.remove("ci360-theme-dark"), this.container.classList.remove("ci360-hotspot-marker-inverted", "ci360-hotspot-marker-brand"), Rt === "inverted" ? this.container.classList.add("ci360-hotspot-marker-inverted") : Rt === "brand" && (this.container.classList.add("ci360-hotspot-marker-brand"), zt && this.container.style.setProperty("--ci360-hotspot-brand-color", zt)), this.onReady = Pt, this.onLoad = Bt, this.onSpin = Gt, this.onAutoplayStart = _t, this.onAutoplayStop = Ft, this.onFullscreenOpen = gi, this.onFullscreenClose = vi, this.onZoomIn = yi, this.onZoomOut = bi, this.onDragStart = wi, this.onDragEnd = Ci, this.onError = Ti, this.srcXConfig = {
3304
+ if (this.viewerConfig = s, this.amountX = ne.length || C, this.amountY = re.length || v, this.allowSpinX = !!this.amountX, this.allowSpinY = !!this.amountY, this.isGridMode && (this.allowSpinX = !0, this.allowSpinY = !0), this.orientation = this.allowSpinX ? L.X : L.Y, this.activeImageX = T ? this.amountX - 1 : 0, this.activeImageY = T ? this.amountY - 1 : 0, this.bottomCircleOffset = g, this.autoplay = E, this.autoplayBehavior = f, this.playOnce = y, this.speed = I, this.autoplayReverse = T, this.fullscreen = k, this.zoomMax = Ai, this.zoomStep = U || 0.5, this.zoomControls = $ ?? !0, this.zoomControlsPosition = H || "bottom-left", this.scrollHint = Z ?? !0, this.dragSpeed = Math.max(st, so), this.stopAtEdges = et, this.stopAtEdgesX = it ?? et, this.stopAtEdgesY = W ?? et, this.ciParams = se, this.apiVersion = r, this.keysReverse = w, this.info = nt, this.keys = P, this.innerBox = this.innerBox ?? Eo(this.container), this.container.style.aspectRatio = mt || "", this.initialIconShown = pt, this.bottomCircle = q, this.spinDirection = Jo(this.autoplayBehavior, this.allowSpinX, this.allowSpinY), this.dragReverse = Ct, this.hotspots = wt, this.hotspotTrigger = te, this.onHotspotOpen = Ii, this.onHotspotClose = xi, this.onProductClick = Pi, this.onNavigate = Ei, this.hide360Logo = ee, this.logoSrc = Ot, this.inertia = ie, this.pinchZoom = oe, this.hints = Ht, this.hotspotTimelineOnClick = J, It === "dark" ? this.container.classList.add("ci360-theme-dark") : It === "light" && this.container.classList.remove("ci360-theme-dark"), this.container.classList.remove("ci360-hotspot-marker-inverted", "ci360-hotspot-marker-brand"), Rt === "inverted" ? this.container.classList.add("ci360-hotspot-marker-inverted") : Rt === "brand" && (this.container.classList.add("ci360-hotspot-marker-brand"), zt && this.container.style.setProperty("--ci360-hotspot-brand-color", zt)), this.onReady = xt, this.onLoad = Bt, this.onSpin = Gt, this.onAutoplayStart = _t, this.onAutoplayStop = Ft, this.onFullscreenOpen = gi, this.onFullscreenClose = vi, this.onZoomIn = yi, this.onZoomOut = bi, this.onDragStart = wi, this.onDragEnd = Ci, this.onError = Ti, this.srcXConfig = {
3304
3305
  folder: n,
3305
3306
  filename: a,
3306
3307
  imageList: ne,
@@ -3336,9 +3337,9 @@ class ti {
3336
3337
  }, o && this.removeEvents(), this.attachEvents(b, x, P), o) return;
3337
3338
  const ae = this.container.offsetWidth;
3338
3339
  if (this.isGridMode) {
3339
- const Et = rt.length ? null : at(this.srcGridConfig, ae), Nt = (Wt) => {
3340
+ const Pt = rt.length ? null : at(this.srcGridConfig, ae), Nt = (Wt) => {
3340
3341
  Se({
3341
- cdnPath: Et,
3342
+ cdnPath: Pt,
3342
3343
  config: this.srcGridConfig,
3343
3344
  onImageLoad: (Q, B) => {
3344
3345
  this.pushImageToSet(Q, B, "grid"), this.updatePercentageInLoader(this.calculatePercentage());
@@ -3350,11 +3351,11 @@ class ti {
3350
3351
  onError: (Q) => this.emit("onError", Q)
3351
3352
  });
3352
3353
  };
3353
- he(Et, this.srcGridConfig, Nt);
3354
+ he(Pt, this.srcGridConfig, Nt);
3354
3355
  } else {
3355
- const Et = this.allowSpinX && !ne.length ? at(this.srcXConfig, ae) : null, Nt = this.allowSpinY && !re.length ? at(this.srcYConfig, ae) : null, Wt = (Q) => {
3356
+ const Pt = this.allowSpinX && !ne.length ? at(this.srcXConfig, ae) : null, Nt = this.allowSpinY && !re.length ? at(this.srcYConfig, ae) : null, Wt = (Q) => {
3356
3357
  Xe({
3357
- cdnPathX: Et,
3358
+ cdnPathX: Pt,
3358
3359
  cdnPathY: Nt,
3359
3360
  configX: this.srcXConfig,
3360
3361
  configY: this.srcYConfig,
@@ -3364,7 +3365,7 @@ class ti {
3364
3365
  onError: (B) => this.emit("onError", B)
3365
3366
  });
3366
3367
  };
3367
- this.allowSpinX ? he(Et, this.srcXConfig, Wt) : this.allowSpinY && he(Nt, this.srcYConfig, Wt);
3368
+ this.allowSpinX ? he(Pt, this.srcXConfig, Wt) : this.allowSpinY && he(Nt, this.srcYConfig, Wt);
3368
3369
  }
3369
3370
  }
3370
3371
  }
@@ -3460,4 +3461,4 @@ class Rn {
3460
3461
  export {
3461
3462
  Rn as default
3462
3463
  };
3463
- //# sourceMappingURL=ci360-RrBk2Ggj.mjs.map
3464
+ //# sourceMappingURL=ci360-BFobl9uu.mjs.map