aptechka 0.83.1 → 0.84.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.
- package/lib/Animation-BUD5w3AB.js +110 -0
- package/lib/Animation-BtUdarQ7.cjs +1 -0
- package/lib/Composed-BI5oe4Ij.cjs +1 -0
- package/lib/Composed-BaevH-MP.js +75 -0
- package/lib/Damped-BHm2IuyN.cjs +1 -0
- package/lib/Damped-Ds17AUU-.js +57 -0
- package/lib/DerivedArray-BePrxcLC.js +63 -0
- package/lib/DerivedArray-xYBpcTp8.cjs +1 -0
- package/lib/DragControls-BgTBgiue.js +233 -0
- package/lib/DragControls-FmiuZDKq.cjs +1 -0
- package/lib/LocalLinks-BdqYzt1b.js +65 -0
- package/lib/LocalLinks-D1mYcA-B.cjs +1 -0
- package/lib/PageAnnouncerElement-CJ-MfwJ8.cjs +1 -0
- package/lib/PageAnnouncerElement-HcphPbXZ.js +28 -0
- package/lib/PageScroll-CrfCwDA4.js +65 -0
- package/lib/PageScroll-IlOCUUte.cjs +1 -0
- package/lib/SourceElement-DC726HMy.js +265 -0
- package/lib/SourceElement-DNyrQby1.cjs +5 -0
- package/lib/Store-BRTHeZmO.js +158 -0
- package/lib/Store-DZnOrofs.cjs +1 -0
- package/lib/Tweened-3UYSwrvs.cjs +1 -0
- package/lib/Tweened-DabaFaHX.js +48 -0
- package/lib/Viewport-0n1C_IoN.js +113 -0
- package/lib/Viewport-D26fEJOk.cjs +1 -0
- package/lib/accordion/index.cjs +1 -1
- package/lib/accordion/index.js +97 -93
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +6 -6
- package/lib/api-fetcher/index.cjs +1 -1
- package/lib/api-fetcher/index.js +67 -66
- package/lib/attribute/index.cjs +1 -1
- package/lib/attribute/index.js +37 -34
- package/lib/attributes-BADnRZpK.cjs +1 -0
- package/lib/attributes-FObgMNCf.js +36 -0
- package/lib/billboard/index.cjs +1 -1
- package/lib/billboard/index.js +240 -232
- package/lib/cache/index.cjs +1 -1
- package/lib/cache/index.js +26 -23
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.js +61 -59
- package/lib/canvas-BP1ceie3.cjs +1 -0
- package/lib/canvas-DsglKco1.js +40 -0
- package/lib/connector/index.cjs +1 -1
- package/lib/connector/index.js +44 -41
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +6 -6
- package/lib/coordinates--JG1U6kQ.js +29 -0
- package/lib/coordinates-DQ9XV9M1.cjs +1 -0
- package/lib/css-property/index.cjs +1 -1
- package/lib/css-property/index.d.ts +1 -1
- package/lib/css-property/index.js +40 -37
- package/lib/css-unit-parser/index.cjs +2 -2
- package/lib/css-unit-parser/index.js +22 -19
- package/lib/css-value-parser/index.cjs +1 -1
- package/lib/css-value-parser/index.js +13 -11
- package/lib/custom-elements-BfZCJde6.cjs +1 -0
- package/lib/custom-elements-HEMuF7yH.js +27 -0
- package/lib/dev/index.cjs +2 -1
- package/lib/dev/index.d.ts +1 -0
- package/lib/dev/index.js +24 -10
- package/lib/device/index.cjs +1 -1
- package/lib/device/index.js +5 -5
- package/lib/dom-B40i6NXw.cjs +1 -0
- package/lib/dom-D8D-_9ty.js +108 -0
- package/lib/easings-BSGJFMAo.js +40 -0
- package/lib/easings-BWq0pPLq.cjs +1 -0
- package/lib/element-CqD0jqBJ.cjs +1 -0
- package/lib/element-DKw5H-Tu.js +10 -0
- package/lib/element-linked-store/index.cjs +1 -1
- package/lib/element-linked-store/index.js +53 -52
- package/lib/element-resizer/index.cjs +1 -1
- package/lib/element-resizer/index.js +47 -44
- package/lib/en3/index.cjs +4 -4
- package/lib/en3/index.js +191 -185
- package/lib/events-Ds-TuvYW.js +9 -0
- package/lib/events-UlGk63iC.cjs +1 -0
- package/lib/file-DwQs6bB6.js +28 -0
- package/lib/file-RHfA3OS-.cjs +1 -0
- package/lib/function-H4b_gTg6.cjs +1 -0
- package/lib/function-UmbPrOHm.js +19 -0
- package/lib/gestures-DmKKNnh4.js +14 -0
- package/lib/gestures-DtYbQr49.cjs +1 -0
- package/lib/history/index.cjs +1 -1
- package/lib/history/index.js +24 -21
- package/lib/iframe/index.cjs +1 -1
- package/lib/iframe/index.js +27 -24
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +17 -13
- package/lib/index-ClTMVKJp.js +183 -0
- package/lib/index-DZ44osDT.cjs +1 -0
- package/lib/intersector/index.cjs +1 -1
- package/lib/intersector/index.js +3 -3
- package/lib/jsx/ComponentElement.d.ts +4 -0
- package/lib/jsx/h.d.ts +7 -16
- package/lib/jsx/hooks/component/useStylesheet.d.ts +1 -1
- package/lib/jsx/hooks/cssProperty.d.ts +6 -0
- package/lib/jsx/hooks/resize.d.ts +4 -0
- package/lib/jsx/hooks/store.d.ts +1 -2
- package/lib/jsx/hooks/ticker.d.ts +5 -0
- package/lib/jsx/index.cjs +1 -1
- package/lib/jsx/index.d.ts +4 -4
- package/lib/jsx/index.js +170 -349
- package/lib/jsx/plugins/vite/index.cjs +49 -0
- package/lib/jsx/plugins/vite/index.d.ts +38 -0
- package/lib/jsx/plugins/vite/index.js +104 -0
- package/lib/jsx/render.d.ts +2 -0
- package/lib/jsx/type.d.ts +228 -190
- package/lib/ladder/index.cjs +1 -1
- package/lib/ladder/index.js +86 -84
- package/lib/layout-C26zkY7D.js +35 -0
- package/lib/layout-CnGLl7oe.cjs +1 -0
- package/lib/layout-box/index.cjs +1 -1
- package/lib/layout-box/index.js +220 -217
- package/lib/loading/index.cjs +1 -1
- package/lib/loading/index.js +48 -45
- package/lib/local-links/index.cjs +1 -1
- package/lib/local-links/index.js +2 -2
- package/lib/masonry-layout/index.cjs +1 -1
- package/lib/masonry-layout/index.js +48 -45
- package/lib/math-C-knY2TL.cjs +1 -0
- package/lib/math-r8V23YFe.js +57 -0
- package/lib/media/index.cjs +1 -1
- package/lib/media/index.js +28 -25
- package/lib/metadata-BNdkmeeD.js +15 -0
- package/lib/metadata-BrHUfpV9.cjs +1 -0
- package/lib/morph/index.cjs +1 -1
- package/lib/morph/index.js +561 -556
- package/lib/morph-BtgB1YQP.js +256 -0
- package/lib/morph-Buhxq-X0.cjs +1 -0
- package/lib/need_redo_tweaker/index.cjs +4 -4
- package/lib/need_redo_tweaker/index.js +862 -835
- package/lib/notifier/index.cjs +1 -1
- package/lib/notifier/index.js +29 -26
- package/lib/number-Bu4sGvW7.cjs +1 -0
- package/lib/number-DiVt2xnh.js +47 -0
- package/lib/object-CiIdEmJx.js +98 -0
- package/lib/object-DTY_W6xG.cjs +1 -0
- package/lib/order/index.cjs +1 -1
- package/lib/order/index.js +3 -3
- package/lib/page-announcer/index.cjs +1 -1
- package/lib/page-announcer/index.js +2 -2
- package/lib/page-scroll/index.cjs +1 -1
- package/lib/page-scroll/index.js +2 -2
- package/lib/pixel-perfect/index.cjs +4 -4
- package/lib/pixel-perfect/index.js +43 -40
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +125 -123
- package/lib/polyfills-CG1XJNia.js +28 -0
- package/lib/polyfills-DZCuDBkA.cjs +1 -0
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +249 -245
- package/lib/radio/index.cjs +1 -1
- package/lib/radio/index.js +58 -55
- package/lib/render-H9BjFLZ3.cjs +1 -0
- package/lib/render-LpimRXgl.js +354 -0
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.js +196 -194
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +890 -878
- package/lib/scroll-D2tOpCnP.cjs +1 -0
- package/lib/scroll-DoNeuIgT.js +41 -0
- package/lib/scroll-entries/index.cjs +1 -1
- package/lib/scroll-entries/index.js +37 -34
- package/lib/scroll-kit/index.cjs +1 -1
- package/lib/scroll-kit/index.js +213 -209
- package/lib/sequence/index.cjs +1 -1
- package/lib/sequence/index.js +102 -98
- package/lib/size-element/index.cjs +1 -1
- package/lib/size-element/index.js +29 -26
- package/lib/slicer/index.cjs +1 -1
- package/lib/slicer/index.js +118 -113
- package/lib/source/index.cjs +1 -1
- package/lib/source/index.js +5 -5
- package/lib/spa/index.cjs +1 -1
- package/lib/spa/index.js +94 -94
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.d.ts +2 -2
- package/lib/store/index.js +10 -8
- package/lib/string-B3lm2b7v.js +84 -0
- package/lib/string-CbRNzmd9.cjs +1 -0
- package/lib/style-DBoQWK0d.js +14 -0
- package/lib/style-IDJ6db6n.cjs +1 -0
- package/lib/stylesheet-CBTuup4f.js +28 -0
- package/lib/stylesheet-xM7sMeuo.cjs +1 -0
- package/lib/ticker/index.cjs +1 -1
- package/lib/ticker/index.js +4 -120
- package/lib/url-CPCO10Sy.cjs +1 -0
- package/lib/url-CWCY_qe_.js +124 -0
- package/lib/utils/attributes.d.ts +2 -0
- package/lib/utils/dom.d.ts +1 -0
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.js +260 -226
- package/lib/utils/polyfills.d.ts +1 -1
- package/lib/utils/timeouts.d.ts +6 -1
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +35 -33
- package/lib/window-resizer/index.cjs +1 -1
- package/lib/window-resizer/index.js +27 -24
- package/lib/youtube/index.cjs +1 -1
- package/lib/youtube/index.js +56 -54
- package/package.json +11 -24
- package/lib/Animation-BzTjZIE-.js +0 -108
- package/lib/Animation-C39Ah-LM.cjs +0 -1
- package/lib/Composed-C-TV9te3.cjs +0 -1
- package/lib/Composed-DyAWjEXE.js +0 -121
- package/lib/Damped-CRusiRIV.js +0 -56
- package/lib/Damped-Prr0iKu1.cjs +0 -1
- package/lib/DragControls-8rNZwQrs.cjs +0 -1
- package/lib/DragControls-DBNdMBA4.js +0 -228
- package/lib/LocalLinks-BxhSFv_Q.cjs +0 -1
- package/lib/LocalLinks-DFZFpbjs.js +0 -62
- package/lib/PageAnnouncerElement-0LxZjtVH.js +0 -24
- package/lib/PageAnnouncerElement-AQ0Ja6HM.cjs +0 -1
- package/lib/PageScroll-0LxFblry.js +0 -62
- package/lib/PageScroll-BXJUQwG7.cjs +0 -1
- package/lib/SourceElement-BHqPFbna.cjs +0 -5
- package/lib/SourceElement-DjbHjynf.js +0 -260
- package/lib/Store-Blf4msDz.cjs +0 -1
- package/lib/Store-ZThXYBQd.js +0 -152
- package/lib/Tweened-Bw1Cn1PJ.js +0 -47
- package/lib/Tweened-DWtk9E-O.cjs +0 -1
- package/lib/Viewport-BxCr0GlB.cjs +0 -1
- package/lib/Viewport-Dt-d9DPi.js +0 -109
- package/lib/attributes-69we3byR.js +0 -10
- package/lib/attributes-Bf2svn4j.cjs +0 -1
- package/lib/canvas-CU5Xjahf.cjs +0 -1
- package/lib/canvas-DeZ0SLUJ.js +0 -34
- package/lib/coordinates-CgdGoSYs.js +0 -24
- package/lib/coordinates-D8Np3cPD.cjs +0 -1
- package/lib/custom-elements-DBnCK7Zx.js +0 -24
- package/lib/custom-elements-Dh4TWRDJ.cjs +0 -1
- package/lib/dom-BETkVSSZ.js +0 -82
- package/lib/dom-CBLlqORw.cjs +0 -1
- package/lib/easings-BEmRlrDd.js +0 -38
- package/lib/easings-GegIwET5.cjs +0 -1
- package/lib/element-CGVl1jA-.js +0 -7
- package/lib/element-yhcBhsho.cjs +0 -1
- package/lib/events-CsVF98U6.js +0 -6
- package/lib/events-KVanG9sR.cjs +0 -1
- package/lib/file-DSpfWdd9.cjs +0 -1
- package/lib/file-GHShUlue.js +0 -24
- package/lib/function-C10DGppn.js +0 -17
- package/lib/function-MthRj-GJ.cjs +0 -1
- package/lib/gestures-C7gbKx11.cjs +0 -1
- package/lib/gestures-CcXV6fCp.js +0 -11
- package/lib/index-OE2INULi.cjs +0 -1
- package/lib/index-e9eDuagL.js +0 -65
- package/lib/jsx/hydrate.d.ts +0 -1
- package/lib/jsx/integrations/astro/client.cjs +0 -1
- package/lib/jsx/integrations/astro/client.d.ts +0 -2
- package/lib/jsx/integrations/astro/client.js +0 -50
- package/lib/jsx/integrations/astro/index.cjs +0 -1
- package/lib/jsx/integrations/astro/index.d.ts +0 -2
- package/lib/jsx/integrations/astro/index.js +0 -54
- package/lib/jsx/integrations/astro/server.cjs +0 -1
- package/lib/jsx/integrations/astro/server.d.ts +0 -3
- package/lib/jsx/integrations/astro/server.js +0 -35
- package/lib/jsx/plugins/vite.d.ts +0 -21
- package/lib/layout-BSMtwCga.js +0 -29
- package/lib/layout-Ctc2p3uz.cjs +0 -1
- package/lib/math-BOBiC4TN.js +0 -45
- package/lib/math-GDWEqu7y.cjs +0 -1
- package/lib/metadata-BcYZ5w3T.cjs +0 -1
- package/lib/metadata-jfowcCyz.js +0 -12
- package/lib/morph-B6sGhLCi.cjs +0 -1
- package/lib/morph-BQErz7qP.js +0 -242
- package/lib/number-ChAm68cm.cjs +0 -1
- package/lib/number-CumqY64S.js +0 -40
- package/lib/object-CcMK4y_r.js +0 -87
- package/lib/object-baN9pgbU.cjs +0 -1
- package/lib/polyfills-DJrTJQky.js +0 -24
- package/lib/polyfills-Df4r-ETT.cjs +0 -1
- package/lib/render-DQs7rIoN.cjs +0 -1
- package/lib/render-D_0FCWEu.js +0 -18
- package/lib/scroll-BA2WnUrb.cjs +0 -1
- package/lib/scroll-DY5senkF.js +0 -37
- package/lib/string-BlMQbe8b.js +0 -70
- package/lib/string-DUXXtU8v.cjs +0 -1
- package/lib/style-At6aDoqG.cjs +0 -1
- package/lib/style-j2TwriJ_.js +0 -10
- package/lib/stylesheet-5_o7PFzM.cjs +0 -1
- package/lib/stylesheet-DdBzowZY.js +0 -24
- package/lib/url-CHgcNwJ1.cjs +0 -1
- package/lib/url-CYgo5vrG.js +0 -113
- package/lib/vite-C-i3hVDL.js +0 -75
- package/lib/vite-DzanPumM.cjs +0 -44
package/lib/utils/index.js
CHANGED
|
@@ -1,44 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import { a as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { i as
|
|
10
|
-
import { d as
|
|
11
|
-
import {
|
|
12
|
-
import { d as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import { c as
|
|
26
|
-
|
|
27
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: !0 });
|
|
3
|
+
import { g, a, p, b } from "../attributes-FObgMNCf.js";
|
|
4
|
+
import { a as intersector, t as ticker } from "../index-ClTMVKJp.js";
|
|
5
|
+
import { i } from "../index-ClTMVKJp.js";
|
|
6
|
+
import { a as a2, c, f, m } from "../canvas-DsglKco1.js";
|
|
7
|
+
import { g as g2, n, s } from "../coordinates--JG1U6kQ.js";
|
|
8
|
+
import { w } from "../custom-elements-HEMuF7yH.js";
|
|
9
|
+
import { c as c2, h, e, b as b2, f as f2, a as a3, g as g3, i as i2, t, d } from "../dom-D8D-_9ty.js";
|
|
10
|
+
import { d as d2, o, g as g4, q, c as c3, j, n as n2, a as a4, h as h2, k, f as f3, p as p2, b as b3, i as i3, m as m2, l } from "../easings-BSGJFMAo.js";
|
|
11
|
+
import { i as i4 } from "../element-DKw5H-Tu.js";
|
|
12
|
+
import { d as d3 } from "../events-Ds-TuvYW.js";
|
|
13
|
+
import { c as c4, d as d4 } from "../file-DwQs6bB6.js";
|
|
14
|
+
import { d as d5, t as t2 } from "../function-UmbPrOHm.js";
|
|
15
|
+
import { s as s2 } from "../gestures-DmKKNnh4.js";
|
|
16
|
+
import { c as c5, s as s3 } from "../stylesheet-CBTuup4f.js";
|
|
17
|
+
import { g as g5, a as a5, c as c6, b as b4 } from "../layout-C26zkY7D.js";
|
|
18
|
+
import { e as e2, f as f4, c as c7, d as d6, l as l2, m as m3, r, b as b5, a as a6, s as s4 } from "../math-r8V23YFe.js";
|
|
19
|
+
import { f as f5 } from "../metadata-BNdkmeeD.js";
|
|
20
|
+
import { A, j as j2, d as d7, h as h3, e as e3, g as g6, i as i5, f as f6, b as b6, c as c8, N, a as a7, k as k2, m as m4, p as p3 } from "../morph-BtgB1YQP.js";
|
|
21
|
+
import { b as b7, l as l3, p as p4, r as r2, t as t3 } from "../number-DiVt2xnh.js";
|
|
22
|
+
import { c as c9, d as d8, i as i6, b as b8, a as a8, m as m5, e as e4, o as o2, p as p5 } from "../object-CiIdEmJx.js";
|
|
23
|
+
import { n as n3, r as r3 } from "../polyfills-CG1XJNia.js";
|
|
24
|
+
import { s as s5, w as w2 } from "../scroll-DoNeuIgT.js";
|
|
25
|
+
import { c as c10, a as a9, b as b9, d as d9, g as g7, i as i7, k as k3, s as s6, t as t4, u } from "../string-B3lm2b7v.js";
|
|
26
|
+
import { g as g8, a as a10 } from "../style-DBoQWK0d.js";
|
|
27
|
+
import { c as c11, i as i8, a as a11, b as b10, n as n4, p as p6, s as s7, e as e5, d as d10, u as u2 } from "../url-CWCY_qe_.js";
|
|
28
|
+
function insert(arr, index, ...newItems) {
|
|
29
|
+
return [...arr.slice(0, index), ...newItems, ...arr.slice(index)];
|
|
28
30
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
__name(insert, "insert");
|
|
32
|
+
function shiftArray(arr, positions) {
|
|
33
|
+
const len = arr.length;
|
|
34
|
+
positions = positions % len;
|
|
35
|
+
const result = new Array(len);
|
|
36
|
+
for (let i9 = 0; i9 < len; i9++) {
|
|
37
|
+
const newPos = (i9 + positions) % len;
|
|
38
|
+
result[newPos] = arr[i9];
|
|
36
39
|
}
|
|
37
|
-
return
|
|
40
|
+
return result;
|
|
38
41
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
__name(shiftArray, "shiftArray");
|
|
43
|
+
function formatBytes(bytes, decimals = 2) {
|
|
44
|
+
if (!+bytes) return "0 Bytes";
|
|
45
|
+
const k4 = 1024, dm = decimals < 0 ? 0 : decimals, sizes = [
|
|
42
46
|
"Bytes",
|
|
43
47
|
"KiB",
|
|
44
48
|
"MiB",
|
|
@@ -48,222 +52,252 @@ function b(t, e = 2) {
|
|
|
48
52
|
"EiB",
|
|
49
53
|
"ZiB",
|
|
50
54
|
"YiB"
|
|
51
|
-
],
|
|
52
|
-
return `${parseFloat((
|
|
55
|
+
], i9 = Math.floor(Math.log(bytes) / Math.log(k4));
|
|
56
|
+
return `${parseFloat((bytes / Math.pow(k4, i9)).toFixed(dm))} ${sizes[i9]}`;
|
|
53
57
|
}
|
|
54
|
-
|
|
58
|
+
__name(formatBytes, "formatBytes");
|
|
59
|
+
function copyTextToClipboard(text) {
|
|
55
60
|
if (navigator.clipboard)
|
|
56
|
-
navigator.clipboard.writeText(
|
|
61
|
+
navigator.clipboard.writeText(text).then(() => {
|
|
57
62
|
console.log("Text copied to clipboard successfully!");
|
|
58
|
-
}).catch((
|
|
59
|
-
console.error("Failed to copy text to clipboard:",
|
|
63
|
+
}).catch((err) => {
|
|
64
|
+
console.error("Failed to copy text to clipboard:", err);
|
|
60
65
|
});
|
|
61
66
|
else {
|
|
62
|
-
const
|
|
63
|
-
|
|
67
|
+
const textArea = document.createElement("textarea");
|
|
68
|
+
textArea.value = text, textArea.style.position = "fixed", textArea.style.top = "0", textArea.style.left = "0", document.body.appendChild(textArea), textArea.select();
|
|
64
69
|
try {
|
|
65
70
|
document.execCommand("copy") ? console.log("Text copied to clipboard successfully!") : console.error("Failed to copy text to clipboard.");
|
|
66
|
-
} catch (
|
|
67
|
-
console.error("Failed to copy text to clipboard:",
|
|
71
|
+
} catch (err) {
|
|
72
|
+
console.error("Failed to copy text to clipboard:", err);
|
|
68
73
|
}
|
|
69
|
-
document.body.removeChild(
|
|
74
|
+
document.body.removeChild(textArea);
|
|
70
75
|
}
|
|
71
76
|
}
|
|
72
|
-
|
|
73
|
-
|
|
77
|
+
__name(copyTextToClipboard, "copyTextToClipboard");
|
|
78
|
+
function dotRectCollision(dot, rect) {
|
|
79
|
+
return dot.x < rect.x + rect.width && dot.x > rect.x && dot.y < rect.y + rect.height && dot.y > rect.y;
|
|
74
80
|
}
|
|
75
|
-
|
|
76
|
-
|
|
81
|
+
__name(dotRectCollision, "dotRectCollision");
|
|
82
|
+
function dotCircleCollision(dot, circle) {
|
|
83
|
+
return Math.sqrt((dot.x - circle.x) ** 2 + (dot.y - circle.y) ** 2) < circle.radius;
|
|
77
84
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
85
|
+
__name(dotCircleCollision, "dotCircleCollision");
|
|
86
|
+
function dotPolygonCollision(dot, polygon) {
|
|
87
|
+
let inside = !1;
|
|
88
|
+
const { x, y } = dot;
|
|
89
|
+
for (let i9 = 0, j3 = polygon.length - 1; i9 < polygon.length; j3 = i9++) {
|
|
90
|
+
const xi = polygon[i9].x, yi = polygon[i9].y, xj = polygon[j3].x, yj = polygon[j3].y;
|
|
91
|
+
yi > y != yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi && (inside = !inside);
|
|
84
92
|
}
|
|
85
|
-
return
|
|
93
|
+
return inside;
|
|
86
94
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
95
|
+
__name(dotPolygonCollision, "dotPolygonCollision");
|
|
96
|
+
function getActualValue(rule, name) {
|
|
97
|
+
const obj = rule.style.getPropertyValue(name);
|
|
98
|
+
if (obj) {
|
|
99
|
+
const stringValue = obj.toString();
|
|
100
|
+
return stringValue.startsWith("var") ? getActualValue(rule, stringValue.slice(4, -1)) : stringValue;
|
|
92
101
|
}
|
|
93
102
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
103
|
+
__name(getActualValue, "getActualValue");
|
|
104
|
+
function getRootVariables(...names) {
|
|
105
|
+
const variables = {};
|
|
106
|
+
return Array.from(document.styleSheets).forEach((stylesheet) => {
|
|
107
|
+
Array.from(stylesheet.cssRules).forEach((rule) => {
|
|
108
|
+
rule instanceof CSSStyleRule && rule.selectorText === ":root" && names.forEach((name) => {
|
|
109
|
+
const value = getActualValue(rule, name);
|
|
110
|
+
value && (variables[name] = value);
|
|
101
111
|
});
|
|
102
112
|
});
|
|
103
|
-
}),
|
|
104
|
-
|
|
105
|
-
}),
|
|
113
|
+
}), names.forEach((name) => {
|
|
114
|
+
variables[name] || console.warn(`variable named ${name} not found`);
|
|
115
|
+
}), variables;
|
|
106
116
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
117
|
+
__name(getRootVariables, "getRootVariables");
|
|
118
|
+
function encode(string) {
|
|
119
|
+
const decodedStr = window.atob(string);
|
|
120
|
+
return decodeURIComponent(window.escape(decodedStr));
|
|
110
121
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
122
|
+
__name(encode, "encode");
|
|
123
|
+
function decode(string) {
|
|
124
|
+
const encodedStr = window.unescape(encodeURIComponent(string));
|
|
125
|
+
return window.btoa(encodedStr);
|
|
114
126
|
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
127
|
+
__name(decode, "decode");
|
|
128
|
+
const phoneRegex = /^(\+?\d{1,3}[-.\s]?)?(\(?\d{3}\)?[-.\s]?)?\d{1,4}[-.\s]?\d{2,4}[-.\s]?\d{2,4}$/, emailRegex = /^[\w.-]+@[a-zA-Z\d.-]+\.[a-zA-Z]{2,}$/;
|
|
129
|
+
function tryCreateHrefFromContact(contact) {
|
|
130
|
+
let href, type;
|
|
131
|
+
return emailRegex.test(contact) ? (href = `mailto:${contact.trim()}`, type = "email") : phoneRegex.test(contact) && (href = `tel:${contact.replace(/[^0-9\\.\\+]+/g, "")}`, type = "phone"), { href, type, contact };
|
|
119
132
|
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
133
|
+
__name(tryCreateHrefFromContact, "tryCreateHrefFromContact");
|
|
134
|
+
function cloneTemplateContent(templateElement, callback) {
|
|
135
|
+
if (templateElement) {
|
|
136
|
+
const element = templateElement.content.cloneNode(!0).firstElementChild;
|
|
137
|
+
return element && (callback == null || callback(element)), element;
|
|
124
138
|
}
|
|
125
139
|
return null;
|
|
126
140
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
141
|
+
__name(cloneTemplateContent, "cloneTemplateContent");
|
|
142
|
+
function setIntervalOnIntersection(element, delay, callback, options) {
|
|
143
|
+
let intervalId, isIntersecting = !1, current = 0, previous = 0, tickerUnsubsribe;
|
|
144
|
+
const toggleInterval = /* @__PURE__ */ __name(() => {
|
|
145
|
+
clearInterval(intervalId), tickerUnsubsribe == null || tickerUnsubsribe(), options != null && options.restartCounter && (current = 0), isIntersecting && (callback({
|
|
146
|
+
current,
|
|
147
|
+
previous,
|
|
148
|
+
progress: 0
|
|
149
|
+
}), intervalId = setInterval(() => {
|
|
150
|
+
tickerUnsubsribe == null || tickerUnsubsribe(), current++, callback({
|
|
151
|
+
current,
|
|
152
|
+
previous,
|
|
153
|
+
progress: 0
|
|
154
|
+
}), previous = current, tickerUnsubsribe = ticker.subscribe((e6) => {
|
|
155
|
+
const progress = e6.timeElapsedSinceSubscription / delay;
|
|
156
|
+
callback({
|
|
157
|
+
current,
|
|
158
|
+
previous,
|
|
159
|
+
progress
|
|
160
|
+
});
|
|
161
|
+
});
|
|
162
|
+
}, delay));
|
|
163
|
+
}, "toggleInterval"), intersectorUnsubscribe = intersector.subscribe(element, (e6) => {
|
|
164
|
+
isIntersecting = e6.isIntersecting, toggleInterval();
|
|
135
165
|
});
|
|
136
166
|
return () => {
|
|
137
|
-
|
|
167
|
+
tickerUnsubsribe == null || tickerUnsubsribe(), intersectorUnsubscribe(), clearInterval(intervalId);
|
|
138
168
|
};
|
|
139
169
|
}
|
|
170
|
+
__name(setIntervalOnIntersection, "setIntervalOnIntersection");
|
|
140
171
|
export {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
172
|
+
A as ACTION_CREATE,
|
|
173
|
+
j2 as ACTION_PRESERVE,
|
|
174
|
+
d7 as ACTION_REMOVE,
|
|
175
|
+
h3 as ACTION_REMOVE_ATTR,
|
|
176
|
+
e3 as ACTION_REPLACE,
|
|
177
|
+
g6 as ACTION_SET_ATTR,
|
|
178
|
+
i5 as ACTION_SKIP,
|
|
179
|
+
f6 as ACTION_UPDATE,
|
|
180
|
+
b6 as NODE_TYPE_COMMENT,
|
|
181
|
+
c8 as NODE_TYPE_DOCUMENT,
|
|
182
|
+
N as NODE_TYPE_ELEMENT,
|
|
183
|
+
a7 as NODE_TYPE_TEXT,
|
|
184
|
+
b7 as beautifyNumber,
|
|
185
|
+
e2 as calculateDistance,
|
|
186
|
+
f4 as calculateDistanceWithRadius,
|
|
187
|
+
c10 as camelToKebab,
|
|
188
|
+
a9 as capitalize,
|
|
189
|
+
c11 as changeHistory,
|
|
190
|
+
c7 as clamp,
|
|
191
|
+
c9 as cloneDeep,
|
|
192
|
+
cloneTemplateContent,
|
|
193
|
+
d8 as compareObjects,
|
|
194
|
+
a2 as contain,
|
|
195
|
+
copyTextToClipboard,
|
|
196
|
+
c as cover,
|
|
197
|
+
c4 as createJSONAndSave,
|
|
198
|
+
c2 as createScriptElement,
|
|
199
|
+
c5 as createStylesheet,
|
|
200
|
+
d6 as damp,
|
|
201
|
+
d5 as debounce,
|
|
202
|
+
b9 as declension,
|
|
203
|
+
decode,
|
|
204
|
+
d9 as decodeHtmlEntities,
|
|
205
|
+
h as deepQuerySelectorAll,
|
|
206
|
+
k2 as diff,
|
|
207
|
+
d3 as dispatchEvent,
|
|
208
|
+
dotCircleCollision,
|
|
209
|
+
dotPolygonCollision,
|
|
210
|
+
dotRectCollision,
|
|
211
|
+
d4 as downloadURI,
|
|
212
|
+
d2 as easeInCubic,
|
|
213
|
+
o as easeInExpo,
|
|
214
|
+
g4 as easeInOutCubic,
|
|
215
|
+
q as easeInOutExpo,
|
|
216
|
+
c3 as easeInOutQuad,
|
|
217
|
+
j as easeInOutQuart,
|
|
218
|
+
n2 as easeInOutQuint,
|
|
219
|
+
a4 as easeInQuad,
|
|
220
|
+
h2 as easeInQuart,
|
|
221
|
+
k as easeInQuint,
|
|
222
|
+
f3 as easeOutCubic,
|
|
223
|
+
p2 as easeOutExpo,
|
|
224
|
+
b3 as easeOutQuad,
|
|
225
|
+
i3 as easeOutQuart,
|
|
226
|
+
m2 as easeOutQuint,
|
|
227
|
+
encode,
|
|
228
|
+
e as excludeElements,
|
|
229
|
+
b2 as findParentElement,
|
|
230
|
+
f2 as findScrollParentElement,
|
|
231
|
+
f as fixPosition,
|
|
232
|
+
formatBytes,
|
|
233
|
+
f5 as formatMediaDuration,
|
|
234
|
+
g7 as generateId,
|
|
235
|
+
a3 as getAllParentElements,
|
|
236
|
+
g5 as getCumulativeOffsetLeft,
|
|
237
|
+
a5 as getCumulativeOffsetTop,
|
|
238
|
+
c6 as getCumulativePosition,
|
|
239
|
+
g3 as getElement,
|
|
240
|
+
g as getElementAttributesAdvanced,
|
|
241
|
+
g8 as getElementTransitionDurationMS,
|
|
242
|
+
a10 as getElementTransitionDurationS,
|
|
243
|
+
g2 as getPointerPosition,
|
|
244
|
+
getRootVariables,
|
|
245
|
+
b4 as getStickyOffset,
|
|
246
|
+
insert,
|
|
247
|
+
i2 as intersectElements,
|
|
248
|
+
i as isBrowser,
|
|
249
|
+
i6 as isESClass,
|
|
250
|
+
i4 as isElementVisible,
|
|
251
|
+
i8 as isLocalUrl,
|
|
252
|
+
b8 as isNullish,
|
|
253
|
+
a8 as isObject,
|
|
254
|
+
i7 as isUppercase,
|
|
255
|
+
k3 as kebabToCamel,
|
|
256
|
+
l2 as lerp,
|
|
257
|
+
l as linear,
|
|
258
|
+
l3 as loopNumber,
|
|
259
|
+
m3 as mapRange,
|
|
260
|
+
m as measureText,
|
|
261
|
+
m5 as mergeDeep,
|
|
262
|
+
e4 as mixin,
|
|
263
|
+
m4 as morph,
|
|
264
|
+
n as normalize,
|
|
265
|
+
a11 as normalizeBase,
|
|
266
|
+
b10 as normalizeRelativeURLs,
|
|
267
|
+
n4 as normalizeURL,
|
|
268
|
+
n3 as nullishCoalescing,
|
|
269
|
+
o2 as omit,
|
|
270
|
+
a as parseAttribute,
|
|
271
|
+
p as parseAttributeValue,
|
|
272
|
+
b as parseAttributeValueAdvanced,
|
|
273
|
+
p6 as parseSearchParameters,
|
|
274
|
+
p3 as patch,
|
|
275
|
+
p5 as pick,
|
|
276
|
+
p4 as preciseNumber,
|
|
277
|
+
r3 as requestIdleCallback,
|
|
278
|
+
r as round,
|
|
279
|
+
r2 as roundNumberTo,
|
|
280
|
+
s as screenToCartesian,
|
|
281
|
+
s5 as scrollToElement,
|
|
282
|
+
s7 as searchParamsObjectToString,
|
|
283
|
+
e5 as searchParamsToObject,
|
|
284
|
+
setIntervalOnIntersection,
|
|
285
|
+
s2 as setupDrag,
|
|
286
|
+
shiftArray,
|
|
287
|
+
b5 as smootherstep,
|
|
288
|
+
a6 as smoothstep,
|
|
289
|
+
s6 as snakeToDotted,
|
|
290
|
+
d10 as splitPath,
|
|
291
|
+
s4 as step,
|
|
292
|
+
s3 as styleToString,
|
|
293
|
+
t2 as throttle,
|
|
294
|
+
t4 as toPascalCase,
|
|
295
|
+
t3 as toStep,
|
|
296
|
+
t as traverseNodes,
|
|
297
|
+
d as traverseShadowRoots,
|
|
298
|
+
tryCreateHrefFromContact,
|
|
299
|
+
u as uncapitalize,
|
|
300
|
+
u2 as updateSearchParameter,
|
|
301
|
+
w2 as wait,
|
|
302
|
+
w as whenDefined
|
|
269
303
|
};
|
package/lib/utils/polyfills.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare function nullishCoalescing<D, V = D>(value: V, defaultValue: D): D | (V & ({} | null));
|
|
2
|
-
export declare function requestIdleCallback(callback: IdleRequestCallback, options?: IdleRequestOptions): number
|
|
2
|
+
export declare function requestIdleCallback(callback: IdleRequestCallback, options?: IdleRequestOptions): number;
|
package/lib/utils/timeouts.d.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
export
|
|
1
|
+
export interface SetIntervalOnIntersectionEntry {
|
|
2
|
+
previous: number;
|
|
3
|
+
current: number;
|
|
4
|
+
progress: number;
|
|
5
|
+
}
|
|
6
|
+
export type SetIntervalOnIntersectionCallback = (entry: SetIntervalOnIntersectionEntry) => void;
|
|
2
7
|
export interface SetIntervalOnIntersectionOptions {
|
|
3
8
|
restartCounter?: boolean;
|
|
4
9
|
}
|
package/lib/video/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var __defProp=Object.defineProperty;var __typeError=msg=>{throw TypeError(msg)};var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __accessCheck=(obj,member,msg)=>member.has(obj)||__typeError("Cannot "+msg);var __privateGet=(obj,member,getter)=>(__accessCheck(obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd=(obj,member,value)=>member.has(obj)?__typeError("Cannot add the same private member more than once"):member instanceof WeakSet?member.add(obj):member.set(obj,value),__privateSet=(obj,member,value,setter)=>(__accessCheck(obj,member,"write to private field"),setter?setter.call(obj,value):member.set(obj,value),value);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const SourceElement=require("../SourceElement-DNyrQby1.cjs");require("../window-resizer/index.cjs");require("../Store-DZnOrofs.cjs");const intersector_index=require("../index-DZ44osDT.cjs"),events=require("../events-UlGk63iC.cjs");require("construct-style-sheets-polyfill");var _progress,_needToPlay,_clickElement,_checkReady,_clickListener;const _VideoElement=class _VideoElement extends SourceElement.SourceElement{constructor(){super(...arguments);__privateAdd(this,_progress,0);__privateAdd(this,_needToPlay,!1);__privateAdd(this,_clickElement,this);__privateAdd(this,_checkReady,__name(()=>{this.classList.add(`state-${this.consumerElement.readyState}`);const newProgress=this.consumerElement.readyState/4;newProgress!==__privateGet(this,_progress)&&events.dispatchEvent(this,"videoReadyStateChange",{detail:{readyState:this.consumerElement.readyState,progress:__privateGet(this,_progress)}}),newProgress>__privateGet(this,_progress)&&__privateSet(this,_progress,newProgress),this.consumerElement.readyState===4&&(intersector_index.ticker.unsubscribe(__privateGet(this,_checkReady)),__privateGet(this,_needToPlay)&&this.sourceManager.current&&this.consumerElement.play())},"#checkReady"));__privateAdd(this,_clickListener,__name(()=>{this.hasAttribute("click-controls")&&(this.consumerElement.paused?this.consumerElement.play():this.hasAttribute("controls")||this.consumerElement.pause())},"#clickListener"))}connectedCallback(){super.connectedCallback();const clickControlsSelector=this.getAttribute("click-controls");clickControlsSelector&&(clickControlsSelector==="parent"?__privateSet(this,_clickElement,this.parentElement):__privateSet(this,_clickElement,document.querySelector(clickControlsSelector)||this)),this.addEventListener("sourceCapture",()=>{__privateSet(this,_needToPlay,!1),this.hasAttribute("capture-autoplay")&&(this.sourceManager.current?this.consumerElement.play():__privateSet(this,_needToPlay,!0)),intersector_index.ticker.subscribe(__privateGet(this,_checkReady))}),this.addEventListener("sourceRelease",()=>{this.hasAttribute("capture-autoplay")&&this.consumerElement.pause(),this.hasAttribute("release-pause")&&this.consumerElement.pause(),this.hasAttribute("release-stop")&&(this.consumerElement.pause(),this.consumerElement.currentTime=0),this.hasAttribute("replay")&&(this.consumerElement.currentTime=0),this.hasAttribute("reload-source")&&this.classList.remove("state-0","state-1","state-2","state-3","state-4")}),__privateGet(this,_clickElement).addEventListener("click",__privateGet(this,_clickListener))}disconnectedCallback(){super.disconnectedCallback(),intersector_index.ticker.unsubscribe(__privateGet(this,_checkReady)),__privateSet(this,_progress,0),__privateGet(this,_clickElement).removeEventListener("click",__privateGet(this,_clickListener))}createConsumer(){return document.createElement("video")}consumeSource(url){this.consumerElement.src=url||"",url&&this.hasAttribute("volume")&&(this.consumerElement.volume=parseFloat(this.getAttribute("volume")||"1"))}};_progress=new WeakMap,_needToPlay=new WeakMap,_clickElement=new WeakMap,_checkReady=new WeakMap,_clickListener=new WeakMap,__name(_VideoElement,"VideoElement");let VideoElement=_VideoElement;intersector_index.isBrowser&&!customElements.get("e-video")&&customElements.define("e-video",VideoElement);exports.VideoElement=VideoElement;
|