aptechka 0.82.5 → 0.83.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-DxtCzFP3.js → Animation-BzTjZIE-.js} +2 -2
- package/lib/{Animation-jmvFcNfM.cjs → Animation-C39Ah-LM.cjs} +1 -1
- package/lib/{Composed-DtS09lSU.js → Composed-C-mnUGX6.js} +2 -2
- package/lib/{Composed-CSeUTRCg.cjs → Composed-RFcm2x5c.cjs} +1 -1
- package/lib/{Damped-DMnIOXpC.js → Damped-CRusiRIV.js} +2 -2
- package/lib/{Damped-77Urmi3q.cjs → Damped-Prr0iKu1.cjs} +1 -1
- package/lib/{DerivedArray-B8A0-8uT.cjs → DerivedArray-DdCR-Oy7.cjs} +1 -1
- package/lib/{DerivedArray-DG9iR0mf.js → DerivedArray-opbeygTL.js} +1 -1
- package/lib/{DragControls-BlL26P1V.cjs → DragControls-8rNZwQrs.cjs} +1 -1
- package/lib/{DragControls-DCC8iEOR.js → DragControls-DBNdMBA4.js} +4 -4
- package/lib/{LocalLinks-Bua7BGRF.cjs → LocalLinks-BxhSFv_Q.cjs} +1 -1
- package/lib/{LocalLinks-TQkTpAMx.js → LocalLinks-DRAQ-fxE.js} +3 -3
- package/lib/{PageAnnouncerElement-sfh0_4vl.js → PageAnnouncerElement-0LxZjtVH.js} +1 -1
- package/lib/{PageAnnouncerElement-C4k2kDJ5.cjs → PageAnnouncerElement-AQ0Ja6HM.cjs} +1 -1
- package/lib/{PageScroll-cQ3B5-6N.js → PageScroll-0LxFblry.js} +1 -1
- package/lib/{PageScroll-C7QBpx0G.cjs → PageScroll-BXJUQwG7.cjs} +1 -1
- package/lib/{SourceElement-TzgPNQOd.cjs → SourceElement-BHqPFbna.cjs} +1 -1
- package/lib/{SourceElement-BQ7g2KWK.js → SourceElement-DjbHjynf.js} +2 -2
- package/lib/{Store-1JrMCgdX.cjs → Store-Blf4msDz.cjs} +1 -1
- package/lib/{Store-CgQ3ReoB.js → Store-ZThXYBQd.js} +1 -1
- package/lib/{Tweened-lT68VACv.js → Tweened-Bw1Cn1PJ.js} +2 -2
- package/lib/{Tweened-CXQrFQth.cjs → Tweened-DWtk9E-O.cjs} +1 -1
- package/lib/{Viewport-Cx50Hufs.cjs → Viewport-BxCr0GlB.cjs} +1 -1
- package/lib/{Viewport-DGnJ31b4.js → Viewport-Dt-d9DPi.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/api-fetcher/index.cjs +1 -0
- package/lib/api-fetcher/index.d.ts +16 -0
- package/lib/api-fetcher/index.js +100 -0
- 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/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-BETkVSSZ.js +82 -0
- package/lib/dom-CBLlqORw.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-CKTweR3M.cjs → index-OE2INULi.cjs} +1 -1
- package/lib/{index-LReFyN6i.js → index-e9eDuagL.js} +1 -1
- package/lib/intersector/index.cjs +1 -1
- package/lib/intersector/index.js +2 -2
- package/lib/jsx/index.cjs +1 -1
- package/lib/jsx/index.js +6 -6
- 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/local-links/index.cjs +1 -1
- package/lib/local-links/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/index.cjs +1 -1
- package/lib/morph/index.js +294 -301
- package/lib/{morph-BQErz7qP.js → morph-D_ybmXWR.js} +8 -8
- package/lib/need_redo_tweaker/index.cjs +1 -1
- package/lib/need_redo_tweaker/index.js +3 -3
- package/lib/page-announcer/index.cjs +1 -1
- package/lib/page-announcer/index.js +1 -1
- package/lib/page-scroll/index.cjs +1 -1
- package/lib/page-scroll/index.js +1 -1
- 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-1u700s93.js +212 -0
- package/lib/render-BIOfUddT.cjs +1 -0
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.js +6 -6
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +8 -8
- package/lib/{scroll-DxcPU0vk.cjs → scroll-BA2WnUrb.cjs} +1 -1
- package/lib/{scroll-jcbHDexr.js → scroll-DY5senkF.js} +2 -2
- 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/index.cjs +1 -1
- package/lib/slicer/index.js +1 -1
- package/lib/source/index.cjs +1 -1
- package/lib/source/index.js +1 -1
- package/lib/spa/index.cjs +1 -1
- package/lib/spa/index.js +6 -6
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.js +3 -3
- package/lib/{stylesheet-BcwbfhBp.cjs → stylesheet-5_o7PFzM.cjs} +1 -1
- package/lib/{stylesheet-DbHOxtjw.js → stylesheet-DdBzowZY.js} +1 -1
- package/lib/ticker/index.cjs +1 -1
- package/lib/ticker/index.js +2 -2
- package/lib/url-CHgcNwJ1.cjs +1 -0
- package/lib/url-CYgo5vrG.js +113 -0
- package/lib/utils/dom.d.ts +3 -0
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.js +142 -137
- package/lib/utils/url.d.ts +6 -0
- 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 +13 -5
- package/lib/dom-BIeVMHfK.js +0 -57
- package/lib/dom-hTEdqeoj.cjs +0 -1
- package/lib/render-B3Hf-O7M.js +0 -205
- package/lib/render-BWjKu0M_.cjs +0 -1
- package/lib/url-CPgw9bd5.cjs +0 -1
- package/lib/url-DAl-mgbC.js +0 -97
package/lib/morph/index.js
CHANGED
|
@@ -1,42 +1,43 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
throw TypeError(
|
|
1
|
+
var ge = Object.defineProperty, Ee = Object.defineProperties;
|
|
2
|
+
var ve = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var Zt = Object.getOwnPropertySymbols;
|
|
4
|
+
var Le = Object.prototype.hasOwnProperty, Se = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var _t = (o, e) => (e = Symbol[o]) ? e : Symbol.for("Symbol." + o), ee = (o) => {
|
|
6
|
+
throw TypeError(o);
|
|
7
7
|
};
|
|
8
|
-
var
|
|
8
|
+
var te = (o, e, s) => e in o ? ge(o, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : o[e] = s, Ut = (o, e) => {
|
|
9
9
|
for (var s in e || (e = {}))
|
|
10
|
-
|
|
11
|
-
if (
|
|
12
|
-
for (var s of
|
|
13
|
-
|
|
14
|
-
return
|
|
15
|
-
}, Dt = (
|
|
16
|
-
var zt = (
|
|
17
|
-
var t = (
|
|
18
|
-
var J = (
|
|
19
|
-
var
|
|
10
|
+
Le.call(e, s) && te(o, s, e[s]);
|
|
11
|
+
if (Zt)
|
|
12
|
+
for (var s of Zt(e))
|
|
13
|
+
Se.call(e, s) && te(o, s, e[s]);
|
|
14
|
+
return o;
|
|
15
|
+
}, Dt = (o, e) => Ee(o, ve(e));
|
|
16
|
+
var zt = (o, e, s) => e.has(o) || ee("Cannot " + s);
|
|
17
|
+
var t = (o, e, s) => (zt(o, e, "read from private field"), s ? s.call(o) : e.get(o)), h = (o, e, s) => e.has(o) ? ee("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(o) : e.set(o, s), n = (o, e, s, a) => (zt(o, e, "write to private field"), a ? a.call(o, s) : e.set(o, s), s), y = (o, e, s) => (zt(o, e, "access private method"), s);
|
|
18
|
+
var J = (o, e, s) => new Promise((a, l) => {
|
|
19
|
+
var v = (c) => {
|
|
20
20
|
try {
|
|
21
|
-
|
|
22
|
-
} catch (
|
|
23
|
-
|
|
21
|
+
f(s.next(c));
|
|
22
|
+
} catch (p) {
|
|
23
|
+
l(p);
|
|
24
24
|
}
|
|
25
|
-
},
|
|
25
|
+
}, S = (c) => {
|
|
26
26
|
try {
|
|
27
|
-
|
|
28
|
-
} catch (
|
|
29
|
-
|
|
27
|
+
f(s.throw(c));
|
|
28
|
+
} catch (p) {
|
|
29
|
+
l(p);
|
|
30
30
|
}
|
|
31
|
-
},
|
|
32
|
-
|
|
31
|
+
}, f = (c) => c.done ? a(c.value) : Promise.resolve(c.value).then(v, S);
|
|
32
|
+
f((s = s.apply(o, e)).next());
|
|
33
33
|
});
|
|
34
|
-
var
|
|
35
|
-
import { i as oe } from "../index-
|
|
34
|
+
var se = (o, e, s) => (e = o[_t("asyncIterator")]) ? e.call(o) : (o = o[_t("iterator")](), e = {}, s = (a, l) => (l = o[a]) && (e[a] = (v) => new Promise((S, f, c) => (v = l.call(o, v), c = v.done, Promise.resolve(v.value).then((p) => S({ value: p, done: c }), f)))), s("next"), s("return"), e);
|
|
35
|
+
import { i as oe } from "../index-e9eDuagL.js";
|
|
36
|
+
import { i as ye, e as ae, c as ie } from "../dom-BETkVSSZ.js";
|
|
36
37
|
import { d as q } from "../events-CsVF98U6.js";
|
|
37
|
-
import { w as
|
|
38
|
+
import { w as we, s as be } from "../scroll-DY5senkF.js";
|
|
38
39
|
import "construct-style-sheets-polyfill";
|
|
39
|
-
import { a as Pe, c as qt,
|
|
40
|
+
import { a as Pe, c as qt, d as Ae } from "../url-CYgo5vrG.js";
|
|
40
41
|
import { cssValueParser as ke } from "../css-value-parser/index.js";
|
|
41
42
|
import { c as he } from "../string-BlMQbe8b.js";
|
|
42
43
|
class le extends HTMLElement {
|
|
@@ -51,44 +52,44 @@ class le extends HTMLElement {
|
|
|
51
52
|
}
|
|
52
53
|
}
|
|
53
54
|
oe && !customElements.get("morph-announcer") && customElements.define("morph-announcer", le);
|
|
54
|
-
var
|
|
55
|
+
var M, i, D, it, ce, gt, rt;
|
|
55
56
|
class It {
|
|
56
57
|
constructor(e, s) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
e.preventDefault(),
|
|
58
|
+
h(this, D);
|
|
59
|
+
h(this, M);
|
|
60
|
+
h(this, i);
|
|
61
|
+
h(this, gt, (e) => {
|
|
62
|
+
e.preventDefault(), y(this, D, ce).call(this);
|
|
62
63
|
});
|
|
63
|
-
|
|
64
|
+
h(this, rt, () => {
|
|
64
65
|
const e = t(this, i).hasAttribute("data-revalidate");
|
|
65
|
-
t(this,
|
|
66
|
+
t(this, M).prefetch(t(this, D, it), e), t(this, i).removeEventListener("pointerenter", t(this, rt));
|
|
66
67
|
});
|
|
67
|
-
n(this,
|
|
68
|
+
n(this, M, s), n(this, i, e), t(this, i).addEventListener("click", t(this, gt)), this.checkCurrent(location.href.replace(location.origin, "")), t(this, i).hasAttribute("data-prefetch") && t(this, i).addEventListener("pointerenter", t(this, rt));
|
|
68
69
|
}
|
|
69
70
|
get element() {
|
|
70
71
|
return t(this, i);
|
|
71
72
|
}
|
|
72
73
|
checkCurrent(e) {
|
|
73
|
-
var
|
|
74
|
-
const s = t(this,
|
|
75
|
-
t(this, i).hasAttribute("data-include") && s.pathname.includes(a.pathname) ? t(this, i).classList.add("current") : a.pathname === s.pathname ? t(this, i).classList.add("current") : (
|
|
76
|
-
const [
|
|
74
|
+
var p, st;
|
|
75
|
+
const s = t(this, M).normalizePath(e), a = t(this, M).normalizePath(t(this, D, it));
|
|
76
|
+
t(this, i).hasAttribute("data-include") && s.pathname.includes(a.pathname) ? t(this, i).classList.add("current") : a.pathname === s.pathname ? t(this, i).classList.add("current") : (p = t(this, i).getAttribute("data-associated-paths")) != null && p.split(",").find((A) => s.pathname.includes(A)) ? t(this, i).classList.add("current") : t(this, i).classList.remove("current"), s.path === a.path ? t(this, i).classList.add("exact") : t(this, i).classList.remove("exact");
|
|
77
|
+
const [l, v] = (st = t(this, D, it).split("#")[0]) == null ? void 0 : st.split("?"), S = new URLSearchParams(v), f = new URLSearchParams(location.search);
|
|
77
78
|
let c = 0;
|
|
78
|
-
for (const [A] of
|
|
79
|
-
|
|
79
|
+
for (const [A] of f)
|
|
80
|
+
S.has(A) && f.get(A) === S.get(A) && c++;
|
|
80
81
|
c ? (t(this, i).classList.toggle(
|
|
81
82
|
"all-params-matched",
|
|
82
|
-
|
|
83
|
+
f.size === c
|
|
83
84
|
), t(this, i).classList.toggle(
|
|
84
85
|
"some-params-matched",
|
|
85
|
-
|
|
86
|
-
)) : !
|
|
86
|
+
f.size !== c
|
|
87
|
+
)) : !f.size && t(this, i).hasAttribute("data-match-no-params") ? t(this, i).classList.add("all-params-matched") : (t(this, i).classList.remove("all-params-matched"), t(this, i).classList.remove("some-params-matched"));
|
|
87
88
|
for (const A in t(this, i).dataset) {
|
|
88
89
|
const at = he(A);
|
|
89
90
|
if (at.startsWith("match-param-")) {
|
|
90
|
-
const z = at.split("match-param-")[1],
|
|
91
|
-
|
|
91
|
+
const z = at.split("match-param-")[1], b = t(this, i).dataset[A], G = `param-${z}-matched`;
|
|
92
|
+
f.has(z) && f.get(z) === b || !f.has(z) && (b === "" || b === "*" || b === "all" || b === "any" || b === "vse") ? t(this, i).classList.add(G) : t(this, i).classList.remove(G);
|
|
92
93
|
}
|
|
93
94
|
}
|
|
94
95
|
}
|
|
@@ -96,44 +97,44 @@ class It {
|
|
|
96
97
|
t(this, i).removeEventListener("click", t(this, gt)), t(this, i).removeEventListener("pointerenter", t(this, rt)), t(this, i).classList.remove("current", "exact");
|
|
97
98
|
}
|
|
98
99
|
}
|
|
99
|
-
|
|
100
|
+
M = new WeakMap(), i = new WeakMap(), D = new WeakSet(), it = function() {
|
|
100
101
|
const e = new URL(t(this, i).href);
|
|
101
|
-
return t(this,
|
|
102
|
+
return t(this, M).normalizePath(
|
|
102
103
|
e.pathname + e.search + e.hash
|
|
103
104
|
).path;
|
|
104
105
|
}, ce = function() {
|
|
105
106
|
var s;
|
|
106
107
|
if (document.documentElement.classList.contains("click-disabled"))
|
|
107
108
|
return;
|
|
108
|
-
if (t(this, i).hasAttribute("data-back") && t(this,
|
|
109
|
+
if (t(this, i).hasAttribute("data-back") && t(this, M).previousURL)
|
|
109
110
|
history.back();
|
|
110
111
|
else {
|
|
111
112
|
const a = t(this, i).getAttribute(
|
|
112
113
|
"data-history-action"
|
|
113
|
-
) || "push",
|
|
114
|
+
) || "push", l = t(this, i).hasAttribute("data-center-scroll"), v = getComputedStyle(t(this, i)).getPropertyValue("--offset-scroll").trim(), S = v ? ke.parse(v) : void 0, f = t(this, i).hasAttribute("data-revalidate") || t(this, i).hasAttribute("data-pagination-more-link") || t(this, i).hasAttribute("data-pagination-set-link") || t(this, i).hasAttribute("data-pagination-next-link") || t(this, i).hasAttribute("data-pagination-prev-link"), c = t(this, i).hasAttribute(
|
|
114
115
|
"data-keep-search-parameters"
|
|
115
|
-
),
|
|
116
|
+
), p = t(this, i).hasAttribute("data-keep-scroll-position") || t(this, i).hasAttribute("data-pagination-more-link"), st = t(this, i).getAttribute(
|
|
116
117
|
"data-scroll-behaviour"
|
|
117
|
-
), A = (s = t(this, i).getAttribute("data-submorph") || t(this, i).getAttribute("data-submorph-append")) == null ? void 0 : s.split(",").map((
|
|
118
|
+
), A = (s = t(this, i).getAttribute("data-submorph") || t(this, i).getAttribute("data-submorph-append")) == null ? void 0 : s.split(",").map((b) => b.trim()), at = t(this, i).hasAttribute("data-clear-state");
|
|
118
119
|
let z = t(this, D, it);
|
|
119
120
|
if (t(this, i).hasAttribute("data-toggle-params")) {
|
|
120
|
-
const [
|
|
121
|
+
const [b, G] = t(this, D, it).split("?"), At = new URLSearchParams(G), F = new URLSearchParams(location.search), d = new URLSearchParams();
|
|
121
122
|
for (const [R] of At)
|
|
122
123
|
(!F.has(R) || F.has(R) && F.get(R) !== At.get(R)) && d.append(R, At.get(R));
|
|
123
124
|
if (t(this, i).hasAttribute("data-merge-params"))
|
|
124
125
|
for (const [R] of F)
|
|
125
126
|
At.has(R) || d.append(R, F.get(R));
|
|
126
|
-
z = `${
|
|
127
|
+
z = `${b}?${d.toString()}`;
|
|
127
128
|
}
|
|
128
|
-
t(this,
|
|
129
|
+
t(this, M).navigate(z, {
|
|
129
130
|
historyAction: a,
|
|
130
|
-
centerScroll:
|
|
131
|
-
offsetScroll:
|
|
132
|
-
revalidate:
|
|
131
|
+
centerScroll: l,
|
|
132
|
+
offsetScroll: S,
|
|
133
|
+
revalidate: f,
|
|
133
134
|
keepSearchParameters: c,
|
|
134
135
|
submorph: A,
|
|
135
136
|
clearState: at,
|
|
136
|
-
keepScrollPosition:
|
|
137
|
+
keepScrollPosition: p,
|
|
137
138
|
scrollBehaviour: st,
|
|
138
139
|
submorphAppend: t(this, i).hasAttribute("data-submorph-append"),
|
|
139
140
|
mergeParams: t(this, i).hasAttribute("data-merge-params") && !t(this, i).hasAttribute("data-toggle-params"),
|
|
@@ -146,27 +147,27 @@ N = new WeakMap(), i = new WeakMap(), D = new WeakSet(), it = function() {
|
|
|
146
147
|
var C, nt, Et, Wt, vt;
|
|
147
148
|
class Re {
|
|
148
149
|
constructor(e) {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
150
|
+
h(this, Et);
|
|
151
|
+
h(this, C);
|
|
152
|
+
h(this, nt, []);
|
|
153
|
+
h(this, vt, () => {
|
|
154
|
+
y(this, Et, Wt).call(this);
|
|
154
155
|
});
|
|
155
156
|
n(this, C, e);
|
|
156
157
|
for (const s in t(this, C).dataset) {
|
|
157
158
|
const a = he(s);
|
|
158
159
|
if (a.startsWith("param-")) {
|
|
159
|
-
const
|
|
160
|
+
const l = a.split("param-")[1], v = t(this, C).dataset[s];
|
|
160
161
|
t(this, nt).push({
|
|
161
|
-
name:
|
|
162
|
-
value:
|
|
162
|
+
name: l,
|
|
163
|
+
value: v
|
|
163
164
|
});
|
|
164
165
|
}
|
|
165
166
|
}
|
|
166
167
|
document.addEventListener(
|
|
167
168
|
"morphURLParametersChange",
|
|
168
169
|
t(this, vt)
|
|
169
|
-
),
|
|
170
|
+
), y(this, Et, Wt).call(this);
|
|
170
171
|
}
|
|
171
172
|
destroy() {
|
|
172
173
|
document.removeEventListener(
|
|
@@ -177,33 +178,33 @@ class Re {
|
|
|
177
178
|
}
|
|
178
179
|
C = new WeakMap(), nt = new WeakMap(), Et = new WeakSet(), Wt = function() {
|
|
179
180
|
const e = new URLSearchParams(location.search);
|
|
180
|
-
let s = !!t(this, nt).find((
|
|
181
|
-
!s && t(this, C).hasAttribute("data-match-no-params") && (s = !t(this, nt).filter((
|
|
181
|
+
let s = !!t(this, nt).find((l) => e.has(l.name) && (e.get(l.name) === l.value || l.value === "*" || l.value === "all" || l.value === "any" || l.value === "vse" || e.get(l.name) === "*" || e.get(l.name) === "all" || e.get(l.name) === "any" || e.get(l.name) === "vse"));
|
|
182
|
+
!s && t(this, C).hasAttribute("data-match-no-params") && (s = !t(this, nt).filter((l) => e.has(l.name)).length);
|
|
182
183
|
const a = t(this, C).getAttribute("data-hide-class");
|
|
183
184
|
s ? a ? t(this, C).classList.remove(a) : t(this, C).style.display = "" : a ? t(this, C).classList.add(a) : t(this, C).style.display = "none";
|
|
184
185
|
}, vt = new WeakMap();
|
|
185
186
|
const Ce = new DOMParser();
|
|
186
|
-
var I, Q,
|
|
187
|
+
var I, Q, U, W, Z, K, ot, _, Y, Lt, ht;
|
|
187
188
|
class re {
|
|
188
189
|
constructor(e, s) {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
190
|
+
h(this, I);
|
|
191
|
+
h(this, Q);
|
|
192
|
+
h(this, U, { x: 0, y: 0 });
|
|
193
|
+
h(this, W, null);
|
|
194
|
+
h(this, Z, null);
|
|
195
|
+
h(this, K, null);
|
|
196
|
+
h(this, ot, null);
|
|
197
|
+
h(this, _, null);
|
|
198
|
+
h(this, Y, null);
|
|
199
|
+
h(this, Lt);
|
|
200
|
+
h(this, ht, !1);
|
|
200
201
|
n(this, I, e), n(this, Q, s);
|
|
201
202
|
}
|
|
202
203
|
get pathname() {
|
|
203
204
|
return t(this, Q);
|
|
204
205
|
}
|
|
205
206
|
get scrollState() {
|
|
206
|
-
return t(this,
|
|
207
|
+
return t(this, U);
|
|
207
208
|
}
|
|
208
209
|
get document() {
|
|
209
210
|
return t(this, K);
|
|
@@ -225,29 +226,29 @@ class re {
|
|
|
225
226
|
}
|
|
226
227
|
fetch(e, s, a) {
|
|
227
228
|
return J(this, null, function* () {
|
|
228
|
-
var
|
|
229
|
+
var l;
|
|
229
230
|
if (!a && !t(this, ht)) {
|
|
230
|
-
const
|
|
231
|
-
if (t(this, Y) ||
|
|
231
|
+
const f = ((l = t(this, W)) == null ? void 0 : l.documentElement.getAttribute("data-cache")) && s !== e, c = t(this, W) && t(this, I).isPopstateNavigation;
|
|
232
|
+
if (t(this, Y) || f || c)
|
|
232
233
|
return t(this, Y);
|
|
233
234
|
}
|
|
234
|
-
return n(this, Y, new Promise((
|
|
235
|
+
return n(this, Y, new Promise((v) => J(this, null, function* () {
|
|
235
236
|
try {
|
|
236
237
|
n(this, _, new AbortController());
|
|
237
|
-
const
|
|
238
|
+
const f = yield (yield fetch(e, {
|
|
238
239
|
signal: t(this, _).signal,
|
|
239
|
-
headers:
|
|
240
|
+
headers: Ut({
|
|
240
241
|
"X-MORPH": "true",
|
|
241
|
-
"X-MORPH-
|
|
242
|
+
"X-MORPH-REVALIDATE": a ? "true" : "false",
|
|
242
243
|
"X-MORPH-CURRENT-PATH": encodeURIComponent(s),
|
|
243
244
|
"X-MORPH-NEW-PATH": encodeURIComponent(e)
|
|
244
245
|
}, t(this, Lt))
|
|
245
|
-
})).text(), c = Ce.parseFromString(
|
|
246
|
+
})).text(), c = Ce.parseFromString(f, "text/html");
|
|
246
247
|
this.setInitialDocument(c), n(this, ht, !1);
|
|
247
|
-
} catch (
|
|
248
|
-
console.warn(
|
|
248
|
+
} catch (S) {
|
|
249
|
+
console.warn(S);
|
|
249
250
|
} finally {
|
|
250
|
-
n(this, _, null), n(this, Y, null),
|
|
251
|
+
n(this, _, null), n(this, Y, null), v();
|
|
251
252
|
}
|
|
252
253
|
}))), t(this, Y);
|
|
253
254
|
});
|
|
@@ -266,7 +267,7 @@ class re {
|
|
|
266
267
|
return e;
|
|
267
268
|
}
|
|
268
269
|
clearScrollState() {
|
|
269
|
-
t(this,
|
|
270
|
+
t(this, U).x = 0, t(this, U).y = 0;
|
|
270
271
|
}
|
|
271
272
|
clearDocumentState() {
|
|
272
273
|
n(this, Z, null);
|
|
@@ -274,12 +275,12 @@ class re {
|
|
|
274
275
|
saveScrollState() {
|
|
275
276
|
t(this, W).documentElement.hasAttribute(
|
|
276
277
|
"data-no-scroll-restoration"
|
|
277
|
-
) ? (t(this,
|
|
278
|
+
) ? (t(this, U).x = 0, t(this, U).y = 0) : (t(this, U).x = t(this, I).scrollValue.left, t(this, U).y = t(this, I).scrollValue.top);
|
|
278
279
|
}
|
|
279
280
|
restoreScrollPosition() {
|
|
280
281
|
t(this, I).scrollElement.scroll({
|
|
281
|
-
top: t(this,
|
|
282
|
-
left: t(this,
|
|
282
|
+
top: t(this, U).y,
|
|
283
|
+
left: t(this, U).x,
|
|
283
284
|
behavior: "instant"
|
|
284
285
|
});
|
|
285
286
|
}
|
|
@@ -303,43 +304,43 @@ class re {
|
|
|
303
304
|
return n(this, ot, null), e;
|
|
304
305
|
}
|
|
305
306
|
}
|
|
306
|
-
I = new WeakMap(), Q = new WeakMap(),
|
|
307
|
-
var
|
|
307
|
+
I = new WeakMap(), Q = new WeakMap(), U = new WeakMap(), W = new WeakMap(), Z = new WeakMap(), K = new WeakMap(), ot = new WeakMap(), _ = new WeakMap(), Y = new WeakMap(), Lt = new WeakMap(), ht = new WeakMap();
|
|
308
|
+
var T, lt, w, $, u, tt, V, j, x, St, O, yt, et, ct, dt, wt, mt, bt, Pt, E, ft, Vt, Ot, Ft, Nt, xt, ut;
|
|
308
309
|
const pt = class pt {
|
|
309
310
|
constructor(e) {
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
311
|
+
h(this, E);
|
|
312
|
+
h(this, T, null);
|
|
313
|
+
h(this, lt, null);
|
|
314
|
+
h(this, w, []);
|
|
315
|
+
h(this, $);
|
|
316
|
+
h(this, u, null);
|
|
317
|
+
h(this, tt);
|
|
318
|
+
h(this, V, []);
|
|
319
|
+
h(this, j, !1);
|
|
320
|
+
h(this, x, null);
|
|
321
|
+
h(this, St, !1);
|
|
322
|
+
h(this, O, /* @__PURE__ */ new Map());
|
|
323
|
+
h(this, yt, []);
|
|
324
|
+
h(this, et, null);
|
|
325
|
+
h(this, ct, 0);
|
|
326
|
+
h(this, dt, 0);
|
|
327
|
+
h(this, wt);
|
|
328
|
+
h(this, mt);
|
|
329
|
+
h(this, bt);
|
|
330
|
+
h(this, Pt, (e) => {
|
|
330
331
|
var s, a;
|
|
331
332
|
return (((s = e.getAttribute("href")) == null ? void 0 : s.startsWith("/")) || ((a = e.getAttribute("href")) == null ? void 0 : a.startsWith("?"))) && !e.hasAttribute("download") && !e.hasAttribute("data-morph-skip") && !e.closest("[data-morph-skip]") && e.getAttribute("target") !== "_blank";
|
|
332
333
|
});
|
|
333
|
-
|
|
334
|
+
h(this, xt, (e) => J(this, null, function* () {
|
|
334
335
|
e.preventDefault(), n(this, j, !0), yield this.navigate(location.href.replace(location.origin, ""), {
|
|
335
336
|
historyAction: "none",
|
|
336
|
-
submorph: t(this,
|
|
337
|
-
revalidate: t(this,
|
|
338
|
-
keepScrollPosition: t(this,
|
|
337
|
+
submorph: t(this, mt) ? void 0 : t(this, wt),
|
|
338
|
+
revalidate: t(this, mt),
|
|
339
|
+
keepScrollPosition: t(this, bt)
|
|
339
340
|
}), n(this, j, !1);
|
|
340
341
|
}));
|
|
341
|
-
|
|
342
|
-
const { left: e, top: s } = this.scrollValue, a = s - t(this, dt),
|
|
342
|
+
h(this, ut, () => {
|
|
343
|
+
const { left: e, top: s } = this.scrollValue, a = s - t(this, dt), l = e - t(this, ct);
|
|
343
344
|
n(this, dt, s), n(this, ct, e), document.documentElement.classList.toggle("scroll-y", s > 0), document.documentElement.classList.toggle("scroll-x", e > 0), document.documentElement.classList.toggle(
|
|
344
345
|
"scroll-y-forward",
|
|
345
346
|
a > 0
|
|
@@ -348,10 +349,10 @@ const pt = class pt {
|
|
|
348
349
|
a < 0
|
|
349
350
|
), document.documentElement.classList.toggle(
|
|
350
351
|
"scroll-x-forward",
|
|
351
|
-
|
|
352
|
+
l > 0
|
|
352
353
|
), document.documentElement.classList.toggle(
|
|
353
354
|
"scroll-x-backward",
|
|
354
|
-
|
|
355
|
+
l < 0
|
|
355
356
|
), q(document, "morphScroll", {
|
|
356
357
|
detail: {
|
|
357
358
|
left: e,
|
|
@@ -360,78 +361,78 @@ const pt = class pt {
|
|
|
360
361
|
});
|
|
361
362
|
});
|
|
362
363
|
if (oe && !pt.instance) {
|
|
363
|
-
pt.instance = this, n(this,
|
|
364
|
+
pt.instance = this, n(this, T, {
|
|
364
365
|
base: Pe(e == null ? void 0 : e.base),
|
|
365
366
|
waitForHeadToLoad: (e == null ? void 0 : e.waitForHeadToLoad) !== !1,
|
|
366
367
|
trailingSlash: (e == null ? void 0 : e.trailingSlash) || !1,
|
|
367
368
|
scrollSelector: e == null ? void 0 : e.scrollSelector,
|
|
368
369
|
morphInsideScrollContainer: (e == null ? void 0 : e.morphInsideScrollContainer) || !1
|
|
369
|
-
}), n(this, lt,
|
|
370
|
+
}), n(this, lt, y(this, E, Vt).call(this, document.body));
|
|
370
371
|
const s = this.normalizePath(
|
|
371
372
|
location.pathname + location.search + location.hash
|
|
372
373
|
);
|
|
373
|
-
n(this,
|
|
374
|
-
const a = new re(this, t(this,
|
|
375
|
-
a.setInitialDocument(document), t(this, O).set(t(this,
|
|
374
|
+
n(this, u, s);
|
|
375
|
+
const a = new re(this, t(this, u).pathname);
|
|
376
|
+
a.setInitialDocument(document), t(this, O).set(t(this, u).pathname, a), document.documentElement.setAttribute(
|
|
376
377
|
"data-current-pathname",
|
|
377
|
-
t(this,
|
|
378
|
+
t(this, u).pathname
|
|
378
379
|
), document.documentElement.setAttribute(
|
|
379
380
|
"data-current-leaf",
|
|
380
381
|
s.leaf
|
|
381
|
-
), this.findLinks(), this.findParamsDependent(), history.scrollRestoration = "manual", addEventListener("popstate", t(this,
|
|
382
|
+
), this.findLinks(), this.findParamsDependent(), history.scrollRestoration = "manual", addEventListener("popstate", t(this, xt)), qt({
|
|
382
383
|
action: "replace",
|
|
383
384
|
pathname: s.pathname,
|
|
384
385
|
searchParameters: s.parameters,
|
|
385
386
|
hash: s.hash
|
|
386
|
-
}), n(this, et, new le()),
|
|
387
|
+
}), n(this, et, new le()), y(this, E, Ft).call(this, document);
|
|
387
388
|
}
|
|
388
389
|
}
|
|
389
390
|
get currentURL() {
|
|
390
|
-
return t(this,
|
|
391
|
+
return t(this, u);
|
|
391
392
|
}
|
|
392
393
|
get previousURL() {
|
|
393
394
|
return t(this, tt);
|
|
394
395
|
}
|
|
395
396
|
get links() {
|
|
396
|
-
return t(this,
|
|
397
|
+
return t(this, w);
|
|
397
398
|
}
|
|
398
399
|
get scrollElement() {
|
|
399
|
-
return t(this,
|
|
400
|
+
return t(this, x);
|
|
400
401
|
}
|
|
401
402
|
get isPopstateNavigation() {
|
|
402
403
|
return t(this, j);
|
|
403
404
|
}
|
|
404
405
|
get scrollValue() {
|
|
405
406
|
let e = 0, s = 0;
|
|
406
|
-
return t(this, St) ? (e = window.scrollY, s = window.scrollX) : (e = t(this,
|
|
407
|
+
return t(this, St) ? (e = window.scrollY, s = window.scrollX) : (e = t(this, x).scrollTop, s = t(this, x).scrollLeft), { top: e, left: s };
|
|
407
408
|
}
|
|
408
409
|
get isNavigating() {
|
|
409
410
|
return !!t(this, V).length;
|
|
410
411
|
}
|
|
411
412
|
saveState(e) {
|
|
412
|
-
const s = t(this, O).get(t(this,
|
|
413
|
+
const s = t(this, O).get(t(this, u).path);
|
|
413
414
|
s && s.saveState(e);
|
|
414
415
|
}
|
|
415
416
|
getState() {
|
|
416
|
-
const e = t(this, O).get(t(this,
|
|
417
|
+
const e = t(this, O).get(t(this, u).path);
|
|
417
418
|
return e == null ? void 0 : e.clearState();
|
|
418
419
|
}
|
|
419
420
|
normalizePath(e, s) {
|
|
420
421
|
return Ae(e, {
|
|
421
|
-
base: t(this,
|
|
422
|
-
trailingSlash: t(this,
|
|
422
|
+
base: t(this, T).base,
|
|
423
|
+
trailingSlash: t(this, T).trailingSlash,
|
|
423
424
|
mergeParams: s != null && s.mergeParams ? location.search : "",
|
|
424
425
|
removeParams: s == null ? void 0 : s.removeParams
|
|
425
426
|
});
|
|
426
427
|
}
|
|
427
428
|
prefetch(e, s) {
|
|
428
429
|
return J(this, null, function* () {
|
|
429
|
-
var
|
|
430
|
+
var l;
|
|
430
431
|
if (t(this, V).length)
|
|
431
432
|
return;
|
|
432
|
-
e = ((
|
|
433
|
-
const a =
|
|
434
|
-
a == null || a.fetch(e, t(this,
|
|
433
|
+
e = ((l = this.pathnameModifier) == null ? void 0 : l.call(this, e)) || e;
|
|
434
|
+
const a = y(this, E, ft).call(this, e);
|
|
435
|
+
a == null || a.fetch(e, t(this, u).path, s);
|
|
435
436
|
});
|
|
436
437
|
}
|
|
437
438
|
excludeHeadChild(e) {
|
|
@@ -440,60 +441,60 @@ const pt = class pt {
|
|
|
440
441
|
setHeaders(e) {
|
|
441
442
|
}
|
|
442
443
|
needRavalidation(e) {
|
|
443
|
-
const s = this.normalizePath(e), a =
|
|
444
|
+
const s = this.normalizePath(e), a = y(this, E, ft).call(this, s.path);
|
|
444
445
|
a == null || a.needRavalidation();
|
|
445
446
|
}
|
|
446
447
|
navigate(At) {
|
|
447
448
|
return J(this, arguments, function* (e, {
|
|
448
449
|
historyAction: s = "push",
|
|
449
450
|
centerScroll: a,
|
|
450
|
-
offsetScroll:
|
|
451
|
-
scrollBehaviour:
|
|
452
|
-
revalidate:
|
|
453
|
-
keepSearchParameters:
|
|
451
|
+
offsetScroll: l,
|
|
452
|
+
scrollBehaviour: v,
|
|
453
|
+
revalidate: S,
|
|
454
|
+
keepSearchParameters: f,
|
|
454
455
|
submorph: c,
|
|
455
|
-
submorphAppend:
|
|
456
|
+
submorphAppend: p,
|
|
456
457
|
clearState: st,
|
|
457
458
|
keepScrollPosition: A,
|
|
458
459
|
mergeParams: at,
|
|
459
460
|
removeParams: z,
|
|
460
|
-
detail:
|
|
461
|
+
detail: b,
|
|
461
462
|
scrollTo: G
|
|
462
463
|
} = {}) {
|
|
463
|
-
var R,
|
|
464
|
+
var R, Xt, Bt, Kt;
|
|
464
465
|
if (t(this, V).length)
|
|
465
466
|
return;
|
|
466
|
-
n(this,
|
|
467
|
+
n(this, wt, c), n(this, mt, S), n(this, bt, A);
|
|
467
468
|
const F = ((R = this.pathnameModifier) == null ? void 0 : R.call(this, e)) || e, d = this.normalizePath(F, {
|
|
468
469
|
mergeParams: at,
|
|
469
470
|
removeParams: z
|
|
470
471
|
});
|
|
471
|
-
if (!
|
|
472
|
-
A ||
|
|
472
|
+
if (!S && (((Xt = t(this, $)) == null ? void 0 : Xt.pathname) === d.pathname || t(this, u).pathname === d.pathname)) {
|
|
473
|
+
A || y(this, E, Nt).call(this, d.hash || 0, {
|
|
473
474
|
centerScroll: a,
|
|
474
|
-
offsetScroll:
|
|
475
|
+
offsetScroll: l,
|
|
475
476
|
behavior: "smooth"
|
|
476
477
|
}), q(document, "morphSamePath", {
|
|
477
478
|
detail: {
|
|
478
|
-
detail:
|
|
479
|
+
detail: b
|
|
479
480
|
}
|
|
480
|
-
}), ((
|
|
481
|
-
action: ((
|
|
481
|
+
}), ((Bt = t(this, u)) == null ? void 0 : Bt.parameters) !== d.parameters && (n(this, tt, t(this, u)), n(this, u, d), qt({
|
|
482
|
+
action: ((Kt = t(this, u)) == null ? void 0 : Kt.hash) !== d.hash ? "replace" : s,
|
|
482
483
|
pathname: d.pathname,
|
|
483
484
|
searchParameters: d.parameters,
|
|
484
485
|
hash: d.hash
|
|
485
486
|
}), q(document, "morphURLParametersChange", {
|
|
486
487
|
detail: {
|
|
487
|
-
newURL: t(this,
|
|
488
|
+
newURL: t(this, u),
|
|
488
489
|
previousURL: t(this, tt),
|
|
489
|
-
detail:
|
|
490
|
+
detail: b
|
|
490
491
|
}
|
|
491
|
-
})), t(this,
|
|
492
|
+
})), t(this, w).forEach((X) => {
|
|
492
493
|
X.checkCurrent(d.path);
|
|
493
494
|
});
|
|
494
495
|
return;
|
|
495
496
|
} else
|
|
496
|
-
t(this,
|
|
497
|
+
t(this, w).forEach((X) => {
|
|
497
498
|
X.checkCurrent(d.path);
|
|
498
499
|
});
|
|
499
500
|
n(this, $, d);
|
|
@@ -502,95 +503,106 @@ const pt = class pt {
|
|
|
502
503
|
if (this.preprocessor)
|
|
503
504
|
try {
|
|
504
505
|
yield new Promise((r, P) => {
|
|
505
|
-
var
|
|
506
|
-
(
|
|
506
|
+
var N;
|
|
507
|
+
(N = this.preprocessor) == null || N.call(this, {
|
|
507
508
|
url: d,
|
|
508
509
|
resolve: r,
|
|
509
510
|
reject: P,
|
|
510
511
|
submorph: c,
|
|
511
|
-
detail:
|
|
512
|
+
detail: b
|
|
512
513
|
});
|
|
513
514
|
});
|
|
514
515
|
} catch (r) {
|
|
515
516
|
r ? console.error(r) : console.log("Route change canceled"), X = !1;
|
|
516
517
|
}
|
|
517
518
|
if (!X || t(this, $).pathname !== d.pathname) {
|
|
518
|
-
t(this,
|
|
519
|
-
r.checkCurrent(t(this,
|
|
519
|
+
t(this, w).forEach((r) => {
|
|
520
|
+
r.checkCurrent(t(this, u).path);
|
|
520
521
|
});
|
|
521
522
|
return;
|
|
522
523
|
}
|
|
523
|
-
const
|
|
524
|
+
const Yt = {
|
|
524
525
|
url: d,
|
|
525
526
|
submorph: c,
|
|
526
|
-
detail:
|
|
527
|
+
detail: b
|
|
527
528
|
};
|
|
528
|
-
c ?
|
|
529
|
+
c ? p || c.forEach((r) => {
|
|
529
530
|
document.querySelectorAll(r).forEach((P) => {
|
|
530
531
|
P.classList.add("out"), P.setAttribute("data-morph-out", "");
|
|
531
532
|
});
|
|
532
533
|
}) : t(this, lt).forEach((r) => {
|
|
533
|
-
var P,
|
|
534
|
-
(P = r.firstElementChild) == null || P.classList.add("out"), (
|
|
534
|
+
var P, N;
|
|
535
|
+
(P = r.firstElementChild) == null || P.classList.add("out"), (N = r.firstElementChild) == null || N.setAttribute("data-morph-out", "");
|
|
535
536
|
}), q(document, "morphNavigation", {
|
|
536
|
-
detail:
|
|
537
|
+
detail: Yt
|
|
537
538
|
});
|
|
538
|
-
const
|
|
539
|
+
const Ht = y(this, E, ft).call(this, t(this, u).pathname), L = y(this, E, ft).call(this, d.pathname);
|
|
539
540
|
if (t(this, O).forEach((r) => {
|
|
540
541
|
r.pathname !== d.pathname && r.abort();
|
|
541
|
-
}), yield
|
|
542
|
-
t(this,
|
|
543
|
-
r.checkCurrent(t(this,
|
|
542
|
+
}), yield L == null ? void 0 : L.fetch(F, t(this, u).path, S), t(this, $).pathname !== d.pathname) {
|
|
543
|
+
t(this, w).forEach((r) => {
|
|
544
|
+
r.checkCurrent(t(this, u).path);
|
|
544
545
|
});
|
|
545
546
|
return;
|
|
546
547
|
}
|
|
547
|
-
|
|
548
|
-
const kt = Dt(
|
|
549
|
-
document:
|
|
548
|
+
Ht.clearState(), Ht.saveScrollState(), Ht.saveDocumentState(), (!t(this, j) || S) && (L.clearScrollState(), L.clearDocumentState()), st && L.clearState(), L.cloneDocument(), t(this, et).textContent = L.title, document.body.appendChild(t(this, et));
|
|
549
|
+
const kt = Dt(Ut({}, Yt), {
|
|
550
|
+
document: L.document
|
|
550
551
|
});
|
|
551
|
-
|
|
552
|
+
p || kt.document.querySelectorAll("[data-morph-out]").forEach((r) => {
|
|
552
553
|
r.classList.remove("out");
|
|
553
554
|
}), q(document, "morphStart", {
|
|
554
555
|
detail: kt
|
|
555
556
|
});
|
|
556
|
-
const
|
|
557
|
+
const $t = Array.from(document.head.children), jt = Array.from(L.document.head.children), Gt = ye(
|
|
558
|
+
$t,
|
|
559
|
+
jt
|
|
560
|
+
), de = ae(
|
|
561
|
+
$t,
|
|
562
|
+
Gt
|
|
563
|
+
), Rt = ae(
|
|
564
|
+
jt,
|
|
565
|
+
Gt
|
|
566
|
+
).filter((r) => !this.excludeHeadChild(r));
|
|
557
567
|
Rt.forEach((r, P) => {
|
|
558
|
-
r.tagName === "SCRIPT" && (Rt[P] =
|
|
568
|
+
r.tagName === "SCRIPT" && (Rt[P] = ie(
|
|
569
|
+
r
|
|
570
|
+
));
|
|
559
571
|
}), Rt.forEach((r) => {
|
|
560
572
|
document.head.appendChild(r);
|
|
561
573
|
});
|
|
562
|
-
const
|
|
574
|
+
const Mt = Rt.filter((r) => {
|
|
563
575
|
if (r.hasAttribute("data-no-waiting"))
|
|
564
576
|
return !1;
|
|
565
|
-
if (
|
|
577
|
+
if (y(this, E, Ot).call(this, r))
|
|
566
578
|
return !0;
|
|
567
579
|
});
|
|
568
|
-
t(this,
|
|
580
|
+
t(this, T).waitForHeadToLoad && Mt.length && (yield new Promise((r) => J(this, null, function* () {
|
|
569
581
|
let P = 0;
|
|
570
582
|
try {
|
|
571
|
-
for (var
|
|
583
|
+
for (var N = se(Mt), ue, B, H; ue = !(B = yield N.next()).done; ue = !1) {
|
|
572
584
|
const Ct = B.value;
|
|
573
585
|
Ct.onload = () => {
|
|
574
|
-
P++, P ===
|
|
586
|
+
P++, P === Mt.length && r();
|
|
575
587
|
};
|
|
576
588
|
}
|
|
577
589
|
} catch (B) {
|
|
578
|
-
|
|
590
|
+
H = [B];
|
|
579
591
|
} finally {
|
|
580
592
|
try {
|
|
581
|
-
|
|
593
|
+
ue && (B = N.return) && (yield B.call(N));
|
|
582
594
|
} finally {
|
|
583
|
-
if (
|
|
584
|
-
throw
|
|
595
|
+
if (H)
|
|
596
|
+
throw H[0];
|
|
585
597
|
}
|
|
586
598
|
}
|
|
587
|
-
}))), yield
|
|
588
|
-
const
|
|
589
|
-
|
|
590
|
-
r.hasAttribute("data-permanent") || (
|
|
599
|
+
}))), yield we(10);
|
|
600
|
+
const Jt = [];
|
|
601
|
+
p || de.forEach((r) => {
|
|
602
|
+
r.hasAttribute("data-permanent") || (y(this, E, Ot).call(this, r) ? Jt.push(r) : r.remove());
|
|
591
603
|
});
|
|
592
|
-
const me =
|
|
593
|
-
!t(this,
|
|
604
|
+
const me = y(this, E, Vt).call(this, L.document.body);
|
|
605
|
+
!t(this, T).morphInsideScrollContainer && !c && y(this, E, Ft).call(this, L.document), document.documentElement.setAttribute(
|
|
594
606
|
"data-current-pathname",
|
|
595
607
|
d.pathname
|
|
596
608
|
), document.documentElement.setAttribute(
|
|
@@ -599,102 +611,102 @@ const pt = class pt {
|
|
|
599
611
|
), qt({
|
|
600
612
|
action: s,
|
|
601
613
|
pathname: d.pathname,
|
|
602
|
-
searchParameters: d.parameters || (
|
|
614
|
+
searchParameters: d.parameters || (f ? location.search : ""),
|
|
603
615
|
hash: d.hash
|
|
604
|
-
}), t(this, et).remove(), n(this, tt, t(this,
|
|
605
|
-
const
|
|
616
|
+
}), t(this, et).remove(), n(this, tt, t(this, u)), n(this, u, d);
|
|
617
|
+
const Tt = [];
|
|
606
618
|
t(this, lt).forEach((r, P) => {
|
|
607
|
-
const
|
|
608
|
-
let B = [],
|
|
609
|
-
c ? (c.forEach((
|
|
610
|
-
const
|
|
611
|
-
|
|
612
|
-
}),
|
|
613
|
-
|
|
614
|
-
})) : (B.push(...
|
|
619
|
+
const N = me[P], ue = getComputedStyle(r).getPropertyValue("--morph-duration");
|
|
620
|
+
let B = [], H = [];
|
|
621
|
+
c ? (c.forEach((m) => {
|
|
622
|
+
const g = r.querySelector(m), k = N.querySelector(m);
|
|
623
|
+
g && k && (H.push(g), B.push(k));
|
|
624
|
+
}), H.forEach((m) => {
|
|
625
|
+
m.parentElement && Tt.push(m.parentElement);
|
|
626
|
+
})) : (B.push(...N.childNodes), H.push(...r.childNodes), Tt.push(r));
|
|
615
627
|
const Ct = [];
|
|
616
|
-
|
|
617
|
-
|
|
628
|
+
p || H.forEach((m) => {
|
|
629
|
+
m instanceof HTMLElement && (this.destroyOldLinks(m), m.classList.add("old"), m.querySelectorAll(
|
|
618
630
|
"[data-morph-transfer]"
|
|
619
631
|
).forEach((k) => {
|
|
620
|
-
const
|
|
632
|
+
const pe = k.getAttribute("data-morph-transfer");
|
|
621
633
|
Ct.push({
|
|
622
634
|
element: k,
|
|
623
|
-
selector:
|
|
635
|
+
selector: pe
|
|
624
636
|
});
|
|
625
637
|
}));
|
|
626
|
-
}), B.forEach((
|
|
627
|
-
|
|
628
|
-
const k =
|
|
638
|
+
}), B.forEach((m) => {
|
|
639
|
+
m instanceof HTMLElement && (Ct.forEach((g) => {
|
|
640
|
+
const k = m.querySelector(g.selector);
|
|
629
641
|
k && k.replaceWith(
|
|
630
|
-
|
|
642
|
+
L.document.importNode(g.element, !0)
|
|
631
643
|
);
|
|
632
|
-
}), this.findNewLinks(
|
|
633
|
-
}), c ?
|
|
634
|
-
|
|
635
|
-
}) : B.forEach((
|
|
644
|
+
}), this.findNewLinks(m), m.classList.add("new"));
|
|
645
|
+
}), c ? p ? B.forEach((m, g) => {
|
|
646
|
+
H[g] instanceof HTMLElement && H[g].append(...m.childNodes);
|
|
647
|
+
}) : B.forEach((m, g) => {
|
|
636
648
|
var k;
|
|
637
|
-
(k =
|
|
638
|
-
|
|
639
|
-
|
|
649
|
+
(k = H[g].parentElement) == null || k.insertBefore(
|
|
650
|
+
m,
|
|
651
|
+
H[g]
|
|
640
652
|
);
|
|
641
653
|
}) : r.prepend(...B), setTimeout(() => {
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
}), B.forEach((
|
|
645
|
-
var
|
|
646
|
-
|
|
654
|
+
p || H.forEach((m) => {
|
|
655
|
+
m instanceof HTMLElement && m.classList.add("old-idle");
|
|
656
|
+
}), B.forEach((m) => {
|
|
657
|
+
var g;
|
|
658
|
+
m instanceof HTMLElement && ((g = m.parentElement) == null || g.style.setProperty(
|
|
647
659
|
"--new-content-height",
|
|
648
|
-
|
|
649
|
-
),
|
|
660
|
+
m.offsetHeight + "px"
|
|
661
|
+
), m.classList.add("new-idle"));
|
|
650
662
|
});
|
|
651
663
|
}, 0);
|
|
652
|
-
const
|
|
664
|
+
const Qt = Dt(Ut({}, kt), {
|
|
653
665
|
morphElement: r
|
|
654
666
|
});
|
|
655
667
|
q(document, "morphNewChildrenAdded", {
|
|
656
|
-
detail:
|
|
668
|
+
detail: Qt
|
|
657
669
|
});
|
|
658
|
-
const
|
|
670
|
+
const fe = new Promise((m) => {
|
|
659
671
|
setTimeout(
|
|
660
672
|
() => {
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
}), B.forEach((
|
|
673
|
+
p || H.forEach((g) => {
|
|
674
|
+
g.remove();
|
|
675
|
+
}), B.forEach((g) => {
|
|
664
676
|
var k;
|
|
665
|
-
|
|
677
|
+
g instanceof HTMLElement && ((k = g.parentElement) == null || k.style.removeProperty(
|
|
666
678
|
"--new-content-height"
|
|
667
|
-
),
|
|
668
|
-
}),
|
|
669
|
-
detail:
|
|
670
|
-
}),
|
|
679
|
+
), g.classList.remove("new-idle", "new"));
|
|
680
|
+
}), p || q(document, "morphOldChildrenRemoved", {
|
|
681
|
+
detail: Qt
|
|
682
|
+
}), m();
|
|
671
683
|
},
|
|
672
|
-
(parseFloat(
|
|
684
|
+
(parseFloat(ue) || 0) * 1e3 + 10
|
|
673
685
|
);
|
|
674
686
|
});
|
|
675
|
-
t(this, V).push(
|
|
687
|
+
t(this, V).push(fe);
|
|
676
688
|
}), this.isPopstateNavigation ? document.documentElement.style.setProperty(
|
|
677
689
|
"--new-document-scroll-position",
|
|
678
|
-
(this.scrollValue.top -
|
|
690
|
+
(this.scrollValue.top - L.scrollState.y) * 1 + "px"
|
|
679
691
|
) : document.documentElement.style.setProperty(
|
|
680
692
|
"--new-document-scroll-position",
|
|
681
693
|
this.scrollValue.top + "px"
|
|
682
694
|
), q(document, "morphBeforeNavigationScroll", {
|
|
683
|
-
detail:
|
|
684
|
-
}), G ? (
|
|
695
|
+
detail: L.scrollState
|
|
696
|
+
}), G ? (L.clearScrollState(), y(this, E, Nt).call(this, G, {
|
|
685
697
|
centerScroll: a,
|
|
686
|
-
offsetScroll:
|
|
687
|
-
behavior:
|
|
688
|
-
})) : d.hash ? (
|
|
698
|
+
offsetScroll: l,
|
|
699
|
+
behavior: v
|
|
700
|
+
})) : d.hash ? (L.clearScrollState(), y(this, E, Nt).call(this, d.hash, {
|
|
689
701
|
centerScroll: a,
|
|
690
|
-
offsetScroll:
|
|
691
|
-
behavior:
|
|
692
|
-
})) : t(this, j) ?
|
|
693
|
-
r.querySelectorAll("script").forEach((
|
|
694
|
-
|
|
702
|
+
offsetScroll: l,
|
|
703
|
+
behavior: v
|
|
704
|
+
})) : t(this, j) ? L.restoreScrollPosition() : A || L.renewScrollPosition(), yield Promise.all(t(this, V)), p || Jt.forEach((r) => r.remove()), n(this, V, []), Tt.forEach((r) => {
|
|
705
|
+
r.querySelectorAll("script").forEach((N) => {
|
|
706
|
+
N.replaceWith(ie(N));
|
|
695
707
|
});
|
|
696
|
-
}), t(this,
|
|
697
|
-
r.checkCurrent(t(this,
|
|
708
|
+
}), t(this, w).forEach((r) => {
|
|
709
|
+
r.checkCurrent(t(this, u).path);
|
|
698
710
|
}), this.findParamsDependent(), q(document, "morphComplete", {
|
|
699
711
|
detail: kt
|
|
700
712
|
}), document.documentElement.style.removeProperty(
|
|
@@ -707,7 +719,7 @@ const pt = class pt {
|
|
|
707
719
|
});
|
|
708
720
|
}
|
|
709
721
|
addLink(e) {
|
|
710
|
-
t(this,
|
|
722
|
+
t(this, w).push(new It(e, this));
|
|
711
723
|
}
|
|
712
724
|
addLinks(e) {
|
|
713
725
|
e.forEach((s) => {
|
|
@@ -715,16 +727,16 @@ const pt = class pt {
|
|
|
715
727
|
});
|
|
716
728
|
}
|
|
717
729
|
removeLink(e) {
|
|
718
|
-
n(this,
|
|
730
|
+
n(this, w, t(this, w).filter((s) => s.element === e ? (s.destroy(), !1) : !0));
|
|
719
731
|
}
|
|
720
732
|
destroyOldLinks(e) {
|
|
721
|
-
n(this,
|
|
733
|
+
n(this, w, t(this, w).filter((s) => e.contains(s.element) ? (s.destroy(), !1) : !0));
|
|
722
734
|
}
|
|
723
735
|
findNewLinks(e) {
|
|
724
736
|
const s = [...e.querySelectorAll("a")].filter(
|
|
725
737
|
t(this, Pt)
|
|
726
738
|
);
|
|
727
|
-
t(this,
|
|
739
|
+
t(this, w).push(
|
|
728
740
|
...s.map((a) => new It(a, this))
|
|
729
741
|
);
|
|
730
742
|
}
|
|
@@ -732,7 +744,7 @@ const pt = class pt {
|
|
|
732
744
|
const e = [
|
|
733
745
|
...document.documentElement.querySelectorAll("a")
|
|
734
746
|
].filter(t(this, Pt));
|
|
735
|
-
t(this,
|
|
747
|
+
t(this, w).forEach((s) => s.destroy()), n(this, w, e.map((s) => new It(s, this)));
|
|
736
748
|
}
|
|
737
749
|
findParamsDependent() {
|
|
738
750
|
const e = [
|
|
@@ -745,49 +757,30 @@ const pt = class pt {
|
|
|
745
757
|
));
|
|
746
758
|
}
|
|
747
759
|
};
|
|
748
|
-
|
|
749
|
-
const s = document.createElement("script");
|
|
750
|
-
for (let a = 0; a < e.attributes.length; a++) {
|
|
751
|
-
const o = e.attributes[a];
|
|
752
|
-
s.setAttribute(o.name, o.value);
|
|
753
|
-
}
|
|
754
|
-
return e.hasAttribute("src") || (s.innerHTML = e.innerHTML), s;
|
|
755
|
-
}, Pt = new WeakMap(), ft = function(e) {
|
|
760
|
+
T = new WeakMap(), lt = new WeakMap(), w = new WeakMap(), $ = new WeakMap(), u = new WeakMap(), tt = new WeakMap(), V = new WeakMap(), j = new WeakMap(), x = new WeakMap(), St = new WeakMap(), O = new WeakMap(), yt = new WeakMap(), et = new WeakMap(), ct = new WeakMap(), dt = new WeakMap(), wt = new WeakMap(), mt = new WeakMap(), bt = new WeakMap(), Pt = new WeakMap(), E = new WeakSet(), ft = function(e) {
|
|
756
761
|
const s = this.normalizePath(e);
|
|
757
762
|
let a = t(this, O).get(s.pathname);
|
|
758
763
|
return a || (a = new re(this, s.pathname), t(this, O).set(s.pathname, a)), a;
|
|
759
|
-
},
|
|
764
|
+
}, Vt = function(e) {
|
|
760
765
|
const s = [...e.querySelectorAll("[data-morph]")];
|
|
761
766
|
return s.length ? s : [e];
|
|
762
|
-
},
|
|
763
|
-
return e.filter(
|
|
764
|
-
(a) => s.find(
|
|
765
|
-
(o) => o.outerHTML === a.outerHTML
|
|
766
|
-
)
|
|
767
|
-
);
|
|
768
|
-
}, Ft = function(e, s) {
|
|
769
|
-
return e.filter(
|
|
770
|
-
(a) => !s.find(
|
|
771
|
-
(o) => o.outerHTML === a.outerHTML
|
|
772
|
-
)
|
|
773
|
-
);
|
|
774
|
-
}, Xt = function(e) {
|
|
767
|
+
}, Ot = function(e) {
|
|
775
768
|
return e.tagName === "SCRIPT" || e.tagName === "STYLE" || e.tagName === "LINK" && e.getAttribute("rel") === "stylesheet";
|
|
776
|
-
},
|
|
769
|
+
}, Ft = function(e) {
|
|
777
770
|
var s, a;
|
|
778
|
-
(s = t(this,
|
|
771
|
+
(s = t(this, x)) == null || s.removeEventListener(
|
|
779
772
|
"scroll",
|
|
780
|
-
t(this,
|
|
781
|
-
), n(this, dt, 0), n(this, ct, 0), n(this,
|
|
782
|
-
},
|
|
773
|
+
t(this, ut)
|
|
774
|
+
), n(this, dt, 0), n(this, ct, 0), n(this, x, t(this, T).scrollSelector && e.querySelector(t(this, T).scrollSelector) || window), n(this, St, t(this, x) === window), (a = t(this, x)) == null || a.addEventListener("scroll", t(this, ut)), t(this, ut).call(this);
|
|
775
|
+
}, Nt = function(e, s) {
|
|
783
776
|
const a = typeof e == "string" ? document.getElementById(e) : e;
|
|
784
|
-
(typeof a == "number" || a) &&
|
|
785
|
-
scrollElement: t(this,
|
|
777
|
+
(typeof a == "number" || a) && be(a, {
|
|
778
|
+
scrollElement: t(this, x),
|
|
786
779
|
behavior: (s == null ? void 0 : s.behavior) || "instant",
|
|
787
780
|
center: s == null ? void 0 : s.centerScroll,
|
|
788
781
|
offset: s == null ? void 0 : s.offsetScroll
|
|
789
782
|
});
|
|
790
|
-
},
|
|
783
|
+
}, xt = new WeakMap(), ut = new WeakMap(), pt.instance = null;
|
|
791
784
|
let ne = pt;
|
|
792
785
|
export {
|
|
793
786
|
ne as Morph
|