aptechka 0.56.11 → 0.57.0

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