aptechka 0.82.6 → 0.83.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 (59) hide show
  1. package/lib/Composed-C-TV9te3.cjs +1 -0
  2. package/lib/Composed-DyAWjEXE.js +121 -0
  3. package/lib/{LocalLinks-Baf0xWZ3.cjs → LocalLinks-BxhSFv_Q.cjs} +1 -1
  4. package/lib/{LocalLinks-Z9pxKguG.js → LocalLinks-DFZFpbjs.js} +2 -2
  5. package/lib/api-fetcher/index.cjs +1 -0
  6. package/lib/api-fetcher/index.d.ts +16 -0
  7. package/lib/api-fetcher/index.js +100 -0
  8. package/lib/jsx/h.d.ts +15 -0
  9. package/lib/jsx/hydrate.d.ts +1 -0
  10. package/lib/jsx/index.cjs +1 -1
  11. package/lib/jsx/index.d.ts +4 -1
  12. package/lib/jsx/index.js +312 -87
  13. package/lib/jsx/integrations/astro/client.cjs +1 -0
  14. package/lib/jsx/integrations/astro/client.d.ts +2 -0
  15. package/lib/jsx/integrations/astro/client.js +50 -0
  16. package/lib/jsx/integrations/astro/index.cjs +1 -0
  17. package/lib/jsx/integrations/astro/index.d.ts +2 -0
  18. package/lib/jsx/integrations/astro/index.js +54 -0
  19. package/lib/jsx/integrations/astro/server.cjs +1 -0
  20. package/lib/jsx/integrations/astro/server.d.ts +3 -0
  21. package/lib/jsx/integrations/astro/server.js +35 -0
  22. package/lib/jsx/plugins/vite.d.ts +21 -0
  23. package/lib/jsx/render.d.ts +1 -1
  24. package/lib/jsx/type.d.ts +190 -221
  25. package/lib/jsx/utils/children/createElement.d.ts +1 -0
  26. package/lib/jsx/utils/children/hydrateTextNode.d.ts +1 -0
  27. package/lib/local-links/index.cjs +1 -1
  28. package/lib/local-links/index.js +1 -1
  29. package/lib/morph/index.cjs +1 -1
  30. package/lib/morph/index.js +72 -72
  31. package/lib/{morph-D_ybmXWR.js → morph-BQErz7qP.js} +8 -8
  32. package/lib/popover/index.cjs +1 -1
  33. package/lib/popover/index.js +1 -1
  34. package/lib/render-DQs7rIoN.cjs +1 -0
  35. package/lib/render-D_0FCWEu.js +18 -0
  36. package/lib/router/index.cjs +1 -1
  37. package/lib/router/index.js +3 -3
  38. package/lib/spa/index.cjs +1 -1
  39. package/lib/spa/index.js +3 -3
  40. package/lib/store/index.cjs +1 -1
  41. package/lib/store/index.js +6 -7
  42. package/lib/url-CHgcNwJ1.cjs +1 -0
  43. package/lib/url-CYgo5vrG.js +113 -0
  44. package/lib/utils/index.cjs +1 -1
  45. package/lib/utils/index.js +45 -43
  46. package/lib/utils/polyfills.d.ts +1 -1
  47. package/lib/utils/url.d.ts +6 -0
  48. package/lib/vite-C-i3hVDL.js +75 -0
  49. package/lib/vite-DzanPumM.cjs +44 -0
  50. package/package.json +40 -7
  51. package/lib/Composed-C-mnUGX6.js +0 -70
  52. package/lib/Composed-RFcm2x5c.cjs +0 -1
  53. package/lib/DerivedArray-DdCR-Oy7.cjs +0 -1
  54. package/lib/DerivedArray-opbeygTL.js +0 -59
  55. package/lib/jsx/plugins/hmr.d.ts +0 -13
  56. package/lib/render-1u700s93.js +0 -212
  57. package/lib/render-BIOfUddT.cjs +0 -1
  58. package/lib/url-CPgw9bd5.cjs +0 -1
  59. package/lib/url-DAl-mgbC.js +0 -97
