ire-preview 3.2.57 → 3.2.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib.es.js +954 -946
- package/package.json +1 -1
package/dist/lib.es.js
CHANGED
|
@@ -75,41 +75,41 @@ function isComputed(Be) {
|
|
|
75
75
|
}
|
|
76
76
|
function createOptionsStore(Be, _e, ke, $e) {
|
|
77
77
|
const { state: Ne, actions: Ve, getters: De } = _e, Le = ke.state.value[Be];
|
|
78
|
-
let
|
|
78
|
+
let Re;
|
|
79
79
|
function Ie() {
|
|
80
80
|
Le || (ke.state.value[Be] = Ne ? Ne() : {});
|
|
81
|
-
const
|
|
82
|
-
return assign(
|
|
81
|
+
const Ae = toRefs(ke.state.value[Be]);
|
|
82
|
+
return assign(Ae, Ve, Object.keys(De || {}).reduce((ze, je) => (ze[je] = markRaw(computed$1(() => {
|
|
83
83
|
setActivePinia(ke);
|
|
84
84
|
const Fe = ke._s.get(Be);
|
|
85
85
|
return De[je].call(Fe, Fe);
|
|
86
86
|
})), ze), {}));
|
|
87
87
|
}
|
|
88
|
-
return
|
|
88
|
+
return Re = createSetupStore(Be, Ie, _e, ke, $e, !0), Re;
|
|
89
89
|
}
|
|
90
90
|
function createSetupStore(Be, _e, ke = {}, $e, Ne, Ve) {
|
|
91
91
|
let De;
|
|
92
|
-
const Le = assign({ actions: {} }, ke),
|
|
93
|
-
let Ie,
|
|
94
|
-
const
|
|
95
|
-
!Ve && !
|
|
96
|
-
let
|
|
97
|
-
function qe(
|
|
92
|
+
const Le = assign({ actions: {} }, ke), Re = { deep: !0 };
|
|
93
|
+
let Ie, Ae, ze = /* @__PURE__ */ new Set(), je = /* @__PURE__ */ new Set(), Fe;
|
|
94
|
+
const We = $e.state.value[Be];
|
|
95
|
+
!Ve && !We && ($e.state.value[Be] = {}), ref({});
|
|
96
|
+
let He;
|
|
97
|
+
function qe(Ke) {
|
|
98
98
|
let Ye;
|
|
99
|
-
Ie =
|
|
99
|
+
Ie = Ae = !1, typeof Ke == "function" ? (Ke($e.state.value[Be]), Ye = {
|
|
100
100
|
type: MutationType.patchFunction,
|
|
101
101
|
storeId: Be,
|
|
102
102
|
events: Fe
|
|
103
|
-
}) : (mergeReactiveObjects($e.state.value[Be],
|
|
103
|
+
}) : (mergeReactiveObjects($e.state.value[Be], Ke), Ye = {
|
|
104
104
|
type: MutationType.patchObject,
|
|
105
|
-
payload:
|
|
105
|
+
payload: Ke,
|
|
106
106
|
storeId: Be,
|
|
107
107
|
events: Fe
|
|
108
108
|
});
|
|
109
|
-
const Ge =
|
|
109
|
+
const Ge = He = Symbol();
|
|
110
110
|
nextTick().then(() => {
|
|
111
|
-
|
|
112
|
-
}),
|
|
111
|
+
He === Ge && (Ie = !0);
|
|
112
|
+
}), Ae = !0, triggerSubscriptions(ze, Ye, $e.state.value[Be]);
|
|
113
113
|
}
|
|
114
114
|
const Ue = Ve ? function() {
|
|
115
115
|
const { state: Ye } = ke, Ge = Ye ? Ye() : {};
|
|
@@ -123,9 +123,9 @@ function createSetupStore(Be, _e, ke = {}, $e, Ne, Ve) {
|
|
|
123
123
|
function Xe() {
|
|
124
124
|
De.stop(), ze.clear(), je.clear(), $e._s.delete(Be);
|
|
125
125
|
}
|
|
126
|
-
const
|
|
127
|
-
if (ACTION_MARKER in
|
|
128
|
-
return
|
|
126
|
+
const Je = (Ke, Ye = "") => {
|
|
127
|
+
if (ACTION_MARKER in Ke)
|
|
128
|
+
return Ke[ACTION_NAME] = Ye, Ke;
|
|
129
129
|
const Ge = function() {
|
|
130
130
|
setActivePinia($e);
|
|
131
131
|
const ei = Array.from(arguments), ti = /* @__PURE__ */ new Set(), ni = /* @__PURE__ */ new Set();
|
|
@@ -144,7 +144,7 @@ function createSetupStore(Be, _e, ke = {}, $e, Ne, Ve) {
|
|
|
144
144
|
});
|
|
145
145
|
let si;
|
|
146
146
|
try {
|
|
147
|
-
si =
|
|
147
|
+
si = Ke.apply(this && this.$id === Be ? this : Qe, ei);
|
|
148
148
|
} catch (li) {
|
|
149
149
|
throw triggerSubscriptions(ni, li), li;
|
|
150
150
|
}
|
|
@@ -158,44 +158,44 @@ function createSetupStore(Be, _e, ke = {}, $e, Ne, Ve) {
|
|
|
158
158
|
$onAction: addSubscription.bind(null, je),
|
|
159
159
|
$patch: qe,
|
|
160
160
|
$reset: Ue,
|
|
161
|
-
$subscribe(
|
|
162
|
-
const Ge = addSubscription(ze,
|
|
163
|
-
(Ye.flush === "sync" ?
|
|
161
|
+
$subscribe(Ke, Ye = {}) {
|
|
162
|
+
const Ge = addSubscription(ze, Ke, Ye.detached, () => ei()), ei = De.run(() => watch(() => $e.state.value[Be], (ti) => {
|
|
163
|
+
(Ye.flush === "sync" ? Ae : Ie) && Ke({
|
|
164
164
|
storeId: Be,
|
|
165
165
|
type: MutationType.direct,
|
|
166
166
|
events: Fe
|
|
167
167
|
}, ti);
|
|
168
|
-
}, assign({},
|
|
168
|
+
}, assign({}, Re, Ye)));
|
|
169
169
|
return Ge;
|
|
170
170
|
},
|
|
171
171
|
$dispose: Xe
|
|
172
172
|
}, Qe = reactive(Ze);
|
|
173
173
|
$e._s.set(Be, Qe);
|
|
174
|
-
const
|
|
175
|
-
for (const
|
|
176
|
-
const Ye =
|
|
174
|
+
const ii = ($e._a && $e._a.runWithContext || fallbackRunWithContext)(() => $e._e.run(() => (De = effectScope()).run(() => _e({ action: Je }))));
|
|
175
|
+
for (const Ke in ii) {
|
|
176
|
+
const Ye = ii[Ke];
|
|
177
177
|
if (isRef(Ye) && !isComputed(Ye) || isReactive(Ye))
|
|
178
|
-
Ve || (
|
|
178
|
+
Ve || (We && shouldHydrate(Ye) && (isRef(Ye) ? Ye.value = We[Ke] : mergeReactiveObjects(Ye, We[Ke])), $e.state.value[Be][Ke] = Ye);
|
|
179
179
|
else if (typeof Ye == "function") {
|
|
180
|
-
const Ge =
|
|
181
|
-
|
|
180
|
+
const Ge = Je(Ye, Ke);
|
|
181
|
+
ii[Ke] = Ge, Le.actions[Ke] = Ye;
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
|
-
return assign(Qe,
|
|
184
|
+
return assign(Qe, ii), assign(toRaw(Qe), ii), Object.defineProperty(Qe, "$state", {
|
|
185
185
|
get: () => $e.state.value[Be],
|
|
186
|
-
set: (
|
|
186
|
+
set: (Ke) => {
|
|
187
187
|
qe((Ye) => {
|
|
188
|
-
assign(Ye,
|
|
188
|
+
assign(Ye, Ke);
|
|
189
189
|
});
|
|
190
190
|
}
|
|
191
|
-
}), $e._p.forEach((
|
|
192
|
-
assign(Qe, De.run(() =>
|
|
191
|
+
}), $e._p.forEach((Ke) => {
|
|
192
|
+
assign(Qe, De.run(() => Ke({
|
|
193
193
|
store: Qe,
|
|
194
194
|
app: $e._a,
|
|
195
195
|
pinia: $e,
|
|
196
196
|
options: Le
|
|
197
197
|
})));
|
|
198
|
-
}),
|
|
198
|
+
}), We && Ve && ke.hydrate && ke.hydrate(Qe.$state, We), Ie = !0, Ae = !0, Qe;
|
|
199
199
|
}
|
|
200
200
|
/*! #__NO_SIDE_EFFECTS__ */
|
|
201
201
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -204,10 +204,10 @@ function defineStore(Be, _e, ke) {
|
|
|
204
204
|
const Ne = typeof _e == "function";
|
|
205
205
|
$e = Ne ? ke : _e;
|
|
206
206
|
function Ve(De, Le) {
|
|
207
|
-
const
|
|
207
|
+
const Re = hasInjectionContext();
|
|
208
208
|
return De = // in test mode, ignore the argument provided as we can always retrieve a
|
|
209
209
|
// pinia instance with getActivePinia()
|
|
210
|
-
De || (
|
|
210
|
+
De || (Re ? inject(piniaSymbol, null) : null), De && setActivePinia(De), De = activePinia, De._s.has(Be) || (Ne ? createSetupStore(Be, _e, $e, De) : createOptionsStore(Be, $e, De)), De._s.get(Be);
|
|
211
211
|
}
|
|
212
212
|
return Ve.$id = Be, Ve;
|
|
213
213
|
}
|
|
@@ -227,10 +227,10 @@ function storeToRefs(Be) {
|
|
|
227
227
|
return ke;
|
|
228
228
|
}
|
|
229
229
|
const useGlobalStore = /* @__PURE__ */ defineStore("global", () => {
|
|
230
|
-
var qe, Ue, Xe,
|
|
231
|
-
const Be = ref(), _e = ref("1"), ke = ref(), $e = ref(), Ne = (
|
|
230
|
+
var qe, Ue, Xe, Je, Ze, Qe, oi, ii;
|
|
231
|
+
const Be = ref(), _e = ref("1"), ke = ref(), $e = ref(), Ne = (Ke) => {
|
|
232
232
|
var Ye, Ge, ei;
|
|
233
|
-
return ((ei = (Ge = (Ye = ke.value) == null ? void 0 : Ye.meta) == null ? void 0 : Ge.find((ti) => (ti == null ? void 0 : ti.meta_key) ===
|
|
233
|
+
return ((ei = (Ge = (Ye = ke.value) == null ? void 0 : Ye.meta) == null ? void 0 : Ge.find((ti) => (ti == null ? void 0 : ti.meta_key) === Ke)) == null ? void 0 : ei.meta_value) || null;
|
|
234
234
|
}, Ve = ref({
|
|
235
235
|
PREVIEW_PATH_COLOR: Ne("path_color") || "rgba(255, 255, 255, 0.3)",
|
|
236
236
|
PREVIEW_PATH_HOVER_COLOR: Ne("path_hover_color") || "rgba(250, 250, 250, 0.54)",
|
|
@@ -244,21 +244,21 @@ const useGlobalStore = /* @__PURE__ */ defineStore("global", () => {
|
|
|
244
244
|
path: (qe = Ve.value) == null ? void 0 : qe.PREVIEW_PATH_COLOR,
|
|
245
245
|
path_hover: (Ue = Ve.value) == null ? void 0 : Ue.PREVIEW_PATH_HOVER_COLOR,
|
|
246
246
|
reserved: (Xe = Ve.value) == null ? void 0 : Xe.PREVIEW_RESERVED_COLOR,
|
|
247
|
-
sold: (
|
|
247
|
+
sold: (Je = Ve.value) == null ? void 0 : Je.PREVIEW_SOLD_COLOR,
|
|
248
248
|
stroke_color: (Ze = Ve.value) == null ? void 0 : Ze.PREVIEW_STROKE_COLOR,
|
|
249
249
|
primary_color: (Qe = Ve.value) == null ? void 0 : Qe.PREVIEW_PRIMARY_COLOR,
|
|
250
|
-
stroke_width: (
|
|
251
|
-
border_radius: (
|
|
250
|
+
stroke_width: (oi = Ve.value) == null ? void 0 : oi.PREVIEW_STROKE_WIDTH,
|
|
251
|
+
border_radius: (ii = Ve.value) == null ? void 0 : ii.PREVIEW_BORDER_RADIUS
|
|
252
252
|
}), Le = computed$1(() => {
|
|
253
|
-
var
|
|
254
|
-
return (Ye = (
|
|
253
|
+
var Ke, Ye;
|
|
254
|
+
return (Ye = (Ke = ke.value) == null ? void 0 : Ke.flats) == null ? void 0 : Ye.map((Ge) => {
|
|
255
255
|
var ti, ni;
|
|
256
256
|
const ei = Ge != null && Ge.use_type || !(Ge != null && Ge.type) ? ((ni = (ti = ke.value) == null ? void 0 : ti.types) == null ? void 0 : ni.find((ri) => ri.id === (Ge == null ? void 0 : Ge.type_id))) ?? (Ge == null ? void 0 : Ge.type) : Ge == null ? void 0 : Ge.type;
|
|
257
257
|
return { ...Ge, type: ei };
|
|
258
258
|
});
|
|
259
|
-
}),
|
|
260
|
-
var
|
|
261
|
-
return (
|
|
259
|
+
}), Re = computed$1(() => Ne("open_reserved_flat") === "true"), Ie = computed$1(() => Ne("open_sold_flat") === "true"), Ae = computed$1(() => Ne("price_rounded") === "true"), ze = computed$1(() => {
|
|
260
|
+
var Ke;
|
|
261
|
+
return (Ke = $e.value) == null ? void 0 : Ke.translations;
|
|
262
262
|
}), je = computed$1(() => ({
|
|
263
263
|
"--reserved-color": De.reserved,
|
|
264
264
|
"--sold-color": De.sold,
|
|
@@ -269,10 +269,10 @@ const useGlobalStore = /* @__PURE__ */ defineStore("global", () => {
|
|
|
269
269
|
"--stroke-width": De.stroke_width + "px",
|
|
270
270
|
"--border-radius": De.border_radius + "px"
|
|
271
271
|
})), Fe = computed$1(() => {
|
|
272
|
-
const
|
|
273
|
-
return (Array.isArray(
|
|
272
|
+
const Ke = Ne("custom_types");
|
|
273
|
+
return (Array.isArray(Ke) ? Ke : typeof Ke == "string" ? (() => {
|
|
274
274
|
try {
|
|
275
|
-
return JSON.parse(
|
|
275
|
+
return JSON.parse(Ke) ?? [];
|
|
276
276
|
} catch {
|
|
277
277
|
return [];
|
|
278
278
|
}
|
|
@@ -283,19 +283,19 @@ const useGlobalStore = /* @__PURE__ */ defineStore("global", () => {
|
|
|
283
283
|
)}"] path { fill: ${(Ge == null ? void 0 : Ge.type_color) || "var(--path-color)"}; }`
|
|
284
284
|
).join(`
|
|
285
285
|
`);
|
|
286
|
-
}),
|
|
287
|
-
ke.value =
|
|
288
|
-
},
|
|
289
|
-
$e.value =
|
|
286
|
+
}), We = (Ke) => {
|
|
287
|
+
ke.value = Ke;
|
|
288
|
+
}, He = (Ke) => {
|
|
289
|
+
$e.value = Ke;
|
|
290
290
|
};
|
|
291
291
|
return watch(
|
|
292
292
|
() => {
|
|
293
|
-
var
|
|
294
|
-
return (
|
|
293
|
+
var Ke;
|
|
294
|
+
return (Ke = ke.value) == null ? void 0 : Ke.meta;
|
|
295
295
|
},
|
|
296
296
|
() => {
|
|
297
|
-
const
|
|
298
|
-
|
|
297
|
+
const Ke = Ne("path_color"), Ye = Ne("path_hover_color"), Ge = Ne("reserved_color"), ei = Ne("sold_color"), ti = Ne("stroke_color"), ni = Ne("primary_color"), ri = Ne("stroke_width"), ai = Ne("border_radius");
|
|
298
|
+
Ke && (De.path = Ke.toString()), Ye && (De.path_hover = Ye.toString()), Ge && (De.reserved = Ge.toString()), ei && (De.sold = ei.toString()), ti && (De.stroke_color = ti.toString()), ti && (De.stroke_color = ti.toString()), ni && (De.primary_color = ni.toString()), De.stroke_width = Number(ri) || 1, De.border_radius = Number(ai) || 0;
|
|
299
299
|
},
|
|
300
300
|
{ deep: !0 }
|
|
301
301
|
), {
|
|
@@ -307,15 +307,15 @@ const useGlobalStore = /* @__PURE__ */ defineStore("global", () => {
|
|
|
307
307
|
// Geters
|
|
308
308
|
flats: Le,
|
|
309
309
|
getMetaValue: Ne,
|
|
310
|
-
openReservedFlat:
|
|
310
|
+
openReservedFlat: Re,
|
|
311
311
|
openSoldFlat: Ie,
|
|
312
|
-
priceRounded:
|
|
312
|
+
priceRounded: Ae,
|
|
313
313
|
translations: ze,
|
|
314
314
|
cssVariables: je,
|
|
315
315
|
customTypesPathCss: Fe,
|
|
316
316
|
// Mutation
|
|
317
|
-
setData:
|
|
318
|
-
setIrePlaginWp:
|
|
317
|
+
setData: We,
|
|
318
|
+
setIrePlaginWp: He
|
|
319
319
|
};
|
|
320
320
|
}), _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
321
321
|
__name: "ShortcodeWrapper",
|
|
@@ -688,7 +688,7 @@ const tr = (Be) => {
|
|
|
688
688
|
return ($e, Ne) => (openBlock(), createElementBlock("div", null, [
|
|
689
689
|
createVNode(Transition, { name: "ire-fade-in-out" }, {
|
|
690
690
|
default: withCtx(() => {
|
|
691
|
-
var Ve, De, Le,
|
|
691
|
+
var Ve, De, Le, Re, Ie, Ae, ze, je, Fe, We, He, qe, Ue, Xe, Je, Ze, Qe, oi, ii, Ke, Ye, Ge, ei, ti, ni, ri;
|
|
692
692
|
return [
|
|
693
693
|
Be.type && Be.hoveredData && Be.type !== "tooltip" ? (openBlock(), createElementBlock("div", _hoisted_1$G, [
|
|
694
694
|
Be.type === "floor" ? (openBlock(), createElementBlock("div", _hoisted_2$n, [
|
|
@@ -696,18 +696,18 @@ const tr = (Be) => {
|
|
|
696
696
|
createElementVNode("div", _hoisted_4$f, toDisplayString((Ve = Be.hoveredData) == null ? void 0 : Ve.floor_number), 1),
|
|
697
697
|
createElementVNode("div", _hoisted_5$c, toDisplayString(unref(tr)("floor")), 1)
|
|
698
698
|
]),
|
|
699
|
-
(De = Be.hoveredData) != null && De.conf || (
|
|
699
|
+
(De = Be.hoveredData) != null && De.conf || (Re = (Le = Be.hoveredData) == null ? void 0 : Le.flats) != null && Re.length ? (openBlock(), createElementBlock("div", _hoisted_6$a, [
|
|
700
700
|
ke.value ? (openBlock(), createElementBlock("div", _hoisted_7$8, toDisplayString(ke.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_8$5, [
|
|
701
|
-
(
|
|
701
|
+
(Ae = (Ie = Be.hoveredData) == null ? void 0 : Ie.counts) != null && Ae.available ? (openBlock(), createElementBlock("div", _hoisted_9$4, [
|
|
702
702
|
createElementVNode("div", _hoisted_10$4, toDisplayString(((je = (ze = Be.hoveredData) == null ? void 0 : ze.counts) == null ? void 0 : je.available) || 0), 1),
|
|
703
703
|
createElementVNode("div", _hoisted_11$4, toDisplayString(unref(tr)("available")), 1)
|
|
704
704
|
])) : createCommentVNode("", !0),
|
|
705
|
-
(
|
|
706
|
-
createElementVNode("div", _hoisted_13$3, toDisplayString((qe = (
|
|
705
|
+
(We = (Fe = Be.hoveredData) == null ? void 0 : Fe.counts) != null && We.reserved ? (openBlock(), createElementBlock("div", _hoisted_12$4, [
|
|
706
|
+
createElementVNode("div", _hoisted_13$3, toDisplayString((qe = (He = Be.hoveredData) == null ? void 0 : He.counts) == null ? void 0 : qe.reserved), 1),
|
|
707
707
|
createElementVNode("div", _hoisted_14$2, toDisplayString(unref(tr)("reserved")), 1)
|
|
708
708
|
])) : createCommentVNode("", !0),
|
|
709
709
|
(Xe = (Ue = Be.hoveredData) == null ? void 0 : Ue.counts) != null && Xe.sold ? (openBlock(), createElementBlock("div", _hoisted_15$2, [
|
|
710
|
-
createElementVNode("div", _hoisted_16$2, toDisplayString((Ze = (
|
|
710
|
+
createElementVNode("div", _hoisted_16$2, toDisplayString((Ze = (Je = Be.hoveredData) == null ? void 0 : Je.counts) == null ? void 0 : Ze.sold), 1),
|
|
711
711
|
createElementVNode("div", _hoisted_17$2, toDisplayString(unref(tr)("sold")), 1)
|
|
712
712
|
])) : createCommentVNode("", !0)
|
|
713
713
|
]))
|
|
@@ -719,13 +719,13 @@ const tr = (Be) => {
|
|
|
719
719
|
])
|
|
720
720
|
])) : Be.type === "flat" ? (openBlock(), createElementBlock("div", _hoisted_22$1, [
|
|
721
721
|
createElementVNode("div", _hoisted_23$1, [
|
|
722
|
-
createElementVNode("div", _hoisted_24$1, toDisplayString((
|
|
722
|
+
createElementVNode("div", _hoisted_24$1, toDisplayString((oi = Be.hoveredData) == null ? void 0 : oi.flat_number), 1),
|
|
723
723
|
createElementVNode("div", _hoisted_25$1, toDisplayString(unref(tr)("apartment")), 1)
|
|
724
724
|
]),
|
|
725
725
|
createElementVNode("div", _hoisted_26$1, [
|
|
726
726
|
ke.value ? (openBlock(), createElementBlock("div", _hoisted_27$1, toDisplayString(ke.value), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
727
727
|
createElementVNode("div", _hoisted_28$1, toDisplayString(unref(tr)("price")), 1),
|
|
728
|
-
(
|
|
728
|
+
(ii = Be.hoveredData) != null && ii.request_price ? (openBlock(), createElementBlock("div", _hoisted_29$1, toDisplayString(unref(tr)("Request Price")), 1)) : (Ke = Be.hoveredData) != null && Ke.price ? (openBlock(), createElementBlock("div", _hoisted_30$1, [
|
|
729
729
|
createElementVNode("div", null, [
|
|
730
730
|
(Ye = Be.hoveredData) != null && Ye.offer_price ? (openBlock(), createElementBlock("div", _hoisted_33$1, [
|
|
731
731
|
createElementVNode("div", _hoisted_34$1, [
|
|
@@ -872,7 +872,7 @@ const MoneyBag = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_rende
|
|
|
872
872
|
return tr((Ve = _e.hoveredData) == null ? void 0 : Ve.conf);
|
|
873
873
|
});
|
|
874
874
|
return (Ve, De) => {
|
|
875
|
-
var Le,
|
|
875
|
+
var Le, Re, Ie, Ae, ze, je, Fe, We, He, qe, Ue, Xe, Je, Ze, Qe, oi, ii, Ke, Ye, Ge, ei, ti, ni, ri, ai, si, li, di, ui, hi, ci, pi, mi;
|
|
876
876
|
return Be.type && Be.hoveredData && Be.type !== "tooltip" ? (openBlock(), createElementBlock("div", {
|
|
877
877
|
key: 0,
|
|
878
878
|
class: normalizeClass(["ire-pointer-events-none ire-absolute ire-select-none", {
|
|
@@ -895,24 +895,24 @@ const MoneyBag = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_rende
|
|
|
895
895
|
Ne.value ? (openBlock(), createElementBlock("div", _hoisted_4$e, toDisplayString(Ne.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_5$b, [
|
|
896
896
|
createElementVNode("div", _hoisted_6$9, toDisplayString(unref(tr)("starting from")) + ": ", 1),
|
|
897
897
|
createElementVNode("div", _hoisted_7$7, [
|
|
898
|
-
createTextVNode(toDisplayString(unref(getPrice)(+((Ie = (
|
|
898
|
+
createTextVNode(toDisplayString(unref(getPrice)(+((Ie = (Re = Be.hoveredData) == null ? void 0 : Re.counts) == null ? void 0 : Ie.minimum_price) || 0)) + " ", 1),
|
|
899
899
|
createElementVNode("span", _hoisted_8$4, toDisplayString(unref(currencySymbol)()), 1)
|
|
900
900
|
])
|
|
901
901
|
]))
|
|
902
902
|
]),
|
|
903
903
|
createElementVNode("div", _hoisted_9$3, [
|
|
904
904
|
createElementVNode("div", _hoisted_10$3, [
|
|
905
|
-
createElementVNode("span", null, toDisplayString(Ne.value ? 0 : ((ze = (
|
|
905
|
+
createElementVNode("span", null, toDisplayString(Ne.value ? 0 : ((ze = (Ae = Be.hoveredData) == null ? void 0 : Ae.counts) == null ? void 0 : ze.available) || 0), 1),
|
|
906
906
|
createTextVNode(" " + toDisplayString(unref(tr)("available")), 1)
|
|
907
907
|
]),
|
|
908
908
|
De[1] || (De[1] = createElementVNode("span", null, "•", -1)),
|
|
909
909
|
createElementVNode("div", _hoisted_11$3, [
|
|
910
|
-
createElementVNode("span", null, toDisplayString(Ne.value === "sold" ? ((Fe = (je = Be.hoveredData) == null ? void 0 : je.flats) == null ? void 0 : Fe.length) || 0 : ((
|
|
910
|
+
createElementVNode("span", null, toDisplayString(Ne.value === "sold" ? ((Fe = (je = Be.hoveredData) == null ? void 0 : je.flats) == null ? void 0 : Fe.length) || 0 : ((He = (We = Be.hoveredData) == null ? void 0 : We.counts) == null ? void 0 : He.sold) || 0), 1),
|
|
911
911
|
createTextVNode(" " + toDisplayString(unref(tr)("sold")), 1)
|
|
912
912
|
]),
|
|
913
913
|
De[2] || (De[2] = createElementVNode("span", null, "•", -1)),
|
|
914
914
|
createElementVNode("div", _hoisted_12$3, [
|
|
915
|
-
createElementVNode("span", null, toDisplayString(Ne.value === "reserved" ? ((Ue = (qe = Be.hoveredData) == null ? void 0 : qe.flats) == null ? void 0 : Ue.length) || 0 : ((
|
|
915
|
+
createElementVNode("span", null, toDisplayString(Ne.value === "reserved" ? ((Ue = (qe = Be.hoveredData) == null ? void 0 : qe.flats) == null ? void 0 : Ue.length) || 0 : ((Je = (Xe = Be.hoveredData) == null ? void 0 : Xe.counts) == null ? void 0 : Je.reserved) || 0), 1),
|
|
916
916
|
createTextVNode(" " + toDisplayString(unref(tr)("reserved")), 1)
|
|
917
917
|
])
|
|
918
918
|
])
|
|
@@ -929,14 +929,14 @@ const MoneyBag = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_rende
|
|
|
929
929
|
createElementVNode("div", _hoisted_22, [
|
|
930
930
|
createVNode(MoneyBag, { class: "ire-size-5 [&_path]:ire-stroke-white" })
|
|
931
931
|
]),
|
|
932
|
-
Ne.value ? (openBlock(), createElementBlock("div", _hoisted_23, toDisplayString(Ne.value), 1)) : (
|
|
932
|
+
Ne.value ? (openBlock(), createElementBlock("div", _hoisted_23, toDisplayString(Ne.value), 1)) : (oi = Be.hoveredData) != null && oi.request_price ? (openBlock(), createElementBlock("div", _hoisted_24, toDisplayString(unref(tr)("Request Price")), 1)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
933
933
|
Be.hoveredData.offer_price ? (openBlock(), createElementBlock("div", _hoisted_25, [
|
|
934
934
|
createElementVNode("div", _hoisted_26, [
|
|
935
|
-
createTextVNode(toDisplayString(unref(getPrice)(+((
|
|
935
|
+
createTextVNode(toDisplayString(unref(getPrice)(+((ii = Be.hoveredData) == null ? void 0 : ii.price))) + " ", 1),
|
|
936
936
|
createElementVNode("span", null, toDisplayString(unref(currencySymbol)()), 1)
|
|
937
937
|
]),
|
|
938
938
|
createElementVNode("div", _hoisted_27, [
|
|
939
|
-
createTextVNode(toDisplayString(unref(getPrice)(+((
|
|
939
|
+
createTextVNode(toDisplayString(unref(getPrice)(+((Ke = Be.hoveredData) == null ? void 0 : Ke.offer_price))) + " ", 1),
|
|
940
940
|
createElementVNode("span", _hoisted_28, toDisplayString(unref(currencySymbol)()), 1)
|
|
941
941
|
])
|
|
942
942
|
])) : Number((Ye = Be.hoveredData) == null ? void 0 : Ye.price) > 0 ? (openBlock(), createElementBlock("div", _hoisted_29, [
|
|
@@ -953,11 +953,15 @@ const MoneyBag = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_rende
|
|
|
953
953
|
createElementVNode("span", _hoisted_35, toDisplayString(unref(getArea)(+((si = (ai = Be.hoveredData) == null ? void 0 : ai.type) == null ? void 0 : si.area_m2))) + " " + toDisplayString(unref(getAreaUnitLabel)()) + "² ", 1)
|
|
954
954
|
])
|
|
955
955
|
])) : createCommentVNode("", !0),
|
|
956
|
-
(
|
|
956
|
+
(di = (li = Be.hoveredData) == null ? void 0 : li.type) != null && di.rooms_count ? (openBlock(), createElementBlock("div", _hoisted_36, [
|
|
957
957
|
createElementVNode("div", _hoisted_37, [
|
|
958
958
|
createVNode(Cube3d, { class: "ire-size-5 [&_path]:ire-stroke-white" })
|
|
959
959
|
]),
|
|
960
|
-
(hi = (
|
|
960
|
+
(hi = (ui = Be.hoveredData) == null ? void 0 : ui.type) != null && hi.rooms_count ? (openBlock(), createElementBlock("div", _hoisted_38, toDisplayString(unref(tr)("room")) + ": " + toDisplayString(unref(getRoomCount)(
|
|
961
|
+
Number(
|
|
962
|
+
(mi = (pi = (ci = Be.hoveredData) == null ? void 0 : ci.type) == null ? void 0 : pi.rooms_count) == null ? void 0 : mi.toString().replace(",", ".")
|
|
963
|
+
)
|
|
964
|
+
)), 1)) : createCommentVNode("", !0)
|
|
961
965
|
])) : createCommentVNode("", !0)
|
|
962
966
|
])
|
|
963
967
|
])
|
|
@@ -1081,44 +1085,44 @@ const MoneyBag = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_rende
|
|
|
1081
1085
|
},
|
|
1082
1086
|
emits: ["changeComponent"],
|
|
1083
1087
|
setup(Be, { emit: _e }) {
|
|
1084
|
-
const ke = _e, $e = Be, Ne = inject("showFlatModal"), Ve = useGlobalStore(), { openReservedFlat: De, openSoldFlat: Le } = storeToRefs(Ve),
|
|
1088
|
+
const ke = _e, $e = Be, Ne = inject("showFlatModal"), Ve = useGlobalStore(), { openReservedFlat: De, openSoldFlat: Le } = storeToRefs(Ve), Re = ref(), Ie = ref(null), Ae = ref(), ze = ref(null), je = computed(() => {
|
|
1085
1089
|
if ($e.project)
|
|
1086
1090
|
return $e.project.svg;
|
|
1087
1091
|
}), Fe = (qe) => {
|
|
1088
1092
|
const Ue = qe == null ? void 0 : qe.target;
|
|
1089
1093
|
Ue && (Ie.value = Ue);
|
|
1090
|
-
},
|
|
1094
|
+
}, We = () => {
|
|
1091
1095
|
var Ue;
|
|
1092
|
-
if (!
|
|
1093
|
-
((Ue =
|
|
1094
|
-
var
|
|
1095
|
-
const
|
|
1096
|
-
(ti) => (ti == null ? void 0 : ti.key) ===
|
|
1096
|
+
if (!Re.value) return;
|
|
1097
|
+
((Ue = Re.value) == null ? void 0 : Ue.querySelectorAll("g")).forEach((Xe) => {
|
|
1098
|
+
var ii, Ke, Ye, Ge, ei;
|
|
1099
|
+
const Je = Xe == null ? void 0 : Xe.getAttribute("id"), Ze = (Ke = (ii = $e.project) == null ? void 0 : ii.polygon_data) == null ? void 0 : Ke.find(
|
|
1100
|
+
(ti) => (ti == null ? void 0 : ti.key) === Je
|
|
1097
1101
|
), Qe = Ze == null ? void 0 : Ze.id;
|
|
1098
|
-
let
|
|
1102
|
+
let oi = "";
|
|
1099
1103
|
switch (Ze == null ? void 0 : Ze.type) {
|
|
1100
1104
|
case "block": {
|
|
1101
1105
|
const ti = (Ye = $e.blocks) == null ? void 0 : Ye.find((ni) => ni.id === Qe);
|
|
1102
|
-
|
|
1106
|
+
oi = getConfValue((ti == null ? void 0 : ti.conf) || "");
|
|
1103
1107
|
break;
|
|
1104
1108
|
}
|
|
1105
1109
|
case "floor": {
|
|
1106
1110
|
const ti = (Ge = $e.floors) == null ? void 0 : Ge.find((ni) => ni.id === Qe);
|
|
1107
|
-
|
|
1111
|
+
oi = getConfValue((ti == null ? void 0 : ti.conf) || "");
|
|
1108
1112
|
break;
|
|
1109
1113
|
}
|
|
1110
1114
|
case "flat": {
|
|
1111
1115
|
const ti = (ei = $e.flats) == null ? void 0 : ei.find((ni) => ni.id === Qe);
|
|
1112
|
-
|
|
1116
|
+
oi = getConfValue((ti == null ? void 0 : ti.conf) || "");
|
|
1113
1117
|
break;
|
|
1114
1118
|
}
|
|
1115
1119
|
}
|
|
1116
|
-
Xe.setAttribute("conf",
|
|
1120
|
+
Xe.setAttribute("conf", oi || "");
|
|
1117
1121
|
});
|
|
1118
|
-
},
|
|
1119
|
-
var Xe,
|
|
1122
|
+
}, He = (qe) => {
|
|
1123
|
+
var Xe, Je, Ze;
|
|
1120
1124
|
const Ue = qe.target;
|
|
1121
|
-
(Ue == null ? void 0 : Ue.nodeName) === "path" && (((Xe =
|
|
1125
|
+
(Ue == null ? void 0 : Ue.nodeName) === "path" && (((Xe = Ae.value) == null ? void 0 : Xe.conf) === "reserved" && !De.value || ((Je = Ae.value) == null ? void 0 : Je.conf) === "sold" && !Le.value || ke("changeComponent", ((Ze = ze.value) == null ? void 0 : Ze.type) || "", Ae == null ? void 0 : Ae.value));
|
|
1122
1126
|
};
|
|
1123
1127
|
return watch(
|
|
1124
1128
|
() => Ne == null ? void 0 : Ne.value,
|
|
@@ -1128,62 +1132,62 @@ const MoneyBag = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_rende
|
|
|
1128
1132
|
), watch(
|
|
1129
1133
|
() => Ie.value,
|
|
1130
1134
|
(qe) => {
|
|
1131
|
-
var Xe,
|
|
1135
|
+
var Xe, Je, Ze, Qe, oi, ii, Ke, Ye;
|
|
1132
1136
|
if (!qe) return;
|
|
1133
1137
|
Ve.hoverdSvg = qe;
|
|
1134
1138
|
const Ue = qe.parentElement;
|
|
1135
1139
|
if (Ue && (Ue == null ? void 0 : Ue.nodeName) === "g") {
|
|
1136
1140
|
const Ge = Ue == null ? void 0 : Ue.getAttribute("id");
|
|
1137
|
-
if (!Ge || (ze.value = ((
|
|
1141
|
+
if (!Ge || (ze.value = ((Je = (Xe = $e.project) == null ? void 0 : Xe.polygon_data) == null ? void 0 : Je.find((ti) => (ti == null ? void 0 : ti.key) === Ge)) || null, !ze.value)) return;
|
|
1138
1142
|
const ei = (Ze = ze.value) == null ? void 0 : Ze.id;
|
|
1139
1143
|
switch ((Qe = ze.value) == null ? void 0 : Qe.type) {
|
|
1140
1144
|
case "floor":
|
|
1141
|
-
const ti = (
|
|
1145
|
+
const ti = (oi = $e.floors) == null ? void 0 : oi.find(
|
|
1142
1146
|
(si) => si.id === ei
|
|
1143
1147
|
);
|
|
1144
|
-
|
|
1148
|
+
Ae.value = ti;
|
|
1145
1149
|
break;
|
|
1146
1150
|
case "block":
|
|
1147
|
-
const ni = (
|
|
1151
|
+
const ni = (ii = $e.blocks) == null ? void 0 : ii.find(
|
|
1148
1152
|
(si) => (si == null ? void 0 : si.id) === ei
|
|
1149
1153
|
);
|
|
1150
|
-
|
|
1154
|
+
Ae.value = ni;
|
|
1151
1155
|
break;
|
|
1152
1156
|
case "flat":
|
|
1153
|
-
const ri = (
|
|
1157
|
+
const ri = (Ke = $e.flats) == null ? void 0 : Ke.find(
|
|
1154
1158
|
(si) => (si == null ? void 0 : si.id) === ei
|
|
1155
1159
|
);
|
|
1156
|
-
|
|
1160
|
+
Ae.value = ri;
|
|
1157
1161
|
break;
|
|
1158
1162
|
case "tooltip":
|
|
1159
1163
|
const ai = (Ye = $e.actions) == null ? void 0 : Ye.find(
|
|
1160
1164
|
(si) => (si == null ? void 0 : si.id) === ei
|
|
1161
1165
|
);
|
|
1162
|
-
|
|
1166
|
+
Ae.value = ai;
|
|
1163
1167
|
break;
|
|
1164
1168
|
default:
|
|
1165
|
-
|
|
1169
|
+
Ae.value = null;
|
|
1166
1170
|
break;
|
|
1167
1171
|
}
|
|
1168
1172
|
} else
|
|
1169
|
-
ze.value = null,
|
|
1173
|
+
ze.value = null, Ae.value = null;
|
|
1170
1174
|
}
|
|
1171
1175
|
), onMounted(() => {
|
|
1172
|
-
document.addEventListener("mousemove", Fe),
|
|
1176
|
+
document.addEventListener("mousemove", Fe), We();
|
|
1173
1177
|
}), onUnmounted(() => {
|
|
1174
1178
|
document.removeEventListener("mousemove", Fe);
|
|
1175
1179
|
}), (qe, Ue) => {
|
|
1176
1180
|
var Xe;
|
|
1177
1181
|
return openBlock(), createBlock(_sfc_main$E, {
|
|
1178
|
-
hoverdData:
|
|
1182
|
+
hoverdData: Ae.value,
|
|
1179
1183
|
type: (Xe = ze.value) == null ? void 0 : Xe.type
|
|
1180
1184
|
}, {
|
|
1181
1185
|
default: withCtx(() => {
|
|
1182
|
-
var
|
|
1186
|
+
var Je, Ze, Qe;
|
|
1183
1187
|
return [
|
|
1184
1188
|
createElementVNode("div", _hoisted_1$z, [
|
|
1185
1189
|
createElementVNode("img", {
|
|
1186
|
-
src: (Qe = (Ze = (
|
|
1190
|
+
src: (Qe = (Ze = (Je = Be.project) == null ? void 0 : Je.project_image) == null ? void 0 : Ze[0]) == null ? void 0 : Qe.url,
|
|
1187
1191
|
alt: "",
|
|
1188
1192
|
class: "ire-left-0 ire-top-0 ire-h-full ire-w-full"
|
|
1189
1193
|
}, null, 8, _hoisted_2$j),
|
|
@@ -1191,9 +1195,9 @@ const MoneyBag = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_rende
|
|
|
1191
1195
|
innerHTML: unref(je),
|
|
1192
1196
|
key: unref(je),
|
|
1193
1197
|
ref_key: "svgRef",
|
|
1194
|
-
ref:
|
|
1198
|
+
ref: Re,
|
|
1195
1199
|
class: "canvas path-color ire-absolute ire-left-0 ire-top-0 ire-h-full ire-w-full",
|
|
1196
|
-
onClick:
|
|
1200
|
+
onClick: He
|
|
1197
1201
|
}, null, 8, _hoisted_3$h))
|
|
1198
1202
|
])
|
|
1199
1203
|
];
|
|
@@ -1229,10 +1233,10 @@ const MoneyBag = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_rende
|
|
|
1229
1233
|
class: "no-spinner ire-w-full ire-cursor-pointer ire-appearance-none ire-rounded-md !ire-border-none ire-px-4 ire-py-2 !ire-outline-none !ire-ring-[1px] !ire-ring-gray-200 ire-transition-all focus:!ire-ring-2 focus:!ire-ring-black"
|
|
1230
1234
|
}, [
|
|
1231
1235
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(Be.data, (Le) => {
|
|
1232
|
-
var
|
|
1236
|
+
var Re, Ie;
|
|
1233
1237
|
return openBlock(), createElementBlock("option", {
|
|
1234
1238
|
value: Le.value,
|
|
1235
|
-
disabled: ((
|
|
1239
|
+
disabled: ((Re = Le == null ? void 0 : Le.title) == null ? void 0 : Re.includes("reserved")) && !unref(ke) || ((Ie = Le == null ? void 0 : Le.title) == null ? void 0 : Ie.includes("sold")) && !unref($e) || Be.disabled,
|
|
1236
1240
|
class: "ire-text-base"
|
|
1237
1241
|
}, toDisplayString(Le.title), 9, _hoisted_4$c);
|
|
1238
1242
|
}), 256))
|
|
@@ -1276,155 +1280,155 @@ const ArrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_ren
|
|
|
1276
1280
|
},
|
|
1277
1281
|
emits: ["changeComponent"],
|
|
1278
1282
|
setup(Be, { emit: _e }) {
|
|
1279
|
-
const ke = _e, $e = Be, Ne = inject("showFlatModal"), Ve = useGlobalStore(), { openReservedFlat: De, openSoldFlat: Le } = storeToRefs(Ve),
|
|
1283
|
+
const ke = _e, $e = Be, Ne = inject("showFlatModal"), Ve = useGlobalStore(), { openReservedFlat: De, openSoldFlat: Le } = storeToRefs(Ve), Re = ref(), Ie = ref(null), Ae = ref(), ze = ref(null), je = ref(), Fe = ref(), We = computed$1(() => {
|
|
1280
1284
|
var Ze;
|
|
1281
1285
|
if ((Ze = $e.floor) != null && Ze.svg)
|
|
1282
1286
|
return $e.floor.svg;
|
|
1283
|
-
}),
|
|
1287
|
+
}), He = computed$1(() => $e.floors.filter(
|
|
1284
1288
|
(Ze) => {
|
|
1285
|
-
var Qe,
|
|
1289
|
+
var Qe, oi;
|
|
1286
1290
|
return (
|
|
1287
1291
|
// floorItem.conf !== "reserved" &&
|
|
1288
1292
|
// floorItem.conf !== "sold" &&
|
|
1289
|
-
(Qe = $e.floor) != null && Qe.block_id ? (Ze == null ? void 0 : Ze.block_id) === ((
|
|
1293
|
+
(Qe = $e.floor) != null && Qe.block_id ? (Ze == null ? void 0 : Ze.block_id) === ((oi = $e.floor) == null ? void 0 : oi.block_id) : !(Ze != null && Ze.block_id)
|
|
1290
1294
|
);
|
|
1291
1295
|
}
|
|
1292
1296
|
).map((Ze) => {
|
|
1293
|
-
var
|
|
1294
|
-
const Qe = (
|
|
1295
|
-
(
|
|
1297
|
+
var oi, ii;
|
|
1298
|
+
const Qe = (oi = $e.blocks) == null ? void 0 : oi.find(
|
|
1299
|
+
(Ke) => {
|
|
1296
1300
|
var Ye;
|
|
1297
|
-
return (
|
|
1301
|
+
return (Ke == null ? void 0 : Ke.id) === ((Ye = Ze == null ? void 0 : Ze.block_id) == null ? void 0 : Ye.toString());
|
|
1298
1302
|
}
|
|
1299
1303
|
);
|
|
1300
1304
|
return {
|
|
1301
|
-
title: ((
|
|
1305
|
+
title: ((ii = Ze == null ? void 0 : Ze.floor_number) == null ? void 0 : ii.toString()) + ` ${tr("floor")} ` + (Qe != null && Qe.id ? ` - ${Qe == null ? void 0 : Qe.title}` : "") + (Ze != null && Ze.conf ? " " + Ze.conf : ""),
|
|
1302
1306
|
value: Ze == null ? void 0 : Ze.id
|
|
1303
1307
|
};
|
|
1304
1308
|
}).sort((Ze, Qe) => Ze.title.localeCompare(Qe.title)) || []), qe = (Ze) => {
|
|
1305
1309
|
const Qe = Ze.target;
|
|
1306
1310
|
Qe && (Ie.value = Qe);
|
|
1307
1311
|
}, Ue = (Ze) => {
|
|
1308
|
-
var
|
|
1312
|
+
var oi, ii, Ke;
|
|
1309
1313
|
const Qe = Ze.target;
|
|
1310
|
-
(Qe == null ? void 0 : Qe.nodeName) === "path" && (ze.value && "conf" in ze.value && (((
|
|
1314
|
+
(Qe == null ? void 0 : Qe.nodeName) === "path" && (ze.value && "conf" in ze.value && (((oi = ze.value) == null ? void 0 : oi.conf) === "reserved" && !De.value || ((ii = ze.value) == null ? void 0 : ii.conf) === "sold" && !Le.value) || ke("changeComponent", ((Ke = Ae.value) == null ? void 0 : Ke.type) || "", ze.value));
|
|
1311
1315
|
}, Xe = () => {
|
|
1312
1316
|
var Ze;
|
|
1313
|
-
|
|
1317
|
+
Re.value && ((Ze = Re.value) == null ? void 0 : Ze.querySelectorAll("g")).forEach((oi) => {
|
|
1314
1318
|
var Ge, ei, ti, ni, ri;
|
|
1315
|
-
const
|
|
1316
|
-
(ai) => (ai == null ? void 0 : ai.key) ===
|
|
1319
|
+
const ii = oi == null ? void 0 : oi.getAttribute("id"), Ke = (ei = (Ge = $e.floor) == null ? void 0 : Ge.polygon_data) == null ? void 0 : ei.find(
|
|
1320
|
+
(ai) => (ai == null ? void 0 : ai.key) === ii
|
|
1317
1321
|
);
|
|
1318
1322
|
if (!$e.flats) return;
|
|
1319
1323
|
let Ye = "";
|
|
1320
1324
|
if ((ti = $e.floor) != null && ti.conf)
|
|
1321
|
-
Ye = getConfValue(((ni = $e.floor) == null ? void 0 : ni.conf) || ""),
|
|
1325
|
+
Ye = getConfValue(((ni = $e.floor) == null ? void 0 : ni.conf) || ""), oi.setAttribute("conf", Ye || "");
|
|
1322
1326
|
else {
|
|
1323
1327
|
const ai = (ri = $e.flats) == null ? void 0 : ri.find(
|
|
1324
|
-
(si) => (si == null ? void 0 : si.id) === (
|
|
1328
|
+
(si) => (si == null ? void 0 : si.id) === (Ke == null ? void 0 : Ke.id)
|
|
1325
1329
|
);
|
|
1326
|
-
Ye = getConfValue((ai == null ? void 0 : ai.conf) || ""),
|
|
1330
|
+
Ye = getConfValue((ai == null ? void 0 : ai.conf) || ""), oi == null || oi.setAttribute("conf", Ye || "");
|
|
1327
1331
|
}
|
|
1328
1332
|
});
|
|
1329
|
-
},
|
|
1333
|
+
}, Je = () => {
|
|
1330
1334
|
var Ze;
|
|
1331
1335
|
(Ze = $e.floor) != null && Ze.block_id ? ke("changeComponent", "block", Fe.value) : ke("changeComponent", "project", null);
|
|
1332
1336
|
};
|
|
1333
1337
|
return watch(
|
|
1334
1338
|
() => Ie.value,
|
|
1335
1339
|
(Ze) => {
|
|
1336
|
-
var
|
|
1340
|
+
var oi, ii, Ke, Ye, Ge, ei, ti;
|
|
1337
1341
|
if (!Ze) return;
|
|
1338
1342
|
Ve.hoverdSvg = Ze;
|
|
1339
1343
|
const Qe = Ze == null ? void 0 : Ze.parentElement;
|
|
1340
1344
|
if (Qe && (Qe == null ? void 0 : Qe.nodeName) === "g") {
|
|
1341
1345
|
const ni = Qe.getAttribute("id");
|
|
1342
|
-
if (!ni || (
|
|
1343
|
-
if (((
|
|
1346
|
+
if (!ni || (Ae.value = ((ii = (oi = $e.floor) == null ? void 0 : oi.polygon_data) == null ? void 0 : ii.find((ri) => (ri == null ? void 0 : ri.key) === ni)) || null, !Ae.value)) return;
|
|
1347
|
+
if (((Ke = Ae.value) == null ? void 0 : Ke.type) === "flat") {
|
|
1344
1348
|
const ri = (Ye = $e.flats) == null ? void 0 : Ye.find(
|
|
1345
1349
|
(si) => {
|
|
1346
1350
|
var li;
|
|
1347
|
-
return (si == null ? void 0 : si.id) === ((li =
|
|
1351
|
+
return (si == null ? void 0 : si.id) === ((li = Ae.value) == null ? void 0 : li.id);
|
|
1348
1352
|
}
|
|
1349
1353
|
), ai = ri ? {
|
|
1350
1354
|
...ri,
|
|
1351
1355
|
conf: ri.conf || ((Ge = $e.floor) == null ? void 0 : Ge.conf) || ""
|
|
1352
1356
|
} : null;
|
|
1353
1357
|
ze.value = ai;
|
|
1354
|
-
} else if (((ei =
|
|
1358
|
+
} else if (((ei = Ae.value) == null ? void 0 : ei.type) === "tooltip") {
|
|
1355
1359
|
const ri = (ti = $e.actions) == null ? void 0 : ti.find(
|
|
1356
1360
|
(ai) => {
|
|
1357
1361
|
var si;
|
|
1358
|
-
return (ai == null ? void 0 : ai.id) === ((si =
|
|
1362
|
+
return (ai == null ? void 0 : ai.id) === ((si = Ae.value) == null ? void 0 : si.id);
|
|
1359
1363
|
}
|
|
1360
1364
|
);
|
|
1361
1365
|
ze.value = ri ?? null;
|
|
1362
1366
|
} else
|
|
1363
1367
|
ze.value = null;
|
|
1364
1368
|
} else
|
|
1365
|
-
|
|
1369
|
+
Ae.value = null;
|
|
1366
1370
|
}
|
|
1367
1371
|
), watch(
|
|
1368
1372
|
() => Ne == null ? void 0 : Ne.value,
|
|
1369
1373
|
() => {
|
|
1370
|
-
Ne != null && Ne.value || (Ie.value = null,
|
|
1374
|
+
Ne != null && Ne.value || (Ie.value = null, Ae.value = null);
|
|
1371
1375
|
}
|
|
1372
1376
|
), watch(
|
|
1373
1377
|
() => je.value,
|
|
1374
1378
|
() => {
|
|
1375
1379
|
var Qe;
|
|
1376
1380
|
const Ze = (Qe = $e.floors) == null ? void 0 : Qe.find(
|
|
1377
|
-
(
|
|
1381
|
+
(oi) => (oi == null ? void 0 : oi.id) === (je == null ? void 0 : je.value)
|
|
1378
1382
|
);
|
|
1379
1383
|
Ze && ke("changeComponent", "floor", Ze), setTimeout(() => {
|
|
1380
1384
|
Xe();
|
|
1381
1385
|
}, 0);
|
|
1382
1386
|
}
|
|
1383
1387
|
), onMounted(() => {
|
|
1384
|
-
var Ze, Qe,
|
|
1388
|
+
var Ze, Qe, oi;
|
|
1385
1389
|
Fe.value = (Ze = $e.blocks) == null ? void 0 : Ze.find(
|
|
1386
|
-
(
|
|
1387
|
-
var
|
|
1388
|
-
return (
|
|
1390
|
+
(ii) => {
|
|
1391
|
+
var Ke, Ye;
|
|
1392
|
+
return (ii == null ? void 0 : ii.id) === ((Ye = (Ke = $e.floor) == null ? void 0 : Ke.block_id) == null ? void 0 : Ye.toString());
|
|
1389
1393
|
}
|
|
1390
|
-
), je.value = (
|
|
1391
|
-
(
|
|
1392
|
-
var
|
|
1393
|
-
return (
|
|
1394
|
+
), je.value = (oi = (Qe = He.value) == null ? void 0 : Qe.find(
|
|
1395
|
+
(ii) => {
|
|
1396
|
+
var Ke;
|
|
1397
|
+
return (ii == null ? void 0 : ii.value) == ((Ke = $e.floor) == null ? void 0 : Ke.id);
|
|
1394
1398
|
}
|
|
1395
|
-
)) == null ? void 0 :
|
|
1399
|
+
)) == null ? void 0 : oi.value, Xe(), document.addEventListener("mousemove", qe);
|
|
1396
1400
|
}), onUnmounted(() => {
|
|
1397
1401
|
document.removeEventListener("mousemove", qe);
|
|
1398
1402
|
}), (Ze, Qe) => {
|
|
1399
|
-
var
|
|
1403
|
+
var oi;
|
|
1400
1404
|
return openBlock(), createBlock(_sfc_main$E, {
|
|
1401
1405
|
hoverdData: ze.value,
|
|
1402
|
-
type: (
|
|
1406
|
+
type: (oi = Ae.value) == null ? void 0 : oi.type
|
|
1403
1407
|
}, {
|
|
1404
1408
|
header: withCtx(() => [
|
|
1405
|
-
createVNode(_sfc_main$A, { onClick:
|
|
1409
|
+
createVNode(_sfc_main$A, { onClick: Je }),
|
|
1406
1410
|
createElementVNode("div", _hoisted_1$v, [
|
|
1407
1411
|
createVNode(_sfc_main$C, {
|
|
1408
1412
|
modelValue: je.value,
|
|
1409
|
-
"onUpdate:modelValue": Qe[0] || (Qe[0] = (
|
|
1410
|
-
data:
|
|
1413
|
+
"onUpdate:modelValue": Qe[0] || (Qe[0] = (ii) => je.value = ii),
|
|
1414
|
+
data: He.value
|
|
1411
1415
|
}, null, 8, ["modelValue", "data"])
|
|
1412
1416
|
])
|
|
1413
1417
|
]),
|
|
1414
1418
|
default: withCtx(() => {
|
|
1415
|
-
var
|
|
1419
|
+
var ii, Ke, Ye;
|
|
1416
1420
|
return [
|
|
1417
1421
|
createElementVNode("div", _hoisted_2$g, [
|
|
1418
1422
|
createElementVNode("img", {
|
|
1419
|
-
src: ((Ye = (
|
|
1423
|
+
src: ((Ye = (Ke = (ii = Be.floor) == null ? void 0 : ii.floor_image) == null ? void 0 : Ke[0]) == null ? void 0 : Ye.url) || "",
|
|
1420
1424
|
alt: "",
|
|
1421
1425
|
class: "ire-left-0 ire-top-0 ire-h-full ire-w-full"
|
|
1422
1426
|
}, null, 8, _hoisted_3$f),
|
|
1423
1427
|
(openBlock(), createElementBlock("div", {
|
|
1424
1428
|
ref_key: "svgRef",
|
|
1425
|
-
ref:
|
|
1426
|
-
innerHTML:
|
|
1427
|
-
key:
|
|
1429
|
+
ref: Re,
|
|
1430
|
+
innerHTML: We.value,
|
|
1431
|
+
key: We.value,
|
|
1428
1432
|
class: "canvas path-color ire-absolute ire-left-0 ire-top-0 ire-h-full ire-w-full",
|
|
1429
1433
|
onClick: Ue
|
|
1430
1434
|
}, null, 8, _hoisted_4$b))
|
|
@@ -1827,8 +1831,8 @@ class I extends g {
|
|
|
1827
1831
|
Le = $e - De < 0.5 * (ke - De) ? ke : De;
|
|
1828
1832
|
break;
|
|
1829
1833
|
case "iterateZoom":
|
|
1830
|
-
let
|
|
1831
|
-
Le =
|
|
1834
|
+
let Re = [1, ke, Ve].sort((Ae, ze) => Ae - ze), Ie = Re.findIndex((Ae) => Ae > $e + 1e-5);
|
|
1835
|
+
Le = Re[Ie] || 1;
|
|
1832
1836
|
}
|
|
1833
1837
|
return Le;
|
|
1834
1838
|
}
|
|
@@ -1867,9 +1871,9 @@ class I extends g {
|
|
|
1867
1871
|
for (const _e of v) _e === "e" && this.isBouncingX || _e === "f" && this.isBouncingY || (this.velocity[_e] = (1 / (1 - this.friction) - 1) * (this.target[_e] - this.current[_e]));
|
|
1868
1872
|
}
|
|
1869
1873
|
checkBounds(_e = 0, ke = 0) {
|
|
1870
|
-
const { current: $e } = this, Ne = $e.e + _e, Ve = $e.f + ke, De = this.getBounds(), { x: Le, y:
|
|
1871
|
-
let Fe = 0,
|
|
1872
|
-
return Ie !== 1 / 0 && Ne < Ie ? Fe = Ie - Ne :
|
|
1874
|
+
const { current: $e } = this, Ne = $e.e + _e, Ve = $e.f + ke, De = this.getBounds(), { x: Le, y: Re } = De, Ie = Le.min, Ae = Le.max, ze = Re.min, je = Re.max;
|
|
1875
|
+
let Fe = 0, We = 0;
|
|
1876
|
+
return Ie !== 1 / 0 && Ne < Ie ? Fe = Ie - Ne : Ae !== 1 / 0 && Ne > Ae && (Fe = Ae - Ne), ze !== 1 / 0 && Ve < ze ? We = ze - Ve : je !== 1 / 0 && Ve > je && (We = je - Ve), Math.abs(Fe) < 1e-4 && (Fe = 0), Math.abs(We) < 1e-4 && (We = 0), Object.assign(Object.assign({}, De), { xDiff: Fe, yDiff: We, inBounds: !Fe && !We });
|
|
1873
1877
|
}
|
|
1874
1878
|
clampTargetBounds() {
|
|
1875
1879
|
const { target: _e } = this, { x: ke, y: $e } = this.getBounds();
|
|
@@ -1877,18 +1881,18 @@ class I extends g {
|
|
|
1877
1881
|
}
|
|
1878
1882
|
calculateContentDim(_e = this.current) {
|
|
1879
1883
|
const { content: ke, contentRect: $e } = this, { fitWidth: Ne, fitHeight: Ve, fullWidth: De, fullHeight: Le } = $e;
|
|
1880
|
-
let
|
|
1884
|
+
let Re = De, Ie = Le;
|
|
1881
1885
|
if (this.option("zoom") || this.angle !== 0) {
|
|
1882
|
-
const
|
|
1883
|
-
|
|
1886
|
+
const Ae = !(ke instanceof HTMLImageElement) && (window.getComputedStyle(ke).maxWidth === "none" || window.getComputedStyle(ke).maxHeight === "none"), ze = Ae ? De : Ne, je = Ae ? Le : Ve, Fe = this.getMatrix(_e), We = new DOMPoint(0, 0).matrixTransform(Fe), He = new DOMPoint(0 + ze, 0).matrixTransform(Fe), qe = new DOMPoint(0 + ze, 0 + je).matrixTransform(Fe), Ue = new DOMPoint(0, 0 + je).matrixTransform(Fe), Xe = Math.abs(qe.x - We.x), Je = Math.abs(qe.y - We.y), Ze = Math.abs(Ue.x - He.x), Qe = Math.abs(Ue.y - He.y);
|
|
1887
|
+
Re = Math.max(Xe, Ze), Ie = Math.max(Je, Qe);
|
|
1884
1888
|
}
|
|
1885
|
-
return { contentWidth:
|
|
1889
|
+
return { contentWidth: Re, contentHeight: Ie };
|
|
1886
1890
|
}
|
|
1887
1891
|
setEdgeForce() {
|
|
1888
1892
|
if (this.ignoreBounds || this.isDragging || this.panMode === O || this.targetScale < this.scale) return this.isBouncingX = !1, void (this.isBouncingY = !1);
|
|
1889
1893
|
const { target: _e } = this, { x: ke, y: $e, xDiff: Ne, yDiff: Ve } = this.checkBounds(), De = this.option("maxVelocity");
|
|
1890
|
-
let Le = this.velocity.e,
|
|
1891
|
-
Ne !== 0 ? (this.isBouncingX = !0, Ne * Le <= 0 ? Le += 0.14 * Ne : (Le = 0.14 * Ne, ke.min !== 1 / 0 && (this.target.e = Math.max(_e.e, ke.min)), ke.max !== 1 / 0 && (this.target.e = Math.min(_e.e, ke.max))), De && (Le = Math.max(Math.min(Le, De), -1 * De))) : this.isBouncingX = !1, Ve !== 0 ? (this.isBouncingY = !0, Ve *
|
|
1894
|
+
let Le = this.velocity.e, Re = this.velocity.f;
|
|
1895
|
+
Ne !== 0 ? (this.isBouncingX = !0, Ne * Le <= 0 ? Le += 0.14 * Ne : (Le = 0.14 * Ne, ke.min !== 1 / 0 && (this.target.e = Math.max(_e.e, ke.min)), ke.max !== 1 / 0 && (this.target.e = Math.min(_e.e, ke.max))), De && (Le = Math.max(Math.min(Le, De), -1 * De))) : this.isBouncingX = !1, Ve !== 0 ? (this.isBouncingY = !0, Ve * Re <= 0 ? Re += 0.14 * Ve : (Re = 0.14 * Ve, $e.min !== 1 / 0 && (this.target.f = Math.max(_e.f, $e.min)), $e.max !== 1 / 0 && (this.target.f = Math.min(_e.f, $e.max))), De && (Re = Math.max(Math.min(Re, De), -1 * De))) : this.isBouncingY = !1, this.isBouncingX && (this.velocity.e = Le), this.isBouncingY && (this.velocity.f = Re);
|
|
1892
1896
|
}
|
|
1893
1897
|
enable() {
|
|
1894
1898
|
const { content: _e } = this, ke = new DOMMatrixReadOnly(window.getComputedStyle(_e).transform);
|
|
@@ -1907,29 +1911,29 @@ class I extends g {
|
|
|
1907
1911
|
})() && !$e.closest("button")) return;
|
|
1908
1912
|
const Ne = $e.closest("[data-panzoom-action]"), Ve = $e.closest("[data-panzoom-change]"), De = Ne || Ve, Le = De && E(De) ? De.dataset : null;
|
|
1909
1913
|
if (Le) {
|
|
1910
|
-
const Fe = Le.panzoomChange,
|
|
1911
|
-
if ((Fe ||
|
|
1912
|
-
let
|
|
1914
|
+
const Fe = Le.panzoomChange, We = Le.panzoomAction;
|
|
1915
|
+
if ((Fe || We) && _e.preventDefault(), Fe) {
|
|
1916
|
+
let He = {};
|
|
1913
1917
|
try {
|
|
1914
|
-
|
|
1918
|
+
He = JSON.parse(Fe);
|
|
1915
1919
|
} catch {
|
|
1916
1920
|
console && console.warn("The given data was not valid JSON");
|
|
1917
1921
|
}
|
|
1918
|
-
return void this.applyChange(
|
|
1922
|
+
return void this.applyChange(He);
|
|
1919
1923
|
}
|
|
1920
|
-
if (
|
|
1924
|
+
if (We) return void (this[We] && this[We]());
|
|
1921
1925
|
}
|
|
1922
1926
|
if (Math.abs(this.dragOffset.x) > 3 || Math.abs(this.dragOffset.y) > 3) return _e.preventDefault(), void _e.stopPropagation();
|
|
1923
1927
|
if ($e.closest("[data-fancybox]")) return;
|
|
1924
|
-
const
|
|
1925
|
-
if (Ie.time && !this.canZoomOut() && (Math.abs(
|
|
1928
|
+
const Re = this.content.getBoundingClientRect(), Ie = this.dragStart;
|
|
1929
|
+
if (Ie.time && !this.canZoomOut() && (Math.abs(Re.x - Ie.x) > 2 || Math.abs(Re.y - Ie.y) > 2)) return;
|
|
1926
1930
|
this.dragStart.time = 0;
|
|
1927
|
-
const
|
|
1931
|
+
const Ae = (Fe) => {
|
|
1928
1932
|
this.option("zoom", _e) && Fe && typeof Fe == "string" && /(iterateZoom)|(toggle(Zoom|Full|Cover|Max)|(zoomTo(Fit|Cover|Max)))/.test(Fe) && typeof this[Fe] == "function" && (_e.preventDefault(), this[Fe]({ event: _e }));
|
|
1929
1933
|
}, ze = this.option("click", _e), je = this.option("dblClick", _e);
|
|
1930
1934
|
je ? (this.clicks++, this.clicks == 1 && (this.clickTimer = setTimeout(() => {
|
|
1931
|
-
this.clicks === 1 ? (this.emit("click", _e), !_e.defaultPrevented && ze &&
|
|
1932
|
-
}, 350))) : (this.emit("click", _e), !_e.defaultPrevented && ze &&
|
|
1935
|
+
this.clicks === 1 ? (this.emit("click", _e), !_e.defaultPrevented && ze && Ae(ze)) : (this.emit("dblClick", _e), _e.defaultPrevented || Ae(je)), this.clicks = 0, this.clickTimer = null;
|
|
1936
|
+
}, 350))) : (this.emit("click", _e), !_e.defaultPrevented && ze && Ae(ze));
|
|
1933
1937
|
}
|
|
1934
1938
|
addTrackingPoint(_e) {
|
|
1935
1939
|
const ke = this.trackingPoints.filter(($e) => $e.time > Date.now() - 100);
|
|
@@ -1955,26 +1959,26 @@ class I extends g {
|
|
|
1955
1959
|
if (this.option("touch", _e) === !1 || !this.isDragging || ke.length < 2 && this.panOnlyZoomed && t(this.targetScale) <= t(this.minScale) || (this.emit("touchMove", _e), _e.defaultPrevented)) return;
|
|
1956
1960
|
this.addTrackingPoint(ke[0]);
|
|
1957
1961
|
const { content: Ne } = this, Ve = h($e[0], $e[1]), De = h(ke[0], ke[1]);
|
|
1958
|
-
let Le = 0,
|
|
1962
|
+
let Le = 0, Re = 0;
|
|
1959
1963
|
if (ke.length > 1) {
|
|
1960
|
-
const
|
|
1961
|
-
Le = Ve.clientX -
|
|
1964
|
+
const Je = Ne.getBoundingClientRect();
|
|
1965
|
+
Le = Ve.clientX - Je.left - 0.5 * Je.width, Re = Ve.clientY - Je.top - 0.5 * Je.height;
|
|
1962
1966
|
}
|
|
1963
|
-
const Ie = c($e[0], $e[1]),
|
|
1964
|
-
let ze = Ie ?
|
|
1967
|
+
const Ie = c($e[0], $e[1]), Ae = c(ke[0], ke[1]);
|
|
1968
|
+
let ze = Ie ? Ae / Ie : 1, je = De.clientX - Ve.clientX, Fe = De.clientY - Ve.clientY;
|
|
1965
1969
|
this.dragOffset.x += je, this.dragOffset.y += Fe, this.dragOffset.time = Date.now() - this.dragStart.time;
|
|
1966
|
-
let
|
|
1967
|
-
if (
|
|
1970
|
+
let We = t(this.targetScale) === t(this.minScale) && this.option("lockAxis");
|
|
1971
|
+
if (We && !this.lockedAxis) if (We === "xy" || We === "y" || _e.type === "touchmove") {
|
|
1968
1972
|
if (Math.abs(this.dragOffset.x) < 6 && Math.abs(this.dragOffset.y) < 6) return void _e.preventDefault();
|
|
1969
|
-
const
|
|
1970
|
-
this.lockedAxis =
|
|
1971
|
-
} else this.lockedAxis =
|
|
1972
|
-
if (i(_e.target, this.content) && (
|
|
1973
|
+
const Je = Math.abs(180 * Math.atan2(this.dragOffset.y, this.dragOffset.x) / Math.PI);
|
|
1974
|
+
this.lockedAxis = Je > 45 && Je < 135 ? "y" : "x", this.dragOffset.x = 0, this.dragOffset.y = 0, je = 0, Fe = 0;
|
|
1975
|
+
} else this.lockedAxis = We;
|
|
1976
|
+
if (i(_e.target, this.content) && (We = "x", this.dragOffset.y = 0), We && We !== "xy" && this.lockedAxis !== We && t(this.targetScale) === t(this.minScale)) return;
|
|
1973
1977
|
_e.cancelable && _e.preventDefault(), this.container.classList.add(this.cn("isDragging"));
|
|
1974
|
-
const
|
|
1975
|
-
this.option("rubberband") ? (this.isInfinite !== "x" && (
|
|
1978
|
+
const He = this.checkBounds(je, Fe);
|
|
1979
|
+
this.option("rubberband") ? (this.isInfinite !== "x" && (He.xDiff > 0 && je < 0 || He.xDiff < 0 && je > 0) && (je *= Math.max(0, 0.5 - Math.abs(0.75 / this.contentRect.fitWidth * He.xDiff))), this.isInfinite !== "y" && (He.yDiff > 0 && Fe < 0 || He.yDiff < 0 && Fe > 0) && (Fe *= Math.max(0, 0.5 - Math.abs(0.75 / this.contentRect.fitHeight * He.yDiff)))) : (He.xDiff && (je = 0), He.yDiff && (Fe = 0));
|
|
1976
1980
|
const qe = this.targetScale, Ue = this.minScale, Xe = this.maxScale;
|
|
1977
|
-
qe < 0.5 * Ue && (ze = Math.max(ze, Ue)), qe > 1.5 * Xe && (ze = Math.min(ze, Xe)), this.lockedAxis === "y" && t(qe) === t(Ue) && (je = 0), this.lockedAxis === "x" && t(qe) === t(Ue) && (Fe = 0), this.applyChange({ originX: Le, originY:
|
|
1981
|
+
qe < 0.5 * Ue && (ze = Math.max(ze, Ue)), qe > 1.5 * Xe && (ze = Math.min(ze, Xe)), this.lockedAxis === "y" && t(qe) === t(Ue) && (je = 0), this.lockedAxis === "x" && t(qe) === t(Ue) && (Fe = 0), this.applyChange({ originX: Le, originY: Re, panX: je, panY: Fe, scale: ze, friction: this.option("dragFriction"), ignoreBounds: !0 });
|
|
1978
1982
|
}
|
|
1979
1983
|
onPointerUp(_e, ke, $e) {
|
|
1980
1984
|
if ($e.length) return this.dragOffset.x = 0, this.dragOffset.y = 0, void (this.trackingPoints = []);
|
|
@@ -1984,23 +1988,23 @@ class I extends g {
|
|
|
1984
1988
|
var _e;
|
|
1985
1989
|
const ke = this.isScaling;
|
|
1986
1990
|
this.rAF && (cancelAnimationFrame(this.rAF), this.rAF = null), this.isBouncingX = !1, this.isBouncingY = !1;
|
|
1987
|
-
for (const
|
|
1991
|
+
for (const Je of v) this.velocity[Je] = 0;
|
|
1988
1992
|
this.target.e = this.current.e, this.target.f = this.current.f, S(this.container, "is-scaling"), S(this.container, "is-animating"), this.isTicking = !1;
|
|
1989
1993
|
const { trackingPoints: $e } = this, Ne = $e[0], Ve = $e[$e.length - 1];
|
|
1990
|
-
let De = 0, Le = 0,
|
|
1991
|
-
Ve && Ne && (De = Ve.clientX - Ne.clientX, Le = Ve.clientY - Ne.clientY,
|
|
1994
|
+
let De = 0, Le = 0, Re = 0;
|
|
1995
|
+
Ve && Ne && (De = Ve.clientX - Ne.clientX, Le = Ve.clientY - Ne.clientY, Re = Ve.time - Ne.time);
|
|
1992
1996
|
const Ie = ((_e = window.visualViewport) === null || _e === void 0 ? void 0 : _e.scale) || 1;
|
|
1993
1997
|
Ie !== 1 && (De *= Ie, Le *= Ie);
|
|
1994
|
-
let
|
|
1995
|
-
const
|
|
1996
|
-
if (
|
|
1997
|
-
je = Math.abs(De) > 3 ? De / (
|
|
1998
|
-
const
|
|
1999
|
-
|
|
1998
|
+
let Ae = 0, ze = 0, je = 0, Fe = 0, We = this.option("decelFriction");
|
|
1999
|
+
const He = this.targetScale;
|
|
2000
|
+
if (Re > 0) {
|
|
2001
|
+
je = Math.abs(De) > 3 ? De / (Re / 30) : 0, Fe = Math.abs(Le) > 3 ? Le / (Re / 30) : 0;
|
|
2002
|
+
const Je = this.option("maxVelocity");
|
|
2003
|
+
Je && (je = Math.max(Math.min(je, Je), -1 * Je), Fe = Math.max(Math.min(Fe, Je), -1 * Je));
|
|
2000
2004
|
}
|
|
2001
|
-
je && (
|
|
2005
|
+
je && (Ae = je / (1 / (1 - We) - 1)), Fe && (ze = Fe / (1 / (1 - We) - 1)), (this.option("lockAxis") === "y" || this.option("lockAxis") === "xy" && this.lockedAxis === "y" && t(He) === this.minScale) && (Ae = je = 0), (this.option("lockAxis") === "x" || this.option("lockAxis") === "xy" && this.lockedAxis === "x" && t(He) === this.minScale) && (ze = Fe = 0);
|
|
2002
2006
|
const qe = this.dragOffset.x, Ue = this.dragOffset.y, Xe = this.option("dragMinThreshold") || 0;
|
|
2003
|
-
Math.abs(qe) < Xe && Math.abs(Ue) < Xe && (
|
|
2007
|
+
Math.abs(qe) < Xe && Math.abs(Ue) < Xe && (Ae = ze = 0, je = Fe = 0), (this.option("zoom") && (He < this.minScale - 1e-5 || He > this.maxScale + 1e-5) || ke && !Ae && !ze) && (We = 0.35), this.applyChange({ panX: Ae, panY: ze, friction: We }), this.emit("decel", je, Fe, qe, Ue);
|
|
2004
2008
|
}
|
|
2005
2009
|
onWheel(_e) {
|
|
2006
2010
|
var ke = [-_e.deltaX || 0, -_e.deltaY || 0, -_e.detail || 0].reduce(function(Ve, De) {
|
|
@@ -2027,62 +2031,62 @@ class I extends g {
|
|
|
2027
2031
|
const Ue = qe == "e" || qe === "f" ? M : T;
|
|
2028
2032
|
Ve[qe] = t(_e[qe], Ue), Math.abs(ke[qe] - _e[qe]) < (qe == "e" || qe === "f" ? 0.51 : 1e-3) && (_e[qe] = ke[qe]);
|
|
2029
2033
|
}
|
|
2030
|
-
let { a: De, b: Le, c:
|
|
2034
|
+
let { a: De, b: Le, c: Re, d: Ie, e: Ae, f: ze } = Ve, je = `matrix(${De}, ${Le}, ${Re}, ${Ie}, ${Ae}, ${ze})`, Fe = $e.parentElement instanceof HTMLPictureElement ? $e.parentElement : $e;
|
|
2031
2035
|
if (this.option("transformParent") && (Fe = Fe.parentElement || Fe), Fe.style.transform === je) return;
|
|
2032
2036
|
Fe.style.transform = je;
|
|
2033
|
-
const { contentWidth:
|
|
2034
|
-
Ne.width =
|
|
2037
|
+
const { contentWidth: We, contentHeight: He } = this.calculateContentDim();
|
|
2038
|
+
Ne.width = We, Ne.height = He, this.emit("afterTransform");
|
|
2035
2039
|
}
|
|
2036
2040
|
updateMetrics(_e = !1) {
|
|
2037
2041
|
var ke;
|
|
2038
2042
|
if (!this || this.state === m.Destroy || this.isContentLoading) return;
|
|
2039
|
-
const $e = Math.max(1, ((ke = window.visualViewport) === null || ke === void 0 ? void 0 : ke.scale) || 1), { container: Ne, content: Ve } = this, De = Ve instanceof HTMLImageElement, Le = Ne.getBoundingClientRect(),
|
|
2040
|
-
let Ie = Le.width * $e,
|
|
2041
|
-
const ze = parseFloat(
|
|
2042
|
-
this.containerRect = { width: Ie, height:
|
|
2043
|
-
const
|
|
2043
|
+
const $e = Math.max(1, ((ke = window.visualViewport) === null || ke === void 0 ? void 0 : ke.scale) || 1), { container: Ne, content: Ve } = this, De = Ve instanceof HTMLImageElement, Le = Ne.getBoundingClientRect(), Re = getComputedStyle(this.container);
|
|
2044
|
+
let Ie = Le.width * $e, Ae = Le.height * $e;
|
|
2045
|
+
const ze = parseFloat(Re.paddingTop) + parseFloat(Re.paddingBottom), je = Ie - (parseFloat(Re.paddingLeft) + parseFloat(Re.paddingRight)), Fe = Ae - ze;
|
|
2046
|
+
this.containerRect = { width: Ie, height: Ae, innerWidth: je, innerHeight: Fe };
|
|
2047
|
+
const We = parseFloat(Ve.dataset.width || "") || ((ni) => {
|
|
2044
2048
|
let ri = 0;
|
|
2045
2049
|
return ri = ni instanceof HTMLImageElement ? ni.naturalWidth : ni instanceof SVGElement ? ni.width.baseVal.value : Math.max(ni.offsetWidth, ni.scrollWidth), ri || 0;
|
|
2046
|
-
})(Ve),
|
|
2050
|
+
})(Ve), He = parseFloat(Ve.dataset.height || "") || ((ni) => {
|
|
2047
2051
|
let ri = 0;
|
|
2048
2052
|
return ri = ni instanceof HTMLImageElement ? ni.naturalHeight : ni instanceof SVGElement ? ni.height.baseVal.value : Math.max(ni.offsetHeight, ni.scrollHeight), ri || 0;
|
|
2049
2053
|
})(Ve);
|
|
2050
|
-
let qe = this.option("width",
|
|
2051
|
-
const Xe = qe === z,
|
|
2052
|
-
typeof qe != "number" && (qe =
|
|
2054
|
+
let qe = this.option("width", We) || z, Ue = this.option("height", He) || z;
|
|
2055
|
+
const Xe = qe === z, Je = Ue === z;
|
|
2056
|
+
typeof qe != "number" && (qe = We), typeof Ue != "number" && (Ue = He), Xe && (qe = We * (Ue / He)), Je && (Ue = He / (We / qe));
|
|
2053
2057
|
let Ze = Ve.parentElement instanceof HTMLPictureElement ? Ve.parentElement : Ve;
|
|
2054
2058
|
this.option("transformParent") && (Ze = Ze.parentElement || Ze);
|
|
2055
2059
|
const Qe = Ze.getAttribute("style") || "";
|
|
2056
2060
|
Ze.style.setProperty("transform", "none", "important"), De && (Ze.style.width = "", Ze.style.height = ""), Ze.offsetHeight;
|
|
2057
|
-
const
|
|
2058
|
-
let
|
|
2059
|
-
|
|
2060
|
-
const li = ai / ni,
|
|
2061
|
-
return { width: ni *=
|
|
2062
|
-
})(qe, Ue,
|
|
2063
|
-
let ei = 0.5 * (Ge -
|
|
2064
|
-
this.contentRect = Object.assign(Object.assign({}, this.contentRect), { top:
|
|
2061
|
+
const oi = Ve.getBoundingClientRect();
|
|
2062
|
+
let ii = oi.width * $e, Ke = oi.height * $e, Ye = ii, Ge = Ke;
|
|
2063
|
+
ii = Math.min(ii, qe), Ke = Math.min(Ke, Ue), De ? { width: ii, height: Ke } = ((ni, ri, ai, si) => {
|
|
2064
|
+
const li = ai / ni, di = si / ri, ui = Math.min(li, di);
|
|
2065
|
+
return { width: ni *= ui, height: ri *= ui };
|
|
2066
|
+
})(qe, Ue, ii, Ke) : (ii = Math.min(ii, qe), Ke = Math.min(Ke, Ue));
|
|
2067
|
+
let ei = 0.5 * (Ge - Ke), ti = 0.5 * (Ye - ii);
|
|
2068
|
+
this.contentRect = Object.assign(Object.assign({}, this.contentRect), { top: oi.top - Le.top + ei, bottom: Le.bottom - oi.bottom + ei, left: oi.left - Le.left + ti, right: Le.right - oi.right + ti, fitWidth: ii, fitHeight: Ke, width: ii, height: Ke, fullWidth: qe, fullHeight: Ue }), Ze.style.cssText = Qe, De && (Ze.style.width = `${ii}px`, Ze.style.height = `${Ke}px`), this.setTransform(), _e !== !0 && this.emit("refresh"), this.ignoreBounds || (t(this.targetScale) < t(this.minScale) ? this.zoomTo(this.minScale, { friction: 0 }) : this.targetScale > this.maxScale ? this.zoomTo(this.maxScale, { friction: 0 }) : this.state === m.Init || this.checkBounds().inBounds || this.requestTick()), this.updateControls();
|
|
2065
2069
|
}
|
|
2066
2070
|
calculateBounds() {
|
|
2067
2071
|
const { contentWidth: _e, contentHeight: ke } = this.calculateContentDim(this.target), { targetScale: $e, lockedAxis: Ne } = this, { fitWidth: Ve, fitHeight: De } = this.contentRect;
|
|
2068
|
-
let Le = 0,
|
|
2072
|
+
let Le = 0, Re = 0, Ie = 0, Ae = 0;
|
|
2069
2073
|
const ze = this.option("infinite");
|
|
2070
|
-
if (ze === !0 || Ne && ze === Ne) Le = -1 / 0, Ie = 1 / 0,
|
|
2074
|
+
if (ze === !0 || Ne && ze === Ne) Le = -1 / 0, Ie = 1 / 0, Re = -1 / 0, Ae = 1 / 0;
|
|
2071
2075
|
else {
|
|
2072
|
-
let { containerRect: je, contentRect: Fe } = this,
|
|
2073
|
-
if (je.width ===
|
|
2076
|
+
let { containerRect: je, contentRect: Fe } = this, We = t(Ve * $e, M), He = t(De * $e, M), { innerWidth: qe, innerHeight: Ue } = je;
|
|
2077
|
+
if (je.width === We && (qe = je.width), je.width === He && (Ue = je.height), _e > qe) {
|
|
2074
2078
|
Ie = 0.5 * (_e - qe), Le = -1 * Ie;
|
|
2075
2079
|
let Xe = 0.5 * (Fe.right - Fe.left);
|
|
2076
2080
|
Le += Xe, Ie += Xe;
|
|
2077
2081
|
}
|
|
2078
2082
|
if (Ve > qe && _e < qe && (Le -= 0.5 * (Ve - qe), Ie -= 0.5 * (Ve - qe)), ke > Ue) {
|
|
2079
|
-
|
|
2083
|
+
Ae = 0.5 * (ke - Ue), Re = -1 * Ae;
|
|
2080
2084
|
let Xe = 0.5 * (Fe.bottom - Fe.top);
|
|
2081
|
-
|
|
2085
|
+
Re += Xe, Ae += Xe;
|
|
2082
2086
|
}
|
|
2083
2087
|
De > Ue && ke < Ue && (Le -= 0.5 * (De - Ue), Ie -= 0.5 * (De - Ue));
|
|
2084
2088
|
}
|
|
2085
|
-
return { x: { min: Le, max: Ie }, y: { min:
|
|
2089
|
+
return { x: { min: Le, max: Ie }, y: { min: Re, max: Ae } };
|
|
2086
2090
|
}
|
|
2087
2091
|
getBounds() {
|
|
2088
2092
|
const _e = this.option("bounds");
|
|
@@ -2090,49 +2094,49 @@ class I extends g {
|
|
|
2090
2094
|
}
|
|
2091
2095
|
updateControls() {
|
|
2092
2096
|
const _e = this, ke = _e.container, { panMode: $e, contentRect: Ne, targetScale: Ve, minScale: De } = _e;
|
|
2093
|
-
let Le = De,
|
|
2094
|
-
|
|
2095
|
-
let Ie = _e.canZoomIn(),
|
|
2097
|
+
let Le = De, Re = _e.option("click") || !1;
|
|
2098
|
+
Re && (Le = _e.getNextScale(Re));
|
|
2099
|
+
let Ie = _e.canZoomIn(), Ae = _e.canZoomOut(), ze = $e === A && !!this.option("touch"), je = Ae && ze;
|
|
2096
2100
|
if (ze && (t(Ve) < t(De) && !this.panOnlyZoomed && (je = !0), (t(Ne.width, 1) > t(Ne.fitWidth, 1) || t(Ne.height, 1) > t(Ne.fitHeight, 1)) && (je = !0)), t(Ne.width * Ve, 1) < t(Ne.fitWidth, 1) && (je = !1), $e === O && (je = !1), o(ke, this.cn("isDraggable"), je), !this.option("zoom")) return;
|
|
2097
|
-
let Fe = Ie && t(Le) > t(Ve),
|
|
2098
|
-
o(ke, this.cn("canZoomIn"), Fe), o(ke, this.cn("canZoomOut"),
|
|
2099
|
-
for (const
|
|
2101
|
+
let Fe = Ie && t(Le) > t(Ve), We = !Fe && !je && Ae && t(Le) < t(Ve);
|
|
2102
|
+
o(ke, this.cn("canZoomIn"), Fe), o(ke, this.cn("canZoomOut"), We);
|
|
2103
|
+
for (const He of ke.querySelectorAll("[data-panzoom-action]")) {
|
|
2100
2104
|
let qe = !1, Ue = !1;
|
|
2101
|
-
switch (
|
|
2105
|
+
switch (He.dataset.panzoomAction) {
|
|
2102
2106
|
case "zoomIn":
|
|
2103
2107
|
Ie ? qe = !0 : Ue = !0;
|
|
2104
2108
|
break;
|
|
2105
2109
|
case "zoomOut":
|
|
2106
|
-
|
|
2110
|
+
Ae ? qe = !0 : Ue = !0;
|
|
2107
2111
|
break;
|
|
2108
2112
|
case "toggleZoom":
|
|
2109
2113
|
case "iterateZoom":
|
|
2110
|
-
Ie ||
|
|
2111
|
-
const Xe =
|
|
2114
|
+
Ie || Ae ? qe = !0 : Ue = !0;
|
|
2115
|
+
const Xe = He.querySelector("g");
|
|
2112
2116
|
Xe && (Xe.style.display = Ie ? "" : "none");
|
|
2113
2117
|
}
|
|
2114
|
-
qe ? (
|
|
2118
|
+
qe ? (He.removeAttribute("disabled"), He.removeAttribute("tabindex")) : Ue && (He.setAttribute("disabled", ""), He.setAttribute("tabindex", "-1"));
|
|
2115
2119
|
}
|
|
2116
2120
|
}
|
|
2117
|
-
panTo({ x: _e = this.target.e, y: ke = this.target.f, scale: $e = this.targetScale, friction: Ne = this.option("friction"), angle: Ve = 0, originX: De = 0, originY: Le = 0, flipX:
|
|
2118
|
-
this.state !== m.Destroy && this.applyChange({ panX: _e - this.target.e, panY: ke - this.target.f, scale: $e / this.targetScale, angle: Ve, originX: De, originY: Le, friction: Ne, flipX:
|
|
2121
|
+
panTo({ x: _e = this.target.e, y: ke = this.target.f, scale: $e = this.targetScale, friction: Ne = this.option("friction"), angle: Ve = 0, originX: De = 0, originY: Le = 0, flipX: Re = !1, flipY: Ie = !1, ignoreBounds: Ae = !1 }) {
|
|
2122
|
+
this.state !== m.Destroy && this.applyChange({ panX: _e - this.target.e, panY: ke - this.target.f, scale: $e / this.targetScale, angle: Ve, originX: De, originY: Le, friction: Ne, flipX: Re, flipY: Ie, ignoreBounds: Ae });
|
|
2119
2123
|
}
|
|
2120
|
-
applyChange({ panX: _e = 0, panY: ke = 0, scale: $e = 1, angle: Ne = 0, originX: Ve = -this.current.e, originY: De = -this.current.f, friction: Le = this.option("friction"), flipX:
|
|
2124
|
+
applyChange({ panX: _e = 0, panY: ke = 0, scale: $e = 1, angle: Ne = 0, originX: Ve = -this.current.e, originY: De = -this.current.f, friction: Le = this.option("friction"), flipX: Re = !1, flipY: Ie = !1, ignoreBounds: Ae = !1, bounce: ze = this.option("bounce") }) {
|
|
2121
2125
|
const je = this.state;
|
|
2122
2126
|
if (je === m.Destroy) return;
|
|
2123
|
-
this.rAF && (cancelAnimationFrame(this.rAF), this.rAF = null), this.friction = Le || 0, this.ignoreBounds =
|
|
2124
|
-
const { current: Fe } = this,
|
|
2125
|
-
let Ue = new DOMMatrix().translate(
|
|
2127
|
+
this.rAF && (cancelAnimationFrame(this.rAF), this.rAF = null), this.friction = Le || 0, this.ignoreBounds = Ae;
|
|
2128
|
+
const { current: Fe } = this, We = Fe.e, He = Fe.f, qe = this.getMatrix(this.target);
|
|
2129
|
+
let Ue = new DOMMatrix().translate(We, He).translate(Ve, De).translate(_e, ke);
|
|
2126
2130
|
if (this.option("zoom")) {
|
|
2127
|
-
if (!
|
|
2128
|
-
const Xe = this.targetScale,
|
|
2129
|
-
Xe * $e <
|
|
2131
|
+
if (!Ae) {
|
|
2132
|
+
const Xe = this.targetScale, Je = this.minScale, Ze = this.maxScale;
|
|
2133
|
+
Xe * $e < Je && ($e = Je / Xe), Xe * $e > Ze && ($e = Ze / Xe);
|
|
2130
2134
|
}
|
|
2131
2135
|
Ue = Ue.scale($e);
|
|
2132
2136
|
}
|
|
2133
|
-
Ue = Ue.translate(-Ve, -De).translate(-
|
|
2137
|
+
Ue = Ue.translate(-Ve, -De).translate(-We, -He).multiply(qe), Ne && (Ue = Ue.rotate(Ne)), Re && (Ue = Ue.scale(-1, 1)), Ie && (Ue = Ue.scale(1, -1));
|
|
2134
2138
|
for (const Xe of v) Xe !== "e" && Xe !== "f" && (Ue[Xe] > this.minScale + 1e-5 || Ue[Xe] < this.minScale - 1e-5) ? this.target[Xe] = Ue[Xe] : this.target[Xe] = t(Ue[Xe], M);
|
|
2135
|
-
(this.targetScale < this.scale || Math.abs($e - 1) > 0.1 || this.panMode === O || ze === !1) && !
|
|
2139
|
+
(this.targetScale < this.scale || Math.abs($e - 1) > 0.1 || this.panMode === O || ze === !1) && !Ae && this.clampTargetBounds(), je === m.Init ? this.animate() : this.isResting || (this.state = m.Panning, this.requestTick());
|
|
2136
2140
|
}
|
|
2137
2141
|
stop(_e = !1) {
|
|
2138
2142
|
if (this.state === m.Init || this.state === m.Destroy) return;
|
|
@@ -2147,26 +2151,26 @@ class I extends g {
|
|
|
2147
2151
|
panWithMouse(_e, ke = this.option("mouseMoveFriction")) {
|
|
2148
2152
|
if (this.pmme = _e, this.panMode !== O || !_e || t(this.targetScale) <= t(this.minScale)) return;
|
|
2149
2153
|
this.emit("mouseMove", _e);
|
|
2150
|
-
const { container: $e, containerRect: Ne, contentRect: Ve } = this, De = Ne.width, Le = Ne.height,
|
|
2154
|
+
const { container: $e, containerRect: Ne, contentRect: Ve } = this, De = Ne.width, Le = Ne.height, Re = $e.getBoundingClientRect(), Ie = (_e.clientX || 0) - Re.left, Ae = (_e.clientY || 0) - Re.top;
|
|
2151
2155
|
let { contentWidth: ze, contentHeight: je } = this.calculateContentDim(this.target);
|
|
2152
2156
|
const Fe = this.option("mouseMoveFactor");
|
|
2153
2157
|
Fe > 1 && (ze !== De && (ze *= Fe), je !== Le && (je *= Fe));
|
|
2154
|
-
let
|
|
2155
|
-
|
|
2156
|
-
let
|
|
2157
|
-
|
|
2158
|
+
let We = 0.5 * (ze - De) - Ie / De * 100 / 100 * (ze - De);
|
|
2159
|
+
We += 0.5 * (Ve.right - Ve.left);
|
|
2160
|
+
let He = 0.5 * (je - Le) - Ae / Le * 100 / 100 * (je - Le);
|
|
2161
|
+
He += 0.5 * (Ve.bottom - Ve.top), this.applyChange({ panX: We - this.target.e, panY: He - this.target.f, friction: ke });
|
|
2158
2162
|
}
|
|
2159
2163
|
zoomWithWheel(_e) {
|
|
2160
2164
|
if (this.state === m.Destroy || this.state === m.Init) return;
|
|
2161
2165
|
const ke = Date.now();
|
|
2162
2166
|
if (ke - this.pwt < 45) return void _e.preventDefault();
|
|
2163
2167
|
this.pwt = ke;
|
|
2164
|
-
var $e = [-_e.deltaX || 0, -_e.deltaY || 0, -_e.detail || 0].reduce(function(Ie,
|
|
2165
|
-
return Math.abs(
|
|
2168
|
+
var $e = [-_e.deltaX || 0, -_e.deltaY || 0, -_e.detail || 0].reduce(function(Ie, Ae) {
|
|
2169
|
+
return Math.abs(Ae) > Math.abs(Ie) ? Ae : Ie;
|
|
2166
2170
|
});
|
|
2167
2171
|
const Ne = Math.max(-1, Math.min(1, $e)), { targetScale: Ve, maxScale: De, minScale: Le } = this;
|
|
2168
|
-
let
|
|
2169
|
-
t(
|
|
2172
|
+
let Re = Ve * (100 + 45 * Ne) / 100;
|
|
2173
|
+
t(Re) < t(Le) && t(Ve) <= t(Le) ? (this.cwd += Math.abs(Ne), Re = Le) : t(Re) > t(De) && t(Ve) >= t(De) ? (this.cwd += Math.abs(Ne), Re = De) : (this.cwd = 0, Re = Math.max(Math.min(Re, De), Le)), this.cwd > this.option("wheelLimit") || (_e.preventDefault(), t(Re) !== t(Ve) && this.zoomTo(Re, { event: _e }));
|
|
2170
2174
|
}
|
|
2171
2175
|
canZoomIn() {
|
|
2172
2176
|
return this.option("zoom") && (t(this.contentRect.width, 1) < t(this.contentRect.fitWidth, 1) || t(this.targetScale) < t(this.maxScale));
|
|
@@ -2206,13 +2210,13 @@ class I extends g {
|
|
|
2206
2210
|
}
|
|
2207
2211
|
zoomTo(_e = 1, { friction: ke = z, originX: $e = z, originY: Ne = z, event: Ve } = {}) {
|
|
2208
2212
|
if (this.isContentLoading || this.state === m.Destroy) return;
|
|
2209
|
-
const { targetScale: De, fullScale: Le, maxScale:
|
|
2213
|
+
const { targetScale: De, fullScale: Le, maxScale: Re, coverScale: Ie } = this;
|
|
2210
2214
|
if (this.stop(), this.panMode === O && (Ve = this.pmme || Ve), Ve || $e === z || Ne === z) {
|
|
2211
|
-
const ze = this.content.getBoundingClientRect(), je = this.container.getBoundingClientRect(), Fe = Ve ? Ve.clientX : je.left + 0.5 * je.width,
|
|
2212
|
-
$e = Fe - ze.left - 0.5 * ze.width, Ne =
|
|
2215
|
+
const ze = this.content.getBoundingClientRect(), je = this.container.getBoundingClientRect(), Fe = Ve ? Ve.clientX : je.left + 0.5 * je.width, We = Ve ? Ve.clientY : je.top + 0.5 * je.height;
|
|
2216
|
+
$e = Fe - ze.left - 0.5 * ze.width, Ne = We - ze.top - 0.5 * ze.height;
|
|
2213
2217
|
}
|
|
2214
|
-
let
|
|
2215
|
-
typeof _e == "number" ?
|
|
2218
|
+
let Ae = 1;
|
|
2219
|
+
typeof _e == "number" ? Ae = _e : _e === "full" ? Ae = Le : _e === "cover" ? Ae = Ie : _e === "max" ? Ae = Re : _e === "fit" ? Ae = 1 : _e === "next" && (Ae = this.getNextScale("iterateZoom")), Ae = Ae / De || 1, ke = ke === z ? Ae > 1 ? 0.15 : 0.25 : ke, this.applyChange({ scale: Ae, originX: $e, originY: Ne, friction: ke }), Ve && this.panMode === O && this.panWithMouse(Ve, ke);
|
|
2216
2220
|
}
|
|
2217
2221
|
rotateCCW() {
|
|
2218
2222
|
this.applyChange({ angle: -90 });
|
|
@@ -2318,20 +2322,20 @@ class W extends _ {
|
|
|
2318
2322
|
if (ke < $e || ke > Ne) return void this.cleanup();
|
|
2319
2323
|
const De = typeof Ve == "number" && ke > 5 && ke >= Ve, Le = !this.list || this.isDynamic !== De || this.list.children.length !== ke;
|
|
2320
2324
|
Le && this.cleanup();
|
|
2321
|
-
const
|
|
2322
|
-
if (o(
|
|
2323
|
-
let Ie,
|
|
2324
|
-
for (const ze of [...
|
|
2325
|
-
const je =
|
|
2325
|
+
const Re = this.build();
|
|
2326
|
+
if (o(Re, this.cn("isDynamic"), !!De), Le) for (let ze = 0; ze < ke; ze++) Re.append(this.createItem(ze));
|
|
2327
|
+
let Ie, Ae = 0;
|
|
2328
|
+
for (const ze of [...Re.children]) {
|
|
2329
|
+
const je = Ae === this.instance.page;
|
|
2326
2330
|
je && (Ie = ze), o(ze, this.cn("isCurrent"), je), (_e = ze.children[0]) === null || _e === void 0 || _e.setAttribute("aria-selected", je ? "true" : "false");
|
|
2327
2331
|
for (const Fe of ["isBeforePrev", "isPrev", "isNext", "isAfterNext"]) S(ze, this.cn(Fe));
|
|
2328
|
-
|
|
2332
|
+
Ae++;
|
|
2329
2333
|
}
|
|
2330
|
-
if (Ie = Ie ||
|
|
2334
|
+
if (Ie = Ie || Re.firstChild, De && Ie) {
|
|
2331
2335
|
const ze = Ie.previousElementSibling, je = ze && ze.previousElementSibling;
|
|
2332
2336
|
P(ze, this.cn("isPrev")), P(je, this.cn("isBeforePrev"));
|
|
2333
|
-
const Fe = Ie.nextElementSibling,
|
|
2334
|
-
P(Fe, this.cn("isNext")), P(
|
|
2337
|
+
const Fe = Ie.nextElementSibling, We = Fe && Fe.nextElementSibling;
|
|
2338
|
+
P(Fe, this.cn("isNext")), P(We, this.cn("isAfterNext"));
|
|
2335
2339
|
}
|
|
2336
2340
|
this.isDynamic = De;
|
|
2337
2341
|
}
|
|
@@ -2415,12 +2419,12 @@ class Z extends _ {
|
|
|
2415
2419
|
onNavTouch(_e, ke, $e) {
|
|
2416
2420
|
var Ne, Ve;
|
|
2417
2421
|
if (Math.abs(ke.dragOffset.x) > 3 || Math.abs(ke.dragOffset.y) > 3) return;
|
|
2418
|
-
const De = $e.target, { nav: Le, target:
|
|
2419
|
-
if (!Le || !
|
|
2422
|
+
const De = $e.target, { nav: Le, target: Re } = this;
|
|
2423
|
+
if (!Le || !Re || !De) return;
|
|
2420
2424
|
const Ie = De.closest("[data-index]");
|
|
2421
2425
|
if ($e.stopPropagation(), $e.preventDefault(), !Ie) return;
|
|
2422
|
-
const
|
|
2423
|
-
Le.slideTo(je),
|
|
2426
|
+
const Ae = parseInt(Ie.dataset.index || "", 10) || 0, ze = Re.getPageForSlide(Ae), je = Le.getPageForSlide(Ae);
|
|
2427
|
+
Le.slideTo(je), Re.slideTo(ze, { friction: ((Ve = (Ne = this.nav) === null || Ne === void 0 ? void 0 : Ne.plugins) === null || Ve === void 0 ? void 0 : Ve.Sync.option("friction")) || 0 }), this.markSelectedSlide(Ae);
|
|
2424
2428
|
}
|
|
2425
2429
|
onNavCreateSlide(_e, ke) {
|
|
2426
2430
|
ke.index === this.selectedIndex && this.markSelectedSlide(ke.index);
|
|
@@ -2540,25 +2544,25 @@ class Q extends g {
|
|
|
2540
2544
|
let Ne = this.option("slidesPerPage");
|
|
2541
2545
|
Ne = (Ne === "auto" || ke <= $e) && this.option("fill") !== !1 ? 1 / 0 : parseFloat(Ne + "");
|
|
2542
2546
|
let Ve = 0, De = 0, Le = 0;
|
|
2543
|
-
for (const
|
|
2547
|
+
for (const Re of this.slides) (!_e.length || De + Re.dim - $e > 0.05 || Le >= Ne) && (_e.push(N()), Ve = _e.length - 1, De = 0, Le = 0), _e[Ve].slides.push(Re), De += Re.dim + Re.gap, Le++;
|
|
2544
2548
|
return _e;
|
|
2545
2549
|
}
|
|
2546
2550
|
processPages() {
|
|
2547
2551
|
const _e = this.pages, { contentDim: ke, viewportDim: $e, isInfinite: Ne } = this, Ve = this.option("center"), De = this.option("fill"), Le = De && Ve && ke > $e && !Ne;
|
|
2548
|
-
if (_e.forEach((
|
|
2552
|
+
if (_e.forEach((Ae, ze) => {
|
|
2549
2553
|
var je;
|
|
2550
|
-
|
|
2551
|
-
for (const [Fe,
|
|
2552
|
-
Le &&
|
|
2553
|
-
}), _e.forEach((
|
|
2554
|
-
De && !Ne && ke > $e && (
|
|
2554
|
+
Ae.index = ze, Ae.pos = ((je = Ae.slides[0]) === null || je === void 0 ? void 0 : je.pos) || 0, Ae.dim = 0;
|
|
2555
|
+
for (const [Fe, We] of Ae.slides.entries()) Ae.dim += We.dim, Fe < Ae.slides.length - 1 && (Ae.dim += We.gap);
|
|
2556
|
+
Le && Ae.pos + 0.5 * Ae.dim < 0.5 * $e ? Ae.pos = 0 : Le && Ae.pos + 0.5 * Ae.dim >= ke - 0.5 * $e ? Ae.pos = ke - $e : Ve && (Ae.pos += -0.5 * ($e - Ae.dim));
|
|
2557
|
+
}), _e.forEach((Ae) => {
|
|
2558
|
+
De && !Ne && ke > $e && (Ae.pos = Math.max(Ae.pos, 0), Ae.pos = Math.min(Ae.pos, ke - $e)), Ae.pos = t(Ae.pos, 1e3), Ae.dim = t(Ae.dim, 1e3), Math.abs(Ae.pos) <= 0.1 && (Ae.pos = 0);
|
|
2555
2559
|
}), Ne) return _e;
|
|
2556
|
-
const
|
|
2560
|
+
const Re = [];
|
|
2557
2561
|
let Ie;
|
|
2558
|
-
return _e.forEach((
|
|
2559
|
-
const ze = Object.assign({},
|
|
2560
|
-
Ie && ze.pos === Ie.pos ? (Ie.dim += ze.dim, Ie.slides = [...Ie.slides, ...ze.slides]) : (ze.index =
|
|
2561
|
-
}),
|
|
2562
|
+
return _e.forEach((Ae) => {
|
|
2563
|
+
const ze = Object.assign({}, Ae);
|
|
2564
|
+
Ie && ze.pos === Ie.pos ? (Ie.dim += ze.dim, Ie.slides = [...Ie.slides, ...ze.slides]) : (ze.index = Re.length, Ie = ze, Re.push(ze));
|
|
2565
|
+
}), Re;
|
|
2562
2566
|
}
|
|
2563
2567
|
getPageFromIndex(_e = 0) {
|
|
2564
2568
|
const ke = this.pages.length;
|
|
@@ -2569,15 +2573,15 @@ class Q extends g {
|
|
|
2569
2573
|
var ke, $e;
|
|
2570
2574
|
const Ne = this.isHorizontal ? "width" : "height";
|
|
2571
2575
|
let Ve = 0, De = 0, Le = _e.el;
|
|
2572
|
-
const
|
|
2576
|
+
const Re = !(!Le || Le.parentNode);
|
|
2573
2577
|
if (Le ? Ve = parseFloat(Le.dataset[Ne] || "") || 0 : (Le = document.createElement("div"), Le.style.visibility = "hidden", (this.track || document.body).prepend(Le)), P(Le, this.cn(J) + " " + _e.class + " " + _e.customClass), Ve) Le.style[Ne] = `${Ve}px`, Le.style[Ne === "width" ? "height" : "width"] = "";
|
|
2574
2578
|
else {
|
|
2575
|
-
|
|
2576
|
-
let
|
|
2577
|
-
|
|
2579
|
+
Re && (this.track || document.body).prepend(Le), Ve = Le.getBoundingClientRect()[Ne] * Math.max(1, ((ke = window.visualViewport) === null || ke === void 0 ? void 0 : ke.scale) || 1);
|
|
2580
|
+
let Ae = Le[this.isHorizontal ? "offsetWidth" : "offsetHeight"];
|
|
2581
|
+
Ae - 1 > Ve && (Ve = Ae);
|
|
2578
2582
|
}
|
|
2579
2583
|
const Ie = getComputedStyle(Le);
|
|
2580
|
-
return Ie.boxSizing === "content-box" && (this.isHorizontal ? (Ve += parseFloat(Ie.paddingLeft) || 0, Ve += parseFloat(Ie.paddingRight) || 0) : (Ve += parseFloat(Ie.paddingTop) || 0, Ve += parseFloat(Ie.paddingBottom) || 0)), De = parseFloat(Ie[this.isHorizontal ? "marginRight" : "marginBottom"]) || 0,
|
|
2584
|
+
return Ie.boxSizing === "content-box" && (this.isHorizontal ? (Ve += parseFloat(Ie.paddingLeft) || 0, Ve += parseFloat(Ie.paddingRight) || 0) : (Ve += parseFloat(Ie.paddingTop) || 0, Ve += parseFloat(Ie.paddingBottom) || 0)), De = parseFloat(Ie[this.isHorizontal ? "marginRight" : "marginBottom"]) || 0, Re ? ($e = Le.parentElement) === null || $e === void 0 || $e.removeChild(Le) : _e.el || Le.remove(), { dim: t(Ve, 1e3), gap: t(De, 1e3) };
|
|
2581
2585
|
}
|
|
2582
2586
|
getBounds() {
|
|
2583
2587
|
const { isInfinite: _e, isRTL: ke, isHorizontal: $e, pages: Ne } = this;
|
|
@@ -2590,21 +2594,21 @@ class Q extends g {
|
|
|
2590
2594
|
return { x: $e ? Ve : { min: 0, max: 0 }, y: $e ? { min: 0, max: 0 } : Ve };
|
|
2591
2595
|
}
|
|
2592
2596
|
repositionSlides() {
|
|
2593
|
-
let _e, { isHorizontal: ke, isRTL: $e, isInfinite: Ne, viewport: Ve, viewportDim: De, contentDim: Le, page:
|
|
2594
|
-
ze ?
|
|
2595
|
-
for (const
|
|
2596
|
-
const Ze =
|
|
2597
|
-
Ze ? (_e === "top" ? (Ze.style.right = "", Ze.style.left = "") : Ze.style.top = "",
|
|
2597
|
+
let _e, { isHorizontal: ke, isRTL: $e, isInfinite: Ne, viewport: Ve, viewportDim: De, contentDim: Le, page: Re, pages: Ie, slides: Ae, panzoom: ze } = this, je = 0, Fe = 0, We = 0, He = 0;
|
|
2598
|
+
ze ? He = -1 * ze.current[this.axis] : Ie[Re] && (He = Ie[Re].pos || 0), _e = ke ? $e ? "right" : "left" : "top", $e && ke && (He *= -1);
|
|
2599
|
+
for (const Je of Ae) {
|
|
2600
|
+
const Ze = Je.el;
|
|
2601
|
+
Ze ? (_e === "top" ? (Ze.style.right = "", Ze.style.left = "") : Ze.style.top = "", Je.index !== je ? Ze.style[_e] = Fe === 0 ? "" : `${t(Fe, 1e3)}px` : Ze.style[_e] = "", We += Je.dim + Je.gap, je++) : Fe += Je.dim + Je.gap;
|
|
2598
2602
|
}
|
|
2599
|
-
if (Ne &&
|
|
2600
|
-
let
|
|
2601
|
-
|
|
2602
|
-
for (const
|
|
2603
|
+
if (Ne && We && Ve) {
|
|
2604
|
+
let Je = getComputedStyle(Ve), Ze = "padding", Qe = ke ? "Right" : "Bottom", oi = parseFloat(Je[Ze + (ke ? "Left" : "Top")]);
|
|
2605
|
+
He -= oi, De += oi, De += parseFloat(Je[Ze + Qe]);
|
|
2606
|
+
for (const ii of Ae) ii.el && (t(ii.pos) < t(De) && t(ii.pos + ii.dim + ii.gap) < t(He) && t(He) > t(Le - De) && (ii.el.style[_e] = `${t(Fe + We, 1e3)}px`), t(ii.pos + ii.gap) >= t(Le - De) && t(ii.pos) > t(He + De) && t(He) < t(De) && (ii.el.style[_e] = `-${t(We, 1e3)}px`));
|
|
2603
2607
|
}
|
|
2604
2608
|
let qe, Ue, Xe = [...this.inTransition];
|
|
2605
2609
|
if (Xe.length > 1 && (qe = Ie[Xe[0]], Ue = Ie[Xe[1]]), qe && Ue) {
|
|
2606
|
-
let
|
|
2607
|
-
for (const Ze of
|
|
2610
|
+
let Je = 0;
|
|
2611
|
+
for (const Ze of Ae) Ze.el ? this.inTransition.has(Ze.index) && qe.slides.indexOf(Ze) < 0 && (Ze.el.style[_e] = `${t(Je + (qe.pos - Ue.pos), 1e3)}px`) : Je += Ze.dim + Ze.gap;
|
|
2608
2612
|
}
|
|
2609
2613
|
}
|
|
2610
2614
|
createSlideEl(_e) {
|
|
@@ -2615,13 +2619,13 @@ class Q extends g {
|
|
|
2615
2619
|
const Ve = _e.html;
|
|
2616
2620
|
Ve && (Ve instanceof HTMLElement ? Ne.appendChild(Ve) : Ne.innerHTML = _e.html + "");
|
|
2617
2621
|
const De = [];
|
|
2618
|
-
$e.forEach((
|
|
2619
|
-
|
|
2622
|
+
$e.forEach((Ae, ze) => {
|
|
2623
|
+
Ae.el && De.push(ze);
|
|
2620
2624
|
});
|
|
2621
2625
|
const Le = _e.index;
|
|
2622
|
-
let
|
|
2623
|
-
De.length && (
|
|
2624
|
-
const Ie =
|
|
2626
|
+
let Re = null;
|
|
2627
|
+
De.length && (Re = $e[De.reduce((Ae, ze) => Math.abs(ze - Le) < Math.abs(Ae - Le) ? ze : Ae)]);
|
|
2628
|
+
const Ie = Re && Re.el && Re.el.parentNode ? Re.index < _e.index ? Re.el.nextSibling : Re.el : null;
|
|
2625
2629
|
ke.insertBefore(Ne, ke.contains(Ie) ? Ie : null), _e.el = Ne, this.emit("createSlide", _e);
|
|
2626
2630
|
}
|
|
2627
2631
|
removeSlideEl(_e, ke = !1) {
|
|
@@ -2636,23 +2640,23 @@ class Q extends g {
|
|
|
2636
2640
|
transitionTo(_e = 0, ke = this.option("transition")) {
|
|
2637
2641
|
var $e, Ne, Ve, De;
|
|
2638
2642
|
if (!ke) return !1;
|
|
2639
|
-
const Le = this.page, { pages:
|
|
2643
|
+
const Le = this.page, { pages: Re, panzoom: Ie } = this;
|
|
2640
2644
|
_e = parseInt((_e || 0).toString()) || 0;
|
|
2641
|
-
const
|
|
2642
|
-
if (!Ie || !Ae
|
|
2645
|
+
const Ae = this.getPageFromIndex(_e);
|
|
2646
|
+
if (!Ie || !Re[Ae] || Re.length < 2 || Math.abs((((Ne = ($e = Re[Le]) === null || $e === void 0 ? void 0 : $e.slides[0]) === null || Ne === void 0 ? void 0 : Ne.dim) || 0) - this.viewportDim) > 1) return !1;
|
|
2643
2647
|
let ze = _e > Le ? 1 : -1;
|
|
2644
|
-
this.isInfinite && (Le === 0 && _e ===
|
|
2645
|
-
const je = Ae
|
|
2646
|
-
if (Le ===
|
|
2648
|
+
this.isInfinite && (Le === 0 && _e === Re.length - 1 && (ze = -1), Le === Re.length - 1 && _e === 0 && (ze = 1));
|
|
2649
|
+
const je = Re[Ae].pos * (this.isRTL ? 1 : -1);
|
|
2650
|
+
if (Le === Ae && Math.abs(je - Ie.target[this.axis]) < 1) return !1;
|
|
2647
2651
|
this.clearTransitions();
|
|
2648
2652
|
const Fe = Ie.isResting;
|
|
2649
2653
|
P(this.container, this.cn("inTransition"));
|
|
2650
|
-
const
|
|
2651
|
-
this.inTransition.add(
|
|
2652
|
-
let qe =
|
|
2654
|
+
const We = ((Ve = Re[Le]) === null || Ve === void 0 ? void 0 : Ve.slides[0]) || null, He = ((De = Re[Ae]) === null || De === void 0 ? void 0 : De.slides[0]) || null;
|
|
2655
|
+
this.inTransition.add(He.index), this.createSlideEl(He);
|
|
2656
|
+
let qe = We.el, Ue = He.el;
|
|
2653
2657
|
Fe || ke === J || (ke = "fadeFast", qe = null);
|
|
2654
|
-
const Xe = this.isRTL ? "next" : "prev",
|
|
2655
|
-
return qe && (this.inTransition.add(
|
|
2658
|
+
const Xe = this.isRTL ? "next" : "prev", Je = this.isRTL ? "prev" : "next";
|
|
2659
|
+
return qe && (this.inTransition.add(We.index), We.transition = ke, qe.addEventListener(G, this.onAnimationEnd), qe.classList.add(`f-${ke}Out`, `to-${ze > 0 ? Je : Xe}`)), Ue && (He.transition = ke, Ue.addEventListener(G, this.onAnimationEnd), Ue.classList.add(`f-${ke}In`, `from-${ze > 0 ? Xe : Je}`)), Ie.current[this.axis] = je, Ie.target[this.axis] = je, Ie.requestTick(), this.onChange(Ae), !0;
|
|
2656
2660
|
}
|
|
2657
2661
|
manageSlideVisiblity() {
|
|
2658
2662
|
const _e = /* @__PURE__ */ new Set(), ke = /* @__PURE__ */ new Set(), $e = this.getVisibleSlides(parseFloat(this.option("preload", 0) + "") || 0);
|
|
@@ -2674,24 +2678,24 @@ class Q extends g {
|
|
|
2674
2678
|
flipInfiniteTrack() {
|
|
2675
2679
|
const { axis: _e, isHorizontal: ke, isInfinite: $e, isRTL: Ne, viewportDim: Ve, contentDim: De } = this, Le = this.panzoom;
|
|
2676
2680
|
if (!Le || !$e) return;
|
|
2677
|
-
let
|
|
2678
|
-
Ne && ke ? (
|
|
2681
|
+
let Re = Le.current[_e], Ie = Le.target[_e] - Re, Ae = 0, ze = 0.5 * Ve;
|
|
2682
|
+
Ne && ke ? (Re < -ze && (Ae = -1, Re += De), Re > De - ze && (Ae = 1, Re -= De)) : (Re > ze && (Ae = 1, Re -= De), Re < -De + ze && (Ae = -1, Re += De)), Ae && (Le.current[_e] = Re, Le.target[_e] = Re + Ie);
|
|
2679
2683
|
}
|
|
2680
2684
|
lazyLoadImg(_e, ke) {
|
|
2681
2685
|
const $e = this, Ne = "f-fadeIn", Ve = "is-preloading";
|
|
2682
2686
|
let De = !1, Le = null;
|
|
2683
|
-
const
|
|
2687
|
+
const Re = () => {
|
|
2684
2688
|
De || (De = !0, Le && (Le.remove(), Le = null), S(ke, Ve), ke.complete && (P(ke, Ne), setTimeout(() => {
|
|
2685
2689
|
S(ke, Ne);
|
|
2686
2690
|
}, 350)), this.option("adaptiveHeight") && _e.el && this.pages[this.page].slides.indexOf(_e) > -1 && ($e.updateMetrics(), $e.setViewportHeight()), this.emit("load", _e));
|
|
2687
2691
|
};
|
|
2688
2692
|
P(ke, Ve), ke.src = ke.dataset.lazySrcset || ke.dataset.lazySrc || "", delete ke.dataset.lazySrc, delete ke.dataset.lazySrcset, ke.addEventListener("error", () => {
|
|
2689
|
-
|
|
2693
|
+
Re();
|
|
2690
2694
|
}), ke.addEventListener("load", () => {
|
|
2691
|
-
|
|
2695
|
+
Re();
|
|
2692
2696
|
}), setTimeout(() => {
|
|
2693
2697
|
const Ie = ke.parentNode;
|
|
2694
|
-
Ie && _e.el && (ke.complete ?
|
|
2698
|
+
Ie && _e.el && (ke.complete ? Re() : De || (Le = n(x), Ie.insertBefore(Le, ke)));
|
|
2695
2699
|
}, 300);
|
|
2696
2700
|
}
|
|
2697
2701
|
lazyLoadSlide(_e) {
|
|
@@ -2713,12 +2717,12 @@ class Q extends g {
|
|
|
2713
2717
|
}
|
|
2714
2718
|
onDecel(_e, ke = 0, $e = 0, Ne = 0, Ve = 0) {
|
|
2715
2719
|
if (this.option("dragFree")) return void this.setPageFromPosition();
|
|
2716
|
-
const { isRTL: De, isHorizontal: Le, axis:
|
|
2720
|
+
const { isRTL: De, isHorizontal: Le, axis: Re, pages: Ie } = this, Ae = Ie.length, ze = Math.abs(Math.atan2($e, ke) / (Math.PI / 180));
|
|
2717
2721
|
let je = 0;
|
|
2718
|
-
if (je = ze > 45 && ze < 135 ? Le ? 0 : $e : Le ? ke : 0, !
|
|
2719
|
-
let Fe = this.page,
|
|
2720
|
-
const
|
|
2721
|
-
let { pageIndex: qe } = this.getPageFromPosition(
|
|
2722
|
+
if (je = ze > 45 && ze < 135 ? Le ? 0 : $e : Le ? ke : 0, !Ae) return;
|
|
2723
|
+
let Fe = this.page, We = De && Le ? 1 : -1;
|
|
2724
|
+
const He = _e.current[Re] * We;
|
|
2725
|
+
let { pageIndex: qe } = this.getPageFromPosition(He);
|
|
2722
2726
|
Math.abs(je) > 5 ? (Ie[Fe].dim < document.documentElement["client" + (this.isHorizontal ? "Width" : "Height")] - 1 && (Fe = qe), Fe = De && Le ? je < 0 ? Fe - 1 : Fe + 1 : je < 0 ? Fe + 1 : Fe - 1) : Fe = Ne === 0 && Ve === 0 ? Fe : qe, this.slideTo(Fe, { transition: !1, friction: _e.option("decelFriction") });
|
|
2723
2727
|
}
|
|
2724
2728
|
onClick(_e) {
|
|
@@ -2757,18 +2761,18 @@ class Q extends g {
|
|
|
2757
2761
|
slideTo(_e = 0, { friction: ke = this.option("friction"), transition: $e = this.option("transition") } = {}) {
|
|
2758
2762
|
if (this.state === B.Destroy) return;
|
|
2759
2763
|
_e = parseInt((_e || 0).toString()) || 0;
|
|
2760
|
-
const Ne = this.getPageFromIndex(_e), { axis: Ve, isHorizontal: De, isRTL: Le, pages:
|
|
2761
|
-
if (!Ie || !
|
|
2764
|
+
const Ne = this.getPageFromIndex(_e), { axis: Ve, isHorizontal: De, isRTL: Le, pages: Re, panzoom: Ie } = this, Ae = Re.length, ze = Le && De ? 1 : -1;
|
|
2765
|
+
if (!Ie || !Ae) return;
|
|
2762
2766
|
if (this.page !== Ne) {
|
|
2763
2767
|
const Fe = new Event("beforeChange", { bubbles: !0, cancelable: !0 });
|
|
2764
2768
|
if (this.emit("beforeChange", Fe, _e), Fe.defaultPrevented) return;
|
|
2765
2769
|
}
|
|
2766
2770
|
if (this.transitionTo(_e, $e)) return;
|
|
2767
|
-
let je =
|
|
2771
|
+
let je = Re[Ne].pos;
|
|
2768
2772
|
if (this.isInfinite) {
|
|
2769
|
-
const Fe = this.contentDim,
|
|
2770
|
-
|
|
2771
|
-
return Math.abs(qe -
|
|
2773
|
+
const Fe = this.contentDim, We = Ie.target[Ve] * ze;
|
|
2774
|
+
Ae === 2 ? je += Fe * Math.floor(parseFloat(_e + "") / 2) : je = [je, je - Fe, je + Fe].reduce(function(He, qe) {
|
|
2775
|
+
return Math.abs(qe - We) < Math.abs(He - We) ? qe : He;
|
|
2772
2776
|
});
|
|
2773
2777
|
}
|
|
2774
2778
|
je *= ze, Math.abs(Ie.target[Ve] - je) < 1 || (Ie.panTo({ x: De ? je : 0, y: De ? 0 : je, friction: ke }), this.onChange(Ne));
|
|
@@ -2800,7 +2804,7 @@ class Q extends g {
|
|
|
2800
2804
|
}
|
|
2801
2805
|
addSlide(_e, ke) {
|
|
2802
2806
|
var $e, Ne, Ve, De;
|
|
2803
|
-
const Le = this.panzoom,
|
|
2807
|
+
const Le = this.panzoom, Re = (($e = this.pages[this.page]) === null || $e === void 0 ? void 0 : $e.pos) || 0, Ie = ((Ne = this.pages[this.page]) === null || Ne === void 0 ? void 0 : Ne.dim) || 0, Ae = this.contentDim < this.viewportDim;
|
|
2804
2808
|
let ze = Array.isArray(ke) ? ke : [ke];
|
|
2805
2809
|
const je = [];
|
|
2806
2810
|
for (const Fe of ze) je.push(H(Fe));
|
|
@@ -2808,8 +2812,8 @@ class Q extends g {
|
|
|
2808
2812
|
for (let Fe = 0; Fe < this.slides.length; Fe++) this.slides[Fe].index = Fe;
|
|
2809
2813
|
for (const Fe of je) this.emit("beforeInitSlide", Fe, Fe.index);
|
|
2810
2814
|
if (this.page >= _e && (this.page += je.length), this.updateMetrics(), Le) {
|
|
2811
|
-
const Fe = ((Ve = this.pages[this.page]) === null || Ve === void 0 ? void 0 : Ve.pos) || 0,
|
|
2812
|
-
|
|
2815
|
+
const Fe = ((Ve = this.pages[this.page]) === null || Ve === void 0 ? void 0 : Ve.pos) || 0, We = ((De = this.pages[this.page]) === null || De === void 0 ? void 0 : De.dim) || 0, He = this.pages.length || 1, qe = this.isRTL ? Ie - We : We - Ie, Ue = this.isRTL ? Re - Fe : Fe - Re;
|
|
2816
|
+
Ae && He === 1 ? (_e <= this.page && (Le.current[this.axis] -= qe, Le.target[this.axis] -= qe), Le.panTo({ [this.isHorizontal ? "x" : "y"]: -1 * Fe })) : Ue && _e <= this.page && (Le.target[this.axis] -= Ue, Le.current[this.axis] -= Ue, Le.requestTick());
|
|
2813
2817
|
}
|
|
2814
2818
|
for (const Fe of je) this.emit("initSlide", Fe, Fe.index);
|
|
2815
2819
|
}
|
|
@@ -2832,26 +2836,26 @@ class Q extends g {
|
|
|
2832
2836
|
updateMetrics() {
|
|
2833
2837
|
const { panzoom: _e, viewport: ke, track: $e, slides: Ne, isHorizontal: Ve, isInfinite: De } = this;
|
|
2834
2838
|
if (!$e) return;
|
|
2835
|
-
const Le = Ve ? "width" : "height",
|
|
2839
|
+
const Le = Ve ? "width" : "height", Re = Ve ? "offsetWidth" : "offsetHeight";
|
|
2836
2840
|
if (ke) {
|
|
2837
|
-
let ze = Math.max(ke[
|
|
2838
|
-
ze -= parseFloat(je[Fe + (Ve ? "Left" : "Top")]) + parseFloat(je[Fe +
|
|
2841
|
+
let ze = Math.max(ke[Re], t(ke.getBoundingClientRect()[Le], 1e3)), je = getComputedStyle(ke), Fe = "padding", We = Ve ? "Right" : "Bottom";
|
|
2842
|
+
ze -= parseFloat(je[Fe + (Ve ? "Left" : "Top")]) + parseFloat(je[Fe + We]), this.viewportDim = ze;
|
|
2839
2843
|
}
|
|
2840
|
-
let Ie,
|
|
2844
|
+
let Ie, Ae = 0;
|
|
2841
2845
|
for (const [ze, je] of Ne.entries()) {
|
|
2842
|
-
let Fe = 0,
|
|
2843
|
-
!je.el && Ie ? (Fe = Ie.dim,
|
|
2846
|
+
let Fe = 0, We = 0;
|
|
2847
|
+
!je.el && Ie ? (Fe = Ie.dim, We = Ie.gap) : ({ dim: Fe, gap: We } = this.getSlideMetrics(je), Ie = je), Fe = t(Fe, 1e3), We = t(We, 1e3), je.dim = Fe, je.gap = We, je.pos = Ae, Ae += Fe, (De || ze < Ne.length - 1) && (Ae += We);
|
|
2844
2848
|
}
|
|
2845
|
-
|
|
2849
|
+
Ae = t(Ae, 1e3), this.contentDim = Ae, _e && (_e.contentRect[Le] = Ae, _e.contentRect[Ve ? "fullWidth" : "fullHeight"] = Ae), this.pages = this.createPages(), this.pages = this.processPages(), this.state === B.Init && this.setInitialPage(), this.page = Math.max(0, Math.min(this.page, this.pages.length - 1)), this.manageSlideVisiblity(), this.emit("refresh");
|
|
2846
2850
|
}
|
|
2847
2851
|
getProgress(_e, ke = !1, $e = !1) {
|
|
2848
2852
|
_e === void 0 && (_e = this.page);
|
|
2849
2853
|
const Ne = this, Ve = Ne.panzoom, De = Ne.contentDim, Le = Ne.pages[_e] || 0;
|
|
2850
2854
|
if (!Le || !Ve) return _e > this.page ? -1 : 1;
|
|
2851
|
-
let
|
|
2852
|
-
this.isInfinite && $e !== !0 && (
|
|
2853
|
-
let je = [Ie,
|
|
2854
|
-
return Math.abs(
|
|
2855
|
+
let Re = -1 * Ve.current.e, Ie = t((Re - Le.pos) / (1 * Le.dim), 1e3), Ae = Ie, ze = Ie;
|
|
2856
|
+
this.isInfinite && $e !== !0 && (Ae = t((Re - Le.pos + De) / (1 * Le.dim), 1e3), ze = t((Re - Le.pos - De) / (1 * Le.dim), 1e3));
|
|
2857
|
+
let je = [Ie, Ae, ze].reduce(function(Fe, We) {
|
|
2858
|
+
return Math.abs(We) < Math.abs(Fe) ? We : Fe;
|
|
2855
2859
|
});
|
|
2856
2860
|
return ke ? je : je > 1 ? 1 : je < -1 ? -1 : je;
|
|
2857
2861
|
}
|
|
@@ -2870,28 +2874,28 @@ class Q extends g {
|
|
|
2870
2874
|
getVisibleSlides(_e = 0) {
|
|
2871
2875
|
var ke;
|
|
2872
2876
|
const $e = /* @__PURE__ */ new Set();
|
|
2873
|
-
let { panzoom: Ne, contentDim: Ve, viewportDim: De, pages: Le, page:
|
|
2877
|
+
let { panzoom: Ne, contentDim: Ve, viewportDim: De, pages: Le, page: Re } = this;
|
|
2874
2878
|
if (De) {
|
|
2875
2879
|
Ve = Ve + ((ke = this.slides[this.slides.length - 1]) === null || ke === void 0 ? void 0 : ke.gap) || 0;
|
|
2876
2880
|
let Ie = 0;
|
|
2877
|
-
Ie = Ne && Ne.state !== m.Init && Ne.state !== m.Destroy ? -1 * Ne.current[this.axis] : Le[
|
|
2878
|
-
const
|
|
2879
|
-
for (const Fe of this.slides) for (const
|
|
2880
|
-
const
|
|
2881
|
-
|
|
2881
|
+
Ie = Ne && Ne.state !== m.Init && Ne.state !== m.Destroy ? -1 * Ne.current[this.axis] : Le[Re] && Le[Re].pos || 0, this.isInfinite && (Ie -= Math.floor(Ie / Ve) * Ve), this.isRTL && this.isHorizontal && (Ie *= -1);
|
|
2882
|
+
const Ae = Ie - De * _e, ze = Ie + De * (_e + 1), je = this.isInfinite ? [-1, 0, 1] : [0];
|
|
2883
|
+
for (const Fe of this.slides) for (const We of je) {
|
|
2884
|
+
const He = Fe.pos + We * Ve, qe = He + Fe.dim + Fe.gap;
|
|
2885
|
+
He < ze && qe > Ae && $e.add(Fe);
|
|
2882
2886
|
}
|
|
2883
2887
|
}
|
|
2884
2888
|
return $e;
|
|
2885
2889
|
}
|
|
2886
2890
|
getPageFromPosition(_e) {
|
|
2887
|
-
const { viewportDim: ke, contentDim: $e, slides: Ne, pages: Ve, panzoom: De } = this, Le = Ve.length,
|
|
2888
|
-
let je = 0, Fe = 0,
|
|
2889
|
-
ze && (
|
|
2890
|
-
let qe =
|
|
2891
|
-
const
|
|
2892
|
-
return qe = Xe,
|
|
2891
|
+
const { viewportDim: ke, contentDim: $e, slides: Ne, pages: Ve, panzoom: De } = this, Le = Ve.length, Re = Ne.length, Ie = Ne[0], Ae = Ne[Re - 1], ze = this.option("center");
|
|
2892
|
+
let je = 0, Fe = 0, We = 0, He = _e === void 0 ? -1 * ((De == null ? void 0 : De.target[this.axis]) || 0) : _e;
|
|
2893
|
+
ze && (He += 0.5 * ke), this.isInfinite ? (He < Ie.pos - 0.5 * Ae.gap && (He -= $e, We = -1), He > Ae.pos + Ae.dim + 0.5 * Ae.gap && (He -= $e, We = 1)) : He = Math.max(Ie.pos || 0, Math.min(He, Ae.pos));
|
|
2894
|
+
let qe = Ae, Ue = Ne.find((Xe) => {
|
|
2895
|
+
const Je = Xe.pos - 0.5 * qe.gap, Ze = Xe.pos + Xe.dim + 0.5 * Xe.gap;
|
|
2896
|
+
return qe = Xe, He >= Je && He < Ze;
|
|
2893
2897
|
});
|
|
2894
|
-
return Ue || (Ue =
|
|
2898
|
+
return Ue || (Ue = Ae), Fe = this.getPageForSlide(Ue.index), je = Fe + We * Le, { page: je, pageIndex: Fe };
|
|
2895
2899
|
}
|
|
2896
2900
|
setPageFromPosition() {
|
|
2897
2901
|
const { pageIndex: _e } = this.getPageFromPosition();
|
|
@@ -2901,10 +2905,10 @@ class Q extends g {
|
|
|
2901
2905
|
if ([B.Destroy].includes(this.state)) return;
|
|
2902
2906
|
this.state = B.Destroy;
|
|
2903
2907
|
const { container: _e, viewport: ke, track: $e, slides: Ne, panzoom: Ve } = this, De = this.option("classes");
|
|
2904
|
-
_e.removeEventListener("click", this.onClick, { passive: !1, capture: !1 }), _e.removeEventListener("slideTo", this.onSlideTo), window.removeEventListener("resize", this.onResize), Ve && (Ve.destroy(), this.panzoom = null), Ne && Ne.forEach((
|
|
2905
|
-
this.removeSlideEl(
|
|
2908
|
+
_e.removeEventListener("click", this.onClick, { passive: !1, capture: !1 }), _e.removeEventListener("slideTo", this.onSlideTo), window.removeEventListener("resize", this.onResize), Ve && (Ve.destroy(), this.panzoom = null), Ne && Ne.forEach((Re) => {
|
|
2909
|
+
this.removeSlideEl(Re);
|
|
2906
2910
|
}), this.detachPlugins(), ke && (ke.removeEventListener("scroll", this.onScroll), ke.offsetParent && $e && $e.offsetParent && ke.replaceWith(...$e.childNodes));
|
|
2907
|
-
for (const [
|
|
2911
|
+
for (const [Re, Ie] of Object.entries(De)) Re !== "container" && Ie && _e.classList.remove(Ie);
|
|
2908
2912
|
this.track = null, this.viewport = null, this.page = 0, this.slides = [];
|
|
2909
2913
|
const Le = this.events.get("ready");
|
|
2910
2914
|
this.events = /* @__PURE__ */ new Map(), Le && this.events.set("ready", Le);
|
|
@@ -2916,9 +2920,9 @@ const tt = function(Be) {
|
|
|
2916
2920
|
const _e = window.scrollY, ke = window.innerHeight, $e = _e + ke, Ne = Be.getBoundingClientRect(), Ve = Ne.y + _e, De = Ne.height, Le = Ve + De;
|
|
2917
2921
|
if (_e > Le || $e < Ve) return 0;
|
|
2918
2922
|
if (_e < Ve && $e > Le || Ve < _e && Le > $e) return 100;
|
|
2919
|
-
let
|
|
2920
|
-
Ve < _e && (
|
|
2921
|
-
const Ie =
|
|
2923
|
+
let Re = De;
|
|
2924
|
+
Ve < _e && (Re -= _e - Ve), Le > $e && (Re -= Le - $e);
|
|
2925
|
+
const Ie = Re / ke * 100;
|
|
2922
2926
|
return Math.round(Ie);
|
|
2923
2927
|
}, et = !(typeof window > "u" || !window.document || !window.document.createElement);
|
|
2924
2928
|
let it;
|
|
@@ -3015,37 +3019,37 @@ class wt extends _ {
|
|
|
3015
3019
|
var _e;
|
|
3016
3020
|
const ke = this.instance, $e = ke.container, Ne = ke.getSlide();
|
|
3017
3021
|
if (!$e || !$e.parentElement || !Ne) return;
|
|
3018
|
-
const { el: Ve, contentEl: De, panzoom: Le, thumbElSrc:
|
|
3019
|
-
if (!Ve || !
|
|
3022
|
+
const { el: Ve, contentEl: De, panzoom: Le, thumbElSrc: Re } = Ne;
|
|
3023
|
+
if (!Ve || !Re || !De || !Le || Le.isContentLoading || Le.state === m.Init || Le.state === m.Destroy) return;
|
|
3020
3024
|
Le.updateMetrics();
|
|
3021
3025
|
let Ie = this.getZoomInfo(Ne);
|
|
3022
3026
|
if (!Ie) return;
|
|
3023
|
-
this.instance.state = rt.CustomClosing, $e.classList.remove(yt), $e.classList.add("is-zooming-out"), De.style.backgroundImage = `url('${
|
|
3024
|
-
const
|
|
3025
|
-
(((_e = window.visualViewport) === null || _e === void 0 ? void 0 : _e.scale) || 1) === 1 && Object.assign($e.style, { position: "absolute", top: `${$e.offsetTop + window.scrollY}px`, left: `${$e.offsetLeft + window.scrollX}px`, bottom: "auto", right: "auto", width: `${
|
|
3026
|
-
const { x: ze, y: je, scale: Fe, opacity:
|
|
3027
|
-
if (
|
|
3028
|
-
const
|
|
3029
|
-
const Ze = Ue - qe, Qe =
|
|
3030
|
-
return (
|
|
3027
|
+
this.instance.state = rt.CustomClosing, $e.classList.remove(yt), $e.classList.add("is-zooming-out"), De.style.backgroundImage = `url('${Re}')`;
|
|
3028
|
+
const Ae = $e.getBoundingClientRect();
|
|
3029
|
+
(((_e = window.visualViewport) === null || _e === void 0 ? void 0 : _e.scale) || 1) === 1 && Object.assign($e.style, { position: "absolute", top: `${$e.offsetTop + window.scrollY}px`, left: `${$e.offsetLeft + window.scrollX}px`, bottom: "auto", right: "auto", width: `${Ae.width}px`, height: `${Ae.height}px`, overflow: "hidden" });
|
|
3030
|
+
const { x: ze, y: je, scale: Fe, opacity: We } = Ie;
|
|
3031
|
+
if (We) {
|
|
3032
|
+
const He = ((qe, Ue, Xe, Je) => {
|
|
3033
|
+
const Ze = Ue - qe, Qe = Je - Xe;
|
|
3034
|
+
return (oi) => Xe + ((oi - qe) / Ze * Qe || 0);
|
|
3031
3035
|
})(Le.scale, Fe, 1, 0);
|
|
3032
3036
|
Le.on("afterTransform", () => {
|
|
3033
|
-
De.style.opacity =
|
|
3037
|
+
De.style.opacity = He(Le.scale) + "";
|
|
3034
3038
|
});
|
|
3035
3039
|
}
|
|
3036
3040
|
Le.on("endAnimation", () => {
|
|
3037
3041
|
ke.destroy();
|
|
3038
|
-
}), Le.target.a = Fe, Le.target.b = 0, Le.target.c = 0, Le.target.d = Fe, Le.panTo({ x: ze, y: je, scale: Fe, friction:
|
|
3042
|
+
}), Le.target.a = Fe, Le.target.b = 0, Le.target.c = 0, Le.target.d = Fe, Le.panTo({ x: ze, y: je, scale: Fe, friction: We ? 0.2 : 0.33, ignoreBounds: !0 }), Le.isResting && ke.destroy();
|
|
3039
3043
|
}
|
|
3040
3044
|
setImage(_e, ke) {
|
|
3041
3045
|
const $e = this.instance;
|
|
3042
3046
|
_e.src = ke, this.process(_e, ke).then((Ne) => {
|
|
3043
|
-
const { contentEl: Ve, imageEl: De, thumbElSrc: Le, el:
|
|
3047
|
+
const { contentEl: Ve, imageEl: De, thumbElSrc: Le, el: Re } = _e;
|
|
3044
3048
|
if ($e.isClosing() || !Ve || !De) return;
|
|
3045
3049
|
Ve.offsetHeight;
|
|
3046
3050
|
const Ie = !!$e.isOpeningSlide(_e) && this.getZoomInfo(_e);
|
|
3047
|
-
if (this.option("protected") &&
|
|
3048
|
-
|
|
3051
|
+
if (this.option("protected") && Re) {
|
|
3052
|
+
Re.addEventListener("contextmenu", (je) => {
|
|
3049
3053
|
je.preventDefault();
|
|
3050
3054
|
});
|
|
3051
3055
|
const ze = document.createElement("div");
|
|
@@ -3055,30 +3059,30 @@ class wt extends _ {
|
|
|
3055
3059
|
const ze = Ne.contentRect, je = Math.max(ze.fullWidth, ze.fullHeight);
|
|
3056
3060
|
let Fe = null;
|
|
3057
3061
|
!Ie.opacity && je > 1200 && (Fe = document.createElement("img"), P(Fe, "fancybox-ghost"), Fe.src = Le, Ve.appendChild(Fe));
|
|
3058
|
-
const
|
|
3062
|
+
const We = () => {
|
|
3059
3063
|
Fe && (P(Fe, "f-fadeFastOut"), setTimeout(() => {
|
|
3060
3064
|
Fe && (Fe.remove(), Fe = null);
|
|
3061
3065
|
}, 200));
|
|
3062
3066
|
};
|
|
3063
|
-
(
|
|
3067
|
+
(Ae = Le, new Promise((He, qe) => {
|
|
3064
3068
|
const Ue = new Image();
|
|
3065
|
-
Ue.onload =
|
|
3069
|
+
Ue.onload = He, Ue.onerror = qe, Ue.src = Ae;
|
|
3066
3070
|
})).then(() => {
|
|
3067
3071
|
$e.hideLoading(_e), _e.state = lt.Opening, this.instance.emit("reveal", _e), this.zoomIn(_e).then(() => {
|
|
3068
|
-
|
|
3072
|
+
We(), this.instance.done(_e);
|
|
3069
3073
|
}, () => {
|
|
3070
3074
|
}), Fe && setTimeout(() => {
|
|
3071
|
-
|
|
3075
|
+
We();
|
|
3072
3076
|
}, je > 2500 ? 800 : 200);
|
|
3073
3077
|
}, () => {
|
|
3074
3078
|
$e.hideLoading(_e), $e.revealContent(_e);
|
|
3075
3079
|
});
|
|
3076
3080
|
} else {
|
|
3077
3081
|
const ze = this.optionFor(_e, "initialSize"), je = this.optionFor(_e, "zoom"), Fe = { event: $e.prevMouseMoveEvent || $e.options.event, friction: je ? 0.12 : 0 };
|
|
3078
|
-
let
|
|
3079
|
-
$e.isOpeningSlide(_e) && (ze === "full" ? Ne.zoomToFull(Fe) : ze === "cover" ? Ne.zoomToCover(Fe) : ze === "max" ? Ne.zoomToMax(Fe) :
|
|
3082
|
+
let We = $e.optionFor(_e, "showClass") || void 0, He = !0;
|
|
3083
|
+
$e.isOpeningSlide(_e) && (ze === "full" ? Ne.zoomToFull(Fe) : ze === "cover" ? Ne.zoomToCover(Fe) : ze === "max" ? Ne.zoomToMax(Fe) : He = !1, Ne.stop("current")), He && We && (We = Ne.isDragging ? "f-fadeIn" : ""), $e.hideLoading(_e), $e.revealContent(_e, We);
|
|
3080
3084
|
}
|
|
3081
|
-
var
|
|
3085
|
+
var Ae;
|
|
3082
3086
|
}, () => {
|
|
3083
3087
|
$e.setError(_e, "{{IMAGE_ERROR}}");
|
|
3084
3088
|
});
|
|
@@ -3088,25 +3092,25 @@ class wt extends _ {
|
|
|
3088
3092
|
var Ve;
|
|
3089
3093
|
const De = this.instance, Le = _e.el;
|
|
3090
3094
|
De.clearContent(_e), De.showLoading(_e);
|
|
3091
|
-
let
|
|
3092
|
-
if (typeof
|
|
3093
|
-
if (
|
|
3094
|
-
let Ie = "",
|
|
3095
|
-
Ie = typeof
|
|
3095
|
+
let Re = this.optionFor(_e, "content");
|
|
3096
|
+
if (typeof Re == "string" && (Re = n(Re)), !Re || !E(Re)) {
|
|
3097
|
+
if (Re = document.createElement("img"), Re instanceof HTMLImageElement) {
|
|
3098
|
+
let Ie = "", Ae = _e.caption;
|
|
3099
|
+
Ie = typeof Ae == "string" && Ae ? Ae.replace(/<[^>]+>/gi, "").substring(0, 1e3) : `Image ${_e.index + 1} of ${((Ve = De.carousel) === null || Ve === void 0 ? void 0 : Ve.pages.length) || 1}`, Re.src = ke || "", Re.alt = Ie, Re.draggable = !1, _e.srcset && Re.setAttribute("srcset", _e.srcset), this.instance.isOpeningSlide(_e) && (Re.fetchPriority = "high");
|
|
3096
3100
|
}
|
|
3097
|
-
_e.sizes &&
|
|
3101
|
+
_e.sizes && Re.setAttribute("sizes", _e.sizes);
|
|
3098
3102
|
}
|
|
3099
|
-
P(
|
|
3103
|
+
P(Re, "fancybox-image"), _e.imageEl = Re, De.setContent(_e, Re, !1), _e.panzoom = new I(Le, u({ transformParent: !0 }, this.option("Panzoom") || {}, { content: Re, width: (Ie, Ae) => De.optionFor(_e, "width", "auto", Ae) || "auto", height: (Ie, Ae) => De.optionFor(_e, "height", "auto", Ae) || "auto", wheel: () => {
|
|
3100
3104
|
const Ie = De.option("wheel");
|
|
3101
3105
|
return (Ie === "zoom" || Ie == "pan") && Ie;
|
|
3102
|
-
}, click: (Ie,
|
|
3106
|
+
}, click: (Ie, Ae) => {
|
|
3103
3107
|
var ze, je;
|
|
3104
3108
|
if (De.isCompact || De.isClosing() || _e.index !== ((ze = De.getSlide()) === null || ze === void 0 ? void 0 : ze.index)) return !1;
|
|
3105
|
-
if (
|
|
3106
|
-
const
|
|
3107
|
-
if (["A", "BUTTON", "TEXTAREA", "OPTION", "INPUT", "SELECT", "VIDEO"].includes(
|
|
3109
|
+
if (Ae) {
|
|
3110
|
+
const We = Ae.composedPath()[0];
|
|
3111
|
+
if (["A", "BUTTON", "TEXTAREA", "OPTION", "INPUT", "SELECT", "VIDEO"].includes(We.nodeName)) return !1;
|
|
3108
3112
|
}
|
|
3109
|
-
let Fe = !
|
|
3113
|
+
let Fe = !Ae || Ae.target && ((je = _e.contentEl) === null || je === void 0 ? void 0 : je.contains(Ae.target));
|
|
3110
3114
|
return De.option(Fe ? "contentClick" : "backdropClick") || !1;
|
|
3111
3115
|
}, dblClick: () => De.isCompact ? "toggleZoom" : De.option("contentDblClick") || !1, spinner: !1, panOnlyZoomed: !0, wheelLimit: 1 / 0, on: { ready: (Ie) => {
|
|
3112
3116
|
$e(Ie);
|
|
@@ -3119,18 +3123,18 @@ class wt extends _ {
|
|
|
3119
3123
|
}
|
|
3120
3124
|
zoomIn(_e) {
|
|
3121
3125
|
return new Promise((ke, $e) => {
|
|
3122
|
-
const Ne = this.instance, Ve = Ne.container, { panzoom: De, contentEl: Le, el:
|
|
3126
|
+
const Ne = this.instance, Ve = Ne.container, { panzoom: De, contentEl: Le, el: Re } = _e;
|
|
3123
3127
|
De && De.updateMetrics();
|
|
3124
3128
|
const Ie = this.getZoomInfo(_e);
|
|
3125
|
-
if (!(Ie &&
|
|
3126
|
-
const { x:
|
|
3129
|
+
if (!(Ie && Re && Le && De && Ve)) return void $e();
|
|
3130
|
+
const { x: Ae, y: ze, scale: je, opacity: Fe } = Ie, We = () => {
|
|
3127
3131
|
_e.state !== lt.Closing && (Fe && (Le.style.opacity = Math.max(Math.min(1, 1 - (1 - De.scale) / (1 - je)), 0) + ""), De.scale >= 1 && De.scale > De.targetScale - 0.1 && ke(De));
|
|
3128
|
-
},
|
|
3129
|
-
(Xe.scale < 0.99 || Xe.scale > 1.01) && !Xe.isDragging || (S(Ve, yt), Le.style.opacity = "", Xe.off("endAnimation",
|
|
3132
|
+
}, He = (Xe) => {
|
|
3133
|
+
(Xe.scale < 0.99 || Xe.scale > 1.01) && !Xe.isDragging || (S(Ve, yt), Le.style.opacity = "", Xe.off("endAnimation", He), Xe.off("touchStart", He), Xe.off("afterTransform", We), ke(Xe));
|
|
3130
3134
|
};
|
|
3131
|
-
De.on("endAnimation",
|
|
3135
|
+
De.on("endAnimation", He), De.on("touchStart", He), De.on("afterTransform", We), De.on(["error", "destroy"], () => {
|
|
3132
3136
|
$e();
|
|
3133
|
-
}), De.panTo({ x:
|
|
3137
|
+
}), De.panTo({ x: Ae, y: ze, scale: je, friction: 0, ignoreBounds: !0 }), De.stop("current");
|
|
3134
3138
|
const qe = { event: De.panMode === "mousemove" ? Ne.prevMouseMoveEvent || Ne.options.event : void 0 }, Ue = this.optionFor(_e, "initialSize");
|
|
3135
3139
|
P(Ve, yt), Ne.hideLoading(_e), Ue === "full" ? De.zoomToFull(qe) : Ue === "cover" ? De.zoomToCover(qe) : Ue === "max" ? De.zoomToMax(qe) : De.reset(0.172);
|
|
3136
3140
|
});
|
|
@@ -3138,15 +3142,15 @@ class wt extends _ {
|
|
|
3138
3142
|
getZoomInfo(_e) {
|
|
3139
3143
|
const { el: ke, imageEl: $e, thumbEl: Ne, panzoom: Ve } = _e, De = this.instance, Le = De.container;
|
|
3140
3144
|
if (!ke || !$e || !Ne || !Ve || tt(Ne) < 3 || !this.optionFor(_e, "zoom") || !Le || De.state === rt.Destroy || getComputedStyle(Le).getPropertyValue("--f-images-zoom") === "0") return !1;
|
|
3141
|
-
const
|
|
3142
|
-
if ((
|
|
3143
|
-
let { top: Ie, left:
|
|
3144
|
-
if (!(ze && je &&
|
|
3145
|
+
const Re = window.visualViewport || null;
|
|
3146
|
+
if ((Re ? Re.scale : 1) !== 1) return !1;
|
|
3147
|
+
let { top: Ie, left: Ae, width: ze, height: je } = Ne.getBoundingClientRect(), { top: Fe, left: We, fitWidth: He, fitHeight: qe } = Ve.contentRect;
|
|
3148
|
+
if (!(ze && je && He && qe)) return !1;
|
|
3145
3149
|
const Ue = Ve.container.getBoundingClientRect();
|
|
3146
|
-
|
|
3147
|
-
const Xe = -1 * (
|
|
3150
|
+
We += Ue.left, Fe += Ue.top;
|
|
3151
|
+
const Xe = -1 * (We + 0.5 * He - (Ae + 0.5 * ze)), Je = -1 * (Fe + 0.5 * qe - (Ie + 0.5 * je)), Ze = ze / He;
|
|
3148
3152
|
let Qe = this.option("zoomOpacity") || !1;
|
|
3149
|
-
return Qe === "auto" && (Qe = Math.abs(ze / je -
|
|
3153
|
+
return Qe === "auto" && (Qe = Math.abs(ze / je - He / qe) > 0.1), { x: Xe, y: Je, scale: Ze, opacity: Qe };
|
|
3150
3154
|
}
|
|
3151
3155
|
attach() {
|
|
3152
3156
|
const _e = this, ke = _e.instance;
|
|
@@ -3160,11 +3164,11 @@ class wt extends _ {
|
|
|
3160
3164
|
Object.defineProperty(wt, "defaults", { enumerable: !0, configurable: !0, writable: !0, value: { initialSize: "fit", Panzoom: { maxScale: 1 }, protected: !1, zoom: !0, zoomOpacity: "auto" } }), typeof SuppressedError == "function" && SuppressedError;
|
|
3161
3165
|
const xt = "html", Et = "image", St = "map", Pt = "youtube", Ct = "vimeo", Tt = "html5video", Mt = (Be, _e = {}) => {
|
|
3162
3166
|
const ke = new URL(Be), $e = new URLSearchParams(ke.search), Ne = new URLSearchParams();
|
|
3163
|
-
for (const [Le,
|
|
3164
|
-
let Ie =
|
|
3167
|
+
for (const [Le, Re] of [...$e, ...Object.entries(_e)]) {
|
|
3168
|
+
let Ie = Re + "";
|
|
3165
3169
|
if (Le === "t") {
|
|
3166
|
-
let
|
|
3167
|
-
|
|
3170
|
+
let Ae = Ie.match(/((\d*)m)?(\d*)s?/);
|
|
3171
|
+
Ae && Ne.set("start", 60 * parseInt(Ae[2] || "0") + parseInt(Ae[3] || "0") + "");
|
|
3168
3172
|
} else Ne.set(Le, Ie);
|
|
3169
3173
|
}
|
|
3170
3174
|
let Ve = Ne + "", De = Be.match(/#t=((.*)?\d+s)/);
|
|
@@ -3260,7 +3264,7 @@ class Lt extends _ {
|
|
|
3260
3264
|
$e.classList.add("is-loading");
|
|
3261
3265
|
const Ne = this.instance, Ve = document.createElement("iframe");
|
|
3262
3266
|
Ve.className = "fancybox__iframe", Ve.setAttribute("id", `fancybox__iframe_${Ne.id}_${_e.index}`);
|
|
3263
|
-
for (const [Le,
|
|
3267
|
+
for (const [Le, Re] of Object.entries(this.optionFor(_e, "iframeAttr") || {})) Ve.setAttribute(Le, Re);
|
|
3264
3268
|
Ve.onerror = () => {
|
|
3265
3269
|
Ne.setError(_e, "{{IFRAME_ERROR}}");
|
|
3266
3270
|
}, _e.iframeEl = Ve;
|
|
@@ -3281,18 +3285,18 @@ class Lt extends _ {
|
|
|
3281
3285
|
Ve === void 0 && (Ve = this.optionFor(_e, "autoSize"));
|
|
3282
3286
|
let De = _e.width || 0, Le = _e.height || 0;
|
|
3283
3287
|
De && Le && (Ve = !1);
|
|
3284
|
-
const
|
|
3285
|
-
if (_e.preload !== !1 && Ve !== !1 &&
|
|
3286
|
-
const Ie = window.getComputedStyle(Ne),
|
|
3288
|
+
const Re = Ne && Ne.style;
|
|
3289
|
+
if (_e.preload !== !1 && Ve !== !1 && Re) try {
|
|
3290
|
+
const Ie = window.getComputedStyle(Ne), Ae = parseFloat(Ie.paddingLeft) + parseFloat(Ie.paddingRight), ze = parseFloat(Ie.paddingTop) + parseFloat(Ie.paddingBottom), je = $e.contentWindow;
|
|
3287
3291
|
if (je) {
|
|
3288
|
-
const Fe = je.document,
|
|
3289
|
-
|
|
3292
|
+
const Fe = je.document, We = Fe.getElementsByTagName(xt)[0], He = Fe.body;
|
|
3293
|
+
Re.width = "", He.style.overflow = "hidden", De = De || We.scrollWidth + Ae, Re.width = `${De}px`, He.style.overflow = "", Re.flex = "0 0 auto", Re.height = `${He.scrollHeight}px`, Le = We.scrollHeight + ze;
|
|
3290
3294
|
}
|
|
3291
3295
|
} catch {
|
|
3292
3296
|
}
|
|
3293
3297
|
if (De || Le) {
|
|
3294
3298
|
const Ie = { flex: "0 1 auto", width: "", height: "" };
|
|
3295
|
-
De && De !== "auto" && (Ie.width = `${De}px`), Le && Le !== "auto" && (Ie.height = `${Le}px`), Object.assign(
|
|
3299
|
+
De && De !== "auto" && (Ie.width = `${De}px`), Le && Le !== "auto" && (Ie.height = `${Le}px`), Object.assign(Re, Ie);
|
|
3296
3300
|
}
|
|
3297
3301
|
}
|
|
3298
3302
|
playVideo() {
|
|
@@ -3330,14 +3334,14 @@ class Lt extends _ {
|
|
|
3330
3334
|
if (Ne = ke.match(/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(?:watch\?(?:.*&)?v=|v\/|u\/|shorts\/|embed\/?)?(videoseries\?list=(?:.*)|[\w-]{11}|\?listType=(?:.*)&list=(?:.*))(?:.*)/i)) {
|
|
3331
3335
|
const Ve = this.optionFor(_e, Pt), { nocookie: De } = Ve, Le = function(ze, je) {
|
|
3332
3336
|
var Fe = {};
|
|
3333
|
-
for (var
|
|
3337
|
+
for (var We in ze) Object.prototype.hasOwnProperty.call(ze, We) && je.indexOf(We) < 0 && (Fe[We] = ze[We]);
|
|
3334
3338
|
if (ze != null && typeof Object.getOwnPropertySymbols == "function") {
|
|
3335
|
-
var
|
|
3336
|
-
for (
|
|
3339
|
+
var He = 0;
|
|
3340
|
+
for (We = Object.getOwnPropertySymbols(ze); He < We.length; He++) je.indexOf(We[He]) < 0 && Object.prototype.propertyIsEnumerable.call(ze, We[He]) && (Fe[We[He]] = ze[We[He]]);
|
|
3337
3341
|
}
|
|
3338
3342
|
return Fe;
|
|
3339
|
-
}(Ve, ["nocookie"]),
|
|
3340
|
-
_e.videoId =
|
|
3343
|
+
}(Ve, ["nocookie"]), Re = `www.youtube${De ? "-nocookie" : ""}.com`, Ie = Mt(ke, Le), Ae = encodeURIComponent(Ne[2]);
|
|
3344
|
+
_e.videoId = Ae, _e.src = `https://${Re}/embed/${Ae}?${Ie}`, _e.thumbSrc = _e.thumbSrc || `https://i.ytimg.com/vi/${Ae}/mqdefault.jpg`, $e = Pt;
|
|
3341
3345
|
} else if (Ne = ke.match(/^.+vimeo.com\/(?:\/)?([\d]+)((\/|\?h=)([a-z0-9]+))?(.*)?/)) {
|
|
3342
3346
|
const Ve = Mt(ke, this.optionFor(_e, Ct)), De = encodeURIComponent(Ne[1]), Le = Ne[4] || "";
|
|
3343
3347
|
_e.videoId = De, _e.src = `https://player.vimeo.com/video/${De}?${Le ? `h=${Le}${Ve ? "&" : ""}` : ""}${Ve}`, $e = Ct;
|
|
@@ -3388,8 +3392,8 @@ class Lt extends _ {
|
|
|
3388
3392
|
} else Ne && Ve && ($e = Ne / Ve);
|
|
3389
3393
|
if (!$e) return;
|
|
3390
3394
|
ke.style.aspectRatio = "", ke.style.width = "", ke.style.height = "", ke.offsetHeight;
|
|
3391
|
-
const De = ke.getBoundingClientRect(), Le = De.width || 1,
|
|
3392
|
-
ke.style.aspectRatio = $e + "", $e < Le /
|
|
3395
|
+
const De = ke.getBoundingClientRect(), Le = De.width || 1, Re = De.height || 1;
|
|
3396
|
+
ke.style.aspectRatio = $e + "", $e < Le / Re ? (Ve = Ve === "auto" ? Re : Math.min(Re, Ve), ke.style.width = "auto", ke.style.height = `${Ve}px`) : (Ne = Ne === "auto" ? Le : Math.min(Le, Ne), ke.style.width = `${Ne}px`, ke.style.height = "auto");
|
|
3393
3397
|
}
|
|
3394
3398
|
attach() {
|
|
3395
3399
|
const _e = this, ke = _e.instance;
|
|
@@ -3516,8 +3520,8 @@ class Dt extends _ {
|
|
|
3516
3520
|
}, stop: () => {
|
|
3517
3521
|
$e.classList.remove("has-slideshow"), _e.isCompact || _e.endIdle(), _e.emit("endSlideshow");
|
|
3518
3522
|
}, resume: (Ne, Ve) => {
|
|
3519
|
-
var De, Le,
|
|
3520
|
-
!Ve || !Ve.cancelable || ((De = _e.getSlide()) === null || De === void 0 ? void 0 : De.state) === lt.Ready && (!((
|
|
3523
|
+
var De, Le, Re;
|
|
3524
|
+
!Ve || !Ve.cancelable || ((De = _e.getSlide()) === null || De === void 0 ? void 0 : De.state) === lt.Ready && (!((Re = (Le = _e.carousel) === null || Le === void 0 ? void 0 : Le.panzoom) === null || Re === void 0) && Re.isResting) || Ve.preventDefault();
|
|
3521
3525
|
} } }), ke.attachPlugins({ Autoplay: It }), this.ref = ke.plugins.Autoplay);
|
|
3522
3526
|
}
|
|
3523
3527
|
onReady(_e) {
|
|
@@ -3579,8 +3583,8 @@ let $t = class extends _ {
|
|
|
3579
3583
|
S(_e, this.cn(Bt));
|
|
3580
3584
|
let Le = ((Be = Ne.pages[De]) === null || Be === void 0 ? void 0 : Be.pos) || 0;
|
|
3581
3585
|
Le += ke.getProgress(De) * (this[_t] + this.thumbGap);
|
|
3582
|
-
let
|
|
3583
|
-
-1 * Le >
|
|
3586
|
+
let Re = Ve.getBounds();
|
|
3587
|
+
-1 * Le > Re.x.min && -1 * Le < Re.x.max && Ve.panTo({ x: -1 * Le, friction: 0.12 });
|
|
3584
3588
|
} else o(_e, this.cn(Bt), $e.isResting);
|
|
3585
3589
|
this.shiftModern();
|
|
3586
3590
|
}
|
|
@@ -3630,49 +3634,49 @@ let $t = class extends _ {
|
|
|
3630
3634
|
const _e = Be.instance, ke = _e.container, $e = Be.getSlides(), Ne = Be.option("type");
|
|
3631
3635
|
Be.type = Ne;
|
|
3632
3636
|
const Ve = Be.option("parentEl"), De = Be.cn("container"), Le = Be.cn("track");
|
|
3633
|
-
let
|
|
3634
|
-
|
|
3635
|
-
let Ie =
|
|
3636
|
-
Ie || (Ie = document.createElement("div"), P(Ie, Be.cn("track")),
|
|
3637
|
-
const
|
|
3637
|
+
let Re = Ve == null ? void 0 : Ve.querySelector("." + De);
|
|
3638
|
+
Re || (Re = document.createElement("div"), P(Re, De), Ve ? Ve.appendChild(Re) : ke.after(Re)), P(Re, `is-${Ne}`), P(ke, Be.cn("hasThumbs")), Be.container = Re, Be.updateProps();
|
|
3639
|
+
let Ie = Re.querySelector("." + Le);
|
|
3640
|
+
Ie || (Ie = document.createElement("div"), P(Ie, Be.cn("track")), Re.appendChild(Ie)), Be.track = Ie;
|
|
3641
|
+
const Ae = u({}, { track: Ie, infinite: !1, center: !0, fill: Ne === "classic", dragFree: !0, slidesPerPage: 1, transition: !1, preload: 0.25, friction: 0.12, Panzoom: { maxVelocity: 0 }, Dots: !1, Navigation: !1, classes: { container: "f-thumbs", viewport: "f-thumbs__viewport", track: "f-thumbs__track", slide: "f-thumbs__slide" } }, Be.option("Carousel") || {}, { Sync: { target: _e }, slides: $e }), ze = new _e.constructor(Re, Ae);
|
|
3638
3642
|
ze.on("createSlide", (je, Fe) => {
|
|
3639
3643
|
Be.setProps(Fe.index), Be.emit("createSlide", Fe, Fe.el);
|
|
3640
3644
|
}), ze.on("ready", () => {
|
|
3641
3645
|
Be.shiftModern(), Be.emit("ready");
|
|
3642
3646
|
}), ze.on("refresh", () => {
|
|
3643
3647
|
Be.shiftModern();
|
|
3644
|
-
}), ze.on("Panzoom.click", (je, Fe,
|
|
3645
|
-
Be.onClick(
|
|
3648
|
+
}), ze.on("Panzoom.click", (je, Fe, We) => {
|
|
3649
|
+
Be.onClick(We);
|
|
3646
3650
|
}), Be.carousel = ze, Be.state = jt.Ready;
|
|
3647
3651
|
}
|
|
3648
3652
|
onClick(Be) {
|
|
3649
3653
|
Be.preventDefault(), Be.stopPropagation();
|
|
3650
|
-
const _e = this.instance, { pages: ke, page: $e } = _e, Ne = (
|
|
3651
|
-
if (
|
|
3652
|
-
const qe =
|
|
3654
|
+
const _e = this.instance, { pages: ke, page: $e } = _e, Ne = (He) => {
|
|
3655
|
+
if (He) {
|
|
3656
|
+
const qe = He.closest("[data-carousel-index]");
|
|
3653
3657
|
if (qe) return [parseInt(qe.dataset.carouselIndex || "", 10) || 0, qe];
|
|
3654
3658
|
}
|
|
3655
3659
|
return [-1, void 0];
|
|
3656
|
-
}, Ve = (
|
|
3657
|
-
const Ue = document.elementFromPoint(
|
|
3660
|
+
}, Ve = (He, qe) => {
|
|
3661
|
+
const Ue = document.elementFromPoint(He, qe);
|
|
3658
3662
|
return Ue ? Ne(Ue) : [-1, void 0];
|
|
3659
3663
|
};
|
|
3660
3664
|
let [De, Le] = Ne(Be.target);
|
|
3661
3665
|
if (De > -1) return;
|
|
3662
|
-
const
|
|
3663
|
-
let [ze, je] = Ve(Ie -
|
|
3664
|
-
je &&
|
|
3666
|
+
const Re = this[_t], Ie = Be.clientX, Ae = Be.clientY;
|
|
3667
|
+
let [ze, je] = Ve(Ie - Re, Ae), [Fe, We] = Ve(Ie + Re, Ae);
|
|
3668
|
+
je && We ? (De = Math.abs(Ie - je.getBoundingClientRect().right) < Math.abs(Ie - We.getBoundingClientRect().left) ? ze : Fe, De === $e && (De = De === ze ? Fe : ze)) : je ? De = ze : We && (De = Fe), De > -1 && ke[De] && _e.slideTo(De);
|
|
3665
3669
|
}
|
|
3666
3670
|
getShift(Be) {
|
|
3667
3671
|
var _e;
|
|
3668
3672
|
const ke = this, { instance: $e } = ke, Ne = ke.carousel;
|
|
3669
3673
|
if (!$e || !Ne) return 0;
|
|
3670
|
-
const Ve = ke[Ht], De = ke[_t], Le = ke.thumbGap,
|
|
3674
|
+
const Ve = ke[Ht], De = ke[_t], Le = ke.thumbGap, Re = ke.thumbExtraGap;
|
|
3671
3675
|
if (!(!((_e = Ne.slides[Be]) === null || _e === void 0) && _e.el)) return 0;
|
|
3672
|
-
const Ie = 0.5 * (Ve - De),
|
|
3673
|
-
let ze = $e.getProgress(0), je = $e.getProgress(
|
|
3676
|
+
const Ie = 0.5 * (Ve - De), Ae = $e.pages.length - 1;
|
|
3677
|
+
let ze = $e.getProgress(0), je = $e.getProgress(Ae), Fe = $e.getProgress(Be, !1, !0), We = 0, He = Ie + Re + Le;
|
|
3674
3678
|
const qe = ze < 0 && ze > -1, Ue = je > 0 && je < 1;
|
|
3675
|
-
return Be === 0 ? (
|
|
3679
|
+
return Be === 0 ? (We = He * Math.abs(ze), Ue && ze === 1 && (We -= He * Math.abs(je))) : Be === Ae ? (We = He * Math.abs(je) * -1, qe && je === -1 && (We += He * Math.abs(ze))) : qe || Ue ? (We = -1 * He, We += He * Math.abs(ze), We += He * (1 - Math.abs(je))) : We = He * Fe, We;
|
|
3676
3680
|
}
|
|
3677
3681
|
setProps(Be) {
|
|
3678
3682
|
var _e;
|
|
@@ -3729,8 +3733,8 @@ class Yt extends _ {
|
|
|
3729
3733
|
var $e, Ne, Ve;
|
|
3730
3734
|
const De = ((Ve = (Ne = ($e = this.instance) === null || $e === void 0 ? void 0 : $e.carousel) === null || Ne === void 0 ? void 0 : Ne.slides[ke.index]) === null || Ve === void 0 ? void 0 : Ve.type) || "", Le = ke.el;
|
|
3731
3735
|
if (Le && De) {
|
|
3732
|
-
let
|
|
3733
|
-
["video", "youtube", "vimeo", "html5video"].includes(De) && (
|
|
3736
|
+
let Re = `for-${De}`;
|
|
3737
|
+
["video", "youtube", "vimeo", "html5video"].includes(De) && (Re += " for-video"), P(Le, Re);
|
|
3734
3738
|
}
|
|
3735
3739
|
}
|
|
3736
3740
|
onInit() {
|
|
@@ -3740,9 +3744,9 @@ class Yt extends _ {
|
|
|
3740
3744
|
const Ve = ke.option("parentEl") || $e.footer || $e.container;
|
|
3741
3745
|
if (!Ve) return;
|
|
3742
3746
|
const De = u({}, ke.options, { parentEl: Ve, classes: { container: "f-thumbs fancybox__thumbs" }, Carousel: { Sync: { friction: $e.option("Carousel.friction") || 0 } }, on: { ready: (Le) => {
|
|
3743
|
-
const
|
|
3744
|
-
|
|
3745
|
-
|
|
3747
|
+
const Re = Le.container;
|
|
3748
|
+
Re && this.hidden && (ke.refresh(), Re.style.transition = "none", ke.hide(), Re.offsetHeight, queueMicrotask(() => {
|
|
3749
|
+
Re.style.transition = "", ke.show();
|
|
3746
3750
|
}));
|
|
3747
3751
|
} } });
|
|
3748
3752
|
De.Carousel = De.Carousel || {}, De.Carousel.on = u(((_e = ke.options.Carousel) === null || _e === void 0 ? void 0 : _e.on) || {}, { click: this.onClick, createSlide: this.onCreateSlide }), Ne.options.Thumbs = De, Ne.attachPlugins({ Thumbs: $t }), ke.ref = Ne.plugins.Thumbs, ke.option("showOnStart") || (ke.ref.state = jt.Hidden, ke.hidden = !0);
|
|
@@ -3803,45 +3807,45 @@ class Qt extends _ {
|
|
|
3803
3807
|
let $e = this.option("display"), Ne = this.option("absolute"), Ve = this.option("enabled");
|
|
3804
3808
|
if (Ve === "auto") {
|
|
3805
3809
|
const Ie = this.instance.carousel;
|
|
3806
|
-
let
|
|
3807
|
-
if (Ie) for (const ze of Ie.slides) (ze.panzoom || ze.type === "image") &&
|
|
3808
|
-
|
|
3810
|
+
let Ae = 0;
|
|
3811
|
+
if (Ie) for (const ze of Ie.slides) (ze.panzoom || ze.type === "image") && Ae++;
|
|
3812
|
+
Ae || (Ve = !1);
|
|
3809
3813
|
}
|
|
3810
3814
|
Ve || ($e = void 0);
|
|
3811
3815
|
let De = 0;
|
|
3812
3816
|
const Le = { left: [], middle: [], right: [] };
|
|
3813
|
-
if ($e) for (const Ie of ["left", "middle", "right"]) for (const
|
|
3814
|
-
const ze = this.createEl(
|
|
3817
|
+
if ($e) for (const Ie of ["left", "middle", "right"]) for (const Ae of $e[Ie]) {
|
|
3818
|
+
const ze = this.createEl(Ae);
|
|
3815
3819
|
ze && ((ke = Le[Ie]) === null || ke === void 0 || ke.push(ze), De++);
|
|
3816
3820
|
}
|
|
3817
|
-
let
|
|
3818
|
-
if (De && (
|
|
3819
|
-
for (const [Ie,
|
|
3821
|
+
let Re = null;
|
|
3822
|
+
if (De && (Re = this.createContainer()), Re) {
|
|
3823
|
+
for (const [Ie, Ae] of Object.entries(Le)) {
|
|
3820
3824
|
const ze = document.createElement("div");
|
|
3821
3825
|
P(ze, Jt + "__column is-" + Ie);
|
|
3822
|
-
for (const je of
|
|
3823
|
-
Ne !== "auto" || Ie !== "middle" ||
|
|
3826
|
+
for (const je of Ae) ze.appendChild(je);
|
|
3827
|
+
Ne !== "auto" || Ie !== "middle" || Ae.length || (Ne = !0), Re.appendChild(ze);
|
|
3824
3828
|
}
|
|
3825
|
-
Ne === !0 && P(
|
|
3829
|
+
Ne === !0 && P(Re, "is-absolute"), this.state = Zt.Ready, this.onRefresh();
|
|
3826
3830
|
} else this.state = Zt.Disabled;
|
|
3827
3831
|
}
|
|
3828
3832
|
onClick(_e) {
|
|
3829
3833
|
var ke, $e;
|
|
3830
|
-
const Ne = this.instance, Ve = Ne.getSlide(), De = Ve == null ? void 0 : Ve.panzoom, Le = _e.target,
|
|
3831
|
-
if (!
|
|
3832
|
-
if (
|
|
3833
|
-
if (
|
|
3834
|
-
if (
|
|
3834
|
+
const Ne = this.instance, Ve = Ne.getSlide(), De = Ve == null ? void 0 : Ve.panzoom, Le = _e.target, Re = Le && E(Le) ? Le.dataset : null;
|
|
3835
|
+
if (!Re) return;
|
|
3836
|
+
if (Re.fancyboxToggleThumbs !== void 0) return _e.preventDefault(), _e.stopPropagation(), void ((ke = Ne.plugins.Thumbs) === null || ke === void 0 || ke.toggle());
|
|
3837
|
+
if (Re.fancyboxToggleFullscreen !== void 0) return _e.preventDefault(), _e.stopPropagation(), void this.instance.toggleFullscreen();
|
|
3838
|
+
if (Re.fancyboxToggleSlideshow !== void 0) {
|
|
3835
3839
|
_e.preventDefault(), _e.stopPropagation();
|
|
3836
3840
|
const ze = ($e = Ne.carousel) === null || $e === void 0 ? void 0 : $e.plugins.Autoplay;
|
|
3837
3841
|
let je = ze.isActive;
|
|
3838
3842
|
return De && De.panMode === "mousemove" && !je && De.reset(), void (je ? ze.stop() : ze.start());
|
|
3839
3843
|
}
|
|
3840
|
-
const Ie =
|
|
3841
|
-
if ((
|
|
3844
|
+
const Ie = Re.panzoomAction, Ae = Re.panzoomChange;
|
|
3845
|
+
if ((Ae || Ie) && (_e.preventDefault(), _e.stopPropagation()), Ae) {
|
|
3842
3846
|
let ze = {};
|
|
3843
3847
|
try {
|
|
3844
|
-
ze = JSON.parse(
|
|
3848
|
+
ze = JSON.parse(Ae);
|
|
3845
3849
|
} catch {
|
|
3846
3850
|
}
|
|
3847
3851
|
De && De.applyChange(ze);
|
|
@@ -3900,12 +3904,12 @@ class Qt extends _ {
|
|
|
3900
3904
|
Ne = document.createElement("button"), Ne.setAttribute("title", this.instance.localize(`{{${_e.toUpperCase()}}}`)), P(Ne, "f-button"), Ie.action && (Ne.dataset.panzoomAction = Ie.action), Ie.change && (Ne.dataset.panzoomChange = JSON.stringify(Ie.change)), Ne.appendChild(n(this.instance.localize(Ie.icon)));
|
|
3901
3905
|
} else {
|
|
3902
3906
|
const Ie = (this.option("items") || [])[_e];
|
|
3903
|
-
Ie && (Ne = n(this.instance.localize(Ie.tpl)), typeof Ie.click == "function" && Ne.addEventListener("click", (
|
|
3904
|
-
|
|
3907
|
+
Ie && (Ne = n(this.instance.localize(Ie.tpl)), typeof Ie.click == "function" && Ne.addEventListener("click", (Ae) => {
|
|
3908
|
+
Ae.preventDefault(), Ae.stopPropagation(), typeof Ie.click == "function" && Ie.click.call(this, this, Ae);
|
|
3905
3909
|
}));
|
|
3906
3910
|
}
|
|
3907
|
-
const
|
|
3908
|
-
if (
|
|
3911
|
+
const Re = Ne == null ? void 0 : Ne.querySelector("svg");
|
|
3912
|
+
if (Re) for (const [Ie, Ae] of Object.entries(Gt)) Re.getAttribute(Ie) || Re.setAttribute(Ie, String(Ae));
|
|
3909
3913
|
return Ne;
|
|
3910
3914
|
}
|
|
3911
3915
|
removeContainer() {
|
|
@@ -4036,23 +4040,23 @@ class Oe extends g {
|
|
|
4036
4040
|
}), this.option("dragToClose") && (Ne.on("Panzoom.afterTransform", (Ve, De) => {
|
|
4037
4041
|
const Le = this.getSlide();
|
|
4038
4042
|
if (Le && e(Le.el)) return;
|
|
4039
|
-
const
|
|
4040
|
-
if (
|
|
4041
|
-
const Ie = Math.abs(De.current.f),
|
|
4042
|
-
|
|
4043
|
+
const Re = this.container;
|
|
4044
|
+
if (Re) {
|
|
4045
|
+
const Ie = Math.abs(De.current.f), Ae = Ie < 1 ? "" : Math.max(0.5, Math.min(1, 1 - Ie / De.contentRect.fitHeight * 1.5));
|
|
4046
|
+
Re.style.setProperty("--fancybox-ts", Ae ? "0s" : ""), Re.style.setProperty("--fancybox-opacity", Ae + "");
|
|
4043
4047
|
}
|
|
4044
4048
|
}), Ne.on("Panzoom.touchEnd", (Ve, De, Le) => {
|
|
4045
|
-
var
|
|
4049
|
+
var Re;
|
|
4046
4050
|
const Ie = this.getSlide();
|
|
4047
|
-
if (Ie && e(Ie.el) || De.isMobile && document.activeElement && ["TEXTAREA", "INPUT"].indexOf((
|
|
4048
|
-
const
|
|
4049
|
-
De.lockedAxis === "y" && (
|
|
4051
|
+
if (Ie && e(Ie.el) || De.isMobile && document.activeElement && ["TEXTAREA", "INPUT"].indexOf((Re = document.activeElement) === null || Re === void 0 ? void 0 : Re.nodeName) !== -1) return;
|
|
4052
|
+
const Ae = Math.abs(De.dragOffset.y);
|
|
4053
|
+
De.lockedAxis === "y" && (Ae >= 200 || Ae >= 50 && De.dragOffset.time < 300) && (Le && Le.cancelable && Le.preventDefault(), this.close(Le, "f-throwOut" + (De.current.f < 0 ? "Up" : "Down")));
|
|
4050
4054
|
})), Ne.on("change", (Ve) => {
|
|
4051
4055
|
var De;
|
|
4052
4056
|
let Le = (De = this.getSlide()) === null || De === void 0 ? void 0 : De.triggerEl;
|
|
4053
4057
|
if (Le) {
|
|
4054
|
-
const
|
|
4055
|
-
Le.dispatchEvent(
|
|
4058
|
+
const Re = new CustomEvent("slideTo", { bubbles: !0, cancelable: !0, detail: Ve.page });
|
|
4059
|
+
Le.dispatchEvent(Re);
|
|
4056
4060
|
}
|
|
4057
4061
|
}), Ne.on(["refresh", "change"], (Ve) => {
|
|
4058
4062
|
const De = this.container;
|
|
@@ -4065,11 +4069,11 @@ class Oe extends g {
|
|
|
4065
4069
|
}
|
|
4066
4070
|
const Le = this.getSlide();
|
|
4067
4071
|
if (!Le) return;
|
|
4068
|
-
let
|
|
4069
|
-
|
|
4072
|
+
let Re = Le.downloadSrc || "";
|
|
4073
|
+
Re || Le.type !== "image" || Le.error || !ve(Le[me]) || (Re = Le[me]);
|
|
4070
4074
|
for (const Ie of De.querySelectorAll("[data-fancybox-download]")) {
|
|
4071
|
-
const
|
|
4072
|
-
|
|
4075
|
+
const Ae = Le.downloadFilename;
|
|
4076
|
+
Re ? (Ie.removeAttribute(ue), Ie.removeAttribute(pe), Ie.setAttribute(ge, Re), Ie.setAttribute(fe, Ae || Re), Ie.setAttribute("target", "_blank")) : (Ie.setAttribute(ue, ""), Ie.setAttribute(pe, "-1"), Ie.removeAttribute(ge), Ie.removeAttribute(fe));
|
|
4073
4077
|
}
|
|
4074
4078
|
}), this.emit("initCarousel");
|
|
4075
4079
|
}
|
|
@@ -4093,8 +4097,8 @@ class Oe extends g {
|
|
|
4093
4097
|
const ke = window.visualViewport, $e = Math.max(1, (ke == null ? void 0 : ke.scale) || 1);
|
|
4094
4098
|
let Ne = "", Ve = "", De = "";
|
|
4095
4099
|
if (ke && $e > 1) {
|
|
4096
|
-
let Le = `${ke.offsetLeft}px`,
|
|
4097
|
-
Ne = ke.width * $e + "px", Ve = ke.height * $e + "px", De = `translate3d(${Le}, ${
|
|
4100
|
+
let Le = `${ke.offsetLeft}px`, Re = `${ke.offsetTop}px`;
|
|
4101
|
+
Ne = ke.width * $e + "px", Ve = ke.height * $e + "px", De = `translate3d(${Le}, ${Re}, 0) scale(${1 / $e})`;
|
|
4098
4102
|
}
|
|
4099
4103
|
_e.style.transform = De, _e.style.width = Ne, _e.style.height = Ve;
|
|
4100
4104
|
}
|
|
@@ -4129,8 +4133,8 @@ class Oe extends g {
|
|
|
4129
4133
|
const ke = _e.target;
|
|
4130
4134
|
let $e = this.option("wheel", _e);
|
|
4131
4135
|
ke.closest(".fancybox__thumbs") && ($e = "slide");
|
|
4132
|
-
const Ne = $e === "slide", Ve = [-_e.deltaX || 0, -_e.deltaY || 0, -_e.detail || 0].reduce(function(
|
|
4133
|
-
return Math.abs(Ie) > Math.abs(
|
|
4136
|
+
const Ne = $e === "slide", Ve = [-_e.deltaX || 0, -_e.deltaY || 0, -_e.detail || 0].reduce(function(Re, Ie) {
|
|
4137
|
+
return Math.abs(Ie) > Math.abs(Re) ? Ie : Re;
|
|
4134
4138
|
}), De = Math.max(-1, Math.min(1, Ve)), Le = Date.now();
|
|
4135
4139
|
this.pwt && Le - this.pwt < 300 ? Ne && _e.preventDefault() : (this.pwt = Le, this.emit("wheel", _e, De), _e.defaultPrevented || ($e === "close" ? (_e.preventDefault(), this.close(_e)) : $e === "slide" && (i(ke) || (_e.preventDefault(), this[De > 0 ? "prev" : "next"]()))));
|
|
4136
4140
|
}
|
|
@@ -4184,20 +4188,20 @@ class Oe extends g {
|
|
|
4184
4188
|
const De = this.isCompact || this.option("commonCaption"), Le = !De;
|
|
4185
4189
|
if (this.caption && this.stop(this.caption), Le && this.caption && (this.caption.remove(), this.caption = null), De && !this.caption) for (const ze of ((ke = this.carousel) === null || ke === void 0 ? void 0 : ke.slides) || []) ze.captionEl && (ze.captionEl.remove(), ze.captionEl = void 0, S(ze.el, de), ($e = ze.el) === null || $e === void 0 || $e.removeAttribute("aria-labelledby"));
|
|
4186
4190
|
if (_e || (_e = this.getSlide()), !_e || De && !this.isCurrentSlide(_e)) return;
|
|
4187
|
-
const
|
|
4191
|
+
const Re = _e.el;
|
|
4188
4192
|
let Ie = this.optionFor(_e, "caption", "");
|
|
4189
4193
|
if (!Ie) return void (De && this.caption && this.animate(this.caption, "f-fadeOut", () => {
|
|
4190
4194
|
this.caption && (this.caption.innerHTML = "");
|
|
4191
4195
|
}));
|
|
4192
|
-
let
|
|
4196
|
+
let Ae = null;
|
|
4193
4197
|
if (Le) {
|
|
4194
|
-
if (
|
|
4198
|
+
if (Ae = _e.captionEl || null, Re && !Ae) {
|
|
4195
4199
|
const ze = Ne + `_${this.id}_${_e.index}`;
|
|
4196
|
-
|
|
4200
|
+
Ae = document.createElement("div"), P(Ae, Ne), Ae.setAttribute("id", ze), _e.captionEl = Re.appendChild(Ae), P(Re, de), Re.setAttribute("aria-labelledby", ze);
|
|
4197
4201
|
}
|
|
4198
4202
|
} else
|
|
4199
|
-
|
|
4200
|
-
|
|
4203
|
+
Ae = this.caption, Ae || (Ae = Ve.querySelector("." + Ne)), !Ae && (Ae = document.createElement("div"), Ae.dataset.fancyboxCaption = "", P(Ae, Ne), (this.footer || Ve).prepend(Ae)), P(Ve, de), this.caption = Ae;
|
|
4204
|
+
Ae && (Ae.innerHTML = "", ve(Ie) || typeof Ie == "number" ? Ae.innerHTML = Ie + "" : Ie instanceof HTMLElement && Ae.appendChild(Ie));
|
|
4201
4205
|
}
|
|
4202
4206
|
checkFocus(_e) {
|
|
4203
4207
|
this.focus(_e);
|
|
@@ -4207,15 +4211,15 @@ class Oe extends g {
|
|
|
4207
4211
|
if (this.ignoreFocusChange) return;
|
|
4208
4212
|
const $e = document.activeElement || null, Ne = (_e == null ? void 0 : _e.target) || null, Ve = this.container, De = (ke = this.carousel) === null || ke === void 0 ? void 0 : ke.viewport;
|
|
4209
4213
|
if (!Ve || !De || !_e && $e && Ve.contains($e)) return;
|
|
4210
|
-
const Le = this.getSlide(),
|
|
4211
|
-
if (!
|
|
4214
|
+
const Le = this.getSlide(), Re = Le && Le.state === lt.Ready ? Le.el : null;
|
|
4215
|
+
if (!Re || Re.contains($e) || Ve === $e) return;
|
|
4212
4216
|
_e && _e.cancelable && _e.preventDefault(), this.ignoreFocusChange = !0;
|
|
4213
4217
|
const Ie = Array.from(Ve.querySelectorAll(nt));
|
|
4214
|
-
let
|
|
4218
|
+
let Ae = [], ze = null;
|
|
4215
4219
|
for (let Fe of Ie) {
|
|
4216
|
-
const
|
|
4217
|
-
if (Fe === Ve || (
|
|
4218
|
-
|
|
4220
|
+
const We = !Fe.offsetParent || !!Fe.closest('[aria-hidden="true"]'), He = Re && Re.contains(Fe), qe = !De.contains(Fe);
|
|
4221
|
+
if (Fe === Ve || (He || qe) && !We) {
|
|
4222
|
+
Ae.push(Fe);
|
|
4219
4223
|
const Ue = Fe.dataset.origTabindex;
|
|
4220
4224
|
Ue !== void 0 && Ue && (Fe.tabIndex = parseFloat(Ue)), Fe.removeAttribute("data-orig-tabindex"), !Fe.hasAttribute("autoFocus") && ze || (ze = Fe);
|
|
4221
4225
|
} else {
|
|
@@ -4224,7 +4228,7 @@ class Oe extends g {
|
|
|
4224
4228
|
}
|
|
4225
4229
|
}
|
|
4226
4230
|
let je = null;
|
|
4227
|
-
_e ? (!Ne ||
|
|
4231
|
+
_e ? (!Ne || Ae.indexOf(Ne) < 0) && (je = ze || Ve, Ae.length && ($e === xe ? je = Ae[0] : this.lastFocus !== Ve && $e !== we || (je = Ae[Ae.length - 1]))) : je = Le && Le.type === "image" ? Ve : ze || Ve, je && st(je), this.lastFocus = document.activeElement, this.ignoreFocusChange = !1;
|
|
4228
4232
|
}
|
|
4229
4233
|
next() {
|
|
4230
4234
|
const _e = this.carousel;
|
|
@@ -4363,13 +4367,13 @@ class Oe extends g {
|
|
|
4363
4367
|
proceedClose(_e, ke) {
|
|
4364
4368
|
var $e, Ne;
|
|
4365
4369
|
this.state = rt.Closing, this.clearIdle(), this.detachEvents();
|
|
4366
|
-
const Ve = this.container, De = this.carousel, Le = this.getSlide(),
|
|
4367
|
-
if (
|
|
4370
|
+
const Ve = this.container, De = this.carousel, Le = this.getSlide(), Re = Le && this.option("placeFocusBack") ? Le.triggerEl || this.option("triggerEl") : null;
|
|
4371
|
+
if (Re && (tt(Re) ? st(Re) : Re.focus()), Ve && (S(Ve, he), P(Ve, "is-closing"), Ve.setAttribute(oe, "true"), this.option("animated") && P(Ve, re), Ve.style.pointerEvents = "none"), De) {
|
|
4368
4372
|
De.clearTransitions(), ($e = De.panzoom) === null || $e === void 0 || $e.destroy(), (Ne = De.plugins.Navigation) === null || Ne === void 0 || Ne.detach();
|
|
4369
4373
|
for (const Ie of De.slides) {
|
|
4370
4374
|
Ie.state = lt.Closing, this.hideLoading(Ie);
|
|
4371
|
-
const
|
|
4372
|
-
|
|
4375
|
+
const Ae = Ie.contentEl;
|
|
4376
|
+
Ae && this.stop(Ae);
|
|
4373
4377
|
const ze = Ie == null ? void 0 : Ie.panzoom;
|
|
4374
4378
|
ze && (ze.stop(), ze.detachEvents(), ze.detachObserver()), this.isCurrentSlide(Ie) || De.emit("removeSlide", Ie);
|
|
4375
4379
|
}
|
|
@@ -4420,22 +4424,22 @@ class Oe extends g {
|
|
|
4420
4424
|
let ke = _e.composedPath()[0];
|
|
4421
4425
|
const $e = ke.closest("[data-fancybox-trigger]");
|
|
4422
4426
|
if ($e) {
|
|
4423
|
-
const
|
|
4424
|
-
ke =
|
|
4427
|
+
const We = $e.dataset.fancyboxTrigger || "", He = document.querySelectorAll(`[data-fancybox="${We}"]`), qe = parseInt($e.dataset.fancyboxIndex || "", 10) || 0;
|
|
4428
|
+
ke = He[qe] || ke;
|
|
4425
4429
|
}
|
|
4426
4430
|
if (!(ke && ke instanceof Element)) return;
|
|
4427
4431
|
let Ne, Ve, De, Le;
|
|
4428
|
-
if ([...Oe.openers].reverse().find(([
|
|
4432
|
+
if ([...Oe.openers].reverse().find(([We, He]) => !(!We.contains(ke) || ![...He].reverse().find(([qe, Ue]) => {
|
|
4429
4433
|
let Xe = ke.closest(qe);
|
|
4430
|
-
return !!Xe && (Ne =
|
|
4434
|
+
return !!Xe && (Ne = We, Ve = qe, De = Xe, Le = Ue, !0);
|
|
4431
4435
|
}))), !Ne || !Ve || !De) return;
|
|
4432
4436
|
Le = Le || {}, _e.preventDefault(), ke = De;
|
|
4433
|
-
let
|
|
4437
|
+
let Re = [], Ie = u({}, at, Le);
|
|
4434
4438
|
Ie.event = _e, Ie.triggerEl = ke, Ie.delegate = $e;
|
|
4435
|
-
const
|
|
4436
|
-
if ((!ke || je ||
|
|
4439
|
+
const Ae = Ie.groupAll, ze = Ie.groupAttr, je = ze && ke ? ke.getAttribute(`${ze}`) : "";
|
|
4440
|
+
if ((!ke || je || Ae) && (Re = [].slice.call(Ne.querySelectorAll(Ve))), ke && !Ae && (Re = je ? Re.filter((We) => We.getAttribute(`${ze}`) === je) : [ke]), !Re.length) return;
|
|
4437
4441
|
const Fe = Oe.getInstance();
|
|
4438
|
-
return Fe && Fe.options.triggerEl &&
|
|
4442
|
+
return Fe && Fe.options.triggerEl && Re.indexOf(Fe.options.triggerEl) > -1 ? void 0 : (ke && (Ie.startIndex = Re.indexOf(ke)), Oe.fromNodes(Re, Ie));
|
|
4439
4443
|
}
|
|
4440
4444
|
static fromSelector(_e, ke, $e) {
|
|
4441
4445
|
let Ne = null, Ve = "", De = {};
|
|
@@ -4449,15 +4453,15 @@ class Oe extends g {
|
|
|
4449
4453
|
for (const Ne of _e) {
|
|
4450
4454
|
const Ve = Ne.dataset || {}, De = Ve[me] || Ne.getAttribute(ge) || Ne.getAttribute("currentSrc") || Ne.getAttribute(me) || void 0;
|
|
4451
4455
|
let Le;
|
|
4452
|
-
const
|
|
4456
|
+
const Re = ke.delegate;
|
|
4453
4457
|
let Ie;
|
|
4454
|
-
|
|
4455
|
-
const
|
|
4458
|
+
Re && $e.length === ke.startIndex && (Le = Re instanceof HTMLImageElement ? Re : Re.querySelector("img:not([aria-hidden])")), Le || (Le = Ne instanceof HTMLImageElement ? Ne : Ne.querySelector("img:not([aria-hidden])")), Le && (Ie = Le.currentSrc || Le[me] || void 0, !Ie && Le.dataset && (Ie = Le.dataset.lazySrc || Le.dataset[me] || void 0));
|
|
4459
|
+
const Ae = { src: De, triggerEl: Ne, thumbEl: Le, thumbElSrc: Ie, thumbSrc: Ie };
|
|
4456
4460
|
for (const ze in Ve) {
|
|
4457
4461
|
let je = Ve[ze] + "";
|
|
4458
|
-
je = je !== "false" && (je === "true" || je),
|
|
4462
|
+
je = je !== "false" && (je === "true" || je), Ae[ze] = je;
|
|
4459
4463
|
}
|
|
4460
|
-
$e.push(
|
|
4464
|
+
$e.push(Ae);
|
|
4461
4465
|
}
|
|
4462
4466
|
return new Oe($e, ke);
|
|
4463
4467
|
}
|
|
@@ -4681,29 +4685,29 @@ function updateSwiper(Be) {
|
|
|
4681
4685
|
nextEl: Ve,
|
|
4682
4686
|
prevEl: De,
|
|
4683
4687
|
scrollbarEl: Le,
|
|
4684
|
-
paginationEl:
|
|
4688
|
+
paginationEl: Re
|
|
4685
4689
|
} = Be;
|
|
4686
4690
|
const Ie = Ne.filter((Ye) => Ye !== "children" && Ye !== "direction" && Ye !== "wrapperClass"), {
|
|
4687
|
-
params:
|
|
4691
|
+
params: Ae,
|
|
4688
4692
|
pagination: ze,
|
|
4689
4693
|
navigation: je,
|
|
4690
4694
|
scrollbar: Fe,
|
|
4691
|
-
virtual:
|
|
4692
|
-
thumbs:
|
|
4695
|
+
virtual: We,
|
|
4696
|
+
thumbs: He
|
|
4693
4697
|
} = _e;
|
|
4694
|
-
let qe, Ue, Xe,
|
|
4695
|
-
Ne.includes("thumbs") && $e.thumbs && $e.thumbs.swiper && !$e.thumbs.swiper.destroyed &&
|
|
4696
|
-
const
|
|
4697
|
-
_e[Ye] && (_e[Ye].destroy(), Ye === "navigation" ? (_e.isElement && (_e[Ye].prevEl.remove(), _e[Ye].nextEl.remove()),
|
|
4698
|
+
let qe, Ue, Xe, Je, Ze, Qe, oi, ii;
|
|
4699
|
+
Ne.includes("thumbs") && $e.thumbs && $e.thumbs.swiper && !$e.thumbs.swiper.destroyed && Ae.thumbs && (!Ae.thumbs.swiper || Ae.thumbs.swiper.destroyed) && (qe = !0), Ne.includes("controller") && $e.controller && $e.controller.control && Ae.controller && !Ae.controller.control && (Ue = !0), Ne.includes("pagination") && $e.pagination && ($e.pagination.el || Re) && (Ae.pagination || Ae.pagination === !1) && ze && !ze.el && (Xe = !0), Ne.includes("scrollbar") && $e.scrollbar && ($e.scrollbar.el || Le) && (Ae.scrollbar || Ae.scrollbar === !1) && Fe && !Fe.el && (Je = !0), Ne.includes("navigation") && $e.navigation && ($e.navigation.prevEl || De) && ($e.navigation.nextEl || Ve) && (Ae.navigation || Ae.navigation === !1) && je && !je.prevEl && !je.nextEl && (Ze = !0);
|
|
4700
|
+
const Ke = (Ye) => {
|
|
4701
|
+
_e[Ye] && (_e[Ye].destroy(), Ye === "navigation" ? (_e.isElement && (_e[Ye].prevEl.remove(), _e[Ye].nextEl.remove()), Ae[Ye].prevEl = void 0, Ae[Ye].nextEl = void 0, _e[Ye].prevEl = void 0, _e[Ye].nextEl = void 0) : (_e.isElement && _e[Ye].el.remove(), Ae[Ye].el = void 0, _e[Ye].el = void 0));
|
|
4698
4702
|
};
|
|
4699
|
-
Ne.includes("loop") && _e.isElement && (
|
|
4700
|
-
if (isObject(
|
|
4701
|
-
Object.assign(
|
|
4703
|
+
Ne.includes("loop") && _e.isElement && (Ae.loop && !$e.loop ? Qe = !0 : !Ae.loop && $e.loop ? oi = !0 : ii = !0), Ie.forEach((Ye) => {
|
|
4704
|
+
if (isObject(Ae[Ye]) && isObject($e[Ye]))
|
|
4705
|
+
Object.assign(Ae[Ye], $e[Ye]), (Ye === "navigation" || Ye === "pagination" || Ye === "scrollbar") && "enabled" in $e[Ye] && !$e[Ye].enabled && Ke(Ye);
|
|
4702
4706
|
else {
|
|
4703
4707
|
const Ge = $e[Ye];
|
|
4704
|
-
(Ge === !0 || Ge === !1) && (Ye === "navigation" || Ye === "pagination" || Ye === "scrollbar") ? Ge === !1 &&
|
|
4708
|
+
(Ge === !0 || Ge === !1) && (Ye === "navigation" || Ye === "pagination" || Ye === "scrollbar") ? Ge === !1 && Ke(Ye) : Ae[Ye] = $e[Ye];
|
|
4705
4709
|
}
|
|
4706
|
-
}), Ie.includes("controller") && !Ue && _e.controller && _e.controller.control &&
|
|
4710
|
+
}), Ie.includes("controller") && !Ue && _e.controller && _e.controller.control && Ae.controller && Ae.controller.control && (_e.controller.control = Ae.controller.control), Ne.includes("children") && ke && We && Ae.virtual.enabled ? (We.slides = ke, We.update(!0)) : Ne.includes("virtual") && We && Ae.virtual.enabled && (ke && (We.slides = ke), We.update(!0)), Ne.includes("children") && ke && Ae.loop && (ii = !0), qe && He.init() && He.update(!0), Ue && (_e.controller.control = Ae.controller.control), Xe && (_e.isElement && (!Re || typeof Re == "string") && (Re = document.createElement("div"), Re.classList.add("swiper-pagination"), Re.part.add("pagination"), _e.el.appendChild(Re)), Re && (Ae.pagination.el = Re), ze.init(), ze.render(), ze.update()), Je && (_e.isElement && (!Le || typeof Le == "string") && (Le = document.createElement("div"), Le.classList.add("swiper-scrollbar"), Le.part.add("scrollbar"), _e.el.appendChild(Le)), Le && (Ae.scrollbar.el = Le), Fe.init(), Fe.updateSize(), Fe.setTranslate()), Ze && (_e.isElement && ((!Ve || typeof Ve == "string") && (Ve = document.createElement("div"), Ve.classList.add("swiper-button-next"), setInnerHTML(Ve, _e.hostEl.constructor.nextButtonSvg), Ve.part.add("button-next"), _e.el.appendChild(Ve)), (!De || typeof De == "string") && (De = document.createElement("div"), De.classList.add("swiper-button-prev"), setInnerHTML(De, _e.hostEl.constructor.prevButtonSvg), De.part.add("button-prev"), _e.el.appendChild(De))), Ve && (Ae.navigation.nextEl = Ve), De && (Ae.navigation.prevEl = De), je.init(), je.update()), Ne.includes("allowSlideNext") && (_e.allowSlideNext = $e.allowSlideNext), Ne.includes("allowSlidePrev") && (_e.allowSlidePrev = $e.allowSlidePrev), Ne.includes("direction") && _e.changeDirection($e.direction, !1), (Qe || ii) && _e.loopDestroy(), (oi || ii) && _e.loopCreate(), _e.update();
|
|
4707
4711
|
}
|
|
4708
4712
|
function getParams(Be, _e) {
|
|
4709
4713
|
Be === void 0 && (Be = {});
|
|
@@ -4711,11 +4715,11 @@ function getParams(Be, _e) {
|
|
|
4711
4715
|
on: {}
|
|
4712
4716
|
}, $e = {}, Ne = {};
|
|
4713
4717
|
extend(ke, defaults), ke._emitClasses = !0, ke.init = !1;
|
|
4714
|
-
const Ve = {}, De = paramsList.map((
|
|
4715
|
-
return Object.keys(Le).forEach((
|
|
4716
|
-
typeof Be[
|
|
4717
|
-
}), ["navigation", "pagination", "scrollbar"].forEach((
|
|
4718
|
-
ke[
|
|
4718
|
+
const Ve = {}, De = paramsList.map((Re) => Re.replace(/_/, "")), Le = Object.assign({}, Be);
|
|
4719
|
+
return Object.keys(Le).forEach((Re) => {
|
|
4720
|
+
typeof Be[Re] > "u" || (De.indexOf(Re) >= 0 ? isObject(Be[Re]) ? (ke[Re] = {}, Ne[Re] = {}, extend(ke[Re], Be[Re]), extend(Ne[Re], Be[Re])) : (ke[Re] = Be[Re], Ne[Re] = Be[Re]) : Re.search(/on[A-Z]/) === 0 && typeof Be[Re] == "function" ? ke.on[`${Re[2].toLowerCase()}${Re.substr(3)}`] = Be[Re] : Ve[Re] = Be[Re]);
|
|
4721
|
+
}), ["navigation", "pagination", "scrollbar"].forEach((Re) => {
|
|
4722
|
+
ke[Re] === !0 && (ke[Re] = {}), ke[Re] === !1 && delete ke[Re];
|
|
4719
4723
|
}), {
|
|
4720
4724
|
params: ke,
|
|
4721
4725
|
passedParams: Ne,
|
|
@@ -4737,23 +4741,23 @@ function mountSwiper(Be, _e) {
|
|
|
4737
4741
|
function getChangedParams(Be, _e, ke, $e, Ne) {
|
|
4738
4742
|
const Ve = [];
|
|
4739
4743
|
if (!_e) return Ve;
|
|
4740
|
-
const De = (
|
|
4741
|
-
Ve.indexOf(
|
|
4744
|
+
const De = (Re) => {
|
|
4745
|
+
Ve.indexOf(Re) < 0 && Ve.push(Re);
|
|
4742
4746
|
};
|
|
4743
4747
|
if (ke && $e) {
|
|
4744
|
-
const
|
|
4745
|
-
|
|
4746
|
-
}
|
|
4747
|
-
return paramsList.filter((
|
|
4748
|
-
if (
|
|
4749
|
-
if (isObject(Be[
|
|
4750
|
-
const Ie = Object.keys(Be[
|
|
4751
|
-
Ie.length !==
|
|
4752
|
-
Be[
|
|
4753
|
-
}),
|
|
4754
|
-
Be[
|
|
4748
|
+
const Re = $e.map(Ne), Ie = ke.map(Ne);
|
|
4749
|
+
Re.join("") !== Ie.join("") && De("children"), $e.length !== ke.length && De("children");
|
|
4750
|
+
}
|
|
4751
|
+
return paramsList.filter((Re) => Re[0] === "_").map((Re) => Re.replace(/_/, "")).forEach((Re) => {
|
|
4752
|
+
if (Re in Be && Re in _e)
|
|
4753
|
+
if (isObject(Be[Re]) && isObject(_e[Re])) {
|
|
4754
|
+
const Ie = Object.keys(Be[Re]), Ae = Object.keys(_e[Re]);
|
|
4755
|
+
Ie.length !== Ae.length ? De(Re) : (Ie.forEach((ze) => {
|
|
4756
|
+
Be[Re][ze] !== _e[Re][ze] && De(Re);
|
|
4757
|
+
}), Ae.forEach((ze) => {
|
|
4758
|
+
Be[Re][ze] !== _e[Re][ze] && De(Re);
|
|
4755
4759
|
}));
|
|
4756
|
-
} else Be[
|
|
4760
|
+
} else Be[Re] !== _e[Re] && De(Re);
|
|
4757
4761
|
}), Ve;
|
|
4758
4762
|
}
|
|
4759
4763
|
const updateOnVirtualData = (Be) => {
|
|
@@ -4767,9 +4771,9 @@ function getChildren(Be, _e, ke) {
|
|
|
4767
4771
|
"wrapper-start": [],
|
|
4768
4772
|
"wrapper-end": []
|
|
4769
4773
|
}, Ve = (De, Le) => {
|
|
4770
|
-
Array.isArray(De) && De.forEach((
|
|
4771
|
-
const Ie = typeof
|
|
4772
|
-
Le === "default" && (Le = "container-end"), Ie &&
|
|
4774
|
+
Array.isArray(De) && De.forEach((Re) => {
|
|
4775
|
+
const Ie = typeof Re.type == "symbol";
|
|
4776
|
+
Le === "default" && (Le = "container-end"), Ie && Re.children ? Ve(Re.children, Le) : Re.type && (Re.type.name === "SwiperSlide" || Re.type.name === "AsyncComponentWrapper") || Re.componentOptions && Re.componentOptions.tag === "SwiperSlide" ? $e.push(Re) : Ne[Le] && Ne[Le].push(Re);
|
|
4773
4777
|
});
|
|
4774
4778
|
};
|
|
4775
4779
|
return Object.keys(Be).forEach((De) => {
|
|
@@ -4783,9 +4787,9 @@ function getChildren(Be, _e, ke) {
|
|
|
4783
4787
|
}
|
|
4784
4788
|
function renderVirtual(Be, _e, ke) {
|
|
4785
4789
|
if (!ke) return null;
|
|
4786
|
-
const $e = (
|
|
4787
|
-
let ze =
|
|
4788
|
-
return
|
|
4790
|
+
const $e = (Ae) => {
|
|
4791
|
+
let ze = Ae;
|
|
4792
|
+
return Ae < 0 ? ze = _e.length + Ae : ze >= _e.length && (ze = ze - _e.length), ze;
|
|
4789
4793
|
}, Ne = Be.value.isHorizontal() ? {
|
|
4790
4794
|
[Be.value.rtlTranslate ? "right" : "left"]: `${ke.offset}px`
|
|
4791
4795
|
} : {
|
|
@@ -4793,18 +4797,18 @@ function renderVirtual(Be, _e, ke) {
|
|
|
4793
4797
|
}, {
|
|
4794
4798
|
from: Ve,
|
|
4795
4799
|
to: De
|
|
4796
|
-
} = ke, Le = Be.value.params.loop ? -_e.length : 0,
|
|
4797
|
-
for (let
|
|
4798
|
-
|
|
4799
|
-
return Ie.map((
|
|
4800
|
-
if (
|
|
4801
|
-
return h$1(
|
|
4802
|
-
...
|
|
4803
|
-
},
|
|
4804
|
-
if (
|
|
4805
|
-
return h$1(
|
|
4806
|
-
...
|
|
4807
|
-
},
|
|
4800
|
+
} = ke, Le = Be.value.params.loop ? -_e.length : 0, Re = Be.value.params.loop ? _e.length * 2 : _e.length, Ie = [];
|
|
4801
|
+
for (let Ae = Le; Ae < Re; Ae += 1)
|
|
4802
|
+
Ae >= Ve && Ae <= De && Ie.length < _e.length && Ie.push(_e[$e(Ae)]);
|
|
4803
|
+
return Ie.map((Ae) => {
|
|
4804
|
+
if (Ae.props || (Ae.props = {}), Ae.props.style || (Ae.props.style = {}), Ae.props.swiperRef = Be, Ae.props.style = Ne, Ae.type)
|
|
4805
|
+
return h$1(Ae.type, {
|
|
4806
|
+
...Ae.props
|
|
4807
|
+
}, Ae.children);
|
|
4808
|
+
if (Ae.componentOptions)
|
|
4809
|
+
return h$1(Ae.componentOptions.Ctor, {
|
|
4810
|
+
...Ae.props
|
|
4811
|
+
}, Ae.componentOptions.children);
|
|
4808
4812
|
});
|
|
4809
4813
|
}
|
|
4810
4814
|
const Swiper = {
|
|
@@ -5280,34 +5284,34 @@ const Swiper = {
|
|
|
5280
5284
|
const {
|
|
5281
5285
|
tag: Ne,
|
|
5282
5286
|
wrapperTag: Ve
|
|
5283
|
-
} = Be, De = ref("swiper"), Le = ref(null),
|
|
5287
|
+
} = Be, De = ref("swiper"), Le = ref(null), Re = ref(!1), Ie = ref(!1), Ae = ref(null), ze = ref(null), je = ref(null), Fe = {
|
|
5284
5288
|
value: []
|
|
5285
|
-
},
|
|
5289
|
+
}, We = {
|
|
5286
5290
|
value: []
|
|
5287
|
-
},
|
|
5288
|
-
params:
|
|
5291
|
+
}, He = ref(null), qe = ref(null), Ue = ref(null), Xe = ref(null), {
|
|
5292
|
+
params: Je,
|
|
5289
5293
|
passedParams: Ze
|
|
5290
5294
|
} = getParams(Be);
|
|
5291
|
-
getChildren(ke, Fe,
|
|
5295
|
+
getChildren(ke, Fe, We), je.value = Ze, We.value = Fe.value;
|
|
5292
5296
|
const Qe = () => {
|
|
5293
|
-
getChildren(ke, Fe,
|
|
5297
|
+
getChildren(ke, Fe, We), Re.value = !0;
|
|
5294
5298
|
};
|
|
5295
|
-
|
|
5299
|
+
Je.onAny = function(Ke) {
|
|
5296
5300
|
for (var Ye = arguments.length, Ge = new Array(Ye > 1 ? Ye - 1 : 0), ei = 1; ei < Ye; ei++)
|
|
5297
5301
|
Ge[ei - 1] = arguments[ei];
|
|
5298
|
-
$e(
|
|
5299
|
-
}, Object.assign(
|
|
5302
|
+
$e(Ke, ...Ge);
|
|
5303
|
+
}, Object.assign(Je.on, {
|
|
5300
5304
|
_beforeBreakpoint: Qe,
|
|
5301
|
-
_containerClasses(
|
|
5305
|
+
_containerClasses(Ke, Ye) {
|
|
5302
5306
|
De.value = Ye;
|
|
5303
5307
|
}
|
|
5304
5308
|
});
|
|
5305
|
-
const
|
|
5306
|
-
...
|
|
5309
|
+
const oi = {
|
|
5310
|
+
...Je
|
|
5307
5311
|
};
|
|
5308
|
-
if (delete
|
|
5312
|
+
if (delete oi.wrapperClass, ze.value = new Swiper$1(oi), ze.value.virtual && ze.value.params.virtual.enabled) {
|
|
5309
5313
|
ze.value.virtual.slides = Fe.value;
|
|
5310
|
-
const
|
|
5314
|
+
const Ke = {
|
|
5311
5315
|
cache: !1,
|
|
5312
5316
|
slides: Fe.value,
|
|
5313
5317
|
renderExternal: (Ye) => {
|
|
@@ -5315,59 +5319,59 @@ const Swiper = {
|
|
|
5315
5319
|
},
|
|
5316
5320
|
renderExternalUpdate: !1
|
|
5317
5321
|
};
|
|
5318
|
-
extend(ze.value.params.virtual,
|
|
5322
|
+
extend(ze.value.params.virtual, Ke), extend(ze.value.originalParams.virtual, Ke);
|
|
5319
5323
|
}
|
|
5320
5324
|
onUpdated(() => {
|
|
5321
5325
|
!Ie.value && ze.value && (ze.value.emitSlidesClasses(), Ie.value = !0);
|
|
5322
5326
|
const {
|
|
5323
|
-
passedParams:
|
|
5324
|
-
} = getParams(Be), Ye = getChangedParams(
|
|
5325
|
-
je.value =
|
|
5327
|
+
passedParams: Ke
|
|
5328
|
+
} = getParams(Be), Ye = getChangedParams(Ke, je.value, Fe.value, We.value, (Ge) => Ge.props && Ge.props.key);
|
|
5329
|
+
je.value = Ke, (Ye.length || Re.value) && ze.value && !ze.value.destroyed && updateSwiper({
|
|
5326
5330
|
swiper: ze.value,
|
|
5327
5331
|
slides: Fe.value,
|
|
5328
|
-
passedParams:
|
|
5332
|
+
passedParams: Ke,
|
|
5329
5333
|
changedParams: Ye,
|
|
5330
|
-
nextEl:
|
|
5334
|
+
nextEl: He.value,
|
|
5331
5335
|
prevEl: qe.value,
|
|
5332
5336
|
scrollbarEl: Xe.value,
|
|
5333
5337
|
paginationEl: Ue.value
|
|
5334
|
-
}),
|
|
5338
|
+
}), Re.value = !1;
|
|
5335
5339
|
}), provide("swiper", ze), watch(Le, () => {
|
|
5336
5340
|
nextTick(() => {
|
|
5337
5341
|
updateOnVirtualData(ze.value);
|
|
5338
5342
|
});
|
|
5339
5343
|
}), onMounted(() => {
|
|
5340
|
-
|
|
5341
|
-
el:
|
|
5342
|
-
nextEl:
|
|
5344
|
+
Ae.value && (mountSwiper({
|
|
5345
|
+
el: Ae.value,
|
|
5346
|
+
nextEl: He.value,
|
|
5343
5347
|
prevEl: qe.value,
|
|
5344
5348
|
paginationEl: Ue.value,
|
|
5345
5349
|
scrollbarEl: Xe.value,
|
|
5346
5350
|
swiper: ze.value
|
|
5347
|
-
},
|
|
5351
|
+
}, Je), $e("swiper", ze.value));
|
|
5348
5352
|
}), onBeforeUnmount(() => {
|
|
5349
5353
|
ze.value && !ze.value.destroyed && ze.value.destroy(!0, !1);
|
|
5350
5354
|
});
|
|
5351
|
-
function
|
|
5352
|
-
return
|
|
5355
|
+
function ii(Ke) {
|
|
5356
|
+
return Je.virtual ? renderVirtual(ze, Ke, Le.value) : (Ke.forEach((Ye, Ge) => {
|
|
5353
5357
|
Ye.props || (Ye.props = {}), Ye.props.swiperRef = ze, Ye.props.swiperSlideIndex = Ge;
|
|
5354
|
-
}),
|
|
5358
|
+
}), Ke);
|
|
5355
5359
|
}
|
|
5356
5360
|
return () => {
|
|
5357
5361
|
const {
|
|
5358
|
-
slides:
|
|
5362
|
+
slides: Ke,
|
|
5359
5363
|
slots: Ye
|
|
5360
|
-
} = getChildren(ke, Fe,
|
|
5364
|
+
} = getChildren(ke, Fe, We);
|
|
5361
5365
|
return h$1(Ne, {
|
|
5362
|
-
ref:
|
|
5366
|
+
ref: Ae,
|
|
5363
5367
|
class: uniqueClasses(De.value)
|
|
5364
5368
|
}, [Ye["container-start"], h$1(Ve, {
|
|
5365
|
-
class: wrapperClass(
|
|
5366
|
-
}, [Ye["wrapper-start"],
|
|
5369
|
+
class: wrapperClass(Je.wrapperClass)
|
|
5370
|
+
}, [Ye["wrapper-start"], ii(Ke), Ye["wrapper-end"]]), needsNavigation(Be) && [h$1("div", {
|
|
5367
5371
|
ref: qe,
|
|
5368
5372
|
class: "swiper-button-prev"
|
|
5369
5373
|
}), h$1("div", {
|
|
5370
|
-
ref:
|
|
5374
|
+
ref: He,
|
|
5371
5375
|
class: "swiper-button-next"
|
|
5372
5376
|
})], needsScrollbar(Be) && h$1("div", {
|
|
5373
5377
|
ref: Xe,
|
|
@@ -5416,17 +5420,17 @@ const Swiper = {
|
|
|
5416
5420
|
const {
|
|
5417
5421
|
swiperRef: Ne
|
|
5418
5422
|
} = Be, Ve = ref(null), De = ref("swiper-slide"), Le = ref(!1);
|
|
5419
|
-
function
|
|
5423
|
+
function Re(ze, je, Fe) {
|
|
5420
5424
|
je === Ve.value && (De.value = Fe);
|
|
5421
5425
|
}
|
|
5422
5426
|
onMounted(() => {
|
|
5423
|
-
!Ne || !Ne.value || (Ne.value.on("_slideClass",
|
|
5427
|
+
!Ne || !Ne.value || (Ne.value.on("_slideClass", Re), $e = !0);
|
|
5424
5428
|
}), onBeforeUpdate(() => {
|
|
5425
|
-
$e || !Ne || !Ne.value || (Ne.value.on("_slideClass",
|
|
5429
|
+
$e || !Ne || !Ne.value || (Ne.value.on("_slideClass", Re), $e = !0);
|
|
5426
5430
|
}), onUpdated(() => {
|
|
5427
5431
|
!Ve.value || !Ne || !Ne.value || (typeof Be.swiperSlideIndex < "u" && (Ve.value.swiperSlideIndex = Be.swiperSlideIndex), Ne.value.destroyed && De.value !== "swiper-slide" && (De.value = "swiper-slide"));
|
|
5428
5432
|
}), onBeforeUnmount(() => {
|
|
5429
|
-
!Ne || !Ne.value || Ne.value.off("_slideClass",
|
|
5433
|
+
!Ne || !Ne.value || Ne.value.off("_slideClass", Re);
|
|
5430
5434
|
});
|
|
5431
5435
|
const Ie = computed$1(() => ({
|
|
5432
5436
|
isActive: De.value.indexOf("swiper-slide-active") >= 0,
|
|
@@ -5435,14 +5439,14 @@ const Swiper = {
|
|
|
5435
5439
|
isNext: De.value.indexOf("swiper-slide-next") >= 0
|
|
5436
5440
|
}));
|
|
5437
5441
|
provide("swiperSlide", Ie);
|
|
5438
|
-
const
|
|
5442
|
+
const Ae = () => {
|
|
5439
5443
|
Le.value = !0;
|
|
5440
5444
|
};
|
|
5441
5445
|
return () => h$1(Be.tag, {
|
|
5442
5446
|
class: uniqueClasses(`${De.value}`),
|
|
5443
5447
|
ref: Ve,
|
|
5444
5448
|
"data-swiper-slide-index": typeof Be.virtualIndex > "u" && Ne && Ne.value && Ne.value.params.loop ? Be.swiperSlideIndex : Be.virtualIndex,
|
|
5445
|
-
onLoadCapture:
|
|
5449
|
+
onLoadCapture: Ae
|
|
5446
5450
|
}, Be.zoom ? h$1("div", {
|
|
5447
5451
|
class: "swiper-zoom-container",
|
|
5448
5452
|
"data-swiper-zoom": typeof Be.zoom == "number" ? Be.zoom : void 0
|
|
@@ -5482,96 +5486,96 @@ function Navigation(Be) {
|
|
|
5482
5486
|
nextEl: null,
|
|
5483
5487
|
prevEl: null
|
|
5484
5488
|
};
|
|
5485
|
-
function Ve(
|
|
5486
|
-
let
|
|
5487
|
-
return
|
|
5489
|
+
function Ve(We) {
|
|
5490
|
+
let He;
|
|
5491
|
+
return We && typeof We == "string" && _e.isElement && (He = _e.el.querySelector(We) || _e.hostEl.querySelector(We), He) ? He : (We && (typeof We == "string" && (He = [...document.querySelectorAll(We)]), _e.params.uniqueNavElements && typeof We == "string" && He && He.length > 1 && _e.el.querySelectorAll(We).length === 1 ? He = _e.el.querySelector(We) : He && He.length === 1 && (He = He[0])), We && !He ? We : He);
|
|
5488
5492
|
}
|
|
5489
|
-
function De(
|
|
5493
|
+
function De(We, He) {
|
|
5490
5494
|
const qe = _e.params.navigation;
|
|
5491
|
-
|
|
5492
|
-
Ue && (Ue.classList[
|
|
5495
|
+
We = makeElementsArray(We), We.forEach((Ue) => {
|
|
5496
|
+
Ue && (Ue.classList[He ? "add" : "remove"](...qe.disabledClass.split(" ")), Ue.tagName === "BUTTON" && (Ue.disabled = He), _e.params.watchOverflow && _e.enabled && Ue.classList[_e.isLocked ? "add" : "remove"](qe.lockClass));
|
|
5493
5497
|
});
|
|
5494
5498
|
}
|
|
5495
5499
|
function Le() {
|
|
5496
5500
|
const {
|
|
5497
|
-
nextEl:
|
|
5498
|
-
prevEl:
|
|
5501
|
+
nextEl: We,
|
|
5502
|
+
prevEl: He
|
|
5499
5503
|
} = _e.navigation;
|
|
5500
5504
|
if (_e.params.loop) {
|
|
5501
|
-
De(
|
|
5505
|
+
De(He, !1), De(We, !1);
|
|
5502
5506
|
return;
|
|
5503
5507
|
}
|
|
5504
|
-
De(
|
|
5508
|
+
De(He, _e.isBeginning && !_e.params.rewind), De(We, _e.isEnd && !_e.params.rewind);
|
|
5505
5509
|
}
|
|
5506
|
-
function
|
|
5507
|
-
|
|
5510
|
+
function Re(We) {
|
|
5511
|
+
We.preventDefault(), !(_e.isBeginning && !_e.params.loop && !_e.params.rewind) && (_e.slidePrev(), Ne("navigationPrev"));
|
|
5508
5512
|
}
|
|
5509
|
-
function Ie(
|
|
5510
|
-
|
|
5513
|
+
function Ie(We) {
|
|
5514
|
+
We.preventDefault(), !(_e.isEnd && !_e.params.loop && !_e.params.rewind) && (_e.slideNext(), Ne("navigationNext"));
|
|
5511
5515
|
}
|
|
5512
|
-
function
|
|
5513
|
-
const
|
|
5516
|
+
function Ae() {
|
|
5517
|
+
const We = _e.params.navigation;
|
|
5514
5518
|
if (_e.params.navigation = createElementIfNotDefined(_e, _e.originalParams.navigation, _e.params.navigation, {
|
|
5515
5519
|
nextEl: "swiper-button-next",
|
|
5516
5520
|
prevEl: "swiper-button-prev"
|
|
5517
|
-
}), !(
|
|
5518
|
-
let
|
|
5521
|
+
}), !(We.nextEl || We.prevEl)) return;
|
|
5522
|
+
let He = Ve(We.nextEl), qe = Ve(We.prevEl);
|
|
5519
5523
|
Object.assign(_e.navigation, {
|
|
5520
|
-
nextEl:
|
|
5524
|
+
nextEl: He,
|
|
5521
5525
|
prevEl: qe
|
|
5522
|
-
}),
|
|
5523
|
-
const Ue = (Xe,
|
|
5524
|
-
Xe && Xe.addEventListener("click",
|
|
5526
|
+
}), He = makeElementsArray(He), qe = makeElementsArray(qe);
|
|
5527
|
+
const Ue = (Xe, Je) => {
|
|
5528
|
+
Xe && Xe.addEventListener("click", Je === "next" ? Ie : Re), !_e.enabled && Xe && Xe.classList.add(...We.lockClass.split(" "));
|
|
5525
5529
|
};
|
|
5526
|
-
|
|
5530
|
+
He.forEach((Xe) => Ue(Xe, "next")), qe.forEach((Xe) => Ue(Xe, "prev"));
|
|
5527
5531
|
}
|
|
5528
5532
|
function ze() {
|
|
5529
5533
|
let {
|
|
5530
|
-
nextEl:
|
|
5531
|
-
prevEl:
|
|
5534
|
+
nextEl: We,
|
|
5535
|
+
prevEl: He
|
|
5532
5536
|
} = _e.navigation;
|
|
5533
|
-
|
|
5537
|
+
We = makeElementsArray(We), He = makeElementsArray(He);
|
|
5534
5538
|
const qe = (Ue, Xe) => {
|
|
5535
|
-
Ue.removeEventListener("click", Xe === "next" ? Ie :
|
|
5539
|
+
Ue.removeEventListener("click", Xe === "next" ? Ie : Re), Ue.classList.remove(..._e.params.navigation.disabledClass.split(" "));
|
|
5536
5540
|
};
|
|
5537
|
-
|
|
5541
|
+
We.forEach((Ue) => qe(Ue, "next")), He.forEach((Ue) => qe(Ue, "prev"));
|
|
5538
5542
|
}
|
|
5539
5543
|
$e("init", () => {
|
|
5540
|
-
_e.params.navigation.enabled === !1 ? Fe() : (
|
|
5544
|
+
_e.params.navigation.enabled === !1 ? Fe() : (Ae(), Le());
|
|
5541
5545
|
}), $e("toEdge fromEdge lock unlock", () => {
|
|
5542
5546
|
Le();
|
|
5543
5547
|
}), $e("destroy", () => {
|
|
5544
5548
|
ze();
|
|
5545
5549
|
}), $e("enable disable", () => {
|
|
5546
5550
|
let {
|
|
5547
|
-
nextEl:
|
|
5548
|
-
prevEl:
|
|
5551
|
+
nextEl: We,
|
|
5552
|
+
prevEl: He
|
|
5549
5553
|
} = _e.navigation;
|
|
5550
|
-
if (
|
|
5554
|
+
if (We = makeElementsArray(We), He = makeElementsArray(He), _e.enabled) {
|
|
5551
5555
|
Le();
|
|
5552
5556
|
return;
|
|
5553
5557
|
}
|
|
5554
|
-
[...
|
|
5555
|
-
}), $e("click", (
|
|
5558
|
+
[...We, ...He].filter((qe) => !!qe).forEach((qe) => qe.classList.add(_e.params.navigation.lockClass));
|
|
5559
|
+
}), $e("click", (We, He) => {
|
|
5556
5560
|
let {
|
|
5557
5561
|
nextEl: qe,
|
|
5558
5562
|
prevEl: Ue
|
|
5559
5563
|
} = _e.navigation;
|
|
5560
5564
|
qe = makeElementsArray(qe), Ue = makeElementsArray(Ue);
|
|
5561
|
-
const Xe =
|
|
5562
|
-
let
|
|
5563
|
-
if (_e.isElement && !
|
|
5564
|
-
const Ze =
|
|
5565
|
-
Ze && (
|
|
5565
|
+
const Xe = He.target;
|
|
5566
|
+
let Je = Ue.includes(Xe) || qe.includes(Xe);
|
|
5567
|
+
if (_e.isElement && !Je) {
|
|
5568
|
+
const Ze = He.path || He.composedPath && He.composedPath();
|
|
5569
|
+
Ze && (Je = Ze.find((Qe) => qe.includes(Qe) || Ue.includes(Qe)));
|
|
5566
5570
|
}
|
|
5567
|
-
if (_e.params.navigation.hideOnClick && !
|
|
5571
|
+
if (_e.params.navigation.hideOnClick && !Je) {
|
|
5568
5572
|
if (_e.pagination && _e.params.pagination && _e.params.pagination.clickable && (_e.pagination.el === Xe || _e.pagination.el.contains(Xe))) return;
|
|
5569
5573
|
let Ze;
|
|
5570
5574
|
qe.length ? Ze = qe[0].classList.contains(_e.params.navigation.hiddenClass) : Ue.length && (Ze = Ue[0].classList.contains(_e.params.navigation.hiddenClass)), Ne(Ze === !0 ? "navigationShow" : "navigationHide"), [...qe, ...Ue].filter((Qe) => !!Qe).forEach((Qe) => Qe.classList.toggle(_e.params.navigation.hiddenClass));
|
|
5571
5575
|
}
|
|
5572
5576
|
});
|
|
5573
5577
|
const je = () => {
|
|
5574
|
-
_e.el.classList.remove(..._e.params.navigation.navigationDisabledClass.split(" ")),
|
|
5578
|
+
_e.el.classList.remove(..._e.params.navigation.navigationDisabledClass.split(" ")), Ae(), Le();
|
|
5575
5579
|
}, Fe = () => {
|
|
5576
5580
|
_e.el.classList.add(..._e.params.navigation.navigationDisabledClass.split(" ")), ze();
|
|
5577
5581
|
};
|
|
@@ -5579,7 +5583,7 @@ function Navigation(Be) {
|
|
|
5579
5583
|
enable: je,
|
|
5580
5584
|
disable: Fe,
|
|
5581
5585
|
update: Le,
|
|
5582
|
-
init:
|
|
5586
|
+
init: Ae,
|
|
5583
5587
|
destroy: ze
|
|
5584
5588
|
});
|
|
5585
5589
|
}
|
|
@@ -5604,36 +5608,36 @@ const Logo = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$a]
|
|
|
5604
5608
|
flat: {}
|
|
5605
5609
|
},
|
|
5606
5610
|
setup(Be) {
|
|
5607
|
-
const _e = Be, ke = useGlobalStore(), { getMetaValue: $e } = ke, { irePlaginWp: Ne } = storeToRefs(ke), Ve = ref(), De = ref(!1), Le = ref(0),
|
|
5608
|
-
var
|
|
5609
|
-
return !!((Ue = (qe = (
|
|
5611
|
+
const _e = Be, ke = useGlobalStore(), { getMetaValue: $e } = ke, { irePlaginWp: Ne } = storeToRefs(ke), Ve = ref(), De = ref(!1), Le = ref(0), Re = ref(!1), Ie = ref(0), Ae = computed$1(() => {
|
|
5612
|
+
var He, qe, Ue, Xe, Je, Ze;
|
|
5613
|
+
return !!((Ue = (qe = (He = _e.flat) == null ? void 0 : He.type) == null ? void 0 : qe.image_2d) != null && Ue.length && ((Ze = (Je = (Xe = _e.flat) == null ? void 0 : Xe.type) == null ? void 0 : Je.image_3d) != null && Ze.length));
|
|
5610
5614
|
}), ze = computed$1(() => {
|
|
5611
|
-
var
|
|
5612
|
-
return $e("shareable_link") === "true" && ((
|
|
5615
|
+
var He;
|
|
5616
|
+
return $e("shareable_link") === "true" && ((He = Ne.value) == null ? void 0 : He.is_gold);
|
|
5613
5617
|
}), je = computed$1(() => {
|
|
5614
|
-
var qe, Ue, Xe,
|
|
5615
|
-
return (De.value && ((Ue = (qe = _e.flat.type) == null ? void 0 : qe.image_2d) != null && Ue.length) ? (Xe = _e.flat.type) == null ? void 0 : Xe.image_2d : !De.value && ((Ze = (
|
|
5618
|
+
var qe, Ue, Xe, Je, Ze, Qe;
|
|
5619
|
+
return (De.value && ((Ue = (qe = _e.flat.type) == null ? void 0 : qe.image_2d) != null && Ue.length) ? (Xe = _e.flat.type) == null ? void 0 : Xe.image_2d : !De.value && ((Ze = (Je = _e.flat.type) == null ? void 0 : Je.image_3d) != null && Ze.length) ? (Qe = _e.flat.type) == null ? void 0 : Qe.image_3d : []).slice(0, 6);
|
|
5616
5620
|
}), Fe = async () => {
|
|
5617
|
-
|
|
5618
|
-
|
|
5621
|
+
Re.value || !ze.value || (await copyToClipboard(window.location.href), Re.value = !0, setTimeout(() => {
|
|
5622
|
+
Re.value = !1;
|
|
5619
5623
|
}, 2e3));
|
|
5620
|
-
},
|
|
5621
|
-
Ve.value =
|
|
5624
|
+
}, We = (He) => {
|
|
5625
|
+
Ve.value = He;
|
|
5622
5626
|
};
|
|
5623
5627
|
return watch(
|
|
5624
5628
|
() => De.value,
|
|
5625
5629
|
() => {
|
|
5626
5630
|
Le.value = 0, Ie.value++, setTimeout(() => {
|
|
5627
|
-
var
|
|
5628
|
-
(qe = (
|
|
5631
|
+
var He, qe, Ue, Xe;
|
|
5632
|
+
(qe = (He = Ve.value) == null ? void 0 : He.navigation) == null || qe.init(), (Xe = (Ue = Ve.value) == null ? void 0 : Ue.navigation) == null || Xe.update();
|
|
5629
5633
|
}, 400);
|
|
5630
5634
|
}
|
|
5631
5635
|
), onMounted(() => {
|
|
5632
|
-
var
|
|
5633
|
-
(Ue = Object.keys(((qe = (
|
|
5634
|
-
}), (
|
|
5636
|
+
var He, qe, Ue;
|
|
5637
|
+
(Ue = Object.keys(((qe = (He = _e.flat) == null ? void 0 : He.type) == null ? void 0 : qe.image_3d) || {})) != null && Ue.length || (De.value = !0);
|
|
5638
|
+
}), (He, qe) => (openBlock(), createBlock(FancyBoxComp, { options: {} }, {
|
|
5635
5639
|
default: withCtx(() => {
|
|
5636
|
-
var Ue, Xe,
|
|
5640
|
+
var Ue, Xe, Je, Ze, Qe, oi, ii, Ke, Ye;
|
|
5637
5641
|
return [
|
|
5638
5642
|
createElementVNode("div", _hoisted_1$o, [
|
|
5639
5643
|
qe[2] || (qe[2] = createElementVNode("div", { class: "ire-hidden ire-w-fit ire-p-4 md:ire-block" }, null, -1)),
|
|
@@ -5656,7 +5660,7 @@ const Logo = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$a]
|
|
|
5656
5660
|
},
|
|
5657
5661
|
modules: [unref(Navigation)],
|
|
5658
5662
|
class: "ire-w-full",
|
|
5659
|
-
onSwiper:
|
|
5663
|
+
onSwiper: We
|
|
5660
5664
|
}, {
|
|
5661
5665
|
default: withCtx(() => [
|
|
5662
5666
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(je.value, (ei, ti) => (openBlock(), createBlock(unref(SwiperSlide), {
|
|
@@ -5730,13 +5734,13 @@ const Logo = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$a]
|
|
|
5730
5734
|
mode: "out-in"
|
|
5731
5735
|
}, {
|
|
5732
5736
|
default: withCtx(() => [
|
|
5733
|
-
|
|
5737
|
+
Re.value ? (openBlock(), createBlock(Correct, { key: 0 })) : (openBlock(), createBlock(ClipBoard, { key: 1 }))
|
|
5734
5738
|
]),
|
|
5735
5739
|
_: 1
|
|
5736
5740
|
})
|
|
5737
5741
|
])) : createCommentVNode("", !0),
|
|
5738
|
-
|
|
5739
|
-
(Ze = (
|
|
5742
|
+
Ae.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
5743
|
+
(Ze = (Je = (Xe = (Ue = Be.flat) == null ? void 0 : Ue.type) == null ? void 0 : Xe.image_3d) == null ? void 0 : Je[0]) != null && Ze.url ? (openBlock(), createBlock(_sfc_main$x, {
|
|
5740
5744
|
key: 0,
|
|
5741
5745
|
title: unref(tr)("3d plan"),
|
|
5742
5746
|
variant: De.value ? "outline" : "default",
|
|
@@ -5750,7 +5754,7 @@ const Logo = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$a]
|
|
|
5750
5754
|
]),
|
|
5751
5755
|
_: 1
|
|
5752
5756
|
}, 8, ["title", "variant"])) : createCommentVNode("", !0),
|
|
5753
|
-
(
|
|
5757
|
+
(Ke = (ii = (oi = (Qe = Be.flat) == null ? void 0 : Qe.type) == null ? void 0 : oi.image_2d) == null ? void 0 : ii[0]) != null && Ke.url ? (openBlock(), createBlock(_sfc_main$x, {
|
|
5754
5758
|
key: 1,
|
|
5755
5759
|
title: unref(tr)("2d plan"),
|
|
5756
5760
|
variant: De.value ? "default" : "outline",
|
|
@@ -5833,15 +5837,15 @@ const Logo = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$a]
|
|
|
5833
5837
|
},
|
|
5834
5838
|
emits: ["hideForm"],
|
|
5835
5839
|
setup(Be, { emit: _e }) {
|
|
5836
|
-
var Ie,
|
|
5840
|
+
var Ie, Ae;
|
|
5837
5841
|
const ke = _e, $e = Be, Ne = useGlobalStore(), Ve = ref({
|
|
5838
5842
|
project_id: (Ie = $e.flat) == null ? void 0 : Ie.project_id,
|
|
5839
|
-
flat_id: (
|
|
5843
|
+
flat_id: (Ae = $e.flat) == null ? void 0 : Ae.id,
|
|
5840
5844
|
name: "",
|
|
5841
5845
|
phone: "",
|
|
5842
5846
|
email: "",
|
|
5843
5847
|
comment: ""
|
|
5844
|
-
}), De = ref(!1), Le = ref(!1),
|
|
5848
|
+
}), De = ref(!1), Le = ref(!1), Re = async () => {
|
|
5845
5849
|
var je;
|
|
5846
5850
|
if (De.value) return;
|
|
5847
5851
|
De.value = !0;
|
|
@@ -5863,7 +5867,7 @@ const Logo = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$a]
|
|
|
5863
5867
|
}, 4e3)) : (De.value = !1, console.error("Something went wrong!"));
|
|
5864
5868
|
};
|
|
5865
5869
|
return (ze, je) => (openBlock(), createElementBlock("form", {
|
|
5866
|
-
onSubmit: withModifiers(
|
|
5870
|
+
onSubmit: withModifiers(Re, ["prevent"]),
|
|
5867
5871
|
class: "ire-w-full"
|
|
5868
5872
|
}, [
|
|
5869
5873
|
createVNode(Transition, {
|
|
@@ -5954,52 +5958,52 @@ const Logo = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$a]
|
|
|
5954
5958
|
},
|
|
5955
5959
|
emits: ["changeComponent"],
|
|
5956
5960
|
setup(Be) {
|
|
5957
|
-
const _e = Be, ke = useGlobalStore(), { getMetaValue: $e } = ke, { irePlaginWp: Ne, shortcodeData: Ve } = storeToRefs(ke), De = inject("fromListView"), Le = ref(!1),
|
|
5958
|
-
var
|
|
5959
|
-
return (
|
|
5961
|
+
const _e = Be, ke = useGlobalStore(), { getMetaValue: $e } = ke, { irePlaginWp: Ne, shortcodeData: Ve } = storeToRefs(ke), De = inject("fromListView"), Le = ref(!1), Re = computed$1(() => {
|
|
5962
|
+
var He;
|
|
5963
|
+
return (He = Ve.value) == null ? void 0 : He.configs.tableContactUrl;
|
|
5960
5964
|
}), Ie = computed$1(() => {
|
|
5961
|
-
var
|
|
5962
|
-
return $e("shareable_link") === "true" && ((
|
|
5963
|
-
}),
|
|
5964
|
-
var
|
|
5965
|
-
return !!($e("request_callback") === "true" && ((
|
|
5965
|
+
var He;
|
|
5966
|
+
return $e("shareable_link") === "true" && ((He = Ne.value) == null ? void 0 : He.is_gold);
|
|
5967
|
+
}), Ae = computed$1(() => {
|
|
5968
|
+
var He;
|
|
5969
|
+
return !!($e("request_callback") === "true" && ((He = Ne.value) != null && He.is_gold));
|
|
5966
5970
|
}), ze = computed$1(() => {
|
|
5967
|
-
var
|
|
5968
|
-
return ((Ue = (qe = (
|
|
5971
|
+
var He, qe, Ue, Xe, Je, Ze;
|
|
5972
|
+
return ((Ue = (qe = (He = _e.flat) == null ? void 0 : He.type) == null ? void 0 : qe.image_3d) == null ? void 0 : Ue.length) || ((Ze = (Je = (Xe = _e.flat) == null ? void 0 : Xe.type) == null ? void 0 : Je.image_2d) == null ? void 0 : Ze.length);
|
|
5969
5973
|
}), je = () => {
|
|
5970
|
-
var Ue, Xe,
|
|
5974
|
+
var Ue, Xe, Je, Ze, Qe;
|
|
5971
5975
|
if (!Ie.value || De) return;
|
|
5972
|
-
const
|
|
5973
|
-
(
|
|
5974
|
-
var
|
|
5975
|
-
return ((
|
|
5976
|
+
const He = (Xe = (Ue = Ve.value) == null ? void 0 : Ue.floors) == null ? void 0 : Xe.find(
|
|
5977
|
+
(oi) => {
|
|
5978
|
+
var ii, Ke, Ye;
|
|
5979
|
+
return ((ii = oi.id) == null ? void 0 : ii.toString()) === ((Ye = (Ke = _e.flat) == null ? void 0 : Ke.floor_id) == null ? void 0 : Ye.toString());
|
|
5976
5980
|
}
|
|
5977
5981
|
), qe = {
|
|
5978
|
-
flatId: (
|
|
5979
|
-
floorId:
|
|
5982
|
+
flatId: (Je = _e.flat) == null ? void 0 : Je.id,
|
|
5983
|
+
floorId: He == null ? void 0 : He.id,
|
|
5980
5984
|
projectId: (Qe = (Ze = Ve.value) == null ? void 0 : Ze.project) == null ? void 0 : Qe.id
|
|
5981
5985
|
};
|
|
5982
|
-
Object.entries(qe).forEach(([
|
|
5983
|
-
|
|
5986
|
+
Object.entries(qe).forEach(([oi, ii]) => {
|
|
5987
|
+
oi && ii && setQuery(oi, ii);
|
|
5984
5988
|
});
|
|
5985
|
-
}, Fe = (
|
|
5986
|
-
if (!Array.isArray(
|
|
5989
|
+
}, Fe = (He) => {
|
|
5990
|
+
if (!Array.isArray(He)) return {};
|
|
5987
5991
|
const qe = {};
|
|
5988
|
-
for (const Ue of
|
|
5992
|
+
for (const Ue of He)
|
|
5989
5993
|
qe[(Ue == null ? void 0 : Ue.key) ?? ""] = (Ue == null ? void 0 : Ue.value) ?? "";
|
|
5990
5994
|
return qe;
|
|
5991
|
-
},
|
|
5992
|
-
var
|
|
5993
|
-
if (
|
|
5994
|
-
const Xe = _e.flat,
|
|
5995
|
+
}, We = () => {
|
|
5996
|
+
var He, qe, Ue;
|
|
5997
|
+
if (Ae.value && $e("redirect_to_callback_url") === "true") {
|
|
5998
|
+
const Xe = _e.flat, Je = Xe ? {
|
|
5995
5999
|
...Xe,
|
|
5996
6000
|
type: Xe.type ? {
|
|
5997
6001
|
...Xe.type,
|
|
5998
|
-
other: Fe(((
|
|
6002
|
+
other: Fe(((He = Xe.type) == null ? void 0 : He.other) ?? [])
|
|
5999
6003
|
} : Xe.type
|
|
6000
6004
|
} : null;
|
|
6001
6005
|
window.open(
|
|
6002
|
-
`${
|
|
6006
|
+
`${Re.value}${getNested(Je, ((Ue = (qe = Ve.value) == null ? void 0 : qe.configs) == null ? void 0 : Ue.flatFieldQueryParameter) || "") || (Xe == null ? void 0 : Xe.id)}`,
|
|
6003
6007
|
"_blank"
|
|
6004
6008
|
);
|
|
6005
6009
|
} else
|
|
@@ -6011,8 +6015,8 @@ const Logo = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$a]
|
|
|
6011
6015
|
["flatId", "floorId", "projectId"].forEach((qe) => {
|
|
6012
6016
|
setQuery(qe, "");
|
|
6013
6017
|
});
|
|
6014
|
-
}), (
|
|
6015
|
-
var Ue, Xe,
|
|
6018
|
+
}), (He, qe) => {
|
|
6019
|
+
var Ue, Xe, Je, Ze, Qe, oi, ii, Ke, Ye, Ge, ei, ti, ni, ri, ai, si, li, di, ui, hi, ci, pi, mi, ki, vi, Si, gi, bi, yi, _i, wi, xi, fi, Ci, Ei, Bi, Pi, Mi, Ni, Ti, Oi, Vi, Di, Li, Ri, Ai;
|
|
6016
6020
|
return openBlock(), createElementBlock("div", {
|
|
6017
6021
|
class: normalizeClass(["irep-flat-preview ire-grid", {
|
|
6018
6022
|
"lg:ire-grid-cols-[1.4fr,1fr] xl:ire-min-h-[500px] xl:ire-min-w-[1120px]": ze.value
|
|
@@ -6038,9 +6042,9 @@ const Logo = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$a]
|
|
|
6038
6042
|
valueClass: "flat_type_value",
|
|
6039
6043
|
class: "[&_.flat-preview-value]:ire-min-w-fit [&_.flat-preview-value]:ire-font-semibold"
|
|
6040
6044
|
}, null, 8, ["keyName", "value"])) : createCommentVNode("", !0),
|
|
6041
|
-
(
|
|
6042
|
-
createElementVNode("div", _hoisted_4$7, toDisplayString((
|
|
6043
|
-
(Ye = (
|
|
6045
|
+
(Je = (Xe = Be.flat) == null ? void 0 : Xe.type) != null && Je.title || (Qe = (Ze = Be.flat) == null ? void 0 : Ze.type) != null && Qe.teaser ? (openBlock(), createElementBlock("div", _hoisted_3$b, [
|
|
6046
|
+
createElementVNode("div", _hoisted_4$7, toDisplayString((ii = (oi = Be.flat) == null ? void 0 : oi.type) == null ? void 0 : ii.title), 1),
|
|
6047
|
+
(Ye = (Ke = Be.flat) == null ? void 0 : Ke.type) != null && Ye.teaser ? (openBlock(), createElementBlock("div", _hoisted_5$6, toDisplayString((ei = (Ge = Be.flat) == null ? void 0 : Ge.type) == null ? void 0 : ei.teaser), 1)) : createCommentVNode("", !0)
|
|
6044
6048
|
])) : createCommentVNode("", !0),
|
|
6045
6049
|
createElementVNode("div", _hoisted_6$5, [
|
|
6046
6050
|
(ti = Be.flat) != null && ti.block_id ? (openBlock(), createBlock(_sfc_main$y, {
|
|
@@ -6054,7 +6058,7 @@ const Logo = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$a]
|
|
|
6054
6058
|
(si = Be.flat) != null && si.floor_id ? (openBlock(), createBlock(_sfc_main$y, {
|
|
6055
6059
|
key: 1,
|
|
6056
6060
|
keyName: unref(tr)("floor"),
|
|
6057
|
-
value: ((
|
|
6061
|
+
value: ((ui = (di = unref(getFloorById)(+((li = Be.flat) == null ? void 0 : li.floor_id))) == null ? void 0 : di.floor_number) == null ? void 0 : ui.toString()) || "",
|
|
6058
6062
|
keyClass: "flat_floor_name_key flat_date_key",
|
|
6059
6063
|
valueClass: "flat_floor_name_value flat_date_value",
|
|
6060
6064
|
class: "irep-flat-preview__right-floor-number"
|
|
@@ -6062,15 +6066,15 @@ const Logo = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$a]
|
|
|
6062
6066
|
(hi = Be.flat) != null && hi.floor_id ? (openBlock(), createBlock(_sfc_main$y, {
|
|
6063
6067
|
key: 2,
|
|
6064
6068
|
keyName: unref(tr)("floor title"),
|
|
6065
|
-
value: ((
|
|
6069
|
+
value: ((mi = (pi = unref(getFloorById)(+((ci = Be.flat) == null ? void 0 : ci.floor_id))) == null ? void 0 : pi.title) == null ? void 0 : mi.toString()) || "",
|
|
6066
6070
|
keyClass: "flat_floor_key flat_date_key",
|
|
6067
6071
|
valueClass: "flat_floor_value flat_date_value",
|
|
6068
6072
|
class: "irep-flat-preview__right-floor-title"
|
|
6069
6073
|
}, null, 8, ["keyName", "value"])) : createCommentVNode("", !0),
|
|
6070
|
-
(
|
|
6074
|
+
(vi = (ki = Be.flat) == null ? void 0 : ki.type) != null && vi.area_m2 ? (openBlock(), createBlock(_sfc_main$y, {
|
|
6071
6075
|
key: 3,
|
|
6072
6076
|
keyName: unref(tr)("area"),
|
|
6073
|
-
value: unref(getArea)(Number((
|
|
6077
|
+
value: unref(getArea)(Number((Si = Be.flat) == null ? void 0 : Si.type.area_m2)),
|
|
6074
6078
|
keyClass: "flat_area_key flat_date_key",
|
|
6075
6079
|
valueClass: "flat_area_value flat_date_value",
|
|
6076
6080
|
class: "irep-flat-preview__right-floor-area"
|
|
@@ -6080,7 +6084,7 @@ const Logo = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$a]
|
|
|
6080
6084
|
]),
|
|
6081
6085
|
_: 1
|
|
6082
6086
|
}, 8, ["keyName", "value"])) : createCommentVNode("", !0),
|
|
6083
|
-
(
|
|
6087
|
+
(bi = (gi = Be.flat) == null ? void 0 : gi.type) != null && bi.rooms_count ? (openBlock(), createBlock(_sfc_main$y, {
|
|
6084
6088
|
key: 4,
|
|
6085
6089
|
keyName: unref(tr)("room"),
|
|
6086
6090
|
value: unref(getRoomCount)(Number(Be.flat.type.rooms_count)),
|
|
@@ -6088,10 +6092,10 @@ const Logo = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$a]
|
|
|
6088
6092
|
valueClass: "flat_rooms_value flat_date_value",
|
|
6089
6093
|
class: "irep-flat-preview__right-floor-room"
|
|
6090
6094
|
}, null, 8, ["keyName", "value"])) : createCommentVNode("", !0),
|
|
6091
|
-
(
|
|
6092
|
-
key:
|
|
6093
|
-
keyName:
|
|
6094
|
-
value:
|
|
6095
|
+
(wi = (_i = (yi = Be.flat) == null ? void 0 : yi.type) == null ? void 0 : _i.other) != null && wi.length ? (openBlock(!0), createElementBlock(Fragment, { key: 5 }, renderList(Be.flat.type.other, ($i) => (openBlock(), createBlock(_sfc_main$y, {
|
|
6096
|
+
key: $i.key,
|
|
6097
|
+
keyName: $i.key,
|
|
6098
|
+
value: $i.value,
|
|
6095
6099
|
keyClass: "flat_date_key",
|
|
6096
6100
|
valueClass: "flat_date_value"
|
|
6097
6101
|
}, null, 8, ["keyName", "value"]))), 128)) : createCommentVNode("", !0)
|
|
@@ -6100,10 +6104,10 @@ const Logo = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$a]
|
|
|
6100
6104
|
createElementVNode("div", _hoisted_7$4, [
|
|
6101
6105
|
createElementVNode("div", {
|
|
6102
6106
|
class: normalizeClass(["irep-flat-modal-price-container ire-w-fit ire-rounded-sm ire-bg-[var(--primary-color)] ire-p-2 ire-text-4xl ire-text-white", [
|
|
6103
|
-
`irep-flat-modal--${((
|
|
6107
|
+
`irep-flat-modal--${((fi = (xi = Be.flat) == null ? void 0 : xi.conf) == null ? void 0 : fi.replace(/ /g, "-")) || "price"}`
|
|
6104
6108
|
]])
|
|
6105
6109
|
}, [
|
|
6106
|
-
(
|
|
6110
|
+
(Ci = Be.flat) != null && Ci.conf ? (openBlock(), createElementBlock("div", _hoisted_8$1, toDisplayString(unref(tr)(Be.flat.conf)), 1)) : (Ei = Be.flat) != null && Ei.request_price ? (openBlock(), createElementBlock("div", _hoisted_9$1, toDisplayString(unref(tr)("Request Price")), 1)) : (Bi = Be.flat) != null && Bi.offer_price ? (openBlock(), createElementBlock("div", _hoisted_10$1, [
|
|
6107
6111
|
createElementVNode("div", _hoisted_11$1, [
|
|
6108
6112
|
createTextVNode(toDisplayString(unref(getPrice)(Number((Pi = Be.flat) == null ? void 0 : Pi.price))) + " ", 1),
|
|
6109
6113
|
createElementVNode("span", null, toDisplayString(unref(currencySymbol)()), 1)
|
|
@@ -6132,17 +6136,17 @@ const Logo = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$a]
|
|
|
6132
6136
|
class: "ire-w-full"
|
|
6133
6137
|
}, null, 8, ["title"])
|
|
6134
6138
|
], 8, _hoisted_16)) : createCommentVNode("", !0),
|
|
6135
|
-
|
|
6139
|
+
Ae.value ? (openBlock(), createElementBlock("div", _hoisted_17, [
|
|
6136
6140
|
createVNode(_sfc_main$x, {
|
|
6137
6141
|
title: unref(tr)("request callback"),
|
|
6138
6142
|
active: "",
|
|
6139
6143
|
class: "!ire-w-full",
|
|
6140
|
-
onClick:
|
|
6144
|
+
onClick: We
|
|
6141
6145
|
}, null, 8, ["title"])
|
|
6142
6146
|
])) : createCommentVNode("", !0)
|
|
6143
6147
|
])
|
|
6144
6148
|
], 2),
|
|
6145
|
-
|
|
6149
|
+
Ae.value ? (openBlock(), createElementBlock("div", {
|
|
6146
6150
|
key: 0,
|
|
6147
6151
|
class: normalizeClass(["ease-in-out-quint ire-mt-4 ire-h-full ire-w-full ire-flex-[1_0_auto] ire-origin-right ire-px-6 ire-py-4 ire-transition-transform ire-duration-300", {
|
|
6148
6152
|
"!ire-h-0 ire-translate-x-full ire-scale-0": !Le.value,
|
|
@@ -6151,7 +6155,7 @@ const Logo = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$a]
|
|
|
6151
6155
|
}, [
|
|
6152
6156
|
createVNode(_sfc_main$q, {
|
|
6153
6157
|
flat: Be.flat,
|
|
6154
|
-
onHideForm: qe[0] || (qe[0] = (
|
|
6158
|
+
onHideForm: qe[0] || (qe[0] = ($i) => Le.value = !1)
|
|
6155
6159
|
}, null, 8, ["flat"])
|
|
6156
6160
|
], 2)) : createCommentVNode("", !0)
|
|
6157
6161
|
])
|
|
@@ -6176,38 +6180,38 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$9
|
|
|
6176
6180
|
emits: ["close"],
|
|
6177
6181
|
setup(Be) {
|
|
6178
6182
|
const _e = useGlobalStore(), { cssVariables: ke } = storeToRefs(_e);
|
|
6179
|
-
let $e = 0, Ne = null;
|
|
6183
|
+
let $e = 0, Ne = null, Ve = null;
|
|
6180
6184
|
return onMounted(() => {
|
|
6181
6185
|
$e = window.scrollY;
|
|
6182
|
-
const { body:
|
|
6183
|
-
Ne =
|
|
6186
|
+
const { body: De, documentElement: Le } = document, Re = window.innerWidth - Le.clientWidth, Ae = (parseFloat(getComputedStyle(De).paddingRight || "0") || 0) + Re;
|
|
6187
|
+
Ne = De.getAttribute("style"), Ve = Le.getAttribute("style"), De.setAttribute(
|
|
6184
6188
|
"style",
|
|
6185
6189
|
`overflow: hidden; padding-right: ${Ae}px;`
|
|
6186
|
-
);
|
|
6190
|
+
), Le.setAttribute("style", "overflow: hidden;");
|
|
6187
6191
|
}), onUnmounted(() => {
|
|
6188
6192
|
setTimeout(() => {
|
|
6189
|
-
const { body:
|
|
6190
|
-
Ne !== null ?
|
|
6193
|
+
const { body: De, documentElement: Le } = document;
|
|
6194
|
+
Ne !== null ? De.setAttribute("style", Ne) : De.removeAttribute("style"), Ve !== null ? Le.setAttribute("style", Ve) : Le.removeAttribute("style"), window.scrollTo(0, $e);
|
|
6191
6195
|
}, 250);
|
|
6192
|
-
}), (
|
|
6196
|
+
}), (De, Le) => (openBlock(), createElementBlock("div", {
|
|
6193
6197
|
style: normalizeStyle(unref(ke)),
|
|
6194
6198
|
class: "irep-modal ire-fixed ire-left-0 ire-top-0 ire-z-[99999] ire-flex ire-h-full ire-w-full ire-cursor-pointer ire-items-center ire-justify-center ire-p-4 lg:ire-px-10 lg:ire-py-32"
|
|
6195
6199
|
}, [
|
|
6196
6200
|
createElementVNode("div", {
|
|
6197
6201
|
class: "ire-absolute ire-left-0 ire-top-0 ire-h-full ire-w-full ire-bg-black/40 ire-transition-all",
|
|
6198
|
-
onClick:
|
|
6202
|
+
onClick: Le[0] || (Le[0] = (Re) => De.$emit("close"))
|
|
6199
6203
|
}),
|
|
6200
6204
|
createElementVNode("div", _hoisted_1$j, [
|
|
6201
6205
|
createElementVNode("div", _hoisted_2$a, [
|
|
6202
6206
|
createElementVNode("div", {
|
|
6203
6207
|
class: "ire-z-[999] ire-flex ire-aspect-[1/1] ire-w-fit ire-cursor-pointer ire-justify-center ire-rounded-full ire-bg-gray-100 ire-p-2 ire-text-center ire-transition-all hover:ire-bg-gray-600 [&_path]:ire-fill-gray-400 [&_path]:hover:ire-fill-white [&_svg]:ire-size-4",
|
|
6204
|
-
onClick:
|
|
6208
|
+
onClick: Le[1] || (Le[1] = (Re) => De.$emit("close"))
|
|
6205
6209
|
}, [
|
|
6206
6210
|
createVNode(Close)
|
|
6207
6211
|
])
|
|
6208
6212
|
]),
|
|
6209
6213
|
createElementVNode("div", _hoisted_3$a, [
|
|
6210
|
-
renderSlot(
|
|
6214
|
+
renderSlot(De.$slots, "default")
|
|
6211
6215
|
])
|
|
6212
6216
|
])
|
|
6213
6217
|
], 4));
|
|
@@ -6230,15 +6234,15 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$9
|
|
|
6230
6234
|
},
|
|
6231
6235
|
setup(Be) {
|
|
6232
6236
|
return (_e, ke) => {
|
|
6233
|
-
var $e, Ne, Ve, De, Le,
|
|
6237
|
+
var $e, Ne, Ve, De, Le, Re, Ie, Ae, ze, je, Fe, We;
|
|
6234
6238
|
return openBlock(), createElementBlock("div", _hoisted_1$h, [
|
|
6235
6239
|
createElementVNode("p", _hoisted_2$9, toDisplayString((Ne = ($e = Be.modalData) == null ? void 0 : $e.modalObject) == null ? void 0 : Ne.title), 1),
|
|
6236
6240
|
createVNode(_sfc_main$m, {
|
|
6237
6241
|
editor: (De = (Ve = Be.modalData) == null ? void 0 : Ve.modalObject) == null ? void 0 : De.description
|
|
6238
6242
|
}, null, 8, ["editor"]),
|
|
6239
|
-
(
|
|
6243
|
+
(Ae = (Ie = (Re = (Le = Be.modalData) == null ? void 0 : Le.modalObject) == null ? void 0 : Re.modalImage) == null ? void 0 : Ie[0]) != null && Ae.url ? (openBlock(), createElementBlock("img", {
|
|
6240
6244
|
key: 0,
|
|
6241
|
-
src: (
|
|
6245
|
+
src: (We = (Fe = (je = (ze = Be.modalData) == null ? void 0 : ze.modalObject) == null ? void 0 : je.modalImage) == null ? void 0 : Fe[0]) == null ? void 0 : We.url,
|
|
6242
6246
|
alt: "",
|
|
6243
6247
|
class: "ire-mt-5 ire-h-[400px] ire-w-full ire-object-contain"
|
|
6244
6248
|
}, null, 8, _hoisted_3$9)) : createCommentVNode("", !0)
|
|
@@ -6255,124 +6259,124 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$9
|
|
|
6255
6259
|
},
|
|
6256
6260
|
emits: ["changeComponent"],
|
|
6257
6261
|
setup(Be, { emit: _e }) {
|
|
6258
|
-
const ke = _e, $e = Be, Ne = inject("showFlatModal"), Ve = useGlobalStore(), { openReservedFlat: De, openSoldFlat: Le } = storeToRefs(Ve),
|
|
6262
|
+
const ke = _e, $e = Be, Ne = inject("showFlatModal"), Ve = useGlobalStore(), { openReservedFlat: De, openSoldFlat: Le } = storeToRefs(Ve), Re = ref(), Ie = ref(null), Ae = ref(), ze = ref(), je = computed$1(() => {
|
|
6259
6263
|
var qe, Ue;
|
|
6260
6264
|
if ((qe = $e.block) != null && qe.svg)
|
|
6261
6265
|
return (Ue = $e.block) == null ? void 0 : Ue.svg;
|
|
6262
6266
|
}), Fe = (qe) => {
|
|
6263
6267
|
const Ue = qe.target;
|
|
6264
6268
|
Ue && (Ie.value = Ue);
|
|
6265
|
-
},
|
|
6266
|
-
var Xe,
|
|
6269
|
+
}, We = (qe) => {
|
|
6270
|
+
var Xe, Je, Ze;
|
|
6267
6271
|
const Ue = qe.target;
|
|
6268
|
-
(Ue == null ? void 0 : Ue.nodeName) === "path" && (((Xe = ze.value) == null ? void 0 : Xe.conf) === "reserved" && !De.value || ((
|
|
6272
|
+
(Ue == null ? void 0 : Ue.nodeName) === "path" && (((Xe = ze.value) == null ? void 0 : Xe.conf) === "reserved" && !De.value || ((Je = ze.value) == null ? void 0 : Je.conf) === "sold" && !Le.value || ke(
|
|
6269
6273
|
"changeComponent",
|
|
6270
|
-
((Ze =
|
|
6274
|
+
((Ze = Ae.value) == null ? void 0 : Ze.type) || "",
|
|
6271
6275
|
ze.value
|
|
6272
6276
|
));
|
|
6273
|
-
},
|
|
6277
|
+
}, He = () => {
|
|
6274
6278
|
var Ue;
|
|
6275
|
-
if (!
|
|
6276
|
-
((Ue =
|
|
6277
|
-
var
|
|
6278
|
-
const
|
|
6279
|
-
(ei) => (ei == null ? void 0 : ei.key) ===
|
|
6279
|
+
if (!Re.value) return;
|
|
6280
|
+
((Ue = Re.value) == null ? void 0 : Ue.querySelectorAll("g")).forEach((Xe) => {
|
|
6281
|
+
var ii, Ke, Ye, Ge;
|
|
6282
|
+
const Je = Xe == null ? void 0 : Xe.getAttribute("id"), Ze = (Ke = (ii = $e.block) == null ? void 0 : ii.polygon_data) == null ? void 0 : Ke.find(
|
|
6283
|
+
(ei) => (ei == null ? void 0 : ei.key) === Je
|
|
6280
6284
|
), Qe = Ze == null ? void 0 : Ze.id;
|
|
6281
|
-
let
|
|
6285
|
+
let oi = "";
|
|
6282
6286
|
switch (Ze == null ? void 0 : Ze.type) {
|
|
6283
6287
|
case "floor": {
|
|
6284
6288
|
const ei = (Ye = $e.floors) == null ? void 0 : Ye.find((ti) => ti.id === Qe);
|
|
6285
|
-
|
|
6289
|
+
oi = getConfValue((ei == null ? void 0 : ei.conf) || "");
|
|
6286
6290
|
break;
|
|
6287
6291
|
}
|
|
6288
6292
|
case "flat": {
|
|
6289
6293
|
const ei = (Ge = $e.flats) == null ? void 0 : Ge.find((ti) => ti.id === Qe);
|
|
6290
|
-
|
|
6294
|
+
oi = getConfValue((ei == null ? void 0 : ei.conf) || "");
|
|
6291
6295
|
break;
|
|
6292
6296
|
}
|
|
6293
6297
|
}
|
|
6294
|
-
Xe.setAttribute("conf",
|
|
6298
|
+
Xe.setAttribute("conf", oi || "");
|
|
6295
6299
|
});
|
|
6296
6300
|
};
|
|
6297
6301
|
return watch(
|
|
6298
6302
|
() => Ne == null ? void 0 : Ne.value,
|
|
6299
6303
|
() => {
|
|
6300
|
-
Ne != null && Ne.value || (Ie.value = null,
|
|
6304
|
+
Ne != null && Ne.value || (Ie.value = null, Ae.value = null);
|
|
6301
6305
|
}
|
|
6302
6306
|
), watch(
|
|
6303
6307
|
() => Ie.value,
|
|
6304
6308
|
(qe) => {
|
|
6305
|
-
var Xe,
|
|
6309
|
+
var Xe, Je, Ze, Qe, oi, ii, Ke, Ye;
|
|
6306
6310
|
if (!qe) return;
|
|
6307
6311
|
Ve.hoverdSvg = qe;
|
|
6308
6312
|
const Ue = qe == null ? void 0 : qe.parentElement;
|
|
6309
6313
|
if (Ue && (Ue == null ? void 0 : Ue.nodeName) === "g") {
|
|
6310
6314
|
const Ge = Ue == null ? void 0 : Ue.getAttribute("id");
|
|
6311
|
-
if (!Ge || (
|
|
6312
|
-
if (((Ze =
|
|
6315
|
+
if (!Ge || (Ae.value = ((Je = (Xe = $e.block) == null ? void 0 : Xe.polygon_data) == null ? void 0 : Je.find((ei) => (ei == null ? void 0 : ei.key) === Ge)) || null, !Ae.value)) return;
|
|
6316
|
+
if (((Ze = Ae.value) == null ? void 0 : Ze.type) === "floor") {
|
|
6313
6317
|
const ei = (Qe = $e.floors) == null ? void 0 : Qe.find(
|
|
6314
6318
|
(ti) => {
|
|
6315
6319
|
var ni;
|
|
6316
|
-
return (ti == null ? void 0 : ti.id) === ((ni =
|
|
6320
|
+
return (ti == null ? void 0 : ti.id) === ((ni = Ae.value) == null ? void 0 : ni.id);
|
|
6317
6321
|
}
|
|
6318
6322
|
);
|
|
6319
6323
|
ze.value = ei;
|
|
6320
|
-
} else if (((
|
|
6321
|
-
const ei = (
|
|
6324
|
+
} else if (((oi = Ae.value) == null ? void 0 : oi.type) === "flat") {
|
|
6325
|
+
const ei = (ii = $e.flats) == null ? void 0 : ii.find(
|
|
6322
6326
|
(ti) => {
|
|
6323
6327
|
var ni;
|
|
6324
|
-
return (ti == null ? void 0 : ti.id) === ((ni =
|
|
6328
|
+
return (ti == null ? void 0 : ti.id) === ((ni = Ae.value) == null ? void 0 : ni.id);
|
|
6325
6329
|
}
|
|
6326
6330
|
);
|
|
6327
6331
|
ze.value = ei;
|
|
6328
|
-
} else if (((
|
|
6332
|
+
} else if (((Ke = Ae.value) == null ? void 0 : Ke.type) === "tooltip") {
|
|
6329
6333
|
const ei = (Ye = $e.actions) == null ? void 0 : Ye.find(
|
|
6330
6334
|
(ti) => {
|
|
6331
6335
|
var ni;
|
|
6332
|
-
return (ti == null ? void 0 : ti.id) === ((ni =
|
|
6336
|
+
return (ti == null ? void 0 : ti.id) === ((ni = Ae.value) == null ? void 0 : ni.id);
|
|
6333
6337
|
}
|
|
6334
6338
|
);
|
|
6335
6339
|
ze.value = ei;
|
|
6336
6340
|
} else
|
|
6337
6341
|
ze.value = null;
|
|
6338
6342
|
} else
|
|
6339
|
-
|
|
6343
|
+
Ae.value = null, ze.value = null;
|
|
6340
6344
|
}
|
|
6341
6345
|
), onMounted(() => {
|
|
6342
|
-
|
|
6346
|
+
He(), document.addEventListener("mousemove", Fe);
|
|
6343
6347
|
}), onUnmounted(() => {
|
|
6344
6348
|
document.removeEventListener("mousemove", Fe);
|
|
6345
6349
|
}), (qe, Ue) => {
|
|
6346
6350
|
var Xe;
|
|
6347
6351
|
return openBlock(), createBlock(_sfc_main$E, {
|
|
6348
6352
|
hoverdData: ze.value,
|
|
6349
|
-
type: (Xe =
|
|
6353
|
+
type: (Xe = Ae.value) == null ? void 0 : Xe.type
|
|
6350
6354
|
}, {
|
|
6351
6355
|
header: withCtx(() => {
|
|
6352
|
-
var
|
|
6356
|
+
var Je;
|
|
6353
6357
|
return [
|
|
6354
6358
|
createVNode(_sfc_main$A, {
|
|
6355
6359
|
onClick: Ue[0] || (Ue[0] = (Ze) => qe.$emit("changeComponent", "project", null))
|
|
6356
6360
|
}),
|
|
6357
|
-
createElementVNode("div", _hoisted_1$g, toDisplayString((
|
|
6361
|
+
createElementVNode("div", _hoisted_1$g, toDisplayString((Je = Be.block) == null ? void 0 : Je.title), 1)
|
|
6358
6362
|
];
|
|
6359
6363
|
}),
|
|
6360
6364
|
default: withCtx(() => {
|
|
6361
|
-
var
|
|
6365
|
+
var Je, Ze, Qe;
|
|
6362
6366
|
return [
|
|
6363
6367
|
createElementVNode("div", _hoisted_2$8, [
|
|
6364
6368
|
createElementVNode("img", {
|
|
6365
|
-
src: ((Qe = (Ze = (
|
|
6369
|
+
src: ((Qe = (Ze = (Je = Be.block) == null ? void 0 : Je.block_image) == null ? void 0 : Ze[0]) == null ? void 0 : Qe.url) || "",
|
|
6366
6370
|
alt: "",
|
|
6367
6371
|
class: "ire-left-0 ire-top-0 ire-h-full ire-w-full"
|
|
6368
6372
|
}, null, 8, _hoisted_3$8),
|
|
6369
6373
|
(openBlock(), createElementBlock("div", {
|
|
6370
6374
|
ref_key: "svgRef",
|
|
6371
|
-
ref:
|
|
6375
|
+
ref: Re,
|
|
6372
6376
|
innerHTML: je.value,
|
|
6373
6377
|
key: je.value,
|
|
6374
6378
|
class: "canvas path-color ire-absolute ire-left-0 ire-top-0 ire-h-full ire-w-full",
|
|
6375
|
-
onClick:
|
|
6379
|
+
onClick: We
|
|
6376
6380
|
}, null, 8, _hoisted_4$6))
|
|
6377
6381
|
])
|
|
6378
6382
|
];
|
|
@@ -6385,20 +6389,20 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$9
|
|
|
6385
6389
|
__name: "MouseTracker",
|
|
6386
6390
|
setup(Be) {
|
|
6387
6391
|
const _e = useGlobalStore(), ke = ref(!0), $e = ref(-400), Ne = ref(-400), Ve = ref(null);
|
|
6388
|
-
let De = null, Le = 0,
|
|
6389
|
-
const Ie = (je, Fe,
|
|
6392
|
+
let De = null, Le = 0, Re = 0;
|
|
6393
|
+
const Ie = (je, Fe, We) => je * (1 - We) + Fe * We, Ae = () => {
|
|
6390
6394
|
if (De) return;
|
|
6391
6395
|
const je = () => {
|
|
6392
|
-
$e.value = Ie($e.value, Le, 0.06), Ne.value = Ie(Ne.value,
|
|
6396
|
+
$e.value = Ie($e.value, Le, 0.06), Ne.value = Ie(Ne.value, Re, 0.06), Math.abs($e.value - Le) > 0.06 || Math.abs(Ne.value - Re) > 0.06 ? De = requestAnimationFrame(je) : De = null;
|
|
6393
6397
|
};
|
|
6394
6398
|
De = requestAnimationFrame(je);
|
|
6395
6399
|
}, ze = (je) => {
|
|
6396
|
-
var
|
|
6397
|
-
const Fe = document.querySelector(".irep-tooltip"),
|
|
6398
|
-
if (!Ve.value || !Fe || !
|
|
6400
|
+
var oi;
|
|
6401
|
+
const Fe = document.querySelector(".irep-tooltip"), We = ((oi = _e.hoverdSvg) == null ? void 0 : oi.nodeName) === "path" ? _e.hoverdSvg : null;
|
|
6402
|
+
if (!Ve.value || !Fe || !We)
|
|
6399
6403
|
return;
|
|
6400
|
-
const
|
|
6401
|
-
Le = je.clientX -
|
|
6404
|
+
const He = Ve.value.getBoundingClientRect(), qe = We.getBoundingClientRect(), Ue = Fe.getBoundingClientRect(), Xe = He.left + He.width / 2, Je = He.top + He.height / 2, Ze = qe.left > Xe, Qe = qe.bottom > Je;
|
|
6405
|
+
Le = je.clientX - He.left - (Ze ? Ue.width : -20), Re = je.clientY - He.top - (Qe ? Ue.height : -20), ke.value && ($e.value = Le, Ne.value = Re), Ae(), ke.value = !1;
|
|
6402
6406
|
};
|
|
6403
6407
|
return onMounted(() => {
|
|
6404
6408
|
document.addEventListener("mousemove", ze);
|
|
@@ -6426,19 +6430,19 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$9
|
|
|
6426
6430
|
return (Be = shortcodeData.value.floors) == null || Be.forEach((ke) => {
|
|
6427
6431
|
var Ve, De;
|
|
6428
6432
|
const $e = (De = (Ve = shortcodeData.value) == null ? void 0 : Ve.flats) == null ? void 0 : De.filter((Le) => {
|
|
6429
|
-
var
|
|
6430
|
-
return (Le == null ? void 0 : Le.floor_id) !== ((
|
|
6431
|
-
(
|
|
6433
|
+
var Re;
|
|
6434
|
+
return (Le == null ? void 0 : Le.floor_id) !== ((Re = ke == null ? void 0 : ke.id) == null ? void 0 : Re.toString()) ? !1 : ke != null && ke.polygon_data ? Object == null ? void 0 : Object.values(ke == null ? void 0 : ke.polygon_data).some(
|
|
6435
|
+
(Ae) => {
|
|
6432
6436
|
var ze;
|
|
6433
|
-
return
|
|
6437
|
+
return Ae != null && Ae.type && (Ae == null ? void 0 : Ae.type) === "flat" && (Ae == null ? void 0 : Ae.id) === (Le == null ? void 0 : Le.id) ? ke != null && ke.block_id ? (Le == null ? void 0 : Le.block_id) === ((ze = ke == null ? void 0 : ke.block_id) == null ? void 0 : ze.toString()) : !(Le != null && Le.block_id) : !1;
|
|
6434
6438
|
}
|
|
6435
6439
|
) : !1;
|
|
6436
6440
|
});
|
|
6437
6441
|
ke.flats = $e;
|
|
6438
6442
|
const { conf: Ne } = ke || {};
|
|
6439
6443
|
if ($e != null && $e.length && !Ne) {
|
|
6440
|
-
const Le = $e == null ? void 0 : $e.every((Ie) => (Ie == null ? void 0 : Ie.conf) === "reserved"),
|
|
6441
|
-
Le ? ke.conf = "reserved" :
|
|
6444
|
+
const Le = $e == null ? void 0 : $e.every((Ie) => (Ie == null ? void 0 : Ie.conf) === "reserved"), Re = $e == null ? void 0 : $e.every((Ie) => (Ie == null ? void 0 : Ie.conf) === "sold");
|
|
6445
|
+
Le ? ke.conf = "reserved" : Re && (ke.conf = "sold");
|
|
6442
6446
|
}
|
|
6443
6447
|
}), (_e = shortcodeData.value) == null ? void 0 : _e.floors;
|
|
6444
6448
|
}), blocks = computed$1(() => {
|
|
@@ -6511,11 +6515,11 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$9
|
|
|
6511
6515
|
break;
|
|
6512
6516
|
}
|
|
6513
6517
|
}, actionFromQuery = () => {
|
|
6514
|
-
var De, Le,
|
|
6518
|
+
var De, Le, Re, Ie;
|
|
6515
6519
|
if (!isGoldAndSharable.value) return;
|
|
6516
6520
|
const Be = getQuery("floorId"), _e = getQuery("flatId"), ke = getQuery("projectId"), $e = document.querySelector(
|
|
6517
6521
|
`[data-project-id="${ke}"]`
|
|
6518
|
-
), Ne = (Le = (De = shortcodeData.value) == null ? void 0 : De.floors) == null ? void 0 : Le.find((
|
|
6522
|
+
), Ne = (Le = (De = shortcodeData.value) == null ? void 0 : De.floors) == null ? void 0 : Le.find((Ae) => Ae.id === Be), Ve = (Ie = (Re = shortcodeData.value) == null ? void 0 : Re.flats) == null ? void 0 : Ie.find((Ae) => Ae.id === _e);
|
|
6519
6523
|
Ve && (Ne && changeRoute("floor", Ne), setTimeout(() => {
|
|
6520
6524
|
$e && $e.scrollIntoView(), changeRoute("flat", Ve);
|
|
6521
6525
|
}, 400));
|
|
@@ -6672,9 +6676,9 @@ const Placeholder = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_re
|
|
|
6672
6676
|
/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/
|
|
6673
6677
|
);
|
|
6674
6678
|
if (Ne) {
|
|
6675
|
-
const [, Ve, De, Le,
|
|
6679
|
+
const [, Ve, De, Le, Re = "1"] = Ne, Ie = parseFloat(Re), Ae = `rgba(${Ve}, ${De}, ${Le}, ${Math.min(Ie * 0.15, 0.15)})`, ze = `rgba(${Ve}, ${De}, ${Le}, 1)`, je = `rgba(${Ve}, ${De}, ${Le}, ${Math.min(Ie * 0.3, 0.3)})`;
|
|
6676
6680
|
return {
|
|
6677
|
-
backgroundColor:
|
|
6681
|
+
backgroundColor: Ae,
|
|
6678
6682
|
color: ze,
|
|
6679
6683
|
boxShadow: `inset 0 0 0 1px ${je}`
|
|
6680
6684
|
};
|
|
@@ -6700,24 +6704,24 @@ const Placeholder = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_re
|
|
|
6700
6704
|
emits: ["openFlat"],
|
|
6701
6705
|
setup(Be, { emit: _e }) {
|
|
6702
6706
|
const ke = _e, $e = Be, Ne = useGlobalStore(), Ve = computed$1(() => {
|
|
6703
|
-
var
|
|
6707
|
+
var Re, Ie;
|
|
6704
6708
|
return [
|
|
6705
|
-
...((
|
|
6709
|
+
...((Re = $e.flat.type) == null ? void 0 : Re.image_3d) || [],
|
|
6706
6710
|
...((Ie = $e.flat.type) == null ? void 0 : Ie.image_2d) || []
|
|
6707
|
-
].map((
|
|
6711
|
+
].map((Ae) => Ae.url);
|
|
6708
6712
|
}), De = computed$1(() => {
|
|
6709
6713
|
if (!$e.flat.conf) return null;
|
|
6710
|
-
const
|
|
6714
|
+
const Re = Ne.getMetaValue("custom_types"), Ae = (Array.isArray(Re) ? Re : typeof Re == "string" ? (() => {
|
|
6711
6715
|
try {
|
|
6712
|
-
return JSON.parse(
|
|
6716
|
+
return JSON.parse(Re) ?? [];
|
|
6713
6717
|
} catch {
|
|
6714
6718
|
return [];
|
|
6715
6719
|
}
|
|
6716
6720
|
})() : []).find((ze) => ze.title === $e.flat.conf);
|
|
6717
|
-
return (
|
|
6721
|
+
return (Ae == null ? void 0 : Ae.type_color) || null;
|
|
6718
6722
|
}), Le = computed$1(() => De.value ? null : $e.flat.conf === "reserved" ? "warning" : $e.flat.conf === "sold" ? "danger" : null);
|
|
6719
|
-
return (
|
|
6720
|
-
var
|
|
6723
|
+
return (Re, Ie) => {
|
|
6724
|
+
var Ae, ze, je;
|
|
6721
6725
|
return openBlock(), createElementBlock("div", {
|
|
6722
6726
|
class: "irep-flat-card ire-border-l-solid ire-group ire-cursor-pointer ire-rounded-sm ire-border-b ire-border-gray-200 ire-p-2 ire-pb-8 ire-text-black ire-transition-all ire-duration-300 md:ire-border-b-0 md:ire-border-l md:ire-p-8",
|
|
6723
6727
|
onClick: Ie[0] || (Ie[0] = (Fe) => ke("openFlat", Be.flat.id))
|
|
@@ -6745,7 +6749,7 @@ const Placeholder = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_re
|
|
|
6745
6749
|
Be.flat.request_price ? (openBlock(), createElementBlock("div", _hoisted_7$3, toDisplayString(unref(tr)("Request Price")), 1)) : Be.flat.offer_price ? (openBlock(), createElementBlock("div", _hoisted_8, [
|
|
6746
6750
|
createElementVNode("div", _hoisted_9, toDisplayString(unref(getPrice)(+Be.flat.price_n)) + " " + toDisplayString(unref(currencySymbol)()), 1),
|
|
6747
6751
|
createElementVNode("div", _hoisted_10, toDisplayString(unref(getPrice)(+Be.flat.offer_price)) + " " + toDisplayString(unref(currencySymbol)()), 1)
|
|
6748
|
-
])) : Number((
|
|
6752
|
+
])) : Number((Ae = Be.flat) == null ? void 0 : Ae.price_n) > 0 ? (openBlock(), createElementBlock("div", _hoisted_11, toDisplayString(unref(getPrice)(+Be.flat.price_n)) + " " + toDisplayString(unref(currencySymbol)()), 1)) : createCommentVNode("", !0),
|
|
6749
6753
|
(ze = Be.flat.type) != null && ze.area_m2 ? (openBlock(), createElementBlock("div", _hoisted_12, [
|
|
6750
6754
|
createElementVNode("span", _hoisted_13, [
|
|
6751
6755
|
createTextVNode(toDisplayString(unref(getArea)(+((je = Be.flat.type) == null ? void 0 : je.area_m2_n))) + " " + toDisplayString(unref(getAreaUnitLabel)()) + " ", 1),
|
|
@@ -6918,32 +6922,32 @@ var script$1 = defineComponent({
|
|
|
6918
6922
|
emits: ["update:modelValue"],
|
|
6919
6923
|
setup(Be, { emit: _e }) {
|
|
6920
6924
|
const ke = computed$1(() => {
|
|
6921
|
-
const
|
|
6925
|
+
const Ae = [], ze = 5 + Be.rangeSize * 2;
|
|
6922
6926
|
let je = Be.pages <= ze ? 1 : Be.modelValue - Be.rangeSize, Fe = Be.pages <= ze ? Be.pages : Be.modelValue + Be.rangeSize;
|
|
6923
6927
|
if (Fe = Fe > Be.pages ? Be.pages : Fe, je = je < 1 ? 1 : je, Be.pages > ze) {
|
|
6924
|
-
const
|
|
6925
|
-
if (
|
|
6928
|
+
const We = je - 1 < 3, He = Be.pages - Fe < 3;
|
|
6929
|
+
if (We) {
|
|
6926
6930
|
Fe = ze - 2;
|
|
6927
6931
|
for (let qe = 1; qe < je; qe++)
|
|
6928
|
-
|
|
6932
|
+
Ae.push(qe);
|
|
6929
6933
|
} else
|
|
6930
|
-
|
|
6931
|
-
if (
|
|
6934
|
+
Ae.push(1), Ae.push(null);
|
|
6935
|
+
if (He) {
|
|
6932
6936
|
je = Be.pages - (ze - 3);
|
|
6933
6937
|
for (let qe = je; qe <= Be.pages; qe++)
|
|
6934
|
-
|
|
6938
|
+
Ae.push(qe);
|
|
6935
6939
|
} else {
|
|
6936
6940
|
for (let qe = je; qe <= Fe; qe++)
|
|
6937
|
-
|
|
6938
|
-
|
|
6941
|
+
Ae.push(qe);
|
|
6942
|
+
Ae.push(null), Ae.push(Be.pages);
|
|
6939
6943
|
}
|
|
6940
6944
|
} else
|
|
6941
|
-
for (let
|
|
6942
|
-
|
|
6943
|
-
return
|
|
6945
|
+
for (let We = je; We <= Fe; We++)
|
|
6946
|
+
Ae.push(We);
|
|
6947
|
+
return Ae;
|
|
6944
6948
|
});
|
|
6945
|
-
function $e(
|
|
6946
|
-
_e("update:modelValue",
|
|
6949
|
+
function $e(Ae) {
|
|
6950
|
+
_e("update:modelValue", Ae);
|
|
6947
6951
|
}
|
|
6948
6952
|
const Ne = computed$1(() => Be.modelValue > 1), Ve = computed$1(() => Be.modelValue < Be.pages);
|
|
6949
6953
|
function De() {
|
|
@@ -6952,7 +6956,7 @@ var script$1 = defineComponent({
|
|
|
6952
6956
|
function Le() {
|
|
6953
6957
|
Ne.value && _e("update:modelValue", Be.modelValue - 1);
|
|
6954
6958
|
}
|
|
6955
|
-
function
|
|
6959
|
+
function Re() {
|
|
6956
6960
|
Ve.value && _e("update:modelValue", Be.pages);
|
|
6957
6961
|
}
|
|
6958
6962
|
function Ie() {
|
|
@@ -6964,7 +6968,7 @@ var script$1 = defineComponent({
|
|
|
6964
6968
|
isPrevControlsActive: Ne,
|
|
6965
6969
|
isNextControlsActive: Ve,
|
|
6966
6970
|
goToFirst: De,
|
|
6967
|
-
goToLast:
|
|
6971
|
+
goToLast: Re,
|
|
6968
6972
|
goToPrev: Le,
|
|
6969
6973
|
goToNext: Ie
|
|
6970
6974
|
};
|
|
@@ -6981,7 +6985,7 @@ const _hoisted_1$6$1 = { class: "Pagination" }, _hoisted_2$5$1 = {
|
|
|
6981
6985
|
};
|
|
6982
6986
|
popScopeId();
|
|
6983
6987
|
const render$6 = /* @__PURE__ */ _withId$1((Be, _e, ke, $e, Ne, Ve) => {
|
|
6984
|
-
const De = resolveComponent("icon-page-first"), Le = resolveComponent("icon-chevron-left"),
|
|
6988
|
+
const De = resolveComponent("icon-page-first"), Le = resolveComponent("icon-chevron-left"), Re = resolveComponent("v-page"), Ie = resolveComponent("icon-chevron-right"), Ae = resolveComponent("icon-page-last");
|
|
6985
6989
|
return openBlock(), createBlock("ul", _hoisted_1$6$1, [
|
|
6986
6990
|
Be.hideFirstButton ? createCommentVNode("v-if", !0) : (openBlock(), createBlock("li", _hoisted_2$5$1, [
|
|
6987
6991
|
createVNode(De, {
|
|
@@ -6998,7 +7002,7 @@ const render$6 = /* @__PURE__ */ _withId$1((Be, _e, ke, $e, Ne, Ve) => {
|
|
|
6998
7002
|
(openBlock(!0), createBlock(
|
|
6999
7003
|
Fragment,
|
|
7000
7004
|
null,
|
|
7001
|
-
renderList(Be.pagination, (ze) => (openBlock(), createBlock(
|
|
7005
|
+
renderList(Be.pagination, (ze) => (openBlock(), createBlock(Re, {
|
|
7002
7006
|
key: `pagination-page-${ze}`,
|
|
7003
7007
|
page: ze,
|
|
7004
7008
|
current: Be.modelValue,
|
|
@@ -7015,7 +7019,7 @@ const render$6 = /* @__PURE__ */ _withId$1((Be, _e, ke, $e, Ne, Ve) => {
|
|
|
7015
7019
|
}, null, 8, ["class", "onClick"])
|
|
7016
7020
|
]),
|
|
7017
7021
|
Be.hideLastButton ? createCommentVNode("v-if", !0) : (openBlock(), createBlock("li", _hoisted_5$4, [
|
|
7018
|
-
createVNode(
|
|
7022
|
+
createVNode(Ae, {
|
|
7019
7023
|
class: ["Control", { "Control-active": Be.isNextControlsActive }],
|
|
7020
7024
|
onClick: Be.goToLast
|
|
7021
7025
|
}, null, 8, ["class", "onClick"])
|
|
@@ -7125,26 +7129,26 @@ const SortingArrowAsc = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sf
|
|
|
7125
7129
|
setup(Be, { emit: _e }) {
|
|
7126
7130
|
const ke = _e, $e = useSlots(), Ne = inject("sortField", ref("")), Ve = inject("sortOrder", ref("asc")), De = computed$1(() => {
|
|
7127
7131
|
if (!$e.default) return;
|
|
7128
|
-
const
|
|
7129
|
-
return
|
|
7132
|
+
const Ae = Array.from($e != null && $e.default ? $e.default({}) : []), ze = [];
|
|
7133
|
+
return Ae.forEach((je) => {
|
|
7130
7134
|
var Fe;
|
|
7131
7135
|
((Fe = je == null ? void 0 : je.type) == null ? void 0 : Fe.toString()) === "Symbol(v-fgt)" && (je != null && je.children) ? ze.push(...je.children) : ze.push(je);
|
|
7132
7136
|
}), ze;
|
|
7133
7137
|
}), Le = computed$1(() => De.value.map((ze) => {
|
|
7134
|
-
var Fe,
|
|
7138
|
+
var Fe, We;
|
|
7135
7139
|
const je = (Fe = ze.children) == null ? void 0 : Fe.body;
|
|
7136
|
-
return typeof je == "function" ? je : (
|
|
7137
|
-
})),
|
|
7140
|
+
return typeof je == "function" ? je : (We = ze.props) == null ? void 0 : We.field;
|
|
7141
|
+
})), Re = computed$1(() => De.value.map((ze) => ({
|
|
7138
7142
|
...ze.props
|
|
7139
7143
|
// sortable: typeof vnode.props.sortable !== "undefined",
|
|
7140
|
-
}))), Ie = (
|
|
7141
|
-
|
|
7144
|
+
}))), Ie = (Ae) => {
|
|
7145
|
+
Ae.sortable && (Ne.value !== (Ae.field || Ae.sortableField) && (Ve.value = ""), Ve.value = Ve.value === "asc" ? "desc" : Ve.value === "desc" ? "" : "asc", Ve.value ? Ne.value = Ae.field ?? Ae.sortableField : Ne.value = "", ke("sortColumn", Ne.value, Ve.value));
|
|
7142
7146
|
};
|
|
7143
|
-
return (
|
|
7147
|
+
return (Ae, ze) => (openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
7144
7148
|
createElementVNode("table", _hoisted_2$4, [
|
|
7145
7149
|
createElementVNode("thead", _hoisted_3$4, [
|
|
7146
7150
|
createElementVNode("tr", _hoisted_4$3, [
|
|
7147
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
7151
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(Re.value, (je) => (openBlock(), createElementBlock("th", {
|
|
7148
7152
|
key: je,
|
|
7149
7153
|
class: normalizeClass(["ire-p-3 ire-text-left ire-capitalize ire-transition-all", {
|
|
7150
7154
|
"irep-flats-list__table-heading--sortable ire-cursor-pointer": je == null ? void 0 : je.sortable,
|
|
@@ -7254,19 +7258,19 @@ const MagnifyIcon = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_re
|
|
|
7254
7258
|
return (De = Ne.value) == null ? void 0 : De.configs.tableContactUrl;
|
|
7255
7259
|
});
|
|
7256
7260
|
return (De, Le) => {
|
|
7257
|
-
var
|
|
7261
|
+
var Re, Ie, Ae, ze, je, Fe;
|
|
7258
7262
|
return openBlock(), createElementBlock("div", null, [
|
|
7259
7263
|
createElementVNode("div", _hoisted_1$4, [
|
|
7260
7264
|
createVNode(MagnifyIcon, {
|
|
7261
7265
|
class: "ire-cursor-pointer",
|
|
7262
|
-
onClick: Le[0] || (Le[0] = (
|
|
7263
|
-
var
|
|
7264
|
-
return ke("openFlat", (
|
|
7266
|
+
onClick: Le[0] || (Le[0] = (We) => {
|
|
7267
|
+
var He;
|
|
7268
|
+
return ke("openFlat", (He = Be.flat) == null ? void 0 : He.id);
|
|
7265
7269
|
})
|
|
7266
7270
|
}),
|
|
7267
7271
|
Ve.value ? (openBlock(), createElementBlock("a", {
|
|
7268
7272
|
key: 0,
|
|
7269
|
-
href: `${Ve.value}${unref(getNested)(Be.flat, ((Ie = (
|
|
7273
|
+
href: `${Ve.value}${unref(getNested)(Be.flat, ((Ie = (Re = unref(Ne)) == null ? void 0 : Re.configs) == null ? void 0 : Ie.flatFieldQueryParameter) || "") || ((Ae = Be.flat) == null ? void 0 : Ae.id)}`,
|
|
7270
7274
|
target: "_blank",
|
|
7271
7275
|
class: "ire-flex ire-justify-center ire-text-center"
|
|
7272
7276
|
}, [
|
|
@@ -7293,20 +7297,20 @@ const MagnifyIcon = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_re
|
|
|
7293
7297
|
setup(Be, { emit: _e }) {
|
|
7294
7298
|
const ke = _e, $e = useGlobalStore(), { shortcodeData: Ne } = storeToRefs($e), Ve = computed$1(
|
|
7295
7299
|
() => {
|
|
7296
|
-
var Ie,
|
|
7297
|
-
return ((
|
|
7300
|
+
var Ie, Ae;
|
|
7301
|
+
return ((Ae = (Ie = Ne.value) == null ? void 0 : Ie.configs) == null ? void 0 : Ae.tableFields) || [];
|
|
7298
7302
|
}
|
|
7299
7303
|
), De = computed$1(
|
|
7300
7304
|
() => {
|
|
7301
|
-
var Ie,
|
|
7302
|
-
return ((
|
|
7305
|
+
var Ie, Ae;
|
|
7306
|
+
return ((Ae = (Ie = Ne.value) == null ? void 0 : Ie.configs) == null ? void 0 : Ae.hasTableOneColumn) ?? !1;
|
|
7303
7307
|
}
|
|
7304
|
-
), Le = (Ie,
|
|
7305
|
-
ke("sortColumn", Ie,
|
|
7306
|
-
},
|
|
7308
|
+
), Le = (Ie, Ae) => {
|
|
7309
|
+
ke("sortColumn", Ie, Ae);
|
|
7310
|
+
}, Re = (Ie) => {
|
|
7307
7311
|
ke("openFlat", Ie);
|
|
7308
7312
|
};
|
|
7309
|
-
return (Ie,
|
|
7313
|
+
return (Ie, Ae) => (openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
7310
7314
|
De.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
7311
7315
|
createElementVNode("div", _hoisted_2$2, [
|
|
7312
7316
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(Be.flats, (ze) => (openBlock(), createElementBlock("div", {
|
|
@@ -7323,7 +7327,7 @@ const MagnifyIcon = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_re
|
|
|
7323
7327
|
]),
|
|
7324
7328
|
createVNode(_sfc_main$4, {
|
|
7325
7329
|
flat: ze,
|
|
7326
|
-
onOpenFlat:
|
|
7330
|
+
onOpenFlat: Re
|
|
7327
7331
|
}, null, 8, ["flat"])
|
|
7328
7332
|
]))), 128))
|
|
7329
7333
|
]),
|
|
@@ -7361,7 +7365,7 @@ const MagnifyIcon = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_re
|
|
|
7361
7365
|
body: withCtx((ze) => [
|
|
7362
7366
|
createVNode(_sfc_main$4, {
|
|
7363
7367
|
flat: ze.data,
|
|
7364
|
-
onOpenFlat:
|
|
7368
|
+
onOpenFlat: Re
|
|
7365
7369
|
}, null, 8, ["flat"])
|
|
7366
7370
|
]),
|
|
7367
7371
|
_: 1
|
|
@@ -7396,7 +7400,7 @@ const MagnifyIcon = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_re
|
|
|
7396
7400
|
body: withCtx((ze) => [
|
|
7397
7401
|
createVNode(_sfc_main$4, {
|
|
7398
7402
|
flat: ze.data,
|
|
7399
|
-
onOpenFlat:
|
|
7403
|
+
onOpenFlat: Re
|
|
7400
7404
|
}, null, 8, ["flat"])
|
|
7401
7405
|
]),
|
|
7402
7406
|
_: 1
|
|
@@ -7414,7 +7418,11 @@ const MagnifyIcon = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_re
|
|
|
7414
7418
|
},
|
|
7415
7419
|
emits: ["update:filtersObject"],
|
|
7416
7420
|
setup(Be) {
|
|
7417
|
-
const _e = useGlobalStore(), { shortcodeData: ke } = storeToRefs(_e),
|
|
7421
|
+
const _e = useGlobalStore(), { shortcodeData: ke } = storeToRefs(_e), {
|
|
7422
|
+
price_filter_options: $e,
|
|
7423
|
+
area_filter_options: Ne,
|
|
7424
|
+
rooms_filter_options: Ve
|
|
7425
|
+
} = _e.getMetaValue("filter_options"), De = [
|
|
7418
7426
|
{ title: tr("any price"), value: "0-Infinity" },
|
|
7419
7427
|
{
|
|
7420
7428
|
title: `${currencySymbol()} 0 - ${currencySymbol()} ${getPrice(5e4)}`,
|
|
@@ -7436,7 +7444,7 @@ const MagnifyIcon = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_re
|
|
|
7436
7444
|
title: `${currencySymbol()} ${getPrice(5e5)}+`,
|
|
7437
7445
|
value: "500000-Infinity"
|
|
7438
7446
|
}
|
|
7439
|
-
],
|
|
7447
|
+
], Le = Array.isArray($e) && $e.length ? $e : De, Re = [
|
|
7440
7448
|
{ title: tr("any area"), value: "0-Infinity" },
|
|
7441
7449
|
{
|
|
7442
7450
|
title: `0 ${getAreaUnitLabel()}² - 40 ${getAreaUnitLabel()}²`,
|
|
@@ -7455,44 +7463,44 @@ const MagnifyIcon = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_re
|
|
|
7455
7463
|
value: "90-120"
|
|
7456
7464
|
},
|
|
7457
7465
|
{ title: `120 ${getAreaUnitLabel()}² +`, value: "120-Infinity" }
|
|
7458
|
-
],
|
|
7466
|
+
], Ie = Array.isArray(Ne) && Ne.length ? Ne : Re, Ae = [
|
|
7459
7467
|
{ title: tr("any room"), value: "0-Infinity" },
|
|
7460
7468
|
{ title: `1 ${tr("room")}`, value: "1-1" },
|
|
7461
7469
|
{ title: `2 ${tr("rooms")}`, value: "2-2" },
|
|
7462
7470
|
{ title: `3 ${tr("rooms")}`, value: "3-3" },
|
|
7463
7471
|
{ title: `4+ ${tr("rooms")}`, value: "4-Infinity" }
|
|
7464
|
-
],
|
|
7472
|
+
], ze = Array.isArray(Ve) && Ve.length ? Ve : Ae, je = _e.getMetaValue("custom_types"), Fe = Array.isArray(je) ? je.map((Xe) => ({ title: tr(Xe.title), value: Xe.value })) : [], We = [
|
|
7465
7473
|
{ title: tr("all"), value: "all" },
|
|
7466
7474
|
{ title: tr("available"), value: "available" },
|
|
7467
7475
|
{ title: tr("reserved"), value: "reserved" },
|
|
7468
7476
|
{ title: tr("sold"), value: "sold" },
|
|
7469
|
-
...
|
|
7470
|
-
],
|
|
7471
|
-
var
|
|
7472
|
-
const
|
|
7473
|
-
var
|
|
7474
|
-
const
|
|
7475
|
-
(
|
|
7477
|
+
...Fe
|
|
7478
|
+
], He = useModel(Be, "filtersObject"), qe = computed$1(() => {
|
|
7479
|
+
var oi;
|
|
7480
|
+
const Je = (((oi = ke.value) == null ? void 0 : oi.flats.map((ii) => ii.floor_id).filter((ii) => ii)) || []).map((ii) => {
|
|
7481
|
+
var Ye, Ge;
|
|
7482
|
+
const Ke = (Ge = (Ye = ke.value) == null ? void 0 : Ye.floors) == null ? void 0 : Ge.find(
|
|
7483
|
+
(ei) => ei.id === ii
|
|
7476
7484
|
);
|
|
7477
7485
|
return {
|
|
7478
|
-
floorId:
|
|
7479
|
-
floorNumber: Number(
|
|
7486
|
+
floorId: Ke == null ? void 0 : Ke.id,
|
|
7487
|
+
floorNumber: Number(Ke == null ? void 0 : Ke.floor_number)
|
|
7480
7488
|
};
|
|
7481
|
-
}),
|
|
7482
|
-
...new Map(
|
|
7483
|
-
].sort((
|
|
7484
|
-
title:
|
|
7485
|
-
value:
|
|
7489
|
+
}), Qe = [
|
|
7490
|
+
...new Map(Je.map((ii) => [ii.floorNumber, ii])).values()
|
|
7491
|
+
].sort((ii, Ke) => ii.floorNumber - Ke.floorNumber).map((ii) => ({
|
|
7492
|
+
title: ii.floorNumber.toString(),
|
|
7493
|
+
value: ii.floorId || ""
|
|
7486
7494
|
}));
|
|
7487
7495
|
return [
|
|
7488
7496
|
{
|
|
7489
7497
|
title: tr("any floor"),
|
|
7490
7498
|
value: ""
|
|
7491
7499
|
},
|
|
7492
|
-
...
|
|
7500
|
+
...Qe
|
|
7493
7501
|
];
|
|
7494
|
-
}),
|
|
7495
|
-
|
|
7502
|
+
}), Ue = () => {
|
|
7503
|
+
He.value = {
|
|
7496
7504
|
priceRange: "0-Infinity",
|
|
7497
7505
|
areaRange: "0-Infinity",
|
|
7498
7506
|
floor: "",
|
|
@@ -7500,15 +7508,15 @@ const MagnifyIcon = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_re
|
|
|
7500
7508
|
config: "all"
|
|
7501
7509
|
};
|
|
7502
7510
|
};
|
|
7503
|
-
return (
|
|
7504
|
-
var
|
|
7511
|
+
return (Xe, Je) => {
|
|
7512
|
+
var Ze;
|
|
7505
7513
|
return openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
7506
7514
|
createElementVNode("div", null, [
|
|
7507
7515
|
createElementVNode("div", _hoisted_2$1, toDisplayString(unref(tr)("price")), 1),
|
|
7508
7516
|
createVNode(_sfc_main$C, {
|
|
7509
|
-
modelValue:
|
|
7510
|
-
"onUpdate:modelValue":
|
|
7511
|
-
data: unref(
|
|
7517
|
+
modelValue: He.value.priceRange,
|
|
7518
|
+
"onUpdate:modelValue": Je[0] || (Je[0] = (Qe) => He.value.priceRange = Qe),
|
|
7519
|
+
data: unref(Le),
|
|
7512
7520
|
disabled: !1,
|
|
7513
7521
|
class: "irep-flats-list-filters-select ire-max-w-full"
|
|
7514
7522
|
}, null, 8, ["modelValue", "data"])
|
|
@@ -7516,9 +7524,9 @@ const MagnifyIcon = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_re
|
|
|
7516
7524
|
createElementVNode("div", null, [
|
|
7517
7525
|
createElementVNode("div", _hoisted_3$1, toDisplayString(unref(tr)("area")), 1),
|
|
7518
7526
|
createVNode(_sfc_main$C, {
|
|
7519
|
-
modelValue:
|
|
7520
|
-
"onUpdate:modelValue":
|
|
7521
|
-
data: unref(
|
|
7527
|
+
modelValue: He.value.areaRange,
|
|
7528
|
+
"onUpdate:modelValue": Je[1] || (Je[1] = (Qe) => He.value.areaRange = Qe),
|
|
7529
|
+
data: unref(Ie),
|
|
7522
7530
|
disabled: !1,
|
|
7523
7531
|
class: "irep-flats-list-filters-select ire-max-w-full"
|
|
7524
7532
|
}, null, 8, ["modelValue", "data"])
|
|
@@ -7526,29 +7534,29 @@ const MagnifyIcon = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_re
|
|
|
7526
7534
|
createElementVNode("div", null, [
|
|
7527
7535
|
createElementVNode("div", _hoisted_4$1, toDisplayString(unref(tr)("floor number")), 1),
|
|
7528
7536
|
createVNode(_sfc_main$C, {
|
|
7529
|
-
modelValue:
|
|
7530
|
-
"onUpdate:modelValue":
|
|
7531
|
-
data:
|
|
7532
|
-
disabled: !((
|
|
7537
|
+
modelValue: He.value.floor,
|
|
7538
|
+
"onUpdate:modelValue": Je[2] || (Je[2] = (Qe) => He.value.floor = Qe),
|
|
7539
|
+
data: qe.value,
|
|
7540
|
+
disabled: !((Ze = qe.value) != null && Ze.length),
|
|
7533
7541
|
class: "irep-flats-list-filters-select ire-max-w-full"
|
|
7534
7542
|
}, null, 8, ["modelValue", "data", "disabled"])
|
|
7535
7543
|
]),
|
|
7536
7544
|
createElementVNode("div", null, [
|
|
7537
7545
|
createElementVNode("div", _hoisted_5$1, toDisplayString(unref(tr)("rooms count")), 1),
|
|
7538
7546
|
createVNode(_sfc_main$C, {
|
|
7539
|
-
modelValue:
|
|
7540
|
-
"onUpdate:modelValue":
|
|
7541
|
-
data:
|
|
7547
|
+
modelValue: He.value.roomRange,
|
|
7548
|
+
"onUpdate:modelValue": Je[3] || (Je[3] = (Qe) => He.value.roomRange = Qe),
|
|
7549
|
+
data: unref(ze),
|
|
7542
7550
|
disabled: !1,
|
|
7543
7551
|
class: "irep-flats-list-filters-select ire-max-w-full"
|
|
7544
|
-
}, null, 8, ["modelValue"])
|
|
7552
|
+
}, null, 8, ["modelValue", "data"])
|
|
7545
7553
|
]),
|
|
7546
7554
|
createElementVNode("div", null, [
|
|
7547
7555
|
createElementVNode("div", _hoisted_6$1, toDisplayString(unref(tr)("select config")), 1),
|
|
7548
7556
|
createVNode(_sfc_main$C, {
|
|
7549
|
-
modelValue:
|
|
7550
|
-
"onUpdate:modelValue":
|
|
7551
|
-
data:
|
|
7557
|
+
modelValue: He.value.config,
|
|
7558
|
+
"onUpdate:modelValue": Je[4] || (Je[4] = (Qe) => He.value.config = Qe),
|
|
7559
|
+
data: We,
|
|
7552
7560
|
disabled: !1,
|
|
7553
7561
|
class: "irep-flats-list-filters-select ire-max-w-full"
|
|
7554
7562
|
}, null, 8, ["modelValue"])
|
|
@@ -7558,7 +7566,7 @@ const MagnifyIcon = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_re
|
|
|
7558
7566
|
title: unref(tr)("reset"),
|
|
7559
7567
|
active: "",
|
|
7560
7568
|
class: "irep-flats-list-filters-submit-btn !ire-w-fit ire-capitalize",
|
|
7561
|
-
onClick:
|
|
7569
|
+
onClick: Ue
|
|
7562
7570
|
}, null, 8, ["title"])
|
|
7563
7571
|
])
|
|
7564
7572
|
]);
|
|
@@ -7633,9 +7641,9 @@ const GridIcon = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_rende
|
|
|
7633
7641
|
flats: De
|
|
7634
7642
|
} = storeToRefs(ke), { scrollToWithOffset: Le } = useScroll();
|
|
7635
7643
|
ke.setData(_e.data), ke.setIrePlaginWp(_e.irePlugin);
|
|
7636
|
-
const
|
|
7637
|
-
provide("sortField",
|
|
7638
|
-
const
|
|
7644
|
+
const Re = ref(""), Ie = ref("");
|
|
7645
|
+
provide("sortField", Re), provide("sortOrder", Ie);
|
|
7646
|
+
const Ae = ref(!1), ze = ref(6), je = ref(), Fe = ref(1), We = ref(!1), He = ref(), qe = ref({
|
|
7639
7647
|
priceRange: "0-Infinity",
|
|
7640
7648
|
areaRange: "0-Infinity",
|
|
7641
7649
|
floor: "",
|
|
@@ -7645,10 +7653,10 @@ const GridIcon = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_rende
|
|
|
7645
7653
|
if (Ne.value)
|
|
7646
7654
|
return Ne.value.types;
|
|
7647
7655
|
}), Xe = computed$1(() => Ne.value ? Ne.value.flats.map((Ge) => {
|
|
7648
|
-
var si, li,
|
|
7656
|
+
var si, li, di, ui, hi;
|
|
7649
7657
|
const ei = (li = (si = Ne.value) == null ? void 0 : si.floors) == null ? void 0 : li.find(
|
|
7650
7658
|
(ci) => ci.id === Ge.floor_id
|
|
7651
|
-
), ti = (
|
|
7659
|
+
), ti = (ui = (di = Ne.value) == null ? void 0 : di.blocks) == null ? void 0 : ui.find(
|
|
7652
7660
|
(ci) => ci.id === Ge.block_id
|
|
7653
7661
|
), ni = Ge.use_type || !Ge.type ? ((hi = Ue.value) == null ? void 0 : hi.find((ci) => ci.id === Ge.type_id)) ?? Ge.type : Ge.type, ri = $e("custom_types"), ai = ri == null ? void 0 : ri.find((ci) => ci.value === Ge.conf);
|
|
7654
7662
|
return {
|
|
@@ -7657,7 +7665,7 @@ const GridIcon = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_rende
|
|
|
7657
7665
|
...ni,
|
|
7658
7666
|
area_m2_n: Number(ni == null ? void 0 : ni.area_m2),
|
|
7659
7667
|
area_m2: `${getArea(Number(ni == null ? void 0 : ni.area_m2))} ${getAreaUnitLabel()}²`,
|
|
7660
|
-
rooms_count: getRoomCount(Number(
|
|
7668
|
+
rooms_count: getRoomCount(Number(ni == null ? void 0 : ni.rooms_count))
|
|
7661
7669
|
},
|
|
7662
7670
|
price_n: Number(Ge.price),
|
|
7663
7671
|
price: Ge.conf ? ai ? ai.title : tr(Ge.conf) : Ge.request_price ? tr("Request Price") : Number(Ge == null ? void 0 : Ge.price) ? `${getPrice(Number((Ge == null ? void 0 : Ge.offer_price) || (Ge == null ? void 0 : Ge.price)))} ${currencySymbol()}` : tr("available"),
|
|
@@ -7674,49 +7682,49 @@ const GridIcon = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_rende
|
|
|
7674
7682
|
);
|
|
7675
7683
|
return { ...Ge, type: { ...Ge.type, other: ei } };
|
|
7676
7684
|
}).sort((Ge, ei) => {
|
|
7677
|
-
const ti =
|
|
7685
|
+
const ti = Re.value;
|
|
7678
7686
|
let ni = Ge[ti], ri = ei[ti];
|
|
7679
7687
|
ti != null && ti.includes(".") && (ni = getNested(Ge, ti), ri = getNested(ei, ti)), ni == null && (ni = "0"), ri == null && (ri = "0");
|
|
7680
7688
|
const ai = ni.toString(), si = ri.toString();
|
|
7681
7689
|
return !isNaN(ai) && !isNaN(si) ? Ie.value === "desc" ? si - ai : ai - si : Ie.value === "desc" ? String(ri).localeCompare(String(ni)) : String(ni).localeCompare(String(ri));
|
|
7682
|
-
}) : []),
|
|
7690
|
+
}) : []), Je = computed$1(() => {
|
|
7683
7691
|
var Ye;
|
|
7684
7692
|
return Qe.value ? Math.ceil(((Ye = Ze.value) == null ? void 0 : Ye.length) / ze.value) : 0;
|
|
7685
7693
|
}), Ze = computed$1(() => {
|
|
7686
7694
|
var Ge;
|
|
7687
7695
|
return Xe.value ? (Ge = Xe.value) == null ? void 0 : Ge.filter((ei) => {
|
|
7688
|
-
var
|
|
7689
|
-
const [ti, ni] = qe.value.priceRange.split("-").map(Number), [ri, ai] = qe.value.areaRange.split("-").map(Number), [si, li] = qe.value.roomRange.split("-").
|
|
7690
|
-
let
|
|
7696
|
+
var bi, yi, _i, wi, xi;
|
|
7697
|
+
const [ti, ni] = qe.value.priceRange.split("-").map((fi) => Number(fi)), [ri, ai] = qe.value.areaRange.split("-").map((fi) => Number(fi)), [si, li] = qe.value.roomRange.split("-"), di = (fi) => parseFloat(fi.trim().replace(",", ".")), ui = di(si), hi = li === "Infinity" ? 1 / 0 : di(li), ci = ei.price_n >= ti && ei.price_n <= ni, pi = ((bi = ei.type) == null ? void 0 : bi.area_m2_n) >= ri && ((yi = ei.type) == null ? void 0 : yi.area_m2_n) <= ai, mi = (_i = qe.value) != null && _i.floor ? ei.floor_id === qe.value.floor : !0, ki = ((xi = (wi = ei.type) == null ? void 0 : wi.rooms_count) == null ? void 0 : xi.toString()) || "0", vi = di(ki), Si = vi >= ui && (hi === 1 / 0 || vi <= hi);
|
|
7698
|
+
let gi = !0;
|
|
7691
7699
|
if (qe.value.config !== "all")
|
|
7692
7700
|
if (qe.value.config === "available")
|
|
7693
|
-
|
|
7701
|
+
gi = !ei.conf;
|
|
7694
7702
|
else {
|
|
7695
|
-
const
|
|
7696
|
-
|
|
7703
|
+
const fi = ke.getMetaValue("custom_types"), Ci = Array.isArray(fi) ? fi.find((Ei) => Ei.value === qe.value.config) : null;
|
|
7704
|
+
Ci ? gi = ei.conf === Ci.title : gi = ei.conf === qe.value.config;
|
|
7697
7705
|
}
|
|
7698
|
-
return
|
|
7706
|
+
return ci && pi && mi && Si && gi;
|
|
7699
7707
|
}) : [];
|
|
7700
7708
|
}), Qe = computed$1(() => {
|
|
7701
7709
|
var ei;
|
|
7702
7710
|
if (!((ei = Ne.value) != null && ei.flats)) return [];
|
|
7703
7711
|
const Ye = (Fe.value - 1) * ze.value, Ge = Ye + ze.value;
|
|
7704
7712
|
return Ze.value.slice(Ye, Ge);
|
|
7705
|
-
}),
|
|
7713
|
+
}), oi = (Ye, Ge = !0) => {
|
|
7706
7714
|
Fe.value = Ye, je.value, Ge && Le(je.value, 50), setQuery("flats-page", Ye.toString());
|
|
7707
|
-
},
|
|
7708
|
-
|
|
7709
|
-
},
|
|
7715
|
+
}, ii = (Ye, Ge) => {
|
|
7716
|
+
Re.value = Ye, Ie.value = Ge;
|
|
7717
|
+
}, Ke = (Ye) => {
|
|
7710
7718
|
var ni;
|
|
7711
7719
|
const Ge = (ni = De.value) == null ? void 0 : ni.find((ri) => ri.id === Ye), ei = $e("custom_types"), ti = ei == null ? void 0 : ei.find(
|
|
7712
7720
|
(ri) => ri.value === (Ge == null ? void 0 : Ge.conf)
|
|
7713
7721
|
);
|
|
7714
|
-
Ge.conf = ti ? ti.title : Ge == null ? void 0 : Ge.conf,
|
|
7722
|
+
Ge.conf = ti ? ti.title : Ge == null ? void 0 : Ge.conf, He.value = Ge, We.value = !0;
|
|
7715
7723
|
};
|
|
7716
7724
|
return watch(
|
|
7717
7725
|
() => qe.value,
|
|
7718
7726
|
() => {
|
|
7719
|
-
Fe.value = 1,
|
|
7727
|
+
Fe.value = 1, oi(1, !1);
|
|
7720
7728
|
},
|
|
7721
7729
|
{
|
|
7722
7730
|
deep: !0
|
|
@@ -7725,7 +7733,7 @@ const GridIcon = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_rende
|
|
|
7725
7733
|
const Ye = getQuery("flats-page");
|
|
7726
7734
|
Ye && !isNaN(Number(Ye)) && (Fe.value = Number(Ye)), _e.perPage && !isNaN(Number(_e.perPage)) && (ze.value = Number(_e.perPage));
|
|
7727
7735
|
}), onBeforeMount(() => {
|
|
7728
|
-
|
|
7736
|
+
Ae.value = _e.layout === "table", _e.orderBy && (Re.value = _e.orderBy, Ie.value = "asc");
|
|
7729
7737
|
}), provide("fromListView", _e.fromListView), (Ye, Ge) => (openBlock(), createBlock(_sfc_main$L, { class: "irep-flats-list ire-text-base" }, {
|
|
7730
7738
|
default: withCtx(() => {
|
|
7731
7739
|
var ei;
|
|
@@ -7743,7 +7751,7 @@ const GridIcon = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_rende
|
|
|
7743
7751
|
Be.layout === "mixed" ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
7744
7752
|
createElementVNode("button", {
|
|
7745
7753
|
class: "irep-flats-top__mode-switcher-button ire-group ire-flex ire-cursor-pointer ire-items-center ire-gap-1 ire-bg-transparent ire-capitalize",
|
|
7746
|
-
onClick: Ge[1] || (Ge[1] = (ti) =>
|
|
7754
|
+
onClick: Ge[1] || (Ge[1] = (ti) => Ae.value = !Ae.value)
|
|
7747
7755
|
}, [
|
|
7748
7756
|
createElementVNode("div", _hoisted_3, [
|
|
7749
7757
|
createVNode(Transition, {
|
|
@@ -7751,7 +7759,7 @@ const GridIcon = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_rende
|
|
|
7751
7759
|
mode: "out-in"
|
|
7752
7760
|
}, {
|
|
7753
7761
|
default: withCtx(() => [
|
|
7754
|
-
|
|
7762
|
+
Ae.value ? (openBlock(), createBlock(GridIcon, {
|
|
7755
7763
|
key: 0,
|
|
7756
7764
|
class: "ire-size-5"
|
|
7757
7765
|
})) : (openBlock(), createBlock(TableIcon, {
|
|
@@ -7768,9 +7776,9 @@ const GridIcon = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_rende
|
|
|
7768
7776
|
}, {
|
|
7769
7777
|
default: withCtx(() => [
|
|
7770
7778
|
(openBlock(), createElementBlock("span", {
|
|
7771
|
-
key: String(
|
|
7779
|
+
key: String(Ae.value),
|
|
7772
7780
|
class: "ire-text-base ire-text-black ire-transition-all group-hover:ire-text-gray-500"
|
|
7773
|
-
}, toDisplayString(
|
|
7781
|
+
}, toDisplayString(Ae.value ? unref(tr)("grid view") : unref(tr)("table view")), 1))
|
|
7774
7782
|
]),
|
|
7775
7783
|
_: 1
|
|
7776
7784
|
})
|
|
@@ -7782,29 +7790,29 @@ const GridIcon = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_rende
|
|
|
7782
7790
|
mode: "out-in"
|
|
7783
7791
|
}, {
|
|
7784
7792
|
default: withCtx(() => [
|
|
7785
|
-
|
|
7793
|
+
Ae.value ? (openBlock(), createBlock(_sfc_main$3, {
|
|
7786
7794
|
key: 0,
|
|
7787
7795
|
flats: Qe.value,
|
|
7788
|
-
onSortColumn: Ge[2] || (Ge[2] = (ti, ni) =>
|
|
7789
|
-
onOpenFlat: Ge[3] || (Ge[3] = (ti) =>
|
|
7796
|
+
onSortColumn: Ge[2] || (Ge[2] = (ti, ni) => ii(ti, ni)),
|
|
7797
|
+
onOpenFlat: Ge[3] || (Ge[3] = (ti) => Ke(ti))
|
|
7790
7798
|
}, null, 8, ["flats"])) : (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
7791
7799
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(Qe.value, (ti) => (openBlock(), createBlock(_sfc_main$e, {
|
|
7792
7800
|
key: ti.id,
|
|
7793
7801
|
flat: ti,
|
|
7794
|
-
onOpenFlat: Ge[4] || (Ge[4] = (ni) =>
|
|
7802
|
+
onOpenFlat: Ge[4] || (Ge[4] = (ni) => Ke(ni))
|
|
7795
7803
|
}, null, 8, ["flat"]))), 128))
|
|
7796
7804
|
]))
|
|
7797
7805
|
]),
|
|
7798
7806
|
_: 1
|
|
7799
7807
|
})) : (openBlock(), createElementBlock("div", _hoisted_5, toDisplayString(unref(tr)("nothing found")), 1)),
|
|
7800
|
-
(ei = Qe.value) != null && ei.length &&
|
|
7808
|
+
(ei = Qe.value) != null && ei.length && Je.value > 1 ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
7801
7809
|
createVNode(unref(script$1), {
|
|
7802
7810
|
modelValue: Fe.value,
|
|
7803
7811
|
"onUpdate:modelValue": [
|
|
7804
7812
|
Ge[5] || (Ge[5] = (ti) => Fe.value = ti),
|
|
7805
|
-
|
|
7813
|
+
oi
|
|
7806
7814
|
],
|
|
7807
|
-
pages:
|
|
7815
|
+
pages: Je.value,
|
|
7808
7816
|
"range-size": 1,
|
|
7809
7817
|
"active-color": "#000000",
|
|
7810
7818
|
class: "[&_.Page-active]:!ire-border-none [&_.Page-active]:!ire-text-white [&_button]:!ire-rounded-full [&_button]:ire-transition-all [&_button]:hover:!ire-border-none hover:[&_button]:!ire-bg-gray-600 hover:[&_button]:!ire-text-white"
|
|
@@ -7816,13 +7824,13 @@ const GridIcon = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_rende
|
|
|
7816
7824
|
appear: ""
|
|
7817
7825
|
}, {
|
|
7818
7826
|
default: withCtx(() => [
|
|
7819
|
-
|
|
7827
|
+
We.value && He.value ? (openBlock(), createBlock(_sfc_main$n, {
|
|
7820
7828
|
key: 0,
|
|
7821
7829
|
style: normalizeStyle(unref(Ve)),
|
|
7822
|
-
onClose: Ge[6] || (Ge[6] = (ti) =>
|
|
7830
|
+
onClose: Ge[6] || (Ge[6] = (ti) => We.value = !1)
|
|
7823
7831
|
}, {
|
|
7824
7832
|
default: withCtx(() => [
|
|
7825
|
-
createVNode(_sfc_main$p, { flat:
|
|
7833
|
+
createVNode(_sfc_main$p, { flat: He.value }, null, 8, ["flat"])
|
|
7826
7834
|
]),
|
|
7827
7835
|
_: 1
|
|
7828
7836
|
}, 8, ["style"])) : createCommentVNode("", !0)
|