aptechka 0.19.0 → 0.21.0

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 (54) hide show
  1. package/lib/Tweened-CDYmG9hk.js +138 -0
  2. package/lib/Tweened-DlyMbHu_.cjs +1 -0
  3. package/lib/animation/index.cjs +1 -1
  4. package/lib/animation/index.js +53 -6
  5. package/lib/controls/index.cjs +1 -1
  6. package/lib/controls/index.js +29 -27
  7. package/lib/need_redo_tweaker/index.cjs +3 -3
  8. package/lib/need_redo_tweaker/index.js +1 -2
  9. package/lib/order/index.cjs +1 -1
  10. package/lib/order/index.d.ts +14 -18
  11. package/lib/order/index.js +1 -1
  12. package/lib/polyfills-AItxku8u.js +76 -0
  13. package/lib/polyfills-Caa6z-Ay.cjs +1 -0
  14. package/lib/source/index.cjs +1 -5
  15. package/lib/source/index.d.ts +0 -1
  16. package/lib/source/index.js +67 -152
  17. package/lib/utils/index.cjs +1 -1
  18. package/lib/utils/index.js +213 -154
  19. package/package.json +1 -41
  20. package/lib/Animation-DI864E0i.cjs +0 -1
  21. package/lib/Animation-w6BLTCum.js +0 -105
  22. package/lib/Damped-DEHDEq-b.js +0 -53
  23. package/lib/Damped-ipnDc0iX.cjs +0 -1
  24. package/lib/Tweened-B1TfANfR.cjs +0 -1
  25. package/lib/Tweened-C52xXDLY.js +0 -44
  26. package/lib/canvas/index.cjs +0 -1
  27. package/lib/canvas/index.d.ts +0 -34
  28. package/lib/canvas/index.js +0 -108
  29. package/lib/canvas-CU5Xjahf.cjs +0 -1
  30. package/lib/canvas-DeZ0SLUJ.js +0 -34
  31. package/lib/coordinates-CgdGoSYs.js +0 -24
  32. package/lib/coordinates-D8Np3cPD.cjs +0 -1
  33. package/lib/image/index.cjs +0 -1
  34. package/lib/image/index.d.ts +0 -10
  35. package/lib/image/index.js +0 -15
  36. package/lib/jss-CjccJC-K.js +0 -21
  37. package/lib/jss-GJLvaNfT.cjs +0 -1
  38. package/lib/math-BOBiC4TN.js +0 -45
  39. package/lib/math-GDWEqu7y.cjs +0 -1
  40. package/lib/pointer/Pointer.d.ts +0 -22
  41. package/lib/pointer/PointerElement.d.ts +0 -13
  42. package/lib/pointer/index.cjs +0 -1
  43. package/lib/pointer/index.d.ts +0 -2
  44. package/lib/pointer/index.js +0 -151
  45. package/lib/polyfills-CM4SCDTt.cjs +0 -1
  46. package/lib/polyfills-X6KXuHg-.js +0 -33
  47. package/lib/sequence/index.cjs +0 -1
  48. package/lib/sequence/index.d.ts +0 -20
  49. package/lib/sequence/index.js +0 -158
  50. package/lib/source/SourceElement.d.ts +0 -24
  51. package/lib/test/starting-style/index.d.ts +0 -1
  52. package/lib/video/index.cjs +0 -1
  53. package/lib/video/index.d.ts +0 -21
  54. package/lib/video/index.js +0 -55
