aptechka 0.61.6 → 0.61.7

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.
@@ -1 +1 @@
1
- "use strict";var p=r=>{throw TypeError(r)};var V=(r,n,e)=>n.has(r)||p("Cannot "+e);var t=(r,n,e)=>(V(r,n,"read from private field"),e?e.call(r):n.get(r)),s=(r,n,e)=>n.has(r)?p("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(r):n.set(r,e),i=(r,n,e,h)=>(V(r,n,"write to private field"),h?h.call(r,e):n.set(r,e),e),C=(r,n,e)=>(V(r,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ee=require("../notifier/index.cjs"),w=require("../index-Cqw2NKev.cjs"),Z=require("../dom-JBOkFLTh.cjs"),T=require("../ticker/index.cjs");require("../Store-GokLe_g-.cjs");const te=require("../easings-GegIwET5.cjs"),ie=require("../Tweened-BsL9FamJ.cjs"),se=require("../gestures-C7gbKx11.cjs"),he=require("../number-DyefJ5a1.cjs"),re=require("../order/index.cjs");var j;class O{constructor(){s(this,j,new ee.Notifier)}get changeEvent(){return t(this,j)}}j=new WeakMap;var g,c,u,W;class ne extends O{constructor(e){super();s(this,g,null);s(this,c,null);s(this,u,"offsetHeight");s(this,W,e=>{const h=e.shiftKey?-1:1;let a;e.code==="Space"?a=h*t(this,c)[t(this,u)]*.4:e.code==="ArrowLeft"?a=-1*t(this,c)[t(this,u)]*.2:e.code==="ArrowRight"?a=1*t(this,c)[t(this,u)]*.2:e.code==="ArrowUp"?a=-1*t(this,c)[t(this,u)]*.2:e.code==="ArrowDown"?a=1*t(this,c)[t(this,u)]*.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))});w.isBrowser&&(i(this,g,e!=null&&e.element&&Z.getElement(e.element)||window),i(this,c,t(this,g)instanceof HTMLElement?t(this,g):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,g).addEventListener("keydown",t(this,W))}disconnect(){w.isBrowser&&t(this,g).removeEventListener("keydown",t(this,W))}}g=new WeakMap,c=new WeakMap,u=new WeakMap,W=new WeakMap;var y,M,X,Y,d,B,m,b,U,G,A,K,D;class ae extends O{constructor(e){super();s(this,b);s(this,y);s(this,M);s(this,X);s(this,Y);s(this,d);s(this,B);s(this,m);s(this,A);s(this,K);s(this,D);this.direction=1,i(this,d,new ie.Tweened(0,{easing:te.easeInQuad})),i(this,m,!1),i(this,A,h=>{t(this,d).current!==1&&this.changeEvent.notify("autoplay",h.timeBetweenFrames*t(this,y)*this.direction*(1-t(this,d).current),h)}),i(this,K,()=>{t(this,d).current!==1&&this.changeEvent.notify("autoplay",Math.sign(t(this,y))*this.direction*(1-t(this,d).current),null)}),i(this,D,()=>{t(this,M)&&(document.hidden?t(this,d).set(1,{equalize:!0}):t(this,d).set(0,{equalize:!0}))}),i(this,y,(e==null?void 0:e.speed)||1),i(this,M,(e==null?void 0:e.interval)||!1),i(this,X,e)}set interval(e){i(this,M,e),t(this,m)&&C(this,b,U).call(this)}set speed(e){i(this,y,e),t(this,m)&&C(this,b,U).call(this)}connect(){t(this,m)||(i(this,m,!0),C(this,b,U).call(this))}disconnect(){t(this,m)&&(i(this,m,!1),C(this,b,G).call(this))}pauseAndContinue(e,h){t(this,m)&&e&&(clearTimeout(t(this,B)),t(this,d).set(1,{duration:Math.min(e,1e3),equalize:h}),i(this,B,setTimeout(()=>{t(this,d).set(0,{duration:Math.min(e,5e3),equalize:h})},e)))}}y=new WeakMap,M=new WeakMap,X=new WeakMap,Y=new WeakMap,d=new WeakMap,B=new WeakMap,m=new WeakMap,b=new WeakSet,U=function(){C(this,b,G).call(this),t(this,M)?i(this,Y,setInterval(t(this,K),Math.abs(t(this,y)))):T.ticker.subscribe(t(this,A),t(this,X)),document.addEventListener("visibilitychange",t(this,D))},G=function(){clearInterval(t(this,Y)),T.ticker.unsubscribe(t(this,A)),clearTimeout(t(this,B)),t(this,d).close(),document.removeEventListener("visibilitychange",t(this,D))},A=new WeakMap,K=new WeakMap,D=new WeakMap;var I,k,H,N;class le extends O{constructor(e){super();s(this,I,null);s(this,k);s(this,H);s(this,N,e=>{let h=0;if(!(this.axis==="x"&&Math.abs(e.deltaY)>Math.abs(e.deltaX)*1||this.axis==="y"&&Math.abs(e.deltaX)>Math.abs(e.deltaY)*1))if(e.preventDefault(),h=(this.axis==="max"?Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY:this.axis==="x"?e.deltaX:e.deltaY)*this.speed,e.stopPropagation(),this.debounce){const a=Date.now();if(a-t(this,H)>40&&(h=100*Math.sign(h)),i(this,H,a),Math.abs(h)<100||t(this,k))return;this.changeEvent.notify("wheel",h,e),i(this,k,setTimeout(()=>{i(this,k,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,H,Date.now()),w.isBrowser&&i(this,I,e!=null&&e.element&&Z.getElement(e.element)||window)}connect(){w.isBrowser&&t(this,I).addEventListener("wheel",t(this,N),{passive:!1})}disconnect(){w.isBrowser&&(t(this,I).removeEventListener("wheel",t(this,N)),clearTimeout(t(this,k)))}}I=new WeakMap,k=new WeakMap,H=new WeakMap,N=new WeakMap;var v,P,o,l,q,E,z,S,x;const L=class L extends O{constructor(e){super();s(this,P);s(this,o);s(this,l);s(this,q);s(this,E);s(this,z);s(this,S);s(this,x);this.inertion=1,i(this,P,null),i(this,o,null),i(this,l,0),i(this,q,[]),i(this,E,0),i(this,z,h=>{Math.abs(t(this,E))>2&&h.preventDefault()}),i(this,S,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||T.ticker.unsubscribe(t(this,x));let a=h,Q=!1;document.documentElement.classList.add("grabbing");let _=0,$=0,R=0,F=0;se.setupDrag(f=>{t(L,v)&&t(L,v)!==t(this,o)||(_=a.x-f.x,$=a.y-f.y,R=f.x-h.x,F=f.y-h.y,this.axis==="x"?(i(this,E,R),i(this,l,_)):(i(this,E,F),i(this,l,$)),a=f,Q=this.axis==="x"&&Math.abs(R)>Math.abs(F)||this.axis==="y"&&Math.abs(F)>Math.abs(R),Q&&(document.documentElement.classList.add("dragging"),i(L,v,t(this,o)),this.changeEvent.notify("drag",t(this,l),f)))},f=>{i(L,v,null),Q&&(!this.swipe&&this.inertion?(i(this,l,t(this,l)*this.inertion),T.ticker.subscribe(t(this,x),{order:re.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,x,()=>{Math.floor(Math.abs(t(this,l)))||T.ticker.unsubscribe(t(this,x)),i(this,l,t(this,l)*.95),i(this,l,he.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&&Z.getElement(e.element)||document.documentElement),i(this,P,(e==null?void 0:e.rootElement)||t(this,o)))}connect(){w.isBrowser&&(i(this,q,[...t(this,P).querySelectorAll("a")]),t(this,q).forEach(e=>{e.addEventListener("click",t(this,z))}),t(this,o).addEventListener("pointerdown",t(this,S)))}disconnect(){w.isBrowser&&(t(this,q).forEach(e=>{e.removeEventListener("click",t(this,z))}),t(this,o).removeEventListener("pointerdown",t(this,S)),T.ticker.unsubscribe(t(this,x)))}};v=new WeakMap,P=new WeakMap,o=new WeakMap,l=new WeakMap,q=new WeakMap,E=new WeakMap,z=new WeakMap,S=new WeakMap,x=new WeakMap,s(L,v,null);let J=L;exports.AutoplayControls=ae;exports.Controls=O;exports.DragControls=J;exports.KeyboardControls=ne;exports.WheelControls=le;
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);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ee=require("../notifier/index.cjs"),w=require("../index-Cqw2NKev.cjs"),_=require("../dom-JBOkFLTh.cjs"),B=require("../ticker/index.cjs");require("../Store-GokLe_g-.cjs");const te=require("../easings-GegIwET5.cjs"),ie=require("../Tweened-BsL9FamJ.cjs"),se=require("../gestures-C7gbKx11.cjs"),he=require("../number-DyefJ5a1.cjs"),re=require("../order/index.cjs");var V;class F{constructor(){s(this,V,new ee.Notifier)}get changeEvent(){return t(this,V)}}V=new WeakMap;var y,c,u,N;class ne extends F{constructor(e){super();s(this,y,null);s(this,c,null);s(this,u,"offsetHeight");s(this,N,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,N))}disconnect(){w.isBrowser&&t(this,y).removeEventListener("keydown",t(this,N))}}y=new WeakMap,c=new WeakMap,u=new WeakMap,N=new WeakMap;var x,k,O,R,d,A,m,g,Q,J,D,X,I;class ae extends F{constructor(e){super();s(this,g);s(this,x);s(this,k);s(this,O);s(this,R);s(this,d);s(this,A);s(this,m);s(this,D);s(this,X);s(this,I);this.direction=1,i(this,d,new ie.Tweened(0,{easing:te.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,X,()=>{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,O,e)}set interval(e){i(this,k,e),t(this,m)&&T(this,g,Q).call(this)}set speed(e){i(this,x,e),t(this,m)&&T(this,g,Q).call(this)}connect(){t(this,m)||(i(this,m,!0),T(this,g,Q).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,O=new WeakMap,R=new WeakMap,d=new WeakMap,A=new WeakMap,m=new WeakMap,g=new WeakSet,Q=function(){T(this,g,J).call(this),t(this,k)?i(this,R,setInterval(t(this,X),Math.abs(t(this,x)))):B.ticker.subscribe(t(this,D),t(this,O)),document.addEventListener("visibilitychange",t(this,I))},J=function(){clearInterval(t(this,R)),B.ticker.unsubscribe(t(this,D)),clearTimeout(t(this,A)),t(this,d).close(),document.removeEventListener("visibilitychange",t(this,I))},D=new WeakMap,X=new WeakMap,I=new WeakMap;var H,M,P,Y;class le extends F{constructor(e){super();s(this,H,null);s(this,M);s(this,P);s(this,Y,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 K=Date.now();if(K-t(this,P)>40&&(h=100*Math.sign(h)),i(this,P,K),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,P,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,Y),{passive:!1})}disconnect(){w.isBrowser&&(t(this,H).removeEventListener("wheel",t(this,Y)),clearTimeout(t(this,M)))}}H=new WeakMap,M=new WeakMap,P=new WeakMap,Y=new WeakMap;var q,z,o,l,C,E,S,W,L;const v=class v extends F{constructor(e){super();s(this,z);s(this,o);s(this,l);s(this,C);s(this,E);s(this,S);s(this,W);s(this,L);this.inertion=1,i(this,z,null),i(this,o,null),i(this,l,0),i(this,C,[]),i(this,E,0),i(this,S,h=>{Math.abs(t(this,E))>2&&h.preventDefault()}),i(this,W,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 K=0,$=0,U=0,j=0;se.setupDrag(f=>{t(v,q)&&t(v,q)!==t(this,o)||(K=n.x-f.x,$=n.y-f.y,U=f.x-h.x,j=f.y-h.y,this.axis==="x"?(i(this,E,U),i(this,l,K)):(i(this,E,j),i(this,l,$)),n=f,b=this.axis==="x"&&Math.abs(U)>Math.abs(j)||this.axis==="y"&&Math.abs(j)>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:re.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,he.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,z,(e==null?void 0:e.rootElement)||t(this,o)))}connect(){w.isBrowser&&(i(this,C,[...t(this,z).querySelectorAll("a")]),t(this,C).forEach(e=>{e.addEventListener("click",t(this,S))}),t(this,o).addEventListener("pointerdown",t(this,W)))}disconnect(){w.isBrowser&&(t(this,C).forEach(e=>{e.removeEventListener("click",t(this,S))}),t(this,o).removeEventListener("pointerdown",t(this,W)),B.ticker.unsubscribe(t(this,L)))}};q=new WeakMap,z=new WeakMap,o=new WeakMap,l=new WeakMap,C=new WeakMap,E=new WeakMap,S=new WeakMap,W=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;
@@ -1,223 +1,224 @@
1
- var _ = (a) => {
2
- throw TypeError(a);
1
+ var _ = (n) => {
2
+ throw TypeError(n);
3
3
  };
4
- var j = (a, n, e) => n.has(a) || _("Cannot " + e);
5
- var t = (a, n, e) => (j(a, n, "read from private field"), e ? e.call(a) : n.get(a)), s = (a, n, e) => n.has(a) ? _("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(a) : n.set(a, e), i = (a, n, e, h) => (j(a, n, "write to private field"), h ? h.call(a, e) : n.set(a, e), e), C = (a, n, e) => (j(a, n, "access private method"), e);
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
6
  import { Notifier as ee } from "../notifier/index.js";
7
7
  import { i as b } from "../index-euf5anj6.js";
8
- import { g as J } from "../dom-CVWzyXPH.js";
9
- import { ticker as A } from "../ticker/index.js";
8
+ import { g as Z } from "../dom-CVWzyXPH.js";
9
+ import { ticker as D } from "../ticker/index.js";
10
10
  import "../Store-swP_0ymB.js";
11
11
  import { b as te } from "../easings-Bni3YAAW.js";
12
12
  import { T as ie } from "../Tweened-C4xgzPkR.js";
13
13
  import { s as se } from "../gestures-CcXV6fCp.js";
14
14
  import { p as he } from "../number-CbdpfO3u.js";
15
- import { TICK_ORDER as ae } from "../order/index.js";
16
- var U;
17
- class Q {
15
+ import { TICK_ORDER as ne } from "../order/index.js";
16
+ var V;
17
+ class j {
18
18
  constructor() {
19
- s(this, U, new ee());
19
+ s(this, V, new ee());
20
20
  }
21
21
  get changeEvent() {
22
- return t(this, U);
22
+ return t(this, V);
23
23
  }
24
24
  }
25
- U = new WeakMap();
26
- var g, d, u, N;
27
- class ge extends Q {
25
+ V = new WeakMap();
26
+ var y, c, u, Y;
27
+ class ge extends j {
28
28
  constructor(e) {
29
29
  super();
30
- s(this, g, null);
31
- s(this, d, null);
30
+ s(this, y, null);
31
+ s(this, c, null);
32
32
  s(this, u, "offsetHeight");
33
- s(this, N, (e) => {
33
+ s(this, Y, (e) => {
34
34
  const h = e.shiftKey ? -1 : 1;
35
- let r;
36
- e.code === "Space" ? r = h * t(this, d)[t(this, u)] * 0.4 : e.code === "ArrowLeft" ? r = -1 * t(this, d)[t(this, u)] * 0.2 : e.code === "ArrowRight" ? r = 1 * t(this, d)[t(this, u)] * 0.2 : e.code === "ArrowUp" ? r = -1 * t(this, d)[t(this, u)] * 0.2 : e.code === "ArrowDown" ? r = 1 * t(this, d)[t(this, u)] * 0.2 : e.code === "PageUp" ? r = -1 * t(this, d)[t(this, u)] : e.code === "PageDown" ? r = 1 * t(this, d)[t(this, u)] : e.code === "Home" ? r = 0 : e.code === "End" && (r = t(this, u) === "offsetWidth" ? t(this, d).scrollWidth : t(this, d).scrollHeight), r && (e.stopPropagation(), this.changeEvent.notify("keyboard", r, e));
35
+ let a;
36
+ 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));
37
37
  });
38
- b && (i(this, g, e != null && e.element && J(e.element) || window), i(this, d, t(this, g) instanceof HTMLElement ? t(this, g) : document.documentElement), this.dimension = e == null ? void 0 : e.dimension);
38
+ b && (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);
39
39
  }
40
40
  set dimension(e) {
41
41
  i(this, u, e === "width" ? "offsetWidth" : "offsetHeight");
42
42
  }
43
43
  connect() {
44
- b && t(this, g).addEventListener(
44
+ b && t(this, y).addEventListener(
45
45
  "keydown",
46
- t(this, N)
46
+ t(this, Y)
47
47
  );
48
48
  }
49
49
  disconnect() {
50
- b && t(this, g).removeEventListener(
50
+ b && t(this, y).removeEventListener(
51
51
  "keydown",
52
- t(this, N)
52
+ t(this, Y)
53
53
  );
54
54
  }
55
55
  }
56
- g = new WeakMap(), d = new WeakMap(), u = new WeakMap(), N = new WeakMap();
57
- var y, M, R, W, c, D, m, w, F, G, I, K, H;
58
- class ye extends Q {
56
+ y = new WeakMap(), c = new WeakMap(), u = new WeakMap(), Y = new WeakMap();
57
+ var E, M, K, O, d, I, m, w, Q, J, H, S, q;
58
+ class ye extends j {
59
59
  constructor(e) {
60
60
  super();
61
61
  s(this, w);
62
- s(this, y);
62
+ s(this, E);
63
63
  s(this, M);
64
- s(this, R);
65
- s(this, W);
66
- s(this, c);
67
- s(this, D);
68
- s(this, m);
69
- s(this, I);
70
64
  s(this, K);
65
+ s(this, O);
66
+ s(this, d);
67
+ s(this, I);
68
+ s(this, m);
71
69
  s(this, H);
72
- this.direction = 1, i(this, c, new ie(0, { easing: te })), i(this, m, !1), i(this, I, (h) => {
73
- t(this, c).current !== 1 && this.changeEvent.notify(
70
+ s(this, S);
71
+ s(this, q);
72
+ this.direction = 1, i(this, d, new ie(0, { easing: te })), i(this, m, !1), i(this, H, (h) => {
73
+ t(this, d).current !== 1 && this.changeEvent.notify(
74
74
  "autoplay",
75
- h.timeBetweenFrames * t(this, y) * this.direction * (1 - t(this, c).current),
75
+ h.timeBetweenFrames * t(this, E) * this.direction * (1 - t(this, d).current),
76
76
  h
77
77
  );
78
- }), i(this, K, () => {
79
- t(this, c).current !== 1 && this.changeEvent.notify(
78
+ }), i(this, S, () => {
79
+ t(this, d).current !== 1 && this.changeEvent.notify(
80
80
  "autoplay",
81
- Math.sign(t(this, y)) * this.direction * (1 - t(this, c).current),
81
+ Math.sign(t(this, E)) * this.direction * (1 - t(this, d).current),
82
82
  null
83
83
  );
84
- }), i(this, H, () => {
85
- t(this, M) && (document.hidden ? t(this, c).set(1, { equalize: !0 }) : t(this, c).set(0, { equalize: !0 }));
86
- }), i(this, y, (e == null ? void 0 : e.speed) || 1), i(this, M, (e == null ? void 0 : e.interval) || !1), i(this, R, e);
84
+ }), i(this, q, () => {
85
+ t(this, M) && (document.hidden ? t(this, d).set(1, { equalize: !0 }) : t(this, d).set(0, { equalize: !0 }));
86
+ }), i(this, E, (e == null ? void 0 : e.speed) || 1), i(this, M, (e == null ? void 0 : e.interval) || !1), i(this, K, e);
87
87
  }
88
88
  set interval(e) {
89
- i(this, M, e), t(this, m) && C(this, w, F).call(this);
89
+ i(this, M, e), t(this, m) && A(this, w, Q).call(this);
90
90
  }
91
91
  set speed(e) {
92
- i(this, y, e), t(this, m) && C(this, w, F).call(this);
92
+ i(this, E, e), t(this, m) && A(this, w, Q).call(this);
93
93
  }
94
94
  connect() {
95
- t(this, m) || (i(this, m, !0), C(this, w, F).call(this));
95
+ t(this, m) || (i(this, m, !0), A(this, w, Q).call(this));
96
96
  }
97
97
  disconnect() {
98
- t(this, m) && (i(this, m, !1), C(this, w, G).call(this));
98
+ t(this, m) && (i(this, m, !1), A(this, w, J).call(this));
99
99
  }
100
100
  pauseAndContinue(e, h) {
101
- t(this, m) && e && (clearTimeout(t(this, D)), t(this, c).set(1, {
101
+ t(this, m) && e && (clearTimeout(t(this, I)), t(this, d).set(1, {
102
102
  duration: Math.min(e, 1e3),
103
103
  equalize: h
104
- }), i(this, D, setTimeout(() => {
105
- t(this, c).set(0, {
104
+ }), i(this, I, setTimeout(() => {
105
+ t(this, d).set(0, {
106
106
  duration: Math.min(e, 5e3),
107
107
  equalize: h
108
108
  });
109
109
  }, e)));
110
110
  }
111
111
  }
112
- y = new WeakMap(), M = new WeakMap(), R = new WeakMap(), W = new WeakMap(), c = new WeakMap(), D = new WeakMap(), m = new WeakMap(), w = new WeakSet(), F = function() {
113
- C(this, w, G).call(this), t(this, M) ? i(this, W, setInterval(
114
- t(this, K),
115
- Math.abs(t(this, y))
116
- )) : A.subscribe(t(this, I), t(this, R)), document.addEventListener(
112
+ E = new WeakMap(), M = new WeakMap(), K = new WeakMap(), O = new WeakMap(), d = new WeakMap(), I = new WeakMap(), m = new WeakMap(), w = new WeakSet(), Q = function() {
113
+ A(this, w, J).call(this), t(this, M) ? i(this, O, setInterval(
114
+ t(this, S),
115
+ Math.abs(t(this, E))
116
+ )) : D.subscribe(t(this, H), t(this, K)), document.addEventListener(
117
117
  "visibilitychange",
118
- t(this, H)
118
+ t(this, q)
119
119
  );
120
- }, G = function() {
121
- clearInterval(t(this, W)), A.unsubscribe(t(this, I)), clearTimeout(t(this, D)), t(this, c).close(), document.removeEventListener(
120
+ }, J = function() {
121
+ clearInterval(t(this, O)), D.unsubscribe(t(this, H)), clearTimeout(t(this, I)), t(this, d).close(), document.removeEventListener(
122
122
  "visibilitychange",
123
- t(this, H)
123
+ t(this, q)
124
124
  );
125
- }, I = new WeakMap(), K = new WeakMap(), H = new WeakMap();
126
- var q, v, z, O;
127
- class Ee extends Q {
125
+ }, H = new WeakMap(), S = new WeakMap(), q = new WeakMap();
126
+ var z, k, P, B;
127
+ class Ee extends j {
128
128
  constructor(e) {
129
129
  super();
130
- s(this, q, null);
131
- s(this, v);
132
- s(this, z);
133
- s(this, O, (e) => {
130
+ s(this, z, null);
131
+ s(this, k);
132
+ s(this, P);
133
+ s(this, B, (e) => {
134
134
  let h = 0;
135
- if (!(this.axis === "x" && Math.abs(e.deltaY) > Math.abs(e.deltaX) * 1 || this.axis === "y" && Math.abs(e.deltaX) > Math.abs(e.deltaY) * 1))
136
- if (e.preventDefault(), h = (this.axis === "max" ? Math.abs(e.deltaX) > Math.abs(e.deltaY) ? e.deltaX : e.deltaY : this.axis === "x" ? e.deltaX : e.deltaY) * this.speed, e.stopPropagation(), this.debounce) {
137
- const r = Date.now();
138
- if (r - t(this, z) > 40 && (h = 100 * Math.sign(h)), i(this, z, r), Math.abs(h) < 100 || t(this, v))
135
+ const a = Math.abs(e.deltaY), g = Math.abs(e.deltaX);
136
+ 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)))
137
+ if (h = (this.axis === "max" ? g > a ? e.deltaX : e.deltaY : this.axis === "x" ? e.deltaX : e.deltaY) * this.speed, e.stopPropagation(), this.debounce) {
138
+ const X = Date.now();
139
+ if (X - t(this, P) > 40 && (h = 100 * Math.sign(h)), i(this, P, X), Math.abs(h) < 100 || t(this, k))
139
140
  return;
140
- this.changeEvent.notify("wheel", h, e), i(this, v, setTimeout(() => {
141
- i(this, v, void 0);
141
+ this.changeEvent.notify("wheel", h, e), i(this, k, setTimeout(() => {
142
+ i(this, k, void 0);
142
143
  }, 80));
143
144
  } else
144
145
  this.changeEvent.notify("wheel", h, e);
145
146
  });
146
- 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()), b && i(this, q, e != null && e.element && J(e.element) || window);
147
+ 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()), b && i(this, z, e != null && e.element && Z(e.element) || window);
147
148
  }
148
149
  connect() {
149
- b && t(this, q).addEventListener(
150
+ b && t(this, z).addEventListener(
150
151
  "wheel",
151
- t(this, O),
152
+ t(this, B),
152
153
  {
153
154
  passive: !1
154
155
  }
155
156
  );
156
157
  }
157
158
  disconnect() {
158
- b && (t(this, q).removeEventListener(
159
+ b && (t(this, z).removeEventListener(
159
160
  "wheel",
160
- t(this, O)
161
- ), clearTimeout(t(this, v)));
161
+ t(this, B)
162
+ ), clearTimeout(t(this, k)));
162
163
  }
163
164
  }
164
- q = new WeakMap(), v = new WeakMap(), z = new WeakMap(), O = new WeakMap();
165
- var k, P, o, l, T, E, X, Y, x;
166
- const L = class L extends Q {
165
+ z = new WeakMap(), k = new WeakMap(), P = new WeakMap(), B = new WeakMap();
166
+ var T, N, o, l, C, x, R, W, L;
167
+ const v = class v extends j {
167
168
  constructor(e) {
168
169
  super();
169
- s(this, P);
170
+ s(this, N);
170
171
  s(this, o);
171
172
  s(this, l);
172
- s(this, T);
173
- s(this, E);
174
- s(this, X);
175
- s(this, Y);
173
+ s(this, C);
176
174
  s(this, x);
177
- this.inertion = 1, i(this, P, null), i(this, o, null), i(this, l, 0), i(this, T, []), i(this, E, 0), i(this, X, (h) => {
178
- Math.abs(t(this, E)) > 2 && h.preventDefault();
179
- }), i(this, Y, (h) => {
180
- if (i(this, E, 0), i(this, l, 0), h.button !== 0 || h.composedPath().find(
175
+ s(this, R);
176
+ s(this, W);
177
+ s(this, L);
178
+ this.inertion = 1, i(this, N, null), i(this, o, null), i(this, l, 0), i(this, C, []), i(this, x, 0), i(this, R, (h) => {
179
+ Math.abs(t(this, x)) > 2 && h.preventDefault();
180
+ }), i(this, W, (h) => {
181
+ if (i(this, x, 0), i(this, l, 0), h.button !== 0 || h.composedPath().find(
181
182
  (f) => f instanceof HTMLElement && f.hasAttribute("drag-dead-zone")
182
183
  ))
183
184
  return;
184
- this.swipe || A.unsubscribe(t(this, x));
185
- let r = h, V = !1;
185
+ this.swipe || D.unsubscribe(t(this, L));
186
+ let a = h, g = !1;
186
187
  document.documentElement.classList.add("grabbing");
187
- let Z = 0, $ = 0, S = 0, B = 0;
188
+ let X = 0, $ = 0, F = 0, U = 0;
188
189
  se(
189
190
  (f) => {
190
- t(L, k) && t(L, k) !== t(this, o) || (Z = r.x - f.x, $ = r.y - f.y, S = f.x - h.x, B = f.y - h.y, this.axis === "x" ? (i(this, E, S), i(this, l, Z)) : (i(this, E, B), i(this, l, $)), r = f, V = this.axis === "x" && Math.abs(S) > Math.abs(B) || this.axis === "y" && Math.abs(B) > Math.abs(S), V && (document.documentElement.classList.add("dragging"), i(L, k, t(this, o)), this.changeEvent.notify("drag", t(this, l), f)));
191
+ t(v, T) && t(v, T) !== t(this, o) || (X = 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, X)) : (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)));
191
192
  },
192
193
  (f) => {
193
- i(L, k, null), V && (!this.swipe && this.inertion ? (i(this, l, t(this, l) * this.inertion), A.subscribe(t(this, x), {
194
- order: ae.CONTROLS - 1
194
+ i(v, T, null), g && (!this.swipe && this.inertion ? (i(this, l, t(this, l) * this.inertion), D.subscribe(t(this, L), {
195
+ order: ne.CONTROLS - 1
195
196
  })) : this.swipe && this.changeEvent.notify("drag-end", t(this, l), f)), document.documentElement.classList.remove("grabbing"), document.documentElement.classList.remove("dragging");
196
197
  }
197
198
  );
198
- }), i(this, x, () => {
199
- Math.floor(Math.abs(t(this, l))) || A.unsubscribe(t(this, x)), i(this, l, t(this, l) * 0.95), i(this, l, he(t(this, l), 3)), this.changeEvent.notify("drag", t(this, l), null);
200
- }), this.axis = (e == null ? void 0 : e.axis) || "y", this.swipe = (e == null ? void 0 : e.swipe) || !1, b && (i(this, o, e != null && e.element && J(e.element) || document.documentElement), i(this, P, (e == null ? void 0 : e.rootElement) || t(this, o)));
199
+ }), i(this, L, () => {
200
+ Math.floor(Math.abs(t(this, l))) || D.unsubscribe(t(this, L)), i(this, l, t(this, l) * 0.95), i(this, l, he(t(this, l), 3)), this.changeEvent.notify("drag", t(this, l), null);
201
+ }), this.axis = (e == null ? void 0 : e.axis) || "y", this.swipe = (e == null ? void 0 : e.swipe) || !1, b && (i(this, o, e != null && e.element && Z(e.element) || document.documentElement), i(this, N, (e == null ? void 0 : e.rootElement) || t(this, o)));
201
202
  }
202
203
  connect() {
203
- b && (i(this, T, [...t(this, P).querySelectorAll("a")]), t(this, T).forEach((e) => {
204
- e.addEventListener("click", t(this, X));
205
- }), t(this, o).addEventListener("pointerdown", t(this, Y)));
204
+ b && (i(this, C, [...t(this, N).querySelectorAll("a")]), t(this, C).forEach((e) => {
205
+ e.addEventListener("click", t(this, R));
206
+ }), t(this, o).addEventListener("pointerdown", t(this, W)));
206
207
  }
207
208
  disconnect() {
208
- b && (t(this, T).forEach((e) => {
209
- e.removeEventListener("click", t(this, X));
209
+ b && (t(this, C).forEach((e) => {
210
+ e.removeEventListener("click", t(this, R));
210
211
  }), t(this, o).removeEventListener(
211
212
  "pointerdown",
212
- t(this, Y)
213
- ), A.unsubscribe(t(this, x)));
213
+ t(this, W)
214
+ ), D.unsubscribe(t(this, L)));
214
215
  }
215
216
  };
216
- k = new WeakMap(), P = new WeakMap(), o = new WeakMap(), l = new WeakMap(), T = new WeakMap(), E = new WeakMap(), X = new WeakMap(), Y = new WeakMap(), x = new WeakMap(), s(L, k, null);
217
- let p = L;
217
+ T = new WeakMap(), N = new WeakMap(), o = new WeakMap(), l = new WeakMap(), C = new WeakMap(), x = new WeakMap(), R = new WeakMap(), W = new WeakMap(), L = new WeakMap(), s(v, T, null);
218
+ let p = v;
218
219
  export {
219
220
  ye as AutoplayControls,
220
- Q as Controls,
221
+ j as Controls,
221
222
  p as DragControls,
222
223
  ge as KeyboardControls,
223
224
  Ee as WheelControls
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.61.6",
3
+ "version": "0.61.7",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"