aptechka 0.73.0 → 0.73.2
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/morph/index.cjs +1 -1
- package/lib/morph/index.js +272 -267
- package/lib/popover/PopoverElement.d.ts +1 -0
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +111 -107
- package/package.json +1 -1
package/lib/morph/index.js
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
1
|
+
var ie = Object.defineProperty, se = Object.defineProperties;
|
|
2
|
+
var ae = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var Bt = Object.getOwnPropertySymbols;
|
|
4
|
+
var ne = Object.prototype.hasOwnProperty, re = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var Wt = (o, e) => (e = Symbol[o]) ? e : Symbol.for("Symbol." + o), Yt = (o) => {
|
|
6
6
|
throw TypeError(o);
|
|
7
7
|
};
|
|
8
|
-
var
|
|
8
|
+
var Xt = (o, e, i) => e in o ? ie(o, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : o[e] = i, pt = (o, e) => {
|
|
9
9
|
for (var i in e || (e = {}))
|
|
10
|
-
|
|
11
|
-
if (
|
|
12
|
-
for (var i of
|
|
13
|
-
|
|
10
|
+
ne.call(e, i) && Xt(o, i, e[i]);
|
|
11
|
+
if (Bt)
|
|
12
|
+
for (var i of Bt(e))
|
|
13
|
+
re.call(e, i) && Xt(o, i, e[i]);
|
|
14
14
|
return o;
|
|
15
|
-
}, kt = (o, e) =>
|
|
16
|
-
var
|
|
17
|
-
var t = (o, e, i) => (
|
|
15
|
+
}, kt = (o, e) => se(o, ae(e));
|
|
16
|
+
var At = (o, e, i) => e.has(o) || Yt("Cannot " + i);
|
|
17
|
+
var t = (o, e, i) => (At(o, e, "read from private field"), i ? i.call(o) : e.get(o)), l = (o, e, i) => e.has(o) ? Yt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(o) : e.set(o, i), r = (o, e, i, s) => (At(o, e, "write to private field"), s ? s.call(o, i) : e.set(o, i), i), p = (o, e, i) => (At(o, e, "access private method"), i);
|
|
18
18
|
var W = (o, e, i) => new Promise((s, h) => {
|
|
19
|
-
var
|
|
19
|
+
var S = (d) => {
|
|
20
20
|
try {
|
|
21
|
-
|
|
22
|
-
} catch (
|
|
23
|
-
h(
|
|
21
|
+
b(i.next(d));
|
|
22
|
+
} catch (E) {
|
|
23
|
+
h(E);
|
|
24
24
|
}
|
|
25
|
-
},
|
|
25
|
+
}, g = (d) => {
|
|
26
26
|
try {
|
|
27
|
-
|
|
28
|
-
} catch (
|
|
29
|
-
h(
|
|
27
|
+
b(i.throw(d));
|
|
28
|
+
} catch (E) {
|
|
29
|
+
h(E);
|
|
30
30
|
}
|
|
31
|
-
},
|
|
32
|
-
|
|
31
|
+
}, b = (d) => d.done ? s(d.value) : Promise.resolve(d.value).then(S, g);
|
|
32
|
+
b((i = i.apply(o, e)).next());
|
|
33
33
|
});
|
|
34
|
-
var
|
|
35
|
-
import { i as
|
|
36
|
-
import { d as
|
|
37
|
-
import { r as
|
|
38
|
-
import { w as
|
|
34
|
+
var jt = (o, e, i) => (e = o[Wt("asyncIterator")]) ? e.call(o) : (o = o[Wt("iterator")](), e = {}, i = (s, h) => (h = o[s]) && (e[s] = (S) => new Promise((g, b, d) => (S = h.call(o, S), d = S.done, Promise.resolve(S.value).then((E) => g({ value: E, done: d }), b)))), i("next"), i("return"), e);
|
|
35
|
+
import { i as Gt } from "../index-Bv9zgfdb.js";
|
|
36
|
+
import { d as M } from "../events-CsVF98U6.js";
|
|
37
|
+
import { r as oe } from "../polyfills-DJrTJQky.js";
|
|
38
|
+
import { w as le, s as he } from "../scroll-DPkCFTxg.js";
|
|
39
39
|
import "construct-style-sheets-polyfill";
|
|
40
|
-
import { n as
|
|
41
|
-
import { cssValueParser as
|
|
42
|
-
class
|
|
40
|
+
import { n as ce, c as Pt, s as ue } from "../url-CFnGU6md.js";
|
|
41
|
+
import { cssValueParser as de } from "../css-value-parser/index.js";
|
|
42
|
+
class Jt extends HTMLElement {
|
|
43
43
|
connectedCallback() {
|
|
44
44
|
const e = {
|
|
45
45
|
"aria-live": "assertive",
|
|
@@ -50,15 +50,15 @@ class Qt extends HTMLElement {
|
|
|
50
50
|
this.setAttribute(i, s);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
|
|
54
|
-
var P, a, q, J,
|
|
55
|
-
class
|
|
53
|
+
Gt && !customElements.get("morph-announcer") && customElements.define("morph-announcer", Jt);
|
|
54
|
+
var P, a, q, J, gt, nt, Q;
|
|
55
|
+
class Ct {
|
|
56
56
|
constructor(e, i) {
|
|
57
57
|
l(this, J);
|
|
58
58
|
l(this, P);
|
|
59
59
|
l(this, a);
|
|
60
60
|
l(this, q);
|
|
61
|
-
l(this,
|
|
61
|
+
l(this, nt, (e) => {
|
|
62
62
|
var s;
|
|
63
63
|
if (e.preventDefault(), document.documentElement.classList.contains("click-disabled"))
|
|
64
64
|
return;
|
|
@@ -68,37 +68,37 @@ class Ht {
|
|
|
68
68
|
r(this, q, t(this, a).getAttribute("href") || "/");
|
|
69
69
|
const h = t(this, a).getAttribute(
|
|
70
70
|
"data-history-action"
|
|
71
|
-
) || "push",
|
|
71
|
+
) || "push", S = t(this, a).hasAttribute("data-center-scroll"), g = getComputedStyle(t(this, a)).getPropertyValue("--offset-scroll").trim(), b = g ? de.parse(g) : void 0, d = t(this, a).hasAttribute("data-revalidate") || t(this, a).hasAttribute("data-pagination-more-link") || t(this, a).hasAttribute("data-pagination-set-link"), E = t(this, a).hasAttribute(
|
|
72
72
|
"data-keep-search-parameters"
|
|
73
|
-
),
|
|
73
|
+
), vt = t(this, a).hasAttribute("data-keep-scroll-position") || t(this, a).hasAttribute("data-pagination-more-link"), Lt = t(this, a).getAttribute(
|
|
74
74
|
"data-scroll-behaviour"
|
|
75
|
-
),
|
|
76
|
-
|
|
75
|
+
), ct = p(this, J, gt).call(this, t(this, a).getAttribute("data-pagination-set-link") || t(this, a).getAttribute("data-pagination-more-link"));
|
|
76
|
+
ct && (t(this, a).hasAttribute("data-pagination-set-link") ? t(this, P).links.forEach((U) => {
|
|
77
77
|
U.updatePagination(
|
|
78
78
|
parseInt(t(this, a).getAttribute("data-value") || "1"),
|
|
79
|
-
|
|
79
|
+
ct.selector
|
|
80
80
|
);
|
|
81
81
|
}) : t(this, a).hasAttribute("data-pagination-more-link") && t(this, P).links.forEach((U) => {
|
|
82
82
|
U.updatePagination(
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
ct.currentPage + 1,
|
|
84
|
+
ct.selector
|
|
85
85
|
);
|
|
86
86
|
}));
|
|
87
|
-
const
|
|
87
|
+
const ut = ((s = t(this, a).getAttribute("data-submorph")) == null ? void 0 : s.split(",").map((U) => U.trim())) || t(this, a).hasAttribute("data-pagination-more-link") && [
|
|
88
88
|
t(this, a).getAttribute("data-pagination-more-link")
|
|
89
89
|
] || t(this, a).hasAttribute("data-pagination-set-link") && [
|
|
90
90
|
t(this, a).getAttribute("data-pagination-set-link")
|
|
91
91
|
] || void 0, c = t(this, a).hasAttribute("data-clear-state");
|
|
92
92
|
t(this, P).navigate(t(this, q), {
|
|
93
93
|
historyAction: h,
|
|
94
|
-
centerScroll:
|
|
95
|
-
offsetScroll:
|
|
96
|
-
revalidate:
|
|
97
|
-
keepSearchParameters:
|
|
98
|
-
submorph:
|
|
94
|
+
centerScroll: S,
|
|
95
|
+
offsetScroll: b,
|
|
96
|
+
revalidate: d,
|
|
97
|
+
keepSearchParameters: E,
|
|
98
|
+
submorph: ut,
|
|
99
99
|
clearState: c,
|
|
100
|
-
keepScrollPosition:
|
|
101
|
-
scrollBehaviour:
|
|
100
|
+
keepScrollPosition: vt,
|
|
101
|
+
scrollBehaviour: Lt,
|
|
102
102
|
submorphAppend: t(this, a).hasAttribute("data-pagination-more-link")
|
|
103
103
|
});
|
|
104
104
|
}
|
|
@@ -107,8 +107,8 @@ class Ht {
|
|
|
107
107
|
const e = t(this, a).hasAttribute("data-revalidate");
|
|
108
108
|
t(this, P).prefetch(t(this, q), e), t(this, a).removeEventListener("pointerenter", t(this, Q));
|
|
109
109
|
});
|
|
110
|
-
r(this, P, i), r(this, a, e), t(this, a).addEventListener("click", t(this,
|
|
111
|
-
const s = p(this, J,
|
|
110
|
+
r(this, P, i), r(this, a, e), t(this, a).addEventListener("click", t(this, nt)), r(this, q, t(this, a).getAttribute("href") || "/"), this.checkCurrent(location.href.replace(location.origin, ""));
|
|
111
|
+
const s = p(this, J, gt).call(this, t(this, a).getAttribute("data-pagination-set-link") || t(this, a).getAttribute("data-pagination-more-link"));
|
|
112
112
|
s && this.updatePagination(
|
|
113
113
|
s.currentPage,
|
|
114
114
|
s.selector
|
|
@@ -120,10 +120,10 @@ class Ht {
|
|
|
120
120
|
checkCurrent(e) {
|
|
121
121
|
var h;
|
|
122
122
|
const i = t(this, P).normalizePath(e), s = t(this, P).normalizePath(t(this, q));
|
|
123
|
-
t(this, a).hasAttribute("data-include") && i.pathname.includes(s.pathname) ? t(this, a).classList.add("current") : s.pathname === i.pathname ? t(this, a).classList.add("current") : (h = t(this, a).getAttribute("data-associated-paths")) != null && h.split(",").find((
|
|
123
|
+
t(this, a).hasAttribute("data-include") && i.pathname.includes(s.pathname) ? t(this, a).classList.add("current") : s.pathname === i.pathname ? t(this, a).classList.add("current") : (h = t(this, a).getAttribute("data-associated-paths")) != null && h.split(",").find((S) => i.pathname.includes(S)) ? t(this, a).classList.add("current") : t(this, a).classList.remove("current"), i.path === s.path ? t(this, a).classList.add("exact") : t(this, a).classList.remove("exact");
|
|
124
124
|
}
|
|
125
125
|
updatePagination(e, i) {
|
|
126
|
-
const s = p(this, J,
|
|
126
|
+
const s = p(this, J, gt).call(this, i);
|
|
127
127
|
if (s)
|
|
128
128
|
if (s.element.setAttribute(
|
|
129
129
|
"data-current-page",
|
|
@@ -135,19 +135,19 @@ class Ht {
|
|
|
135
135
|
"[data-pagination-more-link-counter]"
|
|
136
136
|
);
|
|
137
137
|
h && (h.textContent = (s.totalPages - e).toString());
|
|
138
|
-
const
|
|
139
|
-
|
|
140
|
-
const
|
|
141
|
-
t(this, a).setAttribute("href",
|
|
138
|
+
const S = t(this, a).getAttribute("href"), g = new URL(S, window.location.origin);
|
|
139
|
+
g.searchParams.set("page", (e + 1).toString());
|
|
140
|
+
const b = g.href.replace(g.origin, "").toString();
|
|
141
|
+
t(this, a).setAttribute("href", b), this.checkCurrent(b);
|
|
142
142
|
} else
|
|
143
143
|
t(this, a).style.display = "none";
|
|
144
144
|
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"));
|
|
145
145
|
}
|
|
146
146
|
destroy() {
|
|
147
|
-
t(this, a).removeEventListener("click", t(this,
|
|
147
|
+
t(this, a).removeEventListener("click", t(this, nt)), t(this, a).removeEventListener("pointerenter", t(this, Q)), t(this, a).classList.remove("current", "exact", "pagination-current");
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
|
-
P = new WeakMap(), a = new WeakMap(), q = new WeakMap(), J = new WeakSet(),
|
|
150
|
+
P = new WeakMap(), a = new WeakMap(), q = new WeakMap(), J = new WeakSet(), gt = function(e) {
|
|
151
151
|
if (!e)
|
|
152
152
|
return;
|
|
153
153
|
const i = document.querySelector(e);
|
|
@@ -164,38 +164,37 @@ P = new WeakMap(), a = new WeakMap(), q = new WeakMap(), J = new WeakSet(), Et =
|
|
|
164
164
|
selector: e
|
|
165
165
|
};
|
|
166
166
|
}
|
|
167
|
-
},
|
|
168
|
-
const
|
|
169
|
-
var
|
|
170
|
-
class
|
|
167
|
+
}, nt = new WeakMap(), Q = new WeakMap();
|
|
168
|
+
const me = new DOMParser();
|
|
169
|
+
var T, X, k, x, Y, z, Z, j, V, rt;
|
|
170
|
+
class Kt {
|
|
171
171
|
constructor(e, i) {
|
|
172
|
-
l(this,
|
|
172
|
+
l(this, T);
|
|
173
173
|
l(this, X);
|
|
174
|
-
l(this,
|
|
175
|
-
l(this,
|
|
174
|
+
l(this, k, { x: 0, y: 0 });
|
|
175
|
+
l(this, x, null);
|
|
176
176
|
l(this, Y, null);
|
|
177
177
|
l(this, z, null);
|
|
178
178
|
l(this, Z, null);
|
|
179
179
|
l(this, j, null);
|
|
180
180
|
l(this, V, null);
|
|
181
|
-
l(this,
|
|
182
|
-
|
|
183
|
-
r(this, x, e), r(this, X, i), r(this, _, i);
|
|
181
|
+
l(this, rt);
|
|
182
|
+
r(this, T, e), r(this, X, i);
|
|
184
183
|
}
|
|
185
184
|
get pathname() {
|
|
186
185
|
return t(this, X);
|
|
187
186
|
}
|
|
188
187
|
get scrollState() {
|
|
189
|
-
return t(this,
|
|
188
|
+
return t(this, k);
|
|
190
189
|
}
|
|
191
190
|
get document() {
|
|
192
191
|
return t(this, z);
|
|
193
192
|
}
|
|
194
193
|
setHeaders(e) {
|
|
195
|
-
r(this,
|
|
194
|
+
r(this, rt, e);
|
|
196
195
|
}
|
|
197
196
|
setInitialDocument(e) {
|
|
198
|
-
r(this,
|
|
197
|
+
r(this, x, e.cloneNode(!0));
|
|
199
198
|
}
|
|
200
199
|
abort() {
|
|
201
200
|
var e;
|
|
@@ -205,28 +204,34 @@ class $t {
|
|
|
205
204
|
}
|
|
206
205
|
fetch(e, i, s) {
|
|
207
206
|
return W(this, null, function* () {
|
|
208
|
-
|
|
207
|
+
var h;
|
|
208
|
+
if (!s) {
|
|
209
|
+
const b = ((h = t(this, x)) == null ? void 0 : h.documentElement.getAttribute("data-cache")) && i !== e, d = t(this, x) && t(this, T).isPopstateNavigation;
|
|
210
|
+
if (t(this, V) || b || d)
|
|
211
|
+
return t(this, V);
|
|
212
|
+
}
|
|
213
|
+
return r(this, V, new Promise((S) => W(this, null, function* () {
|
|
209
214
|
try {
|
|
210
215
|
r(this, j, new AbortController());
|
|
211
|
-
const
|
|
216
|
+
const b = yield (yield fetch(e, {
|
|
212
217
|
signal: t(this, j).signal,
|
|
213
|
-
headers:
|
|
218
|
+
headers: pt({
|
|
214
219
|
"X-MORPH": "true",
|
|
215
220
|
"X-MORPH-CURRENT-PATH": encodeURIComponent(i),
|
|
216
221
|
"X-MORPH-NEW-PATH": encodeURIComponent(e)
|
|
217
|
-
}, t(this,
|
|
218
|
-
})).text(),
|
|
219
|
-
this.setInitialDocument(
|
|
222
|
+
}, t(this, rt))
|
|
223
|
+
})).text(), d = me.parseFromString(b, "text/html");
|
|
224
|
+
this.setInitialDocument(d);
|
|
220
225
|
} catch (g) {
|
|
221
226
|
console.warn(g);
|
|
222
227
|
} finally {
|
|
223
|
-
r(this, j, null), r(this, V, null),
|
|
228
|
+
r(this, j, null), r(this, V, null), S();
|
|
224
229
|
}
|
|
225
|
-
}))), t(this, V)
|
|
230
|
+
}))), t(this, V);
|
|
226
231
|
});
|
|
227
232
|
}
|
|
228
233
|
cloneDocument() {
|
|
229
|
-
r(this, z, (t(this, Y) || t(this,
|
|
234
|
+
r(this, z, (t(this, Y) || t(this, x)).cloneNode(!0));
|
|
230
235
|
}
|
|
231
236
|
get title() {
|
|
232
237
|
let e = "";
|
|
@@ -239,30 +244,30 @@ class $t {
|
|
|
239
244
|
return e;
|
|
240
245
|
}
|
|
241
246
|
clearScrollState() {
|
|
242
|
-
t(this,
|
|
247
|
+
t(this, k).x = 0, t(this, k).y = 0;
|
|
243
248
|
}
|
|
244
249
|
clearDocumentState() {
|
|
245
250
|
r(this, Y, null);
|
|
246
251
|
}
|
|
247
252
|
saveScrollState() {
|
|
248
|
-
t(this,
|
|
253
|
+
t(this, x).documentElement.hasAttribute(
|
|
249
254
|
"data-no-scroll-restoration"
|
|
250
|
-
) ? (t(this,
|
|
255
|
+
) ? (t(this, k).x = 0, t(this, k).y = 0) : (t(this, k).x = t(this, T).scrollValue.left, t(this, k).y = t(this, T).scrollValue.top);
|
|
251
256
|
}
|
|
252
257
|
restoreScrollPosition() {
|
|
253
|
-
t(this,
|
|
254
|
-
top: t(this,
|
|
255
|
-
left: t(this,
|
|
258
|
+
t(this, T).scrollElement.scroll({
|
|
259
|
+
top: t(this, k).y,
|
|
260
|
+
left: t(this, k).x,
|
|
256
261
|
behavior: "instant"
|
|
257
262
|
});
|
|
258
263
|
}
|
|
259
264
|
saveDocumentState() {
|
|
260
|
-
t(this,
|
|
265
|
+
t(this, x).documentElement.hasAttribute(
|
|
261
266
|
"data-no-page-restoration"
|
|
262
267
|
) ? r(this, Y, null) : r(this, Y, document.cloneNode(!0));
|
|
263
268
|
}
|
|
264
269
|
renewScrollPosition() {
|
|
265
|
-
t(this,
|
|
270
|
+
t(this, T).scrollElement.scroll({
|
|
266
271
|
top: 0,
|
|
267
272
|
left: 0,
|
|
268
273
|
behavior: "instant"
|
|
@@ -276,41 +281,41 @@ class $t {
|
|
|
276
281
|
return r(this, Z, null), e;
|
|
277
282
|
}
|
|
278
283
|
}
|
|
279
|
-
|
|
280
|
-
var
|
|
281
|
-
const
|
|
284
|
+
T = new WeakMap(), X = new WeakMap(), k = new WeakMap(), x = new WeakMap(), Y = new WeakMap(), z = new WeakMap(), Z = new WeakMap(), j = new WeakMap(), V = new WeakMap(), rt = new WeakMap();
|
|
285
|
+
var R, _, y, F, f, K, O, B, C, ot, N, $, tt, et, lt, it, m, Ht, ht, Et, Rt, Qt, Mt, Tt, xt, Nt, St, st;
|
|
286
|
+
const at = class at {
|
|
282
287
|
constructor(e) {
|
|
283
|
-
l(this,
|
|
284
|
-
l(this,
|
|
285
|
-
l(this,
|
|
286
|
-
l(this,
|
|
287
|
-
l(this,
|
|
288
|
-
l(this,
|
|
288
|
+
l(this, m);
|
|
289
|
+
l(this, R, null);
|
|
290
|
+
l(this, _, null);
|
|
291
|
+
l(this, y, []);
|
|
292
|
+
l(this, F);
|
|
293
|
+
l(this, f, null);
|
|
289
294
|
l(this, K);
|
|
290
|
-
l(this,
|
|
295
|
+
l(this, O, []);
|
|
291
296
|
l(this, B, !1);
|
|
292
297
|
l(this, C, null);
|
|
293
|
-
l(this,
|
|
298
|
+
l(this, ot, !1);
|
|
294
299
|
l(this, N, /* @__PURE__ */ new Map());
|
|
295
300
|
l(this, $, null);
|
|
301
|
+
l(this, tt, 0);
|
|
296
302
|
l(this, et, 0);
|
|
297
|
-
l(this,
|
|
298
|
-
l(this,
|
|
299
|
-
l(this,
|
|
300
|
-
l(this, ct, (e) => {
|
|
303
|
+
l(this, lt);
|
|
304
|
+
l(this, it);
|
|
305
|
+
l(this, ht, (e) => {
|
|
301
306
|
var i;
|
|
302
307
|
return ((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";
|
|
303
308
|
});
|
|
304
|
-
l(this,
|
|
309
|
+
l(this, St, (e) => W(this, null, function* () {
|
|
305
310
|
e.preventDefault(), r(this, B, !0), yield this.navigate(location.href.replace(location.origin, ""), {
|
|
306
311
|
historyAction: "none",
|
|
307
|
-
submorph: t(this,
|
|
308
|
-
revalidate: t(this,
|
|
312
|
+
submorph: t(this, it) ? void 0 : t(this, lt),
|
|
313
|
+
revalidate: t(this, it)
|
|
309
314
|
}), r(this, B, !1);
|
|
310
315
|
}));
|
|
311
|
-
l(this,
|
|
312
|
-
const { left: e, top: i } = this.scrollValue, s = i - t(this,
|
|
313
|
-
r(this,
|
|
316
|
+
l(this, st, () => {
|
|
317
|
+
const { left: e, top: i } = this.scrollValue, s = i - t(this, et), h = e - t(this, tt);
|
|
318
|
+
r(this, et, i), r(this, tt, e), document.documentElement.classList.toggle("scroll-y", i > 0), document.documentElement.classList.toggle("scroll-x", e > 0), document.documentElement.classList.toggle(
|
|
314
319
|
"scroll-y-forward",
|
|
315
320
|
s > 0
|
|
316
321
|
), document.documentElement.classList.toggle(
|
|
@@ -322,48 +327,48 @@ const nt = class nt {
|
|
|
322
327
|
), document.documentElement.classList.toggle(
|
|
323
328
|
"scroll-x-backward",
|
|
324
329
|
h < 0
|
|
325
|
-
),
|
|
330
|
+
), M(document, "morphScroll", {
|
|
326
331
|
detail: {
|
|
327
332
|
left: e,
|
|
328
333
|
top: i
|
|
329
334
|
}
|
|
330
335
|
});
|
|
331
336
|
});
|
|
332
|
-
if (
|
|
333
|
-
|
|
334
|
-
base:
|
|
337
|
+
if (Gt && !at.instance) {
|
|
338
|
+
at.instance = this, r(this, R, {
|
|
339
|
+
base: ce(e == null ? void 0 : e.base),
|
|
335
340
|
waitForHeadToLoad: (e == null ? void 0 : e.waitForHeadToLoad) !== !1,
|
|
336
341
|
trailingSlash: (e == null ? void 0 : e.trailingSlash) || !1,
|
|
337
342
|
scrollSelector: e == null ? void 0 : e.scrollSelector,
|
|
338
343
|
morphInsideScrollContainer: (e == null ? void 0 : e.morphInsideScrollContainer) || !1
|
|
339
|
-
}), r(this,
|
|
344
|
+
}), r(this, _, p(this, m, Rt).call(this, document.body));
|
|
340
345
|
const i = this.normalizePath(
|
|
341
346
|
location.pathname + location.search + location.hash
|
|
342
347
|
);
|
|
343
|
-
r(this,
|
|
344
|
-
const s = new
|
|
345
|
-
s.setInitialDocument(document), t(this, N).set(t(this,
|
|
348
|
+
r(this, f, i);
|
|
349
|
+
const s = new Kt(this, t(this, f).pathname);
|
|
350
|
+
s.setInitialDocument(document), t(this, N).set(t(this, f).pathname, s), document.documentElement.setAttribute(
|
|
346
351
|
"data-current-pathname",
|
|
347
|
-
t(this,
|
|
352
|
+
t(this, f).pathname
|
|
348
353
|
), document.documentElement.setAttribute(
|
|
349
354
|
"data-current-leaf",
|
|
350
355
|
i.leaf
|
|
351
|
-
), this.findLinks(), history.scrollRestoration = "manual", addEventListener("popstate", t(this,
|
|
356
|
+
), this.findLinks(), history.scrollRestoration = "manual", addEventListener("popstate", t(this, St)), Pt({
|
|
352
357
|
action: "replace",
|
|
353
358
|
pathname: i.pathname,
|
|
354
359
|
searchParameters: i.parameters,
|
|
355
360
|
hash: i.hash
|
|
356
|
-
}), r(this, $, new
|
|
361
|
+
}), r(this, $, new Jt()), p(this, m, xt).call(this, document);
|
|
357
362
|
}
|
|
358
363
|
}
|
|
359
364
|
get currentURL() {
|
|
360
|
-
return t(this,
|
|
365
|
+
return t(this, f);
|
|
361
366
|
}
|
|
362
367
|
get previousURL() {
|
|
363
368
|
return t(this, K);
|
|
364
369
|
}
|
|
365
370
|
get links() {
|
|
366
|
-
return t(this,
|
|
371
|
+
return t(this, y);
|
|
367
372
|
}
|
|
368
373
|
get scrollElement() {
|
|
369
374
|
return t(this, C);
|
|
@@ -373,30 +378,30 @@ const nt = class nt {
|
|
|
373
378
|
}
|
|
374
379
|
get scrollValue() {
|
|
375
380
|
let e = 0, i = 0;
|
|
376
|
-
return t(this,
|
|
381
|
+
return t(this, ot) ? (e = window.scrollY, i = window.scrollX) : (e = t(this, C).scrollTop, i = t(this, C).scrollLeft), { top: e, left: i };
|
|
377
382
|
}
|
|
378
383
|
saveState(e) {
|
|
379
|
-
const i = t(this, N).get(t(this,
|
|
384
|
+
const i = t(this, N).get(t(this, f).path);
|
|
380
385
|
i && i.saveState(e);
|
|
381
386
|
}
|
|
382
387
|
getState() {
|
|
383
|
-
const e = t(this, N).get(t(this,
|
|
388
|
+
const e = t(this, N).get(t(this, f).path);
|
|
384
389
|
return e == null ? void 0 : e.clearState();
|
|
385
390
|
}
|
|
386
391
|
normalizePath(e) {
|
|
387
|
-
return
|
|
388
|
-
base: t(this,
|
|
389
|
-
trailingSlash: t(this,
|
|
392
|
+
return ue(e, {
|
|
393
|
+
base: t(this, R).base,
|
|
394
|
+
trailingSlash: t(this, R).trailingSlash
|
|
390
395
|
});
|
|
391
396
|
}
|
|
392
397
|
prefetch(e, i) {
|
|
393
398
|
return W(this, null, function* () {
|
|
394
399
|
var h;
|
|
395
|
-
if (t(this,
|
|
400
|
+
if (t(this, O).length)
|
|
396
401
|
return;
|
|
397
402
|
e = ((h = this.pathnameModifier) == null ? void 0 : h.call(this, e)) || e;
|
|
398
|
-
const s = p(this,
|
|
399
|
-
s == null || s.fetch(e, t(this,
|
|
403
|
+
const s = p(this, m, Et).call(this, e);
|
|
404
|
+
s == null || s.fetch(e, t(this, f).path, i);
|
|
400
405
|
});
|
|
401
406
|
}
|
|
402
407
|
excludeHeadChild(e) {
|
|
@@ -404,175 +409,175 @@ const nt = class nt {
|
|
|
404
409
|
}
|
|
405
410
|
setHeaders(e) {
|
|
406
411
|
}
|
|
407
|
-
navigate(
|
|
412
|
+
navigate(ct) {
|
|
408
413
|
return W(this, arguments, function* (e, {
|
|
409
414
|
historyAction: i = "push",
|
|
410
415
|
centerScroll: s,
|
|
411
416
|
offsetScroll: h,
|
|
412
|
-
scrollBehaviour:
|
|
413
|
-
revalidate:
|
|
414
|
-
keepSearchParameters:
|
|
415
|
-
submorph:
|
|
416
|
-
submorphAppend:
|
|
417
|
-
clearState:
|
|
418
|
-
keepScrollPosition:
|
|
417
|
+
scrollBehaviour: S,
|
|
418
|
+
revalidate: g,
|
|
419
|
+
keepSearchParameters: b,
|
|
420
|
+
submorph: d,
|
|
421
|
+
submorphAppend: E,
|
|
422
|
+
clearState: vt,
|
|
423
|
+
keepScrollPosition: Lt
|
|
419
424
|
} = {}) {
|
|
420
|
-
var U,
|
|
421
|
-
if (t(this,
|
|
425
|
+
var U, Ut, Dt, It;
|
|
426
|
+
if (t(this, O).length)
|
|
422
427
|
return;
|
|
423
|
-
r(this,
|
|
424
|
-
const
|
|
425
|
-
if (t(this,
|
|
428
|
+
r(this, lt, d), r(this, it, g);
|
|
429
|
+
const ut = ((U = this.pathnameModifier) == null ? void 0 : U.call(this, e)) || e, c = this.normalizePath(ut);
|
|
430
|
+
if (t(this, y).forEach((G) => {
|
|
426
431
|
G.checkCurrent(c.path);
|
|
427
|
-
}), !
|
|
428
|
-
p(this,
|
|
432
|
+
}), !g && (((Ut = t(this, F)) == null ? void 0 : Ut.pathname) === c.pathname || t(this, f).pathname === c.pathname)) {
|
|
433
|
+
p(this, m, Nt).call(this, c.hash || 0, {
|
|
429
434
|
centerScroll: s,
|
|
430
435
|
offsetScroll: h,
|
|
431
436
|
behavior: "smooth"
|
|
432
|
-
}),
|
|
437
|
+
}), M(document, "morphSamePath", {
|
|
433
438
|
custom: !0
|
|
434
|
-
}), ((Dt = t(this,
|
|
435
|
-
action: ((
|
|
439
|
+
}), ((Dt = t(this, f)) == null ? void 0 : Dt.parameters) !== c.parameters && (r(this, K, t(this, f)), r(this, f, c), Pt({
|
|
440
|
+
action: ((It = t(this, f)) == null ? void 0 : It.hash) !== c.hash ? "replace" : i,
|
|
436
441
|
pathname: c.pathname,
|
|
437
442
|
searchParameters: c.parameters,
|
|
438
443
|
hash: c.hash
|
|
439
|
-
}),
|
|
444
|
+
}), M(document, "morphURLParametersChange", {
|
|
440
445
|
detail: {
|
|
441
|
-
newURL: t(this,
|
|
446
|
+
newURL: t(this, f),
|
|
442
447
|
previousURL: t(this, K)
|
|
443
448
|
}
|
|
444
449
|
}));
|
|
445
450
|
return;
|
|
446
451
|
}
|
|
447
|
-
r(this,
|
|
452
|
+
r(this, F, c);
|
|
448
453
|
try {
|
|
449
454
|
let G = !0;
|
|
450
455
|
if (this.preprocessor)
|
|
451
456
|
try {
|
|
452
|
-
yield new Promise((n,
|
|
453
|
-
var
|
|
454
|
-
(
|
|
457
|
+
yield new Promise((n, w) => {
|
|
458
|
+
var A;
|
|
459
|
+
(A = this.preprocessor) == null || A.call(this, {
|
|
455
460
|
url: c,
|
|
456
461
|
resolve: n,
|
|
457
|
-
reject:
|
|
458
|
-
submorph:
|
|
462
|
+
reject: w,
|
|
463
|
+
submorph: d
|
|
459
464
|
});
|
|
460
465
|
});
|
|
461
466
|
} catch (n) {
|
|
462
467
|
n ? console.error(n) : console.log("Route change canceled"), G = !1;
|
|
463
468
|
}
|
|
464
|
-
if (!G || t(this,
|
|
465
|
-
t(this,
|
|
466
|
-
n.checkCurrent(t(this,
|
|
469
|
+
if (!G || t(this, F).pathname !== c.pathname) {
|
|
470
|
+
t(this, y).forEach((n) => {
|
|
471
|
+
n.checkCurrent(t(this, f).path);
|
|
467
472
|
});
|
|
468
473
|
return;
|
|
469
474
|
}
|
|
470
|
-
const
|
|
475
|
+
const qt = {
|
|
471
476
|
url: c,
|
|
472
|
-
submorph:
|
|
477
|
+
submorph: d
|
|
473
478
|
};
|
|
474
|
-
|
|
475
|
-
document.querySelectorAll(n).forEach((
|
|
476
|
-
|
|
479
|
+
d ? E || d.forEach((n) => {
|
|
480
|
+
document.querySelectorAll(n).forEach((w) => {
|
|
481
|
+
w.classList.add("out"), w.setAttribute("data-morph-out", "");
|
|
477
482
|
});
|
|
478
|
-
}) : t(this,
|
|
479
|
-
var
|
|
480
|
-
(
|
|
481
|
-
}),
|
|
482
|
-
detail:
|
|
483
|
+
}) : t(this, _).forEach((n) => {
|
|
484
|
+
var w, A;
|
|
485
|
+
(w = n.firstElementChild) == null || w.classList.add("out"), (A = n.firstElementChild) == null || A.setAttribute("data-morph-out", "");
|
|
486
|
+
}), M(document, "morphNavigation", {
|
|
487
|
+
detail: qt
|
|
483
488
|
});
|
|
484
|
-
const
|
|
489
|
+
const bt = p(this, m, Et).call(this, t(this, f).pathname), v = p(this, m, Et).call(this, c.pathname);
|
|
485
490
|
if (t(this, N).forEach((n) => {
|
|
486
491
|
n.pathname !== c.pathname && n.abort();
|
|
487
|
-
}), yield v == null ? void 0 : v.fetch(
|
|
488
|
-
t(this,
|
|
489
|
-
n.checkCurrent(t(this,
|
|
492
|
+
}), yield v == null ? void 0 : v.fetch(ut, t(this, f).path, g), t(this, F).pathname !== c.pathname) {
|
|
493
|
+
t(this, y).forEach((n) => {
|
|
494
|
+
n.checkCurrent(t(this, f).path);
|
|
490
495
|
});
|
|
491
496
|
return;
|
|
492
497
|
}
|
|
493
|
-
|
|
494
|
-
const
|
|
498
|
+
bt.clearState(), bt.saveScrollState(), bt.saveDocumentState(), (!t(this, B) || g) && (v.clearScrollState(), v.clearDocumentState()), vt && v.clearState(), v.cloneDocument(), t(this, $).textContent = v.title, document.body.appendChild(t(this, $));
|
|
499
|
+
const dt = kt(pt({}, qt), {
|
|
495
500
|
document: v.document
|
|
496
501
|
});
|
|
497
|
-
|
|
502
|
+
E || dt.document.querySelectorAll("[data-morph-out]").forEach((n) => {
|
|
498
503
|
n.classList.remove("out");
|
|
499
|
-
}),
|
|
500
|
-
detail:
|
|
504
|
+
}), M(document, "morphStart", {
|
|
505
|
+
detail: dt
|
|
501
506
|
});
|
|
502
|
-
const
|
|
503
|
-
|
|
504
|
-
n.tagName === "SCRIPT" && (
|
|
505
|
-
}),
|
|
507
|
+
const zt = Array.from(document.head.children), Vt = Array.from(v.document.head.children), Ft = p(this, m, Qt).call(this, zt, Vt), Zt = p(this, m, Mt).call(this, zt, Ft), mt = p(this, m, Mt).call(this, Vt, Ft).filter((n) => !this.excludeHeadChild(n));
|
|
508
|
+
mt.forEach((n, w) => {
|
|
509
|
+
n.tagName === "SCRIPT" && (mt[w] = p(this, m, Ht).call(this, n));
|
|
510
|
+
}), mt.forEach((n) => {
|
|
506
511
|
document.head.appendChild(n);
|
|
507
512
|
});
|
|
508
|
-
const
|
|
513
|
+
const yt = mt.filter((n) => {
|
|
509
514
|
if (n.hasAttribute("data-no-waiting"))
|
|
510
515
|
return !1;
|
|
511
|
-
if (p(this,
|
|
516
|
+
if (p(this, m, Tt).call(this, n))
|
|
512
517
|
return !0;
|
|
513
518
|
});
|
|
514
|
-
t(this,
|
|
515
|
-
let
|
|
519
|
+
t(this, R).waitForHeadToLoad && yt.length && (yield new Promise((n) => W(this, null, function* () {
|
|
520
|
+
let w = 0;
|
|
516
521
|
try {
|
|
517
|
-
for (var
|
|
518
|
-
const
|
|
519
|
-
|
|
520
|
-
|
|
522
|
+
for (var A = jt(yt), te, D, H; te = !(D = yield A.next()).done; te = !1) {
|
|
523
|
+
const ft = D.value;
|
|
524
|
+
ft.onload = () => {
|
|
525
|
+
w++, w === yt.length && n();
|
|
521
526
|
};
|
|
522
527
|
}
|
|
523
|
-
} catch (
|
|
524
|
-
H = [
|
|
528
|
+
} catch (D) {
|
|
529
|
+
H = [D];
|
|
525
530
|
} finally {
|
|
526
531
|
try {
|
|
527
|
-
|
|
532
|
+
te && (D = A.return) && (yield D.call(A));
|
|
528
533
|
} finally {
|
|
529
534
|
if (H)
|
|
530
535
|
throw H[0];
|
|
531
536
|
}
|
|
532
537
|
}
|
|
533
|
-
}))), yield
|
|
534
|
-
const
|
|
535
|
-
|
|
536
|
-
n.hasAttribute("data-permanent") || (p(this,
|
|
538
|
+
}))), yield le(10);
|
|
539
|
+
const Ot = [];
|
|
540
|
+
E || Zt.forEach((n) => {
|
|
541
|
+
n.hasAttribute("data-permanent") || (p(this, m, Tt).call(this, n) ? Ot.push(n) : n.remove());
|
|
537
542
|
});
|
|
538
|
-
const
|
|
539
|
-
!t(this,
|
|
543
|
+
const _t = p(this, m, Rt).call(this, v.document.body);
|
|
544
|
+
!t(this, R).morphInsideScrollContainer && !d && p(this, m, xt).call(this, v.document), document.documentElement.setAttribute(
|
|
540
545
|
"data-current-pathname",
|
|
541
546
|
c.pathname
|
|
542
547
|
), document.documentElement.setAttribute(
|
|
543
548
|
"data-current-leaf",
|
|
544
549
|
c.leaf
|
|
545
|
-
),
|
|
550
|
+
), Pt({
|
|
546
551
|
action: i,
|
|
547
552
|
pathname: c.pathname,
|
|
548
|
-
searchParameters: c.parameters || (
|
|
553
|
+
searchParameters: c.parameters || (b ? location.search : ""),
|
|
549
554
|
hash: c.hash
|
|
550
|
-
}), t(this, $).remove(), r(this, K, t(this,
|
|
551
|
-
const
|
|
552
|
-
t(this,
|
|
553
|
-
const
|
|
554
|
-
let
|
|
555
|
-
|
|
556
|
-
const L = n.querySelector(u),
|
|
557
|
-
L &&
|
|
555
|
+
}), t(this, $).remove(), r(this, K, t(this, f)), r(this, f, c);
|
|
556
|
+
const wt = [];
|
|
557
|
+
t(this, _).forEach((n, w) => {
|
|
558
|
+
const A = _t[w], te = getComputedStyle(n).getPropertyValue("--morph-duration");
|
|
559
|
+
let D = [], H = [];
|
|
560
|
+
d ? (d.forEach((u) => {
|
|
561
|
+
const L = n.querySelector(u), I = A.querySelector(u);
|
|
562
|
+
L && I && (H.push(L), D.push(I));
|
|
558
563
|
}), H.forEach((u) => {
|
|
559
|
-
u.parentElement &&
|
|
560
|
-
})) : (
|
|
564
|
+
u.parentElement && wt.push(u.parentElement);
|
|
565
|
+
})) : (D.push(...A.childNodes), H.push(...n.childNodes), wt.push(n)), E || H.forEach((u) => {
|
|
561
566
|
u instanceof HTMLElement && (this.destroyOldLinks(u), u.classList.add("old"));
|
|
562
|
-
}),
|
|
567
|
+
}), D.forEach((u) => {
|
|
563
568
|
u instanceof HTMLElement && (this.findNewLinks(u), u.classList.add("new"));
|
|
564
|
-
}),
|
|
569
|
+
}), d ? E ? D.forEach((u, L) => {
|
|
565
570
|
H[L] instanceof HTMLElement && H[L].append(...u.childNodes);
|
|
566
|
-
}) :
|
|
567
|
-
var
|
|
568
|
-
(
|
|
571
|
+
}) : D.forEach((u, L) => {
|
|
572
|
+
var I;
|
|
573
|
+
(I = H[L].parentElement) == null || I.insertBefore(
|
|
569
574
|
u,
|
|
570
575
|
H[L]
|
|
571
576
|
);
|
|
572
|
-
}) : n.prepend(...
|
|
573
|
-
|
|
577
|
+
}) : n.prepend(...D), oe(() => {
|
|
578
|
+
E || H.forEach((u) => {
|
|
574
579
|
u instanceof HTMLElement && u.classList.add("old-idle");
|
|
575
|
-
}),
|
|
580
|
+
}), D.forEach((u) => {
|
|
576
581
|
var L;
|
|
577
582
|
u instanceof HTMLElement && ((L = u.parentElement) == null || L.style.setProperty(
|
|
578
583
|
"--new-content-height",
|
|
@@ -580,56 +585,56 @@ const nt = class nt {
|
|
|
580
585
|
), u.classList.add("new-idle"));
|
|
581
586
|
});
|
|
582
587
|
});
|
|
583
|
-
const
|
|
588
|
+
const ft = kt(pt({}, dt), {
|
|
584
589
|
morphElement: n
|
|
585
590
|
});
|
|
586
|
-
|
|
587
|
-
detail:
|
|
591
|
+
M(document, "morphNewChildrenAdded", {
|
|
592
|
+
detail: ft
|
|
588
593
|
});
|
|
589
|
-
const
|
|
594
|
+
const ee = new Promise((u) => {
|
|
590
595
|
setTimeout(() => {
|
|
591
|
-
|
|
592
|
-
var
|
|
593
|
-
L instanceof HTMLElement && ((
|
|
596
|
+
E || H.forEach((L) => L.remove()), D.forEach((L) => {
|
|
597
|
+
var I;
|
|
598
|
+
L instanceof HTMLElement && ((I = L.parentElement) == null || I.style.removeProperty(
|
|
594
599
|
"--new-content-height"
|
|
595
600
|
), L.classList.remove("new-idle", "new"));
|
|
596
|
-
}),
|
|
597
|
-
detail:
|
|
601
|
+
}), E || M(document, "morphOldChildrenRemoved", {
|
|
602
|
+
detail: ft
|
|
598
603
|
}), u();
|
|
599
|
-
}, (parseFloat(
|
|
604
|
+
}, (parseFloat(te) || 0) * 1e3 + 10);
|
|
600
605
|
});
|
|
601
|
-
t(this,
|
|
606
|
+
t(this, O).push(ee);
|
|
602
607
|
}), this.isPopstateNavigation ? document.documentElement.style.setProperty(
|
|
603
608
|
"--new-document-scroll-position",
|
|
604
609
|
(this.scrollValue.top - v.scrollState.y) * 1 + "px"
|
|
605
610
|
) : document.documentElement.style.setProperty(
|
|
606
611
|
"--new-document-scroll-position",
|
|
607
612
|
this.scrollValue.top + "px"
|
|
608
|
-
),
|
|
613
|
+
), M(document, "morphBeforeNavigationScroll", {
|
|
609
614
|
detail: v.scrollState
|
|
610
|
-
}), c.hash ? (v.clearScrollState(), p(this,
|
|
615
|
+
}), c.hash ? (v.clearScrollState(), p(this, m, Nt).call(this, c.hash, {
|
|
611
616
|
centerScroll: s,
|
|
612
617
|
offsetScroll: h,
|
|
613
|
-
behavior:
|
|
614
|
-
})) : t(this, B) ? v.restoreScrollPosition() :
|
|
615
|
-
n.querySelectorAll("script").forEach((
|
|
616
|
-
|
|
618
|
+
behavior: S
|
|
619
|
+
})) : t(this, B) ? v.restoreScrollPosition() : Lt || v.renewScrollPosition(), yield Promise.all(t(this, O)), E || Ot.forEach((n) => n.remove()), r(this, O, []), wt.forEach((n) => {
|
|
620
|
+
n.querySelectorAll("script").forEach((A) => {
|
|
621
|
+
A.replaceWith(p(this, m, Ht).call(this, A));
|
|
617
622
|
});
|
|
618
|
-
}), t(this,
|
|
619
|
-
n.checkCurrent(t(this,
|
|
620
|
-
}),
|
|
621
|
-
detail:
|
|
623
|
+
}), t(this, y).forEach((n) => {
|
|
624
|
+
n.checkCurrent(t(this, f).path);
|
|
625
|
+
}), M(document, "morphComplete", {
|
|
626
|
+
detail: dt
|
|
622
627
|
}), document.documentElement.style.removeProperty(
|
|
623
628
|
"--new-document-scroll-position"
|
|
624
629
|
), window.dispatchEvent(new Event("resize"));
|
|
625
630
|
} catch (G) {
|
|
626
631
|
console.error(G);
|
|
627
632
|
}
|
|
628
|
-
r(this,
|
|
633
|
+
r(this, F, void 0);
|
|
629
634
|
});
|
|
630
635
|
}
|
|
631
636
|
addLink(e) {
|
|
632
|
-
t(this,
|
|
637
|
+
t(this, y).push(new Ct(e, this));
|
|
633
638
|
}
|
|
634
639
|
addLinks(e) {
|
|
635
640
|
e.forEach((i) => {
|
|
@@ -637,70 +642,70 @@ const nt = class nt {
|
|
|
637
642
|
});
|
|
638
643
|
}
|
|
639
644
|
removeLink(e) {
|
|
640
|
-
r(this,
|
|
645
|
+
r(this, y, t(this, y).filter((i) => i.element === e ? (i.destroy(), !1) : !0));
|
|
641
646
|
}
|
|
642
647
|
destroyOldLinks(e) {
|
|
643
|
-
r(this,
|
|
648
|
+
r(this, y, t(this, y).filter((i) => e.contains(i.element) ? (i.destroy(), !1) : !0));
|
|
644
649
|
}
|
|
645
650
|
findNewLinks(e) {
|
|
646
651
|
const i = [...e.querySelectorAll("a")].filter(
|
|
647
|
-
t(this,
|
|
652
|
+
t(this, ht)
|
|
648
653
|
);
|
|
649
|
-
t(this,
|
|
650
|
-
...i.map((s) => new
|
|
654
|
+
t(this, y).push(
|
|
655
|
+
...i.map((s) => new Ct(s, this))
|
|
651
656
|
);
|
|
652
657
|
}
|
|
653
658
|
findLinks() {
|
|
654
659
|
const e = [
|
|
655
660
|
...document.documentElement.querySelectorAll("a")
|
|
656
|
-
].filter(t(this,
|
|
657
|
-
t(this,
|
|
661
|
+
].filter(t(this, ht));
|
|
662
|
+
t(this, y).forEach((i) => i.destroy()), r(this, y, e.map((i) => new Ct(i, this)));
|
|
658
663
|
}
|
|
659
664
|
};
|
|
660
|
-
|
|
665
|
+
R = new WeakMap(), _ = new WeakMap(), y = new WeakMap(), F = new WeakMap(), f = new WeakMap(), K = new WeakMap(), O = new WeakMap(), B = new WeakMap(), C = new WeakMap(), ot = new WeakMap(), N = new WeakMap(), $ = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), lt = new WeakMap(), it = new WeakMap(), m = new WeakSet(), Ht = function(e) {
|
|
661
666
|
const i = document.createElement("script");
|
|
662
667
|
for (let s = 0; s < e.attributes.length; s++) {
|
|
663
668
|
const h = e.attributes[s];
|
|
664
669
|
i.setAttribute(h.name, h.value);
|
|
665
670
|
}
|
|
666
671
|
return e.hasAttribute("src") || (i.innerHTML = e.innerHTML), i;
|
|
667
|
-
},
|
|
672
|
+
}, ht = new WeakMap(), Et = function(e) {
|
|
668
673
|
const i = this.normalizePath(e);
|
|
669
674
|
let s = t(this, N).get(i.pathname);
|
|
670
|
-
return s || (s = new
|
|
671
|
-
},
|
|
675
|
+
return s || (s = new Kt(this, i.pathname), t(this, N).set(i.pathname, s)), s;
|
|
676
|
+
}, Rt = function(e) {
|
|
672
677
|
const i = [...e.querySelectorAll("[data-morph]")];
|
|
673
678
|
return i.length ? i : [e];
|
|
674
|
-
},
|
|
679
|
+
}, Qt = function(e, i) {
|
|
675
680
|
return e.filter(
|
|
676
681
|
(s) => i.find(
|
|
677
682
|
(h) => h.outerHTML === s.outerHTML
|
|
678
683
|
)
|
|
679
684
|
);
|
|
680
|
-
},
|
|
685
|
+
}, Mt = function(e, i) {
|
|
681
686
|
return e.filter(
|
|
682
687
|
(s) => !i.find(
|
|
683
688
|
(h) => h.outerHTML === s.outerHTML
|
|
684
689
|
)
|
|
685
690
|
);
|
|
686
|
-
},
|
|
691
|
+
}, Tt = function(e) {
|
|
687
692
|
return e.tagName === "SCRIPT" || e.tagName === "STYLE" || e.tagName === "LINK" && e.getAttribute("rel") === "stylesheet";
|
|
688
|
-
},
|
|
693
|
+
}, xt = function(e) {
|
|
689
694
|
var i, s;
|
|
690
695
|
(i = t(this, C)) == null || i.removeEventListener(
|
|
691
696
|
"scroll",
|
|
692
|
-
t(this,
|
|
693
|
-
), r(this,
|
|
694
|
-
},
|
|
697
|
+
t(this, st)
|
|
698
|
+
), r(this, et, 0), r(this, tt, 0), r(this, C, t(this, R).scrollSelector && e.querySelector(t(this, R).scrollSelector) || window), r(this, ot, t(this, C) === window), (s = t(this, C)) == null || s.addEventListener("scroll", t(this, st)), t(this, st).call(this);
|
|
699
|
+
}, Nt = function(e, i) {
|
|
695
700
|
const s = typeof e == "string" ? document.getElementById(e) : e;
|
|
696
|
-
(typeof s == "number" || s) &&
|
|
701
|
+
(typeof s == "number" || s) && he(s, {
|
|
697
702
|
scrollElement: t(this, C),
|
|
698
703
|
behavior: (i == null ? void 0 : i.behavior) || "instant",
|
|
699
704
|
center: i == null ? void 0 : i.centerScroll,
|
|
700
705
|
offset: i == null ? void 0 : i.offsetScroll
|
|
701
706
|
});
|
|
702
|
-
},
|
|
703
|
-
let
|
|
707
|
+
}, St = new WeakMap(), st = new WeakMap(), at.instance = null;
|
|
708
|
+
let $t = at;
|
|
704
709
|
export {
|
|
705
|
-
|
|
710
|
+
$t as Morph
|
|
706
711
|
};
|