ire-preview 2.2.5 → 2.2.7

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 (2) hide show
  1. package/dist/lib.es.js +98 -96
  2. package/package.json +1 -1
package/dist/lib.es.js CHANGED
@@ -231,7 +231,7 @@ const _hoisted_1$g = {
231
231
  return (t, r) => (openBlock(), createElementBlock("div", null, [
232
232
  createVNode(Transition, { name: "ire-fade-in-out" }, {
233
233
  default: withCtx(() => {
234
- var o, s, c, d, k, l, _, x, y, u, f, a, v, n, i, p, m, $, h, E, S, g, b, w, V, C, D, R;
234
+ var o, s, c, d, k, l, f, x, y, u, _, a, v, n, i, p, m, $, h, E, S, g, b, w, V, C, D, R, j;
235
235
  return [
236
236
  t.type && t.hoveredData && t.type !== "tooltip" ? (openBlock(), createElementBlock("div", _hoisted_1$g, [
237
237
  t.type === "floor" ? (openBlock(), createElementBlock("div", _hoisted_2$9, [
@@ -241,11 +241,11 @@ const _hoisted_1$g = {
241
241
  ]),
242
242
  (s = t.hoveredData) != null && s.conf || (d = (c = t.hoveredData) == null ? void 0 : c.flats) != null && d.length ? (openBlock(), createElementBlock("div", _hoisted_5$3, [
243
243
  (k = t.hoveredData) != null && k.conf ? (openBlock(), createElementBlock("div", _hoisted_6$3, toDisplayString((l = t.hoveredData) == null ? void 0 : l.conf), 1)) : (openBlock(), createElementBlock("div", _hoisted_7$3, [
244
- (x = (_ = t.hoveredData) == null ? void 0 : _.counts) != null && x.available ? (openBlock(), createElementBlock("div", _hoisted_8$3, [
244
+ (x = (f = t.hoveredData) == null ? void 0 : f.counts) != null && x.available ? (openBlock(), createElementBlock("div", _hoisted_8$3, [
245
245
  createElementVNode("div", _hoisted_9$3, toDisplayString(((u = (y = t.hoveredData) == null ? void 0 : y.counts) == null ? void 0 : u.available) || 0), 1),
246
246
  r[1] || (r[1] = createElementVNode("div", { class: "!ire-text-sm ire-uppercase" }, "Available", -1))
247
247
  ])) : createCommentVNode("", !0),
248
- (a = (f = t.hoveredData) == null ? void 0 : f.counts) != null && a.reserved ? (openBlock(), createElementBlock("div", _hoisted_10$3, [
248
+ (a = (_ = t.hoveredData) == null ? void 0 : _.counts) != null && a.reserved ? (openBlock(), createElementBlock("div", _hoisted_10$3, [
249
249
  createElementVNode("div", _hoisted_11$2, toDisplayString((n = (v = t.hoveredData) == null ? void 0 : v.counts) == null ? void 0 : n.reserved), 1),
250
250
  r[2] || (r[2] = createElementVNode("div", { class: "!ire-text-sm ire-uppercase" }, "Reserved", -1))
251
251
  ])) : createCommentVNode("", !0),
@@ -286,7 +286,9 @@ const _hoisted_1$g = {
286
286
  ]),
287
287
  createElementVNode("div", _hoisted_28, [
288
288
  createElementVNode("div", _hoisted_29, [
289
- createTextVNode(toDisplayString((R = (D = t.hoveredData) == null ? void 0 : D.type) == null ? void 0 : R.area_m2) + " M", 1),
289
+ createTextVNode(toDisplayString((j = Number(
290
+ (R = (D = t.hoveredData) == null ? void 0 : D.type) == null ? void 0 : R.area_m2
291
+ )) == null ? void 0 : j.toLocaleString("fr-FR")) + " M", 1),
290
292
  r[8] || (r[8] = createElementVNode("sup", { class: "ire-bg-white !ire-text-xs" }, " 2 ", -1))
291
293
  ])
292
294
  ])
@@ -326,7 +328,7 @@ const _hoisted_1$g = {
326
328
  const t = inject("mouseX"), r = inject("mouseY");
327
329
  return (o, s) => (openBlock(), createBlock(Transition, { name: "ire-fade-in" }, {
328
330
  default: withCtx(() => {
329
- var c, d, k, l, _, x, y, u, f, a, v;
331
+ var c, d, k, l, f, x, y, u, _, a, v;
330
332
  return [
331
333
  o.type && o.hoveredData && o.type !== "tooltip" ? (openBlock(), createElementBlock("div", {
332
334
  key: 0,
@@ -341,7 +343,7 @@ const _hoisted_1$g = {
341
343
  (d = o.hoveredData) != null && d.conf ? (openBlock(), createElementBlock("div", _hoisted_3$7, toDisplayString(o.hoveredData.conf), 1)) : (openBlock(), createElementBlock("div", _hoisted_4$6, "Available: " + toDisplayString(((l = (k = o.hoveredData) == null ? void 0 : k.counts) == null ? void 0 : l.available) || 0), 1))
342
344
  ])) : o.type === "block" ? (openBlock(), createElementBlock("div", _hoisted_5$2, [
343
345
  createElementVNode("div", _hoisted_6$2, [
344
- createElementVNode("div", null, toDisplayString((_ = o.hoveredData) == null ? void 0 : _.title), 1),
346
+ createElementVNode("div", null, toDisplayString((f = o.hoveredData) == null ? void 0 : f.title), 1),
345
347
  createElementVNode("span", _hoisted_7$2, toDisplayString((x = o.hoveredData) == null ? void 0 : x.conf), 1)
346
348
  ])
347
349
  ])) : o.type === "flat" ? (openBlock(), createElementBlock("div", _hoisted_8$2, [
@@ -349,7 +351,7 @@ const _hoisted_1$g = {
349
351
  (u = o.hoveredData) != null && u.conf ? (openBlock(), createElementBlock("div", _hoisted_10$2, toDisplayString(o.hoveredData.conf), 1)) : (openBlock(), createElementBlock("div", _hoisted_11$1, [
350
352
  createElementVNode("div", null, [
351
353
  createElementVNode("div", _hoisted_12$1, [
352
- createTextVNode(toDisplayString(Number((f = o.hoveredData) == null ? void 0 : f.price).toLocaleString("fr-FR")) + " ", 1),
354
+ createTextVNode(toDisplayString(Number((_ = o.hoveredData) == null ? void 0 : _.price).toLocaleString("fr-FR")) + " ", 1),
353
355
  s[0] || (s[0] = createElementVNode("span", { class: "ire-right-[2px] !ire-text-sm ire-text-gray-200" }, " $ ", -1))
354
356
  ])
355
357
  ])
@@ -536,39 +538,39 @@ function isComputed(e) {
536
538
  function createOptionsStore(e, t, r, o) {
537
539
  const { state: s, actions: c, getters: d } = t, k = r.state.value[e];
538
540
  let l;
539
- function _() {
541
+ function f() {
540
542
  k || (r.state.value[e] = s ? s() : {});
541
543
  const x = toRefs(r.state.value[e]);
542
544
  return assign(x, c, Object.keys(d || {}).reduce((y, u) => (y[u] = markRaw(computed$1(() => {
543
545
  setActivePinia(r);
544
- const f = r._s.get(e);
545
- return d[u].call(f, f);
546
+ const _ = r._s.get(e);
547
+ return d[u].call(_, _);
546
548
  })), y), {}));
547
549
  }
548
- return l = createSetupStore(e, _, t, r, o, !0), l;
550
+ return l = createSetupStore(e, f, t, r, o, !0), l;
549
551
  }
550
552
  function createSetupStore(e, t, r = {}, o, s, c) {
551
553
  let d;
552
554
  const k = assign({ actions: {} }, r), l = { deep: !0 };
553
- let _, x, y = [], u = [], f;
555
+ let f, x, y = [], u = [], _;
554
556
  const a = o.state.value[e];
555
557
  !c && !a && (o.state.value[e] = {}), ref({});
556
558
  let v;
557
559
  function n(g) {
558
560
  let b;
559
- _ = x = !1, typeof g == "function" ? (g(o.state.value[e]), b = {
561
+ f = x = !1, typeof g == "function" ? (g(o.state.value[e]), b = {
560
562
  type: MutationType.patchFunction,
561
563
  storeId: e,
562
- events: f
564
+ events: _
563
565
  }) : (mergeReactiveObjects(o.state.value[e], g), b = {
564
566
  type: MutationType.patchObject,
565
567
  payload: g,
566
568
  storeId: e,
567
- events: f
569
+ events: _
568
570
  });
569
571
  const w = v = Symbol();
570
572
  nextTick().then(() => {
571
- v === w && (_ = !0);
573
+ v === w && (f = !0);
572
574
  }), x = !0, triggerSubscriptions(y, b, o.state.value[e]);
573
575
  }
574
576
  const i = c ? function() {
@@ -592,7 +594,7 @@ function createSetupStore(e, t, r = {}, o, s, c) {
592
594
  function R(B) {
593
595
  C.push(B);
594
596
  }
595
- function L(B) {
597
+ function j(B) {
596
598
  D.push(B);
597
599
  }
598
600
  triggerSubscriptions(u, {
@@ -600,7 +602,7 @@ function createSetupStore(e, t, r = {}, o, s, c) {
600
602
  name: w[ACTION_NAME],
601
603
  store: h,
602
604
  after: R,
603
- onError: L
605
+ onError: j
604
606
  });
605
607
  let N;
606
608
  try {
@@ -620,10 +622,10 @@ function createSetupStore(e, t, r = {}, o, s, c) {
620
622
  $reset: i,
621
623
  $subscribe(g, b = {}) {
622
624
  const w = addSubscription(y, g, b.detached, () => V()), V = d.run(() => watch(() => o.state.value[e], (C) => {
623
- (b.flush === "sync" ? x : _) && g({
625
+ (b.flush === "sync" ? x : f) && g({
624
626
  storeId: e,
625
627
  type: MutationType.direct,
626
- events: f
628
+ events: _
627
629
  }, C);
628
630
  }, assign({}, l, b)));
629
631
  return w;
@@ -655,7 +657,7 @@ function createSetupStore(e, t, r = {}, o, s, c) {
655
657
  pinia: o,
656
658
  options: k
657
659
  })));
658
- }), a && c && r.hydrate && r.hydrate(h.$state, a), _ = !0, x = !0, h;
660
+ }), a && c && r.hydrate && r.hydrate(h.$state, a), f = !0, x = !0, h;
659
661
  }
660
662
  /*! #__NO_SIDE_EFFECTS__ */
661
663
  // @__NO_SIDE_EFFECTS__
@@ -694,30 +696,30 @@ const useGlobalStore = /* @__PURE__ */ defineStore("global", () => {
694
696
  return o.project.svg;
695
697
  });
696
698
  computed(() => {
697
- var u, f;
698
- const y = (f = (u = o.projectMeta) == null ? void 0 : u.find(
699
+ var u, _;
700
+ const y = (_ = (u = o.projectMeta) == null ? void 0 : u.find(
699
701
  (a) => (a == null ? void 0 : a.meta_key) === "project_img_contain"
700
- )) == null ? void 0 : f.meta_value;
702
+ )) == null ? void 0 : _.meta_value;
701
703
  return JSON.parse((y == null ? void 0 : y.toString()) || "false");
702
704
  });
703
- const _ = (y) => {
705
+ const f = (y) => {
704
706
  const u = y.target;
705
707
  u && (c.value = u);
706
708
  }, x = (y) => {
707
- var f, a, v;
709
+ var _, a, v;
708
710
  const u = y.target;
709
- (u == null ? void 0 : u.nodeName) === "path" && (((f = d.value) == null ? void 0 : f.conf) === "sold" || ((a = d.value) == null ? void 0 : a.conf) === "reserved" || r("changeComponent", ((v = k.value) == null ? void 0 : v.type) || "", d == null ? void 0 : d.value));
711
+ (u == null ? void 0 : u.nodeName) === "path" && (((_ = d.value) == null ? void 0 : _.conf) === "sold" || ((a = d.value) == null ? void 0 : a.conf) === "reserved" || r("changeComponent", ((v = k.value) == null ? void 0 : v.type) || "", d == null ? void 0 : d.value));
710
712
  };
711
713
  return watch(
712
714
  () => c.value,
713
715
  (y) => {
714
- var f, a, v, n, i, p, m;
716
+ var _, a, v, n, i, p, m;
715
717
  if (!y) return;
716
718
  s.hoverdSvg = y;
717
719
  const u = y.parentElement;
718
720
  if (u && (u == null ? void 0 : u.nodeName) === "g") {
719
721
  const $ = u == null ? void 0 : u.getAttribute("id");
720
- if (!$ || (k.value = ((f = o.project) == null ? void 0 : f.polygon_data.find((E) => (E == null ? void 0 : E.key) === $)) || null, !k.value)) return;
722
+ if (!$ || (k.value = ((_ = o.project) == null ? void 0 : _.polygon_data.find((E) => (E == null ? void 0 : E.key) === $)) || null, !k.value)) return;
721
723
  const h = (a = k.value) == null ? void 0 : a.id;
722
724
  switch ((v = k.value) == null ? void 0 : v.type) {
723
725
  case "floor":
@@ -752,10 +754,10 @@ const useGlobalStore = /* @__PURE__ */ defineStore("global", () => {
752
754
  k.value = null, d.value = null;
753
755
  }
754
756
  ), (y, u) => {
755
- var f;
757
+ var _;
756
758
  return openBlock(), createBlock(_sfc_main$g, {
757
759
  hoverdData: d.value,
758
- type: (f = k.value) == null ? void 0 : f.type
760
+ type: (_ = k.value) == null ? void 0 : _.type
759
761
  }, {
760
762
  default: withCtx(() => {
761
763
  var a, v, n, i, p, m;
@@ -776,7 +778,7 @@ const useGlobalStore = /* @__PURE__ */ defineStore("global", () => {
776
778
  "hover:[&_path]:ire-fill-[var(--path-hover-color)]": !((m = d.value) != null && m.conf)
777
779
  }
778
780
  ]]),
779
- onMouseover: _,
781
+ onMouseover: f,
780
782
  onClick: x
781
783
  }, null, 42, _hoisted_3$5))
782
784
  ])
@@ -872,7 +874,7 @@ const ArrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_ren
872
874
  },
873
875
  emits: ["changeComponent"],
874
876
  setup(e, { emit: t }) {
875
- const r = t, o = e, s = useGlobalStore(), c = ref(), d = ref(), k = ref(), l = ref(null), _ = ref(), x = ref(), y = computed$1(() => {
877
+ const r = t, o = e, s = useGlobalStore(), c = ref(), d = ref(), k = ref(), l = ref(null), f = ref(), x = ref(), y = computed$1(() => {
876
878
  var i;
877
879
  if ((i = o.floor) != null && i.svg)
878
880
  return o.floor.svg;
@@ -897,7 +899,7 @@ const ArrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_ren
897
899
  title: (($ = i == null ? void 0 : i.floor_number) == null ? void 0 : $.toString()) + " Floor" + (p != null && p.id ? ` - ${p == null ? void 0 : p.title}` : "") + (i != null && i.conf ? " " + i.conf : ""),
898
900
  value: i == null ? void 0 : i.id
899
901
  };
900
- }).sort((i, p) => +(i == null ? void 0 : i.title) - +(p == null ? void 0 : p.title)) || []), f = (i) => {
902
+ }).sort((i, p) => +(i == null ? void 0 : i.title) - +(p == null ? void 0 : p.title)) || []), _ = (i) => {
901
903
  const p = i.target;
902
904
  p && (d.value = p);
903
905
  }, a = (i) => {
@@ -957,11 +959,11 @@ const ArrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_ren
957
959
  k.value = null;
958
960
  }
959
961
  ), watch(
960
- () => _.value,
962
+ () => f.value,
961
963
  () => {
962
964
  var p;
963
965
  const i = (p = o.floors) == null ? void 0 : p.find(
964
- (m) => (m == null ? void 0 : m.id) === (_ == null ? void 0 : _.value)
966
+ (m) => (m == null ? void 0 : m.id) === (f == null ? void 0 : f.value)
965
967
  );
966
968
  i != null && i.conf || (i && r("changeComponent", "floor", i), setTimeout(() => {
967
969
  v();
@@ -974,7 +976,7 @@ const ArrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_ren
974
976
  var h, E;
975
977
  return ($ == null ? void 0 : $.id) === ((E = (h = o.floor) == null ? void 0 : h.block_id) == null ? void 0 : E.toString());
976
978
  }
977
- ), _.value = (m = (p = u.value) == null ? void 0 : p.find(
979
+ ), f.value = (m = (p = u.value) == null ? void 0 : p.find(
978
980
  ($) => {
979
981
  var h;
980
982
  return ($ == null ? void 0 : $.value) == ((h = o.floor) == null ? void 0 : h.id);
@@ -990,8 +992,8 @@ const ArrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_ren
990
992
  createVNode(_sfc_main$c, { onClick: n }),
991
993
  createElementVNode("div", _hoisted_1$8, [
992
994
  createVNode(_sfc_main$e, {
993
- modelValue: _.value,
994
- "onUpdate:modelValue": p[0] || (p[0] = ($) => _.value = $),
995
+ modelValue: f.value,
996
+ "onUpdate:modelValue": p[0] || (p[0] = ($) => f.value = $),
995
997
  data: u.value
996
998
  }, null, 8, ["modelValue", "data"])
997
999
  ])
@@ -1011,7 +1013,7 @@ const ArrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_ren
1011
1013
  innerHTML: y.value,
1012
1014
  key: y.value,
1013
1015
  class: "canvas ire-absolute ire-left-0 ire-top-0 ire-h-full ire-w-full [&_g[conf=reserved]_path]:ire-fill-[var(--reserved-color)] [&_g[conf=sold]_path]:ire-fill-[var(--sold-color)] [&_path]:ire-cursor-pointer [&_path]:ire-fill-[var(--path-color)] [&_path]:!ire-transition-all hover:[&_path]:ire-fill-[var(--path-hover-color)] [&_svg]:ire-h-full [&_svg]:ire-w-full",
1014
- onMouseover: f,
1016
+ onMouseover: _,
1015
1017
  onClick: a
1016
1018
  }, null, 40, _hoisted_4$3))
1017
1019
  ])
@@ -1092,15 +1094,15 @@ const Cube = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$1]
1092
1094
  emits: ["changeComponent"],
1093
1095
  setup(e, { emit: t }) {
1094
1096
  const r = t, o = e, s = ref(!0), c = ref(0), d = computed$1(() => {
1095
- var _, x, y, u, f, a;
1096
- const l = s.value ? (y = (x = (_ = o.flat) == null ? void 0 : _.type) == null ? void 0 : x.image_2d) == null ? void 0 : y.length : (a = (f = (u = o.flat) == null ? void 0 : u.type) == null ? void 0 : f.image_3d) == null ? void 0 : a.length;
1097
+ var f, x, y, u, _, a;
1098
+ const l = s.value ? (y = (x = (f = o.flat) == null ? void 0 : f.type) == null ? void 0 : x.image_2d) == null ? void 0 : y.length : (a = (_ = (u = o.flat) == null ? void 0 : u.type) == null ? void 0 : _.image_3d) == null ? void 0 : a.length;
1097
1099
  return ["I", "II", "III"].slice(0, l);
1098
1100
  }), k = () => {
1099
- var _;
1100
- const l = (_ = o.floors) == null ? void 0 : _.find(
1101
+ var f;
1102
+ const l = (f = o.floors) == null ? void 0 : f.find(
1101
1103
  (x) => {
1102
- var y, u, f, a, v, n;
1103
- return ((y = x.floor_number) == null ? void 0 : y.toString()) === ((f = (u = o.flat) == null ? void 0 : u.floor_number) == null ? void 0 : f.toString()) && ((a = o.flat) != null && a.block_id ? ((v = x == null ? void 0 : x.block_id) == null ? void 0 : v.toString()) === ((n = o.flat) == null ? void 0 : n.block_id) : !(x != null && x.block_id));
1104
+ var y, u, _, a, v, n;
1105
+ return ((y = x.floor_number) == null ? void 0 : y.toString()) === ((_ = (u = o.flat) == null ? void 0 : u.floor_number) == null ? void 0 : _.toString()) && ((a = o.flat) != null && a.block_id ? ((v = x == null ? void 0 : x.block_id) == null ? void 0 : v.toString()) === ((n = o.flat) == null ? void 0 : n.block_id) : !(x != null && x.block_id));
1104
1106
  }
1105
1107
  );
1106
1108
  l ? r("changeComponent", "floor", l) : r("changeComponent", "project", null);
@@ -1111,15 +1113,15 @@ const Cube = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$1]
1111
1113
  c.value = 0;
1112
1114
  }
1113
1115
  ), onMounted(() => {
1114
- var l, _;
1115
- (_ = (l = o.flat) == null ? void 0 : l.type) != null && _.image_2d || (s.value = !1);
1116
- }), (l, _) => (openBlock(), createElementBlock("div", null, [
1116
+ var l, f;
1117
+ (f = (l = o.flat) == null ? void 0 : l.type) != null && f.image_2d || (s.value = !1);
1118
+ }), (l, f) => (openBlock(), createElementBlock("div", null, [
1117
1119
  createVNode(_sfc_main$g, { "hoverd-data": null }, {
1118
1120
  header: withCtx(() => [
1119
1121
  createVNode(_sfc_main$c, { onClick: k })
1120
1122
  ]),
1121
1123
  default: withCtx(() => {
1122
- var x, y, u, f, a, v, n, i, p, m, $, h, E, S, g, b, w, V, C, D, R, L, N, B, P, O, A, I, F, H, W;
1124
+ var x, y, u, _, a, v, n, i, p, m, $, h, E, S, g, b, w, V, C, D, R, j, N, B, P, O, A, F, I, H, W;
1123
1125
  return [
1124
1126
  createElementVNode("div", _hoisted_1$5, [
1125
1127
  createElementVNode("div", _hoisted_2$3, [
@@ -1128,9 +1130,9 @@ const Cube = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$1]
1128
1130
  mode: "out-in"
1129
1131
  }, {
1130
1132
  default: withCtx(() => {
1131
- var j, M, T, z, X, Y, K, U, q, Z, J, Q, G, ee, te, oe, re, ie, se, le, ne, ae, ce, de;
1133
+ var M, L, T, z, X, Y, K, U, q, Z, J, Q, G, ee, te, oe, re, ie, se, le, ne, ae, ce, de;
1132
1134
  return [
1133
- s.value && ((z = (T = (M = (j = l.flat) == null ? void 0 : j.type) == null ? void 0 : M.image_2d) == null ? void 0 : T[c.value]) != null && z.url) ? (openBlock(), createElementBlock("img", {
1135
+ s.value && ((z = (T = (L = (M = l.flat) == null ? void 0 : M.type) == null ? void 0 : L.image_2d) == null ? void 0 : T[c.value]) != null && z.url) ? (openBlock(), createElementBlock("img", {
1134
1136
  key: (U = (K = (Y = (X = l.flat) == null ? void 0 : X.type) == null ? void 0 : Y.image_2d) == null ? void 0 : K[c.value]) == null ? void 0 : U.url,
1135
1137
  src: (Q = (J = (Z = (q = l.flat) == null ? void 0 : q.type) == null ? void 0 : Z.image_2d) == null ? void 0 : J[c.value]) == null ? void 0 : Q.url,
1136
1138
  class: "ire-h-full ire-w-full ire-object-contain ire-object-top lg:ire-h-96 lg:ire-w-96"
@@ -1145,10 +1147,10 @@ const Cube = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$1]
1145
1147
  }),
1146
1148
  createElementVNode("div", _hoisted_5, [
1147
1149
  createElementVNode("div", _hoisted_6, [
1148
- (f = (u = (y = (x = l.flat) == null ? void 0 : x.type) == null ? void 0 : y.image_2d) == null ? void 0 : u[0]) != null && f.url ? (openBlock(), createElementBlock("div", {
1150
+ (_ = (u = (y = (x = l.flat) == null ? void 0 : x.type) == null ? void 0 : y.image_2d) == null ? void 0 : u[0]) != null && _.url ? (openBlock(), createElementBlock("div", {
1149
1151
  key: 0,
1150
1152
  class: normalizeClass(["ire-group ire-flex ire-cursor-pointer ire-items-center ire-gap-2 ire-rounded-lg ire-p-3 !ire-text-xs ire-transition-all hover:ire-bg-primary", { "!ire-bg-primary !ire-text-white": s.value }]),
1151
- onClick: _[0] || (_[0] = (j) => s.value = !0)
1153
+ onClick: f[0] || (f[0] = (M) => s.value = !0)
1152
1154
  }, [
1153
1155
  createVNode(FlatIcon, {
1154
1156
  class: normalizeClass(["[&_path]:ire-stroke-black group-hover:[&_path]:ire-stroke-white", { "[&_path]:!ire-stroke-white": s.value }])
@@ -1163,7 +1165,7 @@ const Cube = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$1]
1163
1165
  (i = (n = (v = (a = l.flat) == null ? void 0 : a.type) == null ? void 0 : v.image_3d) == null ? void 0 : n[0]) != null && i.url ? (openBlock(), createElementBlock("div", {
1164
1166
  key: 1,
1165
1167
  class: normalizeClass(["ire-group ire-flex ire-cursor-pointer ire-items-center ire-gap-2 ire-rounded-lg ire-p-3 !ire-text-xs ire-transition-all hover:ire-bg-primary", { "!ire-bg-primary !ire-text-white": !s.value }]),
1166
- onClick: _[1] || (_[1] = (j) => s.value = !1)
1168
+ onClick: f[1] || (f[1] = (M) => s.value = !1)
1167
1169
  }, [
1168
1170
  createElementVNode("div", null, [
1169
1171
  createVNode(Cube, {
@@ -1179,20 +1181,20 @@ const Cube = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$1]
1179
1181
  ], 2)) : createCommentVNode("", !0)
1180
1182
  ]),
1181
1183
  ((p = d.value) == null ? void 0 : p.length) > 1 ? (openBlock(), createElementBlock("div", _hoisted_7, [
1182
- (openBlock(!0), createElementBlock(Fragment, null, renderList(d.value, (j, M) => (openBlock(), createElementBlock("div", {
1183
- key: j,
1184
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(d.value, (M, L) => (openBlock(), createElementBlock("div", {
1185
+ key: M,
1184
1186
  class: normalizeClass(["ire-flex ire-h-10 ire-w-10 ire-cursor-pointer ire-items-center ire-justify-center ire-rounded-lg ire-p-2 ire-transition-all hover:ire-bg-black hover:ire-text-white", {
1185
- "ire-bg-black ire-text-white": c.value === M
1187
+ "ire-bg-black ire-text-white": c.value === L
1186
1188
  }]),
1187
- onClick: (T) => c.value = M
1188
- }, toDisplayString(j), 11, _hoisted_8))), 128))
1189
+ onClick: (T) => c.value = L
1190
+ }, toDisplayString(M), 11, _hoisted_8))), 128))
1189
1191
  ])) : createCommentVNode("", !0)
1190
1192
  ])
1191
1193
  ]),
1192
1194
  createElementVNode("div", _hoisted_9, [
1193
1195
  createElementVNode("div", _hoisted_10, [
1194
1196
  createElementVNode("div", _hoisted_11, toDisplayString((m = l.flat) == null ? void 0 : m.flat_number), 1),
1195
- _[2] || (_[2] = createElementVNode("div", { class: "!ire-text-xs ire-text-gray-600" }, "Apartment", -1))
1197
+ f[2] || (f[2] = createElementVNode("div", { class: "!ire-text-xs ire-text-gray-600" }, "Apartment", -1))
1196
1198
  ]),
1197
1199
  (h = ($ = l.flat) == null ? void 0 : $.type) != null && h.title || (S = (E = l.flat) == null ? void 0 : E.type) != null && S.teaser ? (openBlock(), createElementBlock("div", _hoisted_12, [
1198
1200
  createElementVNode("div", _hoisted_13, toDisplayString((b = (g = l.flat) == null ? void 0 : g.type) == null ? void 0 : b.title), 1),
@@ -1201,37 +1203,37 @@ const Cube = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$1]
1201
1203
  createElementVNode("div", _hoisted_15, [
1202
1204
  (C = l.flat) != null && C.floor_number ? (openBlock(), createElementBlock("div", _hoisted_16, [
1203
1205
  createElementVNode("div", _hoisted_17, toDisplayString((D = l.flat) == null ? void 0 : D.floor_number), 1),
1204
- _[3] || (_[3] = createElementVNode("div", { class: "!ire-text-xs ire-text-gray-600" }, "Floor", -1))
1206
+ f[3] || (f[3] = createElementVNode("div", { class: "!ire-text-xs ire-text-gray-600" }, "Floor", -1))
1205
1207
  ])) : createCommentVNode("", !0),
1206
- (L = (R = l.flat) == null ? void 0 : R.type) != null && L.rooms_count ? (openBlock(), createElementBlock("div", _hoisted_18, [
1208
+ (j = (R = l.flat) == null ? void 0 : R.type) != null && j.rooms_count ? (openBlock(), createElementBlock("div", _hoisted_18, [
1207
1209
  createElementVNode("div", _hoisted_19, toDisplayString((N = l.flat) == null ? void 0 : N.type.rooms_count), 1),
1208
- _[4] || (_[4] = createElementVNode("div", { class: "!ire-text-xs ire-text-gray-600" }, "Room", -1))
1210
+ f[4] || (f[4] = createElementVNode("div", { class: "!ire-text-xs ire-text-gray-600" }, "Room", -1))
1209
1211
  ])) : createCommentVNode("", !0)
1210
1212
  ]),
1211
1213
  (P = (B = l.flat) == null ? void 0 : B.type) != null && P.area_m2 ? (openBlock(), createElementBlock("div", _hoisted_20, [
1212
1214
  createElementVNode("div", _hoisted_21, [
1213
1215
  createTextVNode(toDisplayString((O = l.flat) == null ? void 0 : O.type.area_m2) + " ", 1),
1214
- _[5] || (_[5] = createElementVNode("span", { class: "ire-font-light" }, [
1216
+ f[5] || (f[5] = createElementVNode("span", { class: "ire-font-light" }, [
1215
1217
  createTextVNode(" M "),
1216
1218
  createElementVNode("sup", { class: "ire-inline-block -ire-translate-x-1 !ire-text-sm" }, " 2 ")
1217
1219
  ], -1))
1218
1220
  ]),
1219
- _[6] || (_[6] = createElementVNode("div", { class: "!ire-text-xs ire-text-gray-600" }, "Area", -1))
1221
+ f[6] || (f[6] = createElementVNode("div", { class: "!ire-text-xs ire-text-gray-600" }, "Area", -1))
1220
1222
  ])) : createCommentVNode("", !0),
1221
1223
  (A = l.flat) != null && A.price ? (openBlock(), createElementBlock("div", _hoisted_22, [
1222
1224
  createElementVNode("div", null, [
1223
- (I = l.flat) != null && I.offer_price ? (openBlock(), createElementBlock("div", _hoisted_24, [
1224
- createElementVNode("div", _hoisted_25, toDisplayString(Number((H = l.flat) == null ? void 0 : H.price).toLocaleString()), 1),
1225
+ (F = l.flat) != null && F.offer_price ? (openBlock(), createElementBlock("div", _hoisted_24, [
1226
+ createElementVNode("div", _hoisted_25, toDisplayString(Number((H = l.flat) == null ? void 0 : H.price).toLocaleString("fr-FR")), 1),
1225
1227
  createElementVNode("div", _hoisted_26, [
1226
- createTextVNode(toDisplayString(Number((W = l.flat) == null ? void 0 : W.offer_price).toLocaleString()) + " ", 1),
1227
- _[8] || (_[8] = createElementVNode("span", { class: "!ire-text-md ire-ml-1" }, "$", -1))
1228
+ createTextVNode(toDisplayString(Number((W = l.flat) == null ? void 0 : W.offer_price).toLocaleString("fr-FR")) + " ", 1),
1229
+ f[8] || (f[8] = createElementVNode("span", { class: "!ire-text-md ire-ml-1" }, "$", -1))
1228
1230
  ])
1229
1231
  ])) : (openBlock(), createElementBlock("div", _hoisted_23, [
1230
- createTextVNode(toDisplayString(Number((F = l.flat) == null ? void 0 : F.price).toLocaleString()) + " ", 1),
1231
- _[7] || (_[7] = createElementVNode("sup", { class: "!ire-text-sm" }, "$", -1))
1232
+ createTextVNode(toDisplayString(Number((I = l.flat) == null ? void 0 : I.price).toLocaleString("fr-FR")) + " ", 1),
1233
+ f[7] || (f[7] = createElementVNode("sup", { class: "!ire-text-sm" }, "$", -1))
1232
1234
  ]))
1233
1235
  ]),
1234
- _[9] || (_[9] = createElementVNode("div", { class: "!ire-text-xs ire-text-gray-600" }, "Price", -1))
1236
+ f[9] || (f[9] = createElementVNode("div", { class: "!ire-text-xs ire-text-gray-600" }, "Price", -1))
1235
1237
  ])) : createCommentVNode("", !0)
1236
1238
  ])
1237
1239
  ])
@@ -1296,15 +1298,15 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
1296
1298
  },
1297
1299
  setup(e) {
1298
1300
  return (t, r) => {
1299
- var o, s, c, d, k, l, _, x, y, u, f, a;
1301
+ var o, s, c, d, k, l, f, x, y, u, _, a;
1300
1302
  return openBlock(), createElementBlock("div", null, [
1301
1303
  createElementVNode("p", _hoisted_1$1, toDisplayString((s = (o = t.modalData) == null ? void 0 : o.modalObject) == null ? void 0 : s.title), 1),
1302
1304
  createVNode(_sfc_main$5, {
1303
1305
  editor: (d = (c = t.modalData) == null ? void 0 : c.modalObject) == null ? void 0 : d.description
1304
1306
  }, null, 8, ["editor"]),
1305
- (x = (_ = (l = (k = t.modalData) == null ? void 0 : k.modalObject) == null ? void 0 : l.modalImage) == null ? void 0 : _[0]) != null && x.url ? (openBlock(), createElementBlock("img", {
1307
+ (x = (f = (l = (k = t.modalData) == null ? void 0 : k.modalObject) == null ? void 0 : l.modalImage) == null ? void 0 : f[0]) != null && x.url ? (openBlock(), createElementBlock("img", {
1306
1308
  key: 0,
1307
- src: (a = (f = (u = (y = t.modalData) == null ? void 0 : y.modalObject) == null ? void 0 : u.modalImage) == null ? void 0 : f[0]) == null ? void 0 : a.url,
1309
+ src: (a = (_ = (u = (y = t.modalData) == null ? void 0 : y.modalObject) == null ? void 0 : u.modalImage) == null ? void 0 : _[0]) == null ? void 0 : a.url,
1308
1310
  alt: "",
1309
1311
  class: "ire-mt-5 ire-h-[400px] ire-w-full ire-object-contain"
1310
1312
  }, null, 8, _hoisted_2$1)) : createCommentVNode("", !0)
@@ -1321,17 +1323,17 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
1321
1323
  },
1322
1324
  emits: ["changeComponent"],
1323
1325
  setup(e, { emit: t }) {
1324
- const r = t, o = e, s = useGlobalStore(), c = ref(), d = ref(), k = ref(), l = ref(), _ = computed$1(() => {
1325
- var u, f;
1326
+ const r = t, o = e, s = useGlobalStore(), c = ref(), d = ref(), k = ref(), l = ref(), f = computed$1(() => {
1327
+ var u, _;
1326
1328
  if ((u = o.block) != null && u.svg)
1327
- return (f = o.block) == null ? void 0 : f.svg;
1329
+ return (_ = o.block) == null ? void 0 : _.svg;
1328
1330
  }), x = (u) => {
1329
- const f = u.target;
1330
- f && (d.value = f);
1331
+ const _ = u.target;
1332
+ _ && (d.value = _);
1331
1333
  }, y = (u) => {
1332
1334
  var a, v, n;
1333
- const f = u.target;
1334
- (f == null ? void 0 : f.nodeName) === "path" && (((a = l.value) == null ? void 0 : a.conf) === "sold" || ((v = l.value) == null ? void 0 : v.conf) === "reserved" || r(
1335
+ const _ = u.target;
1336
+ (_ == null ? void 0 : _.nodeName) === "path" && (((a = l.value) == null ? void 0 : a.conf) === "sold" || ((v = l.value) == null ? void 0 : v.conf) === "reserved" || r(
1335
1337
  "changeComponent",
1336
1338
  ((n = k.value) == null ? void 0 : n.type) || "",
1337
1339
  l.value
@@ -1343,9 +1345,9 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
1343
1345
  var a, v, n, i, p, m, $, h;
1344
1346
  if (!u) return;
1345
1347
  s.hoverdSvg = u;
1346
- const f = u == null ? void 0 : u.parentElement;
1347
- if (f && (f == null ? void 0 : f.nodeName) === "g") {
1348
- const E = f == null ? void 0 : f.getAttribute("id");
1348
+ const _ = u == null ? void 0 : u.parentElement;
1349
+ if (_ && (_ == null ? void 0 : _.nodeName) === "g") {
1350
+ const E = _ == null ? void 0 : _.getAttribute("id");
1349
1351
  if (!E || (k.value = ((v = (a = o.block) == null ? void 0 : a.polygon_data) == null ? void 0 : v.find((S) => (S == null ? void 0 : S.key) === E)) || null, !k.value)) return;
1350
1352
  if (((n = k.value) == null ? void 0 : n.type) === "floor") {
1351
1353
  const S = (i = o.floors) == null ? void 0 : i.find(
@@ -1376,7 +1378,7 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
1376
1378
  } else
1377
1379
  k.value = null, l.value = null;
1378
1380
  }
1379
- ), (u, f) => {
1381
+ ), (u, _) => {
1380
1382
  var a;
1381
1383
  return openBlock(), createBlock(_sfc_main$g, {
1382
1384
  hoverdData: l.value,
@@ -1386,7 +1388,7 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
1386
1388
  var v;
1387
1389
  return [
1388
1390
  createVNode(_sfc_main$c, {
1389
- onClick: f[0] || (f[0] = (n) => u.$emit("changeComponent", "project", null))
1391
+ onClick: _[0] || (_[0] = (n) => u.$emit("changeComponent", "project", null))
1390
1392
  }),
1391
1393
  createElementVNode("p", _hoisted_1, toDisplayString((v = u.block) == null ? void 0 : v.title), 1)
1392
1394
  ];
@@ -1403,8 +1405,8 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
1403
1405
  (openBlock(), createElementBlock("div", {
1404
1406
  ref_key: "svgRef",
1405
1407
  ref: c,
1406
- innerHTML: _.value,
1407
- key: _.value,
1408
+ innerHTML: f.value,
1409
+ key: f.value,
1408
1410
  class: normalizeClass(["canvas ire-absolute ire-left-0 ire-top-0 ire-h-full ire-w-full [&_path]:ire-cursor-pointer [&_path]:ire-fill-[var(--path-color)] [&_path]:ire-transition-all [&_svg]:ire-h-full [&_svg]:ire-w-full", [
1409
1411
  {
1410
1412
  "hover:[&_path]:ire-fill-[var(--reserved-color)]": ((p = l.value) == null ? void 0 : p.conf) === "reserved",
@@ -1433,12 +1435,12 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
1433
1435
  d.style.opacity = "1";
1434
1436
  const {
1435
1437
  bottom: l,
1436
- height: _,
1438
+ height: f,
1437
1439
  left: x,
1438
1440
  right: y,
1439
1441
  top: u,
1440
- width: f
1441
- } = s.value.getBoundingClientRect(), { bottom: a, left: v } = k.getBoundingClientRect(), { height: n, width: i } = d.getBoundingClientRect(), p = y - f / 2, m = l - _ / 2, $ = v > p, h = a > m;
1442
+ width: _
1443
+ } = s.value.getBoundingClientRect(), { bottom: a, left: v } = k.getBoundingClientRect(), { height: n, width: i } = d.getBoundingClientRect(), p = y - _ / 2, m = l - f / 2, $ = v > p, h = a > m;
1442
1444
  r.value = c.clientX - x - ($ ? i : -20), o.value = c.clientY - u - (h ? n : -20);
1443
1445
  }), provide("mouseX", r), provide("mouseY", o), (c, d) => (openBlock(), createElementBlock("div", {
1444
1446
  ref_key: "canvasRef",
@@ -1453,7 +1455,7 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
1453
1455
  shortcodeDataProps: {}
1454
1456
  },
1455
1457
  setup(__props) {
1456
- var e, t, r, o, s, c, d, k, l, _, x, y, u, f;
1458
+ var e, t, r, o, s, c, d, k, l, f, x, y, u, _;
1457
1459
  const props = __props, getMeta = (a) => props.shortcodeDataProps.meta.find(
1458
1460
  (v) => v.meta_key === a
1459
1461
  ), constants = ref({
@@ -1467,11 +1469,11 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
1467
1469
  }), colors = reactive({
1468
1470
  path: (k = constants.value) == null ? void 0 : k.PREVIEW_PATH_COLOR,
1469
1471
  path_hover: (l = constants.value) == null ? void 0 : l.PREVIEW_PATH_HOVER_COLOR,
1470
- reserved: (_ = constants.value) == null ? void 0 : _.PREVIEW_RESERVED_COLOR,
1472
+ reserved: (f = constants.value) == null ? void 0 : f.PREVIEW_RESERVED_COLOR,
1471
1473
  sold: (x = constants.value) == null ? void 0 : x.PREVIEW_SOLD_COLOR,
1472
1474
  stroke_color: (y = constants.value) == null ? void 0 : y.PREVIEW_STROKE_COLOR,
1473
1475
  stroke_width: (u = constants.value) == null ? void 0 : u.PREVIEW_STROKE_WIDTH,
1474
- border_radius: (f = constants.value) == null ? void 0 : f.PREVIEW_BORDER_RADIUS
1476
+ border_radius: (_ = constants.value) == null ? void 0 : _.PREVIEW_BORDER_RADIUS
1475
1477
  }), cssVariables = computed$1(() => ({
1476
1478
  "--reserved-color": colors.reserved,
1477
1479
  "--sold-color": colors.sold,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ire-preview",
3
- "version": "2.2.5",
3
+ "version": "2.2.7",
4
4
  "type": "module",
5
5
  "emitDeclarationOnly": true,
6
6
  "declaration": true,