aptechka 0.64.0 → 0.64.2
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-BRqj4VfN.cjs +1 -0
- package/lib/{Animation-Cb-klopb.js → Animation-D29tc5VS.js} +5 -4
- package/lib/Damped-BD1OQ1fH.cjs +1 -0
- package/lib/{Damped-ByZFbNSt.js → Damped-YrqW5V4w.js} +5 -4
- package/lib/DragControls-D8BXtKVu.cjs +1 -0
- package/lib/DragControls-DGDUw6bM.js +226 -0
- package/lib/ScrollSegmentElement-B6gp1q_z.js +459 -0
- package/lib/ScrollSegmentElement-DtMMAirz.cjs +1 -0
- package/lib/SourceElement-D_YeNqsI.cjs +5 -0
- package/lib/SourceElement-jbviggZp.js +217 -0
- package/lib/{Store-swP_0ymB.js → Store-0BVty6AZ.js} +2 -1
- package/lib/Store-Cd1GlEmZ.cjs +1 -0
- package/lib/Tweened-B-AHx93m.cjs +1 -0
- package/lib/{Tweened-DzZwfKNm.js → Tweened-_pF0zXXN.js} +9 -8
- package/lib/Viewport-DA10iWAO.js +109 -0
- package/lib/Viewport-DB0qAZPJ.cjs +1 -0
- package/lib/accordion/index.cjs +1 -1
- package/lib/accordion/index.js +2 -1
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +3 -3
- package/lib/attribute/index.cjs +1 -1
- package/lib/attribute/index.js +5 -4
- package/lib/billboard/index.cjs +1 -1
- package/lib/billboard/index.js +2 -1
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.js +5 -5
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +6 -223
- package/lib/css-property/index.cjs +1 -1
- package/lib/css-property/index.js +15 -14
- package/lib/custom-scrollbar/index.cjs +1 -1
- package/lib/custom-scrollbar/index.js +25 -24
- package/lib/dev/index.cjs +1 -1
- package/lib/dev/index.js +7 -6
- package/lib/device/index.cjs +1 -1
- package/lib/device/index.js +5 -106
- package/lib/element-linked-store/index.cjs +1 -1
- package/lib/element-linked-store/index.js +5 -4
- package/lib/element-resizer/index.cjs +1 -1
- package/lib/element-resizer/index.js +22 -21
- package/lib/en3/En3View.d.ts +2 -2
- package/lib/en3/en3.d.ts +3 -2
- package/lib/en3/index.cjs +3 -3
- package/lib/en3/index.js +90 -89
- package/lib/iframe/index.cjs +1 -1
- package/lib/iframe/index.js +4 -3
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +5 -4
- package/lib/{index-euf5anj6.js → index-Bv9zgfdb.js} +3 -2
- package/lib/index-DekP7OZe.cjs +1 -0
- package/lib/intersector/index.cjs +1 -1
- package/lib/intersector/index.js +4 -3
- package/lib/ladder/index.cjs +1 -1
- package/lib/ladder/index.js +41 -40
- package/lib/{layout-DpZo-I0y.js → layout-BSMtwCga.js} +2 -2
- package/lib/layout-box/index.cjs +1 -1
- package/lib/layout-box/index.js +18 -17
- package/lib/loading/index.cjs +1 -1
- package/lib/loading/index.js +4 -3
- package/lib/masonry-layout/index.cjs +1 -1
- package/lib/masonry-layout/index.js +2 -2
- package/lib/media/index.cjs +1 -1
- package/lib/media/index.js +12 -11
- package/lib/morph/index.cjs +1 -1
- package/lib/morph/index.js +3 -2
- package/lib/need_redo_tweaker/index.cjs +3 -3
- package/lib/need_redo_tweaker/index.js +368 -340
- package/lib/pixel-perfect/index.cjs +1 -1
- package/lib/pixel-perfect/index.js +2 -2
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +19 -18
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +3 -2
- package/lib/radio/index.cjs +1 -1
- package/lib/radio/index.js +2 -1
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.js +11 -10
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +66 -65
- package/lib/{scroll-Benkuq-t.js → scroll-BWF48oHS.js} +11 -10
- package/lib/scroll-CFDCeArT.cjs +1 -0
- package/lib/scroll-segment/index.cjs +1 -1
- package/lib/scroll-segment/index.js +3 -456
- package/lib/sequence/index.cjs +1 -1
- package/lib/sequence/index.js +4 -3
- package/lib/size-element/index.cjs +1 -1
- package/lib/size-element/index.js +2 -1
- package/lib/slicer/index.cjs +3 -3
- package/lib/slicer/index.js +31 -30
- package/lib/source/SourceElement.d.ts +1 -1
- package/lib/source/index.cjs +1 -5
- package/lib/source/index.js +5 -214
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.js +14 -13
- package/lib/stylesheet-DpnWNVyD.js +24 -0
- package/lib/stylesheet-HWF2a3nr.cjs +1 -0
- package/lib/ticker/index.cjs +1 -1
- package/lib/ticker/index.js +14 -13
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +5 -5
- package/lib/utils/jss.d.ts +0 -1
- package/lib/utils/stylesheet.d.ts +2 -0
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +11 -10
- package/lib/window-resizer/index.cjs +1 -1
- package/lib/window-resizer/index.js +9 -8
- package/lib/youtube/index.cjs +1 -1
- package/lib/youtube/index.js +12 -11
- package/package.json +4 -4
- package/lib/Animation-dD_idtTU.cjs +0 -1
- package/lib/Damped-B8bmTxAr.cjs +0 -1
- package/lib/Store-GokLe_g-.cjs +0 -1
- package/lib/Tweened-BsL9FamJ.cjs +0 -1
- package/lib/index-Cqw2NKev.cjs +0 -1
- package/lib/jss-CRBgdvJ3.cjs +0 -1
- package/lib/jss-DtnXPEnq.js +0 -23
- package/lib/scroll-DAhSpkhR.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var C=i=>{throw TypeError(i)};var S=(i,h,e)=>h.has(i)||C("Cannot "+e);var t=(i,h,e)=>(S(i,h,"read from private field"),e?e.call(i):h.get(i)),u=(i,h,e)=>h.has(i)?C("Cannot add the same private member more than once"):h instanceof WeakSet?h.add(i):h.set(i,e),r=(i,h,e,a)=>(S(i,h,"write to private field"),a?a.call(i,e):h.set(i,e),e),M=(i,h,e)=>(S(i,h,"access private method"),e);const y=require("./Store-Cd1GlEmZ.cjs"),N=require("./math-GDWEqu7y.cjs"),z=require("./number-DyefJ5a1.cjs"),q=require("./polyfills-Df4r-ETT.cjs");require("construct-style-sheets-polyfill");require("./index-DekP7OZe.cjs");const I=require("./ticker/index.cjs"),O=require("./order/index.cjs");var d,f,b,m,A,s,l,c,n,g,x,P,F;class R extends y.Store{constructor(e,a){super(e||0,a);u(this,x);u(this,d);u(this,f,O.TICK_ORDER.ANIMATION);u(this,b);u(this,m,new y.Store(!1));u(this,A,0);u(this,s,0);u(this,l,-1/0);u(this,c,1/0);u(this,n,0);u(this,g,null);u(this,F,e=>{this.handleAnimationFrame(e)});r(this,s,this.current)}get direction(){return t(this,A)}get target(){return t(this,s)}get min(){return t(this,l)}set min(e){r(this,l,e),this.set(t(this,s),{equalize:!0})}get max(){return t(this,c)}set max(e){r(this,c,e),this.set(t(this,s),{equalize:!0})}get from(){return t(this,n)}get isRunning(){return t(this,m)}get delta(){return Math.abs(t(this,s)-t(this,n))}get deltaProgress(){return this.delta?z.preciseNumber(Math.abs(this.current-t(this,n))/this.delta,6):0}get distance(){return Math.abs(t(this,c)-t(this,l))}get distanceProgress(){return this.distance?z.preciseNumber(Math.abs(this.current-t(this,l))/this.distance,6):0}set(e,a){(t(this,s)!==e||a!=null&&a.restart)&&(r(this,g,e),this.updateOptions(a),r(this,g,null),t(this,s)!==this.current&&this.start())}shift(e,a){this.set(t(this,s)+e,a)}reset(){super.reset(),this.set(this.initial,{equalize:!0})}close(){super.close(),this.reset(),this.unlistenAnimationFrame()}listenAnimationFrame(){t(this,m).current||(t(this,m).current=!0,I.ticker.subscribe(t(this,F),{maxFPS:t(this,d),order:t(this,f),culling:t(this,b)}))}unlistenAnimationFrame(){t(this,m).current&&(t(this,m).current=!1,I.ticker.unsubscribe(t(this,F)))}updateOptions(e){r(this,d,q.nullishCoalescing(e==null?void 0:e.maxFPS,t(this,d))),r(this,f,q.nullishCoalescing(e==null?void 0:e.order,t(this,f))),r(this,b,q.nullishCoalescing(e==null?void 0:e.culling,t(this,b))),r(this,l,q.nullishCoalescing(e==null?void 0:e.min,t(this,l))),r(this,c,q.nullishCoalescing(e==null?void 0:e.max,t(this,c))),M(this,x,P).call(this,typeof t(this,g)=="number"?t(this,g):t(this,s)),e!=null&&e.equalize&&!(e!=null&&e.restart)&&(this.unlistenAnimationFrame(),this.current=r(this,n,t(this,s))),e!=null&&e.restart&&(this.unlistenAnimationFrame(),this.current=r(this,n,this.initial),e!=null&&e.equalize&&(this.current=r(this,n,t(this,s)))),typeof(e==null?void 0:e.current)=="number"&&r(this,n,this.current=e.current)}start(){this.listenAnimationFrame()}}d=new WeakMap,f=new WeakMap,b=new WeakMap,m=new WeakMap,A=new WeakMap,s=new WeakMap,l=new WeakMap,c=new WeakMap,n=new WeakMap,g=new WeakMap,x=new WeakSet,P=function(e){r(this,A,Math.sign(e-t(this,s))),r(this,s,N.clamp(e,t(this,l),t(this,c))),r(this,n,this.current)},F=new WeakMap;exports.Animation=R;
|
|
@@ -3,15 +3,16 @@ var q = (r) => {
|
|
|
3
3
|
};
|
|
4
4
|
var S = (r, h, t) => h.has(r) || q("Cannot " + t);
|
|
5
5
|
var e = (r, h, t) => (S(r, h, "read from private field"), t ? t.call(r) : h.get(r)), a = (r, h, t) => h.has(r) ? q("Cannot add the same private member more than once") : h instanceof WeakSet ? h.add(r) : h.set(r, t), i = (r, h, t, u) => (S(r, h, "write to private field"), u ? u.call(r, t) : h.set(r, t), t), z = (r, h, t) => (S(r, h, "access private method"), t);
|
|
6
|
-
import { S as I } from "./Store-
|
|
6
|
+
import { S as I } from "./Store-0BVty6AZ.js";
|
|
7
7
|
import { c as R } from "./math-BOBiC4TN.js";
|
|
8
8
|
import { p as P } from "./number-CbdpfO3u.js";
|
|
9
9
|
import { n as A } from "./polyfills-DJrTJQky.js";
|
|
10
|
-
import "
|
|
10
|
+
import "construct-style-sheets-polyfill";
|
|
11
|
+
import "./index-Bv9zgfdb.js";
|
|
11
12
|
import { ticker as y } from "./ticker/index.js";
|
|
12
13
|
import { TICK_ORDER as N } from "./order/index.js";
|
|
13
14
|
var g, d, b, l, F, s, n, c, m, f, M, O, x;
|
|
14
|
-
class
|
|
15
|
+
class _ extends I {
|
|
15
16
|
constructor(t, u) {
|
|
16
17
|
super(t || 0, u);
|
|
17
18
|
a(this, M);
|
|
@@ -103,5 +104,5 @@ g = new WeakMap(), d = new WeakMap(), b = new WeakMap(), l = new WeakMap(), F =
|
|
|
103
104
|
i(this, F, Math.sign(t - e(this, s))), i(this, s, R(t, e(this, n), e(this, c))), i(this, m, this.current);
|
|
104
105
|
}, x = new WeakMap();
|
|
105
106
|
export {
|
|
106
|
-
|
|
107
|
+
_ as A
|
|
107
108
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var y=Object.defineProperty,C=Object.defineProperties;var O=Object.getOwnPropertyDescriptors;var l=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;var g=t=>{throw TypeError(t)};var d=(t,e,s)=>e in t?y(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,f=(t,e)=>{for(var s in e||(e={}))v.call(e,s)&&d(t,s,e[s]);if(l)for(var s of l(e))w.call(e,s)&&d(t,s,e[s]);return t},q=(t,e)=>C(t,O(e));var p=(t,e,s)=>e.has(t)||g("Cannot "+s);var a=(t,e,s)=>(p(t,e,"read from private field"),s?s.call(t):e.get(t)),c=(t,e,s)=>e.has(t)?g("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),n=(t,e,s,r)=>(p(t,e,"write to private field"),r?r.call(t,s):e.set(t,s),s);const B=require("./math-GDWEqu7y.cjs"),b=require("./number-DyefJ5a1.cjs"),m=require("./polyfills-Df4r-ETT.cjs");require("construct-style-sheets-polyfill");require("./index-DekP7OZe.cjs");const D=require("./Animation-BRqj4VfN.cjs");var i,h;class N extends D.Animation{constructor(s,r){super(s,r);c(this,i);c(this,h);this.damping=20,this.stiffness=0,this.mass=0,n(this,i,0),n(this,h,0),this.updateOptions(q(f({},r),{equalize:!0}))}get velocity(){return a(this,i)}get speed(){return a(this,h)}updateOptions(s){this.damping=m.nullishCoalescing(s==null?void 0:s.damping,this.damping),this.mass=m.nullishCoalescing(s==null?void 0:s.mass,this.mass),this.stiffness=m.nullishCoalescing(s==null?void 0:s.stiffness,this.stiffness),super.updateOptions(s)}handleAnimationFrame(s){b.preciseNumber(this.current,6)===b.preciseNumber(this.target,6)&&(this.unlistenAnimationFrame(),this.current=this.target);const r=this.current,A=Math.abs(r-this.target);n(this,h,A/s.timeBetweenFrames);const u=s.timeBetweenFrames/1e3;if(this.mass||this.stiffness){const F=(this.target-this.current)*this.stiffness-a(this,i)*this.damping;n(this,i,a(this,i)+F/this.mass*u),this.current+=a(this,i)*u}else this.current=B.damp(this.current,this.target,this.damping,u)}}i=new WeakMap,h=new WeakMap;exports.Damped=N;
|
|
@@ -18,10 +18,11 @@ var a = (s, e, t) => (A(s, e, "read from private field"), t ? t.call(s) : e.get(
|
|
|
18
18
|
import { d as D } from "./math-BOBiC4TN.js";
|
|
19
19
|
import { p as F } from "./number-CbdpfO3u.js";
|
|
20
20
|
import { n as u } from "./polyfills-DJrTJQky.js";
|
|
21
|
-
import "
|
|
22
|
-
import
|
|
21
|
+
import "construct-style-sheets-polyfill";
|
|
22
|
+
import "./index-Bv9zgfdb.js";
|
|
23
|
+
import { A as q } from "./Animation-D29tc5VS.js";
|
|
23
24
|
var i, h;
|
|
24
|
-
class
|
|
25
|
+
class G extends q {
|
|
25
26
|
constructor(t, r) {
|
|
26
27
|
super(t, r);
|
|
27
28
|
c(this, i);
|
|
@@ -51,5 +52,5 @@ class E extends q {
|
|
|
51
52
|
}
|
|
52
53
|
i = new WeakMap(), h = new WeakMap();
|
|
53
54
|
export {
|
|
54
|
-
|
|
55
|
+
G as D
|
|
55
56
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var p=r=>{throw TypeError(r)};var G=(r,a,e)=>a.has(r)||p("Cannot "+e);var t=(r,a,e)=>(G(r,a,"read from private field"),e?e.call(r):a.get(r)),s=(r,a,e)=>a.has(r)?p("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(r):a.set(r,e),i=(r,a,e,h)=>(G(r,a,"write to private field"),h?h.call(r,e):a.set(r,e),e),T=(r,a,e)=>(G(r,a,"access private method"),e);const w=require("./index-DekP7OZe.cjs"),_=require("./dom-JBOkFLTh.cjs");require("construct-style-sheets-polyfill");const B=require("./ticker/index.cjs");require("./Store-Cd1GlEmZ.cjs");const ee=require("./easings-GegIwET5.cjs"),te=require("./Tweened-B-AHx93m.cjs"),ie=require("./gestures-C7gbKx11.cjs"),se=require("./number-DyefJ5a1.cjs"),he=require("./order/index.cjs"),re=require("./notifier/index.cjs");var j;class F{constructor(){s(this,j,new re.Notifier)}get changeEvent(){return t(this,j)}}j=new WeakMap;var y,c,u,R;class ne extends F{constructor(e){super();s(this,y,null);s(this,c,null);s(this,u,"offsetHeight");s(this,R,e=>{const h=e.shiftKey?-1:1;let n;e.code==="Space"?n=h*t(this,c)[t(this,u)]*.4:e.code==="ArrowLeft"?n=-1*t(this,c)[t(this,u)]*.2:e.code==="ArrowRight"?n=1*t(this,c)[t(this,u)]*.2:e.code==="ArrowUp"?n=-1*t(this,c)[t(this,u)]*.2:e.code==="ArrowDown"?n=1*t(this,c)[t(this,u)]*.2:e.code==="PageUp"?n=-1*t(this,c)[t(this,u)]:e.code==="PageDown"?n=1*t(this,c)[t(this,u)]:e.code==="Home"?n=0:e.code==="End"&&(n=t(this,u)==="offsetWidth"?t(this,c).scrollWidth:t(this,c).scrollHeight),n&&(e.stopPropagation(),this.changeEvent.notify("keyboard",n,e))});w.isBrowser&&(i(this,y,e!=null&&e.element&&_.getElement(e.element)||window),i(this,c,t(this,y)instanceof HTMLElement?t(this,y):document.documentElement),this.dimension=e==null?void 0:e.dimension)}set dimension(e){i(this,u,e==="width"?"offsetWidth":"offsetHeight")}connect(){w.isBrowser&&t(this,y).addEventListener("keydown",t(this,R))}disconnect(){w.isBrowser&&t(this,y).removeEventListener("keydown",t(this,R))}}y=new WeakMap,c=new WeakMap,u=new WeakMap,R=new WeakMap;var x,k,X,Y,d,A,m,g,V,J,D,O,I;class ae extends F{constructor(e){super();s(this,g);s(this,x);s(this,k);s(this,X);s(this,Y);s(this,d);s(this,A);s(this,m);s(this,D);s(this,O);s(this,I);this.direction=1,i(this,d,new te.Tweened(0,{easing:ee.easeInQuad})),i(this,m,!1),i(this,D,h=>{t(this,d).current!==1&&this.changeEvent.notify("autoplay",h.timeBetweenFrames*t(this,x)*this.direction*(1-t(this,d).current),h)}),i(this,O,()=>{t(this,d).current!==1&&this.changeEvent.notify("autoplay",Math.sign(t(this,x))*this.direction*(1-t(this,d).current),null)}),i(this,I,()=>{t(this,k)&&(document.hidden?t(this,d).set(1,{equalize:!0}):t(this,d).set(0,{equalize:!0}))}),i(this,x,(e==null?void 0:e.speed)||1),i(this,k,(e==null?void 0:e.interval)||!1),i(this,X,e)}set interval(e){i(this,k,e),t(this,m)&&T(this,g,V).call(this)}set speed(e){i(this,x,e),t(this,m)&&T(this,g,V).call(this)}connect(){t(this,m)||(i(this,m,!0),T(this,g,V).call(this))}disconnect(){t(this,m)&&(i(this,m,!1),T(this,g,J).call(this))}pauseAndContinue(e,h){t(this,m)&&e&&(clearTimeout(t(this,A)),t(this,d).set(1,{duration:Math.min(e,1e3),equalize:h}),i(this,A,setTimeout(()=>{t(this,d).set(0,{duration:Math.min(e,5e3),equalize:h})},e)))}}x=new WeakMap,k=new WeakMap,X=new WeakMap,Y=new WeakMap,d=new WeakMap,A=new WeakMap,m=new WeakMap,g=new WeakSet,V=function(){T(this,g,J).call(this),t(this,k)?i(this,Y,setInterval(t(this,O),Math.abs(t(this,x)))):B.ticker.subscribe(t(this,D),t(this,X)),document.addEventListener("visibilitychange",t(this,I))},J=function(){clearInterval(t(this,Y)),B.ticker.unsubscribe(t(this,D)),clearTimeout(t(this,A)),t(this,d).close(),document.removeEventListener("visibilitychange",t(this,I))},D=new WeakMap,O=new WeakMap,I=new WeakMap;var H,M,z,S;class le extends F{constructor(e){super();s(this,H,null);s(this,M);s(this,z);s(this,S,e=>{let h=0;const n=Math.abs(e.deltaY),b=Math.abs(e.deltaX);if(!(this.axis==="x"&&n>b||this.axis==="y"&&b>n)&&(e.preventDefault(),!(this.debounce&&this.axis==="x"&&b<5||this.axis==="y"&&n<5)))if(h=(this.axis==="max"?b>n?e.deltaX:e.deltaY:this.axis==="x"?e.deltaX:e.deltaY)*this.speed,e.stopPropagation(),this.debounce){const N=Date.now();if(N-t(this,z)>40&&(h=100*Math.sign(h)),i(this,z,N),Math.abs(h)<100||t(this,M))return;this.changeEvent.notify("wheel",h,e),i(this,M,setTimeout(()=>{i(this,M,void 0)},80))}else this.changeEvent.notify("wheel",h,e)});this.axis=(e==null?void 0:e.axis)||"y",this.speed=(e==null?void 0:e.speed)||1,this.debounce=(e==null?void 0:e.debounce)||!1,i(this,z,Date.now()),w.isBrowser&&i(this,H,e!=null&&e.element&&_.getElement(e.element)||window)}connect(){w.isBrowser&&t(this,H).addEventListener("wheel",t(this,S),{passive:!1})}disconnect(){w.isBrowser&&(t(this,H).removeEventListener("wheel",t(this,S)),clearTimeout(t(this,M)))}}H=new WeakMap,M=new WeakMap,z=new WeakMap,S=new WeakMap;var q,P,o,l,C,E,W,K,L;const v=class v extends F{constructor(e){super();s(this,P);s(this,o);s(this,l);s(this,C);s(this,E);s(this,W);s(this,K);s(this,L);this.inertion=1,i(this,P,null),i(this,o,null),i(this,l,0),i(this,C,[]),i(this,E,0),i(this,W,h=>{Math.abs(t(this,E))>2&&h.preventDefault()}),i(this,K,h=>{if(i(this,E,0),i(this,l,0),h.button!==0||h.composedPath().find(f=>f instanceof HTMLElement&&f.hasAttribute("drag-dead-zone")))return;this.swipe||B.ticker.unsubscribe(t(this,L));let n=h,b=!1;document.documentElement.classList.add("grabbing");let N=0,$=0,U=0,Q=0;ie.setupDrag(f=>{t(v,q)&&t(v,q)!==t(this,o)||(N=n.x-f.x,$=n.y-f.y,U=f.x-h.x,Q=f.y-h.y,this.axis==="x"?(i(this,E,U),i(this,l,N)):(i(this,E,Q),i(this,l,$)),n=f,b=this.axis==="x"&&Math.abs(U)>Math.abs(Q)||this.axis==="y"&&Math.abs(Q)>Math.abs(U),b&&(document.documentElement.classList.add("dragging"),i(v,q,t(this,o)),this.changeEvent.notify("drag",t(this,l),f)))},f=>{i(v,q,null),b&&(!this.swipe&&this.inertion?(i(this,l,t(this,l)*this.inertion),B.ticker.subscribe(t(this,L),{order:he.TICK_ORDER.CONTROLS-1})):this.swipe&&this.changeEvent.notify("drag-end",t(this,l),f)),document.documentElement.classList.remove("grabbing"),document.documentElement.classList.remove("dragging")})}),i(this,L,()=>{Math.floor(Math.abs(t(this,l)))||B.ticker.unsubscribe(t(this,L)),i(this,l,t(this,l)*.95),i(this,l,se.preciseNumber(t(this,l),3)),this.changeEvent.notify("drag",t(this,l),null)}),this.axis=(e==null?void 0:e.axis)||"y",this.swipe=(e==null?void 0:e.swipe)||!1,w.isBrowser&&(i(this,o,e!=null&&e.element&&_.getElement(e.element)||document.documentElement),i(this,P,(e==null?void 0:e.rootElement)||t(this,o)))}connect(){w.isBrowser&&(i(this,C,[...t(this,P).querySelectorAll("a")]),t(this,C).forEach(e=>{e.addEventListener("click",t(this,W))}),t(this,o).addEventListener("pointerdown",t(this,K)))}disconnect(){w.isBrowser&&(t(this,C).forEach(e=>{e.removeEventListener("click",t(this,W))}),t(this,o).removeEventListener("pointerdown",t(this,K)),B.ticker.unsubscribe(t(this,L)))}};q=new WeakMap,P=new WeakMap,o=new WeakMap,l=new WeakMap,C=new WeakMap,E=new WeakMap,W=new WeakMap,K=new WeakMap,L=new WeakMap,s(v,q,null);let Z=v;exports.AutoplayControls=ae;exports.Controls=F;exports.DragControls=Z;exports.KeyboardControls=ne;exports.WheelControls=le;
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
var _ = (n) => {
|
|
2
|
+
throw TypeError(n);
|
|
3
|
+
};
|
|
4
|
+
var G = (n, r, e) => r.has(n) || _("Cannot " + e);
|
|
5
|
+
var t = (n, r, e) => (G(n, r, "read from private field"), e ? e.call(n) : r.get(n)), s = (n, r, e) => r.has(n) ? _("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(n) : r.set(n, e), i = (n, r, e, h) => (G(n, r, "write to private field"), h ? h.call(n, e) : r.set(n, e), e), A = (n, r, e) => (G(n, r, "access private method"), e);
|
|
6
|
+
import { i as w } from "./index-Bv9zgfdb.js";
|
|
7
|
+
import { g as Z } from "./dom-CVWzyXPH.js";
|
|
8
|
+
import "construct-style-sheets-polyfill";
|
|
9
|
+
import { ticker as D } from "./ticker/index.js";
|
|
10
|
+
import "./Store-0BVty6AZ.js";
|
|
11
|
+
import { a as ee } from "./easings-BEmRlrDd.js";
|
|
12
|
+
import { T as te } from "./Tweened-_pF0zXXN.js";
|
|
13
|
+
import { s as ie } from "./gestures-CcXV6fCp.js";
|
|
14
|
+
import { p as se } from "./number-CbdpfO3u.js";
|
|
15
|
+
import { TICK_ORDER as he } from "./order/index.js";
|
|
16
|
+
import { Notifier as ne } from "./notifier/index.js";
|
|
17
|
+
var V;
|
|
18
|
+
class j {
|
|
19
|
+
constructor() {
|
|
20
|
+
s(this, V, new ne());
|
|
21
|
+
}
|
|
22
|
+
get changeEvent() {
|
|
23
|
+
return t(this, V);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
V = new WeakMap();
|
|
27
|
+
var y, c, u, X;
|
|
28
|
+
class ye extends j {
|
|
29
|
+
constructor(e) {
|
|
30
|
+
super();
|
|
31
|
+
s(this, y, null);
|
|
32
|
+
s(this, c, null);
|
|
33
|
+
s(this, u, "offsetHeight");
|
|
34
|
+
s(this, X, (e) => {
|
|
35
|
+
const h = e.shiftKey ? -1 : 1;
|
|
36
|
+
let a;
|
|
37
|
+
e.code === "Space" ? a = h * t(this, c)[t(this, u)] * 0.4 : e.code === "ArrowLeft" ? a = -1 * t(this, c)[t(this, u)] * 0.2 : e.code === "ArrowRight" ? a = 1 * t(this, c)[t(this, u)] * 0.2 : e.code === "ArrowUp" ? a = -1 * t(this, c)[t(this, u)] * 0.2 : e.code === "ArrowDown" ? a = 1 * t(this, c)[t(this, u)] * 0.2 : e.code === "PageUp" ? a = -1 * t(this, c)[t(this, u)] : e.code === "PageDown" ? a = 1 * t(this, c)[t(this, u)] : e.code === "Home" ? a = 0 : e.code === "End" && (a = t(this, u) === "offsetWidth" ? t(this, c).scrollWidth : t(this, c).scrollHeight), a && (e.stopPropagation(), this.changeEvent.notify("keyboard", a, e));
|
|
38
|
+
});
|
|
39
|
+
w && (i(this, y, e != null && e.element && Z(e.element) || window), i(this, c, t(this, y) instanceof HTMLElement ? t(this, y) : document.documentElement), this.dimension = e == null ? void 0 : e.dimension);
|
|
40
|
+
}
|
|
41
|
+
set dimension(e) {
|
|
42
|
+
i(this, u, e === "width" ? "offsetWidth" : "offsetHeight");
|
|
43
|
+
}
|
|
44
|
+
connect() {
|
|
45
|
+
w && t(this, y).addEventListener(
|
|
46
|
+
"keydown",
|
|
47
|
+
t(this, X)
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
disconnect() {
|
|
51
|
+
w && t(this, y).removeEventListener(
|
|
52
|
+
"keydown",
|
|
53
|
+
t(this, X)
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
y = new WeakMap(), c = new WeakMap(), u = new WeakMap(), X = new WeakMap();
|
|
58
|
+
var E, M, Y, O, d, I, m, b, Q, J, H, S, q;
|
|
59
|
+
class Ee extends j {
|
|
60
|
+
constructor(e) {
|
|
61
|
+
super();
|
|
62
|
+
s(this, b);
|
|
63
|
+
s(this, E);
|
|
64
|
+
s(this, M);
|
|
65
|
+
s(this, Y);
|
|
66
|
+
s(this, O);
|
|
67
|
+
s(this, d);
|
|
68
|
+
s(this, I);
|
|
69
|
+
s(this, m);
|
|
70
|
+
s(this, H);
|
|
71
|
+
s(this, S);
|
|
72
|
+
s(this, q);
|
|
73
|
+
this.direction = 1, i(this, d, new te(0, { easing: ee })), i(this, m, !1), i(this, H, (h) => {
|
|
74
|
+
t(this, d).current !== 1 && this.changeEvent.notify(
|
|
75
|
+
"autoplay",
|
|
76
|
+
h.timeBetweenFrames * t(this, E) * this.direction * (1 - t(this, d).current),
|
|
77
|
+
h
|
|
78
|
+
);
|
|
79
|
+
}), i(this, S, () => {
|
|
80
|
+
t(this, d).current !== 1 && this.changeEvent.notify(
|
|
81
|
+
"autoplay",
|
|
82
|
+
Math.sign(t(this, E)) * this.direction * (1 - t(this, d).current),
|
|
83
|
+
null
|
|
84
|
+
);
|
|
85
|
+
}), i(this, q, () => {
|
|
86
|
+
t(this, M) && (document.hidden ? t(this, d).set(1, { equalize: !0 }) : t(this, d).set(0, { equalize: !0 }));
|
|
87
|
+
}), i(this, E, (e == null ? void 0 : e.speed) || 1), i(this, M, (e == null ? void 0 : e.interval) || !1), i(this, Y, e);
|
|
88
|
+
}
|
|
89
|
+
set interval(e) {
|
|
90
|
+
i(this, M, e), t(this, m) && A(this, b, Q).call(this);
|
|
91
|
+
}
|
|
92
|
+
set speed(e) {
|
|
93
|
+
i(this, E, e), t(this, m) && A(this, b, Q).call(this);
|
|
94
|
+
}
|
|
95
|
+
connect() {
|
|
96
|
+
t(this, m) || (i(this, m, !0), A(this, b, Q).call(this));
|
|
97
|
+
}
|
|
98
|
+
disconnect() {
|
|
99
|
+
t(this, m) && (i(this, m, !1), A(this, b, J).call(this));
|
|
100
|
+
}
|
|
101
|
+
pauseAndContinue(e, h) {
|
|
102
|
+
t(this, m) && e && (clearTimeout(t(this, I)), t(this, d).set(1, {
|
|
103
|
+
duration: Math.min(e, 1e3),
|
|
104
|
+
equalize: h
|
|
105
|
+
}), i(this, I, setTimeout(() => {
|
|
106
|
+
t(this, d).set(0, {
|
|
107
|
+
duration: Math.min(e, 5e3),
|
|
108
|
+
equalize: h
|
|
109
|
+
});
|
|
110
|
+
}, e)));
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
E = new WeakMap(), M = new WeakMap(), Y = new WeakMap(), O = new WeakMap(), d = new WeakMap(), I = new WeakMap(), m = new WeakMap(), b = new WeakSet(), Q = function() {
|
|
114
|
+
A(this, b, J).call(this), t(this, M) ? i(this, O, setInterval(
|
|
115
|
+
t(this, S),
|
|
116
|
+
Math.abs(t(this, E))
|
|
117
|
+
)) : D.subscribe(t(this, H), t(this, Y)), document.addEventListener(
|
|
118
|
+
"visibilitychange",
|
|
119
|
+
t(this, q)
|
|
120
|
+
);
|
|
121
|
+
}, J = function() {
|
|
122
|
+
clearInterval(t(this, O)), D.unsubscribe(t(this, H)), clearTimeout(t(this, I)), t(this, d).close(), document.removeEventListener(
|
|
123
|
+
"visibilitychange",
|
|
124
|
+
t(this, q)
|
|
125
|
+
);
|
|
126
|
+
}, H = new WeakMap(), S = new WeakMap(), q = new WeakMap();
|
|
127
|
+
var z, k, P, B;
|
|
128
|
+
class xe extends j {
|
|
129
|
+
constructor(e) {
|
|
130
|
+
super();
|
|
131
|
+
s(this, z, null);
|
|
132
|
+
s(this, k);
|
|
133
|
+
s(this, P);
|
|
134
|
+
s(this, B, (e) => {
|
|
135
|
+
let h = 0;
|
|
136
|
+
const a = Math.abs(e.deltaY), g = Math.abs(e.deltaX);
|
|
137
|
+
if (!(this.axis === "x" && a > g || this.axis === "y" && g > a) && (e.preventDefault(), !(this.debounce && this.axis === "x" && g < 5 || this.axis === "y" && a < 5)))
|
|
138
|
+
if (h = (this.axis === "max" ? g > a ? e.deltaX : e.deltaY : this.axis === "x" ? e.deltaX : e.deltaY) * this.speed, e.stopPropagation(), this.debounce) {
|
|
139
|
+
const R = Date.now();
|
|
140
|
+
if (R - t(this, P) > 40 && (h = 100 * Math.sign(h)), i(this, P, R), Math.abs(h) < 100 || t(this, k))
|
|
141
|
+
return;
|
|
142
|
+
this.changeEvent.notify("wheel", h, e), i(this, k, setTimeout(() => {
|
|
143
|
+
i(this, k, void 0);
|
|
144
|
+
}, 80));
|
|
145
|
+
} else
|
|
146
|
+
this.changeEvent.notify("wheel", h, e);
|
|
147
|
+
});
|
|
148
|
+
this.axis = (e == null ? void 0 : e.axis) || "y", this.speed = (e == null ? void 0 : e.speed) || 1, this.debounce = (e == null ? void 0 : e.debounce) || !1, i(this, P, Date.now()), w && i(this, z, e != null && e.element && Z(e.element) || window);
|
|
149
|
+
}
|
|
150
|
+
connect() {
|
|
151
|
+
w && t(this, z).addEventListener(
|
|
152
|
+
"wheel",
|
|
153
|
+
t(this, B),
|
|
154
|
+
{
|
|
155
|
+
passive: !1
|
|
156
|
+
}
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
disconnect() {
|
|
160
|
+
w && (t(this, z).removeEventListener(
|
|
161
|
+
"wheel",
|
|
162
|
+
t(this, B)
|
|
163
|
+
), clearTimeout(t(this, k)));
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
z = new WeakMap(), k = new WeakMap(), P = new WeakMap(), B = new WeakMap();
|
|
167
|
+
var T, W, o, l, C, x, K, N, L;
|
|
168
|
+
const v = class v extends j {
|
|
169
|
+
constructor(e) {
|
|
170
|
+
super();
|
|
171
|
+
s(this, W);
|
|
172
|
+
s(this, o);
|
|
173
|
+
s(this, l);
|
|
174
|
+
s(this, C);
|
|
175
|
+
s(this, x);
|
|
176
|
+
s(this, K);
|
|
177
|
+
s(this, N);
|
|
178
|
+
s(this, L);
|
|
179
|
+
this.inertion = 1, i(this, W, null), i(this, o, null), i(this, l, 0), i(this, C, []), i(this, x, 0), i(this, K, (h) => {
|
|
180
|
+
Math.abs(t(this, x)) > 2 && h.preventDefault();
|
|
181
|
+
}), i(this, N, (h) => {
|
|
182
|
+
if (i(this, x, 0), i(this, l, 0), h.button !== 0 || h.composedPath().find(
|
|
183
|
+
(f) => f instanceof HTMLElement && f.hasAttribute("drag-dead-zone")
|
|
184
|
+
))
|
|
185
|
+
return;
|
|
186
|
+
this.swipe || D.unsubscribe(t(this, L));
|
|
187
|
+
let a = h, g = !1;
|
|
188
|
+
document.documentElement.classList.add("grabbing");
|
|
189
|
+
let R = 0, $ = 0, F = 0, U = 0;
|
|
190
|
+
ie(
|
|
191
|
+
(f) => {
|
|
192
|
+
t(v, T) && t(v, T) !== t(this, o) || (R = a.x - f.x, $ = a.y - f.y, F = f.x - h.x, U = f.y - h.y, this.axis === "x" ? (i(this, x, F), i(this, l, R)) : (i(this, x, U), i(this, l, $)), a = f, g = this.axis === "x" && Math.abs(F) > Math.abs(U) || this.axis === "y" && Math.abs(U) > Math.abs(F), g && (document.documentElement.classList.add("dragging"), i(v, T, t(this, o)), this.changeEvent.notify("drag", t(this, l), f)));
|
|
193
|
+
},
|
|
194
|
+
(f) => {
|
|
195
|
+
i(v, T, null), g && (!this.swipe && this.inertion ? (i(this, l, t(this, l) * this.inertion), D.subscribe(t(this, L), {
|
|
196
|
+
order: he.CONTROLS - 1
|
|
197
|
+
})) : this.swipe && this.changeEvent.notify("drag-end", t(this, l), f)), document.documentElement.classList.remove("grabbing"), document.documentElement.classList.remove("dragging");
|
|
198
|
+
}
|
|
199
|
+
);
|
|
200
|
+
}), i(this, L, () => {
|
|
201
|
+
Math.floor(Math.abs(t(this, l))) || D.unsubscribe(t(this, L)), i(this, l, t(this, l) * 0.95), i(this, l, se(t(this, l), 3)), this.changeEvent.notify("drag", t(this, l), null);
|
|
202
|
+
}), this.axis = (e == null ? void 0 : e.axis) || "y", this.swipe = (e == null ? void 0 : e.swipe) || !1, w && (i(this, o, e != null && e.element && Z(e.element) || document.documentElement), i(this, W, (e == null ? void 0 : e.rootElement) || t(this, o)));
|
|
203
|
+
}
|
|
204
|
+
connect() {
|
|
205
|
+
w && (i(this, C, [...t(this, W).querySelectorAll("a")]), t(this, C).forEach((e) => {
|
|
206
|
+
e.addEventListener("click", t(this, K));
|
|
207
|
+
}), t(this, o).addEventListener("pointerdown", t(this, N)));
|
|
208
|
+
}
|
|
209
|
+
disconnect() {
|
|
210
|
+
w && (t(this, C).forEach((e) => {
|
|
211
|
+
e.removeEventListener("click", t(this, K));
|
|
212
|
+
}), t(this, o).removeEventListener(
|
|
213
|
+
"pointerdown",
|
|
214
|
+
t(this, N)
|
|
215
|
+
), D.unsubscribe(t(this, L)));
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
T = new WeakMap(), W = new WeakMap(), o = new WeakMap(), l = new WeakMap(), C = new WeakMap(), x = new WeakMap(), K = new WeakMap(), N = new WeakMap(), L = new WeakMap(), s(v, T, null);
|
|
219
|
+
let p = v;
|
|
220
|
+
export {
|
|
221
|
+
Ee as A,
|
|
222
|
+
j as C,
|
|
223
|
+
p as D,
|
|
224
|
+
ye as K,
|
|
225
|
+
xe as W
|
|
226
|
+
};
|