aptechka 0.1.9 → 0.1.10

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 (48) hide show
  1. package/lib/Composed-C2Vv1xxR.cjs +1 -0
  2. package/lib/Composed-DhtYBEmo.js +79 -0
  3. package/lib/component/Component.d.ts +29 -0
  4. package/lib/component/hooks/animation.d.ts +9 -0
  5. package/lib/component/hooks/context.d.ts +2 -0
  6. package/lib/component/hooks/intersection.d.ts +4 -0
  7. package/lib/component/hooks/resize.d.ts +6 -0
  8. package/lib/component/hooks/shadow.d.ts +1 -0
  9. package/lib/component/hooks/stores.d.ts +6 -0
  10. package/lib/component/hooks/style.d.ts +2 -0
  11. package/lib/component/index.cjs +1 -0
  12. package/lib/component/index.d.ts +7 -0
  13. package/lib/component/index.js +187 -0
  14. package/lib/connector/index.cjs +1 -1
  15. package/lib/connector/index.js +1 -1
  16. package/lib/element-constructor/ElementConstructor.d.ts +1 -1
  17. package/lib/element-constructor/tags.d.ts +2 -3
  18. package/lib/element-resizer/index.cjs +1 -1
  19. package/lib/element-resizer/index.d.ts +1 -1
  20. package/lib/element-resizer/index.js +2 -1
  21. package/lib/en3/core/en3.d.ts +2 -2
  22. package/lib/en3/objects/En3Clip.d.ts +1 -1
  23. package/lib/intersector/index.cjs +1 -1
  24. package/lib/intersector/index.d.ts +1 -1
  25. package/lib/intersector/index.js +2 -1
  26. package/lib/layout-box/index.cjs +1 -1
  27. package/lib/layout-box/index.d.ts +2 -2
  28. package/lib/layout-box/index.js +70 -72
  29. package/lib/object-C1ph624j.cjs +1 -0
  30. package/lib/object-DIPjdukP.js +73 -0
  31. package/lib/popover/index.cjs +1 -1
  32. package/lib/popover/index.js +79 -71
  33. package/lib/router/Route.d.ts +8 -2
  34. package/lib/router/index.cjs +1 -1
  35. package/lib/router/index.d.ts +1 -2
  36. package/lib/router/index.js +139 -140
  37. package/lib/store/index.cjs +1 -1
  38. package/lib/store/index.js +48 -111
  39. package/lib/ticker/index.cjs +1 -1
  40. package/lib/ticker/index.d.ts +1 -1
  41. package/lib/ticker/index.js +33 -37
  42. package/lib/utils/dom.d.ts +2 -2
  43. package/lib/utils/index.cjs +1 -1
  44. package/lib/utils/index.d.ts +1 -1
  45. package/lib/utils/index.js +113 -168
  46. package/lib/utils/object.d.ts +1 -0
  47. package/package.json +10 -2
  48. package/lib/router/RouteElement.d.ts +0 -14
