@visitscotland/component-library 5.59.1 → 5.59.3
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { openBlock, createElementBlock, renderSlot, resolveComponent, createBlock, normalizeClass, withCtx, createElementVNode, createVNode, normalizeStyle, createCommentVNode, withDirectives, vShow, inject, mergeProps, toDisplayString, ref, onMounted, onUnmounted, createTextVNode, Fragment, renderList, resolveDirective, withKeys, withModifiers, normalizeProps, createSlots, getCurrentInstance, defineComponent, computed as computed$1, watch, reactive, provide, onBeforeMount, isRef, onBeforeUnmount, unref, isReactive, isReadonly, nextTick as nextTick$1, onUpdated, h, onBeforeUpdate, useId, isVNode, markRaw, toRef, resolveDynamicComponent, Transition, Teleport, useModel, mergeModels, toHandlers, vModelText, guardReactiveProps, Suspense } from "vue";
|
|
2
2
|
import { _ as _export_sfc, V as VsButton, d as dataLayerMixin, a as VsHeading, n as nn, b as an, c as VsIcon, r as rn, l as lodashExports, e as VsBody, f as VsContainer, g as VsRow, h as VsCol, i as ci, p as pi$2, j as en, k as dmoUrls, m as VsImg, E as Ed, o as axios, q as designTokens, Y as Yo, Z as Zo, s as pn, O as Ou, T as Tu, t as ku, u as VsWarning, v as fn, w as un, X as Xi, x as getDefaultExportFromCjs, y as vt, L as Lu, z as ld, A as _a, M as Md, B as products, C as paths, D as monthsEnglish, F as VsLoading, G as ol, H as wn, I as Ea, J as Bn, K as Je, S as St, P as Pa, N as Ka, Q as vc, R as dc, U as useDataLayerStore, W as checkVendorLibrary, $ as siteSearchCloseTemplate, a0 as siteSearchClickTemplate, a1 as siteSearchUsageTemplate, a2 as siteSearchOpenTemplate, a3 as googleMapInteractionTemplate, a4 as googleMapTimeToFirstInteractionTemplate, a5 as googleMapFilterInteractionTemplate, a6 as googleMapSearchTemplate } from "./LoadingSpinner-ij7CWJOg.mjs";
|
|
3
|
-
import { a7 as
|
|
3
|
+
import { a7 as ze } from "./LoadingSpinner-ij7CWJOg.mjs";
|
|
4
4
|
import { defineStore, storeToRefs } from "pinia";
|
|
5
5
|
const _sfc_main$2E = {
|
|
6
6
|
name: "VsAccordion",
|
|
@@ -1686,14 +1686,14 @@ const MAX_RESET_COUNT = 50, computePosition$1 = async (e, n, t) => {
|
|
|
1686
1686
|
}, m = getAlignmentAxis(a), p = getAxisLength(m), g = await o.getDimensions(c), v = m === "y", k = v ? "top" : "left", _ = v ? "bottom" : "right", b = v ? "clientHeight" : "clientWidth", S = r.reference[p] + r.reference[m] - f[m] - r.floating[p], V = f[m] - r.reference[m], T = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(c));
|
|
1687
1687
|
let N = T ? T[b] : 0;
|
|
1688
1688
|
(!N || !await (o.isElement == null ? void 0 : o.isElement(T))) && (N = i.floating[b] || r.floating[p]);
|
|
1689
|
-
const C = S / 2 - V / 2,
|
|
1689
|
+
const C = S / 2 - V / 2, R = N / 2 - g[p] / 2 - 1, I = min$2(u[k], R), w = min$2(u[_], R), M = I, E = N - g[p] - w, L = N / 2 - g[p] / 2 + C, $ = clamp(M, L, E), D = !l.arrow && getAlignment(a) != null && L !== $ && r.reference[p] / 2 - (L < M ? I : w) - g[p] / 2 < 0, A = D ? L < M ? L - M : L - E : 0;
|
|
1690
1690
|
return {
|
|
1691
|
-
[m]: f[m] +
|
|
1691
|
+
[m]: f[m] + A,
|
|
1692
1692
|
data: {
|
|
1693
1693
|
[m]: $,
|
|
1694
|
-
centerOffset: L - $ -
|
|
1694
|
+
centerOffset: L - $ - A,
|
|
1695
1695
|
...D && {
|
|
1696
|
-
alignmentOffset:
|
|
1696
|
+
alignmentOffset: A
|
|
1697
1697
|
}
|
|
1698
1698
|
},
|
|
1699
1699
|
reset: D
|
|
@@ -1725,16 +1725,16 @@ const MAX_RESET_COUNT = 50, computePosition$1 = async (e, n, t) => {
|
|
|
1725
1725
|
return {};
|
|
1726
1726
|
const k = getSide(a), _ = getSideAxis(i), b = getSide(i) === i, S = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), V = f || (b || !g ? [getOppositePlacement(i)] : getExpandedPlacements(i)), T = p !== "none";
|
|
1727
1727
|
!f && T && V.push(...getOppositeAxisPlacements(i, g, p, S));
|
|
1728
|
-
const N = [i, ...V], C = await l.detectOverflow(n, v),
|
|
1728
|
+
const N = [i, ...V], C = await l.detectOverflow(n, v), R = [];
|
|
1729
1729
|
let I = ((s = r.flip) == null ? void 0 : s.overflows) || [];
|
|
1730
|
-
if (d &&
|
|
1730
|
+
if (d && R.push(C[k]), u) {
|
|
1731
1731
|
const L = getAlignmentSides(a, o, S);
|
|
1732
|
-
|
|
1732
|
+
R.push(C[L[0]], C[L[1]]);
|
|
1733
1733
|
}
|
|
1734
1734
|
if (I = [...I, {
|
|
1735
1735
|
placement: a,
|
|
1736
|
-
overflows:
|
|
1737
|
-
}], !
|
|
1736
|
+
overflows: R
|
|
1737
|
+
}], !R.every((L) => L <= 0)) {
|
|
1738
1738
|
var w, M;
|
|
1739
1739
|
const L = (((w = r.flip) == null ? void 0 : w.index) || 0) + 1, $ = N[L];
|
|
1740
1740
|
if ($ && (!(u === "alignment" ? _ !== getSideAxis($) : !1) || // We leave the current main axis only if every placement on that axis
|
|
@@ -1749,21 +1749,21 @@ const MAX_RESET_COUNT = 50, computePosition$1 = async (e, n, t) => {
|
|
|
1749
1749
|
placement: $
|
|
1750
1750
|
}
|
|
1751
1751
|
};
|
|
1752
|
-
let D = (M = I.filter((
|
|
1752
|
+
let D = (M = I.filter((A) => A.overflows[0] <= 0).sort((A, B) => A.overflows[1] - B.overflows[1])[0]) == null ? void 0 : M.placement;
|
|
1753
1753
|
if (!D)
|
|
1754
1754
|
switch (m) {
|
|
1755
1755
|
case "bestFit": {
|
|
1756
1756
|
var E;
|
|
1757
|
-
const
|
|
1757
|
+
const A = (E = I.filter((B) => {
|
|
1758
1758
|
if (T) {
|
|
1759
|
-
const
|
|
1760
|
-
return
|
|
1759
|
+
const O = getSideAxis(B.placement);
|
|
1760
|
+
return O === _ || // Create a bias to the `y` side axis due to horizontal
|
|
1761
1761
|
// reading directions favoring greater width.
|
|
1762
|
-
|
|
1762
|
+
O === "y";
|
|
1763
1763
|
}
|
|
1764
1764
|
return !0;
|
|
1765
|
-
}).map((B) => [B.placement, B.overflows.filter((
|
|
1766
|
-
|
|
1765
|
+
}).map((B) => [B.placement, B.overflows.filter((O) => O > 0).reduce((O, P) => O + P, 0)]).sort((B, O) => B[1] - O[1])[0]) == null ? void 0 : E[0];
|
|
1766
|
+
A && (D = A);
|
|
1767
1767
|
break;
|
|
1768
1768
|
}
|
|
1769
1769
|
case "initialPlacement":
|
|
@@ -3768,9 +3768,9 @@ function _sfc_render$1T(e, n, t, s, a, r) {
|
|
|
3768
3768
|
renderSlot(e.$slots, "vs-canned-search-of")
|
|
3769
3769
|
]),
|
|
3770
3770
|
default: withCtx(() => [
|
|
3771
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(a.products, (C,
|
|
3772
|
-
key:
|
|
3773
|
-
"slide-index": `${
|
|
3771
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(a.products, (C, R) => (openBlock(), createBlock(V, {
|
|
3772
|
+
key: R,
|
|
3773
|
+
"slide-index": `${R}`,
|
|
3774
3774
|
"img-src": C.images ? C.images[0].mediaUrl : "",
|
|
3775
3775
|
title: C.name,
|
|
3776
3776
|
"detail-link": {
|
|
@@ -6228,7 +6228,7 @@ function formatLocale(e) {
|
|
|
6228
6228
|
u = formatSpecifier(u);
|
|
6229
6229
|
var f = u.fill, m = u.align, p = u.sign, g = u.symbol, v = u.zero, k = u.width, _ = u.comma, b = u.precision, S = u.trim, V = u.type;
|
|
6230
6230
|
V === "n" ? (_ = !0, V = "g") : formatTypes[V] || (b === void 0 && (b = 12), S = !0, V = "g"), (v || f === "0" && m === "=") && (v = !0, f = "0", m = "=");
|
|
6231
|
-
var T = g === "$" ? t : g === "#" && /[boxX]/.test(V) ? "0" + V.toLowerCase() : "", N = g === "$" ? s : /[%p]/.test(V) ? o : "", C = formatTypes[V],
|
|
6231
|
+
var T = g === "$" ? t : g === "#" && /[boxX]/.test(V) ? "0" + V.toLowerCase() : "", N = g === "$" ? s : /[%p]/.test(V) ? o : "", C = formatTypes[V], R = /[defgprs%]/.test(V);
|
|
6232
6232
|
b = b === void 0 ? 6 : /[gprs]/.test(V) ? Math.max(1, Math.min(21, b)) : Math.max(0, Math.min(20, b));
|
|
6233
6233
|
function I(w) {
|
|
6234
6234
|
var M = T, E = N, L, $, D;
|
|
@@ -6236,8 +6236,8 @@ function formatLocale(e) {
|
|
|
6236
6236
|
E = C(w) + E, w = "";
|
|
6237
6237
|
else {
|
|
6238
6238
|
w = +w;
|
|
6239
|
-
var
|
|
6240
|
-
if (w = isNaN(w) ? l : C(Math.abs(w), b), S && (w = formatTrim(w)),
|
|
6239
|
+
var A = w < 0 || 1 / w < 0;
|
|
6240
|
+
if (w = isNaN(w) ? l : C(Math.abs(w), b), S && (w = formatTrim(w)), A && +w == 0 && p !== "+" && (A = !1), M = (A ? p === "(" ? p : i : p === "-" || p === "(" ? "" : p) + M, E = (V === "s" ? prefixes[8 + prefixExponent / 3] : "") + E + (A && p === "(" ? ")" : ""), R) {
|
|
6241
6241
|
for (L = -1, $ = w.length; ++L < $; )
|
|
6242
6242
|
if (D = w.charCodeAt(L), 48 > D || D > 57) {
|
|
6243
6243
|
E = (D === 46 ? a + w.slice(L + 1) : w.slice(L)) + E, w = w.slice(0, L);
|
|
@@ -6246,19 +6246,19 @@ function formatLocale(e) {
|
|
|
6246
6246
|
}
|
|
6247
6247
|
}
|
|
6248
6248
|
_ && !v && (w = n(w, 1 / 0));
|
|
6249
|
-
var B = M.length + w.length + E.length,
|
|
6250
|
-
switch (_ && v && (w = n(
|
|
6249
|
+
var B = M.length + w.length + E.length, O = B < k ? new Array(k - B + 1).join(f) : "";
|
|
6250
|
+
switch (_ && v && (w = n(O + w, O.length ? k - E.length : 1 / 0), O = ""), m) {
|
|
6251
6251
|
case "<":
|
|
6252
|
-
w = M + w + E +
|
|
6252
|
+
w = M + w + E + O;
|
|
6253
6253
|
break;
|
|
6254
6254
|
case "=":
|
|
6255
|
-
w = M +
|
|
6255
|
+
w = M + O + w + E;
|
|
6256
6256
|
break;
|
|
6257
6257
|
case "^":
|
|
6258
|
-
w =
|
|
6258
|
+
w = O.slice(0, B = O.length >> 1) + M + w + E + O.slice(B);
|
|
6259
6259
|
break;
|
|
6260
6260
|
default:
|
|
6261
|
-
w =
|
|
6261
|
+
w = O + M + w + E;
|
|
6262
6262
|
break;
|
|
6263
6263
|
}
|
|
6264
6264
|
return r(w);
|
|
@@ -6561,14 +6561,14 @@ function intersect(e, n, t, s, a, r, o, i) {
|
|
|
6561
6561
|
return f = (d * (n - r) - u * (e - a)) / f, [e + f * l, n + f * c];
|
|
6562
6562
|
}
|
|
6563
6563
|
function cornerTangents(e, n, t, s, a, r, o) {
|
|
6564
|
-
var i = e - t, l = n - s, c = (o ? r : -r) / sqrt(i * i + l * l), d = c * l, u = -c * i, f = e + d, m = n + u, p = t + d, g = s + u, v = (f + p) / 2, k = (m + g) / 2, _ = p - f, b = g - m, S = _ * _ + b * b, V = a - r, T = f * g - p * m, N = (b < 0 ? -1 : 1) * sqrt(max(0, V * V * S - T * T)), C = (T * b - _ * N) / S,
|
|
6565
|
-
return M * M + E * E > L * L + $ * $ && (C = I,
|
|
6564
|
+
var i = e - t, l = n - s, c = (o ? r : -r) / sqrt(i * i + l * l), d = c * l, u = -c * i, f = e + d, m = n + u, p = t + d, g = s + u, v = (f + p) / 2, k = (m + g) / 2, _ = p - f, b = g - m, S = _ * _ + b * b, V = a - r, T = f * g - p * m, N = (b < 0 ? -1 : 1) * sqrt(max(0, V * V * S - T * T)), C = (T * b - _ * N) / S, R = (-T * _ - b * N) / S, I = (T * b + _ * N) / S, w = (-T * _ + b * N) / S, M = C - v, E = R - k, L = I - v, $ = w - k;
|
|
6565
|
+
return M * M + E * E > L * L + $ * $ && (C = I, R = w), {
|
|
6566
6566
|
cx: C,
|
|
6567
|
-
cy:
|
|
6567
|
+
cy: R,
|
|
6568
6568
|
x01: -d,
|
|
6569
6569
|
y01: -u,
|
|
6570
6570
|
x11: C * (a / V - 1),
|
|
6571
|
-
y11:
|
|
6571
|
+
y11: R * (a / V - 1)
|
|
6572
6572
|
};
|
|
6573
6573
|
}
|
|
6574
6574
|
function arc() {
|
|
@@ -6579,22 +6579,22 @@ function arc() {
|
|
|
6579
6579
|
else if (v > tau$1 - epsilon$2)
|
|
6580
6580
|
i.moveTo(m * cos(p), m * sin(p)), i.arc(0, 0, m, p, g, !k), f > epsilon$2 && (i.moveTo(f * cos(g), f * sin(g)), i.arc(0, 0, f, g, p, k));
|
|
6581
6581
|
else {
|
|
6582
|
-
var _ = p, b = g, S = p, V = g, T = v, N = v, C = o.apply(this, arguments) / 2,
|
|
6583
|
-
if (
|
|
6584
|
-
var $ = asin(
|
|
6582
|
+
var _ = p, b = g, S = p, V = g, T = v, N = v, C = o.apply(this, arguments) / 2, R = C > epsilon$2 && (s ? +s.apply(this, arguments) : sqrt(f * f + m * m)), I = min(abs(m - f) / 2, +t.apply(this, arguments)), w = I, M = I, E, L;
|
|
6583
|
+
if (R > epsilon$2) {
|
|
6584
|
+
var $ = asin(R / f * sin(C)), D = asin(R / m * sin(C));
|
|
6585
6585
|
(T -= $ * 2) > epsilon$2 ? ($ *= k ? 1 : -1, S += $, V -= $) : (T = 0, S = V = (p + g) / 2), (N -= D * 2) > epsilon$2 ? (D *= k ? 1 : -1, _ += D, b -= D) : (N = 0, _ = b = (p + g) / 2);
|
|
6586
6586
|
}
|
|
6587
|
-
var
|
|
6587
|
+
var A = m * cos(_), B = m * sin(_), O = f * cos(V), P = f * sin(V);
|
|
6588
6588
|
if (I > epsilon$2) {
|
|
6589
|
-
var H = m * cos(b), U = m * sin(b), Q = f * cos(S),
|
|
6589
|
+
var H = m * cos(b), U = m * sin(b), Q = f * cos(S), ne = f * sin(S), Y;
|
|
6590
6590
|
if (v < pi$1)
|
|
6591
|
-
if (Y = intersect(
|
|
6592
|
-
var
|
|
6593
|
-
w = min(I, (f -
|
|
6591
|
+
if (Y = intersect(A, B, Q, ne, H, U, O, P)) {
|
|
6592
|
+
var X = A - Y[0], ee = B - Y[1], ce = H - Y[0], oe = U - Y[1], he = 1 / sin(acos((X * ce + ee * oe) / (sqrt(X * X + ee * ee) * sqrt(ce * ce + oe * oe))) / 2), ie = sqrt(Y[0] * Y[0] + Y[1] * Y[1]);
|
|
6593
|
+
w = min(I, (f - ie) / (he - 1)), M = min(I, (m - ie) / (he + 1));
|
|
6594
6594
|
} else
|
|
6595
6595
|
w = M = 0;
|
|
6596
6596
|
}
|
|
6597
|
-
N > epsilon$2 ? M > epsilon$2 ? (E = cornerTangents(Q,
|
|
6597
|
+
N > epsilon$2 ? M > epsilon$2 ? (E = cornerTangents(Q, ne, A, B, m, M, k), L = cornerTangents(H, U, O, P, m, M, k), i.moveTo(E.cx + E.x01, E.cy + E.y01), M < I ? i.arc(E.cx, E.cy, M, atan2(E.y01, E.x01), atan2(L.y01, L.x01), !k) : (i.arc(E.cx, E.cy, M, atan2(E.y01, E.x01), atan2(E.y11, E.x11), !k), i.arc(0, 0, m, atan2(E.cy + E.y11, E.cx + E.x11), atan2(L.cy + L.y11, L.cx + L.x11), !k), i.arc(L.cx, L.cy, M, atan2(L.y11, L.x11), atan2(L.y01, L.x01), !k))) : (i.moveTo(A, B), i.arc(0, 0, m, _, b, !k)) : i.moveTo(A, B), !(f > epsilon$2) || !(T > epsilon$2) ? i.lineTo(O, P) : w > epsilon$2 ? (E = cornerTangents(O, P, H, U, f, -w, k), L = cornerTangents(A, B, Q, ne, f, -w, k), i.lineTo(E.cx + E.x01, E.cy + E.y01), w < I ? i.arc(E.cx, E.cy, w, atan2(E.y01, E.x01), atan2(L.y01, L.x01), !k) : (i.arc(E.cx, E.cy, w, atan2(E.y01, E.x01), atan2(E.y11, E.x11), !k), i.arc(0, 0, f, atan2(E.cy + E.y11, E.cx + E.x11), atan2(L.cy + L.y11, L.cx + L.x11), k), i.arc(L.cx, L.cy, w, atan2(L.y11, L.x11), atan2(L.y01, L.x01), !k))) : i.arc(0, 0, f, V, S, k);
|
|
6598
6598
|
}
|
|
6599
6599
|
if (i.closePath(), d) return i = null, d + "" || null;
|
|
6600
6600
|
}
|
|
@@ -7661,10 +7661,10 @@ function entering() {
|
|
|
7661
7661
|
function axis(e, n) {
|
|
7662
7662
|
var t = [], s = null, a = null, r = 6, o = 6, i = 3, l = typeof window < "u" && window.devicePixelRatio > 1 ? 0 : 0.5, c = e === top || e === left ? -1 : 1, d = e === left || e === right ? "x" : "y", u = e === top || e === bottom ? translateX : translateY;
|
|
7663
7663
|
function f(m) {
|
|
7664
|
-
var p = s ?? (n.ticks ? n.ticks.apply(n, t) : n.domain()), g = a ?? (n.tickFormat ? n.tickFormat.apply(n, t) : identity), v = Math.max(r, 0) + i, k = n.range(), _ = +k[0] + l, b = +k[k.length - 1] + l, S = (n.bandwidth ? center : number)(n.copy(), l), V = m.selection ? m.selection() : m, T = V.selectAll(".domain").data([null]), N = V.selectAll(".tick").data(p, n).order(), C = N.exit(),
|
|
7665
|
-
T = T.merge(T.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), N = N.merge(
|
|
7664
|
+
var p = s ?? (n.ticks ? n.ticks.apply(n, t) : n.domain()), g = a ?? (n.tickFormat ? n.tickFormat.apply(n, t) : identity), v = Math.max(r, 0) + i, k = n.range(), _ = +k[0] + l, b = +k[k.length - 1] + l, S = (n.bandwidth ? center : number)(n.copy(), l), V = m.selection ? m.selection() : m, T = V.selectAll(".domain").data([null]), N = V.selectAll(".tick").data(p, n).order(), C = N.exit(), R = N.enter().append("g").attr("class", "tick"), I = N.select("line"), w = N.select("text");
|
|
7665
|
+
T = T.merge(T.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), N = N.merge(R), I = I.merge(R.append("line").attr("stroke", "currentColor").attr(d + "2", c * r)), w = w.merge(R.append("text").attr("fill", "currentColor").attr(d, c * v).attr("dy", e === top ? "0em" : e === bottom ? "0.71em" : "0.32em")), m !== V && (T = T.transition(m), N = N.transition(m), I = I.transition(m), w = w.transition(m), C = C.transition(m).attr("opacity", epsilon).attr("transform", function(M) {
|
|
7666
7666
|
return isFinite(M = S(M)) ? u(M + l) : this.getAttribute("transform");
|
|
7667
|
-
}),
|
|
7667
|
+
}), R.attr("opacity", epsilon).attr("transform", function(M) {
|
|
7668
7668
|
var E = this.parentNode.__axis;
|
|
7669
7669
|
return u((E && isFinite(E = E(M)) ? E : S(M)) + l);
|
|
7670
7670
|
})), C.remove(), T.attr("d", e === left || e === right ? o ? "M" + c * o + "," + _ + "H" + l + "V" + b + "H" + c * o : "M" + l + "," + _ + "V" + b : o ? "M" + _ + "," + c * o + "V" + l + "H" + b + "V" + c * o : "M" + _ + "," + l + "H" + b), N.attr("opacity", 1).attr("transform", function(M) {
|
|
@@ -10006,14 +10006,14 @@ function setValidations(e) {
|
|
|
10006
10006
|
config: m,
|
|
10007
10007
|
validationGroups: p
|
|
10008
10008
|
} = sortValidations(n), g = _objectSpread2$1(_objectSpread2$1({}, i), m), v = s ? computed$1(() => {
|
|
10009
|
-
const
|
|
10010
|
-
return
|
|
10009
|
+
const P = unref(t);
|
|
10010
|
+
return P ? unref(P[s]) : void 0;
|
|
10011
10011
|
}) : t, k = _objectSpread2$1({}, unref(c) || {}), _ = computed$1(() => {
|
|
10012
|
-
const
|
|
10013
|
-
return s ?
|
|
10012
|
+
const P = unref(c);
|
|
10013
|
+
return s ? P ? unref(P[s]) : void 0 : P;
|
|
10014
10014
|
}), b = createValidationResults(u, v, s, o, d, g, l, _, t), S = collectNestedValidationResults(f, v, d, o, g, l, _), V = {};
|
|
10015
|
-
p && Object.entries(p).forEach((
|
|
10016
|
-
let [H, U] =
|
|
10015
|
+
p && Object.entries(p).forEach((P) => {
|
|
10016
|
+
let [H, U] = P;
|
|
10017
10017
|
V[H] = {
|
|
10018
10018
|
$invalid: gatherBooleanGroupProperties(U, S, "$invalid"),
|
|
10019
10019
|
$error: gatherBooleanGroupProperties(U, S, "$error"),
|
|
@@ -10026,7 +10026,7 @@ function setValidations(e) {
|
|
|
10026
10026
|
$dirty: T,
|
|
10027
10027
|
$errors: N,
|
|
10028
10028
|
$invalid: C,
|
|
10029
|
-
$anyDirty:
|
|
10029
|
+
$anyDirty: R,
|
|
10030
10030
|
$error: I,
|
|
10031
10031
|
$pending: w,
|
|
10032
10032
|
$touch: M,
|
|
@@ -10035,33 +10035,33 @@ function setValidations(e) {
|
|
|
10035
10035
|
$commit: $
|
|
10036
10036
|
} = createMetaFields(b, S, r), D = s ? computed$1({
|
|
10037
10037
|
get: () => unref(v),
|
|
10038
|
-
set: (
|
|
10038
|
+
set: (P) => {
|
|
10039
10039
|
T.value = !0;
|
|
10040
10040
|
const H = unref(t), U = unref(c);
|
|
10041
|
-
U && (U[s] = k[s]), isRef(H[s]) ? H[s].value =
|
|
10041
|
+
U && (U[s] = k[s]), isRef(H[s]) ? H[s].value = P : H[s] = P;
|
|
10042
10042
|
}
|
|
10043
10043
|
}) : null;
|
|
10044
10044
|
s && g.$autoDirty && watch(v, () => {
|
|
10045
10045
|
T.value || M();
|
|
10046
|
-
const
|
|
10047
|
-
|
|
10046
|
+
const P = unref(c);
|
|
10047
|
+
P && (P[s] = k[s]);
|
|
10048
10048
|
}, {
|
|
10049
10049
|
flush: "sync"
|
|
10050
10050
|
});
|
|
10051
|
-
async function
|
|
10052
|
-
return M(), g.$rewardEarly && ($(), await nextTick$1()), await nextTick$1(), new Promise((
|
|
10053
|
-
if (!w.value) return
|
|
10051
|
+
async function A() {
|
|
10052
|
+
return M(), g.$rewardEarly && ($(), await nextTick$1()), await nextTick$1(), new Promise((P) => {
|
|
10053
|
+
if (!w.value) return P(!C.value);
|
|
10054
10054
|
const H = watch(w, () => {
|
|
10055
|
-
|
|
10055
|
+
P(!C.value), H();
|
|
10056
10056
|
});
|
|
10057
10057
|
});
|
|
10058
10058
|
}
|
|
10059
|
-
function B(
|
|
10060
|
-
return (r.value || {})[
|
|
10059
|
+
function B(P) {
|
|
10060
|
+
return (r.value || {})[P];
|
|
10061
10061
|
}
|
|
10062
|
-
function
|
|
10063
|
-
isRef(c) ? c.value = k : Object.keys(k).length === 0 ? Object.keys(c).forEach((
|
|
10064
|
-
delete c[
|
|
10062
|
+
function O() {
|
|
10063
|
+
isRef(c) ? c.value = k : Object.keys(k).length === 0 ? Object.keys(c).forEach((P) => {
|
|
10064
|
+
delete c[P];
|
|
10065
10065
|
}) : Object.assign(c, k);
|
|
10066
10066
|
}
|
|
10067
10067
|
return reactive(_objectSpread2$1(_objectSpread2$1(_objectSpread2$1({}, b), {}, {
|
|
@@ -10070,17 +10070,17 @@ function setValidations(e) {
|
|
|
10070
10070
|
$error: I,
|
|
10071
10071
|
$errors: N,
|
|
10072
10072
|
$invalid: C,
|
|
10073
|
-
$anyDirty:
|
|
10073
|
+
$anyDirty: R,
|
|
10074
10074
|
$pending: w,
|
|
10075
10075
|
$touch: M,
|
|
10076
10076
|
$reset: E,
|
|
10077
10077
|
$path: d || ROOT_PATH,
|
|
10078
10078
|
$silentErrors: L,
|
|
10079
|
-
$validate:
|
|
10079
|
+
$validate: A,
|
|
10080
10080
|
$commit: $
|
|
10081
10081
|
}, r && {
|
|
10082
10082
|
$getResultsForChild: B,
|
|
10083
|
-
$clearExternalResults:
|
|
10083
|
+
$clearExternalResults: O,
|
|
10084
10084
|
$validationGroups: V
|
|
10085
10085
|
}), S));
|
|
10086
10086
|
}
|
|
@@ -13195,7 +13195,7 @@ function updateSlides() {
|
|
|
13195
13195
|
const N = t.grid && t.grid.rows > 1 && e.grid;
|
|
13196
13196
|
N ? e.grid.initSlides(c) : e.grid && e.grid.unsetSlides();
|
|
13197
13197
|
let C;
|
|
13198
|
-
const
|
|
13198
|
+
const R = t.slidesPerView === "auto" && t.breakpoints && Object.keys(t.breakpoints).filter((I) => typeof t.breakpoints[I].slidesPerView < "u").length > 0;
|
|
13199
13199
|
for (let I = 0; I < d; I += 1) {
|
|
13200
13200
|
C = 0;
|
|
13201
13201
|
const w = c[I];
|
|
@@ -13203,20 +13203,20 @@ function updateSlides() {
|
|
|
13203
13203
|
if (i && t.slidesPerView === "auto")
|
|
13204
13204
|
t.virtual.slidesPerViewAutoSlideSize && (C = t.virtual.slidesPerViewAutoSlideSize), C && w && (t.roundLengths && (C = Math.floor(C)), w.style[e.getDirectionLabel("width")] = `${C}px`);
|
|
13205
13205
|
else if (t.slidesPerView === "auto") {
|
|
13206
|
-
|
|
13206
|
+
R && (w.style[e.getDirectionLabel("width")] = "");
|
|
13207
13207
|
const M = getComputedStyle(w), E = w.style.transform, L = w.style.webkitTransform;
|
|
13208
13208
|
if (E && (w.style.transform = "none"), L && (w.style.webkitTransform = "none"), t.roundLengths)
|
|
13209
13209
|
C = e.isHorizontal() ? elementOuterSize(w, "width") : elementOuterSize(w, "height");
|
|
13210
13210
|
else {
|
|
13211
|
-
const $ = n(M, "width"), D = n(M, "padding-left"),
|
|
13212
|
-
if (
|
|
13213
|
-
C = $ + B +
|
|
13211
|
+
const $ = n(M, "width"), D = n(M, "padding-left"), A = n(M, "padding-right"), B = n(M, "margin-left"), O = n(M, "margin-right"), P = M.getPropertyValue("box-sizing");
|
|
13212
|
+
if (P && P === "border-box")
|
|
13213
|
+
C = $ + B + O;
|
|
13214
13214
|
else {
|
|
13215
13215
|
const {
|
|
13216
13216
|
clientWidth: H,
|
|
13217
13217
|
offsetWidth: U
|
|
13218
13218
|
} = w;
|
|
13219
|
-
C = $ + D +
|
|
13219
|
+
C = $ + D + A + B + O + (U - H);
|
|
13220
13220
|
}
|
|
13221
13221
|
}
|
|
13222
13222
|
E && (w.style.transform = E), L && (w.style.webkitTransform = L), t.roundLengths && (C = Math.floor(C));
|
|
@@ -13677,8 +13677,8 @@ function slideTo(e = 0, n, t = !0, s, a) {
|
|
|
13677
13677
|
const k = -l[v];
|
|
13678
13678
|
if (i.normalizeSlideIndex)
|
|
13679
13679
|
for (let N = 0; N < c.length; N += 1) {
|
|
13680
|
-
const C = -Math.floor(k * 100),
|
|
13681
|
-
typeof c[N + 1] < "u" ? C >=
|
|
13680
|
+
const C = -Math.floor(k * 100), R = Math.floor(c[N] * 100), I = Math.floor(c[N + 1] * 100);
|
|
13681
|
+
typeof c[N + 1] < "u" ? C >= R && C < I - (I - R) / 2 ? o = N : C >= R && C < I && (o = N + 1) : C >= R && (o = N);
|
|
13682
13682
|
}
|
|
13683
13683
|
if (r.initialized && o !== u && (!r.allowSlideNext && (f ? k > r.translate && k > r.minTranslate() : k < r.translate && k < r.minTranslate()) || !r.allowSlidePrev && k > r.translate && k > r.maxTranslate() && (u || 0) !== o))
|
|
13684
13684
|
return !1;
|
|
@@ -13949,30 +13949,30 @@ function loopFix({
|
|
|
13949
13949
|
V % S !== 0 && (V += S - V % S), V += m.loopAdditionalSlides, l.loopedSlides = V;
|
|
13950
13950
|
const T = l.grid && m.grid && m.grid.rows > 1;
|
|
13951
13951
|
c.length < b + V || l.params.effect === "cards" && c.length < b + V * 2 ? showWarning("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters") : T && m.grid.fill === "row" && showWarning("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");
|
|
13952
|
-
const N = [], C = [],
|
|
13952
|
+
const N = [], C = [], R = T ? Math.ceil(c.length / m.grid.rows) : c.length, I = r && R - k < b && !_;
|
|
13953
13953
|
let w = I ? k : l.activeIndex;
|
|
13954
13954
|
typeof a > "u" ? a = l.getSlideIndex(c.find((B) => B.classList.contains(m.slideActiveClass))) : w = a;
|
|
13955
13955
|
const M = t === "next" || !t, E = t === "prev" || !t;
|
|
13956
13956
|
let L = 0, $ = 0;
|
|
13957
|
-
const
|
|
13958
|
-
if (
|
|
13959
|
-
L = Math.max(V -
|
|
13960
|
-
for (let B = 0; B < V -
|
|
13961
|
-
const
|
|
13957
|
+
const A = (T ? c[a].column : a) + (_ && typeof s > "u" ? -b / 2 + 0.5 : 0);
|
|
13958
|
+
if (A < V) {
|
|
13959
|
+
L = Math.max(V - A, S);
|
|
13960
|
+
for (let B = 0; B < V - A; B += 1) {
|
|
13961
|
+
const O = B - Math.floor(B / R) * R;
|
|
13962
13962
|
if (T) {
|
|
13963
|
-
const
|
|
13963
|
+
const P = R - O - 1;
|
|
13964
13964
|
for (let H = c.length - 1; H >= 0; H -= 1)
|
|
13965
|
-
c[H].column ===
|
|
13965
|
+
c[H].column === P && N.push(H);
|
|
13966
13966
|
} else
|
|
13967
|
-
N.push(
|
|
13967
|
+
N.push(R - O - 1);
|
|
13968
13968
|
}
|
|
13969
|
-
} else if (
|
|
13970
|
-
$ = Math.max(
|
|
13969
|
+
} else if (A + b > R - V) {
|
|
13970
|
+
$ = Math.max(A - (R - V * 2), S), I && ($ = Math.max($, b - R + k + 1));
|
|
13971
13971
|
for (let B = 0; B < $; B += 1) {
|
|
13972
|
-
const
|
|
13973
|
-
T ? c.forEach((
|
|
13974
|
-
|
|
13975
|
-
}) : C.push(
|
|
13972
|
+
const O = B - Math.floor(B / R) * R;
|
|
13973
|
+
T ? c.forEach((P, H) => {
|
|
13974
|
+
P.column === O && C.push(H);
|
|
13975
|
+
}) : C.push(O);
|
|
13976
13976
|
}
|
|
13977
13977
|
}
|
|
13978
13978
|
if (l.__preventObserver__ = !0, requestAnimationFrame(() => {
|
|
@@ -13981,21 +13981,21 @@ function loopFix({
|
|
|
13981
13981
|
c[B].swiperLoopMoveDOM = !0, f.prepend(c[B]), c[B].swiperLoopMoveDOM = !1;
|
|
13982
13982
|
}), M && C.forEach((B) => {
|
|
13983
13983
|
c[B].swiperLoopMoveDOM = !0, f.append(c[B]), c[B].swiperLoopMoveDOM = !1;
|
|
13984
|
-
}), l.recalcSlides(), m.slidesPerView === "auto" ? l.updateSlides() : T && (N.length > 0 && E || C.length > 0 && M) && l.slides.forEach((B,
|
|
13985
|
-
l.grid.updateSlide(
|
|
13984
|
+
}), l.recalcSlides(), m.slidesPerView === "auto" ? l.updateSlides() : T && (N.length > 0 && E || C.length > 0 && M) && l.slides.forEach((B, O) => {
|
|
13985
|
+
l.grid.updateSlide(O, B, l.slides);
|
|
13986
13986
|
}), m.watchSlidesProgress && l.updateSlidesOffset(), n) {
|
|
13987
13987
|
if (N.length > 0 && E) {
|
|
13988
13988
|
if (typeof e > "u") {
|
|
13989
|
-
const B = l.slidesGrid[w],
|
|
13990
|
-
i ? l.setTranslate(l.translate -
|
|
13989
|
+
const B = l.slidesGrid[w], P = l.slidesGrid[w + L] - B;
|
|
13990
|
+
i ? l.setTranslate(l.translate - P) : (l.slideTo(w + Math.ceil(L), 0, !1, !0), s && (l.touchEventsData.startTranslate = l.touchEventsData.startTranslate - P, l.touchEventsData.currentTranslate = l.touchEventsData.currentTranslate - P));
|
|
13991
13991
|
} else if (s) {
|
|
13992
13992
|
const B = T ? N.length / m.grid.rows : N.length;
|
|
13993
13993
|
l.slideTo(l.activeIndex + B, 0, !1, !0), l.touchEventsData.currentTranslate = l.translate;
|
|
13994
13994
|
}
|
|
13995
13995
|
} else if (C.length > 0 && M)
|
|
13996
13996
|
if (typeof e > "u") {
|
|
13997
|
-
const B = l.slidesGrid[w],
|
|
13998
|
-
i ? l.setTranslate(l.translate -
|
|
13997
|
+
const B = l.slidesGrid[w], P = l.slidesGrid[w - $] - B;
|
|
13998
|
+
i ? l.setTranslate(l.translate - P) : (l.slideTo(w - $, 0, !1, !0), s && (l.touchEventsData.startTranslate = l.touchEventsData.startTranslate - P, l.touchEventsData.currentTranslate = l.touchEventsData.currentTranslate - P));
|
|
13999
13999
|
} else {
|
|
14000
14000
|
const B = T ? C.length / m.grid.rows : C.length;
|
|
14001
14001
|
l.slideTo(l.activeIndex - B, 0, !1, !0);
|
|
@@ -14009,10 +14009,10 @@ function loopFix({
|
|
|
14009
14009
|
activeSlideIndex: a,
|
|
14010
14010
|
byController: !0
|
|
14011
14011
|
};
|
|
14012
|
-
Array.isArray(l.controller.control) ? l.controller.control.forEach((
|
|
14013
|
-
!
|
|
14012
|
+
Array.isArray(l.controller.control) ? l.controller.control.forEach((O) => {
|
|
14013
|
+
!O.destroyed && O.params.loop && O.loopFix({
|
|
14014
14014
|
...B,
|
|
14015
|
-
slideTo:
|
|
14015
|
+
slideTo: O.params.slidesPerView === m.slidesPerView ? n : !1
|
|
14016
14016
|
});
|
|
14017
14017
|
}) : l.controller.control instanceof l.constructor && l.controller.control.params.loop && l.controller.control.loopFix({
|
|
14018
14018
|
...B,
|
|
@@ -15167,8 +15167,8 @@ function updateSwiper({
|
|
|
15167
15167
|
if (isObject$1(c[C]) && isObject$1(t[C]))
|
|
15168
15168
|
Object.assign(c[C], t[C]), (C === "navigation" || C === "pagination" || C === "scrollbar") && "enabled" in t[C] && !t[C].enabled && N(C);
|
|
15169
15169
|
else {
|
|
15170
|
-
const
|
|
15171
|
-
(
|
|
15170
|
+
const R = t[C];
|
|
15171
|
+
(R === !0 || R === !1) && (C === "navigation" || C === "pagination" || C === "scrollbar") ? R === !1 && N(C) : c[C] = t[C];
|
|
15172
15172
|
}
|
|
15173
15173
|
}), l.includes("controller") && !v && e.controller && e.controller.control && c.controller && c.controller.control && (e.controller.control = c.controller.control), s.includes("children") && n && m && c.virtual.enabled ? (m.slides = n, m.update(!0)) : s.includes("virtual") && m && c.virtual.enabled && (n && (m.slides = n), m.update(!0)), s.includes("children") && n && c.loop && (T = !0), g && p.init() && p.update(!0), v && (e.controller.control = c.controller.control), k && (e.isElement && (!i || typeof i == "string") && (i = document.createElement("div"), i.classList.add("swiper-pagination"), i.part.add("pagination"), e.el.appendChild(i)), i && (c.pagination.el = i), d.init(), d.render(), d.update()), _ && (e.isElement && (!o || typeof o == "string") && (o = document.createElement("div"), o.classList.add("swiper-scrollbar"), o.part.add("scrollbar"), e.el.appendChild(o)), o && (c.scrollbar.el = o), f.init(), f.updateSize(), f.setTranslate()), b && (e.isElement && ((!a || typeof a == "string") && (a = document.createElement("div"), a.classList.add("swiper-button-next"), setInnerHTML(a, e.navigation.arrowSvg), a.part.add("button-next"), e.el.appendChild(a)), (!r || typeof r == "string") && (r = document.createElement("div"), r.classList.add("swiper-button-prev"), setInnerHTML(r, e.navigation.arrowSvg), r.part.add("button-prev"), e.el.appendChild(r))), a && (c.navigation.nextEl = a), r && (c.navigation.prevEl = r), u.init(), u.update()), s.includes("allowSlideNext") && (e.allowSlideNext = t.allowSlideNext), s.includes("allowSlidePrev") && (e.allowSlidePrev = t.allowSlidePrev), s.includes("direction") && e.changeDirection(t.direction, !1), (S || T) && e.loopDestroy(), (V || T) && e.loopCreate(), e.update();
|
|
15174
15174
|
}
|
|
@@ -15782,7 +15782,7 @@ const Swiper = {
|
|
|
15782
15782
|
!l.value && d.value && (d.value.emitSlidesClasses(), l.value = !0);
|
|
15783
15783
|
const {
|
|
15784
15784
|
passedParams: N
|
|
15785
|
-
} = getParams(e, !1), C = getChangedParams(N, u.value, f.value, m.value, (
|
|
15785
|
+
} = getParams(e, !1), C = getChangedParams(N, u.value, f.value, m.value, (R) => R.props && R.props.key);
|
|
15786
15786
|
u.value = N, (C.length || i.value) && d.value && !d.value.destroyed && updateSwiper({
|
|
15787
15787
|
swiper: d.value,
|
|
15788
15788
|
slides: f.value,
|
|
@@ -15810,8 +15810,8 @@ const Swiper = {
|
|
|
15810
15810
|
d.value && !d.value.destroyed && d.value.destroy(!0, !1);
|
|
15811
15811
|
});
|
|
15812
15812
|
function T(N) {
|
|
15813
|
-
return _.virtual ? renderVirtual(d, N, o.value) : (N.forEach((C,
|
|
15814
|
-
C.props || (C.props = {}), C.props.swiperRef = d, C.props.swiperSlideIndex =
|
|
15813
|
+
return _.virtual ? renderVirtual(d, N, o.value) : (N.forEach((C, R) => {
|
|
15814
|
+
C.props || (C.props = {}), C.props.swiperRef = d, C.props.swiperSlideIndex = R;
|
|
15815
15815
|
}), N);
|
|
15816
15816
|
}
|
|
15817
15817
|
return () => {
|
|
@@ -16096,8 +16096,8 @@ function Scrollbar({
|
|
|
16096
16096
|
dragEl: E,
|
|
16097
16097
|
el: L
|
|
16098
16098
|
} = w, $ = e.params.scrollbar, D = e.params.loop ? e.progressLoop : e.progress;
|
|
16099
|
-
let
|
|
16100
|
-
M ? (B = -B, B > 0 ? (
|
|
16099
|
+
let A = c, B = (d - c) * D;
|
|
16100
|
+
M ? (B = -B, B > 0 ? (A = c - B, B = 0) : -B + c > d && (A = d + B)) : B < 0 ? (A = c + B, B = 0) : B + c > d && (A = d - B), e.isHorizontal() ? (E.style.transform = `translate3d(${B}px, 0, 0)`, E.style.width = `${A}px`) : (E.style.transform = `translate3d(0px, ${B}px, 0)`, E.style.height = `${A}px`), $.hide && (clearTimeout(o), L.style.opacity = 1, o = setTimeout(() => {
|
|
16101
16101
|
L.style.opacity = 0, L.style.transitionDuration = "400ms";
|
|
16102
16102
|
}, 1e3));
|
|
16103
16103
|
}
|
|
@@ -16169,13 +16169,13 @@ function Scrollbar({
|
|
|
16169
16169
|
const $ = L, D = E.passiveListeners ? {
|
|
16170
16170
|
passive: !1,
|
|
16171
16171
|
capture: !1
|
|
16172
|
-
} : !1,
|
|
16172
|
+
} : !1, A = E.passiveListeners ? {
|
|
16173
16173
|
passive: !0,
|
|
16174
16174
|
capture: !1
|
|
16175
16175
|
} : !1;
|
|
16176
16176
|
if (!$) return;
|
|
16177
16177
|
const B = w === "on" ? "addEventListener" : "removeEventListener";
|
|
16178
|
-
$[B]("pointerdown", k, D), a[B]("pointermove", _, D), a[B]("pointerup", b,
|
|
16178
|
+
$[B]("pointerdown", k, D), a[B]("pointermove", _, D), a[B]("pointerup", b, A);
|
|
16179
16179
|
}
|
|
16180
16180
|
function V() {
|
|
16181
16181
|
!e.params.scrollbar.el || !e.scrollbar.el || S("on");
|
|
@@ -16233,13 +16233,13 @@ function Scrollbar({
|
|
|
16233
16233
|
}), t("destroy", () => {
|
|
16234
16234
|
C();
|
|
16235
16235
|
});
|
|
16236
|
-
const
|
|
16236
|
+
const R = () => {
|
|
16237
16237
|
e.el.classList.remove(...classesToTokens(e.params.scrollbar.scrollbarDisabledClass)), e.scrollbar.el && e.scrollbar.el.classList.remove(...classesToTokens(e.params.scrollbar.scrollbarDisabledClass)), N(), p(), f();
|
|
16238
16238
|
}, I = () => {
|
|
16239
16239
|
e.el.classList.add(...classesToTokens(e.params.scrollbar.scrollbarDisabledClass)), e.scrollbar.el && e.scrollbar.el.classList.add(...classesToTokens(e.params.scrollbar.scrollbarDisabledClass)), C();
|
|
16240
16240
|
};
|
|
16241
16241
|
Object.assign(e.scrollbar, {
|
|
16242
|
-
enable:
|
|
16242
|
+
enable: R,
|
|
16243
16243
|
disable: I,
|
|
16244
16244
|
updateSize: p,
|
|
16245
16245
|
setTranslate: f,
|
|
@@ -16294,28 +16294,28 @@ function A11y({
|
|
|
16294
16294
|
});
|
|
16295
16295
|
}
|
|
16296
16296
|
function u($, D) {
|
|
16297
|
-
$ = makeElementsArray($), $.forEach((
|
|
16298
|
-
|
|
16297
|
+
$ = makeElementsArray($), $.forEach((A) => {
|
|
16298
|
+
A.setAttribute("role", D);
|
|
16299
16299
|
});
|
|
16300
16300
|
}
|
|
16301
16301
|
function f($, D) {
|
|
16302
|
-
$ = makeElementsArray($), $.forEach((
|
|
16303
|
-
|
|
16302
|
+
$ = makeElementsArray($), $.forEach((A) => {
|
|
16303
|
+
A.setAttribute("aria-roledescription", D);
|
|
16304
16304
|
});
|
|
16305
16305
|
}
|
|
16306
16306
|
function m($, D) {
|
|
16307
|
-
$ = makeElementsArray($), $.forEach((
|
|
16308
|
-
|
|
16307
|
+
$ = makeElementsArray($), $.forEach((A) => {
|
|
16308
|
+
A.setAttribute("aria-label", D);
|
|
16309
16309
|
});
|
|
16310
16310
|
}
|
|
16311
16311
|
function p($, D) {
|
|
16312
|
-
$ = makeElementsArray($), $.forEach((
|
|
16313
|
-
|
|
16312
|
+
$ = makeElementsArray($), $.forEach((A) => {
|
|
16313
|
+
A.setAttribute("id", D);
|
|
16314
16314
|
});
|
|
16315
16315
|
}
|
|
16316
16316
|
function g($, D) {
|
|
16317
|
-
$ = makeElementsArray($), $.forEach((
|
|
16318
|
-
|
|
16317
|
+
$ = makeElementsArray($), $.forEach((A) => {
|
|
16318
|
+
A.setAttribute("aria-live", D);
|
|
16319
16319
|
});
|
|
16320
16320
|
}
|
|
16321
16321
|
function v($) {
|
|
@@ -16330,13 +16330,13 @@ function A11y({
|
|
|
16330
16330
|
}
|
|
16331
16331
|
function _($) {
|
|
16332
16332
|
if ($.keyCode !== 13 && $.keyCode !== 32) return;
|
|
16333
|
-
const D = e.params.a11y,
|
|
16334
|
-
if (!(e.pagination && e.pagination.el && (
|
|
16333
|
+
const D = e.params.a11y, A = $.target;
|
|
16334
|
+
if (!(e.pagination && e.pagination.el && (A === e.pagination.el || e.pagination.el.contains($.target)) && !$.target.matches(classesToSelector(e.params.pagination.bulletClass)))) {
|
|
16335
16335
|
if (e.navigation && e.navigation.prevEl && e.navigation.nextEl) {
|
|
16336
16336
|
const B = makeElementsArray(e.navigation.prevEl);
|
|
16337
|
-
makeElementsArray(e.navigation.nextEl).includes(
|
|
16337
|
+
makeElementsArray(e.navigation.nextEl).includes(A) && (e.isEnd && !e.params.loop || e.slideNext(), e.isEnd ? i(D.lastSlideMessage) : i(D.nextSlideMessage)), B.includes(A) && (e.isBeginning && !e.params.loop || e.slidePrev(), e.isBeginning ? i(D.firstSlideMessage) : i(D.prevSlideMessage));
|
|
16338
16338
|
}
|
|
16339
|
-
e.pagination &&
|
|
16339
|
+
e.pagination && A.matches(classesToSelector(e.params.pagination.bulletClass)) && A.click();
|
|
16340
16340
|
}
|
|
16341
16341
|
}
|
|
16342
16342
|
function b() {
|
|
@@ -16359,11 +16359,11 @@ function A11y({
|
|
|
16359
16359
|
e.params.pagination.clickable && (c(D), e.params.pagination.renderBullet || (u(D, "button"), m(D, $.paginationBulletMessage.replace(/\{\{index\}\}/, elementIndex(D) + 1)))), D.matches(classesToSelector(e.params.pagination.bulletActiveClass)) ? D.setAttribute("aria-current", "true") : D.removeAttribute("aria-current");
|
|
16360
16360
|
});
|
|
16361
16361
|
}
|
|
16362
|
-
const N = ($, D,
|
|
16363
|
-
c($), $.tagName !== "BUTTON" && (u($, "button"), $.addEventListener("keydown", _)), m($,
|
|
16362
|
+
const N = ($, D, A) => {
|
|
16363
|
+
c($), $.tagName !== "BUTTON" && (u($, "button"), $.addEventListener("keydown", _)), m($, A);
|
|
16364
16364
|
}, C = ($) => {
|
|
16365
16365
|
r && r !== $.target && !r.contains($.target) && (a = !0), e.a11y.clicked = !0;
|
|
16366
|
-
},
|
|
16366
|
+
}, R = () => {
|
|
16367
16367
|
a = !1, requestAnimationFrame(() => {
|
|
16368
16368
|
requestAnimationFrame(() => {
|
|
16369
16369
|
e.destroyed || (e.a11y.clicked = !1);
|
|
@@ -16376,36 +16376,36 @@ function A11y({
|
|
|
16376
16376
|
const D = $.target.closest(`.${e.params.slideClass}, swiper-slide`);
|
|
16377
16377
|
if (!D || !e.slides.includes(D)) return;
|
|
16378
16378
|
r = D;
|
|
16379
|
-
const
|
|
16380
|
-
B ||
|
|
16381
|
-
a || (e.params.loop ? e.slideToLoop(e.getSlideIndexWhenGrid(parseInt(D.getAttribute("data-swiper-slide-index"))), 0) :
|
|
16379
|
+
const A = e.virtual && e.params.virtual.enabled, B = (A ? parseInt(D.getAttribute("data-swiper-slide-index"), 10) : e.slides.indexOf(D)) === e.activeIndex, O = e.params.watchSlidesProgress && e.visibleSlides && e.visibleSlides.includes(D);
|
|
16380
|
+
B || O || $.sourceCapabilities && $.sourceCapabilities.firesTouchEvents || (e.isHorizontal() ? e.el.scrollLeft = 0 : e.el.scrollTop = 0, requestAnimationFrame(() => {
|
|
16381
|
+
a || (e.params.loop ? e.slideToLoop(e.getSlideIndexWhenGrid(parseInt(D.getAttribute("data-swiper-slide-index"))), 0) : A ? e.slideTo(e.getSlideIndexWhenGrid(parseInt(D.getAttribute("data-swiper-slide-index"), 10)), 0) : e.slideTo(e.getSlideIndexWhenGrid(e.slides.indexOf(D)), 0), a = !1);
|
|
16382
16382
|
}));
|
|
16383
16383
|
}, M = () => {
|
|
16384
16384
|
const $ = e.params.a11y;
|
|
16385
16385
|
$.itemRoleDescriptionMessage && f(e.slides, $.itemRoleDescriptionMessage), $.slideRole && u(e.slides, $.slideRole);
|
|
16386
16386
|
const D = e.slides.length;
|
|
16387
|
-
$.slideLabelMessage && e.slides.forEach((
|
|
16388
|
-
const
|
|
16389
|
-
m(
|
|
16387
|
+
$.slideLabelMessage && e.slides.forEach((A, B) => {
|
|
16388
|
+
const O = e.params.loop ? parseInt(A.getAttribute("data-swiper-slide-index"), 10) : B, P = $.slideLabelMessage.replace(/\{\{index\}\}/, O + 1).replace(/\{\{slidesLength\}\}/, D);
|
|
16389
|
+
m(A, P);
|
|
16390
16390
|
});
|
|
16391
16391
|
}, E = () => {
|
|
16392
16392
|
const $ = e.params.a11y;
|
|
16393
16393
|
e.el.append(s);
|
|
16394
16394
|
const D = e.el;
|
|
16395
16395
|
$.containerRoleDescriptionMessage && f(D, $.containerRoleDescriptionMessage), $.containerMessage && m(D, $.containerMessage), $.containerRole && u(D, $.containerRole);
|
|
16396
|
-
const
|
|
16397
|
-
if (p(
|
|
16396
|
+
const A = e.wrapperEl, B = $.id || A.getAttribute("id") || `swiper-wrapper-${l(16)}`;
|
|
16397
|
+
if (p(A, B), $.wrapperLiveRegion) {
|
|
16398
16398
|
const U = e.params.autoplay && e.params.autoplay.enabled ? "off" : "polite";
|
|
16399
|
-
g(
|
|
16399
|
+
g(A, U);
|
|
16400
16400
|
}
|
|
16401
16401
|
M();
|
|
16402
16402
|
let {
|
|
16403
|
-
nextEl:
|
|
16404
|
-
prevEl:
|
|
16403
|
+
nextEl: O,
|
|
16404
|
+
prevEl: P
|
|
16405
16405
|
} = e.navigation ? e.navigation : {};
|
|
16406
|
-
|
|
16406
|
+
O = makeElementsArray(O), P = makeElementsArray(P), O && O.forEach((U) => N(U, B, $.nextSlideMessage)), P && P.forEach((U) => N(U, B, $.prevSlideMessage)), V() && makeElementsArray(e.pagination.el).forEach((Q) => {
|
|
16407
16407
|
Q.addEventListener("keydown", _);
|
|
16408
|
-
}), getDocument().addEventListener("visibilitychange", I), e.el.addEventListener("focus", w, !0), e.el.addEventListener("pointerdown", C, !0), e.el.addEventListener("pointerup",
|
|
16408
|
+
}), getDocument().addEventListener("visibilitychange", I), e.el.addEventListener("focus", w, !0), e.el.addEventListener("pointerdown", C, !0), e.el.addEventListener("pointerup", R, !0);
|
|
16409
16409
|
};
|
|
16410
16410
|
function L() {
|
|
16411
16411
|
s && s.remove();
|
|
@@ -16413,9 +16413,9 @@ function A11y({
|
|
|
16413
16413
|
nextEl: $,
|
|
16414
16414
|
prevEl: D
|
|
16415
16415
|
} = e.navigation ? e.navigation : {};
|
|
16416
|
-
$ = makeElementsArray($), D = makeElementsArray(D), $ && $.forEach((B) => B.removeEventListener("keydown", _)), D && D.forEach((B) => B.removeEventListener("keydown", _)), V() && makeElementsArray(e.pagination.el).forEach((
|
|
16417
|
-
|
|
16418
|
-
}), getDocument().removeEventListener("visibilitychange", I), e.el && typeof e.el != "string" && (e.el.removeEventListener("focus", w, !0), e.el.removeEventListener("pointerdown", C, !0), e.el.removeEventListener("pointerup",
|
|
16416
|
+
$ = makeElementsArray($), D = makeElementsArray(D), $ && $.forEach((B) => B.removeEventListener("keydown", _)), D && D.forEach((B) => B.removeEventListener("keydown", _)), V() && makeElementsArray(e.pagination.el).forEach((O) => {
|
|
16417
|
+
O.removeEventListener("keydown", _);
|
|
16418
|
+
}), getDocument().removeEventListener("visibilitychange", I), e.el && typeof e.el != "string" && (e.el.removeEventListener("focus", w, !0), e.el.removeEventListener("pointerdown", C, !0), e.el.removeEventListener("pointerup", R, !0));
|
|
16419
16419
|
}
|
|
16420
16420
|
t("beforeInit", () => {
|
|
16421
16421
|
s = createElement("span", e.params.a11y.notificationClass), s.setAttribute("aria-live", "assertive"), s.setAttribute("aria-atomic", "true");
|
|
@@ -19017,8 +19017,8 @@ function setup(e) {
|
|
|
19017
19017
|
S++;
|
|
19018
19018
|
const C = t.formatters[N];
|
|
19019
19019
|
if (typeof C == "function") {
|
|
19020
|
-
const
|
|
19021
|
-
T = C.call(k,
|
|
19020
|
+
const R = v[S];
|
|
19021
|
+
T = C.call(k, R), v.splice(S, 1), S--;
|
|
19022
19022
|
}
|
|
19023
19023
|
return T;
|
|
19024
19024
|
}), t.formatArgs.call(k, v), (k.log || t.log).apply(k, v);
|
|
@@ -19300,10 +19300,10 @@ var functionNamesExports = functionNames.exports;
|
|
|
19300
19300
|
Array.isArray(b.acceptableStates) && !b.acceptableStates.includes(S) ? new Promise((T) => {
|
|
19301
19301
|
const N = () => {
|
|
19302
19302
|
const C = _.getPlayerState();
|
|
19303
|
-
let
|
|
19304
|
-
typeof b.timeout == "number" && (
|
|
19303
|
+
let R;
|
|
19304
|
+
typeof b.timeout == "number" && (R = setTimeout(() => {
|
|
19305
19305
|
_.removeEventListener("onStateChange", N), T();
|
|
19306
|
-
}, b.timeout)), Array.isArray(b.acceptableStates) && b.acceptableStates.includes(C) && (_.removeEventListener("onStateChange", N), clearTimeout(
|
|
19306
|
+
}, b.timeout)), Array.isArray(b.acceptableStates) && b.acceptableStates.includes(C) && (_.removeEventListener("onStateChange", N), clearTimeout(R), T());
|
|
19307
19307
|
};
|
|
19308
19308
|
_.addEventListener("onStateChange", N);
|
|
19309
19309
|
}).then(() => V) : V;
|
|
@@ -27483,10 +27483,10 @@ const _hoisted_1$r = {
|
|
|
27483
27483
|
size: "sm"
|
|
27484
27484
|
}),
|
|
27485
27485
|
withDirectives(createElementVNode("ul", mergeProps(_(), toHandlers(b(), !0), { class: "vs-autocomplete__list" }), [
|
|
27486
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(r.value, (C,
|
|
27486
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(r.value, (C, R) => (openBlock(), createElementBlock("li", mergeProps({
|
|
27487
27487
|
key: C.id
|
|
27488
|
-
}, { ref_for: !0 }, S({ item: C, index:
|
|
27489
|
-
class: ["vs-autocomplete__list-item", { "vs-autocomplete__list-item--hover": v ===
|
|
27488
|
+
}, { ref_for: !0 }, S({ item: C, index: R }), toHandlers(V({ item: C, index: R }), !0), {
|
|
27489
|
+
class: ["vs-autocomplete__list-item", { "vs-autocomplete__list-item--hover": v === R }]
|
|
27490
27490
|
}), toDisplayString(C[c.value]), 17))), 128))
|
|
27491
27491
|
], 16), [
|
|
27492
27492
|
[vShow, k]
|
|
@@ -27758,27 +27758,27 @@ const _hoisted_1$r = {
|
|
|
27758
27758
|
}
|
|
27759
27759
|
return "https://www.visitscotland.com";
|
|
27760
27760
|
}), m = computed$1(() => `${f.value}${u.value ? "/" + u.value : ""}${l.value}/search-results`), g = "https://www.visitscotland.com/data/locations" + `?locale=${u.value}`, v = ref([]), k = "https://www.visitscotland.com/tms-api/v1/attractions", _ = ref([]), b = "https://www.visitscotland.com/tms-api/v1/origins?active=1", S = ref([]), V = ref([]), T = () => {
|
|
27761
|
-
const B = getProductTypes(),
|
|
27762
|
-
B.forEach((
|
|
27763
|
-
|
|
27764
|
-
}), V.value =
|
|
27765
|
-
}, N = computed$1(() => t.value ? [] : V.value.map((
|
|
27766
|
-
...
|
|
27767
|
-
text: getProductName(
|
|
27761
|
+
const B = getProductTypes(), O = [];
|
|
27762
|
+
B.forEach((P) => {
|
|
27763
|
+
O.push(P);
|
|
27764
|
+
}), V.value = O;
|
|
27765
|
+
}, N = computed$1(() => t.value ? [] : V.value.map((O) => ({
|
|
27766
|
+
...O,
|
|
27767
|
+
text: getProductName(O.value, O.text)
|
|
27768
27768
|
}))), C = async () => {
|
|
27769
27769
|
const B = await getData(g);
|
|
27770
27770
|
B && (v.value = B.data);
|
|
27771
|
-
},
|
|
27771
|
+
}, R = async () => {
|
|
27772
27772
|
const B = await getData(b);
|
|
27773
27773
|
B && (S.value = B.data);
|
|
27774
27774
|
}, I = async () => {
|
|
27775
27775
|
const B = await getData(k);
|
|
27776
27776
|
B && (_.value = B.data);
|
|
27777
|
-
}, w = (B,
|
|
27778
|
-
|
|
27777
|
+
}, w = (B, O) => {
|
|
27778
|
+
O === "key" ? r.value = v.value.find((P) => P.key === B) : O === "id" ? r.value = v.value.find((P) => P.id === B) : r.value = v.value.find((P) => P.name === B.trim());
|
|
27779
27779
|
}, M = (B) => {
|
|
27780
|
-
const
|
|
27781
|
-
s.value =
|
|
27780
|
+
const O = B.value;
|
|
27781
|
+
s.value = O, O === "tour" && (R(), I());
|
|
27782
27782
|
}, E = () => d[n.defaultLocale] || "", L = () => {
|
|
27783
27783
|
t.value = !0, nextTick$1(() => {
|
|
27784
27784
|
t.value = !1, n.defaultLocation !== "" && c && w(n.defaultLocation, "id");
|
|
@@ -27789,19 +27789,19 @@ const _hoisted_1$r = {
|
|
|
27789
27789
|
const B = document.createElement("script");
|
|
27790
27790
|
B.async = !1, B.onload = L, B.setAttribute("src", `https://www.visitscotland.com/${E().localeUrl}/data/template/search.js`), document.head.appendChild(B);
|
|
27791
27791
|
}), onMounted(async () => {
|
|
27792
|
-
C(), c.value = !0, s.value = n.defaultProd, s.value === "tour" && (
|
|
27792
|
+
C(), c.value = !0, s.value = n.defaultProd, s.value === "tour" && (R(), I()), T();
|
|
27793
27793
|
});
|
|
27794
27794
|
const D = (B) => {
|
|
27795
27795
|
o.value = B ? "on" : "off";
|
|
27796
|
-
},
|
|
27796
|
+
}, A = (B) => {
|
|
27797
27797
|
i.value = !0;
|
|
27798
|
-
const
|
|
27798
|
+
const O = B.currentTarget;
|
|
27799
27799
|
setTimeout(function() {
|
|
27800
|
-
|
|
27800
|
+
O.submit();
|
|
27801
27801
|
}, 500);
|
|
27802
27802
|
};
|
|
27803
|
-
return (B,
|
|
27804
|
-
var
|
|
27803
|
+
return (B, O) => {
|
|
27804
|
+
var P, H, U, Q, ne, Y;
|
|
27805
27805
|
return openBlock(), createElementBlock("div", _hoisted_1$o, [
|
|
27806
27806
|
t.value ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", _hoisted_2$i, [
|
|
27807
27807
|
createElementVNode("div", _hoisted_3$c, [
|
|
@@ -27809,7 +27809,7 @@ const _hoisted_1$r = {
|
|
|
27809
27809
|
unref(c) ? (openBlock(), createElementBlock("form", {
|
|
27810
27810
|
key: 0,
|
|
27811
27811
|
action: m.value,
|
|
27812
|
-
onSubmit: withModifiers(
|
|
27812
|
+
onSubmit: withModifiers(A, ["prevent"]),
|
|
27813
27813
|
"accept-charset": "UTF-8",
|
|
27814
27814
|
"data-test": "psw-form"
|
|
27815
27815
|
}, [
|
|
@@ -27821,7 +27821,7 @@ const _hoisted_1$r = {
|
|
|
27821
27821
|
createVNode(VsSelect, {
|
|
27822
27822
|
options: N.value,
|
|
27823
27823
|
value: e.defaultProd,
|
|
27824
|
-
onUpdated:
|
|
27824
|
+
onUpdated: O[0] || (O[0] = (X) => M(X)),
|
|
27825
27825
|
"field-name": "prodtypes"
|
|
27826
27826
|
}, null, 8, ["options", "value"]),
|
|
27827
27827
|
createElementVNode("div", _hoisted_8$6, toDisplayString(unref(getLabelText)("in", "in")), 1)
|
|
@@ -27837,7 +27837,7 @@ const _hoisted_1$r = {
|
|
|
27837
27837
|
options: v.value,
|
|
27838
27838
|
placeholder: unref(getLabelText)("location_placeholder", "Enter a location"),
|
|
27839
27839
|
"track-by": "name",
|
|
27840
|
-
onChangeValue:
|
|
27840
|
+
onChangeValue: O[1] || (O[1] = (X) => w(X)),
|
|
27841
27841
|
"default-val": unref(r),
|
|
27842
27842
|
"data-chromatic": "ignore"
|
|
27843
27843
|
}, null, 8, ["label", "options", "placeholder", "default-val"])) : createCommentVNode("", !0),
|
|
@@ -27845,7 +27845,7 @@ const _hoisted_1$r = {
|
|
|
27845
27845
|
key: 1,
|
|
27846
27846
|
type: "hidden",
|
|
27847
27847
|
name: "locplace",
|
|
27848
|
-
disabled: ((
|
|
27848
|
+
disabled: ((P = unref(r)) == null ? void 0 : P.type) === "POLYGON",
|
|
27849
27849
|
value: ((H = unref(r)) == null ? void 0 : H.key) || ""
|
|
27850
27850
|
}, null, 8, _hoisted_10$5)) : createCommentVNode("", !0),
|
|
27851
27851
|
s.value !== "tour" ? (openBlock(), createElementBlock("input", {
|
|
@@ -27859,14 +27859,14 @@ const _hoisted_1$r = {
|
|
|
27859
27859
|
key: 3,
|
|
27860
27860
|
type: "hidden",
|
|
27861
27861
|
name: "locprox",
|
|
27862
|
-
value: ((
|
|
27862
|
+
value: ((ne = unref(r)) == null ? void 0 : ne.type) === "DISTRICT" ? 1 : 0
|
|
27863
27863
|
}, null, 8, _hoisted_12$2)) : createCommentVNode("", !0),
|
|
27864
27864
|
s.value !== "tour" && ((Y = unref(r)) == null ? void 0 : Y.type) === "DISTRICT" ? (openBlock(), createElementBlock("input", _hoisted_13$2)) : createCommentVNode("", !0),
|
|
27865
27865
|
s.value === "even" ? (openBlock(), createElementBlock("div", _hoisted_14$1, [
|
|
27866
27866
|
createVNode(_sfc_main$z, {
|
|
27867
27867
|
"start-label": unref(getLabelText)("startdate", "Start Date", "dates"),
|
|
27868
27868
|
"end-label": unref(getLabelText)("enddate", "End Date", "dates"),
|
|
27869
|
-
onDateUpdated:
|
|
27869
|
+
onDateUpdated: O[2] || (O[2] = (X) => D(X)),
|
|
27870
27870
|
"default-dates": i.value,
|
|
27871
27871
|
"selected-prod": s.value
|
|
27872
27872
|
}, null, 8, ["start-label", "end-label", "default-dates", "selected-prod"]),
|
|
@@ -27879,7 +27879,7 @@ const _hoisted_1$r = {
|
|
|
27879
27879
|
}, null, 8, ["placeholder"])
|
|
27880
27880
|
])) : createCommentVNode("", !0)
|
|
27881
27881
|
])) : createCommentVNode("", !0),
|
|
27882
|
-
s.value === "acco" ? (openBlock(), createElementBlock("div", _hoisted_17$1, [...
|
|
27882
|
+
s.value === "acco" ? (openBlock(), createElementBlock("div", _hoisted_17$1, [...O[4] || (O[4] = [
|
|
27883
27883
|
createElementVNode("input", {
|
|
27884
27884
|
hidden: "true",
|
|
27885
27885
|
name: "avail",
|
|
@@ -27898,10 +27898,10 @@ const _hoisted_1$r = {
|
|
|
27898
27898
|
"track-by": "name",
|
|
27899
27899
|
"is-tour-location": !0
|
|
27900
27900
|
}, null, 8, ["label", "options", "placeholder"]),
|
|
27901
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(a.value, (
|
|
27901
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(a.value, (X) => (openBlock(), createElementBlock("input", {
|
|
27902
27902
|
type: "hidden",
|
|
27903
27903
|
name: "attractions[]",
|
|
27904
|
-
value:
|
|
27904
|
+
value: X
|
|
27905
27905
|
}, null, 8, _hoisted_19))), 256)),
|
|
27906
27906
|
createVNode(_sfc_main$B, {
|
|
27907
27907
|
id: "tour-month",
|
|
@@ -27917,7 +27917,7 @@ const _hoisted_1$r = {
|
|
|
27917
27917
|
class: "mt-150",
|
|
27918
27918
|
"data-test": "psw-submit",
|
|
27919
27919
|
type: "submit",
|
|
27920
|
-
onClick:
|
|
27920
|
+
onClick: O[3] || (O[3] = (X) => B.trackSubmit(s.value, typeof unref(r) > "u" ? "" : unref(r)))
|
|
27921
27921
|
}, {
|
|
27922
27922
|
default: withCtx(() => [
|
|
27923
27923
|
createTextVNode(toDisplayString(unref(getLabelText)("search", "Search")), 1)
|
|
@@ -31578,10 +31578,10 @@ async function cludoAutocomplete(e, n) {
|
|
|
31578
31578
|
}
|
|
31579
31579
|
}
|
|
31580
31580
|
const useFederatedSearchStore = defineStore("federatedSearch", () => {
|
|
31581
|
-
const e = ref(null), n = ref(void 0), t = ref(!1), s = ref(1), a = ref(void 0), r = ref(!1), o = ref(!1), i = ref(null), l = ref(""), c = ref(null), d = ref(null), u = ref([]), f = ref([]), m = ref(void 0), p = ref(void 0), g = ref(void 0), v = ref(!1), k = ref(""), _ = ref(""), b = ref(void 0), S = ref(void 0), V = ref(void 0), T = ref(-1), N = ref(""), C = ref(""),
|
|
31581
|
+
const e = ref(null), n = ref(void 0), t = ref(!1), s = ref(1), a = ref(void 0), r = ref(!1), o = ref(!1), i = ref(null), l = ref(""), c = ref(null), d = ref(null), u = ref([]), f = ref([]), m = ref(void 0), p = ref(void 0), g = ref(void 0), v = ref(!1), k = ref(""), _ = ref(""), b = ref(void 0), S = ref(void 0), V = ref(void 0), T = ref(-1), N = ref(""), C = ref(""), R = ref(""), I = ref(0), w = ref(""), M = ref("or");
|
|
31582
31582
|
async function E(D = !1) {
|
|
31583
31583
|
o.value = !0, D || (T.value += 1);
|
|
31584
|
-
const
|
|
31584
|
+
const A = await cludoSearch(
|
|
31585
31585
|
l.value,
|
|
31586
31586
|
n.value,
|
|
31587
31587
|
s.value,
|
|
@@ -31599,22 +31599,22 @@ const useFederatedSearchStore = defineStore("federatedSearch", () => {
|
|
|
31599
31599
|
b.value,
|
|
31600
31600
|
V.value,
|
|
31601
31601
|
C.value,
|
|
31602
|
-
|
|
31602
|
+
R.value,
|
|
31603
31603
|
I.value,
|
|
31604
31604
|
w.value
|
|
31605
31605
|
);
|
|
31606
|
-
i.value = [...
|
|
31606
|
+
i.value = [...A.results, ...B.results], p.value = A.totalResults, g.value = B.totalResults, m.value = A.totalResults + B.totalResults, o.value = !1;
|
|
31607
31607
|
}
|
|
31608
31608
|
async function L() {
|
|
31609
31609
|
return cludoAutocomplete(l.value, n.value);
|
|
31610
31610
|
}
|
|
31611
|
-
async function $(D,
|
|
31611
|
+
async function $(D, A) {
|
|
31612
31612
|
const B = new URL(window.location.href);
|
|
31613
|
-
if (
|
|
31613
|
+
if (A ? N.value = "Autosuggestion" : N.value = "User input", l.value ? B.searchParams.set("search-term", l.value) : B.searchParams.delete("search-term"), d.value ? B.searchParams.set("category", encodeURIComponent(d.value)) : B.searchParams.delete("category"), f.value.length > 0 ? B.searchParams.set("sub-category", encodeURIComponent(f.value.join(","))) : B.searchParams.delete("sub-category"), D ? (s.value = 1, B.searchParams.set("page", s.value.toString())) : s.value && s.value > 1 ? B.searchParams.set("page", s.value.toString()) : B.searchParams.delete("page"), k.value ? B.searchParams.set("start-date", k.value) : B.searchParams.delete("start-date"), _.value ? B.searchParams.set("end-date", _.value) : B.searchParams.delete("end-date"), b.value ? B.searchParams.set("sort-by", b.value) : B.searchParams.delete("sort-by"), !v.value)
|
|
31614
31614
|
window.history.pushState({}, "", B), await E();
|
|
31615
31615
|
else {
|
|
31616
|
-
const
|
|
31617
|
-
window.location.href =
|
|
31616
|
+
const O = `${S.value}/${B.search}`;
|
|
31617
|
+
window.location.href = O;
|
|
31618
31618
|
}
|
|
31619
31619
|
}
|
|
31620
31620
|
return {
|
|
@@ -31646,7 +31646,7 @@ const useFederatedSearchStore = defineStore("federatedSearch", () => {
|
|
|
31646
31646
|
searchInSessionCount: T,
|
|
31647
31647
|
queryInput: N,
|
|
31648
31648
|
postcode: C,
|
|
31649
|
-
location:
|
|
31649
|
+
location: R,
|
|
31650
31650
|
radius: I,
|
|
31651
31651
|
postcodeareas: w,
|
|
31652
31652
|
cludoApiOperator: M
|
|
@@ -33035,7 +33035,8 @@ const useGoogleMapStore = defineStore("googleMap", () => {
|
|
|
33035
33035
|
}, 1032, ["icon", "variant", "onClick"]))
|
|
33036
33036
|
], 64))), 128))
|
|
33037
33037
|
]),
|
|
33038
|
-
|
|
33038
|
+
s.value ? (openBlock(), createBlock(VsDetail, {
|
|
33039
|
+
key: 0,
|
|
33039
33040
|
class: "vs-map-sidebar__sub-filter-header",
|
|
33040
33041
|
color: "secondary",
|
|
33041
33042
|
size: "small"
|
|
@@ -33044,7 +33045,7 @@ const useGoogleMapStore = defineStore("googleMap", () => {
|
|
|
33044
33045
|
createTextVNode(toDisplayString(t.sidebarLabels.subFilterHeaderLabel), 1)
|
|
33045
33046
|
]),
|
|
33046
33047
|
_: 1
|
|
33047
|
-
}),
|
|
33048
|
+
})) : createCommentVNode("", !0),
|
|
33048
33049
|
createElementVNode("div", _hoisted_6$1, [
|
|
33049
33050
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(s.value, (l, c) => (openBlock(), createBlock(VsButton, {
|
|
33050
33051
|
key: c,
|
|
@@ -33384,32 +33385,32 @@ const _hoisted_1 = { class: "vs-map" }, _hoisted_2 = { class: "vs-map__controls"
|
|
|
33384
33385
|
}
|
|
33385
33386
|
},
|
|
33386
33387
|
setup(e) {
|
|
33387
|
-
const n = dataLayerComposable(), t = e, s = t.categoryLabels.find((
|
|
33388
|
+
const n = dataLayerComposable(), t = e, s = t.categoryLabels.find((F) => F.id === "destinations"), a = s ? s.subCategory : null, r = computed$1(() => t.featuredPlaces.filter((F) => F.properties.category.id === P.selectedDestinationType));
|
|
33388
33389
|
provide("featuredPlaces", {
|
|
33389
33390
|
categories: a,
|
|
33390
33391
|
places: r
|
|
33391
|
-
}), provide("onFeaturedLocationClick",
|
|
33392
|
+
}), provide("onFeaturedLocationClick", Ee), provide("addDestinationMarkers", ke);
|
|
33392
33393
|
let o, i, l, c, d, u, f, m, p, g, v = {}, k;
|
|
33393
|
-
const _ = ref(), b = ref(/* @__PURE__ */ new Set()), S = ref(), V = ref(/* @__PURE__ */ new Set()), T = ref(/* @__PURE__ */ new Set()), N = ref(/* @__PURE__ */ new Set()), C = ref(/* @__PURE__ */ new Set()),
|
|
33394
|
-
const
|
|
33394
|
+
const _ = ref(), b = ref(/* @__PURE__ */ new Set()), S = ref(), V = ref(/* @__PURE__ */ new Set()), T = ref(/* @__PURE__ */ new Set()), N = ref(/* @__PURE__ */ new Set()), C = ref(/* @__PURE__ */ new Set()), R = ref(), I = ref(), w = ref(t.zoom), M = ref(!1), E = ref(), L = ref(/* @__PURE__ */ new Set()), $ = ref(), D = ref(!1), A = ref(void 0), B = ref(!1), O = computed$1(() => {
|
|
33395
|
+
const F = /* @__PURE__ */ new Map(), z = Y[_.value].subCategory;
|
|
33395
33396
|
return Object.values(z).forEach((q) => {
|
|
33396
|
-
|
|
33397
|
+
F.set(q.id, {
|
|
33397
33398
|
includedTypes: q.includedType,
|
|
33398
33399
|
excludedTypes: q.excludedType
|
|
33399
33400
|
});
|
|
33400
|
-
}),
|
|
33401
|
-
}),
|
|
33401
|
+
}), F;
|
|
33402
|
+
}), P = useGoogleMapStore(), H = ref(void 0);
|
|
33402
33403
|
let U;
|
|
33403
|
-
const Q = ref(void 0),
|
|
33404
|
+
const Q = ref(void 0), ne = {
|
|
33404
33405
|
north: 61.3,
|
|
33405
33406
|
south: 54.6,
|
|
33406
33407
|
west: -8.7,
|
|
33407
33408
|
east: 2
|
|
33408
33409
|
};
|
|
33409
33410
|
let Y = {};
|
|
33410
|
-
const
|
|
33411
|
+
const X = t.categoryLabels;
|
|
33411
33412
|
let ee = 0;
|
|
33412
|
-
const
|
|
33413
|
+
const ce = {
|
|
33413
33414
|
headerLabel: t.labels.heading,
|
|
33414
33415
|
closeSidebarButtonLabel: t.labels.closeSidebarBtn,
|
|
33415
33416
|
searchBarAriaLabel: t.labels.searchBarAriaLabel,
|
|
@@ -33422,20 +33423,20 @@ const _hoisted_1 = { class: "vs-map" }, _hoisted_2 = { class: "vs-map__controls"
|
|
|
33422
33423
|
openSidebarButtonLabel: t.labels.openSidebarButton,
|
|
33423
33424
|
locationSelectLabel: t.labels.locationSelect
|
|
33424
33425
|
}, {
|
|
33425
|
-
getViewport:
|
|
33426
|
-
hasViewportChanged:
|
|
33427
|
-
isProgrammaticMove:
|
|
33428
|
-
isUserMove:
|
|
33429
|
-
lastSearchViewport:
|
|
33430
|
-
runProgrammaticMove:
|
|
33431
|
-
showSearchAreaButton:
|
|
33426
|
+
getViewport: oe,
|
|
33427
|
+
hasViewportChanged: he,
|
|
33428
|
+
isProgrammaticMove: ie,
|
|
33429
|
+
isUserMove: de,
|
|
33430
|
+
lastSearchViewport: De,
|
|
33431
|
+
runProgrammaticMove: J,
|
|
33432
|
+
showSearchAreaButton: ue
|
|
33432
33433
|
} = useViewportController();
|
|
33433
33434
|
onBeforeMount(() => {
|
|
33434
|
-
const
|
|
33435
|
-
|
|
33435
|
+
const F = cookieCheckerComposable();
|
|
33436
|
+
F.requiredCookies.value = cookieValues$5.google_maps, U = computed$1(() => !F.cookiesAllowed.value && F.cookiesLoaded.value === !0 || !F.cookiesLoaded.value ? (Q.value = "noCookie", !0) : !1);
|
|
33436
33437
|
}), onMounted(async () => {
|
|
33437
33438
|
if (t.categoriesLocation && axios.get(t.categoriesLocation).then((z) => {
|
|
33438
|
-
Y = z.data,
|
|
33439
|
+
Y = z.data, A.value = z.data.accommodation.keywords;
|
|
33439
33440
|
}).catch(() => {
|
|
33440
33441
|
}), U.value === !1) {
|
|
33441
33442
|
setOptions({
|
|
@@ -33452,7 +33453,7 @@ const _hoisted_1 = { class: "vs-map" }, _hoisted_2 = { class: "vs-map__controls"
|
|
|
33452
33453
|
}
|
|
33453
33454
|
}
|
|
33454
33455
|
i = document.getElementById("vs-map"), l = document.getElementById("nearbySearch"), c = document.getElementById("textSearch"), d = document.querySelector("gmp-place-text-search-request"), u = document.querySelector("gmp-place-nearby-search-request"), f = document.querySelector("gmp-place-details"), m = document.getElementById("placeRequest"), p = document.getElementById("vs-map-search-input");
|
|
33455
|
-
async function
|
|
33456
|
+
async function F() {
|
|
33456
33457
|
try {
|
|
33457
33458
|
const z = {
|
|
33458
33459
|
center: {
|
|
@@ -33464,7 +33465,7 @@ const _hoisted_1 = { class: "vs-map" }, _hoisted_2 = { class: "vs-map__controls"
|
|
|
33464
33465
|
isFractionalZoomEnabled: !0,
|
|
33465
33466
|
mapId: t.mapId,
|
|
33466
33467
|
restriction: {
|
|
33467
|
-
latLngBounds:
|
|
33468
|
+
latLngBounds: ne
|
|
33468
33469
|
},
|
|
33469
33470
|
zoomControl: !0,
|
|
33470
33471
|
fullscreenControl: !1,
|
|
@@ -33474,31 +33475,31 @@ const _hoisted_1 = { class: "vs-map" }, _hoisted_2 = { class: "vs-map__controls"
|
|
|
33474
33475
|
gestureHandling: "greedy"
|
|
33475
33476
|
};
|
|
33476
33477
|
if (i)
|
|
33477
|
-
o = new google.maps.Map(i, z),
|
|
33478
|
+
o = new google.maps.Map(i, z), J(() => o.fitBounds(ne));
|
|
33478
33479
|
else
|
|
33479
33480
|
throw new Error("Init error, mapContainer undefined");
|
|
33480
33481
|
} catch (z) {
|
|
33481
33482
|
console.error("Maps init error", z.message);
|
|
33482
33483
|
}
|
|
33483
33484
|
g = new google.maps.InfoWindow(), g.addListener("closeclick", () => {
|
|
33484
|
-
|
|
33485
|
-
}),
|
|
33486
|
-
w.value = o.getZoom(), w.value < CATEGORY_VISIBLE_ZOOM ?
|
|
33485
|
+
pe("card_close", m.place);
|
|
33486
|
+
}), ye(), o.addListener("zoom_changed", () => {
|
|
33487
|
+
w.value = o.getZoom(), w.value < CATEGORY_VISIBLE_ZOOM ? ye() : ye(!0), de.value = !ie.value, w.value > 7 && !ie.value && de.value && (ue.value = !0);
|
|
33487
33488
|
}), o.addListener("dragstart", () => {
|
|
33488
|
-
|
|
33489
|
+
de.value = !0;
|
|
33489
33490
|
}), o.addListener("tilesloaded", () => {
|
|
33490
|
-
B.value || (B.value = !0,
|
|
33491
|
+
B.value || (B.value = !0, ke());
|
|
33491
33492
|
}), o.addListener("idle", () => {
|
|
33492
|
-
k =
|
|
33493
|
+
k = Me(), !ie.value && de.value && he(oe(o)) && (ue.value = !0, P.selectedDestinationType = "", de.value = !1);
|
|
33493
33494
|
}), l.addEventListener("gmp-select", ({ place: z }) => {
|
|
33494
|
-
v[z.id] &&
|
|
33495
|
+
v[z.id] && ve(z, v[z.id]);
|
|
33495
33496
|
}), c.addEventListener("gmp-select", ({ place: z }) => {
|
|
33496
|
-
v[z.id] &&
|
|
33497
|
+
v[z.id] && ve(z, v[z.id]);
|
|
33497
33498
|
});
|
|
33498
33499
|
}
|
|
33499
|
-
|
|
33500
|
+
P.firstInteraction = !1, P.searchesCount = 0, P.filterUsesCount = 0, U.value === !1 && await F();
|
|
33500
33501
|
});
|
|
33501
|
-
function
|
|
33502
|
+
function ye(F) {
|
|
33502
33503
|
const z = {
|
|
33503
33504
|
strokeColor: "#A3A3CC",
|
|
33504
33505
|
strokeOpacity: 1,
|
|
@@ -33564,45 +33565,42 @@ const _hoisted_1 = { class: "vs-map" }, _hoisted_2 = { class: "vs-map__controls"
|
|
|
33564
33565
|
"ChIJ6_ktdpMVvEgRJBv3ZEgxsD8"
|
|
33565
33566
|
// Faroe Islands
|
|
33566
33567
|
], W = o.getFeatureLayer(google.maps.FeatureType.COUNTRY), G = o.getFeatureLayer(google.maps.FeatureType.ADMINISTRATIVE_AREA_LEVEL_1);
|
|
33567
|
-
|
|
33568
|
-
if (j.includes(
|
|
33568
|
+
F ? (W.style = null, G.style = null, W.style = (Z) => {
|
|
33569
|
+
if (j.includes(Z.feature.placeId))
|
|
33569
33570
|
return z;
|
|
33570
|
-
}, G.style = (
|
|
33571
|
-
if (j.includes(
|
|
33571
|
+
}, G.style = (Z) => {
|
|
33572
|
+
if (j.includes(Z.feature.placeId))
|
|
33572
33573
|
return z;
|
|
33573
|
-
}) : (W.style = (
|
|
33574
|
-
if (q.includes(
|
|
33574
|
+
}) : (W.style = (Z) => {
|
|
33575
|
+
if (q.includes(Z.feature.placeId))
|
|
33575
33576
|
return z;
|
|
33576
|
-
}, G.style = (
|
|
33577
|
-
if (q.includes(
|
|
33577
|
+
}, G.style = (Z) => {
|
|
33578
|
+
if (q.includes(Z.feature.placeId))
|
|
33578
33579
|
return z;
|
|
33579
33580
|
});
|
|
33580
33581
|
}
|
|
33581
|
-
function
|
|
33582
|
-
|
|
33583
|
-
}
|
|
33584
|
-
function me(A, z) {
|
|
33585
|
-
Ve(), _.value = A, Y[A].includedType && V.value.add(Y[A].includedType), Object.values(Y[A].subCategory).forEach(
|
|
33582
|
+
function fe(F, z) {
|
|
33583
|
+
Se(), _.value = F, Y[F].includedType && V.value.add(Y[F].includedType), Object.values(Y[F].subCategory).forEach(
|
|
33586
33584
|
(j) => V.value.add(j.includedType)
|
|
33587
|
-
), Object.values(Y[
|
|
33585
|
+
), Object.values(Y[F].subCategory).forEach(
|
|
33588
33586
|
(j) => {
|
|
33589
33587
|
j.excludedType && T.value.add(j.excludedType);
|
|
33590
33588
|
}
|
|
33591
33589
|
), V.value = new Set(Array.from(V.value).flat()), T.value = new Set(Array.from(T.value).flat()), V.value.forEach((j) => {
|
|
33592
33590
|
T.value.has(j) && T.value.delete(j);
|
|
33593
|
-
}), S.value = Y[
|
|
33591
|
+
}), S.value = Y[F], R.value = z, _e({
|
|
33594
33592
|
includedTypes: Array.from(V.value),
|
|
33595
33593
|
excludedTypes: Array.from(T.value)
|
|
33596
33594
|
});
|
|
33597
33595
|
const q = Object.fromEntries(
|
|
33598
|
-
|
|
33596
|
+
X.map((j) => [j.id, j.label])
|
|
33599
33597
|
);
|
|
33600
|
-
E.value = `${q[
|
|
33598
|
+
E.value = `${q[F]} ${ae.value}`, p.value = E.value, P.showCategories = !0, ue.value = !1;
|
|
33601
33599
|
}
|
|
33602
|
-
function
|
|
33600
|
+
function ge(F, z) {
|
|
33603
33601
|
const q = ref([]), j = ref();
|
|
33604
|
-
return
|
|
33605
|
-
|
|
33602
|
+
return F.forEach(() => {
|
|
33603
|
+
X.forEach((W) => {
|
|
33606
33604
|
W.id === _.value && (q.value = W);
|
|
33607
33605
|
}), Object.values(q.value).forEach((W) => {
|
|
33608
33606
|
Object.values(W).forEach((G) => {
|
|
@@ -33611,134 +33609,134 @@ const _hoisted_1 = { class: "vs-map" }, _hoisted_2 = { class: "vs-map__controls"
|
|
|
33611
33609
|
});
|
|
33612
33610
|
}), j;
|
|
33613
33611
|
}
|
|
33614
|
-
function
|
|
33615
|
-
N.value.forEach((
|
|
33616
|
-
C.value.has(
|
|
33612
|
+
function we() {
|
|
33613
|
+
N.value.forEach((F) => {
|
|
33614
|
+
C.value.has(F) && C.value.delete(F);
|
|
33617
33615
|
});
|
|
33618
33616
|
}
|
|
33619
|
-
function
|
|
33617
|
+
function xe(F, {
|
|
33620
33618
|
includeTypes: z = !1,
|
|
33621
33619
|
excludeTypes: q = !1,
|
|
33622
33620
|
removeIncludedTypes: j = !1,
|
|
33623
33621
|
removeExcludedTypes: W = !1
|
|
33624
33622
|
} = {}) {
|
|
33625
|
-
var
|
|
33626
|
-
const G =
|
|
33627
|
-
z && G.includedTypes.forEach((
|
|
33628
|
-
z && N.value.add(
|
|
33629
|
-
}), (q || W) && ((
|
|
33630
|
-
q && C.value.add(
|
|
33623
|
+
var Z;
|
|
33624
|
+
const G = O.value.get(F);
|
|
33625
|
+
z && G.includedTypes.forEach((te) => {
|
|
33626
|
+
z && N.value.add(te), j && N.value.delete(te);
|
|
33627
|
+
}), (q || W) && ((Z = G.excludedTypes) == null || Z.forEach((te) => {
|
|
33628
|
+
q && C.value.add(te), W && C.value.delete(te);
|
|
33631
33629
|
}));
|
|
33632
33630
|
}
|
|
33633
|
-
function
|
|
33634
|
-
|
|
33635
|
-
|
|
33636
|
-
|
|
33637
|
-
|
|
33638
|
-
|
|
33639
|
-
|
|
33640
|
-
E.value = q, p.value = `${E.value} ${ae.value}`, ke(), p.value = q;
|
|
33641
|
-
} else b.value.has(A) ? (b.value.delete("self-catering"), b.value.delete(A), N.value = /* @__PURE__ */ new Set(), C.value = /* @__PURE__ */ new Set(), b.value.forEach((q) => {
|
|
33642
|
-
$e(q, {
|
|
33631
|
+
function $e(F, z) {
|
|
33632
|
+
if (I.value = z, ae.value = "", F === "self-catering" && !b.value.has("self-catering")) {
|
|
33633
|
+
D.value = !0, Ce(), b.value = /* @__PURE__ */ new Set(), b.value.add(F);
|
|
33634
|
+
const q = ge(b.value, F).value;
|
|
33635
|
+
E.value = q, p.value = `${E.value} ${ae.value}`, be(), p.value = q;
|
|
33636
|
+
} else b.value.has(F) ? (b.value.delete("self-catering"), b.value.delete(F), N.value = /* @__PURE__ */ new Set(), C.value = /* @__PURE__ */ new Set(), b.value.forEach((q) => {
|
|
33637
|
+
xe(q, {
|
|
33643
33638
|
includeTypes: !0,
|
|
33644
33639
|
excludeTypes: !0
|
|
33645
33640
|
});
|
|
33646
|
-
}),
|
|
33647
|
-
|
|
33648
|
-
), b.value.size === 0 ? (L.value = /* @__PURE__ */ new Set(),
|
|
33641
|
+
}), we(), L.value.delete(
|
|
33642
|
+
ge(b.value, F).value
|
|
33643
|
+
), b.value.size === 0 ? (L.value = /* @__PURE__ */ new Set(), fe(_.value, R.value)) : (_e({
|
|
33649
33644
|
includedTypes: Array.from(N.value).flat(),
|
|
33650
33645
|
excludedTypes: Array.from(C.value).flat()
|
|
33651
|
-
}), E.value = Array.from(L.value).join(", "), p.value = E.value)) : (b.value.delete("self-catering"), b.value.add(
|
|
33646
|
+
}), E.value = Array.from(L.value).join(", "), p.value = E.value)) : (b.value.delete("self-catering"), b.value.add(F), xe(F, {
|
|
33652
33647
|
includeTypes: !0,
|
|
33653
33648
|
excludeTypes: !0
|
|
33654
|
-
}),
|
|
33649
|
+
}), we(), _e({
|
|
33655
33650
|
includedTypes: Array.from(N.value).flat(),
|
|
33656
33651
|
excludedTypes: Array.from(C.value).flat()
|
|
33657
33652
|
}), L.value.add(
|
|
33658
|
-
|
|
33659
|
-
), E.value = `${Array.from(L.value).join(", ")} ${ae.value}`, p.value = E.value,
|
|
33653
|
+
ge(b.value, F).value
|
|
33654
|
+
), E.value = `${Array.from(L.value).join(", ")} ${ae.value}`, p.value = E.value, P.showCategories = !0);
|
|
33660
33655
|
}
|
|
33661
|
-
async function
|
|
33662
|
-
includedTypes:
|
|
33656
|
+
async function _e({
|
|
33657
|
+
includedTypes: F = [],
|
|
33663
33658
|
excludedTypes: z = []
|
|
33664
33659
|
} = {}) {
|
|
33665
|
-
|
|
33660
|
+
me(), Ce(), ee += 1;
|
|
33666
33661
|
const q = ee;
|
|
33667
|
-
|
|
33668
|
-
const j = o.getBounds(), W = j.getNorthEast(), G = j.getSouthWest(),
|
|
33669
|
-
|
|
33662
|
+
P.filterUsesCount += 1, $.value = "nearby";
|
|
33663
|
+
const j = o.getBounds(), W = j.getNorthEast(), G = j.getSouthWest(), Z = google.maps.geometry.spherical.computeDistanceBetween(W, G);
|
|
33664
|
+
let te = 25e3;
|
|
33665
|
+
(P.selectedDestinationType === "regions" || P.selectedDestinationType === "islands" && ae.value === "Shetland" || P.selectedDestinationType === "islands" && ae.value === "Orkney") && (te = 5e4);
|
|
33666
|
+
const le = Math.min(Z / 2, te);
|
|
33667
|
+
u.includedTypes = F, u.excludedTypes = z ?? [], u.maxResultCount = NUMBER_OF_RESULTS, u.locationRestriction = {
|
|
33670
33668
|
center: o.getCenter(),
|
|
33671
|
-
radius:
|
|
33669
|
+
radius: le
|
|
33672
33670
|
}, l.style.display = "block", l.addEventListener("gmp-load", () => {
|
|
33673
33671
|
if (q !== ee) return;
|
|
33674
|
-
|
|
33675
|
-
let
|
|
33676
|
-
b.value.size && (
|
|
33677
|
-
filter_type:
|
|
33672
|
+
Be(q);
|
|
33673
|
+
let Te = "main", Le = _.value;
|
|
33674
|
+
b.value.size && (Te = "sub", Le = Array.from(b.value).join(", ")), n.createDataLayerObject("googleMapFilterEvent", {
|
|
33675
|
+
filter_type: Te,
|
|
33678
33676
|
search_map_location: o.getCenter().toString(),
|
|
33679
33677
|
filter_selection: Le,
|
|
33680
33678
|
results_count: l.places.length,
|
|
33681
|
-
filter_usage_index:
|
|
33682
|
-
}),
|
|
33679
|
+
filter_usage_index: P.filterUsesCount
|
|
33680
|
+
}), Ve("map_filter");
|
|
33683
33681
|
}, {
|
|
33684
33682
|
once: !0
|
|
33685
33683
|
});
|
|
33686
33684
|
}
|
|
33687
|
-
async function
|
|
33688
|
-
|
|
33689
|
-
const
|
|
33690
|
-
|
|
33691
|
-
(
|
|
33685
|
+
async function be(F = !1) {
|
|
33686
|
+
me(), Se(), ee += 1;
|
|
33687
|
+
const z = ee;
|
|
33688
|
+
P.searchesCount += 1, $.value = "text", E.value = p.value.trim(), E.value && (D.value || F ? (d.locationBias = null, d.locationRestriction = o.getBounds()) : (d.locationRestriction = null, d.locationBias = o.getCenter()), D.value && (_.value = "accommodation", b.value.add("self-catering")), d.includedType = A.value.some(
|
|
33689
|
+
(q) => E.value.toLowerCase().includes(q)
|
|
33692
33690
|
) ? "lodging" : null, d.textQuery = `${E.value} in Scotland`, d.maxResultCount = NUMBER_OF_RESULTS, c.style.display = "block", c.addEventListener("gmp-load", () => {
|
|
33693
|
-
|
|
33691
|
+
z === ee && (Be(z), D.value = !1, n.createDataLayerObject("googleMapSearchEvent", {
|
|
33694
33692
|
search_query: E.value,
|
|
33695
33693
|
search_map_location: o.getCenter().toString(),
|
|
33696
33694
|
search_results_count: c.places.length,
|
|
33697
|
-
search_usage_index:
|
|
33698
|
-
}),
|
|
33695
|
+
search_usage_index: P.searchesCount
|
|
33696
|
+
}), Ve("map_search"));
|
|
33699
33697
|
}, {
|
|
33700
33698
|
once: !0
|
|
33701
|
-
}),
|
|
33699
|
+
}), P.showDestinations = !1, P.showCategories = !0);
|
|
33702
33700
|
}
|
|
33703
|
-
async function
|
|
33701
|
+
async function Be(F) {
|
|
33704
33702
|
const { AdvancedMarkerElement: z } = await importLibrary("marker"), { LatLngBounds: q } = await importLibrary("core");
|
|
33705
|
-
if (
|
|
33703
|
+
if (F !== ee) return;
|
|
33706
33704
|
const j = ref();
|
|
33707
33705
|
$.value === "nearby" ? j.value = l : $.value === "text" ? j.value = c : console.error("Unrecognised Search type"), j.value.places.length === 0 ? (H.value = !0, j.value.style.display = "none") : (H.value = !1, j.value.style.display = "block");
|
|
33708
33706
|
const W = new q();
|
|
33709
33707
|
j.value.places && (j.value.places.forEach((G) => {
|
|
33710
|
-
const
|
|
33711
|
-
|
|
33712
|
-
const
|
|
33713
|
-
|
|
33714
|
-
const
|
|
33708
|
+
const Z = document.createElement("div");
|
|
33709
|
+
Z.classList.add("vs-map-marker");
|
|
33710
|
+
const te = document.createElement("i");
|
|
33711
|
+
te.classList.add("fa-solid", "fa-location-dot"), Z.appendChild(te);
|
|
33712
|
+
const le = new z({
|
|
33715
33713
|
map: o,
|
|
33716
33714
|
position: G.location,
|
|
33717
|
-
content:
|
|
33715
|
+
content: Z,
|
|
33718
33716
|
title: "Map pin"
|
|
33719
33717
|
});
|
|
33720
|
-
|
|
33721
|
-
|
|
33722
|
-
}),
|
|
33723
|
-
|
|
33724
|
-
}),
|
|
33718
|
+
le.addEventListener("gmp-placeclick", () => {
|
|
33719
|
+
ve(G);
|
|
33720
|
+
}), le.addListener("click", () => {
|
|
33721
|
+
ve(G);
|
|
33722
|
+
}), le.metadata = {
|
|
33725
33723
|
id: G.id
|
|
33726
|
-
}, v[G.id] =
|
|
33724
|
+
}, v[G.id] = le, W.extend(G.location), j.value.places.length === 1 ? (J(() => o.setCenter(
|
|
33727
33725
|
{
|
|
33728
33726
|
lat: G.location.lat(),
|
|
33729
33727
|
lng: G.location.lng()
|
|
33730
33728
|
}
|
|
33731
|
-
)),
|
|
33732
|
-
}),
|
|
33729
|
+
)), J(() => o.setZoom(14)), J(() => o.fitBounds(G.viewport))) : (J(() => o.setCenter(W.getCenter())), J(() => o.fitBounds(W)));
|
|
33730
|
+
}), De.value = oe(o));
|
|
33733
33731
|
}
|
|
33734
|
-
async function
|
|
33735
|
-
const { AdvancedMarkerElement:
|
|
33736
|
-
|
|
33732
|
+
async function ke() {
|
|
33733
|
+
const { AdvancedMarkerElement: F } = await importLibrary("marker");
|
|
33734
|
+
Ne(), r.value.forEach((z) => {
|
|
33737
33735
|
const q = document.createElement("div");
|
|
33738
33736
|
q.classList.add("vs-map-marker");
|
|
33739
33737
|
const j = document.createElement("i");
|
|
33740
33738
|
j.classList.add("fa-solid", "fa-location-dot"), q.appendChild(j);
|
|
33741
|
-
const W = new
|
|
33739
|
+
const W = new F({
|
|
33742
33740
|
map: o,
|
|
33743
33741
|
position: {
|
|
33744
33742
|
lat: z.properties.locationCentre.latitude,
|
|
@@ -33747,37 +33745,37 @@ const _hoisted_1 = { class: "vs-map" }, _hoisted_2 = { class: "vs-map__controls"
|
|
|
33747
33745
|
content: q,
|
|
33748
33746
|
title: z.properties.title
|
|
33749
33747
|
});
|
|
33750
|
-
W.addListener("gmp-click", () =>
|
|
33748
|
+
W.addListener("gmp-click", () => Ee(z)), v[z.properties.title] = W;
|
|
33751
33749
|
});
|
|
33752
33750
|
}
|
|
33753
|
-
function
|
|
33754
|
-
|
|
33751
|
+
function me(F, z) {
|
|
33752
|
+
P.showCategories = !1, Ne(), $.value = "", u.includedTypes = null, u.excludedTypes = null, u.locationRestriction = null, l.style.display = "none", d.includedType = null, d.locationRestriction = null, d.locationBias = null, d.textQuery = null, c.style.display = "none", M.value = !1, g && g.close && g.close(), H.value = void 0, F && (Ce(), Se(), pe("clear_all"), ke(), P.showDestinations = !0), z && (J(() => o.setCenter(t.center)), J(() => o.setZoom(t.zoom)), J(() => o.fitBounds(ne)), pe("reset_map"));
|
|
33755
33753
|
}
|
|
33756
|
-
function
|
|
33754
|
+
function Ce() {
|
|
33757
33755
|
E.value = null, p.value = "";
|
|
33758
33756
|
}
|
|
33759
|
-
function
|
|
33760
|
-
_.value = void 0, b.value = /* @__PURE__ */ new Set(), V.value = /* @__PURE__ */ new Set(), T.value = /* @__PURE__ */ new Set(), N.value = /* @__PURE__ */ new Set(), C.value = /* @__PURE__ */ new Set(), L.value = /* @__PURE__ */ new Set(),
|
|
33757
|
+
function Se() {
|
|
33758
|
+
_.value = void 0, b.value = /* @__PURE__ */ new Set(), V.value = /* @__PURE__ */ new Set(), T.value = /* @__PURE__ */ new Set(), N.value = /* @__PURE__ */ new Set(), C.value = /* @__PURE__ */ new Set(), L.value = /* @__PURE__ */ new Set(), R.value = void 0, I.value = void 0;
|
|
33761
33759
|
}
|
|
33762
|
-
function
|
|
33763
|
-
for (const
|
|
33764
|
-
v[
|
|
33760
|
+
function Ne() {
|
|
33761
|
+
for (const F in v)
|
|
33762
|
+
v[F] && (v[F].map = null);
|
|
33765
33763
|
v = {};
|
|
33766
33764
|
}
|
|
33767
|
-
function
|
|
33768
|
-
g.isOpen && (g.close(),
|
|
33765
|
+
function ve(F) {
|
|
33766
|
+
g.isOpen && (g.close(), pe("card_close", m.place)), m.place = F, window.innerWidth <= 768 ? (f.style.width = "85vw", f.style.height = "32em", P.sidebarOpen = !1) : (f.style.width = "20em", f.style.height = "32em"), f.style.display = "block", f.style.overflowY = "auto", f.style.overflowX = "hidden", f.style.boxSizing = "border-box", f.style.maxHeight = "32em", g.setOptions({
|
|
33769
33767
|
content: f,
|
|
33770
33768
|
maxWidth: "25em",
|
|
33771
|
-
position:
|
|
33769
|
+
position: F.location,
|
|
33772
33770
|
// eslint-disable-next-line no-undef
|
|
33773
33771
|
pixelOffset: new google.maps.Size(0, -32)
|
|
33774
33772
|
}), g.open({
|
|
33775
33773
|
map: o
|
|
33776
33774
|
}), google.maps.event.addListenerOnce(o, "idle", () => {
|
|
33777
|
-
o.getZoom() > MAX_ZOOM &&
|
|
33778
|
-
}),
|
|
33775
|
+
o.getZoom() > MAX_ZOOM && J(() => o.setZoom(MAX_ZOOM)), pe("card_open", F);
|
|
33776
|
+
}), J(() => o.setCenter(F.location));
|
|
33779
33777
|
}
|
|
33780
|
-
async function
|
|
33778
|
+
async function pe(F, z) {
|
|
33781
33779
|
let q = "", j = "", W = "", G = "";
|
|
33782
33780
|
z && (await z.fetchFields({
|
|
33783
33781
|
fields: [
|
|
@@ -33787,7 +33785,7 @@ const _hoisted_1 = { class: "vs-map" }, _hoisted_2 = { class: "vs-map__controls"
|
|
|
33787
33785
|
"websiteURI"
|
|
33788
33786
|
]
|
|
33789
33787
|
}), q = z.displayName, j = z.rating, W = z.websiteURI, G = z.primaryType), n.createDataLayerObject("googleMapInteractionEvent", {
|
|
33790
|
-
interaction_type:
|
|
33788
|
+
interaction_type: F,
|
|
33791
33789
|
search_query: p.value.trim(),
|
|
33792
33790
|
map_location: o.getCenter().toString(),
|
|
33793
33791
|
visible_attractions_count: k,
|
|
@@ -33796,96 +33794,96 @@ const _hoisted_1 = { class: "vs-map" }, _hoisted_2 = { class: "vs-map__controls"
|
|
|
33796
33794
|
card_attraction_rating: j,
|
|
33797
33795
|
card_attraction_url: W,
|
|
33798
33796
|
interaction_timestamp_ms: Date.now()
|
|
33799
|
-
}),
|
|
33797
|
+
}), Ve(F);
|
|
33800
33798
|
}
|
|
33801
|
-
function
|
|
33802
|
-
if (!
|
|
33803
|
-
const q = Date.now() -
|
|
33799
|
+
function Ve(F) {
|
|
33800
|
+
if (!P.firstInteraction) {
|
|
33801
|
+
const q = Date.now() - P.timeMounted;
|
|
33804
33802
|
n.createDataLayerObject("googleMapTimeToFirstInteractionEvent", {
|
|
33805
33803
|
time_to_first_interaction_ms: q,
|
|
33806
|
-
first_interaction_type:
|
|
33807
|
-
}),
|
|
33804
|
+
first_interaction_type: F
|
|
33805
|
+
}), P.firstInteraction = !0;
|
|
33808
33806
|
}
|
|
33809
33807
|
}
|
|
33810
|
-
function
|
|
33811
|
-
const
|
|
33812
|
-
if (!
|
|
33808
|
+
function Me() {
|
|
33809
|
+
const F = o.getBounds();
|
|
33810
|
+
if (!F) return 0;
|
|
33813
33811
|
let z = 0;
|
|
33814
33812
|
for (let q = 0; q < Object.keys(v).length; q++) {
|
|
33815
33813
|
const W = v[Object.keys(v)[q]].position;
|
|
33816
|
-
|
|
33814
|
+
F.contains(W) && (z += 1);
|
|
33817
33815
|
}
|
|
33818
33816
|
return z;
|
|
33819
33817
|
}
|
|
33820
33818
|
const ae = ref("");
|
|
33821
|
-
function
|
|
33822
|
-
|
|
33819
|
+
function Ee(F) {
|
|
33820
|
+
P.showDestinations = !1, ae.value = F.properties.title, J(() => o.fitBounds(
|
|
33823
33821
|
// eslint-disable-next-line no-undef
|
|
33824
33822
|
new google.maps.LatLngBounds(
|
|
33825
33823
|
// eslint-disable-next-line no-undef
|
|
33826
33824
|
new google.maps.LatLng(
|
|
33827
|
-
|
|
33828
|
-
|
|
33825
|
+
F.properties.viewport.low.latitude,
|
|
33826
|
+
F.properties.viewport.low.longitude
|
|
33829
33827
|
),
|
|
33830
33828
|
// eslint-disable-next-line no-undef
|
|
33831
33829
|
new google.maps.LatLng(
|
|
33832
|
-
|
|
33833
|
-
|
|
33830
|
+
F.properties.viewport.high.latitude,
|
|
33831
|
+
F.properties.viewport.high.longitude
|
|
33834
33832
|
)
|
|
33835
33833
|
)
|
|
33836
|
-
)),
|
|
33834
|
+
)), J(() => o.setCenter(
|
|
33837
33835
|
// eslint-disable-next-line no-undef
|
|
33838
33836
|
new google.maps.LatLng(
|
|
33839
|
-
|
|
33840
|
-
|
|
33837
|
+
F.properties.locationCentre.latitude,
|
|
33838
|
+
F.properties.locationCentre.longitude
|
|
33841
33839
|
)
|
|
33842
|
-
)),
|
|
33840
|
+
)), fe("things-to-do", 2);
|
|
33843
33841
|
}
|
|
33844
|
-
function
|
|
33845
|
-
if (
|
|
33842
|
+
function Ie() {
|
|
33843
|
+
if (P.showDestinations = !1, P.sidebarOpen = !0, ae.value = "", ue.value = !1, b.value.size > 0) {
|
|
33846
33844
|
if (b.value.has("self-catering"))
|
|
33847
|
-
b.value.delete("self-catering"),
|
|
33845
|
+
b.value.delete("self-catering"), $e("self-catering", 0);
|
|
33848
33846
|
else {
|
|
33849
|
-
|
|
33847
|
+
_e({
|
|
33850
33848
|
includedTypes: Array.from(N.value),
|
|
33851
33849
|
excludedTypes: Array.from(C.value)
|
|
33852
33850
|
});
|
|
33853
|
-
const
|
|
33851
|
+
const F = [];
|
|
33854
33852
|
b.value.forEach((z) => {
|
|
33855
|
-
|
|
33856
|
-
|
|
33853
|
+
F.push(
|
|
33854
|
+
ge(b.value, z).value
|
|
33857
33855
|
);
|
|
33858
|
-
}), E.value =
|
|
33856
|
+
}), E.value = F.join(", "), p.value = E.value, P.showCategories = !0;
|
|
33859
33857
|
}
|
|
33860
33858
|
return;
|
|
33861
33859
|
}
|
|
33862
33860
|
if (_.value) {
|
|
33863
|
-
|
|
33861
|
+
fe(_.value, R.value);
|
|
33864
33862
|
return;
|
|
33865
33863
|
}
|
|
33866
33864
|
if (p.value) {
|
|
33867
|
-
|
|
33865
|
+
be(!0);
|
|
33868
33866
|
return;
|
|
33869
33867
|
}
|
|
33870
|
-
|
|
33868
|
+
fe("things-to-do", 2);
|
|
33871
33869
|
}
|
|
33872
|
-
return (
|
|
33870
|
+
return (F, z) => (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
33873
33871
|
createElementVNode("div", {
|
|
33874
33872
|
class: normalizeClass(["vs-map__container", unref(U) ? "d-none" : ""])
|
|
33875
33873
|
}, [
|
|
33876
33874
|
withDirectives(createElementVNode("div", _hoisted_2, [
|
|
33877
33875
|
createVNode(_sfc_main$1, {
|
|
33878
|
-
categories: unref(
|
|
33876
|
+
categories: unref(X),
|
|
33879
33877
|
"category-data": unref(Y),
|
|
33880
33878
|
query: E.value,
|
|
33881
33879
|
"selected-category": _.value,
|
|
33882
33880
|
"selected-subcategories": b.value,
|
|
33883
|
-
"sidebar-labels":
|
|
33884
|
-
onCategorySelected: z[1] || (z[1] = (q) =>
|
|
33885
|
-
onResetMap: z[2] || (z[2] = (q) =>
|
|
33886
|
-
onResetLocation: z[3] || (z[3] = (q) =>
|
|
33887
|
-
onSearchInputChanged:
|
|
33888
|
-
onSubcategorySelected: z[4] || (z[4] = (q) =>
|
|
33881
|
+
"sidebar-labels": ce,
|
|
33882
|
+
onCategorySelected: z[1] || (z[1] = (q) => fe(q.id, q.key)),
|
|
33883
|
+
onResetMap: z[2] || (z[2] = (q) => me(!0)),
|
|
33884
|
+
onResetLocation: z[3] || (z[3] = (q) => me(!0, !0)),
|
|
33885
|
+
onSearchInputChanged: be,
|
|
33886
|
+
onSubcategorySelected: z[4] || (z[4] = (q) => $e(q.id, q.key))
|
|
33889
33887
|
}, {
|
|
33890
33888
|
"vs-map-sidebar-search-results": withCtx(() => [
|
|
33891
33889
|
H.value || t.alertText && H.value === !1 ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
@@ -33899,7 +33897,7 @@ const _hoisted_1 = { class: "vs-map" }, _hoisted_2 = { class: "vs-map__controls"
|
|
|
33899
33897
|
createTextVNode(toDisplayString(e.noResultsMessage) + " ", 1),
|
|
33900
33898
|
createElementVNode("a", {
|
|
33901
33899
|
href: "#",
|
|
33902
|
-
onClick: z[0] || (z[0] = withModifiers((q) =>
|
|
33900
|
+
onClick: z[0] || (z[0] = withModifiers((q) => me(!0, !0), ["prevent"]))
|
|
33903
33901
|
}, toDisplayString(e.resetMapNoResultsMessage), 1)
|
|
33904
33902
|
])
|
|
33905
33903
|
]),
|
|
@@ -34007,11 +34005,11 @@ const _hoisted_1 = { class: "vs-map" }, _hoisted_2 = { class: "vs-map__controls"
|
|
|
34007
34005
|
])]),
|
|
34008
34006
|
_: 1
|
|
34009
34007
|
})),
|
|
34010
|
-
unref(
|
|
34008
|
+
unref(ue) ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
34011
34009
|
createVNode(unref(VsButton), {
|
|
34012
34010
|
icon: "vs-icon-control-search",
|
|
34013
34011
|
variant: "secondary",
|
|
34014
|
-
onClick:
|
|
34012
|
+
onClick: Ie
|
|
34015
34013
|
}, {
|
|
34016
34014
|
default: withCtx(() => [
|
|
34017
34015
|
createTextVNode(toDisplayString(t.labels.searchAreaButton), 1)
|
|
@@ -34064,7 +34062,7 @@ export {
|
|
|
34064
34062
|
Breadcrumb as VsBreadcrumb,
|
|
34065
34063
|
BreadcrumbItem as VsBreadcrumbItem,
|
|
34066
34064
|
VsButton,
|
|
34067
|
-
|
|
34065
|
+
ze as VsButtonToggleGroup,
|
|
34068
34066
|
CannedSearch as VsCannedSearch,
|
|
34069
34067
|
Caption as VsCaption,
|
|
34070
34068
|
CarbonCalculator as VsCarbonCalculator,
|