aptechka 0.79.0 → 0.80.1

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