@@ -1,22 +1,23 @@
1
- var I = (i, s, e) => {
1
+ var K = (i, s, e) => {
2
2
  if (!s.has(i))
3
3
  throw TypeError("Cannot " + e);
4
4
  };
5
- var t = (i, s, e) => (I(i, s, "read from private field"), e ? e.call(i) : s.get(i)), h = (i, s, e) => {
5
+ var t = (i, s, e) => (K(i, s, "read from private field"), e ? e.call(i) : s.get(i)), h = (i, s, e) => {
6
6
  if (s.has(i))
7
7
  throw TypeError("Cannot add the same private member more than once");
8
8
  s instanceof WeakSet ? s.add(i) : s.set(i, e);
9
- }, n = (i, s, e, l) => (I(i, s, "write to private field"), l ? l.call(i, e) : s.set(i, e), e);
10
- var g = (i, s, e) => (I(i, s, "access private method"), e);
11
- import { cssUnitParser as ot } from "../css-unit-parser/index.js";
12
- import { Ladder as V } from "../ladder/index.js";
13
- import { TICK_ORDER as N } from "../order/index.js";
14
- import { windowResizer as Q } from "../window-resizer/index.js";
15
- import { scrollEntries as at } from "../scroll-entries/index.js";
16
- import { ticker as j } from "../ticker/index.js";
17
- import { i as tt } from "../browser-0zX67oeU.js";
18
- import { g as $, a as F } from "../layout-HoBT_Da2.js";
19
- function ct(i) {
9
+ }, n = (i, s, e, l) => (K(i, s, "write to private field"), l ? l.call(i, e) : s.set(i, e), e);
10
+ var L = (i, s, e) => (K(i, s, "access private method"), e);
11
+ import { cssUnitParser as lt } from "../css-unit-parser/index.js";
12
+ import { Ladder as I } from "../ladder/index.js";
13
+ import { TICK_ORDER as G } from "../order/index.js";
14
+ import { windowResizer as J } from "../window-resizer/index.js";
15
+ import { scrollEntries as ot } from "../scroll-entries/index.js";
16
+ import { ticker as N } from "../ticker/index.js";
17
+ import { i as Q } from "../browser-0zX67oeU.js";
18
+ import { g as j } from "../dom-BY7JhTx5.js";
19
+ import { g as V, a as $ } from "../layout-HoBT_Da2.js";
20
+ function at(i) {
20
21
  const s = Math.sqrt(
21
22
  i.m11 * i.m11 + i.m12 * i.m12 + i.m13 * i.m13
22
23
  ), e = Math.sqrt(
@@ -26,58 +27,57 @@ function ct(i) {
26
27
  ), E = Math.atan2(i.m32, i.m33), H = Math.atan2(
27
28
  -i.m31,
28
29
  Math.sqrt(i.m32 * i.m32 + i.m33 * i.m33)
29
- ), K = Math.atan2(i.m21, i.m11), u = i.m41, b = i.m42, L = i.m43;
30
+ ), k = Math.atan2(i.m21, i.m11), u = i.m41, C = i.m42, b = i.m43;
30
31
  return {
31
32
  scaleX: s,
32
33
  scaleY: e,
33
34
  scaleZ: l,
34
35
  rotationX: E,
35
36
  rotationY: H,
36
- rotationZ: K,
37
+ rotationZ: k,
37
38
  translationX: u,
38
- translationY: b,
39
- translationZ: L
39
+ translationY: C,
40
+ translationZ: b
40
41
  };
41
42
  }
42
- var a, f, m, v, R, O, x, w, T, M, _, P, S, d, C, X, Y, Z, p, y, z, c, r, o, q, G, D, st, U, et, k, it, A, J, W, B;
43
+ var a, f, m, _, R, O, v, x, T, g, M, P, S, d, w, X, Y, Z, p, z, y, c, r, o, A, F, B, tt, D, st, U, et, W, q;
43
44
  class Mt {
44
45
  constructor(s, e) {
45
- h(this, q);
46
+ h(this, A);
47
+ h(this, B);
46
48
  h(this, D);
47
49
  h(this, U);
48
- h(this, k);
49
- h(this, A);
50
50
  h(this, a, null);
51
51
  h(this, f, null);
52
52
  h(this, m, []);
53
- h(this, v, "auto");
53
+ h(this, _, "auto");
54
54
  h(this, R, "top");
55
55
  h(this, O, !1);
56
+ h(this, v, !0);
56
57
  h(this, x, !0);
57
- h(this, w, !0);
58
58
  h(this, T, !0);
59
+ h(this, g, 0);
59
60
  h(this, M, 0);
60
- h(this, _, 0);
61
61
  h(this, P, 0);
62
62
  h(this, S, 0);
63
63
  h(this, d, 0);
64
- h(this, C, 0);
64
+ h(this, w, 0);
65
65
  h(this, X, 0);
66
66
  h(this, Y, 0);
67
67
  h(this, Z, 0);
68
68
  h(this, p, { x: 0, y: 0, z: 0 });
69
- h(this, y, { x: 0, y: 0, z: 0 });
70
- h(this, z, { x: 1, y: 1, z: 1 });
71
- h(this, c, new V({ x: 0, y: 0, z: 0 }));
72
- h(this, r, new V({ x: 0, y: 0, z: 0 }));
73
- h(this, o, new V({ x: 0, y: 0, z: 0 }));
69
+ h(this, z, { x: 0, y: 0, z: 0 });
70
+ h(this, y, { x: 1, y: 1, z: 1 });
71
+ h(this, c, new I({ x: 0, y: 0, z: 0 }));
72
+ h(this, r, new I({ x: 0, y: 0, z: 0 }));
73
+ h(this, o, new I({ x: 0, y: 0, z: 0 }));
74
74
  h(this, W, () => {
75
- tt && g(this, U, et).call(this);
75
+ Q && L(this, D, st).call(this);
76
76
  });
77
- h(this, B, () => {
78
- g(this, k, it).call(this), g(this, q, G).call(this);
77
+ h(this, q, () => {
78
+ L(this, U, et).call(this), L(this, A, F).call(this);
79
79
  });
80
- tt && (n(this, a, g(this, A, J).call(this, s) || document.body), n(this, f, g(this, A, J).call(this, e == null ? void 0 : e.containerElement) || document.body), n(this, v, (e == null ? void 0 : e.scrollAxis) || "auto"), n(this, R, (e == null ? void 0 : e.frontSide) || "top"), n(this, O, (e == null ? void 0 : e.cartesian) || !1), n(this, x, (e == null ? void 0 : e.sizeStep) !== void 0 ? e.sizeStep : !0), n(this, w, (e == null ? void 0 : e.positionStep) !== void 0 ? e.positionStep : !0), n(this, T, (e == null ? void 0 : e.transformStep) !== void 0 ? e.transformStep : !0), t(this, o).setStep("_size", "+", {
80
+ Q && (n(this, a, j(s) || document.body), n(this, f, j(e == null ? void 0 : e.containerElement) || document.body), n(this, _, (e == null ? void 0 : e.scrollAxis) || "auto"), n(this, R, (e == null ? void 0 : e.frontSide) || "top"), n(this, O, (e == null ? void 0 : e.cartesian) || !1), n(this, v, (e == null ? void 0 : e.sizeStep) !== void 0 ? e.sizeStep : !0), n(this, x, (e == null ? void 0 : e.positionStep) !== void 0 ? e.positionStep : !0), n(this, T, (e == null ? void 0 : e.transformStep) !== void 0 ? e.transformStep : !0), t(this, o).setStep("_size", "+", {
81
81
  x: 1,
82
82
  y: 1,
83
83
  z: 1
@@ -98,13 +98,13 @@ class Mt {
98
98
  y: 0,
99
99
  z: 0
100
100
  }), addEventListener("DOMContentLoaded", () => {
101
- at.getAll(this.element).forEach((l) => {
101
+ ot.getAll(this.element).forEach((l) => {
102
102
  this.setScrollStep(() => l);
103
103
  });
104
- }), j.subscribe(t(this, B), {
105
- order: N.LAYOUT_BOX,
104
+ }), N.subscribe(t(this, q), {
105
+ order: G.LAYOUT_BOX,
106
106
  culling: e != null && e.culling ? this.element : void 0
107
- }), Q.subscribe(t(this, W), N.LAYOUT_BOX));
107
+ }), J.subscribe(t(this, W), G.LAYOUT_BOX));
108
108
  }
109
109
  get element() {
110
110
  return t(this, a);
@@ -128,13 +128,13 @@ class Mt {
128
128
  return t(this, S);
129
129
  }
130
130
  get front() {
131
- return t(this, C);
131
+ return t(this, w);
132
132
  }
133
133
  get width() {
134
- return t(this, M);
134
+ return t(this, g);
135
135
  }
136
136
  get height() {
137
- return t(this, _);
137
+ return t(this, M);
138
138
  }
139
139
  get depth() {
140
140
  return t(this, P);
@@ -154,7 +154,7 @@ class Mt {
154
154
  ));
155
155
  }
156
156
  destroy() {
157
- j.unsubscribe(t(this, B)), Q.unsubscribe(t(this, W)), t(this, r).close(), t(this, c).close(), t(this, o).close();
157
+ N.unsubscribe(t(this, q)), J.unsubscribe(t(this, W)), t(this, r).close(), t(this, c).close(), t(this, o).close();
158
158
  }
159
159
  setPositionStep(...s) {
160
160
  t(this, r).setStep(...s);
@@ -175,31 +175,31 @@ class Mt {
175
175
  t(this, o).deleteStep(...s);
176
176
  }
177
177
  }
178
- a = new WeakMap(), f = new WeakMap(), m = new WeakMap(), v = new WeakMap(), R = new WeakMap(), O = new WeakMap(), x = new WeakMap(), w = new WeakMap(), T = new WeakMap(), M = new WeakMap(), _ = new WeakMap(), P = new WeakMap(), S = new WeakMap(), d = new WeakMap(), C = new WeakMap(), X = new WeakMap(), Y = new WeakMap(), Z = new WeakMap(), p = new WeakMap(), y = new WeakMap(), z = new WeakMap(), c = new WeakMap(), r = new WeakMap(), o = new WeakMap(), q = new WeakSet(), G = function() {
178
+ a = new WeakMap(), f = new WeakMap(), m = new WeakMap(), _ = new WeakMap(), R = new WeakMap(), O = new WeakMap(), v = new WeakMap(), x = new WeakMap(), T = new WeakMap(), g = new WeakMap(), M = new WeakMap(), P = new WeakMap(), S = new WeakMap(), d = new WeakMap(), w = new WeakMap(), X = new WeakMap(), Y = new WeakMap(), Z = new WeakMap(), p = new WeakMap(), z = new WeakMap(), y = new WeakMap(), c = new WeakMap(), r = new WeakMap(), o = new WeakMap(), A = new WeakSet(), F = function() {
179
179
  t(this, o).calculate(), t(this, r).calculate(), t(this, c).calculate();
180
- }, D = new WeakSet(), st = function() {
180
+ }, B = new WeakSet(), tt = function() {
181
181
  t(this, o).setStep("_size", "+", {
182
- x: t(this, x) ? t(this, M) : 1,
183
- y: t(this, x) ? t(this, _) : 1,
184
- z: t(this, x) ? t(this, P) : 1
182
+ x: t(this, v) ? t(this, g) : 1,
183
+ y: t(this, v) ? t(this, M) : 1,
184
+ z: t(this, v) ? t(this, P) : 1
185
185
  });
186
- const s = t(this, w) ? t(this, X) : 0, e = t(this, w) ? t(this, Y) : 0, l = t(this, w) ? t(this, Z) : 0;
186
+ const s = t(this, x) ? t(this, X) : 0, e = t(this, x) ? t(this, Y) : 0, l = t(this, x) ? t(this, Z) : 0;
187
187
  t(this, r).setStep("_position", "+", {
188
188
  x: s,
189
189
  y: e,
190
190
  z: l
191
191
  }), t(this, T) ? (t(this, o).setStep("_scale", "*", {
192
- x: t(this, z).x,
193
- y: t(this, z).y,
194
- z: t(this, z).z
192
+ x: t(this, y).x,
193
+ y: t(this, y).y,
194
+ z: t(this, y).z
195
195
  }), t(this, r).setStep("_translation", "+", {
196
196
  x: t(this, p).x,
197
197
  y: t(this, p).y,
198
198
  z: t(this, p).z
199
199
  }), t(this, c).setStep("_rotation", "+", {
200
- x: t(this, y).x,
201
- y: t(this, y).y,
202
- z: t(this, y).z
200
+ x: t(this, z).x,
201
+ y: t(this, z).y,
202
+ z: t(this, z).z
203
203
  })) : (t(this, o).setStep("_scale", "*", {
204
204
  x: 1,
205
205
  y: 1,
@@ -213,37 +213,35 @@ a = new WeakMap(), f = new WeakMap(), m = new WeakMap(), v = new WeakMap(), R =
213
213
  y: 0,
214
214
  z: 0
215
215
  }));
216
- }, U = new WeakSet(), et = function() {
216
+ }, D = new WeakSet(), st = function() {
217
217
  const s = getComputedStyle(t(this, a));
218
- n(this, M, Math.max(t(this, a).clientWidth, 1)), n(this, _, Math.max(t(this, a).clientHeight, 1)), n(this, P, Math.max(
219
- ot.parse(s.getPropertyValue("--depth") || "0px"),
218
+ n(this, g, Math.max(t(this, a).clientWidth, 1)), n(this, M, Math.max(t(this, a).clientHeight, 1)), n(this, P, Math.max(
219
+ lt.parse(s.getPropertyValue("--depth") || "0px"),
220
220
  1
221
221
  ));
222
- const e = $(t(this, f)), l = F(t(this, f)), E = t(this, f).clientWidth, H = t(this, f).clientHeight;
223
- if (n(this, d, $(t(this, a)) - e), n(this, S, F(t(this, a)) - l), t(this, v) === "z") {
224
- const b = t(this, d) / E, L = t(this, S) / H;
225
- n(this, d, (b - Math.floor(b)) * E), n(this, S, (L - Math.floor(L)) * H), t(this, R) === "left" ? n(this, C, $(t(this, a)) - e - t(this, d)) : n(this, C, F(t(this, a)) - l - t(this, S));
222
+ const e = V(t(this, f)), l = $(t(this, f)), E = t(this, f).clientWidth, H = t(this, f).clientHeight;
223
+ if (n(this, d, V(t(this, a)) - e), n(this, S, $(t(this, a)) - l), t(this, _) === "z") {
224
+ const C = t(this, d) / E, b = t(this, S) / H;
225
+ n(this, d, (C - Math.floor(C)) * E), n(this, S, (b - Math.floor(b)) * H), t(this, R) === "left" ? n(this, w, V(t(this, a)) - e - t(this, d)) : n(this, w, $(t(this, a)) - l - t(this, S));
226
226
  }
227
227
  if (n(this, d, t(this, d) + t(this, a).clientLeft), n(this, S, t(this, S) + t(this, a).clientTop), t(this, O)) {
228
- const b = Math.round(E / 2), L = Math.round(H / 2), ht = t(this, M) ? Math.round(t(this, M) / 2) : 0, nt = t(this, _) ? Math.round(t(this, _) / 2) : 0, rt = t(this, d) - b + ht, lt = (t(this, S) - L + nt) * -1;
229
- n(this, X, rt), n(this, Y, lt);
228
+ const C = Math.round(E / 2), b = Math.round(H / 2), it = t(this, g) ? Math.round(t(this, g) / 2) : 0, ht = t(this, M) ? Math.round(t(this, M) / 2) : 0, nt = t(this, d) - C + it, rt = (t(this, S) - b + ht) * -1;
229
+ n(this, X, nt), n(this, Y, rt);
230
230
  } else
231
231
  n(this, X, t(this, d)), n(this, Y, t(this, S));
232
- n(this, Z, t(this, C) * -1);
233
- const K = new WebKitCSSMatrix(s.transform), u = ct(K);
234
- t(this, p).x = u.translationX, t(this, p).y = u.translationY, t(this, p).z = u.translationZ, t(this, z).x = u.scaleX, t(this, z).y = u.scaleY, t(this, z).z = u.scaleZ, t(this, y).x = u.rotationX, t(this, y).y = u.rotationY, t(this, y).z = u.rotationZ, g(this, D, st).call(this), g(this, q, G).call(this);
235
- }, k = new WeakSet(), it = function() {
232
+ n(this, Z, t(this, w) * -1);
233
+ const k = new WebKitCSSMatrix(s.transform), u = at(k);
234
+ t(this, p).x = u.translationX, t(this, p).y = u.translationY, t(this, p).z = u.translationZ, t(this, y).x = u.scaleX, t(this, y).y = u.scaleY, t(this, y).z = u.scaleZ, t(this, z).x = u.rotationX, t(this, z).y = u.rotationY, t(this, z).z = u.rotationZ, L(this, B, tt).call(this), L(this, A, F).call(this);
235
+ }, U = new WeakSet(), et = function() {
236
236
  for (let s = 0; s < t(this, m).length; s++) {
237
237
  const e = t(this, m)[s]();
238
238
  let l = e.axis;
239
- t(this, v) !== "auto" && (l = t(this, v)), t(this, r).setStep(`_scroll_${s}`, "+", {
239
+ t(this, _) !== "auto" && (l = t(this, _)), t(this, r).setStep(`_scroll_${s}`, "+", {
240
240
  [l]: e.value * (l === "x" ? -1 : t(this, O) ? 1 : -1)
241
241
  });
242
242
  }
243
- }, A = new WeakSet(), J = function(s) {
244
- return typeof s == "string" ? document.querySelector(s) : s;
245
- }, W = new WeakMap(), B = new WeakMap();
243
+ }, W = new WeakMap(), q = new WeakMap();
246
244
  export {
247
245
  Mt as LayoutBox,
248
- ct as decomposeCSSMatrix
246
+ at as decomposeCSSMatrix
249
247
  };
@@ -0,0 +1 @@
1
+ "use strict";function s(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function f(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Node)return e;const t=Array.isArray(e)?[]:{};for(const n in e)e.hasOwnProperty(n)&&(t[n]=f(e[n]));return t}function c(e,t,n=s){for(const r in t)n(t[r])?(e[r]||Object.assign(e,{[r]:{}}),c(e[r],t[r],n)):Object.assign(e,{[r]:t[r]});return e}function u(e){return e===null||typeof e=="undefined"}function i(e,t){if(typeof e!=typeof t)return!1;if([e,t].some(n=>u(n)))return e===t;if(Array.isArray(e)){const n=e.length>t.length?e:t,r=e.length>t.length?t:e;return n.every((l,y)=>i(l,r[y]))}if(typeof e!="object"||e instanceof Node||typeof e=="object"&&e.constructor.toString().startsWith("class"))return e===t;for(const n in e){if(!t.hasOwnProperty(n))return!1;if(typeof e[n]=="object"&&typeof t[n]=="object"){if(!i(e[n],t[n]))return!1}else if(e[n]!==t[n])return!1}return!0}function p(e,t){const n={};for(const r in e)t.includes(r)&&(n[r]=e[r]);return n}function a(e,t){const n={};for(const r in e)t.includes(r)||(n[r]=e[r]);return n}function o(e){var t;return typeof e=="function"&&((t=Object.getOwnPropertyDescriptor(e,"prototype"))==null?void 0:t.writable)===!1}exports.cloneDeep=f;exports.compareObjects=i;exports.isESClass=o;exports.isNullish=u;exports.isObject=s;exports.mergeDeep=c;exports.omit=a;exports.pick=p;
@@ -0,0 +1,73 @@
1
+ function c(e) {
2
+ return typeof e == "object" && e !== null && !Array.isArray(e);
3
+ }
4
+ function u(e) {
5
+ if (e === null || typeof e != "object")
6
+ return e;
7
+ if (e instanceof Date)
8
+ return new Date(e.getTime());
9
+ if (e instanceof Node)
10
+ return e;
11
+ const n = Array.isArray(e) ? [] : {};
12
+ for (const t in e)
13
+ e.hasOwnProperty(t) && (n[t] = u(e[t]));
14
+ return n;
15
+ }
16
+ function a(e, n, t = c) {
17
+ for (const r in n)
18
+ t(n[r]) ? (e[r] || Object.assign(e, { [r]: {} }), a(e[r], n[r], t)) : Object.assign(e, { [r]: n[r] });
19
+ return e;
20
+ }
21
+ function y(e) {
22
+ return e === null || typeof e == "undefined";
23
+ }
24
+ function i(e, n) {
25
+ if (typeof e != typeof n)
26
+ return !1;
27
+ if ([e, n].some((t) => y(t)))
28
+ return e === n;
29
+ if (Array.isArray(e)) {
30
+ const t = e.length > n.length ? e : n, r = e.length > n.length ? n : e;
31
+ return t.every(
32
+ (s, f) => i(s, r[f])
33
+ );
34
+ }
35
+ if (typeof e != "object" || e instanceof Node || typeof e == "object" && e.constructor.toString().startsWith("class"))
36
+ return e === n;
37
+ for (const t in e) {
38
+ if (!n.hasOwnProperty(t))
39
+ return !1;
40
+ if (typeof e[t] == "object" && typeof n[t] == "object") {
41
+ if (!i(e[t], n[t]))
42
+ return !1;
43
+ } else if (e[t] !== n[t])
44
+ return !1;
45
+ }
46
+ return !0;
47
+ }
48
+ function l(e, n) {
49
+ const t = {};
50
+ for (const r in e)
51
+ n.includes(r) && (t[r] = e[r]);
52
+ return t;
53
+ }
54
+ function p(e, n) {
55
+ const t = {};
56
+ for (const r in e)
57
+ n.includes(r) || (t[r] = e[r]);
58
+ return t;
59
+ }
60
+ function o(e) {
61
+ var n;
62
+ return typeof e == "function" && ((n = Object.getOwnPropertyDescriptor(e, "prototype")) == null ? void 0 : n.writable) === !1;
63
+ }
64
+ export {
65
+ c as a,
66
+ y as b,
67
+ u as c,
68
+ i as d,
69
+ o as i,
70
+ a as m,
71
+ p as o,
72
+ l as p
73
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("../attribute/index.cjs"),M=require("../custom-element/index.cjs"),A=require("../Store-D0_rDIsE.cjs"),q=require("../style-At6aDoqG.cjs"),x=require("../abstract-elements/index.cjs");var $=Object.defineProperty,B=Object.getOwnPropertyDescriptor,D=(t,e,r)=>e in t?$(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,b=(t,e,r,s)=>{for(var n=s>1?void 0:s?B(e,r):e,l=t.length-1,p;l>=0;l--)(p=t[l])&&(n=(s?p(e,r,n):p(n))||n);return s&&n&&$(e,r,n),n},P=(t,e,r)=>(D(t,typeof e!="symbol"?e+"":e,r),r),W=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},i=(t,e,r)=>(W(t,e,"read from private field"),r?r.call(t):e.get(t)),o=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},y=(t,e,r,s)=>(W(t,e,"write to private field"),s?s.call(t,r):e.set(t,r),r),k=(t,e,r)=>(W(t,e,"access private method"),r),g,a,_,c,f,u,S,C,m,E,w,L,v;exports.PopoverElement=class extends M.CustomElement{constructor(){super(...arguments),o(this,S),o(this,w),o(this,g,-1),o(this,a,new A.Store(!1)),o(this,_,void 0),o(this,c,new T.Attribute(this,"history",!1)),o(this,f,new T.Attribute(this,"single",!1)),o(this,u,!1),P(this,"open",()=>{i(this,a).current||(i(this,a).current=!0,i(this,f).current&&(exports.PopoverElement.__opened.forEach(e=>e.close()),exports.PopoverElement.__opened=[]),exports.PopoverElement.__opened.push(this),y(this,g,exports.PopoverElement.__opened.length-1),i(this,c).current&&i(this,u)&&history.pushState("","",i(this,S,C)),clearTimeout(i(this,_)),this.classList.add("triggered"),this.style.display="block",setTimeout(()=>{addEventListener("click",i(this,m)),addEventListener("keydown",i(this,E)),this.style.opacity="1",this.classList.add("opened")}))}),P(this,"close",()=>{i(this,a).current&&(i(this,a).current=!1,exports.PopoverElement.__opened=exports.PopoverElement.__opened.filter(e=>e!==this),i(this,c).current&&history.replaceState("","",location.pathname.replace(this.id,"")),this.classList.remove("opened"),this.style.opacity="0",removeEventListener("click",i(this,m)),removeEventListener("keydown",i(this,E)),setTimeout(()=>{this.classList.remove("triggered"),this.style.display="none"},q.getElementTransitionDurationMS(this)))}),o(this,m,e=>{k(this,w,L).call(this,()=>{const r=e.composedPath();(!r.find(s=>s===this)&&!r.find(s=>s instanceof HTMLElement&&s.closest("e-popover-button"))||r[0]instanceof HTMLElement&&r[0].hasAttribute("outside"))&&this.close()})}),o(this,E,e=>{k(this,w,L).call(this,()=>{e.code==="Escape"&&this.close()})}),o(this,v,()=>{y(this,u,!1),i(this,a).current&&i(this,c).current&&!location.pathname.includes(this.id)?this.close():!i(this,a).current&&i(this,c).current&&location.pathname.includes(this.id)&&this.open(),y(this,u,!0)})}get history(){return i(this,c)}get single(){return i(this,f)}get opened(){return i(this,a)}connectedCallback(){this.style.opacity="0",this.style.display="none",addEventListener("popstate",i(this,v)),setTimeout(()=>{i(this,v).call(this)},0)}disconnectedCallback(){clearTimeout(i(this,_)),removeEventListener("popstate",i(this,v))}};g=new WeakMap;a=new WeakMap;_=new WeakMap;c=new WeakMap;f=new WeakMap;u=new WeakMap;S=new WeakSet;C=function(){return`${location.pathname}${location.pathname.endsWith("/")?"":"/"}${this.id}`};m=new WeakMap;E=new WeakMap;w=new WeakSet;L=function(t){(exports.PopoverElement.__opened[i(this,g)-1]||exports.PopoverElement.__opened.length===1)&&t()};v=new WeakMap;P(exports.PopoverElement,"__opened",[]);exports.PopoverElement=b([M.define("e-popover")],exports.PopoverElement);var I=Object.defineProperty,G=Object.getOwnPropertyDescriptor,H=(t,e,r,s)=>{for(var n=s>1?void 0:s?G(e,r):e,l=t.length-1,p;l>=0;l--)(p=t[l])&&(n=(s?p(e,r,n):p(n))||n);return s&&n&&I(e,r,n),n},O=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},d=(t,e,r)=>(O(t,e,"read from private field"),r?r.call(t):e.get(t)),N=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},F=(t,e,r,s)=>(O(t,e,"write to private field"),s?s.call(t,r):e.set(t,r),r),h;exports.PopoverButtonElement=class extends x.AbstractButtonElement{constructor(){super(...arguments),N(this,h,void 0)}get popoverElement(){return d(this,h)}click(){if(d(this,h)){const e=this.getAttribute("type")||"open";e==="open"||e==="toggle"&&!d(this,h).opened.current?d(this,h).open():(e==="close"||e==="toggle"&&d(this,h).opened.current)&&d(this,h).close()}}connectedCallback(){const e=this.getAttribute("target");if(e){const r=document.querySelector(`#${e}`)||this.getRootNode().querySelector(`#${e}`);r?F(this,h,r):console.warn(this,`target ${e} not found`)}}};h=new WeakMap;exports.PopoverButtonElement=H([M.define("e-popover-button")],exports.PopoverButtonElement);
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("../attribute/index.cjs"),$=require("../custom-element/index.cjs"),x=require("../Store-D0_rDIsE.cjs"),B=require("../style-At6aDoqG.cjs"),D=require("../abstract-elements/index.cjs");var O=Object.defineProperty,N=Object.getOwnPropertyDescriptor,b=(t,e,r)=>e in t?O(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,I=(t,e,r,i)=>{for(var n=i>1?void 0:i?N(e,r):e,l=t.length-1,c;l>=0;l--)(c=t[l])&&(n=(i?c(e,r,n):c(n))||n);return i&&n&&O(e,r,n),n},L=(t,e,r)=>(b(t,typeof e!="symbol"?e+"":e,r),r),k=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},s=(t,e,r)=>(k(t,e,"read from private field"),r?r.call(t):e.get(t)),o=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},S=(t,e,r,i)=>(k(t,e,"write to private field"),i?i.call(t,r):e.set(t,r),r),C=(t,e,r)=>(k(t,e,"access private method"),r),P,a,m,p,E,_,M,A,u,f,w,g,y,W,v;exports.PopoverElement=class extends $.CustomElement{constructor(){super(...arguments),o(this,M),o(this,u),o(this,y),o(this,P,-1),o(this,a,new x.Store(!1)),o(this,m,void 0),o(this,p,new T.Attribute(this,"history",!1)),o(this,E,new T.Attribute(this,"single",!1)),o(this,_,!1),L(this,"open",()=>{s(this,a).current||(s(this,a).current=!0,s(this,E).current&&(exports.PopoverElement.__opened.forEach(e=>e.close()),exports.PopoverElement.__opened=[]),exports.PopoverElement.__opened.push(this),S(this,P,exports.PopoverElement.__opened.length-1),s(this,p).current&&s(this,_)&&history.pushState("","",s(this,M,A)),clearTimeout(s(this,m)),this.classList.add("triggered"),this.style.display="block",setTimeout(()=>{addEventListener("click",s(this,w)),addEventListener("keydown",s(this,g)),this.style.opacity="1",this.classList.add("opened")}))}),L(this,"close",()=>{s(this,a).current&&(s(this,a).current=!1,exports.PopoverElement.__opened=exports.PopoverElement.__opened.filter(e=>e!==this),s(this,p).current&&history.replaceState("","",location.href.replace(new RegExp(`[&?]${s(this,u,f)}`,"g"),"")),this.classList.remove("opened"),this.style.opacity="0",removeEventListener("click",s(this,w)),removeEventListener("keydown",s(this,g)),setTimeout(()=>{this.classList.remove("triggered"),this.style.display="none"},B.getElementTransitionDurationMS(this)))}),o(this,w,e=>{C(this,y,W).call(this,()=>{const r=e.composedPath();(!r.find(i=>i===this)&&!r.find(i=>i instanceof HTMLElement&&i.closest("e-popover-button"))||r[0]instanceof HTMLElement&&r[0].hasAttribute("outside"))&&this.close()})}),o(this,g,e=>{C(this,y,W).call(this,()=>{e.code==="Escape"&&this.close()})}),o(this,v,()=>{S(this,_,!1),s(this,a).current&&s(this,p).current&&!location.search.includes(s(this,u,f))?this.close():!s(this,a).current&&s(this,p).current&&location.search.includes(s(this,u,f))&&this.open(),S(this,_,!0)})}get history(){return s(this,p)}get single(){return s(this,E)}get opened(){return s(this,a)}connectedCallback(){this.style.opacity="0",this.style.display="none",addEventListener("popstate",s(this,v)),setTimeout(()=>{s(this,v).call(this)},0)}disconnectedCallback(){clearTimeout(s(this,m)),removeEventListener("popstate",s(this,v))}};P=new WeakMap;a=new WeakMap;m=new WeakMap;p=new WeakMap;E=new WeakMap;_=new WeakMap;M=new WeakSet;A=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${s(this,u,f)}`};u=new WeakSet;f=function(){return`modal-${this.id}`};w=new WeakMap;g=new WeakMap;y=new WeakSet;W=function(t){(exports.PopoverElement.__opened[s(this,P)-1]||exports.PopoverElement.__opened.length===1)&&t()};v=new WeakMap;L(exports.PopoverElement,"__opened",[]);exports.PopoverElement=I([$.define("e-popover")],exports.PopoverElement);var G=Object.defineProperty,H=Object.getOwnPropertyDescriptor,R=(t,e,r,i)=>{for(var n=i>1?void 0:i?H(e,r):e,l=t.length-1,c;l>=0;l--)(c=t[l])&&(n=(i?c(e,r,n):c(n))||n);return i&&n&&G(e,r,n),n},q=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},d=(t,e,r)=>(q(t,e,"read from private field"),r?r.call(t):e.get(t)),F=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},z=(t,e,r,i)=>(q(t,e,"write to private field"),i?i.call(t,r):e.set(t,r),r),h;exports.PopoverButtonElement=class extends D.AbstractButtonElement{constructor(){super(...arguments),F(this,h,void 0)}get popoverElement(){return d(this,h)}click(){if(d(this,h)){const e=this.getAttribute("type")||"open";e==="open"||e==="toggle"&&!d(this,h).opened.current?d(this,h).open():(e==="close"||e==="toggle"&&d(this,h).opened.current)&&d(this,h).close()}}connectedCallback(){const e=this.getAttribute("target");if(e){const r=document.querySelector(`#${e}`)||this.getRootNode().querySelector(`#${e}`);r?z(this,h,r):console.warn(this,`target ${e} not found`)}}};h=new WeakMap;exports.PopoverButtonElement=R([$.define("e-popover-button")],exports.PopoverButtonElement);
@@ -1,122 +1,130 @@
1
- import { Attribute as T } from "../attribute/index.js";
2
- import { CustomElement as x, define as P } from "../custom-element/index.js";
3
- import { S as I } from "../Store-JOKrNVEr.js";
4
- import { g as q } from "../style-j2TwriJ_.js";
5
- import { AbstractButtonElement as B } from "../abstract-elements/index.js";
6
- var O = Object.defineProperty, G = Object.getOwnPropertyDescriptor, H = (e, t, i) => t in e ? O(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i, N = (e, t, i, r) => {
7
- for (var n = r > 1 ? void 0 : r ? G(t, i) : t, c = e.length - 1, l; c >= 0; c--)
8
- (l = e[c]) && (n = (r ? l(t, i, n) : l(n)) || n);
9
- return r && n && O(t, i, n), n;
10
- }, W = (e, t, i) => (H(e, typeof t != "symbol" ? t + "" : t, i), i), k = (e, t, i) => {
1
+ import { Attribute as C } from "../attribute/index.js";
2
+ import { CustomElement as I, define as A } from "../custom-element/index.js";
3
+ import { S as q } from "../Store-JOKrNVEr.js";
4
+ import { g as B } from "../style-j2TwriJ_.js";
5
+ import { AbstractButtonElement as G } from "../abstract-elements/index.js";
6
+ var x = Object.defineProperty, H = Object.getOwnPropertyDescriptor, R = (e, t, s) => t in e ? x(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, F = (e, t, s, r) => {
7
+ for (var n = r > 1 ? void 0 : r ? H(t, s) : t, p = e.length - 1, l; p >= 0; p--)
8
+ (l = e[p]) && (n = (r ? l(t, s, n) : l(n)) || n);
9
+ return r && n && x(t, s, n), n;
10
+ }, $ = (e, t, s) => (R(e, typeof t != "symbol" ? t + "" : t, s), s), T = (e, t, s) => {
11
11
  if (!t.has(e))
12
- throw TypeError("Cannot " + i);
13
- }, s = (e, t, i) => (k(e, t, "read from private field"), i ? i.call(e) : t.get(e)), o = (e, t, i) => {
12
+ throw TypeError("Cannot " + s);
13
+ }, i = (e, t, s) => (T(e, t, "read from private field"), s ? s.call(e) : t.get(e)), o = (e, t, s) => {
14
14
  if (t.has(e))
15
15
  throw TypeError("Cannot add the same private member more than once");
16
- t instanceof WeakSet ? t.add(e) : t.set(e, i);
17
- }, L = (e, t, i, r) => (k(e, t, "write to private field"), r ? r.call(e, i) : t.set(e, i), i), $ = (e, t, i) => (k(e, t, "access private method"), i), E, h, v, d, m, _, M, A, w, g, y, S, f;
18
- let a = class extends x {
16
+ t instanceof WeakSet ? t.add(e) : t.set(e, s);
17
+ }, W = (e, t, s, r) => (T(e, t, "write to private field"), r ? r.call(e, s) : t.set(e, s), s), P = (e, t, s) => (T(e, t, "access private method"), s), S, h, m, d, g, f, k, D, _, w, y, E, L, M, v;
18
+ let a = class extends I {
19
19
  constructor() {
20
- super(...arguments), o(this, M), o(this, y), o(this, E, -1), o(this, h, new I(!1)), o(this, v, void 0), o(this, d, new T(this, "history", !1)), o(this, m, new T(this, "single", !1)), o(this, _, !1), W(this, "open", () => {
21
- s(this, h).current || (s(this, h).current = !0, s(this, m).current && (a.__opened.forEach((e) => e.close()), a.__opened = []), a.__opened.push(this), L(this, E, a.__opened.length - 1), s(this, d).current && s(this, _) && history.pushState("", "", s(this, M, A)), clearTimeout(s(this, v)), this.classList.add("triggered"), this.style.display = "block", setTimeout(() => {
22
- addEventListener("click", s(this, w)), addEventListener("keydown", s(this, g)), this.style.opacity = "1", this.classList.add("opened");
20
+ super(...arguments), o(this, k), o(this, _), o(this, L), o(this, S, -1), o(this, h, new q(!1)), o(this, m, void 0), o(this, d, new C(this, "history", !1)), o(this, g, new C(this, "single", !1)), o(this, f, !1), $(this, "open", () => {
21
+ i(this, h).current || (i(this, h).current = !0, i(this, g).current && (a.__opened.forEach((e) => e.close()), a.__opened = []), a.__opened.push(this), W(this, S, a.__opened.length - 1), i(this, d).current && i(this, f) && history.pushState("", "", i(this, k, D)), clearTimeout(i(this, m)), this.classList.add("triggered"), this.style.display = "block", setTimeout(() => {
22
+ addEventListener("click", i(this, y)), addEventListener("keydown", i(this, E)), this.style.opacity = "1", this.classList.add("opened");
23
23
  }));
24
- }), W(this, "close", () => {
25
- s(this, h).current && (s(this, h).current = !1, a.__opened = a.__opened.filter((e) => e !== this), s(this, d).current && history.replaceState("", "", location.pathname.replace(this.id, "")), this.classList.remove("opened"), this.style.opacity = "0", removeEventListener("click", s(this, w)), removeEventListener("keydown", s(this, g)), setTimeout(() => {
24
+ }), $(this, "close", () => {
25
+ i(this, h).current && (i(this, h).current = !1, a.__opened = a.__opened.filter((e) => e !== this), i(this, d).current && history.replaceState(
26
+ "",
27
+ "",
28
+ location.href.replace(new RegExp(`[&?]${i(this, _, w)}`, "g"), "")
29
+ ), this.classList.remove("opened"), this.style.opacity = "0", removeEventListener("click", i(this, y)), removeEventListener("keydown", i(this, E)), setTimeout(() => {
26
30
  this.classList.remove("triggered"), this.style.display = "none";
27
- }, q(this)));
28
- }), o(this, w, (e) => {
29
- $(this, y, S).call(this, () => {
31
+ }, B(this)));
32
+ }), o(this, y, (e) => {
33
+ P(this, L, M).call(this, () => {
30
34
  const t = e.composedPath();
31
- (!t.find((i) => i === this) && !t.find(
32
- (i) => i instanceof HTMLElement && i.closest("e-popover-button")
35
+ (!t.find((s) => s === this) && !t.find(
36
+ (s) => s instanceof HTMLElement && s.closest("e-popover-button")
33
37
  ) || t[0] instanceof HTMLElement && t[0].hasAttribute("outside")) && this.close();
34
38
  });
35
- }), o(this, g, (e) => {
36
- $(this, y, S).call(this, () => {
39
+ }), o(this, E, (e) => {
40
+ P(this, L, M).call(this, () => {
37
41
  e.code === "Escape" && this.close();
38
42
  });
39
- }), o(this, f, () => {
40
- L(this, _, !1), s(this, h).current && s(this, d).current && !location.pathname.includes(this.id) ? this.close() : !s(this, h).current && s(this, d).current && location.pathname.includes(this.id) && this.open(), L(this, _, !0);
43
+ }), o(this, v, () => {
44
+ W(this, f, !1), i(this, h).current && i(this, d).current && !location.search.includes(i(this, _, w)) ? this.close() : !i(this, h).current && i(this, d).current && location.search.includes(i(this, _, w)) && this.open(), W(this, f, !0);
41
45
  });
42
46
  }
43
47
  get history() {
44
- return s(this, d);
48
+ return i(this, d);
45
49
  }
46
50
  get single() {
47
- return s(this, m);
51
+ return i(this, g);
48
52
  }
49
53
  get opened() {
50
- return s(this, h);
54
+ return i(this, h);
51
55
  }
52
56
  connectedCallback() {
53
- this.style.opacity = "0", this.style.display = "none", addEventListener("popstate", s(this, f)), setTimeout(() => {
54
- s(this, f).call(this);
57
+ this.style.opacity = "0", this.style.display = "none", addEventListener("popstate", i(this, v)), setTimeout(() => {
58
+ i(this, v).call(this);
55
59
  }, 0);
56
60
  }
57
61
  disconnectedCallback() {
58
- clearTimeout(s(this, v)), removeEventListener("popstate", s(this, f));
62
+ clearTimeout(i(this, m)), removeEventListener("popstate", i(this, v));
59
63
  }
60
64
  };
61
- E = /* @__PURE__ */ new WeakMap();
65
+ S = /* @__PURE__ */ new WeakMap();
62
66
  h = /* @__PURE__ */ new WeakMap();
63
- v = /* @__PURE__ */ new WeakMap();
64
- d = /* @__PURE__ */ new WeakMap();
65
67
  m = /* @__PURE__ */ new WeakMap();
66
- _ = /* @__PURE__ */ new WeakMap();
67
- M = /* @__PURE__ */ new WeakSet();
68
- A = function() {
69
- return `${location.pathname}${location.pathname.endsWith("/") ? "" : "/"}${this.id}`;
70
- };
71
- w = /* @__PURE__ */ new WeakMap();
68
+ d = /* @__PURE__ */ new WeakMap();
72
69
  g = /* @__PURE__ */ new WeakMap();
73
- y = /* @__PURE__ */ new WeakSet();
74
- S = function(e) {
75
- (a.__opened[s(this, E) - 1] || a.__opened.length === 1) && e();
76
- };
77
70
  f = /* @__PURE__ */ new WeakMap();
78
- W(a, "__opened", []);
79
- a = N([
80
- P("e-popover")
71
+ k = /* @__PURE__ */ new WeakSet();
72
+ D = function() {
73
+ return `${location.pathname}${location.search ? location.search + "&" : "?"}${i(this, _, w)}`;
74
+ };
75
+ _ = /* @__PURE__ */ new WeakSet();
76
+ w = function() {
77
+ return `modal-${this.id}`;
78
+ };
79
+ y = /* @__PURE__ */ new WeakMap();
80
+ E = /* @__PURE__ */ new WeakMap();
81
+ L = /* @__PURE__ */ new WeakSet();
82
+ M = function(e) {
83
+ (a.__opened[i(this, S) - 1] || a.__opened.length === 1) && e();
84
+ };
85
+ v = /* @__PURE__ */ new WeakMap();
86
+ $(a, "__opened", []);
87
+ a = F([
88
+ A("e-popover")
81
89
  ], a);
82
- var F = Object.defineProperty, R = Object.getOwnPropertyDescriptor, z = (e, t, i, r) => {
83
- for (var n = r > 1 ? void 0 : r ? R(t, i) : t, c = e.length - 1, l; c >= 0; c--)
84
- (l = e[c]) && (n = (r ? l(t, i, n) : l(n)) || n);
85
- return r && n && F(t, i, n), n;
86
- }, D = (e, t, i) => {
90
+ var z = Object.defineProperty, J = Object.getOwnPropertyDescriptor, K = (e, t, s, r) => {
91
+ for (var n = r > 1 ? void 0 : r ? J(t, s) : t, p = e.length - 1, l; p >= 0; p--)
92
+ (l = e[p]) && (n = (r ? l(t, s, n) : l(n)) || n);
93
+ return r && n && z(t, s, n), n;
94
+ }, N = (e, t, s) => {
87
95
  if (!t.has(e))
88
- throw TypeError("Cannot " + i);
89
- }, u = (e, t, i) => (D(e, t, "read from private field"), i ? i.call(e) : t.get(e)), J = (e, t, i) => {
96
+ throw TypeError("Cannot " + s);
97
+ }, u = (e, t, s) => (N(e, t, "read from private field"), s ? s.call(e) : t.get(e)), Q = (e, t, s) => {
90
98
  if (t.has(e))
91
99
  throw TypeError("Cannot add the same private member more than once");
92
- t instanceof WeakSet ? t.add(e) : t.set(e, i);
93
- }, K = (e, t, i, r) => (D(e, t, "write to private field"), r ? r.call(e, i) : t.set(e, i), i), p;
94
- let C = class extends B {
100
+ t instanceof WeakSet ? t.add(e) : t.set(e, s);
101
+ }, U = (e, t, s, r) => (N(e, t, "write to private field"), r ? r.call(e, s) : t.set(e, s), s), c;
102
+ let O = class extends G {
95
103
  constructor() {
96
- super(...arguments), J(this, p, void 0);
104
+ super(...arguments), Q(this, c, void 0);
97
105
  }
98
106
  get popoverElement() {
99
- return u(this, p);
107
+ return u(this, c);
100
108
  }
101
109
  click() {
102
- if (u(this, p)) {
110
+ if (u(this, c)) {
103
111
  const e = this.getAttribute("type") || "open";
104
- e === "open" || e === "toggle" && !u(this, p).opened.current ? u(this, p).open() : (e === "close" || e === "toggle" && u(this, p).opened.current) && u(this, p).close();
112
+ e === "open" || e === "toggle" && !u(this, c).opened.current ? u(this, c).open() : (e === "close" || e === "toggle" && u(this, c).opened.current) && u(this, c).close();
105
113
  }
106
114
  }
107
115
  connectedCallback() {
108
116
  const e = this.getAttribute("target");
109
117
  if (e) {
110
118
  const t = document.querySelector(`#${e}`) || this.getRootNode().querySelector(`#${e}`);
111
- t ? K(this, p, t) : console.warn(this, `target ${e} not found`);
119
+ t ? U(this, c, t) : console.warn(this, `target ${e} not found`);
112
120
  }
113
121
  }
114
122
  };
115
- p = /* @__PURE__ */ new WeakMap();
116
- C = z([
117
- P("e-popover-button")
118
- ], C);
123
+ c = /* @__PURE__ */ new WeakMap();
124
+ O = K([
125
+ A("e-popover-button")
126
+ ], O);
119
127
  export {
120
- C as PopoverButtonElement,
128
+ O as PopoverButtonElement,
121
129
  a as PopoverElement
122
130
  };
@@ -1,12 +1,18 @@
1
- import { RouteElement } from './RouteElement';
2
1
  export type RouteModule = () => Promise<any>;
2
+ export type RouteURLParams<T extends string = string> = Partial<{
3
+ [key in T]: string;
4
+ }>;
5
+ export type RouteParameters<PathnameParams extends string = string, SearchParams extends string = string> = {
6
+ pathnameParams: RouteURLParams<PathnameParams>;
7
+ searchParams: RouteURLParams<SearchParams>;
8
+ };
3
9
  export declare class Route {
4
10
  #private;
5
11
  constructor(pattern: string, module: RouteModule);
6
12
  get pattern(): string;
7
13
  get urlPattern(): URLPattern;
8
14
  get isActive(): boolean;
9
- get element(): RouteElement<string, string> | null;
15
+ get element(): HTMLElement | null;
10
16
  get outlet(): HTMLElement | ShadowRoot | null;
11
17
  testPathname(pathname: string): boolean;
12
18
  render(containerElement: HTMLElement | ShadowRoot, pathname: string): Promise<void>;