aptechka 0.50.8 → 0.50.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,32 +1,32 @@
1
- var ft = (r, t) => (t = Symbol[r]) ? t : Symbol.for("Symbol." + r), pt = (r) => {
1
+ var pt = (r, t) => (t = Symbol[r]) ? t : Symbol.for("Symbol." + r), Et = (r) => {
2
2
  throw TypeError(r);
3
3
  };
4
- var _ = (r, t, s) => t.has(r) || pt("Cannot " + s);
5
- var e = (r, t, s) => (_(r, t, "read from private field"), s ? s.call(r) : t.get(r)), o = (r, t, s) => t.has(r) ? pt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(r) : t.set(r, s), a = (r, t, s, i) => (_(r, t, "write to private field"), i ? i.call(r, s) : t.set(r, s), s), d = (r, t, s) => (_(r, t, "access private method"), s);
6
- var T = (r, t, s) => new Promise((i, u) => {
7
- var f = (l) => {
4
+ var $ = (r, t, s) => t.has(r) || Et("Cannot " + s);
5
+ var e = (r, t, s) => ($(r, t, "read from private field"), s ? s.call(r) : t.get(r)), o = (r, t, s) => t.has(r) ? Et("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(r) : t.set(r, s), a = (r, t, s, i) => ($(r, t, "write to private field"), i ? i.call(r, s) : t.set(r, s), s), d = (r, t, s) => ($(r, t, "access private method"), s);
6
+ var M = (r, t, s) => new Promise((i, u) => {
7
+ var f = (h) => {
8
8
  try {
9
- k(s.next(l));
9
+ T(s.next(h));
10
10
  } catch (g) {
11
11
  u(g);
12
12
  }
13
- }, B = (l) => {
13
+ }, O = (h) => {
14
14
  try {
15
- k(s.throw(l));
15
+ T(s.throw(h));
16
16
  } catch (g) {
17
17
  u(g);
18
18
  }
19
- }, k = (l) => l.done ? i(l.value) : Promise.resolve(l.value).then(f, B);
20
- k((s = s.apply(r, t)).next());
19
+ }, T = (h) => h.done ? i(h.value) : Promise.resolve(h.value).then(f, O);
20
+ T((s = s.apply(r, t)).next());
21
21
  });
22
- var Et = (r, t, s) => (t = r[ft("asyncIterator")]) ? t.call(r) : (r = r[ft("iterator")](), t = {}, s = (i, u) => (u = r[i]) && (t[i] = (f) => new Promise((B, k, l) => (f = u.call(r, f), l = f.done, Promise.resolve(f.value).then((g) => B({ value: g, done: l }), k)))), s("next"), s("return"), t);
23
- import { i as Lt } from "../index-euf5anj6.js";
24
- import { d as J } from "../events-CsVF98U6.js";
25
- import { r as Tt } from "../polyfills-DJrTJQky.js";
26
- import { s as Mt } from "../scroll-myLAt-Tq.js";
27
- import { n as Ht, c as gt, s as xt } from "../url-CfcHdBT6.js";
28
- import { cssValueParser as Nt } from "../css-value-parser/index.js";
29
- class yt extends HTMLElement {
22
+ var gt = (r, t, s) => (t = r[pt("asyncIterator")]) ? t.call(r) : (r = r[pt("iterator")](), t = {}, s = (i, u) => (u = r[i]) && (t[i] = (f) => new Promise((O, T, h) => (f = u.call(r, f), h = f.done, Promise.resolve(f.value).then((g) => O({ value: g, done: h }), T)))), s("next"), s("return"), t);
23
+ import { i as yt } from "../index-euf5anj6.js";
24
+ import { d as U } from "../events-CsVF98U6.js";
25
+ import { r as Mt } from "../polyfills-DJrTJQky.js";
26
+ import { s as Ht } from "../scroll-myLAt-Tq.js";
27
+ import { n as xt, c as vt, s as Nt } from "../url-CfcHdBT6.js";
28
+ import { cssValueParser as Dt } from "../css-value-parser/index.js";
29
+ class wt extends HTMLElement {
30
30
  connectedCallback() {
31
31
  const t = {
32
32
  "aria-live": "assertive",
@@ -37,72 +37,72 @@ class yt extends HTMLElement {
37
37
  this.setAttribute(s, i);
38
38
  }
39
39
  }
40
- Lt && !customElements.get("morph-announcer") && customElements.define("morph-announcer", yt);
41
- var w, c, M, W, q;
42
- class vt {
40
+ yt && !customElements.get("morph-announcer") && customElements.define("morph-announcer", wt);
41
+ var b, c, H, j, F;
42
+ class Lt {
43
43
  constructor(t, s) {
44
- o(this, w);
44
+ o(this, b);
45
45
  o(this, c);
46
- o(this, M);
47
- o(this, W, (t) => {
46
+ o(this, H);
47
+ o(this, j, (t) => {
48
48
  t.preventDefault();
49
49
  const s = e(this, c).getAttribute(
50
50
  "data-history-action"
51
- ) || "push", i = e(this, c).hasAttribute("data-center-scroll"), u = getComputedStyle(e(this, c)).getPropertyValue("--offset-scroll").trim(), f = u ? Nt.parse(u) : void 0, B = e(this, c).hasAttribute("data-revalidate");
52
- e(this, w).navigate(e(this, M), {
51
+ ) || "push", i = e(this, c).hasAttribute("data-center-scroll"), u = getComputedStyle(e(this, c)).getPropertyValue("--offset-scroll").trim(), f = u ? Dt.parse(u) : void 0, O = e(this, c).hasAttribute("data-revalidate");
52
+ e(this, b).navigate(e(this, H), {
53
53
  historyAction: s,
54
54
  centerScroll: i,
55
55
  offsetScroll: f,
56
- revalidate: B
56
+ revalidate: O
57
57
  });
58
58
  });
59
- o(this, q, () => {
60
- e(this, w).prefetch(e(this, M)), e(this, c).removeEventListener("pointerenter", e(this, q));
59
+ o(this, F, () => {
60
+ e(this, b).prefetch(e(this, H)), e(this, c).removeEventListener("pointerenter", e(this, F));
61
61
  });
62
- a(this, w, s), a(this, c, t), a(this, M, e(this, c).getAttribute("href") || "/"), e(this, c).addEventListener("click", e(this, W)), this.checkCurrent(location.pathname), e(this, c).hasAttribute("data-prefetch") && e(this, c).addEventListener("pointerenter", e(this, q));
62
+ a(this, b, s), a(this, c, t), a(this, H, e(this, c).getAttribute("href") || "/"), e(this, c).addEventListener("click", e(this, j)), this.checkCurrent(location.pathname), e(this, c).hasAttribute("data-prefetch") && e(this, c).addEventListener("pointerenter", e(this, F));
63
63
  }
64
64
  get element() {
65
65
  return e(this, c);
66
66
  }
67
67
  checkCurrent(t) {
68
- const s = e(this, w).normalizePath(t), i = e(this, w).normalizePath(e(this, M));
68
+ const s = e(this, b).normalizePath(t), i = e(this, b).normalizePath(e(this, H));
69
69
  e(this, c).hasAttribute("data-include") && s.pathname.includes(i.pathname) ? e(this, c).classList.add("current") : i.pathname === s.pathname ? e(this, c).classList.add("current") : e(this, c).classList.remove("current");
70
70
  }
71
71
  destroy() {
72
- e(this, c).removeEventListener("click", e(this, W)), e(this, c).removeEventListener("pointerenter", e(this, q)), e(this, c).classList.remove("current");
72
+ e(this, c).removeEventListener("click", e(this, j)), e(this, c).removeEventListener("pointerenter", e(this, F)), e(this, c).classList.remove("current");
73
73
  }
74
74
  }
75
- w = new WeakMap(), c = new WeakMap(), M = new WeakMap(), W = new WeakMap(), q = new WeakMap();
76
- var H, F, p, x, N, b;
75
+ b = new WeakMap(), c = new WeakMap(), H = new WeakMap(), j = new WeakMap(), F = new WeakMap();
76
+ var x, I, p, N, D, P;
77
77
  class St {
78
78
  constructor(t, s, i) {
79
- o(this, H);
80
- o(this, F);
81
- o(this, p, { x: 0, y: 0 });
82
79
  o(this, x);
83
- o(this, N, null);
84
- o(this, b, null);
85
- a(this, H, t), a(this, F, s), a(this, x, i.cloneNode(!0));
80
+ o(this, I);
81
+ o(this, p, { x: 0, y: 0 });
82
+ o(this, N);
83
+ o(this, D, null);
84
+ o(this, P, null);
85
+ a(this, x, t), a(this, I, s), a(this, N, i.cloneNode(!0));
86
86
  }
87
87
  get pathname() {
88
- return e(this, F);
88
+ return e(this, I);
89
89
  }
90
90
  get scrollState() {
91
91
  return e(this, p);
92
92
  }
93
93
  get document() {
94
- return e(this, b);
94
+ return e(this, P);
95
95
  }
96
96
  cloneDocument() {
97
- a(this, b, (e(this, N) || e(this, x)).cloneNode(!0));
97
+ a(this, P, (e(this, D) || e(this, N)).cloneNode(!0));
98
98
  }
99
99
  get title() {
100
100
  let t = "";
101
- if (e(this, b).title)
102
- t = e(this, b).title;
101
+ if (e(this, P).title)
102
+ t = e(this, P).title;
103
103
  else {
104
- const s = e(this, b).querySelector("h1");
105
- t = (s == null ? void 0 : s.innerText) || (s == null ? void 0 : s.textContent) || e(this, F);
104
+ const s = e(this, P).querySelector("h1");
105
+ t = (s == null ? void 0 : s.innerText) || (s == null ? void 0 : s.textContent) || e(this, I);
106
106
  }
107
107
  return t;
108
108
  }
@@ -110,54 +110,63 @@ class St {
110
110
  e(this, p).x = 0, e(this, p).y = 0;
111
111
  }
112
112
  clearDocumentState() {
113
- a(this, N, null);
113
+ a(this, D, null);
114
114
  }
115
115
  saveScrollState() {
116
- e(this, x).documentElement.hasAttribute(
116
+ e(this, N).documentElement.hasAttribute(
117
117
  "data-no-scroll-restoration"
118
- ) ? (e(this, p).x = 0, e(this, p).y = 0) : (e(this, p).x = e(this, H).scrollElement.scrollLeft, e(this, p).y = e(this, H).scrollElement.scrollTop);
118
+ ) ? (e(this, p).x = 0, e(this, p).y = 0) : (e(this, p).x = e(this, x).scrollElement.scrollLeft, e(this, p).y = e(this, x).scrollElement.scrollTop);
119
119
  }
120
120
  saveDocumentState() {
121
- e(this, x).documentElement.hasAttribute(
121
+ e(this, N).documentElement.hasAttribute(
122
122
  "data-no-page-restoration"
123
- ) ? a(this, N, null) : a(this, N, document.cloneNode(!0));
123
+ ) ? a(this, D, null) : a(this, D, document.cloneNode(!0));
124
124
  }
125
125
  restoreScrollPosition() {
126
- e(this, H).scrollElement.scroll({
126
+ e(this, x).scrollElement.scroll({
127
127
  top: e(this, p).y,
128
128
  left: e(this, p).x
129
129
  });
130
130
  }
131
131
  }
132
- H = new WeakMap(), F = new WeakMap(), p = new WeakMap(), x = new WeakMap(), N = new WeakMap(), b = new WeakMap();
133
- var P, U, E, Q, A, m, j, D, C, I, V, R, h, $, tt, et, wt, st, it, rt, nt, X;
134
- class Bt {
132
+ x = new WeakMap(), I = new WeakMap(), p = new WeakMap(), N = new WeakMap(), D = new WeakMap(), P = new WeakMap();
133
+ var A, K, E, X, C, m, Y, R, k, L, V, z, l, tt, et, st, bt, it, rt, nt, ot, Z, B;
134
+ class Ot {
135
135
  constructor(t) {
136
- o(this, h);
137
- o(this, P, null);
138
- o(this, U, null);
136
+ o(this, l);
137
+ o(this, A, null);
138
+ o(this, K, null);
139
139
  o(this, E, []);
140
- o(this, Q, new DOMParser());
141
- o(this, A);
140
+ o(this, X, new DOMParser());
141
+ o(this, C);
142
142
  o(this, m, null);
143
- o(this, j);
144
- o(this, D, []);
145
- o(this, C, !1);
146
- o(this, I, null);
143
+ o(this, Y);
144
+ o(this, R, []);
145
+ o(this, k, !1);
146
+ o(this, L, null);
147
147
  o(this, V, /* @__PURE__ */ new Map());
148
- o(this, R, null);
149
- o(this, X, (t) => T(this, null, function* () {
148
+ o(this, z, null);
149
+ o(this, Z, (t) => M(this, null, function* () {
150
150
  var s;
151
- (s = t.state) != null && s.path && (a(this, C, !0), yield this.navigate(t.state.path, { historyAction: "none" }), a(this, C, !1));
151
+ (s = t.state) != null && s.path && (t.preventDefault(), a(this, k, !0), yield this.navigate(t.state.path, { historyAction: "none" }), a(this, k, !1));
152
152
  }));
153
- if (Lt) {
154
- a(this, P, {
155
- base: Ht(t == null ? void 0 : t.base),
153
+ o(this, B, () => {
154
+ const t = e(this, L).scrollTop, s = e(this, L).scrollLeft;
155
+ document.documentElement.classList.toggle("top-scrolled", t > 0), document.documentElement.classList.toggle("left-scrolled", s > 0), U(document, "morphScroll", {
156
+ detail: {
157
+ left: s,
158
+ top: t
159
+ }
160
+ });
161
+ });
162
+ if (yt) {
163
+ a(this, A, {
164
+ base: xt(t == null ? void 0 : t.base),
156
165
  waitForHeadToLoad: (t == null ? void 0 : t.waitForHeadToLoad) !== !1,
157
166
  cachePages: (t == null ? void 0 : t.cachePages) !== !1,
158
167
  trailingSlash: (t == null ? void 0 : t.trailingSlash) || !1,
159
168
  scrollSelector: (t == null ? void 0 : t.scrollSelector) || "body"
160
- }), a(this, U, d(this, h, et).call(this, document.body));
169
+ }), a(this, K, d(this, l, st).call(this, document.body));
161
170
  const s = this.normalizePath(
162
171
  location.pathname + location.hash
163
172
  );
@@ -170,183 +179,183 @@ class Bt {
170
179
  ), document.documentElement.setAttribute(
171
180
  "data-current-leaf",
172
181
  s.leaf
173
- ), this.findLinks(), addEventListener("popstate", e(this, X)), gt({
182
+ ), this.findLinks(), addEventListener("popstate", e(this, Z)), vt({
174
183
  action: "replace",
175
184
  pathname: e(this, m),
176
185
  searchParameters: s.parameters,
177
186
  hash: s.hash
178
- }), a(this, R, new yt()), d(this, h, rt).call(this, document);
187
+ }), a(this, z, new wt()), d(this, l, nt).call(this, document);
179
188
  }
180
189
  }
181
190
  get currentPathname() {
182
191
  return e(this, m);
183
192
  }
184
193
  get previousPathname() {
185
- return e(this, j);
194
+ return e(this, Y);
186
195
  }
187
196
  get links() {
188
197
  return e(this, E);
189
198
  }
190
199
  get scrollElement() {
191
- return e(this, I);
200
+ return e(this, L);
192
201
  }
193
202
  normalizePath(t) {
194
- return xt(t, {
195
- base: e(this, P).base,
196
- trailingSlash: e(this, P).trailingSlash
203
+ return Nt(t, {
204
+ base: e(this, A).base,
205
+ trailingSlash: e(this, A).trailingSlash
197
206
  });
198
207
  }
199
208
  prefetch(t) {
200
- return T(this, null, function* () {
209
+ return M(this, null, function* () {
201
210
  const s = this.normalizePath(t);
202
- d(this, h, tt).call(this, s.pathname);
211
+ d(this, l, et).call(this, s.pathname);
203
212
  });
204
213
  }
205
- navigate(B) {
206
- return T(this, arguments, function* (t, {
214
+ navigate(O) {
215
+ return M(this, arguments, function* (t, {
207
216
  historyAction: s = "push",
208
217
  centerScroll: i,
209
218
  offsetScroll: u,
210
219
  revalidate: f
211
220
  } = {}) {
212
- if (e(this, D).length)
221
+ if (e(this, R).length)
213
222
  return;
214
- const k = this.normalizePath(t);
215
- let { pathname: l, hash: g, parameters: bt, leaf: Pt } = k;
216
- if (e(this, A) === l || e(this, m) === l) {
217
- e(this, C) || d(this, h, nt).call(this, g || 0, {
223
+ const T = this.normalizePath(t);
224
+ let { pathname: h, hash: g, parameters: Pt, leaf: At } = T;
225
+ if (e(this, C) === h || e(this, m) === h) {
226
+ e(this, k) || d(this, l, ot).call(this, g || 0, {
218
227
  centerScroll: i,
219
228
  offsetScroll: u,
220
229
  behavior: "smooth"
221
230
  });
222
231
  return;
223
232
  }
224
- a(this, A, l), e(this, E).forEach((z) => {
225
- z.checkCurrent(l);
233
+ a(this, C, h), e(this, E).forEach((q) => {
234
+ q.checkCurrent(h);
226
235
  });
227
236
  try {
228
- let z = !0;
237
+ let q = !0;
229
238
  if (this.preprocessor)
230
239
  try {
231
- yield new Promise((n, L) => {
232
- var y;
233
- (y = this.preprocessor) == null || y.call(this, {
234
- pathname: l,
240
+ yield new Promise((n, y) => {
241
+ var w;
242
+ (w = this.preprocessor) == null || w.call(this, {
243
+ pathname: h,
235
244
  resolve: n,
236
- reject: L
245
+ reject: y
237
246
  });
238
247
  });
239
248
  } catch (n) {
240
- n ? console.error(n) : console.log("Route change canceled"), z = !1;
249
+ n ? console.error(n) : console.log("Route change canceled"), q = !1;
241
250
  }
242
- if (!z || e(this, A) !== l) {
251
+ if (!q || e(this, C) !== h) {
243
252
  e(this, E).forEach((n) => {
244
253
  n.checkCurrent(e(this, m));
245
254
  });
246
255
  return;
247
256
  }
248
- const ot = yield d(this, h, $).call(this, e(this, m)), S = yield d(this, h, $).call(this, l, f);
249
- if (e(this, A) !== l) {
257
+ const at = yield d(this, l, tt).call(this, e(this, m)), S = yield d(this, l, tt).call(this, h, f);
258
+ if (e(this, C) !== h) {
250
259
  e(this, E).forEach((n) => {
251
260
  n.checkCurrent(e(this, m));
252
261
  });
253
262
  return;
254
263
  }
255
- ot.saveScrollState(), ot.saveDocumentState(), e(this, C) || (S.clearScrollState(), S.clearDocumentState()), S.cloneDocument(), e(this, R).textContent = S.title, document.body.appendChild(e(this, R));
256
- const at = {
257
- pathname: l
264
+ at.saveScrollState(), at.saveDocumentState(), e(this, k) || (S.clearScrollState(), S.clearDocumentState()), S.cloneDocument(), e(this, z).textContent = S.title, document.body.appendChild(e(this, z));
265
+ const lt = {
266
+ pathname: h
258
267
  };
259
- J(document, "morphStart", {
260
- detail: at
268
+ U(document, "morphStart", {
269
+ detail: lt
261
270
  });
262
- const ht = Array.from(document.head.children), lt = Array.from(S.document.head.children), ct = d(this, h, wt).call(this, ht, lt), At = d(this, h, st).call(this, ht, ct), K = d(this, h, st).call(this, lt, ct);
263
- K.forEach((n, L) => {
271
+ const ht = Array.from(document.head.children), ct = Array.from(S.document.head.children), ut = d(this, l, bt).call(this, ht, ct), Ct = d(this, l, it).call(this, ht, ut), G = d(this, l, it).call(this, ct, ut);
272
+ G.forEach((n, y) => {
264
273
  if (n.tagName === "SCRIPT" && n.getAttribute("src")) {
265
- const y = document.createElement("script");
266
- y.type = "module", y.src = n.getAttribute("src"), K[L] = y;
274
+ const w = document.createElement("script");
275
+ w.type = "module", w.src = n.getAttribute("src"), G[y] = w;
267
276
  }
268
- }), K.forEach((n) => {
277
+ }), G.forEach((n) => {
269
278
  document.head.appendChild(n);
270
279
  });
271
- const Z = K.filter((n) => {
280
+ const _ = G.filter((n) => {
272
281
  if (n.hasAttribute("data-no-waiting"))
273
282
  return !1;
274
- if (d(this, h, it).call(this, n))
283
+ if (d(this, l, rt).call(this, n))
275
284
  return !0;
276
285
  });
277
- e(this, P).waitForHeadToLoad && Z.length && (yield new Promise((n) => T(this, null, function* () {
278
- let L = 0;
286
+ e(this, A).waitForHeadToLoad && _.length && (yield new Promise((n) => M(this, null, function* () {
287
+ let y = 0;
279
288
  try {
280
- for (var y = Et(Z), dt, O, mt; dt = !(O = yield y.next()).done; dt = !1) {
281
- const Y = O.value;
282
- Y.onload = () => {
283
- L++, L === Z.length && n();
289
+ for (var w = gt(_), mt, W, ft; mt = !(W = yield w.next()).done; mt = !1) {
290
+ const J = W.value;
291
+ J.onload = () => {
292
+ y++, y === _.length && n();
284
293
  };
285
294
  }
286
- } catch (O) {
287
- mt = [O];
295
+ } catch (W) {
296
+ ft = [W];
288
297
  } finally {
289
298
  try {
290
- dt && (O = y.return) && (yield O.call(y));
299
+ mt && (W = w.return) && (yield W.call(w));
291
300
  } finally {
292
- if (mt)
293
- throw mt[0];
301
+ if (ft)
302
+ throw ft[0];
294
303
  }
295
304
  }
296
305
  })));
297
- const ut = [];
298
- At.forEach((n) => {
299
- n.hasAttribute("data-permanent") || (d(this, h, it).call(this, n) ? ut.push(n) : n.remove());
306
+ const dt = [];
307
+ Ct.forEach((n) => {
308
+ n.hasAttribute("data-permanent") || (d(this, l, rt).call(this, n) ? dt.push(n) : n.remove());
300
309
  });
301
- const Ct = d(this, h, et).call(this, S.document.body);
302
- d(this, h, rt).call(this, S.document), document.documentElement.setAttribute("data-current-pathname", l), document.documentElement.setAttribute("data-current-leaf", Pt), gt({
310
+ const kt = d(this, l, st).call(this, S.document.body);
311
+ d(this, l, nt).call(this, S.document), document.documentElement.setAttribute("data-current-pathname", h), document.documentElement.setAttribute("data-current-leaf", At), vt({
303
312
  action: s,
304
- pathname: l,
305
- searchParameters: bt,
313
+ pathname: h,
314
+ searchParameters: Pt,
306
315
  hash: g
307
- }), e(this, R).remove(), a(this, j, e(this, m)), a(this, m, l), e(this, U).forEach((n, L) => {
308
- const y = Ct[L], dt = getComputedStyle(n).getPropertyValue("--morph-duration"), O = [...y.childNodes];
309
- if (dt) {
310
- const mt = [...n.childNodes];
311
- mt.forEach((v) => {
316
+ }), e(this, z).remove(), a(this, Y, e(this, m)), a(this, m, h), e(this, K).forEach((n, y) => {
317
+ const w = kt[y], mt = getComputedStyle(n).getPropertyValue("--morph-duration"), W = [...w.childNodes];
318
+ if (mt) {
319
+ const ft = [...n.childNodes];
320
+ ft.forEach((v) => {
312
321
  v instanceof HTMLElement && v.classList.add("old");
313
- }), O.forEach((v) => {
322
+ }), W.forEach((v) => {
314
323
  v instanceof HTMLElement && v.classList.add("new");
315
- }), n.prepend(...O), Tt(() => {
316
- O.forEach((v) => {
324
+ }), n.prepend(...W), Mt(() => {
325
+ W.forEach((v) => {
317
326
  v instanceof HTMLElement && v.classList.add("in");
318
327
  });
319
328
  });
320
- const Y = {
329
+ const J = {
321
330
  morphElement: n,
322
- pathname: l
331
+ pathname: h
323
332
  };
324
- J(document, "morphNewChildrenAdded", {
325
- detail: Y
333
+ U(document, "morphNewChildrenAdded", {
334
+ detail: J
326
335
  });
327
- const kt = new Promise((v) => {
336
+ const Tt = new Promise((v) => {
328
337
  setTimeout(() => {
329
- mt.forEach((G) => G.remove()), O.forEach((G) => {
330
- G instanceof HTMLElement && G.classList.remove("in", "new");
331
- }), J(document, "morphOldChildrenRemoved", {
332
- detail: Y
338
+ ft.forEach((Q) => Q.remove()), W.forEach((Q) => {
339
+ Q instanceof HTMLElement && Q.classList.remove("in", "new");
340
+ }), U(document, "morphOldChildrenRemoved", {
341
+ detail: J
333
342
  }), v();
334
- }, (parseFloat(dt) || 0) * 1e3 + 10);
343
+ }, (parseFloat(mt) || 0) * 1e3 + 10);
335
344
  });
336
- e(this, D).push(kt);
345
+ e(this, R).push(Tt);
337
346
  } else
338
- n.innerHTML = "", n.append(...O);
339
- }), g ? (S.clearScrollState(), d(this, h, nt).call(this, g, { centerScroll: i, offsetScroll: u })) : e(this, C) && S.restoreScrollPosition(), yield Promise.all(e(this, D)), ut.forEach((n) => n.remove()), a(this, D, []), this.findLinks(), J(document, "morphComplete", {
340
- detail: at
347
+ n.innerHTML = "", n.append(...W);
348
+ }), g ? (S.clearScrollState(), d(this, l, ot).call(this, g, { centerScroll: i, offsetScroll: u })) : e(this, k) && S.restoreScrollPosition(), yield Promise.all(e(this, R)), dt.forEach((n) => n.remove()), a(this, R, []), this.findLinks(), U(document, "morphComplete", {
349
+ detail: lt
341
350
  }), window.dispatchEvent(new Event("resize"));
342
- } catch (z) {
343
- console.error(z);
351
+ } catch (q) {
352
+ console.error(q);
344
353
  }
345
- a(this, A, void 0);
354
+ a(this, C, void 0);
346
355
  });
347
356
  }
348
357
  addLink(t) {
349
- e(this, E).push(new vt(t, this));
358
+ e(this, E).push(new Lt(t, this));
350
359
  }
351
360
  addLinks(t) {
352
361
  t.forEach((s) => {
@@ -365,47 +374,51 @@ class Bt {
365
374
  return ((i = s.getAttribute("href")) == null ? void 0 : i.startsWith("/")) && !s.hasAttribute("download") && !s.hasAttribute("data-morph-skip") && !s.closest("[data-morph-skip]");
366
375
  }
367
376
  );
368
- e(this, E).forEach((s) => s.destroy()), a(this, E, t.map((s) => new vt(s, this)));
377
+ e(this, E).forEach((s) => s.destroy()), a(this, E, t.map((s) => new Lt(s, this)));
369
378
  }
370
379
  }
371
- P = new WeakMap(), U = new WeakMap(), E = new WeakMap(), Q = new WeakMap(), A = new WeakMap(), m = new WeakMap(), j = new WeakMap(), D = new WeakMap(), C = new WeakMap(), I = new WeakMap(), V = new WeakMap(), R = new WeakMap(), h = new WeakSet(), $ = function(t, s = !1) {
372
- return T(this, null, function* () {
380
+ A = new WeakMap(), K = new WeakMap(), E = new WeakMap(), X = new WeakMap(), C = new WeakMap(), m = new WeakMap(), Y = new WeakMap(), R = new WeakMap(), k = new WeakMap(), L = new WeakMap(), V = new WeakMap(), z = new WeakMap(), l = new WeakSet(), tt = function(t, s = !1) {
381
+ return M(this, null, function* () {
373
382
  let i = e(this, V).get(t);
374
- return (!i || s) && (i = yield d(this, h, tt).call(this, t)), i;
383
+ return (!i || s) && (i = yield d(this, l, et).call(this, t)), i;
375
384
  });
376
- }, tt = function(t) {
377
- return T(this, null, function* () {
378
- const i = yield (yield fetch(t)).text(), u = e(this, Q).parseFromString(i, "text/html"), f = new St(this, t, u);
385
+ }, et = function(t) {
386
+ return M(this, null, function* () {
387
+ const i = yield (yield fetch(t)).text(), u = e(this, X).parseFromString(i, "text/html"), f = new St(this, t, u);
379
388
  return e(this, V).set(t, f), f;
380
389
  });
381
- }, et = function(t) {
390
+ }, st = function(t) {
382
391
  const s = [...t.querySelectorAll("[data-morph]")];
383
392
  return s.length ? s : [t];
384
- }, wt = function(t, s) {
393
+ }, bt = function(t, s) {
385
394
  return t.filter(
386
395
  (i) => s.find(
387
396
  (u) => u.outerHTML === i.outerHTML
388
397
  )
389
398
  );
390
- }, st = function(t, s) {
399
+ }, it = function(t, s) {
391
400
  return t.filter(
392
401
  (i) => !s.find(
393
402
  (u) => u.outerHTML === i.outerHTML
394
403
  )
395
404
  );
396
- }, it = function(t) {
397
- return t.tagName === "SCRIPT" || t.tagName === "STYLE" || t.tagName === "LINK" && t.getAttribute("rel") === "stylesheet";
398
405
  }, rt = function(t) {
399
- a(this, I, t.querySelector(e(this, P).scrollSelector) || t.documentElement);
400
- }, nt = function(t, s) {
406
+ return t.tagName === "SCRIPT" || t.tagName === "STYLE" || t.tagName === "LINK" && t.getAttribute("rel") === "stylesheet";
407
+ }, nt = function(t) {
408
+ var s, i;
409
+ (s = e(this, L)) == null || s.removeEventListener(
410
+ "scroll",
411
+ e(this, B)
412
+ ), a(this, L, t.querySelector(e(this, A).scrollSelector) || t.documentElement), (i = e(this, L)) == null || i.addEventListener("scroll", e(this, B)), e(this, B).call(this);
413
+ }, ot = function(t, s) {
401
414
  const i = typeof t == "string" ? document.getElementById(t) : t;
402
- (typeof i == "number" || i) && Mt(i, {
403
- scrollElement: e(this, I),
415
+ (typeof i == "number" || i) && Ht(i, {
416
+ scrollElement: e(this, L),
404
417
  behavior: (s == null ? void 0 : s.behavior) || "instant",
405
418
  center: s == null ? void 0 : s.centerScroll,
406
419
  offset: s == null ? void 0 : s.offsetScroll
407
420
  });
408
- }, X = new WeakMap();
421
+ }, Z = new WeakMap(), B = new WeakMap();
409
422
  export {
410
- Bt as Morph
423
+ Ot as Morph
411
424
  };
@@ -6,6 +6,7 @@ export declare class PopoverButtonElement extends HTMLElement {
6
6
  constructor();
7
7
  get type(): CSSProperty<PopoverButtonType>;
8
8
  get popoverElement(): PopoverElement | undefined;
9
+ changePopover(targetId: string): void;
9
10
  protected connectedCallback(): void;
10
11
  protected disconnectedCallback(): void;
11
12
  }