@@ -1,189 +1,104 @@
1
- var K = (h) => {
2
- throw TypeError(h);
1
+ var k = (a) => {
2
+ throw TypeError(a);
3
3
  };
4
- var O = (h, r, e) => r.has(h) || K("Cannot " + e);
5
- var t = (h, r, e) => (O(h, r, "read from private field"), e ? e.call(h) : r.get(h)), a = (h, r, e) => r.has(h) ? K("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(h) : r.set(h, e), i = (h, r, e, s) => (O(h, r, "write to private field"), s ? s.call(h, e) : r.set(h, e), e), V = (h, r, e) => (O(h, r, "access private method"), e);
6
- import { RESIZE_ORDER as Q } from "../order/index.js";
7
- import { windowResizer as N } from "../window-resizer/index.js";
8
- import { S as U } from "../Store-OTdcl6SX.js";
9
- import { loading as P } from "../loading/index.js";
10
- import { ClassLinkedStatus as Z } from "../class-linked-status/index.js";
11
- import { i as j } from "../browser-0zX67oeU.js";
12
- import { k as J } from "../string-f0Dnk0L1.js";
13
- var M, A, I, g, u, y, R;
14
- class W {
15
- constructor(r) {
16
- a(this, M);
17
- a(this, A);
18
- a(this, I);
19
- a(this, g);
20
- a(this, u);
21
- a(this, y);
22
- a(this, R);
23
- i(this, M, r);
24
- const e = r.indexOf("?");
25
- e >= 0 && (r = r.slice(0, e));
26
- const s = r.split(".");
27
- i(this, A, s[0]);
28
- const d = /\d+x/g, c = s.find((p) => p.match(d));
29
- i(this, I, c ? parseInt(c) : 1);
30
- const q = /\d+max/g, H = /\d+min/g, n = /\d+mar/g, x = /\d+mir/g, D = s.find((p) => p.match(q)), _ = s.find((p) => p.match(H)), F = s.find((p) => p.match(n)), G = s.find((p) => p.match(x));
31
- F ? (i(this, u, parseInt(F)), i(this, y, "max"), i(this, g, `(max-aspect-ratio: ${t(this, u)})`)) : G ? (i(this, u, parseInt(G)), i(this, y, "max"), i(this, g, `(min-aspect-ratio: ${t(this, u)})`)) : D ? (i(this, u, parseInt(D)), i(this, y, "max"), i(this, g, `(max-width: ${t(this, u)}px)`)) : _ ? (i(this, u, parseInt(_)), i(this, g, `(min-width: ${t(this, u)}px)`), i(this, y, "min")) : (i(this, u, 0), i(this, g, `(min-width: ${t(this, u)}px)`), i(this, y, "min")), i(this, R, "." + s[s.length - 1]);
4
+ var A = (a, e, t) => e.has(a) || k("Cannot " + t);
5
+ var r = (a, e, t) => (A(a, e, "read from private field"), t ? t.call(a) : e.get(a)), o = (a, e, t) => e.has(a) ? k("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(a) : e.set(a, t), i = (a, e, t, n) => (A(a, e, "write to private field"), n ? n.call(a, t) : e.set(a, t), t);
6
+ import { RESIZE_ORDER as S } from "../order/index.js";
7
+ import { windowResizer as B } from "../window-resizer/index.js";
8
+ import { S as T } from "../Store-OTdcl6SX.js";
9
+ var y, g, q, u, c, d, w;
10
+ class O {
11
+ constructor(e) {
12
+ o(this, y);
13
+ o(this, g);
14
+ o(this, q);
15
+ o(this, u);
16
+ o(this, c);
17
+ o(this, d);
18
+ o(this, w);
19
+ i(this, y, e);
20
+ const t = e.indexOf("?");
21
+ t >= 0 && (e = e.slice(0, t));
22
+ const n = e.split(".");
23
+ i(this, g, n[0]);
24
+ const f = /\d+x/g, h = n.find((m) => m.match(f));
25
+ i(this, q, h ? parseInt(h) : 1);
26
+ const x = /\d+max/g, M = /\d+min/g, s = /\d+mar/g, p = /\d+mir/g, I = n.find((m) => m.match(x)), V = n.find((m) => m.match(M)), $ = n.find((m) => m.match(s)), b = n.find((m) => m.match(p));
27
+ $ ? (i(this, c, parseInt($)), i(this, d, "max"), i(this, u, `(max-aspect-ratio: ${r(this, c)})`)) : b ? (i(this, c, parseInt(b)), i(this, d, "max"), i(this, u, `(min-aspect-ratio: ${r(this, c)})`)) : I ? (i(this, c, parseInt(I)), i(this, d, "max"), i(this, u, `(max-width: ${r(this, c)}px)`)) : V ? (i(this, c, parseInt(V)), i(this, u, `(min-width: ${r(this, c)}px)`), i(this, d, "min")) : (i(this, c, 0), i(this, u, `(min-width: ${r(this, c)}px)`), i(this, d, "min")), i(this, w, "." + n[n.length - 1]);
32
28
  }
33
29
  get url() {
34
- return t(this, M);
30
+ return r(this, y);
35
31
  }
36
32
  get name() {
37
- return t(this, A);
33
+ return r(this, g);
38
34
  }
39
35
  get density() {
40
- return t(this, I);
36
+ return r(this, q);
41
37
  }
42
38
  get query() {
43
- return t(this, g);
39
+ return r(this, u);
44
40
  }
45
41
  get extension() {
46
- return t(this, R);
42
+ return r(this, w);
47
43
  }
48
44
  get queryType() {
49
- return t(this, y);
45
+ return r(this, d);
50
46
  }
51
47
  get queryValue() {
52
- return t(this, u);
48
+ return r(this, c);
53
49
  }
54
50
  }
55
- M = new WeakMap(), A = new WeakMap(), I = new WeakMap(), g = new WeakMap(), u = new WeakMap(), y = new WeakMap(), R = new WeakMap();
56
- var b;
57
- class X {
58
- constructor(r) {
59
- a(this, b);
60
- i(this, b, /* @__PURE__ */ new Map());
61
- const e = typeof r == "string" ? r.trim().split(",").map((n) => n.trim()).filter((n) => !!n) : r, s = [];
62
- e.forEach((n) => {
63
- const x = new W(n);
64
- s.push([x.query, x]);
51
+ y = new WeakMap(), g = new WeakMap(), q = new WeakMap(), u = new WeakMap(), c = new WeakMap(), d = new WeakMap(), w = new WeakMap();
52
+ var l;
53
+ class P {
54
+ constructor(e) {
55
+ o(this, l);
56
+ i(this, l, /* @__PURE__ */ new Map());
57
+ const t = typeof e == "string" ? e.trim().split(",").map((s) => s.trim()).filter((s) => !!s) : e, n = [];
58
+ t.forEach((s) => {
59
+ const p = new O(s);
60
+ n.push([p.query, p]);
65
61
  });
66
- const d = s.filter((n) => n[1].queryType.includes("max")).sort((n, x) => x[1].queryValue - n[1].queryValue), c = s.filter((n) => n[1].queryType.includes("min") && n[1].queryValue !== 0).sort((n, x) => n[1].queryValue - x[1].queryValue), q = s.filter((n) => n[0] === "(min-width: 0px)");
67
- (q ? [...q, ...d, ...c] : [...d, ...c]).forEach((n) => {
68
- t(this, b).has(n[0]) || t(this, b).set(n[0], []), t(this, b).get(n[0]).push(n[1]);
62
+ const f = n.filter((s) => s[1].queryType.includes("max")).sort((s, p) => p[1].queryValue - s[1].queryValue), h = n.filter((s) => s[1].queryType.includes("min") && s[1].queryValue !== 0).sort((s, p) => s[1].queryValue - p[1].queryValue), x = n.filter((s) => s[0] === "(min-width: 0px)");
63
+ (x ? [...x, ...f, ...h] : [...f, ...h]).forEach((s) => {
64
+ r(this, l).has(s[0]) || r(this, l).set(s[0], []), r(this, l).get(s[0]).push(s[1]);
69
65
  });
70
66
  }
71
67
  get mediaBuckets() {
72
- return t(this, b);
68
+ return r(this, l);
73
69
  }
74
70
  }
75
- b = new WeakMap();
76
- var S, v;
77
- class Y extends U {
78
- constructor(e) {
71
+ l = new WeakMap();
72
+ var E, R;
73
+ class G extends T {
74
+ constructor(t) {
79
75
  super(void 0);
80
- a(this, S);
81
- a(this, v, () => {
82
- let e;
83
- t(this, S).mediaBuckets.forEach((c, q) => {
84
- matchMedia(q).matches && (e = c);
76
+ o(this, E);
77
+ o(this, R, () => {
78
+ let t;
79
+ r(this, E).mediaBuckets.forEach((h, x) => {
80
+ matchMedia(x).matches && (t = h);
85
81
  });
86
- let s, d = 0;
87
- e == null || e.forEach((c) => {
88
- c.density > d && c.density <= Math.max(devicePixelRatio, 1) && (d = c.density, s = c);
89
- }), e != null && e.length && !s && (s = e[0]), this.current = s;
82
+ let n, f = 0;
83
+ t == null || t.forEach((h) => {
84
+ h.density > f && h.density <= Math.max(devicePixelRatio, 1) && (f = h.density, n = h);
85
+ }), t != null && t.length && !n && (n = t[0]), this.current = n;
90
86
  });
91
- i(this, S, new X(e.srcset));
87
+ i(this, E, new P(t.srcset));
92
88
  }
93
89
  close() {
94
90
  super.close(), this.disconnect();
95
91
  }
96
92
  connect() {
97
- N.subscribe(t(this, v), Q.SOURCE_MANAGER);
93
+ B.subscribe(r(this, R), S.SOURCE_MANAGER);
98
94
  }
99
95
  disconnect() {
100
- N.unsubscribe(t(this, v));
101
- }
102
- }
103
- S = new WeakMap(), v = new WeakMap();
104
- let tt = 0;
105
- var m, o, E, k, f, w, l, C, L, $, z, T, B;
106
- class ct extends HTMLElement {
107
- constructor() {
108
- super();
109
- a(this, L);
110
- a(this, m, null);
111
- a(this, o, null);
112
- a(this, E, !1);
113
- a(this, k, !1);
114
- a(this, f, !1);
115
- a(this, w, "");
116
- a(this, l, new Z(this, {
117
- loading: !1,
118
- loaded: !1,
119
- error: !1
120
- }));
121
- a(this, C, null);
122
- a(this, z, (e) => {
123
- const s = e[0];
124
- t(this, f) && (!t(this, k) || this.hasAttribute("reload-source")) && s.isIntersecting && (t(this, m).current && t(this, m).current !== t(this, m).previous && V(this, L, $).call(this, t(this, m).current), i(this, k, !0)), s.isIntersecting ? this.dispatchEvent(new CustomEvent("sourceCapture")) : (this.hasAttribute("reload-source") && V(this, L, $).call(this, void 0), this.dispatchEvent(new CustomEvent("sourceRelease")));
125
- });
126
- a(this, T, () => {
127
- t(this, l).set("loaded", !0), t(this, l).set("error", !1), t(this, l).set("loading", !1), !t(this, f) && !t(this, E) && P.setLoaded(t(this, w), 1), i(this, E, !0);
128
- });
129
- a(this, B, (e) => {
130
- t(this, l).set("loaded", !1), t(this, l).set("error", !0), t(this, l).set("loading", !1), !t(this, f) && !t(this, E) && P.setError(t(this, w), e), i(this, E, !0);
131
- });
132
- j && (i(this, w, `source-consumer-${++tt}`), i(this, C, new IntersectionObserver(
133
- t(this, z)
134
- )));
135
- }
136
- get consumerElement() {
137
- return t(this, o);
138
- }
139
- get sourceManager() {
140
- return t(this, m);
141
- }
142
- get status() {
143
- return t(this, l);
144
- }
145
- get isLazy() {
146
- return t(this, f);
147
- }
148
- connectedCallback() {
149
- const e = this.getAttribute("srcset");
150
- e && (i(this, o, this.createConsumer()), t(this, o).style.cssText = `
151
- display: block;
152
- width: 100%;
153
- height: 100%;
154
- `, t(this, o).classList.add("source-consumer"), Array.from(this.attributes).forEach((s) => {
155
- if (s.name !== "srcset") {
156
- const d = s.nodeValue || "", c = J(s.name);
157
- c in t(this, o) && (t(this, o)[c] = d || !0);
158
- }
159
- }), this.appendChild(t(this, o)), i(this, m, new Y({
160
- srcset: e
161
- })), i(this, f, this.hasAttribute("lazy")), t(this, m).subscribe((s) => {
162
- (!t(this, f) || t(this, f) && t(this, k)) && V(this, L, $).call(this, s.current);
163
- }), t(this, C).observe(this), t(this, m).connect());
164
- }
165
- disconnectedCallback() {
166
- t(this, C).disconnect(), t(this, m).close(), t(this, o).onloadeddata = null, t(this, o).onload = null, t(this, o).onerror = null, t(this, o).remove(), t(this, l).reset();
96
+ B.unsubscribe(r(this, R));
167
97
  }
168
98
  }
169
- m = new WeakMap(), o = new WeakMap(), E = new WeakMap(), k = new WeakMap(), f = new WeakMap(), w = new WeakMap(), l = new WeakMap(), C = new WeakMap(), L = new WeakSet(), $ = function(e) {
170
- if (t(this, o).onloadeddata = null, t(this, o).onload = null, t(this, o).onerror = null, t(this, l).set("loaded", !1), t(this, l).set("error", !1), t(this, l).set("loading", !1), e) {
171
- const s = this.hasAttribute("keep-source-parameters");
172
- t(this, l).set("loading", !0);
173
- const d = s ? e.url : e.name + e.extension;
174
- this.consumeSource(d), !t(this, f) && !t(this, E) && P.setTotal(t(this, w), 1), t(this, o).onloadeddata = () => {
175
- t(this, T).call(this);
176
- }, t(this, o).onload = () => {
177
- t(this, T).call(this);
178
- }, t(this, o).onerror = () => {
179
- t(this, B).call(this, d);
180
- };
181
- } else
182
- this.consumeSource(null);
183
- }, z = new WeakMap(), T = new WeakMap(), B = new WeakMap();
99
+ E = new WeakMap(), R = new WeakMap();
184
100
  export {
185
- W as Source,
186
- ct as SourceElement,
187
- Y as SourceManager,
188
- X as SourceSet
101
+ O as Source,
102
+ G as SourceManager,
103
+ P as SourceSet
189
104
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("../attributes-Bf2svn4j.cjs"),E=require("../browser-CpzFX2xg.cjs"),p=require("../canvas-CU5Xjahf.cjs"),h=require("../coordinates-D8Np3cPD.cjs"),m=require("../dom-JBOkFLTh.cjs"),o=require("../easings-DsS5-Kqc.cjs"),a=require("../object-HBC5QlzO.cjs"),S=require("../function-MthRj-GJ.cjs"),I=require("../gestures-DHLrn6Q8.cjs"),O=require("../jss-GJLvaNfT.cjs"),g=require("../layout-8ryRAMGJ.cjs"),u=require("../math-GDWEqu7y.cjs"),d=require("../polyfills-CM4SCDTt.cjs"),c=require("../string-DhgS_iFl.cjs"),b=require("../style-At6aDoqG.cjs");function T(e,t,...n){return[...e.slice(0,t),...n,...e.slice(t)]}function P(e,t){const n=e.length;t=t%n;const s=new Array(n);for(let i=0;i<n;i++){const r=(i+t)%n;s[r]=e[i]}return s}function w(e,t=2){if(!+e)return"0 Bytes";const n=1024,s=t<0?0:t,i=["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],r=Math.floor(Math.log(e)/Math.log(n));return`${parseFloat((e/Math.pow(n,r)).toFixed(s))} ${i[r]}`}function x(e,t){return e.x<t.x+t.width&&e.x>t.x&&e.y<t.y+t.height&&e.y>t.y}function B(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)<t.radius}function y(e,t){const n=e.styleMap.get(t);if(n){const s=n.toString();return s.startsWith("var")?y(e,s.slice(4,-1)):s}}function Q(...e){const t={};return Array.from(document.styleSheets).forEach(n=>{Array.from(n.cssRules).forEach(s=>{s instanceof CSSStyleRule&&s.selectorText===":root"&&e.forEach(i=>{const r=y(s,i);r&&(t[i]=r)})})}),e.forEach(n=>{t[n]||console.warn(`variable named ${n} not found`)}),t}function q(e){const t=window.atob(e);return decodeURIComponent(window.escape(t))}function D(e){const t=window.unescape(encodeURIComponent(e));return window.btoa(t)}function v(e){return new Promise(t=>{setTimeout(()=>{t()},e)})}function A(e,t=""){t=t.endsWith("/")?t.slice(0,-1):t,e=e.replace(t,""),e.startsWith("/")&&(e=e.slice(1));const n=e.split("#"),s=n[0].split("?"),i=s[0].startsWith("/")?s[0]:"/"+s[0],r=t+i,f=s==null?void 0:s[1],l=n==null?void 0:n[1];return{leaf:i,pathname:r,parameters:f,hash:l}}function z(e="/"){return e.endsWith("/")||(e+="/"),e.startsWith("/")||(e+="/"),e}function R(e,t,n,s){const i=n||location.search,r=s?s.startsWith("#")?s:"#"+s:"",f=i?i.startsWith("?")?i:"?"+i:"",l=`${t}${r}${f}`;e==="push"?history.pushState(null,"",l):e==="replace"&&history.replaceState(null,"",l)}exports.parseAttribute=C.parseAttribute;exports.parseAttributeValue=C.parseAttributeValue;exports.isBrowser=E.isBrowser;exports.contain=p.contain;exports.cover=p.cover;exports.fixPosition=p.fixPosition;exports.measureText=p.measureText;exports.getPointerPosition=h.getPointerPosition;exports.normalize=h.normalize;exports.screenToCartesian=h.screenToCartesian;exports.findParentElement=m.findParentElement;exports.findScrollParentElement=m.findScrollParentElement;exports.getAllParentElements=m.getAllParentElements;exports.getElement=m.getElement;exports.easeInCubic=o.easeInCubic;exports.easeInExpo=o.easeInExpo;exports.easeInOutCubic=o.easeInOutCubic;exports.easeInOutExpo=o.easeInOutExpo;exports.easeInOutQuad=o.easeInOutQuad;exports.easeInOutQuart=o.easeInOutQuart;exports.easeInOutQuint=o.easeInOutQuint;exports.easeInQuad=o.easeInQuad;exports.easeInQuart=o.easeInQuart;exports.easeInQuint=o.easeInQuint;exports.easeOutCubic=o.easeOutCubic;exports.easeOutExpo=o.easeOutExpo;exports.easeOutQuad=o.easeOutQuad;exports.easeOutQuart=o.easeOutQuart;exports.easeOutQuint=o.easeOutQuint;exports.linear=o.linear;exports.cloneDeep=a.cloneDeep;exports.compareObjects=a.compareObjects;exports.createJSONAndSave=a.createJSONAndSave;exports.dispatchBeforeSizeChangeEvent=a.dispatchBeforeSizeChangeEvent;exports.dispatchSizeChangeEvent=a.dispatchSizeChangeEvent;exports.isESClass=a.isESClass;exports.isNullish=a.isNullish;exports.isObject=a.isObject;exports.mergeDeep=a.mergeDeep;exports.mixin=a.mixin;exports.omit=a.omit;exports.pick=a.pick;exports.debounce=S.debounce;exports.throttle=S.throttle;exports.setupDrag=I.setupDrag;exports.createStylesheet=O.createStylesheet;exports.styleToString=O.styleToString;exports.getCumulativeOffsetLeft=g.getCumulativeOffsetLeft;exports.getCumulativeOffsetTop=g.getCumulativeOffsetTop;exports.getCumulativePosition=g.getCumulativePosition;exports.calculateDistance=u.calculateDistance;exports.calculateDistanceWithRadius=u.calculateDistanceWithRadius;exports.clamp=u.clamp;exports.damp=u.damp;exports.lerp=u.lerp;exports.mapRange=u.mapRange;exports.round=u.round;exports.smootherstep=u.smootherstep;exports.smoothstep=u.smoothstep;exports.step=u.step;exports.nullishCoalescing=d.nullishCoalescing;exports.preciseNumber=d.preciseNumber;exports.roundNumberTo=d.roundNumberTo;exports.toStep=d.toStep;exports.camelToKebab=c.camelToKebab;exports.capitalize=c.capitalize;exports.generateId=c.generateId;exports.isUppercase=c.isUppercase;exports.kebabToCamel=c.kebabToCamel;exports.snakeToDotted=c.snakeToDotted;exports.toPascalCase=c.toPascalCase;exports.uncapitalize=c.uncapitalize;exports.getElementTransitionDurationMS=b.getElementTransitionDurationMS;exports.getElementTransitionDurationS=b.getElementTransitionDurationS;exports.changeHistory=R;exports.decode=D;exports.dotCircleCollision=B;exports.dotRectCollision=x;exports.encode=q;exports.formatBytes=w;exports.getRootVariables=Q;exports.insert=T;exports.normalizeBase=z;exports.shiftArray=P;exports.splitPath=A;exports.wait=v;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../attributes-Bf2svn4j.cjs"),S=require("../browser-CpzFX2xg.cjs"),m=require("../dom-JBOkFLTh.cjs"),a=require("../easings-DsS5-Kqc.cjs"),u=require("../object-HBC5QlzO.cjs"),C=require("../function-MthRj-GJ.cjs"),O=require("../gestures-DHLrn6Q8.cjs"),h=require("../string-DhgS_iFl.cjs"),f=require("../layout-8ryRAMGJ.cjs"),r=require("../polyfills-Caa6z-Ay.cjs"),b=require("../style-At6aDoqG.cjs");function E(t,e,...n){return[...t.slice(0,e),...n,...t.slice(e)]}function w(t,e){const n=t.length;e=e%n;const i=new Array(n);for(let s=0;s<n;s++){const o=(s+e)%n;i[o]=t[s]}return i}function I(t,e=2){if(!+t)return"0 Bytes";const n=1024,i=e<0?0:e,s=["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],o=Math.floor(Math.log(t)/Math.log(n));return`${parseFloat((t/Math.pow(n,o)).toFixed(i))} ${s[o]}`}function B(t,e){const n=t.measureText(e),i=n.actualBoundingBoxAscent+n.actualBoundingBoxDescent,s=n.width;return{height:i,width:s}}function P(t){return Math.floor(t)+.5}function T(t,e,n,i,s,o){let l=t/e,p=n/i,c=0,d=0;return s=typeof s=="undefined"?.5:s,o=typeof o=="undefined"?.5:o,l>p?(c=i,d=i*l):(d=n,c=n/l),[(n-d)*s,(i-c)*o,d,c]}function Q(t,e,n,i,s,o){let l=t/e,p=n/i,c=0,d=0;return s=typeof s=="undefined"?.5:s,o=typeof o=="undefined"?.5:o,l>p?(d=n,c=n/l):(c=i,d=i*l),[(n-d)*s,(i-c)*o,d,c]}function D(t,e){return t.x<e.x+e.width&&t.x>e.x&&t.y<e.y+e.height&&t.y>e.y}function R(t,e){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)<e.radius}function A(t,e,n=!1){let i=t.x-e.width/2,s=e.height/2-t.y;return n&&(i=i/(e.width/2),s=s/(e.height/2)),{x:i,y:s}}function v(t,e){const n=t.x/e.width,i=t.y/e.height;return{x:n,y:i}}function q(t,e){return e=e||{x:0,y:0,width:document.documentElement.offsetWidth,height:innerHeight},{x:(t.x-e.x)/e.width*e.width,y:(t.y-e.y)/e.height*e.height}}function x(t,e){const n=t.styleMap.get(e);if(n){const i=n.toString();return i.startsWith("var")?x(t,i.slice(4,-1)):i}}function z(...t){const e={};return Array.from(document.styleSheets).forEach(n=>{Array.from(n.cssRules).forEach(i=>{i instanceof CSSStyleRule&&i.selectorText===":root"&&t.forEach(s=>{const o=x(i,s);o&&(e[s]=o)})})}),t.forEach(n=>{e[n]||console.warn(`variable named ${n} not found`)}),e}function M(t){const e=window.atob(t);return decodeURIComponent(window.escape(e))}function $(t){const e=window.unescape(encodeURIComponent(t));return window.btoa(e)}function g(t){let e="";for(const n in t){const i=t[n];typeof i=="object"?(e+=`${n} {`,e+=g(i),e+="}"):e+=`${h.camelToKebab(n)}: ${i};`}return e}function k(t){if(S.isBrowser){const e=new CSSStyleSheet;return e.replaceSync(g(t)),e}return null}function N(t){return new Promise(e=>{setTimeout(()=>{e()},t)})}function j(t,e=""){e=e.endsWith("/")?e.slice(0,-1):e,t=t.replace(e,""),t.startsWith("/")&&(t=t.slice(1));const n=t.split("#"),i=n[0].split("?"),s=i[0].startsWith("/")?i[0]:"/"+i[0],o=e+s,l=i==null?void 0:i[1],p=n==null?void 0:n[1];return{leaf:s,pathname:o,parameters:l,hash:p}}function W(t="/"){return t.endsWith("/")||(t+="/"),t.startsWith("/")||(t+="/"),t}function V(t,e,n,i){const s=n||location.search,o=i?i.startsWith("#")?i:"#"+i:"",l=s?s.startsWith("?")?s:"?"+s:"",p=`${e}${o}${l}`;t==="push"?history.pushState(null,"",p):t==="replace"&&history.replaceState(null,"",p)}exports.parseAttribute=y.parseAttribute;exports.parseAttributeValue=y.parseAttributeValue;exports.isBrowser=S.isBrowser;exports.findParentElement=m.findParentElement;exports.findScrollParentElement=m.findScrollParentElement;exports.getAllParentElements=m.getAllParentElements;exports.getElement=m.getElement;exports.easeInCubic=a.easeInCubic;exports.easeInExpo=a.easeInExpo;exports.easeInOutCubic=a.easeInOutCubic;exports.easeInOutExpo=a.easeInOutExpo;exports.easeInOutQuad=a.easeInOutQuad;exports.easeInOutQuart=a.easeInOutQuart;exports.easeInOutQuint=a.easeInOutQuint;exports.easeInQuad=a.easeInQuad;exports.easeInQuart=a.easeInQuart;exports.easeInQuint=a.easeInQuint;exports.easeOutCubic=a.easeOutCubic;exports.easeOutExpo=a.easeOutExpo;exports.easeOutQuad=a.easeOutQuad;exports.easeOutQuart=a.easeOutQuart;exports.easeOutQuint=a.easeOutQuint;exports.linear=a.linear;exports.cloneDeep=u.cloneDeep;exports.compareObjects=u.compareObjects;exports.createJSONAndSave=u.createJSONAndSave;exports.dispatchBeforeSizeChangeEvent=u.dispatchBeforeSizeChangeEvent;exports.dispatchSizeChangeEvent=u.dispatchSizeChangeEvent;exports.isESClass=u.isESClass;exports.isNullish=u.isNullish;exports.isObject=u.isObject;exports.mergeDeep=u.mergeDeep;exports.mixin=u.mixin;exports.omit=u.omit;exports.pick=u.pick;exports.debounce=C.debounce;exports.throttle=C.throttle;exports.setupDrag=O.setupDrag;exports.camelToKebab=h.camelToKebab;exports.capitalize=h.capitalize;exports.generateId=h.generateId;exports.isUppercase=h.isUppercase;exports.kebabToCamel=h.kebabToCamel;exports.snakeToDotted=h.snakeToDotted;exports.toPascalCase=h.toPascalCase;exports.uncapitalize=h.uncapitalize;exports.getCumulativeOffsetLeft=f.getCumulativeOffsetLeft;exports.getCumulativeOffsetTop=f.getCumulativeOffsetTop;exports.getCumulativePosition=f.getCumulativePosition;exports.calculateDistance=r.calculateDistance;exports.calculateDistanceWithRadius=r.calculateDistanceWithRadius;exports.clamp=r.clamp;exports.damp=r.damp;exports.lerp=r.lerp;exports.mapRange=r.mapRange;exports.nullishCoalescing=r.nullishCoalescing;exports.preciseNumber=r.preciseNumber;exports.round=r.round;exports.roundNumberTo=r.roundNumberTo;exports.smootherstep=r.smootherstep;exports.smoothstep=r.smoothstep;exports.step=r.step;exports.toStep=r.toStep;exports.getElementTransitionDurationMS=b.getElementTransitionDurationMS;exports.getElementTransitionDurationS=b.getElementTransitionDurationS;exports.changeHistory=V;exports.contain=Q;exports.cover=T;exports.createStylesheet=k;exports.decode=$;exports.dotCircleCollision=R;exports.dotRectCollision=D;exports.encode=M;exports.fixPosition=P;exports.formatBytes=I;exports.getPointerPosition=q;exports.getRootVariables=z;exports.insert=E;exports.measureText=B;exports.normalize=v;exports.normalizeBase=W;exports.screenToCartesian=A;exports.shiftArray=w;exports.splitPath=j;exports.styleToString=g;exports.wait=N;