aptechka 0.57.4 → 0.57.6

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 J=s=>{throw TypeError(s)};var O=(s,r,e)=>r.has(s)||J("Cannot "+e);var t=(s,r,e)=>(O(s,r,"read from private field"),e?e.call(s):r.get(s)),n=(s,r,e)=>r.has(s)?J("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(s):r.set(s,e),a=(s,r,e,i)=>(O(s,r,"write to private field"),i?i.call(s,e):r.set(s,e),e),b=(s,r,e)=>(O(s,r,"access private method"),e);var K=(s,r,e)=>new Promise((i,l)=>{var d=C=>{try{F(e.next(C))}catch(N){l(N)}},P=C=>{try{F(e.throw(C))}catch(N){l(N)}},F=C=>C.done?i(C.value):Promise.resolve(C.value).then(d,P);F((e=e.apply(s,r)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("../index-Cqw2NKev.cjs"),G=require("../dom-JBOkFLTh.cjs"),q=require("../css-property/index.cjs"),V=require("../events-KVanG9sR.cjs"),W=require("../gestures-C7gbKx11.cjs"),X=require("../math-GDWEqu7y.cjs"),Y=require("../number-DyefJ5a1.cjs");var k,p,v,L,x,c,o,h,$,H,w,_,D,j,z;class A extends HTMLElement{constructor(){super(...arguments);n(this,h);n(this,k,new q.CSSProperty(this,"--loop",!0));n(this,p,new q.CSSProperty(this,"--autoplay",!1));n(this,v,new q.CSSProperty(this,"--swipe","x"));n(this,L);n(this,x,!1);n(this,c,[]);n(this,o,0);n(this,w,e=>{a(this,x,e.isIntersecting),t(this,x)?b(this,h,H).call(this):clearInterval(t(this,L))});n(this,_,()=>{clearInterval(t(this,L)),t(this,x)&&a(this,L,setInterval(t(this,j),parseFloat(t(this,p).current||"0")*1e3))});n(this,j,()=>{b(this,h,D).call(this,t(this,o)+1)});n(this,z,e=>{if(!t(this,v).current)return;let i=0;W.setupDrag(l=>{const d=e.x-l.x,P=e.y-l.y;t(this,v).current==="x"?Math.abs(d)>Math.abs(P)&&(i=Math.sign(d)):t(this,v).current==="y"&&Math.abs(P)>Math.abs(d)&&(i=Math.sign(P))},()=>{this.shift(i)})})}get counter(){return t(this,o)}get itemElements(){return t(this,c)}addItem(e){t(this,c).push(e),b(this,h,$).call(this)}set(e){(!this.handleSet||this.handleSet(e))&&(b(this,h,D).call(this,e),b(this,h,H).call(this))}shift(e){this.set(t(this,o)+e)}connectedCallback(){var e;a(this,c,[...this.querySelectorAll(`[data-billboard-item="${this.id||""}"]`)]),(e=t(this,c)[0])==null||e.classList.add("current"),b(this,h,$).call(this),t(this,p).subscribe(i=>{i.current?(S.intersector.subscribe(this,t(this,w)),b(this,h,H).call(this)):(a(this,x,!0),S.intersector.unsubscribe(t(this,w)),clearInterval(t(this,L)),b(this,h,D).call(this,0))}),t(this,p).observe(),t(this,v).observe(),t(this,k).observe(),this.addEventListener("pointerdown",t(this,z))}disconnectedCallback(){t(this,p).unobserve(),t(this,v).unobserve(),t(this,k).unobserve(),S.intersector.unsubscribe(t(this,w)),clearInterval(t(this,L))}}k=new WeakMap,p=new WeakMap,v=new WeakMap,L=new WeakMap,x=new WeakMap,c=new WeakMap,o=new WeakMap,h=new WeakSet,$=function(){t(this,c).length>1?this.classList.add("has-length"):this.classList.remove("has-length")},H=function(){t(this,p).current!==!1&&t(this,_).call(this)},w=new WeakMap,_=new WeakMap,D=function(e){t(this,k).current?a(this,o,Y.loopNumber(e,t(this,c).length)):a(this,o,X.clamp(e,0,t(this,c).length-1)),t(this,c).forEach((i,l)=>{i.classList.remove("current","previous","next"),l===t(this,o)?i.classList.add("current"):l<t(this,o)?i.classList.add("previous"):l>t(this,o)&&i.classList.add("next")}),V.dispatchEvent(this,"billboardChange",{detail:{counter:t(this,o)}}),setTimeout(()=>{window.dispatchEvent(new Event("resize"))},0)},j=new WeakMap,z=new WeakMap;customElements.get("e-billboard")||customElements.define("e-billboard",A);var u,y,m,T,B;class Q extends HTMLElement{constructor(){super(...arguments);n(this,u,null);n(this,y,null);n(this,m,[]);n(this,T,e=>{const i=e.currentTarget,l=t(this,m).findIndex(d=>d===i);l>=0&&t(this,u).set(l)});n(this,B,()=>{t(this,m).forEach((e,i)=>{i===t(this,u).counter?e.classList.add("current"):e.classList.remove("current")})})}connectedCallback(){return K(this,null,function*(){var e;if(a(this,u,G.findParentElement(this,A)),t(this,u)&&(yield customElements.whenDefined("e-billboard"),this.isConnected)){const i=t(this,u).itemElements.length;a(this,y,document.createElement("div"));for(let l=0;l<i;l++){const d=document.createElement("button");t(this,m).push(d),t(this,y).appendChild(d)}this.appendChild(t(this,y)),t(this,m).forEach(l=>{l.addEventListener("click",t(this,T))}),(e=t(this,u))==null||e.addEventListener("billboardChange",t(this,B)),t(this,B).call(this)}})}disconnectedCallback(){var e;t(this,m).forEach(i=>{i.removeEventListener("click",t(this,T))}),(e=t(this,u))==null||e.removeEventListener("billboardChange",t(this,B)),this.innerHTML="",a(this,m,[])}}u=new WeakMap,y=new WeakMap,m=new WeakMap,T=new WeakMap,B=new WeakMap;S.isBrowser&&!customElements.get("e-billboard-bullets")&&customElements.define("e-billboard-bullets",Q);var f,E,g;class R extends HTMLElement{constructor(){super();n(this,f,new q.CSSProperty(this,"--index",0));n(this,E,null);n(this,g,()=>{var e;t(this,f).current===((e=t(this,E))==null?void 0:e.counter)?this.classList.add("current"):this.classList.remove("current")});this.addEventListener("click",e=>{t(this,E)&&(!this.handleClick||this.handleClick(e))&&t(this,E).set(t(this,f).current)})}connectedCallback(){var e;this.tabIndex=0,a(this,E,G.findParentElement(this,A)),(e=t(this,E))==null||e.addEventListener("billboardChange",t(this,g)),customElements.whenDefined("e-billboard").then(()=>{this.isConnected&&t(this,g).call(this)}),t(this,f).subscribe(t(this,g)),t(this,f).observe()}disconnectedCallback(){var e;this.removeAttribute("tabindex"),t(this,f).unsubscribe(t(this,g)),t(this,f).unobserve(),(e=t(this,E))==null||e.removeEventListener("billboardChange",t(this,g))}}f=new WeakMap,E=new WeakMap,g=new WeakMap;S.isBrowser&&!customElements.get("e-billboard-set-button")&&customElements.define("e-billboard-set-button",R);var I,M;class U extends HTMLElement{constructor(){super();n(this,I,new q.CSSProperty(this,"--step",1));n(this,M,null);this.addEventListener("click",e=>{t(this,M)&&(!this.handleClick||this.handleClick(e))&&t(this,M).shift(t(this,I).current)})}connectedCallback(){this.tabIndex=0,a(this,M,G.findParentElement(this,A)),t(this,I).observe()}disconnectedCallback(){this.removeAttribute("tabindex"),t(this,I).unobserve()}}I=new WeakMap,M=new WeakMap;S.isBrowser&&!customElements.get("e-billboard-step-button")&&customElements.define("e-billboard-step-button",U);exports.BillboardBulletsElement=Q;exports.BillboardElement=A;exports.BillboardSetButtonElement=R;exports.BillboardStepButtonElement=U;
1
+ "use strict";var J=i=>{throw TypeError(i)};var N=(i,r,e)=>r.has(i)||J("Cannot "+e);var t=(i,r,e)=>(N(i,r,"read from private field"),e?e.call(i):r.get(i)),n=(i,r,e)=>r.has(i)?J("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(i):r.set(i,e),a=(i,r,e,s)=>(N(i,r,"write to private field"),s?s.call(i,e):r.set(i,e),e),u=(i,r,e)=>(N(i,r,"access private method"),e);var K=(i,r,e)=>new Promise((s,l)=>{var c=C=>{try{z(e.next(C))}catch(F){l(F)}},S=C=>{try{z(e.throw(C))}catch(F){l(F)}},z=C=>C.done?s(C.value):Promise.resolve(C.value).then(c,S);z((e=e.apply(i,r)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("../index-Cqw2NKev.cjs"),G=require("../dom-JBOkFLTh.cjs"),q=require("../css-property/index.cjs"),V=require("../events-KVanG9sR.cjs"),W=require("../gestures-C7gbKx11.cjs"),X=require("../math-GDWEqu7y.cjs"),Y=require("../number-DyefJ5a1.cjs");var w,p,v,L,x,d,o,h,O,H,y,_,D,$,j;class A extends HTMLElement{constructor(){super(...arguments);n(this,h);n(this,w,new q.CSSProperty(this,"--loop",!0));n(this,p,new q.CSSProperty(this,"--autoplay",!1));n(this,v,new q.CSSProperty(this,"--swipe","x"));n(this,L);n(this,x,!1);n(this,d,[]);n(this,o,0);n(this,y,e=>{a(this,x,e.isIntersecting),t(this,x)?u(this,h,H).call(this):clearInterval(t(this,L))});n(this,_,()=>{clearInterval(t(this,L)),t(this,x)&&a(this,L,setInterval(t(this,$),parseFloat(t(this,p).current||"0")*1e3))});n(this,$,()=>{u(this,h,D).call(this,t(this,o)+1)});n(this,j,e=>{if(!t(this,v).current)return;let s=0;W.setupDrag(l=>{const c=e.x-l.x,S=e.y-l.y;t(this,v).current==="x"?Math.abs(c)>Math.abs(S)&&Math.abs(c)>10&&(s=Math.sign(c)):t(this,v).current==="y"&&Math.abs(S)>Math.abs(c)&&Math.abs(S)>10&&(s=Math.sign(S))},()=>{s&&this.shift(s)})})}get counter(){return t(this,o)}get itemElements(){return t(this,d)}addItem(e){t(this,d).push(e),u(this,h,O).call(this)}set(e){(!this.handleSet||this.handleSet(e))&&(u(this,h,D).call(this,e),u(this,h,H).call(this))}shift(e){this.set(t(this,o)+e)}connectedCallback(){var e;a(this,d,[...this.querySelectorAll(`[data-billboard-item${this.id?`="${this.id}"`:""}]`)]),(e=t(this,d)[0])==null||e.classList.add("current"),u(this,h,O).call(this),t(this,p).subscribe(s=>{s.current?(k.intersector.subscribe(this,t(this,y)),u(this,h,H).call(this)):(a(this,x,!0),k.intersector.unsubscribe(t(this,y)),clearInterval(t(this,L)),u(this,h,D).call(this,0))}),t(this,p).observe(),t(this,v).observe(),t(this,w).observe(),this.addEventListener("pointerdown",t(this,j))}disconnectedCallback(){t(this,p).unobserve(),t(this,v).unobserve(),t(this,w).unobserve(),k.intersector.unsubscribe(t(this,y)),clearInterval(t(this,L))}}w=new WeakMap,p=new WeakMap,v=new WeakMap,L=new WeakMap,x=new WeakMap,d=new WeakMap,o=new WeakMap,h=new WeakSet,O=function(){t(this,d).length>1?this.classList.add("has-length"):this.classList.remove("has-length")},H=function(){t(this,p).current!==!1&&t(this,_).call(this)},y=new WeakMap,_=new WeakMap,D=function(e){t(this,w).current?a(this,o,Y.loopNumber(e,t(this,d).length)):a(this,o,X.clamp(e,0,t(this,d).length-1)),t(this,d).forEach((s,l)=>{s.classList.remove("current","previous","next"),l===t(this,o)?s.classList.add("current"):l<t(this,o)?s.classList.add("previous"):l>t(this,o)&&s.classList.add("next")}),V.dispatchEvent(this,"billboardChange",{detail:{counter:t(this,o)}}),setTimeout(()=>{window.dispatchEvent(new Event("resize"))},0)},$=new WeakMap,j=new WeakMap;customElements.get("e-billboard")||customElements.define("e-billboard",A);var b,B,m,T,M;class Q extends HTMLElement{constructor(){super(...arguments);n(this,b,null);n(this,B,null);n(this,m,[]);n(this,T,e=>{const s=e.currentTarget,l=t(this,m).findIndex(c=>c===s);l>=0&&t(this,b).set(l)});n(this,M,()=>{t(this,m).forEach((e,s)=>{s===t(this,b).counter?e.classList.add("current"):e.classList.remove("current")})})}connectedCallback(){return K(this,null,function*(){var e;if(a(this,b,G.findParentElement(this,A)),t(this,b)&&(yield customElements.whenDefined("e-billboard"),this.isConnected)){const s=t(this,b).itemElements.length;a(this,B,document.createElement("div"));for(let l=0;l<s;l++){const c=document.createElement("button");t(this,m).push(c),t(this,B).appendChild(c)}this.appendChild(t(this,B)),t(this,m).forEach(l=>{l.addEventListener("click",t(this,T))}),(e=t(this,b))==null||e.addEventListener("billboardChange",t(this,M)),t(this,M).call(this)}})}disconnectedCallback(){var e;t(this,m).forEach(s=>{s.removeEventListener("click",t(this,T))}),(e=t(this,b))==null||e.removeEventListener("billboardChange",t(this,M)),this.innerHTML="",a(this,m,[])}}b=new WeakMap,B=new WeakMap,m=new WeakMap,T=new WeakMap,M=new WeakMap;k.isBrowser&&!customElements.get("e-billboard-bullets")&&customElements.define("e-billboard-bullets",Q);var f,E,g;class R extends HTMLElement{constructor(){super();n(this,f,new q.CSSProperty(this,"--index",0));n(this,E,null);n(this,g,()=>{var e;t(this,f).current===((e=t(this,E))==null?void 0:e.counter)?this.classList.add("current"):this.classList.remove("current")});this.addEventListener("click",e=>{t(this,E)&&(!this.handleClick||this.handleClick(e))&&t(this,E).set(t(this,f).current)})}connectedCallback(){var e;this.tabIndex=0,a(this,E,G.findParentElement(this,A)),(e=t(this,E))==null||e.addEventListener("billboardChange",t(this,g)),customElements.whenDefined("e-billboard").then(()=>{this.isConnected&&t(this,g).call(this)}),t(this,f).subscribe(t(this,g)),t(this,f).observe()}disconnectedCallback(){var e;this.removeAttribute("tabindex"),t(this,f).unsubscribe(t(this,g)),t(this,f).unobserve(),(e=t(this,E))==null||e.removeEventListener("billboardChange",t(this,g))}}f=new WeakMap,E=new WeakMap,g=new WeakMap;k.isBrowser&&!customElements.get("e-billboard-set-button")&&customElements.define("e-billboard-set-button",R);var I,P;class U extends HTMLElement{constructor(){super();n(this,I,new q.CSSProperty(this,"--step",1));n(this,P,null);this.addEventListener("click",e=>{t(this,P)&&(!this.handleClick||this.handleClick(e))&&t(this,P).shift(t(this,I).current)})}connectedCallback(){this.tabIndex=0,a(this,P,G.findParentElement(this,A)),t(this,I).observe()}disconnectedCallback(){this.removeAttribute("tabindex"),t(this,I).unobserve()}}I=new WeakMap,P=new WeakMap;k.isBrowser&&!customElements.get("e-billboard-step-button")&&customElements.define("e-billboard-step-button",U);exports.BillboardBulletsElement=Q;exports.BillboardElement=A;exports.BillboardSetButtonElement=R;exports.BillboardStepButtonElement=U;
@@ -1,23 +1,23 @@
1
- var Q = (s) => {
2
- throw TypeError(s);
1
+ var Q = (i) => {
2
+ throw TypeError(i);
3
3
  };
4
- var j = (s, l, e) => l.has(s) || Q("Cannot " + e);
5
- var t = (s, l, e) => (j(s, l, "read from private field"), e ? e.call(s) : l.get(s)), n = (s, l, e) => l.has(s) ? Q("Cannot add the same private member more than once") : l instanceof WeakSet ? l.add(s) : l.set(s, e), a = (s, l, e, i) => (j(s, l, "write to private field"), i ? i.call(s, e) : l.set(s, e), e), u = (s, l, e) => (j(s, l, "access private method"), e);
6
- var R = (s, l, e) => new Promise((i, r) => {
7
- var d = (C) => {
4
+ var j = (i, h, e) => h.has(i) || Q("Cannot " + e);
5
+ var t = (i, h, e) => (j(i, h, "read from private field"), e ? e.call(i) : h.get(i)), n = (i, h, e) => h.has(i) ? Q("Cannot add the same private member more than once") : h instanceof WeakSet ? h.add(i) : h.set(i, e), a = (i, h, e, s) => (j(i, h, "write to private field"), s ? s.call(i, e) : h.set(i, e), e), u = (i, h, e) => (j(i, h, "access private method"), e);
6
+ var R = (i, h, e) => new Promise((s, l) => {
7
+ var o = (C) => {
8
8
  try {
9
- N(e.next(C));
10
- } catch ($) {
11
- r($);
9
+ F(e.next(C));
10
+ } catch (N) {
11
+ l(N);
12
12
  }
13
- }, S = (C) => {
13
+ }, k = (C) => {
14
14
  try {
15
- N(e.throw(C));
16
- } catch ($) {
17
- r($);
15
+ F(e.throw(C));
16
+ } catch (N) {
17
+ l(N);
18
18
  }
19
- }, N = (C) => C.done ? i(C.value) : Promise.resolve(C.value).then(d, S);
20
- N((e = e.apply(s, l)).next());
19
+ }, F = (C) => C.done ? s(C.value) : Promise.resolve(C.value).then(o, k);
20
+ F((e = e.apply(i, h)).next());
21
21
  });
22
22
  import { a as G, i as K } from "../index-euf5anj6.js";
23
23
  import { b as O } from "../dom-CVWzyXPH.js";
@@ -26,41 +26,41 @@ import { d as U } from "../events-CsVF98U6.js";
26
26
  import { s as V } from "../gestures-CcXV6fCp.js";
27
27
  import { c as W } from "../math-BOBiC4TN.js";
28
28
  import { l as X } from "../number-CbdpfO3u.js";
29
- var k, E, v, L, x, o, c, h, J, H, w, P, D, q, z;
30
- class F extends HTMLElement {
29
+ var w, E, v, L, x, d, c, r, J, H, I, P, D, $, q;
30
+ class z extends HTMLElement {
31
31
  constructor() {
32
32
  super(...arguments);
33
- n(this, h);
34
- n(this, k, new T(this, "--loop", !0));
33
+ n(this, r);
34
+ n(this, w, new T(this, "--loop", !0));
35
35
  n(this, E, new T(this, "--autoplay", !1));
36
36
  n(this, v, new T(this, "--swipe", "x"));
37
37
  n(this, L);
38
38
  n(this, x, !1);
39
- n(this, o, []);
39
+ n(this, d, []);
40
40
  n(this, c, 0);
41
- n(this, w, (e) => {
42
- a(this, x, e.isIntersecting), t(this, x) ? u(this, h, H).call(this) : clearInterval(t(this, L));
41
+ n(this, I, (e) => {
42
+ a(this, x, e.isIntersecting), t(this, x) ? u(this, r, H).call(this) : clearInterval(t(this, L));
43
43
  });
44
44
  n(this, P, () => {
45
45
  clearInterval(t(this, L)), t(this, x) && a(this, L, setInterval(
46
- t(this, q),
46
+ t(this, $),
47
47
  parseFloat(t(this, E).current || "0") * 1e3
48
48
  ));
49
49
  });
50
- n(this, q, () => {
51
- u(this, h, D).call(this, t(this, c) + 1);
50
+ n(this, $, () => {
51
+ u(this, r, D).call(this, t(this, c) + 1);
52
52
  });
53
- n(this, z, (e) => {
53
+ n(this, q, (e) => {
54
54
  if (!t(this, v).current)
55
55
  return;
56
- let i = 0;
56
+ let s = 0;
57
57
  V(
58
- (r) => {
59
- const d = e.x - r.x, S = e.y - r.y;
60
- t(this, v).current === "x" ? Math.abs(d) > Math.abs(S) && (i = Math.sign(d)) : t(this, v).current === "y" && Math.abs(S) > Math.abs(d) && (i = Math.sign(S));
58
+ (l) => {
59
+ const o = e.x - l.x, k = e.y - l.y;
60
+ t(this, v).current === "x" ? Math.abs(o) > Math.abs(k) && Math.abs(o) > 10 && (s = Math.sign(o)) : t(this, v).current === "y" && Math.abs(k) > Math.abs(o) && Math.abs(k) > 10 && (s = Math.sign(k));
61
61
  },
62
62
  () => {
63
- this.shift(i);
63
+ s && this.shift(s);
64
64
  }
65
65
  );
66
66
  });
@@ -69,38 +69,38 @@ class F extends HTMLElement {
69
69
  return t(this, c);
70
70
  }
71
71
  get itemElements() {
72
- return t(this, o);
72
+ return t(this, d);
73
73
  }
74
74
  addItem(e) {
75
- t(this, o).push(e), u(this, h, J).call(this);
75
+ t(this, d).push(e), u(this, r, J).call(this);
76
76
  }
77
77
  set(e) {
78
- (!this.handleSet || this.handleSet(e)) && (u(this, h, D).call(this, e), u(this, h, H).call(this));
78
+ (!this.handleSet || this.handleSet(e)) && (u(this, r, D).call(this, e), u(this, r, H).call(this));
79
79
  }
80
80
  shift(e) {
81
81
  this.set(t(this, c) + e);
82
82
  }
83
83
  connectedCallback() {
84
84
  var e;
85
- a(this, o, [
85
+ a(this, d, [
86
86
  ...this.querySelectorAll(
87
- `[data-billboard-item="${this.id || ""}"]`
87
+ `[data-billboard-item${this.id ? `="${this.id}"` : ""}]`
88
88
  )
89
- ]), (e = t(this, o)[0]) == null || e.classList.add("current"), u(this, h, J).call(this), t(this, E).subscribe((i) => {
90
- i.current ? (G.subscribe(this, t(this, w)), u(this, h, H).call(this)) : (a(this, x, !0), G.unsubscribe(t(this, w)), clearInterval(t(this, L)), u(this, h, D).call(this, 0));
91
- }), t(this, E).observe(), t(this, v).observe(), t(this, k).observe(), this.addEventListener("pointerdown", t(this, z));
89
+ ]), (e = t(this, d)[0]) == null || e.classList.add("current"), u(this, r, J).call(this), t(this, E).subscribe((s) => {
90
+ s.current ? (G.subscribe(this, t(this, I)), u(this, r, H).call(this)) : (a(this, x, !0), G.unsubscribe(t(this, I)), clearInterval(t(this, L)), u(this, r, D).call(this, 0));
91
+ }), t(this, E).observe(), t(this, v).observe(), t(this, w).observe(), this.addEventListener("pointerdown", t(this, q));
92
92
  }
93
93
  disconnectedCallback() {
94
- t(this, E).unobserve(), t(this, v).unobserve(), t(this, k).unobserve(), G.unsubscribe(t(this, w)), clearInterval(t(this, L));
94
+ t(this, E).unobserve(), t(this, v).unobserve(), t(this, w).unobserve(), G.unsubscribe(t(this, I)), clearInterval(t(this, L));
95
95
  }
96
96
  }
97
- k = new WeakMap(), E = new WeakMap(), v = new WeakMap(), L = new WeakMap(), x = new WeakMap(), o = new WeakMap(), c = new WeakMap(), h = new WeakSet(), J = function() {
98
- t(this, o).length > 1 ? this.classList.add("has-length") : this.classList.remove("has-length");
97
+ w = new WeakMap(), E = new WeakMap(), v = new WeakMap(), L = new WeakMap(), x = new WeakMap(), d = new WeakMap(), c = new WeakMap(), r = new WeakSet(), J = function() {
98
+ t(this, d).length > 1 ? this.classList.add("has-length") : this.classList.remove("has-length");
99
99
  }, H = function() {
100
100
  t(this, E).current !== !1 && t(this, P).call(this);
101
- }, w = new WeakMap(), P = new WeakMap(), D = function(e) {
102
- t(this, k).current ? a(this, c, X(e, t(this, o).length)) : a(this, c, W(e, 0, t(this, o).length - 1)), t(this, o).forEach((i, r) => {
103
- i.classList.remove("current", "previous", "next"), r === t(this, c) ? i.classList.add("current") : r < t(this, c) ? i.classList.add("previous") : r > t(this, c) && i.classList.add("next");
101
+ }, I = new WeakMap(), P = new WeakMap(), D = function(e) {
102
+ t(this, w).current ? a(this, c, X(e, t(this, d).length)) : a(this, c, W(e, 0, t(this, d).length - 1)), t(this, d).forEach((s, l) => {
103
+ s.classList.remove("current", "previous", "next"), l === t(this, c) ? s.classList.add("current") : l < t(this, c) ? s.classList.add("previous") : l > t(this, c) && s.classList.add("next");
104
104
  }), U(this, "billboardChange", {
105
105
  detail: {
106
106
  counter: t(this, c)
@@ -108,37 +108,37 @@ k = new WeakMap(), E = new WeakMap(), v = new WeakMap(), L = new WeakMap(), x =
108
108
  }), setTimeout(() => {
109
109
  window.dispatchEvent(new Event("resize"));
110
110
  }, 0);
111
- }, q = new WeakMap(), z = new WeakMap();
112
- customElements.get("e-billboard") || customElements.define("e-billboard", F);
113
- var b, I, m, A, y;
111
+ }, $ = new WeakMap(), q = new WeakMap();
112
+ customElements.get("e-billboard") || customElements.define("e-billboard", z);
113
+ var b, M, m, A, y;
114
114
  class Y extends HTMLElement {
115
115
  constructor() {
116
116
  super(...arguments);
117
117
  n(this, b, null);
118
- n(this, I, null);
118
+ n(this, M, null);
119
119
  n(this, m, []);
120
120
  n(this, A, (e) => {
121
- const i = e.currentTarget, r = t(this, m).findIndex((d) => d === i);
122
- r >= 0 && t(this, b).set(r);
121
+ const s = e.currentTarget, l = t(this, m).findIndex((o) => o === s);
122
+ l >= 0 && t(this, b).set(l);
123
123
  });
124
124
  n(this, y, () => {
125
- t(this, m).forEach((e, i) => {
126
- i === t(this, b).counter ? e.classList.add("current") : e.classList.remove("current");
125
+ t(this, m).forEach((e, s) => {
126
+ s === t(this, b).counter ? e.classList.add("current") : e.classList.remove("current");
127
127
  });
128
128
  });
129
129
  }
130
130
  connectedCallback() {
131
131
  return R(this, null, function* () {
132
132
  var e;
133
- if (a(this, b, O(this, F)), t(this, b) && (yield customElements.whenDefined("e-billboard"), this.isConnected)) {
134
- const i = t(this, b).itemElements.length;
135
- a(this, I, document.createElement("div"));
136
- for (let r = 0; r < i; r++) {
137
- const d = document.createElement("button");
138
- t(this, m).push(d), t(this, I).appendChild(d);
133
+ if (a(this, b, O(this, z)), t(this, b) && (yield customElements.whenDefined("e-billboard"), this.isConnected)) {
134
+ const s = t(this, b).itemElements.length;
135
+ a(this, M, document.createElement("div"));
136
+ for (let l = 0; l < s; l++) {
137
+ const o = document.createElement("button");
138
+ t(this, m).push(o), t(this, M).appendChild(o);
139
139
  }
140
- this.appendChild(t(this, I)), t(this, m).forEach((r) => {
141
- r.addEventListener("click", t(this, A));
140
+ this.appendChild(t(this, M)), t(this, m).forEach((l) => {
141
+ l.addEventListener("click", t(this, A));
142
142
  }), (e = t(this, b)) == null || e.addEventListener(
143
143
  "billboardChange",
144
144
  t(this, y)
@@ -148,15 +148,15 @@ class Y extends HTMLElement {
148
148
  }
149
149
  disconnectedCallback() {
150
150
  var e;
151
- t(this, m).forEach((i) => {
152
- i.removeEventListener("click", t(this, A));
151
+ t(this, m).forEach((s) => {
152
+ s.removeEventListener("click", t(this, A));
153
153
  }), (e = t(this, b)) == null || e.removeEventListener(
154
154
  "billboardChange",
155
155
  t(this, y)
156
156
  ), this.innerHTML = "", a(this, m, []);
157
157
  }
158
158
  }
159
- b = new WeakMap(), I = new WeakMap(), m = new WeakMap(), A = new WeakMap(), y = new WeakMap();
159
+ b = new WeakMap(), M = new WeakMap(), m = new WeakMap(), A = new WeakMap(), y = new WeakMap();
160
160
  K && !customElements.get("e-billboard-bullets") && customElements.define("e-billboard-bullets", Y);
161
161
  var f, p, g;
162
162
  class Z extends HTMLElement {
@@ -174,7 +174,7 @@ class Z extends HTMLElement {
174
174
  }
175
175
  connectedCallback() {
176
176
  var e;
177
- this.tabIndex = 0, a(this, p, O(this, F)), (e = t(this, p)) == null || e.addEventListener(
177
+ this.tabIndex = 0, a(this, p, O(this, z)), (e = t(this, p)) == null || e.addEventListener(
178
178
  "billboardChange",
179
179
  t(this, g)
180
180
  ), customElements.whenDefined("e-billboard").then(() => {
@@ -191,28 +191,28 @@ class Z extends HTMLElement {
191
191
  }
192
192
  f = new WeakMap(), p = new WeakMap(), g = new WeakMap();
193
193
  K && !customElements.get("e-billboard-set-button") && customElements.define("e-billboard-set-button", Z);
194
- var M, B;
194
+ var B, S;
195
195
  class _ extends HTMLElement {
196
196
  constructor() {
197
197
  super();
198
- n(this, M, new T(this, "--step", 1));
199
- n(this, B, null);
198
+ n(this, B, new T(this, "--step", 1));
199
+ n(this, S, null);
200
200
  this.addEventListener("click", (e) => {
201
- t(this, B) && (!this.handleClick || this.handleClick(e)) && t(this, B).shift(t(this, M).current);
201
+ t(this, S) && (!this.handleClick || this.handleClick(e)) && t(this, S).shift(t(this, B).current);
202
202
  });
203
203
  }
204
204
  connectedCallback() {
205
- this.tabIndex = 0, a(this, B, O(this, F)), t(this, M).observe();
205
+ this.tabIndex = 0, a(this, S, O(this, z)), t(this, B).observe();
206
206
  }
207
207
  disconnectedCallback() {
208
- this.removeAttribute("tabindex"), t(this, M).unobserve();
208
+ this.removeAttribute("tabindex"), t(this, B).unobserve();
209
209
  }
210
210
  }
211
- M = new WeakMap(), B = new WeakMap();
211
+ B = new WeakMap(), S = new WeakMap();
212
212
  K && !customElements.get("e-billboard-step-button") && customElements.define("e-billboard-step-button", _);
213
213
  export {
214
214
  Y as BillboardBulletsElement,
215
- F as BillboardElement,
215
+ z as BillboardElement,
216
216
  Z as BillboardSetButtonElement,
217
217
  _ as BillboardStepButtonElement
218
218
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.57.4",
3
+ "version": "0.57.6",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"