@@ -1,70 +0,0 @@
1
- var m = (e) => {
2
- throw TypeError(e);
3
- };
4
- var p = (e, r, s) => r.has(e) || m("Cannot " + s);
5
- var t = (e, r, s) => (p(e, r, "read from private field"), s ? s.call(e) : r.get(e)), h = (e, r, s) => r.has(e) ? m("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(e) : r.set(e, s), o = (e, r, s, c) => (p(e, r, "write to private field"), c ? c.call(e, s) : r.set(e, s), s);
6
- import { S as d } from "./Store-ZThXYBQd.js";
7
- import { d as g } from "./function-C10DGppn.js";
8
- import "construct-style-sheets-polyfill";
9
- import "./index-e9eDuagL.js";
10
- var a;
11
- class R extends d {
12
- constructor(s, c, u) {
13
- super(null, u);
14
- h(this, a);
15
- o(this, a, s.subscribe((b) => {
16
- this.current = c(b.current);
17
- }));
18
- }
19
- close() {
20
- super.close(), t(this, a).call(this);
21
- }
22
- }
23
- a = new WeakMap();
24
- var l, i, n;
25
- class S extends d {
26
- constructor(s, c, u) {
27
- super(s, u);
28
- h(this, l);
29
- h(this, i);
30
- h(this, n, 0);
31
- o(this, i, new d(!1)), o(this, l, c), u != null && u.manualControl || this.refetch();
32
- }
33
- get isPending() {
34
- return t(this, i);
35
- }
36
- refetch() {
37
- t(this, i).current = !0, o(this, n, t(this, n) + 1);
38
- const s = t(this, n);
39
- t(this, l).call(this).then((c) => {
40
- s === t(this, n) && (t(this, i).current = !1, this.current = c);
41
- });
42
- }
43
- }
44
- l = new WeakMap(), i = new WeakMap(), n = new WeakMap();
45
- var f;
46
- class v extends d {
47
- constructor(s, c, u) {
48
- super(null, u);
49
- h(this, f, []);
50
- const b = g(() => {
51
- this.current = c();
52
- }, 0);
53
- s.forEach((x) => {
54
- t(this, f).push(
55
- x.subscribe(() => {
56
- b();
57
- })
58
- );
59
- });
60
- }
61
- close() {
62
- super.close(), t(this, f).forEach((s) => s());
63
- }
64
- }
65
- f = new WeakMap();
66
- export {
67
- v as C,
68
- R as D,
69
- S as R
70
- };
@@ -1 +0,0 @@
1
- "use strict";var x=s=>{throw TypeError(s)};var S=(s,r,e)=>r.has(s)||x("Cannot "+e);var t=(s,r,e)=>(S(s,r,"read from private field"),e?e.call(s):r.get(s)),n=(s,r,e)=>r.has(s)?x("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(s):r.set(s,e),o=(s,r,e,c)=>(S(s,r,"write to private field"),c?c.call(s,e):r.set(s,e),e);const a=require("./Store-Blf4msDz.cjs"),q=require("./function-MthRj-GJ.cjs");require("construct-style-sheets-polyfill");require("./index-OE2INULi.cjs");var l;class g extends a.Store{constructor(e,c,u){super(null,u);n(this,l);o(this,l,e.subscribe(b=>{this.current=c(b.current)}))}close(){super.close(),t(this,l).call(this)}}l=new WeakMap;var d,i,h;class m extends a.Store{constructor(e,c,u){super(e,u);n(this,d);n(this,i);n(this,h,0);o(this,i,new a.Store(!1)),o(this,d,c),u!=null&&u.manualControl||this.refetch()}get isPending(){return t(this,i)}refetch(){t(this,i).current=!0,o(this,h,t(this,h)+1);const e=t(this,h);t(this,d).call(this).then(c=>{e===t(this,h)&&(t(this,i).current=!1,this.current=c)})}}d=new WeakMap,i=new WeakMap,h=new WeakMap;var f;class C extends a.Store{constructor(e,c,u){super(null,u);n(this,f,[]);const b=q.debounce(()=>{this.current=c()},0);e.forEach(p=>{t(this,f).push(p.subscribe(()=>{b()}))})}close(){super.close(),t(this,f).forEach(e=>e())}}f=new WeakMap;exports.Composed=C;exports.Derived=g;exports.Resource=m;
@@ -1 +0,0 @@
1
- "use strict";var g=e=>{throw TypeError(e)};var D=(e,r,s)=>r.has(e)||g("Cannot "+s);var d=(e,r,s)=>(D(e,r,"read from private field"),s?s.call(e):r.get(e)),h=(e,r,s)=>r.has(e)?g("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(e):r.set(e,s),f=(e,r,s,i)=>(D(e,r,"write to private field"),i?i.call(e,s):r.set(e,s),s);const j=require("./Store-Blf4msDz.cjs");var v,b;class p extends j.Store{constructor(s,i,t){super(null,t);h(this,v);h(this,b);f(this,b,!!(t!=null&&t.revalidateAll)),f(this,v,s.subscribe(l=>{this.current=l.current.map((u,a,o)=>{var c,n;return!d(this,b)&&((c=this.current)!=null&&c.length)&&((n=l.previous)!=null&&n.length)&&l.previous[a]===u?this.current[a]:i(u,a,o)})}))}close(){super.close(),d(this,v).call(this)}}v=new WeakMap,b=new WeakMap;var k,A;class x extends j.Store{constructor(s,i,t){super(null,t);h(this,k);h(this,A);f(this,A,!!(t!=null&&t.revalidateAll)),f(this,k,s.subscribe(l=>{this.current=l.current.map((u,a,o)=>{var n;if(!d(this,A)){const S=(n=l.previous)==null?void 0:n.find(y=>y.key===u.key&&JSON.stringify(y)===JSON.stringify(u));if(S){const y=this.current.find(_=>typeof _=="object"&&_&&"__key"in _&&_.__key===S.key);if(y)return y}}const c=i(u,a,o);return c&&typeof c=="object"&&(c.__key=u.key),c})}))}close(){super.close(),d(this,k).call(this)}}k=new WeakMap,A=new WeakMap;exports.DerivedArray=p;exports.DerivedKeyedArray=x;
@@ -1,59 +0,0 @@
1
- var p = (e) => {
2
- throw TypeError(e);
3
- };
4
- var S = (e, r, s) => r.has(e) || p("Cannot " + s);
5
- var f = (e, r, s) => (S(e, r, "read from private field"), s ? s.call(e) : r.get(e)), y = (e, r, s) => r.has(e) ? p("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(e) : r.set(e, s), d = (e, r, s, c) => (S(e, r, "write to private field"), c ? c.call(e, s) : r.set(e, s), s);
6
- import { S as m } from "./Store-ZThXYBQd.js";
7
- var b, v;
8
- class j extends m {
9
- constructor(s, c, t) {
10
- super(null, t);
11
- y(this, b);
12
- y(this, v);
13
- d(this, v, !!(t != null && t.revalidateAll)), d(this, b, s.subscribe((i) => {
14
- this.current = i.current.map((u, a, o) => {
15
- var l, n;
16
- return !f(this, v) && ((l = this.current) != null && l.length) && ((n = i.previous) != null && n.length) && i.previous[a] === u ? this.current[a] : c(u, a, o);
17
- });
18
- }));
19
- }
20
- close() {
21
- super.close(), f(this, b).call(this);
22
- }
23
- }
24
- b = new WeakMap(), v = new WeakMap();
25
- var k, A;
26
- class I extends m {
27
- constructor(s, c, t) {
28
- super(null, t);
29
- y(this, k);
30
- y(this, A);
31
- d(this, A, !!(t != null && t.revalidateAll)), d(this, k, s.subscribe((i) => {
32
- this.current = i.current.map((u, a, o) => {
33
- var n;
34
- if (!f(this, A)) {
35
- const g = (n = i.previous) == null ? void 0 : n.find(
36
- (h) => h.key === u.key && JSON.stringify(h) === JSON.stringify(u)
37
- );
38
- if (g) {
39
- const h = this.current.find(
40
- (_) => typeof _ == "object" && _ && "__key" in _ && _.__key === g.key
41
- );
42
- if (h)
43
- return h;
44
- }
45
- }
46
- const l = c(u, a, o);
47
- return l && typeof l == "object" && (l.__key = u.key), l;
48
- });
49
- }));
50
- }
51
- close() {
52
- super.close(), f(this, k).call(this);
53
- }
54
- }
55
- k = new WeakMap(), A = new WeakMap();
56
- export {
57
- j as D,
58
- I as a
59
- };
@@ -1,13 +0,0 @@
1
- export declare function hmrPlugin(): {
2
- name: string;
3
- apply: "serve";
4
- transform(code: string, id: string): {
5
- code: string;
6
- map: null;
7
- } | null;
8
- config(_config: any, opt: any): {
9
- define: {
10
- __JSX_HMR_DEV__: boolean;
11
- };
12
- };
13
- };
@@ -1,212 +0,0 @@
1
- var O = Object.defineProperty, R = Object.defineProperties;
2
- var q = Object.getOwnPropertyDescriptors;
3
- var w = Object.getOwnPropertySymbols;
4
- var B = Object.prototype.hasOwnProperty, K = Object.prototype.propertyIsEnumerable;
5
- var N = (r) => {
6
- throw TypeError(r);
7
- };
8
- var L = (r, s, t) => s in r ? O(r, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[s] = t, m = (r, s) => {
9
- for (var t in s || (s = {}))
10
- B.call(s, t) && L(r, t, s[t]);
11
- if (w)
12
- for (var t of w(s))
13
- K.call(s, t) && L(r, t, s[t]);
14
- return r;
15
- }, D = (r, s) => R(r, q(s));
16
- var F = (r, s, t) => s.has(r) || N("Cannot " + t);
17
- var d = (r, s, t) => (F(r, s, "read from private field"), t ? t.call(r) : s.get(r)), g = (r, s, t) => s.has(r) ? N("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(r) : s.set(r, t), C = (r, s, t, e) => (F(r, s, "write to private field"), e ? e.call(r, t) : s.set(r, t), t);
18
- import { S as l } from "./Store-ZThXYBQd.js";
19
- import { c as M } from "./string-BlMQbe8b.js";
20
- import { d as J, p as X } from "./morph-D_ybmXWR.js";
21
- import "construct-style-sheets-polyfill";
22
- import "./index-e9eDuagL.js";
23
- import { connector as $ } from "./connector/index.js";
24
- import { a as z } from "./DerivedArray-opbeygTL.js";
25
- const Q = { current: null };
26
- var b, u;
27
- class U extends HTMLElement {
28
- constructor() {
29
- super();
30
- g(this, b, []);
31
- g(this, u, []);
32
- Q.current = this;
33
- }
34
- addConnectCallback(t) {
35
- d(this, b).push(t);
36
- }
37
- addDisconnectCallback(t) {
38
- d(this, u).push(t);
39
- }
40
- connectedCallback() {
41
- d(this, b).forEach((t) => {
42
- const e = t(this);
43
- e && d(this, u).push(e);
44
- });
45
- }
46
- disconnectedCallback() {
47
- d(this, u).forEach((t) => {
48
- t(this);
49
- }), C(this, b, []), C(this, u, []);
50
- }
51
- }
52
- b = new WeakMap(), u = new WeakMap();
53
- function E(r, s, t) {
54
- const e = s.subscribe((c) => {
55
- t(c);
56
- });
57
- $.subscribe(r, {
58
- disconnectCallback: () => {
59
- e();
60
- },
61
- maxWaitSec: 20,
62
- unsubscribeAfterDisconnect: !0
63
- });
64
- }
65
- function W(r, s) {
66
- s && (s instanceof l ? E(r, s, (t) => {
67
- t.previous && r.classList.remove(t.previous.toString()), t.current && r.classList.add(t.current.toString());
68
- }) : typeof s == "object" && !Array.isArray(s) ? Object.entries(s).forEach(([t, e]) => {
69
- e instanceof l ? E(r, e, (c) => {
70
- r.classList.toggle(t, !!c.current);
71
- }) : e && r.classList.add(t);
72
- }) : Array.isArray(s) ? s.forEach((t) => {
73
- typeof t == "string" ? r.classList.add(t) : W(r, t);
74
- }) : s.toString().split(" ").map((t) => r.classList.add(t.trim())));
75
- }
76
- function V(r, s) {
77
- s && (typeof s == "object" ? Object.entries(s).forEach(([t, e]) => {
78
- e instanceof l ? E(r, e, (c) => {
79
- var o;
80
- r.style[t] = (o = c.current) == null ? void 0 : o.toString();
81
- }) : (typeof e == "number" || typeof e == "string" || typeof e == "boolean") && (r.style[t] = e.toString());
82
- }) : typeof s == "string" && (r.style = s));
83
- }
84
- function A(r, s, t) {
85
- s === "ref" && t ? Array.isArray(t) ? t.forEach((e) => {
86
- typeof e == "object" && "value" in e && (e.value = r);
87
- }) : typeof t == "object" && "value" in t && (t.value = r) : s === "className" || s === "class" ? W(r, t) : s === "style" ? V(r, t) : typeof t == "number" ? s === "tabIndex" ? r.setAttribute("tabindex", t.toString()) : A(r, s, t.toString()) : typeof t == "string" ? s === "htmlFor" ? r.setAttribute("for", t) : r.setAttribute(s, t) : typeof t == "boolean" ? t ? r.setAttribute(s, "") : r.removeAttribute(s) : t instanceof l && E(r, t, (e) => {
88
- s in r ? r[s] = e.current : A(r, s, e.current);
89
- });
90
- }
91
- function Y(r, s) {
92
- for (const [t, e] of Object.entries(s != null ? s : {}))
93
- typeof e == "function" && t.startsWith("on") ? r.addEventListener(
94
- t.replace("on", "").toLowerCase(),
95
- e
96
- ) : A(r, t, e);
97
- }
98
- function H(r) {
99
- const s = [];
100
- return r.forEach((t) => {
101
- t != null && (typeof t == "number" ? s.push(t.toString()) : Array.isArray(t) ? t.forEach((e) => {
102
- s.push(...H(e));
103
- }) : s.push(t));
104
- }), s;
105
- }
106
- function Z(r, s) {
107
- const t = [...r.childNodes].filter((n) => n.__storeId === s.id), e = s.current, c = Array.isArray(e) ? e : [e], o = [];
108
- if (c.forEach((n) => {
109
- let i = null;
110
- typeof n == "boolean" || typeof n == "number" || typeof n == "string" ? i = document.createTextNode(n.toString()) : n instanceof Node && (i = n), i && (i.__storeId = s.id, o.push(i));
111
- }), s instanceof z) {
112
- const n = [];
113
- o.forEach((i, f) => {
114
- const a = t.find(
115
- (h) => h.__key === i.__key
116
- );
117
- a ? a.isEqualNode(i) ? n.push(a) : (a.replaceWith(i), n.push(i)) : (n.push(i), r.appendChild(i));
118
- }), t.forEach((i) => {
119
- n.includes(i) || i.remove();
120
- });
121
- } else
122
- o.forEach((n, i) => {
123
- var a;
124
- const f = t[i];
125
- if (f)
126
- f.isEqualNode(n) || (f.replaceWith(n), t[i] = n);
127
- else {
128
- const h = t[t.length - 1];
129
- h ? (a = h.parentNode) == null || a.insertBefore(
130
- n,
131
- h.nextSibling
132
- ) : r.appendChild(n);
133
- }
134
- }), t.slice(o.length).forEach((n) => {
135
- n.remove();
136
- });
137
- }
138
- class _ {
139
- constructor(s, t, e) {
140
- this.tag = s, this.attributes = t, this.children = e;
141
- }
142
- }
143
- class y extends _ {
144
- }
145
- class S extends _ {
146
- }
147
- class I extends _ {
148
- }
149
- function p(r, s, t, e = !1) {
150
- const c = H(t);
151
- Y(r, s), c.forEach((o) => {
152
- if (o instanceof l)
153
- E(r, o, () => {
154
- Z(r, o);
155
- });
156
- else if (o instanceof y)
157
- o.tag === "shadow" && r.shadowRoot ? p(
158
- r.shadowRoot,
159
- o.attributes,
160
- o.children
161
- ) : p(r, o.attributes, o.children);
162
- else if (o instanceof S) {
163
- let n = null;
164
- o.tag === "svg" ? (n = document.createElementNS(
165
- "http://www.w3.org/2000/svg",
166
- "svg"
167
- ), p(n, o.attributes, o.children, !0)) : n = e ? document.createElementNS("http://www.w3.org/2000/svg", o.tag) : document.createElement(o.tag), p(n, o.attributes, o.children, e), r.append(n);
168
- } else if (o instanceof I) {
169
- const n = document.createElement(o.tag);
170
- p(n, o.attributes, o.children);
171
- const i = J(document.head, n);
172
- X(document.head, i);
173
- } else
174
- r.append(o);
175
- });
176
- }
177
- function G(r, s, ...t) {
178
- var e;
179
- if (typeof r == "string")
180
- return r === "component" ? new y(r, s, t) : r === "shadow" ? new y(r, s, t) : r === "head" ? new I(r, s, t) : new S(r, s, t);
181
- {
182
- if (r === P)
183
- return P(t);
184
- if (r.template)
185
- return r(m({}, s));
186
- const c = `e-${M(r.name)}`;
187
- let o = customElements.get(c);
188
- o || (o = (e = class extends U {
189
- constructor() {
190
- super();
191
- }
192
- }, e.formAssociated = r.formAssociated, e), customElements.define(c, o));
193
- const n = new o(), i = D(m({}, s), {
194
- children: t
195
- }), f = r(i);
196
- return __JSX_HMR_DEV__ && (n.__props__ = i), (f instanceof y || f instanceof S) && (f != null && f.children || f.attributes) && p(n, f.attributes, f.children), n;
197
- }
198
- }
199
- function P(r) {
200
- const s = document.createDocumentFragment();
201
- return p(s, void 0, r), s;
202
- }
203
- function et(r, s, t) {
204
- const e = /* @__PURE__ */ G(s, m({}, t));
205
- return r.append(e), e;
206
- }
207
- export {
208
- P as F,
209
- Q as a,
210
- G as h,
211
- et as r
212
- };
@@ -1 +0,0 @@
1
- "use strict";var B=Object.defineProperty,K=Object.defineProperties;var M=Object.getOwnPropertyDescriptors;var q=Object.getOwnPropertySymbols;var J=Object.prototype.hasOwnProperty,X=Object.prototype.propertyIsEnumerable;var N=e=>{throw TypeError(e)};var L=(e,r,t)=>r in e?B(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,y=(e,r)=>{for(var t in r||(r={}))J.call(r,t)&&L(e,t,r[t]);if(q)for(var t of q(r))X.call(r,t)&&L(e,t,r[t]);return e},D=(e,r)=>K(e,M(r));var F=(e,r,t)=>r.has(e)||N("Cannot "+t);var d=(e,r,t)=>(F(e,r,"read from private field"),t?t.call(e):r.get(e)),S=(e,r,t)=>r.has(e)?N("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(e):r.set(e,t),C=(e,r,t,s)=>(F(e,r,"write to private field"),s?s.call(e,t):r.set(e,t),t);const l=require("./Store-Blf4msDz.cjs"),$=require("./string-DUXXtU8v.cjs"),P=require("./morph-B6sGhLCi.cjs");require("construct-style-sheets-polyfill");require("./index-OE2INULi.cjs");const z=require("./connector/index.cjs"),Q=require("./DerivedArray-DdCR-Oy7.cjs"),W={current:null};var b,p;class U extends HTMLElement{constructor(){super();S(this,b,[]);S(this,p,[]);W.current=this}addConnectCallback(t){d(this,b).push(t)}addDisconnectCallback(t){d(this,p).push(t)}connectedCallback(){d(this,b).forEach(t=>{const s=t(this);s&&d(this,p).push(s)})}disconnectedCallback(){d(this,p).forEach(t=>{t(this)}),C(this,b,[]),C(this,p,[])}}b=new WeakMap,p=new WeakMap;function E(e,r,t){const s=r.subscribe(f=>{t(f)});z.connector.subscribe(e,{disconnectCallback:()=>{s()},maxWaitSec:20,unsubscribeAfterDisconnect:!0})}function H(e,r){r&&(r instanceof l.Store?E(e,r,t=>{t.previous&&e.classList.remove(t.previous.toString()),t.current&&e.classList.add(t.current.toString())}):typeof r=="object"&&!Array.isArray(r)?Object.entries(r).forEach(([t,s])=>{s instanceof l.Store?E(e,s,f=>{e.classList.toggle(t,!!f.current)}):s&&e.classList.add(t)}):Array.isArray(r)?r.forEach(t=>{typeof t=="string"?e.classList.add(t):H(e,t)}):r.toString().split(" ").map(t=>e.classList.add(t.trim())))}function V(e,r){r&&(typeof r=="object"?Object.entries(r).forEach(([t,s])=>{s instanceof l.Store?E(e,s,f=>{var n;e.style[t]=(n=f.current)==null?void 0:n.toString()}):(typeof s=="number"||typeof s=="string"||typeof s=="boolean")&&(e.style[t]=s.toString())}):typeof r=="string"&&(e.style=r))}function A(e,r,t){r==="ref"&&t?Array.isArray(t)?t.forEach(s=>{typeof s=="object"&&"value"in s&&(s.value=e)}):typeof t=="object"&&"value"in t&&(t.value=e):r==="className"||r==="class"?H(e,t):r==="style"?V(e,t):typeof t=="number"?r==="tabIndex"?e.setAttribute("tabindex",t.toString()):A(e,r,t.toString()):typeof t=="string"?r==="htmlFor"?e.setAttribute("for",t):e.setAttribute(r,t):typeof t=="boolean"?t?e.setAttribute(r,""):e.removeAttribute(r):t instanceof l.Store&&E(e,t,s=>{r in e?e[r]=s.current:A(e,r,s.current)})}function Y(e,r){for(const[t,s]of Object.entries(r!=null?r:{}))typeof s=="function"&&t.startsWith("on")?e.addEventListener(t.replace("on","").toLowerCase(),s):A(e,t,s)}function I(e){const r=[];return e.forEach(t=>{t!=null&&(typeof t=="number"?r.push(t.toString()):Array.isArray(t)?t.forEach(s=>{r.push(...I(s))}):r.push(t))}),r}function Z(e,r){const t=[...e.childNodes].filter(o=>o.__storeId===r.id),s=r.current,f=Array.isArray(s)?s:[s],n=[];if(f.forEach(o=>{let i=null;typeof o=="boolean"||typeof o=="number"||typeof o=="string"?i=document.createTextNode(o.toString()):o instanceof Node&&(i=o),i&&(i.__storeId=r.id,n.push(i))}),r instanceof Q.DerivedKeyedArray){const o=[];n.forEach((i,c)=>{const a=t.find(h=>h.__key===i.__key);a?a.isEqualNode(i)?o.push(a):(a.replaceWith(i),o.push(i)):(o.push(i),e.appendChild(i))}),t.forEach(i=>{o.includes(i)||i.remove()})}else n.forEach((o,i)=>{var a;const c=t[i];if(c)c.isEqualNode(o)||(c.replaceWith(o),t[i]=o);else{const h=t[t.length-1];h?(a=h.parentNode)==null||a.insertBefore(o,h.nextSibling):e.appendChild(o)}}),t.slice(n.length).forEach(o=>{o.remove()})}class w{constructor(r,t,s){this.tag=r,this.attributes=t,this.children=s}}class g extends w{}class _ extends w{}class O extends w{}function u(e,r,t,s=!1){const f=I(t);Y(e,r),f.forEach(n=>{if(n instanceof l.Store)E(e,n,()=>{Z(e,n)});else if(n instanceof g)n.tag==="shadow"&&e.shadowRoot?u(e.shadowRoot,n.attributes,n.children):u(e,n.attributes,n.children);else if(n instanceof _){let o=null;n.tag==="svg"?(o=document.createElementNS("http://www.w3.org/2000/svg","svg"),u(o,n.attributes,n.children,!0)):o=s?document.createElementNS("http://www.w3.org/2000/svg",n.tag):document.createElement(n.tag),u(o,n.attributes,n.children,s),e.append(o)}else if(n instanceof O){const o=document.createElement(n.tag);u(o,n.attributes,n.children);const i=P.diff(document.head,o);P.patch(document.head,i)}else e.append(n)})}function R(e,r,...t){var s;if(typeof e=="string")return e==="component"?new g(e,r,t):e==="shadow"?new g(e,r,t):e==="head"?new O(e,r,t):new _(e,r,t);{if(e===m)return m(t);if(e.template)return e(y({},r));const f=`e-${$.camelToKebab(e.name)}`;let n=customElements.get(f);n||(n=(s=class extends U{constructor(){super()}},s.formAssociated=e.formAssociated,s),customElements.define(f,n));const o=new n,i=D(y({},r),{children:t}),c=e(i);return __JSX_HMR_DEV__&&(o.__props__=i),(c instanceof g||c instanceof _)&&(c!=null&&c.children||c.attributes)&&u(o,c.attributes,c.children),o}}function m(e){const r=document.createDocumentFragment();return u(r,void 0,e),r}function G(e,r,t){const s=R(r,y({},t));return e.append(s),s}exports.Fragment=m;exports.activeComponent=W;exports.h=R;exports.render=G;
@@ -1 +0,0 @@
1
- "use strict";var y=Object.defineProperty,$=Object.defineProperties;var w=Object.getOwnPropertyDescriptors;var p=Object.getOwnPropertySymbols;var P=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable;var m=(t,e,r)=>e in t?y(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,S=(t,e)=>{for(var r in e||(e={}))P.call(e,r)&&m(t,r,e[r]);if(p)for(var r of p(e))W.call(e,r)&&m(t,r,e[r]);return t},g=(t,e)=>$(t,w(e));function z(t,{base:e="",trailingSlash:r=!1,mergeParams:s,removeParams:n}={}){e=e.endsWith("/")?e.slice(0,-1):e,t=t.replace(e,""),t.startsWith("/")&&(t=t.slice(1));const i=t.split("#"),l=i[0].split("?");let a=l[0].startsWith("/")?l[0]:"/"+l[0];r?a=!a.endsWith("/")&&a!=="/"?a+"/":a:a=a.endsWith("/")&&a!=="/"?a.slice(0,-1):a;let c=l[1]||"";if(s){const o=new URLSearchParams(c),U=new URLSearchParams(s);for(const[h,d]of U)o.has(h)||o.set(h,d);n==null||n.split(",").forEach(h=>{o.has(h)&&o.delete(h)}),c=o.toString()}const u=e+a,f=i[1],R=`${u}${c?"?"+c:""}${f?"#"+f:""}`;return{leaf:a,pathname:u,parameters:c,hash:f,path:R}}function A(t="/"){return t.endsWith("/")||(t+="/"),t.startsWith("/")||(t+="/"),t}function E(t){if(t.action==="none")return;const e=t==null?void 0:t.searchParameters,r=t.hash?t.hash.startsWith("#")?t.hash:"#"+t.hash:"",s=e?e.startsWith("?")?e:"?"+e:"",n=`${t.pathname}${s}${r}`,i=g(S({},t.state),{path:n});t.action==="push"?history.pushState(i,"",n):t.action==="replace"&&history.replaceState(i,"",n)}function k(t){const e=new URLSearchParams(t),r={};for(const[s,n]of e)r[s]=n;return r}function q(t,e){const r=new URL(location.href),s=(e==null?void 0:e.toString())||"";r.searchParams.set(t,s),history.replaceState(history.state,"",r.href)}function L(t,e,r){t.setAttribute(e,new URL(t.getAttribute(e),r).pathname)}function B(t,e){t.querySelectorAll('[href^="./"], [href^="../"]').forEach(r=>L(r,"href",e)),t.querySelectorAll('[src^="./"], [src^="../"]').forEach(r=>L(r,"src",e))}function H(t,{base:e="",trailingSlash:r=!1}={}){e=e.replace(/^\/|\/$/g,"");const s=typeof t=="string"?t.replace(/^\/|\/$/g,""):t.pathname.replace(/^\/|\/$/g,"");let n="";return s.includes(e)?n=`/${s}`:n=`${e}/${s}`,r&&!n.endsWith("/")&&(n+="/"),new URL(n,location.origin)}function j(t){try{const e=new URL(t);if(window.location.origin===e.origin)return e.pathname===window.location.pathname?!e.hash:!0}catch(e){}return!1}exports.changeHistory=E;exports.isLocalUrl=j;exports.normalizeBase=A;exports.normalizeRelativeURLs=B;exports.normalizeURL=H;exports.parseSearchParameters=k;exports.splitPath=z;exports.updateSearchParameter=q;
@@ -1,97 +0,0 @@
1
- var L = Object.defineProperty, R = Object.defineProperties;
2
- var U = Object.getOwnPropertyDescriptors;
3
- var p = Object.getOwnPropertySymbols;
4
- var W = Object.prototype.hasOwnProperty, P = Object.prototype.propertyIsEnumerable;
5
- var g = (t, e, s) => e in t ? L(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, S = (t, e) => {
6
- for (var s in e || (e = {}))
7
- W.call(e, s) && g(t, s, e[s]);
8
- if (p)
9
- for (var s of p(e))
10
- P.call(e, s) && g(t, s, e[s]);
11
- return t;
12
- }, $ = (t, e) => R(t, U(e));
13
- function E(t, {
14
- base: e = "",
15
- trailingSlash: s = !1,
16
- mergeParams: r,
17
- removeParams: n
18
- } = {}) {
19
- e = e.endsWith("/") ? e.slice(0, -1) : e, t = t.replace(e, ""), t.startsWith("/") && (t = t.slice(1));
20
- const i = t.split("#"), f = i[0].split("?");
21
- let a = f[0].startsWith("/") ? f[0] : "/" + f[0];
22
- s ? a = !a.endsWith("/") && a !== "/" ? a + "/" : a : a = a.endsWith("/") && a !== "/" ? a.slice(0, -1) : a;
23
- let c = f[1] || "";
24
- if (r) {
25
- const o = new URLSearchParams(c), w = new URLSearchParams(r);
26
- for (const [h, y] of w)
27
- o.has(h) || o.set(h, y);
28
- n == null || n.split(",").forEach((h) => {
29
- o.has(h) && o.delete(h);
30
- }), c = o.toString();
31
- }
32
- const u = e + a, l = i[1], m = `${u}${c ? "?" + c : ""}${l ? "#" + l : ""}`;
33
- return {
34
- leaf: a,
35
- pathname: u,
36
- parameters: c,
37
- hash: l,
38
- path: m
39
- };
40
- }
41
- function k(t = "/") {
42
- return t.endsWith("/") || (t += "/"), t.startsWith("/") || (t += "/"), t;
43
- }
44
- function q(t) {
45
- if (t.action === "none")
46
- return;
47
- const e = t == null ? void 0 : t.searchParameters, s = t.hash ? t.hash.startsWith("#") ? t.hash : "#" + t.hash : "", r = e ? e.startsWith("?") ? e : "?" + e : "", n = `${t.pathname}${r}${s}`, i = $(S({}, t.state), { path: n });
48
- t.action === "push" ? history.pushState(i, "", n) : t.action === "replace" && history.replaceState(i, "", n);
49
- }
50
- function x(t) {
51
- const e = new URLSearchParams(t), s = {};
52
- for (const [r, n] of e)
53
- s[r] = n;
54
- return s;
55
- }
56
- function j(t, e) {
57
- const s = new URL(location.href), r = (e == null ? void 0 : e.toString()) || "";
58
- s.searchParams.set(t, r), history.replaceState(history.state, "", s.href);
59
- }
60
- function d(t, e, s) {
61
- t.setAttribute(e, new URL(t.getAttribute(e), s).pathname);
62
- }
63
- function B(t, e) {
64
- t.querySelectorAll('[href^="./"], [href^="../"]').forEach(
65
- (s) => d(s, "href", e)
66
- ), t.querySelectorAll('[src^="./"], [src^="../"]').forEach(
67
- (s) => d(s, "src", e)
68
- );
69
- }
70
- function H(t, {
71
- base: e = "",
72
- trailingSlash: s = !1
73
- } = {}) {
74
- e = e.replace(/^\/|\/$/g, "");
75
- const r = typeof t == "string" ? t.replace(/^\/|\/$/g, "") : t.pathname.replace(/^\/|\/$/g, "");
76
- let n = "";
77
- return r.includes(e) ? n = `/${r}` : n = `${e}/${r}`, s && !n.endsWith("/") && (n += "/"), new URL(n, location.origin);
78
- }
79
- function O(t) {
80
- try {
81
- const e = new URL(t);
82
- if (window.location.origin === e.origin)
83
- return e.pathname === window.location.pathname ? !e.hash : !0;
84
- } catch (e) {
85
- }
86
- return !1;
87
- }
88
- export {
89
- k as a,
90
- B as b,
91
- q as c,
92
- O as i,
93
- H as n,
94
- x as p,
95
- E as s,
96
- j as u
97
- };