aptechka 0.78.8 → 0.80.0
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/lib/{Animation-BDEX44-i.js → Animation-C4tLEBGM.js} +2 -2
- package/lib/{Animation-hZcAchp_.cjs → Animation-jmvFcNfM.cjs} +1 -1
- package/lib/Composed-BB1MtFiT.js +70 -0
- package/lib/Composed-CSeUTRCg.cjs +1 -0
- package/lib/{Damped-z9Uaw2MJ.cjs → Damped-77Urmi3q.cjs} +1 -1
- package/lib/{Damped-CtQmJ52v.js → Damped-DVG5nrYV.js} +2 -2
- package/lib/DerivedArray-B8A0-8uT.cjs +1 -0
- package/lib/DerivedArray-D3scYQdp.js +59 -0
- package/lib/{DragControls-K67-diF5.cjs → DragControls-BlL26P1V.cjs} +1 -1
- package/lib/{DragControls-DyIrD3GV.js → DragControls-Cm_88cLt.js} +4 -4
- package/lib/{SourceElement-VVdVc1d-.cjs → SourceElement-BBfaAgwe.cjs} +1 -1
- package/lib/{SourceElement-BnMxiOqY.js → SourceElement-BiNNtaz9.js} +2 -2
- package/lib/Store-1JrMCgdX.cjs +1 -0
- package/lib/{Store-0BVty6AZ.js → Store-BtVtCGLk.js} +52 -35
- package/lib/{Tweened-BlZB0vl4.js → Tweened-C1lnK6n9.js} +2 -2
- package/lib/{Tweened-mvHucL4Y.cjs → Tweened-CXQrFQth.cjs} +1 -1
- package/lib/{Viewport-DB0qAZPJ.cjs → Viewport-Cx50Hufs.cjs} +1 -1
- package/lib/{Viewport-DA10iWAO.js → Viewport-DbN_JWBM.js} +2 -2
- package/lib/accordion/index.cjs +1 -1
- package/lib/accordion/index.js +1 -1
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +3 -3
- package/lib/attribute/index.cjs +1 -1
- package/lib/attribute/index.js +3 -3
- package/lib/billboard/index.cjs +1 -1
- package/lib/billboard/index.js +2 -2
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.js +2 -2
- package/lib/connector/index.cjs +1 -1
- package/lib/connector/index.js +2 -1
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +1 -1
- package/lib/css-property/index.cjs +1 -1
- package/lib/css-property/index.js +3 -3
- package/lib/css-value-parser/index.cjs +1 -1
- package/lib/css-value-parser/index.js +1 -1
- package/lib/dev/index.cjs +1 -1
- package/lib/dev/index.js +2 -2
- package/lib/device/index.cjs +1 -1
- package/lib/device/index.js +1 -1
- package/lib/{dom-CVWzyXPH.js → dom-fgxIeFxm.js} +22 -7
- package/lib/dom-hTEdqeoj.cjs +1 -0
- package/lib/element-linked-store/index.cjs +1 -1
- package/lib/element-linked-store/index.js +2 -2
- package/lib/element-resizer/index.cjs +1 -1
- package/lib/element-resizer/index.js +2 -2
- package/lib/en3/index.cjs +1 -1
- package/lib/en3/index.js +2 -2
- package/lib/iframe/index.cjs +1 -1
- package/lib/iframe/index.js +3 -3
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +4 -4
- package/lib/{index-DekP7OZe.cjs → index-CKTweR3M.cjs} +1 -1
- package/lib/{index-Bv9zgfdb.js → index-JqYHGoo6.js} +1 -1
- package/lib/intersector/index.cjs +1 -1
- package/lib/intersector/index.js +2 -2
- package/lib/jsx/ComponentElement.d.ts +13 -0
- package/lib/jsx/h.d.ts +3 -0
- package/lib/jsx/hooks/common.d.ts +1 -0
- package/lib/jsx/hooks/component/lifecycle.d.ts +4 -0
- package/lib/jsx/hooks/component/useInternals.d.ts +2 -0
- package/lib/jsx/hooks/component/useShadow.d.ts +2 -0
- package/lib/jsx/hooks/component/useStylesheet.d.ts +8 -0
- package/lib/jsx/hooks/store.d.ts +8 -0
- package/lib/jsx/index.cjs +1 -0
- package/lib/jsx/index.d.ts +9 -0
- package/lib/jsx/index.js +140 -0
- package/lib/jsx/render.d.ts +1 -0
- package/lib/jsx/type.d.ts +224 -0
- package/lib/jsx/utils/attributes/class.d.ts +5 -0
- package/lib/jsx/utils/attributes/setAttributes.d.ts +2 -0
- package/lib/jsx/utils/attributes/style.d.ts +6 -0
- package/lib/jsx/utils/children/filterChildren.d.ts +2 -0
- package/lib/jsx/utils/children/findTextNode.d.ts +1 -0
- package/lib/jsx/utils/children/removeChildren.d.ts +1 -0
- package/lib/jsx/utils/children/storeChildren.d.ts +2 -0
- package/lib/jsx/utils/elementStoreSubscription.d.ts +2 -0
- package/lib/ladder/index.cjs +1 -1
- package/lib/ladder/index.js +2 -2
- package/lib/layout-box/index.cjs +1 -1
- package/lib/layout-box/index.js +2 -2
- package/lib/loading/index.cjs +1 -1
- package/lib/loading/index.js +1 -1
- package/lib/masonry-layout/index.cjs +1 -1
- package/lib/masonry-layout/index.js +2 -2
- package/lib/media/index.cjs +1 -1
- package/lib/media/index.js +2 -2
- package/lib/morph/Morph.d.ts +4 -21
- package/lib/morph/MorphRoute.d.ts +1 -0
- package/lib/morph/index.cjs +1 -1
- package/lib/morph/index.js +274 -266
- package/lib/need_redo_tweaker/element-constructor/ElementConstructor.d.ts +1 -1
- package/lib/need_redo_tweaker/index.cjs +1 -1
- package/lib/need_redo_tweaker/index.js +8 -8
- package/lib/pixel-perfect/index.cjs +1 -1
- package/lib/pixel-perfect/index.js +3 -3
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +4 -4
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +3 -3
- package/lib/radio/index.cjs +1 -1
- package/lib/radio/index.js +1 -1
- package/lib/render-BCEBRfHS.js +196 -0
- package/lib/render-Rv0UMACs.cjs +1 -0
- package/lib/router/Link.d.ts +3 -1
- package/lib/router/Route.d.ts +9 -10
- package/lib/router/Router.d.ts +13 -13
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.d.ts +2 -2
- package/lib/router/index.js +267 -216
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +8 -8
- package/lib/{scroll-DNGJVxa2.js → scroll-7JSxRKFK.js} +2 -2
- package/lib/{scroll-CIdNtj3G.cjs → scroll-DxcPU0vk.cjs} +1 -1
- package/lib/scroll-entries/index.cjs +1 -1
- package/lib/scroll-entries/index.js +1 -1
- package/lib/scroll-kit/index.cjs +1 -1
- package/lib/scroll-kit/index.js +4 -4
- package/lib/sequence/index.cjs +1 -1
- package/lib/sequence/index.js +3 -3
- package/lib/size-element/index.cjs +1 -1
- package/lib/size-element/index.js +1 -1
- package/lib/slicer/SlicerElement.d.ts +1 -1
- package/lib/slicer/index.cjs +1 -1
- package/lib/slicer/index.js +13 -13
- package/lib/source/index.cjs +1 -1
- package/lib/source/index.js +1 -1
- package/lib/store/DerivedArray.d.ts +11 -1
- package/lib/store/Store.d.ts +5 -0
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.js +10 -87
- package/lib/{stylesheet-HWF2a3nr.cjs → stylesheet-BcwbfhBp.cjs} +1 -1
- package/lib/{stylesheet-DpnWNVyD.js → stylesheet-JlRFfJIc.js} +1 -1
- package/lib/ticker/index.cjs +1 -1
- package/lib/ticker/index.js +2 -2
- package/lib/url-C2kASACG.cjs +1 -0
- package/lib/{url-Ddgqz4Q_.js → url-CGbjOTU4.js} +17 -17
- package/lib/utils/dom.d.ts +2 -0
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.js +102 -100
- package/lib/utils/url.d.ts +3 -2
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +3 -3
- package/lib/window-resizer/index.cjs +1 -1
- package/lib/window-resizer/index.js +1 -1
- package/lib/youtube/index.cjs +1 -1
- package/lib/youtube/index.js +3 -3
- package/package.json +21 -11
- package/lib/Store-Cd1GlEmZ.cjs +0 -1
- package/lib/dom-JBOkFLTh.cjs +0 -1
- package/lib/url-VIZgwj_h.cjs +0 -1
package/lib/morph/index.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
1
|
+
var fe = Object.defineProperty, ge = Object.defineProperties;
|
|
2
|
+
var be = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var Zt = Object.getOwnPropertySymbols;
|
|
4
|
+
var Ee = Object.prototype.hasOwnProperty, ve = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var _t = (h, e) => (e = Symbol[h]) ? e : Symbol.for("Symbol." + h), ee = (h) => {
|
|
6
6
|
throw TypeError(h);
|
|
7
7
|
};
|
|
8
|
-
var
|
|
8
|
+
var te = (h, e, s) => e in h ? fe(h, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : h[e] = s, xt = (h, e) => {
|
|
9
9
|
for (var s in e || (e = {}))
|
|
10
|
-
|
|
11
|
-
if (
|
|
12
|
-
for (var s of
|
|
13
|
-
|
|
10
|
+
Ee.call(e, s) && te(h, s, e[s]);
|
|
11
|
+
if (Zt)
|
|
12
|
+
for (var s of Zt(e))
|
|
13
|
+
ve.call(e, s) && te(h, s, e[s]);
|
|
14
14
|
return h;
|
|
15
|
-
},
|
|
16
|
-
var
|
|
17
|
-
var t = (h, e, s) => (
|
|
18
|
-
var G = (h, e, s) => new Promise((
|
|
15
|
+
}, Dt = (h, e) => ge(h, be(e));
|
|
16
|
+
var zt = (h, e, s) => e.has(h) || ee("Cannot " + s);
|
|
17
|
+
var t = (h, e, s) => (zt(h, e, "read from private field"), s ? s.call(h) : e.get(h)), l = (h, e, s) => e.has(h) ? ee("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(h) : e.set(h, s), o = (h, e, s, i) => (zt(h, e, "write to private field"), i ? i.call(h, s) : e.set(h, s), s), g = (h, e, s) => (zt(h, e, "access private method"), s);
|
|
18
|
+
var G = (h, e, s) => new Promise((i, n) => {
|
|
19
19
|
var E = (d) => {
|
|
20
20
|
try {
|
|
21
21
|
u(s.next(d));
|
|
@@ -28,186 +28,186 @@ var G = (h, e, s) => new Promise((a, n) => {
|
|
|
28
28
|
} catch (v) {
|
|
29
29
|
n(v);
|
|
30
30
|
}
|
|
31
|
-
}, u = (d) => d.done ?
|
|
31
|
+
}, u = (d) => d.done ? i(d.value) : Promise.resolve(d.value).then(E, f);
|
|
32
32
|
u((s = s.apply(h, e)).next());
|
|
33
33
|
});
|
|
34
|
-
var
|
|
35
|
-
import { i as
|
|
34
|
+
var se = (h, e, s) => (e = h[_t("asyncIterator")]) ? e.call(h) : (h = h[_t("iterator")](), e = {}, s = (i, n) => (n = h[i]) && (e[i] = (E) => new Promise((f, u, d) => (E = n.call(h, E), d = E.done, Promise.resolve(E.value).then((v) => f({ value: v, done: d }), u)))), s("next"), s("return"), e);
|
|
35
|
+
import { i as ne } from "../index-JqYHGoo6.js";
|
|
36
36
|
import { d as z } from "../events-CsVF98U6.js";
|
|
37
|
-
import { w as
|
|
37
|
+
import { w as Le, s as Se } from "../scroll-7JSxRKFK.js";
|
|
38
38
|
import "construct-style-sheets-polyfill";
|
|
39
|
-
import { n as
|
|
40
|
-
import { c as
|
|
41
|
-
import { c as
|
|
42
|
-
import { cssValueParser as
|
|
43
|
-
class
|
|
39
|
+
import { n as ye, c as qt, s as Ae } from "../url-CGbjOTU4.js";
|
|
40
|
+
import { c as re } from "../string-BlMQbe8b.js";
|
|
41
|
+
import { c as Pe } from "../math-BOBiC4TN.js";
|
|
42
|
+
import { cssValueParser as ke } from "../css-value-parser/index.js";
|
|
43
|
+
class oe extends HTMLElement {
|
|
44
44
|
connectedCallback() {
|
|
45
45
|
const e = {
|
|
46
46
|
"aria-live": "assertive",
|
|
47
47
|
"aria-atomic": "true",
|
|
48
48
|
style: "position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"
|
|
49
49
|
};
|
|
50
|
-
for (const [s,
|
|
51
|
-
this.setAttribute(s,
|
|
50
|
+
for (const [s, i] of Object.entries(e))
|
|
51
|
+
this.setAttribute(s, i);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
|
|
55
|
-
var R,
|
|
56
|
-
class
|
|
54
|
+
ne && !customElements.get("morph-announcer") && customElements.define("morph-announcer", oe);
|
|
55
|
+
var R, a, x, it, Ht, he, gt, nt;
|
|
56
|
+
class It {
|
|
57
57
|
constructor(e, s) {
|
|
58
58
|
l(this, x);
|
|
59
59
|
l(this, R);
|
|
60
|
-
l(this,
|
|
61
|
-
l(this,
|
|
62
|
-
e.preventDefault(),
|
|
60
|
+
l(this, a);
|
|
61
|
+
l(this, gt, (e) => {
|
|
62
|
+
e.preventDefault(), g(this, x, he).call(this);
|
|
63
63
|
});
|
|
64
64
|
l(this, nt, () => {
|
|
65
|
-
const e = t(this,
|
|
66
|
-
t(this, R).prefetch(t(this, x,
|
|
65
|
+
const e = t(this, a).hasAttribute("data-revalidate");
|
|
66
|
+
t(this, R).prefetch(t(this, x, it), e), t(this, a).removeEventListener("pointerenter", t(this, nt));
|
|
67
67
|
});
|
|
68
|
-
o(this, R, s), o(this,
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
), t(this,
|
|
68
|
+
o(this, R, s), o(this, a, e), t(this, a).addEventListener("click", t(this, gt)), this.checkCurrent(location.href.replace(location.origin, ""));
|
|
69
|
+
const i = g(this, x, Ht).call(this, t(this, a).getAttribute("data-pagination-set-link") || t(this, a).getAttribute("data-pagination-more-link") || t(this, a).getAttribute("data-pagination-next-link") || t(this, a).getAttribute("data-pagination-prev-link"));
|
|
70
|
+
i && this.updatePagination(
|
|
71
|
+
i.currentPage,
|
|
72
|
+
i.selector
|
|
73
|
+
), t(this, a).hasAttribute("data-prefetch") && t(this, a).addEventListener("pointerenter", t(this, nt));
|
|
74
74
|
}
|
|
75
75
|
get element() {
|
|
76
|
-
return t(this,
|
|
76
|
+
return t(this, a);
|
|
77
77
|
}
|
|
78
78
|
checkCurrent(e) {
|
|
79
79
|
var v, et;
|
|
80
|
-
const s = t(this, R).normalizePath(e),
|
|
81
|
-
t(this,
|
|
82
|
-
const [n, E] = (et = t(this, x,
|
|
80
|
+
const s = t(this, R).normalizePath(e), i = t(this, R).normalizePath(t(this, x, it));
|
|
81
|
+
t(this, a).hasAttribute("data-include") && s.pathname.includes(i.pathname) ? t(this, a).classList.add("current") : i.pathname === s.pathname ? t(this, a).classList.add("current") : (v = t(this, a).getAttribute("data-associated-paths")) != null && v.split(",").find((w) => s.pathname.includes(w)) ? t(this, a).classList.add("current") : t(this, a).classList.remove("current"), s.path === i.path ? t(this, a).classList.add("exact") : t(this, a).classList.remove("exact");
|
|
82
|
+
const [n, E] = (et = t(this, x, it).split("#")[0]) == null ? void 0 : et.split("?"), f = new URLSearchParams(E), u = new URLSearchParams(location.search);
|
|
83
83
|
let d = 0;
|
|
84
84
|
for (const [w] of u)
|
|
85
85
|
f.has(w) && u.get(w) === f.get(w) && d++;
|
|
86
|
-
d ? (t(this,
|
|
86
|
+
d ? (t(this, a).classList.toggle(
|
|
87
87
|
"all-params-matched",
|
|
88
88
|
u.size === d
|
|
89
|
-
), t(this,
|
|
89
|
+
), t(this, a).classList.toggle(
|
|
90
90
|
"some-params-matched",
|
|
91
91
|
u.size !== d
|
|
92
|
-
)) : !u.size && t(this,
|
|
93
|
-
for (const w in t(this,
|
|
94
|
-
const st =
|
|
92
|
+
)) : !u.size && t(this, a).hasAttribute("data-match-no-params") ? t(this, a).classList.add("all-params-matched") : (t(this, a).classList.remove("all-params-matched"), t(this, a).classList.remove("some-params-matched"));
|
|
93
|
+
for (const w in t(this, a).dataset) {
|
|
94
|
+
const st = re(w);
|
|
95
95
|
if (st.startsWith("match-param-")) {
|
|
96
|
-
const $ = st.split("match-param-")[1], S = t(this,
|
|
97
|
-
u.has($) && u.get($) === S || !u.has($) && (S === "" || S === "*" || S === "all" || S === "any" || S === "vse") ? t(this,
|
|
96
|
+
const $ = st.split("match-param-")[1], S = t(this, a).dataset[w], c = `param-${$}-matched`;
|
|
97
|
+
u.has($) && u.get($) === S || !u.has($) && (S === "" || S === "*" || S === "all" || S === "any" || S === "vse") ? t(this, a).classList.add(c) : t(this, a).classList.remove(c);
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
updatePagination(e, s) {
|
|
102
|
-
const
|
|
103
|
-
if (
|
|
104
|
-
if (
|
|
102
|
+
const i = g(this, x, Ht).call(this, s);
|
|
103
|
+
if (i)
|
|
104
|
+
if (i.element.setAttribute(
|
|
105
105
|
"data-current-page",
|
|
106
106
|
e.toString()
|
|
107
|
-
), t(this,
|
|
108
|
-
if (e <
|
|
109
|
-
t(this,
|
|
110
|
-
const n = t(this,
|
|
107
|
+
), t(this, a).hasAttribute("data-pagination-more-link"))
|
|
108
|
+
if (e < i.totalPages) {
|
|
109
|
+
t(this, a).style.display = "";
|
|
110
|
+
const n = t(this, a).querySelector(
|
|
111
111
|
"[data-pagination-more-link-counter]"
|
|
112
112
|
);
|
|
113
|
-
n && (n.textContent = (
|
|
114
|
-
const E = t(this,
|
|
113
|
+
n && (n.textContent = (i.totalPages - e).toString());
|
|
114
|
+
const E = t(this, a).getAttribute("href"), f = new URL(E, window.location.origin);
|
|
115
115
|
f.searchParams.set("page", (e + 1).toString());
|
|
116
116
|
const u = f.href.replace(f.origin, "").toString();
|
|
117
|
-
t(this,
|
|
117
|
+
t(this, a).setAttribute("href", u), this.checkCurrent(u);
|
|
118
118
|
} else
|
|
119
|
-
t(this,
|
|
120
|
-
else if (t(this,
|
|
121
|
-
const n = t(this,
|
|
119
|
+
t(this, a).style.display = "none";
|
|
120
|
+
else if (t(this, a).hasAttribute("data-pagination-prev-link") || t(this, a).hasAttribute("data-pagination-next-link")) {
|
|
121
|
+
const n = t(this, a).hasAttribute("data-pagination-prev-link"), E = t(this, a).getAttribute("href"), f = new URL(E, window.location.origin), u = e + (n ? -1 : 1);
|
|
122
122
|
f.searchParams.set(
|
|
123
123
|
"page",
|
|
124
|
-
|
|
124
|
+
Pe(u, 1, i.totalPages).toString()
|
|
125
125
|
);
|
|
126
126
|
const d = f.href.replace(f.origin, "").toString();
|
|
127
|
-
t(this,
|
|
128
|
-
} else t(this,
|
|
127
|
+
t(this, a).setAttribute("href", d), n ? u < 1 ? (t(this, a).classList.add("pagination-disabled"), t(this, a).setAttribute("tabindex", "-1")) : (t(this, a).classList.remove("pagination-disabled"), t(this, a).removeAttribute("tabindex")) : u > i.totalPages ? (t(this, a).classList.add("pagination-disabled"), t(this, a).setAttribute("tabindex", "-1")) : (t(this, a).classList.remove("pagination-disabled"), t(this, a).removeAttribute("tabindex"));
|
|
128
|
+
} else t(this, a).hasAttribute("data-pagination-set-link") && (t(this, a).getAttribute("data-value") === e.toString() ? t(this, a).classList.add("pagination-current") : t(this, a).classList.remove("pagination-current"));
|
|
129
129
|
}
|
|
130
130
|
destroy() {
|
|
131
|
-
t(this,
|
|
131
|
+
t(this, a).removeEventListener("click", t(this, gt)), t(this, a).removeEventListener("pointerenter", t(this, nt)), t(this, a).classList.remove("current", "exact", "pagination-current");
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
|
-
R = new WeakMap(),
|
|
135
|
-
const e = new URL(t(this,
|
|
134
|
+
R = new WeakMap(), a = new WeakMap(), x = new WeakSet(), it = function() {
|
|
135
|
+
const e = new URL(t(this, a).href);
|
|
136
136
|
return t(this, R).normalizePath(
|
|
137
137
|
e.pathname + e.search + e.hash
|
|
138
138
|
).path;
|
|
139
|
-
},
|
|
139
|
+
}, Ht = function(e) {
|
|
140
140
|
if (!e)
|
|
141
141
|
return;
|
|
142
142
|
const s = document.querySelector(e);
|
|
143
143
|
if (s) {
|
|
144
|
-
const
|
|
144
|
+
const i = parseInt(
|
|
145
145
|
s.getAttribute("data-current-page") || "1"
|
|
146
146
|
), n = parseInt(
|
|
147
147
|
s.getAttribute("data-total-pages") || "1"
|
|
148
148
|
);
|
|
149
149
|
return {
|
|
150
150
|
element: s,
|
|
151
|
-
currentPage:
|
|
151
|
+
currentPage: i,
|
|
152
152
|
totalPages: n,
|
|
153
153
|
selector: e
|
|
154
154
|
};
|
|
155
155
|
}
|
|
156
|
-
},
|
|
156
|
+
}, he = function() {
|
|
157
157
|
var s;
|
|
158
158
|
if (document.documentElement.classList.contains("click-disabled"))
|
|
159
159
|
return;
|
|
160
|
-
if (t(this,
|
|
160
|
+
if (t(this, a).hasAttribute("data-back") && t(this, R).previousURL)
|
|
161
161
|
history.back();
|
|
162
162
|
else {
|
|
163
|
-
const
|
|
163
|
+
const i = t(this, a).getAttribute(
|
|
164
164
|
"data-history-action"
|
|
165
|
-
) || "push", n = t(this,
|
|
165
|
+
) || "push", n = t(this, a).hasAttribute("data-center-scroll"), E = getComputedStyle(t(this, a)).getPropertyValue("--offset-scroll").trim(), f = E ? ke.parse(E) : void 0, u = t(this, a).hasAttribute("data-revalidate") || t(this, a).hasAttribute("data-pagination-more-link") || t(this, a).hasAttribute("data-pagination-set-link") || t(this, a).hasAttribute("data-pagination-next-link") || t(this, a).hasAttribute("data-pagination-prev-link"), d = t(this, a).hasAttribute(
|
|
166
166
|
"data-keep-search-parameters"
|
|
167
|
-
), v = t(this,
|
|
167
|
+
), v = t(this, a).hasAttribute("data-keep-scroll-position") || t(this, a).hasAttribute("data-pagination-more-link"), et = t(this, a).getAttribute(
|
|
168
168
|
"data-scroll-behaviour"
|
|
169
|
-
), w = ((s = t(this,
|
|
170
|
-
t(this,
|
|
171
|
-
] || t(this,
|
|
172
|
-
t(this,
|
|
173
|
-
] || t(this,
|
|
174
|
-
t(this,
|
|
175
|
-
] || t(this,
|
|
176
|
-
t(this,
|
|
177
|
-
] || void 0, st = t(this,
|
|
178
|
-
let $ = t(this, x,
|
|
179
|
-
if (t(this,
|
|
180
|
-
const [c,
|
|
169
|
+
), w = ((s = t(this, a).getAttribute("data-submorph")) == null ? void 0 : s.split(",").map((c) => c.trim())) || t(this, a).hasAttribute("data-pagination-more-link") && [
|
|
170
|
+
t(this, a).getAttribute("data-pagination-more-link")
|
|
171
|
+
] || t(this, a).hasAttribute("data-pagination-set-link") && [
|
|
172
|
+
t(this, a).getAttribute("data-pagination-set-link")
|
|
173
|
+
] || t(this, a).hasAttribute("data-pagination-next-link") && [
|
|
174
|
+
t(this, a).getAttribute("data-pagination-next-link")
|
|
175
|
+
] || t(this, a).hasAttribute("data-pagination-prev-link") && [
|
|
176
|
+
t(this, a).getAttribute("data-pagination-prev-link")
|
|
177
|
+
] || void 0, st = t(this, a).hasAttribute("data-clear-state");
|
|
178
|
+
let $ = t(this, x, it);
|
|
179
|
+
if (t(this, a).hasAttribute("data-toggle-params")) {
|
|
180
|
+
const [c, kt] = t(this, x, it).split("?"), j = new URLSearchParams(kt), V = new URLSearchParams(location.search), at = new URLSearchParams();
|
|
181
181
|
for (const [y] of j)
|
|
182
|
-
(!V.has(y) || V.has(y) && V.get(y) !== j.get(y)) &&
|
|
183
|
-
if (t(this,
|
|
182
|
+
(!V.has(y) || V.has(y) && V.get(y) !== j.get(y)) && at.append(y, j.get(y));
|
|
183
|
+
if (t(this, a).hasAttribute("data-merge-params"))
|
|
184
184
|
for (const [y] of V)
|
|
185
|
-
j.has(y) ||
|
|
186
|
-
$ = `${c}?${
|
|
185
|
+
j.has(y) || at.append(y, V.get(y));
|
|
186
|
+
$ = `${c}?${at.toString()}`;
|
|
187
187
|
}
|
|
188
|
-
const S =
|
|
189
|
-
S && (t(this,
|
|
188
|
+
const S = g(this, x, Ht).call(this, t(this, a).getAttribute("data-pagination-set-link") || t(this, a).getAttribute("data-pagination-more-link") || t(this, a).getAttribute("data-pagination-next-link") || t(this, a).getAttribute("data-pagination-prev-link"));
|
|
189
|
+
S && (t(this, a).hasAttribute("data-pagination-set-link") ? t(this, R).links.forEach((c) => {
|
|
190
190
|
c.updatePagination(
|
|
191
|
-
parseInt(t(this,
|
|
191
|
+
parseInt(t(this, a).getAttribute("data-value") || "1"),
|
|
192
192
|
S.selector
|
|
193
193
|
);
|
|
194
|
-
}) : t(this,
|
|
194
|
+
}) : t(this, a).hasAttribute("data-pagination-prev-link") ? t(this, R).links.forEach((c) => {
|
|
195
195
|
c.updatePagination(
|
|
196
196
|
S.currentPage - 1,
|
|
197
197
|
S.selector
|
|
198
198
|
);
|
|
199
|
-
}) : t(this,
|
|
199
|
+
}) : t(this, a).hasAttribute("data-pagination-next-link") ? t(this, R).links.forEach((c) => {
|
|
200
200
|
c.updatePagination(
|
|
201
201
|
S.currentPage + 1,
|
|
202
202
|
S.selector
|
|
203
203
|
);
|
|
204
|
-
}) : t(this,
|
|
204
|
+
}) : t(this, a).hasAttribute("data-pagination-more-link") && t(this, R).links.forEach((c) => {
|
|
205
205
|
c.updatePagination(
|
|
206
206
|
S.currentPage + 1,
|
|
207
207
|
S.selector
|
|
208
208
|
);
|
|
209
209
|
})), t(this, R).navigate($, {
|
|
210
|
-
historyAction:
|
|
210
|
+
historyAction: i,
|
|
211
211
|
centerScroll: n,
|
|
212
212
|
offsetScroll: f,
|
|
213
213
|
revalidate: u,
|
|
@@ -216,14 +216,14 @@ R = new WeakMap(), i = new WeakMap(), x = new WeakSet(), at = function() {
|
|
|
216
216
|
clearState: st,
|
|
217
217
|
keepScrollPosition: v,
|
|
218
218
|
scrollBehaviour: et,
|
|
219
|
-
submorphAppend: t(this,
|
|
220
|
-
mergeParams: !!S || t(this,
|
|
219
|
+
submorphAppend: t(this, a).hasAttribute("data-pagination-more-link"),
|
|
220
|
+
mergeParams: !!S || t(this, a).hasAttribute("data-merge-params") && !t(this, a).hasAttribute("data-toggle-params")
|
|
221
221
|
});
|
|
222
222
|
}
|
|
223
|
-
},
|
|
224
|
-
const
|
|
225
|
-
var q, J, H, I, Q, O, rt, Z, B,
|
|
226
|
-
class
|
|
223
|
+
}, gt = new WeakMap(), nt = new WeakMap();
|
|
224
|
+
const we = new DOMParser();
|
|
225
|
+
var q, J, H, I, Q, O, rt, Z, B, bt, ot;
|
|
226
|
+
class ae {
|
|
227
227
|
constructor(e, s) {
|
|
228
228
|
l(this, q);
|
|
229
229
|
l(this, J);
|
|
@@ -234,7 +234,8 @@ class se {
|
|
|
234
234
|
l(this, rt, null);
|
|
235
235
|
l(this, Z, null);
|
|
236
236
|
l(this, B, null);
|
|
237
|
-
l(this,
|
|
237
|
+
l(this, bt);
|
|
238
|
+
l(this, ot, !1);
|
|
238
239
|
o(this, q, e), o(this, J, s);
|
|
239
240
|
}
|
|
240
241
|
get pathname() {
|
|
@@ -246,8 +247,11 @@ class se {
|
|
|
246
247
|
get document() {
|
|
247
248
|
return t(this, O);
|
|
248
249
|
}
|
|
250
|
+
needRavalidation() {
|
|
251
|
+
o(this, ot, !0);
|
|
252
|
+
}
|
|
249
253
|
setHeaders(e) {
|
|
250
|
-
o(this,
|
|
254
|
+
o(this, bt, e);
|
|
251
255
|
}
|
|
252
256
|
setInitialDocument(e) {
|
|
253
257
|
o(this, I, e.cloneNode(!0));
|
|
@@ -258,10 +262,10 @@ class se {
|
|
|
258
262
|
`[${t(this, J)}] page loading cancelled`
|
|
259
263
|
);
|
|
260
264
|
}
|
|
261
|
-
fetch(e, s,
|
|
265
|
+
fetch(e, s, i) {
|
|
262
266
|
return G(this, null, function* () {
|
|
263
267
|
var n;
|
|
264
|
-
if (!
|
|
268
|
+
if (!i && !t(this, ot)) {
|
|
265
269
|
const u = ((n = t(this, I)) == null ? void 0 : n.documentElement.getAttribute("data-cache")) && s !== e, d = t(this, I) && t(this, q).isPopstateNavigation;
|
|
266
270
|
if (t(this, B) || u || d)
|
|
267
271
|
return t(this, B);
|
|
@@ -271,13 +275,13 @@ class se {
|
|
|
271
275
|
o(this, Z, new AbortController());
|
|
272
276
|
const u = yield (yield fetch(e, {
|
|
273
277
|
signal: t(this, Z).signal,
|
|
274
|
-
headers:
|
|
278
|
+
headers: xt({
|
|
275
279
|
"X-MORPH": "true",
|
|
276
280
|
"X-MORPH-CURRENT-PATH": encodeURIComponent(s),
|
|
277
281
|
"X-MORPH-NEW-PATH": encodeURIComponent(e)
|
|
278
|
-
}, t(this,
|
|
279
|
-
})).text(), d =
|
|
280
|
-
this.setInitialDocument(d);
|
|
282
|
+
}, t(this, bt))
|
|
283
|
+
})).text(), d = we.parseFromString(u, "text/html");
|
|
284
|
+
this.setInitialDocument(d), o(this, ot, !1);
|
|
281
285
|
} catch (f) {
|
|
282
286
|
console.warn(f);
|
|
283
287
|
} finally {
|
|
@@ -337,22 +341,22 @@ class se {
|
|
|
337
341
|
return o(this, rt, null), e;
|
|
338
342
|
}
|
|
339
343
|
}
|
|
340
|
-
q = new WeakMap(), J = new WeakMap(), H = new WeakMap(), I = new WeakMap(), Q = new WeakMap(), O = new WeakMap(), rt = new WeakMap(), Z = new WeakMap(), B = new WeakMap(),
|
|
341
|
-
var U,
|
|
342
|
-
class
|
|
344
|
+
q = new WeakMap(), J = new WeakMap(), H = new WeakMap(), I = new WeakMap(), Q = new WeakMap(), O = new WeakMap(), rt = new WeakMap(), Z = new WeakMap(), B = new WeakMap(), bt = new WeakMap(), ot = new WeakMap();
|
|
345
|
+
var U, ht, Et, Wt, vt;
|
|
346
|
+
class Ce {
|
|
343
347
|
constructor(e) {
|
|
344
|
-
l(this,
|
|
348
|
+
l(this, Et);
|
|
345
349
|
l(this, U);
|
|
346
|
-
l(this,
|
|
347
|
-
l(this,
|
|
348
|
-
|
|
350
|
+
l(this, ht, []);
|
|
351
|
+
l(this, vt, () => {
|
|
352
|
+
g(this, Et, Wt).call(this);
|
|
349
353
|
});
|
|
350
354
|
o(this, U, e);
|
|
351
355
|
for (const s in t(this, U).dataset) {
|
|
352
|
-
const
|
|
353
|
-
if (
|
|
354
|
-
const n =
|
|
355
|
-
t(this,
|
|
356
|
+
const i = re(s);
|
|
357
|
+
if (i.startsWith("param-")) {
|
|
358
|
+
const n = i.split("param-")[1], E = t(this, U).dataset[s];
|
|
359
|
+
t(this, ht).push({
|
|
356
360
|
name: n,
|
|
357
361
|
value: E
|
|
358
362
|
});
|
|
@@ -360,65 +364,65 @@ class we {
|
|
|
360
364
|
}
|
|
361
365
|
document.addEventListener(
|
|
362
366
|
"morphURLParametersChange",
|
|
363
|
-
t(this,
|
|
364
|
-
),
|
|
367
|
+
t(this, vt)
|
|
368
|
+
), g(this, Et, Wt).call(this);
|
|
365
369
|
}
|
|
366
370
|
destroy() {
|
|
367
371
|
document.removeEventListener(
|
|
368
372
|
"morphURLParametersChange",
|
|
369
|
-
t(this,
|
|
373
|
+
t(this, vt)
|
|
370
374
|
);
|
|
371
375
|
}
|
|
372
376
|
}
|
|
373
|
-
U = new WeakMap(),
|
|
377
|
+
U = new WeakMap(), ht = new WeakMap(), Et = new WeakSet(), Wt = function() {
|
|
374
378
|
const e = new URLSearchParams(location.search);
|
|
375
|
-
let s = !!t(this,
|
|
376
|
-
!s && t(this, U).hasAttribute("data-match-no-params") && (s = !t(this,
|
|
377
|
-
const
|
|
378
|
-
s ?
|
|
379
|
-
},
|
|
380
|
-
var D,
|
|
381
|
-
const
|
|
379
|
+
let s = !!t(this, ht).find((n) => e.has(n.name) && (e.get(n.name) === n.value || n.value === "*" || n.value === "all" || n.value === "any" || n.value === "vse" || e.get(n.name) === "*" || e.get(n.name) === "all" || e.get(n.name) === "any" || e.get(n.name) === "vse"));
|
|
380
|
+
!s && t(this, U).hasAttribute("data-match-no-params") && (s = !t(this, ht).filter((n) => e.has(n.name)).length);
|
|
381
|
+
const i = t(this, U).getAttribute("data-hide-class");
|
|
382
|
+
s ? i ? t(this, U).classList.remove(i) : t(this, U).style.display = "" : i ? t(this, U).classList.add(i) : t(this, U).style.display = "none";
|
|
383
|
+
}, vt = new WeakMap();
|
|
384
|
+
var D, lt, P, X, b, _, K, Y, M, Lt, W, St, tt, ct, dt, yt, ut, At, p, Vt, Pt, pt, Ft, le, Ot, Bt, Xt, Kt, Ut, mt;
|
|
385
|
+
const ft = class ft {
|
|
382
386
|
constructor(e) {
|
|
383
387
|
l(this, p);
|
|
384
388
|
l(this, D, null);
|
|
385
|
-
l(this,
|
|
389
|
+
l(this, lt, null);
|
|
386
390
|
l(this, P, []);
|
|
387
391
|
l(this, X);
|
|
388
|
-
l(this,
|
|
392
|
+
l(this, b, null);
|
|
389
393
|
l(this, _);
|
|
390
394
|
l(this, K, []);
|
|
391
395
|
l(this, Y, !1);
|
|
392
396
|
l(this, M, null);
|
|
393
|
-
l(this,
|
|
397
|
+
l(this, Lt, !1);
|
|
394
398
|
l(this, W, /* @__PURE__ */ new Map());
|
|
395
|
-
l(this,
|
|
399
|
+
l(this, St, []);
|
|
396
400
|
l(this, tt, null);
|
|
397
|
-
l(this, lt, 0);
|
|
398
401
|
l(this, ct, 0);
|
|
399
|
-
l(this,
|
|
400
|
-
l(this,
|
|
401
|
-
l(this,
|
|
402
|
-
l(this,
|
|
403
|
-
|
|
404
|
-
|
|
402
|
+
l(this, dt, 0);
|
|
403
|
+
l(this, yt);
|
|
404
|
+
l(this, ut);
|
|
405
|
+
l(this, At);
|
|
406
|
+
l(this, Pt, (e) => {
|
|
407
|
+
var s, i;
|
|
408
|
+
return (((s = e.getAttribute("href")) == null ? void 0 : s.startsWith("/")) || ((i = e.getAttribute("href")) == null ? void 0 : i.startsWith("?"))) && !e.hasAttribute("download") && !e.hasAttribute("data-morph-skip") && !e.closest("[data-morph-skip]") && e.getAttribute("target") !== "_blank";
|
|
405
409
|
});
|
|
406
|
-
l(this,
|
|
410
|
+
l(this, Ut, (e) => G(this, null, function* () {
|
|
407
411
|
e.preventDefault(), o(this, Y, !0), yield this.navigate(location.href.replace(location.origin, ""), {
|
|
408
412
|
historyAction: "none",
|
|
409
|
-
submorph: t(this,
|
|
410
|
-
revalidate: t(this,
|
|
411
|
-
keepScrollPosition: t(this,
|
|
413
|
+
submorph: t(this, ut) ? void 0 : t(this, yt),
|
|
414
|
+
revalidate: t(this, ut),
|
|
415
|
+
keepScrollPosition: t(this, At)
|
|
412
416
|
}), o(this, Y, !1);
|
|
413
417
|
}));
|
|
414
|
-
l(this,
|
|
415
|
-
const { left: e, top: s } = this.scrollValue,
|
|
416
|
-
o(this,
|
|
418
|
+
l(this, mt, () => {
|
|
419
|
+
const { left: e, top: s } = this.scrollValue, i = s - t(this, dt), n = e - t(this, ct);
|
|
420
|
+
o(this, dt, s), o(this, ct, e), document.documentElement.classList.toggle("scroll-y", s > 0), document.documentElement.classList.toggle("scroll-x", e > 0), document.documentElement.classList.toggle(
|
|
417
421
|
"scroll-y-forward",
|
|
418
|
-
|
|
422
|
+
i > 0
|
|
419
423
|
), document.documentElement.classList.toggle(
|
|
420
424
|
"scroll-y-backward",
|
|
421
|
-
|
|
425
|
+
i < 0
|
|
422
426
|
), document.documentElement.classList.toggle(
|
|
423
427
|
"scroll-x-forward",
|
|
424
428
|
n > 0
|
|
@@ -432,35 +436,35 @@ const mt = class mt {
|
|
|
432
436
|
}
|
|
433
437
|
});
|
|
434
438
|
});
|
|
435
|
-
if (
|
|
436
|
-
|
|
437
|
-
base:
|
|
439
|
+
if (ne && !ft.instance) {
|
|
440
|
+
ft.instance = this, o(this, D, {
|
|
441
|
+
base: ye(e == null ? void 0 : e.base),
|
|
438
442
|
waitForHeadToLoad: (e == null ? void 0 : e.waitForHeadToLoad) !== !1,
|
|
439
443
|
trailingSlash: (e == null ? void 0 : e.trailingSlash) || !1,
|
|
440
444
|
scrollSelector: e == null ? void 0 : e.scrollSelector,
|
|
441
445
|
morphInsideScrollContainer: (e == null ? void 0 : e.morphInsideScrollContainer) || !1
|
|
442
|
-
}), o(this,
|
|
446
|
+
}), o(this, lt, g(this, p, Ft).call(this, document.body));
|
|
443
447
|
const s = this.normalizePath(
|
|
444
448
|
location.pathname + location.search + location.hash
|
|
445
449
|
);
|
|
446
|
-
o(this,
|
|
447
|
-
const
|
|
448
|
-
|
|
450
|
+
o(this, b, s);
|
|
451
|
+
const i = new ae(this, t(this, b).pathname);
|
|
452
|
+
i.setInitialDocument(document), t(this, W).set(t(this, b).pathname, i), document.documentElement.setAttribute(
|
|
449
453
|
"data-current-pathname",
|
|
450
|
-
t(this,
|
|
454
|
+
t(this, b).pathname
|
|
451
455
|
), document.documentElement.setAttribute(
|
|
452
456
|
"data-current-leaf",
|
|
453
457
|
s.leaf
|
|
454
|
-
), this.findLinks(), this.findParamsDependent(), history.scrollRestoration = "manual", addEventListener("popstate", t(this,
|
|
458
|
+
), this.findLinks(), this.findParamsDependent(), history.scrollRestoration = "manual", addEventListener("popstate", t(this, Ut)), qt({
|
|
455
459
|
action: "replace",
|
|
456
460
|
pathname: s.pathname,
|
|
457
461
|
searchParameters: s.parameters,
|
|
458
462
|
hash: s.hash
|
|
459
|
-
}), o(this, tt, new
|
|
463
|
+
}), o(this, tt, new oe()), g(this, p, Xt).call(this, document);
|
|
460
464
|
}
|
|
461
465
|
}
|
|
462
466
|
get currentURL() {
|
|
463
|
-
return t(this,
|
|
467
|
+
return t(this, b);
|
|
464
468
|
}
|
|
465
469
|
get previousURL() {
|
|
466
470
|
return t(this, _);
|
|
@@ -476,18 +480,18 @@ const mt = class mt {
|
|
|
476
480
|
}
|
|
477
481
|
get scrollValue() {
|
|
478
482
|
let e = 0, s = 0;
|
|
479
|
-
return t(this,
|
|
483
|
+
return t(this, Lt) ? (e = window.scrollY, s = window.scrollX) : (e = t(this, M).scrollTop, s = t(this, M).scrollLeft), { top: e, left: s };
|
|
480
484
|
}
|
|
481
485
|
saveState(e) {
|
|
482
|
-
const s = t(this, W).get(t(this,
|
|
486
|
+
const s = t(this, W).get(t(this, b).path);
|
|
483
487
|
s && s.saveState(e);
|
|
484
488
|
}
|
|
485
489
|
getState() {
|
|
486
|
-
const e = t(this, W).get(t(this,
|
|
490
|
+
const e = t(this, W).get(t(this, b).path);
|
|
487
491
|
return e == null ? void 0 : e.clearState();
|
|
488
492
|
}
|
|
489
493
|
normalizePath(e, s) {
|
|
490
|
-
return
|
|
494
|
+
return Ae(e, {
|
|
491
495
|
base: t(this, D).base,
|
|
492
496
|
trailingSlash: t(this, D).trailingSlash,
|
|
493
497
|
mergeParams: s != null && s.mergeParams ? location.search : ""
|
|
@@ -499,8 +503,8 @@ const mt = class mt {
|
|
|
499
503
|
if (t(this, K).length)
|
|
500
504
|
return;
|
|
501
505
|
e = ((n = this.pathnameModifier) == null ? void 0 : n.call(this, e)) || e;
|
|
502
|
-
const
|
|
503
|
-
|
|
506
|
+
const i = g(this, p, pt).call(this, e);
|
|
507
|
+
i == null || i.fetch(e, t(this, b).path, s);
|
|
504
508
|
});
|
|
505
509
|
}
|
|
506
510
|
excludeHeadChild(e) {
|
|
@@ -508,10 +512,14 @@ const mt = class mt {
|
|
|
508
512
|
}
|
|
509
513
|
setHeaders(e) {
|
|
510
514
|
}
|
|
515
|
+
needRavalidation(e) {
|
|
516
|
+
const s = this.normalizePath(e), i = g(this, p, pt).call(this, s.path);
|
|
517
|
+
i == null || i.needRavalidation();
|
|
518
|
+
}
|
|
511
519
|
navigate($) {
|
|
512
520
|
return G(this, arguments, function* (e, {
|
|
513
521
|
historyAction: s = "push",
|
|
514
|
-
centerScroll:
|
|
522
|
+
centerScroll: i,
|
|
515
523
|
offsetScroll: n,
|
|
516
524
|
scrollBehaviour: E,
|
|
517
525
|
revalidate: f,
|
|
@@ -522,28 +530,28 @@ const mt = class mt {
|
|
|
522
530
|
keepScrollPosition: w,
|
|
523
531
|
mergeParams: st
|
|
524
532
|
} = {}) {
|
|
525
|
-
var
|
|
533
|
+
var kt, j, V, at;
|
|
526
534
|
if (t(this, K).length)
|
|
527
535
|
return;
|
|
528
|
-
o(this,
|
|
529
|
-
const S = ((
|
|
536
|
+
o(this, yt, d), o(this, ut, f), o(this, At, w);
|
|
537
|
+
const S = ((kt = this.pathnameModifier) == null ? void 0 : kt.call(this, e)) || e, c = this.normalizePath(S, {
|
|
530
538
|
mergeParams: st
|
|
531
539
|
});
|
|
532
|
-
if (!f && (((j = t(this, X)) == null ? void 0 : j.pathname) === c.pathname || t(this,
|
|
533
|
-
w ||
|
|
534
|
-
centerScroll:
|
|
540
|
+
if (!f && (((j = t(this, X)) == null ? void 0 : j.pathname) === c.pathname || t(this, b).pathname === c.pathname)) {
|
|
541
|
+
w || g(this, p, Kt).call(this, c.hash || 0, {
|
|
542
|
+
centerScroll: i,
|
|
535
543
|
offsetScroll: n,
|
|
536
544
|
behavior: "smooth"
|
|
537
545
|
}), z(document, "morphSamePath", {
|
|
538
546
|
custom: !0
|
|
539
|
-
}), ((V = t(this,
|
|
540
|
-
action: ((
|
|
547
|
+
}), ((V = t(this, b)) == null ? void 0 : V.parameters) !== c.parameters && (o(this, _, t(this, b)), o(this, b, c), qt({
|
|
548
|
+
action: ((at = t(this, b)) == null ? void 0 : at.hash) !== c.hash ? "replace" : s,
|
|
541
549
|
pathname: c.pathname,
|
|
542
550
|
searchParameters: c.parameters,
|
|
543
551
|
hash: c.hash
|
|
544
552
|
}), z(document, "morphURLParametersChange", {
|
|
545
553
|
detail: {
|
|
546
|
-
newURL: t(this,
|
|
554
|
+
newURL: t(this, b),
|
|
547
555
|
previousURL: t(this, _)
|
|
548
556
|
}
|
|
549
557
|
})), t(this, P).forEach((y) => {
|
|
@@ -573,11 +581,11 @@ const mt = class mt {
|
|
|
573
581
|
}
|
|
574
582
|
if (!y || t(this, X).pathname !== c.pathname) {
|
|
575
583
|
t(this, P).forEach((r) => {
|
|
576
|
-
r.checkCurrent(t(this,
|
|
584
|
+
r.checkCurrent(t(this, b).path);
|
|
577
585
|
});
|
|
578
586
|
return;
|
|
579
587
|
}
|
|
580
|
-
const
|
|
588
|
+
const Yt = {
|
|
581
589
|
url: c,
|
|
582
590
|
submorph: d
|
|
583
591
|
};
|
|
@@ -585,102 +593,102 @@ const mt = class mt {
|
|
|
585
593
|
document.querySelectorAll(r).forEach((k) => {
|
|
586
594
|
k.classList.add("out"), k.setAttribute("data-morph-out", "");
|
|
587
595
|
});
|
|
588
|
-
}) : t(this,
|
|
596
|
+
}) : t(this, lt).forEach((r) => {
|
|
589
597
|
var k, T;
|
|
590
598
|
(k = r.firstElementChild) == null || k.classList.add("out"), (T = r.firstElementChild) == null || T.setAttribute("data-morph-out", "");
|
|
591
599
|
}), z(document, "morphNavigation", {
|
|
592
|
-
detail:
|
|
600
|
+
detail: Yt
|
|
593
601
|
});
|
|
594
|
-
const
|
|
602
|
+
const Tt = g(this, p, pt).call(this, t(this, b).pathname), A = g(this, p, pt).call(this, c.pathname);
|
|
595
603
|
if (t(this, W).forEach((r) => {
|
|
596
604
|
r.pathname !== c.pathname && r.abort();
|
|
597
|
-
}), yield A == null ? void 0 : A.fetch(S, t(this,
|
|
605
|
+
}), yield A == null ? void 0 : A.fetch(S, t(this, b).path, f), t(this, X).pathname !== c.pathname) {
|
|
598
606
|
t(this, P).forEach((r) => {
|
|
599
|
-
r.checkCurrent(t(this,
|
|
607
|
+
r.checkCurrent(t(this, b).path);
|
|
600
608
|
});
|
|
601
609
|
return;
|
|
602
610
|
}
|
|
603
|
-
|
|
604
|
-
const
|
|
611
|
+
Tt.clearState(), Tt.saveScrollState(), Tt.saveDocumentState(), (!t(this, Y) || f) && (A.clearScrollState(), A.clearDocumentState()), et && A.clearState(), A.cloneDocument(), t(this, tt).textContent = A.title, document.body.appendChild(t(this, tt));
|
|
612
|
+
const wt = Dt(xt({}, Yt), {
|
|
605
613
|
document: A.document
|
|
606
614
|
});
|
|
607
|
-
v ||
|
|
615
|
+
v || wt.document.querySelectorAll("[data-morph-out]").forEach((r) => {
|
|
608
616
|
r.classList.remove("out");
|
|
609
617
|
}), z(document, "morphStart", {
|
|
610
|
-
detail:
|
|
618
|
+
detail: wt
|
|
611
619
|
});
|
|
612
|
-
const
|
|
613
|
-
|
|
614
|
-
r.tagName === "SCRIPT" && (
|
|
615
|
-
}),
|
|
620
|
+
const $t = Array.from(document.head.children), jt = Array.from(A.document.head.children), Gt = g(this, p, le).call(this, $t, jt), ce = g(this, p, Ot).call(this, $t, Gt), Ct = g(this, p, Ot).call(this, jt, Gt).filter((r) => !this.excludeHeadChild(r));
|
|
621
|
+
Ct.forEach((r, k) => {
|
|
622
|
+
r.tagName === "SCRIPT" && (Ct[k] = g(this, p, Vt).call(this, r));
|
|
623
|
+
}), Ct.forEach((r) => {
|
|
616
624
|
document.head.appendChild(r);
|
|
617
625
|
});
|
|
618
|
-
const
|
|
626
|
+
const Mt = Ct.filter((r) => {
|
|
619
627
|
if (r.hasAttribute("data-no-waiting"))
|
|
620
628
|
return !1;
|
|
621
|
-
if (
|
|
629
|
+
if (g(this, p, Bt).call(this, r))
|
|
622
630
|
return !0;
|
|
623
631
|
});
|
|
624
|
-
t(this, D).waitForHeadToLoad &&
|
|
632
|
+
t(this, D).waitForHeadToLoad && Mt.length && (yield new Promise((r) => G(this, null, function* () {
|
|
625
633
|
let k = 0;
|
|
626
634
|
try {
|
|
627
|
-
for (var T =
|
|
628
|
-
const
|
|
629
|
-
|
|
630
|
-
k++, k ===
|
|
635
|
+
for (var T = se(Mt), ue, F, N; ue = !(F = yield T.next()).done; ue = !1) {
|
|
636
|
+
const Rt = F.value;
|
|
637
|
+
Rt.onload = () => {
|
|
638
|
+
k++, k === Mt.length && r();
|
|
631
639
|
};
|
|
632
640
|
}
|
|
633
641
|
} catch (F) {
|
|
634
642
|
N = [F];
|
|
635
643
|
} finally {
|
|
636
644
|
try {
|
|
637
|
-
|
|
645
|
+
ue && (F = T.return) && (yield F.call(T));
|
|
638
646
|
} finally {
|
|
639
647
|
if (N)
|
|
640
648
|
throw N[0];
|
|
641
649
|
}
|
|
642
650
|
}
|
|
643
|
-
}))), yield
|
|
644
|
-
const
|
|
645
|
-
v ||
|
|
646
|
-
r.hasAttribute("data-permanent") || (
|
|
651
|
+
}))), yield Le(10);
|
|
652
|
+
const Jt = [];
|
|
653
|
+
v || ce.forEach((r) => {
|
|
654
|
+
r.hasAttribute("data-permanent") || (g(this, p, Bt).call(this, r) ? Jt.push(r) : r.remove());
|
|
647
655
|
});
|
|
648
|
-
const
|
|
649
|
-
!t(this, D).morphInsideScrollContainer && !d &&
|
|
656
|
+
const de = g(this, p, Ft).call(this, A.document.body);
|
|
657
|
+
!t(this, D).morphInsideScrollContainer && !d && g(this, p, Xt).call(this, A.document), document.documentElement.setAttribute(
|
|
650
658
|
"data-current-pathname",
|
|
651
659
|
c.pathname
|
|
652
660
|
), document.documentElement.setAttribute(
|
|
653
661
|
"data-current-leaf",
|
|
654
662
|
c.leaf
|
|
655
|
-
),
|
|
663
|
+
), qt({
|
|
656
664
|
action: s,
|
|
657
665
|
pathname: c.pathname,
|
|
658
666
|
searchParameters: c.parameters || (u ? location.search : ""),
|
|
659
667
|
hash: c.hash
|
|
660
|
-
}), t(this, tt).remove(), o(this, _, t(this,
|
|
661
|
-
const
|
|
662
|
-
t(this,
|
|
663
|
-
const T =
|
|
668
|
+
}), t(this, tt).remove(), o(this, _, t(this, b)), o(this, b, c);
|
|
669
|
+
const Nt = [];
|
|
670
|
+
t(this, lt).forEach((r, k) => {
|
|
671
|
+
const T = de[k], ue = getComputedStyle(r).getPropertyValue("--morph-duration");
|
|
664
672
|
let F = [], N = [];
|
|
665
673
|
d ? (d.forEach((m) => {
|
|
666
674
|
const L = r.querySelector(m), C = T.querySelector(m);
|
|
667
675
|
L && C && (N.push(L), F.push(C));
|
|
668
676
|
}), N.forEach((m) => {
|
|
669
|
-
m.parentElement &&
|
|
670
|
-
})) : (F.push(...T.childNodes), N.push(...r.childNodes),
|
|
671
|
-
const
|
|
677
|
+
m.parentElement && Nt.push(m.parentElement);
|
|
678
|
+
})) : (F.push(...T.childNodes), N.push(...r.childNodes), Nt.push(r));
|
|
679
|
+
const Rt = [];
|
|
672
680
|
v || N.forEach((m) => {
|
|
673
681
|
m instanceof HTMLElement && (this.destroyOldLinks(m), m.classList.add("old"), m.querySelectorAll(
|
|
674
682
|
"[data-morph-transfer]"
|
|
675
683
|
).forEach((C) => {
|
|
676
|
-
const
|
|
677
|
-
|
|
684
|
+
const pe = C.getAttribute("data-morph-transfer");
|
|
685
|
+
Rt.push({
|
|
678
686
|
element: C,
|
|
679
|
-
selector:
|
|
687
|
+
selector: pe
|
|
680
688
|
});
|
|
681
689
|
}));
|
|
682
690
|
}), F.forEach((m) => {
|
|
683
|
-
m instanceof HTMLElement && (
|
|
691
|
+
m instanceof HTMLElement && (Rt.forEach((L) => {
|
|
684
692
|
const C = m.querySelector(L.selector);
|
|
685
693
|
C && C.replaceWith(
|
|
686
694
|
A.document.importNode(L.element, !0)
|
|
@@ -705,13 +713,13 @@ const mt = class mt {
|
|
|
705
713
|
), m.classList.add("new-idle"));
|
|
706
714
|
});
|
|
707
715
|
}, 0);
|
|
708
|
-
const
|
|
716
|
+
const Qt = Dt(xt({}, wt), {
|
|
709
717
|
morphElement: r
|
|
710
718
|
});
|
|
711
719
|
z(document, "morphNewChildrenAdded", {
|
|
712
|
-
detail:
|
|
720
|
+
detail: Qt
|
|
713
721
|
});
|
|
714
|
-
const
|
|
722
|
+
const me = new Promise((m) => {
|
|
715
723
|
setTimeout(() => {
|
|
716
724
|
v || N.forEach((L) => {
|
|
717
725
|
L.remove();
|
|
@@ -721,11 +729,11 @@ const mt = class mt {
|
|
|
721
729
|
"--new-content-height"
|
|
722
730
|
), L.classList.remove("new-idle", "new"));
|
|
723
731
|
}), v || z(document, "morphOldChildrenRemoved", {
|
|
724
|
-
detail:
|
|
732
|
+
detail: Qt
|
|
725
733
|
}), m();
|
|
726
|
-
}, (parseFloat(
|
|
734
|
+
}, (parseFloat(ue) || 0) * 1e3 + 10);
|
|
727
735
|
});
|
|
728
|
-
t(this, K).push(
|
|
736
|
+
t(this, K).push(me);
|
|
729
737
|
}), this.isPopstateNavigation ? document.documentElement.style.setProperty(
|
|
730
738
|
"--new-document-scroll-position",
|
|
731
739
|
(this.scrollValue.top - A.scrollState.y) * 1 + "px"
|
|
@@ -734,18 +742,18 @@ const mt = class mt {
|
|
|
734
742
|
this.scrollValue.top + "px"
|
|
735
743
|
), z(document, "morphBeforeNavigationScroll", {
|
|
736
744
|
detail: A.scrollState
|
|
737
|
-
}), c.hash ? (A.clearScrollState(),
|
|
738
|
-
centerScroll:
|
|
745
|
+
}), c.hash ? (A.clearScrollState(), g(this, p, Kt).call(this, c.hash, {
|
|
746
|
+
centerScroll: i,
|
|
739
747
|
offsetScroll: n,
|
|
740
748
|
behavior: E
|
|
741
|
-
})) : t(this, Y) ? A.restoreScrollPosition() : w || A.renewScrollPosition(), yield Promise.all(t(this, K)), v ||
|
|
749
|
+
})) : t(this, Y) ? A.restoreScrollPosition() : w || A.renewScrollPosition(), yield Promise.all(t(this, K)), v || Jt.forEach((r) => r.remove()), o(this, K, []), Nt.forEach((r) => {
|
|
742
750
|
r.querySelectorAll("script").forEach((T) => {
|
|
743
|
-
T.replaceWith(
|
|
751
|
+
T.replaceWith(g(this, p, Vt).call(this, T));
|
|
744
752
|
});
|
|
745
753
|
}), t(this, P).forEach((r) => {
|
|
746
|
-
r.checkCurrent(t(this,
|
|
754
|
+
r.checkCurrent(t(this, b).path);
|
|
747
755
|
}), this.findParamsDependent(), z(document, "morphComplete", {
|
|
748
|
-
detail:
|
|
756
|
+
detail: wt
|
|
749
757
|
}), document.documentElement.style.removeProperty(
|
|
750
758
|
"--new-document-scroll-position"
|
|
751
759
|
), window.dispatchEvent(new Event("resize"));
|
|
@@ -756,7 +764,7 @@ const mt = class mt {
|
|
|
756
764
|
});
|
|
757
765
|
}
|
|
758
766
|
addLink(e) {
|
|
759
|
-
t(this, P).push(new
|
|
767
|
+
t(this, P).push(new It(e, this));
|
|
760
768
|
}
|
|
761
769
|
addLinks(e) {
|
|
762
770
|
e.forEach((s) => {
|
|
@@ -771,17 +779,17 @@ const mt = class mt {
|
|
|
771
779
|
}
|
|
772
780
|
findNewLinks(e) {
|
|
773
781
|
const s = [...e.querySelectorAll("a")].filter(
|
|
774
|
-
t(this,
|
|
782
|
+
t(this, Pt)
|
|
775
783
|
);
|
|
776
784
|
t(this, P).push(
|
|
777
|
-
...s.map((
|
|
785
|
+
...s.map((i) => new It(i, this))
|
|
778
786
|
);
|
|
779
787
|
}
|
|
780
788
|
findLinks() {
|
|
781
789
|
const e = [
|
|
782
790
|
...document.documentElement.querySelectorAll("a")
|
|
783
|
-
].filter(t(this,
|
|
784
|
-
t(this, P).forEach((s) => s.destroy()), o(this, P, e.map((s) => new
|
|
791
|
+
].filter(t(this, Pt));
|
|
792
|
+
t(this, P).forEach((s) => s.destroy()), o(this, P, e.map((s) => new It(s, this)));
|
|
785
793
|
}
|
|
786
794
|
findParamsDependent() {
|
|
787
795
|
const e = [
|
|
@@ -789,55 +797,55 @@ const mt = class mt {
|
|
|
789
797
|
"[data-morph-params-dependent]"
|
|
790
798
|
)
|
|
791
799
|
];
|
|
792
|
-
t(this,
|
|
793
|
-
(s) => new
|
|
800
|
+
t(this, St).forEach((s) => s.destroy()), o(this, St, e.map(
|
|
801
|
+
(s) => new Ce(s)
|
|
794
802
|
));
|
|
795
803
|
}
|
|
796
804
|
};
|
|
797
|
-
D = new WeakMap(),
|
|
805
|
+
D = new WeakMap(), lt = new WeakMap(), P = new WeakMap(), X = new WeakMap(), b = new WeakMap(), _ = new WeakMap(), K = new WeakMap(), Y = new WeakMap(), M = new WeakMap(), Lt = new WeakMap(), W = new WeakMap(), St = new WeakMap(), tt = new WeakMap(), ct = new WeakMap(), dt = new WeakMap(), yt = new WeakMap(), ut = new WeakMap(), At = new WeakMap(), p = new WeakSet(), Vt = function(e) {
|
|
798
806
|
const s = document.createElement("script");
|
|
799
|
-
for (let
|
|
800
|
-
const n = e.attributes[
|
|
807
|
+
for (let i = 0; i < e.attributes.length; i++) {
|
|
808
|
+
const n = e.attributes[i];
|
|
801
809
|
s.setAttribute(n.name, n.value);
|
|
802
810
|
}
|
|
803
811
|
return e.hasAttribute("src") || (s.innerHTML = e.innerHTML), s;
|
|
804
|
-
},
|
|
812
|
+
}, Pt = new WeakMap(), pt = function(e) {
|
|
805
813
|
const s = this.normalizePath(e);
|
|
806
|
-
let
|
|
807
|
-
return
|
|
808
|
-
},
|
|
814
|
+
let i = t(this, W).get(s.pathname);
|
|
815
|
+
return i || (i = new ae(this, s.pathname), t(this, W).set(s.pathname, i)), i;
|
|
816
|
+
}, Ft = function(e) {
|
|
809
817
|
const s = [...e.querySelectorAll("[data-morph]")];
|
|
810
818
|
return s.length ? s : [e];
|
|
811
|
-
},
|
|
819
|
+
}, le = function(e, s) {
|
|
812
820
|
return e.filter(
|
|
813
|
-
(
|
|
814
|
-
(n) => n.outerHTML ===
|
|
821
|
+
(i) => s.find(
|
|
822
|
+
(n) => n.outerHTML === i.outerHTML
|
|
815
823
|
)
|
|
816
824
|
);
|
|
817
|
-
},
|
|
825
|
+
}, Ot = function(e, s) {
|
|
818
826
|
return e.filter(
|
|
819
|
-
(
|
|
820
|
-
(n) => n.outerHTML ===
|
|
827
|
+
(i) => !s.find(
|
|
828
|
+
(n) => n.outerHTML === i.outerHTML
|
|
821
829
|
)
|
|
822
830
|
);
|
|
823
|
-
}, Ot = function(e) {
|
|
824
|
-
return e.tagName === "SCRIPT" || e.tagName === "STYLE" || e.tagName === "LINK" && e.getAttribute("rel") === "stylesheet";
|
|
825
831
|
}, Bt = function(e) {
|
|
826
|
-
|
|
832
|
+
return e.tagName === "SCRIPT" || e.tagName === "STYLE" || e.tagName === "LINK" && e.getAttribute("rel") === "stylesheet";
|
|
833
|
+
}, Xt = function(e) {
|
|
834
|
+
var s, i;
|
|
827
835
|
(s = t(this, M)) == null || s.removeEventListener(
|
|
828
836
|
"scroll",
|
|
829
|
-
t(this,
|
|
830
|
-
), o(this,
|
|
831
|
-
},
|
|
832
|
-
const
|
|
833
|
-
(typeof
|
|
837
|
+
t(this, mt)
|
|
838
|
+
), o(this, dt, 0), o(this, ct, 0), o(this, M, t(this, D).scrollSelector && e.querySelector(t(this, D).scrollSelector) || window), o(this, Lt, t(this, M) === window), (i = t(this, M)) == null || i.addEventListener("scroll", t(this, mt)), t(this, mt).call(this);
|
|
839
|
+
}, Kt = function(e, s) {
|
|
840
|
+
const i = typeof e == "string" ? document.getElementById(e) : e;
|
|
841
|
+
(typeof i == "number" || i) && Se(i, {
|
|
834
842
|
scrollElement: t(this, M),
|
|
835
843
|
behavior: (s == null ? void 0 : s.behavior) || "instant",
|
|
836
844
|
center: s == null ? void 0 : s.centerScroll,
|
|
837
845
|
offset: s == null ? void 0 : s.offsetScroll
|
|
838
846
|
});
|
|
839
|
-
},
|
|
840
|
-
let ie =
|
|
847
|
+
}, Ut = new WeakMap(), mt = new WeakMap(), ft.instance = null;
|
|
848
|
+
let ie = ft;
|
|
841
849
|
export {
|
|
842
850
|
ie as Morph
|
|
843
851
|
};
|